import{b as w,c as g,E as M,j as a,g as f,i as y,p as c,t as _,u as t,k as q,H as h,T as I,a as l}from"./vue-Cm77DuTi.js";import{M as B}from"./MkUserInfo-Brwzwv5t.js";import{aM as C,x as z,d as b,_ as E}from"./app-QjDgb7aF.js";import"./MkNumber.vue_vue_type_script_setup_true_lang-DCqylJGQ.js";import"./animation-wAdLxVJ8.js";import"./charts-3gEHPHRq.js";import"./number-BJeYzK3l.js";import"./media-DuCIZ-3n.js";const L={key:1},U=w({__name:"MkUserPreview",props:{showing:{type:Boolean},q:{},source:{}},emits:["closed","mouseover","mouseleave"],setup(p,{emit:v}){const e=p,r=v,x=C("middle");let s=l(null),u=l(0),m=l(0);return g(()=>{if(typeof e.q=="object")s.value=e.q;else{const d=e.q.startsWith("@")?z.parse(e.q.slice(1)):{userId:e.q};b("users/show",d).then(k=>{e.showing&&(s.value=k)})}const n=e.source.getBoundingClientRect(),o=n.left+e.source.offsetWidth/2-300/2+window.pageXOffset,i=n.top+e.source.offsetHeight+window.pageYOffset;u.value=i,m.value=o}),(n,o)=>{const i=M("MkLoading");return a(),f(I,{name:n.$store.state.animation?"popup":"",appear:"",onAfterLeave:o[2]||(o[2]=d=>r("closed"))},{default:y(()=>[p.showing?(a(),c("div",{key:0,class:"fxxzrfni _popup _shadow",style:_({zIndex:t(x),top:t(u)+"px",left:t(m)+"px"}),onMouseover:o[0]||(o[0]=()=>{r("mouseover")}),onMouseleave:o[1]||(o[1]=()=>{r("mouseleave")})},[t(s)!=null?(a(),f(B,{key:0,user:t(s),detailed:!0},null,8,["user"])):(a(),c("div",L,[q(i)]))],36)):h("",!0)]),_:1},8,["name"])}}}),$=E(U,[["__scopeId","data-v-beaf0106"]]);export{$ as default};
//# sourceMappingURL=MkUserPreview-CNoi04Ps.js.map
