@udixio/ui-react 2.10.3 → 2.10.5
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/CHANGELOG.md +18 -0
- package/dist/index.cjs +5 -5
- package/dist/index.js +1632 -1634
- package/dist/lib/components/ContextMenu.d.ts +1 -1
- package/dist/lib/components/ContextMenu.d.ts.map +1 -1
- package/dist/lib/components/MenuItem.d.ts +1 -1
- package/dist/lib/components/MenuItem.d.ts.map +1 -1
- package/dist/lib/components/TextField.d.ts.map +1 -1
- package/dist/lib/interfaces/index.d.ts +2 -0
- package/dist/lib/interfaces/index.d.ts.map +1 -1
- package/dist/lib/interfaces/menu-item.interface.d.ts +0 -1
- package/dist/lib/interfaces/menu-item.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/menu.interface.d.ts +0 -1
- package/dist/lib/interfaces/menu.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/text-field.interface.d.ts +2 -5
- package/dist/lib/interfaces/text-field.interface.d.ts.map +1 -1
- package/dist/lib/styles/menu-group.style.d.ts +2 -2
- package/dist/lib/styles/menu-item.style.d.ts +0 -6
- package/dist/lib/styles/menu-item.style.d.ts.map +1 -1
- package/dist/lib/styles/menu.style.d.ts +0 -1
- package/dist/lib/styles/menu.style.d.ts.map +1 -1
- package/dist/lib/styles/text-field.style.d.ts +2 -10
- package/dist/lib/styles/text-field.style.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/lib/components/ContextMenu.tsx +2 -4
- package/src/lib/components/MenuItem.tsx +2 -2
- package/src/lib/components/TextField.tsx +55 -37
- package/src/lib/interfaces/index.ts +2 -0
- package/src/lib/interfaces/menu-item.interface.ts +0 -1
- package/src/lib/interfaces/menu.interface.ts +0 -1
- package/src/lib/interfaces/text-field.interface.ts +7 -8
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";var Rn=Object.defineProperty;var Dn=(e,t,n)=>t in e?Rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var O=(e,t,n)=>Dn(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("react"),Oe=require("react-dom"),X=require("motion/react"),dt=require("clsx"),An=require("tailwind-merge"),Re=require("@udixio/theme"),ft=require("@udixio/tailwind"),Fn=require("react-textarea-autosize"),ht=({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]=o.useState(!0),[c,u]=o.useState(!1),[a,d]=o.useState({x:50,y:50});o.useEffect(()=>{c&&(r(!0),r(!1))},[c]),o.useEffect(()=>{const x=t==null?void 0:t.current;if(x)return x.addEventListener("mousedown",i),x.addEventListener("mouseup",p),x.addEventListener("mouseleave",f),()=>{x.removeEventListener("mousedown",i),x.removeEventListener("mouseup",p),x.removeEventListener("mouseleave",f)}},[t]);const i=x=>{const S=t==null?void 0:t.current,w=S.getBoundingClientRect();u(!0),d({x:(x.clientX-w.left)/S.clientWidth*100,y:(x.clientY-w.top)/S.clientHeight*100})},f=x=>{u(!1)},p=x=>{u(!1)},h=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,m={position:"absolute",inset:0,width:"100%",height:"100%","--x":a.x+"%","--y":a.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${h} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return l.jsx(X.AnimatePresence,{mode:"wait",children:(c||!c&&!s)&&l.jsx(X.motion.div,{style:m,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},mt=An.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"]}}}),y=(...e)=>mt(dt.clsx(e)),pt=(...e)=>mt(dt.clsx(e));function Pn(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 Ae=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 c=s(e.states);Object.entries(c).map(u=>{const[a,d]=u;(t[a]??(t[a]=[])).push(d)})}});const n=t;return Object.entries(t).map(s=>{let[r,c]=s;c=c.reverse(),r==e.default&&c.unshift("relative"),c.unshift(Pn(r)),n[r]=pt(...c)}),n},re=(e,t)=>n=>Ae({classNameList:[n.className,t],default:e,states:n}),ee=(e,t)=>n=>o.useMemo(()=>Ae({classNameList:[n.className,t],default:e,states:n}),[n]);function $n(e,t,n){return o.useMemo(()=>Ae({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const yt=re("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:y("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:y("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function Wn(e,t){let n=0,s=null,r=null;const c=(u,a)=>{n=Date.now(),t(u,a)};return(u,a)=>{const d=Date.now(),i=e-(d-n);i<=0?(s&&(clearTimeout(s),s=null),c(u,a)):(r={v:u,o:a},s||(s=setTimeout(()=>{s=null;const f=r;r=null,f&&c(f.v,f.o)},i)))}}const xt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:s,className:r,draggable:c=!1,throttleDuration:u=75,scroll:a,setScroll:d})=>{var oe,j;const i=o.useRef(null),f=o.useRef(null),[p,h]=o.useState({width:null,height:null});o.useEffect(()=>{if(!i.current)return;const k=new ResizeObserver(E=>{for(const P of E)P.target===i.current&&h({width:P.contentRect.width,height:P.contentRect.height})});return k.observe(i.current),()=>{k.disconnect()}},[i]);const m=o.useRef(null),x=o.useRef(null),S=()=>{const k=f.current;return k?{width:n??k.scrollWidth,height:n??k.scrollHeight}:null},w=()=>{const k=i.current;return k?{width:k.clientWidth,height:k.clientHeight}:null},{scrollYProgress:L,scrollXProgress:b}=X.useScroll({container:i}),g=o.useRef(null);g.current||(g.current=Wn(u,(k,E)=>{!x.current||!m.current||!i.current||(E===(t==="horizontal"?"x":"y")&&(d==null||d(k)),s&&(t==="horizontal"&&E==="x"&&s({scrollProgress:k,scroll:k*(m.current.width-i.current.clientWidth),scrollTotal:m.current.width-i.current.clientWidth,scrollVisible:x.current.width}),t==="vertical"&&E==="y"&&s({scrollProgress:k,scroll:k*(m.current.height-i.current.clientHeight),scrollTotal:m.current.height-i.current.clientHeight,scrollVisible:x.current.height})))}));const T=(k,E)=>{g.current&&g.current(k,E)};o.useEffect(()=>{p.width&&T(b.get(),"x"),p.height&&T(L.get(),"y")},[p]),o.useEffect(()=>{const k=i.current,E=f.current;if(!k||!E||typeof a!="number")return;const P=(z,_,q)=>Math.min(q,Math.max(_,z));if(t==="horizontal"){const z=Math.max(0,(n??E.scrollWidth)-k.clientWidth);k.scrollLeft=P(a*z,0,z)}else{const z=Math.max(0,(n??E.scrollHeight)-k.clientHeight);k.scrollTop=P(a*z,0,z)}},[a,t,n]),X.useMotionValueEvent(b,"change",k=>{T(k,"x")}),X.useMotionValueEvent(L,"change",k=>{T(k,"y")});const[F,v]=o.useState(!1);o.useLayoutEffect(()=>{F||!x.current||!m.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?m.current.height:m.current.width,scrollVisible:t=="vertical"?x.current.height:x.current.width}),v(!0))},[x,m,s]),m.current=S(),x.current=w();const[N,R]=o.useState(!1),M=yt({isDragging:N,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:c,throttleDuration:u}),[W,C]=o.useState(0),[$,H]=o.useState(0),Q=k=>{if(!c)return;const E=i.current;if(!E||W==null)return;const z=(k.pageX-E.offsetLeft-W)*1.5;E.scrollLeft=$-z},V=k=>{const E=i.current;E&&(R(!0),C(k.pageX-E.offsetLeft),H(E.scrollLeft))},D=k=>{N&&(k.preventDefault(),Q(k))},I=()=>{R(!1)},B=()=>{R(!1)},U=k=>{k.preventDefault()},K=o.useRef(null);return o.useEffect(()=>()=>{K.current&&clearTimeout(K.current)},[]),o.useEffect(()=>{const k=i.current;if(!k)return;const E=P=>{var ne,A,Y,te;const z=P.detail,_=i.current;if(!_||!z)return;const q=z.orientation??t;if(typeof z.progress=="number")if(q==="horizontal"){const le=Math.max(0,(((ne=m.current)==null?void 0:ne.width)??0)-_.clientWidth);_.scrollLeft=Math.min(le,Math.max(0,z.progress*le))}else{const le=Math.max(0,(((A=m.current)==null?void 0:A.height)??0)-_.clientHeight);_.scrollTop=Math.min(le,Math.max(0,z.progress*le))}else if(typeof z.scroll=="number")if(q==="horizontal"){const le=Math.max(0,(((Y=m.current)==null?void 0:Y.width)??0)-_.clientWidth);_.scrollLeft=Math.min(le,Math.max(0,z.scroll))}else{const le=Math.max(0,(((te=m.current)==null?void 0:te.height)??0)-_.clientHeight);_.scrollTop=Math.min(le,Math.max(0,z.scroll))}};return k.addEventListener("udx:customScroll:set",E),()=>{k.removeEventListener("udx:customScroll:set",E)}},[t]),l.jsxs("div",{className:M.customScroll,ref:i,onMouseDown:V,onMouseMove:D,onMouseUp:I,onMouseLeave:B,onDragStart:U,onScroll:k=>{N||(C(null),R(!0),K.current&&clearTimeout(K.current),K.current=setTimeout(()=>{R(!1)},1e3))},children:[l.jsx("div",{ref:f,style:t==="vertical"?{height:((oe=x==null?void 0:x.current)==null?void 0:oe.height)??"100%"}:{width:((j=x==null?void 0:x.current)==null?void 0:j.width)??"100%"},className:M.track,children:e}),x.current&&m.current&&l.jsxs(l.Fragment,{children:[t==="vertical"&&m.current.height>x.current.height&&l.jsx(X.motion.div,{className:"flex-none",style:{height:m.current.height-x.current.height}}),t==="horizontal"&&m.current.width>x.current.width&&l.jsx(X.motion.div,{className:"flex-none",style:{width:m.current.width-x.current.width}})]})]})};var Tn="1.3.17";function vt(e,t,n){return Math.max(e,Math.min(t,n))}function Bn(e,t,n){return(1-n)*e+n*t}function On(e,t,n,s){return Bn(e,t,1-Math.exp(-n*s))}function Hn(e,t){return(e%t+t)%t}var Vn=class{constructor(){O(this,"isRunning",!1);O(this,"value",0);O(this,"from",0);O(this,"to",0);O(this,"currentTime",0);O(this,"lerp");O(this,"duration");O(this,"easing");O(this,"onUpdate")}advance(e){var n;if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;const s=vt(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=On(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:c,onUpdate:u}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=s,this.easing=r,this.currentTime=0,this.isRunning=!0,c==null||c(),this.onUpdate=u}};function zn(e,t){let n;return function(...s){let r=this;clearTimeout(n),n=setTimeout(()=>{n=void 0,e.apply(r,s)},t)}}var Yn=class{constructor(e,t,{autoResize:n=!0,debounce:s=250}={}){O(this,"width",0);O(this,"height",0);O(this,"scrollHeight",0);O(this,"scrollWidth",0);O(this,"debouncedResize");O(this,"wrapperResizeObserver");O(this,"contentResizeObserver");O(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});O(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});O(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=zn(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}}},gt=class{constructor(){O(this,"events",{})}emit(e,...t){var s;let n=this.events[e]||[];for(let r=0,c=n.length;r<c;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={}}},st=100/6,pe={passive:!1},_n=class{constructor(e,t={wheelMultiplier:1,touchMultiplier:1}){O(this,"touchStart",{x:0,y:0});O(this,"lastDelta",{x:0,y:0});O(this,"window",{width:0,height:0});O(this,"emitter",new gt);O(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})});O(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})});O(this,"onTouchEnd",e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})});O(this,"onWheel",e=>{let{deltaX:t,deltaY:n,deltaMode:s}=e;const r=s===1?st:s===2?this.window.width:1,c=s===1?st:s===2?this.window.height:1;t*=r,n*=c,t*=this.options.wheelMultiplier,n*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:n,event:e})});O(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,pe),this.element.addEventListener("touchstart",this.onTouchStart,pe),this.element.addEventListener("touchmove",this.onTouchMove,pe),this.element.addEventListener("touchend",this.onTouchEnd,pe)}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,pe),this.element.removeEventListener("touchstart",this.onTouchStart,pe),this.element.removeEventListener("touchmove",this.onTouchMove,pe),this.element.removeEventListener("touchend",this.onTouchEnd,pe)}},rt=e=>Math.min(1,1.001-Math.pow(2,-10*e)),qn=class{constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:n=e,smoothWheel:s=!0,syncTouch:r=!1,syncTouchLerp:c=.075,touchInertiaExponent:u=1.7,duration:a,easing:d,lerp:i=.1,infinite:f=!1,orientation:p="vertical",gestureOrientation:h=p==="horizontal"?"both":"vertical",touchMultiplier:m=1,wheelMultiplier:x=1,autoResize:S=!0,prevent:w,virtualScroll:L,overscroll:b=!0,autoRaf:g=!1,anchors:T=!1,autoToggle:F=!1,allowNestedScroll:v=!1,__experimental__naiveDimensions:N=!1,naiveDimensions:R=N,stopInertiaOnNavigate:M=!1}={}){O(this,"_isScrolling",!1);O(this,"_isStopped",!1);O(this,"_isLocked",!1);O(this,"_preventNextNativeScrollEvent",!1);O(this,"_resetVelocityTimeout",null);O(this,"_rafId",null);O(this,"isTouching");O(this,"time",0);O(this,"userData",{});O(this,"lastVelocity",0);O(this,"velocity",0);O(this,"direction",0);O(this,"options");O(this,"targetScroll");O(this,"animatedScroll");O(this,"animate",new Vn);O(this,"emitter",new gt);O(this,"dimensions");O(this,"virtualScroll");O(this,"onScrollEnd",e=>{e instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&e.stopPropagation()});O(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});O(this,"onTransitionEnd",e=>{e.propertyName.includes("overflow")&&this.checkOverflow()});O(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 c;return(c=r.getAttribute("href"))==null?void 0:c.includes("#")});if(s){const r=s.getAttribute("href");if(r){const c=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,u=`#${r.split("#")[1]}`;this.scrollTo(u,c)}}}this.options.stopInertiaOnNavigate&&n.find(r=>r.host===window.location.host)&&this.reset()});O(this,"onPointerDown",e=>{e.button===1&&this.reset()});O(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"),c=s.type.includes("wheel");this.isTouching=s.type==="touchstart"||s.type==="touchmove";const u=t===0&&n===0;if(this.options.syncTouch&&r&&s.type==="touchstart"&&u&&!this.isStopped&&!this.isLocked){this.reset();return}const d=this.options.gestureOrientation==="vertical"&&n===0||this.options.gestureOrientation==="horizontal"&&t===0;if(u||d)return;let i=s.composedPath();i=i.slice(0,i.indexOf(this.rootElement));const f=this.options.prevent;if(i.find(w=>{var L,b,g;return w instanceof HTMLElement&&(typeof f=="function"&&(f==null?void 0:f(w))||((L=w.hasAttribute)==null?void 0:L.call(w,"data-lenis-prevent"))||r&&((b=w.hasAttribute)==null?void 0:b.call(w,"data-lenis-prevent-touch"))||c&&((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&&c)){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,S=r&&s.type==="touchend";S&&(h=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent)),this.scrollTo(this.targetScroll+h,{programmatic:!1,...m?{lerp:S?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});O(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))}});O(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=Tn,(!e||e===document.documentElement)&&(e=window),typeof a=="number"&&typeof d!="function"?d=rt:typeof d=="function"&&typeof a!="number"&&(a=1),this.options={wrapper:e,content:t,eventsTarget:n,smoothWheel:s,syncTouch:r,syncTouchLerp:c,touchInertiaExponent:u,duration:a,easing:d,lerp:i,infinite:f,gestureOrientation:h,orientation:p,touchMultiplier:m,wheelMultiplier:x,autoResize:S,prevent:w,virtualScroll:L,overscroll:b,autoRaf:g,anchors:T,autoToggle:F,allowNestedScroll:v,naiveDimensions:R,stopInertiaOnNavigate:M},this.dimensions=new Yn(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 _n(n,{touchMultiplier:m,wheelMultiplier:x}),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:c=r?this.options.lerp:void 0,duration:u=r?this.options.duration:void 0,easing:a=r?this.options.easing:void 0,onStart:d,onComplete:i,force:f=!1,userData:p}={}){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 x=this.rootElement.getBoundingClientRect();t-=this.isHorizontal?x.left:x.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=vt(0,e,this.limit);if(e===this.targetScroll){d==null||d(this),i==null||i(this);return}if(this.userData=p??{},n){this.animatedScroll=this.targetScroll=e,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),i==null||i(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}r||(this.targetScroll=e),typeof u=="number"&&typeof a!="function"?a=rt:typeof a=="function"&&typeof u!="number"&&(u=1),this.animate.fromTo(this.animatedScroll,e,{duration:u,easing:a,lerp:c,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(),i==null||i(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 c,u,a,d,i,f,p,h;const m=this.options.gestureOrientation;if(s-(r.time??0)>2e3){r.time=Date.now();const F=window.getComputedStyle(e);r.computedStyle=F;const v=F.overflowX,N=F.overflowY;if(c=["auto","overlay","scroll"].includes(v),u=["auto","overlay","scroll"].includes(N),r.hasOverflowX=c,r.hasOverflowY=u,!c&&!u||m==="vertical"&&!u||m==="horizontal"&&!c)return!1;i=e.scrollWidth,f=e.scrollHeight,p=e.clientWidth,h=e.clientHeight,a=i>p,d=f>h,r.isScrollableX=a,r.isScrollableY=d,r.scrollWidth=i,r.scrollHeight=f,r.clientWidth=p,r.clientHeight=h}else a=r.isScrollableX,d=r.isScrollableY,c=r.hasOverflowX,u=r.hasOverflowY,i=r.scrollWidth,f=r.scrollHeight,p=r.clientWidth,h=r.clientHeight;if(!c&&!u||!a&&!d||m==="vertical"&&(!u||!d)||m==="horizontal"&&(!c||!a))return!1;let x;if(m==="horizontal")x="x";else if(m==="vertical")x="y";else{const F=t!==0,v=n!==0;F&&c&&a&&(x="x"),v&&u&&d&&(x="y")}if(!x)return!1;let S,w,L,b,g;if(x==="x")S=e.scrollLeft,w=i-p,L=t,b=c,g=a;else if(x==="y")S=e.scrollTop,w=f-h,L=n,b=u,g=d;else return!1;return(L>0?S<w:S>0)&&b&&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?Hn(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 Xn=({transition:e=1.2,easing:t,orientation:n="vertical",smoothTouch:s=!1,touchMultiplier:r=2,children:c})=>{const u=o.useRef(null),a=o.useRef(null);return o.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 i=p=>1-Math.pow(1-p,5);u.current=new qn({duration:d,easing:t??i,orientation:n,smoothWheel:!0,touchMultiplier:r,syncTouch:s});const f=p=>{var h;(h=u.current)==null||h.raf(p),a.current=requestAnimationFrame(f)};return a.current=requestAnimationFrame(f),()=>{var p;a.current!==null&&cancelAnimationFrame(a.current),(p=u.current)==null||p.destroy(),u.current=null}},[e,t,n,s,r]),c?l.jsx(l.Fragment,{children:c}):null},de=({style:e,colorName:t,stateClassName:n="state-ripple-group",children:s,className:r})=>{const c=o.useRef(null),u=o.useRef(null),[a,d]=o.useState(!1),i=wt({isClient:a,stateClassName:n,className:r,colorName:t});return o.useEffect(()=>{if(c.current&&n!=="state-layer"){const p=(n.includes("[")?"group/"+n.split("[")[1].split("]")[0]:"group").replace(/\//g,"\\/"),h=c.current.closest(`.${p}:not(.${p} .${p})`);u.current=h}d(!0)},[]),l.jsxs("div",{ref:c,className:i.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:[a&&l.jsx(ht,{triggerRef:u}),s]})},Un=({isClient:e,stateClassName:t})=>({stateLayer:y(["w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden",t])}),wt=ee("stateLayer",Un),bt=({targetRef:e,children:t})=>{const[n,s]=o.useState(null),r=o.useRef(null),c=()=>{const u=e.current;if(!u)return;const a=u.getBoundingClientRect();s({position:"fixed",top:a.top,left:a.left,width:a.width,height:a.height,pointerEvents:"none",zIndex:999})};return o.useEffect(()=>{const u=e.current;if(u)return c(),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),r.current=new ResizeObserver(c),r.current.observe(u),()=>{var a;window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c),(a=r.current)==null||a.disconnect()}},[e]),n?Oe.createPortal(l.jsx("div",{style:n,children:t}),document.body):null};function Gn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const Kn=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:s=!1})=>{const[r,c]=o.useState(null);o.useEffect(()=>{(async()=>{const h=await Re.loader(e,s);c(h)})()},[]);const[u,a]=o.useState(null),d=o.useRef(null),i=o.useRef(0),f=o.useRef(null);o.useEffect(()=>{if(!r)return;const h={...e,sourceColor:e.sourceColor},m=Date.now(),x=m-i.current,S=async w=>{await p(w)};if(i.current===0||x>=t)d.current&&(clearTimeout(d.current),d.current=null),f.current=null,i.current=m,S(h);else if(f.current=h,!d.current){const w=Math.max(0,t-x);d.current=setTimeout(async()=>{d.current=null;const L=f.current;f.current=null,L&&(i.current=Date.now(),await S(L))},w)}return()=>{}},[e,t,r]);const p=async h=>{if(typeof h.sourceColor=="string"&&!Gn(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(ft.TailwindPlugin).getInstance().outputCss;a(m),n==null||n(r)};return o.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),u?l.jsx("style",{dangerouslySetInnerHTML:{__html:u}}):null};function Jn(){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 Zn(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function He(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function ot(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function Pe(e,t){if(!He(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const u=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),a=u==="x"||u==="inline"?"inline":u==="y"||u==="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`)||(a==="inline"?e.classList.add(`${t}-timeline-inline`):a==="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`),c=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!c&&e.setAttribute(`data-${t}-run`,"")}function $e(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(s=>He(s))}function Qn(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 c=r.classList;return c.contains(`${t}-in`)||c.contains(`${t}-out`)||Array.from(c).some(d=>d.startsWith(`${t}-`)&&!d.includes("scroll")&&!s.has(d))?!0:!He(r)})}function es(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function it(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function lt(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 ts=[0,.2],at=new WeakSet;function ct(e,t){if(at.has(e))return;at.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 Ve(e={}){const{prefix:t="anim",once:n=!0}=e;if(Zn())return()=>{};const s=Jn(),r=new WeakSet;let c=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,u=!0;const a=()=>{const m=window.pageYOffset||window.scrollY||0;u=m>=c,c=m};typeof window<"u"&&window.addEventListener("scroll",a,{passive:!0});const d=new IntersectionObserver(m=>{for(const x of m){const S=x.target;if(!ot(S)||S.hasAttribute(`data-${t}-animating`))continue;const w=es(S.classList,t);x.isIntersecting?(w&<(S,t,"out"),it(S,t,"in"),n&&d.unobserve(S)):n||(u||lt(S,t,"in"),w&&it(S,t,"out"))}},{threshold:ts}),i=m=>{const x=Qn(m||document,t);for(const S of x)r.has(S)||(r.add(S),d.observe(S),ct(S,t))};i();let f,p=null,h=null;if(s)(()=>{h==null&&(h=requestAnimationFrame(()=>{h=null;const x=$e(void 0,t);for(const S of x)Pe(S,t)}))})(),p=new MutationObserver(x=>{for(const S of x)if(S.type==="attributes"){const w=S.target;w instanceof HTMLElement&&(Pe(w,t),ot(w)&&(r.has(w)||(r.add(w),d.observe(w),ct(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 L=$e(w,t);for(const b of L)Pe(b,t);i(w)}}}),p.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),p&&p.disconnect()};else{let m;$e(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(S=>{m=S.initScrollViewFallback({once:n})}),f=()=>{typeof m=="function"&&m()}}return()=>{f&&f(),typeof window<"u"&&window.removeEventListener("scroll",a),d.disconnect()}}const ns=Ve,ss=Ve,Ee=({anchorRef:e,position:t="bottom",children:n,style:s,...r})=>{const u=`--anchor-${o.useId().replace(/:/g,"")}`,[a,d]=o.useState(!1);if(o.useLayoutEffect(()=>{typeof CSS<"u"&&CSS.supports("anchor-name","--a")&&d(!0)},[]),o.useLayoutEffect(()=>{if(a&&e.current){const f=e.current;return f.style.anchorName=u,()=>{e.current&&(e.current.style.anchorName="")}}},[a,e,u]),a){const f={position:"fixed",margin:0,zIndex:9999,positionAnchor:u,positionArea:t,positionTryFallbacks:"flip-block, flip-inline",...s};return Oe.createPortal(l.jsx("div",{style:f,...r,children:n}),document.body)}const i={position:"absolute",pointerEvents:"auto",...s};switch(t){case"top":i.bottom="100%",i.left="50%",i.transform="translateX(-50%)";break;case"top-left":i.bottom="100%",i.left=0;break;case"top-right":i.bottom="100%",i.right=0;break;case"bottom":i.top="100%",i.left="50%",i.transform="translateX(-50%)";break;case"bottom-left":i.top="100%",i.left=0;break;case"bottom-right":i.top="100%",i.right=0;break;case"left":i.right="100%",i.top="50%",i.transform="translateY(-50%)";break;case"right":i.left="100%",i.top="50%",i.transform="translateY(-50%)";break}return l.jsx(bt,{targetRef:e,children:l.jsx("div",{style:i,...r,children:n})})},St=({variant:e,disableTextMargins:t,disabled:n,iconPosition:s,icon:r,isActive:c,loading:u,shape:a,onToggle:d,size:i,allowShapeTransformation:f})=>({button:y(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",i==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",i==="small"&&"text-label-large px-4 py-2.5 gap-2",i==="medium"&&"text-title-medium px-6 py-4 gap-2",i==="large"&&"text-headline-small px-12 py-8 gap-3",i==="xLarge"&&"text-headline-large px-16 py-12 gap-4",a==="rounded"&&{"rounded-[30px]":i==="xSmall"||i=="small","rounded-[40px]":i==="medium","rounded-[70px]":i==="large"||i=="xLarge"},(a==="squared"||f&&c)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},f&&!n&&{"active:rounded-[12px]":i==="xSmall"||i=="small","active:rounded-[16px]":i==="medium","active:rounded-[28px]":i==="large"||i=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!c,"bg-primary text-on-primary":!n&&c,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!c&&d,"bg-primary text-on-primary":!n&&(c&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!c,"bg-secondary text-on-secondary":!n&&c,"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&&!c,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&c}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[i==="xSmall"&&"-mx-3 ",i==="small"&&"-mx-4 ",i==="medium"&&"-mx-6 ",i==="large"&&"-mx-12",i==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("overflow-hidden",a==="rounded"&&{"rounded-[30px]":i==="xSmall"||i=="small","rounded-[40px]":i==="medium","rounded-[70px]":i==="large"||i=="xLarge"},(a==="squared"||f&&c)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},f&&!n&&{"group-active/button:rounded-[12px]":i==="xSmall"||i=="small","group-active/button:rounded-[16px]":i==="medium","group-active/button:rounded-[28px]":i==="large"||i=="xLarge"}),label:y({invisible:u}),icon:y({invisible:u},i==="xSmall"&&"size-5",i==="small"&&"size-5",i==="medium"&&"size-6",i==="large"&&"size-8",i==="xLarge"&&"size-10")}),rs=re("button",St),Et=ee("button",St),Nt=({variant:e,isInteractive:t})=>({card:y(" 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})}),os=re("card",Nt),jt=ee("card",Nt),ze=({width:e})=>({carouselItem:y("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),is=re("carouselItem",ze),kt=ee("carouselItem",ze),Lt=()=>({carousel:y(["w-full h-[400px]"]),track:y("flex h-full w-full")}),ls=re("carousel",Lt),Mt=ee("carousel",Lt),It=({isChecked:e,isIndeterminate:t,isDisabled:n,isError:s,isFocused:r,isHovered:c})=>({checkbox:y("inline-flex items-center justify-center relative size-4.5 ",{"pointer-events-none opacity-[0.38]":n}),input:y("absolute inset-0 w-full h-full opacity-0 z-10 cursor-pointer"),container:y("relative flex items-center justify-center w-[18px] h-[18px] "),box:y("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:y("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"}),as=re("checkbox",It),Ct=ee("checkbox",It),Rt=({variant:e,disabled:t,trailingIcon:n,icon:s,isActive:r,isInteractive:c,activated:u,isFocused:a,isDragging:d,isEditing:i})=>({chip:y(" 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&&c},{" text-on-surface-variant":!u&&!a||i,"bg-secondary-container text-on-secondary-container":(u||a)&&!i},d&&["opacity-100 cursor-grabbing shadow-3"],e==="outlined"&&["border border-outline-variant",{"border-transparent":i}],e==="elevated"&&!i&&["shadow-1 bg-surface-container-low","border border-outline-variant"]),stateLayer:y("rounded-lg overflow-hidden",{}),label:y("outline-none text-nowrap",{"opacity-[0.38]":t}),leadingIcon:y("text-primary size-[18px]",{"opacity-[0.38]":t}),trailingIcon:y("cursor-pointer size-[18px]",{"opacity-[0.38]":t})}),cs=re("chip",Rt),Dt=ee("chip",Rt),At=({scrollable:e})=>({chips:y(" flex gap-3 outline-none",{"flex-wrap":!e,"overflow-x-auto":e})}),us=re("chips",At),Ft=ee("chips",At),Pt=({orientation:e})=>({divider:y("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),ds=re("divider",Pt),$t=ee("divider",Pt),Wt=({size:e,variant:t,extended:n})=>({fab:y("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:y({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:y("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),fs=re("fab",Wt),Tt=ee("fab",Wt),Bt=({size:e,variant:t,open:n})=>({fabMenu:y("relative inline-flex flex-col items-end"),actions:y("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0"),label:y("text-nowrap")}),hs=re("fabMenu",Bt),Ot=ee("fabMenu",Bt),Ht=({variant:e,disabled:t,onToggle:n,isActive:s,size:r,width:c,shape:u,allowShapeTransformation:a})=>({iconButton:y("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},u==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(u==="squared"||a&&s)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!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:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("absolute top-0 left-0 h-full w-full overflow-hidden",(u==="rounded"||u==="squared"&&n&&!t&&s&&a)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(u==="squared"||u==="rounded"&&n&&!t&&s&&a)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!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:y(" 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"},c=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],c=="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]")}),ms=re("iconButton",Ht),Vt=ee("iconButton",Ht),zt=({variant:e,hasGroups:t})=>({menu:y("z-50 min-w-[112px] max-w-[280px] max-h-[300px] ","flex flex-col",{"overflow-y-auto":!t},{"bg-surface-container":!e||e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant","py-0.5 shadow-2 px-1 rounded-2xl":!t,"bg-transparent ":t})}),ps=re("menu",zt),Yt=ee("menu",zt),_t=({variant:e})=>({menuGroup:y("flex flex-col gap-0.5 mb-0.5 last:mb-0","rounded-lg py-0.5 px-1 shadow-2 first:rounded-t-2xl last:rounded-b-2xl",{"bg-surface-container":e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant"}),groupLabel:y("px-3 pt-2 text-label-small tracking-wide ",{"text-on-surface-variant":e==="standard","text-on-tertiary-container opacity-80":e==="vibrant"})}),ys=re("menuGroup",_t),qt=ee("menuGroup",_t),Xt=({variant:e,isVisible:t})=>({progressIndicator:y((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:y("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:y({"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:y("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),xs=re("progressIndicator",Xt),Ut=ee("progressIndicator",Xt),Ye=({variant:e,position:t})=>({sideSheet:y("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:y("w-full overflow-hidden flex flex-col",{}),header:y("p-4 flex items-center gap-2"),content:y("flex-1 overflow-y-auto"),title:y("text-on-surface-variant text-title-large"),closeButton:y("ml-auto"),divider:y({hidden:e=="modal"}),overlay:y("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),Gt=re("sideSheet",Ye),vs=ee("sideSheet",Ye),_e=({isChanging:e})=>({slider:y(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:y(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:y(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:y(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:y(["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:y(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),gs=re("slider",_e),Kt=ee("slider",_e),Jt=()=>({snackbar:y(" rounded bg-inverse-surface "),container:y("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:y("text-body-medium text-inverse-on-surface "),icon:y(" ml-auto mr-0 text-inverse-on-surface block dark")}),ws=re("snackbar",Jt),Zt=ee("snackbar",Jt),Qt=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:y("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:y("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:y("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:y("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:y("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),bs=re("switch",Qt),en=ee("switch",Qt),tn=({isSelected:e,icon:t,label:n,variant:s})=>({tab:y("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:y("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:y("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:y("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:y("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:y("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")}),Ss=re("tab",tn),nn=ee("tab",tn),sn=({scrollable:e})=>({tabs:y("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Es=re("tabs",sn),rn=ee("tabs",sn),on=()=>({tabPanels:y("overflow-hidden")}),Ns=re("tabPanels",on),ln=ee("tabPanels",on),an=()=>({tabPanel:y("")}),js=re("tabPanel",an),cn=ee("tabPanel",an),un=({disabled:e,leadingIcon:t,trailingIcon:n,variant:s,errorText:r,isFocused:c,value:u,suffix:a,multiline:d})=>({textField:y({"opacity-[.38]":e}),content:y("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":!d},{"border-on-surface-variant":!(r!=null&&r.length)&&!c&&s=="filled","border-outline":!(r!=null&&r.length)&&!c&&s=="outlined","border-primary":!(r!=null&&r.length)&&c,"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]":c}]),stateLayer:y("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":c}),label:y("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)&&c}),input:y("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":!!a},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:y("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":c}]),supportingText:y(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":c},{"text-error":!!(r!=null&&r.length)}),leadingIcon:y(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!o.isValidElement(t)}]),trailingIcon:y("h-12 w-12 flex items-center justify-center",{"cursor-text":!o.isValidElement(n)}),suffix:y("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")}),ks=re("textField",un),dn=ee("textField",un),fn=({position:e,variant:t})=>({toolTip:y(" 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:y("pb-2",t=="rich"&&"px-4 pt-3 ",t=="plain"&&"px-2 py-1"),actions:y("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:y("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:y(""),content:y("w-full")}),Ls=re("toolTip",fn),hn=ee("toolTip",fn),ce=({icon:e,colors:t=[],className:n,...s})=>{if(typeof e=="string"){let f=e,p="";return t[0]&&(p=` fill="${t[0]}" color="${t[0]}"`,f=f.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),f=f.replace(/<svg([^>]*)>/,(h,m)=>`<svg${m.replace(/\s+(width|height)=["'][^"']*["']/g,"")} width="100%" height="100%"${p}>`),l.jsx("div",{className:y("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 l.jsx("img",{src:f.src,width:f.width,height:f.height,className:y("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:c}=r,[u,a,,,d]=c||[],i=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 l.jsx("svg",{className:y("size-5 box-content",n),style:{...i(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${u} ${a}`,role:"img","aria-hidden":"true",...s,children:typeof d=="string"?l.jsx("path",{className:"fill-current",d}):d.map((f,p)=>l.jsx("path",{d:f},p))})},mn=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:s,...r})=>{const[c,u]=o.useState(t),[a]=o.useState(1.5);o.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),u(t)},[t]);const[d,i]=o.useState(!0),f=()=>d?a:a*.5;o.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&c!==100){const x=setInterval(()=>{u(d?10:90),i(!d)},f()*1e3);return()=>clearInterval(x)}},[e,d,c]);const[p,h]=o.useState(!1);o.useEffect(()=>{if(c>=100){const x=setTimeout(()=>{h(!1)},n);return()=>{clearTimeout(x)}}else h(!0)},[c,n]);const m=Ut({className:s,variant:e,value:t,transitionDuration:n,isVisible:p});return l.jsxs(l.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&l.jsxs("div",{className:m.progressIndicator,...r,children:[l.jsx("div",{style:{width:`${c}%`,transition:`width ${n}ms ease-in-out ${c==100?", max-height 200ms 0.5s ease-in-out":""}`},className:m.track}),l.jsx("div",{style:{marginLeft:c!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${c==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:m.activeIndicator}),l.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")&&l.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:l.jsx(X.motion.circle,{cx:"50%",cy:"50%",r:p?"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 Ms(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const ye=({variant:e="filled",disabled:t=!1,icon:n,href:s,label:r,disableTextMargins:c,className:u,iconPosition:a="left",loading:d=!1,shape:i="rounded",onClick:f,onToggle:p,activated:h,ref:m,size:x="medium",allowShapeTransformation:S=!0,transition:w,children:L,...b})=>{if(L&&(r=L),!r)throw new Error("Button component requires either a label prop or children content");e=Ms(e);const g=s?"a":"button",T=o.useRef(null),F=m||T,[v,N]=o.useState(h);o.useEffect(()=>{N(h)},[h]),w={duration:.3,...w};const R=C=>{t&&C.preventDefault(),p?(N(!v),p(!v)):f&&f(C)},M=Et({allowShapeTransformation:S,size:x,disableTextMargins:c,shape:i,href:s,disabled:t,icon:n,iconPosition:a,loading:d,variant:e,transition:w,className:u,isActive:v??!1,onToggle:p,activated:v,label:r,children:r}),W=n?l.jsx(ce,{icon:n,className:M.icon}):l.jsx(l.Fragment,{});return l.jsxs(g,{ref:F,href:s,className:M.button,...b,onClick:R,disabled:t,"aria-pressed":p?v:void 0,style:{transition:w.duration+"s"},children:[l.jsx("div",{className:M.touchTarget}),l.jsx(de,{style:{transition:w.duration+"s"},className:M.stateLayer,colorName:y(e==="filled"&&{"on-surface-variant":!v&&!!p,"on-primary":v||!p},e==="elevated"&&{"on-primary":v&&!!p,primary:!v||!p},e==="tonal"&&{"on-secondary":v&&!!p,"on-secondary-container":!v||!p},e==="outlined"&&{"inverse-on-surface":v&&!!p,"on-surface-variant":!v||!p},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),a==="left"&&W,d&&l.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:l.jsx(mn,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:y({"!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"})}),l.jsx("span",{className:M.label,children:r}),a==="right"&&W]})},Is=({variant:e="outlined",className:t,children:n,interactive:s=!1,ref:r,...c})=>{const u=jt({className:t,isInteractive:s,variant:e,children:n}),a=o.useRef(null),d=r||a;return l.jsxs("div",{...c,ref:d,className:u.card,children:[s&&l.jsx(de,{className:u.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},we=(e,t,n=[0,1])=>{const[s,r]=t,[c,u]=n,d=(Math.max(s,Math.min(e,r))-s)/(r-s);return c+d*(u-c)},pn=({className:e,children:t,width:n,index:s=0,outputRange:r,ref:c,...u})=>{const a=o.useRef(null),d=c||a,i=kt({className:e,index:s,width:n,children:t,outputRange:r});return l.jsx("div",{ref:d,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:i.carouselItem,...u,children:t})},Cs=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:c=[.21,.65],outputRange:u=[42,300],gap:a=8,onChange:d,onMetricsChange:i,index:f,scrollSensitivity:p=1.25,...h})=>{const m=o.useRef(null),x=s||m,[S,w]=o.useState(0),L=Mt({index:f,className:t,children:n,variant:e,inputRange:c,outputRange:u,marginPourcent:r,onChange:d,gap:a,scrollSensitivity:p,onMetricsChange:i}),b=o.Children.toArray(n).filter(E=>o.isValidElement(E)&&E.type===pn),g=o.useRef(null),[T,F]=o.useState({}),[v,N]=o.useState(null),R=o.useRef(0),M=o.useRef(null),W=()=>{var fe,xe;if(!g.current||!x.current||(v==null?void 0:v.scrollProgress)===void 0)return[];const E=(v==null?void 0:v.scrollVisible)??((fe=x.current)==null?void 0:fe.clientWidth)??0;function P(G,Z){return G.map((se,he)=>{const ve=(se-Z)/Math.abs(G[1]-G[0]);return{itemScrollXCenter:se,relativeIndex:ve,index:he,width:0}})}const z=b.map((G,Z)=>{if(!C[Z].current||!g.current)return 0;const he=Z/(b.length-1);return we(he,[0,1],[0,1])}),_=P(z,(v==null?void 0:v.scrollProgress)??0).sort((G,Z)=>G.index-Z.index);let q=(((xe=x.current)==null?void 0:xe.clientWidth)??E)+a+u[0]+a;const ne=_.sort((G,Z)=>Math.abs(G.relativeIndex)-Math.abs(Z.relativeIndex)).map((G,Z)=>{if(!(q<=0)){if(Z==0&&H(G.index),G.width=we(q-a,[u[0],u[1]],[u[0],u[1]]),q-=G.width+a,q!=0&&q<(u[0]+a)*2){const se=G.width-((u[0]+a)*2-q);q+=G.width,G.width=se,q-=G.width}else if(q==0&&G.width>=u[0]*2+a){const se=G.width-(u[0]+a-q);q+=G.width,G.width=se,q-=G.width}return G}}).filter(Boolean),A=ne.reverse(),Y=[...ne].sort((G,Z)=>Math.abs(G.index)-Math.abs(Z.index));A.forEach((G,Z)=>{const se=A[Z+1];if(!se)return;const he=1-(Math.abs(G.relativeIndex)-Math.abs(se==null?void 0:se.relativeIndex)),ve=we(he,[0,2],[G.width+q,se.width]);q+=G.width,G.width=ve,q-=G.width});const te=ne.length/2,le=we(Math.abs(Y[0].relativeIndex),[Y[0].index==0?0:te-1,te],[0,1]),Se=we(le,[0,1],[0,1])*-(u[0]+a);return w(Se),Object.fromEntries(ne.map(G=>[G.index,G.width]))},C=o.useRef([]).current,[$,H]=o.useState(0);o.useEffect(()=>{d&&d($)},[$]),o.useEffect(()=>{typeof f=="number"&&b.length>0&&f!==$&&D(f)},[f,b.length]),o.useEffect(()=>{V($)},[$]),C.length!==b.length&&b.forEach((E,P)=>{C[P]||(C[P]=o.createRef())});const[Q,V]=o.useState(0),D=(E,P={})=>{if(!b.length)return 0;const z=C[E];if(!z||!z.current||!g.current)return 0;const _=we(E/Math.max(1,b.length-1),[0,1],[0,1]);return V(E),g.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:_,orientation:"horizontal",animate:P.animate!==!1}})),_},I=b.map((E,P)=>{var ne;const z=(ne=E.props)==null?void 0:ne.onClick,_=A=>{z==null||z(A)},q=()=>V(P);return o.cloneElement(E,{width:T[P],outputRange:u,ref:C[P],key:P,index:P,role:"option","aria-selected":$===P,tabIndex:$===P?0:-1,onClick:_,onFocus:q})}),B=E=>{var P;if(E.scrollTotal>0){(P=M.current)==null||P.stop();const z=R.current??0,_=E.scrollProgress??0;M.current=X.animate(z,_,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:q=>{R.current=q,N({...E,scrollProgress:q})}})}};o.useEffect(()=>{const E=W();F(E)},[v]);const U=o.useRef(i);o.useEffect(()=>{U.current=i},[i]);const K=o.useRef(null);o.useEffect(()=>{var Z;const E=U.current;if(!E||!(x!=null&&x.current))return;const P=b.length;if(P<=0)return;const z=((Z=x.current)==null?void 0:Z.clientWidth)??0,_=u[1],q=R.current??(v==null?void 0:v.scrollProgress)??0,ne=(z+a)/(_+a),A=Math.max(1,Math.floor(ne)),Y=Math.max(1,Math.round(A*(2/3))),te=Math.min(Math.max(0,$),Math.max(0,P-1)),le=te>0,Se=te<P-1,fe={total:P,selectedIndex:te,visibleApprox:ne,visibleFull:A,stepHalf:Y,canPrev:le,canNext:Se,scrollProgress:q,viewportWidth:z,itemMaxWidth:_,gap:a},xe=K.current;let G=!xe;if(!G){for(const se in fe)if(fe[se]!==xe[se]){G=!0;break}}G&&(K.current=fe,E(fe))},[x,b.length,$,v,a,u]),o.useEffect(()=>()=>{var E;(E=M.current)==null||E.stop()},[]);const[oe,j]=o.useState(0);o.useLayoutEffect(()=>{let E=u[1];v&&E>v.scrollVisible&&(E=v.scrollVisible);const P=(E+a)*I.length/p;j(P)},[x,C,v]);const k=E=>{if(!b.length)return;const P=Q??$;switch(E.key){case"ArrowLeft":E.preventDefault(),D(Math.max(0,P-1));break;case"ArrowRight":E.preventDefault(),D(Math.min(b.length-1,P+1));break;case"Home":E.preventDefault(),D(0);break;case"End":E.preventDefault(),D(b.length-1);break;case"Enter":case" ":E.preventDefault(),D(P);break}};return o.useEffect(()=>{const E=x.current;if(!E)return;const P=z=>{const _=z.detail;_&&typeof _.index=="number"&&D(_.index)};return E.addEventListener("udx:carousel:centerIndex",P),()=>{E.removeEventListener("udx:carousel:centerIndex",P)}},[x,b.length]),l.jsx("div",{className:L.carousel,ref:x,role:"listbox","aria-orientation":"horizontal",onKeyDown:k,...h,children:l.jsx(xt,{draggable:!0,orientation:"horizontal",onScroll:B,scrollSize:oe,children:l.jsx("div",{className:L.track,ref:g,style:{gap:`${a}px`,translate:S,willChange:"translate"},children:I})})})};/*!
|
|
2
|
-
* Font Awesome Free 7.
|
|
1
|
+
"use strict";var Rn=Object.defineProperty;var Dn=(e,t,n)=>t in e?Rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B=(e,t,n)=>Dn(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("react"),He=require("react-dom"),X=require("motion/react"),ft=require("clsx"),An=require("tailwind-merge"),Re=require("@udixio/theme"),ht=require("@udixio/tailwind"),Fn=require("react-textarea-autosize"),mt=({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]=o.useState(!0),[c,u]=o.useState(!1),[a,d]=o.useState({x:50,y:50});o.useEffect(()=>{c&&(r(!0),r(!1))},[c]),o.useEffect(()=>{const x=t==null?void 0:t.current;if(x)return x.addEventListener("mousedown",i),x.addEventListener("mouseup",y),x.addEventListener("mouseleave",f),()=>{x.removeEventListener("mousedown",i),x.removeEventListener("mouseup",y),x.removeEventListener("mouseleave",f)}},[t]);const i=x=>{const b=t==null?void 0:t.current,w=b.getBoundingClientRect();u(!0),d({x:(x.clientX-w.left)/b.clientWidth*100,y:(x.clientY-w.top)/b.clientHeight*100})},f=x=>{u(!1)},y=x=>{u(!1)},h=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,m={position:"absolute",inset:0,width:"100%",height:"100%","--x":a.x+"%","--y":a.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${h} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return l.jsx(X.AnimatePresence,{mode:"wait",children:(c||!c&&!s)&&l.jsx(X.motion.div,{style:m,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},pt=An.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"]}}}),p=(...e)=>pt(ft.clsx(e)),yt=(...e)=>pt(ft.clsx(e));function Pn(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 Fe=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 c=s(e.states);Object.entries(c).map(u=>{const[a,d]=u;(t[a]??(t[a]=[])).push(d)})}});const n=t;return Object.entries(t).map(s=>{let[r,c]=s;c=c.reverse(),r==e.default&&c.unshift("relative"),c.unshift(Pn(r)),n[r]=yt(...c)}),n},re=(e,t)=>n=>Fe({classNameList:[n.className,t],default:e,states:n}),Q=(e,t)=>n=>o.useMemo(()=>Fe({classNameList:[n.className,t],default:e,states:n}),[n]);function $n(e,t,n){return o.useMemo(()=>Fe({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const xt=re("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:p("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:p("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function Wn(e,t){let n=0,s=null,r=null;const c=(u,a)=>{n=Date.now(),t(u,a)};return(u,a)=>{const d=Date.now(),i=e-(d-n);i<=0?(s&&(clearTimeout(s),s=null),c(u,a)):(r={v:u,o:a},s||(s=setTimeout(()=>{s=null;const f=r;r=null,f&&c(f.v,f.o)},i)))}}const vt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:s,className:r,draggable:c=!1,throttleDuration:u=75,scroll:a,setScroll:d})=>{var oe,j;const i=o.useRef(null),f=o.useRef(null),[y,h]=o.useState({width:null,height:null});o.useEffect(()=>{if(!i.current)return;const L=new ResizeObserver(E=>{for(const P of E)P.target===i.current&&h({width:P.contentRect.width,height:P.contentRect.height})});return L.observe(i.current),()=>{L.disconnect()}},[i]);const m=o.useRef(null),x=o.useRef(null),b=()=>{const L=f.current;return L?{width:n??L.scrollWidth,height:n??L.scrollHeight}:null},w=()=>{const L=i.current;return L?{width:L.clientWidth,height:L.clientHeight}:null},{scrollYProgress:M,scrollXProgress:S}=X.useScroll({container:i}),g=o.useRef(null);g.current||(g.current=Wn(u,(L,E)=>{!x.current||!m.current||!i.current||(E===(t==="horizontal"?"x":"y")&&(d==null||d(L)),s&&(t==="horizontal"&&E==="x"&&s({scrollProgress:L,scroll:L*(m.current.width-i.current.clientWidth),scrollTotal:m.current.width-i.current.clientWidth,scrollVisible:x.current.width}),t==="vertical"&&E==="y"&&s({scrollProgress:L,scroll:L*(m.current.height-i.current.clientHeight),scrollTotal:m.current.height-i.current.clientHeight,scrollVisible:x.current.height})))}));const $=(L,E)=>{g.current&&g.current(L,E)};o.useEffect(()=>{y.width&&$(S.get(),"x"),y.height&&$(M.get(),"y")},[y]),o.useEffect(()=>{const L=i.current,E=f.current;if(!L||!E||typeof a!="number")return;const P=(V,_,q)=>Math.min(q,Math.max(_,V));if(t==="horizontal"){const V=Math.max(0,(n??E.scrollWidth)-L.clientWidth);L.scrollLeft=P(a*V,0,V)}else{const V=Math.max(0,(n??E.scrollHeight)-L.clientHeight);L.scrollTop=P(a*V,0,V)}},[a,t,n]),X.useMotionValueEvent(S,"change",L=>{$(L,"x")}),X.useMotionValueEvent(M,"change",L=>{$(L,"y")});const[F,v]=o.useState(!1);o.useLayoutEffect(()=>{F||!x.current||!m.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?m.current.height:m.current.width,scrollVisible:t=="vertical"?x.current.height:x.current.width}),v(!0))},[x,m,s]),m.current=b(),x.current=w();const[k,R]=o.useState(!1),I=xt({isDragging:k,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:c,throttleDuration:u}),[W,N]=o.useState(0),[z,O]=o.useState(0),ee=L=>{if(!c)return;const E=i.current;if(!E||W==null)return;const V=(L.pageX-E.offsetLeft-W)*1.5;E.scrollLeft=z-V},H=L=>{const E=i.current;E&&(R(!0),N(L.pageX-E.offsetLeft),O(E.scrollLeft))},D=L=>{k&&(L.preventDefault(),ee(L))},C=()=>{R(!1)},T=()=>{R(!1)},U=L=>{L.preventDefault()},J=o.useRef(null);return o.useEffect(()=>()=>{J.current&&clearTimeout(J.current)},[]),o.useEffect(()=>{const L=i.current;if(!L)return;const E=P=>{var ne,A,Y,te;const V=P.detail,_=i.current;if(!_||!V)return;const q=V.orientation??t;if(typeof V.progress=="number")if(q==="horizontal"){const le=Math.max(0,(((ne=m.current)==null?void 0:ne.width)??0)-_.clientWidth);_.scrollLeft=Math.min(le,Math.max(0,V.progress*le))}else{const le=Math.max(0,(((A=m.current)==null?void 0:A.height)??0)-_.clientHeight);_.scrollTop=Math.min(le,Math.max(0,V.progress*le))}else if(typeof V.scroll=="number")if(q==="horizontal"){const le=Math.max(0,(((Y=m.current)==null?void 0:Y.width)??0)-_.clientWidth);_.scrollLeft=Math.min(le,Math.max(0,V.scroll))}else{const le=Math.max(0,(((te=m.current)==null?void 0:te.height)??0)-_.clientHeight);_.scrollTop=Math.min(le,Math.max(0,V.scroll))}};return L.addEventListener("udx:customScroll:set",E),()=>{L.removeEventListener("udx:customScroll:set",E)}},[t]),l.jsxs("div",{className:I.customScroll,ref:i,onMouseDown:H,onMouseMove:D,onMouseUp:C,onMouseLeave:T,onDragStart:U,onScroll:L=>{k||(N(null),R(!0),J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{R(!1)},1e3))},children:[l.jsx("div",{ref:f,style:t==="vertical"?{height:((oe=x==null?void 0:x.current)==null?void 0:oe.height)??"100%"}:{width:((j=x==null?void 0:x.current)==null?void 0:j.width)??"100%"},className:I.track,children:e}),x.current&&m.current&&l.jsxs(l.Fragment,{children:[t==="vertical"&&m.current.height>x.current.height&&l.jsx(X.motion.div,{className:"flex-none",style:{height:m.current.height-x.current.height}}),t==="horizontal"&&m.current.width>x.current.width&&l.jsx(X.motion.div,{className:"flex-none",style:{width:m.current.width-x.current.width}})]})]})};var Tn="1.3.17";function gt(e,t,n){return Math.max(e,Math.min(t,n))}function Bn(e,t,n){return(1-n)*e+n*t}function On(e,t,n,s){return Bn(e,t,1-Math.exp(-n*s))}function Hn(e,t){return(e%t+t)%t}var Vn=class{constructor(){B(this,"isRunning",!1);B(this,"value",0);B(this,"from",0);B(this,"to",0);B(this,"currentTime",0);B(this,"lerp");B(this,"duration");B(this,"easing");B(this,"onUpdate")}advance(e){var n;if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;const s=gt(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=On(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:c,onUpdate:u}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=s,this.easing=r,this.currentTime=0,this.isRunning=!0,c==null||c(),this.onUpdate=u}};function zn(e,t){let n;return function(...s){let r=this;clearTimeout(n),n=setTimeout(()=>{n=void 0,e.apply(r,s)},t)}}var Yn=class{constructor(e,t,{autoResize:n=!0,debounce:s=250}={}){B(this,"width",0);B(this,"height",0);B(this,"scrollHeight",0);B(this,"scrollWidth",0);B(this,"debouncedResize");B(this,"wrapperResizeObserver");B(this,"contentResizeObserver");B(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});B(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});B(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=zn(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}}},wt=class{constructor(){B(this,"events",{})}emit(e,...t){var s;let n=this.events[e]||[];for(let r=0,c=n.length;r<c;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={}}},rt=100/6,pe={passive:!1},_n=class{constructor(e,t={wheelMultiplier:1,touchMultiplier:1}){B(this,"touchStart",{x:0,y:0});B(this,"lastDelta",{x:0,y:0});B(this,"window",{width:0,height:0});B(this,"emitter",new wt);B(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})});B(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})});B(this,"onTouchEnd",e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})});B(this,"onWheel",e=>{let{deltaX:t,deltaY:n,deltaMode:s}=e;const r=s===1?rt:s===2?this.window.width:1,c=s===1?rt:s===2?this.window.height:1;t*=r,n*=c,t*=this.options.wheelMultiplier,n*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:n,event:e})});B(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,pe),this.element.addEventListener("touchstart",this.onTouchStart,pe),this.element.addEventListener("touchmove",this.onTouchMove,pe),this.element.addEventListener("touchend",this.onTouchEnd,pe)}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,pe),this.element.removeEventListener("touchstart",this.onTouchStart,pe),this.element.removeEventListener("touchmove",this.onTouchMove,pe),this.element.removeEventListener("touchend",this.onTouchEnd,pe)}},ot=e=>Math.min(1,1.001-Math.pow(2,-10*e)),qn=class{constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:n=e,smoothWheel:s=!0,syncTouch:r=!1,syncTouchLerp:c=.075,touchInertiaExponent:u=1.7,duration:a,easing:d,lerp:i=.1,infinite:f=!1,orientation:y="vertical",gestureOrientation:h=y==="horizontal"?"both":"vertical",touchMultiplier:m=1,wheelMultiplier:x=1,autoResize:b=!0,prevent:w,virtualScroll:M,overscroll:S=!0,autoRaf:g=!1,anchors:$=!1,autoToggle:F=!1,allowNestedScroll:v=!1,__experimental__naiveDimensions:k=!1,naiveDimensions:R=k,stopInertiaOnNavigate:I=!1}={}){B(this,"_isScrolling",!1);B(this,"_isStopped",!1);B(this,"_isLocked",!1);B(this,"_preventNextNativeScrollEvent",!1);B(this,"_resetVelocityTimeout",null);B(this,"_rafId",null);B(this,"isTouching");B(this,"time",0);B(this,"userData",{});B(this,"lastVelocity",0);B(this,"velocity",0);B(this,"direction",0);B(this,"options");B(this,"targetScroll");B(this,"animatedScroll");B(this,"animate",new Vn);B(this,"emitter",new wt);B(this,"dimensions");B(this,"virtualScroll");B(this,"onScrollEnd",e=>{e instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&e.stopPropagation()});B(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});B(this,"onTransitionEnd",e=>{e.propertyName.includes("overflow")&&this.checkOverflow()});B(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 c;return(c=r.getAttribute("href"))==null?void 0:c.includes("#")});if(s){const r=s.getAttribute("href");if(r){const c=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,u=`#${r.split("#")[1]}`;this.scrollTo(u,c)}}}this.options.stopInertiaOnNavigate&&n.find(r=>r.host===window.location.host)&&this.reset()});B(this,"onPointerDown",e=>{e.button===1&&this.reset()});B(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"),c=s.type.includes("wheel");this.isTouching=s.type==="touchstart"||s.type==="touchmove";const u=t===0&&n===0;if(this.options.syncTouch&&r&&s.type==="touchstart"&&u&&!this.isStopped&&!this.isLocked){this.reset();return}const d=this.options.gestureOrientation==="vertical"&&n===0||this.options.gestureOrientation==="horizontal"&&t===0;if(u||d)return;let i=s.composedPath();i=i.slice(0,i.indexOf(this.rootElement));const f=this.options.prevent;if(i.find(w=>{var M,S,g;return w instanceof HTMLElement&&(typeof f=="function"&&(f==null?void 0:f(w))||((M=w.hasAttribute)==null?void 0:M.call(w,"data-lenis-prevent"))||r&&((S=w.hasAttribute)==null?void 0:S.call(w,"data-lenis-prevent-touch"))||c&&((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&&c)){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}})});B(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))}});B(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=Tn,(!e||e===document.documentElement)&&(e=window),typeof a=="number"&&typeof d!="function"?d=ot:typeof d=="function"&&typeof a!="number"&&(a=1),this.options={wrapper:e,content:t,eventsTarget:n,smoothWheel:s,syncTouch:r,syncTouchLerp:c,touchInertiaExponent:u,duration:a,easing:d,lerp:i,infinite:f,gestureOrientation:h,orientation:y,touchMultiplier:m,wheelMultiplier:x,autoResize:b,prevent:w,virtualScroll:M,overscroll:S,autoRaf:g,anchors:$,autoToggle:F,allowNestedScroll:v,naiveDimensions:R,stopInertiaOnNavigate:I},this.dimensions=new Yn(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 _n(n,{touchMultiplier:m,wheelMultiplier:x}),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:c=r?this.options.lerp:void 0,duration:u=r?this.options.duration:void 0,easing:a=r?this.options.easing:void 0,onStart:d,onComplete:i,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 x=this.rootElement.getBoundingClientRect();t-=this.isHorizontal?x.left:x.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=gt(0,e,this.limit);if(e===this.targetScroll){d==null||d(this),i==null||i(this);return}if(this.userData=y??{},n){this.animatedScroll=this.targetScroll=e,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),i==null||i(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}r||(this.targetScroll=e),typeof u=="number"&&typeof a!="function"?a=ot:typeof a=="function"&&typeof u!="number"&&(u=1),this.animate.fromTo(this.animatedScroll,e,{duration:u,easing:a,lerp:c,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(),i==null||i(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 c,u,a,d,i,f,y,h;const m=this.options.gestureOrientation;if(s-(r.time??0)>2e3){r.time=Date.now();const F=window.getComputedStyle(e);r.computedStyle=F;const v=F.overflowX,k=F.overflowY;if(c=["auto","overlay","scroll"].includes(v),u=["auto","overlay","scroll"].includes(k),r.hasOverflowX=c,r.hasOverflowY=u,!c&&!u||m==="vertical"&&!u||m==="horizontal"&&!c)return!1;i=e.scrollWidth,f=e.scrollHeight,y=e.clientWidth,h=e.clientHeight,a=i>y,d=f>h,r.isScrollableX=a,r.isScrollableY=d,r.scrollWidth=i,r.scrollHeight=f,r.clientWidth=y,r.clientHeight=h}else a=r.isScrollableX,d=r.isScrollableY,c=r.hasOverflowX,u=r.hasOverflowY,i=r.scrollWidth,f=r.scrollHeight,y=r.clientWidth,h=r.clientHeight;if(!c&&!u||!a&&!d||m==="vertical"&&(!u||!d)||m==="horizontal"&&(!c||!a))return!1;let x;if(m==="horizontal")x="x";else if(m==="vertical")x="y";else{const F=t!==0,v=n!==0;F&&c&&a&&(x="x"),v&&u&&d&&(x="y")}if(!x)return!1;let b,w,M,S,g;if(x==="x")b=e.scrollLeft,w=i-y,M=t,S=c,g=a;else if(x==="y")b=e.scrollTop,w=f-h,M=n,S=u,g=d;else return!1;return(M>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?Hn(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 Xn=({transition:e=1.2,easing:t,orientation:n="vertical",smoothTouch:s=!1,touchMultiplier:r=2,children:c})=>{const u=o.useRef(null),a=o.useRef(null);return o.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 i=y=>1-Math.pow(1-y,5);u.current=new qn({duration:d,easing:t??i,orientation:n,smoothWheel:!0,touchMultiplier:r,syncTouch:s});const f=y=>{var h;(h=u.current)==null||h.raf(y),a.current=requestAnimationFrame(f)};return a.current=requestAnimationFrame(f),()=>{var y;a.current!==null&&cancelAnimationFrame(a.current),(y=u.current)==null||y.destroy(),u.current=null}},[e,t,n,s,r]),c?l.jsx(l.Fragment,{children:c}):null},de=({style:e,colorName:t,stateClassName:n="state-ripple-group",children:s,className:r})=>{const c=o.useRef(null),u=o.useRef(null),[a,d]=o.useState(!1),i=bt({isClient:a,stateClassName:n,className:r,colorName:t});return o.useEffect(()=>{if(c.current&&n!=="state-layer"){const y=(n.includes("[")?"group/"+n.split("[")[1].split("]")[0]:"group").replace(/\//g,"\\/"),h=c.current.closest(`.${y}:not(.${y} .${y})`);u.current=h}d(!0)},[]),l.jsxs("div",{ref:c,className:i.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:[a&&l.jsx(mt,{triggerRef:u}),s]})},Un=({isClient:e,stateClassName:t})=>({stateLayer:p(["w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden",t])}),bt=Q("stateLayer",Un),St=({targetRef:e,children:t})=>{const[n,s]=o.useState(null),r=o.useRef(null),c=()=>{const u=e.current;if(!u)return;const a=u.getBoundingClientRect();s({position:"fixed",top:a.top,left:a.left,width:a.width,height:a.height,pointerEvents:"none",zIndex:999})};return o.useEffect(()=>{const u=e.current;if(u)return c(),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),r.current=new ResizeObserver(c),r.current.observe(u),()=>{var a;window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c),(a=r.current)==null||a.disconnect()}},[e]),n?He.createPortal(l.jsx("div",{style:n,children:t}),document.body):null};function Gn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const Kn=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:s=!1})=>{const[r,c]=o.useState(null);o.useEffect(()=>{(async()=>{const h=await Re.loader(e,s);c(h)})()},[]);const[u,a]=o.useState(null),d=o.useRef(null),i=o.useRef(0),f=o.useRef(null);o.useEffect(()=>{if(!r)return;const h={...e,sourceColor:e.sourceColor},m=Date.now(),x=m-i.current,b=async w=>{await y(w)};if(i.current===0||x>=t)d.current&&(clearTimeout(d.current),d.current=null),f.current=null,i.current=m,b(h);else if(f.current=h,!d.current){const w=Math.max(0,t-x);d.current=setTimeout(async()=>{d.current=null;const M=f.current;f.current=null,M&&(i.current=Date.now(),await b(M))},w)}return()=>{}},[e,t,r]);const y=async h=>{if(typeof h.sourceColor=="string"&&!Gn(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(ht.TailwindPlugin).getInstance().outputCss;a(m),n==null||n(r)};return o.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),u?l.jsx("style",{dangerouslySetInnerHTML:{__html:u}}):null};function Jn(){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 Zn(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Ve(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function it(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function $e(e,t){if(!Ve(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const u=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),a=u==="x"||u==="inline"?"inline":u==="y"||u==="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`)||(a==="inline"?e.classList.add(`${t}-timeline-inline`):a==="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`),c=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!c&&e.setAttribute(`data-${t}-run`,"")}function We(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(s=>Ve(s))}function Qn(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 c=r.classList;return c.contains(`${t}-in`)||c.contains(`${t}-out`)||Array.from(c).some(d=>d.startsWith(`${t}-`)&&!d.includes("scroll")&&!s.has(d))?!0:!Ve(r)})}function es(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function lt(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function at(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 ts=[0,.2],ct=new WeakSet;function ut(e,t){if(ct.has(e))return;ct.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 ze(e={}){const{prefix:t="anim",once:n=!0}=e;if(Zn())return()=>{};const s=Jn(),r=new WeakSet;let c=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,u=!0;const a=()=>{const m=window.pageYOffset||window.scrollY||0;u=m>=c,c=m};typeof window<"u"&&window.addEventListener("scroll",a,{passive:!0});const d=new IntersectionObserver(m=>{for(const x of m){const b=x.target;if(!it(b)||b.hasAttribute(`data-${t}-animating`))continue;const w=es(b.classList,t);x.isIntersecting?(w&&at(b,t,"out"),lt(b,t,"in"),n&&d.unobserve(b)):n||(u||at(b,t,"in"),w&<(b,t,"out"))}},{threshold:ts}),i=m=>{const x=Qn(m||document,t);for(const b of x)r.has(b)||(r.add(b),d.observe(b),ut(b,t))};i();let f,y=null,h=null;if(s)(()=>{h==null&&(h=requestAnimationFrame(()=>{h=null;const x=We(void 0,t);for(const b of x)$e(b,t)}))})(),y=new MutationObserver(x=>{for(const b of x)if(b.type==="attributes"){const w=b.target;w instanceof HTMLElement&&($e(w,t),it(w)&&(r.has(w)||(r.add(w),d.observe(w),ut(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 M=We(w,t);for(const S of M)$e(S,t);i(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;We(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",a),d.disconnect()}}const ns=ze,ss=ze,Ne=({anchorRef:e,position:t="bottom",children:n,style:s,...r})=>{const u=`--anchor-${o.useId().replace(/:/g,"")}`,[a,d]=o.useState(!1);if(o.useLayoutEffect(()=>{typeof CSS<"u"&&CSS.supports("anchor-name","--a")&&d(!0)},[]),o.useLayoutEffect(()=>{if(a&&e.current){const f=e.current;return f.style.anchorName=u,()=>{e.current&&(e.current.style.anchorName="")}}},[a,e,u]),a){const f={position:"fixed",margin:0,zIndex:9999,positionAnchor:u,positionArea:t,positionTryFallbacks:"flip-block, flip-inline",...s};return He.createPortal(l.jsx("div",{style:f,...r,children:n}),document.body)}const i={position:"absolute",pointerEvents:"auto",...s};switch(t){case"top":i.bottom="100%",i.left="50%",i.transform="translateX(-50%)";break;case"top-left":i.bottom="100%",i.left=0;break;case"top-right":i.bottom="100%",i.right=0;break;case"bottom":i.top="100%",i.left="50%",i.transform="translateX(-50%)";break;case"bottom-left":i.top="100%",i.left=0;break;case"bottom-right":i.top="100%",i.right=0;break;case"left":i.right="100%",i.top="50%",i.transform="translateY(-50%)";break;case"right":i.left="100%",i.top="50%",i.transform="translateY(-50%)";break}return l.jsx(St,{targetRef:e,children:l.jsx("div",{style:i,...r,children:n})})},Et=({variant:e,disableTextMargins:t,disabled:n,iconPosition:s,icon:r,isActive:c,loading:u,shape:a,onToggle:d,size:i,allowShapeTransformation:f})=>({button:p(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",i==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",i==="small"&&"text-label-large px-4 py-2.5 gap-2",i==="medium"&&"text-title-medium px-6 py-4 gap-2",i==="large"&&"text-headline-small px-12 py-8 gap-3",i==="xLarge"&&"text-headline-large px-16 py-12 gap-4",a==="rounded"&&{"rounded-[30px]":i==="xSmall"||i=="small","rounded-[40px]":i==="medium","rounded-[70px]":i==="large"||i=="xLarge"},(a==="squared"||f&&c)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},f&&!n&&{"active:rounded-[12px]":i==="xSmall"||i=="small","active:rounded-[16px]":i==="medium","active:rounded-[28px]":i==="large"||i=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!c,"bg-primary text-on-primary":!n&&c,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!c&&d,"bg-primary text-on-primary":!n&&(c&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!c,"bg-secondary text-on-secondary":!n&&c,"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&&!c,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&c}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[i==="xSmall"&&"-mx-3 ",i==="small"&&"-mx-4 ",i==="medium"&&"-mx-6 ",i==="large"&&"-mx-12",i==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:p("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:p("overflow-hidden",a==="rounded"&&{"rounded-[30px]":i==="xSmall"||i=="small","rounded-[40px]":i==="medium","rounded-[70px]":i==="large"||i=="xLarge"},(a==="squared"||f&&c)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},f&&!n&&{"group-active/button:rounded-[12px]":i==="xSmall"||i=="small","group-active/button:rounded-[16px]":i==="medium","group-active/button:rounded-[28px]":i==="large"||i=="xLarge"}),label:p({invisible:u}),icon:p({invisible:u},i==="xSmall"&&"size-5",i==="small"&&"size-5",i==="medium"&&"size-6",i==="large"&&"size-8",i==="xLarge"&&"size-10")}),rs=re("button",Et),Nt=Q("button",Et),kt=({variant:e,isInteractive:t})=>({card:p(" 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})}),os=re("card",kt),jt=Q("card",kt),Ye=({width:e})=>({carouselItem:p("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),is=re("carouselItem",Ye),Lt=Q("carouselItem",Ye),Mt=()=>({carousel:p(["w-full h-[400px]"]),track:p("flex h-full w-full")}),ls=re("carousel",Mt),It=Q("carousel",Mt),Ct=({isChecked:e,isIndeterminate:t,isDisabled:n,isError:s,isFocused:r,isHovered:c})=>({checkbox:p("inline-flex items-center justify-center relative size-4.5 ",{"pointer-events-none opacity-[0.38]":n}),input:p("absolute inset-0 w-full h-full opacity-0 z-10 cursor-pointer"),container:p("relative flex items-center justify-center w-[18px] h-[18px] "),box:p("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:p("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"}),as=re("checkbox",Ct),Rt=Q("checkbox",Ct),Dt=({variant:e,disabled:t,trailingIcon:n,icon:s,isActive:r,isInteractive:c,activated:u,isFocused:a,isDragging:d,isEditing:i})=>({chip:p(" 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&&c},{" text-on-surface-variant":!u&&!a||i,"bg-secondary-container text-on-secondary-container":(u||a)&&!i},d&&["opacity-100 cursor-grabbing shadow-3"],e==="outlined"&&["border border-outline-variant",{"border-transparent":i}],e==="elevated"&&!i&&["shadow-1 bg-surface-container-low","border border-outline-variant"]),stateLayer:p("rounded-lg overflow-hidden",{}),label:p("outline-none text-nowrap",{"opacity-[0.38]":t}),leadingIcon:p("text-primary size-[18px]",{"opacity-[0.38]":t}),trailingIcon:p("cursor-pointer size-[18px]",{"opacity-[0.38]":t})}),cs=re("chip",Dt),At=Q("chip",Dt),Ft=({scrollable:e})=>({chips:p(" flex gap-3 outline-none",{"flex-wrap":!e,"overflow-x-auto":e})}),us=re("chips",Ft),Pt=Q("chips",Ft),$t=({orientation:e})=>({divider:p("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),ds=re("divider",$t),Wt=Q("divider",$t),Tt=({size:e,variant:t,extended:n})=>({fab:p("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:p({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:p("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),fs=re("fab",Tt),Bt=Q("fab",Tt),Ot=({size:e,variant:t,open:n})=>({fabMenu:p("relative inline-flex flex-col items-end"),actions:p("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0"),label:p("text-nowrap")}),hs=re("fabMenu",Ot),Ht=Q("fabMenu",Ot),Vt=({variant:e,disabled:t,onToggle:n,isActive:s,size:r,width:c,shape:u,allowShapeTransformation:a})=>({iconButton:p("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},u==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(u==="squared"||a&&s)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!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:p("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:p("absolute top-0 left-0 h-full w-full overflow-hidden",(u==="rounded"||u==="squared"&&n&&!t&&s&&a)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(u==="squared"||u==="rounded"&&n&&!t&&s&&a)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!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:p(" 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"},c=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],c=="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]")}),ms=re("iconButton",Vt),zt=Q("iconButton",Vt),Yt=({variant:e,hasGroups:t})=>({menu:p("z-50 min-w-[112px] max-w-[280px] max-h-[300px] ","flex flex-col",{"overflow-y-auto":!t},{"bg-surface-container":!e||e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant","py-0.5 shadow-2 px-1 rounded-2xl":!t,"bg-transparent ":t})}),ps=re("menu",Yt),_t=Q("menu",Yt),qt=({variant:e})=>({menuGroup:p("flex flex-col gap-0.5 mb-0.5 last:mb-0","rounded-lg py-0.5 px-1 shadow-2 first:rounded-t-2xl last:rounded-b-2xl",{"bg-surface-container":e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant"}),groupLabel:p("px-3 pt-2 text-label-small tracking-wide ",{"text-on-surface-variant":e==="standard","text-on-tertiary-container opacity-80":e==="vibrant"})}),ys=re("menuGroup",qt),Xt=Q("menuGroup",qt),Ut=({variant:e,isVisible:t})=>({progressIndicator:p((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:p("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:p({"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:p("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),xs=re("progressIndicator",Ut),Gt=Q("progressIndicator",Ut),_e=({variant:e,position:t})=>({sideSheet:p("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:p("w-full overflow-hidden flex flex-col",{}),header:p("p-4 flex items-center gap-2"),content:p("flex-1 overflow-y-auto"),title:p("text-on-surface-variant text-title-large"),closeButton:p("ml-auto"),divider:p({hidden:e=="modal"}),overlay:p("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),Kt=re("sideSheet",_e),vs=Q("sideSheet",_e),qe=({isChanging:e})=>({slider:p(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:p(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:p(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:p(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:p(["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:p(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),gs=re("slider",qe),Jt=Q("slider",qe),Zt=()=>({snackbar:p(" rounded bg-inverse-surface "),container:p("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:p("text-body-medium text-inverse-on-surface "),icon:p(" ml-auto mr-0 text-inverse-on-surface block dark")}),ws=re("snackbar",Zt),Qt=Q("snackbar",Zt),en=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:p("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:p("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:p("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:p("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:p("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),bs=re("switch",en),tn=Q("switch",en),nn=({isSelected:e,icon:t,label:n,variant:s})=>({tab:p("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:p("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:p("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:p("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:p("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:p("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")}),Ss=re("tab",nn),sn=Q("tab",nn),rn=({scrollable:e})=>({tabs:p("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Es=re("tabs",rn),on=Q("tabs",rn),ln=()=>({tabPanels:p("overflow-hidden")}),Ns=re("tabPanels",ln),an=Q("tabPanels",ln),cn=()=>({tabPanel:p("")}),ks=re("tabPanel",cn),un=Q("tabPanel",cn),dn=({disabled:e,leadingIcon:t,trailingIcon:n,variant:s,errorText:r,isFocused:c,value:u,suffix:a,multiline:d})=>({textField:p({"opacity-[.38]":e}),content:p("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":!d},{"border-on-surface-variant":!(r!=null&&r.length)&&!c&&s=="filled","border-outline":!(r!=null&&r.length)&&!c&&s=="outlined","border-primary":!(r!=null&&r.length)&&c,"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]":c}]),stateLayer:p("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":c}),label:p("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)&&c}),input:p("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":!!a},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:p("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":c}]),supportingText:p(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":c},{"text-error":!!(r!=null&&r.length)}),leadingIcon:p(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!o.isValidElement(t)}]),trailingIcon:p("h-12 w-12 flex items-center justify-center",{"cursor-text":!o.isValidElement(n)}),suffix:p("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")}),js=re("textField",dn),fn=Q("textField",dn),hn=({position:e,variant:t})=>({toolTip:p(" 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:p("pb-2",t=="rich"&&"px-4 pt-3 ",t=="plain"&&"px-2 py-1"),actions:p("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:p("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:p(""),content:p("w-full")}),Ls=re("toolTip",hn),mn=Q("toolTip",hn),ce=({icon:e,colors:t=[],className:n,...s})=>{if(typeof e=="string"){let f=e,y="";return t[0]&&(y=` fill="${t[0]}" color="${t[0]}"`,f=f.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),f=f.replace(/<svg([^>]*)>/,(h,m)=>`<svg${m.replace(/\s+(width|height)=["'][^"']*["']/g,"")} width="100%" height="100%"${y}>`),l.jsx("div",{className:p("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 l.jsx("img",{src:f.src,width:f.width,height:f.height,className:p("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:c}=r,[u,a,,,d]=c||[],i=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 l.jsx("svg",{className:p("size-5 box-content",n),style:{...i(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${u} ${a}`,role:"img","aria-hidden":"true",...s,children:typeof d=="string"?l.jsx("path",{className:"fill-current",d}):d.map((f,y)=>l.jsx("path",{d:f},y))})},pn=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:s,...r})=>{const[c,u]=o.useState(t),[a]=o.useState(1.5);o.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),u(t)},[t]);const[d,i]=o.useState(!0),f=()=>d?a:a*.5;o.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&c!==100){const x=setInterval(()=>{u(d?10:90),i(!d)},f()*1e3);return()=>clearInterval(x)}},[e,d,c]);const[y,h]=o.useState(!1);o.useEffect(()=>{if(c>=100){const x=setTimeout(()=>{h(!1)},n);return()=>{clearTimeout(x)}}else h(!0)},[c,n]);const m=Gt({className:s,variant:e,value:t,transitionDuration:n,isVisible:y});return l.jsxs(l.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&l.jsxs("div",{className:m.progressIndicator,...r,children:[l.jsx("div",{style:{width:`${c}%`,transition:`width ${n}ms ease-in-out ${c==100?", max-height 200ms 0.5s ease-in-out":""}`},className:m.track}),l.jsx("div",{style:{marginLeft:c!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${c==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:m.activeIndicator}),l.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")&&l.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:l.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 Ms(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const ye=({variant:e="filled",disabled:t=!1,icon:n,href:s,label:r,disableTextMargins:c,className:u,iconPosition:a="left",loading:d=!1,shape:i="rounded",onClick:f,onToggle:y,activated:h,ref:m,size:x="medium",allowShapeTransformation:b=!0,transition:w,children:M,...S})=>{if(M&&(r=M),!r)throw new Error("Button component requires either a label prop or children content");e=Ms(e);const g=s?"a":"button",$=o.useRef(null),F=m||$,[v,k]=o.useState(h);o.useEffect(()=>{k(h)},[h]),w={duration:.3,...w};const R=N=>{t&&N.preventDefault(),y?(k(!v),y(!v)):f&&f(N)},I=Nt({allowShapeTransformation:b,size:x,disableTextMargins:c,shape:i,href:s,disabled:t,icon:n,iconPosition:a,loading:d,variant:e,transition:w,className:u,isActive:v??!1,onToggle:y,activated:v,label:r,children:r}),W=n?l.jsx(ce,{icon:n,className:I.icon}):l.jsx(l.Fragment,{});return l.jsxs(g,{ref:F,href:s,className:I.button,...S,onClick:R,disabled:t,"aria-pressed":y?v:void 0,style:{transition:w.duration+"s"},children:[l.jsx("div",{className:I.touchTarget}),l.jsx(de,{style:{transition:w.duration+"s"},className:I.stateLayer,colorName:p(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]"}),a==="left"&&W,d&&l.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:l.jsx(pn,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:p({"!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"})}),l.jsx("span",{className:I.label,children:r}),a==="right"&&W]})},Is=({variant:e="outlined",className:t,children:n,interactive:s=!1,ref:r,...c})=>{const u=jt({className:t,isInteractive:s,variant:e,children:n}),a=o.useRef(null),d=r||a;return l.jsxs("div",{...c,ref:d,className:u.card,children:[s&&l.jsx(de,{className:u.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},be=(e,t,n=[0,1])=>{const[s,r]=t,[c,u]=n,d=(Math.max(s,Math.min(e,r))-s)/(r-s);return c+d*(u-c)},yn=({className:e,children:t,width:n,index:s=0,outputRange:r,ref:c,...u})=>{const a=o.useRef(null),d=c||a,i=Lt({className:e,index:s,width:n,children:t,outputRange:r});return l.jsx("div",{ref:d,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:i.carouselItem,...u,children:t})},Cs=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:c=[.21,.65],outputRange:u=[42,300],gap:a=8,onChange:d,onMetricsChange:i,index:f,scrollSensitivity:y=1.25,...h})=>{const m=o.useRef(null),x=s||m,[b,w]=o.useState(0),M=It({index:f,className:t,children:n,variant:e,inputRange:c,outputRange:u,marginPourcent:r,onChange:d,gap:a,scrollSensitivity:y,onMetricsChange:i}),S=o.Children.toArray(n).filter(E=>o.isValidElement(E)&&E.type===yn),g=o.useRef(null),[$,F]=o.useState({}),[v,k]=o.useState(null),R=o.useRef(0),I=o.useRef(null),W=()=>{var fe,xe;if(!g.current||!x.current||(v==null?void 0:v.scrollProgress)===void 0)return[];const E=(v==null?void 0:v.scrollVisible)??((fe=x.current)==null?void 0:fe.clientWidth)??0;function P(K,Z){return K.map((se,he)=>{const ve=(se-Z)/Math.abs(K[1]-K[0]);return{itemScrollXCenter:se,relativeIndex:ve,index:he,width:0}})}const V=S.map((K,Z)=>{if(!N[Z].current||!g.current)return 0;const he=Z/(S.length-1);return be(he,[0,1],[0,1])}),_=P(V,(v==null?void 0:v.scrollProgress)??0).sort((K,Z)=>K.index-Z.index);let q=(((xe=x.current)==null?void 0:xe.clientWidth)??E)+a+u[0]+a;const ne=_.sort((K,Z)=>Math.abs(K.relativeIndex)-Math.abs(Z.relativeIndex)).map((K,Z)=>{if(!(q<=0)){if(Z==0&&O(K.index),K.width=be(q-a,[u[0],u[1]],[u[0],u[1]]),q-=K.width+a,q!=0&&q<(u[0]+a)*2){const se=K.width-((u[0]+a)*2-q);q+=K.width,K.width=se,q-=K.width}else if(q==0&&K.width>=u[0]*2+a){const se=K.width-(u[0]+a-q);q+=K.width,K.width=se,q-=K.width}return K}}).filter(Boolean),A=ne.reverse(),Y=[...ne].sort((K,Z)=>Math.abs(K.index)-Math.abs(Z.index));A.forEach((K,Z)=>{const se=A[Z+1];if(!se)return;const he=1-(Math.abs(K.relativeIndex)-Math.abs(se==null?void 0:se.relativeIndex)),ve=be(he,[0,2],[K.width+q,se.width]);q+=K.width,K.width=ve,q-=K.width});const te=ne.length/2,le=be(Math.abs(Y[0].relativeIndex),[Y[0].index==0?0:te-1,te],[0,1]),Ee=be(le,[0,1],[0,1])*-(u[0]+a);return w(Ee),Object.fromEntries(ne.map(K=>[K.index,K.width]))},N=o.useRef([]).current,[z,O]=o.useState(0);o.useEffect(()=>{d&&d(z)},[z]),o.useEffect(()=>{typeof f=="number"&&S.length>0&&f!==z&&D(f)},[f,S.length]),o.useEffect(()=>{H(z)},[z]),N.length!==S.length&&S.forEach((E,P)=>{N[P]||(N[P]=o.createRef())});const[ee,H]=o.useState(0),D=(E,P={})=>{if(!S.length)return 0;const V=N[E];if(!V||!V.current||!g.current)return 0;const _=be(E/Math.max(1,S.length-1),[0,1],[0,1]);return H(E),g.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:_,orientation:"horizontal",animate:P.animate!==!1}})),_},C=S.map((E,P)=>{var ne;const V=(ne=E.props)==null?void 0:ne.onClick,_=A=>{V==null||V(A)},q=()=>H(P);return o.cloneElement(E,{width:$[P],outputRange:u,ref:N[P],key:P,index:P,role:"option","aria-selected":z===P,tabIndex:z===P?0:-1,onClick:_,onFocus:q})}),T=E=>{var P;if(E.scrollTotal>0){(P=I.current)==null||P.stop();const V=R.current??0,_=E.scrollProgress??0;I.current=X.animate(V,_,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:q=>{R.current=q,k({...E,scrollProgress:q})}})}};o.useEffect(()=>{const E=W();F(E)},[v]);const U=o.useRef(i);o.useEffect(()=>{U.current=i},[i]);const J=o.useRef(null);o.useEffect(()=>{var Z;const E=U.current;if(!E||!(x!=null&&x.current))return;const P=S.length;if(P<=0)return;const V=((Z=x.current)==null?void 0:Z.clientWidth)??0,_=u[1],q=R.current??(v==null?void 0:v.scrollProgress)??0,ne=(V+a)/(_+a),A=Math.max(1,Math.floor(ne)),Y=Math.max(1,Math.round(A*(2/3))),te=Math.min(Math.max(0,z),Math.max(0,P-1)),le=te>0,Ee=te<P-1,fe={total:P,selectedIndex:te,visibleApprox:ne,visibleFull:A,stepHalf:Y,canPrev:le,canNext:Ee,scrollProgress:q,viewportWidth:V,itemMaxWidth:_,gap:a},xe=J.current;let K=!xe;if(!K){for(const se in fe)if(fe[se]!==xe[se]){K=!0;break}}K&&(J.current=fe,E(fe))},[x,S.length,z,v,a,u]),o.useEffect(()=>()=>{var E;(E=I.current)==null||E.stop()},[]);const[oe,j]=o.useState(0);o.useLayoutEffect(()=>{let E=u[1];v&&E>v.scrollVisible&&(E=v.scrollVisible);const P=(E+a)*C.length/y;j(P)},[x,N,v]);const L=E=>{if(!S.length)return;const P=ee??z;switch(E.key){case"ArrowLeft":E.preventDefault(),D(Math.max(0,P-1));break;case"ArrowRight":E.preventDefault(),D(Math.min(S.length-1,P+1));break;case"Home":E.preventDefault(),D(0);break;case"End":E.preventDefault(),D(S.length-1);break;case"Enter":case" ":E.preventDefault(),D(P);break}};return o.useEffect(()=>{const E=x.current;if(!E)return;const P=V=>{const _=V.detail;_&&typeof _.index=="number"&&D(_.index)};return E.addEventListener("udx:carousel:centerIndex",P),()=>{E.removeEventListener("udx:carousel:centerIndex",P)}},[x,S.length]),l.jsx("div",{className:M.carousel,ref:x,role:"listbox","aria-orientation":"horizontal",onKeyDown:L,...h,children:l.jsx(vt,{draggable:!0,orientation:"horizontal",onScroll:T,scrollSize:oe,children:l.jsx("div",{className:M.track,ref:g,style:{gap:`${a}px`,translate:b,willChange:"translate"},children:C})})})};/*!
|
|
2
|
+
* Font Awesome Free 7.2.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
|
-
* Copyright
|
|
5
|
-
*/var Rs={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"]},Ds={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"]},As={prefix:"fas",iconName:"chevron-up",icon:[448,512,[],"f077","M201.4 105.4c12.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 173.3 54.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},yn={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"]},Fs={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"]},qe={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"]},Le={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"]},Ps=Le,xn={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"]},$s={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"]},Ws={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 Ts=({checked:e,defaultChecked:t,indeterminate:n=!1,disabled:s=!1,error:r=!1,onChange:c,id:u,name:a,value:d,style:i,className:f,...p})=>{const h=o.useId(),m=u||h,x=e!==void 0,[S,w]=o.useState(t??!1),L=x?e:S,[b,g]=o.useState(!1),T=o.useRef(null);o.useEffect(()=>{T.current&&(T.current.indeterminate=n)},[n]);const F=N=>{s||(x||w(N.target.checked),c&&c(N))},v=Ct({isChecked:!!L,isIndeterminate:n,isDisabled:s,isError:r,isFocused:b,isHovered:!1});return l.jsx("div",{className:y(v.checkbox,f,"group/checkbox"),style:i,children:l.jsxs(de,{stateClassName:v.stateLayer,colorName:L||n?"primary":"on-surface",children:[l.jsx("input",{ref:T,type:"checkbox",id:m,name:a,value:d,checked:L,disabled:s,onChange:F,onFocus:()=>g(!0),onBlur:()=>g(!1),className:v.input,...p}),l.jsx("div",{className:v.box}),l.jsx(X.AnimatePresence,{children:(L||n)&&l.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:l.jsx(ce,{icon:n?Rs:qe,className:"size-3.5"})})})]})})},Te=({variant:e="outlined",disabled:t=!1,icon:n,href:s,label:r,className:c,onClick:u,onToggle:a,activated:d,ref:i,onRemove:f,editable:p,onEditStart:h,onEditCommit:m,onEditCancel:x,onChange:S,transition:w,children:L,editing:b,...g})=>{if(L&&(r=L),r===void 0&&!p)throw new Error("Chip component requires either a label prop or children content");const T=s?"a":"button",F=o.useRef(null),v=i||F,[N,R]=o.useState(d),[M,W]=o.useState(!1),[C,$]=o.useState(b&&p),[H,Q]=o.useState(!1),[V,D]=o.useState(typeof r=="string"?r:""),I=o.useRef(null);o.useEffect(()=>{R(d)},[d]),o.useEffect(()=>{if(b&&$(b),p&&M){const A=setTimeout(()=>{g!=null&&g.draggable&&H||$(!0)},1e3);return()=>clearTimeout(A)}else M||$(!1)},[M,p,H,g,V]),o.useEffect(()=>{if(C){D(typeof r=="string"?r:"");const A=q.current||I.current;if(A){A.focus();const Y=document.createRange();Y.selectNodeContents(A),Y.collapse(!1);const te=window.getSelection();te==null||te.removeAllRanges(),te==null||te.addRange(Y)}}},[C]),w={duration:.3,...w};const B=A=>{t&&A.preventDefault(),a?(R(!N),a(!N)):u&&u(A)},U=!!a||!!f||!!u||!!s||!!p;d&&(n=qe);const{onFocus:K,onBlur:oe,onKeyDown:j,onDragStart:k,onDragEnd:E,onDoubleClick:P,...z}=g??{},_=Dt({href:s,disabled:t,icon:n,variant:e,transition:w,className:c,isActive:N??!1,onToggle:a,activated:N,label:r,isInteractive:U,children:r,isFocused:M,isDragging:H,onEditCommit:m,isEditing:C}),q=o.useRef(null),ne=()=>{const A=(V??"").trim();if(!A){f&&f();return}m==null||m(A)};return l.jsxs(T,{contentEditable:!1,ref:v,href:s,className:_.chip,...z,onClick:A=>{C||B(A)},draggable:!t&&!!(g!=null&&g.draggable),onDragStart:A=>{!t&&(g!=null&&g.draggable)&&Q(!0),k==null||k(A)},onDragEnd:A=>{g!=null&&g.draggable&&Q(!1),E==null||E(A)},onDoubleClick:A=>{!t&&p&&!C&&(h==null||h(),A.preventDefault(),A.stopPropagation()),P==null||P(A)},onFocus:A=>{U&&W(!0),K==null||K(A)},onBlur:A=>{W(!1),oe==null||oe(A)},onKeyDown:A=>{const Y=A.key;if(!t&&C){Y==="Enter"?(A.preventDefault(),ne()):Y==="Escape"?(A.preventDefault(),x==null||x()):f&&(V==null?void 0:V.trim())===""&&(Y==="Backspace"||Y==="Delete"||Y==="Del")&&(A.preventDefault(),A.stopPropagation(),f());return}if(!t&&M){if(p&&!a&&(Y==="F2"||Y==="Enter")){A.preventDefault(),h==null||h();return}if(a&&(Y==="Enter"||Y===" "||Y==="Spacebar")){A.preventDefault();const te=!N;R(te),a(te)}f&&(Y==="Backspace"||Y==="Delete"||Y==="Del")&&(A.preventDefault(),A.stopPropagation(),f())}j==null||j(A)},disabled:t,"aria-pressed":a?N:void 0,style:{transition:w.duration+"s"},children:[U&&!t&&!C&&l.jsx(de,{style:{transition:w.duration+"s"},className:_.stateLayer,colorName:y({"on-surface-variant":!N,"on-secondary-container":N}),stateClassName:"state-ripple-group-[chip]"}),n&&l.jsx(ce,{icon:n,className:_.leadingIcon}),l.jsx("span",{ref:q,contentEditable:!!p&&!!C,suppressContentEditableWarning:!0,className:_.label,role:p?"textbox":void 0,spellCheck:!1,onInput:A=>{const Y=A.currentTarget.innerText;D(Y),S==null||S(Y)},onBlur:A=>{p&&C&&ne()},onKeyDown:A=>{if(p&&C&&A.key==="Enter"){A.preventDefault(),A.stopPropagation(),ne();return}p&&C&&A.key==="Escape"&&(A.preventDefault(),A.stopPropagation(),x==null||x())},children:r}),f&&!C&&l.jsx(ce,{icon:Le,className:_.trailingIcon,onMouseDown:A=>{A.preventDefault(),A.stopPropagation()},onClick:A=>{A.stopPropagation(),t||f()}})]})},Bs=({variant:e,disabled:t,isActive:n})=>({menuItem:y("group/menu-item text-start overflow-hidden flex items-center h-12 px-3 cursor-pointer outline-none select-none shrink-0 ","text-label-large","transition-colors duration-200","rounded-xl",{"text-on-surface":!e||e==="standard","opacity-38 pointer-events-none":t},(e==="vibrant"||n)&&["bg-secondary-container text-on-secondary-container"]),itemLabel:y("flex-1 truncate"),itemIcon:y("w-6 h-6 flex items-center justify-center menu-item-icon"),leadingIcon:y("mr-3"),trailingIcon:y("ml-3")}),Os=ee("menuItem",Bs),Xe=({label:e,children:t,value:n,leadingIcon:s,trailingIcon:r,disabled:c,variant:u="standard",href:a,onClick:d,onToggle:i,activated:f=!1,className:p,...h})=>{let m=null;const x=[];o.Children.forEach(t,$=>{var H,Q;o.isValidElement($)&&(((H=$.type)==null?void 0:H.name)==="Menu"||((Q=$.type)==null?void 0:Q.displayName)==="Menu")?m=$:x.push($)});const S=x.length>0?x:e,[w,L]=o.useState(!1),[b,g]=o.useState(f);b&&(s=qe);const T=o.useRef(null),F=o.useRef(null);o.useEffect(()=>{g(f)},[f]);const v=Os({variant:u,disabled:c,className:p,value:n,activated:b,isActive:b}),N=$=>{if(c){$.preventDefault();return}if(m){$.stopPropagation();return}i?(g(!b),i(!b)):d==null||d($)},R=()=>{F.current&&(clearTimeout(F.current),F.current=null),!c&&m&&L(!0)},M=()=>{m&&(F.current=setTimeout(()=>{L(!1)},150))};o.useEffect(()=>()=>{F.current&&clearTimeout(F.current)},[]);const W=r??(m?yn:void 0),C=a?"a":"button";return l.jsxs(C,{ref:T,href:a,className:v.menuItem,onClick:N,onMouseEnter:R,onMouseLeave:M,role:"option","aria-haspopup":!!m,"aria-expanded":w,"aria-pressed":i?b:void 0,tabIndex:c?-1:0,disabled:a?void 0:c,onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),m?L(!w):N($)),$.key==="ArrowRight"&&m&&(L(!0),$.stopPropagation()),$.key==="ArrowLeft"&&w&&(L(!1),$.stopPropagation())},...h,children:[l.jsx(de,{className:"absolute inset-0 pointer-events-none",colorName:y(u==="vibrant"||b?"on-tertiary-container":"on-secondary-container"),stateClassName:"state-ripple-group-[menu-item]"}),s&&l.jsx("div",{className:y(v.itemIcon,v.leadingIcon,"z-10 relative"),children:o.isValidElement(s)?s:l.jsx(ce,{icon:s})}),l.jsx("span",{className:y(v.itemLabel,"z-10 relative"),children:S}),W&&l.jsx("div",{className:y(v.itemIcon,v.trailingIcon,"z-10 relative"),children:o.isValidElement(W)?W:l.jsx(ce,{icon:W})}),m&&w&&l.jsx(Ee,{anchorRef:T,position:"inline-end span-block-end",hoverOpen:!0,children:l.jsx("div",{onMouseEnter:R,onMouseLeave:M,children:m})})]})},Me=({orientation:e="horizontal",className:t,...n})=>{const s=$t({orientation:e,className:t});return l.jsx("hr",{className:s.divider,...n})},Hs=({props:e})=>({headline:y("px-3 py-1 text-label-small opacity-60 mt-1",{"text-on-surface-variant":!(e!=null&&e.variant)||e.variant==="standard"})}),Vs=ee("menu-headline",Hs),Ue=({label:e,children:t,variant:n,className:s,...r})=>{const c=Vs({variant:n,className:s});return l.jsx("div",{className:c.headline,role:"group","aria-label":e,...r,children:t??e})},Be=({children:e,className:t,variant:n,label:s,...r})=>{const c=qt({children:e,className:t,variant:n,label:s,...r});return l.jsxs("div",{className:c.menuGroup,role:"group",...r,children:[s&&l.jsx("div",{className:c.groupLabel,children:s}),e]})},Ge=({children:e,className:t,variant:n="standard",...s})=>{const r=o.Children.toArray(e).some(d=>o.isValidElement(d)&&d.type===Be),c=Yt({children:e,className:t,variant:n,hasGroups:r,...s}),u=o.useRef(null),a=d=>o.Children.map(d,i=>{if(!o.isValidElement(i))return i;if(i.type===Be){const f=a(i.props.children);return o.cloneElement(i,{children:f,variant:n})}return i.type===Xe?o.cloneElement(i,{variant:n}):i.type===Ue?o.cloneElement(i,{variant:n}):i.type===Me?o.cloneElement(i,{className:y("my-1",i.props.className)}):i});return l.jsxs("div",{ref:u,className:c.menu,role:"listbox",...s,children:[a(e),o.Children.count(e)===0&&l.jsx("div",{className:"px-4 py-3 text-on-surface-variant opacity-60 italic text-body-medium",children:"No options"})]})},zs=({trigger:e,children:t,onItemSelect:n,...s})=>{const[r,c]=o.useState(null),u=o.useRef(null),a=p=>{p.preventDefault(),c({mouseX:p.clientX,mouseY:p.clientY})},d=()=>{c(null)},i=p=>{d(),n==null||n(p)};o.useEffect(()=>{if(!r)return;const p=()=>c(null);return window.addEventListener("click",p),window.addEventListener("scroll",p,!0),()=>{window.removeEventListener("click",p),window.removeEventListener("scroll",p,!0)}},[r]);const f=o.isValidElement(e)?o.cloneElement(e,{onContextMenu:p=>{var h,m;a(p),(m=(h=e.props).onContextMenu)==null||m.call(h,p)}}):l.jsx("div",{onContextMenu:a,className:"inline-block",children:e});return l.jsxs(l.Fragment,{children:[f,l.jsx("div",{ref:u,style:{position:"fixed",top:(r==null?void 0:r.mouseY)??0,left:(r==null?void 0:r.mouseX)??0,width:1,height:1,pointerEvents:"none",visibility:"hidden"}}),r&&l.jsx(Ee,{anchorRef:u,position:"bottom right",onClick:p=>p.stopPropagation(),children:l.jsx(Ge,{onItemSelect:i,...s,children:t})})]})},ae=[];for(let e=0;e<256;++e)ae.push((e+256).toString(16).slice(1));function Ys(e,t=0){return(ae[e[t+0]]+ae[e[t+1]]+ae[e[t+2]]+ae[e[t+3]]+"-"+ae[e[t+4]]+ae[e[t+5]]+"-"+ae[e[t+6]]+ae[e[t+7]]+"-"+ae[e[t+8]]+ae[e[t+9]]+"-"+ae[e[t+10]]+ae[e[t+11]]+ae[e[t+12]]+ae[e[t+13]]+ae[e[t+14]]+ae[e[t+15]]).toLowerCase()}let We;const _s=new Uint8Array(16);function qs(){if(!We){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");We=crypto.getRandomValues.bind(crypto)}return We(_s)}const Xs=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ut={randomUUID:Xs};function vn(e,t,n){var r;if(ut.randomUUID&&!e)return ut.randomUUID();e=e||{};const s=e.random??((r=e.rng)==null?void 0:r.call(e))??qs();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,Ys(s)}const Us=({variant:e="input",className:t,scrollable:n=!0,draggable:s=!1,items:r,onItemsChange:c})=>{const u=r??[],a=o.useRef(null),[d,i]=o.useState(!1),f=o.useRef(new WeakMap),p=o.useCallback(v=>{const N=f.current;let R=N.get(v);return R||(R=vn(),N.set(v,R)),R},[]);o.useEffect(()=>{var v,N;d&&(e=="input"?(v=T.current)==null||v.focus():(N=a.current)==null||N.focus())},[d]);const h=o.useRef([]),m=o.useRef(!1),x=o.useCallback(v=>{c==null||c(v(u))},[c,u]),S=o.useCallback(v=>{x(N=>N.filter((R,M)=>M!==v))},[x]),w=Ft({scrollable:n,className:t,variant:e}),L=o.useCallback((v="")=>{if(e!=="input"||m.current)return;m.current=!0;const N={label:v},R=p(N),M=[...u,N];c==null||c(M),requestAnimationFrame(()=>{g(R),m.current=!1})},[e,c,u,p]),[b,g]=o.useState(null);o.useEffect(()=>{var v;if(b){const N=u.findIndex(R=>p(R)===b);if(N!==-1){const R=h.current[N];(v=R==null?void 0:R.focus)==null||v.call(R);const M=a.current,W=R.offsetLeft+R.offsetWidth/2-M.offsetWidth/2;M.scrollTo({left:W,behavior:"smooth"})}}},[b,u,p]);const T=o.useRef(null),F=(d||u.length===0)&&e==="input";return l.jsxs("div",{ref:a,role:"list","aria-label":"Chips",className:w.chips,tabIndex:e==="input"?0:void 0,onFocus:v=>{v.target===v.currentTarget&&i(!0)},onBlur:()=>{i(!1)},onKeyDown:v=>{var $;if(e!=="input")return;const N=v.key,M=v.target===v.currentTarget;if(!d)return;const W=document.activeElement,C=h.current.findIndex(H=>H===W);if(N==="ArrowLeft"){v.preventDefault();const H=C>0?C-1:u.length-1,Q=p(u[H]);g(Q);return}if(N==="ArrowRight"){v.preventDefault();const H=C>=0?(C+1)%Math.max(1,u.length):0,Q=p(u[H]);g(Q);return}if(N==="Home"){v.preventDefault();const H=p(u[0]);g(H);return}if(N==="End"){v.preventDefault();const H=p(u[u.length-1]);g(H);return}if(M&&N==="Backspace"){if(v.preventDefault(),u.length>0){const H=h.current[u.length-1];($=H==null?void 0:H.focus)==null||$.call(H)}return}},children:[u.map((v,N)=>{const R=p(v),M=e==="input",W=M?{editable:!0,editing:b===R,onEditCommit:C=>{i(!0),x($=>$.map((H,Q)=>Q===N?{...H,label:C}:H))},onEditCancel:()=>{i(!0)},onChange:()=>{if(h.current.length==N+1){const C=a.current;requestAnimationFrame(()=>{C.scrollTo({left:C.scrollWidth,behavior:"smooth"})})}}}:{};return l.jsx(Te,{ref:C=>h.current[N]=C,label:v.label??"",icon:v.icon,activated:v.activated,disabled:v.disabled,variant:v.variant,href:v.href,draggable:s,...W,onToggle:v.activated===void 0?void 0:C=>x($=>$.map((H,Q)=>Q===N?{...H,activated:C}:H)),onBlur:()=>{b===R&&g(null)},onRemove:M?()=>{i(!0),S(N)}:void 0},R)}),d&&l.jsxs(l.Fragment,{children:[l.jsx(Me,{orientation:"vertical",className:"animate-[var(--animate-blink)] border-outline",style:{"--animate-blink":"blink 1s cubic-bezier(0.4, 0, 0.6, 1) infinite"}}),l.jsx("style",{children:`
|
|
4
|
+
* Copyright 2026 Fonticons, Inc.
|
|
5
|
+
*/var Rs={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"]},Ds={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"]},As={prefix:"fas",iconName:"chevron-up",icon:[448,512,[],"f077","M201.4 105.4c12.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 173.3 54.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},xn={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"]},Fs={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"]},Xe={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"]},Le={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"]},Ps=Le,vn={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"]},$s={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"]},Ws={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 Ts=({checked:e,defaultChecked:t,indeterminate:n=!1,disabled:s=!1,error:r=!1,onChange:c,id:u,name:a,value:d,style:i,className:f,...y})=>{const h=o.useId(),m=u||h,x=e!==void 0,[b,w]=o.useState(t??!1),M=x?e:b,[S,g]=o.useState(!1),$=o.useRef(null);o.useEffect(()=>{$.current&&($.current.indeterminate=n)},[n]);const F=k=>{s||(x||w(k.target.checked),c&&c(k))},v=Rt({isChecked:!!M,isIndeterminate:n,isDisabled:s,isError:r,isFocused:S,isHovered:!1});return l.jsx("div",{className:p(v.checkbox,f,"group/checkbox"),style:i,children:l.jsxs(de,{stateClassName:v.stateLayer,colorName:M||n?"primary":"on-surface",children:[l.jsx("input",{ref:$,type:"checkbox",id:m,name:a,value:d,checked:M,disabled:s,onChange:F,onFocus:()=>g(!0),onBlur:()=>g(!1),className:v.input,...y}),l.jsx("div",{className:v.box}),l.jsx(X.AnimatePresence,{children:(M||n)&&l.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:l.jsx(ce,{icon:n?Rs:Xe,className:"size-3.5"})})})]})})},Be=({variant:e="outlined",disabled:t=!1,icon:n,href:s,label:r,className:c,onClick:u,onToggle:a,activated:d,ref:i,onRemove:f,editable:y,onEditStart:h,onEditCommit:m,onEditCancel:x,onChange:b,transition:w,children:M,editing:S,...g})=>{if(M&&(r=M),r===void 0&&!y)throw new Error("Chip component requires either a label prop or children content");const $=s?"a":"button",F=o.useRef(null),v=i||F,[k,R]=o.useState(d),[I,W]=o.useState(!1),[N,z]=o.useState(S&&y),[O,ee]=o.useState(!1),[H,D]=o.useState(typeof r=="string"?r:""),C=o.useRef(null);o.useEffect(()=>{R(d)},[d]),o.useEffect(()=>{if(S&&z(S),y&&I){const A=setTimeout(()=>{g!=null&&g.draggable&&O||z(!0)},1e3);return()=>clearTimeout(A)}else I||z(!1)},[I,y,O,g,H]),o.useEffect(()=>{if(N){D(typeof r=="string"?r:"");const A=q.current||C.current;if(A){A.focus();const Y=document.createRange();Y.selectNodeContents(A),Y.collapse(!1);const te=window.getSelection();te==null||te.removeAllRanges(),te==null||te.addRange(Y)}}},[N]),w={duration:.3,...w};const T=A=>{t&&A.preventDefault(),a?(R(!k),a(!k)):u&&u(A)},U=!!a||!!f||!!u||!!s||!!y;d&&(n=Xe);const{onFocus:J,onBlur:oe,onKeyDown:j,onDragStart:L,onDragEnd:E,onDoubleClick:P,...V}=g??{},_=At({href:s,disabled:t,icon:n,variant:e,transition:w,className:c,isActive:k??!1,onToggle:a,activated:k,label:r,isInteractive:U,children:r,isFocused:I,isDragging:O,onEditCommit:m,isEditing:N}),q=o.useRef(null),ne=()=>{const A=(H??"").trim();if(!A){f&&f();return}m==null||m(A)};return l.jsxs($,{contentEditable:!1,ref:v,href:s,className:_.chip,...V,onClick:A=>{N||T(A)},draggable:!t&&!!(g!=null&&g.draggable),onDragStart:A=>{!t&&(g!=null&&g.draggable)&&ee(!0),L==null||L(A)},onDragEnd:A=>{g!=null&&g.draggable&&ee(!1),E==null||E(A)},onDoubleClick:A=>{!t&&y&&!N&&(h==null||h(),A.preventDefault(),A.stopPropagation()),P==null||P(A)},onFocus:A=>{U&&W(!0),J==null||J(A)},onBlur:A=>{W(!1),oe==null||oe(A)},onKeyDown:A=>{const Y=A.key;if(!t&&N){Y==="Enter"?(A.preventDefault(),ne()):Y==="Escape"?(A.preventDefault(),x==null||x()):f&&(H==null?void 0:H.trim())===""&&(Y==="Backspace"||Y==="Delete"||Y==="Del")&&(A.preventDefault(),A.stopPropagation(),f());return}if(!t&&I){if(y&&!a&&(Y==="F2"||Y==="Enter")){A.preventDefault(),h==null||h();return}if(a&&(Y==="Enter"||Y===" "||Y==="Spacebar")){A.preventDefault();const te=!k;R(te),a(te)}f&&(Y==="Backspace"||Y==="Delete"||Y==="Del")&&(A.preventDefault(),A.stopPropagation(),f())}j==null||j(A)},disabled:t,"aria-pressed":a?k:void 0,style:{transition:w.duration+"s"},children:[U&&!t&&!N&&l.jsx(de,{style:{transition:w.duration+"s"},className:_.stateLayer,colorName:p({"on-surface-variant":!k,"on-secondary-container":k}),stateClassName:"state-ripple-group-[chip]"}),n&&l.jsx(ce,{icon:n,className:_.leadingIcon}),l.jsx("span",{ref:q,contentEditable:!!y&&!!N,suppressContentEditableWarning:!0,className:_.label,role:y?"textbox":void 0,spellCheck:!1,onInput:A=>{const Y=A.currentTarget.innerText;D(Y),b==null||b(Y)},onBlur:A=>{y&&N&&ne()},onKeyDown:A=>{if(y&&N&&A.key==="Enter"){A.preventDefault(),A.stopPropagation(),ne();return}y&&N&&A.key==="Escape"&&(A.preventDefault(),A.stopPropagation(),x==null||x())},children:r}),f&&!N&&l.jsx(ce,{icon:Le,className:_.trailingIcon,onMouseDown:A=>{A.preventDefault(),A.stopPropagation()},onClick:A=>{A.stopPropagation(),t||f()}})]})},Bs=({variant:e,disabled:t,isActive:n})=>({menuItem:p("group/menu-item text-start overflow-hidden flex items-center h-12 px-3 cursor-pointer outline-none select-none shrink-0 ","text-label-large","transition-colors duration-200","rounded-xl",{"text-on-surface":!e||e==="standard","opacity-38 pointer-events-none":t},(e==="vibrant"||n)&&["bg-secondary-container text-on-secondary-container"]),itemLabel:p("flex-1 truncate"),itemIcon:p("w-6 h-6 flex items-center justify-center menu-item-icon"),leadingIcon:p("mr-3"),trailingIcon:p("ml-3")}),Os=Q("menuItem",Bs),De=({label:e,children:t,leadingIcon:n,trailingIcon:s,disabled:r,variant:c="standard",href:u,onClick:a,onToggle:d,activated:i=!1,className:f,...y})=>{let h=null;const m=[];o.Children.forEach(t,N=>{var z,O;o.isValidElement(N)&&(((z=N.type)==null?void 0:z.name)==="Menu"||((O=N.type)==null?void 0:O.displayName)==="Menu")?h=N:m.push(N)});const x=m.length>0?m:e,[b,w]=o.useState(!1),[M,S]=o.useState(i);M&&(n=Xe);const g=o.useRef(null),$=o.useRef(null);o.useEffect(()=>{S(i)},[i]);const F=Os({variant:c,disabled:r,className:f,activated:M,isActive:M}),v=N=>{if(console.log("refrefd",r,h,d),r){N.preventDefault();return}if(h){N.stopPropagation();return}d?(S(!M),d(!M)):(console.log("click",a),a==null||a(N))},k=()=>{$.current&&(clearTimeout($.current),$.current=null),!r&&h&&w(!0)},R=()=>{h&&($.current=setTimeout(()=>{w(!1)},150))};o.useEffect(()=>()=>{$.current&&clearTimeout($.current)},[]);const I=s??(h?xn:void 0),W=u?"a":"button";return l.jsxs(W,{ref:g,href:u,className:F.menuItem,onClick:v,onMouseEnter:k,onMouseLeave:R,role:"option","aria-haspopup":!!h,"aria-expanded":b,"aria-pressed":d?M:void 0,tabIndex:r?-1:0,disabled:u?void 0:r,onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),h?w(!b):v(N)),N.key==="ArrowRight"&&h&&(w(!0),N.stopPropagation()),N.key==="ArrowLeft"&&b&&(w(!1),N.stopPropagation())},...y,children:[l.jsx(de,{className:"absolute inset-0 pointer-events-none",colorName:p(c==="vibrant"||M?"on-tertiary-container":"on-secondary-container"),stateClassName:"state-ripple-group-[menu-item]"}),n&&l.jsx("div",{className:p(F.itemIcon,F.leadingIcon,"z-10 relative"),children:o.isValidElement(n)?n:l.jsx(ce,{icon:n})}),l.jsx("span",{className:p(F.itemLabel,"z-10 relative"),children:x}),I&&l.jsx("div",{className:p(F.itemIcon,F.trailingIcon,"z-10 relative"),children:o.isValidElement(I)?I:l.jsx(ce,{icon:I})}),h&&b&&l.jsx(Ne,{anchorRef:g,position:"inline-end span-block-end",hoverOpen:!0,children:l.jsx("div",{onMouseEnter:k,onMouseLeave:R,children:h})})]})},Me=({orientation:e="horizontal",className:t,...n})=>{const s=Wt({orientation:e,className:t});return l.jsx("hr",{className:s.divider,...n})},Hs=({props:e})=>({headline:p("px-3 py-1 text-label-small opacity-60 mt-1",{"text-on-surface-variant":!(e!=null&&e.variant)||e.variant==="standard"})}),Vs=Q("menu-headline",Hs),Ue=({label:e,children:t,variant:n,className:s,...r})=>{const c=Vs({variant:n,className:s});return l.jsx("div",{className:c.headline,role:"group","aria-label":e,...r,children:t??e})},Oe=({children:e,className:t,variant:n,label:s,...r})=>{const c=Xt({children:e,className:t,variant:n,label:s,...r});return l.jsxs("div",{className:c.menuGroup,role:"group",...r,children:[s&&l.jsx("div",{className:c.groupLabel,children:s}),e]})},Ge=({children:e,className:t,variant:n="standard",...s})=>{const r=o.Children.toArray(e).some(d=>o.isValidElement(d)&&d.type===Oe),c=_t({children:e,className:t,variant:n,hasGroups:r,...s}),u=o.useRef(null),a=d=>o.Children.map(d,i=>{if(!o.isValidElement(i))return i;if(i.type===Oe){const f=a(i.props.children);return o.cloneElement(i,{children:f,variant:n})}return i.type===De?o.cloneElement(i,{variant:n}):i.type===Ue?o.cloneElement(i,{variant:n}):i.type===Me?o.cloneElement(i,{className:p("my-1",i.props.className)}):i});return l.jsxs("div",{ref:u,className:c.menu,role:"listbox",...s,children:[a(e),o.Children.count(e)===0&&l.jsx("div",{className:"px-4 py-3 text-on-surface-variant opacity-60 italic text-body-medium",children:"No options"})]})},zs=({trigger:e,children:t,...n})=>{const[s,r]=o.useState(null),c=o.useRef(null),u=f=>{f.preventDefault(),r({mouseX:f.clientX,mouseY:f.clientY})},a=()=>{r(null)},d=()=>{a()};o.useEffect(()=>{if(!s)return;const f=()=>r(null);return window.addEventListener("click",f),window.addEventListener("scroll",f,!0),()=>{window.removeEventListener("click",f),window.removeEventListener("scroll",f,!0)}},[s]);const i=o.isValidElement(e)?o.cloneElement(e,{onContextMenu:f=>{var y,h;u(f),(h=(y=e.props).onContextMenu)==null||h.call(y,f)}}):l.jsx("div",{onContextMenu:u,className:"inline-block",children:e});return l.jsxs(l.Fragment,{children:[i,l.jsx("div",{ref:c,style:{position:"fixed",top:(s==null?void 0:s.mouseY)??0,left:(s==null?void 0:s.mouseX)??0,width:1,height:1,pointerEvents:"none",visibility:"hidden"}}),s&&l.jsx(Ne,{anchorRef:c,position:"bottom right",onClick:f=>f.stopPropagation(),children:l.jsx(Ge,{onClick:d,...n,children:t})})]})},ae=[];for(let e=0;e<256;++e)ae.push((e+256).toString(16).slice(1));function Ys(e,t=0){return(ae[e[t+0]]+ae[e[t+1]]+ae[e[t+2]]+ae[e[t+3]]+"-"+ae[e[t+4]]+ae[e[t+5]]+"-"+ae[e[t+6]]+ae[e[t+7]]+"-"+ae[e[t+8]]+ae[e[t+9]]+"-"+ae[e[t+10]]+ae[e[t+11]]+ae[e[t+12]]+ae[e[t+13]]+ae[e[t+14]]+ae[e[t+15]]).toLowerCase()}let Te;const _s=new Uint8Array(16);function qs(){if(!Te){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Te=crypto.getRandomValues.bind(crypto)}return Te(_s)}const Xs=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),dt={randomUUID:Xs};function gn(e,t,n){var r;if(dt.randomUUID&&!e)return dt.randomUUID();e=e||{};const s=e.random??((r=e.rng)==null?void 0:r.call(e))??qs();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,Ys(s)}const Us=({variant:e="input",className:t,scrollable:n=!0,draggable:s=!1,items:r,onItemsChange:c})=>{const u=r??[],a=o.useRef(null),[d,i]=o.useState(!1),f=o.useRef(new WeakMap),y=o.useCallback(v=>{const k=f.current;let R=k.get(v);return R||(R=gn(),k.set(v,R)),R},[]);o.useEffect(()=>{var v,k;d&&(e=="input"?(v=$.current)==null||v.focus():(k=a.current)==null||k.focus())},[d]);const h=o.useRef([]),m=o.useRef(!1),x=o.useCallback(v=>{c==null||c(v(u))},[c,u]),b=o.useCallback(v=>{x(k=>k.filter((R,I)=>I!==v))},[x]),w=Pt({scrollable:n,className:t,variant:e}),M=o.useCallback((v="")=>{if(e!=="input"||m.current)return;m.current=!0;const k={label:v},R=y(k),I=[...u,k];c==null||c(I),requestAnimationFrame(()=>{g(R),m.current=!1})},[e,c,u,y]),[S,g]=o.useState(null);o.useEffect(()=>{var v;if(S){const k=u.findIndex(R=>y(R)===S);if(k!==-1){const R=h.current[k];(v=R==null?void 0:R.focus)==null||v.call(R);const I=a.current,W=R.offsetLeft+R.offsetWidth/2-I.offsetWidth/2;I.scrollTo({left:W,behavior:"smooth"})}}},[S,u,y]);const $=o.useRef(null),F=(d||u.length===0)&&e==="input";return l.jsxs("div",{ref:a,role:"list","aria-label":"Chips",className:w.chips,tabIndex:e==="input"?0:void 0,onFocus:v=>{v.target===v.currentTarget&&i(!0)},onBlur:()=>{i(!1)},onKeyDown:v=>{var z;if(e!=="input")return;const k=v.key,I=v.target===v.currentTarget;if(!d)return;const W=document.activeElement,N=h.current.findIndex(O=>O===W);if(k==="ArrowLeft"){v.preventDefault();const O=N>0?N-1:u.length-1,ee=y(u[O]);g(ee);return}if(k==="ArrowRight"){v.preventDefault();const O=N>=0?(N+1)%Math.max(1,u.length):0,ee=y(u[O]);g(ee);return}if(k==="Home"){v.preventDefault();const O=y(u[0]);g(O);return}if(k==="End"){v.preventDefault();const O=y(u[u.length-1]);g(O);return}if(I&&k==="Backspace"){if(v.preventDefault(),u.length>0){const O=h.current[u.length-1];(z=O==null?void 0:O.focus)==null||z.call(O)}return}},children:[u.map((v,k)=>{const R=y(v),I=e==="input",W=I?{editable:!0,editing:S===R,onEditCommit:N=>{i(!0),x(z=>z.map((O,ee)=>ee===k?{...O,label:N}:O))},onEditCancel:()=>{i(!0)},onChange:()=>{if(h.current.length==k+1){const N=a.current;requestAnimationFrame(()=>{N.scrollTo({left:N.scrollWidth,behavior:"smooth"})})}}}:{};return l.jsx(Be,{ref:N=>h.current[k]=N,label:v.label??"",icon:v.icon,activated:v.activated,disabled:v.disabled,variant:v.variant,href:v.href,draggable:s,...W,onToggle:v.activated===void 0?void 0:N=>x(z=>z.map((O,ee)=>ee===k?{...O,activated:N}:O)),onBlur:()=>{S===R&&g(null)},onRemove:I?()=>{i(!0),b(k)}:void 0},R)}),d&&l.jsxs(l.Fragment,{children:[l.jsx(Me,{orientation:"vertical",className:"animate-[var(--animate-blink)] border-outline",style:{"--animate-blink":"blink 1s cubic-bezier(0.4, 0, 0.6, 1) infinite"}}),l.jsx("style",{children:`
|
|
6
6
|
@keyframes blink {
|
|
7
7
|
0%, 50% { opacity: 1; }
|
|
8
8
|
50.01%, 100% { opacity: 0; }
|
|
9
9
|
}
|
|
10
|
-
`})]}),F&&l.jsx(Te,{ref:T,className:"opacity-0",draggable:s,editable:!0,editing:!0,onChange:v=>{var N;if(v=v.replace(/( )+/g," ").trim(),console.log("Ghost chip onChange",v,!!v),v)L(v);else if(u.length>0){const R=h.current[u.length-1];(N=R==null?void 0:R.focus)==null||N.call(R)}},onEditCommit:()=>{},onBlur:()=>{i(!1)},onFocus:v=>{i(!0),v.stopPropagation()},children:" "})]})};function gn({trigger:e=["hover","focus"],isOpen:t,defaultOpen:n=!1,onOpenChange:s,openDelay:r=400,closeDelay:c=150,id:u}={}){const a=o.useId(),d=u??`tooltip-${a}`,i=Array.isArray(e)?e:[e],f=typeof t=="boolean",[p,h]=o.useState(n?"hovered":"hidden"),[m,x]=o.useState(!1),S=o.useRef(null),w=o.useRef(null),L=o.useCallback(()=>{S.current&&(clearTimeout(S.current),S.current=null),w.current&&(clearTimeout(w.current),w.current=null)},[]);o.useEffect(()=>()=>L(),[L]);const b=o.useCallback(D=>{if(f){const I=D!=="hidden";s==null||s(I)}else{h(D);const I=D!=="hidden";s==null||s(I)}},[f,s]),g=f?t?"hovered":"hidden":p,T=g!=="hidden",F=D=>{switch(D){case"hidden":return 0;case"hovered":return 1;case"focused":return 2;case"clicked":return 3;default:return 0}},v=o.useCallback(D=>{L(),!(F(D)<=F(g))&&(S.current=setTimeout(()=>{b(D)},r))},[L,r,g,b]),N=o.useCallback(D=>{L(),w.current=setTimeout(()=>{(!f&&F(p)<=F(D)||f)&&b("hidden")},c)},[L,c,p,f,b]),R=o.useCallback(()=>{i.includes("hover")&&v("hovered")},[i,v]),M=o.useCallback(()=>{i.includes("hover")&&(g==="focused"||g==="clicked"||m||N("hovered"))},[i,g,m,N]),W=o.useCallback(()=>{i.includes("focus")&&(L(),b("focused"))},[i,L,b]),C=o.useCallback(()=>{if(i.includes("focus")&&g!=="clicked"){if(i.includes("hover")&&m){b("hovered");return}N("focused")}},[i,g,m,N,b]),$=o.useCallback(()=>{i.includes("click")&&(L(),b(g==="clicked"?"hidden":"clicked"))},[i,g,L,b]),H=o.useCallback(D=>{D.key==="Escape"&&T&&(L(),b("hidden"),D.preventDefault())},[T,L,b]),Q=o.useCallback(()=>{x(!0),L()},[L]),V=o.useCallback(()=>{x(!1),i.includes("hover")&&g==="hovered"&&N("hovered")},[i,g,N]);return{triggerProps:{"aria-describedby":T?d:void 0,onMouseEnter:R,onMouseLeave:M,onFocus:W,onBlur:C,onClick:$,onKeyDown:H},tooltipProps:{id:d,role:"tooltip","aria-hidden":!T,onMouseEnter:Q,onMouseLeave:V},isOpen:T,state:g}}const Ke=({variant:e="plain",buttons:t,className:n,children:s,title:r,text:c,content:u,position:a,targetRef:d,ref:i,trigger:f=["hover","focus"],transition:p,openDelay:h=400,closeDelay:m=150,isOpen:x,defaultOpen:S=!1,onOpenChange:w,id:L,anchorRef:b,...g})=>{const F=a||(e==="rich"?"bottom-right":"bottom");if(p={duration:.3,...p},!s&&!d)throw new Error("Tooltip must have a child or a targetRef");t&&!Array.isArray(t)&&(t=[t]);const v=o.useRef(null),R=b||(d||v),{triggerProps:M,tooltipProps:W,isOpen:C}=gn({trigger:f,isOpen:x,defaultOpen:S,onOpenChange:w,openDelay:h,closeDelay:m,id:L}),$=!d&&o.isValidElement(s)?o.cloneElement(s,{ref:v,...M,onMouseEnter:V=>{var D,I;M.onMouseEnter(),(I=(D=s.props)==null?void 0:D.onMouseEnter)==null||I.call(D,V)},onMouseLeave:V=>{var D,I;M.onMouseLeave(),(I=(D=s.props)==null?void 0:D.onMouseLeave)==null||I.call(D,V)},onFocus:V=>{var D,I;M.onFocus(),(I=(D=s.props)==null?void 0:D.onFocus)==null||I.call(D,V)},onBlur:V=>{var D,I;M.onBlur(),(I=(D=s.props)==null?void 0:D.onBlur)==null||I.call(D,V)},onClick:V=>{var D,I;M.onClick(),(I=(D=s.props)==null?void 0:D.onClick)==null||I.call(D,V)},onKeyDown:V=>{var D,I;M.onKeyDown(V),(I=(D=s.props)==null?void 0:D.onKeyDown)==null||I.call(D,V)}}):s;o.useEffect(()=>{if(!d)return;const V=d.current;if(!V)return;const D=()=>M.onMouseEnter(),I=()=>M.onMouseLeave(),B=()=>M.onFocus(),U=()=>M.onBlur(),K=()=>M.onClick(),oe=j=>M.onKeyDown(j);return V.addEventListener("mouseenter",D),V.addEventListener("mouseleave",I),V.addEventListener("focus",B,!0),V.addEventListener("blur",U,!0),V.addEventListener("click",K),V.addEventListener("keydown",oe),M["aria-describedby"]?V.setAttribute("aria-describedby",M["aria-describedby"]):V.removeAttribute("aria-describedby"),()=>{V.removeEventListener("mouseenter",D),V.removeEventListener("mouseleave",I),V.removeEventListener("focus",B,!0),V.removeEventListener("blur",U,!0),V.removeEventListener("click",K),V.removeEventListener("keydown",oe)}},[d,M]);const H=hn({variant:e,buttons:t,className:n,title:r,text:c,position:F,trigger:f,targetRef:d,children:s}),Q={open:{opacity:1,height:"auto"},close:{opacity:0,height:16}};return l.jsxs(l.Fragment,{children:[$,l.jsx(X.AnimatePresence,{children:C&&l.jsx(Ee,{anchorRef:R,position:F,children:l.jsx(X.motion.div,{initial:"close",variants:Q,animate:"open",transition:{duration:p.duration},exit:"close",className:H.toolTip,...g,...W,children:l.jsx("div",{className:H.container,children:u?l.jsx("div",{className:H.content,children:u}):l.jsxs(l.Fragment,{children:[r&&l.jsx("div",{className:H.subHead,children:r}),c&&l.jsx("div",{className:H.supportingText,children:c}),t&&l.jsx("div",{className:H.actions,children:Array.isArray(t)&&t.map((V,D)=>l.jsx(ye,{size:"small",variant:"text",...V},D))})]})})})})})]})},De=({className:e,label:t,variant:n="primary",size:s="medium",href:r,type:c,icon:u,extended:a=!1,ref:d,transition:i,children:f,...p})=>{if(f&&(t=f),!t)throw new Error("FAB component requires either a label prop or children content");const h=r?"a":"button",m=Tt({href:r,icon:u,extended:a,label:t,size:s,variant:n,className:e,transition:i,children:t});i={duration:.3,...i};const x=o.useRef(null),S=d||x,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...i,opacity:{duration:i.duration/2,delay:i.duration-i.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...i,marginLeft:{duration:i.duration/2,delay:i.duration-i.duration/2}}}};return l.jsxs(h,{...p,ref:S,href:r,"aria-label":a?void 0:t,className:m.fab,children:[l.jsx(Ke,{trigger:a?null:void 0,text:t,targetRef:S}),l.jsx(de,{style:{transition:i.duration+"s"},className:m.stateLayer,colorName:y({"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]"}),l.jsx(ce,{icon:u,className:m.icon}),l.jsx(X.AnimatePresence,{children:a&&l.jsx(X.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:m.label,children:t})})]})},be=({variant:e="standard",href:t,disabled:n=!1,title:s,label:r,onToggle:c,activated:u=!1,onClick:a,icon:d,size:i="medium",iconSelected:f,className:p,ref:h,width:m="default",shape:x="rounded",allowShapeTransformation:S=!0,transition:w,children:L,...b})=>{if(L&&(r=L),!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,T]=o.useState(u),F=W=>{n&&W.preventDefault(),c?(T(!g),c(!g)):a&&a(W)};o.useEffect(()=>{T(u)},[u]);const v=t?"a":"button",N=Vt({transition:w,shape:x,allowShapeTransformation:S,width:m,href:t,activated:g,label:r,iconSelected:f,isActive:g,onToggle:c,disabled:n,icon:d,variant:e,className:p,size:i,children:r,...b}),R=o.useRef(null),M=h||R;return w={duration:.3,...w},l.jsxs(v,{disabled:n,href:t,style:{transition:w.duration+"s"},className:N.iconButton,"aria-label":r,...b,title:void 0,onClick:F,ref:M,children:[s!==null&&l.jsx(Ke,{targetRef:M,trigger:n?null:void 0,text:s}),l.jsx("div",{className:N.touchTarget}),l.jsx(de,{style:{transition:w.duration+"s"},className:N.stateLayer,colorName:y(e==="standard"&&{"on-surface-variant":!g,"on-primary":g},e==="filled"&&{"on-surface-variant":!g&&!!c,"on-primary":g||!c},e==="tonal"&&{"on-secondary":g&&!!c,"on-secondary-container":!g||!c},e==="outlined"&&{"inverse-on-surface":g&&!!c,"on-surface-variant":!g||!c}),stateClassName:"state-ripple-group-[icon-button]"}),d?l.jsx(ce,{icon:d,className:N.icon}):L]})},Gs=({className:e,label:t,variant:n="primary",size:s="medium",href:r,icon:c,extended:u=!1,ref:a,transition:d,children:i,open:f,defaultOpen:p=!1,onOpenChange:h,...m})=>{d={duration:.3,ease:"easeInOut",...d};const x=o.useRef(null),S=a||x,w=typeof f=="boolean",[L,b]=o.useState(p),g=w?f:L,T=C=>{w||b(C),h==null||h(C)},F=o.Children.toArray(i).filter(C=>o.isValidElement(C)&&C.type===ye),v=Ot({href:r,icon:c,extended:u,label:t,size:s,variant:n,className:e,transition:d,children:t,open:g}),N=X.motion.create(De),R=X.motion.create(be),M=C=>l.jsx(N,{icon:c,extended:u,label:t,variant:n+"Container",size:s,className:v.fab+" "+(e??""),"aria-expanded":g,onClick:()=>T(!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},...C}),W=o.useId();return l.jsxs("div",{className:v.fabMenu,ref:S,...m,children:[l.jsx(X.AnimatePresence,{children:g&&l.jsx("div",{className:v.actions,role:"menu","aria-hidden":!g,children:(()=>{const C=F.length;return F.map(($,H)=>{$.props;const Q=C-1-H,V=((d==null?void 0:d.delay)??0)+Q*.06,D={open:{overflow:"visible",opacity:1,width:"auto",transition:{...d,delay:V,opacity:{delay:(d==null?void 0:d.duration)/2+V}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...d,delay:V,opacity:{duration:(d==null?void 0:d.duration)/1.5}}}};return l.jsx(X.motion.div,{initial:"close",animate:"open",variants:D,transition:d,exit:"close",children:o.cloneElement($,{key:H,shape:"rounded",variant:"filled",className:()=>({button:y("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:y({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),M({className:"invisible pointer-events-none"}),l.jsxs("div",{className:"absolute right-0 top-0",children:[!g&&M({className:"",layout:!0,layoutId:"fab-menu"+W}),g&&l.jsx(l.Fragment,{children:l.jsx(R,{layout:!0,layoutId:"fab-menu"+W,variant:"filled",className:()=>({iconButton:y({"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:y({"[--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:Ps,onClick:()=>T(!1),children:"Close"})})]})]})},Ks=({className:e,valueFormatter:t,step:n=10,name:s,value:r=0,min:c=0,max:u=100,marks:a=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:i,...f})=>{const p=I=>{const B=m(),U=h();return I===1/0?100:I===-1/0?0:(I-B)/(U-B)*100},h=(I=!1)=>I?u:u==1/0?a[(a==null?void 0:a.length)-1].value:u,m=(I=!1)=>I?c:c==-1/0?a[0].value:c,x=I=>{const B=m(!1);return(h(!1)-B)*I/100+B},[S,w]=o.useState(!1),L=o.useRef(null),b=d||L,[g,T]=o.useState(r),[F,v]=o.useState(p(r)),[N,R]=o.useState(!1);o.useEffect(()=>{T(r),v(p(r))},[r]);const M=I=>{R(!0),w(!0),$(I)},W=()=>{R(!1),w(!1)};o.useEffect(()=>(N?(window.addEventListener("mouseup",W),window.addEventListener("mousemove",$),window.addEventListener("touchend",W),window.addEventListener("touchmove",$)):(window.removeEventListener("mouseup",W),window.removeEventListener("mousemove",$),window.removeEventListener("touchend",W),window.removeEventListener("touchmove",$)),()=>{window.removeEventListener("mouseup",W),window.removeEventListener("mousemove",$),window.removeEventListener("touchend",W),window.removeEventListener("touchmove",$)}),[N]);const C=Kt({className:e,isChanging:S,marks:a,max:u,min:c,name:s,step:n,value:g,valueFormatter:t,onChange:i}),$=I=>{const B=b==null?void 0:b.current;if(B){const U=B.getBoundingClientRect().left,oe=((I.type==="touchmove"||I.type==="touchstart"?I.touches[0].clientX:I.clientX)-U)/B.offsetWidth*100;H({percent:oe})}},H=({percent:I,value:B})=>{if(I){if(I>=100){T(h(!0)),v(100);return}if(I<=0){T(m(!0)),v(0);return}B=x(I),B==m()&&(B=m(!0)),B==h()&&(B=h(!0))}else if(B!=null){if(B>=h()){T(h(!0)),v(100);return}if(B<=m()){T(m(!0)),v(0);return}I=p(B)}else return;n!=null?B=Math.round((B-m())/n)*n+m():a&&(B=a.reduce((U,K,oe)=>{let j=K.value===1/0?h():K.value===-1/0?m():K.value,k=U.value===1/0?h():U.value===-1/0?m():U.value;return j=Math.abs(j-B),k=Math.abs(k-B),j<k?K:U}).value),B>=h()&&(B=h(!0)),B<=m()&&(B=m(!0)),I=p(B),T(B),v(I),i&&i(B)},[Q,V]=o.useState(0);o.useEffect(()=>{const I=()=>{b.current&&V(b.current.offsetWidth)};return I(),window.addEventListener("resize",I),()=>{window.removeEventListener("resize",I)}},[]);const D=I=>{switch(I.key){case"ArrowRight":if(n)H({value:g+n});else if(a){const B=a.find(U=>U.value>g);B&&H({value:B.value})}break;case"ArrowLeft":if(n)H({value:g-n});else if(a){const B=a.slice(0).reverse().find((U,K,oe)=>g===1/0?K===1:U.value<g);B&&H({value:B.value})}break;default:return}};return l.jsxs("div",{tabIndex:0,onKeyDown:D,role:"slider","aria-valuemin":m(!0),"aria-valuemax":h(!0),"aria-valuenow":g,"aria-valuetext":g.toString(),className:C.slider,onMouseDown:M,onClick:$,ref:b,onTouchStart:M,onDragStart:I=>I.preventDefault(),...f,children:[l.jsx("input",{type:"hidden",name:s,value:g}),l.jsx("div",{className:C.activeTrack,style:{flex:F/100}}),l.jsx("div",{className:C.handle,children:l.jsx(X.AnimatePresence,{children:S&&l.jsx(X.motion.div,{className:C.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})})}),l.jsx("div",{className:C.inactiveTrack,style:{flex:1-F/100}}),l.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:a&&a.map((I,B)=>{let U=null;const K=(S?9:10)/Q*100,oe=p(I.value);return oe<=F-K?U=!0:oe>=F+K&&(U=!1),l.jsx("div",{className:y(C.dot,{"bg-primary-container":U!=null&&U,"bg-primary":U!=null&&!U}),style:{left:`${p(I.value)}%`}},B)})})]})},Js=({variant:e="standard",className:t,children:n,title:s,position:r="right",extended:c,divider:u,onExtendedChange:a,closeIcon:d=Le,transition:i,...f})=>{i={duration:.3,...i};const[p,h]=o.useState(c??!0),m=Gt({transition:i,title:s,position:r,closeIcon:d,className:t,children:n,onExtendedChange:a,divider:u,isExtended:p,extended:p,variant:e});o.useEffect(()=>{a==null||a(p??!1)},[p]),o.useEffect(()=>{c!=null&&h(c)},[c]);const x={close:{width:0},open:{width:"auto"}},S=()=>l.jsxs(l.Fragment,{children:[l.jsx(X.AnimatePresence,{children:e=="modal"&&p&&l.jsx(X.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:i,onClick:()=>h(!1),className:m.overlay})}),l.jsx(X.AnimatePresence,{children:p&&l.jsxs("div",{...f,className:m.sideSheet,style:{transition:i.duration+"s"},children:[l.jsxs(X.motion.div,{variants:x,initial:c===!1?"open":"close",animate:"open",exit:"close",className:m.container,children:[l.jsxs("div",{className:m.header,children:[s&&l.jsx("p",{className:m.title,children:s}),l.jsx(be,{size:"small",label:"close",icon:d,onClick:()=>h(!1),className:m.closeButton})]}),l.jsx("div",{className:m.content,style:{transition:i.duration+"s"},children:n})]}),(u==null&&e=="standard"?!0:u)&&l.jsx(Me,{className:m.divider,orientation:"vertical"})]})})]});return e=="modal"?Oe.createPortal(S(),document.body):S()},Zs=({message:e,className:t,duration:n,closeIcon:s=Le,onClose:r,...c})=>{const[u,a]=o.useState(!0),d=Zt({className:t,closeIcon:s,duration:n,isVisible:u,onClose:r,message:e});o.useEffect(()=>{n&&setTimeout(()=>{i()},n)},[n]);const i=()=>{a(!1),r==null||r()};return l.jsx(X.AnimatePresence,{children:u&&l.jsx(X.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:d.snackbar,...c,children:l.jsxs("div",{className:d.container,children:[l.jsx("p",{className:d.supportingText,children:e}),l.jsx(be,{onClick:()=>i(),className:d.icon,icon:s,label:"close the snackbar"})]})})})},Qs=({selected:e=!1,className:t,activeIcon:n,disabled:s=!1,inactiveIcon:r,onChange:c,onClick:u,onKeyDown:a,ref:d,...i})=>{const[f,p]=o.useState(e);o.useEffect(()=>{p(e)},[e]);const h=b=>{s||(x(),u&&u(b))},m=b=>{s||((b.key===" "||b.key==="Enter")&&(b.preventDefault(),x()),a&&a(b))},x=()=>{p(!f),c==null||c(!f)},S=en({className:t,isSelected:f,activeIcon:n,inactiveIcon:r,disabled:s,selected:f,onChange:c}),w=o.useRef(null),L=d||w;return l.jsxs(X.motion.div,{role:"switch","aria-checked":f,tabIndex:s?-1:0,onKeyDown:m,onClick:h,ref:L,className:S.switch,...i,children:[l.jsx("input",{type:"hidden",value:f?"1":"0"}),l.jsxs(X.motion.div,{layout:!0,style:{translate:f?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:S.handleContainer,children:[l.jsx("div",{className:S.handle,children:(f?n:r)&&l.jsx(ce,{className:S.icon,icon:f?n:r})}),l.jsx("div",{className:S.handleStateLayer})]})]})},wn=({className:e,onClick:t,label:n,variant:s="primary",href:r,icon:c,selectedTab:u,setSelectedTab:a,tabsId:d,index:i,onTabSelected:f,scrollable:p=!1,selected:h=!1,children:m,ref:x,...S})=>{const w=o.useRef(null),L=x||w,b=n??(typeof m=="string"?m:void 0),[g,T]=o.useState(h);o.useEffect(()=>{h&&u==null?T(!0):T(u==i&&i!=null)},[u]),o.useEffect(()=>{u==i&&f&&f({ref:L,index:i||0,label:b,icon:c})},[u]);const F=r?"a":"button",v=R=>{a&&a(i??null),t&&t(R)},N=nn({className:e,onTabSelected:f,scrollable:p,selectedTab:u,index:i,tabsId:d,selected:g,variant:s,icon:c,label:b,isSelected:g,setSelectedTab:a,href:r});return l.jsxs(F,{...S,role:"tab","aria-selected":g,ref:L,href:r,className:N.tab,onClick:v,...S,children:[l.jsx(de,{style:{transition:.3+"s"},className:N.stateLayer,colorName:s==="primary"&&g?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),l.jsxs("span",{className:N.content,children:[c&&l.jsx(ce,{icon:c,className:N.icon}),l.jsx("span",{className:N.label,children:b}),g&&l.jsx(X.motion.span,{layoutId:`underline-${d}`,className:N.underline,transition:{duration:.3}})]})]})},Je=o.createContext(null),er=({variant:e="primary",onTabSelected:t,children:n,className:s,selectedTab:r,setSelectedTab:c,scrollable:u=!1})=>{const a=o.useContext(Je),[d,i]=o.useState(null);let f;r===0||r!=null?f=r:a?f=a.selectedTab:f=d;const p=c??(a==null?void 0:a.setSelectedTab)??i,h=o.Children.toArray(n).filter(L=>o.isValidElement(L)&&L.type===wn),m=o.useRef(null),x=L=>{if(t==null||t(L),u){const b=m.current,g=L.ref.current;if(b&&g){const T=g.offsetLeft+g.offsetWidth/2-b.offsetWidth/2;b.scrollTo({left:T,behavior:"smooth"})}}},S=o.useMemo(()=>(a==null?void 0:a.tabsId)??vn(),[a==null?void 0:a.tabsId]),w=rn({children:n,onTabSelected:t,scrollable:u,selectedTab:f,setSelectedTab:p,className:s,variant:e});return l.jsx("div",{ref:m,role:"tablist",className:w.tabs,children:h.map((L,b)=>o.cloneElement(L,{key:b,index:b,variant:e,selectedTab:f,setSelectedTab:p,tabsId:S,onTabSelected:x,scrollable:u}))})},tr=({children:e,selectedTab:t,setSelectedTab:n,defaultTab:s=0})=>{const[r,c]=o.useState(s),u=o.useRef(null),a=t!==void 0?t:r,d=n??c,i=u.current!==null&&a!==null?a>u.current?1:-1:0;a!==u.current&&(u.current=a);const f=o.useId(),p=o.useMemo(()=>({selectedTab:a,setSelectedTab:d,previousTab:u.current,direction:i,tabsId:f}),[a,d,i,f]);return l.jsx(Je.Provider,{value:p,children:e})},bn=({children:e,className:t,isSelected:n=!1})=>{const s=cn({children:e,className:t,isSelected:n});return l.jsx("div",{className:s.tabPanel,children:e})},nr=({children:e,className:t})=>{const n=o.useContext(Je);if(!n)return console.warn("TabPanels must be used within a TabGroup"),null;const{selectedTab:s,direction:r,tabsId:c}=n,u=o.Children.toArray(e).filter(d=>o.isValidElement(d)&&d.type===bn),a=ln({children:e,className:t});return l.jsx("div",{className:a.tabPanels,children:l.jsx(X.AnimatePresence,{initial:!1,custom:r,mode:"popLayout",children:u.map((d,i)=>s===i&&l.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-${c}-${i}`,children:o.cloneElement(d,{isSelected:!0})},i))})})},sr=({hasSelected:e})=>({datePicker:y("inline-flex flex-col bg-surface-container-high rounded-[28px] p-3 select-none","min-w-[320px]"),header:y("flex items-center justify-between h-12 mb-2 px-2"),monthNav:y("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:y("text-label-large text-on-surface font-bold capitalize"),weekDays:y("grid grid-cols-7 mb-2"),weekDay:y("h-10 flex items-center justify-center text-body-small text-on-surface-variant"),daysGrid:y("grid grid-cols-7 row-auto gap-y-2"),dayCell:y("flex items-center justify-center h-10 p-0 relative"),dayButton:y("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")}),rr=ee("datePicker",sr),Sn=({value:e,defaultValue:t,onChange:n,minDate:s,maxDate:r,shouldDisableDate:c,locale:u="default",weekStartDay:a=0,className:d,style:i,mode:f="single",...p})=>{const[h,m]=o.useState(()=>{const j=E=>E instanceof Date?E:Array.isArray(E)&&E[0]?E[0]:null,k=j(e)||j(t)||new Date;return new Date(k.getFullYear(),k.getMonth(),1)}),[x,S]=o.useState(0),[w,L]=o.useState("day"),b=e!==void 0,[g,T]=o.useState(t||null),F=b?e||null:g,v=(j,k)=>new Date(j,k+1,0).getDate(),N=o.useMemo(()=>{const j=h.getFullYear(),k=h.getMonth(),E=v(j,k),z=(new Date(j,k,1).getDay()-a+7)%7,_=[],q=v(j,k-1);for(let Y=z-1;Y>=0;Y--)_.push({date:new Date(j,k-1,q-Y),isCurrentMonth:!1});for(let Y=1;Y<=E;Y++)_.push({date:new Date(j,k,Y),isCurrentMonth:!0});const A=42-_.length;for(let Y=1;Y<=A;Y++)_.push({date:new Date(j,k+1,Y),isCurrentMonth:!1});return _},[h,a]),R=o.useMemo(()=>{const j=new Date().getFullYear(),k=j-100,E=j+100,P=[];for(let z=k;z<=E;z++)P.push(z);return P},[]),M=o.useRef(null);o.useEffect(()=>{if(w==="year"&&M.current){const j=M.current.querySelector('[data-selected="true"]');j&&j.scrollIntoView({block:"center"})}},[w]);const W=o.useMemo(()=>new Intl.DateTimeFormat(u,{month:"long",year:"numeric"}),[u]),C=o.useMemo(()=>new Intl.DateTimeFormat(u,{weekday:"narrow"}),[u]),$=o.useMemo(()=>{const j=new Date(2023,0,1+a);return Array.from({length:7}).map((k,E)=>{const P=new Date(j);return P.setDate(j.getDate()+E),C.format(P).charAt(0).toUpperCase()})},[C,a]),H=()=>{S(-1),m(j=>new Date(j.getFullYear(),j.getMonth()-1,1))},Q=()=>{S(1),m(j=>new Date(j.getFullYear(),j.getMonth()+1,1))},V=j=>{m(k=>new Date(j,k.getMonth(),1)),L("day")},D=(j,k)=>j?j.getDate()===k.getDate()&&j.getMonth()===k.getMonth()&&j.getFullYear()===k.getFullYear():!1,I=j=>D(new Date,j),B=j=>{let k=j;if(f==="single")k=j;else{const E=F,[P,z]=Array.isArray(E)?E:[null,null];!P||P&&z?k=[j,null]:j<P?k=[j,P]:k=[P,j]}b||T(k),n&&n(k)},U=j=>{if(f==="single")return{isSelected:D(F,j),isStart:!1,isEnd:!1,isInRange:!1};const k=Array.isArray(F)?F:[F,null],[E,P]=k,z=D(E,j),_=D(P,j);let q=!1;if(E&&P){const ne=new Date(E.getFullYear(),E.getMonth(),E.getDate()).getTime(),A=new Date(P.getFullYear(),P.getMonth(),P.getDate()).getTime(),Y=new Date(j.getFullYear(),j.getMonth(),j.getDate()).getTime();q=Y>ne&&Y<A}return{isSelected:z||_,isStart:z,isEnd:_,isInRange:q}},K=rr({hasSelected:!!F}),oe={enter:j=>({x:j>0?"100%":"-100%",opacity:0}),center:{x:0,opacity:1},exit:j=>({x:j<0?"100%":"-100%",opacity:0})};return l.jsxs("div",{className:y(K.datePicker,d),style:i,...p,children:[l.jsxs("div",{className:K.header,children:[l.jsxs(ye,{variant:"text",disableTextMargins:!0,size:"small",onClick:()=>L(j=>j==="day"?"year":"day"),className:"text-label-large font-bold capitalize text-on-surface hover:bg-surface-container-highest",children:[l.jsx("span",{className:"mr-2",children:w==="day"?W.format(h):h.getFullYear()}),l.jsx(ce,{icon:xn,className:y("w-3 h-3 transition-transform duration-200 inline",w==="year"&&"rotate-180")})]}),w==="day"&&l.jsxs("div",{className:"flex items-center",children:[l.jsx(be,{size:"xSmall",allowShapeTransformation:!1,onClick:H,icon:$s,label:"Previous month",title:null}),l.jsx(be,{size:"xSmall",allowShapeTransformation:!1,onClick:Q,icon:yn,label:"Next month",title:null})]})]}),w==="year"?l.jsx("div",{className:"h-[280px] overflow-y-auto grid grid-cols-3 gap-2 p-2 scrollbar-hide",ref:M,children:R.map(j=>l.jsx(ye,{size:"small",variant:j===h.getFullYear()?"filled":"text",onClick:()=>V(j),"data-selected":j===h.getFullYear(),className:y("w-full",{"text-on-surface":j!==h.getFullYear()}),label:j.toString(),children:j},j))}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:K.weekDays,children:$.map((j,k)=>l.jsx("div",{className:K.weekDay,children:j},k))}),l.jsx("div",{className:"overflow-hidden relative min-h-[240px]",children:l.jsx(X.AnimatePresence,{mode:"popLayout",initial:!1,custom:x,children:l.jsx(X.motion.div,{custom:x,variants:oe,initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",bounce:0,duration:.3},className:K.daysGrid,children:N.map((j,k)=>{if(!j.isCurrentMonth)return l.jsx("div",{className:K.dayCell},k);const{isSelected:E,isStart:P,isEnd:z,isInRange:_}=U(j.date),q=I(j.date),ne=s&&j.date<s||r&&j.date>r||(c==null?void 0:c(j.date));return l.jsx("div",{className:y(K.dayCell,_&&"bg-primary/20",P&&(F==null?void 0:F[1])&&"bg-gradient-to-r from-transparent to-primary/20",z&&(F==null?void 0:F[0])&&"bg-gradient-to-l from-transparent to-primary/20"),children:l.jsx(ye,{className:()=>({button:y("aspect-square h-[40px] p-0",{"text-on-surface":!E&&!q,"opacity-50":ne}),stateLayer:y({"!bg-transparent":ne})}),size:"small",allowShapeTransformation:!1,variant:y({filled:E,outlined:q,text:!E&&!q}),label:j.date.getDate().toString(),onClick:()=>B(j.date),disabled:ne,children:j.date.getDate().toString()})},k)})},h.toISOString())})})]})]})},or=({variant:e="filled",autoFocus:t,disabled:n=!1,errorText:s,placeholder:r,suffix:c,name:u,label:a,className:d,supportingText:i,trailingIcon:f,leadingIcon:p,type:h="text",multiline:m=!1,autoComplete:x="on",onChange:S,value:w,defaultValue:L,showSupportingText:b,id:g,style:T,ref:F,onFocus:v,onBlur:N,options:R,children:M,...W})=>{var et;const C=o.useId(),$=g||C,H=`${$}-helper`,Q=w!==void 0,[V,D]=o.useState(L??""),I=Q?w:V,[B,U]=o.useState(!1),[K,oe]=o.useState(!!(s!=null&&s.length)),j=o.useRef(null),k=F||j,E=o.useRef(null),P=o.useRef(null),z=o.useRef(null),_=b??(!!(s!=null&&s.length)||!!(i!=null&&i.length));o.useEffect(()=>{oe(!!(s!=null&&s.length))},[s]);const q=()=>{k.current&&!B&&!n&&h!=="select"&&k.current.focus()};o.useEffect(()=>{if(!(!t||n)&&h!=="select"){const J=window.requestAnimationFrame(()=>{q()});return()=>window.cancelAnimationFrame(J)}},[t,n,k,h]),o.useEffect(()=>{B?(oe(!1),v==null||v()):(s!=null&&s.length&&oe(!0),N==null||N())},[B]);const ne=J=>{const ie=J.target.value;Q||D(ie),oe(!1),S&&S(J)},A=h==="date",[Y,te]=o.useState(!1),[le,Se]=o.useState(null),fe=o.useMemo(()=>{const J=String(I);if(!J)return null;const[ie,Ne,je]=J.split("-").map(Number);return ie&&Ne&&je?new Date(ie,Ne-1,je):null},[I]),xe=()=>{n||(Y?te(!1):(Se(fe),te(!0)))};o.useEffect(()=>{Y?U(!0):(!Z||!se)&&U(!1)},[Y]),o.useEffect(()=>{if(!Y)return;const J=me=>{var ke,Ce;return me?((ke=E.current)==null?void 0:ke.contains(me))||((Ce=z.current)==null?void 0:Ce.contains(me)):!1},ie=me=>{var tt,nt;const ke=me.target,Ce=(tt=z.current)==null?void 0:tt.contains(ke),Cn=(nt=P.current)==null?void 0:nt.contains(ke);!Ce&&!Cn&&te(!1)},Ne=me=>{J(me.target)||te(!1)},je=me=>{me.key==="Escape"&&te(!1)};return document.addEventListener("pointerdown",ie),document.addEventListener("focusin",Ne),document.addEventListener("keydown",je),()=>{document.removeEventListener("pointerdown",ie),document.removeEventListener("focusin",Ne),document.removeEventListener("keydown",je)}},[Y]);const G=()=>{const J=le?le.toLocaleDateString("en-CA"):"";Q||D(J),S&&S({target:{value:J,name:u,type:h}}),te(!1)},Z=h==="select",[se,he]=o.useState(!1),ve=o.useRef(null),Ze=o.useMemo(()=>{if(Z&&R){const J=R.find(ie=>String(ie.value)===String(I));return J?J.label:I}return I},[I,Z,R]),Qe=()=>{n||(he(!se),U(!se))},jn=J=>{if(Q||D(String(J)),S){const ie={target:{value:String(J),name:u,type:h}};S(ie)}he(!1),U(!1)};o.useEffect(()=>{if(!se)return;const J=ie=>{E.current&&!E.current.contains(ie.target)&&ve.current&&!ve.current.contains(ie.target)&&(he(!1),U(!1))};return document.addEventListener("mousedown",J),()=>{document.removeEventListener("mousedown",J)}},[se]);const ge=o.useMemo(()=>{if(f)return f;if(A)return Ds;if(Z)return se?As:xn},[f,A,Z,se]),kn=A||Z?"[&::-webkit-calendar-picker-indicator]:hidden cursor-pointer selection:bg-transparent":"",ue=dn({showSupportingText:_,isFocused:B,showErrorIcon:K,disabled:n,name:u,label:a,autoComplete:x,className:d,onChange:S,placeholder:r,supportingText:i,type:h,leadingIcon:p,trailingIcon:ge,variant:e,errorText:s,value:String(Ze),suffix:c,multiline:m}),Ln=m?Fn:"input",Mn=m?{}:{type:Z?"text":h,readOnly:Z},Fe=B||typeof I=="string"&&I.length>0||h=="date"||Z&&se,Ie=Fe&&e==="outlined",In=!Ie;return l.jsxs("div",{ref:E,className:ue.textField,style:T,children:[l.jsxs("fieldset",{onClick:()=>{Z?Qe():q()},className:ue.content,role:"presentation",children:[l.jsx("div",{className:ue.stateLayer}),p&&l.jsx("div",{className:ue.leadingIcon,children:o.isValidElement(p)?p:l.jsx(ce,{className:"w-5 h-5",icon:p})}),l.jsx(X.motion.legend,{"aria-hidden":"true",variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:Ie?"visible":"hidden",animate:Ie?"visible":"hidden",className:"max-w-full ml-2 px-2 text-body-small h-0 overflow-hidden whitespace-nowrap",transition:{duration:.2},children:l.jsx("span",{className:"transform inline-flex -translate-y-1/2 opacity-0",children:a})}),l.jsxs("div",{className:"flex-1 relative",children:[In&&l.jsx(X.motion.label,{htmlFor:$,className:y("absolute left-4 transition-all duration-300 pointer-events-none",{"text-body-small top-2":e=="filled"&&Fe,"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&Fe)}),transition:{duration:.3},layoutId:e==="outlined"?`${$}-label`:void 0,children:l.jsx("span",{className:ue.label,children:a})}),Ie&&l.jsx(X.motion.label,{htmlFor:$,className:y("absolute left-2 -top-3 px-1 text-body-small z-10",ue.label),layoutId:`${$}-label`,transition:{duration:.3},children:a}),l.jsx(Ln,{...W,ref:k,value:Ze,onChange:ne,className:y(ue.input,kn),id:$,name:u,placeholder:B?r??void 0:"",onFocus:()=>{Z||U(!0)},onBlur:()=>{Z||U(!1)},disabled:n,autoComplete:x,"aria-invalid":!!(s!=null&&s.length),"aria-describedby":_?H:void 0,...Mn})]}),l.jsx("div",{className:ue.activeIndicator}),!K&&l.jsxs(l.Fragment,{children:[ge&&l.jsx("div",{ref:A?P:void 0,onClick:J=>{J.stopPropagation(),A&&xe(),Z&&Qe()},className:y(ue.trailingIcon,(A||Z)&&"cursor-pointer"),children:l.jsx("div",{className:"flex items-center justify-center w-full h-full",children:o.isValidElement(ge)?ge:l.jsx(ce,{className:"h-5",icon:ge})})}),!ge&&c&&l.jsx("span",{className:ue.suffix,children:c})]}),K&&l.jsx("div",{className:y(ue.trailingIcon,{" absolute right-0":!ge}),children:l.jsx(ce,{className:"h-5 text-error",icon:Fs})})]}),_&&l.jsx("p",{className:ue.supportingText,id:H,children:s!=null&&s.length?s:i!=null&&i.length?i:" "}),A&&Y&&l.jsx(l.Fragment,{children:l.jsx(Ee,{anchorRef:E,position:"bottom",children:l.jsxs("div",{ref:z,className:"z-50 shadow-xl rounded-[28px] bg-surface-container-high overflow-hidden",children:[l.jsx(Sn,{className:"",value:le,onChange:Se}),l.jsxs("div",{className:"flex justify-end gap-2 p-4 pt-0",children:[l.jsx(ye,{variant:"text",size:"small",onClick:()=>te(!1),children:"Cancel"}),l.jsx(ye,{variant:"filled",size:"small",onClick:G,children:"OK"})]})]})})}),Z&&se&&l.jsx(Ee,{anchorRef:E,position:"bottom",style:{width:(et=E.current)==null?void 0:et.offsetWidth},children:l.jsx("div",{ref:ve,children:l.jsxs(Ge,{selected:I,onItemSelect:jn,children:[M,!M&&(R==null?void 0:R.map((J,ie)=>J.type==="divider"?l.jsx(Me,{className:"my-1"},ie):J.type==="headline"?l.jsx(Ue,{label:J.label},ie):l.jsx(Xe,{value:J.value??"",label:J.label,leadingIcon:J.leadingIcon,trailingIcon:J.trailingIcon,disabled:J.disabled,children:J.label},J.value??ie)))]})})})]})},ir=({isSelected:e,icon:t,label:n,variant:s})=>({navigationRailItem:y(" 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:y(" 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:y("rounded-full"),icon:y("size-6 flex"),label:y("w-fit mx-auto text-nowrap",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})}),lr=ee("navigationRailItem",ir),En=({label:e})=>l.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:l.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:c,selectedItem:u,setSelectedItem:a,index:d,onItemSelected:i,selected:f=!1,ref:p,transition:h,isExtended:m,iconSelected:x,style:S,extendedOnly:w,children:L,...b})=>{L&&(n=L);const g=o.useRef(null),T=p||g,[F,v]=o.useState(f);o.useEffect(()=>{f&&u==null?v(!0):v(u==d&&d!=null)},[u]),o.useEffect(()=>{u==d&&i&&i({ref:T,index:d||0,label:n,icon:c})},[u]);const N=r?"a":"button",R=W=>{a&&a(d??null),t&&t(W)},M=lr({isExtended:m,extendedOnly:w,className:e,onItemSelected:i,selectedItem:u,index:d,transition:h,selected:F,variant:s,icon:c,label:n,isSelected:F,setSelectedItem:a,href:r,children:n,iconSelected:x});return h={duration:.3,...h},w&&!m?null:l.jsxs(N,{...b,role:"tab","aria-selected":F,ref:T,href:r,className:M.navigationRailItem,onClick:R,style:{transition:h.duration+"s",...S},children:[l.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:M.container,children:[l.jsx(de,{style:{transition:h.duration+"s"},className:M.stateLayer,colorName:y({"on-surface":!F,"on-secondary-container":F}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),c&&l.jsx(ce,{icon:F?x:c,className:M.icon}),l.jsx(X.AnimatePresence,{children:s=="horizontal"&&(()=>{const W={width:0,opacity:0,transition:{...h}},C={width:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/2,delay:h.duration-h.duration/2}}};return l.jsx(X.motion.span,{initial:W,animate:C,exit:W,className:M.label,children:n})})()})]}),l.jsx(X.AnimatePresence,{children:s=="vertical"&&(()=>{const W={height:0,opacity:0,transition:{...h,opacity:{duration:0}}},C={height:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/3,delay:h.duration-h.duration/3}}};return l.jsx(X.motion.span,{initial:C,animate:C,exit:W,className:M.label,transition:h,children:n})})()})]})},ar=({isExtended:e,alignment:t})=>({navigationRail:y("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:y("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:y(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),cr=ee("navigationRail",ar),ur=({variant:e="standard",onItemSelected:t,children:n,className:s,selectedItem:r,extended:c,alignment:u="top",menu:a={closed:{icon:Ws,label:"Open menu"},opened:{icon:Le,label:"Close menu"}},style:d,onExtendedChange:i,transition:f,setSelectedItem:p})=>{const[h,m]=o.useState(null),[x,S]=o.useState(c);let w;r==0||r!=null?w=r:w=h;const L=p||m,b=o.useRef(null),g=M=>{t==null||t(M)};function T(M){const W=[];return o.Children.forEach(M,C=>{o.isValidElement(C)&&C.type===o.Fragment?W.push(...T(C.props.children)):W.push(C)}),W}const F=T(n),v=F.filter(M=>o.isValidElement(M)&&M.type===De),N=cr({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:L,className:s,variant:e,extended:x,isExtended:x,alignment:u,menu:a,transition:f,onExtendedChange:i});f={duration:.3,...f};const R=o.useRef(!1);return R.current=!1,o.useEffect(()=>{i==null||i(x??!1)},[x]),l.jsxs("div",{style:{transition:f.duration+"s",...d},ref:b,className:N.navigationRail,children:[l.jsxs("div",{className:N.header,children:[l.jsx(be,{onClick:()=>S(!x),label:x?a==null?void 0:a.opened.label:a==null?void 0:a.closed.label,className:N.menuIcon,icon:x?a.opened.icon:a==null?void 0:a.closed.icon}),v.length>0&&o.cloneElement(v[0],{transition:f,isExtended:x,className:"!shadow-none mx-5 "+v[0].props.className})]}),l.jsx("div",{className:N.segments,children:(()=>{let M=0;return F.map(W=>o.isValidElement(W)&&W.type===Nn?o.cloneElement(W,{key:M,index:M++,variant:x?"horizontal":"vertical",selectedItem:w,setSelectedItem:L,onItemSelected:g,transition:f,extendedOnly:R.current,isExtended:x}):o.isValidElement(W)&&W.type===De?null:o.isValidElement(W)&&W.type===En?(R.current=!0,x?o.cloneElement(W,{}):null):W)})()}),l.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function dr(e){return Re.defineConfig({variant:Re.Variants.Udixio,...e,plugins:[new Re.FontPlugin(e),new ft.TailwindPlugin(e)]})}exports.AnchorPositioner=Ee;exports.AnimateOnScrollInit=ns;exports.Button=ye;exports.Card=Is;exports.Carousel=Cs;exports.CarouselItem=pn;exports.Checkbox=Ts;exports.Chip=Te;exports.Chips=Us;exports.ContextMenu=zs;exports.CustomScroll=xt;exports.DatePicker=Sn;exports.Divider=Me;exports.Fab=De;exports.FabMenu=Gs;exports.Icon=ce;exports.IconButton=be;exports.Menu=Ge;exports.MenuGroup=Be;exports.MenuHeadline=Ue;exports.MenuItem=Xe;exports.NavigationRail=ur;exports.NavigationRailItem=Nn;exports.NavigationRailSection=En;exports.ProgressIndicator=mn;exports.RippleEffect=ht;exports.SideSheet=Js;exports.Slider=Ks;exports.SmoothScroll=Xn;exports.Snackbar=Zs;exports.State=de;exports.Switch=Qs;exports.SyncedFixedWrapper=bt;exports.Tab=wn;exports.TabGroup=tr;exports.TabPanel=bn;exports.TabPanels=nr;exports.Tabs=er;exports.TextField=or;exports.ThemeProvider=Kn;exports.Tooltip=Ke;exports.animateOnScroll=ss;exports.buttonStyle=rs;exports.cardStyle=os;exports.carouselItemConfig=ze;exports.carouselItemStyle=is;exports.carouselStyle=ls;exports.checkboxStyle=as;exports.chipStyle=cs;exports.chipsStyle=us;exports.classNames=y;exports.classnames=pt;exports.createUseClassNames=ee;exports.customScrollStyle=yt;exports.defaultClassNames=re;exports.defineConfig=dr;exports.dividerStyle=ds;exports.fabMenuStyle=hs;exports.fabStyle=fs;exports.getClassNames=Ae;exports.iconButtonStyle=ms;exports.initAnimateOnScroll=Ve;exports.menuGroupStyle=ys;exports.menuStyle=ps;exports.normalize=we;exports.progressIndicatorStyle=xs;exports.sideSheetConfig=Ye;exports.sideSheetStyle=Gt;exports.sliderConfig=_e;exports.sliderStyle=gs;exports.snackbarStyle=ws;exports.switchStyle=bs;exports.tabPanelStyle=js;exports.tabPanelsStyle=Ns;exports.tabStyle=Ss;exports.tabsStyle=Es;exports.textFieldStyle=ks;exports.toolStyle=Ls;exports.useButtonStyle=Et;exports.useCardStyle=jt;exports.useCarouselItemStyle=kt;exports.useCarouselStyle=Mt;exports.useCheckboxStyle=Ct;exports.useChipStyle=Dt;exports.useChipsStyle=Ft;exports.useClassNames=$n;exports.useDividerStyle=$t;exports.useFabMenuStyle=Ot;exports.useFabStyle=Tt;exports.useIconButtonStyle=Vt;exports.useMenuGroupStyle=qt;exports.useMenuStyle=Yt;exports.useProgressIndicatorStyle=Ut;exports.useSideSheetStyle=vs;exports.useSliderStyle=Kt;exports.useSnackbarStyle=Zt;exports.useStateStyle=wt;exports.useSwitchStyle=en;exports.useTabPanelStyle=cn;exports.useTabPanelsStyle=ln;exports.useTabStyle=nn;exports.useTabsStyle=rn;exports.useTextFieldStyle=dn;exports.useToolTipStyle=hn;exports.useTooltipTrigger=gn;
|
|
10
|
+
`})]}),F&&l.jsx(Be,{ref:$,className:"opacity-0",draggable:s,editable:!0,editing:!0,onChange:v=>{var k;if(v=v.replace(/( )+/g," ").trim(),console.log("Ghost chip onChange",v,!!v),v)M(v);else if(u.length>0){const R=h.current[u.length-1];(k=R==null?void 0:R.focus)==null||k.call(R)}},onEditCommit:()=>{},onBlur:()=>{i(!1)},onFocus:v=>{i(!0),v.stopPropagation()},children:" "})]})};function wn({trigger:e=["hover","focus"],isOpen:t,defaultOpen:n=!1,onOpenChange:s,openDelay:r=400,closeDelay:c=150,id:u}={}){const a=o.useId(),d=u??`tooltip-${a}`,i=Array.isArray(e)?e:[e],f=typeof t=="boolean",[y,h]=o.useState(n?"hovered":"hidden"),[m,x]=o.useState(!1),b=o.useRef(null),w=o.useRef(null),M=o.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),w.current&&(clearTimeout(w.current),w.current=null)},[]);o.useEffect(()=>()=>M(),[M]);const S=o.useCallback(D=>{if(f){const C=D!=="hidden";s==null||s(C)}else{h(D);const C=D!=="hidden";s==null||s(C)}},[f,s]),g=f?t?"hovered":"hidden":y,$=g!=="hidden",F=D=>{switch(D){case"hidden":return 0;case"hovered":return 1;case"focused":return 2;case"clicked":return 3;default:return 0}},v=o.useCallback(D=>{M(),!(F(D)<=F(g))&&(b.current=setTimeout(()=>{S(D)},r))},[M,r,g,S]),k=o.useCallback(D=>{M(),w.current=setTimeout(()=>{(!f&&F(y)<=F(D)||f)&&S("hidden")},c)},[M,c,y,f,S]),R=o.useCallback(()=>{i.includes("hover")&&v("hovered")},[i,v]),I=o.useCallback(()=>{i.includes("hover")&&(g==="focused"||g==="clicked"||m||k("hovered"))},[i,g,m,k]),W=o.useCallback(()=>{i.includes("focus")&&(M(),S("focused"))},[i,M,S]),N=o.useCallback(()=>{if(i.includes("focus")&&g!=="clicked"){if(i.includes("hover")&&m){S("hovered");return}k("focused")}},[i,g,m,k,S]),z=o.useCallback(()=>{i.includes("click")&&(M(),S(g==="clicked"?"hidden":"clicked"))},[i,g,M,S]),O=o.useCallback(D=>{D.key==="Escape"&&$&&(M(),S("hidden"),D.preventDefault())},[$,M,S]),ee=o.useCallback(()=>{x(!0),M()},[M]),H=o.useCallback(()=>{x(!1),i.includes("hover")&&g==="hovered"&&k("hovered")},[i,g,k]);return{triggerProps:{"aria-describedby":$?d:void 0,onMouseEnter:R,onMouseLeave:I,onFocus:W,onBlur:N,onClick:z,onKeyDown:O},tooltipProps:{id:d,role:"tooltip","aria-hidden":!$,onMouseEnter:ee,onMouseLeave:H},isOpen:$,state:g}}const Ke=({variant:e="plain",buttons:t,className:n,children:s,title:r,text:c,content:u,position:a,targetRef:d,ref:i,trigger:f=["hover","focus"],transition:y,openDelay:h=400,closeDelay:m=150,isOpen:x,defaultOpen:b=!1,onOpenChange:w,id:M,anchorRef:S,...g})=>{const F=a||(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=o.useRef(null),R=S||(d||v),{triggerProps:I,tooltipProps:W,isOpen:N}=wn({trigger:f,isOpen:x,defaultOpen:b,onOpenChange:w,openDelay:h,closeDelay:m,id:M}),z=!d&&o.isValidElement(s)?o.cloneElement(s,{ref:v,...I,onMouseEnter:H=>{var D,C;I.onMouseEnter(),(C=(D=s.props)==null?void 0:D.onMouseEnter)==null||C.call(D,H)},onMouseLeave:H=>{var D,C;I.onMouseLeave(),(C=(D=s.props)==null?void 0:D.onMouseLeave)==null||C.call(D,H)},onFocus:H=>{var D,C;I.onFocus(),(C=(D=s.props)==null?void 0:D.onFocus)==null||C.call(D,H)},onBlur:H=>{var D,C;I.onBlur(),(C=(D=s.props)==null?void 0:D.onBlur)==null||C.call(D,H)},onClick:H=>{var D,C;I.onClick(),(C=(D=s.props)==null?void 0:D.onClick)==null||C.call(D,H)},onKeyDown:H=>{var D,C;I.onKeyDown(H),(C=(D=s.props)==null?void 0:D.onKeyDown)==null||C.call(D,H)}}):s;o.useEffect(()=>{if(!d)return;const H=d.current;if(!H)return;const D=()=>I.onMouseEnter(),C=()=>I.onMouseLeave(),T=()=>I.onFocus(),U=()=>I.onBlur(),J=()=>I.onClick(),oe=j=>I.onKeyDown(j);return H.addEventListener("mouseenter",D),H.addEventListener("mouseleave",C),H.addEventListener("focus",T,!0),H.addEventListener("blur",U,!0),H.addEventListener("click",J),H.addEventListener("keydown",oe),I["aria-describedby"]?H.setAttribute("aria-describedby",I["aria-describedby"]):H.removeAttribute("aria-describedby"),()=>{H.removeEventListener("mouseenter",D),H.removeEventListener("mouseleave",C),H.removeEventListener("focus",T,!0),H.removeEventListener("blur",U,!0),H.removeEventListener("click",J),H.removeEventListener("keydown",oe)}},[d,I]);const O=mn({variant:e,buttons:t,className:n,title:r,text:c,position:F,trigger:f,targetRef:d,children:s}),ee={open:{opacity:1,height:"auto"},close:{opacity:0,height:16}};return l.jsxs(l.Fragment,{children:[z,l.jsx(X.AnimatePresence,{children:N&&l.jsx(Ne,{anchorRef:R,position:F,children:l.jsx(X.motion.div,{initial:"close",variants:ee,animate:"open",transition:{duration:y.duration},exit:"close",className:O.toolTip,...g,...W,children:l.jsx("div",{className:O.container,children:u?l.jsx("div",{className:O.content,children:u}):l.jsxs(l.Fragment,{children:[r&&l.jsx("div",{className:O.subHead,children:r}),c&&l.jsx("div",{className:O.supportingText,children:c}),t&&l.jsx("div",{className:O.actions,children:Array.isArray(t)&&t.map((H,D)=>l.jsx(ye,{size:"small",variant:"text",...H},D))})]})})})})})]})},Ae=({className:e,label:t,variant:n="primary",size:s="medium",href:r,type:c,icon:u,extended:a=!1,ref:d,transition:i,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=Bt({href:r,icon:u,extended:a,label:t,size:s,variant:n,className:e,transition:i,children:t});i={duration:.3,...i};const x=o.useRef(null),b=d||x,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...i,opacity:{duration:i.duration/2,delay:i.duration-i.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...i,marginLeft:{duration:i.duration/2,delay:i.duration-i.duration/2}}}};return l.jsxs(h,{...y,ref:b,href:r,"aria-label":a?void 0:t,className:m.fab,children:[l.jsx(Ke,{trigger:a?null:void 0,text:t,targetRef:b}),l.jsx(de,{style:{transition:i.duration+"s"},className:m.stateLayer,colorName:p({"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]"}),l.jsx(ce,{icon:u,className:m.icon}),l.jsx(X.AnimatePresence,{children:a&&l.jsx(X.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:m.label,children:t})})]})},Se=({variant:e="standard",href:t,disabled:n=!1,title:s,label:r,onToggle:c,activated:u=!1,onClick:a,icon:d,size:i="medium",iconSelected:f,className:y,ref:h,width:m="default",shape:x="rounded",allowShapeTransformation:b=!0,transition:w,children:M,...S})=>{if(M&&(r=M),!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,$]=o.useState(u),F=W=>{n&&W.preventDefault(),c?($(!g),c(!g)):a&&a(W)};o.useEffect(()=>{$(u)},[u]);const v=t?"a":"button",k=zt({transition:w,shape:x,allowShapeTransformation:b,width:m,href:t,activated:g,label:r,iconSelected:f,isActive:g,onToggle:c,disabled:n,icon:d,variant:e,className:y,size:i,children:r,...S}),R=o.useRef(null),I=h||R;return w={duration:.3,...w},l.jsxs(v,{disabled:n,href:t,style:{transition:w.duration+"s"},className:k.iconButton,"aria-label":r,...S,title:void 0,onClick:F,ref:I,children:[s!==null&&l.jsx(Ke,{targetRef:I,trigger:n?null:void 0,text:s}),l.jsx("div",{className:k.touchTarget}),l.jsx(de,{style:{transition:w.duration+"s"},className:k.stateLayer,colorName:p(e==="standard"&&{"on-surface-variant":!g,"on-primary":g},e==="filled"&&{"on-surface-variant":!g&&!!c,"on-primary":g||!c},e==="tonal"&&{"on-secondary":g&&!!c,"on-secondary-container":!g||!c},e==="outlined"&&{"inverse-on-surface":g&&!!c,"on-surface-variant":!g||!c}),stateClassName:"state-ripple-group-[icon-button]"}),d?l.jsx(ce,{icon:d,className:k.icon}):M]})},Gs=({className:e,label:t,variant:n="primary",size:s="medium",href:r,icon:c,extended:u=!1,ref:a,transition:d,children:i,open:f,defaultOpen:y=!1,onOpenChange:h,...m})=>{d={duration:.3,ease:"easeInOut",...d};const x=o.useRef(null),b=a||x,w=typeof f=="boolean",[M,S]=o.useState(y),g=w?f:M,$=N=>{w||S(N),h==null||h(N)},F=o.Children.toArray(i).filter(N=>o.isValidElement(N)&&N.type===ye),v=Ht({href:r,icon:c,extended:u,label:t,size:s,variant:n,className:e,transition:d,children:t,open:g}),k=X.motion.create(Ae),R=X.motion.create(Se),I=N=>l.jsx(k,{icon:c,extended:u,label:t,variant:n+"Container",size:s,className:v.fab+" "+(e??""),"aria-expanded":g,onClick:()=>$(!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},...N}),W=o.useId();return l.jsxs("div",{className:v.fabMenu,ref:b,...m,children:[l.jsx(X.AnimatePresence,{children:g&&l.jsx("div",{className:v.actions,role:"menu","aria-hidden":!g,children:(()=>{const N=F.length;return F.map((z,O)=>{z.props;const ee=N-1-O,H=((d==null?void 0:d.delay)??0)+ee*.06,D={open:{overflow:"visible",opacity:1,width:"auto",transition:{...d,delay:H,opacity:{delay:(d==null?void 0:d.duration)/2+H}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...d,delay:H,opacity:{duration:(d==null?void 0:d.duration)/1.5}}}};return l.jsx(X.motion.div,{initial:"close",animate:"open",variants:D,transition:d,exit:"close",children:o.cloneElement(z,{key:O,shape:"rounded",variant:"filled",className:()=>({button:p("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:p({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),I({className:"invisible pointer-events-none"}),l.jsxs("div",{className:"absolute right-0 top-0",children:[!g&&I({className:"",layout:!0,layoutId:"fab-menu"+W}),g&&l.jsx(l.Fragment,{children:l.jsx(R,{layout:!0,layoutId:"fab-menu"+W,variant:"filled",className:()=>({iconButton:p({"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:p({"[--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:Ps,onClick:()=>$(!1),children:"Close"})})]})]})},Ks=({className:e,valueFormatter:t,step:n=10,name:s,value:r=0,min:c=0,max:u=100,marks:a=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:i,...f})=>{const y=C=>{const T=m(),U=h();return C===1/0?100:C===-1/0?0:(C-T)/(U-T)*100},h=(C=!1)=>C?u:u==1/0?a[(a==null?void 0:a.length)-1].value:u,m=(C=!1)=>C?c:c==-1/0?a[0].value:c,x=C=>{const T=m(!1);return(h(!1)-T)*C/100+T},[b,w]=o.useState(!1),M=o.useRef(null),S=d||M,[g,$]=o.useState(r),[F,v]=o.useState(y(r)),[k,R]=o.useState(!1);o.useEffect(()=>{$(r),v(y(r))},[r]);const I=C=>{R(!0),w(!0),z(C)},W=()=>{R(!1),w(!1)};o.useEffect(()=>(k?(window.addEventListener("mouseup",W),window.addEventListener("mousemove",z),window.addEventListener("touchend",W),window.addEventListener("touchmove",z)):(window.removeEventListener("mouseup",W),window.removeEventListener("mousemove",z),window.removeEventListener("touchend",W),window.removeEventListener("touchmove",z)),()=>{window.removeEventListener("mouseup",W),window.removeEventListener("mousemove",z),window.removeEventListener("touchend",W),window.removeEventListener("touchmove",z)}),[k]);const N=Jt({className:e,isChanging:b,marks:a,max:u,min:c,name:s,step:n,value:g,valueFormatter:t,onChange:i}),z=C=>{const T=S==null?void 0:S.current;if(T){const U=T.getBoundingClientRect().left,oe=((C.type==="touchmove"||C.type==="touchstart"?C.touches[0].clientX:C.clientX)-U)/T.offsetWidth*100;O({percent:oe})}},O=({percent:C,value:T})=>{if(C){if(C>=100){$(h(!0)),v(100);return}if(C<=0){$(m(!0)),v(0);return}T=x(C),T==m()&&(T=m(!0)),T==h()&&(T=h(!0))}else if(T!=null){if(T>=h()){$(h(!0)),v(100);return}if(T<=m()){$(m(!0)),v(0);return}C=y(T)}else return;n!=null?T=Math.round((T-m())/n)*n+m():a&&(T=a.reduce((U,J,oe)=>{let j=J.value===1/0?h():J.value===-1/0?m():J.value,L=U.value===1/0?h():U.value===-1/0?m():U.value;return j=Math.abs(j-T),L=Math.abs(L-T),j<L?J:U}).value),T>=h()&&(T=h(!0)),T<=m()&&(T=m(!0)),C=y(T),$(T),v(C),i&&i(T)},[ee,H]=o.useState(0);o.useEffect(()=>{const C=()=>{S.current&&H(S.current.offsetWidth)};return C(),window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)}},[]);const D=C=>{switch(C.key){case"ArrowRight":if(n)O({value:g+n});else if(a){const T=a.find(U=>U.value>g);T&&O({value:T.value})}break;case"ArrowLeft":if(n)O({value:g-n});else if(a){const T=a.slice(0).reverse().find((U,J,oe)=>g===1/0?J===1:U.value<g);T&&O({value:T.value})}break;default:return}};return l.jsxs("div",{tabIndex:0,onKeyDown:D,role:"slider","aria-valuemin":m(!0),"aria-valuemax":h(!0),"aria-valuenow":g,"aria-valuetext":g.toString(),className:N.slider,onMouseDown:I,onClick:z,ref:S,onTouchStart:I,onDragStart:C=>C.preventDefault(),...f,children:[l.jsx("input",{type:"hidden",name:s,value:g}),l.jsx("div",{className:N.activeTrack,style:{flex:F/100}}),l.jsx("div",{className:N.handle,children:l.jsx(X.AnimatePresence,{children:b&&l.jsx(X.motion.div,{className:N.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})})}),l.jsx("div",{className:N.inactiveTrack,style:{flex:1-F/100}}),l.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:a&&a.map((C,T)=>{let U=null;const J=(b?9:10)/ee*100,oe=y(C.value);return oe<=F-J?U=!0:oe>=F+J&&(U=!1),l.jsx("div",{className:p(N.dot,{"bg-primary-container":U!=null&&U,"bg-primary":U!=null&&!U}),style:{left:`${y(C.value)}%`}},T)})})]})},Js=({variant:e="standard",className:t,children:n,title:s,position:r="right",extended:c,divider:u,onExtendedChange:a,closeIcon:d=Le,transition:i,...f})=>{i={duration:.3,...i};const[y,h]=o.useState(c??!0),m=Kt({transition:i,title:s,position:r,closeIcon:d,className:t,children:n,onExtendedChange:a,divider:u,isExtended:y,extended:y,variant:e});o.useEffect(()=>{a==null||a(y??!1)},[y]),o.useEffect(()=>{c!=null&&h(c)},[c]);const x={close:{width:0},open:{width:"auto"}},b=()=>l.jsxs(l.Fragment,{children:[l.jsx(X.AnimatePresence,{children:e=="modal"&&y&&l.jsx(X.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:i,onClick:()=>h(!1),className:m.overlay})}),l.jsx(X.AnimatePresence,{children:y&&l.jsxs("div",{...f,className:m.sideSheet,style:{transition:i.duration+"s"},children:[l.jsxs(X.motion.div,{variants:x,initial:c===!1?"open":"close",animate:"open",exit:"close",className:m.container,children:[l.jsxs("div",{className:m.header,children:[s&&l.jsx("p",{className:m.title,children:s}),l.jsx(Se,{size:"small",label:"close",icon:d,onClick:()=>h(!1),className:m.closeButton})]}),l.jsx("div",{className:m.content,style:{transition:i.duration+"s"},children:n})]}),(u==null&&e=="standard"?!0:u)&&l.jsx(Me,{className:m.divider,orientation:"vertical"})]})})]});return e=="modal"?He.createPortal(b(),document.body):b()},Zs=({message:e,className:t,duration:n,closeIcon:s=Le,onClose:r,...c})=>{const[u,a]=o.useState(!0),d=Qt({className:t,closeIcon:s,duration:n,isVisible:u,onClose:r,message:e});o.useEffect(()=>{n&&setTimeout(()=>{i()},n)},[n]);const i=()=>{a(!1),r==null||r()};return l.jsx(X.AnimatePresence,{children:u&&l.jsx(X.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:d.snackbar,...c,children:l.jsxs("div",{className:d.container,children:[l.jsx("p",{className:d.supportingText,children:e}),l.jsx(Se,{onClick:()=>i(),className:d.icon,icon:s,label:"close the snackbar"})]})})})},Qs=({selected:e=!1,className:t,activeIcon:n,disabled:s=!1,inactiveIcon:r,onChange:c,onClick:u,onKeyDown:a,ref:d,...i})=>{const[f,y]=o.useState(e);o.useEffect(()=>{y(e)},[e]);const h=S=>{s||(x(),u&&u(S))},m=S=>{s||((S.key===" "||S.key==="Enter")&&(S.preventDefault(),x()),a&&a(S))},x=()=>{y(!f),c==null||c(!f)},b=tn({className:t,isSelected:f,activeIcon:n,inactiveIcon:r,disabled:s,selected:f,onChange:c}),w=o.useRef(null),M=d||w;return l.jsxs(X.motion.div,{role:"switch","aria-checked":f,tabIndex:s?-1:0,onKeyDown:m,onClick:h,ref:M,className:b.switch,...i,children:[l.jsx("input",{type:"hidden",value:f?"1":"0"}),l.jsxs(X.motion.div,{layout:!0,style:{translate:f?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:b.handleContainer,children:[l.jsx("div",{className:b.handle,children:(f?n:r)&&l.jsx(ce,{className:b.icon,icon:f?n:r})}),l.jsx("div",{className:b.handleStateLayer})]})]})},bn=({className:e,onClick:t,label:n,variant:s="primary",href:r,icon:c,selectedTab:u,setSelectedTab:a,tabsId:d,index:i,onTabSelected:f,scrollable:y=!1,selected:h=!1,children:m,ref:x,...b})=>{const w=o.useRef(null),M=x||w,S=n??(typeof m=="string"?m:void 0),[g,$]=o.useState(h);o.useEffect(()=>{h&&u==null?$(!0):$(u==i&&i!=null)},[u]),o.useEffect(()=>{u==i&&f&&f({ref:M,index:i||0,label:S,icon:c})},[u]);const F=r?"a":"button",v=R=>{a&&a(i??null),t&&t(R)},k=sn({className:e,onTabSelected:f,scrollable:y,selectedTab:u,index:i,tabsId:d,selected:g,variant:s,icon:c,label:S,isSelected:g,setSelectedTab:a,href:r});return l.jsxs(F,{...b,role:"tab","aria-selected":g,ref:M,href:r,className:k.tab,onClick:v,...b,children:[l.jsx(de,{style:{transition:.3+"s"},className:k.stateLayer,colorName:s==="primary"&&g?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),l.jsxs("span",{className:k.content,children:[c&&l.jsx(ce,{icon:c,className:k.icon}),l.jsx("span",{className:k.label,children:S}),g&&l.jsx(X.motion.span,{layoutId:`underline-${d}`,className:k.underline,transition:{duration:.3}})]})]})},Je=o.createContext(null),er=({variant:e="primary",onTabSelected:t,children:n,className:s,selectedTab:r,setSelectedTab:c,scrollable:u=!1})=>{const a=o.useContext(Je),[d,i]=o.useState(null);let f;r===0||r!=null?f=r:a?f=a.selectedTab:f=d;const y=c??(a==null?void 0:a.setSelectedTab)??i,h=o.Children.toArray(n).filter(M=>o.isValidElement(M)&&M.type===bn),m=o.useRef(null),x=M=>{if(t==null||t(M),u){const S=m.current,g=M.ref.current;if(S&&g){const $=g.offsetLeft+g.offsetWidth/2-S.offsetWidth/2;S.scrollTo({left:$,behavior:"smooth"})}}},b=o.useMemo(()=>(a==null?void 0:a.tabsId)??gn(),[a==null?void 0:a.tabsId]),w=on({children:n,onTabSelected:t,scrollable:u,selectedTab:f,setSelectedTab:y,className:s,variant:e});return l.jsx("div",{ref:m,role:"tablist",className:w.tabs,children:h.map((M,S)=>o.cloneElement(M,{key:S,index:S,variant:e,selectedTab:f,setSelectedTab:y,tabsId:b,onTabSelected:x,scrollable:u}))})},tr=({children:e,selectedTab:t,setSelectedTab:n,defaultTab:s=0})=>{const[r,c]=o.useState(s),u=o.useRef(null),a=t!==void 0?t:r,d=n??c,i=u.current!==null&&a!==null?a>u.current?1:-1:0;a!==u.current&&(u.current=a);const f=o.useId(),y=o.useMemo(()=>({selectedTab:a,setSelectedTab:d,previousTab:u.current,direction:i,tabsId:f}),[a,d,i,f]);return l.jsx(Je.Provider,{value:y,children:e})},Sn=({children:e,className:t,isSelected:n=!1})=>{const s=un({children:e,className:t,isSelected:n});return l.jsx("div",{className:s.tabPanel,children:e})},nr=({children:e,className:t})=>{const n=o.useContext(Je);if(!n)return console.warn("TabPanels must be used within a TabGroup"),null;const{selectedTab:s,direction:r,tabsId:c}=n,u=o.Children.toArray(e).filter(d=>o.isValidElement(d)&&d.type===Sn),a=an({children:e,className:t});return l.jsx("div",{className:a.tabPanels,children:l.jsx(X.AnimatePresence,{initial:!1,custom:r,mode:"popLayout",children:u.map((d,i)=>s===i&&l.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-${c}-${i}`,children:o.cloneElement(d,{isSelected:!0})},i))})})},sr=({hasSelected:e})=>({datePicker:p("inline-flex flex-col bg-surface-container-high rounded-[28px] p-3 select-none","min-w-[320px]"),header:p("flex items-center justify-between h-12 mb-2 px-2"),monthNav:p("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:p("text-label-large text-on-surface font-bold capitalize"),weekDays:p("grid grid-cols-7 mb-2"),weekDay:p("h-10 flex items-center justify-center text-body-small text-on-surface-variant"),daysGrid:p("grid grid-cols-7 row-auto gap-y-2"),dayCell:p("flex items-center justify-center h-10 p-0 relative"),dayButton:p("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")}),rr=Q("datePicker",sr),En=({value:e,defaultValue:t,onChange:n,minDate:s,maxDate:r,shouldDisableDate:c,locale:u="default",weekStartDay:a=0,className:d,style:i,mode:f="single",...y})=>{const[h,m]=o.useState(()=>{const j=E=>E instanceof Date?E:Array.isArray(E)&&E[0]?E[0]:null,L=j(e)||j(t)||new Date;return new Date(L.getFullYear(),L.getMonth(),1)}),[x,b]=o.useState(0),[w,M]=o.useState("day"),S=e!==void 0,[g,$]=o.useState(t||null),F=S?e||null:g,v=(j,L)=>new Date(j,L+1,0).getDate(),k=o.useMemo(()=>{const j=h.getFullYear(),L=h.getMonth(),E=v(j,L),V=(new Date(j,L,1).getDay()-a+7)%7,_=[],q=v(j,L-1);for(let Y=V-1;Y>=0;Y--)_.push({date:new Date(j,L-1,q-Y),isCurrentMonth:!1});for(let Y=1;Y<=E;Y++)_.push({date:new Date(j,L,Y),isCurrentMonth:!0});const A=42-_.length;for(let Y=1;Y<=A;Y++)_.push({date:new Date(j,L+1,Y),isCurrentMonth:!1});return _},[h,a]),R=o.useMemo(()=>{const j=new Date().getFullYear(),L=j-100,E=j+100,P=[];for(let V=L;V<=E;V++)P.push(V);return P},[]),I=o.useRef(null);o.useEffect(()=>{if(w==="year"&&I.current){const j=I.current.querySelector('[data-selected="true"]');j&&j.scrollIntoView({block:"center"})}},[w]);const W=o.useMemo(()=>new Intl.DateTimeFormat(u,{month:"long",year:"numeric"}),[u]),N=o.useMemo(()=>new Intl.DateTimeFormat(u,{weekday:"narrow"}),[u]),z=o.useMemo(()=>{const j=new Date(2023,0,1+a);return Array.from({length:7}).map((L,E)=>{const P=new Date(j);return P.setDate(j.getDate()+E),N.format(P).charAt(0).toUpperCase()})},[N,a]),O=()=>{b(-1),m(j=>new Date(j.getFullYear(),j.getMonth()-1,1))},ee=()=>{b(1),m(j=>new Date(j.getFullYear(),j.getMonth()+1,1))},H=j=>{m(L=>new Date(j,L.getMonth(),1)),M("day")},D=(j,L)=>j?j.getDate()===L.getDate()&&j.getMonth()===L.getMonth()&&j.getFullYear()===L.getFullYear():!1,C=j=>D(new Date,j),T=j=>{let L=j;if(f==="single")L=j;else{const E=F,[P,V]=Array.isArray(E)?E:[null,null];!P||P&&V?L=[j,null]:j<P?L=[j,P]:L=[P,j]}S||$(L),n&&n(L)},U=j=>{if(f==="single")return{isSelected:D(F,j),isStart:!1,isEnd:!1,isInRange:!1};const L=Array.isArray(F)?F:[F,null],[E,P]=L,V=D(E,j),_=D(P,j);let q=!1;if(E&&P){const ne=new Date(E.getFullYear(),E.getMonth(),E.getDate()).getTime(),A=new Date(P.getFullYear(),P.getMonth(),P.getDate()).getTime(),Y=new Date(j.getFullYear(),j.getMonth(),j.getDate()).getTime();q=Y>ne&&Y<A}return{isSelected:V||_,isStart:V,isEnd:_,isInRange:q}},J=rr({hasSelected:!!F}),oe={enter:j=>({x:j>0?"100%":"-100%",opacity:0}),center:{x:0,opacity:1},exit:j=>({x:j<0?"100%":"-100%",opacity:0})};return l.jsxs("div",{className:p(J.datePicker,d),style:i,...y,children:[l.jsxs("div",{className:J.header,children:[l.jsxs(ye,{variant:"text",disableTextMargins:!0,size:"small",onClick:()=>M(j=>j==="day"?"year":"day"),className:"text-label-large font-bold capitalize text-on-surface hover:bg-surface-container-highest",children:[l.jsx("span",{className:"mr-2",children:w==="day"?W.format(h):h.getFullYear()}),l.jsx(ce,{icon:vn,className:p("w-3 h-3 transition-transform duration-200 inline",w==="year"&&"rotate-180")})]}),w==="day"&&l.jsxs("div",{className:"flex items-center",children:[l.jsx(Se,{size:"xSmall",allowShapeTransformation:!1,onClick:O,icon:$s,label:"Previous month",title:null}),l.jsx(Se,{size:"xSmall",allowShapeTransformation:!1,onClick:ee,icon:xn,label:"Next month",title:null})]})]}),w==="year"?l.jsx("div",{className:"h-[280px] overflow-y-auto grid grid-cols-3 gap-2 p-2 scrollbar-hide",ref:I,children:R.map(j=>l.jsx(ye,{size:"small",variant:j===h.getFullYear()?"filled":"text",onClick:()=>H(j),"data-selected":j===h.getFullYear(),className:p("w-full",{"text-on-surface":j!==h.getFullYear()}),label:j.toString(),children:j},j))}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:J.weekDays,children:z.map((j,L)=>l.jsx("div",{className:J.weekDay,children:j},L))}),l.jsx("div",{className:"overflow-hidden relative min-h-[240px]",children:l.jsx(X.AnimatePresence,{mode:"popLayout",initial:!1,custom:x,children:l.jsx(X.motion.div,{custom:x,variants:oe,initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",bounce:0,duration:.3},className:J.daysGrid,children:k.map((j,L)=>{if(!j.isCurrentMonth)return l.jsx("div",{className:J.dayCell},L);const{isSelected:E,isStart:P,isEnd:V,isInRange:_}=U(j.date),q=C(j.date),ne=s&&j.date<s||r&&j.date>r||(c==null?void 0:c(j.date));return l.jsx("div",{className:p(J.dayCell,_&&"bg-primary/20",P&&(F==null?void 0:F[1])&&"bg-gradient-to-r from-transparent to-primary/20",V&&(F==null?void 0:F[0])&&"bg-gradient-to-l from-transparent to-primary/20"),children:l.jsx(ye,{className:()=>({button:p("aspect-square h-[40px] p-0",{"text-on-surface":!E&&!q,"opacity-50":ne}),stateLayer:p({"!bg-transparent":ne})}),size:"small",allowShapeTransformation:!1,variant:p({filled:E,outlined:q,text:!E&&!q}),label:j.date.getDate().toString(),onClick:()=>T(j.date),disabled:ne,children:j.date.getDate().toString()})},L)})},h.toISOString())})})]})]})},or=({variant:e="filled",autoFocus:t,disabled:n=!1,errorText:s,placeholder:r,suffix:c,name:u,label:a,className:d,supportingText:i,trailingIcon:f,leadingIcon:y,type:h="text",multiline:m=!1,autoComplete:x="on",onChange:b,value:w,defaultValue:M,showSupportingText:S,id:g,style:$,ref:F,onFocus:v,onBlur:k,options:R,children:I,...W})=>{var tt;const N=o.useId(),z=g||N,O=`${z}-helper`,ee=w!==void 0,[H,D]=o.useState(M??""),C=ee?w:H,[T,U]=o.useState(!1),[J,oe]=o.useState(!!(s!=null&&s.length)),j=o.useRef(null),L=F||j,E=o.useRef(null),P=o.useRef(null),V=o.useRef(null),_=S??(!!(s!=null&&s.length)||!!(i!=null&&i.length));o.useEffect(()=>{oe(!!(s!=null&&s.length))},[s]);const q=()=>{L.current&&!T&&!n&&h!=="select"&&L.current.focus()};o.useEffect(()=>{if(!(!t||n)&&h!=="select"){const G=window.requestAnimationFrame(()=>{q()});return()=>window.cancelAnimationFrame(G)}},[t,n,L,h]),o.useEffect(()=>{T?(oe(!1),v==null||v()):(s!=null&&s.length&&oe(!0),k==null||k())},[T]);const ne=G=>{const ie=G.target.value;ee||D(ie),oe(!1),b&&b(G)},A=h==="date",[Y,te]=o.useState(!1),[le,Ee]=o.useState(null),fe=o.useMemo(()=>{const G=String(C);if(!G)return null;const[ie,we,ke]=G.split("-").map(Number);return ie&&we&&ke?new Date(ie,we-1,ke):null},[C]),xe=()=>{n||(Y?te(!1):(Ee(fe),te(!0)))};o.useEffect(()=>{Y?U(!0):(!Z||!se)&&U(!1)},[Y]),o.useEffect(()=>{if(!Y)return;const G=me=>{var je,Ce;return me?((je=E.current)==null?void 0:je.contains(me))||((Ce=V.current)==null?void 0:Ce.contains(me)):!1},ie=me=>{var nt,st;const je=me.target,Ce=(nt=V.current)==null?void 0:nt.contains(je),Cn=(st=P.current)==null?void 0:st.contains(je);!Ce&&!Cn&&te(!1)},we=me=>{G(me.target)||te(!1)},ke=me=>{me.key==="Escape"&&te(!1)};return document.addEventListener("pointerdown",ie),document.addEventListener("focusin",we),document.addEventListener("keydown",ke),()=>{document.removeEventListener("pointerdown",ie),document.removeEventListener("focusin",we),document.removeEventListener("keydown",ke)}},[Y]);const K=()=>{const G=le?le.toLocaleDateString("en-CA"):"";ee||D(G),b&&b({target:{value:G,name:u,type:h}}),te(!1)},Z=h==="select",[se,he]=o.useState(!1),ve=o.useRef(null),Ze=o.useMemo(()=>{if(Z&&R){const G=R.find(ie=>String(ie.value)===String(C));return G?G.label:C}return C},[C,Z,R]),Qe=()=>{n||(he(!se),U(!se))},et=G=>{if(ee||D(String(G)),b){const ie={target:{value:String(G),name:u,type:h}};b(ie)}he(!1),U(!1)};o.useEffect(()=>{if(!se)return;const G=ie=>{E.current&&!E.current.contains(ie.target)&&ve.current&&!ve.current.contains(ie.target)&&(he(!1),U(!1))};return document.addEventListener("mousedown",G),()=>{document.removeEventListener("mousedown",G)}},[se]);const ge=o.useMemo(()=>{if(f)return f;if(A)return Ds;if(Z)return se?As:vn},[f,A,Z,se]),jn=A||Z?"[&::-webkit-calendar-picker-indicator]:hidden cursor-pointer selection:bg-transparent":"",ue=fn({showSupportingText:_,isFocused:T,showErrorIcon:J,disabled:n,name:u,label:a,autoComplete:x,className:d,onChange:b,placeholder:r,supportingText:i,type:h,leadingIcon:y,trailingIcon:ge,variant:e,errorText:s,value:String(Ze),suffix:c,multiline:m}),Ln=m?Fn:"input",Mn=m?{}:{type:Z?"text":h,readOnly:Z},Pe=T||typeof C=="string"&&C.length>0||h=="date"||Z&&se,Ie=Pe&&e==="outlined",In=!Ie;return l.jsxs("div",{ref:E,className:ue.textField,style:$,children:[l.jsxs("fieldset",{onClick:()=>{Z?Qe():q()},className:ue.content,role:"presentation",children:[l.jsx("div",{className:ue.stateLayer}),y&&l.jsx("div",{className:ue.leadingIcon,children:o.isValidElement(y)?y:l.jsx(ce,{className:"w-5 h-5",icon:y})}),l.jsx(X.motion.legend,{"aria-hidden":"true",variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:Ie?"visible":"hidden",animate:Ie?"visible":"hidden",className:"max-w-full ml-2 px-2 text-body-small h-0 overflow-hidden whitespace-nowrap",transition:{duration:.2},children:l.jsx("span",{className:"transform inline-flex -translate-y-1/2 opacity-0",children:a})}),l.jsxs("div",{className:"flex-1 relative",children:[In&&l.jsx(X.motion.label,{htmlFor:z,className:p("absolute left-4 transition-all duration-300 pointer-events-none",{"text-body-small top-2":e=="filled"&&Pe,"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&Pe)}),transition:{duration:.3},layoutId:e==="outlined"?`${z}-label`:void 0,children:l.jsx("span",{className:ue.label,children:a})}),Ie&&l.jsx(X.motion.label,{htmlFor:z,className:p("absolute left-2 -top-3 px-1 text-body-small z-10",ue.label),layoutId:`${z}-label`,transition:{duration:.3},children:a}),l.jsx(Ln,{...W,ref:L,value:Ze,onChange:ne,className:p(ue.input,jn),id:z,name:u,placeholder:T?r??void 0:"",onFocus:()=>{Z||U(!0)},onBlur:()=>{Z||U(!1)},disabled:n,autoComplete:x,"aria-invalid":!!(s!=null&&s.length),"aria-describedby":_?O:void 0,...Mn})]}),l.jsx("div",{className:ue.activeIndicator}),!J&&l.jsxs(l.Fragment,{children:[ge&&l.jsx("div",{ref:A?P:void 0,onClick:G=>{G.stopPropagation(),A&&xe(),Z&&Qe()},className:p(ue.trailingIcon,(A||Z)&&"cursor-pointer"),children:l.jsx("div",{className:"flex items-center justify-center w-full h-full",children:o.isValidElement(ge)?ge:l.jsx(ce,{className:"h-5",icon:ge})})}),!ge&&c&&l.jsx("span",{className:ue.suffix,children:c})]}),J&&l.jsx("div",{className:p(ue.trailingIcon,{" absolute right-0":!ge}),children:l.jsx(ce,{className:"h-5 text-error",icon:Fs})})]}),_&&l.jsx("p",{className:ue.supportingText,id:O,children:s!=null&&s.length?s:i!=null&&i.length?i:" "}),A&&Y&&l.jsx(l.Fragment,{children:l.jsx(Ne,{anchorRef:E,position:"bottom",children:l.jsxs("div",{ref:V,className:"z-50 shadow-xl rounded-[28px] bg-surface-container-high overflow-hidden",children:[l.jsx(En,{className:"",value:le,onChange:Ee}),l.jsxs("div",{className:"flex justify-end gap-2 p-4 pt-0",children:[l.jsx(ye,{variant:"text",size:"small",onClick:()=>te(!1),children:"Cancel"}),l.jsx(ye,{variant:"filled",size:"small",onClick:K,children:"OK"})]})]})})}),Z&&se&&l.jsx(Ne,{anchorRef:E,position:"bottom",style:{width:(tt=E.current)==null?void 0:tt.offsetWidth},children:l.jsx("div",{ref:ve,children:l.jsx(Ge,{selected:C,children:I?o.Children.map(I,G=>o.isValidElement(G)&&G.type===De?o.cloneElement(G,{onClick:ie=>{G.props.onClick&&G.props.onClick(ie),et(G.props.value??"")}}):G):R==null?void 0:R.map((G,ie)=>G.type==="divider"?l.jsx(Me,{className:"my-1"},ie):G.type==="headline"?l.jsx(Ue,{label:G.label},ie):l.jsx(De,{onClick:we=>{G.onClick&&G.onClick(we),et(G.value??"")},...G,children:G.label},G.value??ie))})})})]})},ir=({isSelected:e,icon:t,label:n,variant:s})=>({navigationRailItem:p(" 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:p(" 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:p("rounded-full"),icon:p("size-6 flex"),label:p("w-fit mx-auto text-nowrap",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})}),lr=Q("navigationRailItem",ir),Nn=({label:e})=>l.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:l.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),kn=({className:e,onClick:t,label:n,variant:s="vertical",href:r,icon:c,selectedItem:u,setSelectedItem:a,index:d,onItemSelected:i,selected:f=!1,ref:y,transition:h,isExtended:m,iconSelected:x,style:b,extendedOnly:w,children:M,...S})=>{M&&(n=M);const g=o.useRef(null),$=y||g,[F,v]=o.useState(f);o.useEffect(()=>{f&&u==null?v(!0):v(u==d&&d!=null)},[u]),o.useEffect(()=>{u==d&&i&&i({ref:$,index:d||0,label:n,icon:c})},[u]);const k=r?"a":"button",R=W=>{a&&a(d??null),t&&t(W)},I=lr({isExtended:m,extendedOnly:w,className:e,onItemSelected:i,selectedItem:u,index:d,transition:h,selected:F,variant:s,icon:c,label:n,isSelected:F,setSelectedItem:a,href:r,children:n,iconSelected:x});return h={duration:.3,...h},w&&!m?null:l.jsxs(k,{...S,role:"tab","aria-selected":F,ref:$,href:r,className:I.navigationRailItem,onClick:R,style:{transition:h.duration+"s",...b},children:[l.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:I.container,children:[l.jsx(de,{style:{transition:h.duration+"s"},className:I.stateLayer,colorName:p({"on-surface":!F,"on-secondary-container":F}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),c&&l.jsx(ce,{icon:F?x:c,className:I.icon}),l.jsx(X.AnimatePresence,{children:s=="horizontal"&&(()=>{const W={width:0,opacity:0,transition:{...h}},N={width:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/2,delay:h.duration-h.duration/2}}};return l.jsx(X.motion.span,{initial:W,animate:N,exit:W,className:I.label,children:n})})()})]}),l.jsx(X.AnimatePresence,{children:s=="vertical"&&(()=>{const W={height:0,opacity:0,transition:{...h,opacity:{duration:0}}},N={height:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/3,delay:h.duration-h.duration/3}}};return l.jsx(X.motion.span,{initial:N,animate:N,exit:W,className:I.label,transition:h,children:n})})()})]})},ar=({isExtended:e,alignment:t})=>({navigationRail:p("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:p("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:p(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),cr=Q("navigationRail",ar),ur=({variant:e="standard",onItemSelected:t,children:n,className:s,selectedItem:r,extended:c,alignment:u="top",menu:a={closed:{icon:Ws,label:"Open menu"},opened:{icon:Le,label:"Close menu"}},style:d,onExtendedChange:i,transition:f,setSelectedItem:y})=>{const[h,m]=o.useState(null),[x,b]=o.useState(c);let w;r==0||r!=null?w=r:w=h;const M=y||m,S=o.useRef(null),g=I=>{t==null||t(I)};function $(I){const W=[];return o.Children.forEach(I,N=>{o.isValidElement(N)&&N.type===o.Fragment?W.push(...$(N.props.children)):W.push(N)}),W}const F=$(n),v=F.filter(I=>o.isValidElement(I)&&I.type===Ae),k=cr({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:M,className:s,variant:e,extended:x,isExtended:x,alignment:u,menu:a,transition:f,onExtendedChange:i});f={duration:.3,...f};const R=o.useRef(!1);return R.current=!1,o.useEffect(()=>{i==null||i(x??!1)},[x]),l.jsxs("div",{style:{transition:f.duration+"s",...d},ref:S,className:k.navigationRail,children:[l.jsxs("div",{className:k.header,children:[l.jsx(Se,{onClick:()=>b(!x),label:x?a==null?void 0:a.opened.label:a==null?void 0:a.closed.label,className:k.menuIcon,icon:x?a.opened.icon:a==null?void 0:a.closed.icon}),v.length>0&&o.cloneElement(v[0],{transition:f,isExtended:x,className:"!shadow-none mx-5 "+v[0].props.className})]}),l.jsx("div",{className:k.segments,children:(()=>{let I=0;return F.map(W=>o.isValidElement(W)&&W.type===kn?o.cloneElement(W,{key:I,index:I++,variant:x?"horizontal":"vertical",selectedItem:w,setSelectedItem:M,onItemSelected:g,transition:f,extendedOnly:R.current,isExtended:x}):o.isValidElement(W)&&W.type===Ae?null:o.isValidElement(W)&&W.type===Nn?(R.current=!0,x?o.cloneElement(W,{}):null):W)})()}),l.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function dr(e){return Re.defineConfig({variant:Re.Variants.Udixio,...e,plugins:[new Re.FontPlugin(e),new ht.TailwindPlugin(e)]})}exports.AnchorPositioner=Ne;exports.AnimateOnScrollInit=ns;exports.Button=ye;exports.Card=Is;exports.Carousel=Cs;exports.CarouselItem=yn;exports.Checkbox=Ts;exports.Chip=Be;exports.Chips=Us;exports.ContextMenu=zs;exports.CustomScroll=vt;exports.DatePicker=En;exports.Divider=Me;exports.Fab=Ae;exports.FabMenu=Gs;exports.Icon=ce;exports.IconButton=Se;exports.Menu=Ge;exports.MenuGroup=Oe;exports.MenuHeadline=Ue;exports.MenuItem=De;exports.NavigationRail=ur;exports.NavigationRailItem=kn;exports.NavigationRailSection=Nn;exports.ProgressIndicator=pn;exports.RippleEffect=mt;exports.SideSheet=Js;exports.Slider=Ks;exports.SmoothScroll=Xn;exports.Snackbar=Zs;exports.State=de;exports.Switch=Qs;exports.SyncedFixedWrapper=St;exports.Tab=bn;exports.TabGroup=tr;exports.TabPanel=Sn;exports.TabPanels=nr;exports.Tabs=er;exports.TextField=or;exports.ThemeProvider=Kn;exports.Tooltip=Ke;exports.animateOnScroll=ss;exports.buttonStyle=rs;exports.cardStyle=os;exports.carouselItemConfig=Ye;exports.carouselItemStyle=is;exports.carouselStyle=ls;exports.checkboxStyle=as;exports.chipStyle=cs;exports.chipsStyle=us;exports.classNames=p;exports.classnames=yt;exports.createUseClassNames=Q;exports.customScrollStyle=xt;exports.defaultClassNames=re;exports.defineConfig=dr;exports.dividerStyle=ds;exports.fabMenuStyle=hs;exports.fabStyle=fs;exports.getClassNames=Fe;exports.iconButtonStyle=ms;exports.initAnimateOnScroll=ze;exports.menuGroupStyle=ys;exports.menuStyle=ps;exports.normalize=be;exports.progressIndicatorStyle=xs;exports.sideSheetConfig=_e;exports.sideSheetStyle=Kt;exports.sliderConfig=qe;exports.sliderStyle=gs;exports.snackbarStyle=ws;exports.switchStyle=bs;exports.tabPanelStyle=ks;exports.tabPanelsStyle=Ns;exports.tabStyle=Ss;exports.tabsStyle=Es;exports.textFieldStyle=js;exports.toolStyle=Ls;exports.useButtonStyle=Nt;exports.useCardStyle=jt;exports.useCarouselItemStyle=Lt;exports.useCarouselStyle=It;exports.useCheckboxStyle=Rt;exports.useChipStyle=At;exports.useChipsStyle=Pt;exports.useClassNames=$n;exports.useDividerStyle=Wt;exports.useFabMenuStyle=Ht;exports.useFabStyle=Bt;exports.useIconButtonStyle=zt;exports.useMenuGroupStyle=Xt;exports.useMenuStyle=_t;exports.useProgressIndicatorStyle=Gt;exports.useSideSheetStyle=vs;exports.useSliderStyle=Jt;exports.useSnackbarStyle=Qt;exports.useStateStyle=bt;exports.useSwitchStyle=tn;exports.useTabPanelStyle=un;exports.useTabPanelsStyle=an;exports.useTabStyle=sn;exports.useTabsStyle=on;exports.useTextFieldStyle=fn;exports.useToolTipStyle=mn;exports.useTooltipTrigger=wn;
|