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