@udixio/ui-react 2.0.0 → 2.1.0
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 +14 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1076 -1104
- package/dist/lib/effects/AnimateOnScroll.d.ts +3 -11
- package/dist/lib/effects/AnimateOnScroll.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/lib/effects/AnimateOnScroll.ts +267 -0
- package/src/lib/effects/AnimateOnScroll.tsx +0 -353
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 2.1.0 (2025-10-16)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **animation:** refactor and simplify `AnimateOnScroll` initialization and handling ([ad68d1f](https://github.com/Udixio/UI/commit/ad68d1f))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated @udixio/tailwind to 2.1.0
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Joël VIGREUX
|
|
14
|
+
|
|
1
15
|
# 2.0.0 (2025-10-15)
|
|
2
16
|
|
|
3
17
|
### 🚀 Features
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),ue=require("clsx"),Oe=require("tailwind-merge"),a=require("react"),k=require("motion/react"),Xe=require("throttle-debounce"),Ye=require("motion"),de=require("react-dom"),Q=require("@udixio/theme"),fe=require("@udixio/tailwind"),_e=require("react-textarea-autosize"),me=Oe.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)=>me(ue.clsx(e)),he=(...e)=>me(ue.clsx(e));function Ke(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 pe=e=>{const t={};e.classNameList.forEach(s=>{var r;if(s)if(typeof s=="string")(t[r=e.default]??(t[r]=[])).push(s);else{const u=s(e.states);Object.entries(u).map(d=>{const[c,f]=d;(t[c]??(t[c]=[])).push(f)})}});const n=t;return Object.entries(t).map(s=>{let[r,u]=s;u=u.reverse(),r==e.default&&u.unshift("relative"),u.unshift(Ke(r)),n[r]=he(...u)}),n},F=(e,t)=>n=>pe({classNameList:[n.className,t],default:e,states:n}),ye=F("button",({variant:e,disableTextMargins:t,disabled:n,iconPosition:s,icon:r,isActive:u,loading:d,shape:c,onToggle:f,size:l,allowShapeTransformation:x})=>({button:p(" relative cursor-pointer group outline-none inline-block flex justify-center items-center ",l==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",l==="small"&&"text-label-large px-4 py-2.5 gap-2",l==="medium"&&"text-title-medium px-6 py-4 gap-2",l==="large"&&"text-headline-small px-12 py-8 gap-3",l==="xLarge"&&"text-headline-large px-16 py-12 gap-4",c==="rounded"&&{"rounded-[30px]":l==="xSmall"||l=="small","rounded-[40px]":l==="medium","rounded-[70px]":l==="large"||l=="xLarge"},(c==="squared"||x&&u)&&{"rounded-[12px]":l==="xSmall"||l=="small","rounded-[16px]":l==="medium","rounded-[28px]":l==="large"||l=="xLarge"},x&&!n&&{"active:rounded-[12px]":l==="xSmall"||l=="small","active:rounded-[16px]":l==="medium","active:rounded-[28px]":l==="large"||l=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!u,"bg-primary text-on-primary":!n&&u,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!u&&f,"bg-primary text-on-primary":!n&&(u&&f||!f),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!u,"bg-secondary text-on-secondary":!n&&u,"text-on-surface/[0.38]":n},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":n,"text-primary border-outline focus:border-primary":!n&&!u,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&u}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[l==="xSmall"&&"-mx-3 ",l==="small"&&"-mx-4 ",l==="medium"&&"-mx-6 ",l==="large"&&"-mx-12",l==="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("min-h-full min-w-full absolute top-0 left-0 overflow-hidden",e==="elevated"&&{"bg-on-surface/[0.12]":n,"group-state-primary":!n},e==="filled"&&{"bg-on-surface/[0.12]":n,"group-state-on-primary":!n&&!f,"group-state-on-surface-variant":!n&&f},c==="rounded"&&{"rounded-[30px]":l==="xSmall"||l=="small","rounded-[40px]":l==="medium","rounded-[70px]":l==="large"||l=="xLarge"},(c==="squared"||x&&u)&&{"rounded-[12px]":l==="xSmall"||l=="small","rounded-[16px]":l==="medium","rounded-[28px]":l==="large"||l=="xLarge"},x&&!n&&{"group-active:rounded-[12px]":l==="xSmall"||l=="small","group-active:rounded-[16px]":l==="medium","group-active:rounded-[28px]":l==="large"||l=="xLarge"},e==="tonal"&&{"bg-on-surface/[0.12]":n,"group-state-on-secondary-container ":!n},e==="outlined"&&{"group-state-primary group-state-primary":!n},e==="text"&&{"group-state-primary":!n}),label:p({invisible:d}),icon:p({invisible:d},l==="xSmall"&&"size-5",l==="small"&&"size-5",l==="medium"&&"size-6",l==="large"&&"size-8",l==="xLarge"&&"size-10")})),xe=F("card",({variant:e,isInteractive:t})=>({card:p("group/card rounded-xl overflow-hidden z-10",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest"),stateLayer:p(["w-full top-0 left-0 h-full absolute -z-10",{" group-hover/card:hover-state-on-surface group-focus-visible/card:focus-state-on-surface":t}])})),ge=F("carouselItem",()=>({carouselItem:p("rounded-[28px] overflow-hidden flex-none")})),ve=F("carousel",()=>({carousel:p(["w-full h-[400px]"]),track:p("grid grid-flow-col h-full transition-transform ease-out w-fit")})),we=F("divider",({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"})})),be=F("fab",({size:e,variant:t,isExtended:n})=>({fab:p("flex shadow-3 hover:shadow-4 group overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small"&&!n,"rounded-[16px]":e=="medium"||n,"rounded-[28px]":e=="large"&&!n},{"p-2":e=="small"&&!n,"p-4":e=="medium"||n,"p-[30px]":e=="large"&&!n},t==="surface"&&"bg-surface-container",t==="primary"&&"bg-primary-container",t==="secondary"&&"bg-secondary-container",t==="tertiary"&&"bg-tertiary-container",t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container"),stateLayer:p("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",t==="surface"&&"group-hover:hover-state-primary group-focus:focus-state-primary",t==="primary"&&"group-hover:hover-state-on-primary-container group-focus-visible:focus-state-on-primary-container",t==="secondary"&&"group-hover:hover-state-on-secondary-container group-focus-visible:focus-state-on-secondary-container",t==="tertiary"&&"group-hover:hover-state-on-tertiary-container group-focus-visible:focus-state-on-tertiary-container"),icon:p({"size-6":e=="small"||e=="medium"||n,"size-9":e=="large"&&!n}),label:p("text-title-medium text-nowrap")})),je=F("iconButton",({variant:e,disabled:t,onToggle:n,isActive:s,size:r,width:u,shape:d,allowShapeTransformation:c})=>({iconButton:p("rounded-full relative flex transition-all duration-300","group cursor-pointer",{"cursor-default":t},(d==="rounded"||d==="squared"&&n&&!t&&s&&c)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(d==="squared"||d==="rounded"&&n&&!t&&s&&c)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},c&&!t&&{"group-active:rounded-[12px]":r==="xSmall"||r=="small","group-active:rounded-[16px]":r==="medium","group-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-surface-container":!s&&!!n,"bg-secondary-container":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",(d==="rounded"||d==="squared"&&n&&!t&&s&&c)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(d==="squared"||d==="rounded"&&n&&!t&&s&&c)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},c&&!t&&{"group-active:rounded-[12px]":r==="xSmall"||r=="small","group-active:rounded-[16px]":r==="medium","group-active: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"},u=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],u=="wide"&&[{"px-2.5":r==="xSmall"},{"px-3.5":r==="small"},{"px-6":r==="medium"},{"px-12":r==="large"},{"px-[72px]":r==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!s,"text-primary":s},e==="filled"&&{"text-primary":!s&&!!n,"text-on-primary":s||!n},e==="tonal"&&{"text-on-surface-variant":!s&&!!n,"text-on-secondary-container":s||!n},e==="outlined"&&{"text-on-surface-variant":!s,"text-inverse-on-surface":s}],!!t&&"text-on-surface/[0.38]")})),Se=F("progressIndicator",({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})})),Ee=F("slideSheet",({variant:e,position:t})=>({slideSheet: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",{}),content:p("w-fit "),header:p("p-4 flex items-center gap-2"),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")})),Le=F("slider",({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 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"])})),Ne=F("snackbar",()=>({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")})),Re=F("switch",({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:p("group 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:h-[28px] group-active:w-[28px]",{"bg-on-primary group-hover:bg-primary-container":e},{"bg-outline group-hover: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})})),Ie=F("tab",({isSelected:e,icon:t,label:n,variant:s})=>({tab:p("flex-1 group 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:hover-state-on-surface group-focus-visible:focus-state-on-surface":!e,"group-hover:hover-state-primary group-focus-visible:focus-state-primary":e},s==="secondary"&&"group-hover:hover-state-on-surface group-focus-visible: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")})),ke=F("tabs",({scrollable:e})=>({tabs:p("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})})),Ce=F("textField",({disabled:e,leadingIcon:t,trailingIcon:n,variant:s,errorText:r,isFocused:u,value:d,suffix:c,textLine:f})=>({textField:p({"opacity-[.38]":e}),content:p("group transition-border duration-200 relative flex items-center ",{"h-14":f=="singleLine"},{"border-on-surface-variant":!(r!=null&&r.length)&&!u&&s=="filled","border-outline":!(r!=null&&r.length)&&!u&&s=="outlined","border-primary":!(r!=null&&r.length)&&u,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},s=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],s=="outlined"&&["border rounded box-border",{"border-[3px]":u}]),stateLayer:p("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":u}),label: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)&&u}),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":!!c},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":u}]),supportingText:p(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":u},{"text-error":!!(r!=null&&r.length)}),leadingIcon:p(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!a.isValidElement(t)}]),trailingIcon:p("h-12 w-12 flex items-center justify-center",{"cursor-text":!a.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")})),Me=F("toolTip",({position:e,variant:t})=>({toolTip:p(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",{"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"&&"bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface 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("")})),_=({icon:e,colors:t=[],className:n})=>{if(typeof e=="string"){let l=e;return t[0]&&(l=l.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),l=l.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),i.jsx("div",{className:p("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:l}})}if(e&&typeof e=="object"&&"src"in e){const l=e;return i.jsx("img",{src:l.src,width:l.width,height:l.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 s=e;if(!(s!=null&&s.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:r}=s,[u,d,,,c]=r||[],f=l=>{switch(l.length){case 2:return{"--fa-primary-color":l[0]||"inherit","--fa-secondary-color":l[1]||"inherit"};case 1:return{color:l[0]};default:return{}}};return i.jsx("svg",{className:p("size-5 box-content",n),style:{...f(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${u} ${d}`,role:"img","aria-hidden":"true",children:typeof c=="string"?i.jsx("path",{className:"fill-current",d:c}):c.map((l,x)=>i.jsx("path",{d:l},x))})},$e=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:s,...r})=>{const[u,d]=a.useState(t),[c]=a.useState(1.5);a.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),d(t)},[t]);const[f,l]=a.useState(!0),x=()=>f?c:c*.5;a.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&u!==100){const h=setInterval(()=>{d(f?10:90),l(!f)},x()*1e3);return()=>clearInterval(h)}},[e,f,u]);const[y,o]=a.useState(!1);a.useEffect(()=>{if(u>=100){const h=setTimeout(()=>{o(!1)},n);return()=>{clearTimeout(h)}}else o(!0)},[u,n]);const m=Se({className:s,variant:e,value:t,transitionDuration:n,isVisible:y});return i.jsxs(i.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&i.jsxs("div",{className:m.progressIndicator,...r,children:[i.jsx("div",{style:{width:`${u}%`,transition:`width ${n}ms ease-in-out ${u==100?", max-height 200ms 0.5s ease-in-out":""}`},className:m.track}),i.jsx("div",{style:{marginLeft:u!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${u==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:m.activeIndicator}),i.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")&&i.jsx(k.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:x(),ease:"linear"},className:m.progressIndicator,...r,children:i.jsx(k.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:f?10/100:90/100},visible:{pathLength:f?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:x(),bounce:0}}})},f+"")]})},J=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:0,borderRadius:"50%",width:"25%",height:"25%"},animate:{opacity:1,borderRadius:0,width:"200%",height:"200%",transition:{duration:.3,borderRadius:{duration:.3,delay:.3}}}},[s,r]=a.useState(!0),[u,d]=a.useState(!1),[c,f]=a.useState({x:0,y:0});a.useEffect(()=>{u&&(r(!0),r(!1))},[u]),a.useEffect(()=>{const o=t==null?void 0:t.current;if(o)return o.addEventListener("mousedown",l),o.addEventListener("mouseup",y),o.addEventListener("mouseleave",x),()=>{o.removeEventListener("mousedown",l),o.removeEventListener("mouseup",y),o.removeEventListener("mouseleave",x)}},[t]);const l=o=>{const m=t==null?void 0:t.current,h=m.getBoundingClientRect();d(!0),f({x:(o.clientX-h.left)/m.clientWidth*100,y:(o.clientY-h.top)/m.clientHeight*100})},x=o=>{d(!1)},y=o=>{d(!1)};return i.jsx(k.AnimatePresence,{mode:"wait",children:(u||!u&&!s)&&i.jsx(k.motion.div,{style:{position:"absolute",width:"100%",height:"100%",top:c.y+"%",left:c.x+"%",background:`color-mix(in srgb, var(--color-${e}) 12%, transparent)`,pointerEvents:"none"},variants:n,initial:"initial",animate:"animate",exit:{opacity:0,transition:{duration:0}},onAnimationComplete:()=>r(!0),className:"transform -translate-x-1/2 -translate-y-1/2"})})},Pe=F("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"})})),Be=({children:e,orientation:t="vertical",scrollSize:n,onScroll:s,className:r,draggable:u=!1,throttleDuration:d=75})=>{var B,W;const c=a.useRef(null),f=a.useRef(null),[l,x]=a.useState({width:null,height:null});a.useEffect(()=>{if(!c.current)return;const I=new ResizeObserver(D=>{for(const V of D)V.target===c.current&&x({width:V.contentRect.width,height:V.contentRect.height})});return I.observe(c.current),()=>{I.disconnect()}},[c]);const y=a.useRef(null),o=a.useRef(null),m=()=>{const I=f.current;return I?{width:n??I.scrollWidth,height:n??I.scrollHeight}:null},h=()=>{const I=c.current;return I?{width:I.clientWidth,height:I.clientHeight}:null},{scrollYProgress:w,scrollXProgress:g}=k.useScroll({container:c}),E=a.useRef(null);E.current||(E.current=Xe.throttle(d,(I,D)=>{!o.current||!y.current||!c.current||s&&(t==="horizontal"&&D==="x"&&s({scrollProgress:I,scroll:I*(y.current.width-c.current.clientWidth),scrollTotal:y.current.width-c.current.clientWidth,scrollVisible:o.current.width}),t==="vertical"&&D==="y"&&s({scrollProgress:I,scroll:I*(y.current.height-c.current.clientHeight),scrollTotal:y.current.height-c.current.clientHeight,scrollVisible:o.current.height}))}));const j=(I,D)=>{E.current&&E.current(I,D)};a.useEffect(()=>{l.width&&j(g.get(),"x"),l.height&&j(w.get(),"y")},[l]),k.useMotionValueEvent(g,"change",I=>{j(I,"x")}),k.useMotionValueEvent(w,"change",I=>{j(I,"y")});const[$,L]=a.useState(!1);a.useLayoutEffect(()=>{$||!o.current||!y.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?y.current.height:y.current.width,scrollVisible:t=="vertical"?o.current.height:o.current.width}),L(!0))},[o,y,s]),y.current=m(),o.current=h();const[N,C]=a.useState(!1),A=Pe({isDragging:N,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:u,throttleDuration:d}),[P,R]=a.useState(0),[v,M]=a.useState(0),q=I=>{if(!u)return;const D=c.current;if(!D||P==null)return;const Y=(I.pageX-D.offsetLeft-P)*1.5;D.scrollLeft=v-Y},U=I=>{const D=c.current;D&&(C(!0),R(I.pageX-D.offsetLeft),M(D.scrollLeft))},X=I=>{N&&(I.preventDefault(),q(I))},H=()=>{C(!1)},K=()=>{C(!1)},S=I=>{I.preventDefault()},b=a.useRef(null);return a.useEffect(()=>()=>{b.current&&clearTimeout(b.current)},[]),i.jsxs("div",{className:A.customScroll,ref:c,onMouseDown:U,onMouseMove:X,onMouseUp:H,onMouseLeave:K,onDragStart:S,onScroll:I=>{N||(R(null),C(!0),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{C(!1)},1e3))},children:[i.jsx("div",{ref:f,style:t==="vertical"?{height:((B=o==null?void 0:o.current)==null?void 0:B.height)??"100%"}:{width:((W=o==null?void 0:o.current)==null?void 0:W.width)??"100%"},className:A.track,children:e}),o.current&&y.current&&i.jsxs(i.Fragment,{children:[t==="vertical"&&y.current.height>o.current.height&&i.jsx(k.motion.div,{className:"flex-none",style:{height:y.current.height-o.current.height}}),t==="horizontal"&&y.current.width>o.current.width&&i.jsx(k.motion.div,{className:"flex-none",style:{width:y.current.width-o.current.width}})]})]})},Ge=({onScroll:e,el:t,touch:n=!0})=>{const s=a.useRef(null),r=a.useRef(0),u=a.useRef(0);a.useEffect(()=>{if(!t)return;r.current=t.scrollTop,u.current=t.scrollLeft;const d=o=>{e==null||e(o)},c=o=>{o.preventDefault(),d({type:"intent",source:"wheel",deltaX:o.deltaX,deltaY:o.deltaY,originalEvent:o})},f=o=>{if(!n)return;const m=o.touches[0];m&&(s.current={x:m.clientX,y:m.clientY})},l=o=>{if(!n)return;const m=o.touches[0];if(!m||!s.current)return;o.preventDefault();const h=s.current.x-m.clientX,w=s.current.y-m.clientY;s.current={x:m.clientX,y:m.clientY},d({type:"intent",source:"touch",deltaX:h,deltaY:w,originalEvent:o})},x=()=>{n&&(s.current=null)},y=o=>{const h=t.clientHeight*.9;let w=0,g=0;switch(o.key){case"ArrowDown":g=40;break;case"ArrowUp":g=-40;break;case"ArrowRight":w=40;break;case"ArrowLeft":w=-40;break;case"PageDown":g=h;break;case"PageUp":g=-h;break;case"Home":g=Number.NEGATIVE_INFINITY;break;case"End":g=Number.POSITIVE_INFINITY;break;case" ":g=o.shiftKey?-h:h;break;default:return}o.preventDefault(),d({type:"intent",source:"keyboard",deltaX:w,deltaY:g,originalEvent:o})};return t.addEventListener("wheel",c,{passive:!1}),t.addEventListener("touchstart",f,{passive:!0}),t.addEventListener("touchmove",l,{passive:!1}),t.addEventListener("touchend",x,{passive:!0}),t.addEventListener("keydown",y),()=>{t.removeEventListener("wheel",c),t.removeEventListener("touchstart",f),t.removeEventListener("touchmove",l),t.removeEventListener("touchend",x),t.removeEventListener("keydown",y)}},[e])},Je=({transition:e,orientation:t="vertical",throttleDuration:n=25})=>{const[s,r]=a.useState(0),[u,d]=a.useState(),c=a.useRef(!1),f=a.useRef(),l=a.useRef(0);a.useEffect(()=>{d(document);const o=document.documentElement.scrollTop;r(o),l.current=o},[]),a.useEffect(()=>{const o=()=>{c.current||r(document.documentElement.scrollTop)};return u==null||u.addEventListener("scroll",o),()=>{f.current&&clearTimeout(f.current),u==null||u.removeEventListener("scroll",o)}},[u]);const x=a.useRef(),y=a.useRef(null);return a.useEffect(()=>{const o=s;if(y.current&&(y.current.stop(),y.current=null),!c.current){x.current=o;return}return y.current=Ye.animate(x.current??o,o,{duration:(e==null?void 0:e.duration)??.5,ease:"circOut",onUpdate:m=>{f.current&&clearTimeout(f.current),x.current=m;const h=document.documentElement,w=Math.round(m*1e3)/1e3,g=l.current;Math.abs(w-g)<.1||(l.current=w,c.current&&h.scrollTo({top:w}))},onComplete:()=>{f.current=setTimeout(()=>{c.current=!1},300),y.current=null}}),()=>{y.current&&(y.current.stop(),y.current=null)}},[s]),u?i.jsx(Ge,{touch:!1,el:u,onScroll:o=>{if("deltaY"in o&&o.deltaY!==0&&u&&s!==null){let m=s+o.deltaY;const h=u.querySelector("html");h&&(m=Math.min(m,h.scrollHeight-h.clientHeight)),m=Math.max(m,0),r(m),c.current=!0}}}):null},Ae=({targetRef:e,children:t})=>{const[n,s]=a.useState(null),r=a.useRef(null),u=()=>{const d=e.current;if(!d)return;const c=d.getBoundingClientRect();s({position:"fixed",top:c.top,left:c.left,width:c.width,height:c.height,pointerEvents:"none",zIndex:999})};return a.useEffect(()=>{const d=e.current;if(d)return u(),window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),r.current=new ResizeObserver(u),r.current.observe(d),()=>{var c;window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u),(c=r.current)==null||c.disconnect()}},[e]),n?de.createPortal(i.jsx("div",{style:n,children:t}),document.body):null};function Ze(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const Qe=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:s=!1})=>{const[r,u]=a.useState(null);a.useEffect(()=>{(async()=>{const o=await Q.loader(e,s);u(o)})()},[]);const[d,c]=a.useState(null),f=a.useRef(null),l=a.useRef(0),x=a.useRef(null);a.useEffect(()=>{if(!r)return;const o={...e,sourceColor:e.sourceColor},m=Date.now(),h=m-l.current,w=async g=>{await y(g)};if(l.current===0||h>=t)f.current&&(clearTimeout(f.current),f.current=null),x.current=null,l.current=m,w(o);else if(x.current=o,!f.current){const g=Math.max(0,t-h);f.current=setTimeout(async()=>{f.current=null;const E=x.current;x.current=null,E&&(l.current=Date.now(),await w(E))},g)}return()=>{}},[e,t,r]);const y=async o=>{if(typeof o.sourceColor=="string"&&!Ze(o.sourceColor))throw new Error("Invalid hex color");if(!r)return;r.context.update(o),await r.load();const m=r==null?void 0:r.plugins.getPlugin(fe.TailwindPlugin).getInstance().outputCss;c(m),n==null||n(r)};return a.useEffect(()=>()=>{f.current&&(clearTimeout(f.current),f.current=null)},[]),d?i.jsx("style",{dangerouslySetInnerHTML:{__html:d}}):null};function ze(){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 Te(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function T(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function ce(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(s=>s.startsWith("anim-"))?!T(e):!1}function z(e,t){if(!(typeof window>"u"))try{const n=getComputedStyle(e),s=new Set;if(Array.from(e.classList).forEach(r=>{if(r.startsWith("anim")){const u=`--anim-name-${r.replaceAll(/-in|-out|-scroll/g,"").replace(t+"-","")}`,d=n.getPropertyValue(u).trim();d&&s.add(d.replace(t+"-",""))}}),s.size>0){const r=Array.from(s).map(d=>`var(--anim-name-${d})`).join(", "),u=Array.from(s).map(d=>`var(--anim-dependencies-${d})`).join(", ");e.style.animationName=r,e.style.willChange=u}}catch{}}function te(e,t){if(!T(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const d=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),c=d==="x"||d==="inline"?"inline":d==="y"||d==="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`)||(c==="inline"?e.classList.add(`${t}-timeline-inline`):c==="block"?e.classList.add(`${t}-timeline-block`):e.classList.add(`${t}-scroll`))}const n=e.getAttribute(`data-${t}-start`);n&&e.style.setProperty(`--${t}-range-start`,n);const s=e.getAttribute(`data-${t}-end`);s&&e.style.setProperty(`--${t}-range-end`,s);const r=e.hasAttribute(`data-${t}-paused`)||e.classList.contains(`${t}-paused`),u=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!u&&e.setAttribute(`data-${t}-run`,""),z(e,t)}function ne(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"]`)).filter(s=>T(s))}function et(e=document,t){return Array.from(e.querySelectorAll('[class*="anim-"]')).filter(s=>!T(s))}const tt=({prefix:e="anim",children:t,once:n=!0})=>{const s=a.useMemo(Te,[]),r=a.useMemo(()=>ze(),[]),u=a.useRef(null),d=a.useRef(null),c=a.useRef(null);return a.useEffect(()=>{if(s)return;const f=new WeakSet;c.current=f;const l=new IntersectionObserver(o=>{for(const m of o){const h=m.target;if(!ce(h))continue;const g=h.classList.contains(`${e}-out`);if(!g&&m.isIntersecting)h.setAttribute(`data-${e}-in-run`,""),n&&l.unobserve(h);else if(g&&!m.isIntersecting)h.setAttribute(`data-${e}-out-run`,""),n&&l.unobserve(h);else if(!n){const j=h.style.animationName;h.style.animationName="none",h.removeAttribute(`data-${e}-in-run`),h.removeAttribute(`data-${e}-out-run`),h.offsetWidth,h.style.animationName=j}}},{threshold:[0,.2]});d.current=l;const x=o=>{const m=et(o||document);for(const h of m)f.has(h)||(f.add(h),z(h,e),l.observe(h))};x();let y;if(r){let o=null;(()=>{o==null&&(o=requestAnimationFrame(()=>{o=null;const w=ne(void 0,e);for(const g of w)te(g,e)}))})();const h=new MutationObserver(w=>{for(const g of w)if(g.type==="attributes"){const E=g.target;E instanceof HTMLElement&&(te(E,e),ce(E)&&(f.has(E)||(f.add(E),l.observe(E))),z(E,e))}else if(g.type==="childList"&&g.addedNodes&&g.addedNodes.length){for(const E of Array.from(g.addedNodes))if(E instanceof HTMLElement){const j=ne(E,e);for(const $ of j)te($,e);x(E)}}});h.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class",`data-${e}-scroll`,`data-${e}-start`,`data-${e}-end`,`data-${e}-paused`,`data-${e}-run`]}),u.current=h,y=()=>{o!=null&&cancelAnimationFrame(o),h.disconnect(),u.current=null}}else{let o;const m=ne(void 0,e);for(const h of m)z(h,e);m.length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(h=>{o=h.initScrollViewFallback({once:n})}),y=()=>{typeof o=="function"&&o()}}return()=>{y&&y(),d.current&&(d.current.disconnect(),d.current=null),c.current=null}},[r,s,n]),i.jsx(i.Fragment,{children:t})},We=({variant:e="filled",disabled:t=!1,icon:n,href:s,label:r,disableTextMargins:u,className:d,iconPosition:c="left",loading:f=!1,shape:l="rounded",onClick:x,onToggle:y,activated:o,ref:m,size:h="medium",allowShapeTransformation:w=!0,transition:g,children:E,...j})=>{if(E&&(r=E),!r)throw new Error("Button component requires either a label prop or children content");const $=s?"a":"button",L=a.useRef(null),N=m||L,[C,A]=a.useState(o);a.useEffect(()=>{A(o)},[o]),g={duration:.3,...g};let P;y?y&&(P=M=>{t&&M.preventDefault();const q=!C;A(q),y(q)}):P=M=>{t&&M.preventDefault(),x&&x(M)};const R=ye({allowShapeTransformation:w,size:h,disableTextMargins:u,shape:l,href:s,disabled:t,icon:n,iconPosition:c,loading:f,variant:e,transition:g,className:d,isActive:C??!1,onToggle:y,activated:C,label:r,children:r}),v=n?i.jsx(_,{icon:n,className:R.icon}):i.jsx(i.Fragment,{});return i.jsxs($,{ref:N,href:s,className:R.button,...j,onClick:P,disabled:t,"aria-pressed":y?C:void 0,style:{transition:g.duration+"s"},children:[i.jsx("div",{className:R.touchTarget}),i.jsx("div",{className:R.stateLayer,style:{transition:g.duration+"s"},children:!t&&i.jsx(J,{colorName:e==="filled"&&y&&"on-surface-variant"||e==="filled"&&!y&&"on-primary"||e==="elevated"&&"primary"||e==="tonal"&&"on-secondary-container"||e==="outlined"&&"primary"||e==="text"&&"primary"||"",triggerRef:N})}),c==="left"&&v,f&&i.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:i.jsx($e,{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"})}),i.jsx("span",{className:R.label,children:r}),c==="right"&&v]})},nt=({variant:e="outlined",className:t,children:n,isInteractive:s=!1,ref:r,...u})=>{const d=xe({className:t,isInteractive:s,variant:e,children:n}),c=a.useRef(null),f=r||c;return i.jsxs("div",{...u,ref:f,className:d.card,children:[i.jsx("div",{className:d.stateLayer,children:s&&i.jsx(J,{colorName:"on-surface",triggerRef:f})}),n]})},De=(e,t,n=[0,1])=>{const[s,r]=t,[u,d]=n,f=(Math.max(s,Math.min(e,r))-s)/(r-s);return u+f*(d-u)},Ve=({className:e,children:t,width:n=1,index:s=0,ref:r,...u})=>{const d=a.useRef(null),c=r||d,f=ge({className:e,index:s,width:n,children:t});return i.jsx(k.motion.div,{ref:c,animate:{width:n+"px"},transition:{duration:.5,ease:"linear"},className:f.carouselItem,...u,children:t})},rt=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:u=[.21,.65],outputRange:d=[42,300],gap:c=8,onChange:f,scrollSensitivity:l=1.25,...x})=>{var H,K;const y=a.useRef(null),o=s||y,m=ve({className:t,children:n,variant:e,inputRange:u,outputRange:d,marginPourcent:r,onChange:f,gap:c,scrollSensitivity:l}),h=a.Children.toArray(n).filter(S=>a.isValidElement(S)&&S.type===Ve),w=a.useRef(null),[g,E]=a.useState([]),[j,$]=a.useState(null),L=()=>{var D;if(!w.current||!o.current||!j)return[];const{scrollVisible:S,scrollProgress:b}=j;function B(V,Y){return V.map(G=>(G-Y)/Math.abs(V[1]-V[0]))}let W=h.map((V,Y)=>{if(!N[Y].current||!w.current)return 0;let Z=Y/(h.length-1);return Z>1&&(Z=1),Z<0&&(Z=0),Z});W=B(W,b);let I=((((D=o.current)==null?void 0:D.clientWidth)??S)-(d[0]+c))/(d[1]+c);return W.map((V,Y)=>({value:Math.abs(V),originalIndex:Y})).sort((V,Y)=>V.value-Y.value).forEach((V,Y)=>{Y===0&&A(V.originalIndex);let G=De(I,[0,1],[0,d[1]]);G<d[0]&&(G=d[0]),I--,W[V.originalIndex]=G}),W},N=a.useRef([]).current,[C,A]=a.useState(0);a.useEffect(()=>{f&&f(C)},[C]),N.length!==h.length&&h.forEach((S,b)=>{N[b]||(N[b]=a.createRef())});const P=h.map((S,b)=>a.cloneElement(S,{width:g[b],ref:N[b],key:b,index:b})),R=k.motionValue((j==null?void 0:j.scrollProgress)??0),v=k.useTransform(R,[0,1],[0,1-(((H=o.current)==null?void 0:H.clientWidth)??0)/(((K=w==null?void 0:w.current)==null?void 0:K.clientWidth)??0)]),M=k.useTransform(v,S=>`${-S*100}%`),q=S=>{S.scrollTotal>0&&$(S)};a.useEffect(()=>{const S=L();E(S)},[j]);const[U,X]=a.useState(0);return a.useLayoutEffect(()=>{let S=d[1];j&&S>j.scrollVisible&&(S=j.scrollVisible);const b=(S+c)*P.length/l;X(b)},[o,N,j]),i.jsx("div",{className:m.carousel,ref:o,...x,children:i.jsx(Be,{draggable:!0,orientation:"horizontal",onScroll:q,scrollSize:U,children:i.jsx(k.motion.div,{className:m.track,ref:w,style:{transitionDuration:"0.5s",transitionTimingFunction:"ease-out",gap:`${c}px`,x:M},children:P})})})},Fe=({orientation:e="horizontal",className:t,...n})=>{const s=we({orientation:e,className:t});return i.jsx("hr",{className:s.divider,...n})},O=[];for(let e=0;e<256;++e)O.push((e+256).toString(16).slice(1));function st(e,t=0){return(O[e[t+0]]+O[e[t+1]]+O[e[t+2]]+O[e[t+3]]+"-"+O[e[t+4]]+O[e[t+5]]+"-"+O[e[t+6]]+O[e[t+7]]+"-"+O[e[t+8]]+O[e[t+9]]+"-"+O[e[t+10]]+O[e[t+11]]+O[e[t+12]]+O[e[t+13]]+O[e[t+14]]+O[e[t+15]]).toLowerCase()}let re;const ot=new Uint8Array(16);function lt(){if(!re){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");re=crypto.getRandomValues.bind(crypto)}return re(ot)}const at=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ie={randomUUID:at};function oe(e,t,n){var r;if(ie.randomUUID&&!e)return ie.randomUUID();e=e||{};const s=e.random??((r=e.rng)==null?void 0:r.call(e))??lt();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,st(s)}const le=({variant:e="plain",buttons:t,className:n,children:s,title:r,text:u,position:d,targetRef:c,ref:f,trigger:l=["hover","focus"],...x})=>{if(!s&&!c)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(l)||(l=[l]),t&&!Array.isArray(t)&&(t=[t]);const y=a.useRef(null),o=c||y,[m,h]=a.useState(null),[w]=a.useState(oe()),[g,E]=a.useState(!1),j=a.useRef(null);a.useEffect(()=>{const v=M=>{h(M.detail)};return document.addEventListener("tooltip-update",v),()=>{document.removeEventListener("tooltip-update",v)}},[]),a.useEffect(()=>{j.current&&clearTimeout(j.current),m?E(m===w):j.current=setTimeout(()=>{E(!1)},1200)},[m,w]);const $=()=>{if(l.includes("hover")){const v=new CustomEvent("tooltip-update",{detail:w});document.dispatchEvent(v)}},L=()=>{if(l.includes("hover")){const v=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(v)}},N=()=>{if(l.includes("click")){const v=new CustomEvent("tooltip-update",{detail:g?null:w});document.dispatchEvent(v)}},C=()=>{if(l.includes("focus")){const v=new CustomEvent("tooltip-update",{detail:w});document.dispatchEvent(v)}},A=()=>{if(l.includes("focus")){const v=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(v)}};a.useEffect(()=>{if(o!=null&&o.current){const v=o.current;return v.addEventListener("mouseenter",$),v.addEventListener("mouseleave",L),v.addEventListener("click",N),v.addEventListener("focus",C),v.addEventListener("blur",A),()=>{v.removeEventListener("mouseenter",$),v.removeEventListener("mouseleave",L),v.removeEventListener("click",N),v.removeEventListener("focus",C),v.removeEventListener("blur",A)}}},[o,l,w,g]);const P=!c&&a.isValidElement(s)?a.cloneElement(s,{ref:y}):s;if(!d&&typeof window<"u"&&o!=null&&o.current&&!d){const v=o.current.getBoundingClientRect(),M=window.innerWidth,q=window.innerHeight,U=v.left/M,X=v.top/q;e==="plain"?U<1/3?d="right":U>2/3?d="left":d=X>.5?"top":"bottom":U<1/2&&X<1/2?d="bottom-right":U>1/2&&X<1/2?d="bottom-left":U>1/2&&X>1/2?d="top-left":U<1/2&&X>1/2&&(d="top-right")}const R=Me({variant:e,buttons:t,className:n,title:r,text:u,position:d,trigger:l,targetRef:c,children:s});return i.jsxs(i.Fragment,{children:[P,i.jsx(k.AnimatePresence,{children:g&&i.jsx(Ae,{targetRef:o,children:i.jsx(k.motion.div,{initial:{opacity:m?1:0},animate:{opacity:1},transition:{duration:m?0:.3},exit:{opacity:m?1:0},className:R.toolTip,...x,onMouseEnter:$,onMouseLeave:L,children:i.jsxs(k.motion.div,{className:R.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[r&&i.jsx("div",{className:R.subHead,children:r}),i.jsx("div",{className:R.supportingText,children:u}),t&&i.jsx("div",{className:R.actions,children:Array.isArray(t)&&t.map((v,M)=>i.jsx(We,{size:"small",variant:"text",...v},M))})]})})})})]})},se=({className:e,label:t,variant:n="primary",size:s="medium",href:r,type:u,icon:d,isExtended:c=!1,ref:f,transition:l,children:x,...y})=>{if(x&&(t=x),!t)throw new Error("FAB component requires either a label prop or children content");const o=r?"a":"button",m=be({href:r,icon:d,isExtended:c,label:t,size:s,variant:n,className:e,transition:l,children:t});l={duration:.3,...l};const h=a.useRef(null),w=f||h,g={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...l,opacity:{duration:l.duration/2,delay:l.duration-l.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...l,marginLeft:{duration:l.duration/2,delay:l.duration-l.duration/2}}}};return i.jsxs(o,{...y,ref:w,href:r,"aria-label":c?void 0:t,className:m.fab,children:[i.jsx(le,{trigger:c?null:void 0,text:t,targetRef:w}),i.jsx("span",{className:m.stateLayer,children:i.jsx(J,{colorName:p({primary:n=="surface","on-primary-container":n=="primary","on-secondary-container":n=="secondary","on-tertiary-container":n=="tertiary"}),triggerRef:w})}),i.jsx(_,{icon:d,className:m.icon}),i.jsx(k.AnimatePresence,{children:c&&i.jsx(k.motion.span,{variants:g,initial:"hidden",animate:"visible",exit:"hidden",className:m.label,children:t})})]})},ee=({variant:e="standard",href:t,disabled:n=!1,type:s="button",title:r,label:u,onToggle:d,activated:c=!1,onClick:f,icon:l,size:x="medium",iconSelected:y,className:o,ref:m,width:h="default",shape:w="rounded",allowShapeTransformation:g=!0,transition:E,children:j,...$})=>{if(j&&(u=j),!u)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");r||(r=u);const[L,N]=a.useState(c);let C;d?d&&(C=M=>{n&&M.preventDefault(),N(!L),d(!!L)},l=L&&y||l):C=M=>{n&&M.preventDefault(),f&&f(M)},a.useEffect(()=>{N(c)},[c]);const A=t?"a":"button",P=je({transition:E,shape:w,allowShapeTransformation:g,width:h,href:t,activated:L,label:u,iconSelected:y,isActive:L,onToggle:d,disabled:n,icon:l,variant:e,className:o,size:x,children:u,...$}),R=a.useRef(null),v=m||R;return E={duration:.3,...E},i.jsxs(A,{disabled:n,href:t,style:{transition:E.duration+"s"},className:P.iconButton,"aria-label":u,...$,title:void 0,onClick:C,ref:v,children:[i.jsx(le,{targetRef:v,trigger:n?null:void 0,text:r}),i.jsx("div",{className:P.touchTarget}),i.jsx("div",{className:P.stateLayer,style:{transition:E.duration+"s"},children:!n&&i.jsx(J,{colorName:p(e==="standard"&&{"on-surface-variant":!L,primary:L},e==="filled"&&{primary:!L&&!!d,"inverse-on-surface":L||!d},e==="tonal"&&{"on-surface-variant":!L&&!!d,"on-secondary-container":L||!d},e==="outlined"&&{"on-surface-variant":!L,"on-primary":L}),triggerRef:v})}),l&&i.jsx(_,{icon:l,className:P.icon})]})},ct=({className:e,valueFormatter:t,step:n=10,name:s,value:r=0,min:u=0,max:d=100,marks:c=[{value:0,label:"0"},{value:100,label:"100"}],ref:f,onChange:l,...x})=>{const y=S=>{const b=m(),B=o();return S===1/0?100:S===-1/0?0:(S-b)/(B-b)*100},o=(S=!1)=>S?d:d==1/0?c[(c==null?void 0:c.length)-1].value:d,m=(S=!1)=>S?u:u==-1/0?c[0].value:u,h=S=>{const b=m(!1);return(o(!1)-b)*S/100+b},[w,g]=a.useState(!1),E=a.useRef(null),j=f||E,[$,L]=a.useState(r),[N,C]=a.useState(y(r)),[A,P]=a.useState(!1),R=S=>{P(!0),g(!0),q(S)},v=()=>{P(!1),g(!1)};a.useEffect(()=>(A?(window.addEventListener("mouseup",v),window.addEventListener("mousemove",q),window.addEventListener("touchend",v),window.addEventListener("touchmove",q)):(window.removeEventListener("mouseup",v),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",v),window.removeEventListener("touchmove",q)),()=>{window.removeEventListener("mouseup",v),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",v),window.removeEventListener("touchmove",q)}),[A]);const M=Le({className:e,isChanging:w,marks:c,max:d,min:u,name:s,step:n,value:$,valueFormatter:t,onChange:l}),q=S=>{const b=j==null?void 0:j.current;if(b){const B=b.getBoundingClientRect().left,I=((S.type==="touchmove"||S.type==="touchstart"?S.touches[0].clientX:S.clientX)-B)/b.offsetWidth*100;U({pourcent:I})}},U=({pourcent:S,value:b})=>{if(S){if(S>=100){L(o(!0)),C(100);return}if(S<=0){L(m(!0)),C(0);return}b=h(S),b==m()&&(b=m(!0)),b==o()&&(b=o(!0))}else if(b!=null){if(b>=o()){L(o(!0)),C(100);return}if(b<=m()){L(m(!0)),C(0);return}S=y(b)}else return;n!=null?b=Math.round((b-m())/n)*n+m():c&&(b=c.reduce((B,W,I)=>{let D=W.value===1/0?o():W.value===-1/0?m():W.value,V=B.value===1/0?o():B.value===-1/0?m():B.value;return D=Math.abs(D-b),V=Math.abs(V-b),D<V?W:B}).value),b>=o()&&(b=o(!0)),b<=m()&&(b=m(!0)),S=y(b),L(b),C(S),l&&l(b)},[X,H]=a.useState(0);a.useEffect(()=>{const S=()=>{j.current&&H(j.current.offsetWidth)};return S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)}},[]);const K=S=>{switch(S.key){case"ArrowRight":if(n)U({value:$+n});else if(c){const b=c.find(B=>B.value>$);b&&U({value:b.value})}break;case"ArrowLeft":if(n)U({value:$-n});else if(c){const b=c.slice(0).reverse().find((B,W,I)=>$===1/0?W===1:B.value<$);b&&U({value:b.value})}break;default:return}};return i.jsxs("div",{tabIndex:0,onKeyDown:K,role:"slider","aria-valuemin":m(!0),"aria-valuemax":o(!0),"aria-valuenow":$,"aria-valuetext":$.toString(),className:M.slider,onMouseDown:R,onClick:q,ref:j,onTouchStart:R,onDragStart:S=>S.preventDefault(),...x,children:[i.jsx("input",{type:"hidden",name:s,value:$}),i.jsx("div",{className:M.activeTrack,style:{flex:N/100}}),i.jsx("div",{className:M.handle,children:i.jsx(k.AnimatePresence,{children:w&&i.jsx(k.motion.div,{className:M.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t($):$})})}),i.jsx("div",{className:M.inactiveTrack,style:{flex:1-N/100}}),i.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:c&&c.map((S,b)=>{let B=null;const W=(w?9:10)/X*100,I=y(S.value);return I<=N-W?B=!0:I>=N+W&&(B=!1),i.jsx("div",{className:p(M.dot,{"bg-primary-container":B!=null&&B,"bg-primary":B!=null&&!B}),style:{left:`${y(S.value)}%`}},b)})})]})};/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),ie=require("clsx"),Ue=require("tailwind-merge"),c=require("react"),k=require("motion/react"),Xe=require("throttle-debounce"),Ye=require("motion"),ue=require("react-dom"),Q=require("@udixio/theme"),de=require("@udixio/tailwind"),_e=require("react-textarea-autosize"),fe=Ue.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)=>fe(ie.clsx(e)),me=(...e)=>fe(ie.clsx(e));function Ke(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 he=e=>{const t={};e.classNameList.forEach(o=>{var r;if(o)if(typeof o=="string")(t[r=e.default]??(t[r]=[])).push(o);else{const u=o(e.states);Object.entries(u).map(d=>{const[a,m]=d;(t[a]??(t[a]=[])).push(m)})}});const n=t;return Object.entries(t).map(o=>{let[r,u]=o;u=u.reverse(),r==e.default&&u.unshift("relative"),u.unshift(Ke(r)),n[r]=me(...u)}),n},F=(e,t)=>n=>he({classNameList:[n.className,t],default:e,states:n}),pe=F("button",({variant:e,disableTextMargins:t,disabled:n,iconPosition:o,icon:r,isActive:u,loading:d,shape:a,onToggle:m,size:l,allowShapeTransformation:y})=>({button:p(" relative cursor-pointer group outline-none inline-block flex justify-center items-center ",l==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",l==="small"&&"text-label-large px-4 py-2.5 gap-2",l==="medium"&&"text-title-medium px-6 py-4 gap-2",l==="large"&&"text-headline-small px-12 py-8 gap-3",l==="xLarge"&&"text-headline-large px-16 py-12 gap-4",a==="rounded"&&{"rounded-[30px]":l==="xSmall"||l=="small","rounded-[40px]":l==="medium","rounded-[70px]":l==="large"||l=="xLarge"},(a==="squared"||y&&u)&&{"rounded-[12px]":l==="xSmall"||l=="small","rounded-[16px]":l==="medium","rounded-[28px]":l==="large"||l=="xLarge"},y&&!n&&{"active:rounded-[12px]":l==="xSmall"||l=="small","active:rounded-[16px]":l==="medium","active:rounded-[28px]":l==="large"||l=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!u,"bg-primary text-on-primary":!n&&u,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!u&&m,"bg-primary text-on-primary":!n&&(u&&m||!m),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!u,"bg-secondary text-on-secondary":!n&&u,"text-on-surface/[0.38]":n},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":n,"text-primary border-outline focus:border-primary":!n&&!u,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&u}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[l==="xSmall"&&"-mx-3 ",l==="small"&&"-mx-4 ",l==="medium"&&"-mx-6 ",l==="large"&&"-mx-12",l==="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("min-h-full min-w-full absolute top-0 left-0 overflow-hidden",e==="elevated"&&{"bg-on-surface/[0.12]":n,"group-state-primary":!n},e==="filled"&&{"bg-on-surface/[0.12]":n,"group-state-on-primary":!n&&!m,"group-state-on-surface-variant":!n&&m},a==="rounded"&&{"rounded-[30px]":l==="xSmall"||l=="small","rounded-[40px]":l==="medium","rounded-[70px]":l==="large"||l=="xLarge"},(a==="squared"||y&&u)&&{"rounded-[12px]":l==="xSmall"||l=="small","rounded-[16px]":l==="medium","rounded-[28px]":l==="large"||l=="xLarge"},y&&!n&&{"group-active:rounded-[12px]":l==="xSmall"||l=="small","group-active:rounded-[16px]":l==="medium","group-active:rounded-[28px]":l==="large"||l=="xLarge"},e==="tonal"&&{"bg-on-surface/[0.12]":n,"group-state-on-secondary-container ":!n},e==="outlined"&&{"group-state-primary group-state-primary":!n},e==="text"&&{"group-state-primary":!n}),label:p({invisible:d}),icon:p({invisible:d},l==="xSmall"&&"size-5",l==="small"&&"size-5",l==="medium"&&"size-6",l==="large"&&"size-8",l==="xLarge"&&"size-10")})),ye=F("card",({variant:e,isInteractive:t})=>({card:p("group/card rounded-xl overflow-hidden z-10",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest"),stateLayer:p(["w-full top-0 left-0 h-full absolute -z-10",{" group-hover/card:hover-state-on-surface group-focus-visible/card:focus-state-on-surface":t}])})),xe=F("carouselItem",()=>({carouselItem:p("rounded-[28px] overflow-hidden flex-none")})),ge=F("carousel",()=>({carousel:p(["w-full h-[400px]"]),track:p("grid grid-flow-col h-full transition-transform ease-out w-fit")})),ve=F("divider",({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"})})),we=F("fab",({size:e,variant:t,isExtended:n})=>({fab:p("flex shadow-3 hover:shadow-4 group overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small"&&!n,"rounded-[16px]":e=="medium"||n,"rounded-[28px]":e=="large"&&!n},{"p-2":e=="small"&&!n,"p-4":e=="medium"||n,"p-[30px]":e=="large"&&!n},t==="surface"&&"bg-surface-container",t==="primary"&&"bg-primary-container",t==="secondary"&&"bg-secondary-container",t==="tertiary"&&"bg-tertiary-container",t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container"),stateLayer:p("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",t==="surface"&&"group-hover:hover-state-primary group-focus:focus-state-primary",t==="primary"&&"group-hover:hover-state-on-primary-container group-focus-visible:focus-state-on-primary-container",t==="secondary"&&"group-hover:hover-state-on-secondary-container group-focus-visible:focus-state-on-secondary-container",t==="tertiary"&&"group-hover:hover-state-on-tertiary-container group-focus-visible:focus-state-on-tertiary-container"),icon:p({"size-6":e=="small"||e=="medium"||n,"size-9":e=="large"&&!n}),label:p("text-title-medium text-nowrap")})),be=F("iconButton",({variant:e,disabled:t,onToggle:n,isActive:o,size:r,width:u,shape:d,allowShapeTransformation:a})=>({iconButton:p("rounded-full relative flex transition-all duration-300","group cursor-pointer",{"cursor-default":t},(d==="rounded"||d==="squared"&&n&&!t&&o&&a)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(d==="squared"||d==="rounded"&&n&&!t&&o&&a)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!t&&{"group-active:rounded-[12px]":r==="xSmall"||r=="small","group-active:rounded-[16px]":r==="medium","group-active:rounded-[28px]":r==="large"||r=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!o&&!!n,"bg-primary":o||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-surface-container":!o&&!!n,"bg-secondary-container":o||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!o,"border border-transparent bg-inverse-surface":o},!!t&&{"border border-on-surface/[0.12]":!o,"border border-transparent bg-on-surface/[0.12]":o}]),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",(d==="rounded"||d==="squared"&&n&&!t&&o&&a)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(d==="squared"||d==="rounded"&&n&&!t&&o&&a)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!t&&{"group-active:rounded-[12px]":r==="xSmall"||r=="small","group-active:rounded-[16px]":r==="medium","group-active:rounded-[28px]":r==="large"||r=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!o,"state-primary":o},e==="filled"&&{"state-primary":!o&&!!n,"state-inverse-on-surface":o||!n},e==="tonal"&&{"state-on-surface-variant":!o&&!!n,"state-on-secondary-container":o||!n},e==="outlined"&&{"state-on-surface-variant":!o,"state-on-primary":o}]),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"},u=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],u=="wide"&&[{"px-2.5":r==="xSmall"},{"px-3.5":r==="small"},{"px-6":r==="medium"},{"px-12":r==="large"},{"px-[72px]":r==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!o,"text-primary":o},e==="filled"&&{"text-primary":!o&&!!n,"text-on-primary":o||!n},e==="tonal"&&{"text-on-surface-variant":!o&&!!n,"text-on-secondary-container":o||!n},e==="outlined"&&{"text-on-surface-variant":!o,"text-inverse-on-surface":o}],!!t&&"text-on-surface/[0.38]")})),Se=F("progressIndicator",({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})})),je=F("slideSheet",({variant:e,position:t})=>({slideSheet: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",{}),content:p("w-fit "),header:p("p-4 flex items-center gap-2"),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")})),Ee=F("slider",({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 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"])})),Le=F("snackbar",()=>({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")})),Ne=F("switch",({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:p("group 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:h-[28px] group-active:w-[28px]",{"bg-on-primary group-hover:bg-primary-container":e},{"bg-outline group-hover: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})})),Ie=F("tab",({isSelected:e,icon:t,label:n,variant:o})=>({tab:p("flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&o==="primary"&&"h-16",!(t&&n&&o==="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",o==="primary"&&{"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface":!e,"group-hover:hover-state-primary group-focus-visible:focus-state-primary":e},o==="secondary"&&"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"),content:p("flex gap-0.5 h-full justify-center",{relative:o=="primary"},{"":!!(n&&!t)},o==="primary"&&"flex-col items-center",o==="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",o==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},o==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:p("text-title-small text-nowrap",o==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},o==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:p("bg-primary absolute w-full left-0 bottom-0",o==="primary"&&"h-[3px] rounded-t",o==="secondary"&&"h-0.5")})),Re=F("tabs",({scrollable:e})=>({tabs:p("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})})),ke=F("textField",({disabled:e,leadingIcon:t,trailingIcon:n,variant:o,errorText:r,isFocused:u,value:d,suffix:a,textLine:m})=>({textField:p({"opacity-[.38]":e}),content:p("group transition-border duration-200 relative flex items-center ",{"h-14":m=="singleLine"},{"border-on-surface-variant":!(r!=null&&r.length)&&!u&&o=="filled","border-outline":!(r!=null&&r.length)&&!u&&o=="outlined","border-primary":!(r!=null&&r.length)&&u,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},o=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],o=="outlined"&&["border rounded box-border",{"border-[3px]":u}]),stateLayer:p("absolute -z-10 w-full h-full top-0 left-0",{hidden:o=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":u}),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)&&u}),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},o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10"),activeIndicator:p("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",o=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":u}]),supportingText:p(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":u},{"text-error":!!(r!=null&&r.length)}),leadingIcon:p(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!c.isValidElement(t)}]),trailingIcon:p("h-12 w-12 flex items-center justify-center",{"cursor-text":!c.isValidElement(n)}),suffix:p("text-on-surface-variant pl-0 pr-4",o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10")})),Ce=F("toolTip",({position:e,variant:t})=>({toolTip:p(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",{"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"&&"bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface 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("")})),_=({icon:e,colors:t=[],className:n})=>{if(typeof e=="string"){let l=e;return t[0]&&(l=l.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),l=l.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),i.jsx("div",{className:p("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:l}})}if(e&&typeof e=="object"&&"src"in e){const l=e;return i.jsx("img",{src:l.src,width:l.width,height:l.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 o=e;if(!(o!=null&&o.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:r}=o,[u,d,,,a]=r||[],m=l=>{switch(l.length){case 2:return{"--fa-primary-color":l[0]||"inherit","--fa-secondary-color":l[1]||"inherit"};case 1:return{color:l[0]};default:return{}}};return i.jsx("svg",{className:p("size-5 box-content",n),style:{...m(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${u} ${d}`,role:"img","aria-hidden":"true",children:typeof a=="string"?i.jsx("path",{className:"fill-current",d:a}):a.map((l,y)=>i.jsx("path",{d:l},y))})},Me=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:o,...r})=>{const[u,d]=c.useState(t),[a]=c.useState(1.5);c.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),d(t)},[t]);const[m,l]=c.useState(!0),y=()=>m?a:a*.5;c.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&u!==100){const x=setInterval(()=>{d(m?10:90),l(!m)},y()*1e3);return()=>clearInterval(x)}},[e,m,u]);const[h,s]=c.useState(!1);c.useEffect(()=>{if(u>=100){const x=setTimeout(()=>{s(!1)},n);return()=>{clearTimeout(x)}}else s(!0)},[u,n]);const f=Se({className:o,variant:e,value:t,transitionDuration:n,isVisible:h});return i.jsxs(i.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&i.jsxs("div",{className:f.progressIndicator,...r,children:[i.jsx("div",{style:{width:`${u}%`,transition:`width ${n}ms ease-in-out ${u==100?", max-height 200ms 0.5s ease-in-out":""}`},className:f.track}),i.jsx("div",{style:{marginLeft:u!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${u==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:f.activeIndicator}),i.jsx("div",{style:{width:"4 px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:f.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&i.jsx(k.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:y(),ease:"linear"},className:f.progressIndicator,...r,children:i.jsx(k.motion.circle,{cx:"50%",cy:"50%",r:h?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:f.activeIndicator,variants:{hidden:{pathLength:m?10/100:90/100},visible:{pathLength:m?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:y(),bounce:0}}})},m+"")]})},J=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:0,borderRadius:"50%",width:"25%",height:"25%"},animate:{opacity:1,borderRadius:0,width:"200%",height:"200%",transition:{duration:.3,borderRadius:{duration:.3,delay:.3}}}},[o,r]=c.useState(!0),[u,d]=c.useState(!1),[a,m]=c.useState({x:0,y:0});c.useEffect(()=>{u&&(r(!0),r(!1))},[u]),c.useEffect(()=>{const s=t==null?void 0:t.current;if(s)return s.addEventListener("mousedown",l),s.addEventListener("mouseup",h),s.addEventListener("mouseleave",y),()=>{s.removeEventListener("mousedown",l),s.removeEventListener("mouseup",h),s.removeEventListener("mouseleave",y)}},[t]);const l=s=>{const f=t==null?void 0:t.current,x=f.getBoundingClientRect();d(!0),m({x:(s.clientX-x.left)/f.clientWidth*100,y:(s.clientY-x.top)/f.clientHeight*100})},y=s=>{d(!1)},h=s=>{d(!1)};return i.jsx(k.AnimatePresence,{mode:"wait",children:(u||!u&&!o)&&i.jsx(k.motion.div,{style:{position:"absolute",width:"100%",height:"100%",top:a.y+"%",left:a.x+"%",background:`color-mix(in srgb, var(--color-${e}) 12%, transparent)`,pointerEvents:"none"},variants:n,initial:"initial",animate:"animate",exit:{opacity:0,transition:{duration:0}},onAnimationComplete:()=>r(!0),className:"transform -translate-x-1/2 -translate-y-1/2"})})},$e=F("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"})})),Pe=({children:e,orientation:t="vertical",scrollSize:n,onScroll:o,className:r,draggable:u=!1,throttleDuration:d=75})=>{var B,W;const a=c.useRef(null),m=c.useRef(null),[l,y]=c.useState({width:null,height:null});c.useEffect(()=>{if(!a.current)return;const R=new ResizeObserver(A=>{for(const V of A)V.target===a.current&&y({width:V.contentRect.width,height:V.contentRect.height})});return R.observe(a.current),()=>{R.disconnect()}},[a]);const h=c.useRef(null),s=c.useRef(null),f=()=>{const R=m.current;return R?{width:n??R.scrollWidth,height:n??R.scrollHeight}:null},x=()=>{const R=a.current;return R?{width:R.clientWidth,height:R.clientHeight}:null},{scrollYProgress:v,scrollXProgress:w}=k.useScroll({container:a}),L=c.useRef(null);L.current||(L.current=Xe.throttle(d,(R,A)=>{!s.current||!h.current||!a.current||o&&(t==="horizontal"&&A==="x"&&o({scrollProgress:R,scroll:R*(h.current.width-a.current.clientWidth),scrollTotal:h.current.width-a.current.clientWidth,scrollVisible:s.current.width}),t==="vertical"&&A==="y"&&o({scrollProgress:R,scroll:R*(h.current.height-a.current.clientHeight),scrollTotal:h.current.height-a.current.clientHeight,scrollVisible:s.current.height}))}));const j=(R,A)=>{L.current&&L.current(R,A)};c.useEffect(()=>{l.width&&j(w.get(),"x"),l.height&&j(v.get(),"y")},[l]),k.useMotionValueEvent(w,"change",R=>{j(R,"x")}),k.useMotionValueEvent(v,"change",R=>{j(R,"y")});const[$,E]=c.useState(!1);c.useLayoutEffect(()=>{$||!s.current||!h.current||!o||(o({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?h.current.height:h.current.width,scrollVisible:t=="vertical"?s.current.height:s.current.width}),E(!0))},[s,h,o]),h.current=f(),s.current=x();const[N,C]=c.useState(!1),D=$e({isDragging:N,children:e,className:r,onScroll:o,orientation:t,scrollSize:n,draggable:u,throttleDuration:d}),[P,I]=c.useState(0),[g,M]=c.useState(0),q=R=>{if(!u)return;const A=a.current;if(!A||P==null)return;const Y=(R.pageX-A.offsetLeft-P)*1.5;A.scrollLeft=g-Y},O=R=>{const A=a.current;A&&(C(!0),I(R.pageX-A.offsetLeft),M(A.scrollLeft))},X=R=>{N&&(R.preventDefault(),q(R))},H=()=>{C(!1)},K=()=>{C(!1)},S=R=>{R.preventDefault()},b=c.useRef(null);return c.useEffect(()=>()=>{b.current&&clearTimeout(b.current)},[]),i.jsxs("div",{className:D.customScroll,ref:a,onMouseDown:O,onMouseMove:X,onMouseUp:H,onMouseLeave:K,onDragStart:S,onScroll:R=>{N||(I(null),C(!0),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{C(!1)},1e3))},children:[i.jsx("div",{ref:m,style:t==="vertical"?{height:((B=s==null?void 0:s.current)==null?void 0:B.height)??"100%"}:{width:((W=s==null?void 0:s.current)==null?void 0:W.width)??"100%"},className:D.track,children:e}),s.current&&h.current&&i.jsxs(i.Fragment,{children:[t==="vertical"&&h.current.height>s.current.height&&i.jsx(k.motion.div,{className:"flex-none",style:{height:h.current.height-s.current.height}}),t==="horizontal"&&h.current.width>s.current.width&&i.jsx(k.motion.div,{className:"flex-none",style:{width:h.current.width-s.current.width}})]})]})},Ge=({onScroll:e,el:t,touch:n=!0})=>{const o=c.useRef(null),r=c.useRef(0),u=c.useRef(0);c.useEffect(()=>{if(!t)return;r.current=t.scrollTop,u.current=t.scrollLeft;const d=s=>{e==null||e(s)},a=s=>{s.preventDefault(),d({type:"intent",source:"wheel",deltaX:s.deltaX,deltaY:s.deltaY,originalEvent:s})},m=s=>{if(!n)return;const f=s.touches[0];f&&(o.current={x:f.clientX,y:f.clientY})},l=s=>{if(!n)return;const f=s.touches[0];if(!f||!o.current)return;s.preventDefault();const x=o.current.x-f.clientX,v=o.current.y-f.clientY;o.current={x:f.clientX,y:f.clientY},d({type:"intent",source:"touch",deltaX:x,deltaY:v,originalEvent:s})},y=()=>{n&&(o.current=null)},h=s=>{const x=t.clientHeight*.9;let v=0,w=0;switch(s.key){case"ArrowDown":w=40;break;case"ArrowUp":w=-40;break;case"ArrowRight":v=40;break;case"ArrowLeft":v=-40;break;case"PageDown":w=x;break;case"PageUp":w=-x;break;case"Home":w=Number.NEGATIVE_INFINITY;break;case"End":w=Number.POSITIVE_INFINITY;break;case" ":w=s.shiftKey?-x:x;break;default:return}s.preventDefault(),d({type:"intent",source:"keyboard",deltaX:v,deltaY:w,originalEvent:s})};return t.addEventListener("wheel",a,{passive:!1}),t.addEventListener("touchstart",m,{passive:!0}),t.addEventListener("touchmove",l,{passive:!1}),t.addEventListener("touchend",y,{passive:!0}),t.addEventListener("keydown",h),()=>{t.removeEventListener("wheel",a),t.removeEventListener("touchstart",m),t.removeEventListener("touchmove",l),t.removeEventListener("touchend",y),t.removeEventListener("keydown",h)}},[e])},Je=({transition:e,orientation:t="vertical",throttleDuration:n=25})=>{const[o,r]=c.useState(0),[u,d]=c.useState(),a=c.useRef(!1),m=c.useRef(),l=c.useRef(0);c.useEffect(()=>{d(document);const s=document.documentElement.scrollTop;r(s),l.current=s},[]),c.useEffect(()=>{const s=()=>{a.current||r(document.documentElement.scrollTop)};return u==null||u.addEventListener("scroll",s),()=>{m.current&&clearTimeout(m.current),u==null||u.removeEventListener("scroll",s)}},[u]);const y=c.useRef(),h=c.useRef(null);return c.useEffect(()=>{const s=o;if(h.current&&(h.current.stop(),h.current=null),!a.current){y.current=s;return}return h.current=Ye.animate(y.current??s,s,{duration:(e==null?void 0:e.duration)??.5,ease:"circOut",onUpdate:f=>{m.current&&clearTimeout(m.current),y.current=f;const x=document.documentElement,v=Math.round(f*1e3)/1e3,w=l.current;Math.abs(v-w)<.1||(l.current=v,a.current&&x.scrollTo({top:v}))},onComplete:()=>{m.current=setTimeout(()=>{a.current=!1},300),h.current=null}}),()=>{h.current&&(h.current.stop(),h.current=null)}},[o]),u?i.jsx(Ge,{touch:!1,el:u,onScroll:s=>{if("deltaY"in s&&s.deltaY!==0&&u&&o!==null){let f=o+s.deltaY;const x=u.querySelector("html");x&&(f=Math.min(f,x.scrollHeight-x.clientHeight)),f=Math.max(f,0),r(f),a.current=!0}}}):null},Be=({targetRef:e,children:t})=>{const[n,o]=c.useState(null),r=c.useRef(null),u=()=>{const d=e.current;if(!d)return;const a=d.getBoundingClientRect();o({position:"fixed",top:a.top,left:a.left,width:a.width,height:a.height,pointerEvents:"none",zIndex:999})};return c.useEffect(()=>{const d=e.current;if(d)return u(),window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),r.current=new ResizeObserver(u),r.current.observe(d),()=>{var a;window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u),(a=r.current)==null||a.disconnect()}},[e]),n?ue.createPortal(i.jsx("div",{style:n,children:t}),document.body):null};function Ze(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const Qe=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:o=!1})=>{const[r,u]=c.useState(null);c.useEffect(()=>{(async()=>{const s=await Q.loader(e,o);u(s)})()},[]);const[d,a]=c.useState(null),m=c.useRef(null),l=c.useRef(0),y=c.useRef(null);c.useEffect(()=>{if(!r)return;const s={...e,sourceColor:e.sourceColor},f=Date.now(),x=f-l.current,v=async w=>{await h(w)};if(l.current===0||x>=t)m.current&&(clearTimeout(m.current),m.current=null),y.current=null,l.current=f,v(s);else if(y.current=s,!m.current){const w=Math.max(0,t-x);m.current=setTimeout(async()=>{m.current=null;const L=y.current;y.current=null,L&&(l.current=Date.now(),await v(L))},w)}return()=>{}},[e,t,r]);const h=async s=>{if(typeof s.sourceColor=="string"&&!Ze(s.sourceColor))throw new Error("Invalid hex color");if(!r)return;r.context.update(s),await r.load();const f=r==null?void 0:r.plugins.getPlugin(de.TailwindPlugin).getInstance().outputCss;a(f),n==null||n(r)};return c.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),d?i.jsx("style",{dangerouslySetInnerHTML:{__html:d}}):null};function ze(){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 Te(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function z(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function ae(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(o=>o.startsWith("anim-"))?!z(e):!1}function ee(e,t){if(!z(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const d=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),a=d==="x"||d==="inline"?"inline":d==="y"||d==="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 o=e.getAttribute(`data-${t}-end`);o&&e.style.setProperty(`--${t}-range-end`,o);const r=e.hasAttribute(`data-${t}-paused`)||e.classList.contains(`${t}-paused`),u=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!u&&e.setAttribute(`data-${t}-run`,"")}function te(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"]`)).filter(o=>z(o))}function et(e=document,t){return Array.from(e.querySelectorAll('[class*="anim-"]')).filter(o=>!z(o))}function De(e={}){const{prefix:t="anim",once:n=!0}=e;if(Te())return()=>{};const o=ze(),r=new WeakSet,u=new IntersectionObserver(y=>{for(const h of y){const s=h.target;if(!ae(s))continue;const x=s.classList.contains(`${t}-out`);if(!x&&h.isIntersecting)s.setAttribute(`data-${t}-in-run`,""),n&&u.unobserve(s);else if(x&&!h.isIntersecting)s.setAttribute(`data-${t}-out-run`,""),n&&u.unobserve(s);else if(!n){const w=s.style.animationName;s.style.animationName="none",s.removeAttribute(`data-${t}-in-run`),s.removeAttribute(`data-${t}-out-run`),s.offsetWidth,s.style.animationName=w}}},{threshold:[0,.2]}),d=y=>{const h=et(y||document);for(const s of h)r.has(s)||(r.add(s),u.observe(s))};d();let a,m=null,l=null;if(o)(()=>{l==null&&(l=requestAnimationFrame(()=>{l=null;const h=te(void 0,t);for(const s of h)ee(s,t)}))})(),m=new MutationObserver(h=>{for(const s of h)if(s.type==="attributes"){const f=s.target;f instanceof HTMLElement&&(ee(f,t),ae(f)&&(r.has(f)||(r.add(f),u.observe(f))))}else if(s.type==="childList"&&s.addedNodes&&s.addedNodes.length){for(const f of Array.from(s.addedNodes))if(f instanceof HTMLElement){const x=te(f,t);for(const v of x)ee(v,t);d(f)}}}),m.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`]}),a=()=>{l!=null&&cancelAnimationFrame(l),m&&m.disconnect()};else{let y;te(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(s=>{y=s.initScrollViewFallback({once:n})}),a=()=>{typeof y=="function"&&y()}}return()=>{a&&a(),u.disconnect()}}const tt=De,We=({variant:e="filled",disabled:t=!1,icon:n,href:o,label:r,disableTextMargins:u,className:d,iconPosition:a="left",loading:m=!1,shape:l="rounded",onClick:y,onToggle:h,activated:s,ref:f,size:x="medium",allowShapeTransformation:v=!0,transition:w,children:L,...j})=>{if(L&&(r=L),!r)throw new Error("Button component requires either a label prop or children content");const $=o?"a":"button",E=c.useRef(null),N=f||E,[C,D]=c.useState(s);c.useEffect(()=>{D(s)},[s]),w={duration:.3,...w};let P;h?h&&(P=M=>{t&&M.preventDefault();const q=!C;D(q),h(q)}):P=M=>{t&&M.preventDefault(),y&&y(M)};const I=pe({allowShapeTransformation:v,size:x,disableTextMargins:u,shape:l,href:o,disabled:t,icon:n,iconPosition:a,loading:m,variant:e,transition:w,className:d,isActive:C??!1,onToggle:h,activated:C,label:r,children:r}),g=n?i.jsx(_,{icon:n,className:I.icon}):i.jsx(i.Fragment,{});return i.jsxs($,{ref:N,href:o,className:I.button,...j,onClick:P,disabled:t,"aria-pressed":h?C:void 0,style:{transition:w.duration+"s"},children:[i.jsx("div",{className:I.touchTarget}),i.jsx("div",{className:I.stateLayer,style:{transition:w.duration+"s"},children:!t&&i.jsx(J,{colorName:e==="filled"&&h&&"on-surface-variant"||e==="filled"&&!h&&"on-primary"||e==="elevated"&&"primary"||e==="tonal"&&"on-secondary-container"||e==="outlined"&&"primary"||e==="text"&&"primary"||"",triggerRef:N})}),a==="left"&&g,m&&i.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:i.jsx(Me,{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"})}),i.jsx("span",{className:I.label,children:r}),a==="right"&&g]})},nt=({variant:e="outlined",className:t,children:n,isInteractive:o=!1,ref:r,...u})=>{const d=ye({className:t,isInteractive:o,variant:e,children:n}),a=c.useRef(null),m=r||a;return i.jsxs("div",{...u,ref:m,className:d.card,children:[i.jsx("div",{className:d.stateLayer,children:o&&i.jsx(J,{colorName:"on-surface",triggerRef:m})}),n]})},Ae=(e,t,n=[0,1])=>{const[o,r]=t,[u,d]=n,m=(Math.max(o,Math.min(e,r))-o)/(r-o);return u+m*(d-u)},Ve=({className:e,children:t,width:n=1,index:o=0,ref:r,...u})=>{const d=c.useRef(null),a=r||d,m=xe({className:e,index:o,width:n,children:t});return i.jsx(k.motion.div,{ref:a,animate:{width:n+"px"},transition:{duration:.5,ease:"linear"},className:m.carouselItem,...u,children:t})},rt=({variant:e="hero",className:t,children:n,ref:o,marginPourcent:r=0,inputRange:u=[.21,.65],outputRange:d=[42,300],gap:a=8,onChange:m,scrollSensitivity:l=1.25,...y})=>{var H,K;const h=c.useRef(null),s=o||h,f=ge({className:t,children:n,variant:e,inputRange:u,outputRange:d,marginPourcent:r,onChange:m,gap:a,scrollSensitivity:l}),x=c.Children.toArray(n).filter(S=>c.isValidElement(S)&&S.type===Ve),v=c.useRef(null),[w,L]=c.useState([]),[j,$]=c.useState(null),E=()=>{var A;if(!v.current||!s.current||!j)return[];const{scrollVisible:S,scrollProgress:b}=j;function B(V,Y){return V.map(G=>(G-Y)/Math.abs(V[1]-V[0]))}let W=x.map((V,Y)=>{if(!N[Y].current||!v.current)return 0;let Z=Y/(x.length-1);return Z>1&&(Z=1),Z<0&&(Z=0),Z});W=B(W,b);let R=((((A=s.current)==null?void 0:A.clientWidth)??S)-(d[0]+a))/(d[1]+a);return W.map((V,Y)=>({value:Math.abs(V),originalIndex:Y})).sort((V,Y)=>V.value-Y.value).forEach((V,Y)=>{Y===0&&D(V.originalIndex);let G=Ae(R,[0,1],[0,d[1]]);G<d[0]&&(G=d[0]),R--,W[V.originalIndex]=G}),W},N=c.useRef([]).current,[C,D]=c.useState(0);c.useEffect(()=>{m&&m(C)},[C]),N.length!==x.length&&x.forEach((S,b)=>{N[b]||(N[b]=c.createRef())});const P=x.map((S,b)=>c.cloneElement(S,{width:w[b],ref:N[b],key:b,index:b})),I=k.motionValue((j==null?void 0:j.scrollProgress)??0),g=k.useTransform(I,[0,1],[0,1-(((H=s.current)==null?void 0:H.clientWidth)??0)/(((K=v==null?void 0:v.current)==null?void 0:K.clientWidth)??0)]),M=k.useTransform(g,S=>`${-S*100}%`),q=S=>{S.scrollTotal>0&&$(S)};c.useEffect(()=>{const S=E();L(S)},[j]);const[O,X]=c.useState(0);return c.useLayoutEffect(()=>{let S=d[1];j&&S>j.scrollVisible&&(S=j.scrollVisible);const b=(S+a)*P.length/l;X(b)},[s,N,j]),i.jsx("div",{className:f.carousel,ref:s,...y,children:i.jsx(Pe,{draggable:!0,orientation:"horizontal",onScroll:q,scrollSize:O,children:i.jsx(k.motion.div,{className:f.track,ref:v,style:{transitionDuration:"0.5s",transitionTimingFunction:"ease-out",gap:`${a}px`,x:M},children:P})})})},Fe=({orientation:e="horizontal",className:t,...n})=>{const o=ve({orientation:e,className:t});return i.jsx("hr",{className:o.divider,...n})},U=[];for(let e=0;e<256;++e)U.push((e+256).toString(16).slice(1));function st(e,t=0){return(U[e[t+0]]+U[e[t+1]]+U[e[t+2]]+U[e[t+3]]+"-"+U[e[t+4]]+U[e[t+5]]+"-"+U[e[t+6]]+U[e[t+7]]+"-"+U[e[t+8]]+U[e[t+9]]+"-"+U[e[t+10]]+U[e[t+11]]+U[e[t+12]]+U[e[t+13]]+U[e[t+14]]+U[e[t+15]]).toLowerCase()}let ne;const ot=new Uint8Array(16);function lt(){if(!ne){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ne=crypto.getRandomValues.bind(crypto)}return ne(ot)}const at=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ce={randomUUID:at};function se(e,t,n){var r;if(ce.randomUUID&&!e)return ce.randomUUID();e=e||{};const o=e.random??((r=e.rng)==null?void 0:r.call(e))??lt();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,st(o)}const oe=({variant:e="plain",buttons:t,className:n,children:o,title:r,text:u,position:d,targetRef:a,ref:m,trigger:l=["hover","focus"],...y})=>{if(!o&&!a)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(l)||(l=[l]),t&&!Array.isArray(t)&&(t=[t]);const h=c.useRef(null),s=a||h,[f,x]=c.useState(null),[v]=c.useState(se()),[w,L]=c.useState(!1),j=c.useRef(null);c.useEffect(()=>{const g=M=>{x(M.detail)};return document.addEventListener("tooltip-update",g),()=>{document.removeEventListener("tooltip-update",g)}},[]),c.useEffect(()=>{j.current&&clearTimeout(j.current),f?L(f===v):j.current=setTimeout(()=>{L(!1)},1200)},[f,v]);const $=()=>{if(l.includes("hover")){const g=new CustomEvent("tooltip-update",{detail:v});document.dispatchEvent(g)}},E=()=>{if(l.includes("hover")){const g=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(g)}},N=()=>{if(l.includes("click")){const g=new CustomEvent("tooltip-update",{detail:w?null:v});document.dispatchEvent(g)}},C=()=>{if(l.includes("focus")){const g=new CustomEvent("tooltip-update",{detail:v});document.dispatchEvent(g)}},D=()=>{if(l.includes("focus")){const g=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(g)}};c.useEffect(()=>{if(s!=null&&s.current){const g=s.current;return g.addEventListener("mouseenter",$),g.addEventListener("mouseleave",E),g.addEventListener("click",N),g.addEventListener("focus",C),g.addEventListener("blur",D),()=>{g.removeEventListener("mouseenter",$),g.removeEventListener("mouseleave",E),g.removeEventListener("click",N),g.removeEventListener("focus",C),g.removeEventListener("blur",D)}}},[s,l,v,w]);const P=!a&&c.isValidElement(o)?c.cloneElement(o,{ref:h}):o;if(!d&&typeof window<"u"&&s!=null&&s.current&&!d){const g=s.current.getBoundingClientRect(),M=window.innerWidth,q=window.innerHeight,O=g.left/M,X=g.top/q;e==="plain"?O<1/3?d="right":O>2/3?d="left":d=X>.5?"top":"bottom":O<1/2&&X<1/2?d="bottom-right":O>1/2&&X<1/2?d="bottom-left":O>1/2&&X>1/2?d="top-left":O<1/2&&X>1/2&&(d="top-right")}const I=Ce({variant:e,buttons:t,className:n,title:r,text:u,position:d,trigger:l,targetRef:a,children:o});return i.jsxs(i.Fragment,{children:[P,i.jsx(k.AnimatePresence,{children:w&&i.jsx(Be,{targetRef:s,children:i.jsx(k.motion.div,{initial:{opacity:f?1:0},animate:{opacity:1},transition:{duration:f?0:.3},exit:{opacity:f?1:0},className:I.toolTip,...y,onMouseEnter:$,onMouseLeave:E,children:i.jsxs(k.motion.div,{className:I.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[r&&i.jsx("div",{className:I.subHead,children:r}),i.jsx("div",{className:I.supportingText,children:u}),t&&i.jsx("div",{className:I.actions,children:Array.isArray(t)&&t.map((g,M)=>i.jsx(We,{size:"small",variant:"text",...g},M))})]})})})})]})},re=({className:e,label:t,variant:n="primary",size:o="medium",href:r,type:u,icon:d,isExtended:a=!1,ref:m,transition:l,children:y,...h})=>{if(y&&(t=y),!t)throw new Error("FAB component requires either a label prop or children content");const s=r?"a":"button",f=we({href:r,icon:d,isExtended:a,label:t,size:o,variant:n,className:e,transition:l,children:t});l={duration:.3,...l};const x=c.useRef(null),v=m||x,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...l,opacity:{duration:l.duration/2,delay:l.duration-l.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...l,marginLeft:{duration:l.duration/2,delay:l.duration-l.duration/2}}}};return i.jsxs(s,{...h,ref:v,href:r,"aria-label":a?void 0:t,className:f.fab,children:[i.jsx(oe,{trigger:a?null:void 0,text:t,targetRef:v}),i.jsx("span",{className:f.stateLayer,children:i.jsx(J,{colorName:p({primary:n=="surface","on-primary-container":n=="primary","on-secondary-container":n=="secondary","on-tertiary-container":n=="tertiary"}),triggerRef:v})}),i.jsx(_,{icon:d,className:f.icon}),i.jsx(k.AnimatePresence,{children:a&&i.jsx(k.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:f.label,children:t})})]})},T=({variant:e="standard",href:t,disabled:n=!1,type:o="button",title:r,label:u,onToggle:d,activated:a=!1,onClick:m,icon:l,size:y="medium",iconSelected:h,className:s,ref:f,width:x="default",shape:v="rounded",allowShapeTransformation:w=!0,transition:L,children:j,...$})=>{if(j&&(u=j),!u)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");r||(r=u);const[E,N]=c.useState(a);let C;d?d&&(C=M=>{n&&M.preventDefault(),N(!E),d(!!E)},l=E&&h||l):C=M=>{n&&M.preventDefault(),m&&m(M)},c.useEffect(()=>{N(a)},[a]);const D=t?"a":"button",P=be({transition:L,shape:v,allowShapeTransformation:w,width:x,href:t,activated:E,label:u,iconSelected:h,isActive:E,onToggle:d,disabled:n,icon:l,variant:e,className:s,size:y,children:u,...$}),I=c.useRef(null),g=f||I;return L={duration:.3,...L},i.jsxs(D,{disabled:n,href:t,style:{transition:L.duration+"s"},className:P.iconButton,"aria-label":u,...$,title:void 0,onClick:C,ref:g,children:[i.jsx(oe,{targetRef:g,trigger:n?null:void 0,text:r}),i.jsx("div",{className:P.touchTarget}),i.jsx("div",{className:P.stateLayer,style:{transition:L.duration+"s"},children:!n&&i.jsx(J,{colorName:p(e==="standard"&&{"on-surface-variant":!E,primary:E},e==="filled"&&{primary:!E&&!!d,"inverse-on-surface":E||!d},e==="tonal"&&{"on-surface-variant":!E&&!!d,"on-secondary-container":E||!d},e==="outlined"&&{"on-surface-variant":!E,"on-primary":E}),triggerRef:g})}),l&&i.jsx(_,{icon:l,className:P.icon})]})},ct=({className:e,valueFormatter:t,step:n=10,name:o,value:r=0,min:u=0,max:d=100,marks:a=[{value:0,label:"0"},{value:100,label:"100"}],ref:m,onChange:l,...y})=>{const h=S=>{const b=f(),B=s();return S===1/0?100:S===-1/0?0:(S-b)/(B-b)*100},s=(S=!1)=>S?d:d==1/0?a[(a==null?void 0:a.length)-1].value:d,f=(S=!1)=>S?u:u==-1/0?a[0].value:u,x=S=>{const b=f(!1);return(s(!1)-b)*S/100+b},[v,w]=c.useState(!1),L=c.useRef(null),j=m||L,[$,E]=c.useState(r),[N,C]=c.useState(h(r)),[D,P]=c.useState(!1),I=S=>{P(!0),w(!0),q(S)},g=()=>{P(!1),w(!1)};c.useEffect(()=>(D?(window.addEventListener("mouseup",g),window.addEventListener("mousemove",q),window.addEventListener("touchend",g),window.addEventListener("touchmove",q)):(window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",g),window.removeEventListener("touchmove",q)),()=>{window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",g),window.removeEventListener("touchmove",q)}),[D]);const M=Ee({className:e,isChanging:v,marks:a,max:d,min:u,name:o,step:n,value:$,valueFormatter:t,onChange:l}),q=S=>{const b=j==null?void 0:j.current;if(b){const B=b.getBoundingClientRect().left,R=((S.type==="touchmove"||S.type==="touchstart"?S.touches[0].clientX:S.clientX)-B)/b.offsetWidth*100;O({pourcent:R})}},O=({pourcent:S,value:b})=>{if(S){if(S>=100){E(s(!0)),C(100);return}if(S<=0){E(f(!0)),C(0);return}b=x(S),b==f()&&(b=f(!0)),b==s()&&(b=s(!0))}else if(b!=null){if(b>=s()){E(s(!0)),C(100);return}if(b<=f()){E(f(!0)),C(0);return}S=h(b)}else return;n!=null?b=Math.round((b-f())/n)*n+f():a&&(b=a.reduce((B,W,R)=>{let A=W.value===1/0?s():W.value===-1/0?f():W.value,V=B.value===1/0?s():B.value===-1/0?f():B.value;return A=Math.abs(A-b),V=Math.abs(V-b),A<V?W:B}).value),b>=s()&&(b=s(!0)),b<=f()&&(b=f(!0)),S=h(b),E(b),C(S),l&&l(b)},[X,H]=c.useState(0);c.useEffect(()=>{const S=()=>{j.current&&H(j.current.offsetWidth)};return S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)}},[]);const K=S=>{switch(S.key){case"ArrowRight":if(n)O({value:$+n});else if(a){const b=a.find(B=>B.value>$);b&&O({value:b.value})}break;case"ArrowLeft":if(n)O({value:$-n});else if(a){const b=a.slice(0).reverse().find((B,W,R)=>$===1/0?W===1:B.value<$);b&&O({value:b.value})}break;default:return}};return i.jsxs("div",{tabIndex:0,onKeyDown:K,role:"slider","aria-valuemin":f(!0),"aria-valuemax":s(!0),"aria-valuenow":$,"aria-valuetext":$.toString(),className:M.slider,onMouseDown:I,onClick:q,ref:j,onTouchStart:I,onDragStart:S=>S.preventDefault(),...y,children:[i.jsx("input",{type:"hidden",name:o,value:$}),i.jsx("div",{className:M.activeTrack,style:{flex:N/100}}),i.jsx("div",{className:M.handle,children:i.jsx(k.AnimatePresence,{children:v&&i.jsx(k.motion.div,{className:M.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t($):$})})}),i.jsx("div",{className:M.inactiveTrack,style:{flex:1-N/100}}),i.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:a&&a.map((S,b)=>{let B=null;const W=(v?9:10)/X*100,R=h(S.value);return R<=N-W?B=!0:R>=N+W&&(B=!1),i.jsx("div",{className:p(M.dot,{"bg-primary-container":B!=null&&B,"bg-primary":B!=null&&!B}),style:{left:`${h(S.value)}%`}},b)})})]})};/*!
|
|
2
2
|
* Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com
|
|
3
3
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
4
4
|
* Copyright 2025 Fonticons, Inc.
|
|
5
|
-
*/var it={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"]},ae={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"]},ut={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 dt=({variant:e="standard",className:t,children:n,title:s,position:r="right",extended:u,divider:d,onExtendedChange:c,closeIcon:f=ae,transition:l,...x})=>{l={duration:.3,...l};const[y,o]=a.useState(u??!0),m=Ee({transition:l,title:s,position:r,closeIcon:f,className:t,children:n,onExtendedChange:c,divider:d,isExtended:y,extended:y,variant:e});a.useEffect(()=>{c==null||c(y??!1)},[y]),a.useEffect(()=>{u!=null&&o(u)},[u]);const h={close:{width:0},open:{width:"auto"}},w=()=>i.jsxs(i.Fragment,{children:[i.jsx(k.AnimatePresence,{children:e=="modal"&&y&&i.jsx(k.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:l,onClick:()=>o(!1),className:m.overlay})}),i.jsx(k.AnimatePresence,{children:y&&i.jsxs("div",{...x,className:m.slideSheet,style:{transition:l.duration+"s"},children:[i.jsxs(k.motion.div,{variants:h,initial:u===!1?"open":"close",animate:"open",exit:"close",className:m.container,children:[i.jsxs("div",{className:m.header,children:[s&&i.jsx("p",{className:m.title,children:s}),i.jsx(ee,{size:"small",label:"close",icon:f,onClick:()=>o(!1),className:m.closeButton})]}),i.jsx("div",{className:m.content,style:{transition:l.duration+"s"},children:n})]}),(d==null&&e=="standard"?!0:d)&&i.jsx(Fe,{className:m.divider,orientation:"vertical"})]})})]});return e=="modal"?de.createPortal(w(),document.body):w()},ft=({message:e,className:t,duration:n,closeIcon:s=ae,onClose:r,...u})=>{const[d,c]=a.useState(!0),f=Ne({className:t,closeIcon:s,duration:n,isVisible:d,onClose:r,message:e});a.useEffect(()=>{n&&setTimeout(()=>{l()},n)},[n]);const l=()=>{c(!1),r==null||r()};return i.jsx(k.AnimatePresence,{children:d&&i.jsx(k.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:f.snackbar,...u,children:i.jsxs("div",{className:f.container,children:[i.jsx("p",{className:f.supportingText,children:e}),i.jsx(ee,{onClick:()=>l(),className:f.icon,icon:s,label:"close the snackbar"})]})})})},mt=({selected:e=!1,className:t,activeIcon:n,disabled:s=!1,inactiveIcon:r,onChange:u,onClick:d,onKeyDown:c,ref:f,...l})=>{const[x,y]=a.useState(e),o=j=>{s||(h(),d&&d(j))},m=j=>{s||((j.key===" "||j.key==="Enter")&&(j.preventDefault(),h()),c&&c(j))},h=()=>{y(!x),u==null||u(!x)},w=Re({className:t,isSelected:x,activeIcon:n,inactiveIcon:r,disabled:s,selected:x,onChange:u}),g=a.useRef(null),E=f||g;return i.jsxs(k.motion.div,{role:"switch","aria-checked":x,tabIndex:s?-1:0,onKeyDown:m,onClick:o,ref:E,className:w.switch,...l,children:[i.jsx("input",{type:"hidden",value:x?"1":"0"}),i.jsxs(k.motion.div,{layout:!0,style:{translate:x?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:w.handleContainer,children:[i.jsx("div",{className:w.handle,children:(x?n:r)&&i.jsx(_,{className:w.icon,icon:x?n:r})}),i.jsx("div",{className:w.handleStateLayer})]})]})},qe=({className:e,onClick:t,label:n,variant:s="primary",href:r,icon:u,selectedTab:d,setSelectedTab:c,tabsId:f,index:l,onTabSelected:x,scrollable:y=!1,selected:o=!1,ref:m,...h})=>{const w=a.useRef(null),g=m||w,[E,j]=a.useState(o);a.useEffect(()=>{o&&d==null?j(!0):j(d==l&&l!=null)},[d]),a.useEffect(()=>{d==l&&x&&x({ref:g,index:l||0,label:n,icon:u})},[d]);const $=r?"a":"button",L=C=>{c&&c(l??null),t&&t(C)},N=Ie({className:e,onTabSelected:x,scrollable:y,selectedTab:d,index:l,tabsId:f,selected:E,variant:s,icon:u,label:n,isSelected:E,setSelectedTab:c,href:r});return i.jsxs($,{...h,role:"tab","aria-selected":E,ref:g,href:r,className:N.tab,onClick:L,...h,children:[i.jsx("span",{className:N.stateLayer,children:i.jsx(J,{colorName:s==="primary"&&E?"primary":"on-surface",triggerRef:g})}),i.jsxs("span",{className:N.content,children:[u&&i.jsx(_,{icon:u,className:N.icon}),i.jsx("span",{className:N.label,children:n}),E&&i.jsx(k.motion.span,{layoutId:`underline-${f}`,className:N.underline,transition:{duration:.3}})]})]})},ht=({variant:e="primary",onTabSelected:t,children:n,className:s,selectedTab:r,setSelectedTab:u,scrollable:d=!1})=>{const[c,f]=a.useState(null);let l;r==0||r!=null?l=r:l=c;const x=u||f,y=a.Children.toArray(n).filter(g=>a.isValidElement(g)&&g.type===qe),o=a.useRef(null),m=g=>{if(t==null||t(g),d){const E=o.current,j=g.ref.current;if(E&&j){const $=j.offsetLeft+j.offsetWidth/2-E.offsetWidth/2;E.scrollTo({left:$,behavior:"smooth"})}}},h=a.useMemo(()=>oe(),[]),w=ke({children:n,onTabSelected:t,scrollable:d,selectedTab:l,setSelectedTab:x,className:s,variant:e});return i.jsx("div",{ref:o,role:"tablist",className:w.tabs,children:y.map((g,E)=>a.cloneElement(g,{key:E,index:E,variant:e,selectedTab:l,setSelectedTab:x,tabsId:h,onTabSelected:m,scrollable:d}))})},pt=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:s,suffix:r,name:u,label:d,className:c,supportingText:f,trailingIcon:l,leadingIcon:x,type:y="text",textLine:o="singleLine",autoComplete:m="on",onChange:h,value:w,showSupportingText:g=!1,...E})=>{const[j,$]=a.useState(w??""),[L,N]=a.useState(!1),[C,A]=a.useState(!1),[P,R]=a.useState(g);a.useEffect(()=>{$(w??"")},[w]),a.useEffect(()=>{n!=null&&n.length?A(!0):A(!1)},[n]),a.useEffect(()=>{g?R(g):f!=null&&f.length?R(!0):R(!1)},[P,f]),a.useEffect(()=>{L&&A(!1)},[L]);const v=a.useRef(null),M=()=>{v.current&&!L&&v.current.focus()},q=()=>{N(!0)},U=B=>{const W=B.target.value;$(W),A(!1),typeof h=="function"&&h(W)},X=()=>{N(!1)},H=Ce({showSupportingText:P,isFocused:L,showErrorIcon:C,disabled:t,name:u,label:d,autoComplete:m,className:c,onChange:h,placeholder:s,supportingText:f,type:y,leadingIcon:x,trailingIcon:l,variant:e,errorText:n,value:j,suffix:r,textLine:o}),[K]=a.useState(oe());let S,b;switch(o){case"multiLine":b=_e,S={};break;case"textAreas":b="textarea",S={};break;case"singleLine":default:b="input",S={type:y};break}return i.jsxs("div",{className:H.textField,...E,children:[i.jsxs("fieldset",{onClick:M,className:H.content,children:[i.jsx("div",{className:H.stateLayer}),x&&i.jsx("div",{className:H.leadingIcon,children:a.isValidElement(x)?x:i.jsx(_,{className:"w-5 h-5",icon:x})}),!(!L&&!j.length||e=="filled")&&i.jsx(k.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!L&&!j.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:i.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:i.jsx(k.motion.span,{className:H.label,transition:{duration:.3},layoutId:K,children:d})})}),i.jsxs("div",{className:"flex-1 relative",children:[(!L&&!j.length||e=="filled")&&i.jsx(k.motion.label,{htmlFor:u,className:p("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!L&&!j.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!L&&!j.length))}),transition:{duration:.3},children:i.jsx(k.motion.span,{className:H.label,transition:{duration:.3},layoutId:e=="outlined"?K:void 0,children:d})}),i.jsx(b,{ref:v,value:j,onChange:U,className:H.input,id:u,name:u,placeholder:L?s??void 0:"",onFocus:q,onBlur:X,disabled:t,autoComplete:m,"aria-invalid":!!(n!=null&&n.length),"aria-label":d,...S})]}),i.jsx("div",{className:H.activeIndicator}),!C&&i.jsxs(i.Fragment,{children:[l&&i.jsx("div",{onClick:B=>{B.stopPropagation()},className:H.trailingIcon,children:a.isValidElement(l)?l:i.jsx(_,{className:"h-5",icon:l})}),!l&&r&&i.jsx("span",{className:H.suffix,children:r})]}),C&&i.jsx("div",{className:p(H.trailingIcon,{" absolute right-0":!l}),children:i.jsx(_,{className:"h-5 text-error",icon:it})})]}),P&&i.jsx("p",{className:H.supportingText,children:n!=null&&n.length?n:f!=null&&f.length?f:" "})]})},yt=F("navigationRailItem",({isSelected:e,icon:t,label:n,variant:s})=>({navigationRailItem:p(" group 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(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:p("size-6 flex"),label:p("w-fit mx-auto text-nowrap",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})})),He=({label:e})=>i.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:i.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),Ue=({className:e,onClick:t,label:n,variant:s="vertical",href:r,icon:u,selectedItem:d,setSelectedItem:c,index:f,onItemSelected:l,selected:x=!1,ref:y,transition:o,isExtended:m,iconSelected:h,style:w,extendedOnly:g,children:E,...j})=>{E&&(n=E);const $=a.useRef(null),L=y||$,[N,C]=a.useState(x);a.useEffect(()=>{x&&d==null?C(!0):C(d==f&&f!=null)},[d]),a.useEffect(()=>{d==f&&l&&l({ref:L,index:f||0,label:n,icon:u})},[d]);const A=r?"a":"button",P=v=>{c&&c(f??null),t&&t(v)},R=yt({isExtended:m,extendedOnly:g,className:e,onItemSelected:l,selectedItem:d,index:f,transition:o,selected:N,variant:s,icon:u,label:n,isSelected:N,setSelectedItem:c,href:r,children:n,iconSelected:h});return o={duration:.3,...o},g&&!m?null:i.jsxs(A,{...j,role:"tab","aria-selected":N,ref:L,href:r,className:R.navigationRailItem,onClick:P,style:{transition:o.duration+"s",...w},children:[i.jsxs(k.motion.div,{style:{transition:s=="horizontal"?o.duration+`s, gap ${o.duration/2}s ${o.duration-o.duration/2}s`:o.duration+`s, gap ${o.duration/3}s ${o.duration-o.duration/3}s`},transition:o,className:R.container,children:[i.jsx(k.motion.div,{layout:!0,className:R.stateLayer}),u&&i.jsx(_,{icon:N?h:u,className:R.icon}),i.jsx(k.AnimatePresence,{children:s=="horizontal"&&(()=>{const v={width:0,opacity:0,transition:{...o}},M={width:"auto",opacity:1,transition:{...o,opacity:{duration:o.duration/2,delay:o.duration-o.duration/2}}};return i.jsx(k.motion.span,{initial:v,animate:M,exit:v,className:R.label,children:n})})()})]}),i.jsx(k.AnimatePresence,{children:s=="vertical"&&(()=>{const v={height:0,opacity:0,transition:{...o,opacity:{duration:0}}},M={height:"auto",opacity:1,transition:{...o,opacity:{duration:o.duration/3,delay:o.duration-o.duration/3}}};return i.jsx(k.motion.span,{initial:M,animate:M,exit:v,className:R.label,transition:o,children:n})})()})]})},xt=F("navigationRail",({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})})),gt=({variant:e="standard",onItemSelected:t,children:n,className:s,selectedItem:r,extended:u,alignment:d="top",menu:c={closed:{icon:ut,label:"Open menu"},opened:{icon:ae,label:"Close menu"}},style:f,onExtendedChange:l,transition:x,setSelectedItem:y})=>{const[o,m]=a.useState(null),[h,w]=a.useState(u);let g;r==0||r!=null?g=r:g=o;const E=y||m,j=a.useRef(null),$=R=>{t==null||t(R)};function L(R){const v=[];return a.Children.forEach(R,M=>{a.isValidElement(M)&&M.type===a.Fragment?v.push(...L(M.props.children)):v.push(M)}),v}const N=L(n),C=N.filter(R=>a.isValidElement(R)&&R.type===se),A=xt({children:n,onItemSelected:t,selectedItem:g,setSelectedItem:E,className:s,variant:e,extended:h,isExtended:h,alignment:d,menu:c,transition:x,onExtendedChange:l});x={duration:.3,...x};const P=a.useRef(!1);return P.current=!1,a.useEffect(()=>{l==null||l(h??!1)},[h]),i.jsxs("div",{style:{transition:x.duration+"s",...f},ref:j,className:A.navigationRail,children:[i.jsxs("div",{className:A.header,children:[i.jsx(ee,{onClick:()=>w(!h),label:h?c==null?void 0:c.opened.label:c==null?void 0:c.closed.label,className:A.menuIcon,icon:h?c.opened.icon:c==null?void 0:c.closed.icon}),C.length>0&&a.cloneElement(C[0],{transition:x,isExtended:h,className:"!shadow-none mx-5 "+C[0].props.className})]}),i.jsx("div",{className:A.segments,children:(()=>{let R=0;return N.map(v=>a.isValidElement(v)&&v.type===Ue?a.cloneElement(v,{key:R,index:R++,variant:h?"horizontal":"vertical",selectedItem:g,setSelectedItem:E,onItemSelected:$,transition:x,extendedOnly:P.current,isExtended:h}):a.isValidElement(v)&&v.type===se?null:a.isValidElement(v)&&v.type===He?(P.current=!0,h?a.cloneElement(v,{}):null):v)})()}),i.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function vt(e){return Q.defineConfig({variant:Q.Variants.Fidelity,...e,plugins:[new Q.FontPlugin(e),new fe.TailwindPlugin(e)]})}exports.AnimateOnScroll=tt;exports.Button=We;exports.Card=nt;exports.Carousel=rt;exports.CarouselItem=Ve;exports.CustomScroll=Be;exports.Divider=Fe;exports.Fab=se;exports.Icon=_;exports.IconButton=ee;exports.NavigationRail=gt;exports.NavigationRailItem=Ue;exports.NavigationRailSection=He;exports.ProgressIndicator=$e;exports.RippleEffect=J;exports.SideSheet=dt;exports.Slider=ct;exports.SmoothScroll=Je;exports.Snackbar=ft;exports.Switch=mt;exports.SyncedFixedWrapper=Ae;exports.Tab=qe;exports.Tabs=ht;exports.TextField=pt;exports.ThemeProvider=Qe;exports.ToolTip=le;exports.buttonStyle=ye;exports.cardStyle=xe;exports.carouselItemStyle=ge;exports.carouselStyle=ve;exports.classNames=p;exports.classnames=he;exports.customScrollStyle=Pe;exports.defaultClassNames=F;exports.defineConfig=vt;exports.dividerStyle=we;exports.fabStyle=be;exports.getClassNames=pe;exports.iconButtonStyle=je;exports.normalize=De;exports.progressIndicatorStyle=Se;exports.sideSheetStyle=Ee;exports.sliderStyle=Le;exports.snackbarStyle=Ne;exports.switchStyle=Re;exports.tabStyle=Ie;exports.tabsStyle=ke;exports.textFieldStyle=Ce;exports.toolStyle=Me;
|
|
5
|
+
*/var it={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"]},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"]},ut={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 dt=({variant:e="standard",className:t,children:n,title:o,position:r="right",extended:u,divider:d,onExtendedChange:a,closeIcon:m=le,transition:l,...y})=>{l={duration:.3,...l};const[h,s]=c.useState(u??!0),f=je({transition:l,title:o,position:r,closeIcon:m,className:t,children:n,onExtendedChange:a,divider:d,isExtended:h,extended:h,variant:e});c.useEffect(()=>{a==null||a(h??!1)},[h]),c.useEffect(()=>{u!=null&&s(u)},[u]);const x={close:{width:0},open:{width:"auto"}},v=()=>i.jsxs(i.Fragment,{children:[i.jsx(k.AnimatePresence,{children:e=="modal"&&h&&i.jsx(k.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:l,onClick:()=>s(!1),className:f.overlay})}),i.jsx(k.AnimatePresence,{children:h&&i.jsxs("div",{...y,className:f.slideSheet,style:{transition:l.duration+"s"},children:[i.jsxs(k.motion.div,{variants:x,initial:u===!1?"open":"close",animate:"open",exit:"close",className:f.container,children:[i.jsxs("div",{className:f.header,children:[o&&i.jsx("p",{className:f.title,children:o}),i.jsx(T,{size:"small",label:"close",icon:m,onClick:()=>s(!1),className:f.closeButton})]}),i.jsx("div",{className:f.content,style:{transition:l.duration+"s"},children:n})]}),(d==null&&e=="standard"?!0:d)&&i.jsx(Fe,{className:f.divider,orientation:"vertical"})]})})]});return e=="modal"?ue.createPortal(v(),document.body):v()},ft=({message:e,className:t,duration:n,closeIcon:o=le,onClose:r,...u})=>{const[d,a]=c.useState(!0),m=Le({className:t,closeIcon:o,duration:n,isVisible:d,onClose:r,message:e});c.useEffect(()=>{n&&setTimeout(()=>{l()},n)},[n]);const l=()=>{a(!1),r==null||r()};return i.jsx(k.AnimatePresence,{children:d&&i.jsx(k.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:m.snackbar,...u,children:i.jsxs("div",{className:m.container,children:[i.jsx("p",{className:m.supportingText,children:e}),i.jsx(T,{onClick:()=>l(),className:m.icon,icon:o,label:"close the snackbar"})]})})})},mt=({selected:e=!1,className:t,activeIcon:n,disabled:o=!1,inactiveIcon:r,onChange:u,onClick:d,onKeyDown:a,ref:m,...l})=>{const[y,h]=c.useState(e),s=j=>{o||(x(),d&&d(j))},f=j=>{o||((j.key===" "||j.key==="Enter")&&(j.preventDefault(),x()),a&&a(j))},x=()=>{h(!y),u==null||u(!y)},v=Ne({className:t,isSelected:y,activeIcon:n,inactiveIcon:r,disabled:o,selected:y,onChange:u}),w=c.useRef(null),L=m||w;return i.jsxs(k.motion.div,{role:"switch","aria-checked":y,tabIndex:o?-1:0,onKeyDown:f,onClick:s,ref:L,className:v.switch,...l,children:[i.jsx("input",{type:"hidden",value:y?"1":"0"}),i.jsxs(k.motion.div,{layout:!0,style:{translate:y?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:v.handleContainer,children:[i.jsx("div",{className:v.handle,children:(y?n:r)&&i.jsx(_,{className:v.icon,icon:y?n:r})}),i.jsx("div",{className:v.handleStateLayer})]})]})},qe=({className:e,onClick:t,label:n,variant:o="primary",href:r,icon:u,selectedTab:d,setSelectedTab:a,tabsId:m,index:l,onTabSelected:y,scrollable:h=!1,selected:s=!1,ref:f,...x})=>{const v=c.useRef(null),w=f||v,[L,j]=c.useState(s);c.useEffect(()=>{s&&d==null?j(!0):j(d==l&&l!=null)},[d]),c.useEffect(()=>{d==l&&y&&y({ref:w,index:l||0,label:n,icon:u})},[d]);const $=r?"a":"button",E=C=>{a&&a(l??null),t&&t(C)},N=Ie({className:e,onTabSelected:y,scrollable:h,selectedTab:d,index:l,tabsId:m,selected:L,variant:o,icon:u,label:n,isSelected:L,setSelectedTab:a,href:r});return i.jsxs($,{...x,role:"tab","aria-selected":L,ref:w,href:r,className:N.tab,onClick:E,...x,children:[i.jsx("span",{className:N.stateLayer,children:i.jsx(J,{colorName:o==="primary"&&L?"primary":"on-surface",triggerRef:w})}),i.jsxs("span",{className:N.content,children:[u&&i.jsx(_,{icon:u,className:N.icon}),i.jsx("span",{className:N.label,children:n}),L&&i.jsx(k.motion.span,{layoutId:`underline-${m}`,className:N.underline,transition:{duration:.3}})]})]})},ht=({variant:e="primary",onTabSelected:t,children:n,className:o,selectedTab:r,setSelectedTab:u,scrollable:d=!1})=>{const[a,m]=c.useState(null);let l;r==0||r!=null?l=r:l=a;const y=u||m,h=c.Children.toArray(n).filter(w=>c.isValidElement(w)&&w.type===qe),s=c.useRef(null),f=w=>{if(t==null||t(w),d){const L=s.current,j=w.ref.current;if(L&&j){const $=j.offsetLeft+j.offsetWidth/2-L.offsetWidth/2;L.scrollTo({left:$,behavior:"smooth"})}}},x=c.useMemo(()=>se(),[]),v=Re({children:n,onTabSelected:t,scrollable:d,selectedTab:l,setSelectedTab:y,className:o,variant:e});return i.jsx("div",{ref:s,role:"tablist",className:v.tabs,children:h.map((w,L)=>c.cloneElement(w,{key:L,index:L,variant:e,selectedTab:l,setSelectedTab:y,tabsId:x,onTabSelected:f,scrollable:d}))})},pt=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:o,suffix:r,name:u,label:d,className:a,supportingText:m,trailingIcon:l,leadingIcon:y,type:h="text",textLine:s="singleLine",autoComplete:f="on",onChange:x,value:v,showSupportingText:w=!1,...L})=>{const[j,$]=c.useState(v??""),[E,N]=c.useState(!1),[C,D]=c.useState(!1),[P,I]=c.useState(w);c.useEffect(()=>{$(v??"")},[v]),c.useEffect(()=>{n!=null&&n.length?D(!0):D(!1)},[n]),c.useEffect(()=>{w?I(w):m!=null&&m.length?I(!0):I(!1)},[P,m]),c.useEffect(()=>{E&&D(!1)},[E]);const g=c.useRef(null),M=()=>{g.current&&!E&&g.current.focus()},q=()=>{N(!0)},O=B=>{const W=B.target.value;$(W),D(!1),typeof x=="function"&&x(W)},X=()=>{N(!1)},H=ke({showSupportingText:P,isFocused:E,showErrorIcon:C,disabled:t,name:u,label:d,autoComplete:f,className:a,onChange:x,placeholder:o,supportingText:m,type:h,leadingIcon:y,trailingIcon:l,variant:e,errorText:n,value:j,suffix:r,textLine:s}),[K]=c.useState(se());let S,b;switch(s){case"multiLine":b=_e,S={};break;case"textAreas":b="textarea",S={};break;case"singleLine":default:b="input",S={type:h};break}return i.jsxs("div",{className:H.textField,...L,children:[i.jsxs("fieldset",{onClick:M,className:H.content,children:[i.jsx("div",{className:H.stateLayer}),y&&i.jsx("div",{className:H.leadingIcon,children:c.isValidElement(y)?y:i.jsx(_,{className:"w-5 h-5",icon:y})}),!(!E&&!j.length||e=="filled")&&i.jsx(k.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!E&&!j.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:i.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:i.jsx(k.motion.span,{className:H.label,transition:{duration:.3},layoutId:K,children:d})})}),i.jsxs("div",{className:"flex-1 relative",children:[(!E&&!j.length||e=="filled")&&i.jsx(k.motion.label,{htmlFor:u,className:p("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!E&&!j.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!E&&!j.length))}),transition:{duration:.3},children:i.jsx(k.motion.span,{className:H.label,transition:{duration:.3},layoutId:e=="outlined"?K:void 0,children:d})}),i.jsx(b,{ref:g,value:j,onChange:O,className:H.input,id:u,name:u,placeholder:E?o??void 0:"",onFocus:q,onBlur:X,disabled:t,autoComplete:f,"aria-invalid":!!(n!=null&&n.length),"aria-label":d,...S})]}),i.jsx("div",{className:H.activeIndicator}),!C&&i.jsxs(i.Fragment,{children:[l&&i.jsx("div",{onClick:B=>{B.stopPropagation()},className:H.trailingIcon,children:c.isValidElement(l)?l:i.jsx(_,{className:"h-5",icon:l})}),!l&&r&&i.jsx("span",{className:H.suffix,children:r})]}),C&&i.jsx("div",{className:p(H.trailingIcon,{" absolute right-0":!l}),children:i.jsx(_,{className:"h-5 text-error",icon:it})})]}),P&&i.jsx("p",{className:H.supportingText,children:n!=null&&n.length?n:m!=null&&m.length?m:" "})]})},yt=F("navigationRailItem",({isSelected:e,icon:t,label:n,variant:o})=>({navigationRailItem:p(" group flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":o=="vertical","gap-0 h-[66px]":o=="horizontal"}),container:p(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":o=="horizontal","gap-0 ":o=="vertical","p-4":!n},n&&["px-4",{"py-1 ":o=="vertical","py-4 ":o=="horizontal"}]),stateLayer:p(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:p("size-6 flex"),label:p("w-fit mx-auto text-nowrap",{"text-label-large ":o=="horizontal","text-label-medium":o=="vertical"})})),He=({label:e})=>i.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:i.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),Oe=({className:e,onClick:t,label:n,variant:o="vertical",href:r,icon:u,selectedItem:d,setSelectedItem:a,index:m,onItemSelected:l,selected:y=!1,ref:h,transition:s,isExtended:f,iconSelected:x,style:v,extendedOnly:w,children:L,...j})=>{L&&(n=L);const $=c.useRef(null),E=h||$,[N,C]=c.useState(y);c.useEffect(()=>{y&&d==null?C(!0):C(d==m&&m!=null)},[d]),c.useEffect(()=>{d==m&&l&&l({ref:E,index:m||0,label:n,icon:u})},[d]);const D=r?"a":"button",P=g=>{a&&a(m??null),t&&t(g)},I=yt({isExtended:f,extendedOnly:w,className:e,onItemSelected:l,selectedItem:d,index:m,transition:s,selected:N,variant:o,icon:u,label:n,isSelected:N,setSelectedItem:a,href:r,children:n,iconSelected:x});return s={duration:.3,...s},w&&!f?null:i.jsxs(D,{...j,role:"tab","aria-selected":N,ref:E,href:r,className:I.navigationRailItem,onClick:P,style:{transition:s.duration+"s",...v},children:[i.jsxs(k.motion.div,{style:{transition:o=="horizontal"?s.duration+`s, gap ${s.duration/2}s ${s.duration-s.duration/2}s`:s.duration+`s, gap ${s.duration/3}s ${s.duration-s.duration/3}s`},transition:s,className:I.container,children:[i.jsx(k.motion.div,{layout:!0,className:I.stateLayer}),u&&i.jsx(_,{icon:N?x:u,className:I.icon}),i.jsx(k.AnimatePresence,{children:o=="horizontal"&&(()=>{const g={width:0,opacity:0,transition:{...s}},M={width:"auto",opacity:1,transition:{...s,opacity:{duration:s.duration/2,delay:s.duration-s.duration/2}}};return i.jsx(k.motion.span,{initial:g,animate:M,exit:g,className:I.label,children:n})})()})]}),i.jsx(k.AnimatePresence,{children:o=="vertical"&&(()=>{const g={height:0,opacity:0,transition:{...s,opacity:{duration:0}}},M={height:"auto",opacity:1,transition:{...s,opacity:{duration:s.duration/3,delay:s.duration-s.duration/3}}};return i.jsx(k.motion.span,{initial:M,animate:M,exit:g,className:I.label,transition:s,children:n})})()})]})},xt=F("navigationRail",({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})})),gt=({variant:e="standard",onItemSelected:t,children:n,className:o,selectedItem:r,extended:u,alignment:d="top",menu:a={closed:{icon:ut,label:"Open menu"},opened:{icon:le,label:"Close menu"}},style:m,onExtendedChange:l,transition:y,setSelectedItem:h})=>{const[s,f]=c.useState(null),[x,v]=c.useState(u);let w;r==0||r!=null?w=r:w=s;const L=h||f,j=c.useRef(null),$=I=>{t==null||t(I)};function E(I){const g=[];return c.Children.forEach(I,M=>{c.isValidElement(M)&&M.type===c.Fragment?g.push(...E(M.props.children)):g.push(M)}),g}const N=E(n),C=N.filter(I=>c.isValidElement(I)&&I.type===re),D=xt({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:L,className:o,variant:e,extended:x,isExtended:x,alignment:d,menu:a,transition:y,onExtendedChange:l});y={duration:.3,...y};const P=c.useRef(!1);return P.current=!1,c.useEffect(()=>{l==null||l(x??!1)},[x]),i.jsxs("div",{style:{transition:y.duration+"s",...m},ref:j,className:D.navigationRail,children:[i.jsxs("div",{className:D.header,children:[i.jsx(T,{onClick:()=>v(!x),label:x?a==null?void 0:a.opened.label:a==null?void 0:a.closed.label,className:D.menuIcon,icon:x?a.opened.icon:a==null?void 0:a.closed.icon}),C.length>0&&c.cloneElement(C[0],{transition:y,isExtended:x,className:"!shadow-none mx-5 "+C[0].props.className})]}),i.jsx("div",{className:D.segments,children:(()=>{let I=0;return N.map(g=>c.isValidElement(g)&&g.type===Oe?c.cloneElement(g,{key:I,index:I++,variant:x?"horizontal":"vertical",selectedItem:w,setSelectedItem:L,onItemSelected:$,transition:y,extendedOnly:P.current,isExtended:x}):c.isValidElement(g)&&g.type===re?null:c.isValidElement(g)&&g.type===He?(P.current=!0,x?c.cloneElement(g,{}):null):g)})()}),i.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function vt(e){return Q.defineConfig({variant:Q.Variants.Fidelity,...e,plugins:[new Q.FontPlugin(e),new de.TailwindPlugin(e)]})}exports.AnimateOnScrollInit=tt;exports.Button=We;exports.Card=nt;exports.Carousel=rt;exports.CarouselItem=Ve;exports.CustomScroll=Pe;exports.Divider=Fe;exports.Fab=re;exports.Icon=_;exports.IconButton=T;exports.NavigationRail=gt;exports.NavigationRailItem=Oe;exports.NavigationRailSection=He;exports.ProgressIndicator=Me;exports.RippleEffect=J;exports.SideSheet=dt;exports.Slider=ct;exports.SmoothScroll=Je;exports.Snackbar=ft;exports.Switch=mt;exports.SyncedFixedWrapper=Be;exports.Tab=qe;exports.Tabs=ht;exports.TextField=pt;exports.ThemeProvider=Qe;exports.ToolTip=oe;exports.buttonStyle=pe;exports.cardStyle=ye;exports.carouselItemStyle=xe;exports.carouselStyle=ge;exports.classNames=p;exports.classnames=me;exports.customScrollStyle=$e;exports.defaultClassNames=F;exports.defineConfig=vt;exports.dividerStyle=ve;exports.fabStyle=we;exports.getClassNames=he;exports.iconButtonStyle=be;exports.initAnimateOnScroll=De;exports.normalize=Ae;exports.progressIndicatorStyle=Se;exports.sideSheetStyle=je;exports.sliderStyle=Ee;exports.snackbarStyle=Le;exports.switchStyle=Ne;exports.tabStyle=Ie;exports.tabsStyle=Re;exports.textFieldStyle=ke;exports.toolStyle=Ce;
|