@udixio/ui-react 2.9.20 → 2.9.21

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.cjs CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";var sn=Object.defineProperty;var rn=(e,t,n)=>t in e?sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var T=(e,t,n)=>rn(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),i=require("react"),U=require("motion/react"),Ue=require("clsx"),on=require("tailwind-merge"),Me=require("react-dom"),Se=require("@udixio/theme"),Ke=require("@udixio/tailwind"),ln=require("react-textarea-autosize"),Ge=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:1,"--r":"25%"},animate:{opacity:1,"--r":"100%",transition:{duration:.5}},exit:{opacity:0,"--r":"100%",transition:{duration:.3}}},[r,s]=i.useState(!0),[u,c]=i.useState(!1),[l,d]=i.useState({x:50,y:50});i.useEffect(()=>{u&&(s(!0),s(!1))},[u]),i.useEffect(()=>{const m=t==null?void 0:t.current;if(m)return m.addEventListener("mousedown",o),m.addEventListener("mouseup",y),m.addEventListener("mouseleave",f),()=>{m.removeEventListener("mousedown",o),m.removeEventListener("mouseup",y),m.removeEventListener("mouseleave",f)}},[t]);const o=m=>{const S=t==null?void 0:t.current,w=S.getBoundingClientRect();c(!0),d({x:(m.clientX-w.left)/S.clientWidth*100,y:(m.clientY-w.top)/S.clientHeight*100})},f=m=>{c(!1)},y=m=>{c(!1)},h=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,p={position:"absolute",inset:0,width:"100%",height:"100%","--x":l.x+"%","--y":l.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${h} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return a.jsx(U.AnimatePresence,{mode:"wait",children:(u||!u&&!r)&&a.jsx(U.motion.div,{style:p,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>s(!0)})})},Je=on.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),x=(...e)=>Je(Ue.clsx(e)),Ze=(...e)=>Je(Ue.clsx(e));function an(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const Ee=e=>{const t={};e.classNameList.forEach(r=>{var s;if(r)if(typeof r=="string")(t[s=e.default]??(t[s]=[])).push(r);else{const u=r(e.states);Object.entries(u).map(c=>{const[l,d]=c;(t[l]??(t[l]=[])).push(d)})}});const n=t;return Object.entries(t).map(r=>{let[s,u]=r;u=u.reverse(),s==e.default&&u.unshift("relative"),u.unshift(an(s)),n[s]=Ze(...u)}),n},ee=(e,t)=>n=>Ee({classNameList:[n.className,t],default:e,states:n}),Q=(e,t)=>n=>i.useMemo(()=>Ee({classNameList:[n.className,t],default:e,states:n}),[n]);function cn(e,t,n){return i.useMemo(()=>Ee({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const Qe=ee("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:x("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":n,"[&::-webkit-scrollbar-thumb]:bg-transparent":!n},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!n,"cursor-grabbing":t&&n}),track:x("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function un(e,t){let n=0,r=null,s=null;const u=(c,l)=>{n=Date.now(),t(c,l)};return(c,l)=>{const d=Date.now(),o=e-(d-n);o<=0?(r&&(clearTimeout(r),r=null),u(c,l)):(s={v:c,o:l},r||(r=setTimeout(()=>{r=null;const f=s;s=null,f&&u(f.v,f.o)},o)))}}const et=({children:e,orientation:t="vertical",scrollSize:n,onScroll:r,className:s,draggable:u=!1,throttleDuration:c=75,scroll:l,setScroll:d})=>{var te,k;const o=i.useRef(null),f=i.useRef(null),[y,h]=i.useState({width:null,height:null});i.useEffect(()=>{if(!o.current)return;const E=new ResizeObserver(N=>{for(const F of N)F.target===o.current&&h({width:F.contentRect.width,height:F.contentRect.height})});return E.observe(o.current),()=>{E.disconnect()}},[o]);const p=i.useRef(null),m=i.useRef(null),S=()=>{const E=f.current;return E?{width:n??E.scrollWidth,height:n??E.scrollHeight}:null},w=()=>{const E=o.current;return E?{width:E.clientWidth,height:E.clientHeight}:null},{scrollYProgress:I,scrollXProgress:b}=U.useScroll({container:o}),v=i.useRef(null);v.current||(v.current=un(c,(E,N)=>{!m.current||!p.current||!o.current||(N===(t==="horizontal"?"x":"y")&&(d==null||d(E)),r&&(t==="horizontal"&&N==="x"&&r({scrollProgress:E,scroll:E*(p.current.width-o.current.clientWidth),scrollTotal:p.current.width-o.current.clientWidth,scrollVisible:m.current.width}),t==="vertical"&&N==="y"&&r({scrollProgress:E,scroll:E*(p.current.height-o.current.clientHeight),scrollTotal:p.current.height-o.current.clientHeight,scrollVisible:m.current.height})))}));const B=(E,N)=>{v.current&&v.current(E,N)};i.useEffect(()=>{y.width&&B(b.get(),"x"),y.height&&B(I.get(),"y")},[y]),i.useEffect(()=>{const E=o.current,N=f.current;if(!E||!N||typeof l!="number")return;const F=(V,z,q)=>Math.min(q,Math.max(z,V));if(t==="horizontal"){const V=Math.max(0,(n??N.scrollWidth)-E.clientWidth);E.scrollLeft=F(l*V,0,V)}else{const V=Math.max(0,(n??N.scrollHeight)-E.clientHeight);E.scrollTop=F(l*V,0,V)}},[l,t,n]),U.useMotionValueEvent(b,"change",E=>{B(E,"x")}),U.useMotionValueEvent(I,"change",E=>{B(E,"y")});const[$,g]=i.useState(!1);i.useLayoutEffect(()=>{$||!m.current||!p.current||!r||(r({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?p.current.height:p.current.width,scrollVisible:t=="vertical"?m.current.height:m.current.width}),g(!0))},[m,p,r]),p.current=S(),m.current=w();const[L,A]=i.useState(!1),j=Qe({isDragging:L,children:e,className:s,onScroll:r,orientation:t,scrollSize:n,draggable:u,throttleDuration:c}),[P,M]=i.useState(0),[X,O]=i.useState(0),J=E=>{if(!u)return;const N=o.current;if(!N||P==null)return;const V=(E.pageX-N.offsetLeft-P)*1.5;N.scrollLeft=X-V},W=E=>{const N=o.current;N&&(A(!0),M(E.pageX-N.offsetLeft),O(N.scrollLeft))},C=E=>{L&&(E.preventDefault(),J(E))},R=()=>{A(!1)},H=()=>{A(!1)},G=E=>{E.preventDefault()},K=i.useRef(null);return i.useEffect(()=>()=>{K.current&&clearTimeout(K.current)},[]),i.useEffect(()=>{const E=o.current;if(!E)return;const N=F=>{var Z,D,_,ne;const V=F.detail,z=o.current;if(!z||!V)return;const q=V.orientation??t;if(typeof V.progress=="number")if(q==="horizontal"){const ie=Math.max(0,(((Z=p.current)==null?void 0:Z.width)??0)-z.clientWidth);z.scrollLeft=Math.min(ie,Math.max(0,V.progress*ie))}else{const ie=Math.max(0,(((D=p.current)==null?void 0:D.height)??0)-z.clientHeight);z.scrollTop=Math.min(ie,Math.max(0,V.progress*ie))}else if(typeof V.scroll=="number")if(q==="horizontal"){const ie=Math.max(0,(((_=p.current)==null?void 0:_.width)??0)-z.clientWidth);z.scrollLeft=Math.min(ie,Math.max(0,V.scroll))}else{const ie=Math.max(0,(((ne=p.current)==null?void 0:ne.height)??0)-z.clientHeight);z.scrollTop=Math.min(ie,Math.max(0,V.scroll))}};return E.addEventListener("udx:customScroll:set",N),()=>{E.removeEventListener("udx:customScroll:set",N)}},[t]),a.jsxs("div",{className:j.customScroll,ref:o,onMouseDown:W,onMouseMove:C,onMouseUp:R,onMouseLeave:H,onDragStart:G,onScroll:E=>{L||(M(null),A(!0),K.current&&clearTimeout(K.current),K.current=setTimeout(()=>{A(!1)},1e3))},children:[a.jsx("div",{ref:f,style:t==="vertical"?{height:((te=m==null?void 0:m.current)==null?void 0:te.height)??"100%"}:{width:((k=m==null?void 0:m.current)==null?void 0:k.width)??"100%"},className:j.track,children:e}),m.current&&p.current&&a.jsxs(a.Fragment,{children:[t==="vertical"&&p.current.height>m.current.height&&a.jsx(U.motion.div,{className:"flex-none",style:{height:p.current.height-m.current.height}}),t==="horizontal"&&p.current.width>m.current.width&&a.jsx(U.motion.div,{className:"flex-none",style:{width:p.current.width-m.current.width}})]})]})};var dn="1.3.17";function tt(e,t,n){return Math.max(e,Math.min(t,n))}function fn(e,t,n){return(1-n)*e+n*t}function hn(e,t,n,r){return fn(e,t,1-Math.exp(-n*r))}function mn(e,t){return(e%t+t)%t}var pn=class{constructor(){T(this,"isRunning",!1);T(this,"value",0);T(this,"from",0);T(this,"to",0);T(this,"currentTime",0);T(this,"lerp");T(this,"duration");T(this,"easing");T(this,"onUpdate")}advance(e){var n;if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;const r=tt(0,this.currentTime/this.duration,1);t=r>=1;const s=t?1:this.easing(r);this.value=this.from+(this.to-this.from)*s}else this.lerp?(this.value=hn(this.value,this.to,this.lerp*60,e),Math.round(this.value)===this.to&&(this.value=this.to,t=!0)):(this.value=this.to,t=!0);t&&this.stop(),(n=this.onUpdate)==null||n.call(this,this.value,t)}stop(){this.isRunning=!1}fromTo(e,t,{lerp:n,duration:r,easing:s,onStart:u,onUpdate:c}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=r,this.easing=s,this.currentTime=0,this.isRunning=!0,u==null||u(),this.onUpdate=c}};function yn(e,t){let n;return function(...r){let s=this;clearTimeout(n),n=setTimeout(()=>{n=void 0,e.apply(s,r)},t)}}var xn=class{constructor(e,t,{autoResize:n=!0,debounce:r=250}={}){T(this,"width",0);T(this,"height",0);T(this,"scrollHeight",0);T(this,"scrollWidth",0);T(this,"debouncedResize");T(this,"wrapperResizeObserver");T(this,"contentResizeObserver");T(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});T(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});T(this,"onContentResize",()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)});this.wrapper=e,this.content=t,n&&(this.debouncedResize=yn(this.resize,r),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){var e,t;(e=this.wrapperResizeObserver)==null||e.disconnect(),(t=this.contentResizeObserver)==null||t.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize,!1)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},nt=class{constructor(){T(this,"events",{})}emit(e,...t){var r;let n=this.events[e]||[];for(let s=0,u=n.length;s<u;s++)(r=n[s])==null||r.call(n,...t)}on(e,t){var n;return(n=this.events[e])!=null&&n.push(t)||(this.events[e]=[t]),()=>{var r;this.events[e]=(r=this.events[e])==null?void 0:r.filter(s=>t!==s)}}off(e,t){var n;this.events[e]=(n=this.events[e])==null?void 0:n.filter(r=>t!==r)}destroy(){this.events={}}},He=100/6,me={passive:!1},gn=class{constructor(e,t={wheelMultiplier:1,touchMultiplier:1}){T(this,"touchStart",{x:0,y:0});T(this,"lastDelta",{x:0,y:0});T(this,"window",{width:0,height:0});T(this,"emitter",new nt);T(this,"onTouchStart",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:e})});T(this,"onTouchMove",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e,r=-(t-this.touchStart.x)*this.options.touchMultiplier,s=-(n-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:r,y:s},this.emitter.emit("scroll",{deltaX:r,deltaY:s,event:e})});T(this,"onTouchEnd",e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})});T(this,"onWheel",e=>{let{deltaX:t,deltaY:n,deltaMode:r}=e;const s=r===1?He:r===2?this.window.width:1,u=r===1?He:r===2?this.window.height:1;t*=s,n*=u,t*=this.options.wheelMultiplier,n*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:n,event:e})});T(this,"onWindowResize",()=>{this.window={width:window.innerWidth,height:window.innerHeight}});this.element=e,this.options=t,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,me),this.element.addEventListener("touchstart",this.onTouchStart,me),this.element.addEventListener("touchmove",this.onTouchMove,me),this.element.addEventListener("touchend",this.onTouchEnd,me)}on(e,t){return this.emitter.on(e,t)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,me),this.element.removeEventListener("touchstart",this.onTouchStart,me),this.element.removeEventListener("touchmove",this.onTouchMove,me),this.element.removeEventListener("touchend",this.onTouchEnd,me)}},Oe=e=>Math.min(1,1.001-Math.pow(2,-10*e)),vn=class{constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:n=e,smoothWheel:r=!0,syncTouch:s=!1,syncTouchLerp:u=.075,touchInertiaExponent:c=1.7,duration:l,easing:d,lerp:o=.1,infinite:f=!1,orientation:y="vertical",gestureOrientation:h=y==="horizontal"?"both":"vertical",touchMultiplier:p=1,wheelMultiplier:m=1,autoResize:S=!0,prevent:w,virtualScroll:I,overscroll:b=!0,autoRaf:v=!1,anchors:B=!1,autoToggle:$=!1,allowNestedScroll:g=!1,__experimental__naiveDimensions:L=!1,naiveDimensions:A=L,stopInertiaOnNavigate:j=!1}={}){T(this,"_isScrolling",!1);T(this,"_isStopped",!1);T(this,"_isLocked",!1);T(this,"_preventNextNativeScrollEvent",!1);T(this,"_resetVelocityTimeout",null);T(this,"_rafId",null);T(this,"isTouching");T(this,"time",0);T(this,"userData",{});T(this,"lastVelocity",0);T(this,"velocity",0);T(this,"direction",0);T(this,"options");T(this,"targetScroll");T(this,"animatedScroll");T(this,"animate",new pn);T(this,"emitter",new nt);T(this,"dimensions");T(this,"virtualScroll");T(this,"onScrollEnd",e=>{e instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&e.stopPropagation()});T(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});T(this,"onTransitionEnd",e=>{e.propertyName.includes("overflow")&&this.checkOverflow()});T(this,"onClick",e=>{const n=e.composedPath().filter(r=>r instanceof HTMLAnchorElement&&r.getAttribute("href"));if(this.options.anchors){const r=n.find(s=>{var u;return(u=s.getAttribute("href"))==null?void 0:u.includes("#")});if(r){const s=r.getAttribute("href");if(s){const u=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,c=`#${s.split("#")[1]}`;this.scrollTo(c,u)}}}this.options.stopInertiaOnNavigate&&n.find(s=>s.host===window.location.host)&&this.reset()});T(this,"onPointerDown",e=>{e.button===1&&this.reset()});T(this,"onVirtualScroll",e=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(e)===!1)return;const{deltaX:t,deltaY:n,event:r}=e;if(this.emitter.emit("virtual-scroll",{deltaX:t,deltaY:n,event:r}),r.ctrlKey||r.lenisStopPropagation)return;const s=r.type.includes("touch"),u=r.type.includes("wheel");this.isTouching=r.type==="touchstart"||r.type==="touchmove";const c=t===0&&n===0;if(this.options.syncTouch&&s&&r.type==="touchstart"&&c&&!this.isStopped&&!this.isLocked){this.reset();return}const d=this.options.gestureOrientation==="vertical"&&n===0||this.options.gestureOrientation==="horizontal"&&t===0;if(c||d)return;let o=r.composedPath();o=o.slice(0,o.indexOf(this.rootElement));const f=this.options.prevent;if(o.find(w=>{var I,b,v;return w instanceof HTMLElement&&(typeof f=="function"&&(f==null?void 0:f(w))||((I=w.hasAttribute)==null?void 0:I.call(w,"data-lenis-prevent"))||s&&((b=w.hasAttribute)==null?void 0:b.call(w,"data-lenis-prevent-touch"))||u&&((v=w.hasAttribute)==null?void 0:v.call(w,"data-lenis-prevent-wheel"))||this.options.allowNestedScroll&&this.checkNestedScroll(w,{deltaX:t,deltaY:n}))}))return;if(this.isStopped||this.isLocked){r.cancelable&&r.preventDefault();return}if(!(this.options.syncTouch&&s||this.options.smoothWheel&&u)){this.isScrolling="native",this.animate.stop(),r.lenisStopPropagation=!0;return}let h=n;this.options.gestureOrientation==="both"?h=Math.abs(n)>Math.abs(t)?n:t:this.options.gestureOrientation==="horizontal"&&(h=t),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||this.animatedScroll===0&&n>0||this.animatedScroll===this.limit&&n<0))&&(r.lenisStopPropagation=!0),r.cancelable&&r.preventDefault();const p=s&&this.options.syncTouch,S=s&&r.type==="touchend";S&&(h=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent)),this.scrollTo(this.targetScroll+h,{programmatic:!1,...p?{lerp:S?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});T(this,"onNativeScroll",()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){const e=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-e,this.direction=Math.sign(this.animatedScroll-e),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}});T(this,"raf",e=>{const t=e-(this.time||e);this.time=e,this.animate.advance(t*.001),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))});window.lenisVersion=dn,(!e||e===document.documentElement)&&(e=window),typeof l=="number"&&typeof d!="function"?d=Oe:typeof d=="function"&&typeof l!="number"&&(l=1),this.options={wrapper:e,content:t,eventsTarget:n,smoothWheel:r,syncTouch:s,syncTouchLerp:u,touchInertiaExponent:c,duration:l,easing:d,lerp:o,infinite:f,gestureOrientation:h,orientation:y,touchMultiplier:p,wheelMultiplier:m,autoResize:S,prevent:w,virtualScroll:I,overscroll:b,autoRaf:v,anchors:B,autoToggle:$,allowNestedScroll:g,naiveDimensions:A,stopInertiaOnNavigate:j},this.dimensions=new xn(e,t,{autoResize:S}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new gn(n,{touchMultiplier:p,wheelMultiplier:m}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd,{passive:!0})),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(e,t){return this.emitter.on(e,t)}off(e,t){return this.emitter.off(e,t)}get overflow(){const e=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[e]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}setScroll(e){this.isHorizontal?this.options.wrapper.scrollTo({left:e,behavior:"instant"}):this.options.wrapper.scrollTo({top:e,behavior:"instant"})}resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}scrollTo(e,{offset:t=0,immediate:n=!1,lock:r=!1,programmatic:s=!0,lerp:u=s?this.options.lerp:void 0,duration:c=s?this.options.duration:void 0,easing:l=s?this.options.easing:void 0,onStart:d,onComplete:o,force:f=!1,userData:y}={}){if(!((this.isStopped||this.isLocked)&&!f)){if(typeof e=="string"&&["top","left","start","#"].includes(e))e=0;else if(typeof e=="string"&&["bottom","right","end"].includes(e))e=this.limit;else{let h;if(typeof e=="string"?(h=document.querySelector(e),h||(e==="#top"?e=0:console.warn("Lenis: Target not found",e))):e instanceof HTMLElement&&(e!=null&&e.nodeType)&&(h=e),h){if(this.options.wrapper!==window){const m=this.rootElement.getBoundingClientRect();t-=this.isHorizontal?m.left:m.top}const p=h.getBoundingClientRect();e=(this.isHorizontal?p.left:p.top)+this.animatedScroll}}if(typeof e=="number"){if(e+=t,e=Math.round(e),this.options.infinite){if(s){this.targetScroll=this.animatedScroll=this.scroll;const h=e-this.animatedScroll;h>this.limit/2?e=e-this.limit:h<-this.limit/2&&(e=e+this.limit)}}else e=tt(0,e,this.limit);if(e===this.targetScroll){d==null||d(this),o==null||o(this);return}if(this.userData=y??{},n){this.animatedScroll=this.targetScroll=e,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),o==null||o(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}s||(this.targetScroll=e),typeof c=="number"&&typeof l!="function"?l=Oe:typeof l=="function"&&typeof c!="number"&&(c=1),this.animate.fromTo(this.animatedScroll,e,{duration:c,easing:l,lerp:u,onStart:()=>{r&&(this.isLocked=!0),this.isScrolling="smooth",d==null||d(this)},onUpdate:(h,p)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=h-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=h,this.setScroll(this.scroll),s&&(this.targetScroll=h),p||this.emit(),p&&(this.reset(),this.emit(),o==null||o(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}checkNestedScroll(e,{deltaX:t,deltaY:n}){const r=Date.now(),s=e._lenis??(e._lenis={});let u,c,l,d,o,f,y,h;const p=this.options.gestureOrientation;if(r-(s.time??0)>2e3){s.time=Date.now();const $=window.getComputedStyle(e);s.computedStyle=$;const g=$.overflowX,L=$.overflowY;if(u=["auto","overlay","scroll"].includes(g),c=["auto","overlay","scroll"].includes(L),s.hasOverflowX=u,s.hasOverflowY=c,!u&&!c||p==="vertical"&&!c||p==="horizontal"&&!u)return!1;o=e.scrollWidth,f=e.scrollHeight,y=e.clientWidth,h=e.clientHeight,l=o>y,d=f>h,s.isScrollableX=l,s.isScrollableY=d,s.scrollWidth=o,s.scrollHeight=f,s.clientWidth=y,s.clientHeight=h}else l=s.isScrollableX,d=s.isScrollableY,u=s.hasOverflowX,c=s.hasOverflowY,o=s.scrollWidth,f=s.scrollHeight,y=s.clientWidth,h=s.clientHeight;if(!u&&!c||!l&&!d||p==="vertical"&&(!c||!d)||p==="horizontal"&&(!u||!l))return!1;let m;if(p==="horizontal")m="x";else if(p==="vertical")m="y";else{const $=t!==0,g=n!==0;$&&u&&l&&(m="x"),g&&c&&d&&(m="y")}if(!m)return!1;let S,w,I,b,v;if(m==="x")S=e.scrollLeft,w=o-y,I=t,b=u,v=l;else if(m==="y")S=e.scrollTop,w=f-h,I=n,b=c,v=d;else return!1;return(I>0?S<w:S>0)&&b&&v}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){const e=this.options.wrapper;return this.isHorizontal?e.scrollX??e.scrollLeft:e.scrollY??e.scrollTop}get scroll(){return this.options.infinite?mn(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(e){this._isScrolling!==e&&(this._isScrolling=e,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(e){this._isStopped!==e&&(this._isStopped=e,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let e="lenis";return this.options.autoToggle&&(e+=" lenis-autoToggle"),this.isStopped&&(e+=" lenis-stopped"),this.isLocked&&(e+=" lenis-locked"),this.isScrolling&&(e+=" lenis-scrolling"),this.isScrolling==="smooth"&&(e+=" lenis-smooth"),e}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}};const wn=({transition:e=1.2,easing:t,orientation:n="vertical",smoothTouch:r=!1,touchMultiplier:s=2,children:u})=>{const c=i.useRef(null),l=i.useRef(null);return i.useEffect(()=>{let d;typeof e=="string"?e.endsWith("ms")?d=parseFloat(e)/1e3:e.endsWith("s")?d=parseFloat(e):d=parseFloat(e)||1.2:d=e;const o=y=>1-Math.pow(1-y,5);c.current=new vn({duration:d,easing:t??o,orientation:n,smoothWheel:!0,touchMultiplier:s,syncTouch:r});const f=y=>{var h;(h=c.current)==null||h.raf(y),l.current=requestAnimationFrame(f)};return l.current=requestAnimationFrame(f),()=>{var y;l.current!==null&&cancelAnimationFrame(l.current),(y=c.current)==null||y.destroy(),c.current=null}},[e,t,n,r,s]),u?a.jsx(a.Fragment,{children:u}):null},de=({style:e,colorName:t,stateClassName:n="state-ripple-group",children:r,className:s})=>{const u=i.useRef(null),c=i.useRef(null),[l,d]=i.useState(!1),o=st({isClient:l,stateClassName:n,className:s,colorName:t});return i.useEffect(()=>{if(u.current&&n!=="state-layer"){const y=(n.includes("[")?"group/"+n.split("[")[1].split("]")[0]:"group").replace(/\//g,"\\/"),h=u.current.closest(`.${y}:not(.${y} .${y})`);c.current=h}d(!0)},[]),a.jsxs("div",{ref:u,className:o.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:[l&&a.jsx(Ge,{triggerRef:c}),r]})},bn=({isClient:e,stateClassName:t})=>({stateLayer:x(["w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden",t])}),st=Q("stateLayer",bn),rt=({targetRef:e,children:t})=>{const[n,r]=i.useState(null),s=i.useRef(null),u=()=>{const c=e.current;if(!c)return;const l=c.getBoundingClientRect();r({position:"fixed",top:l.top,left:l.left,width:l.width,height:l.height,pointerEvents:"none",zIndex:999})};return i.useEffect(()=>{const c=e.current;if(c)return u(),window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),s.current=new ResizeObserver(u),s.current.observe(c),()=>{var l;window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u),(l=s.current)==null||l.disconnect()}},[e]),n?Me.createPortal(a.jsx("div",{style:n,children:t}),document.body):null};function Sn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const Nn=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:r=!1})=>{const[s,u]=i.useState(null);i.useEffect(()=>{(async()=>{const h=await Se.loader(e,r);u(h)})()},[]);const[c,l]=i.useState(null),d=i.useRef(null),o=i.useRef(0),f=i.useRef(null);i.useEffect(()=>{if(!s)return;const h={...e,sourceColor:e.sourceColor},p=Date.now(),m=p-o.current,S=async w=>{await y(w)};if(o.current===0||m>=t)d.current&&(clearTimeout(d.current),d.current=null),f.current=null,o.current=p,S(h);else if(f.current=h,!d.current){const w=Math.max(0,t-m);d.current=setTimeout(async()=>{d.current=null;const I=f.current;f.current=null,I&&(o.current=Date.now(),await S(I))},w)}return()=>{}},[e,t,s]);const y=async h=>{if(typeof h.sourceColor=="string"&&!Sn(h.sourceColor))throw new Error("Invalid hex color");if(!s)return;s.context.update(h),await s.load();const p=s==null?void 0:s.plugins.getPlugin(Ke.TailwindPlugin).getInstance().outputCss;l(p),n==null||n(s)};return i.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),c?a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}):null};function En(){if(typeof window>"u")return!1;try{if(window.CSS&&typeof window.CSS.supports=="function")return CSS.supports("animation-timeline: view()")||CSS.supports("animation-timeline: scroll()")||CSS.supports("view-timeline-name: --a")}catch{}return!1}function kn(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Ce(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function Ve(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function ke(e,t){if(!Ce(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const c=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),l=c==="x"||c==="inline"?"inline":c==="y"||c==="block"?"block":"auto";e.classList.contains(`${t}-timeline`)||e.classList.contains(`${t}-timeline-inline`)||e.classList.contains(`${t}-timeline-block`)||e.classList.contains(`${t}-timeline-x`)||e.classList.contains(`${t}-timeline-y`)||(l==="inline"?e.classList.add(`${t}-timeline-inline`):l==="block"?e.classList.add(`${t}-timeline-block`):e.classList.add(`${t}-scroll`))}const n=e.getAttribute(`data-${t}-start`);n&&e.style.setProperty(`--${t}-range-start`,n);const r=e.getAttribute(`data-${t}-end`);r&&e.style.setProperty(`--${t}-range-end`,r);const s=e.hasAttribute(`data-${t}-paused`)||e.classList.contains(`${t}-paused`),u=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!s&&!u&&e.setAttribute(`data-${t}-run`,"")}function Le(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(r=>Ce(r))}function Ln(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),r=new Set([`${t}-run`,`${t}-in`,`${t}-out`,`${t}-in-run`,`${t}-out-run`,`${t}-paused`,`${t}-timeline`,`${t}-timeline-inline`,`${t}-timeline-block`,`${t}-timeline-x`,`${t}-timeline-y`,`${t}-scroll`]);return n.filter(s=>{if(!(s instanceof HTMLElement))return!1;const u=s.classList;return u.contains(`${t}-in`)||u.contains(`${t}-out`)||Array.from(u).some(d=>d.startsWith(`${t}-`)&&!d.includes("scroll")&&!r.has(d))?!0:!Ce(s)})}function jn(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function ze(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function Ye(e,t,n){const r=e.style.animationName;e.style.animationName="none",e.removeAttribute(`data-${t}-run`),n?e.removeAttribute(`data-${t}-${n}-run`):(e.removeAttribute(`data-${t}-in-run`),e.removeAttribute(`data-${t}-out-run`)),e.offsetWidth,e.style.animationName=r}const In=[0,.2],_e=new WeakSet;function qe(e,t){if(_e.has(e))return;_e.add(e);const n=s=>{s.target===e&&(e.hasAttribute(`data-${t}-in-run`)||e.hasAttribute(`data-${t}-out-run`))&&e.setAttribute(`data-${t}-animating`,"")},r=s=>{s.target===e&&e.removeAttribute(`data-${t}-animating`)};e.addEventListener("animationstart",n),e.addEventListener("animationend",r),e.addEventListener("animationcancel",r)}function Re(e={}){const{prefix:t="anim",once:n=!0}=e;if(kn())return()=>{};const r=En(),s=new WeakSet;let u=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,c=!0;const l=()=>{const p=window.pageYOffset||window.scrollY||0;c=p>=u,u=p};typeof window<"u"&&window.addEventListener("scroll",l,{passive:!0});const d=new IntersectionObserver(p=>{for(const m of p){const S=m.target;if(!Ve(S)||S.hasAttribute(`data-${t}-animating`))continue;const w=jn(S.classList,t);m.isIntersecting?(w&&Ye(S,t,"out"),ze(S,t,"in"),n&&d.unobserve(S)):n||(c||Ye(S,t,"in"),w&&ze(S,t,"out"))}},{threshold:In}),o=p=>{const m=Ln(p||document,t);for(const S of m)s.has(S)||(s.add(S),d.observe(S),qe(S,t))};o();let f,y=null,h=null;if(r)(()=>{h==null&&(h=requestAnimationFrame(()=>{h=null;const m=Le(void 0,t);for(const S of m)ke(S,t)}))})(),y=new MutationObserver(m=>{for(const S of m)if(S.type==="attributes"){const w=S.target;w instanceof HTMLElement&&(ke(w,t),Ve(w)&&(s.has(w)||(s.add(w),d.observe(w),qe(w,t))))}else if(S.type==="childList"&&S.addedNodes&&S.addedNodes.length){for(const w of Array.from(S.addedNodes))if(w instanceof HTMLElement){const I=Le(w,t);for(const b of I)ke(b,t);o(w)}}}),y.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class",`data-${t}-scroll`,`data-${t}-start`,`data-${t}-end`,`data-${t}-paused`,`data-${t}-run`]}),f=()=>{h!=null&&cancelAnimationFrame(h),y&&y.disconnect()};else{let p;Le(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(S=>{p=S.initScrollViewFallback({once:n})}),f=()=>{typeof p=="function"&&p()}}return()=>{f&&f(),typeof window<"u"&&window.removeEventListener("scroll",l),d.disconnect()}}const Mn=Re,Cn=Re,De=({anchorRef:e,position:t="bottom",children:n,style:r,...s})=>{const c=`--anchor-${i.useId().replace(/:/g,"")}`,[l,d]=i.useState(!1);if(i.useLayoutEffect(()=>{typeof CSS<"u"&&CSS.supports("anchor-name","--a")&&d(!0)},[]),i.useLayoutEffect(()=>{if(l&&e.current){const f=e.current;return f.style.anchorName=c,()=>{e.current&&(e.current.style.anchorName="")}}},[l,e,c]),l){const y={position:"fixed",margin:0,zIndex:9999,positionAnchor:c,positionArea:{top:"top",bottom:"bottom",left:"left",right:"right","top-left":"top left","top-right":"top right","bottom-left":"bottom left","bottom-right":"bottom right"}[t],positionTryFallbacks:"flip-block, flip-inline",...r};return Me.createPortal(a.jsx("div",{style:y,...s,children:n}),document.body)}const o={position:"absolute",pointerEvents:"auto",...r};switch(t){case"top":o.bottom="100%",o.left="50%",o.transform="translateX(-50%)";break;case"top-left":o.bottom="100%",o.left=0;break;case"top-right":o.bottom="100%",o.right=0;break;case"bottom":o.top="100%",o.left="50%",o.transform="translateX(-50%)";break;case"bottom-left":o.top="100%",o.left=0;break;case"bottom-right":o.top="100%",o.right=0;break;case"left":o.right="100%",o.top="50%",o.transform="translateY(-50%)";break;case"right":o.left="100%",o.top="50%",o.transform="translateY(-50%)";break}return a.jsx(rt,{targetRef:e,children:a.jsx("div",{style:o,...s,children:n})})},ot=({variant:e,disableTextMargins:t,disabled:n,iconPosition:r,icon:s,isActive:u,loading:c,shape:l,onToggle:d,size:o,allowShapeTransformation:f})=>({button:x(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",o==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",o==="small"&&"text-label-large px-4 py-2.5 gap-2",o==="medium"&&"text-title-medium px-6 py-4 gap-2",o==="large"&&"text-headline-small px-12 py-8 gap-3",o==="xLarge"&&"text-headline-large px-16 py-12 gap-4",l==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(l==="squared"||f&&u)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},f&&!n&&{"active:rounded-[12px]":o==="xSmall"||o=="small","active:rounded-[16px]":o==="medium","active:rounded-[28px]":o==="large"||o=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!u,"bg-primary text-on-primary":!n&&u,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!u&&d,"bg-primary text-on-primary":!n&&(u&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!u,"bg-secondary text-on-secondary":!n&&u,"text-on-surface/[0.38]":n},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":n,"text-primary border-outline focus:border-primary":!n&&!u,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&u}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[o==="xSmall"&&"-mx-3 ",o==="small"&&"-mx-4 ",o==="medium"&&"-mx-6 ",o==="large"&&"-mx-12",o==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("overflow-hidden",l==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(l==="squared"||f&&u)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},f&&!n&&{"group-active/button:rounded-[12px]":o==="xSmall"||o=="small","group-active/button:rounded-[16px]":o==="medium","group-active/button:rounded-[28px]":o==="large"||o=="xLarge"}),label:x({invisible:c}),icon:x({invisible:c},o==="xSmall"&&"size-5",o==="small"&&"size-5",o==="medium"&&"size-6",o==="large"&&"size-8",o==="xLarge"&&"size-10")}),Rn=ee("button",ot),it=Q("button",ot),lt=({variant:e,isInteractive:t})=>({card:x(" rounded-xl overflow-hidden ",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest",{"group/card":t})}),Dn=ee("card",lt),at=Q("card",lt),Ae=({width:e})=>({carouselItem:x("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),An=ee("carouselItem",Ae),ct=Q("carouselItem",Ae),ut=()=>({carousel:x(["w-full h-[400px]"]),track:x("flex h-full w-full")}),Fn=ee("carousel",ut),dt=Q("carousel",ut),ft=({isChecked:e,isIndeterminate:t,isDisabled:n,isError:r,isFocused:s,isHovered:u})=>({checkbox:x("inline-flex items-center justify-center relative size-4.5 ",{"pointer-events-none opacity-[0.38]":n}),input:x("absolute inset-0 w-full h-full opacity-0 z-10 cursor-pointer"),container:x("relative flex items-center justify-center w-[18px] h-[18px] "),box:x("absolute left-1/2 top-1/2 -translate-1/2 to rounded-[2px] size-4 border-2 transition-colors duration-200",!e&&!t&&{"border-on-surface-variant":!r&&!n,"border-error":r&&!n,"border-on-surface":n},(e||t)&&{"bg-primary border-primary":!r&&!n,"bg-error border-error":r&&!n,"bg-on-surface border-on-surface":n}),icon:x("z-10 relative text-on-primary w-full h-full flex items-center justify-center pointer-events-none",{"text-on-error":r&&!n,"text-surface":n}),stateLayer:"size-10 state-ripple-group-[checkbox] rounded-full cursor-pointer pointer-events-auto absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),$n=ee("checkbox",ft),ht=Q("checkbox",ft),mt=({variant:e,disabled:t,trailingIcon:n,icon:r,isActive:s,isInteractive:u,activated:c,isFocused:l,isDragging:d,isEditing:o})=>({chip:x(" group/chip px-3 py-1.5 rounded-lg flex items-center gap-2 outline-none",{"pl-2":r,"pr-2":n,"cursor-pointer":!t&&u},{" text-on-surface-variant":!c&&!l||o,"bg-secondary-container text-on-secondary-container":(c||l)&&!o},d&&["opacity-100 cursor-grabbing shadow-3"],e==="outlined"&&["border border-outline-variant",{"border-transparent":o}],e==="elevated"&&!o&&["shadow-1 bg-surface-container-low","border border-outline-variant"]),stateLayer:x("rounded-lg overflow-hidden",{}),label:x("outline-none text-nowrap",{"opacity-[0.38]":t}),leadingIcon:x("text-primary size-[18px]",{"opacity-[0.38]":t}),trailingIcon:x("cursor-pointer size-[18px]",{"opacity-[0.38]":t})}),Pn=ee("chip",mt),pt=Q("chip",mt),yt=({scrollable:e})=>({chips:x(" flex gap-3 outline-none",{"flex-wrap":!e,"overflow-x-auto":e})}),Wn=ee("chips",yt),xt=Q("chips",yt),gt=({orientation:e})=>({divider:x("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),Tn=ee("divider",gt),vt=Q("divider",gt),wt=({size:e,variant:t,extended:n})=>({fab:x("flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small","rounded-[16px]":e=="medium","rounded-[28px]":e=="large"},{"p-2":e=="small","p-4":e=="medium","p-[30px]":e=="large"},t==="primary"&&"bg-primary text-on-primary",t==="secondary"&&"bg-secondary text-on-secondary",t==="tertiary"&&"bg-tertiary text-on-tertiary",t==="primaryContainer"&&"bg-primary-container text-on-primary-container",t==="secondaryContainer"&&"bg-secondary-container text-on-secondary-container",t==="tertiaryContainer"&&"bg-tertiary-container text-on-tertiary-container"),icon:x({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:x("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),Bn=ee("fab",wt),bt=Q("fab",wt),St=({size:e,variant:t,open:n})=>({fabMenu:x("relative inline-flex flex-col items-end"),actions:x("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0"),label:x("text-nowrap")}),Hn=ee("fabMenu",St),Nt=Q("fabMenu",St),Et=({variant:e,disabled:t,onToggle:n,isActive:r,size:s,width:u,shape:c,allowShapeTransformation:l})=>({iconButton:x("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},c==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(c==="squared"||l&&r)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},l&&!t&&{"active:rounded-[12px]":s==="xSmall"||s=="small","active:rounded-[16px]":s==="medium","active:rounded-[28px]":s==="large"||s=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!r&&!!n,"bg-primary":r||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-secondary-container text-on-secondary-container":!r&&!!n,"bg-secondary text-on-secondary":r||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!r,"border border-transparent bg-inverse-surface":r},!!t&&{"border border-on-surface/[0.12]":!r,"border border-transparent bg-on-surface/[0.12]":r}]),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("absolute top-0 left-0 h-full w-full overflow-hidden",(c==="rounded"||c==="squared"&&n&&!t&&r&&l)&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(c==="squared"||c==="rounded"&&n&&!t&&r&&l)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},l&&!t&&{"group-active/icon-button:rounded-[12px]":s==="xSmall"||s=="small","group-active/icon-button:rounded-[16px]":s==="medium","group-active/icon-button:rounded-[28px]":s==="large"||s=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!r,"state-primary":r},e==="filled"&&{"state-primary":!r&&!!n,"state-inverse-on-surface":r||!n},e==="tonal"&&{"state-on-surface-variant":!r&&!!n,"state-on-secondary-container":r||!n},e==="outlined"&&{"state-on-surface-variant":!r,"state-on-primary":r}]),icon:x(" transition-all duration-300",{"size-5 p-1.5":s==="xSmall"},{"size-6 p-2":s==="small"},{"size-6 p-4":s==="medium"},{"size-8 p-8":s==="large"},{"size-10 p-12":s==="xLarge"},u=="narrow"&&[{"px-1":s==="xSmall"},{"px-1":s==="small"},{"px-3":s==="medium"},{"px-4":s==="large"},{"px-8":s==="xLarge"}],u=="wide"&&[{"px-2.5":s==="xSmall"},{"px-3.5":s==="small"},{"px-6":s==="medium"},{"px-12":s==="large"},{"px-[72px]":s==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!r,"text-primary":r},e==="filled"&&{"text-primary":!r&&!!n,"text-on-primary":r||!n},e==="outlined"&&{"text-on-surface-variant":!r,"text-inverse-on-surface":r}],!!t&&"text-on-surface/[0.38]")}),On=ee("iconButton",Et),kt=Q("iconButton",Et),Lt=({variant:e,isVisible:t})=>({progressIndicator:x((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:x("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:x({"max-h-0":!t,"max-h-full":t},(e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:x("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),Vn=ee("progressIndicator",Lt),jt=Q("progressIndicator",Lt),Fe=({variant:e,position:t})=>({sideSheet:x("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-full":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:x("w-full overflow-hidden flex flex-col",{}),header:x("p-4 flex items-center gap-2"),content:x("flex-1 overflow-y-auto"),title:x("text-on-surface-variant text-title-large"),closeButton:x("ml-auto"),divider:x({hidden:e=="modal"}),overlay:x("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),It=ee("sideSheet",Fe),zn=Q("sideSheet",Fe),$e=({isChanging:e})=>({slider:x(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:x(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:x(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:x(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:x(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:x(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),Yn=ee("slider",$e),Mt=Q("slider",$e),Ct=()=>({snackbar:x(" rounded bg-inverse-surface "),container:x("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:x("text-body-medium text-inverse-on-surface "),icon:x(" ml-auto mr-0 text-inverse-on-surface block dark")}),_n=ee("snackbar",Ct),Rt=Q("snackbar",Ct),Dt=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:x("group/switch w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:x("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:x("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!n},{"w-[24px] h-[24px]":!(!e&&!n)},!t&&["cursor-pointer group-active/switch:h-[28px] group-active/switch:w-[28px]",{"bg-on-primary group-hover/switch:bg-primary-container":e},{"bg-outline group-hover/switch:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:x("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:x("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),qn=ee("switch",Dt),At=Q("switch",Dt),Ft=({isSelected:e,icon:t,label:n,variant:r})=>({tab:x("flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&r==="primary"&&"h-16",!(t&&n&&r==="primary")&&"h-12"),stateLayer:x("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",r==="primary"&&{"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface":!e,"group-hover/tab:hover-state-primary group-focus-visible/tab:focus-state-primary":e},r==="secondary"&&"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"),content:x("flex gap-0.5 h-full justify-center",{relative:r=="primary"},{"":!!(n&&!t)},r==="primary"&&"flex-col items-center",r==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:x("h-6 w-6 p-0.5 !box-border",r==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},r==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:x("text-title-small text-nowrap",r==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},r==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:x("bg-primary absolute w-full left-0 bottom-0",r==="primary"&&"h-[3px] rounded-t",r==="secondary"&&"h-0.5")}),Xn=ee("tab",Ft),$t=Q("tab",Ft),Pt=({scrollable:e})=>({tabs:x("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Un=ee("tabs",Pt),Wt=Q("tabs",Pt),Tt=()=>({tabPanels:x("overflow-hidden")}),Kn=ee("tabPanels",Tt),Bt=Q("tabPanels",Tt),Ht=()=>({tabPanel:x("")}),Gn=ee("tabPanel",Ht),Ot=Q("tabPanel",Ht),Vt=({disabled:e,leadingIcon:t,trailingIcon:n,variant:r,errorText:s,isFocused:u,value:c,suffix:l,multiline:d})=>({textField:x({"opacity-[.38]":e}),content:x("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":!d},{"border-on-surface-variant":!(s!=null&&s.length)&&!u&&r=="filled","border-outline":!(s!=null&&s.length)&&!u&&r=="outlined","border-primary":!(s!=null&&s.length)&&u,"border-error":!!(s!=null&&s.length)},{"bg-on-surface/[0.04]":e},r=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],r=="outlined"&&["border rounded box-border",{"border-[3px]":u}]),stateLayer:x("absolute -z-10 w-full h-full top-0 left-0",{hidden:r=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":u}),label:x("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(s!=null&&s.length)},{"text-on-surface":e},{"text-error":!!(s!=null&&s.length)},{"text-primary":!(s!=null&&s.length)&&u}),input:x("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!l},r=="filled"&&" pb-2 pt-6",r=="outlined"&&"py-4 relative z-10"),activeIndicator:x("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",r=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(s!=null&&s.length)},{"bg-error":!!(s!=null&&s.length)},{"!w-full":u}]),supportingText:x(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(s!=null&&s.length)},{"text-on-surface":e},{"!w-full":u},{"text-error":!!(s!=null&&s.length)}),leadingIcon:x(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!i.isValidElement(t)}]),trailingIcon:x("h-12 w-12 flex items-center justify-center",{"cursor-text":!i.isValidElement(n)}),suffix:x("text-on-surface-variant pl-0 pr-4",r=="filled"&&" pb-2 pt-6",r=="outlined"&&"py-4 relative z-10")}),Jn=ee("textField",Vt),zt=Q("textField",Vt),Yt=({position:e,variant:t})=>({toolTip:x(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",t=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface ",{"bottom-full left-1/2 -translate-x-1/2":e=="top","top-full left-1/2 -translate-x-1/2":e=="bottom","right-full top-1/2 -translate-y-1/2":e=="left","left-full top-1/2 -translate-y-1/2":e=="right","bottom-full right-full":e=="top-left","bottom-full left-full":e=="top-right","top-full right-full":e=="bottom-left","top-full left-full":e=="bottom-right"}),container:x("pb-2",t=="rich"&&"px-4 pt-3 ",t=="plain"&&"px-2 py-1"),actions:x("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:x("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:x(""),content:x("w-full")}),Zn=ee("toolTip",Yt),_t=Q("toolTip",Yt),ae=({icon:e,colors:t=[],className:n,...r})=>{if(typeof e=="string"){let f=e;return t[0]&&(f=f.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),f=f.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),a.jsx("div",{className:x("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:f}})}if(e&&typeof e=="object"&&"src"in e){const f=e;return a.jsx("img",{src:f.src,width:f.width,height:f.height,className:x("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const s=e;if(!(s!=null&&s.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:u}=s,[c,l,,,d]=u||[],o=f=>{switch(f.length){case 2:return{"--fa-primary-color":f[0]||"inherit","--fa-secondary-color":f[1]||"inherit"};case 1:return{color:f[0]};default:return{}}};return a.jsx("svg",{className:x("size-5 box-content",n),style:{...o(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${c} ${l}`,role:"img","aria-hidden":"true",...r,children:typeof d=="string"?a.jsx("path",{className:"fill-current",d}):d.map((f,y)=>a.jsx("path",{d:f},y))})},qt=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:r,...s})=>{const[u,c]=i.useState(t),[l]=i.useState(1.5);i.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),c(t)},[t]);const[d,o]=i.useState(!0),f=()=>d?l:l*.5;i.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&u!==100){const m=setInterval(()=>{c(d?10:90),o(!d)},f()*1e3);return()=>clearInterval(m)}},[e,d,u]);const[y,h]=i.useState(!1);i.useEffect(()=>{if(u>=100){const m=setTimeout(()=>{h(!1)},n);return()=>{clearTimeout(m)}}else h(!0)},[u,n]);const p=jt({className:r,variant:e,value:t,transitionDuration:n,isVisible:y});return a.jsxs(a.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&a.jsxs("div",{className:p.progressIndicator,...s,children:[a.jsx("div",{style:{width:`${u}%`,transition:`width ${n}ms ease-in-out ${u==100?", max-height 200ms 0.5s ease-in-out":""}`},className:p.track}),a.jsx("div",{style:{marginLeft:u!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${u==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:p.activeIndicator}),a.jsx("div",{style:{width:"4 px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:p.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&a.jsx(U.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:f(),ease:"linear"},className:p.progressIndicator,...s,children:a.jsx(U.motion.circle,{cx:"50%",cy:"50%",r:y?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:p.activeIndicator,variants:{hidden:{pathLength:d?10/100:90/100},visible:{pathLength:d?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:f(),bounce:0}}})},d+"")]})};function Qn(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const pe=({variant:e="filled",disabled:t=!1,icon:n,href:r,label:s,disableTextMargins:u,className:c,iconPosition:l="left",loading:d=!1,shape:o="rounded",onClick:f,onToggle:y,activated:h,ref:p,size:m="medium",allowShapeTransformation:S=!0,transition:w,children:I,...b})=>{if(I&&(s=I),!s)throw new Error("Button component requires either a label prop or children content");e=Qn(e);const v=r?"a":"button",B=i.useRef(null),$=p||B,[g,L]=i.useState(h);i.useEffect(()=>{L(h)},[h]),w={duration:.3,...w};const A=M=>{t&&M.preventDefault(),y?(L(!g),y(!g)):f&&f(M)},j=it({allowShapeTransformation:S,size:m,disableTextMargins:u,shape:o,href:r,disabled:t,icon:n,iconPosition:l,loading:d,variant:e,transition:w,className:c,isActive:g??!1,onToggle:y,activated:g,label:s,children:s}),P=n?a.jsx(ae,{icon:n,className:j.icon}):a.jsx(a.Fragment,{});return a.jsxs(v,{ref:$,href:r,className:j.button,...b,onClick:A,disabled:t,"aria-pressed":y?g:void 0,style:{transition:w.duration+"s"},children:[a.jsx("div",{className:j.touchTarget}),a.jsx(de,{style:{transition:w.duration+"s"},className:j.stateLayer,colorName:x(e==="filled"&&{"on-surface-variant":!g&&!!y,"on-primary":g||!y},e==="elevated"&&{"on-primary":g&&!!y,primary:!g||!y},e==="tonal"&&{"on-secondary":g&&!!y,"on-secondary-container":!g||!y},e==="outlined"&&{"inverse-on-surface":g&&!!y,"on-surface-variant":!g||!y},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),l==="left"&&P,d&&a.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:a.jsx(qt,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:x({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),a.jsx("span",{className:j.label,children:s}),l==="right"&&P]})},es=({variant:e="outlined",className:t,children:n,interactive:r=!1,ref:s,...u})=>{const c=at({className:t,isInteractive:r,variant:e,children:n}),l=i.useRef(null),d=s||l;return a.jsxs("div",{...u,ref:d,className:c.card,children:[r&&a.jsx(de,{className:c.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},xe=(e,t,n=[0,1])=>{const[r,s]=t,[u,c]=n,d=(Math.max(r,Math.min(e,s))-r)/(s-r);return u+d*(c-u)},Xt=({className:e,children:t,width:n,index:r=0,outputRange:s,ref:u,...c})=>{const l=i.useRef(null),d=u||l,o=ct({className:e,index:r,width:n,children:t,outputRange:s});return a.jsx("div",{ref:d,style:{width:n+"px",maxWidth:s[1]+"px",minWidth:s[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:o.carouselItem,...c,children:t})},ts=({variant:e="hero",className:t,children:n,ref:r,marginPourcent:s=0,inputRange:u=[.21,.65],outputRange:c=[42,300],gap:l=8,onChange:d,onMetricsChange:o,index:f,scrollSensitivity:y=1.25,...h})=>{const p=i.useRef(null),m=r||p,[S,w]=i.useState(0),I=dt({index:f,className:t,children:n,variant:e,inputRange:u,outputRange:c,marginPourcent:s,onChange:d,gap:l,scrollSensitivity:y,onMetricsChange:o}),b=i.Children.toArray(n).filter(N=>i.isValidElement(N)&&N.type===Xt),v=i.useRef(null),[B,$]=i.useState({}),[g,L]=i.useState(null),A=i.useRef(0),j=i.useRef(null),P=()=>{var le,ye;if(!v.current||!m.current||(g==null?void 0:g.scrollProgress)===void 0)return[];const N=(g==null?void 0:g.scrollVisible)??((le=m.current)==null?void 0:le.clientWidth)??0;function F(Y,se){return Y.map((re,ue)=>{const fe=(re-se)/Math.abs(Y[1]-Y[0]);return{itemScrollXCenter:re,relativeIndex:fe,index:ue,width:0}})}const V=b.map((Y,se)=>{if(!M[se].current||!v.current)return 0;const ue=se/(b.length-1);return xe(ue,[0,1],[0,1])}),z=F(V,(g==null?void 0:g.scrollProgress)??0).sort((Y,se)=>Y.index-se.index);let q=(((ye=m.current)==null?void 0:ye.clientWidth)??N)+l+c[0]+l;const Z=z.sort((Y,se)=>Math.abs(Y.relativeIndex)-Math.abs(se.relativeIndex)).map((Y,se)=>{if(!(q<=0)){if(se==0&&O(Y.index),Y.width=xe(q-l,[c[0],c[1]],[c[0],c[1]]),q-=Y.width+l,q!=0&&q<(c[0]+l)*2){const re=Y.width-((c[0]+l)*2-q);q+=Y.width,Y.width=re,q-=Y.width}else if(q==0&&Y.width>=c[0]*2+l){const re=Y.width-(c[0]+l-q);q+=Y.width,Y.width=re,q-=Y.width}return Y}}).filter(Boolean),D=Z.reverse(),_=[...Z].sort((Y,se)=>Math.abs(Y.index)-Math.abs(se.index));D.forEach((Y,se)=>{const re=D[se+1];if(!re)return;const ue=1-(Math.abs(Y.relativeIndex)-Math.abs(re==null?void 0:re.relativeIndex)),fe=xe(ue,[0,2],[Y.width+q,re.width]);q+=Y.width,Y.width=fe,q-=Y.width});const ne=Z.length/2,ie=xe(Math.abs(_[0].relativeIndex),[_[0].index==0?0:ne-1,ne],[0,1]),ve=xe(ie,[0,1],[0,1])*-(c[0]+l);return w(ve),Object.fromEntries(Z.map(Y=>[Y.index,Y.width]))},M=i.useRef([]).current,[X,O]=i.useState(0);i.useEffect(()=>{d&&d(X)},[X]),i.useEffect(()=>{typeof f=="number"&&b.length>0&&f!==X&&C(f)},[f,b.length]),i.useEffect(()=>{W(X)},[X]),M.length!==b.length&&b.forEach((N,F)=>{M[F]||(M[F]=i.createRef())});const[J,W]=i.useState(0),C=(N,F={})=>{if(!b.length)return 0;const V=M[N];if(!V||!V.current||!v.current)return 0;const z=xe(N/Math.max(1,b.length-1),[0,1],[0,1]);return W(N),v.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:z,orientation:"horizontal",animate:F.animate!==!1}})),z},R=b.map((N,F)=>{var Z;const V=(Z=N.props)==null?void 0:Z.onClick,z=D=>{V==null||V(D)},q=()=>W(F);return i.cloneElement(N,{width:B[F],outputRange:c,ref:M[F],key:F,index:F,role:"option","aria-selected":X===F,tabIndex:X===F?0:-1,onClick:z,onFocus:q})}),H=N=>{var F;if(N.scrollTotal>0){(F=j.current)==null||F.stop();const V=A.current??0,z=N.scrollProgress??0;j.current=U.animate(V,z,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:q=>{A.current=q,L({...N,scrollProgress:q})}})}};i.useEffect(()=>{const N=P();$(N)},[g]);const G=i.useRef(o);i.useEffect(()=>{G.current=o},[o]);const K=i.useRef(null);i.useEffect(()=>{var se;const N=G.current;if(!N||!(m!=null&&m.current))return;const F=b.length;if(F<=0)return;const V=((se=m.current)==null?void 0:se.clientWidth)??0,z=c[1],q=A.current??(g==null?void 0:g.scrollProgress)??0,Z=(V+l)/(z+l),D=Math.max(1,Math.floor(Z)),_=Math.max(1,Math.round(D*(2/3))),ne=Math.min(Math.max(0,X),Math.max(0,F-1)),ie=ne>0,ve=ne<F-1,le={total:F,selectedIndex:ne,visibleApprox:Z,visibleFull:D,stepHalf:_,canPrev:ie,canNext:ve,scrollProgress:q,viewportWidth:V,itemMaxWidth:z,gap:l},ye=K.current;let Y=!ye;if(!Y){for(const re in le)if(le[re]!==ye[re]){Y=!0;break}}Y&&(K.current=le,N(le))},[m,b.length,X,g,l,c]),i.useEffect(()=>()=>{var N;(N=j.current)==null||N.stop()},[]);const[te,k]=i.useState(0);i.useLayoutEffect(()=>{let N=c[1];g&&N>g.scrollVisible&&(N=g.scrollVisible);const F=(N+l)*R.length/y;k(F)},[m,M,g]);const E=N=>{if(!b.length)return;const F=J??X;switch(N.key){case"ArrowLeft":N.preventDefault(),C(Math.max(0,F-1));break;case"ArrowRight":N.preventDefault(),C(Math.min(b.length-1,F+1));break;case"Home":N.preventDefault(),C(0);break;case"End":N.preventDefault(),C(b.length-1);break;case"Enter":case" ":N.preventDefault(),C(F);break}};return i.useEffect(()=>{const N=m.current;if(!N)return;const F=V=>{const z=V.detail;z&&typeof z.index=="number"&&C(z.index)};return N.addEventListener("udx:carousel:centerIndex",F),()=>{N.removeEventListener("udx:carousel:centerIndex",F)}},[m,b.length]),a.jsx("div",{className:I.carousel,ref:m,role:"listbox","aria-orientation":"horizontal",onKeyDown:E,...h,children:a.jsx(et,{draggable:!0,orientation:"horizontal",onScroll:H,scrollSize:te,children:a.jsx("div",{className:I.track,ref:v,style:{gap:`${l}px`,translate:S,willChange:"translate"},children:R})})})};/*!
1
+ "use strict";var rn=Object.defineProperty;var on=(e,t,n)=>t in e?rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var T=(e,t,n)=>on(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),i=require("react"),X=require("motion/react"),Ke=require("clsx"),ln=require("tailwind-merge"),Me=require("react-dom"),Se=require("@udixio/theme"),Ge=require("@udixio/tailwind"),an=require("react-textarea-autosize"),Je=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:1,"--r":"25%"},animate:{opacity:1,"--r":"100%",transition:{duration:.5}},exit:{opacity:0,"--r":"100%",transition:{duration:.3}}},[s,r]=i.useState(!0),[u,c]=i.useState(!1),[l,d]=i.useState({x:50,y:50});i.useEffect(()=>{u&&(r(!0),r(!1))},[u]),i.useEffect(()=>{const p=t==null?void 0:t.current;if(p)return p.addEventListener("mousedown",o),p.addEventListener("mouseup",y),p.addEventListener("mouseleave",f),()=>{p.removeEventListener("mousedown",o),p.removeEventListener("mouseup",y),p.removeEventListener("mouseleave",f)}},[t]);const o=p=>{const b=t==null?void 0:t.current,w=b.getBoundingClientRect();c(!0),d({x:(p.clientX-w.left)/b.clientWidth*100,y:(p.clientY-w.top)/b.clientHeight*100})},f=p=>{c(!1)},y=p=>{c(!1)},h=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,m={position:"absolute",inset:0,width:"100%",height:"100%","--x":l.x+"%","--y":l.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${h} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return a.jsx(X.AnimatePresence,{mode:"wait",children:(u||!u&&!s)&&a.jsx(X.motion.div,{style:m,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},Ze=ln.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),x=(...e)=>Ze(Ke.clsx(e)),Qe=(...e)=>Ze(Ke.clsx(e));function cn(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const Ee=e=>{const t={};e.classNameList.forEach(s=>{var r;if(s)if(typeof s=="string")(t[r=e.default]??(t[r]=[])).push(s);else{const u=s(e.states);Object.entries(u).map(c=>{const[l,d]=c;(t[l]??(t[l]=[])).push(d)})}});const n=t;return Object.entries(t).map(s=>{let[r,u]=s;u=u.reverse(),r==e.default&&u.unshift("relative"),u.unshift(cn(r)),n[r]=Qe(...u)}),n},ne=(e,t)=>n=>Ee({classNameList:[n.className,t],default:e,states:n}),ee=(e,t)=>n=>i.useMemo(()=>Ee({classNameList:[n.className,t],default:e,states:n}),[n]);function un(e,t,n){return i.useMemo(()=>Ee({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const et=ne("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:x("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":n,"[&::-webkit-scrollbar-thumb]:bg-transparent":!n},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!n,"cursor-grabbing":t&&n}),track:x("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function dn(e,t){let n=0,s=null,r=null;const u=(c,l)=>{n=Date.now(),t(c,l)};return(c,l)=>{const d=Date.now(),o=e-(d-n);o<=0?(s&&(clearTimeout(s),s=null),u(c,l)):(r={v:c,o:l},s||(s=setTimeout(()=>{s=null;const f=r;r=null,f&&u(f.v,f.o)},o)))}}const tt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:s,className:r,draggable:u=!1,throttleDuration:c=75,scroll:l,setScroll:d})=>{var te,E;const o=i.useRef(null),f=i.useRef(null),[y,h]=i.useState({width:null,height:null});i.useEffect(()=>{if(!o.current)return;const L=new ResizeObserver(N=>{for(const A of N)A.target===o.current&&h({width:A.contentRect.width,height:A.contentRect.height})});return L.observe(o.current),()=>{L.disconnect()}},[o]);const m=i.useRef(null),p=i.useRef(null),b=()=>{const L=f.current;return L?{width:n??L.scrollWidth,height:n??L.scrollHeight}:null},w=()=>{const L=o.current;return L?{width:L.clientWidth,height:L.clientHeight}:null},{scrollYProgress:I,scrollXProgress:S}=X.useScroll({container:o}),g=i.useRef(null);g.current||(g.current=dn(c,(L,N)=>{!p.current||!m.current||!o.current||(N===(t==="horizontal"?"x":"y")&&(d==null||d(L)),s&&(t==="horizontal"&&N==="x"&&s({scrollProgress:L,scroll:L*(m.current.width-o.current.clientWidth),scrollTotal:m.current.width-o.current.clientWidth,scrollVisible:p.current.width}),t==="vertical"&&N==="y"&&s({scrollProgress:L,scroll:L*(m.current.height-o.current.clientHeight),scrollTotal:m.current.height-o.current.clientHeight,scrollVisible:p.current.height})))}));const B=(L,N)=>{g.current&&g.current(L,N)};i.useEffect(()=>{y.width&&B(S.get(),"x"),y.height&&B(I.get(),"y")},[y]),i.useEffect(()=>{const L=o.current,N=f.current;if(!L||!N||typeof l!="number")return;const A=(O,_,z)=>Math.min(z,Math.max(_,O));if(t==="horizontal"){const O=Math.max(0,(n??N.scrollWidth)-L.clientWidth);L.scrollLeft=A(l*O,0,O)}else{const O=Math.max(0,(n??N.scrollHeight)-L.clientHeight);L.scrollTop=A(l*O,0,O)}},[l,t,n]),X.useMotionValueEvent(S,"change",L=>{B(L,"x")}),X.useMotionValueEvent(I,"change",L=>{B(L,"y")});const[$,v]=i.useState(!1);i.useLayoutEffect(()=>{$||!p.current||!m.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?m.current.height:m.current.width,scrollVisible:t=="vertical"?p.current.height:p.current.width}),v(!0))},[p,m,s]),m.current=b(),p.current=w();const[k,F]=i.useState(!1),j=et({isDragging:k,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:u,throttleDuration:c}),[P,M]=i.useState(0),[q,V]=i.useState(0),Q=L=>{if(!u)return;const N=o.current;if(!N||P==null)return;const O=(L.pageX-N.offsetLeft-P)*1.5;N.scrollLeft=q-O},W=L=>{const N=o.current;N&&(F(!0),M(L.pageX-N.offsetLeft),V(N.scrollLeft))},C=L=>{k&&(L.preventDefault(),Q(L))},R=()=>{F(!1)},H=()=>{F(!1)},U=L=>{L.preventDefault()},G=i.useRef(null);return i.useEffect(()=>()=>{G.current&&clearTimeout(G.current)},[]),i.useEffect(()=>{const L=o.current;if(!L)return;const N=A=>{var Z,D,Y,se;const O=A.detail,_=o.current;if(!_||!O)return;const z=O.orientation??t;if(typeof O.progress=="number")if(z==="horizontal"){const ie=Math.max(0,(((Z=m.current)==null?void 0:Z.width)??0)-_.clientWidth);_.scrollLeft=Math.min(ie,Math.max(0,O.progress*ie))}else{const ie=Math.max(0,(((D=m.current)==null?void 0:D.height)??0)-_.clientHeight);_.scrollTop=Math.min(ie,Math.max(0,O.progress*ie))}else if(typeof O.scroll=="number")if(z==="horizontal"){const ie=Math.max(0,(((Y=m.current)==null?void 0:Y.width)??0)-_.clientWidth);_.scrollLeft=Math.min(ie,Math.max(0,O.scroll))}else{const ie=Math.max(0,(((se=m.current)==null?void 0:se.height)??0)-_.clientHeight);_.scrollTop=Math.min(ie,Math.max(0,O.scroll))}};return L.addEventListener("udx:customScroll:set",N),()=>{L.removeEventListener("udx:customScroll:set",N)}},[t]),a.jsxs("div",{className:j.customScroll,ref:o,onMouseDown:W,onMouseMove:C,onMouseUp:R,onMouseLeave:H,onDragStart:U,onScroll:L=>{k||(M(null),F(!0),G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{F(!1)},1e3))},children:[a.jsx("div",{ref:f,style:t==="vertical"?{height:((te=p==null?void 0:p.current)==null?void 0:te.height)??"100%"}:{width:((E=p==null?void 0:p.current)==null?void 0:E.width)??"100%"},className:j.track,children:e}),p.current&&m.current&&a.jsxs(a.Fragment,{children:[t==="vertical"&&m.current.height>p.current.height&&a.jsx(X.motion.div,{className:"flex-none",style:{height:m.current.height-p.current.height}}),t==="horizontal"&&m.current.width>p.current.width&&a.jsx(X.motion.div,{className:"flex-none",style:{width:m.current.width-p.current.width}})]})]})};var fn="1.3.17";function nt(e,t,n){return Math.max(e,Math.min(t,n))}function hn(e,t,n){return(1-n)*e+n*t}function mn(e,t,n,s){return hn(e,t,1-Math.exp(-n*s))}function pn(e,t){return(e%t+t)%t}var yn=class{constructor(){T(this,"isRunning",!1);T(this,"value",0);T(this,"from",0);T(this,"to",0);T(this,"currentTime",0);T(this,"lerp");T(this,"duration");T(this,"easing");T(this,"onUpdate")}advance(e){var n;if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;const s=nt(0,this.currentTime/this.duration,1);t=s>=1;const r=t?1:this.easing(s);this.value=this.from+(this.to-this.from)*r}else this.lerp?(this.value=mn(this.value,this.to,this.lerp*60,e),Math.round(this.value)===this.to&&(this.value=this.to,t=!0)):(this.value=this.to,t=!0);t&&this.stop(),(n=this.onUpdate)==null||n.call(this,this.value,t)}stop(){this.isRunning=!1}fromTo(e,t,{lerp:n,duration:s,easing:r,onStart:u,onUpdate:c}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=s,this.easing=r,this.currentTime=0,this.isRunning=!0,u==null||u(),this.onUpdate=c}};function xn(e,t){let n;return function(...s){let r=this;clearTimeout(n),n=setTimeout(()=>{n=void 0,e.apply(r,s)},t)}}var vn=class{constructor(e,t,{autoResize:n=!0,debounce:s=250}={}){T(this,"width",0);T(this,"height",0);T(this,"scrollHeight",0);T(this,"scrollWidth",0);T(this,"debouncedResize");T(this,"wrapperResizeObserver");T(this,"contentResizeObserver");T(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});T(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});T(this,"onContentResize",()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)});this.wrapper=e,this.content=t,n&&(this.debouncedResize=xn(this.resize,s),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){var e,t;(e=this.wrapperResizeObserver)==null||e.disconnect(),(t=this.contentResizeObserver)==null||t.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize,!1)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},st=class{constructor(){T(this,"events",{})}emit(e,...t){var s;let n=this.events[e]||[];for(let r=0,u=n.length;r<u;r++)(s=n[r])==null||s.call(n,...t)}on(e,t){var n;return(n=this.events[e])!=null&&n.push(t)||(this.events[e]=[t]),()=>{var s;this.events[e]=(s=this.events[e])==null?void 0:s.filter(r=>t!==r)}}off(e,t){var n;this.events[e]=(n=this.events[e])==null?void 0:n.filter(s=>t!==s)}destroy(){this.events={}}},Oe=100/6,he={passive:!1},gn=class{constructor(e,t={wheelMultiplier:1,touchMultiplier:1}){T(this,"touchStart",{x:0,y:0});T(this,"lastDelta",{x:0,y:0});T(this,"window",{width:0,height:0});T(this,"emitter",new st);T(this,"onTouchStart",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:e})});T(this,"onTouchMove",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e,s=-(t-this.touchStart.x)*this.options.touchMultiplier,r=-(n-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:s,y:r},this.emitter.emit("scroll",{deltaX:s,deltaY:r,event:e})});T(this,"onTouchEnd",e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})});T(this,"onWheel",e=>{let{deltaX:t,deltaY:n,deltaMode:s}=e;const r=s===1?Oe:s===2?this.window.width:1,u=s===1?Oe:s===2?this.window.height:1;t*=r,n*=u,t*=this.options.wheelMultiplier,n*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:n,event:e})});T(this,"onWindowResize",()=>{this.window={width:window.innerWidth,height:window.innerHeight}});this.element=e,this.options=t,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,he),this.element.addEventListener("touchstart",this.onTouchStart,he),this.element.addEventListener("touchmove",this.onTouchMove,he),this.element.addEventListener("touchend",this.onTouchEnd,he)}on(e,t){return this.emitter.on(e,t)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,he),this.element.removeEventListener("touchstart",this.onTouchStart,he),this.element.removeEventListener("touchmove",this.onTouchMove,he),this.element.removeEventListener("touchend",this.onTouchEnd,he)}},Ve=e=>Math.min(1,1.001-Math.pow(2,-10*e)),wn=class{constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:n=e,smoothWheel:s=!0,syncTouch:r=!1,syncTouchLerp:u=.075,touchInertiaExponent:c=1.7,duration:l,easing:d,lerp:o=.1,infinite:f=!1,orientation:y="vertical",gestureOrientation:h=y==="horizontal"?"both":"vertical",touchMultiplier:m=1,wheelMultiplier:p=1,autoResize:b=!0,prevent:w,virtualScroll:I,overscroll:S=!0,autoRaf:g=!1,anchors:B=!1,autoToggle:$=!1,allowNestedScroll:v=!1,__experimental__naiveDimensions:k=!1,naiveDimensions:F=k,stopInertiaOnNavigate:j=!1}={}){T(this,"_isScrolling",!1);T(this,"_isStopped",!1);T(this,"_isLocked",!1);T(this,"_preventNextNativeScrollEvent",!1);T(this,"_resetVelocityTimeout",null);T(this,"_rafId",null);T(this,"isTouching");T(this,"time",0);T(this,"userData",{});T(this,"lastVelocity",0);T(this,"velocity",0);T(this,"direction",0);T(this,"options");T(this,"targetScroll");T(this,"animatedScroll");T(this,"animate",new yn);T(this,"emitter",new st);T(this,"dimensions");T(this,"virtualScroll");T(this,"onScrollEnd",e=>{e instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&e.stopPropagation()});T(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});T(this,"onTransitionEnd",e=>{e.propertyName.includes("overflow")&&this.checkOverflow()});T(this,"onClick",e=>{const n=e.composedPath().filter(s=>s instanceof HTMLAnchorElement&&s.getAttribute("href"));if(this.options.anchors){const s=n.find(r=>{var u;return(u=r.getAttribute("href"))==null?void 0:u.includes("#")});if(s){const r=s.getAttribute("href");if(r){const u=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,c=`#${r.split("#")[1]}`;this.scrollTo(c,u)}}}this.options.stopInertiaOnNavigate&&n.find(r=>r.host===window.location.host)&&this.reset()});T(this,"onPointerDown",e=>{e.button===1&&this.reset()});T(this,"onVirtualScroll",e=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(e)===!1)return;const{deltaX:t,deltaY:n,event:s}=e;if(this.emitter.emit("virtual-scroll",{deltaX:t,deltaY:n,event:s}),s.ctrlKey||s.lenisStopPropagation)return;const r=s.type.includes("touch"),u=s.type.includes("wheel");this.isTouching=s.type==="touchstart"||s.type==="touchmove";const c=t===0&&n===0;if(this.options.syncTouch&&r&&s.type==="touchstart"&&c&&!this.isStopped&&!this.isLocked){this.reset();return}const d=this.options.gestureOrientation==="vertical"&&n===0||this.options.gestureOrientation==="horizontal"&&t===0;if(c||d)return;let o=s.composedPath();o=o.slice(0,o.indexOf(this.rootElement));const f=this.options.prevent;if(o.find(w=>{var I,S,g;return w instanceof HTMLElement&&(typeof f=="function"&&(f==null?void 0:f(w))||((I=w.hasAttribute)==null?void 0:I.call(w,"data-lenis-prevent"))||r&&((S=w.hasAttribute)==null?void 0:S.call(w,"data-lenis-prevent-touch"))||u&&((g=w.hasAttribute)==null?void 0:g.call(w,"data-lenis-prevent-wheel"))||this.options.allowNestedScroll&&this.checkNestedScroll(w,{deltaX:t,deltaY:n}))}))return;if(this.isStopped||this.isLocked){s.cancelable&&s.preventDefault();return}if(!(this.options.syncTouch&&r||this.options.smoothWheel&&u)){this.isScrolling="native",this.animate.stop(),s.lenisStopPropagation=!0;return}let h=n;this.options.gestureOrientation==="both"?h=Math.abs(n)>Math.abs(t)?n:t:this.options.gestureOrientation==="horizontal"&&(h=t),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||this.animatedScroll===0&&n>0||this.animatedScroll===this.limit&&n<0))&&(s.lenisStopPropagation=!0),s.cancelable&&s.preventDefault();const m=r&&this.options.syncTouch,b=r&&s.type==="touchend";b&&(h=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent)),this.scrollTo(this.targetScroll+h,{programmatic:!1,...m?{lerp:b?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});T(this,"onNativeScroll",()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){const e=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-e,this.direction=Math.sign(this.animatedScroll-e),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}});T(this,"raf",e=>{const t=e-(this.time||e);this.time=e,this.animate.advance(t*.001),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))});window.lenisVersion=fn,(!e||e===document.documentElement)&&(e=window),typeof l=="number"&&typeof d!="function"?d=Ve:typeof d=="function"&&typeof l!="number"&&(l=1),this.options={wrapper:e,content:t,eventsTarget:n,smoothWheel:s,syncTouch:r,syncTouchLerp:u,touchInertiaExponent:c,duration:l,easing:d,lerp:o,infinite:f,gestureOrientation:h,orientation:y,touchMultiplier:m,wheelMultiplier:p,autoResize:b,prevent:w,virtualScroll:I,overscroll:S,autoRaf:g,anchors:B,autoToggle:$,allowNestedScroll:v,naiveDimensions:F,stopInertiaOnNavigate:j},this.dimensions=new vn(e,t,{autoResize:b}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new gn(n,{touchMultiplier:m,wheelMultiplier:p}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd,{passive:!0})),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(e,t){return this.emitter.on(e,t)}off(e,t){return this.emitter.off(e,t)}get overflow(){const e=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[e]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}setScroll(e){this.isHorizontal?this.options.wrapper.scrollTo({left:e,behavior:"instant"}):this.options.wrapper.scrollTo({top:e,behavior:"instant"})}resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}scrollTo(e,{offset:t=0,immediate:n=!1,lock:s=!1,programmatic:r=!0,lerp:u=r?this.options.lerp:void 0,duration:c=r?this.options.duration:void 0,easing:l=r?this.options.easing:void 0,onStart:d,onComplete:o,force:f=!1,userData:y}={}){if(!((this.isStopped||this.isLocked)&&!f)){if(typeof e=="string"&&["top","left","start","#"].includes(e))e=0;else if(typeof e=="string"&&["bottom","right","end"].includes(e))e=this.limit;else{let h;if(typeof e=="string"?(h=document.querySelector(e),h||(e==="#top"?e=0:console.warn("Lenis: Target not found",e))):e instanceof HTMLElement&&(e!=null&&e.nodeType)&&(h=e),h){if(this.options.wrapper!==window){const p=this.rootElement.getBoundingClientRect();t-=this.isHorizontal?p.left:p.top}const m=h.getBoundingClientRect();e=(this.isHorizontal?m.left:m.top)+this.animatedScroll}}if(typeof e=="number"){if(e+=t,e=Math.round(e),this.options.infinite){if(r){this.targetScroll=this.animatedScroll=this.scroll;const h=e-this.animatedScroll;h>this.limit/2?e=e-this.limit:h<-this.limit/2&&(e=e+this.limit)}}else e=nt(0,e,this.limit);if(e===this.targetScroll){d==null||d(this),o==null||o(this);return}if(this.userData=y??{},n){this.animatedScroll=this.targetScroll=e,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),o==null||o(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}r||(this.targetScroll=e),typeof c=="number"&&typeof l!="function"?l=Ve:typeof l=="function"&&typeof c!="number"&&(c=1),this.animate.fromTo(this.animatedScroll,e,{duration:c,easing:l,lerp:u,onStart:()=>{s&&(this.isLocked=!0),this.isScrolling="smooth",d==null||d(this)},onUpdate:(h,m)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=h-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=h,this.setScroll(this.scroll),r&&(this.targetScroll=h),m||this.emit(),m&&(this.reset(),this.emit(),o==null||o(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}checkNestedScroll(e,{deltaX:t,deltaY:n}){const s=Date.now(),r=e._lenis??(e._lenis={});let u,c,l,d,o,f,y,h;const m=this.options.gestureOrientation;if(s-(r.time??0)>2e3){r.time=Date.now();const $=window.getComputedStyle(e);r.computedStyle=$;const v=$.overflowX,k=$.overflowY;if(u=["auto","overlay","scroll"].includes(v),c=["auto","overlay","scroll"].includes(k),r.hasOverflowX=u,r.hasOverflowY=c,!u&&!c||m==="vertical"&&!c||m==="horizontal"&&!u)return!1;o=e.scrollWidth,f=e.scrollHeight,y=e.clientWidth,h=e.clientHeight,l=o>y,d=f>h,r.isScrollableX=l,r.isScrollableY=d,r.scrollWidth=o,r.scrollHeight=f,r.clientWidth=y,r.clientHeight=h}else l=r.isScrollableX,d=r.isScrollableY,u=r.hasOverflowX,c=r.hasOverflowY,o=r.scrollWidth,f=r.scrollHeight,y=r.clientWidth,h=r.clientHeight;if(!u&&!c||!l&&!d||m==="vertical"&&(!c||!d)||m==="horizontal"&&(!u||!l))return!1;let p;if(m==="horizontal")p="x";else if(m==="vertical")p="y";else{const $=t!==0,v=n!==0;$&&u&&l&&(p="x"),v&&c&&d&&(p="y")}if(!p)return!1;let b,w,I,S,g;if(p==="x")b=e.scrollLeft,w=o-y,I=t,S=u,g=l;else if(p==="y")b=e.scrollTop,w=f-h,I=n,S=c,g=d;else return!1;return(I>0?b<w:b>0)&&S&&g}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){const e=this.options.wrapper;return this.isHorizontal?e.scrollX??e.scrollLeft:e.scrollY??e.scrollTop}get scroll(){return this.options.infinite?pn(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(e){this._isScrolling!==e&&(this._isScrolling=e,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(e){this._isStopped!==e&&(this._isStopped=e,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let e="lenis";return this.options.autoToggle&&(e+=" lenis-autoToggle"),this.isStopped&&(e+=" lenis-stopped"),this.isLocked&&(e+=" lenis-locked"),this.isScrolling&&(e+=" lenis-scrolling"),this.isScrolling==="smooth"&&(e+=" lenis-smooth"),e}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}};const bn=({transition:e=1.2,easing:t,orientation:n="vertical",smoothTouch:s=!1,touchMultiplier:r=2,children:u})=>{const c=i.useRef(null),l=i.useRef(null);return i.useEffect(()=>{let d;typeof e=="string"?e.endsWith("ms")?d=parseFloat(e)/1e3:e.endsWith("s")?d=parseFloat(e):d=parseFloat(e)||1.2:d=e;const o=y=>1-Math.pow(1-y,5);c.current=new wn({duration:d,easing:t??o,orientation:n,smoothWheel:!0,touchMultiplier:r,syncTouch:s});const f=y=>{var h;(h=c.current)==null||h.raf(y),l.current=requestAnimationFrame(f)};return l.current=requestAnimationFrame(f),()=>{var y;l.current!==null&&cancelAnimationFrame(l.current),(y=c.current)==null||y.destroy(),c.current=null}},[e,t,n,s,r]),u?a.jsx(a.Fragment,{children:u}):null},de=({style:e,colorName:t,stateClassName:n="state-ripple-group",children:s,className:r})=>{const u=i.useRef(null),c=i.useRef(null),[l,d]=i.useState(!1),o=rt({isClient:l,stateClassName:n,className:r,colorName:t});return i.useEffect(()=>{if(u.current&&n!=="state-layer"){const y=(n.includes("[")?"group/"+n.split("[")[1].split("]")[0]:"group").replace(/\//g,"\\/"),h=u.current.closest(`.${y}:not(.${y} .${y})`);c.current=h}d(!0)},[]),a.jsxs("div",{ref:u,className:o.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:[l&&a.jsx(Je,{triggerRef:c}),s]})},Sn=({isClient:e,stateClassName:t})=>({stateLayer:x(["w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden",t])}),rt=ee("stateLayer",Sn),ot=({targetRef:e,children:t})=>{const[n,s]=i.useState(null),r=i.useRef(null),u=()=>{const c=e.current;if(!c)return;const l=c.getBoundingClientRect();s({position:"fixed",top:l.top,left:l.left,width:l.width,height:l.height,pointerEvents:"none",zIndex:999})};return i.useEffect(()=>{const c=e.current;if(c)return u(),window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),r.current=new ResizeObserver(u),r.current.observe(c),()=>{var l;window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u),(l=r.current)==null||l.disconnect()}},[e]),n?Me.createPortal(a.jsx("div",{style:n,children:t}),document.body):null};function Nn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const En=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:s=!1})=>{const[r,u]=i.useState(null);i.useEffect(()=>{(async()=>{const h=await Se.loader(e,s);u(h)})()},[]);const[c,l]=i.useState(null),d=i.useRef(null),o=i.useRef(0),f=i.useRef(null);i.useEffect(()=>{if(!r)return;const h={...e,sourceColor:e.sourceColor},m=Date.now(),p=m-o.current,b=async w=>{await y(w)};if(o.current===0||p>=t)d.current&&(clearTimeout(d.current),d.current=null),f.current=null,o.current=m,b(h);else if(f.current=h,!d.current){const w=Math.max(0,t-p);d.current=setTimeout(async()=>{d.current=null;const I=f.current;f.current=null,I&&(o.current=Date.now(),await b(I))},w)}return()=>{}},[e,t,r]);const y=async h=>{if(typeof h.sourceColor=="string"&&!Nn(h.sourceColor))throw new Error("Invalid hex color");if(!r)return;r.context.update(h),await r.load();const m=r==null?void 0:r.plugins.getPlugin(Ge.TailwindPlugin).getInstance().outputCss;l(m),n==null||n(r)};return i.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),c?a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}):null};function kn(){if(typeof window>"u")return!1;try{if(window.CSS&&typeof window.CSS.supports=="function")return CSS.supports("animation-timeline: view()")||CSS.supports("animation-timeline: scroll()")||CSS.supports("view-timeline-name: --a")}catch{}return!1}function Ln(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Ce(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function ze(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function ke(e,t){if(!Ce(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const c=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),l=c==="x"||c==="inline"?"inline":c==="y"||c==="block"?"block":"auto";e.classList.contains(`${t}-timeline`)||e.classList.contains(`${t}-timeline-inline`)||e.classList.contains(`${t}-timeline-block`)||e.classList.contains(`${t}-timeline-x`)||e.classList.contains(`${t}-timeline-y`)||(l==="inline"?e.classList.add(`${t}-timeline-inline`):l==="block"?e.classList.add(`${t}-timeline-block`):e.classList.add(`${t}-scroll`))}const n=e.getAttribute(`data-${t}-start`);n&&e.style.setProperty(`--${t}-range-start`,n);const s=e.getAttribute(`data-${t}-end`);s&&e.style.setProperty(`--${t}-range-end`,s);const r=e.hasAttribute(`data-${t}-paused`)||e.classList.contains(`${t}-paused`),u=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!u&&e.setAttribute(`data-${t}-run`,"")}function Le(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(s=>Ce(s))}function jn(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),s=new Set([`${t}-run`,`${t}-in`,`${t}-out`,`${t}-in-run`,`${t}-out-run`,`${t}-paused`,`${t}-timeline`,`${t}-timeline-inline`,`${t}-timeline-block`,`${t}-timeline-x`,`${t}-timeline-y`,`${t}-scroll`]);return n.filter(r=>{if(!(r instanceof HTMLElement))return!1;const u=r.classList;return u.contains(`${t}-in`)||u.contains(`${t}-out`)||Array.from(u).some(d=>d.startsWith(`${t}-`)&&!d.includes("scroll")&&!s.has(d))?!0:!Ce(r)})}function In(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function Ye(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function _e(e,t,n){const s=e.style.animationName;e.style.animationName="none",e.removeAttribute(`data-${t}-run`),n?e.removeAttribute(`data-${t}-${n}-run`):(e.removeAttribute(`data-${t}-in-run`),e.removeAttribute(`data-${t}-out-run`)),e.offsetWidth,e.style.animationName=s}const Mn=[0,.2],qe=new WeakSet;function Xe(e,t){if(qe.has(e))return;qe.add(e);const n=r=>{r.target===e&&(e.hasAttribute(`data-${t}-in-run`)||e.hasAttribute(`data-${t}-out-run`))&&e.setAttribute(`data-${t}-animating`,"")},s=r=>{r.target===e&&e.removeAttribute(`data-${t}-animating`)};e.addEventListener("animationstart",n),e.addEventListener("animationend",s),e.addEventListener("animationcancel",s)}function Re(e={}){const{prefix:t="anim",once:n=!0}=e;if(Ln())return()=>{};const s=kn(),r=new WeakSet;let u=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,c=!0;const l=()=>{const m=window.pageYOffset||window.scrollY||0;c=m>=u,u=m};typeof window<"u"&&window.addEventListener("scroll",l,{passive:!0});const d=new IntersectionObserver(m=>{for(const p of m){const b=p.target;if(!ze(b)||b.hasAttribute(`data-${t}-animating`))continue;const w=In(b.classList,t);p.isIntersecting?(w&&_e(b,t,"out"),Ye(b,t,"in"),n&&d.unobserve(b)):n||(c||_e(b,t,"in"),w&&Ye(b,t,"out"))}},{threshold:Mn}),o=m=>{const p=jn(m||document,t);for(const b of p)r.has(b)||(r.add(b),d.observe(b),Xe(b,t))};o();let f,y=null,h=null;if(s)(()=>{h==null&&(h=requestAnimationFrame(()=>{h=null;const p=Le(void 0,t);for(const b of p)ke(b,t)}))})(),y=new MutationObserver(p=>{for(const b of p)if(b.type==="attributes"){const w=b.target;w instanceof HTMLElement&&(ke(w,t),ze(w)&&(r.has(w)||(r.add(w),d.observe(w),Xe(w,t))))}else if(b.type==="childList"&&b.addedNodes&&b.addedNodes.length){for(const w of Array.from(b.addedNodes))if(w instanceof HTMLElement){const I=Le(w,t);for(const S of I)ke(S,t);o(w)}}}),y.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class",`data-${t}-scroll`,`data-${t}-start`,`data-${t}-end`,`data-${t}-paused`,`data-${t}-run`]}),f=()=>{h!=null&&cancelAnimationFrame(h),y&&y.disconnect()};else{let m;Le(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(b=>{m=b.initScrollViewFallback({once:n})}),f=()=>{typeof m=="function"&&m()}}return()=>{f&&f(),typeof window<"u"&&window.removeEventListener("scroll",l),d.disconnect()}}const Cn=Re,Rn=Re,De=({anchorRef:e,position:t="bottom",children:n,style:s,...r})=>{const c=`--anchor-${i.useId().replace(/:/g,"")}`,[l,d]=i.useState(!1);if(i.useLayoutEffect(()=>{typeof CSS<"u"&&CSS.supports("anchor-name","--a")&&d(!0)},[]),i.useLayoutEffect(()=>{if(l&&e.current){const f=e.current;return f.style.anchorName=c,()=>{e.current&&(e.current.style.anchorName="")}}},[l,e,c]),l){const y={position:"fixed",margin:0,zIndex:9999,positionAnchor:c,positionArea:{top:"top",bottom:"bottom",left:"left",right:"right","top-left":"top left","top-right":"top right","bottom-left":"bottom left","bottom-right":"bottom right"}[t],positionTryFallbacks:"flip-block, flip-inline",...s};return Me.createPortal(a.jsx("div",{style:y,...r,children:n}),document.body)}const o={position:"absolute",pointerEvents:"auto",...s};switch(t){case"top":o.bottom="100%",o.left="50%",o.transform="translateX(-50%)";break;case"top-left":o.bottom="100%",o.left=0;break;case"top-right":o.bottom="100%",o.right=0;break;case"bottom":o.top="100%",o.left="50%",o.transform="translateX(-50%)";break;case"bottom-left":o.top="100%",o.left=0;break;case"bottom-right":o.top="100%",o.right=0;break;case"left":o.right="100%",o.top="50%",o.transform="translateY(-50%)";break;case"right":o.left="100%",o.top="50%",o.transform="translateY(-50%)";break}return a.jsx(ot,{targetRef:e,children:a.jsx("div",{style:o,...r,children:n})})},it=({variant:e,disableTextMargins:t,disabled:n,iconPosition:s,icon:r,isActive:u,loading:c,shape:l,onToggle:d,size:o,allowShapeTransformation:f})=>({button:x(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",o==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",o==="small"&&"text-label-large px-4 py-2.5 gap-2",o==="medium"&&"text-title-medium px-6 py-4 gap-2",o==="large"&&"text-headline-small px-12 py-8 gap-3",o==="xLarge"&&"text-headline-large px-16 py-12 gap-4",l==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(l==="squared"||f&&u)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},f&&!n&&{"active:rounded-[12px]":o==="xSmall"||o=="small","active:rounded-[16px]":o==="medium","active:rounded-[28px]":o==="large"||o=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!u,"bg-primary text-on-primary":!n&&u,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!u&&d,"bg-primary text-on-primary":!n&&(u&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!u,"bg-secondary text-on-secondary":!n&&u,"text-on-surface/[0.38]":n},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":n,"text-primary border-outline focus:border-primary":!n&&!u,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&u}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[o==="xSmall"&&"-mx-3 ",o==="small"&&"-mx-4 ",o==="medium"&&"-mx-6 ",o==="large"&&"-mx-12",o==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("overflow-hidden",l==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(l==="squared"||f&&u)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},f&&!n&&{"group-active/button:rounded-[12px]":o==="xSmall"||o=="small","group-active/button:rounded-[16px]":o==="medium","group-active/button:rounded-[28px]":o==="large"||o=="xLarge"}),label:x({invisible:c}),icon:x({invisible:c},o==="xSmall"&&"size-5",o==="small"&&"size-5",o==="medium"&&"size-6",o==="large"&&"size-8",o==="xLarge"&&"size-10")}),Dn=ne("button",it),lt=ee("button",it),at=({variant:e,isInteractive:t})=>({card:x(" rounded-xl overflow-hidden ",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest",{"group/card":t})}),An=ne("card",at),ct=ee("card",at),Ae=({width:e})=>({carouselItem:x("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),Fn=ne("carouselItem",Ae),ut=ee("carouselItem",Ae),dt=()=>({carousel:x(["w-full h-[400px]"]),track:x("flex h-full w-full")}),$n=ne("carousel",dt),ft=ee("carousel",dt),ht=({isChecked:e,isIndeterminate:t,isDisabled:n,isError:s,isFocused:r,isHovered:u})=>({checkbox:x("inline-flex items-center justify-center relative size-4.5 ",{"pointer-events-none opacity-[0.38]":n}),input:x("absolute inset-0 w-full h-full opacity-0 z-10 cursor-pointer"),container:x("relative flex items-center justify-center w-[18px] h-[18px] "),box:x("absolute left-1/2 top-1/2 -translate-1/2 to rounded-[2px] size-4 border-2 transition-colors duration-200",!e&&!t&&{"border-on-surface-variant":!s&&!n,"border-error":s&&!n,"border-on-surface":n},(e||t)&&{"bg-primary border-primary":!s&&!n,"bg-error border-error":s&&!n,"bg-on-surface border-on-surface":n}),icon:x("z-10 relative text-on-primary w-full h-full flex items-center justify-center pointer-events-none",{"text-on-error":s&&!n,"text-surface":n}),stateLayer:"size-10 state-ripple-group-[checkbox] rounded-full cursor-pointer pointer-events-auto absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),Pn=ne("checkbox",ht),mt=ee("checkbox",ht),pt=({variant:e,disabled:t,trailingIcon:n,icon:s,isActive:r,isInteractive:u,activated:c,isFocused:l,isDragging:d,isEditing:o})=>({chip:x(" group/chip px-3 py-1.5 rounded-lg flex items-center gap-2 outline-none",{"pl-2":s,"pr-2":n,"cursor-pointer":!t&&u},{" text-on-surface-variant":!c&&!l||o,"bg-secondary-container text-on-secondary-container":(c||l)&&!o},d&&["opacity-100 cursor-grabbing shadow-3"],e==="outlined"&&["border border-outline-variant",{"border-transparent":o}],e==="elevated"&&!o&&["shadow-1 bg-surface-container-low","border border-outline-variant"]),stateLayer:x("rounded-lg overflow-hidden",{}),label:x("outline-none text-nowrap",{"opacity-[0.38]":t}),leadingIcon:x("text-primary size-[18px]",{"opacity-[0.38]":t}),trailingIcon:x("cursor-pointer size-[18px]",{"opacity-[0.38]":t})}),Wn=ne("chip",pt),yt=ee("chip",pt),xt=({scrollable:e})=>({chips:x(" flex gap-3 outline-none",{"flex-wrap":!e,"overflow-x-auto":e})}),Tn=ne("chips",xt),vt=ee("chips",xt),gt=({orientation:e})=>({divider:x("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),Bn=ne("divider",gt),wt=ee("divider",gt),bt=({size:e,variant:t,extended:n})=>({fab:x("flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small","rounded-[16px]":e=="medium","rounded-[28px]":e=="large"},{"p-2":e=="small","p-4":e=="medium","p-[30px]":e=="large"},t==="primary"&&"bg-primary text-on-primary",t==="secondary"&&"bg-secondary text-on-secondary",t==="tertiary"&&"bg-tertiary text-on-tertiary",t==="primaryContainer"&&"bg-primary-container text-on-primary-container",t==="secondaryContainer"&&"bg-secondary-container text-on-secondary-container",t==="tertiaryContainer"&&"bg-tertiary-container text-on-tertiary-container"),icon:x({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:x("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),Hn=ne("fab",bt),St=ee("fab",bt),Nt=({size:e,variant:t,open:n})=>({fabMenu:x("relative inline-flex flex-col items-end"),actions:x("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0"),label:x("text-nowrap")}),On=ne("fabMenu",Nt),Et=ee("fabMenu",Nt),kt=({variant:e,disabled:t,onToggle:n,isActive:s,size:r,width:u,shape:c,allowShapeTransformation:l})=>({iconButton:x("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},c==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(c==="squared"||l&&s)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"active:rounded-[12px]":r==="xSmall"||r=="small","active:rounded-[16px]":r==="medium","active:rounded-[28px]":r==="large"||r=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!s&&!!n,"bg-primary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-secondary-container text-on-secondary-container":!s&&!!n,"bg-secondary text-on-secondary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!s,"border border-transparent bg-inverse-surface":s},!!t&&{"border border-on-surface/[0.12]":!s,"border border-transparent bg-on-surface/[0.12]":s}]),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("absolute top-0 left-0 h-full w-full overflow-hidden",(c==="rounded"||c==="squared"&&n&&!t&&s&&l)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(c==="squared"||c==="rounded"&&n&&!t&&s&&l)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"group-active/icon-button:rounded-[12px]":r==="xSmall"||r=="small","group-active/icon-button:rounded-[16px]":r==="medium","group-active/icon-button:rounded-[28px]":r==="large"||r=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!s,"state-primary":s},e==="filled"&&{"state-primary":!s&&!!n,"state-inverse-on-surface":s||!n},e==="tonal"&&{"state-on-surface-variant":!s&&!!n,"state-on-secondary-container":s||!n},e==="outlined"&&{"state-on-surface-variant":!s,"state-on-primary":s}]),icon:x(" transition-all duration-300",{"size-5 p-1.5":r==="xSmall"},{"size-6 p-2":r==="small"},{"size-6 p-4":r==="medium"},{"size-8 p-8":r==="large"},{"size-10 p-12":r==="xLarge"},u=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],u=="wide"&&[{"px-2.5":r==="xSmall"},{"px-3.5":r==="small"},{"px-6":r==="medium"},{"px-12":r==="large"},{"px-[72px]":r==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!s,"text-primary":s},e==="filled"&&{"text-primary":!s&&!!n,"text-on-primary":s||!n},e==="outlined"&&{"text-on-surface-variant":!s,"text-inverse-on-surface":s}],!!t&&"text-on-surface/[0.38]")}),Vn=ne("iconButton",kt),Lt=ee("iconButton",kt),jt=({variant:e,isVisible:t})=>({progressIndicator:x((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:x("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:x({"max-h-0":!t,"max-h-full":t},(e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:x("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),zn=ne("progressIndicator",jt),It=ee("progressIndicator",jt),Fe=({variant:e,position:t})=>({sideSheet:x("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-full":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:x("w-full overflow-hidden flex flex-col",{}),header:x("p-4 flex items-center gap-2"),content:x("flex-1 overflow-y-auto"),title:x("text-on-surface-variant text-title-large"),closeButton:x("ml-auto"),divider:x({hidden:e=="modal"}),overlay:x("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),Mt=ne("sideSheet",Fe),Yn=ee("sideSheet",Fe),$e=({isChanging:e})=>({slider:x(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:x(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:x(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:x(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:x(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:x(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),_n=ne("slider",$e),Ct=ee("slider",$e),Rt=()=>({snackbar:x(" rounded bg-inverse-surface "),container:x("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:x("text-body-medium text-inverse-on-surface "),icon:x(" ml-auto mr-0 text-inverse-on-surface block dark")}),qn=ne("snackbar",Rt),Dt=ee("snackbar",Rt),At=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:x("group/switch w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:x("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:x("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!n},{"w-[24px] h-[24px]":!(!e&&!n)},!t&&["cursor-pointer group-active/switch:h-[28px] group-active/switch:w-[28px]",{"bg-on-primary group-hover/switch:bg-primary-container":e},{"bg-outline group-hover/switch:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:x("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:x("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),Xn=ne("switch",At),Ft=ee("switch",At),$t=({isSelected:e,icon:t,label:n,variant:s})=>({tab:x("flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&s==="primary"&&"h-16",!(t&&n&&s==="primary")&&"h-12"),stateLayer:x("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",s==="primary"&&{"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface":!e,"group-hover/tab:hover-state-primary group-focus-visible/tab:focus-state-primary":e},s==="secondary"&&"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"),content:x("flex gap-0.5 h-full justify-center",{relative:s=="primary"},{"":!!(n&&!t)},s==="primary"&&"flex-col items-center",s==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:x("h-6 w-6 p-0.5 !box-border",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:x("text-title-small text-nowrap",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:x("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")}),Un=ne("tab",$t),Pt=ee("tab",$t),Wt=({scrollable:e})=>({tabs:x("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Kn=ne("tabs",Wt),Tt=ee("tabs",Wt),Bt=()=>({tabPanels:x("overflow-hidden")}),Gn=ne("tabPanels",Bt),Ht=ee("tabPanels",Bt),Ot=()=>({tabPanel:x("")}),Jn=ne("tabPanel",Ot),Vt=ee("tabPanel",Ot),zt=({disabled:e,leadingIcon:t,trailingIcon:n,variant:s,errorText:r,isFocused:u,value:c,suffix:l,multiline:d})=>({textField:x({"opacity-[.38]":e}),content:x("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":!d},{"border-on-surface-variant":!(r!=null&&r.length)&&!u&&s=="filled","border-outline":!(r!=null&&r.length)&&!u&&s=="outlined","border-primary":!(r!=null&&r.length)&&u,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},s=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],s=="outlined"&&["border rounded box-border",{"border-[3px]":u}]),stateLayer:x("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":u}),label:x("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"text-error":!!(r!=null&&r.length)},{"text-primary":!(r!=null&&r.length)&&u}),input:x("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!l},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:x("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",s=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":u}]),supportingText:x(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":u},{"text-error":!!(r!=null&&r.length)}),leadingIcon:x(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!i.isValidElement(t)}]),trailingIcon:x("h-12 w-12 flex items-center justify-center",{"cursor-text":!i.isValidElement(n)}),suffix:x("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")}),Zn=ne("textField",zt),Yt=ee("textField",zt),_t=({position:e,variant:t})=>({toolTip:x(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",t=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface ",{"bottom-full left-1/2 -translate-x-1/2":e=="top","top-full left-1/2 -translate-x-1/2":e=="bottom","right-full top-1/2 -translate-y-1/2":e=="left","left-full top-1/2 -translate-y-1/2":e=="right","bottom-full right-full":e=="top-left","bottom-full left-full":e=="top-right","top-full right-full":e=="bottom-left","top-full left-full":e=="bottom-right"}),container:x("pb-2",t=="rich"&&"px-4 pt-3 ",t=="plain"&&"px-2 py-1"),actions:x("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:x("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:x(""),content:x("w-full")}),Qn=ne("toolTip",_t),qt=ee("toolTip",_t),ae=({icon:e,colors:t=[],className:n,...s})=>{if(typeof e=="string"){let f=e;return t[0]&&(f=f.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),f=f.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),a.jsx("div",{className:x("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:f}})}if(e&&typeof e=="object"&&"src"in e){const f=e;return a.jsx("img",{src:f.src,width:f.width,height:f.height,className:x("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const r=e;if(!(r!=null&&r.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:u}=r,[c,l,,,d]=u||[],o=f=>{switch(f.length){case 2:return{"--fa-primary-color":f[0]||"inherit","--fa-secondary-color":f[1]||"inherit"};case 1:return{color:f[0]};default:return{}}};return a.jsx("svg",{className:x("size-5 box-content",n),style:{...o(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${c} ${l}`,role:"img","aria-hidden":"true",...s,children:typeof d=="string"?a.jsx("path",{className:"fill-current",d}):d.map((f,y)=>a.jsx("path",{d:f},y))})},Xt=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:s,...r})=>{const[u,c]=i.useState(t),[l]=i.useState(1.5);i.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),c(t)},[t]);const[d,o]=i.useState(!0),f=()=>d?l:l*.5;i.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&u!==100){const p=setInterval(()=>{c(d?10:90),o(!d)},f()*1e3);return()=>clearInterval(p)}},[e,d,u]);const[y,h]=i.useState(!1);i.useEffect(()=>{if(u>=100){const p=setTimeout(()=>{h(!1)},n);return()=>{clearTimeout(p)}}else h(!0)},[u,n]);const m=It({className:s,variant:e,value:t,transitionDuration:n,isVisible:y});return a.jsxs(a.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&a.jsxs("div",{className:m.progressIndicator,...r,children:[a.jsx("div",{style:{width:`${u}%`,transition:`width ${n}ms ease-in-out ${u==100?", max-height 200ms 0.5s ease-in-out":""}`},className:m.track}),a.jsx("div",{style:{marginLeft:u!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${u==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:m.activeIndicator}),a.jsx("div",{style:{width:"4 px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:m.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&a.jsx(X.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:f(),ease:"linear"},className:m.progressIndicator,...r,children:a.jsx(X.motion.circle,{cx:"50%",cy:"50%",r:y?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:m.activeIndicator,variants:{hidden:{pathLength:d?10/100:90/100},visible:{pathLength:d?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:f(),bounce:0}}})},d+"")]})};function es(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const me=({variant:e="filled",disabled:t=!1,icon:n,href:s,label:r,disableTextMargins:u,className:c,iconPosition:l="left",loading:d=!1,shape:o="rounded",onClick:f,onToggle:y,activated:h,ref:m,size:p="medium",allowShapeTransformation:b=!0,transition:w,children:I,...S})=>{if(I&&(r=I),!r)throw new Error("Button component requires either a label prop or children content");e=es(e);const g=s?"a":"button",B=i.useRef(null),$=m||B,[v,k]=i.useState(h);i.useEffect(()=>{k(h)},[h]),w={duration:.3,...w};const F=M=>{t&&M.preventDefault(),y?(k(!v),y(!v)):f&&f(M)},j=lt({allowShapeTransformation:b,size:p,disableTextMargins:u,shape:o,href:s,disabled:t,icon:n,iconPosition:l,loading:d,variant:e,transition:w,className:c,isActive:v??!1,onToggle:y,activated:v,label:r,children:r}),P=n?a.jsx(ae,{icon:n,className:j.icon}):a.jsx(a.Fragment,{});return a.jsxs(g,{ref:$,href:s,className:j.button,...S,onClick:F,disabled:t,"aria-pressed":y?v:void 0,style:{transition:w.duration+"s"},children:[a.jsx("div",{className:j.touchTarget}),a.jsx(de,{style:{transition:w.duration+"s"},className:j.stateLayer,colorName:x(e==="filled"&&{"on-surface-variant":!v&&!!y,"on-primary":v||!y},e==="elevated"&&{"on-primary":v&&!!y,primary:!v||!y},e==="tonal"&&{"on-secondary":v&&!!y,"on-secondary-container":!v||!y},e==="outlined"&&{"inverse-on-surface":v&&!!y,"on-surface-variant":!v||!y},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),l==="left"&&P,d&&a.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:a.jsx(Xt,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:x({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),a.jsx("span",{className:j.label,children:r}),l==="right"&&P]})},ts=({variant:e="outlined",className:t,children:n,interactive:s=!1,ref:r,...u})=>{const c=ct({className:t,isInteractive:s,variant:e,children:n}),l=i.useRef(null),d=r||l;return a.jsxs("div",{...u,ref:d,className:c.card,children:[s&&a.jsx(de,{className:c.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},xe=(e,t,n=[0,1])=>{const[s,r]=t,[u,c]=n,d=(Math.max(s,Math.min(e,r))-s)/(r-s);return u+d*(c-u)},Ut=({className:e,children:t,width:n,index:s=0,outputRange:r,ref:u,...c})=>{const l=i.useRef(null),d=u||l,o=ut({className:e,index:s,width:n,children:t,outputRange:r});return a.jsx("div",{ref:d,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:o.carouselItem,...c,children:t})},ns=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:u=[.21,.65],outputRange:c=[42,300],gap:l=8,onChange:d,onMetricsChange:o,index:f,scrollSensitivity:y=1.25,...h})=>{const m=i.useRef(null),p=s||m,[b,w]=i.useState(0),I=ft({index:f,className:t,children:n,variant:e,inputRange:u,outputRange:c,marginPourcent:r,onChange:d,gap:l,scrollSensitivity:y,onMetricsChange:o}),S=i.Children.toArray(n).filter(N=>i.isValidElement(N)&&N.type===Ut),g=i.useRef(null),[B,$]=i.useState({}),[v,k]=i.useState(null),F=i.useRef(0),j=i.useRef(null),P=()=>{var ue,ce;if(!g.current||!p.current||(v==null?void 0:v.scrollProgress)===void 0)return[];const N=(v==null?void 0:v.scrollVisible)??((ue=p.current)==null?void 0:ue.clientWidth)??0;function A(K,J){return K.map((re,pe)=>{const ye=(re-J)/Math.abs(K[1]-K[0]);return{itemScrollXCenter:re,relativeIndex:ye,index:pe,width:0}})}const O=S.map((K,J)=>{if(!M[J].current||!g.current)return 0;const pe=J/(S.length-1);return xe(pe,[0,1],[0,1])}),_=A(O,(v==null?void 0:v.scrollProgress)??0).sort((K,J)=>K.index-J.index);let z=(((ce=p.current)==null?void 0:ce.clientWidth)??N)+l+c[0]+l;const Z=_.sort((K,J)=>Math.abs(K.relativeIndex)-Math.abs(J.relativeIndex)).map((K,J)=>{if(!(z<=0)){if(J==0&&V(K.index),K.width=xe(z-l,[c[0],c[1]],[c[0],c[1]]),z-=K.width+l,z!=0&&z<(c[0]+l)*2){const re=K.width-((c[0]+l)*2-z);z+=K.width,K.width=re,z-=K.width}else if(z==0&&K.width>=c[0]*2+l){const re=K.width-(c[0]+l-z);z+=K.width,K.width=re,z-=K.width}return K}}).filter(Boolean),D=Z.reverse(),Y=[...Z].sort((K,J)=>Math.abs(K.index)-Math.abs(J.index));D.forEach((K,J)=>{const re=D[J+1];if(!re)return;const pe=1-(Math.abs(K.relativeIndex)-Math.abs(re==null?void 0:re.relativeIndex)),ye=xe(pe,[0,2],[K.width+z,re.width]);z+=K.width,K.width=ye,z-=K.width});const se=Z.length/2,ie=xe(Math.abs(Y[0].relativeIndex),[Y[0].index==0?0:se-1,se],[0,1]),ge=xe(ie,[0,1],[0,1])*-(c[0]+l);return w(ge),Object.fromEntries(Z.map(K=>[K.index,K.width]))},M=i.useRef([]).current,[q,V]=i.useState(0);i.useEffect(()=>{d&&d(q)},[q]),i.useEffect(()=>{typeof f=="number"&&S.length>0&&f!==q&&C(f)},[f,S.length]),i.useEffect(()=>{W(q)},[q]),M.length!==S.length&&S.forEach((N,A)=>{M[A]||(M[A]=i.createRef())});const[Q,W]=i.useState(0),C=(N,A={})=>{if(!S.length)return 0;const O=M[N];if(!O||!O.current||!g.current)return 0;const _=xe(N/Math.max(1,S.length-1),[0,1],[0,1]);return W(N),g.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:_,orientation:"horizontal",animate:A.animate!==!1}})),_},R=S.map((N,A)=>{var Z;const O=(Z=N.props)==null?void 0:Z.onClick,_=D=>{O==null||O(D)},z=()=>W(A);return i.cloneElement(N,{width:B[A],outputRange:c,ref:M[A],key:A,index:A,role:"option","aria-selected":q===A,tabIndex:q===A?0:-1,onClick:_,onFocus:z})}),H=N=>{var A;if(N.scrollTotal>0){(A=j.current)==null||A.stop();const O=F.current??0,_=N.scrollProgress??0;j.current=X.animate(O,_,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:z=>{F.current=z,k({...N,scrollProgress:z})}})}};i.useEffect(()=>{const N=P();$(N)},[v]);const U=i.useRef(o);i.useEffect(()=>{U.current=o},[o]);const G=i.useRef(null);i.useEffect(()=>{var J;const N=U.current;if(!N||!(p!=null&&p.current))return;const A=S.length;if(A<=0)return;const O=((J=p.current)==null?void 0:J.clientWidth)??0,_=c[1],z=F.current??(v==null?void 0:v.scrollProgress)??0,Z=(O+l)/(_+l),D=Math.max(1,Math.floor(Z)),Y=Math.max(1,Math.round(D*(2/3))),se=Math.min(Math.max(0,q),Math.max(0,A-1)),ie=se>0,ge=se<A-1,ue={total:A,selectedIndex:se,visibleApprox:Z,visibleFull:D,stepHalf:Y,canPrev:ie,canNext:ge,scrollProgress:z,viewportWidth:O,itemMaxWidth:_,gap:l},ce=G.current;let K=!ce;if(!K){for(const re in ue)if(ue[re]!==ce[re]){K=!0;break}}K&&(G.current=ue,N(ue))},[p,S.length,q,v,l,c]),i.useEffect(()=>()=>{var N;(N=j.current)==null||N.stop()},[]);const[te,E]=i.useState(0);i.useLayoutEffect(()=>{let N=c[1];v&&N>v.scrollVisible&&(N=v.scrollVisible);const A=(N+l)*R.length/y;E(A)},[p,M,v]);const L=N=>{if(!S.length)return;const A=Q??q;switch(N.key){case"ArrowLeft":N.preventDefault(),C(Math.max(0,A-1));break;case"ArrowRight":N.preventDefault(),C(Math.min(S.length-1,A+1));break;case"Home":N.preventDefault(),C(0);break;case"End":N.preventDefault(),C(S.length-1);break;case"Enter":case" ":N.preventDefault(),C(A);break}};return i.useEffect(()=>{const N=p.current;if(!N)return;const A=O=>{const _=O.detail;_&&typeof _.index=="number"&&C(_.index)};return N.addEventListener("udx:carousel:centerIndex",A),()=>{N.removeEventListener("udx:carousel:centerIndex",A)}},[p,S.length]),a.jsx("div",{className:I.carousel,ref:p,role:"listbox","aria-orientation":"horizontal",onKeyDown:L,...h,children:a.jsx(tt,{draggable:!0,orientation:"horizontal",onScroll:H,scrollSize:te,children:a.jsx("div",{className:I.track,ref:g,style:{gap:`${l}px`,translate:b,willChange:"translate"},children:R})})})};/*!
2
2
  * Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com
3
3
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4
4
  * Copyright 2025 Fonticons, Inc.
5
- */var ns={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32z"]},ss={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 32 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l32 0 0-32c0-17.7 14.3-32 32-32zM64 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z"]},rs={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},os={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},Ut={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]},be={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},is=be,ls={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},as={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},cs={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const us=({checked:e,defaultChecked:t,indeterminate:n=!1,disabled:r=!1,error:s=!1,onChange:u,id:c,name:l,value:d,style:o,className:f,...y})=>{const h=i.useId(),p=c||h,m=e!==void 0,[S,w]=i.useState(t??!1),I=m?e:S,[b,v]=i.useState(!1),B=i.useRef(null);i.useEffect(()=>{B.current&&(B.current.indeterminate=n)},[n]);const $=L=>{r||(m||w(L.target.checked),u&&u(L))},g=ht({isChecked:!!I,isIndeterminate:n,isDisabled:r,isError:s,isFocused:b,isHovered:!1});return a.jsx("div",{className:x(g.checkbox,f,"group/checkbox"),style:o,children:a.jsxs(de,{stateClassName:g.stateLayer,colorName:I||n?"primary":"on-surface",children:[a.jsx("input",{ref:B,type:"checkbox",id:p,name:l,value:d,checked:I,disabled:r,onChange:$,onFocus:()=>v(!0),onBlur:()=>v(!1),className:g.input,...y}),a.jsx("div",{className:g.box}),a.jsx(U.AnimatePresence,{children:(I||n)&&a.jsx(U.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.15},className:g.icon,children:a.jsx(ae,{icon:n?ns:Ut,className:"size-3.5"})})})]})})},Ie=({variant:e="outlined",disabled:t=!1,icon:n,href:r,label:s,className:u,onClick:c,onToggle:l,activated:d,ref:o,onRemove:f,editable:y,onEditStart:h,onEditCommit:p,onEditCancel:m,onChange:S,transition:w,children:I,editing:b,...v})=>{if(I&&(s=I),s===void 0&&!y)throw new Error("Chip component requires either a label prop or children content");const B=r?"a":"button",$=i.useRef(null),g=o||$,[L,A]=i.useState(d),[j,P]=i.useState(!1),[M,X]=i.useState(b&&y),[O,J]=i.useState(!1),[W,C]=i.useState(typeof s=="string"?s:""),R=i.useRef(null);i.useEffect(()=>{A(d)},[d]),i.useEffect(()=>{if(b&&X(b),y&&j){const D=setTimeout(()=>{v!=null&&v.draggable&&O||X(!0)},1e3);return()=>clearTimeout(D)}else j||X(!1)},[j,y,O,v,W]),i.useEffect(()=>{if(M){C(typeof s=="string"?s:"");const D=q.current||R.current;if(D){D.focus();const _=document.createRange();_.selectNodeContents(D),_.collapse(!1);const ne=window.getSelection();ne==null||ne.removeAllRanges(),ne==null||ne.addRange(_)}}},[M]),w={duration:.3,...w};const H=D=>{t&&D.preventDefault(),l?(A(!L),l(!L)):c&&c(D)},G=!!l||!!f||!!c||!!r||!!y;d&&(n=Ut);const{onFocus:K,onBlur:te,onKeyDown:k,onDragStart:E,onDragEnd:N,onDoubleClick:F,...V}=v??{},z=pt({href:r,disabled:t,icon:n,variant:e,transition:w,className:u,isActive:L??!1,onToggle:l,activated:L,label:s,isInteractive:G,children:s,isFocused:j,isDragging:O,onEditCommit:p,isEditing:M}),q=i.useRef(null),Z=()=>{const D=(W??"").trim();if(!D){f&&f();return}p==null||p(D)};return a.jsxs(B,{contentEditable:!1,ref:g,href:r,className:z.chip,...V,onClick:D=>{M||H(D)},draggable:!t&&!!(v!=null&&v.draggable),onDragStart:D=>{!t&&(v!=null&&v.draggable)&&J(!0),E==null||E(D)},onDragEnd:D=>{v!=null&&v.draggable&&J(!1),N==null||N(D)},onDoubleClick:D=>{!t&&y&&!M&&(h==null||h(),D.preventDefault(),D.stopPropagation()),F==null||F(D)},onFocus:D=>{G&&P(!0),K==null||K(D)},onBlur:D=>{P(!1),te==null||te(D)},onKeyDown:D=>{const _=D.key;if(!t&&M){_==="Enter"?(D.preventDefault(),Z()):_==="Escape"?(D.preventDefault(),m==null||m()):f&&(W==null?void 0:W.trim())===""&&(_==="Backspace"||_==="Delete"||_==="Del")&&(D.preventDefault(),D.stopPropagation(),f());return}if(!t&&j){if(y&&!l&&(_==="F2"||_==="Enter")){D.preventDefault(),h==null||h();return}if(l&&(_==="Enter"||_===" "||_==="Spacebar")){D.preventDefault();const ne=!L;A(ne),l(ne)}f&&(_==="Backspace"||_==="Delete"||_==="Del")&&(D.preventDefault(),D.stopPropagation(),f())}k==null||k(D)},disabled:t,"aria-pressed":l?L:void 0,style:{transition:w.duration+"s"},children:[G&&!t&&!M&&a.jsx(de,{style:{transition:w.duration+"s"},className:z.stateLayer,colorName:x({"on-surface-variant":!L,"on-secondary-container":L}),stateClassName:"state-ripple-group-[chip]"}),n&&a.jsx(ae,{icon:n,className:z.leadingIcon}),a.jsx("span",{ref:q,contentEditable:!!y&&!!M,suppressContentEditableWarning:!0,className:z.label,role:y?"textbox":void 0,spellCheck:!1,onInput:D=>{const _=D.currentTarget.innerText;C(_),S==null||S(_)},onBlur:D=>{y&&M&&Z()},onKeyDown:D=>{if(y&&M&&D.key==="Enter"){D.preventDefault(),D.stopPropagation(),Z();return}y&&M&&D.key==="Escape"&&(D.preventDefault(),D.stopPropagation(),m==null||m())},children:s}),f&&!M&&a.jsx(ae,{icon:be,className:z.trailingIcon,onMouseDown:D=>{D.preventDefault(),D.stopPropagation()},onClick:D=>{D.stopPropagation(),t||f()}})]})},Pe=({orientation:e="horizontal",className:t,...n})=>{const r=vt({orientation:e,className:t});return a.jsx("hr",{className:r.divider,...n})},oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));function ds(e,t=0){return(oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase()}let je;const fs=new Uint8Array(16);function hs(){if(!je){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");je=crypto.getRandomValues.bind(crypto)}return je(fs)}const ms=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Xe={randomUUID:ms};function Kt(e,t,n){var s;if(Xe.randomUUID&&!e)return Xe.randomUUID();e=e||{};const r=e.random??((s=e.rng)==null?void 0:s.call(e))??hs();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,ds(r)}const ps=({variant:e="input",className:t,scrollable:n=!0,draggable:r=!1,items:s,onItemsChange:u})=>{const c=s??[],l=i.useRef(null),[d,o]=i.useState(!1),f=i.useRef(new WeakMap),y=i.useCallback(g=>{const L=f.current;let A=L.get(g);return A||(A=Kt(),L.set(g,A)),A},[]);i.useEffect(()=>{var g,L;d&&(e=="input"?(g=B.current)==null||g.focus():(L=l.current)==null||L.focus())},[d]);const h=i.useRef([]),p=i.useRef(!1),m=i.useCallback(g=>{u==null||u(g(c))},[u,c]),S=i.useCallback(g=>{m(L=>L.filter((A,j)=>j!==g))},[m]),w=xt({scrollable:n,className:t,variant:e}),I=i.useCallback((g="")=>{if(e!=="input"||p.current)return;p.current=!0;const L={label:g},A=y(L),j=[...c,L];u==null||u(j),requestAnimationFrame(()=>{v(A),p.current=!1})},[e,u,c,y]),[b,v]=i.useState(null);i.useEffect(()=>{var g;if(b){const L=c.findIndex(A=>y(A)===b);if(L!==-1){const A=h.current[L];(g=A==null?void 0:A.focus)==null||g.call(A);const j=l.current,P=A.offsetLeft+A.offsetWidth/2-j.offsetWidth/2;j.scrollTo({left:P,behavior:"smooth"})}}},[b,c,y]);const B=i.useRef(null),$=(d||c.length===0)&&e==="input";return a.jsxs("div",{ref:l,role:"list","aria-label":"Chips",className:w.chips,tabIndex:e==="input"?0:void 0,onFocus:g=>{g.target===g.currentTarget&&o(!0)},onBlur:()=>{o(!1)},onKeyDown:g=>{var X;if(e!=="input")return;const L=g.key,j=g.target===g.currentTarget;if(!d)return;const P=document.activeElement,M=h.current.findIndex(O=>O===P);if(L==="ArrowLeft"){g.preventDefault();const O=M>0?M-1:c.length-1,J=y(c[O]);v(J);return}if(L==="ArrowRight"){g.preventDefault();const O=M>=0?(M+1)%Math.max(1,c.length):0,J=y(c[O]);v(J);return}if(L==="Home"){g.preventDefault();const O=y(c[0]);v(O);return}if(L==="End"){g.preventDefault();const O=y(c[c.length-1]);v(O);return}if(j&&L==="Backspace"){if(g.preventDefault(),c.length>0){const O=h.current[c.length-1];(X=O==null?void 0:O.focus)==null||X.call(O)}return}},children:[c.map((g,L)=>{const A=y(g),j=e==="input",P=j?{editable:!0,editing:b===A,onEditCommit:M=>{o(!0),m(X=>X.map((O,J)=>J===L?{...O,label:M}:O))},onEditCancel:()=>{o(!0)},onChange:()=>{if(h.current.length==L+1){const M=l.current;requestAnimationFrame(()=>{M.scrollTo({left:M.scrollWidth,behavior:"smooth"})})}}}:{};return a.jsx(Ie,{ref:M=>h.current[L]=M,label:g.label??"",icon:g.icon,activated:g.activated,disabled:g.disabled,variant:g.variant,href:g.href,draggable:r,...P,onToggle:g.activated===void 0?void 0:M=>m(X=>X.map((O,J)=>J===L?{...O,activated:M}:O)),onBlur:()=>{b===A&&v(null)},onRemove:j?()=>{o(!0),S(L)}:void 0},A)}),d&&a.jsxs(a.Fragment,{children:[a.jsx(Pe,{orientation:"vertical",className:"animate-[var(--animate-blink)] border-outline",style:{"--animate-blink":"blink 1s cubic-bezier(0.4, 0, 0.6, 1) infinite"}}),a.jsx("style",{children:`
5
+ */var ss={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32z"]},rs={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 32 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l32 0 0-32c0-17.7 14.3-32 32-32zM64 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z"]},os={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},is={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},Kt={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]},we={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},ls=we,as={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},cs={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},us={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const ds=({checked:e,defaultChecked:t,indeterminate:n=!1,disabled:s=!1,error:r=!1,onChange:u,id:c,name:l,value:d,style:o,className:f,...y})=>{const h=i.useId(),m=c||h,p=e!==void 0,[b,w]=i.useState(t??!1),I=p?e:b,[S,g]=i.useState(!1),B=i.useRef(null);i.useEffect(()=>{B.current&&(B.current.indeterminate=n)},[n]);const $=k=>{s||(p||w(k.target.checked),u&&u(k))},v=mt({isChecked:!!I,isIndeterminate:n,isDisabled:s,isError:r,isFocused:S,isHovered:!1});return a.jsx("div",{className:x(v.checkbox,f,"group/checkbox"),style:o,children:a.jsxs(de,{stateClassName:v.stateLayer,colorName:I||n?"primary":"on-surface",children:[a.jsx("input",{ref:B,type:"checkbox",id:m,name:l,value:d,checked:I,disabled:s,onChange:$,onFocus:()=>g(!0),onBlur:()=>g(!1),className:v.input,...y}),a.jsx("div",{className:v.box}),a.jsx(X.AnimatePresence,{children:(I||n)&&a.jsx(X.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.15},className:v.icon,children:a.jsx(ae,{icon:n?ss:Kt,className:"size-3.5"})})})]})})},Ie=({variant:e="outlined",disabled:t=!1,icon:n,href:s,label:r,className:u,onClick:c,onToggle:l,activated:d,ref:o,onRemove:f,editable:y,onEditStart:h,onEditCommit:m,onEditCancel:p,onChange:b,transition:w,children:I,editing:S,...g})=>{if(I&&(r=I),r===void 0&&!y)throw new Error("Chip component requires either a label prop or children content");const B=s?"a":"button",$=i.useRef(null),v=o||$,[k,F]=i.useState(d),[j,P]=i.useState(!1),[M,q]=i.useState(S&&y),[V,Q]=i.useState(!1),[W,C]=i.useState(typeof r=="string"?r:""),R=i.useRef(null);i.useEffect(()=>{F(d)},[d]),i.useEffect(()=>{if(S&&q(S),y&&j){const D=setTimeout(()=>{g!=null&&g.draggable&&V||q(!0)},1e3);return()=>clearTimeout(D)}else j||q(!1)},[j,y,V,g,W]),i.useEffect(()=>{if(M){C(typeof r=="string"?r:"");const D=z.current||R.current;if(D){D.focus();const Y=document.createRange();Y.selectNodeContents(D),Y.collapse(!1);const se=window.getSelection();se==null||se.removeAllRanges(),se==null||se.addRange(Y)}}},[M]),w={duration:.3,...w};const H=D=>{t&&D.preventDefault(),l?(F(!k),l(!k)):c&&c(D)},U=!!l||!!f||!!c||!!s||!!y;d&&(n=Kt);const{onFocus:G,onBlur:te,onKeyDown:E,onDragStart:L,onDragEnd:N,onDoubleClick:A,...O}=g??{},_=yt({href:s,disabled:t,icon:n,variant:e,transition:w,className:u,isActive:k??!1,onToggle:l,activated:k,label:r,isInteractive:U,children:r,isFocused:j,isDragging:V,onEditCommit:m,isEditing:M}),z=i.useRef(null),Z=()=>{const D=(W??"").trim();if(!D){f&&f();return}m==null||m(D)};return a.jsxs(B,{contentEditable:!1,ref:v,href:s,className:_.chip,...O,onClick:D=>{M||H(D)},draggable:!t&&!!(g!=null&&g.draggable),onDragStart:D=>{!t&&(g!=null&&g.draggable)&&Q(!0),L==null||L(D)},onDragEnd:D=>{g!=null&&g.draggable&&Q(!1),N==null||N(D)},onDoubleClick:D=>{!t&&y&&!M&&(h==null||h(),D.preventDefault(),D.stopPropagation()),A==null||A(D)},onFocus:D=>{U&&P(!0),G==null||G(D)},onBlur:D=>{P(!1),te==null||te(D)},onKeyDown:D=>{const Y=D.key;if(!t&&M){Y==="Enter"?(D.preventDefault(),Z()):Y==="Escape"?(D.preventDefault(),p==null||p()):f&&(W==null?void 0:W.trim())===""&&(Y==="Backspace"||Y==="Delete"||Y==="Del")&&(D.preventDefault(),D.stopPropagation(),f());return}if(!t&&j){if(y&&!l&&(Y==="F2"||Y==="Enter")){D.preventDefault(),h==null||h();return}if(l&&(Y==="Enter"||Y===" "||Y==="Spacebar")){D.preventDefault();const se=!k;F(se),l(se)}f&&(Y==="Backspace"||Y==="Delete"||Y==="Del")&&(D.preventDefault(),D.stopPropagation(),f())}E==null||E(D)},disabled:t,"aria-pressed":l?k:void 0,style:{transition:w.duration+"s"},children:[U&&!t&&!M&&a.jsx(de,{style:{transition:w.duration+"s"},className:_.stateLayer,colorName:x({"on-surface-variant":!k,"on-secondary-container":k}),stateClassName:"state-ripple-group-[chip]"}),n&&a.jsx(ae,{icon:n,className:_.leadingIcon}),a.jsx("span",{ref:z,contentEditable:!!y&&!!M,suppressContentEditableWarning:!0,className:_.label,role:y?"textbox":void 0,spellCheck:!1,onInput:D=>{const Y=D.currentTarget.innerText;C(Y),b==null||b(Y)},onBlur:D=>{y&&M&&Z()},onKeyDown:D=>{if(y&&M&&D.key==="Enter"){D.preventDefault(),D.stopPropagation(),Z();return}y&&M&&D.key==="Escape"&&(D.preventDefault(),D.stopPropagation(),p==null||p())},children:r}),f&&!M&&a.jsx(ae,{icon:we,className:_.trailingIcon,onMouseDown:D=>{D.preventDefault(),D.stopPropagation()},onClick:D=>{D.stopPropagation(),t||f()}})]})},Pe=({orientation:e="horizontal",className:t,...n})=>{const s=wt({orientation:e,className:t});return a.jsx("hr",{className:s.divider,...n})},oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));function fs(e,t=0){return(oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase()}let je;const hs=new Uint8Array(16);function ms(){if(!je){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");je=crypto.getRandomValues.bind(crypto)}return je(hs)}const ps=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ue={randomUUID:ps};function Gt(e,t,n){var r;if(Ue.randomUUID&&!e)return Ue.randomUUID();e=e||{};const s=e.random??((r=e.rng)==null?void 0:r.call(e))??ms();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,fs(s)}const ys=({variant:e="input",className:t,scrollable:n=!0,draggable:s=!1,items:r,onItemsChange:u})=>{const c=r??[],l=i.useRef(null),[d,o]=i.useState(!1),f=i.useRef(new WeakMap),y=i.useCallback(v=>{const k=f.current;let F=k.get(v);return F||(F=Gt(),k.set(v,F)),F},[]);i.useEffect(()=>{var v,k;d&&(e=="input"?(v=B.current)==null||v.focus():(k=l.current)==null||k.focus())},[d]);const h=i.useRef([]),m=i.useRef(!1),p=i.useCallback(v=>{u==null||u(v(c))},[u,c]),b=i.useCallback(v=>{p(k=>k.filter((F,j)=>j!==v))},[p]),w=vt({scrollable:n,className:t,variant:e}),I=i.useCallback((v="")=>{if(e!=="input"||m.current)return;m.current=!0;const k={label:v},F=y(k),j=[...c,k];u==null||u(j),requestAnimationFrame(()=>{g(F),m.current=!1})},[e,u,c,y]),[S,g]=i.useState(null);i.useEffect(()=>{var v;if(S){const k=c.findIndex(F=>y(F)===S);if(k!==-1){const F=h.current[k];(v=F==null?void 0:F.focus)==null||v.call(F);const j=l.current,P=F.offsetLeft+F.offsetWidth/2-j.offsetWidth/2;j.scrollTo({left:P,behavior:"smooth"})}}},[S,c,y]);const B=i.useRef(null),$=(d||c.length===0)&&e==="input";return a.jsxs("div",{ref:l,role:"list","aria-label":"Chips",className:w.chips,tabIndex:e==="input"?0:void 0,onFocus:v=>{v.target===v.currentTarget&&o(!0)},onBlur:()=>{o(!1)},onKeyDown:v=>{var q;if(e!=="input")return;const k=v.key,j=v.target===v.currentTarget;if(!d)return;const P=document.activeElement,M=h.current.findIndex(V=>V===P);if(k==="ArrowLeft"){v.preventDefault();const V=M>0?M-1:c.length-1,Q=y(c[V]);g(Q);return}if(k==="ArrowRight"){v.preventDefault();const V=M>=0?(M+1)%Math.max(1,c.length):0,Q=y(c[V]);g(Q);return}if(k==="Home"){v.preventDefault();const V=y(c[0]);g(V);return}if(k==="End"){v.preventDefault();const V=y(c[c.length-1]);g(V);return}if(j&&k==="Backspace"){if(v.preventDefault(),c.length>0){const V=h.current[c.length-1];(q=V==null?void 0:V.focus)==null||q.call(V)}return}},children:[c.map((v,k)=>{const F=y(v),j=e==="input",P=j?{editable:!0,editing:S===F,onEditCommit:M=>{o(!0),p(q=>q.map((V,Q)=>Q===k?{...V,label:M}:V))},onEditCancel:()=>{o(!0)},onChange:()=>{if(h.current.length==k+1){const M=l.current;requestAnimationFrame(()=>{M.scrollTo({left:M.scrollWidth,behavior:"smooth"})})}}}:{};return a.jsx(Ie,{ref:M=>h.current[k]=M,label:v.label??"",icon:v.icon,activated:v.activated,disabled:v.disabled,variant:v.variant,href:v.href,draggable:s,...P,onToggle:v.activated===void 0?void 0:M=>p(q=>q.map((V,Q)=>Q===k?{...V,activated:M}:V)),onBlur:()=>{S===F&&g(null)},onRemove:j?()=>{o(!0),b(k)}:void 0},F)}),d&&a.jsxs(a.Fragment,{children:[a.jsx(Pe,{orientation:"vertical",className:"animate-[var(--animate-blink)] border-outline",style:{"--animate-blink":"blink 1s cubic-bezier(0.4, 0, 0.6, 1) infinite"}}),a.jsx("style",{children:`
6
6
  @keyframes blink {
7
7
  0%, 50% { opacity: 1; }
8
8
  50.01%, 100% { opacity: 0; }
9
9
  }
10
- `})]}),$&&a.jsx(Ie,{ref:B,className:"opacity-0",draggable:r,editable:!0,editing:!0,onChange:g=>{var L;if(g=g.replace(/(&nbsp;)+/g," ").trim(),console.log("Ghost chip onChange",g,!!g),g)I(g);else if(c.length>0){const A=h.current[c.length-1];(L=A==null?void 0:A.focus)==null||L.call(A)}},onEditCommit:()=>{},onBlur:()=>{o(!1)},onFocus:g=>{o(!0),g.stopPropagation()},children:" "})]})};function Gt({trigger:e=["hover","focus"],isOpen:t,defaultOpen:n=!1,onOpenChange:r,openDelay:s=400,closeDelay:u=150,id:c}={}){const l=i.useId(),d=c??`tooltip-${l}`,o=Array.isArray(e)?e:[e],f=typeof t=="boolean",[y,h]=i.useState(n?"hovered":"hidden"),[p,m]=i.useState(!1),S=i.useRef(null),w=i.useRef(null),I=i.useCallback(()=>{S.current&&(clearTimeout(S.current),S.current=null),w.current&&(clearTimeout(w.current),w.current=null)},[]);i.useEffect(()=>()=>I(),[I]);const b=i.useCallback(C=>{if(f){const R=C!=="hidden";r==null||r(R)}else{h(C);const R=C!=="hidden";r==null||r(R)}},[f,r]),v=f?t?"hovered":"hidden":y,B=v!=="hidden",$=C=>{switch(C){case"hidden":return 0;case"hovered":return 1;case"focused":return 2;case"clicked":return 3;default:return 0}},g=i.useCallback(C=>{I(),!($(C)<=$(v))&&(S.current=setTimeout(()=>{b(C)},s))},[I,s,v,b]),L=i.useCallback(C=>{I(),w.current=setTimeout(()=>{(!f&&$(y)<=$(C)||f)&&b("hidden")},u)},[I,u,y,f,b]),A=i.useCallback(()=>{o.includes("hover")&&g("hovered")},[o,g]),j=i.useCallback(()=>{o.includes("hover")&&(v==="focused"||v==="clicked"||p||L("hovered"))},[o,v,p,L]),P=i.useCallback(()=>{o.includes("focus")&&(I(),b("focused"))},[o,I,b]),M=i.useCallback(()=>{if(o.includes("focus")&&v!=="clicked"){if(o.includes("hover")&&p){b("hovered");return}L("focused")}},[o,v,p,L,b]),X=i.useCallback(()=>{o.includes("click")&&(I(),b(v==="clicked"?"hidden":"clicked"))},[o,v,I,b]),O=i.useCallback(C=>{C.key==="Escape"&&B&&(I(),b("hidden"),C.preventDefault())},[B,I,b]),J=i.useCallback(()=>{m(!0),I()},[I]),W=i.useCallback(()=>{m(!1),o.includes("hover")&&v==="hovered"&&L("hovered")},[o,v,L]);return{triggerProps:{"aria-describedby":B?d:void 0,onMouseEnter:A,onMouseLeave:j,onFocus:P,onBlur:M,onClick:X,onKeyDown:O},tooltipProps:{id:d,role:"tooltip","aria-hidden":!B,onMouseEnter:J,onMouseLeave:W},isOpen:B,state:v}}const We=({variant:e="plain",buttons:t,className:n,children:r,title:s,text:u,content:c,position:l,targetRef:d,ref:o,trigger:f=["hover","focus"],transition:y,openDelay:h=400,closeDelay:p=150,isOpen:m,defaultOpen:S=!1,onOpenChange:w,id:I,anchorRef:b,...v})=>{const $=l||(e==="rich"?"bottom-right":"bottom");if(y={duration:.3,...y},!r&&!d)throw new Error("Tooltip must have a child or a targetRef");t&&!Array.isArray(t)&&(t=[t]);const g=i.useRef(null),A=b||(d||g),{triggerProps:j,tooltipProps:P,isOpen:M}=Gt({trigger:f,isOpen:m,defaultOpen:S,onOpenChange:w,openDelay:h,closeDelay:p,id:I}),X=!d&&i.isValidElement(r)?i.cloneElement(r,{ref:g,...j,onMouseEnter:W=>{var C,R;j.onMouseEnter(),(R=(C=r.props)==null?void 0:C.onMouseEnter)==null||R.call(C,W)},onMouseLeave:W=>{var C,R;j.onMouseLeave(),(R=(C=r.props)==null?void 0:C.onMouseLeave)==null||R.call(C,W)},onFocus:W=>{var C,R;j.onFocus(),(R=(C=r.props)==null?void 0:C.onFocus)==null||R.call(C,W)},onBlur:W=>{var C,R;j.onBlur(),(R=(C=r.props)==null?void 0:C.onBlur)==null||R.call(C,W)},onClick:W=>{var C,R;j.onClick(),(R=(C=r.props)==null?void 0:C.onClick)==null||R.call(C,W)},onKeyDown:W=>{var C,R;j.onKeyDown(W),(R=(C=r.props)==null?void 0:C.onKeyDown)==null||R.call(C,W)}}):r;i.useEffect(()=>{if(!d)return;const W=d.current;if(!W)return;const C=()=>j.onMouseEnter(),R=()=>j.onMouseLeave(),H=()=>j.onFocus(),G=()=>j.onBlur(),K=()=>j.onClick(),te=k=>j.onKeyDown(k);return W.addEventListener("mouseenter",C),W.addEventListener("mouseleave",R),W.addEventListener("focus",H,!0),W.addEventListener("blur",G,!0),W.addEventListener("click",K),W.addEventListener("keydown",te),j["aria-describedby"]?W.setAttribute("aria-describedby",j["aria-describedby"]):W.removeAttribute("aria-describedby"),()=>{W.removeEventListener("mouseenter",C),W.removeEventListener("mouseleave",R),W.removeEventListener("focus",H,!0),W.removeEventListener("blur",G,!0),W.removeEventListener("click",K),W.removeEventListener("keydown",te)}},[d,j]);const O=_t({variant:e,buttons:t,className:n,title:s,text:u,position:$,trigger:f,targetRef:d,children:r}),J={open:{opacity:1,height:"auto"},close:{opacity:0,height:16}};return a.jsxs(a.Fragment,{children:[X,a.jsx(U.AnimatePresence,{children:M&&a.jsx(De,{anchorRef:A,position:$,children:a.jsx(U.motion.div,{initial:"close",variants:J,animate:"open",transition:{duration:y.duration},exit:"close",className:O.toolTip,...v,...P,children:a.jsx("div",{className:O.container,children:c?a.jsx("div",{className:O.content,children:c}):a.jsxs(a.Fragment,{children:[s&&a.jsx("div",{className:O.subHead,children:s}),u&&a.jsx("div",{className:O.supportingText,children:u}),t&&a.jsx("div",{className:O.actions,children:Array.isArray(t)&&t.map((W,C)=>a.jsx(pe,{size:"small",variant:"text",...W},C))})]})})})})})]})},Ne=({className:e,label:t,variant:n="primary",size:r="medium",href:s,type:u,icon:c,extended:l=!1,ref:d,transition:o,children:f,...y})=>{if(f&&(t=f),!t)throw new Error("FAB component requires either a label prop or children content");const h=s?"a":"button",p=bt({href:s,icon:c,extended:l,label:t,size:r,variant:n,className:e,transition:o,children:t});o={duration:.3,...o};const m=i.useRef(null),S=d||m,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...o,opacity:{duration:o.duration/2,delay:o.duration-o.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...o,marginLeft:{duration:o.duration/2,delay:o.duration-o.duration/2}}}};return a.jsxs(h,{...y,ref:S,href:s,"aria-label":l?void 0:t,className:p.fab,children:[a.jsx(We,{trigger:l?null:void 0,text:t,targetRef:S}),a.jsx(de,{style:{transition:o.duration+"s"},className:p.stateLayer,colorName:x({"on-primary":n=="primary","on-secondary":n=="secondary","on-tertiary":n=="tertiary","on-primary-container":n=="primaryContainer","on-secondary-container":n=="secondaryContainer","on-tertiary-container":n=="tertiaryContainer"}),stateClassName:"state-ripple-group-[fab]"}),a.jsx(ae,{icon:c,className:p.icon}),a.jsx(U.AnimatePresence,{children:l&&a.jsx(U.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:p.label,children:t})})]})},ge=({variant:e="standard",href:t,disabled:n=!1,title:r,label:s,onToggle:u,activated:c=!1,onClick:l,icon:d,size:o="medium",iconSelected:f,className:y,ref:h,width:p="default",shape:m="rounded",allowShapeTransformation:S=!0,transition:w,children:I,...b})=>{if(I&&(s=I),!s)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");!r&&r!==null&&(r=s);const[v,B]=i.useState(c),$=P=>{n&&P.preventDefault(),u?(B(!v),u(!v)):l&&l(P)};i.useEffect(()=>{B(c)},[c]);const g=t?"a":"button",L=kt({transition:w,shape:m,allowShapeTransformation:S,width:p,href:t,activated:v,label:s,iconSelected:f,isActive:v,onToggle:u,disabled:n,icon:d,variant:e,className:y,size:o,children:s,...b}),A=i.useRef(null),j=h||A;return w={duration:.3,...w},a.jsxs(g,{disabled:n,href:t,style:{transition:w.duration+"s"},className:L.iconButton,"aria-label":s,...b,title:void 0,onClick:$,ref:j,children:[r!==null&&a.jsx(We,{targetRef:j,trigger:n?null:void 0,text:r}),a.jsx("div",{className:L.touchTarget}),a.jsx(de,{style:{transition:w.duration+"s"},className:L.stateLayer,colorName:x(e==="standard"&&{"on-surface-variant":!v,"on-primary":v},e==="filled"&&{"on-surface-variant":!v&&!!u,"on-primary":v||!u},e==="tonal"&&{"on-secondary":v&&!!u,"on-secondary-container":!v||!u},e==="outlined"&&{"inverse-on-surface":v&&!!u,"on-surface-variant":!v||!u}),stateClassName:"state-ripple-group-[icon-button]"}),d?a.jsx(ae,{icon:d,className:L.icon}):I]})},ys=({className:e,label:t,variant:n="primary",size:r="medium",href:s,icon:u,extended:c=!1,ref:l,transition:d,children:o,open:f,defaultOpen:y=!1,onOpenChange:h,...p})=>{d={duration:.3,ease:"easeInOut",...d};const m=i.useRef(null),S=l||m,w=typeof f=="boolean",[I,b]=i.useState(y),v=w?f:I,B=M=>{w||b(M),h==null||h(M)},$=i.Children.toArray(o).filter(M=>i.isValidElement(M)&&M.type===pe),g=Nt({href:s,icon:u,extended:c,label:t,size:r,variant:n,className:e,transition:d,children:t,open:v}),L=U.motion.create(Ne),A=U.motion.create(ge),j=M=>a.jsx(L,{icon:u,extended:c,label:t,variant:n+"Container",size:r,className:g.fab+" "+(e??""),"aria-expanded":v,onClick:()=>B(!0),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},...M}),P=i.useId();return a.jsxs("div",{className:g.fabMenu,ref:S,...p,children:[a.jsx(U.AnimatePresence,{children:v&&a.jsx("div",{className:g.actions,role:"menu","aria-hidden":!v,children:(()=>{const M=$.length;return $.map((X,O)=>{X.props;const J=M-1-O,W=((d==null?void 0:d.delay)??0)+J*.06,C={open:{overflow:"visible",opacity:1,width:"auto",transition:{...d,delay:W,opacity:{delay:(d==null?void 0:d.duration)/2+W}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...d,delay:W,opacity:{duration:(d==null?void 0:d.duration)/1.5}}}};return a.jsx(U.motion.div,{initial:"close",animate:"open",variants:C,transition:d,exit:"close",children:i.cloneElement(X,{key:O,shape:"rounded",variant:"filled",className:()=>({button:x("max-w-full overflow-hidden text-nowrap",{"px-0":!v,"bg-primary-container text-on-primary-container ":n==="primary","bg-secondary-container text-on-secondary-container":n==="secondary","bg-tertiary-container text-on-tertiary-container":n==="tertiary"}),stateLayer:x({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),j({className:"invisible pointer-events-none"}),a.jsxs("div",{className:"absolute right-0 top-0",children:[!v&&j({className:"",layout:!0,layoutId:"fab-menu"+P}),v&&a.jsx(a.Fragment,{children:a.jsx(A,{layout:!0,layoutId:"fab-menu"+P,variant:"filled",className:()=>({iconButton:x({"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:x({"[--default-color:var(--color-on-primary)]":n==="primary","[--default-color:var(--color-on-secondary)]":n==="secondary","[--default-color:var(--color-on-tertiary)]":n==="tertiary"})}),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},icon:is,onClick:()=>B(!1),children:"Close"})})]})]})},xs=({className:e,valueFormatter:t,step:n=10,name:r,value:s=0,min:u=0,max:c=100,marks:l=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:o,...f})=>{const y=R=>{const H=p(),G=h();return R===1/0?100:R===-1/0?0:(R-H)/(G-H)*100},h=(R=!1)=>R?c:c==1/0?l[(l==null?void 0:l.length)-1].value:c,p=(R=!1)=>R?u:u==-1/0?l[0].value:u,m=R=>{const H=p(!1);return(h(!1)-H)*R/100+H},[S,w]=i.useState(!1),I=i.useRef(null),b=d||I,[v,B]=i.useState(s),[$,g]=i.useState(y(s)),[L,A]=i.useState(!1);i.useEffect(()=>{B(s),g(y(s))},[s]);const j=R=>{A(!0),w(!0),X(R)},P=()=>{A(!1),w(!1)};i.useEffect(()=>(L?(window.addEventListener("mouseup",P),window.addEventListener("mousemove",X),window.addEventListener("touchend",P),window.addEventListener("touchmove",X)):(window.removeEventListener("mouseup",P),window.removeEventListener("mousemove",X),window.removeEventListener("touchend",P),window.removeEventListener("touchmove",X)),()=>{window.removeEventListener("mouseup",P),window.removeEventListener("mousemove",X),window.removeEventListener("touchend",P),window.removeEventListener("touchmove",X)}),[L]);const M=Mt({className:e,isChanging:S,marks:l,max:c,min:u,name:r,step:n,value:v,valueFormatter:t,onChange:o}),X=R=>{const H=b==null?void 0:b.current;if(H){const G=H.getBoundingClientRect().left,te=((R.type==="touchmove"||R.type==="touchstart"?R.touches[0].clientX:R.clientX)-G)/H.offsetWidth*100;O({percent:te})}},O=({percent:R,value:H})=>{if(R){if(R>=100){B(h(!0)),g(100);return}if(R<=0){B(p(!0)),g(0);return}H=m(R),H==p()&&(H=p(!0)),H==h()&&(H=h(!0))}else if(H!=null){if(H>=h()){B(h(!0)),g(100);return}if(H<=p()){B(p(!0)),g(0);return}R=y(H)}else return;n!=null?H=Math.round((H-p())/n)*n+p():l&&(H=l.reduce((G,K,te)=>{let k=K.value===1/0?h():K.value===-1/0?p():K.value,E=G.value===1/0?h():G.value===-1/0?p():G.value;return k=Math.abs(k-H),E=Math.abs(E-H),k<E?K:G}).value),H>=h()&&(H=h(!0)),H<=p()&&(H=p(!0)),R=y(H),B(H),g(R),o&&o(H)},[J,W]=i.useState(0);i.useEffect(()=>{const R=()=>{b.current&&W(b.current.offsetWidth)};return R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}},[]);const C=R=>{switch(R.key){case"ArrowRight":if(n)O({value:v+n});else if(l){const H=l.find(G=>G.value>v);H&&O({value:H.value})}break;case"ArrowLeft":if(n)O({value:v-n});else if(l){const H=l.slice(0).reverse().find((G,K,te)=>v===1/0?K===1:G.value<v);H&&O({value:H.value})}break;default:return}};return a.jsxs("div",{tabIndex:0,onKeyDown:C,role:"slider","aria-valuemin":p(!0),"aria-valuemax":h(!0),"aria-valuenow":v,"aria-valuetext":v.toString(),className:M.slider,onMouseDown:j,onClick:X,ref:b,onTouchStart:j,onDragStart:R=>R.preventDefault(),...f,children:[a.jsx("input",{type:"hidden",name:r,value:v}),a.jsx("div",{className:M.activeTrack,style:{flex:$/100}}),a.jsx("div",{className:M.handle,children:a.jsx(U.AnimatePresence,{children:S&&a.jsx(U.motion.div,{className:M.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(v):v})})}),a.jsx("div",{className:M.inactiveTrack,style:{flex:1-$/100}}),a.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:l&&l.map((R,H)=>{let G=null;const K=(S?9:10)/J*100,te=y(R.value);return te<=$-K?G=!0:te>=$+K&&(G=!1),a.jsx("div",{className:x(M.dot,{"bg-primary-container":G!=null&&G,"bg-primary":G!=null&&!G}),style:{left:`${y(R.value)}%`}},H)})})]})},gs=({variant:e="standard",className:t,children:n,title:r,position:s="right",extended:u,divider:c,onExtendedChange:l,closeIcon:d=be,transition:o,...f})=>{o={duration:.3,...o};const[y,h]=i.useState(u??!0),p=It({transition:o,title:r,position:s,closeIcon:d,className:t,children:n,onExtendedChange:l,divider:c,isExtended:y,extended:y,variant:e});i.useEffect(()=>{l==null||l(y??!1)},[y]),i.useEffect(()=>{u!=null&&h(u)},[u]);const m={close:{width:0},open:{width:"auto"}},S=()=>a.jsxs(a.Fragment,{children:[a.jsx(U.AnimatePresence,{children:e=="modal"&&y&&a.jsx(U.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:o,onClick:()=>h(!1),className:p.overlay})}),a.jsx(U.AnimatePresence,{children:y&&a.jsxs("div",{...f,className:p.sideSheet,style:{transition:o.duration+"s"},children:[a.jsxs(U.motion.div,{variants:m,initial:u===!1?"open":"close",animate:"open",exit:"close",className:p.container,children:[a.jsxs("div",{className:p.header,children:[r&&a.jsx("p",{className:p.title,children:r}),a.jsx(ge,{size:"small",label:"close",icon:d,onClick:()=>h(!1),className:p.closeButton})]}),a.jsx("div",{className:p.content,style:{transition:o.duration+"s"},children:n})]}),(c==null&&e=="standard"?!0:c)&&a.jsx(Pe,{className:p.divider,orientation:"vertical"})]})})]});return e=="modal"?Me.createPortal(S(),document.body):S()},vs=({message:e,className:t,duration:n,closeIcon:r=be,onClose:s,...u})=>{const[c,l]=i.useState(!0),d=Rt({className:t,closeIcon:r,duration:n,isVisible:c,onClose:s,message:e});i.useEffect(()=>{n&&setTimeout(()=>{o()},n)},[n]);const o=()=>{l(!1),s==null||s()};return a.jsx(U.AnimatePresence,{children:c&&a.jsx(U.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:d.snackbar,...u,children:a.jsxs("div",{className:d.container,children:[a.jsx("p",{className:d.supportingText,children:e}),a.jsx(ge,{onClick:()=>o(),className:d.icon,icon:r,label:"close the snackbar"})]})})})},ws=({selected:e=!1,className:t,activeIcon:n,disabled:r=!1,inactiveIcon:s,onChange:u,onClick:c,onKeyDown:l,ref:d,...o})=>{const[f,y]=i.useState(e);i.useEffect(()=>{y(e)},[e]);const h=b=>{r||(m(),c&&c(b))},p=b=>{r||((b.key===" "||b.key==="Enter")&&(b.preventDefault(),m()),l&&l(b))},m=()=>{y(!f),u==null||u(!f)},S=At({className:t,isSelected:f,activeIcon:n,inactiveIcon:s,disabled:r,selected:f,onChange:u}),w=i.useRef(null),I=d||w;return a.jsxs(U.motion.div,{role:"switch","aria-checked":f,tabIndex:r?-1:0,onKeyDown:p,onClick:h,ref:I,className:S.switch,...o,children:[a.jsx("input",{type:"hidden",value:f?"1":"0"}),a.jsxs(U.motion.div,{layout:!0,style:{translate:f?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:S.handleContainer,children:[a.jsx("div",{className:S.handle,children:(f?n:s)&&a.jsx(ae,{className:S.icon,icon:f?n:s})}),a.jsx("div",{className:S.handleStateLayer})]})]})},Jt=({className:e,onClick:t,label:n,variant:r="primary",href:s,icon:u,selectedTab:c,setSelectedTab:l,tabsId:d,index:o,onTabSelected:f,scrollable:y=!1,selected:h=!1,children:p,ref:m,...S})=>{const w=i.useRef(null),I=m||w,b=n??(typeof p=="string"?p:void 0),[v,B]=i.useState(h);i.useEffect(()=>{h&&c==null?B(!0):B(c==o&&o!=null)},[c]),i.useEffect(()=>{c==o&&f&&f({ref:I,index:o||0,label:b,icon:u})},[c]);const $=s?"a":"button",g=A=>{l&&l(o??null),t&&t(A)},L=$t({className:e,onTabSelected:f,scrollable:y,selectedTab:c,index:o,tabsId:d,selected:v,variant:r,icon:u,label:b,isSelected:v,setSelectedTab:l,href:s});return a.jsxs($,{...S,role:"tab","aria-selected":v,ref:I,href:s,className:L.tab,onClick:g,...S,children:[a.jsx(de,{style:{transition:.3+"s"},className:L.stateLayer,colorName:r==="primary"&&v?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),a.jsxs("span",{className:L.content,children:[u&&a.jsx(ae,{icon:u,className:L.icon}),a.jsx("span",{className:L.label,children:b}),v&&a.jsx(U.motion.span,{layoutId:`underline-${d}`,className:L.underline,transition:{duration:.3}})]})]})},Te=i.createContext(null),bs=({variant:e="primary",onTabSelected:t,children:n,className:r,selectedTab:s,setSelectedTab:u,scrollable:c=!1})=>{const l=i.useContext(Te),[d,o]=i.useState(null);let f;s===0||s!=null?f=s:l?f=l.selectedTab:f=d;const y=u??(l==null?void 0:l.setSelectedTab)??o,h=i.Children.toArray(n).filter(I=>i.isValidElement(I)&&I.type===Jt),p=i.useRef(null),m=I=>{if(t==null||t(I),c){const b=p.current,v=I.ref.current;if(b&&v){const B=v.offsetLeft+v.offsetWidth/2-b.offsetWidth/2;b.scrollTo({left:B,behavior:"smooth"})}}},S=i.useMemo(()=>(l==null?void 0:l.tabsId)??Kt(),[l==null?void 0:l.tabsId]),w=Wt({children:n,onTabSelected:t,scrollable:c,selectedTab:f,setSelectedTab:y,className:r,variant:e});return a.jsx("div",{ref:p,role:"tablist",className:w.tabs,children:h.map((I,b)=>i.cloneElement(I,{key:b,index:b,variant:e,selectedTab:f,setSelectedTab:y,tabsId:S,onTabSelected:m,scrollable:c}))})},Ss=({children:e,selectedTab:t,setSelectedTab:n,defaultTab:r=0})=>{const[s,u]=i.useState(r),c=i.useRef(null),l=t!==void 0?t:s,d=n??u,o=c.current!==null&&l!==null?l>c.current?1:-1:0;l!==c.current&&(c.current=l);const f=i.useId(),y=i.useMemo(()=>({selectedTab:l,setSelectedTab:d,previousTab:c.current,direction:o,tabsId:f}),[l,d,o,f]);return a.jsx(Te.Provider,{value:y,children:e})},Zt=({children:e,className:t,isSelected:n=!1})=>{const r=Ot({children:e,className:t,isSelected:n});return a.jsx("div",{className:r.tabPanel,children:e})},Ns=({children:e,className:t})=>{const n=i.useContext(Te);if(!n)return console.warn("TabPanels must be used within a TabGroup"),null;const{selectedTab:r,direction:s,tabsId:u}=n,c=i.Children.toArray(e).filter(d=>i.isValidElement(d)&&d.type===Zt),l=Bt({children:e,className:t});return a.jsx("div",{className:l.tabPanels,children:a.jsx(U.AnimatePresence,{initial:!1,custom:s,mode:"popLayout",children:c.map((d,o)=>r===o&&a.jsx(U.motion.div,{custom:s,variants:{enter:f=>({x:f*100+"%",opacity:1}),center:{x:0,opacity:1},exit:f=>({x:f*-100+"%",opacity:1})},initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",stiffness:400,damping:40},role:"tabpanel","aria-labelledby":`tab-${u}-${o}`,children:i.cloneElement(d,{isSelected:!0})},o))})})},Es=({hasSelected:e})=>({datePicker:x("inline-flex flex-col bg-surface-container-high rounded-[28px] p-3 select-none","min-w-[320px]"),header:x("flex items-center justify-between h-12 mb-2 px-2"),monthNav:x("flex items-center justify-center w-10 h-10 rounded-full text-on-surface-variant hover:bg-on-surface-variant/8 transition-colors cursor-pointer"),monthLabel:x("text-label-large text-on-surface font-bold capitalize"),weekDays:x("grid grid-cols-7 mb-2"),weekDay:x("h-10 flex items-center justify-center text-body-small text-on-surface-variant"),daysGrid:x("grid grid-cols-7 row-auto gap-y-2"),dayCell:x("flex items-center justify-center h-10 p-0 relative"),dayButton:x("w-10 h-10 rounded-full flex items-center justify-center text-body-large transition-all duration-200 relative overflow-hidden z-10 outline-none")}),ks=Q("datePicker",Es),Qt=({value:e,defaultValue:t,onChange:n,minDate:r,maxDate:s,shouldDisableDate:u,locale:c="default",weekStartDay:l=0,className:d,style:o,mode:f="single",...y})=>{const[h,p]=i.useState(()=>{const k=N=>N instanceof Date?N:Array.isArray(N)&&N[0]?N[0]:null,E=k(e)||k(t)||new Date;return new Date(E.getFullYear(),E.getMonth(),1)}),[m,S]=i.useState(0),[w,I]=i.useState("day"),b=e!==void 0,[v,B]=i.useState(t||null),$=b?e||null:v,g=(k,E)=>new Date(k,E+1,0).getDate(),L=i.useMemo(()=>{const k=h.getFullYear(),E=h.getMonth(),N=g(k,E),V=(new Date(k,E,1).getDay()-l+7)%7,z=[],q=g(k,E-1);for(let _=V-1;_>=0;_--)z.push({date:new Date(k,E-1,q-_),isCurrentMonth:!1});for(let _=1;_<=N;_++)z.push({date:new Date(k,E,_),isCurrentMonth:!0});const D=42-z.length;for(let _=1;_<=D;_++)z.push({date:new Date(k,E+1,_),isCurrentMonth:!1});return z},[h,l]),A=i.useMemo(()=>{const k=new Date().getFullYear(),E=k-100,N=k+100,F=[];for(let V=E;V<=N;V++)F.push(V);return F},[]),j=i.useRef(null);i.useEffect(()=>{if(w==="year"&&j.current){const k=j.current.querySelector('[data-selected="true"]');k&&k.scrollIntoView({block:"center"})}},[w]);const P=i.useMemo(()=>new Intl.DateTimeFormat(c,{month:"long",year:"numeric"}),[c]),M=i.useMemo(()=>new Intl.DateTimeFormat(c,{weekday:"narrow"}),[c]),X=i.useMemo(()=>{const k=new Date(2023,0,1+l);return Array.from({length:7}).map((E,N)=>{const F=new Date(k);return F.setDate(k.getDate()+N),M.format(F).charAt(0).toUpperCase()})},[M,l]),O=()=>{S(-1),p(k=>new Date(k.getFullYear(),k.getMonth()-1,1))},J=()=>{S(1),p(k=>new Date(k.getFullYear(),k.getMonth()+1,1))},W=k=>{p(E=>new Date(k,E.getMonth(),1)),I("day")},C=(k,E)=>k?k.getDate()===E.getDate()&&k.getMonth()===E.getMonth()&&k.getFullYear()===E.getFullYear():!1,R=k=>C(new Date,k),H=k=>{let E=k;if(f==="single")E=k;else{const N=$,[F,V]=Array.isArray(N)?N:[null,null];!F||F&&V?E=[k,null]:k<F?E=[k,F]:E=[F,k]}b||B(E),n&&n(E)},G=k=>{if(f==="single")return{isSelected:C($,k),isStart:!1,isEnd:!1,isInRange:!1};const E=Array.isArray($)?$:[$,null],[N,F]=E,V=C(N,k),z=C(F,k);let q=!1;if(N&&F){const Z=new Date(N.getFullYear(),N.getMonth(),N.getDate()).getTime(),D=new Date(F.getFullYear(),F.getMonth(),F.getDate()).getTime(),_=new Date(k.getFullYear(),k.getMonth(),k.getDate()).getTime();q=_>Z&&_<D}return{isSelected:V||z,isStart:V,isEnd:z,isInRange:q}},K=ks({hasSelected:!!$}),te={enter:k=>({x:k>0?"100%":"-100%",opacity:0}),center:{x:0,opacity:1},exit:k=>({x:k<0?"100%":"-100%",opacity:0})};return a.jsxs("div",{className:x(K.datePicker,d),style:o,...y,children:[a.jsxs("div",{className:K.header,children:[a.jsxs(pe,{variant:"text",disableTextMargins:!0,size:"small",onClick:()=>I(k=>k==="day"?"year":"day"),className:"text-label-large font-bold capitalize text-on-surface hover:bg-surface-container-highest",children:[a.jsx("span",{className:"mr-2",children:w==="day"?P.format(h):h.getFullYear()}),a.jsx(ae,{icon:ls,className:x("w-3 h-3 transition-transform duration-200 inline",w==="year"&&"rotate-180")})]}),w==="day"&&a.jsxs("div",{className:"flex items-center",children:[a.jsx(ge,{size:"xSmall",allowShapeTransformation:!1,onClick:O,icon:as,label:"Previous month",title:null}),a.jsx(ge,{size:"xSmall",allowShapeTransformation:!1,onClick:J,icon:rs,label:"Next month",title:null})]})]}),w==="year"?a.jsx("div",{className:"h-[280px] overflow-y-auto grid grid-cols-3 gap-2 p-2 scrollbar-hide",ref:j,children:A.map(k=>a.jsx(pe,{size:"small",variant:k===h.getFullYear()?"filled":"text",onClick:()=>W(k),"data-selected":k===h.getFullYear(),className:x("w-full",{"text-on-surface":k!==h.getFullYear()}),label:k.toString(),children:k},k))}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:K.weekDays,children:X.map((k,E)=>a.jsx("div",{className:K.weekDay,children:k},E))}),a.jsx("div",{className:"overflow-hidden relative min-h-[240px]",children:a.jsx(U.AnimatePresence,{mode:"popLayout",initial:!1,custom:m,children:a.jsx(U.motion.div,{custom:m,variants:te,initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",bounce:0,duration:.3},className:K.daysGrid,children:L.map((k,E)=>{if(!k.isCurrentMonth)return a.jsx("div",{className:K.dayCell},E);const{isSelected:N,isStart:F,isEnd:V,isInRange:z}=G(k.date),q=R(k.date),Z=r&&k.date<r||s&&k.date>s||(u==null?void 0:u(k.date));return a.jsx("div",{className:x(K.dayCell,z&&"bg-primary/20",F&&($==null?void 0:$[1])&&"bg-gradient-to-r from-transparent to-primary/20",V&&($==null?void 0:$[0])&&"bg-gradient-to-l from-transparent to-primary/20"),children:a.jsx(pe,{className:()=>({button:x("aspect-square h-[40px] p-0",{"text-on-surface":!N&&!q,"opacity-50":Z}),stateLayer:x({"!bg-transparent":Z})}),size:"small",allowShapeTransformation:!1,variant:x({filled:N,outlined:q,text:!N&&!q}),label:k.date.getDate().toString(),onClick:()=>H(k.date),disabled:Z,children:k.date.getDate().toString()})},E)})},h.toISOString())})})]})]})},Ls=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:r,suffix:s,name:u,label:c,className:l,supportingText:d,trailingIcon:o,leadingIcon:f,type:y="text",multiline:h=!1,autoComplete:p="on",onChange:m,value:S,defaultValue:w,showSupportingText:I,id:b,style:v,ref:B,onFocus:$,onBlur:g,...L})=>{const A=i.useId(),j=b||A,P=`${j}-helper`,M=S!==void 0,[X,O]=i.useState(w??""),J=M?S:X,[W,C]=i.useState(!1),[R,H]=i.useState(!!(n!=null&&n.length)),G=i.useRef(null),K=B||G,te=i.useRef(null),k=i.useRef(null),E=i.useRef(null),N=I??(!!(n!=null&&n.length)||!!(d!=null&&d.length));i.useEffect(()=>{H(!!(n!=null&&n.length))},[n]);const F=()=>{K.current&&!W&&K.current.focus()};i.useEffect(()=>{W?(H(!1),$==null||$()):(n!=null&&n.length&&H(!0),g==null||g())},[W]);const V=ce=>{const he=ce.target.value;M||O(he),H(!1),m&&m(ce)},z=y==="date",[q,Z]=i.useState(!1),[D,_]=i.useState(null),ne=i.useMemo(()=>{const ce=String(J);if(!ce)return null;const[he,we,Be]=ce.split("-").map(Number);return he&&we&&Be?new Date(he,we-1,Be):null},[J]),ie=()=>{t||(_(ne),Z(!0))};i.useEffect(()=>{C(!!q)},[q]);const ve=()=>{const ce=D?D.toLocaleDateString("en-CA"):"";M||O(ce),m&&m({target:{value:ce,name:u,type:y}}),Z(!1)},le=z&&!o?ss:o,ye=z?"[&::-webkit-calendar-picker-indicator]:hidden cursor-pointer":"",Y=zt({showSupportingText:N,isFocused:W,showErrorIcon:R,disabled:t,name:u,label:c,autoComplete:p,className:l,onChange:m,placeholder:r,supportingText:d,type:y,leadingIcon:f,trailingIcon:le,variant:e,errorText:n,value:String(J),suffix:s,multiline:h}),se=h?ln:"input",re=h?{}:{type:y},ue=W||typeof J=="string"&&J.length>0||y=="date",fe=ue&&e==="outlined",nn=!fe;return a.jsxs("div",{ref:te,className:Y.textField,style:v,children:[a.jsxs("fieldset",{onClick:F,className:Y.content,role:"presentation",children:[a.jsx("div",{className:Y.stateLayer}),f&&a.jsx("div",{className:Y.leadingIcon,children:i.isValidElement(f)?f:a.jsx(ae,{className:"w-5 h-5",icon:f})}),a.jsx(U.motion.legend,{"aria-hidden":"true",variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:fe?"visible":"hidden",animate:fe?"visible":"hidden",className:"max-w-full ml-2 px-2 text-body-small h-0 overflow-hidden whitespace-nowrap",transition:{duration:.2},children:a.jsx("span",{className:"transform inline-flex -translate-y-1/2 opacity-0",children:c})}),a.jsxs("div",{className:"flex-1 relative",children:[nn&&a.jsx(U.motion.label,{htmlFor:j,className:x("absolute left-4 transition-all duration-300 pointer-events-none",{"text-body-small top-2":e=="filled"&&ue,"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&ue)}),transition:{duration:.3},layoutId:e==="outlined"?`${j}-label`:void 0,children:a.jsx("span",{className:Y.label,children:c})}),fe&&a.jsx(U.motion.label,{htmlFor:j,className:x("absolute left-2 -top-3 px-1 text-body-small z-10",Y.label),layoutId:`${j}-label`,transition:{duration:.3},children:c}),a.jsx(se,{...L,ref:K,value:J,onChange:V,className:x(Y.input,ye),id:j,name:u,placeholder:W?r??void 0:"",onFocus:()=>C(!0),onBlur:()=>C(!1),disabled:t,autoComplete:p,"aria-invalid":!!(n!=null&&n.length),"aria-describedby":N?P:void 0,...re})]}),a.jsx("div",{className:Y.activeIndicator}),!R&&a.jsxs(a.Fragment,{children:[le&&a.jsx("div",{ref:z?k:void 0,onClick:ce=>{ce.stopPropagation(),z&&ie()},className:x(Y.trailingIcon,z&&"cursor-pointer"),children:a.jsx("div",{className:"flex items-center justify-center w-full h-full",children:i.isValidElement(le)?le:a.jsx(ae,{className:"h-5",icon:le})})}),!le&&s&&a.jsx("span",{className:Y.suffix,children:s})]}),R&&a.jsx("div",{className:x(Y.trailingIcon,{" absolute right-0":!le}),children:a.jsx(ae,{className:"h-5 text-error",icon:os})})]}),N&&a.jsx("p",{className:Y.supportingText,id:P,children:n!=null&&n.length?n:d!=null&&d.length?d:" "}),z&&q&&a.jsx(a.Fragment,{children:a.jsx(De,{onBlur:ce=>{var he,we;console.log(E.current,!((he=E.current)!=null&&he.contains(ce.relatedTarget))),E.current&&!((we=E.current)!=null&&we.contains(ce.relatedTarget))&&Z(!1)},anchorRef:te,position:"bottom",children:a.jsxs("div",{ref:E,className:"z-50 shadow-xl rounded-[28px] bg-surface-container-high overflow-hidden",children:[a.jsx(Qt,{className:"",value:D,onChange:_}),a.jsxs("div",{className:"flex justify-end gap-2 p-4 pt-0",children:[a.jsx(pe,{variant:"text",size:"small",onClick:()=>Z(!1),children:"Cancel"}),a.jsx(pe,{variant:"filled",size:"small",onClick:ve,children:"OK"})]})]})})})]})},js=({isSelected:e,icon:t,label:n,variant:r})=>({navigationRailItem:x(" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":r=="vertical","gap-0 h-[66px]":r=="horizontal"}),container:x(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":r=="horizontal","gap-0 ":r=="vertical","p-4":!n},n&&["px-4",{"py-1 ":r=="vertical","py-4 ":r=="horizontal"}]),stateLayer:x("rounded-full"),icon:x("size-6 flex"),label:x("w-fit mx-auto text-nowrap",{"text-label-large ":r=="horizontal","text-label-medium":r=="vertical"})}),Is=Q("navigationRailItem",js),en=({label:e})=>a.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:a.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),tn=({className:e,onClick:t,label:n,variant:r="vertical",href:s,icon:u,selectedItem:c,setSelectedItem:l,index:d,onItemSelected:o,selected:f=!1,ref:y,transition:h,isExtended:p,iconSelected:m,style:S,extendedOnly:w,children:I,...b})=>{I&&(n=I);const v=i.useRef(null),B=y||v,[$,g]=i.useState(f);i.useEffect(()=>{f&&c==null?g(!0):g(c==d&&d!=null)},[c]),i.useEffect(()=>{c==d&&o&&o({ref:B,index:d||0,label:n,icon:u})},[c]);const L=s?"a":"button",A=P=>{l&&l(d??null),t&&t(P)},j=Is({isExtended:p,extendedOnly:w,className:e,onItemSelected:o,selectedItem:c,index:d,transition:h,selected:$,variant:r,icon:u,label:n,isSelected:$,setSelectedItem:l,href:s,children:n,iconSelected:m});return h={duration:.3,...h},w&&!p?null:a.jsxs(L,{...b,role:"tab","aria-selected":$,ref:B,href:s,className:j.navigationRailItem,onClick:A,style:{transition:h.duration+"s",...S},children:[a.jsxs(U.motion.div,{style:{transition:r=="horizontal"?h.duration+`s, gap ${h.duration/2}s ${h.duration-h.duration/2}s`:h.duration+`s, gap ${h.duration/3}s ${h.duration-h.duration/3}s`},transition:h,className:j.container,children:[a.jsx(de,{style:{transition:h.duration+"s"},className:j.stateLayer,colorName:x({"on-surface":!$,"on-secondary-container":$}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),u&&a.jsx(ae,{icon:$?m:u,className:j.icon}),a.jsx(U.AnimatePresence,{children:r=="horizontal"&&(()=>{const P={width:0,opacity:0,transition:{...h}},M={width:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/2,delay:h.duration-h.duration/2}}};return a.jsx(U.motion.span,{initial:P,animate:M,exit:P,className:j.label,children:n})})()})]}),a.jsx(U.AnimatePresence,{children:r=="vertical"&&(()=>{const P={height:0,opacity:0,transition:{...h,opacity:{duration:0}}},M={height:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/3,delay:h.duration-h.duration/3}}};return a.jsx(U.motion.span,{initial:M,animate:M,exit:P,className:j.label,transition:h,children:n})})()})]})},Ms=({isExtended:e,alignment:t})=>({navigationRail:x("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:x("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:x(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),Cs=Q("navigationRail",Ms),Rs=({variant:e="standard",onItemSelected:t,children:n,className:r,selectedItem:s,extended:u,alignment:c="top",menu:l={closed:{icon:cs,label:"Open menu"},opened:{icon:be,label:"Close menu"}},style:d,onExtendedChange:o,transition:f,setSelectedItem:y})=>{const[h,p]=i.useState(null),[m,S]=i.useState(u);let w;s==0||s!=null?w=s:w=h;const I=y||p,b=i.useRef(null),v=j=>{t==null||t(j)};function B(j){const P=[];return i.Children.forEach(j,M=>{i.isValidElement(M)&&M.type===i.Fragment?P.push(...B(M.props.children)):P.push(M)}),P}const $=B(n),g=$.filter(j=>i.isValidElement(j)&&j.type===Ne),L=Cs({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:I,className:r,variant:e,extended:m,isExtended:m,alignment:c,menu:l,transition:f,onExtendedChange:o});f={duration:.3,...f};const A=i.useRef(!1);return A.current=!1,i.useEffect(()=>{o==null||o(m??!1)},[m]),a.jsxs("div",{style:{transition:f.duration+"s",...d},ref:b,className:L.navigationRail,children:[a.jsxs("div",{className:L.header,children:[a.jsx(ge,{onClick:()=>S(!m),label:m?l==null?void 0:l.opened.label:l==null?void 0:l.closed.label,className:L.menuIcon,icon:m?l.opened.icon:l==null?void 0:l.closed.icon}),g.length>0&&i.cloneElement(g[0],{transition:f,isExtended:m,className:"!shadow-none mx-5 "+g[0].props.className})]}),a.jsx("div",{className:L.segments,children:(()=>{let j=0;return $.map(P=>i.isValidElement(P)&&P.type===tn?i.cloneElement(P,{key:j,index:j++,variant:m?"horizontal":"vertical",selectedItem:w,setSelectedItem:I,onItemSelected:v,transition:f,extendedOnly:A.current,isExtended:m}):i.isValidElement(P)&&P.type===Ne?null:i.isValidElement(P)&&P.type===en?(A.current=!0,m?i.cloneElement(P,{}):null):P)})()}),a.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function Ds(e){return Se.defineConfig({variant:Se.Variants.Udixio,...e,plugins:[new Se.FontPlugin(e),new Ke.TailwindPlugin(e)]})}exports.AnchorPositioner=De;exports.AnimateOnScrollInit=Mn;exports.Button=pe;exports.Card=es;exports.Carousel=ts;exports.CarouselItem=Xt;exports.Checkbox=us;exports.Chip=Ie;exports.Chips=ps;exports.CustomScroll=et;exports.DatePicker=Qt;exports.Divider=Pe;exports.Fab=Ne;exports.FabMenu=ys;exports.Icon=ae;exports.IconButton=ge;exports.NavigationRail=Rs;exports.NavigationRailItem=tn;exports.NavigationRailSection=en;exports.ProgressIndicator=qt;exports.RippleEffect=Ge;exports.SideSheet=gs;exports.Slider=xs;exports.SmoothScroll=wn;exports.Snackbar=vs;exports.State=de;exports.Switch=ws;exports.SyncedFixedWrapper=rt;exports.Tab=Jt;exports.TabGroup=Ss;exports.TabPanel=Zt;exports.TabPanels=Ns;exports.Tabs=bs;exports.TextField=Ls;exports.ThemeProvider=Nn;exports.Tooltip=We;exports.animateOnScroll=Cn;exports.buttonStyle=Rn;exports.cardStyle=Dn;exports.carouselItemConfig=Ae;exports.carouselItemStyle=An;exports.carouselStyle=Fn;exports.checkboxStyle=$n;exports.chipStyle=Pn;exports.chipsStyle=Wn;exports.classNames=x;exports.classnames=Ze;exports.createUseClassNames=Q;exports.customScrollStyle=Qe;exports.defaultClassNames=ee;exports.defineConfig=Ds;exports.dividerStyle=Tn;exports.fabMenuStyle=Hn;exports.fabStyle=Bn;exports.getClassNames=Ee;exports.iconButtonStyle=On;exports.initAnimateOnScroll=Re;exports.normalize=xe;exports.progressIndicatorStyle=Vn;exports.sideSheetConfig=Fe;exports.sideSheetStyle=It;exports.sliderConfig=$e;exports.sliderStyle=Yn;exports.snackbarStyle=_n;exports.switchStyle=qn;exports.tabPanelStyle=Gn;exports.tabPanelsStyle=Kn;exports.tabStyle=Xn;exports.tabsStyle=Un;exports.textFieldStyle=Jn;exports.toolStyle=Zn;exports.useButtonStyle=it;exports.useCardStyle=at;exports.useCarouselItemStyle=ct;exports.useCarouselStyle=dt;exports.useCheckboxStyle=ht;exports.useChipStyle=pt;exports.useChipsStyle=xt;exports.useClassNames=cn;exports.useDividerStyle=vt;exports.useFabMenuStyle=Nt;exports.useFabStyle=bt;exports.useIconButtonStyle=kt;exports.useProgressIndicatorStyle=jt;exports.useSideSheetStyle=zn;exports.useSliderStyle=Mt;exports.useSnackbarStyle=Rt;exports.useStateStyle=st;exports.useSwitchStyle=At;exports.useTabPanelStyle=Ot;exports.useTabPanelsStyle=Bt;exports.useTabStyle=$t;exports.useTabsStyle=Wt;exports.useTextFieldStyle=zt;exports.useToolTipStyle=_t;exports.useTooltipTrigger=Gt;
10
+ `})]}),$&&a.jsx(Ie,{ref:B,className:"opacity-0",draggable:s,editable:!0,editing:!0,onChange:v=>{var k;if(v=v.replace(/(&nbsp;)+/g," ").trim(),console.log("Ghost chip onChange",v,!!v),v)I(v);else if(c.length>0){const F=h.current[c.length-1];(k=F==null?void 0:F.focus)==null||k.call(F)}},onEditCommit:()=>{},onBlur:()=>{o(!1)},onFocus:v=>{o(!0),v.stopPropagation()},children:" "})]})};function Jt({trigger:e=["hover","focus"],isOpen:t,defaultOpen:n=!1,onOpenChange:s,openDelay:r=400,closeDelay:u=150,id:c}={}){const l=i.useId(),d=c??`tooltip-${l}`,o=Array.isArray(e)?e:[e],f=typeof t=="boolean",[y,h]=i.useState(n?"hovered":"hidden"),[m,p]=i.useState(!1),b=i.useRef(null),w=i.useRef(null),I=i.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),w.current&&(clearTimeout(w.current),w.current=null)},[]);i.useEffect(()=>()=>I(),[I]);const S=i.useCallback(C=>{if(f){const R=C!=="hidden";s==null||s(R)}else{h(C);const R=C!=="hidden";s==null||s(R)}},[f,s]),g=f?t?"hovered":"hidden":y,B=g!=="hidden",$=C=>{switch(C){case"hidden":return 0;case"hovered":return 1;case"focused":return 2;case"clicked":return 3;default:return 0}},v=i.useCallback(C=>{I(),!($(C)<=$(g))&&(b.current=setTimeout(()=>{S(C)},r))},[I,r,g,S]),k=i.useCallback(C=>{I(),w.current=setTimeout(()=>{(!f&&$(y)<=$(C)||f)&&S("hidden")},u)},[I,u,y,f,S]),F=i.useCallback(()=>{o.includes("hover")&&v("hovered")},[o,v]),j=i.useCallback(()=>{o.includes("hover")&&(g==="focused"||g==="clicked"||m||k("hovered"))},[o,g,m,k]),P=i.useCallback(()=>{o.includes("focus")&&(I(),S("focused"))},[o,I,S]),M=i.useCallback(()=>{if(o.includes("focus")&&g!=="clicked"){if(o.includes("hover")&&m){S("hovered");return}k("focused")}},[o,g,m,k,S]),q=i.useCallback(()=>{o.includes("click")&&(I(),S(g==="clicked"?"hidden":"clicked"))},[o,g,I,S]),V=i.useCallback(C=>{C.key==="Escape"&&B&&(I(),S("hidden"),C.preventDefault())},[B,I,S]),Q=i.useCallback(()=>{p(!0),I()},[I]),W=i.useCallback(()=>{p(!1),o.includes("hover")&&g==="hovered"&&k("hovered")},[o,g,k]);return{triggerProps:{"aria-describedby":B?d:void 0,onMouseEnter:F,onMouseLeave:j,onFocus:P,onBlur:M,onClick:q,onKeyDown:V},tooltipProps:{id:d,role:"tooltip","aria-hidden":!B,onMouseEnter:Q,onMouseLeave:W},isOpen:B,state:g}}const We=({variant:e="plain",buttons:t,className:n,children:s,title:r,text:u,content:c,position:l,targetRef:d,ref:o,trigger:f=["hover","focus"],transition:y,openDelay:h=400,closeDelay:m=150,isOpen:p,defaultOpen:b=!1,onOpenChange:w,id:I,anchorRef:S,...g})=>{const $=l||(e==="rich"?"bottom-right":"bottom");if(y={duration:.3,...y},!s&&!d)throw new Error("Tooltip must have a child or a targetRef");t&&!Array.isArray(t)&&(t=[t]);const v=i.useRef(null),F=S||(d||v),{triggerProps:j,tooltipProps:P,isOpen:M}=Jt({trigger:f,isOpen:p,defaultOpen:b,onOpenChange:w,openDelay:h,closeDelay:m,id:I}),q=!d&&i.isValidElement(s)?i.cloneElement(s,{ref:v,...j,onMouseEnter:W=>{var C,R;j.onMouseEnter(),(R=(C=s.props)==null?void 0:C.onMouseEnter)==null||R.call(C,W)},onMouseLeave:W=>{var C,R;j.onMouseLeave(),(R=(C=s.props)==null?void 0:C.onMouseLeave)==null||R.call(C,W)},onFocus:W=>{var C,R;j.onFocus(),(R=(C=s.props)==null?void 0:C.onFocus)==null||R.call(C,W)},onBlur:W=>{var C,R;j.onBlur(),(R=(C=s.props)==null?void 0:C.onBlur)==null||R.call(C,W)},onClick:W=>{var C,R;j.onClick(),(R=(C=s.props)==null?void 0:C.onClick)==null||R.call(C,W)},onKeyDown:W=>{var C,R;j.onKeyDown(W),(R=(C=s.props)==null?void 0:C.onKeyDown)==null||R.call(C,W)}}):s;i.useEffect(()=>{if(!d)return;const W=d.current;if(!W)return;const C=()=>j.onMouseEnter(),R=()=>j.onMouseLeave(),H=()=>j.onFocus(),U=()=>j.onBlur(),G=()=>j.onClick(),te=E=>j.onKeyDown(E);return W.addEventListener("mouseenter",C),W.addEventListener("mouseleave",R),W.addEventListener("focus",H,!0),W.addEventListener("blur",U,!0),W.addEventListener("click",G),W.addEventListener("keydown",te),j["aria-describedby"]?W.setAttribute("aria-describedby",j["aria-describedby"]):W.removeAttribute("aria-describedby"),()=>{W.removeEventListener("mouseenter",C),W.removeEventListener("mouseleave",R),W.removeEventListener("focus",H,!0),W.removeEventListener("blur",U,!0),W.removeEventListener("click",G),W.removeEventListener("keydown",te)}},[d,j]);const V=qt({variant:e,buttons:t,className:n,title:r,text:u,position:$,trigger:f,targetRef:d,children:s}),Q={open:{opacity:1,height:"auto"},close:{opacity:0,height:16}};return a.jsxs(a.Fragment,{children:[q,a.jsx(X.AnimatePresence,{children:M&&a.jsx(De,{anchorRef:F,position:$,children:a.jsx(X.motion.div,{initial:"close",variants:Q,animate:"open",transition:{duration:y.duration},exit:"close",className:V.toolTip,...g,...P,children:a.jsx("div",{className:V.container,children:c?a.jsx("div",{className:V.content,children:c}):a.jsxs(a.Fragment,{children:[r&&a.jsx("div",{className:V.subHead,children:r}),u&&a.jsx("div",{className:V.supportingText,children:u}),t&&a.jsx("div",{className:V.actions,children:Array.isArray(t)&&t.map((W,C)=>a.jsx(me,{size:"small",variant:"text",...W},C))})]})})})})})]})},Ne=({className:e,label:t,variant:n="primary",size:s="medium",href:r,type:u,icon:c,extended:l=!1,ref:d,transition:o,children:f,...y})=>{if(f&&(t=f),!t)throw new Error("FAB component requires either a label prop or children content");const h=r?"a":"button",m=St({href:r,icon:c,extended:l,label:t,size:s,variant:n,className:e,transition:o,children:t});o={duration:.3,...o};const p=i.useRef(null),b=d||p,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...o,opacity:{duration:o.duration/2,delay:o.duration-o.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...o,marginLeft:{duration:o.duration/2,delay:o.duration-o.duration/2}}}};return a.jsxs(h,{...y,ref:b,href:r,"aria-label":l?void 0:t,className:m.fab,children:[a.jsx(We,{trigger:l?null:void 0,text:t,targetRef:b}),a.jsx(de,{style:{transition:o.duration+"s"},className:m.stateLayer,colorName:x({"on-primary":n=="primary","on-secondary":n=="secondary","on-tertiary":n=="tertiary","on-primary-container":n=="primaryContainer","on-secondary-container":n=="secondaryContainer","on-tertiary-container":n=="tertiaryContainer"}),stateClassName:"state-ripple-group-[fab]"}),a.jsx(ae,{icon:c,className:m.icon}),a.jsx(X.AnimatePresence,{children:l&&a.jsx(X.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:m.label,children:t})})]})},ve=({variant:e="standard",href:t,disabled:n=!1,title:s,label:r,onToggle:u,activated:c=!1,onClick:l,icon:d,size:o="medium",iconSelected:f,className:y,ref:h,width:m="default",shape:p="rounded",allowShapeTransformation:b=!0,transition:w,children:I,...S})=>{if(I&&(r=I),!r)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");!s&&s!==null&&(s=r);const[g,B]=i.useState(c),$=P=>{n&&P.preventDefault(),u?(B(!g),u(!g)):l&&l(P)};i.useEffect(()=>{B(c)},[c]);const v=t?"a":"button",k=Lt({transition:w,shape:p,allowShapeTransformation:b,width:m,href:t,activated:g,label:r,iconSelected:f,isActive:g,onToggle:u,disabled:n,icon:d,variant:e,className:y,size:o,children:r,...S}),F=i.useRef(null),j=h||F;return w={duration:.3,...w},a.jsxs(v,{disabled:n,href:t,style:{transition:w.duration+"s"},className:k.iconButton,"aria-label":r,...S,title:void 0,onClick:$,ref:j,children:[s!==null&&a.jsx(We,{targetRef:j,trigger:n?null:void 0,text:s}),a.jsx("div",{className:k.touchTarget}),a.jsx(de,{style:{transition:w.duration+"s"},className:k.stateLayer,colorName:x(e==="standard"&&{"on-surface-variant":!g,"on-primary":g},e==="filled"&&{"on-surface-variant":!g&&!!u,"on-primary":g||!u},e==="tonal"&&{"on-secondary":g&&!!u,"on-secondary-container":!g||!u},e==="outlined"&&{"inverse-on-surface":g&&!!u,"on-surface-variant":!g||!u}),stateClassName:"state-ripple-group-[icon-button]"}),d?a.jsx(ae,{icon:d,className:k.icon}):I]})},xs=({className:e,label:t,variant:n="primary",size:s="medium",href:r,icon:u,extended:c=!1,ref:l,transition:d,children:o,open:f,defaultOpen:y=!1,onOpenChange:h,...m})=>{d={duration:.3,ease:"easeInOut",...d};const p=i.useRef(null),b=l||p,w=typeof f=="boolean",[I,S]=i.useState(y),g=w?f:I,B=M=>{w||S(M),h==null||h(M)},$=i.Children.toArray(o).filter(M=>i.isValidElement(M)&&M.type===me),v=Et({href:r,icon:u,extended:c,label:t,size:s,variant:n,className:e,transition:d,children:t,open:g}),k=X.motion.create(Ne),F=X.motion.create(ve),j=M=>a.jsx(k,{icon:u,extended:c,label:t,variant:n+"Container",size:s,className:v.fab+" "+(e??""),"aria-expanded":g,onClick:()=>B(!0),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},...M}),P=i.useId();return a.jsxs("div",{className:v.fabMenu,ref:b,...m,children:[a.jsx(X.AnimatePresence,{children:g&&a.jsx("div",{className:v.actions,role:"menu","aria-hidden":!g,children:(()=>{const M=$.length;return $.map((q,V)=>{q.props;const Q=M-1-V,W=((d==null?void 0:d.delay)??0)+Q*.06,C={open:{overflow:"visible",opacity:1,width:"auto",transition:{...d,delay:W,opacity:{delay:(d==null?void 0:d.duration)/2+W}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...d,delay:W,opacity:{duration:(d==null?void 0:d.duration)/1.5}}}};return a.jsx(X.motion.div,{initial:"close",animate:"open",variants:C,transition:d,exit:"close",children:i.cloneElement(q,{key:V,shape:"rounded",variant:"filled",className:()=>({button:x("max-w-full overflow-hidden text-nowrap",{"px-0":!g,"bg-primary-container text-on-primary-container ":n==="primary","bg-secondary-container text-on-secondary-container":n==="secondary","bg-tertiary-container text-on-tertiary-container":n==="tertiary"}),stateLayer:x({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),j({className:"invisible pointer-events-none"}),a.jsxs("div",{className:"absolute right-0 top-0",children:[!g&&j({className:"",layout:!0,layoutId:"fab-menu"+P}),g&&a.jsx(a.Fragment,{children:a.jsx(F,{layout:!0,layoutId:"fab-menu"+P,variant:"filled",className:()=>({iconButton:x({"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:x({"[--default-color:var(--color-on-primary)]":n==="primary","[--default-color:var(--color-on-secondary)]":n==="secondary","[--default-color:var(--color-on-tertiary)]":n==="tertiary"})}),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},icon:ls,onClick:()=>B(!1),children:"Close"})})]})]})},vs=({className:e,valueFormatter:t,step:n=10,name:s,value:r=0,min:u=0,max:c=100,marks:l=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:o,...f})=>{const y=R=>{const H=m(),U=h();return R===1/0?100:R===-1/0?0:(R-H)/(U-H)*100},h=(R=!1)=>R?c:c==1/0?l[(l==null?void 0:l.length)-1].value:c,m=(R=!1)=>R?u:u==-1/0?l[0].value:u,p=R=>{const H=m(!1);return(h(!1)-H)*R/100+H},[b,w]=i.useState(!1),I=i.useRef(null),S=d||I,[g,B]=i.useState(r),[$,v]=i.useState(y(r)),[k,F]=i.useState(!1);i.useEffect(()=>{B(r),v(y(r))},[r]);const j=R=>{F(!0),w(!0),q(R)},P=()=>{F(!1),w(!1)};i.useEffect(()=>(k?(window.addEventListener("mouseup",P),window.addEventListener("mousemove",q),window.addEventListener("touchend",P),window.addEventListener("touchmove",q)):(window.removeEventListener("mouseup",P),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",P),window.removeEventListener("touchmove",q)),()=>{window.removeEventListener("mouseup",P),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",P),window.removeEventListener("touchmove",q)}),[k]);const M=Ct({className:e,isChanging:b,marks:l,max:c,min:u,name:s,step:n,value:g,valueFormatter:t,onChange:o}),q=R=>{const H=S==null?void 0:S.current;if(H){const U=H.getBoundingClientRect().left,te=((R.type==="touchmove"||R.type==="touchstart"?R.touches[0].clientX:R.clientX)-U)/H.offsetWidth*100;V({percent:te})}},V=({percent:R,value:H})=>{if(R){if(R>=100){B(h(!0)),v(100);return}if(R<=0){B(m(!0)),v(0);return}H=p(R),H==m()&&(H=m(!0)),H==h()&&(H=h(!0))}else if(H!=null){if(H>=h()){B(h(!0)),v(100);return}if(H<=m()){B(m(!0)),v(0);return}R=y(H)}else return;n!=null?H=Math.round((H-m())/n)*n+m():l&&(H=l.reduce((U,G,te)=>{let E=G.value===1/0?h():G.value===-1/0?m():G.value,L=U.value===1/0?h():U.value===-1/0?m():U.value;return E=Math.abs(E-H),L=Math.abs(L-H),E<L?G:U}).value),H>=h()&&(H=h(!0)),H<=m()&&(H=m(!0)),R=y(H),B(H),v(R),o&&o(H)},[Q,W]=i.useState(0);i.useEffect(()=>{const R=()=>{S.current&&W(S.current.offsetWidth)};return R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}},[]);const C=R=>{switch(R.key){case"ArrowRight":if(n)V({value:g+n});else if(l){const H=l.find(U=>U.value>g);H&&V({value:H.value})}break;case"ArrowLeft":if(n)V({value:g-n});else if(l){const H=l.slice(0).reverse().find((U,G,te)=>g===1/0?G===1:U.value<g);H&&V({value:H.value})}break;default:return}};return a.jsxs("div",{tabIndex:0,onKeyDown:C,role:"slider","aria-valuemin":m(!0),"aria-valuemax":h(!0),"aria-valuenow":g,"aria-valuetext":g.toString(),className:M.slider,onMouseDown:j,onClick:q,ref:S,onTouchStart:j,onDragStart:R=>R.preventDefault(),...f,children:[a.jsx("input",{type:"hidden",name:s,value:g}),a.jsx("div",{className:M.activeTrack,style:{flex:$/100}}),a.jsx("div",{className:M.handle,children:a.jsx(X.AnimatePresence,{children:b&&a.jsx(X.motion.div,{className:M.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(g):g})})}),a.jsx("div",{className:M.inactiveTrack,style:{flex:1-$/100}}),a.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:l&&l.map((R,H)=>{let U=null;const G=(b?9:10)/Q*100,te=y(R.value);return te<=$-G?U=!0:te>=$+G&&(U=!1),a.jsx("div",{className:x(M.dot,{"bg-primary-container":U!=null&&U,"bg-primary":U!=null&&!U}),style:{left:`${y(R.value)}%`}},H)})})]})},gs=({variant:e="standard",className:t,children:n,title:s,position:r="right",extended:u,divider:c,onExtendedChange:l,closeIcon:d=we,transition:o,...f})=>{o={duration:.3,...o};const[y,h]=i.useState(u??!0),m=Mt({transition:o,title:s,position:r,closeIcon:d,className:t,children:n,onExtendedChange:l,divider:c,isExtended:y,extended:y,variant:e});i.useEffect(()=>{l==null||l(y??!1)},[y]),i.useEffect(()=>{u!=null&&h(u)},[u]);const p={close:{width:0},open:{width:"auto"}},b=()=>a.jsxs(a.Fragment,{children:[a.jsx(X.AnimatePresence,{children:e=="modal"&&y&&a.jsx(X.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:o,onClick:()=>h(!1),className:m.overlay})}),a.jsx(X.AnimatePresence,{children:y&&a.jsxs("div",{...f,className:m.sideSheet,style:{transition:o.duration+"s"},children:[a.jsxs(X.motion.div,{variants:p,initial:u===!1?"open":"close",animate:"open",exit:"close",className:m.container,children:[a.jsxs("div",{className:m.header,children:[s&&a.jsx("p",{className:m.title,children:s}),a.jsx(ve,{size:"small",label:"close",icon:d,onClick:()=>h(!1),className:m.closeButton})]}),a.jsx("div",{className:m.content,style:{transition:o.duration+"s"},children:n})]}),(c==null&&e=="standard"?!0:c)&&a.jsx(Pe,{className:m.divider,orientation:"vertical"})]})})]});return e=="modal"?Me.createPortal(b(),document.body):b()},ws=({message:e,className:t,duration:n,closeIcon:s=we,onClose:r,...u})=>{const[c,l]=i.useState(!0),d=Dt({className:t,closeIcon:s,duration:n,isVisible:c,onClose:r,message:e});i.useEffect(()=>{n&&setTimeout(()=>{o()},n)},[n]);const o=()=>{l(!1),r==null||r()};return a.jsx(X.AnimatePresence,{children:c&&a.jsx(X.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:d.snackbar,...u,children:a.jsxs("div",{className:d.container,children:[a.jsx("p",{className:d.supportingText,children:e}),a.jsx(ve,{onClick:()=>o(),className:d.icon,icon:s,label:"close the snackbar"})]})})})},bs=({selected:e=!1,className:t,activeIcon:n,disabled:s=!1,inactiveIcon:r,onChange:u,onClick:c,onKeyDown:l,ref:d,...o})=>{const[f,y]=i.useState(e);i.useEffect(()=>{y(e)},[e]);const h=S=>{s||(p(),c&&c(S))},m=S=>{s||((S.key===" "||S.key==="Enter")&&(S.preventDefault(),p()),l&&l(S))},p=()=>{y(!f),u==null||u(!f)},b=Ft({className:t,isSelected:f,activeIcon:n,inactiveIcon:r,disabled:s,selected:f,onChange:u}),w=i.useRef(null),I=d||w;return a.jsxs(X.motion.div,{role:"switch","aria-checked":f,tabIndex:s?-1:0,onKeyDown:m,onClick:h,ref:I,className:b.switch,...o,children:[a.jsx("input",{type:"hidden",value:f?"1":"0"}),a.jsxs(X.motion.div,{layout:!0,style:{translate:f?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:b.handleContainer,children:[a.jsx("div",{className:b.handle,children:(f?n:r)&&a.jsx(ae,{className:b.icon,icon:f?n:r})}),a.jsx("div",{className:b.handleStateLayer})]})]})},Zt=({className:e,onClick:t,label:n,variant:s="primary",href:r,icon:u,selectedTab:c,setSelectedTab:l,tabsId:d,index:o,onTabSelected:f,scrollable:y=!1,selected:h=!1,children:m,ref:p,...b})=>{const w=i.useRef(null),I=p||w,S=n??(typeof m=="string"?m:void 0),[g,B]=i.useState(h);i.useEffect(()=>{h&&c==null?B(!0):B(c==o&&o!=null)},[c]),i.useEffect(()=>{c==o&&f&&f({ref:I,index:o||0,label:S,icon:u})},[c]);const $=r?"a":"button",v=F=>{l&&l(o??null),t&&t(F)},k=Pt({className:e,onTabSelected:f,scrollable:y,selectedTab:c,index:o,tabsId:d,selected:g,variant:s,icon:u,label:S,isSelected:g,setSelectedTab:l,href:r});return a.jsxs($,{...b,role:"tab","aria-selected":g,ref:I,href:r,className:k.tab,onClick:v,...b,children:[a.jsx(de,{style:{transition:.3+"s"},className:k.stateLayer,colorName:s==="primary"&&g?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),a.jsxs("span",{className:k.content,children:[u&&a.jsx(ae,{icon:u,className:k.icon}),a.jsx("span",{className:k.label,children:S}),g&&a.jsx(X.motion.span,{layoutId:`underline-${d}`,className:k.underline,transition:{duration:.3}})]})]})},Te=i.createContext(null),Ss=({variant:e="primary",onTabSelected:t,children:n,className:s,selectedTab:r,setSelectedTab:u,scrollable:c=!1})=>{const l=i.useContext(Te),[d,o]=i.useState(null);let f;r===0||r!=null?f=r:l?f=l.selectedTab:f=d;const y=u??(l==null?void 0:l.setSelectedTab)??o,h=i.Children.toArray(n).filter(I=>i.isValidElement(I)&&I.type===Zt),m=i.useRef(null),p=I=>{if(t==null||t(I),c){const S=m.current,g=I.ref.current;if(S&&g){const B=g.offsetLeft+g.offsetWidth/2-S.offsetWidth/2;S.scrollTo({left:B,behavior:"smooth"})}}},b=i.useMemo(()=>(l==null?void 0:l.tabsId)??Gt(),[l==null?void 0:l.tabsId]),w=Tt({children:n,onTabSelected:t,scrollable:c,selectedTab:f,setSelectedTab:y,className:s,variant:e});return a.jsx("div",{ref:m,role:"tablist",className:w.tabs,children:h.map((I,S)=>i.cloneElement(I,{key:S,index:S,variant:e,selectedTab:f,setSelectedTab:y,tabsId:b,onTabSelected:p,scrollable:c}))})},Ns=({children:e,selectedTab:t,setSelectedTab:n,defaultTab:s=0})=>{const[r,u]=i.useState(s),c=i.useRef(null),l=t!==void 0?t:r,d=n??u,o=c.current!==null&&l!==null?l>c.current?1:-1:0;l!==c.current&&(c.current=l);const f=i.useId(),y=i.useMemo(()=>({selectedTab:l,setSelectedTab:d,previousTab:c.current,direction:o,tabsId:f}),[l,d,o,f]);return a.jsx(Te.Provider,{value:y,children:e})},Qt=({children:e,className:t,isSelected:n=!1})=>{const s=Vt({children:e,className:t,isSelected:n});return a.jsx("div",{className:s.tabPanel,children:e})},Es=({children:e,className:t})=>{const n=i.useContext(Te);if(!n)return console.warn("TabPanels must be used within a TabGroup"),null;const{selectedTab:s,direction:r,tabsId:u}=n,c=i.Children.toArray(e).filter(d=>i.isValidElement(d)&&d.type===Qt),l=Ht({children:e,className:t});return a.jsx("div",{className:l.tabPanels,children:a.jsx(X.AnimatePresence,{initial:!1,custom:r,mode:"popLayout",children:c.map((d,o)=>s===o&&a.jsx(X.motion.div,{custom:r,variants:{enter:f=>({x:f*100+"%",opacity:1}),center:{x:0,opacity:1},exit:f=>({x:f*-100+"%",opacity:1})},initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",stiffness:400,damping:40},role:"tabpanel","aria-labelledby":`tab-${u}-${o}`,children:i.cloneElement(d,{isSelected:!0})},o))})})},ks=({hasSelected:e})=>({datePicker:x("inline-flex flex-col bg-surface-container-high rounded-[28px] p-3 select-none","min-w-[320px]"),header:x("flex items-center justify-between h-12 mb-2 px-2"),monthNav:x("flex items-center justify-center w-10 h-10 rounded-full text-on-surface-variant hover:bg-on-surface-variant/8 transition-colors cursor-pointer"),monthLabel:x("text-label-large text-on-surface font-bold capitalize"),weekDays:x("grid grid-cols-7 mb-2"),weekDay:x("h-10 flex items-center justify-center text-body-small text-on-surface-variant"),daysGrid:x("grid grid-cols-7 row-auto gap-y-2"),dayCell:x("flex items-center justify-center h-10 p-0 relative"),dayButton:x("w-10 h-10 rounded-full flex items-center justify-center text-body-large transition-all duration-200 relative overflow-hidden z-10 outline-none")}),Ls=ee("datePicker",ks),en=({value:e,defaultValue:t,onChange:n,minDate:s,maxDate:r,shouldDisableDate:u,locale:c="default",weekStartDay:l=0,className:d,style:o,mode:f="single",...y})=>{const[h,m]=i.useState(()=>{const E=N=>N instanceof Date?N:Array.isArray(N)&&N[0]?N[0]:null,L=E(e)||E(t)||new Date;return new Date(L.getFullYear(),L.getMonth(),1)}),[p,b]=i.useState(0),[w,I]=i.useState("day"),S=e!==void 0,[g,B]=i.useState(t||null),$=S?e||null:g,v=(E,L)=>new Date(E,L+1,0).getDate(),k=i.useMemo(()=>{const E=h.getFullYear(),L=h.getMonth(),N=v(E,L),O=(new Date(E,L,1).getDay()-l+7)%7,_=[],z=v(E,L-1);for(let Y=O-1;Y>=0;Y--)_.push({date:new Date(E,L-1,z-Y),isCurrentMonth:!1});for(let Y=1;Y<=N;Y++)_.push({date:new Date(E,L,Y),isCurrentMonth:!0});const D=42-_.length;for(let Y=1;Y<=D;Y++)_.push({date:new Date(E,L+1,Y),isCurrentMonth:!1});return _},[h,l]),F=i.useMemo(()=>{const E=new Date().getFullYear(),L=E-100,N=E+100,A=[];for(let O=L;O<=N;O++)A.push(O);return A},[]),j=i.useRef(null);i.useEffect(()=>{if(w==="year"&&j.current){const E=j.current.querySelector('[data-selected="true"]');E&&E.scrollIntoView({block:"center"})}},[w]);const P=i.useMemo(()=>new Intl.DateTimeFormat(c,{month:"long",year:"numeric"}),[c]),M=i.useMemo(()=>new Intl.DateTimeFormat(c,{weekday:"narrow"}),[c]),q=i.useMemo(()=>{const E=new Date(2023,0,1+l);return Array.from({length:7}).map((L,N)=>{const A=new Date(E);return A.setDate(E.getDate()+N),M.format(A).charAt(0).toUpperCase()})},[M,l]),V=()=>{b(-1),m(E=>new Date(E.getFullYear(),E.getMonth()-1,1))},Q=()=>{b(1),m(E=>new Date(E.getFullYear(),E.getMonth()+1,1))},W=E=>{m(L=>new Date(E,L.getMonth(),1)),I("day")},C=(E,L)=>E?E.getDate()===L.getDate()&&E.getMonth()===L.getMonth()&&E.getFullYear()===L.getFullYear():!1,R=E=>C(new Date,E),H=E=>{let L=E;if(f==="single")L=E;else{const N=$,[A,O]=Array.isArray(N)?N:[null,null];!A||A&&O?L=[E,null]:E<A?L=[E,A]:L=[A,E]}S||B(L),n&&n(L)},U=E=>{if(f==="single")return{isSelected:C($,E),isStart:!1,isEnd:!1,isInRange:!1};const L=Array.isArray($)?$:[$,null],[N,A]=L,O=C(N,E),_=C(A,E);let z=!1;if(N&&A){const Z=new Date(N.getFullYear(),N.getMonth(),N.getDate()).getTime(),D=new Date(A.getFullYear(),A.getMonth(),A.getDate()).getTime(),Y=new Date(E.getFullYear(),E.getMonth(),E.getDate()).getTime();z=Y>Z&&Y<D}return{isSelected:O||_,isStart:O,isEnd:_,isInRange:z}},G=Ls({hasSelected:!!$}),te={enter:E=>({x:E>0?"100%":"-100%",opacity:0}),center:{x:0,opacity:1},exit:E=>({x:E<0?"100%":"-100%",opacity:0})};return a.jsxs("div",{className:x(G.datePicker,d),style:o,...y,children:[a.jsxs("div",{className:G.header,children:[a.jsxs(me,{variant:"text",disableTextMargins:!0,size:"small",onClick:()=>I(E=>E==="day"?"year":"day"),className:"text-label-large font-bold capitalize text-on-surface hover:bg-surface-container-highest",children:[a.jsx("span",{className:"mr-2",children:w==="day"?P.format(h):h.getFullYear()}),a.jsx(ae,{icon:as,className:x("w-3 h-3 transition-transform duration-200 inline",w==="year"&&"rotate-180")})]}),w==="day"&&a.jsxs("div",{className:"flex items-center",children:[a.jsx(ve,{size:"xSmall",allowShapeTransformation:!1,onClick:V,icon:cs,label:"Previous month",title:null}),a.jsx(ve,{size:"xSmall",allowShapeTransformation:!1,onClick:Q,icon:os,label:"Next month",title:null})]})]}),w==="year"?a.jsx("div",{className:"h-[280px] overflow-y-auto grid grid-cols-3 gap-2 p-2 scrollbar-hide",ref:j,children:F.map(E=>a.jsx(me,{size:"small",variant:E===h.getFullYear()?"filled":"text",onClick:()=>W(E),"data-selected":E===h.getFullYear(),className:x("w-full",{"text-on-surface":E!==h.getFullYear()}),label:E.toString(),children:E},E))}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:G.weekDays,children:q.map((E,L)=>a.jsx("div",{className:G.weekDay,children:E},L))}),a.jsx("div",{className:"overflow-hidden relative min-h-[240px]",children:a.jsx(X.AnimatePresence,{mode:"popLayout",initial:!1,custom:p,children:a.jsx(X.motion.div,{custom:p,variants:te,initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",bounce:0,duration:.3},className:G.daysGrid,children:k.map((E,L)=>{if(!E.isCurrentMonth)return a.jsx("div",{className:G.dayCell},L);const{isSelected:N,isStart:A,isEnd:O,isInRange:_}=U(E.date),z=R(E.date),Z=s&&E.date<s||r&&E.date>r||(u==null?void 0:u(E.date));return a.jsx("div",{className:x(G.dayCell,_&&"bg-primary/20",A&&($==null?void 0:$[1])&&"bg-gradient-to-r from-transparent to-primary/20",O&&($==null?void 0:$[0])&&"bg-gradient-to-l from-transparent to-primary/20"),children:a.jsx(me,{className:()=>({button:x("aspect-square h-[40px] p-0",{"text-on-surface":!N&&!z,"opacity-50":Z}),stateLayer:x({"!bg-transparent":Z})}),size:"small",allowShapeTransformation:!1,variant:x({filled:N,outlined:z,text:!N&&!z}),label:E.date.getDate().toString(),onClick:()=>H(E.date),disabled:Z,children:E.date.getDate().toString()})},L)})},h.toISOString())})})]})]})},js=({variant:e="filled",autoFocus:t,disabled:n=!1,errorText:s,placeholder:r,suffix:u,name:c,label:l,className:d,supportingText:o,trailingIcon:f,leadingIcon:y,type:h="text",multiline:m=!1,autoComplete:p="on",onChange:b,value:w,defaultValue:I,showSupportingText:S,id:g,style:B,ref:$,onFocus:v,onBlur:k,...F})=>{const j=i.useId(),P=g||j,M=`${P}-helper`,q=w!==void 0,[V,Q]=i.useState(I??""),W=q?w:V,[C,R]=i.useState(!1),[H,U]=i.useState(!!(s!=null&&s.length)),G=i.useRef(null),te=$||G,E=i.useRef(null),L=i.useRef(null),N=i.useRef(null),A=S??(!!(s!=null&&s.length)||!!(o!=null&&o.length));i.useEffect(()=>{U(!!(s!=null&&s.length))},[s]);const O=()=>{te.current&&!C&&te.current.focus()};i.useEffect(()=>{if(!t||n)return;const le=window.requestAnimationFrame(()=>{O()});return()=>window.cancelAnimationFrame(le)},[t,n,te]),i.useEffect(()=>{C?(U(!1),v==null||v()):(s!=null&&s.length&&U(!0),k==null||k())},[C]);const _=le=>{const fe=le.target.value;q||Q(fe),U(!1),b&&b(le)},z=h==="date",[Z,D]=i.useState(!1),[Y,se]=i.useState(null),ie=i.useMemo(()=>{const le=String(W);if(!le)return null;const[fe,Be,He]=le.split("-").map(Number);return fe&&Be&&He?new Date(fe,Be-1,He):null},[W]),ge=()=>{n||(se(ie),D(!0))};i.useEffect(()=>{R(!!Z)},[Z]);const ue=()=>{const le=Y?Y.toLocaleDateString("en-CA"):"";q||Q(le),b&&b({target:{value:le,name:c,type:h}}),D(!1)},ce=z&&!f?rs:f,K=z?"[&::-webkit-calendar-picker-indicator]:hidden cursor-pointer":"",J=Yt({showSupportingText:A,isFocused:C,showErrorIcon:H,disabled:n,name:c,label:l,autoComplete:p,className:d,onChange:b,placeholder:r,supportingText:o,type:h,leadingIcon:y,trailingIcon:ce,variant:e,errorText:s,value:String(W),suffix:u,multiline:m}),re=m?an:"input",pe=m?{}:{type:h},ye=C||typeof W=="string"&&W.length>0||h=="date",be=ye&&e==="outlined",sn=!be;return a.jsxs("div",{ref:E,className:J.textField,style:B,children:[a.jsxs("fieldset",{onClick:O,className:J.content,role:"presentation",children:[a.jsx("div",{className:J.stateLayer}),y&&a.jsx("div",{className:J.leadingIcon,children:i.isValidElement(y)?y:a.jsx(ae,{className:"w-5 h-5",icon:y})}),a.jsx(X.motion.legend,{"aria-hidden":"true",variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:be?"visible":"hidden",animate:be?"visible":"hidden",className:"max-w-full ml-2 px-2 text-body-small h-0 overflow-hidden whitespace-nowrap",transition:{duration:.2},children:a.jsx("span",{className:"transform inline-flex -translate-y-1/2 opacity-0",children:l})}),a.jsxs("div",{className:"flex-1 relative",children:[sn&&a.jsx(X.motion.label,{htmlFor:P,className:x("absolute left-4 transition-all duration-300 pointer-events-none",{"text-body-small top-2":e=="filled"&&ye,"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&ye)}),transition:{duration:.3},layoutId:e==="outlined"?`${P}-label`:void 0,children:a.jsx("span",{className:J.label,children:l})}),be&&a.jsx(X.motion.label,{htmlFor:P,className:x("absolute left-2 -top-3 px-1 text-body-small z-10",J.label),layoutId:`${P}-label`,transition:{duration:.3},children:l}),a.jsx(re,{...F,ref:te,value:W,onChange:_,className:x(J.input,K),id:P,name:c,placeholder:C?r??void 0:"",onFocus:()=>R(!0),onBlur:()=>R(!1),disabled:n,autoComplete:p,"aria-invalid":!!(s!=null&&s.length),"aria-describedby":A?M:void 0,autoFocus:t,...pe})]}),a.jsx("div",{className:J.activeIndicator}),!H&&a.jsxs(a.Fragment,{children:[ce&&a.jsx("div",{ref:z?L:void 0,onClick:le=>{le.stopPropagation(),z&&ge()},className:x(J.trailingIcon,z&&"cursor-pointer"),children:a.jsx("div",{className:"flex items-center justify-center w-full h-full",children:i.isValidElement(ce)?ce:a.jsx(ae,{className:"h-5",icon:ce})})}),!ce&&u&&a.jsx("span",{className:J.suffix,children:u})]}),H&&a.jsx("div",{className:x(J.trailingIcon,{" absolute right-0":!ce}),children:a.jsx(ae,{className:"h-5 text-error",icon:is})})]}),A&&a.jsx("p",{className:J.supportingText,id:M,children:s!=null&&s.length?s:o!=null&&o.length?o:" "}),z&&Z&&a.jsx(a.Fragment,{children:a.jsx(De,{onBlur:le=>{var fe;N.current&&!((fe=N.current)!=null&&fe.contains(le.relatedTarget))&&D(!1)},anchorRef:E,position:"bottom",children:a.jsxs("div",{ref:N,className:"z-50 shadow-xl rounded-[28px] bg-surface-container-high overflow-hidden",children:[a.jsx(en,{className:"",value:Y,onChange:se}),a.jsxs("div",{className:"flex justify-end gap-2 p-4 pt-0",children:[a.jsx(me,{variant:"text",size:"small",onClick:()=>D(!1),children:"Cancel"}),a.jsx(me,{variant:"filled",size:"small",onClick:ue,children:"OK"})]})]})})})]})},Is=({isSelected:e,icon:t,label:n,variant:s})=>({navigationRailItem:x(" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":s=="vertical","gap-0 h-[66px]":s=="horizontal"}),container:x(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":s=="horizontal","gap-0 ":s=="vertical","p-4":!n},n&&["px-4",{"py-1 ":s=="vertical","py-4 ":s=="horizontal"}]),stateLayer:x("rounded-full"),icon:x("size-6 flex"),label:x("w-fit mx-auto text-nowrap",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})}),Ms=ee("navigationRailItem",Is),tn=({label:e})=>a.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:a.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),nn=({className:e,onClick:t,label:n,variant:s="vertical",href:r,icon:u,selectedItem:c,setSelectedItem:l,index:d,onItemSelected:o,selected:f=!1,ref:y,transition:h,isExtended:m,iconSelected:p,style:b,extendedOnly:w,children:I,...S})=>{I&&(n=I);const g=i.useRef(null),B=y||g,[$,v]=i.useState(f);i.useEffect(()=>{f&&c==null?v(!0):v(c==d&&d!=null)},[c]),i.useEffect(()=>{c==d&&o&&o({ref:B,index:d||0,label:n,icon:u})},[c]);const k=r?"a":"button",F=P=>{l&&l(d??null),t&&t(P)},j=Ms({isExtended:m,extendedOnly:w,className:e,onItemSelected:o,selectedItem:c,index:d,transition:h,selected:$,variant:s,icon:u,label:n,isSelected:$,setSelectedItem:l,href:r,children:n,iconSelected:p});return h={duration:.3,...h},w&&!m?null:a.jsxs(k,{...S,role:"tab","aria-selected":$,ref:B,href:r,className:j.navigationRailItem,onClick:F,style:{transition:h.duration+"s",...b},children:[a.jsxs(X.motion.div,{style:{transition:s=="horizontal"?h.duration+`s, gap ${h.duration/2}s ${h.duration-h.duration/2}s`:h.duration+`s, gap ${h.duration/3}s ${h.duration-h.duration/3}s`},transition:h,className:j.container,children:[a.jsx(de,{style:{transition:h.duration+"s"},className:j.stateLayer,colorName:x({"on-surface":!$,"on-secondary-container":$}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),u&&a.jsx(ae,{icon:$?p:u,className:j.icon}),a.jsx(X.AnimatePresence,{children:s=="horizontal"&&(()=>{const P={width:0,opacity:0,transition:{...h}},M={width:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/2,delay:h.duration-h.duration/2}}};return a.jsx(X.motion.span,{initial:P,animate:M,exit:P,className:j.label,children:n})})()})]}),a.jsx(X.AnimatePresence,{children:s=="vertical"&&(()=>{const P={height:0,opacity:0,transition:{...h,opacity:{duration:0}}},M={height:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/3,delay:h.duration-h.duration/3}}};return a.jsx(X.motion.span,{initial:M,animate:M,exit:P,className:j.label,transition:h,children:n})})()})]})},Cs=({isExtended:e,alignment:t})=>({navigationRail:x("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:x("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:x(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),Rs=ee("navigationRail",Cs),Ds=({variant:e="standard",onItemSelected:t,children:n,className:s,selectedItem:r,extended:u,alignment:c="top",menu:l={closed:{icon:us,label:"Open menu"},opened:{icon:we,label:"Close menu"}},style:d,onExtendedChange:o,transition:f,setSelectedItem:y})=>{const[h,m]=i.useState(null),[p,b]=i.useState(u);let w;r==0||r!=null?w=r:w=h;const I=y||m,S=i.useRef(null),g=j=>{t==null||t(j)};function B(j){const P=[];return i.Children.forEach(j,M=>{i.isValidElement(M)&&M.type===i.Fragment?P.push(...B(M.props.children)):P.push(M)}),P}const $=B(n),v=$.filter(j=>i.isValidElement(j)&&j.type===Ne),k=Rs({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:I,className:s,variant:e,extended:p,isExtended:p,alignment:c,menu:l,transition:f,onExtendedChange:o});f={duration:.3,...f};const F=i.useRef(!1);return F.current=!1,i.useEffect(()=>{o==null||o(p??!1)},[p]),a.jsxs("div",{style:{transition:f.duration+"s",...d},ref:S,className:k.navigationRail,children:[a.jsxs("div",{className:k.header,children:[a.jsx(ve,{onClick:()=>b(!p),label:p?l==null?void 0:l.opened.label:l==null?void 0:l.closed.label,className:k.menuIcon,icon:p?l.opened.icon:l==null?void 0:l.closed.icon}),v.length>0&&i.cloneElement(v[0],{transition:f,isExtended:p,className:"!shadow-none mx-5 "+v[0].props.className})]}),a.jsx("div",{className:k.segments,children:(()=>{let j=0;return $.map(P=>i.isValidElement(P)&&P.type===nn?i.cloneElement(P,{key:j,index:j++,variant:p?"horizontal":"vertical",selectedItem:w,setSelectedItem:I,onItemSelected:g,transition:f,extendedOnly:F.current,isExtended:p}):i.isValidElement(P)&&P.type===Ne?null:i.isValidElement(P)&&P.type===tn?(F.current=!0,p?i.cloneElement(P,{}):null):P)})()}),a.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function As(e){return Se.defineConfig({variant:Se.Variants.Udixio,...e,plugins:[new Se.FontPlugin(e),new Ge.TailwindPlugin(e)]})}exports.AnchorPositioner=De;exports.AnimateOnScrollInit=Cn;exports.Button=me;exports.Card=ts;exports.Carousel=ns;exports.CarouselItem=Ut;exports.Checkbox=ds;exports.Chip=Ie;exports.Chips=ys;exports.CustomScroll=tt;exports.DatePicker=en;exports.Divider=Pe;exports.Fab=Ne;exports.FabMenu=xs;exports.Icon=ae;exports.IconButton=ve;exports.NavigationRail=Ds;exports.NavigationRailItem=nn;exports.NavigationRailSection=tn;exports.ProgressIndicator=Xt;exports.RippleEffect=Je;exports.SideSheet=gs;exports.Slider=vs;exports.SmoothScroll=bn;exports.Snackbar=ws;exports.State=de;exports.Switch=bs;exports.SyncedFixedWrapper=ot;exports.Tab=Zt;exports.TabGroup=Ns;exports.TabPanel=Qt;exports.TabPanels=Es;exports.Tabs=Ss;exports.TextField=js;exports.ThemeProvider=En;exports.Tooltip=We;exports.animateOnScroll=Rn;exports.buttonStyle=Dn;exports.cardStyle=An;exports.carouselItemConfig=Ae;exports.carouselItemStyle=Fn;exports.carouselStyle=$n;exports.checkboxStyle=Pn;exports.chipStyle=Wn;exports.chipsStyle=Tn;exports.classNames=x;exports.classnames=Qe;exports.createUseClassNames=ee;exports.customScrollStyle=et;exports.defaultClassNames=ne;exports.defineConfig=As;exports.dividerStyle=Bn;exports.fabMenuStyle=On;exports.fabStyle=Hn;exports.getClassNames=Ee;exports.iconButtonStyle=Vn;exports.initAnimateOnScroll=Re;exports.normalize=xe;exports.progressIndicatorStyle=zn;exports.sideSheetConfig=Fe;exports.sideSheetStyle=Mt;exports.sliderConfig=$e;exports.sliderStyle=_n;exports.snackbarStyle=qn;exports.switchStyle=Xn;exports.tabPanelStyle=Jn;exports.tabPanelsStyle=Gn;exports.tabStyle=Un;exports.tabsStyle=Kn;exports.textFieldStyle=Zn;exports.toolStyle=Qn;exports.useButtonStyle=lt;exports.useCardStyle=ct;exports.useCarouselItemStyle=ut;exports.useCarouselStyle=ft;exports.useCheckboxStyle=mt;exports.useChipStyle=yt;exports.useChipsStyle=vt;exports.useClassNames=un;exports.useDividerStyle=wt;exports.useFabMenuStyle=Et;exports.useFabStyle=St;exports.useIconButtonStyle=Lt;exports.useProgressIndicatorStyle=It;exports.useSideSheetStyle=Yn;exports.useSliderStyle=Ct;exports.useSnackbarStyle=Dt;exports.useStateStyle=rt;exports.useSwitchStyle=Ft;exports.useTabPanelStyle=Vt;exports.useTabPanelsStyle=Ht;exports.useTabStyle=Pt;exports.useTabsStyle=Tt;exports.useTextFieldStyle=Yt;exports.useToolTipStyle=qt;exports.useTooltipTrigger=Jt;