import{y as k,_ as X,u as J,c as N,f as K,E as Z,F as q,G as Q,H as ee}from"./index.3c6542a6.js";import{f as h,o as z,bs as te,d as ae,t as ne,c as O,w as A,aI as re,bB as le,g as ue}from"./arco.f43727df.js";import{G as oe,x as ie,B as ve,y as se,t as fe,a7 as L,Z as de}from"./index.28b8c38d.js";import{o as ce}from"./dep-281dbb92.b7bdc3eb.js";import{n as be,l as he,d as ge}from"./index.c6a389a9.js";import{b as me,e as pe}from"./dep-f6f516d9.c729faf9.js";/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var ye={delay:{type:Number},destroyOnClose:{type:Boolean,default:!0},duration:{type:Number},placement:{type:String,default:"top"},showArrow:{type:Boolean,default:!0},theme:{type:String,default:"default",validator:function(e){return e?["default","primary","success","danger","warning","light"].includes(e):!0}}};/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */var Se=function(){var e=h(0),t=h(0),n=function(f){e.value=f.clientX,t.value=f.clientY};return k||(z(function(){window.addEventListener("mousemove",n,{passive:!0})}),te(function(){window.removeEventListener("mousemove",n)})),{x:e,y:t}};/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function B(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable})),t.push.apply(t,n)}return t}function _(a){for(var e=1;ee}var Ee=Pe,Ce=U,$e=Ee,Me=L;function De(a){return a&&a.length?Ce(a,Me,$e):void 0}var He=De;function Ae(a,e){return av&&i===-1&&(i=w,i-d.value.bufferSize>0&&(u=I-D-H(l))),i===-1&&(l.push(D),l.length>d.value.bufferSize&&l.shift()),S===-1&&(I>p.value+v||w===t.value.data.length-1)&&(S=w),i!==-1&&S!==-1)break}var G=He([i-d.value.bufferSize,0]),W=ze([S+d.value.bufferSize,t.value.data.length]);return{startIndex:G,endIndex:W,translateY:u}}var x=Re(function(){var o=j(),r=o.startIndex,v=o.endIndex,l=o.translateY;y.value.join()!==[r,v].join()&&r>=0&&(b.value=l,f.value=t.value.data.slice(r,v),y.value=[r,v])},100),V=function(r){var v;if(!(!g.value||!r||d.value.isFixedRowHeight||!e.value)){var l=(v=r.ref.value)===null||v===void 0?void 0:v.getBoundingClientRect().height,u=r.data.VIRTUAL_SCROLL_INDEX;if(c[u]!==l){var i=l-c[u];c[u]=l,m.value=m.value+i}}},C=function(){!g.value||x()},P=function(r){var v=X(r,1),l=v[0].contentRect,u=16;Math.abs(l.width-R.value)>u&&(e.value.scrollTop=0,b.value=0),R.value=l.width,p.value=l.height},T=function(r){r.forEach(function(v,l){v.VIRTUAL_SCROLL_INDEX=l})},E=function(r){var v=r.index,l=r.top,u=l===void 0?0:l,i=r.behavior,S=H(c.slice(0,v))-u;e.value.scrollTo({top:S,behavior:i||"auto"})},$=function(r){if(E(r),!d.value.isFixedRowHeight)var v,l=(v=r.time)!==null&&v!==void 0?v:60,u=setTimeout(function(){E(r),clearTimeout(u)},l)};return pe(O(function(){return g.value?e.value:void 0}),P),A(function(){return[K(t.value.data),d.value,g.value,e.value]},function(){if(!(!g.value||!e.value)){var o=t.value.data;if(T(o),p.value=e.value.getBoundingClientRect().height,c.length!==t.value.data.length){var r=Array.from(c);r.length=t.value.data.length,r.fill(d.value.rowHeight||47),c=r}m.value=H(c),y.value=[0,0],x()}},{immediate:!0}),A(function(){return p.value},function(){x()}),{visibleData:f,translateY:b,scrollHeight:m,isVirtualScroll:g,handleScroll:C,handleRowMounted:V,scrollToElement:$}};/** * tdesign v1.9.4 * (c) 2024 tdesign * @license MIT */function rt(a){return Z(a)||q(a)||Q(a)||ee()}export{tt as T,rt as _,at as o,Re as t,nt as u};