import{v as P,U as Ze,cd as Be,a as ce,f as J,n as d,c3 as ie,Y as me,Z as W,T as Le,_ as A,ce as G,ac as _,J as Oe,K as ye,cf as Mt,b8 as Nt,cg as Lt,ch as Ot,O as Ke,aa as Kt,S as Dt,bd as Wt,a1 as ct,ci as Ee,cj as vt,ck as pt,cl as Ft,aw as St,W as jt,c2 as $t,a5 as zt,cm as Ht,c6 as Xe,R as Vt,a2 as Gt,cn as Ut,co as st,c8 as Yt}from"./index.c32990f8.js";import{u as Xt}from"./useRefs.e81244b6.js";import{P as Zt}from"./PlusOutlined.36faec12.js";function Jt(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:H,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=It(),l=n.tabs,c=n.prefixCls,r=P(),v=P(),u=P(),f=P(),h=Xt(),N=_(h,2),k=N[0],F=N[1],E=J(function(){return e.tabPosition==="top"||e.tabPosition==="bottom"}),z=yt(0,function(m,S){E.value&&e.onTabScroll&&e.onTabScroll({direction:m>S?"left":"right"})}),T=_(z,2),s=T[0],R=T[1],H=yt(0,function(m,S){!E.value&&e.onTabScroll&&e.onTabScroll({direction:m>S?"top":"bottom"})}),L=_(H,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),Y=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=qt(new Map),pe=_(Ae,2),We=pe[0],Fe=pe[1],we=ea(l,We),Pt=J(function(){return"".concat(c.value,"-nav-operations-hidden")}),Ce=P(0),Ie=P(0);Le(function(){E.value?e.rtl?(Ce.value=0,Ie.value=Math.max(0,$.value-C.value)):(Ce.value=Math.min(0,C.value-$.value),Ie.value=0):(Ce.value=Math.min(0,Y.value-y.value),Ie.value=0)});var je=function(S){return SIe.value?Ie.value:S},Je=P(),Et=G(),qe=_(Et,2),$e=qe[0],Qe=qe[1],ze=function(){Qe(Date.now())},He=function(){clearTimeout(Je.value)},et=function(S,b){S(function(M){var I=je(M+b);return I})};ia(r,function(m,S){if(E.value){if(C.value>=$.value)return!1;et(R,m)}else{if(Y.value>=y.value)return!1;et(O,S)}return He(),ze(),!0}),ye($e,function(){He(),$e.value&&(Je.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 I=B.value;b.top<-B.value?I=-b.top:b.top+b.height>-B.value+Y.value&&(I=-(b.top+b.height-Y.value)),R(0),O(je(I))}},Ve=P(0),Ge=P(0);Le(function(){var m,S,b,M,I,X,Z,fe=we.value;["top","bottom"].includes(e.tabPosition)?(S="width",I=C.value,X=$.value,Z=xe.value,b=e.rtl?"right":"left",M=Math.abs(s.value)):(S="height",I=Y.value,X=$.value,Z=De.value,b="top",M=-B.value);var ee=I;X+Z>I&&XM+ee){V=te-1;break}}for(var ue=0,q=be-1;q>=0;q-=1){var ne=fe.get(le[q].key)||mt;if(ne[b]0,ue=s.value+C.value<$.value):(ue=s.value<0,q=-s.value+C.value<$.value):(ne=B.value<0,lt=-B.value+Y.value