import{r as P,ah as Ze,cf as Be,a as ce,f as q,p as d,c5 as ie,a4 as me,X as W,ae as Le,_ as A,cg as G,a3 as _,G as Oe,H as ye,ch as Mt,b9 as Nt,ci as Lt,cj as Ot,ak as Ke,a1 as Kt,a0 as Dt,be as Wt,R as ct,ck as Ee,cl as vt,cm as pt,cn as Ft,as as St,aK as jt,c4 as $t,V as Ht,co as zt,c8 as Ye,a5 as Vt,S as Gt,cp as Ut,cq as st,ca as Xt}from"./index.87f5651e.js";import{u as Yt}from"./useRefs.78cd22ff.js";import{P as Zt}from"./PlusOutlined.7ea014bd.js";function qt(p){var e=P(),t=P(!1);function o(){for(var a=arguments.length,n=new Array(a),l=0;lj?(x=i,L.value="x"):(x=y,L.value="y"),e(-x,-x)&&g.preventDefault()}var O=P({onTouchStart:s,onTouchMove:R,onTouchEnd:z,onWheel:B});function U(g){O.value.onTouchStart(g)}function K(g){O.value.onTouchMove(g)}function $(g){O.value.onTouchEnd(g)}function ve(g){O.value.onWheel(g)}Oe(function(){var g,i;document.addEventListener("touchmove",K,{passive:!1}),document.addEventListener("touchend",$,{passive:!1}),(g=p.value)===null||g===void 0||g.addEventListener("touchstart",U,{passive:!1}),(i=p.value)===null||i===void 0||i.addEventListener("wheel",ve,{passive:!1})}),Ze(function(){document.removeEventListener("touchmove",K),document.removeEventListener("touchend",$)})}function yt(p,e){var t=P(p);function o(a){var n=typeof a=="function"?a(t.value):a;n!==t.value&&e(n,t.value),t.value=n}return[t,o]}var mt={width:0,height:0,left:0,top:0,right:0},ra=function(){return{id:{type:String},tabPosition:{type:String},activeKey:{type:[String,Number]},rtl:{type:Boolean},animated:{type:Object,default:void 0},editable:{type:Object},moreIcon:Ke.any,moreTransitionName:{type:String},mobile:{type:Boolean},tabBarGutter:{type:Number},renderTabBar:{type:Function},locale:{type:Object,default:void 0},onTabClick:{type:Function},onTabScroll:{type:Function}}},ht=ce({compatConfig:{MODE:3},name:"TabNavList",inheritAttrs:!1,props:ra(),slots:["moreIcon","leftExtra","rightExtra","tabBarExtraContent"],emits:["tabClick","tabScroll"],setup:function(e,t){var o=t.attrs,a=t.slots,n=kt(),l=n.tabs,c=n.prefixCls,r=P(),v=P(),u=P(),f=P(),h=Yt(),N=_(h,2),I=N[0],F=N[1],E=q(function(){return e.tabPosition==="top"||e.tabPosition==="bottom"}),H=yt(0,function(m,S){E.value&&e.onTabScroll&&e.onTabScroll({direction:m>S?"left":"right"})}),T=_(H,2),s=T[0],R=T[1],z=yt(0,function(m,S){!E.value&&e.onTabScroll&&e.onTabScroll({direction:m>S?"top":"bottom"})}),L=_(z,2),B=L[0],O=L[1],U=G(0),K=_(U,2),$=K[0],ve=K[1],g=G(0),i=_(g,2),y=i[0],x=i[1],D=G(null),j=_(D,2),C=j[0],Se=j[1],he=G(null),w=_(he,2),X=w[0],re=w[1],Te=G(0),ge=_(Te,2),xe=ge[0],se=ge[1],_e=G(0),Q=_(_e,2),De=Q[0],Re=Q[1],Ae=Jt(new Map),pe=_(Ae,2),We=pe[0],Fe=pe[1],we=ea(l,We),Pt=q(function(){return"".concat(c.value,"-nav-operations-hidden")}),Ce=P(0),ke=P(0);Le(function(){E.value?e.rtl?(Ce.value=0,ke.value=Math.max(0,$.value-C.value)):(Ce.value=Math.min(0,C.value-$.value),ke.value=0):(Ce.value=Math.min(0,X.value-y.value),ke.value=0)});var je=function(S){return Ske.value?ke.value:S},qe=P(),Et=G(),Je=_(Et,2),$e=Je[0],Qe=Je[1],He=function(){Qe(Date.now())},ze=function(){clearTimeout(qe.value)},et=function(S,b){S(function(M){var k=je(M+b);return k})};ia(r,function(m,S){if(E.value){if(C.value>=$.value)return!1;et(R,m)}else{if(X.value>=y.value)return!1;et(O,S)}return ze(),He(),!0}),ye($e,function(){ze(),$e.value&&(qe.value=setTimeout(function(){Qe(0)},100))});var tt=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey,b=we.value.get(S)||{width:0,height:0,left:0,right:0,top:0};if(E.value){var M=s.value;e.rtl?b.rights.value+C.value&&(M=b.right+b.width-C.value):b.left<-s.value?M=-b.left:b.left+b.width>-s.value+C.value&&(M=-(b.left+b.width-C.value)),O(0),R(je(M))}else{var k=B.value;b.top<-B.value?k=-b.top:b.top+b.height>-B.value+X.value&&(k=-(b.top+b.height-X.value)),R(0),O(je(k))}},Ve=P(0),Ge=P(0);Le(function(){var m,S,b,M,k,Y,Z,fe=we.value;["top","bottom"].includes(e.tabPosition)?(S="width",k=C.value,Y=$.value,Z=xe.value,b=e.rtl?"right":"left",M=Math.abs(s.value)):(S="height",k=X.value,Y=$.value,Z=De.value,b="top",M=-B.value);var ee=k;Y+Z>k&&YM+ee){V=te-1;break}}for(var ue=0,J=be-1;J>=0;J-=1){var ne=fe.get(le[J].key)||mt;if(ne[b]0,ue=s.value+C.value<$.value):(ue=s.value<0,J=-s.value+C.value<$.value):(ne=B.value<0,lt=-B.value+X.value