Files
evening_detective_frontend/dist/assets/Follower-8oWfBzRO.js
T
2026-09-18 16:58:39 +07:00

1 line
11 KiB
JavaScript

import{$ as e,A as t,B as n,H as r,K as i,L as a,M as o,P as s,ft as c,ht as l,k as u,nt as d}from"./client-DoYgjHB1.js";import{R as f,et as p,z as m}from"./light-DZR0fP_1.js";import{d as h,u as g}from"./Card-D1xtzex8.js";import{_,c as v,d as y,f as b,l as x,m as S,p as C,y as w}from"./Suffix-CweDIQwl.js";import{X as T,Y as E}from"./index-Bz8r5dyZ.js";var D=[],O=new WeakMap;function k(){D.forEach(e=>e(...O.get(e))),D=[]}function A(e,...t){O.set(e,t),!D.includes(e)&&D.push(e)===1&&requestAnimationFrame(k)}var j=w?document?.fonts?.ready:void 0,M=!1;j===void 0?M=!0:j.then(()=>{M=!0});function N(e){if(M)return;let t=!1;r(()=>{M||j?.then(()=>{t||e()})}),n(()=>{t=!0})}var P=m(`n-internal-select-menu`),F=m(`n-internal-select-menu-body`),I=`__disabled__`;function L(e){let t=s(S,null),i=s(_,null),a=s(C,null),o=s(F,null),l=c();if(typeof document<`u`){l.value=document.fullscreenElement;let e=()=>{l.value=document.fullscreenElement};r(()=>{h(`fullscreenchange`,document,e)}),n(()=>{g(`fullscreenchange`,document,e)})}return T(()=>{let{to:n}=e;return n===void 0?t?.value?t.value.$el??t.value:i?.value?i.value:a?.value?a.value:o?.value?o.value:n??(l.value||`body`):n===!1?I:n===!0?l.value||`body`:n})}L.tdkey=I,L.propTo={type:[String,Object,Boolean],default:void 0};var R=null;function z(){if(R===null&&(R=document.getElementById(`v-binder-view-measurer`),R===null)){R=document.createElement(`div`),R.id=`v-binder-view-measurer`;let{style:e}=R;e.position=`fixed`,e.left=`0`,e.right=`0`,e.top=`0`,e.bottom=`0`,e.pointerEvents=`none`,e.visibility=`hidden`,document.body.appendChild(R)}return R.getBoundingClientRect()}function B(e,t){let n=z();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function V(e){let t=e.getBoundingClientRect(),n=z();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function H(e){return e.nodeType===9?null:e.parentNode}function U(e){if(e===null)return null;let t=H(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){let{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(e+r+n))return t}return U(t)}var W=u({name:`Binder`,props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){i(`VBinder`,t()?.proxy);let r=s(`VBinder`,null),a=c(null),o=t=>{a.value=t,r&&e.syncTargetWithParent&&r.setTargetRef(t)},l=[],u=()=>{let e=a.value;for(;e=U(e),e!==null;)l.push(e);for(let e of l)h(`scroll`,e,_,!0)},d=()=>{for(let e of l)g(`scroll`,e,_,!0);l=[]},f=new Set,p=e=>{f.size===0&&u(),f.has(e)||f.add(e)},m=e=>{f.has(e)&&f.delete(e),f.size===0&&d()},_=()=>{A(v)},v=()=>{f.forEach(e=>e())},y=new Set,b=e=>{y.size===0&&h(`resize`,window,S),y.has(e)||y.add(e)},x=e=>{y.has(e)&&y.delete(e),y.size===0&&g(`resize`,window,S)},S=()=>{y.forEach(e=>e())};return n(()=>{g(`resize`,window,S),d()}),{targetRef:a,setTargetRef:o,addScrollListener:p,removeScrollListener:m,addResizeListener:b,removeResizeListener:x}},render(){return b(`binder`,this.$slots)}}),G=u({name:`Target`,setup(){let{setTargetRef:e,syncTarget:t}=s(`VBinder`);return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){let{syncTarget:e,setTargetDirective:t}=this;return e?d(y(`follower`,this.$slots),[[t]]):y(`follower`,this.$slots)}}),{c:K}=p(),q=`vueuc-style`,J={top:`bottom`,bottom:`top`,left:`right`,right:`left`},Y={start:`end`,center:`center`,end:`start`},X={top:`height`,bottom:`height`,left:`width`,right:`width`},Z={"bottom-start":`top left`,bottom:`top center`,"bottom-end":`top right`,"top-start":`bottom left`,top:`bottom center`,"top-end":`bottom right`,"right-start":`top left`,right:`center left`,"right-end":`bottom left`,"left-start":`top right`,left:`center right`,"left-end":`bottom right`},ee={"bottom-start":`bottom left`,bottom:`bottom center`,"bottom-end":`bottom right`,"top-start":`top left`,top:`top center`,"top-end":`top right`,"right-start":`top right`,right:`center right`,"right-end":`bottom right`,"left-start":`top left`,left:`center left`,"left-end":`bottom left`},te={"bottom-start":`right`,"bottom-end":`left`,"top-start":`right`,"top-end":`left`,"right-start":`bottom`,"right-end":`top`,"left-start":`bottom`,"left-end":`top`},Q={top:!0,bottom:!1,left:!0,right:!1},$={top:`end`,bottom:`start`,left:`end`,right:`start`};function ne(e,t,n,r,i,a){if(!i||a)return{placement:e,top:0,left:0};let[o,s]=e.split(`-`),c=s??`center`,l={top:0,left:0},u=(e,i,a)=>{let o=0,s=0,c=n[e]-t[i]-t[e];return c>0&&r&&(a?s=Q[i]?c:-c:o=Q[i]?c:-c),{left:o,top:s}},d=o===`left`||o===`right`;if(c!==`center`){let r=te[e],i=J[r],a=X[r];if(n[a]>t[a]){if(t[r]+t[a]<n[a]){let e=(n[a]-t[a])/2;t[r]<e||t[i]<e?t[r]<t[i]?(c=Y[s],l=u(a,i,d)):l=u(a,r,d):c=`center`}}else n[a]<t[a]&&t[i]<0&&t[r]>t[i]&&(c=Y[s])}else{let e=o===`bottom`||o===`top`?`left`:`top`,r=J[e],i=X[e],a=(n[i]-t[i])/2;(t[e]<a||t[r]<a)&&(t[e]>t[r]?(c=$[e],l=u(i,e,d)):(c=$[r],l=u(i,r,d)))}let f=o;return t[o]<n[X[o]]&&t[o]<t[J[o]]&&(f=J[o]),{placement:c===`center`?f:`${f}-${c}`,left:l.left,top:l.top}}function re(e,t){return t?ee[e]:Z[e]}function ie(e,t,n,r,i,a){if(a)switch(e){case`bottom-start`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-100%)`};case`bottom-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-100%)`};case`top-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:``};case`top-end`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%)`};case`right-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%)`};case`right-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-100%)`};case`left-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:``};case`left-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-100%)`};case`top`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:`translateX(-50%)`};case`right`:return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-50%)`};case`left`:return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-50%)`};default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:`translateX(-50%) translateY(-100%)`}}switch(e){case`bottom-start`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:``};case`bottom-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateX(-100%)`};case`top-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateY(-100%)`};case`top-end`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateX(-100%) translateY(-100%)`};case`right-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:``};case`right-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateY(-100%)`};case`left-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateX(-100%)`};case`left-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateX(-100%) translateY(-100%)`};case`top`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:`translateY(-100%) translateX(-50%)`};case`right`:return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateY(-50%)`};case`left`:return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateY(-50%) translateX(-100%)`};default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:`translateX(-50%)`}}}var ae=K([K(`.v-binder-follower-container`,{position:`absolute`,left:`0`,right:`0`,top:`0`,height:`0`,pointerEvents:`none`,zIndex:`auto`}),K(`.v-binder-follower-content`,{position:`absolute`,zIndex:`auto`},[K(`> *`,{pointerEvents:`all`})])]),oe=u({name:`Follower`,inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:`bottom`},syncTrigger:{type:Array,default:[`resize`,`scroll`]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(t){let i=s(`VBinder`),o=T(()=>t.enabled===void 0?t.show:t.enabled),u=c(null),d=c(null),p=()=>{let{syncTrigger:e}=t;e.includes(`scroll`)&&i.addScrollListener(g),e.includes(`resize`)&&i.addResizeListener(g)},m=()=>{i.removeScrollListener(g),i.removeResizeListener(g)};r(()=>{o.value&&(g(),p())});let h=f();ae.mount({id:`vueuc/binder`,head:!0,anchorMetaName:q,ssr:h}),n(()=>{m()}),N(()=>{o.value&&g()});let g=()=>{if(!o.value)return;let e=u.value;if(e===null)return;let n=i.targetRef,{x:r,y:a,overlap:s}=t,c=r!==void 0&&a!==void 0?B(r,a):V(n);e.style.setProperty(`--v-target-width`,`${Math.round(c.width)}px`),e.style.setProperty(`--v-target-height`,`${Math.round(c.height)}px`);let{width:l,minWidth:f,placement:p,internalShift:m,flip:h}=t;e.setAttribute(`v-placement`,p),s?e.setAttribute(`v-overlap`,``):e.removeAttribute(`v-overlap`);let{style:g}=e;l===`target`?g.width=`${c.width}px`:l===void 0?g.width=``:g.width=l,f===`target`?g.minWidth=`${c.width}px`:f===void 0?g.minWidth=``:g.minWidth=f;let _=V(e),v=V(d.value),{left:y,top:b,placement:x}=ne(p,c,_,m,h,s),S=re(x,s),{left:C,top:w,transform:T}=ie(x,v,c,b,y,s);e.setAttribute(`v-placement`,x),e.style.setProperty(`--v-offset-left`,`${Math.round(y)}px`),e.style.setProperty(`--v-offset-top`,`${Math.round(b)}px`),e.style.transform=`translateX(${C}) translateY(${w}) ${T}`,e.style.setProperty(`--v-transform-origin`,S),e.style.transformOrigin=S};e(o,e=>{e?(p(),_()):m()});let _=()=>{a().then(g).catch(e=>console.error(e))};[`placement`,`x`,`y`,`internalShift`,`flip`,`width`,`overlap`,`minWidth`].forEach(n=>{e(l(t,n),g)}),[`teleportDisabled`].forEach(n=>{e(l(t,n),_)}),e(l(t,`syncTrigger`),e=>{e.includes(`resize`)?i.addResizeListener(g):i.removeResizeListener(g),e.includes(`scroll`)?i.addScrollListener(g):i.removeScrollListener(g)});let v=E();return{VBinder:i,mergedEnabled:o,offsetContainerRef:d,followerRef:u,mergedTo:T(()=>{let{to:e}=t;if(e!==void 0)return e;v.value}),syncPosition:g}},render(){return o(v,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e;let t=o(`div`,{class:[`v-binder-follower-container`,this.containerClass],ref:`offsetContainerRef`},[o(`div`,{class:`v-binder-follower-content`,ref:`followerRef`},(e=this.$slots).default?.call(e))]);return this.zindexable?d(t,[[x,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):t}})}});export{W as a,P as c,G as i,N as l,K as n,L as o,q as r,F as s,oe as t,A as u};