import{i as k,y as Je,d as de,j as Z,e as f,au as ye,ah as W,ai as Le,am as R,aP as B,x as De,z as me,ad as Ke,ax as Kt,aw as Wt,az as dt,bj as Ee,aA as Ft,al as $t,aF as jt,bk as zt,aj as Xe,aa as Ht,ag as Gt,ay as Vt}from"./index-0127add0.js";import{w as _e,i as Pt}from"./_plugin-vue_export-helper-10c790be.js";import{K as ie}from"./shallowequal-327a9d42.js";import{E as qt,M as Ut,_ as Yt,D as Xt}from"./index-a6785c60.js";import{u as V,a as ft}from"./useState-ab7e8e52.js";import{R as bt}from"./index-5d23b372.js";import{u as Zt}from"./useRefs-5dfcc3e3.js";import{f as It,t as Jt,a as Qt,c as ea,h as ta,g as aa}from"./_flatRest-56c6e14a.js";import{i as mt,H as na}from"./isSymbol-102dac7e.js";import{c as ia}from"./vnode-e48a529a.js";import{i as ra}from"./isMobile-e2e89480.js";import{o as la}from"./omit-a9878f04.js";function oa(n){var e=k(),t=k(!1);function r(){for(var a=arguments.length,i=new Array(a),u=0;u$?(T=o,N.value="x"):(T=y,N.value="y"),e(-T,-T)&&p.preventDefault()}var L=k({onTouchStart:d,onTouchMove:A,onTouchEnd:H,onWheel:_});function q(p){L.value.onTouchStart(p)}function D(p){L.value.onTouchMove(p)}function j(p){L.value.onTouchEnd(p)}function ce(p){L.value.onWheel(p)}De(function(){var p,o;document.addEventListener("touchmove",D,{passive:!1}),document.addEventListener("touchend",j,{passive:!1}),(p=n.value)===null||p===void 0||p.addEventListener("touchstart",q,{passive:!1}),(o=n.value)===null||o===void 0||o.addEventListener("wheel",ce,{passive:!1})}),Je(function(){document.removeEventListener("touchmove",D),document.removeEventListener("touchend",j)})}function pt(n,e){var t=k(n);function r(a){var i=typeof a=="function"?a(t.value):a;i!==t.value&&e(i,t.value),t.value=i}return[t,r]}function ya(n,e,t,r){if(!mt(n))return n;e=It(e,n);for(var a=-1,i=e.length,u=i-1,c=n;c!=null&&++aS?"left":"right"})}),x=B(z,2),d=x[0],A=x[1],H=pt(0,function(h,S){!E.value&&e.onTabScroll&&e.onTabScroll({direction:h>S?"top":"bottom"})}),N=B(H,2),_=N[0],L=N[1],q=V(0),D=B(q,2),j=D[0],ce=D[1],p=V(0),o=B(p,2),y=o[0],T=o[1],K=V(null),$=B(K,2),C=$[0],Se=$[1],he=V(null),w=B(he,2),U=w[0],re=w[1],xe=V(0),ge=B(xe,2),Te=ge[0],ve=ge[1],Be=V(0),Q=B(Be,2),We=Q[0],Ae=Q[1],Re=ua(new Map),pe=B(Re,2),Fe=pe[0],$e=pe[1],we=va(u,Fe),Rt=Z(function(){return"".concat(c.value,"-nav-operations-hidden")}),Ce=k(0),Pe=k(0);Le(function(){E.value?e.rtl?(Ce.value=0,Pe.value=Math.max(0,j.value-C.value)):(Ce.value=Math.min(0,C.value-j.value),Pe.value=0):(Ce.value=Math.min(0,U.value-y.value),Pe.value=0)});var je=function(S){return SPe.value?Pe.value:S},et=k(),wt=V(),tt=B(wt,2),ze=tt[0],at=tt[1],He=function(){at(Date.now())},Ge=function(){clearTimeout(et.value)},nt=function(S,m){S(function(O){var P=je(O+m);return P})};ma(l,function(h,S){if(E.value){if(C.value>=j.value)return!1;nt(A,h)}else{if(U.value>=y.value)return!1;nt(L,S)}return Ge(),He(),!0}),me(ze,function(){Ge(),ze.value&&(et.value=setTimeout(function(){at(0)},100))});var it=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey,m=we.value.get(S)||{width:0,height:0,left:0,right:0,top:0};if(E.value){var O=d.value;e.rtl?m.rightd.value+C.value&&(O=m.right+m.width-C.value):m.left<-d.value?O=-m.left:m.left+m.width>-d.value+C.value&&(O=-(m.left+m.width-C.value)),L(0),A(je(O))}else{var P=_.value;m.top<-_.value?P=-m.top:m.top+m.height>-_.value+U.value&&(P=-(m.top+m.height-U.value)),A(0),L(je(P))}},Ve=k(0),qe=k(0);Le(function(){var h,S,m,O,P,Y,X,fe=we.value;["top","bottom"].includes(e.tabPosition)?(S="width",P=C.value,Y=j.value,X=Te.value,m=e.rtl?"right":"left",O=Math.abs(d.value)):(S="height",P=U.value,Y=j.value,X=We.value,m="top",O=-_.value);var ee=P;Y+X>P&&YO+ee){G=te-1;break}}for(var ue=0,J=be-1;J>=0;J-=1){var ne=fe.get(le[J].key)||St;if(ne[m]0,ue=d.value+C.value