@udixio/ui-react 2.9.3 → 2.9.4

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