diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 1376e34..c127f1a 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -1,4 +1,4 @@ -name: Deploy To Dev +name: Deploy Lighttpd Admin on: push: @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-22.04 container: volumes: - - /app/lighttpd-content:/app/xsy-www + - /app/lighttpd-admin:/app/xsy-admin steps: - name: Checkout code @@ -26,15 +26,15 @@ jobs: # 如果目录不存在,报错并退出当前步骤 exit 1 fi - ls -lha /app/xsy-www/ - rm -rf /app/xsy-www/* - cp -r ./dist/* /app/xsy-www/ + ls -lha /app/xsy-admin/ + rm -rf /app/xsy-admin/* + cp -r ./dist/* /app/xsy-admin/ - name: Find and restart the app container run: | - # 1. 使用 docker ps 过滤包含 'xsy-lighttpd' 服务的容器 + # 1. 使用 docker ps 过滤包含 'xsy-admin' 服务的容器 # 2. 提取容器 ID 或名称 - CONTAINER_ID=$(docker ps -a --filter "name=xsy-lighttpd" --format "{{.ID}}") + CONTAINER_ID=$(docker ps -a --filter "name=xsy-admin" --format "{{.ID}}") if [ -z "$CONTAINER_ID" ]; then echo "Error: Could not find any container matching name 'app1'." diff --git a/dist.zip b/dist.zip deleted file mode 100644 index 577075d..0000000 Binary files a/dist.zip and /dev/null differ diff --git a/dist/assets/401-8RIqH0GR.js b/dist/assets/401-8RIqH0GR.js deleted file mode 100644 index d298502..0000000 --- a/dist/assets/401-8RIqH0GR.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as d,j as f,r as m,c as k,d as o,w as s,e as n,o as g,h as a,f as e}from"./index-nRSe4xNB.js";const x="/assets/401-HGF6Q5qM.gif",b={class:"errPage-container"},h={class:"list-unstyled"},w={class:"link-type"},v=["src"],y={__name:"401",setup(B){let{proxy:r}=f();const c=m(x+"?"+ +new Date);function u(){r.$route.query.noGoBack?r.$router.push({path:"/"}):r.$router.go(-1)}return(C,t)=>{const _=n("el-button"),i=n("router-link"),l=n("el-col"),p=n("el-row");return g(),k("div",b,[o(_,{icon:"arrow-left",class:"pan-back-btn",onClick:u},{default:s(()=>[...t[0]||(t[0]=[a(" 返回 ",-1)])]),_:1}),o(p,null,{default:s(()=>[o(l,{span:12},{default:s(()=>[t[2]||(t[2]=e("h1",{class:"text-jumbo text-ginormous"}," 401错误! ",-1)),t[3]||(t[3]=e("h2",null,"您没有访问权限!",-1)),t[4]||(t[4]=e("h6",null,"对不起,您没有访问权限,请不要进行非法操作!您可以返回主页面",-1)),e("ul",h,[e("li",w,[o(i,{to:"/"},{default:s(()=>[...t[1]||(t[1]=[a(" 回首页 ",-1)])]),_:1})])])]),_:1}),o(l,{span:12},{default:s(()=>[e("img",{src:c.value,width:"313",height:"428",alt:"Girl has dropped her ice cream."},null,8,v)]),_:1})]),_:1})])}}},I=d(y,[["__scopeId","data-v-2c8b7582"]]);export{I as default}; diff --git a/dist/assets/401-8RIqH0GR.js.gz b/dist/assets/401-8RIqH0GR.js.gz deleted file mode 100644 index 7428b07..0000000 Binary files a/dist/assets/401-8RIqH0GR.js.gz and /dev/null differ diff --git a/dist/assets/401-B78AUXmB.js.gz b/dist/assets/401-B78AUXmB.js.gz deleted file mode 100644 index bda25a9..0000000 Binary files a/dist/assets/401-B78AUXmB.js.gz and /dev/null differ diff --git a/dist/assets/401-B78AUXmB.js b/dist/assets/401-DO7f-liB.js similarity index 94% rename from dist/assets/401-B78AUXmB.js rename to dist/assets/401-DO7f-liB.js index 8002a38..2232b39 100644 --- a/dist/assets/401-B78AUXmB.js +++ b/dist/assets/401-DO7f-liB.js @@ -1 +1 @@ -import{_ as d,g as f,r as m,c as k,f as o,w as n,h as s,o as g,p as a,k as e}from"./index-DyWI3x4X.js";const h=""+new URL("401-HGF6Q5qM.gif",import.meta.url).href,w={class:"errPage-container"},x={class:"list-unstyled"},b={class:"link-type"},v=["src"],y={__name:"401",setup(B){let{proxy:r}=f();const u=m(h+"?"+ +new Date);function c(){r.$route.query.noGoBack?r.$router.push({path:"/"}):r.$router.go(-1)}return(C,t)=>{const _=s("el-button"),i=s("router-link"),l=s("el-col"),p=s("el-row");return g(),k("div",w,[o(_,{icon:"arrow-left",class:"pan-back-btn",onClick:c},{default:n(()=>[...t[0]||(t[0]=[a(" 返回 ",-1)])]),_:1}),o(p,null,{default:n(()=>[o(l,{span:12},{default:n(()=>[t[2]||(t[2]=e("h1",{class:"text-jumbo text-ginormous"}," 401错误! ",-1)),t[3]||(t[3]=e("h2",null,"您没有访问权限!",-1)),t[4]||(t[4]=e("h6",null,"对不起,您没有访问权限,请不要进行非法操作!您可以返回主页面",-1)),e("ul",x,[e("li",b,[o(i,{to:"/"},{default:n(()=>[...t[1]||(t[1]=[a(" 回首页 ",-1)])]),_:1})])])]),_:1}),o(l,{span:12},{default:n(()=>[e("img",{src:u.value,width:"313",height:"428",alt:"Girl has dropped her ice cream."},null,8,v)]),_:1})]),_:1})])}}},I=d(y,[["__scopeId","data-v-2c8b7582"]]);export{I as default}; +import{_ as d,g as f,r as m,c as k,f as o,w as n,h as s,o as g,p as a,k as e}from"./index-DRNenl-T.js";const h=""+new URL("401-HGF6Q5qM.gif",import.meta.url).href,w={class:"errPage-container"},x={class:"list-unstyled"},b={class:"link-type"},v=["src"],y={__name:"401",setup(B){let{proxy:r}=f();const u=m(h+"?"+ +new Date);function c(){r.$route.query.noGoBack?r.$router.push({path:"/"}):r.$router.go(-1)}return(C,t)=>{const _=s("el-button"),i=s("router-link"),l=s("el-col"),p=s("el-row");return g(),k("div",w,[o(_,{icon:"arrow-left",class:"pan-back-btn",onClick:c},{default:n(()=>[...t[0]||(t[0]=[a(" 返回 ",-1)])]),_:1}),o(p,null,{default:n(()=>[o(l,{span:12},{default:n(()=>[t[2]||(t[2]=e("h1",{class:"text-jumbo text-ginormous"}," 401错误! ",-1)),t[3]||(t[3]=e("h2",null,"您没有访问权限!",-1)),t[4]||(t[4]=e("h6",null,"对不起,您没有访问权限,请不要进行非法操作!您可以返回主页面",-1)),e("ul",x,[e("li",b,[o(i,{to:"/"},{default:n(()=>[...t[1]||(t[1]=[a(" 回首页 ",-1)])]),_:1})])])]),_:1}),o(l,{span:12},{default:n(()=>[e("img",{src:u.value,width:"313",height:"428",alt:"Girl has dropped her ice cream."},null,8,v)]),_:1})]),_:1})])}}},I=d(y,[["__scopeId","data-v-2c8b7582"]]);export{I as default}; diff --git a/dist/assets/401-DO7f-liB.js.gz b/dist/assets/401-DO7f-liB.js.gz new file mode 100644 index 0000000..f73c4ac Binary files /dev/null and b/dist/assets/401-DO7f-liB.js.gz differ diff --git a/dist/assets/404-BS97o3Mb.js.gz b/dist/assets/404-BS97o3Mb.js.gz deleted file mode 100644 index 3d84fa7..0000000 Binary files a/dist/assets/404-BS97o3Mb.js.gz and /dev/null differ diff --git a/dist/assets/404-BS97o3Mb.js b/dist/assets/404-C8Inh8VK.js similarity index 95% rename from dist/assets/404-BS97o3Mb.js rename to dist/assets/404-C8Inh8VK.js index 73b2999..8454e1b 100644 --- a/dist/assets/404-BS97o3Mb.js +++ b/dist/assets/404-C8Inh8VK.js @@ -1 +1 @@ -import{_ as o,B as l,c as r,k as t,C as _,f as c,q as n,i as d,w as p,h as m,o as u,p as v}from"./index-DyWI3x4X.js";const h=""+new URL("404-N4aRkdWY.png",import.meta.url).href,a=""+new URL("404_cloud-CPexjtDj.png",import.meta.url).href,f={class:"wscn-http404-container"},g={class:"wscn-http404"},x={class:"bullshit"},k={class:"bullshit__headline"},w={__name:"404",setup(b){let e=l(()=>"找不到网页!");return(N,s)=>{const i=m("router-link");return u(),r("div",f,[t("div",g,[s[3]||(s[3]=_('
{}):console.log("浏览器不支持通知")}return ha(()=>{r.initUdid()}),(p,m)=>{const y=oe("el-input"),C=oe("el-form-item"),_=oe("el-button"),b=oe("el-form");return $(),Y("div",Tf,[x("div",Cf,[m[3]||(m[3]=x("div",{class:"selected-rectangle"},null,-1)),z(b,{ref:"loginRef",class:"form-info",model:a.value,rules:o},{default:Q(()=>[m[2]||(m[2]=x("h3",{class:"title"},"欢迎登录",-1)),z(C,{prop:"username"},{default:Q(()=>[z(y,{modelValue:a.value.username,"onUpdate:modelValue":m[0]||(m[0]=G=>a.value.username=G),"auto-complete":"off",placeholder:"请输入您的账号",size:"large",type:"text"},null,8,["modelValue"])]),_:1}),z(C,{prop:"password"},{default:Q(()=>[z(y,{modelValue:a.value.password,"onUpdate:modelValue":m[1]||(m[1]=G=>a.value.password=G),"auto-complete":"off",placeholder:"请输入密码",size:"large",type:"password",onKeyup:Ml(l,["enter"])},null,8,["modelValue"])]),_:1}),z(C,null,{default:Q(()=>[z(_,{loading:c.value,size:"large",class:"button-login",type:"primary",onClick:xl(l,["prevent"])},{default:Q(()=>[c.value?($(),Y("span",Pf,"登录中...")):($(),Y("span",Sf,"登 录"))]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"])])])}}},_f=Yi(Ef,[["__scopeId","data-v-aa0dd888"]]),wf={class:"drawer-content"},Rf={class:"search-section"},If={key:0,class:"selected-section"},Of={class:"selected-header"},Df={class:"selected-tags"},Mf={class:"tree-item"},xf={class:"tree-item-content"},Af={key:0,class:"user-icon"},Nf={key:1,class:"dept-icon"},Lf={class:"tree-item-text"},Uf={key:2,class:"user-count"},Ff={class:"footer-actions"},jf={__name:"index",props:{loading:{type:Boolean,default:!0}},emits:["confirmSelection"],setup(n,{expose:e,emit:t}){const i=t,s=F(!1),r=F(),a=F(""),o=F([]),c=F([]),l=F(!1),d=F([]),f=Ri({children:"users",label:"name",value:"uid",disabled:S=>S.uid&&d.value.includes(S.uid),isLeaf:S=>!!S.uid});async function p(S){s.value=!0,o.value=[],c.value=[],a.value="";try{const I=await Al(S);d.value=I.data.filter(M=>M.status==1).map(M=>M.user_uid)}catch(I){console.error("获取房间参与者失败:",I),d.value=[]}Ve(()=>{r.value&&r.value.setCheckedKeys([])})}function m(){o.value.length>0&&(i("confirmSelection",o.value),s.value=!1)}function y(){s.value=!1}const C=async(S,I)=>{(S==null?void 0:S.level)===0?_(I,"",S==null?void 0:S.level):(S==null?void 0:S.level)>0&&(S.data.directory_uid?b(I,S.data.directory_uid,S==null?void 0:S.level):I(I))},_=async(S,I)=>{try{l.value=!0;let M=await sr({level:1});M.meta.code==200&&S(M.data),l.value=!1}catch(M){console.log(M),l.value=!1}},b=async(S,I,M)=>{try{l.value=!0;let A=[],q=[];const B=await sr({level:1,parent_uuid:I});B!=null&&B.data&&(q=B.data),I&&(A=(await Gl(I,{directory_uuid:I})).data),S([...q,...A]),l.value=!1}catch(A){console.log(A),l.value=!1}},G=(S,I)=>{r.value.getCheckedKeys(),r.value.getHalfCheckedKeys();const M=r.value.getCheckedNodes(!1,!0),A=M.filter(q=>q.uid&&!d.value.includes(q.uid));o.value=A,c.value=M},W=S=>{const I=o.value.findIndex(M=>M.uid===S.uid);I!==-1&&o.value.splice(I,1),r.value&&r.value.setChecked(S.uid,!1,!1)},P=()=>{o.value=[],c.value=[],r.value&&r.value.setCheckedKeys([])},k=()=>{r.value&&r.value.filter(a.value)},w=(S,I)=>S?I.name&&I.name.toLowerCase().includes(S.toLowerCase()):!0;return e({show:p,getSelectedUsers:()=>o.value}),(S,I)=>{const M=oe("el-input"),A=oe("el-button"),q=oe("el-tag"),B=oe("el-tree"),K=oe("el-scrollbar"),ve=oe("el-drawer"),De=ma("loading");return $(),Fe(ve,{modelValue:s.value,"onUpdate:modelValue":I[1]||(I[1]=_e=>s.value=_e),direction:"rtl",title:"请选择要加入房间的人员",size:"40%"},{header:Q(()=>[...I[2]||(I[2]=[x("h4",null,"请选择要加入房间的人员",-1)])]),footer:Q(()=>[x("div",Ff,[z(A,{onClick:y},{default:Q(()=>[...I[4]||(I[4]=[he("取 消",-1)])]),_:1}),z(A,{type:"primary",onClick:m,disabled:o.value.length===0},{default:Q(()=>[he(" 确 定 ("+le(o.value.length)+") ",1)]),_:1},8,["disabled"])])]),default:Q(()=>[x("div",wf,[x("div",Rf,[z(M,{modelValue:a.value,"onUpdate:modelValue":I[0]||(I[0]=_e=>a.value=_e),placeholder:"搜索人员或部门",clearable:"","prefix-icon":"Search",onInput:k},null,8,["modelValue"])]),o.value.length>0?($(),Y("div",If,[x("div",Of,[x("span",null,"已选择 ("+le(o.value.length)+")",1),z(A,{type:"text",onClick:P},{default:Q(()=>[...I[3]||(I[3]=[he("清空",-1)])]),_:1})]),x("div",Df,[($(!0),Y(ai,null,oi(o.value,_e=>($(),Fe(q,{key:_e.uid,closable:"",onClose:st=>W(_e),class:"selected-tag"},{default:Q(()=>[he(le(_e.name),1)]),_:2},1032,["onClose"]))),128))])])):ue("",!0),pa(($(),Fe(K,{class:"left-list-scrollbar",height:"calc(100vh - 240px)"},{default:Q(()=>[z(B,{ref_key:"treeRef",ref:r,lazy:"",load:C,props:f,"node-key":"uid","show-checkbox":"","default-expand-all":!1,"expand-on-click-node":!1,"check-strictly":!1,"filter-node-method":w,onCheck:G,style:{width:"100%"}},{default:Q(({node:_e,data:st})=>[x("div",Mf,[x("div",xf,[st.uid?($(),Y("span",Af,"👤")):($(),Y("span",Nf,"📁")),x("span",Lf,le(st.name),1),st.users_count?($(),Y("span",Uf,"("+le(st.users_count)+")",1)):ue("",!0)])])]),_:1},8,["props"])]),_:1})),[[De,l.value]])])]),_:1},8,["modelValue"])}}},Bf=Yi(jf,[["__scopeId","data-v-082d2e76"]]),Vf={style:{"margin-top":"20px"}},qf={style:{color:"#f56c6c"}},Kf={__name:"upLoadFile",props:{fileType:{type:Array,default:()=>["pdf","png","jpg","jpeg","gif","doc","docx","xls","xlsx","ppt","pptx"]},roomId:{type:String,default:""}},emits:["upload-success"],setup(n,{expose:e,emit:t}){const i=n,s=t,{proxy:r}=ua(),a=F(!1),o=F(""),c=F([]);F([]);const l=F(null);F(!0),F(!1);const d=F(""),f=F(""),p=F(null),m=F(!1),y=F(),C=F(""),_=Ie(()=>i.fileType.map(M=>`.${M}`).join(", "));ot.on("subscribeToFileUploadTopic",b);function b(M){try{y.value=M.roomId;const A=`xsynergy/room/${M.roomId}/file/upload`;Ce.subscribe(A,G)}catch(A){console.error("订阅文件上传事件失败:",A)}}function G(M,A){try{const q=M.toString(),B=JSON.parse(q);ot.emit("fileUploadStatus",B),s("upload-success")}catch(q){console.error("文件长传状态消息失败:",q)}}const W=async M=>{if(m.value)return U.warning("文件正在上传中,请稍候..."),!1;const A=M.name.toLowerCase().slice((M.name.lastIndexOf(".")-1>>>0)+2);if(!i.fileType.includes(A))return U.error(`文件格式不支持,请上传 ${_.value} 格式的文件`),!1;if(!(M.size/1024/1024<50))return U.error("上传文件大小不能超过 50 MB!"),!1;m.value=!0;try{p.value=M;const B=await kf(M),K=await Nl({service:i.roomId,hash:B,ext:A});if(K.meta.code!=200)return U.error(K.meta.msg),m.value=!1,!1;K.data.exists?(f.value=K.data.fileUrl,U.info("文件已存在,无需重复上传"),m.value=!1):(d.value=K.data.token,await P(M))}catch(B){return console.error("上传过程出错:",B),U.error("上传过程出错,请重试"),m.value=!1,!1}return!1},P=async M=>{if(!d.value)return U.error("上传凭证不存在"),m.value=!1,!1;let A=new FormData;A.append("file",M);try{const q=await Ll(d.value,A);return q.meta.code!=200?(U.error(q.meta.msg),m.value=!1,!1):(f.value=q.data.fileUrl,k(q.data.fileUrl),U.success("文件上传成功"),m.value=!1,a.value=!1,ot.emit("fileSuccess"),!0)}catch(q){return console.error("上传文件失败:",q),U.error("上传文件失败"),m.value=!1,!1}};async function k(M){try{const A=await Ul({file_url:M},i.roomId);if(A.meta.code!==200)throw new Error(A.meta.msg||"文件转换失败")}catch{U.error("文件转换失败")}}const w=()=>{o.value="上传文件",a.value=!0,C.value=JSON.parse(sessionStorage.getItem("userData"))},S=()=>{c.value=[],p.value=null,d.value="",f.value="",m.value=!1,a.value=!1};return e({showEdit:w,close:S,save:()=>{S()}}),(M,A)=>{const q=oe("el-button"),B=oe("el-upload"),K=oe("el-dialog");return $(),Y("div",null,[z(K,{modelValue:a.value,"onUpdate:modelValue":A[0]||(A[0]=ve=>a.value=ve),title:o.value,width:"403px",onClose:S},{default:Q(()=>[z(B,{ref_key:"uploadRef",ref:l,accept:_.value,"show-file-list":!1,limit:999,style:{width:"100%","text-align":"center"},"before-upload":W},{trigger:Q(()=>[z(q,{type:"primary",class:"el-button-custom-css blue-css",loading:m.value,disabled:m.value},{default:Q(()=>[he(le(m.value?"上传中...":"上传文件"),1)]),_:1},8,["loading","disabled"])]),_:1},8,["accept"]),x("div",Vf,[A[1]||(A[1]=he(" 请上传格式为: ",-1)),x("b",qf,le(_.value),1),A[2]||(A[2]=he(" 的文件 ",-1))])]),_:1},8,["modelValue","title"])])}}},Gf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAxdJREFUaEPtWUtrE1EYPV9Co5UMiBUfuPItQmo7d0J/gzsR3JTiQnThThHqrqUtIiLizoWi6EYXrvwDkp0i84U0lQo+wQfqSrHR1Ewy105pSyiZuXPjXNpoZnvPPfec78zj3vkIMS7HcY76vn+BiI4A2BhjihLCzNYySAjxDsCjWq02MTMz8005uQlAKrAQ4hqA8wCUWBVX8zgzr/AJIX4DyAB4T0QnXNd9FpcrUpQQYmxB+ERcMh1ciIGAYp6ITrmu+yAOX6iBwcHBw6lUqgwgHYdIFxNhIKCSUsqLxWLxqoo31IAQ4iaAMyqCdscVBpZpJ5l5PGqNKAOvAextV6BqXkwDAc04M0+G8UUZ+AFg5U2hEqQ7bllWb6FQmA/m2bb9kYh2hXBIACPMfL/VeJSBOQBZXWFx8USUc133eYAXQtwAcDZi7hdm3rmuDEgpR5cfUiHEVgCPARwMM+F53pZyufxz9fiaJQDgA4BDzPwrbmrrKoElMQ8tyxouFAr1dk2sZQKLmqWUTwBM+r7/tFQqfdc1suYG4gquVqvW7OxsZT09A3G1L+K6BrTKZQDcTcBAUbUok0zAI6IJKeUdZv6spSIEPDQ0tL1er49IKS8R0YZWsCQNTDFzcNBJ/LJte5SIrhg10Gg0DpRKpVeJqweQz+d3+L7fMtUkE9jHzG9MGOjv79/W09Pz1WgCAMaYecqEAcdxzkkpr5s2UAtOSQDuJfUQB5XPZDLDUsrLYb9tkryFTBRfydk1oCyRYUA3AcMFVtJ3E2gqUce/Rjv+Q9bZW4l/YTPX2dtpAB1/oFG+s00A/svvgNH+gG5K7STwdmHPv1t3IUP4BjMHh/3Gav6of6O3AJw2JEiX9iUzt+wdhBoYGBjYn06nSwA26a5mAB/69Y/sEzuOc1JKeTfpJremwRcAnLBGiLL7btv2CBEFLddezYX/Gk5Erud5x6anpz+FkSkNBBPz+fwe3/eDg/xxk42/JZENKWUxlUrdXvr750VVIpaBJgLK5XKbs9ms7rxYaVQqFdnX1zen03IyIiSW2oRAHW/gD2/2A0+EZnI9AAAAAElFTkSuQmCC",Wf={class:"drawer-content"},zf={class:"upload-section"},Hf={class:"file-list"},Jf={class:"file-info"},$f={class:"file-icon"},Qf=["src"],Yf={class:"file-details"},Xf=["title"],Zf={class:"file-actions"},ep={key:0,class:"empty-state"},tp={__name:"fileList",props:{roomId:{type:String,default:""}},emits:[""],setup(n,{expose:e,emit:t}){const i=n;ot.on("fileUploadStatus",async()=>{s.value&&await y()});const s=F(!1),r=F([]),a=F(!1),o=F(null),c=F(null);function l(_){return Gf}function d(_){try{const b=document.createElement("iframe");b.style.display="none",b.src=_.source_url,document.body.appendChild(b),setTimeout(()=>{document.body.removeChild(b)},5e3),U.success("开始下载文件")}catch(b){console.error("iframe下载失败:",b),U.error("下载失败,请检查浏览器设置")}}function f(_){if(!_.preview_url){U.error("文件链接无效");return}c.value.showEdit(_)}function p(){o.value.showEdit()}async function m(){s.value=!0,await y()}async function y(){a.value=!0;try{const _=await Fl(i.roomId);if(_.meta.code!==200){U.error(_.meta.msg);return}r.value=_.data.files||[]}catch{U.error("获取文件列表失败")}finally{a.value=!1}}async function C(){s.value&&await y()}return e({show:m}),(_,b)=>{const G=oe("el-icon"),W=oe("el-button"),P=oe("el-empty"),k=oe("el-drawer"),w=ma("loading");return $(),Y("div",null,[z(k,{modelValue:s.value,"onUpdate:modelValue":b[0]||(b[0]=S=>s.value=S),direction:"rtl",title:"文件列表",size:"40%"},{header:Q(()=>[...b[1]||(b[1]=[x("h4",null,"文件列表",-1)])]),default:Q(()=>[x("div",Wf,[x("div",zf,[z(W,{type:"primary",size:"small",onClick:p},{default:Q(()=>[z(G,null,{default:Q(()=>[z(gt(jl))]),_:1}),b[2]||(b[2]=he(" 上传文件 ",-1))]),_:1})]),pa(($(),Y("div",Hf,[($(!0),Y(ai,null,oi(r.value,S=>($(),Y("div",{key:S.id||S.fileKey,class:"file-item"},[x("div",Jf,[x("div",$f,[x("img",{src:l(S.file_name),alt:"文件图标",class:"file-icon-img"},null,8,Qf)]),x("div",Yf,[x("div",{class:"file-name",title:S.file_name},le(S.file_name),9,Xf)])]),x("div",Zf,[z(W,{type:"primary",size:"small",disabled:!S.preview_url,onClick:I=>f(S)},{default:Q(()=>[...b[3]||(b[3]=[he("预览",-1)])]),_:2},1032,["disabled","onClick"]),z(W,{type:"success",size:"small",onClick:I=>d(S)},{default:Q(()=>[...b[4]||(b[4]=[he("下载",-1)])]),_:2},1032,["onClick"])])]))),128)),r.value.length===0?($(),Y("div",ep,[z(P,{description:"暂无文件"})])):ue("",!0)])),[[w,a.value]])])]),_:1},8,["modelValue"]),z(Kf,{ref_key:"uploadRef",ref:o,fileType:["pdf","png","jpg","jpeg","gif","doc","docx","xls","xlsx","ppt","pptx","txt","mp4","mp3"],roomId:n.roomId,onUploadSuccess:C},null,8,["roomId"]),z(Wl,{ref_key:"browseFileRef",ref:c,roomId:n.roomId},null,8,["roomId"])])}}},ip=Yi(tp,[["__scopeId","data-v-071490ec"]]),np={key:0},sp={key:1},rp={key:0,class:"loading-container"},ap={class:"loading-content"},op={class:"livekit-container"},cp={key:0,class:"meeting-container"},lp={key:0,class:"screen-share-area"},dp={class:"screen-share-header"},up={key:0,class:"sharing-user"},hp={class:"screen-share-video"},fp={class:"content-layers-container"},pp={key:0,class:"enlarged-video-container"},mp={class:"video-wrapper enlarged-video-wrapper"},gp={key:2,class:"video-placeholder"},vp={class:"video-overlay"},bp={class:"participant-name"},yp={key:0,class:"laser-pointer-indicator"},kp={key:1,class:"video-wrapper screen-share-wrapper"},Tp={class:"video-tracks"},Cp={key:1,class:"video-placeholder"},Sp={class:"video-overlay"},Pp={class:"participant-name"},Ep={key:0,class:"laser-pointer-indicator"},_p={class:"participants-header"},wp={class:"participant-header"},Rp={class:"status-indicator"},Ip={key:0,class:"participant-actions"},Op={class:"video-wrapper"},Dp={class:"video-overlay"},Mp={class:"participant-name"},xp={key:0,class:"video-placeholder"},Ap={class:"participant-header"},Np={class:"status-indicator"},Lp={class:"video-wrapper"},Up={class:"video-tracks"},Fp=["onLoadedmetadata"],jp={key:1,class:"video-placeholder"},Bp={class:"video-overlay"},Vp={class:"participant-name"},qp={class:"fixed-controls"},Kp={class:"controls-container"},Gp={class:"microphone-control-group"},Wp={class:"microphone-control-group"},zp={key:0},Hp={key:1},Jp={key:2},$p="wss://meeting.cnsdt.com:443",Qp={__name:"index",setup(n){da(),zl();const e=ql(),t=fa(),i=F(""),s=F(!0),r=F(""),a=F(""),o=F(null),c=F(null),l=F(!1),d=F(!1),f=F(!1),p=F(!1),m=F([]),y=F([]),C=F(""),_=F(""),b=F(new Map),G=F(new Map),W=F(new Map),P=F(""),k=F(null),w=F(null),S=F(""),I=F(!1),M=F(!1),A=F(null);F(!1),F("");const q=F(),B=F(!1),K=F(null),ve=F(null),De=F(new Map),_e=F(new Map),st=F(null),Me=F(null),_s=F(null),ws=F(),Rs=F(!1),Is=F(!1),Os=F(!1),Ds=F(!1),rn=F(!1),V=F(null),an=F(null),X=F(null),Be=F(null),rt=F(""),on=F(!1),$e=Ri({isDrawing:!1,startX:0,startY:0}),Qe=Ri({isDrawing:!1,startX:0,startY:0}),ke=Ri({color:"#ff0000",thickness:3,duration:2e3,fadeDuration:300}),ft={OPEN:"open_whiteboard",CLOSE:"close_whiteboard",SYNC:"sync_whiteboard",ACTIVATE_LAYER:"activate_layer"},cn={DRAW:"laser_draw",CLEAR:"laser_clear"},Jt={ENLARGE:"enlarge_video",SHRINK:"shrink_video"},Ms=Ie(()=>St.value||M.value),St=Ie(()=>Ue.value||V.value),xs=Ie(()=>St.value&&rt.value==="screenVideo"),As=Ie(()=>M.value&&rt.value==="whiteboard"),ec=Ie(()=>St.value&&xs.value?V.value?V.value.identity===i.value?"我的放大视频":`放大视图 - ${V.value.identity}`:"共享屏幕":M.value&&As.value?"共享白板":St.value?V.value?"放大视频":"共享屏幕":M.value?"共享白板":"共享内容"),vi=Ie(()=>b.value.size+1),tc=Ie(()=>Array.from(b.value.values())),Ue=Ie(()=>P.value!==""||f.value),Ns=Ie(()=>l.value||Ue.value||V.value),ic=Ie(()=>!Ue.value),nc=Ie(()=>!V.value);Ie(()=>!0),Ie(()=>I.value?S.value===i.value?"您正在共享屏幕":`${S.value} 正在共享屏幕`:"暂无屏幕共享");const H=new Yo({adaptiveStream:!0,dynacast:!0,audioCaptureDefaults:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},videoCaptureDefaults:{resolution:{width:1280,height:720}},publishDefaults:{screenShareEncoding:{maxBitrate:3e6,maxFramerate:30},videoEncoding:{maxBitrate:25e5,maxFramerate:30},audioEncoding:{maxBitrate:64e3},red:!0}});ot.on("whiteboardFailed",ac);function xe(u,h=!0){rt.value,rt.value=u,h&&sc(u)}function sc(u){try{const h={type:ft.ACTIVATE_LAYER,roomId:a.value,sender:i.value,senderName:i.value,timestamp:Date.now(),payload:{layerType:u,hasScreenShare:Ue.value,hasEnlargedVideo:!!V.value,hasWhiteboard:M.value}};Ce.publish(`xSynergy/shareWhiteboard/${H.name}`,h)}catch(h){console.error("发布图层激活消息失败:",h)}}function rc(){rn.value=!1}function ac(u){rn.value=u}function oc(u){if(u.identity!==i.value){U.warning("只能放大自己的视频");return}if(vi.value<=1){U.warning("需要至少2名参与者才能使用放大功能");return}if(!l.value){U.warning("请先打开摄像头");return}f.value&&(H.localParticipant.setScreenShareEnabled(!1),f.value=!1,U.info("已自动停止屏幕共享,开启视频放大模式")),V.value&&V.value.identity!==i.value&&Dt(),V.value=u,xe("screenVideo",!0),U.success("已放大您的视频"),hn(Jt.ENLARGE,{participant:{identity:u.identity,hasCameraTrack:u.hasCameraTrack,audioEnabled:u.audioEnabled}}),Ve(()=>{Mt()})}function Dt(){B.value&&(B.value=!1,Qt(),X.value&&(X.value.style.pointerEvents="none",X.value.style.cursor="default"),K.value&&(K.value.style.pointerEvents="none",K.value.style.cursor="default")),V.value&&V.value.identity===i.value&&hn(Jt.SHRINK,{participant:{identity:i.value}}),V.value=null,U.info("已关闭放大视图"),dn()}function cc(u){if(u&&(an.value=u,V.value))if(V.value.identity===i.value)o.value&&o.value.srcObject&&(u.srcObject=o.value.srcObject);else{const h=b.value.get(V.value.identity);h&&h.cameraTrack&&pt(u,h.cameraTrack)}}function lc(){Mt()}function Mt(){if(!X.value||!V.value)return;const u=document.querySelector(".enlarged-video-element");u&&(ln(u),Be.value=X.value.getContext("2d"),X.value.style.position="absolute",X.value.style.top="0",X.value.style.left="0",X.value.style.zIndex="10",X.value.style.cursor=B.value?"crosshair":"default",X.value.style.pointerEvents=B.value?"auto":"none",hc(u))}function ln(u){if(!X.value||!u)return;const h=u.getBoundingClientRect();X.value.width=h.width,X.value.height=h.height,X.value.style.width=`${h.width}px`,X.value.style.height=`${h.height}px`,bi()}function bi(){if(!Be.value||!X.value)return;Be.value.clearRect(0,0,X.value.width,X.value.height),De.value.forEach(h=>{if(h.type==="circle"){const v=$t(h.data.center);dc(v)}else if(h.type==="line"){const v=$t(h.data.start),O=$t(h.data.end);uc(v.x,v.y,O.x,O.y)}})}function dc(u){if(!Be.value)return;const h=Be.value;h.beginPath(),h.arc(u.x,u.y,ke.thickness,0,Math.PI*2),h.fillStyle=ke.color,h.fill(),h.stroke()}function uc(u,h,v,O){if(!Be.value)return;const J=Be.value;J.beginPath(),J.moveTo(u,h),J.lineTo(v,O),J.strokeStyle=ke.color,J.lineWidth=ke.thickness,J.lineCap="round",J.stroke()}function hc(u){Me.value&&Me.value.disconnect(),Me.value=new ResizeObserver(h=>{for(let v of h)v.target===u&&ln(u)}),Me.value.observe(u)}function dn(){Be.value&&X.value&&Be.value.clearRect(0,0,X.value.width,X.value.height),Qe.isDrawing=!1}function fc(u){if(!B.value||!V.value)return;const h=un(u),v={type:"circle",data:{color:ke.color,center:h,thickness:ke.thickness}},O=yi(v);Ti({...v,id:O,target:"enlarged"})}function pc(u){if(!B.value||!V.value)return;const h=bc(u);Qe.isDrawing=!0,Qe.startX=h.x,Qe.startY=h.y}function mc(u){}function gc(u){if(!B.value||!Qe.isDrawing||!V.value)return;const h=un(u),v=un({clientX:Qe.startX+X.value.getBoundingClientRect().left,clientY:Qe.startY+X.value.getBoundingClientRect().top}),O={type:"line",data:{color:ke.color,start:v,end:h,thickness:ke.thickness}};if($t(O.data.start),$t(O.data.end),!ca(O.data.start,O.data.end)){const J=yi(O);Ti({...O,id:J,target:"enlarged"})}Qe.isDrawing=!1}function vc(){Qe.isDrawing=!1}function un(u){if(!X.value)return{x:0,y:0};const h=X.value.getBoundingClientRect();return{x:((u.clientX-h.left)/X.value.width).toFixed(4),y:((u.clientY-h.top)/X.value.height).toFixed(4)}}function bc(u){if(!X.value)return{x:0,y:0};const h=X.value.getBoundingClientRect();return{x:u.clientX-h.left,y:u.clientY-h.top}}function $t(u){return X.value?{x:parseFloat(u.x)*X.value.width,y:parseFloat(u.y)*X.value.height}:{x:0,y:0}}async function yc(){try{if(Ds.value)return;const u=`enlargeVideo_${Date.now()}`;await Ce.connect(u),Ds.value=!0,kc()}catch(u){console.error("MQTT连接失败:",u),U.error("视屏缩放服务连接失败")}}function kc(){try{Ce.subscribe(`xSynergy/enlarge_video/${H.name}`,Tc)}catch(u){console.error("订阅激光笔主题失败:",u)}}function Tc(u,h){try{const v=u.toString(),O=JSON.parse(v);if(O.roomId!==H.name||O.sender===i.value)return;switch(O.type){case Jt.ENLARGE:Cc(O);break;case Jt.SHRINK:Sc(O);break;default:console.warn("未知的视频放大消息类型:",O.type)}}catch(v){console.error("处理视频放大消息失败:",v)}}function Cc(u){const{participant:h}=u.payload;if(!b.value.has(h.identity)){console.warn("收到放大消息,但参与者不存在:",h.identity);return}f.value&&(H.localParticipant.setScreenShareEnabled(!1),f.value=!1,U.info("其他用户开启了视频放大,已自动停止屏幕共享")),M.value&&(Vs(),U.info("其他用户开启了视频放大,已自动退出白板")),V.value&&V.value.identity!==h.identity&&Dt(),V.value={identity:h.identity,hasCameraTrack:h.hasCameraTrack,audioEnabled:h.audioEnabled},U.info(`${h.identity} 放大了自己的视频`),Ve(()=>{const v=b.value.get(h.identity);v&&v.cameraTrack&&an.value&&pt(an.value,v.cameraTrack)}),Ve(()=>{Mt()})}function Sc(u){const{participant:h}=u.payload;V.value&&V.value.identity===h.identity&&(V.value=null,U.info(`${h.identity} 关闭了放大视图`),B.value&&(B.value=!1,Qt()),dn())}function hn(u,h={}){try{const v={type:u,roomId:H.name,sender:i.value,timestamp:Date.now(),payload:h};return Ce.publish(`xSynergy/enlarge_video/${H.name}`,v),!0}catch(v){return console.error("发布视频放大消息失败:",v),!1}}async function Pc(){try{if(Rs.value)return;const u=`fileUpload_${Date.now()}`;await Ce.connect(u),Rs.value=!0,ot.emit("subscribeToFileUploadTopic",{roomId:a.value})}catch(u){console.error("MQTT连接失败:",u),U.error("文件上传服务连接失败")}}async function Ec(){try{if(Is.value)return;const u=`filePreview_${Date.now()}`;await Ce.connect(u),Is.value=!0,ot.emit("subscribeToFilePreviewTopic",{roomId:a.value}),ot.emit("roomces",{roomId:a.value})}catch(u){console.error("MQTT连接失败:",u),U.error("文件上传服务连接失败")}}async function _c(){try{if(Os.value)return;const u=`fileConversionStatus_${Date.now()}`;await Ce.connect(u),Os.value=!0,ot.emit("subscribeToFileConversionStatusTopic",{roomId:a.value})}catch(u){console.error("MQTT连接失败:",u),U.error("文件上传服务连接失败")}}function wc(){if(!Ns.value){U.warning("请在开启摄像头或屏幕共享时使用激光笔");return}if(!Ue.value&&!V.value){U.warning("请在屏幕共享、放大视图模式下使用激光笔");return}B.value=!B.value,B.value?(V.value?Mt():Yt(),U.success("激光笔已开启,双击添加标记,拖拽绘制线条")):(Qt(),U.info("激光笔已关闭"))}function Qt(){_e.value.forEach((u,h)=>{clearTimeout(u)}),_e.value.clear(),De.value.clear(),ve.value&&K.value&&ve.value.clearRect(0,0,K.value.width,K.value.height),Be.value&&X.value&&Be.value.clearRect(0,0,X.value.width,X.value.height),$e.isDrawing=!1,Qe.isDrawing=!1}function yi(u){const h=la();u.id=h,u.timestamp=Date.now(),De.value.set(h,u);const v=setTimeout(()=>{Ls(h)},ke.duration);return _e.value.set(h,v),ki(),bi(),h}function Ls(u){_e.value.has(u)&&(clearTimeout(_e.value.get(u)),_e.value.delete(u)),De.value.delete(u),ki(),bi()}function Rc(){Yt()}function Yt(){if(!K.value)return;let u;Ue.value?(u=document.querySelector(".screen-share-element"),_s.value=u):V.value&&(u=document.querySelector(".enlarged-video-element"),_s.value=u),u&&(fn(u),ve.value=K.value.getContext("2d"),K.value.style.position="absolute",K.value.style.top="0",K.value.style.left="0",K.value.style.zIndex="10",K.value.style.cursor=B.value?"crosshair":"default",K.value.style.pointerEvents=B.value?"auto":"none",Ic(u))}function fn(u){if(!K.value||!u)return;const h=u.getBoundingClientRect();K.value.width=h.width,K.value.height=h.height,K.value.style.width=`${h.width}px`,K.value.style.height=`${h.height}px`,ki()}function Ic(u){Me.value&&Me.value.disconnect(),Me.value=new ResizeObserver(h=>{for(let v of h)v.target===u&&fn(u)}),Me.value.observe(u)}function Oc(){st.value&&(clearTimeout(st.value),st.value=null),ve.value&&K.value&&ve.value.clearRect(0,0,K.value.width,K.value.height),De.value.clear(),$e.isDrawing=!1}function pn(u){if(!K.value)return{x:0,y:0};const h=K.value.getBoundingClientRect();return{x:((u.clientX-h.left)/K.value.width).toFixed(4),y:((u.clientY-h.top)/K.value.height).toFixed(4)}}function Dc(u){if(!K.value)return{x:0,y:0};const h=K.value.getBoundingClientRect();return{x:u.clientX-h.left,y:u.clientY-h.top}}function Mc(u){if(!B.value)return;const h=pn(u),v={type:"circle",data:{color:ke.color,center:h,thickness:ke.thickness}},O=yi(v);Ti({...v,id:O})}function xc(u){if(!B.value)return;const h=Dc(u);$e.isDrawing=!0,$e.startX=h.x,$e.startY=h.y}function Ac(u){}function Nc(u){if(!B.value||!$e.isDrawing)return;const h=pn(u),v=pn({clientX:$e.startX+K.value.getBoundingClientRect().left,clientY:$e.startY+K.value.getBoundingClientRect().top}),O={type:"line",data:{color:ke.color,start:v,end:h,thickness:ke.thickness}};if(Xt(O.data.start),Xt(O.data.end),!ca(O.data.start,O.data.end)){const J=yi(O);Ti({...O,id:J})}$e.isDrawing=!1}function Lc(){$e.isDrawing=!1}function Uc(u){if(!ve.value)return;const h=ve.value;h.beginPath(),h.arc(u.x,u.y,ke.thickness,0,Math.PI*2),h.fillStyle=ke.color,h.fill(),h.stroke()}function Fc(u,h,v,O){if(!ve.value)return;const J=ve.value;J.beginPath(),J.moveTo(u,h),J.lineTo(v,O),J.strokeStyle=ke.color,J.lineWidth=ke.thickness,J.lineCap="round",J.stroke()}function ki(){if(!ve.value||!K.value)return;ve.value.clearRect(0,0,K.value.width,K.value.height),De.value.forEach(h=>{if(h.type==="circle"){const v=Xt(h.data.center);Uc(v)}else if(h.type==="line"){const v=Xt(h.data.start),O=Xt(h.data.end);Fc(v.x,v.y,O.x,O.y)}})}function Xt(u){return K.value?{x:parseFloat(u.x)*K.value.width,y:parseFloat(u.y)*K.value.height}:{x:0,y:0}}function Us(){if(!B.value||!K.value)return;let u;Ue.value?u=document.querySelector(".screen-share-element"):V.value&&(u=document.querySelector(".enlarged-video-element")),u&&fn(u)}function Fs(){if(!B.value||!X.value||!V.value)return;const u=document.querySelector(".enlarged-video-element");u&&ln(u)}window.addEventListener("resize",()=>{Us(),Fs()});function jc(){try{Ce.subscribe(`xSynergy/laserPointer/${H.name}`,Bc)}catch(u){console.error("订阅激光笔主题失败:",u)}}function Ti(u){try{const h={type:cn.DRAW,roomId:a.value,sender:i.value,timestamp:Date.now(),element:u};Ce.publish(`xSynergy/laserPointer/${H.name}`,h)}catch(h){console.error("发布激光笔数据失败:",h)}}function Bc(u,h){try{const v=u.toString(),O=JSON.parse(v);if(O.roomId!==H.name||O.sender===i.value)return;switch(O.type){case cn.DRAW:Vc(O);break;case cn.CLEAR:Qt();break}}catch(v){console.error("处理激光笔消息失败:",v)}}function Vc(u){const{element:h}=u;if(h.id&&De.value.has(h.id))De.value.set(h.id,h);else{const v=la();h.id=v,h.timestamp=Date.now(),De.value.set(v,h);const O=setTimeout(()=>{Ls(v)},ke.duration);_e.value.set(v,O)}ki(),bi()}async function qc(){ws.value.show()}async function mn(u){try{if(u){const h=await navigator.mediaDevices.getUserMedia({video:!0}),v=await navigator.mediaDevices.enumerateDevices();m.value=v.filter(O=>O.kind==="videoinput"),h.getTracks().forEach(O=>{O.stop()})}}catch(h){console.error("摄像头访问失败:",h),si(h,"摄像头"),m.value=[]}}async function Kc(u){if(u==="refresh"){await mn(!0),U.success("设备列表已刷新");return}C.value=u,l.value?await Wc(u):await js(u),U.success(`已切换到摄像头: ${wi(m.value,u)}`)}async function gn(u){try{if(u){const h=await navigator.mediaDevices.getUserMedia({audio:!0}),v=await navigator.mediaDevices.enumerateDevices();y.value=v.filter(O=>O.kind==="audioinput"),h.getTracks().forEach(O=>O.stop())}}catch(h){console.error("麦克风访问失败:",h),si(h,"麦克风"),y.value=[]}}async function Gc(u){if(u==="refresh"){await gn(),U.success("设备列表已刷新");return}_.value=u,d.value?await zc(u):await Bs(u),U.success(`已切换到麦克风: ${wi(y.value,u)}`)}async function js(u){try{return H.options.videoCaptureDefaults.deviceId=u,await H.localParticipant.setCameraEnabled(!0),l.value=!0,setTimeout(()=>{yn()},200),!0}catch(h){U.error("使用指定设备开启摄像头失败");try{l.value&&await H.localParticipant.setCameraEnabled(!0)}catch{l.value=!1,C.value=""}throw h}}async function Bs(u){try{return H.options.audioCaptureDefaults.deviceId=u,await H.localParticipant.setMicrophoneEnabled(!0),d.value=!0,!0}catch(h){throw console.error("使用指定设备开启麦克风失败:",h),d.value=!1,h}}async function Wc(u){try{return await H.localParticipant.setCameraEnabled(!1),H.options.videoCaptureDefaults.deviceId=u,await H.localParticipant.setCameraEnabled(!0),setTimeout(()=>{yn()},200),!0}catch(h){console.error("切换摄像头设备失败:",h);try{await H.localParticipant.setCameraEnabled(!0)}catch{l.value=!1}throw h}}async function zc(u){try{return await H.localParticipant.setMicrophoneEnabled(!1),H.options.audioCaptureDefaults.deviceId=u,await H.localParticipant.setMicrophoneEnabled(!0),!0}catch(h){console.error("切换麦克风设备失败:",h);try{await H.localParticipant.setMicrophoneEnabled(!0)}catch{d.value=!1}throw h}}async function Hc(){try{const u=`whiteboard_${Date.now()}`;await Ce.connect(u),Jc()}catch(u){console.error("MQTT连接失败:",u),U.error("白板同步连接失败")}}function Jc(){try{Ce.subscribe(`xSynergy/shareWhiteboard/${H.name}`,Qc)}catch(u){console.error("订阅白板主题失败:",u)}}async function $c(){try{const u=`toLaserPointer_${Date.now()}`;await Ce.connect(u),jc()}catch(u){console.error("MQTT连接失败:",u),U.error("激光笔同步连接失败")}}function Qc(u,h){try{const v=u.toString(),O=JSON.parse(v);if(O.roomId!==H.name||O.sender===i.value)return;switch(O.type){case ft.OPEN:Xc(O);break;case ft.CLOSE:Zc(O);break;case ft.SYNC:el(O);break;case ft.ACTIVATE_LAYER:Yc(O);break;default:console.warn("未知的白板消息类型:",O.type)}}catch(v){console.error("处理白板消息失败:",v)}}function Yc(u){const{layerType:h,hasScreenShare:v,hasEnlargedVideo:O,hasWhiteboard:J}=u.payload;h==="screenVideo"&&(v||O)?xe("screenVideo",!1):h==="whiteboard"&&J&&xe("whiteboard",!1)}function Xc(u){U.info(`${u.senderName||u.sender} 开启了白板`),M.value=!0,xe("whiteboard",!1)}function Zc(u){U.info(`${u.senderName||u.sender} 关闭了白板`),Ve(()=>{Ue.value&&!M.value&&(xe("screenVideo",!1),k.value&&w.value&&pt(w.value,k.value))})}function el(u){A.value&&u.payload&&A.value.syncData&&A.value.syncData(u.payload)}async function tl(){q.value.show(a.value)}async function il(u){if(u.length<0){U.error("请选择加入房间的人员");return}const h=u.map(v=>({user_uid:v.uid,display_name:v.name}));await Kl(H.name,{participants:h,participant_role:"participant"})}function vn(u,h={}){try{const v={type:u,roomId:a.value,sender:i.value,senderName:i.value,timestamp:Date.now(),payload:h};return Ce.publish(`xSynergy/shareWhiteboard/${H.name}`,v),!0}catch(v){return console.error("发布白板消息失败:",v),U.warning("消息发送失败,但白板功能正常"),!1}}async function nl(){M.value?await Vs():await sl()}async function sl(){try{M.value=!0,xe("whiteboard",!0),vn(ft.OPEN,{action:"open",whiteboardId:a.value,roomName:r.value})?U.success("白板已开启,已通知其他参会者"):U.success("白板已开启")}catch(u){console.error("开启白板失败:",u),U.error("开启白板失败")}}async function Vs(){try{vn(ft.CLOSE,{action:"close",whiteboardId:a.value,roomName:r.value}),M.value=!1,A.value&&A.value.cleanup&&A.value.cleanup(),rt.value==="whiteboard"&&St.value&&xe("screenVideo",!1),U.success("已退出白板")}catch(u){u!=="cancel"&&(console.error("退出白板失败:",u),U.error("退出白板失败"))}}function rl(u,h,v){if(!u)return;G.value.has(h)||G.value.set(h,{});const O=G.value.get(h);O[v]=u,G.value.set(h,O);const J=b.value.get(h);J&&J.cameraTrack&&pt(u,J.cameraTrack)}function al(u,h){if(!u)return;W.value.set(h,u);const v=b.value.get(h);v&&v.audioTrack&&$s(u,v.audioTrack)}function ol(u){u&&(w.value=u,k.value&&pt(u,k.value),Ve(()=>{Yt()}))}function cl(){H.removeAllListeners(),H.on(D.Connected,ll).on(D.Disconnected,dl).on(D.Reconnected,vf).on(D.TrackSubscribed,qs).on(D.TrackUnsubscribed,Ks).on(D.ParticipantConnected,ul).on(D.ParticipantDisconnected,hl).on(D.LocalTrackPublished,fl).on(D.LocalTrackUnpublished,pl).on(D.TrackMuted,Gs).on(D.TrackUnmuted,Ws).on(D.ActiveSpeakersChanged,ml).on(D.DataReceived,gf).on(D.ConnectionStateChanged,yf)}async function ll(){a.value=H.name,await Hc(),await $c(),await Pc(),await _c(),await Ec(),await yc(),s.value=!1,U.success("已成功连接到房间"),H.remoteParticipants.forEach(u=>{Js(u),zs(u),Ye(u)})}function dl(u){s.value=!0,l.value=!1,d.value=!1,f.value=!1,b.value.clear(),G.value.clear(),W.value.clear(),P.value="",k.value=null,V.value=null,U.error("连接已断开")}function qs(u,h,v){u&&(u.kind===E.Kind.Video?(vl(v,h.source,u),h.source===E.Source.ScreenShare&&(Hs(v,u),S.value=v.identity,I.value=!0,v.identity!==i.value&&xe("screenVideo",!1)),Tl(v.identity,h.source,u)):u.kind===E.Kind.Audio&&(yl(v,u),Cl(v.identity,u))),Ye(v)}function Ks(u,h,v){u.kind===E.Kind.Video?(bl(v,h.source),bn(v.identity,h.source),h.source===E.Source.ScreenShare&&(Hs(v,null),S.value===v.identity&&(S.value="",I.value=!1)),Ye(v)):u.kind===E.Kind.Audio&&(kl(v),Qs(v.identity),Ye(v))}function ul(u){Js(u),zs(u),Ye(u),U.info(`新用户加入: ${u.identity}`)}function hl(u){u.identity===P.value&&(P.value="",k.value=null,w.value&&w.value.srcObject&&(w.value.srcObject=null)),u.identity===S.value&&(S.value="",I.value=!1),V.value&&V.value.identity===u.identity&&Dt(),gl(u),U.info(`用户离开: ${u.identity}`)}function fl(u){u.track&&(u.kind===E.Kind.Video?u.source===E.Source.Camera?Ci(u.track):u.source===E.Source.ScreenShare&&(P.value=H.localParticipant.identity,k.value=u.track,S.value=H.localParticipant.identity,I.value=!0,w.value&&pt(w.value,u.track)):u.kind===E.Kind.Audio&&(d.value=!0))}function pl(u){u.kind===E.Kind.Video?u.source===E.Source.Camera?l.value=!1:u.source===E.Source.ScreenShare&&P.value===H.localParticipant.identity&&(f.value=!1,P.value="",k.value=null,S.value===H.localParticipant.identity&&(S.value="",I.value=!1),w.value&&w.value.srcObject&&(w.value.srcObject=null)):u.kind===E.Kind.Audio&&(d.value=!1)}function Gs(u,h){Ye(h)}function Ws(u,h){Ye(h)}function zs(u){u.on(L.TrackSubscribed,(h,v)=>{qs(h,v,u)}).on(L.TrackUnsubscribed,(h,v)=>{Ks(h,v,u)}).on(L.TrackMuted,h=>{Gs(h,u)}).on(L.TrackUnmuted,h=>{Ws(h,u)}).on(L.IsSpeakingChanged,h=>{Sl(u,h)}).on(L.TrackPublished,h=>{Ye(u)}).on(L.TrackUnpublished,h=>{Ye(u)})}function ml(u){const h=u.some(v=>v.identity===H.localParticipant.identity);p.value=h,b.value.forEach((v,O)=>{const J=u.some(be=>be.identity===O);v.isSpeaking!==J&&(v.isSpeaking=J,b.value.set(O,{...v}))})}function Hs(u,h){h?(P.value=u.identity,k.value=h,M.value||xe("screenVideo",!1),w.value&&pt(w.value,h)):u.identity===P.value&&(P.value="",k.value=null,w.value&&w.value.srcObject&&(w.value.srcObject=null))}function Js(u){var v;if(!u||u.identity===((v=H.localParticipant)==null?void 0:v.identity))return;const h={identity:u.identity,cameraTrack:null,screenTrack:null,audioTrack:null,hasCameraTrack:!1,hasScreenTrack:!1,audioEnabled:!1,videoEnabled:u.isCameraEnabled,isSpeaking:!1};b.value.set(u.identity,h)}function gl(u){if(b.value.has(u.identity)){const h=u.identity;bn(h,"camera"),bn(h,"screen"),Qs(h),b.value.delete(h),G.value.delete(h),W.value.delete(h)}}function vl(u,h,v){const O=b.value.get(u.identity);O&&(h===E.Source.Camera?(O.cameraTrack=v,O.hasCameraTrack=!0):h===E.Source.ScreenShare&&(O.screenTrack=v,O.hasScreenTrack=!0),b.value.set(u.identity,{...O}))}function bl(u,h){const v=b.value.get(u.identity);v&&(h===E.Source.Camera?(v.cameraTrack=null,v.hasCameraTrack=!1):h===E.Source.ScreenShare&&(v.screenTrack=null,v.hasScreenTrack=!1),b.value.set(u.identity,{...v}))}function yl(u,h){const v=b.value.get(u.identity);v&&(v.audioTrack=h,v.audioEnabled=!0,b.value.set(u.identity,{...v}))}function kl(u){const h=b.value.get(u.identity);h&&(h.audioTrack=null,h.audioEnabled=!1,b.value.set(u.identity,{...h}))}function pt(u,h){if(!(!u||!h))try{const v=new MediaStream;v.addTrack(h.mediaStreamTrack),u.srcObject=v}catch(v){console.error("附加轨道到视频元素失败:",v)}}function $s(u,h){if(!(!u||!h))try{const v=new MediaStream;v.addTrack(h.mediaStreamTrack),u.srcObject=v,u.play().catch(O=>{console.warn("音频播放失败:",O)})}catch(v){console.error("附加轨道到音频元素失败:",v)}}function Tl(u,h,v){const O=G.value.get(u);if(!O)return;const J=h===E.Source.Camera?"camera":"screen",be=O[J];be&&pt(be,v)}function Cl(u,h){const v=W.value.get(u);v&&$s(v,h)}function bn(u,h){const v=G.value.get(u);if(!v)return;const O=h===E.Source.Camera?"camera":"screen",J=v[O];J&&J.srcObject&&(J.srcObject=null)}function Qs(u){const h=W.value.get(u);h&&h.srcObject&&(h.srcObject=null)}function Ye(u){const h=b.value.get(u.identity);if(!h)return;let v=!1,O=!1,J=!1;u.videoTrackPublications.forEach(be=>{be.isSubscribed&&be.track&&!be.isMuted&&(be.source===E.Source.Camera?(v=!0,h.cameraTrack||(h.cameraTrack=be.track)):be.source===E.Source.ScreenShare&&(O=!0,h.screenTrack||(h.screenTrack=be.track)))}),u.audioTrackPublications.forEach(be=>{be.isSubscribed&&be.track&&!be.isMuted&&(J=!0,h.audioTrack||(h.audioTrack=be.track))}),h.hasCameraTrack=v,h.hasScreenTrack=O,h.audioEnabled=J,h.videoEnabled=u.isCameraEnabled,v||(h.cameraTrack=null),O||(h.screenTrack=null),J||(h.audioTrack=null),b.value.set(u.identity,{...h})}function Sl(u,h){const v=b.value.get(u.identity);v&&v.isSpeaking!==h&&(v.isSpeaking=h,b.value.set(u.identity,{...v}))}function Ci(u){if(o.value&&u)try{const h=new MediaStream;h.addTrack(u.mediaStreamTrack),o.value.srcObject=h,l.value=!0,o.value.play().catch(v=>{console.warn("本地视频播放失败:",v)})}catch(h){console.error("附加本地视频轨道失败:",h)}}async function Pl(){try{if(l.value)await H.localParticipant.setCameraEnabled(!1),l.value=!1,o.value&&o.value.srcObject&&(o.value.srcObject.getTracks().forEach(u=>u.stop()),o.value.srcObject=null),C.value="",U.info("摄像头已关闭"),V.value&&V.value.identity===H.localParticipant.identity&&Dt(),Ye(H.localParticipant);else{if(o.value||(console.warn("本地视频元素未找到,等待DOM更新"),await Ve()),m.value.length===0&&await mn(!0),m.value.length===0){U.error("未找到可用的摄像头设备");return}let u=C.value;!u&&m.value.length>0&&(u=m.value[0].deviceId,C.value=u),u?(await js(u),U.success(`摄像头已开启 - ${wi(m.value,u)}`)):(await H.localParticipant.setCameraEnabled(!0),l.value=!0,setTimeout(()=>{yn()},200),U.success("摄像头已开启")),await El()}}catch(u){si(u,"摄像头")}}async function El(){try{await new Promise(v=>setTimeout(v,500));const h=Array.from(H.localParticipant.videoTrackPublications.values()).find(v=>v.source===E.Source.Camera&&v.track);h?h.track&&o.value&&Ci(h.track):console.warn("未找到摄像头发布轨道")}catch(u){console.error("确保摄像头轨道发布失败:",u)}}async function yn(){try{await new Promise(v=>setTimeout(v,100));const h=Array.from(H.localParticipant.videoTrackPublications.values()).find(v=>v.source===E.Source.Camera&&v.track);h&&h.track?Ci(h.track):setTimeout(()=>{const O=Array.from(H.localParticipant.videoTrackPublications.values()).find(J=>J.source===E.Source.Camera&&J.track);O&&O.track?Ci(O.track):console.warn("最终未找到摄像头轨道")},1e3)}catch(u){console.error("手动附加摄像头轨道失败:",u)}}async function _l(){try{if(d.value){await H.localParticipant.setMicrophoneEnabled(!1),d.value=!1;const u=Array.from(H.localParticipant.audioTrackPublications.values());for(const h of u)h.track&&h.track.stop();_.value="",U.info("麦克风已关闭")}else{if(y.value.length===0&&await gn(!0),y.value.length===0)return;let u=_.value;!u&&y.value.length>0&&(u=y.value[0].deviceId,_.value=u),u?(await Bs(u),U.success(`麦克风已开启 - ${wi(y.value,u)}`)):(await H.localParticipant.setMicrophoneEnabled(!0),d.value=!0,U.success("麦克风已开启")),U.success("麦克风已开启")}}catch(u){si(u,"麦克风"),d.value||(_.value="")}}async function wl(){try{if(V.value){U.error("当前处于视频放大模式,无法进行屏幕共享");return}if(!f.value&&I.value&&S.value!==i.value){U.error(`当前 ${S.value} 正在共享屏幕,请等待其结束后再共享`);return}f.value?(await H.localParticipant.setScreenShareEnabled(!1),f.value=!1,S.value===i.value&&(S.value="",I.value=!1),U.info("屏幕共享已停止")):(await H.localParticipant.setScreenShareEnabled(!0),f.value=!0,S.value=i.value,I.value=!0,xe("screenVideo",!0),U.success("屏幕共享已开始"))}catch(u){si(u,"屏幕共享")}}async function Ys(){try{V.value&&V.value.identity===i.value&&hn(Jt.SHRINK,{participant:{identity:i.value}}),M.value&&(vn(ft.CLOSE,{action:"close",reason:"host_left",roomName:r.value}),M.value=!1,A.value&&A.value.cleanup&&A.value.cleanup()),Ce.disconnect(),f.value&&await H.localParticipant.setScreenShareEnabled(!1),await H.localParticipant.setCameraEnabled(!1),await H.localParticipant.setMicrophoneEnabled(!1),d.value=!1,l.value=!1,_.value="",C.value="",await H.disconnect(),Il(),U.success("已离开会议")}catch(u){console.error("离开会议失败:",u),U.error("离开会议失败")}}async function Rl(){await Ys(),t.push({path:"/coordinate"})}function Il(){S.value="",I.value=!1,M.value=!1,l.value=!1,d.value=!1,f.value=!1,p.value=!1,s.value=!0,i.value="",_.value="",C.value="",y.value=[],m.value=[],V.value=null,Ce.disconnect(),b.value.clear(),G.value.clear(),W.value.clear(),P.value="",k.value=null,o.value&&o.value.srcObject&&(o.value.srcObject.getTracks().forEach(u=>u.stop()),o.value.srcObject=null),c.value&&c.value.srcObject&&(c.value.srcObject.getTracks().forEach(u=>u.stop()),c.value.srcObject=null),w.value&&w.value.srcObject&&(w.value.srcObject.getTracks().forEach(u=>u.stop()),w.value.srcObject=null),G.value.forEach((u,h)=>{u.camera&&u.camera.srcObject&&(u.camera.srcObject.getTracks().forEach(v=>v.stop()),u.camera.srcObject=null),u.screen&&u.screen.srcObject&&(u.screen.srcObject.getTracks().forEach(v=>v.stop()),u.screen.srcObject=null)}),W.value.forEach((u,h)=>{u&&u.srcObject&&(u.srcObject.getTracks().forEach(v=>v.stop()),u.srcObject=null)})}Pt([()=>Ue.value,()=>f.value],([u,h])=>{!u&&!h&&B.value&&Ol()},{immediate:!0}),Pt(l,u=>{u||V.value&&V.value.identity===i.value&&Dt()}),Pt([Ue,V],([u,h])=>{B.value&&Ve(()=>{Yt()})}),Pt(B,u=>{u?Ve(()=>{V.value?Mt():Yt()}):Me.value&&(Me.value.disconnect(),Me.value=null)}),Pt(V,u=>{u&&B.value?Ve(()=>{Mt()}):dn()}),Pt(St,u=>{u&&!rt.value?xe("screenVideo",!1):!u&&rt.value==="screenVideo"&&(M.value?xe("whiteboard",!1):rt.value="")}),Pt(M,u=>{u&&!rt.value&&xe("whiteboard",!1)});function Ol(){B.value=!1,Oc(),K.value&&(K.value.style.pointerEvents="none",K.value.style.cursor="default"),U.info("屏幕共享已结束,激光笔已自动关闭")}return Bl(()=>{window.removeEventListener("resize",Us),window.removeEventListener("resize",Fs),Me.value&&Me.value.disconnect(),Qt(),M.value&&A.value&&A.value.cleanup&&A.value.cleanup(),Ce.disconnect(),H&&H.state==="connected"&&Ys()}),ha(async()=>{try{on.value=!0,s.value=!0;const u=await Vl(e.query.room_uid);if(u.meta.code==200){const h=u.data.access_token;i.value=u.data.user_uid,r.value=u.data.room_name,await Ve(),cl(),await H.connect($p,h,{autoSubscribe:!0})}else{U.error(u.meta.message);return}}catch(u){U.error(`连接失败: ${u.message}`),s.value=!0}finally{on.value=!1}}),(u,h)=>{const v=oe("Loading"),O=oe("el-icon"),J=oe("el-button"),be=oe("Microphone"),Xs=oe("Mute"),Si=oe("el-dropdown-item"),Zs=oe("el-dropdown-menu"),er=oe("el-dropdown");return rn.value?($(),Y("div",np,[z(_f,{onLoginSuccess:rc})])):($(),Y("div",sp,[on.value?($(),Y("div",rp,[x("div",ap,[z(O,{class:"loading-icon"},{default:Q(()=>[z(v)]),_:1}),h[1]||(h[1]=x("p",null,"正在创建房间,请稍候...",-1))])])):ue("",!0),x("audio",{ref_key:"localAudio",ref:c,autoplay:"",muted:"",class:"audio-element"},null,512),h[17]||(h[17]=x("div",{id:"audio"},null,-1)),x("div",op,[s.value?ue("",!0):($(),Y("div",cp,[x("div",{class:Te(["video-layout",{"screen-sharing-active":Ms.value,"enlarged-mode":V.value}])},[Ms.value?($(),Y("div",lp,[x("div",dp,[x("h3",null,le(ec.value),1),P.value?($(),Y("div",up,[x("span",null,"由 "+le(P.value)+" 共享",1)])):ue("",!0),V.value&&V.value.identity===i.value?($(),Fe(J,{key:1,onClick:Dt,type:"info",size:"small",class:"close-enlarge-btn"},{default:Q(()=>[...h[2]||(h[2]=[x("img",{src:$l,style:{width:"16px",height:"15px"},alt:""},null,-1)])]),_:1})):ue("",!0)]),x("div",hp,[x("div",fp,[St.value?($(),Y("div",{key:0,class:Te(["content-layer screen-video-layer",{"active-layer":xs.value}])},[V.value?($(),Y("div",pp,[x("div",mp,[V.value?($(),Y("canvas",{key:0,ref_key:"enlargedLaserPointerCanvas",ref:X,class:"laser-pointer-canvas enlarged-laser-canvas",onDblclick:fc,onMousedown:pc,onMousemove:mc,onMouseup:gc,onMouseleave:vc},null,544)):ue("",!0),V.value.hasCameraTrack?($(),Y("video",{key:1,ref:ee=>cc(ee),autoplay:"",playsinline:"",class:"enlarged-video-element",onLoadedmetadata:lc},null,544)):ue("",!0),V.value.hasCameraTrack?ue("",!0):($(),Y("div",gp,[...h[3]||(h[3]=[x("i",{class:"el-icon-user"},null,-1),x("span",null,"暂无视频流",-1)])])),x("div",vp,[x("span",bp,le(V.value.identity===i.value?"我":V.value.identity),1),x("span",{class:Te(["audio-indicator",{muted:!V.value.audioEnabled}])},[x("i",{class:Te(V.value.audioEnabled?"el-icon-microphone":"el-icon-turn-off-microphone")},null,2)],2),B.value&&V.value?($(),Y("span",yp,[...h[4]||(h[4]=[x("i",{class:"el-icon-aim"},null,-1),he(" 激光笔模式中 ",-1)])])):ue("",!0)])])])):($(),Y("div",kp,[x("canvas",{ref_key:"laserPointerCanvas",ref:K,class:"laser-pointer-canvas",onDblclick:Mc,onMousedown:xc,onMousemove:Ac,onMouseup:Nc,onMouseleave:Lc},null,544),x("div",Tp,[k.value?($(),Y("video",{key:0,ref:ee=>ol(ee),autoplay:"",playsinline:"",class:"screen-share-element",onLoadedmetadata:Rc},null,544)):ue("",!0),k.value?ue("",!0):($(),Y("div",Cp,[...h[5]||(h[5]=[x("i",{class:"el-icon-monitor"},null,-1),x("span",null,"暂无屏幕共享",-1)])]))]),x("div",Sp,[x("span",Pp,le(P.value),1),B.value?($(),Y("span",Ep,[...h[6]||(h[6]=[x("i",{class:"el-icon-aim"},null,-1),he(" 激光笔模式中 ",-1)])])):ue("",!0)])]))],2)):ue("",!0),M.value?($(),Y("div",{key:1,class:Te(["content-layer whiteboard-layer",{"active-layer":As.value}])},[z(Hl,{ref_key:"whiteboardRef",ref:A,roomId:a.value,userId:i.value,class:"whiteboard-component"},null,8,["roomId","userId"])],2)):ue("",!0)])])])):ue("",!0),x("div",{class:Te(["participants-area",{"with-screen-share":Ue.value||M.value||V.value}])},[x("div",_p,[x("h3",null,"会议名称:"+le(r.value),1),x("h3",null,"参会者 ("+le(vi.value)+")",1)]),x("div",{class:Te(["video-grid",{"grid-layout":!Ue.value&&!V.value&&vi.value>1}])},[x("div",{class:Te(["participant-card local-participant",{enlarged:V.value&&V.value.identity===i.value}])},[x("div",wp,[x("h3",null,"我的视频 ("+le(i.value)+")",1),x("div",Rp,[z(O,{class:Te({"audio-on":d.value,"audio-off":!d.value})},{default:Q(()=>[d.value?($(),Fe(be,{key:0})):($(),Fe(Xs,{key:1}))]),_:1},8,["class"])]),vi.value>1&&ic.value&&!V.value?($(),Y("div",Ip,[z(J,{onClick:h[0]||(h[0]=ee=>oc({identity:i.value,hasCameraTrack:l.value,audioEnabled:d.value})),type:"link",size:"small",class:"enlarge-btn",title:"放大视图"},{default:Q(()=>[...h[7]||(h[7]=[x("img",{src:Ql,style:{width:"18px",height:"12px"},alt:""},null,-1)])]),_:1})])):ue("",!0)]),x("div",Op,[x("video",{ref_key:"localVideo",ref:o,autoplay:"",muted:"",playsinline:"",class:"video-element"},null,512),x("div",Dp,[x("span",Mp,le(i.value),1),x("span",{class:Te(["audio-indicator",{muted:!d.value}])},[x("i",{class:Te(d.value?"el-icon-microphone":"el-icon-turn-off-microphone")},null,2)],2)]),l.value?ue("",!0):($(),Y("div",xp,[...h[8]||(h[8]=[x("i",{class:"el-icon-user"},null,-1),x("span",null,"摄像头已关闭",-1)])]))])],2),($(!0),Y(ai,null,oi(tc.value,ee=>($(),Y("div",{class:Te(["participant-card",{enlarged:V.value&&V.value.identity===ee.identity}]),key:ee.identity},[x("div",Ap,[x("h3",null,le(ee.identity),1),x("div",Np,[z(O,{class:Te({"audio-on":ee.audioEnabled,"audio-off":!ee.audioEnabled})},{default:Q(()=>[ee.audioEnabled?($(),Fe(be,{key:0})):($(),Fe(Xs,{key:1}))]),_:2},1032,["class"])])]),x("div",Lp,[x("div",Up,[ee.hasCameraTrack?($(),Y("video",{key:0,ref_for:!0,ref:kn=>rl(kn,ee.identity,"camera"),autoplay:"",playsinline:"",class:"video-element",onLoadedmetadata:()=>gt(bf)(ee.identity,"camera")},null,40,Fp)):ue("",!0),ee.hasCameraTrack?ue("",!0):($(),Y("div",jp,[...h[9]||(h[9]=[x("i",{class:"el-icon-user"},null,-1),x("span",null,"摄像头已关闭",-1)])]))]),x("div",Bp,[x("span",Vp,le(ee.identity),1),x("span",{class:Te(["audio-indicator",{muted:!ee.audioEnabled}])},[x("i",{class:Te(ee.audioEnabled?"el-icon-microphone":"el-icon-turn-off-microphone")},null,2)],2)])]),x("audio",{ref_for:!0,ref:kn=>al(kn,ee.identity),autoplay:"",class:"participant-audio"},null,512)],2))),128))],2)],2)],2),x("div",qp,[x("div",Kp,[x("div",Gp,[z(J,{onClick:Pl,type:l.value?"danger":"info",class:"control-btn microphone-btn",size:"large"},{default:Q(()=>[he(le(l.value?"关闭摄像头":"开启摄像头"),1)]),_:1},8,["type"]),z(er,{trigger:"click",onCommand:Kc,onVisibleChange:mn,class:"control-dropdown microphone-dropdown"},{dropdown:Q(()=>[z(Zs,null,{default:Q(()=>[($(!0),Y(ai,null,oi(m.value,ee=>($(),Fe(Si,{key:ee.deviceId,command:ee.deviceId,class:Te({"selected-device":C.value===ee.deviceId})},{default:Q(()=>[h[10]||(h[10]=x("i",{class:"el-icon-video-camera"},null,-1)),he(" "+le(ee.label||`摄像头 ${m.value.indexOf(ee)+1}`)+" ",1),C.value===ee.deviceId?($(),Fe(O,{key:0,class:"check-icon"},{default:Q(()=>[z(gt(ir))]),_:1})):ue("",!0)]),_:2},1032,["command","class"]))),128)),z(Si,{divided:"",command:"refresh"},{default:Q(()=>[z(O,null,{default:Q(()=>[z(gt(nr))]),_:1}),h[11]||(h[11]=he(" 刷新设备列表 ",-1))]),_:1})]),_:1})]),default:Q(()=>[z(J,{type:l.value?"danger":"info",class:"control-btn dropdown-btn",size:"large"},{default:Q(()=>[z(O,{class:"el-icon--right"},{default:Q(()=>[z(gt(tr))]),_:1})]),_:1},8,["type"])]),_:1})]),x("div",Wp,[z(J,{onClick:_l,type:d.value?"danger":"info",class:"control-btn microphone-btn",size:"large"},{default:Q(()=>[he(le(d.value?"关闭麦克风":"开启麦克风"),1)]),_:1},8,["type"]),z(er,{trigger:"click",onCommand:Gc,onVisibleChange:gn,class:"control-dropdown microphone-dropdown"},{dropdown:Q(()=>[z(Zs,null,{default:Q(()=>[($(!0),Y(ai,null,oi(y.value,ee=>($(),Fe(Si,{key:ee.deviceId,command:ee.deviceId,class:Te({"selected-device":_.value===ee.deviceId})},{default:Q(()=>[h[12]||(h[12]=x("i",{class:"el-icon-microphone"},null,-1)),he(" "+le(ee.label||`麦克风 ${y.value.indexOf(ee)+1}`)+" ",1),_.value===ee.deviceId?($(),Fe(O,{key:0,class:"check-icon"},{default:Q(()=>[z(gt(ir))]),_:1})):ue("",!0)]),_:2},1032,["command","class"]))),128)),z(Si,{divided:"",command:"refresh"},{default:Q(()=>[z(O,null,{default:Q(()=>[z(gt(nr))]),_:1}),h[13]||(h[13]=he(" 刷新设备列表 ",-1))]),_:1})]),_:1})]),default:Q(()=>[z(J,{type:d.value?"danger":"info",class:"control-btn dropdown-btn",size:"large"},{default:Q(()=>[z(O,{class:"el-icon--right"},{default:Q(()=>[z(gt(tr))]),_:1})]),_:1},8,["type"])]),_:1})]),z(J,{onClick:wl,type:f.value?"danger":I.value?"primary":"info",disabled:I.value&&!f.value||!nc.value,class:"control-btn",size:"large"},{default:Q(()=>[f.value?($(),Y("span",zp,"停止共享")):I.value?($(),Y("span",Hp,"他人共享中")):($(),Y("span",Jp,"共享屏幕"))]),_:1},8,["type","disabled"]),z(J,{onClick:nl,type:M.value?"danger":"info",class:"control-btn",size:"large"},{default:Q(()=>[he(le(M.value?"退出白板":"共享白板"),1)]),_:1},8,["type"]),z(J,{onClick:wc,type:B.value?"danger":"info",disabled:!Ns.value,class:"control-btn",size:"large"},{default:Q(()=>[he(le(B.value?"关闭激光笔":"激光笔"),1)]),_:1},8,["type","disabled"]),z(J,{onClick:qc,type:"info",class:"control-btn",size:"large"},{default:Q(()=>[...h[14]||(h[14]=[he(" 文件 ",-1)])]),_:1}),z(J,{onClick:tl,type:"info",class:"control-btn",size:"large"},{default:Q(()=>[...h[15]||(h[15]=[he(" 邀请人员 ",-1)])]),_:1}),z(J,{onClick:Rl,type:"info",class:"control-btn",size:"large"},{default:Q(()=>[...h[16]||(h[16]=[he(" 离开会议 ",-1)])]),_:1})])])])),z(Bf,{ref_key:"inviterJoinRoomRef",ref:q,onConfirmSelection:il},null,512),z(ip,{ref_key:"fileListRef",ref:ws,roomId:a.value},null,8,["roomId"])])]))}}},sm=Yi(Qp,[["__scopeId","data-v-42ecdcb9"]]);export{sm as default};
diff --git a/dist/assets/index-CybmVna1.js.gz b/dist/assets/index-CybmVna1.js.gz
deleted file mode 100644
index 17aca3f..0000000
Binary files a/dist/assets/index-CybmVna1.js.gz and /dev/null differ
diff --git a/dist/assets/index-D79yuk_J.js b/dist/assets/index-D79yuk_J.js
deleted file mode 100644
index b3305f7..0000000
--- a/dist/assets/index-D79yuk_J.js
+++ /dev/null
@@ -1 +0,0 @@
-/* empty css */import{_ as S,r as f,b as B,c as u,d as i,w as l,e as v,o as s,f as a,t as m,F as g,g as _,h as r,E as d}from"./index-nRSe4xNB.js";const E={class:"call-wrapper"},F={class:"avatar-section"},U=["src"],T={class:"user-name"},D={class:"status-text"},I={class:"control-section"},M={__name:"index",props:{mode:{type:String,default:"call"},avatarUrl:{type:String,default:"https://cdn-icons-png.flaticon.com/512/1946/1946429.png"},userName:{type:String,default:"对方用户"}},setup(o,{expose:y}){const k=o,n=f(!1),t=f("calling"),b=B(()=>k.mode==="call"?t.value==="calling"?"正在呼叫对方...":t.value==="active"?"通话中":"通话结束":t.value==="active"?"通话中":"对方来电...");function x(){t.value="active",d.success("开始通话")}function C(){t.value="active",d.success("已接听")}function p(){t.value="ended",d.error("通话已结束")}function h(){n.value=!1}function V(){n.value=!0}return y({show:V}),(j,e)=>{const c=v("el-button"),w=v("el-dialog");return s(),u("div",null,[i(w,{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=N=>n.value=N),width:"80%","show-close":!1,"destroy-on-close":!0,modal:!1,"lock-scroll":!0,"before-close":h,class:"call-dialog"},{default:l(()=>[a("div",E,[a("div",F,[a("img",{class:"avatar",src:o.avatarUrl,alt:"头像"},null,8,U),a("div",T,m(o.userName),1),a("div",D,m(b.value),1)]),a("div",I,[o.mode==="call"?(s(),u(g,{key:0},[t.value==="calling"?(s(),_(c,{key:0,type:"danger",round:"",class:"control-btn hangup",onClick:p},{default:l(()=>[...e[1]||(e[1]=[r(" 挂断 ",-1)])]),_:1})):(s(),_(c,{key:1,type:"primary",round:"",class:"control-btn call",onClick:x},{default:l(()=>[...e[2]||(e[2]=[r(" 呼叫中... ",-1)])]),_:1}))],64)):(s(),u(g,{key:1},[i(c,{type:"success",round:"",class:"control-btn accept",onClick:C},{default:l(()=>[...e[3]||(e[3]=[r(" 接听 ",-1)])]),_:1}),i(c,{type:"danger",round:"",class:"control-btn hangup",onClick:p},{default:l(()=>[...e[4]||(e[4]=[r(" 挂断 ",-1)])]),_:1})],64))])])]),_:1},8,["modelValue"])])}}},A=S(M,[["__scopeId","data-v-6baeba6a"]]);export{A as default};
diff --git a/dist/assets/index-D79yuk_J.js.gz b/dist/assets/index-D79yuk_J.js.gz
deleted file mode 100644
index c08ae8b..0000000
Binary files a/dist/assets/index-D79yuk_J.js.gz and /dev/null differ
diff --git a/dist/assets/index-BTCuff5d.js b/dist/assets/index-DPF0UxJm.js
similarity index 98%
rename from dist/assets/index-BTCuff5d.js
rename to dist/assets/index-DPF0UxJm.js
index 615f7b0..a7e6a45 100644
--- a/dist/assets/index-BTCuff5d.js
+++ b/dist/assets/index-DPF0UxJm.js
@@ -1 +1 @@
-import{A as Y,d as Z,g as ee,r as m,b as P,t as te,e as le,c as oe,f as e,w as l,T as ne,h as r,i as n,j as ae,o as A,k as f,l as se,m as ie,q as re,p as v,E as de,s as h}from"./index-DyWI3x4X.js";import{d as ue,u as pe,a as me}from"./menu-DaF34q_h.js";const L=T=>Y({url:"/api/v1/permission/permissions/tree",method:"get",params:T}),ce={class:"p-2"},_e={class:"mb-[10px]"},fe={class:"dialog-footer"},ve=Z({name:"menuManagement"}),ge=Object.assign(ve,{setup(T){const{proxy:be}=ee(),q=m([]),y=m(!0),g=m([]),N=m(!1),d=P({visible:!1,title:""}),O=m(),w=m(),S=m(),E={permission_name:"",permission_type:2,permission_code:"",resource_path:"",http_method:"",description:"",parent_uid:""},j=P({form:{...E},queryParams:{permission_types:"2"},rules:{permission_name:[{required:!0,message:"接口名称不能为空",trigger:"blur"}],permission_code:[{required:!0,message:"权限标识不能为空",trigger:"blur"}],permission_type:[{required:!0,message:"接口类型不能为空",trigger:"change"}]}}),{queryParams:V,form:a,rules:G}=te(j),k=async()=>{y.value=!0;const o=await L(V.value);q.value=o.data,y.value=!1},M=async()=>{g.value=[];const o=await L(V.value),t={uid:"0",permission_name:"主类目",children:[]};t.children=o.data,g.value.push(t)},I=()=>{d.visible=!1},U=()=>{var o;a.value={...E},(o=w.value)==null||o.resetFields()},B=o=>{U(),M(),o&&o.uid?a.value.parent_uid=o.uid:a.value.parent_uid="",d.visible=!0,d.title="添加接口"},z=async o=>{U(),await M(),o.parent_uid==""&&(o.parent_uid="0"),a.value=o,d.visible=!0,d.title="修改接口"},H=()=>{var o;try{(o=w.value)==null||o.validate(async t=>{t&&(a.value.uid?await pe(a.value):await me(a.value),h.success("操作成功"),d.visible=!1,await k())})}catch{h.error("操作失败")}},J=async o=>{try{await de.confirm(`确认要删除"${o.permission_name}"的数据项?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});const t=o==null?void 0:o.uid,i=await ue(t);if(i.meta.code!==200){h.error(i.data.message);return}await k(),h.success(`${o.permission_name}权限删除成功`)}catch(t){const i=(t==null?void 0:t.toString())||"";if(i.includes("cancel")||i.includes("取消")||i==="cancel"||t==="cancel"||i.includes("close")||t==="close")return;h.error(`${o.permission_name}权限删除失败`)}};return le(()=>{k()}),(o,t)=>{const i=r("el-form-item"),D=r("el-form"),F=r("el-card"),c=r("el-button"),u=r("el-col"),R=r("el-row"),p=r("el-table-column"),_=r("el-tooltip"),K=r("el-table"),Q=r("el-tree-select"),b=r("el-input"),x=r("question-filled"),C=r("el-icon"),W=r("el-dialog"),X=ae("loading");return A(),oe("div",ce,[e(ne,null,{default:l(()=>[f("div",_e,[e(F,{shadow:"hover"},{default:l(()=>[e(D,{ref_key:"queryFormRef",ref:O,model:n(V),inline:!0,"label-width":"68px"},{default:l(()=>[e(i)]),_:1},8,["model"])]),_:1})])]),_:1}),e(F,{shadow:"hover"},{header:l(()=>[e(R,{gutter:10},{default:l(()=>[e(u,{span:1.5},{default:l(()=>[e(c,{type:"primary",plain:"",icon:"Plus",onClick:t[0]||(t[0]=s=>B())},{default:l(()=>[...t[8]||(t[8]=[v("新增 ",-1)])]),_:1})]),_:1})]),_:1})]),default:l(()=>[se((A(),ie(K,{data:n(q),"row-key":"uid","tree-props":{children:"children",hasChildren:"hasChildren"},ref_key:"menuTableRef",ref:S,"default-expand-all":n(N)},{default:l(()=>[e(p,{prop:"permission_name",label:"接口名称","show-overflow-tooltip":!0,width:"160"}),e(p,{prop:"permission_code",label:"权限标识","show-overflow-tooltip":!0}),e(p,{prop:"resource_path",label:"组件路径","show-overflow-tooltip":!0}),e(p,{prop:"description",label:"权限描述","show-overflow-tooltip":!0}),e(p,{prop:"http_method",label:"请求方式","show-overflow-tooltip":!0,width:"80"}),e(p,{label:"创建时间",align:"center",prop:"createTime"},{default:l(s=>[f("span",null,re(o.parseTime(s.row.created_at)),1)]),_:1}),e(p,{fixed:"right",label:"操作",width:"180"},{default:l(s=>[e(_,{content:"修改",placement:"top"},{default:l(()=>[e(c,{link:"",type:"primary",icon:"Edit",onClick:$=>z(s.row)},null,8,["onClick"])]),_:2},1024),e(_,{content:"新增",placement:"top"},{default:l(()=>[e(c,{link:"",type:"primary",icon:"Plus",onClick:$=>B(s.row)},null,8,["onClick"])]),_:2},1024),e(_,{content:"删除",placement:"top"},{default:l(()=>[e(c,{link:"",type:"primary",icon:"Delete",onClick:$=>J(s.row)},null,8,["onClick"])]),_:2},1024)]),_:1})]),_:1},8,["data","default-expand-all"])),[[X,n(y)]])]),_:1}),e(W,{title:n(d).title,modelValue:n(d).visible,"onUpdate:modelValue":t[7]||(t[7]=s=>n(d).visible=s),"destroy-on-close":"","append-to-body":"",width:"750px"},{footer:l(()=>[f("div",fe,[e(c,{type:"primary",onClick:H},{default:l(()=>[...t[12]||(t[12]=[v("确 定",-1)])]),_:1}),e(c,{onClick:I},{default:l(()=>[...t[13]||(t[13]=[v("取 消",-1)])]),_:1})])]),default:l(()=>[e(D,{ref_key:"menuFormRef",ref:w,model:n(a),rules:n(G),"label-width":"100px"},{default:l(()=>[e(R,null,{default:l(()=>[e(u,{span:24},{default:l(()=>[e(i,{label:"上级接口"},{default:l(()=>[e(Q,{modelValue:n(a).parent_uid,"onUpdate:modelValue":t[1]||(t[1]=s=>n(a).parent_uid=s),data:n(g),props:{value:"uid",label:"permission_name",children:"children"},"value-key":"uid",placeholder:"选择上级接口","check-strictly":"",style:{width:"100%"}},null,8,["modelValue","data"])]),_:1})]),_:1}),e(u,{span:24},{default:l(()=>[e(i,{label:"接口名称",prop:"permission_name"},{default:l(()=>[e(b,{modelValue:n(a).permission_name,"onUpdate:modelValue":t[2]||(t[2]=s=>n(a).permission_name=s),placeholder:"请输入接口名称"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:24},{default:l(()=>[e(i,{prop:"permission_code"},{label:l(()=>[f("span",null,[e(_,{content:"控制器中定义的权限字符,如:xsy-delete-role')",placement:"top"},{default:l(()=>[e(C,null,{default:l(()=>[e(x)]),_:1})]),_:1}),t[9]||(t[9]=v(" 权限字符 ",-1))])]),default:l(()=>[e(b,{modelValue:n(a).permission_code,"onUpdate:modelValue":t[3]||(t[3]=s=>n(a).permission_code=s),placeholder:"请输入权限标识",maxlength:"100"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:24},{default:l(()=>[e(i,{prop:"resource_path"},{label:l(()=>[f("span",null,[e(_,{content:"接口路径,如:`/permission/roles/:role_uid`",placement:"top"},{default:l(()=>[e(C,null,{default:l(()=>[e(x)]),_:1})]),_:1}),t[10]||(t[10]=v(" 接口 路径 ",-1))])]),default:l(()=>[e(b,{modelValue:n(a).resource_path,"onUpdate:modelValue":t[4]||(t[4]=s=>n(a).resource_path=s),placeholder:"请输入接口路径"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:24},{default:l(()=>[e(i,{prop:"http_method"},{label:l(()=>[f("span",null,[e(_,{content:"请求方法,如:`GET`、`POST`、`PUT`、`DELETE`等",placement:"top"},{default:l(()=>[e(C,null,{default:l(()=>[e(x)]),_:1})]),_:1}),t[11]||(t[11]=v(" 请求方法 ",-1))])]),default:l(()=>[e(b,{modelValue:n(a).http_method,"onUpdate:modelValue":t[5]||(t[5]=s=>n(a).http_method=s),placeholder:"请输入请求方法"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:24},{default:l(()=>[e(i,{label:"权限描述",prop:"description"},{default:l(()=>[e(b,{modelValue:n(a).description,"onUpdate:modelValue":t[6]||(t[6]=s=>n(a).description=s),type:"textarea",placeholder:"请输入权限描述"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title","modelValue"])])}}});export{ge as default};
+import{A as Y,d as Z,g as ee,r as m,b as P,t as te,e as le,c as oe,f as e,w as l,T as ne,h as r,i as n,j as ae,o as A,k as f,l as se,m as ie,q as re,p as v,E as de,s as h}from"./index-DRNenl-T.js";import{d as ue,u as pe,a as me}from"./menu-Ca_cGcaO.js";const L=T=>Y({url:"/api/v1/permission/permissions/tree",method:"get",params:T}),ce={class:"p-2"},_e={class:"mb-[10px]"},fe={class:"dialog-footer"},ve=Z({name:"menuManagement"}),ge=Object.assign(ve,{setup(T){const{proxy:be}=ee(),q=m([]),y=m(!0),g=m([]),N=m(!1),d=P({visible:!1,title:""}),O=m(),w=m(),S=m(),E={permission_name:"",permission_type:2,permission_code:"",resource_path:"",http_method:"",description:"",parent_uid:""},j=P({form:{...E},queryParams:{permission_types:"2"},rules:{permission_name:[{required:!0,message:"接口名称不能为空",trigger:"blur"}],permission_code:[{required:!0,message:"权限标识不能为空",trigger:"blur"}],permission_type:[{required:!0,message:"接口类型不能为空",trigger:"change"}]}}),{queryParams:V,form:a,rules:G}=te(j),k=async()=>{y.value=!0;const o=await L(V.value);q.value=o.data,y.value=!1},M=async()=>{g.value=[];const o=await L(V.value),t={uid:"0",permission_name:"主类目",children:[]};t.children=o.data,g.value.push(t)},I=()=>{d.visible=!1},U=()=>{var o;a.value={...E},(o=w.value)==null||o.resetFields()},B=o=>{U(),M(),o&&o.uid?a.value.parent_uid=o.uid:a.value.parent_uid="",d.visible=!0,d.title="添加接口"},z=async o=>{U(),await M(),o.parent_uid==""&&(o.parent_uid="0"),a.value=o,d.visible=!0,d.title="修改接口"},H=()=>{var o;try{(o=w.value)==null||o.validate(async t=>{t&&(a.value.uid?await pe(a.value):await me(a.value),h.success("操作成功"),d.visible=!1,await k())})}catch{h.error("操作失败")}},J=async o=>{try{await de.confirm(`确认要删除"${o.permission_name}"的数据项?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});const t=o==null?void 0:o.uid,i=await ue(t);if(i.meta.code!==200){h.error(i.data.message);return}await k(),h.success(`${o.permission_name}权限删除成功`)}catch(t){const i=(t==null?void 0:t.toString())||"";if(i.includes("cancel")||i.includes("取消")||i==="cancel"||t==="cancel"||i.includes("close")||t==="close")return;h.error(`${o.permission_name}权限删除失败`)}};return le(()=>{k()}),(o,t)=>{const i=r("el-form-item"),D=r("el-form"),F=r("el-card"),c=r("el-button"),u=r("el-col"),R=r("el-row"),p=r("el-table-column"),_=r("el-tooltip"),K=r("el-table"),Q=r("el-tree-select"),b=r("el-input"),x=r("question-filled"),C=r("el-icon"),W=r("el-dialog"),X=ae("loading");return A(),oe("div",ce,[e(ne,null,{default:l(()=>[f("div",_e,[e(F,{shadow:"hover"},{default:l(()=>[e(D,{ref_key:"queryFormRef",ref:O,model:n(V),inline:!0,"label-width":"68px"},{default:l(()=>[e(i)]),_:1},8,["model"])]),_:1})])]),_:1}),e(F,{shadow:"hover"},{header:l(()=>[e(R,{gutter:10},{default:l(()=>[e(u,{span:1.5},{default:l(()=>[e(c,{type:"primary",plain:"",icon:"Plus",onClick:t[0]||(t[0]=s=>B())},{default:l(()=>[...t[8]||(t[8]=[v("新增 ",-1)])]),_:1})]),_:1})]),_:1})]),default:l(()=>[se((A(),ie(K,{data:n(q),"row-key":"uid","tree-props":{children:"children",hasChildren:"hasChildren"},ref_key:"menuTableRef",ref:S,"default-expand-all":n(N)},{default:l(()=>[e(p,{prop:"permission_name",label:"接口名称","show-overflow-tooltip":!0,width:"160"}),e(p,{prop:"permission_code",label:"权限标识","show-overflow-tooltip":!0}),e(p,{prop:"resource_path",label:"组件路径","show-overflow-tooltip":!0}),e(p,{prop:"description",label:"权限描述","show-overflow-tooltip":!0}),e(p,{prop:"http_method",label:"请求方式","show-overflow-tooltip":!0,width:"80"}),e(p,{label:"创建时间",align:"center",prop:"createTime"},{default:l(s=>[f("span",null,re(o.parseTime(s.row.created_at)),1)]),_:1}),e(p,{fixed:"right",label:"操作",width:"180"},{default:l(s=>[e(_,{content:"修改",placement:"top"},{default:l(()=>[e(c,{link:"",type:"primary",icon:"Edit",onClick:$=>z(s.row)},null,8,["onClick"])]),_:2},1024),e(_,{content:"新增",placement:"top"},{default:l(()=>[e(c,{link:"",type:"primary",icon:"Plus",onClick:$=>B(s.row)},null,8,["onClick"])]),_:2},1024),e(_,{content:"删除",placement:"top"},{default:l(()=>[e(c,{link:"",type:"primary",icon:"Delete",onClick:$=>J(s.row)},null,8,["onClick"])]),_:2},1024)]),_:1})]),_:1},8,["data","default-expand-all"])),[[X,n(y)]])]),_:1}),e(W,{title:n(d).title,modelValue:n(d).visible,"onUpdate:modelValue":t[7]||(t[7]=s=>n(d).visible=s),"destroy-on-close":"","append-to-body":"",width:"750px"},{footer:l(()=>[f("div",fe,[e(c,{type:"primary",onClick:H},{default:l(()=>[...t[12]||(t[12]=[v("确 定",-1)])]),_:1}),e(c,{onClick:I},{default:l(()=>[...t[13]||(t[13]=[v("取 消",-1)])]),_:1})])]),default:l(()=>[e(D,{ref_key:"menuFormRef",ref:w,model:n(a),rules:n(G),"label-width":"100px"},{default:l(()=>[e(R,null,{default:l(()=>[e(u,{span:24},{default:l(()=>[e(i,{label:"上级接口"},{default:l(()=>[e(Q,{modelValue:n(a).parent_uid,"onUpdate:modelValue":t[1]||(t[1]=s=>n(a).parent_uid=s),data:n(g),props:{value:"uid",label:"permission_name",children:"children"},"value-key":"uid",placeholder:"选择上级接口","check-strictly":"",style:{width:"100%"}},null,8,["modelValue","data"])]),_:1})]),_:1}),e(u,{span:24},{default:l(()=>[e(i,{label:"接口名称",prop:"permission_name"},{default:l(()=>[e(b,{modelValue:n(a).permission_name,"onUpdate:modelValue":t[2]||(t[2]=s=>n(a).permission_name=s),placeholder:"请输入接口名称"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:24},{default:l(()=>[e(i,{prop:"permission_code"},{label:l(()=>[f("span",null,[e(_,{content:"控制器中定义的权限字符,如:xsy-delete-role')",placement:"top"},{default:l(()=>[e(C,null,{default:l(()=>[e(x)]),_:1})]),_:1}),t[9]||(t[9]=v(" 权限字符 ",-1))])]),default:l(()=>[e(b,{modelValue:n(a).permission_code,"onUpdate:modelValue":t[3]||(t[3]=s=>n(a).permission_code=s),placeholder:"请输入权限标识",maxlength:"100"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:24},{default:l(()=>[e(i,{prop:"resource_path"},{label:l(()=>[f("span",null,[e(_,{content:"接口路径,如:`/permission/roles/:role_uid`",placement:"top"},{default:l(()=>[e(C,null,{default:l(()=>[e(x)]),_:1})]),_:1}),t[10]||(t[10]=v(" 接口 路径 ",-1))])]),default:l(()=>[e(b,{modelValue:n(a).resource_path,"onUpdate:modelValue":t[4]||(t[4]=s=>n(a).resource_path=s),placeholder:"请输入接口路径"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:24},{default:l(()=>[e(i,{prop:"http_method"},{label:l(()=>[f("span",null,[e(_,{content:"请求方法,如:`GET`、`POST`、`PUT`、`DELETE`等",placement:"top"},{default:l(()=>[e(C,null,{default:l(()=>[e(x)]),_:1})]),_:1}),t[11]||(t[11]=v(" 请求方法 ",-1))])]),default:l(()=>[e(b,{modelValue:n(a).http_method,"onUpdate:modelValue":t[5]||(t[5]=s=>n(a).http_method=s),placeholder:"请输入请求方法"},null,8,["modelValue"])]),_:1})]),_:1}),e(u,{span:24},{default:l(()=>[e(i,{label:"权限描述",prop:"description"},{default:l(()=>[e(b,{modelValue:n(a).description,"onUpdate:modelValue":t[6]||(t[6]=s=>n(a).description=s),type:"textarea",placeholder:"请输入权限描述"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title","modelValue"])])}}});export{ge as default};
diff --git a/dist/assets/index-DPF0UxJm.js.gz b/dist/assets/index-DPF0UxJm.js.gz
new file mode 100644
index 0000000..ede4623
Binary files /dev/null and b/dist/assets/index-DPF0UxJm.js.gz differ
diff --git a/dist/assets/index-DyWI3x4X.js b/dist/assets/index-DRNenl-T.js
similarity index 99%
rename from dist/assets/index-DyWI3x4X.js
rename to dist/assets/index-DRNenl-T.js
index a2cf773..c20eb52 100644
--- a/dist/assets/index-DyWI3x4X.js
+++ b/dist/assets/index-DRNenl-T.js
@@ -1,4 +1,4 @@
-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./login-X-xHawH5.js","./login-C2MWIt8z.css","./index-CiEK6-Lk.js","./role-e2W5ZQl3.js","./menu-DaF34q_h.js","./index-DzgyBp0k.js","./index-CeULEb6a.js","./room-CCkgiVs_.js","./index-BTCuff5d.js","./authRoom-BBxwRGru.js","./authRole-WYvqp_Mv.js","./404-BS97o3Mb.js","./404-Cb2yUGol.css","./401-B78AUXmB.js","./401-BSBdQqy4.css"])))=>i.map(i=>d[i]);
+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./login-dH8WbfOy.js","./login-C2MWIt8z.css","./index-CkP6b1E2.js","./role-zDKXfY8i.js","./menu-Ca_cGcaO.js","./index-27WP78gO.js","./index-B9qSM1WT.js","./room-DnQmkEzy.js","./index-DPF0UxJm.js","./authRoom-ScM_P5Lw.js","./authRole-BGeC_BV4.js","./404-C8Inh8VK.js","./404-Cb2yUGol.css","./401-DO7f-liB.js","./401-BSBdQqy4.css"])))=>i.map(i=>d[i]);
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&o(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function o(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();/**
* @vue/shared v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
@@ -77,4 +77,4 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./login-X-xHawH5.js","
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/const Ja=typeof document<"u";function rb(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ywe(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&rb(e.default)}const Ot=Object.assign;function jd(e,t){const n={};for(const o in t){const r=t[o];n[o]=So(r)?r.map(e):e(r)}return n}const xs=()=>{},So=Array.isArray,ab=/#/g,Gwe=/&/g,Xwe=/\//g,Jwe=/=/g,Zwe=/\?/g,lb=/\+/g,Qwe=/%5B/g,e9e=/%5D/g,sb=/%5E/g,t9e=/%60/g,ib=/%7B/g,n9e=/%7C/g,ub=/%7D/g,o9e=/%20/g;function Lp(e){return encodeURI(""+e).replace(n9e,"|").replace(Qwe,"[").replace(e9e,"]")}function r9e(e){return Lp(e).replace(ib,"{").replace(ub,"}").replace(sb,"^")}function z0(e){return Lp(e).replace(lb,"%2B").replace(o9e,"+").replace(ab,"%23").replace(Gwe,"%26").replace(t9e,"`").replace(ib,"{").replace(ub,"}").replace(sb,"^")}function a9e(e){return z0(e).replace(Jwe,"%3D")}function l9e(e){return Lp(e).replace(ab,"%23").replace(Zwe,"%3F")}function s9e(e){return e==null?"":l9e(e).replace(Xwe,"%2F")}function oi(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const i9e=/\/$/,u9e=e=>e.replace(i9e,"");function Wd(e,t,n="/"){let o,r={},a="",l="";const s=t.indexOf("#");let u=t.indexOf("?");return s=0&&(u=-1),u>-1&&(o=t.slice(0,u),a=t.slice(u+1,s>-1?s:t.length),r=e(a)),s>-1&&(o=o||t.slice(0,s),l=t.slice(s,t.length)),o=p9e(o??t,n),{fullPath:o+(a&&"?")+a+l,path:o,query:r,hash:oi(l)}}function c9e(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function $m(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function d9e(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Al(t.matched[o],n.matched[r])&&cb(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Al(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function cb(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!f9e(e[n],t[n]))return!1;return!0}function f9e(e,t){return So(e)?Sm(e,t):So(t)?Sm(t,e):e===t}function Sm(e,t){return So(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function p9e(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let a=n.length-1,l,s;for(l=0;l"u")){l=ji({},t,l),typeof l.expires=="number"&&(l.expires=new Date(Date.now()+l.expires*864e5)),l.expires&&(l.expires=l.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var u in l)l[u]&&(s+="; "+u,l[u]!==!0&&(s+="="+l[u].split(";")[0]));return document.cookie=r+"="+e.write(a,r)+s}}function o(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var a=document.cookie?document.cookie.split("; "):[],l={},s=0;s"u")){l=ji({},t,l),typeof l.expires=="number"&&(l.expires=new Date(Date.now()+l.expires*864e5)),l.expires&&(l.expires=l.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var u in l)l[u]&&(s+="; "+u,l[u]!==!0&&(s+="="+l[u].split(";")[0]));return document.cookie=r+"="+e.write(a,r)+s}}function o(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var a=document.cookie?document.cookie.split("; "):[],l={},s=0;s>>0?1:0),X=l.low=X+s0,l.high=O+d0+(X>>>0
>>24)&16711935|(E<<24|E>>>8)&4278255360,l=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;var A=t[i];A.high^=l,A.low^=E}for(var _=0;_<24;_++){for(var S=0;S<5;S++){for(var v=0,F=0,y=0;y<5;y++){var A=t[S+5*y];v^=A.high,F^=A.low}var g=o[S];g.high=v,g.low=F}for(var S=0;S<5;S++)for(var z=o[(S+4)%5],q=o[(S+1)%5],P=q.high,U=q.low,v=z.high^(P<<1|U>>>31),F=z.low^(U<<1|P>>>31),y=0;y<5;y++){var A=t[S+5*y];A.high^=v,A.low^=F}for(var N=1;N<25;N++){var v,F,A=t[N],O=A.high,X=A.low,b=u[N];b<32?(v=O<>>32-b,F=X<>>32-b):(v=X<lD(s)(()=>{const u=ln(),c=iT(u,s),f=e.onlyIfParent&&!c?new ei:sT({parentSpan:c,spanArguments:r,forceTransaction:o,scope:u});return fu(u,f),rD(()=>t(f),()=>{const{status:p}=Yt(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:Hn,message:"internal_error"})},()=>{f.end()})}))}function ti(e){const t=e4();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=aT(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?a=>R0(e.scope,a):o!==void 0?a=>Zy(o,a):a=>a())(()=>{const a=ln(),i=iT(a,o);return e.onlyIfParent&&!i?new ei:sT({parentSpan:i,spanArguments:n,forceTransaction:r,scope:a})})}function Zy(e,t){const n=e4();return n.withActiveSpan?n.withActiveSpan(e,t):R0(r=>(fu(r,e||void 0),t(r)))}function sT({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!ho()){const a=new ei;if(n||!e){const i={sampled:"false",sample_rate:"0",transaction:t.name,...Qs(a)};dp(a,i)}return a}const o=ms();let s;if(e&&!n)s=iD(e,r,t),Qk(e,s);else if(e){const a=Qs(e),{traceId:i,spanId:l}=e.spanContext(),u=ui(e);s=z6({traceId:i,parentSpanId:l,...t},r,u),dp(s,a)}else{const{traceId:a,dsc:i,parentSpanId:l,sampled:u}={...o.getPropagationContext(),...r.getPropagationContext()};s=z6({traceId:a,parentSpanId:l,...t},r,u),i&&dp(s,i)}return QB(s),cB(s,r,o),s}function aT(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=zi(e.startTime),delete r.startTime,r}return n}function e4(){const e=al();return Wu(e)}function z6(e,t,n){var m;const r=Jt(),o=(r==null?void 0:r.getOptions())||{},{name:s=""}=e,a={spanAttributes:{...e.attributes},spanName:s,parentSampled:n};r==null||r.emit("beforeSampling",a,{decision:!1});const i=a.parentSampled??n,l=a.spanAttributes,u=t.getPropagationContext(),[c,d,f]=t.getScopeData().sdkProcessingMetadata[oT]?[!1]:sD(o,{name:s,parentSampled:i,attributes:l,parentSampleRate:Xi((m=u.dsc)==null?void 0:m.sample_rate)},u.sampleRand),p=new P0({...e,attributes:{[Nr]:"custom",[Ky]:d!==void 0&&f?d:void 0,...l},sampled:c});return!c&&r&&(Tt&&it.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",p),p}function iD(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),s=t.getScopeData().sdkProcessingMetadata[oT]?!1:ui(e),a=s?new P0({...n,parentSpanId:r,traceId:o,sampled:s}):new ei({traceId:o});Qk(e,a);const i=Jt();return i&&(i.emit("spanStart",a),n.endTimestamp&&i.emit("spanEnd",a)),a}function iT(e,t){if(t)return t;if(t===null)return;const n=Ah(e);if(!n)return;const r=Jt();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?nr(n):n}function lD(e){return e!==void 0?t=>Zy(e,t):t=>t()}const fp={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},uD="heartbeatFailed",cD="idleTimeout",dD="finalTimeout",fD="externalFinish";function lT(e,t={}){const n=new Map;let r=!1,o,s=fD,a=!t.disableAutoFinish;const i=[],{idleTimeout:l=fp.idleTimeout,finalTimeout:u=fp.finalTimeout,childSpanTimeout:c=fp.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:f=!0}=t,p=Jt();if(!p||!ho()){const T=new ei,C={sample_rate:"0",sampled:"false",...Qs(T)};return dp(T,C),T}const m=ln(),v=sr(),g=pD(e);g.end=new Proxy(g.end,{apply(T,C,$){if(d&&d(g),C instanceof ei)return;const[x,...N]=$,I=x||Pn(),L=zi(I),F=cp(g).filter(q=>q!==g),B=Yt(g);if(!F.length||!f)return E(L),Reflect.apply(T,C,[L,...N]);const U=p.getOptions().ignoreSpans,P=F==null?void 0:F.reduce((q,te)=>{const V=Yt(te);return!V.timestamp||U&&Oh(V,U)?q:q?Math.max(q,V.timestamp):V.timestamp},void 0),O=B.start_timestamp,H=Math.min(O?O+u/1e3:1/0,Math.max(O||-1/0,Math.min(L,P||1/0)));return E(H),Reflect.apply(T,C,[H,...N])}});function b(){o&&(clearTimeout(o),o=void 0)}function _(T){b(),o=setTimeout(()=>{!r&&n.size===0&&a&&(s=cD,g.end(T))},l)}function y(T){o=setTimeout(()=>{!r&&a&&(s=uD,g.end(T))},c)}function S(T){b(),n.set(T,!0);const C=Pn();y(C+c/1e3)}function w(T){if(n.has(T)&&n.delete(T),n.size===0){const C=Pn();_(C+l/1e3)}}function E(T){r=!0,n.clear(),i.forEach(L=>L()),fu(m,v);const C=Yt(g),{start_timestamp:$}=C;if(!$)return;C.data[pd]||g.setAttribute(pd,s),it.log(`[Tracing] Idle span "${C.op}" finished`);const N=cp(g).filter(L=>L!==g);let I=0;N.forEach(L=>{L.isRecording()&&(L.setStatus({code:Hn,message:"cancelled"}),L.end(T),Tt&&it.log("[Tracing] Cancelling span since span ended early",JSON.stringify(L,void 0,2)));const F=Yt(L),{timestamp:B=0,start_timestamp:U=0}=F,P=U<=T,O=(u+l)/1e3,H=B-U<=O;if(Tt){const q=JSON.stringify(L,void 0,2);P?H||it.log("[Tracing] Discarding span since it finished after idle span final timeout",q):it.log("[Tracing] Discarding span since it happened after idle span was finished",q)}(!H||!P)&&(RB(g,L),I++)}),I>0&&g.setAttribute("sentry.idle_span_discarded_spans",I)}return i.push(p.on("spanStart",T=>{if(r||T===g||Yt(T).timestamp||T instanceof P0&&T.isStandaloneSpan())return;cp(g).includes(T)&&S(T.spanContext().spanId)})),i.push(p.on("spanEnd",T=>{r||w(T.spanContext().spanId)})),i.push(p.on("idleSpanEnableAutoFinish",T=>{T===g&&(a=!0,_(),n.size&&y())})),t.disableAutoFinish||_(),setTimeout(()=>{r||(g.setStatus({code:Hn,message:"deadline_exceeded"}),s=dD,g.end())},u),g}function pD(e){const t=ti(e);return fu(ln(),t),Tt&&it.log("[Tracing] Started span is an idle span"),t}const Xm=0,F6=1,H6=2;function N0(e){return new hd(t=>{t(e)})}function t4(e){return new hd((t,n)=>{n(e)})}class hd{constructor(t){this._state=Xm,this._handlers=[],this._runExecutor(t)}then(t,n){return new hd((r,o)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(a){o(a)}},s=>{if(!n)o(s);else try{r(n(s))}catch(a){o(a)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new hd((n,r)=>{let o,s;return this.then(a=>{s=!1,o=a,t&&t()},a=>{s=!0,o=a,t&&t()}).then(()=>{if(s){r(o);return}n(o)})})}_executeHandlers(){if(this._state===Xm)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===F6&&n[1](this._value),this._state===H6&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,a)=>{if(this._state===Xm){if(ju(a)){a.then(r,o);return}this._state=s,this._value=a,this._executeHandlers()}},r=s=>{n(F6,s)},o=s=>{n(H6,s)};try{t(r,o)}catch(s){o(s)}}}function hD(e,t,n,r=0){try{const o=P2(t,n,e,r);return ju(o)?o:N0(o)}catch(o){return t4(o)}}function P2(e,t,n,r){const o=n[r];if(!e||!o)return e;const s=o({...e},t);return Tt&&s===null&&it.log(`Event processor "${o.id||"?"}" dropped event`),ju(s)?s.then(a=>P2(a,t,n,r+1)):P2(s,t,n,r+1)}function mD(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;vD(e,t),r&&yD(e,r),bD(e,n),gD(e,o),_D(e,s)}function V6(e,t){const{extra:n,tags:r,user:o,contexts:s,level:a,sdkProcessingMetadata:i,breadcrumbs:l,fingerprint:u,eventProcessors:c,attachments:d,propagationContext:f,transactionName:p,span:m}=t;Af(e,"extra",n),Af(e,"tags",r),Af(e,"user",o),Af(e,"contexts",s),e.sdkProcessingMetadata=Gd(e.sdkProcessingMetadata,i,2),a&&(e.level=a),p&&(e.transactionName=p),m&&(e.span=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function Af(e,t,n){e[t]=Gd(e[t],n,1)}function vD(e,t){const{extra:n,tags:r,user:o,contexts:s,level:a,transactionName:i}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),a&&(e.level=a),i&&e.type!=="transaction"&&(e.transaction=i)}function gD(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function _D(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function yD(e,t){e.contexts={trace:xB(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Qs(t),...e.sdkProcessingMetadata};const n=nr(t),r=Yt(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function bD(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}let ys,j6,U6,ka;function wD(e){const t=Xt._sentryDebugIds,n=Xt._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(ka&&r.length===j6&&o.length===U6)return ka;j6=r.length,U6=o.length,ka={},ys||(ys={});const s=(a,i)=>{for(const l of a){const u=i[l],c=ys==null?void 0:ys[l];if(c&&ka&&u)ka[c[0]]=u,ys&&(ys[l]=[c[0],u]);else if(u){const d=e(l);for(let f=d.length-1;f>=0;f--){const p=d[f],m=p==null?void 0:p.filename;if(m&&ka&&ys){ka[m]=u,ys[l]=[m,u];break}}}}};return t&&s(r,t),n&&s(o,n),ka}function uT(e,t,n,r,o,s){const{normalizeDepth:a=3,normalizeMaxBreadth:i=1e3}=e,l={...t,event_id:t.event_id||n.event_id||eo(),timestamp:t.timestamp||il()},u=n.integrations||e.integrations.map(g=>g.name);SD(l,e),kD(l,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&ED(l,e.stackParser);const c=$D(r,n.captureContext);n.mechanism&&cu(l,n.mechanism);const d=o?o.getEventProcessors():[],f=rB().getScopeData();if(s){const g=s.getScopeData();V6(f,g)}if(c){const g=c.getScopeData();V6(f,g)}const p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),mD(l,f);const m=[...d,...f.eventProcessors];return hD(m,l,n).then(g=>(g&&CD(g),typeof a=="number"&&a>0?TD(g,a,i):g))}function SD(e,t){const{environment:n,release:r,dist:o,maxValueLength:s=250}=t;e.environment=e.environment||n||Jy,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const a=e.request;a!=null&&a.url&&(a.url=Ih(a.url,s))}function ED(e,t){var r,o;const n=wD(t);(o=(r=e.exception)==null?void 0:r.values)==null||o.forEach(s=>{var a,i;(i=(a=s.stacktrace)==null?void 0:a.frames)==null||i.forEach(l=>{l.filename&&(l.debug_id=n[l.filename])})})}function CD(e){var r,o;const t={};if((o=(r=e.exception)==null?void 0:r.values)==null||o.forEach(s=>{var a,i;(i=(a=s.stacktrace)==null?void 0:a.frames)==null||i.forEach(l=>{l.debug_id&&(l.abs_path?t[l.abs_path]=l.debug_id:l.filename&&(t[l.filename]=l.debug_id),delete l.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([s,a])=>{n.push({type:"sourcemap",code_file:s,debug_id:a})})}function kD(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function TD(e,t,n){var o,s;if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(a=>({...a,...a.data&&{data:Io(a.data,t,n)}}))},...e.user&&{user:Io(e.user,t,n)},...e.contexts&&{contexts:Io(e.contexts,t,n)},...e.extra&&{extra:Io(e.extra,t,n)}};return(o=e.contexts)!=null&&o.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Io(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(a=>({...a,...a.data&&{data:Io(a.data,t,n)}}))),(s=e.contexts)!=null&&s.flags&&r.contexts&&(r.contexts.flags=Io(e.contexts.flags,3,n)),r}function $D(e,t){if(!t)return e;const n=e?e.clone():new ds;return n.update(t),n}function xD(e){if(e)return ID(e)?{captureContext:e}:MD(e)?{captureContext:e}:e}function ID(e){return e instanceof ds||typeof e=="function"}const AD=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function MD(e){return Object.keys(e).some(t=>AD.includes(t))}function L0(e,t){return ln().captureException(e,xD(t))}function cT(e,t){return ln().captureEvent(e,t)}function OD(e,t){ms().setContext(e,t)}function RD(){const e=Jt();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function PD(e){ms().addEventProcessor(e)}function W6(e){const t=ms(),n=ln(),{userAgent:r}=Xt.navigator||{},o=KL({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),s=t.getSession();return(s==null?void 0:s.status)==="ok"&&du(s,{status:"exited"}),dT(),t.setSession(o),o}function dT(){const e=ms(),n=ln().getSession()||e.getSession();n&&GL(n),fT(),e.setSession()}function fT(){const e=ms(),t=Jt(),n=e.getSession();n&&t&&t.captureSession(n)}function q6(e=!1){if(e){dT();return}fT()}const ND="7";function LD(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function BD(e){return`${LD(e)}${e.projectId}/envelope/`}function DD(e,t){const n={sentry_version:ND};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function zD(e,t,n){return t||`${BD(e)}?${DD(e,n)}`}const K6=[];function FD(e){const t={};return e.forEach(n=>{const{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function HD(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return FD(r)}function VD(e,t){const n={};return t.forEach(r=>{r&&pT(e,r,n)}),n}function G6(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function pT(e,t,n){if(n[t.name]){Tt&&it.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,K6.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),K6.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,s)=>r(o,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((s,a)=>r(s,a,e),{id:t.name});e.addEventProcessor(o)}Tt&&it.log(`Integration installed: ${t.name}`)}function jD(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function UD(e,t,n,r){const o={};return t!=null&&t.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=Ku(r)),ci(o,[jD(e)])}function hT(e,t){const n=t??WD(e)??[];if(n.length===0)return;const r=e.getOptions(),o=UD(n,r._metadata,r.tunnel,e.getDsn());mT().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function WD(e){return mT().get(e)}function mT(){return Hu("clientToLogBufferMap",()=>new WeakMap)}function qD(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function KD(e,t,n,r){const o={};return t!=null&&t.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=Ku(r)),ci(o,[qD(e)])}function vT(e,t){const n=t??GD(e)??[];if(n.length===0)return;const r=e.getOptions(),o=KD(n,r._metadata,r.tunnel,e.getDsn());gT().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function GD(e){return gT().get(e)}function gT(){return Hu("clientToMetricBufferMap",()=>new WeakMap)}function YD(e,t,n){const r=[{type:"client_report"},{timestamp:il(),discarded_events:e}];return ci(t?{dsn:t}:{},[r])}function _T(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function XD(e){var l;const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:a,op:i}=((l=e.contexts)==null?void 0:l.trace)??{};return{data:a??{},description:e.transaction,op:i,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:a==null?void 0:a[Gy],exclusive_time:a==null?void 0:a[qu],measurements:e.measurements,is_segment:!0}}function JD(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[Gy]:e.profile_id},...e.exclusive_time&&{[qu]:e.exclusive_time}}}},measurements:e.measurements}}const Y6="Not capturing exception because it's already been captured.",X6="Discarded session because of missing or non-string release",yT=Symbol.for("SentryInternalError"),bT=Symbol.for("SentryDoNotSendEventError"),QD=5e3;function pp(e){return{message:e,[yT]:!0}}function Jm(e){return{message:e,[bT]:!0}}function J6(e){return!!e&&typeof e=="object"&&yT in e}function Q6(e){return!!e&&typeof e=="object"&&bT in e}function Z6(e,t,n,r,o){let s=0,a;e.on(n,()=>{s=0,clearTimeout(a)}),e.on(t,i=>{s+=r(i),s>=8e5?o(e):(clearTimeout(a),a=setTimeout(()=>{o(e)},QD))}),e.on("flush",()=>{o(e)})}class ZD{constructor(t){var n;if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=EB(t.dsn):Tt&&it.warn("No DSN provided, client will not send events."),this._dsn){const r=zD(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs&&Z6(this,"afterCaptureLog","flushLogs",rz,hT),(n=this._options._experiments)!=null&&n.enableMetrics&&Z6(this,"afterCaptureMetric","flushMetrics",nz,vT)}captureException(t,n,r){const o=eo();if(C6(t))return Tt&&it.log(Y6),o;const s={event_id:o,...n};return this._process(this.eventFromException(t,s).then(a=>this._captureEvent(a,s,r))),s.event_id}captureMessage(t,n,r,o){const s={event_id:eo(),...r},a=Uy(t)?t:String(t),i=uu(t)?this.eventFromMessage(a,n,s):this.eventFromException(t,s);return this._process(i.then(l=>this._captureEvent(l,s,o))),s.event_id}captureEvent(t,n,r){const o=eo();if(n!=null&&n.originalException&&C6(n.originalException))return Tt&&it.log(Y6),o;const s={event_id:o,...n},a=t.sdkProcessingMetadata||{},i=a.capturedSpanScope,l=a.capturedSpanIsolationScope;return this._process(this._captureEvent(t,s,i||r,l)),s.event_id}captureSession(t){this.sendSession(t),du(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];pT(this,t,this._integrations),n||G6(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=XB(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=VB(r,qB(o));this.sendEnvelope(r).then(o=>this.emit("afterSendEvent",t,o))}sendSession(t){const{release:n,environment:r=Jy}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){Tt&&it.warn(X6);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){Tt&&it.warn(X6);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=YB(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const o=`${t}:${n}`;Tt&&it.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,o=(...s)=>n(...s);return r.add(o),()=>{r.delete(o)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return Tt&&it.error("Error while sending envelope:",n),{}}return Tt&&it.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=VD(this,t),G6(this,t)}_updateSessionFromEvent(t,n){var l;let r=n.level==="fatal",o=!1;const s=(l=n.exception)==null?void 0:l.values;if(s){o=!0;for(const u of s){const c=u.mechanism;if((c==null?void 0:c.handled)===!1){r=!0;break}}}const a=t.status==="ok";(a&&t.errors===0||a&&r)&&(du(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n{const t=sr();if(t){for(const n of e)if(n.name==="click"){const r=Mn(Vr()+n.startTime),o=Mn(n.duration),s={name:go(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[In]:"auto.ui.browser.metrics"}},a=Pk(n.target);a&&(s.attributes["ui.component_name"]=a),ri(t,r,r+o,s)}}})}function lH(){return f4(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ao.cls={value:e.value,unit:""},Dl=t)},!0)}function uH(){return p4(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ao.lcp={value:e.value,unit:"millisecond"},Rr=t)},!0)}function cH(){return UF(({metric:e})=>{e.entries[e.entries.length-1]&&(Ao.ttfb={value:e.value,unit:"millisecond"})})}function dH(e,t){const n=tf(),r=Vr();if(!(n!=null&&n.getEntries)||!r)return;const o=Mn(r),s=n.getEntries(),{op:a,start_timestamp:i}=Yt(e);s.slice(cw).forEach(l=>{const u=Mn(l.startTime),c=Mn(Math.max(0,l.duration));if(!(a==="navigation"&&i&&o+u{eD(l,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",o),e.setAttribute("performance.activationStart",Gu()),bH(e,t)),Rr=void 0,Dl=void 0,Ao={}}function fH(e){if((e==null?void 0:e.entryType)==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function pH(e,t,n,r,o,s){if(fH(t)||["mark","measure"].includes(t.entryType)&&Fs(t.name,s))return;const a=Qd(!1),i=Mn(a?a.requestStart:0),l=o+Math.max(n,i),u=o+n,c=u+r,d={[In]:"auto.resource.browser.metrics"};l!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=l),hH(d,t),l<=c&&ri(e,l,c,{name:t.name,op:t.entryType,attributes:d})}function hH(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,o]of Object.entries(n))if(o&&uu(o))e[`sentry.browser.measure.detail.${r}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(o)}catch{}return}if(uu(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function mH(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Rf(e,t,r,n)}),Rf(e,t,"secureConnection",n,"TLS/SSL"),Rf(e,t,"fetch",n,"cache"),Rf(e,t,"domainLookup",n,"DNS"),gH(e,t,n)}function Rf(e,t,n,r,o=n){const s=vH(n),a=t[s],i=t[`${n}Start`];!i||!a||ri(e,r+Mn(i),r+Mn(a),{op:`browser.${o}`,name:t.name,attributes:{[In]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function vH(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function gH(e,t,n){const r=n+Mn(t.requestStart),o=n+Mn(t.responseEnd),s=n+Mn(t.responseStart);t.responseEnd&&(ri(e,r,o,{op:"browser.request",name:t.name,attributes:{[In]:"auto.ui.browser.metrics"}}),ri(e,s,o,{op:"browser.response",name:t.name,attributes:{[In]:"auto.ui.browser.metrics"}}))}function _H(e,t,n,r,o,s,a){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const i=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(a!=null&&a.includes(i))return;const l={[In]:"auto.resource.browser.metrics"},u=Hi(n);u.protocol&&(l["url.scheme"]=u.protocol.split(":").pop()),u.host&&(l["server.address"]=u.host),l["url.same_origin"]=n.includes(Dt.location.origin),wH(t,l,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const c={...l,...YT(t)},d=s+r,f=d+o;ri(e,d,f,{name:n.replace(Dt.location.origin,""),op:i,attributes:c})}function yH(e){const t=Dt.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),nv(n.rtt)&&(Ao["connection.rtt"]={value:n.rtt,unit:"millisecond"})),nv(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),nv(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function bH(e,t){Rr&&t.recordLcpOnPageloadSpan&&(Rr.element&&e.setAttribute("lcp.element",go(Rr.element)),Rr.id&&e.setAttribute("lcp.id",Rr.id),Rr.url&&e.setAttribute("lcp.url",Rr.url.trim().slice(0,200)),Rr.loadTime!=null&&e.setAttribute("lcp.loadTime",Rr.loadTime),Rr.renderTime!=null&&e.setAttribute("lcp.renderTime",Rr.renderTime),e.setAttribute("lcp.size",Rr.size)),Dl!=null&&Dl.sources&&t.recordClsOnPageloadSpan&&Dl.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,go(n.node)))}function wH(e,t,n){n.forEach(([r,o])=>{const s=e[r];s!=null&&(typeof s=="number"&&s