@udixio/ui-react 2.7.0 → 2.8.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 +10 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1188 -1184
- package/dist/lib/components/FabMenu.d.ts +1 -1
- package/dist/lib/components/FabMenu.d.ts.map +1 -1
- package/dist/lib/styles/fab.style.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/lib/components/FabMenu.tsx +3 -3
- package/src/lib/styles/fab.style.ts +13 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 2.8.0 (2025-11-04)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **ui-react:** enhance `FabMenu` transition handling with overflow visibility ([4fcde60](https://github.com/Udixio/UI/commit/4fcde60))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Joël VIGREUX
|
|
10
|
+
|
|
1
11
|
## 2.7.0 (2025-11-03)
|
|
2
12
|
|
|
3
13
|
### 🚀 Features
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),Pe=require("clsx"),Mt=require("tailwind-merge"),a=require("react"),A=require("motion/react"),kt=require("motion"),We=require("react-dom"),me=require("@udixio/theme"),Fe=require("@udixio/tailwind"),Rt=require("react-textarea-autosize"),Ve=Mt.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),y=(...e)=>Ve(Pe.clsx(e)),Oe=(...e)=>Ve(Pe.clsx(e));function $t(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 ye=e=>{const t={};e.classNameList.forEach(o=>{var s;if(o)if(typeof o=="string")(t[s=e.default]??(t[s]=[])).push(o);else{const i=o(e.states);Object.entries(i).map(c=>{const[l,h]=c;(t[l]??(t[l]=[])).push(h)})}});const n=t;return Object.entries(t).map(o=>{let[s,i]=o;i=i.reverse(),s==e.default&&i.unshift("relative"),i.unshift($t(s)),n[s]=Oe(...i)}),n},K=(e,t)=>n=>ye({classNameList:[n.className,t],default:e,states:n}),_=(e,t)=>n=>a.useMemo(()=>ye({classNameList:[n.className,t],default:e,states:n}),[n]);function At(e,t,n){return a.useMemo(()=>ye({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const He=({variant:e,disableTextMargins:t,disabled:n,iconPosition:o,icon:s,isActive:i,loading:c,shape:l,onToggle:h,size:r,allowShapeTransformation:p})=>({button:y(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",r==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",r==="small"&&"text-label-large px-4 py-2.5 gap-2",r==="medium"&&"text-title-medium px-6 py-4 gap-2",r==="large"&&"text-headline-small px-12 py-8 gap-3",r==="xLarge"&&"text-headline-large px-16 py-12 gap-4",l==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(l==="squared"||p&&i)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},p&&!n&&{"active:rounded-[12px]":r==="xSmall"||r=="small","active:rounded-[16px]":r==="medium","active:rounded-[28px]":r==="large"||r=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!i,"bg-primary text-on-primary":!n&&i,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!i&&h,"bg-primary text-on-primary":!n&&(i&&h||!h),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!i,"bg-secondary text-on-secondary":!n&&i,"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&&!i,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&i}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[r==="xSmall"&&"-mx-3 ",r==="small"&&"-mx-4 ",r==="medium"&&"-mx-6 ",r==="large"&&"-mx-12",r==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("overflow-hidden",l==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(l==="squared"||p&&i)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},p&&!n&&{"group-active/button:rounded-[12px]":r==="xSmall"||r=="small","group-active/button:rounded-[16px]":r==="medium","group-active/button:rounded-[28px]":r==="large"||r=="xLarge"}),label:y({invisible:c}),icon:y({invisible:c},r==="xSmall"&&"size-5",r==="small"&&"size-5",r==="medium"&&"size-6",r==="large"&&"size-8",r==="xLarge"&&"size-10")}),Bt=K("button",He),qe=_("button",He),Ue=({variant:e,isInteractive:t})=>({card:y("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")}),Dt=K("card",Ue),Xe=_("card",Ue),Ee=({width:e})=>({carouselItem:y("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),Pt=K("carouselItem",Ee),Ye=_("carouselItem",Ee),_e=()=>({carousel:y(["w-full h-[400px]"]),track:y("flex h-full w-full")}),Wt=K("carousel",_e),Ke=_("carousel",_e),Ge=({orientation:e})=>({divider:y("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),Ft=K("divider",Ge),Je=_("divider",Ge),Ze=({size:e,variant:t,extended:n})=>({fab:y("flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small"&&!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==="primary"&&"bg-primary text-on-primary",t==="secondary"&&"bg-secondary text-on-secondary",t==="tertiary"&&"bg-tertiary text-on-tertiary",t==="primaryContainer"&&"bg-primary-container text-on-primary-container",t==="secondaryContainer"&&"bg-secondary-container text-on-secondary-container",t==="tertiaryContainer"&&"bg-tertiary-container text-on-tertiary-container"),icon:y({"size-6":e=="small"||e=="medium"||n,"size-9":e=="large"&&!n}),label:y("text-title-medium text-nowrap")}),Vt=K("fab",Ze),Qe=_("fab",Ze),Te=({size:e,variant:t,open:n})=>({fabMenu:y("relative inline-flex flex-col items-end"),actions:y("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0")}),Ot=K("fabMenu",Te),ze=_("fabMenu",Te),et=({variant:e,disabled:t,onToggle:n,isActive:o,size:s,width:i,shape:c,allowShapeTransformation:l})=>({iconButton:y("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},c==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(c==="squared"||l&&o)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},l&&!t&&{"active:rounded-[12px]":s==="xSmall"||s=="small","active:rounded-[16px]":s==="medium","active:rounded-[28px]":s==="large"||s=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!o&&!!n,"bg-primary":o||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-secondary-container text-on-secondary-container":!o&&!!n,"bg-secondary text-on-secondary":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:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("absolute top-0 left-0 h-full w-full overflow-hidden",(c==="rounded"||c==="squared"&&n&&!t&&o&&l)&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(c==="squared"||c==="rounded"&&n&&!t&&o&&l)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},l&&!t&&{"group-active/icon-button:rounded-[12px]":s==="xSmall"||s=="small","group-active/icon-button:rounded-[16px]":s==="medium","group-active/icon-button:rounded-[28px]":s==="large"||s=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!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:y(" transition-all duration-300",{"size-5 p-1.5":s==="xSmall"},{"size-6 p-2":s==="small"},{"size-6 p-4":s==="medium"},{"size-8 p-8":s==="large"},{"size-10 p-12":s==="xLarge"},i=="narrow"&&[{"px-1":s==="xSmall"},{"px-1":s==="small"},{"px-3":s==="medium"},{"px-4":s==="large"},{"px-8":s==="xLarge"}],i=="wide"&&[{"px-2.5":s==="xSmall"},{"px-3.5":s==="small"},{"px-6":s==="medium"},{"px-12":s==="large"},{"px-[72px]":s==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!o,"text-primary":o},e==="filled"&&{"text-primary":!o&&!!n,"text-on-primary":o||!n},e==="outlined"&&{"text-on-surface-variant":!o,"text-inverse-on-surface":o}],!!t&&"text-on-surface/[0.38]")}),Ht=K("iconButton",et),tt=_("iconButton",et),nt=({variant:e,isVisible:t})=>({progressIndicator:y((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:y("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:y({"max-h-0":!t,"max-h-full":t},(e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:y("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),qt=K("progressIndicator",nt),rt=_("progressIndicator",nt),Le=({variant:e,position:t})=>({sideSheet:y("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-full":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:y("w-full overflow-hidden",{}),content:y("w-fit "),header:y("p-4 flex items-center gap-2"),title:y("text-on-surface-variant text-title-large"),closeButton:y("ml-auto"),divider:y({hidden:e=="modal"}),overlay:y("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),st=K("sideSheet",Le),Ut=_("sideSheet",Le),Ne=({isChanging:e})=>({slider:y(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:y(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:y(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:y(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:y(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:y(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),Xt=K("slider",Ne),ot=_("slider",Ne),at=()=>({snackbar:y(" rounded bg-inverse-surface "),container:y("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:y("text-body-medium text-inverse-on-surface "),icon:y(" ml-auto mr-0 text-inverse-on-surface block dark")}),Yt=K("snackbar",at),lt=_("snackbar",at),ct=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:y("group/switch w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:y("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:y("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!n},{"w-[24px] h-[24px]":!(!e&&!n)},!t&&["cursor-pointer group-active/switch:h-[28px] group-active/switch:w-[28px]",{"bg-on-primary group-hover/switch:bg-primary-container":e},{"bg-outline group-hover/switch:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:y("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:y("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),_t=K("switch",ct),it=_("switch",ct),ut=({isSelected:e,icon:t,label:n,variant:o})=>({tab:y("flex-1 group/tab 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:y("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/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface":!e,"group-hover/tab:hover-state-primary group-focus-visible/tab:focus-state-primary":e},o==="secondary"&&"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"),content:y("flex gap-0.5 h-full justify-center",{relative: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:y("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:y("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:y("bg-primary absolute w-full left-0 bottom-0",o==="primary"&&"h-[3px] rounded-t",o==="secondary"&&"h-0.5")}),Kt=K("tab",ut),dt=_("tab",ut),ft=({scrollable:e})=>({tabs:y("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Gt=K("tabs",ft),mt=_("tabs",ft),ht=({disabled:e,leadingIcon:t,trailingIcon:n,variant:o,errorText:s,isFocused:i,value:c,suffix:l,textLine:h})=>({textField:y({"opacity-[.38]":e}),content:y("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":h=="singleLine"},{"border-on-surface-variant":!(s!=null&&s.length)&&!i&&o=="filled","border-outline":!(s!=null&&s.length)&&!i&&o=="outlined","border-primary":!(s!=null&&s.length)&&i,"border-error":!!(s!=null&&s.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]":i}]),stateLayer:y("absolute -z-10 w-full h-full top-0 left-0",{hidden:o=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":i}),label:y("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(s!=null&&s.length)},{"text-on-surface":e},{"text-error":!!(s!=null&&s.length)},{"text-primary":!(s!=null&&s.length)&&i}),input:y("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!l},o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10"),activeIndicator:y("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",o=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(s!=null&&s.length)},{"bg-error":!!(s!=null&&s.length)},{"!w-full":i}]),supportingText:y(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(s!=null&&s.length)},{"text-on-surface":e},{"!w-full":i},{"text-error":!!(s!=null&&s.length)}),leadingIcon:y(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!a.isValidElement(t)}]),trailingIcon:y("h-12 w-12 flex items-center justify-center",{"cursor-text":!a.isValidElement(n)}),suffix:y("text-on-surface-variant pl-0 pr-4",o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10")}),Jt=K("textField",ht),pt=_("textField",ht),yt=({position:e,variant:t})=>({toolTip:y(" 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:y("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:y("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:y("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:y("")}),Zt=K("toolTip",yt),xt=_("toolTip",yt),re=({icon:e,colors:t=[],className:n})=>{if(typeof e=="string"){let r=e;return t[0]&&(r=r.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),r=r.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),u.jsx("div",{className:y("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:r}})}if(e&&typeof e=="object"&&"src"in e){const r=e;return u.jsx("img",{src:r.src,width:r.width,height:r.height,className:y("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const o=e;if(!(o!=null&&o.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:s}=o,[i,c,,,l]=s||[],h=r=>{switch(r.length){case 2:return{"--fa-primary-color":r[0]||"inherit","--fa-secondary-color":r[1]||"inherit"};case 1:return{color:r[0]};default:return{}}};return u.jsx("svg",{className:y("size-5 box-content",n),style:{...h(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${i} ${c}`,role:"img","aria-hidden":"true",children:typeof l=="string"?u.jsx("path",{className:"fill-current",d:l}):l.map((r,p)=>u.jsx("path",{d:r},p))})},vt=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:o,...s})=>{const[i,c]=a.useState(t),[l]=a.useState(1.5);a.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),c(t)},[t]);const[h,r]=a.useState(!0),p=()=>h?l:l*.5;a.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&i!==100){const m=setInterval(()=>{c(h?10:90),r(!h)},p()*1e3);return()=>clearInterval(m)}},[e,h,i]);const[v,d]=a.useState(!1);a.useEffect(()=>{if(i>=100){const m=setTimeout(()=>{d(!1)},n);return()=>{clearTimeout(m)}}else d(!0)},[i,n]);const f=rt({className:o,variant:e,value:t,transitionDuration:n,isVisible:v});return u.jsxs(u.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&u.jsxs("div",{className:f.progressIndicator,...s,children:[u.jsx("div",{style:{width:`${i}%`,transition:`width ${n}ms ease-in-out ${i==100?", max-height 200ms 0.5s ease-in-out":""}`},className:f.track}),u.jsx("div",{style:{marginLeft:i!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${i==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:f.activeIndicator}),u.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")&&u.jsx(A.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:p(),ease:"linear"},className:f.progressIndicator,...s,children:u.jsx(A.motion.circle,{cx:"50%",cy:"50%",r:v?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:f.activeIndicator,variants:{hidden:{pathLength:h?10/100:90/100},visible:{pathLength:h?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:p(),bounce:0}}})},h+"")]})},wt=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:1,"--r":"25%"},animate:{opacity:1,"--r":"100%",transition:{duration:.5}},exit:{opacity:0,"--r":"100%",transition:{duration:.3}}},[o,s]=a.useState(!0),[i,c]=a.useState(!1),[l,h]=a.useState({x:50,y:50});a.useEffect(()=>{i&&(s(!0),s(!1))},[i]),a.useEffect(()=>{const m=t==null?void 0:t.current;if(m)return m.addEventListener("mousedown",r),m.addEventListener("mouseup",v),m.addEventListener("mouseleave",p),()=>{m.removeEventListener("mousedown",r),m.removeEventListener("mouseup",v),m.removeEventListener("mouseleave",p)}},[t]);const r=m=>{const x=t==null?void 0:t.current,w=x.getBoundingClientRect();c(!0),h({x:(m.clientX-w.left)/x.clientWidth*100,y:(m.clientY-w.top)/x.clientHeight*100})},p=m=>{c(!1)},v=m=>{c(!1)},d=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,f={position:"absolute",inset:0,width:"100%",height:"100%","--x":l.x+"%","--y":l.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${d} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return u.jsx(A.AnimatePresence,{mode:"wait",children:(i||!i&&!o)&&u.jsx(A.motion.div,{style:f,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>s(!0)})})},bt=K("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:y("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":n,"[&::-webkit-scrollbar-thumb]:bg-transparent":!n},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!n,"cursor-grabbing":t&&n}),track:y("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function Qt(e,t){let n=0,o=null,s=null;const i=(c,l)=>{n=Date.now(),t(c,l)};return(c,l)=>{const h=Date.now(),r=e-(h-n);r<=0?(o&&(clearTimeout(o),o=null),i(c,l)):(s={v:c,o:l},o||(o=setTimeout(()=>{o=null;const p=s;s=null,p&&i(p.v,p.o)},r)))}}const gt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:o,className:s,draggable:i=!1,throttleDuration:c=75,scroll:l,setScroll:h})=>{var te,oe;const r=a.useRef(null),p=a.useRef(null),[v,d]=a.useState({width:null,height:null});a.useEffect(()=>{if(!r.current)return;const C=new ResizeObserver(E=>{for(const $ of E)$.target===r.current&&d({width:$.contentRect.width,height:$.contentRect.height})});return C.observe(r.current),()=>{C.disconnect()}},[r]);const f=a.useRef(null),m=a.useRef(null),x=()=>{const C=p.current;return C?{width:n??C.scrollWidth,height:n??C.scrollHeight}:null},w=()=>{const C=r.current;return C?{width:C.clientWidth,height:C.clientHeight}:null},{scrollYProgress:j,scrollXProgress:g}=A.useScroll({container:r}),R=a.useRef(null);R.current||(R.current=Qt(c,(C,E)=>{!m.current||!f.current||!r.current||(E===(t==="horizontal"?"x":"y")&&(h==null||h(C)),o&&(t==="horizontal"&&E==="x"&&o({scrollProgress:C,scroll:C*(f.current.width-r.current.clientWidth),scrollTotal:f.current.width-r.current.clientWidth,scrollVisible:m.current.width}),t==="vertical"&&E==="y"&&o({scrollProgress:C,scroll:C*(f.current.height-r.current.clientHeight),scrollTotal:f.current.height-r.current.clientHeight,scrollVisible:m.current.height})))}));const L=(C,E)=>{R.current&&R.current(C,E)};a.useEffect(()=>{v.width&&L(g.get(),"x"),v.height&&L(j.get(),"y")},[v]),a.useEffect(()=>{const C=r.current,E=p.current;if(!C||!E||typeof l!="number")return;const $=(W,q,H)=>Math.min(H,Math.max(q,W));if(t==="horizontal"){const W=Math.max(0,(n??E.scrollWidth)-C.clientWidth);C.scrollLeft=$(l*W,0,W)}else{const W=Math.max(0,(n??E.scrollHeight)-C.clientHeight);C.scrollTop=$(l*W,0,W)}},[l,t,n]),A.useMotionValueEvent(g,"change",C=>{L(C,"x")}),A.useMotionValueEvent(j,"change",C=>{L(C,"y")});const[B,S]=a.useState(!1);a.useLayoutEffect(()=>{B||!m.current||!f.current||!o||(o({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?f.current.height:f.current.width,scrollVisible:t=="vertical"?m.current.height:m.current.width}),S(!0))},[m,f,o]),f.current=x(),m.current=w();const[F,P]=a.useState(!1),M=bt({isDragging:F,children:e,className:s,onScroll:o,orientation:t,scrollSize:n,draggable:i,throttleDuration:c}),[b,N]=a.useState(0),[V,Y]=a.useState(0),T=C=>{if(!i)return;const E=r.current;if(!E||b==null)return;const W=(C.pageX-E.offsetLeft-b)*1.5;E.scrollLeft=V-W},U=C=>{const E=r.current;E&&(P(!0),N(C.pageX-E.offsetLeft),Y(E.scrollLeft))},Z=C=>{F&&(C.preventDefault(),T(C))},k=()=>{P(!1)},I=()=>{P(!1)},O=C=>{C.preventDefault()},X=a.useRef(null);return a.useEffect(()=>()=>{X.current&&clearTimeout(X.current)},[]),a.useEffect(()=>{const C=r.current;if(!C)return;const E=$=>{var z,ne,ae,se;const W=$.detail,q=r.current;if(!q||!W)return;const H=W.orientation??t;if(typeof W.progress=="number")if(H==="horizontal"){const ee=Math.max(0,(((z=f.current)==null?void 0:z.width)??0)-q.clientWidth);q.scrollLeft=Math.min(ee,Math.max(0,W.progress*ee))}else{const ee=Math.max(0,(((ne=f.current)==null?void 0:ne.height)??0)-q.clientHeight);q.scrollTop=Math.min(ee,Math.max(0,W.progress*ee))}else if(typeof W.scroll=="number")if(H==="horizontal"){const ee=Math.max(0,(((ae=f.current)==null?void 0:ae.width)??0)-q.clientWidth);q.scrollLeft=Math.min(ee,Math.max(0,W.scroll))}else{const ee=Math.max(0,(((se=f.current)==null?void 0:se.height)??0)-q.clientHeight);q.scrollTop=Math.min(ee,Math.max(0,W.scroll))}};return C.addEventListener("udx:customScroll:set",E),()=>{C.removeEventListener("udx:customScroll:set",E)}},[t]),u.jsxs("div",{className:M.customScroll,ref:r,onMouseDown:U,onMouseMove:Z,onMouseUp:k,onMouseLeave:I,onDragStart:O,onScroll:C=>{F||(N(null),P(!0),X.current&&clearTimeout(X.current),X.current=setTimeout(()=>{P(!1)},1e3))},children:[u.jsx("div",{ref:p,style:t==="vertical"?{height:((te=m==null?void 0:m.current)==null?void 0:te.height)??"100%"}:{width:((oe=m==null?void 0:m.current)==null?void 0:oe.width)??"100%"},className:M.track,children:e}),m.current&&f.current&&u.jsxs(u.Fragment,{children:[t==="vertical"&&f.current.height>m.current.height&&u.jsx(A.motion.div,{className:"flex-none",style:{height:f.current.height-m.current.height}}),t==="horizontal"&&f.current.width>m.current.width&&u.jsx(A.motion.div,{className:"flex-none",style:{width:f.current.width-m.current.width}})]})]})},Tt=({onScroll:e,el:t,touch:n=!0})=>{const o=a.useRef(null),s=a.useRef(0),i=a.useRef(0);a.useEffect(()=>{if(!t)return;s.current=t.scrollTop,i.current=t.scrollLeft;const c=d=>{e==null||e(d)},l=d=>{d.preventDefault(),c({type:"intent",source:"wheel",deltaX:d.deltaX,deltaY:d.deltaY,originalEvent:d})},h=d=>{if(!n)return;const f=d.touches[0];f&&(o.current={x:f.clientX,y:f.clientY})},r=d=>{if(!n)return;const f=d.touches[0];if(!f||!o.current)return;d.preventDefault();const m=o.current.x-f.clientX,x=o.current.y-f.clientY;o.current={x:f.clientX,y:f.clientY},c({type:"intent",source:"touch",deltaX:m,deltaY:x,originalEvent:d})},p=()=>{n&&(o.current=null)},v=d=>{const m=t.clientHeight*.9;let x=0,w=0;switch(d.key){case"ArrowDown":w=40;break;case"ArrowUp":w=-40;break;case"ArrowRight":x=40;break;case"ArrowLeft":x=-40;break;case"PageDown":w=m;break;case"PageUp":w=-m;break;case"Home":w=Number.NEGATIVE_INFINITY;break;case"End":w=Number.POSITIVE_INFINITY;break;case" ":w=d.shiftKey?-m:m;break;default:return}d.preventDefault(),c({type:"intent",source:"keyboard",deltaX:x,deltaY:w,originalEvent:d})};return t.addEventListener("wheel",l,{passive:!1}),t.addEventListener("touchstart",h,{passive:!0}),t.addEventListener("touchmove",r,{passive:!1}),t.addEventListener("touchend",p,{passive:!0}),t.addEventListener("keydown",v),()=>{t.removeEventListener("wheel",l),t.removeEventListener("touchstart",h),t.removeEventListener("touchmove",r),t.removeEventListener("touchend",p),t.removeEventListener("keydown",v)}},[e])},zt=({transition:e,orientation:t="vertical",throttleDuration:n=25})=>{const[o,s]=a.useState(0),[i,c]=a.useState(),l=a.useRef(!1),h=a.useRef(),r=a.useRef(0);a.useEffect(()=>{c(document);const d=document.documentElement.scrollTop;s(d),r.current=d},[]),a.useEffect(()=>{const d=()=>{l.current||s(document.documentElement.scrollTop)};return i==null||i.addEventListener("scroll",d),()=>{h.current&&clearTimeout(h.current),i==null||i.removeEventListener("scroll",d)}},[i]);const p=a.useRef(),v=a.useRef(null);return a.useEffect(()=>{const d=o;if(v.current&&(v.current.stop(),v.current=null),!l.current){p.current=d;return}return v.current=kt.animate(p.current??d,d,{duration:((e==null?void 0:e.duration)??500)/1e3,ease:(e==null?void 0:e.ease)??"easeOut",onUpdate:f=>{h.current&&clearTimeout(h.current),p.current=f;const m=document.documentElement,x=Math.round(f*1e3)/1e3,w=r.current;Math.abs(x-w)<.1||(r.current=x,l.current&&m.scrollTo({top:x}))},onComplete:()=>{h.current=setTimeout(()=>{l.current=!1},300),v.current=null}}),()=>{v.current&&(v.current.stop(),v.current=null)}},[o]),i?u.jsx(Tt,{touch:!1,el:i,onScroll:d=>{if("deltaY"in d&&d.deltaY!==0&&i&&o!==null){let f=o+d.deltaY;const m=i.querySelector("html");m&&(f=Math.min(f,m.scrollHeight-m.clientHeight)),f=Math.max(f,0),s(f),l.current=!0}}}):null},ie=({style:e,colorName:t,stateClassName:n="state-ripple-group",className:o})=>{const s=a.useRef(null),i=a.useRef(null),[c,l]=a.useState(!1),h=St({isClient:c,stateClassName:n,className:o,colorName:t});return a.useEffect(()=>{if(s.current&&n!=="state-layer"){const r=n.includes("[")?n.split("[")[1].split("]")[0]:"group",p=s.current.closest(`.${r}:not(.${r} .${r})`);i.current=p}l(!0)},[]),u.jsx("div",{ref:s,className:h.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:c&&u.jsx(wt,{triggerRef:i})})},en=({isClient:e,stateClassName:t})=>({stateLayer:y([t,"w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden"])}),St=_("stateLayer",en),Et=({targetRef:e,children:t})=>{const[n,o]=a.useState(null),s=a.useRef(null),i=()=>{const c=e.current;if(!c)return;const l=c.getBoundingClientRect();o({position:"fixed",top:l.top,left:l.left,width:l.width,height:l.height,pointerEvents:"none",zIndex:999})};return a.useEffect(()=>{const c=e.current;if(c)return i(),window.addEventListener("scroll",i,!0),window.addEventListener("resize",i),s.current=new ResizeObserver(i),s.current.observe(c),()=>{var l;window.removeEventListener("scroll",i,!0),window.removeEventListener("resize",i),(l=s.current)==null||l.disconnect()}},[e]),n?We.createPortal(u.jsx("div",{style:n,children:t}),document.body):null};function tn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const nn=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:o=!1})=>{const[s,i]=a.useState(null);a.useEffect(()=>{(async()=>{const d=await me.loader(e,o);i(d)})()},[]);const[c,l]=a.useState(null),h=a.useRef(null),r=a.useRef(0),p=a.useRef(null);a.useEffect(()=>{if(!s)return;const d={...e,sourceColor:e.sourceColor},f=Date.now(),m=f-r.current,x=async w=>{await v(w)};if(r.current===0||m>=t)h.current&&(clearTimeout(h.current),h.current=null),p.current=null,r.current=f,x(d);else if(p.current=d,!h.current){const w=Math.max(0,t-m);h.current=setTimeout(async()=>{h.current=null;const j=p.current;p.current=null,j&&(r.current=Date.now(),await x(j))},w)}return()=>{}},[e,t,s]);const v=async d=>{if(typeof d.sourceColor=="string"&&!tn(d.sourceColor))throw new Error("Invalid hex color");if(!s)return;s.context.update(d),await s.load();const f=s==null?void 0:s.plugins.getPlugin(Fe.TailwindPlugin).getInstance().outputCss;l(f),n==null||n(s)};return a.useEffect(()=>()=>{h.current&&(clearTimeout(h.current),h.current=null)},[]),c?u.jsx("style",{dangerouslySetInnerHTML:{__html:c}}):null};function rn(){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 sn(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function je(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function ke(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function be(e,t){if(!je(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const c=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),l=c==="x"||c==="inline"?"inline":c==="y"||c==="block"?"block":"auto";e.classList.contains(`${t}-timeline`)||e.classList.contains(`${t}-timeline-inline`)||e.classList.contains(`${t}-timeline-block`)||e.classList.contains(`${t}-timeline-x`)||e.classList.contains(`${t}-timeline-y`)||(l==="inline"?e.classList.add(`${t}-timeline-inline`):l==="block"?e.classList.add(`${t}-timeline-block`):e.classList.add(`${t}-scroll`))}const n=e.getAttribute(`data-${t}-start`);n&&e.style.setProperty(`--${t}-range-start`,n);const o=e.getAttribute(`data-${t}-end`);o&&e.style.setProperty(`--${t}-range-end`,o);const s=e.hasAttribute(`data-${t}-paused`)||e.classList.contains(`${t}-paused`),i=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!s&&!i&&e.setAttribute(`data-${t}-run`,"")}function ge(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(o=>je(o))}function on(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),o=new Set([`${t}-run`,`${t}-in`,`${t}-out`,`${t}-in-run`,`${t}-out-run`,`${t}-paused`,`${t}-timeline`,`${t}-timeline-inline`,`${t}-timeline-block`,`${t}-timeline-x`,`${t}-timeline-y`,`${t}-scroll`]);return n.filter(s=>{if(!(s instanceof HTMLElement))return!1;const i=s.classList;return i.contains(`${t}-in`)||i.contains(`${t}-out`)||Array.from(i).some(h=>h.startsWith(`${t}-`)&&!h.includes("scroll")&&!o.has(h))?!0:!je(s)})}function an(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function Re(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function $e(e,t,n){const o=e.style.animationName;e.style.animationName="none",e.removeAttribute(`data-${t}-run`),n?e.removeAttribute(`data-${t}-${n}-run`):(e.removeAttribute(`data-${t}-in-run`),e.removeAttribute(`data-${t}-out-run`)),e.offsetWidth,e.style.animationName=o}const ln=[0,.2],Ae=new WeakSet;function Be(e,t){if(Ae.has(e))return;Ae.add(e);const n=s=>{s.target===e&&(e.hasAttribute(`data-${t}-in-run`)||e.hasAttribute(`data-${t}-out-run`))&&e.setAttribute(`data-${t}-animating`,"")},o=s=>{s.target===e&&e.removeAttribute(`data-${t}-animating`)};e.addEventListener("animationstart",n),e.addEventListener("animationend",o),e.addEventListener("animationcancel",o)}function Ie(e={}){const{prefix:t="anim",once:n=!0}=e;if(sn())return()=>{};const o=rn(),s=new WeakSet;let i=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,c=!0;const l=()=>{const f=window.pageYOffset||window.scrollY||0;c=f>=i,i=f};typeof window<"u"&&window.addEventListener("scroll",l,{passive:!0});const h=new IntersectionObserver(f=>{for(const m of f){const x=m.target;if(!ke(x)||x.hasAttribute(`data-${t}-animating`))continue;const w=an(x.classList,t);m.isIntersecting?(w&&$e(x,t,"out"),Re(x,t,"in"),n&&h.unobserve(x)):n||(c||$e(x,t,"in"),w&&Re(x,t,"out"))}},{threshold:ln}),r=f=>{const m=on(f||document,t);for(const x of m)s.has(x)||(s.add(x),h.observe(x),Be(x,t))};r();let p,v=null,d=null;if(o)(()=>{d==null&&(d=requestAnimationFrame(()=>{d=null;const m=ge(void 0,t);for(const x of m)be(x,t)}))})(),v=new MutationObserver(m=>{for(const x of m)if(x.type==="attributes"){const w=x.target;w instanceof HTMLElement&&(be(w,t),ke(w)&&(s.has(w)||(s.add(w),h.observe(w),Be(w,t))))}else if(x.type==="childList"&&x.addedNodes&&x.addedNodes.length){for(const w of Array.from(x.addedNodes))if(w instanceof HTMLElement){const j=ge(w,t);for(const g of j)be(g,t);r(w)}}}),v.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`]}),p=()=>{d!=null&&cancelAnimationFrame(d),v&&v.disconnect()};else{let f;ge(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(x=>{f=x.initScrollViewFallback({once:n})}),p=()=>{typeof f=="function"&&f()}}return()=>{p&&p(),typeof window<"u"&&window.removeEventListener("scroll",l),h.disconnect()}}const cn=Ie,un=Ie;function dn(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const he=({variant:e="filled",disabled:t=!1,icon:n,href:o,label:s,disableTextMargins:i,className:c,iconPosition:l="left",loading:h=!1,shape:r="rounded",onClick:p,onToggle:v,activated:d,ref:f,size:m="medium",allowShapeTransformation:x=!0,transition:w,children:j,...g})=>{if(j&&(s=j),!s)throw new Error("Button component requires either a label prop or children content");e=dn(e);const R=o?"a":"button",L=a.useRef(null),B=f||L,[S,F]=a.useState(d);a.useEffect(()=>{F(d)},[d]),w={duration:.3,...w};let P;v?v&&(P=N=>{t&&N.preventDefault();const V=!S;F(V),v(V)}):P=N=>{t&&N.preventDefault(),p&&p(N)};const M=qe({allowShapeTransformation:x,size:m,disableTextMargins:i,shape:r,href:o,disabled:t,icon:n,iconPosition:l,loading:h,variant:e,transition:w,className:c,isActive:S??!1,onToggle:v,activated:S,label:s,children:s}),b=n?u.jsx(re,{icon:n,className:M.icon}):u.jsx(u.Fragment,{});return u.jsxs(R,{ref:B,href:o,className:M.button,...g,onClick:P,disabled:t,"aria-pressed":v?S:void 0,style:{transition:w.duration+"s"},children:[u.jsx("div",{className:M.touchTarget}),u.jsx(ie,{style:{transition:w.duration+"s"},className:M.stateLayer,colorName:y(e==="filled"&&{"on-surface-variant":!S&&!!v,"on-primary":S||!v},e==="elevated"&&{"on-primary":S&&!!v,primary:!S||!v},e==="tonal"&&{"on-secondary":S&&!!v,"on-secondary-container":!S||!v},e==="outlined"&&{"inverse-on-surface":S&&!!v,"on-surface-variant":!S||!v},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),l==="left"&&b,h&&u.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:u.jsx(vt,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:y({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),u.jsx("span",{className:M.label,children:s}),l==="right"&&b]})},fn=({variant:e="outlined",className:t,children:n,isInteractive:o=!1,ref:s,...i})=>{const c=Xe({className:t,isInteractive:o,variant:e,children:n}),l=a.useRef(null),h=s||l;return u.jsxs("div",{...i,ref:h,className:c.card,children:[o&&u.jsx(ie,{className:c.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},ce=(e,t,n=[0,1])=>{const[o,s]=t,[i,c]=n,h=(Math.max(o,Math.min(e,s))-o)/(s-o);return i+h*(c-i)},Lt=({className:e,children:t,width:n,index:o=0,outputRange:s,ref:i,...c})=>{const l=a.useRef(null),h=i||l,r=Ye({className:e,index:o,width:n,children:t,outputRange:s});return u.jsx("div",{ref:h,style:{width:n+"px",maxWidth:s[1]+"px",minWidth:s[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:r.carouselItem,...c,children:t})},mn=({variant:e="hero",className:t,children:n,ref:o,marginPourcent:s=0,inputRange:i=[.21,.65],outputRange:c=[42,300],gap:l=8,onChange:h,onMetricsChange:r,index:p,scrollSensitivity:v=1.25,...d})=>{const f=a.useRef(null),m=o||f,[x,w]=a.useState(0),j=Ke({index:p,className:t,children:n,variant:e,inputRange:i,outputRange:c,marginPourcent:s,onChange:h,gap:l,scrollSensitivity:v,onMetricsChange:r}),g=a.Children.toArray(n).filter(E=>a.isValidElement(E)&&E.type===Lt),R=a.useRef(null),[L,B]=a.useState({}),[S,F]=a.useState(null),P=a.useRef(0),M=a.useRef(null),b=()=>{var le,ue;if(!R.current||!m.current||(S==null?void 0:S.scrollProgress)===void 0)return[];const E=(S==null?void 0:S.scrollVisible)??((le=m.current)==null?void 0:le.clientWidth)??0;function $(D,G){return D.map((Q,de)=>{const we=(Q-G)/Math.abs(D[1]-D[0]);return{itemScrollXCenter:Q,relativeIndex:we,index:de,width:0}})}const W=g.map((D,G)=>{if(!N[G].current||!R.current)return 0;const de=G/(g.length-1);return ce(de,[0,1],[0,1])}),q=$(W,(S==null?void 0:S.scrollProgress)??0).sort((D,G)=>D.index-G.index);let H=(((ue=m.current)==null?void 0:ue.clientWidth)??E)+l+c[0]+l;const z=q.sort((D,G)=>Math.abs(D.relativeIndex)-Math.abs(G.relativeIndex)).map((D,G)=>{if(!(H<=0)){if(G==0&&Y(D.index),D.width=ce(H-l,[c[0],c[1]],[c[0],c[1]]),H-=D.width+l,H!=0&&H<(c[0]+l)*2){const Q=D.width-((c[0]+l)*2-H);H+=D.width,D.width=Q,H-=D.width}else if(H==0&&D.width>=c[0]*2+l){const Q=D.width-(c[0]+l-H);H+=D.width,D.width=Q,H-=D.width}return D}}).filter(Boolean),ne=z.reverse(),ae=[...z].sort((D,G)=>Math.abs(D.index)-Math.abs(G.index));ne.forEach((D,G)=>{const Q=ne[G+1];if(!Q)return;const de=1-(Math.abs(D.relativeIndex)-Math.abs(Q==null?void 0:Q.relativeIndex)),we=ce(de,[0,2],[D.width+H,Q.width]);H+=D.width,D.width=we,H-=D.width});const se=z.length/2,ee=ce(Math.abs(ae[0].relativeIndex),[ae[0].index==0?0:se-1,se],[0,1]),ve=ce(ee,[0,1],[0,1])*-(c[0]+l);return w(ve),Object.fromEntries(z.map(D=>[D.index,D.width]))},N=a.useRef([]).current,[V,Y]=a.useState(0);a.useEffect(()=>{h&&h(V)},[V]),a.useEffect(()=>{typeof p=="number"&&g.length>0&&p!==V&&Z(p)},[p,g.length]),a.useEffect(()=>{U(V)},[V]),N.length!==g.length&&g.forEach((E,$)=>{N[$]||(N[$]=a.createRef())});const[T,U]=a.useState(0),Z=(E,$={})=>{if(!g.length)return 0;const W=N[E];if(!W||!W.current||!R.current)return 0;const q=ce(E/Math.max(1,g.length-1),[0,1],[0,1]);return U(E),R.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:q,orientation:"horizontal",animate:$.animate!==!1}})),q},k=g.map((E,$)=>{var z;const W=(z=E.props)==null?void 0:z.onClick,q=ne=>{W==null||W(ne)},H=()=>U($);return a.cloneElement(E,{width:L[$],outputRange:c,ref:N[$],key:$,index:$,role:"option","aria-selected":V===$,tabIndex:V===$?0:-1,onClick:q,onFocus:H})}),I=E=>{var $;if(E.scrollTotal>0){($=M.current)==null||$.stop();const W=P.current??0,q=E.scrollProgress??0;M.current=A.animate(W,q,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:H=>{P.current=H,F({...E,scrollProgress:H})}})}};a.useEffect(()=>{const E=b();B(E)},[S]);const O=a.useRef(r);a.useEffect(()=>{O.current=r},[r]);const X=a.useRef(null);a.useEffect(()=>{var G;const E=O.current;if(!E||!(m!=null&&m.current))return;const $=g.length;if($<=0)return;const W=((G=m.current)==null?void 0:G.clientWidth)??0,q=c[1],H=P.current??(S==null?void 0:S.scrollProgress)??0,z=(W+l)/(q+l),ne=Math.max(1,Math.floor(z)),ae=Math.max(1,Math.round(ne*(2/3))),se=Math.min(Math.max(0,V),Math.max(0,$-1)),ee=se>0,ve=se<$-1,le={total:$,selectedIndex:se,visibleApprox:z,visibleFull:ne,stepHalf:ae,canPrev:ee,canNext:ve,scrollProgress:H,viewportWidth:W,itemMaxWidth:q,gap:l},ue=X.current;let D=!ue;if(!D){for(const Q in le)if(le[Q]!==ue[Q]){D=!0;break}}D&&(X.current=le,E(le))},[m,g.length,V,S,l,c]),a.useEffect(()=>()=>{var E;(E=M.current)==null||E.stop()},[]);const[te,oe]=a.useState(0);a.useLayoutEffect(()=>{let E=c[1];S&&E>S.scrollVisible&&(E=S.scrollVisible);const $=(E+l)*k.length/v;oe($)},[m,N,S]);const C=E=>{if(!g.length)return;const $=T??V;switch(E.key){case"ArrowLeft":E.preventDefault(),Z(Math.max(0,$-1));break;case"ArrowRight":E.preventDefault(),Z(Math.min(g.length-1,$+1));break;case"Home":E.preventDefault(),Z(0);break;case"End":E.preventDefault(),Z(g.length-1);break;case"Enter":case" ":E.preventDefault(),Z($);break}};return a.useEffect(()=>{const E=m.current;if(!E)return;const $=W=>{const q=W.detail;q&&typeof q.index=="number"&&Z(q.index)};return E.addEventListener("udx:carousel:centerIndex",$),()=>{E.removeEventListener("udx:carousel:centerIndex",$)}},[m,g.length]),u.jsx("div",{className:j.carousel,ref:m,role:"listbox","aria-orientation":"horizontal",onKeyDown:C,...d,children:u.jsx(gt,{draggable:!0,orientation:"horizontal",onScroll:I,scrollSize:te,children:u.jsx("div",{className:j.track,ref:R,style:{gap:`${l}px`,translate:x,willChange:"translate"},children:k})})})},Nt=({orientation:e="horizontal",className:t,...n})=>{const o=Je({orientation:e,className:t});return u.jsx("hr",{className:o.divider,...n})},J=[];for(let e=0;e<256;++e)J.push((e+256).toString(16).slice(1));function hn(e,t=0){return(J[e[t+0]]+J[e[t+1]]+J[e[t+2]]+J[e[t+3]]+"-"+J[e[t+4]]+J[e[t+5]]+"-"+J[e[t+6]]+J[e[t+7]]+"-"+J[e[t+8]]+J[e[t+9]]+"-"+J[e[t+10]]+J[e[t+11]]+J[e[t+12]]+J[e[t+13]]+J[e[t+14]]+J[e[t+15]]).toLowerCase()}let Se;const pn=new Uint8Array(16);function yn(){if(!Se){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Se=crypto.getRandomValues.bind(crypto)}return Se(pn)}const xn=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),De={randomUUID:xn};function Ce(e,t,n){var s;if(De.randomUUID&&!e)return De.randomUUID();e=e||{};const o=e.random??((s=e.rng)==null?void 0:s.call(e))??yn();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,hn(o)}const Me=({variant:e="plain",buttons:t,className:n,children:o,title:s,text:i,position:c,targetRef:l,ref:h,trigger:r=["hover","focus"],...p})=>{if(!o&&!l)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(r)||(r=[r]),t&&!Array.isArray(t)&&(t=[t]);const v=a.useRef(null),d=l||v,[f,m]=a.useState(null),[x]=a.useState(Ce()),[w,j]=a.useState(!1),g=a.useRef(null);a.useEffect(()=>{const b=N=>{m(N.detail)};return document.addEventListener("tooltip-update",b),()=>{document.removeEventListener("tooltip-update",b)}},[]),a.useEffect(()=>{g.current&&clearTimeout(g.current),f?j(f===x):g.current=setTimeout(()=>{j(!1)},1200)},[f,x]);const R=()=>{if(r.includes("hover")){const b=new CustomEvent("tooltip-update",{detail:x});document.dispatchEvent(b)}},L=()=>{if(r.includes("hover")){const b=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(b)}},B=()=>{if(r.includes("click")){const b=new CustomEvent("tooltip-update",{detail:w?null:x});document.dispatchEvent(b)}},S=()=>{if(r.includes("focus")){const b=new CustomEvent("tooltip-update",{detail:x});document.dispatchEvent(b)}},F=()=>{if(r.includes("focus")){const b=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(b)}};a.useEffect(()=>{if(d!=null&&d.current){const b=d.current;return b.addEventListener("mouseenter",R),b.addEventListener("mouseleave",L),b.addEventListener("click",B),b.addEventListener("focus",S),b.addEventListener("blur",F),()=>{b.removeEventListener("mouseenter",R),b.removeEventListener("mouseleave",L),b.removeEventListener("click",B),b.removeEventListener("focus",S),b.removeEventListener("blur",F)}}},[d,r,x,w]);const P=!l&&a.isValidElement(o)?a.cloneElement(o,{ref:v}):o;if(!c&&typeof window<"u"&&d!=null&&d.current&&!c){const b=d.current.getBoundingClientRect(),N=window.innerWidth,V=window.innerHeight,Y=b.left/N,T=b.top/V;e==="plain"?Y<1/3?c="right":Y>2/3?c="left":c=T>.5?"top":"bottom":Y<1/2&&T<1/2?c="bottom-right":Y>1/2&&T<1/2?c="bottom-left":Y>1/2&&T>1/2?c="top-left":Y<1/2&&T>1/2&&(c="top-right")}const M=xt({variant:e,buttons:t,className:n,title:s,text:i,position:c,trigger:r,targetRef:l,children:o});return u.jsxs(u.Fragment,{children:[P,u.jsx(A.AnimatePresence,{children:w&&u.jsx(Et,{targetRef:d,children:u.jsx(A.motion.div,{initial:{opacity:f?1:0},animate:{opacity:1},transition:{duration:f?0:.3},exit:{opacity:f?1:0},className:M.toolTip,...p,onMouseEnter:R,onMouseLeave:L,children:u.jsxs(A.motion.div,{className:M.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[s&&u.jsx("div",{className:M.subHead,children:s}),u.jsx("div",{className:M.supportingText,children:i}),t&&u.jsx("div",{className:M.actions,children:Array.isArray(t)&&t.map((b,N)=>u.jsx(he,{size:"small",variant:"text",...b},N))})]})})})})]})},pe=({className:e,label:t,variant:n="primary",size:o="medium",href:s,type:i,icon:c,extended:l=!1,ref:h,transition:r,children:p,...v})=>{if(p&&(t=p),!t)throw new Error("FAB component requires either a label prop or children content");const d=s?"a":"button",f=Qe({href:s,icon:c,extended:l,label:t,size:o,variant:n,className:e,transition:r,children:t});r={duration:.3,...r};const m=a.useRef(null),x=h||m,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...r,opacity:{duration:r.duration/2,delay:r.duration-r.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...r,marginLeft:{duration:r.duration/2,delay:r.duration-r.duration/2}}}};return u.jsxs(d,{...v,ref:x,href:s,"aria-label":l?void 0:t,className:f.fab,children:[u.jsx(Me,{trigger:l?null:void 0,text:t,targetRef:x}),u.jsx(ie,{style:{transition:r.duration+"s"},className:f.stateLayer,colorName:y({"on-primary":n=="primary","on-secondary":n=="secondary","on-tertiary":n=="tertiary","on-primary-container":n=="primaryContainer","on-secondary-container":n=="secondaryContainer","on-tertiary-container":n=="tertiaryContainer"}),stateClassName:"state-ripple-group-[fab]"}),u.jsx(re,{icon:c,className:f.icon}),u.jsx(A.AnimatePresence,{children:l&&u.jsx(A.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:f.label,children:t})})]})},fe=({variant:e="standard",href:t,disabled:n=!1,type:o="button",title:s,label:i,onToggle:c,activated:l=!1,onClick:h,icon:r,size:p="medium",iconSelected:v,className:d,ref:f,width:m="default",shape:x="rounded",allowShapeTransformation:w=!0,transition:j,children:g,...R})=>{if(g&&(i=g),!i)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");s||(s=i);const[L,B]=a.useState(l);let S;c?c&&(S=N=>{n&&N.preventDefault(),B(!L),c(!!L)},r=L&&v||r):S=N=>{n&&N.preventDefault(),h&&h(N)},a.useEffect(()=>{B(l)},[l]);const F=t?"a":"button",P=tt({transition:j,shape:x,allowShapeTransformation:w,width:m,href:t,activated:L,label:i,iconSelected:v,isActive:L,onToggle:c,disabled:n,icon:r,variant:e,className:d,size:p,children:i,...R}),M=a.useRef(null),b=f||M;return j={duration:.3,...j},u.jsxs(F,{disabled:n,href:t,style:{transition:j.duration+"s"},className:P.iconButton,"aria-label":i,...R,title:void 0,onClick:S,ref:b,children:[u.jsx(Me,{targetRef:b,trigger:n?null:void 0,text:s}),u.jsx("div",{className:P.touchTarget}),u.jsx(ie,{style:{transition:j.duration+"s"},className:P.stateLayer,colorName:y(e==="standard"&&{"on-surface-variant":!L,"on-primary":L},e==="filled"&&{"on-surface-variant":!L&&!!c,"on-primary":L||!c},e==="tonal"&&{"on-secondary":L&&!!c,"on-secondary-container":!L||!c},e==="outlined"&&{"inverse-on-surface":L&&!!c,"on-surface-variant":!L||!c}),stateClassName:"state-ripple-group-[icon-button]"}),r&&u.jsx(re,{icon:r,className:P.icon})]})};/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),Pe=require("clsx"),Mt=require("tailwind-merge"),a=require("react"),A=require("motion/react"),kt=require("motion"),We=require("react-dom"),me=require("@udixio/theme"),Fe=require("@udixio/tailwind"),Rt=require("react-textarea-autosize"),Ve=Mt.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),y=(...e)=>Ve(Pe.clsx(e)),Oe=(...e)=>Ve(Pe.clsx(e));function $t(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 ye=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 c=o(e.states);Object.entries(c).map(i=>{const[l,d]=i;(t[l]??(t[l]=[])).push(d)})}});const n=t;return Object.entries(t).map(o=>{let[r,c]=o;c=c.reverse(),r==e.default&&c.unshift("relative"),c.unshift($t(r)),n[r]=Oe(...c)}),n},K=(e,t)=>n=>ye({classNameList:[n.className,t],default:e,states:n}),Y=(e,t)=>n=>a.useMemo(()=>ye({classNameList:[n.className,t],default:e,states:n}),[n]);function At(e,t,n){return a.useMemo(()=>ye({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const He=({variant:e,disableTextMargins:t,disabled:n,iconPosition:o,icon:r,isActive:c,loading:i,shape:l,onToggle:d,size:s,allowShapeTransformation:p})=>({button:y(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",s==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",s==="small"&&"text-label-large px-4 py-2.5 gap-2",s==="medium"&&"text-title-medium px-6 py-4 gap-2",s==="large"&&"text-headline-small px-12 py-8 gap-3",s==="xLarge"&&"text-headline-large px-16 py-12 gap-4",l==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(l==="squared"||p&&c)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},p&&!n&&{"active:rounded-[12px]":s==="xSmall"||s=="small","active:rounded-[16px]":s==="medium","active:rounded-[28px]":s==="large"||s=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!c,"bg-primary text-on-primary":!n&&c,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!c&&d,"bg-primary text-on-primary":!n&&(c&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!c,"bg-secondary text-on-secondary":!n&&c,"text-on-surface/[0.38]":n},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":n,"text-primary border-outline focus:border-primary":!n&&!c,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&c}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[s==="xSmall"&&"-mx-3 ",s==="small"&&"-mx-4 ",s==="medium"&&"-mx-6 ",s==="large"&&"-mx-12",s==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("overflow-hidden",l==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(l==="squared"||p&&c)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},p&&!n&&{"group-active/button:rounded-[12px]":s==="xSmall"||s=="small","group-active/button:rounded-[16px]":s==="medium","group-active/button:rounded-[28px]":s==="large"||s=="xLarge"}),label:y({invisible:i}),icon:y({invisible:i},s==="xSmall"&&"size-5",s==="small"&&"size-5",s==="medium"&&"size-6",s==="large"&&"size-8",s==="xLarge"&&"size-10")}),Bt=K("button",He),qe=Y("button",He),Ue=({variant:e,isInteractive:t})=>({card:y("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")}),Dt=K("card",Ue),Xe=Y("card",Ue),Ee=({width:e})=>({carouselItem:y("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),Pt=K("carouselItem",Ee),Ye=Y("carouselItem",Ee),_e=()=>({carousel:y(["w-full h-[400px]"]),track:y("flex h-full w-full")}),Wt=K("carousel",_e),Ke=Y("carousel",_e),Ge=({orientation:e})=>({divider:y("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),Ft=K("divider",Ge),Je=Y("divider",Ge),Ze=({size:e,variant:t,extended:n})=>({fab:y("flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small","rounded-[16px]":e=="medium","rounded-[28px]":e=="large"},{"p-2":e=="small","p-4":e=="medium","p-[30px]":e=="large"},t==="primary"&&"bg-primary text-on-primary",t==="secondary"&&"bg-secondary text-on-secondary",t==="tertiary"&&"bg-tertiary text-on-tertiary",t==="primaryContainer"&&"bg-primary-container text-on-primary-container",t==="secondaryContainer"&&"bg-secondary-container text-on-secondary-container",t==="tertiaryContainer"&&"bg-tertiary-container text-on-tertiary-container"),icon:y({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:y("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),Vt=K("fab",Ze),Qe=Y("fab",Ze),Te=({size:e,variant:t,open:n})=>({fabMenu:y("relative inline-flex flex-col items-end"),actions:y("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0")}),Ot=K("fabMenu",Te),ze=Y("fabMenu",Te),et=({variant:e,disabled:t,onToggle:n,isActive:o,size:r,width:c,shape:i,allowShapeTransformation:l})=>({iconButton:y("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},i==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(i==="squared"||l&&o)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"active:rounded-[12px]":r==="xSmall"||r=="small","active:rounded-[16px]":r==="medium","active:rounded-[28px]":r==="large"||r=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!o&&!!n,"bg-primary":o||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-secondary-container text-on-secondary-container":!o&&!!n,"bg-secondary text-on-secondary":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:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("absolute top-0 left-0 h-full w-full overflow-hidden",(i==="rounded"||i==="squared"&&n&&!t&&o&&l)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(i==="squared"||i==="rounded"&&n&&!t&&o&&l)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"group-active/icon-button:rounded-[12px]":r==="xSmall"||r=="small","group-active/icon-button:rounded-[16px]":r==="medium","group-active/icon-button:rounded-[28px]":r==="large"||r=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!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:y(" transition-all duration-300",{"size-5 p-1.5":r==="xSmall"},{"size-6 p-2":r==="small"},{"size-6 p-4":r==="medium"},{"size-8 p-8":r==="large"},{"size-10 p-12":r==="xLarge"},c=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],c=="wide"&&[{"px-2.5":r==="xSmall"},{"px-3.5":r==="small"},{"px-6":r==="medium"},{"px-12":r==="large"},{"px-[72px]":r==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!o,"text-primary":o},e==="filled"&&{"text-primary":!o&&!!n,"text-on-primary":o||!n},e==="outlined"&&{"text-on-surface-variant":!o,"text-inverse-on-surface":o}],!!t&&"text-on-surface/[0.38]")}),Ht=K("iconButton",et),tt=Y("iconButton",et),nt=({variant:e,isVisible:t})=>({progressIndicator:y((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:y("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:y({"max-h-0":!t,"max-h-full":t},(e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:y("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),qt=K("progressIndicator",nt),rt=Y("progressIndicator",nt),Le=({variant:e,position:t})=>({sideSheet:y("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-full":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:y("w-full overflow-hidden",{}),content:y("w-fit "),header:y("p-4 flex items-center gap-2"),title:y("text-on-surface-variant text-title-large"),closeButton:y("ml-auto"),divider:y({hidden:e=="modal"}),overlay:y("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),st=K("sideSheet",Le),Ut=Y("sideSheet",Le),Ne=({isChanging:e})=>({slider:y(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:y(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:y(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:y(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:y(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:y(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),Xt=K("slider",Ne),ot=Y("slider",Ne),at=()=>({snackbar:y(" rounded bg-inverse-surface "),container:y("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:y("text-body-medium text-inverse-on-surface "),icon:y(" ml-auto mr-0 text-inverse-on-surface block dark")}),Yt=K("snackbar",at),lt=Y("snackbar",at),ct=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:y("group/switch w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:y("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:y("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!n},{"w-[24px] h-[24px]":!(!e&&!n)},!t&&["cursor-pointer group-active/switch:h-[28px] group-active/switch:w-[28px]",{"bg-on-primary group-hover/switch:bg-primary-container":e},{"bg-outline group-hover/switch:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:y("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:y("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),_t=K("switch",ct),it=Y("switch",ct),ut=({isSelected:e,icon:t,label:n,variant:o})=>({tab:y("flex-1 group/tab 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:y("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/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface":!e,"group-hover/tab:hover-state-primary group-focus-visible/tab:focus-state-primary":e},o==="secondary"&&"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"),content:y("flex gap-0.5 h-full justify-center",{relative: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:y("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:y("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:y("bg-primary absolute w-full left-0 bottom-0",o==="primary"&&"h-[3px] rounded-t",o==="secondary"&&"h-0.5")}),Kt=K("tab",ut),dt=Y("tab",ut),ft=({scrollable:e})=>({tabs:y("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Gt=K("tabs",ft),mt=Y("tabs",ft),ht=({disabled:e,leadingIcon:t,trailingIcon:n,variant:o,errorText:r,isFocused:c,value:i,suffix:l,textLine:d})=>({textField:y({"opacity-[.38]":e}),content:y("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":d=="singleLine"},{"border-on-surface-variant":!(r!=null&&r.length)&&!c&&o=="filled","border-outline":!(r!=null&&r.length)&&!c&&o=="outlined","border-primary":!(r!=null&&r.length)&&c,"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]":c}]),stateLayer:y("absolute -z-10 w-full h-full top-0 left-0",{hidden:o=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":c}),label:y("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"text-error":!!(r!=null&&r.length)},{"text-primary":!(r!=null&&r.length)&&c}),input:y("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!l},o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10"),activeIndicator:y("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":c}]),supportingText:y(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":c},{"text-error":!!(r!=null&&r.length)}),leadingIcon:y(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!a.isValidElement(t)}]),trailingIcon:y("h-12 w-12 flex items-center justify-center",{"cursor-text":!a.isValidElement(n)}),suffix:y("text-on-surface-variant pl-0 pr-4",o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10")}),Jt=K("textField",ht),pt=Y("textField",ht),yt=({position:e,variant:t})=>({toolTip:y(" 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:y("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:y("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:y("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:y("")}),Zt=K("toolTip",yt),xt=Y("toolTip",yt),re=({icon:e,colors:t=[],className:n})=>{if(typeof e=="string"){let s=e;return t[0]&&(s=s.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),s=s.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),u.jsx("div",{className:y("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:s}})}if(e&&typeof e=="object"&&"src"in e){const s=e;return u.jsx("img",{src:s.src,width:s.width,height:s.height,className:y("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const o=e;if(!(o!=null&&o.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:r}=o,[c,i,,,l]=r||[],d=s=>{switch(s.length){case 2:return{"--fa-primary-color":s[0]||"inherit","--fa-secondary-color":s[1]||"inherit"};case 1:return{color:s[0]};default:return{}}};return u.jsx("svg",{className:y("size-5 box-content",n),style:{...d(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${c} ${i}`,role:"img","aria-hidden":"true",children:typeof l=="string"?u.jsx("path",{className:"fill-current",d:l}):l.map((s,p)=>u.jsx("path",{d:s},p))})},vt=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:o,...r})=>{const[c,i]=a.useState(t),[l]=a.useState(1.5);a.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),i(t)},[t]);const[d,s]=a.useState(!0),p=()=>d?l:l*.5;a.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&c!==100){const h=setInterval(()=>{i(d?10:90),s(!d)},p()*1e3);return()=>clearInterval(h)}},[e,d,c]);const[v,f]=a.useState(!1);a.useEffect(()=>{if(c>=100){const h=setTimeout(()=>{f(!1)},n);return()=>{clearTimeout(h)}}else f(!0)},[c,n]);const m=rt({className:o,variant:e,value:t,transitionDuration:n,isVisible:v});return u.jsxs(u.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&u.jsxs("div",{className:m.progressIndicator,...r,children:[u.jsx("div",{style:{width:`${c}%`,transition:`width ${n}ms ease-in-out ${c==100?", max-height 200ms 0.5s ease-in-out":""}`},className:m.track}),u.jsx("div",{style:{marginLeft:c!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${c==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:m.activeIndicator}),u.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")&&u.jsx(A.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:p(),ease:"linear"},className:m.progressIndicator,...r,children:u.jsx(A.motion.circle,{cx:"50%",cy:"50%",r:v?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:m.activeIndicator,variants:{hidden:{pathLength:d?10/100:90/100},visible:{pathLength:d?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:p(),bounce:0}}})},d+"")]})},wt=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:1,"--r":"25%"},animate:{opacity:1,"--r":"100%",transition:{duration:.5}},exit:{opacity:0,"--r":"100%",transition:{duration:.3}}},[o,r]=a.useState(!0),[c,i]=a.useState(!1),[l,d]=a.useState({x:50,y:50});a.useEffect(()=>{c&&(r(!0),r(!1))},[c]),a.useEffect(()=>{const h=t==null?void 0:t.current;if(h)return h.addEventListener("mousedown",s),h.addEventListener("mouseup",v),h.addEventListener("mouseleave",p),()=>{h.removeEventListener("mousedown",s),h.removeEventListener("mouseup",v),h.removeEventListener("mouseleave",p)}},[t]);const s=h=>{const x=t==null?void 0:t.current,w=x.getBoundingClientRect();i(!0),d({x:(h.clientX-w.left)/x.clientWidth*100,y:(h.clientY-w.top)/x.clientHeight*100})},p=h=>{i(!1)},v=h=>{i(!1)},f=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,m={position:"absolute",inset:0,width:"100%",height:"100%","--x":l.x+"%","--y":l.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${f} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return u.jsx(A.AnimatePresence,{mode:"wait",children:(c||!c&&!o)&&u.jsx(A.motion.div,{style:m,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},gt=K("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:y("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":n,"[&::-webkit-scrollbar-thumb]:bg-transparent":!n},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!n,"cursor-grabbing":t&&n}),track:y("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function Qt(e,t){let n=0,o=null,r=null;const c=(i,l)=>{n=Date.now(),t(i,l)};return(i,l)=>{const d=Date.now(),s=e-(d-n);s<=0?(o&&(clearTimeout(o),o=null),c(i,l)):(r={v:i,o:l},o||(o=setTimeout(()=>{o=null;const p=r;r=null,p&&c(p.v,p.o)},s)))}}const bt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:o,className:r,draggable:c=!1,throttleDuration:i=75,scroll:l,setScroll:d})=>{var te,oe;const s=a.useRef(null),p=a.useRef(null),[v,f]=a.useState({width:null,height:null});a.useEffect(()=>{if(!s.current)return;const M=new ResizeObserver(E=>{for(const $ of E)$.target===s.current&&f({width:$.contentRect.width,height:$.contentRect.height})});return M.observe(s.current),()=>{M.disconnect()}},[s]);const m=a.useRef(null),h=a.useRef(null),x=()=>{const M=p.current;return M?{width:n??M.scrollWidth,height:n??M.scrollHeight}:null},w=()=>{const M=s.current;return M?{width:M.clientWidth,height:M.clientHeight}:null},{scrollYProgress:j,scrollXProgress:b}=A.useScroll({container:s}),N=a.useRef(null);N.current||(N.current=Qt(i,(M,E)=>{!h.current||!m.current||!s.current||(E===(t==="horizontal"?"x":"y")&&(d==null||d(M)),o&&(t==="horizontal"&&E==="x"&&o({scrollProgress:M,scroll:M*(m.current.width-s.current.clientWidth),scrollTotal:m.current.width-s.current.clientWidth,scrollVisible:h.current.width}),t==="vertical"&&E==="y"&&o({scrollProgress:M,scroll:M*(m.current.height-s.current.clientHeight),scrollTotal:m.current.height-s.current.clientHeight,scrollVisible:h.current.height})))}));const L=(M,E)=>{N.current&&N.current(M,E)};a.useEffect(()=>{v.width&&L(b.get(),"x"),v.height&&L(j.get(),"y")},[v]),a.useEffect(()=>{const M=s.current,E=p.current;if(!M||!E||typeof l!="number")return;const $=(W,q,H)=>Math.min(H,Math.max(q,W));if(t==="horizontal"){const W=Math.max(0,(n??E.scrollWidth)-M.clientWidth);M.scrollLeft=$(l*W,0,W)}else{const W=Math.max(0,(n??E.scrollHeight)-M.clientHeight);M.scrollTop=$(l*W,0,W)}},[l,t,n]),A.useMotionValueEvent(b,"change",M=>{L(M,"x")}),A.useMotionValueEvent(j,"change",M=>{L(M,"y")});const[B,S]=a.useState(!1);a.useLayoutEffect(()=>{B||!h.current||!m.current||!o||(o({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?m.current.height:m.current.width,scrollVisible:t=="vertical"?h.current.height:h.current.width}),S(!0))},[h,m,o]),m.current=x(),h.current=w();const[V,P]=a.useState(!1),k=gt({isDragging:V,children:e,className:r,onScroll:o,orientation:t,scrollSize:n,draggable:c,throttleDuration:i}),[g,I]=a.useState(0),[F,_]=a.useState(0),G=M=>{if(!c)return;const E=s.current;if(!E||g==null)return;const W=(M.pageX-E.offsetLeft-g)*1.5;E.scrollLeft=F-W},U=M=>{const E=s.current;E&&(P(!0),I(M.pageX-E.offsetLeft),_(E.scrollLeft))},T=M=>{V&&(M.preventDefault(),G(M))},R=()=>{P(!1)},C=()=>{P(!1)},O=M=>{M.preventDefault()},X=a.useRef(null);return a.useEffect(()=>()=>{X.current&&clearTimeout(X.current)},[]),a.useEffect(()=>{const M=s.current;if(!M)return;const E=$=>{var z,ne,ae,se;const W=$.detail,q=s.current;if(!q||!W)return;const H=W.orientation??t;if(typeof W.progress=="number")if(H==="horizontal"){const ee=Math.max(0,(((z=m.current)==null?void 0:z.width)??0)-q.clientWidth);q.scrollLeft=Math.min(ee,Math.max(0,W.progress*ee))}else{const ee=Math.max(0,(((ne=m.current)==null?void 0:ne.height)??0)-q.clientHeight);q.scrollTop=Math.min(ee,Math.max(0,W.progress*ee))}else if(typeof W.scroll=="number")if(H==="horizontal"){const ee=Math.max(0,(((ae=m.current)==null?void 0:ae.width)??0)-q.clientWidth);q.scrollLeft=Math.min(ee,Math.max(0,W.scroll))}else{const ee=Math.max(0,(((se=m.current)==null?void 0:se.height)??0)-q.clientHeight);q.scrollTop=Math.min(ee,Math.max(0,W.scroll))}};return M.addEventListener("udx:customScroll:set",E),()=>{M.removeEventListener("udx:customScroll:set",E)}},[t]),u.jsxs("div",{className:k.customScroll,ref:s,onMouseDown:U,onMouseMove:T,onMouseUp:R,onMouseLeave:C,onDragStart:O,onScroll:M=>{V||(I(null),P(!0),X.current&&clearTimeout(X.current),X.current=setTimeout(()=>{P(!1)},1e3))},children:[u.jsx("div",{ref:p,style:t==="vertical"?{height:((te=h==null?void 0:h.current)==null?void 0:te.height)??"100%"}:{width:((oe=h==null?void 0:h.current)==null?void 0:oe.width)??"100%"},className:k.track,children:e}),h.current&&m.current&&u.jsxs(u.Fragment,{children:[t==="vertical"&&m.current.height>h.current.height&&u.jsx(A.motion.div,{className:"flex-none",style:{height:m.current.height-h.current.height}}),t==="horizontal"&&m.current.width>h.current.width&&u.jsx(A.motion.div,{className:"flex-none",style:{width:m.current.width-h.current.width}})]})]})},Tt=({onScroll:e,el:t,touch:n=!0})=>{const o=a.useRef(null),r=a.useRef(0),c=a.useRef(0);a.useEffect(()=>{if(!t)return;r.current=t.scrollTop,c.current=t.scrollLeft;const i=f=>{e==null||e(f)},l=f=>{f.preventDefault(),i({type:"intent",source:"wheel",deltaX:f.deltaX,deltaY:f.deltaY,originalEvent:f})},d=f=>{if(!n)return;const m=f.touches[0];m&&(o.current={x:m.clientX,y:m.clientY})},s=f=>{if(!n)return;const m=f.touches[0];if(!m||!o.current)return;f.preventDefault();const h=o.current.x-m.clientX,x=o.current.y-m.clientY;o.current={x:m.clientX,y:m.clientY},i({type:"intent",source:"touch",deltaX:h,deltaY:x,originalEvent:f})},p=()=>{n&&(o.current=null)},v=f=>{const h=t.clientHeight*.9;let x=0,w=0;switch(f.key){case"ArrowDown":w=40;break;case"ArrowUp":w=-40;break;case"ArrowRight":x=40;break;case"ArrowLeft":x=-40;break;case"PageDown":w=h;break;case"PageUp":w=-h;break;case"Home":w=Number.NEGATIVE_INFINITY;break;case"End":w=Number.POSITIVE_INFINITY;break;case" ":w=f.shiftKey?-h:h;break;default:return}f.preventDefault(),i({type:"intent",source:"keyboard",deltaX:x,deltaY:w,originalEvent:f})};return t.addEventListener("wheel",l,{passive:!1}),t.addEventListener("touchstart",d,{passive:!0}),t.addEventListener("touchmove",s,{passive:!1}),t.addEventListener("touchend",p,{passive:!0}),t.addEventListener("keydown",v),()=>{t.removeEventListener("wheel",l),t.removeEventListener("touchstart",d),t.removeEventListener("touchmove",s),t.removeEventListener("touchend",p),t.removeEventListener("keydown",v)}},[e])},zt=({transition:e,orientation:t="vertical",throttleDuration:n=25})=>{const[o,r]=a.useState(0),[c,i]=a.useState(),l=a.useRef(!1),d=a.useRef(),s=a.useRef(0);a.useEffect(()=>{i(document);const f=document.documentElement.scrollTop;r(f),s.current=f},[]),a.useEffect(()=>{const f=()=>{l.current||r(document.documentElement.scrollTop)};return c==null||c.addEventListener("scroll",f),()=>{d.current&&clearTimeout(d.current),c==null||c.removeEventListener("scroll",f)}},[c]);const p=a.useRef(),v=a.useRef(null);return a.useEffect(()=>{const f=o;if(v.current&&(v.current.stop(),v.current=null),!l.current){p.current=f;return}return v.current=kt.animate(p.current??f,f,{duration:((e==null?void 0:e.duration)??500)/1e3,ease:(e==null?void 0:e.ease)??"easeOut",onUpdate:m=>{d.current&&clearTimeout(d.current),p.current=m;const h=document.documentElement,x=Math.round(m*1e3)/1e3,w=s.current;Math.abs(x-w)<.1||(s.current=x,l.current&&h.scrollTo({top:x}))},onComplete:()=>{d.current=setTimeout(()=>{l.current=!1},300),v.current=null}}),()=>{v.current&&(v.current.stop(),v.current=null)}},[o]),c?u.jsx(Tt,{touch:!1,el:c,onScroll:f=>{if("deltaY"in f&&f.deltaY!==0&&c&&o!==null){let m=o+f.deltaY;const h=c.querySelector("html");h&&(m=Math.min(m,h.scrollHeight-h.clientHeight)),m=Math.max(m,0),r(m),l.current=!0}}}):null},ie=({style:e,colorName:t,stateClassName:n="state-ripple-group",className:o})=>{const r=a.useRef(null),c=a.useRef(null),[i,l]=a.useState(!1),d=St({isClient:i,stateClassName:n,className:o,colorName:t});return a.useEffect(()=>{if(r.current&&n!=="state-layer"){const s=n.includes("[")?n.split("[")[1].split("]")[0]:"group",p=r.current.closest(`.${s}:not(.${s} .${s})`);c.current=p}l(!0)},[]),u.jsx("div",{ref:r,className:d.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:i&&u.jsx(wt,{triggerRef:c})})},en=({isClient:e,stateClassName:t})=>({stateLayer:y([t,"w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden"])}),St=Y("stateLayer",en),Et=({targetRef:e,children:t})=>{const[n,o]=a.useState(null),r=a.useRef(null),c=()=>{const i=e.current;if(!i)return;const l=i.getBoundingClientRect();o({position:"fixed",top:l.top,left:l.left,width:l.width,height:l.height,pointerEvents:"none",zIndex:999})};return a.useEffect(()=>{const i=e.current;if(i)return c(),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),r.current=new ResizeObserver(c),r.current.observe(i),()=>{var l;window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c),(l=r.current)==null||l.disconnect()}},[e]),n?We.createPortal(u.jsx("div",{style:n,children:t}),document.body):null};function tn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const nn=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:o=!1})=>{const[r,c]=a.useState(null);a.useEffect(()=>{(async()=>{const f=await me.loader(e,o);c(f)})()},[]);const[i,l]=a.useState(null),d=a.useRef(null),s=a.useRef(0),p=a.useRef(null);a.useEffect(()=>{if(!r)return;const f={...e,sourceColor:e.sourceColor},m=Date.now(),h=m-s.current,x=async w=>{await v(w)};if(s.current===0||h>=t)d.current&&(clearTimeout(d.current),d.current=null),p.current=null,s.current=m,x(f);else if(p.current=f,!d.current){const w=Math.max(0,t-h);d.current=setTimeout(async()=>{d.current=null;const j=p.current;p.current=null,j&&(s.current=Date.now(),await x(j))},w)}return()=>{}},[e,t,r]);const v=async f=>{if(typeof f.sourceColor=="string"&&!tn(f.sourceColor))throw new Error("Invalid hex color");if(!r)return;r.context.update(f),await r.load();const m=r==null?void 0:r.plugins.getPlugin(Fe.TailwindPlugin).getInstance().outputCss;l(m),n==null||n(r)};return a.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),i?u.jsx("style",{dangerouslySetInnerHTML:{__html:i}}):null};function rn(){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 sn(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function je(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function ke(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function ge(e,t){if(!je(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const i=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),l=i==="x"||i==="inline"?"inline":i==="y"||i==="block"?"block":"auto";e.classList.contains(`${t}-timeline`)||e.classList.contains(`${t}-timeline-inline`)||e.classList.contains(`${t}-timeline-block`)||e.classList.contains(`${t}-timeline-x`)||e.classList.contains(`${t}-timeline-y`)||(l==="inline"?e.classList.add(`${t}-timeline-inline`):l==="block"?e.classList.add(`${t}-timeline-block`):e.classList.add(`${t}-scroll`))}const n=e.getAttribute(`data-${t}-start`);n&&e.style.setProperty(`--${t}-range-start`,n);const 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`),c=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!c&&e.setAttribute(`data-${t}-run`,"")}function be(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(o=>je(o))}function on(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),o=new Set([`${t}-run`,`${t}-in`,`${t}-out`,`${t}-in-run`,`${t}-out-run`,`${t}-paused`,`${t}-timeline`,`${t}-timeline-inline`,`${t}-timeline-block`,`${t}-timeline-x`,`${t}-timeline-y`,`${t}-scroll`]);return n.filter(r=>{if(!(r instanceof HTMLElement))return!1;const c=r.classList;return c.contains(`${t}-in`)||c.contains(`${t}-out`)||Array.from(c).some(d=>d.startsWith(`${t}-`)&&!d.includes("scroll")&&!o.has(d))?!0:!je(r)})}function an(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function Re(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function $e(e,t,n){const o=e.style.animationName;e.style.animationName="none",e.removeAttribute(`data-${t}-run`),n?e.removeAttribute(`data-${t}-${n}-run`):(e.removeAttribute(`data-${t}-in-run`),e.removeAttribute(`data-${t}-out-run`)),e.offsetWidth,e.style.animationName=o}const ln=[0,.2],Ae=new WeakSet;function Be(e,t){if(Ae.has(e))return;Ae.add(e);const n=r=>{r.target===e&&(e.hasAttribute(`data-${t}-in-run`)||e.hasAttribute(`data-${t}-out-run`))&&e.setAttribute(`data-${t}-animating`,"")},o=r=>{r.target===e&&e.removeAttribute(`data-${t}-animating`)};e.addEventListener("animationstart",n),e.addEventListener("animationend",o),e.addEventListener("animationcancel",o)}function Ie(e={}){const{prefix:t="anim",once:n=!0}=e;if(sn())return()=>{};const o=rn(),r=new WeakSet;let c=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,i=!0;const l=()=>{const m=window.pageYOffset||window.scrollY||0;i=m>=c,c=m};typeof window<"u"&&window.addEventListener("scroll",l,{passive:!0});const d=new IntersectionObserver(m=>{for(const h of m){const x=h.target;if(!ke(x)||x.hasAttribute(`data-${t}-animating`))continue;const w=an(x.classList,t);h.isIntersecting?(w&&$e(x,t,"out"),Re(x,t,"in"),n&&d.unobserve(x)):n||(i||$e(x,t,"in"),w&&Re(x,t,"out"))}},{threshold:ln}),s=m=>{const h=on(m||document,t);for(const x of h)r.has(x)||(r.add(x),d.observe(x),Be(x,t))};s();let p,v=null,f=null;if(o)(()=>{f==null&&(f=requestAnimationFrame(()=>{f=null;const h=be(void 0,t);for(const x of h)ge(x,t)}))})(),v=new MutationObserver(h=>{for(const x of h)if(x.type==="attributes"){const w=x.target;w instanceof HTMLElement&&(ge(w,t),ke(w)&&(r.has(w)||(r.add(w),d.observe(w),Be(w,t))))}else if(x.type==="childList"&&x.addedNodes&&x.addedNodes.length){for(const w of Array.from(x.addedNodes))if(w instanceof HTMLElement){const j=be(w,t);for(const b of j)ge(b,t);s(w)}}}),v.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`]}),p=()=>{f!=null&&cancelAnimationFrame(f),v&&v.disconnect()};else{let m;be(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(x=>{m=x.initScrollViewFallback({once:n})}),p=()=>{typeof m=="function"&&m()}}return()=>{p&&p(),typeof window<"u"&&window.removeEventListener("scroll",l),d.disconnect()}}const cn=Ie,un=Ie;function dn(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const he=({variant:e="filled",disabled:t=!1,icon:n,href:o,label:r,disableTextMargins:c,className:i,iconPosition:l="left",loading:d=!1,shape:s="rounded",onClick:p,onToggle:v,activated:f,ref:m,size:h="medium",allowShapeTransformation:x=!0,transition:w,children:j,...b})=>{if(j&&(r=j),!r)throw new Error("Button component requires either a label prop or children content");e=dn(e);const N=o?"a":"button",L=a.useRef(null),B=m||L,[S,V]=a.useState(f);a.useEffect(()=>{V(f)},[f]),w={duration:.3,...w};let P;v?v&&(P=I=>{t&&I.preventDefault();const F=!S;V(F),v(F)}):P=I=>{t&&I.preventDefault(),p&&p(I)};const k=qe({allowShapeTransformation:x,size:h,disableTextMargins:c,shape:s,href:o,disabled:t,icon:n,iconPosition:l,loading:d,variant:e,transition:w,className:i,isActive:S??!1,onToggle:v,activated:S,label:r,children:r}),g=n?u.jsx(re,{icon:n,className:k.icon}):u.jsx(u.Fragment,{});return u.jsxs(N,{ref:B,href:o,className:k.button,...b,onClick:P,disabled:t,"aria-pressed":v?S:void 0,style:{transition:w.duration+"s"},children:[u.jsx("div",{className:k.touchTarget}),u.jsx(ie,{style:{transition:w.duration+"s"},className:k.stateLayer,colorName:y(e==="filled"&&{"on-surface-variant":!S&&!!v,"on-primary":S||!v},e==="elevated"&&{"on-primary":S&&!!v,primary:!S||!v},e==="tonal"&&{"on-secondary":S&&!!v,"on-secondary-container":!S||!v},e==="outlined"&&{"inverse-on-surface":S&&!!v,"on-surface-variant":!S||!v},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),l==="left"&&g,d&&u.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:u.jsx(vt,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:y({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),u.jsx("span",{className:k.label,children:r}),l==="right"&&g]})},fn=({variant:e="outlined",className:t,children:n,isInteractive:o=!1,ref:r,...c})=>{const i=Xe({className:t,isInteractive:o,variant:e,children:n}),l=a.useRef(null),d=r||l;return u.jsxs("div",{...c,ref:d,className:i.card,children:[o&&u.jsx(ie,{className:i.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},ce=(e,t,n=[0,1])=>{const[o,r]=t,[c,i]=n,d=(Math.max(o,Math.min(e,r))-o)/(r-o);return c+d*(i-c)},Lt=({className:e,children:t,width:n,index:o=0,outputRange:r,ref:c,...i})=>{const l=a.useRef(null),d=c||l,s=Ye({className:e,index:o,width:n,children:t,outputRange:r});return u.jsx("div",{ref:d,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:s.carouselItem,...i,children:t})},mn=({variant:e="hero",className:t,children:n,ref:o,marginPourcent:r=0,inputRange:c=[.21,.65],outputRange:i=[42,300],gap:l=8,onChange:d,onMetricsChange:s,index:p,scrollSensitivity:v=1.25,...f})=>{const m=a.useRef(null),h=o||m,[x,w]=a.useState(0),j=Ke({index:p,className:t,children:n,variant:e,inputRange:c,outputRange:i,marginPourcent:r,onChange:d,gap:l,scrollSensitivity:v,onMetricsChange:s}),b=a.Children.toArray(n).filter(E=>a.isValidElement(E)&&E.type===Lt),N=a.useRef(null),[L,B]=a.useState({}),[S,V]=a.useState(null),P=a.useRef(0),k=a.useRef(null),g=()=>{var le,ue;if(!N.current||!h.current||(S==null?void 0:S.scrollProgress)===void 0)return[];const E=(S==null?void 0:S.scrollVisible)??((le=h.current)==null?void 0:le.clientWidth)??0;function $(D,J){return D.map((Q,de)=>{const we=(Q-J)/Math.abs(D[1]-D[0]);return{itemScrollXCenter:Q,relativeIndex:we,index:de,width:0}})}const W=b.map((D,J)=>{if(!I[J].current||!N.current)return 0;const de=J/(b.length-1);return ce(de,[0,1],[0,1])}),q=$(W,(S==null?void 0:S.scrollProgress)??0).sort((D,J)=>D.index-J.index);let H=(((ue=h.current)==null?void 0:ue.clientWidth)??E)+l+i[0]+l;const z=q.sort((D,J)=>Math.abs(D.relativeIndex)-Math.abs(J.relativeIndex)).map((D,J)=>{if(!(H<=0)){if(J==0&&_(D.index),D.width=ce(H-l,[i[0],i[1]],[i[0],i[1]]),H-=D.width+l,H!=0&&H<(i[0]+l)*2){const Q=D.width-((i[0]+l)*2-H);H+=D.width,D.width=Q,H-=D.width}else if(H==0&&D.width>=i[0]*2+l){const Q=D.width-(i[0]+l-H);H+=D.width,D.width=Q,H-=D.width}return D}}).filter(Boolean),ne=z.reverse(),ae=[...z].sort((D,J)=>Math.abs(D.index)-Math.abs(J.index));ne.forEach((D,J)=>{const Q=ne[J+1];if(!Q)return;const de=1-(Math.abs(D.relativeIndex)-Math.abs(Q==null?void 0:Q.relativeIndex)),we=ce(de,[0,2],[D.width+H,Q.width]);H+=D.width,D.width=we,H-=D.width});const se=z.length/2,ee=ce(Math.abs(ae[0].relativeIndex),[ae[0].index==0?0:se-1,se],[0,1]),ve=ce(ee,[0,1],[0,1])*-(i[0]+l);return w(ve),Object.fromEntries(z.map(D=>[D.index,D.width]))},I=a.useRef([]).current,[F,_]=a.useState(0);a.useEffect(()=>{d&&d(F)},[F]),a.useEffect(()=>{typeof p=="number"&&b.length>0&&p!==F&&T(p)},[p,b.length]),a.useEffect(()=>{U(F)},[F]),I.length!==b.length&&b.forEach((E,$)=>{I[$]||(I[$]=a.createRef())});const[G,U]=a.useState(0),T=(E,$={})=>{if(!b.length)return 0;const W=I[E];if(!W||!W.current||!N.current)return 0;const q=ce(E/Math.max(1,b.length-1),[0,1],[0,1]);return U(E),N.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:q,orientation:"horizontal",animate:$.animate!==!1}})),q},R=b.map((E,$)=>{var z;const W=(z=E.props)==null?void 0:z.onClick,q=ne=>{W==null||W(ne)},H=()=>U($);return a.cloneElement(E,{width:L[$],outputRange:i,ref:I[$],key:$,index:$,role:"option","aria-selected":F===$,tabIndex:F===$?0:-1,onClick:q,onFocus:H})}),C=E=>{var $;if(E.scrollTotal>0){($=k.current)==null||$.stop();const W=P.current??0,q=E.scrollProgress??0;k.current=A.animate(W,q,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:H=>{P.current=H,V({...E,scrollProgress:H})}})}};a.useEffect(()=>{const E=g();B(E)},[S]);const O=a.useRef(s);a.useEffect(()=>{O.current=s},[s]);const X=a.useRef(null);a.useEffect(()=>{var J;const E=O.current;if(!E||!(h!=null&&h.current))return;const $=b.length;if($<=0)return;const W=((J=h.current)==null?void 0:J.clientWidth)??0,q=i[1],H=P.current??(S==null?void 0:S.scrollProgress)??0,z=(W+l)/(q+l),ne=Math.max(1,Math.floor(z)),ae=Math.max(1,Math.round(ne*(2/3))),se=Math.min(Math.max(0,F),Math.max(0,$-1)),ee=se>0,ve=se<$-1,le={total:$,selectedIndex:se,visibleApprox:z,visibleFull:ne,stepHalf:ae,canPrev:ee,canNext:ve,scrollProgress:H,viewportWidth:W,itemMaxWidth:q,gap:l},ue=X.current;let D=!ue;if(!D){for(const Q in le)if(le[Q]!==ue[Q]){D=!0;break}}D&&(X.current=le,E(le))},[h,b.length,F,S,l,i]),a.useEffect(()=>()=>{var E;(E=k.current)==null||E.stop()},[]);const[te,oe]=a.useState(0);a.useLayoutEffect(()=>{let E=i[1];S&&E>S.scrollVisible&&(E=S.scrollVisible);const $=(E+l)*R.length/v;oe($)},[h,I,S]);const M=E=>{if(!b.length)return;const $=G??F;switch(E.key){case"ArrowLeft":E.preventDefault(),T(Math.max(0,$-1));break;case"ArrowRight":E.preventDefault(),T(Math.min(b.length-1,$+1));break;case"Home":E.preventDefault(),T(0);break;case"End":E.preventDefault(),T(b.length-1);break;case"Enter":case" ":E.preventDefault(),T($);break}};return a.useEffect(()=>{const E=h.current;if(!E)return;const $=W=>{const q=W.detail;q&&typeof q.index=="number"&&T(q.index)};return E.addEventListener("udx:carousel:centerIndex",$),()=>{E.removeEventListener("udx:carousel:centerIndex",$)}},[h,b.length]),u.jsx("div",{className:j.carousel,ref:h,role:"listbox","aria-orientation":"horizontal",onKeyDown:M,...f,children:u.jsx(bt,{draggable:!0,orientation:"horizontal",onScroll:C,scrollSize:te,children:u.jsx("div",{className:j.track,ref:N,style:{gap:`${l}px`,translate:x,willChange:"translate"},children:R})})})},Nt=({orientation:e="horizontal",className:t,...n})=>{const o=Je({orientation:e,className:t});return u.jsx("hr",{className:o.divider,...n})},Z=[];for(let e=0;e<256;++e)Z.push((e+256).toString(16).slice(1));function hn(e,t=0){return(Z[e[t+0]]+Z[e[t+1]]+Z[e[t+2]]+Z[e[t+3]]+"-"+Z[e[t+4]]+Z[e[t+5]]+"-"+Z[e[t+6]]+Z[e[t+7]]+"-"+Z[e[t+8]]+Z[e[t+9]]+"-"+Z[e[t+10]]+Z[e[t+11]]+Z[e[t+12]]+Z[e[t+13]]+Z[e[t+14]]+Z[e[t+15]]).toLowerCase()}let Se;const pn=new Uint8Array(16);function yn(){if(!Se){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Se=crypto.getRandomValues.bind(crypto)}return Se(pn)}const xn=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),De={randomUUID:xn};function Ce(e,t,n){var r;if(De.randomUUID&&!e)return De.randomUUID();e=e||{};const o=e.random??((r=e.rng)==null?void 0:r.call(e))??yn();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,hn(o)}const Me=({variant:e="plain",buttons:t,className:n,children:o,title:r,text:c,position:i,targetRef:l,ref:d,trigger:s=["hover","focus"],...p})=>{if(!o&&!l)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(s)||(s=[s]),t&&!Array.isArray(t)&&(t=[t]);const v=a.useRef(null),f=l||v,[m,h]=a.useState(null),[x]=a.useState(Ce()),[w,j]=a.useState(!1),b=a.useRef(null);a.useEffect(()=>{const g=I=>{h(I.detail)};return document.addEventListener("tooltip-update",g),()=>{document.removeEventListener("tooltip-update",g)}},[]),a.useEffect(()=>{b.current&&clearTimeout(b.current),m?j(m===x):b.current=setTimeout(()=>{j(!1)},1200)},[m,x]);const N=()=>{if(s.includes("hover")){const g=new CustomEvent("tooltip-update",{detail:x});document.dispatchEvent(g)}},L=()=>{if(s.includes("hover")){const g=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(g)}},B=()=>{if(s.includes("click")){const g=new CustomEvent("tooltip-update",{detail:w?null:x});document.dispatchEvent(g)}},S=()=>{if(s.includes("focus")){const g=new CustomEvent("tooltip-update",{detail:x});document.dispatchEvent(g)}},V=()=>{if(s.includes("focus")){const g=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(g)}};a.useEffect(()=>{if(f!=null&&f.current){const g=f.current;return g.addEventListener("mouseenter",N),g.addEventListener("mouseleave",L),g.addEventListener("click",B),g.addEventListener("focus",S),g.addEventListener("blur",V),()=>{g.removeEventListener("mouseenter",N),g.removeEventListener("mouseleave",L),g.removeEventListener("click",B),g.removeEventListener("focus",S),g.removeEventListener("blur",V)}}},[f,s,x,w]);const P=!l&&a.isValidElement(o)?a.cloneElement(o,{ref:v}):o;if(!i&&typeof window<"u"&&f!=null&&f.current&&!i){const g=f.current.getBoundingClientRect(),I=window.innerWidth,F=window.innerHeight,_=g.left/I,G=g.top/F;e==="plain"?_<1/3?i="right":_>2/3?i="left":i=G>.5?"top":"bottom":_<1/2&&G<1/2?i="bottom-right":_>1/2&&G<1/2?i="bottom-left":_>1/2&&G>1/2?i="top-left":_<1/2&&G>1/2&&(i="top-right")}const k=xt({variant:e,buttons:t,className:n,title:r,text:c,position:i,trigger:s,targetRef:l,children:o});return u.jsxs(u.Fragment,{children:[P,u.jsx(A.AnimatePresence,{children:w&&u.jsx(Et,{targetRef:f,children:u.jsx(A.motion.div,{initial:{opacity:m?1:0},animate:{opacity:1},transition:{duration:m?0:.3},exit:{opacity:m?1:0},className:k.toolTip,...p,onMouseEnter:N,onMouseLeave:L,children:u.jsxs(A.motion.div,{className:k.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[r&&u.jsx("div",{className:k.subHead,children:r}),u.jsx("div",{className:k.supportingText,children:c}),t&&u.jsx("div",{className:k.actions,children:Array.isArray(t)&&t.map((g,I)=>u.jsx(he,{size:"small",variant:"text",...g},I))})]})})})})]})},pe=({className:e,label:t,variant:n="primary",size:o="medium",href:r,type:c,icon:i,extended:l=!1,ref:d,transition:s,children:p,...v})=>{if(p&&(t=p),!t)throw new Error("FAB component requires either a label prop or children content");const f=r?"a":"button",m=Qe({href:r,icon:i,extended:l,label:t,size:o,variant:n,className:e,transition:s,children:t});s={duration:.3,...s};const h=a.useRef(null),x=d||h,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...s,opacity:{duration:s.duration/2,delay:s.duration-s.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...s,marginLeft:{duration:s.duration/2,delay:s.duration-s.duration/2}}}};return u.jsxs(f,{...v,ref:x,href:r,"aria-label":l?void 0:t,className:m.fab,children:[u.jsx(Me,{trigger:l?null:void 0,text:t,targetRef:x}),u.jsx(ie,{style:{transition:s.duration+"s"},className:m.stateLayer,colorName:y({"on-primary":n=="primary","on-secondary":n=="secondary","on-tertiary":n=="tertiary","on-primary-container":n=="primaryContainer","on-secondary-container":n=="secondaryContainer","on-tertiary-container":n=="tertiaryContainer"}),stateClassName:"state-ripple-group-[fab]"}),u.jsx(re,{icon:i,className:m.icon}),u.jsx(A.AnimatePresence,{children:l&&u.jsx(A.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:m.label,children:t})})]})},fe=({variant:e="standard",href:t,disabled:n=!1,type:o="button",title:r,label:c,onToggle:i,activated:l=!1,onClick:d,icon:s,size:p="medium",iconSelected:v,className:f,ref:m,width:h="default",shape:x="rounded",allowShapeTransformation:w=!0,transition:j,children:b,...N})=>{if(b&&(c=b),!c)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");r||(r=c);const[L,B]=a.useState(l);let S;i?i&&(S=I=>{n&&I.preventDefault(),B(!L),i(!!L)},s=L&&v||s):S=I=>{n&&I.preventDefault(),d&&d(I)},a.useEffect(()=>{B(l)},[l]);const V=t?"a":"button",P=tt({transition:j,shape:x,allowShapeTransformation:w,width:h,href:t,activated:L,label:c,iconSelected:v,isActive:L,onToggle:i,disabled:n,icon:s,variant:e,className:f,size:p,children:c,...N}),k=a.useRef(null),g=m||k;return j={duration:.3,...j},u.jsxs(V,{disabled:n,href:t,style:{transition:j.duration+"s"},className:P.iconButton,"aria-label":c,...N,title:void 0,onClick:S,ref:g,children:[u.jsx(Me,{targetRef:g,trigger:n?null:void 0,text:r}),u.jsx("div",{className:P.touchTarget}),u.jsx(ie,{style:{transition:j.duration+"s"},className:P.stateLayer,colorName:y(e==="standard"&&{"on-surface-variant":!L,"on-primary":L},e==="filled"&&{"on-surface-variant":!L&&!!i,"on-primary":L||!i},e==="tonal"&&{"on-secondary":L&&!!i,"on-secondary-container":!L||!i},e==="outlined"&&{"inverse-on-surface":L&&!!i,"on-surface-variant":!L||!i}),stateClassName:"state-ripple-group-[icon-button]"}),s&&u.jsx(re,{icon:s,className:P.icon})]})};/*!
|
|
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 vn={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},xe={prefix:"fas",iconName:"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"]},wn=xe,bn={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 gn=({className:e,label:t,variant:n="primary",size:o="medium",href:s,type:i,icon:c,extended:l=!1,ref:h,transition:r,children:p,open:v,defaultOpen:d=!1,onOpenChange:f,...m})=>{r={duration:.3,ease:"easeInOut",...r};const x=a.useRef(null),w=h||x,j=typeof v=="boolean",[g,R]=a.useState(d),L=j?v:g,B=N=>{j||R(N),f==null||f(N)},S=a.Children.toArray(p).filter(N=>a.isValidElement(N)&&N.type===he),F=ze({href:s,icon:c,extended:l,label:t,size:o,variant:n,className:e,transition:r,children:t,open:L}),P=A.motion.create(pe),M=A.motion.create(fe);A.motion.create(he);const b=N=>u.jsx(P,{icon:c,extended:l,label:t,variant:n+"Container",size:o,className:F.fab+" "+(e??""),"aria-expanded":L,onClick:()=>B(!0),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:r.duration,ease:"easeInOut",borderRadius:{duration:r.duration,ease:"easeInOut"},background:{duration:r.duration,ease:"easeInOut"},...r},...N});return u.jsxs("div",{className:F.fabMenu,ref:w,...m,children:[u.jsx(A.AnimatePresence,{children:L&&u.jsx("div",{className:F.actions,role:"menu","aria-hidden":!L,children:(()=>{const N=S.length;return S.map((V,Y)=>{V.props;const T=N-1-Y,U=((r==null?void 0:r.delay)??0)+T*.06,Z={open:{opacity:1,width:"auto",transition:{...r,delay:U,opacity:{delay:(r==null?void 0:r.duration)/2+U}}},close:{opacity:0,width:0,transition:{...r,delay:U,opacity:{duration:(r==null?void 0:r.duration)/2}}}};return u.jsx(A.motion.div,{initial:"close",animate:"open",className:"overflow-hidden",variants:Z,transition:r,exit:"close",children:a.cloneElement(V,{key:Y,shape:"rounded",variant:"filled",className:()=>({button:y("max-w-full overflow-hidden",{"px-0":!L,"bg-primary-container text-on-primary-container ":n==="primary","bg-secondary-container text-on-secondary-container":n==="secondary","bg-tertiary-container text-on-tertiary-container":n==="tertiary"}),stateLayer:y({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),b({className:"invisible pointer-events-none"}),u.jsxs("div",{className:"absolute right-0 top-0",children:[!L&&b({className:"",layout:!0,layoutId:"fab-menu"}),L&&u.jsx(u.Fragment,{children:u.jsx(M,{layout:!0,layoutId:"fab-menu",variant:"filled",className:()=>({iconButton:y("",{"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:y({"[--default-color:var(--color-on-primary)]":n==="primary","[--default-color:var(--color-on-secondary)]":n==="secondary","[--default-color:var(--color-on-tertiary)]":n==="tertiary"})}),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:r.duration,ease:"easeInOut",borderRadius:{duration:r.duration,ease:"easeInOut"},background:{duration:r.duration,ease:"easeInOut"},...r},icon:wn,onClick:()=>B(!1),children:"Close"})})]})]})},Sn=({className:e,valueFormatter:t,step:n=10,name:o,value:s=0,min:i=0,max:c=100,marks:l=[{value:0,label:"0"},{value:100,label:"100"}],ref:h,onChange:r,...p})=>{const v=k=>{const I=f(),O=d();return k===1/0?100:k===-1/0?0:(k-I)/(O-I)*100},d=(k=!1)=>k?c:c==1/0?l[(l==null?void 0:l.length)-1].value:c,f=(k=!1)=>k?i:i==-1/0?l[0].value:i,m=k=>{const I=f(!1);return(d(!1)-I)*k/100+I},[x,w]=a.useState(!1),j=a.useRef(null),g=h||j,[R,L]=a.useState(s),[B,S]=a.useState(v(s)),[F,P]=a.useState(!1),M=k=>{P(!0),w(!0),V(k)},b=()=>{P(!1),w(!1)};a.useEffect(()=>(F?(window.addEventListener("mouseup",b),window.addEventListener("mousemove",V),window.addEventListener("touchend",b),window.addEventListener("touchmove",V)):(window.removeEventListener("mouseup",b),window.removeEventListener("mousemove",V),window.removeEventListener("touchend",b),window.removeEventListener("touchmove",V)),()=>{window.removeEventListener("mouseup",b),window.removeEventListener("mousemove",V),window.removeEventListener("touchend",b),window.removeEventListener("touchmove",V)}),[F]);const N=ot({className:e,isChanging:x,marks:l,max:c,min:i,name:o,step:n,value:R,valueFormatter:t,onChange:r}),V=k=>{const I=g==null?void 0:g.current;if(I){const O=I.getBoundingClientRect().left,te=((k.type==="touchmove"||k.type==="touchstart"?k.touches[0].clientX:k.clientX)-O)/I.offsetWidth*100;Y({percent:te})}},Y=({percent:k,value:I})=>{if(k){if(k>=100){L(d(!0)),S(100);return}if(k<=0){L(f(!0)),S(0);return}I=m(k),I==f()&&(I=f(!0)),I==d()&&(I=d(!0))}else if(I!=null){if(I>=d()){L(d(!0)),S(100);return}if(I<=f()){L(f(!0)),S(0);return}k=v(I)}else return;n!=null?I=Math.round((I-f())/n)*n+f():l&&(I=l.reduce((O,X,te)=>{let oe=X.value===1/0?d():X.value===-1/0?f():X.value,C=O.value===1/0?d():O.value===-1/0?f():O.value;return oe=Math.abs(oe-I),C=Math.abs(C-I),oe<C?X:O}).value),I>=d()&&(I=d(!0)),I<=f()&&(I=f(!0)),k=v(I),L(I),S(k),r&&r(I)},[T,U]=a.useState(0);a.useEffect(()=>{const k=()=>{g.current&&U(g.current.offsetWidth)};return k(),window.addEventListener("resize",k),()=>{window.removeEventListener("resize",k)}},[]);const Z=k=>{switch(k.key){case"ArrowRight":if(n)Y({value:R+n});else if(l){const I=l.find(O=>O.value>R);I&&Y({value:I.value})}break;case"ArrowLeft":if(n)Y({value:R-n});else if(l){const I=l.slice(0).reverse().find((O,X,te)=>R===1/0?X===1:O.value<R);I&&Y({value:I.value})}break;default:return}};return u.jsxs("div",{tabIndex:0,onKeyDown:Z,role:"slider","aria-valuemin":f(!0),"aria-valuemax":d(!0),"aria-valuenow":R,"aria-valuetext":R.toString(),className:N.slider,onMouseDown:M,onClick:V,ref:g,onTouchStart:M,onDragStart:k=>k.preventDefault(),...p,children:[u.jsx("input",{type:"hidden",name:o,value:R}),u.jsx("div",{className:N.activeTrack,style:{flex:B/100}}),u.jsx("div",{className:N.handle,children:u.jsx(A.AnimatePresence,{children:x&&u.jsx(A.motion.div,{className:N.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(R):R})})}),u.jsx("div",{className:N.inactiveTrack,style:{flex:1-B/100}}),u.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:l&&l.map((k,I)=>{let O=null;const X=(x?9:10)/T*100,te=v(k.value);return te<=B-X?O=!0:te>=B+X&&(O=!1),u.jsx("div",{className:y(N.dot,{"bg-primary-container":O!=null&&O,"bg-primary":O!=null&&!O}),style:{left:`${v(k.value)}%`}},I)})})]})},En=({variant:e="standard",className:t,children:n,title:o,position:s="right",extended:i,divider:c,onExtendedChange:l,closeIcon:h=xe,transition:r,...p})=>{r={duration:.3,...r};const[v,d]=a.useState(i??!0),f=st({transition:r,title:o,position:s,closeIcon:h,className:t,children:n,onExtendedChange:l,divider:c,isExtended:v,extended:v,variant:e});a.useEffect(()=>{l==null||l(v??!1)},[v]),a.useEffect(()=>{i!=null&&d(i)},[i]);const m={close:{width:0},open:{width:"auto"}},x=()=>u.jsxs(u.Fragment,{children:[u.jsx(A.AnimatePresence,{children:e=="modal"&&v&&u.jsx(A.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:r,onClick:()=>d(!1),className:f.overlay})}),u.jsx(A.AnimatePresence,{children:v&&u.jsxs("div",{...p,className:f.sideSheet,style:{transition:r.duration+"s"},children:[u.jsxs(A.motion.div,{variants:m,initial:i===!1?"open":"close",animate:"open",exit:"close",className:f.container,children:[u.jsxs("div",{className:f.header,children:[o&&u.jsx("p",{className:f.title,children:o}),u.jsx(fe,{size:"small",label:"close",icon:h,onClick:()=>d(!1),className:f.closeButton})]}),u.jsx("div",{className:f.content,style:{transition:r.duration+"s"},children:n})]}),(c==null&&e=="standard"?!0:c)&&u.jsx(Nt,{className:f.divider,orientation:"vertical"})]})})]});return e=="modal"?We.createPortal(x(),document.body):x()},Ln=({message:e,className:t,duration:n,closeIcon:o=xe,onClose:s,...i})=>{const[c,l]=a.useState(!0),h=lt({className:t,closeIcon:o,duration:n,isVisible:c,onClose:s,message:e});a.useEffect(()=>{n&&setTimeout(()=>{r()},n)},[n]);const r=()=>{l(!1),s==null||s()};return u.jsx(A.AnimatePresence,{children:c&&u.jsx(A.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:h.snackbar,...i,children:u.jsxs("div",{className:h.container,children:[u.jsx("p",{className:h.supportingText,children:e}),u.jsx(fe,{onClick:()=>r(),className:h.icon,icon:o,label:"close the snackbar"})]})})})},Nn=({selected:e=!1,className:t,activeIcon:n,disabled:o=!1,inactiveIcon:s,onChange:i,onClick:c,onKeyDown:l,ref:h,...r})=>{const[p,v]=a.useState(e),d=g=>{o||(m(),c&&c(g))},f=g=>{o||((g.key===" "||g.key==="Enter")&&(g.preventDefault(),m()),l&&l(g))},m=()=>{v(!p),i==null||i(!p)},x=it({className:t,isSelected:p,activeIcon:n,inactiveIcon:s,disabled:o,selected:p,onChange:i}),w=a.useRef(null),j=h||w;return u.jsxs(A.motion.div,{role:"switch","aria-checked":p,tabIndex:o?-1:0,onKeyDown:f,onClick:d,ref:j,className:x.switch,...r,children:[u.jsx("input",{type:"hidden",value:p?"1":"0"}),u.jsxs(A.motion.div,{layout:!0,style:{translate:p?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:x.handleContainer,children:[u.jsx("div",{className:x.handle,children:(p?n:s)&&u.jsx(re,{className:x.icon,icon:p?n:s})}),u.jsx("div",{className:x.handleStateLayer})]})]})},jt=({className:e,onClick:t,label:n,variant:o="primary",href:s,icon:i,selectedTab:c,setSelectedTab:l,tabsId:h,index:r,onTabSelected:p,scrollable:v=!1,selected:d=!1,ref:f,...m})=>{const x=a.useRef(null),w=f||x,[j,g]=a.useState(d);a.useEffect(()=>{d&&c==null?g(!0):g(c==r&&r!=null)},[c]),a.useEffect(()=>{c==r&&p&&p({ref:w,index:r||0,label:n,icon:i})},[c]);const R=s?"a":"button",L=S=>{l&&l(r??null),t&&t(S)},B=dt({className:e,onTabSelected:p,scrollable:v,selectedTab:c,index:r,tabsId:h,selected:j,variant:o,icon:i,label:n,isSelected:j,setSelectedTab:l,href:s});return u.jsxs(R,{...m,role:"tab","aria-selected":j,ref:w,href:s,className:B.tab,onClick:L,...m,children:[u.jsx(ie,{style:{transition:.3+"s"},className:B.stateLayer,colorName:o==="primary"&&j?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),u.jsxs("span",{className:B.content,children:[i&&u.jsx(re,{icon:i,className:B.icon}),u.jsx("span",{className:B.label,children:n}),j&&u.jsx(A.motion.span,{layoutId:`underline-${h}`,className:B.underline,transition:{duration:.3}})]})]})},jn=({variant:e="primary",onTabSelected:t,children:n,className:o,selectedTab:s,setSelectedTab:i,scrollable:c=!1})=>{const[l,h]=a.useState(null);let r;s==0||s!=null?r=s:r=l;const p=i||h,v=a.Children.toArray(n).filter(w=>a.isValidElement(w)&&w.type===jt),d=a.useRef(null),f=w=>{if(t==null||t(w),c){const j=d.current,g=w.ref.current;if(j&&g){const R=g.offsetLeft+g.offsetWidth/2-j.offsetWidth/2;j.scrollTo({left:R,behavior:"smooth"})}}},m=a.useMemo(()=>Ce(),[]),x=mt({children:n,onTabSelected:t,scrollable:c,selectedTab:r,setSelectedTab:p,className:o,variant:e});return u.jsx("div",{ref:d,role:"tablist",className:x.tabs,children:v.map((w,j)=>a.cloneElement(w,{key:j,index:j,variant:e,selectedTab:r,setSelectedTab:p,tabsId:m,onTabSelected:f,scrollable:c}))})},In=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:o,suffix:s,name:i,label:c,className:l,supportingText:h,trailingIcon:r,leadingIcon:p,type:v="text",textLine:d="singleLine",autoComplete:f="on",onChange:m,value:x,showSupportingText:w=!1,...j})=>{const[g,R]=a.useState(x??""),[L,B]=a.useState(!1),[S,F]=a.useState(!1),[P,M]=a.useState(w);a.useEffect(()=>{R(x??"")},[x]),a.useEffect(()=>{n!=null&&n.length?F(!0):F(!1)},[n]),a.useEffect(()=>{w?M(w):h!=null&&h.length?M(!0):M(!1)},[P,h]),a.useEffect(()=>{L&&F(!1)},[L]);const b=a.useRef(null),N=()=>{b.current&&!L&&b.current.focus()},V=()=>{B(!0)},Y=O=>{const X=O.target.value;R(X),F(!1),typeof m=="function"&&m(X)},T=()=>{B(!1)},U=pt({showSupportingText:P,isFocused:L,showErrorIcon:S,disabled:t,name:i,label:c,autoComplete:f,className:l,onChange:m,placeholder:o,supportingText:h,type:v,leadingIcon:p,trailingIcon:r,variant:e,errorText:n,value:g,suffix:s,textLine:d}),[Z]=a.useState(Ce());let k,I;switch(d){case"multiLine":I=Rt,k={};break;case"textAreas":I="textarea",k={};break;case"singleLine":default:I="input",k={type:v};break}return u.jsxs("div",{className:U.textField,...j,children:[u.jsxs("fieldset",{onClick:N,className:U.content,children:[u.jsx("div",{className:U.stateLayer}),p&&u.jsx("div",{className:U.leadingIcon,children:a.isValidElement(p)?p:u.jsx(re,{className:"w-5 h-5",icon:p})}),!(!L&&!g.length||e=="filled")&&u.jsx(A.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!L&&!g.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:u.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:u.jsx(A.motion.span,{className:U.label,transition:{duration:.3},layoutId:Z,children:c})})}),u.jsxs("div",{className:"flex-1 relative",children:[(!L&&!g.length||e=="filled")&&u.jsx(A.motion.label,{htmlFor:i,className:y("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!L&&!g.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!L&&!g.length))}),transition:{duration:.3},children:u.jsx(A.motion.span,{className:U.label,transition:{duration:.3},layoutId:e=="outlined"?Z:void 0,children:c})}),u.jsx(I,{ref:b,value:g,onChange:Y,className:U.input,id:i,name:i,placeholder:L?o??void 0:"",onFocus:V,onBlur:T,disabled:t,autoComplete:f,"aria-invalid":!!(n!=null&&n.length),"aria-label":c,...k})]}),u.jsx("div",{className:U.activeIndicator}),!S&&u.jsxs(u.Fragment,{children:[r&&u.jsx("div",{onClick:O=>{O.stopPropagation()},className:U.trailingIcon,children:a.isValidElement(r)?r:u.jsx(re,{className:"h-5",icon:r})}),!r&&s&&u.jsx("span",{className:U.suffix,children:s})]}),S&&u.jsx("div",{className:y(U.trailingIcon,{" absolute right-0":!r}),children:u.jsx(re,{className:"h-5 text-error",icon:vn})})]}),P&&u.jsx("p",{className:U.supportingText,children:n!=null&&n.length?n:h!=null&&h.length?h:" "})]})},Cn=({isSelected:e,icon:t,label:n,variant:o})=>({navigationRailItem:y(" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":o=="vertical","gap-0 h-[66px]":o=="horizontal"}),container:y(" 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:y("rounded-full"),icon:y("size-6 flex"),label:y("w-fit mx-auto text-nowrap",{"text-label-large ":o=="horizontal","text-label-medium":o=="vertical"})}),Mn=_("navigationRailItem",Cn),It=({label:e})=>u.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:u.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),Ct=({className:e,onClick:t,label:n,variant:o="vertical",href:s,icon:i,selectedItem:c,setSelectedItem:l,index:h,onItemSelected:r,selected:p=!1,ref:v,transition:d,isExtended:f,iconSelected:m,style:x,extendedOnly:w,children:j,...g})=>{j&&(n=j);const R=a.useRef(null),L=v||R,[B,S]=a.useState(p);a.useEffect(()=>{p&&c==null?S(!0):S(c==h&&h!=null)},[c]),a.useEffect(()=>{c==h&&r&&r({ref:L,index:h||0,label:n,icon:i})},[c]);const F=s?"a":"button",P=b=>{l&&l(h??null),t&&t(b)},M=Mn({isExtended:f,extendedOnly:w,className:e,onItemSelected:r,selectedItem:c,index:h,transition:d,selected:B,variant:o,icon:i,label:n,isSelected:B,setSelectedItem:l,href:s,children:n,iconSelected:m});return d={duration:.3,...d},w&&!f?null:u.jsxs(F,{...g,role:"tab","aria-selected":B,ref:L,href:s,className:M.navigationRailItem,onClick:P,style:{transition:d.duration+"s",...x},children:[u.jsxs(A.motion.div,{style:{transition:o=="horizontal"?d.duration+`s, gap ${d.duration/2}s ${d.duration-d.duration/2}s`:d.duration+`s, gap ${d.duration/3}s ${d.duration-d.duration/3}s`},transition:d,className:M.container,children:[u.jsx(ie,{style:{transition:d.duration+"s"},className:M.stateLayer,colorName:y({"on-surface":!B,"on-secondary-container":B}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),i&&u.jsx(re,{icon:B?m:i,className:M.icon}),u.jsx(A.AnimatePresence,{children:o=="horizontal"&&(()=>{const b={width:0,opacity:0,transition:{...d}},N={width:"auto",opacity:1,transition:{...d,opacity:{duration:d.duration/2,delay:d.duration-d.duration/2}}};return u.jsx(A.motion.span,{initial:b,animate:N,exit:b,className:M.label,children:n})})()})]}),u.jsx(A.AnimatePresence,{children:o=="vertical"&&(()=>{const b={height:0,opacity:0,transition:{...d,opacity:{duration:0}}},N={height:"auto",opacity:1,transition:{...d,opacity:{duration:d.duration/3,delay:d.duration-d.duration/3}}};return u.jsx(A.motion.span,{initial:N,animate:N,exit:b,className:M.label,transition:d,children:n})})()})]})},kn=({isExtended:e,alignment:t})=>({navigationRail:y("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:y("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:y(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),Rn=_("navigationRail",kn),$n=({variant:e="standard",onItemSelected:t,children:n,className:o,selectedItem:s,extended:i,alignment:c="top",menu:l={closed:{icon:bn,label:"Open menu"},opened:{icon:xe,label:"Close menu"}},style:h,onExtendedChange:r,transition:p,setSelectedItem:v})=>{const[d,f]=a.useState(null),[m,x]=a.useState(i);let w;s==0||s!=null?w=s:w=d;const j=v||f,g=a.useRef(null),R=M=>{t==null||t(M)};function L(M){const b=[];return a.Children.forEach(M,N=>{a.isValidElement(N)&&N.type===a.Fragment?b.push(...L(N.props.children)):b.push(N)}),b}const B=L(n),S=B.filter(M=>a.isValidElement(M)&&M.type===pe),F=Rn({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:j,className:o,variant:e,extended:m,isExtended:m,alignment:c,menu:l,transition:p,onExtendedChange:r});p={duration:.3,...p};const P=a.useRef(!1);return P.current=!1,a.useEffect(()=>{r==null||r(m??!1)},[m]),u.jsxs("div",{style:{transition:p.duration+"s",...h},ref:g,className:F.navigationRail,children:[u.jsxs("div",{className:F.header,children:[u.jsx(fe,{onClick:()=>x(!m),label:m?l==null?void 0:l.opened.label:l==null?void 0:l.closed.label,className:F.menuIcon,icon:m?l.opened.icon:l==null?void 0:l.closed.icon}),S.length>0&&a.cloneElement(S[0],{transition:p,isExtended:m,className:"!shadow-none mx-5 "+S[0].props.className})]}),u.jsx("div",{className:F.segments,children:(()=>{let M=0;return B.map(b=>a.isValidElement(b)&&b.type===Ct?a.cloneElement(b,{key:M,index:M++,variant:m?"horizontal":"vertical",selectedItem:w,setSelectedItem:j,onItemSelected:R,transition:p,extendedOnly:P.current,isExtended:m}):a.isValidElement(b)&&b.type===pe?null:a.isValidElement(b)&&b.type===It?(P.current=!0,m?a.cloneElement(b,{}):null):b)})()}),u.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function An(e){return me.defineConfig({variant:me.Variants.Udixio,...e,plugins:[new me.FontPlugin(e),new Fe.TailwindPlugin(e)]})}exports.AnimateOnScrollInit=cn;exports.Button=he;exports.Card=fn;exports.Carousel=mn;exports.CarouselItem=Lt;exports.CustomScroll=gt;exports.Divider=Nt;exports.Fab=pe;exports.FabMenu=gn;exports.Icon=re;exports.IconButton=fe;exports.NavigationRail=$n;exports.NavigationRailItem=Ct;exports.NavigationRailSection=It;exports.ProgressIndicator=vt;exports.RippleEffect=wt;exports.SideSheet=En;exports.Slider=Sn;exports.SmoothScroll=zt;exports.Snackbar=Ln;exports.State=ie;exports.Switch=Nn;exports.SyncedFixedWrapper=Et;exports.Tab=jt;exports.Tabs=jn;exports.TextField=In;exports.ThemeProvider=nn;exports.ToolTip=Me;exports.animateOnScroll=un;exports.buttonStyle=Bt;exports.cardStyle=Dt;exports.carouselItemConfig=Ee;exports.carouselItemStyle=Pt;exports.carouselStyle=Wt;exports.classNames=y;exports.classnames=Oe;exports.createUseClassNames=_;exports.customScrollStyle=bt;exports.defaultClassNames=K;exports.defineConfig=An;exports.dividerStyle=Ft;exports.fabMenuStyle=Ot;exports.fabStyle=Vt;exports.getClassNames=ye;exports.iconButtonStyle=Ht;exports.initAnimateOnScroll=Ie;exports.normalize=ce;exports.progressIndicatorStyle=qt;exports.sideSheetConfig=Le;exports.sideSheetStyle=st;exports.sliderConfig=Ne;exports.sliderStyle=Xt;exports.snackbarStyle=Yt;exports.switchStyle=_t;exports.tabStyle=Kt;exports.tabsStyle=Gt;exports.textFieldStyle=Jt;exports.toolStyle=Zt;exports.useButtonStyle=qe;exports.useCardStyle=Xe;exports.useCarouselItemStyle=Ye;exports.useCarouselStyle=Ke;exports.useClassNames=At;exports.useDividerStyle=Je;exports.useFabMenuStyle=ze;exports.useFabStyle=Qe;exports.useIconButtonStyle=tt;exports.useProgressIndicatorStyle=rt;exports.useSideSheetStyle=Ut;exports.useSliderStyle=ot;exports.useSnackbarStyle=lt;exports.useStateStyle=St;exports.useSwitchStyle=it;exports.useTabStyle=dt;exports.useTabsStyle=mt;exports.useTextFieldStyle=pt;exports.useToolTipStyle=xt;
|
|
5
|
+
*/var vn={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},xe={prefix:"fas",iconName:"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"]},wn=xe,gn={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 bn=({className:e,label:t,variant:n="primary",size:o="medium",href:r,icon:c,extended:i=!1,ref:l,transition:d,children:s,open:p,defaultOpen:v=!1,onOpenChange:f,...m})=>{d={duration:.3,ease:"easeInOut",...d};const h=a.useRef(null),x=l||h,w=typeof p=="boolean",[j,b]=a.useState(v),N=w?p:j,L=g=>{w||b(g),f==null||f(g)},B=a.Children.toArray(s).filter(g=>a.isValidElement(g)&&g.type===he),S=ze({href:r,icon:c,extended:i,label:t,size:o,variant:n,className:e,transition:d,children:t,open:N}),V=A.motion.create(pe),P=A.motion.create(fe);A.motion.create(he);const k=g=>u.jsx(V,{icon:c,extended:i,label:t,variant:n+"Container",size:o,className:S.fab+" "+(e??""),"aria-expanded":N,onClick:()=>L(!0),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},...g});return u.jsxs("div",{className:S.fabMenu,ref:x,...m,children:[u.jsx(A.AnimatePresence,{children:N&&u.jsx("div",{className:S.actions,role:"menu","aria-hidden":!N,children:(()=>{const g=B.length;return B.map((I,F)=>{I.props;const _=g-1-F,G=((d==null?void 0:d.delay)??0)+_*.06,U={open:{overflow:"visible",opacity:1,width:"auto",transition:{...d,delay:G,opacity:{delay:(d==null?void 0:d.duration)/2+G}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...d,delay:G,opacity:{duration:(d==null?void 0:d.duration)/1.5}}}};return u.jsx(A.motion.div,{initial:"close",animate:"open",variants:U,transition:d,exit:"close",children:a.cloneElement(I,{key:F,shape:"rounded",variant:"filled",className:()=>({button:y("max-w-full overflow-hidden",{"px-0":!N,"bg-primary-container text-on-primary-container ":n==="primary","bg-secondary-container text-on-secondary-container":n==="secondary","bg-tertiary-container text-on-tertiary-container":n==="tertiary"}),stateLayer:y({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),k({className:"invisible pointer-events-none"}),u.jsxs("div",{className:"absolute right-0 top-0",children:[!N&&k({className:"",layout:!0,layoutId:"fab-menu"}),N&&u.jsx(u.Fragment,{children:u.jsx(P,{layout:!0,layoutId:"fab-menu",variant:"filled",className:()=>({iconButton:y("",{"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:y({"[--default-color:var(--color-on-primary)]":n==="primary","[--default-color:var(--color-on-secondary)]":n==="secondary","[--default-color:var(--color-on-tertiary)]":n==="tertiary"})}),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},icon:wn,onClick:()=>L(!1),children:"Close"})})]})]})},Sn=({className:e,valueFormatter:t,step:n=10,name:o,value:r=0,min:c=0,max:i=100,marks:l=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:s,...p})=>{const v=R=>{const C=m(),O=f();return R===1/0?100:R===-1/0?0:(R-C)/(O-C)*100},f=(R=!1)=>R?i:i==1/0?l[(l==null?void 0:l.length)-1].value:i,m=(R=!1)=>R?c:c==-1/0?l[0].value:c,h=R=>{const C=m(!1);return(f(!1)-C)*R/100+C},[x,w]=a.useState(!1),j=a.useRef(null),b=d||j,[N,L]=a.useState(r),[B,S]=a.useState(v(r)),[V,P]=a.useState(!1),k=R=>{P(!0),w(!0),F(R)},g=()=>{P(!1),w(!1)};a.useEffect(()=>(V?(window.addEventListener("mouseup",g),window.addEventListener("mousemove",F),window.addEventListener("touchend",g),window.addEventListener("touchmove",F)):(window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",F),window.removeEventListener("touchend",g),window.removeEventListener("touchmove",F)),()=>{window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",F),window.removeEventListener("touchend",g),window.removeEventListener("touchmove",F)}),[V]);const I=ot({className:e,isChanging:x,marks:l,max:i,min:c,name:o,step:n,value:N,valueFormatter:t,onChange:s}),F=R=>{const C=b==null?void 0:b.current;if(C){const O=C.getBoundingClientRect().left,te=((R.type==="touchmove"||R.type==="touchstart"?R.touches[0].clientX:R.clientX)-O)/C.offsetWidth*100;_({percent:te})}},_=({percent:R,value:C})=>{if(R){if(R>=100){L(f(!0)),S(100);return}if(R<=0){L(m(!0)),S(0);return}C=h(R),C==m()&&(C=m(!0)),C==f()&&(C=f(!0))}else if(C!=null){if(C>=f()){L(f(!0)),S(100);return}if(C<=m()){L(m(!0)),S(0);return}R=v(C)}else return;n!=null?C=Math.round((C-m())/n)*n+m():l&&(C=l.reduce((O,X,te)=>{let oe=X.value===1/0?f():X.value===-1/0?m():X.value,M=O.value===1/0?f():O.value===-1/0?m():O.value;return oe=Math.abs(oe-C),M=Math.abs(M-C),oe<M?X:O}).value),C>=f()&&(C=f(!0)),C<=m()&&(C=m(!0)),R=v(C),L(C),S(R),s&&s(C)},[G,U]=a.useState(0);a.useEffect(()=>{const R=()=>{b.current&&U(b.current.offsetWidth)};return R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}},[]);const T=R=>{switch(R.key){case"ArrowRight":if(n)_({value:N+n});else if(l){const C=l.find(O=>O.value>N);C&&_({value:C.value})}break;case"ArrowLeft":if(n)_({value:N-n});else if(l){const C=l.slice(0).reverse().find((O,X,te)=>N===1/0?X===1:O.value<N);C&&_({value:C.value})}break;default:return}};return u.jsxs("div",{tabIndex:0,onKeyDown:T,role:"slider","aria-valuemin":m(!0),"aria-valuemax":f(!0),"aria-valuenow":N,"aria-valuetext":N.toString(),className:I.slider,onMouseDown:k,onClick:F,ref:b,onTouchStart:k,onDragStart:R=>R.preventDefault(),...p,children:[u.jsx("input",{type:"hidden",name:o,value:N}),u.jsx("div",{className:I.activeTrack,style:{flex:B/100}}),u.jsx("div",{className:I.handle,children:u.jsx(A.AnimatePresence,{children:x&&u.jsx(A.motion.div,{className:I.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(N):N})})}),u.jsx("div",{className:I.inactiveTrack,style:{flex:1-B/100}}),u.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:l&&l.map((R,C)=>{let O=null;const X=(x?9:10)/G*100,te=v(R.value);return te<=B-X?O=!0:te>=B+X&&(O=!1),u.jsx("div",{className:y(I.dot,{"bg-primary-container":O!=null&&O,"bg-primary":O!=null&&!O}),style:{left:`${v(R.value)}%`}},C)})})]})},En=({variant:e="standard",className:t,children:n,title:o,position:r="right",extended:c,divider:i,onExtendedChange:l,closeIcon:d=xe,transition:s,...p})=>{s={duration:.3,...s};const[v,f]=a.useState(c??!0),m=st({transition:s,title:o,position:r,closeIcon:d,className:t,children:n,onExtendedChange:l,divider:i,isExtended:v,extended:v,variant:e});a.useEffect(()=>{l==null||l(v??!1)},[v]),a.useEffect(()=>{c!=null&&f(c)},[c]);const h={close:{width:0},open:{width:"auto"}},x=()=>u.jsxs(u.Fragment,{children:[u.jsx(A.AnimatePresence,{children:e=="modal"&&v&&u.jsx(A.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:s,onClick:()=>f(!1),className:m.overlay})}),u.jsx(A.AnimatePresence,{children:v&&u.jsxs("div",{...p,className:m.sideSheet,style:{transition:s.duration+"s"},children:[u.jsxs(A.motion.div,{variants:h,initial:c===!1?"open":"close",animate:"open",exit:"close",className:m.container,children:[u.jsxs("div",{className:m.header,children:[o&&u.jsx("p",{className:m.title,children:o}),u.jsx(fe,{size:"small",label:"close",icon:d,onClick:()=>f(!1),className:m.closeButton})]}),u.jsx("div",{className:m.content,style:{transition:s.duration+"s"},children:n})]}),(i==null&&e=="standard"?!0:i)&&u.jsx(Nt,{className:m.divider,orientation:"vertical"})]})})]});return e=="modal"?We.createPortal(x(),document.body):x()},Ln=({message:e,className:t,duration:n,closeIcon:o=xe,onClose:r,...c})=>{const[i,l]=a.useState(!0),d=lt({className:t,closeIcon:o,duration:n,isVisible:i,onClose:r,message:e});a.useEffect(()=>{n&&setTimeout(()=>{s()},n)},[n]);const s=()=>{l(!1),r==null||r()};return u.jsx(A.AnimatePresence,{children:i&&u.jsx(A.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:d.snackbar,...c,children:u.jsxs("div",{className:d.container,children:[u.jsx("p",{className:d.supportingText,children:e}),u.jsx(fe,{onClick:()=>s(),className:d.icon,icon:o,label:"close the snackbar"})]})})})},Nn=({selected:e=!1,className:t,activeIcon:n,disabled:o=!1,inactiveIcon:r,onChange:c,onClick:i,onKeyDown:l,ref:d,...s})=>{const[p,v]=a.useState(e),f=b=>{o||(h(),i&&i(b))},m=b=>{o||((b.key===" "||b.key==="Enter")&&(b.preventDefault(),h()),l&&l(b))},h=()=>{v(!p),c==null||c(!p)},x=it({className:t,isSelected:p,activeIcon:n,inactiveIcon:r,disabled:o,selected:p,onChange:c}),w=a.useRef(null),j=d||w;return u.jsxs(A.motion.div,{role:"switch","aria-checked":p,tabIndex:o?-1:0,onKeyDown:m,onClick:f,ref:j,className:x.switch,...s,children:[u.jsx("input",{type:"hidden",value:p?"1":"0"}),u.jsxs(A.motion.div,{layout:!0,style:{translate:p?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:x.handleContainer,children:[u.jsx("div",{className:x.handle,children:(p?n:r)&&u.jsx(re,{className:x.icon,icon:p?n:r})}),u.jsx("div",{className:x.handleStateLayer})]})]})},jt=({className:e,onClick:t,label:n,variant:o="primary",href:r,icon:c,selectedTab:i,setSelectedTab:l,tabsId:d,index:s,onTabSelected:p,scrollable:v=!1,selected:f=!1,ref:m,...h})=>{const x=a.useRef(null),w=m||x,[j,b]=a.useState(f);a.useEffect(()=>{f&&i==null?b(!0):b(i==s&&s!=null)},[i]),a.useEffect(()=>{i==s&&p&&p({ref:w,index:s||0,label:n,icon:c})},[i]);const N=r?"a":"button",L=S=>{l&&l(s??null),t&&t(S)},B=dt({className:e,onTabSelected:p,scrollable:v,selectedTab:i,index:s,tabsId:d,selected:j,variant:o,icon:c,label:n,isSelected:j,setSelectedTab:l,href:r});return u.jsxs(N,{...h,role:"tab","aria-selected":j,ref:w,href:r,className:B.tab,onClick:L,...h,children:[u.jsx(ie,{style:{transition:.3+"s"},className:B.stateLayer,colorName:o==="primary"&&j?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),u.jsxs("span",{className:B.content,children:[c&&u.jsx(re,{icon:c,className:B.icon}),u.jsx("span",{className:B.label,children:n}),j&&u.jsx(A.motion.span,{layoutId:`underline-${d}`,className:B.underline,transition:{duration:.3}})]})]})},jn=({variant:e="primary",onTabSelected:t,children:n,className:o,selectedTab:r,setSelectedTab:c,scrollable:i=!1})=>{const[l,d]=a.useState(null);let s;r==0||r!=null?s=r:s=l;const p=c||d,v=a.Children.toArray(n).filter(w=>a.isValidElement(w)&&w.type===jt),f=a.useRef(null),m=w=>{if(t==null||t(w),i){const j=f.current,b=w.ref.current;if(j&&b){const N=b.offsetLeft+b.offsetWidth/2-j.offsetWidth/2;j.scrollTo({left:N,behavior:"smooth"})}}},h=a.useMemo(()=>Ce(),[]),x=mt({children:n,onTabSelected:t,scrollable:i,selectedTab:s,setSelectedTab:p,className:o,variant:e});return u.jsx("div",{ref:f,role:"tablist",className:x.tabs,children:v.map((w,j)=>a.cloneElement(w,{key:j,index:j,variant:e,selectedTab:s,setSelectedTab:p,tabsId:h,onTabSelected:m,scrollable:i}))})},In=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:o,suffix:r,name:c,label:i,className:l,supportingText:d,trailingIcon:s,leadingIcon:p,type:v="text",textLine:f="singleLine",autoComplete:m="on",onChange:h,value:x,showSupportingText:w=!1,...j})=>{const[b,N]=a.useState(x??""),[L,B]=a.useState(!1),[S,V]=a.useState(!1),[P,k]=a.useState(w);a.useEffect(()=>{N(x??"")},[x]),a.useEffect(()=>{n!=null&&n.length?V(!0):V(!1)},[n]),a.useEffect(()=>{w?k(w):d!=null&&d.length?k(!0):k(!1)},[P,d]),a.useEffect(()=>{L&&V(!1)},[L]);const g=a.useRef(null),I=()=>{g.current&&!L&&g.current.focus()},F=()=>{B(!0)},_=O=>{const X=O.target.value;N(X),V(!1),typeof h=="function"&&h(X)},G=()=>{B(!1)},U=pt({showSupportingText:P,isFocused:L,showErrorIcon:S,disabled:t,name:c,label:i,autoComplete:m,className:l,onChange:h,placeholder:o,supportingText:d,type:v,leadingIcon:p,trailingIcon:s,variant:e,errorText:n,value:b,suffix:r,textLine:f}),[T]=a.useState(Ce());let R,C;switch(f){case"multiLine":C=Rt,R={};break;case"textAreas":C="textarea",R={};break;case"singleLine":default:C="input",R={type:v};break}return u.jsxs("div",{className:U.textField,...j,children:[u.jsxs("fieldset",{onClick:I,className:U.content,children:[u.jsx("div",{className:U.stateLayer}),p&&u.jsx("div",{className:U.leadingIcon,children:a.isValidElement(p)?p:u.jsx(re,{className:"w-5 h-5",icon:p})}),!(!L&&!b.length||e=="filled")&&u.jsx(A.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!L&&!b.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:u.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:u.jsx(A.motion.span,{className:U.label,transition:{duration:.3},layoutId:T,children:i})})}),u.jsxs("div",{className:"flex-1 relative",children:[(!L&&!b.length||e=="filled")&&u.jsx(A.motion.label,{htmlFor:c,className:y("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!L&&!b.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!L&&!b.length))}),transition:{duration:.3},children:u.jsx(A.motion.span,{className:U.label,transition:{duration:.3},layoutId:e=="outlined"?T:void 0,children:i})}),u.jsx(C,{ref:g,value:b,onChange:_,className:U.input,id:c,name:c,placeholder:L?o??void 0:"",onFocus:F,onBlur:G,disabled:t,autoComplete:m,"aria-invalid":!!(n!=null&&n.length),"aria-label":i,...R})]}),u.jsx("div",{className:U.activeIndicator}),!S&&u.jsxs(u.Fragment,{children:[s&&u.jsx("div",{onClick:O=>{O.stopPropagation()},className:U.trailingIcon,children:a.isValidElement(s)?s:u.jsx(re,{className:"h-5",icon:s})}),!s&&r&&u.jsx("span",{className:U.suffix,children:r})]}),S&&u.jsx("div",{className:y(U.trailingIcon,{" absolute right-0":!s}),children:u.jsx(re,{className:"h-5 text-error",icon:vn})})]}),P&&u.jsx("p",{className:U.supportingText,children:n!=null&&n.length?n:d!=null&&d.length?d:" "})]})},Cn=({isSelected:e,icon:t,label:n,variant:o})=>({navigationRailItem:y(" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":o=="vertical","gap-0 h-[66px]":o=="horizontal"}),container:y(" 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:y("rounded-full"),icon:y("size-6 flex"),label:y("w-fit mx-auto text-nowrap",{"text-label-large ":o=="horizontal","text-label-medium":o=="vertical"})}),Mn=Y("navigationRailItem",Cn),It=({label:e})=>u.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:u.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),Ct=({className:e,onClick:t,label:n,variant:o="vertical",href:r,icon:c,selectedItem:i,setSelectedItem:l,index:d,onItemSelected:s,selected:p=!1,ref:v,transition:f,isExtended:m,iconSelected:h,style:x,extendedOnly:w,children:j,...b})=>{j&&(n=j);const N=a.useRef(null),L=v||N,[B,S]=a.useState(p);a.useEffect(()=>{p&&i==null?S(!0):S(i==d&&d!=null)},[i]),a.useEffect(()=>{i==d&&s&&s({ref:L,index:d||0,label:n,icon:c})},[i]);const V=r?"a":"button",P=g=>{l&&l(d??null),t&&t(g)},k=Mn({isExtended:m,extendedOnly:w,className:e,onItemSelected:s,selectedItem:i,index:d,transition:f,selected:B,variant:o,icon:c,label:n,isSelected:B,setSelectedItem:l,href:r,children:n,iconSelected:h});return f={duration:.3,...f},w&&!m?null:u.jsxs(V,{...b,role:"tab","aria-selected":B,ref:L,href:r,className:k.navigationRailItem,onClick:P,style:{transition:f.duration+"s",...x},children:[u.jsxs(A.motion.div,{style:{transition:o=="horizontal"?f.duration+`s, gap ${f.duration/2}s ${f.duration-f.duration/2}s`:f.duration+`s, gap ${f.duration/3}s ${f.duration-f.duration/3}s`},transition:f,className:k.container,children:[u.jsx(ie,{style:{transition:f.duration+"s"},className:k.stateLayer,colorName:y({"on-surface":!B,"on-secondary-container":B}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),c&&u.jsx(re,{icon:B?h:c,className:k.icon}),u.jsx(A.AnimatePresence,{children:o=="horizontal"&&(()=>{const g={width:0,opacity:0,transition:{...f}},I={width:"auto",opacity:1,transition:{...f,opacity:{duration:f.duration/2,delay:f.duration-f.duration/2}}};return u.jsx(A.motion.span,{initial:g,animate:I,exit:g,className:k.label,children:n})})()})]}),u.jsx(A.AnimatePresence,{children:o=="vertical"&&(()=>{const g={height:0,opacity:0,transition:{...f,opacity:{duration:0}}},I={height:"auto",opacity:1,transition:{...f,opacity:{duration:f.duration/3,delay:f.duration-f.duration/3}}};return u.jsx(A.motion.span,{initial:I,animate:I,exit:g,className:k.label,transition:f,children:n})})()})]})},kn=({isExtended:e,alignment:t})=>({navigationRail:y("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:y("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:y(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),Rn=Y("navigationRail",kn),$n=({variant:e="standard",onItemSelected:t,children:n,className:o,selectedItem:r,extended:c,alignment:i="top",menu:l={closed:{icon:gn,label:"Open menu"},opened:{icon:xe,label:"Close menu"}},style:d,onExtendedChange:s,transition:p,setSelectedItem:v})=>{const[f,m]=a.useState(null),[h,x]=a.useState(c);let w;r==0||r!=null?w=r:w=f;const j=v||m,b=a.useRef(null),N=k=>{t==null||t(k)};function L(k){const g=[];return a.Children.forEach(k,I=>{a.isValidElement(I)&&I.type===a.Fragment?g.push(...L(I.props.children)):g.push(I)}),g}const B=L(n),S=B.filter(k=>a.isValidElement(k)&&k.type===pe),V=Rn({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:j,className:o,variant:e,extended:h,isExtended:h,alignment:i,menu:l,transition:p,onExtendedChange:s});p={duration:.3,...p};const P=a.useRef(!1);return P.current=!1,a.useEffect(()=>{s==null||s(h??!1)},[h]),u.jsxs("div",{style:{transition:p.duration+"s",...d},ref:b,className:V.navigationRail,children:[u.jsxs("div",{className:V.header,children:[u.jsx(fe,{onClick:()=>x(!h),label:h?l==null?void 0:l.opened.label:l==null?void 0:l.closed.label,className:V.menuIcon,icon:h?l.opened.icon:l==null?void 0:l.closed.icon}),S.length>0&&a.cloneElement(S[0],{transition:p,isExtended:h,className:"!shadow-none mx-5 "+S[0].props.className})]}),u.jsx("div",{className:V.segments,children:(()=>{let k=0;return B.map(g=>a.isValidElement(g)&&g.type===Ct?a.cloneElement(g,{key:k,index:k++,variant:h?"horizontal":"vertical",selectedItem:w,setSelectedItem:j,onItemSelected:N,transition:p,extendedOnly:P.current,isExtended:h}):a.isValidElement(g)&&g.type===pe?null:a.isValidElement(g)&&g.type===It?(P.current=!0,h?a.cloneElement(g,{}):null):g)})()}),u.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function An(e){return me.defineConfig({variant:me.Variants.Udixio,...e,plugins:[new me.FontPlugin(e),new Fe.TailwindPlugin(e)]})}exports.AnimateOnScrollInit=cn;exports.Button=he;exports.Card=fn;exports.Carousel=mn;exports.CarouselItem=Lt;exports.CustomScroll=bt;exports.Divider=Nt;exports.Fab=pe;exports.FabMenu=bn;exports.Icon=re;exports.IconButton=fe;exports.NavigationRail=$n;exports.NavigationRailItem=Ct;exports.NavigationRailSection=It;exports.ProgressIndicator=vt;exports.RippleEffect=wt;exports.SideSheet=En;exports.Slider=Sn;exports.SmoothScroll=zt;exports.Snackbar=Ln;exports.State=ie;exports.Switch=Nn;exports.SyncedFixedWrapper=Et;exports.Tab=jt;exports.Tabs=jn;exports.TextField=In;exports.ThemeProvider=nn;exports.ToolTip=Me;exports.animateOnScroll=un;exports.buttonStyle=Bt;exports.cardStyle=Dt;exports.carouselItemConfig=Ee;exports.carouselItemStyle=Pt;exports.carouselStyle=Wt;exports.classNames=y;exports.classnames=Oe;exports.createUseClassNames=Y;exports.customScrollStyle=gt;exports.defaultClassNames=K;exports.defineConfig=An;exports.dividerStyle=Ft;exports.fabMenuStyle=Ot;exports.fabStyle=Vt;exports.getClassNames=ye;exports.iconButtonStyle=Ht;exports.initAnimateOnScroll=Ie;exports.normalize=ce;exports.progressIndicatorStyle=qt;exports.sideSheetConfig=Le;exports.sideSheetStyle=st;exports.sliderConfig=Ne;exports.sliderStyle=Xt;exports.snackbarStyle=Yt;exports.switchStyle=_t;exports.tabStyle=Kt;exports.tabsStyle=Gt;exports.textFieldStyle=Jt;exports.toolStyle=Zt;exports.useButtonStyle=qe;exports.useCardStyle=Xe;exports.useCarouselItemStyle=Ye;exports.useCarouselStyle=Ke;exports.useClassNames=At;exports.useDividerStyle=Je;exports.useFabMenuStyle=ze;exports.useFabStyle=Qe;exports.useIconButtonStyle=tt;exports.useProgressIndicatorStyle=rt;exports.useSideSheetStyle=Ut;exports.useSliderStyle=ot;exports.useSnackbarStyle=lt;exports.useStateStyle=St;exports.useSwitchStyle=it;exports.useTabStyle=dt;exports.useTabsStyle=mt;exports.useTextFieldStyle=pt;exports.useToolTipStyle=xt;
|