import{P as V,_ as Ft,b as O,i as me,d as K,aJ as $t,aI as Qe,ao as Oe,K as re,aN as U,aq as R,bu as jt,M as Ht,I as Vt,bW as zt,bX as Gt,bY as qt,bZ as Ut,b_ as Yt,e as mt,bg as Ae,ar as yt,am as Xt,j as It,f as Zt,o as Jt,aV as Qt,m as Je,u as ea,c as ta,bB as aa,ap as gt,C as na,b$ as ia}from"./index-122302b9.js";import{d as le,k as P,w as be,e as Y,f as v,F as ra,x as tt,s as Fe,o as Re,p as la,c as oa,H as ua,an as ca,ao as sa}from"./vue-18ee037d.js";var Se={adjustX:1,adjustY:1},xe=[0,0],va={topLeft:{points:["bl","tl"],overflow:Se,offset:[0,-4],targetOffset:xe},topCenter:{points:["bc","tc"],overflow:Se,offset:[0,-4],targetOffset:xe},topRight:{points:["br","tr"],overflow:Se,offset:[0,-4],targetOffset:xe},bottomLeft:{points:["tl","bl"],overflow:Se,offset:[0,4],targetOffset:xe},bottomCenter:{points:["tc","bc"],overflow:Se,offset:[0,4],targetOffset:xe},bottomRight:{points:["tr","br"],overflow:Se,offset:[0,4],targetOffset:xe}};const da=va;var fa=["prefixCls","arrow","showAction","overlayStyle","trigger","placement","align","getPopupContainer","transitionName","animation","overlayClassName"];const ba=le({compatConfig:{MODE:3},props:{minOverlayWidthMatchTrigger:{type:Boolean,default:void 0},arrow:{type:Boolean,default:!1},prefixCls:V.string.def("rc-dropdown"),transitionName:String,overlayClassName:V.string.def(""),openClassName:String,animation:V.any,align:V.object,overlayStyle:{type:Object,default:void 0},placement:V.string.def("bottomLeft"),overlay:V.any,trigger:V.oneOfType([V.string,V.arrayOf(V.string)]).def("hover"),alignPoint:{type:Boolean,default:void 0},showAction:V.array,hideAction:V.array,getPopupContainer:Function,visible:{type:Boolean,default:void 0},defaultVisible:{type:Boolean,default:!1},mouseEnterDelay:V.number.def(.15),mouseLeaveDelay:V.number.def(.1)},emits:["visibleChange","overlayClick"],slots:["overlay"],setup:function(e,t){var n=t.slots,a=t.emit,i=t.expose,l=P(!!e.visible);be(function(){return e.visible},function(b){b!==void 0&&(l.value=b)});var c=P();i({triggerRef:c});var u=function(y){e.visible===void 0&&(l.value=!1),a("overlayClick",y)},d=function(y){e.visible===void 0&&(l.value=y),a("visibleChange",y)},s=function(){var y,S=(y=n.overlay)===null||y===void 0?void 0:y.call(n),D={prefixCls:"".concat(e.prefixCls,"-menu"),onClick:u,getPopupContainer:function(){return c.value.getPopupDomNode()}};return v(ra,null,[e.arrow&&v("div",{class:"".concat(e.prefixCls,"-arrow")},null),Qe(S,D,!1)])},m=Y(function(){var b=e.minOverlayWidthMatchTrigger,y=b===void 0?!e.alignPoint:b;return y}),g=function(){var y,S=(y=n.default)===null||y===void 0?void 0:y.call(n);return l.value&&S?Qe(S[0],{class:e.openClassName||"".concat(e.prefixCls,"-open")},!1):S},_=Y(function(){return!e.hideAction&&e.trigger.indexOf("contextmenu")!==-1?["click"]:e.hideAction});return function(){var b=e.prefixCls,y=e.arrow,S=e.showAction,D=e.overlayStyle,T=e.trigger,f=e.placement,A=e.align,j=e.getPopupContainer,N=e.transitionName,E=e.animation,M=e.overlayClassName,z=Ft(e,fa);return v($t,O(O({},z),{},{prefixCls:b,ref:c,popupClassName:me(M,K({},"".concat(b,"-show-arrow"),y)),popupStyle:D,builtinPlacements:da,action:T,showAction:S,hideAction:_.value||[],popupPlacement:f,popupAlign:A,popupTransitionName:N,popupAnimation:E,popupVisible:l.value,stretch:m.value?"minWidth":"",onPopupVisibleChange:d,getPopupContainer:j}),{popup:s,default:g})}}});function ma(r){var e=P(),t=P(!1);function n(){for(var a=arguments.length,i=new Array(a),l=0;lH?(I=o,N.value="x"):(I=p,N.value="y"),e(-I,-I)&&x.preventDefault()}var M=P({onTouchStart:f,onTouchMove:A,onTouchEnd:j,onWheel:E});function z(x){M.value.onTouchStart(x)}function F(x){M.value.onTouchMove(x)}function G(x){M.value.onTouchEnd(x)}function ve(x){M.value.onWheel(x)}Re(function(){var x,o;document.addEventListener("touchmove",F,{passive:!1}),document.addEventListener("touchend",G,{passive:!1}),(x=r.value)===null||x===void 0||x.addEventListener("touchstart",z,{passive:!1}),(o=r.value)===null||o===void 0||o.addEventListener("wheel",ve,{passive:!1})}),tt(function(){document.removeEventListener("touchmove",F),document.removeEventListener("touchend",G)})}function St(r,e){var t=P(r);function n(a){var i=typeof a=="function"?a(t.value):a;i!==t.value&&e(i,t.value),t.value=i}return[t,n]}var Ta=function(){var e=P(new Map),t=function(a){return function(i){e.value.set(a,i)}};return ca(function(){e.value=new Map}),[t,e]};const Pa=Ta;function ka(r,e,t){for(var n=-1,a=e.length,i={};++nk?"left":"right"})}),T=R(D,2),f=T[0],A=T[1],j=St(0,function(C,k){!S.value&&e.onTabScroll&&e.onTabScroll({direction:C>k?"top":"bottom"})}),N=R(j,2),E=N[0],M=N[1],z=U(0),F=R(z,2),G=F[0],ve=F[1],x=U(0),o=R(x,2),p=o[0],I=o[1],$=U(null),H=R($,2),w=H[0],Te=H[1],he=U(null),L=R(he,2),X=L[0],oe=L[1],Pe=U(0),pe=R(Pe,2),ke=pe[0],de=pe[1],_e=U(0),ee=R(_e,2),$e=ee[0],Ne=ee[1],Me=ya(new Map),Ce=R(Me,2),je=Ce[0],He=Ce[1],Le=ha(l,je),_t=Y(function(){return"".concat(c.value,"-nav-operations-hidden")}),Ie=P(0),Ee=P(0);Fe(function(){S.value?e.rtl?(Ie.value=0,Ee.value=Math.max(0,G.value-w.value)):(Ie.value=Math.min(0,w.value-G.value),Ee.value=0):(Ie.value=Math.min(0,X.value-p.value),Ee.value=0)});var Ve=function(k){return kEe.value?Ee.value:k},nt=P(),Nt=U(),it=R(Nt,2),ze=it[0],rt=it[1],Ge=function(){rt(Date.now())},qe=function(){clearTimeout(nt.value)},lt=function(k,h){k(function(W){var B=Ve(W+h);return B})};xa(u,function(C,k){if(S.value){if(w.value>=G.value)return!1;lt(A,C)}else{if(X.value>=p.value)return!1;lt(M,k)}return qe(),Ge(),!0}),be(ze,function(){qe(),ze.value&&(nt.value=setTimeout(function(){rt(0)},100))});var ot=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey,h=Le.value.get(k)||{width:0,height:0,left:0,right:0,top:0};if(S.value){var W=f.value;e.rtl?h.rightf.value+w.value&&(W=h.right+h.width-w.value):h.left<-f.value?W=-h.left:h.left+h.width>-f.value+w.value&&(W=-(h.left+h.width-w.value)),M(0),A(Ve(W))}else{var B=E.value;h.top<-E.value?B=-h.top:h.top+h.height>-E.value+X.value&&(B=-(h.top+h.height-X.value)),A(0),M(Ve(B))}},Ue=P(0),Ye=P(0);Fe(function(){var C,k,h,W,B,Z,J,ye=Le.value;["top","bottom"].includes(e.tabPosition)?(k="width",B=w.value,Z=G.value,J=ke.value,h=e.rtl?"right":"left",W=Math.abs(f.value)):(k="height",B=X.value,Z=G.value,J=$e.value,h="top",W=-E.value);var te=B;Z+J>B&&ZW+te){q=ae-1;break}}for(var se=0,Q=ge-1;Q>=0;Q-=1){var ie=ye.get(ue[Q].key)||xt;if(ie[h]0,se=f.value+w.value