import{aI as c,dk as T,c8 as q,aJ as w,ao as B}from"./app-k0jcl5PQ.js";const p=400;function Q(e){const{type:o,state:i,containerRef:s,mediaQuery:l}=e,[f,u]=c.useState(!1),[d,b]=c.useState({}),[g,m]=c.useState(null),a=c.useMemo(()=>T.isTouchScreen(),[]);c.useEffect(()=>{o!=="dynamic"||!s.current||!i.containerLeftPosition||a||setTimeout(()=>D(),p+50)},[s.current,l,i.offset,i.containerLeftPosition]);function D(){var n;const r=i;if(!((n=s.current)!=null&&n.children))return;const t=Array.from(s.current.children).reduce((h,A)=>{const x=A==null?void 0:A.getBoundingClientRect(),F=x.left<r.containerRightPosition&&x.right>r.containerLeftPosition;return{...h,[A.id]:F?{"aria-hidden":!1}:{"aria-hidden":!0,inert:"true"}}},{});b(t)}function I(r){const t=i;return a||r>=t.offset-t.viewableItems&&r<t.offset?{"aria-hidden":!1}:{inert:"true","aria-hidden":!0}}function E(){setTimeout(()=>{if(!s.current)return;const r=s.current.querySelectorAll("li[aria-hidden]");let t=null;for(let n=g+1;n<r.length&&!t;n++)t=r[n].querySelector('a[tabindex="0"]');t&&t.focus()},p+100)}function v(){setTimeout(()=>{if(!s.current)return;const r=s.current.querySelectorAll("li[aria-hidden]");let t=null;for(let n=g-1;n>=0&&!t;n--)t=r[n].querySelector('a[tabindex="0"]');t&&t.focus()},p+100)}function R(r){document.querySelector(".user-is-tabbing")&&(u(!0),m(r))}function P(){document.querySelector(".user-is-tabbing")||(u(!1),m(null))}return{isTabbing:f,onFocusWidget:R,onBlurWidget:P,getFixedAttributes:I,dynamicAttributes:d,focusNext:E,focusPrev:v}}var y=(e=>(e.Percentage="%",e.Pixels="px",e))(y||{});const S=new Image;S.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=";const C={hideDragImage(e){!e.dataTransfer.setDragImage||!q.isFunction(e.dataTransfer.setDragImage)||e.dataTransfer.setDragImage(S,0,0)}},L=T.isTouchScreen(),k=(e,o,i)=>(o===y.Percentage&&i&&(e=e-i),{transform:`translate3d(${e}${o}, 0px, 0px)`,transition:"transform .4s ease-in-out"}),j=w.forwardRef((e,o)=>{const{children:i,positionType:s,onDrag:l,onDragEnd:f,onTouchMove:u,onTouchEnd:d,percentageDragged:b,position:g=0}=e;function m(){const a={};return l&&f&&(a.draggable=!0,a.onDragEnd=f,a.onDragStart=C.hideDragImage,a.onDragOver=l),u&&d&&L&&(a.onTouchMoveCapture=u,a.onTouchEndCapture=d),a}return B.jsx("ul",{className:"list-unstyled d-flex flex-nowrap position-relative w-100 mb-0",style:k(g,s,b),ref:o,...m(),children:i})});var N=(e=>(e.Init="init",e.Next="next",e.Previous="previous",e.Resize="resize",e.Drag="drag",e.Update="update",e.JumpToIndex="jump-to-index",e))(N||{});export{y as C,j as S,N as W,Q as u};
//# sourceMappingURL=BBUCoOir.chunk.js.map
