diff --git a/VERSION b/VERSION
index b1468fd4..d388d619 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.1.46
+1.1.47
diff --git a/web/admin-spa/dist/assets/AccountsView-CEcjZ_mL.js b/web/admin-spa/dist/assets/AccountsView-zsZTMRlc.js
similarity index 99%
rename from web/admin-spa/dist/assets/AccountsView-CEcjZ_mL.js
rename to web/admin-spa/dist/assets/AccountsView-zsZTMRlc.js
index a4e754c9..3bfdf5f5 100644
--- a/web/admin-spa/dist/assets/AccountsView-CEcjZ_mL.js
+++ b/web/admin-spa/dist/assets/AccountsView-zsZTMRlc.js
@@ -1,4 +1,4 @@
-import{r as k,aR as $e,o as K,V as Te,x as i,y as r,z as e,L as A,K as C,al as fe,aY as Z,aX as ge,aq as z,aZ as Ce,C as D,O as b,c as ee,P as j,I as te,a5 as be,R as ae,an as Y,u as E,q as Ae,Y as Ue,Q as _e,ac as Ie,B as je}from"./vue-vendor-YmkKLAOK.js";import{s as S}from"./toast-BvwA7Mwb.js";import{a as M,_ as Ve}from"./index-BfaL5u2_.js";import"./element-plus-D-FTEVKS.js";import"./vendor-BDiMbLwQ.js";const le=k(!1),xe=k({title:"",message:"",confirmText:"继续",cancelText:"取消"}),Q=k(null);function we(){return{showConfirmModal:le,confirmOptions:xe,showConfirm:(y,x,U="继续",$="取消")=>new Promise(h=>{xe.value={title:y,message:x,confirmText:U,cancelText:$},Q.value=h,le.value=!0}),handleConfirm:()=>{le.value=!1,Q.value&&(Q.value(!0),Q.value=null)},handleCancel:()=>{le.value=!1,Q.value&&(Q.value(!1),Q.value=null)}}}const he=$e("accounts",()=>{const R=k([]),L=k([]),o=k(!1),y=k(null),x=k(""),U=k("asc"),$=async()=>{o.value=!0,y.value=null;try{const f=await M.get("/admin/claude-accounts");if(f.success)R.value=f.data||[];else throw new Error(f.message||"获取Claude账户失败")}catch(f){throw y.value=f.message,f}finally{o.value=!1}},h=async()=>{o.value=!0,y.value=null;try{const f=await M.get("/admin/gemini-accounts");if(f.success)L.value=f.data||[];else throw new Error(f.message||"获取Gemini账户失败")}catch(f){throw y.value=f.message,f}finally{o.value=!1}};return{claudeAccounts:R,geminiAccounts:L,loading:o,error:y,sortBy:x,sortOrder:U,fetchClaudeAccounts:$,fetchGeminiAccounts:h,fetchAllAccounts:async()=>{o.value=!0,y.value=null;try{await Promise.all([$(),h()])}catch(f){throw y.value=f.message,f}finally{o.value=!1}},createClaudeAccount:async f=>{o.value=!0,y.value=null;try{const d=await M.post("/admin/claude-accounts",f);if(d.success)return await $(),d.data;throw new Error(d.message||"创建Claude账户失败")}catch(d){throw y.value=d.message,d}finally{o.value=!1}},createGeminiAccount:async f=>{o.value=!0,y.value=null;try{const d=await M.post("/admin/gemini-accounts",f);if(d.success)return await h(),d.data;throw new Error(d.message||"创建Gemini账户失败")}catch(d){throw y.value=d.message,d}finally{o.value=!1}},updateClaudeAccount:async(f,d)=>{o.value=!0,y.value=null;try{const T=await M.put(`/admin/claude-accounts/${f}`,d);if(T.success)return await $(),T;throw new Error(T.message||"更新Claude账户失败")}catch(T){throw y.value=T.message,T}finally{o.value=!1}},updateGeminiAccount:async(f,d)=>{o.value=!0,y.value=null;try{const T=await M.put(`/admin/gemini-accounts/${f}`,d);if(T.success)return await h(),T;throw new Error(T.message||"更新Gemini账户失败")}catch(T){throw y.value=T.message,T}finally{o.value=!1}},toggleAccount:async(f,d)=>{o.value=!0,y.value=null;try{const T=f==="claude"?`/admin/claude-accounts/${d}/toggle`:`/admin/gemini-accounts/${d}/toggle`,W=await M.put(T);if(W.success)return f==="claude"?await $():await h(),W;throw new Error(W.message||"切换状态失败")}catch(T){throw y.value=T.message,T}finally{o.value=!1}},deleteAccount:async(f,d)=>{o.value=!0,y.value=null;try{const T=f==="claude"?`/admin/claude-accounts/${d}`:`/admin/gemini-accounts/${d}`,W=await M.delete(T);if(W.success)return f==="claude"?await $():await h(),W;throw new Error(W.message||"删除失败")}catch(T){throw y.value=T.message,T}finally{o.value=!1}},refreshClaudeToken:async f=>{o.value=!0,y.value=null;try{const d=await M.post(`/admin/claude-accounts/${f}/refresh`);if(d.success)return await $(),d;throw new Error(d.message||"Token刷新失败")}catch(d){throw y.value=d.message,d}finally{o.value=!1}},generateClaudeAuthUrl:async f=>{try{const d=await M.post("/admin/claude-accounts/generate-auth-url",f);if(d.success)return d.data;throw new Error(d.message||"生成授权URL失败")}catch(d){throw y.value=d.message,d}},exchangeClaudeCode:async f=>{try{const d=await M.post("/admin/claude-accounts/exchange-code",f);if(d.success)return d.data;throw new Error(d.message||"交换授权码失败")}catch(d){throw y.value=d.message,d}},generateGeminiAuthUrl:async f=>{try{const d=await M.post("/admin/gemini-accounts/generate-auth-url",f);if(d.success)return d.data;throw new Error(d.message||"生成授权URL失败")}catch(d){throw y.value=d.message,d}},exchangeGeminiCode:async f=>{try{const d=await M.post("/admin/gemini-accounts/exchange-code",f);if(d.success)return d.data;throw new Error(d.message||"交换授权码失败")}catch(d){throw y.value=d.message,d}},sortAccounts:f=>{x.value===f?U.value=U.value==="asc"?"desc":"asc":(x.value=f,U.value="asc")},reset:()=>{R.value=[],L.value=[],o.value=!1,y.value=null,x.value="",U.value="asc"}}}),Se={class:"space-y-4"},Ge={class:"flex items-center justify-between"},Re={class:"flex items-center cursor-pointer"},Me={key:0,class:"bg-gray-50 p-4 rounded-lg border border-gray-200 space-y-4"},Pe={class:"grid grid-cols-2 gap-4"},Oe={class:"space-y-4"},Le={class:"flex items-center"},ze={key:0,class:"grid grid-cols-2 gap-4"},De={class:"relative"},Ee=["type"],ve={__name:"ProxyConfig",props:{modelValue:{type:Object,default:()=>({enabled:!1,type:"socks5",host:"",port:"",username:"",password:""})}},emits:["update:modelValue"],setup(R,{emit:L}){const o=R,y=L,x=k({...o.modelValue}),U=k(!!(x.value.username||x.value.password)),$=k(!1);K(()=>o.modelValue,v=>{JSON.stringify(v)!==JSON.stringify(x.value)&&(x.value={...v},U.value=!!(v.username||v.password))},{deep:!0}),K(()=>x.value.enabled,v=>{_()}),K(()=>x.value.type,v=>{_()}),K(()=>x.value.host,v=>{_()}),K(()=>x.value.port,v=>{_()}),K(()=>x.value.username,v=>{_()}),K(()=>x.value.password,v=>{_()}),K(U,v=>{v||(x.value.username="",x.value.password="",_())});let h=null;function _(){h&&clearTimeout(h),h=setTimeout(()=>{const v={...x.value};U.value||(v.username="",v.password=""),y("update:modelValue",v)},100)}return Te(()=>{h&&clearTimeout(h)}),(v,c)=>(r(),i("div",Se,[e("div",Ge,[c[9]||(c[9]=e("h4",{class:"text-sm font-semibold text-gray-700"},"代理设置 (可选)",-1)),e("label",Re,[C(e("input",{type:"checkbox","onUpdate:modelValue":c[0]||(c[0]=I=>x.value.enabled=I),class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"},null,512),[[fe,x.value.enabled]]),c[8]||(c[8]=e("span",{class:"ml-2 text-sm text-gray-700"},"启用代理",-1))])]),x.value.enabled?(r(),i("div",Me,[c[17]||(c[17]=Z('
配置代理以访问受限的网络资源。支持 SOCKS5 和 HTTP 代理。
请确保代理服务器稳定可用,否则会影响账户的正常使用。
',1)),e("div",null,[c[11]||(c[11]=e("label",{class:"block text-sm font-medium text-gray-700 mb-2"},"代理类型",-1)),C(e("select",{"onUpdate:modelValue":c[1]||(c[1]=I=>x.value.type=I),class:"form-input w-full"},c[10]||(c[10]=[e("option",{value:"socks5"},"SOCKS5",-1),e("option",{value:"http"},"HTTP",-1),e("option",{value:"https"},"HTTPS",-1)]),512),[[ge,x.value.type]])]),e("div",Pe,[e("div",null,[c[12]||(c[12]=e("label",{class:"block text-sm font-medium text-gray-700 mb-2"},"主机地址",-1)),C(e("input",{"onUpdate:modelValue":c[2]||(c[2]=I=>x.value.host=I),type:"text",placeholder:"例如: 192.168.1.100",class:"form-input w-full"},null,512),[[z,x.value.host]])]),e("div",null,[c[13]||(c[13]=e("label",{class:"block text-sm font-medium text-gray-700 mb-2"},"端口",-1)),C(e("input",{"onUpdate:modelValue":c[3]||(c[3]=I=>x.value.port=I),type:"number",placeholder:"例如: 1080",class:"form-input w-full"},null,512),[[z,x.value.port]])])]),e("div",Oe,[e("div",Le,[C(e("input",{type:"checkbox","onUpdate:modelValue":c[4]||(c[4]=I=>U.value=I),id:"proxyAuth",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"},null,512),[[fe,U.value]]),c[14]||(c[14]=e("label",{for:"proxyAuth",class:"ml-2 text-sm text-gray-700 cursor-pointer"}," 需要身份验证 ",-1))]),U.value?(r(),i("div",ze,[e("div",null,[c[15]||(c[15]=e("label",{class:"block text-sm font-medium text-gray-700 mb-2"},"用户名",-1)),C(e("input",{"onUpdate:modelValue":c[5]||(c[5]=I=>x.value.username=I),type:"text",placeholder:"代理用户名",class:"form-input w-full"},null,512),[[z,x.value.username]])]),e("div",null,[c[16]||(c[16]=e("label",{class:"block text-sm font-medium text-gray-700 mb-2"},"密码",-1)),e("div",De,[C(e("input",{"onUpdate:modelValue":c[6]||(c[6]=I=>x.value.password=I),type:$.value?"text":"password",placeholder:"代理密码",class:"form-input w-full pr-10"},null,8,Ee),[[Ce,x.value.password]]),e("button",{type:"button",onClick:c[7]||(c[7]=I=>$.value=!$.value),class:"absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400 hover:text-gray-600"},[e("i",{class:D($.value?"fas fa-eye-slash":"fas fa-eye")},null,2)])])])])):A("",!0)]),c[18]||(c[18]=e("div",{class:"bg-blue-50 p-3 rounded-lg border border-blue-200"},[e("p",{class:"text-xs text-blue-700"},[e("i",{class:"fas fa-info-circle mr-1"}),e("strong",null,"提示:"),b("代理设置将用于所有与此账户相关的API请求。请确保代理服务器支持HTTPS流量转发。 ")])],-1))])):A("",!0)]))}},Ke={class:"space-y-6"},We={key:0},qe={class:"bg-blue-50 p-6 rounded-lg border border-blue-200"},Be={class:"flex items-start gap-4"},Ne={class:"flex-1"},Fe={class:"space-y-4"},He={class:"bg-white/80 rounded-lg p-4 border border-blue-300"},Je={class:"flex items-start gap-3"},Ye={class:"flex-1"},Qe=["disabled"],Xe={key:0,class:"fas fa-link mr-2"},Ze={key:1,class:"loading-spinner mr-2"},et={key:1,class:"space-y-3"},tt={class:"flex items-center gap-2"},st=["value"],lt={class:"bg-white/80 rounded-lg p-4 border border-blue-300"},at={class:"flex items-start gap-3"},ot={class:"flex-1"},nt={class:"space-y-3"},rt={key:1},it={class:"bg-green-50 p-6 rounded-lg border border-green-200"},ut={class:"flex items-start gap-4"},dt={class:"flex-1"},ct={class:"space-y-4"},mt={class:"bg-white/80 rounded-lg p-4 border border-green-300"},pt={class:"flex items-start gap-3"},ft={class:"flex-1"},xt=["disabled"],vt={key:0,class:"fas fa-link mr-2"},yt={key:1,class:"loading-spinner mr-2"},gt={key:1,class:"space-y-3"},bt={class:"flex items-center gap-2"},wt=["value"],ht={class:"bg-white/80 rounded-lg p-4 border border-green-300"},kt={class:"flex items-start gap-3"},$t={class:"flex-1"},Tt={class:"space-y-3"},Ct={class:"flex gap-3 pt-4"},At=["disabled"],Ut={key:0,class:"loading-spinner mr-2"},_t={__name:"OAuthFlow",props:{platform:{type:String,required:!0},proxy:{type:Object,default:null}},emits:["success","back"],setup(R,{emit:L}){const o=R,y=L,x=he(),U=k(!1),$=k(!1),h=k(""),_=k(""),v=k(!1),c=k(""),I=ee(()=>h.value&&_.value.trim());K(_,g=>{if(!g||typeof g!="string")return;const a=g.trim();if(!a)return;if(a.startsWith("http://")||a.startsWith("https://"))if(a.startsWith("http://localhost:45462"))try{const q=new URL(a).searchParams.get("code");q?(_.value=q,S("成功提取授权码!","success"),console.log("Successfully extracted authorization code from URL")):S("URL 中未找到授权码参数,请检查链接是否正确","error")}catch(N){console.error("Failed to parse URL:",N),S("链接格式错误,请检查是否为完整的 URL","error")}else if(o.platform==="gemini")try{const q=new URL(a).searchParams.get("code");q&&(_.value=q,S("成功提取授权码!","success"))}catch{}else S("请粘贴以 http://localhost:45462 开头的链接","error")});const P=async()=>{var g;U.value=!0;try{const a=(g=o.proxy)!=null&&g.enabled?{proxy:{type:o.proxy.type,host:o.proxy.host,port:parseInt(o.proxy.port),username:o.proxy.username||null,password:o.proxy.password||null}}:{};if(o.platform==="claude"){const G=await x.generateClaudeAuthUrl(a);h.value=G.authUrl,c.value=G.sessionId}else if(o.platform==="gemini"){const G=await x.generateGeminiAuthUrl(a);h.value=G.authUrl,c.value=G.sessionId}}catch(a){S(a.message||"生成授权链接失败","error")}finally{U.value=!1}},V=()=>{h.value="",_.value="",P()},F=async()=>{try{await navigator.clipboard.writeText(h.value),v.value=!0,S("链接已复制","success"),setTimeout(()=>{v.value=!1},2e3)}catch{const a=document.createElement("input");a.value=h.value,document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),v.value=!0,S("链接已复制","success"),setTimeout(()=>{v.value=!1},2e3)}},s=async()=>{var g;if(I.value){$.value=!0;try{let a={};o.platform==="claude"?a={sessionId:c.value,callbackUrl:_.value.trim()}:o.platform==="gemini"&&(a={code:_.value.trim(),sessionId:c.value}),(g=o.proxy)!=null&&g.enabled&&(a.proxy={type:o.proxy.type,host:o.proxy.host,port:parseInt(o.proxy.port),username:o.proxy.username||null,password:o.proxy.password||null});let G;o.platform==="claude"?G=await x.exchangeClaudeCode(a):o.platform==="gemini"&&(G=await x.exchangeGeminiCode(a)),y("success",G)}catch(a){S(a.message||"授权失败,请检查授权码是否正确","error")}finally{$.value=!1}}};return(g,a)=>(r(),i("div",Ke,[R.platform==="claude"?(r(),i("div",We,[e("div",qe,[e("div",Be,[a[14]||(a[14]=e("div",{class:"w-10 h-10 bg-blue-500 rounded-lg flex items-center justify-center flex-shrink-0"},[e("i",{class:"fas fa-link text-white"})],-1)),e("div",Ne,[a[12]||(a[12]=e("h4",{class:"font-semibold text-blue-900 mb-3"},"Claude 账户授权",-1)),a[13]||(a[13]=e("p",{class:"text-sm text-blue-800 mb-4"}," 请按照以下步骤完成 Claude 账户的授权: ",-1)),e("div",Fe,[e("div",He,[e("div",Je,[a[5]||(a[5]=e("div",{class:"w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0"},"1",-1)),e("div",Ye,[a[4]||(a[4]=e("p",{class:"font-medium text-blue-900 mb-2"},"点击下方按钮生成授权链接",-1)),h.value?(r(),i("div",et,[e("div",tt,[e("input",{type:"text",value:h.value,readonly:"",class:"form-input flex-1 text-xs font-mono bg-gray-50"},null,8,st),e("button",{onClick:F,class:"px-3 py-2 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",title:"复制链接"},[e("i",{class:D(v.value?"fas fa-check text-green-500":"fas fa-copy")},null,2)])]),e("button",{onClick:V,class:"text-xs text-blue-600 hover:text-blue-700"},a[3]||(a[3]=[e("i",{class:"fas fa-sync-alt mr-1"},null,-1),b("重新生成 ",-1)]))])):(r(),i("button",{key:0,onClick:P,disabled:U.value,class:"btn btn-primary px-4 py-2 text-sm"},[U.value?(r(),i("div",Ze)):(r(),i("i",Xe)),b(" "+j(U.value?"生成中...":"生成授权链接"),1)],8,Qe))])])]),a[11]||(a[11]=Z('2
在浏览器中打开链接并完成授权
请在新标签页中打开授权链接,登录您的 Claude 账户并授权。
注意: 如果您设置了代理,请确保浏览器也使用相同的代理访问授权页面。
',1)),e("div",lt,[e("div",at,[a[10]||(a[10]=e("div",{class:"w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0"},"3",-1)),e("div",ot,[a[8]||(a[8]=e("p",{class:"font-medium text-blue-900 mb-2"},"输入 Authorization Code",-1)),a[9]||(a[9]=e("p",{class:"text-sm text-blue-700 mb-3"},[b(" 授权完成后,页面会显示一个 "),e("strong",null,"Authorization Code"),b(",请将其复制并粘贴到下方输入框: ")],-1)),e("div",nt,[e("div",null,[a[6]||(a[6]=e("label",{class:"block text-sm font-semibold text-gray-700 mb-2"},[e("i",{class:"fas fa-key text-blue-500 mr-2"}),b("Authorization Code ")],-1)),C(e("textarea",{"onUpdate:modelValue":a[0]||(a[0]=G=>_.value=G),rows:"3",class:"form-input w-full resize-none font-mono text-sm",placeholder:"粘贴从Claude页面获取的Authorization Code..."},null,512),[[z,_.value]])]),a[7]||(a[7]=e("p",{class:"text-xs text-gray-500 mt-2"},[e("i",{class:"fas fa-info-circle mr-1"}),b(" 请粘贴从Claude页面复制的Authorization Code ")],-1))])])])])])])])])])):R.platform==="gemini"?(r(),i("div",rt,[e("div",it,[e("div",ut,[a[26]||(a[26]=e("div",{class:"w-10 h-10 bg-green-500 rounded-lg flex items-center justify-center flex-shrink-0"},[e("i",{class:"fas fa-robot text-white"})],-1)),e("div",dt,[a[24]||(a[24]=e("h4",{class:"font-semibold text-green-900 mb-3"},"Gemini 账户授权",-1)),a[25]||(a[25]=e("p",{class:"text-sm text-green-800 mb-4"}," 请按照以下步骤完成 Gemini 账户的授权: ",-1)),e("div",ct,[e("div",mt,[e("div",pt,[a[17]||(a[17]=e("div",{class:"w-6 h-6 bg-green-600 text-white rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0"},"1",-1)),e("div",ft,[a[16]||(a[16]=e("p",{class:"font-medium text-green-900 mb-2"},"点击下方按钮生成授权链接",-1)),h.value?(r(),i("div",gt,[e("div",bt,[e("input",{type:"text",value:h.value,readonly:"",class:"form-input flex-1 text-xs font-mono bg-gray-50"},null,8,wt),e("button",{onClick:F,class:"px-3 py-2 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",title:"复制链接"},[e("i",{class:D(v.value?"fas fa-check text-green-500":"fas fa-copy")},null,2)])]),e("button",{onClick:V,class:"text-xs text-green-600 hover:text-green-700"},a[15]||(a[15]=[e("i",{class:"fas fa-sync-alt mr-1"},null,-1),b("重新生成 ",-1)]))])):(r(),i("button",{key:0,onClick:P,disabled:U.value,class:"btn btn-primary px-4 py-2 text-sm"},[U.value?(r(),i("div",yt)):(r(),i("i",vt)),b(" "+j(U.value?"生成中...":"生成授权链接"),1)],8,xt))])])]),a[23]||(a[23]=Z('2
在浏览器中打开链接并完成授权
点击上方的授权链接,在新页面中完成Google账号登录 点击“登录”按钮后可能会加载很慢(这是正常的) 如果超过1分钟还在加载,请按 F5 刷新页面 授权完成后会跳转到 http://localhost:45462 (可能显示无法访问) 提示: 如果页面一直无法跳转,可以打开浏览器开发者工具(F12),F5刷新一下授权页再点击页面的登录按钮,在“网络”标签中找到以 localhost:45462 开头的请求,复制其完整URL。
',1)),e("div",ht,[e("div",kt,[a[22]||(a[22]=e("div",{class:"w-6 h-6 bg-green-600 text-white rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0"},"3",-1)),e("div",$t,[a[20]||(a[20]=e("p",{class:"font-medium text-green-900 mb-2"},"复制oauth后的链接",-1)),a[21]||(a[21]=e("p",{class:"text-sm text-green-700 mb-3"}," 复制浏览器地址栏的完整链接并粘贴到下方输入框: ",-1)),e("div",Tt,[e("div",null,[a[18]||(a[18]=e("label",{class:"block text-sm font-semibold text-gray-700 mb-2"},[e("i",{class:"fas fa-key text-green-500 mr-2"}),b("复制oauth后的链接 ")],-1)),C(e("textarea",{"onUpdate:modelValue":a[1]||(a[1]=G=>_.value=G),rows:"3",class:"form-input w-full resize-none font-mono text-sm",placeholder:"粘贴以 http://localhost:45462 开头的完整链接..."},null,512),[[z,_.value]])]),a[19]||(a[19]=Z(' 支持粘贴完整链接,系统会自动提取授权码
也可以直接粘贴授权码(code参数的值)
',1))])])])])])])])])])):A("",!0),e("div",Ct,[e("button",{type:"button",onClick:a[2]||(a[2]=G=>g.$emit("back")),class:"flex-1 px-6 py-3 bg-gray-100 text-gray-700 rounded-xl font-semibold hover:bg-gray-200 transition-colors"}," 上一步 "),e("button",{type:"button",onClick:s,disabled:!I.value||$.value,class:"btn btn-primary flex-1 py-3 px-6 font-semibold"},[$.value?(r(),i("div",Ut)):A("",!0),b(" "+j($.value?"验证中...":"完成授权"),1)],8,At)])]))}},It={key:0,class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},jt={class:"modal-content w-full max-w-md p-6 mx-auto"},Vt={class:"flex items-start gap-4 mb-6"},St={class:"flex-1"},Gt={class:"text-lg font-bold text-gray-900 mb-2"},Rt={class:"text-gray-600 text-sm leading-relaxed whitespace-pre-line"},Mt={class:"flex gap-3"},ke={__name:"ConfirmModal",props:{show:{type:Boolean,required:!0},title:{type:String,default:""},message:{type:String,default:""},confirmText:{type:String,default:"继续"},cancelText:{type:String,default:"取消"}},emits:["confirm","cancel"],setup(R){return(L,o)=>(r(),te(be,{to:"body"},[R.show?(r(),i("div",It,[e("div",jt,[e("div",Vt,[o[2]||(o[2]=e("div",{class:"w-12 h-12 bg-gradient-to-br from-yellow-400 to-yellow-500 rounded-full flex items-center justify-center flex-shrink-0"},[e("i",{class:"fas fa-exclamation text-white text-xl"})],-1)),e("div",St,[e("h3",Gt,j(R.title),1),e("p",Rt,j(R.message),1)])]),e("div",Mt,[e("button",{onClick:o[0]||(o[0]=y=>L.$emit("cancel")),class:"flex-1 px-4 py-2.5 bg-gray-100 text-gray-700 rounded-xl font-medium hover:bg-gray-200 transition-colors"},j(R.cancelText),1),e("button",{onClick:o[1]||(o[1]=y=>L.$emit("confirm")),class:"flex-1 px-4 py-2.5 bg-gradient-to-r from-yellow-500 to-orange-500 text-white rounded-xl font-medium hover:from-yellow-600 hover:to-orange-600 transition-colors shadow-sm"},j(R.confirmText),1)])])])):A("",!0)]))}},Pt={key:0,class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},Ot={class:"modal-content w-full max-w-2xl p-8 mx-auto max-h-[90vh] overflow-y-auto custom-scrollbar"},Lt={class:"flex items-center justify-between mb-6"},zt={class:"flex items-center gap-3"},Dt={class:"text-xl font-bold text-gray-900"},Et={key:0,class:"flex items-center justify-center mb-8"},Kt={class:"flex items-center space-x-4"},Wt={class:"flex items-center"},qt={class:"flex items-center"},Bt={key:1},Nt={class:"space-y-6"},Ft={key:0},Ht={class:"flex gap-4"},Jt={class:"flex items-center cursor-pointer"},Yt={class:"flex items-center cursor-pointer"},Qt={key:1},Xt={class:"flex gap-4"},Zt={class:"flex items-center cursor-pointer"},es={class:"flex items-center cursor-pointer"},ts={key:0,class:"text-red-500 text-xs mt-1"},ss={class:"flex gap-4"},ls={class:"flex items-center cursor-pointer"},as={class:"flex items-center cursor-pointer"},os={key:2},ns={key:3,class:"space-y-4 bg-blue-50 p-4 rounded-lg border border-blue-200"},rs={class:"flex items-start gap-3 mb-4"},is={key:0,class:"text-sm text-blue-800 mb-2"},us={key:1,class:"text-sm text-blue-800 mb-2"},ds={class:"bg-white/80 rounded-lg p-3 mt-2 mb-2 border border-blue-300"},cs={key:0,class:"text-xs text-blue-800"},ms={key:1,class:"text-xs text-blue-800"},ps={key:0,class:"text-red-500 text-xs mt-1"},fs={class:"flex gap-3 pt-4"},xs=["disabled"],vs=["disabled"],ys={key:0,class:"loading-spinner mr-2"},gs={key:3,class:"space-y-6"},bs={class:"flex gap-4"},ws={class:"flex items-center cursor-pointer"},hs={class:"flex items-center cursor-pointer"},ks={key:0},$s={class:"bg-amber-50 p-4 rounded-lg border border-amber-200"},Ts={class:"space-y-4"},Cs={class:"flex gap-3 pt-4"},As=["disabled"],Us={key:0,class:"loading-spinner mr-2"},ye={__name:"AccountForm",props:{account:{type:Object,default:null}},emits:["close","success"],setup(R,{emit:L}){var f,d,T,W,se;const o=R,y=L,x=he(),{showConfirmModal:U,confirmOptions:$,showConfirm:h,handleConfirm:_,handleCancel:v}=we(),c=ee(()=>!!o.account),I=k(!0),P=k(1),V=k(!1),F=()=>{var p;return(p=o.account)!=null&&p.proxy&&o.account.proxy.host&&o.account.proxy.port?{enabled:!0,type:o.account.proxy.type||"socks5",host:o.account.proxy.host,port:o.account.proxy.port,username:o.account.proxy.username||"",password:o.account.proxy.password||""}:{enabled:!1,type:"socks5",host:"",port:"",username:"",password:""}},s=k({platform:((f=o.account)==null?void 0:f.platform)||"claude",addType:"oauth",name:((d=o.account)==null?void 0:d.name)||"",description:((T=o.account)==null?void 0:T.description)||"",accountType:((W=o.account)==null?void 0:W.accountType)||"shared",projectId:((se=o.account)==null?void 0:se.projectId)||"",accessToken:"",refreshToken:"",proxy:F()}),g=k({name:"",accessToken:""}),a=ee(()=>{var p;return((p=s.value.name)==null?void 0:p.trim())&&s.value.platform});ee(()=>{var p,t,m;return s.value.addType==="manual"?((p=s.value.name)==null?void 0:p.trim())&&((t=s.value.accessToken)==null?void 0:t.trim()):(m=s.value.name)==null?void 0:m.trim()});const G=async()=>{if(g.value.name="",!a.value){(!s.value.name||s.value.name.trim()==="")&&(g.value.name="请填写账户名称");return}s.value.platform==="gemini"&&P.value===1&&s.value.addType==="oauth"&&(!s.value.projectId||s.value.projectId.trim()==="")&&!await h("项目编号未填写",`您尚未填写项目编号。
+import{r as k,aR as $e,o as K,V as Te,x as i,y as r,z as e,L as A,K as C,al as fe,aY as Z,aX as ge,aq as z,aZ as Ce,C as D,O as b,c as ee,P as j,I as te,a5 as be,R as ae,an as Y,u as E,q as Ae,Y as Ue,Q as _e,ac as Ie,B as je}from"./vue-vendor-CKToUHZx.js";import{s as S}from"./toast-BvwA7Mwb.js";import{a as M,_ as Ve}from"./index-CJmHAjMf.js";import"./element-plus-B8Fs_0jW.js";import"./vendor-BDiMbLwQ.js";const le=k(!1),xe=k({title:"",message:"",confirmText:"继续",cancelText:"取消"}),Q=k(null);function we(){return{showConfirmModal:le,confirmOptions:xe,showConfirm:(y,x,U="继续",$="取消")=>new Promise(h=>{xe.value={title:y,message:x,confirmText:U,cancelText:$},Q.value=h,le.value=!0}),handleConfirm:()=>{le.value=!1,Q.value&&(Q.value(!0),Q.value=null)},handleCancel:()=>{le.value=!1,Q.value&&(Q.value(!1),Q.value=null)}}}const he=$e("accounts",()=>{const R=k([]),L=k([]),o=k(!1),y=k(null),x=k(""),U=k("asc"),$=async()=>{o.value=!0,y.value=null;try{const f=await M.get("/admin/claude-accounts");if(f.success)R.value=f.data||[];else throw new Error(f.message||"获取Claude账户失败")}catch(f){throw y.value=f.message,f}finally{o.value=!1}},h=async()=>{o.value=!0,y.value=null;try{const f=await M.get("/admin/gemini-accounts");if(f.success)L.value=f.data||[];else throw new Error(f.message||"获取Gemini账户失败")}catch(f){throw y.value=f.message,f}finally{o.value=!1}};return{claudeAccounts:R,geminiAccounts:L,loading:o,error:y,sortBy:x,sortOrder:U,fetchClaudeAccounts:$,fetchGeminiAccounts:h,fetchAllAccounts:async()=>{o.value=!0,y.value=null;try{await Promise.all([$(),h()])}catch(f){throw y.value=f.message,f}finally{o.value=!1}},createClaudeAccount:async f=>{o.value=!0,y.value=null;try{const d=await M.post("/admin/claude-accounts",f);if(d.success)return await $(),d.data;throw new Error(d.message||"创建Claude账户失败")}catch(d){throw y.value=d.message,d}finally{o.value=!1}},createGeminiAccount:async f=>{o.value=!0,y.value=null;try{const d=await M.post("/admin/gemini-accounts",f);if(d.success)return await h(),d.data;throw new Error(d.message||"创建Gemini账户失败")}catch(d){throw y.value=d.message,d}finally{o.value=!1}},updateClaudeAccount:async(f,d)=>{o.value=!0,y.value=null;try{const T=await M.put(`/admin/claude-accounts/${f}`,d);if(T.success)return await $(),T;throw new Error(T.message||"更新Claude账户失败")}catch(T){throw y.value=T.message,T}finally{o.value=!1}},updateGeminiAccount:async(f,d)=>{o.value=!0,y.value=null;try{const T=await M.put(`/admin/gemini-accounts/${f}`,d);if(T.success)return await h(),T;throw new Error(T.message||"更新Gemini账户失败")}catch(T){throw y.value=T.message,T}finally{o.value=!1}},toggleAccount:async(f,d)=>{o.value=!0,y.value=null;try{const T=f==="claude"?`/admin/claude-accounts/${d}/toggle`:`/admin/gemini-accounts/${d}/toggle`,W=await M.put(T);if(W.success)return f==="claude"?await $():await h(),W;throw new Error(W.message||"切换状态失败")}catch(T){throw y.value=T.message,T}finally{o.value=!1}},deleteAccount:async(f,d)=>{o.value=!0,y.value=null;try{const T=f==="claude"?`/admin/claude-accounts/${d}`:`/admin/gemini-accounts/${d}`,W=await M.delete(T);if(W.success)return f==="claude"?await $():await h(),W;throw new Error(W.message||"删除失败")}catch(T){throw y.value=T.message,T}finally{o.value=!1}},refreshClaudeToken:async f=>{o.value=!0,y.value=null;try{const d=await M.post(`/admin/claude-accounts/${f}/refresh`);if(d.success)return await $(),d;throw new Error(d.message||"Token刷新失败")}catch(d){throw y.value=d.message,d}finally{o.value=!1}},generateClaudeAuthUrl:async f=>{try{const d=await M.post("/admin/claude-accounts/generate-auth-url",f);if(d.success)return d.data;throw new Error(d.message||"生成授权URL失败")}catch(d){throw y.value=d.message,d}},exchangeClaudeCode:async f=>{try{const d=await M.post("/admin/claude-accounts/exchange-code",f);if(d.success)return d.data;throw new Error(d.message||"交换授权码失败")}catch(d){throw y.value=d.message,d}},generateGeminiAuthUrl:async f=>{try{const d=await M.post("/admin/gemini-accounts/generate-auth-url",f);if(d.success)return d.data;throw new Error(d.message||"生成授权URL失败")}catch(d){throw y.value=d.message,d}},exchangeGeminiCode:async f=>{try{const d=await M.post("/admin/gemini-accounts/exchange-code",f);if(d.success)return d.data;throw new Error(d.message||"交换授权码失败")}catch(d){throw y.value=d.message,d}},sortAccounts:f=>{x.value===f?U.value=U.value==="asc"?"desc":"asc":(x.value=f,U.value="asc")},reset:()=>{R.value=[],L.value=[],o.value=!1,y.value=null,x.value="",U.value="asc"}}}),Se={class:"space-y-4"},Ge={class:"flex items-center justify-between"},Re={class:"flex items-center cursor-pointer"},Me={key:0,class:"bg-gray-50 p-4 rounded-lg border border-gray-200 space-y-4"},Pe={class:"grid grid-cols-2 gap-4"},Oe={class:"space-y-4"},Le={class:"flex items-center"},ze={key:0,class:"grid grid-cols-2 gap-4"},De={class:"relative"},Ee=["type"],ve={__name:"ProxyConfig",props:{modelValue:{type:Object,default:()=>({enabled:!1,type:"socks5",host:"",port:"",username:"",password:""})}},emits:["update:modelValue"],setup(R,{emit:L}){const o=R,y=L,x=k({...o.modelValue}),U=k(!!(x.value.username||x.value.password)),$=k(!1);K(()=>o.modelValue,v=>{JSON.stringify(v)!==JSON.stringify(x.value)&&(x.value={...v},U.value=!!(v.username||v.password))},{deep:!0}),K(()=>x.value.enabled,v=>{_()}),K(()=>x.value.type,v=>{_()}),K(()=>x.value.host,v=>{_()}),K(()=>x.value.port,v=>{_()}),K(()=>x.value.username,v=>{_()}),K(()=>x.value.password,v=>{_()}),K(U,v=>{v||(x.value.username="",x.value.password="",_())});let h=null;function _(){h&&clearTimeout(h),h=setTimeout(()=>{const v={...x.value};U.value||(v.username="",v.password=""),y("update:modelValue",v)},100)}return Te(()=>{h&&clearTimeout(h)}),(v,c)=>(r(),i("div",Se,[e("div",Ge,[c[9]||(c[9]=e("h4",{class:"text-sm font-semibold text-gray-700"},"代理设置 (可选)",-1)),e("label",Re,[C(e("input",{type:"checkbox","onUpdate:modelValue":c[0]||(c[0]=I=>x.value.enabled=I),class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"},null,512),[[fe,x.value.enabled]]),c[8]||(c[8]=e("span",{class:"ml-2 text-sm text-gray-700"},"启用代理",-1))])]),x.value.enabled?(r(),i("div",Me,[c[17]||(c[17]=Z('
配置代理以访问受限的网络资源。支持 SOCKS5 和 HTTP 代理。
请确保代理服务器稳定可用,否则会影响账户的正常使用。
',1)),e("div",null,[c[11]||(c[11]=e("label",{class:"block text-sm font-medium text-gray-700 mb-2"},"代理类型",-1)),C(e("select",{"onUpdate:modelValue":c[1]||(c[1]=I=>x.value.type=I),class:"form-input w-full"},c[10]||(c[10]=[e("option",{value:"socks5"},"SOCKS5",-1),e("option",{value:"http"},"HTTP",-1),e("option",{value:"https"},"HTTPS",-1)]),512),[[ge,x.value.type]])]),e("div",Pe,[e("div",null,[c[12]||(c[12]=e("label",{class:"block text-sm font-medium text-gray-700 mb-2"},"主机地址",-1)),C(e("input",{"onUpdate:modelValue":c[2]||(c[2]=I=>x.value.host=I),type:"text",placeholder:"例如: 192.168.1.100",class:"form-input w-full"},null,512),[[z,x.value.host]])]),e("div",null,[c[13]||(c[13]=e("label",{class:"block text-sm font-medium text-gray-700 mb-2"},"端口",-1)),C(e("input",{"onUpdate:modelValue":c[3]||(c[3]=I=>x.value.port=I),type:"number",placeholder:"例如: 1080",class:"form-input w-full"},null,512),[[z,x.value.port]])])]),e("div",Oe,[e("div",Le,[C(e("input",{type:"checkbox","onUpdate:modelValue":c[4]||(c[4]=I=>U.value=I),id:"proxyAuth",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"},null,512),[[fe,U.value]]),c[14]||(c[14]=e("label",{for:"proxyAuth",class:"ml-2 text-sm text-gray-700 cursor-pointer"}," 需要身份验证 ",-1))]),U.value?(r(),i("div",ze,[e("div",null,[c[15]||(c[15]=e("label",{class:"block text-sm font-medium text-gray-700 mb-2"},"用户名",-1)),C(e("input",{"onUpdate:modelValue":c[5]||(c[5]=I=>x.value.username=I),type:"text",placeholder:"代理用户名",class:"form-input w-full"},null,512),[[z,x.value.username]])]),e("div",null,[c[16]||(c[16]=e("label",{class:"block text-sm font-medium text-gray-700 mb-2"},"密码",-1)),e("div",De,[C(e("input",{"onUpdate:modelValue":c[6]||(c[6]=I=>x.value.password=I),type:$.value?"text":"password",placeholder:"代理密码",class:"form-input w-full pr-10"},null,8,Ee),[[Ce,x.value.password]]),e("button",{type:"button",onClick:c[7]||(c[7]=I=>$.value=!$.value),class:"absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400 hover:text-gray-600"},[e("i",{class:D($.value?"fas fa-eye-slash":"fas fa-eye")},null,2)])])])])):A("",!0)]),c[18]||(c[18]=e("div",{class:"bg-blue-50 p-3 rounded-lg border border-blue-200"},[e("p",{class:"text-xs text-blue-700"},[e("i",{class:"fas fa-info-circle mr-1"}),e("strong",null,"提示:"),b("代理设置将用于所有与此账户相关的API请求。请确保代理服务器支持HTTPS流量转发。 ")])],-1))])):A("",!0)]))}},Ke={class:"space-y-6"},We={key:0},qe={class:"bg-blue-50 p-6 rounded-lg border border-blue-200"},Be={class:"flex items-start gap-4"},Ne={class:"flex-1"},Fe={class:"space-y-4"},He={class:"bg-white/80 rounded-lg p-4 border border-blue-300"},Je={class:"flex items-start gap-3"},Ye={class:"flex-1"},Qe=["disabled"],Xe={key:0,class:"fas fa-link mr-2"},Ze={key:1,class:"loading-spinner mr-2"},et={key:1,class:"space-y-3"},tt={class:"flex items-center gap-2"},st=["value"],lt={class:"bg-white/80 rounded-lg p-4 border border-blue-300"},at={class:"flex items-start gap-3"},ot={class:"flex-1"},nt={class:"space-y-3"},rt={key:1},it={class:"bg-green-50 p-6 rounded-lg border border-green-200"},ut={class:"flex items-start gap-4"},dt={class:"flex-1"},ct={class:"space-y-4"},mt={class:"bg-white/80 rounded-lg p-4 border border-green-300"},pt={class:"flex items-start gap-3"},ft={class:"flex-1"},xt=["disabled"],vt={key:0,class:"fas fa-link mr-2"},yt={key:1,class:"loading-spinner mr-2"},gt={key:1,class:"space-y-3"},bt={class:"flex items-center gap-2"},wt=["value"],ht={class:"bg-white/80 rounded-lg p-4 border border-green-300"},kt={class:"flex items-start gap-3"},$t={class:"flex-1"},Tt={class:"space-y-3"},Ct={class:"flex gap-3 pt-4"},At=["disabled"],Ut={key:0,class:"loading-spinner mr-2"},_t={__name:"OAuthFlow",props:{platform:{type:String,required:!0},proxy:{type:Object,default:null}},emits:["success","back"],setup(R,{emit:L}){const o=R,y=L,x=he(),U=k(!1),$=k(!1),h=k(""),_=k(""),v=k(!1),c=k(""),I=ee(()=>h.value&&_.value.trim());K(_,g=>{if(!g||typeof g!="string")return;const a=g.trim();if(!a)return;if(a.startsWith("http://")||a.startsWith("https://"))if(a.startsWith("http://localhost:45462"))try{const q=new URL(a).searchParams.get("code");q?(_.value=q,S("成功提取授权码!","success"),console.log("Successfully extracted authorization code from URL")):S("URL 中未找到授权码参数,请检查链接是否正确","error")}catch(N){console.error("Failed to parse URL:",N),S("链接格式错误,请检查是否为完整的 URL","error")}else if(o.platform==="gemini")try{const q=new URL(a).searchParams.get("code");q&&(_.value=q,S("成功提取授权码!","success"))}catch{}else S("请粘贴以 http://localhost:45462 开头的链接","error")});const P=async()=>{var g;U.value=!0;try{const a=(g=o.proxy)!=null&&g.enabled?{proxy:{type:o.proxy.type,host:o.proxy.host,port:parseInt(o.proxy.port),username:o.proxy.username||null,password:o.proxy.password||null}}:{};if(o.platform==="claude"){const G=await x.generateClaudeAuthUrl(a);h.value=G.authUrl,c.value=G.sessionId}else if(o.platform==="gemini"){const G=await x.generateGeminiAuthUrl(a);h.value=G.authUrl,c.value=G.sessionId}}catch(a){S(a.message||"生成授权链接失败","error")}finally{U.value=!1}},V=()=>{h.value="",_.value="",P()},F=async()=>{try{await navigator.clipboard.writeText(h.value),v.value=!0,S("链接已复制","success"),setTimeout(()=>{v.value=!1},2e3)}catch{const a=document.createElement("input");a.value=h.value,document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),v.value=!0,S("链接已复制","success"),setTimeout(()=>{v.value=!1},2e3)}},s=async()=>{var g;if(I.value){$.value=!0;try{let a={};o.platform==="claude"?a={sessionId:c.value,callbackUrl:_.value.trim()}:o.platform==="gemini"&&(a={code:_.value.trim(),sessionId:c.value}),(g=o.proxy)!=null&&g.enabled&&(a.proxy={type:o.proxy.type,host:o.proxy.host,port:parseInt(o.proxy.port),username:o.proxy.username||null,password:o.proxy.password||null});let G;o.platform==="claude"?G=await x.exchangeClaudeCode(a):o.platform==="gemini"&&(G=await x.exchangeGeminiCode(a)),y("success",G)}catch(a){S(a.message||"授权失败,请检查授权码是否正确","error")}finally{$.value=!1}}};return(g,a)=>(r(),i("div",Ke,[R.platform==="claude"?(r(),i("div",We,[e("div",qe,[e("div",Be,[a[14]||(a[14]=e("div",{class:"w-10 h-10 bg-blue-500 rounded-lg flex items-center justify-center flex-shrink-0"},[e("i",{class:"fas fa-link text-white"})],-1)),e("div",Ne,[a[12]||(a[12]=e("h4",{class:"font-semibold text-blue-900 mb-3"},"Claude 账户授权",-1)),a[13]||(a[13]=e("p",{class:"text-sm text-blue-800 mb-4"}," 请按照以下步骤完成 Claude 账户的授权: ",-1)),e("div",Fe,[e("div",He,[e("div",Je,[a[5]||(a[5]=e("div",{class:"w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0"},"1",-1)),e("div",Ye,[a[4]||(a[4]=e("p",{class:"font-medium text-blue-900 mb-2"},"点击下方按钮生成授权链接",-1)),h.value?(r(),i("div",et,[e("div",tt,[e("input",{type:"text",value:h.value,readonly:"",class:"form-input flex-1 text-xs font-mono bg-gray-50"},null,8,st),e("button",{onClick:F,class:"px-3 py-2 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",title:"复制链接"},[e("i",{class:D(v.value?"fas fa-check text-green-500":"fas fa-copy")},null,2)])]),e("button",{onClick:V,class:"text-xs text-blue-600 hover:text-blue-700"},a[3]||(a[3]=[e("i",{class:"fas fa-sync-alt mr-1"},null,-1),b("重新生成 ",-1)]))])):(r(),i("button",{key:0,onClick:P,disabled:U.value,class:"btn btn-primary px-4 py-2 text-sm"},[U.value?(r(),i("div",Ze)):(r(),i("i",Xe)),b(" "+j(U.value?"生成中...":"生成授权链接"),1)],8,Qe))])])]),a[11]||(a[11]=Z('2
在浏览器中打开链接并完成授权
请在新标签页中打开授权链接,登录您的 Claude 账户并授权。
注意: 如果您设置了代理,请确保浏览器也使用相同的代理访问授权页面。
',1)),e("div",lt,[e("div",at,[a[10]||(a[10]=e("div",{class:"w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0"},"3",-1)),e("div",ot,[a[8]||(a[8]=e("p",{class:"font-medium text-blue-900 mb-2"},"输入 Authorization Code",-1)),a[9]||(a[9]=e("p",{class:"text-sm text-blue-700 mb-3"},[b(" 授权完成后,页面会显示一个 "),e("strong",null,"Authorization Code"),b(",请将其复制并粘贴到下方输入框: ")],-1)),e("div",nt,[e("div",null,[a[6]||(a[6]=e("label",{class:"block text-sm font-semibold text-gray-700 mb-2"},[e("i",{class:"fas fa-key text-blue-500 mr-2"}),b("Authorization Code ")],-1)),C(e("textarea",{"onUpdate:modelValue":a[0]||(a[0]=G=>_.value=G),rows:"3",class:"form-input w-full resize-none font-mono text-sm",placeholder:"粘贴从Claude页面获取的Authorization Code..."},null,512),[[z,_.value]])]),a[7]||(a[7]=e("p",{class:"text-xs text-gray-500 mt-2"},[e("i",{class:"fas fa-info-circle mr-1"}),b(" 请粘贴从Claude页面复制的Authorization Code ")],-1))])])])])])])])])])):R.platform==="gemini"?(r(),i("div",rt,[e("div",it,[e("div",ut,[a[26]||(a[26]=e("div",{class:"w-10 h-10 bg-green-500 rounded-lg flex items-center justify-center flex-shrink-0"},[e("i",{class:"fas fa-robot text-white"})],-1)),e("div",dt,[a[24]||(a[24]=e("h4",{class:"font-semibold text-green-900 mb-3"},"Gemini 账户授权",-1)),a[25]||(a[25]=e("p",{class:"text-sm text-green-800 mb-4"}," 请按照以下步骤完成 Gemini 账户的授权: ",-1)),e("div",ct,[e("div",mt,[e("div",pt,[a[17]||(a[17]=e("div",{class:"w-6 h-6 bg-green-600 text-white rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0"},"1",-1)),e("div",ft,[a[16]||(a[16]=e("p",{class:"font-medium text-green-900 mb-2"},"点击下方按钮生成授权链接",-1)),h.value?(r(),i("div",gt,[e("div",bt,[e("input",{type:"text",value:h.value,readonly:"",class:"form-input flex-1 text-xs font-mono bg-gray-50"},null,8,wt),e("button",{onClick:F,class:"px-3 py-2 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors",title:"复制链接"},[e("i",{class:D(v.value?"fas fa-check text-green-500":"fas fa-copy")},null,2)])]),e("button",{onClick:V,class:"text-xs text-green-600 hover:text-green-700"},a[15]||(a[15]=[e("i",{class:"fas fa-sync-alt mr-1"},null,-1),b("重新生成 ",-1)]))])):(r(),i("button",{key:0,onClick:P,disabled:U.value,class:"btn btn-primary px-4 py-2 text-sm"},[U.value?(r(),i("div",yt)):(r(),i("i",vt)),b(" "+j(U.value?"生成中...":"生成授权链接"),1)],8,xt))])])]),a[23]||(a[23]=Z('2
在浏览器中打开链接并完成授权
点击上方的授权链接,在新页面中完成Google账号登录 点击“登录”按钮后可能会加载很慢(这是正常的) 如果超过1分钟还在加载,请按 F5 刷新页面 授权完成后会跳转到 http://localhost:45462 (可能显示无法访问) 提示: 如果页面一直无法跳转,可以打开浏览器开发者工具(F12),F5刷新一下授权页再点击页面的登录按钮,在“网络”标签中找到以 localhost:45462 开头的请求,复制其完整URL。
',1)),e("div",ht,[e("div",kt,[a[22]||(a[22]=e("div",{class:"w-6 h-6 bg-green-600 text-white rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0"},"3",-1)),e("div",$t,[a[20]||(a[20]=e("p",{class:"font-medium text-green-900 mb-2"},"复制oauth后的链接",-1)),a[21]||(a[21]=e("p",{class:"text-sm text-green-700 mb-3"}," 复制浏览器地址栏的完整链接并粘贴到下方输入框: ",-1)),e("div",Tt,[e("div",null,[a[18]||(a[18]=e("label",{class:"block text-sm font-semibold text-gray-700 mb-2"},[e("i",{class:"fas fa-key text-green-500 mr-2"}),b("复制oauth后的链接 ")],-1)),C(e("textarea",{"onUpdate:modelValue":a[1]||(a[1]=G=>_.value=G),rows:"3",class:"form-input w-full resize-none font-mono text-sm",placeholder:"粘贴以 http://localhost:45462 开头的完整链接..."},null,512),[[z,_.value]])]),a[19]||(a[19]=Z(' 支持粘贴完整链接,系统会自动提取授权码
也可以直接粘贴授权码(code参数的值)
',1))])])])])])])])])])):A("",!0),e("div",Ct,[e("button",{type:"button",onClick:a[2]||(a[2]=G=>g.$emit("back")),class:"flex-1 px-6 py-3 bg-gray-100 text-gray-700 rounded-xl font-semibold hover:bg-gray-200 transition-colors"}," 上一步 "),e("button",{type:"button",onClick:s,disabled:!I.value||$.value,class:"btn btn-primary flex-1 py-3 px-6 font-semibold"},[$.value?(r(),i("div",Ut)):A("",!0),b(" "+j($.value?"验证中...":"完成授权"),1)],8,At)])]))}},It={key:0,class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},jt={class:"modal-content w-full max-w-md p-6 mx-auto"},Vt={class:"flex items-start gap-4 mb-6"},St={class:"flex-1"},Gt={class:"text-lg font-bold text-gray-900 mb-2"},Rt={class:"text-gray-600 text-sm leading-relaxed whitespace-pre-line"},Mt={class:"flex gap-3"},ke={__name:"ConfirmModal",props:{show:{type:Boolean,required:!0},title:{type:String,default:""},message:{type:String,default:""},confirmText:{type:String,default:"继续"},cancelText:{type:String,default:"取消"}},emits:["confirm","cancel"],setup(R){return(L,o)=>(r(),te(be,{to:"body"},[R.show?(r(),i("div",It,[e("div",jt,[e("div",Vt,[o[2]||(o[2]=e("div",{class:"w-12 h-12 bg-gradient-to-br from-yellow-400 to-yellow-500 rounded-full flex items-center justify-center flex-shrink-0"},[e("i",{class:"fas fa-exclamation text-white text-xl"})],-1)),e("div",St,[e("h3",Gt,j(R.title),1),e("p",Rt,j(R.message),1)])]),e("div",Mt,[e("button",{onClick:o[0]||(o[0]=y=>L.$emit("cancel")),class:"flex-1 px-4 py-2.5 bg-gray-100 text-gray-700 rounded-xl font-medium hover:bg-gray-200 transition-colors"},j(R.cancelText),1),e("button",{onClick:o[1]||(o[1]=y=>L.$emit("confirm")),class:"flex-1 px-4 py-2.5 bg-gradient-to-r from-yellow-500 to-orange-500 text-white rounded-xl font-medium hover:from-yellow-600 hover:to-orange-600 transition-colors shadow-sm"},j(R.confirmText),1)])])])):A("",!0)]))}},Pt={key:0,class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},Ot={class:"modal-content w-full max-w-2xl p-8 mx-auto max-h-[90vh] overflow-y-auto custom-scrollbar"},Lt={class:"flex items-center justify-between mb-6"},zt={class:"flex items-center gap-3"},Dt={class:"text-xl font-bold text-gray-900"},Et={key:0,class:"flex items-center justify-center mb-8"},Kt={class:"flex items-center space-x-4"},Wt={class:"flex items-center"},qt={class:"flex items-center"},Bt={key:1},Nt={class:"space-y-6"},Ft={key:0},Ht={class:"flex gap-4"},Jt={class:"flex items-center cursor-pointer"},Yt={class:"flex items-center cursor-pointer"},Qt={key:1},Xt={class:"flex gap-4"},Zt={class:"flex items-center cursor-pointer"},es={class:"flex items-center cursor-pointer"},ts={key:0,class:"text-red-500 text-xs mt-1"},ss={class:"flex gap-4"},ls={class:"flex items-center cursor-pointer"},as={class:"flex items-center cursor-pointer"},os={key:2},ns={key:3,class:"space-y-4 bg-blue-50 p-4 rounded-lg border border-blue-200"},rs={class:"flex items-start gap-3 mb-4"},is={key:0,class:"text-sm text-blue-800 mb-2"},us={key:1,class:"text-sm text-blue-800 mb-2"},ds={class:"bg-white/80 rounded-lg p-3 mt-2 mb-2 border border-blue-300"},cs={key:0,class:"text-xs text-blue-800"},ms={key:1,class:"text-xs text-blue-800"},ps={key:0,class:"text-red-500 text-xs mt-1"},fs={class:"flex gap-3 pt-4"},xs=["disabled"],vs=["disabled"],ys={key:0,class:"loading-spinner mr-2"},gs={key:3,class:"space-y-6"},bs={class:"flex gap-4"},ws={class:"flex items-center cursor-pointer"},hs={class:"flex items-center cursor-pointer"},ks={key:0},$s={class:"bg-amber-50 p-4 rounded-lg border border-amber-200"},Ts={class:"space-y-4"},Cs={class:"flex gap-3 pt-4"},As=["disabled"],Us={key:0,class:"loading-spinner mr-2"},ye={__name:"AccountForm",props:{account:{type:Object,default:null}},emits:["close","success"],setup(R,{emit:L}){var f,d,T,W,se;const o=R,y=L,x=he(),{showConfirmModal:U,confirmOptions:$,showConfirm:h,handleConfirm:_,handleCancel:v}=we(),c=ee(()=>!!o.account),I=k(!0),P=k(1),V=k(!1),F=()=>{var p;return(p=o.account)!=null&&p.proxy&&o.account.proxy.host&&o.account.proxy.port?{enabled:!0,type:o.account.proxy.type||"socks5",host:o.account.proxy.host,port:o.account.proxy.port,username:o.account.proxy.username||"",password:o.account.proxy.password||""}:{enabled:!1,type:"socks5",host:"",port:"",username:"",password:""}},s=k({platform:((f=o.account)==null?void 0:f.platform)||"claude",addType:"oauth",name:((d=o.account)==null?void 0:d.name)||"",description:((T=o.account)==null?void 0:T.description)||"",accountType:((W=o.account)==null?void 0:W.accountType)||"shared",projectId:((se=o.account)==null?void 0:se.projectId)||"",accessToken:"",refreshToken:"",proxy:F()}),g=k({name:"",accessToken:""}),a=ee(()=>{var p;return((p=s.value.name)==null?void 0:p.trim())&&s.value.platform});ee(()=>{var p,t,m;return s.value.addType==="manual"?((p=s.value.name)==null?void 0:p.trim())&&((t=s.value.accessToken)==null?void 0:t.trim()):(m=s.value.name)==null?void 0:m.trim()});const G=async()=>{if(g.value.name="",!a.value){(!s.value.name||s.value.name.trim()==="")&&(g.value.name="请填写账户名称");return}s.value.platform==="gemini"&&P.value===1&&s.value.addType==="oauth"&&(!s.value.projectId||s.value.projectId.trim()==="")&&!await h("项目编号未填写",`您尚未填写项目编号。
如果您的Google账号绑定了Google Cloud或被识别为Workspace账号,需要提供项目编号。
如果您使用的是普通个人账号,可以继续不填写。`,"继续","返回填写")||(P.value=2)},N=async p=>{V.value=!0;try{const t={name:s.value.name,description:s.value.description,accountType:s.value.accountType,proxy:s.value.proxy.enabled?{type:s.value.proxy.type,host:s.value.proxy.host,port:parseInt(s.value.proxy.port),username:s.value.proxy.username||null,password:s.value.proxy.password||null}:null};s.value.platform==="claude"?t.claudeAiOauth=p.claudeAiOauth||p:s.value.platform==="gemini"&&(t.geminiOauth=p.tokens||p,s.value.projectId&&(t.projectId=s.value.projectId));let m;s.value.platform==="claude"?m=await x.createClaudeAccount(t):m=await x.createGeminiAccount(t),y("success",m)}catch(t){S(t.message||"账户创建失败","error")}finally{V.value=!1}},q=async()=>{g.value.name="",g.value.accessToken="";let p=!1;if((!s.value.name||s.value.name.trim()==="")&&(g.value.name="请填写账户名称",p=!0),s.value.addType==="manual"&&(!s.value.accessToken||s.value.accessToken.trim()==="")&&(g.value.accessToken="请填写 Access Token",p=!0),!p){V.value=!0;try{const t={name:s.value.name,description:s.value.description,accountType:s.value.accountType,proxy:s.value.proxy.enabled?{type:s.value.proxy.type,host:s.value.proxy.host,port:parseInt(s.value.proxy.port),username:s.value.proxy.username||null,password:s.value.proxy.password||null}:null};if(s.value.platform==="claude"){const u=s.value.refreshToken?6e5:31536e6;t.claudeAiOauth={accessToken:s.value.accessToken,refreshToken:s.value.refreshToken||"",expiresAt:Date.now()+u,scopes:["user:inference"]}}else if(s.value.platform==="gemini"){const u=s.value.refreshToken?6e5:31536e6;t.geminiOauth={access_token:s.value.accessToken,refresh_token:s.value.refreshToken||"",scope:"https://www.googleapis.com/auth/cloud-platform",token_type:"Bearer",expiry_date:Date.now()+u},s.value.projectId&&(t.projectId=s.value.projectId)}let m;s.value.platform==="claude"?m=await x.createClaudeAccount(t):m=await x.createGeminiAccount(t),y("success",m)}catch(t){S(t.message||"账户创建失败","error")}finally{V.value=!1}}},X=async()=>{if(g.value.name="",!s.value.name||s.value.name.trim()===""){g.value.name="请填写账户名称";return}if(!(s.value.platform==="gemini"&&(!s.value.projectId||s.value.projectId.trim()==="")&&!await h("项目编号未填写",`您尚未填写项目编号。
diff --git a/web/admin-spa/dist/assets/ApiKeysView-6cuFce66.js b/web/admin-spa/dist/assets/ApiKeysView-6cuFce66.js
deleted file mode 100644
index 8dec931e..00000000
--- a/web/admin-spa/dist/assets/ApiKeysView-6cuFce66.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import{E as Rt}from"./element-plus-D-FTEVKS.js";import{aR as St,r as K,_ as at,q as rt,c as st,I as W,y as a,z as t,Y,K as b,aq as S,x as d,L as A,Q as T,ac as P,O as f,P as p,aa as et,aX as z,an as B,al as G,a5 as lt,C as _,R as ht,B as Tt}from"./vue-vendor-YmkKLAOK.js";import{s as I}from"./toast-BvwA7Mwb.js";import{a as q,_ as J,u as dt}from"./index-BfaL5u2_.js";import"./vendor-BDiMbLwQ.js";const ut=St("clients",{state:()=>({supportedClients:[],loading:!1,error:null}),actions:{async loadSupportedClients(){if(this.supportedClients.length>0)return this.supportedClients;this.loading=!0,this.error=null;try{const L=await q.get("/admin/supported-clients");return L.success?this.supportedClients=L.data||[]:(this.error=L.message||"加载支持的客户端失败",console.error("Failed to load supported clients:",this.error)),this.supportedClients}catch(L){return this.error=L.message||"加载支持的客户端失败",console.error("Error loading supported clients:",L),[]}finally{this.loading=!1}}}}),Et={class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},Pt={class:"modal-content w-full max-w-md p-8 mx-auto max-h-[90vh] flex flex-col"},Vt={class:"flex items-center justify-between mb-6"},jt={class:"space-y-3"},_t={key:0,class:"flex flex-wrap gap-2"},Ut=["onClick"],qt={class:"flex gap-2"},Ot=["onKeypress"],Ft={class:"bg-blue-50 border border-blue-200 rounded-lg p-4 space-y-4"},Wt={class:"space-y-3"},zt={class:"flex gap-2"},Yt={key:0,class:"mt-3"},Nt=["min"],Ht={key:1,class:"text-xs text-gray-500 mt-2"},Bt={class:"flex gap-4"},Gt={class:"flex items-center cursor-pointer"},Xt={class:"flex items-center cursor-pointer"},Qt={class:"flex items-center cursor-pointer"},Jt={class:"grid grid-cols-1 gap-3"},Zt=["disabled"],te=["value"],ee=["disabled"],se=["value"],le={class:"flex items-center mb-3"},oe={key:0,class:"space-y-3"},ne={class:"flex flex-wrap gap-2 mb-3 min-h-[32px] p-2 bg-gray-50 rounded-lg border border-gray-200"},ie=["onClick"],ae={key:0,class:"text-gray-400 text-sm"},re={class:"flex gap-2"},de=["onKeydown"],ue={class:"flex items-center mb-3"},pe={key:0,class:"space-y-3"},me={class:"space-y-2"},ce=["id","value"],xe=["for"],ge={class:"text-sm font-medium text-gray-700"},fe={class:"text-xs text-gray-500 block"},ye={class:"flex gap-3 pt-4"},be=["disabled"],ve={key:0,class:"loading-spinner mr-2"},we={key:1,class:"fas fa-plus mr-2"},$e={__name:"CreateApiKeyModal",props:{accounts:{type:Object,default:()=>({claude:[],gemini:[]})}},emits:["close","success"],setup(L,{emit:O}){const C=O;dt();const h=ut(),D=K(!1),x=K(""),M=K([]),i=at({name:"",description:"",tokenLimit:"",rateLimitWindow:"",rateLimitRequests:"",concurrencyLimit:"",dailyCostLimit:"",expireDuration:"",customExpireDate:"",expiresAt:null,permissions:"all",claudeAccountId:"",geminiAccountId:"",enableModelRestriction:!1,restrictedModels:[],modelInput:"",enableClientRestriction:!1,allowedClients:[],tags:[]});rt(async()=>{M.value=await h.loadSupportedClients()});const n=st(()=>{const y=new Date;return y.setMinutes(y.getMinutes()+1),y.toISOString().slice(0,16)}),v=()=>{if(!i.expireDuration){i.expiresAt=null;return}if(i.expireDuration==="custom")return;const y=new Date,u=i.expireDuration.match(/(\d+)([dhmy])/);if(u){const[,j,X]=u,N=parseInt(j);switch(X){case"d":y.setDate(y.getDate()+N);break;case"h":y.setHours(y.getHours()+N);break;case"m":y.setMonth(y.getMonth()+N);break;case"y":y.setFullYear(y.getFullYear()+N);break}i.expiresAt=y.toISOString()}},U=()=>{i.customExpireDate&&(i.expiresAt=new Date(i.customExpireDate).toISOString())},$=y=>new Date(y).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),w=()=>{i.modelInput&&!i.restrictedModels.includes(i.modelInput)&&(i.restrictedModels.push(i.modelInput),i.modelInput="")},E=y=>{i.restrictedModels.splice(y,1)},k=()=>{if(x.value&&x.value.trim()){const y=x.value.trim();i.tags.includes(y)||i.tags.push(y),x.value=""}},o=y=>{i.tags.splice(y,1)},m=async()=>{D.value=!0;try{const y={name:i.name,description:i.description||void 0,tokenLimit:i.tokenLimit!==""&&i.tokenLimit!==null?parseInt(i.tokenLimit):null,rateLimitWindow:i.rateLimitWindow!==""&&i.rateLimitWindow!==null?parseInt(i.rateLimitWindow):null,rateLimitRequests:i.rateLimitRequests!==""&&i.rateLimitRequests!==null?parseInt(i.rateLimitRequests):null,concurrencyLimit:i.concurrencyLimit!==""&&i.concurrencyLimit!==null?parseInt(i.concurrencyLimit):0,dailyCostLimit:i.dailyCostLimit!==""&&i.dailyCostLimit!==null?parseFloat(i.dailyCostLimit):0,expiresAt:i.expiresAt||void 0,permissions:i.permissions,claudeAccountId:i.claudeAccountId||void 0,geminiAccountId:i.geminiAccountId||void 0,tags:i.tags.length>0?i.tags:void 0};y.enableModelRestriction=i.enableModelRestriction,i.enableModelRestriction&&i.restrictedModels.length>0&&(y.restrictedModels=i.restrictedModels),y.enableClientRestriction=i.enableClientRestriction,i.enableClientRestriction&&i.allowedClients.length>0&&(y.allowedClients=i.allowedClients);const l=await q.post("/admin/api-keys",y);l.success?(I("API Key 创建成功","success"),C("success",l.data),C("close")):I(l.message||"创建失败","error")}catch{I("创建失败","error")}finally{D.value=!1}};return(y,l)=>(a(),W(lt,{to:"body"},[t("div",Et,[t("div",Pt,[t("div",Vt,[l[26]||(l[26]=t("div",{class:"flex items-center gap-3"},[t("div",{class:"w-10 h-10 bg-gradient-to-br from-blue-500 to-blue-600 rounded-xl flex items-center justify-center"},[t("i",{class:"fas fa-key text-white"})]),t("h3",{class:"text-xl font-bold text-gray-900"},"创建新的 API Key")],-1)),t("button",{onClick:l[0]||(l[0]=u=>y.$emit("close")),class:"text-gray-400 hover:text-gray-600 transition-colors"},l[25]||(l[25]=[t("i",{class:"fas fa-times text-xl"},null,-1)]))]),t("form",{onSubmit:Y(m,["prevent"]),class:"space-y-6 modal-scroll-content custom-scrollbar flex-1"},[t("div",null,[l[27]||(l[27]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"名称",-1)),b(t("input",{"onUpdate:modelValue":l[1]||(l[1]=u=>i.name=u),type:"text",required:"",class:"form-input w-full",placeholder:"为您的 API Key 取一个名称"},null,512),[[S,i.name]])]),t("div",null,[l[31]||(l[31]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"标签",-1)),t("div",jt,[i.tags.length>0?(a(),d("div",_t,[(a(!0),d(T,null,P(i.tags,(u,j)=>(a(),d("span",{key:j,class:"inline-flex items-center gap-1 px-3 py-1 bg-blue-100 text-blue-800 text-sm rounded-full"},[f(p(u)+" ",1),t("button",{type:"button",onClick:X=>o(j),class:"ml-1 hover:text-blue-900"},l[28]||(l[28]=[t("i",{class:"fas fa-times text-xs"},null,-1)]),8,Ut)]))),128))])):A("",!0),t("div",qt,[b(t("input",{"onUpdate:modelValue":l[2]||(l[2]=u=>x.value=u),type:"text",class:"form-input flex-1",placeholder:"输入新标签名称",onKeypress:et(Y(k,["prevent"]),["enter"])},null,40,Ot),[[S,x.value]]),t("button",{type:"button",onClick:k,class:"px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors"},l[29]||(l[29]=[t("i",{class:"fas fa-plus"},null,-1)]))]),l[30]||(l[30]=t("p",{class:"text-xs text-gray-500"},"用于标记不同团队或用途,方便筛选管理",-1))])]),t("div",Ft,[l[38]||(l[38]=t("div",{class:"flex items-start gap-3 mb-3"},[t("div",{class:"w-8 h-8 bg-blue-500 rounded-lg flex items-center justify-center flex-shrink-0"},[t("i",{class:"fas fa-tachometer-alt text-white text-sm"})]),t("div",{class:"flex-1"},[t("h4",{class:"font-semibold text-gray-800 mb-1"},"速率限制设置 (可选)"),t("p",{class:"text-sm text-gray-600"},"控制 API Key 的使用频率和资源消耗")])],-1)),t("div",null,[l[32]||(l[32]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"时间窗口 (分钟)",-1)),b(t("input",{"onUpdate:modelValue":l[3]||(l[3]=u=>i.rateLimitWindow=u),type:"number",min:"1",placeholder:"留空表示无限制",class:"form-input w-full"},null,512),[[S,i.rateLimitWindow]]),l[33]||(l[33]=t("p",{class:"text-xs text-gray-500 mt-2"},"设置一个时间段(以分钟为单位),用于计算速率限制",-1))]),t("div",null,[l[34]||(l[34]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"时间窗口内的请求次数限制",-1)),b(t("input",{"onUpdate:modelValue":l[4]||(l[4]=u=>i.rateLimitRequests=u),type:"number",min:"1",placeholder:"留空表示无限制",class:"form-input w-full"},null,512),[[S,i.rateLimitRequests]]),l[35]||(l[35]=t("p",{class:"text-xs text-gray-500 mt-2"},"在时间窗口内允许的最大请求次数(需要先设置时间窗口)",-1))]),t("div",null,[l[36]||(l[36]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"时间窗口内的 Token 使用量限制",-1)),b(t("input",{"onUpdate:modelValue":l[5]||(l[5]=u=>i.tokenLimit=u),type:"number",placeholder:"留空表示无限制",class:"form-input w-full"},null,512),[[S,i.tokenLimit]]),l[37]||(l[37]=t("p",{class:"text-xs text-gray-500 mt-2"},"在时间窗口内允许消耗的最大 Token 数量(需要先设置时间窗口)",-1))]),l[39]||(l[39]=t("div",{class:"bg-blue-100 rounded-lg p-3 mt-3"},[t("h5",{class:"text-sm font-semibold text-blue-800 mb-2"},"💡 使用示例"),t("div",{class:"text-xs text-blue-700 space-y-1"},[t("p",null,[t("strong",null,"示例1:"),f(" 时间窗口=60,请求次数限制=1000")]),t("p",{class:"ml-4"},"→ 每60分钟内最多1000次请求"),t("p",{class:"mt-2"},[t("strong",null,"示例2:"),f(" 时间窗口=1,Token限制=10000")]),t("p",{class:"ml-4"},"→ 每分钟最多消耗10,000个Token"),t("p",{class:"mt-2"},[t("strong",null,"示例3:"),f(" 时间窗口=30,请求次数限制=50,Token限制=100000")]),t("p",{class:"ml-4"},"→ 每30分钟内最多50次请求且总Token不超过100,000")])],-1))]),t("div",null,[l[41]||(l[41]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"每日费用限制 (美元)",-1)),t("div",Wt,[t("div",zt,[t("button",{type:"button",onClick:l[6]||(l[6]=u=>i.dailyCostLimit="50"),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"$50"),t("button",{type:"button",onClick:l[7]||(l[7]=u=>i.dailyCostLimit="100"),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"$100"),t("button",{type:"button",onClick:l[8]||(l[8]=u=>i.dailyCostLimit="200"),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"$200"),t("button",{type:"button",onClick:l[9]||(l[9]=u=>i.dailyCostLimit=""),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"自定义")]),b(t("input",{"onUpdate:modelValue":l[10]||(l[10]=u=>i.dailyCostLimit=u),type:"number",min:"0",step:"0.01",placeholder:"0 表示无限制",class:"form-input w-full"},null,512),[[S,i.dailyCostLimit]]),l[40]||(l[40]=t("p",{class:"text-xs text-gray-500"},"设置此 API Key 每日的费用限制,超过限制将拒绝请求,0 或留空表示无限制",-1))])]),t("div",null,[l[42]||(l[42]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"并发限制 (可选)",-1)),b(t("input",{"onUpdate:modelValue":l[11]||(l[11]=u=>i.concurrencyLimit=u),type:"number",min:"0",placeholder:"0 表示无限制",class:"form-input w-full"},null,512),[[S,i.concurrencyLimit]]),l[43]||(l[43]=t("p",{class:"text-xs text-gray-500 mt-2"},"设置此 API Key 可同时处理的最大请求数,0 或留空表示无限制",-1))]),t("div",null,[l[44]||(l[44]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"备注 (可选)",-1)),b(t("textarea",{"onUpdate:modelValue":l[12]||(l[12]=u=>i.description=u),rows:"3",class:"form-input w-full resize-none",placeholder:"描述此 API Key 的用途..."},null,512),[[S,i.description]])]),t("div",null,[l[46]||(l[46]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"有效期限",-1)),b(t("select",{"onUpdate:modelValue":l[13]||(l[13]=u=>i.expireDuration=u),onChange:v,class:"form-input w-full"},l[45]||(l[45]=[t("option",{value:""},"永不过期",-1),t("option",{value:"1d"},"1 天",-1),t("option",{value:"7d"},"7 天",-1),t("option",{value:"30d"},"30 天",-1),t("option",{value:"90d"},"90 天",-1),t("option",{value:"180d"},"180 天",-1),t("option",{value:"365d"},"365 天",-1),t("option",{value:"custom"},"自定义日期",-1)]),544),[[z,i.expireDuration]]),i.expireDuration==="custom"?(a(),d("div",Yt,[b(t("input",{"onUpdate:modelValue":l[14]||(l[14]=u=>i.customExpireDate=u),type:"datetime-local",class:"form-input w-full",min:n.value,onChange:U},null,40,Nt),[[S,i.customExpireDate]])])):A("",!0),i.expiresAt?(a(),d("p",Ht," 将于 "+p($(i.expiresAt))+" 过期 ",1)):A("",!0)]),t("div",null,[l[50]||(l[50]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"服务权限",-1)),t("div",Bt,[t("label",Gt,[b(t("input",{type:"radio","onUpdate:modelValue":l[15]||(l[15]=u=>i.permissions=u),value:"all",class:"mr-2"},null,512),[[B,i.permissions]]),l[47]||(l[47]=t("span",{class:"text-sm text-gray-700"},"全部服务",-1))]),t("label",Xt,[b(t("input",{type:"radio","onUpdate:modelValue":l[16]||(l[16]=u=>i.permissions=u),value:"claude",class:"mr-2"},null,512),[[B,i.permissions]]),l[48]||(l[48]=t("span",{class:"text-sm text-gray-700"},"仅 Claude",-1))]),t("label",Qt,[b(t("input",{type:"radio","onUpdate:modelValue":l[17]||(l[17]=u=>i.permissions=u),value:"gemini",class:"mr-2"},null,512),[[B,i.permissions]]),l[49]||(l[49]=t("span",{class:"text-sm text-gray-700"},"仅 Gemini",-1))])]),l[51]||(l[51]=t("p",{class:"text-xs text-gray-500 mt-2"},"控制此 API Key 可以访问哪些服务",-1))]),t("div",null,[l[56]||(l[56]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"专属账号绑定 (可选)",-1)),t("div",Jt,[t("div",null,[l[53]||(l[53]=t("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Claude 专属账号",-1)),b(t("select",{"onUpdate:modelValue":l[18]||(l[18]=u=>i.claudeAccountId=u),class:"form-input w-full",disabled:i.permissions==="gemini"},[l[52]||(l[52]=t("option",{value:""},"使用共享账号池",-1)),(a(!0),d(T,null,P(L.accounts.claude.filter(u=>u.isDedicated),u=>(a(),d("option",{key:u.id,value:u.id},p(u.name)+" ("+p(u.status==="active"?"正常":"异常")+") ",9,te))),128))],8,Zt),[[z,i.claudeAccountId]])]),t("div",null,[l[55]||(l[55]=t("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Gemini 专属账号",-1)),b(t("select",{"onUpdate:modelValue":l[19]||(l[19]=u=>i.geminiAccountId=u),class:"form-input w-full",disabled:i.permissions==="claude"},[l[54]||(l[54]=t("option",{value:""},"使用共享账号池",-1)),(a(!0),d(T,null,P(L.accounts.gemini.filter(u=>u.isDedicated),u=>(a(),d("option",{key:u.id,value:u.id},p(u.name)+" ("+p(u.status==="active"?"正常":"异常")+") ",9,se))),128))],8,ee),[[z,i.geminiAccountId]])])]),l[57]||(l[57]=t("p",{class:"text-xs text-gray-500 mt-2"},"选择专属账号后,此API Key将只使用该账号,不选择则使用共享账号池",-1))]),t("div",null,[t("div",le,[b(t("input",{type:"checkbox","onUpdate:modelValue":l[20]||(l[20]=u=>i.enableModelRestriction=u),id:"enableModelRestriction",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"},null,512),[[G,i.enableModelRestriction]]),l[58]||(l[58]=t("label",{for:"enableModelRestriction",class:"ml-2 text-sm font-semibold text-gray-700 cursor-pointer"}," 启用模型限制 ",-1))]),i.enableModelRestriction?(a(),d("div",oe,[t("div",null,[l[61]||(l[61]=t("label",{class:"block text-sm font-medium text-gray-600 mb-2"},"限制的模型列表",-1)),t("div",ne,[(a(!0),d(T,null,P(i.restrictedModels,(u,j)=>(a(),d("span",{key:j,class:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-red-100 text-red-800"},[f(p(u)+" ",1),t("button",{type:"button",onClick:X=>E(j),class:"ml-2 text-red-600 hover:text-red-800"},l[59]||(l[59]=[t("i",{class:"fas fa-times text-xs"},null,-1)]),8,ie)]))),128)),i.restrictedModels.length===0?(a(),d("span",ae," 暂无限制的模型 ")):A("",!0)]),t("div",re,[b(t("input",{"onUpdate:modelValue":l[21]||(l[21]=u=>i.modelInput=u),onKeydown:et(Y(w,["prevent"]),["enter"]),type:"text",placeholder:"输入模型名称,按回车添加",class:"form-input flex-1"},null,40,de),[[S,i.modelInput]]),t("button",{type:"button",onClick:w,class:"px-4 py-2 bg-red-500 text-white rounded-lg hover:bg-red-600 transition-colors"},l[60]||(l[60]=[t("i",{class:"fas fa-plus"},null,-1)]))]),l[62]||(l[62]=t("p",{class:"text-xs text-gray-500 mt-2"},"设置此API Key无法访问的模型,例如:claude-opus-4-20250514",-1))])])):A("",!0)]),t("div",null,[t("div",ue,[b(t("input",{type:"checkbox","onUpdate:modelValue":l[22]||(l[22]=u=>i.enableClientRestriction=u),id:"enableClientRestriction",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"},null,512),[[G,i.enableClientRestriction]]),l[63]||(l[63]=t("label",{for:"enableClientRestriction",class:"ml-2 text-sm font-semibold text-gray-700 cursor-pointer"}," 启用客户端限制 ",-1))]),i.enableClientRestriction?(a(),d("div",pe,[t("div",null,[l[64]||(l[64]=t("label",{class:"block text-sm font-medium text-gray-600 mb-2"},"允许的客户端",-1)),l[65]||(l[65]=t("p",{class:"text-xs text-gray-500 mb-3"},"勾选允许使用此API Key的客户端",-1)),t("div",me,[(a(!0),d(T,null,P(M.value,u=>(a(),d("div",{key:u.id,class:"flex items-start"},[b(t("input",{type:"checkbox",id:`client_${u.id}`,value:u.id,"onUpdate:modelValue":l[23]||(l[23]=j=>i.allowedClients=j),class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 mt-0.5"},null,8,ce),[[G,i.allowedClients]]),t("label",{for:`client_${u.id}`,class:"ml-2 flex-1 cursor-pointer"},[t("span",ge,p(u.name),1),t("span",fe,p(u.description),1)],8,xe)]))),128))])])])):A("",!0)]),t("div",ye,[t("button",{type:"button",onClick:l[24]||(l[24]=u=>y.$emit("close")),class:"flex-1 px-6 py-3 bg-gray-100 text-gray-700 rounded-xl font-semibold hover:bg-gray-200 transition-colors"}," 取消 "),t("button",{type:"submit",disabled:D.value||!i.name,class:"btn btn-primary flex-1 py-3 px-6 font-semibold"},[D.value?(a(),d("div",ve)):(a(),d("i",we)),f(" "+p(D.value?"创建中...":"创建"),1)],8,be)])],32)])])]))}},Ce=J($e,[["__scopeId","data-v-dbdd5f63"]]),Ae={class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},ke={class:"modal-content w-full max-w-md p-8 mx-auto max-h-[90vh] flex flex-col"},Ke={class:"flex items-center justify-between mb-6"},Le=["value"],De={class:"space-y-3"},Ie={key:0,class:"flex flex-wrap gap-2"},Me=["onClick"],Re={class:"flex gap-2"},Se=["onKeypress"],he={class:"bg-blue-50 border border-blue-200 rounded-lg p-4 space-y-4"},Te={class:"space-y-3"},Ee={class:"flex gap-2"},Pe={class:"flex gap-4"},Ve={class:"flex items-center cursor-pointer"},je={class:"flex items-center cursor-pointer"},_e={class:"flex items-center cursor-pointer"},Ue={class:"grid grid-cols-1 gap-3"},qe=["disabled"],Oe=["value"],Fe=["disabled"],We=["value"],ze={class:"flex items-center mb-3"},Ye={key:0,class:"space-y-3"},Ne={class:"flex flex-wrap gap-2 mb-3 min-h-[32px] p-2 bg-gray-50 rounded-lg border border-gray-200"},He=["onClick"],Be={key:0,class:"text-gray-400 text-sm"},Ge={class:"flex gap-2"},Xe=["onKeydown"],Qe={class:"flex items-center mb-3"},Je={key:0,class:"space-y-3"},Ze={class:"space-y-2"},ts=["id","value"],es=["for"],ss={class:"text-sm font-medium text-gray-700"},ls={class:"text-xs text-gray-500 block"},os={class:"flex gap-3 pt-4"},ns=["disabled"],is={key:0,class:"loading-spinner mr-2"},as={key:1,class:"fas fa-save mr-2"},rs={__name:"EditApiKeyModal",props:{apiKey:{type:Object,required:!0},accounts:{type:Object,default:()=>({claude:[],gemini:[]})}},emits:["close","success"],setup(L,{emit:O}){const C=L,h=O;dt();const D=ut(),x=K(!1),M=K([]),i=K(""),n=at({name:"",tokenLimit:"",rateLimitWindow:"",rateLimitRequests:"",concurrencyLimit:"",dailyCostLimit:"",permissions:"all",claudeAccountId:"",geminiAccountId:"",enableModelRestriction:!1,restrictedModels:[],modelInput:"",enableClientRestriction:!1,allowedClients:[],tags:[]}),v=()=>{n.modelInput&&!n.restrictedModels.includes(n.modelInput)&&(n.restrictedModels.push(n.modelInput),n.modelInput="")},U=k=>{n.restrictedModels.splice(k,1)},$=()=>{if(i.value&&i.value.trim()){const k=i.value.trim();n.tags.includes(k)||n.tags.push(k),i.value=""}},w=k=>{n.tags.splice(k,1)},E=async()=>{x.value=!0;try{const k={tokenLimit:n.tokenLimit!==""&&n.tokenLimit!==null?parseInt(n.tokenLimit):0,rateLimitWindow:n.rateLimitWindow!==""&&n.rateLimitWindow!==null?parseInt(n.rateLimitWindow):0,rateLimitRequests:n.rateLimitRequests!==""&&n.rateLimitRequests!==null?parseInt(n.rateLimitRequests):0,concurrencyLimit:n.concurrencyLimit!==""&&n.concurrencyLimit!==null?parseInt(n.concurrencyLimit):0,dailyCostLimit:n.dailyCostLimit!==""&&n.dailyCostLimit!==null?parseFloat(n.dailyCostLimit):0,permissions:n.permissions,claudeAccountId:n.claudeAccountId||null,geminiAccountId:n.geminiAccountId||null,tags:n.tags};k.enableModelRestriction=n.enableModelRestriction,n.enableModelRestriction&&n.restrictedModels.length>0?k.restrictedModels=n.restrictedModels:k.restrictedModels=[],k.enableClientRestriction=n.enableClientRestriction,n.enableClientRestriction&&n.allowedClients.length>0?k.allowedClients=n.allowedClients:k.allowedClients=[];const o=await q.put(`/admin/api-keys/${C.apiKey.id}`,k);o.success?(h("success"),h("close")):I(o.message||"更新失败","error")}catch{I("更新失败","error")}finally{x.value=!1}};return rt(async()=>{M.value=await D.loadSupportedClients(),n.name=C.apiKey.name,n.tokenLimit=C.apiKey.tokenLimit||"",n.rateLimitWindow=C.apiKey.rateLimitWindow||"",n.rateLimitRequests=C.apiKey.rateLimitRequests||"",n.concurrencyLimit=C.apiKey.concurrencyLimit||"",n.dailyCostLimit=C.apiKey.dailyCostLimit||"",n.permissions=C.apiKey.permissions||"all",n.claudeAccountId=C.apiKey.claudeAccountId||"",n.geminiAccountId=C.apiKey.geminiAccountId||"",n.restrictedModels=C.apiKey.restrictedModels||[],n.allowedClients=C.apiKey.allowedClients||[],n.tags=C.apiKey.tags||[],n.enableModelRestriction=n.restrictedModels.length>0,n.enableClientRestriction=n.allowedClients.length>0}),(k,o)=>(a(),W(lt,{to:"body"},[t("div",Ae,[t("div",ke,[t("div",Ke,[o[22]||(o[22]=t("div",{class:"flex items-center gap-3"},[t("div",{class:"w-10 h-10 bg-gradient-to-br from-blue-500 to-blue-600 rounded-xl flex items-center justify-center"},[t("i",{class:"fas fa-edit text-white"})]),t("h3",{class:"text-xl font-bold text-gray-900"},"编辑 API Key")],-1)),t("button",{onClick:o[0]||(o[0]=m=>k.$emit("close")),class:"text-gray-400 hover:text-gray-600 transition-colors"},o[21]||(o[21]=[t("i",{class:"fas fa-times text-xl"},null,-1)]))]),t("form",{onSubmit:Y(E,["prevent"]),class:"space-y-6 modal-scroll-content custom-scrollbar flex-1"},[t("div",null,[o[23]||(o[23]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"名称",-1)),t("input",{value:n.name,type:"text",disabled:"",class:"form-input w-full bg-gray-100 cursor-not-allowed"},null,8,Le),o[24]||(o[24]=t("p",{class:"text-xs text-gray-500 mt-2"},"名称不可修改",-1))]),t("div",null,[o[28]||(o[28]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"标签",-1)),t("div",De,[n.tags.length>0?(a(),d("div",Ie,[(a(!0),d(T,null,P(n.tags,(m,y)=>(a(),d("span",{key:y,class:"inline-flex items-center gap-1 px-3 py-1 bg-blue-100 text-blue-800 text-sm rounded-full"},[f(p(m)+" ",1),t("button",{type:"button",onClick:l=>w(y),class:"ml-1 hover:text-blue-900"},o[25]||(o[25]=[t("i",{class:"fas fa-times text-xs"},null,-1)]),8,Me)]))),128))])):A("",!0),t("div",Re,[b(t("input",{"onUpdate:modelValue":o[1]||(o[1]=m=>i.value=m),type:"text",class:"form-input flex-1",placeholder:"输入新标签名称",onKeypress:et(Y($,["prevent"]),["enter"])},null,40,Se),[[S,i.value]]),t("button",{type:"button",onClick:$,class:"px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors"},o[26]||(o[26]=[t("i",{class:"fas fa-plus"},null,-1)]))]),o[27]||(o[27]=t("p",{class:"text-xs text-gray-500"},"用于标记不同团队或用途,方便筛选管理",-1))])]),t("div",he,[o[35]||(o[35]=t("div",{class:"flex items-start gap-3 mb-3"},[t("div",{class:"w-8 h-8 bg-blue-500 rounded-lg flex items-center justify-center flex-shrink-0"},[t("i",{class:"fas fa-tachometer-alt text-white text-sm"})]),t("div",{class:"flex-1"},[t("h4",{class:"font-semibold text-gray-800 mb-1"},"速率限制设置"),t("p",{class:"text-sm text-gray-600"},"控制 API Key 的使用频率和资源消耗")])],-1)),t("div",null,[o[29]||(o[29]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"时间窗口 (分钟)",-1)),b(t("input",{"onUpdate:modelValue":o[2]||(o[2]=m=>n.rateLimitWindow=m),type:"number",min:"1",placeholder:"留空表示无限制",class:"form-input w-full"},null,512),[[S,n.rateLimitWindow]]),o[30]||(o[30]=t("p",{class:"text-xs text-gray-500 mt-2"},"设置一个时间段(以分钟为单位),用于计算速率限制",-1))]),t("div",null,[o[31]||(o[31]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"时间窗口内的请求次数限制",-1)),b(t("input",{"onUpdate:modelValue":o[3]||(o[3]=m=>n.rateLimitRequests=m),type:"number",min:"1",placeholder:"留空表示无限制",class:"form-input w-full"},null,512),[[S,n.rateLimitRequests]]),o[32]||(o[32]=t("p",{class:"text-xs text-gray-500 mt-2"},"在时间窗口内允许的最大请求次数(需要先设置时间窗口)",-1))]),t("div",null,[o[33]||(o[33]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"时间窗口内的 Token 使用量限制",-1)),b(t("input",{"onUpdate:modelValue":o[4]||(o[4]=m=>n.tokenLimit=m),type:"number",min:"0",placeholder:"0 表示无限制",class:"form-input w-full"},null,512),[[S,n.tokenLimit]]),o[34]||(o[34]=t("p",{class:"text-xs text-gray-500 mt-2"},"在时间窗口内允许消耗的最大 Token 数量(需要先设置时间窗口),0 或留空表示无限制",-1))]),o[36]||(o[36]=t("div",{class:"bg-blue-100 rounded-lg p-3 mt-3"},[t("h5",{class:"text-sm font-semibold text-blue-800 mb-2"},"💡 使用示例"),t("div",{class:"text-xs text-blue-700 space-y-1"},[t("p",null,[t("strong",null,"示例1:"),f(" 时间窗口=60,请求次数限制=100")]),t("p",{class:"ml-4"},"→ 每60分钟内最多允许100次请求"),t("p",{class:"mt-2"},[t("strong",null,"示例2:"),f(" 时间窗口=10,Token限制=50000")]),t("p",{class:"ml-4"},"→ 每10分钟内最多消耗50,000个Token"),t("p",{class:"mt-2"},[t("strong",null,"示例3:"),f(" 时间窗口=30,请求次数限制=50,Token限制=100000")]),t("p",{class:"ml-4"},"→ 每30分钟内最多50次请求且总Token不超过100,000")])],-1))]),t("div",null,[o[38]||(o[38]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"每日费用限制 (美元)",-1)),t("div",Te,[t("div",Ee,[t("button",{type:"button",onClick:o[5]||(o[5]=m=>n.dailyCostLimit="50"),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"$50"),t("button",{type:"button",onClick:o[6]||(o[6]=m=>n.dailyCostLimit="100"),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"$100"),t("button",{type:"button",onClick:o[7]||(o[7]=m=>n.dailyCostLimit="200"),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"$200"),t("button",{type:"button",onClick:o[8]||(o[8]=m=>n.dailyCostLimit=""),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"自定义")]),b(t("input",{"onUpdate:modelValue":o[9]||(o[9]=m=>n.dailyCostLimit=m),type:"number",min:"0",step:"0.01",placeholder:"0 表示无限制",class:"form-input w-full"},null,512),[[S,n.dailyCostLimit]]),o[37]||(o[37]=t("p",{class:"text-xs text-gray-500"},"设置此 API Key 每日的费用限制,超过限制将拒绝请求,0 或留空表示无限制",-1))])]),t("div",null,[o[39]||(o[39]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"并发限制",-1)),b(t("input",{"onUpdate:modelValue":o[10]||(o[10]=m=>n.concurrencyLimit=m),type:"number",min:"0",placeholder:"0 表示无限制",class:"form-input w-full"},null,512),[[S,n.concurrencyLimit]]),o[40]||(o[40]=t("p",{class:"text-xs text-gray-500 mt-2"},"设置此 API Key 可同时处理的最大请求数",-1))]),t("div",null,[o[44]||(o[44]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"服务权限",-1)),t("div",Pe,[t("label",Ve,[b(t("input",{type:"radio","onUpdate:modelValue":o[11]||(o[11]=m=>n.permissions=m),value:"all",class:"mr-2"},null,512),[[B,n.permissions]]),o[41]||(o[41]=t("span",{class:"text-sm text-gray-700"},"全部服务",-1))]),t("label",je,[b(t("input",{type:"radio","onUpdate:modelValue":o[12]||(o[12]=m=>n.permissions=m),value:"claude",class:"mr-2"},null,512),[[B,n.permissions]]),o[42]||(o[42]=t("span",{class:"text-sm text-gray-700"},"仅 Claude",-1))]),t("label",_e,[b(t("input",{type:"radio","onUpdate:modelValue":o[13]||(o[13]=m=>n.permissions=m),value:"gemini",class:"mr-2"},null,512),[[B,n.permissions]]),o[43]||(o[43]=t("span",{class:"text-sm text-gray-700"},"仅 Gemini",-1))])]),o[45]||(o[45]=t("p",{class:"text-xs text-gray-500 mt-2"},"控制此 API Key 可以访问哪些服务",-1))]),t("div",null,[o[50]||(o[50]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"专属账号绑定",-1)),t("div",Ue,[t("div",null,[o[47]||(o[47]=t("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Claude 专属账号",-1)),b(t("select",{"onUpdate:modelValue":o[14]||(o[14]=m=>n.claudeAccountId=m),class:"form-input w-full",disabled:n.permissions==="gemini"},[o[46]||(o[46]=t("option",{value:""},"使用共享账号池",-1)),(a(!0),d(T,null,P(L.accounts.claude,m=>(a(),d("option",{key:m.id,value:m.id},p(m.name)+" ("+p(m.status==="active"?"正常":"异常")+") ",9,Oe))),128))],8,qe),[[z,n.claudeAccountId]])]),t("div",null,[o[49]||(o[49]=t("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Gemini 专属账号",-1)),b(t("select",{"onUpdate:modelValue":o[15]||(o[15]=m=>n.geminiAccountId=m),class:"form-input w-full",disabled:n.permissions==="claude"},[o[48]||(o[48]=t("option",{value:""},"使用共享账号池",-1)),(a(!0),d(T,null,P(L.accounts.gemini,m=>(a(),d("option",{key:m.id,value:m.id},p(m.name)+" ("+p(m.status==="active"?"正常":"异常")+") ",9,We))),128))],8,Fe),[[z,n.geminiAccountId]])])]),o[51]||(o[51]=t("p",{class:"text-xs text-gray-500 mt-2"},"修改绑定账号将影响此API Key的请求路由",-1))]),t("div",null,[t("div",ze,[b(t("input",{type:"checkbox","onUpdate:modelValue":o[16]||(o[16]=m=>n.enableModelRestriction=m),id:"editEnableModelRestriction",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"},null,512),[[G,n.enableModelRestriction]]),o[52]||(o[52]=t("label",{for:"editEnableModelRestriction",class:"ml-2 text-sm font-semibold text-gray-700 cursor-pointer"}," 启用模型限制 ",-1))]),n.enableModelRestriction?(a(),d("div",Ye,[t("div",null,[o[55]||(o[55]=t("label",{class:"block text-sm font-medium text-gray-600 mb-2"},"限制的模型列表",-1)),t("div",Ne,[(a(!0),d(T,null,P(n.restrictedModels,(m,y)=>(a(),d("span",{key:y,class:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-red-100 text-red-800"},[f(p(m)+" ",1),t("button",{type:"button",onClick:l=>U(y),class:"ml-2 text-red-600 hover:text-red-800"},o[53]||(o[53]=[t("i",{class:"fas fa-times text-xs"},null,-1)]),8,He)]))),128)),n.restrictedModels.length===0?(a(),d("span",Be," 暂无限制的模型 ")):A("",!0)]),t("div",Ge,[b(t("input",{"onUpdate:modelValue":o[17]||(o[17]=m=>n.modelInput=m),onKeydown:et(Y(v,["prevent"]),["enter"]),type:"text",placeholder:"输入模型名称,按回车添加",class:"form-input flex-1"},null,40,Xe),[[S,n.modelInput]]),t("button",{type:"button",onClick:v,class:"px-4 py-2 bg-red-500 text-white rounded-lg hover:bg-red-600 transition-colors"},o[54]||(o[54]=[t("i",{class:"fas fa-plus"},null,-1)]))]),o[56]||(o[56]=t("p",{class:"text-xs text-gray-500 mt-2"},"设置此API Key无法访问的模型,例如:claude-opus-4-20250514",-1))])])):A("",!0)]),t("div",null,[t("div",Qe,[b(t("input",{type:"checkbox","onUpdate:modelValue":o[18]||(o[18]=m=>n.enableClientRestriction=m),id:"editEnableClientRestriction",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"},null,512),[[G,n.enableClientRestriction]]),o[57]||(o[57]=t("label",{for:"editEnableClientRestriction",class:"ml-2 text-sm font-semibold text-gray-700 cursor-pointer"}," 启用客户端限制 ",-1))]),n.enableClientRestriction?(a(),d("div",Je,[t("div",null,[o[58]||(o[58]=t("label",{class:"block text-sm font-medium text-gray-600 mb-2"},"允许的客户端",-1)),o[59]||(o[59]=t("p",{class:"text-xs text-gray-500 mb-3"},"勾选允许使用此API Key的客户端",-1)),t("div",Ze,[(a(!0),d(T,null,P(M.value,m=>(a(),d("div",{key:m.id,class:"flex items-start"},[b(t("input",{type:"checkbox",id:`edit_client_${m.id}`,value:m.id,"onUpdate:modelValue":o[19]||(o[19]=y=>n.allowedClients=y),class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 mt-0.5"},null,8,ts),[[G,n.allowedClients]]),t("label",{for:`edit_client_${m.id}`,class:"ml-2 flex-1 cursor-pointer"},[t("span",ss,p(m.name),1),t("span",ls,p(m.description),1)],8,es)]))),128))])])])):A("",!0)]),t("div",os,[t("button",{type:"button",onClick:o[20]||(o[20]=m=>k.$emit("close")),class:"flex-1 px-6 py-3 bg-gray-100 text-gray-700 rounded-xl font-semibold hover:bg-gray-200 transition-colors"}," 取消 "),t("button",{type:"submit",disabled:x.value,class:"btn btn-primary flex-1 py-3 px-6 font-semibold"},[x.value?(a(),d("div",is)):(a(),d("i",as)),f(" "+p(x.value?"保存中...":"保存修改"),1)],8,ns)])],32)])])]))}},ds=J(rs,[["__scopeId","data-v-959a760f"]]),us={class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},ps={class:"modal-content w-full max-w-md p-8 mx-auto max-h-[90vh] flex flex-col"},ms={class:"flex items-center justify-between mb-6"},cs={class:"space-y-6 modal-scroll-content custom-scrollbar flex-1"},xs={class:"bg-blue-50 border border-blue-200 rounded-lg p-4"},gs={class:"flex items-start gap-3"},fs={class:"text-sm text-gray-700"},ys={class:"text-xs text-gray-600 mt-1"},bs={key:0,class:"mt-3"},vs=["min"],ws={key:1,class:"text-xs text-gray-500 mt-2"},$s={class:"flex gap-3 pt-4"},Cs=["disabled"],As={key:0,class:"loading-spinner mr-2"},ks={key:1,class:"fas fa-clock mr-2"},Ks={__name:"RenewApiKeyModal",props:{apiKey:{type:Object,required:!0}},emits:["close","success"],setup(L,{emit:O}){const C=L,h=O;dt();const D=K(!1),x=at({renewDuration:"30d",customExpireDate:"",newExpiresAt:null}),M=st(()=>{const $=new Date;return C.apiKey.expiresAt&&new Date(C.apiKey.expiresAt)>$?new Date(C.apiKey.expiresAt).toISOString().slice(0,16):($.setMinutes($.getMinutes()+1),$.toISOString().slice(0,16))}),i=$=>new Date($).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),n=()=>{if(!x.renewDuration){x.newExpiresAt=null;return}if(x.renewDuration==="permanent"){x.newExpiresAt=null;return}if(x.renewDuration==="custom")return;const $=C.apiKey.expiresAt&&new Date(C.apiKey.expiresAt)>new Date?new Date(C.apiKey.expiresAt):new Date,E=x.renewDuration.match(/(\d+)([dhmy])/);if(E){const[,k,o]=E,m=parseInt(k);switch(o){case"d":$.setDate($.getDate()+m);break;case"h":$.setHours($.getHours()+m);break;case"m":$.setMonth($.getMonth()+m);break;case"y":$.setFullYear($.getFullYear()+m);break}x.newExpiresAt=$.toISOString()}},v=()=>{x.customExpireDate&&(x.newExpiresAt=new Date(x.customExpireDate).toISOString())},U=async()=>{D.value=!0;try{const $={expiresAt:x.renewDuration==="permanent"?null:x.newExpiresAt},w=await q.put(`/admin/api-keys/${C.apiKey.id}/renew`,$);w.success?(I("API Key 续期成功","success"),h("success"),h("close")):I(w.message||"续期失败","error")}catch{I("续期失败","error")}finally{D.value=!1}};return n(),($,w)=>(a(),W(lt,{to:"body"},[t("div",us,[t("div",ps,[t("div",ms,[w[5]||(w[5]=t("div",{class:"flex items-center gap-3"},[t("div",{class:"w-10 h-10 bg-gradient-to-br from-green-500 to-green-600 rounded-xl flex items-center justify-center"},[t("i",{class:"fas fa-clock text-white"})]),t("h3",{class:"text-xl font-bold text-gray-900"},"续期 API Key")],-1)),t("button",{onClick:w[0]||(w[0]=E=>$.$emit("close")),class:"text-gray-400 hover:text-gray-600 transition-colors"},w[4]||(w[4]=[t("i",{class:"fas fa-times text-xl"},null,-1)]))]),t("div",cs,[t("div",xs,[t("div",gs,[w[7]||(w[7]=t("div",{class:"w-8 h-8 bg-blue-500 rounded-lg flex items-center justify-center flex-shrink-0"},[t("i",{class:"fas fa-info text-white text-sm"})],-1)),t("div",null,[w[6]||(w[6]=t("h4",{class:"font-semibold text-gray-800 mb-1"},"API Key 信息",-1)),t("p",fs,p(L.apiKey.name),1),t("p",ys," 当前过期时间:"+p(L.apiKey.expiresAt?i(L.apiKey.expiresAt):"永不过期"),1)])])]),t("div",null,[w[9]||(w[9]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"续期时长",-1)),b(t("select",{"onUpdate:modelValue":w[1]||(w[1]=E=>x.renewDuration=E),onChange:n,class:"form-input w-full"},w[8]||(w[8]=[t("option",{value:"7d"},"延长 7 天",-1),t("option",{value:"30d"},"延长 30 天",-1),t("option",{value:"90d"},"延长 90 天",-1),t("option",{value:"180d"},"延长 180 天",-1),t("option",{value:"365d"},"延长 365 天",-1),t("option",{value:"custom"},"自定义日期",-1),t("option",{value:"permanent"},"设为永不过期",-1)]),544),[[z,x.renewDuration]]),x.renewDuration==="custom"?(a(),d("div",bs,[b(t("input",{"onUpdate:modelValue":w[2]||(w[2]=E=>x.customExpireDate=E),type:"datetime-local",class:"form-input w-full",min:M.value,onChange:v},null,40,vs),[[S,x.customExpireDate]])])):A("",!0),x.newExpiresAt?(a(),d("p",ws," 新的过期时间:"+p(i(x.newExpiresAt)),1)):A("",!0)])]),t("div",$s,[t("button",{type:"button",onClick:w[3]||(w[3]=E=>$.$emit("close")),class:"flex-1 px-6 py-3 bg-gray-100 text-gray-700 rounded-xl font-semibold hover:bg-gray-200 transition-colors"}," 取消 "),t("button",{type:"button",onClick:U,disabled:D.value||!x.renewDuration,class:"btn btn-primary flex-1 py-3 px-6 font-semibold"},[D.value?(a(),d("div",As)):(a(),d("i",ks)),f(" "+p(D.value?"续期中...":"确认续期"),1)],8,Cs)])])])]))}},Ls=J(Ks,[["__scopeId","data-v-5486ec2f"]]),Ds={class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},Is={class:"modal-content w-full max-w-lg p-8 mx-auto"},Ms={class:"flex items-center justify-between mb-6"},Rs={class:"space-y-4 mb-6"},Ss={class:"text-gray-900"},hs={key:0},Ts={class:"text-gray-600 text-sm"},Es={class:"relative"},Ps=["type","value"],Vs={class:"absolute right-1 top-1 flex gap-1"},js=["title"],_s={class:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-6"},Us={class:"text-sm text-gray-700 space-y-2"},qs={class:"block bg-white rounded px-3 py-2 text-xs"},Os={class:"bg-white rounded px-3 py-2 text-xs overflow-x-auto"},Fs={class:"flex justify-end"},Ws={__name:"NewApiKeyModal",props:{apiKey:{type:Object,required:!0}},emits:["close"],setup(L,{emit:O}){const C=L,h=K(!1),D=K(!1),x=st(()=>`${window.location.protocol}//${window.location.host}/api/`),M=()=>{h.value=!h.value},i=async()=>{try{await navigator.clipboard.writeText(C.apiKey.key),D.value=!0,I("API Key 已复制到剪贴板","success"),setTimeout(()=>{D.value=!1},3e3)}catch{I("复制失败,请手动复制","error")}};return(n,v)=>(a(),W(lt,{to:"body"},[t("div",Ds,[t("div",Is,[t("div",Ms,[v[3]||(v[3]=t("div",{class:"flex items-center gap-3"},[t("div",{class:"w-10 h-10 bg-gradient-to-br from-green-500 to-green-600 rounded-xl flex items-center justify-center"},[t("i",{class:"fas fa-check text-white"})]),t("h3",{class:"text-xl font-bold text-gray-900"},"API Key 创建成功")],-1)),t("button",{onClick:v[0]||(v[0]=U=>n.$emit("close")),class:"text-gray-400 hover:text-gray-600 transition-colors"},v[2]||(v[2]=[t("i",{class:"fas fa-times text-xl"},null,-1)]))]),v[11]||(v[11]=t("div",{class:"bg-green-50 border border-green-200 rounded-lg p-4 mb-6"},[t("div",{class:"flex items-start gap-3"},[t("div",{class:"w-8 h-8 bg-green-500 rounded-lg flex items-center justify-center flex-shrink-0"},[t("i",{class:"fas fa-shield-alt text-white text-sm"})]),t("div",null,[t("h4",{class:"font-semibold text-gray-800 mb-1"},"请妥善保管您的 API Key"),t("p",{class:"text-sm text-gray-600"},"API Key 只会显示一次,关闭此窗口后将无法再次查看完整密钥。请立即复制并保存到安全的地方。")])])],-1)),t("div",Rs,[t("div",null,[v[4]||(v[4]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-2"},"名称",-1)),t("p",Ss,p(L.apiKey.name),1)]),L.apiKey.description?(a(),d("div",hs,[v[5]||(v[5]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-2"},"描述",-1)),t("p",Ts,p(L.apiKey.description),1)])):A("",!0),t("div",null,[v[7]||(v[7]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-2"},"API Key",-1)),t("div",Es,[t("input",{type:h.value?"text":"password",value:L.apiKey.key,readonly:"",class:"form-input w-full pr-24 font-mono text-sm bg-gray-50"},null,8,Ps),t("div",Vs,[t("button",{onClick:M,type:"button",class:"px-3 py-1.5 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm transition-colors",title:h.value?"隐藏":"显示"},[t("i",{class:_(h.value?"fas fa-eye-slash":"fas fa-eye")},null,2)],8,js),t("button",{onClick:i,type:"button",class:"px-3 py-1.5 bg-blue-100 hover:bg-blue-200 text-blue-700 rounded-lg text-sm transition-colors",title:"复制"},[v[6]||(v[6]=t("i",{class:"fas fa-copy"},null,-1)),f(" "+p(D.value?"已复制":"复制"),1)])])])])]),t("div",_s,[v[10]||(v[10]=t("h4",{class:"font-semibold text-gray-800 mb-2"},[t("i",{class:"fas fa-info-circle mr-2 text-blue-500"}),f("使用说明 ")],-1)),t("div",Us,[v[8]||(v[8]=t("p",null,"1. 在 HTTP 请求头中添加:",-1)),t("code",qs,"Authorization: Bearer "+p(L.apiKey.key),1),v[9]||(v[9]=t("p",{class:"pt-2"},"2. 请求示例:",-1)),t("pre",Os,"curl -X POST "+p(x.value)+`v1/messages \\
- -H "Authorization: Bearer `+p(L.apiKey.key)+`" \\
- -H "Content-Type: application/json" \\
- -d '{"model": "claude-3-opus-20240229", "messages": [...]}'`,1)])]),t("div",Fs,[t("button",{onClick:v[1]||(v[1]=U=>n.$emit("close")),class:"btn btn-primary px-6 py-2.5"}," 我已保存 ")])])])]))}},zs=J(Ws,[["__scopeId","data-v-747f035b"]]),Ys={class:"tab-content"},Ns={class:"card p-6"},Hs={class:"flex flex-col md:flex-row justify-between items-center gap-4 mb-6"},Bs={class:"flex items-center gap-3"},Gs=["value"],Xs={key:0,class:"text-center py-12"},Qs={key:1,class:"text-center py-12"},Js={key:2,class:"table-container"},Zs={class:"min-w-full"},tl={class:"bg-gray-50/80 backdrop-blur-sm"},el={key:1,class:"fas fa-sort ml-1 text-gray-400"},sl={key:1,class:"fas fa-sort ml-1 text-gray-400"},ll={class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider"},ol={key:1,class:"fas fa-sort ml-1 text-gray-400"},nl={key:1,class:"fas fa-sort ml-1 text-gray-400"},il={key:1,class:"fas fa-sort ml-1 text-gray-400"},al={class:"divide-y divide-gray-200/50"},rl={class:"table-row"},dl={class:"px-6 py-4 whitespace-nowrap"},ul={class:"flex items-center"},pl={class:"text-sm font-semibold text-gray-900"},ml={class:"text-xs text-gray-500"},cl={class:"text-xs text-gray-500 mt-1"},xl={key:0},gl={key:1},fl={class:"px-6 py-4"},yl={class:"flex flex-wrap gap-1"},bl={key:0,class:"text-xs text-gray-400"},vl={class:"px-6 py-4 whitespace-nowrap"},wl={class:"text-sm font-mono text-gray-600 bg-gray-50 px-3 py-1 rounded-lg"},$l={class:"px-6 py-4 whitespace-nowrap"},Cl={class:"px-6 py-4"},Al={class:"space-y-1"},kl={class:"flex justify-between text-sm"},Kl={class:"font-medium text-gray-900"},Ll={class:"flex justify-between text-sm"},Dl={class:"font-medium text-gray-900"},Il={class:"flex justify-between text-sm"},Ml={class:"font-medium text-green-600"},Rl={key:0,class:"flex justify-between text-sm"},Sl={class:"flex justify-between text-sm"},hl={class:"font-medium text-purple-600"},Tl={class:"flex justify-between text-sm"},El={key:0,class:"text-xs text-gray-500"},Pl={key:1,class:"flex justify-between text-sm"},Vl={class:"font-medium text-indigo-600"},jl={key:2,class:"flex justify-between text-sm"},_l={class:"font-medium text-indigo-600"},Ul={class:"flex justify-between text-xs text-gray-500"},ql={key:3,class:"flex justify-between text-xs text-orange-500"},Ol={class:"flex justify-between text-xs text-blue-600"},Fl={class:"pt-1 border-t border-gray-100"},Wl={class:"flex justify-between text-xs text-green-600"},zl={class:"pt-2"},Yl=["onClick"],Nl={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},Hl={class:"px-6 py-4 whitespace-nowrap text-sm"},Bl={key:0},Gl={key:0,class:"text-red-600"},Xl={key:1,class:"text-orange-600"},Ql={key:2,class:"text-gray-600"},Jl={key:1,class:"text-gray-400"},Zl={class:"px-6 py-4 whitespace-nowrap text-sm"},to={class:"flex gap-2"},eo=["onClick"],so=["onClick"],lo=["onClick"],oo=["onClick"],no={key:0},io={colspan:"7",class:"px-6 py-4 bg-gray-50"},ao={key:0,class:"text-center py-4"},ro={class:"space-y-4"},uo={class:"flex items-center justify-between mb-4"},po={class:"flex items-center gap-2"},mo={key:0,class:"text-xs text-gray-500 bg-gray-100 px-2 py-1 rounded-full"},co={class:"flex gap-1 items-center"},xo={class:"flex gap-1 bg-gray-100 rounded p-1"},go=["onClick"],fo={key:0,class:"text-center py-8"},yo={class:"flex items-center justify-center gap-2 mb-3"},bo=["onClick"],vo={key:1,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},wo={class:"flex justify-between items-start mb-3"},$o={class:"flex-1"},Co={class:"text-sm font-semibold text-gray-800 block mb-1"},Ao={class:"text-xs text-gray-500 bg-blue-50 px-2 py-1 rounded-full"},ko={class:"space-y-2 mb-3"},Ko={class:"flex justify-between items-center text-sm"},Lo={class:"font-semibold text-gray-900"},Do={class:"flex justify-between items-center text-sm"},Io={class:"font-semibold text-green-600"},Mo={class:"pt-2 mt-2 border-t border-gray-100"},Ro={class:"flex justify-between items-center text-xs text-gray-500"},So={class:"font-medium"},ho={class:"flex justify-between items-center text-xs text-gray-500"},To={class:"font-medium"},Eo={key:0,class:"flex justify-between items-center text-xs text-purple-600"},Po={class:"font-medium"},Vo={key:1,class:"flex justify-between items-center text-xs text-purple-600"},jo={class:"font-medium"},_o={class:"w-full bg-gray-200 rounded-full h-2 mt-3"},Uo={class:"text-right mt-1"},qo={class:"text-xs font-medium text-indigo-600"},Oo={key:2,class:"mt-4 p-3 bg-gradient-to-r from-indigo-50 to-purple-50 rounded-lg border border-indigo-100"},Fo={class:"flex items-center justify-between text-sm"},Wo={class:"flex gap-4 text-xs"},zo={class:"text-gray-600"},Yo={class:"font-semibold text-gray-800"},No={class:"text-gray-600"},Ho={class:"font-semibold text-gray-800"},Bo={__name:"ApiKeysView",setup(L){const O=ut(),C=K([]),h=K(!1),D=K("today"),x=K(""),M=K("asc"),i=K({}),n=K({}),v=K({}),U=K([new Date(2e3,1,1,0,0,0),new Date(2e3,2,1,23,59,59)]),$=K({claude:[],gemini:[]}),w=K(""),E=K([]),k=K(!1),o=K(!1),m=K(!1),y=K(!1),l=K(null),u=K(null),j=K(null),X=st(()=>{let r=C.value;return w.value&&(r=C.value.filter(g=>g.tags&&g.tags.includes(w.value))),x.value?[...r].sort((g,s)=>{let c=g[x.value],R=s[x.value];return x.value==="status"?(c=g.isActive?1:0,R=s.isActive?1:0):x.value==="cost"?(c=parseFloat(ot(g.usage).replace("$","")),R=parseFloat(ot(s.usage).replace("$",""))):(x.value==="createdAt"||x.value==="expiresAt")&&(c=c?new Date(c).getTime():0,R=R?new Date(R).getTime():0),cR?M.value==="asc"?1:-1:0}):r}),N=async()=>{try{const[r,e]=await Promise.all([q.get("/admin/claude-accounts"),q.get("/admin/gemini-accounts")]);r.success&&($.value.claude=r.data||[]),e.success&&($.value.gemini=e.data||[])}catch(r){console.error("加载账户列表失败:",r)}},H=async()=>{h.value=!0;try{const r=await q.get(`/admin/api-keys?timeRange=${D.value}`);if(r.success){C.value=r.data||[];const e=new Set;C.value.forEach(g=>{g.tags&&Array.isArray(g.tags)&&g.tags.forEach(s=>e.add(s))}),E.value=Array.from(e).sort()}}catch{I("加载 API Keys 失败","error")}finally{h.value=!1}},Q=r=>{x.value===r?M.value=M.value==="asc"?"desc":"asc":(x.value=r,M.value="asc")},V=r=>!r&&r!==0?"0":r.toLocaleString("zh-CN"),ot=r=>!r||!r.total?"$0.0000":`$${(r.total.cost||0).toFixed(4)}`,ft=r=>{if(!r)return"未知账户";const e=$.value.claude.find(s=>s.id===r);if(e)return e.name;const g=$.value.gemini.find(s=>s.id===r);return g?g.name:`账户-${r.substring(0,8)}`},nt=r=>r?new Date(r)!r||nt(r)?!1:(new Date(r)-new Date)/(1e3*60*60*24)<=7,mt=r=>r?new Date(r).toLocaleDateString("zh-CN"):"",yt=async r=>{i.value[r]?i.value[r]=!1:(i.value[r]=!0,v.value[r]||xt(r),await Z(r,!0))},Z=async(r,e=!1)=>{if(!e&&n.value[r]&&n.value[r].length>0)return;const g=F(r);try{let s=`/admin/api-keys/${r}/model-stats`;const c=new URLSearchParams;if(g.customStart&&g.customEnd)c.append("startDate",g.customStart),c.append("endDate",g.customEnd),c.append("period","custom");else{const tt=g.preset==="today"?"daily":"monthly";c.append("period",tt)}s+="?"+c.toString();const R=await q.get(s);R.success&&(n.value[r]=R.data||[])}catch{I("加载模型统计失败","error"),n.value[r]=[]}},ct=(r,e)=>{const g=e.reduce((s,c)=>s+(c.allTokens||0),0);return g===0?0:Math.round(r/g*100)},bt=r=>r.formatted&&r.formatted.total?r.formatted.total:r.cost!==void 0?`$${r.cost.toFixed(6)}`:"$0.000000",xt=r=>{const e=new Date,g=new Date(e);g.setDate(e.getDate()-6),v.value[r]={type:"preset",preset:"7days",customStart:g.toISOString().split("T")[0],customEnd:e.toISOString().split("T")[0],customRange:null,presetOptions:[{value:"today",label:"今日",days:1},{value:"7days",label:"7天",days:7},{value:"30days",label:"30天",days:30}]}},F=r=>(v.value[r]||xt(r),v.value[r]),gt=(r,e)=>{const g=F(e);g.type="preset",g.preset=r;const s=g.presetOptions.find(c=>c.value===r);if(s){const c=new Date,R=new Date(c);R.setDate(c.getDate()-(s.days-1)),g.customStart=R.toISOString().split("T")[0],g.customEnd=c.toISOString().split("T")[0];const tt=it=>it.getFullYear()+"-"+String(it.getMonth()+1).padStart(2,"0")+"-"+String(it.getDate()).padStart(2,"0")+" 00:00:00";g.customRange=[tt(R),tt(c)]}Z(e,!0)},vt=(r,e)=>{const g=F(r);e&&e.length===2?(g.type="custom",g.preset="",g.customRange=e,g.customStart=e[0].split(" ")[0],g.customEnd=e[1].split(" ")[0],Z(r,!0)):e===null&>("7days",r)},wt=r=>r>new Date,$t=r=>{const e=F(r);e.type="preset",e.preset="7days";const g=new Date,s=new Date(g);s.setDate(g.getDate()-6),e.customStart=s.toISOString().split("T")[0],e.customEnd=g.toISOString().split("T")[0],e.customRange=null,Z(r,!0),I("已重置筛选条件并刷新数据","info")},Ct=()=>{k.value=!0},At=r=>{l.value=r,o.value=!0},kt=r=>{u.value=r,m.value=!0},Kt=r=>{k.value=!1,j.value=r,y.value=!0,H()},Lt=()=>{o.value=!1,I("API Key 更新成功","success"),H()},Dt=()=>{m.value=!1,I("API Key 续期成功","success"),H()},It=async r=>{if(confirm("确定要删除这个 API Key 吗?此操作不可恢复。"))try{const e=await q.delete(`/admin/api-keys/${r}`);e.success?(I("API Key 已删除","success"),H()):I(e.message||"删除失败","error")}catch{I("删除失败","error")}},Mt=r=>{const g=`${window.location.origin}/admin/api-stats?apiId=${r.id}`,s=document.createElement("textarea");s.value=g,s.style.position="fixed",s.style.opacity="0",s.style.left="-9999px",document.body.appendChild(s),s.select(),s.setSelectionRange(0,99999);try{document.execCommand("copy")?I("已复制统计页面链接","success"):(I("复制失败,请手动复制","error"),console.log("统计页面链接:",g))}catch(c){I("复制失败,请手动复制","error"),console.error("复制错误:",c),console.log("统计页面链接:",g)}finally{document.body.removeChild(s)}};return rt(async()=>{await Promise.all([O.loadSupportedClients(),N(),H()])}),(r,e)=>{const g=Rt;return a(),d("div",Ys,[t("div",Ns,[t("div",Hs,[e[15]||(e[15]=t("div",null,[t("h3",{class:"text-xl font-bold text-gray-900 mb-2"},"API Keys 管理"),t("p",{class:"text-gray-600"},"管理和监控您的 API 密钥")],-1)),t("div",Bs,[b(t("select",{"onUpdate:modelValue":e[0]||(e[0]=s=>D.value=s),onChange:e[1]||(e[1]=s=>H()),class:"form-input px-3 py-2 text-sm"},e[12]||(e[12]=[t("option",{value:"today"},"今日",-1),t("option",{value:"7days"},"最近7天",-1),t("option",{value:"monthly"},"本月",-1),t("option",{value:"all"},"全部时间",-1)]),544),[[z,D.value]]),b(t("select",{"onUpdate:modelValue":e[2]||(e[2]=s=>w.value=s),class:"form-input px-3 py-2 text-sm"},[e[13]||(e[13]=t("option",{value:""},"所有标签",-1)),(a(!0),d(T,null,P(E.value,s=>(a(),d("option",{key:s,value:s},p(s),9,Gs))),128))],512),[[z,w.value]]),t("button",{onClick:Y(Ct,["stop"]),class:"btn btn-primary px-6 py-3 flex items-center gap-2"},e[14]||(e[14]=[t("i",{class:"fas fa-plus"},null,-1),f("创建新 Key ",-1)]))])]),h.value?(a(),d("div",Xs,e[16]||(e[16]=[t("div",{class:"loading-spinner mx-auto mb-4"},null,-1),t("p",{class:"text-gray-500"},"正在加载 API Keys...",-1)]))):C.value.length===0?(a(),d("div",Qs,e[17]||(e[17]=[t("div",{class:"w-16 h-16 mx-auto mb-4 bg-gray-100 rounded-full flex items-center justify-center"},[t("i",{class:"fas fa-key text-gray-400 text-xl"})],-1),t("p",{class:"text-gray-500 text-lg"},"暂无 API Keys",-1),t("p",{class:"text-gray-400 text-sm mt-2"},"点击上方按钮创建您的第一个 API Key",-1)]))):(a(),d("div",Js,[t("table",Zs,[t("thead",tl,[t("tr",null,[t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:e[3]||(e[3]=s=>Q("name"))},[e[18]||(e[18]=f(" 名称 ",-1)),x.value==="name"?(a(),d("i",{key:0,class:_(["fas",M.value==="asc"?"fa-sort-up":"fa-sort-down","ml-1"])},null,2)):(a(),d("i",el))]),e[25]||(e[25]=t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider"},"标签",-1)),e[26]||(e[26]=t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider"},"API Key",-1)),t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:e[4]||(e[4]=s=>Q("status"))},[e[19]||(e[19]=f(" 状态 ",-1)),x.value==="status"?(a(),d("i",{key:0,class:_(["fas",M.value==="asc"?"fa-sort-up":"fa-sort-down","ml-1"])},null,2)):(a(),d("i",sl))]),t("th",ll,[e[22]||(e[22]=f(" 使用统计 ",-1)),t("span",{class:"cursor-pointer hover:bg-gray-100 px-2 py-1 rounded",onClick:e[5]||(e[5]=s=>Q("cost"))},[e[20]||(e[20]=f(" (费用 ",-1)),x.value==="cost"?(a(),d("i",{key:0,class:_(["fas",M.value==="asc"?"fa-sort-up":"fa-sort-down","ml-1"])},null,2)):(a(),d("i",ol)),e[21]||(e[21]=f(") ",-1))])]),t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:e[6]||(e[6]=s=>Q("createdAt"))},[e[23]||(e[23]=f(" 创建时间 ",-1)),x.value==="createdAt"?(a(),d("i",{key:0,class:_(["fas",M.value==="asc"?"fa-sort-up":"fa-sort-down","ml-1"])},null,2)):(a(),d("i",nl))]),t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:e[7]||(e[7]=s=>Q("expiresAt"))},[e[24]||(e[24]=f(" 过期时间 ",-1)),x.value==="expiresAt"?(a(),d("i",{key:0,class:_(["fas",M.value==="asc"?"fa-sort-up":"fa-sort-down","ml-1"])},null,2)):(a(),d("i",il))]),e[27]||(e[27]=t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider"},"操作",-1))])]),t("tbody",al,[(a(!0),d(T,null,P(X.value,s=>(a(),d(T,{key:s.id},[t("tr",rl,[t("td",dl,[t("div",ul,[e[30]||(e[30]=t("div",{class:"w-8 h-8 bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg flex items-center justify-center mr-3"},[t("i",{class:"fas fa-key text-white text-xs"})],-1)),t("div",null,[t("div",pl,p(s.name),1),t("div",ml,p(s.id),1),t("div",cl,[s.claudeAccountId?(a(),d("span",xl,[e[28]||(e[28]=t("i",{class:"fas fa-link mr-1"},null,-1)),f(" 绑定: "+p(ft(s.claudeAccountId)),1)])):(a(),d("span",gl,e[29]||(e[29]=[t("i",{class:"fas fa-share-alt mr-1"},null,-1),f(" 使用共享池 ",-1)])))])])])]),t("td",fl,[t("div",yl,[(a(!0),d(T,null,P(s.tags||[],c=>(a(),d("span",{key:c,class:"inline-flex items-center px-2 py-0.5 bg-blue-100 text-blue-800 text-xs rounded-full"},p(c),1))),128)),!s.tags||s.tags.length===0?(a(),d("span",bl,"无标签")):A("",!0)])]),t("td",vl,[t("div",wl,p((s.apiKey||"").substring(0,20))+"... ",1)]),t("td",$l,[t("span",{class:_(["inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold",s.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"])},[t("div",{class:_(["w-2 h-2 rounded-full mr-2",s.isActive?"bg-green-500":"bg-red-500"])},null,2),f(" "+p(s.isActive?"活跃":"禁用"),1)],2)]),t("td",Cl,[t("div",Al,[t("div",kl,[e[31]||(e[31]=t("span",{class:"text-gray-600"},"请求数:",-1)),t("span",Kl,p(V(s.usage&&s.usage.total&&s.usage.total.requests||0)),1)]),t("div",Ll,[e[32]||(e[32]=t("span",{class:"text-gray-600"},"Token:",-1)),t("span",Dl,p(V(s.usage&&s.usage.total&&s.usage.total.tokens||0)),1)]),t("div",Il,[e[33]||(e[33]=t("span",{class:"text-gray-600"},"费用:",-1)),t("span",Ml,p(ot(s.usage)),1)]),s.dailyCostLimit>0?(a(),d("div",Rl,[e[34]||(e[34]=t("span",{class:"text-gray-600"},"今日费用:",-1)),t("span",{class:_(["font-medium",(s.dailyCost||0)>=s.dailyCostLimit?"text-red-600":"text-blue-600"])}," $"+p((s.dailyCost||0).toFixed(2))+" / $"+p(s.dailyCostLimit.toFixed(2)),3)])):A("",!0),t("div",Sl,[e[35]||(e[35]=t("span",{class:"text-gray-600"},"并发限制:",-1)),t("span",hl,p(s.concurrencyLimit>0?s.concurrencyLimit:"无限制"),1)]),t("div",Tl,[e[36]||(e[36]=t("span",{class:"text-gray-600"},"当前并发:",-1)),t("span",{class:_(["font-medium",s.currentConcurrency>0?"text-orange-600":"text-gray-600"])},[f(p(s.currentConcurrency||0)+" ",1),s.concurrencyLimit>0?(a(),d("span",El,"/ "+p(s.concurrencyLimit),1)):A("",!0)],2)]),s.rateLimitWindow>0?(a(),d("div",Pl,[e[37]||(e[37]=t("span",{class:"text-gray-600"},"时间窗口:",-1)),t("span",Vl,p(s.rateLimitWindow)+" 分钟",1)])):A("",!0),s.rateLimitRequests>0?(a(),d("div",jl,[e[38]||(e[38]=t("span",{class:"text-gray-600"},"请求限制:",-1)),t("span",_l,p(s.rateLimitRequests)+" 次/窗口",1)])):A("",!0),t("div",Ul,[t("span",null,"输入: "+p(V(s.usage&&s.usage.total&&s.usage.total.inputTokens||0)),1),t("span",null,"输出: "+p(V(s.usage&&s.usage.total&&s.usage.total.outputTokens||0)),1)]),(s.usage&&s.usage.total&&s.usage.total.cacheCreateTokens||0)>0||(s.usage&&s.usage.total&&s.usage.total.cacheReadTokens||0)>0?(a(),d("div",ql,[t("span",null,"缓存创建: "+p(V(s.usage&&s.usage.total&&s.usage.total.cacheCreateTokens||0)),1),t("span",null,"缓存读取: "+p(V(s.usage&&s.usage.total&&s.usage.total.cacheReadTokens||0)),1)])):A("",!0),t("div",Ol,[t("span",null,"RPM: "+p(s.usage&&s.usage.averages&&s.usage.averages.rpm||0),1),t("span",null,"TPM: "+p(s.usage&&s.usage.averages&&s.usage.averages.tpm||0),1)]),t("div",Fl,[t("div",Wl,[t("span",null,"今日: "+p(V(s.usage&&s.usage.daily&&s.usage.daily.requests||0))+"次",1),t("span",null,p(V(s.usage&&s.usage.daily&&s.usage.daily.tokens||0))+"T",1)])]),t("div",zl,[s&&s.id?(a(),d("button",{key:0,onClick:c=>yt(s.id),class:"text-xs text-indigo-600 hover:text-indigo-800 font-medium"},[t("i",{class:_(["fas",i.value[s.id]?"fa-chevron-up":"fa-chevron-down","mr-1"])},null,2),e[39]||(e[39]=f(" 模型使用分布 ",-1))],8,Yl)):A("",!0)])])]),t("td",Nl,p(new Date(s.createdAt).toLocaleDateString()),1),t("td",Hl,[s.expiresAt?(a(),d("div",Bl,[nt(s.expiresAt)?(a(),d("div",Gl,e[40]||(e[40]=[t("i",{class:"fas fa-exclamation-circle mr-1"},null,-1),f(" 已过期 ",-1)]))):pt(s.expiresAt)?(a(),d("div",Xl,[e[41]||(e[41]=t("i",{class:"fas fa-clock mr-1"},null,-1)),f(" "+p(mt(s.expiresAt)),1)])):(a(),d("div",Ql,p(mt(s.expiresAt)),1))])):(a(),d("div",Jl,e[42]||(e[42]=[t("i",{class:"fas fa-infinity mr-1"},null,-1),f(" 永不过期 ",-1)])))]),t("td",Zl,[t("div",to,[t("button",{onClick:c=>Mt(s),class:"text-purple-600 hover:text-purple-900 font-medium hover:bg-purple-50 px-3 py-1 rounded-lg transition-colors",title:"复制统计页面链接"},e[43]||(e[43]=[t("i",{class:"fas fa-chart-bar mr-1"},null,-1),f("统计 ",-1)]),8,eo),t("button",{onClick:c=>At(s),class:"text-blue-600 hover:text-blue-900 font-medium hover:bg-blue-50 px-3 py-1 rounded-lg transition-colors"},e[44]||(e[44]=[t("i",{class:"fas fa-edit mr-1"},null,-1),f("编辑 ",-1)]),8,so),s.expiresAt&&(nt(s.expiresAt)||pt(s.expiresAt))?(a(),d("button",{key:0,onClick:c=>kt(s),class:"text-green-600 hover:text-green-900 font-medium hover:bg-green-50 px-3 py-1 rounded-lg transition-colors"},e[45]||(e[45]=[t("i",{class:"fas fa-clock mr-1"},null,-1),f("续期 ",-1)]),8,lo)):A("",!0),t("button",{onClick:c=>It(s.id),class:"text-red-600 hover:text-red-900 font-medium hover:bg-red-50 px-3 py-1 rounded-lg transition-colors"},e[46]||(e[46]=[t("i",{class:"fas fa-trash mr-1"},null,-1),f("删除 ",-1)]),8,oo)])])]),s&&s.id&&i.value[s.id]?(a(),d("tr",no,[t("td",io,[n.value[s.id]?A("",!0):(a(),d("div",ao,e[47]||(e[47]=[t("div",{class:"loading-spinner mx-auto"},null,-1),t("p",{class:"text-sm text-gray-500 mt-2"},"加载模型统计...",-1)]))),t("div",ro,[t("div",uo,[e[48]||(e[48]=t("h5",{class:"text-sm font-semibold text-gray-700 flex items-center"},[t("i",{class:"fas fa-chart-pie text-indigo-500 mr-2"}),f(" 模型使用分布 ")],-1)),t("div",po,[n.value[s.id]&&n.value[s.id].length>0?(a(),d("span",mo,p(n.value[s.id].length)+" 个模型 ",1)):A("",!0),t("div",co,[t("div",xo,[(a(!0),d(T,null,P(F(s.id).presetOptions,c=>(a(),d("button",{key:c.value,onClick:R=>gt(c.value,s.id),class:_(["px-2 py-1 rounded text-xs font-medium transition-colors",F(s.id).preset===c.value&&F(s.id).type==="preset"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"])},p(c.label),11,go))),128))]),ht(g,{"model-value":F(s.id).customRange,"onUpdate:modelValue":c=>vt(s.id,c),type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss","disabled-date":wt,"default-time":U.value,size:"small",style:{width:"280px"},class:"api-key-date-picker",clearable:!0,"unlink-panels":!1},null,8,["model-value","onUpdate:modelValue","default-time"])])])]),n.value[s.id]&&n.value[s.id].length===0?(a(),d("div",fo,[t("div",yo,[e[50]||(e[50]=t("i",{class:"fas fa-chart-line text-gray-400 text-lg"},null,-1)),e[51]||(e[51]=t("p",{class:"text-sm text-gray-500"},"暂无模型使用数据",-1)),t("button",{onClick:c=>$t(s.id),class:"text-blue-500 hover:text-blue-700 text-sm ml-2 flex items-center gap-1 transition-colors",title:"重置筛选条件并刷新"},e[49]||(e[49]=[t("i",{class:"fas fa-sync-alt text-xs"},null,-1),t("span",{class:"text-xs"},"刷新",-1)]),8,bo)]),e[52]||(e[52]=t("p",{class:"text-xs text-gray-400"},"尝试调整时间范围或点击刷新重新加载数据",-1))])):n.value[s.id]&&n.value[s.id].length>0?(a(),d("div",vo,[(a(!0),d(T,null,P(n.value[s.id],c=>(a(),d("div",{key:c.model,class:"bg-gradient-to-br from-white to-gray-50 rounded-xl p-4 border border-gray-200 hover:border-indigo-300 hover:shadow-lg transition-all duration-200"},[t("div",wo,[t("div",$o,[t("span",Co,p(c.model),1),t("span",Ao,p(c.requests)+" 次请求",1)])]),t("div",ko,[t("div",Ko,[e[53]||(e[53]=t("span",{class:"text-gray-600 flex items-center"},[t("i",{class:"fas fa-coins text-yellow-500 mr-1 text-xs"}),f(" 总Token: ")],-1)),t("span",Lo,p(V(c.allTokens)),1)]),t("div",Do,[e[54]||(e[54]=t("span",{class:"text-gray-600 flex items-center"},[t("i",{class:"fas fa-dollar-sign text-green-500 mr-1 text-xs"}),f(" 费用: ")],-1)),t("span",Io,p(bt(c)),1)]),t("div",Mo,[t("div",Ro,[e[55]||(e[55]=t("span",{class:"flex items-center"},[t("i",{class:"fas fa-arrow-down text-green-500 mr-1"}),f(" 输入: ")],-1)),t("span",So,p(V(c.inputTokens)),1)]),t("div",ho,[e[56]||(e[56]=t("span",{class:"flex items-center"},[t("i",{class:"fas fa-arrow-up text-blue-500 mr-1"}),f(" 输出: ")],-1)),t("span",To,p(V(c.outputTokens)),1)]),c.cacheCreateTokens>0?(a(),d("div",Eo,[e[57]||(e[57]=t("span",{class:"flex items-center"},[t("i",{class:"fas fa-save mr-1"}),f(" 缓存创建: ")],-1)),t("span",Po,p(V(c.cacheCreateTokens)),1)])):A("",!0),c.cacheReadTokens>0?(a(),d("div",Vo,[e[58]||(e[58]=t("span",{class:"flex items-center"},[t("i",{class:"fas fa-download mr-1"}),f(" 缓存读取: ")],-1)),t("span",jo,p(V(c.cacheReadTokens)),1)])):A("",!0)])]),t("div",_o,[t("div",{class:"bg-gradient-to-r from-indigo-500 to-purple-600 h-2 rounded-full transition-all duration-500",style:Tt({width:ct(c.allTokens,n.value[s.id])+"%"})},null,4)]),t("div",Uo,[t("span",qo,p(ct(c.allTokens,n.value[s.id]))+"% ",1)])]))),128))])):A("",!0),n.value[s.id]&&n.value[s.id].length>0?(a(),d("div",Oo,[t("div",Fo,[e[61]||(e[61]=t("span",{class:"font-semibold text-gray-700 flex items-center"},[t("i",{class:"fas fa-calculator text-indigo-500 mr-2"}),f(" 总计统计 ")],-1)),t("div",Wo,[t("span",zo,[e[59]||(e[59]=f(" 总请求: ",-1)),t("span",Yo,p(n.value[s.id].reduce((c,R)=>c+R.requests,0)),1)]),t("span",No,[e[60]||(e[60]=f(" 总Token: ",-1)),t("span",Ho,p(V(n.value[s.id].reduce((c,R)=>c+R.allTokens,0))),1)])])])])):A("",!0)])])])):A("",!0)],64))),128))])])]))]),k.value?(a(),W(Ce,{key:0,accounts:$.value,onClose:e[8]||(e[8]=s=>k.value=!1),onSuccess:Kt},null,8,["accounts"])):A("",!0),o.value?(a(),W(ds,{key:1,apiKey:l.value,accounts:$.value,onClose:e[9]||(e[9]=s=>o.value=!1),onSuccess:Lt},null,8,["apiKey","accounts"])):A("",!0),m.value?(a(),W(Ls,{key:2,apiKey:u.value,onClose:e[10]||(e[10]=s=>m.value=!1),onSuccess:Dt},null,8,["apiKey"])):A("",!0),y.value?(a(),W(zs,{key:3,apiKey:j.value,onClose:e[11]||(e[11]=s=>y.value=!1)},null,8,["apiKey"])):A("",!0)])}}},tn=J(Bo,[["__scopeId","data-v-3c03d38e"]]);export{tn as default};
diff --git a/web/admin-spa/dist/assets/ApiKeysView-ZopVw-Bq.js b/web/admin-spa/dist/assets/ApiKeysView-ZopVw-Bq.js
new file mode 100644
index 00000000..f7d38f5b
--- /dev/null
+++ b/web/admin-spa/dist/assets/ApiKeysView-ZopVw-Bq.js
@@ -0,0 +1,4 @@
+import{E as Rt}from"./element-plus-B8Fs_0jW.js";import{aR as St,r as k,_ as at,q as rt,c as st,I as W,y as a,z as t,Y,K as b,aq as S,x as d,L as A,Q as T,ac as P,O as f,P as p,aa as et,aX as z,an as B,al as G,a5 as lt,C as _,R as ht,B as Tt}from"./vue-vendor-CKToUHZx.js";import{s as I}from"./toast-BvwA7Mwb.js";import{a as q,_ as J,u as dt}from"./index-CJmHAjMf.js";import"./vendor-BDiMbLwQ.js";const ut=St("clients",{state:()=>({supportedClients:[],loading:!1,error:null}),actions:{async loadSupportedClients(){if(this.supportedClients.length>0)return this.supportedClients;this.loading=!0,this.error=null;try{const K=await q.get("/admin/supported-clients");return K.success?this.supportedClients=K.data||[]:(this.error=K.message||"加载支持的客户端失败",console.error("Failed to load supported clients:",this.error)),this.supportedClients}catch(K){return this.error=K.message||"加载支持的客户端失败",console.error("Error loading supported clients:",K),[]}finally{this.loading=!1}}}}),Et={class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},Pt={class:"modal-content w-full max-w-md p-8 mx-auto max-h-[90vh] flex flex-col"},Vt={class:"flex items-center justify-between mb-6"},jt={class:"space-y-3"},_t={key:0,class:"flex flex-wrap gap-2"},Ut=["onClick"],qt={class:"flex gap-2"},Ot=["onKeypress"],Ft={class:"bg-blue-50 border border-blue-200 rounded-lg p-4 space-y-4"},Wt={class:"space-y-3"},zt={class:"flex gap-2"},Yt={key:0,class:"mt-3"},Nt=["min"],Ht={key:1,class:"text-xs text-gray-500 mt-2"},Bt={class:"flex gap-4"},Gt={class:"flex items-center cursor-pointer"},Xt={class:"flex items-center cursor-pointer"},Qt={class:"flex items-center cursor-pointer"},Jt={class:"grid grid-cols-1 gap-3"},Zt=["disabled"],te=["value"],ee=["disabled"],se=["value"],le={class:"flex items-center mb-3"},oe={key:0,class:"space-y-3"},ne={class:"flex flex-wrap gap-2 mb-3 min-h-[32px] p-2 bg-gray-50 rounded-lg border border-gray-200"},ie=["onClick"],ae={key:0,class:"text-gray-400 text-sm"},re={class:"flex gap-2"},de=["onKeydown"],ue={class:"flex items-center mb-3"},pe={key:0,class:"space-y-3"},me={class:"space-y-2"},ce=["id","value"],xe=["for"],ge={class:"text-sm font-medium text-gray-700"},fe={class:"text-xs text-gray-500 block"},ye={class:"flex gap-3 pt-4"},be=["disabled"],ve={key:0,class:"loading-spinner mr-2"},we={key:1,class:"fas fa-plus mr-2"},$e={__name:"CreateApiKeyModal",props:{accounts:{type:Object,default:()=>({claude:[],gemini:[]})}},emits:["close","success"],setup(K,{emit:O}){const C=O;dt();const h=ut(),D=k(!1),x=k(""),M=k([]),i=at({name:"",description:"",tokenLimit:"",rateLimitWindow:"",rateLimitRequests:"",concurrencyLimit:"",dailyCostLimit:"",expireDuration:"",customExpireDate:"",expiresAt:null,permissions:"all",claudeAccountId:"",geminiAccountId:"",enableModelRestriction:!1,restrictedModels:[],modelInput:"",enableClientRestriction:!1,allowedClients:[],tags:[]});rt(async()=>{M.value=await h.loadSupportedClients()});const n=st(()=>{const y=new Date;return y.setMinutes(y.getMinutes()+1),y.toISOString().slice(0,16)}),v=()=>{if(!i.expireDuration){i.expiresAt=null;return}if(i.expireDuration==="custom")return;const y=new Date,u=i.expireDuration.match(/(\d+)([dhmy])/);if(u){const[,j,X]=u,N=parseInt(j);switch(X){case"d":y.setDate(y.getDate()+N);break;case"h":y.setHours(y.getHours()+N);break;case"m":y.setMonth(y.getMonth()+N);break;case"y":y.setFullYear(y.getFullYear()+N);break}i.expiresAt=y.toISOString()}},U=()=>{i.customExpireDate&&(i.expiresAt=new Date(i.customExpireDate).toISOString())},$=y=>new Date(y).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),w=()=>{i.modelInput&&!i.restrictedModels.includes(i.modelInput)&&(i.restrictedModels.push(i.modelInput),i.modelInput="")},E=y=>{i.restrictedModels.splice(y,1)},L=()=>{if(x.value&&x.value.trim()){const y=x.value.trim();i.tags.includes(y)||i.tags.push(y),x.value=""}},o=y=>{i.tags.splice(y,1)},m=async()=>{D.value=!0;try{const y={name:i.name,description:i.description||void 0,tokenLimit:i.tokenLimit!==""&&i.tokenLimit!==null?parseInt(i.tokenLimit):null,rateLimitWindow:i.rateLimitWindow!==""&&i.rateLimitWindow!==null?parseInt(i.rateLimitWindow):null,rateLimitRequests:i.rateLimitRequests!==""&&i.rateLimitRequests!==null?parseInt(i.rateLimitRequests):null,concurrencyLimit:i.concurrencyLimit!==""&&i.concurrencyLimit!==null?parseInt(i.concurrencyLimit):0,dailyCostLimit:i.dailyCostLimit!==""&&i.dailyCostLimit!==null?parseFloat(i.dailyCostLimit):0,expiresAt:i.expiresAt||void 0,permissions:i.permissions,claudeAccountId:i.claudeAccountId||void 0,geminiAccountId:i.geminiAccountId||void 0,tags:i.tags.length>0?i.tags:void 0};y.enableModelRestriction=i.enableModelRestriction,y.restrictedModels=i.restrictedModels,y.enableClientRestriction=i.enableClientRestriction,y.allowedClients=i.allowedClients;const l=await q.post("/admin/api-keys",y);l.success?(I("API Key 创建成功","success"),C("success",l.data),C("close")):I(l.message||"创建失败","error")}catch{I("创建失败","error")}finally{D.value=!1}};return(y,l)=>(a(),W(lt,{to:"body"},[t("div",Et,[t("div",Pt,[t("div",Vt,[l[26]||(l[26]=t("div",{class:"flex items-center gap-3"},[t("div",{class:"w-10 h-10 bg-gradient-to-br from-blue-500 to-blue-600 rounded-xl flex items-center justify-center"},[t("i",{class:"fas fa-key text-white"})]),t("h3",{class:"text-xl font-bold text-gray-900"},"创建新的 API Key")],-1)),t("button",{onClick:l[0]||(l[0]=u=>y.$emit("close")),class:"text-gray-400 hover:text-gray-600 transition-colors"},l[25]||(l[25]=[t("i",{class:"fas fa-times text-xl"},null,-1)]))]),t("form",{onSubmit:Y(m,["prevent"]),class:"space-y-6 modal-scroll-content custom-scrollbar flex-1"},[t("div",null,[l[27]||(l[27]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"名称",-1)),b(t("input",{"onUpdate:modelValue":l[1]||(l[1]=u=>i.name=u),type:"text",required:"",class:"form-input w-full",placeholder:"为您的 API Key 取一个名称"},null,512),[[S,i.name]])]),t("div",null,[l[31]||(l[31]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"标签",-1)),t("div",jt,[i.tags.length>0?(a(),d("div",_t,[(a(!0),d(T,null,P(i.tags,(u,j)=>(a(),d("span",{key:j,class:"inline-flex items-center gap-1 px-3 py-1 bg-blue-100 text-blue-800 text-sm rounded-full"},[f(p(u)+" ",1),t("button",{type:"button",onClick:X=>o(j),class:"ml-1 hover:text-blue-900"},l[28]||(l[28]=[t("i",{class:"fas fa-times text-xs"},null,-1)]),8,Ut)]))),128))])):A("",!0),t("div",qt,[b(t("input",{"onUpdate:modelValue":l[2]||(l[2]=u=>x.value=u),type:"text",class:"form-input flex-1",placeholder:"输入新标签名称",onKeypress:et(Y(L,["prevent"]),["enter"])},null,40,Ot),[[S,x.value]]),t("button",{type:"button",onClick:L,class:"px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors"},l[29]||(l[29]=[t("i",{class:"fas fa-plus"},null,-1)]))]),l[30]||(l[30]=t("p",{class:"text-xs text-gray-500"},"用于标记不同团队或用途,方便筛选管理",-1))])]),t("div",Ft,[l[38]||(l[38]=t("div",{class:"flex items-start gap-3 mb-3"},[t("div",{class:"w-8 h-8 bg-blue-500 rounded-lg flex items-center justify-center flex-shrink-0"},[t("i",{class:"fas fa-tachometer-alt text-white text-sm"})]),t("div",{class:"flex-1"},[t("h4",{class:"font-semibold text-gray-800 mb-1"},"速率限制设置 (可选)"),t("p",{class:"text-sm text-gray-600"},"控制 API Key 的使用频率和资源消耗")])],-1)),t("div",null,[l[32]||(l[32]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"时间窗口 (分钟)",-1)),b(t("input",{"onUpdate:modelValue":l[3]||(l[3]=u=>i.rateLimitWindow=u),type:"number",min:"1",placeholder:"留空表示无限制",class:"form-input w-full"},null,512),[[S,i.rateLimitWindow]]),l[33]||(l[33]=t("p",{class:"text-xs text-gray-500 mt-2"},"设置一个时间段(以分钟为单位),用于计算速率限制",-1))]),t("div",null,[l[34]||(l[34]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"时间窗口内的请求次数限制",-1)),b(t("input",{"onUpdate:modelValue":l[4]||(l[4]=u=>i.rateLimitRequests=u),type:"number",min:"1",placeholder:"留空表示无限制",class:"form-input w-full"},null,512),[[S,i.rateLimitRequests]]),l[35]||(l[35]=t("p",{class:"text-xs text-gray-500 mt-2"},"在时间窗口内允许的最大请求次数(需要先设置时间窗口)",-1))]),t("div",null,[l[36]||(l[36]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"时间窗口内的 Token 使用量限制",-1)),b(t("input",{"onUpdate:modelValue":l[5]||(l[5]=u=>i.tokenLimit=u),type:"number",placeholder:"留空表示无限制",class:"form-input w-full"},null,512),[[S,i.tokenLimit]]),l[37]||(l[37]=t("p",{class:"text-xs text-gray-500 mt-2"},"在时间窗口内允许消耗的最大 Token 数量(需要先设置时间窗口)",-1))]),l[39]||(l[39]=t("div",{class:"bg-blue-100 rounded-lg p-3 mt-3"},[t("h5",{class:"text-sm font-semibold text-blue-800 mb-2"},"💡 使用示例"),t("div",{class:"text-xs text-blue-700 space-y-1"},[t("p",null,[t("strong",null,"示例1:"),f(" 时间窗口=60,请求次数限制=1000")]),t("p",{class:"ml-4"},"→ 每60分钟内最多1000次请求"),t("p",{class:"mt-2"},[t("strong",null,"示例2:"),f(" 时间窗口=1,Token限制=10000")]),t("p",{class:"ml-4"},"→ 每分钟最多消耗10,000个Token"),t("p",{class:"mt-2"},[t("strong",null,"示例3:"),f(" 时间窗口=30,请求次数限制=50,Token限制=100000")]),t("p",{class:"ml-4"},"→ 每30分钟内最多50次请求且总Token不超过100,000")])],-1))]),t("div",null,[l[41]||(l[41]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"每日费用限制 (美元)",-1)),t("div",Wt,[t("div",zt,[t("button",{type:"button",onClick:l[6]||(l[6]=u=>i.dailyCostLimit="50"),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"$50"),t("button",{type:"button",onClick:l[7]||(l[7]=u=>i.dailyCostLimit="100"),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"$100"),t("button",{type:"button",onClick:l[8]||(l[8]=u=>i.dailyCostLimit="200"),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"$200"),t("button",{type:"button",onClick:l[9]||(l[9]=u=>i.dailyCostLimit=""),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"自定义")]),b(t("input",{"onUpdate:modelValue":l[10]||(l[10]=u=>i.dailyCostLimit=u),type:"number",min:"0",step:"0.01",placeholder:"0 表示无限制",class:"form-input w-full"},null,512),[[S,i.dailyCostLimit]]),l[40]||(l[40]=t("p",{class:"text-xs text-gray-500"},"设置此 API Key 每日的费用限制,超过限制将拒绝请求,0 或留空表示无限制",-1))])]),t("div",null,[l[42]||(l[42]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"并发限制 (可选)",-1)),b(t("input",{"onUpdate:modelValue":l[11]||(l[11]=u=>i.concurrencyLimit=u),type:"number",min:"0",placeholder:"0 表示无限制",class:"form-input w-full"},null,512),[[S,i.concurrencyLimit]]),l[43]||(l[43]=t("p",{class:"text-xs text-gray-500 mt-2"},"设置此 API Key 可同时处理的最大请求数,0 或留空表示无限制",-1))]),t("div",null,[l[44]||(l[44]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"备注 (可选)",-1)),b(t("textarea",{"onUpdate:modelValue":l[12]||(l[12]=u=>i.description=u),rows:"3",class:"form-input w-full resize-none",placeholder:"描述此 API Key 的用途..."},null,512),[[S,i.description]])]),t("div",null,[l[46]||(l[46]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"有效期限",-1)),b(t("select",{"onUpdate:modelValue":l[13]||(l[13]=u=>i.expireDuration=u),onChange:v,class:"form-input w-full"},l[45]||(l[45]=[t("option",{value:""},"永不过期",-1),t("option",{value:"1d"},"1 天",-1),t("option",{value:"7d"},"7 天",-1),t("option",{value:"30d"},"30 天",-1),t("option",{value:"90d"},"90 天",-1),t("option",{value:"180d"},"180 天",-1),t("option",{value:"365d"},"365 天",-1),t("option",{value:"custom"},"自定义日期",-1)]),544),[[z,i.expireDuration]]),i.expireDuration==="custom"?(a(),d("div",Yt,[b(t("input",{"onUpdate:modelValue":l[14]||(l[14]=u=>i.customExpireDate=u),type:"datetime-local",class:"form-input w-full",min:n.value,onChange:U},null,40,Nt),[[S,i.customExpireDate]])])):A("",!0),i.expiresAt?(a(),d("p",Ht," 将于 "+p($(i.expiresAt))+" 过期 ",1)):A("",!0)]),t("div",null,[l[50]||(l[50]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"服务权限",-1)),t("div",Bt,[t("label",Gt,[b(t("input",{type:"radio","onUpdate:modelValue":l[15]||(l[15]=u=>i.permissions=u),value:"all",class:"mr-2"},null,512),[[B,i.permissions]]),l[47]||(l[47]=t("span",{class:"text-sm text-gray-700"},"全部服务",-1))]),t("label",Xt,[b(t("input",{type:"radio","onUpdate:modelValue":l[16]||(l[16]=u=>i.permissions=u),value:"claude",class:"mr-2"},null,512),[[B,i.permissions]]),l[48]||(l[48]=t("span",{class:"text-sm text-gray-700"},"仅 Claude",-1))]),t("label",Qt,[b(t("input",{type:"radio","onUpdate:modelValue":l[17]||(l[17]=u=>i.permissions=u),value:"gemini",class:"mr-2"},null,512),[[B,i.permissions]]),l[49]||(l[49]=t("span",{class:"text-sm text-gray-700"},"仅 Gemini",-1))])]),l[51]||(l[51]=t("p",{class:"text-xs text-gray-500 mt-2"},"控制此 API Key 可以访问哪些服务",-1))]),t("div",null,[l[56]||(l[56]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"专属账号绑定 (可选)",-1)),t("div",Jt,[t("div",null,[l[53]||(l[53]=t("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Claude 专属账号",-1)),b(t("select",{"onUpdate:modelValue":l[18]||(l[18]=u=>i.claudeAccountId=u),class:"form-input w-full",disabled:i.permissions==="gemini"},[l[52]||(l[52]=t("option",{value:""},"使用共享账号池",-1)),(a(!0),d(T,null,P(K.accounts.claude.filter(u=>u.isDedicated),u=>(a(),d("option",{key:u.id,value:u.id},p(u.name)+" ("+p(u.status==="active"?"正常":"异常")+") ",9,te))),128))],8,Zt),[[z,i.claudeAccountId]])]),t("div",null,[l[55]||(l[55]=t("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Gemini 专属账号",-1)),b(t("select",{"onUpdate:modelValue":l[19]||(l[19]=u=>i.geminiAccountId=u),class:"form-input w-full",disabled:i.permissions==="claude"},[l[54]||(l[54]=t("option",{value:""},"使用共享账号池",-1)),(a(!0),d(T,null,P(K.accounts.gemini.filter(u=>u.isDedicated),u=>(a(),d("option",{key:u.id,value:u.id},p(u.name)+" ("+p(u.status==="active"?"正常":"异常")+") ",9,se))),128))],8,ee),[[z,i.geminiAccountId]])])]),l[57]||(l[57]=t("p",{class:"text-xs text-gray-500 mt-2"},"选择专属账号后,此API Key将只使用该账号,不选择则使用共享账号池",-1))]),t("div",null,[t("div",le,[b(t("input",{type:"checkbox","onUpdate:modelValue":l[20]||(l[20]=u=>i.enableModelRestriction=u),id:"enableModelRestriction",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"},null,512),[[G,i.enableModelRestriction]]),l[58]||(l[58]=t("label",{for:"enableModelRestriction",class:"ml-2 text-sm font-semibold text-gray-700 cursor-pointer"}," 启用模型限制 ",-1))]),i.enableModelRestriction?(a(),d("div",oe,[t("div",null,[l[61]||(l[61]=t("label",{class:"block text-sm font-medium text-gray-600 mb-2"},"限制的模型列表",-1)),t("div",ne,[(a(!0),d(T,null,P(i.restrictedModels,(u,j)=>(a(),d("span",{key:j,class:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-red-100 text-red-800"},[f(p(u)+" ",1),t("button",{type:"button",onClick:X=>E(j),class:"ml-2 text-red-600 hover:text-red-800"},l[59]||(l[59]=[t("i",{class:"fas fa-times text-xs"},null,-1)]),8,ie)]))),128)),i.restrictedModels.length===0?(a(),d("span",ae," 暂无限制的模型 ")):A("",!0)]),t("div",re,[b(t("input",{"onUpdate:modelValue":l[21]||(l[21]=u=>i.modelInput=u),onKeydown:et(Y(w,["prevent"]),["enter"]),type:"text",placeholder:"输入模型名称,按回车添加",class:"form-input flex-1"},null,40,de),[[S,i.modelInput]]),t("button",{type:"button",onClick:w,class:"px-4 py-2 bg-red-500 text-white rounded-lg hover:bg-red-600 transition-colors"},l[60]||(l[60]=[t("i",{class:"fas fa-plus"},null,-1)]))]),l[62]||(l[62]=t("p",{class:"text-xs text-gray-500 mt-2"},"设置此API Key无法访问的模型,例如:claude-opus-4-20250514",-1))])])):A("",!0)]),t("div",null,[t("div",ue,[b(t("input",{type:"checkbox","onUpdate:modelValue":l[22]||(l[22]=u=>i.enableClientRestriction=u),id:"enableClientRestriction",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"},null,512),[[G,i.enableClientRestriction]]),l[63]||(l[63]=t("label",{for:"enableClientRestriction",class:"ml-2 text-sm font-semibold text-gray-700 cursor-pointer"}," 启用客户端限制 ",-1))]),i.enableClientRestriction?(a(),d("div",pe,[t("div",null,[l[64]||(l[64]=t("label",{class:"block text-sm font-medium text-gray-600 mb-2"},"允许的客户端",-1)),l[65]||(l[65]=t("p",{class:"text-xs text-gray-500 mb-3"},"勾选允许使用此API Key的客户端",-1)),t("div",me,[(a(!0),d(T,null,P(M.value,u=>(a(),d("div",{key:u.id,class:"flex items-start"},[b(t("input",{type:"checkbox",id:`client_${u.id}`,value:u.id,"onUpdate:modelValue":l[23]||(l[23]=j=>i.allowedClients=j),class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 mt-0.5"},null,8,ce),[[G,i.allowedClients]]),t("label",{for:`client_${u.id}`,class:"ml-2 flex-1 cursor-pointer"},[t("span",ge,p(u.name),1),t("span",fe,p(u.description),1)],8,xe)]))),128))])])])):A("",!0)]),t("div",ye,[t("button",{type:"button",onClick:l[24]||(l[24]=u=>y.$emit("close")),class:"flex-1 px-6 py-3 bg-gray-100 text-gray-700 rounded-xl font-semibold hover:bg-gray-200 transition-colors"}," 取消 "),t("button",{type:"submit",disabled:D.value||!i.name,class:"btn btn-primary flex-1 py-3 px-6 font-semibold"},[D.value?(a(),d("div",ve)):(a(),d("i",we)),f(" "+p(D.value?"创建中...":"创建"),1)],8,be)])],32)])])]))}},Ce=J($e,[["__scopeId","data-v-d14515d2"]]),Ae={class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},ke={class:"modal-content w-full max-w-md p-8 mx-auto max-h-[90vh] flex flex-col"},Ke={class:"flex items-center justify-between mb-6"},Le=["value"],De={class:"space-y-3"},Ie={key:0,class:"flex flex-wrap gap-2"},Me=["onClick"],Re={class:"flex gap-2"},Se=["onKeypress"],he={class:"bg-blue-50 border border-blue-200 rounded-lg p-4 space-y-4"},Te={class:"space-y-3"},Ee={class:"flex gap-2"},Pe={class:"flex gap-4"},Ve={class:"flex items-center cursor-pointer"},je={class:"flex items-center cursor-pointer"},_e={class:"flex items-center cursor-pointer"},Ue={class:"grid grid-cols-1 gap-3"},qe=["disabled"],Oe=["value"],Fe=["disabled"],We=["value"],ze={class:"flex items-center mb-3"},Ye={key:0,class:"space-y-3"},Ne={class:"flex flex-wrap gap-2 mb-3 min-h-[32px] p-2 bg-gray-50 rounded-lg border border-gray-200"},He=["onClick"],Be={key:0,class:"text-gray-400 text-sm"},Ge={class:"flex gap-2"},Xe=["onKeydown"],Qe={class:"flex items-center mb-3"},Je={key:0,class:"space-y-3"},Ze={class:"space-y-2"},ts=["id","value"],es=["for"],ss={class:"text-sm font-medium text-gray-700"},ls={class:"text-xs text-gray-500 block"},os={class:"flex gap-3 pt-4"},ns=["disabled"],is={key:0,class:"loading-spinner mr-2"},as={key:1,class:"fas fa-save mr-2"},rs={__name:"EditApiKeyModal",props:{apiKey:{type:Object,required:!0},accounts:{type:Object,default:()=>({claude:[],gemini:[]})}},emits:["close","success"],setup(K,{emit:O}){const C=K,h=O;dt();const D=ut(),x=k(!1),M=k([]),i=k(""),n=at({name:"",tokenLimit:"",rateLimitWindow:"",rateLimitRequests:"",concurrencyLimit:"",dailyCostLimit:"",permissions:"all",claudeAccountId:"",geminiAccountId:"",enableModelRestriction:!1,restrictedModels:[],modelInput:"",enableClientRestriction:!1,allowedClients:[],tags:[]}),v=()=>{n.modelInput&&!n.restrictedModels.includes(n.modelInput)&&(n.restrictedModels.push(n.modelInput),n.modelInput="")},U=L=>{n.restrictedModels.splice(L,1)},$=()=>{if(i.value&&i.value.trim()){const L=i.value.trim();n.tags.includes(L)||n.tags.push(L),i.value=""}},w=L=>{n.tags.splice(L,1)},E=async()=>{x.value=!0;try{const L={tokenLimit:n.tokenLimit!==""&&n.tokenLimit!==null?parseInt(n.tokenLimit):0,rateLimitWindow:n.rateLimitWindow!==""&&n.rateLimitWindow!==null?parseInt(n.rateLimitWindow):0,rateLimitRequests:n.rateLimitRequests!==""&&n.rateLimitRequests!==null?parseInt(n.rateLimitRequests):0,concurrencyLimit:n.concurrencyLimit!==""&&n.concurrencyLimit!==null?parseInt(n.concurrencyLimit):0,dailyCostLimit:n.dailyCostLimit!==""&&n.dailyCostLimit!==null?parseFloat(n.dailyCostLimit):0,permissions:n.permissions,claudeAccountId:n.claudeAccountId||null,geminiAccountId:n.geminiAccountId||null,tags:n.tags};L.enableModelRestriction=n.enableModelRestriction,L.restrictedModels=n.restrictedModels,L.enableClientRestriction=n.enableClientRestriction,L.allowedClients=n.allowedClients;const o=await q.put(`/admin/api-keys/${C.apiKey.id}`,L);o.success?(h("success"),h("close")):I(o.message||"更新失败","error")}catch{I("更新失败","error")}finally{x.value=!1}};return rt(async()=>{M.value=await D.loadSupportedClients(),n.name=C.apiKey.name,n.tokenLimit=C.apiKey.tokenLimit||"",n.rateLimitWindow=C.apiKey.rateLimitWindow||"",n.rateLimitRequests=C.apiKey.rateLimitRequests||"",n.concurrencyLimit=C.apiKey.concurrencyLimit||"",n.dailyCostLimit=C.apiKey.dailyCostLimit||"",n.permissions=C.apiKey.permissions||"all",n.claudeAccountId=C.apiKey.claudeAccountId||"",n.geminiAccountId=C.apiKey.geminiAccountId||"",n.restrictedModels=C.apiKey.restrictedModels||[],n.allowedClients=C.apiKey.allowedClients||[],n.tags=C.apiKey.tags||[],n.enableModelRestriction=n.restrictedModels.length>0,n.enableClientRestriction=n.allowedClients.length>0}),(L,o)=>(a(),W(lt,{to:"body"},[t("div",Ae,[t("div",ke,[t("div",Ke,[o[22]||(o[22]=t("div",{class:"flex items-center gap-3"},[t("div",{class:"w-10 h-10 bg-gradient-to-br from-blue-500 to-blue-600 rounded-xl flex items-center justify-center"},[t("i",{class:"fas fa-edit text-white"})]),t("h3",{class:"text-xl font-bold text-gray-900"},"编辑 API Key")],-1)),t("button",{onClick:o[0]||(o[0]=m=>L.$emit("close")),class:"text-gray-400 hover:text-gray-600 transition-colors"},o[21]||(o[21]=[t("i",{class:"fas fa-times text-xl"},null,-1)]))]),t("form",{onSubmit:Y(E,["prevent"]),class:"space-y-6 modal-scroll-content custom-scrollbar flex-1"},[t("div",null,[o[23]||(o[23]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"名称",-1)),t("input",{value:n.name,type:"text",disabled:"",class:"form-input w-full bg-gray-100 cursor-not-allowed"},null,8,Le),o[24]||(o[24]=t("p",{class:"text-xs text-gray-500 mt-2"},"名称不可修改",-1))]),t("div",null,[o[28]||(o[28]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"标签",-1)),t("div",De,[n.tags.length>0?(a(),d("div",Ie,[(a(!0),d(T,null,P(n.tags,(m,y)=>(a(),d("span",{key:y,class:"inline-flex items-center gap-1 px-3 py-1 bg-blue-100 text-blue-800 text-sm rounded-full"},[f(p(m)+" ",1),t("button",{type:"button",onClick:l=>w(y),class:"ml-1 hover:text-blue-900"},o[25]||(o[25]=[t("i",{class:"fas fa-times text-xs"},null,-1)]),8,Me)]))),128))])):A("",!0),t("div",Re,[b(t("input",{"onUpdate:modelValue":o[1]||(o[1]=m=>i.value=m),type:"text",class:"form-input flex-1",placeholder:"输入新标签名称",onKeypress:et(Y($,["prevent"]),["enter"])},null,40,Se),[[S,i.value]]),t("button",{type:"button",onClick:$,class:"px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors"},o[26]||(o[26]=[t("i",{class:"fas fa-plus"},null,-1)]))]),o[27]||(o[27]=t("p",{class:"text-xs text-gray-500"},"用于标记不同团队或用途,方便筛选管理",-1))])]),t("div",he,[o[35]||(o[35]=t("div",{class:"flex items-start gap-3 mb-3"},[t("div",{class:"w-8 h-8 bg-blue-500 rounded-lg flex items-center justify-center flex-shrink-0"},[t("i",{class:"fas fa-tachometer-alt text-white text-sm"})]),t("div",{class:"flex-1"},[t("h4",{class:"font-semibold text-gray-800 mb-1"},"速率限制设置"),t("p",{class:"text-sm text-gray-600"},"控制 API Key 的使用频率和资源消耗")])],-1)),t("div",null,[o[29]||(o[29]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"时间窗口 (分钟)",-1)),b(t("input",{"onUpdate:modelValue":o[2]||(o[2]=m=>n.rateLimitWindow=m),type:"number",min:"1",placeholder:"留空表示无限制",class:"form-input w-full"},null,512),[[S,n.rateLimitWindow]]),o[30]||(o[30]=t("p",{class:"text-xs text-gray-500 mt-2"},"设置一个时间段(以分钟为单位),用于计算速率限制",-1))]),t("div",null,[o[31]||(o[31]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"时间窗口内的请求次数限制",-1)),b(t("input",{"onUpdate:modelValue":o[3]||(o[3]=m=>n.rateLimitRequests=m),type:"number",min:"1",placeholder:"留空表示无限制",class:"form-input w-full"},null,512),[[S,n.rateLimitRequests]]),o[32]||(o[32]=t("p",{class:"text-xs text-gray-500 mt-2"},"在时间窗口内允许的最大请求次数(需要先设置时间窗口)",-1))]),t("div",null,[o[33]||(o[33]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"时间窗口内的 Token 使用量限制",-1)),b(t("input",{"onUpdate:modelValue":o[4]||(o[4]=m=>n.tokenLimit=m),type:"number",min:"0",placeholder:"0 表示无限制",class:"form-input w-full"},null,512),[[S,n.tokenLimit]]),o[34]||(o[34]=t("p",{class:"text-xs text-gray-500 mt-2"},"在时间窗口内允许消耗的最大 Token 数量(需要先设置时间窗口),0 或留空表示无限制",-1))]),o[36]||(o[36]=t("div",{class:"bg-blue-100 rounded-lg p-3 mt-3"},[t("h5",{class:"text-sm font-semibold text-blue-800 mb-2"},"💡 使用示例"),t("div",{class:"text-xs text-blue-700 space-y-1"},[t("p",null,[t("strong",null,"示例1:"),f(" 时间窗口=60,请求次数限制=100")]),t("p",{class:"ml-4"},"→ 每60分钟内最多允许100次请求"),t("p",{class:"mt-2"},[t("strong",null,"示例2:"),f(" 时间窗口=10,Token限制=50000")]),t("p",{class:"ml-4"},"→ 每10分钟内最多消耗50,000个Token"),t("p",{class:"mt-2"},[t("strong",null,"示例3:"),f(" 时间窗口=30,请求次数限制=50,Token限制=100000")]),t("p",{class:"ml-4"},"→ 每30分钟内最多50次请求且总Token不超过100,000")])],-1))]),t("div",null,[o[38]||(o[38]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"每日费用限制 (美元)",-1)),t("div",Te,[t("div",Ee,[t("button",{type:"button",onClick:o[5]||(o[5]=m=>n.dailyCostLimit="50"),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"$50"),t("button",{type:"button",onClick:o[6]||(o[6]=m=>n.dailyCostLimit="100"),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"$100"),t("button",{type:"button",onClick:o[7]||(o[7]=m=>n.dailyCostLimit="200"),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"$200"),t("button",{type:"button",onClick:o[8]||(o[8]=m=>n.dailyCostLimit=""),class:"px-3 py-1 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm font-medium"},"自定义")]),b(t("input",{"onUpdate:modelValue":o[9]||(o[9]=m=>n.dailyCostLimit=m),type:"number",min:"0",step:"0.01",placeholder:"0 表示无限制",class:"form-input w-full"},null,512),[[S,n.dailyCostLimit]]),o[37]||(o[37]=t("p",{class:"text-xs text-gray-500"},"设置此 API Key 每日的费用限制,超过限制将拒绝请求,0 或留空表示无限制",-1))])]),t("div",null,[o[39]||(o[39]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"并发限制",-1)),b(t("input",{"onUpdate:modelValue":o[10]||(o[10]=m=>n.concurrencyLimit=m),type:"number",min:"0",placeholder:"0 表示无限制",class:"form-input w-full"},null,512),[[S,n.concurrencyLimit]]),o[40]||(o[40]=t("p",{class:"text-xs text-gray-500 mt-2"},"设置此 API Key 可同时处理的最大请求数",-1))]),t("div",null,[o[44]||(o[44]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"服务权限",-1)),t("div",Pe,[t("label",Ve,[b(t("input",{type:"radio","onUpdate:modelValue":o[11]||(o[11]=m=>n.permissions=m),value:"all",class:"mr-2"},null,512),[[B,n.permissions]]),o[41]||(o[41]=t("span",{class:"text-sm text-gray-700"},"全部服务",-1))]),t("label",je,[b(t("input",{type:"radio","onUpdate:modelValue":o[12]||(o[12]=m=>n.permissions=m),value:"claude",class:"mr-2"},null,512),[[B,n.permissions]]),o[42]||(o[42]=t("span",{class:"text-sm text-gray-700"},"仅 Claude",-1))]),t("label",_e,[b(t("input",{type:"radio","onUpdate:modelValue":o[13]||(o[13]=m=>n.permissions=m),value:"gemini",class:"mr-2"},null,512),[[B,n.permissions]]),o[43]||(o[43]=t("span",{class:"text-sm text-gray-700"},"仅 Gemini",-1))])]),o[45]||(o[45]=t("p",{class:"text-xs text-gray-500 mt-2"},"控制此 API Key 可以访问哪些服务",-1))]),t("div",null,[o[50]||(o[50]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"专属账号绑定",-1)),t("div",Ue,[t("div",null,[o[47]||(o[47]=t("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Claude 专属账号",-1)),b(t("select",{"onUpdate:modelValue":o[14]||(o[14]=m=>n.claudeAccountId=m),class:"form-input w-full",disabled:n.permissions==="gemini"},[o[46]||(o[46]=t("option",{value:""},"使用共享账号池",-1)),(a(!0),d(T,null,P(K.accounts.claude,m=>(a(),d("option",{key:m.id,value:m.id},p(m.name)+" ("+p(m.status==="active"?"正常":"异常")+") ",9,Oe))),128))],8,qe),[[z,n.claudeAccountId]])]),t("div",null,[o[49]||(o[49]=t("label",{class:"block text-sm font-medium text-gray-600 mb-1"},"Gemini 专属账号",-1)),b(t("select",{"onUpdate:modelValue":o[15]||(o[15]=m=>n.geminiAccountId=m),class:"form-input w-full",disabled:n.permissions==="claude"},[o[48]||(o[48]=t("option",{value:""},"使用共享账号池",-1)),(a(!0),d(T,null,P(K.accounts.gemini,m=>(a(),d("option",{key:m.id,value:m.id},p(m.name)+" ("+p(m.status==="active"?"正常":"异常")+") ",9,We))),128))],8,Fe),[[z,n.geminiAccountId]])])]),o[51]||(o[51]=t("p",{class:"text-xs text-gray-500 mt-2"},"修改绑定账号将影响此API Key的请求路由",-1))]),t("div",null,[t("div",ze,[b(t("input",{type:"checkbox","onUpdate:modelValue":o[16]||(o[16]=m=>n.enableModelRestriction=m),id:"editEnableModelRestriction",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"},null,512),[[G,n.enableModelRestriction]]),o[52]||(o[52]=t("label",{for:"editEnableModelRestriction",class:"ml-2 text-sm font-semibold text-gray-700 cursor-pointer"}," 启用模型限制 ",-1))]),n.enableModelRestriction?(a(),d("div",Ye,[t("div",null,[o[55]||(o[55]=t("label",{class:"block text-sm font-medium text-gray-600 mb-2"},"限制的模型列表",-1)),t("div",Ne,[(a(!0),d(T,null,P(n.restrictedModels,(m,y)=>(a(),d("span",{key:y,class:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-red-100 text-red-800"},[f(p(m)+" ",1),t("button",{type:"button",onClick:l=>U(y),class:"ml-2 text-red-600 hover:text-red-800"},o[53]||(o[53]=[t("i",{class:"fas fa-times text-xs"},null,-1)]),8,He)]))),128)),n.restrictedModels.length===0?(a(),d("span",Be," 暂无限制的模型 ")):A("",!0)]),t("div",Ge,[b(t("input",{"onUpdate:modelValue":o[17]||(o[17]=m=>n.modelInput=m),onKeydown:et(Y(v,["prevent"]),["enter"]),type:"text",placeholder:"输入模型名称,按回车添加",class:"form-input flex-1"},null,40,Xe),[[S,n.modelInput]]),t("button",{type:"button",onClick:v,class:"px-4 py-2 bg-red-500 text-white rounded-lg hover:bg-red-600 transition-colors"},o[54]||(o[54]=[t("i",{class:"fas fa-plus"},null,-1)]))]),o[56]||(o[56]=t("p",{class:"text-xs text-gray-500 mt-2"},"设置此API Key无法访问的模型,例如:claude-opus-4-20250514",-1))])])):A("",!0)]),t("div",null,[t("div",Qe,[b(t("input",{type:"checkbox","onUpdate:modelValue":o[18]||(o[18]=m=>n.enableClientRestriction=m),id:"editEnableClientRestriction",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500"},null,512),[[G,n.enableClientRestriction]]),o[57]||(o[57]=t("label",{for:"editEnableClientRestriction",class:"ml-2 text-sm font-semibold text-gray-700 cursor-pointer"}," 启用客户端限制 ",-1))]),n.enableClientRestriction?(a(),d("div",Je,[t("div",null,[o[58]||(o[58]=t("label",{class:"block text-sm font-medium text-gray-600 mb-2"},"允许的客户端",-1)),o[59]||(o[59]=t("p",{class:"text-xs text-gray-500 mb-3"},"勾选允许使用此API Key的客户端",-1)),t("div",Ze,[(a(!0),d(T,null,P(M.value,m=>(a(),d("div",{key:m.id,class:"flex items-start"},[b(t("input",{type:"checkbox",id:`edit_client_${m.id}`,value:m.id,"onUpdate:modelValue":o[19]||(o[19]=y=>n.allowedClients=y),class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 mt-0.5"},null,8,ts),[[G,n.allowedClients]]),t("label",{for:`edit_client_${m.id}`,class:"ml-2 flex-1 cursor-pointer"},[t("span",ss,p(m.name),1),t("span",ls,p(m.description),1)],8,es)]))),128))])])])):A("",!0)]),t("div",os,[t("button",{type:"button",onClick:o[20]||(o[20]=m=>L.$emit("close")),class:"flex-1 px-6 py-3 bg-gray-100 text-gray-700 rounded-xl font-semibold hover:bg-gray-200 transition-colors"}," 取消 "),t("button",{type:"submit",disabled:x.value,class:"btn btn-primary flex-1 py-3 px-6 font-semibold"},[x.value?(a(),d("div",is)):(a(),d("i",as)),f(" "+p(x.value?"保存中...":"保存修改"),1)],8,ns)])],32)])])]))}},ds=J(rs,[["__scopeId","data-v-35ae96db"]]),us={class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},ps={class:"modal-content w-full max-w-md p-8 mx-auto max-h-[90vh] flex flex-col"},ms={class:"flex items-center justify-between mb-6"},cs={class:"space-y-6 modal-scroll-content custom-scrollbar flex-1"},xs={class:"bg-blue-50 border border-blue-200 rounded-lg p-4"},gs={class:"flex items-start gap-3"},fs={class:"text-sm text-gray-700"},ys={class:"text-xs text-gray-600 mt-1"},bs={key:0,class:"mt-3"},vs=["min"],ws={key:1,class:"text-xs text-gray-500 mt-2"},$s={class:"flex gap-3 pt-4"},Cs=["disabled"],As={key:0,class:"loading-spinner mr-2"},ks={key:1,class:"fas fa-clock mr-2"},Ks={__name:"RenewApiKeyModal",props:{apiKey:{type:Object,required:!0}},emits:["close","success"],setup(K,{emit:O}){const C=K,h=O;dt();const D=k(!1),x=at({renewDuration:"30d",customExpireDate:"",newExpiresAt:null}),M=st(()=>{const $=new Date;return C.apiKey.expiresAt&&new Date(C.apiKey.expiresAt)>$?new Date(C.apiKey.expiresAt).toISOString().slice(0,16):($.setMinutes($.getMinutes()+1),$.toISOString().slice(0,16))}),i=$=>new Date($).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),n=()=>{if(!x.renewDuration){x.newExpiresAt=null;return}if(x.renewDuration==="permanent"){x.newExpiresAt=null;return}if(x.renewDuration==="custom")return;const $=C.apiKey.expiresAt&&new Date(C.apiKey.expiresAt)>new Date?new Date(C.apiKey.expiresAt):new Date,E=x.renewDuration.match(/(\d+)([dhmy])/);if(E){const[,L,o]=E,m=parseInt(L);switch(o){case"d":$.setDate($.getDate()+m);break;case"h":$.setHours($.getHours()+m);break;case"m":$.setMonth($.getMonth()+m);break;case"y":$.setFullYear($.getFullYear()+m);break}x.newExpiresAt=$.toISOString()}},v=()=>{x.customExpireDate&&(x.newExpiresAt=new Date(x.customExpireDate).toISOString())},U=async()=>{D.value=!0;try{const $={expiresAt:x.renewDuration==="permanent"?null:x.newExpiresAt},w=await q.put(`/admin/api-keys/${C.apiKey.id}/renew`,$);w.success?(I("API Key 续期成功","success"),h("success"),h("close")):I(w.message||"续期失败","error")}catch{I("续期失败","error")}finally{D.value=!1}};return n(),($,w)=>(a(),W(lt,{to:"body"},[t("div",us,[t("div",ps,[t("div",ms,[w[5]||(w[5]=t("div",{class:"flex items-center gap-3"},[t("div",{class:"w-10 h-10 bg-gradient-to-br from-green-500 to-green-600 rounded-xl flex items-center justify-center"},[t("i",{class:"fas fa-clock text-white"})]),t("h3",{class:"text-xl font-bold text-gray-900"},"续期 API Key")],-1)),t("button",{onClick:w[0]||(w[0]=E=>$.$emit("close")),class:"text-gray-400 hover:text-gray-600 transition-colors"},w[4]||(w[4]=[t("i",{class:"fas fa-times text-xl"},null,-1)]))]),t("div",cs,[t("div",xs,[t("div",gs,[w[7]||(w[7]=t("div",{class:"w-8 h-8 bg-blue-500 rounded-lg flex items-center justify-center flex-shrink-0"},[t("i",{class:"fas fa-info text-white text-sm"})],-1)),t("div",null,[w[6]||(w[6]=t("h4",{class:"font-semibold text-gray-800 mb-1"},"API Key 信息",-1)),t("p",fs,p(K.apiKey.name),1),t("p",ys," 当前过期时间:"+p(K.apiKey.expiresAt?i(K.apiKey.expiresAt):"永不过期"),1)])])]),t("div",null,[w[9]||(w[9]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"续期时长",-1)),b(t("select",{"onUpdate:modelValue":w[1]||(w[1]=E=>x.renewDuration=E),onChange:n,class:"form-input w-full"},w[8]||(w[8]=[t("option",{value:"7d"},"延长 7 天",-1),t("option",{value:"30d"},"延长 30 天",-1),t("option",{value:"90d"},"延长 90 天",-1),t("option",{value:"180d"},"延长 180 天",-1),t("option",{value:"365d"},"延长 365 天",-1),t("option",{value:"custom"},"自定义日期",-1),t("option",{value:"permanent"},"设为永不过期",-1)]),544),[[z,x.renewDuration]]),x.renewDuration==="custom"?(a(),d("div",bs,[b(t("input",{"onUpdate:modelValue":w[2]||(w[2]=E=>x.customExpireDate=E),type:"datetime-local",class:"form-input w-full",min:M.value,onChange:v},null,40,vs),[[S,x.customExpireDate]])])):A("",!0),x.newExpiresAt?(a(),d("p",ws," 新的过期时间:"+p(i(x.newExpiresAt)),1)):A("",!0)])]),t("div",$s,[t("button",{type:"button",onClick:w[3]||(w[3]=E=>$.$emit("close")),class:"flex-1 px-6 py-3 bg-gray-100 text-gray-700 rounded-xl font-semibold hover:bg-gray-200 transition-colors"}," 取消 "),t("button",{type:"button",onClick:U,disabled:D.value||!x.renewDuration,class:"btn btn-primary flex-1 py-3 px-6 font-semibold"},[D.value?(a(),d("div",As)):(a(),d("i",ks)),f(" "+p(D.value?"续期中...":"确认续期"),1)],8,Cs)])])])]))}},Ls=J(Ks,[["__scopeId","data-v-5486ec2f"]]),Ds={class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},Is={class:"modal-content w-full max-w-lg p-8 mx-auto"},Ms={class:"flex items-center justify-between mb-6"},Rs={class:"space-y-4 mb-6"},Ss={class:"text-gray-900"},hs={key:0},Ts={class:"text-gray-600 text-sm"},Es={class:"relative"},Ps=["type","value"],Vs={class:"absolute right-1 top-1 flex gap-1"},js=["title"],_s={class:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-6"},Us={class:"text-sm text-gray-700 space-y-2"},qs={class:"block bg-white rounded px-3 py-2 text-xs"},Os={class:"bg-white rounded px-3 py-2 text-xs overflow-x-auto"},Fs={class:"flex justify-end"},Ws={__name:"NewApiKeyModal",props:{apiKey:{type:Object,required:!0}},emits:["close"],setup(K,{emit:O}){const C=K,h=k(!1),D=k(!1),x=st(()=>`${window.location.protocol}//${window.location.host}/api/`),M=()=>{h.value=!h.value},i=async()=>{try{await navigator.clipboard.writeText(C.apiKey.key),D.value=!0,I("API Key 已复制到剪贴板","success"),setTimeout(()=>{D.value=!1},3e3)}catch{I("复制失败,请手动复制","error")}};return(n,v)=>(a(),W(lt,{to:"body"},[t("div",Ds,[t("div",Is,[t("div",Ms,[v[3]||(v[3]=t("div",{class:"flex items-center gap-3"},[t("div",{class:"w-10 h-10 bg-gradient-to-br from-green-500 to-green-600 rounded-xl flex items-center justify-center"},[t("i",{class:"fas fa-check text-white"})]),t("h3",{class:"text-xl font-bold text-gray-900"},"API Key 创建成功")],-1)),t("button",{onClick:v[0]||(v[0]=U=>n.$emit("close")),class:"text-gray-400 hover:text-gray-600 transition-colors"},v[2]||(v[2]=[t("i",{class:"fas fa-times text-xl"},null,-1)]))]),v[11]||(v[11]=t("div",{class:"bg-green-50 border border-green-200 rounded-lg p-4 mb-6"},[t("div",{class:"flex items-start gap-3"},[t("div",{class:"w-8 h-8 bg-green-500 rounded-lg flex items-center justify-center flex-shrink-0"},[t("i",{class:"fas fa-shield-alt text-white text-sm"})]),t("div",null,[t("h4",{class:"font-semibold text-gray-800 mb-1"},"请妥善保管您的 API Key"),t("p",{class:"text-sm text-gray-600"},"API Key 只会显示一次,关闭此窗口后将无法再次查看完整密钥。请立即复制并保存到安全的地方。")])])],-1)),t("div",Rs,[t("div",null,[v[4]||(v[4]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-2"},"名称",-1)),t("p",Ss,p(K.apiKey.name),1)]),K.apiKey.description?(a(),d("div",hs,[v[5]||(v[5]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-2"},"描述",-1)),t("p",Ts,p(K.apiKey.description),1)])):A("",!0),t("div",null,[v[7]||(v[7]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-2"},"API Key",-1)),t("div",Es,[t("input",{type:h.value?"text":"password",value:K.apiKey.key,readonly:"",class:"form-input w-full pr-24 font-mono text-sm bg-gray-50"},null,8,Ps),t("div",Vs,[t("button",{onClick:M,type:"button",class:"px-3 py-1.5 bg-gray-100 hover:bg-gray-200 rounded-lg text-sm transition-colors",title:h.value?"隐藏":"显示"},[t("i",{class:_(h.value?"fas fa-eye-slash":"fas fa-eye")},null,2)],8,js),t("button",{onClick:i,type:"button",class:"px-3 py-1.5 bg-blue-100 hover:bg-blue-200 text-blue-700 rounded-lg text-sm transition-colors",title:"复制"},[v[6]||(v[6]=t("i",{class:"fas fa-copy"},null,-1)),f(" "+p(D.value?"已复制":"复制"),1)])])])])]),t("div",_s,[v[10]||(v[10]=t("h4",{class:"font-semibold text-gray-800 mb-2"},[t("i",{class:"fas fa-info-circle mr-2 text-blue-500"}),f("使用说明 ")],-1)),t("div",Us,[v[8]||(v[8]=t("p",null,"1. 在 HTTP 请求头中添加:",-1)),t("code",qs,"Authorization: Bearer "+p(K.apiKey.key),1),v[9]||(v[9]=t("p",{class:"pt-2"},"2. 请求示例:",-1)),t("pre",Os,"curl -X POST "+p(x.value)+`v1/messages \\
+ -H "Authorization: Bearer `+p(K.apiKey.key)+`" \\
+ -H "Content-Type: application/json" \\
+ -d '{"model": "claude-3-opus-20240229", "messages": [...]}'`,1)])]),t("div",Fs,[t("button",{onClick:v[1]||(v[1]=U=>n.$emit("close")),class:"btn btn-primary px-6 py-2.5"}," 我已保存 ")])])])]))}},zs=J(Ws,[["__scopeId","data-v-747f035b"]]),Ys={class:"tab-content"},Ns={class:"card p-6"},Hs={class:"flex flex-col md:flex-row justify-between items-center gap-4 mb-6"},Bs={class:"flex items-center gap-3"},Gs=["value"],Xs={key:0,class:"text-center py-12"},Qs={key:1,class:"text-center py-12"},Js={key:2,class:"table-container"},Zs={class:"min-w-full"},tl={class:"bg-gray-50/80 backdrop-blur-sm"},el={key:1,class:"fas fa-sort ml-1 text-gray-400"},sl={key:1,class:"fas fa-sort ml-1 text-gray-400"},ll={class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider"},ol={key:1,class:"fas fa-sort ml-1 text-gray-400"},nl={key:1,class:"fas fa-sort ml-1 text-gray-400"},il={key:1,class:"fas fa-sort ml-1 text-gray-400"},al={class:"divide-y divide-gray-200/50"},rl={class:"table-row"},dl={class:"px-6 py-4 whitespace-nowrap"},ul={class:"flex items-center"},pl={class:"text-sm font-semibold text-gray-900"},ml={class:"text-xs text-gray-500"},cl={class:"text-xs text-gray-500 mt-1"},xl={key:0},gl={key:1},fl={class:"px-6 py-4"},yl={class:"flex flex-wrap gap-1"},bl={key:0,class:"text-xs text-gray-400"},vl={class:"px-6 py-4 whitespace-nowrap"},wl={class:"text-sm font-mono text-gray-600 bg-gray-50 px-3 py-1 rounded-lg"},$l={class:"px-6 py-4 whitespace-nowrap"},Cl={class:"px-6 py-4"},Al={class:"space-y-1"},kl={class:"flex justify-between text-sm"},Kl={class:"font-medium text-gray-900"},Ll={class:"flex justify-between text-sm"},Dl={class:"font-medium text-gray-900"},Il={class:"flex justify-between text-sm"},Ml={class:"font-medium text-green-600"},Rl={key:0,class:"flex justify-between text-sm"},Sl={class:"flex justify-between text-sm"},hl={class:"font-medium text-purple-600"},Tl={class:"flex justify-between text-sm"},El={key:0,class:"text-xs text-gray-500"},Pl={key:1,class:"flex justify-between text-sm"},Vl={class:"font-medium text-indigo-600"},jl={key:2,class:"flex justify-between text-sm"},_l={class:"font-medium text-indigo-600"},Ul={class:"flex justify-between text-xs text-gray-500"},ql={key:3,class:"flex justify-between text-xs text-orange-500"},Ol={class:"flex justify-between text-xs text-blue-600"},Fl={class:"pt-1 border-t border-gray-100"},Wl={class:"flex justify-between text-xs text-green-600"},zl={class:"pt-2"},Yl=["onClick"],Nl={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},Hl={class:"px-6 py-4 whitespace-nowrap text-sm"},Bl={key:0},Gl={key:0,class:"text-red-600"},Xl={key:1,class:"text-orange-600"},Ql={key:2,class:"text-gray-600"},Jl={key:1,class:"text-gray-400"},Zl={class:"px-6 py-4 whitespace-nowrap text-sm"},to={class:"flex gap-2"},eo=["onClick"],so=["onClick"],lo=["onClick"],oo=["onClick"],no={key:0},io={colspan:"7",class:"px-6 py-4 bg-gray-50"},ao={key:0,class:"text-center py-4"},ro={class:"space-y-4"},uo={class:"flex items-center justify-between mb-4"},po={class:"flex items-center gap-2"},mo={key:0,class:"text-xs text-gray-500 bg-gray-100 px-2 py-1 rounded-full"},co={class:"flex gap-1 items-center"},xo={class:"flex gap-1 bg-gray-100 rounded p-1"},go=["onClick"],fo={key:0,class:"text-center py-8"},yo={class:"flex items-center justify-center gap-2 mb-3"},bo=["onClick"],vo={key:1,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},wo={class:"flex justify-between items-start mb-3"},$o={class:"flex-1"},Co={class:"text-sm font-semibold text-gray-800 block mb-1"},Ao={class:"text-xs text-gray-500 bg-blue-50 px-2 py-1 rounded-full"},ko={class:"space-y-2 mb-3"},Ko={class:"flex justify-between items-center text-sm"},Lo={class:"font-semibold text-gray-900"},Do={class:"flex justify-between items-center text-sm"},Io={class:"font-semibold text-green-600"},Mo={class:"pt-2 mt-2 border-t border-gray-100"},Ro={class:"flex justify-between items-center text-xs text-gray-500"},So={class:"font-medium"},ho={class:"flex justify-between items-center text-xs text-gray-500"},To={class:"font-medium"},Eo={key:0,class:"flex justify-between items-center text-xs text-purple-600"},Po={class:"font-medium"},Vo={key:1,class:"flex justify-between items-center text-xs text-purple-600"},jo={class:"font-medium"},_o={class:"w-full bg-gray-200 rounded-full h-2 mt-3"},Uo={class:"text-right mt-1"},qo={class:"text-xs font-medium text-indigo-600"},Oo={key:2,class:"mt-4 p-3 bg-gradient-to-r from-indigo-50 to-purple-50 rounded-lg border border-indigo-100"},Fo={class:"flex items-center justify-between text-sm"},Wo={class:"flex gap-4 text-xs"},zo={class:"text-gray-600"},Yo={class:"font-semibold text-gray-800"},No={class:"text-gray-600"},Ho={class:"font-semibold text-gray-800"},Bo={__name:"ApiKeysView",setup(K){const O=ut(),C=k([]),h=k(!1),D=k("today"),x=k(""),M=k("asc"),i=k({}),n=k({}),v=k({}),U=k([new Date(2e3,1,1,0,0,0),new Date(2e3,2,1,23,59,59)]),$=k({claude:[],gemini:[]}),w=k(""),E=k([]),L=k(!1),o=k(!1),m=k(!1),y=k(!1),l=k(null),u=k(null),j=k(null),X=st(()=>{let r=C.value;return w.value&&(r=C.value.filter(g=>g.tags&&g.tags.includes(w.value))),x.value?[...r].sort((g,s)=>{let c=g[x.value],R=s[x.value];return x.value==="status"?(c=g.isActive?1:0,R=s.isActive?1:0):x.value==="cost"?(c=parseFloat(ot(g.usage).replace("$","")),R=parseFloat(ot(s.usage).replace("$",""))):(x.value==="createdAt"||x.value==="expiresAt")&&(c=c?new Date(c).getTime():0,R=R?new Date(R).getTime():0),cR?M.value==="asc"?1:-1:0}):r}),N=async()=>{try{const[r,e]=await Promise.all([q.get("/admin/claude-accounts"),q.get("/admin/gemini-accounts")]);r.success&&($.value.claude=r.data||[]),e.success&&($.value.gemini=e.data||[])}catch(r){console.error("加载账户列表失败:",r)}},H=async()=>{h.value=!0;try{const r=await q.get(`/admin/api-keys?timeRange=${D.value}`);if(r.success){C.value=r.data||[];const e=new Set;C.value.forEach(g=>{g.tags&&Array.isArray(g.tags)&&g.tags.forEach(s=>e.add(s))}),E.value=Array.from(e).sort()}}catch{I("加载 API Keys 失败","error")}finally{h.value=!1}},Q=r=>{x.value===r?M.value=M.value==="asc"?"desc":"asc":(x.value=r,M.value="asc")},V=r=>!r&&r!==0?"0":r.toLocaleString("zh-CN"),ot=r=>!r||!r.total?"$0.0000":`$${(r.total.cost||0).toFixed(4)}`,ft=r=>{if(!r)return"未知账户";const e=$.value.claude.find(s=>s.id===r);if(e)return e.name;const g=$.value.gemini.find(s=>s.id===r);return g?g.name:`账户-${r.substring(0,8)}`},nt=r=>r?new Date(r)!r||nt(r)?!1:(new Date(r)-new Date)/(1e3*60*60*24)<=7,mt=r=>r?new Date(r).toLocaleDateString("zh-CN"):"",yt=async r=>{i.value[r]?i.value[r]=!1:(i.value[r]=!0,v.value[r]||xt(r),await Z(r,!0))},Z=async(r,e=!1)=>{if(!e&&n.value[r]&&n.value[r].length>0)return;const g=F(r);try{let s=`/admin/api-keys/${r}/model-stats`;const c=new URLSearchParams;if(g.customStart&&g.customEnd)c.append("startDate",g.customStart),c.append("endDate",g.customEnd),c.append("period","custom");else{const tt=g.preset==="today"?"daily":"monthly";c.append("period",tt)}s+="?"+c.toString();const R=await q.get(s);R.success&&(n.value[r]=R.data||[])}catch{I("加载模型统计失败","error"),n.value[r]=[]}},ct=(r,e)=>{const g=e.reduce((s,c)=>s+(c.allTokens||0),0);return g===0?0:Math.round(r/g*100)},bt=r=>r.formatted&&r.formatted.total?r.formatted.total:r.cost!==void 0?`$${r.cost.toFixed(6)}`:"$0.000000",xt=r=>{const e=new Date,g=new Date(e);g.setDate(e.getDate()-6),v.value[r]={type:"preset",preset:"7days",customStart:g.toISOString().split("T")[0],customEnd:e.toISOString().split("T")[0],customRange:null,presetOptions:[{value:"today",label:"今日",days:1},{value:"7days",label:"7天",days:7},{value:"30days",label:"30天",days:30}]}},F=r=>(v.value[r]||xt(r),v.value[r]),gt=(r,e)=>{const g=F(e);g.type="preset",g.preset=r;const s=g.presetOptions.find(c=>c.value===r);if(s){const c=new Date,R=new Date(c);R.setDate(c.getDate()-(s.days-1)),g.customStart=R.toISOString().split("T")[0],g.customEnd=c.toISOString().split("T")[0];const tt=it=>it.getFullYear()+"-"+String(it.getMonth()+1).padStart(2,"0")+"-"+String(it.getDate()).padStart(2,"0")+" 00:00:00";g.customRange=[tt(R),tt(c)]}Z(e,!0)},vt=(r,e)=>{const g=F(r);e&&e.length===2?(g.type="custom",g.preset="",g.customRange=e,g.customStart=e[0].split(" ")[0],g.customEnd=e[1].split(" ")[0],Z(r,!0)):e===null&>("7days",r)},wt=r=>r>new Date,$t=r=>{const e=F(r);e.type="preset",e.preset="7days";const g=new Date,s=new Date(g);s.setDate(g.getDate()-6),e.customStart=s.toISOString().split("T")[0],e.customEnd=g.toISOString().split("T")[0],e.customRange=null,Z(r,!0),I("已重置筛选条件并刷新数据","info")},Ct=()=>{L.value=!0},At=r=>{l.value=r,o.value=!0},kt=r=>{u.value=r,m.value=!0},Kt=r=>{L.value=!1,j.value=r,y.value=!0,H()},Lt=()=>{o.value=!1,I("API Key 更新成功","success"),H()},Dt=()=>{m.value=!1,I("API Key 续期成功","success"),H()},It=async r=>{if(confirm("确定要删除这个 API Key 吗?此操作不可恢复。"))try{const e=await q.delete(`/admin/api-keys/${r}`);e.success?(I("API Key 已删除","success"),H()):I(e.message||"删除失败","error")}catch{I("删除失败","error")}},Mt=r=>{const g=`${window.location.origin}/admin/api-stats?apiId=${r.id}`,s=document.createElement("textarea");s.value=g,s.style.position="fixed",s.style.opacity="0",s.style.left="-9999px",document.body.appendChild(s),s.select(),s.setSelectionRange(0,99999);try{document.execCommand("copy")?I("已复制统计页面链接","success"):(I("复制失败,请手动复制","error"),console.log("统计页面链接:",g))}catch(c){I("复制失败,请手动复制","error"),console.error("复制错误:",c),console.log("统计页面链接:",g)}finally{document.body.removeChild(s)}};return rt(async()=>{await Promise.all([O.loadSupportedClients(),N(),H()])}),(r,e)=>{const g=Rt;return a(),d("div",Ys,[t("div",Ns,[t("div",Hs,[e[15]||(e[15]=t("div",null,[t("h3",{class:"text-xl font-bold text-gray-900 mb-2"},"API Keys 管理"),t("p",{class:"text-gray-600"},"管理和监控您的 API 密钥")],-1)),t("div",Bs,[b(t("select",{"onUpdate:modelValue":e[0]||(e[0]=s=>D.value=s),onChange:e[1]||(e[1]=s=>H()),class:"form-input px-3 py-2 text-sm"},e[12]||(e[12]=[t("option",{value:"today"},"今日",-1),t("option",{value:"7days"},"最近7天",-1),t("option",{value:"monthly"},"本月",-1),t("option",{value:"all"},"全部时间",-1)]),544),[[z,D.value]]),b(t("select",{"onUpdate:modelValue":e[2]||(e[2]=s=>w.value=s),class:"form-input px-3 py-2 text-sm"},[e[13]||(e[13]=t("option",{value:""},"所有标签",-1)),(a(!0),d(T,null,P(E.value,s=>(a(),d("option",{key:s,value:s},p(s),9,Gs))),128))],512),[[z,w.value]]),t("button",{onClick:Y(Ct,["stop"]),class:"btn btn-primary px-6 py-3 flex items-center gap-2"},e[14]||(e[14]=[t("i",{class:"fas fa-plus"},null,-1),f("创建新 Key ",-1)]))])]),h.value?(a(),d("div",Xs,e[16]||(e[16]=[t("div",{class:"loading-spinner mx-auto mb-4"},null,-1),t("p",{class:"text-gray-500"},"正在加载 API Keys...",-1)]))):C.value.length===0?(a(),d("div",Qs,e[17]||(e[17]=[t("div",{class:"w-16 h-16 mx-auto mb-4 bg-gray-100 rounded-full flex items-center justify-center"},[t("i",{class:"fas fa-key text-gray-400 text-xl"})],-1),t("p",{class:"text-gray-500 text-lg"},"暂无 API Keys",-1),t("p",{class:"text-gray-400 text-sm mt-2"},"点击上方按钮创建您的第一个 API Key",-1)]))):(a(),d("div",Js,[t("table",Zs,[t("thead",tl,[t("tr",null,[t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:e[3]||(e[3]=s=>Q("name"))},[e[18]||(e[18]=f(" 名称 ",-1)),x.value==="name"?(a(),d("i",{key:0,class:_(["fas",M.value==="asc"?"fa-sort-up":"fa-sort-down","ml-1"])},null,2)):(a(),d("i",el))]),e[25]||(e[25]=t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider"},"标签",-1)),e[26]||(e[26]=t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider"},"API Key",-1)),t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:e[4]||(e[4]=s=>Q("status"))},[e[19]||(e[19]=f(" 状态 ",-1)),x.value==="status"?(a(),d("i",{key:0,class:_(["fas",M.value==="asc"?"fa-sort-up":"fa-sort-down","ml-1"])},null,2)):(a(),d("i",sl))]),t("th",ll,[e[22]||(e[22]=f(" 使用统计 ",-1)),t("span",{class:"cursor-pointer hover:bg-gray-100 px-2 py-1 rounded",onClick:e[5]||(e[5]=s=>Q("cost"))},[e[20]||(e[20]=f(" (费用 ",-1)),x.value==="cost"?(a(),d("i",{key:0,class:_(["fas",M.value==="asc"?"fa-sort-up":"fa-sort-down","ml-1"])},null,2)):(a(),d("i",ol)),e[21]||(e[21]=f(") ",-1))])]),t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:e[6]||(e[6]=s=>Q("createdAt"))},[e[23]||(e[23]=f(" 创建时间 ",-1)),x.value==="createdAt"?(a(),d("i",{key:0,class:_(["fas",M.value==="asc"?"fa-sort-up":"fa-sort-down","ml-1"])},null,2)):(a(),d("i",nl))]),t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:e[7]||(e[7]=s=>Q("expiresAt"))},[e[24]||(e[24]=f(" 过期时间 ",-1)),x.value==="expiresAt"?(a(),d("i",{key:0,class:_(["fas",M.value==="asc"?"fa-sort-up":"fa-sort-down","ml-1"])},null,2)):(a(),d("i",il))]),e[27]||(e[27]=t("th",{class:"px-6 py-4 text-left text-xs font-bold text-gray-700 uppercase tracking-wider"},"操作",-1))])]),t("tbody",al,[(a(!0),d(T,null,P(X.value,s=>(a(),d(T,{key:s.id},[t("tr",rl,[t("td",dl,[t("div",ul,[e[30]||(e[30]=t("div",{class:"w-8 h-8 bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg flex items-center justify-center mr-3"},[t("i",{class:"fas fa-key text-white text-xs"})],-1)),t("div",null,[t("div",pl,p(s.name),1),t("div",ml,p(s.id),1),t("div",cl,[s.claudeAccountId?(a(),d("span",xl,[e[28]||(e[28]=t("i",{class:"fas fa-link mr-1"},null,-1)),f(" 绑定: "+p(ft(s.claudeAccountId)),1)])):(a(),d("span",gl,e[29]||(e[29]=[t("i",{class:"fas fa-share-alt mr-1"},null,-1),f(" 使用共享池 ",-1)])))])])])]),t("td",fl,[t("div",yl,[(a(!0),d(T,null,P(s.tags||[],c=>(a(),d("span",{key:c,class:"inline-flex items-center px-2 py-0.5 bg-blue-100 text-blue-800 text-xs rounded-full"},p(c),1))),128)),!s.tags||s.tags.length===0?(a(),d("span",bl,"无标签")):A("",!0)])]),t("td",vl,[t("div",wl,p((s.apiKey||"").substring(0,20))+"... ",1)]),t("td",$l,[t("span",{class:_(["inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold",s.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"])},[t("div",{class:_(["w-2 h-2 rounded-full mr-2",s.isActive?"bg-green-500":"bg-red-500"])},null,2),f(" "+p(s.isActive?"活跃":"禁用"),1)],2)]),t("td",Cl,[t("div",Al,[t("div",kl,[e[31]||(e[31]=t("span",{class:"text-gray-600"},"请求数:",-1)),t("span",Kl,p(V(s.usage&&s.usage.total&&s.usage.total.requests||0)),1)]),t("div",Ll,[e[32]||(e[32]=t("span",{class:"text-gray-600"},"Token:",-1)),t("span",Dl,p(V(s.usage&&s.usage.total&&s.usage.total.tokens||0)),1)]),t("div",Il,[e[33]||(e[33]=t("span",{class:"text-gray-600"},"费用:",-1)),t("span",Ml,p(ot(s.usage)),1)]),s.dailyCostLimit>0?(a(),d("div",Rl,[e[34]||(e[34]=t("span",{class:"text-gray-600"},"今日费用:",-1)),t("span",{class:_(["font-medium",(s.dailyCost||0)>=s.dailyCostLimit?"text-red-600":"text-blue-600"])}," $"+p((s.dailyCost||0).toFixed(2))+" / $"+p(s.dailyCostLimit.toFixed(2)),3)])):A("",!0),t("div",Sl,[e[35]||(e[35]=t("span",{class:"text-gray-600"},"并发限制:",-1)),t("span",hl,p(s.concurrencyLimit>0?s.concurrencyLimit:"无限制"),1)]),t("div",Tl,[e[36]||(e[36]=t("span",{class:"text-gray-600"},"当前并发:",-1)),t("span",{class:_(["font-medium",s.currentConcurrency>0?"text-orange-600":"text-gray-600"])},[f(p(s.currentConcurrency||0)+" ",1),s.concurrencyLimit>0?(a(),d("span",El,"/ "+p(s.concurrencyLimit),1)):A("",!0)],2)]),s.rateLimitWindow>0?(a(),d("div",Pl,[e[37]||(e[37]=t("span",{class:"text-gray-600"},"时间窗口:",-1)),t("span",Vl,p(s.rateLimitWindow)+" 分钟",1)])):A("",!0),s.rateLimitRequests>0?(a(),d("div",jl,[e[38]||(e[38]=t("span",{class:"text-gray-600"},"请求限制:",-1)),t("span",_l,p(s.rateLimitRequests)+" 次/窗口",1)])):A("",!0),t("div",Ul,[t("span",null,"输入: "+p(V(s.usage&&s.usage.total&&s.usage.total.inputTokens||0)),1),t("span",null,"输出: "+p(V(s.usage&&s.usage.total&&s.usage.total.outputTokens||0)),1)]),(s.usage&&s.usage.total&&s.usage.total.cacheCreateTokens||0)>0||(s.usage&&s.usage.total&&s.usage.total.cacheReadTokens||0)>0?(a(),d("div",ql,[t("span",null,"缓存创建: "+p(V(s.usage&&s.usage.total&&s.usage.total.cacheCreateTokens||0)),1),t("span",null,"缓存读取: "+p(V(s.usage&&s.usage.total&&s.usage.total.cacheReadTokens||0)),1)])):A("",!0),t("div",Ol,[t("span",null,"RPM: "+p(s.usage&&s.usage.averages&&s.usage.averages.rpm||0),1),t("span",null,"TPM: "+p(s.usage&&s.usage.averages&&s.usage.averages.tpm||0),1)]),t("div",Fl,[t("div",Wl,[t("span",null,"今日: "+p(V(s.usage&&s.usage.daily&&s.usage.daily.requests||0))+"次",1),t("span",null,p(V(s.usage&&s.usage.daily&&s.usage.daily.tokens||0))+"T",1)])]),t("div",zl,[s&&s.id?(a(),d("button",{key:0,onClick:c=>yt(s.id),class:"text-xs text-indigo-600 hover:text-indigo-800 font-medium"},[t("i",{class:_(["fas",i.value[s.id]?"fa-chevron-up":"fa-chevron-down","mr-1"])},null,2),e[39]||(e[39]=f(" 模型使用分布 ",-1))],8,Yl)):A("",!0)])])]),t("td",Nl,p(new Date(s.createdAt).toLocaleDateString()),1),t("td",Hl,[s.expiresAt?(a(),d("div",Bl,[nt(s.expiresAt)?(a(),d("div",Gl,e[40]||(e[40]=[t("i",{class:"fas fa-exclamation-circle mr-1"},null,-1),f(" 已过期 ",-1)]))):pt(s.expiresAt)?(a(),d("div",Xl,[e[41]||(e[41]=t("i",{class:"fas fa-clock mr-1"},null,-1)),f(" "+p(mt(s.expiresAt)),1)])):(a(),d("div",Ql,p(mt(s.expiresAt)),1))])):(a(),d("div",Jl,e[42]||(e[42]=[t("i",{class:"fas fa-infinity mr-1"},null,-1),f(" 永不过期 ",-1)])))]),t("td",Zl,[t("div",to,[t("button",{onClick:c=>Mt(s),class:"text-purple-600 hover:text-purple-900 font-medium hover:bg-purple-50 px-3 py-1 rounded-lg transition-colors",title:"复制统计页面链接"},e[43]||(e[43]=[t("i",{class:"fas fa-chart-bar mr-1"},null,-1),f("统计 ",-1)]),8,eo),t("button",{onClick:c=>At(s),class:"text-blue-600 hover:text-blue-900 font-medium hover:bg-blue-50 px-3 py-1 rounded-lg transition-colors"},e[44]||(e[44]=[t("i",{class:"fas fa-edit mr-1"},null,-1),f("编辑 ",-1)]),8,so),s.expiresAt&&(nt(s.expiresAt)||pt(s.expiresAt))?(a(),d("button",{key:0,onClick:c=>kt(s),class:"text-green-600 hover:text-green-900 font-medium hover:bg-green-50 px-3 py-1 rounded-lg transition-colors"},e[45]||(e[45]=[t("i",{class:"fas fa-clock mr-1"},null,-1),f("续期 ",-1)]),8,lo)):A("",!0),t("button",{onClick:c=>It(s.id),class:"text-red-600 hover:text-red-900 font-medium hover:bg-red-50 px-3 py-1 rounded-lg transition-colors"},e[46]||(e[46]=[t("i",{class:"fas fa-trash mr-1"},null,-1),f("删除 ",-1)]),8,oo)])])]),s&&s.id&&i.value[s.id]?(a(),d("tr",no,[t("td",io,[n.value[s.id]?A("",!0):(a(),d("div",ao,e[47]||(e[47]=[t("div",{class:"loading-spinner mx-auto"},null,-1),t("p",{class:"text-sm text-gray-500 mt-2"},"加载模型统计...",-1)]))),t("div",ro,[t("div",uo,[e[48]||(e[48]=t("h5",{class:"text-sm font-semibold text-gray-700 flex items-center"},[t("i",{class:"fas fa-chart-pie text-indigo-500 mr-2"}),f(" 模型使用分布 ")],-1)),t("div",po,[n.value[s.id]&&n.value[s.id].length>0?(a(),d("span",mo,p(n.value[s.id].length)+" 个模型 ",1)):A("",!0),t("div",co,[t("div",xo,[(a(!0),d(T,null,P(F(s.id).presetOptions,c=>(a(),d("button",{key:c.value,onClick:R=>gt(c.value,s.id),class:_(["px-2 py-1 rounded text-xs font-medium transition-colors",F(s.id).preset===c.value&&F(s.id).type==="preset"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"])},p(c.label),11,go))),128))]),ht(g,{"model-value":F(s.id).customRange,"onUpdate:modelValue":c=>vt(s.id,c),type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss","disabled-date":wt,"default-time":U.value,size:"small",style:{width:"280px"},class:"api-key-date-picker",clearable:!0,"unlink-panels":!1},null,8,["model-value","onUpdate:modelValue","default-time"])])])]),n.value[s.id]&&n.value[s.id].length===0?(a(),d("div",fo,[t("div",yo,[e[50]||(e[50]=t("i",{class:"fas fa-chart-line text-gray-400 text-lg"},null,-1)),e[51]||(e[51]=t("p",{class:"text-sm text-gray-500"},"暂无模型使用数据",-1)),t("button",{onClick:c=>$t(s.id),class:"text-blue-500 hover:text-blue-700 text-sm ml-2 flex items-center gap-1 transition-colors",title:"重置筛选条件并刷新"},e[49]||(e[49]=[t("i",{class:"fas fa-sync-alt text-xs"},null,-1),t("span",{class:"text-xs"},"刷新",-1)]),8,bo)]),e[52]||(e[52]=t("p",{class:"text-xs text-gray-400"},"尝试调整时间范围或点击刷新重新加载数据",-1))])):n.value[s.id]&&n.value[s.id].length>0?(a(),d("div",vo,[(a(!0),d(T,null,P(n.value[s.id],c=>(a(),d("div",{key:c.model,class:"bg-gradient-to-br from-white to-gray-50 rounded-xl p-4 border border-gray-200 hover:border-indigo-300 hover:shadow-lg transition-all duration-200"},[t("div",wo,[t("div",$o,[t("span",Co,p(c.model),1),t("span",Ao,p(c.requests)+" 次请求",1)])]),t("div",ko,[t("div",Ko,[e[53]||(e[53]=t("span",{class:"text-gray-600 flex items-center"},[t("i",{class:"fas fa-coins text-yellow-500 mr-1 text-xs"}),f(" 总Token: ")],-1)),t("span",Lo,p(V(c.allTokens)),1)]),t("div",Do,[e[54]||(e[54]=t("span",{class:"text-gray-600 flex items-center"},[t("i",{class:"fas fa-dollar-sign text-green-500 mr-1 text-xs"}),f(" 费用: ")],-1)),t("span",Io,p(bt(c)),1)]),t("div",Mo,[t("div",Ro,[e[55]||(e[55]=t("span",{class:"flex items-center"},[t("i",{class:"fas fa-arrow-down text-green-500 mr-1"}),f(" 输入: ")],-1)),t("span",So,p(V(c.inputTokens)),1)]),t("div",ho,[e[56]||(e[56]=t("span",{class:"flex items-center"},[t("i",{class:"fas fa-arrow-up text-blue-500 mr-1"}),f(" 输出: ")],-1)),t("span",To,p(V(c.outputTokens)),1)]),c.cacheCreateTokens>0?(a(),d("div",Eo,[e[57]||(e[57]=t("span",{class:"flex items-center"},[t("i",{class:"fas fa-save mr-1"}),f(" 缓存创建: ")],-1)),t("span",Po,p(V(c.cacheCreateTokens)),1)])):A("",!0),c.cacheReadTokens>0?(a(),d("div",Vo,[e[58]||(e[58]=t("span",{class:"flex items-center"},[t("i",{class:"fas fa-download mr-1"}),f(" 缓存读取: ")],-1)),t("span",jo,p(V(c.cacheReadTokens)),1)])):A("",!0)])]),t("div",_o,[t("div",{class:"bg-gradient-to-r from-indigo-500 to-purple-600 h-2 rounded-full transition-all duration-500",style:Tt({width:ct(c.allTokens,n.value[s.id])+"%"})},null,4)]),t("div",Uo,[t("span",qo,p(ct(c.allTokens,n.value[s.id]))+"% ",1)])]))),128))])):A("",!0),n.value[s.id]&&n.value[s.id].length>0?(a(),d("div",Oo,[t("div",Fo,[e[61]||(e[61]=t("span",{class:"font-semibold text-gray-700 flex items-center"},[t("i",{class:"fas fa-calculator text-indigo-500 mr-2"}),f(" 总计统计 ")],-1)),t("div",Wo,[t("span",zo,[e[59]||(e[59]=f(" 总请求: ",-1)),t("span",Yo,p(n.value[s.id].reduce((c,R)=>c+R.requests,0)),1)]),t("span",No,[e[60]||(e[60]=f(" 总Token: ",-1)),t("span",Ho,p(V(n.value[s.id].reduce((c,R)=>c+R.allTokens,0))),1)])])])])):A("",!0)])])])):A("",!0)],64))),128))])])]))]),L.value?(a(),W(Ce,{key:0,accounts:$.value,onClose:e[8]||(e[8]=s=>L.value=!1),onSuccess:Kt},null,8,["accounts"])):A("",!0),o.value?(a(),W(ds,{key:1,apiKey:l.value,accounts:$.value,onClose:e[9]||(e[9]=s=>o.value=!1),onSuccess:Lt},null,8,["apiKey","accounts"])):A("",!0),m.value?(a(),W(Ls,{key:2,apiKey:u.value,onClose:e[10]||(e[10]=s=>m.value=!1),onSuccess:Dt},null,8,["apiKey"])):A("",!0),y.value?(a(),W(zs,{key:3,apiKey:j.value,onClose:e[11]||(e[11]=s=>y.value=!1)},null,8,["apiKey"])):A("",!0)])}}},tn=J(Bo,[["__scopeId","data-v-3c03d38e"]]);export{tn as default};
diff --git a/web/admin-spa/dist/assets/ApiStatsView-CttWyc18.js b/web/admin-spa/dist/assets/ApiStatsView-DE1u-LE3.js
similarity index 98%
rename from web/admin-spa/dist/assets/ApiStatsView-CttWyc18.js
rename to web/admin-spa/dist/assets/ApiStatsView-DE1u-LE3.js
index 198417d4..8ab9f3f8 100644
--- a/web/admin-spa/dist/assets/ApiStatsView-CttWyc18.js
+++ b/web/admin-spa/dist/assets/ApiStatsView-DE1u-LE3.js
@@ -1 +1 @@
-import{aR as B,r as $,c as J,aW as A,x as f,y as m,z as t,O as y,K as H,aq as Q,u as s,aa as G,f as X,P as r,C as P,L as C,Q as O,ac as F,q as Z,aU as tt,V as st,o as et,R as S,J as at,av as it}from"./vue-vendor-YmkKLAOK.js";import{L as ot}from"./LogoTitle-DG-EsEim.js";import{_ as K}from"./index-BfaL5u2_.js";import{b as nt}from"./vendor-BDiMbLwQ.js";import lt from"./TutorialView-DVPcd000.js";/* empty css */import"./element-plus-D-FTEVKS.js";class rt{constructor(){this.baseURL=window.location.origin,this.isDev=!1}async request(n,a={}){try{this.isDev&&n.startsWith("/admin")&&(n="/webapi"+n);const l=await fetch(`${this.baseURL}${n}`,{headers:{"Content-Type":"application/json",...a.headers},...a}),c=await l.json();if(!l.ok)throw new Error(c.message||`请求失败: ${l.status}`);return c}catch(l){throw console.error("API Stats request error:",l),l}}async getKeyId(n){return this.request("/apiStats/api/get-key-id",{method:"POST",body:JSON.stringify({apiKey:n})})}async getUserStats(n){return this.request("/apiStats/api/user-stats",{method:"POST",body:JSON.stringify({apiId:n})})}async getUserModelStats(n,a="daily"){return this.request("/apiStats/api/user-model-stats",{method:"POST",body:JSON.stringify({apiId:n,period:a})})}async getOemSettings(){try{return await this.request("/admin/oem-settings")}catch(n){return console.error("Failed to load OEM settings:",n),{success:!0,data:{siteName:"Claude Relay Service",siteIcon:"",siteIconData:""}}}}}const D=new rt,M=B("apistats",()=>{const w=$(""),n=$(null),a=$(!1),l=$(!1),c=$(!0),e=$(""),i=$("daily"),d=$(null),v=$([]),_=$(null),h=$(null),x=$({siteName:"",siteIcon:"",siteIconData:""}),u=J(()=>{const o={requests:0,inputTokens:0,outputTokens:0,cacheCreateTokens:0,cacheReadTokens:0,allTokens:0,cost:0,formattedCost:"$0.000000"};return i.value==="daily"?_.value||o:h.value||o}),U=J(()=>{if(!d.value||!u.value)return{tokenUsage:0,costUsage:0,requestUsage:0};const o=u.value,g=d.value.limits;return{tokenUsage:g.tokenLimit>0?Math.min(o.allTokens/g.tokenLimit*100,100):0,costUsage:g.dailyCostLimit>0?Math.min(o.cost/g.dailyCostLimit*100,100):0,requestUsage:g.rateLimitRequests>0?Math.min(o.requests/g.rateLimitRequests*100,100):0}});async function T(){if(!w.value.trim()){e.value="请输入 API Key";return}a.value=!0,e.value="",d.value=null,v.value=[],n.value=null;try{const o=await D.getKeyId(w.value);if(o.success){n.value=o.data.id;const g=await D.getUserStats(n.value);if(g.success)d.value=g.data,await R(),e.value="",j();else throw new Error(g.message||"查询失败")}else throw new Error(o.message||"获取 API Key ID 失败")}catch(o){console.error("Query stats error:",o),e.value=o.message||"查询统计数据失败,请检查您的 API Key 是否正确",d.value=null,v.value=[],n.value=null}finally{a.value=!1}}async function R(){n.value&&(await Promise.all([L("daily"),L("monthly")]),await q(i.value))}async function L(o){try{const g=await D.getUserModelStats(n.value,o);if(g.success){const z=g.data||[],k={requests:0,inputTokens:0,outputTokens:0,cacheCreateTokens:0,cacheReadTokens:0,allTokens:0,cost:0,formattedCost:"$0.000000"};z.forEach(I=>{var W;k.requests+=I.requests||0,k.inputTokens+=I.inputTokens||0,k.outputTokens+=I.outputTokens||0,k.cacheCreateTokens+=I.cacheCreateTokens||0,k.cacheReadTokens+=I.cacheReadTokens||0,k.allTokens+=I.allTokens||0,k.cost+=((W=I.costs)==null?void 0:W.total)||0}),k.formattedCost=N(k.cost),o==="daily"?_.value=k:h.value=k}else console.warn(`Failed to load ${o} stats:`,g.message)}catch(g){console.error(`Load ${o} stats error:`,g)}}async function q(o="daily"){if(n.value){l.value=!0;try{const g=await D.getUserModelStats(n.value,o);if(g.success)v.value=g.data||[];else throw new Error(g.message||"加载模型统计失败")}catch(g){console.error("Load model stats error:",g),v.value=[]}finally{l.value=!1}}}async function E(o){i.value===o||l.value||(i.value=o,(o==="daily"&&!_.value||o==="monthly"&&!h.value)&&await L(o),await q(o))}async function b(){if(n.value){a.value=!0,e.value="",d.value=null,v.value=[];try{const o=await D.getUserStats(n.value);if(o.success)d.value=o.data,await R(),e.value="";else throw new Error(o.message||"查询失败")}catch(o){console.error("Load stats with apiId error:",o),e.value=o.message||"查询统计数据失败",d.value=null,v.value=[]}finally{a.value=!1}}}async function p(){c.value=!0;try{const o=await D.getOemSettings();o&&o.success&&o.data&&(x.value={...x.value,...o.data})}catch(o){console.error("Error loading OEM settings:",o),x.value={siteName:"Claude Relay Service",siteIcon:"",siteIconData:""}}finally{c.value=!1}}function N(o){return typeof o!="number"||o===0?"$0.000000":o>=1?"$"+o.toFixed(2):o>=.01?"$"+o.toFixed(4):"$"+o.toFixed(6)}function j(){if(n.value){const o=new URL(window.location);o.searchParams.set("apiId",n.value),window.history.pushState({},"",o)}}function V(){d.value=null,v.value=[],_.value=null,h.value=null,e.value="",i.value="daily",n.value=null}function Y(){w.value="",V()}return{apiKey:w,apiId:n,loading:a,modelStatsLoading:l,oemLoading:c,error:e,statsPeriod:i,statsData:d,modelStats:v,dailyStats:_,monthlyStats:h,oemSettings:x,currentPeriodData:u,usagePercentages:U,queryStats:T,loadAllPeriodStats:R,loadPeriodStats:L,loadModelStats:q,switchPeriod:E,loadStatsWithApiId:b,loadOemSettings:p,clearData:V,reset:Y}}),dt={class:"api-input-wide-card glass-strong rounded-3xl p-6 mb-8 shadow-xl"},ct={class:"max-w-4xl mx-auto"},ut={class:"api-input-grid grid grid-cols-1 lg:grid-cols-4"},ft={class:"lg:col-span-3"},mt=["disabled"],xt={class:"lg:col-span-1"},yt=["disabled"],pt={key:0,class:"fas fa-spinner loading-spinner"},gt={key:1,class:"fas fa-search"},vt={__name:"ApiKeyInput",setup(w){const n=M(),{apiKey:a,loading:l}=A(n),{queryStats:c}=n;return(e,i)=>(m(),f("div",dt,[i[6]||(i[6]=t("div",{class:"wide-card-title text-center mb-6"},[t("h2",{class:"text-2xl font-bold mb-2"},[t("i",{class:"fas fa-chart-line mr-3"}),y(" 使用统计查询 ")]),t("p",{class:"text-base text-gray-600"},"查询您的 API Key 使用情况和统计数据")],-1)),t("div",ct,[t("div",ut,[t("div",ft,[i[3]||(i[3]=t("label",{class:"block text-sm font-medium mb-2 text-gray-700"},[t("i",{class:"fas fa-key mr-2"}),y(" 输入您的 API Key ")],-1)),H(t("input",{"onUpdate:modelValue":i[0]||(i[0]=d=>X(a)?a.value=d:null),type:"password",placeholder:"请输入您的 API Key (cr_...)",class:"wide-card-input w-full",onKeyup:i[1]||(i[1]=G((...d)=>s(c)&&s(c)(...d),["enter"])),disabled:s(l)},null,40,mt),[[Q,s(a)]])]),t("div",xt,[i[4]||(i[4]=t("label",{class:"hidden lg:block text-sm font-medium mb-2 text-gray-700"}," ",-1)),t("button",{onClick:i[2]||(i[2]=(...d)=>s(c)&&s(c)(...d)),disabled:s(l)||!s(a).trim(),class:"btn btn-primary btn-query w-full h-full flex items-center justify-center gap-2"},[s(l)?(m(),f("i",pt)):(m(),f("i",gt)),y(" "+r(s(l)?"查询中...":"查询统计"),1)],8,yt)])]),i[5]||(i[5]=t("div",{class:"security-notice mt-4"},[t("i",{class:"fas fa-shield-alt mr-2"}),y(" 您的 API Key 仅用于查询自己的统计数据,不会被存储或用于其他用途 ")],-1))])]))}},_t=K(vt,[["__scopeId","data-v-a4be9e3c"]]),bt={class:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8"},ht={class:"card p-6"},$t={class:"space-y-3"},wt={class:"flex justify-between items-center"},kt={class:"font-medium text-gray-900"},St={class:"flex justify-between items-center"},Tt={class:"flex justify-between items-center"},It={class:"font-medium text-gray-900"},Ct={class:"flex justify-between items-center"},Lt={class:"font-medium text-gray-900"},Dt={class:"flex justify-between items-center"},Pt={key:0},At={key:0,class:"text-red-600 font-medium"},Kt={key:1,class:"text-orange-600 font-medium"},Mt={key:2,class:"text-gray-900 font-medium"},Rt={key:1,class:"text-gray-400 font-medium"},qt={class:"card p-6"},jt={class:"text-xl font-bold mb-4 flex items-center text-gray-900"},Ut={class:"text-sm font-normal text-gray-600 ml-2"},Et={class:"grid grid-cols-2 gap-4"},Nt={class:"stat-card text-center"},Ot={class:"text-3xl font-bold text-green-600"},Ft={class:"text-sm text-gray-600"},Vt={class:"stat-card text-center"},Wt={class:"text-3xl font-bold text-blue-600"},Jt={class:"text-sm text-gray-600"},Yt={class:"stat-card text-center"},zt={class:"text-3xl font-bold text-purple-600"},Bt={class:"text-sm text-gray-600"},Ht={class:"stat-card text-center"},Qt={class:"text-3xl font-bold text-yellow-600"},Gt={class:"text-sm text-gray-600"},Xt={__name:"StatsOverview",setup(w){const n=M(),{statsData:a,statsPeriod:l,currentPeriodData:c}=A(n),e=x=>{if(!x)return"无";try{return nt(x).format("YYYY年MM月DD日 HH:mm")}catch{return"格式错误"}},i=x=>x?new Date(x).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}):"",d=x=>x?new Date(x){if(!x)return!1;const T=(new Date(x)-new Date)/(1e3*60*60*24);return T>0&&T<=7},_=x=>(typeof x!="number"&&(x=parseInt(x)||0),x===0?"0":x>=1e6?(x/1e6).toFixed(1)+"M":x>=1e3?(x/1e3).toFixed(1)+"K":x.toLocaleString()),h=x=>({claude:"Claude",gemini:"Gemini",all:"全部模型"})[x]||x||"未知";return(x,u)=>(m(),f("div",bt,[t("div",ht,[u[8]||(u[8]=t("h3",{class:"text-xl font-bold mb-4 flex items-center text-gray-900"},[t("i",{class:"fas fa-info-circle mr-3 text-blue-500"}),y(" API Key 信息 ")],-1)),t("div",$t,[t("div",wt,[u[0]||(u[0]=t("span",{class:"text-gray-600"},"名称",-1)),t("span",kt,r(s(a).name),1)]),t("div",St,[u[1]||(u[1]=t("span",{class:"text-gray-600"},"状态",-1)),t("span",{class:P([s(a).isActive?"text-green-600":"text-red-600","font-medium"])},[t("i",{class:P([s(a).isActive?"fas fa-check-circle":"fas fa-times-circle","mr-1"])},null,2),y(" "+r(s(a).isActive?"活跃":"已停用"),1)],2)]),t("div",Tt,[u[2]||(u[2]=t("span",{class:"text-gray-600"},"权限",-1)),t("span",It,r(h(s(a).permissions)),1)]),t("div",Ct,[u[3]||(u[3]=t("span",{class:"text-gray-600"},"创建时间",-1)),t("span",Lt,r(e(s(a).createdAt)),1)]),t("div",Dt,[u[7]||(u[7]=t("span",{class:"text-gray-600"},"过期时间",-1)),s(a).expiresAt?(m(),f("div",Pt,[d(s(a).expiresAt)?(m(),f("div",At,u[4]||(u[4]=[t("i",{class:"fas fa-exclamation-circle mr-1"},null,-1),y(" 已过期 ",-1)]))):v(s(a).expiresAt)?(m(),f("div",Kt,[u[5]||(u[5]=t("i",{class:"fas fa-clock mr-1"},null,-1)),y(" "+r(i(s(a).expiresAt)),1)])):(m(),f("div",Mt,r(i(s(a).expiresAt)),1))])):(m(),f("div",Rt,u[6]||(u[6]=[t("i",{class:"fas fa-infinity mr-1"},null,-1),y(" 永不过期 ",-1)])))])])]),t("div",qt,[t("h3",jt,[u[9]||(u[9]=t("i",{class:"fas fa-chart-bar mr-3 text-green-500"},null,-1)),u[10]||(u[10]=y(" 使用统计概览 ",-1)),t("span",Ut,"("+r(s(l)==="daily"?"今日":"本月")+")",1)]),t("div",Et,[t("div",Nt,[t("div",Ot,r(_(s(c).requests)),1),t("div",Ft,r(s(l)==="daily"?"今日":"本月")+"请求数",1)]),t("div",Vt,[t("div",Wt,r(_(s(c).allTokens)),1),t("div",Jt,r(s(l)==="daily"?"今日":"本月")+"Token数",1)]),t("div",Yt,[t("div",zt,r(s(c).formattedCost||"$0.000000"),1),t("div",Bt,r(s(l)==="daily"?"今日":"本月")+"费用",1)]),t("div",Ht,[t("div",Qt,r(_(s(c).inputTokens)),1),t("div",Gt,r(s(l)==="daily"?"今日":"本月")+"输入Token",1)])])])]))}},Zt=K(Xt,[["__scopeId","data-v-957fdbf9"]]),ts={class:"card p-6"},ss={class:"text-xl font-bold mb-4 flex items-center text-gray-900"},es={class:"text-sm font-normal text-gray-600 ml-2"},as={class:"space-y-3"},is={class:"flex justify-between items-center"},os={class:"font-medium text-gray-900"},ns={class:"flex justify-between items-center"},ls={class:"font-medium text-gray-900"},rs={class:"flex justify-between items-center"},ds={class:"font-medium text-gray-900"},cs={class:"flex justify-between items-center"},us={class:"font-medium text-gray-900"},fs={class:"mt-4 pt-4 border-t border-gray-200"},ms={class:"flex justify-between items-center font-bold text-gray-900"},xs={class:"text-xl"},ys={__name:"TokenDistribution",setup(w){const n=M(),{statsPeriod:a,currentPeriodData:l}=A(n),c=e=>(typeof e!="number"&&(e=parseInt(e)||0),e===0?"0":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e.toLocaleString());return(e,i)=>(m(),f("div",ts,[t("h3",ss,[i[0]||(i[0]=t("i",{class:"fas fa-coins mr-3 text-yellow-500"},null,-1)),i[1]||(i[1]=y(" Token 使用分布 ",-1)),t("span",es,"("+r(s(a)==="daily"?"今日":"本月")+")",1)]),t("div",as,[t("div",is,[i[2]||(i[2]=t("span",{class:"text-gray-600 flex items-center"},[t("i",{class:"fas fa-arrow-right mr-2 text-green-500"}),y(" 输入 Token ")],-1)),t("span",os,r(c(s(l).inputTokens)),1)]),t("div",ns,[i[3]||(i[3]=t("span",{class:"text-gray-600 flex items-center"},[t("i",{class:"fas fa-arrow-left mr-2 text-blue-500"}),y(" 输出 Token ")],-1)),t("span",ls,r(c(s(l).outputTokens)),1)]),t("div",rs,[i[4]||(i[4]=t("span",{class:"text-gray-600 flex items-center"},[t("i",{class:"fas fa-save mr-2 text-purple-500"}),y(" 缓存创建 Token ")],-1)),t("span",ds,r(c(s(l).cacheCreateTokens)),1)]),t("div",cs,[i[5]||(i[5]=t("span",{class:"text-gray-600 flex items-center"},[t("i",{class:"fas fa-download mr-2 text-orange-500"}),y(" 缓存读取 Token ")],-1)),t("span",us,r(c(s(l).cacheReadTokens)),1)])]),t("div",fs,[t("div",ms,[t("span",null,r(s(a)==="daily"?"今日":"本月")+"总计",1),t("span",xs,r(c(s(l).allTokens)),1)])])]))}},ps=K(ys,[["__scopeId","data-v-db41efab"]]),gs={class:"card p-6"},vs={class:"space-y-3"},_s={class:"flex justify-between items-center"},bs={class:"font-medium text-gray-900"},hs={class:"flex justify-between items-center"},$s={class:"font-medium text-gray-900"},ws={class:"flex justify-between items-center"},ks={class:"font-medium text-gray-900"},Ss={class:"flex justify-between items-center"},Ts={class:"font-medium text-gray-900"},Is={class:"flex justify-between items-center"},Cs={class:"font-medium text-gray-900"},Ls={key:0,class:"text-orange-600"},Ds={key:1,class:"text-green-600"},Ps={class:"flex justify-between items-center"},As={class:"font-medium text-gray-900"},Ks={key:0,class:"text-orange-600"},Ms={key:1,class:"text-green-600"},Rs={key:0,class:"card p-6 mt-6"},qs={class:"grid grid-cols-1 lg:grid-cols-2 gap-6"},js={key:0,class:"bg-amber-50 border border-amber-200 rounded-lg p-4"},Us={class:"space-y-2"},Es={class:"text-gray-800"},Ns={key:1,class:"bg-blue-50 border border-blue-200 rounded-lg p-4"},Os={class:"space-y-2"},Fs={class:"text-gray-800"},Vs={__name:"LimitConfig",setup(w){const n=M(),{statsData:a}=A(n),l=c=>(typeof c!="number"&&(c=parseInt(c)||0),c===0?"0":c>=1e6?(c/1e6).toFixed(1)+"M":c>=1e3?(c/1e3).toFixed(1)+"K":c.toLocaleString());return(c,e)=>(m(),f("div",null,[t("div",gs,[e[10]||(e[10]=t("h3",{class:"text-xl font-bold mb-4 flex items-center text-gray-900"},[t("i",{class:"fas fa-shield-alt mr-3 text-red-500"}),y(" 限制配置 ")],-1)),t("div",vs,[t("div",_s,[e[0]||(e[0]=t("span",{class:"text-gray-600"},"Token 限制",-1)),t("span",bs,r(s(a).limits.tokenLimit>0?l(s(a).limits.tokenLimit):"无限制"),1)]),t("div",hs,[e[1]||(e[1]=t("span",{class:"text-gray-600"},"并发限制",-1)),t("span",$s,r(s(a).limits.concurrencyLimit>0?s(a).limits.concurrencyLimit:"无限制"),1)]),t("div",ws,[e[2]||(e[2]=t("span",{class:"text-gray-600"},"速率限制",-1)),t("span",ks,r(s(a).limits.rateLimitRequests>0&&s(a).limits.rateLimitWindow>0?`${s(a).limits.rateLimitRequests}次/${s(a).limits.rateLimitWindow}分钟`:"无限制"),1)]),t("div",Ss,[e[3]||(e[3]=t("span",{class:"text-gray-600"},"每日费用限制",-1)),t("span",Ts,r(s(a).limits.dailyCostLimit>0?"$"+s(a).limits.dailyCostLimit:"无限制"),1)]),t("div",Is,[e[6]||(e[6]=t("span",{class:"text-gray-600"},"模型限制",-1)),t("span",Cs,[s(a).restrictions.enableModelRestriction&&s(a).restrictions.restrictedModels.length>0?(m(),f("span",Ls,[e[4]||(e[4]=t("i",{class:"fas fa-exclamation-triangle mr-1"},null,-1)),y(" 限制 "+r(s(a).restrictions.restrictedModels.length)+" 个模型 ",1)])):(m(),f("span",Ds,e[5]||(e[5]=[t("i",{class:"fas fa-check-circle mr-1"},null,-1),y(" 允许所有模型 ",-1)])))])]),t("div",Ps,[e[9]||(e[9]=t("span",{class:"text-gray-600"},"客户端限制",-1)),t("span",As,[s(a).restrictions.enableClientRestriction&&s(a).restrictions.allowedClients.length>0?(m(),f("span",Ks,[e[7]||(e[7]=t("i",{class:"fas fa-exclamation-triangle mr-1"},null,-1)),y(" 限制 "+r(s(a).restrictions.allowedClients.length)+" 个客户端 ",1)])):(m(),f("span",Ms,e[8]||(e[8]=[t("i",{class:"fas fa-check-circle mr-1"},null,-1),y(" 允许所有客户端 ",-1)])))])])])]),s(a).restrictions.enableModelRestriction&&s(a).restrictions.restrictedModels.length>0||s(a).restrictions.enableClientRestriction&&s(a).restrictions.allowedClients.length>0?(m(),f("div",Rs,[e[17]||(e[17]=t("h3",{class:"text-xl font-bold mb-4 flex items-center text-gray-900"},[t("i",{class:"fas fa-list-alt mr-3 text-amber-500"}),y(" 详细限制信息 ")],-1)),t("div",qs,[s(a).restrictions.enableModelRestriction&&s(a).restrictions.restrictedModels.length>0?(m(),f("div",js,[e[12]||(e[12]=t("h4",{class:"font-bold text-amber-800 mb-3 flex items-center"},[t("i",{class:"fas fa-robot mr-2"}),y(" 受限模型列表 ")],-1)),t("div",Us,[(m(!0),f(O,null,F(s(a).restrictions.restrictedModels,i=>(m(),f("div",{key:i,class:"bg-white rounded px-3 py-2 text-sm border border-amber-200"},[e[11]||(e[11]=t("i",{class:"fas fa-ban mr-2 text-red-500"},null,-1)),t("span",Es,r(i),1)]))),128))]),e[13]||(e[13]=t("p",{class:"text-xs text-amber-700 mt-3"},[t("i",{class:"fas fa-info-circle mr-1"}),y(" 此 API Key 不能访问以上列出的模型 ")],-1))])):C("",!0),s(a).restrictions.enableClientRestriction&&s(a).restrictions.allowedClients.length>0?(m(),f("div",Ns,[e[15]||(e[15]=t("h4",{class:"font-bold text-blue-800 mb-3 flex items-center"},[t("i",{class:"fas fa-desktop mr-2"}),y(" 允许的客户端 ")],-1)),t("div",Os,[(m(!0),f(O,null,F(s(a).restrictions.allowedClients,i=>(m(),f("div",{key:i,class:"bg-white rounded px-3 py-2 text-sm border border-blue-200"},[e[14]||(e[14]=t("i",{class:"fas fa-check mr-2 text-green-500"},null,-1)),t("span",Fs,r(i),1)]))),128))]),e[16]||(e[16]=t("p",{class:"text-xs text-blue-700 mt-3"},[t("i",{class:"fas fa-info-circle mr-1"}),y(" 此 API Key 只能被以上列出的客户端使用 ")],-1))])):C("",!0)])])):C("",!0)]))}},Ws=K(Vs,[["__scopeId","data-v-3163241d"]]),Js={class:"card p-6"},Ys={class:"mb-6"},zs={class:"text-xl font-bold flex items-center text-gray-900"},Bs={class:"text-sm font-normal text-gray-600 ml-2"},Hs={key:0,class:"text-center py-8"},Qs={key:1,class:"space-y-4"},Gs={class:"flex justify-between items-start mb-3"},Xs={class:"font-bold text-lg text-gray-900"},Zs={class:"text-gray-600 text-sm"},te={class:"text-right"},se={class:"text-lg font-bold text-green-600"},ee={class:"grid grid-cols-2 md:grid-cols-4 gap-3 text-sm"},ae={class:"bg-gray-50 rounded p-2"},ie={class:"font-medium text-gray-900"},oe={class:"bg-gray-50 rounded p-2"},ne={class:"font-medium text-gray-900"},le={class:"bg-gray-50 rounded p-2"},re={class:"font-medium text-gray-900"},de={class:"bg-gray-50 rounded p-2"},ce={class:"font-medium text-gray-900"},ue={key:2,class:"text-center py-8 text-gray-500"},fe={__name:"ModelUsageStats",setup(w){const n=M(),{statsPeriod:a,modelStats:l,modelStatsLoading:c}=A(n),e=i=>(typeof i!="number"&&(i=parseInt(i)||0),i===0?"0":i>=1e6?(i/1e6).toFixed(1)+"M":i>=1e3?(i/1e3).toFixed(1)+"K":i.toLocaleString());return(i,d)=>(m(),f("div",Js,[t("div",Ys,[t("h3",zs,[d[0]||(d[0]=t("i",{class:"fas fa-robot mr-3 text-indigo-500"},null,-1)),d[1]||(d[1]=y(" 模型使用统计 ",-1)),t("span",Bs,"("+r(s(a)==="daily"?"今日":"本月")+")",1)])]),s(c)?(m(),f("div",Hs,d[2]||(d[2]=[t("i",{class:"fas fa-spinner loading-spinner text-2xl mb-2 text-gray-600"},null,-1),t("p",{class:"text-gray-600"},"加载模型统计数据中...",-1)]))):s(l).length>0?(m(),f("div",Qs,[(m(!0),f(O,null,F(s(l),(v,_)=>{var h;return m(),f("div",{key:_,class:"model-usage-item"},[t("div",Gs,[t("div",null,[t("h4",Xs,r(v.model),1),t("p",Zs,r(v.requests)+" 次请求",1)]),t("div",te,[t("div",se,r(((h=v.formatted)==null?void 0:h.total)||"$0.000000"),1),d[3]||(d[3]=t("div",{class:"text-sm text-gray-600"},"总费用",-1))])]),t("div",ee,[t("div",ae,[d[4]||(d[4]=t("div",{class:"text-gray-600"},"输入 Token",-1)),t("div",ie,r(e(v.inputTokens)),1)]),t("div",oe,[d[5]||(d[5]=t("div",{class:"text-gray-600"},"输出 Token",-1)),t("div",ne,r(e(v.outputTokens)),1)]),t("div",le,[d[6]||(d[6]=t("div",{class:"text-gray-600"},"缓存创建",-1)),t("div",re,r(e(v.cacheCreateTokens)),1)]),t("div",de,[d[7]||(d[7]=t("div",{class:"text-gray-600"},"缓存读取",-1)),t("div",ce,r(e(v.cacheReadTokens)),1)])])])}),128))])):(m(),f("div",ue,[d[8]||(d[8]=t("i",{class:"fas fa-chart-pie text-3xl mb-3"},null,-1)),t("p",null,"暂无"+r(s(a)==="daily"?"今日":"本月")+"模型使用数据",1)]))]))}},me=K(fe,[["__scopeId","data-v-b5e42c0c"]]),xe={class:"min-h-screen gradient-bg p-6"},ye={class:"glass-strong rounded-3xl p-6 mb-8 shadow-xl"},pe={class:"flex flex-col md:flex-row justify-between items-center gap-4"},ge={class:"flex items-center gap-3"},ve={class:"mb-8"},_e={class:"flex justify-center"},be={class:"inline-flex bg-white/10 backdrop-blur-xl rounded-full p-1 shadow-lg border border-white/20"},he={key:0,class:"tab-content"},$e={key:0,class:"mb-8"},we={class:"bg-red-500/20 border border-red-500/30 rounded-xl p-4 text-red-800 backdrop-blur-sm"},ke={key:1,class:"fade-in"},Se={class:"glass-strong rounded-3xl p-6 shadow-xl"},Te={class:"mb-6 pb-6 border-b border-gray-200"},Ie={class:"flex flex-col md:flex-row items-start md:items-center justify-between gap-4"},Ce={class:"flex gap-2"},Le=["disabled"],De=["disabled"],Pe={class:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8"},Ae={key:1,class:"tab-content"},Ke={class:"glass-strong rounded-3xl shadow-xl"},Me={__name:"ApiStatsView",setup(w){const n=tt(),a=M(),l=$("stats"),{apiKey:c,apiId:e,loading:i,modelStatsLoading:d,oemLoading:v,error:_,statsPeriod:h,statsData:x,oemSettings:u}=A(a),{queryStats:U,switchPeriod:T,loadStatsWithApiId:R,loadOemSettings:L,reset:q}=a,E=b=>{(b.ctrlKey||b.metaKey)&&b.key==="Enter"&&(!i.value&&c.value.trim()&&U(),b.preventDefault()),b.key==="Escape"&&q()};return Z(()=>{console.log("API Stats Page loaded"),L();const b=n.query.apiId,p=n.query.apiKey;b&&b.match(/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i)?(e.value=b,R()):p&&p.length>10&&(c.value=p),document.addEventListener("keydown",E)}),st(()=>{document.removeEventListener("keydown",E)}),et(c,b=>{b||a.clearData()}),(b,p)=>{const N=it("router-link");return m(),f("div",xe,[t("div",ye,[t("div",pe,[S(ot,{loading:s(v),title:s(u).siteName,subtitle:l.value==="stats"?"API Key 使用统计":"使用教程","logo-src":s(u).siteIconData||s(u).siteIcon},null,8,["loading","title","subtitle","logo-src"]),t("div",ge,[S(N,{to:"/dashboard",class:"admin-button rounded-xl px-4 py-2 text-white transition-all duration-300 flex items-center gap-2"},{default:at(()=>p[4]||(p[4]=[t("i",{class:"fas fa-cog text-sm"},null,-1),t("span",{class:"text-sm font-medium"},"管理后台",-1)])),_:1,__:[4]})])])]),t("div",ve,[t("div",_e,[t("div",be,[t("button",{onClick:p[0]||(p[0]=j=>l.value="stats"),class:P(["tab-pill-button",l.value==="stats"?"active":""])},p[5]||(p[5]=[t("i",{class:"fas fa-chart-line mr-2"},null,-1),t("span",null,"统计查询",-1)]),2),t("button",{onClick:p[1]||(p[1]=j=>l.value="tutorial"),class:P(["tab-pill-button",l.value==="tutorial"?"active":""])},p[6]||(p[6]=[t("i",{class:"fas fa-graduation-cap mr-2"},null,-1),t("span",null,"使用教程",-1)]),2)])])]),l.value==="stats"?(m(),f("div",he,[S(_t),s(_)?(m(),f("div",$e,[t("div",we,[p[7]||(p[7]=t("i",{class:"fas fa-exclamation-triangle mr-2"},null,-1)),y(" "+r(s(_)),1)])])):C("",!0),s(x)?(m(),f("div",ke,[t("div",Se,[t("div",Te,[t("div",Ie,[p[10]||(p[10]=t("div",{class:"flex items-center gap-3"},[t("i",{class:"fas fa-clock text-blue-500 text-lg"}),t("span",{class:"text-lg font-medium text-gray-700"},"统计时间范围")],-1)),t("div",Ce,[t("button",{onClick:p[2]||(p[2]=j=>s(T)("daily")),class:P([["period-btn",{active:s(h)==="daily"}],"px-6 py-2 text-sm font-medium flex items-center gap-2"]),disabled:s(i)||s(d)},p[8]||(p[8]=[t("i",{class:"fas fa-calendar-day"},null,-1),y(" 今日 ",-1)]),10,Le),t("button",{onClick:p[3]||(p[3]=j=>s(T)("monthly")),class:P([["period-btn",{active:s(h)==="monthly"}],"px-6 py-2 text-sm font-medium flex items-center gap-2"]),disabled:s(i)||s(d)},p[9]||(p[9]=[t("i",{class:"fas fa-calendar-alt"},null,-1),y(" 本月 ",-1)]),10,De)])])]),S(Zt),t("div",Pe,[S(ps),S(Ws)]),S(me)])])):C("",!0)])):C("",!0),l.value==="tutorial"?(m(),f("div",Ae,[t("div",Ke,[S(lt)])])):C("",!0)])}}},Fe=K(Me,[["__scopeId","data-v-4e1404f4"]]);export{Fe as default};
+import{aR as B,r as $,c as J,aW as A,x as f,y as m,z as t,O as y,K as H,aq as Q,u as s,aa as G,f as X,P as r,C as P,L as C,Q as O,ac as F,q as Z,aU as tt,V as st,o as et,R as S,J as at,av as it}from"./vue-vendor-CKToUHZx.js";import{L as ot}from"./LogoTitle-hKoMpRxB.js";import{_ as K}from"./index-CJmHAjMf.js";import{b as nt}from"./vendor-BDiMbLwQ.js";import lt from"./TutorialView-IE8R1R6Q.js";/* empty css */import"./element-plus-B8Fs_0jW.js";class rt{constructor(){this.baseURL=window.location.origin,this.isDev=!1}async request(n,a={}){try{this.isDev&&n.startsWith("/admin")&&(n="/webapi"+n);const l=await fetch(`${this.baseURL}${n}`,{headers:{"Content-Type":"application/json",...a.headers},...a}),c=await l.json();if(!l.ok)throw new Error(c.message||`请求失败: ${l.status}`);return c}catch(l){throw console.error("API Stats request error:",l),l}}async getKeyId(n){return this.request("/apiStats/api/get-key-id",{method:"POST",body:JSON.stringify({apiKey:n})})}async getUserStats(n){return this.request("/apiStats/api/user-stats",{method:"POST",body:JSON.stringify({apiId:n})})}async getUserModelStats(n,a="daily"){return this.request("/apiStats/api/user-model-stats",{method:"POST",body:JSON.stringify({apiId:n,period:a})})}async getOemSettings(){try{return await this.request("/admin/oem-settings")}catch(n){return console.error("Failed to load OEM settings:",n),{success:!0,data:{siteName:"Claude Relay Service",siteIcon:"",siteIconData:""}}}}}const D=new rt,M=B("apistats",()=>{const w=$(""),n=$(null),a=$(!1),l=$(!1),c=$(!0),e=$(""),i=$("daily"),d=$(null),v=$([]),_=$(null),h=$(null),x=$({siteName:"",siteIcon:"",siteIconData:""}),u=J(()=>{const o={requests:0,inputTokens:0,outputTokens:0,cacheCreateTokens:0,cacheReadTokens:0,allTokens:0,cost:0,formattedCost:"$0.000000"};return i.value==="daily"?_.value||o:h.value||o}),U=J(()=>{if(!d.value||!u.value)return{tokenUsage:0,costUsage:0,requestUsage:0};const o=u.value,g=d.value.limits;return{tokenUsage:g.tokenLimit>0?Math.min(o.allTokens/g.tokenLimit*100,100):0,costUsage:g.dailyCostLimit>0?Math.min(o.cost/g.dailyCostLimit*100,100):0,requestUsage:g.rateLimitRequests>0?Math.min(o.requests/g.rateLimitRequests*100,100):0}});async function T(){if(!w.value.trim()){e.value="请输入 API Key";return}a.value=!0,e.value="",d.value=null,v.value=[],n.value=null;try{const o=await D.getKeyId(w.value);if(o.success){n.value=o.data.id;const g=await D.getUserStats(n.value);if(g.success)d.value=g.data,await R(),e.value="",j();else throw new Error(g.message||"查询失败")}else throw new Error(o.message||"获取 API Key ID 失败")}catch(o){console.error("Query stats error:",o),e.value=o.message||"查询统计数据失败,请检查您的 API Key 是否正确",d.value=null,v.value=[],n.value=null}finally{a.value=!1}}async function R(){n.value&&(await Promise.all([L("daily"),L("monthly")]),await q(i.value))}async function L(o){try{const g=await D.getUserModelStats(n.value,o);if(g.success){const z=g.data||[],k={requests:0,inputTokens:0,outputTokens:0,cacheCreateTokens:0,cacheReadTokens:0,allTokens:0,cost:0,formattedCost:"$0.000000"};z.forEach(I=>{var W;k.requests+=I.requests||0,k.inputTokens+=I.inputTokens||0,k.outputTokens+=I.outputTokens||0,k.cacheCreateTokens+=I.cacheCreateTokens||0,k.cacheReadTokens+=I.cacheReadTokens||0,k.allTokens+=I.allTokens||0,k.cost+=((W=I.costs)==null?void 0:W.total)||0}),k.formattedCost=N(k.cost),o==="daily"?_.value=k:h.value=k}else console.warn(`Failed to load ${o} stats:`,g.message)}catch(g){console.error(`Load ${o} stats error:`,g)}}async function q(o="daily"){if(n.value){l.value=!0;try{const g=await D.getUserModelStats(n.value,o);if(g.success)v.value=g.data||[];else throw new Error(g.message||"加载模型统计失败")}catch(g){console.error("Load model stats error:",g),v.value=[]}finally{l.value=!1}}}async function E(o){i.value===o||l.value||(i.value=o,(o==="daily"&&!_.value||o==="monthly"&&!h.value)&&await L(o),await q(o))}async function b(){if(n.value){a.value=!0,e.value="",d.value=null,v.value=[];try{const o=await D.getUserStats(n.value);if(o.success)d.value=o.data,await R(),e.value="";else throw new Error(o.message||"查询失败")}catch(o){console.error("Load stats with apiId error:",o),e.value=o.message||"查询统计数据失败",d.value=null,v.value=[]}finally{a.value=!1}}}async function p(){c.value=!0;try{const o=await D.getOemSettings();o&&o.success&&o.data&&(x.value={...x.value,...o.data})}catch(o){console.error("Error loading OEM settings:",o),x.value={siteName:"Claude Relay Service",siteIcon:"",siteIconData:""}}finally{c.value=!1}}function N(o){return typeof o!="number"||o===0?"$0.000000":o>=1?"$"+o.toFixed(2):o>=.01?"$"+o.toFixed(4):"$"+o.toFixed(6)}function j(){if(n.value){const o=new URL(window.location);o.searchParams.set("apiId",n.value),window.history.pushState({},"",o)}}function V(){d.value=null,v.value=[],_.value=null,h.value=null,e.value="",i.value="daily",n.value=null}function Y(){w.value="",V()}return{apiKey:w,apiId:n,loading:a,modelStatsLoading:l,oemLoading:c,error:e,statsPeriod:i,statsData:d,modelStats:v,dailyStats:_,monthlyStats:h,oemSettings:x,currentPeriodData:u,usagePercentages:U,queryStats:T,loadAllPeriodStats:R,loadPeriodStats:L,loadModelStats:q,switchPeriod:E,loadStatsWithApiId:b,loadOemSettings:p,clearData:V,reset:Y}}),dt={class:"api-input-wide-card glass-strong rounded-3xl p-6 mb-8 shadow-xl"},ct={class:"max-w-4xl mx-auto"},ut={class:"api-input-grid grid grid-cols-1 lg:grid-cols-4"},ft={class:"lg:col-span-3"},mt=["disabled"],xt={class:"lg:col-span-1"},yt=["disabled"],pt={key:0,class:"fas fa-spinner loading-spinner"},gt={key:1,class:"fas fa-search"},vt={__name:"ApiKeyInput",setup(w){const n=M(),{apiKey:a,loading:l}=A(n),{queryStats:c}=n;return(e,i)=>(m(),f("div",dt,[i[6]||(i[6]=t("div",{class:"wide-card-title text-center mb-6"},[t("h2",{class:"text-2xl font-bold mb-2"},[t("i",{class:"fas fa-chart-line mr-3"}),y(" 使用统计查询 ")]),t("p",{class:"text-base text-gray-600"},"查询您的 API Key 使用情况和统计数据")],-1)),t("div",ct,[t("div",ut,[t("div",ft,[i[3]||(i[3]=t("label",{class:"block text-sm font-medium mb-2 text-gray-700"},[t("i",{class:"fas fa-key mr-2"}),y(" 输入您的 API Key ")],-1)),H(t("input",{"onUpdate:modelValue":i[0]||(i[0]=d=>X(a)?a.value=d:null),type:"password",placeholder:"请输入您的 API Key (cr_...)",class:"wide-card-input w-full",onKeyup:i[1]||(i[1]=G((...d)=>s(c)&&s(c)(...d),["enter"])),disabled:s(l)},null,40,mt),[[Q,s(a)]])]),t("div",xt,[i[4]||(i[4]=t("label",{class:"hidden lg:block text-sm font-medium mb-2 text-gray-700"}," ",-1)),t("button",{onClick:i[2]||(i[2]=(...d)=>s(c)&&s(c)(...d)),disabled:s(l)||!s(a).trim(),class:"btn btn-primary btn-query w-full h-full flex items-center justify-center gap-2"},[s(l)?(m(),f("i",pt)):(m(),f("i",gt)),y(" "+r(s(l)?"查询中...":"查询统计"),1)],8,yt)])]),i[5]||(i[5]=t("div",{class:"security-notice mt-4"},[t("i",{class:"fas fa-shield-alt mr-2"}),y(" 您的 API Key 仅用于查询自己的统计数据,不会被存储或用于其他用途 ")],-1))])]))}},_t=K(vt,[["__scopeId","data-v-a4be9e3c"]]),bt={class:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8"},ht={class:"card p-6"},$t={class:"space-y-3"},wt={class:"flex justify-between items-center"},kt={class:"font-medium text-gray-900"},St={class:"flex justify-between items-center"},Tt={class:"flex justify-between items-center"},It={class:"font-medium text-gray-900"},Ct={class:"flex justify-between items-center"},Lt={class:"font-medium text-gray-900"},Dt={class:"flex justify-between items-center"},Pt={key:0},At={key:0,class:"text-red-600 font-medium"},Kt={key:1,class:"text-orange-600 font-medium"},Mt={key:2,class:"text-gray-900 font-medium"},Rt={key:1,class:"text-gray-400 font-medium"},qt={class:"card p-6"},jt={class:"text-xl font-bold mb-4 flex items-center text-gray-900"},Ut={class:"text-sm font-normal text-gray-600 ml-2"},Et={class:"grid grid-cols-2 gap-4"},Nt={class:"stat-card text-center"},Ot={class:"text-3xl font-bold text-green-600"},Ft={class:"text-sm text-gray-600"},Vt={class:"stat-card text-center"},Wt={class:"text-3xl font-bold text-blue-600"},Jt={class:"text-sm text-gray-600"},Yt={class:"stat-card text-center"},zt={class:"text-3xl font-bold text-purple-600"},Bt={class:"text-sm text-gray-600"},Ht={class:"stat-card text-center"},Qt={class:"text-3xl font-bold text-yellow-600"},Gt={class:"text-sm text-gray-600"},Xt={__name:"StatsOverview",setup(w){const n=M(),{statsData:a,statsPeriod:l,currentPeriodData:c}=A(n),e=x=>{if(!x)return"无";try{return nt(x).format("YYYY年MM月DD日 HH:mm")}catch{return"格式错误"}},i=x=>x?new Date(x).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}):"",d=x=>x?new Date(x){if(!x)return!1;const T=(new Date(x)-new Date)/(1e3*60*60*24);return T>0&&T<=7},_=x=>(typeof x!="number"&&(x=parseInt(x)||0),x===0?"0":x>=1e6?(x/1e6).toFixed(1)+"M":x>=1e3?(x/1e3).toFixed(1)+"K":x.toLocaleString()),h=x=>({claude:"Claude",gemini:"Gemini",all:"全部模型"})[x]||x||"未知";return(x,u)=>(m(),f("div",bt,[t("div",ht,[u[8]||(u[8]=t("h3",{class:"text-xl font-bold mb-4 flex items-center text-gray-900"},[t("i",{class:"fas fa-info-circle mr-3 text-blue-500"}),y(" API Key 信息 ")],-1)),t("div",$t,[t("div",wt,[u[0]||(u[0]=t("span",{class:"text-gray-600"},"名称",-1)),t("span",kt,r(s(a).name),1)]),t("div",St,[u[1]||(u[1]=t("span",{class:"text-gray-600"},"状态",-1)),t("span",{class:P([s(a).isActive?"text-green-600":"text-red-600","font-medium"])},[t("i",{class:P([s(a).isActive?"fas fa-check-circle":"fas fa-times-circle","mr-1"])},null,2),y(" "+r(s(a).isActive?"活跃":"已停用"),1)],2)]),t("div",Tt,[u[2]||(u[2]=t("span",{class:"text-gray-600"},"权限",-1)),t("span",It,r(h(s(a).permissions)),1)]),t("div",Ct,[u[3]||(u[3]=t("span",{class:"text-gray-600"},"创建时间",-1)),t("span",Lt,r(e(s(a).createdAt)),1)]),t("div",Dt,[u[7]||(u[7]=t("span",{class:"text-gray-600"},"过期时间",-1)),s(a).expiresAt?(m(),f("div",Pt,[d(s(a).expiresAt)?(m(),f("div",At,u[4]||(u[4]=[t("i",{class:"fas fa-exclamation-circle mr-1"},null,-1),y(" 已过期 ",-1)]))):v(s(a).expiresAt)?(m(),f("div",Kt,[u[5]||(u[5]=t("i",{class:"fas fa-clock mr-1"},null,-1)),y(" "+r(i(s(a).expiresAt)),1)])):(m(),f("div",Mt,r(i(s(a).expiresAt)),1))])):(m(),f("div",Rt,u[6]||(u[6]=[t("i",{class:"fas fa-infinity mr-1"},null,-1),y(" 永不过期 ",-1)])))])])]),t("div",qt,[t("h3",jt,[u[9]||(u[9]=t("i",{class:"fas fa-chart-bar mr-3 text-green-500"},null,-1)),u[10]||(u[10]=y(" 使用统计概览 ",-1)),t("span",Ut,"("+r(s(l)==="daily"?"今日":"本月")+")",1)]),t("div",Et,[t("div",Nt,[t("div",Ot,r(_(s(c).requests)),1),t("div",Ft,r(s(l)==="daily"?"今日":"本月")+"请求数",1)]),t("div",Vt,[t("div",Wt,r(_(s(c).allTokens)),1),t("div",Jt,r(s(l)==="daily"?"今日":"本月")+"Token数",1)]),t("div",Yt,[t("div",zt,r(s(c).formattedCost||"$0.000000"),1),t("div",Bt,r(s(l)==="daily"?"今日":"本月")+"费用",1)]),t("div",Ht,[t("div",Qt,r(_(s(c).inputTokens)),1),t("div",Gt,r(s(l)==="daily"?"今日":"本月")+"输入Token",1)])])])]))}},Zt=K(Xt,[["__scopeId","data-v-957fdbf9"]]),ts={class:"card p-6"},ss={class:"text-xl font-bold mb-4 flex items-center text-gray-900"},es={class:"text-sm font-normal text-gray-600 ml-2"},as={class:"space-y-3"},is={class:"flex justify-between items-center"},os={class:"font-medium text-gray-900"},ns={class:"flex justify-between items-center"},ls={class:"font-medium text-gray-900"},rs={class:"flex justify-between items-center"},ds={class:"font-medium text-gray-900"},cs={class:"flex justify-between items-center"},us={class:"font-medium text-gray-900"},fs={class:"mt-4 pt-4 border-t border-gray-200"},ms={class:"flex justify-between items-center font-bold text-gray-900"},xs={class:"text-xl"},ys={__name:"TokenDistribution",setup(w){const n=M(),{statsPeriod:a,currentPeriodData:l}=A(n),c=e=>(typeof e!="number"&&(e=parseInt(e)||0),e===0?"0":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e.toLocaleString());return(e,i)=>(m(),f("div",ts,[t("h3",ss,[i[0]||(i[0]=t("i",{class:"fas fa-coins mr-3 text-yellow-500"},null,-1)),i[1]||(i[1]=y(" Token 使用分布 ",-1)),t("span",es,"("+r(s(a)==="daily"?"今日":"本月")+")",1)]),t("div",as,[t("div",is,[i[2]||(i[2]=t("span",{class:"text-gray-600 flex items-center"},[t("i",{class:"fas fa-arrow-right mr-2 text-green-500"}),y(" 输入 Token ")],-1)),t("span",os,r(c(s(l).inputTokens)),1)]),t("div",ns,[i[3]||(i[3]=t("span",{class:"text-gray-600 flex items-center"},[t("i",{class:"fas fa-arrow-left mr-2 text-blue-500"}),y(" 输出 Token ")],-1)),t("span",ls,r(c(s(l).outputTokens)),1)]),t("div",rs,[i[4]||(i[4]=t("span",{class:"text-gray-600 flex items-center"},[t("i",{class:"fas fa-save mr-2 text-purple-500"}),y(" 缓存创建 Token ")],-1)),t("span",ds,r(c(s(l).cacheCreateTokens)),1)]),t("div",cs,[i[5]||(i[5]=t("span",{class:"text-gray-600 flex items-center"},[t("i",{class:"fas fa-download mr-2 text-orange-500"}),y(" 缓存读取 Token ")],-1)),t("span",us,r(c(s(l).cacheReadTokens)),1)])]),t("div",fs,[t("div",ms,[t("span",null,r(s(a)==="daily"?"今日":"本月")+"总计",1),t("span",xs,r(c(s(l).allTokens)),1)])])]))}},ps=K(ys,[["__scopeId","data-v-db41efab"]]),gs={class:"card p-6"},vs={class:"space-y-3"},_s={class:"flex justify-between items-center"},bs={class:"font-medium text-gray-900"},hs={class:"flex justify-between items-center"},$s={class:"font-medium text-gray-900"},ws={class:"flex justify-between items-center"},ks={class:"font-medium text-gray-900"},Ss={class:"flex justify-between items-center"},Ts={class:"font-medium text-gray-900"},Is={class:"flex justify-between items-center"},Cs={class:"font-medium text-gray-900"},Ls={key:0,class:"text-orange-600"},Ds={key:1,class:"text-green-600"},Ps={class:"flex justify-between items-center"},As={class:"font-medium text-gray-900"},Ks={key:0,class:"text-orange-600"},Ms={key:1,class:"text-green-600"},Rs={key:0,class:"card p-6 mt-6"},qs={class:"grid grid-cols-1 lg:grid-cols-2 gap-6"},js={key:0,class:"bg-amber-50 border border-amber-200 rounded-lg p-4"},Us={class:"space-y-2"},Es={class:"text-gray-800"},Ns={key:1,class:"bg-blue-50 border border-blue-200 rounded-lg p-4"},Os={class:"space-y-2"},Fs={class:"text-gray-800"},Vs={__name:"LimitConfig",setup(w){const n=M(),{statsData:a}=A(n),l=c=>(typeof c!="number"&&(c=parseInt(c)||0),c===0?"0":c>=1e6?(c/1e6).toFixed(1)+"M":c>=1e3?(c/1e3).toFixed(1)+"K":c.toLocaleString());return(c,e)=>(m(),f("div",null,[t("div",gs,[e[10]||(e[10]=t("h3",{class:"text-xl font-bold mb-4 flex items-center text-gray-900"},[t("i",{class:"fas fa-shield-alt mr-3 text-red-500"}),y(" 限制配置 ")],-1)),t("div",vs,[t("div",_s,[e[0]||(e[0]=t("span",{class:"text-gray-600"},"Token 限制",-1)),t("span",bs,r(s(a).limits.tokenLimit>0?l(s(a).limits.tokenLimit):"无限制"),1)]),t("div",hs,[e[1]||(e[1]=t("span",{class:"text-gray-600"},"并发限制",-1)),t("span",$s,r(s(a).limits.concurrencyLimit>0?s(a).limits.concurrencyLimit:"无限制"),1)]),t("div",ws,[e[2]||(e[2]=t("span",{class:"text-gray-600"},"速率限制",-1)),t("span",ks,r(s(a).limits.rateLimitRequests>0&&s(a).limits.rateLimitWindow>0?`${s(a).limits.rateLimitRequests}次/${s(a).limits.rateLimitWindow}分钟`:"无限制"),1)]),t("div",Ss,[e[3]||(e[3]=t("span",{class:"text-gray-600"},"每日费用限制",-1)),t("span",Ts,r(s(a).limits.dailyCostLimit>0?"$"+s(a).limits.dailyCostLimit:"无限制"),1)]),t("div",Is,[e[6]||(e[6]=t("span",{class:"text-gray-600"},"模型限制",-1)),t("span",Cs,[s(a).restrictions.enableModelRestriction&&s(a).restrictions.restrictedModels.length>0?(m(),f("span",Ls,[e[4]||(e[4]=t("i",{class:"fas fa-exclamation-triangle mr-1"},null,-1)),y(" 限制 "+r(s(a).restrictions.restrictedModels.length)+" 个模型 ",1)])):(m(),f("span",Ds,e[5]||(e[5]=[t("i",{class:"fas fa-check-circle mr-1"},null,-1),y(" 允许所有模型 ",-1)])))])]),t("div",Ps,[e[9]||(e[9]=t("span",{class:"text-gray-600"},"客户端限制",-1)),t("span",As,[s(a).restrictions.enableClientRestriction&&s(a).restrictions.allowedClients.length>0?(m(),f("span",Ks,[e[7]||(e[7]=t("i",{class:"fas fa-exclamation-triangle mr-1"},null,-1)),y(" 限制 "+r(s(a).restrictions.allowedClients.length)+" 个客户端 ",1)])):(m(),f("span",Ms,e[8]||(e[8]=[t("i",{class:"fas fa-check-circle mr-1"},null,-1),y(" 允许所有客户端 ",-1)])))])])])]),s(a).restrictions.enableModelRestriction&&s(a).restrictions.restrictedModels.length>0||s(a).restrictions.enableClientRestriction&&s(a).restrictions.allowedClients.length>0?(m(),f("div",Rs,[e[17]||(e[17]=t("h3",{class:"text-xl font-bold mb-4 flex items-center text-gray-900"},[t("i",{class:"fas fa-list-alt mr-3 text-amber-500"}),y(" 详细限制信息 ")],-1)),t("div",qs,[s(a).restrictions.enableModelRestriction&&s(a).restrictions.restrictedModels.length>0?(m(),f("div",js,[e[12]||(e[12]=t("h4",{class:"font-bold text-amber-800 mb-3 flex items-center"},[t("i",{class:"fas fa-robot mr-2"}),y(" 受限模型列表 ")],-1)),t("div",Us,[(m(!0),f(O,null,F(s(a).restrictions.restrictedModels,i=>(m(),f("div",{key:i,class:"bg-white rounded px-3 py-2 text-sm border border-amber-200"},[e[11]||(e[11]=t("i",{class:"fas fa-ban mr-2 text-red-500"},null,-1)),t("span",Es,r(i),1)]))),128))]),e[13]||(e[13]=t("p",{class:"text-xs text-amber-700 mt-3"},[t("i",{class:"fas fa-info-circle mr-1"}),y(" 此 API Key 不能访问以上列出的模型 ")],-1))])):C("",!0),s(a).restrictions.enableClientRestriction&&s(a).restrictions.allowedClients.length>0?(m(),f("div",Ns,[e[15]||(e[15]=t("h4",{class:"font-bold text-blue-800 mb-3 flex items-center"},[t("i",{class:"fas fa-desktop mr-2"}),y(" 允许的客户端 ")],-1)),t("div",Os,[(m(!0),f(O,null,F(s(a).restrictions.allowedClients,i=>(m(),f("div",{key:i,class:"bg-white rounded px-3 py-2 text-sm border border-blue-200"},[e[14]||(e[14]=t("i",{class:"fas fa-check mr-2 text-green-500"},null,-1)),t("span",Fs,r(i),1)]))),128))]),e[16]||(e[16]=t("p",{class:"text-xs text-blue-700 mt-3"},[t("i",{class:"fas fa-info-circle mr-1"}),y(" 此 API Key 只能被以上列出的客户端使用 ")],-1))])):C("",!0)])])):C("",!0)]))}},Ws=K(Vs,[["__scopeId","data-v-3163241d"]]),Js={class:"card p-6"},Ys={class:"mb-6"},zs={class:"text-xl font-bold flex items-center text-gray-900"},Bs={class:"text-sm font-normal text-gray-600 ml-2"},Hs={key:0,class:"text-center py-8"},Qs={key:1,class:"space-y-4"},Gs={class:"flex justify-between items-start mb-3"},Xs={class:"font-bold text-lg text-gray-900"},Zs={class:"text-gray-600 text-sm"},te={class:"text-right"},se={class:"text-lg font-bold text-green-600"},ee={class:"grid grid-cols-2 md:grid-cols-4 gap-3 text-sm"},ae={class:"bg-gray-50 rounded p-2"},ie={class:"font-medium text-gray-900"},oe={class:"bg-gray-50 rounded p-2"},ne={class:"font-medium text-gray-900"},le={class:"bg-gray-50 rounded p-2"},re={class:"font-medium text-gray-900"},de={class:"bg-gray-50 rounded p-2"},ce={class:"font-medium text-gray-900"},ue={key:2,class:"text-center py-8 text-gray-500"},fe={__name:"ModelUsageStats",setup(w){const n=M(),{statsPeriod:a,modelStats:l,modelStatsLoading:c}=A(n),e=i=>(typeof i!="number"&&(i=parseInt(i)||0),i===0?"0":i>=1e6?(i/1e6).toFixed(1)+"M":i>=1e3?(i/1e3).toFixed(1)+"K":i.toLocaleString());return(i,d)=>(m(),f("div",Js,[t("div",Ys,[t("h3",zs,[d[0]||(d[0]=t("i",{class:"fas fa-robot mr-3 text-indigo-500"},null,-1)),d[1]||(d[1]=y(" 模型使用统计 ",-1)),t("span",Bs,"("+r(s(a)==="daily"?"今日":"本月")+")",1)])]),s(c)?(m(),f("div",Hs,d[2]||(d[2]=[t("i",{class:"fas fa-spinner loading-spinner text-2xl mb-2 text-gray-600"},null,-1),t("p",{class:"text-gray-600"},"加载模型统计数据中...",-1)]))):s(l).length>0?(m(),f("div",Qs,[(m(!0),f(O,null,F(s(l),(v,_)=>{var h;return m(),f("div",{key:_,class:"model-usage-item"},[t("div",Gs,[t("div",null,[t("h4",Xs,r(v.model),1),t("p",Zs,r(v.requests)+" 次请求",1)]),t("div",te,[t("div",se,r(((h=v.formatted)==null?void 0:h.total)||"$0.000000"),1),d[3]||(d[3]=t("div",{class:"text-sm text-gray-600"},"总费用",-1))])]),t("div",ee,[t("div",ae,[d[4]||(d[4]=t("div",{class:"text-gray-600"},"输入 Token",-1)),t("div",ie,r(e(v.inputTokens)),1)]),t("div",oe,[d[5]||(d[5]=t("div",{class:"text-gray-600"},"输出 Token",-1)),t("div",ne,r(e(v.outputTokens)),1)]),t("div",le,[d[6]||(d[6]=t("div",{class:"text-gray-600"},"缓存创建",-1)),t("div",re,r(e(v.cacheCreateTokens)),1)]),t("div",de,[d[7]||(d[7]=t("div",{class:"text-gray-600"},"缓存读取",-1)),t("div",ce,r(e(v.cacheReadTokens)),1)])])])}),128))])):(m(),f("div",ue,[d[8]||(d[8]=t("i",{class:"fas fa-chart-pie text-3xl mb-3"},null,-1)),t("p",null,"暂无"+r(s(a)==="daily"?"今日":"本月")+"模型使用数据",1)]))]))}},me=K(fe,[["__scopeId","data-v-b5e42c0c"]]),xe={class:"min-h-screen gradient-bg p-6"},ye={class:"glass-strong rounded-3xl p-6 mb-8 shadow-xl"},pe={class:"flex flex-col md:flex-row justify-between items-center gap-4"},ge={class:"flex items-center gap-3"},ve={class:"mb-8"},_e={class:"flex justify-center"},be={class:"inline-flex bg-white/10 backdrop-blur-xl rounded-full p-1 shadow-lg border border-white/20"},he={key:0,class:"tab-content"},$e={key:0,class:"mb-8"},we={class:"bg-red-500/20 border border-red-500/30 rounded-xl p-4 text-red-800 backdrop-blur-sm"},ke={key:1,class:"fade-in"},Se={class:"glass-strong rounded-3xl p-6 shadow-xl"},Te={class:"mb-6 pb-6 border-b border-gray-200"},Ie={class:"flex flex-col md:flex-row items-start md:items-center justify-between gap-4"},Ce={class:"flex gap-2"},Le=["disabled"],De=["disabled"],Pe={class:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8"},Ae={key:1,class:"tab-content"},Ke={class:"glass-strong rounded-3xl shadow-xl"},Me={__name:"ApiStatsView",setup(w){const n=tt(),a=M(),l=$("stats"),{apiKey:c,apiId:e,loading:i,modelStatsLoading:d,oemLoading:v,error:_,statsPeriod:h,statsData:x,oemSettings:u}=A(a),{queryStats:U,switchPeriod:T,loadStatsWithApiId:R,loadOemSettings:L,reset:q}=a,E=b=>{(b.ctrlKey||b.metaKey)&&b.key==="Enter"&&(!i.value&&c.value.trim()&&U(),b.preventDefault()),b.key==="Escape"&&q()};return Z(()=>{console.log("API Stats Page loaded"),L();const b=n.query.apiId,p=n.query.apiKey;b&&b.match(/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i)?(e.value=b,R()):p&&p.length>10&&(c.value=p),document.addEventListener("keydown",E)}),st(()=>{document.removeEventListener("keydown",E)}),et(c,b=>{b||a.clearData()}),(b,p)=>{const N=it("router-link");return m(),f("div",xe,[t("div",ye,[t("div",pe,[S(ot,{loading:s(v),title:s(u).siteName,subtitle:l.value==="stats"?"API Key 使用统计":"使用教程","logo-src":s(u).siteIconData||s(u).siteIcon},null,8,["loading","title","subtitle","logo-src"]),t("div",ge,[S(N,{to:"/dashboard",class:"admin-button rounded-xl px-4 py-2 text-white transition-all duration-300 flex items-center gap-2"},{default:at(()=>p[4]||(p[4]=[t("i",{class:"fas fa-cog text-sm"},null,-1),t("span",{class:"text-sm font-medium"},"管理后台",-1)])),_:1,__:[4]})])])]),t("div",ve,[t("div",_e,[t("div",be,[t("button",{onClick:p[0]||(p[0]=j=>l.value="stats"),class:P(["tab-pill-button",l.value==="stats"?"active":""])},p[5]||(p[5]=[t("i",{class:"fas fa-chart-line mr-2"},null,-1),t("span",null,"统计查询",-1)]),2),t("button",{onClick:p[1]||(p[1]=j=>l.value="tutorial"),class:P(["tab-pill-button",l.value==="tutorial"?"active":""])},p[6]||(p[6]=[t("i",{class:"fas fa-graduation-cap mr-2"},null,-1),t("span",null,"使用教程",-1)]),2)])])]),l.value==="stats"?(m(),f("div",he,[S(_t),s(_)?(m(),f("div",$e,[t("div",we,[p[7]||(p[7]=t("i",{class:"fas fa-exclamation-triangle mr-2"},null,-1)),y(" "+r(s(_)),1)])])):C("",!0),s(x)?(m(),f("div",ke,[t("div",Se,[t("div",Te,[t("div",Ie,[p[10]||(p[10]=t("div",{class:"flex items-center gap-3"},[t("i",{class:"fas fa-clock text-blue-500 text-lg"}),t("span",{class:"text-lg font-medium text-gray-700"},"统计时间范围")],-1)),t("div",Ce,[t("button",{onClick:p[2]||(p[2]=j=>s(T)("daily")),class:P([["period-btn",{active:s(h)==="daily"}],"px-6 py-2 text-sm font-medium flex items-center gap-2"]),disabled:s(i)||s(d)},p[8]||(p[8]=[t("i",{class:"fas fa-calendar-day"},null,-1),y(" 今日 ",-1)]),10,Le),t("button",{onClick:p[3]||(p[3]=j=>s(T)("monthly")),class:P([["period-btn",{active:s(h)==="monthly"}],"px-6 py-2 text-sm font-medium flex items-center gap-2"]),disabled:s(i)||s(d)},p[9]||(p[9]=[t("i",{class:"fas fa-calendar-alt"},null,-1),y(" 本月 ",-1)]),10,De)])])]),S(Zt),t("div",Pe,[S(ps),S(Ws)]),S(me)])])):C("",!0)])):C("",!0),l.value==="tutorial"?(m(),f("div",Ae,[t("div",Ke,[S(lt)])])):C("",!0)])}}},Fe=K(Me,[["__scopeId","data-v-4e1404f4"]]);export{Fe as default};
diff --git a/web/admin-spa/dist/assets/DashboardView-Cr_S60dH.js b/web/admin-spa/dist/assets/DashboardView-B48Cl-60.js
similarity index 99%
rename from web/admin-spa/dist/assets/DashboardView-Cr_S60dH.js
rename to web/admin-spa/dist/assets/DashboardView-B48Cl-60.js
index 7c30b575..6476bded 100644
--- a/web/admin-spa/dist/assets/DashboardView-Cr_S60dH.js
+++ b/web/admin-spa/dist/assets/DashboardView-B48Cl-60.js
@@ -1 +1 @@
-import{E as it}from"./element-plus-D-FTEVKS.js";import{aR as dt,r as k,c as ut,aW as ct,o as st,q as pt,D as E,x as b,z as t,P as d,u as s,O as v,L as I,Q as lt,ac as rt,C as j,R as yt,y as h}from"./vue-vendor-YmkKLAOK.js";import{a as O,_ as mt}from"./index-BfaL5u2_.js";import{s as at}from"./toast-BvwA7Mwb.js";import{C as ot}from"./chart-Cor9iTVD.js";import"./vendor-BDiMbLwQ.js";const ft=dt("dashboard",()=>{const L=k(!1),U=k({totalApiKeys:0,activeApiKeys:0,totalAccounts:0,activeAccounts:0,rateLimitedAccounts:0,todayRequests:0,totalRequests:0,todayTokens:0,todayInputTokens:0,todayOutputTokens:0,totalTokens:0,totalInputTokens:0,totalOutputTokens:0,totalCacheCreateTokens:0,totalCacheReadTokens:0,todayCacheCreateTokens:0,todayCacheReadTokens:0,systemRPM:0,systemTPM:0,systemStatus:"正常",uptime:0}),i=k({todayCosts:{totalCost:0,formatted:{totalCost:"$0.000000"}},totalCosts:{totalCost:0,formatted:{totalCost:"$0.000000"}}}),V=k([]),w=k([]),q=k([]),T=k({data:[],topApiKeys:[],totalApiKeys:0}),l=k({type:"preset",preset:"7days",customStart:"",customEnd:"",customRange:null,presetOptions:[{value:"today",label:"今日",days:1},{value:"7days",label:"7天",days:7},{value:"30days",label:"30天",days:30}]}),g=k("day"),R=k("requests"),_=k([new Date(2e3,1,1,0,0,0),new Date(2e3,2,1,23,59,59)]),Z=ut(()=>{const a=U.value.uptime,r=Math.floor(a/86400),n=Math.floor(a%86400/3600),o=Math.floor(a%3600/60);return r>0?`${r}天 ${n}小时`:n>0?`${n}小时 ${o}分钟`:`${o}分钟`});async function J(){L.value=!0;try{const[a,r,n]=await Promise.all([O.get("/admin/dashboard"),O.get("/admin/usage-costs?period=today"),O.get("/admin/usage-costs?period=all")]);if(a.success){const o=a.data.overview||{},c=a.data.recentActivity||{},m=a.data.systemAverages||{},C=a.data.systemHealth||{};U.value={totalApiKeys:o.totalApiKeys||0,activeApiKeys:o.activeApiKeys||0,totalAccounts:o.totalClaudeAccounts||0,activeAccounts:o.activeClaudeAccounts||0,rateLimitedAccounts:o.rateLimitedClaudeAccounts||0,todayRequests:c.requestsToday||0,totalRequests:o.totalRequestsUsed||0,todayTokens:c.tokensToday||0,todayInputTokens:c.inputTokensToday||0,todayOutputTokens:c.outputTokensToday||0,totalTokens:o.totalTokensUsed||0,totalInputTokens:o.totalInputTokensUsed||0,totalOutputTokens:o.totalOutputTokensUsed||0,totalCacheCreateTokens:o.totalCacheCreateTokensUsed||0,totalCacheReadTokens:o.totalCacheReadTokensUsed||0,todayCacheCreateTokens:c.cacheCreateTokensToday||0,todayCacheReadTokens:c.cacheReadTokensToday||0,systemRPM:m.rpm||0,systemTPM:m.tpm||0,systemStatus:C.redisConnected?"正常":"异常",uptime:C.uptime||0}}r.success&&n.success&&(i.value={todayCosts:r.data.totalCosts||{totalCost:0,formatted:{totalCost:"$0.000000"}},totalCosts:n.data.totalCosts||{totalCost:0,formatted:{totalCost:"$0.000000"}}})}catch(a){console.error("加载仪表板数据失败:",a)}finally{L.value=!1}}async function X(a=7,r="day"){try{let n="/admin/usage-trend?";r==="hour"?(n+="granularity=hour",l.value.customRange&&l.value.customRange.length===2&&(n+=`&startDate=${encodeURIComponent(l.value.customRange[0])}`,n+=`&endDate=${encodeURIComponent(l.value.customRange[1])}`)):n+=`granularity=day&days=${a}`;const o=await O.get(n);o.success&&(w.value=o.data)}catch(n){console.error("加载使用趋势失败:",n)}}async function tt(a="daily"){try{const r=await O.get(`/admin/model-stats?period=${a}`);r.success&&(q.value=r.data)}catch(r){console.error("加载模型统计失败:",r)}}async function Y(a="requests"){try{let r="/admin/api-keys-usage-trend?";if(g.value==="hour")r+="granularity=hour",l.value.customRange&&l.value.customRange.length===2&&(r+=`&startDate=${encodeURIComponent(l.value.customRange[0])}`,r+=`&endDate=${encodeURIComponent(l.value.customRange[1])}`);else{const o=l.value.type==="preset"?l.value.preset==="today"?1:l.value.preset==="7days"?7:30:z(l.value.customStart,l.value.customEnd);r+=`granularity=day&days=${o}`}r+=`&metric=${a}`;const n=await O.get(r);n.success&&(T.value={data:n.data||[],topApiKeys:n.topApiKeys||[],totalApiKeys:n.totalApiKeys||0})}catch(r){console.error("加载API Keys趋势失败:",r)}}function K(a){l.value.type="preset",l.value.preset=a;const r=l.value.presetOptions.find(n=>n.value===a);if(r){const n=new Date;let o,c;if(g.value==="hour")switch(a){case"last24h":o=new Date(n.getTime()-24*60*60*1e3),c=n;break;case"yesterday":o=new Date(n),o.setDate(n.getDate()-1),o.setHours(0,0,0,0),c=new Date(o),c.setHours(23,59,59,999);break;case"dayBefore":o=new Date(n),o.setDate(n.getDate()-2),o.setHours(0,0,0,0),c=new Date(o),c.setHours(23,59,59,999);break}else o=new Date(n),c=new Date(n),a==="today"?(o.setHours(0,0,0,0),c.setHours(23,59,59,999)):(o.setDate(n.getDate()-(r.days-1)),o.setHours(0,0,0,0),c.setHours(23,59,59,999));l.value.customStart=o.toISOString().split("T")[0],l.value.customEnd=c.toISOString().split("T")[0];const m=C=>{const G=C.getFullYear(),W=String(C.getMonth()+1).padStart(2,"0"),H=String(C.getDate()).padStart(2,"0"),Q=String(C.getHours()).padStart(2,"0"),p=String(C.getMinutes()).padStart(2,"0"),e=String(C.getSeconds()).padStart(2,"0");return`${G}-${W}-${H} ${Q}:${p}:${e}`};l.value.customRange=[m(o),m(c)]}$()}function et(a){if(a&&a.length===2){l.value.type="custom",l.value.preset="",l.value.customRange=a,l.value.customStart=a[0].split(" ")[0],l.value.customEnd=a[1].split(" ")[0];const r=new Date(a[0]),n=new Date(a[1]);if(g.value==="hour"){if((n-r)/36e5>24){at("小时粒度下日期范围不能超过24小时","warning");return}}else if(Math.ceil((n-r)/864e5)+1>31){at("日期范围不能超过 31 天","warning");return}$()}else a===null&&K((g.value==="hour","7days"))}function N(a){if(g.value=a,a==="hour"){if(l.value.presetOptions=[{value:"last24h",label:"近24小时",hours:24},{value:"yesterday",label:"昨天",hours:24},{value:"dayBefore",label:"前天",hours:24}],l.value.type==="custom"&&l.value.customRange&&l.value.customRange.length===2){const r=new Date(l.value.customRange[0]);if((new Date(l.value.customRange[1])-r)/(1e3*60*60)>24){at("小时粒度下日期范围不能超过24小时,已切换到近24小时","warning"),K("last24h");return}}if(["today","7days","30days"].includes(l.value.preset)){K("last24h");return}}else if(l.value.presetOptions=[{value:"today",label:"今日",days:1},{value:"7days",label:"7天",days:7},{value:"30days",label:"30天",days:30}],["last24h","yesterday","dayBefore"].includes(l.value.preset)){K("7days");return}$()}async function $(){let a,r="monthly";if(l.value.type==="preset"){const n=l.value.presetOptions.find(o=>o.value===l.value.preset);g.value==="hour"?(a=1,r="daily"):(a=n?n.days:7,l.value.preset==="today"?r="daily":r="monthly")}else{if(g.value==="hour"){const n=new Date(l.value.customRange[0]),o=new Date(l.value.customRange[1]),c=Math.ceil((o-n)/(1e3*60*60));a=Math.ceil(c/24)||1}else a=z(l.value.customStart,l.value.customEnd);r="daily"}await Promise.all([X(a,g.value),tt(r),Y(R.value)])}function z(a,r){if(!a||!r)return 7;const n=new Date(a),o=new Date(r),c=Math.abs(o-n);return Math.ceil(c/(1e3*60*60*24))||7}function B(a){return a>new Date}return{loading:L,dashboardData:U,costsData:i,modelStats:V,trendData:w,dashboardModelStats:q,apiKeysTrendData:T,dateFilter:l,trendGranularity:g,apiKeysTrendMetric:R,defaultTime:_,formattedUptime:Z,loadDashboardData:J,loadUsageTrend:X,loadModelStats:tt,loadApiKeysTrend:Y,setDateFilterPreset:K,onCustomDateRangeChange:et,setTrendGranularity:N,refreshChartsData:$,disabledDate:B}}),gt={class:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-6 mb-8"},xt={class:"stat-card"},bt={class:"flex items-center justify-between"},vt={class:"text-3xl font-bold text-gray-900"},ht={class:"text-xs text-gray-500 mt-1"},kt={class:"stat-card"},Ct={class:"flex items-center justify-between"},Tt={class:"text-3xl font-bold text-gray-900"},_t={class:"text-xs text-gray-500 mt-1"},Dt={key:0,class:"text-yellow-600"},wt={class:"stat-card"},Rt={class:"flex items-center justify-between"},At={class:"text-3xl font-bold text-gray-900"},St={class:"text-xs text-gray-500 mt-1"},Kt={class:"stat-card"},$t={class:"flex items-center justify-between"},Mt={class:"text-3xl font-bold text-green-600"},Ut={class:"text-xs text-gray-500 mt-1"},Pt={class:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-6 mb-8"},Ft={class:"stat-card"},It={class:"flex items-center justify-between"},Ot={class:"flex-1 mr-8"},qt={class:"flex items-baseline gap-2 mb-2 flex-wrap"},Bt={class:"text-3xl font-bold text-blue-600"},Ht={class:"text-sm text-green-600 font-medium"},Et={class:"text-xs text-gray-500"},jt={class:"flex justify-between items-center flex-wrap gap-x-4"},Lt={class:"font-medium"},Vt={class:"font-medium"},Yt={key:0,class:"text-purple-600"},Nt={class:"font-medium"},zt={key:1,class:"text-purple-600"},Gt={class:"font-medium"},Wt={class:"stat-card"},Qt={class:"flex items-center justify-between"},Zt={class:"flex-1 mr-8"},Jt={class:"flex items-baseline gap-2 mb-2 flex-wrap"},Xt={class:"text-3xl font-bold text-emerald-600"},te={class:"text-sm text-green-600 font-medium"},ee={class:"text-xs text-gray-500"},se={class:"flex justify-between items-center flex-wrap gap-x-4"},ae={class:"font-medium"},oe={class:"font-medium"},ne={key:0,class:"text-purple-600"},le={class:"font-medium"},re={key:1,class:"text-purple-600"},ie={class:"font-medium"},de={class:"stat-card"},ue={class:"flex items-center justify-between"},ce={class:"text-3xl font-bold text-orange-600"},pe={class:"stat-card"},ye={class:"flex items-center justify-between"},me={class:"text-3xl font-bold text-rose-600"},fe={class:"mb-8"},ge={class:"flex items-center justify-between mb-6"},xe={class:"flex gap-2 items-center"},be={class:"flex gap-1 bg-gray-100 rounded-lg p-1"},ve=["onClick"],he={class:"flex gap-1 bg-gray-100 rounded-lg p-1"},ke={class:"flex items-center gap-2"},Ce={key:0,class:"text-xs text-orange-600"},Te={class:"grid grid-cols-1 lg:grid-cols-2 gap-6"},_e={class:"card p-6"},De={class:"relative",style:{height:"300px"}},we={class:"card p-6"},Re={key:0,class:"text-center py-8"},Ae={key:1,class:"overflow-auto max-h-[300px]"},Se={class:"min-w-full"},Ke={class:"divide-y divide-gray-200"},$e={class:"px-4 py-2 text-sm text-gray-900"},Me={class:"px-4 py-2 text-sm text-gray-600 text-right"},Ue={class:"px-4 py-2 text-sm text-gray-600 text-right"},Pe={class:"px-4 py-2 text-sm text-green-600 text-right font-medium"},Fe={class:"px-4 py-2 text-sm font-medium text-right"},Ie={class:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800"},Oe={class:"mb-8"},qe={class:"card p-6"},Be={style:{height:"300px"}},He={class:"mb-8"},Ee={class:"card p-6"},je={class:"flex items-center justify-between mb-4"},Le={class:"flex gap-1 bg-gray-100 rounded-lg p-1"},Ve={class:"mb-4 text-sm text-gray-600"},Ye={key:0},Ne={key:1},ze={style:{height:"350px"}},Ge={__name:"DashboardView",setup(L){const U=ft(),{dashboardData:i,costsData:V,dashboardModelStats:w,trendData:q,apiKeysTrendData:T,formattedUptime:l,dateFilter:g,trendGranularity:R,apiKeysTrendMetric:_,defaultTime:Z}=ct(U),{loadDashboardData:J,loadUsageTrend:X,loadModelStats:tt,loadApiKeysTrend:Y,setDateFilterPreset:K,onCustomDateRangeChange:et,setTrendGranularity:N,refreshChartsData:$,disabledDate:z}=U,B=k(null),a=k(null),r=k(null);let n=null,o=null,c=null;function m(p){return p>=1e6?(p/1e6).toFixed(2)+"M":p>=1e3?(p/1e3).toFixed(2)+"K":p.toString()}function C(p,e){if(!e||e.length===0)return 0;const f=e.reduce((u,A)=>u+A.allTokens,0);return f===0?0:(p/f*100).toFixed(1)}function G(){if(!B.value)return;n&&n.destroy();const p=w.value||[],e={labels:p.map(f=>f.model),datasets:[{data:p.map(f=>f.allTokens),backgroundColor:["#3B82F6","#10B981","#F59E0B","#EF4444","#8B5CF6","#EC4899","#14B8A6","#F97316","#6366F1","#84CC16"],borderWidth:0}]};n=new ot(B.value,{type:"doughnut",data:e,options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{padding:15,usePointStyle:!0,font:{size:12}}},tooltip:{callbacks:{label:function(f){const u=f.label||"",A=m(f.parsed),P=C(f.parsed,p);return`${u}: ${A} (${P}%)`}}}}}})}function W(){if(!a.value)return;o&&o.destroy();const p=q.value||[],e=p.map(y=>y.inputTokens||0),f=p.map(y=>y.outputTokens||0),u=p.map(y=>y.cacheCreateTokens||0),A=p.map(y=>y.cacheReadTokens||0),P=p.map(y=>y.requests||0),x=p.map(y=>y.cost||0),F={labels:p.map(y=>y.date),datasets:[{label:"输入Token",data:e,borderColor:"rgb(102, 126, 234)",backgroundColor:"rgba(102, 126, 234, 0.1)",tension:.3},{label:"输出Token",data:f,borderColor:"rgb(240, 147, 251)",backgroundColor:"rgba(240, 147, 251, 0.1)",tension:.3},{label:"缓存创建Token",data:u,borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)",tension:.3},{label:"缓存读取Token",data:A,borderColor:"rgb(147, 51, 234)",backgroundColor:"rgba(147, 51, 234, 0.1)",tension:.3},{label:"费用 (USD)",data:x,borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)",tension:.3,yAxisID:"y2"},{label:"请求数",data:P,borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)",tension:.3,yAxisID:"y1"}]};o=new ot(a.value,{type:"line",data:F,options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{title:{display:!0,text:"Token使用趋势",font:{size:16,weight:"bold"}},legend:{position:"top"},tooltip:{mode:"index",intersect:!1,callbacks:{label:function(y){const D=y.dataset.label||"";let S=y.parsed.y;return D==="费用 (USD)"?S<.01?D+": $"+S.toFixed(6):D+": $"+S.toFixed(4):D==="请求数"?D+": "+S.toLocaleString()+" 次":D+": "+S.toLocaleString()+" tokens"}}}},scales:{x:{type:"category",display:!0,title:{display:!0,text:R.value==="hour"?"时间":"日期"}},y:{type:"linear",display:!0,position:"left",title:{display:!0,text:"Token数量"},ticks:{callback:function(y){return m(y)}}},y1:{type:"linear",display:!0,position:"right",title:{display:!0,text:"请求数"},grid:{drawOnChartArea:!1},ticks:{callback:function(y){return y.toLocaleString()}}},y2:{type:"linear",display:!1,position:"right"}}}})}function H(){var P;if(!r.value)return;c&&c.destroy();const p=T.value.data||[],e=_.value,f=["#3B82F6","#10B981","#F59E0B","#EF4444","#8B5CF6","#EC4899","#14B8A6","#F97316","#6366F1","#84CC16"],u=((P=T.value.topApiKeys)==null?void 0:P.map((x,F)=>{var S,nt;const y=T.value.data.map(M=>!M.apiKeys||!M.apiKeys[x]?0:e==="tokens"?M.apiKeys[x].tokens:M.apiKeys[x].requests||0);return{label:((nt=(S=T.value.data.find(M=>M.apiKeys&&M.apiKeys[x]))==null?void 0:S.apiKeys[x])==null?void 0:nt.name)||`API Key ${x}`,data:y,borderColor:f[F%f.length],backgroundColor:f[F%f.length]+"20",tension:.4,fill:!1}}))||[],A={labels:p.map(x=>x.date),datasets:u};c=new ot(r.value,{type:"line",data:A,options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{padding:20,usePointStyle:!0,font:{size:12}}},tooltip:{mode:"index",intersect:!1,callbacks:{label:function(x){const F=x.dataset.label||"",y=x.parsed.y,D=_.value==="tokens"?" tokens":" 次";return F+": "+y.toLocaleString()+D}}}},scales:{x:{type:"category",display:!0,title:{display:!0,text:R.value==="hour"?"时间":"日期"}},y:{beginAtZero:!0,title:{display:!0,text:_.value==="tokens"?"Token 数量":"请求次数"},ticks:{callback:function(x){return m(x)}}}}}})}async function Q(){await Y(_.value),await E(),H()}return st(w,()=>{E(()=>G())}),st(q,()=>{E(()=>W())}),st(T,()=>{E(()=>H())}),pt(async()=>{await Promise.all([J(),$()]),await E(),G(),W(),H()}),(p,e)=>{const f=it;return h(),b("div",null,[t("div",gt,[t("div",xt,[t("div",bt,[t("div",null,[e[6]||(e[6]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"总API Keys",-1)),t("p",vt,d(s(i).totalApiKeys),1),t("p",ht,"活跃: "+d(s(i).activeApiKeys||0),1)]),e[7]||(e[7]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-blue-500 to-blue-600"},[t("i",{class:"fas fa-key"})],-1))])]),t("div",kt,[t("div",Ct,[t("div",null,[e[8]||(e[8]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"服务账户",-1)),t("p",Tt,d(s(i).totalAccounts),1),t("p",_t,[v(" 活跃: "+d(s(i).activeAccounts||0)+" ",1),s(i).rateLimitedAccounts>0?(h(),b("span",Dt," | 限流: "+d(s(i).rateLimitedAccounts),1)):I("",!0)])]),e[9]||(e[9]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-green-500 to-green-600"},[t("i",{class:"fas fa-user-circle"})],-1))])]),t("div",wt,[t("div",Rt,[t("div",null,[e[10]||(e[10]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"今日请求",-1)),t("p",At,d(s(i).todayRequests),1),t("p",St,"总请求: "+d(m(s(i).totalRequests||0)),1)]),e[11]||(e[11]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-purple-500 to-purple-600"},[t("i",{class:"fas fa-chart-line"})],-1))])]),t("div",Kt,[t("div",$t,[t("div",null,[e[12]||(e[12]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"系统状态",-1)),t("p",Mt,d(s(i).systemStatus),1),t("p",Ut,"运行时间: "+d(s(l)),1)]),e[13]||(e[13]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-yellow-500 to-orange-500"},[t("i",{class:"fas fa-heartbeat"})],-1))])])]),t("div",Pt,[t("div",Ft,[t("div",It,[t("div",Ot,[e[18]||(e[18]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"今日Token",-1)),t("div",qt,[t("p",Bt,d(m((s(i).todayInputTokens||0)+(s(i).todayOutputTokens||0)+(s(i).todayCacheCreateTokens||0)+(s(i).todayCacheReadTokens||0))),1),t("span",Ht,"/ "+d(s(V).todayCosts.formatted.totalCost),1)]),t("div",Et,[t("div",jt,[t("span",null,[e[14]||(e[14]=v("输入: ",-1)),t("span",Lt,d(m(s(i).todayInputTokens||0)),1)]),t("span",null,[e[15]||(e[15]=v("输出: ",-1)),t("span",Vt,d(m(s(i).todayOutputTokens||0)),1)]),(s(i).todayCacheCreateTokens||0)>0?(h(),b("span",Yt,[e[16]||(e[16]=v("缓存创建: ",-1)),t("span",Nt,d(m(s(i).todayCacheCreateTokens||0)),1)])):I("",!0),(s(i).todayCacheReadTokens||0)>0?(h(),b("span",zt,[e[17]||(e[17]=v("缓存读取: ",-1)),t("span",Gt,d(m(s(i).todayCacheReadTokens||0)),1)])):I("",!0)])])]),e[19]||(e[19]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-indigo-500 to-indigo-600"},[t("i",{class:"fas fa-coins"})],-1))])]),t("div",Wt,[t("div",Qt,[t("div",Zt,[e[24]||(e[24]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"总Token消耗",-1)),t("div",Jt,[t("p",Xt,d(m((s(i).totalInputTokens||0)+(s(i).totalOutputTokens||0)+(s(i).totalCacheCreateTokens||0)+(s(i).totalCacheReadTokens||0))),1),t("span",te,"/ "+d(s(V).totalCosts.formatted.totalCost),1)]),t("div",ee,[t("div",se,[t("span",null,[e[20]||(e[20]=v("输入: ",-1)),t("span",ae,d(m(s(i).totalInputTokens||0)),1)]),t("span",null,[e[21]||(e[21]=v("输出: ",-1)),t("span",oe,d(m(s(i).totalOutputTokens||0)),1)]),(s(i).totalCacheCreateTokens||0)>0?(h(),b("span",ne,[e[22]||(e[22]=v("缓存创建: ",-1)),t("span",le,d(m(s(i).totalCacheCreateTokens||0)),1)])):I("",!0),(s(i).totalCacheReadTokens||0)>0?(h(),b("span",re,[e[23]||(e[23]=v("缓存读取: ",-1)),t("span",ie,d(m(s(i).totalCacheReadTokens||0)),1)])):I("",!0)])])]),e[25]||(e[25]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-emerald-500 to-emerald-600"},[t("i",{class:"fas fa-database"})],-1))])]),t("div",de,[t("div",ue,[t("div",null,[e[26]||(e[26]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"平均RPM",-1)),t("p",ce,d(s(i).systemRPM||0),1),e[27]||(e[27]=t("p",{class:"text-xs text-gray-500 mt-1"},"每分钟请求数",-1))]),e[28]||(e[28]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-orange-500 to-orange-600"},[t("i",{class:"fas fa-tachometer-alt"})],-1))])]),t("div",pe,[t("div",ye,[t("div",null,[e[29]||(e[29]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"平均TPM",-1)),t("p",me,d(s(i).systemTPM||0),1),e[30]||(e[30]=t("p",{class:"text-xs text-gray-500 mt-1"},"每分钟Token数",-1))]),e[31]||(e[31]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-rose-500 to-rose-600"},[t("i",{class:"fas fa-rocket"})],-1))])])]),t("div",fe,[t("div",ge,[e[36]||(e[36]=t("h3",{class:"text-xl font-bold text-gray-900"},"模型使用分布与Token使用趋势",-1)),t("div",xe,[t("div",be,[(h(!0),b(lt,null,rt(s(g).presetOptions,u=>(h(),b("button",{key:u.value,onClick:A=>s(K)(u.value),class:j(["px-3 py-1 rounded-md text-sm font-medium transition-colors",s(g).preset===u.value&&s(g).type==="preset"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"])},d(u.label),11,ve))),128))]),t("div",he,[t("button",{onClick:e[0]||(e[0]=u=>s(N)("day")),class:j(["px-3 py-1 rounded-md text-sm font-medium transition-colors",s(R)==="day"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"])},e[32]||(e[32]=[t("i",{class:"fas fa-calendar-day mr-1"},null,-1),v("按天 ",-1)]),2),t("button",{onClick:e[1]||(e[1]=u=>s(N)("hour")),class:j(["px-3 py-1 rounded-md text-sm font-medium transition-colors",s(R)==="hour"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"])},e[33]||(e[33]=[t("i",{class:"fas fa-clock mr-1"},null,-1),v("按小时 ",-1)]),2)]),t("div",ke,[yt(f,{"default-time":s(Z),modelValue:s(g).customRange,"onUpdate:modelValue":e[2]||(e[2]=u=>s(g).customRange=u),type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",onChange:s(et),"disabled-date":s(z),size:"default",style:{width:"400px"},class:"custom-date-picker"},null,8,["default-time","modelValue","onChange","disabled-date"]),s(R)==="hour"?(h(),b("span",Ce,e[34]||(e[34]=[t("i",{class:"fas fa-info-circle"},null,-1),v(" 最多24小时 ",-1)]))):I("",!0)]),t("button",{onClick:e[3]||(e[3]=u=>s($)()),class:"btn btn-primary px-4 py-2 flex items-center gap-2"},e[35]||(e[35]=[t("i",{class:"fas fa-sync-alt"},null,-1),v("刷新 ",-1)]))])]),t("div",Te,[t("div",_e,[e[37]||(e[37]=t("h4",{class:"text-lg font-semibold text-gray-800 mb-4"},"Token使用分布",-1)),t("div",De,[t("canvas",{ref_key:"modelUsageChart",ref:B},null,512)])]),t("div",we,[e[40]||(e[40]=t("h4",{class:"text-lg font-semibold text-gray-800 mb-4"},"详细统计数据",-1)),s(w).length===0?(h(),b("div",Re,e[38]||(e[38]=[t("p",{class:"text-gray-500"},"暂无模型使用数据",-1)]))):(h(),b("div",Ae,[t("table",Se,[e[39]||(e[39]=t("thead",{class:"bg-gray-50 sticky top-0"},[t("tr",null,[t("th",{class:"px-4 py-2 text-left text-xs font-medium text-gray-700"},"模型"),t("th",{class:"px-4 py-2 text-right text-xs font-medium text-gray-700"},"请求数"),t("th",{class:"px-4 py-2 text-right text-xs font-medium text-gray-700"},"总Token"),t("th",{class:"px-4 py-2 text-right text-xs font-medium text-gray-700"},"费用"),t("th",{class:"px-4 py-2 text-right text-xs font-medium text-gray-700"},"占比")])],-1)),t("tbody",Ke,[(h(!0),b(lt,null,rt(s(w),u=>(h(),b("tr",{key:u.model,class:"hover:bg-gray-50"},[t("td",$e,d(u.model),1),t("td",Me,d(m(u.requests)),1),t("td",Ue,d(m(u.allTokens)),1),t("td",Pe,d(u.formatted?u.formatted.total:"$0.000000"),1),t("td",Fe,[t("span",Ie,d(C(u.allTokens,s(w)))+"% ",1)])]))),128))])])]))])])]),t("div",Oe,[t("div",qe,[t("div",Be,[t("canvas",{ref_key:"usageTrendChart",ref:a},null,512)])])]),t("div",He,[t("div",Ee,[t("div",je,[e[43]||(e[43]=t("h3",{class:"text-lg font-semibold text-gray-900"},"API Keys 使用趋势",-1)),t("div",Le,[t("button",{onClick:e[4]||(e[4]=u=>{_.value="requests",Q()}),class:j(["px-3 py-1 rounded-md text-sm font-medium transition-colors",s(_)==="requests"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"])},e[41]||(e[41]=[t("i",{class:"fas fa-exchange-alt mr-1"},null,-1),v("请求次数 ",-1)]),2),t("button",{onClick:e[5]||(e[5]=u=>{_.value="tokens",Q()}),class:j(["px-3 py-1 rounded-md text-sm font-medium transition-colors",s(_)==="tokens"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"])},e[42]||(e[42]=[t("i",{class:"fas fa-coins mr-1"},null,-1),v("Token 数量 ",-1)]),2)])]),t("div",Ve,[s(T).totalApiKeys>10?(h(),b("span",Ye," 共 "+d(s(T).totalApiKeys)+" 个 API Key,显示使用量前 10 个 ",1)):(h(),b("span",Ne," 共 "+d(s(T).totalApiKeys)+" 个 API Key ",1))]),t("div",ze,[t("canvas",{ref_key:"apiKeysUsageTrendChart",ref:r},null,512)])])])])}}},es=mt(Ge,[["__scopeId","data-v-5170898f"]]);export{es as default};
+import{E as it}from"./element-plus-B8Fs_0jW.js";import{aR as dt,r as k,c as ut,aW as ct,o as st,q as pt,D as E,x as b,z as t,P as d,u as s,O as v,L as I,Q as lt,ac as rt,C as j,R as yt,y as h}from"./vue-vendor-CKToUHZx.js";import{a as O,_ as mt}from"./index-CJmHAjMf.js";import{s as at}from"./toast-BvwA7Mwb.js";import{C as ot}from"./chart-Cor9iTVD.js";import"./vendor-BDiMbLwQ.js";const ft=dt("dashboard",()=>{const L=k(!1),U=k({totalApiKeys:0,activeApiKeys:0,totalAccounts:0,activeAccounts:0,rateLimitedAccounts:0,todayRequests:0,totalRequests:0,todayTokens:0,todayInputTokens:0,todayOutputTokens:0,totalTokens:0,totalInputTokens:0,totalOutputTokens:0,totalCacheCreateTokens:0,totalCacheReadTokens:0,todayCacheCreateTokens:0,todayCacheReadTokens:0,systemRPM:0,systemTPM:0,systemStatus:"正常",uptime:0}),i=k({todayCosts:{totalCost:0,formatted:{totalCost:"$0.000000"}},totalCosts:{totalCost:0,formatted:{totalCost:"$0.000000"}}}),V=k([]),w=k([]),q=k([]),T=k({data:[],topApiKeys:[],totalApiKeys:0}),l=k({type:"preset",preset:"7days",customStart:"",customEnd:"",customRange:null,presetOptions:[{value:"today",label:"今日",days:1},{value:"7days",label:"7天",days:7},{value:"30days",label:"30天",days:30}]}),g=k("day"),R=k("requests"),_=k([new Date(2e3,1,1,0,0,0),new Date(2e3,2,1,23,59,59)]),Z=ut(()=>{const a=U.value.uptime,r=Math.floor(a/86400),n=Math.floor(a%86400/3600),o=Math.floor(a%3600/60);return r>0?`${r}天 ${n}小时`:n>0?`${n}小时 ${o}分钟`:`${o}分钟`});async function J(){L.value=!0;try{const[a,r,n]=await Promise.all([O.get("/admin/dashboard"),O.get("/admin/usage-costs?period=today"),O.get("/admin/usage-costs?period=all")]);if(a.success){const o=a.data.overview||{},c=a.data.recentActivity||{},m=a.data.systemAverages||{},C=a.data.systemHealth||{};U.value={totalApiKeys:o.totalApiKeys||0,activeApiKeys:o.activeApiKeys||0,totalAccounts:o.totalClaudeAccounts||0,activeAccounts:o.activeClaudeAccounts||0,rateLimitedAccounts:o.rateLimitedClaudeAccounts||0,todayRequests:c.requestsToday||0,totalRequests:o.totalRequestsUsed||0,todayTokens:c.tokensToday||0,todayInputTokens:c.inputTokensToday||0,todayOutputTokens:c.outputTokensToday||0,totalTokens:o.totalTokensUsed||0,totalInputTokens:o.totalInputTokensUsed||0,totalOutputTokens:o.totalOutputTokensUsed||0,totalCacheCreateTokens:o.totalCacheCreateTokensUsed||0,totalCacheReadTokens:o.totalCacheReadTokensUsed||0,todayCacheCreateTokens:c.cacheCreateTokensToday||0,todayCacheReadTokens:c.cacheReadTokensToday||0,systemRPM:m.rpm||0,systemTPM:m.tpm||0,systemStatus:C.redisConnected?"正常":"异常",uptime:C.uptime||0}}r.success&&n.success&&(i.value={todayCosts:r.data.totalCosts||{totalCost:0,formatted:{totalCost:"$0.000000"}},totalCosts:n.data.totalCosts||{totalCost:0,formatted:{totalCost:"$0.000000"}}})}catch(a){console.error("加载仪表板数据失败:",a)}finally{L.value=!1}}async function X(a=7,r="day"){try{let n="/admin/usage-trend?";r==="hour"?(n+="granularity=hour",l.value.customRange&&l.value.customRange.length===2&&(n+=`&startDate=${encodeURIComponent(l.value.customRange[0])}`,n+=`&endDate=${encodeURIComponent(l.value.customRange[1])}`)):n+=`granularity=day&days=${a}`;const o=await O.get(n);o.success&&(w.value=o.data)}catch(n){console.error("加载使用趋势失败:",n)}}async function tt(a="daily"){try{const r=await O.get(`/admin/model-stats?period=${a}`);r.success&&(q.value=r.data)}catch(r){console.error("加载模型统计失败:",r)}}async function Y(a="requests"){try{let r="/admin/api-keys-usage-trend?";if(g.value==="hour")r+="granularity=hour",l.value.customRange&&l.value.customRange.length===2&&(r+=`&startDate=${encodeURIComponent(l.value.customRange[0])}`,r+=`&endDate=${encodeURIComponent(l.value.customRange[1])}`);else{const o=l.value.type==="preset"?l.value.preset==="today"?1:l.value.preset==="7days"?7:30:z(l.value.customStart,l.value.customEnd);r+=`granularity=day&days=${o}`}r+=`&metric=${a}`;const n=await O.get(r);n.success&&(T.value={data:n.data||[],topApiKeys:n.topApiKeys||[],totalApiKeys:n.totalApiKeys||0})}catch(r){console.error("加载API Keys趋势失败:",r)}}function K(a){l.value.type="preset",l.value.preset=a;const r=l.value.presetOptions.find(n=>n.value===a);if(r){const n=new Date;let o,c;if(g.value==="hour")switch(a){case"last24h":o=new Date(n.getTime()-24*60*60*1e3),c=n;break;case"yesterday":o=new Date(n),o.setDate(n.getDate()-1),o.setHours(0,0,0,0),c=new Date(o),c.setHours(23,59,59,999);break;case"dayBefore":o=new Date(n),o.setDate(n.getDate()-2),o.setHours(0,0,0,0),c=new Date(o),c.setHours(23,59,59,999);break}else o=new Date(n),c=new Date(n),a==="today"?(o.setHours(0,0,0,0),c.setHours(23,59,59,999)):(o.setDate(n.getDate()-(r.days-1)),o.setHours(0,0,0,0),c.setHours(23,59,59,999));l.value.customStart=o.toISOString().split("T")[0],l.value.customEnd=c.toISOString().split("T")[0];const m=C=>{const G=C.getFullYear(),W=String(C.getMonth()+1).padStart(2,"0"),H=String(C.getDate()).padStart(2,"0"),Q=String(C.getHours()).padStart(2,"0"),p=String(C.getMinutes()).padStart(2,"0"),e=String(C.getSeconds()).padStart(2,"0");return`${G}-${W}-${H} ${Q}:${p}:${e}`};l.value.customRange=[m(o),m(c)]}$()}function et(a){if(a&&a.length===2){l.value.type="custom",l.value.preset="",l.value.customRange=a,l.value.customStart=a[0].split(" ")[0],l.value.customEnd=a[1].split(" ")[0];const r=new Date(a[0]),n=new Date(a[1]);if(g.value==="hour"){if((n-r)/36e5>24){at("小时粒度下日期范围不能超过24小时","warning");return}}else if(Math.ceil((n-r)/864e5)+1>31){at("日期范围不能超过 31 天","warning");return}$()}else a===null&&K((g.value==="hour","7days"))}function N(a){if(g.value=a,a==="hour"){if(l.value.presetOptions=[{value:"last24h",label:"近24小时",hours:24},{value:"yesterday",label:"昨天",hours:24},{value:"dayBefore",label:"前天",hours:24}],l.value.type==="custom"&&l.value.customRange&&l.value.customRange.length===2){const r=new Date(l.value.customRange[0]);if((new Date(l.value.customRange[1])-r)/(1e3*60*60)>24){at("小时粒度下日期范围不能超过24小时,已切换到近24小时","warning"),K("last24h");return}}if(["today","7days","30days"].includes(l.value.preset)){K("last24h");return}}else if(l.value.presetOptions=[{value:"today",label:"今日",days:1},{value:"7days",label:"7天",days:7},{value:"30days",label:"30天",days:30}],["last24h","yesterday","dayBefore"].includes(l.value.preset)){K("7days");return}$()}async function $(){let a,r="monthly";if(l.value.type==="preset"){const n=l.value.presetOptions.find(o=>o.value===l.value.preset);g.value==="hour"?(a=1,r="daily"):(a=n?n.days:7,l.value.preset==="today"?r="daily":r="monthly")}else{if(g.value==="hour"){const n=new Date(l.value.customRange[0]),o=new Date(l.value.customRange[1]),c=Math.ceil((o-n)/(1e3*60*60));a=Math.ceil(c/24)||1}else a=z(l.value.customStart,l.value.customEnd);r="daily"}await Promise.all([X(a,g.value),tt(r),Y(R.value)])}function z(a,r){if(!a||!r)return 7;const n=new Date(a),o=new Date(r),c=Math.abs(o-n);return Math.ceil(c/(1e3*60*60*24))||7}function B(a){return a>new Date}return{loading:L,dashboardData:U,costsData:i,modelStats:V,trendData:w,dashboardModelStats:q,apiKeysTrendData:T,dateFilter:l,trendGranularity:g,apiKeysTrendMetric:R,defaultTime:_,formattedUptime:Z,loadDashboardData:J,loadUsageTrend:X,loadModelStats:tt,loadApiKeysTrend:Y,setDateFilterPreset:K,onCustomDateRangeChange:et,setTrendGranularity:N,refreshChartsData:$,disabledDate:B}}),gt={class:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-6 mb-8"},xt={class:"stat-card"},bt={class:"flex items-center justify-between"},vt={class:"text-3xl font-bold text-gray-900"},ht={class:"text-xs text-gray-500 mt-1"},kt={class:"stat-card"},Ct={class:"flex items-center justify-between"},Tt={class:"text-3xl font-bold text-gray-900"},_t={class:"text-xs text-gray-500 mt-1"},Dt={key:0,class:"text-yellow-600"},wt={class:"stat-card"},Rt={class:"flex items-center justify-between"},At={class:"text-3xl font-bold text-gray-900"},St={class:"text-xs text-gray-500 mt-1"},Kt={class:"stat-card"},$t={class:"flex items-center justify-between"},Mt={class:"text-3xl font-bold text-green-600"},Ut={class:"text-xs text-gray-500 mt-1"},Pt={class:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-6 mb-8"},Ft={class:"stat-card"},It={class:"flex items-center justify-between"},Ot={class:"flex-1 mr-8"},qt={class:"flex items-baseline gap-2 mb-2 flex-wrap"},Bt={class:"text-3xl font-bold text-blue-600"},Ht={class:"text-sm text-green-600 font-medium"},Et={class:"text-xs text-gray-500"},jt={class:"flex justify-between items-center flex-wrap gap-x-4"},Lt={class:"font-medium"},Vt={class:"font-medium"},Yt={key:0,class:"text-purple-600"},Nt={class:"font-medium"},zt={key:1,class:"text-purple-600"},Gt={class:"font-medium"},Wt={class:"stat-card"},Qt={class:"flex items-center justify-between"},Zt={class:"flex-1 mr-8"},Jt={class:"flex items-baseline gap-2 mb-2 flex-wrap"},Xt={class:"text-3xl font-bold text-emerald-600"},te={class:"text-sm text-green-600 font-medium"},ee={class:"text-xs text-gray-500"},se={class:"flex justify-between items-center flex-wrap gap-x-4"},ae={class:"font-medium"},oe={class:"font-medium"},ne={key:0,class:"text-purple-600"},le={class:"font-medium"},re={key:1,class:"text-purple-600"},ie={class:"font-medium"},de={class:"stat-card"},ue={class:"flex items-center justify-between"},ce={class:"text-3xl font-bold text-orange-600"},pe={class:"stat-card"},ye={class:"flex items-center justify-between"},me={class:"text-3xl font-bold text-rose-600"},fe={class:"mb-8"},ge={class:"flex items-center justify-between mb-6"},xe={class:"flex gap-2 items-center"},be={class:"flex gap-1 bg-gray-100 rounded-lg p-1"},ve=["onClick"],he={class:"flex gap-1 bg-gray-100 rounded-lg p-1"},ke={class:"flex items-center gap-2"},Ce={key:0,class:"text-xs text-orange-600"},Te={class:"grid grid-cols-1 lg:grid-cols-2 gap-6"},_e={class:"card p-6"},De={class:"relative",style:{height:"300px"}},we={class:"card p-6"},Re={key:0,class:"text-center py-8"},Ae={key:1,class:"overflow-auto max-h-[300px]"},Se={class:"min-w-full"},Ke={class:"divide-y divide-gray-200"},$e={class:"px-4 py-2 text-sm text-gray-900"},Me={class:"px-4 py-2 text-sm text-gray-600 text-right"},Ue={class:"px-4 py-2 text-sm text-gray-600 text-right"},Pe={class:"px-4 py-2 text-sm text-green-600 text-right font-medium"},Fe={class:"px-4 py-2 text-sm font-medium text-right"},Ie={class:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800"},Oe={class:"mb-8"},qe={class:"card p-6"},Be={style:{height:"300px"}},He={class:"mb-8"},Ee={class:"card p-6"},je={class:"flex items-center justify-between mb-4"},Le={class:"flex gap-1 bg-gray-100 rounded-lg p-1"},Ve={class:"mb-4 text-sm text-gray-600"},Ye={key:0},Ne={key:1},ze={style:{height:"350px"}},Ge={__name:"DashboardView",setup(L){const U=ft(),{dashboardData:i,costsData:V,dashboardModelStats:w,trendData:q,apiKeysTrendData:T,formattedUptime:l,dateFilter:g,trendGranularity:R,apiKeysTrendMetric:_,defaultTime:Z}=ct(U),{loadDashboardData:J,loadUsageTrend:X,loadModelStats:tt,loadApiKeysTrend:Y,setDateFilterPreset:K,onCustomDateRangeChange:et,setTrendGranularity:N,refreshChartsData:$,disabledDate:z}=U,B=k(null),a=k(null),r=k(null);let n=null,o=null,c=null;function m(p){return p>=1e6?(p/1e6).toFixed(2)+"M":p>=1e3?(p/1e3).toFixed(2)+"K":p.toString()}function C(p,e){if(!e||e.length===0)return 0;const f=e.reduce((u,A)=>u+A.allTokens,0);return f===0?0:(p/f*100).toFixed(1)}function G(){if(!B.value)return;n&&n.destroy();const p=w.value||[],e={labels:p.map(f=>f.model),datasets:[{data:p.map(f=>f.allTokens),backgroundColor:["#3B82F6","#10B981","#F59E0B","#EF4444","#8B5CF6","#EC4899","#14B8A6","#F97316","#6366F1","#84CC16"],borderWidth:0}]};n=new ot(B.value,{type:"doughnut",data:e,options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{padding:15,usePointStyle:!0,font:{size:12}}},tooltip:{callbacks:{label:function(f){const u=f.label||"",A=m(f.parsed),P=C(f.parsed,p);return`${u}: ${A} (${P}%)`}}}}}})}function W(){if(!a.value)return;o&&o.destroy();const p=q.value||[],e=p.map(y=>y.inputTokens||0),f=p.map(y=>y.outputTokens||0),u=p.map(y=>y.cacheCreateTokens||0),A=p.map(y=>y.cacheReadTokens||0),P=p.map(y=>y.requests||0),x=p.map(y=>y.cost||0),F={labels:p.map(y=>y.date),datasets:[{label:"输入Token",data:e,borderColor:"rgb(102, 126, 234)",backgroundColor:"rgba(102, 126, 234, 0.1)",tension:.3},{label:"输出Token",data:f,borderColor:"rgb(240, 147, 251)",backgroundColor:"rgba(240, 147, 251, 0.1)",tension:.3},{label:"缓存创建Token",data:u,borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)",tension:.3},{label:"缓存读取Token",data:A,borderColor:"rgb(147, 51, 234)",backgroundColor:"rgba(147, 51, 234, 0.1)",tension:.3},{label:"费用 (USD)",data:x,borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)",tension:.3,yAxisID:"y2"},{label:"请求数",data:P,borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)",tension:.3,yAxisID:"y1"}]};o=new ot(a.value,{type:"line",data:F,options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{title:{display:!0,text:"Token使用趋势",font:{size:16,weight:"bold"}},legend:{position:"top"},tooltip:{mode:"index",intersect:!1,callbacks:{label:function(y){const D=y.dataset.label||"";let S=y.parsed.y;return D==="费用 (USD)"?S<.01?D+": $"+S.toFixed(6):D+": $"+S.toFixed(4):D==="请求数"?D+": "+S.toLocaleString()+" 次":D+": "+S.toLocaleString()+" tokens"}}}},scales:{x:{type:"category",display:!0,title:{display:!0,text:R.value==="hour"?"时间":"日期"}},y:{type:"linear",display:!0,position:"left",title:{display:!0,text:"Token数量"},ticks:{callback:function(y){return m(y)}}},y1:{type:"linear",display:!0,position:"right",title:{display:!0,text:"请求数"},grid:{drawOnChartArea:!1},ticks:{callback:function(y){return y.toLocaleString()}}},y2:{type:"linear",display:!1,position:"right"}}}})}function H(){var P;if(!r.value)return;c&&c.destroy();const p=T.value.data||[],e=_.value,f=["#3B82F6","#10B981","#F59E0B","#EF4444","#8B5CF6","#EC4899","#14B8A6","#F97316","#6366F1","#84CC16"],u=((P=T.value.topApiKeys)==null?void 0:P.map((x,F)=>{var S,nt;const y=T.value.data.map(M=>!M.apiKeys||!M.apiKeys[x]?0:e==="tokens"?M.apiKeys[x].tokens:M.apiKeys[x].requests||0);return{label:((nt=(S=T.value.data.find(M=>M.apiKeys&&M.apiKeys[x]))==null?void 0:S.apiKeys[x])==null?void 0:nt.name)||`API Key ${x}`,data:y,borderColor:f[F%f.length],backgroundColor:f[F%f.length]+"20",tension:.4,fill:!1}}))||[],A={labels:p.map(x=>x.date),datasets:u};c=new ot(r.value,{type:"line",data:A,options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{padding:20,usePointStyle:!0,font:{size:12}}},tooltip:{mode:"index",intersect:!1,callbacks:{label:function(x){const F=x.dataset.label||"",y=x.parsed.y,D=_.value==="tokens"?" tokens":" 次";return F+": "+y.toLocaleString()+D}}}},scales:{x:{type:"category",display:!0,title:{display:!0,text:R.value==="hour"?"时间":"日期"}},y:{beginAtZero:!0,title:{display:!0,text:_.value==="tokens"?"Token 数量":"请求次数"},ticks:{callback:function(x){return m(x)}}}}}})}async function Q(){await Y(_.value),await E(),H()}return st(w,()=>{E(()=>G())}),st(q,()=>{E(()=>W())}),st(T,()=>{E(()=>H())}),pt(async()=>{await Promise.all([J(),$()]),await E(),G(),W(),H()}),(p,e)=>{const f=it;return h(),b("div",null,[t("div",gt,[t("div",xt,[t("div",bt,[t("div",null,[e[6]||(e[6]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"总API Keys",-1)),t("p",vt,d(s(i).totalApiKeys),1),t("p",ht,"活跃: "+d(s(i).activeApiKeys||0),1)]),e[7]||(e[7]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-blue-500 to-blue-600"},[t("i",{class:"fas fa-key"})],-1))])]),t("div",kt,[t("div",Ct,[t("div",null,[e[8]||(e[8]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"服务账户",-1)),t("p",Tt,d(s(i).totalAccounts),1),t("p",_t,[v(" 活跃: "+d(s(i).activeAccounts||0)+" ",1),s(i).rateLimitedAccounts>0?(h(),b("span",Dt," | 限流: "+d(s(i).rateLimitedAccounts),1)):I("",!0)])]),e[9]||(e[9]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-green-500 to-green-600"},[t("i",{class:"fas fa-user-circle"})],-1))])]),t("div",wt,[t("div",Rt,[t("div",null,[e[10]||(e[10]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"今日请求",-1)),t("p",At,d(s(i).todayRequests),1),t("p",St,"总请求: "+d(m(s(i).totalRequests||0)),1)]),e[11]||(e[11]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-purple-500 to-purple-600"},[t("i",{class:"fas fa-chart-line"})],-1))])]),t("div",Kt,[t("div",$t,[t("div",null,[e[12]||(e[12]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"系统状态",-1)),t("p",Mt,d(s(i).systemStatus),1),t("p",Ut,"运行时间: "+d(s(l)),1)]),e[13]||(e[13]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-yellow-500 to-orange-500"},[t("i",{class:"fas fa-heartbeat"})],-1))])])]),t("div",Pt,[t("div",Ft,[t("div",It,[t("div",Ot,[e[18]||(e[18]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"今日Token",-1)),t("div",qt,[t("p",Bt,d(m((s(i).todayInputTokens||0)+(s(i).todayOutputTokens||0)+(s(i).todayCacheCreateTokens||0)+(s(i).todayCacheReadTokens||0))),1),t("span",Ht,"/ "+d(s(V).todayCosts.formatted.totalCost),1)]),t("div",Et,[t("div",jt,[t("span",null,[e[14]||(e[14]=v("输入: ",-1)),t("span",Lt,d(m(s(i).todayInputTokens||0)),1)]),t("span",null,[e[15]||(e[15]=v("输出: ",-1)),t("span",Vt,d(m(s(i).todayOutputTokens||0)),1)]),(s(i).todayCacheCreateTokens||0)>0?(h(),b("span",Yt,[e[16]||(e[16]=v("缓存创建: ",-1)),t("span",Nt,d(m(s(i).todayCacheCreateTokens||0)),1)])):I("",!0),(s(i).todayCacheReadTokens||0)>0?(h(),b("span",zt,[e[17]||(e[17]=v("缓存读取: ",-1)),t("span",Gt,d(m(s(i).todayCacheReadTokens||0)),1)])):I("",!0)])])]),e[19]||(e[19]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-indigo-500 to-indigo-600"},[t("i",{class:"fas fa-coins"})],-1))])]),t("div",Wt,[t("div",Qt,[t("div",Zt,[e[24]||(e[24]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"总Token消耗",-1)),t("div",Jt,[t("p",Xt,d(m((s(i).totalInputTokens||0)+(s(i).totalOutputTokens||0)+(s(i).totalCacheCreateTokens||0)+(s(i).totalCacheReadTokens||0))),1),t("span",te,"/ "+d(s(V).totalCosts.formatted.totalCost),1)]),t("div",ee,[t("div",se,[t("span",null,[e[20]||(e[20]=v("输入: ",-1)),t("span",ae,d(m(s(i).totalInputTokens||0)),1)]),t("span",null,[e[21]||(e[21]=v("输出: ",-1)),t("span",oe,d(m(s(i).totalOutputTokens||0)),1)]),(s(i).totalCacheCreateTokens||0)>0?(h(),b("span",ne,[e[22]||(e[22]=v("缓存创建: ",-1)),t("span",le,d(m(s(i).totalCacheCreateTokens||0)),1)])):I("",!0),(s(i).totalCacheReadTokens||0)>0?(h(),b("span",re,[e[23]||(e[23]=v("缓存读取: ",-1)),t("span",ie,d(m(s(i).totalCacheReadTokens||0)),1)])):I("",!0)])])]),e[25]||(e[25]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-emerald-500 to-emerald-600"},[t("i",{class:"fas fa-database"})],-1))])]),t("div",de,[t("div",ue,[t("div",null,[e[26]||(e[26]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"平均RPM",-1)),t("p",ce,d(s(i).systemRPM||0),1),e[27]||(e[27]=t("p",{class:"text-xs text-gray-500 mt-1"},"每分钟请求数",-1))]),e[28]||(e[28]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-orange-500 to-orange-600"},[t("i",{class:"fas fa-tachometer-alt"})],-1))])]),t("div",pe,[t("div",ye,[t("div",null,[e[29]||(e[29]=t("p",{class:"text-sm font-semibold text-gray-600 mb-1"},"平均TPM",-1)),t("p",me,d(s(i).systemTPM||0),1),e[30]||(e[30]=t("p",{class:"text-xs text-gray-500 mt-1"},"每分钟Token数",-1))]),e[31]||(e[31]=t("div",{class:"stat-icon flex-shrink-0 bg-gradient-to-br from-rose-500 to-rose-600"},[t("i",{class:"fas fa-rocket"})],-1))])])]),t("div",fe,[t("div",ge,[e[36]||(e[36]=t("h3",{class:"text-xl font-bold text-gray-900"},"模型使用分布与Token使用趋势",-1)),t("div",xe,[t("div",be,[(h(!0),b(lt,null,rt(s(g).presetOptions,u=>(h(),b("button",{key:u.value,onClick:A=>s(K)(u.value),class:j(["px-3 py-1 rounded-md text-sm font-medium transition-colors",s(g).preset===u.value&&s(g).type==="preset"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"])},d(u.label),11,ve))),128))]),t("div",he,[t("button",{onClick:e[0]||(e[0]=u=>s(N)("day")),class:j(["px-3 py-1 rounded-md text-sm font-medium transition-colors",s(R)==="day"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"])},e[32]||(e[32]=[t("i",{class:"fas fa-calendar-day mr-1"},null,-1),v("按天 ",-1)]),2),t("button",{onClick:e[1]||(e[1]=u=>s(N)("hour")),class:j(["px-3 py-1 rounded-md text-sm font-medium transition-colors",s(R)==="hour"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"])},e[33]||(e[33]=[t("i",{class:"fas fa-clock mr-1"},null,-1),v("按小时 ",-1)]),2)]),t("div",ke,[yt(f,{"default-time":s(Z),modelValue:s(g).customRange,"onUpdate:modelValue":e[2]||(e[2]=u=>s(g).customRange=u),type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",onChange:s(et),"disabled-date":s(z),size:"default",style:{width:"400px"},class:"custom-date-picker"},null,8,["default-time","modelValue","onChange","disabled-date"]),s(R)==="hour"?(h(),b("span",Ce,e[34]||(e[34]=[t("i",{class:"fas fa-info-circle"},null,-1),v(" 最多24小时 ",-1)]))):I("",!0)]),t("button",{onClick:e[3]||(e[3]=u=>s($)()),class:"btn btn-primary px-4 py-2 flex items-center gap-2"},e[35]||(e[35]=[t("i",{class:"fas fa-sync-alt"},null,-1),v("刷新 ",-1)]))])]),t("div",Te,[t("div",_e,[e[37]||(e[37]=t("h4",{class:"text-lg font-semibold text-gray-800 mb-4"},"Token使用分布",-1)),t("div",De,[t("canvas",{ref_key:"modelUsageChart",ref:B},null,512)])]),t("div",we,[e[40]||(e[40]=t("h4",{class:"text-lg font-semibold text-gray-800 mb-4"},"详细统计数据",-1)),s(w).length===0?(h(),b("div",Re,e[38]||(e[38]=[t("p",{class:"text-gray-500"},"暂无模型使用数据",-1)]))):(h(),b("div",Ae,[t("table",Se,[e[39]||(e[39]=t("thead",{class:"bg-gray-50 sticky top-0"},[t("tr",null,[t("th",{class:"px-4 py-2 text-left text-xs font-medium text-gray-700"},"模型"),t("th",{class:"px-4 py-2 text-right text-xs font-medium text-gray-700"},"请求数"),t("th",{class:"px-4 py-2 text-right text-xs font-medium text-gray-700"},"总Token"),t("th",{class:"px-4 py-2 text-right text-xs font-medium text-gray-700"},"费用"),t("th",{class:"px-4 py-2 text-right text-xs font-medium text-gray-700"},"占比")])],-1)),t("tbody",Ke,[(h(!0),b(lt,null,rt(s(w),u=>(h(),b("tr",{key:u.model,class:"hover:bg-gray-50"},[t("td",$e,d(u.model),1),t("td",Me,d(m(u.requests)),1),t("td",Ue,d(m(u.allTokens)),1),t("td",Pe,d(u.formatted?u.formatted.total:"$0.000000"),1),t("td",Fe,[t("span",Ie,d(C(u.allTokens,s(w)))+"% ",1)])]))),128))])])]))])])]),t("div",Oe,[t("div",qe,[t("div",Be,[t("canvas",{ref_key:"usageTrendChart",ref:a},null,512)])])]),t("div",He,[t("div",Ee,[t("div",je,[e[43]||(e[43]=t("h3",{class:"text-lg font-semibold text-gray-900"},"API Keys 使用趋势",-1)),t("div",Le,[t("button",{onClick:e[4]||(e[4]=u=>{_.value="requests",Q()}),class:j(["px-3 py-1 rounded-md text-sm font-medium transition-colors",s(_)==="requests"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"])},e[41]||(e[41]=[t("i",{class:"fas fa-exchange-alt mr-1"},null,-1),v("请求次数 ",-1)]),2),t("button",{onClick:e[5]||(e[5]=u=>{_.value="tokens",Q()}),class:j(["px-3 py-1 rounded-md text-sm font-medium transition-colors",s(_)==="tokens"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"])},e[42]||(e[42]=[t("i",{class:"fas fa-coins mr-1"},null,-1),v("Token 数量 ",-1)]),2)])]),t("div",Ve,[s(T).totalApiKeys>10?(h(),b("span",Ye," 共 "+d(s(T).totalApiKeys)+" 个 API Key,显示使用量前 10 个 ",1)):(h(),b("span",Ne," 共 "+d(s(T).totalApiKeys)+" 个 API Key ",1))]),t("div",ze,[t("canvas",{ref_key:"apiKeysUsageTrendChart",ref:r},null,512)])])])])}}},es=mt(Ge,[["__scopeId","data-v-5170898f"]]);export{es as default};
diff --git a/web/admin-spa/dist/assets/LoginView-DzGla9X4.js b/web/admin-spa/dist/assets/LoginView-CgFwBxpX.js
similarity index 93%
rename from web/admin-spa/dist/assets/LoginView-DzGla9X4.js
rename to web/admin-spa/dist/assets/LoginView-CgFwBxpX.js
index 39eaf62f..e7908871 100644
--- a/web/admin-spa/dist/assets/LoginView-DzGla9X4.js
+++ b/web/admin-spa/dist/assets/LoginView-CgFwBxpX.js
@@ -1 +1 @@
-import{c as b,r as x,q as f,x as a,z as s,L as i,Q as y,u as o,P as m,Y as _,K as u,aq as c,O as g,y as n}from"./vue-vendor-YmkKLAOK.js";import{_ as v,u as w}from"./index-BfaL5u2_.js";/* empty css */import"./element-plus-D-FTEVKS.js";import"./vendor-BDiMbLwQ.js";const h={class:"flex items-center justify-center min-h-screen p-6"},k={class:"glass-strong rounded-3xl p-10 w-full max-w-md shadow-2xl"},L={class:"text-center mb-8"},S={class:"w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-blue-500/20 to-purple-500/20 border border-gray-300/30 rounded-2xl flex items-center justify-center backdrop-blur-sm overflow-hidden"},V=["src"],I={key:1,class:"fas fa-cloud text-3xl text-gray-700"},N={key:1,class:"w-12 h-12 bg-gray-300/50 rounded animate-pulse"},q={key:0,class:"text-3xl font-bold text-white mb-2 header-title"},D={key:1,class:"h-9 w-64 bg-gray-300/50 rounded animate-pulse mx-auto mb-2"},E=["disabled"],j={key:0,class:"fas fa-sign-in-alt mr-2"},B={key:1,class:"loading-spinner mr-2"},M={key:0,class:"mt-6 p-4 bg-red-500/20 border border-red-500/30 rounded-xl text-red-800 text-sm text-center backdrop-blur-sm"},F={__name:"LoginView",setup(O){const e=w(),d=b(()=>e.oemLoading),l=x({username:"",password:""});f(()=>{e.loadOemSettings()});const p=async()=>{await e.login(l.value)};return(T,t)=>(n(),a("div",h,[s("div",k,[s("div",L,[s("div",S,[d.value?(n(),a("div",N)):(n(),a(y,{key:0},[o(e).oemSettings.siteIconData||o(e).oemSettings.siteIcon?(n(),a("img",{key:0,src:o(e).oemSettings.siteIconData||o(e).oemSettings.siteIcon,alt:"Logo",class:"w-12 h-12 object-contain",onError:t[0]||(t[0]=r=>r.target.style.display="none")},null,40,V)):(n(),a("i",I))],64))]),!d.value&&o(e).oemSettings.siteName?(n(),a("h1",q,m(o(e).oemSettings.siteName),1)):d.value?(n(),a("div",D)):i("",!0),t[3]||(t[3]=s("p",{class:"text-gray-600 text-lg"},"管理后台",-1))]),s("form",{onSubmit:_(p,["prevent"]),class:"space-y-6"},[s("div",null,[t[4]||(t[4]=s("label",{class:"block text-sm font-semibold text-gray-900 mb-3"},"用户名",-1)),u(s("input",{"onUpdate:modelValue":t[1]||(t[1]=r=>l.value.username=r),type:"text",required:"",class:"form-input w-full",placeholder:"请输入用户名"},null,512),[[c,l.value.username]])]),s("div",null,[t[5]||(t[5]=s("label",{class:"block text-sm font-semibold text-gray-900 mb-3"},"密码",-1)),u(s("input",{"onUpdate:modelValue":t[2]||(t[2]=r=>l.value.password=r),type:"password",required:"",class:"form-input w-full",placeholder:"请输入密码"},null,512),[[c,l.value.password]])]),s("button",{type:"submit",disabled:o(e).loginLoading,class:"btn btn-primary w-full py-4 px-6 text-lg font-semibold"},[o(e).loginLoading?i("",!0):(n(),a("i",j)),o(e).loginLoading?(n(),a("div",B)):i("",!0),g(" "+m(o(e).loginLoading?"登录中...":"登录"),1)],8,E)],32),o(e).loginError?(n(),a("div",M,[t[6]||(t[6]=s("i",{class:"fas fa-exclamation-triangle mr-2"},null,-1)),g(m(o(e).loginError),1)])):i("",!0)])]))}},P=v(F,[["__scopeId","data-v-4a19afbe"]]);export{P as default};
+import{c as b,r as x,q as f,x as a,z as s,L as i,Q as y,u as o,P as m,Y as _,K as u,aq as c,O as g,y as n}from"./vue-vendor-CKToUHZx.js";import{_ as v,u as w}from"./index-CJmHAjMf.js";/* empty css */import"./element-plus-B8Fs_0jW.js";import"./vendor-BDiMbLwQ.js";const h={class:"flex items-center justify-center min-h-screen p-6"},k={class:"glass-strong rounded-3xl p-10 w-full max-w-md shadow-2xl"},L={class:"text-center mb-8"},S={class:"w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-blue-500/20 to-purple-500/20 border border-gray-300/30 rounded-2xl flex items-center justify-center backdrop-blur-sm overflow-hidden"},V=["src"],I={key:1,class:"fas fa-cloud text-3xl text-gray-700"},N={key:1,class:"w-12 h-12 bg-gray-300/50 rounded animate-pulse"},q={key:0,class:"text-3xl font-bold text-white mb-2 header-title"},D={key:1,class:"h-9 w-64 bg-gray-300/50 rounded animate-pulse mx-auto mb-2"},E=["disabled"],j={key:0,class:"fas fa-sign-in-alt mr-2"},B={key:1,class:"loading-spinner mr-2"},M={key:0,class:"mt-6 p-4 bg-red-500/20 border border-red-500/30 rounded-xl text-red-800 text-sm text-center backdrop-blur-sm"},F={__name:"LoginView",setup(O){const e=w(),d=b(()=>e.oemLoading),l=x({username:"",password:""});f(()=>{e.loadOemSettings()});const p=async()=>{await e.login(l.value)};return(T,t)=>(n(),a("div",h,[s("div",k,[s("div",L,[s("div",S,[d.value?(n(),a("div",N)):(n(),a(y,{key:0},[o(e).oemSettings.siteIconData||o(e).oemSettings.siteIcon?(n(),a("img",{key:0,src:o(e).oemSettings.siteIconData||o(e).oemSettings.siteIcon,alt:"Logo",class:"w-12 h-12 object-contain",onError:t[0]||(t[0]=r=>r.target.style.display="none")},null,40,V)):(n(),a("i",I))],64))]),!d.value&&o(e).oemSettings.siteName?(n(),a("h1",q,m(o(e).oemSettings.siteName),1)):d.value?(n(),a("div",D)):i("",!0),t[3]||(t[3]=s("p",{class:"text-gray-600 text-lg"},"管理后台",-1))]),s("form",{onSubmit:_(p,["prevent"]),class:"space-y-6"},[s("div",null,[t[4]||(t[4]=s("label",{class:"block text-sm font-semibold text-gray-900 mb-3"},"用户名",-1)),u(s("input",{"onUpdate:modelValue":t[1]||(t[1]=r=>l.value.username=r),type:"text",required:"",class:"form-input w-full",placeholder:"请输入用户名"},null,512),[[c,l.value.username]])]),s("div",null,[t[5]||(t[5]=s("label",{class:"block text-sm font-semibold text-gray-900 mb-3"},"密码",-1)),u(s("input",{"onUpdate:modelValue":t[2]||(t[2]=r=>l.value.password=r),type:"password",required:"",class:"form-input w-full",placeholder:"请输入密码"},null,512),[[c,l.value.password]])]),s("button",{type:"submit",disabled:o(e).loginLoading,class:"btn btn-primary w-full py-4 px-6 text-lg font-semibold"},[o(e).loginLoading?i("",!0):(n(),a("i",j)),o(e).loginLoading?(n(),a("div",B)):i("",!0),g(" "+m(o(e).loginLoading?"登录中...":"登录"),1)],8,E)],32),o(e).loginError?(n(),a("div",M,[t[6]||(t[6]=s("i",{class:"fas fa-exclamation-triangle mr-2"},null,-1)),g(m(o(e).loginError),1)])):i("",!0)])]))}},P=v(F,[["__scopeId","data-v-4a19afbe"]]);export{P as default};
diff --git a/web/admin-spa/dist/assets/LogoTitle-DG-EsEim.js b/web/admin-spa/dist/assets/LogoTitle-DG-EsEim.js
deleted file mode 100644
index ce68d47b..00000000
--- a/web/admin-spa/dist/assets/LogoTitle-DG-EsEim.js
+++ /dev/null
@@ -1 +0,0 @@
-/* empty css */import{_ as r}from"./index-BfaL5u2_.js";import{x as e,y as s,z as o,Q as c,L as l,C as d,P as i}from"./vue-vendor-YmkKLAOK.js";const g={class:"flex items-center gap-4"},u={class:"w-12 h-12 bg-gradient-to-br from-blue-500/20 to-purple-500/20 border border-gray-300/30 rounded-xl flex items-center justify-center backdrop-blur-sm flex-shrink-0 overflow-hidden"},y=["src"],f={key:1,class:"fas fa-cloud text-xl text-gray-700"},m={key:1,class:"w-8 h-8 bg-gray-300/50 rounded animate-pulse"},h={class:"flex flex-col justify-center min-h-[48px]"},x={class:"flex items-center gap-3"},b={key:1,class:"h-8 w-64 bg-gray-300/50 rounded animate-pulse"},k={key:0,class:"text-gray-600 text-sm leading-tight mt-0.5"},_={__name:"LogoTitle",props:{loading:{type:Boolean,default:!1},title:{type:String,default:""},subtitle:{type:String,default:""},logoSrc:{type:String,default:""},titleClass:{type:String,default:"text-gray-900"}},setup(t){const n=a=>{a.target.style.display="none"};return(a,p)=>(s(),e("div",g,[o("div",u,[t.loading?(s(),e("div",m)):(s(),e(c,{key:0},[t.logoSrc?(s(),e("img",{key:0,src:t.logoSrc,alt:"Logo",class:"w-8 h-8 object-contain",onError:n},null,40,y)):(s(),e("i",f))],64))]),o("div",h,[o("div",x,[!t.loading&&t.title?(s(),e("h1",{key:0,class:d(["text-2xl font-bold header-title leading-tight",t.titleClass])},i(t.title),3)):t.loading?(s(),e("div",b)):l("",!0)]),t.subtitle?(s(),e("p",k,i(t.subtitle),1)):l("",!0)])]))}},w=r(_,[["__scopeId","data-v-43271b76"]]);export{w as L};
diff --git a/web/admin-spa/dist/assets/LogoTitle-DN1tf4fC.css b/web/admin-spa/dist/assets/LogoTitle-DN1tf4fC.css
deleted file mode 100644
index 70c12a66..00000000
--- a/web/admin-spa/dist/assets/LogoTitle-DN1tf4fC.css
+++ /dev/null
@@ -1 +0,0 @@
-@keyframes pulse-43271b76{0%{opacity:.7}50%{opacity:.4}to{opacity:.7}}.animate-pulse[data-v-43271b76]{animation:pulse-43271b76 2s cubic-bezier(.4,0,.6,1) infinite}.header-title[data-v-43271b76]{text-shadow:0 1px 2px rgba(0,0,0,.1)}
diff --git a/web/admin-spa/dist/assets/LogoTitle-hKoMpRxB.js b/web/admin-spa/dist/assets/LogoTitle-hKoMpRxB.js
new file mode 100644
index 00000000..05a22b48
--- /dev/null
+++ b/web/admin-spa/dist/assets/LogoTitle-hKoMpRxB.js
@@ -0,0 +1 @@
+/* empty css */import{_ as r}from"./index-CJmHAjMf.js";import{x as t,y as s,z as l,Q as d,L as o,A as c,C as g,P as i}from"./vue-vendor-CKToUHZx.js";const u={class:"flex items-center gap-4"},f={class:"w-12 h-12 bg-gradient-to-br from-blue-500/20 to-purple-500/20 border border-gray-300/30 rounded-xl flex items-center justify-center backdrop-blur-sm flex-shrink-0 overflow-hidden"},y=["src"],m={key:1,class:"fas fa-cloud text-xl text-gray-700"},h={key:1,class:"w-8 h-8 bg-gray-300/50 rounded animate-pulse"},x={class:"flex flex-col justify-center min-h-[48px]"},b={class:"flex items-center gap-3"},k={key:1,class:"h-8 w-64 bg-gray-300/50 rounded animate-pulse"},_={key:0,class:"text-gray-600 text-sm leading-tight mt-0.5"},S={__name:"LogoTitle",props:{loading:{type:Boolean,default:!1},title:{type:String,default:""},subtitle:{type:String,default:""},logoSrc:{type:String,default:""},titleClass:{type:String,default:"text-gray-900"}},setup(e){const n=a=>{a.target.style.display="none"};return(a,p)=>(s(),t("div",u,[l("div",f,[e.loading?(s(),t("div",h)):(s(),t(d,{key:0},[e.logoSrc?(s(),t("img",{key:0,src:e.logoSrc,alt:"Logo",class:"w-8 h-8 object-contain",onError:n},null,40,y)):(s(),t("i",m))],64))]),l("div",x,[l("div",b,[!e.loading&&e.title?(s(),t("h1",{key:0,class:g(["text-2xl font-bold header-title leading-tight",e.titleClass])},i(e.title),3)):e.loading?(s(),t("div",k)):o("",!0),c(a.$slots,"after-title",{},void 0,!0)]),e.subtitle?(s(),t("p",_,i(e.subtitle),1)):o("",!0)])]))}},C=r(S,[["__scopeId","data-v-a75bf797"]]);export{C as L};
diff --git a/web/admin-spa/dist/assets/LogoTitle-zkjZaSZH.css b/web/admin-spa/dist/assets/LogoTitle-zkjZaSZH.css
new file mode 100644
index 00000000..85b160e6
--- /dev/null
+++ b/web/admin-spa/dist/assets/LogoTitle-zkjZaSZH.css
@@ -0,0 +1 @@
+@keyframes pulse-a75bf797{0%{opacity:.7}50%{opacity:.4}to{opacity:.7}}.animate-pulse[data-v-a75bf797]{animation:pulse-a75bf797 2s cubic-bezier(.4,0,.6,1) infinite}.header-title[data-v-a75bf797]{text-shadow:0 1px 2px rgba(0,0,0,.1)}
diff --git a/web/admin-spa/dist/assets/MainLayout-257Lv4Zf.js b/web/admin-spa/dist/assets/MainLayout-257Lv4Zf.js
new file mode 100644
index 00000000..9395e278
--- /dev/null
+++ b/web/admin-spa/dist/assets/MainLayout-257Lv4Zf.js
@@ -0,0 +1 @@
+import{c as M,r as w,_ as O,q as E,V as R,x as o,y as n,z as t,L as T,R as y,J as U,P as b,C as V,Y as $,O as v,T as D,K as k,aq as _,Q as N,aT as q,ac as F,o as J,av as H,aU as Q,I as A,aV as Y,M as G}from"./vue-vendor-CKToUHZx.js";import{_ as L,u as W,a as j}from"./index-CJmHAjMf.js";import{s as g}from"./toast-BvwA7Mwb.js";import{L as X}from"./LogoTitle-hKoMpRxB.js";import"./element-plus-B8Fs_0jW.js";import"./vendor-BDiMbLwQ.js";/* empty css */const Z={class:"glass-strong rounded-3xl p-6 mb-8 shadow-xl",style:{"z-index":"10",position:"relative"}},ee={class:"flex flex-col md:flex-row justify-between items-center gap-4"},te={class:"flex items-center gap-4"},se={class:"flex items-center gap-2"},ae={class:"text-sm text-gray-400 font-mono"},ne=["href"],oe={class:"relative user-menu-container"},le={class:"px-4 py-3 border-b border-gray-100"},re={class:"flex items-center justify-between text-sm"},ie={class:"font-mono text-gray-700"},ue={key:0,class:"mt-2"},de={class:"flex items-center justify-between text-sm mb-2"},ce={class:"font-mono text-green-600"},me=["href"],fe={key:1,class:"mt-2 text-center text-xs text-gray-500"},pe={key:2,class:"mt-2 text-center"},ve={key:"message",class:"px-3 py-1.5 bg-green-100 border border-green-200 rounded-lg inline-block"},xe={key:0,class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},ge={class:"modal-content w-full max-w-md p-8 mx-auto max-h-[90vh] flex flex-col"},be=["value"],ye={class:"flex gap-3 pt-4"},we=["disabled"],he={key:0,class:"loading-spinner mr-2"},ke={key:1,class:"fas fa-save mr-2"},_e={__name:"AppHeader",setup(C){const x=q(),d=W(),m=M(()=>d.user||{username:"Admin"}),l=M(()=>d.oemSettings||{}),h=M(()=>d.oemLoading),s=w({current:"...",latest:"",hasUpdate:!1,checkingUpdate:!1,lastChecked:null,releaseInfo:null,noUpdateMessage:!1}),r=w(!1),f=w(!1),p=w(!1),a=O({currentPassword:"",newPassword:"",confirmPassword:"",newUsername:""}),P=async()=>{if(!s.value.checkingUpdate){s.value.checkingUpdate=!0;try{const u=await j.get("/admin/check-updates");if(u.success){const e=u.data;s.value.current=e.current,s.value.latest=e.latest,s.value.hasUpdate=e.hasUpdate,s.value.releaseInfo=e.releaseInfo,s.value.lastChecked=new Date,localStorage.setItem("versionInfo",JSON.stringify({current:e.current,latest:e.latest,lastChecked:s.value.lastChecked,hasUpdate:e.hasUpdate,releaseInfo:e.releaseInfo})),e.hasUpdate||(s.value.noUpdateMessage=!0,setTimeout(()=>{s.value.noUpdateMessage=!1},3e3))}}catch(u){console.error("Error checking for updates:",u);const e=localStorage.getItem("versionInfo");if(e){const c=JSON.parse(e);s.value.current=c.current||s.value.current,s.value.latest=c.latest,s.value.hasUpdate=c.hasUpdate,s.value.releaseInfo=c.releaseInfo,s.value.lastChecked=new Date(c.lastChecked)}}finally{s.value.checkingUpdate=!1}}},z=()=>{a.currentPassword="",a.newPassword="",a.confirmPassword="",a.newUsername="",f.value=!0,r.value=!1},I=()=>{f.value=!1},B=async()=>{if(a.newPassword!==a.confirmPassword){g("两次输入的密码不一致","error");return}if(a.newPassword.length<8){g("新密码长度至少8位","error");return}p.value=!0;try{const u=await j.post("/admin/change-password",{currentPassword:a.currentPassword,newPassword:a.newPassword,newUsername:a.newUsername||void 0});if(u.success){const e=a.newUsername?"账户信息修改成功,请重新登录":"密码修改成功,请重新登录";g(e,"success"),I(),setTimeout(()=>{d.logout(),x.push("/login")},1500)}else g(u.message||"修改失败","error")}catch{g("修改密码失败","error")}finally{p.value=!1}},K=()=>{confirm("确定要退出登录吗?")&&(d.logout(),x.push("/login"),g("已安全退出","success")),r.value=!1},S=u=>{!u.target.closest(".user-menu-container")&&r.value&&(r.value=!1)};return E(()=>{P(),setInterval(()=>{P()},36e5),document.addEventListener("click",S)}),R(()=>{document.removeEventListener("click",S)}),(u,e)=>{var c;return n(),o(N,null,[t("div",Z,[t("div",ee,[t("div",te,[y(X,{loading:h.value,title:l.value.siteName,subtitle:"管理后台","logo-src":l.value.siteIconData||l.value.siteIcon,"title-class":"text-white"},{"after-title":U(()=>{var i;return[t("div",se,[t("span",ae,"v"+b(s.value.current||"..."),1),s.value.hasUpdate?(n(),o("a",{key:0,href:((i=s.value.releaseInfo)==null?void 0:i.htmlUrl)||"#",target:"_blank",class:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-500 border border-green-600 rounded-full text-xs text-white hover:bg-green-600 transition-colors animate-pulse",title:"有新版本可用"},e[7]||(e[7]=[t("i",{class:"fas fa-arrow-up text-[10px]"},null,-1),t("span",null,"新版本",-1)]),8,ne)):T("",!0)])]}),_:1},8,["loading","title","logo-src"])]),t("div",oe,[t("button",{onClick:e[0]||(e[0]=i=>r.value=!r.value),class:"btn btn-primary px-4 py-3 flex items-center gap-2 relative"},[e[8]||(e[8]=t("i",{class:"fas fa-user-circle"},null,-1)),t("span",null,b(m.value.username||"Admin"),1),t("i",{class:V(["fas fa-chevron-down text-xs transition-transform duration-200",{"rotate-180":r.value}])},null,2)]),r.value?(n(),o("div",{key:0,class:"absolute right-0 top-full mt-2 w-56 bg-white rounded-xl shadow-xl border border-gray-200 py-2 user-menu-dropdown",style:{"z-index":"999999"},onClick:e[2]||(e[2]=$(()=>{},["stop"]))},[t("div",le,[t("div",re,[e[9]||(e[9]=t("span",{class:"text-gray-500"},"当前版本",-1)),t("span",ie,"v"+b(s.value.current||"..."),1)]),s.value.hasUpdate?(n(),o("div",ue,[t("div",de,[e[10]||(e[10]=t("span",{class:"text-green-600 font-medium"},[t("i",{class:"fas fa-arrow-up mr-1"}),v("有新版本 ")],-1)),t("span",ce,"v"+b(s.value.latest),1)]),t("a",{href:((c=s.value.releaseInfo)==null?void 0:c.htmlUrl)||"#",target:"_blank",class:"block w-full text-center px-3 py-1.5 bg-green-500 text-white text-sm rounded-lg hover:bg-green-600 transition-colors"},e[11]||(e[11]=[t("i",{class:"fas fa-external-link-alt mr-1"},null,-1),v("查看更新 ",-1)]),8,me)])):s.value.checkingUpdate?(n(),o("div",fe,e[12]||(e[12]=[t("i",{class:"fas fa-spinner fa-spin mr-1"},null,-1),v("检查更新中... ",-1)]))):(n(),o("div",pe,[y(D,{name:"fade",mode:"out-in"},{default:U(()=>[s.value.noUpdateMessage?(n(),o("div",ve,e[13]||(e[13]=[t("p",{class:"text-xs text-green-700 font-medium"},[t("i",{class:"fas fa-check-circle mr-1"}),v("当前已是最新版本 ")],-1)]))):(n(),o("button",{key:"button",onClick:e[1]||(e[1]=i=>P()),class:"text-xs text-blue-500 hover:text-blue-700 transition-colors"},e[14]||(e[14]=[t("i",{class:"fas fa-sync-alt mr-1"},null,-1),v("检查更新 ",-1)])))]),_:1})]))]),t("button",{onClick:z,class:"w-full px-4 py-3 text-left text-gray-700 hover:bg-gray-50 transition-colors flex items-center gap-3"},e[15]||(e[15]=[t("i",{class:"fas fa-key text-blue-500"},null,-1),t("span",null,"修改账户信息",-1)])),e[17]||(e[17]=t("hr",{class:"my-2 border-gray-200"},null,-1)),t("button",{onClick:K,class:"w-full px-4 py-3 text-left text-gray-700 hover:bg-gray-50 transition-colors flex items-center gap-3"},e[16]||(e[16]=[t("i",{class:"fas fa-sign-out-alt text-red-500"},null,-1),t("span",null,"退出登录",-1)]))])):T("",!0)])])]),f.value?(n(),o("div",xe,[t("div",ge,[t("div",{class:"flex items-center justify-between mb-6"},[e[19]||(e[19]=t("div",{class:"flex items-center gap-3"},[t("div",{class:"w-10 h-10 bg-gradient-to-br from-blue-500 to-blue-600 rounded-xl flex items-center justify-center"},[t("i",{class:"fas fa-key text-white"})]),t("h3",{class:"text-xl font-bold text-gray-900"},"修改账户信息")],-1)),t("button",{onClick:I,class:"text-gray-400 hover:text-gray-600 transition-colors"},e[18]||(e[18]=[t("i",{class:"fas fa-times text-xl"},null,-1)]))]),t("form",{onSubmit:$(B,["prevent"]),class:"space-y-6 modal-scroll-content custom-scrollbar flex-1"},[t("div",null,[e[20]||(e[20]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"当前用户名",-1)),t("input",{value:m.value.username||"Admin",type:"text",disabled:"",class:"form-input w-full bg-gray-100 cursor-not-allowed"},null,8,be),e[21]||(e[21]=t("p",{class:"text-xs text-gray-500 mt-2"},"当前用户名,输入新用户名以修改",-1))]),t("div",null,[e[22]||(e[22]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"新用户名",-1)),k(t("input",{"onUpdate:modelValue":e[3]||(e[3]=i=>a.newUsername=i),type:"text",class:"form-input w-full",placeholder:"输入新用户名(留空保持不变)"},null,512),[[_,a.newUsername]]),e[23]||(e[23]=t("p",{class:"text-xs text-gray-500 mt-2"},"留空表示不修改用户名",-1))]),t("div",null,[e[24]||(e[24]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"当前密码",-1)),k(t("input",{"onUpdate:modelValue":e[4]||(e[4]=i=>a.currentPassword=i),type:"password",required:"",class:"form-input w-full",placeholder:"请输入当前密码"},null,512),[[_,a.currentPassword]])]),t("div",null,[e[25]||(e[25]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"新密码",-1)),k(t("input",{"onUpdate:modelValue":e[5]||(e[5]=i=>a.newPassword=i),type:"password",required:"",class:"form-input w-full",placeholder:"请输入新密码"},null,512),[[_,a.newPassword]]),e[26]||(e[26]=t("p",{class:"text-xs text-gray-500 mt-2"},"密码长度至少8位",-1))]),t("div",null,[e[27]||(e[27]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"确认新密码",-1)),k(t("input",{"onUpdate:modelValue":e[6]||(e[6]=i=>a.confirmPassword=i),type:"password",required:"",class:"form-input w-full",placeholder:"请再次输入新密码"},null,512),[[_,a.confirmPassword]])]),t("div",ye,[t("button",{type:"button",onClick:I,class:"flex-1 px-6 py-3 bg-gray-100 text-gray-700 rounded-xl font-semibold hover:bg-gray-200 transition-colors"}," 取消 "),t("button",{type:"submit",disabled:p.value,class:"btn btn-primary flex-1 py-3 px-6 font-semibold"},[p.value?(n(),o("div",he)):(n(),o("i",ke)),v(" "+b(p.value?"保存中...":"保存修改"),1)],8,we)])],32)])])):T("",!0)],64)}}},Ue=L(_e,[["__scopeId","data-v-9c2dcb55"]]),Ce={class:"flex flex-wrap gap-2 mb-6 bg-white/10 rounded-2xl p-2 backdrop-blur-sm"},Pe=["onClick"],Ie={__name:"TabBar",props:{activeTab:{type:String,required:!0}},emits:["tab-change"],setup(C){const x=[{key:"dashboard",name:"仪表板",icon:"fas fa-tachometer-alt"},{key:"apiKeys",name:"API Keys",icon:"fas fa-key"},{key:"accounts",name:"账户管理",icon:"fas fa-user-circle"},{key:"tutorial",name:"使用教程",icon:"fas fa-graduation-cap"},{key:"settings",name:"其他设置",icon:"fas fa-cogs"}];return(d,m)=>(n(),o("div",Ce,[(n(),o(N,null,F(x,l=>t("button",{key:l.key,onClick:h=>d.$emit("tab-change",l.key),class:V(["tab-btn flex-1 py-3 px-6 text-sm font-semibold transition-all duration-300",C.activeTab===l.key?"active":"text-gray-700 hover:bg-white/10 hover:text-gray-900"])},[t("i",{class:V(l.icon+" mr-2")},null,2),v(b(l.name),1)],10,Pe)),64))]))}},Me=L(Ie,[["__scopeId","data-v-0593e69b"]]),Te={class:"min-h-screen p-6"},Ve={class:"glass-strong rounded-3xl p-6 shadow-xl",style:{"z-index":"1","min-height":"calc(100vh - 240px)"}},Le={class:"tab-content"},Se={__name:"MainLayout",setup(C){const x=Q(),d=q(),m=w("dashboard"),l={dashboard:"/dashboard",apiKeys:"/api-keys",accounts:"/accounts",tutorial:"/tutorial",settings:"/settings"};J(()=>x.path,s=>{const r=Object.keys(l).find(f=>l[f]===s);r&&(m.value=r)},{immediate:!0});const h=s=>{m.value=s,d.push(l[s])};return(s,r)=>{const f=H("router-view");return n(),o("div",Te,[y(Ue),t("div",Ve,[y(Me,{"active-tab":m.value,onTabChange:h},null,8,["active-tab"]),t("div",Le,[y(f,null,{default:U(({Component:p})=>[y(D,{name:"slide-up",mode:"out-in"},{default:U(()=>[(n(),A(Y,{include:["DashboardView","ApiKeysView"]},[(n(),A(G(p)))],1024))]),_:2},1024)]),_:1})])])])}}},Be=L(Se,[["__scopeId","data-v-92ae9a03"]]);export{Be as default};
diff --git a/web/admin-spa/dist/assets/MainLayout-BSYYg59M.css b/web/admin-spa/dist/assets/MainLayout-BSYYg59M.css
new file mode 100644
index 00000000..6d19d7b7
--- /dev/null
+++ b/web/admin-spa/dist/assets/MainLayout-BSYYg59M.css
@@ -0,0 +1 @@
+.user-menu-dropdown[data-v-9c2dcb55]{margin-top:8px}.fade-enter-active[data-v-9c2dcb55],.fade-leave-active[data-v-9c2dcb55]{transition:opacity .3s}.fade-enter-from[data-v-9c2dcb55],.fade-leave-to[data-v-9c2dcb55]{opacity:0}
diff --git a/web/admin-spa/dist/assets/MainLayout-CuRONP9w.js b/web/admin-spa/dist/assets/MainLayout-CuRONP9w.js
deleted file mode 100644
index fac76095..00000000
--- a/web/admin-spa/dist/assets/MainLayout-CuRONP9w.js
+++ /dev/null
@@ -1 +0,0 @@
-import{c as I,r as w,_ as E,q as R,V as F,x as o,y as n,z as t,L as M,R as y,P as b,C as T,Y as A,O as v,J as V,T as N,K as k,aq as _,Q as q,aT as z,ac as J,o as H,av as Q,aU as Y,I as j,aV as G,M as W}from"./vue-vendor-YmkKLAOK.js";import{_ as L,u as X,a as D}from"./index-BfaL5u2_.js";import{s as g}from"./toast-BvwA7Mwb.js";import{L as Z}from"./LogoTitle-DG-EsEim.js";import"./element-plus-D-FTEVKS.js";import"./vendor-BDiMbLwQ.js";/* empty css */const ee={class:"glass-strong rounded-3xl p-6 mb-8 shadow-xl",style:{"z-index":"10",position:"relative"}},te={class:"flex flex-col md:flex-row justify-between items-center gap-4"},se={class:"flex items-center gap-4"},ae={class:"flex items-center gap-2"},ne={class:"text-sm text-gray-400 font-mono"},oe=["href"],le={class:"relative user-menu-container"},re={class:"px-4 py-3 border-b border-gray-100"},ie={class:"flex items-center justify-between text-sm"},ue={class:"font-mono text-gray-700"},de={key:0,class:"mt-2"},ce={class:"flex items-center justify-between text-sm mb-2"},me={class:"font-mono text-green-600"},fe=["href"],pe={key:1,class:"mt-2 text-center text-xs text-gray-500"},ve={key:2,class:"mt-2 text-center"},xe={key:"message",class:"px-3 py-1.5 bg-green-100 border border-green-200 rounded-lg inline-block"},ge={key:0,class:"fixed inset-0 modal z-50 flex items-center justify-center p-4"},be={class:"modal-content w-full max-w-md p-8 mx-auto max-h-[90vh] flex flex-col"},ye=["value"],we={class:"flex gap-3 pt-4"},he=["disabled"],ke={key:0,class:"loading-spinner mr-2"},_e={key:1,class:"fas fa-save mr-2"},Ue={__name:"AppHeader",setup(U){const x=z(),u=X(),m=I(()=>u.user||{username:"Admin"}),l=I(()=>u.oemSettings||{}),h=I(()=>u.oemLoading),s=w({current:"...",latest:"",hasUpdate:!1,checkingUpdate:!1,lastChecked:null,releaseInfo:null,noUpdateMessage:!1}),r=w(!1),f=w(!1),p=w(!1),a=E({currentPassword:"",newPassword:"",confirmPassword:"",newUsername:""}),C=async()=>{if(!s.value.checkingUpdate){s.value.checkingUpdate=!0;try{const i=await D.get("/admin/check-updates");if(i.success){const e=i.data;s.value.current=e.current,s.value.latest=e.latest,s.value.hasUpdate=e.hasUpdate,s.value.releaseInfo=e.releaseInfo,s.value.lastChecked=new Date,localStorage.setItem("versionInfo",JSON.stringify({current:e.current,latest:e.latest,lastChecked:s.value.lastChecked,hasUpdate:e.hasUpdate,releaseInfo:e.releaseInfo})),e.hasUpdate||(s.value.noUpdateMessage=!0,setTimeout(()=>{s.value.noUpdateMessage=!1},3e3))}}catch(i){console.error("Error checking for updates:",i);const e=localStorage.getItem("versionInfo");if(e){const c=JSON.parse(e);s.value.current=c.current||s.value.current,s.value.latest=c.latest,s.value.hasUpdate=c.hasUpdate,s.value.releaseInfo=c.releaseInfo,s.value.lastChecked=new Date(c.lastChecked)}}finally{s.value.checkingUpdate=!1}}},B=()=>{a.currentPassword="",a.newPassword="",a.confirmPassword="",a.newUsername="",f.value=!0,r.value=!1},P=()=>{f.value=!1},K=async()=>{if(a.newPassword!==a.confirmPassword){g("两次输入的密码不一致","error");return}if(a.newPassword.length<8){g("新密码长度至少8位","error");return}p.value=!0;try{const i=await D.post("/admin/change-password",{currentPassword:a.currentPassword,newPassword:a.newPassword,newUsername:a.newUsername||void 0});if(i.success){const e=a.newUsername?"账户信息修改成功,请重新登录":"密码修改成功,请重新登录";g(e,"success"),P(),setTimeout(()=>{u.logout(),x.push("/login")},1500)}else g(i.message||"修改失败","error")}catch{g("修改密码失败","error")}finally{p.value=!1}},O=()=>{confirm("确定要退出登录吗?")&&(u.logout(),x.push("/login"),g("已安全退出","success")),r.value=!1},S=i=>{!i.target.closest(".user-menu-container")&&r.value&&(r.value=!1)};return R(()=>{C(),setInterval(()=>{C()},36e5),document.addEventListener("click",S)}),F(()=>{document.removeEventListener("click",S)}),(i,e)=>{var c,$;return n(),o(q,null,[t("div",ee,[t("div",te,[t("div",se,[y(Z,{loading:h.value,title:l.value.siteName,subtitle:"管理后台","logo-src":l.value.siteIconData||l.value.siteIcon,"title-class":"text-white"},null,8,["loading","title","logo-src"]),t("div",ae,[t("span",ne,"v"+b(s.value.current||"..."),1),s.value.hasUpdate?(n(),o("a",{key:0,href:((c=s.value.releaseInfo)==null?void 0:c.htmlUrl)||"#",target:"_blank",class:"inline-flex items-center gap-1 px-2 py-0.5 bg-green-500 border border-green-600 rounded-full text-xs text-white hover:bg-green-600 transition-colors animate-pulse",title:"有新版本可用"},e[7]||(e[7]=[t("i",{class:"fas fa-arrow-up text-[10px]"},null,-1),t("span",null,"新版本",-1)]),8,oe)):M("",!0)])]),t("div",le,[t("button",{onClick:e[0]||(e[0]=d=>r.value=!r.value),class:"btn btn-primary px-4 py-3 flex items-center gap-2 relative"},[e[8]||(e[8]=t("i",{class:"fas fa-user-circle"},null,-1)),t("span",null,b(m.value.username||"Admin"),1),t("i",{class:T(["fas fa-chevron-down text-xs transition-transform duration-200",{"rotate-180":r.value}])},null,2)]),r.value?(n(),o("div",{key:0,class:"absolute right-0 top-full mt-2 w-56 bg-white rounded-xl shadow-xl border border-gray-200 py-2 user-menu-dropdown",style:{"z-index":"999999"},onClick:e[2]||(e[2]=A(()=>{},["stop"]))},[t("div",re,[t("div",ie,[e[9]||(e[9]=t("span",{class:"text-gray-500"},"当前版本",-1)),t("span",ue,"v"+b(s.value.current||"..."),1)]),s.value.hasUpdate?(n(),o("div",de,[t("div",ce,[e[10]||(e[10]=t("span",{class:"text-green-600 font-medium"},[t("i",{class:"fas fa-arrow-up mr-1"}),v("有新版本 ")],-1)),t("span",me,"v"+b(s.value.latest),1)]),t("a",{href:(($=s.value.releaseInfo)==null?void 0:$.htmlUrl)||"#",target:"_blank",class:"block w-full text-center px-3 py-1.5 bg-green-500 text-white text-sm rounded-lg hover:bg-green-600 transition-colors"},e[11]||(e[11]=[t("i",{class:"fas fa-external-link-alt mr-1"},null,-1),v("查看更新 ",-1)]),8,fe)])):s.value.checkingUpdate?(n(),o("div",pe,e[12]||(e[12]=[t("i",{class:"fas fa-spinner fa-spin mr-1"},null,-1),v("检查更新中... ",-1)]))):(n(),o("div",ve,[y(N,{name:"fade",mode:"out-in"},{default:V(()=>[s.value.noUpdateMessage?(n(),o("div",xe,e[13]||(e[13]=[t("p",{class:"text-xs text-green-700 font-medium"},[t("i",{class:"fas fa-check-circle mr-1"}),v("当前已是最新版本 ")],-1)]))):(n(),o("button",{key:"button",onClick:e[1]||(e[1]=d=>C()),class:"text-xs text-blue-500 hover:text-blue-700 transition-colors"},e[14]||(e[14]=[t("i",{class:"fas fa-sync-alt mr-1"},null,-1),v("检查更新 ",-1)])))]),_:1})]))]),t("button",{onClick:B,class:"w-full px-4 py-3 text-left text-gray-700 hover:bg-gray-50 transition-colors flex items-center gap-3"},e[15]||(e[15]=[t("i",{class:"fas fa-key text-blue-500"},null,-1),t("span",null,"修改账户信息",-1)])),e[17]||(e[17]=t("hr",{class:"my-2 border-gray-200"},null,-1)),t("button",{onClick:O,class:"w-full px-4 py-3 text-left text-gray-700 hover:bg-gray-50 transition-colors flex items-center gap-3"},e[16]||(e[16]=[t("i",{class:"fas fa-sign-out-alt text-red-500"},null,-1),t("span",null,"退出登录",-1)]))])):M("",!0)])])]),f.value?(n(),o("div",ge,[t("div",be,[t("div",{class:"flex items-center justify-between mb-6"},[e[19]||(e[19]=t("div",{class:"flex items-center gap-3"},[t("div",{class:"w-10 h-10 bg-gradient-to-br from-blue-500 to-blue-600 rounded-xl flex items-center justify-center"},[t("i",{class:"fas fa-key text-white"})]),t("h3",{class:"text-xl font-bold text-gray-900"},"修改账户信息")],-1)),t("button",{onClick:P,class:"text-gray-400 hover:text-gray-600 transition-colors"},e[18]||(e[18]=[t("i",{class:"fas fa-times text-xl"},null,-1)]))]),t("form",{onSubmit:A(K,["prevent"]),class:"space-y-6 modal-scroll-content custom-scrollbar flex-1"},[t("div",null,[e[20]||(e[20]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"当前用户名",-1)),t("input",{value:m.value.username||"Admin",type:"text",disabled:"",class:"form-input w-full bg-gray-100 cursor-not-allowed"},null,8,ye),e[21]||(e[21]=t("p",{class:"text-xs text-gray-500 mt-2"},"当前用户名,输入新用户名以修改",-1))]),t("div",null,[e[22]||(e[22]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"新用户名",-1)),k(t("input",{"onUpdate:modelValue":e[3]||(e[3]=d=>a.newUsername=d),type:"text",class:"form-input w-full",placeholder:"输入新用户名(留空保持不变)"},null,512),[[_,a.newUsername]]),e[23]||(e[23]=t("p",{class:"text-xs text-gray-500 mt-2"},"留空表示不修改用户名",-1))]),t("div",null,[e[24]||(e[24]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"当前密码",-1)),k(t("input",{"onUpdate:modelValue":e[4]||(e[4]=d=>a.currentPassword=d),type:"password",required:"",class:"form-input w-full",placeholder:"请输入当前密码"},null,512),[[_,a.currentPassword]])]),t("div",null,[e[25]||(e[25]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"新密码",-1)),k(t("input",{"onUpdate:modelValue":e[5]||(e[5]=d=>a.newPassword=d),type:"password",required:"",class:"form-input w-full",placeholder:"请输入新密码"},null,512),[[_,a.newPassword]]),e[26]||(e[26]=t("p",{class:"text-xs text-gray-500 mt-2"},"密码长度至少8位",-1))]),t("div",null,[e[27]||(e[27]=t("label",{class:"block text-sm font-semibold text-gray-700 mb-3"},"确认新密码",-1)),k(t("input",{"onUpdate:modelValue":e[6]||(e[6]=d=>a.confirmPassword=d),type:"password",required:"",class:"form-input w-full",placeholder:"请再次输入新密码"},null,512),[[_,a.confirmPassword]])]),t("div",we,[t("button",{type:"button",onClick:P,class:"flex-1 px-6 py-3 bg-gray-100 text-gray-700 rounded-xl font-semibold hover:bg-gray-200 transition-colors"}," 取消 "),t("button",{type:"submit",disabled:p.value,class:"btn btn-primary flex-1 py-3 px-6 font-semibold"},[p.value?(n(),o("div",ke)):(n(),o("i",_e)),v(" "+b(p.value?"保存中...":"保存修改"),1)],8,he)])],32)])])):M("",!0)],64)}}},Ce=L(Ue,[["__scopeId","data-v-9f4a7654"]]),Pe={class:"flex flex-wrap gap-2 mb-6 bg-white/10 rounded-2xl p-2 backdrop-blur-sm"},Ie=["onClick"],Me={__name:"TabBar",props:{activeTab:{type:String,required:!0}},emits:["tab-change"],setup(U){const x=[{key:"dashboard",name:"仪表板",icon:"fas fa-tachometer-alt"},{key:"apiKeys",name:"API Keys",icon:"fas fa-key"},{key:"accounts",name:"账户管理",icon:"fas fa-user-circle"},{key:"tutorial",name:"使用教程",icon:"fas fa-graduation-cap"},{key:"settings",name:"其他设置",icon:"fas fa-cogs"}];return(u,m)=>(n(),o("div",Pe,[(n(),o(q,null,J(x,l=>t("button",{key:l.key,onClick:h=>u.$emit("tab-change",l.key),class:T(["tab-btn flex-1 py-3 px-6 text-sm font-semibold transition-all duration-300",U.activeTab===l.key?"active":"text-gray-700 hover:bg-white/10 hover:text-gray-900"])},[t("i",{class:T(l.icon+" mr-2")},null,2),v(b(l.name),1)],10,Ie)),64))]))}},Te=L(Me,[["__scopeId","data-v-0593e69b"]]),Ve={class:"min-h-screen p-6"},Le={class:"glass-strong rounded-3xl p-6 shadow-xl",style:{"z-index":"1","min-height":"calc(100vh - 240px)"}},Se={class:"tab-content"},$e={__name:"MainLayout",setup(U){const x=Y(),u=z(),m=w("dashboard"),l={dashboard:"/dashboard",apiKeys:"/api-keys",accounts:"/accounts",tutorial:"/tutorial",settings:"/settings"};H(()=>x.path,s=>{const r=Object.keys(l).find(f=>l[f]===s);r&&(m.value=r)},{immediate:!0});const h=s=>{m.value=s,u.push(l[s])};return(s,r)=>{const f=Q("router-view");return n(),o("div",Ve,[y(Ce),t("div",Le,[y(Te,{"active-tab":m.value,onTabChange:h},null,8,["active-tab"]),t("div",Se,[y(f,null,{default:V(({Component:p})=>[y(N,{name:"slide-up",mode:"out-in"},{default:V(()=>[(n(),j(G,{include:["DashboardView","ApiKeysView"]},[(n(),j(W(p)))],1024))]),_:2},1024)]),_:1})])])])}}},Ke=L($e,[["__scopeId","data-v-92ae9a03"]]);export{Ke as default};
diff --git a/web/admin-spa/dist/assets/MainLayout-DUdrWfaX.css b/web/admin-spa/dist/assets/MainLayout-DUdrWfaX.css
deleted file mode 100644
index 06dfc27a..00000000
--- a/web/admin-spa/dist/assets/MainLayout-DUdrWfaX.css
+++ /dev/null
@@ -1 +0,0 @@
-.user-menu-dropdown[data-v-9f4a7654]{margin-top:8px}.fade-enter-active[data-v-9f4a7654],.fade-leave-active[data-v-9f4a7654]{transition:opacity .3s}.fade-enter-from[data-v-9f4a7654],.fade-leave-to[data-v-9f4a7654]{opacity:0}
diff --git a/web/admin-spa/dist/assets/SettingsView-D0CT7ebY.js b/web/admin-spa/dist/assets/SettingsView-Cj5OFaUq.js
similarity index 97%
rename from web/admin-spa/dist/assets/SettingsView-D0CT7ebY.js
rename to web/admin-spa/dist/assets/SettingsView-Cj5OFaUq.js
index e1d69334..6c908e94 100644
--- a/web/admin-spa/dist/assets/SettingsView-D0CT7ebY.js
+++ b/web/admin-spa/dist/assets/SettingsView-Cj5OFaUq.js
@@ -1,3 +1,3 @@
-import{aR as k,r as x,aW as C,q as O,x as m,z as e,u as i,K as T,aq as N,L as _,O as v,C as j,P as S,y as g}from"./vue-vendor-YmkKLAOK.js";import{s as c}from"./toast-BvwA7Mwb.js";import{a as D,_ as F}from"./index-BfaL5u2_.js";import"./element-plus-D-FTEVKS.js";import"./vendor-BDiMbLwQ.js";const E=k("settings",()=>{const l=x({siteName:"Claude Relay Service",siteIcon:"",siteIconData:"",updatedAt:null}),r=x(!1),p=x(!1),d=async()=>{r.value=!0;try{const s=await D.get("/admin/oem-settings");return s&&s.success&&(l.value={...l.value,...s.data},f()),s}catch(s){throw console.error("Failed to load OEM settings:",s),s}finally{r.value=!1}},a=async s=>{p.value=!0;try{const o=await D.put("/admin/oem-settings",s);return o&&o.success&&(l.value={...l.value,...o.data},f()),o}catch(o){throw console.error("Failed to save OEM settings:",o),o}finally{p.value=!1}},w=async()=>{const s={siteName:"Claude Relay Service",siteIcon:"",siteIconData:"",updatedAt:null};return l.value={...s},await a(s)},f=()=>{if(l.value.siteName&&(document.title=`${l.value.siteName} - 管理后台`),l.value.siteIconData||l.value.siteIcon){const s=document.querySelector('link[rel="icon"]')||document.createElement("link");s.rel="icon",s.href=l.value.siteIconData||l.value.siteIcon,document.querySelector('link[rel="icon"]')||document.head.appendChild(s)}};return{oemSettings:l,loading:r,saving:p,loadOemSettings:d,saveOemSettings:a,resetOemSettings:w,applyOemSettings:f,formatDateTime:s=>s?new Date(s).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"",validateIconFile:s=>{const o=[];return s.size>350*1024&&o.push("图标文件大小不能超过 350KB"),["image/x-icon","image/png","image/jpeg","image/jpg","image/svg+xml"].includes(s.type)||o.push("不支持的文件类型,请选择 .ico, .png, .jpg 或 .svg 文件"),{isValid:o.length===0,errors:o}},fileToBase64:s=>new Promise((o,n)=>{const t=new FileReader;t.onload=u=>o(u.target.result),t.onerror=n,t.readAsDataURL(s)})}}),B={class:"settings-container"},V={class:"card p-6"},R={key:0,class:"text-center py-12"},M={key:1,class:"table-container"},A={class:"min-w-full"},q={class:"divide-y divide-gray-200/50"},z={class:"table-row"},K={class:"px-6 py-4"},L={class:"table-row"},U={class:"px-6 py-4"},$={class:"space-y-3"},P={key:0,class:"inline-flex items-center gap-3 p-3 bg-gray-50 rounded-lg"},W=["src"],G={class:"px-6 py-6",colspan:"2"},H={class:"flex items-center justify-between"},J={class:"flex gap-3"},Q=["disabled"],X={key:0,class:"loading-spinner mr-2"},Y={key:1,class:"fas fa-save mr-2"},Z=["disabled"],ee={key:0,class:"text-sm text-gray-500"},te={__name:"SettingsView",setup(l){const r=E(),{loading:p,saving:d,oemSettings:a}=C(r),w=x();O(async()=>{try{await r.loadOemSettings()}catch{c("加载设置失败","error")}});const f=async()=>{try{const n={siteName:a.value.siteName,siteIcon:a.value.siteIcon,siteIconData:a.value.siteIconData},t=await r.saveOemSettings(n);t&&t.success?c("OEM设置保存成功","success"):c((t==null?void 0:t.message)||"保存失败","error")}catch{c("保存OEM设置失败","error")}},b=async()=>{if(confirm(`确定要重置为默认设置吗?
+import{aR as k,r as x,aW as C,q as O,x as m,z as e,u as i,K as T,aq as N,L as _,O as v,C as j,P as S,y as g}from"./vue-vendor-CKToUHZx.js";import{s as c}from"./toast-BvwA7Mwb.js";import{a as D,_ as F}from"./index-CJmHAjMf.js";import"./element-plus-B8Fs_0jW.js";import"./vendor-BDiMbLwQ.js";const E=k("settings",()=>{const l=x({siteName:"Claude Relay Service",siteIcon:"",siteIconData:"",updatedAt:null}),r=x(!1),p=x(!1),d=async()=>{r.value=!0;try{const s=await D.get("/admin/oem-settings");return s&&s.success&&(l.value={...l.value,...s.data},f()),s}catch(s){throw console.error("Failed to load OEM settings:",s),s}finally{r.value=!1}},a=async s=>{p.value=!0;try{const o=await D.put("/admin/oem-settings",s);return o&&o.success&&(l.value={...l.value,...o.data},f()),o}catch(o){throw console.error("Failed to save OEM settings:",o),o}finally{p.value=!1}},w=async()=>{const s={siteName:"Claude Relay Service",siteIcon:"",siteIconData:"",updatedAt:null};return l.value={...s},await a(s)},f=()=>{if(l.value.siteName&&(document.title=`${l.value.siteName} - 管理后台`),l.value.siteIconData||l.value.siteIcon){const s=document.querySelector('link[rel="icon"]')||document.createElement("link");s.rel="icon",s.href=l.value.siteIconData||l.value.siteIcon,document.querySelector('link[rel="icon"]')||document.head.appendChild(s)}};return{oemSettings:l,loading:r,saving:p,loadOemSettings:d,saveOemSettings:a,resetOemSettings:w,applyOemSettings:f,formatDateTime:s=>s?new Date(s).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"",validateIconFile:s=>{const o=[];return s.size>350*1024&&o.push("图标文件大小不能超过 350KB"),["image/x-icon","image/png","image/jpeg","image/jpg","image/svg+xml"].includes(s.type)||o.push("不支持的文件类型,请选择 .ico, .png, .jpg 或 .svg 文件"),{isValid:o.length===0,errors:o}},fileToBase64:s=>new Promise((o,n)=>{const t=new FileReader;t.onload=u=>o(u.target.result),t.onerror=n,t.readAsDataURL(s)})}}),B={class:"settings-container"},V={class:"card p-6"},R={key:0,class:"text-center py-12"},M={key:1,class:"table-container"},A={class:"min-w-full"},q={class:"divide-y divide-gray-200/50"},z={class:"table-row"},K={class:"px-6 py-4"},L={class:"table-row"},U={class:"px-6 py-4"},$={class:"space-y-3"},P={key:0,class:"inline-flex items-center gap-3 p-3 bg-gray-50 rounded-lg"},W=["src"],G={class:"px-6 py-6",colspan:"2"},H={class:"flex items-center justify-between"},J={class:"flex gap-3"},Q=["disabled"],X={key:0,class:"loading-spinner mr-2"},Y={key:1,class:"fas fa-save mr-2"},Z=["disabled"],ee={key:0,class:"text-sm text-gray-500"},te={__name:"SettingsView",setup(l){const r=E(),{loading:p,saving:d,oemSettings:a}=C(r),w=x();O(async()=>{try{await r.loadOemSettings()}catch{c("加载设置失败","error")}});const f=async()=>{try{const n={siteName:a.value.siteName,siteIcon:a.value.siteIcon,siteIconData:a.value.siteIconData},t=await r.saveOemSettings(n);t&&t.success?c("OEM设置保存成功","success"):c((t==null?void 0:t.message)||"保存失败","error")}catch{c("保存OEM设置失败","error")}},b=async()=>{if(confirm(`确定要重置为默认设置吗?
这将清除所有自定义的网站名称和图标设置。`))try{const n=await r.resetOemSettings();n&&n.success?c("已重置为默认设置","success"):c("重置失败","error")}catch{c("重置失败","error")}},h=async n=>{const t=n.target.files[0];if(!t)return;const u=r.validateIconFile(t);if(!u.isValid){u.errors.forEach(y=>c(y,"error"));return}try{const y=await r.fileToBase64(t);a.value.siteIconData=y}catch{c("文件读取失败","error")}n.target.value=""},I=()=>{a.value.siteIcon="",a.value.siteIconData=""},s=()=>{console.warn("Icon failed to load")},o=r.formatDateTime;return(n,t)=>(g(),m("div",B,[e("div",V,[t[12]||(t[12]=e("div",{class:"flex flex-col md:flex-row justify-between items-center gap-4 mb-6"},[e("div",null,[e("h3",{class:"text-xl font-bold text-gray-900 mb-2"},"其他设置"),e("p",{class:"text-gray-600"},"自定义网站名称和图标")])],-1)),i(p)?(g(),m("div",R,t[2]||(t[2]=[e("div",{class:"loading-spinner mx-auto mb-4"},null,-1),e("p",{class:"text-gray-500"},"正在加载设置...",-1)]))):(g(),m("div",M,[e("table",A,[e("tbody",q,[e("tr",z,[t[4]||(t[4]=e("td",{class:"px-6 py-4 whitespace-nowrap w-48"},[e("div",{class:"flex items-center"},[e("div",{class:"w-8 h-8 bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg flex items-center justify-center mr-3"},[e("i",{class:"fas fa-font text-white text-xs"})]),e("div",null,[e("div",{class:"text-sm font-semibold text-gray-900"},"网站名称"),e("div",{class:"text-xs text-gray-500"},"品牌标识")])])],-1)),e("td",K,[T(e("input",{"onUpdate:modelValue":t[0]||(t[0]=u=>i(a).siteName=u),type:"text",class:"form-input w-full max-w-md",placeholder:"Claude Relay Service",maxlength:"100"},null,512),[[N,i(a).siteName]]),t[3]||(t[3]=e("p",{class:"text-xs text-gray-500 mt-1"},"将显示在浏览器标题和页面头部",-1))])]),e("tr",L,[t[9]||(t[9]=e("td",{class:"px-6 py-4 whitespace-nowrap w-48"},[e("div",{class:"flex items-center"},[e("div",{class:"w-8 h-8 bg-gradient-to-br from-purple-500 to-purple-600 rounded-lg flex items-center justify-center mr-3"},[e("i",{class:"fas fa-image text-white text-xs"})]),e("div",null,[e("div",{class:"text-sm font-semibold text-gray-900"},"网站图标"),e("div",{class:"text-xs text-gray-500"},"Favicon")])])],-1)),e("td",U,[e("div",$,[i(a).siteIconData||i(a).siteIcon?(g(),m("div",P,[e("img",{src:i(a).siteIconData||i(a).siteIcon,alt:"图标预览",class:"w-8 h-8",onError:s},null,40,W),t[6]||(t[6]=e("span",{class:"text-sm text-gray-600"},"当前图标",-1)),e("button",{onClick:I,class:"text-red-600 hover:text-red-900 font-medium hover:bg-red-50 px-3 py-1 rounded-lg transition-colors"},t[5]||(t[5]=[e("i",{class:"fas fa-trash mr-1"},null,-1),v("删除 ",-1)]))])):_("",!0),e("div",null,[e("input",{type:"file",ref_key:"iconFileInput",ref:w,onChange:h,accept:".ico,.png,.jpg,.jpeg,.svg",class:"hidden"},null,544),e("button",{onClick:t[1]||(t[1]=u=>n.$refs.iconFileInput.click()),class:"btn btn-success px-4 py-2"},t[7]||(t[7]=[e("i",{class:"fas fa-upload mr-2"},null,-1),v(" 上传图标 ",-1)])),t[8]||(t[8]=e("span",{class:"text-xs text-gray-500 ml-3"},"支持 .ico, .png, .jpg, .svg 格式,最大 350KB",-1))])])])]),e("tr",null,[e("td",G,[e("div",H,[e("div",J,[e("button",{onClick:f,disabled:i(d),class:j(["btn btn-primary px-6 py-3",{"opacity-50 cursor-not-allowed":i(d)}])},[i(d)?(g(),m("div",X)):(g(),m("i",Y)),v(" "+S(i(d)?"保存中...":"保存设置"),1)],10,Q),e("button",{onClick:b,class:"btn bg-gray-100 text-gray-700 hover:bg-gray-200 px-6 py-3",disabled:i(d)},t[10]||(t[10]=[e("i",{class:"fas fa-undo mr-2"},null,-1),v(" 重置为默认 ",-1)]),8,Z)]),i(a).updatedAt?(g(),m("div",ee,[t[11]||(t[11]=e("i",{class:"fas fa-clock mr-1"},null,-1)),v(" 最后更新:"+S(i(o)(i(a).updatedAt)),1)])):_("",!0)])])])])])]))])]))}},le=F(te,[["__scopeId","data-v-3508e0de"]]);export{le as default};
diff --git a/web/admin-spa/dist/assets/TutorialView-DVPcd000.js b/web/admin-spa/dist/assets/TutorialView-IE8R1R6Q.js
similarity index 99%
rename from web/admin-spa/dist/assets/TutorialView-DVPcd000.js
rename to web/admin-spa/dist/assets/TutorialView-IE8R1R6Q.js
index 5fda5311..49f8f7de 100644
--- a/web/admin-spa/dist/assets/TutorialView-DVPcd000.js
+++ b/web/admin-spa/dist/assets/TutorialView-IE8R1R6Q.js
@@ -1 +1 @@
-import{_ as f}from"./index-BfaL5u2_.js";import{r as g,c as x,x as i,z as d,L as c,O as t,Q as b,ac as u,aY as l,P as a,y as v,C as n}from"./vue-vendor-YmkKLAOK.js";import"./element-plus-D-FTEVKS.js";import"./vendor-BDiMbLwQ.js";const p={class:"card p-6"},y={class:"mb-8"},h={class:"flex flex-wrap gap-2 p-2 bg-gray-100 rounded-xl"},C=["onClick"],w={key:0,class:"tutorial-content"},A={class:"mb-10"},T={class:"bg-gradient-to-r from-orange-50 to-yellow-50 rounded-xl p-6 border border-orange-100 mb-6"},P={class:"space-y-4"},N={class:"bg-white rounded-lg p-4 border border-orange-200"},S={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm"},H={class:"text-gray-300"},O={class:"bg-white rounded-lg p-4 border border-orange-200"},I={class:"mt-3 space-y-2"},R={class:"bg-gray-100 p-2 rounded text-sm"},B={class:"font-mono"},U={class:"bg-blue-50 border border-blue-200 rounded-lg p-4 mt-6"},j={class:"mt-3 space-y-2"},E={class:"bg-gray-100 p-2 rounded text-sm font-mono"},L={key:1,class:"tutorial-content"},_={class:"mb-10"},q={class:"bg-gradient-to-r from-orange-50 to-yellow-50 rounded-xl p-6 border border-orange-100 mb-6"},k={class:"space-y-4"},G={class:"bg-white rounded-lg p-4 border border-orange-200"},K={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm"},z={class:"text-gray-300"},D={class:"bg-white rounded-lg p-4 border border-orange-200"},W={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm mb-3"},$={class:"text-gray-300"},M={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm"},V={class:"text-gray-300"},F={key:2,class:"tutorial-content"},Q={class:"mb-10"},Y={class:"bg-gradient-to-r from-orange-50 to-yellow-50 rounded-xl p-6 border border-orange-100 mb-6"},J={class:"space-y-4"},X={class:"bg-white rounded-lg p-4 border border-orange-200"},Z={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm"},ee={class:"text-gray-300"},de={class:"bg-white rounded-lg p-4 border border-orange-200"},te={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm mb-3"},ae={class:"text-gray-300"},se={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm"},le={class:"text-gray-300"},re={__name:"TutorialView",setup(oe){const r=g("windows"),m=[{key:"windows",name:"Windows",icon:"fab fa-windows"},{key:"macos",name:"macOS",icon:"fab fa-apple"},{key:"linux",name:"Linux / WSL2",icon:"fab fa-linux"}];return x(()=>window.location.origin),(s,e)=>(v(),i("div",p,[e[55]||(e[55]=d("div",{class:"mb-8"},[d("h3",{class:"text-2xl font-bold text-gray-900 mb-4 flex items-center"},[d("i",{class:"fas fa-graduation-cap text-blue-600 mr-3"}),t(" Claude Code 使用教程 ")]),d("p",{class:"text-gray-600 text-lg"},"跟着这个教程,你可以轻松在自己的电脑上安装并使用 Claude Code。")],-1)),d("div",y,[d("div",h,[(v(),i(b,null,u(m,o=>d("button",{key:o.key,onClick:ie=>r.value=o.key,class:n(["flex-1 py-3 px-6 text-sm font-semibold rounded-lg transition-all duration-300 flex items-center justify-center gap-2",r.value===o.key?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:bg-white/50 hover:text-gray-900"])},[d("i",{class:n(o.icon)},null,2),t(" "+a(o.name),1)],10,C)),64))])]),r.value==="windows"?(v(),i("div",w,[e[19]||(e[19]=l('1 安装 Node.js 环境 Claude Code 需要 Node.js 环境才能运行。
Windows 安装方法 方法一:官网下载(推荐)
打开浏览器访问 https://nodejs.org/ 点击 "LTS" 版本进行下载(推荐长期支持版本) 下载完成后双击 .msi 文件 按照安装向导完成安装,保持默认设置即可 方法二:使用包管理器
如果你安装了 Chocolatey 或 Scoop,可以使用命令行安装:
# 使用 Chocolatey
choco install nodejs
# 或使用 Scoop
scoop install nodejs
Windows 注意事项 • 建议使用 PowerShell 而不是 CMD • 如果遇到权限问题,尝试以管理员身份运行 • 某些杀毒软件可能会误报,需要添加白名单 验证安装是否成功 安装完成后,打开 PowerShell 或 CMD,输入以下命令:
node --version
npm --version
如果显示版本号,说明安装成功了!
2 安装 Git Bash Windows 环境下需要使用 Git Bash 安装Claude code。安装完成后,环境变量设置和使用 Claude Code 仍然在普通的 PowerShell 或 CMD 中进行。
下载并安装 Git for Windows 访问 https://git-scm.com/downloads/win 点击 "Download for Windows" 下载安装包 运行下载的 .exe 安装文件 在安装过程中保持默认设置,直接点击 "Next" 完成安装 安装完成后 • 在任意文件夹右键可以看到 "Git Bash Here" 选项 • 也可以从开始菜单启动 "Git Bash" • 只需要在 Git Bash 中运行 npm install 命令 • 后续的环境变量设置和使用都在 PowerShell/CMD 中 验证 Git Bash 安装 打开 Git Bash,输入以下命令验证:
如果显示 Git 版本号,说明安装成功!
3 安装 Claude Code 安装 Claude Code 打开 Git Bash(重要:不要使用 PowerShell),运行以下命令:
# 在 Git Bash 中全局安装 Claude Code
npm install -g @anthropic-ai/claude-code
这个命令会从 npm 官方仓库下载并安装最新版本的 Claude Code。
重要提醒 • 必须在 Git Bash 中运行,不要在 PowerShell 中运行 • 如果遇到权限问题,可以尝试在 Git Bash 中使用 sudo 命令 验证 Claude Code 安装 安装完成后,输入以下命令检查是否安装成功:
如果显示版本号,恭喜你!Claude Code 已经成功安装了。
',3)),d("div",A,[e[18]||(e[18]=d("h4",{class:"text-xl font-semibold text-gray-800 mb-4 flex items-center"},[d("span",{class:"w-8 h-8 bg-orange-500 text-white rounded-full flex items-center justify-center text-sm font-bold mr-3"},"4"),t(" 设置环境变量 ")],-1)),d("div",T,[e[12]||(e[12]=d("h5",{class:"text-lg font-semibold text-gray-800 mb-3 flex items-center"},[d("i",{class:"fas fa-cog text-orange-600 mr-2"}),t(" 配置 Claude Code 环境变量 ")],-1)),e[13]||(e[13]=d("p",{class:"text-gray-700 mb-4"},"为了让 Claude Code 连接到你的中转服务,需要设置两个环境变量:",-1)),d("div",P,[d("div",N,[e[1]||(e[1]=d("h6",{class:"font-medium text-gray-800 mb-2"},"方法一:PowerShell 临时设置(推荐)",-1)),e[2]||(e[2]=d("p",{class:"text-gray-600 text-sm mb-3"},"在 PowerShell 中运行以下命令:",-1)),d("div",S,[d("div",H,'$env:ANTHROPIC_BASE_URL = "'+a(s.currentBaseUrl)+'"',1),e[0]||(e[0]=d("div",{class:"text-gray-300"},'$env:ANTHROPIC_AUTH_TOKEN = "你的API密钥"',-1))]),e[3]||(e[3]=d("p",{class:"text-yellow-700 text-xs mt-2"},'💡 记得将 "你的API密钥" 替换为在上方 "API Keys" 标签页中创建的实际密钥。',-1))]),d("div",O,[e[10]||(e[10]=d("h6",{class:"font-medium text-gray-800 mb-2"},"方法二:系统环境变量(永久设置)",-1)),e[11]||(e[11]=d("ol",{class:"text-gray-600 text-sm space-y-1 list-decimal list-inside"},[d("li",null,'右键"此电脑" → "属性" → "高级系统设置"'),d("li",null,'点击"环境变量"按钮'),d("li",null,'在"用户变量"或"系统变量"中点击"新建"'),d("li",null,"添加以下两个变量:")],-1)),d("div",I,[d("div",R,[e[4]||(e[4]=d("strong",null,"变量名:",-1)),e[5]||(e[5]=t(" ANTHROPIC_BASE_URL",-1)),e[6]||(e[6]=d("br",null,null,-1)),e[7]||(e[7]=d("strong",null,"变量值:",-1)),e[8]||(e[8]=t()),d("span",B,a(s.currentBaseUrl),1)]),e[9]||(e[9]=d("div",{class:"bg-gray-100 p-2 rounded text-sm"},[d("strong",null,"变量名:"),t(" ANTHROPIC_AUTH_TOKEN"),d("br"),d("strong",null,"变量值:"),t(),d("span",{class:"font-mono"},"你的API密钥")],-1))])])])]),d("div",U,[e[17]||(e[17]=l('验证环境变量设置 设置完环境变量后,可以通过以下命令验证是否设置成功:
在 PowerShell 中验证: echo $env:ANTHROPIC_BASE_URL
echo $env:ANTHROPIC_AUTH_TOKEN
在 CMD 中验证: echo %ANTHROPIC_BASE_URL%
echo %ANTHROPIC_AUTH_TOKEN%
',3)),d("div",j,[e[15]||(e[15]=d("p",{class:"text-blue-700 text-sm"},[d("strong",null,"预期输出示例:")],-1)),d("div",E,[d("div",null,a(s.currentBaseUrl),1),e[14]||(e[14]=d("div",null,"cr_xxxxxxxxxxxxxxxxxx",-1))]),e[16]||(e[16]=d("p",{class:"text-blue-700 text-xs"}," 💡 如果输出为空或显示变量名本身,说明环境变量设置失败,请重新设置。 ",-1))])])]),e[20]||(e[20]=l('5 开始使用 Claude Code 现在你可以开始使用 Claude Code 了!
在特定项目中使用 # 进入你的项目目录
cd C:\\path\\to\\your\\project
# 启动 Claude Code
claude
Windows 常见问题解决 安装时提示 "permission denied" 错误 这通常是权限问题,尝试以下解决方法:
以管理员身份运行 PowerShell 或者配置 npm 使用用户目录:npm config set prefix %APPDATA%\\npm PowerShell 执行策略错误 如果遇到执行策略限制,运行:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
环境变量设置后不生效 设置永久环境变量后需要:
重新启动 PowerShell 或 CMD 或者注销并重新登录 Windows 验证设置:echo $env:ANTHROPIC_BASE_URL ',2))])):r.value==="macos"?(v(),i("div",L,[e[36]||(e[36]=l('1 安装 Node.js 环境 Claude Code 需要 Node.js 环境才能运行。
macOS 安装方法 方法一:使用 Homebrew(推荐)
如果你已经安装了 Homebrew,使用它安装 Node.js 会更方便:
# 更新 Homebrew
brew update
# 安装 Node.js
brew install node
方法二:官网下载
访问 https://nodejs.org/ 下载适合 macOS 的 LTS 版本 打开下载的 .pkg 文件 按照安装程序指引完成安装 macOS 注意事项 • 如果遇到权限问题,可能需要使用 sudo • 首次运行可能需要在系统偏好设置中允许 • 建议使用 Terminal 或 iTerm2 验证安装是否成功 安装完成后,打开 Terminal,输入以下命令:
node --version
npm --version
如果显示版本号,说明安装成功了!
2 安装 Claude Code 安装 Claude Code 打开 Terminal,运行以下命令:
# 全局安装 Claude Code
npm install -g @anthropic-ai/claude-code
如果遇到权限问题,可以使用 sudo:
sudo npm install -g @anthropic-ai/claude-code
验证 Claude Code 安装 安装完成后,输入以下命令检查是否安装成功:
如果显示版本号,恭喜你!Claude Code 已经成功安装了。
',2)),d("div",_,[e[35]||(e[35]=d("h4",{class:"text-xl font-semibold text-gray-800 mb-4 flex items-center"},[d("span",{class:"w-8 h-8 bg-orange-500 text-white rounded-full flex items-center justify-center text-sm font-bold mr-3"},"3"),t(" 设置环境变量 ")],-1)),d("div",q,[e[33]||(e[33]=d("h5",{class:"text-lg font-semibold text-gray-800 mb-3 flex items-center"},[d("i",{class:"fas fa-cog text-orange-600 mr-2"}),t(" 配置 Claude Code 环境变量 ")],-1)),e[34]||(e[34]=d("p",{class:"text-gray-700 mb-4"},"为了让 Claude Code 连接到你的中转服务,需要设置两个环境变量:",-1)),d("div",k,[d("div",G,[e[22]||(e[22]=d("h6",{class:"font-medium text-gray-800 mb-2"},"方法一:临时设置(当前会话)",-1)),e[23]||(e[23]=d("p",{class:"text-gray-600 text-sm mb-3"},"在 Terminal 中运行以下命令:",-1)),d("div",K,[d("div",z,'export ANTHROPIC_BASE_URL="'+a(s.currentBaseUrl)+'"',1),e[21]||(e[21]=d("div",{class:"text-gray-300"},'export ANTHROPIC_AUTH_TOKEN="你的API密钥"',-1))]),e[24]||(e[24]=d("p",{class:"text-yellow-700 text-xs mt-2"},'💡 记得将 "你的API密钥" 替换为在上方 "API Keys" 标签页中创建的实际密钥。',-1))]),d("div",D,[e[31]||(e[31]=d("h6",{class:"font-medium text-gray-800 mb-2"},"方法二:永久设置",-1)),e[32]||(e[32]=d("p",{class:"text-gray-600 text-sm mb-3"},"编辑你的 shell 配置文件(根据你使用的 shell):",-1)),d("div",W,[e[25]||(e[25]=d("div",{class:"mb-2"},"# 对于 zsh (默认)",-1)),d("div",$,`echo 'export ANTHROPIC_BASE_URL="`+a(s.currentBaseUrl)+`"' >> ~/.zshrc`,1),e[26]||(e[26]=d("div",{class:"text-gray-300"},`echo 'export ANTHROPIC_AUTH_TOKEN="你的API密钥"' >> ~/.zshrc`,-1)),e[27]||(e[27]=d("div",{class:"text-gray-300"},"source ~/.zshrc",-1))]),d("div",M,[e[28]||(e[28]=d("div",{class:"mb-2"},"# 对于 bash",-1)),d("div",V,`echo 'export ANTHROPIC_BASE_URL="`+a(s.currentBaseUrl)+`"' >> ~/.bash_profile`,1),e[29]||(e[29]=d("div",{class:"text-gray-300"},`echo 'export ANTHROPIC_AUTH_TOKEN="你的API密钥"' >> ~/.bash_profile`,-1)),e[30]||(e[30]=d("div",{class:"text-gray-300"},"source ~/.bash_profile",-1))])])])])]),e[37]||(e[37]=l('4 开始使用 Claude Code 现在你可以开始使用 Claude Code 了!
在特定项目中使用 # 进入你的项目目录
cd /path/to/your/project
# 启动 Claude Code
claude
macOS 常见问题解决 安装时提示权限错误 尝试以下解决方法:
使用 sudo 安装:sudo npm install -g @anthropic-ai/claude-code 或者配置 npm 使用用户目录:npm config set prefix ~/.npm-global macOS 安全设置阻止运行 如果系统阻止运行 Claude Code:
打开"系统偏好设置" → "安全性与隐私" 点击"仍要打开"或"允许" 或者在 Terminal 中运行:sudo spctl --master-disable 环境变量不生效 检查以下几点:
确认修改了正确的配置文件(.zshrc 或 .bash_profile) 重新启动 Terminal 验证设置:echo $ANTHROPIC_BASE_URL ',2))])):r.value==="linux"?(v(),i("div",F,[e[53]||(e[53]=l('1 安装 Node.js 环境 Claude Code 需要 Node.js 环境才能运行。
Linux 安装方法 方法一:使用官方仓库(推荐)
# 添加 NodeSource 仓库
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
# 安装 Node.js
sudo apt-get install -y nodejs
方法二:使用系统包管理器
虽然版本可能不是最新的,但对于基本使用已经足够:
# Ubuntu/Debian
sudo apt update
sudo apt install nodejs npm
# CentOS/RHEL/Fedora
sudo dnf install nodejs npm
Linux 注意事项 • 某些发行版可能需要安装额外的依赖 • 如果遇到权限问题,使用 sudo • 确保你的用户在 npm 的全局目录有写权限 验证安装是否成功 安装完成后,打开终端,输入以下命令:
node --version
npm --version
如果显示版本号,说明安装成功了!
2 安装 Claude Code 安装 Claude Code 打开终端,运行以下命令:
# 全局安装 Claude Code
npm install -g @anthropic-ai/claude-code
如果遇到权限问题,可以使用 sudo:
sudo npm install -g @anthropic-ai/claude-code
验证 Claude Code 安装 安装完成后,输入以下命令检查是否安装成功:
如果显示版本号,恭喜你!Claude Code 已经成功安装了。
',2)),d("div",Q,[e[52]||(e[52]=d("h4",{class:"text-xl font-semibold text-gray-800 mb-4 flex items-center"},[d("span",{class:"w-8 h-8 bg-orange-500 text-white rounded-full flex items-center justify-center text-sm font-bold mr-3"},"3"),t(" 设置环境变量 ")],-1)),d("div",Y,[e[50]||(e[50]=d("h5",{class:"text-lg font-semibold text-gray-800 mb-3 flex items-center"},[d("i",{class:"fas fa-cog text-orange-600 mr-2"}),t(" 配置 Claude Code 环境变量 ")],-1)),e[51]||(e[51]=d("p",{class:"text-gray-700 mb-4"},"为了让 Claude Code 连接到你的中转服务,需要设置两个环境变量:",-1)),d("div",J,[d("div",X,[e[39]||(e[39]=d("h6",{class:"font-medium text-gray-800 mb-2"},"方法一:临时设置(当前会话)",-1)),e[40]||(e[40]=d("p",{class:"text-gray-600 text-sm mb-3"},"在终端中运行以下命令:",-1)),d("div",Z,[d("div",ee,'export ANTHROPIC_BASE_URL="'+a(s.currentBaseUrl)+'"',1),e[38]||(e[38]=d("div",{class:"text-gray-300"},'export ANTHROPIC_AUTH_TOKEN="你的API密钥"',-1))]),e[41]||(e[41]=d("p",{class:"text-yellow-700 text-xs mt-2"},'💡 记得将 "你的API密钥" 替换为在上方 "API Keys" 标签页中创建的实际密钥。',-1))]),d("div",de,[e[48]||(e[48]=d("h6",{class:"font-medium text-gray-800 mb-2"},"方法二:永久设置",-1)),e[49]||(e[49]=d("p",{class:"text-gray-600 text-sm mb-3"},"编辑你的 shell 配置文件:",-1)),d("div",te,[e[42]||(e[42]=d("div",{class:"mb-2"},"# 对于 bash (默认)",-1)),d("div",ae,`echo 'export ANTHROPIC_BASE_URL="`+a(s.currentBaseUrl)+`"' >> ~/.bashrc`,1),e[43]||(e[43]=d("div",{class:"text-gray-300"},`echo 'export ANTHROPIC_AUTH_TOKEN="你的API密钥"' >> ~/.bashrc`,-1)),e[44]||(e[44]=d("div",{class:"text-gray-300"},"source ~/.bashrc",-1))]),d("div",se,[e[45]||(e[45]=d("div",{class:"mb-2"},"# 对于 zsh",-1)),d("div",le,`echo 'export ANTHROPIC_BASE_URL="`+a(s.currentBaseUrl)+`"' >> ~/.zshrc`,1),e[46]||(e[46]=d("div",{class:"text-gray-300"},`echo 'export ANTHROPIC_AUTH_TOKEN="你的API密钥"' >> ~/.zshrc`,-1)),e[47]||(e[47]=d("div",{class:"text-gray-300"},"source ~/.zshrc",-1))])])])])]),e[54]||(e[54]=l('4 开始使用 Claude Code 现在你可以开始使用 Claude Code 了!
在特定项目中使用 # 进入你的项目目录
cd /path/to/your/project
# 启动 Claude Code
claude
Linux 常见问题解决 安装时提示权限错误 尝试以下解决方法:
使用 sudo 安装:sudo npm install -g @anthropic-ai/claude-code 或者配置 npm 使用用户目录:npm config set prefix ~/.npm-global 然后添加到 PATH:export PATH=~/.npm-global/bin:$PATH 缺少依赖库 某些 Linux 发行版需要安装额外依赖:
# Ubuntu/Debian
sudo apt install build-essential
# CentOS/RHEL
sudo dnf groupinstall "Development Tools"
环境变量不生效 检查以下几点:
确认修改了正确的配置文件(.bashrc 或 .zshrc) 重新启动终端或运行 source ~/.bashrc 验证设置:echo $ANTHROPIC_BASE_URL ',2))])):c("",!0),e[56]||(e[56]=d("div",{class:"bg-gradient-to-r from-blue-500 to-purple-600 text-white rounded-xl p-6 text-center"},[d("h5",{class:"text-xl font-semibold mb-2"},"🎉 恭喜你!"),d("p",{class:"text-blue-100 mb-4"},"你已经成功安装并配置了 Claude Code,现在可以开始享受 AI 编程助手带来的便利了。"),d("p",{class:"text-sm text-blue-200"},"如果在使用过程中遇到任何问题,可以查看官方文档或社区讨论获取帮助。")],-1))]))}},ge=f(re,[["__scopeId","data-v-58e5d8f5"]]);export{ge as default};
+import{_ as f}from"./index-CJmHAjMf.js";import{r as g,c as x,x as i,z as d,L as c,O as t,Q as b,ac as u,aY as l,P as a,y as v,C as n}from"./vue-vendor-CKToUHZx.js";import"./element-plus-B8Fs_0jW.js";import"./vendor-BDiMbLwQ.js";const p={class:"card p-6"},y={class:"mb-8"},h={class:"flex flex-wrap gap-2 p-2 bg-gray-100 rounded-xl"},C=["onClick"],w={key:0,class:"tutorial-content"},A={class:"mb-10"},T={class:"bg-gradient-to-r from-orange-50 to-yellow-50 rounded-xl p-6 border border-orange-100 mb-6"},P={class:"space-y-4"},N={class:"bg-white rounded-lg p-4 border border-orange-200"},S={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm"},H={class:"text-gray-300"},O={class:"bg-white rounded-lg p-4 border border-orange-200"},I={class:"mt-3 space-y-2"},R={class:"bg-gray-100 p-2 rounded text-sm"},B={class:"font-mono"},U={class:"bg-blue-50 border border-blue-200 rounded-lg p-4 mt-6"},j={class:"mt-3 space-y-2"},E={class:"bg-gray-100 p-2 rounded text-sm font-mono"},L={key:1,class:"tutorial-content"},_={class:"mb-10"},q={class:"bg-gradient-to-r from-orange-50 to-yellow-50 rounded-xl p-6 border border-orange-100 mb-6"},k={class:"space-y-4"},G={class:"bg-white rounded-lg p-4 border border-orange-200"},K={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm"},z={class:"text-gray-300"},D={class:"bg-white rounded-lg p-4 border border-orange-200"},W={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm mb-3"},$={class:"text-gray-300"},M={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm"},V={class:"text-gray-300"},F={key:2,class:"tutorial-content"},Q={class:"mb-10"},Y={class:"bg-gradient-to-r from-orange-50 to-yellow-50 rounded-xl p-6 border border-orange-100 mb-6"},J={class:"space-y-4"},X={class:"bg-white rounded-lg p-4 border border-orange-200"},Z={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm"},ee={class:"text-gray-300"},de={class:"bg-white rounded-lg p-4 border border-orange-200"},te={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm mb-3"},ae={class:"text-gray-300"},se={class:"bg-gray-900 text-green-400 p-3 rounded font-mono text-sm"},le={class:"text-gray-300"},re={__name:"TutorialView",setup(oe){const r=g("windows"),m=[{key:"windows",name:"Windows",icon:"fab fa-windows"},{key:"macos",name:"macOS",icon:"fab fa-apple"},{key:"linux",name:"Linux / WSL2",icon:"fab fa-linux"}];return x(()=>window.location.origin),(s,e)=>(v(),i("div",p,[e[55]||(e[55]=d("div",{class:"mb-8"},[d("h3",{class:"text-2xl font-bold text-gray-900 mb-4 flex items-center"},[d("i",{class:"fas fa-graduation-cap text-blue-600 mr-3"}),t(" Claude Code 使用教程 ")]),d("p",{class:"text-gray-600 text-lg"},"跟着这个教程,你可以轻松在自己的电脑上安装并使用 Claude Code。")],-1)),d("div",y,[d("div",h,[(v(),i(b,null,u(m,o=>d("button",{key:o.key,onClick:ie=>r.value=o.key,class:n(["flex-1 py-3 px-6 text-sm font-semibold rounded-lg transition-all duration-300 flex items-center justify-center gap-2",r.value===o.key?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:bg-white/50 hover:text-gray-900"])},[d("i",{class:n(o.icon)},null,2),t(" "+a(o.name),1)],10,C)),64))])]),r.value==="windows"?(v(),i("div",w,[e[19]||(e[19]=l('1 安装 Node.js 环境 Claude Code 需要 Node.js 环境才能运行。
Windows 安装方法 方法一:官网下载(推荐)
打开浏览器访问 https://nodejs.org/ 点击 "LTS" 版本进行下载(推荐长期支持版本) 下载完成后双击 .msi 文件 按照安装向导完成安装,保持默认设置即可 方法二:使用包管理器
如果你安装了 Chocolatey 或 Scoop,可以使用命令行安装:
# 使用 Chocolatey
choco install nodejs
# 或使用 Scoop
scoop install nodejs
Windows 注意事项 • 建议使用 PowerShell 而不是 CMD • 如果遇到权限问题,尝试以管理员身份运行 • 某些杀毒软件可能会误报,需要添加白名单 验证安装是否成功 安装完成后,打开 PowerShell 或 CMD,输入以下命令:
node --version
npm --version
如果显示版本号,说明安装成功了!
2 安装 Git Bash Windows 环境下需要使用 Git Bash 安装Claude code。安装完成后,环境变量设置和使用 Claude Code 仍然在普通的 PowerShell 或 CMD 中进行。
下载并安装 Git for Windows 访问 https://git-scm.com/downloads/win 点击 "Download for Windows" 下载安装包 运行下载的 .exe 安装文件 在安装过程中保持默认设置,直接点击 "Next" 完成安装 安装完成后 • 在任意文件夹右键可以看到 "Git Bash Here" 选项 • 也可以从开始菜单启动 "Git Bash" • 只需要在 Git Bash 中运行 npm install 命令 • 后续的环境变量设置和使用都在 PowerShell/CMD 中 验证 Git Bash 安装 打开 Git Bash,输入以下命令验证:
如果显示 Git 版本号,说明安装成功!
3 安装 Claude Code 安装 Claude Code 打开 Git Bash(重要:不要使用 PowerShell),运行以下命令:
# 在 Git Bash 中全局安装 Claude Code
npm install -g @anthropic-ai/claude-code
这个命令会从 npm 官方仓库下载并安装最新版本的 Claude Code。
重要提醒 • 必须在 Git Bash 中运行,不要在 PowerShell 中运行 • 如果遇到权限问题,可以尝试在 Git Bash 中使用 sudo 命令 验证 Claude Code 安装 安装完成后,输入以下命令检查是否安装成功:
如果显示版本号,恭喜你!Claude Code 已经成功安装了。
',3)),d("div",A,[e[18]||(e[18]=d("h4",{class:"text-xl font-semibold text-gray-800 mb-4 flex items-center"},[d("span",{class:"w-8 h-8 bg-orange-500 text-white rounded-full flex items-center justify-center text-sm font-bold mr-3"},"4"),t(" 设置环境变量 ")],-1)),d("div",T,[e[12]||(e[12]=d("h5",{class:"text-lg font-semibold text-gray-800 mb-3 flex items-center"},[d("i",{class:"fas fa-cog text-orange-600 mr-2"}),t(" 配置 Claude Code 环境变量 ")],-1)),e[13]||(e[13]=d("p",{class:"text-gray-700 mb-4"},"为了让 Claude Code 连接到你的中转服务,需要设置两个环境变量:",-1)),d("div",P,[d("div",N,[e[1]||(e[1]=d("h6",{class:"font-medium text-gray-800 mb-2"},"方法一:PowerShell 临时设置(推荐)",-1)),e[2]||(e[2]=d("p",{class:"text-gray-600 text-sm mb-3"},"在 PowerShell 中运行以下命令:",-1)),d("div",S,[d("div",H,'$env:ANTHROPIC_BASE_URL = "'+a(s.currentBaseUrl)+'"',1),e[0]||(e[0]=d("div",{class:"text-gray-300"},'$env:ANTHROPIC_AUTH_TOKEN = "你的API密钥"',-1))]),e[3]||(e[3]=d("p",{class:"text-yellow-700 text-xs mt-2"},'💡 记得将 "你的API密钥" 替换为在上方 "API Keys" 标签页中创建的实际密钥。',-1))]),d("div",O,[e[10]||(e[10]=d("h6",{class:"font-medium text-gray-800 mb-2"},"方法二:系统环境变量(永久设置)",-1)),e[11]||(e[11]=d("ol",{class:"text-gray-600 text-sm space-y-1 list-decimal list-inside"},[d("li",null,'右键"此电脑" → "属性" → "高级系统设置"'),d("li",null,'点击"环境变量"按钮'),d("li",null,'在"用户变量"或"系统变量"中点击"新建"'),d("li",null,"添加以下两个变量:")],-1)),d("div",I,[d("div",R,[e[4]||(e[4]=d("strong",null,"变量名:",-1)),e[5]||(e[5]=t(" ANTHROPIC_BASE_URL",-1)),e[6]||(e[6]=d("br",null,null,-1)),e[7]||(e[7]=d("strong",null,"变量值:",-1)),e[8]||(e[8]=t()),d("span",B,a(s.currentBaseUrl),1)]),e[9]||(e[9]=d("div",{class:"bg-gray-100 p-2 rounded text-sm"},[d("strong",null,"变量名:"),t(" ANTHROPIC_AUTH_TOKEN"),d("br"),d("strong",null,"变量值:"),t(),d("span",{class:"font-mono"},"你的API密钥")],-1))])])])]),d("div",U,[e[17]||(e[17]=l('验证环境变量设置 设置完环境变量后,可以通过以下命令验证是否设置成功:
在 PowerShell 中验证: echo $env:ANTHROPIC_BASE_URL
echo $env:ANTHROPIC_AUTH_TOKEN
在 CMD 中验证: echo %ANTHROPIC_BASE_URL%
echo %ANTHROPIC_AUTH_TOKEN%
',3)),d("div",j,[e[15]||(e[15]=d("p",{class:"text-blue-700 text-sm"},[d("strong",null,"预期输出示例:")],-1)),d("div",E,[d("div",null,a(s.currentBaseUrl),1),e[14]||(e[14]=d("div",null,"cr_xxxxxxxxxxxxxxxxxx",-1))]),e[16]||(e[16]=d("p",{class:"text-blue-700 text-xs"}," 💡 如果输出为空或显示变量名本身,说明环境变量设置失败,请重新设置。 ",-1))])])]),e[20]||(e[20]=l('5 开始使用 Claude Code 现在你可以开始使用 Claude Code 了!
在特定项目中使用 # 进入你的项目目录
cd C:\\path\\to\\your\\project
# 启动 Claude Code
claude
Windows 常见问题解决 安装时提示 "permission denied" 错误 这通常是权限问题,尝试以下解决方法:
以管理员身份运行 PowerShell 或者配置 npm 使用用户目录:npm config set prefix %APPDATA%\\npm PowerShell 执行策略错误 如果遇到执行策略限制,运行:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
环境变量设置后不生效 设置永久环境变量后需要:
重新启动 PowerShell 或 CMD 或者注销并重新登录 Windows 验证设置:echo $env:ANTHROPIC_BASE_URL ',2))])):r.value==="macos"?(v(),i("div",L,[e[36]||(e[36]=l('1 安装 Node.js 环境 Claude Code 需要 Node.js 环境才能运行。
macOS 安装方法 方法一:使用 Homebrew(推荐)
如果你已经安装了 Homebrew,使用它安装 Node.js 会更方便:
# 更新 Homebrew
brew update
# 安装 Node.js
brew install node
方法二:官网下载
访问 https://nodejs.org/ 下载适合 macOS 的 LTS 版本 打开下载的 .pkg 文件 按照安装程序指引完成安装 macOS 注意事项 • 如果遇到权限问题,可能需要使用 sudo • 首次运行可能需要在系统偏好设置中允许 • 建议使用 Terminal 或 iTerm2 验证安装是否成功 安装完成后,打开 Terminal,输入以下命令:
node --version
npm --version
如果显示版本号,说明安装成功了!
2 安装 Claude Code 安装 Claude Code 打开 Terminal,运行以下命令:
# 全局安装 Claude Code
npm install -g @anthropic-ai/claude-code
如果遇到权限问题,可以使用 sudo:
sudo npm install -g @anthropic-ai/claude-code
验证 Claude Code 安装 安装完成后,输入以下命令检查是否安装成功:
如果显示版本号,恭喜你!Claude Code 已经成功安装了。
',2)),d("div",_,[e[35]||(e[35]=d("h4",{class:"text-xl font-semibold text-gray-800 mb-4 flex items-center"},[d("span",{class:"w-8 h-8 bg-orange-500 text-white rounded-full flex items-center justify-center text-sm font-bold mr-3"},"3"),t(" 设置环境变量 ")],-1)),d("div",q,[e[33]||(e[33]=d("h5",{class:"text-lg font-semibold text-gray-800 mb-3 flex items-center"},[d("i",{class:"fas fa-cog text-orange-600 mr-2"}),t(" 配置 Claude Code 环境变量 ")],-1)),e[34]||(e[34]=d("p",{class:"text-gray-700 mb-4"},"为了让 Claude Code 连接到你的中转服务,需要设置两个环境变量:",-1)),d("div",k,[d("div",G,[e[22]||(e[22]=d("h6",{class:"font-medium text-gray-800 mb-2"},"方法一:临时设置(当前会话)",-1)),e[23]||(e[23]=d("p",{class:"text-gray-600 text-sm mb-3"},"在 Terminal 中运行以下命令:",-1)),d("div",K,[d("div",z,'export ANTHROPIC_BASE_URL="'+a(s.currentBaseUrl)+'"',1),e[21]||(e[21]=d("div",{class:"text-gray-300"},'export ANTHROPIC_AUTH_TOKEN="你的API密钥"',-1))]),e[24]||(e[24]=d("p",{class:"text-yellow-700 text-xs mt-2"},'💡 记得将 "你的API密钥" 替换为在上方 "API Keys" 标签页中创建的实际密钥。',-1))]),d("div",D,[e[31]||(e[31]=d("h6",{class:"font-medium text-gray-800 mb-2"},"方法二:永久设置",-1)),e[32]||(e[32]=d("p",{class:"text-gray-600 text-sm mb-3"},"编辑你的 shell 配置文件(根据你使用的 shell):",-1)),d("div",W,[e[25]||(e[25]=d("div",{class:"mb-2"},"# 对于 zsh (默认)",-1)),d("div",$,`echo 'export ANTHROPIC_BASE_URL="`+a(s.currentBaseUrl)+`"' >> ~/.zshrc`,1),e[26]||(e[26]=d("div",{class:"text-gray-300"},`echo 'export ANTHROPIC_AUTH_TOKEN="你的API密钥"' >> ~/.zshrc`,-1)),e[27]||(e[27]=d("div",{class:"text-gray-300"},"source ~/.zshrc",-1))]),d("div",M,[e[28]||(e[28]=d("div",{class:"mb-2"},"# 对于 bash",-1)),d("div",V,`echo 'export ANTHROPIC_BASE_URL="`+a(s.currentBaseUrl)+`"' >> ~/.bash_profile`,1),e[29]||(e[29]=d("div",{class:"text-gray-300"},`echo 'export ANTHROPIC_AUTH_TOKEN="你的API密钥"' >> ~/.bash_profile`,-1)),e[30]||(e[30]=d("div",{class:"text-gray-300"},"source ~/.bash_profile",-1))])])])])]),e[37]||(e[37]=l('4 开始使用 Claude Code 现在你可以开始使用 Claude Code 了!
在特定项目中使用 # 进入你的项目目录
cd /path/to/your/project
# 启动 Claude Code
claude
macOS 常见问题解决 安装时提示权限错误 尝试以下解决方法:
使用 sudo 安装:sudo npm install -g @anthropic-ai/claude-code 或者配置 npm 使用用户目录:npm config set prefix ~/.npm-global macOS 安全设置阻止运行 如果系统阻止运行 Claude Code:
打开"系统偏好设置" → "安全性与隐私" 点击"仍要打开"或"允许" 或者在 Terminal 中运行:sudo spctl --master-disable 环境变量不生效 检查以下几点:
确认修改了正确的配置文件(.zshrc 或 .bash_profile) 重新启动 Terminal 验证设置:echo $ANTHROPIC_BASE_URL ',2))])):r.value==="linux"?(v(),i("div",F,[e[53]||(e[53]=l('1 安装 Node.js 环境 Claude Code 需要 Node.js 环境才能运行。
Linux 安装方法 方法一:使用官方仓库(推荐)
# 添加 NodeSource 仓库
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
# 安装 Node.js
sudo apt-get install -y nodejs
方法二:使用系统包管理器
虽然版本可能不是最新的,但对于基本使用已经足够:
# Ubuntu/Debian
sudo apt update
sudo apt install nodejs npm
# CentOS/RHEL/Fedora
sudo dnf install nodejs npm
Linux 注意事项 • 某些发行版可能需要安装额外的依赖 • 如果遇到权限问题,使用 sudo • 确保你的用户在 npm 的全局目录有写权限 验证安装是否成功 安装完成后,打开终端,输入以下命令:
node --version
npm --version
如果显示版本号,说明安装成功了!
2 安装 Claude Code 安装 Claude Code 打开终端,运行以下命令:
# 全局安装 Claude Code
npm install -g @anthropic-ai/claude-code
如果遇到权限问题,可以使用 sudo:
sudo npm install -g @anthropic-ai/claude-code
验证 Claude Code 安装 安装完成后,输入以下命令检查是否安装成功:
如果显示版本号,恭喜你!Claude Code 已经成功安装了。
',2)),d("div",Q,[e[52]||(e[52]=d("h4",{class:"text-xl font-semibold text-gray-800 mb-4 flex items-center"},[d("span",{class:"w-8 h-8 bg-orange-500 text-white rounded-full flex items-center justify-center text-sm font-bold mr-3"},"3"),t(" 设置环境变量 ")],-1)),d("div",Y,[e[50]||(e[50]=d("h5",{class:"text-lg font-semibold text-gray-800 mb-3 flex items-center"},[d("i",{class:"fas fa-cog text-orange-600 mr-2"}),t(" 配置 Claude Code 环境变量 ")],-1)),e[51]||(e[51]=d("p",{class:"text-gray-700 mb-4"},"为了让 Claude Code 连接到你的中转服务,需要设置两个环境变量:",-1)),d("div",J,[d("div",X,[e[39]||(e[39]=d("h6",{class:"font-medium text-gray-800 mb-2"},"方法一:临时设置(当前会话)",-1)),e[40]||(e[40]=d("p",{class:"text-gray-600 text-sm mb-3"},"在终端中运行以下命令:",-1)),d("div",Z,[d("div",ee,'export ANTHROPIC_BASE_URL="'+a(s.currentBaseUrl)+'"',1),e[38]||(e[38]=d("div",{class:"text-gray-300"},'export ANTHROPIC_AUTH_TOKEN="你的API密钥"',-1))]),e[41]||(e[41]=d("p",{class:"text-yellow-700 text-xs mt-2"},'💡 记得将 "你的API密钥" 替换为在上方 "API Keys" 标签页中创建的实际密钥。',-1))]),d("div",de,[e[48]||(e[48]=d("h6",{class:"font-medium text-gray-800 mb-2"},"方法二:永久设置",-1)),e[49]||(e[49]=d("p",{class:"text-gray-600 text-sm mb-3"},"编辑你的 shell 配置文件:",-1)),d("div",te,[e[42]||(e[42]=d("div",{class:"mb-2"},"# 对于 bash (默认)",-1)),d("div",ae,`echo 'export ANTHROPIC_BASE_URL="`+a(s.currentBaseUrl)+`"' >> ~/.bashrc`,1),e[43]||(e[43]=d("div",{class:"text-gray-300"},`echo 'export ANTHROPIC_AUTH_TOKEN="你的API密钥"' >> ~/.bashrc`,-1)),e[44]||(e[44]=d("div",{class:"text-gray-300"},"source ~/.bashrc",-1))]),d("div",se,[e[45]||(e[45]=d("div",{class:"mb-2"},"# 对于 zsh",-1)),d("div",le,`echo 'export ANTHROPIC_BASE_URL="`+a(s.currentBaseUrl)+`"' >> ~/.zshrc`,1),e[46]||(e[46]=d("div",{class:"text-gray-300"},`echo 'export ANTHROPIC_AUTH_TOKEN="你的API密钥"' >> ~/.zshrc`,-1)),e[47]||(e[47]=d("div",{class:"text-gray-300"},"source ~/.zshrc",-1))])])])])]),e[54]||(e[54]=l('4 开始使用 Claude Code 现在你可以开始使用 Claude Code 了!
在特定项目中使用 # 进入你的项目目录
cd /path/to/your/project
# 启动 Claude Code
claude
Linux 常见问题解决 安装时提示权限错误 尝试以下解决方法:
使用 sudo 安装:sudo npm install -g @anthropic-ai/claude-code 或者配置 npm 使用用户目录:npm config set prefix ~/.npm-global 然后添加到 PATH:export PATH=~/.npm-global/bin:$PATH 缺少依赖库 某些 Linux 发行版需要安装额外依赖:
# Ubuntu/Debian
sudo apt install build-essential
# CentOS/RHEL
sudo dnf groupinstall "Development Tools"
环境变量不生效 检查以下几点:
确认修改了正确的配置文件(.bashrc 或 .zshrc) 重新启动终端或运行 source ~/.bashrc 验证设置:echo $ANTHROPIC_BASE_URL ',2))])):c("",!0),e[56]||(e[56]=d("div",{class:"bg-gradient-to-r from-blue-500 to-purple-600 text-white rounded-xl p-6 text-center"},[d("h5",{class:"text-xl font-semibold mb-2"},"🎉 恭喜你!"),d("p",{class:"text-blue-100 mb-4"},"你已经成功安装并配置了 Claude Code,现在可以开始享受 AI 编程助手带来的便利了。"),d("p",{class:"text-sm text-blue-200"},"如果在使用过程中遇到任何问题,可以查看官方文档或社区讨论获取帮助。")],-1))]))}},ge=f(re,[["__scopeId","data-v-58e5d8f5"]]);export{ge as default};
diff --git a/web/admin-spa/dist/assets/element-plus-D-FTEVKS.js b/web/admin-spa/dist/assets/element-plus-B8Fs_0jW.js
similarity index 99%
rename from web/admin-spa/dist/assets/element-plus-D-FTEVKS.js
rename to web/admin-spa/dist/assets/element-plus-B8Fs_0jW.js
index c4d88346..0bb727be 100644
--- a/web/admin-spa/dist/assets/element-plus-D-FTEVKS.js
+++ b/web/admin-spa/dist/assets/element-plus-B8Fs_0jW.js
@@ -1,4 +1,4 @@
-import{g as lt,i as we,r as I,c as y,u as o,a as Ve,b as ke,d as yt,e as bt,f as gn,h as rn,w as _p,j as Qe,p as rt,k as Ar,l as x,s as Lt,m as Tp,n as nu,o as ie,q as Xe,t as xt,v as bn,x as V,y as _,z as F,A as G,B as _e,C as T,D as Ee,N as Bt,E as et,F as $p,G as Xt,H as wt,I as oe,J as U,K as We,L as J,M as Ge,O as st,P as pe,Q as Oe,R as H,S as mt,T as an,U as Ha,V as cs,W as pl,X as Ft,Y as Le,Z as Nt,_ as kt,$ as Fr,a0 as hl,a1 as Np,a2 as Nc,a3 as jl,a4 as ua,a5 as Ip,a6 as xr,a7 as zr,a8 as Ic,a9 as Mp,aa as Tt,ab as Mn,ac as ut,ad as Mc,ae as wo,af as On,ag as cl,ah as Dt,ai as Re,aj as Oa,ak as Uo,al as Ka,am as nn,an as Rc,ao as Pc,ap as Yo,aq as ds,ar as Rp,as as Pp,at as Op,au as Ul,av as ht,aw as Lp,ax as Oc,ay as $l,az as Bp,aA as Vp,aB as nr,aC as lr,aD as fs,aE as Dp,aF as Lc,aG as Il,aH as Ap,aI as Fp,aJ as Bc,aK as xp,aL as zp,aM as Hp,aN as Kp,aO as Wp}from"./vue-vendor-YmkKLAOK.js";import{i as qt,g as Yt,f as qo,s as jp,p as An,E as Xl,y as Up,a as Yp,d as Ln,T as vo,b as Ke,l as Vc,t as Hl,c as tn,e as qp,h as Wa,j as ln,u as Ds,k as Hr,m as Gp,n as Xp,w as Zp,o as Jp,q as Qp,r as eh,v as th,x as lu,S as nh,z as Dc,A as lh,B as oh,D as ca,F as Ac,G as Fc,Y as ah,H as xc,I as zc,J as Hc,K as Kc,L as sh,M as rh,N as ih,O as uh}from"./vendor-BDiMbLwQ.js";const ch="2.10.4",ou=Symbol("INSTALLED_KEY"),Wc=Symbol(),Ko="el",dh="is-",Bl=(e,t,n,l,a)=>{let s=`${e}-${t}`;return n&&(s+=`-${n}`),l&&(s+=`__${l}`),a&&(s+=`--${a}`),s},jc=Symbol("namespaceContextKey"),Kr=e=>{const t=e||(lt()?we(jc,I(Ko)):I(Ko));return y(()=>o(t)||Ko)},ue=(e,t)=>{const n=Kr(t);return{namespace:n,b:(p="")=>Bl(n.value,e,p,"",""),e:p=>p?Bl(n.value,e,"",p,""):"",m:p=>p?Bl(n.value,e,"","",p):"",be:(p,g)=>p&&g?Bl(n.value,e,p,g,""):"",em:(p,g)=>p&&g?Bl(n.value,e,"",p,g):"",bm:(p,g)=>p&&g?Bl(n.value,e,p,"",g):"",bem:(p,g,b)=>p&&g&&b?Bl(n.value,e,p,g,b):"",is:(p,...g)=>{const b=g.length>=1?g[0]:!0;return p&&b?`${dh}${p}`:""},cssVar:p=>{const g={};for(const b in p)p[b]&&(g[`--${n.value}-${b}`]=p[b]);return g},cssVarName:p=>`--${n.value}-${p}`,cssVarBlock:p=>{const g={};for(const b in p)p[b]&&(g[`--${n.value}-${e}-${b}`]=p[b]);return g},cssVarBlockName:p=>`--${n.value}-${e}-${p}`}},vt=e=>e===void 0,_t=e=>typeof e=="boolean",Te=e=>typeof e=="number",Pn=e=>!e&&e!==0||ke(e)&&e.length===0||yt(e)&&!Object.keys(e).length,_n=e=>typeof Element>"u"?!1:e instanceof Element,In=e=>qt(e),fh=e=>Ve(e)?!Number.isNaN(Number(e)):!1,vs=e=>e===window;class vh extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function jt(e,t){throw new vh(`[${e}] ${t}`)}const au={current:0},su=I(0),Uc=2e3,ru=Symbol("elZIndexContextKey"),Yc=Symbol("zIndexContextKey"),Mo=e=>{const t=lt()?we(ru,au):au,n=e||(lt()?we(Yc,void 0):void 0),l=y(()=>{const r=o(n);return Te(r)?r:Uc}),a=y(()=>l.value+su.value),s=()=>(t.current++,su.value=t.current,a.value);return!bt&&we(ru),{initialZIndex:l,currentZIndex:a,nextZIndex:s}};var ph={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const hh=e=>(t,n)=>mh(t,n,o(e)),mh=(e,t,n)=>Yt(n,e,e).replace(/\{(\w+)\}/g,(l,a)=>{var s;return`${(s=t==null?void 0:t[a])!=null?s:`{${a}}`}`}),gh=e=>{const t=y(()=>o(e).name),n=gn(e)?e:I(e);return{lang:t,locale:n,t:hh(e)}},qc=Symbol("localeContextKey"),pt=e=>{const t=e||we(qc,I());return gh(y(()=>t.value||ph))},Gc="__epPropKey",Y=e=>e,bh=e=>yt(e)&&!!e[Gc],Un=(e,t)=>{if(!yt(e)||bh(e))return e;const{values:n,required:l,default:a,type:s,validator:r}=e,u={type:s,required:!!l,validator:n||r?c=>{let d=!1,f=[];if(n&&(f=Array.from(n),rn(e,"default")&&f.push(a),d||(d=f.includes(c))),r&&(d||(d=r(c))),!d&&f.length>0){const m=[...new Set(f)].map(v=>JSON.stringify(v)).join(", ");_p(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${m}], got value ${JSON.stringify(c)}.`)}return d}:void 0,[Gc]:!0};return rn(e,"default")&&(u.default=a),u},de=e=>qo(Object.entries(e).map(([t,n])=>[t,Un(n,t)])),tl=["","default","small","large"],Jt=Un({type:String,values:tl,required:!1}),Xc=Symbol("size"),Zc=()=>{const e=we(Xc,{});return y(()=>o(e.size)||"")},Jc=Symbol("emptyValuesContextKey"),yh=["",void 0,null],Ch=void 0,Zl=de({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>Qe(e)?!e():!e}}),da=(e,t)=>{const n=lt()?we(Jc,I({})):I({}),l=y(()=>e.emptyValues||n.value.emptyValues||yh),a=y(()=>Qe(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:Qe(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:t!==void 0?t:Ch),s=r=>l.value.includes(r);return l.value.includes(a.value),{emptyValues:l,valueOnClear:a,isEmptyValue:s}},ko=e=>Object.keys(e),Qc=e=>Object.entries(e),Wo=(e,t,n)=>({get value(){return Yt(e,t,n)},set value(l){jp(e,t,l)}}),ja=I();function fa(e,t=void 0){const n=lt()?we(Wc,ja):ja;return e?y(()=>{var l,a;return(a=(l=n.value)==null?void 0:l[e])!=null?a:t}):n}function ps(e,t){const n=fa(),l=ue(e,y(()=>{var i;return((i=n.value)==null?void 0:i.namespace)||Ko})),a=pt(y(()=>{var i;return(i=n.value)==null?void 0:i.locale})),s=Mo(y(()=>{var i;return((i=n.value)==null?void 0:i.zIndex)||Uc})),r=y(()=>{var i;return o(t)||((i=n.value)==null?void 0:i.size)||""});return Wr(y(()=>o(n)||{})),{ns:l,locale:a,zIndex:s,size:r}}const Wr=(e,t,n=!1)=>{var l;const a=!!lt(),s=a?fa():void 0,r=(l=t==null?void 0:t.provide)!=null?l:a?rt:void 0;if(!r)return;const i=y(()=>{const u=o(e);return s!=null&&s.value?wh(s.value,u):u});return r(Wc,i),r(qc,y(()=>i.value.locale)),r(jc,y(()=>i.value.namespace)),r(Yc,y(()=>i.value.zIndex)),r(Xc,{size:y(()=>i.value.size||"")}),r(Jc,y(()=>({emptyValues:i.value.emptyValues,valueOnClear:i.value.valueOnClear}))),(n||!ja.value)&&(ja.value=i.value),i},wh=(e,t)=>{const n=[...new Set([...ko(e),...ko(t)])],l={};for(const a of n)l[a]=t[a]!==void 0?t[a]:e[a];return l},kh=(e=[])=>({version:ch,install:(n,l)=>{n[ou]||(n[ou]=!0,e.forEach(a=>n.use(a)),l&&Wr(l,n,!0))}}),De="update:modelValue",nt="change",Zt="input",Sh=de({zIndex:{type:Y([Number,String]),default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"}}),Eh={scroll:({scrollTop:e,fixed:t})=>Te(e)&&_t(t),[nt]:e=>_t(e)};var fe=(e,t)=>{const n=e.__vccOpts||e;for(const[l,a]of t)n[l]=a;return n};function _h(e,t,n,l){const a=n-t;return e/=l/2,e<1?a/2*e*e*e+t:a/2*((e-=2)*e*e+2)+t}const Ml=e=>bt?window.requestAnimationFrame(e):setTimeout(e,16),Yl=e=>bt?window.cancelAnimationFrame(e):clearTimeout(e),ed=(e="")=>e.split(" ").filter(t=>!!t.trim()),Nn=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},Fn=(e,t)=>{!e||!t.trim()||e.classList.add(...ed(t))},yn=(e,t)=>{!e||!t.trim()||e.classList.remove(...ed(t))},rl=(e,t)=>{var n;if(!bt||!e||!t)return"";let l=Ar(t);l==="float"&&(l="cssFloat");try{const a=e.style[l];if(a)return a;const s=(n=document.defaultView)==null?void 0:n.getComputedStyle(e,"");return s?s[l]:""}catch{return e.style[l]}},td=(e,t,n)=>{if(!(!e||!t))if(yt(t))Qc(t).forEach(([l,a])=>td(e,l,a));else{const l=Ar(t);e.style[l]=n}};function zt(e,t="px"){if(!e)return"";if(Te(e)||fh(e))return`${e}${t}`;if(Ve(e))return e}const Th=(e,t)=>{if(!bt)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(t)],l=rl(e,n);return["scroll","auto","overlay"].some(a=>l.includes(a))},jr=(e,t)=>{if(!bt)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(Th(n,t))return n;n=n.parentNode}return n};let wa;const nd=e=>{var t;if(!bt)return 0;if(wa!==void 0)return wa;const n=document.createElement("div");n.className=`${e}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const l=n.offsetWidth;n.style.overflow="scroll";const a=document.createElement("div");a.style.width="100%",n.appendChild(a);const s=a.offsetWidth;return(t=n.parentNode)==null||t.removeChild(n),wa=l-s,wa};function Ur(e,t){if(!bt)return;if(!t){e.scrollTop=0;return}const n=[];let l=t.offsetParent;for(;l!==null&&e!==l&&e.contains(l);)n.push(l),l=l.offsetParent;const a=t.offsetTop+n.reduce((u,c)=>u+c.offsetTop,0),s=a+t.offsetHeight,r=e.scrollTop,i=r+e.clientHeight;ai&&(e.scrollTop=s-e.clientHeight)}function $h(e,t,n,l,a){const s=Date.now();let r;const i=()=>{const c=Date.now()-s,d=_h(c>l?l:c,t,n,l);vs(e)?e.scrollTo(window.pageXOffset,d):e.scrollTop=d,c{r&&Yl(r)}}const iu=(e,t)=>vs(t)?e.ownerDocument.documentElement:t,uu=e=>vs(e)?window.scrollY:e.scrollTop,ld="ElAffix",Nh=x({name:ld}),Ih=x({...Nh,props:Sh,emits:Eh,setup(e,{expose:t,emit:n}){const l=e,a=ue("affix"),s=Lt(),r=Lt(),i=Lt(),{height:u}=Tp(),{height:c,width:d,top:f,bottom:m,update:v}=nu(r,{windowScroll:!1}),h=nu(s),p=I(!1),g=I(0),b=I(0),E=y(()=>({height:p.value?`${c.value}px`:"",width:p.value?`${d.value}px`:""})),C=y(()=>{if(!p.value)return{};const $=l.offset?zt(l.offset):0;return{height:`${c.value}px`,width:`${d.value}px`,top:l.position==="top"?$:"",bottom:l.position==="bottom"?$:"",transform:b.value?`translateY(${b.value}px)`:"",zIndex:l.zIndex}}),w=()=>{if(!i.value)return;g.value=i.value instanceof Window?document.documentElement.scrollTop:i.value.scrollTop||0;const{position:$,target:M,offset:R}=l,N=R+c.value;if($==="top")if(M){const O=h.bottom.value-N;p.value=R>f.value&&h.bottom.value>0,b.value=O<0?O:0}else p.value=R>f.value;else if(M){const O=u.value-h.top.value-N;p.value=u.value-Rh.top.value,b.value=O<0?-O:0}else p.value=u.value-R{if(!p.value){v();return}p.value=!1,await Ee(),v(),p.value=!0},S=async()=>{v(),await Ee(),n("scroll",{scrollTop:g.value,fixed:p.value})};return ie(p,$=>n(nt,$)),Xe(()=>{var $;l.target?(s.value=($=document.querySelector(l.target))!=null?$:void 0,s.value||jt(ld,`Target does not exist: ${l.target}`)):s.value=document.documentElement,i.value=jr(r.value,!0),v()}),xt(i,"scroll",S),bn(w),t({update:w,updateRoot:k}),($,M)=>(_(),V("div",{ref_key:"root",ref:r,class:T(o(a).b()),style:_e(o(E))},[F("div",{class:T({[o(a).m("fixed")]:p.value}),style:_e(o(C))},[G($.$slots,"default")],6)],6))}});var Mh=fe(Ih,[["__file","affix.vue"]]);const He=(e,t)=>{if(e.install=n=>{for(const l of[e,...Object.values(t??{})])n.component(l.name,l)},t)for(const[n,l]of Object.entries(t))e[n]=l;return e},od=(e,t)=>(e.install=n=>{e._context=n._context,n.config.globalProperties[t]=e},e),Rh=(e,t)=>(e.install=n=>{n.directive(t,e)},e),At=e=>(e.install=Bt,e),Ph=He(Mh),Oh=de({size:{type:Y([Number,String])},color:{type:String}}),Lh=x({name:"ElIcon",inheritAttrs:!1}),Bh=x({...Lh,props:Oh,setup(e){const t=e,n=ue("icon"),l=y(()=>{const{size:a,color:s}=t;return!a&&!s?{}:{fontSize:vt(a)?void 0:zt(a),"--color":s}});return(a,s)=>(_(),V("i",et({class:o(n).b(),style:o(l)},a.$attrs),[G(a.$slots,"default")],16))}});var Vh=fe(Bh,[["__file","icon.vue"]]);const Se=He(Vh);function cu(){let e;const t=(l,a)=>{n(),e=window.setTimeout(l,a)},n=()=>window.clearTimeout(e);return $p(()=>n()),{registerTimeout:t,cancelTimeout:n}}const ad=de({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),sd=({showAfter:e,hideAfter:t,autoClose:n,open:l,close:a})=>{const{registerTimeout:s}=cu(),{registerTimeout:r,cancelTimeout:i}=cu();return{onOpen:d=>{s(()=>{l(d);const f=o(n);Te(f)&&f>0&&r(()=>{a(d)},f)},o(e))},onClose:d=>{i(),s(()=>{a(d)},o(t))}}};/*! Element Plus Icons Vue v2.3.1 */var Dh=x({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),nl=Dh,Ah=x({name:"ArrowLeft",__name:"arrow-left",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),dl=Ah,Fh=x({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),Cn=Fh,xh=x({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),hs=xh,zh=x({name:"Back",__name:"back",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),F("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),Hh=zh,Kh=x({name:"Calendar",__name:"calendar",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),Wh=Kh,jh=x({name:"CaretRight",__name:"caret-right",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),rd=jh,Uh=x({name:"CaretTop",__name:"caret-top",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}}),Yh=Uh,qh=x({name:"Check",__name:"check",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),va=qh,Gh=x({name:"CircleCheckFilled",__name:"circle-check-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),Xh=Gh,Zh=x({name:"CircleCheck",__name:"circle-check",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),F("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),Yr=Zh,Jh=x({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),qr=Jh,Qh=x({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),F("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),ml=Qh,em=x({name:"Clock",__name:"clock",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),F("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),F("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),id=em,tm=x({name:"Close",__name:"close",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),zn=tm,nm=x({name:"DArrowLeft",__name:"d-arrow-left",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),Rl=nm,lm=x({name:"DArrowRight",__name:"d-arrow-right",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),Pl=lm,om=x({name:"Delete",__name:"delete",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),am=om,sm=x({name:"Document",__name:"document",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),rm=sm,im=x({name:"FullScreen",__name:"full-screen",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),um=im,cm=x({name:"Hide",__name:"hide",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),F("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),dm=cm,fm=x({name:"InfoFilled",__name:"info-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Go=fm,vm=x({name:"Loading",__name:"loading",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),Qn=vm,pm=x({name:"Minus",__name:"minus",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),hm=pm,mm=x({name:"MoreFilled",__name:"more-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),du=mm,gm=x({name:"More",__name:"more",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),bm=gm,ym=x({name:"PictureFilled",__name:"picture-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),Cm=ym,wm=x({name:"Plus",__name:"plus",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),ud=wm,km=x({name:"QuestionFilled",__name:"question-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),Sm=km,Em=x({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),_m=Em,Tm=x({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}}),$m=Tm,Nm=x({name:"ScaleToOriginal",__name:"scale-to-original",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),Im=Nm,Mm=x({name:"Search",__name:"search",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),Rm=Mm,Pm=x({name:"SortDown",__name:"sort-down",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M576 96v709.568L333.312 562.816A32 32 0 1 0 288 608l297.408 297.344A32 32 0 0 0 640 882.688V96a32 32 0 0 0-64 0"})]))}}),Om=Pm,Lm=x({name:"SortUp",__name:"sort-up",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M384 141.248V928a32 32 0 1 0 64 0V218.56l242.688 242.688A32 32 0 1 0 736 416L438.592 118.656A32 32 0 0 0 384 141.248"})]))}}),Bm=Lm,Vm=x({name:"StarFilled",__name:"star-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M283.84 867.84 512 747.776l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72z"})]))}}),ka=Vm,Dm=x({name:"Star",__name:"star",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),Am=Dm,Fm=x({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),cd=Fm,xm=x({name:"View",__name:"view",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),zm=xm,Hm=x({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),ms=Hm,Km=x({name:"ZoomIn",__name:"zoom-in",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),dd=Km,Wm=x({name:"ZoomOut",__name:"zoom-out",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),jm=Wm;const $t=Y([String,Object,Function]),fd={Close:zn},Gr={Close:zn,SuccessFilled:cd,InfoFilled:Go,WarningFilled:ms,CircleCloseFilled:qr},Ol={primary:Go,success:cd,warning:ms,error:qr,info:Go},gs={validating:Qn,success:Yr,error:ml},Um=["light","dark"],Ym=de({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:ko(Ol),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:Um,default:"light"},...ad}),qm={open:()=>!0,close:e=>vt(e)||e instanceof Event},Gm=x({name:"ElAlert"}),Xm=x({...Gm,props:Ym,emits:qm,setup(e,{emit:t}){const n=e,{Close:l}=Gr,a=Xt(),s=ue("alert"),r=I(!1),i=y(()=>Ol[n.type]),u=y(()=>!!(n.description||a.default)),c=()=>{r.value=!0,t("open")},d=v=>{r.value=!1,t("close",v)},{onOpen:f,onClose:m}=sd({showAfter:wt(n,"showAfter"),hideAfter:wt(n,"hideAfter"),autoClose:wt(n,"autoClose"),open:c,close:d});return bt&&f(),(v,h)=>(_(),oe(an,{name:o(s).b("fade"),persisted:""},{default:U(()=>[We(F("div",{class:T([o(s).b(),o(s).m(v.type),o(s).is("center",v.center),o(s).is(v.effect)]),role:"alert"},[v.showIcon&&(v.$slots.icon||o(i))?(_(),oe(o(Se),{key:0,class:T([o(s).e("icon"),{[o(s).is("big")]:o(u)}])},{default:U(()=>[G(v.$slots,"icon",{},()=>[(_(),oe(Ge(o(i))))])]),_:3},8,["class"])):J("v-if",!0),F("div",{class:T(o(s).e("content"))},[v.title||v.$slots.title?(_(),V("span",{key:0,class:T([o(s).e("title"),{"with-description":o(u)}])},[G(v.$slots,"title",{},()=>[st(pe(v.title),1)])],2)):J("v-if",!0),o(u)?(_(),V("p",{key:1,class:T(o(s).e("description"))},[G(v.$slots,"default",{},()=>[st(pe(v.description),1)])],2)):J("v-if",!0),v.closable?(_(),V(Oe,{key:2},[v.closeText?(_(),V("div",{key:0,class:T([o(s).e("close-btn"),o(s).is("customed")]),onClick:d},pe(v.closeText),3)):(_(),oe(o(Se),{key:1,class:T(o(s).e("close-btn")),onClick:o(m)},{default:U(()=>[H(o(l))]),_:1},8,["class","onClick"]))],64)):J("v-if",!0)],2)],2),[[mt,r.value]])]),_:3},8,["name"]))}});var Zm=fe(Xm,[["__file","alert.vue"]]);const Jm=He(Zm),Xr=()=>bt&&/firefox/i.test(window.navigator.userAgent);let Tn;const Qm={height:"0",visibility:"hidden",overflow:Xr()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},eg=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function tg(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),l=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),a=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:eg.map(r=>[r,t.getPropertyValue(r)]),paddingSize:l,borderSize:a,boxSizing:n}}function fu(e,t=1,n){var l;Tn||(Tn=document.createElement("textarea"),document.body.appendChild(Tn));const{paddingSize:a,borderSize:s,boxSizing:r,contextStyle:i}=tg(e);i.forEach(([f,m])=>Tn==null?void 0:Tn.style.setProperty(f,m)),Object.entries(Qm).forEach(([f,m])=>Tn==null?void 0:Tn.style.setProperty(f,m,"important")),Tn.value=e.value||e.placeholder||"";let u=Tn.scrollHeight;const c={};r==="border-box"?u=u+s:r==="content-box"&&(u=u-a),Tn.value="";const d=Tn.scrollHeight-a;if(Te(t)){let f=d*t;r==="border-box"&&(f=f+a+s),u=Math.max(f,u),c.minHeight=`${f}px`}if(Te(n)){let f=d*n;r==="border-box"&&(f=f+a+s),u=Math.min(f,u)}return c.height=`${u}px`,(l=Tn.parentNode)==null||l.removeChild(Tn),Tn=void 0,c}const Vt=e=>e,ng=de({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),cn=e=>An(ng,e),pa=de({id:{type:String,default:void 0},size:Jt,disabled:Boolean,modelValue:{type:Y([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:Y([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:$t},prefixIcon:{type:$t},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Y([Object,Array,String]),default:()=>Vt({})},autofocus:Boolean,rows:{type:Number,default:2},...cn(["ariaLabel"]),inputmode:{type:Y(String),default:void 0},name:String}),lg={[De]:e=>Ve(e),input:e=>Ve(e),change:e=>Ve(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},og=["class","style"],ag=/^on[A-Z]/,bs=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n}=e,l=y(()=>((n==null?void 0:n.value)||[]).concat(og)),a=lt();return a?y(()=>{var s;return qo(Object.entries((s=a.proxy)==null?void 0:s.$attrs).filter(([r])=>!l.value.includes(r)&&!(t&&ag.test(r))))}):y(()=>({}))},vu={prefix:Math.floor(Math.random()*1e4),current:0},sg=Symbol("elIdInjection"),Zr=()=>lt()?we(sg,vu):vu,sn=e=>{const t=Zr(),n=Kr();return Ha(()=>o(e)||`${n.value}-id-${t.prefix}-${t.current++}`)},Jl=Symbol("formContextKey"),el=Symbol("formItemContextKey"),dn=()=>{const e=we(Jl,void 0),t=we(el,void 0);return{form:e,formItem:t}},Kn=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:l})=>{n||(n=I(!1)),l||(l=I(!1));const a=I();let s;const r=y(()=>{var i;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((i=t.inputIds)==null?void 0:i.length)<=1)});return Xe(()=>{s=ie([wt(e,"id"),n],([i,u])=>{const c=i??(u?void 0:sn().value);c!==a.value&&(t!=null&&t.removeInputId&&(a.value&&t.removeInputId(a.value),!(l!=null&&l.value)&&!u&&c&&t.addInputId(c)),a.value=c)},{immediate:!0})}),cs(()=>{s&&s(),t!=null&&t.removeInputId&&a.value&&t.removeInputId(a.value)}),{isLabeledByFormItem:r,inputId:a}},vd=e=>{const t=lt();return y(()=>{var n,l;return(l=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:l[e]})},Gt=(e,t={})=>{const n=I(void 0),l=t.prop?n:vd("size"),a=t.global?n:Zc(),s=t.form?{size:void 0}:we(Jl,void 0),r=t.formItem?{size:void 0}:we(el,void 0);return y(()=>l.value||o(e)||(r==null?void 0:r.size)||(s==null?void 0:s.size)||a.value||"")},fn=e=>{const t=vd("disabled"),n=we(Jl,void 0);return y(()=>t.value||o(e)||(n==null?void 0:n.disabled)||!1)},rg='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',ig=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,pu=e=>Array.from(e.querySelectorAll(rg)).filter(t=>Xo(t)&&ig(t)),Xo=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},La=function(e,t,...n){let l;t.includes("mouse")||t.includes("click")?l="MouseEvents":t.includes("key")?l="KeyboardEvent":l="HTMLEvents";const a=document.createEvent(l);return a.initEvent(t,...n),e.dispatchEvent(a),e},pd=e=>!e.getAttribute("aria-owns"),hd=(e,t,n)=>{const{parentNode:l}=e;if(!l)return null;const a=l.querySelectorAll(n),s=Array.prototype.indexOf.call(a,e);return a[s+t]||null},Ba=e=>{e&&(e.focus(),!pd(e)&&e.click())};function Ll(e,{disabled:t,beforeFocus:n,afterFocus:l,beforeBlur:a,afterBlur:s}={}){const r=lt(),{emit:i}=r,u=Lt(),c=I(!1),d=v=>{const h=Qe(n)?n(v):!1;o(t)||c.value||h||(c.value=!0,i("focus",v),l==null||l())},f=v=>{var h;const p=Qe(a)?a(v):!1;o(t)||v.relatedTarget&&((h=u.value)!=null&&h.contains(v.relatedTarget))||p||(c.value=!1,i("blur",v),s==null||s())},m=v=>{var h,p;o(t)||Xo(v.target)||(h=u.value)!=null&&h.contains(document.activeElement)&&u.value!==document.activeElement||(p=e.value)==null||p.focus()};return ie([u,()=>o(t)],([v,h])=>{v&&(h?v.removeAttribute("tabindex"):v.setAttribute("tabindex","-1"))}),xt(u,"focus",d,!0),xt(u,"blur",f,!0),xt(u,"click",m,!0),{isFocused:c,wrapperRef:u,handleFocus:d,handleBlur:f}}const ug=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);function ha({afterComposition:e,emit:t}){const n=I(!1),l=i=>{t==null||t("compositionstart",i),n.value=!0},a=i=>{var u;t==null||t("compositionupdate",i);const c=(u=i.target)==null?void 0:u.value,d=c[c.length-1]||"";n.value=!ug(d)},s=i=>{t==null||t("compositionend",i),n.value&&(n.value=!1,Ee(()=>e(i)))};return{isComposing:n,handleComposition:i=>{i.type==="compositionend"?s(i):a(i)},handleCompositionStart:l,handleCompositionUpdate:a,handleCompositionEnd:s}}function cg(e){let t;function n(){if(e.value==null)return;const{selectionStart:a,selectionEnd:s,value:r}=e.value;if(a==null||s==null)return;const i=r.slice(0,Math.max(0,a)),u=r.slice(Math.max(0,s));t={selectionStart:a,selectionEnd:s,value:r,beforeTxt:i,afterTxt:u}}function l(){if(e.value==null||t==null)return;const{value:a}=e.value,{beforeTxt:s,afterTxt:r,selectionStart:i}=t;if(s==null||r==null||i==null)return;let u=a.length;if(a.endsWith(r))u=a.length-r.length;else if(a.startsWith(s))u=s.length;else{const c=s[i-1],d=a.indexOf(c,i-1);d!==-1&&(u=d+1)}e.value.setSelectionRange(u,u)}return[n,l]}const dg="ElInput",fg=x({name:dg,inheritAttrs:!1}),vg=x({...fg,props:pa,emits:lg,setup(e,{expose:t,emit:n}){const l=e,a=pl(),s=bs(),r=Xt(),i=y(()=>[l.type==="textarea"?p.b():h.b(),h.m(m.value),h.is("disabled",v.value),h.is("exceed",Q.value),{[h.b("group")]:r.prepend||r.append,[h.m("prefix")]:r.prefix||l.prefixIcon,[h.m("suffix")]:r.suffix||l.suffixIcon||l.clearable||l.showPassword,[h.bm("suffix","password-clear")]:B.value&&A.value,[h.b("hidden")]:l.type==="hidden"},a.class]),u=y(()=>[h.e("wrapper"),h.is("focus",M.value)]),{form:c,formItem:d}=dn(),{inputId:f}=Kn(l,{formItemContext:d}),m=Gt(),v=fn(),h=ue("input"),p=ue("textarea"),g=Lt(),b=Lt(),E=I(!1),C=I(!1),w=I(),k=Lt(l.inputStyle),S=y(()=>g.value||b.value),{wrapperRef:$,isFocused:M,handleFocus:R,handleBlur:N}=Ll(S,{disabled:v,afterBlur(){var ye;l.validateEvent&&((ye=d==null?void 0:d.validate)==null||ye.call(d,"blur").catch(Ue=>void 0))}}),O=y(()=>{var ye;return(ye=c==null?void 0:c.statusIcon)!=null?ye:!1}),P=y(()=>(d==null?void 0:d.validateState)||""),W=y(()=>P.value&&gs[P.value]),K=y(()=>C.value?zm:dm),D=y(()=>[a.style]),L=y(()=>[l.inputStyle,k.value,{resize:l.resize}]),z=y(()=>qt(l.modelValue)?"":String(l.modelValue)),B=y(()=>l.clearable&&!v.value&&!l.readonly&&!!z.value&&(M.value||E.value)),A=y(()=>l.showPassword&&!v.value&&!!z.value),ne=y(()=>l.showWordLimit&&!!l.maxlength&&(l.type==="text"||l.type==="textarea")&&!v.value&&!l.readonly&&!l.showPassword),j=y(()=>z.value.length),Q=y(()=>!!ne.value&&j.value>Number(l.maxlength)),Z=y(()=>!!r.suffix||!!l.suffixIcon||B.value||l.showPassword||ne.value||!!P.value&&O.value),[ee,ae]=cg(g);Ft(b,ye=>{if(se(),!ne.value||l.resize!=="both")return;const Ue=ye[0],{width:It}=Ue.contentRect;w.value={right:`calc(100% - ${It+15+6}px)`}});const re=()=>{const{type:ye,autosize:Ue}=l;if(!(!bt||ye!=="textarea"||!b.value))if(Ue){const It=yt(Ue)?Ue.minRows:void 0,Ot=yt(Ue)?Ue.maxRows:void 0,Rt=fu(b.value,It,Ot);k.value={overflowY:"hidden",...Rt},Ee(()=>{b.value.offsetHeight,k.value=Rt})}else k.value={minHeight:fu(b.value).minHeight}},se=(ye=>{let Ue=!1;return()=>{var It;if(Ue||!l.autosize)return;((It=b.value)==null?void 0:It.offsetParent)===null||(ye(),Ue=!0)}})(re),ge=()=>{const ye=S.value,Ue=l.formatter?l.formatter(z.value):z.value;!ye||ye.value===Ue||(ye.value=Ue)},Be=async ye=>{ee();let{value:Ue}=ye.target;if(l.formatter&&l.parser&&(Ue=l.parser(Ue)),!ce.value){if(Ue===z.value){ge();return}n(De,Ue),n(Zt,Ue),await Ee(),ge(),ae()}},te=ye=>{let{value:Ue}=ye.target;l.formatter&&l.parser&&(Ue=l.parser(Ue)),n(nt,Ue)},{isComposing:ce,handleCompositionStart:Ie,handleCompositionUpdate:Ae,handleCompositionEnd:xe}=ha({emit:n,afterComposition:Be}),Ye=()=>{ee(),C.value=!C.value,setTimeout(ae)},$e=()=>{var ye;return(ye=S.value)==null?void 0:ye.focus()},Me=()=>{var ye;return(ye=S.value)==null?void 0:ye.blur()},Pe=ye=>{E.value=!1,n("mouseleave",ye)},Ze=ye=>{E.value=!0,n("mouseenter",ye)},ot=ye=>{n("keydown",ye)},at=()=>{var ye;(ye=S.value)==null||ye.select()},ct=()=>{n(De,""),n(nt,""),n("clear"),n(Zt,"")};return ie(()=>l.modelValue,()=>{var ye;Ee(()=>re()),l.validateEvent&&((ye=d==null?void 0:d.validate)==null||ye.call(d,"change").catch(Ue=>void 0))}),ie(z,()=>ge()),ie(()=>l.type,async()=>{await Ee(),ge(),re()}),Xe(()=>{!l.formatter&&l.parser,ge(),Ee(re)}),t({input:g,textarea:b,ref:S,textareaStyle:L,autosize:wt(l,"autosize"),isComposing:ce,focus:$e,blur:Me,select:at,clear:ct,resizeTextarea:re}),(ye,Ue)=>(_(),V("div",{class:T([o(i),{[o(h).bm("group","append")]:ye.$slots.append,[o(h).bm("group","prepend")]:ye.$slots.prepend}]),style:_e(o(D)),onMouseenter:Ze,onMouseleave:Pe},[J(" input "),ye.type!=="textarea"?(_(),V(Oe,{key:0},[J(" prepend slot "),ye.$slots.prepend?(_(),V("div",{key:0,class:T(o(h).be("group","prepend"))},[G(ye.$slots,"prepend")],2)):J("v-if",!0),F("div",{ref_key:"wrapperRef",ref:$,class:T(o(u))},[J(" prefix slot "),ye.$slots.prefix||ye.prefixIcon?(_(),V("span",{key:0,class:T(o(h).e("prefix"))},[F("span",{class:T(o(h).e("prefix-inner"))},[G(ye.$slots,"prefix"),ye.prefixIcon?(_(),oe(o(Se),{key:0,class:T(o(h).e("icon"))},{default:U(()=>[(_(),oe(Ge(ye.prefixIcon)))]),_:1},8,["class"])):J("v-if",!0)],2)],2)):J("v-if",!0),F("input",et({id:o(f),ref_key:"input",ref:g,class:o(h).e("inner")},o(s),{name:ye.name,minlength:ye.minlength,maxlength:ye.maxlength,type:ye.showPassword?C.value?"text":"password":ye.type,disabled:o(v),readonly:ye.readonly,autocomplete:ye.autocomplete,tabindex:ye.tabindex,"aria-label":ye.ariaLabel,placeholder:ye.placeholder,style:ye.inputStyle,form:ye.form,autofocus:ye.autofocus,role:ye.containerRole,inputmode:ye.inputmode,onCompositionstart:o(Ie),onCompositionupdate:o(Ae),onCompositionend:o(xe),onInput:Be,onChange:te,onKeydown:ot}),null,16,["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode","onCompositionstart","onCompositionupdate","onCompositionend"]),J(" suffix slot "),o(Z)?(_(),V("span",{key:1,class:T(o(h).e("suffix"))},[F("span",{class:T(o(h).e("suffix-inner"))},[!o(B)||!o(A)||!o(ne)?(_(),V(Oe,{key:0},[G(ye.$slots,"suffix"),ye.suffixIcon?(_(),oe(o(Se),{key:0,class:T(o(h).e("icon"))},{default:U(()=>[(_(),oe(Ge(ye.suffixIcon)))]),_:1},8,["class"])):J("v-if",!0)],64)):J("v-if",!0),o(B)?(_(),oe(o(Se),{key:1,class:T([o(h).e("icon"),o(h).e("clear")]),onMousedown:Le(o(Bt),["prevent"]),onClick:ct},{default:U(()=>[H(o(ml))]),_:1},8,["class","onMousedown"])):J("v-if",!0),o(A)?(_(),oe(o(Se),{key:2,class:T([o(h).e("icon"),o(h).e("password")]),onClick:Ye},{default:U(()=>[(_(),oe(Ge(o(K))))]),_:1},8,["class"])):J("v-if",!0),o(ne)?(_(),V("span",{key:3,class:T(o(h).e("count"))},[F("span",{class:T(o(h).e("count-inner"))},pe(o(j))+" / "+pe(ye.maxlength),3)],2)):J("v-if",!0),o(P)&&o(W)&&o(O)?(_(),oe(o(Se),{key:4,class:T([o(h).e("icon"),o(h).e("validateIcon"),o(h).is("loading",o(P)==="validating")])},{default:U(()=>[(_(),oe(Ge(o(W))))]),_:1},8,["class"])):J("v-if",!0)],2)],2)):J("v-if",!0)],2),J(" append slot "),ye.$slots.append?(_(),V("div",{key:1,class:T(o(h).be("group","append"))},[G(ye.$slots,"append")],2)):J("v-if",!0)],64)):(_(),V(Oe,{key:1},[J(" textarea "),F("textarea",et({id:o(f),ref_key:"textarea",ref:b,class:[o(p).e("inner"),o(h).is("focus",o(M))]},o(s),{minlength:ye.minlength,maxlength:ye.maxlength,tabindex:ye.tabindex,disabled:o(v),readonly:ye.readonly,autocomplete:ye.autocomplete,style:o(L),"aria-label":ye.ariaLabel,placeholder:ye.placeholder,form:ye.form,autofocus:ye.autofocus,rows:ye.rows,role:ye.containerRole,onCompositionstart:o(Ie),onCompositionupdate:o(Ae),onCompositionend:o(xe),onInput:Be,onFocus:o(R),onBlur:o(N),onChange:te,onKeydown:ot}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),o(ne)?(_(),V("span",{key:0,style:_e(w.value),class:T(o(h).e("count"))},pe(o(j))+" / "+pe(ye.maxlength),7)):J("v-if",!0)],64))],38))}});var pg=fe(vg,[["__file","input.vue"]]);const hn=He(pg),no=4,md={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},hg=({move:e,size:t,bar:n})=>({[n.size]:t,transform:`translate${n.axis}(${e}%)`}),Jr=Symbol("scrollbarContextKey"),mg=de({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),gg="Thumb",bg=x({__name:"thumb",props:mg,setup(e){const t=e,n=we(Jr),l=ue("scrollbar");n||jt(gg,"can not inject scrollbar context");const a=I(),s=I(),r=I({}),i=I(!1);let u=!1,c=!1,d=0,f=0,m=bt?document.onselectstart:null;const v=y(()=>md[t.vertical?"vertical":"horizontal"]),h=y(()=>hg({size:t.size,move:t.move,bar:v.value})),p=y(()=>a.value[v.value.offset]**2/n.wrapElement[v.value.scrollSize]/t.ratio/s.value[v.value.offset]),g=M=>{var R;if(M.stopPropagation(),M.ctrlKey||[1,2].includes(M.button))return;(R=window.getSelection())==null||R.removeAllRanges(),E(M);const N=M.currentTarget;N&&(r.value[v.value.axis]=N[v.value.offset]-(M[v.value.client]-N.getBoundingClientRect()[v.value.direction]))},b=M=>{if(!s.value||!a.value||!n.wrapElement)return;const R=Math.abs(M.target.getBoundingClientRect()[v.value.direction]-M[v.value.client]),N=s.value[v.value.offset]/2,O=(R-N)*100*p.value/a.value[v.value.offset];n.wrapElement[v.value.scroll]=O*n.wrapElement[v.value.scrollSize]/100},E=M=>{M.stopImmediatePropagation(),u=!0,d=n.wrapElement.scrollHeight,f=n.wrapElement.scrollWidth,document.addEventListener("mousemove",C),document.addEventListener("mouseup",w),m=document.onselectstart,document.onselectstart=()=>!1},C=M=>{if(!a.value||!s.value||u===!1)return;const R=r.value[v.value.axis];if(!R)return;const N=(a.value.getBoundingClientRect()[v.value.direction]-M[v.value.client])*-1,O=s.value[v.value.offset]-R,P=(N-O)*100*p.value/a.value[v.value.offset];v.value.scroll==="scrollLeft"?n.wrapElement[v.value.scroll]=P*f/100:n.wrapElement[v.value.scroll]=P*d/100},w=()=>{u=!1,r.value[v.value.axis]=0,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",w),$(),c&&(i.value=!1)},k=()=>{c=!1,i.value=!!t.size},S=()=>{c=!0,i.value=u};Nt(()=>{$(),document.removeEventListener("mouseup",w)});const $=()=>{document.onselectstart!==m&&(document.onselectstart=m)};return xt(wt(n,"scrollbarElement"),"mousemove",k),xt(wt(n,"scrollbarElement"),"mouseleave",S),(M,R)=>(_(),oe(an,{name:o(l).b("fade"),persisted:""},{default:U(()=>[We(F("div",{ref_key:"instance",ref:a,class:T([o(l).e("bar"),o(l).is(o(v).key)]),onMousedown:b,onClick:Le(()=>{},["stop"])},[F("div",{ref_key:"thumb",ref:s,class:T(o(l).e("thumb")),style:_e(o(h)),onMousedown:g},null,38)],42,["onClick"]),[[mt,M.always||i.value]])]),_:1},8,["name"]))}});var hu=fe(bg,[["__file","thumb.vue"]]);const yg=de({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),Cg=x({__name:"bar",props:yg,setup(e,{expose:t}){const n=e,l=we(Jr),a=I(0),s=I(0),r=I(""),i=I(""),u=I(1),c=I(1);return t({handleScroll:m=>{if(m){const v=m.offsetHeight-no,h=m.offsetWidth-no;s.value=m.scrollTop*100/v*u.value,a.value=m.scrollLeft*100/h*c.value}},update:()=>{const m=l==null?void 0:l.wrapElement;if(!m)return;const v=m.offsetHeight-no,h=m.offsetWidth-no,p=v**2/m.scrollHeight,g=h**2/m.scrollWidth,b=Math.max(p,n.minSize),E=Math.max(g,n.minSize);u.value=p/(v-p)/(b/(v-b)),c.value=g/(h-g)/(E/(h-E)),i.value=b+no(_(),V(Oe,null,[H(hu,{move:a.value,ratio:c.value,size:r.value,always:m.always},null,8,["move","ratio","size","always"]),H(hu,{move:s.value,ratio:u.value,size:i.value,vertical:"",always:m.always},null,8,["move","ratio","size","always"])],64))}});var wg=fe(Cg,[["__file","bar.vue"]]);const kg=de({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:Y([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...cn(["ariaLabel","ariaOrientation"])}),gd={"end-reached":e=>["left","right","top","bottom"].includes(e),scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(Te)},Sg="ElScrollbar",Eg=x({name:Sg}),_g=x({...Eg,props:kg,emits:gd,setup(e,{expose:t,emit:n}){const l=e,a=ue("scrollbar");let s,r,i=0,u=0,c="";const d=I(),f=I(),m=I(),v=I(),h=y(()=>{const S={};return l.height&&(S.height=zt(l.height)),l.maxHeight&&(S.maxHeight=zt(l.maxHeight)),[l.wrapStyle,S]}),p=y(()=>[l.wrapClass,a.e("wrap"),{[a.em("wrap","hidden-default")]:!l.native}]),g=y(()=>[a.e("view"),l.viewClass]),b=()=>{var S;if(f.value){(S=v.value)==null||S.handleScroll(f.value);const $=i,M=u;i=f.value.scrollTop,u=f.value.scrollLeft;const R={bottom:i+f.value.clientHeight>=f.value.scrollHeight,top:i<=0&&$!==0,right:u+f.value.clientWidth>=f.value.scrollWidth&&M!==u,left:u<=0&&M!==0};$!==i&&(c=i>$?"bottom":"top"),M!==u&&(c=u>M?"right":"left"),n("scroll",{scrollTop:i,scrollLeft:u}),R[c]&&n("end-reached",c)}};function E(S,$){yt(S)?f.value.scrollTo(S):Te(S)&&Te($)&&f.value.scrollTo(S,$)}const C=S=>{Te(S)&&(f.value.scrollTop=S)},w=S=>{Te(S)&&(f.value.scrollLeft=S)},k=()=>{var S;(S=v.value)==null||S.update()};return ie(()=>l.noresize,S=>{S?(s==null||s(),r==null||r()):({stop:s}=Ft(m,k),r=xt("resize",k))},{immediate:!0}),ie(()=>[l.maxHeight,l.height],()=>{l.native||Ee(()=>{var S;k(),f.value&&((S=v.value)==null||S.handleScroll(f.value))})}),rt(Jr,kt({scrollbarElement:d,wrapElement:f})),Fr(()=>{f.value&&(f.value.scrollTop=i,f.value.scrollLeft=u)}),Xe(()=>{l.native||Ee(()=>{k()})}),hl(()=>k()),t({wrapRef:f,update:k,scrollTo:E,setScrollTop:C,setScrollLeft:w,handleScroll:b}),(S,$)=>(_(),V("div",{ref_key:"scrollbarRef",ref:d,class:T(o(a).b())},[F("div",{ref_key:"wrapRef",ref:f,class:T(o(p)),style:_e(o(h)),tabindex:S.tabindex,onScroll:b},[(_(),oe(Ge(S.tag),{id:S.id,ref_key:"resizeRef",ref:m,class:T(o(g)),style:_e(S.viewStyle),role:S.role,"aria-label":S.ariaLabel,"aria-orientation":S.ariaOrientation},{default:U(()=>[G(S.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),S.native?J("v-if",!0):(_(),oe(wg,{key:0,ref_key:"barRef",ref:v,always:S.always,"min-size":S.minSize},null,8,["always","min-size"]))],2))}});var Tg=fe(_g,[["__file","scrollbar.vue"]]);const jn=He(Tg),Qr=Symbol("popper"),bd=Symbol("popperContent"),yd=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],Cd=de({role:{type:String,values:yd,default:"tooltip"}}),$g=x({name:"ElPopper",inheritAttrs:!1}),Ng=x({...$g,props:Cd,setup(e,{expose:t}){const n=e,l=I(),a=I(),s=I(),r=I(),i=y(()=>n.role),u={triggerRef:l,popperInstanceRef:a,contentRef:s,referenceRef:r,role:i};return t(u),rt(Qr,u),(c,d)=>G(c.$slots,"default")}});var Ig=fe(Ng,[["__file","popper.vue"]]);const Mg=x({name:"ElPopperArrow",inheritAttrs:!1}),Rg=x({...Mg,setup(e,{expose:t}){const n=ue("popper"),{arrowRef:l,arrowStyle:a}=we(bd,void 0);return Nt(()=>{l.value=void 0}),t({arrowRef:l}),(s,r)=>(_(),V("span",{ref_key:"arrowRef",ref:l,class:T(o(n).e("arrow")),style:_e(o(a)),"data-popper-arrow":""},null,6))}});var Pg=fe(Rg,[["__file","arrow.vue"]]);const wd=de({virtualRef:{type:Y(Object)},virtualTriggering:Boolean,onMouseenter:{type:Y(Function)},onMouseleave:{type:Y(Function)},onClick:{type:Y(Function)},onKeydown:{type:Y(Function)},onFocus:{type:Y(Function)},onBlur:{type:Y(Function)},onContextmenu:{type:Y(Function)},id:String,open:Boolean}),kd=Symbol("elForwardRef"),Og=e=>{rt(kd,{setForwardRef:n=>{e.value=n}})},Lg=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),Bg="ElOnlyChild",Sd=x({name:Bg,setup(e,{slots:t,attrs:n}){var l;const a=we(kd),s=Lg((l=a==null?void 0:a.setForwardRef)!=null?l:Bt);return()=>{var r;const i=(r=t.default)==null?void 0:r.call(t,n);if(!i||i.length>1)return null;const u=Ed(i);return u?We(Np(u,n),[[s]]):null}}});function Ed(e){if(!e)return null;const t=e;for(const n of t){if(yt(n))switch(n.type){case jl:continue;case Nc:case"svg":return mu(n);case Oe:return Ed(n.children);default:return n}return mu(n)}return null}function mu(e){const t=ue("only-child");return H("span",{class:t.e("content")},[e])}const Vg=x({name:"ElPopperTrigger",inheritAttrs:!1}),Dg=x({...Vg,props:wd,setup(e,{expose:t}){const n=e,{role:l,triggerRef:a}=we(Qr,void 0);Og(a);const s=y(()=>i.value?n.id:void 0),r=y(()=>{if(l&&l.value==="tooltip")return n.open&&n.id?n.id:void 0}),i=y(()=>{if(l&&l.value!=="tooltip")return l.value}),u=y(()=>i.value?`${n.open}`:void 0);let c;const d=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return Xe(()=>{ie(()=>n.virtualRef,f=>{f&&(a.value=ua(f))},{immediate:!0}),ie(a,(f,m)=>{c==null||c(),c=void 0,_n(f)&&(d.forEach(v=>{var h;const p=n[v];p&&(f.addEventListener(v.slice(2).toLowerCase(),p),(h=m==null?void 0:m.removeEventListener)==null||h.call(m,v.slice(2).toLowerCase(),p))}),Xo(f)&&(c=ie([s,r,i,u],v=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((h,p)=>{qt(v[p])?f.removeAttribute(h):f.setAttribute(h,v[p])})},{immediate:!0}))),_n(m)&&Xo(m)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(v=>m.removeAttribute(v))},{immediate:!0})}),Nt(()=>{if(c==null||c(),c=void 0,a.value&&_n(a.value)){const f=a.value;d.forEach(m=>{const v=n[m];v&&f.removeEventListener(m.slice(2).toLowerCase(),v)}),a.value=void 0}}),t({triggerRef:a}),(f,m)=>f.virtualTriggering?J("v-if",!0):(_(),oe(o(Sd),et({key:0},f.$attrs,{"aria-controls":o(s),"aria-describedby":o(r),"aria-expanded":o(u),"aria-haspopup":o(i)}),{default:U(()=>[G(f.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var Ag=fe(Dg,[["__file","trigger.vue"]]);const As="focus-trap.focus-after-trapped",Fs="focus-trap.focus-after-released",Fg="focus-trap.focusout-prevented",gu={cancelable:!0,bubbles:!1},xg={cancelable:!0,bubbles:!1},bu="focusAfterTrapped",yu="focusAfterReleased",ei=Symbol("elFocusTrap"),ti=I(),ys=I(0),ni=I(0);let Sa=0;const _d=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const a=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||a?NodeFilter.FILTER_SKIP:l.tabIndex>=0||l===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},Cu=(e,t)=>{for(const n of e)if(!zg(n,t))return n},zg=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},Hg=e=>{const t=_d(e),n=Cu(t,e),l=Cu(t.reverse(),e);return[n,l]},Kg=e=>e instanceof HTMLInputElement&&"select"in e,al=(e,t)=>{if(e&&e.focus){const n=document.activeElement;let l=!1;_n(e)&&!Xo(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),l=!0),e.focus({preventScroll:!0}),ni.value=window.performance.now(),e!==n&&Kg(e)&&t&&e.select(),_n(e)&&l&&e.removeAttribute("tabindex")}};function wu(e,t){const n=[...e],l=e.indexOf(t);return l!==-1&&n.splice(l,1),n}const Wg=()=>{let e=[];return{push:l=>{const a=e[0];a&&l!==a&&a.pause(),e=wu(e,l),e.unshift(l)},remove:l=>{var a,s;e=wu(e,l),(s=(a=e[0])==null?void 0:a.resume)==null||s.call(a)}}},jg=(e,t=!1)=>{const n=document.activeElement;for(const l of e)if(al(l,t),document.activeElement!==n)return},ku=Wg(),Ug=()=>ys.value>ni.value,Ea=()=>{ti.value="pointer",ys.value=window.performance.now()},Su=()=>{ti.value="keyboard",ys.value=window.performance.now()},Yg=()=>(Xe(()=>{Sa===0&&(document.addEventListener("mousedown",Ea),document.addEventListener("touchstart",Ea),document.addEventListener("keydown",Su)),Sa++}),Nt(()=>{Sa--,Sa<=0&&(document.removeEventListener("mousedown",Ea),document.removeEventListener("touchstart",Ea),document.removeEventListener("keydown",Su))}),{focusReason:ti,lastUserFocusTimestamp:ys,lastAutomatedFocusTimestamp:ni}),_a=e=>new CustomEvent(Fg,{...xg,detail:e}),Ce={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"};let io=[];const Eu=e=>{e.code===Ce.esc&&io.forEach(t=>t(e))},qg=e=>{Xe(()=>{io.length===0&&document.addEventListener("keydown",Eu),bt&&io.push(e)}),Nt(()=>{io=io.filter(t=>t!==e),io.length===0&&bt&&document.removeEventListener("keydown",Eu)})},Gg=x({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[bu,yu,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=I();let l,a;const{focusReason:s}=Yg();qg(h=>{e.trapped&&!r.paused&&t("release-requested",h)});const r={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},i=h=>{if(!e.loop&&!e.trapped||r.paused)return;const{code:p,altKey:g,ctrlKey:b,metaKey:E,currentTarget:C,shiftKey:w}=h,{loop:k}=e,S=p===Ce.tab&&!g&&!b&&!E,$=document.activeElement;if(S&&$){const M=C,[R,N]=Hg(M);if(R&&N){if(!w&&$===N){const P=_a({focusReason:s.value});t("focusout-prevented",P),P.defaultPrevented||(h.preventDefault(),k&&al(R,!0))}else if(w&&[R,M].includes($)){const P=_a({focusReason:s.value});t("focusout-prevented",P),P.defaultPrevented||(h.preventDefault(),k&&al(N,!0))}}else if($===M){const P=_a({focusReason:s.value});t("focusout-prevented",P),P.defaultPrevented||h.preventDefault()}}};rt(ei,{focusTrapRef:n,onKeydown:i}),ie(()=>e.focusTrapEl,h=>{h&&(n.value=h)},{immediate:!0}),ie([n],([h],[p])=>{h&&(h.addEventListener("keydown",i),h.addEventListener("focusin",d),h.addEventListener("focusout",f)),p&&(p.removeEventListener("keydown",i),p.removeEventListener("focusin",d),p.removeEventListener("focusout",f))});const u=h=>{t(bu,h)},c=h=>t(yu,h),d=h=>{const p=o(n);if(!p)return;const g=h.target,b=h.relatedTarget,E=g&&p.contains(g);e.trapped||b&&p.contains(b)||(l=b),E&&t("focusin",h),!r.paused&&e.trapped&&(E?a=g:al(a,!0))},f=h=>{const p=o(n);if(!(r.paused||!p))if(e.trapped){const g=h.relatedTarget;!qt(g)&&!p.contains(g)&&setTimeout(()=>{if(!r.paused&&e.trapped){const b=_a({focusReason:s.value});t("focusout-prevented",b),b.defaultPrevented||al(a,!0)}},0)}else{const g=h.target;g&&p.contains(g)||t("focusout",h)}};async function m(){await Ee();const h=o(n);if(h){ku.push(r);const p=h.contains(document.activeElement)?l:document.activeElement;if(l=p,!h.contains(p)){const b=new Event(As,gu);h.addEventListener(As,u),h.dispatchEvent(b),b.defaultPrevented||Ee(()=>{let E=e.focusStartEl;Ve(E)||(al(E),document.activeElement!==E&&(E="first")),E==="first"&&jg(_d(h),!0),(document.activeElement===p||E==="container")&&al(h)})}}}function v(){const h=o(n);if(h){h.removeEventListener(As,u);const p=new CustomEvent(Fs,{...gu,detail:{focusReason:s.value}});h.addEventListener(Fs,c),h.dispatchEvent(p),!p.defaultPrevented&&(s.value=="keyboard"||!Ug()||h.contains(document.activeElement))&&al(l??document.body),h.removeEventListener(Fs,c),ku.remove(r)}}return Xe(()=>{e.trapped&&m(),ie(()=>e.trapped,h=>{h?m():v()})}),Nt(()=>{e.trapped&&v(),n.value&&(n.value.removeEventListener("keydown",i),n.value.removeEventListener("focusin",d),n.value.removeEventListener("focusout",f),n.value=void 0)}),{onKeydown:i}}});function Xg(e,t,n,l,a,s){return G(e.$slots,"default",{handleKeydown:e.onKeydown})}var Ro=fe(Gg,[["render",Xg],["__file","focus-trap.vue"]]);const Td=de({arrowOffset:{type:Number,default:5}}),Zg=["fixed","absolute"],Jg=de({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Y(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Xl,default:"bottom"},popperOptions:{type:Y(Object),default:()=>({})},strategy:{type:String,values:Zg,default:"absolute"}}),$d=de({...Jg,...Td,id:String,style:{type:Y([String,Array,Object])},className:{type:Y([String,Array,Object])},effect:{type:Y(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:Boolean,trapping:Boolean,popperClass:{type:Y([String,Array,Object])},popperStyle:{type:Y([String,Array,Object])},referenceEl:{type:Y(Object)},triggerTargetEl:{type:Y(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...cn(["ariaLabel"])}),Qg={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},eb=(e,t)=>{const n=I(!1),l=I();return{focusStartRef:l,trapped:n,onFocusAfterReleased:c=>{var d;((d=c.detail)==null?void 0:d.focusReason)!=="pointer"&&(l.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:c=>{e.visible&&!n.value&&(c.target&&(l.value=c.target),n.value=!0)},onFocusoutPrevented:c=>{e.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,t("close")}}},tb=(e,t=[])=>{const{placement:n,strategy:l,popperOptions:a}=e,s={placement:n,strategy:l,...a,modifiers:[...lb(e),...t]};return ob(s,a==null?void 0:a.modifiers),s},nb=e=>{if(bt)return ua(e)};function lb(e){const{offset:t,gpuAcceleration:n,fallbackPlacements:l}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:l}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function ob(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const ab=(e,t,n={})=>{const l={name:"updateState",enabled:!0,phase:"write",fn:({state:u})=>{const c=sb(u);Object.assign(r.value,c)},requires:["computeStyles"]},a=y(()=>{const{onFirstUpdate:u,placement:c,strategy:d,modifiers:f}=o(n);return{onFirstUpdate:u,placement:c||"bottom",strategy:d||"absolute",modifiers:[...f||[],l,{name:"applyStyles",enabled:!1}]}}),s=Lt(),r=I({styles:{popper:{position:o(a).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),i=()=>{s.value&&(s.value.destroy(),s.value=void 0)};return ie(a,u=>{const c=o(s);c&&c.setOptions(u)},{deep:!0}),ie([e,t],([u,c])=>{i(),!(!u||!c)&&(s.value=Up(u,c,o(a)))}),Nt(()=>{i()}),{state:y(()=>{var u;return{...((u=o(s))==null?void 0:u.state)||{}}}),styles:y(()=>o(r).styles),attributes:y(()=>o(r).attributes),update:()=>{var u;return(u=o(s))==null?void 0:u.update()},forceUpdate:()=>{var u;return(u=o(s))==null?void 0:u.forceUpdate()},instanceRef:y(()=>o(s))}};function sb(e){const t=Object.keys(e.elements),n=qo(t.map(a=>[a,e.styles[a]||{}])),l=qo(t.map(a=>[a,e.attributes[a]]));return{styles:n,attributes:l}}const rb=0,ib=e=>{const{popperInstanceRef:t,contentRef:n,triggerRef:l,role:a}=we(Qr,void 0),s=I(),r=y(()=>e.arrowOffset),i=y(()=>({name:"eventListeners",enabled:!!e.visible})),u=y(()=>{var b;const E=o(s),C=(b=o(r))!=null?b:rb;return{name:"arrow",enabled:!Yp(E),options:{element:E,padding:C}}}),c=y(()=>({onFirstUpdate:()=>{h()},...tb(e,[o(u),o(i)])})),d=y(()=>nb(e.referenceEl)||o(l)),{attributes:f,state:m,styles:v,update:h,forceUpdate:p,instanceRef:g}=ab(d,n,c);return ie(g,b=>t.value=b,{flush:"sync"}),Xe(()=>{ie(()=>{var b;return(b=o(d))==null?void 0:b.getBoundingClientRect()},()=>{h()})}),{attributes:f,arrowRef:s,contentRef:n,instanceRef:g,state:m,styles:v,role:a,forceUpdate:p,update:h}},ub=(e,{attributes:t,styles:n,role:l})=>{const{nextZIndex:a}=Mo(),s=ue("popper"),r=y(()=>o(t).popper),i=I(Te(e.zIndex)?e.zIndex:a()),u=y(()=>[s.b(),s.is("pure",e.pure),s.is(e.effect),e.popperClass]),c=y(()=>[{zIndex:o(i)},o(n).popper,e.popperStyle||{}]),d=y(()=>l.value==="dialog"?"false":void 0),f=y(()=>o(n).arrow||{});return{ariaModal:d,arrowStyle:f,contentAttrs:r,contentClass:u,contentStyle:c,contentZIndex:i,updateZIndex:()=>{i.value=Te(e.zIndex)?e.zIndex:a()}}},cb=x({name:"ElPopperContent"}),db=x({...cb,props:$d,emits:Qg,setup(e,{expose:t,emit:n}){const l=e,{focusStartRef:a,trapped:s,onFocusAfterReleased:r,onFocusAfterTrapped:i,onFocusInTrap:u,onFocusoutPrevented:c,onReleaseRequested:d}=eb(l,n),{attributes:f,arrowRef:m,contentRef:v,styles:h,instanceRef:p,role:g,update:b}=ib(l),{ariaModal:E,arrowStyle:C,contentAttrs:w,contentClass:k,contentStyle:S,updateZIndex:$}=ub(l,{styles:h,attributes:f,role:g}),M=we(el,void 0);rt(bd,{arrowStyle:C,arrowRef:m}),M&&rt(el,{...M,addInputId:Bt,removeInputId:Bt});let R;const N=(P=!0)=>{b(),P&&$()},O=()=>{N(!1),l.visible&&l.focusOnShow?s.value=!0:l.visible===!1&&(s.value=!1)};return Xe(()=>{ie(()=>l.triggerTargetEl,(P,W)=>{R==null||R(),R=void 0;const K=o(P||v.value),D=o(W||v.value);_n(K)&&(R=ie([g,()=>l.ariaLabel,E,()=>l.id],L=>{["role","aria-label","aria-modal","id"].forEach((z,B)=>{qt(L[B])?K.removeAttribute(z):K.setAttribute(z,L[B])})},{immediate:!0})),D!==K&&_n(D)&&["role","aria-label","aria-modal","id"].forEach(L=>{D.removeAttribute(L)})},{immediate:!0}),ie(()=>l.visible,O,{immediate:!0})}),Nt(()=>{R==null||R(),R=void 0}),t({popperContentRef:v,popperInstanceRef:p,updatePopper:N,contentStyle:S}),(P,W)=>(_(),V("div",et({ref_key:"contentRef",ref:v},o(w),{style:o(S),class:o(k),tabindex:"-1",onMouseenter:K=>P.$emit("mouseenter",K),onMouseleave:K=>P.$emit("mouseleave",K)}),[H(o(Ro),{trapped:o(s),"trap-on-focus-in":!0,"focus-trap-el":o(v),"focus-start-el":o(a),onFocusAfterTrapped:o(i),onFocusAfterReleased:o(r),onFocusin:o(u),onFocusoutPrevented:o(c),onReleaseRequested:o(d)},{default:U(()=>[G(P.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var fb=fe(db,[["__file","content.vue"]]);const Nd=He(Ig),Cs=Symbol("elTooltip"),ws=de({to:{type:Y([String,Object]),required:!0},disabled:Boolean}),Wt=de({...ad,...$d,appendTo:{type:ws.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:Y(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...cn(["ariaLabel"])}),mo=de({...wd,disabled:Boolean,trigger:{type:Y([String,Array]),default:"hover"},triggerKeys:{type:Y(Array),default:()=>[Ce.enter,Ce.numpadEnter,Ce.space]}}),vb=Un({type:Y(Boolean),default:null}),pb=Un({type:Y(Function)}),hb=e=>{const t=`update:${e}`,n=`onUpdate:${e}`,l=[t],a={[e]:vb,[n]:pb};return{useModelToggle:({indicator:r,toggleReason:i,shouldHideWhenRouteChanges:u,shouldProceed:c,onShow:d,onHide:f})=>{const m=lt(),{emit:v}=m,h=m.props,p=y(()=>Qe(h[n])),g=y(()=>h[e]===null),b=$=>{r.value!==!0&&(r.value=!0,i&&(i.value=$),Qe(d)&&d($))},E=$=>{r.value!==!1&&(r.value=!1,i&&(i.value=$),Qe(f)&&f($))},C=$=>{if(h.disabled===!0||Qe(c)&&!c())return;const M=p.value&&bt;M&&v(t,!0),(g.value||!M)&&b($)},w=$=>{if(h.disabled===!0||!bt)return;const M=p.value&&bt;M&&v(t,!1),(g.value||!M)&&E($)},k=$=>{_t($)&&(h.disabled&&$?p.value&&v(t,!1):r.value!==$&&($?b():E()))},S=()=>{r.value?w():C()};return ie(()=>h[e],k),u&&m.appContext.config.globalProperties.$route!==void 0&&ie(()=>({...m.proxy.$route}),()=>{u.value&&r.value&&w()}),Xe(()=>{k(h[e])}),{hide:w,show:C,toggle:S,hasUpdateHandler:p}},useModelToggleProps:a,useModelToggleEmits:l}},{useModelToggleProps:mb,useModelToggleEmits:gb,useModelToggle:bb}=hb("visible"),yb=de({...Cd,...mb,...Wt,...mo,...Td,showArrow:{type:Boolean,default:!0}}),Cb=[...gb,"before-show","before-hide","show","hide","open","close"],wb=(e,t)=>ke(e)?e.includes(t):e===t,lo=(e,t,n)=>l=>{wb(o(e),t)&&n(l)},Ht=(e,t,{checkForDefaultPrevented:n=!0}={})=>a=>{const s=e==null?void 0:e(a);if(n===!1||!s)return t==null?void 0:t(a)},_u=e=>t=>t.pointerType==="mouse"?e(t):void 0,kb=x({name:"ElTooltipTrigger"}),Sb=x({...kb,props:mo,setup(e,{expose:t}){const n=e,l=ue("tooltip"),{controlled:a,id:s,open:r,onOpen:i,onClose:u,onToggle:c}=we(Cs,void 0),d=I(null),f=()=>{if(o(a)||n.disabled)return!0},m=wt(n,"trigger"),v=Ht(f,lo(m,"hover",i)),h=Ht(f,lo(m,"hover",u)),p=Ht(f,lo(m,"click",w=>{w.button===0&&c(w)})),g=Ht(f,lo(m,"focus",i)),b=Ht(f,lo(m,"focus",u)),E=Ht(f,lo(m,"contextmenu",w=>{w.preventDefault(),c(w)})),C=Ht(f,w=>{const{code:k}=w;n.triggerKeys.includes(k)&&(w.preventDefault(),c(w))});return t({triggerRef:d}),(w,k)=>(_(),oe(o(Ag),{id:o(s),"virtual-ref":w.virtualRef,open:o(r),"virtual-triggering":w.virtualTriggering,class:T(o(l).e("trigger")),onBlur:o(b),onClick:o(p),onContextmenu:o(E),onFocus:o(g),onMouseenter:o(v),onMouseleave:o(h),onKeydown:o(C)},{default:U(()=>[G(w.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var Eb=fe(Sb,[["__file","trigger.vue"]]);const _b=x({__name:"teleport",props:ws,setup(e){return(t,n)=>t.disabled?G(t.$slots,"default",{key:0}):(_(),oe(Ip,{key:1,to:t.to},[G(t.$slots,"default")],8,["to"]))}});var Tb=fe(_b,[["__file","teleport.vue"]]);const Po=He(Tb),Id=()=>{const e=Kr(),t=Zr(),n=y(()=>`${e.value}-popper-container-${t.prefix}`),l=y(()=>`#${n.value}`);return{id:n,selector:l}},$b=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},Nb=()=>{const{id:e,selector:t}=Id();return xr(()=>{bt&&(document.body.querySelector(t.value)||$b(e.value))}),{id:e,selector:t}},Ib=x({name:"ElTooltipContent",inheritAttrs:!1}),Mb=x({...Ib,props:Wt,setup(e,{expose:t}){const n=e,{selector:l}=Id(),a=ue("tooltip"),s=I(),r=Ha(()=>{var B;return(B=s.value)==null?void 0:B.popperContentRef});let i;const{controlled:u,id:c,open:d,trigger:f,onClose:m,onOpen:v,onShow:h,onHide:p,onBeforeShow:g,onBeforeHide:b}=we(Cs,void 0),E=y(()=>n.transition||`${a.namespace.value}-fade-in-linear`),C=y(()=>n.persistent);Nt(()=>{i==null||i()});const w=y(()=>o(C)?!0:o(d)),k=y(()=>n.disabled?!1:o(d)),S=y(()=>n.appendTo||l.value),$=y(()=>{var B;return(B=n.style)!=null?B:{}}),M=I(!0),R=()=>{p(),z()&&al(document.body),M.value=!0},N=()=>{if(o(u))return!0},O=Ht(N,()=>{n.enterable&&o(f)==="hover"&&v()}),P=Ht(N,()=>{o(f)==="hover"&&m()}),W=()=>{var B,A;(A=(B=s.value)==null?void 0:B.updatePopper)==null||A.call(B),g==null||g()},K=()=>{b==null||b()},D=()=>{h()},L=()=>{n.virtualTriggering||m()},z=B=>{var A;const ne=(A=s.value)==null?void 0:A.popperContentRef,j=(B==null?void 0:B.relatedTarget)||document.activeElement;return ne==null?void 0:ne.contains(j)};return ie(()=>o(d),B=>{B?(M.value=!1,i=zr(r,()=>{if(o(u))return;o(f)!=="hover"&&m()})):i==null||i()},{flush:"post"}),ie(()=>n.content,()=>{var B,A;(A=(B=s.value)==null?void 0:B.updatePopper)==null||A.call(B)}),t({contentRef:s,isFocusInsideContent:z}),(B,A)=>(_(),oe(o(Po),{disabled:!B.teleported,to:o(S)},{default:U(()=>[H(an,{name:o(E),onAfterLeave:R,onBeforeEnter:W,onAfterEnter:D,onBeforeLeave:K},{default:U(()=>[o(w)?We((_(),oe(o(fb),et({key:0,id:o(c),ref_key:"contentRef",ref:s},B.$attrs,{"aria-label":B.ariaLabel,"aria-hidden":M.value,"boundaries-padding":B.boundariesPadding,"fallback-placements":B.fallbackPlacements,"gpu-acceleration":B.gpuAcceleration,offset:B.offset,placement:B.placement,"popper-options":B.popperOptions,"arrow-offset":B.arrowOffset,strategy:B.strategy,effect:B.effect,enterable:B.enterable,pure:B.pure,"popper-class":B.popperClass,"popper-style":[B.popperStyle,o($)],"reference-el":B.referenceEl,"trigger-target-el":B.triggerTargetEl,visible:o(k),"z-index":B.zIndex,onMouseenter:o(O),onMouseleave:o(P),onBlur:L,onClose:o(m)}),{default:U(()=>[G(B.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","arrow-offset","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[mt,o(k)]]):J("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var Rb=fe(Mb,[["__file","content.vue"]]);const Pb=x({name:"ElTooltip"}),Ob=x({...Pb,props:yb,emits:Cb,setup(e,{expose:t,emit:n}){const l=e;Nb();const a=ue("tooltip"),s=sn(),r=I(),i=I(),u=()=>{var C;const w=o(r);w&&((C=w.popperInstanceRef)==null||C.update())},c=I(!1),d=I(),{show:f,hide:m,hasUpdateHandler:v}=bb({indicator:c,toggleReason:d}),{onOpen:h,onClose:p}=sd({showAfter:wt(l,"showAfter"),hideAfter:wt(l,"hideAfter"),autoClose:wt(l,"autoClose"),open:f,close:m}),g=y(()=>_t(l.visible)&&!v.value),b=y(()=>[a.b(),l.popperClass]);rt(Cs,{controlled:g,id:s,open:Ic(c),trigger:wt(l,"trigger"),onOpen:C=>{h(C)},onClose:C=>{p(C)},onToggle:C=>{o(c)?p(C):h(C)},onShow:()=>{n("show",d.value)},onHide:()=>{n("hide",d.value)},onBeforeShow:()=>{n("before-show",d.value)},onBeforeHide:()=>{n("before-hide",d.value)},updatePopper:u}),ie(()=>l.disabled,C=>{C&&c.value&&(c.value=!1)});const E=C=>{var w;return(w=i.value)==null?void 0:w.isFocusInsideContent(C)};return Mp(()=>c.value&&m()),t({popperRef:r,contentRef:i,isFocusInsideContent:E,updatePopper:u,onOpen:h,onClose:p,hide:m}),(C,w)=>(_(),oe(o(Nd),{ref_key:"popperRef",ref:r,role:C.role},{default:U(()=>[H(Eb,{disabled:C.disabled,trigger:C.trigger,"trigger-keys":C.triggerKeys,"virtual-ref":C.virtualRef,"virtual-triggering":C.virtualTriggering},{default:U(()=>[C.$slots.default?G(C.$slots,"default",{key:0}):J("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),H(Rb,{ref_key:"contentRef",ref:i,"aria-label":C.ariaLabel,"boundaries-padding":C.boundariesPadding,content:C.content,disabled:C.disabled,effect:C.effect,enterable:C.enterable,"fallback-placements":C.fallbackPlacements,"hide-after":C.hideAfter,"gpu-acceleration":C.gpuAcceleration,offset:C.offset,persistent:C.persistent,"popper-class":o(b),"popper-style":C.popperStyle,placement:C.placement,"popper-options":C.popperOptions,"arrow-offset":C.arrowOffset,pure:C.pure,"raw-content":C.rawContent,"reference-el":C.referenceEl,"trigger-target-el":C.triggerTargetEl,"show-after":C.showAfter,strategy:C.strategy,teleported:C.teleported,transition:C.transition,"virtual-triggering":C.virtualTriggering,"z-index":C.zIndex,"append-to":C.appendTo},{default:U(()=>[G(C.$slots,"content",{},()=>[C.rawContent?(_(),V("span",{key:0,innerHTML:C.content},null,8,["innerHTML"])):(_(),V("span",{key:1},pe(C.content),1))]),C.showArrow?(_(),oe(o(Pg),{key:0})):J("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","arrow-offset","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var Lb=fe(Ob,[["__file","tooltip.vue"]]);const un=He(Lb),Bb=de({...pa,valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:Y(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:Y([Function,Array]),default:Bt},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:Boolean,hideLoading:Boolean,teleported:Wt.teleported,appendTo:Wt.appendTo,highlightFirstItem:Boolean,fitInputWidth:Boolean}),Vb={[De]:e=>Ve(e),[Zt]:e=>Ve(e),[nt]:e=>Ve(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,select:e=>yt(e)},Md="ElAutocomplete",Db=x({name:Md,inheritAttrs:!1}),Ab=x({...Db,props:Bb,emits:Vb,setup(e,{expose:t,emit:n}){const l=e,a=y(()=>An(l,Object.keys(pa))),s=pl(),r=fn(),i=ue("autocomplete"),u=I(),c=I(),d=I(),f=I();let m=!1,v=!1;const h=I([]),p=I(-1),g=I(""),b=I(!1),E=I(!1),C=I(!1),w=sn(),k=y(()=>s.style),S=y(()=>(h.value.length>0||C.value)&&b.value),$=y(()=>!l.hideLoading&&C.value),M=y(()=>u.value?Array.from(u.value.$el.querySelectorAll("input")):[]),R=()=>{S.value&&(g.value=`${u.value.$el.offsetWidth}px`)},N=()=>{p.value=-1},O=async le=>{if(E.value)return;const se=ge=>{C.value=!1,!E.value&&(ke(ge)?(h.value=ge,p.value=l.highlightFirstItem?0:-1):jt(Md,"autocomplete suggestions must be an array"))};if(C.value=!0,ke(l.fetchSuggestions))se(l.fetchSuggestions);else{const ge=await l.fetchSuggestions(le,se);ke(ge)&&se(ge)}},P=Ln(O,l.debounce),W=le=>{const se=!!le;if(n(Zt,le),n(De,le),E.value=!1,b.value||(b.value=se),!l.triggerOnFocus&&!le){E.value=!0,h.value=[];return}P(le)},K=le=>{var se;r.value||(((se=le.target)==null?void 0:se.tagName)!=="INPUT"||M.value.includes(document.activeElement))&&(b.value=!0)},D=le=>{n(nt,le)},L=le=>{var se;if(v)v=!1;else{b.value=!0,n("focus",le);const ge=(se=l.modelValue)!=null?se:"";l.triggerOnFocus&&!m&&P(String(ge))}},z=le=>{setTimeout(()=>{var se;if((se=d.value)!=null&&se.isFocusInsideContent()){v=!0;return}b.value&&j(),n("blur",le)})},B=()=>{b.value=!1,n(De,""),n("clear")},A=async()=>{S.value&&p.value>=0&&p.value{S.value&&(le.preventDefault(),le.stopPropagation(),j())},j=()=>{b.value=!1},Q=()=>{var le;(le=u.value)==null||le.focus()},Z=()=>{var le;(le=u.value)==null||le.blur()},ee=async le=>{n(Zt,le[l.valueKey]),n(De,le[l.valueKey]),n("select",le),h.value=[],p.value=-1},ae=le=>{if(!S.value||C.value)return;if(le<0){p.value=-1;return}le>=h.value.length&&(le=h.value.length-1);const se=c.value.querySelector(`.${i.be("suggestion","wrap")}`),Be=se.querySelectorAll(`.${i.be("suggestion","list")} li`)[le],te=se.scrollTop,{offsetTop:ce,scrollHeight:Ie}=Be;ce+Ie>te+se.clientHeight&&(se.scrollTop+=Ie),ce{var le;(le=d.value)!=null&&le.isFocusInsideContent()||S.value&&j()});return Nt(()=>{re==null||re()}),Xe(()=>{u.value.ref.setAttribute("role","textbox"),u.value.ref.setAttribute("aria-autocomplete","list"),u.value.ref.setAttribute("aria-controls","id"),u.value.ref.setAttribute("aria-activedescendant",`${w.value}-item-${p.value}`),m=u.value.ref.hasAttribute("readonly")}),t({highlightedIndex:p,activated:b,loading:C,inputRef:u,popperRef:d,suggestions:h,handleSelect:ee,handleKeyEnter:A,focus:Q,blur:Z,close:j,highlight:ae,getData:O}),(le,se)=>(_(),oe(o(un),{ref_key:"popperRef",ref:d,visible:o(S),placement:le.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[o(i).e("popper"),le.popperClass],teleported:le.teleported,"append-to":le.appendTo,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${o(i).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:R,onHide:N},{content:U(()=>[F("div",{ref_key:"regionRef",ref:c,class:T([o(i).b("suggestion"),o(i).is("loading",o($))]),style:_e({[le.fitInputWidth?"width":"minWidth"]:g.value,outline:"none"}),role:"region"},[H(o(jn),{id:o(w),tag:"ul","wrap-class":o(i).be("suggestion","wrap"),"view-class":o(i).be("suggestion","list"),role:"listbox"},{default:U(()=>[o($)?(_(),V("li",{key:0},[G(le.$slots,"loading",{},()=>[H(o(Se),{class:T(o(i).is("loading"))},{default:U(()=>[H(o(Qn))]),_:1},8,["class"])])])):(_(!0),V(Oe,{key:1},ut(h.value,(ge,Be)=>(_(),V("li",{id:`${o(w)}-item-${Be}`,key:Be,class:T({highlighted:p.value===Be}),role:"option","aria-selected":p.value===Be,onClick:te=>ee(ge)},[G(le.$slots,"default",{item:ge},()=>[st(pe(ge[le.valueKey]),1)])],10,["id","aria-selected","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class"])],6)]),default:U(()=>[F("div",{ref_key:"listboxRef",ref:f,class:T([o(i).b(),le.$attrs.class]),style:_e(o(k)),role:"combobox","aria-haspopup":"listbox","aria-expanded":o(S),"aria-owns":o(w)},[H(o(hn),et({ref_key:"inputRef",ref:u},et(o(a),le.$attrs),{"model-value":le.modelValue,disabled:o(r),onInput:W,onChange:D,onFocus:L,onBlur:z,onClear:B,onKeydown:[Tt(Le(ge=>ae(p.value-1),["prevent"]),["up"]),Tt(Le(ge=>ae(p.value+1),["prevent"]),["down"]),Tt(A,["enter"]),Tt(j,["tab"]),Tt(ne,["esc"])],onMousedown:K}),Mn({_:2},[le.$slots.prepend?{name:"prepend",fn:U(()=>[G(le.$slots,"prepend")])}:void 0,le.$slots.append?{name:"append",fn:U(()=>[G(le.$slots,"append")])}:void 0,le.$slots.prefix?{name:"prefix",fn:U(()=>[G(le.$slots,"prefix")])}:void 0,le.$slots.suffix?{name:"suffix",fn:U(()=>[G(le.$slots,"suffix")])}:void 0]),1040,["model-value","disabled","onKeydown"])],14,["aria-expanded","aria-owns"])]),_:3},8,["visible","placement","popper-class","teleported","append-to","transition"]))}});var Fb=fe(Ab,[["__file","autocomplete.vue"]]);const xb=He(Fb),zb=de({size:{type:[Number,String],values:tl,default:"",validator:e=>Te(e)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:$t},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:Y(String),default:"cover"}}),Hb={error:e=>e instanceof Event},Kb=x({name:"ElAvatar"}),Wb=x({...Kb,props:zb,emits:Hb,setup(e,{emit:t}){const n=e,l=ue("avatar"),a=I(!1),s=y(()=>{const{size:c,icon:d,shape:f}=n,m=[l.b()];return Ve(c)&&m.push(l.m(c)),d&&m.push(l.m("icon")),f&&m.push(l.m(f)),m}),r=y(()=>{const{size:c}=n;return Te(c)?l.cssVarBlock({size:zt(c)||""}):void 0}),i=y(()=>({objectFit:n.fit}));ie(()=>n.src,()=>a.value=!1);function u(c){a.value=!0,t("error",c)}return(c,d)=>(_(),V("span",{class:T(o(s)),style:_e(o(r))},[(c.src||c.srcSet)&&!a.value?(_(),V("img",{key:0,src:c.src,alt:c.alt,srcset:c.srcSet,style:_e(o(i)),onError:u},null,44,["src","alt","srcset"])):c.icon?(_(),oe(o(Se),{key:1},{default:U(()=>[(_(),oe(Ge(c.icon)))]),_:1})):G(c.$slots,"default",{key:2})],6))}});var jb=fe(Wb,[["__file","avatar.vue"]]);const Ub=He(jb),Yb={visibilityHeight:{type:Number,default:200},target:{type:String,default:""},right:{type:Number,default:40},bottom:{type:Number,default:40}},qb={click:e=>e instanceof MouseEvent},Gb=(e,t,n)=>{const l=Lt(),a=Lt(),s=I(!1),r=()=>{l.value&&(s.value=l.value.scrollTop>=e.visibilityHeight)},i=c=>{var d;(d=l.value)==null||d.scrollTo({top:0,behavior:"smooth"}),t("click",c)},u=Mc(r,300,!0);return xt(a,"scroll",u),Xe(()=>{var c;a.value=document,l.value=document.documentElement,e.target&&(l.value=(c=document.querySelector(e.target))!=null?c:void 0,l.value||jt(n,`target does not exist: ${e.target}`),a.value=l.value),r()}),{visible:s,handleClick:i}},Rd="ElBacktop",Xb=x({name:Rd}),Zb=x({...Xb,props:Yb,emits:qb,setup(e,{emit:t}){const n=e,l=ue("backtop"),{handleClick:a,visible:s}=Gb(n,t,Rd),r=y(()=>({right:`${n.right}px`,bottom:`${n.bottom}px`}));return(i,u)=>(_(),oe(an,{name:`${o(l).namespace.value}-fade-in`},{default:U(()=>[o(s)?(_(),V("div",{key:0,style:_e(o(r)),class:T(o(l).b()),onClick:Le(o(a),["stop"])},[G(i.$slots,"default",{},()=>[H(o(Se),{class:T(o(l).e("icon"))},{default:U(()=>[H(o(Yh))]),_:1},8,["class"])])],14,["onClick"])):J("v-if",!0)]),_:3},8,["name"]))}});var Jb=fe(Zb,[["__file","backtop.vue"]]);const Qb=He(Jb),e0=de({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:Y([String,Object,Array])},offset:{type:Y(Array),default:[0,0]},badgeClass:{type:String}}),t0=x({name:"ElBadge"}),n0=x({...t0,props:e0,setup(e,{expose:t}){const n=e,l=ue("badge"),a=y(()=>n.isDot?"":Te(n.value)&&Te(n.max)?n.max{var r,i,u,c,d;return[{backgroundColor:n.color,marginRight:zt(-((i=(r=n.offset)==null?void 0:r[0])!=null?i:0)),marginTop:zt((c=(u=n.offset)==null?void 0:u[1])!=null?c:0)},(d=n.badgeStyle)!=null?d:{}]});return t({content:a}),(r,i)=>(_(),V("div",{class:T(o(l).b())},[G(r.$slots,"default"),H(an,{name:`${o(l).namespace.value}-zoom-in-center`,persisted:""},{default:U(()=>[We(F("sup",{class:T([o(l).e("content"),o(l).em("content",r.type),o(l).is("fixed",!!r.$slots.default),o(l).is("dot",r.isDot),o(l).is("hide-zero",!r.showZero&&n.value===0),r.badgeClass]),style:_e(o(s))},[G(r.$slots,"content",{value:o(a)},()=>[st(pe(o(a)),1)])],6),[[mt,!r.hidden&&(o(a)||r.isDot||r.$slots.content)]])]),_:3},8,["name"])],2))}});var l0=fe(n0,[["__file","badge.vue"]]);const Pd=He(l0),Od=Symbol("breadcrumbKey"),o0=de({separator:{type:String,default:"/"},separatorIcon:{type:$t}}),a0=x({name:"ElBreadcrumb"}),s0=x({...a0,props:o0,setup(e){const t=e,{t:n}=pt(),l=ue("breadcrumb"),a=I();return rt(Od,t),Xe(()=>{const s=a.value.querySelectorAll(`.${l.e("item")}`);s.length&&s[s.length-1].setAttribute("aria-current","page")}),(s,r)=>(_(),V("div",{ref_key:"breadcrumb",ref:a,class:T(o(l).b()),"aria-label":o(n)("el.breadcrumb.label"),role:"navigation"},[G(s.$slots,"default")],10,["aria-label"]))}});var r0=fe(s0,[["__file","breadcrumb.vue"]]);const i0=de({to:{type:Y([String,Object]),default:""},replace:Boolean}),u0=x({name:"ElBreadcrumbItem"}),c0=x({...u0,props:i0,setup(e){const t=e,n=lt(),l=we(Od,void 0),a=ue("breadcrumb"),s=n.appContext.config.globalProperties.$router,r=I(),i=()=>{!t.to||!s||(t.replace?s.replace(t.to):s.push(t.to))};return(u,c)=>{var d,f;return _(),V("span",{class:T(o(a).e("item"))},[F("span",{ref_key:"link",ref:r,class:T([o(a).e("inner"),o(a).is("link",!!u.to)]),role:"link",onClick:i},[G(u.$slots,"default")],2),(d=o(l))!=null&&d.separatorIcon?(_(),oe(o(Se),{key:0,class:T(o(a).e("separator"))},{default:U(()=>[(_(),oe(Ge(o(l).separatorIcon)))]),_:1},8,["class"])):(_(),V("span",{key:1,class:T(o(a).e("separator")),role:"presentation"},pe((f=o(l))==null?void 0:f.separator),3))],2)}}});var Ld=fe(c0,[["__file","breadcrumb-item.vue"]]);const d0=He(r0,{BreadcrumbItem:Ld}),f0=At(Ld),Bd=Symbol("buttonGroupContextKey"),ul=({from:e,replacement:t,scope:n,version:l,ref:a,type:s="API"},r)=>{ie(()=>o(r),i=>{},{immediate:!0})},v0=(e,t)=>{ul({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},y(()=>e.type==="text"));const n=we(Bd,void 0),l=fa("button"),{form:a}=dn(),s=Gt(y(()=>n==null?void 0:n.size)),r=fn(),i=I(),u=Xt(),c=y(()=>{var g;return e.type||(n==null?void 0:n.type)||((g=l.value)==null?void 0:g.type)||""}),d=y(()=>{var g,b,E;return(E=(b=e.autoInsertSpace)!=null?b:(g=l.value)==null?void 0:g.autoInsertSpace)!=null?E:!1}),f=y(()=>{var g,b,E;return(E=(b=e.plain)!=null?b:(g=l.value)==null?void 0:g.plain)!=null?E:!1}),m=y(()=>{var g,b,E;return(E=(b=e.round)!=null?b:(g=l.value)==null?void 0:g.round)!=null?E:!1}),v=y(()=>e.tag==="button"?{ariaDisabled:r.value||e.loading,disabled:r.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),h=y(()=>{var g;const b=(g=u.default)==null?void 0:g.call(u);if(d.value&&(b==null?void 0:b.length)===1){const E=b[0];if((E==null?void 0:E.type)===Nc){const C=E.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(C.trim())}}return!1});return{_disabled:r,_size:s,_type:c,_ref:i,_props:v,_plain:f,_round:m,shouldAddSpace:h,handleClick:g=>{if(r.value||e.loading){g.stopPropagation();return}e.nativeType==="reset"&&(a==null||a.resetFields()),t("click",g)}}},or=["default","primary","success","warning","info","danger","text",""],p0=["button","submit","reset"],ar=de({size:Jt,disabled:Boolean,type:{type:String,values:or,default:""},icon:{type:$t},nativeType:{type:String,values:p0,default:"button"},loading:Boolean,loadingIcon:{type:$t,default:()=>Qn},plain:{type:Boolean,default:void 0},text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Y([String,Object]),default:"button"}}),h0={click:e=>e instanceof MouseEvent};function kl(e,t=20){return e.mix("#141414",t).toString()}function m0(e){const t=fn(),n=ue("button");return y(()=>{let l={},a=e.color;if(a){const s=a.match(/var\((.*?)\)/);s&&(a=window.getComputedStyle(window.document.documentElement).getPropertyValue(s[1]));const r=new vo(a),i=e.dark?r.tint(20).toString():kl(r,20);if(e.plain)l=n.cssVarBlock({"bg-color":e.dark?kl(r,90):r.tint(90).toString(),"text-color":a,"border-color":e.dark?kl(r,50):r.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":a,"hover-border-color":a,"active-bg-color":i,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":i}),t.value&&(l[n.cssVarBlockName("disabled-bg-color")]=e.dark?kl(r,90):r.tint(90).toString(),l[n.cssVarBlockName("disabled-text-color")]=e.dark?kl(r,50):r.tint(50).toString(),l[n.cssVarBlockName("disabled-border-color")]=e.dark?kl(r,80):r.tint(80).toString());else{const u=e.dark?kl(r,30):r.tint(30).toString(),c=r.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(l=n.cssVarBlock({"bg-color":a,"text-color":c,"border-color":a,"hover-bg-color":u,"hover-text-color":c,"hover-border-color":u,"active-bg-color":i,"active-border-color":i}),t.value){const d=e.dark?kl(r,50):r.tint(50).toString();l[n.cssVarBlockName("disabled-bg-color")]=d,l[n.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,l[n.cssVarBlockName("disabled-border-color")]=d}}}return l})}const g0=x({name:"ElButton"}),b0=x({...g0,props:ar,emits:h0,setup(e,{expose:t,emit:n}){const l=e,a=m0(l),s=ue("button"),{_ref:r,_size:i,_type:u,_disabled:c,_props:d,_plain:f,_round:m,shouldAddSpace:v,handleClick:h}=v0(l,n),p=y(()=>[s.b(),s.m(u.value),s.m(i.value),s.is("disabled",c.value),s.is("loading",l.loading),s.is("plain",f.value),s.is("round",m.value),s.is("circle",l.circle),s.is("text",l.text),s.is("link",l.link),s.is("has-bg",l.bg)]);return t({ref:r,size:i,type:u,disabled:c,shouldAddSpace:v}),(g,b)=>(_(),oe(Ge(g.tag),et({ref_key:"_ref",ref:r},o(d),{class:o(p),style:o(a),onClick:o(h)}),{default:U(()=>[g.loading?(_(),V(Oe,{key:0},[g.$slots.loading?G(g.$slots,"loading",{key:0}):(_(),oe(o(Se),{key:1,class:T(o(s).is("loading"))},{default:U(()=>[(_(),oe(Ge(g.loadingIcon)))]),_:1},8,["class"]))],64)):g.icon||g.$slots.icon?(_(),oe(o(Se),{key:1},{default:U(()=>[g.icon?(_(),oe(Ge(g.icon),{key:0})):G(g.$slots,"icon",{key:1})]),_:3})):J("v-if",!0),g.$slots.default?(_(),V("span",{key:2,class:T({[o(s).em("text","expand")]:o(v)})},[G(g.$slots,"default")],2)):J("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var y0=fe(b0,[["__file","button.vue"]]);const C0={size:ar.size,type:ar.type},w0=x({name:"ElButtonGroup"}),k0=x({...w0,props:C0,setup(e){const t=e;rt(Bd,kt({size:wt(t,"size"),type:wt(t,"type")}));const n=ue("button");return(l,a)=>(_(),V("div",{class:T(o(n).b("group"))},[G(l.$slots,"default")],2))}});var Vd=fe(k0,[["__file","button-group.vue"]]);const on=He(y0,{ButtonGroup:Vd}),Dd=At(Vd),xs=(e,t)=>[e>0?e-1:void 0,e,eArray.from(Array.from({length:e}).keys()),Ad=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),Fd=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),Tu=function(e,t){const n=wo(e),l=wo(t);return n&&l?e.getTime()===t.getTime():!n&&!l?e===t:!1},$u=function(e,t){const n=ke(e),l=ke(t);return n&&l?e.length!==t.length?!1:e.every((a,s)=>Tu(a,t[s])):!n&&!l?Tu(e,t):!1},Nu=function(e,t,n){const l=Pn(t)||t==="x"?Ke(e).locale(n):Ke(e,t).locale(n);return l.isValid()?l:void 0},Iu=function(e,t,n){return Pn(t)?e:t==="x"?+e:Ke(e).locale(n).format(t)},zs=(e,t)=>{var n;const l=[],a=t==null?void 0:t();for(let s=0;ske(e)?e.map(t=>t.toDate()):e.toDate(),S0=(e,t)=>{const n=e.subtract(1,"month").endOf("month").date();return Nl(t).map((l,a)=>n-(t-a-1))},E0=e=>{const t=e.daysInMonth();return Nl(t).map((n,l)=>l+1)},_0=e=>Nl(e.length/7).map(t=>{const n=t*7;return e.slice(n,n+7)}),T0=de({selectedDay:{type:Y(Object)},range:{type:Y(Array)},date:{type:Y(Object),required:!0},hideHeader:{type:Boolean}}),$0={pick:e=>yt(e)},N0=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],Hs=["sun","mon","tue","wed","thu","fri","sat"],I0=(e,t)=>{Ke.extend(Vc);const n=Ke.localeData().firstDayOfWeek(),{t:l,lang:a}=pt(),s=Ke().locale(a.value),r=y(()=>!!e.range&&!!e.range.length),i=y(()=>{let m=[];if(r.value){const[v,h]=e.range,p=Nl(h.date()-v.date()+1).map(E=>({text:v.date()+E,type:"current"}));let g=p.length%7;g=g===0?0:7-g;const b=Nl(g).map((E,C)=>({text:C+1,type:"next"}));m=p.concat(b)}else{const v=e.date.startOf("month").day(),h=S0(e.date,(v-n+7)%7).map(E=>({text:E,type:"prev"})),p=E0(e.date).map(E=>({text:E,type:"current"}));m=[...h,...p];const g=7-(m.length%7||7),b=Nl(g).map((E,C)=>({text:C+1,type:"next"}));m=m.concat(b)}return _0(m)}),u=y(()=>{const m=n;return m===0?Hs.map(v=>l(`el.datepicker.weeks.${v}`)):Hs.slice(m).concat(Hs.slice(0,m)).map(v=>l(`el.datepicker.weeks.${v}`))}),c=(m,v)=>{switch(v){case"prev":return e.date.startOf("month").subtract(1,"month").date(m);case"next":return e.date.startOf("month").add(1,"month").date(m);case"current":return e.date.date(m)}};return{now:s,isInRange:r,rows:i,weekDays:u,getFormattedDate:c,handlePickDay:({text:m,type:v})=>{const h=c(m,v);t("pick",h)},getSlotData:({text:m,type:v})=>{const h=c(m,v);return{isSelected:h.isSame(e.selectedDay),type:`${v}-month`,day:h.format("YYYY-MM-DD"),date:h.toDate()}}}},M0=x({name:"DateTable"}),R0=x({...M0,props:T0,emits:$0,setup(e,{expose:t,emit:n}){const l=e,{isInRange:a,now:s,rows:r,weekDays:i,getFormattedDate:u,handlePickDay:c,getSlotData:d}=I0(l,n),f=ue("calendar-table"),m=ue("calendar-day"),v=({text:h,type:p})=>{const g=[p];if(p==="current"){const b=u(h,p);b.isSame(l.selectedDay,"day")&&g.push(m.is("selected")),b.isSame(s,"day")&&g.push(m.is("today"))}return g};return t({getFormattedDate:u}),(h,p)=>(_(),V("table",{class:T([o(f).b(),o(f).is("range",o(a))]),cellspacing:"0",cellpadding:"0"},[h.hideHeader?J("v-if",!0):(_(),V("thead",{key:0},[F("tr",null,[(_(!0),V(Oe,null,ut(o(i),g=>(_(),V("th",{key:g,scope:"col"},pe(g),1))),128))])])),F("tbody",null,[(_(!0),V(Oe,null,ut(o(r),(g,b)=>(_(),V("tr",{key:b,class:T({[o(f).e("row")]:!0,[o(f).em("row","hide-border")]:b===0&&h.hideHeader})},[(_(!0),V(Oe,null,ut(g,(E,C)=>(_(),V("td",{key:C,class:T(v(E)),onClick:w=>o(c)(E)},[F("div",{class:T(o(m).b())},[G(h.$slots,"date-cell",{data:o(d)(E)},()=>[F("span",null,pe(E.text),1)])],2)],10,["onClick"]))),128))],2))),128))])],2))}});var Mu=fe(R0,[["__file","date-table.vue"]]);const P0=(e,t)=>{const n=e.endOf("month"),l=t.startOf("month"),s=n.isSame(l,"week")?l.add(1,"week"):l;return[[e,n],[s.startOf("week"),t]]},O0=(e,t)=>{const n=e.endOf("month"),l=e.add(1,"month").startOf("month"),a=n.isSame(l,"week")?l.add(1,"week"):l,s=a.endOf("month"),r=t.startOf("month"),i=s.isSame(r,"week")?r.add(1,"week"):r;return[[e,n],[a.startOf("week"),s],[i.startOf("week"),t]]},L0=(e,t,n)=>{const{lang:l}=pt(),a=I(),s=Ke().locale(l.value),r=y({get(){return e.modelValue?u.value:a.value},set(g){if(!g)return;a.value=g;const b=g.toDate();t(Zt,b),t(De,b)}}),i=y(()=>{if(!e.range||!ke(e.range)||e.range.length!==2||e.range.some(C=>!wo(C)))return[];const g=e.range.map(C=>Ke(C).locale(l.value)),[b,E]=g;return b.isAfter(E)?[]:b.isSame(E,"month")?v(b,E):b.add(1,"month").month()!==E.month()?[]:v(b,E)}),u=y(()=>e.modelValue?Ke(e.modelValue).locale(l.value):r.value||(i.value.length?i.value[0][0]:s)),c=y(()=>u.value.subtract(1,"month").date(1)),d=y(()=>u.value.add(1,"month").date(1)),f=y(()=>u.value.subtract(1,"year").date(1)),m=y(()=>u.value.add(1,"year").date(1)),v=(g,b)=>{const E=g.startOf("week"),C=b.endOf("week"),w=E.get("month"),k=C.get("month");return w===k?[[E,C]]:(w+1)%12===k?P0(E,C):w+2===k||(w+1)%11===k?O0(E,C):[]},h=g=>{r.value=g};return{calculateValidatedDateRange:v,date:u,realSelectedDay:r,pickDay:h,selectDate:g=>{const E={"prev-month":c.value,"next-month":d.value,"prev-year":f.value,"next-year":m.value,today:s}[g];E.isSame(u.value,"day")||h(E)},validatedRange:i}},B0=e=>ke(e)&&e.length===2&&e.every(t=>wo(t)),V0=de({modelValue:{type:Date},range:{type:Y(Array),validator:B0}}),D0={[De]:e=>wo(e),[Zt]:e=>wo(e)},A0="ElCalendar",F0=x({name:A0}),x0=x({...F0,props:V0,emits:D0,setup(e,{expose:t,emit:n}){const l=e,a=ue("calendar"),{calculateValidatedDateRange:s,date:r,pickDay:i,realSelectedDay:u,selectDate:c,validatedRange:d}=L0(l,n),{t:f}=pt(),m=y(()=>{const v=`el.datepicker.month${r.value.format("M")}`;return`${r.value.year()} ${f("el.datepicker.year")} ${f(v)}`});return t({selectedDay:u,pickDay:i,selectDate:c,calculateValidatedDateRange:s}),(v,h)=>(_(),V("div",{class:T(o(a).b())},[F("div",{class:T(o(a).e("header"))},[G(v.$slots,"header",{date:o(m)},()=>[F("div",{class:T(o(a).e("title"))},pe(o(m)),3),o(d).length===0?(_(),V("div",{key:0,class:T(o(a).e("button-group"))},[H(o(Dd),null,{default:U(()=>[H(o(on),{size:"small",onClick:p=>o(c)("prev-month")},{default:U(()=>[st(pe(o(f)("el.datepicker.prevMonth")),1)]),_:1},8,["onClick"]),H(o(on),{size:"small",onClick:p=>o(c)("today")},{default:U(()=>[st(pe(o(f)("el.datepicker.today")),1)]),_:1},8,["onClick"]),H(o(on),{size:"small",onClick:p=>o(c)("next-month")},{default:U(()=>[st(pe(o(f)("el.datepicker.nextMonth")),1)]),_:1},8,["onClick"])]),_:1})],2)):J("v-if",!0)])],2),o(d).length===0?(_(),V("div",{key:0,class:T(o(a).e("body"))},[H(Mu,{date:o(r),"selected-day":o(u),onPick:o(i)},Mn({_:2},[v.$slots["date-cell"]?{name:"date-cell",fn:U(p=>[G(v.$slots,"date-cell",On(cl(p)))])}:void 0]),1032,["date","selected-day","onPick"])],2)):(_(),V("div",{key:1,class:T(o(a).e("body"))},[(_(!0),V(Oe,null,ut(o(d),(p,g)=>(_(),oe(Mu,{key:g,date:p[0],"selected-day":o(u),range:p,"hide-header":g!==0,onPick:o(i)},Mn({_:2},[v.$slots["date-cell"]?{name:"date-cell",fn:U(b=>[G(v.$slots,"date-cell",On(cl(b)))])}:void 0]),1032,["date","selected-day","range","hide-header","onPick"]))),128))],2))],2))}});var z0=fe(x0,[["__file","calendar.vue"]]);const H0=He(z0),K0=de({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:Y([String,Object,Array]),default:""},headerClass:String,bodyClass:String,footerClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),W0=x({name:"ElCard"}),j0=x({...W0,props:K0,setup(e){const t=ue("card");return(n,l)=>(_(),V("div",{class:T([o(t).b(),o(t).is(`${n.shadow}-shadow`)])},[n.$slots.header||n.header?(_(),V("div",{key:0,class:T([o(t).e("header"),n.headerClass])},[G(n.$slots,"header",{},()=>[st(pe(n.header),1)])],2)):J("v-if",!0),F("div",{class:T([o(t).e("body"),n.bodyClass]),style:_e(n.bodyStyle)},[G(n.$slots,"default")],6),n.$slots.footer||n.footer?(_(),V("div",{key:1,class:T([o(t).e("footer"),n.footerClass])},[G(n.$slots,"footer",{},()=>[st(pe(n.footer),1)])],2)):J("v-if",!0)],2))}});var U0=fe(j0,[["__file","card.vue"]]);const Y0=He(U0),q0=de({initialIndex:{type:Number,default:0},height:{type:String,default:""},trigger:{type:String,values:["hover","click"],default:"hover"},autoplay:{type:Boolean,default:!0},interval:{type:Number,default:3e3},indicatorPosition:{type:String,values:["","none","outside"],default:""},arrow:{type:String,values:["always","hover","never"],default:"hover"},type:{type:String,values:["","card"],default:""},cardScale:{type:Number,default:.83},loop:{type:Boolean,default:!0},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},pauseOnHover:{type:Boolean,default:!0},motionBlur:Boolean}),G0={change:(e,t)=>[e,t].every(Te)},xd=Symbol("carouselContextKey"),sr="ElCarouselItem";var Vn=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(Vn||{});function rr(e){return Dt(e)&&e.type===Oe}function X0(e){return Dt(e)&&e.type===jl}function Z0(e){return Dt(e)&&!rr(e)&&!X0(e)}const J0=e=>{if(!Dt(e))return{};const t=e.props||{},n=(Dt(e.type)?e.type.props:void 0)||{},l={};return Object.keys(n).forEach(a=>{rn(n[a],"default")&&(l[a]=n[a].default)}),Object.keys(t).forEach(a=>{l[Ar(a)]=t[a]}),l},Q0=e=>{if(!ke(e)||e.length>1)throw new Error("expect to receive a single Vue element child");return e[0]},Zn=e=>{const t=ke(e)?e:[e],n=[];return t.forEach(l=>{var a;ke(l)?n.push(...Zn(l)):Dt(l)&&((a=l.component)!=null&&a.subTree)?n.push(l,...Zn(l.component.subTree)):Dt(l)&&ke(l.children)?n.push(...Zn(l.children)):Dt(l)&&l.shapeFlag===2?n.push(...Zn(l.type())):n.push(l)}),n},ey=(e,t,n)=>Zn(e.subTree).filter(s=>{var r;return Dt(s)&&((r=s.type)==null?void 0:r.name)===t&&!!s.component}).map(s=>s.component.uid).map(s=>n[s]).filter(s=>!!s),ks=(e,t)=>{const n=Lt({}),l=Lt([]),a=new WeakMap,s=d=>{n.value[d.uid]=d,Oa(n),Xe(()=>{const f=d.getVnode().el,m=f.parentNode;if(!a.has(m)){a.set(m,[]);const v=m.insertBefore.bind(m);m.insertBefore=(h,p)=>(a.get(m).some(b=>h===b||p===b)&&Oa(n),v(h,p))}a.get(m).push(f)})},r=d=>{delete n.value[d.uid],Oa(n);const f=d.getVnode().el,m=f.parentNode,v=a.get(m),h=v.indexOf(f);v.splice(h,1)},i=()=>{l.value=ey(e,t,n.value)},u=d=>d.render(),c=x({setup(d,{slots:f}){return()=>(i(),f.default?Re(u,{render:f.default}):null)}});return{children:l,addChild:s,removeChild:r,ChildrenSorter:c}},Ru=300,ty=(e,t,n)=>{const{children:l,addChild:a,removeChild:s,ChildrenSorter:r}=ks(lt(),sr),i=Xt(),u=I(-1),c=I(null),d=I(!1),f=I(),m=I(0),v=I(!0),h=y(()=>e.arrow!=="never"&&!o(b)),p=y(()=>l.value.some(ee=>ee.props.label.toString().length>0)),g=y(()=>e.type==="card"),b=y(()=>e.direction==="vertical"),E=y(()=>e.height!=="auto"?{height:e.height}:{height:`${m.value}px`,overflow:"hidden"}),C=Hl(ee=>{R(ee)},Ru,{trailing:!0}),w=Hl(ee=>{z(ee)},Ru),k=ee=>v.value?u.value<=1?ee<=1:ee>1:!0;function S(){c.value&&(clearInterval(c.value),c.value=null)}function $(){e.interval<=0||!e.autoplay||c.value||(c.value=setInterval(()=>M(),e.interval))}const M=()=>{u.valuese.props.name===ee);le.length>0&&(ee=l.value.indexOf(le[0]))}if(ee=Number(ee),Number.isNaN(ee)||ee!==Math.floor(ee))return;const ae=l.value.length,re=u.value;ee<0?u.value=e.loop?ae-1:0:ee>=ae?u.value=e.loop?0:ae-1:u.value=ee,re===u.value&&N(re),ne()}function N(ee){l.value.forEach((ae,re)=>{ae.translateItem(re,u.value,ee)})}function O(ee,ae){var re,le,se,ge;const Be=o(l),te=Be.length;if(te===0||!ee.states.inStage)return!1;const ce=ae+1,Ie=ae-1,Ae=te-1,xe=Be[Ae].states.active,Ye=Be[0].states.active,$e=(le=(re=Be[ce])==null?void 0:re.states)==null?void 0:le.active,Me=(ge=(se=Be[Ie])==null?void 0:se.states)==null?void 0:ge.active;return ae===Ae&&Ye||$e?"left":ae===0&&xe||Me?"right":!1}function P(){d.value=!0,e.pauseOnHover&&S()}function W(){d.value=!1,$()}function K(ee){o(b)||l.value.forEach((ae,re)=>{ee===O(ae,re)&&(ae.states.hover=!0)})}function D(){o(b)||l.value.forEach(ee=>{ee.states.hover=!1})}function L(ee){u.value=ee}function z(ee){e.trigger==="hover"&&ee!==u.value&&(u.value=ee)}function B(){R(u.value-1)}function A(){R(u.value+1)}function ne(){S(),e.pauseOnHover||$()}function j(ee){e.height==="auto"&&(m.value=ee)}function Q(){var ee;const ae=(ee=i.default)==null?void 0:ee.call(i);if(!ae)return null;const le=Zn(ae).filter(se=>Dt(se)&&se.type.name===sr);return(le==null?void 0:le.length)===2&&e.loop&&!g.value?(v.value=!0,le):(v.value=!1,null)}ie(()=>u.value,(ee,ae)=>{N(ae),v.value&&(ee=ee%2,ae=ae%2),ae>-1&&t(nt,ee,ae)}),ie(()=>e.autoplay,ee=>{ee?$():S()}),ie(()=>e.loop,()=>{R(u.value)}),ie(()=>e.interval,()=>{ne()});const Z=Lt();return Xe(()=>{ie(()=>l.value,()=>{l.value.length>0&&R(e.initialIndex)},{immediate:!0}),Z.value=Ft(f.value,()=>{N()}),$()}),Nt(()=>{S(),f.value&&Z.value&&Z.value.stop()}),rt(xd,{root:f,isCardType:g,isVertical:b,items:l,loop:e.loop,cardScale:e.cardScale,addItem:a,removeItem:s,setActiveItem:R,setContainerHeight:j}),{root:f,activeIndex:u,arrowDisplay:h,hasLabel:p,hover:d,isCardType:g,items:l,isVertical:b,containerStyle:E,isItemsTwoLength:v,handleButtonEnter:K,handleButtonLeave:D,handleIndicatorClick:L,handleMouseEnter:P,handleMouseLeave:W,setActiveItem:R,prev:B,next:A,PlaceholderItem:Q,isTwoLengthShow:k,ItemsSorter:r,throttledArrowClick:C,throttledIndicatorHover:w}},ny="ElCarousel",ly=x({name:ny}),oy=x({...ly,props:q0,emits:G0,setup(e,{expose:t,emit:n}){const l=e,{root:a,activeIndex:s,arrowDisplay:r,hasLabel:i,hover:u,isCardType:c,items:d,isVertical:f,containerStyle:m,handleButtonEnter:v,handleButtonLeave:h,handleIndicatorClick:p,handleMouseEnter:g,handleMouseLeave:b,setActiveItem:E,prev:C,next:w,PlaceholderItem:k,isTwoLengthShow:S,ItemsSorter:$,throttledArrowClick:M,throttledIndicatorHover:R}=ty(l,n),N=ue("carousel"),{t:O}=pt(),P=y(()=>{const L=[N.b(),N.m(l.direction)];return o(c)&&L.push(N.m("card")),L}),W=y(()=>{const L=[N.e("indicators"),N.em("indicators",l.direction)];return o(i)&&L.push(N.em("indicators","labels")),l.indicatorPosition==="outside"&&L.push(N.em("indicators","outside")),o(f)&&L.push(N.em("indicators","right")),L});function K(L){if(!l.motionBlur)return;const z=o(f)?`${N.namespace.value}-transitioning-vertical`:`${N.namespace.value}-transitioning`;L.currentTarget.classList.add(z)}function D(L){if(!l.motionBlur)return;const z=o(f)?`${N.namespace.value}-transitioning-vertical`:`${N.namespace.value}-transitioning`;L.currentTarget.classList.remove(z)}return t({activeIndex:s,setActiveItem:E,prev:C,next:w}),(L,z)=>(_(),V("div",{ref_key:"root",ref:a,class:T(o(P)),onMouseenter:Le(o(g),["stop"]),onMouseleave:Le(o(b),["stop"])},[o(r)?(_(),oe(an,{key:0,name:"carousel-arrow-left",persisted:""},{default:U(()=>[We(F("button",{type:"button",class:T([o(N).e("arrow"),o(N).em("arrow","left")]),"aria-label":o(O)("el.carousel.leftArrow"),onMouseenter:B=>o(v)("left"),onMouseleave:o(h),onClick:Le(B=>o(M)(o(s)-1),["stop"])},[H(o(Se),null,{default:U(()=>[H(o(dl))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[mt,(L.arrow==="always"||o(u))&&(l.loop||o(s)>0)]])]),_:1})):J("v-if",!0),o(r)?(_(),oe(an,{key:1,name:"carousel-arrow-right",persisted:""},{default:U(()=>[We(F("button",{type:"button",class:T([o(N).e("arrow"),o(N).em("arrow","right")]),"aria-label":o(O)("el.carousel.rightArrow"),onMouseenter:B=>o(v)("right"),onMouseleave:o(h),onClick:Le(B=>o(M)(o(s)+1),["stop"])},[H(o(Se),null,{default:U(()=>[H(o(Cn))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[mt,(L.arrow==="always"||o(u))&&(l.loop||o(s)[L.indicatorPosition!=="none"?(_(),V("ul",{key:0,class:T(o(W))},[(_(!0),V(Oe,null,ut(o(d),(B,A)=>We((_(),V("li",{key:A,class:T([o(N).e("indicator"),o(N).em("indicator",L.direction),o(N).is("active",A===o(s))]),onMouseenter:ne=>o(R)(A),onClick:Le(ne=>o(p)(A),["stop"])},[F("button",{class:T(o(N).e("button")),"aria-label":o(O)("el.carousel.indicator",{index:A+1})},[o(i)?(_(),V("span",{key:0},pe(B.props.label),1)):J("v-if",!0)],10,["aria-label"])],42,["onMouseenter","onClick"])),[[mt,o(S)(A)]])),128))],2)):J("v-if",!0)]),_:1}),l.motionBlur?(_(),V("svg",{key:2,xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{display:"none"}},[F("defs",null,[F("filter",{id:"elCarouselHorizontal"},[F("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"12,0"})]),F("filter",{id:"elCarouselVertical"},[F("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"0,10"})])])])):J("v-if",!0)],42,["onMouseenter","onMouseleave"]))}});var ay=fe(oy,[["__file","carousel.vue"]]);const sy=de({name:{type:String,default:""},label:{type:[String,Number],default:""}}),ry=e=>{const t=we(xd),n=lt(),l=I(),a=I(!1),s=I(0),r=I(1),i=I(!1),u=I(!1),c=I(!1),d=I(!1),{isCardType:f,isVertical:m,cardScale:v}=t;function h(w,k,S){const $=S-1,M=k-1,R=k+1,N=S/2;return k===0&&w===$?-1:k===$&&w===0?S:w=N?S+1:w>R&&w-k>=N?-2:w}function p(w,k){var S,$;const M=o(m)?((S=t.root.value)==null?void 0:S.offsetHeight)||0:(($=t.root.value)==null?void 0:$.offsetWidth)||0;return c.value?M*((2-v)*(w-k)+1)/4:w{var $;const M=o(f),R=($=t.items.value.length)!=null?$:Number.NaN,N=w===k;!M&&!vt(S)&&(d.value=N||w===S),!N&&R>2&&t.loop&&(w=h(w,k,R));const O=o(m);i.value=N,M?(c.value=Math.round(Math.abs(w-k))<=1,s.value=p(w,k),r.value=o(i)?1:v):s.value=g(w,k,O),u.value=!0,N&&l.value&&t.setContainerHeight(l.value.offsetHeight)};function E(){if(t&&o(f)){const w=t.items.value.findIndex(({uid:k})=>k===n.uid);t.setActiveItem(w)}}const C={props:e,states:kt({hover:a,translate:s,scale:r,active:i,ready:u,inStage:c,animating:d}),uid:n.uid,getVnode:()=>n.vnode,translateItem:b};return t.addItem(C),Nt(()=>{t.removeItem(C)}),{carouselItemRef:l,active:i,animating:d,hover:a,inStage:c,isVertical:m,translate:s,isCardType:f,scale:r,ready:u,handleItemClick:E}},iy=x({name:sr}),uy=x({...iy,props:sy,setup(e){const t=e,n=ue("carousel"),{carouselItemRef:l,active:a,animating:s,hover:r,inStage:i,isVertical:u,translate:c,isCardType:d,scale:f,ready:m,handleItemClick:v}=ry(t),h=y(()=>[n.e("item"),n.is("active",a.value),n.is("in-stage",i.value),n.is("hover",r.value),n.is("animating",s.value),{[n.em("item","card")]:d.value,[n.em("item","card-vertical")]:d.value&&u.value}]),p=y(()=>{const b=`${`translate${o(u)?"Y":"X"}`}(${o(c)}px)`,E=`scale(${o(f)})`;return{transform:[b,E].join(" ")}});return(g,b)=>We((_(),V("div",{ref_key:"carouselItemRef",ref:l,class:T(o(h)),style:_e(o(p)),onClick:o(v)},[o(d)?We((_(),V("div",{key:0,class:T(o(n).e("mask"))},null,2)),[[mt,!o(a)]]):J("v-if",!0),G(g.$slots,"default")],14,["onClick"])),[[mt,o(m)]])}});var zd=fe(uy,[["__file","carousel-item.vue"]]);const cy=He(ay,{CarouselItem:zd}),dy=At(zd),Hd={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Jt,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...cn(["ariaControls"])},Kd={[De]:e=>Ve(e)||Te(e)||_t(e),change:e=>Ve(e)||Te(e)||_t(e)},Oo=Symbol("checkboxGroupContextKey"),fy=({model:e,isChecked:t})=>{const n=we(Oo,void 0),l=y(()=>{var s,r;const i=(s=n==null?void 0:n.max)==null?void 0:s.value,u=(r=n==null?void 0:n.min)==null?void 0:r.value;return!vt(i)&&e.value.length>=i&&!t.value||!vt(u)&&e.value.length<=u&&t.value});return{isDisabled:fn(y(()=>(n==null?void 0:n.disabled.value)||l.value)),isLimitDisabled:l}},vy=(e,{model:t,isLimitExceeded:n,hasOwnLabel:l,isDisabled:a,isLabeledByFormItem:s})=>{const r=we(Oo,void 0),{formItem:i}=dn(),{emit:u}=lt();function c(h){var p,g,b,E;return[!0,e.trueValue,e.trueLabel].includes(h)?(g=(p=e.trueValue)!=null?p:e.trueLabel)!=null?g:!0:(E=(b=e.falseValue)!=null?b:e.falseLabel)!=null?E:!1}function d(h,p){u(nt,c(h),p)}function f(h){if(n.value)return;const p=h.target;u(nt,c(p.checked),h)}async function m(h){n.value||!l.value&&!a.value&&s.value&&(h.composedPath().some(b=>b.tagName==="LABEL")||(t.value=c([!1,e.falseValue,e.falseLabel].includes(t.value)),await Ee(),d(t.value,h)))}const v=y(()=>(r==null?void 0:r.validateEvent)||e.validateEvent);return ie(()=>e.modelValue,()=>{v.value&&(i==null||i.validate("change").catch(h=>void 0))}),{handleChange:f,onClickRoot:m}},py=e=>{const t=I(!1),{emit:n}=lt(),l=we(Oo,void 0),a=y(()=>vt(l)===!1),s=I(!1),r=y({get(){var i,u;return a.value?(i=l==null?void 0:l.modelValue)==null?void 0:i.value:(u=e.modelValue)!=null?u:t.value},set(i){var u,c;a.value&&ke(i)?(s.value=((u=l==null?void 0:l.max)==null?void 0:u.value)!==void 0&&i.length>(l==null?void 0:l.max.value)&&i.length>r.value.length,s.value===!1&&((c=l==null?void 0:l.changeEvent)==null||c.call(l,i))):(n(De,i),t.value=i)}});return{model:r,isGroup:a,isLimitExceeded:s}},hy=(e,t,{model:n})=>{const l=we(Oo,void 0),a=I(!1),s=y(()=>In(e.value)?e.label:e.value),r=y(()=>{const d=n.value;return _t(d)?d:ke(d)?yt(s.value)?d.map(Uo).some(f=>tn(f,s.value)):d.map(Uo).includes(s.value):d!=null?d===e.trueValue||d===e.trueLabel:!!d}),i=Gt(y(()=>{var d;return(d=l==null?void 0:l.size)==null?void 0:d.value}),{prop:!0}),u=Gt(y(()=>{var d;return(d=l==null?void 0:l.size)==null?void 0:d.value})),c=y(()=>!!t.default||!In(s.value));return{checkboxButtonSize:i,isChecked:r,isFocused:a,checkboxSize:u,hasOwnLabel:c,actualValue:s}},Wd=(e,t)=>{const{formItem:n}=dn(),{model:l,isGroup:a,isLimitExceeded:s}=py(e),{isFocused:r,isChecked:i,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,actualValue:f}=hy(e,t,{model:l}),{isDisabled:m}=fy({model:l,isChecked:i}),{inputId:v,isLabeledByFormItem:h}=Kn(e,{formItemContext:n,disableIdGeneration:d,disableIdManagement:a}),{handleChange:p,onClickRoot:g}=vy(e,{model:l,isLimitExceeded:s,hasOwnLabel:d,isDisabled:m,isLabeledByFormItem:h});return(()=>{function E(){var C,w;ke(l.value)&&!l.value.includes(f.value)?l.value.push(f.value):l.value=(w=(C=e.trueValue)!=null?C:e.trueLabel)!=null?w:!0}e.checked&&E()})(),ul({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},y(()=>a.value&&In(e.value))),ul({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},y(()=>!!e.trueLabel)),ul({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},y(()=>!!e.falseLabel)),{inputId:v,isLabeledByFormItem:h,isChecked:i,isDisabled:m,isFocused:r,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,model:l,actualValue:f,handleChange:p,onClickRoot:g}},my=x({name:"ElCheckbox"}),gy=x({...my,props:Hd,emits:Kd,setup(e){const t=e,n=Xt(),{inputId:l,isLabeledByFormItem:a,isChecked:s,isDisabled:r,isFocused:i,checkboxSize:u,hasOwnLabel:c,model:d,actualValue:f,handleChange:m,onClickRoot:v}=Wd(t,n),h=ue("checkbox"),p=y(()=>[h.b(),h.m(u.value),h.is("disabled",r.value),h.is("bordered",t.border),h.is("checked",s.value)]),g=y(()=>[h.e("input"),h.is("disabled",r.value),h.is("checked",s.value),h.is("indeterminate",t.indeterminate),h.is("focus",i.value)]);return(b,E)=>(_(),oe(Ge(!o(c)&&o(a)?"span":"label"),{class:T(o(p)),"aria-controls":b.indeterminate?b.ariaControls:null,onClick:o(v)},{default:U(()=>{var C,w,k,S;return[F("span",{class:T(o(g))},[b.trueValue||b.falseValue||b.trueLabel||b.falseLabel?We((_(),V("input",{key:0,id:o(l),"onUpdate:modelValue":$=>gn(d)?d.value=$:null,class:T(o(h).e("original")),type:"checkbox",indeterminate:b.indeterminate,name:b.name,tabindex:b.tabindex,disabled:o(r),"true-value":(w=(C=b.trueValue)!=null?C:b.trueLabel)!=null?w:!0,"false-value":(S=(k=b.falseValue)!=null?k:b.falseLabel)!=null?S:!1,onChange:o(m),onFocus:$=>i.value=!0,onBlur:$=>i.value=!1,onClick:Le(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[Ka,o(d)]]):We((_(),V("input",{key:1,id:o(l),"onUpdate:modelValue":$=>gn(d)?d.value=$:null,class:T(o(h).e("original")),type:"checkbox",indeterminate:b.indeterminate,disabled:o(r),value:o(f),name:b.name,tabindex:b.tabindex,onChange:o(m),onFocus:$=>i.value=!0,onBlur:$=>i.value=!1,onClick:Le(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[Ka,o(d)]]),F("span",{class:T(o(h).e("inner"))},null,2)],2),o(c)?(_(),V("span",{key:0,class:T(o(h).e("label"))},[G(b.$slots,"default"),b.$slots.default?J("v-if",!0):(_(),V(Oe,{key:0},[st(pe(b.label),1)],64))],2)):J("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var by=fe(gy,[["__file","checkbox.vue"]]);const yy=x({name:"ElCheckboxButton"}),Cy=x({...yy,props:Hd,emits:Kd,setup(e){const t=e,n=Xt(),{isFocused:l,isChecked:a,isDisabled:s,checkboxButtonSize:r,model:i,actualValue:u,handleChange:c}=Wd(t,n),d=we(Oo,void 0),f=ue("checkbox"),m=y(()=>{var h,p,g,b;const E=(p=(h=d==null?void 0:d.fill)==null?void 0:h.value)!=null?p:"";return{backgroundColor:E,borderColor:E,color:(b=(g=d==null?void 0:d.textColor)==null?void 0:g.value)!=null?b:"",boxShadow:E?`-1px 0 0 0 ${E}`:void 0}}),v=y(()=>[f.b("button"),f.bm("button",r.value),f.is("disabled",s.value),f.is("checked",a.value),f.is("focus",l.value)]);return(h,p)=>{var g,b,E,C;return _(),V("label",{class:T(o(v))},[h.trueValue||h.falseValue||h.trueLabel||h.falseLabel?We((_(),V("input",{key:0,"onUpdate:modelValue":w=>gn(i)?i.value=w:null,class:T(o(f).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:o(s),"true-value":(b=(g=h.trueValue)!=null?g:h.trueLabel)!=null?b:!0,"false-value":(C=(E=h.falseValue)!=null?E:h.falseLabel)!=null?C:!1,onChange:o(c),onFocus:w=>l.value=!0,onBlur:w=>l.value=!1,onClick:Le(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[Ka,o(i)]]):We((_(),V("input",{key:1,"onUpdate:modelValue":w=>gn(i)?i.value=w:null,class:T(o(f).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:o(s),value:o(u),onChange:o(c),onFocus:w=>l.value=!0,onBlur:w=>l.value=!1,onClick:Le(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[Ka,o(i)]]),h.$slots.default||h.label?(_(),V("span",{key:2,class:T(o(f).be("button","inner")),style:_e(o(a)?o(m):void 0)},[G(h.$slots,"default",{},()=>[st(pe(h.label),1)])],6)):J("v-if",!0)],2)}}});var jd=fe(Cy,[["__file","checkbox-button.vue"]]);const wy=de({modelValue:{type:Y(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Jt,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...cn(["ariaLabel"])}),ky={[De]:e=>ke(e),change:e=>ke(e)},Sy=x({name:"ElCheckboxGroup"}),Ey=x({...Sy,props:wy,emits:ky,setup(e,{emit:t}){const n=e,l=ue("checkbox"),{formItem:a}=dn(),{inputId:s,isLabeledByFormItem:r}=Kn(n,{formItemContext:a}),i=async c=>{t(De,c),await Ee(),t(nt,c)},u=y({get(){return n.modelValue},set(c){i(c)}});return rt(Oo,{...An(nn(n),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:u,changeEvent:i}),ie(()=>n.modelValue,()=>{n.validateEvent&&(a==null||a.validate("change").catch(c=>void 0))}),(c,d)=>{var f;return _(),oe(Ge(c.tag),{id:o(s),class:T(o(l).b("group")),role:"group","aria-label":o(r)?void 0:c.ariaLabel||"checkbox-group","aria-labelledby":o(r)?(f=o(a))==null?void 0:f.labelId:void 0},{default:U(()=>[G(c.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var Ud=fe(Ey,[["__file","checkbox-group.vue"]]);const Hn=He(by,{CheckboxButton:jd,CheckboxGroup:Ud}),_y=At(jd),Yd=At(Ud),qd=de({modelValue:{type:[String,Number,Boolean],default:void 0},size:Jt,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),Ty=de({...qd,border:Boolean}),Gd={[De]:e=>Ve(e)||Te(e)||_t(e),[nt]:e=>Ve(e)||Te(e)||_t(e)},Xd=Symbol("radioGroupKey"),Zd=(e,t)=>{const n=I(),l=we(Xd,void 0),a=y(()=>!!l),s=y(()=>In(e.value)?e.label:e.value),r=y({get(){return a.value?l.modelValue:e.modelValue},set(f){a.value?l.changeEvent(f):t&&t(De,f),n.value.checked=e.modelValue===s.value}}),i=Gt(y(()=>l==null?void 0:l.size)),u=fn(y(()=>l==null?void 0:l.disabled)),c=I(!1),d=y(()=>u.value||a.value&&r.value!==s.value?-1:0);return ul({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},y(()=>a.value&&In(e.value))),{radioRef:n,isGroup:a,radioGroup:l,focus:c,size:i,disabled:u,tabIndex:d,modelValue:r,actualValue:s}},$y=x({name:"ElRadio"}),Ny=x({...$y,props:Ty,emits:Gd,setup(e,{emit:t}){const n=e,l=ue("radio"),{radioRef:a,radioGroup:s,focus:r,size:i,disabled:u,modelValue:c,actualValue:d}=Zd(n,t);function f(){Ee(()=>t(nt,c.value))}return(m,v)=>{var h;return _(),V("label",{class:T([o(l).b(),o(l).is("disabled",o(u)),o(l).is("focus",o(r)),o(l).is("bordered",m.border),o(l).is("checked",o(c)===o(d)),o(l).m(o(i))])},[F("span",{class:T([o(l).e("input"),o(l).is("disabled",o(u)),o(l).is("checked",o(c)===o(d))])},[We(F("input",{ref_key:"radioRef",ref:a,"onUpdate:modelValue":p=>gn(c)?c.value=p:null,class:T(o(l).e("original")),value:o(d),name:m.name||((h=o(s))==null?void 0:h.name),disabled:o(u),checked:o(c)===o(d),type:"radio",onFocus:p=>r.value=!0,onBlur:p=>r.value=!1,onChange:f,onClick:Le(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[Rc,o(c)]]),F("span",{class:T(o(l).e("inner"))},null,2)],2),F("span",{class:T(o(l).e("label")),onKeydown:Le(()=>{},["stop"])},[G(m.$slots,"default",{},()=>[st(pe(m.label),1)])],42,["onKeydown"])],2)}}});var Iy=fe(Ny,[["__file","radio.vue"]]);const My=de({...qd}),Ry=x({name:"ElRadioButton"}),Py=x({...Ry,props:My,setup(e){const t=e,n=ue("radio"),{radioRef:l,focus:a,size:s,disabled:r,modelValue:i,radioGroup:u,actualValue:c}=Zd(t),d=y(()=>({backgroundColor:(u==null?void 0:u.fill)||"",borderColor:(u==null?void 0:u.fill)||"",boxShadow:u!=null&&u.fill?`-1px 0 0 0 ${u.fill}`:"",color:(u==null?void 0:u.textColor)||""}));return(f,m)=>{var v;return _(),V("label",{class:T([o(n).b("button"),o(n).is("active",o(i)===o(c)),o(n).is("disabled",o(r)),o(n).is("focus",o(a)),o(n).bm("button",o(s))])},[We(F("input",{ref_key:"radioRef",ref:l,"onUpdate:modelValue":h=>gn(i)?i.value=h:null,class:T(o(n).be("button","original-radio")),value:o(c),type:"radio",name:f.name||((v=o(u))==null?void 0:v.name),disabled:o(r),onFocus:h=>a.value=!0,onBlur:h=>a.value=!1,onClick:Le(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[Rc,o(i)]]),F("span",{class:T(o(n).be("button","inner")),style:_e(o(i)===o(c)?o(d):{}),onKeydown:Le(()=>{},["stop"])},[G(f.$slots,"default",{},()=>[st(pe(f.label),1)])],46,["onKeydown"])],2)}}});var Jd=fe(Py,[["__file","radio-button.vue"]]);const Oy=de({id:{type:String,default:void 0},size:Jt,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...cn(["ariaLabel"])}),Ly=Gd,By=x({name:"ElRadioGroup"}),Vy=x({...By,props:Oy,emits:Ly,setup(e,{emit:t}){const n=e,l=ue("radio"),a=sn(),s=I(),{formItem:r}=dn(),{inputId:i,isLabeledByFormItem:u}=Kn(n,{formItemContext:r}),c=f=>{t(De,f),Ee(()=>t(nt,f))};Xe(()=>{const f=s.value.querySelectorAll("[type=radio]"),m=f[0];!Array.from(f).some(v=>v.checked)&&m&&(m.tabIndex=0)});const d=y(()=>n.name||a.value);return rt(Xd,kt({...nn(n),changeEvent:c,name:d})),ie(()=>n.modelValue,()=>{n.validateEvent&&(r==null||r.validate("change").catch(f=>void 0))}),(f,m)=>(_(),V("div",{id:o(i),ref_key:"radioGroupRef",ref:s,class:T(o(l).b("group")),role:"radiogroup","aria-label":o(u)?void 0:f.ariaLabel||"radio-group","aria-labelledby":o(u)?o(r).labelId:void 0},[G(f.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var Qd=fe(Vy,[["__file","radio-group.vue"]]);const ef=He(Iy,{RadioButton:Jd,RadioGroup:Qd}),Dy=At(Qd),Ay=At(Jd);function Fy(e){return!!(ke(e)?e.every(({type:t})=>t===jl):(e==null?void 0:e.type)===jl)}var xy=x({name:"NodeContent",props:{node:{type:Object,required:!0},renderLabelFn:Function},setup(e){const t=ue("cascader-node"),{renderLabelFn:n,node:l}=e,{data:a,label:s}=l,r=()=>{const i=n==null?void 0:n({node:l,data:a});return Fy(i)?s:i??s};return()=>H("span",{class:t.e("label")},[r()])}});const li=Symbol(),zy=x({name:"ElCascaderNode"}),Hy=x({...zy,props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(e,{emit:t}){const n=e,l=we(li),a=ue("cascader-node"),s=y(()=>l.isHoverMenu),r=y(()=>l.config.multiple),i=y(()=>l.config.checkStrictly),u=y(()=>{var $;return($=l.checkedNodes[0])==null?void 0:$.uid}),c=y(()=>n.node.isDisabled),d=y(()=>n.node.isLeaf),f=y(()=>i.value&&!d.value||!c.value),m=y(()=>h(l.expandingNode)),v=y(()=>i.value&&l.checkedNodes.some(h)),h=$=>{var M;const{level:R,uid:N}=n.node;return((M=$==null?void 0:$.pathNodes[R-1])==null?void 0:M.uid)===N},p=()=>{m.value||l.expandNode(n.node)},g=$=>{const{node:M}=n;$!==M.checked&&l.handleCheckChange(M,$)},b=()=>{l.lazyLoad(n.node,()=>{d.value||p()})},E=$=>{s.value&&(C(),!d.value&&t("expand",$))},C=()=>{const{node:$}=n;!f.value||$.loading||($.loaded?p():b())},w=()=>{s.value&&!d.value||(d.value&&!c.value&&!i.value&&!r.value?S(!0):C())},k=$=>{i.value?(g($),n.node.loaded&&p()):S($)},S=$=>{n.node.loaded?(g($),!i.value&&p()):b()};return($,M)=>(_(),V("li",{id:`${e.menuId}-${e.node.uid}`,role:"menuitem","aria-haspopup":!o(d),"aria-owns":o(d)?void 0:e.menuId,"aria-expanded":o(m),tabindex:o(f)?-1:void 0,class:T([o(a).b(),o(a).is("selectable",o(i)),o(a).is("active",e.node.checked),o(a).is("disabled",!o(f)),o(m)&&"in-active-path",o(v)&&"in-checked-path"]),onMouseenter:E,onFocus:E,onClick:w},[J(" prefix "),o(r)?(_(),oe(o(Hn),{key:0,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:o(c),onClick:Le(()=>{},["stop"]),"onUpdate:modelValue":k},null,8,["model-value","indeterminate","disabled","onClick"])):o(i)?(_(),oe(o(ef),{key:1,"model-value":o(u),label:e.node.uid,disabled:o(c),"onUpdate:modelValue":k,onClick:Le(()=>{},["stop"])},{default:U(()=>[J(`
+import{g as lt,i as we,r as I,c as y,u as o,a as Ve,b as ke,d as yt,e as bt,f as gn,h as rn,w as _p,j as Qe,p as rt,k as Ar,l as x,s as Lt,m as Tp,n as nu,o as ie,q as Xe,t as xt,v as bn,x as V,y as _,z as F,A as G,B as _e,C as T,D as Ee,N as Bt,E as et,F as $p,G as Xt,H as wt,I as oe,J as U,K as We,L as J,M as Ge,O as st,P as pe,Q as Oe,R as H,S as mt,T as an,U as Ha,V as cs,W as pl,X as Ft,Y as Le,Z as Nt,_ as kt,$ as Fr,a0 as hl,a1 as Np,a2 as Nc,a3 as jl,a4 as ua,a5 as Ip,a6 as xr,a7 as zr,a8 as Ic,a9 as Mp,aa as Tt,ab as Mn,ac as ut,ad as Mc,ae as wo,af as On,ag as cl,ah as Dt,ai as Re,aj as Oa,ak as Uo,al as Ka,am as nn,an as Rc,ao as Pc,ap as Yo,aq as ds,ar as Rp,as as Pp,at as Op,au as Ul,av as ht,aw as Lp,ax as Oc,ay as $l,az as Bp,aA as Vp,aB as nr,aC as lr,aD as fs,aE as Dp,aF as Lc,aG as Il,aH as Ap,aI as Fp,aJ as Bc,aK as xp,aL as zp,aM as Hp,aN as Kp,aO as Wp}from"./vue-vendor-CKToUHZx.js";import{i as qt,g as Yt,f as qo,s as jp,p as An,E as Xl,y as Up,a as Yp,d as Ln,T as vo,b as Ke,l as Vc,t as Hl,c as tn,e as qp,h as Wa,j as ln,u as Ds,k as Hr,m as Gp,n as Xp,w as Zp,o as Jp,q as Qp,r as eh,v as th,x as lu,S as nh,z as Dc,A as lh,B as oh,D as ca,F as Ac,G as Fc,Y as ah,H as xc,I as zc,J as Hc,K as Kc,L as sh,M as rh,N as ih,O as uh}from"./vendor-BDiMbLwQ.js";const ch="2.10.4",ou=Symbol("INSTALLED_KEY"),Wc=Symbol(),Ko="el",dh="is-",Bl=(e,t,n,l,a)=>{let s=`${e}-${t}`;return n&&(s+=`-${n}`),l&&(s+=`__${l}`),a&&(s+=`--${a}`),s},jc=Symbol("namespaceContextKey"),Kr=e=>{const t=e||(lt()?we(jc,I(Ko)):I(Ko));return y(()=>o(t)||Ko)},ue=(e,t)=>{const n=Kr(t);return{namespace:n,b:(p="")=>Bl(n.value,e,p,"",""),e:p=>p?Bl(n.value,e,"",p,""):"",m:p=>p?Bl(n.value,e,"","",p):"",be:(p,g)=>p&&g?Bl(n.value,e,p,g,""):"",em:(p,g)=>p&&g?Bl(n.value,e,"",p,g):"",bm:(p,g)=>p&&g?Bl(n.value,e,p,"",g):"",bem:(p,g,b)=>p&&g&&b?Bl(n.value,e,p,g,b):"",is:(p,...g)=>{const b=g.length>=1?g[0]:!0;return p&&b?`${dh}${p}`:""},cssVar:p=>{const g={};for(const b in p)p[b]&&(g[`--${n.value}-${b}`]=p[b]);return g},cssVarName:p=>`--${n.value}-${p}`,cssVarBlock:p=>{const g={};for(const b in p)p[b]&&(g[`--${n.value}-${e}-${b}`]=p[b]);return g},cssVarBlockName:p=>`--${n.value}-${e}-${p}`}},vt=e=>e===void 0,_t=e=>typeof e=="boolean",Te=e=>typeof e=="number",Pn=e=>!e&&e!==0||ke(e)&&e.length===0||yt(e)&&!Object.keys(e).length,_n=e=>typeof Element>"u"?!1:e instanceof Element,In=e=>qt(e),fh=e=>Ve(e)?!Number.isNaN(Number(e)):!1,vs=e=>e===window;class vh extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function jt(e,t){throw new vh(`[${e}] ${t}`)}const au={current:0},su=I(0),Uc=2e3,ru=Symbol("elZIndexContextKey"),Yc=Symbol("zIndexContextKey"),Mo=e=>{const t=lt()?we(ru,au):au,n=e||(lt()?we(Yc,void 0):void 0),l=y(()=>{const r=o(n);return Te(r)?r:Uc}),a=y(()=>l.value+su.value),s=()=>(t.current++,su.value=t.current,a.value);return!bt&&we(ru),{initialZIndex:l,currentZIndex:a,nextZIndex:s}};var ph={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const hh=e=>(t,n)=>mh(t,n,o(e)),mh=(e,t,n)=>Yt(n,e,e).replace(/\{(\w+)\}/g,(l,a)=>{var s;return`${(s=t==null?void 0:t[a])!=null?s:`{${a}}`}`}),gh=e=>{const t=y(()=>o(e).name),n=gn(e)?e:I(e);return{lang:t,locale:n,t:hh(e)}},qc=Symbol("localeContextKey"),pt=e=>{const t=e||we(qc,I());return gh(y(()=>t.value||ph))},Gc="__epPropKey",Y=e=>e,bh=e=>yt(e)&&!!e[Gc],Un=(e,t)=>{if(!yt(e)||bh(e))return e;const{values:n,required:l,default:a,type:s,validator:r}=e,u={type:s,required:!!l,validator:n||r?c=>{let d=!1,f=[];if(n&&(f=Array.from(n),rn(e,"default")&&f.push(a),d||(d=f.includes(c))),r&&(d||(d=r(c))),!d&&f.length>0){const m=[...new Set(f)].map(v=>JSON.stringify(v)).join(", ");_p(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${m}], got value ${JSON.stringify(c)}.`)}return d}:void 0,[Gc]:!0};return rn(e,"default")&&(u.default=a),u},de=e=>qo(Object.entries(e).map(([t,n])=>[t,Un(n,t)])),tl=["","default","small","large"],Jt=Un({type:String,values:tl,required:!1}),Xc=Symbol("size"),Zc=()=>{const e=we(Xc,{});return y(()=>o(e.size)||"")},Jc=Symbol("emptyValuesContextKey"),yh=["",void 0,null],Ch=void 0,Zl=de({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>Qe(e)?!e():!e}}),da=(e,t)=>{const n=lt()?we(Jc,I({})):I({}),l=y(()=>e.emptyValues||n.value.emptyValues||yh),a=y(()=>Qe(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:Qe(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:t!==void 0?t:Ch),s=r=>l.value.includes(r);return l.value.includes(a.value),{emptyValues:l,valueOnClear:a,isEmptyValue:s}},ko=e=>Object.keys(e),Qc=e=>Object.entries(e),Wo=(e,t,n)=>({get value(){return Yt(e,t,n)},set value(l){jp(e,t,l)}}),ja=I();function fa(e,t=void 0){const n=lt()?we(Wc,ja):ja;return e?y(()=>{var l,a;return(a=(l=n.value)==null?void 0:l[e])!=null?a:t}):n}function ps(e,t){const n=fa(),l=ue(e,y(()=>{var i;return((i=n.value)==null?void 0:i.namespace)||Ko})),a=pt(y(()=>{var i;return(i=n.value)==null?void 0:i.locale})),s=Mo(y(()=>{var i;return((i=n.value)==null?void 0:i.zIndex)||Uc})),r=y(()=>{var i;return o(t)||((i=n.value)==null?void 0:i.size)||""});return Wr(y(()=>o(n)||{})),{ns:l,locale:a,zIndex:s,size:r}}const Wr=(e,t,n=!1)=>{var l;const a=!!lt(),s=a?fa():void 0,r=(l=t==null?void 0:t.provide)!=null?l:a?rt:void 0;if(!r)return;const i=y(()=>{const u=o(e);return s!=null&&s.value?wh(s.value,u):u});return r(Wc,i),r(qc,y(()=>i.value.locale)),r(jc,y(()=>i.value.namespace)),r(Yc,y(()=>i.value.zIndex)),r(Xc,{size:y(()=>i.value.size||"")}),r(Jc,y(()=>({emptyValues:i.value.emptyValues,valueOnClear:i.value.valueOnClear}))),(n||!ja.value)&&(ja.value=i.value),i},wh=(e,t)=>{const n=[...new Set([...ko(e),...ko(t)])],l={};for(const a of n)l[a]=t[a]!==void 0?t[a]:e[a];return l},kh=(e=[])=>({version:ch,install:(n,l)=>{n[ou]||(n[ou]=!0,e.forEach(a=>n.use(a)),l&&Wr(l,n,!0))}}),De="update:modelValue",nt="change",Zt="input",Sh=de({zIndex:{type:Y([Number,String]),default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"}}),Eh={scroll:({scrollTop:e,fixed:t})=>Te(e)&&_t(t),[nt]:e=>_t(e)};var fe=(e,t)=>{const n=e.__vccOpts||e;for(const[l,a]of t)n[l]=a;return n};function _h(e,t,n,l){const a=n-t;return e/=l/2,e<1?a/2*e*e*e+t:a/2*((e-=2)*e*e+2)+t}const Ml=e=>bt?window.requestAnimationFrame(e):setTimeout(e,16),Yl=e=>bt?window.cancelAnimationFrame(e):clearTimeout(e),ed=(e="")=>e.split(" ").filter(t=>!!t.trim()),Nn=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},Fn=(e,t)=>{!e||!t.trim()||e.classList.add(...ed(t))},yn=(e,t)=>{!e||!t.trim()||e.classList.remove(...ed(t))},rl=(e,t)=>{var n;if(!bt||!e||!t)return"";let l=Ar(t);l==="float"&&(l="cssFloat");try{const a=e.style[l];if(a)return a;const s=(n=document.defaultView)==null?void 0:n.getComputedStyle(e,"");return s?s[l]:""}catch{return e.style[l]}},td=(e,t,n)=>{if(!(!e||!t))if(yt(t))Qc(t).forEach(([l,a])=>td(e,l,a));else{const l=Ar(t);e.style[l]=n}};function zt(e,t="px"){if(!e)return"";if(Te(e)||fh(e))return`${e}${t}`;if(Ve(e))return e}const Th=(e,t)=>{if(!bt)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(t)],l=rl(e,n);return["scroll","auto","overlay"].some(a=>l.includes(a))},jr=(e,t)=>{if(!bt)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(Th(n,t))return n;n=n.parentNode}return n};let wa;const nd=e=>{var t;if(!bt)return 0;if(wa!==void 0)return wa;const n=document.createElement("div");n.className=`${e}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const l=n.offsetWidth;n.style.overflow="scroll";const a=document.createElement("div");a.style.width="100%",n.appendChild(a);const s=a.offsetWidth;return(t=n.parentNode)==null||t.removeChild(n),wa=l-s,wa};function Ur(e,t){if(!bt)return;if(!t){e.scrollTop=0;return}const n=[];let l=t.offsetParent;for(;l!==null&&e!==l&&e.contains(l);)n.push(l),l=l.offsetParent;const a=t.offsetTop+n.reduce((u,c)=>u+c.offsetTop,0),s=a+t.offsetHeight,r=e.scrollTop,i=r+e.clientHeight;ai&&(e.scrollTop=s-e.clientHeight)}function $h(e,t,n,l,a){const s=Date.now();let r;const i=()=>{const c=Date.now()-s,d=_h(c>l?l:c,t,n,l);vs(e)?e.scrollTo(window.pageXOffset,d):e.scrollTop=d,c{r&&Yl(r)}}const iu=(e,t)=>vs(t)?e.ownerDocument.documentElement:t,uu=e=>vs(e)?window.scrollY:e.scrollTop,ld="ElAffix",Nh=x({name:ld}),Ih=x({...Nh,props:Sh,emits:Eh,setup(e,{expose:t,emit:n}){const l=e,a=ue("affix"),s=Lt(),r=Lt(),i=Lt(),{height:u}=Tp(),{height:c,width:d,top:f,bottom:m,update:v}=nu(r,{windowScroll:!1}),h=nu(s),p=I(!1),g=I(0),b=I(0),E=y(()=>({height:p.value?`${c.value}px`:"",width:p.value?`${d.value}px`:""})),C=y(()=>{if(!p.value)return{};const $=l.offset?zt(l.offset):0;return{height:`${c.value}px`,width:`${d.value}px`,top:l.position==="top"?$:"",bottom:l.position==="bottom"?$:"",transform:b.value?`translateY(${b.value}px)`:"",zIndex:l.zIndex}}),w=()=>{if(!i.value)return;g.value=i.value instanceof Window?document.documentElement.scrollTop:i.value.scrollTop||0;const{position:$,target:M,offset:R}=l,N=R+c.value;if($==="top")if(M){const O=h.bottom.value-N;p.value=R>f.value&&h.bottom.value>0,b.value=O<0?O:0}else p.value=R>f.value;else if(M){const O=u.value-h.top.value-N;p.value=u.value-Rh.top.value,b.value=O<0?-O:0}else p.value=u.value-R{if(!p.value){v();return}p.value=!1,await Ee(),v(),p.value=!0},S=async()=>{v(),await Ee(),n("scroll",{scrollTop:g.value,fixed:p.value})};return ie(p,$=>n(nt,$)),Xe(()=>{var $;l.target?(s.value=($=document.querySelector(l.target))!=null?$:void 0,s.value||jt(ld,`Target does not exist: ${l.target}`)):s.value=document.documentElement,i.value=jr(r.value,!0),v()}),xt(i,"scroll",S),bn(w),t({update:w,updateRoot:k}),($,M)=>(_(),V("div",{ref_key:"root",ref:r,class:T(o(a).b()),style:_e(o(E))},[F("div",{class:T({[o(a).m("fixed")]:p.value}),style:_e(o(C))},[G($.$slots,"default")],6)],6))}});var Mh=fe(Ih,[["__file","affix.vue"]]);const He=(e,t)=>{if(e.install=n=>{for(const l of[e,...Object.values(t??{})])n.component(l.name,l)},t)for(const[n,l]of Object.entries(t))e[n]=l;return e},od=(e,t)=>(e.install=n=>{e._context=n._context,n.config.globalProperties[t]=e},e),Rh=(e,t)=>(e.install=n=>{n.directive(t,e)},e),At=e=>(e.install=Bt,e),Ph=He(Mh),Oh=de({size:{type:Y([Number,String])},color:{type:String}}),Lh=x({name:"ElIcon",inheritAttrs:!1}),Bh=x({...Lh,props:Oh,setup(e){const t=e,n=ue("icon"),l=y(()=>{const{size:a,color:s}=t;return!a&&!s?{}:{fontSize:vt(a)?void 0:zt(a),"--color":s}});return(a,s)=>(_(),V("i",et({class:o(n).b(),style:o(l)},a.$attrs),[G(a.$slots,"default")],16))}});var Vh=fe(Bh,[["__file","icon.vue"]]);const Se=He(Vh);function cu(){let e;const t=(l,a)=>{n(),e=window.setTimeout(l,a)},n=()=>window.clearTimeout(e);return $p(()=>n()),{registerTimeout:t,cancelTimeout:n}}const ad=de({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),sd=({showAfter:e,hideAfter:t,autoClose:n,open:l,close:a})=>{const{registerTimeout:s}=cu(),{registerTimeout:r,cancelTimeout:i}=cu();return{onOpen:d=>{s(()=>{l(d);const f=o(n);Te(f)&&f>0&&r(()=>{a(d)},f)},o(e))},onClose:d=>{i(),s(()=>{a(d)},o(t))}}};/*! Element Plus Icons Vue v2.3.1 */var Dh=x({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),nl=Dh,Ah=x({name:"ArrowLeft",__name:"arrow-left",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),dl=Ah,Fh=x({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),Cn=Fh,xh=x({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),hs=xh,zh=x({name:"Back",__name:"back",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),F("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),Hh=zh,Kh=x({name:"Calendar",__name:"calendar",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),Wh=Kh,jh=x({name:"CaretRight",__name:"caret-right",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),rd=jh,Uh=x({name:"CaretTop",__name:"caret-top",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}}),Yh=Uh,qh=x({name:"Check",__name:"check",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),va=qh,Gh=x({name:"CircleCheckFilled",__name:"circle-check-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),Xh=Gh,Zh=x({name:"CircleCheck",__name:"circle-check",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),F("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),Yr=Zh,Jh=x({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),qr=Jh,Qh=x({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),F("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),ml=Qh,em=x({name:"Clock",__name:"clock",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),F("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),F("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),id=em,tm=x({name:"Close",__name:"close",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),zn=tm,nm=x({name:"DArrowLeft",__name:"d-arrow-left",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),Rl=nm,lm=x({name:"DArrowRight",__name:"d-arrow-right",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),Pl=lm,om=x({name:"Delete",__name:"delete",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),am=om,sm=x({name:"Document",__name:"document",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),rm=sm,im=x({name:"FullScreen",__name:"full-screen",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),um=im,cm=x({name:"Hide",__name:"hide",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),F("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),dm=cm,fm=x({name:"InfoFilled",__name:"info-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Go=fm,vm=x({name:"Loading",__name:"loading",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),Qn=vm,pm=x({name:"Minus",__name:"minus",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),hm=pm,mm=x({name:"MoreFilled",__name:"more-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),du=mm,gm=x({name:"More",__name:"more",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),bm=gm,ym=x({name:"PictureFilled",__name:"picture-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),Cm=ym,wm=x({name:"Plus",__name:"plus",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),ud=wm,km=x({name:"QuestionFilled",__name:"question-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),Sm=km,Em=x({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),_m=Em,Tm=x({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}}),$m=Tm,Nm=x({name:"ScaleToOriginal",__name:"scale-to-original",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),Im=Nm,Mm=x({name:"Search",__name:"search",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),Rm=Mm,Pm=x({name:"SortDown",__name:"sort-down",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M576 96v709.568L333.312 562.816A32 32 0 1 0 288 608l297.408 297.344A32 32 0 0 0 640 882.688V96a32 32 0 0 0-64 0"})]))}}),Om=Pm,Lm=x({name:"SortUp",__name:"sort-up",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M384 141.248V928a32 32 0 1 0 64 0V218.56l242.688 242.688A32 32 0 1 0 736 416L438.592 118.656A32 32 0 0 0 384 141.248"})]))}}),Bm=Lm,Vm=x({name:"StarFilled",__name:"star-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M283.84 867.84 512 747.776l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72z"})]))}}),ka=Vm,Dm=x({name:"Star",__name:"star",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),Am=Dm,Fm=x({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),cd=Fm,xm=x({name:"View",__name:"view",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),zm=xm,Hm=x({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),ms=Hm,Km=x({name:"ZoomIn",__name:"zoom-in",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),dd=Km,Wm=x({name:"ZoomOut",__name:"zoom-out",setup(e){return(t,n)=>(_(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[F("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),jm=Wm;const $t=Y([String,Object,Function]),fd={Close:zn},Gr={Close:zn,SuccessFilled:cd,InfoFilled:Go,WarningFilled:ms,CircleCloseFilled:qr},Ol={primary:Go,success:cd,warning:ms,error:qr,info:Go},gs={validating:Qn,success:Yr,error:ml},Um=["light","dark"],Ym=de({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:ko(Ol),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:Um,default:"light"},...ad}),qm={open:()=>!0,close:e=>vt(e)||e instanceof Event},Gm=x({name:"ElAlert"}),Xm=x({...Gm,props:Ym,emits:qm,setup(e,{emit:t}){const n=e,{Close:l}=Gr,a=Xt(),s=ue("alert"),r=I(!1),i=y(()=>Ol[n.type]),u=y(()=>!!(n.description||a.default)),c=()=>{r.value=!0,t("open")},d=v=>{r.value=!1,t("close",v)},{onOpen:f,onClose:m}=sd({showAfter:wt(n,"showAfter"),hideAfter:wt(n,"hideAfter"),autoClose:wt(n,"autoClose"),open:c,close:d});return bt&&f(),(v,h)=>(_(),oe(an,{name:o(s).b("fade"),persisted:""},{default:U(()=>[We(F("div",{class:T([o(s).b(),o(s).m(v.type),o(s).is("center",v.center),o(s).is(v.effect)]),role:"alert"},[v.showIcon&&(v.$slots.icon||o(i))?(_(),oe(o(Se),{key:0,class:T([o(s).e("icon"),{[o(s).is("big")]:o(u)}])},{default:U(()=>[G(v.$slots,"icon",{},()=>[(_(),oe(Ge(o(i))))])]),_:3},8,["class"])):J("v-if",!0),F("div",{class:T(o(s).e("content"))},[v.title||v.$slots.title?(_(),V("span",{key:0,class:T([o(s).e("title"),{"with-description":o(u)}])},[G(v.$slots,"title",{},()=>[st(pe(v.title),1)])],2)):J("v-if",!0),o(u)?(_(),V("p",{key:1,class:T(o(s).e("description"))},[G(v.$slots,"default",{},()=>[st(pe(v.description),1)])],2)):J("v-if",!0),v.closable?(_(),V(Oe,{key:2},[v.closeText?(_(),V("div",{key:0,class:T([o(s).e("close-btn"),o(s).is("customed")]),onClick:d},pe(v.closeText),3)):(_(),oe(o(Se),{key:1,class:T(o(s).e("close-btn")),onClick:o(m)},{default:U(()=>[H(o(l))]),_:1},8,["class","onClick"]))],64)):J("v-if",!0)],2)],2),[[mt,r.value]])]),_:3},8,["name"]))}});var Zm=fe(Xm,[["__file","alert.vue"]]);const Jm=He(Zm),Xr=()=>bt&&/firefox/i.test(window.navigator.userAgent);let Tn;const Qm={height:"0",visibility:"hidden",overflow:Xr()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},eg=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function tg(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),l=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),a=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:eg.map(r=>[r,t.getPropertyValue(r)]),paddingSize:l,borderSize:a,boxSizing:n}}function fu(e,t=1,n){var l;Tn||(Tn=document.createElement("textarea"),document.body.appendChild(Tn));const{paddingSize:a,borderSize:s,boxSizing:r,contextStyle:i}=tg(e);i.forEach(([f,m])=>Tn==null?void 0:Tn.style.setProperty(f,m)),Object.entries(Qm).forEach(([f,m])=>Tn==null?void 0:Tn.style.setProperty(f,m,"important")),Tn.value=e.value||e.placeholder||"";let u=Tn.scrollHeight;const c={};r==="border-box"?u=u+s:r==="content-box"&&(u=u-a),Tn.value="";const d=Tn.scrollHeight-a;if(Te(t)){let f=d*t;r==="border-box"&&(f=f+a+s),u=Math.max(f,u),c.minHeight=`${f}px`}if(Te(n)){let f=d*n;r==="border-box"&&(f=f+a+s),u=Math.min(f,u)}return c.height=`${u}px`,(l=Tn.parentNode)==null||l.removeChild(Tn),Tn=void 0,c}const Vt=e=>e,ng=de({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),cn=e=>An(ng,e),pa=de({id:{type:String,default:void 0},size:Jt,disabled:Boolean,modelValue:{type:Y([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:Y([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:$t},prefixIcon:{type:$t},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Y([Object,Array,String]),default:()=>Vt({})},autofocus:Boolean,rows:{type:Number,default:2},...cn(["ariaLabel"]),inputmode:{type:Y(String),default:void 0},name:String}),lg={[De]:e=>Ve(e),input:e=>Ve(e),change:e=>Ve(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},og=["class","style"],ag=/^on[A-Z]/,bs=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n}=e,l=y(()=>((n==null?void 0:n.value)||[]).concat(og)),a=lt();return a?y(()=>{var s;return qo(Object.entries((s=a.proxy)==null?void 0:s.$attrs).filter(([r])=>!l.value.includes(r)&&!(t&&ag.test(r))))}):y(()=>({}))},vu={prefix:Math.floor(Math.random()*1e4),current:0},sg=Symbol("elIdInjection"),Zr=()=>lt()?we(sg,vu):vu,sn=e=>{const t=Zr(),n=Kr();return Ha(()=>o(e)||`${n.value}-id-${t.prefix}-${t.current++}`)},Jl=Symbol("formContextKey"),el=Symbol("formItemContextKey"),dn=()=>{const e=we(Jl,void 0),t=we(el,void 0);return{form:e,formItem:t}},Kn=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:l})=>{n||(n=I(!1)),l||(l=I(!1));const a=I();let s;const r=y(()=>{var i;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((i=t.inputIds)==null?void 0:i.length)<=1)});return Xe(()=>{s=ie([wt(e,"id"),n],([i,u])=>{const c=i??(u?void 0:sn().value);c!==a.value&&(t!=null&&t.removeInputId&&(a.value&&t.removeInputId(a.value),!(l!=null&&l.value)&&!u&&c&&t.addInputId(c)),a.value=c)},{immediate:!0})}),cs(()=>{s&&s(),t!=null&&t.removeInputId&&a.value&&t.removeInputId(a.value)}),{isLabeledByFormItem:r,inputId:a}},vd=e=>{const t=lt();return y(()=>{var n,l;return(l=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:l[e]})},Gt=(e,t={})=>{const n=I(void 0),l=t.prop?n:vd("size"),a=t.global?n:Zc(),s=t.form?{size:void 0}:we(Jl,void 0),r=t.formItem?{size:void 0}:we(el,void 0);return y(()=>l.value||o(e)||(r==null?void 0:r.size)||(s==null?void 0:s.size)||a.value||"")},fn=e=>{const t=vd("disabled"),n=we(Jl,void 0);return y(()=>t.value||o(e)||(n==null?void 0:n.disabled)||!1)},rg='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',ig=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,pu=e=>Array.from(e.querySelectorAll(rg)).filter(t=>Xo(t)&&ig(t)),Xo=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},La=function(e,t,...n){let l;t.includes("mouse")||t.includes("click")?l="MouseEvents":t.includes("key")?l="KeyboardEvent":l="HTMLEvents";const a=document.createEvent(l);return a.initEvent(t,...n),e.dispatchEvent(a),e},pd=e=>!e.getAttribute("aria-owns"),hd=(e,t,n)=>{const{parentNode:l}=e;if(!l)return null;const a=l.querySelectorAll(n),s=Array.prototype.indexOf.call(a,e);return a[s+t]||null},Ba=e=>{e&&(e.focus(),!pd(e)&&e.click())};function Ll(e,{disabled:t,beforeFocus:n,afterFocus:l,beforeBlur:a,afterBlur:s}={}){const r=lt(),{emit:i}=r,u=Lt(),c=I(!1),d=v=>{const h=Qe(n)?n(v):!1;o(t)||c.value||h||(c.value=!0,i("focus",v),l==null||l())},f=v=>{var h;const p=Qe(a)?a(v):!1;o(t)||v.relatedTarget&&((h=u.value)!=null&&h.contains(v.relatedTarget))||p||(c.value=!1,i("blur",v),s==null||s())},m=v=>{var h,p;o(t)||Xo(v.target)||(h=u.value)!=null&&h.contains(document.activeElement)&&u.value!==document.activeElement||(p=e.value)==null||p.focus()};return ie([u,()=>o(t)],([v,h])=>{v&&(h?v.removeAttribute("tabindex"):v.setAttribute("tabindex","-1"))}),xt(u,"focus",d,!0),xt(u,"blur",f,!0),xt(u,"click",m,!0),{isFocused:c,wrapperRef:u,handleFocus:d,handleBlur:f}}const ug=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);function ha({afterComposition:e,emit:t}){const n=I(!1),l=i=>{t==null||t("compositionstart",i),n.value=!0},a=i=>{var u;t==null||t("compositionupdate",i);const c=(u=i.target)==null?void 0:u.value,d=c[c.length-1]||"";n.value=!ug(d)},s=i=>{t==null||t("compositionend",i),n.value&&(n.value=!1,Ee(()=>e(i)))};return{isComposing:n,handleComposition:i=>{i.type==="compositionend"?s(i):a(i)},handleCompositionStart:l,handleCompositionUpdate:a,handleCompositionEnd:s}}function cg(e){let t;function n(){if(e.value==null)return;const{selectionStart:a,selectionEnd:s,value:r}=e.value;if(a==null||s==null)return;const i=r.slice(0,Math.max(0,a)),u=r.slice(Math.max(0,s));t={selectionStart:a,selectionEnd:s,value:r,beforeTxt:i,afterTxt:u}}function l(){if(e.value==null||t==null)return;const{value:a}=e.value,{beforeTxt:s,afterTxt:r,selectionStart:i}=t;if(s==null||r==null||i==null)return;let u=a.length;if(a.endsWith(r))u=a.length-r.length;else if(a.startsWith(s))u=s.length;else{const c=s[i-1],d=a.indexOf(c,i-1);d!==-1&&(u=d+1)}e.value.setSelectionRange(u,u)}return[n,l]}const dg="ElInput",fg=x({name:dg,inheritAttrs:!1}),vg=x({...fg,props:pa,emits:lg,setup(e,{expose:t,emit:n}){const l=e,a=pl(),s=bs(),r=Xt(),i=y(()=>[l.type==="textarea"?p.b():h.b(),h.m(m.value),h.is("disabled",v.value),h.is("exceed",Q.value),{[h.b("group")]:r.prepend||r.append,[h.m("prefix")]:r.prefix||l.prefixIcon,[h.m("suffix")]:r.suffix||l.suffixIcon||l.clearable||l.showPassword,[h.bm("suffix","password-clear")]:B.value&&A.value,[h.b("hidden")]:l.type==="hidden"},a.class]),u=y(()=>[h.e("wrapper"),h.is("focus",M.value)]),{form:c,formItem:d}=dn(),{inputId:f}=Kn(l,{formItemContext:d}),m=Gt(),v=fn(),h=ue("input"),p=ue("textarea"),g=Lt(),b=Lt(),E=I(!1),C=I(!1),w=I(),k=Lt(l.inputStyle),S=y(()=>g.value||b.value),{wrapperRef:$,isFocused:M,handleFocus:R,handleBlur:N}=Ll(S,{disabled:v,afterBlur(){var ye;l.validateEvent&&((ye=d==null?void 0:d.validate)==null||ye.call(d,"blur").catch(Ue=>void 0))}}),O=y(()=>{var ye;return(ye=c==null?void 0:c.statusIcon)!=null?ye:!1}),P=y(()=>(d==null?void 0:d.validateState)||""),W=y(()=>P.value&&gs[P.value]),K=y(()=>C.value?zm:dm),D=y(()=>[a.style]),L=y(()=>[l.inputStyle,k.value,{resize:l.resize}]),z=y(()=>qt(l.modelValue)?"":String(l.modelValue)),B=y(()=>l.clearable&&!v.value&&!l.readonly&&!!z.value&&(M.value||E.value)),A=y(()=>l.showPassword&&!v.value&&!!z.value),ne=y(()=>l.showWordLimit&&!!l.maxlength&&(l.type==="text"||l.type==="textarea")&&!v.value&&!l.readonly&&!l.showPassword),j=y(()=>z.value.length),Q=y(()=>!!ne.value&&j.value>Number(l.maxlength)),Z=y(()=>!!r.suffix||!!l.suffixIcon||B.value||l.showPassword||ne.value||!!P.value&&O.value),[ee,ae]=cg(g);Ft(b,ye=>{if(se(),!ne.value||l.resize!=="both")return;const Ue=ye[0],{width:It}=Ue.contentRect;w.value={right:`calc(100% - ${It+15+6}px)`}});const re=()=>{const{type:ye,autosize:Ue}=l;if(!(!bt||ye!=="textarea"||!b.value))if(Ue){const It=yt(Ue)?Ue.minRows:void 0,Ot=yt(Ue)?Ue.maxRows:void 0,Rt=fu(b.value,It,Ot);k.value={overflowY:"hidden",...Rt},Ee(()=>{b.value.offsetHeight,k.value=Rt})}else k.value={minHeight:fu(b.value).minHeight}},se=(ye=>{let Ue=!1;return()=>{var It;if(Ue||!l.autosize)return;((It=b.value)==null?void 0:It.offsetParent)===null||(ye(),Ue=!0)}})(re),ge=()=>{const ye=S.value,Ue=l.formatter?l.formatter(z.value):z.value;!ye||ye.value===Ue||(ye.value=Ue)},Be=async ye=>{ee();let{value:Ue}=ye.target;if(l.formatter&&l.parser&&(Ue=l.parser(Ue)),!ce.value){if(Ue===z.value){ge();return}n(De,Ue),n(Zt,Ue),await Ee(),ge(),ae()}},te=ye=>{let{value:Ue}=ye.target;l.formatter&&l.parser&&(Ue=l.parser(Ue)),n(nt,Ue)},{isComposing:ce,handleCompositionStart:Ie,handleCompositionUpdate:Ae,handleCompositionEnd:xe}=ha({emit:n,afterComposition:Be}),Ye=()=>{ee(),C.value=!C.value,setTimeout(ae)},$e=()=>{var ye;return(ye=S.value)==null?void 0:ye.focus()},Me=()=>{var ye;return(ye=S.value)==null?void 0:ye.blur()},Pe=ye=>{E.value=!1,n("mouseleave",ye)},Ze=ye=>{E.value=!0,n("mouseenter",ye)},ot=ye=>{n("keydown",ye)},at=()=>{var ye;(ye=S.value)==null||ye.select()},ct=()=>{n(De,""),n(nt,""),n("clear"),n(Zt,"")};return ie(()=>l.modelValue,()=>{var ye;Ee(()=>re()),l.validateEvent&&((ye=d==null?void 0:d.validate)==null||ye.call(d,"change").catch(Ue=>void 0))}),ie(z,()=>ge()),ie(()=>l.type,async()=>{await Ee(),ge(),re()}),Xe(()=>{!l.formatter&&l.parser,ge(),Ee(re)}),t({input:g,textarea:b,ref:S,textareaStyle:L,autosize:wt(l,"autosize"),isComposing:ce,focus:$e,blur:Me,select:at,clear:ct,resizeTextarea:re}),(ye,Ue)=>(_(),V("div",{class:T([o(i),{[o(h).bm("group","append")]:ye.$slots.append,[o(h).bm("group","prepend")]:ye.$slots.prepend}]),style:_e(o(D)),onMouseenter:Ze,onMouseleave:Pe},[J(" input "),ye.type!=="textarea"?(_(),V(Oe,{key:0},[J(" prepend slot "),ye.$slots.prepend?(_(),V("div",{key:0,class:T(o(h).be("group","prepend"))},[G(ye.$slots,"prepend")],2)):J("v-if",!0),F("div",{ref_key:"wrapperRef",ref:$,class:T(o(u))},[J(" prefix slot "),ye.$slots.prefix||ye.prefixIcon?(_(),V("span",{key:0,class:T(o(h).e("prefix"))},[F("span",{class:T(o(h).e("prefix-inner"))},[G(ye.$slots,"prefix"),ye.prefixIcon?(_(),oe(o(Se),{key:0,class:T(o(h).e("icon"))},{default:U(()=>[(_(),oe(Ge(ye.prefixIcon)))]),_:1},8,["class"])):J("v-if",!0)],2)],2)):J("v-if",!0),F("input",et({id:o(f),ref_key:"input",ref:g,class:o(h).e("inner")},o(s),{name:ye.name,minlength:ye.minlength,maxlength:ye.maxlength,type:ye.showPassword?C.value?"text":"password":ye.type,disabled:o(v),readonly:ye.readonly,autocomplete:ye.autocomplete,tabindex:ye.tabindex,"aria-label":ye.ariaLabel,placeholder:ye.placeholder,style:ye.inputStyle,form:ye.form,autofocus:ye.autofocus,role:ye.containerRole,inputmode:ye.inputmode,onCompositionstart:o(Ie),onCompositionupdate:o(Ae),onCompositionend:o(xe),onInput:Be,onChange:te,onKeydown:ot}),null,16,["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode","onCompositionstart","onCompositionupdate","onCompositionend"]),J(" suffix slot "),o(Z)?(_(),V("span",{key:1,class:T(o(h).e("suffix"))},[F("span",{class:T(o(h).e("suffix-inner"))},[!o(B)||!o(A)||!o(ne)?(_(),V(Oe,{key:0},[G(ye.$slots,"suffix"),ye.suffixIcon?(_(),oe(o(Se),{key:0,class:T(o(h).e("icon"))},{default:U(()=>[(_(),oe(Ge(ye.suffixIcon)))]),_:1},8,["class"])):J("v-if",!0)],64)):J("v-if",!0),o(B)?(_(),oe(o(Se),{key:1,class:T([o(h).e("icon"),o(h).e("clear")]),onMousedown:Le(o(Bt),["prevent"]),onClick:ct},{default:U(()=>[H(o(ml))]),_:1},8,["class","onMousedown"])):J("v-if",!0),o(A)?(_(),oe(o(Se),{key:2,class:T([o(h).e("icon"),o(h).e("password")]),onClick:Ye},{default:U(()=>[(_(),oe(Ge(o(K))))]),_:1},8,["class"])):J("v-if",!0),o(ne)?(_(),V("span",{key:3,class:T(o(h).e("count"))},[F("span",{class:T(o(h).e("count-inner"))},pe(o(j))+" / "+pe(ye.maxlength),3)],2)):J("v-if",!0),o(P)&&o(W)&&o(O)?(_(),oe(o(Se),{key:4,class:T([o(h).e("icon"),o(h).e("validateIcon"),o(h).is("loading",o(P)==="validating")])},{default:U(()=>[(_(),oe(Ge(o(W))))]),_:1},8,["class"])):J("v-if",!0)],2)],2)):J("v-if",!0)],2),J(" append slot "),ye.$slots.append?(_(),V("div",{key:1,class:T(o(h).be("group","append"))},[G(ye.$slots,"append")],2)):J("v-if",!0)],64)):(_(),V(Oe,{key:1},[J(" textarea "),F("textarea",et({id:o(f),ref_key:"textarea",ref:b,class:[o(p).e("inner"),o(h).is("focus",o(M))]},o(s),{minlength:ye.minlength,maxlength:ye.maxlength,tabindex:ye.tabindex,disabled:o(v),readonly:ye.readonly,autocomplete:ye.autocomplete,style:o(L),"aria-label":ye.ariaLabel,placeholder:ye.placeholder,form:ye.form,autofocus:ye.autofocus,rows:ye.rows,role:ye.containerRole,onCompositionstart:o(Ie),onCompositionupdate:o(Ae),onCompositionend:o(xe),onInput:Be,onFocus:o(R),onBlur:o(N),onChange:te,onKeydown:ot}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),o(ne)?(_(),V("span",{key:0,style:_e(w.value),class:T(o(h).e("count"))},pe(o(j))+" / "+pe(ye.maxlength),7)):J("v-if",!0)],64))],38))}});var pg=fe(vg,[["__file","input.vue"]]);const hn=He(pg),no=4,md={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},hg=({move:e,size:t,bar:n})=>({[n.size]:t,transform:`translate${n.axis}(${e}%)`}),Jr=Symbol("scrollbarContextKey"),mg=de({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),gg="Thumb",bg=x({__name:"thumb",props:mg,setup(e){const t=e,n=we(Jr),l=ue("scrollbar");n||jt(gg,"can not inject scrollbar context");const a=I(),s=I(),r=I({}),i=I(!1);let u=!1,c=!1,d=0,f=0,m=bt?document.onselectstart:null;const v=y(()=>md[t.vertical?"vertical":"horizontal"]),h=y(()=>hg({size:t.size,move:t.move,bar:v.value})),p=y(()=>a.value[v.value.offset]**2/n.wrapElement[v.value.scrollSize]/t.ratio/s.value[v.value.offset]),g=M=>{var R;if(M.stopPropagation(),M.ctrlKey||[1,2].includes(M.button))return;(R=window.getSelection())==null||R.removeAllRanges(),E(M);const N=M.currentTarget;N&&(r.value[v.value.axis]=N[v.value.offset]-(M[v.value.client]-N.getBoundingClientRect()[v.value.direction]))},b=M=>{if(!s.value||!a.value||!n.wrapElement)return;const R=Math.abs(M.target.getBoundingClientRect()[v.value.direction]-M[v.value.client]),N=s.value[v.value.offset]/2,O=(R-N)*100*p.value/a.value[v.value.offset];n.wrapElement[v.value.scroll]=O*n.wrapElement[v.value.scrollSize]/100},E=M=>{M.stopImmediatePropagation(),u=!0,d=n.wrapElement.scrollHeight,f=n.wrapElement.scrollWidth,document.addEventListener("mousemove",C),document.addEventListener("mouseup",w),m=document.onselectstart,document.onselectstart=()=>!1},C=M=>{if(!a.value||!s.value||u===!1)return;const R=r.value[v.value.axis];if(!R)return;const N=(a.value.getBoundingClientRect()[v.value.direction]-M[v.value.client])*-1,O=s.value[v.value.offset]-R,P=(N-O)*100*p.value/a.value[v.value.offset];v.value.scroll==="scrollLeft"?n.wrapElement[v.value.scroll]=P*f/100:n.wrapElement[v.value.scroll]=P*d/100},w=()=>{u=!1,r.value[v.value.axis]=0,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",w),$(),c&&(i.value=!1)},k=()=>{c=!1,i.value=!!t.size},S=()=>{c=!0,i.value=u};Nt(()=>{$(),document.removeEventListener("mouseup",w)});const $=()=>{document.onselectstart!==m&&(document.onselectstart=m)};return xt(wt(n,"scrollbarElement"),"mousemove",k),xt(wt(n,"scrollbarElement"),"mouseleave",S),(M,R)=>(_(),oe(an,{name:o(l).b("fade"),persisted:""},{default:U(()=>[We(F("div",{ref_key:"instance",ref:a,class:T([o(l).e("bar"),o(l).is(o(v).key)]),onMousedown:b,onClick:Le(()=>{},["stop"])},[F("div",{ref_key:"thumb",ref:s,class:T(o(l).e("thumb")),style:_e(o(h)),onMousedown:g},null,38)],42,["onClick"]),[[mt,M.always||i.value]])]),_:1},8,["name"]))}});var hu=fe(bg,[["__file","thumb.vue"]]);const yg=de({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),Cg=x({__name:"bar",props:yg,setup(e,{expose:t}){const n=e,l=we(Jr),a=I(0),s=I(0),r=I(""),i=I(""),u=I(1),c=I(1);return t({handleScroll:m=>{if(m){const v=m.offsetHeight-no,h=m.offsetWidth-no;s.value=m.scrollTop*100/v*u.value,a.value=m.scrollLeft*100/h*c.value}},update:()=>{const m=l==null?void 0:l.wrapElement;if(!m)return;const v=m.offsetHeight-no,h=m.offsetWidth-no,p=v**2/m.scrollHeight,g=h**2/m.scrollWidth,b=Math.max(p,n.minSize),E=Math.max(g,n.minSize);u.value=p/(v-p)/(b/(v-b)),c.value=g/(h-g)/(E/(h-E)),i.value=b+no(_(),V(Oe,null,[H(hu,{move:a.value,ratio:c.value,size:r.value,always:m.always},null,8,["move","ratio","size","always"]),H(hu,{move:s.value,ratio:u.value,size:i.value,vertical:"",always:m.always},null,8,["move","ratio","size","always"])],64))}});var wg=fe(Cg,[["__file","bar.vue"]]);const kg=de({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:Y([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...cn(["ariaLabel","ariaOrientation"])}),gd={"end-reached":e=>["left","right","top","bottom"].includes(e),scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(Te)},Sg="ElScrollbar",Eg=x({name:Sg}),_g=x({...Eg,props:kg,emits:gd,setup(e,{expose:t,emit:n}){const l=e,a=ue("scrollbar");let s,r,i=0,u=0,c="";const d=I(),f=I(),m=I(),v=I(),h=y(()=>{const S={};return l.height&&(S.height=zt(l.height)),l.maxHeight&&(S.maxHeight=zt(l.maxHeight)),[l.wrapStyle,S]}),p=y(()=>[l.wrapClass,a.e("wrap"),{[a.em("wrap","hidden-default")]:!l.native}]),g=y(()=>[a.e("view"),l.viewClass]),b=()=>{var S;if(f.value){(S=v.value)==null||S.handleScroll(f.value);const $=i,M=u;i=f.value.scrollTop,u=f.value.scrollLeft;const R={bottom:i+f.value.clientHeight>=f.value.scrollHeight,top:i<=0&&$!==0,right:u+f.value.clientWidth>=f.value.scrollWidth&&M!==u,left:u<=0&&M!==0};$!==i&&(c=i>$?"bottom":"top"),M!==u&&(c=u>M?"right":"left"),n("scroll",{scrollTop:i,scrollLeft:u}),R[c]&&n("end-reached",c)}};function E(S,$){yt(S)?f.value.scrollTo(S):Te(S)&&Te($)&&f.value.scrollTo(S,$)}const C=S=>{Te(S)&&(f.value.scrollTop=S)},w=S=>{Te(S)&&(f.value.scrollLeft=S)},k=()=>{var S;(S=v.value)==null||S.update()};return ie(()=>l.noresize,S=>{S?(s==null||s(),r==null||r()):({stop:s}=Ft(m,k),r=xt("resize",k))},{immediate:!0}),ie(()=>[l.maxHeight,l.height],()=>{l.native||Ee(()=>{var S;k(),f.value&&((S=v.value)==null||S.handleScroll(f.value))})}),rt(Jr,kt({scrollbarElement:d,wrapElement:f})),Fr(()=>{f.value&&(f.value.scrollTop=i,f.value.scrollLeft=u)}),Xe(()=>{l.native||Ee(()=>{k()})}),hl(()=>k()),t({wrapRef:f,update:k,scrollTo:E,setScrollTop:C,setScrollLeft:w,handleScroll:b}),(S,$)=>(_(),V("div",{ref_key:"scrollbarRef",ref:d,class:T(o(a).b())},[F("div",{ref_key:"wrapRef",ref:f,class:T(o(p)),style:_e(o(h)),tabindex:S.tabindex,onScroll:b},[(_(),oe(Ge(S.tag),{id:S.id,ref_key:"resizeRef",ref:m,class:T(o(g)),style:_e(S.viewStyle),role:S.role,"aria-label":S.ariaLabel,"aria-orientation":S.ariaOrientation},{default:U(()=>[G(S.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),S.native?J("v-if",!0):(_(),oe(wg,{key:0,ref_key:"barRef",ref:v,always:S.always,"min-size":S.minSize},null,8,["always","min-size"]))],2))}});var Tg=fe(_g,[["__file","scrollbar.vue"]]);const jn=He(Tg),Qr=Symbol("popper"),bd=Symbol("popperContent"),yd=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],Cd=de({role:{type:String,values:yd,default:"tooltip"}}),$g=x({name:"ElPopper",inheritAttrs:!1}),Ng=x({...$g,props:Cd,setup(e,{expose:t}){const n=e,l=I(),a=I(),s=I(),r=I(),i=y(()=>n.role),u={triggerRef:l,popperInstanceRef:a,contentRef:s,referenceRef:r,role:i};return t(u),rt(Qr,u),(c,d)=>G(c.$slots,"default")}});var Ig=fe(Ng,[["__file","popper.vue"]]);const Mg=x({name:"ElPopperArrow",inheritAttrs:!1}),Rg=x({...Mg,setup(e,{expose:t}){const n=ue("popper"),{arrowRef:l,arrowStyle:a}=we(bd,void 0);return Nt(()=>{l.value=void 0}),t({arrowRef:l}),(s,r)=>(_(),V("span",{ref_key:"arrowRef",ref:l,class:T(o(n).e("arrow")),style:_e(o(a)),"data-popper-arrow":""},null,6))}});var Pg=fe(Rg,[["__file","arrow.vue"]]);const wd=de({virtualRef:{type:Y(Object)},virtualTriggering:Boolean,onMouseenter:{type:Y(Function)},onMouseleave:{type:Y(Function)},onClick:{type:Y(Function)},onKeydown:{type:Y(Function)},onFocus:{type:Y(Function)},onBlur:{type:Y(Function)},onContextmenu:{type:Y(Function)},id:String,open:Boolean}),kd=Symbol("elForwardRef"),Og=e=>{rt(kd,{setForwardRef:n=>{e.value=n}})},Lg=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),Bg="ElOnlyChild",Sd=x({name:Bg,setup(e,{slots:t,attrs:n}){var l;const a=we(kd),s=Lg((l=a==null?void 0:a.setForwardRef)!=null?l:Bt);return()=>{var r;const i=(r=t.default)==null?void 0:r.call(t,n);if(!i||i.length>1)return null;const u=Ed(i);return u?We(Np(u,n),[[s]]):null}}});function Ed(e){if(!e)return null;const t=e;for(const n of t){if(yt(n))switch(n.type){case jl:continue;case Nc:case"svg":return mu(n);case Oe:return Ed(n.children);default:return n}return mu(n)}return null}function mu(e){const t=ue("only-child");return H("span",{class:t.e("content")},[e])}const Vg=x({name:"ElPopperTrigger",inheritAttrs:!1}),Dg=x({...Vg,props:wd,setup(e,{expose:t}){const n=e,{role:l,triggerRef:a}=we(Qr,void 0);Og(a);const s=y(()=>i.value?n.id:void 0),r=y(()=>{if(l&&l.value==="tooltip")return n.open&&n.id?n.id:void 0}),i=y(()=>{if(l&&l.value!=="tooltip")return l.value}),u=y(()=>i.value?`${n.open}`:void 0);let c;const d=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return Xe(()=>{ie(()=>n.virtualRef,f=>{f&&(a.value=ua(f))},{immediate:!0}),ie(a,(f,m)=>{c==null||c(),c=void 0,_n(f)&&(d.forEach(v=>{var h;const p=n[v];p&&(f.addEventListener(v.slice(2).toLowerCase(),p),(h=m==null?void 0:m.removeEventListener)==null||h.call(m,v.slice(2).toLowerCase(),p))}),Xo(f)&&(c=ie([s,r,i,u],v=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((h,p)=>{qt(v[p])?f.removeAttribute(h):f.setAttribute(h,v[p])})},{immediate:!0}))),_n(m)&&Xo(m)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(v=>m.removeAttribute(v))},{immediate:!0})}),Nt(()=>{if(c==null||c(),c=void 0,a.value&&_n(a.value)){const f=a.value;d.forEach(m=>{const v=n[m];v&&f.removeEventListener(m.slice(2).toLowerCase(),v)}),a.value=void 0}}),t({triggerRef:a}),(f,m)=>f.virtualTriggering?J("v-if",!0):(_(),oe(o(Sd),et({key:0},f.$attrs,{"aria-controls":o(s),"aria-describedby":o(r),"aria-expanded":o(u),"aria-haspopup":o(i)}),{default:U(()=>[G(f.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var Ag=fe(Dg,[["__file","trigger.vue"]]);const As="focus-trap.focus-after-trapped",Fs="focus-trap.focus-after-released",Fg="focus-trap.focusout-prevented",gu={cancelable:!0,bubbles:!1},xg={cancelable:!0,bubbles:!1},bu="focusAfterTrapped",yu="focusAfterReleased",ei=Symbol("elFocusTrap"),ti=I(),ys=I(0),ni=I(0);let Sa=0;const _d=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const a=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||a?NodeFilter.FILTER_SKIP:l.tabIndex>=0||l===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},Cu=(e,t)=>{for(const n of e)if(!zg(n,t))return n},zg=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},Hg=e=>{const t=_d(e),n=Cu(t,e),l=Cu(t.reverse(),e);return[n,l]},Kg=e=>e instanceof HTMLInputElement&&"select"in e,al=(e,t)=>{if(e&&e.focus){const n=document.activeElement;let l=!1;_n(e)&&!Xo(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),l=!0),e.focus({preventScroll:!0}),ni.value=window.performance.now(),e!==n&&Kg(e)&&t&&e.select(),_n(e)&&l&&e.removeAttribute("tabindex")}};function wu(e,t){const n=[...e],l=e.indexOf(t);return l!==-1&&n.splice(l,1),n}const Wg=()=>{let e=[];return{push:l=>{const a=e[0];a&&l!==a&&a.pause(),e=wu(e,l),e.unshift(l)},remove:l=>{var a,s;e=wu(e,l),(s=(a=e[0])==null?void 0:a.resume)==null||s.call(a)}}},jg=(e,t=!1)=>{const n=document.activeElement;for(const l of e)if(al(l,t),document.activeElement!==n)return},ku=Wg(),Ug=()=>ys.value>ni.value,Ea=()=>{ti.value="pointer",ys.value=window.performance.now()},Su=()=>{ti.value="keyboard",ys.value=window.performance.now()},Yg=()=>(Xe(()=>{Sa===0&&(document.addEventListener("mousedown",Ea),document.addEventListener("touchstart",Ea),document.addEventListener("keydown",Su)),Sa++}),Nt(()=>{Sa--,Sa<=0&&(document.removeEventListener("mousedown",Ea),document.removeEventListener("touchstart",Ea),document.removeEventListener("keydown",Su))}),{focusReason:ti,lastUserFocusTimestamp:ys,lastAutomatedFocusTimestamp:ni}),_a=e=>new CustomEvent(Fg,{...xg,detail:e}),Ce={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"};let io=[];const Eu=e=>{e.code===Ce.esc&&io.forEach(t=>t(e))},qg=e=>{Xe(()=>{io.length===0&&document.addEventListener("keydown",Eu),bt&&io.push(e)}),Nt(()=>{io=io.filter(t=>t!==e),io.length===0&&bt&&document.removeEventListener("keydown",Eu)})},Gg=x({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[bu,yu,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=I();let l,a;const{focusReason:s}=Yg();qg(h=>{e.trapped&&!r.paused&&t("release-requested",h)});const r={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},i=h=>{if(!e.loop&&!e.trapped||r.paused)return;const{code:p,altKey:g,ctrlKey:b,metaKey:E,currentTarget:C,shiftKey:w}=h,{loop:k}=e,S=p===Ce.tab&&!g&&!b&&!E,$=document.activeElement;if(S&&$){const M=C,[R,N]=Hg(M);if(R&&N){if(!w&&$===N){const P=_a({focusReason:s.value});t("focusout-prevented",P),P.defaultPrevented||(h.preventDefault(),k&&al(R,!0))}else if(w&&[R,M].includes($)){const P=_a({focusReason:s.value});t("focusout-prevented",P),P.defaultPrevented||(h.preventDefault(),k&&al(N,!0))}}else if($===M){const P=_a({focusReason:s.value});t("focusout-prevented",P),P.defaultPrevented||h.preventDefault()}}};rt(ei,{focusTrapRef:n,onKeydown:i}),ie(()=>e.focusTrapEl,h=>{h&&(n.value=h)},{immediate:!0}),ie([n],([h],[p])=>{h&&(h.addEventListener("keydown",i),h.addEventListener("focusin",d),h.addEventListener("focusout",f)),p&&(p.removeEventListener("keydown",i),p.removeEventListener("focusin",d),p.removeEventListener("focusout",f))});const u=h=>{t(bu,h)},c=h=>t(yu,h),d=h=>{const p=o(n);if(!p)return;const g=h.target,b=h.relatedTarget,E=g&&p.contains(g);e.trapped||b&&p.contains(b)||(l=b),E&&t("focusin",h),!r.paused&&e.trapped&&(E?a=g:al(a,!0))},f=h=>{const p=o(n);if(!(r.paused||!p))if(e.trapped){const g=h.relatedTarget;!qt(g)&&!p.contains(g)&&setTimeout(()=>{if(!r.paused&&e.trapped){const b=_a({focusReason:s.value});t("focusout-prevented",b),b.defaultPrevented||al(a,!0)}},0)}else{const g=h.target;g&&p.contains(g)||t("focusout",h)}};async function m(){await Ee();const h=o(n);if(h){ku.push(r);const p=h.contains(document.activeElement)?l:document.activeElement;if(l=p,!h.contains(p)){const b=new Event(As,gu);h.addEventListener(As,u),h.dispatchEvent(b),b.defaultPrevented||Ee(()=>{let E=e.focusStartEl;Ve(E)||(al(E),document.activeElement!==E&&(E="first")),E==="first"&&jg(_d(h),!0),(document.activeElement===p||E==="container")&&al(h)})}}}function v(){const h=o(n);if(h){h.removeEventListener(As,u);const p=new CustomEvent(Fs,{...gu,detail:{focusReason:s.value}});h.addEventListener(Fs,c),h.dispatchEvent(p),!p.defaultPrevented&&(s.value=="keyboard"||!Ug()||h.contains(document.activeElement))&&al(l??document.body),h.removeEventListener(Fs,c),ku.remove(r)}}return Xe(()=>{e.trapped&&m(),ie(()=>e.trapped,h=>{h?m():v()})}),Nt(()=>{e.trapped&&v(),n.value&&(n.value.removeEventListener("keydown",i),n.value.removeEventListener("focusin",d),n.value.removeEventListener("focusout",f),n.value=void 0)}),{onKeydown:i}}});function Xg(e,t,n,l,a,s){return G(e.$slots,"default",{handleKeydown:e.onKeydown})}var Ro=fe(Gg,[["render",Xg],["__file","focus-trap.vue"]]);const Td=de({arrowOffset:{type:Number,default:5}}),Zg=["fixed","absolute"],Jg=de({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Y(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Xl,default:"bottom"},popperOptions:{type:Y(Object),default:()=>({})},strategy:{type:String,values:Zg,default:"absolute"}}),$d=de({...Jg,...Td,id:String,style:{type:Y([String,Array,Object])},className:{type:Y([String,Array,Object])},effect:{type:Y(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:Boolean,trapping:Boolean,popperClass:{type:Y([String,Array,Object])},popperStyle:{type:Y([String,Array,Object])},referenceEl:{type:Y(Object)},triggerTargetEl:{type:Y(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...cn(["ariaLabel"])}),Qg={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},eb=(e,t)=>{const n=I(!1),l=I();return{focusStartRef:l,trapped:n,onFocusAfterReleased:c=>{var d;((d=c.detail)==null?void 0:d.focusReason)!=="pointer"&&(l.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:c=>{e.visible&&!n.value&&(c.target&&(l.value=c.target),n.value=!0)},onFocusoutPrevented:c=>{e.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,t("close")}}},tb=(e,t=[])=>{const{placement:n,strategy:l,popperOptions:a}=e,s={placement:n,strategy:l,...a,modifiers:[...lb(e),...t]};return ob(s,a==null?void 0:a.modifiers),s},nb=e=>{if(bt)return ua(e)};function lb(e){const{offset:t,gpuAcceleration:n,fallbackPlacements:l}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:l}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function ob(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const ab=(e,t,n={})=>{const l={name:"updateState",enabled:!0,phase:"write",fn:({state:u})=>{const c=sb(u);Object.assign(r.value,c)},requires:["computeStyles"]},a=y(()=>{const{onFirstUpdate:u,placement:c,strategy:d,modifiers:f}=o(n);return{onFirstUpdate:u,placement:c||"bottom",strategy:d||"absolute",modifiers:[...f||[],l,{name:"applyStyles",enabled:!1}]}}),s=Lt(),r=I({styles:{popper:{position:o(a).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),i=()=>{s.value&&(s.value.destroy(),s.value=void 0)};return ie(a,u=>{const c=o(s);c&&c.setOptions(u)},{deep:!0}),ie([e,t],([u,c])=>{i(),!(!u||!c)&&(s.value=Up(u,c,o(a)))}),Nt(()=>{i()}),{state:y(()=>{var u;return{...((u=o(s))==null?void 0:u.state)||{}}}),styles:y(()=>o(r).styles),attributes:y(()=>o(r).attributes),update:()=>{var u;return(u=o(s))==null?void 0:u.update()},forceUpdate:()=>{var u;return(u=o(s))==null?void 0:u.forceUpdate()},instanceRef:y(()=>o(s))}};function sb(e){const t=Object.keys(e.elements),n=qo(t.map(a=>[a,e.styles[a]||{}])),l=qo(t.map(a=>[a,e.attributes[a]]));return{styles:n,attributes:l}}const rb=0,ib=e=>{const{popperInstanceRef:t,contentRef:n,triggerRef:l,role:a}=we(Qr,void 0),s=I(),r=y(()=>e.arrowOffset),i=y(()=>({name:"eventListeners",enabled:!!e.visible})),u=y(()=>{var b;const E=o(s),C=(b=o(r))!=null?b:rb;return{name:"arrow",enabled:!Yp(E),options:{element:E,padding:C}}}),c=y(()=>({onFirstUpdate:()=>{h()},...tb(e,[o(u),o(i)])})),d=y(()=>nb(e.referenceEl)||o(l)),{attributes:f,state:m,styles:v,update:h,forceUpdate:p,instanceRef:g}=ab(d,n,c);return ie(g,b=>t.value=b,{flush:"sync"}),Xe(()=>{ie(()=>{var b;return(b=o(d))==null?void 0:b.getBoundingClientRect()},()=>{h()})}),{attributes:f,arrowRef:s,contentRef:n,instanceRef:g,state:m,styles:v,role:a,forceUpdate:p,update:h}},ub=(e,{attributes:t,styles:n,role:l})=>{const{nextZIndex:a}=Mo(),s=ue("popper"),r=y(()=>o(t).popper),i=I(Te(e.zIndex)?e.zIndex:a()),u=y(()=>[s.b(),s.is("pure",e.pure),s.is(e.effect),e.popperClass]),c=y(()=>[{zIndex:o(i)},o(n).popper,e.popperStyle||{}]),d=y(()=>l.value==="dialog"?"false":void 0),f=y(()=>o(n).arrow||{});return{ariaModal:d,arrowStyle:f,contentAttrs:r,contentClass:u,contentStyle:c,contentZIndex:i,updateZIndex:()=>{i.value=Te(e.zIndex)?e.zIndex:a()}}},cb=x({name:"ElPopperContent"}),db=x({...cb,props:$d,emits:Qg,setup(e,{expose:t,emit:n}){const l=e,{focusStartRef:a,trapped:s,onFocusAfterReleased:r,onFocusAfterTrapped:i,onFocusInTrap:u,onFocusoutPrevented:c,onReleaseRequested:d}=eb(l,n),{attributes:f,arrowRef:m,contentRef:v,styles:h,instanceRef:p,role:g,update:b}=ib(l),{ariaModal:E,arrowStyle:C,contentAttrs:w,contentClass:k,contentStyle:S,updateZIndex:$}=ub(l,{styles:h,attributes:f,role:g}),M=we(el,void 0);rt(bd,{arrowStyle:C,arrowRef:m}),M&&rt(el,{...M,addInputId:Bt,removeInputId:Bt});let R;const N=(P=!0)=>{b(),P&&$()},O=()=>{N(!1),l.visible&&l.focusOnShow?s.value=!0:l.visible===!1&&(s.value=!1)};return Xe(()=>{ie(()=>l.triggerTargetEl,(P,W)=>{R==null||R(),R=void 0;const K=o(P||v.value),D=o(W||v.value);_n(K)&&(R=ie([g,()=>l.ariaLabel,E,()=>l.id],L=>{["role","aria-label","aria-modal","id"].forEach((z,B)=>{qt(L[B])?K.removeAttribute(z):K.setAttribute(z,L[B])})},{immediate:!0})),D!==K&&_n(D)&&["role","aria-label","aria-modal","id"].forEach(L=>{D.removeAttribute(L)})},{immediate:!0}),ie(()=>l.visible,O,{immediate:!0})}),Nt(()=>{R==null||R(),R=void 0}),t({popperContentRef:v,popperInstanceRef:p,updatePopper:N,contentStyle:S}),(P,W)=>(_(),V("div",et({ref_key:"contentRef",ref:v},o(w),{style:o(S),class:o(k),tabindex:"-1",onMouseenter:K=>P.$emit("mouseenter",K),onMouseleave:K=>P.$emit("mouseleave",K)}),[H(o(Ro),{trapped:o(s),"trap-on-focus-in":!0,"focus-trap-el":o(v),"focus-start-el":o(a),onFocusAfterTrapped:o(i),onFocusAfterReleased:o(r),onFocusin:o(u),onFocusoutPrevented:o(c),onReleaseRequested:o(d)},{default:U(()=>[G(P.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var fb=fe(db,[["__file","content.vue"]]);const Nd=He(Ig),Cs=Symbol("elTooltip"),ws=de({to:{type:Y([String,Object]),required:!0},disabled:Boolean}),Wt=de({...ad,...$d,appendTo:{type:ws.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:Y(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...cn(["ariaLabel"])}),mo=de({...wd,disabled:Boolean,trigger:{type:Y([String,Array]),default:"hover"},triggerKeys:{type:Y(Array),default:()=>[Ce.enter,Ce.numpadEnter,Ce.space]}}),vb=Un({type:Y(Boolean),default:null}),pb=Un({type:Y(Function)}),hb=e=>{const t=`update:${e}`,n=`onUpdate:${e}`,l=[t],a={[e]:vb,[n]:pb};return{useModelToggle:({indicator:r,toggleReason:i,shouldHideWhenRouteChanges:u,shouldProceed:c,onShow:d,onHide:f})=>{const m=lt(),{emit:v}=m,h=m.props,p=y(()=>Qe(h[n])),g=y(()=>h[e]===null),b=$=>{r.value!==!0&&(r.value=!0,i&&(i.value=$),Qe(d)&&d($))},E=$=>{r.value!==!1&&(r.value=!1,i&&(i.value=$),Qe(f)&&f($))},C=$=>{if(h.disabled===!0||Qe(c)&&!c())return;const M=p.value&&bt;M&&v(t,!0),(g.value||!M)&&b($)},w=$=>{if(h.disabled===!0||!bt)return;const M=p.value&&bt;M&&v(t,!1),(g.value||!M)&&E($)},k=$=>{_t($)&&(h.disabled&&$?p.value&&v(t,!1):r.value!==$&&($?b():E()))},S=()=>{r.value?w():C()};return ie(()=>h[e],k),u&&m.appContext.config.globalProperties.$route!==void 0&&ie(()=>({...m.proxy.$route}),()=>{u.value&&r.value&&w()}),Xe(()=>{k(h[e])}),{hide:w,show:C,toggle:S,hasUpdateHandler:p}},useModelToggleProps:a,useModelToggleEmits:l}},{useModelToggleProps:mb,useModelToggleEmits:gb,useModelToggle:bb}=hb("visible"),yb=de({...Cd,...mb,...Wt,...mo,...Td,showArrow:{type:Boolean,default:!0}}),Cb=[...gb,"before-show","before-hide","show","hide","open","close"],wb=(e,t)=>ke(e)?e.includes(t):e===t,lo=(e,t,n)=>l=>{wb(o(e),t)&&n(l)},Ht=(e,t,{checkForDefaultPrevented:n=!0}={})=>a=>{const s=e==null?void 0:e(a);if(n===!1||!s)return t==null?void 0:t(a)},_u=e=>t=>t.pointerType==="mouse"?e(t):void 0,kb=x({name:"ElTooltipTrigger"}),Sb=x({...kb,props:mo,setup(e,{expose:t}){const n=e,l=ue("tooltip"),{controlled:a,id:s,open:r,onOpen:i,onClose:u,onToggle:c}=we(Cs,void 0),d=I(null),f=()=>{if(o(a)||n.disabled)return!0},m=wt(n,"trigger"),v=Ht(f,lo(m,"hover",i)),h=Ht(f,lo(m,"hover",u)),p=Ht(f,lo(m,"click",w=>{w.button===0&&c(w)})),g=Ht(f,lo(m,"focus",i)),b=Ht(f,lo(m,"focus",u)),E=Ht(f,lo(m,"contextmenu",w=>{w.preventDefault(),c(w)})),C=Ht(f,w=>{const{code:k}=w;n.triggerKeys.includes(k)&&(w.preventDefault(),c(w))});return t({triggerRef:d}),(w,k)=>(_(),oe(o(Ag),{id:o(s),"virtual-ref":w.virtualRef,open:o(r),"virtual-triggering":w.virtualTriggering,class:T(o(l).e("trigger")),onBlur:o(b),onClick:o(p),onContextmenu:o(E),onFocus:o(g),onMouseenter:o(v),onMouseleave:o(h),onKeydown:o(C)},{default:U(()=>[G(w.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var Eb=fe(Sb,[["__file","trigger.vue"]]);const _b=x({__name:"teleport",props:ws,setup(e){return(t,n)=>t.disabled?G(t.$slots,"default",{key:0}):(_(),oe(Ip,{key:1,to:t.to},[G(t.$slots,"default")],8,["to"]))}});var Tb=fe(_b,[["__file","teleport.vue"]]);const Po=He(Tb),Id=()=>{const e=Kr(),t=Zr(),n=y(()=>`${e.value}-popper-container-${t.prefix}`),l=y(()=>`#${n.value}`);return{id:n,selector:l}},$b=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},Nb=()=>{const{id:e,selector:t}=Id();return xr(()=>{bt&&(document.body.querySelector(t.value)||$b(e.value))}),{id:e,selector:t}},Ib=x({name:"ElTooltipContent",inheritAttrs:!1}),Mb=x({...Ib,props:Wt,setup(e,{expose:t}){const n=e,{selector:l}=Id(),a=ue("tooltip"),s=I(),r=Ha(()=>{var B;return(B=s.value)==null?void 0:B.popperContentRef});let i;const{controlled:u,id:c,open:d,trigger:f,onClose:m,onOpen:v,onShow:h,onHide:p,onBeforeShow:g,onBeforeHide:b}=we(Cs,void 0),E=y(()=>n.transition||`${a.namespace.value}-fade-in-linear`),C=y(()=>n.persistent);Nt(()=>{i==null||i()});const w=y(()=>o(C)?!0:o(d)),k=y(()=>n.disabled?!1:o(d)),S=y(()=>n.appendTo||l.value),$=y(()=>{var B;return(B=n.style)!=null?B:{}}),M=I(!0),R=()=>{p(),z()&&al(document.body),M.value=!0},N=()=>{if(o(u))return!0},O=Ht(N,()=>{n.enterable&&o(f)==="hover"&&v()}),P=Ht(N,()=>{o(f)==="hover"&&m()}),W=()=>{var B,A;(A=(B=s.value)==null?void 0:B.updatePopper)==null||A.call(B),g==null||g()},K=()=>{b==null||b()},D=()=>{h()},L=()=>{n.virtualTriggering||m()},z=B=>{var A;const ne=(A=s.value)==null?void 0:A.popperContentRef,j=(B==null?void 0:B.relatedTarget)||document.activeElement;return ne==null?void 0:ne.contains(j)};return ie(()=>o(d),B=>{B?(M.value=!1,i=zr(r,()=>{if(o(u))return;o(f)!=="hover"&&m()})):i==null||i()},{flush:"post"}),ie(()=>n.content,()=>{var B,A;(A=(B=s.value)==null?void 0:B.updatePopper)==null||A.call(B)}),t({contentRef:s,isFocusInsideContent:z}),(B,A)=>(_(),oe(o(Po),{disabled:!B.teleported,to:o(S)},{default:U(()=>[H(an,{name:o(E),onAfterLeave:R,onBeforeEnter:W,onAfterEnter:D,onBeforeLeave:K},{default:U(()=>[o(w)?We((_(),oe(o(fb),et({key:0,id:o(c),ref_key:"contentRef",ref:s},B.$attrs,{"aria-label":B.ariaLabel,"aria-hidden":M.value,"boundaries-padding":B.boundariesPadding,"fallback-placements":B.fallbackPlacements,"gpu-acceleration":B.gpuAcceleration,offset:B.offset,placement:B.placement,"popper-options":B.popperOptions,"arrow-offset":B.arrowOffset,strategy:B.strategy,effect:B.effect,enterable:B.enterable,pure:B.pure,"popper-class":B.popperClass,"popper-style":[B.popperStyle,o($)],"reference-el":B.referenceEl,"trigger-target-el":B.triggerTargetEl,visible:o(k),"z-index":B.zIndex,onMouseenter:o(O),onMouseleave:o(P),onBlur:L,onClose:o(m)}),{default:U(()=>[G(B.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","arrow-offset","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[mt,o(k)]]):J("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var Rb=fe(Mb,[["__file","content.vue"]]);const Pb=x({name:"ElTooltip"}),Ob=x({...Pb,props:yb,emits:Cb,setup(e,{expose:t,emit:n}){const l=e;Nb();const a=ue("tooltip"),s=sn(),r=I(),i=I(),u=()=>{var C;const w=o(r);w&&((C=w.popperInstanceRef)==null||C.update())},c=I(!1),d=I(),{show:f,hide:m,hasUpdateHandler:v}=bb({indicator:c,toggleReason:d}),{onOpen:h,onClose:p}=sd({showAfter:wt(l,"showAfter"),hideAfter:wt(l,"hideAfter"),autoClose:wt(l,"autoClose"),open:f,close:m}),g=y(()=>_t(l.visible)&&!v.value),b=y(()=>[a.b(),l.popperClass]);rt(Cs,{controlled:g,id:s,open:Ic(c),trigger:wt(l,"trigger"),onOpen:C=>{h(C)},onClose:C=>{p(C)},onToggle:C=>{o(c)?p(C):h(C)},onShow:()=>{n("show",d.value)},onHide:()=>{n("hide",d.value)},onBeforeShow:()=>{n("before-show",d.value)},onBeforeHide:()=>{n("before-hide",d.value)},updatePopper:u}),ie(()=>l.disabled,C=>{C&&c.value&&(c.value=!1)});const E=C=>{var w;return(w=i.value)==null?void 0:w.isFocusInsideContent(C)};return Mp(()=>c.value&&m()),t({popperRef:r,contentRef:i,isFocusInsideContent:E,updatePopper:u,onOpen:h,onClose:p,hide:m}),(C,w)=>(_(),oe(o(Nd),{ref_key:"popperRef",ref:r,role:C.role},{default:U(()=>[H(Eb,{disabled:C.disabled,trigger:C.trigger,"trigger-keys":C.triggerKeys,"virtual-ref":C.virtualRef,"virtual-triggering":C.virtualTriggering},{default:U(()=>[C.$slots.default?G(C.$slots,"default",{key:0}):J("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),H(Rb,{ref_key:"contentRef",ref:i,"aria-label":C.ariaLabel,"boundaries-padding":C.boundariesPadding,content:C.content,disabled:C.disabled,effect:C.effect,enterable:C.enterable,"fallback-placements":C.fallbackPlacements,"hide-after":C.hideAfter,"gpu-acceleration":C.gpuAcceleration,offset:C.offset,persistent:C.persistent,"popper-class":o(b),"popper-style":C.popperStyle,placement:C.placement,"popper-options":C.popperOptions,"arrow-offset":C.arrowOffset,pure:C.pure,"raw-content":C.rawContent,"reference-el":C.referenceEl,"trigger-target-el":C.triggerTargetEl,"show-after":C.showAfter,strategy:C.strategy,teleported:C.teleported,transition:C.transition,"virtual-triggering":C.virtualTriggering,"z-index":C.zIndex,"append-to":C.appendTo},{default:U(()=>[G(C.$slots,"content",{},()=>[C.rawContent?(_(),V("span",{key:0,innerHTML:C.content},null,8,["innerHTML"])):(_(),V("span",{key:1},pe(C.content),1))]),C.showArrow?(_(),oe(o(Pg),{key:0})):J("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","arrow-offset","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var Lb=fe(Ob,[["__file","tooltip.vue"]]);const un=He(Lb),Bb=de({...pa,valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:Y(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:Y([Function,Array]),default:Bt},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:Boolean,hideLoading:Boolean,teleported:Wt.teleported,appendTo:Wt.appendTo,highlightFirstItem:Boolean,fitInputWidth:Boolean}),Vb={[De]:e=>Ve(e),[Zt]:e=>Ve(e),[nt]:e=>Ve(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,select:e=>yt(e)},Md="ElAutocomplete",Db=x({name:Md,inheritAttrs:!1}),Ab=x({...Db,props:Bb,emits:Vb,setup(e,{expose:t,emit:n}){const l=e,a=y(()=>An(l,Object.keys(pa))),s=pl(),r=fn(),i=ue("autocomplete"),u=I(),c=I(),d=I(),f=I();let m=!1,v=!1;const h=I([]),p=I(-1),g=I(""),b=I(!1),E=I(!1),C=I(!1),w=sn(),k=y(()=>s.style),S=y(()=>(h.value.length>0||C.value)&&b.value),$=y(()=>!l.hideLoading&&C.value),M=y(()=>u.value?Array.from(u.value.$el.querySelectorAll("input")):[]),R=()=>{S.value&&(g.value=`${u.value.$el.offsetWidth}px`)},N=()=>{p.value=-1},O=async le=>{if(E.value)return;const se=ge=>{C.value=!1,!E.value&&(ke(ge)?(h.value=ge,p.value=l.highlightFirstItem?0:-1):jt(Md,"autocomplete suggestions must be an array"))};if(C.value=!0,ke(l.fetchSuggestions))se(l.fetchSuggestions);else{const ge=await l.fetchSuggestions(le,se);ke(ge)&&se(ge)}},P=Ln(O,l.debounce),W=le=>{const se=!!le;if(n(Zt,le),n(De,le),E.value=!1,b.value||(b.value=se),!l.triggerOnFocus&&!le){E.value=!0,h.value=[];return}P(le)},K=le=>{var se;r.value||(((se=le.target)==null?void 0:se.tagName)!=="INPUT"||M.value.includes(document.activeElement))&&(b.value=!0)},D=le=>{n(nt,le)},L=le=>{var se;if(v)v=!1;else{b.value=!0,n("focus",le);const ge=(se=l.modelValue)!=null?se:"";l.triggerOnFocus&&!m&&P(String(ge))}},z=le=>{setTimeout(()=>{var se;if((se=d.value)!=null&&se.isFocusInsideContent()){v=!0;return}b.value&&j(),n("blur",le)})},B=()=>{b.value=!1,n(De,""),n("clear")},A=async()=>{S.value&&p.value>=0&&p.value{S.value&&(le.preventDefault(),le.stopPropagation(),j())},j=()=>{b.value=!1},Q=()=>{var le;(le=u.value)==null||le.focus()},Z=()=>{var le;(le=u.value)==null||le.blur()},ee=async le=>{n(Zt,le[l.valueKey]),n(De,le[l.valueKey]),n("select",le),h.value=[],p.value=-1},ae=le=>{if(!S.value||C.value)return;if(le<0){p.value=-1;return}le>=h.value.length&&(le=h.value.length-1);const se=c.value.querySelector(`.${i.be("suggestion","wrap")}`),Be=se.querySelectorAll(`.${i.be("suggestion","list")} li`)[le],te=se.scrollTop,{offsetTop:ce,scrollHeight:Ie}=Be;ce+Ie>te+se.clientHeight&&(se.scrollTop+=Ie),ce{var le;(le=d.value)!=null&&le.isFocusInsideContent()||S.value&&j()});return Nt(()=>{re==null||re()}),Xe(()=>{u.value.ref.setAttribute("role","textbox"),u.value.ref.setAttribute("aria-autocomplete","list"),u.value.ref.setAttribute("aria-controls","id"),u.value.ref.setAttribute("aria-activedescendant",`${w.value}-item-${p.value}`),m=u.value.ref.hasAttribute("readonly")}),t({highlightedIndex:p,activated:b,loading:C,inputRef:u,popperRef:d,suggestions:h,handleSelect:ee,handleKeyEnter:A,focus:Q,blur:Z,close:j,highlight:ae,getData:O}),(le,se)=>(_(),oe(o(un),{ref_key:"popperRef",ref:d,visible:o(S),placement:le.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[o(i).e("popper"),le.popperClass],teleported:le.teleported,"append-to":le.appendTo,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${o(i).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:R,onHide:N},{content:U(()=>[F("div",{ref_key:"regionRef",ref:c,class:T([o(i).b("suggestion"),o(i).is("loading",o($))]),style:_e({[le.fitInputWidth?"width":"minWidth"]:g.value,outline:"none"}),role:"region"},[H(o(jn),{id:o(w),tag:"ul","wrap-class":o(i).be("suggestion","wrap"),"view-class":o(i).be("suggestion","list"),role:"listbox"},{default:U(()=>[o($)?(_(),V("li",{key:0},[G(le.$slots,"loading",{},()=>[H(o(Se),{class:T(o(i).is("loading"))},{default:U(()=>[H(o(Qn))]),_:1},8,["class"])])])):(_(!0),V(Oe,{key:1},ut(h.value,(ge,Be)=>(_(),V("li",{id:`${o(w)}-item-${Be}`,key:Be,class:T({highlighted:p.value===Be}),role:"option","aria-selected":p.value===Be,onClick:te=>ee(ge)},[G(le.$slots,"default",{item:ge},()=>[st(pe(ge[le.valueKey]),1)])],10,["id","aria-selected","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class"])],6)]),default:U(()=>[F("div",{ref_key:"listboxRef",ref:f,class:T([o(i).b(),le.$attrs.class]),style:_e(o(k)),role:"combobox","aria-haspopup":"listbox","aria-expanded":o(S),"aria-owns":o(w)},[H(o(hn),et({ref_key:"inputRef",ref:u},et(o(a),le.$attrs),{"model-value":le.modelValue,disabled:o(r),onInput:W,onChange:D,onFocus:L,onBlur:z,onClear:B,onKeydown:[Tt(Le(ge=>ae(p.value-1),["prevent"]),["up"]),Tt(Le(ge=>ae(p.value+1),["prevent"]),["down"]),Tt(A,["enter"]),Tt(j,["tab"]),Tt(ne,["esc"])],onMousedown:K}),Mn({_:2},[le.$slots.prepend?{name:"prepend",fn:U(()=>[G(le.$slots,"prepend")])}:void 0,le.$slots.append?{name:"append",fn:U(()=>[G(le.$slots,"append")])}:void 0,le.$slots.prefix?{name:"prefix",fn:U(()=>[G(le.$slots,"prefix")])}:void 0,le.$slots.suffix?{name:"suffix",fn:U(()=>[G(le.$slots,"suffix")])}:void 0]),1040,["model-value","disabled","onKeydown"])],14,["aria-expanded","aria-owns"])]),_:3},8,["visible","placement","popper-class","teleported","append-to","transition"]))}});var Fb=fe(Ab,[["__file","autocomplete.vue"]]);const xb=He(Fb),zb=de({size:{type:[Number,String],values:tl,default:"",validator:e=>Te(e)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:$t},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:Y(String),default:"cover"}}),Hb={error:e=>e instanceof Event},Kb=x({name:"ElAvatar"}),Wb=x({...Kb,props:zb,emits:Hb,setup(e,{emit:t}){const n=e,l=ue("avatar"),a=I(!1),s=y(()=>{const{size:c,icon:d,shape:f}=n,m=[l.b()];return Ve(c)&&m.push(l.m(c)),d&&m.push(l.m("icon")),f&&m.push(l.m(f)),m}),r=y(()=>{const{size:c}=n;return Te(c)?l.cssVarBlock({size:zt(c)||""}):void 0}),i=y(()=>({objectFit:n.fit}));ie(()=>n.src,()=>a.value=!1);function u(c){a.value=!0,t("error",c)}return(c,d)=>(_(),V("span",{class:T(o(s)),style:_e(o(r))},[(c.src||c.srcSet)&&!a.value?(_(),V("img",{key:0,src:c.src,alt:c.alt,srcset:c.srcSet,style:_e(o(i)),onError:u},null,44,["src","alt","srcset"])):c.icon?(_(),oe(o(Se),{key:1},{default:U(()=>[(_(),oe(Ge(c.icon)))]),_:1})):G(c.$slots,"default",{key:2})],6))}});var jb=fe(Wb,[["__file","avatar.vue"]]);const Ub=He(jb),Yb={visibilityHeight:{type:Number,default:200},target:{type:String,default:""},right:{type:Number,default:40},bottom:{type:Number,default:40}},qb={click:e=>e instanceof MouseEvent},Gb=(e,t,n)=>{const l=Lt(),a=Lt(),s=I(!1),r=()=>{l.value&&(s.value=l.value.scrollTop>=e.visibilityHeight)},i=c=>{var d;(d=l.value)==null||d.scrollTo({top:0,behavior:"smooth"}),t("click",c)},u=Mc(r,300,!0);return xt(a,"scroll",u),Xe(()=>{var c;a.value=document,l.value=document.documentElement,e.target&&(l.value=(c=document.querySelector(e.target))!=null?c:void 0,l.value||jt(n,`target does not exist: ${e.target}`),a.value=l.value),r()}),{visible:s,handleClick:i}},Rd="ElBacktop",Xb=x({name:Rd}),Zb=x({...Xb,props:Yb,emits:qb,setup(e,{emit:t}){const n=e,l=ue("backtop"),{handleClick:a,visible:s}=Gb(n,t,Rd),r=y(()=>({right:`${n.right}px`,bottom:`${n.bottom}px`}));return(i,u)=>(_(),oe(an,{name:`${o(l).namespace.value}-fade-in`},{default:U(()=>[o(s)?(_(),V("div",{key:0,style:_e(o(r)),class:T(o(l).b()),onClick:Le(o(a),["stop"])},[G(i.$slots,"default",{},()=>[H(o(Se),{class:T(o(l).e("icon"))},{default:U(()=>[H(o(Yh))]),_:1},8,["class"])])],14,["onClick"])):J("v-if",!0)]),_:3},8,["name"]))}});var Jb=fe(Zb,[["__file","backtop.vue"]]);const Qb=He(Jb),e0=de({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:Y([String,Object,Array])},offset:{type:Y(Array),default:[0,0]},badgeClass:{type:String}}),t0=x({name:"ElBadge"}),n0=x({...t0,props:e0,setup(e,{expose:t}){const n=e,l=ue("badge"),a=y(()=>n.isDot?"":Te(n.value)&&Te(n.max)?n.max{var r,i,u,c,d;return[{backgroundColor:n.color,marginRight:zt(-((i=(r=n.offset)==null?void 0:r[0])!=null?i:0)),marginTop:zt((c=(u=n.offset)==null?void 0:u[1])!=null?c:0)},(d=n.badgeStyle)!=null?d:{}]});return t({content:a}),(r,i)=>(_(),V("div",{class:T(o(l).b())},[G(r.$slots,"default"),H(an,{name:`${o(l).namespace.value}-zoom-in-center`,persisted:""},{default:U(()=>[We(F("sup",{class:T([o(l).e("content"),o(l).em("content",r.type),o(l).is("fixed",!!r.$slots.default),o(l).is("dot",r.isDot),o(l).is("hide-zero",!r.showZero&&n.value===0),r.badgeClass]),style:_e(o(s))},[G(r.$slots,"content",{value:o(a)},()=>[st(pe(o(a)),1)])],6),[[mt,!r.hidden&&(o(a)||r.isDot||r.$slots.content)]])]),_:3},8,["name"])],2))}});var l0=fe(n0,[["__file","badge.vue"]]);const Pd=He(l0),Od=Symbol("breadcrumbKey"),o0=de({separator:{type:String,default:"/"},separatorIcon:{type:$t}}),a0=x({name:"ElBreadcrumb"}),s0=x({...a0,props:o0,setup(e){const t=e,{t:n}=pt(),l=ue("breadcrumb"),a=I();return rt(Od,t),Xe(()=>{const s=a.value.querySelectorAll(`.${l.e("item")}`);s.length&&s[s.length-1].setAttribute("aria-current","page")}),(s,r)=>(_(),V("div",{ref_key:"breadcrumb",ref:a,class:T(o(l).b()),"aria-label":o(n)("el.breadcrumb.label"),role:"navigation"},[G(s.$slots,"default")],10,["aria-label"]))}});var r0=fe(s0,[["__file","breadcrumb.vue"]]);const i0=de({to:{type:Y([String,Object]),default:""},replace:Boolean}),u0=x({name:"ElBreadcrumbItem"}),c0=x({...u0,props:i0,setup(e){const t=e,n=lt(),l=we(Od,void 0),a=ue("breadcrumb"),s=n.appContext.config.globalProperties.$router,r=I(),i=()=>{!t.to||!s||(t.replace?s.replace(t.to):s.push(t.to))};return(u,c)=>{var d,f;return _(),V("span",{class:T(o(a).e("item"))},[F("span",{ref_key:"link",ref:r,class:T([o(a).e("inner"),o(a).is("link",!!u.to)]),role:"link",onClick:i},[G(u.$slots,"default")],2),(d=o(l))!=null&&d.separatorIcon?(_(),oe(o(Se),{key:0,class:T(o(a).e("separator"))},{default:U(()=>[(_(),oe(Ge(o(l).separatorIcon)))]),_:1},8,["class"])):(_(),V("span",{key:1,class:T(o(a).e("separator")),role:"presentation"},pe((f=o(l))==null?void 0:f.separator),3))],2)}}});var Ld=fe(c0,[["__file","breadcrumb-item.vue"]]);const d0=He(r0,{BreadcrumbItem:Ld}),f0=At(Ld),Bd=Symbol("buttonGroupContextKey"),ul=({from:e,replacement:t,scope:n,version:l,ref:a,type:s="API"},r)=>{ie(()=>o(r),i=>{},{immediate:!0})},v0=(e,t)=>{ul({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},y(()=>e.type==="text"));const n=we(Bd,void 0),l=fa("button"),{form:a}=dn(),s=Gt(y(()=>n==null?void 0:n.size)),r=fn(),i=I(),u=Xt(),c=y(()=>{var g;return e.type||(n==null?void 0:n.type)||((g=l.value)==null?void 0:g.type)||""}),d=y(()=>{var g,b,E;return(E=(b=e.autoInsertSpace)!=null?b:(g=l.value)==null?void 0:g.autoInsertSpace)!=null?E:!1}),f=y(()=>{var g,b,E;return(E=(b=e.plain)!=null?b:(g=l.value)==null?void 0:g.plain)!=null?E:!1}),m=y(()=>{var g,b,E;return(E=(b=e.round)!=null?b:(g=l.value)==null?void 0:g.round)!=null?E:!1}),v=y(()=>e.tag==="button"?{ariaDisabled:r.value||e.loading,disabled:r.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),h=y(()=>{var g;const b=(g=u.default)==null?void 0:g.call(u);if(d.value&&(b==null?void 0:b.length)===1){const E=b[0];if((E==null?void 0:E.type)===Nc){const C=E.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(C.trim())}}return!1});return{_disabled:r,_size:s,_type:c,_ref:i,_props:v,_plain:f,_round:m,shouldAddSpace:h,handleClick:g=>{if(r.value||e.loading){g.stopPropagation();return}e.nativeType==="reset"&&(a==null||a.resetFields()),t("click",g)}}},or=["default","primary","success","warning","info","danger","text",""],p0=["button","submit","reset"],ar=de({size:Jt,disabled:Boolean,type:{type:String,values:or,default:""},icon:{type:$t},nativeType:{type:String,values:p0,default:"button"},loading:Boolean,loadingIcon:{type:$t,default:()=>Qn},plain:{type:Boolean,default:void 0},text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Y([String,Object]),default:"button"}}),h0={click:e=>e instanceof MouseEvent};function kl(e,t=20){return e.mix("#141414",t).toString()}function m0(e){const t=fn(),n=ue("button");return y(()=>{let l={},a=e.color;if(a){const s=a.match(/var\((.*?)\)/);s&&(a=window.getComputedStyle(window.document.documentElement).getPropertyValue(s[1]));const r=new vo(a),i=e.dark?r.tint(20).toString():kl(r,20);if(e.plain)l=n.cssVarBlock({"bg-color":e.dark?kl(r,90):r.tint(90).toString(),"text-color":a,"border-color":e.dark?kl(r,50):r.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":a,"hover-border-color":a,"active-bg-color":i,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":i}),t.value&&(l[n.cssVarBlockName("disabled-bg-color")]=e.dark?kl(r,90):r.tint(90).toString(),l[n.cssVarBlockName("disabled-text-color")]=e.dark?kl(r,50):r.tint(50).toString(),l[n.cssVarBlockName("disabled-border-color")]=e.dark?kl(r,80):r.tint(80).toString());else{const u=e.dark?kl(r,30):r.tint(30).toString(),c=r.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(l=n.cssVarBlock({"bg-color":a,"text-color":c,"border-color":a,"hover-bg-color":u,"hover-text-color":c,"hover-border-color":u,"active-bg-color":i,"active-border-color":i}),t.value){const d=e.dark?kl(r,50):r.tint(50).toString();l[n.cssVarBlockName("disabled-bg-color")]=d,l[n.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,l[n.cssVarBlockName("disabled-border-color")]=d}}}return l})}const g0=x({name:"ElButton"}),b0=x({...g0,props:ar,emits:h0,setup(e,{expose:t,emit:n}){const l=e,a=m0(l),s=ue("button"),{_ref:r,_size:i,_type:u,_disabled:c,_props:d,_plain:f,_round:m,shouldAddSpace:v,handleClick:h}=v0(l,n),p=y(()=>[s.b(),s.m(u.value),s.m(i.value),s.is("disabled",c.value),s.is("loading",l.loading),s.is("plain",f.value),s.is("round",m.value),s.is("circle",l.circle),s.is("text",l.text),s.is("link",l.link),s.is("has-bg",l.bg)]);return t({ref:r,size:i,type:u,disabled:c,shouldAddSpace:v}),(g,b)=>(_(),oe(Ge(g.tag),et({ref_key:"_ref",ref:r},o(d),{class:o(p),style:o(a),onClick:o(h)}),{default:U(()=>[g.loading?(_(),V(Oe,{key:0},[g.$slots.loading?G(g.$slots,"loading",{key:0}):(_(),oe(o(Se),{key:1,class:T(o(s).is("loading"))},{default:U(()=>[(_(),oe(Ge(g.loadingIcon)))]),_:1},8,["class"]))],64)):g.icon||g.$slots.icon?(_(),oe(o(Se),{key:1},{default:U(()=>[g.icon?(_(),oe(Ge(g.icon),{key:0})):G(g.$slots,"icon",{key:1})]),_:3})):J("v-if",!0),g.$slots.default?(_(),V("span",{key:2,class:T({[o(s).em("text","expand")]:o(v)})},[G(g.$slots,"default")],2)):J("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var y0=fe(b0,[["__file","button.vue"]]);const C0={size:ar.size,type:ar.type},w0=x({name:"ElButtonGroup"}),k0=x({...w0,props:C0,setup(e){const t=e;rt(Bd,kt({size:wt(t,"size"),type:wt(t,"type")}));const n=ue("button");return(l,a)=>(_(),V("div",{class:T(o(n).b("group"))},[G(l.$slots,"default")],2))}});var Vd=fe(k0,[["__file","button-group.vue"]]);const on=He(y0,{ButtonGroup:Vd}),Dd=At(Vd),xs=(e,t)=>[e>0?e-1:void 0,e,eArray.from(Array.from({length:e}).keys()),Ad=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),Fd=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),Tu=function(e,t){const n=wo(e),l=wo(t);return n&&l?e.getTime()===t.getTime():!n&&!l?e===t:!1},$u=function(e,t){const n=ke(e),l=ke(t);return n&&l?e.length!==t.length?!1:e.every((a,s)=>Tu(a,t[s])):!n&&!l?Tu(e,t):!1},Nu=function(e,t,n){const l=Pn(t)||t==="x"?Ke(e).locale(n):Ke(e,t).locale(n);return l.isValid()?l:void 0},Iu=function(e,t,n){return Pn(t)?e:t==="x"?+e:Ke(e).locale(n).format(t)},zs=(e,t)=>{var n;const l=[],a=t==null?void 0:t();for(let s=0;ske(e)?e.map(t=>t.toDate()):e.toDate(),S0=(e,t)=>{const n=e.subtract(1,"month").endOf("month").date();return Nl(t).map((l,a)=>n-(t-a-1))},E0=e=>{const t=e.daysInMonth();return Nl(t).map((n,l)=>l+1)},_0=e=>Nl(e.length/7).map(t=>{const n=t*7;return e.slice(n,n+7)}),T0=de({selectedDay:{type:Y(Object)},range:{type:Y(Array)},date:{type:Y(Object),required:!0},hideHeader:{type:Boolean}}),$0={pick:e=>yt(e)},N0=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],Hs=["sun","mon","tue","wed","thu","fri","sat"],I0=(e,t)=>{Ke.extend(Vc);const n=Ke.localeData().firstDayOfWeek(),{t:l,lang:a}=pt(),s=Ke().locale(a.value),r=y(()=>!!e.range&&!!e.range.length),i=y(()=>{let m=[];if(r.value){const[v,h]=e.range,p=Nl(h.date()-v.date()+1).map(E=>({text:v.date()+E,type:"current"}));let g=p.length%7;g=g===0?0:7-g;const b=Nl(g).map((E,C)=>({text:C+1,type:"next"}));m=p.concat(b)}else{const v=e.date.startOf("month").day(),h=S0(e.date,(v-n+7)%7).map(E=>({text:E,type:"prev"})),p=E0(e.date).map(E=>({text:E,type:"current"}));m=[...h,...p];const g=7-(m.length%7||7),b=Nl(g).map((E,C)=>({text:C+1,type:"next"}));m=m.concat(b)}return _0(m)}),u=y(()=>{const m=n;return m===0?Hs.map(v=>l(`el.datepicker.weeks.${v}`)):Hs.slice(m).concat(Hs.slice(0,m)).map(v=>l(`el.datepicker.weeks.${v}`))}),c=(m,v)=>{switch(v){case"prev":return e.date.startOf("month").subtract(1,"month").date(m);case"next":return e.date.startOf("month").add(1,"month").date(m);case"current":return e.date.date(m)}};return{now:s,isInRange:r,rows:i,weekDays:u,getFormattedDate:c,handlePickDay:({text:m,type:v})=>{const h=c(m,v);t("pick",h)},getSlotData:({text:m,type:v})=>{const h=c(m,v);return{isSelected:h.isSame(e.selectedDay),type:`${v}-month`,day:h.format("YYYY-MM-DD"),date:h.toDate()}}}},M0=x({name:"DateTable"}),R0=x({...M0,props:T0,emits:$0,setup(e,{expose:t,emit:n}){const l=e,{isInRange:a,now:s,rows:r,weekDays:i,getFormattedDate:u,handlePickDay:c,getSlotData:d}=I0(l,n),f=ue("calendar-table"),m=ue("calendar-day"),v=({text:h,type:p})=>{const g=[p];if(p==="current"){const b=u(h,p);b.isSame(l.selectedDay,"day")&&g.push(m.is("selected")),b.isSame(s,"day")&&g.push(m.is("today"))}return g};return t({getFormattedDate:u}),(h,p)=>(_(),V("table",{class:T([o(f).b(),o(f).is("range",o(a))]),cellspacing:"0",cellpadding:"0"},[h.hideHeader?J("v-if",!0):(_(),V("thead",{key:0},[F("tr",null,[(_(!0),V(Oe,null,ut(o(i),g=>(_(),V("th",{key:g,scope:"col"},pe(g),1))),128))])])),F("tbody",null,[(_(!0),V(Oe,null,ut(o(r),(g,b)=>(_(),V("tr",{key:b,class:T({[o(f).e("row")]:!0,[o(f).em("row","hide-border")]:b===0&&h.hideHeader})},[(_(!0),V(Oe,null,ut(g,(E,C)=>(_(),V("td",{key:C,class:T(v(E)),onClick:w=>o(c)(E)},[F("div",{class:T(o(m).b())},[G(h.$slots,"date-cell",{data:o(d)(E)},()=>[F("span",null,pe(E.text),1)])],2)],10,["onClick"]))),128))],2))),128))])],2))}});var Mu=fe(R0,[["__file","date-table.vue"]]);const P0=(e,t)=>{const n=e.endOf("month"),l=t.startOf("month"),s=n.isSame(l,"week")?l.add(1,"week"):l;return[[e,n],[s.startOf("week"),t]]},O0=(e,t)=>{const n=e.endOf("month"),l=e.add(1,"month").startOf("month"),a=n.isSame(l,"week")?l.add(1,"week"):l,s=a.endOf("month"),r=t.startOf("month"),i=s.isSame(r,"week")?r.add(1,"week"):r;return[[e,n],[a.startOf("week"),s],[i.startOf("week"),t]]},L0=(e,t,n)=>{const{lang:l}=pt(),a=I(),s=Ke().locale(l.value),r=y({get(){return e.modelValue?u.value:a.value},set(g){if(!g)return;a.value=g;const b=g.toDate();t(Zt,b),t(De,b)}}),i=y(()=>{if(!e.range||!ke(e.range)||e.range.length!==2||e.range.some(C=>!wo(C)))return[];const g=e.range.map(C=>Ke(C).locale(l.value)),[b,E]=g;return b.isAfter(E)?[]:b.isSame(E,"month")?v(b,E):b.add(1,"month").month()!==E.month()?[]:v(b,E)}),u=y(()=>e.modelValue?Ke(e.modelValue).locale(l.value):r.value||(i.value.length?i.value[0][0]:s)),c=y(()=>u.value.subtract(1,"month").date(1)),d=y(()=>u.value.add(1,"month").date(1)),f=y(()=>u.value.subtract(1,"year").date(1)),m=y(()=>u.value.add(1,"year").date(1)),v=(g,b)=>{const E=g.startOf("week"),C=b.endOf("week"),w=E.get("month"),k=C.get("month");return w===k?[[E,C]]:(w+1)%12===k?P0(E,C):w+2===k||(w+1)%11===k?O0(E,C):[]},h=g=>{r.value=g};return{calculateValidatedDateRange:v,date:u,realSelectedDay:r,pickDay:h,selectDate:g=>{const E={"prev-month":c.value,"next-month":d.value,"prev-year":f.value,"next-year":m.value,today:s}[g];E.isSame(u.value,"day")||h(E)},validatedRange:i}},B0=e=>ke(e)&&e.length===2&&e.every(t=>wo(t)),V0=de({modelValue:{type:Date},range:{type:Y(Array),validator:B0}}),D0={[De]:e=>wo(e),[Zt]:e=>wo(e)},A0="ElCalendar",F0=x({name:A0}),x0=x({...F0,props:V0,emits:D0,setup(e,{expose:t,emit:n}){const l=e,a=ue("calendar"),{calculateValidatedDateRange:s,date:r,pickDay:i,realSelectedDay:u,selectDate:c,validatedRange:d}=L0(l,n),{t:f}=pt(),m=y(()=>{const v=`el.datepicker.month${r.value.format("M")}`;return`${r.value.year()} ${f("el.datepicker.year")} ${f(v)}`});return t({selectedDay:u,pickDay:i,selectDate:c,calculateValidatedDateRange:s}),(v,h)=>(_(),V("div",{class:T(o(a).b())},[F("div",{class:T(o(a).e("header"))},[G(v.$slots,"header",{date:o(m)},()=>[F("div",{class:T(o(a).e("title"))},pe(o(m)),3),o(d).length===0?(_(),V("div",{key:0,class:T(o(a).e("button-group"))},[H(o(Dd),null,{default:U(()=>[H(o(on),{size:"small",onClick:p=>o(c)("prev-month")},{default:U(()=>[st(pe(o(f)("el.datepicker.prevMonth")),1)]),_:1},8,["onClick"]),H(o(on),{size:"small",onClick:p=>o(c)("today")},{default:U(()=>[st(pe(o(f)("el.datepicker.today")),1)]),_:1},8,["onClick"]),H(o(on),{size:"small",onClick:p=>o(c)("next-month")},{default:U(()=>[st(pe(o(f)("el.datepicker.nextMonth")),1)]),_:1},8,["onClick"])]),_:1})],2)):J("v-if",!0)])],2),o(d).length===0?(_(),V("div",{key:0,class:T(o(a).e("body"))},[H(Mu,{date:o(r),"selected-day":o(u),onPick:o(i)},Mn({_:2},[v.$slots["date-cell"]?{name:"date-cell",fn:U(p=>[G(v.$slots,"date-cell",On(cl(p)))])}:void 0]),1032,["date","selected-day","onPick"])],2)):(_(),V("div",{key:1,class:T(o(a).e("body"))},[(_(!0),V(Oe,null,ut(o(d),(p,g)=>(_(),oe(Mu,{key:g,date:p[0],"selected-day":o(u),range:p,"hide-header":g!==0,onPick:o(i)},Mn({_:2},[v.$slots["date-cell"]?{name:"date-cell",fn:U(b=>[G(v.$slots,"date-cell",On(cl(b)))])}:void 0]),1032,["date","selected-day","range","hide-header","onPick"]))),128))],2))],2))}});var z0=fe(x0,[["__file","calendar.vue"]]);const H0=He(z0),K0=de({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:Y([String,Object,Array]),default:""},headerClass:String,bodyClass:String,footerClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),W0=x({name:"ElCard"}),j0=x({...W0,props:K0,setup(e){const t=ue("card");return(n,l)=>(_(),V("div",{class:T([o(t).b(),o(t).is(`${n.shadow}-shadow`)])},[n.$slots.header||n.header?(_(),V("div",{key:0,class:T([o(t).e("header"),n.headerClass])},[G(n.$slots,"header",{},()=>[st(pe(n.header),1)])],2)):J("v-if",!0),F("div",{class:T([o(t).e("body"),n.bodyClass]),style:_e(n.bodyStyle)},[G(n.$slots,"default")],6),n.$slots.footer||n.footer?(_(),V("div",{key:1,class:T([o(t).e("footer"),n.footerClass])},[G(n.$slots,"footer",{},()=>[st(pe(n.footer),1)])],2)):J("v-if",!0)],2))}});var U0=fe(j0,[["__file","card.vue"]]);const Y0=He(U0),q0=de({initialIndex:{type:Number,default:0},height:{type:String,default:""},trigger:{type:String,values:["hover","click"],default:"hover"},autoplay:{type:Boolean,default:!0},interval:{type:Number,default:3e3},indicatorPosition:{type:String,values:["","none","outside"],default:""},arrow:{type:String,values:["always","hover","never"],default:"hover"},type:{type:String,values:["","card"],default:""},cardScale:{type:Number,default:.83},loop:{type:Boolean,default:!0},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},pauseOnHover:{type:Boolean,default:!0},motionBlur:Boolean}),G0={change:(e,t)=>[e,t].every(Te)},xd=Symbol("carouselContextKey"),sr="ElCarouselItem";var Vn=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(Vn||{});function rr(e){return Dt(e)&&e.type===Oe}function X0(e){return Dt(e)&&e.type===jl}function Z0(e){return Dt(e)&&!rr(e)&&!X0(e)}const J0=e=>{if(!Dt(e))return{};const t=e.props||{},n=(Dt(e.type)?e.type.props:void 0)||{},l={};return Object.keys(n).forEach(a=>{rn(n[a],"default")&&(l[a]=n[a].default)}),Object.keys(t).forEach(a=>{l[Ar(a)]=t[a]}),l},Q0=e=>{if(!ke(e)||e.length>1)throw new Error("expect to receive a single Vue element child");return e[0]},Zn=e=>{const t=ke(e)?e:[e],n=[];return t.forEach(l=>{var a;ke(l)?n.push(...Zn(l)):Dt(l)&&((a=l.component)!=null&&a.subTree)?n.push(l,...Zn(l.component.subTree)):Dt(l)&&ke(l.children)?n.push(...Zn(l.children)):Dt(l)&&l.shapeFlag===2?n.push(...Zn(l.type())):n.push(l)}),n},ey=(e,t,n)=>Zn(e.subTree).filter(s=>{var r;return Dt(s)&&((r=s.type)==null?void 0:r.name)===t&&!!s.component}).map(s=>s.component.uid).map(s=>n[s]).filter(s=>!!s),ks=(e,t)=>{const n=Lt({}),l=Lt([]),a=new WeakMap,s=d=>{n.value[d.uid]=d,Oa(n),Xe(()=>{const f=d.getVnode().el,m=f.parentNode;if(!a.has(m)){a.set(m,[]);const v=m.insertBefore.bind(m);m.insertBefore=(h,p)=>(a.get(m).some(b=>h===b||p===b)&&Oa(n),v(h,p))}a.get(m).push(f)})},r=d=>{delete n.value[d.uid],Oa(n);const f=d.getVnode().el,m=f.parentNode,v=a.get(m),h=v.indexOf(f);v.splice(h,1)},i=()=>{l.value=ey(e,t,n.value)},u=d=>d.render(),c=x({setup(d,{slots:f}){return()=>(i(),f.default?Re(u,{render:f.default}):null)}});return{children:l,addChild:s,removeChild:r,ChildrenSorter:c}},Ru=300,ty=(e,t,n)=>{const{children:l,addChild:a,removeChild:s,ChildrenSorter:r}=ks(lt(),sr),i=Xt(),u=I(-1),c=I(null),d=I(!1),f=I(),m=I(0),v=I(!0),h=y(()=>e.arrow!=="never"&&!o(b)),p=y(()=>l.value.some(ee=>ee.props.label.toString().length>0)),g=y(()=>e.type==="card"),b=y(()=>e.direction==="vertical"),E=y(()=>e.height!=="auto"?{height:e.height}:{height:`${m.value}px`,overflow:"hidden"}),C=Hl(ee=>{R(ee)},Ru,{trailing:!0}),w=Hl(ee=>{z(ee)},Ru),k=ee=>v.value?u.value<=1?ee<=1:ee>1:!0;function S(){c.value&&(clearInterval(c.value),c.value=null)}function $(){e.interval<=0||!e.autoplay||c.value||(c.value=setInterval(()=>M(),e.interval))}const M=()=>{u.valuese.props.name===ee);le.length>0&&(ee=l.value.indexOf(le[0]))}if(ee=Number(ee),Number.isNaN(ee)||ee!==Math.floor(ee))return;const ae=l.value.length,re=u.value;ee<0?u.value=e.loop?ae-1:0:ee>=ae?u.value=e.loop?0:ae-1:u.value=ee,re===u.value&&N(re),ne()}function N(ee){l.value.forEach((ae,re)=>{ae.translateItem(re,u.value,ee)})}function O(ee,ae){var re,le,se,ge;const Be=o(l),te=Be.length;if(te===0||!ee.states.inStage)return!1;const ce=ae+1,Ie=ae-1,Ae=te-1,xe=Be[Ae].states.active,Ye=Be[0].states.active,$e=(le=(re=Be[ce])==null?void 0:re.states)==null?void 0:le.active,Me=(ge=(se=Be[Ie])==null?void 0:se.states)==null?void 0:ge.active;return ae===Ae&&Ye||$e?"left":ae===0&&xe||Me?"right":!1}function P(){d.value=!0,e.pauseOnHover&&S()}function W(){d.value=!1,$()}function K(ee){o(b)||l.value.forEach((ae,re)=>{ee===O(ae,re)&&(ae.states.hover=!0)})}function D(){o(b)||l.value.forEach(ee=>{ee.states.hover=!1})}function L(ee){u.value=ee}function z(ee){e.trigger==="hover"&&ee!==u.value&&(u.value=ee)}function B(){R(u.value-1)}function A(){R(u.value+1)}function ne(){S(),e.pauseOnHover||$()}function j(ee){e.height==="auto"&&(m.value=ee)}function Q(){var ee;const ae=(ee=i.default)==null?void 0:ee.call(i);if(!ae)return null;const le=Zn(ae).filter(se=>Dt(se)&&se.type.name===sr);return(le==null?void 0:le.length)===2&&e.loop&&!g.value?(v.value=!0,le):(v.value=!1,null)}ie(()=>u.value,(ee,ae)=>{N(ae),v.value&&(ee=ee%2,ae=ae%2),ae>-1&&t(nt,ee,ae)}),ie(()=>e.autoplay,ee=>{ee?$():S()}),ie(()=>e.loop,()=>{R(u.value)}),ie(()=>e.interval,()=>{ne()});const Z=Lt();return Xe(()=>{ie(()=>l.value,()=>{l.value.length>0&&R(e.initialIndex)},{immediate:!0}),Z.value=Ft(f.value,()=>{N()}),$()}),Nt(()=>{S(),f.value&&Z.value&&Z.value.stop()}),rt(xd,{root:f,isCardType:g,isVertical:b,items:l,loop:e.loop,cardScale:e.cardScale,addItem:a,removeItem:s,setActiveItem:R,setContainerHeight:j}),{root:f,activeIndex:u,arrowDisplay:h,hasLabel:p,hover:d,isCardType:g,items:l,isVertical:b,containerStyle:E,isItemsTwoLength:v,handleButtonEnter:K,handleButtonLeave:D,handleIndicatorClick:L,handleMouseEnter:P,handleMouseLeave:W,setActiveItem:R,prev:B,next:A,PlaceholderItem:Q,isTwoLengthShow:k,ItemsSorter:r,throttledArrowClick:C,throttledIndicatorHover:w}},ny="ElCarousel",ly=x({name:ny}),oy=x({...ly,props:q0,emits:G0,setup(e,{expose:t,emit:n}){const l=e,{root:a,activeIndex:s,arrowDisplay:r,hasLabel:i,hover:u,isCardType:c,items:d,isVertical:f,containerStyle:m,handleButtonEnter:v,handleButtonLeave:h,handleIndicatorClick:p,handleMouseEnter:g,handleMouseLeave:b,setActiveItem:E,prev:C,next:w,PlaceholderItem:k,isTwoLengthShow:S,ItemsSorter:$,throttledArrowClick:M,throttledIndicatorHover:R}=ty(l,n),N=ue("carousel"),{t:O}=pt(),P=y(()=>{const L=[N.b(),N.m(l.direction)];return o(c)&&L.push(N.m("card")),L}),W=y(()=>{const L=[N.e("indicators"),N.em("indicators",l.direction)];return o(i)&&L.push(N.em("indicators","labels")),l.indicatorPosition==="outside"&&L.push(N.em("indicators","outside")),o(f)&&L.push(N.em("indicators","right")),L});function K(L){if(!l.motionBlur)return;const z=o(f)?`${N.namespace.value}-transitioning-vertical`:`${N.namespace.value}-transitioning`;L.currentTarget.classList.add(z)}function D(L){if(!l.motionBlur)return;const z=o(f)?`${N.namespace.value}-transitioning-vertical`:`${N.namespace.value}-transitioning`;L.currentTarget.classList.remove(z)}return t({activeIndex:s,setActiveItem:E,prev:C,next:w}),(L,z)=>(_(),V("div",{ref_key:"root",ref:a,class:T(o(P)),onMouseenter:Le(o(g),["stop"]),onMouseleave:Le(o(b),["stop"])},[o(r)?(_(),oe(an,{key:0,name:"carousel-arrow-left",persisted:""},{default:U(()=>[We(F("button",{type:"button",class:T([o(N).e("arrow"),o(N).em("arrow","left")]),"aria-label":o(O)("el.carousel.leftArrow"),onMouseenter:B=>o(v)("left"),onMouseleave:o(h),onClick:Le(B=>o(M)(o(s)-1),["stop"])},[H(o(Se),null,{default:U(()=>[H(o(dl))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[mt,(L.arrow==="always"||o(u))&&(l.loop||o(s)>0)]])]),_:1})):J("v-if",!0),o(r)?(_(),oe(an,{key:1,name:"carousel-arrow-right",persisted:""},{default:U(()=>[We(F("button",{type:"button",class:T([o(N).e("arrow"),o(N).em("arrow","right")]),"aria-label":o(O)("el.carousel.rightArrow"),onMouseenter:B=>o(v)("right"),onMouseleave:o(h),onClick:Le(B=>o(M)(o(s)+1),["stop"])},[H(o(Se),null,{default:U(()=>[H(o(Cn))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[mt,(L.arrow==="always"||o(u))&&(l.loop||o(s)[L.indicatorPosition!=="none"?(_(),V("ul",{key:0,class:T(o(W))},[(_(!0),V(Oe,null,ut(o(d),(B,A)=>We((_(),V("li",{key:A,class:T([o(N).e("indicator"),o(N).em("indicator",L.direction),o(N).is("active",A===o(s))]),onMouseenter:ne=>o(R)(A),onClick:Le(ne=>o(p)(A),["stop"])},[F("button",{class:T(o(N).e("button")),"aria-label":o(O)("el.carousel.indicator",{index:A+1})},[o(i)?(_(),V("span",{key:0},pe(B.props.label),1)):J("v-if",!0)],10,["aria-label"])],42,["onMouseenter","onClick"])),[[mt,o(S)(A)]])),128))],2)):J("v-if",!0)]),_:1}),l.motionBlur?(_(),V("svg",{key:2,xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{display:"none"}},[F("defs",null,[F("filter",{id:"elCarouselHorizontal"},[F("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"12,0"})]),F("filter",{id:"elCarouselVertical"},[F("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"0,10"})])])])):J("v-if",!0)],42,["onMouseenter","onMouseleave"]))}});var ay=fe(oy,[["__file","carousel.vue"]]);const sy=de({name:{type:String,default:""},label:{type:[String,Number],default:""}}),ry=e=>{const t=we(xd),n=lt(),l=I(),a=I(!1),s=I(0),r=I(1),i=I(!1),u=I(!1),c=I(!1),d=I(!1),{isCardType:f,isVertical:m,cardScale:v}=t;function h(w,k,S){const $=S-1,M=k-1,R=k+1,N=S/2;return k===0&&w===$?-1:k===$&&w===0?S:w=N?S+1:w>R&&w-k>=N?-2:w}function p(w,k){var S,$;const M=o(m)?((S=t.root.value)==null?void 0:S.offsetHeight)||0:(($=t.root.value)==null?void 0:$.offsetWidth)||0;return c.value?M*((2-v)*(w-k)+1)/4:w{var $;const M=o(f),R=($=t.items.value.length)!=null?$:Number.NaN,N=w===k;!M&&!vt(S)&&(d.value=N||w===S),!N&&R>2&&t.loop&&(w=h(w,k,R));const O=o(m);i.value=N,M?(c.value=Math.round(Math.abs(w-k))<=1,s.value=p(w,k),r.value=o(i)?1:v):s.value=g(w,k,O),u.value=!0,N&&l.value&&t.setContainerHeight(l.value.offsetHeight)};function E(){if(t&&o(f)){const w=t.items.value.findIndex(({uid:k})=>k===n.uid);t.setActiveItem(w)}}const C={props:e,states:kt({hover:a,translate:s,scale:r,active:i,ready:u,inStage:c,animating:d}),uid:n.uid,getVnode:()=>n.vnode,translateItem:b};return t.addItem(C),Nt(()=>{t.removeItem(C)}),{carouselItemRef:l,active:i,animating:d,hover:a,inStage:c,isVertical:m,translate:s,isCardType:f,scale:r,ready:u,handleItemClick:E}},iy=x({name:sr}),uy=x({...iy,props:sy,setup(e){const t=e,n=ue("carousel"),{carouselItemRef:l,active:a,animating:s,hover:r,inStage:i,isVertical:u,translate:c,isCardType:d,scale:f,ready:m,handleItemClick:v}=ry(t),h=y(()=>[n.e("item"),n.is("active",a.value),n.is("in-stage",i.value),n.is("hover",r.value),n.is("animating",s.value),{[n.em("item","card")]:d.value,[n.em("item","card-vertical")]:d.value&&u.value}]),p=y(()=>{const b=`${`translate${o(u)?"Y":"X"}`}(${o(c)}px)`,E=`scale(${o(f)})`;return{transform:[b,E].join(" ")}});return(g,b)=>We((_(),V("div",{ref_key:"carouselItemRef",ref:l,class:T(o(h)),style:_e(o(p)),onClick:o(v)},[o(d)?We((_(),V("div",{key:0,class:T(o(n).e("mask"))},null,2)),[[mt,!o(a)]]):J("v-if",!0),G(g.$slots,"default")],14,["onClick"])),[[mt,o(m)]])}});var zd=fe(uy,[["__file","carousel-item.vue"]]);const cy=He(ay,{CarouselItem:zd}),dy=At(zd),Hd={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Jt,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...cn(["ariaControls"])},Kd={[De]:e=>Ve(e)||Te(e)||_t(e),change:e=>Ve(e)||Te(e)||_t(e)},Oo=Symbol("checkboxGroupContextKey"),fy=({model:e,isChecked:t})=>{const n=we(Oo,void 0),l=y(()=>{var s,r;const i=(s=n==null?void 0:n.max)==null?void 0:s.value,u=(r=n==null?void 0:n.min)==null?void 0:r.value;return!vt(i)&&e.value.length>=i&&!t.value||!vt(u)&&e.value.length<=u&&t.value});return{isDisabled:fn(y(()=>(n==null?void 0:n.disabled.value)||l.value)),isLimitDisabled:l}},vy=(e,{model:t,isLimitExceeded:n,hasOwnLabel:l,isDisabled:a,isLabeledByFormItem:s})=>{const r=we(Oo,void 0),{formItem:i}=dn(),{emit:u}=lt();function c(h){var p,g,b,E;return[!0,e.trueValue,e.trueLabel].includes(h)?(g=(p=e.trueValue)!=null?p:e.trueLabel)!=null?g:!0:(E=(b=e.falseValue)!=null?b:e.falseLabel)!=null?E:!1}function d(h,p){u(nt,c(h),p)}function f(h){if(n.value)return;const p=h.target;u(nt,c(p.checked),h)}async function m(h){n.value||!l.value&&!a.value&&s.value&&(h.composedPath().some(b=>b.tagName==="LABEL")||(t.value=c([!1,e.falseValue,e.falseLabel].includes(t.value)),await Ee(),d(t.value,h)))}const v=y(()=>(r==null?void 0:r.validateEvent)||e.validateEvent);return ie(()=>e.modelValue,()=>{v.value&&(i==null||i.validate("change").catch(h=>void 0))}),{handleChange:f,onClickRoot:m}},py=e=>{const t=I(!1),{emit:n}=lt(),l=we(Oo,void 0),a=y(()=>vt(l)===!1),s=I(!1),r=y({get(){var i,u;return a.value?(i=l==null?void 0:l.modelValue)==null?void 0:i.value:(u=e.modelValue)!=null?u:t.value},set(i){var u,c;a.value&&ke(i)?(s.value=((u=l==null?void 0:l.max)==null?void 0:u.value)!==void 0&&i.length>(l==null?void 0:l.max.value)&&i.length>r.value.length,s.value===!1&&((c=l==null?void 0:l.changeEvent)==null||c.call(l,i))):(n(De,i),t.value=i)}});return{model:r,isGroup:a,isLimitExceeded:s}},hy=(e,t,{model:n})=>{const l=we(Oo,void 0),a=I(!1),s=y(()=>In(e.value)?e.label:e.value),r=y(()=>{const d=n.value;return _t(d)?d:ke(d)?yt(s.value)?d.map(Uo).some(f=>tn(f,s.value)):d.map(Uo).includes(s.value):d!=null?d===e.trueValue||d===e.trueLabel:!!d}),i=Gt(y(()=>{var d;return(d=l==null?void 0:l.size)==null?void 0:d.value}),{prop:!0}),u=Gt(y(()=>{var d;return(d=l==null?void 0:l.size)==null?void 0:d.value})),c=y(()=>!!t.default||!In(s.value));return{checkboxButtonSize:i,isChecked:r,isFocused:a,checkboxSize:u,hasOwnLabel:c,actualValue:s}},Wd=(e,t)=>{const{formItem:n}=dn(),{model:l,isGroup:a,isLimitExceeded:s}=py(e),{isFocused:r,isChecked:i,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,actualValue:f}=hy(e,t,{model:l}),{isDisabled:m}=fy({model:l,isChecked:i}),{inputId:v,isLabeledByFormItem:h}=Kn(e,{formItemContext:n,disableIdGeneration:d,disableIdManagement:a}),{handleChange:p,onClickRoot:g}=vy(e,{model:l,isLimitExceeded:s,hasOwnLabel:d,isDisabled:m,isLabeledByFormItem:h});return(()=>{function E(){var C,w;ke(l.value)&&!l.value.includes(f.value)?l.value.push(f.value):l.value=(w=(C=e.trueValue)!=null?C:e.trueLabel)!=null?w:!0}e.checked&&E()})(),ul({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},y(()=>a.value&&In(e.value))),ul({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},y(()=>!!e.trueLabel)),ul({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},y(()=>!!e.falseLabel)),{inputId:v,isLabeledByFormItem:h,isChecked:i,isDisabled:m,isFocused:r,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,model:l,actualValue:f,handleChange:p,onClickRoot:g}},my=x({name:"ElCheckbox"}),gy=x({...my,props:Hd,emits:Kd,setup(e){const t=e,n=Xt(),{inputId:l,isLabeledByFormItem:a,isChecked:s,isDisabled:r,isFocused:i,checkboxSize:u,hasOwnLabel:c,model:d,actualValue:f,handleChange:m,onClickRoot:v}=Wd(t,n),h=ue("checkbox"),p=y(()=>[h.b(),h.m(u.value),h.is("disabled",r.value),h.is("bordered",t.border),h.is("checked",s.value)]),g=y(()=>[h.e("input"),h.is("disabled",r.value),h.is("checked",s.value),h.is("indeterminate",t.indeterminate),h.is("focus",i.value)]);return(b,E)=>(_(),oe(Ge(!o(c)&&o(a)?"span":"label"),{class:T(o(p)),"aria-controls":b.indeterminate?b.ariaControls:null,onClick:o(v)},{default:U(()=>{var C,w,k,S;return[F("span",{class:T(o(g))},[b.trueValue||b.falseValue||b.trueLabel||b.falseLabel?We((_(),V("input",{key:0,id:o(l),"onUpdate:modelValue":$=>gn(d)?d.value=$:null,class:T(o(h).e("original")),type:"checkbox",indeterminate:b.indeterminate,name:b.name,tabindex:b.tabindex,disabled:o(r),"true-value":(w=(C=b.trueValue)!=null?C:b.trueLabel)!=null?w:!0,"false-value":(S=(k=b.falseValue)!=null?k:b.falseLabel)!=null?S:!1,onChange:o(m),onFocus:$=>i.value=!0,onBlur:$=>i.value=!1,onClick:Le(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[Ka,o(d)]]):We((_(),V("input",{key:1,id:o(l),"onUpdate:modelValue":$=>gn(d)?d.value=$:null,class:T(o(h).e("original")),type:"checkbox",indeterminate:b.indeterminate,disabled:o(r),value:o(f),name:b.name,tabindex:b.tabindex,onChange:o(m),onFocus:$=>i.value=!0,onBlur:$=>i.value=!1,onClick:Le(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[Ka,o(d)]]),F("span",{class:T(o(h).e("inner"))},null,2)],2),o(c)?(_(),V("span",{key:0,class:T(o(h).e("label"))},[G(b.$slots,"default"),b.$slots.default?J("v-if",!0):(_(),V(Oe,{key:0},[st(pe(b.label),1)],64))],2)):J("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var by=fe(gy,[["__file","checkbox.vue"]]);const yy=x({name:"ElCheckboxButton"}),Cy=x({...yy,props:Hd,emits:Kd,setup(e){const t=e,n=Xt(),{isFocused:l,isChecked:a,isDisabled:s,checkboxButtonSize:r,model:i,actualValue:u,handleChange:c}=Wd(t,n),d=we(Oo,void 0),f=ue("checkbox"),m=y(()=>{var h,p,g,b;const E=(p=(h=d==null?void 0:d.fill)==null?void 0:h.value)!=null?p:"";return{backgroundColor:E,borderColor:E,color:(b=(g=d==null?void 0:d.textColor)==null?void 0:g.value)!=null?b:"",boxShadow:E?`-1px 0 0 0 ${E}`:void 0}}),v=y(()=>[f.b("button"),f.bm("button",r.value),f.is("disabled",s.value),f.is("checked",a.value),f.is("focus",l.value)]);return(h,p)=>{var g,b,E,C;return _(),V("label",{class:T(o(v))},[h.trueValue||h.falseValue||h.trueLabel||h.falseLabel?We((_(),V("input",{key:0,"onUpdate:modelValue":w=>gn(i)?i.value=w:null,class:T(o(f).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:o(s),"true-value":(b=(g=h.trueValue)!=null?g:h.trueLabel)!=null?b:!0,"false-value":(C=(E=h.falseValue)!=null?E:h.falseLabel)!=null?C:!1,onChange:o(c),onFocus:w=>l.value=!0,onBlur:w=>l.value=!1,onClick:Le(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[Ka,o(i)]]):We((_(),V("input",{key:1,"onUpdate:modelValue":w=>gn(i)?i.value=w:null,class:T(o(f).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:o(s),value:o(u),onChange:o(c),onFocus:w=>l.value=!0,onBlur:w=>l.value=!1,onClick:Le(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[Ka,o(i)]]),h.$slots.default||h.label?(_(),V("span",{key:2,class:T(o(f).be("button","inner")),style:_e(o(a)?o(m):void 0)},[G(h.$slots,"default",{},()=>[st(pe(h.label),1)])],6)):J("v-if",!0)],2)}}});var jd=fe(Cy,[["__file","checkbox-button.vue"]]);const wy=de({modelValue:{type:Y(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Jt,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...cn(["ariaLabel"])}),ky={[De]:e=>ke(e),change:e=>ke(e)},Sy=x({name:"ElCheckboxGroup"}),Ey=x({...Sy,props:wy,emits:ky,setup(e,{emit:t}){const n=e,l=ue("checkbox"),{formItem:a}=dn(),{inputId:s,isLabeledByFormItem:r}=Kn(n,{formItemContext:a}),i=async c=>{t(De,c),await Ee(),t(nt,c)},u=y({get(){return n.modelValue},set(c){i(c)}});return rt(Oo,{...An(nn(n),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:u,changeEvent:i}),ie(()=>n.modelValue,()=>{n.validateEvent&&(a==null||a.validate("change").catch(c=>void 0))}),(c,d)=>{var f;return _(),oe(Ge(c.tag),{id:o(s),class:T(o(l).b("group")),role:"group","aria-label":o(r)?void 0:c.ariaLabel||"checkbox-group","aria-labelledby":o(r)?(f=o(a))==null?void 0:f.labelId:void 0},{default:U(()=>[G(c.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var Ud=fe(Ey,[["__file","checkbox-group.vue"]]);const Hn=He(by,{CheckboxButton:jd,CheckboxGroup:Ud}),_y=At(jd),Yd=At(Ud),qd=de({modelValue:{type:[String,Number,Boolean],default:void 0},size:Jt,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),Ty=de({...qd,border:Boolean}),Gd={[De]:e=>Ve(e)||Te(e)||_t(e),[nt]:e=>Ve(e)||Te(e)||_t(e)},Xd=Symbol("radioGroupKey"),Zd=(e,t)=>{const n=I(),l=we(Xd,void 0),a=y(()=>!!l),s=y(()=>In(e.value)?e.label:e.value),r=y({get(){return a.value?l.modelValue:e.modelValue},set(f){a.value?l.changeEvent(f):t&&t(De,f),n.value.checked=e.modelValue===s.value}}),i=Gt(y(()=>l==null?void 0:l.size)),u=fn(y(()=>l==null?void 0:l.disabled)),c=I(!1),d=y(()=>u.value||a.value&&r.value!==s.value?-1:0);return ul({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},y(()=>a.value&&In(e.value))),{radioRef:n,isGroup:a,radioGroup:l,focus:c,size:i,disabled:u,tabIndex:d,modelValue:r,actualValue:s}},$y=x({name:"ElRadio"}),Ny=x({...$y,props:Ty,emits:Gd,setup(e,{emit:t}){const n=e,l=ue("radio"),{radioRef:a,radioGroup:s,focus:r,size:i,disabled:u,modelValue:c,actualValue:d}=Zd(n,t);function f(){Ee(()=>t(nt,c.value))}return(m,v)=>{var h;return _(),V("label",{class:T([o(l).b(),o(l).is("disabled",o(u)),o(l).is("focus",o(r)),o(l).is("bordered",m.border),o(l).is("checked",o(c)===o(d)),o(l).m(o(i))])},[F("span",{class:T([o(l).e("input"),o(l).is("disabled",o(u)),o(l).is("checked",o(c)===o(d))])},[We(F("input",{ref_key:"radioRef",ref:a,"onUpdate:modelValue":p=>gn(c)?c.value=p:null,class:T(o(l).e("original")),value:o(d),name:m.name||((h=o(s))==null?void 0:h.name),disabled:o(u),checked:o(c)===o(d),type:"radio",onFocus:p=>r.value=!0,onBlur:p=>r.value=!1,onChange:f,onClick:Le(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[Rc,o(c)]]),F("span",{class:T(o(l).e("inner"))},null,2)],2),F("span",{class:T(o(l).e("label")),onKeydown:Le(()=>{},["stop"])},[G(m.$slots,"default",{},()=>[st(pe(m.label),1)])],42,["onKeydown"])],2)}}});var Iy=fe(Ny,[["__file","radio.vue"]]);const My=de({...qd}),Ry=x({name:"ElRadioButton"}),Py=x({...Ry,props:My,setup(e){const t=e,n=ue("radio"),{radioRef:l,focus:a,size:s,disabled:r,modelValue:i,radioGroup:u,actualValue:c}=Zd(t),d=y(()=>({backgroundColor:(u==null?void 0:u.fill)||"",borderColor:(u==null?void 0:u.fill)||"",boxShadow:u!=null&&u.fill?`-1px 0 0 0 ${u.fill}`:"",color:(u==null?void 0:u.textColor)||""}));return(f,m)=>{var v;return _(),V("label",{class:T([o(n).b("button"),o(n).is("active",o(i)===o(c)),o(n).is("disabled",o(r)),o(n).is("focus",o(a)),o(n).bm("button",o(s))])},[We(F("input",{ref_key:"radioRef",ref:l,"onUpdate:modelValue":h=>gn(i)?i.value=h:null,class:T(o(n).be("button","original-radio")),value:o(c),type:"radio",name:f.name||((v=o(u))==null?void 0:v.name),disabled:o(r),onFocus:h=>a.value=!0,onBlur:h=>a.value=!1,onClick:Le(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[Rc,o(i)]]),F("span",{class:T(o(n).be("button","inner")),style:_e(o(i)===o(c)?o(d):{}),onKeydown:Le(()=>{},["stop"])},[G(f.$slots,"default",{},()=>[st(pe(f.label),1)])],46,["onKeydown"])],2)}}});var Jd=fe(Py,[["__file","radio-button.vue"]]);const Oy=de({id:{type:String,default:void 0},size:Jt,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...cn(["ariaLabel"])}),Ly=Gd,By=x({name:"ElRadioGroup"}),Vy=x({...By,props:Oy,emits:Ly,setup(e,{emit:t}){const n=e,l=ue("radio"),a=sn(),s=I(),{formItem:r}=dn(),{inputId:i,isLabeledByFormItem:u}=Kn(n,{formItemContext:r}),c=f=>{t(De,f),Ee(()=>t(nt,f))};Xe(()=>{const f=s.value.querySelectorAll("[type=radio]"),m=f[0];!Array.from(f).some(v=>v.checked)&&m&&(m.tabIndex=0)});const d=y(()=>n.name||a.value);return rt(Xd,kt({...nn(n),changeEvent:c,name:d})),ie(()=>n.modelValue,()=>{n.validateEvent&&(r==null||r.validate("change").catch(f=>void 0))}),(f,m)=>(_(),V("div",{id:o(i),ref_key:"radioGroupRef",ref:s,class:T(o(l).b("group")),role:"radiogroup","aria-label":o(u)?void 0:f.ariaLabel||"radio-group","aria-labelledby":o(u)?o(r).labelId:void 0},[G(f.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var Qd=fe(Vy,[["__file","radio-group.vue"]]);const ef=He(Iy,{RadioButton:Jd,RadioGroup:Qd}),Dy=At(Qd),Ay=At(Jd);function Fy(e){return!!(ke(e)?e.every(({type:t})=>t===jl):(e==null?void 0:e.type)===jl)}var xy=x({name:"NodeContent",props:{node:{type:Object,required:!0},renderLabelFn:Function},setup(e){const t=ue("cascader-node"),{renderLabelFn:n,node:l}=e,{data:a,label:s}=l,r=()=>{const i=n==null?void 0:n({node:l,data:a});return Fy(i)?s:i??s};return()=>H("span",{class:t.e("label")},[r()])}});const li=Symbol(),zy=x({name:"ElCascaderNode"}),Hy=x({...zy,props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(e,{emit:t}){const n=e,l=we(li),a=ue("cascader-node"),s=y(()=>l.isHoverMenu),r=y(()=>l.config.multiple),i=y(()=>l.config.checkStrictly),u=y(()=>{var $;return($=l.checkedNodes[0])==null?void 0:$.uid}),c=y(()=>n.node.isDisabled),d=y(()=>n.node.isLeaf),f=y(()=>i.value&&!d.value||!c.value),m=y(()=>h(l.expandingNode)),v=y(()=>i.value&&l.checkedNodes.some(h)),h=$=>{var M;const{level:R,uid:N}=n.node;return((M=$==null?void 0:$.pathNodes[R-1])==null?void 0:M.uid)===N},p=()=>{m.value||l.expandNode(n.node)},g=$=>{const{node:M}=n;$!==M.checked&&l.handleCheckChange(M,$)},b=()=>{l.lazyLoad(n.node,()=>{d.value||p()})},E=$=>{s.value&&(C(),!d.value&&t("expand",$))},C=()=>{const{node:$}=n;!f.value||$.loading||($.loaded?p():b())},w=()=>{s.value&&!d.value||(d.value&&!c.value&&!i.value&&!r.value?S(!0):C())},k=$=>{i.value?(g($),n.node.loaded&&p()):S($)},S=$=>{n.node.loaded?(g($),!i.value&&p()):b()};return($,M)=>(_(),V("li",{id:`${e.menuId}-${e.node.uid}`,role:"menuitem","aria-haspopup":!o(d),"aria-owns":o(d)?void 0:e.menuId,"aria-expanded":o(m),tabindex:o(f)?-1:void 0,class:T([o(a).b(),o(a).is("selectable",o(i)),o(a).is("active",e.node.checked),o(a).is("disabled",!o(f)),o(m)&&"in-active-path",o(v)&&"in-checked-path"]),onMouseenter:E,onFocus:E,onClick:w},[J(" prefix "),o(r)?(_(),oe(o(Hn),{key:0,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:o(c),onClick:Le(()=>{},["stop"]),"onUpdate:modelValue":k},null,8,["model-value","indeterminate","disabled","onClick"])):o(i)?(_(),oe(o(ef),{key:1,"model-value":o(u),label:e.node.uid,disabled:o(c),"onUpdate:modelValue":k,onClick:Le(()=>{},["stop"])},{default:U(()=>[J(`
Add an empty element to avoid render label,
do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485
`),F("span")]),_:1},8,["model-value","label","disabled","onClick"])):o(d)&&e.node.checked?(_(),oe(o(Se),{key:2,class:T(o(a).e("prefix"))},{default:U(()=>[H(o(va))]),_:1},8,["class"])):J("v-if",!0),H(o(xy),{"render-label-fn":o(l).renderLabelFn,node:e.node},null,8,["render-label-fn","node"]),J(" postfix "),o(d)?J("v-if",!0):(_(),V(Oe,{key:3},[e.node.loading?(_(),oe(o(Se),{key:0,class:T([o(a).is("loading"),o(a).e("postfix")])},{default:U(()=>[H(o(Qn))]),_:1},8,["class"])):(_(),oe(o(Se),{key:1,class:T(["arrow-right",o(a).e("postfix")])},{default:U(()=>[H(o(Cn))]),_:1},8,["class"]))],64))],42,["id","aria-haspopup","aria-owns","aria-expanded","tabindex"]))}});var Ky=fe(Hy,[["__file","node.vue"]]);const Wy=x({name:"ElCascaderMenu"}),jy=x({...Wy,props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(e){const t=e,n=lt(),l=ue("cascader-menu"),{t:a}=pt(),s=sn();let r,i;const u=we(li),c=I(),d=y(()=>!t.nodes.length),f=y(()=>!u.initialLoaded),m=y(()=>`${s.value}-${t.index}`),v=b=>{r=b.target},h=b=>{if(!(!u.isHoverMenu||!r||!c.value))if(r.contains(b.target)){p();const E=n.vnode.el,{left:C}=E.getBoundingClientRect(),{offsetWidth:w,offsetHeight:k}=E,S=b.clientX-C,$=r.offsetTop,M=$+r.offsetHeight;c.value.innerHTML=`
diff --git a/web/admin-spa/dist/assets/index-BfaL5u2_.js b/web/admin-spa/dist/assets/index-CJmHAjMf.js
similarity index 89%
rename from web/admin-spa/dist/assets/index-BfaL5u2_.js
rename to web/admin-spa/dist/assets/index-CJmHAjMf.js
index 255ee66d..fa6fa7b5 100644
--- a/web/admin-spa/dist/assets/index-BfaL5u2_.js
+++ b/web/admin-spa/dist/assets/index-CJmHAjMf.js
@@ -1,2 +1,2 @@
-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-DzGla9X4.js","assets/vue-vendor-YmkKLAOK.js","assets/element-plus-D-FTEVKS.js","assets/vendor-BDiMbLwQ.js","assets/element-plus-CPnoEkWW.css","assets/LoginView-tn0RQdqM.css","assets/LogoTitle-DN1tf4fC.css","assets/MainLayout-CuRONP9w.js","assets/toast-BvwA7Mwb.js","assets/LogoTitle-DG-EsEim.js","assets/MainLayout-DUdrWfaX.css","assets/DashboardView-Cr_S60dH.js","assets/chart-Cor9iTVD.js","assets/DashboardView-BNhlTn49.css","assets/ApiKeysView-6cuFce66.js","assets/ApiKeysView-C710offB.css","assets/AccountsView-CEcjZ_mL.js","assets/AccountsView-CzMsrxvN.css","assets/TutorialView-DVPcd000.js","assets/TutorialView-DrYIAHe5.css","assets/SettingsView-D0CT7ebY.js","assets/SettingsView-rXAPQgqk.css","assets/ApiStatsView-CttWyc18.js","assets/ApiStatsView-onZNVLml.css"])))=>i.map(i=>d[i]);
-import{aP as K,aQ as W,aR as F,r as _,c as L,q as R,V as D,I as q,z as h,x as T,ac as M,Q as G,a5 as N,y,C as S,L as x,P as b,Y as U,B as H,R as P,J,T as Q,O as X,av as Y,aM as Z,aS as ee}from"./vue-vendor-YmkKLAOK.js";import{i as te,z as oe}from"./element-plus-D-FTEVKS.js";import"./vendor-BDiMbLwQ.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const n of a.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&o(n)}).observe(document,{childList:!0,subtree:!0});function e(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function o(s){if(s.ep)return;s.ep=!0;const a=e(s);fetch(s.href,a)}})();const se="modulepreload",ne=function(r){return"/admin-next/"+r},$={},w=function(t,e,o){let s=Promise.resolve();if(e&&e.length>0){document.getElementsByTagName("link");const n=document.querySelector("meta[property=csp-nonce]"),p=(n==null?void 0:n.nonce)||(n==null?void 0:n.getAttribute("nonce"));s=Promise.allSettled(e.map(c=>{if(c=ne(c),c in $)return;$[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const i=document.createElement("link");if(i.rel=l?"stylesheet":se,l||(i.as="script"),i.crossOrigin="",i.href=c,p&&i.setAttribute("nonce",p),document.head.appendChild(i),l)return new Promise((m,f)=>{i.addEventListener("load",m),i.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(n){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=n,window.dispatchEvent(p),!p.defaultPrevented)throw n}return s.then(n=>{for(const p of n||[])p.status==="rejected"&&a(p.reason);return t().catch(a)})},V={basePath:"/admin-next/",apiPrefix:""};function ae(r=""){return r&&!r.startsWith("/")&&(r="/"+r),V.basePath+(r.startsWith("#")?r:"#"+r)}function re(){return ae("/login")}const ie=()=>w(()=>import("./LoginView-DzGla9X4.js"),__vite__mapDeps([0,1,2,3,4,5,6])),E=()=>w(()=>import("./MainLayout-CuRONP9w.js"),__vite__mapDeps([7,1,8,9,6,2,3,4,10])),ce=()=>w(()=>import("./DashboardView-Cr_S60dH.js"),__vite__mapDeps([11,2,1,3,4,8,12,13])),le=()=>w(()=>import("./ApiKeysView-6cuFce66.js"),__vite__mapDeps([14,2,1,3,4,8,15])),ue=()=>w(()=>import("./AccountsView-CEcjZ_mL.js"),__vite__mapDeps([16,1,8,2,3,4,17])),de=()=>w(()=>import("./TutorialView-DVPcd000.js"),__vite__mapDeps([18,1,2,3,4,19])),fe=()=>w(()=>import("./SettingsView-D0CT7ebY.js"),__vite__mapDeps([20,1,8,2,3,4,21])),he=()=>w(()=>import("./ApiStatsView-CttWyc18.js"),__vite__mapDeps([22,1,9,6,3,18,2,4,19,23])),me=[{path:"/",redirect:"/api-stats"},{path:"/login",name:"Login",component:ie,meta:{requiresAuth:!1}},{path:"/api-stats",name:"ApiStats",component:he,meta:{requiresAuth:!1}},{path:"/dashboard",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"Dashboard",component:ce}]},{path:"/api-keys",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"ApiKeys",component:le}]},{path:"/accounts",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"Accounts",component:ue}]},{path:"/tutorial",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"Tutorial",component:de}]},{path:"/settings",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"Settings",component:fe}]}],C=K({history:W(V.basePath),routes:me});C.beforeEach((r,t,e)=>{const o=B();console.log("路由导航:",{to:r.path,from:t.path,requiresAuth:r.meta.requiresAuth,isAuthenticated:o.isAuthenticated}),r.path==="/api-stats"||r.path.startsWith("/api-stats")?e():r.meta.requiresAuth&&!o.isAuthenticated?e("/login"):r.path==="/login"&&o.isAuthenticated?e("/dashboard"):e()});const z=V.apiPrefix;function A(r){return r.startsWith("/")||(r="/"+r),z+r}class pe{constructor(){this.baseURL=z}getAuthToken(){return localStorage.getItem("authToken")||null}buildConfig(t={}){const e={headers:{"Content-Type":"application/json",...t.headers},...t},o=this.getAuthToken();return o&&(e.headers.Authorization=`Bearer ${o}`),e}async handleResponse(t){if(t.status===401){const o=window.location.pathname+window.location.hash;throw o.includes("/login")||o.endsWith("/")||(localStorage.removeItem("authToken"),window.location.href=re()),new Error("Unauthorized")}const e=t.headers.get("content-type");if(e&&e.includes("application/json")){const o=await t.json();if(!t.ok)throw new Error(o.message||`HTTP ${t.status}`);return o}if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);return t}async get(t,e={}){const o=A(t),s=this.buildConfig({...e,method:"GET"});try{const a=await fetch(o,s);return await this.handleResponse(a)}catch(a){throw console.error("API GET Error:",a),a}}async post(t,e=null,o={}){const s=A(t),a=this.buildConfig({...o,method:"POST",body:e?JSON.stringify(e):void 0});try{const n=await fetch(s,a);return await this.handleResponse(n)}catch(n){throw console.error("API POST Error:",n),n}}async put(t,e=null,o={}){const s=A(t),a=this.buildConfig({...o,method:"PUT",body:e?JSON.stringify(e):void 0});try{const n=await fetch(s,a);return await this.handleResponse(n)}catch(n){throw console.error("API PUT Error:",n),n}}async delete(t,e={}){const o=A(t),s=this.buildConfig({...e,method:"DELETE"});try{const a=await fetch(o,s);return await this.handleResponse(a)}catch(a){throw console.error("API DELETE Error:",a),a}}}const k=new pe,B=F("auth",()=>{const r=_(!1),t=_(localStorage.getItem("authToken")||""),e=_(""),o=_(""),s=_(!1),a=_({siteName:"Claude Relay Service",siteIcon:"",siteIconData:"",faviconData:""}),n=_(!0),p=L(()=>!!t.value&&r.value),c=L(()=>t.value),l=L(()=>({username:e.value}));async function d(u){s.value=!0,o.value="";try{const g=await k.post("/web/auth/login",u);g.success?(t.value=g.token,e.value=g.username||u.username,r.value=!0,localStorage.setItem("authToken",g.token),await C.push("/dashboard")):o.value=g.message||"登录失败"}catch(g){o.value=g.message||"登录失败,请检查用户名和密码"}finally{s.value=!1}}function i(){r.value=!1,t.value="",e.value="",localStorage.removeItem("authToken"),C.push("/login")}function m(){t.value&&(r.value=!0,f())}async function f(){try{const u=await k.get("/web/auth/user");u.success&&u.user&&(e.value=u.user.username),(await k.get("/admin/dashboard")).success||i()}catch{i()}}async function v(){n.value=!0;try{const u=await k.get("/admin/oem-settings");if(u.success&&u.data){if(a.value={...a.value,...u.data},u.data.siteIconData||u.data.siteIcon){const g=document.querySelector("link[rel*='icon']")||document.createElement("link");g.type="image/x-icon",g.rel="shortcut icon",g.href=u.data.siteIconData||u.data.siteIcon,document.getElementsByTagName("head")[0].appendChild(g)}u.data.siteName&&(document.title=`${u.data.siteName} - 管理后台`)}}catch(u){console.error("加载OEM设置失败:",u)}finally{n.value=!1}}return{isLoggedIn:r,authToken:t,username:e,loginError:o,loginLoading:s,oemSettings:a,oemLoading:n,isAuthenticated:p,token:c,user:l,login:d,logout:i,checkAuth:m,loadOemSettings:v}}),O=(r,t)=>{const e=r.__vccOpts||r;for(const[o,s]of t)e[o]=s;return e},_e={class:"toast-container"},ge=["onClick"],ve={class:"toast-content"},ye={class:"toast-icon"},we={class:"toast-body"},Te={key:0,class:"toast-title"},be={class:"toast-message"},Ee=["onClick"],Ae={__name:"ToastNotification",setup(r,{expose:t}){const e=_([]);let o=0;const s=l=>{const d={success:"fas fa-check-circle",error:"fas fa-exclamation-circle",warning:"fas fa-exclamation-triangle",info:"fas fa-info-circle"};return d[l]||d.info},a=(l,d="info",i=null,m=5e3)=>{const f=++o,v={id:f,message:l,type:d,title:i,duration:m,isVisible:!1};return e.value.push(v),setTimeout(()=>{v.isVisible=!0},10),m>0&&setTimeout(()=>{n(f)},m),f},n=l=>{const d=e.value.findIndex(i=>i.id===l);if(d>-1){const i=e.value[d];i.isVisible=!1,setTimeout(()=>{const m=e.value.findIndex(f=>f.id===l);m>-1&&e.value.splice(m,1)},300)}},p=()=>{e.value.forEach(l=>{l.isVisible=!1}),setTimeout(()=>{e.value.length=0},300)},c=(l,d="info",i=null,m=5e3)=>a(l,d,i,m);return R(()=>{window.showToast=c}),D(()=>{window.showToast===c&&delete window.showToast}),t({showToast:c,removeToast:n,clearAllToasts:p}),(l,d)=>(y(),q(N,{to:"body"},[h("div",_e,[(y(!0),T(G,null,M(e.value,i=>(y(),T("div",{key:i.id,class:S(["toast",`toast-${i.type}`,i.isVisible?"toast-show":"toast-hide"]),onClick:m=>n(i.id)},[h("div",ve,[h("div",ye,[h("i",{class:S(s(i.type))},null,2)]),h("div",we,[i.title?(y(),T("div",Te,b(i.title),1)):x("",!0),h("div",be,b(i.message),1)]),h("button",{class:"toast-close",onClick:U(m=>n(i.id),["stop"])},d[0]||(d[0]=[h("i",{class:"fas fa-times"},null,-1)]),8,Ee)]),i.duration>0?(y(),T("div",{key:0,class:"toast-progress",style:H({animationDuration:`${i.duration}ms`})},null,4)):x("",!0)],10,ge))),128))])]))}},ke=O(Ae,[["__scopeId","data-v-383c6781"]]),Pe={class:"modal-content w-full max-w-md p-6 mx-auto"},xe={class:"flex items-start gap-4 mb-6"},Ce={class:"flex-1"},Ie={class:"text-lg font-semibold text-gray-900 mb-2"},Le={class:"text-gray-600 leading-relaxed whitespace-pre-line"},Se={class:"flex items-center justify-end gap-3"},Re=["disabled"],Ve=["disabled"],Oe={key:0,class:"loading-spinner mr-2"},$e={__name:"ConfirmDialog",setup(r,{expose:t}){const e=_(!1),o=_(!1),s=_(""),a=_(""),n=_("确认"),p=_("取消");let c=null;const l=(f,v,u="确认",g="取消")=>new Promise(j=>{s.value=f,a.value=v,n.value=u,p.value=g,e.value=!0,o.value=!1,c=j}),d=()=>{o.value||(o.value=!0,setTimeout(()=>{e.value=!1,o.value=!1,c&&(c(!0),c=null)},200))},i=()=>{o.value||(e.value=!1,c&&(c(!1),c=null))},m=f=>{e.value&&(f.key==="Escape"?i():f.key==="Enter"&&!f.shiftKey&&!f.ctrlKey&&!f.altKey&&d())};return R(()=>{window.showConfirm=l,document.addEventListener("keydown",m)}),D(()=>{window.showConfirm===l&&delete window.showConfirm,document.removeEventListener("keydown",m)}),t({showConfirm:l}),(f,v)=>(y(),q(N,{to:"body"},[P(Q,{name:"modal",appear:""},{default:J(()=>[e.value?(y(),T("div",{key:0,class:"fixed inset-0 modal z-50 flex items-center justify-center p-4",onClick:U(i,["self"])},[h("div",Pe,[h("div",xe,[v[0]||(v[0]=h("div",{class:"flex-shrink-0 w-12 h-12 bg-gradient-to-br from-red-500 to-red-600 rounded-xl flex items-center justify-center"},[h("i",{class:"fas fa-exclamation-triangle text-white text-lg"})],-1)),h("div",Ce,[h("h3",Ie,b(s.value),1),h("div",Le,b(a.value),1)])]),h("div",Se,[h("button",{onClick:i,class:"btn bg-gray-100 text-gray-700 hover:bg-gray-200 px-6 py-3",disabled:o.value},b(p.value),9,Re),h("button",{onClick:d,class:S(["btn btn-danger px-6 py-3",{"opacity-50 cursor-not-allowed":o.value}]),disabled:o.value},[o.value?(y(),T("div",Oe)):x("",!0),X(" "+b(n.value),1)],10,Ve)])])])):x("",!0)]),_:1})]))}},De=O($e,[["__scopeId","data-v-16560808"]]),qe={id:"app"},Ne={__name:"App",setup(r){const t=B(),e=_(),o=_();return R(()=>{t.checkAuth(),t.loadOemSettings()}),(s,a)=>{const n=Y("router-view");return y(),T("div",qe,[P(n),P(ke,{ref_key:"toastRef",ref:e},null,512),P(De,{ref_key:"confirmRef",ref:o},null,512)])}}},Ue=O(Ne,[["__scopeId","data-v-5cba45f5"]]),I=Z(Ue),ze=ee();I.use(ze);I.use(C);I.use(te,{locale:oe});I.mount("#app");export{O as _,k as a,B as u};
+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-CgFwBxpX.js","assets/vue-vendor-CKToUHZx.js","assets/element-plus-B8Fs_0jW.js","assets/vendor-BDiMbLwQ.js","assets/element-plus-CPnoEkWW.css","assets/LoginView-tn0RQdqM.css","assets/LogoTitle-zkjZaSZH.css","assets/MainLayout-257Lv4Zf.js","assets/toast-BvwA7Mwb.js","assets/LogoTitle-hKoMpRxB.js","assets/MainLayout-BSYYg59M.css","assets/DashboardView-B48Cl-60.js","assets/chart-Cor9iTVD.js","assets/DashboardView-BNhlTn49.css","assets/ApiKeysView-ZopVw-Bq.js","assets/ApiKeysView-C710offB.css","assets/AccountsView-zsZTMRlc.js","assets/AccountsView-CzMsrxvN.css","assets/TutorialView-IE8R1R6Q.js","assets/TutorialView-DrYIAHe5.css","assets/SettingsView-Cj5OFaUq.js","assets/SettingsView-rXAPQgqk.css","assets/ApiStatsView-DE1u-LE3.js","assets/ApiStatsView-onZNVLml.css"])))=>i.map(i=>d[i]);
+import{aP as K,aQ as W,aR as F,r as _,c as L,q as R,V as D,I as q,z as h,x as T,ac as M,Q as G,a5 as N,y,C as S,L as x,P as b,Y as U,B as H,R as P,J,T as Q,O as X,av as Y,aM as Z,aS as ee}from"./vue-vendor-CKToUHZx.js";import{i as te,z as oe}from"./element-plus-B8Fs_0jW.js";import"./vendor-BDiMbLwQ.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const n of a.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&o(n)}).observe(document,{childList:!0,subtree:!0});function e(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function o(s){if(s.ep)return;s.ep=!0;const a=e(s);fetch(s.href,a)}})();const se="modulepreload",ne=function(r){return"/admin-next/"+r},$={},w=function(t,e,o){let s=Promise.resolve();if(e&&e.length>0){document.getElementsByTagName("link");const n=document.querySelector("meta[property=csp-nonce]"),p=(n==null?void 0:n.nonce)||(n==null?void 0:n.getAttribute("nonce"));s=Promise.allSettled(e.map(c=>{if(c=ne(c),c in $)return;$[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const i=document.createElement("link");if(i.rel=l?"stylesheet":se,l||(i.as="script"),i.crossOrigin="",i.href=c,p&&i.setAttribute("nonce",p),document.head.appendChild(i),l)return new Promise((m,f)=>{i.addEventListener("load",m),i.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(n){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=n,window.dispatchEvent(p),!p.defaultPrevented)throw n}return s.then(n=>{for(const p of n||[])p.status==="rejected"&&a(p.reason);return t().catch(a)})},V={basePath:"/admin-next/",apiPrefix:""};function ae(r=""){return r&&!r.startsWith("/")&&(r="/"+r),V.basePath+(r.startsWith("#")?r:"#"+r)}function re(){return ae("/login")}const ie=()=>w(()=>import("./LoginView-CgFwBxpX.js"),__vite__mapDeps([0,1,2,3,4,5,6])),E=()=>w(()=>import("./MainLayout-257Lv4Zf.js"),__vite__mapDeps([7,1,8,9,6,2,3,4,10])),ce=()=>w(()=>import("./DashboardView-B48Cl-60.js"),__vite__mapDeps([11,2,1,3,4,8,12,13])),le=()=>w(()=>import("./ApiKeysView-ZopVw-Bq.js"),__vite__mapDeps([14,2,1,3,4,8,15])),ue=()=>w(()=>import("./AccountsView-zsZTMRlc.js"),__vite__mapDeps([16,1,8,2,3,4,17])),de=()=>w(()=>import("./TutorialView-IE8R1R6Q.js"),__vite__mapDeps([18,1,2,3,4,19])),fe=()=>w(()=>import("./SettingsView-Cj5OFaUq.js"),__vite__mapDeps([20,1,8,2,3,4,21])),he=()=>w(()=>import("./ApiStatsView-DE1u-LE3.js"),__vite__mapDeps([22,1,9,6,3,18,2,4,19,23])),me=[{path:"/",redirect:"/api-stats"},{path:"/login",name:"Login",component:ie,meta:{requiresAuth:!1}},{path:"/api-stats",name:"ApiStats",component:he,meta:{requiresAuth:!1}},{path:"/dashboard",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"Dashboard",component:ce}]},{path:"/api-keys",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"ApiKeys",component:le}]},{path:"/accounts",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"Accounts",component:ue}]},{path:"/tutorial",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"Tutorial",component:de}]},{path:"/settings",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"Settings",component:fe}]}],C=K({history:W(V.basePath),routes:me});C.beforeEach((r,t,e)=>{const o=B();console.log("路由导航:",{to:r.path,from:t.path,requiresAuth:r.meta.requiresAuth,isAuthenticated:o.isAuthenticated}),r.path==="/api-stats"||r.path.startsWith("/api-stats")?e():r.meta.requiresAuth&&!o.isAuthenticated?e("/login"):r.path==="/login"&&o.isAuthenticated?e("/dashboard"):e()});const z=V.apiPrefix;function A(r){return r.startsWith("/")||(r="/"+r),z+r}class pe{constructor(){this.baseURL=z}getAuthToken(){return localStorage.getItem("authToken")||null}buildConfig(t={}){const e={headers:{"Content-Type":"application/json",...t.headers},...t},o=this.getAuthToken();return o&&(e.headers.Authorization=`Bearer ${o}`),e}async handleResponse(t){if(t.status===401){const o=window.location.pathname+window.location.hash;throw o.includes("/login")||o.endsWith("/")||(localStorage.removeItem("authToken"),window.location.href=re()),new Error("Unauthorized")}const e=t.headers.get("content-type");if(e&&e.includes("application/json")){const o=await t.json();if(!t.ok)throw new Error(o.message||`HTTP ${t.status}`);return o}if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);return t}async get(t,e={}){const o=A(t),s=this.buildConfig({...e,method:"GET"});try{const a=await fetch(o,s);return await this.handleResponse(a)}catch(a){throw console.error("API GET Error:",a),a}}async post(t,e=null,o={}){const s=A(t),a=this.buildConfig({...o,method:"POST",body:e?JSON.stringify(e):void 0});try{const n=await fetch(s,a);return await this.handleResponse(n)}catch(n){throw console.error("API POST Error:",n),n}}async put(t,e=null,o={}){const s=A(t),a=this.buildConfig({...o,method:"PUT",body:e?JSON.stringify(e):void 0});try{const n=await fetch(s,a);return await this.handleResponse(n)}catch(n){throw console.error("API PUT Error:",n),n}}async delete(t,e={}){const o=A(t),s=this.buildConfig({...e,method:"DELETE"});try{const a=await fetch(o,s);return await this.handleResponse(a)}catch(a){throw console.error("API DELETE Error:",a),a}}}const k=new pe,B=F("auth",()=>{const r=_(!1),t=_(localStorage.getItem("authToken")||""),e=_(""),o=_(""),s=_(!1),a=_({siteName:"Claude Relay Service",siteIcon:"",siteIconData:"",faviconData:""}),n=_(!0),p=L(()=>!!t.value&&r.value),c=L(()=>t.value),l=L(()=>({username:e.value}));async function d(u){s.value=!0,o.value="";try{const g=await k.post("/web/auth/login",u);g.success?(t.value=g.token,e.value=g.username||u.username,r.value=!0,localStorage.setItem("authToken",g.token),await C.push("/dashboard")):o.value=g.message||"登录失败"}catch(g){o.value=g.message||"登录失败,请检查用户名和密码"}finally{s.value=!1}}function i(){r.value=!1,t.value="",e.value="",localStorage.removeItem("authToken"),C.push("/login")}function m(){t.value&&(r.value=!0,f())}async function f(){try{const u=await k.get("/web/auth/user");u.success&&u.user&&(e.value=u.user.username),(await k.get("/admin/dashboard")).success||i()}catch{i()}}async function v(){n.value=!0;try{const u=await k.get("/admin/oem-settings");if(u.success&&u.data){if(a.value={...a.value,...u.data},u.data.siteIconData||u.data.siteIcon){const g=document.querySelector("link[rel*='icon']")||document.createElement("link");g.type="image/x-icon",g.rel="shortcut icon",g.href=u.data.siteIconData||u.data.siteIcon,document.getElementsByTagName("head")[0].appendChild(g)}u.data.siteName&&(document.title=`${u.data.siteName} - 管理后台`)}}catch(u){console.error("加载OEM设置失败:",u)}finally{n.value=!1}}return{isLoggedIn:r,authToken:t,username:e,loginError:o,loginLoading:s,oemSettings:a,oemLoading:n,isAuthenticated:p,token:c,user:l,login:d,logout:i,checkAuth:m,loadOemSettings:v}}),O=(r,t)=>{const e=r.__vccOpts||r;for(const[o,s]of t)e[o]=s;return e},_e={class:"toast-container"},ge=["onClick"],ve={class:"toast-content"},ye={class:"toast-icon"},we={class:"toast-body"},Te={key:0,class:"toast-title"},be={class:"toast-message"},Ee=["onClick"],Ae={__name:"ToastNotification",setup(r,{expose:t}){const e=_([]);let o=0;const s=l=>{const d={success:"fas fa-check-circle",error:"fas fa-exclamation-circle",warning:"fas fa-exclamation-triangle",info:"fas fa-info-circle"};return d[l]||d.info},a=(l,d="info",i=null,m=5e3)=>{const f=++o,v={id:f,message:l,type:d,title:i,duration:m,isVisible:!1};return e.value.push(v),setTimeout(()=>{v.isVisible=!0},10),m>0&&setTimeout(()=>{n(f)},m),f},n=l=>{const d=e.value.findIndex(i=>i.id===l);if(d>-1){const i=e.value[d];i.isVisible=!1,setTimeout(()=>{const m=e.value.findIndex(f=>f.id===l);m>-1&&e.value.splice(m,1)},300)}},p=()=>{e.value.forEach(l=>{l.isVisible=!1}),setTimeout(()=>{e.value.length=0},300)},c=(l,d="info",i=null,m=5e3)=>a(l,d,i,m);return R(()=>{window.showToast=c}),D(()=>{window.showToast===c&&delete window.showToast}),t({showToast:c,removeToast:n,clearAllToasts:p}),(l,d)=>(y(),q(N,{to:"body"},[h("div",_e,[(y(!0),T(G,null,M(e.value,i=>(y(),T("div",{key:i.id,class:S(["toast",`toast-${i.type}`,i.isVisible?"toast-show":"toast-hide"]),onClick:m=>n(i.id)},[h("div",ve,[h("div",ye,[h("i",{class:S(s(i.type))},null,2)]),h("div",we,[i.title?(y(),T("div",Te,b(i.title),1)):x("",!0),h("div",be,b(i.message),1)]),h("button",{class:"toast-close",onClick:U(m=>n(i.id),["stop"])},d[0]||(d[0]=[h("i",{class:"fas fa-times"},null,-1)]),8,Ee)]),i.duration>0?(y(),T("div",{key:0,class:"toast-progress",style:H({animationDuration:`${i.duration}ms`})},null,4)):x("",!0)],10,ge))),128))])]))}},ke=O(Ae,[["__scopeId","data-v-383c6781"]]),Pe={class:"modal-content w-full max-w-md p-6 mx-auto"},xe={class:"flex items-start gap-4 mb-6"},Ce={class:"flex-1"},Ie={class:"text-lg font-semibold text-gray-900 mb-2"},Le={class:"text-gray-600 leading-relaxed whitespace-pre-line"},Se={class:"flex items-center justify-end gap-3"},Re=["disabled"],Ve=["disabled"],Oe={key:0,class:"loading-spinner mr-2"},$e={__name:"ConfirmDialog",setup(r,{expose:t}){const e=_(!1),o=_(!1),s=_(""),a=_(""),n=_("确认"),p=_("取消");let c=null;const l=(f,v,u="确认",g="取消")=>new Promise(j=>{s.value=f,a.value=v,n.value=u,p.value=g,e.value=!0,o.value=!1,c=j}),d=()=>{o.value||(o.value=!0,setTimeout(()=>{e.value=!1,o.value=!1,c&&(c(!0),c=null)},200))},i=()=>{o.value||(e.value=!1,c&&(c(!1),c=null))},m=f=>{e.value&&(f.key==="Escape"?i():f.key==="Enter"&&!f.shiftKey&&!f.ctrlKey&&!f.altKey&&d())};return R(()=>{window.showConfirm=l,document.addEventListener("keydown",m)}),D(()=>{window.showConfirm===l&&delete window.showConfirm,document.removeEventListener("keydown",m)}),t({showConfirm:l}),(f,v)=>(y(),q(N,{to:"body"},[P(Q,{name:"modal",appear:""},{default:J(()=>[e.value?(y(),T("div",{key:0,class:"fixed inset-0 modal z-50 flex items-center justify-center p-4",onClick:U(i,["self"])},[h("div",Pe,[h("div",xe,[v[0]||(v[0]=h("div",{class:"flex-shrink-0 w-12 h-12 bg-gradient-to-br from-red-500 to-red-600 rounded-xl flex items-center justify-center"},[h("i",{class:"fas fa-exclamation-triangle text-white text-lg"})],-1)),h("div",Ce,[h("h3",Ie,b(s.value),1),h("div",Le,b(a.value),1)])]),h("div",Se,[h("button",{onClick:i,class:"btn bg-gray-100 text-gray-700 hover:bg-gray-200 px-6 py-3",disabled:o.value},b(p.value),9,Re),h("button",{onClick:d,class:S(["btn btn-danger px-6 py-3",{"opacity-50 cursor-not-allowed":o.value}]),disabled:o.value},[o.value?(y(),T("div",Oe)):x("",!0),X(" "+b(n.value),1)],10,Ve)])])])):x("",!0)]),_:1})]))}},De=O($e,[["__scopeId","data-v-16560808"]]),qe={id:"app"},Ne={__name:"App",setup(r){const t=B(),e=_(),o=_();return R(()=>{t.checkAuth(),t.loadOemSettings()}),(s,a)=>{const n=Y("router-view");return y(),T("div",qe,[P(n),P(ke,{ref_key:"toastRef",ref:e},null,512),P(De,{ref_key:"confirmRef",ref:o},null,512)])}}},Ue=O(Ne,[["__scopeId","data-v-5cba45f5"]]),I=Z(Ue),ze=ee();I.use(ze);I.use(C);I.use(te,{locale:oe});I.mount("#app");export{O as _,k as a,B as u};
diff --git a/web/admin-spa/dist/assets/vue-vendor-YmkKLAOK.js b/web/admin-spa/dist/assets/vue-vendor-CKToUHZx.js
similarity index 74%
rename from web/admin-spa/dist/assets/vue-vendor-YmkKLAOK.js
rename to web/admin-spa/dist/assets/vue-vendor-CKToUHZx.js
index 12af68c2..c97778eb 100644
--- a/web/admin-spa/dist/assets/vue-vendor-YmkKLAOK.js
+++ b/web/admin-spa/dist/assets/vue-vendor-CKToUHZx.js
@@ -10,7 +10,7 @@
* @vue/runtime-core v3.5.18
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
-**/function An(e,t,n,s){try{return s?e(...s):e()}catch(r){ps(r,t,n)}}function We(e,t,n,s){if(q(e)){const r=An(e,t,n,s);return r&&si(r)&&r.catch(o=>{ps(o,t,n)}),r}if(V(e)){const r=[];for(let o=0;o>>1,r=Re[s],o=En(r);o=En(n)?Re.push(e):Re.splice(Hc(t),0,e),e.flags|=1,Mi()}}function Mi(){Yn||(Yn=Ii.then(Fi))}function kc(e){V(e)?zt.push(...e):yt&&e.id===-1?yt.splice(Kt+1,0,e):e.flags&1||(zt.push(e),e.flags|=1),Mi()}function Kr(e,t,n=Xe+1){for(;nEn(n)-En(s));if(zt.length=0,yt){yt.push(...t);return}for(yt=t,Kt=0;Kte.id==null?e.flags&2?-1:1/0:e.id;function Fi(e){try{for(Xe=0;Xe{s._d&&no(-1);const o=Xn(t);let i;try{i=e(...r)}finally{Xn(o),s._d&&no(1)}return i};return s._n=!0,s._c=!0,s._d=!0,s}function dd(e,t){if(ve===null)return e;const n=bs(ve),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,pn=e=>e&&(e.disabled||e.disabled===""),Ur=e=>e&&(e.defer||e.defer===""),Wr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Gr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ws=(e,t)=>{const n=e&&e.to;return ae(n)?t?t(n):null:n},ji={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,c,a){const{mc:u,pc:f,pbc:h,o:{insert:g,querySelector:v,createText:x,createComment:F}}=a,A=pn(t.props);let{shapeFlag:S,children:C,dynamicChildren:E}=t;if(e==null){const D=t.el=x(""),W=t.anchor=x("");g(D,n,s),g(W,n,s);const U=(T,k)=>{S&16&&(r&&r.isCE&&(r.ce._teleportTarget=T),u(C,T,k,r,o,i,l,c))},H=()=>{const T=t.target=Ws(t.props,v),k=Vi(T,t,x,g);T&&(i!=="svg"&&Wr(T)?i="svg":i!=="mathml"&&Gr(T)&&(i="mathml"),A||(U(T,k),Bn(t,!1)))};A&&(U(n,W),Bn(t,!0)),Ur(t.props)?(t.el.__isMounted=!1,he(()=>{H(),delete t.el.__isMounted},o)):H()}else{if(Ur(t.props)&&e.el.__isMounted===!1){he(()=>{ji.process(e,t,n,s,r,o,i,l,c,a)},o);return}t.el=e.el,t.targetStart=e.targetStart;const D=t.anchor=e.anchor,W=t.target=e.target,U=t.targetAnchor=e.targetAnchor,H=pn(e.props),T=H?n:W,k=H?D:U;if(i==="svg"||Wr(W)?i="svg":(i==="mathml"||Gr(W))&&(i="mathml"),E?(h(e.dynamicChildren,E,T,r,o,i,l),Pr(e,t,!0)):c||f(e,t,T,k,r,o,i,l,!1),A)H?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Dn(t,n,D,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Q=t.target=Ws(t.props,v);Q&&Dn(t,Q,null,a,0)}else H&&Dn(t,W,U,a,1);Bn(t,A)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:c,targetStart:a,targetAnchor:u,target:f,props:h}=e;if(f&&(r(a),r(u)),o&&r(c),i&16){const g=o||!pn(h);for(let v=0;v{e.isMounted=!0}),xr(()=>{e.isUnmounting=!0}),e}const Le=[Function,Array],ki={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Le,onEnter:Le,onAfterEnter:Le,onEnterCancelled:Le,onBeforeLeave:Le,onLeave:Le,onAfterLeave:Le,onLeaveCancelled:Le,onBeforeAppear:Le,onAppear:Le,onAfterAppear:Le,onAppearCancelled:Le},Bi=e=>{const t=e.subTree;return t.component?Bi(t.component):t},Uc={name:"BaseTransition",props:ki,setup(e,{slots:t}){const n=Pt(),s=Hi();return()=>{const r=t.default&&wr(t.default(),!0);if(!r||!r.length)return;const o=Ki(r),i=J(e),{mode:l}=i;if(s.isLeaving)return As(o);const c=qr(o);if(!c)return As(o);let a=xn(c,i,s,n,f=>a=f);c.type!==me&&Ct(c,a);let u=n.subTree&&qr(n.subTree);if(u&&u.type!==me&&!wt(c,u)&&Bi(n).type!==me){let f=xn(u,i,s,n);if(Ct(u,f),l==="out-in"&&c.type!==me)return s.isLeaving=!0,f.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,u=void 0},As(o);l==="in-out"&&c.type!==me?f.delayLeave=(h,g,v)=>{const x=Ui(s,u);x[String(u.key)]=u,h[_t]=()=>{g(),h[_t]=void 0,delete a.delayedLeave,u=void 0},a.delayedLeave=()=>{v(),delete a.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function Ki(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==me){t=n;break}}return t}const Wc=Uc;function Ui(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 xn(e,t,n,s,r){const{appear:o,mode:i,persisted:l=!1,onBeforeEnter:c,onEnter:a,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:h,onLeave:g,onAfterLeave:v,onLeaveCancelled:x,onBeforeAppear:F,onAppear:A,onAfterAppear:S,onAppearCancelled:C}=t,E=String(e.key),D=Ui(n,e),W=(T,k)=>{T&&We(T,s,9,k)},U=(T,k)=>{const Q=k[1];W(T,k),V(T)?T.every(L=>L.length<=1)&&Q():T.length<=1&&Q()},H={mode:i,persisted:l,beforeEnter(T){let k=c;if(!n.isMounted)if(o)k=F||c;else return;T[_t]&&T[_t](!0);const Q=D[E];Q&&wt(e,Q)&&Q.el[_t]&&Q.el[_t](),W(k,[T])},enter(T){let k=a,Q=u,L=f;if(!n.isMounted)if(o)k=A||a,Q=S||u,L=C||f;else return;let Y=!1;const de=T[jn]=xe=>{Y||(Y=!0,xe?W(L,[T]):W(Q,[T]),H.delayedLeave&&H.delayedLeave(),T[jn]=void 0)};k?U(k,[T,de]):de()},leave(T,k){const Q=String(e.key);if(T[jn]&&T[jn](!0),n.isUnmounting)return k();W(h,[T]);let L=!1;const Y=T[_t]=de=>{L||(L=!0,k(),de?W(x,[T]):W(v,[T]),T[_t]=void 0,D[Q]===e&&delete D[Q])};D[Q]=e,g?U(g,[T,Y]):Y()},clone(T){const k=xn(T,t,n,s,r);return r&&r(k),k}};return H}function As(e){if(gs(e))return e=at(e),e.children=null,e}function qr(e){if(!gs(e))return Di(e.type)&&e.children?Ki(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&&q(n.default))return n.default()}}function Ct(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ct(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 wr(e,t=!1,n){let s=[],r=0;for(let o=0;o1)for(let o=0;ogn(v,t&&(V(t)?t[x]:t),n,s,r));return}if($t(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&gn(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?bs(s.component):s.el,i=r?null:o,{i:l,r:c}=e,a=t&&t.r,u=l.refs===ie?l.refs={}:l.refs,f=l.setupState,h=J(f),g=f===ie?()=>!1:v=>te(h,v);if(a!=null&&a!==c&&(ae(a)?(u[a]=null,g(a)&&(f[a]=null)):fe(a)&&(a.value=null)),q(c))An(c,l,12,[i,u]);else{const v=ae(c),x=fe(c);if(v||x){const F=()=>{if(e.f){const A=v?g(c)?f[c]:u[c]:c.value;r?V(A)&&ar(A,o):V(A)?A.includes(o)||A.push(o):v?(u[c]=[o],g(c)&&(f[c]=u[c])):(c.value=[o],e.k&&(u[e.k]=c.value))}else v?(u[c]=i,g(c)&&(f[c]=i)):x&&(c.value=i,e.k&&(u[e.k]=i))};i?(F.id=-1,he(F,n)):F()}}}cs().requestIdleCallback;cs().cancelIdleCallback;const $t=e=>!!e.type.__asyncLoader,gs=e=>e.type.__isKeepAlive,Gc={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Pt(),s=n.ctx;if(!s.renderer)return()=>{const S=t.default&&t.default();return S&&S.length===1?S[0]:S};const r=new Map,o=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:f}}}=s,h=f("div");s.activate=(S,C,E,D,W)=>{const U=S.component;a(S,C,E,0,l),c(U.vnode,S,C,E,U,l,D,S.slotScopeIds,W),he(()=>{U.isDeactivated=!1,U.a&&qt(U.a);const H=S.props&&S.props.onVnodeMounted;H&&$e(H,U.parent,S)},l)},s.deactivate=S=>{const C=S.component;es(C.m),es(C.a),a(S,h,null,1,l),he(()=>{C.da&&qt(C.da);const E=S.props&&S.props.onVnodeUnmounted;E&&$e(E,C.parent,S),C.isDeactivated=!0},l)};function g(S){Is(S),u(S,n,l,!0)}function v(S){r.forEach((C,E)=>{const D=Zs(C.type);D&&!S(D)&&x(E)})}function x(S){const C=r.get(S);C&&(!i||!wt(C,i))?g(C):i&&Is(i),r.delete(S),o.delete(S)}ye(()=>[e.include,e.exclude],([S,C])=>{S&&v(E=>un(S,E)),C&&v(E=>!un(C,E))},{flush:"post",deep:!0});let F=null;const A=()=>{F!=null&&(ts(n.subTree.type)?he(()=>{r.set(F,Vn(n.subTree))},n.subTree.suspense):r.set(F,Vn(n.subTree)))};return vs(A),Er(A),xr(()=>{r.forEach(S=>{const{subTree:C,suspense:E}=n,D=Vn(C);if(S.type===D.type&&S.key===D.key){Is(D);const W=D.component.da;W&&he(W,E);return}g(S)})}),()=>{if(F=null,!t.default)return i=null;const S=t.default(),C=S[0];if(S.length>1)return i=null,S;if(!Qt(C)||!(C.shapeFlag&4)&&!(C.shapeFlag&128))return i=null,C;let E=Vn(C);if(E.type===me)return i=null,E;const D=E.type,W=Zs($t(E)?E.type.__asyncResolved||{}:D),{include:U,exclude:H,max:T}=e;if(U&&(!W||!un(U,W))||H&&W&&un(H,W))return E.shapeFlag&=-257,i=E,C;const k=E.key==null?D:E.key,Q=r.get(k);return E.el&&(E=at(E),C.shapeFlag&128&&(C.ssContent=E)),F=k,Q?(E.el=Q.el,E.component=Q.component,E.transition&&Ct(E,E.transition),E.shapeFlag|=512,o.delete(k),o.add(k)):(o.add(k),T&&o.size>parseInt(T,10)&&x(o.values().next().value)),E.shapeFlag|=256,i=E,ts(C.type)?C:E}}},pd=Gc;function un(e,t){return V(e)?e.some(n=>un(n,t)):ae(e)?e.split(",").includes(t):Ql(e)?(e.lastIndex=0,e.test(t)):!1}function qc(e,t){qi(e,"a",t)}function zc(e,t){qi(e,"da",t)}function qi(e,t,n=Se){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ms(t,s,n),n){let r=n.parent;for(;r&&r.parent;)gs(r.parent.vnode)&&Qc(s,t,n,r),r=r.parent}}function Qc(e,t,n,s){const r=ms(t,e,s,!0);zi(()=>{ar(s[t],r)},n)}function Is(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Vn(e){return e.shapeFlag&128?e.ssContent:e}function ms(e,t,n=Se,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{ct();const l=Mn(n),c=We(t,n,e,i);return l(),ut(),c});return s?r.unshift(o):r.push(o),o}}const ft=e=>(t,n=Se)=>{(!Rn||e==="sp")&&ms(e,(...s)=>t(...s),n)},Jc=ft("bm"),vs=ft("m"),Yc=ft("bu"),Er=ft("u"),xr=ft("bum"),zi=ft("um"),Xc=ft("sp"),Zc=ft("rtg"),eu=ft("rtc");function tu(e,t=Se){ms("ec",e,t)}const Cr="components",nu="directives";function gd(e,t){return Rr(Cr,e,!0,t)||e}const Qi=Symbol.for("v-ndc");function md(e){return ae(e)?Rr(Cr,e,!1)||e:e||Qi}function vd(e){return Rr(nu,e)}function Rr(e,t,n=!0,s=!1){const r=ve||Se;if(r){const o=r.type;if(e===Cr){const l=Zs(o,!1);if(l&&(l===t||l===ke(t)||l===ls(ke(t))))return o}const i=zr(r[e]||o[e],t)||zr(r.appContext[e],t);return!i&&s?o:i}}function zr(e,t){return e&&(e[t]||e[ke(t)]||e[ls(ke(t))])}function yd(e,t,n,s){let r;const o=n,i=V(e);if(i||ae(e)){const l=i&<(e);let c=!1,a=!1;l&&(c=!De(e),a=xt(e),e=ds(e)),r=new Array(e.length);for(let u=0,f=e.length;ut(l,c,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,a=l.length;c{const o=s.fn(...r);return o&&(o.key=s.key),o}:s.fn)}return e}function bd(e,t,n={},s,r){if(ve.ce||ve.parent&&$t(ve.parent)&&ve.parent.ce)return t!=="default"&&(n.name=t),Js(),Ys(Ae,null,[Ee("slot",n,s&&s())],64);let o=e[t];o&&o._c&&(o._d=!1),Js();const i=o&&Ji(o(n)),l=n.key||i&&i.key,c=Ys(Ae,{key:(l&&!Ue(l)?l:`_${t}`)+(!i&&s?"_fb":"")},i||(s?s():[]),i&&e._===1?64:-2);return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),o&&o._c&&(o._d=!0),c}function Ji(e){return e.some(t=>Qt(t)?!(t.type===me||t.type===Ae&&!Ji(t.children)):!0)?e:null}function Sd(e,t){const n={};for(const s in e)n[kn(s)]=e[s];return n}const Gs=e=>e?gl(e)?bs(e):Gs(e.parent):null,mn=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=>Gs(e.parent),$root:e=>Gs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Zi(e),$forceUpdate:e=>e.f||(e.f=()=>{Sr(e.update)}),$nextTick:e=>e.n||(e.n=In.bind(e.proxy)),$watch:e=>Cu.bind(e)}),Ms=(e,t)=>e!==ie&&!e.__isScriptSetup&&te(e,t),su={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:c}=e;let a;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Ms(s,t))return i[t]=1,s[t];if(r!==ie&&te(r,t))return i[t]=2,r[t];if((a=e.propsOptions[0])&&te(a,t))return i[t]=3,o[t];if(n!==ie&&te(n,t))return i[t]=4,n[t];qs&&(i[t]=0)}}const u=mn[t];let f,h;if(u)return t==="$attrs"&&be(e.attrs,"get",""),u(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==ie&&te(n,t))return i[t]=4,n[t];if(h=c.config.globalProperties,te(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return Ms(r,t)?(r[t]=n,!0):s!==ie&&te(s,t)?(s[t]=n,!0):te(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:o}},i){let l;return!!n[i]||e!==ie&&te(e,i)||Ms(t,i)||(l=o[0])&&te(l,i)||te(s,i)||te(mn,i)||te(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:te(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function wd(){return Yi().slots}function Ed(){return Yi().attrs}function Yi(e){const t=Pt();return t.setupContext||(t.setupContext=vl(t))}function Qr(e){return V(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let qs=!0;function ru(e){const t=Zi(e),n=e.proxy,s=e.ctx;qs=!1,t.beforeCreate&&Jr(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:c,inject:a,created:u,beforeMount:f,mounted:h,beforeUpdate:g,updated:v,activated:x,deactivated:F,beforeDestroy:A,beforeUnmount:S,destroyed:C,unmounted:E,render:D,renderTracked:W,renderTriggered:U,errorCaptured:H,serverPrefetch:T,expose:k,inheritAttrs:Q,components:L,directives:Y,filters:de}=t;if(a&&ou(a,s,null),i)for(const z in i){const Z=i[z];q(Z)&&(s[z]=Z.bind(n))}if(r){const z=r.call(n,n);se(z)&&(e.data=Pn(z))}if(qs=!0,o)for(const z in o){const Z=o[z],et=q(Z)?Z.bind(n,n):q(Z.get)?Z.get.bind(n,n):Be,ht=!q(Z)&&q(Z.set)?Z.set.bind(n):Be,qe=we({get:et,set:ht});Object.defineProperty(s,z,{enumerable:!0,configurable:!0,get:()=>qe.value,set:Te=>qe.value=Te})}if(l)for(const z in l)Xi(l[z],s,n,z);if(c){const z=q(c)?c.call(n):c;Reflect.ownKeys(z).forEach(Z=>{Kn(Z,z[Z])})}u&&Jr(u,e,"c");function re(z,Z){V(Z)?Z.forEach(et=>z(et.bind(n))):Z&&z(Z.bind(n))}if(re(Jc,f),re(vs,h),re(Yc,g),re(Er,v),re(qc,x),re(zc,F),re(tu,H),re(eu,W),re(Zc,U),re(xr,S),re(zi,E),re(Xc,T),V(k))if(k.length){const z=e.exposed||(e.exposed={});k.forEach(Z=>{Object.defineProperty(z,Z,{get:()=>n[Z],set:et=>n[Z]=et,enumerable:!0})})}else e.exposed||(e.exposed={});D&&e.render===Be&&(e.render=D),Q!=null&&(e.inheritAttrs=Q),L&&(e.components=L),Y&&(e.directives=Y),T&&Gi(e)}function ou(e,t,n=Be){V(e)&&(e=zs(e));for(const s in e){const r=e[s];let o;se(r)?"default"in r?o=je(r.from||s,r.default,!0):o=je(r.from||s):o=je(r),fe(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function Jr(e,t,n){We(V(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Xi(e,t,n,s){let r=s.includes(".")?al(n,s):()=>n[s];if(ae(e)){const o=t[e];q(o)&&ye(r,o)}else if(q(e))ye(r,e.bind(n));else if(se(e))if(V(e))e.forEach(o=>Xi(o,t,n,s));else{const o=q(e.handler)?e.handler.bind(n):t[e.handler];q(o)&&ye(r,o,e)}}function Zi(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(a=>Zn(c,a,i,!0)),Zn(c,t,i)),se(t)&&o.set(t,c),c}function Zn(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Zn(e,o,n,!0),r&&r.forEach(i=>Zn(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=iu[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const iu={data:Yr,props:Xr,emits:Xr,methods:an,computed:an,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:an,directives:an,watch:cu,provide:Yr,inject:lu};function Yr(e,t){return t?e?function(){return pe(q(e)?e.call(this,this):e,q(t)?t.call(this,this):t)}:t:e}function lu(e,t){return an(zs(e),zs(t))}function zs(e){if(V(e)){const t={};for(let n=0;n1)return n&&q(t)?t.call(s&&s.proxy):t}}function fu(){return!!(Pt()||Dt)}const tl={},nl=()=>Object.create(tl),sl=e=>Object.getPrototypeOf(e)===tl;function du(e,t,n,s=!1){const r={},o=nl();e.propsDefaults=Object.create(null),rl(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:Ri(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function hu(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=J(r),[c]=e.propsOptions;let a=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f{c=!0;const[h,g]=ol(f,t,!0);pe(i,h),g&&l.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!c)return se(e)&&s.set(e,Wt),Wt;if(V(o))for(let u=0;ue==="_"||e==="__"||e==="_ctx"||e==="$stable",Or=e=>V(e)?e.map(Ze):[Ze(e)],gu=(e,t,n)=>{if(t._n)return t;const s=Bc((...r)=>Or(t(...r)),n);return s._c=!1,s},il=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Tr(r))continue;const o=e[r];if(q(o))t[r]=gu(r,o,s);else if(o!=null){const i=Or(o);t[r]=()=>i}}},ll=(e,t)=>{const n=Or(t);e.slots.default=()=>n},cl=(e,t,n)=>{for(const s in t)(n||!Tr(s))&&(e[s]=t[s])},mu=(e,t,n)=>{const s=e.slots=nl();if(e.vnode.shapeFlag&32){const r=t.__;r&&ks(s,"__",r,!0);const o=t._;o?(cl(s,t,n),n&&ks(s,"_",o,!0)):il(t,s)}else t&&ll(e,t)},vu=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=ie;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:cl(r,t,n):(o=!t.$stable,il(t,r)),i=t}else t&&(ll(e,t),i={default:1});if(o)for(const l in r)!Tr(l)&&i[l]==null&&delete r[l]},he=Mu;function yu(e){return _u(e)}function _u(e,t){const n=cs();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:c,setText:a,setElementText:u,parentNode:f,nextSibling:h,setScopeId:g=Be,insertStaticContent:v}=e,x=(d,p,m,y=null,w=null,b=null,I=void 0,P=null,O=!!p.dynamicChildren)=>{if(d===p)return;d&&!wt(d,p)&&(y=_(d),Te(d,w,b,!0),d=null),p.patchFlag===-2&&(O=!1,p.dynamicChildren=null);const{type:R,ref:K,shapeFlag:N}=p;switch(R){case _s:F(d,p,m,y);break;case me:A(d,p,m,y);break;case Un:d==null&&S(p,m,y,I);break;case Ae:L(d,p,m,y,w,b,I,P,O);break;default:N&1?D(d,p,m,y,w,b,I,P,O):N&6?Y(d,p,m,y,w,b,I,P,O):(N&64||N&128)&&R.process(d,p,m,y,w,b,I,P,O,j)}K!=null&&w?gn(K,d&&d.ref,b,p||d,!p):K==null&&d&&d.ref!=null&&gn(d.ref,null,b,d,!0)},F=(d,p,m,y)=>{if(d==null)s(p.el=l(p.children),m,y);else{const w=p.el=d.el;p.children!==d.children&&a(w,p.children)}},A=(d,p,m,y)=>{d==null?s(p.el=c(p.children||""),m,y):p.el=d.el},S=(d,p,m,y)=>{[d.el,d.anchor]=v(d.children,p,m,y,d.el,d.anchor)},C=({el:d,anchor:p},m,y)=>{let w;for(;d&&d!==p;)w=h(d),s(d,m,y),d=w;s(p,m,y)},E=({el:d,anchor:p})=>{let m;for(;d&&d!==p;)m=h(d),r(d),d=m;r(p)},D=(d,p,m,y,w,b,I,P,O)=>{p.type==="svg"?I="svg":p.type==="math"&&(I="mathml"),d==null?W(p,m,y,w,b,I,P,O):T(d,p,w,b,I,P,O)},W=(d,p,m,y,w,b,I,P)=>{let O,R;const{props:K,shapeFlag:N,transition:B,dirs:G}=d;if(O=d.el=i(d.type,b,K&&K.is,K),N&8?u(O,d.children):N&16&&H(d.children,O,null,y,w,Ns(d,b),I,P),G&&At(d,null,y,"created"),U(O,d,d.scopeId,I,y),K){for(const le in K)le!=="value"&&!fn(le)&&o(O,le,null,K[le],b,y);"value"in K&&o(O,"value",null,K.value,b),(R=K.onVnodeBeforeMount)&&$e(R,y,d)}G&&At(d,null,y,"beforeMount");const X=bu(w,B);X&&B.beforeEnter(O),s(O,p,m),((R=K&&K.onVnodeMounted)||X||G)&&he(()=>{R&&$e(R,y,d),X&&B.enter(O),G&&At(d,null,y,"mounted")},w)},U=(d,p,m,y,w)=>{if(m&&g(d,m),y)for(let b=0;b{for(let R=O;R{const P=p.el=d.el;let{patchFlag:O,dynamicChildren:R,dirs:K}=p;O|=d.patchFlag&16;const N=d.props||ie,B=p.props||ie;let G;if(m&&It(m,!1),(G=B.onVnodeBeforeUpdate)&&$e(G,m,p,d),K&&At(p,d,m,"beforeUpdate"),m&&It(m,!0),(N.innerHTML&&B.innerHTML==null||N.textContent&&B.textContent==null)&&u(P,""),R?k(d.dynamicChildren,R,P,m,y,Ns(p,w),b):I||Z(d,p,P,null,m,y,Ns(p,w),b,!1),O>0){if(O&16)Q(P,N,B,m,w);else if(O&2&&N.class!==B.class&&o(P,"class",null,B.class,w),O&4&&o(P,"style",N.style,B.style,w),O&8){const X=p.dynamicProps;for(let le=0;le{G&&$e(G,m,p,d),K&&At(p,d,m,"updated")},y)},k=(d,p,m,y,w,b,I)=>{for(let P=0;P{if(p!==m){if(p!==ie)for(const b in p)!fn(b)&&!(b in m)&&o(d,b,p[b],null,w,y);for(const b in m){if(fn(b))continue;const I=m[b],P=p[b];I!==P&&b!=="value"&&o(d,b,P,I,w,y)}"value"in m&&o(d,"value",p.value,m.value,w)}},L=(d,p,m,y,w,b,I,P,O)=>{const R=p.el=d?d.el:l(""),K=p.anchor=d?d.anchor:l("");let{patchFlag:N,dynamicChildren:B,slotScopeIds:G}=p;G&&(P=P?P.concat(G):G),d==null?(s(R,m,y),s(K,m,y),H(p.children||[],m,K,w,b,I,P,O)):N>0&&N&64&&B&&d.dynamicChildren?(k(d.dynamicChildren,B,m,w,b,I,P),(p.key!=null||w&&p===w.subTree)&&Pr(d,p,!0)):Z(d,p,m,K,w,b,I,P,O)},Y=(d,p,m,y,w,b,I,P,O)=>{p.slotScopeIds=P,d==null?p.shapeFlag&512?w.ctx.activate(p,m,y,I,O):de(p,m,y,w,b,I,O):xe(d,p,O)},de=(d,p,m,y,w,b,I)=>{const P=d.component=Hu(d,y,w);if(gs(d)&&(P.ctx.renderer=j),ku(P,!1,I),P.asyncDep){if(w&&w.registerDep(P,re,I),!d.el){const O=P.subTree=Ee(me);A(null,O,p,m),d.placeholder=O.el}}else re(P,d,p,m,w,b,I)},xe=(d,p,m)=>{const y=p.component=d.component;if(Au(d,p,m))if(y.asyncDep&&!y.asyncResolved){z(y,p,m);return}else y.next=p,y.update();else p.el=d.el,y.vnode=p},re=(d,p,m,y,w,b,I)=>{const P=()=>{if(d.isMounted){let{next:N,bu:B,u:G,parent:X,vnode:le}=d;{const Qe=ul(d);if(Qe){N&&(N.el=le.el,z(d,N,I)),Qe.asyncDep.then(()=>{d.isUnmounted||P()});return}}let ne=N,Oe;It(d,!1),N?(N.el=le.el,z(d,N,I)):N=le,B&&qt(B),(Oe=N.props&&N.props.onVnodeBeforeUpdate)&&$e(Oe,X,N,le),It(d,!0);const Pe=eo(d),ze=d.subTree;d.subTree=Pe,x(ze,Pe,f(ze.el),_(ze),d,w,b),N.el=Pe.el,ne===null&&Iu(d,Pe.el),G&&he(G,w),(Oe=N.props&&N.props.onVnodeUpdated)&&he(()=>$e(Oe,X,N,le),w)}else{let N;const{el:B,props:G}=p,{bm:X,m:le,parent:ne,root:Oe,type:Pe}=d,ze=$t(p);It(d,!1),X&&qt(X),!ze&&(N=G&&G.onVnodeBeforeMount)&&$e(N,ne,p),It(d,!0);{Oe.ce&&Oe.ce._def.shadowRoot!==!1&&Oe.ce._injectChildStyle(Pe);const Qe=d.subTree=eo(d);x(null,Qe,m,y,d,w,b),p.el=Qe.el}if(le&&he(le,w),!ze&&(N=G&&G.onVnodeMounted)){const Qe=p;he(()=>$e(N,ne,Qe),w)}(p.shapeFlag&256||ne&&$t(ne.vnode)&&ne.vnode.shapeFlag&256)&&d.a&&he(d.a,w),d.isMounted=!0,p=m=y=null}};d.scope.on();const O=d.effect=new di(P);d.scope.off();const R=d.update=O.run.bind(O),K=d.job=O.runIfDirty.bind(O);K.i=d,K.id=d.uid,O.scheduler=()=>Sr(K),It(d,!0),R()},z=(d,p,m)=>{p.component=d;const y=d.vnode.props;d.vnode=p,d.next=null,hu(d,p.props,y,m),vu(d,p.children,m),ct(),Kr(d),ut()},Z=(d,p,m,y,w,b,I,P,O=!1)=>{const R=d&&d.children,K=d?d.shapeFlag:0,N=p.children,{patchFlag:B,shapeFlag:G}=p;if(B>0){if(B&128){ht(R,N,m,y,w,b,I,P,O);return}else if(B&256){et(R,N,m,y,w,b,I,P,O);return}}G&8?(K&16&&Fe(R,w,b),N!==R&&u(m,N)):K&16?G&16?ht(R,N,m,y,w,b,I,P,O):Fe(R,w,b,!0):(K&8&&u(m,""),G&16&&H(N,m,y,w,b,I,P,O))},et=(d,p,m,y,w,b,I,P,O)=>{d=d||Wt,p=p||Wt;const R=d.length,K=p.length,N=Math.min(R,K);let B;for(B=0;BK?Fe(d,w,b,!0,!1,N):H(p,m,y,w,b,I,P,O,N)},ht=(d,p,m,y,w,b,I,P,O)=>{let R=0;const K=p.length;let N=d.length-1,B=K-1;for(;R<=N&&R<=B;){const G=d[R],X=p[R]=O?bt(p[R]):Ze(p[R]);if(wt(G,X))x(G,X,m,null,w,b,I,P,O);else break;R++}for(;R<=N&&R<=B;){const G=d[N],X=p[B]=O?bt(p[B]):Ze(p[B]);if(wt(G,X))x(G,X,m,null,w,b,I,P,O);else break;N--,B--}if(R>N){if(R<=B){const G=B+1,X=GB)for(;R<=N;)Te(d[R],w,b,!0),R++;else{const G=R,X=R,le=new Map;for(R=X;R<=B;R++){const Ie=p[R]=O?bt(p[R]):Ze(p[R]);Ie.key!=null&&le.set(Ie.key,R)}let ne,Oe=0;const Pe=B-X+1;let ze=!1,Qe=0;const sn=new Array(Pe);for(R=0;R=Pe){Te(Ie,w,b,!0);continue}let Je;if(Ie.key!=null)Je=le.get(Ie.key);else for(ne=X;ne<=B;ne++)if(sn[ne-X]===0&&wt(Ie,p[ne])){Je=ne;break}Je===void 0?Te(Ie,w,b,!0):(sn[Je-X]=R+1,Je>=Qe?Qe=Je:ze=!0,x(Ie,p[Je],m,null,w,b,I,P,O),Oe++)}const $r=ze?Su(sn):Wt;for(ne=$r.length-1,R=Pe-1;R>=0;R--){const Ie=X+R,Je=p[Ie],Dr=p[Ie+1],jr=Ie+1{const{el:b,type:I,transition:P,children:O,shapeFlag:R}=d;if(R&6){qe(d.component.subTree,p,m,y);return}if(R&128){d.suspense.move(p,m,y);return}if(R&64){I.move(d,p,m,j);return}if(I===Ae){s(b,p,m);for(let N=0;NP.enter(b),w);else{const{leave:N,delayLeave:B,afterLeave:G}=P,X=()=>{d.ctx.isUnmounted?r(b):s(b,p,m)},le=()=>{N(b,()=>{X(),G&&G()})};B?B(b,X,le):le()}else s(b,p,m)},Te=(d,p,m,y=!1,w=!1)=>{const{type:b,props:I,ref:P,children:O,dynamicChildren:R,shapeFlag:K,patchFlag:N,dirs:B,cacheIndex:G}=d;if(N===-2&&(w=!1),P!=null&&(ct(),gn(P,null,m,d,!0),ut()),G!=null&&(p.renderCache[G]=void 0),K&256){p.ctx.deactivate(d);return}const X=K&1&&B,le=!$t(d);let ne;if(le&&(ne=I&&I.onVnodeBeforeUnmount)&&$e(ne,p,d),K&6)Nn(d.component,m,y);else{if(K&128){d.suspense.unmount(m,y);return}X&&At(d,null,p,"beforeUnmount"),K&64?d.type.remove(d,p,m,j,y):R&&!R.hasOnce&&(b!==Ae||N>0&&N&64)?Fe(R,p,m,!1,!0):(b===Ae&&N&384||!w&&K&16)&&Fe(O,p,m),y&&Vt(d)}(le&&(ne=I&&I.onVnodeUnmounted)||X)&&he(()=>{ne&&$e(ne,p,d),X&&At(d,null,p,"unmounted")},m)},Vt=d=>{const{type:p,el:m,anchor:y,transition:w}=d;if(p===Ae){Ht(m,y);return}if(p===Un){E(d);return}const b=()=>{r(m),w&&!w.persisted&&w.afterLeave&&w.afterLeave()};if(d.shapeFlag&1&&w&&!w.persisted){const{leave:I,delayLeave:P}=w,O=()=>I(m,b);P?P(d.el,b,O):O()}else b()},Ht=(d,p)=>{let m;for(;d!==p;)m=h(d),r(d),d=m;r(p)},Nn=(d,p,m)=>{const{bum:y,scope:w,job:b,subTree:I,um:P,m:O,a:R,parent:K,slots:{__:N}}=d;es(O),es(R),y&&qt(y),K&&V(N)&&N.forEach(B=>{K.renderCache[B]=void 0}),w.stop(),b&&(b.flags|=8,Te(I,d,p,m)),P&&he(P,p),he(()=>{d.isUnmounted=!0},p),p&&p.pendingBranch&&!p.isUnmounted&&d.asyncDep&&!d.asyncResolved&&d.suspenseId===p.pendingId&&(p.deps--,p.deps===0&&p.resolve())},Fe=(d,p,m,y=!1,w=!1,b=0)=>{for(let I=b;I{if(d.shapeFlag&6)return _(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const p=h(d.anchor||d.el),m=p&&p[$i];return m?h(m):p};let $=!1;const M=(d,p,m)=>{d==null?p._vnode&&Te(p._vnode,null,null,!0):x(p._vnode||null,d,p,null,null,null,m),p._vnode=d,$||($=!0,Kr(),Ni(),$=!1)},j={p:x,um:Te,m:qe,r:Vt,mt:de,mc:H,pc:Z,pbc:k,n:_,o:e};return{render:M,hydrate:void 0,createApp:au(M)}}function Ns({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 It({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function bu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Pr(e,t,n=!1){const s=e.children,r=t.children;if(V(s)&&V(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function ul(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ul(t)}function es(e){if(e)for(let t=0;tje(wu);function xu(e,t){return Ar(e,null,t)}function ye(e,t,n){return Ar(e,t,n)}function Ar(e,t,n=ie){const{immediate:s,deep:r,flush:o,once:i}=n,l=pe({},n),c=t&&s||!t&&o!=="post";let a;if(Rn){if(o==="sync"){const g=Eu();a=g.__watcherHandles||(g.__watcherHandles=[])}else if(!c){const g=()=>{};return g.stop=Be,g.resume=Be,g.pause=Be,g}}const u=Se;l.call=(g,v,x)=>We(g,u,v,x);let f=!1;o==="post"?l.scheduler=g=>{he(g,u&&u.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(g,v)=>{v?g():Sr(g)}),l.augmentJob=g=>{t&&(g.flags|=4),f&&(g.flags|=2,u&&(g.id=u.uid,g.i=u))};const h=jc(e,t,l);return Rn&&(a?a.push(h):c&&h()),h}function Cu(e,t,n){const s=this.proxy,r=ae(e)?e.includes(".")?al(s,e):()=>s[e]:e.bind(s,s);let o;q(t)?o=t:(o=t.handler,n=t);const i=Mn(this),l=Ar(r,o.bind(s),n);return i(),l}function al(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ke(t)}Modifiers`]||e[`${Ot(t)}Modifiers`];function Tu(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ie;let r=n;const o=t.startsWith("update:"),i=o&&Ru(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>ae(u)?u.trim():u)),i.number&&(r=n.map(qn)));let l,c=s[l=kn(t)]||s[l=kn(ke(t))];!c&&o&&(c=s[l=kn(Ot(t))]),c&&We(c,e,6,r);const a=s[l+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,We(a,e,6,r)}}function fl(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!q(e)){const c=a=>{const u=fl(a,t,!0);u&&(l=!0,pe(i,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(se(e)&&s.set(e,null),null):(V(o)?o.forEach(c=>i[c]=null):pe(i,o),se(e)&&s.set(e,i),i)}function ys(e,t){return!e||!os(t)?!1:(t=t.slice(2).replace(/Once$/,""),te(e,t[0].toLowerCase()+t.slice(1))||te(e,Ot(t))||te(e,t))}function eo(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:c,render:a,renderCache:u,props:f,data:h,setupState:g,ctx:v,inheritAttrs:x}=e,F=Xn(e);let A,S;try{if(n.shapeFlag&4){const E=r||s,D=E;A=Ze(a.call(D,E,u,f,g,h,v)),S=l}else{const E=t;A=Ze(E.length>1?E(f,{attrs:l,slots:i,emit:c}):E(f,null)),S=t.props?l:Ou(l)}}catch(E){vn.length=0,ps(E,e,1),A=Ee(me)}let C=A;if(S&&x!==!1){const E=Object.keys(S),{shapeFlag:D}=C;E.length&&D&7&&(o&&E.some(ur)&&(S=Pu(S,o)),C=at(C,S,!1,!0))}return n.dirs&&(C=at(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&Ct(C,n.transition),A=C,Xn(F),A}const Ou=e=>{let t;for(const n in e)(n==="class"||n==="style"||os(n))&&((t||(t={}))[n]=e[n]);return t},Pu=(e,t)=>{const n={};for(const s in e)(!ur(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Au(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:c}=t,a=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?to(s,i,a):!!i;if(c&8){const u=t.dynamicProps;for(let f=0;fe.__isSuspense;function Mu(e,t){t&&t.pendingBranch?V(e)?t.effects.push(...e):t.effects.push(e):kc(e)}const Ae=Symbol.for("v-fgt"),_s=Symbol.for("v-txt"),me=Symbol.for("v-cmt"),Un=Symbol.for("v-stc"),vn=[];let Me=null;function Js(e=!1){vn.push(Me=e?null:[])}function Nu(){vn.pop(),Me=vn[vn.length-1]||null}let Cn=1;function no(e,t=!1){Cn+=e,e<0&&Me&&t&&(Me.hasOnce=!0)}function dl(e){return e.dynamicChildren=Cn>0?Me||Wt:null,Nu(),Cn>0&&Me&&Me.push(e),e}function xd(e,t,n,s,r,o){return dl(pl(e,t,n,s,r,o,!0))}function Ys(e,t,n,s,r){return dl(Ee(e,t,n,s,r,!0))}function Qt(e){return e?e.__v_isVNode===!0:!1}function wt(e,t){return e.type===t.type&&e.key===t.key}const hl=({key:e})=>e??null,Wn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ae(e)||fe(e)||q(e)?{i:ve,r:e,k:t,f:!!n}:e:null);function pl(e,t=null,n=null,s=0,r=null,o=e===Ae?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&hl(t),ref:t&&Wn(t),scopeId:Li,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:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ve};return l?(Ir(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=ae(n)?8:16),Cn>0&&!i&&Me&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Me.push(c),c}const Ee=Fu;function Fu(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Qi)&&(e=me),Qt(e)){const l=at(e,t,!0);return n&&Ir(l,n),Cn>0&&!o&&Me&&(l.shapeFlag&6?Me[Me.indexOf(e)]=l:Me.push(l)),l.patchFlag=-2,l}if(Uu(e)&&(e=e.__vccOpts),t){t=Lu(t);let{class:l,style:c}=t;l&&!ae(l)&&(t.class=as(l)),se(c)&&(_r(c)&&!V(c)&&(c=pe({},c)),t.style=us(c))}const i=ae(e)?1:ts(e)?128:Di(e)?64:se(e)?4:q(e)?2:0;return pl(e,t,n,s,r,i,o,!0)}function Lu(e){return e?_r(e)||sl(e)?pe({},e):e:null}function at(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:c}=e,a=t?Du(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&hl(a),ref:t&&t.ref?n&&o?V(o)?o.concat(Wn(t)):[o,Wn(t)]:Wn(t):o,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!==Ae?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&at(e.ssContent),ssFallback:e.ssFallback&&at(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Ct(u,c.clone(u)),u}function $u(e=" ",t=0){return Ee(_s,null,e,t)}function Cd(e,t){const n=Ee(Un,null,e);return n.staticCount=t,n}function Rd(e="",t=!1){return t?(Js(),Ys(me,null,e)):Ee(me,null,e)}function Ze(e){return e==null||typeof e=="boolean"?Ee(me):V(e)?Ee(Ae,null,e.slice()):Qt(e)?bt(e):Ee(_s,null,String(e))}function bt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:at(e)}function Ir(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(V(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Ir(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!sl(t)?t._ctx=ve:r===3&&ve&&(ve.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else q(t)?(t={default:t,_ctx:ve},n=32):(t=String(t),s&64?(n=16,t=[$u(t)]):n=8);e.children=t,e.shapeFlag|=n}function Du(...e){const t={};for(let n=0;nSe||ve;let ns,Xs;{const e=cs(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};ns=t("__VUE_INSTANCE_SETTERS__",n=>Se=n),Xs=t("__VUE_SSR_SETTERS__",n=>Rn=n)}const Mn=e=>{const t=Se;return ns(e),e.scope.on(),()=>{e.scope.off(),ns(t)}},so=()=>{Se&&Se.scope.off(),ns(null)};function gl(e){return e.vnode.shapeFlag&4}let Rn=!1;function ku(e,t=!1,n=!1){t&&Xs(t);const{props:s,children:r}=e.vnode,o=gl(e);du(e,s,o,t),mu(e,r,n||t);const i=o?Bu(e,t):void 0;return t&&Xs(!1),i}function Bu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,su);const{setup:s}=n;if(s){ct();const r=e.setupContext=s.length>1?vl(e):null,o=Mn(e),i=An(s,e,0,[e.props,r]),l=si(i);if(ut(),o(),(l||e.sp)&&!$t(e)&&Gi(e),l){if(i.then(so,so),t)return i.then(c=>{ro(e,c)}).catch(c=>{ps(c,e,0)});e.asyncDep=i}else ro(e,i)}else ml(e)}function ro(e,t,n){q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:se(t)&&(e.setupState=Pi(t)),ml(e)}function ml(e,t,n){const s=e.type;e.render||(e.render=s.render||Be);{const r=Mn(e);ct();try{ru(e)}finally{ut(),r()}}}const Ku={get(e,t){return be(e,"get",""),e[t]}};function vl(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ku),slots:e.slots,emit:e.emit,expose:t}}function bs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Pi(br(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mn)return mn[n](e)},has(t,n){return n in t||n in mn}})):e.proxy}function Zs(e,t=!0){return q(e)?e.displayName||e.name:e.name||t&&e.__name}function Uu(e){return q(e)&&"__vccOpts"in e}const we=(e,t)=>$c(e,t,Rn);function Mr(e,t,n){const s=arguments.length;return s===2?se(t)&&!V(t)?Qt(t)?Ee(e,null,[t]):Ee(e,t):Ee(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Qt(n)&&(n=[n]),Ee(e,t,n))}const Wu="3.5.18",Td=Be;/**
+**/function An(e,t,n,s){try{return s?e(...s):e()}catch(r){ps(r,t,n)}}function We(e,t,n,s){if(q(e)){const r=An(e,t,n,s);return r&&si(r)&&r.catch(o=>{ps(o,t,n)}),r}if(V(e)){const r=[];for(let o=0;o>>1,r=Re[s],o=En(r);o=En(n)?Re.push(e):Re.splice(Hc(t),0,e),e.flags|=1,Mi()}}function Mi(){Yn||(Yn=Ii.then(Fi))}function kc(e){V(e)?zt.push(...e):yt&&e.id===-1?yt.splice(Kt+1,0,e):e.flags&1||(zt.push(e),e.flags|=1),Mi()}function Kr(e,t,n=Xe+1){for(;nEn(n)-En(s));if(zt.length=0,yt){yt.push(...t);return}for(yt=t,Kt=0;Kte.id==null?e.flags&2?-1:1/0:e.id;function Fi(e){try{for(Xe=0;Xe{s._d&&no(-1);const o=Xn(t);let i;try{i=e(...r)}finally{Xn(o),s._d&&no(1)}return i};return s._n=!0,s._c=!0,s._d=!0,s}function dd(e,t){if(ve===null)return e;const n=bs(ve),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,pn=e=>e&&(e.disabled||e.disabled===""),Ur=e=>e&&(e.defer||e.defer===""),Wr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Gr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ws=(e,t)=>{const n=e&&e.to;return ae(n)?t?t(n):null:n},ji={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,c,a){const{mc:u,pc:f,pbc:h,o:{insert:g,querySelector:v,createText:x,createComment:F}}=a,A=pn(t.props);let{shapeFlag:S,children:C,dynamicChildren:E}=t;if(e==null){const D=t.el=x(""),W=t.anchor=x("");g(D,n,s),g(W,n,s);const U=(T,k)=>{S&16&&(r&&r.isCE&&(r.ce._teleportTarget=T),u(C,T,k,r,o,i,l,c))},H=()=>{const T=t.target=Ws(t.props,v),k=Vi(T,t,x,g);T&&(i!=="svg"&&Wr(T)?i="svg":i!=="mathml"&&Gr(T)&&(i="mathml"),A||(U(T,k),Bn(t,!1)))};A&&(U(n,W),Bn(t,!0)),Ur(t.props)?(t.el.__isMounted=!1,he(()=>{H(),delete t.el.__isMounted},o)):H()}else{if(Ur(t.props)&&e.el.__isMounted===!1){he(()=>{ji.process(e,t,n,s,r,o,i,l,c,a)},o);return}t.el=e.el,t.targetStart=e.targetStart;const D=t.anchor=e.anchor,W=t.target=e.target,U=t.targetAnchor=e.targetAnchor,H=pn(e.props),T=H?n:W,k=H?D:U;if(i==="svg"||Wr(W)?i="svg":(i==="mathml"||Gr(W))&&(i="mathml"),E?(h(e.dynamicChildren,E,T,r,o,i,l),Pr(e,t,!0)):c||f(e,t,T,k,r,o,i,l,!1),A)H?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Dn(t,n,D,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Q=t.target=Ws(t.props,v);Q&&Dn(t,Q,null,a,0)}else H&&Dn(t,W,U,a,1);Bn(t,A)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:c,targetStart:a,targetAnchor:u,target:f,props:h}=e;if(f&&(r(a),r(u)),o&&r(c),i&16){const g=o||!pn(h);for(let v=0;v{e.isMounted=!0}),xr(()=>{e.isUnmounting=!0}),e}const Le=[Function,Array],ki={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Le,onEnter:Le,onAfterEnter:Le,onEnterCancelled:Le,onBeforeLeave:Le,onLeave:Le,onAfterLeave:Le,onLeaveCancelled:Le,onBeforeAppear:Le,onAppear:Le,onAfterAppear:Le,onAppearCancelled:Le},Bi=e=>{const t=e.subTree;return t.component?Bi(t.component):t},Uc={name:"BaseTransition",props:ki,setup(e,{slots:t}){const n=Pt(),s=Hi();return()=>{const r=t.default&&wr(t.default(),!0);if(!r||!r.length)return;const o=Ki(r),i=J(e),{mode:l}=i;if(s.isLeaving)return As(o);const c=qr(o);if(!c)return As(o);let a=xn(c,i,s,n,f=>a=f);c.type!==me&&Ct(c,a);let u=n.subTree&&qr(n.subTree);if(u&&u.type!==me&&!wt(c,u)&&Bi(n).type!==me){let f=xn(u,i,s,n);if(Ct(u,f),l==="out-in"&&c.type!==me)return s.isLeaving=!0,f.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,u=void 0},As(o);l==="in-out"&&c.type!==me?f.delayLeave=(h,g,v)=>{const x=Ui(s,u);x[String(u.key)]=u,h[_t]=()=>{g(),h[_t]=void 0,delete a.delayedLeave,u=void 0},a.delayedLeave=()=>{v(),delete a.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function Ki(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==me){t=n;break}}return t}const Wc=Uc;function Ui(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 xn(e,t,n,s,r){const{appear:o,mode:i,persisted:l=!1,onBeforeEnter:c,onEnter:a,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:h,onLeave:g,onAfterLeave:v,onLeaveCancelled:x,onBeforeAppear:F,onAppear:A,onAfterAppear:S,onAppearCancelled:C}=t,E=String(e.key),D=Ui(n,e),W=(T,k)=>{T&&We(T,s,9,k)},U=(T,k)=>{const Q=k[1];W(T,k),V(T)?T.every(L=>L.length<=1)&&Q():T.length<=1&&Q()},H={mode:i,persisted:l,beforeEnter(T){let k=c;if(!n.isMounted)if(o)k=F||c;else return;T[_t]&&T[_t](!0);const Q=D[E];Q&&wt(e,Q)&&Q.el[_t]&&Q.el[_t](),W(k,[T])},enter(T){let k=a,Q=u,L=f;if(!n.isMounted)if(o)k=A||a,Q=S||u,L=C||f;else return;let Y=!1;const de=T[jn]=xe=>{Y||(Y=!0,xe?W(L,[T]):W(Q,[T]),H.delayedLeave&&H.delayedLeave(),T[jn]=void 0)};k?U(k,[T,de]):de()},leave(T,k){const Q=String(e.key);if(T[jn]&&T[jn](!0),n.isUnmounting)return k();W(h,[T]);let L=!1;const Y=T[_t]=de=>{L||(L=!0,k(),de?W(x,[T]):W(v,[T]),T[_t]=void 0,D[Q]===e&&delete D[Q])};D[Q]=e,g?U(g,[T,Y]):Y()},clone(T){const k=xn(T,t,n,s,r);return r&&r(k),k}};return H}function As(e){if(gs(e))return e=at(e),e.children=null,e}function qr(e){if(!gs(e))return Di(e.type)&&e.children?Ki(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&&q(n.default))return n.default()}}function Ct(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ct(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 wr(e,t=!1,n){let s=[],r=0;for(let o=0;o1)for(let o=0;ogn(v,t&&(V(t)?t[x]:t),n,s,r));return}if($t(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&gn(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?bs(s.component):s.el,i=r?null:o,{i:l,r:c}=e,a=t&&t.r,u=l.refs===ie?l.refs={}:l.refs,f=l.setupState,h=J(f),g=f===ie?()=>!1:v=>te(h,v);if(a!=null&&a!==c&&(ae(a)?(u[a]=null,g(a)&&(f[a]=null)):fe(a)&&(a.value=null)),q(c))An(c,l,12,[i,u]);else{const v=ae(c),x=fe(c);if(v||x){const F=()=>{if(e.f){const A=v?g(c)?f[c]:u[c]:c.value;r?V(A)&&ar(A,o):V(A)?A.includes(o)||A.push(o):v?(u[c]=[o],g(c)&&(f[c]=u[c])):(c.value=[o],e.k&&(u[e.k]=c.value))}else v?(u[c]=i,g(c)&&(f[c]=i)):x&&(c.value=i,e.k&&(u[e.k]=i))};i?(F.id=-1,he(F,n)):F()}}}cs().requestIdleCallback;cs().cancelIdleCallback;const $t=e=>!!e.type.__asyncLoader,gs=e=>e.type.__isKeepAlive,Gc={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Pt(),s=n.ctx;if(!s.renderer)return()=>{const S=t.default&&t.default();return S&&S.length===1?S[0]:S};const r=new Map,o=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:f}}}=s,h=f("div");s.activate=(S,C,E,D,W)=>{const U=S.component;a(S,C,E,0,l),c(U.vnode,S,C,E,U,l,D,S.slotScopeIds,W),he(()=>{U.isDeactivated=!1,U.a&&qt(U.a);const H=S.props&&S.props.onVnodeMounted;H&&$e(H,U.parent,S)},l)},s.deactivate=S=>{const C=S.component;es(C.m),es(C.a),a(S,h,null,1,l),he(()=>{C.da&&qt(C.da);const E=S.props&&S.props.onVnodeUnmounted;E&&$e(E,C.parent,S),C.isDeactivated=!0},l)};function g(S){Is(S),u(S,n,l,!0)}function v(S){r.forEach((C,E)=>{const D=Zs(C.type);D&&!S(D)&&x(E)})}function x(S){const C=r.get(S);C&&(!i||!wt(C,i))?g(C):i&&Is(i),r.delete(S),o.delete(S)}ye(()=>[e.include,e.exclude],([S,C])=>{S&&v(E=>un(S,E)),C&&v(E=>!un(C,E))},{flush:"post",deep:!0});let F=null;const A=()=>{F!=null&&(ts(n.subTree.type)?he(()=>{r.set(F,Vn(n.subTree))},n.subTree.suspense):r.set(F,Vn(n.subTree)))};return vs(A),Er(A),xr(()=>{r.forEach(S=>{const{subTree:C,suspense:E}=n,D=Vn(C);if(S.type===D.type&&S.key===D.key){Is(D);const W=D.component.da;W&&he(W,E);return}g(S)})}),()=>{if(F=null,!t.default)return i=null;const S=t.default(),C=S[0];if(S.length>1)return i=null,S;if(!Qt(C)||!(C.shapeFlag&4)&&!(C.shapeFlag&128))return i=null,C;let E=Vn(C);if(E.type===me)return i=null,E;const D=E.type,W=Zs($t(E)?E.type.__asyncResolved||{}:D),{include:U,exclude:H,max:T}=e;if(U&&(!W||!un(U,W))||H&&W&&un(H,W))return E.shapeFlag&=-257,i=E,C;const k=E.key==null?D:E.key,Q=r.get(k);return E.el&&(E=at(E),C.shapeFlag&128&&(C.ssContent=E)),F=k,Q?(E.el=Q.el,E.component=Q.component,E.transition&&Ct(E,E.transition),E.shapeFlag|=512,o.delete(k),o.add(k)):(o.add(k),T&&o.size>parseInt(T,10)&&x(o.values().next().value)),E.shapeFlag|=256,i=E,ts(C.type)?C:E}}},pd=Gc;function un(e,t){return V(e)?e.some(n=>un(n,t)):ae(e)?e.split(",").includes(t):Ql(e)?(e.lastIndex=0,e.test(t)):!1}function qc(e,t){qi(e,"a",t)}function zc(e,t){qi(e,"da",t)}function qi(e,t,n=Se){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ms(t,s,n),n){let r=n.parent;for(;r&&r.parent;)gs(r.parent.vnode)&&Qc(s,t,n,r),r=r.parent}}function Qc(e,t,n,s){const r=ms(t,e,s,!0);zi(()=>{ar(s[t],r)},n)}function Is(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Vn(e){return e.shapeFlag&128?e.ssContent:e}function ms(e,t,n=Se,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{ct();const l=Mn(n),c=We(t,n,e,i);return l(),ut(),c});return s?r.unshift(o):r.push(o),o}}const ft=e=>(t,n=Se)=>{(!Rn||e==="sp")&&ms(e,(...s)=>t(...s),n)},Jc=ft("bm"),vs=ft("m"),Yc=ft("bu"),Er=ft("u"),xr=ft("bum"),zi=ft("um"),Xc=ft("sp"),Zc=ft("rtg"),eu=ft("rtc");function tu(e,t=Se){ms("ec",e,t)}const Cr="components",nu="directives";function gd(e,t){return Rr(Cr,e,!0,t)||e}const Qi=Symbol.for("v-ndc");function md(e){return ae(e)?Rr(Cr,e,!1)||e:e||Qi}function vd(e){return Rr(nu,e)}function Rr(e,t,n=!0,s=!1){const r=ve||Se;if(r){const o=r.type;if(e===Cr){const l=Zs(o,!1);if(l&&(l===t||l===ke(t)||l===ls(ke(t))))return o}const i=zr(r[e]||o[e],t)||zr(r.appContext[e],t);return!i&&s?o:i}}function zr(e,t){return e&&(e[t]||e[ke(t)]||e[ls(ke(t))])}function yd(e,t,n,s){let r;const o=n,i=V(e);if(i||ae(e)){const l=i&<(e);let c=!1,a=!1;l&&(c=!De(e),a=xt(e),e=ds(e)),r=new Array(e.length);for(let u=0,f=e.length;ut(l,c,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,a=l.length;c{const o=s.fn(...r);return o&&(o.key=s.key),o}:s.fn)}return e}function bd(e,t,n={},s,r){if(ve.ce||ve.parent&&$t(ve.parent)&&ve.parent.ce)return t!=="default"&&(n.name=t),Js(),Ys(Ae,null,[Ee("slot",n,s&&s())],64);let o=e[t];o&&o._c&&(o._d=!1),Js();const i=o&&Ji(o(n)),l=n.key||i&&i.key,c=Ys(Ae,{key:(l&&!Ue(l)?l:`_${t}`)+(!i&&s?"_fb":"")},i||(s?s():[]),i&&e._===1?64:-2);return!r&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),o&&o._c&&(o._d=!0),c}function Ji(e){return e.some(t=>Qt(t)?!(t.type===me||t.type===Ae&&!Ji(t.children)):!0)?e:null}function Sd(e,t){const n={};for(const s in e)n[kn(s)]=e[s];return n}const Gs=e=>e?gl(e)?bs(e):Gs(e.parent):null,mn=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=>Gs(e.parent),$root:e=>Gs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Zi(e),$forceUpdate:e=>e.f||(e.f=()=>{Sr(e.update)}),$nextTick:e=>e.n||(e.n=In.bind(e.proxy)),$watch:e=>Cu.bind(e)}),Ms=(e,t)=>e!==ie&&!e.__isScriptSetup&&te(e,t),su={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:c}=e;let a;if(t[0]!=="$"){const g=i[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Ms(s,t))return i[t]=1,s[t];if(r!==ie&&te(r,t))return i[t]=2,r[t];if((a=e.propsOptions[0])&&te(a,t))return i[t]=3,o[t];if(n!==ie&&te(n,t))return i[t]=4,n[t];qs&&(i[t]=0)}}const u=mn[t];let f,h;if(u)return t==="$attrs"&&be(e.attrs,"get",""),u(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==ie&&te(n,t))return i[t]=4,n[t];if(h=c.config.globalProperties,te(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return Ms(r,t)?(r[t]=n,!0):s!==ie&&te(s,t)?(s[t]=n,!0):te(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:o}},i){let l;return!!n[i]||e!==ie&&te(e,i)||Ms(t,i)||(l=o[0])&&te(l,i)||te(s,i)||te(mn,i)||te(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:te(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function wd(){return Yi().slots}function Ed(){return Yi().attrs}function Yi(e){const t=Pt();return t.setupContext||(t.setupContext=vl(t))}function Qr(e){return V(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let qs=!0;function ru(e){const t=Zi(e),n=e.proxy,s=e.ctx;qs=!1,t.beforeCreate&&Jr(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:c,inject:a,created:u,beforeMount:f,mounted:h,beforeUpdate:g,updated:v,activated:x,deactivated:F,beforeDestroy:A,beforeUnmount:S,destroyed:C,unmounted:E,render:D,renderTracked:W,renderTriggered:U,errorCaptured:H,serverPrefetch:T,expose:k,inheritAttrs:Q,components:L,directives:Y,filters:de}=t;if(a&&ou(a,s,null),i)for(const z in i){const Z=i[z];q(Z)&&(s[z]=Z.bind(n))}if(r){const z=r.call(n,n);se(z)&&(e.data=Pn(z))}if(qs=!0,o)for(const z in o){const Z=o[z],et=q(Z)?Z.bind(n,n):q(Z.get)?Z.get.bind(n,n):Be,ht=!q(Z)&&q(Z.set)?Z.set.bind(n):Be,qe=we({get:et,set:ht});Object.defineProperty(s,z,{enumerable:!0,configurable:!0,get:()=>qe.value,set:Te=>qe.value=Te})}if(l)for(const z in l)Xi(l[z],s,n,z);if(c){const z=q(c)?c.call(n):c;Reflect.ownKeys(z).forEach(Z=>{Kn(Z,z[Z])})}u&&Jr(u,e,"c");function re(z,Z){V(Z)?Z.forEach(et=>z(et.bind(n))):Z&&z(Z.bind(n))}if(re(Jc,f),re(vs,h),re(Yc,g),re(Er,v),re(qc,x),re(zc,F),re(tu,H),re(eu,W),re(Zc,U),re(xr,S),re(zi,E),re(Xc,T),V(k))if(k.length){const z=e.exposed||(e.exposed={});k.forEach(Z=>{Object.defineProperty(z,Z,{get:()=>n[Z],set:et=>n[Z]=et,enumerable:!0})})}else e.exposed||(e.exposed={});D&&e.render===Be&&(e.render=D),Q!=null&&(e.inheritAttrs=Q),L&&(e.components=L),Y&&(e.directives=Y),T&&Gi(e)}function ou(e,t,n=Be){V(e)&&(e=zs(e));for(const s in e){const r=e[s];let o;se(r)?"default"in r?o=je(r.from||s,r.default,!0):o=je(r.from||s):o=je(r),fe(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function Jr(e,t,n){We(V(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Xi(e,t,n,s){let r=s.includes(".")?al(n,s):()=>n[s];if(ae(e)){const o=t[e];q(o)&&ye(r,o)}else if(q(e))ye(r,e.bind(n));else if(se(e))if(V(e))e.forEach(o=>Xi(o,t,n,s));else{const o=q(e.handler)?e.handler.bind(n):t[e.handler];q(o)&&ye(r,o,e)}}function Zi(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(a=>Zn(c,a,i,!0)),Zn(c,t,i)),se(t)&&o.set(t,c),c}function Zn(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Zn(e,o,n,!0),r&&r.forEach(i=>Zn(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=iu[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const iu={data:Yr,props:Xr,emits:Xr,methods:an,computed:an,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:an,directives:an,watch:cu,provide:Yr,inject:lu};function Yr(e,t){return t?e?function(){return pe(q(e)?e.call(this,this):e,q(t)?t.call(this,this):t)}:t:e}function lu(e,t){return an(zs(e),zs(t))}function zs(e){if(V(e)){const t={};for(let n=0;n1)return n&&q(t)?t.call(s&&s.proxy):t}}function fu(){return!!(Pt()||Dt)}const tl={},nl=()=>Object.create(tl),sl=e=>Object.getPrototypeOf(e)===tl;function du(e,t,n,s=!1){const r={},o=nl();e.propsDefaults=Object.create(null),rl(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:Ri(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function hu(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=J(r),[c]=e.propsOptions;let a=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f{c=!0;const[h,g]=ol(f,t,!0);pe(i,h),g&&l.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!c)return se(e)&&s.set(e,Wt),Wt;if(V(o))for(let u=0;ue==="_"||e==="__"||e==="_ctx"||e==="$stable",Or=e=>V(e)?e.map(Ze):[Ze(e)],gu=(e,t,n)=>{if(t._n)return t;const s=Bc((...r)=>Or(t(...r)),n);return s._c=!1,s},il=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Tr(r))continue;const o=e[r];if(q(o))t[r]=gu(r,o,s);else if(o!=null){const i=Or(o);t[r]=()=>i}}},ll=(e,t)=>{const n=Or(t);e.slots.default=()=>n},cl=(e,t,n)=>{for(const s in t)(n||!Tr(s))&&(e[s]=t[s])},mu=(e,t,n)=>{const s=e.slots=nl();if(e.vnode.shapeFlag&32){const r=t.__;r&&ks(s,"__",r,!0);const o=t._;o?(cl(s,t,n),n&&ks(s,"_",o,!0)):il(t,s)}else t&&ll(e,t)},vu=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=ie;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:cl(r,t,n):(o=!t.$stable,il(t,r)),i=t}else t&&(ll(e,t),i={default:1});if(o)for(const l in r)!Tr(l)&&i[l]==null&&delete r[l]},he=Mu;function yu(e){return _u(e)}function _u(e,t){const n=cs();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:c,setText:a,setElementText:u,parentNode:f,nextSibling:h,setScopeId:g=Be,insertStaticContent:v}=e,x=(d,p,m,y=null,w=null,b=null,I=void 0,P=null,O=!!p.dynamicChildren)=>{if(d===p)return;d&&!wt(d,p)&&(y=_(d),Te(d,w,b,!0),d=null),p.patchFlag===-2&&(O=!1,p.dynamicChildren=null);const{type:R,ref:K,shapeFlag:N}=p;switch(R){case _s:F(d,p,m,y);break;case me:A(d,p,m,y);break;case Un:d==null&&S(p,m,y,I);break;case Ae:L(d,p,m,y,w,b,I,P,O);break;default:N&1?D(d,p,m,y,w,b,I,P,O):N&6?Y(d,p,m,y,w,b,I,P,O):(N&64||N&128)&&R.process(d,p,m,y,w,b,I,P,O,j)}K!=null&&w?gn(K,d&&d.ref,b,p||d,!p):K==null&&d&&d.ref!=null&&gn(d.ref,null,b,d,!0)},F=(d,p,m,y)=>{if(d==null)s(p.el=l(p.children),m,y);else{const w=p.el=d.el;p.children!==d.children&&a(w,p.children)}},A=(d,p,m,y)=>{d==null?s(p.el=c(p.children||""),m,y):p.el=d.el},S=(d,p,m,y)=>{[d.el,d.anchor]=v(d.children,p,m,y,d.el,d.anchor)},C=({el:d,anchor:p},m,y)=>{let w;for(;d&&d!==p;)w=h(d),s(d,m,y),d=w;s(p,m,y)},E=({el:d,anchor:p})=>{let m;for(;d&&d!==p;)m=h(d),r(d),d=m;r(p)},D=(d,p,m,y,w,b,I,P,O)=>{p.type==="svg"?I="svg":p.type==="math"&&(I="mathml"),d==null?W(p,m,y,w,b,I,P,O):T(d,p,w,b,I,P,O)},W=(d,p,m,y,w,b,I,P)=>{let O,R;const{props:K,shapeFlag:N,transition:B,dirs:G}=d;if(O=d.el=i(d.type,b,K&&K.is,K),N&8?u(O,d.children):N&16&&H(d.children,O,null,y,w,Ns(d,b),I,P),G&&At(d,null,y,"created"),U(O,d,d.scopeId,I,y),K){for(const le in K)le!=="value"&&!fn(le)&&o(O,le,null,K[le],b,y);"value"in K&&o(O,"value",null,K.value,b),(R=K.onVnodeBeforeMount)&&$e(R,y,d)}G&&At(d,null,y,"beforeMount");const X=bu(w,B);X&&B.beforeEnter(O),s(O,p,m),((R=K&&K.onVnodeMounted)||X||G)&&he(()=>{R&&$e(R,y,d),X&&B.enter(O),G&&At(d,null,y,"mounted")},w)},U=(d,p,m,y,w)=>{if(m&&g(d,m),y)for(let b=0;b{for(let R=O;R{const P=p.el=d.el;let{patchFlag:O,dynamicChildren:R,dirs:K}=p;O|=d.patchFlag&16;const N=d.props||ie,B=p.props||ie;let G;if(m&&It(m,!1),(G=B.onVnodeBeforeUpdate)&&$e(G,m,p,d),K&&At(p,d,m,"beforeUpdate"),m&&It(m,!0),(N.innerHTML&&B.innerHTML==null||N.textContent&&B.textContent==null)&&u(P,""),R?k(d.dynamicChildren,R,P,m,y,Ns(p,w),b):I||Z(d,p,P,null,m,y,Ns(p,w),b,!1),O>0){if(O&16)Q(P,N,B,m,w);else if(O&2&&N.class!==B.class&&o(P,"class",null,B.class,w),O&4&&o(P,"style",N.style,B.style,w),O&8){const X=p.dynamicProps;for(let le=0;le{G&&$e(G,m,p,d),K&&At(p,d,m,"updated")},y)},k=(d,p,m,y,w,b,I)=>{for(let P=0;P{if(p!==m){if(p!==ie)for(const b in p)!fn(b)&&!(b in m)&&o(d,b,p[b],null,w,y);for(const b in m){if(fn(b))continue;const I=m[b],P=p[b];I!==P&&b!=="value"&&o(d,b,P,I,w,y)}"value"in m&&o(d,"value",p.value,m.value,w)}},L=(d,p,m,y,w,b,I,P,O)=>{const R=p.el=d?d.el:l(""),K=p.anchor=d?d.anchor:l("");let{patchFlag:N,dynamicChildren:B,slotScopeIds:G}=p;G&&(P=P?P.concat(G):G),d==null?(s(R,m,y),s(K,m,y),H(p.children||[],m,K,w,b,I,P,O)):N>0&&N&64&&B&&d.dynamicChildren?(k(d.dynamicChildren,B,m,w,b,I,P),(p.key!=null||w&&p===w.subTree)&&Pr(d,p,!0)):Z(d,p,m,K,w,b,I,P,O)},Y=(d,p,m,y,w,b,I,P,O)=>{p.slotScopeIds=P,d==null?p.shapeFlag&512?w.ctx.activate(p,m,y,I,O):de(p,m,y,w,b,I,O):xe(d,p,O)},de=(d,p,m,y,w,b,I)=>{const P=d.component=Hu(d,y,w);if(gs(d)&&(P.ctx.renderer=j),ku(P,!1,I),P.asyncDep){if(w&&w.registerDep(P,re,I),!d.el){const O=P.subTree=Ee(me);A(null,O,p,m),d.placeholder=O.el}}else re(P,d,p,m,w,b,I)},xe=(d,p,m)=>{const y=p.component=d.component;if(Au(d,p,m))if(y.asyncDep&&!y.asyncResolved){z(y,p,m);return}else y.next=p,y.update();else p.el=d.el,y.vnode=p},re=(d,p,m,y,w,b,I)=>{const P=()=>{if(d.isMounted){let{next:N,bu:B,u:G,parent:X,vnode:le}=d;{const Qe=ul(d);if(Qe){N&&(N.el=le.el,z(d,N,I)),Qe.asyncDep.then(()=>{d.isUnmounted||P()});return}}let ne=N,Oe;It(d,!1),N?(N.el=le.el,z(d,N,I)):N=le,B&&qt(B),(Oe=N.props&&N.props.onVnodeBeforeUpdate)&&$e(Oe,X,N,le),It(d,!0);const Pe=eo(d),ze=d.subTree;d.subTree=Pe,x(ze,Pe,f(ze.el),_(ze),d,w,b),N.el=Pe.el,ne===null&&Iu(d,Pe.el),G&&he(G,w),(Oe=N.props&&N.props.onVnodeUpdated)&&he(()=>$e(Oe,X,N,le),w)}else{let N;const{el:B,props:G}=p,{bm:X,m:le,parent:ne,root:Oe,type:Pe}=d,ze=$t(p);It(d,!1),X&&qt(X),!ze&&(N=G&&G.onVnodeBeforeMount)&&$e(N,ne,p),It(d,!0);{Oe.ce&&Oe.ce._def.shadowRoot!==!1&&Oe.ce._injectChildStyle(Pe);const Qe=d.subTree=eo(d);x(null,Qe,m,y,d,w,b),p.el=Qe.el}if(le&&he(le,w),!ze&&(N=G&&G.onVnodeMounted)){const Qe=p;he(()=>$e(N,ne,Qe),w)}(p.shapeFlag&256||ne&&$t(ne.vnode)&&ne.vnode.shapeFlag&256)&&d.a&&he(d.a,w),d.isMounted=!0,p=m=y=null}};d.scope.on();const O=d.effect=new di(P);d.scope.off();const R=d.update=O.run.bind(O),K=d.job=O.runIfDirty.bind(O);K.i=d,K.id=d.uid,O.scheduler=()=>Sr(K),It(d,!0),R()},z=(d,p,m)=>{p.component=d;const y=d.vnode.props;d.vnode=p,d.next=null,hu(d,p.props,y,m),vu(d,p.children,m),ct(),Kr(d),ut()},Z=(d,p,m,y,w,b,I,P,O=!1)=>{const R=d&&d.children,K=d?d.shapeFlag:0,N=p.children,{patchFlag:B,shapeFlag:G}=p;if(B>0){if(B&128){ht(R,N,m,y,w,b,I,P,O);return}else if(B&256){et(R,N,m,y,w,b,I,P,O);return}}G&8?(K&16&&Fe(R,w,b),N!==R&&u(m,N)):K&16?G&16?ht(R,N,m,y,w,b,I,P,O):Fe(R,w,b,!0):(K&8&&u(m,""),G&16&&H(N,m,y,w,b,I,P,O))},et=(d,p,m,y,w,b,I,P,O)=>{d=d||Wt,p=p||Wt;const R=d.length,K=p.length,N=Math.min(R,K);let B;for(B=0;BK?Fe(d,w,b,!0,!1,N):H(p,m,y,w,b,I,P,O,N)},ht=(d,p,m,y,w,b,I,P,O)=>{let R=0;const K=p.length;let N=d.length-1,B=K-1;for(;R<=N&&R<=B;){const G=d[R],X=p[R]=O?bt(p[R]):Ze(p[R]);if(wt(G,X))x(G,X,m,null,w,b,I,P,O);else break;R++}for(;R<=N&&R<=B;){const G=d[N],X=p[B]=O?bt(p[B]):Ze(p[B]);if(wt(G,X))x(G,X,m,null,w,b,I,P,O);else break;N--,B--}if(R>N){if(R<=B){const G=B+1,X=GB)for(;R<=N;)Te(d[R],w,b,!0),R++;else{const G=R,X=R,le=new Map;for(R=X;R<=B;R++){const Ie=p[R]=O?bt(p[R]):Ze(p[R]);Ie.key!=null&&le.set(Ie.key,R)}let ne,Oe=0;const Pe=B-X+1;let ze=!1,Qe=0;const sn=new Array(Pe);for(R=0;R=Pe){Te(Ie,w,b,!0);continue}let Je;if(Ie.key!=null)Je=le.get(Ie.key);else for(ne=X;ne<=B;ne++)if(sn[ne-X]===0&&wt(Ie,p[ne])){Je=ne;break}Je===void 0?Te(Ie,w,b,!0):(sn[Je-X]=R+1,Je>=Qe?Qe=Je:ze=!0,x(Ie,p[Je],m,null,w,b,I,P,O),Oe++)}const $r=ze?Su(sn):Wt;for(ne=$r.length-1,R=Pe-1;R>=0;R--){const Ie=X+R,Je=p[Ie],Dr=p[Ie+1],jr=Ie+1{const{el:b,type:I,transition:P,children:O,shapeFlag:R}=d;if(R&6){qe(d.component.subTree,p,m,y);return}if(R&128){d.suspense.move(p,m,y);return}if(R&64){I.move(d,p,m,j);return}if(I===Ae){s(b,p,m);for(let N=0;NP.enter(b),w);else{const{leave:N,delayLeave:B,afterLeave:G}=P,X=()=>{d.ctx.isUnmounted?r(b):s(b,p,m)},le=()=>{N(b,()=>{X(),G&&G()})};B?B(b,X,le):le()}else s(b,p,m)},Te=(d,p,m,y=!1,w=!1)=>{const{type:b,props:I,ref:P,children:O,dynamicChildren:R,shapeFlag:K,patchFlag:N,dirs:B,cacheIndex:G}=d;if(N===-2&&(w=!1),P!=null&&(ct(),gn(P,null,m,d,!0),ut()),G!=null&&(p.renderCache[G]=void 0),K&256){p.ctx.deactivate(d);return}const X=K&1&&B,le=!$t(d);let ne;if(le&&(ne=I&&I.onVnodeBeforeUnmount)&&$e(ne,p,d),K&6)Nn(d.component,m,y);else{if(K&128){d.suspense.unmount(m,y);return}X&&At(d,null,p,"beforeUnmount"),K&64?d.type.remove(d,p,m,j,y):R&&!R.hasOnce&&(b!==Ae||N>0&&N&64)?Fe(R,p,m,!1,!0):(b===Ae&&N&384||!w&&K&16)&&Fe(O,p,m),y&&Vt(d)}(le&&(ne=I&&I.onVnodeUnmounted)||X)&&he(()=>{ne&&$e(ne,p,d),X&&At(d,null,p,"unmounted")},m)},Vt=d=>{const{type:p,el:m,anchor:y,transition:w}=d;if(p===Ae){Ht(m,y);return}if(p===Un){E(d);return}const b=()=>{r(m),w&&!w.persisted&&w.afterLeave&&w.afterLeave()};if(d.shapeFlag&1&&w&&!w.persisted){const{leave:I,delayLeave:P}=w,O=()=>I(m,b);P?P(d.el,b,O):O()}else b()},Ht=(d,p)=>{let m;for(;d!==p;)m=h(d),r(d),d=m;r(p)},Nn=(d,p,m)=>{const{bum:y,scope:w,job:b,subTree:I,um:P,m:O,a:R,parent:K,slots:{__:N}}=d;es(O),es(R),y&&qt(y),K&&V(N)&&N.forEach(B=>{K.renderCache[B]=void 0}),w.stop(),b&&(b.flags|=8,Te(I,d,p,m)),P&&he(P,p),he(()=>{d.isUnmounted=!0},p),p&&p.pendingBranch&&!p.isUnmounted&&d.asyncDep&&!d.asyncResolved&&d.suspenseId===p.pendingId&&(p.deps--,p.deps===0&&p.resolve())},Fe=(d,p,m,y=!1,w=!1,b=0)=>{for(let I=b;I{if(d.shapeFlag&6)return _(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const p=h(d.anchor||d.el),m=p&&p[$i];return m?h(m):p};let $=!1;const M=(d,p,m)=>{d==null?p._vnode&&Te(p._vnode,null,null,!0):x(p._vnode||null,d,p,null,null,null,m),p._vnode=d,$||($=!0,Kr(),Ni(),$=!1)},j={p:x,um:Te,m:qe,r:Vt,mt:de,mc:H,pc:Z,pbc:k,n:_,o:e};return{render:M,hydrate:void 0,createApp:au(M)}}function Ns({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 It({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function bu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Pr(e,t,n=!1){const s=e.children,r=t.children;if(V(s)&&V(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function ul(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ul(t)}function es(e){if(e)for(let t=0;tje(wu);function xu(e,t){return Ar(e,null,t)}function ye(e,t,n){return Ar(e,t,n)}function Ar(e,t,n=ie){const{immediate:s,deep:r,flush:o,once:i}=n,l=pe({},n),c=t&&s||!t&&o!=="post";let a;if(Rn){if(o==="sync"){const g=Eu();a=g.__watcherHandles||(g.__watcherHandles=[])}else if(!c){const g=()=>{};return g.stop=Be,g.resume=Be,g.pause=Be,g}}const u=Se;l.call=(g,v,x)=>We(g,u,v,x);let f=!1;o==="post"?l.scheduler=g=>{he(g,u&&u.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(g,v)=>{v?g():Sr(g)}),l.augmentJob=g=>{t&&(g.flags|=4),f&&(g.flags|=2,u&&(g.id=u.uid,g.i=u))};const h=jc(e,t,l);return Rn&&(a?a.push(h):c&&h()),h}function Cu(e,t,n){const s=this.proxy,r=ae(e)?e.includes(".")?al(s,e):()=>s[e]:e.bind(s,s);let o;q(t)?o=t:(o=t.handler,n=t);const i=Mn(this),l=Ar(r,o.bind(s),n);return i(),l}function al(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ke(t)}Modifiers`]||e[`${Ot(t)}Modifiers`];function Tu(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ie;let r=n;const o=t.startsWith("update:"),i=o&&Ru(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>ae(u)?u.trim():u)),i.number&&(r=n.map(qn)));let l,c=s[l=kn(t)]||s[l=kn(ke(t))];!c&&o&&(c=s[l=kn(Ot(t))]),c&&We(c,e,6,r);const a=s[l+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,We(a,e,6,r)}}function fl(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!q(e)){const c=a=>{const u=fl(a,t,!0);u&&(l=!0,pe(i,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(se(e)&&s.set(e,null),null):(V(o)?o.forEach(c=>i[c]=null):pe(i,o),se(e)&&s.set(e,i),i)}function ys(e,t){return!e||!os(t)?!1:(t=t.slice(2).replace(/Once$/,""),te(e,t[0].toLowerCase()+t.slice(1))||te(e,Ot(t))||te(e,t))}function eo(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:c,render:a,renderCache:u,props:f,data:h,setupState:g,ctx:v,inheritAttrs:x}=e,F=Xn(e);let A,S;try{if(n.shapeFlag&4){const E=r||s,D=E;A=Ze(a.call(D,E,u,f,g,h,v)),S=l}else{const E=t;A=Ze(E.length>1?E(f,{attrs:l,slots:i,emit:c}):E(f,null)),S=t.props?l:Ou(l)}}catch(E){vn.length=0,ps(E,e,1),A=Ee(me)}let C=A;if(S&&x!==!1){const E=Object.keys(S),{shapeFlag:D}=C;E.length&&D&7&&(o&&E.some(ur)&&(S=Pu(S,o)),C=at(C,S,!1,!0))}return n.dirs&&(C=at(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&Ct(C,n.transition),A=C,Xn(F),A}const Ou=e=>{let t;for(const n in e)(n==="class"||n==="style"||os(n))&&((t||(t={}))[n]=e[n]);return t},Pu=(e,t)=>{const n={};for(const s in e)(!ur(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Au(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:c}=t,a=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?to(s,i,a):!!i;if(c&8){const u=t.dynamicProps;for(let f=0;fe.__isSuspense;function Mu(e,t){t&&t.pendingBranch?V(e)?t.effects.push(...e):t.effects.push(e):kc(e)}const Ae=Symbol.for("v-fgt"),_s=Symbol.for("v-txt"),me=Symbol.for("v-cmt"),Un=Symbol.for("v-stc"),vn=[];let Me=null;function Js(e=!1){vn.push(Me=e?null:[])}function Nu(){vn.pop(),Me=vn[vn.length-1]||null}let Cn=1;function no(e,t=!1){Cn+=e,e<0&&Me&&t&&(Me.hasOnce=!0)}function dl(e){return e.dynamicChildren=Cn>0?Me||Wt:null,Nu(),Cn>0&&Me&&Me.push(e),e}function xd(e,t,n,s,r,o){return dl(pl(e,t,n,s,r,o,!0))}function Ys(e,t,n,s,r){return dl(Ee(e,t,n,s,r,!0))}function Qt(e){return e?e.__v_isVNode===!0:!1}function wt(e,t){return e.type===t.type&&e.key===t.key}const hl=({key:e})=>e??null,Wn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ae(e)||fe(e)||q(e)?{i:ve,r:e,k:t,f:!!n}:e:null);function pl(e,t=null,n=null,s=0,r=null,o=e===Ae?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&hl(t),ref:t&&Wn(t),scopeId:Li,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:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ve};return l?(Ir(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=ae(n)?8:16),Cn>0&&!i&&Me&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Me.push(c),c}const Ee=Fu;function Fu(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Qi)&&(e=me),Qt(e)){const l=at(e,t,!0);return n&&Ir(l,n),Cn>0&&!o&&Me&&(l.shapeFlag&6?Me[Me.indexOf(e)]=l:Me.push(l)),l.patchFlag=-2,l}if(Uu(e)&&(e=e.__vccOpts),t){t=Lu(t);let{class:l,style:c}=t;l&&!ae(l)&&(t.class=as(l)),se(c)&&(_r(c)&&!V(c)&&(c=pe({},c)),t.style=us(c))}const i=ae(e)?1:ts(e)?128:Di(e)?64:se(e)?4:q(e)?2:0;return pl(e,t,n,s,r,i,o,!0)}function Lu(e){return e?_r(e)||sl(e)?pe({},e):e:null}function at(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:c}=e,a=t?Du(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&hl(a),ref:t&&t.ref?n&&o?V(o)?o.concat(Wn(t)):[o,Wn(t)]:Wn(t):o,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!==Ae?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&at(e.ssContent),ssFallback:e.ssFallback&&at(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Ct(u,c.clone(u)),u}function $u(e=" ",t=0){return Ee(_s,null,e,t)}function Cd(e,t){const n=Ee(Un,null,e);return n.staticCount=t,n}function Rd(e="",t=!1){return t?(Js(),Ys(me,null,e)):Ee(me,null,e)}function Ze(e){return e==null||typeof e=="boolean"?Ee(me):V(e)?Ee(Ae,null,e.slice()):Qt(e)?bt(e):Ee(_s,null,String(e))}function bt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:at(e)}function Ir(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(V(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Ir(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!sl(t)?t._ctx=ve:r===3&&ve&&(ve.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else q(t)?(t={default:t,_ctx:ve},n=32):(t=String(t),s&64?(n=16,t=[$u(t)]):n=8);e.children=t,e.shapeFlag|=n}function Du(...e){const t={};for(let n=0;nSe||ve;let ns,Xs;{const e=cs(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};ns=t("__VUE_INSTANCE_SETTERS__",n=>Se=n),Xs=t("__VUE_SSR_SETTERS__",n=>Rn=n)}const Mn=e=>{const t=Se;return ns(e),e.scope.on(),()=>{e.scope.off(),ns(t)}},so=()=>{Se&&Se.scope.off(),ns(null)};function gl(e){return e.vnode.shapeFlag&4}let Rn=!1;function ku(e,t=!1,n=!1){t&&Xs(t);const{props:s,children:r}=e.vnode,o=gl(e);du(e,s,o,t),mu(e,r,n||t);const i=o?Bu(e,t):void 0;return t&&Xs(!1),i}function Bu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,su);const{setup:s}=n;if(s){ct();const r=e.setupContext=s.length>1?vl(e):null,o=Mn(e),i=An(s,e,0,[e.props,r]),l=si(i);if(ut(),o(),(l||e.sp)&&!$t(e)&&Gi(e),l){if(i.then(so,so),t)return i.then(c=>{ro(e,c)}).catch(c=>{ps(c,e,0)});e.asyncDep=i}else ro(e,i)}else ml(e)}function ro(e,t,n){q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:se(t)&&(e.setupState=Pi(t)),ml(e)}function ml(e,t,n){const s=e.type;e.render||(e.render=s.render||Be);{const r=Mn(e);ct();try{ru(e)}finally{ut(),r()}}}const Ku={get(e,t){return be(e,"get",""),e[t]}};function vl(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ku),slots:e.slots,emit:e.emit,expose:t}}function bs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Pi(br(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mn)return mn[n](e)},has(t,n){return n in t||n in mn}})):e.proxy}function Zs(e,t=!0){return q(e)?e.displayName||e.name:e.name||t&&e.__name}function Uu(e){return q(e)&&"__vccOpts"in e}const we=(e,t)=>$c(e,t,Rn);function Mr(e,t,n){const s=arguments.length;return s===2?se(t)&&!V(t)?Qt(t)?Ee(e,null,[t]):Ee(e,t):Ee(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Qt(n)&&(n=[n]),Ee(e,t,n))}const Wu="3.5.18",Td=Be;/**
* @vue/runtime-dom v3.5.18
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
diff --git a/web/admin-spa/dist/index.html b/web/admin-spa/dist/index.html
index 38baf304..25207f35 100644
--- a/web/admin-spa/dist/index.html
+++ b/web/admin-spa/dist/index.html
@@ -18,10 +18,10 @@
-
-
+
+
-
+