@reeverdev/ui 0.2.225 → 0.2.227

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -69,5 +69,5 @@ import*as Z from'react';import {createContext,useState,useEffect,useContext,useC
69
69
  0% { transform: translateY(-100%); }
70
70
  100% { transform: translateY(100%); }
71
71
  }
72
- `})]})});Kh.displayName="Shimmer";var jk={sm:24,md:40,lg:56,xl:80},Wk={default:{circle:"stroke-muted-foreground",check:"stroke-foreground"},success:{circle:"stroke-green-500",check:"stroke-green-500"},primary:{circle:"stroke-primary",check:"stroke-primary"},outline:{circle:"stroke-border",check:"stroke-foreground"}},$h=Z.forwardRef(({show:e=true,size:t="md",variant:n="success",strokeWidth:r=2,duration:o=.6,delay:a=0,className:s,onComplete:i},l)=>{let c=jk[t],d=Wk[n],m={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a,ease:"easeOut"}}},f={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a+o*.4,ease:"easeOut"}}};return jsxs("svg",{ref:l,width:c,height:c,viewBox:"0 0 50 50",className:u(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:r,className:d.circle,variants:m,initial:"hidden",animate:e?"visible":"hidden"}),jsx(motion.path,{d:"M14 27 L22 35 L36 18",fill:"none",strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round",className:d.check,variants:f,initial:"hidden",animate:e?"visible":"hidden",onAnimationComplete:()=>e&&i?.()})]})});$h.displayName="Checkmark";var Bo={particleCount:100,spread:70,startVelocity:30,decay:.95,gravity:1,colors:["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"],origin:{x:.5,y:.5},shapes:["square","circle"],scalar:1,drift:0,ticks:200},Gh=Z.forwardRef(({autoTrigger:e=false,delay:t=0,options:n={},children:r,onTrigger:o},a)=>{let s=Z.useCallback(()=>{let i={...Bo,...n};Oo(i),o?.();},[n,o]);return Z.useEffect(()=>{if(e){let i=setTimeout(s,t);return ()=>clearTimeout(i)}},[e,t,s]),r?jsx("div",{ref:a,onClick:s,className:"inline-block cursor-pointer",children:r}):null});Gh.displayName="Confetti";var _k=()=>{let e=Z.useCallback(r=>{let o={...Bo,...r};Oo(o);},[]),t=Z.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);Oo({...Bo,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),Oo({...Bo,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),n=Z.useCallback((r="both")=>{let o={x:0,y:1},a={x:1,y:1};(r==="left"||r==="both")&&Oo({...Bo,particleCount:50,angle:60,spread:55,origin:o}),(r==="right"||r==="both")&&Oo({...Bo,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:n}},Uh=Z.forwardRef(({children:e,color:t="hsl(var(--primary))",intensity:n=20,spread:r=0,animate:o=false,duration:a=2,className:s},i)=>{let l={boxShadow:`0 0 ${n}px ${r}px ${t}`};return o?jsx(motion.div,{ref:i,className:u("rounded-[inherit]",s),animate:{boxShadow:[`0 0 ${n}px ${r}px ${t}`,`0 0 ${n*1.5}px ${r+5}px ${t}`,`0 0 ${n}px ${r}px ${t}`]},transition:{duration:a,repeat:1/0,ease:"easeInOut"},children:e}):jsx("div",{ref:i,className:u("rounded-[inherit]",s),style:l,children:e})});Uh.displayName="Glow";var Fh=(e,t)=>({id:Math.random().toString(36).substr(2,9),x:`${Math.random()*100}%`,y:`${Math.random()*100}%`,size:Math.random()*(t-e)+e,delay:Math.random()*2}),jh=Z.forwardRef(({children:e,count:t=10,color:n="hsl(var(--primary))",minSize:r=4,maxSize:o=8,duration:a=1.5,className:s},i)=>{let[l,c]=Z.useState([]);return Z.useEffect(()=>{let d=Array.from({length:t},()=>Fh(r,o));c(d);let m=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=Fh(r,o),p});},a*500);return ()=>clearInterval(m)},[t,r,o,a]),jsxs("div",{ref:i,className:u("relative inline-block",s),children:[e,l.map(d=>jsx(motion.svg,{className:"pointer-events-none absolute",style:{left:d.x,top:d.y,width:d.size,height:d.size},viewBox:"0 0 24 24",initial:{scale:0,opacity:0,rotate:0},animate:{scale:[0,1,0],opacity:[0,1,0],rotate:[0,180]},transition:{duration:a,delay:d.delay,repeat:1/0,ease:"easeInOut"},children:jsx("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z",fill:n})},d.id))]})});jh.displayName="Sparkles";var Wh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("h1",{ref:r,className:u("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...n,children:t}));Wh.displayName="H1";var _h=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("h2",{ref:r,className:u("scroll-m-20 text-3xl font-semibold tracking-tight",e),...n,children:t}));_h.displayName="H2";var Yh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("h3",{ref:r,className:u("scroll-m-20 text-2xl font-semibold tracking-tight",e),...n,children:t}));Yh.displayName="H3";var qh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("h4",{ref:r,className:u("scroll-m-20 text-xl font-semibold tracking-tight",e),...n,children:t}));qh.displayName="H4";var Xh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("leading-7 [&:not(:first-child)]:mt-6",e),...n,children:t}));Xh.displayName="Paragraph";var Zh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("blockquote",{ref:r,className:u("mt-6 border-l-2 pl-6 italic",e),...n,children:t}));Zh.displayName="Blockquote";var Qh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("code",{ref:r,className:u("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...n,children:t}));Qh.displayName="InlineCode";var Jh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-xl text-muted-foreground",e),...n,children:t}));Jh.displayName="Lead";var ex=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("text-lg font-semibold",e),...n,children:t}));ex.displayName="Large";var tx=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("small",{ref:r,className:u("text-sm font-medium leading-none",e),...n,children:t}));tx.displayName="Small";var nx=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...n,children:t}));nx.displayName="Muted";var rx=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("ul",{ref:r,className:u("my-6 ml-6 list-disc [&>li]:mt-2",e),...n,children:t}));rx.displayName="UL";function Yk(){let[e,t]=Z.useState(false);return Z.useEffect(()=>{t(true);},[]),e}var qk=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Xk=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dc={default:["bg-muted","bg-emerald-200 dark:bg-emerald-900","bg-emerald-300 dark:bg-emerald-700","bg-emerald-500 dark:bg-emerald-500","bg-emerald-700 dark:bg-emerald-300"],success:["bg-muted","bg-green-200 dark:bg-green-900","bg-green-300 dark:bg-green-700","bg-green-500 dark:bg-green-500","bg-green-700 dark:bg-green-300"],warning:["bg-muted","bg-amber-200 dark:bg-amber-900","bg-amber-300 dark:bg-amber-700","bg-amber-500 dark:bg-amber-500","bg-amber-700 dark:bg-amber-300"],danger:["bg-muted","bg-red-200 dark:bg-red-900","bg-red-300 dark:bg-red-700","bg-red-500 dark:bg-red-500","bg-red-700 dark:bg-red-300"],primary:["bg-muted","bg-primary/20","bg-primary/40","bg-primary/60","bg-primary/80"],secondary:["bg-muted","bg-secondary/40","bg-secondary/60","bg-secondary/80","bg-secondary"]},uc={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"};function ox(e){return e.toISOString().split("T")[0]}function Zk(e){return e instanceof Date?e:new Date(e)}function Qk(e,t){let n=[],r=new Date(e);for(r.setDate(r.getDate()-r.getDay());r<=t;){let o=[];for(let a=0;a<7;a++)o.push(new Date(r)),r.setDate(r.getDate()+1);n.push(o);}return n}function Jk(e){let t=[],n=-1;return e.forEach((r,o)=>{let a=r.find(s=>s.getDate()<=7);a&&a.getMonth()!==n&&(n=a.getMonth(),t.push({month:Xk[n],position:o}));}),t}var ax=Z.forwardRef(({className:e,values:t,startDate:n,endDate:r,color:o="default",levels:a=5,showMonthLabels:s=true,showWeekdayLabels:i=true,showTooltip:l=true,tooltipFormatter:c,colorScale:d,gap:m=3,cellSize:f=12,radius:p="sm",onCellClick:g,emptyColor:h,showLegend:b=true,legendLabels:v={less:"Less",more:"More"},...y},x)=>{let w=Yk(),{startDate:C,endDate:R}=Z.useMemo(()=>{let P=r?new Date(r):new Date;return {startDate:n?new Date(n):new Date(P.getFullYear()-1,P.getMonth(),P.getDate()),endDate:P}},[n,r]),T=Z.useMemo(()=>{let P=new Map;return t.forEach(E=>{let I=Zk(E.date),V=ox(I);P.set(V,(P.get(V)||0)+E.count);}),P},[t]),S=Z.useMemo(()=>T.size===0?0:Math.max(...Array.from(T.values())),[T]),D=Z.useMemo(()=>Qk(C,R),[C,R]),k=Z.useMemo(()=>Jk(D),[D]),L=P=>{if(P===0)return h||d?.[0]||dc[o][0];let E=d||dc[o],I=Math.min(Math.ceil(P/S*(a-1)),a-1);return E[I]||E[E.length-1]},M=(P,E)=>{if(c)return c(P,E);let I=P.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"});return jsxs("span",{children:[jsx("span",{className:"font-medium",children:E})," contributions on ",I]})},N=(P,E,I)=>{let V=ox(P),O=T.get(V)||0;if(!(P>=C&&P<=R))return jsx("div",{style:{width:f,height:f}},`${E}-${I}`);let B=jsx("div",{className:u("transition-all duration-200",uc[p],L(O),g&&"cursor-pointer hover:ring-2 hover:ring-foreground/50 hover:ring-offset-1"),style:{width:f,height:f},onClick:()=>g?.(P,O),role:g?"button":void 0,tabIndex:g?0:void 0,onKeyDown:z=>{g&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),g(P,O));}});return l?jsxs(wn,{children:[jsx(Cn,{className:u("transition-all duration-200 border-0 bg-transparent p-0",uc[p],L(O),g&&"cursor-pointer hover:ring-2 hover:ring-foreground/50 hover:ring-offset-1"),style:{width:f,height:f},onClick:()=>g?.(P,O),onKeyDown:z=>{g&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),g(P,O));}}),jsx(Tn,{children:M(P,O)})]},`${E}-${I}`):jsx(Z.Fragment,{children:B},`${E}-${I}`)},H=d||dc[o];return w?jsxs("div",{ref:x,className:u("inline-flex flex-col",e),...y,children:[jsxs("div",{className:"flex",children:[i&&jsx("div",{className:"flex flex-col justify-between pr-2",style:{gap:m,marginTop:s?20:0},children:qk.map((P,E)=>jsx("div",{className:u("text-xs text-muted-foreground",E%2===1&&"invisible"),style:{height:f,lineHeight:`${f}px`},children:P},P))}),jsxs("div",{className:"flex flex-col",children:[s&&jsx("div",{className:"relative mb-1",style:{height:16,width:D.length*(f+m)-m},children:k.map(({month:P,position:E},I)=>jsx("div",{className:"absolute text-xs text-muted-foreground whitespace-nowrap",style:{left:E*(f+m)},children:P},`${P}-${I}`))}),jsx("div",{className:"flex",style:{gap:m},children:D.map((P,E)=>jsx("div",{className:"flex flex-col",style:{gap:m},children:P.map((I,V)=>N(I,E,V))},E))})]})]}),b&&jsxs("div",{className:"flex items-center justify-end mt-4 gap-2",children:[jsx("span",{className:"text-xs text-muted-foreground",children:v.less}),jsx("div",{className:"flex",style:{gap:m/2},children:H.slice(0,a).map((P,E)=>jsx("div",{className:u(uc[p],P),style:{width:f,height:f}},E))}),jsx("span",{className:"text-xs text-muted-foreground",children:v.more})]})]}):jsx("div",{ref:x,className:u("inline-flex flex-col",e),...y})});ax.displayName="HeatmapCalendar";var sx=Z.forwardRef(({className:e,beforeImage:t,afterImage:n,beforeAlt:r="Before",afterAlt:o="After",defaultPosition:a=50,position:s,onPositionChange:i,orientation:l="horizontal",showLabels:c=true,beforeLabel:d="Before",afterLabel:m="After",handleVariant:f="default",handleColor:p="default",aspectRatio:g,disableKeyboard:h=false,handleWidth:b=4,...v},y)=>{let[x,w]=Z.useState(a),C=s!==void 0,R=C?s:x,T=Z.useRef(null),[S,D]=Z.useState(false),[k,L]=Z.useState({width:0,height:0});Z.useEffect(()=>{let z=()=>{T.current&&L({width:T.current.offsetWidth,height:T.current.offsetHeight});};z();let F=new ResizeObserver(z);return T.current&&F.observe(T.current),()=>F.disconnect()},[]);let M=z=>{let F=Math.max(0,Math.min(100,z));C||w(F),i?.(F);},N=(z,F)=>{if(!T.current)return R;let j=T.current.getBoundingClientRect();return l==="horizontal"?(z-j.left)/j.width*100:(F-j.top)/j.height*100},H=z=>{z.preventDefault(),D(true),z.target.setPointerCapture(z.pointerId);let F=N(z.clientX,z.clientY);M(F);},P=z=>{if(!S)return;let F=N(z.clientX,z.clientY);M(F);},E=()=>{D(false);},I=z=>{if(h)return;let F=z.shiftKey?10:1,j=R;switch(z.key){case "ArrowLeft":case "ArrowUp":z.preventDefault(),j=R-F;break;case "ArrowRight":case "ArrowDown":z.preventDefault(),j=R+F;break;case "Home":z.preventDefault(),j=0;break;case "End":z.preventDefault(),j=100;break;default:return}M(j);},V={default:"bg-border",primary:"bg-primary",white:"bg-white",black:"bg-black"},O={default:"bg-background border-border text-foreground",primary:"bg-primary border-primary text-primary-foreground",white:"bg-white border-white text-black",black:"bg-black border-black text-white"},A=()=>{let z=l==="horizontal",F=u("absolute z-10 flex items-center justify-center",z?"top-0 bottom-0 cursor-ew-resize":"left-0 right-0 cursor-ns-resize",V[p]),j=z?{left:`${R}%`,width:b,transform:"translateX(-50%)"}:{top:`${R}%`,height:b,transform:"translateY(-50%)"};return f==="minimal"?jsx("div",{className:F,style:j}):f==="arrows"?jsx("div",{className:F,style:j,children:jsxs("div",{className:u("absolute flex items-center justify-center gap-0.5 rounded-full p-1.5 shadow-md border-2",O[p],z?"flex-row":"flex-col"),children:[jsx("svg",{className:u("w-3 h-3",z?"-rotate-0":"rotate-90"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M15 18l-6-6 6-6"})}),jsx("svg",{className:u("w-3 h-3",z?"-rotate-0":"rotate-90"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M9 18l6-6-6-6"})})]})}):jsx("div",{className:F,style:j,children:jsx("div",{className:u("absolute rounded-full p-2 shadow-md border-2",O[p]),children:jsxs("svg",{className:u("w-4 h-4",z?"":"rotate-90"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M8 3L4 7l4 4"}),jsx("path",{d:"M16 3l4 4-4 4"}),jsx("path",{d:"M4 7h16"}),jsx("path",{d:"M8 17l-4 4 4 4"}),jsx("path",{d:"M16 17l4 4-4 4"}),jsx("path",{d:"M4 21h16"})]})})})},B=l==="horizontal";return jsx("div",{ref:y,className:u("relative select-none overflow-hidden rounded-lg",S&&"cursor-grabbing",e),style:g?{aspectRatio:g}:void 0,...v,children:jsxs("div",{ref:T,className:"relative w-full h-full",role:"slider",tabIndex:0,"aria-valuenow":R,"aria-valuemin":0,"aria-valuemax":100,"aria-orientation":l,"aria-label":"Comparison slider",onPointerDown:H,onPointerMove:P,onPointerUp:E,onPointerCancel:E,onKeyDown:I,children:[jsx("img",{src:n,alt:o,className:"absolute inset-0 w-full h-full object-cover",draggable:false}),jsx("div",{className:"absolute inset-0 overflow-hidden",style:B?{width:`${R}%`}:{height:`${R}%`},children:jsx("img",{src:t,alt:r,className:"absolute object-cover",style:{top:0,left:0,width:k.width>0?`${k.width}px`:"100%",height:k.height>0?`${k.height}px`:"100%"},draggable:false})}),A(),c&&jsxs(Fragment,{children:[jsx("div",{className:u("absolute px-2 py-1 text-xs font-medium rounded bg-black/70 text-white pointer-events-none","top-3 left-3"),children:d}),jsx("div",{className:u("absolute px-2 py-1 text-xs font-medium rounded bg-black/70 text-white pointer-events-none",B?"top-3 right-3":"bottom-3 left-3"),children:m})]})]})})});sx.displayName="ComparisonSlider";function lx(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60);return t>0?`${t}:${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`:`${n}:${r.toString().padStart(2,"0")}`}var uP={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},cx=Z.forwardRef(({className:e,src:t,poster:n,autoPlay:r=false,muted:o=false,loop:a=false,controls:s=true,preload:i="metadata",aspectRatio:l="16/9",defaultVolume:c=1,playbackSpeeds:d=[.5,.75,1,1.25,1.5,2],showPiP:m=true,showFullscreen:f=true,showVolume:p=true,showPlaybackSpeed:g=true,showSkipButtons:h=false,skipInterval:b=10,onPlay:v,onPause:y,onEnded:x,onVideoTimeUpdate:w,onVideoVolumeChange:C,controlsHideTimeout:R=3e3,keyboardShortcuts:T=true,doubleClickFullscreen:S=true,radius:D="lg",...k},L)=>{let M=Z.useRef(null),N=Z.useRef(null),H=Z.useRef(null),[P,E]=Z.useState(false),[I,V]=Z.useState(0),[O,A]=Z.useState(0),[B,z]=Z.useState(c),[F,j]=Z.useState(o),[K,G]=Z.useState(false),[Y,U]=Z.useState(true),[$,q]=Z.useState(true),[te,_]=Z.useState(1),[ve,Q]=Z.useState(0),oe=Z.useMemo(()=>typeof t=="string"?[{src:t,type:void 0,label:void 0}]:t,[t]),[Te,me]=Z.useState(0),Ye=Z.useCallback(()=>{H.current&&clearTimeout(H.current),q(true),P&&R>0&&(H.current=setTimeout(()=>{q(false);},R));},[P,R]);Z.useEffect(()=>(Ye(),()=>{H.current&&clearTimeout(H.current);}),[P,Ye]);let Ze=()=>{N.current&&(A(N.current.duration),U(false));},Tt=()=>{if(N.current){V(N.current.currentTime),w?.(N.current.currentTime,N.current.duration);let se=N.current.buffered.length>0?N.current.buffered.end(N.current.buffered.length-1):0;Q(se/N.current.duration*100);}},Se=()=>{E(true),v?.();},ot=()=>{E(false),y?.();},ne=()=>{E(false),x?.();},W=()=>{U(true);},ae=()=>{U(false);},X=()=>{N.current&&(P?N.current.pause():N.current.play());},J=se=>{if(N.current){let Re=se[0]/100*O;N.current.currentTime=Re,V(Re);}},ee=se=>{let Re=se[0]/100;z(Re),j(Re===0),N.current&&(N.current.volume=Re,N.current.muted=Re===0),C?.(Re,Re===0);},Ae=()=>{if(N.current){let se=!F;N.current.muted=se,j(se),se?N.current.volume=0:N.current.volume=B||1,C?.(se?0:B,se);}},Le=async()=>{if(M.current)try{K?await document.exitFullscreen():await M.current.requestFullscreen();}catch{}},Rn=async()=>{if(N.current)try{document.pictureInPictureElement?await document.exitPictureInPicture():await N.current.requestPictureInPicture();}catch{}},ye=se=>{N.current&&(N.current.currentTime=Math.max(0,Math.min(O,N.current.currentTime+se)));},Qe=se=>{N.current&&(N.current.playbackRate=se,_(se));};Z.useEffect(()=>{let se=()=>{G(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",se),()=>{document.removeEventListener("fullscreenchange",se);}},[]),Z.useEffect(()=>{if(!T)return;let se=Re=>{if(!(!M.current?.contains(document.activeElement)&&document.activeElement!==M.current))switch(Re.key.toLowerCase()){case " ":case "k":Re.preventDefault(),X();break;case "f":Re.preventDefault(),Le();break;case "m":Re.preventDefault(),Ae();break;case "arrowleft":Re.preventDefault(),ye(-b);break;case "arrowright":Re.preventDefault(),ye(b);break;case "arrowup":Re.preventDefault(),ee([Math.min(100,B*100+10)]);break;case "arrowdown":Re.preventDefault(),ee([Math.max(0,B*100-10)]);break}};return window.addEventListener("keydown",se),()=>{window.removeEventListener("keydown",se);}},[T,P,B,b]);let Bt=()=>{S&&Le();},Ge=O>0?I/O*100:0;return jsxs("div",{ref:se=>{M.current=se,typeof L=="function"?L(se):L&&(L.current=se);},className:u("relative bg-black overflow-hidden group",uP[D],e),style:{aspectRatio:l},onMouseMove:Ye,onMouseLeave:()=>P&&q(false),tabIndex:0,...k,children:[jsx("video",{ref:N,className:"w-full h-full object-contain",poster:n,autoPlay:r,muted:o,loop:a,preload:i,playsInline:true,onClick:X,onDoubleClick:Bt,onLoadedMetadata:Ze,onTimeUpdate:Tt,onPlay:Se,onPause:ot,onEnded:ne,onWaiting:W,onCanPlay:ae,children:oe.map((se,Re)=>jsx("source",{src:se.src,type:se.type},Re))}),Y&&jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20",children:jsx(Loader2,{className:"w-12 h-12 text-white animate-spin"})}),!P&&!Y&&jsx("button",{type:"button",className:"absolute inset-0 flex items-center justify-center bg-black/30 transition-opacity cursor-pointer",onClick:X,children:jsx("div",{className:"w-16 h-16 rounded-full bg-white/90 flex items-center justify-center",children:jsx(Play,{className:"w-8 h-8 text-black ml-1",fill:"currentColor"})})}),s&&jsxs("div",{className:u("absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-4 pt-16 transition-opacity duration-300",$?"opacity-100":"opacity-0 pointer-events-none"),children:[jsxs("div",{className:"relative mb-3 group/progress",children:[jsx("div",{className:"absolute top-1/2 left-0 h-1 bg-white/30 rounded-full -translate-y-1/2",style:{width:`${ve}%`}}),jsx(en,{value:[Ge],onValueChange:J,min:0,max:100,step:.1,className:"h-1 group-hover/progress:h-2 transition-all cursor-pointer [&_[role=slider]]:w-3 [&_[role=slider]]:h-3 [&_[role=slider]]:opacity-0 group-hover/progress:[&_[role=slider]]:opacity-100 [&_[role=slider]]:transition-opacity"})]}),jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:X,children:P?jsx(Pause,{className:"w-5 h-5",fill:"currentColor"}):jsx(Play,{className:"w-5 h-5",fill:"currentColor"})}),h&&jsxs(Fragment,{children:[jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:()=>ye(-b),children:jsx(SkipBack,{className:"w-5 h-5"})}),jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:()=>ye(b),children:jsx(SkipForward,{className:"w-5 h-5"})})]}),p&&jsxs("div",{className:"flex items-center gap-1 group/volume",children:[jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:Ae,children:F||B===0?jsx(VolumeX,{className:"w-5 h-5"}):jsx(Volume2,{className:"w-5 h-5"})}),jsx("div",{className:"w-0 overflow-hidden group-hover/volume:w-20 transition-all",children:jsx(en,{value:[F?0:B*100],onValueChange:ee,min:0,max:100,step:1,className:"w-20"})})]}),jsxs("div",{className:"text-white text-sm ml-2",children:[lx(I)," / ",lx(O)]})]}),jsxs("div",{className:"flex items-center gap-1",children:[g&&jsxs(Zt,{children:[jsx(Qt,{children:jsxs("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer flex items-center gap-1",children:[jsx(Settings,{className:"w-5 h-5"}),jsxs("span",{className:"text-xs",children:[te,"x"]})]})}),jsx(Jt,{align:"end",className:"min-w-[100px]",children:d.map(se=>jsxs(Lt,{onSelect:()=>Qe(se),className:u(te===se&&"bg-primary/10 text-primary"),children:[se,"x"]},se))})]}),oe.length>1&&jsxs(Zt,{children:[jsx(Qt,{children:jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer text-xs",children:oe[Te]?.quality||oe[Te]?.label||"Quality"})}),jsx(Jt,{align:"end",className:"min-w-[100px]",children:oe.map((se,Re)=>jsx(Lt,{onSelect:()=>{let Nr=N.current?.currentTime||0;me(Re),setTimeout(()=>{N.current&&(N.current.currentTime=Nr,P&&N.current.play());},100);},className:u(Te===Re&&"bg-primary/10 text-primary"),children:se.quality||se.label||`Source ${Re+1}`},Re))})]}),m&&document.pictureInPictureEnabled&&jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:Rn,children:jsx(PictureInPicture,{className:"w-5 h-5"})}),f&&jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:Le,children:K?jsx(Minimize,{className:"w-5 h-5"}):jsx(Maximize,{className:"w-5 h-5"})})]})]})]})]})});cx.displayName="VideoPlayer";function Ma(e){if(!e||!isFinite(e))return "0:00";let t=Math.floor(e/60),n=Math.floor(e%60);return `${t}:${n.toString().padStart(2,"0")}`}var dx={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},RP={default:{progress:"bg-foreground",waveformActive:"bg-foreground",waveformInactive:"bg-muted-foreground/30"},primary:{progress:"bg-primary",waveformActive:"bg-primary",waveformInactive:"bg-primary/20"},success:{progress:"bg-green-500",waveformActive:"bg-green-500",waveformInactive:"bg-green-500/20"},warning:{progress:"bg-amber-500",waveformActive:"bg-amber-500",waveformInactive:"bg-amber-500/20"},danger:{progress:"bg-red-500",waveformActive:"bg-red-500",waveformInactive:"bg-red-500/20"}},ux=Z.forwardRef(({className:e,src:t,autoPlay:n=false,defaultVolume:r=1,loop:o=false,muted:a=false,showWaveform:s=true,waveformData:i,waveformBars:l=50,showTrackInfo:c=true,showVolume:d=true,showSkipButtons:m=false,skipInterval:f=10,showLoop:p=true,showShuffle:g=false,showDownload:h=false,variant:b="default",color:v="default",customColor:y,onPlay:x,onPause:w,onEnded:C,onAudioTimeUpdate:R,radius:T="lg",...S},D)=>{let k=Z.useRef(null),L=Z.useRef(null),[M,N]=Z.useState(false),[H,P]=Z.useState(0),[E,I]=Z.useState(0),[V,O]=Z.useState(r),[A,B]=Z.useState(a),[z,F]=Z.useState(true),[j,K]=Z.useState(o),[G,Y]=Z.useState(false),U=Z.useMemo(()=>typeof t=="string"?{src:t}:t,[t]),$=Z.useMemo(()=>{if(i)return i;let J=[];for(let ee=0;ee<l;ee++)J.push(.2+Math.random()*.8);return J},[i,l]),q=()=>{k.current&&(I(k.current.duration),F(false));},te=()=>{k.current&&(P(k.current.currentTime),R?.(k.current.currentTime,k.current.duration));},_=()=>{N(true),x?.();},ve=()=>{N(false),w?.();},Q=()=>{N(false),C?.();},oe=()=>{F(false);},Te=()=>{k.current&&(M?k.current.pause():k.current.play());},me=J=>{if(k.current&&E){let ee=J/100*E;k.current.currentTime=ee,P(ee);}},Ye=J=>{if(!L.current||!E)return;let ee=L.current.getBoundingClientRect(),Ae=(J.clientX-ee.left)/ee.width*100;me(Ae);},Ze=J=>{let ee=J[0]/100;O(ee),B(ee===0),k.current&&(k.current.volume=ee,k.current.muted=ee===0);},Tt=()=>{if(k.current){let J=!A;k.current.muted=J,B(J);}},Se=()=>{if(k.current){let J=!j;k.current.loop=J,K(J);}},ot=J=>{k.current&&(k.current.currentTime=Math.max(0,Math.min(E,k.current.currentTime+J)));},ne=()=>{let J=document.createElement("a");J.href=U.src,J.download=U.title||"audio",document.body.appendChild(J),J.click(),document.body.removeChild(J);},W=E>0?H/E*100:0,ae=RP[v],X=A||V===0?VolumeX:V<.5?Volume1:Volume2;return b==="compact"?jsxs("div",{ref:D,className:u("flex items-center gap-3 p-2 bg-muted/50",dx[T],e),...S,children:[jsx("audio",{ref:k,src:U.src,autoPlay:n,loop:j,muted:a,onLoadedMetadata:q,onTimeUpdate:te,onPlay:_,onPause:ve,onEnded:Q,onCanPlay:oe}),jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded-full transition-colors cursor-pointer",onClick:Te,disabled:z,children:z?jsx(Loader2,{className:"w-4 h-4 animate-spin"}):M?jsx(Pause,{className:"w-4 h-4",fill:"currentColor"}):jsx(Play,{className:"w-4 h-4",fill:"currentColor"})}),jsx("div",{className:"flex-1",children:jsx(en,{value:[W],onValueChange:J=>me(J[0]),min:0,max:100,step:.1,className:"h-1"})}),jsx("span",{className:"text-xs text-muted-foreground min-w-[35px]",children:Ma(H)})]}):b==="minimal"?jsxs("div",{ref:D,className:u("flex items-center gap-4",e),...S,children:[jsx("audio",{ref:k,src:U.src,autoPlay:n,loop:j,muted:a,onLoadedMetadata:q,onTimeUpdate:te,onPlay:_,onPause:ve,onEnded:Q,onCanPlay:oe}),jsx("button",{type:"button",className:u("p-3 rounded-full transition-colors cursor-pointer",!y&&ae.progress,"text-white hover:opacity-90"),style:y?{backgroundColor:y}:void 0,onClick:Te,disabled:z,children:z?jsx(Loader2,{className:"w-5 h-5 animate-spin"}):M?jsx(Pause,{className:"w-5 h-5",fill:"currentColor"}):jsx(Play,{className:"w-5 h-5 ml-0.5",fill:"currentColor"})}),jsxs("div",{className:"flex-1 flex flex-col gap-1",children:[c&&U.title&&jsx("span",{className:"text-sm font-medium truncate",children:U.title}),jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-xs text-muted-foreground min-w-[35px]",children:Ma(H)}),jsx(en,{value:[W],onValueChange:J=>me(J[0]),min:0,max:100,step:.1,className:"flex-1"}),jsx("span",{className:"text-xs text-muted-foreground min-w-[35px]",children:Ma(E)})]})]})]}):jsxs("div",{ref:D,className:u("p-4 bg-card border border-border",dx[T],e),...S,children:[jsx("audio",{ref:k,src:U.src,autoPlay:n,loop:j,muted:a,onLoadedMetadata:q,onTimeUpdate:te,onPlay:_,onPause:ve,onEnded:Q,onCanPlay:oe}),c&&(U.title||U.artist||U.artwork)&&jsxs("div",{className:"flex items-center gap-4 mb-4",children:[U.artwork&&jsx("img",{src:U.artwork,alt:U.title||"Album artwork",className:"w-16 h-16 rounded-md object-cover"}),jsxs("div",{className:"flex-1 min-w-0",children:[U.title&&jsx("h3",{className:"font-medium truncate",children:U.title}),U.artist&&jsx("p",{className:"text-sm text-muted-foreground truncate",children:U.artist}),U.album&&jsx("p",{className:"text-xs text-muted-foreground truncate",children:U.album})]})]}),s?jsx("div",{ref:L,className:"relative h-16 mb-4 flex items-end gap-[2px] cursor-pointer",onClick:Ye,children:$.map((J,ee)=>{let Le=(ee+1)/$.length*100<=W;return jsx("div",{className:u("flex-1 rounded-sm transition-colors",!y&&(Le?ae.waveformActive:ae.waveformInactive)),style:{height:`${J*100}%`,minHeight:4,...y&&{backgroundColor:Le?y:`${y}33`}}},ee)})}):jsx("div",{className:"mb-4",children:jsx(en,{value:[W],onValueChange:J=>me(J[0]),min:0,max:100,step:.1})}),jsxs("div",{className:"flex justify-between text-xs text-muted-foreground mb-4",children:[jsx("span",{children:Ma(H)}),jsx("span",{children:Ma(E)})]}),jsxs("div",{className:"flex items-center justify-between",children:[jsxs("div",{className:"flex items-center gap-1",children:[g&&jsx("button",{type:"button",className:u("p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",G&&"text-primary"),onClick:()=>Y(!G),children:jsx(Shuffle,{className:"w-4 h-4"})}),m&&jsx("button",{type:"button",className:"p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",onClick:()=>ot(-f),children:jsx(SkipBack,{className:"w-5 h-5"})})]}),jsx("button",{type:"button",className:u("p-4 rounded-full transition-colors cursor-pointer",!y&&ae.progress,"text-white hover:opacity-90"),style:y?{backgroundColor:y}:void 0,onClick:Te,disabled:z,children:z?jsx(Loader2,{className:"w-6 h-6 animate-spin"}):M?jsx(Pause,{className:"w-6 h-6",fill:"currentColor"}):jsx(Play,{className:"w-6 h-6 ml-0.5",fill:"currentColor"})}),jsxs("div",{className:"flex items-center gap-1",children:[m&&jsx("button",{type:"button",className:"p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",onClick:()=>ot(f),children:jsx(SkipForward,{className:"w-5 h-5"})}),p&&jsx("button",{type:"button",className:u("p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",j&&"text-primary"),onClick:Se,children:jsx(Repeat,{className:"w-4 h-4"})})]})]}),jsxs("div",{className:"flex items-center justify-between mt-4",children:[d?jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsx("button",{type:"button",className:"p-1 hover:bg-muted rounded transition-colors cursor-pointer",onClick:Tt,children:jsx(X,{className:"w-4 h-4"})}),jsx(en,{value:[A?0:V*100],onValueChange:Ze,min:0,max:100,step:1,className:"w-24"})]}):jsx("div",{}),h&&jsx("button",{type:"button",className:"p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",onClick:ne,children:jsx(Download,{className:"w-4 h-4"})})]})]})});ux.displayName="AudioPlayer";var IP={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},mx=Z.forwardRef(({className:e,src:t,defaultPage:n=1,defaultZoom:r=100,showToolbar:o=true,showNavigation:a=true,showZoomControls:s=true,showDownload:i=true,showPrint:l=true,showFullscreen:c=true,showRotate:d=true,showSearch:m=false,zoomStep:f=25,minZoom:p=25,maxZoom:g=400,toolbarPosition:h="top",height:b="600px",onPageChange:v,onZoomChange:y,onPDFLoad:x,onPDFError:w,errorMessage:C="Failed to load PDF. Please try again.",loadingMessage:R="Loading PDF...",fileName:T="document.pdf",totalPages:S=1,radius:D="lg",...k},L)=>{let M=Z.useRef(null),N=Z.useRef(null),[H,P]=Z.useState(n),[E]=Z.useState(S),[I,V]=Z.useState(r),[O,A]=Z.useState(0),[B,z]=Z.useState(false),[F,j]=Z.useState(true),[K,G]=Z.useState(false),[Y,U]=Z.useState(String(n)),$=ne=>{let W=Math.max(1,Math.min(E,ne));P(W),U(String(W)),v?.(W);},q=ne=>{U(ne.target.value);},te=()=>{let ne=parseInt(Y,10);isNaN(ne)?U(String(H)):$(ne);},_=ne=>{ne.key==="Enter"&&te();},ve=()=>{let ne=Math.min(g,I+f);V(ne),y?.(ne);},Q=()=>{let ne=Math.max(p,I-f);V(ne),y?.(ne);},oe=()=>{A(ne=>(ne+90)%360);},Te=async()=>{if(M.current)try{B?await document.exitFullscreen():await M.current.requestFullscreen();}catch{}};Z.useEffect(()=>{let ne=()=>{z(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",ne),()=>{document.removeEventListener("fullscreenchange",ne);}},[]);let me=()=>{let ne=document.createElement("a");ne.href=t,ne.download=T,document.body.appendChild(ne),ne.click(),document.body.removeChild(ne);},Ye=()=>{N.current?.contentWindow&&N.current.contentWindow.print();},Ze=()=>{j(false),G(false),x?.();},Tt=()=>{j(false),G(true),w?.(new Error("Failed to load PDF"));},Se=Z.useMemo(()=>{let ne=new URL(t,window.location.href);return ne.hash=`page=${H}&zoom=${I}`,ne.toString()},[t,H,I]),ot=jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-2 bg-muted/50 border-b border-border",children:[a&&jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>$(H-1),disabled:H<=1,title:"Previous page",children:jsx(ChevronLeft,{className:"w-4 h-4"})}),jsxs("div",{className:"flex items-center gap-1.5",children:[jsx(ao,{value:Y,onChange:q,onBlur:te,onKeyDown:_,className:"w-12 h-7 text-center text-sm px-1"}),jsxs("span",{className:"text-sm text-muted-foreground",children:["/ ",E]})]}),jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>$(H+1),disabled:H>=E,title:"Next page",children:jsx(ChevronRight,{className:"w-4 h-4"})})]}),s&&jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:Q,disabled:I<=p,title:"Zoom out",children:jsx(ZoomOut,{className:"w-4 h-4"})}),jsxs("span",{className:"text-sm text-muted-foreground min-w-[50px] text-center",children:[I,"%"]}),jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:ve,disabled:I>=g,title:"Zoom in",children:jsx(ZoomIn,{className:"w-4 h-4"})})]}),jsxs("div",{className:"flex items-center gap-1",children:[m&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",title:"Search",children:jsx(Search,{className:"w-4 h-4"})}),d&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:oe,title:"Rotate",children:jsx(RotateCw,{className:"w-4 h-4"})}),l&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:Ye,title:"Print",children:jsx(Printer,{className:"w-4 h-4"})}),i&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:me,title:"Download",children:jsx(Download,{className:"w-4 h-4"})}),c&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:Te,title:B?"Exit fullscreen":"Fullscreen",children:B?jsx(Minimize,{className:"w-4 h-4"}):jsx(Maximize,{className:"w-4 h-4"})})]})]});return jsxs("div",{ref:ne=>{M.current=ne,typeof L=="function"?L(ne):L&&(L.current=ne);},className:u("flex flex-col bg-card border border-border overflow-hidden",IP[D],e),style:{height:B?"100vh":b},...k,children:[o&&h==="top"&&ot,jsxs("div",{className:"flex-1 relative overflow-hidden bg-muted/30",children:[F&&jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-background/80 z-10",children:[jsx(Loader2,{className:"w-8 h-8 animate-spin text-muted-foreground mb-2"}),jsx("span",{className:"text-sm text-muted-foreground",children:R})]}),K&&jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-background z-10",children:[jsx(FileWarning,{className:"w-12 h-12 text-muted-foreground mb-3"}),jsx("span",{className:"text-sm text-muted-foreground",children:C}),jsx("button",{type:"button",className:"mt-3 px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors cursor-pointer",onClick:()=>{j(true),G(false);},children:"Try again"})]}),jsx("iframe",{ref:N,src:Se,className:"w-full h-full border-0",style:{transform:`rotate(${O}deg) scale(${I/100})`,transformOrigin:"center center"},onLoad:Ze,onError:Tt,title:"PDF Viewer"})]}),o&&h==="bottom"&&ot]})});mx.displayName="PDFViewer";function Ko(e){let t=useCallback(o=>typeof window<"u"?window.matchMedia(o).matches:false,[]),[n,r]=useState(()=>t(e));return useEffect(()=>{let o=window.matchMedia(e),a=()=>{r(o.matches);};return r(o.matches),o.addEventListener("change",a),()=>{o.removeEventListener("change",a);}},[e]),n}function OP(){return Ko("(max-width: 767px)")}function BP(){return Ko("(min-width: 768px) and (max-width: 1023px)")}function FP(){return Ko("(min-width: 1024px)")}function KP(){return Ko("(prefers-color-scheme: dark)")?"dark":"light"}function $P(){return Ko("(prefers-reduced-motion: reduce)")}function Na(e={}){let{initialWidth:t=0,initialHeight:n=0,debounce:r=0,includeScrollbar:o=true}=e,[a,s]=useState(()=>typeof window>"u"?{width:t,height:n}:{width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight}),i=useRef(null),l=useCallback(()=>{let c=()=>{s({width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight});};r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(c,r)):c();},[r,o]);return useEffect(()=>(l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),i.current&&clearTimeout(i.current);}),[l]),a}function _P(){let{width:e}=Na();return e}function YP(){let{height:e}=Na();return e}function qP(e){let{width:t}=Na();return t>=e}function XP(){let{width:e}=Na();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function JP(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading localStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting localStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.localStorage.setItem(e,JSON.stringify(l)),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:JSON.stringify(l)}));}catch(l){console.warn(`Error setting localStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(e),o(t),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:null}));}catch(i){console.warn(`Error removing localStorage key "${e}":`,i);}},[e,t]);return useEffect(()=>{let i=l=>{if(l.key===e&&l.newValue!==null)try{o(JSON.parse(l.newValue));}catch{o(l.newValue);}else l.key===e&&l.newValue===null&&o(t);};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i);}},[e,t]),[r,a,s]}function tE(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.sessionStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading sessionStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting sessionStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.sessionStorage.setItem(e,JSON.stringify(l));}catch(l){console.warn(`Error setting sessionStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.sessionStorage.removeItem(e),o(t);}catch(i){console.warn(`Error removing sessionStorage key "${e}":`,i);}},[e,t]);return [r,a,s]}function oE(e,t=500){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function aE(e,t=500){let n=useRef(null),r=useRef(e);return useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]),useCallback((...a)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...a);},t);},[t])}function sE(e,t=500){let n=useRef(null),r=useRef(e),o=useRef(null);useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]);let a=useCallback((...c)=>{o.current=c,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...c),n.current=null,o.current=null;},t);},[t]),s=useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null,o.current=null);},[]),i=useCallback(()=>{n.current&&o.current&&(clearTimeout(n.current),r.current(...o.current),n.current=null,o.current=null);},[]),l=useCallback(()=>n.current!==null,[]);return {debouncedCallback:a,cancel:s,flush:i,isPending:l}}function cE(e,t=500){let[n,r]=useState(e),o=useRef(Date.now());return useEffect(()=>{let a=Date.now();if(a>=o.current+t)o.current=a,r(e);else {let s=setTimeout(()=>{o.current=Date.now(),r(e);},t-(a-o.current));return ()=>clearTimeout(s)}},[e,t]),n}function dE(e,t=500){let n=useRef(0),r=useRef(null),o=useRef(e);return useEffect(()=>{o.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]),useCallback((...s)=>{let i=Date.now();i-n.current>=t?(o.current(...s),n.current=i):(r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{o.current(...s),n.current=Date.now();},t-(i-n.current)));},[t])}function mE(e,t=true){let n=useRef(null);return useEffect(()=>{if(!t)return;let r=o=>{let a=n.current;!a||a.contains(o.target)||e(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t]),n}function pE(e,t,n=true){useEffect(()=>{if(!n)return;let r=o=>{e.some(s=>{let i=s.current;return i&&i.contains(o.target)})||t(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t,n]);}function fE(e=2e3){let[t,n]=useState(null),[r,o]=useState(false),[a,s]=useState(false),i=useCallback(()=>{n(null),o(false);},[]),l=useCallback(async c=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;s(true);try{return await navigator.clipboard.writeText(c),n(c),o(!0),e>0&&setTimeout(()=>{o(!1);},e),!0}catch(d){return console.warn("Copy to clipboard failed:",d),n(null),o(false),false}finally{s(false);}},[e]);return {copiedValue:t,success:r,isLoading:a,copy:l,reset:i}}function gE(){return useCallback(async e=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy to clipboard failed:",t),false}},[])}function fx(e){let t=e.toLowerCase().split("+");return {key:t[t.length-1],ctrl:t.includes("ctrl")||t.includes("control"),alt:t.includes("alt")||t.includes("option"),shift:t.includes("shift"),meta:t.includes("meta")||t.includes("cmd")||t.includes("command")}}function gx(e,t){let n=e.key.toLowerCase(),r=n===" "?"space":n==="escape"?"esc":n,o=t.key==="space"?" ":t.key;return (r===o||e.code.toLowerCase()===`key${o}`)&&e.ctrlKey===t.ctrl&&e.altKey===t.alt&&e.shiftKey===t.shift&&e.metaKey===t.meta}function bE(e,t,n={}){let{enabled:r=true,preventDefault:o=true,stopPropagation:a=false,target:s=null}=n,i=useRef(t);i.current=t;let l=fx(e);useEffect(()=>{if(!r)return;let c=m=>{gx(m,l)&&(o&&m.preventDefault(),a&&m.stopPropagation(),i.current(m));},d=s||document;return d.addEventListener("keydown",c),()=>{d.removeEventListener("keydown",c);}},[r,o,a,s,l]);}function vE(e,t={}){let{enabled:n=true,preventDefault:r=true,stopPropagation:o=false,target:a=null}=t,s=useRef(e);s.current=e;let i=Object.entries(e).map(([l,c])=>({parsed:fx(l),handler:c}));useEffect(()=>{if(!n)return;let l=d=>{for(let{parsed:m,handler:f}of i)if(gx(d,m)){r&&d.preventDefault(),o&&d.stopPropagation(),f(d);break}},c=a||document;return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l);}},[n,r,o,a,i]);}function hE(e){let t=useRef(false);return useEffect(()=>{let n=o=>{o.key===e&&(t.current=true);},r=o=>{o.key===e&&(t.current=false);};return document.addEventListener("keydown",n),document.addEventListener("keyup",r),()=>{document.removeEventListener("keydown",n),document.removeEventListener("keyup",r);}},[e]),t.current}function xE(e,t,n,r){let o=useRef(t);o.current=t,useEffect(()=>{let a;if(n==null?a=window:"current"in n?a=n.current:a=n,!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,r),()=>{a?.removeEventListener(e,s,r);}},[e,n,r]);}function yE(e,t,n){let r=useRef(null),o=useRef(t);return o.current=t,useEffect(()=>{let a=r.current;if(!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,n),()=>{a.removeEventListener(e,s,n);}},[e,n]),r}function RE(e,t,n={}){let{target:r,event:o="keydown",enabled:a=true}=n,s=useRef(t);s.current=t,useEffect(()=>{if(!a)return;let i=r?.current||window,l=c=>{c.key===e&&s.current(c);};return i.addEventListener(o,l),()=>{i.removeEventListener(o,l);}},[e,r,o,a]);}function wE(e,t={}){let{threshold:n=500,onStart:r,onCancel:o,enabled:a=true}=t,s=useRef(null),i=useRef(false),l=useRef(null),c=useCallback(m=>{a&&(l.current=m,i.current=false,r?.(m),s.current=setTimeout(()=>{i.current=true,l.current&&e(l.current);},n));},[e,n,r,a]),d=useCallback(m=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(m),i.current=false,l.current=null);},[o,a]);return {onMouseDown:c,onMouseUp:d,onMouseLeave:d,onTouchStart:c,onTouchEnd:d}}function CE(e){let t=useRef(null),[n,r]=useState(false),o=useCallback(()=>{r(true),e?.onHoverStart?.();},[e]),a=useCallback(()=>{r(false),e?.onHoverEnd?.();},[e]);return useEffect(()=>{let s=t.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[o,a]),{ref:t,isHovered:n}}function TE(e,t){let[n,r]=useState(false),o=useCallback(()=>{r(true),t?.onHoverStart?.();},[t]),a=useCallback(()=>{r(false),t?.onHoverEnd?.();},[t]);return useEffect(()=>{let s=e.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[e,o,a]),n}function ME(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function NE(e=0){let t=useRef(null),[n,r]=useState(false),o=useRef(null);return useEffect(()=>{let a=t.current;if(!a)return;let s=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(true);},e);},i=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(false);},e);};return a.addEventListener("mouseenter",s),a.addEventListener("mouseleave",i),()=>{a.removeEventListener("mouseenter",s),a.removeEventListener("mouseleave",i),o.current&&clearTimeout(o.current);}},[e]),{ref:t,isHovered:n}}function PE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=r=>{t({x:r.clientX,y:r.clientY});};return window.addEventListener("mousemove",n),()=>{window.removeEventListener("mousemove",n);}},[]),e}function EE(e={}){let{enabled:t=true,resetOnLeave:n=false}=e,r=useRef(null),[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=r.current;if(!s||!t)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{n&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),n&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),n&&s.removeEventListener("mouseleave",l);}},[t,n]),{ref:r,...o}}function SE(e,t={}){let{enabled:n=true,resetOnLeave:r=false}=t,[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=e.current;if(!s||!n)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{r&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),r&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),r&&s.removeEventListener("mouseleave",l);}},[e,n,r]),o}var hx=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"].join(",");function LE(e={}){let{enabled:t=true,initialFocus:n,returnFocus:r=true,autoFocus:o=true}=e,a=useRef(null),s=useRef(null),i=useCallback(()=>{let c=a.current;return c?Array.from(c.querySelectorAll(hx)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);return useEffect(()=>{if(!t)return;let c=a.current;if(c){if(s.current=document.activeElement,o)if(n?.current)n.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),r&&s.current&&s.current.focus();}}},[t,n,r,o,l,i]),a}function DE(e,t={}){let{enabled:n=true,initialFocus:r,returnFocus:o=true,autoFocus:a=true}=t,s=useRef(null),i=useCallback(()=>{let c=e.current;return c?Array.from(c.querySelectorAll(hx)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[e]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);useEffect(()=>{if(!n)return;let c=e.current;if(c){if(s.current=document.activeElement,a)if(r?.current)r.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),o&&s.current&&s.current.focus();}}},[e,n,r,o,a,l,i]);}function HE(e={}){let{threshold:t=0,throttle:n=0,element:r}=e,[o,a]=useState({x:0,y:0,isScrolled:false,directionY:0,directionX:0,isAtBottom:false,isAtTop:true,progress:0}),s=useRef(0),i=useRef(0),l=useRef(false),c=useRef(0),d=useCallback(()=>{let f=r?.current,p=f?f.scrollTop:window.scrollY,g=f?f.scrollLeft:window.scrollX,h=f?f.scrollHeight-f.clientHeight:document.documentElement.scrollHeight-window.innerHeight,b=p>s.current?1:p<s.current?-1:0,v=g>i.current?1:g<i.current?-1:0;s.current=p,i.current=g,a({x:g,y:p,isScrolled:p>t,directionY:b,directionX:v,isAtBottom:p>=h-1,isAtTop:p<=0,progress:h>0?p/h:0}),l.current=false;},[r,t]),m=useCallback(()=>{let f=Date.now();if(n>0&&f-c.current<n){l.current||(l.current=true,requestAnimationFrame(d));return}c.current=f,l.current||(l.current=true,requestAnimationFrame(d));},[n,d]);return useEffect(()=>{let f=r?.current||window;return f.addEventListener("scroll",m,{passive:true}),d(),()=>{f.removeEventListener("scroll",m);}},[r,m,d]),o}function IE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=()=>{t({x:window.scrollX,y:window.scrollY});};return window.addEventListener("scroll",n,{passive:true}),n(),()=>{window.removeEventListener("scroll",n);}},[]),e}function Tx(e={}){let{autoLock:t=false,lockX:n=true}=e,r=useRef(false),o=useRef({x:0,y:0}),a=useRef(null),s=useCallback(()=>{if(typeof document>"u"||r.current)return;let{body:l}=document,c=window.scrollY,d=window.scrollX;o.current={x:d,y:c},a.current={overflow:l.style.overflow,overflowX:l.style.overflowX,overflowY:l.style.overflowY,position:l.style.position,top:l.style.top,left:l.style.left,width:l.style.width},l.style.overflow="hidden",n&&(l.style.overflowX="hidden"),l.style.overflowY="hidden",l.style.position="fixed",l.style.top=`-${c}px`,l.style.left=n?`-${d}px`:"0",l.style.width="100%",r.current=true;},[n]),i=useCallback(()=>{if(typeof document>"u"||!r.current)return;let{body:l}=document,c=a.current;c&&(l.style.overflow=c.overflow,l.style.overflowX=c.overflowX,l.style.overflowY=c.overflowY,l.style.position=c.position,l.style.top=c.top,l.style.left=c.left,l.style.width=c.width),window.scrollTo(o.current.x,o.current.y),r.current=false;},[]);return useEffect(()=>(t&&s(),()=>{i();}),[t,s,i]),{lock:s,unlock:i,isLocked:r.current}}function VE(e=true){let{lock:t,unlock:n}=Tx();useEffect(()=>{e?t():n();},[e,t,n]);}function kx(e={}){let{root:t=null,rootMargin:n="0px",threshold:r=0,once:o=false,enabled:a=true}=e,s=useRef(null),[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=s.current;if(!c||!a)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),o&&m.isIntersecting&&d.disconnect();},{root:t,rootMargin:n,threshold:r});return d.observe(c),()=>{d.disconnect();}},[t,n,r,o,a]),{ref:s,...i}}function zE(e,t={}){let{root:n=null,rootMargin:r="0px",threshold:o=0,once:a=false,enabled:s=true}=t,[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=e.current;if(!c||!s)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),a&&m.isIntersecting&&d.disconnect();},{root:n,rootMargin:r,threshold:o});return d.observe(c),()=>{d.disconnect();}},[e,n,r,o,a,s]),i}function OE(e="200px"){let{ref:t,isIntersecting:n}=kx({rootMargin:e,once:true});return {ref:t,isVisible:n}}function BE(e,t={}){let{enabled:n=true,childList:r=true,attributes:o=true,characterData:a=false,subtree:s=false,attributeOldValue:i=false,characterDataOldValue:l=false,attributeFilter:c}=t,d=useRef(null),m=useRef(e);return m.current=e,useEffect(()=>{let f=d.current;if(!f||!n)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:r,attributes:o,characterData:a,subtree:s,attributeOldValue:i,characterDataOldValue:l,attributeFilter:c}),()=>{p.disconnect();}},[n,r,o,a,s,i,l,c]),d}function FE(e,t,n={}){let{enabled:r=true,childList:o=true,attributes:a=true,characterData:s=false,subtree:i=false,attributeOldValue:l=false,characterDataOldValue:c=false,attributeFilter:d}=n,m=useRef(t);m.current=t,useEffect(()=>{let f=e.current;if(!f||!r)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:o,attributes:a,characterData:s,subtree:i,attributeOldValue:l,characterDataOldValue:c,attributeFilter:d}),()=>{p.disconnect();}},[e,r,o,a,s,i,l,c,d]);}function KE(e={}){let{enabled:t=true,box:n="content-box",debounce:r=0}=e,o=useRef(null),[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;n==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,r)):p();},[n,r]);return useEffect(()=>{let c=o.current;if(!c||!t)return;let d=new ResizeObserver(l);d.observe(c,{box:n});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,n,l]),{ref:o,...a}}function $E(e,t={}){let{enabled:n=true,box:r="content-box",debounce:o=0}=t,[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;r==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});o>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,o)):p();},[r,o]);return useEffect(()=>{let c=e.current;if(!c||!n)return;let d=new ResizeObserver(l);d.observe(c,{box:r});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,n,r,l]),a}function GE(){let e=useRef(null),t=useCallback(()=>{let n=e.current;if(!n)return {width:0,height:0};let r=n.getBoundingClientRect();return {width:r.width,height:r.height}},[]);return {ref:e,measure:t}}function Lx(e={}){let{defaultOpen:t=false,isOpen:n,onOpen:r,onClose:o,onChange:a,id:s}=e,[i,l]=useState(t),c=n!==void 0,d=c?n:i,m=useCallback(()=>{c||l(true),r?.(),a?.(true);},[c,r,a]),f=useCallback(()=>{c||l(false),o?.(),a?.(false);},[c,o,a]),p=useCallback(()=>{d?f():m();},[d,m,f]),g=useCallback(v=>{v?m():f();},[m,f]),h=useCallback(()=>({onClick:p,"aria-expanded":d,...s&&{"aria-controls":s}}),[p,d,s]),b=useCallback(()=>({hidden:!d,...s&&{id:s}}),[d,s]);return useMemo(()=>({isOpen:d,open:m,close:f,toggle:p,setIsOpen:g,getButtonProps:h,getDisclosureProps:b}),[d,m,f,p,g,h,b])}function WE(e){return Lx({...e,defaultOpen:true})}function _E(e=false){let[t,n]=useState(e),r=useCallback(()=>{n(o=>!o);},[]);return [t,r,n]}function YE(e,t=0){let[n,r]=useState(t),o=useCallback(()=>{r(i=>(i+1)%e.length);},[e.length]),a=useCallback(()=>{r(i=>(i-1+e.length)%e.length);},[e.length]),s=useCallback(i=>{let l=e.indexOf(i);l!==-1&&r(l);},[e]);return useMemo(()=>({value:e[n],index:n,next:o,prev:a,setIndex:r,setValue:s}),[e,n,o,a,s])}function qE(e=false){let[t,n]=useState(e),r=useCallback(()=>n(s=>!s),[]),o=useCallback(()=>n(true),[]),a=useCallback(()=>n(false),[]);return useMemo(()=>({value:t,toggle:r,on:o,off:a,set:n}),[t,r,o,a])}function ZE(e=0,t={}){let{min:n=-1/0,max:r=1/0,step:o=1}=t,a=useCallback(g=>Math.min(Math.max(g,n),r),[n,r]),[s,i]=useState(()=>a(e)),l=useCallback(()=>{i(g=>a(g+o));},[a,o]),c=useCallback(()=>{i(g=>a(g-o));},[a,o]),d=useCallback(g=>{i(a(g));},[a]),m=useCallback(()=>{i(a(e));},[a,e]),f=s<=n,p=s>=r;return useMemo(()=>({count:s,increment:l,decrement:c,set:d,reset:m,isMin:f,isMax:p}),[s,l,c,d,m,f,p])}function QE(e=0){let[t,n]=useState(e),r=useCallback(()=>n(o=>o+1),[]);return [t,r]}function JE(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function eS(e,t){let n=useRef(t);return useEffect(()=>{n.current=e;},[e]),n.current}function tS(e){let t=useRef(void 0),n=useRef(e),r=n.current!==e;return useEffect(()=>{t.current=n.current,n.current=e;},[e]),{current:e,previous:t.current,hasChanged:r}}function oS(e=[]){let[t,n]=useState(e),r=useCallback(C=>{n(C);},[]),o=useCallback(C=>{n(R=>[...R,C]);},[]),a=useCallback(C=>{n(R=>[...R,...C]);},[]),s=useCallback((C,R)=>{n(T=>{let S=[...T];return S.splice(C,0,R),S});},[]),i=useCallback((C,R)=>{n(T=>{let S=[...T];return S[C]=R,S});},[]),l=useCallback(C=>{n(R=>R.filter((T,S)=>S!==C));},[]),c=useCallback(C=>{n(R=>{let T=R.indexOf(C);return T===-1?R:R.filter((S,D)=>D!==T)});},[]),d=useCallback(C=>{n(R=>R.filter(T=>!C(T)));},[]),m=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[0],R.slice(1))),C},[]),f=useCallback(C=>{n(R=>[C,...R]);},[]),p=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[R.length-1],R.slice(0,-1))),C},[]),g=useCallback(()=>{n([]);},[]),h=useCallback(()=>{n(e);},[e]),b=useCallback((C,R)=>{n(T=>{let S=[...T],[D]=S.splice(C,1);return S.splice(R,0,D),S});},[]),v=useCallback((C,R)=>{n(T=>{let S=[...T];return [S[C],S[R]]=[S[R],S[C]],S});},[]),y=useCallback(C=>t.filter(C),[t]),x=useCallback(C=>t.find(C),[t]),w=useCallback(C=>t.includes(C),[t]);return useMemo(()=>({list:t,set:r,push:o,pushMany:a,insertAt:s,updateAt:i,removeAt:l,remove:c,removeWhere:d,shift:m,unshift:f,pop:p,clear:g,reset:h,move:b,swap:v,filter:y,find:x,includes:w,length:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i,l,c,d,m,f,p,g,h,b,v,y,x,w])}function aS(e=[]){let[t,n]=useState(()=>new Map(e)),r=useCallback(p=>t.get(p),[t]),o=useCallback((p,g)=>{n(h=>{let b=new Map(h);return b.set(p,g),b});},[]),a=useCallback(p=>{n(g=>{let h=new Map(g);return p.forEach(([b,v])=>h.set(b,v)),h});},[]),s=useCallback(p=>t.has(p),[t]),i=useCallback(p=>{n(g=>{let h=new Map(g);return h.delete(p),h});},[]),l=useCallback(()=>{n(new Map);},[]),c=useCallback(()=>{n(new Map(e));},[e]),d=useCallback(()=>Array.from(t.keys()),[t]),m=useCallback(()=>Array.from(t.values()),[t]),f=useCallback(()=>Array.from(t.entries()),[t]);return useMemo(()=>({map:t,get:r,set:o,setMany:a,has:s,delete:i,clear:l,reset:c,keys:d,values:m,entries:f,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d,m,f])}function sS(e={}){let[t,n]=useState(e),r=useCallback(d=>t[d],[t]),o=useCallback((d,m)=>{n(f=>({...f,[d]:m}));},[]),a=useCallback(d=>{n(m=>({...m,...d}));},[]),s=useCallback(d=>{n(m=>{let{[d]:f,...p}=m;return p});},[]),i=useCallback(()=>{n({});},[]),l=useCallback(()=>{n(e);},[e]),c=useCallback(d=>d in t,[t]);return useMemo(()=>({value:t,get:r,set:o,setAll:a,remove:s,clear:i,reset:l,has:c,keys:Object.keys(t),values:Object.values(t)}),[t,r,o,a,s,i,l,c])}function zx(e=[]){let[t,n]=useState(()=>new Set(e)),r=useCallback(m=>{n(f=>{let p=new Set(f);return p.add(m),p});},[]),o=useCallback(m=>{n(f=>{let p=new Set(f);return m.forEach(g=>p.add(g)),p});},[]),a=useCallback(m=>{n(f=>{let p=new Set(f);return p.delete(m),p});},[]),s=useCallback(m=>t.has(m),[t]),i=useCallback(m=>{n(f=>{let p=new Set(f);return p.has(m)?p.delete(m):p.add(m),p});},[]),l=useCallback(()=>{n(new Set);},[]),c=useCallback(()=>{n(new Set(e));},[e]),d=useCallback(()=>Array.from(t),[t]);return useMemo(()=>({set:t,add:r,addMany:o,remove:a,has:s,toggle:i,clear:l,reset:c,values:d,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d])}function lS(e=[]){let{add:t,remove:n,has:r,toggle:o,clear:a,addMany:s,values:i,size:l}=zx(e);return useMemo(()=>({selected:i(),isSelected:r,select:t,deselect:n,toggle:o,selectAll:s,deselectAll:a,count:l,isEmpty:l===0}),[i,r,t,n,o,s,a,l])}function cS(e=[]){let[t,n]=useState(e),r=useCallback(c=>{n(d=>[...d,c]);},[]),o=useCallback(c=>{n(d=>[...d,...c]);},[]),a=useCallback(()=>{let c;return n(d=>d.length===0?d:(c=d[0],d.slice(1))),c},[]),s=useCallback(()=>t[0],[t]),i=useCallback(()=>t[t.length-1],[t]),l=useCallback(()=>{n([]);},[]);return useMemo(()=>({queue:t,enqueue:r,enqueueMany:o,dequeue:a,peek:s,peekLast:i,clear:l,size:t.length,isEmpty:t.length===0,hasItems:t.length>0}),[t,r,o,a,s,i,l])}function dS(e=[]){let[t,n]=useState(e),r=useCallback(l=>{n(c=>[...c,l]);},[]),o=useCallback(l=>{n(c=>[...c,...l]);},[]),a=useCallback(()=>{let l;return n(c=>c.length===0?c:(l=c[c.length-1],c.slice(0,-1))),l},[]),s=useCallback(()=>t[t.length-1],[t]),i=useCallback(()=>{n([]);},[]);return useMemo(()=>({stack:t,push:r,pushMany:o,pop:a,peek:s,clear:i,size:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i])}function Kx(e,t=false){let[n,r]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true}),o=useRef(true),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{r(c=>({...c,isLoading:true,isIdle:false,isError:false,error:null}));try{let c=await a.current(...l);return o.current&&r({data:c,error:null,isLoading:!1,isSuccess:!0,isError:!1,isIdle:!1}),c}catch(c){let d=c instanceof Error?c:new Error(String(c));return o.current&&r({data:null,error:d,isLoading:false,isSuccess:false,isError:true,isIdle:false}),null}},[]),i=useCallback(()=>{r({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true});},[]);return useEffect(()=>(o.current=true,t&&s(),()=>{o.current=false;}),[t,s]),{...n,execute:s,reset:i}}function mS(e,t=3,n=1e3){let[r,o]=useState(0),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{let c=null;for(let d=0;d<=t;d++)try{return o(d),await a.current(...l)}catch(m){c=m instanceof Error?m:new Error(String(m)),d<t&&await new Promise(f=>setTimeout(f,n));}throw c},[t,n]);return {...Kx(s,false),retryCount:r}}var Ux=new Map,pS=300*1e3;function fS(e,t={}){let{immediate:n=true,init:r,transform:o,deps:a=[],enabled:s=true,refetchInterval:i,cacheKey:l}=t,[c,d]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),m=useRef(null),f=useRef(true),p=useCallback(async()=>{if(!e||!s)return;let h=l||e,b=Ux.get(h);if(b&&Date.now()-b.timestamp<pS){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}m.current&&m.current.abort(),m.current=new AbortController,d(v=>({...v,isLoading:true,error:null}));try{let v=await fetch(e,{...r,signal:m.current.signal});if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);let y=await v.json(),x=o?o(y):y;Ux.set(h,{data:x,timestamp:Date.now()}),f.current&&d({data:x,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(v){if(v instanceof Error&&v.name==="AbortError")return;let y=v instanceof Error?v:new Error(String(v));f.current&&d({data:null,error:y,isLoading:false,isSuccess:false,isError:true});}},[e,s,r,o,l]),g=useCallback(()=>{m.current&&m.current.abort();},[]);return useEffect(()=>(f.current=true,n&&s&&p(),()=>{f.current=false,g();}),[e,n,s,...a]),useEffect(()=>{if(!i||!s)return;let h=setInterval(p,i);return ()=>{clearInterval(h);}},[i,s,p]),{...c,refetch:p,abort:g}}function gS(e,t={}){let{transform:n,...r}=t,[o,a]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),s=useCallback(async l=>{a(c=>({...c,isLoading:true,error:null}));try{let c=await fetch(e,{...r,method:r.method||"POST",headers:{"Content-Type":"application/json",...r.headers},body:l?JSON.stringify(l):void 0});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let d=await c.json(),m=n?n(d):d;return a({data:m,error:null,isLoading:!1,isSuccess:!0,isError:!1}),m}catch(c){let d=c instanceof Error?c:new Error(String(c));return a({data:null,error:d,isLoading:false,isSuccess:false,isError:true}),null}},[e,r,n]),i=useCallback(()=>{a({data:null,error:null,isLoading:false,isSuccess:false,isError:false});},[]);return {...o,mutate:s,reset:i}}function gi(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setInterval(()=>{n.current();},t);return ()=>{clearInterval(r);}},[t]);}function vS(e,t){let[n,r]=useState(false);gi(e,n?t:null);let o=useCallback(()=>r(true),[]),a=useCallback(()=>r(false),[]),s=useCallback(()=>r(i=>!i),[]);return {start:o,stop:a,toggle:s,isRunning:n}}function hS(e,t={}){let{interval:n=1e3,onComplete:r,autoStart:o=false}=t,[a,s]=useState(e),[i,l]=useState(o),c=useRef(r);c.current=r;let d=a<=0;gi(()=>{s(g=>{let h=g-1;return h<=0?(l(false),c.current?.(),0):h});},i&&!d?n:null);let m=useCallback(()=>{d||l(true);},[d]),f=useCallback(()=>{l(false);},[]),p=useCallback(g=>{s(g??e),l(false);},[e]);return {seconds:a,isRunning:i,isComplete:d,start:m,pause:f,reset:p}}function xS(e={}){let{interval:t=1e3,maxSeconds:n,autoStart:r=false}=e,[o,a]=useState(0),[s,i]=useState(r),l=s&&(n===void 0||o<n);gi(()=>{a(p=>p+1);},l?t:null);let c=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),m=useCallback(()=>i(p=>!p),[]),f=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:c,stop:d,reset:f,toggle:m}}function _x(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setTimeout(()=>{n.current();},t);return ()=>{clearTimeout(r);}},[t]);}function yS(e,t){let[n,r]=useState(false),o=useRef(null),a=useRef(e);a.current=e;let s=useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null),r(false);},[]),i=useCallback(()=>{s(),r(true),o.current=setTimeout(()=>{a.current(),r(false);},t);},[t,s]),l=useCallback(()=>{i();},[i]);return useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{start:i,cancel:s,reset:l,isScheduled:n}}function RS(e,t){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function wS(e,t=true){let[n,r]=useState(false);return _x(()=>{r(true);},t?e:null),n}function CS(e,t=true){let[n,r]=useState(t),[o,a]=useState(0),[s,i]=useState(0),l=useRef(e);l.current=e;let c=useRef(null),d=useRef(0),m=useRef(0),f=useRef(0),p=useRef(0),g=useCallback(v=>{let y=d.current?v-d.current:0;d.current=v,p.current++,v-f.current>=1e3&&(a(p.current),p.current=0,f.current=v),m.current++,i(m.current),l.current(y,v),c.current=requestAnimationFrame(g);},[]),h=useCallback(()=>{c.current===null&&(d.current=0,f.current=performance.now(),p.current=0,c.current=requestAnimationFrame(g),r(true));},[g]),b=useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null,r(false));},[]);return useEffect(()=>(t&&h(),()=>{c.current!==null&&cancelAnimationFrame(c.current);}),[t,h]),{start:h,stop:b,isRunning:n,frameCount:s,fps:o}}function TS(e,t={}){let{duration:n=300,easing:r="easeOutCubic"}=t,[o,a]=useState(e),s=useRef(e),i=useRef(null),l=useRef(null),c={linear:d=>d,easeInCubic:d=>d*d*d,easeOutCubic:d=>1-Math.pow(1-d,3),easeInOutCubic:d=>d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2};return useEffect(()=>{if(o===e)return;s.current=o,i.current=null;let d=m=>{i.current===null&&(i.current=m);let f=m-i.current,p=Math.min(f/n,1),g=c[r](p),h=s.current+(e-s.current)*g;a(h),p<1&&(l.current=requestAnimationFrame(d));};return l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r]),o}function MS(e,t={}){let{stiffness:n=100,damping:r=10,mass:o=1}=t,[a,s]=useState(e),i=useRef(0),l=useRef(null),c=useRef(null);return useEffect(()=>{if(Math.abs(a-e)<.01&&Math.abs(i.current)<.01){s(e);return}let d=m=>{c.current===null&&(c.current=m);let f=Math.min((m-c.current)/1e3,.064);c.current=m;let p=(e-a)*n,g=i.current*r,h=(p-g)/o;i.current+=h*f;let b=a+i.current*f;s(b),Math.abs(b-e)>.01||Math.abs(i.current)>.01?l.current=requestAnimationFrame(d):(s(e),i.current=0);};return c.current=null,l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r,o,a]),a}var Zx=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function NS(e,t={}){let{events:n=Zx,initialState:r=false,enabled:o=true}=t,[a,s]=useState(r),i=useRef(null),l=useCallback(()=>{s(false),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{s(true);},e);},[e]);return useEffect(()=>{if(o)return l(),n.forEach(c=>{window.addEventListener(c,l);}),()=>{i.current&&clearTimeout(i.current),n.forEach(c=>{window.removeEventListener(c,l);});}},[o,n,l]),a}function kS(e,t,n,r={}){let{events:o=Zx,initialState:a=false,enabled:s=true}=r,[i,l]=useState(a),c=useRef(null),d=useRef(a),m=useCallback(()=>{d.current&&(d.current=false,n?.()),l(false),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{d.current=true,l(true),t?.();},e);},[e,t,n]);return useEffect(()=>{if(s)return m(),o.forEach(f=>{window.addEventListener(f,m);}),()=>{c.current&&clearTimeout(c.current),o.forEach(f=>{window.removeEventListener(f,m);});}},[s,o,m]),i}function Jx(){let[e,t]=useState(()=>typeof document>"u"?"visible":document.visibilityState);return useEffect(()=>{let n=()=>{t(document.visibilityState);};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}},[]),e}function SS(){return Jx()==="visible"}function LS(e,t){let n=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}),[n]);}function DS(){let[e,t]=useState(()=>typeof navigator>"u"?true:navigator.onLine);return useEffect(()=>{let n=()=>t(true),r=()=>t(false);return window.addEventListener("online",n),window.addEventListener("offline",r),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r);}},[]),e}function HS(e,t){let[n,r]=useState(()=>typeof navigator>"u"?true:navigator.onLine),o=useCallback(()=>{r(true),e?.();},[e]),a=useCallback(()=>{r(false),t?.();},[t]);return useEffect(()=>(window.addEventListener("online",o),window.addEventListener("offline",a),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a);}),[o,a]),n}function ry(e){let[t,n]=useState(false),r=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),o=useCallback(async()=>{let i=e?.current||document.documentElement;try{i.requestFullscreen?await i.requestFullscreen():i.webkitRequestFullscreen?await i.webkitRequestFullscreen():i.mozRequestFullScreen?await i.mozRequestFullScreen():i.msRequestFullscreen&&await i.msRequestFullscreen();}catch(l){console.error("Failed to enter fullscreen:",l);}},[e]),a=useCallback(async()=>{try{document.exitFullscreen?await document.exitFullscreen():document.webkitExitFullscreen?await document.webkitExitFullscreen():document.mozCancelFullScreen?await document.mozCancelFullScreen():document.msExitFullscreen&&await document.msExitFullscreen();}catch(i){console.error("Failed to exit fullscreen:",i);}},[]),s=useCallback(async()=>{t?await a():await o();},[t,o,a]);return useEffect(()=>{let i=()=>{n(!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement));};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i);}},[]),{isFullscreen:t,enter:o,exit:a,toggle:s,isSupported:r}}function zS(){let e=useRef(null),t=ry(e);return {ref:e,...t}}function FS(e={}){let{watch:t=false,immediate:n=true,enableHighAccuracy:r=true,maximumAge:o=0,timeout:a=1e4}=e,[s,i]=useState({isLoading:false,position:null,error:null,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null}),l=typeof navigator<"u"&&"geolocation"in navigator,c=useCallback(f=>{i({isLoading:false,position:f,error:null,latitude:f.coords.latitude,longitude:f.coords.longitude,accuracy:f.coords.accuracy,altitude:f.coords.altitude,altitudeAccuracy:f.coords.altitudeAccuracy,heading:f.coords.heading,speed:f.coords.speed,timestamp:f.timestamp});},[]),d=useCallback(f=>{i(p=>({...p,isLoading:false,error:f}));},[]),m=useCallback(()=>{l&&(i(f=>({...f,isLoading:true,error:null})),navigator.geolocation.getCurrentPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a}));},[l,c,d,r,o,a]);return useEffect(()=>{if(l&&(n&&m(),t)){let f=navigator.geolocation.watchPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(f);}}},[t,n,l,m,c,d,r,o,a]),{...s,getCurrentPosition:m,isSupported:l}}function KS(e,t,n,r){if(e===null||t===null||n===null||r===null)return null;let o=6371e3,a=e*Math.PI/180,s=n*Math.PI/180,i=(n-e)*Math.PI/180,l=(r-t)*Math.PI/180,c=Math.sin(i/2)*Math.sin(i/2)+Math.cos(a)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2),d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return o*d}function $S(e){let[t,n]=useState(null),[r,o]=useState(true),a=typeof navigator<"u"&&"permissions"in navigator,s=useCallback(async()=>{if(!a)return o(false),null;try{o(!0);let i=await navigator.permissions.query({name:e});return n(i.state),o(!1),i.state}catch(i){return console.error(`Permission query failed for ${e}:`,i),o(false),null}},[e,a]);return useEffect(()=>{if(!a){o(false);return}let i=null,l=()=>{i&&n(i.state);};return navigator.permissions.query({name:e}).then(c=>{i=c,n(c.state),o(false),c.addEventListener("change",l);}).catch(()=>{o(false);}),()=>{i&&i.removeEventListener("change",l);}},[e,a]),{state:t,isGranted:t==="granted",isDenied:t==="denied",isPrompt:t==="prompt",isLoading:r,isSupported:a,query:s}}function GS(){let[e,t]=useState(typeof Notification<"u"?Notification.permission:"default"),n=typeof Notification<"u",r=useCallback(async()=>{if(!n)return "default";let o=await Notification.requestPermission();return t(o),o},[n]);return useEffect(()=>{n&&t(Notification.permission);},[n]),{permission:e,request:r,isSupported:n}}function US(e){let[t,n]=useState(null),[r,o]=useState(null),[a,s]=useState(false),i=typeof navigator<"u"&&"mediaDevices"in navigator,l=useCallback(async()=>{if(!i)return null;s(true),o(null);try{let d=await navigator.mediaDevices.getUserMedia(e);return n(d),s(!1),d}catch(d){let m=d instanceof Error?d:new Error(String(d));return o(m),s(false),null}},[e,i]),c=useCallback(()=>{t&&(t.getTracks().forEach(d=>d.stop()),n(null));},[t]);return useEffect(()=>()=>{t&&t.getTracks().forEach(d=>d.stop());},[t]),{stream:t,error:r,isLoading:a,request:l,stop:c,isSupported:i}}function WS(e={}){let{voice:t=null,rate:n=1,pitch:r=1,volume:o=1,lang:a="en-US"}=e,[s,i]=useState(false),[l,c]=useState(false),[d,m]=useState([]),f=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!f)return;let v=()=>{m(window.speechSynthesis.getVoices());};return v(),window.speechSynthesis.addEventListener("voiceschanged",v),()=>{window.speechSynthesis.removeEventListener("voiceschanged",v);}},[f]);let p=useCallback(v=>{if(!f)return;window.speechSynthesis.cancel();let y=new SpeechSynthesisUtterance(v);y.voice=t,y.rate=n,y.pitch=r,y.volume=o,y.lang=a,y.onstart=()=>i(true),y.onend=()=>{i(false),c(false);},y.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(y);},[f,t,n,r,o,a]),g=useCallback(()=>{f&&(window.speechSynthesis.cancel(),i(false),c(false));},[f]),h=useCallback(()=>{f&&(window.speechSynthesis.pause(),c(true));},[f]),b=useCallback(()=>{f&&(window.speechSynthesis.resume(),c(false));},[f]);return {speak:p,stop:g,pause:h,resume:b,isSpeaking:s,isPaused:l,isSupported:f,voices:d}}function _S(e={}){let{lang:t="en-US",continuous:n=false,interimResults:r=true}=e,[o,a]=useState(false),[s,i]=useState(""),[l,c]=useState(""),[d,m]=useState(null),f=useRef(null),p=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=p!==null;useEffect(()=>{if(!g||!p)return;let x=new p;return x.lang=t,x.continuous=n,x.interimResults=r,x.onstart=()=>{a(true),m(null);},x.onend=()=>{a(false);},x.onerror=w=>{m(new Error(w.error)),a(false);},x.onresult=w=>{let C="",R="";for(let T=w.resultIndex;T<w.results.length;T++){let S=w.results[T];S.isFinal?R+=S[0].transcript:C+=S[0].transcript;}R&&i(T=>T+R),c(C);},f.current=x,()=>{x.abort();}},[g,p,t,n,r]);let h=useCallback(()=>{if(f.current&&!o)try{f.current.start();}catch{}},[o]),b=useCallback(()=>{f.current&&f.current.stop();},[]),v=useCallback(()=>{f.current&&f.current.abort();},[]),y=useCallback(()=>{i(""),c(""),m(null);},[]);return {start:h,stop:b,abort:v,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:y}}export{Hu as Accordion,Iu as AccordionItem,yv as ActionBar,Rv as ActionBarButton,pv as ActionGroup,ch as ActionSheet,fy as Alert,by as AlertDescription,gy as AlertTitle,Vb as AreaChart,im as AspectRatio,ux as AudioPlayer,Fg as Autocomplete,Lr as Avatar,Dr as AvatarFallback,Vp as AvatarGroup,so as AvatarImage,ig as BackTop,yy as Badge,eh as Banner,Hb as BarChart,Zh as Blockquote,sh as BottomNavigation,Th as Bounce,Qu as Breadcrumb,om as BreadcrumbEllipsis,em as BreadcrumbItem,tm as BreadcrumbLink,Ju as BreadcrumbList,nm as BreadcrumbPage,rm as BreadcrumbSeparator,pe as Button,nd as ButtonGroup,Yf as COUNTRIES,lo as Calendar,id as Card,ud as CardContent,dd as CardDescription,md as CardFooter,ld as CardHeader,cd as CardTitle,$b as Carousel,Gb as CarouselContent,Ub as CarouselItem,Dl as CarouselNext,Ll as CarouselPrevious,jo as Checkbox,$h as Checkmark,Fp as Chip,Wp as CircularProgress,Kt as CloseButton,Jg as Code,ob as CodeBlock,xh as Collapse,Fu as Collapsible,Ku as CollapsibleContent,Ai as CollapsibleTrigger,Bv as ColorArea,Of as ColorPicker,$v as ColorSlider,oa as ColorSwatch,Af as ColorSwatchPicker,Uv as ColorWheel,Yi as Command,wR as CommandDialog,Cp as CommandEmpty,Tp as CommandGroup,Rp as CommandInput,Np as CommandItem,wp as CommandList,Mp as CommandSeparator,kp as CommandShortcut,sx as ComparisonSlider,Gh as Confetti,cu as ContextMenu,hu as ContextMenuCheckboxItem,fu as ContextMenuContent,uu as ContextMenuGroup,vu as ContextMenuItem,mu as ContextMenuPortal,xu as ContextMenuSection,yu as ContextMenuSeparator,Ru as ContextMenuShortcut,pu as ContextMenuSub,bu as ContextMenuSubContent,gu as ContextMenuSubTrigger,du as ContextMenuTrigger,Nv as ContextualHelp,Pb as CopyButton,Eh as Counter,Gf as CurrencyInput,ga as DEFAULT_COLORS,oR as DataTable,TN as DateField,CN as DateInput,Ws as DatePicker,hb as DateRangePicker,Fi as Drawer,Lm as DrawerBody,Vm as DrawerClose,Em as DrawerContent,Im as DrawerDescription,Dm as DrawerFooter,$m as DrawerGroup,Gm as DrawerGroupLabel,Sm as DrawerHeader,Um as DrawerInset,Om as DrawerMenu,Km as DrawerMenuButton,Bm as DrawerMenuItem,Z0 as DrawerProvider,zm as DrawerSeparator,km as DrawerSidebar,Hm as DrawerTitle,Am as DrawerToggle,Pm as DrawerTrigger,Zt as Dropdown,Jt as DropdownContent,zd as DropdownGroup,Lt as DropdownItem,n0 as DropdownLabel,Ni as DropdownSection,Vd as DropdownSeparator,Ad as DropdownShortcut,Od as DropdownSub,Fd as DropdownSubContent,Bd as DropdownSubTrigger,Qt as DropdownTrigger,Il as EMOJIS,Fs as EMOJI_CATEGORIES,Wb as EmojiPicker,af as EmptyState,yh as Expand,Ck as FAB,bh as Fade,pl as FieldContext,Df as FileUpload,wh as Flip,nc as FloatingActionButton,Kg as Form,ml as FormContext,jg as FormControl,Wg as FormDescription,$g as FormField,Gg as FormItem,Ug as FormLabel,_g as FormMessage,Lb as FullCalendar,Uh as Glow,Iv as GridList,Wh as H1,_h as H2,Yh as H3,qh as H4,ax as HeatmapCalendar,Yu as HoverCard,Xu as HoverCardContent,qu as HoverCardTrigger,lb as Image,Zb as ImageCropper,Tl as ImageViewer,Tb as ImageViewerTrigger,wb as InfiniteScroll,Qh as InlineCode,ao as Input,qp as InputOTP,Xp as InputOTPGroup,Qp as InputOTPSeparator,Zp as InputOTPSlot,Bb as KanbanBoard,Nb as Kbd,Sr as Label,ex as Large,Jh as Lead,Db as LineChart,ag as Link,Tw as List,pf as ListItem,ff as ListItemText,bb as Loading,rl as MASK_PRESETS,Wf as MaskedInput,mg as Menubar,Cg as MenubarCheckboxItem,Rg as MenubarContent,fg as MenubarGroup,wg as MenubarItem,hC as MenubarLabel,pg as MenubarMenu,gg as MenubarPortal,vg as MenubarRadioGroup,Tg as MenubarRadioItem,il as MenubarSection,Mg as MenubarSeparator,Ng as MenubarShortcut,bg as MenubarSub,yg as MenubarSubContent,xg as MenubarSubTrigger,hg as MenubarTrigger,pp as Modal,vp as ModalBody,gp as ModalClose,is as ModalContent,yp as ModalDescription,hp as ModalFooter,bp as ModalHeader,_i as ModalOverlay,Wi as ModalPortal,ss as ModalRoot,xp as ModalTitle,fp as ModalTrigger,nx as Muted,Qf as Navbar,Jf as NavbarBrand,eg as NavbarContent,tg as NavbarItem,ng as NavbarLink,pm as NavigationMenu,hm as NavigationMenuContent,Rm as NavigationMenuIndicator,gm as NavigationMenuItem,ym as NavigationMenuLink,fm as NavigationMenuList,vm as NavigationMenuTrigger,Bi as NavigationMenuViewport,Sp as NumberInput,mx as PDFViewer,rp as Pagination,op as PaginationContent,lp as PaginationEllipsis,ap as PaginationItem,rs as PaginationLink,ip as PaginationNext,sp as PaginationPrevious,Xh as Paragraph,Oh as Parallax,Ep as PasswordInput,qf as PhoneInput,Ib as PieChart,Ph as Pop,vt as Popover,Mn as PopoverAnchor,ht as PopoverContent,rr as PopoverTrigger,Ja as Progress,gh as PullToRefresh,Nh as Pulse,Qb as QRCode,Tu as RadioGroup,Mu as RadioGroupItem,Cv as RangeSlider,zp as Rating,YR as ResizableHandle,_R as ResizablePanel,WR as ResizablePanelGroup,Yb as RichTextEditor,Ch as Ripple,Rh as Rotate,hh as Scale,Oe as ScrollArea,zh as ScrollProgress,Ah as ScrollReveal,Yv as SearchBar,iv as SearchField,kf as SegmentedControl,Pf as SegmentedControlItem,Ga as Select,tr as Separator,Mh as Shake,Qd as Sheet,eu as SheetClose,ru as SheetContent,iu as SheetDescription,au as SheetFooter,ou as SheetHeader,tu as SheetOverlay,Di as SheetPortal,su as SheetTitle,Jd as SheetTrigger,Kh as Shimmer,Fa as Skeleton,vh as Slide,en as Slider,tx as Small,ib as Snippet,eT as SortableList,jh as Sparkles,Ia as Spinner,Qv as SpotlightSearch,cf as StatCard,hv as StatusLight,Sg as Step,Pg as Steps,mh as SwipeActions,vd as Switch,ab as TabbedCodeBlock,Wm as Table,Ym as TableBody,Jm as TableCaption,Qm as TableCell,qm as TableFooter,Zm as TableHead,_m as TableHeader,Xm as TableRow,jd as Tabs,Yd as TabsContent,Wd as TabsList,_d as TabsTrigger,Ev as TagGroup,nf as TagInput,wy as TextBadge,ov as TextField,Lh as TextReveal,hd as Textarea,Jb as ThemeProvider,ev as ThemeToggle,dv as TimeField,Ff as TimeInput,xb as TimePicker,hf as Timeline,Rf as TimelineContent,yf as TimelineItem,wf as TimelineOpposite,m0 as Toaster,Nu as Toggle,Pu as ToggleGroup,Eu as ToggleGroupItem,wn as Tooltip,Tn as TooltipContent,nr as TooltipProvider,Cn as TooltipTrigger,zg as Tree,Sh as Typewriter,rx as UL,Xg as User,cx as VideoPlayer,gT as VirtualList,kh as Wiggle,Dh as WordRotate,xv as actionBarVariants,mv as actionGroupVariants,lh as actionSheetItemVariants,my as alertVariants,gs as applyMask,Bg as autocompleteInputVariants,Ip as avatarGroupVariants,sg as backTopVariants,vy as badgeIndicatorVariants,Jv as bannerVariants,ah as bottomNavigationVariants,ed as buttonGroupVariants,no as buttonVariants,o0 as calculatePasswordStrength,sd as cardVariants,Fb as carouselVariants,fa as chartContainerVariants,Bp as chipVariants,jp as circularProgressVariants,Mm as closeButtonVariants,u as cn,Qg as codeVariants,Vv as colorAreaVariants,Kv as colorSliderVariants,Vf as colorSwatchPickerVariants,If as colorSwatchVariants,Gv as colorWheelVariants,Zl as contextualHelpTriggerVariants,kb as copyButtonVariants,Kf as currencyInputVariants,lv as datePickerVariants,qd as defaultPasswordRequirements,Fm as drawerMenuButtonVariants,jb as emojiPickerVariants,of as emptyStateVariants,Ra as fabVariants,Ef as fileUploadVariants,nl as formatCurrency,xa as formatDate,ps as formatFileSize,bs as formatPhoneNumber,Sb as fullCalendarVariants,Sf as getFileIcon,jf as getMaskPlaceholder,a0 as getPasswordStrengthColor,s0 as getPasswordStrengthLabel,Hv as gridListItemVariants,Dv as gridListVariants,zv as hexToRgb,ei as hsvToRgb,Xb as imageCropperVariants,hl as imageVariants,Cl as infiniteScrollLoaderVariants,wl as infiniteScrollVariants,Yp as inputOTPVariants,nv as inputSizeVariants,Mb as kbdVariants,rv as labelSizeVariants,mf as listItemVariants,ta as listVariants,gb as loadingVariants,Uf as maskedInputVariants,ji as modalContentVariants,Zf as navbarVariants,xm as navigationMenuLinkStyle,bm as navigationMenuTriggerStyle,Ul as parseDate,$f as parseFormattedValue,tC as phoneInputVariants,fh as pullToRefreshVariants,Ol as qrCodeVariants,wv as rangeSliderVariants,Ap as ratingVariants,Ov as rgbToHex,Av as rgbToHsv,_b as richTextEditorVariants,_v as searchBarVariants,sv as searchFieldVariants,Mf as segmentedControlItemVariants,Tf as segmentedControlVariants,Ld as selectVariants,nu as sheetVariants,yd as skeletonVariants,sb as snippetVariants,ub as sortableItemVariants,db as sortableListVariants,Qc as spinnerVariants,lf as statCardVariants,vv as statusLightVariants,Eg as stepVariants,kg as stepsVariants,oc as swipeActionVariants,uh as swipeActionsVariants,za as switchColors,Ql as tagGroupItemVariants,Pv as tagGroupVariants,tf as tagVariants,Ry as textBadgeVariants,tv as textFieldVariants,mN as themeToggleVariants,cv as timeFieldVariants,Bf as timeInputVariants,xf as timelineItemVariants,vf as timelineVariants,qa as toggleVariants,Hg as treeItemVariants,Dg as treeVariants,ol as unmask,TS as useAnimatedValue,Kx as useAsync,mS as useAsyncRetry,VE as useBodyScrollLock,qE as useBooleanToggle,qP as useBreakpoint,XP as useBreakpoints,xi as useButtonGroup,Bs as useCarousel,mE as useClickOutside,pE as useClickOutsideMultiple,_k as useConfetti,gE as useCopy,fE as useCopyToClipboard,hS as useCountdown,ZE as useCounter,YE as useCycle,oE as useDebounce,aE as useDebouncedCallback,sE as useDebouncedCallbackWithControls,RS as useDelayedValue,Lx as useDisclosure,WE as useDisclosureOpen,KS as useDistance,SS as useDocumentIsVisible,Jx as useDocumentVisibility,LS as useDocumentVisibilityCallback,G0 as useDrawer,GE as useElementSize,xE as useEventListener,yE as useEventListenerRef,fS as useFetch,ws as useFieldContext,LE as useFocusTrap,DE as useFocusTrapRef,fl as useFormContext,ry as useFullscreen,zS as useFullscreenRef,FS as useGeolocation,bE as useHotkeys,vE as useHotkeysMap,CE as useHover,NE as useHoverDelay,ME as useHoverProps,TE as useHoverRef,NS as useIdle,kS as useIdleCallback,QE as useIncrementCounter,kx as useIntersectionObserver,zE as useIntersectionObserverRef,gi as useInterval,vS as useIntervalControls,FP as useIsDesktop,OP as useIsMobile,BP as useIsTablet,RE as useKeyPress,hE as useKeyPressed,HT as useKeyboardShortcut,OE as useLazyLoad,oS as useList,JP as useLocalStorage,wE as useLongPress,aS as useMap,US as useMediaPermission,Ko as useMediaQuery,PE as useMouse,EE as useMouseElement,SE as useMouseElementRef,gS as useMutation,BE as useMutationObserver,FE as useMutationObserverRef,GS as useNotificationPermission,DS as useOnlineStatus,HS as useOnlineStatusCallback,$S as usePermission,KP as usePrefersColorScheme,$P as usePrefersReducedMotion,JE as usePrevious,tS as usePreviousDistinct,eS as usePreviousWithInitial,cS as useQueue,CS as useRafLoop,sS as useRecord,KE as useResizeObserver,$E as useResizeObserverRef,Tx as useScrollLock,HE as useScrollPosition,lS as useSelection,tE as useSessionStorage,zx as useSet,_S as useSpeechRecognition,WS as useSpeechSynthesis,mk as useSpotlight,MS as useSpringValue,dS as useStack,cE as useThrottle,dE as useThrottledCallback,_x as useTimeout,yS as useTimeoutControls,wS as useTimeoutFlag,xS as useTimer,_E as useToggle,YP as useWindowHeight,IE as useWindowScroll,Na as useWindowSize,_P as useWindowWidth,qg as userVariants,Lf as validateFile,FC as validators,yb as virtualListVariants};//# sourceMappingURL=index.js.map
72
+ `})]})});Kh.displayName="Shimmer";var jk={sm:24,md:40,lg:56,xl:80},Wk={default:{circle:"stroke-muted-foreground",check:"stroke-foreground"},success:{circle:"stroke-green-500",check:"stroke-green-500"},primary:{circle:"stroke-primary",check:"stroke-primary"},outline:{circle:"stroke-border",check:"stroke-foreground"}},$h=Z.forwardRef(({show:e=true,size:t="md",variant:n="success",strokeWidth:r=2,duration:o=.6,delay:a=0,className:s,onComplete:i},l)=>{let c=jk[t],d=Wk[n],m={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a,ease:"easeOut"}}},f={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a+o*.4,ease:"easeOut"}}};return jsxs("svg",{ref:l,width:c,height:c,viewBox:"0 0 50 50",className:u(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:r,className:d.circle,variants:m,initial:"hidden",animate:e?"visible":"hidden"}),jsx(motion.path,{d:"M14 27 L22 35 L36 18",fill:"none",strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round",className:d.check,variants:f,initial:"hidden",animate:e?"visible":"hidden",onAnimationComplete:()=>e&&i?.()})]})});$h.displayName="Checkmark";var Bo={particleCount:100,spread:70,startVelocity:30,decay:.95,gravity:1,colors:["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"],origin:{x:.5,y:.5},shapes:["square","circle"],scalar:1,drift:0,ticks:200},Gh=Z.forwardRef(({autoTrigger:e=false,delay:t=0,options:n={},children:r,onTrigger:o},a)=>{let s=Z.useCallback(()=>{let i={...Bo,...n};Oo(i),o?.();},[n,o]);return Z.useEffect(()=>{if(e){let i=setTimeout(s,t);return ()=>clearTimeout(i)}},[e,t,s]),r?jsx("div",{ref:a,onClick:s,className:"inline-block cursor-pointer",children:r}):null});Gh.displayName="Confetti";var _k=()=>{let e=Z.useCallback(r=>{let o={...Bo,...r};Oo(o);},[]),t=Z.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);Oo({...Bo,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),Oo({...Bo,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),n=Z.useCallback((r="both")=>{let o={x:0,y:1},a={x:1,y:1};(r==="left"||r==="both")&&Oo({...Bo,particleCount:50,angle:60,spread:55,origin:o}),(r==="right"||r==="both")&&Oo({...Bo,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:n}},Uh=Z.forwardRef(({children:e,color:t="hsl(var(--primary))",intensity:n=20,spread:r=0,animate:o=false,duration:a=2,className:s},i)=>{let l={boxShadow:`0 0 ${n}px ${r}px ${t}`};return o?jsx(motion.div,{ref:i,className:u("rounded-[inherit]",s),animate:{boxShadow:[`0 0 ${n}px ${r}px ${t}`,`0 0 ${n*1.5}px ${r+5}px ${t}`,`0 0 ${n}px ${r}px ${t}`]},transition:{duration:a,repeat:1/0,ease:"easeInOut"},children:e}):jsx("div",{ref:i,className:u("rounded-[inherit]",s),style:l,children:e})});Uh.displayName="Glow";var Fh=(e,t)=>({id:Math.random().toString(36).substr(2,9),x:`${Math.random()*100}%`,y:`${Math.random()*100}%`,size:Math.random()*(t-e)+e,delay:Math.random()*2}),jh=Z.forwardRef(({children:e,count:t=10,color:n="hsl(var(--primary))",minSize:r=4,maxSize:o=8,duration:a=1.5,className:s},i)=>{let[l,c]=Z.useState([]);return Z.useEffect(()=>{let d=Array.from({length:t},()=>Fh(r,o));c(d);let m=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=Fh(r,o),p});},a*500);return ()=>clearInterval(m)},[t,r,o,a]),jsxs("div",{ref:i,className:u("relative inline-block",s),children:[e,l.map(d=>jsx(motion.svg,{className:"pointer-events-none absolute",style:{left:d.x,top:d.y,width:d.size,height:d.size},viewBox:"0 0 24 24",initial:{scale:0,opacity:0,rotate:0},animate:{scale:[0,1,0],opacity:[0,1,0],rotate:[0,180]},transition:{duration:a,delay:d.delay,repeat:1/0,ease:"easeInOut"},children:jsx("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z",fill:n})},d.id))]})});jh.displayName="Sparkles";var Wh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("h1",{ref:r,className:u("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...n,children:t}));Wh.displayName="H1";var _h=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("h2",{ref:r,className:u("scroll-m-20 text-3xl font-semibold tracking-tight",e),...n,children:t}));_h.displayName="H2";var Yh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("h3",{ref:r,className:u("scroll-m-20 text-2xl font-semibold tracking-tight",e),...n,children:t}));Yh.displayName="H3";var qh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("h4",{ref:r,className:u("scroll-m-20 text-xl font-semibold tracking-tight",e),...n,children:t}));qh.displayName="H4";var Xh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("leading-7 [&:not(:first-child)]:mt-6",e),...n,children:t}));Xh.displayName="Paragraph";var Zh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("blockquote",{ref:r,className:u("mt-6 border-l-2 pl-6 italic",e),...n,children:t}));Zh.displayName="Blockquote";var Qh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("code",{ref:r,className:u("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...n,children:t}));Qh.displayName="InlineCode";var Jh=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-xl text-muted-foreground",e),...n,children:t}));Jh.displayName="Lead";var ex=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("text-lg font-semibold",e),...n,children:t}));ex.displayName="Large";var tx=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("small",{ref:r,className:u("text-sm font-medium leading-none",e),...n,children:t}));tx.displayName="Small";var nx=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...n,children:t}));nx.displayName="Muted";var rx=Z.forwardRef(({className:e,children:t,...n},r)=>jsx("ul",{ref:r,className:u("my-6 ml-6 list-disc [&>li]:mt-2",e),...n,children:t}));rx.displayName="UL";function Yk(){let[e,t]=Z.useState(false);return Z.useEffect(()=>{t(true);},[]),e}var qk=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Xk=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dc={default:["bg-muted","bg-emerald-200 dark:bg-emerald-900","bg-emerald-300 dark:bg-emerald-700","bg-emerald-500 dark:bg-emerald-500","bg-emerald-700 dark:bg-emerald-300"],success:["bg-muted","bg-green-200 dark:bg-green-900","bg-green-300 dark:bg-green-700","bg-green-500 dark:bg-green-500","bg-green-700 dark:bg-green-300"],warning:["bg-muted","bg-amber-200 dark:bg-amber-900","bg-amber-300 dark:bg-amber-700","bg-amber-500 dark:bg-amber-500","bg-amber-700 dark:bg-amber-300"],danger:["bg-muted","bg-red-200 dark:bg-red-900","bg-red-300 dark:bg-red-700","bg-red-500 dark:bg-red-500","bg-red-700 dark:bg-red-300"],primary:["bg-muted","bg-primary/20","bg-primary/40","bg-primary/60","bg-primary/80"],secondary:["bg-muted","bg-secondary/40","bg-secondary/60","bg-secondary/80","bg-secondary"]},uc={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"};function ox(e){return e.toISOString().split("T")[0]}function Zk(e){return e instanceof Date?e:new Date(e)}function Qk(e,t){let n=[],r=new Date(e);for(r.setDate(r.getDate()-r.getDay());r<=t;){let o=[];for(let a=0;a<7;a++)o.push(new Date(r)),r.setDate(r.getDate()+1);n.push(o);}return n}function Jk(e){let t=[],n=-1;return e.forEach((r,o)=>{let a=r.find(s=>s.getDate()<=7);a&&a.getMonth()!==n&&(n=a.getMonth(),t.push({month:Xk[n],position:o}));}),t}var ax=Z.forwardRef(({className:e,values:t,startDate:n,endDate:r,color:o="default",levels:a=5,showMonthLabels:s=true,showWeekdayLabels:i=true,showTooltip:l=true,tooltipFormatter:c,colorScale:d,gap:m=3,cellSize:f=12,radius:p="sm",onCellClick:g,emptyColor:h,showLegend:b=true,legendLabels:v={less:"Less",more:"More"},...y},x)=>{let w=Yk(),{startDate:C,endDate:R}=Z.useMemo(()=>{let P=r?new Date(r):new Date;return {startDate:n?new Date(n):new Date(P.getFullYear()-1,P.getMonth(),P.getDate()),endDate:P}},[n,r]),T=Z.useMemo(()=>{let P=new Map;return t.forEach(E=>{let I=Zk(E.date),V=ox(I);P.set(V,(P.get(V)||0)+E.count);}),P},[t]),S=Z.useMemo(()=>T.size===0?0:Math.max(...Array.from(T.values())),[T]),D=Z.useMemo(()=>Qk(C,R),[C,R]),k=Z.useMemo(()=>Jk(D),[D]),L=P=>{if(P===0)return h||d?.[0]||dc[o][0];let E=d||dc[o],I=Math.min(Math.ceil(P/S*(a-1)),a-1);return E[I]||E[E.length-1]},M=(P,E)=>{if(c)return c(P,E);let I=P.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"});return jsxs("span",{children:[jsx("span",{className:"font-medium",children:E})," contributions on ",I]})},N=(P,E,I)=>{let V=ox(P),O=T.get(V)||0;if(!(P>=C&&P<=R))return jsx("div",{style:{width:f,height:f}},`${E}-${I}`);let B=jsx("div",{className:u("transition-all duration-200",uc[p],L(O),g&&"cursor-pointer hover:ring-2 hover:ring-foreground/50 hover:ring-offset-1"),style:{width:f,height:f},onClick:()=>g?.(P,O),role:g?"button":void 0,tabIndex:g?0:void 0,onKeyDown:z=>{g&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),g(P,O));}});return l?jsxs(wn,{children:[jsx(Cn,{className:u("transition-all duration-200 border-0 bg-transparent p-0",uc[p],L(O),g&&"cursor-pointer hover:ring-2 hover:ring-foreground/50 hover:ring-offset-1"),style:{width:f,height:f},onClick:()=>g?.(P,O),onKeyDown:z=>{g&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),g(P,O));}}),jsx(Tn,{children:M(P,O)})]},`${E}-${I}`):jsx(Z.Fragment,{children:B},`${E}-${I}`)},H=d||dc[o];return w?jsxs("div",{ref:x,className:u("inline-flex flex-col",e),...y,children:[jsxs("div",{className:"flex",children:[i&&jsx("div",{className:"flex flex-col justify-between pr-2",style:{gap:m,marginTop:s?20:0},children:qk.map((P,E)=>jsx("div",{className:u("text-xs text-muted-foreground",E%2===1&&"invisible"),style:{height:f,lineHeight:`${f}px`},children:P},P))}),jsxs("div",{className:"flex flex-col",children:[s&&jsx("div",{className:"relative mb-1",style:{height:16,width:D.length*(f+m)-m},children:k.map(({month:P,position:E},I)=>jsx("div",{className:"absolute text-xs text-muted-foreground whitespace-nowrap",style:{left:E*(f+m)},children:P},`${P}-${I}`))}),jsx("div",{className:"flex",style:{gap:m},children:D.map((P,E)=>jsx("div",{className:"flex flex-col",style:{gap:m},children:P.map((I,V)=>N(I,E,V))},E))})]})]}),b&&jsxs("div",{className:"flex items-center justify-end mt-4 gap-2",children:[jsx("span",{className:"text-xs text-muted-foreground",children:v.less}),jsx("div",{className:"flex",style:{gap:m/2},children:H.slice(0,a).map((P,E)=>jsx("div",{className:u(uc[p],P),style:{width:f,height:f}},E))}),jsx("span",{className:"text-xs text-muted-foreground",children:v.more})]})]}):jsx("div",{ref:x,className:u("inline-flex flex-col",e),...y})});ax.displayName="HeatmapCalendar";var sx=Z.forwardRef(({className:e,beforeImage:t,afterImage:n,beforeAlt:r="Before",afterAlt:o="After",defaultPosition:a=50,position:s,onPositionChange:i,orientation:l="horizontal",showLabels:c=true,beforeLabel:d="Before",afterLabel:m="After",handleVariant:f="default",handleColor:p="default",aspectRatio:g,disableKeyboard:h=false,handleWidth:b=4,...v},y)=>{let[x,w]=Z.useState(a),C=s!==void 0,R=C?s:x,T=Z.useRef(null),[S,D]=Z.useState(false),[k,L]=Z.useState({width:0,height:0});Z.useEffect(()=>{let z=()=>{T.current&&L({width:T.current.offsetWidth,height:T.current.offsetHeight});};z();let F=new ResizeObserver(z);return T.current&&F.observe(T.current),()=>F.disconnect()},[]);let M=z=>{let F=Math.max(0,Math.min(100,z));C||w(F),i?.(F);},N=(z,F)=>{if(!T.current)return R;let j=T.current.getBoundingClientRect();return l==="horizontal"?(z-j.left)/j.width*100:(F-j.top)/j.height*100},H=z=>{z.preventDefault(),D(true),z.target.setPointerCapture(z.pointerId);let F=N(z.clientX,z.clientY);M(F);},P=z=>{if(!S)return;let F=N(z.clientX,z.clientY);M(F);},E=()=>{D(false);},I=z=>{if(h)return;let F=z.shiftKey?10:1,j=R;switch(z.key){case "ArrowLeft":case "ArrowUp":z.preventDefault(),j=R-F;break;case "ArrowRight":case "ArrowDown":z.preventDefault(),j=R+F;break;case "Home":z.preventDefault(),j=0;break;case "End":z.preventDefault(),j=100;break;default:return}M(j);},V={default:"bg-border",primary:"bg-primary",white:"bg-white",black:"bg-black"},O={default:"bg-background border-border text-foreground",primary:"bg-primary border-primary text-primary-foreground",white:"bg-white border-white text-black",black:"bg-black border-black text-white"},A=()=>{let z=l==="horizontal",F=u("absolute z-10 flex items-center justify-center",z?"top-0 bottom-0 cursor-ew-resize":"left-0 right-0 cursor-ns-resize",V[p]),j=z?{left:`${R}%`,width:b,transform:"translateX(-50%)"}:{top:`${R}%`,height:b,transform:"translateY(-50%)"};return f==="minimal"?jsx("div",{className:F,style:j}):f==="arrows"?jsx("div",{className:F,style:j,children:jsxs("div",{className:u("absolute flex items-center justify-center gap-0.5 rounded-full p-1.5 shadow-md border-2",O[p],z?"flex-row":"flex-col"),children:[jsx("svg",{className:u("w-3 h-3",z?"-rotate-0":"rotate-90"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M15 18l-6-6 6-6"})}),jsx("svg",{className:u("w-3 h-3",z?"-rotate-0":"rotate-90"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M9 18l6-6-6-6"})})]})}):jsx("div",{className:F,style:j,children:jsx("div",{className:u("absolute rounded-full p-2 shadow-md border-2",O[p]),children:jsxs("svg",{className:u("w-4 h-4",z?"":"rotate-90"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M8 3L4 7l4 4"}),jsx("path",{d:"M16 3l4 4-4 4"}),jsx("path",{d:"M4 7h16"}),jsx("path",{d:"M8 17l-4 4 4 4"}),jsx("path",{d:"M16 17l4 4-4 4"}),jsx("path",{d:"M4 21h16"})]})})})},B=l==="horizontal";return jsx("div",{ref:y,className:u("relative select-none overflow-hidden rounded-lg",S&&"cursor-grabbing",e),style:g?{aspectRatio:g}:void 0,...v,children:jsxs("div",{ref:T,className:"relative w-full h-full",role:"slider",tabIndex:0,"aria-valuenow":R,"aria-valuemin":0,"aria-valuemax":100,"aria-orientation":l,"aria-label":"Comparison slider",onPointerDown:H,onPointerMove:P,onPointerUp:E,onPointerCancel:E,onKeyDown:I,children:[jsx("img",{src:n,alt:o,className:"absolute inset-0 w-full h-full object-cover",draggable:false}),jsx("div",{className:"absolute inset-0 overflow-hidden",style:B?{width:`${R}%`}:{height:`${R}%`},children:jsx("img",{src:t,alt:r,className:"absolute object-cover",style:{top:0,left:0,width:k.width>0?`${k.width}px`:"100%",height:k.height>0?`${k.height}px`:"100%"},draggable:false})}),A(),c&&jsxs(Fragment,{children:[jsx("div",{className:u("absolute px-2 py-1 text-xs font-medium rounded bg-black/70 text-white pointer-events-none","top-3 left-3"),children:d}),jsx("div",{className:u("absolute px-2 py-1 text-xs font-medium rounded bg-black/70 text-white pointer-events-none",B?"top-3 right-3":"bottom-3 left-3"),children:m})]})]})})});sx.displayName="ComparisonSlider";function lx(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60);return t>0?`${t}:${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`:`${n}:${r.toString().padStart(2,"0")}`}var uP={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},cx=Z.forwardRef(({className:e,src:t,poster:n,autoPlay:r=false,muted:o=false,loop:a=false,controls:s=true,preload:i="metadata",aspectRatio:l="16/9",defaultVolume:c=1,playbackSpeeds:d=[.5,.75,1,1.25,1.5,2],showPiP:m=true,showFullscreen:f=true,showVolume:p=true,showPlaybackSpeed:g=true,showSkipButtons:h=false,skipInterval:b=10,onPlay:v,onPause:y,onEnded:x,onVideoTimeUpdate:w,onVideoVolumeChange:C,controlsHideTimeout:R=3e3,keyboardShortcuts:T=true,doubleClickFullscreen:S=true,radius:D="lg",...k},L)=>{let M=Z.useRef(null),N=Z.useRef(null),H=Z.useRef(null),[P,E]=Z.useState(false),[I,V]=Z.useState(0),[O,A]=Z.useState(0),[B,z]=Z.useState(c),[F,j]=Z.useState(o),[K,G]=Z.useState(false),[Y,U]=Z.useState(true),[$,q]=Z.useState(true),[te,_]=Z.useState(1),[ve,Q]=Z.useState(0),oe=Z.useMemo(()=>typeof t=="string"?[{src:t,type:void 0,label:void 0}]:t,[t]),[Te,me]=Z.useState(0),Ye=Z.useCallback(()=>{H.current&&clearTimeout(H.current),q(true),P&&R>0&&(H.current=setTimeout(()=>{q(false);},R));},[P,R]);Z.useEffect(()=>(Ye(),()=>{H.current&&clearTimeout(H.current);}),[P,Ye]);let Ze=()=>{N.current&&(A(N.current.duration),U(false));},Tt=()=>{if(N.current){V(N.current.currentTime),w?.(N.current.currentTime,N.current.duration);let se=N.current.buffered.length>0?N.current.buffered.end(N.current.buffered.length-1):0;Q(se/N.current.duration*100);}},Se=()=>{E(true),v?.();},ot=()=>{E(false),y?.();},ne=()=>{E(false),x?.();},W=()=>{U(true);},ae=()=>{U(false);},X=()=>{N.current&&(P?N.current.pause():N.current.play());},J=se=>{if(N.current){let Re=se[0]/100*O;N.current.currentTime=Re,V(Re);}},ee=se=>{let Re=se[0]/100;z(Re),j(Re===0),N.current&&(N.current.volume=Re,N.current.muted=Re===0),C?.(Re,Re===0);},Ae=()=>{if(N.current){let se=!F;N.current.muted=se,j(se),se?N.current.volume=0:N.current.volume=B||1,C?.(se?0:B,se);}},Le=async()=>{if(M.current)try{K?await document.exitFullscreen():await M.current.requestFullscreen();}catch{}},Rn=async()=>{if(N.current)try{document.pictureInPictureElement?await document.exitPictureInPicture():await N.current.requestPictureInPicture();}catch{}},ye=se=>{N.current&&(N.current.currentTime=Math.max(0,Math.min(O,N.current.currentTime+se)));},Qe=se=>{N.current&&(N.current.playbackRate=se,_(se));};Z.useEffect(()=>{let se=()=>{G(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",se),()=>{document.removeEventListener("fullscreenchange",se);}},[]),Z.useEffect(()=>{if(!T)return;let se=Re=>{if(!(!M.current?.contains(document.activeElement)&&document.activeElement!==M.current))switch(Re.key.toLowerCase()){case " ":case "k":Re.preventDefault(),X();break;case "f":Re.preventDefault(),Le();break;case "m":Re.preventDefault(),Ae();break;case "arrowleft":Re.preventDefault(),ye(-b);break;case "arrowright":Re.preventDefault(),ye(b);break;case "arrowup":Re.preventDefault(),ee([Math.min(100,B*100+10)]);break;case "arrowdown":Re.preventDefault(),ee([Math.max(0,B*100-10)]);break}};return window.addEventListener("keydown",se),()=>{window.removeEventListener("keydown",se);}},[T,P,B,b]);let Bt=()=>{S&&Le();},Ge=O>0?I/O*100:0;return jsxs("div",{ref:se=>{M.current=se,typeof L=="function"?L(se):L&&(L.current=se);},className:u("relative bg-black overflow-hidden group",uP[D],e),style:{aspectRatio:l},onMouseMove:Ye,onMouseLeave:()=>P&&q(false),tabIndex:0,...k,children:[jsx("video",{ref:N,className:"w-full h-full object-contain",poster:n,autoPlay:r,muted:o,loop:a,preload:i,playsInline:true,onClick:X,onDoubleClick:Bt,onLoadedMetadata:Ze,onTimeUpdate:Tt,onPlay:Se,onPause:ot,onEnded:ne,onWaiting:W,onCanPlay:ae,children:oe.map((se,Re)=>jsx("source",{src:se.src,type:se.type},Re))}),Y&&jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20",children:jsx(Loader2,{className:"w-12 h-12 text-white animate-spin"})}),!P&&!Y&&jsx("button",{type:"button",className:"absolute inset-0 flex items-center justify-center bg-black/30 transition-opacity cursor-pointer",onClick:X,children:jsx("div",{className:"w-16 h-16 rounded-full bg-white/90 flex items-center justify-center",children:jsx(Play,{className:"w-8 h-8 text-black ml-1",fill:"currentColor"})})}),s&&jsxs("div",{className:u("absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-4 pt-16 transition-opacity duration-300",$?"opacity-100":"opacity-0 pointer-events-none"),children:[jsxs("div",{className:"relative mb-3 group/progress",children:[jsx("div",{className:"absolute top-1/2 left-0 h-1 bg-white/30 rounded-full -translate-y-1/2",style:{width:`${ve}%`}}),jsx(en,{value:[Ge],onValueChange:J,min:0,max:100,step:.1,className:"h-1 group-hover/progress:h-2 transition-all cursor-pointer [&_[role=slider]]:w-3 [&_[role=slider]]:h-3 [&_[role=slider]]:opacity-0 group-hover/progress:[&_[role=slider]]:opacity-100 [&_[role=slider]]:transition-opacity"})]}),jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:X,children:P?jsx(Pause,{className:"w-5 h-5",fill:"currentColor"}):jsx(Play,{className:"w-5 h-5",fill:"currentColor"})}),h&&jsxs(Fragment,{children:[jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:()=>ye(-b),children:jsx(SkipBack,{className:"w-5 h-5"})}),jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:()=>ye(b),children:jsx(SkipForward,{className:"w-5 h-5"})})]}),p&&jsxs("div",{className:"flex items-center gap-1 group/volume",children:[jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:Ae,children:F||B===0?jsx(VolumeX,{className:"w-5 h-5"}):jsx(Volume2,{className:"w-5 h-5"})}),jsx("div",{className:"w-0 overflow-hidden group-hover/volume:w-20 transition-all",children:jsx(en,{value:[F?0:B*100],onValueChange:ee,min:0,max:100,step:1,className:"w-20"})})]}),jsxs("div",{className:"text-white text-sm ml-2",children:[lx(I)," / ",lx(O)]})]}),jsxs("div",{className:"flex items-center gap-1",children:[g&&jsxs(Zt,{children:[jsx(Qt,{children:jsxs("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer flex items-center gap-1",children:[jsx(Settings,{className:"w-5 h-5"}),jsxs("span",{className:"text-xs",children:[te,"x"]})]})}),jsx(Jt,{align:"end",className:"min-w-[100px]",children:d.map(se=>jsxs(Lt,{onSelect:()=>Qe(se),className:u(te===se&&"bg-primary/10 text-primary"),children:[se,"x"]},se))})]}),oe.length>1&&jsxs(Zt,{children:[jsx(Qt,{children:jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer text-xs",children:oe[Te]?.quality||oe[Te]?.label||"Quality"})}),jsx(Jt,{align:"end",className:"min-w-[100px]",children:oe.map((se,Re)=>jsx(Lt,{onSelect:()=>{let Nr=N.current?.currentTime||0;me(Re),setTimeout(()=>{N.current&&(N.current.currentTime=Nr,P&&N.current.play());},100);},className:u(Te===Re&&"bg-primary/10 text-primary"),children:se.quality||se.label||`Source ${Re+1}`},Re))})]}),m&&typeof document<"u"&&document.pictureInPictureEnabled&&jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:Rn,children:jsx(PictureInPicture,{className:"w-5 h-5"})}),f&&jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:Le,children:K?jsx(Minimize,{className:"w-5 h-5"}):jsx(Maximize,{className:"w-5 h-5"})})]})]})]})]})});cx.displayName="VideoPlayer";function Ma(e){if(!e||!isFinite(e))return "0:00";let t=Math.floor(e/60),n=Math.floor(e%60);return `${t}:${n.toString().padStart(2,"0")}`}var dx={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},RP={default:{progress:"bg-foreground",waveformActive:"bg-foreground",waveformInactive:"bg-muted-foreground/30"},primary:{progress:"bg-primary",waveformActive:"bg-primary",waveformInactive:"bg-primary/20"},success:{progress:"bg-green-500",waveformActive:"bg-green-500",waveformInactive:"bg-green-500/20"},warning:{progress:"bg-amber-500",waveformActive:"bg-amber-500",waveformInactive:"bg-amber-500/20"},danger:{progress:"bg-red-500",waveformActive:"bg-red-500",waveformInactive:"bg-red-500/20"}},ux=Z.forwardRef(({className:e,src:t,autoPlay:n=false,defaultVolume:r=1,loop:o=false,muted:a=false,showWaveform:s=true,waveformData:i,waveformBars:l=50,showTrackInfo:c=true,showVolume:d=true,showSkipButtons:m=false,skipInterval:f=10,showLoop:p=true,showShuffle:g=false,showDownload:h=false,variant:b="default",color:v="default",customColor:y,onPlay:x,onPause:w,onEnded:C,onAudioTimeUpdate:R,radius:T="lg",...S},D)=>{let k=Z.useRef(null),L=Z.useRef(null),[M,N]=Z.useState(false),[H,P]=Z.useState(0),[E,I]=Z.useState(0),[V,O]=Z.useState(r),[A,B]=Z.useState(a),[z,F]=Z.useState(true),[j,K]=Z.useState(o),[G,Y]=Z.useState(false),U=Z.useMemo(()=>typeof t=="string"?{src:t}:t,[t]),$=Z.useMemo(()=>{if(i)return i;let J=[];for(let ee=0;ee<l;ee++)J.push(.2+Math.random()*.8);return J},[i,l]),q=()=>{k.current&&(I(k.current.duration),F(false));},te=()=>{k.current&&(P(k.current.currentTime),R?.(k.current.currentTime,k.current.duration));},_=()=>{N(true),x?.();},ve=()=>{N(false),w?.();},Q=()=>{N(false),C?.();},oe=()=>{F(false);},Te=()=>{k.current&&(M?k.current.pause():k.current.play());},me=J=>{if(k.current&&E){let ee=J/100*E;k.current.currentTime=ee,P(ee);}},Ye=J=>{if(!L.current||!E)return;let ee=L.current.getBoundingClientRect(),Ae=(J.clientX-ee.left)/ee.width*100;me(Ae);},Ze=J=>{let ee=J[0]/100;O(ee),B(ee===0),k.current&&(k.current.volume=ee,k.current.muted=ee===0);},Tt=()=>{if(k.current){let J=!A;k.current.muted=J,B(J);}},Se=()=>{if(k.current){let J=!j;k.current.loop=J,K(J);}},ot=J=>{k.current&&(k.current.currentTime=Math.max(0,Math.min(E,k.current.currentTime+J)));},ne=()=>{let J=document.createElement("a");J.href=U.src,J.download=U.title||"audio",document.body.appendChild(J),J.click(),document.body.removeChild(J);},W=E>0?H/E*100:0,ae=RP[v],X=A||V===0?VolumeX:V<.5?Volume1:Volume2;return b==="compact"?jsxs("div",{ref:D,className:u("flex items-center gap-3 p-2 bg-muted/50",dx[T],e),...S,children:[jsx("audio",{ref:k,src:U.src,autoPlay:n,loop:j,muted:a,onLoadedMetadata:q,onTimeUpdate:te,onPlay:_,onPause:ve,onEnded:Q,onCanPlay:oe}),jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded-full transition-colors cursor-pointer",onClick:Te,disabled:z,children:z?jsx(Loader2,{className:"w-4 h-4 animate-spin"}):M?jsx(Pause,{className:"w-4 h-4",fill:"currentColor"}):jsx(Play,{className:"w-4 h-4",fill:"currentColor"})}),jsx("div",{className:"flex-1",children:jsx(en,{value:[W],onValueChange:J=>me(J[0]),min:0,max:100,step:.1,className:"h-1"})}),jsx("span",{className:"text-xs text-muted-foreground min-w-[35px]",children:Ma(H)})]}):b==="minimal"?jsxs("div",{ref:D,className:u("flex items-center gap-4",e),...S,children:[jsx("audio",{ref:k,src:U.src,autoPlay:n,loop:j,muted:a,onLoadedMetadata:q,onTimeUpdate:te,onPlay:_,onPause:ve,onEnded:Q,onCanPlay:oe}),jsx("button",{type:"button",className:u("p-3 rounded-full transition-colors cursor-pointer",!y&&ae.progress,"text-white hover:opacity-90"),style:y?{backgroundColor:y}:void 0,onClick:Te,disabled:z,children:z?jsx(Loader2,{className:"w-5 h-5 animate-spin"}):M?jsx(Pause,{className:"w-5 h-5",fill:"currentColor"}):jsx(Play,{className:"w-5 h-5 ml-0.5",fill:"currentColor"})}),jsxs("div",{className:"flex-1 flex flex-col gap-1",children:[c&&U.title&&jsx("span",{className:"text-sm font-medium truncate",children:U.title}),jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-xs text-muted-foreground min-w-[35px]",children:Ma(H)}),jsx(en,{value:[W],onValueChange:J=>me(J[0]),min:0,max:100,step:.1,className:"flex-1"}),jsx("span",{className:"text-xs text-muted-foreground min-w-[35px]",children:Ma(E)})]})]})]}):jsxs("div",{ref:D,className:u("p-4 bg-card border border-border",dx[T],e),...S,children:[jsx("audio",{ref:k,src:U.src,autoPlay:n,loop:j,muted:a,onLoadedMetadata:q,onTimeUpdate:te,onPlay:_,onPause:ve,onEnded:Q,onCanPlay:oe}),c&&(U.title||U.artist||U.artwork)&&jsxs("div",{className:"flex items-center gap-4 mb-4",children:[U.artwork&&jsx("img",{src:U.artwork,alt:U.title||"Album artwork",className:"w-16 h-16 rounded-md object-cover"}),jsxs("div",{className:"flex-1 min-w-0",children:[U.title&&jsx("h3",{className:"font-medium truncate",children:U.title}),U.artist&&jsx("p",{className:"text-sm text-muted-foreground truncate",children:U.artist}),U.album&&jsx("p",{className:"text-xs text-muted-foreground truncate",children:U.album})]})]}),s?jsx("div",{ref:L,className:"relative h-16 mb-4 flex items-end gap-[2px] cursor-pointer",onClick:Ye,children:$.map((J,ee)=>{let Le=(ee+1)/$.length*100<=W;return jsx("div",{className:u("flex-1 rounded-sm transition-colors",!y&&(Le?ae.waveformActive:ae.waveformInactive)),style:{height:`${J*100}%`,minHeight:4,...y&&{backgroundColor:Le?y:`${y}33`}}},ee)})}):jsx("div",{className:"mb-4",children:jsx(en,{value:[W],onValueChange:J=>me(J[0]),min:0,max:100,step:.1})}),jsxs("div",{className:"flex justify-between text-xs text-muted-foreground mb-4",children:[jsx("span",{children:Ma(H)}),jsx("span",{children:Ma(E)})]}),jsxs("div",{className:"flex items-center justify-between",children:[jsxs("div",{className:"flex items-center gap-1",children:[g&&jsx("button",{type:"button",className:u("p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",G&&"text-primary"),onClick:()=>Y(!G),children:jsx(Shuffle,{className:"w-4 h-4"})}),m&&jsx("button",{type:"button",className:"p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",onClick:()=>ot(-f),children:jsx(SkipBack,{className:"w-5 h-5"})})]}),jsx("button",{type:"button",className:u("p-4 rounded-full transition-colors cursor-pointer",!y&&ae.progress,"text-white hover:opacity-90"),style:y?{backgroundColor:y}:void 0,onClick:Te,disabled:z,children:z?jsx(Loader2,{className:"w-6 h-6 animate-spin"}):M?jsx(Pause,{className:"w-6 h-6",fill:"currentColor"}):jsx(Play,{className:"w-6 h-6 ml-0.5",fill:"currentColor"})}),jsxs("div",{className:"flex items-center gap-1",children:[m&&jsx("button",{type:"button",className:"p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",onClick:()=>ot(f),children:jsx(SkipForward,{className:"w-5 h-5"})}),p&&jsx("button",{type:"button",className:u("p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",j&&"text-primary"),onClick:Se,children:jsx(Repeat,{className:"w-4 h-4"})})]})]}),jsxs("div",{className:"flex items-center justify-between mt-4",children:[d?jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsx("button",{type:"button",className:"p-1 hover:bg-muted rounded transition-colors cursor-pointer",onClick:Tt,children:jsx(X,{className:"w-4 h-4"})}),jsx(en,{value:[A?0:V*100],onValueChange:Ze,min:0,max:100,step:1,className:"w-24"})]}):jsx("div",{}),h&&jsx("button",{type:"button",className:"p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",onClick:ne,children:jsx(Download,{className:"w-4 h-4"})})]})]})});ux.displayName="AudioPlayer";var IP={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},mx=Z.forwardRef(({className:e,src:t,defaultPage:n=1,defaultZoom:r=100,showToolbar:o=true,showNavigation:a=true,showZoomControls:s=true,showDownload:i=true,showPrint:l=true,showFullscreen:c=true,showRotate:d=true,showSearch:m=false,zoomStep:f=25,minZoom:p=25,maxZoom:g=400,toolbarPosition:h="top",height:b="600px",onPageChange:v,onZoomChange:y,onPDFLoad:x,onPDFError:w,errorMessage:C="Failed to load PDF. Please try again.",loadingMessage:R="Loading PDF...",fileName:T="document.pdf",totalPages:S=1,radius:D="lg",...k},L)=>{let M=Z.useRef(null),N=Z.useRef(null),[H,P]=Z.useState(n),[E]=Z.useState(S),[I,V]=Z.useState(r),[O,A]=Z.useState(0),[B,z]=Z.useState(false),[F,j]=Z.useState(true),[K,G]=Z.useState(false),[Y,U]=Z.useState(String(n)),$=ne=>{let W=Math.max(1,Math.min(E,ne));P(W),U(String(W)),v?.(W);},q=ne=>{U(ne.target.value);},te=()=>{let ne=parseInt(Y,10);isNaN(ne)?U(String(H)):$(ne);},_=ne=>{ne.key==="Enter"&&te();},ve=()=>{let ne=Math.min(g,I+f);V(ne),y?.(ne);},Q=()=>{let ne=Math.max(p,I-f);V(ne),y?.(ne);},oe=()=>{A(ne=>(ne+90)%360);},Te=async()=>{if(M.current)try{B?await document.exitFullscreen():await M.current.requestFullscreen();}catch{}};Z.useEffect(()=>{let ne=()=>{z(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",ne),()=>{document.removeEventListener("fullscreenchange",ne);}},[]);let me=()=>{let ne=document.createElement("a");ne.href=t,ne.download=T,document.body.appendChild(ne),ne.click(),document.body.removeChild(ne);},Ye=()=>{N.current?.contentWindow&&N.current.contentWindow.print();},Ze=()=>{j(false),G(false),x?.();},Tt=()=>{j(false),G(true),w?.(new Error("Failed to load PDF"));},Se=Z.useMemo(()=>{if(typeof window>"u")return t;try{let ne=new URL(t,window.location.href);return ne.hash=`page=${H}&zoom=${I}`,ne.toString()}catch{return t}},[t,H,I]),ot=jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-2 bg-muted/50 border-b border-border",children:[a&&jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>$(H-1),disabled:H<=1,title:"Previous page",children:jsx(ChevronLeft,{className:"w-4 h-4"})}),jsxs("div",{className:"flex items-center gap-1.5",children:[jsx(ao,{value:Y,onChange:q,onBlur:te,onKeyDown:_,className:"w-12 h-7 text-center text-sm px-1"}),jsxs("span",{className:"text-sm text-muted-foreground",children:["/ ",E]})]}),jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>$(H+1),disabled:H>=E,title:"Next page",children:jsx(ChevronRight,{className:"w-4 h-4"})})]}),s&&jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:Q,disabled:I<=p,title:"Zoom out",children:jsx(ZoomOut,{className:"w-4 h-4"})}),jsxs("span",{className:"text-sm text-muted-foreground min-w-[50px] text-center",children:[I,"%"]}),jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:ve,disabled:I>=g,title:"Zoom in",children:jsx(ZoomIn,{className:"w-4 h-4"})})]}),jsxs("div",{className:"flex items-center gap-1",children:[m&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",title:"Search",children:jsx(Search,{className:"w-4 h-4"})}),d&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:oe,title:"Rotate",children:jsx(RotateCw,{className:"w-4 h-4"})}),l&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:Ye,title:"Print",children:jsx(Printer,{className:"w-4 h-4"})}),i&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:me,title:"Download",children:jsx(Download,{className:"w-4 h-4"})}),c&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:Te,title:B?"Exit fullscreen":"Fullscreen",children:B?jsx(Minimize,{className:"w-4 h-4"}):jsx(Maximize,{className:"w-4 h-4"})})]})]});return jsxs("div",{ref:ne=>{M.current=ne,typeof L=="function"?L(ne):L&&(L.current=ne);},className:u("flex flex-col bg-card border border-border overflow-hidden",IP[D],e),style:{height:B?"100vh":b},...k,children:[o&&h==="top"&&ot,jsxs("div",{className:"flex-1 relative overflow-hidden bg-muted/30",children:[F&&jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-background/80 z-10",children:[jsx(Loader2,{className:"w-8 h-8 animate-spin text-muted-foreground mb-2"}),jsx("span",{className:"text-sm text-muted-foreground",children:R})]}),K&&jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-background z-10",children:[jsx(FileWarning,{className:"w-12 h-12 text-muted-foreground mb-3"}),jsx("span",{className:"text-sm text-muted-foreground",children:C}),jsx("button",{type:"button",className:"mt-3 px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors cursor-pointer",onClick:()=>{j(true),G(false);},children:"Try again"})]}),jsx("iframe",{ref:N,src:Se,className:"w-full h-full border-0",style:{transform:`rotate(${O}deg) scale(${I/100})`,transformOrigin:"center center"},onLoad:Ze,onError:Tt,title:"PDF Viewer"})]}),o&&h==="bottom"&&ot]})});mx.displayName="PDFViewer";function Ko(e){let t=useCallback(o=>typeof window<"u"?window.matchMedia(o).matches:false,[]),[n,r]=useState(()=>t(e));return useEffect(()=>{let o=window.matchMedia(e),a=()=>{r(o.matches);};return r(o.matches),o.addEventListener("change",a),()=>{o.removeEventListener("change",a);}},[e]),n}function OP(){return Ko("(max-width: 767px)")}function BP(){return Ko("(min-width: 768px) and (max-width: 1023px)")}function FP(){return Ko("(min-width: 1024px)")}function KP(){return Ko("(prefers-color-scheme: dark)")?"dark":"light"}function $P(){return Ko("(prefers-reduced-motion: reduce)")}function Na(e={}){let{initialWidth:t=0,initialHeight:n=0,debounce:r=0,includeScrollbar:o=true}=e,[a,s]=useState(()=>typeof window>"u"?{width:t,height:n}:{width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight}),i=useRef(null),l=useCallback(()=>{let c=()=>{s({width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight});};r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(c,r)):c();},[r,o]);return useEffect(()=>(l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),i.current&&clearTimeout(i.current);}),[l]),a}function _P(){let{width:e}=Na();return e}function YP(){let{height:e}=Na();return e}function qP(e){let{width:t}=Na();return t>=e}function XP(){let{width:e}=Na();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function JP(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading localStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting localStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.localStorage.setItem(e,JSON.stringify(l)),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:JSON.stringify(l)}));}catch(l){console.warn(`Error setting localStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(e),o(t),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:null}));}catch(i){console.warn(`Error removing localStorage key "${e}":`,i);}},[e,t]);return useEffect(()=>{let i=l=>{if(l.key===e&&l.newValue!==null)try{o(JSON.parse(l.newValue));}catch{o(l.newValue);}else l.key===e&&l.newValue===null&&o(t);};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i);}},[e,t]),[r,a,s]}function tE(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.sessionStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading sessionStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting sessionStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.sessionStorage.setItem(e,JSON.stringify(l));}catch(l){console.warn(`Error setting sessionStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.sessionStorage.removeItem(e),o(t);}catch(i){console.warn(`Error removing sessionStorage key "${e}":`,i);}},[e,t]);return [r,a,s]}function oE(e,t=500){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function aE(e,t=500){let n=useRef(null),r=useRef(e);return useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]),useCallback((...a)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...a);},t);},[t])}function sE(e,t=500){let n=useRef(null),r=useRef(e),o=useRef(null);useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]);let a=useCallback((...c)=>{o.current=c,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...c),n.current=null,o.current=null;},t);},[t]),s=useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null,o.current=null);},[]),i=useCallback(()=>{n.current&&o.current&&(clearTimeout(n.current),r.current(...o.current),n.current=null,o.current=null);},[]),l=useCallback(()=>n.current!==null,[]);return {debouncedCallback:a,cancel:s,flush:i,isPending:l}}function cE(e,t=500){let[n,r]=useState(e),o=useRef(Date.now());return useEffect(()=>{let a=Date.now();if(a>=o.current+t)o.current=a,r(e);else {let s=setTimeout(()=>{o.current=Date.now(),r(e);},t-(a-o.current));return ()=>clearTimeout(s)}},[e,t]),n}function dE(e,t=500){let n=useRef(0),r=useRef(null),o=useRef(e);return useEffect(()=>{o.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]),useCallback((...s)=>{let i=Date.now();i-n.current>=t?(o.current(...s),n.current=i):(r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{o.current(...s),n.current=Date.now();},t-(i-n.current)));},[t])}function mE(e,t=true){let n=useRef(null);return useEffect(()=>{if(!t)return;let r=o=>{let a=n.current;!a||a.contains(o.target)||e(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t]),n}function pE(e,t,n=true){useEffect(()=>{if(!n)return;let r=o=>{e.some(s=>{let i=s.current;return i&&i.contains(o.target)})||t(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t,n]);}function fE(e=2e3){let[t,n]=useState(null),[r,o]=useState(false),[a,s]=useState(false),i=useCallback(()=>{n(null),o(false);},[]),l=useCallback(async c=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;s(true);try{return await navigator.clipboard.writeText(c),n(c),o(!0),e>0&&setTimeout(()=>{o(!1);},e),!0}catch(d){return console.warn("Copy to clipboard failed:",d),n(null),o(false),false}finally{s(false);}},[e]);return {copiedValue:t,success:r,isLoading:a,copy:l,reset:i}}function gE(){return useCallback(async e=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy to clipboard failed:",t),false}},[])}function fx(e){let t=e.toLowerCase().split("+");return {key:t[t.length-1],ctrl:t.includes("ctrl")||t.includes("control"),alt:t.includes("alt")||t.includes("option"),shift:t.includes("shift"),meta:t.includes("meta")||t.includes("cmd")||t.includes("command")}}function gx(e,t){let n=e.key.toLowerCase(),r=n===" "?"space":n==="escape"?"esc":n,o=t.key==="space"?" ":t.key;return (r===o||e.code.toLowerCase()===`key${o}`)&&e.ctrlKey===t.ctrl&&e.altKey===t.alt&&e.shiftKey===t.shift&&e.metaKey===t.meta}function bE(e,t,n={}){let{enabled:r=true,preventDefault:o=true,stopPropagation:a=false,target:s=null}=n,i=useRef(t);i.current=t;let l=fx(e);useEffect(()=>{if(!r)return;let c=m=>{gx(m,l)&&(o&&m.preventDefault(),a&&m.stopPropagation(),i.current(m));},d=s||document;return d.addEventListener("keydown",c),()=>{d.removeEventListener("keydown",c);}},[r,o,a,s,l]);}function vE(e,t={}){let{enabled:n=true,preventDefault:r=true,stopPropagation:o=false,target:a=null}=t,s=useRef(e);s.current=e;let i=Object.entries(e).map(([l,c])=>({parsed:fx(l),handler:c}));useEffect(()=>{if(!n)return;let l=d=>{for(let{parsed:m,handler:f}of i)if(gx(d,m)){r&&d.preventDefault(),o&&d.stopPropagation(),f(d);break}},c=a||document;return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l);}},[n,r,o,a,i]);}function hE(e){let t=useRef(false);return useEffect(()=>{let n=o=>{o.key===e&&(t.current=true);},r=o=>{o.key===e&&(t.current=false);};return document.addEventListener("keydown",n),document.addEventListener("keyup",r),()=>{document.removeEventListener("keydown",n),document.removeEventListener("keyup",r);}},[e]),t.current}function xE(e,t,n,r){let o=useRef(t);o.current=t,useEffect(()=>{let a;if(n==null?a=window:"current"in n?a=n.current:a=n,!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,r),()=>{a?.removeEventListener(e,s,r);}},[e,n,r]);}function yE(e,t,n){let r=useRef(null),o=useRef(t);return o.current=t,useEffect(()=>{let a=r.current;if(!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,n),()=>{a.removeEventListener(e,s,n);}},[e,n]),r}function RE(e,t,n={}){let{target:r,event:o="keydown",enabled:a=true}=n,s=useRef(t);s.current=t,useEffect(()=>{if(!a)return;let i=r?.current||window,l=c=>{c.key===e&&s.current(c);};return i.addEventListener(o,l),()=>{i.removeEventListener(o,l);}},[e,r,o,a]);}function wE(e,t={}){let{threshold:n=500,onStart:r,onCancel:o,enabled:a=true}=t,s=useRef(null),i=useRef(false),l=useRef(null),c=useCallback(m=>{a&&(l.current=m,i.current=false,r?.(m),s.current=setTimeout(()=>{i.current=true,l.current&&e(l.current);},n));},[e,n,r,a]),d=useCallback(m=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(m),i.current=false,l.current=null);},[o,a]);return {onMouseDown:c,onMouseUp:d,onMouseLeave:d,onTouchStart:c,onTouchEnd:d}}function CE(e){let t=useRef(null),[n,r]=useState(false),o=useCallback(()=>{r(true),e?.onHoverStart?.();},[e]),a=useCallback(()=>{r(false),e?.onHoverEnd?.();},[e]);return useEffect(()=>{let s=t.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[o,a]),{ref:t,isHovered:n}}function TE(e,t){let[n,r]=useState(false),o=useCallback(()=>{r(true),t?.onHoverStart?.();},[t]),a=useCallback(()=>{r(false),t?.onHoverEnd?.();},[t]);return useEffect(()=>{let s=e.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[e,o,a]),n}function ME(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function NE(e=0){let t=useRef(null),[n,r]=useState(false),o=useRef(null);return useEffect(()=>{let a=t.current;if(!a)return;let s=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(true);},e);},i=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(false);},e);};return a.addEventListener("mouseenter",s),a.addEventListener("mouseleave",i),()=>{a.removeEventListener("mouseenter",s),a.removeEventListener("mouseleave",i),o.current&&clearTimeout(o.current);}},[e]),{ref:t,isHovered:n}}function PE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=r=>{t({x:r.clientX,y:r.clientY});};return window.addEventListener("mousemove",n),()=>{window.removeEventListener("mousemove",n);}},[]),e}function EE(e={}){let{enabled:t=true,resetOnLeave:n=false}=e,r=useRef(null),[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=r.current;if(!s||!t)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{n&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),n&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),n&&s.removeEventListener("mouseleave",l);}},[t,n]),{ref:r,...o}}function SE(e,t={}){let{enabled:n=true,resetOnLeave:r=false}=t,[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=e.current;if(!s||!n)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{r&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),r&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),r&&s.removeEventListener("mouseleave",l);}},[e,n,r]),o}var hx=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"].join(",");function LE(e={}){let{enabled:t=true,initialFocus:n,returnFocus:r=true,autoFocus:o=true}=e,a=useRef(null),s=useRef(null),i=useCallback(()=>{let c=a.current;return c?Array.from(c.querySelectorAll(hx)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);return useEffect(()=>{if(!t)return;let c=a.current;if(c){if(s.current=document.activeElement,o)if(n?.current)n.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),r&&s.current&&s.current.focus();}}},[t,n,r,o,l,i]),a}function DE(e,t={}){let{enabled:n=true,initialFocus:r,returnFocus:o=true,autoFocus:a=true}=t,s=useRef(null),i=useCallback(()=>{let c=e.current;return c?Array.from(c.querySelectorAll(hx)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[e]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);useEffect(()=>{if(!n)return;let c=e.current;if(c){if(s.current=document.activeElement,a)if(r?.current)r.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),o&&s.current&&s.current.focus();}}},[e,n,r,o,a,l,i]);}function HE(e={}){let{threshold:t=0,throttle:n=0,element:r}=e,[o,a]=useState({x:0,y:0,isScrolled:false,directionY:0,directionX:0,isAtBottom:false,isAtTop:true,progress:0}),s=useRef(0),i=useRef(0),l=useRef(false),c=useRef(0),d=useCallback(()=>{let f=r?.current,p=f?f.scrollTop:window.scrollY,g=f?f.scrollLeft:window.scrollX,h=f?f.scrollHeight-f.clientHeight:document.documentElement.scrollHeight-window.innerHeight,b=p>s.current?1:p<s.current?-1:0,v=g>i.current?1:g<i.current?-1:0;s.current=p,i.current=g,a({x:g,y:p,isScrolled:p>t,directionY:b,directionX:v,isAtBottom:p>=h-1,isAtTop:p<=0,progress:h>0?p/h:0}),l.current=false;},[r,t]),m=useCallback(()=>{let f=Date.now();if(n>0&&f-c.current<n){l.current||(l.current=true,requestAnimationFrame(d));return}c.current=f,l.current||(l.current=true,requestAnimationFrame(d));},[n,d]);return useEffect(()=>{let f=r?.current||window;return f.addEventListener("scroll",m,{passive:true}),d(),()=>{f.removeEventListener("scroll",m);}},[r,m,d]),o}function IE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=()=>{t({x:window.scrollX,y:window.scrollY});};return window.addEventListener("scroll",n,{passive:true}),n(),()=>{window.removeEventListener("scroll",n);}},[]),e}function Tx(e={}){let{autoLock:t=false,lockX:n=true}=e,r=useRef(false),o=useRef({x:0,y:0}),a=useRef(null),s=useCallback(()=>{if(typeof document>"u"||r.current)return;let{body:l}=document,c=window.scrollY,d=window.scrollX;o.current={x:d,y:c},a.current={overflow:l.style.overflow,overflowX:l.style.overflowX,overflowY:l.style.overflowY,position:l.style.position,top:l.style.top,left:l.style.left,width:l.style.width},l.style.overflow="hidden",n&&(l.style.overflowX="hidden"),l.style.overflowY="hidden",l.style.position="fixed",l.style.top=`-${c}px`,l.style.left=n?`-${d}px`:"0",l.style.width="100%",r.current=true;},[n]),i=useCallback(()=>{if(typeof document>"u"||!r.current)return;let{body:l}=document,c=a.current;c&&(l.style.overflow=c.overflow,l.style.overflowX=c.overflowX,l.style.overflowY=c.overflowY,l.style.position=c.position,l.style.top=c.top,l.style.left=c.left,l.style.width=c.width),window.scrollTo(o.current.x,o.current.y),r.current=false;},[]);return useEffect(()=>(t&&s(),()=>{i();}),[t,s,i]),{lock:s,unlock:i,isLocked:r.current}}function VE(e=true){let{lock:t,unlock:n}=Tx();useEffect(()=>{e?t():n();},[e,t,n]);}function kx(e={}){let{root:t=null,rootMargin:n="0px",threshold:r=0,once:o=false,enabled:a=true}=e,s=useRef(null),[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=s.current;if(!c||!a)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),o&&m.isIntersecting&&d.disconnect();},{root:t,rootMargin:n,threshold:r});return d.observe(c),()=>{d.disconnect();}},[t,n,r,o,a]),{ref:s,...i}}function zE(e,t={}){let{root:n=null,rootMargin:r="0px",threshold:o=0,once:a=false,enabled:s=true}=t,[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=e.current;if(!c||!s)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),a&&m.isIntersecting&&d.disconnect();},{root:n,rootMargin:r,threshold:o});return d.observe(c),()=>{d.disconnect();}},[e,n,r,o,a,s]),i}function OE(e="200px"){let{ref:t,isIntersecting:n}=kx({rootMargin:e,once:true});return {ref:t,isVisible:n}}function BE(e,t={}){let{enabled:n=true,childList:r=true,attributes:o=true,characterData:a=false,subtree:s=false,attributeOldValue:i=false,characterDataOldValue:l=false,attributeFilter:c}=t,d=useRef(null),m=useRef(e);return m.current=e,useEffect(()=>{let f=d.current;if(!f||!n)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:r,attributes:o,characterData:a,subtree:s,attributeOldValue:i,characterDataOldValue:l,attributeFilter:c}),()=>{p.disconnect();}},[n,r,o,a,s,i,l,c]),d}function FE(e,t,n={}){let{enabled:r=true,childList:o=true,attributes:a=true,characterData:s=false,subtree:i=false,attributeOldValue:l=false,characterDataOldValue:c=false,attributeFilter:d}=n,m=useRef(t);m.current=t,useEffect(()=>{let f=e.current;if(!f||!r)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:o,attributes:a,characterData:s,subtree:i,attributeOldValue:l,characterDataOldValue:c,attributeFilter:d}),()=>{p.disconnect();}},[e,r,o,a,s,i,l,c,d]);}function KE(e={}){let{enabled:t=true,box:n="content-box",debounce:r=0}=e,o=useRef(null),[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;n==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,r)):p();},[n,r]);return useEffect(()=>{let c=o.current;if(!c||!t)return;let d=new ResizeObserver(l);d.observe(c,{box:n});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,n,l]),{ref:o,...a}}function $E(e,t={}){let{enabled:n=true,box:r="content-box",debounce:o=0}=t,[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;r==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});o>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,o)):p();},[r,o]);return useEffect(()=>{let c=e.current;if(!c||!n)return;let d=new ResizeObserver(l);d.observe(c,{box:r});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,n,r,l]),a}function GE(){let e=useRef(null),t=useCallback(()=>{let n=e.current;if(!n)return {width:0,height:0};let r=n.getBoundingClientRect();return {width:r.width,height:r.height}},[]);return {ref:e,measure:t}}function Lx(e={}){let{defaultOpen:t=false,isOpen:n,onOpen:r,onClose:o,onChange:a,id:s}=e,[i,l]=useState(t),c=n!==void 0,d=c?n:i,m=useCallback(()=>{c||l(true),r?.(),a?.(true);},[c,r,a]),f=useCallback(()=>{c||l(false),o?.(),a?.(false);},[c,o,a]),p=useCallback(()=>{d?f():m();},[d,m,f]),g=useCallback(v=>{v?m():f();},[m,f]),h=useCallback(()=>({onClick:p,"aria-expanded":d,...s&&{"aria-controls":s}}),[p,d,s]),b=useCallback(()=>({hidden:!d,...s&&{id:s}}),[d,s]);return useMemo(()=>({isOpen:d,open:m,close:f,toggle:p,setIsOpen:g,getButtonProps:h,getDisclosureProps:b}),[d,m,f,p,g,h,b])}function WE(e){return Lx({...e,defaultOpen:true})}function _E(e=false){let[t,n]=useState(e),r=useCallback(()=>{n(o=>!o);},[]);return [t,r,n]}function YE(e,t=0){let[n,r]=useState(t),o=useCallback(()=>{r(i=>(i+1)%e.length);},[e.length]),a=useCallback(()=>{r(i=>(i-1+e.length)%e.length);},[e.length]),s=useCallback(i=>{let l=e.indexOf(i);l!==-1&&r(l);},[e]);return useMemo(()=>({value:e[n],index:n,next:o,prev:a,setIndex:r,setValue:s}),[e,n,o,a,s])}function qE(e=false){let[t,n]=useState(e),r=useCallback(()=>n(s=>!s),[]),o=useCallback(()=>n(true),[]),a=useCallback(()=>n(false),[]);return useMemo(()=>({value:t,toggle:r,on:o,off:a,set:n}),[t,r,o,a])}function ZE(e=0,t={}){let{min:n=-1/0,max:r=1/0,step:o=1}=t,a=useCallback(g=>Math.min(Math.max(g,n),r),[n,r]),[s,i]=useState(()=>a(e)),l=useCallback(()=>{i(g=>a(g+o));},[a,o]),c=useCallback(()=>{i(g=>a(g-o));},[a,o]),d=useCallback(g=>{i(a(g));},[a]),m=useCallback(()=>{i(a(e));},[a,e]),f=s<=n,p=s>=r;return useMemo(()=>({count:s,increment:l,decrement:c,set:d,reset:m,isMin:f,isMax:p}),[s,l,c,d,m,f,p])}function QE(e=0){let[t,n]=useState(e),r=useCallback(()=>n(o=>o+1),[]);return [t,r]}function JE(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function eS(e,t){let n=useRef(t);return useEffect(()=>{n.current=e;},[e]),n.current}function tS(e){let t=useRef(void 0),n=useRef(e),r=n.current!==e;return useEffect(()=>{t.current=n.current,n.current=e;},[e]),{current:e,previous:t.current,hasChanged:r}}function oS(e=[]){let[t,n]=useState(e),r=useCallback(C=>{n(C);},[]),o=useCallback(C=>{n(R=>[...R,C]);},[]),a=useCallback(C=>{n(R=>[...R,...C]);},[]),s=useCallback((C,R)=>{n(T=>{let S=[...T];return S.splice(C,0,R),S});},[]),i=useCallback((C,R)=>{n(T=>{let S=[...T];return S[C]=R,S});},[]),l=useCallback(C=>{n(R=>R.filter((T,S)=>S!==C));},[]),c=useCallback(C=>{n(R=>{let T=R.indexOf(C);return T===-1?R:R.filter((S,D)=>D!==T)});},[]),d=useCallback(C=>{n(R=>R.filter(T=>!C(T)));},[]),m=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[0],R.slice(1))),C},[]),f=useCallback(C=>{n(R=>[C,...R]);},[]),p=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[R.length-1],R.slice(0,-1))),C},[]),g=useCallback(()=>{n([]);},[]),h=useCallback(()=>{n(e);},[e]),b=useCallback((C,R)=>{n(T=>{let S=[...T],[D]=S.splice(C,1);return S.splice(R,0,D),S});},[]),v=useCallback((C,R)=>{n(T=>{let S=[...T];return [S[C],S[R]]=[S[R],S[C]],S});},[]),y=useCallback(C=>t.filter(C),[t]),x=useCallback(C=>t.find(C),[t]),w=useCallback(C=>t.includes(C),[t]);return useMemo(()=>({list:t,set:r,push:o,pushMany:a,insertAt:s,updateAt:i,removeAt:l,remove:c,removeWhere:d,shift:m,unshift:f,pop:p,clear:g,reset:h,move:b,swap:v,filter:y,find:x,includes:w,length:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i,l,c,d,m,f,p,g,h,b,v,y,x,w])}function aS(e=[]){let[t,n]=useState(()=>new Map(e)),r=useCallback(p=>t.get(p),[t]),o=useCallback((p,g)=>{n(h=>{let b=new Map(h);return b.set(p,g),b});},[]),a=useCallback(p=>{n(g=>{let h=new Map(g);return p.forEach(([b,v])=>h.set(b,v)),h});},[]),s=useCallback(p=>t.has(p),[t]),i=useCallback(p=>{n(g=>{let h=new Map(g);return h.delete(p),h});},[]),l=useCallback(()=>{n(new Map);},[]),c=useCallback(()=>{n(new Map(e));},[e]),d=useCallback(()=>Array.from(t.keys()),[t]),m=useCallback(()=>Array.from(t.values()),[t]),f=useCallback(()=>Array.from(t.entries()),[t]);return useMemo(()=>({map:t,get:r,set:o,setMany:a,has:s,delete:i,clear:l,reset:c,keys:d,values:m,entries:f,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d,m,f])}function sS(e={}){let[t,n]=useState(e),r=useCallback(d=>t[d],[t]),o=useCallback((d,m)=>{n(f=>({...f,[d]:m}));},[]),a=useCallback(d=>{n(m=>({...m,...d}));},[]),s=useCallback(d=>{n(m=>{let{[d]:f,...p}=m;return p});},[]),i=useCallback(()=>{n({});},[]),l=useCallback(()=>{n(e);},[e]),c=useCallback(d=>d in t,[t]);return useMemo(()=>({value:t,get:r,set:o,setAll:a,remove:s,clear:i,reset:l,has:c,keys:Object.keys(t),values:Object.values(t)}),[t,r,o,a,s,i,l,c])}function zx(e=[]){let[t,n]=useState(()=>new Set(e)),r=useCallback(m=>{n(f=>{let p=new Set(f);return p.add(m),p});},[]),o=useCallback(m=>{n(f=>{let p=new Set(f);return m.forEach(g=>p.add(g)),p});},[]),a=useCallback(m=>{n(f=>{let p=new Set(f);return p.delete(m),p});},[]),s=useCallback(m=>t.has(m),[t]),i=useCallback(m=>{n(f=>{let p=new Set(f);return p.has(m)?p.delete(m):p.add(m),p});},[]),l=useCallback(()=>{n(new Set);},[]),c=useCallback(()=>{n(new Set(e));},[e]),d=useCallback(()=>Array.from(t),[t]);return useMemo(()=>({set:t,add:r,addMany:o,remove:a,has:s,toggle:i,clear:l,reset:c,values:d,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d])}function lS(e=[]){let{add:t,remove:n,has:r,toggle:o,clear:a,addMany:s,values:i,size:l}=zx(e);return useMemo(()=>({selected:i(),isSelected:r,select:t,deselect:n,toggle:o,selectAll:s,deselectAll:a,count:l,isEmpty:l===0}),[i,r,t,n,o,s,a,l])}function cS(e=[]){let[t,n]=useState(e),r=useCallback(c=>{n(d=>[...d,c]);},[]),o=useCallback(c=>{n(d=>[...d,...c]);},[]),a=useCallback(()=>{let c;return n(d=>d.length===0?d:(c=d[0],d.slice(1))),c},[]),s=useCallback(()=>t[0],[t]),i=useCallback(()=>t[t.length-1],[t]),l=useCallback(()=>{n([]);},[]);return useMemo(()=>({queue:t,enqueue:r,enqueueMany:o,dequeue:a,peek:s,peekLast:i,clear:l,size:t.length,isEmpty:t.length===0,hasItems:t.length>0}),[t,r,o,a,s,i,l])}function dS(e=[]){let[t,n]=useState(e),r=useCallback(l=>{n(c=>[...c,l]);},[]),o=useCallback(l=>{n(c=>[...c,...l]);},[]),a=useCallback(()=>{let l;return n(c=>c.length===0?c:(l=c[c.length-1],c.slice(0,-1))),l},[]),s=useCallback(()=>t[t.length-1],[t]),i=useCallback(()=>{n([]);},[]);return useMemo(()=>({stack:t,push:r,pushMany:o,pop:a,peek:s,clear:i,size:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i])}function Kx(e,t=false){let[n,r]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true}),o=useRef(true),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{r(c=>({...c,isLoading:true,isIdle:false,isError:false,error:null}));try{let c=await a.current(...l);return o.current&&r({data:c,error:null,isLoading:!1,isSuccess:!0,isError:!1,isIdle:!1}),c}catch(c){let d=c instanceof Error?c:new Error(String(c));return o.current&&r({data:null,error:d,isLoading:false,isSuccess:false,isError:true,isIdle:false}),null}},[]),i=useCallback(()=>{r({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true});},[]);return useEffect(()=>(o.current=true,t&&s(),()=>{o.current=false;}),[t,s]),{...n,execute:s,reset:i}}function mS(e,t=3,n=1e3){let[r,o]=useState(0),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{let c=null;for(let d=0;d<=t;d++)try{return o(d),await a.current(...l)}catch(m){c=m instanceof Error?m:new Error(String(m)),d<t&&await new Promise(f=>setTimeout(f,n));}throw c},[t,n]);return {...Kx(s,false),retryCount:r}}var Ux=new Map,pS=300*1e3;function fS(e,t={}){let{immediate:n=true,init:r,transform:o,deps:a=[],enabled:s=true,refetchInterval:i,cacheKey:l}=t,[c,d]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),m=useRef(null),f=useRef(true),p=useCallback(async()=>{if(!e||!s)return;let h=l||e,b=Ux.get(h);if(b&&Date.now()-b.timestamp<pS){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}m.current&&m.current.abort(),m.current=new AbortController,d(v=>({...v,isLoading:true,error:null}));try{let v=await fetch(e,{...r,signal:m.current.signal});if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);let y=await v.json(),x=o?o(y):y;Ux.set(h,{data:x,timestamp:Date.now()}),f.current&&d({data:x,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(v){if(v instanceof Error&&v.name==="AbortError")return;let y=v instanceof Error?v:new Error(String(v));f.current&&d({data:null,error:y,isLoading:false,isSuccess:false,isError:true});}},[e,s,r,o,l]),g=useCallback(()=>{m.current&&m.current.abort();},[]);return useEffect(()=>(f.current=true,n&&s&&p(),()=>{f.current=false,g();}),[e,n,s,...a]),useEffect(()=>{if(!i||!s)return;let h=setInterval(p,i);return ()=>{clearInterval(h);}},[i,s,p]),{...c,refetch:p,abort:g}}function gS(e,t={}){let{transform:n,...r}=t,[o,a]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),s=useCallback(async l=>{a(c=>({...c,isLoading:true,error:null}));try{let c=await fetch(e,{...r,method:r.method||"POST",headers:{"Content-Type":"application/json",...r.headers},body:l?JSON.stringify(l):void 0});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let d=await c.json(),m=n?n(d):d;return a({data:m,error:null,isLoading:!1,isSuccess:!0,isError:!1}),m}catch(c){let d=c instanceof Error?c:new Error(String(c));return a({data:null,error:d,isLoading:false,isSuccess:false,isError:true}),null}},[e,r,n]),i=useCallback(()=>{a({data:null,error:null,isLoading:false,isSuccess:false,isError:false});},[]);return {...o,mutate:s,reset:i}}function gi(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setInterval(()=>{n.current();},t);return ()=>{clearInterval(r);}},[t]);}function vS(e,t){let[n,r]=useState(false);gi(e,n?t:null);let o=useCallback(()=>r(true),[]),a=useCallback(()=>r(false),[]),s=useCallback(()=>r(i=>!i),[]);return {start:o,stop:a,toggle:s,isRunning:n}}function hS(e,t={}){let{interval:n=1e3,onComplete:r,autoStart:o=false}=t,[a,s]=useState(e),[i,l]=useState(o),c=useRef(r);c.current=r;let d=a<=0;gi(()=>{s(g=>{let h=g-1;return h<=0?(l(false),c.current?.(),0):h});},i&&!d?n:null);let m=useCallback(()=>{d||l(true);},[d]),f=useCallback(()=>{l(false);},[]),p=useCallback(g=>{s(g??e),l(false);},[e]);return {seconds:a,isRunning:i,isComplete:d,start:m,pause:f,reset:p}}function xS(e={}){let{interval:t=1e3,maxSeconds:n,autoStart:r=false}=e,[o,a]=useState(0),[s,i]=useState(r),l=s&&(n===void 0||o<n);gi(()=>{a(p=>p+1);},l?t:null);let c=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),m=useCallback(()=>i(p=>!p),[]),f=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:c,stop:d,reset:f,toggle:m}}function _x(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setTimeout(()=>{n.current();},t);return ()=>{clearTimeout(r);}},[t]);}function yS(e,t){let[n,r]=useState(false),o=useRef(null),a=useRef(e);a.current=e;let s=useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null),r(false);},[]),i=useCallback(()=>{s(),r(true),o.current=setTimeout(()=>{a.current(),r(false);},t);},[t,s]),l=useCallback(()=>{i();},[i]);return useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{start:i,cancel:s,reset:l,isScheduled:n}}function RS(e,t){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function wS(e,t=true){let[n,r]=useState(false);return _x(()=>{r(true);},t?e:null),n}function CS(e,t=true){let[n,r]=useState(t),[o,a]=useState(0),[s,i]=useState(0),l=useRef(e);l.current=e;let c=useRef(null),d=useRef(0),m=useRef(0),f=useRef(0),p=useRef(0),g=useCallback(v=>{let y=d.current?v-d.current:0;d.current=v,p.current++,v-f.current>=1e3&&(a(p.current),p.current=0,f.current=v),m.current++,i(m.current),l.current(y,v),c.current=requestAnimationFrame(g);},[]),h=useCallback(()=>{c.current===null&&(d.current=0,f.current=performance.now(),p.current=0,c.current=requestAnimationFrame(g),r(true));},[g]),b=useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null,r(false));},[]);return useEffect(()=>(t&&h(),()=>{c.current!==null&&cancelAnimationFrame(c.current);}),[t,h]),{start:h,stop:b,isRunning:n,frameCount:s,fps:o}}function TS(e,t={}){let{duration:n=300,easing:r="easeOutCubic"}=t,[o,a]=useState(e),s=useRef(e),i=useRef(null),l=useRef(null),c={linear:d=>d,easeInCubic:d=>d*d*d,easeOutCubic:d=>1-Math.pow(1-d,3),easeInOutCubic:d=>d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2};return useEffect(()=>{if(o===e)return;s.current=o,i.current=null;let d=m=>{i.current===null&&(i.current=m);let f=m-i.current,p=Math.min(f/n,1),g=c[r](p),h=s.current+(e-s.current)*g;a(h),p<1&&(l.current=requestAnimationFrame(d));};return l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r]),o}function MS(e,t={}){let{stiffness:n=100,damping:r=10,mass:o=1}=t,[a,s]=useState(e),i=useRef(0),l=useRef(null),c=useRef(null);return useEffect(()=>{if(Math.abs(a-e)<.01&&Math.abs(i.current)<.01){s(e);return}let d=m=>{c.current===null&&(c.current=m);let f=Math.min((m-c.current)/1e3,.064);c.current=m;let p=(e-a)*n,g=i.current*r,h=(p-g)/o;i.current+=h*f;let b=a+i.current*f;s(b),Math.abs(b-e)>.01||Math.abs(i.current)>.01?l.current=requestAnimationFrame(d):(s(e),i.current=0);};return c.current=null,l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r,o,a]),a}var Zx=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function NS(e,t={}){let{events:n=Zx,initialState:r=false,enabled:o=true}=t,[a,s]=useState(r),i=useRef(null),l=useCallback(()=>{s(false),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{s(true);},e);},[e]);return useEffect(()=>{if(o)return l(),n.forEach(c=>{window.addEventListener(c,l);}),()=>{i.current&&clearTimeout(i.current),n.forEach(c=>{window.removeEventListener(c,l);});}},[o,n,l]),a}function kS(e,t,n,r={}){let{events:o=Zx,initialState:a=false,enabled:s=true}=r,[i,l]=useState(a),c=useRef(null),d=useRef(a),m=useCallback(()=>{d.current&&(d.current=false,n?.()),l(false),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{d.current=true,l(true),t?.();},e);},[e,t,n]);return useEffect(()=>{if(s)return m(),o.forEach(f=>{window.addEventListener(f,m);}),()=>{c.current&&clearTimeout(c.current),o.forEach(f=>{window.removeEventListener(f,m);});}},[s,o,m]),i}function Jx(){let[e,t]=useState(()=>typeof document>"u"?"visible":document.visibilityState);return useEffect(()=>{let n=()=>{t(document.visibilityState);};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}},[]),e}function SS(){return Jx()==="visible"}function LS(e,t){let n=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}),[n]);}function DS(){let[e,t]=useState(()=>typeof navigator>"u"?true:navigator.onLine);return useEffect(()=>{let n=()=>t(true),r=()=>t(false);return window.addEventListener("online",n),window.addEventListener("offline",r),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r);}},[]),e}function HS(e,t){let[n,r]=useState(()=>typeof navigator>"u"?true:navigator.onLine),o=useCallback(()=>{r(true),e?.();},[e]),a=useCallback(()=>{r(false),t?.();},[t]);return useEffect(()=>(window.addEventListener("online",o),window.addEventListener("offline",a),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a);}),[o,a]),n}function ry(e){let[t,n]=useState(false),r=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),o=useCallback(async()=>{let i=e?.current||document.documentElement;try{i.requestFullscreen?await i.requestFullscreen():i.webkitRequestFullscreen?await i.webkitRequestFullscreen():i.mozRequestFullScreen?await i.mozRequestFullScreen():i.msRequestFullscreen&&await i.msRequestFullscreen();}catch(l){console.error("Failed to enter fullscreen:",l);}},[e]),a=useCallback(async()=>{try{document.exitFullscreen?await document.exitFullscreen():document.webkitExitFullscreen?await document.webkitExitFullscreen():document.mozCancelFullScreen?await document.mozCancelFullScreen():document.msExitFullscreen&&await document.msExitFullscreen();}catch(i){console.error("Failed to exit fullscreen:",i);}},[]),s=useCallback(async()=>{t?await a():await o();},[t,o,a]);return useEffect(()=>{let i=()=>{n(!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement));};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i);}},[]),{isFullscreen:t,enter:o,exit:a,toggle:s,isSupported:r}}function zS(){let e=useRef(null),t=ry(e);return {ref:e,...t}}function FS(e={}){let{watch:t=false,immediate:n=true,enableHighAccuracy:r=true,maximumAge:o=0,timeout:a=1e4}=e,[s,i]=useState({isLoading:false,position:null,error:null,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null}),l=typeof navigator<"u"&&"geolocation"in navigator,c=useCallback(f=>{i({isLoading:false,position:f,error:null,latitude:f.coords.latitude,longitude:f.coords.longitude,accuracy:f.coords.accuracy,altitude:f.coords.altitude,altitudeAccuracy:f.coords.altitudeAccuracy,heading:f.coords.heading,speed:f.coords.speed,timestamp:f.timestamp});},[]),d=useCallback(f=>{i(p=>({...p,isLoading:false,error:f}));},[]),m=useCallback(()=>{l&&(i(f=>({...f,isLoading:true,error:null})),navigator.geolocation.getCurrentPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a}));},[l,c,d,r,o,a]);return useEffect(()=>{if(l&&(n&&m(),t)){let f=navigator.geolocation.watchPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(f);}}},[t,n,l,m,c,d,r,o,a]),{...s,getCurrentPosition:m,isSupported:l}}function KS(e,t,n,r){if(e===null||t===null||n===null||r===null)return null;let o=6371e3,a=e*Math.PI/180,s=n*Math.PI/180,i=(n-e)*Math.PI/180,l=(r-t)*Math.PI/180,c=Math.sin(i/2)*Math.sin(i/2)+Math.cos(a)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2),d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return o*d}function $S(e){let[t,n]=useState(null),[r,o]=useState(true),a=typeof navigator<"u"&&"permissions"in navigator,s=useCallback(async()=>{if(!a)return o(false),null;try{o(!0);let i=await navigator.permissions.query({name:e});return n(i.state),o(!1),i.state}catch(i){return console.error(`Permission query failed for ${e}:`,i),o(false),null}},[e,a]);return useEffect(()=>{if(!a){o(false);return}let i=null,l=()=>{i&&n(i.state);};return navigator.permissions.query({name:e}).then(c=>{i=c,n(c.state),o(false),c.addEventListener("change",l);}).catch(()=>{o(false);}),()=>{i&&i.removeEventListener("change",l);}},[e,a]),{state:t,isGranted:t==="granted",isDenied:t==="denied",isPrompt:t==="prompt",isLoading:r,isSupported:a,query:s}}function GS(){let[e,t]=useState(typeof Notification<"u"?Notification.permission:"default"),n=typeof Notification<"u",r=useCallback(async()=>{if(!n)return "default";let o=await Notification.requestPermission();return t(o),o},[n]);return useEffect(()=>{n&&t(Notification.permission);},[n]),{permission:e,request:r,isSupported:n}}function US(e){let[t,n]=useState(null),[r,o]=useState(null),[a,s]=useState(false),i=typeof navigator<"u"&&"mediaDevices"in navigator,l=useCallback(async()=>{if(!i)return null;s(true),o(null);try{let d=await navigator.mediaDevices.getUserMedia(e);return n(d),s(!1),d}catch(d){let m=d instanceof Error?d:new Error(String(d));return o(m),s(false),null}},[e,i]),c=useCallback(()=>{t&&(t.getTracks().forEach(d=>d.stop()),n(null));},[t]);return useEffect(()=>()=>{t&&t.getTracks().forEach(d=>d.stop());},[t]),{stream:t,error:r,isLoading:a,request:l,stop:c,isSupported:i}}function WS(e={}){let{voice:t=null,rate:n=1,pitch:r=1,volume:o=1,lang:a="en-US"}=e,[s,i]=useState(false),[l,c]=useState(false),[d,m]=useState([]),f=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!f)return;let v=()=>{m(window.speechSynthesis.getVoices());};return v(),window.speechSynthesis.addEventListener("voiceschanged",v),()=>{window.speechSynthesis.removeEventListener("voiceschanged",v);}},[f]);let p=useCallback(v=>{if(!f)return;window.speechSynthesis.cancel();let y=new SpeechSynthesisUtterance(v);y.voice=t,y.rate=n,y.pitch=r,y.volume=o,y.lang=a,y.onstart=()=>i(true),y.onend=()=>{i(false),c(false);},y.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(y);},[f,t,n,r,o,a]),g=useCallback(()=>{f&&(window.speechSynthesis.cancel(),i(false),c(false));},[f]),h=useCallback(()=>{f&&(window.speechSynthesis.pause(),c(true));},[f]),b=useCallback(()=>{f&&(window.speechSynthesis.resume(),c(false));},[f]);return {speak:p,stop:g,pause:h,resume:b,isSpeaking:s,isPaused:l,isSupported:f,voices:d}}function _S(e={}){let{lang:t="en-US",continuous:n=false,interimResults:r=true}=e,[o,a]=useState(false),[s,i]=useState(""),[l,c]=useState(""),[d,m]=useState(null),f=useRef(null),p=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=p!==null;useEffect(()=>{if(!g||!p)return;let x=new p;return x.lang=t,x.continuous=n,x.interimResults=r,x.onstart=()=>{a(true),m(null);},x.onend=()=>{a(false);},x.onerror=w=>{m(new Error(w.error)),a(false);},x.onresult=w=>{let C="",R="";for(let T=w.resultIndex;T<w.results.length;T++){let S=w.results[T];S.isFinal?R+=S[0].transcript:C+=S[0].transcript;}R&&i(T=>T+R),c(C);},f.current=x,()=>{x.abort();}},[g,p,t,n,r]);let h=useCallback(()=>{if(f.current&&!o)try{f.current.start();}catch{}},[o]),b=useCallback(()=>{f.current&&f.current.stop();},[]),v=useCallback(()=>{f.current&&f.current.abort();},[]),y=useCallback(()=>{i(""),c(""),m(null);},[]);return {start:h,stop:b,abort:v,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:y}}export{Hu as Accordion,Iu as AccordionItem,yv as ActionBar,Rv as ActionBarButton,pv as ActionGroup,ch as ActionSheet,fy as Alert,by as AlertDescription,gy as AlertTitle,Vb as AreaChart,im as AspectRatio,ux as AudioPlayer,Fg as Autocomplete,Lr as Avatar,Dr as AvatarFallback,Vp as AvatarGroup,so as AvatarImage,ig as BackTop,yy as Badge,eh as Banner,Hb as BarChart,Zh as Blockquote,sh as BottomNavigation,Th as Bounce,Qu as Breadcrumb,om as BreadcrumbEllipsis,em as BreadcrumbItem,tm as BreadcrumbLink,Ju as BreadcrumbList,nm as BreadcrumbPage,rm as BreadcrumbSeparator,pe as Button,nd as ButtonGroup,Yf as COUNTRIES,lo as Calendar,id as Card,ud as CardContent,dd as CardDescription,md as CardFooter,ld as CardHeader,cd as CardTitle,$b as Carousel,Gb as CarouselContent,Ub as CarouselItem,Dl as CarouselNext,Ll as CarouselPrevious,jo as Checkbox,$h as Checkmark,Fp as Chip,Wp as CircularProgress,Kt as CloseButton,Jg as Code,ob as CodeBlock,xh as Collapse,Fu as Collapsible,Ku as CollapsibleContent,Ai as CollapsibleTrigger,Bv as ColorArea,Of as ColorPicker,$v as ColorSlider,oa as ColorSwatch,Af as ColorSwatchPicker,Uv as ColorWheel,Yi as Command,wR as CommandDialog,Cp as CommandEmpty,Tp as CommandGroup,Rp as CommandInput,Np as CommandItem,wp as CommandList,Mp as CommandSeparator,kp as CommandShortcut,sx as ComparisonSlider,Gh as Confetti,cu as ContextMenu,hu as ContextMenuCheckboxItem,fu as ContextMenuContent,uu as ContextMenuGroup,vu as ContextMenuItem,mu as ContextMenuPortal,xu as ContextMenuSection,yu as ContextMenuSeparator,Ru as ContextMenuShortcut,pu as ContextMenuSub,bu as ContextMenuSubContent,gu as ContextMenuSubTrigger,du as ContextMenuTrigger,Nv as ContextualHelp,Pb as CopyButton,Eh as Counter,Gf as CurrencyInput,ga as DEFAULT_COLORS,oR as DataTable,TN as DateField,CN as DateInput,Ws as DatePicker,hb as DateRangePicker,Fi as Drawer,Lm as DrawerBody,Vm as DrawerClose,Em as DrawerContent,Im as DrawerDescription,Dm as DrawerFooter,$m as DrawerGroup,Gm as DrawerGroupLabel,Sm as DrawerHeader,Um as DrawerInset,Om as DrawerMenu,Km as DrawerMenuButton,Bm as DrawerMenuItem,Z0 as DrawerProvider,zm as DrawerSeparator,km as DrawerSidebar,Hm as DrawerTitle,Am as DrawerToggle,Pm as DrawerTrigger,Zt as Dropdown,Jt as DropdownContent,zd as DropdownGroup,Lt as DropdownItem,n0 as DropdownLabel,Ni as DropdownSection,Vd as DropdownSeparator,Ad as DropdownShortcut,Od as DropdownSub,Fd as DropdownSubContent,Bd as DropdownSubTrigger,Qt as DropdownTrigger,Il as EMOJIS,Fs as EMOJI_CATEGORIES,Wb as EmojiPicker,af as EmptyState,yh as Expand,Ck as FAB,bh as Fade,pl as FieldContext,Df as FileUpload,wh as Flip,nc as FloatingActionButton,Kg as Form,ml as FormContext,jg as FormControl,Wg as FormDescription,$g as FormField,Gg as FormItem,Ug as FormLabel,_g as FormMessage,Lb as FullCalendar,Uh as Glow,Iv as GridList,Wh as H1,_h as H2,Yh as H3,qh as H4,ax as HeatmapCalendar,Yu as HoverCard,Xu as HoverCardContent,qu as HoverCardTrigger,lb as Image,Zb as ImageCropper,Tl as ImageViewer,Tb as ImageViewerTrigger,wb as InfiniteScroll,Qh as InlineCode,ao as Input,qp as InputOTP,Xp as InputOTPGroup,Qp as InputOTPSeparator,Zp as InputOTPSlot,Bb as KanbanBoard,Nb as Kbd,Sr as Label,ex as Large,Jh as Lead,Db as LineChart,ag as Link,Tw as List,pf as ListItem,ff as ListItemText,bb as Loading,rl as MASK_PRESETS,Wf as MaskedInput,mg as Menubar,Cg as MenubarCheckboxItem,Rg as MenubarContent,fg as MenubarGroup,wg as MenubarItem,hC as MenubarLabel,pg as MenubarMenu,gg as MenubarPortal,vg as MenubarRadioGroup,Tg as MenubarRadioItem,il as MenubarSection,Mg as MenubarSeparator,Ng as MenubarShortcut,bg as MenubarSub,yg as MenubarSubContent,xg as MenubarSubTrigger,hg as MenubarTrigger,pp as Modal,vp as ModalBody,gp as ModalClose,is as ModalContent,yp as ModalDescription,hp as ModalFooter,bp as ModalHeader,_i as ModalOverlay,Wi as ModalPortal,ss as ModalRoot,xp as ModalTitle,fp as ModalTrigger,nx as Muted,Qf as Navbar,Jf as NavbarBrand,eg as NavbarContent,tg as NavbarItem,ng as NavbarLink,pm as NavigationMenu,hm as NavigationMenuContent,Rm as NavigationMenuIndicator,gm as NavigationMenuItem,ym as NavigationMenuLink,fm as NavigationMenuList,vm as NavigationMenuTrigger,Bi as NavigationMenuViewport,Sp as NumberInput,mx as PDFViewer,rp as Pagination,op as PaginationContent,lp as PaginationEllipsis,ap as PaginationItem,rs as PaginationLink,ip as PaginationNext,sp as PaginationPrevious,Xh as Paragraph,Oh as Parallax,Ep as PasswordInput,qf as PhoneInput,Ib as PieChart,Ph as Pop,vt as Popover,Mn as PopoverAnchor,ht as PopoverContent,rr as PopoverTrigger,Ja as Progress,gh as PullToRefresh,Nh as Pulse,Qb as QRCode,Tu as RadioGroup,Mu as RadioGroupItem,Cv as RangeSlider,zp as Rating,YR as ResizableHandle,_R as ResizablePanel,WR as ResizablePanelGroup,Yb as RichTextEditor,Ch as Ripple,Rh as Rotate,hh as Scale,Oe as ScrollArea,zh as ScrollProgress,Ah as ScrollReveal,Yv as SearchBar,iv as SearchField,kf as SegmentedControl,Pf as SegmentedControlItem,Ga as Select,tr as Separator,Mh as Shake,Qd as Sheet,eu as SheetClose,ru as SheetContent,iu as SheetDescription,au as SheetFooter,ou as SheetHeader,tu as SheetOverlay,Di as SheetPortal,su as SheetTitle,Jd as SheetTrigger,Kh as Shimmer,Fa as Skeleton,vh as Slide,en as Slider,tx as Small,ib as Snippet,eT as SortableList,jh as Sparkles,Ia as Spinner,Qv as SpotlightSearch,cf as StatCard,hv as StatusLight,Sg as Step,Pg as Steps,mh as SwipeActions,vd as Switch,ab as TabbedCodeBlock,Wm as Table,Ym as TableBody,Jm as TableCaption,Qm as TableCell,qm as TableFooter,Zm as TableHead,_m as TableHeader,Xm as TableRow,jd as Tabs,Yd as TabsContent,Wd as TabsList,_d as TabsTrigger,Ev as TagGroup,nf as TagInput,wy as TextBadge,ov as TextField,Lh as TextReveal,hd as Textarea,Jb as ThemeProvider,ev as ThemeToggle,dv as TimeField,Ff as TimeInput,xb as TimePicker,hf as Timeline,Rf as TimelineContent,yf as TimelineItem,wf as TimelineOpposite,m0 as Toaster,Nu as Toggle,Pu as ToggleGroup,Eu as ToggleGroupItem,wn as Tooltip,Tn as TooltipContent,nr as TooltipProvider,Cn as TooltipTrigger,zg as Tree,Sh as Typewriter,rx as UL,Xg as User,cx as VideoPlayer,gT as VirtualList,kh as Wiggle,Dh as WordRotate,xv as actionBarVariants,mv as actionGroupVariants,lh as actionSheetItemVariants,my as alertVariants,gs as applyMask,Bg as autocompleteInputVariants,Ip as avatarGroupVariants,sg as backTopVariants,vy as badgeIndicatorVariants,Jv as bannerVariants,ah as bottomNavigationVariants,ed as buttonGroupVariants,no as buttonVariants,o0 as calculatePasswordStrength,sd as cardVariants,Fb as carouselVariants,fa as chartContainerVariants,Bp as chipVariants,jp as circularProgressVariants,Mm as closeButtonVariants,u as cn,Qg as codeVariants,Vv as colorAreaVariants,Kv as colorSliderVariants,Vf as colorSwatchPickerVariants,If as colorSwatchVariants,Gv as colorWheelVariants,Zl as contextualHelpTriggerVariants,kb as copyButtonVariants,Kf as currencyInputVariants,lv as datePickerVariants,qd as defaultPasswordRequirements,Fm as drawerMenuButtonVariants,jb as emojiPickerVariants,of as emptyStateVariants,Ra as fabVariants,Ef as fileUploadVariants,nl as formatCurrency,xa as formatDate,ps as formatFileSize,bs as formatPhoneNumber,Sb as fullCalendarVariants,Sf as getFileIcon,jf as getMaskPlaceholder,a0 as getPasswordStrengthColor,s0 as getPasswordStrengthLabel,Hv as gridListItemVariants,Dv as gridListVariants,zv as hexToRgb,ei as hsvToRgb,Xb as imageCropperVariants,hl as imageVariants,Cl as infiniteScrollLoaderVariants,wl as infiniteScrollVariants,Yp as inputOTPVariants,nv as inputSizeVariants,Mb as kbdVariants,rv as labelSizeVariants,mf as listItemVariants,ta as listVariants,gb as loadingVariants,Uf as maskedInputVariants,ji as modalContentVariants,Zf as navbarVariants,xm as navigationMenuLinkStyle,bm as navigationMenuTriggerStyle,Ul as parseDate,$f as parseFormattedValue,tC as phoneInputVariants,fh as pullToRefreshVariants,Ol as qrCodeVariants,wv as rangeSliderVariants,Ap as ratingVariants,Ov as rgbToHex,Av as rgbToHsv,_b as richTextEditorVariants,_v as searchBarVariants,sv as searchFieldVariants,Mf as segmentedControlItemVariants,Tf as segmentedControlVariants,Ld as selectVariants,nu as sheetVariants,yd as skeletonVariants,sb as snippetVariants,ub as sortableItemVariants,db as sortableListVariants,Qc as spinnerVariants,lf as statCardVariants,vv as statusLightVariants,Eg as stepVariants,kg as stepsVariants,oc as swipeActionVariants,uh as swipeActionsVariants,za as switchColors,Ql as tagGroupItemVariants,Pv as tagGroupVariants,tf as tagVariants,Ry as textBadgeVariants,tv as textFieldVariants,mN as themeToggleVariants,cv as timeFieldVariants,Bf as timeInputVariants,xf as timelineItemVariants,vf as timelineVariants,qa as toggleVariants,Hg as treeItemVariants,Dg as treeVariants,ol as unmask,TS as useAnimatedValue,Kx as useAsync,mS as useAsyncRetry,VE as useBodyScrollLock,qE as useBooleanToggle,qP as useBreakpoint,XP as useBreakpoints,xi as useButtonGroup,Bs as useCarousel,mE as useClickOutside,pE as useClickOutsideMultiple,_k as useConfetti,gE as useCopy,fE as useCopyToClipboard,hS as useCountdown,ZE as useCounter,YE as useCycle,oE as useDebounce,aE as useDebouncedCallback,sE as useDebouncedCallbackWithControls,RS as useDelayedValue,Lx as useDisclosure,WE as useDisclosureOpen,KS as useDistance,SS as useDocumentIsVisible,Jx as useDocumentVisibility,LS as useDocumentVisibilityCallback,G0 as useDrawer,GE as useElementSize,xE as useEventListener,yE as useEventListenerRef,fS as useFetch,ws as useFieldContext,LE as useFocusTrap,DE as useFocusTrapRef,fl as useFormContext,ry as useFullscreen,zS as useFullscreenRef,FS as useGeolocation,bE as useHotkeys,vE as useHotkeysMap,CE as useHover,NE as useHoverDelay,ME as useHoverProps,TE as useHoverRef,NS as useIdle,kS as useIdleCallback,QE as useIncrementCounter,kx as useIntersectionObserver,zE as useIntersectionObserverRef,gi as useInterval,vS as useIntervalControls,FP as useIsDesktop,OP as useIsMobile,BP as useIsTablet,RE as useKeyPress,hE as useKeyPressed,HT as useKeyboardShortcut,OE as useLazyLoad,oS as useList,JP as useLocalStorage,wE as useLongPress,aS as useMap,US as useMediaPermission,Ko as useMediaQuery,PE as useMouse,EE as useMouseElement,SE as useMouseElementRef,gS as useMutation,BE as useMutationObserver,FE as useMutationObserverRef,GS as useNotificationPermission,DS as useOnlineStatus,HS as useOnlineStatusCallback,$S as usePermission,KP as usePrefersColorScheme,$P as usePrefersReducedMotion,JE as usePrevious,tS as usePreviousDistinct,eS as usePreviousWithInitial,cS as useQueue,CS as useRafLoop,sS as useRecord,KE as useResizeObserver,$E as useResizeObserverRef,Tx as useScrollLock,HE as useScrollPosition,lS as useSelection,tE as useSessionStorage,zx as useSet,_S as useSpeechRecognition,WS as useSpeechSynthesis,mk as useSpotlight,MS as useSpringValue,dS as useStack,cE as useThrottle,dE as useThrottledCallback,_x as useTimeout,yS as useTimeoutControls,wS as useTimeoutFlag,xS as useTimer,_E as useToggle,YP as useWindowHeight,IE as useWindowScroll,Na as useWindowSize,_P as useWindowWidth,qg as userVariants,Lf as validateFile,FC as validators,yb as virtualListVariants};//# sourceMappingURL=index.js.map
73
73
  //# sourceMappingURL=index.js.map