@udixio/ui-react 2.10.12 → 2.10.14

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.
Files changed (179) hide show
  1. package/dist/index.cjs +3 -3
  2. package/dist/index.js +2696 -2710
  3. package/dist/lib/effects/ThemeProvider.d.ts.map +1 -1
  4. package/dist/theme.worker.js +6633 -0
  5. package/package.json +4 -1
  6. package/.eslintrc.mjs +0 -22
  7. package/.storybook/main.ts +0 -20
  8. package/.storybook/preview.ts +0 -1
  9. package/CHANGELOG.md +0 -1130
  10. package/dist/scrollDriven-AP2yWhzi.js +0 -121
  11. package/postcss.config.mjs +0 -5
  12. package/src/index.css +0 -4
  13. package/src/index.ts +0 -1
  14. package/src/lib/components/AnchorPositioner.tsx +0 -185
  15. package/src/lib/components/Button.tsx +0 -208
  16. package/src/lib/components/Card.tsx +0 -47
  17. package/src/lib/components/Carousel.tsx +0 -437
  18. package/src/lib/components/CarouselItem.tsx +0 -61
  19. package/src/lib/components/Checkbox.tsx +0 -120
  20. package/src/lib/components/Chip.tsx +0 -341
  21. package/src/lib/components/Chips.tsx +0 -331
  22. package/src/lib/components/ContextMenu.tsx +0 -109
  23. package/src/lib/components/DatePicker.tsx +0 -432
  24. package/src/lib/components/Divider.tsx +0 -20
  25. package/src/lib/components/Fab.tsx +0 -127
  26. package/src/lib/components/FabMenu.tsx +0 -239
  27. package/src/lib/components/IconButton.tsx +0 -146
  28. package/src/lib/components/Menu.tsx +0 -88
  29. package/src/lib/components/MenuGroup.tsx +0 -34
  30. package/src/lib/components/MenuHeadline.tsx +0 -9
  31. package/src/lib/components/MenuItem.tsx +0 -215
  32. package/src/lib/components/NavigationRail.tsx +0 -186
  33. package/src/lib/components/NavigationRailItem.tsx +0 -227
  34. package/src/lib/components/ProgressIndicator.tsx +0 -214
  35. package/src/lib/components/SideSheet.tsx +0 -135
  36. package/src/lib/components/Slider.tsx +0 -374
  37. package/src/lib/components/Snackbar.tsx +0 -77
  38. package/src/lib/components/Switch.tsx +0 -107
  39. package/src/lib/components/Tab.tsx +0 -123
  40. package/src/lib/components/TabGroup.tsx +0 -66
  41. package/src/lib/components/TabGroupContext.tsx +0 -16
  42. package/src/lib/components/TabPanel.tsx +0 -27
  43. package/src/lib/components/TabPanels.tsx +0 -76
  44. package/src/lib/components/Tabs.tsx +0 -105
  45. package/src/lib/components/TextField.tsx +0 -586
  46. package/src/lib/components/Tooltip.tsx +0 -217
  47. package/src/lib/components/index.ts +0 -34
  48. package/src/lib/config/config.interface.ts +0 -9
  49. package/src/lib/config/define-config.ts +0 -16
  50. package/src/lib/config/index.ts +0 -2
  51. package/src/lib/effects/AnimateOnScroll.ts +0 -391
  52. package/src/lib/effects/State.tsx +0 -90
  53. package/src/lib/effects/SyncedFixedWrapper.tsx +0 -62
  54. package/src/lib/effects/ThemeProvider.tsx +0 -172
  55. package/src/lib/effects/block-scroll.effect.tsx +0 -313
  56. package/src/lib/effects/custom-scroll/custom-scroll.effect.tsx +0 -407
  57. package/src/lib/effects/custom-scroll/custom-scroll.interface.ts +0 -29
  58. package/src/lib/effects/custom-scroll/custom-scroll.style.ts +0 -32
  59. package/src/lib/effects/custom-scroll/index.ts +0 -3
  60. package/src/lib/effects/index.ts +0 -7
  61. package/src/lib/effects/ripple/RippleEffect.tsx +0 -116
  62. package/src/lib/effects/ripple/index.tsx +0 -1
  63. package/src/lib/effects/scrollDriven.ts +0 -239
  64. package/src/lib/effects/smooth-scroll.effect.tsx +0 -112
  65. package/src/lib/effects/theme.worker.ts +0 -97
  66. package/src/lib/hooks/index.ts +0 -10
  67. package/src/lib/hooks/useTooltipTrigger.ts +0 -270
  68. package/src/lib/icon/icon.tsx +0 -125
  69. package/src/lib/icon/index.ts +0 -1
  70. package/src/lib/index.ts +0 -8
  71. package/src/lib/interfaces/button.interface.ts +0 -65
  72. package/src/lib/interfaces/card.interface.ts +0 -11
  73. package/src/lib/interfaces/carousel-item.interface.ts +0 -12
  74. package/src/lib/interfaces/carousel.interface.ts +0 -41
  75. package/src/lib/interfaces/checkbox.interface.ts +0 -39
  76. package/src/lib/interfaces/chip.interface.ts +0 -97
  77. package/src/lib/interfaces/chips.interface.ts +0 -37
  78. package/src/lib/interfaces/date-picker.interface.ts +0 -79
  79. package/src/lib/interfaces/divider.interface.ts +0 -7
  80. package/src/lib/interfaces/fab-menu.interface.ts +0 -12
  81. package/src/lib/interfaces/fab.interface.ts +0 -27
  82. package/src/lib/interfaces/icon-button.interface.ts +0 -38
  83. package/src/lib/interfaces/index.ts +0 -26
  84. package/src/lib/interfaces/menu-group.interface.ts +0 -13
  85. package/src/lib/interfaces/menu-item.interface.ts +0 -29
  86. package/src/lib/interfaces/menu.interface.ts +0 -19
  87. package/src/lib/interfaces/navigation-rail-item.interface.ts +0 -39
  88. package/src/lib/interfaces/navigation-rail.interface.ts +0 -39
  89. package/src/lib/interfaces/progress-indicator.interface.ts +0 -41
  90. package/src/lib/interfaces/side-sheet.interface.tsx +0 -28
  91. package/src/lib/interfaces/slider.interface.ts +0 -27
  92. package/src/lib/interfaces/snackbar.interface.ts +0 -13
  93. package/src/lib/interfaces/switch.interface.ts +0 -14
  94. package/src/lib/interfaces/tab-group.interface.ts +0 -13
  95. package/src/lib/interfaces/tab-panels.interface.ts +0 -21
  96. package/src/lib/interfaces/tab.interface.ts +0 -31
  97. package/src/lib/interfaces/tabs.interface.ts +0 -22
  98. package/src/lib/interfaces/text-field.interface.ts +0 -61
  99. package/src/lib/interfaces/tooltip.interface.ts +0 -61
  100. package/src/lib/styles/button.style.ts +0 -136
  101. package/src/lib/styles/card.style.ts +0 -29
  102. package/src/lib/styles/carousel-item.style.ts +0 -24
  103. package/src/lib/styles/carousel.style.ts +0 -22
  104. package/src/lib/styles/checkbox.style.ts +0 -64
  105. package/src/lib/styles/chip.style.ts +0 -62
  106. package/src/lib/styles/chips.style.ts +0 -20
  107. package/src/lib/styles/date-picker.style.ts +0 -43
  108. package/src/lib/styles/divider.style.ts +0 -31
  109. package/src/lib/styles/fab-menu.style.ts +0 -29
  110. package/src/lib/styles/fab.style.ts +0 -49
  111. package/src/lib/styles/icon-button.style.ts +0 -168
  112. package/src/lib/styles/index.ts +0 -25
  113. package/src/lib/styles/menu-group.style.ts +0 -34
  114. package/src/lib/styles/menu-headline.style.ts +0 -20
  115. package/src/lib/styles/menu-item.style.ts +0 -45
  116. package/src/lib/styles/menu.style.ts +0 -32
  117. package/src/lib/styles/navigation-rail-item.style.ts +0 -56
  118. package/src/lib/styles/navigation-rail.style.ts +0 -36
  119. package/src/lib/styles/progress-indicator.style.ts +0 -72
  120. package/src/lib/styles/side-sheet.style.ts +0 -45
  121. package/src/lib/styles/slider.style.ts +0 -41
  122. package/src/lib/styles/snackbar.style.ts +0 -26
  123. package/src/lib/styles/switch.style.ts +0 -67
  124. package/src/lib/styles/tab-panels.style.ts +0 -35
  125. package/src/lib/styles/tab.style.ts +0 -78
  126. package/src/lib/styles/tabs.style.ts +0 -22
  127. package/src/lib/styles/text-field.style.ts +0 -115
  128. package/src/lib/styles/tooltip.style.ts +0 -48
  129. package/src/lib/utils/component-helper.ts +0 -134
  130. package/src/lib/utils/component.ts +0 -34
  131. package/src/lib/utils/index.ts +0 -7
  132. package/src/lib/utils/string.ts +0 -9
  133. package/src/lib/utils/styles/classnames.ts +0 -49
  134. package/src/lib/utils/styles/get-classname.ts +0 -96
  135. package/src/lib/utils/styles/index.ts +0 -4
  136. package/src/lib/utils/styles/use-classnames.ts +0 -25
  137. package/src/stories/action/button.stories.tsx +0 -86
  138. package/src/stories/action/fab.stories.tsx +0 -54
  139. package/src/stories/action/icon-button.stories.tsx +0 -134
  140. package/src/stories/assets/accessibility.png +0 -0
  141. package/src/stories/assets/accessibility.svg +0 -5
  142. package/src/stories/assets/addon-library.png +0 -0
  143. package/src/stories/assets/assets.png +0 -0
  144. package/src/stories/assets/context.png +0 -0
  145. package/src/stories/assets/discord.svg +0 -15
  146. package/src/stories/assets/docs.png +0 -0
  147. package/src/stories/assets/figma-plugin.png +0 -0
  148. package/src/stories/assets/github.svg +0 -3
  149. package/src/stories/assets/share.png +0 -0
  150. package/src/stories/assets/styling.png +0 -0
  151. package/src/stories/assets/testing.png +0 -0
  152. package/src/stories/assets/theming.png +0 -0
  153. package/src/stories/assets/tutorials.svg +0 -12
  154. package/src/stories/assets/youtube.svg +0 -4
  155. package/src/stories/communication/ProgressIndicator.stories.tsx +0 -57
  156. package/src/stories/communication/SnackBar.stories.tsx +0 -32
  157. package/src/stories/communication/tool-tip.stories.tsx +0 -133
  158. package/src/stories/containment/card.stories.tsx +0 -42
  159. package/src/stories/containment/carousel.stories.tsx +0 -65
  160. package/src/stories/containment/divider.stories.tsx +0 -35
  161. package/src/stories/containment/slide-sheet.stories.tsx +0 -45
  162. package/src/stories/effect/smooth-scroll.stories.tsx +0 -54
  163. package/src/stories/navigation/navigation-rail/navigation-rail-item.stories.tsx +0 -65
  164. package/src/stories/navigation/navigation-rail/navigation-rail.stories.tsx +0 -122
  165. package/src/stories/navigation/tabs/tab.stories.tsx +0 -57
  166. package/src/stories/navigation/tabs/tabs.stories.tsx +0 -102
  167. package/src/stories/selection/slider.stories.tsx +0 -85
  168. package/src/stories/selection/switch.stories.tsx +0 -46
  169. package/src/stories/text-inputs/text-field.stories.tsx +0 -135
  170. package/src/tests/Button.spec.tsx +0 -67
  171. package/src/tests/useClassNames.spec.tsx +0 -82
  172. package/src/udixio.css +0 -120
  173. package/theme.config.ts +0 -7
  174. package/tsconfig.json +0 -16
  175. package/tsconfig.lib.json +0 -51
  176. package/tsconfig.spec.json +0 -37
  177. package/tsconfig.storybook.json +0 -38
  178. package/vite.config.ts +0 -82
  179. /package/dist/{scrollDriven-DWAu7CR0.cjs → scrollDriven.js} +0 -0
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";var Pn=Object.defineProperty;var $n=(e,t,n)=>t in e?Pn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var H=(e,t,n)=>$n(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),a=require("react"),He=require("react-dom"),Y=require("motion/react"),ft=require("clsx"),On=require("tailwind-merge"),we=require("@udixio/theme"),Fe=require("@udixio/tailwind"),jn=require("react-textarea-autosize"),pt=({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}}},[r,o]=a.useState(!0),[u,c]=a.useState(!1),[l,h]=a.useState({x:50,y:50});a.useEffect(()=>{u&&(o(!0),o(!1))},[u]),a.useEffect(()=>{const m=t==null?void 0:t.current;if(m)return m.addEventListener("mousedown",s),m.addEventListener("mouseup",y),m.addEventListener("mouseleave",d),()=>{m.removeEventListener("mousedown",s),m.removeEventListener("mouseup",y),m.removeEventListener("mouseleave",d)}},[t]);const s=m=>{const x=t==null?void 0:t.current,w=x.getBoundingClientRect();c(!0),h({x:(m.clientX-w.left)/x.clientWidth*100,y:(m.clientY-w.top)/x.clientHeight*100})},d=m=>{c(!1)},y=m=>{c(!1)},f=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,p={position:"absolute",inset:0,width:"100%",height:"100%","--x":l.x+"%","--y":l.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${f} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return i.jsx(Y.AnimatePresence,{mode:"wait",children:(u||!u&&!r)&&i.jsx(Y.motion.div,{style:p,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>o(!0)})})},mt=On.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)=>mt(ft.clsx(e)),gt=(...e)=>mt(ft.clsx(e));function Rn(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const Ae=e=>{const t={};e.classNameList.forEach(r=>{var o;if(r)if(typeof r=="string")(t[o=e.default]??(t[o]=[])).push(r);else{const u=r(e.states);Object.entries(u).map(c=>{const[l,h]=c;(t[l]??(t[l]=[])).push(h)})}});const n=t;return Object.entries(t).map(r=>{let[o,u]=r;u=u.reverse(),o==e.default&&u.unshift("relative"),u.unshift(Rn(o)),n[o]=gt(...u)}),n},ne=(e,t)=>n=>Ae({classNameList:[n.className,t],default:e,states:n}),Z=(e,t)=>n=>a.useMemo(()=>Ae({classNameList:[n.className,t],default:e,states:n}),[n]);function Fn(e,t,n){return a.useMemo(()=>Ae({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const yt=ne("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 Bn(e,t){let n=0,r=null,o=null;const u=(c,l)=>{n=Date.now(),t(c,l)};return(c,l)=>{const h=Date.now(),s=e-(h-n);s<=0?(r&&(clearTimeout(r),r=null),u(c,l)):(o={v:c,o:l},r||(r=setTimeout(()=>{r=null;const d=o;o=null,d&&u(d.v,d.o)},s)))}}const vt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:r,className:o,draggable:u=!1,throttleDuration:c=75,scroll:l,setScroll:h})=>{var K,S;const s=a.useRef(null),d=a.useRef(null),[y,f]=a.useState({width:null,height:null});a.useEffect(()=>{if(!s.current)return;const k=new ResizeObserver(E=>{for(const z of E)z.target===s.current&&f({width:z.contentRect.width,height:z.contentRect.height})});return k.observe(s.current),()=>{k.disconnect()}},[s]);const p=a.useRef(null),m=a.useRef(null),x=()=>{const k=d.current;return k?{width:n??k.scrollWidth,height:n??k.scrollHeight}:null},w=()=>{const k=s.current;return k?{width:k.clientWidth,height:k.clientHeight}:null},{scrollYProgress:M,scrollXProgress:C}=Y.useScroll({container:s}),b=a.useRef(null);b.current||(b.current=Bn(c,(k,E)=>{!m.current||!p.current||!s.current||(E===(t==="horizontal"?"x":"y")&&(h==null||h(k)),r&&(t==="horizontal"&&E==="x"&&r({scrollProgress:k,scroll:k*(p.current.width-s.current.clientWidth),scrollTotal:p.current.width-s.current.clientWidth,scrollVisible:m.current.width}),t==="vertical"&&E==="y"&&r({scrollProgress:k,scroll:k*(p.current.height-s.current.clientHeight),scrollTotal:p.current.height-s.current.clientHeight,scrollVisible:m.current.height})))}));const $=(k,E)=>{b.current&&b.current(k,E)};a.useEffect(()=>{y.width&&$(C.get(),"x"),y.height&&$(M.get(),"y")},[y]),a.useEffect(()=>{const k=s.current,E=d.current;if(!k||!E||typeof l!="number")return;const z=(q,J,te)=>Math.min(te,Math.max(J,q));if(t==="horizontal"){const q=Math.max(0,(n??E.scrollWidth)-k.clientWidth);k.scrollLeft=z(l*q,0,q)}else{const q=Math.max(0,(n??E.scrollHeight)-k.clientHeight);k.scrollTop=z(l*q,0,q)}},[l,t,n]),Y.useMotionValueEvent(C,"change",k=>{$(k,"x")}),Y.useMotionValueEvent(M,"change",k=>{$(k,"y")});const[D,v]=a.useState(!1);a.useLayoutEffect(()=>{D||!m.current||!p.current||!r||(r({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?p.current.height:p.current.width,scrollVisible:t=="vertical"?m.current.height:m.current.width}),v(!0))},[m,p,r]),p.current=x(),m.current=w();const[L,T]=a.useState(!1),N=yt({isDragging:L,children:e,className:o,onScroll:r,orientation:t,scrollSize:n,draggable:u,throttleDuration:c}),[F,I]=a.useState(0),[G,W]=a.useState(0),Q=k=>{if(!u)return;const E=s.current;if(!E||F==null)return;const q=(k.pageX-E.offsetLeft-F)*1.5;E.scrollLeft=G-q},V=k=>{const E=s.current;E&&(T(!0),I(k.pageX-E.offsetLeft),W(E.scrollLeft))},j=k=>{L&&(k.preventDefault(),Q(k))},A=()=>{T(!1)},B=()=>{T(!1)},P=k=>{k.preventDefault()},R=a.useRef(null);return a.useEffect(()=>()=>{R.current&&clearTimeout(R.current)},[]),a.useEffect(()=>{const k=s.current;if(!k)return;const E=z=>{var re,O,U,_;const q=z.detail,J=s.current;if(!J||!q)return;const te=q.orientation??t;if(typeof q.progress=="number")if(te==="horizontal"){const ee=Math.max(0,(((re=p.current)==null?void 0:re.width)??0)-J.clientWidth);J.scrollLeft=Math.min(ee,Math.max(0,q.progress*ee))}else{const ee=Math.max(0,(((O=p.current)==null?void 0:O.height)??0)-J.clientHeight);J.scrollTop=Math.min(ee,Math.max(0,q.progress*ee))}else if(typeof q.scroll=="number")if(te==="horizontal"){const ee=Math.max(0,(((U=p.current)==null?void 0:U.width)??0)-J.clientWidth);J.scrollLeft=Math.min(ee,Math.max(0,q.scroll))}else{const ee=Math.max(0,(((_=p.current)==null?void 0:_.height)??0)-J.clientHeight);J.scrollTop=Math.min(ee,Math.max(0,q.scroll))}};return k.addEventListener("udx:customScroll:set",E),()=>{k.removeEventListener("udx:customScroll:set",E)}},[t]),i.jsxs("div",{className:N.customScroll,ref:s,onMouseDown:V,onMouseMove:j,onMouseUp:A,onMouseLeave:B,onDragStart:P,onScroll:k=>{L||(I(null),T(!0),R.current&&clearTimeout(R.current),R.current=setTimeout(()=>{T(!1)},1e3))},children:[i.jsx("div",{ref:d,style:t==="vertical"?{height:((K=m==null?void 0:m.current)==null?void 0:K.height)??"100%"}:{width:((S=m==null?void 0:m.current)==null?void 0:S.width)??"100%"},className:N.track,children:e}),m.current&&p.current&&i.jsxs(i.Fragment,{children:[t==="vertical"&&p.current.height>m.current.height&&i.jsx(Y.motion.div,{className:"flex-none",style:{height:p.current.height-m.current.height}}),t==="horizontal"&&p.current.width>m.current.width&&i.jsx(Y.motion.div,{className:"flex-none",style:{width:p.current.width-m.current.width}})]})]})};var _n="1.3.17";function bt(e,t,n){return Math.max(e,Math.min(t,n))}function Hn(e,t,n){return(1-n)*e+n*t}function Wn(e,t,n,r){return Hn(e,t,1-Math.exp(-n*r))}function Vn(e,t){return(e%t+t)%t}var Un=class{constructor(){H(this,"isRunning",!1);H(this,"value",0);H(this,"from",0);H(this,"to",0);H(this,"currentTime",0);H(this,"lerp");H(this,"duration");H(this,"easing");H(this,"onUpdate")}advance(e){var n;if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;const r=bt(0,this.currentTime/this.duration,1);t=r>=1;const o=t?1:this.easing(r);this.value=this.from+(this.to-this.from)*o}else this.lerp?(this.value=Wn(this.value,this.to,this.lerp*60,e),Math.round(this.value)===this.to&&(this.value=this.to,t=!0)):(this.value=this.to,t=!0);t&&this.stop(),(n=this.onUpdate)==null||n.call(this,this.value,t)}stop(){this.isRunning=!1}fromTo(e,t,{lerp:n,duration:r,easing:o,onStart:u,onUpdate:c}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=r,this.easing=o,this.currentTime=0,this.isRunning=!0,u==null||u(),this.onUpdate=c}};function Yn(e,t){let n;return function(...r){let o=this;clearTimeout(n),n=setTimeout(()=>{n=void 0,e.apply(o,r)},t)}}var zn=class{constructor(e,t,{autoResize:n=!0,debounce:r=250}={}){H(this,"width",0);H(this,"height",0);H(this,"scrollHeight",0);H(this,"scrollWidth",0);H(this,"debouncedResize");H(this,"wrapperResizeObserver");H(this,"contentResizeObserver");H(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});H(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});H(this,"onContentResize",()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)});this.wrapper=e,this.content=t,n&&(this.debouncedResize=Yn(this.resize,r),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){var e,t;(e=this.wrapperResizeObserver)==null||e.disconnect(),(t=this.contentResizeObserver)==null||t.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize,!1)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},wt=class{constructor(){H(this,"events",{})}emit(e,...t){var r;let n=this.events[e]||[];for(let o=0,u=n.length;o<u;o++)(r=n[o])==null||r.call(n,...t)}on(e,t){var n;return(n=this.events[e])!=null&&n.push(t)||(this.events[e]=[t]),()=>{var r;this.events[e]=(r=this.events[e])==null?void 0:r.filter(o=>t!==o)}}off(e,t){var n;this.events[e]=(n=this.events[e])==null?void 0:n.filter(r=>t!==r)}destroy(){this.events={}}},ot=100/6,fe={passive:!1},qn=class{constructor(e,t={wheelMultiplier:1,touchMultiplier:1}){H(this,"touchStart",{x:0,y:0});H(this,"lastDelta",{x:0,y:0});H(this,"window",{width:0,height:0});H(this,"emitter",new wt);H(this,"onTouchStart",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:e})});H(this,"onTouchMove",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e,r=-(t-this.touchStart.x)*this.options.touchMultiplier,o=-(n-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:r,y:o},this.emitter.emit("scroll",{deltaX:r,deltaY:o,event:e})});H(this,"onTouchEnd",e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})});H(this,"onWheel",e=>{let{deltaX:t,deltaY:n,deltaMode:r}=e;const o=r===1?ot:r===2?this.window.width:1,u=r===1?ot:r===2?this.window.height:1;t*=o,n*=u,t*=this.options.wheelMultiplier,n*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:n,event:e})});H(this,"onWindowResize",()=>{this.window={width:window.innerWidth,height:window.innerHeight}});this.element=e,this.options=t,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,fe),this.element.addEventListener("touchstart",this.onTouchStart,fe),this.element.addEventListener("touchmove",this.onTouchMove,fe),this.element.addEventListener("touchend",this.onTouchEnd,fe)}on(e,t){return this.emitter.on(e,t)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,fe),this.element.removeEventListener("touchstart",this.onTouchStart,fe),this.element.removeEventListener("touchmove",this.onTouchMove,fe),this.element.removeEventListener("touchend",this.onTouchEnd,fe)}},at=e=>Math.min(1,1.001-Math.pow(2,-10*e)),Gn=class{constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:n=e,smoothWheel:r=!0,syncTouch:o=!1,syncTouchLerp:u=.075,touchInertiaExponent:c=1.7,duration:l,easing:h,lerp:s=.1,infinite:d=!1,orientation:y="vertical",gestureOrientation:f=y==="horizontal"?"both":"vertical",touchMultiplier:p=1,wheelMultiplier:m=1,autoResize:x=!0,prevent:w,virtualScroll:M,overscroll:C=!0,autoRaf:b=!1,anchors:$=!1,autoToggle:D=!1,allowNestedScroll:v=!1,__experimental__naiveDimensions:L=!1,naiveDimensions:T=L,stopInertiaOnNavigate:N=!1}={}){H(this,"_isScrolling",!1);H(this,"_isStopped",!1);H(this,"_isLocked",!1);H(this,"_preventNextNativeScrollEvent",!1);H(this,"_resetVelocityTimeout",null);H(this,"_rafId",null);H(this,"isTouching");H(this,"time",0);H(this,"userData",{});H(this,"lastVelocity",0);H(this,"velocity",0);H(this,"direction",0);H(this,"options");H(this,"targetScroll");H(this,"animatedScroll");H(this,"animate",new Un);H(this,"emitter",new wt);H(this,"dimensions");H(this,"virtualScroll");H(this,"onScrollEnd",e=>{e instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&e.stopPropagation()});H(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});H(this,"onTransitionEnd",e=>{e.propertyName.includes("overflow")&&this.checkOverflow()});H(this,"onClick",e=>{const n=e.composedPath().filter(r=>r instanceof HTMLAnchorElement&&r.getAttribute("href"));if(this.options.anchors){const r=n.find(o=>{var u;return(u=o.getAttribute("href"))==null?void 0:u.includes("#")});if(r){const o=r.getAttribute("href");if(o){const u=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,c=`#${o.split("#")[1]}`;this.scrollTo(c,u)}}}this.options.stopInertiaOnNavigate&&n.find(o=>o.host===window.location.host)&&this.reset()});H(this,"onPointerDown",e=>{e.button===1&&this.reset()});H(this,"onVirtualScroll",e=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(e)===!1)return;const{deltaX:t,deltaY:n,event:r}=e;if(this.emitter.emit("virtual-scroll",{deltaX:t,deltaY:n,event:r}),r.ctrlKey||r.lenisStopPropagation)return;const o=r.type.includes("touch"),u=r.type.includes("wheel");this.isTouching=r.type==="touchstart"||r.type==="touchmove";const c=t===0&&n===0;if(this.options.syncTouch&&o&&r.type==="touchstart"&&c&&!this.isStopped&&!this.isLocked){this.reset();return}const h=this.options.gestureOrientation==="vertical"&&n===0||this.options.gestureOrientation==="horizontal"&&t===0;if(c||h)return;let s=r.composedPath();s=s.slice(0,s.indexOf(this.rootElement));const d=this.options.prevent;if(s.find(w=>{var M,C,b;return w instanceof HTMLElement&&(typeof d=="function"&&(d==null?void 0:d(w))||((M=w.hasAttribute)==null?void 0:M.call(w,"data-lenis-prevent"))||o&&((C=w.hasAttribute)==null?void 0:C.call(w,"data-lenis-prevent-touch"))||u&&((b=w.hasAttribute)==null?void 0:b.call(w,"data-lenis-prevent-wheel"))||this.options.allowNestedScroll&&this.checkNestedScroll(w,{deltaX:t,deltaY:n}))}))return;if(this.isStopped||this.isLocked){r.cancelable&&r.preventDefault();return}if(!(this.options.syncTouch&&o||this.options.smoothWheel&&u)){this.isScrolling="native",this.animate.stop(),r.lenisStopPropagation=!0;return}let f=n;this.options.gestureOrientation==="both"?f=Math.abs(n)>Math.abs(t)?n:t:this.options.gestureOrientation==="horizontal"&&(f=t),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||this.animatedScroll===0&&n>0||this.animatedScroll===this.limit&&n<0))&&(r.lenisStopPropagation=!0),r.cancelable&&r.preventDefault();const p=o&&this.options.syncTouch,x=o&&r.type==="touchend";x&&(f=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent)),this.scrollTo(this.targetScroll+f,{programmatic:!1,...p?{lerp:x?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});H(this,"onNativeScroll",()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){const e=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-e,this.direction=Math.sign(this.animatedScroll-e),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}});H(this,"raf",e=>{const t=e-(this.time||e);this.time=e,this.animate.advance(t*.001),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))});window.lenisVersion=_n,(!e||e===document.documentElement)&&(e=window),typeof l=="number"&&typeof h!="function"?h=at:typeof h=="function"&&typeof l!="number"&&(l=1),this.options={wrapper:e,content:t,eventsTarget:n,smoothWheel:r,syncTouch:o,syncTouchLerp:u,touchInertiaExponent:c,duration:l,easing:h,lerp:s,infinite:d,gestureOrientation:f,orientation:y,touchMultiplier:p,wheelMultiplier:m,autoResize:x,prevent:w,virtualScroll:M,overscroll:C,autoRaf:b,anchors:$,autoToggle:D,allowNestedScroll:v,naiveDimensions:T,stopInertiaOnNavigate:N},this.dimensions=new zn(e,t,{autoResize:x}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new qn(n,{touchMultiplier:p,wheelMultiplier:m}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd,{passive:!0})),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(e,t){return this.emitter.on(e,t)}off(e,t){return this.emitter.off(e,t)}get overflow(){const e=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[e]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}setScroll(e){this.isHorizontal?this.options.wrapper.scrollTo({left:e,behavior:"instant"}):this.options.wrapper.scrollTo({top:e,behavior:"instant"})}resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}scrollTo(e,{offset:t=0,immediate:n=!1,lock:r=!1,programmatic:o=!0,lerp:u=o?this.options.lerp:void 0,duration:c=o?this.options.duration:void 0,easing:l=o?this.options.easing:void 0,onStart:h,onComplete:s,force:d=!1,userData:y}={}){if(!((this.isStopped||this.isLocked)&&!d)){if(typeof e=="string"&&["top","left","start","#"].includes(e))e=0;else if(typeof e=="string"&&["bottom","right","end"].includes(e))e=this.limit;else{let f;if(typeof e=="string"?(f=document.querySelector(e),f||(e==="#top"?e=0:console.warn("Lenis: Target not found",e))):e instanceof HTMLElement&&(e!=null&&e.nodeType)&&(f=e),f){if(this.options.wrapper!==window){const m=this.rootElement.getBoundingClientRect();t-=this.isHorizontal?m.left:m.top}const p=f.getBoundingClientRect();e=(this.isHorizontal?p.left:p.top)+this.animatedScroll}}if(typeof e=="number"){if(e+=t,e=Math.round(e),this.options.infinite){if(o){this.targetScroll=this.animatedScroll=this.scroll;const f=e-this.animatedScroll;f>this.limit/2?e=e-this.limit:f<-this.limit/2&&(e=e+this.limit)}}else e=bt(0,e,this.limit);if(e===this.targetScroll){h==null||h(this),s==null||s(this);return}if(this.userData=y??{},n){this.animatedScroll=this.targetScroll=e,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),s==null||s(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}o||(this.targetScroll=e),typeof c=="number"&&typeof l!="function"?l=at:typeof l=="function"&&typeof c!="number"&&(c=1),this.animate.fromTo(this.animatedScroll,e,{duration:c,easing:l,lerp:u,onStart:()=>{r&&(this.isLocked=!0),this.isScrolling="smooth",h==null||h(this)},onUpdate:(f,p)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=f-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=f,this.setScroll(this.scroll),o&&(this.targetScroll=f),p||this.emit(),p&&(this.reset(),this.emit(),s==null||s(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}checkNestedScroll(e,{deltaX:t,deltaY:n}){const r=Date.now(),o=e._lenis??(e._lenis={});let u,c,l,h,s,d,y,f;const p=this.options.gestureOrientation;if(r-(o.time??0)>2e3){o.time=Date.now();const D=window.getComputedStyle(e);o.computedStyle=D;const v=D.overflowX,L=D.overflowY;if(u=["auto","overlay","scroll"].includes(v),c=["auto","overlay","scroll"].includes(L),o.hasOverflowX=u,o.hasOverflowY=c,!u&&!c||p==="vertical"&&!c||p==="horizontal"&&!u)return!1;s=e.scrollWidth,d=e.scrollHeight,y=e.clientWidth,f=e.clientHeight,l=s>y,h=d>f,o.isScrollableX=l,o.isScrollableY=h,o.scrollWidth=s,o.scrollHeight=d,o.clientWidth=y,o.clientHeight=f}else l=o.isScrollableX,h=o.isScrollableY,u=o.hasOverflowX,c=o.hasOverflowY,s=o.scrollWidth,d=o.scrollHeight,y=o.clientWidth,f=o.clientHeight;if(!u&&!c||!l&&!h||p==="vertical"&&(!c||!h)||p==="horizontal"&&(!u||!l))return!1;let m;if(p==="horizontal")m="x";else if(p==="vertical")m="y";else{const D=t!==0,v=n!==0;D&&u&&l&&(m="x"),v&&c&&h&&(m="y")}if(!m)return!1;let x,w,M,C,b;if(m==="x")x=e.scrollLeft,w=s-y,M=t,C=u,b=l;else if(m==="y")x=e.scrollTop,w=d-f,M=n,C=c,b=h;else return!1;return(M>0?x<w:x>0)&&C&&b}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){const e=this.options.wrapper;return this.isHorizontal?e.scrollX??e.scrollLeft:e.scrollY??e.scrollTop}get scroll(){return this.options.infinite?Vn(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(e){this._isScrolling!==e&&(this._isScrolling=e,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(e){this._isStopped!==e&&(this._isStopped=e,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let e="lenis";return this.options.autoToggle&&(e+=" lenis-autoToggle"),this.isStopped&&(e+=" lenis-stopped"),this.isLocked&&(e+=" lenis-locked"),this.isScrolling&&(e+=" lenis-scrolling"),this.isScrolling==="smooth"&&(e+=" lenis-smooth"),e}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}};const Kn=({transition:e=1.2,easing:t,orientation:n="vertical",smoothTouch:r=!1,touchMultiplier:o=2,children:u})=>{const c=a.useRef(null),l=a.useRef(null);return a.useEffect(()=>{let h;typeof e=="string"?e.endsWith("ms")?h=parseFloat(e)/1e3:e.endsWith("s")?h=parseFloat(e):h=parseFloat(e)||1.2:h=e;const s=y=>1-Math.pow(1-y,5);c.current=new Gn({duration:h,easing:t??s,orientation:n,smoothWheel:!0,touchMultiplier:o,syncTouch:r});const d=y=>{var f;(f=c.current)==null||f.raf(y),l.current=requestAnimationFrame(d)};return l.current=requestAnimationFrame(d),()=>{var y;l.current!==null&&cancelAnimationFrame(l.current),(y=c.current)==null||y.destroy(),c.current=null}},[e,t,n,r,o]),u?i.jsx(i.Fragment,{children:u}):null},ue=({style:e,colorName:t,stateClassName:n="state-ripple-group",children:r,className:o})=>{const u=a.useRef(null),c=a.useRef(null),[l,h]=a.useState(!1),s=xt({isClient:l,stateClassName:n,className:o,colorName:t});return a.useEffect(()=>{if(u.current&&n!=="state-layer"){const y=(n.includes("[")?"group/"+n.split("[")[1].split("]")[0]:"group").replace(/\//g,"\\/"),f=u.current.closest(`.${y}:not(.${y} .${y})`);c.current=f}h(!0)},[]),i.jsxs("div",{ref:u,className:s.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:[l&&i.jsx(pt,{triggerRef:c}),r]})},Xn=({isClient:e,stateClassName:t})=>({stateLayer:g(["w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden",t])}),xt=Z("stateLayer",Xn),St=({targetRef:e,children:t})=>{const[n,r]=a.useState(null),o=a.useRef(null),u=()=>{const c=e.current;if(!c)return;const l=c.getBoundingClientRect();r({position:"fixed",top:l.top,left:l.left,width:l.width,height:l.height,pointerEvents:"none",zIndex:999})};return a.useEffect(()=>{const c=e.current;if(c)return u(),window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),o.current=new ResizeObserver(u),o.current.observe(c),()=>{var l;window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u),(l=o.current)==null||l.disconnect()}},[e]),n?He.createPortal(i.jsx("div",{style:n,children:t}),document.body):null},Ct='(function(){"use strict";class Ue extends Error{constructor(t){super(t),Object.defineProperty(this,"message",{enumerable:!1,value:t}),Object.defineProperty(this,"name",{enumerable:!1,value:this.constructor.name}),"captureStackTrace"in Error?Error.captureStackTrace(this,this.constructor):Object.defineProperty(this,"stack",{enumerable:!1,value:Error(t).stack,writable:!0,configurable:!0})}}class Yt extends Ue{}class pt extends Yt{constructor(t,r,n,o){super(`${t}: expected ${r} to be ${n}, but got ${o}.`)}static assert(t,r,n,o,a){if(!t)throw new pt(r,n,o,a);return t}}class St extends Yt{constructor(t,r,n){const o=t.toString(),a=r.map(({name:s})=>s.toString());a.push(o);const i=a.join(" -> ");let c=`Could not resolve \'${o}\'.`;n&&(c+=` ${n}`),c+=`\n\n`,c+=`Resolution path: ${i}`,super(c)}}class Ge extends Yt{constructor(t,r){let o=`Could not register \'${t.toString()}\'.`;r&&(o+=` ${r}`),super(o)}}const yt={PROXY:"PROXY",CLASSIC:"CLASSIC"},Y={SINGLETON:"SINGLETON",TRANSIENT:"TRANSIENT",SCOPED:"SCOPED"};function We(e,t){return e===Y.SINGLETON&&t!==Y.SINGLETON||e===Y.SCOPED&&t===Y.TRANSIENT}function ce(e){const t=e.length;let r=0,n="EOF",o="",a=0,i=0,c=0;return{next:s,done:m};function s(b=0){return a=b,l(),p()}function l(){for(o="",n="EOF";;){if(r>=t)return n="EOF";const b=e.charAt(r);if(ue(b)){r++;continue}switch(b){case"(":return r++,i++,n=b;case")":return r++,c++,n=b;case"*":return r++,n=b;case",":return r++,n=b;case"=":return r++,(a&1)===0&&h(),n=b;case"/":{r++;const I=e.charAt(r);I==="/"&&(f(O=>O===`\n`,!0),r++),I==="*"&&(f(O=>{const A=e.charAt(r+1);return O==="*"&&A==="/"},!0),r++);break}default:if(Je(b))return u(),n;r++}}}function u(){const b=e.charAt(r),I=++r;for(;Ze(e.charAt(r));)r++;return o=""+b+e.substring(I,r),n=o==="function"||o==="class"?o:"ident",n!=="ident"&&(o=""),o}function h(){f(b=>{const I=i===c+1;return b===","&&I?!0:b==="("?(i++,!1):!!(b===")"&&(c++,I))})}function f(b,I=!1){for(;r<e.length;){const O=e.charAt(r);if(b(O))return;if(!I){if(ue(O)){r++;continue}if(qe(O)){g();continue}}r++}}function g(){const b=e.charAt(r);for(r++;r<e.length;){const I=e.charAt(r),O=e.charAt(r-1);if(I===b&&O!=="\\\\"){r++;return}b==="`"&&e.charAt(r+1)==="$"&&e.charAt(r+2)==="{"&&(r=r+2,f(v=>v==="}")),r++}}function p(){return o?{value:o,type:n}:{type:n}}function m(){return n==="EOF"}}function ue(e){switch(e){case"\\r":case`\n`:case" ":return!0}return!1}function qe(e){switch(e){case"\'":case\'"\':case"`":return!0}return!1}const Ke=/^[_$a-zA-Z\\xA0-\\uFFFF]$/,Xe=/^[?._$a-zA-Z0-9\\xA0-\\uFFFF]$/;function Je(e){return Ke.test(e)}function Ze(e){return Xe.test(e)}function Qe(e,t){const r=e;return typeof r=="string"||typeof r=="symbol"?{[e]:t}:r}function tr(e){return e[e.length-1]}function er(e){if(typeof e!="function")return!1;const t=ce(e.toString()),r=t.next();if(r.type==="class")return!0;const n=t.next();return!!(r.type==="function"&&n.value&&n.value[0]===n.value[0].toUpperCase())}function le(e){return typeof e=="function"}function rr(e){const{next:t,done:r}=ce(e),n=[];let o=null;for(s();!r();)switch(o.type){case"class":{if(!i())return null;break}case"function":{const u=s();(u.type==="ident"||u.type==="*")&&s();break}case"(":a();break;case")":return n;case"ident":{const u={name:o.value,optional:!1};if(o.value==="async"){const h=s();if(h&&h.type!=="=")break}return n.push(u),n}default:throw l()}return n;function a(){let u={name:"",optional:!1};for(;!r();)switch(s(),o.type){case"ident":u.name=o.value;break;case"=":u.optional=!0;break;case",":n.push(u),u={name:"",optional:!1};break;case")":u.name&&n.push(u);return;default:throw l()}}function i(){for(;!r();){if(c()){if(s(1),o.type!=="(")continue;return!0}s(1)}return!1}function c(){return o.type==="ident"&&o.value==="constructor"}function s(u=0){return o=t(u),o}function l(){return new SyntaxError(`Parsing parameter list, did not expect ${o.type} token${o.value?` (${o.value})`:""}`)}}const he=Symbol("Awilix Resolver Config");function nr(e,t){if(!le(e))throw new pt("asFunction","fn","function",e);const r={lifetime:Y.TRANSIENT};t=de(r,t,e[he]);const o={resolve:ge(e),...t};return Ut(Ct(o))}function ut(e,t){if(!le(e))throw new pt("asClass","Type","class",e);const r={lifetime:Y.TRANSIENT};t=de(r,t,e[he]);const o=ge(function(...i){return Reflect.construct(e,i)},e);return Ut(Ct({...t,resolve:o}))}function Ct(e){function t(o){return Ct({...this,lifetime:o})}function r(o){return Ct({...this,injectionMode:o})}function n(o){return Ct({...this,injector:o})}return fe(e,{setLifetime:t,inject:n,transient:wt(t,Y.TRANSIENT),scoped:wt(t,Y.SCOPED),singleton:wt(t,Y.SINGLETON),setInjectionMode:r,proxy:wt(r,yt.PROXY),classic:wt(r,yt.CLASSIC)})}function Ut(e){function t(r){return Ut({...this,dispose:r})}return fe(e,{disposer:t})}function wt(e,t){return function(){return e.call(this,t)}}function de(e,...t){return Object.assign({},e,...t)}function fe(e,t){return{...e,...t}}function or(e,t){return function(n,o){return n in t?t[n]:e.resolve(n,o)}}function ar(e,t){const r=t(e),n=new Set(Object.keys(e.registrations));for(const a of Object.getOwnPropertySymbols(e.registrations))n.add(a);for(const a of Object.keys(r))n.add(a);for(const a of Object.getOwnPropertySymbols(r))n.add(a);return new Proxy({},{get(a,i){return i===Symbol.iterator?function*(){for(const s in e.cradle)yield s;for(const s in r)yield s}:i in r?r[i]:e.resolve(i)},ownKeys(){return[...n]},getOwnPropertyDescriptor(a,i){if(n.has(i))return{enumerable:!0,configurable:!0}}})}function ge(e,t){t||(t=e);const r=me(t);return function(o){if((this.injectionMode||o.options.injectionMode||yt.PROXY)!==yt.CLASSIC){const i=this.injector?ar(o,this.injector):o.cradle;return e(i)}if(r.length>0){const i=this.injector?or(o,this.injector(o)):o.resolve,c=r.map(s=>i(s.name,{allowUnregistered:s.optional}));return e(...c)}return e()}}function me(e){const t=rr(e.toString());if(!t){const r=Object.getPrototypeOf(e);return typeof r=="function"&&r!==Function.prototype?me(r):[]}return t}const pe=Symbol("familyTree"),ye=Symbol("rollUpRegistrations"),ir="AwilixContainerCradle";function be(e={}){return ve(e)}function ve(e,t,r){e={injectionMode:yt.PROXY,strict:!1,...e};const n=r??[],o={},a=new Proxy({},{get:(k,v)=>b(v),set:(k,v)=>{throw new Error(`Attempted setting property "${v}" on container cradle - this is not allowed.`)},ownKeys(){return Array.from(a)},getOwnPropertyDescriptor(k,v){const T=u();if(Object.getOwnPropertyDescriptor(T,v))return{enumerable:!0,configurable:!0}}}),i={options:e,cradle:a,inspect:l,cache:new Map,loadModules:()=>{throw new Error("loadModules is not supported in the browser.")},createScope:f,register:g,build:O,resolve:b,hasRegistration:I,dispose:A,getRegistration:m,[ye]:u,get registrations(){return u()}},c=t?[i].concat(t[pe]):[i];i[pe]=c;const s=tr(c);return i;function l(){return`[AwilixContainer (${t?"scoped, ":""}registrations: ${Object.keys(i.registrations).length})]`}function u(){return{...t&&t[ye](),...o}}function*h(){const k=u();for(const v in k)yield v}function f(){return ve(e,i,n)}function g(k,v){const T=Qe(k,v),F=[...Object.keys(T),...Object.getOwnPropertySymbols(T)];for(const B of F){const R=T[B];if(e.strict&&R.lifetime===Y.SINGLETON&&t)throw new Ge(B,"Cannot register a singleton on a scoped container.");o[B]=R}return i}function p(){return Object.prototype.toString.call(a)}function m(k){const v=o[k];return v||(t?t.getRegistration(k):null)}function b(k,v){v=v||{};try{let B=function(M,J,tt){if(!(!e.strict||tt.isLeakSafe)){for(let V=0;V<n.length;V++)if(We(n[V].lifetime,J))throw new St(M,n,`Dependency \'${M.toString()}\' has a shorter lifetime than its ancestor: \'${n[V].name.toString()}\'`)}};const T=m(k);for(let M=0;M<n.length;M++)if(n[M].name===k)throw new St(k,n,"Cyclic dependencies detected.");if(k==="toJSON")return p;if(k==="constructor")return be;if(!T){switch(k){case"inspect":case"toString":return p;case Symbol.toStringTag:return ir;case"then":return;case Symbol.iterator:return h}if(v.allowUnregistered)return;throw new St(k,n)}const F=T.lifetime||Y.TRANSIENT;if(F===Y.SINGLETON){const M=s.cache.get(k);if(M)return M.value}if(F===Y.SCOPED){const M=i.cache.get(k);if(M!==void 0)return B(k,F,T),M.value}B(k,F,T),n.push({name:k,lifetime:F});let R;switch(F){case Y.TRANSIENT:R=T.resolve(i);break;case Y.SINGLETON:R=T.resolve(e.strict?s:i),s.cache.set(k,{resolver:T,value:R});break;case Y.SCOPED:R=T.resolve(i),i.cache.set(k,{resolver:T,value:R});break;default:throw new St(k,n,`Unknown lifetime "${T.lifetime}"`)}return n.pop(),R}catch(T){throw n.length=0,T}}function I(k){return!!m(k)}function O(k,v){if(k&&k.resolve)return k.resolve(i);const T="build",F="targetOrResolver";return pt.assert(k,T,F,"a registration, function or class",k),pt.assert(typeof k=="function",T,F,"a function or class",k),(er(k)?ut(k,v):nr(k,v)).resolve(i)}function A(){const k=Array.from(i.cache.entries());return i.cache.clear(),Promise.all(k.map(([,v])=>{const{resolver:T,value:F}=v,B=T;return B.dispose?Promise.resolve().then(()=>B.dispose(F)):Promise.resolve()})).then(()=>{})}}/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */function U(e){return e<0?-1:e===0?0:1}function lt(e,t,r){return(1-r)*e+r*t}function sr(e,t,r){return r<e?e:r>t?t:r}function H(e,t,r){return r<e?e:r>t?t:r}function Ft(e){return e=e%360,e<0&&(e=e+360),e}function Pt(e,t){const r=e[0]*t[0][0]+e[1]*t[0][1]+e[2]*t[0][2],n=e[0]*t[1][0]+e[1]*t[1][1]+e[2]*t[1][2],o=e[0]*t[2][0]+e[1]*t[2][1]+e[2]*t[2][2];return[r,n,o]}/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */const cr=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],ur=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],lr=[95.047,100,108.883];function Gt(e,t,r){return(255<<24|(e&255)<<16|(t&255)<<8|r&255)>>>0}function At(e){const t=ft(e[0]),r=ft(e[1]),n=ft(e[2]);return Gt(t,r,n)}function ke(e){return e>>16&255}function Ce(e){return e>>8&255}function we(e){return e&255}function hr(e,t,r){const n=ur,o=n[0][0]*e+n[0][1]*t+n[0][2]*r,a=n[1][0]*e+n[1][1]*t+n[1][2]*r,i=n[2][0]*e+n[2][1]*t+n[2][2]*r,c=ft(o),s=ft(a),l=ft(i);return Gt(c,s,l)}function dr(e){const t=bt(ke(e)),r=bt(Ce(e)),n=bt(we(e));return Pt([t,r,n],cr)}function Pe(e){const t=ot(e),r=ft(t);return Gt(r,r,r)}function It(e){const t=dr(e)[1];return 116*Me(t/100)-16}function ot(e){return 100*gr((e+16)/116)}function Ot(e){return Me(e/100)*116-16}function bt(e){const t=e/255;return t<=.040449936?t/12.92*100:Math.pow((t+.055)/1.055,2.4)*100}function ft(e){const t=e/100;let r=0;return t<=.0031308?r=t*12.92:r=1.055*Math.pow(t,1/2.4)-.055,sr(0,255,Math.round(r*255))}function fr(){return lr}function Me(e){const t=.008856451679035631,r=24389/27;return e>t?Math.pow(e,1/3):(r*e+16)/116}function gr(e){const t=.008856451679035631,r=24389/27,n=e*e*e;return n>t?n:(116*e-16)/r}/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */class Q{static make(t=fr(),r=200/Math.PI*ot(50)/100,n=50,o=2,a=!1){const i=t,c=i[0]*.401288+i[1]*.650173+i[2]*-.051461,s=i[0]*-.250268+i[1]*1.204414+i[2]*.045854,l=i[0]*-.002079+i[1]*.048952+i[2]*.953127,u=.8+o/10,h=u>=.9?lt(.59,.69,(u-.9)*10):lt(.525,.59,(u-.8)*10);let f=a?1:u*(1-1/3.6*Math.exp((-r-42)/92));f=f>1?1:f<0?0:f;const g=u,p=[f*(100/c)+1-f,f*(100/s)+1-f,f*(100/l)+1-f],m=1/(5*r+1),b=m*m*m*m,I=1-b,O=b*r+.1*I*I*Math.cbrt(5*r),A=ot(n)/t[1],k=1.48+Math.sqrt(A),v=.725/Math.pow(A,.2),T=v,F=[Math.pow(O*p[0]*c/100,.42),Math.pow(O*p[1]*s/100,.42),Math.pow(O*p[2]*l/100,.42)],B=[400*F[0]/(F[0]+27.13),400*F[1]/(F[1]+27.13),400*F[2]/(F[2]+27.13)],R=(2*B[0]+B[1]+.05*B[2])*v;return new Q(A,R,v,T,h,g,p,O,Math.pow(O,.25),k)}constructor(t,r,n,o,a,i,c,s,l,u){this.n=t,this.aw=r,this.nbb=n,this.ncb=o,this.c=a,this.nc=i,this.rgbD=c,this.fl=s,this.fLRoot=l,this.z=u}}Q.DEFAULT=Q.make();/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */class z{constructor(t,r,n,o,a,i,c,s,l){this.hue=t,this.chroma=r,this.j=n,this.q=o,this.m=a,this.s=i,this.jstar=c,this.astar=s,this.bstar=l}distance(t){const r=this.jstar-t.jstar,n=this.astar-t.astar,o=this.bstar-t.bstar,a=Math.sqrt(r*r+n*n+o*o);return 1.41*Math.pow(a,.63)}static fromInt(t){return z.fromIntInViewingConditions(t,Q.DEFAULT)}static fromIntInViewingConditions(t,r){const n=(t&16711680)>>16,o=(t&65280)>>8,a=t&255,i=bt(n),c=bt(o),s=bt(a),l=.41233895*i+.35762064*c+.18051042*s,u=.2126*i+.7152*c+.0722*s,h=.01932141*i+.11916382*c+.95034478*s,f=.401288*l+.650173*u-.051461*h,g=-.250268*l+1.204414*u+.045854*h,p=-.002079*l+.048952*u+.953127*h,m=r.rgbD[0]*f,b=r.rgbD[1]*g,I=r.rgbD[2]*p,O=Math.pow(r.fl*Math.abs(m)/100,.42),A=Math.pow(r.fl*Math.abs(b)/100,.42),k=Math.pow(r.fl*Math.abs(I)/100,.42),v=U(m)*400*O/(O+27.13),T=U(b)*400*A/(A+27.13),F=U(I)*400*k/(k+27.13),B=(11*v+-12*T+F)/11,R=(v+T-2*F)/9,M=(20*v+20*T+21*F)/20,J=(40*v+20*T+F)/20,V=Math.atan2(R,B)*180/Math.PI,G=V<0?V+360:V>=360?V-360:V,Ht=G*Math.PI/180,_t=J*r.nbb,dt=100*Math.pow(_t/r.aw,r.c*r.z),Nt=4/r.c*Math.sqrt(dt/100)*(r.aw+4)*r.fLRoot,oe=G<20.14?G+360:G,ae=.25*(Math.cos(oe*Math.PI/180+2)+3.8),se=5e4/13*ae*r.nc*r.ncb*Math.sqrt(B*B+R*R)/(M+.305),zt=Math.pow(se,.9)*Math.pow(1.64-Math.pow(.29,r.n),.73),ze=zt*Math.sqrt(dt/100),Ve=ze*r.fLRoot,an=50*Math.sqrt(zt*r.c/(r.aw+4)),sn=(1+100*.007)*dt/(1+.007*dt),Ye=1/.0228*Math.log(1+.0228*Ve),cn=Ye*Math.cos(Ht),un=Ye*Math.sin(Ht);return new z(G,ze,dt,Nt,Ve,an,sn,cn,un)}static fromJch(t,r,n){return z.fromJchInViewingConditions(t,r,n,Q.DEFAULT)}static fromJchInViewingConditions(t,r,n,o){const a=4/o.c*Math.sqrt(t/100)*(o.aw+4)*o.fLRoot,i=r*o.fLRoot,c=r/Math.sqrt(t/100),s=50*Math.sqrt(c*o.c/(o.aw+4)),l=n*Math.PI/180,u=(1+100*.007)*t/(1+.007*t),h=1/.0228*Math.log(1+.0228*i),f=h*Math.cos(l),g=h*Math.sin(l);return new z(n,r,t,a,i,s,u,f,g)}static fromUcs(t,r,n){return z.fromUcsInViewingConditions(t,r,n,Q.DEFAULT)}static fromUcsInViewingConditions(t,r,n,o){const a=r,i=n,c=Math.sqrt(a*a+i*i),l=(Math.exp(c*.0228)-1)/.0228/o.fLRoot;let u=Math.atan2(i,a)*(180/Math.PI);u<0&&(u+=360);const h=t/(1-(t-100)*.007);return z.fromJchInViewingConditions(h,l,u,o)}toInt(){return this.viewed(Q.DEFAULT)}viewed(t){const r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),o=this.hue*Math.PI/180,a=.25*(Math.cos(o+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),c=a*(5e4/13)*t.nc*t.ncb,s=i/t.nbb,l=Math.sin(o),u=Math.cos(o),h=23*(s+.305)*n/(23*c+11*n*u+108*n*l),f=h*u,g=h*l,p=(460*s+451*f+288*g)/1403,m=(460*s-891*f-261*g)/1403,b=(460*s-220*f-6300*g)/1403,I=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),O=U(p)*(100/t.fl)*Math.pow(I,1/.42),A=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),k=U(m)*(100/t.fl)*Math.pow(A,1/.42),v=Math.max(0,27.13*Math.abs(b)/(400-Math.abs(b))),T=U(b)*(100/t.fl)*Math.pow(v,1/.42),F=O/t.rgbD[0],B=k/t.rgbD[1],R=T/t.rgbD[2],M=1.86206786*F-1.01125463*B+.14918677*R,J=.38752654*F+.62144744*B-.00897398*R,tt=-.0158415*F-.03412294*B+1.04996444*R;return hr(M,J,tt)}static fromXyzInViewingConditions(t,r,n,o){const a=.401288*t+.650173*r-.051461*n,i=-.250268*t+1.204414*r+.045854*n,c=-.002079*t+.048952*r+.953127*n,s=o.rgbD[0]*a,l=o.rgbD[1]*i,u=o.rgbD[2]*c,h=Math.pow(o.fl*Math.abs(s)/100,.42),f=Math.pow(o.fl*Math.abs(l)/100,.42),g=Math.pow(o.fl*Math.abs(u)/100,.42),p=U(s)*400*h/(h+27.13),m=U(l)*400*f/(f+27.13),b=U(u)*400*g/(g+27.13),I=(11*p+-12*m+b)/11,O=(p+m-2*b)/9,A=(20*p+20*m+21*b)/20,k=(40*p+20*m+b)/20,T=Math.atan2(O,I)*180/Math.PI,F=T<0?T+360:T>=360?T-360:T,B=F*Math.PI/180,R=k*o.nbb,M=100*Math.pow(R/o.aw,o.c*o.z),J=4/o.c*Math.sqrt(M/100)*(o.aw+4)*o.fLRoot,tt=F<20.14?F+360:F,V=1/4*(Math.cos(tt*Math.PI/180+2)+3.8),Ht=5e4/13*V*o.nc*o.ncb*Math.sqrt(I*I+O*O)/(A+.305),_t=Math.pow(Ht,.9)*Math.pow(1.64-Math.pow(.29,o.n),.73),dt=_t*Math.sqrt(M/100),Nt=dt*o.fLRoot,oe=50*Math.sqrt(_t*o.c/(o.aw+4)),ae=(1+100*.007)*M/(1+.007*M),ie=Math.log(1+.0228*Nt)/.0228,se=ie*Math.cos(B),zt=ie*Math.sin(B);return new z(F,dt,M,J,Nt,oe,ae,se,zt)}xyzInViewingConditions(t){const r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),o=this.hue*Math.PI/180,a=.25*(Math.cos(o+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),c=a*(5e4/13)*t.nc*t.ncb,s=i/t.nbb,l=Math.sin(o),u=Math.cos(o),h=23*(s+.305)*n/(23*c+11*n*u+108*n*l),f=h*u,g=h*l,p=(460*s+451*f+288*g)/1403,m=(460*s-891*f-261*g)/1403,b=(460*s-220*f-6300*g)/1403,I=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),O=U(p)*(100/t.fl)*Math.pow(I,1/.42),A=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),k=U(m)*(100/t.fl)*Math.pow(A,1/.42),v=Math.max(0,27.13*Math.abs(b)/(400-Math.abs(b))),T=U(b)*(100/t.fl)*Math.pow(v,1/.42),F=O/t.rgbD[0],B=k/t.rgbD[1],R=T/t.rgbD[2],M=1.86206786*F-1.01125463*B+.14918677*R,J=.38752654*F+.62144744*B-.00897398*R,tt=-.0158415*F-.03412294*B+1.04996444*R;return[M,J,tt]}}/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */let ht=class D{static sanitizeRadians(t){return(t+Math.PI*8)%(Math.PI*2)}static trueDelinearized(t){const r=t/100;let n=0;return r<=.0031308?n=r*12.92:n=1.055*Math.pow(r,1/2.4)-.055,n*255}static chromaticAdaptation(t){const r=Math.pow(Math.abs(t),.42);return U(t)*400*r/(r+27.13)}static hueOf(t){const r=Pt(t,D.SCALED_DISCOUNT_FROM_LINRGB),n=D.chromaticAdaptation(r[0]),o=D.chromaticAdaptation(r[1]),a=D.chromaticAdaptation(r[2]),i=(11*n+-12*o+a)/11,c=(n+o-2*a)/9;return Math.atan2(c,i)}static areInCyclicOrder(t,r,n){const o=D.sanitizeRadians(r-t),a=D.sanitizeRadians(n-t);return o<a}static intercept(t,r,n){return(r-t)/(n-t)}static lerpPoint(t,r,n){return[t[0]+(n[0]-t[0])*r,t[1]+(n[1]-t[1])*r,t[2]+(n[2]-t[2])*r]}static setCoordinate(t,r,n,o){const a=D.intercept(t[o],r,n[o]);return D.lerpPoint(t,a,n)}static isBounded(t){return 0<=t&&t<=100}static nthVertex(t,r){const n=D.Y_FROM_LINRGB[0],o=D.Y_FROM_LINRGB[1],a=D.Y_FROM_LINRGB[2],i=r%4<=1?0:100,c=r%2===0?0:100;if(r<4){const s=i,l=c,u=(t-s*o-l*a)/n;return D.isBounded(u)?[u,s,l]:[-1,-1,-1]}else if(r<8){const s=i,l=c,u=(t-l*n-s*a)/o;return D.isBounded(u)?[l,u,s]:[-1,-1,-1]}else{const s=i,l=c,u=(t-s*n-l*o)/a;return D.isBounded(u)?[s,l,u]:[-1,-1,-1]}}static bisectToSegment(t,r){let n=[-1,-1,-1],o=n,a=0,i=0,c=!1,s=!0;for(let l=0;l<12;l++){const u=D.nthVertex(t,l);if(u[0]<0)continue;const h=D.hueOf(u);if(!c){n=u,o=u,a=h,i=h,c=!0;continue}(s||D.areInCyclicOrder(a,h,i))&&(s=!1,D.areInCyclicOrder(a,r,h)?(o=u,i=h):(n=u,a=h))}return[n,o]}static midpoint(t,r){return[(t[0]+r[0])/2,(t[1]+r[1])/2,(t[2]+r[2])/2]}static criticalPlaneBelow(t){return Math.floor(t-.5)}static criticalPlaneAbove(t){return Math.ceil(t-.5)}static bisectToLimit(t,r){const n=D.bisectToSegment(t,r);let o=n[0],a=D.hueOf(o),i=n[1];for(let c=0;c<3;c++)if(o[c]!==i[c]){let s=-1,l=255;o[c]<i[c]?(s=D.criticalPlaneBelow(D.trueDelinearized(o[c])),l=D.criticalPlaneAbove(D.trueDelinearized(i[c]))):(s=D.criticalPlaneAbove(D.trueDelinearized(o[c])),l=D.criticalPlaneBelow(D.trueDelinearized(i[c])));for(let u=0;u<8&&!(Math.abs(l-s)<=1);u++){const h=Math.floor((s+l)/2),f=D.CRITICAL_PLANES[h],g=D.setCoordinate(o,f,i,c),p=D.hueOf(g);D.areInCyclicOrder(a,r,p)?(i=g,l=h):(o=g,a=p,s=h)}}return D.midpoint(o,i)}static inverseChromaticAdaptation(t){const r=Math.abs(t),n=Math.max(0,27.13*r/(400-r));return U(t)*Math.pow(n,1/.42)}static findResultByJ(t,r,n){let o=Math.sqrt(n)*11;const a=Q.DEFAULT,i=1/Math.pow(1.64-Math.pow(.29,a.n),.73),s=.25*(Math.cos(t+2)+3.8)*(5e4/13)*a.nc*a.ncb,l=Math.sin(t),u=Math.cos(t);for(let h=0;h<5;h++){const f=o/100,g=r===0||o===0?0:r/Math.sqrt(f),p=Math.pow(g*i,1/.9),b=a.aw*Math.pow(f,1/a.c/a.z)/a.nbb,I=23*(b+.305)*p/(23*s+11*p*u+108*p*l),O=I*u,A=I*l,k=(460*b+451*O+288*A)/1403,v=(460*b-891*O-261*A)/1403,T=(460*b-220*O-6300*A)/1403,F=D.inverseChromaticAdaptation(k),B=D.inverseChromaticAdaptation(v),R=D.inverseChromaticAdaptation(T),M=Pt([F,B,R],D.LINRGB_FROM_SCALED_DISCOUNT);if(M[0]<0||M[1]<0||M[2]<0)return 0;const J=D.Y_FROM_LINRGB[0],tt=D.Y_FROM_LINRGB[1],V=D.Y_FROM_LINRGB[2],G=J*M[0]+tt*M[1]+V*M[2];if(G<=0)return 0;if(h===4||Math.abs(G-n)<.002)return M[0]>100.01||M[1]>100.01||M[2]>100.01?0:At(M);o=o-(G-n)*o/(2*G)}return 0}static solveToInt(t,r,n){if(r<1e-4||n<1e-4||n>99.9999)return Pe(n);t=Ft(t);const o=t/180*Math.PI,a=ot(n),i=D.findResultByJ(o,r,a);if(i!==0)return i;const c=D.bisectToLimit(a,o);return At(c)}static solveToCam(t,r,n){return z.fromInt(D.solveToInt(t,r,n))}};ht.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]],ht.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]],ht.Y_FROM_LINRGB=[.2126,.7152,.0722],ht.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */let et=class Vt{static from(t,r,n){return new Vt(ht.solveToInt(t,r,n))}static fromInt(t){return new Vt(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(t){this.setInternalState(ht.solveToInt(t,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(t){this.setInternalState(ht.solveToInt(this.internalHue,t,this.internalTone))}get tone(){return this.internalTone}set tone(t){this.setInternalState(ht.solveToInt(this.internalHue,this.internalChroma,t))}constructor(t){this.argb=t;const r=z.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=It(t),this.argb=t}setInternalState(t){const r=z.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=It(t),this.argb=t}inViewingConditions(t){const n=z.fromInt(this.toInt()).xyzInViewingConditions(t),o=z.fromXyzInViewingConditions(n[0],n[1],n[2],Q.make());return Vt.from(o.hue,o.chroma,Ot(n[1]))}};/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */class x{static ratioOfTones(t,r){return t=H(0,100,t),r=H(0,100,r),x.ratioOfYs(ot(t),ot(r))}static ratioOfYs(t,r){const n=t>r?t:r,o=n===r?t:r;return(n+5)/(o+5)}static lighter(t,r){if(t<0||t>100)return-1;const n=ot(t),o=r*(n+5)-5,a=x.ratioOfYs(o,n),i=Math.abs(a-r);if(a<r&&i>.04)return-1;const c=Ot(o)+.4;return c<0||c>100?-1:c}static darker(t,r){if(t<0||t>100)return-1;const n=ot(t),o=(n+5)/r-5,a=x.ratioOfYs(n,o),i=Math.abs(a-r);if(a<r&&i>.04)return-1;const c=Ot(o)-.4;return c<0||c>100?-1:c}static lighterUnsafe(t,r){const n=x.lighter(t,r);return n<0?100:n}static darkerUnsafe(t,r){const n=x.darker(t,r);return n<0?0:n}}/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */class Wt{static isDisliked(t){const r=Math.round(t.hue)>=90&&Math.round(t.hue)<=111,n=Math.round(t.chroma)>16,o=Math.round(t.tone)<65;return r&&n&&o}static fixIfDisliked(t){return Wt.isDisliked(t)?et.from(t.hue,t.chroma,70):t}}/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */let C=class Z{static fromPalette(t){return new Z(t.name??"",t.palette,t.tone,t.isBackground??!1,t.background,t.secondBackground,t.contrastCurve,t.toneDeltaPair)}constructor(t,r,n,o,a,i,c,s){if(this.name=t,this.palette=r,this.tone=n,this.isBackground=o,this.background=a,this.secondBackground=i,this.contrastCurve=c,this.toneDeltaPair=s,this.hctCache=new Map,!a&&i)throw new Error(`Color ${t} has secondBackgrounddefined, but background is not defined.`);if(!a&&c)throw new Error(`Color ${t} has contrastCurvedefined, but background is not defined.`);if(a&&!c)throw new Error(`Color ${t} has backgrounddefined, but contrastCurve is not defined.`)}getArgb(t){return this.getHct(t).toInt()}getHct(t){const r=this.hctCache.get(t);if(r!=null)return r;const n=this.getTone(t),o=this.palette(t).getHct(n);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,o),o}getTone(t){const r=t.contrastLevel<0;if(this.toneDeltaPair){const n=this.toneDeltaPair(t),o=n.roleA,a=n.roleB,i=n.delta,c=n.polarity,s=n.stayTogether,u=this.background(t).getTone(t),h=c==="nearer"||c==="lighter"&&!t.isDark||c==="darker"&&t.isDark,f=h?o:a,g=h?a:o,p=this.name===f.name,m=t.isDark?1:-1,b=f.contrastCurve.get(t.contrastLevel),I=g.contrastCurve.get(t.contrastLevel),O=f.tone(t);let A=x.ratioOfTones(u,O)>=b?O:Z.foregroundTone(u,b);const k=g.tone(t);let v=x.ratioOfTones(u,k)>=I?k:Z.foregroundTone(u,I);return r&&(A=Z.foregroundTone(u,b),v=Z.foregroundTone(u,I)),(v-A)*m>=i||(v=H(0,100,A+i*m),(v-A)*m>=i||(A=H(0,100,v-i*m))),50<=A&&A<60?m>0?(A=60,v=Math.max(v,A+i*m)):(A=49,v=Math.min(v,A+i*m)):50<=v&&v<60&&(s?m>0?(A=60,v=Math.max(v,A+i*m)):(A=49,v=Math.min(v,A+i*m)):m>0?v=60:v=49),p?A:v}else{let n=this.tone(t);if(this.background==null)return n;const o=this.background(t).getTone(t),a=this.contrastCurve.get(t.contrastLevel);if(x.ratioOfTones(o,n)>=a||(n=Z.foregroundTone(o,a)),r&&(n=Z.foregroundTone(o,a)),this.isBackground&&50<=n&&n<60&&(x.ratioOfTones(49,o)>=a?n=49:n=60),this.secondBackground){const[i,c]=[this.background,this.secondBackground],[s,l]=[i(t).getTone(t),c(t).getTone(t)],[u,h]=[Math.max(s,l),Math.min(s,l)];if(x.ratioOfTones(u,n)>=a&&x.ratioOfTones(h,n)>=a)return n;const f=x.lighter(u,a),g=x.darker(h,a),p=[];return f!==-1&&p.push(f),g!==-1&&p.push(g),Z.tonePrefersLightForeground(s)||Z.tonePrefersLightForeground(l)?f<0?100:f:p.length===1?p[0]:g<0?0:g}return n}}static foregroundTone(t,r){const n=x.lighterUnsafe(t,r),o=x.darkerUnsafe(t,r),a=x.ratioOfTones(n,t),i=x.ratioOfTones(o,t);if(Z.tonePrefersLightForeground(t)){const s=Math.abs(a-i)<.1&&a<r&&i<r;return a>=r||a>=i||s?n:o}else return i>=r||i>=a?o:n}static tonePrefersLightForeground(t){return Math.round(t)<60}static toneAllowsLightForeground(t){return Math.round(t)<=49}static enableLightForeground(t){return Z.tonePrefersLightForeground(t)&&!Z.toneAllowsLightForeground(t)?49:t}};/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */class E{static fromInt(t){const r=et.fromInt(t);return E.fromHct(r)}static fromHct(t){return new E(t.hue,t.chroma,t)}static fromHueAndChroma(t,r){const n=new mr(t,r).create();return new E(t,r,n)}constructor(t,r,n){this.hue=t,this.chroma=r,this.keyColor=n,this.cache=new Map}tone(t){let r=this.cache.get(t);return r===void 0&&(r=et.from(this.hue,this.chroma,t).toInt(),this.cache.set(t,r)),r}getHct(t){return et.fromInt(this.tone(t))}}class mr{constructor(t,r){this.hue=t,this.requestedChroma=r,this.chromaCache=new Map,this.maxChromaValue=200}create(){let o=0,a=100;for(;o<a;){const i=Math.floor((o+a)/2),c=this.maxChroma(i)<this.maxChroma(i+1);if(this.maxChroma(i)>=this.requestedChroma-.01)if(Math.abs(o-50)<Math.abs(a-50))a=i;else{if(o===i)return et.from(this.hue,this.requestedChroma,o);o=i}else c?o=i+1:a=i}return et.from(this.hue,this.requestedChroma,o)}maxChroma(t){if(this.chromaCache.has(t))return this.chromaCache.get(t);const r=et.from(this.hue,this.maxChromaValue,t).chroma;return this.chromaCache.set(t,r),r}}/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */let P=class{constructor(t,r,n,o){this.low=t,this.normal=r,this.medium=n,this.high=o}get(t){return t<=-1?this.low:t<0?lt(this.low,this.normal,(t- -1)/1):t<.5?lt(this.normal,this.medium,(t-0)/.5):t<1?lt(this.medium,this.high,(t-.5)/.5):this.high}};/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */let W=class{constructor(t,r,n,o,a){this.roleA=t,this.roleB=r,this.delta=n,this.polarity=o,this.stayTogether=a}};/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */var Mt;(function(e){e[e.MONOCHROME=0]="MONOCHROME",e[e.NEUTRAL=1]="NEUTRAL",e[e.TONAL_SPOT=2]="TONAL_SPOT",e[e.VIBRANT=3]="VIBRANT",e[e.EXPRESSIVE=4]="EXPRESSIVE",e[e.FIDELITY=5]="FIDELITY",e[e.CONTENT=6]="CONTENT",e[e.RAINBOW=7]="RAINBOW",e[e.FRUIT_SALAD=8]="FRUIT_SALAD"})(Mt||(Mt={}));/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */function vt(e){return e.variant===Mt.FIDELITY||e.variant===Mt.CONTENT}function j(e){return e.variant===Mt.MONOCHROME}function pr(e,t,r,n){let o=r,a=et.from(e,t,r);if(a.chroma<t){let i=a.chroma;for(;a.chroma<t;){o+=n?-1:1;const c=et.from(e,t,o);if(i>c.chroma||Math.abs(c.chroma-t)<.4)break;const s=Math.abs(c.chroma-t),l=Math.abs(a.chroma-t);s<l&&(a=c),i=Math.max(i,c.chroma)}}return o}class d{static highestSurface(t){return t.isDark?d.surfaceBright:d.surfaceDim}}d.contentAccentToneDelta=15,d.primaryPaletteKeyColor=C.fromPalette({name:"primary_palette_key_color",palette:e=>e.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone}),d.secondaryPaletteKeyColor=C.fromPalette({name:"secondary_palette_key_color",palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone}),d.tertiaryPaletteKeyColor=C.fromPalette({name:"tertiary_palette_key_color",palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone}),d.neutralPaletteKeyColor=C.fromPalette({name:"neutral_palette_key_color",palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone}),d.neutralVariantPaletteKeyColor=C.fromPalette({name:"neutral_variant_palette_key_color",palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone}),d.background=C.fromPalette({name:"background",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),d.onBackground=C.fromPalette({name:"on_background",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>d.background,contrastCurve:new P(3,3,4.5,7)}),d.surface=C.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),d.surfaceDim=C.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:new P(87,87,80,75).get(e.contrastLevel),isBackground:!0}),d.surfaceBright=C.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?new P(24,24,29,34).get(e.contrastLevel):98,isBackground:!0}),d.surfaceContainerLowest=C.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new P(4,4,2,0).get(e.contrastLevel):100,isBackground:!0}),d.surfaceContainerLow=C.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.isDark?new P(10,10,11,12).get(e.contrastLevel):new P(96,96,96,95).get(e.contrastLevel),isBackground:!0}),d.surfaceContainer=C.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.isDark?new P(12,12,16,20).get(e.contrastLevel):new P(94,94,92,90).get(e.contrastLevel),isBackground:!0}),d.surfaceContainerHigh=C.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.isDark?new P(17,17,21,25).get(e.contrastLevel):new P(92,92,88,85).get(e.contrastLevel),isBackground:!0}),d.surfaceContainerHighest=C.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new P(22,22,26,30).get(e.contrastLevel):new P(90,90,84,80).get(e.contrastLevel),isBackground:!0}),d.onSurface=C.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>d.highestSurface(e),contrastCurve:new P(4.5,7,11,21)}),d.surfaceVariant=C.fromPalette({name:"surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0}),d.onSurfaceVariant=C.fromPalette({name:"on_surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>d.highestSurface(e),contrastCurve:new P(3,4.5,7,11)}),d.inverseSurface=C.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20}),d.inverseOnSurface=C.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>d.inverseSurface,contrastCurve:new P(4.5,7,11,21)}),d.outline=C.fromPalette({name:"outline",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>d.highestSurface(e),contrastCurve:new P(1.5,3,4.5,7)}),d.outlineVariant=C.fromPalette({name:"outline_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>d.highestSurface(e),contrastCurve:new P(1,1,3,4.5)}),d.shadow=C.fromPalette({name:"shadow",palette:e=>e.neutralPalette,tone:e=>0}),d.scrim=C.fromPalette({name:"scrim",palette:e=>e.neutralPalette,tone:e=>0}),d.surfaceTint=C.fromPalette({name:"surface_tint",palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0}),d.primary=C.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>j(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(3,4.5,7,7),toneDeltaPair:e=>new W(d.primaryContainer,d.primary,10,"nearer",!1)}),d.onPrimary=C.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,tone:e=>j(e)?e.isDark?10:90:e.isDark?20:100,background:e=>d.primary,contrastCurve:new P(4.5,7,11,21)}),d.primaryContainer=C.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>vt(e)?e.sourceColorHct.tone:j(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(1,1,3,4.5),toneDeltaPair:e=>new W(d.primaryContainer,d.primary,10,"nearer",!1)}),d.onPrimaryContainer=C.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,tone:e=>vt(e)?C.foregroundTone(d.primaryContainer.tone(e),4.5):j(e)?e.isDark?0:100:e.isDark?90:30,background:e=>d.primaryContainer,contrastCurve:new P(3,4.5,7,11)}),d.inversePrimary=C.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>d.inverseSurface,contrastCurve:new P(3,4.5,7,7)}),d.secondary=C.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(3,4.5,7,7),toneDeltaPair:e=>new W(d.secondaryContainer,d.secondary,10,"nearer",!1)}),d.onSecondary=C.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,tone:e=>j(e)?e.isDark?10:100:e.isDark?20:100,background:e=>d.secondary,contrastCurve:new P(4.5,7,11,21)}),d.secondaryContainer=C.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>{const t=e.isDark?30:90;return j(e)?e.isDark?30:85:vt(e)?pr(e.secondaryPalette.hue,e.secondaryPalette.chroma,t,!e.isDark):t},isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(1,1,3,4.5),toneDeltaPair:e=>new W(d.secondaryContainer,d.secondary,10,"nearer",!1)}),d.onSecondaryContainer=C.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,tone:e=>j(e)?e.isDark?90:10:vt(e)?C.foregroundTone(d.secondaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>d.secondaryContainer,contrastCurve:new P(3,4.5,7,11)}),d.tertiary=C.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>j(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(3,4.5,7,7),toneDeltaPair:e=>new W(d.tertiaryContainer,d.tertiary,10,"nearer",!1)}),d.onTertiary=C.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,tone:e=>j(e)?e.isDark?10:90:e.isDark?20:100,background:e=>d.tertiary,contrastCurve:new P(4.5,7,11,21)}),d.tertiaryContainer=C.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>{if(j(e))return e.isDark?60:49;if(!vt(e))return e.isDark?30:90;const t=e.tertiaryPalette.getHct(e.sourceColorHct.tone);return Wt.fixIfDisliked(t).tone},isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(1,1,3,4.5),toneDeltaPair:e=>new W(d.tertiaryContainer,d.tertiary,10,"nearer",!1)}),d.onTertiaryContainer=C.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>j(e)?e.isDark?0:100:vt(e)?C.foregroundTone(d.tertiaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>d.tertiaryContainer,contrastCurve:new P(3,4.5,7,11)}),d.error=C.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(3,4.5,7,7),toneDeltaPair:e=>new W(d.errorContainer,d.error,10,"nearer",!1)}),d.onError=C.fromPalette({name:"on_error",palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>d.error,contrastCurve:new P(4.5,7,11,21)}),d.errorContainer=C.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(1,1,3,4.5),toneDeltaPair:e=>new W(d.errorContainer,d.error,10,"nearer",!1)}),d.onErrorContainer=C.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,tone:e=>j(e)?e.isDark?90:10:e.isDark?90:30,background:e=>d.errorContainer,contrastCurve:new P(3,4.5,7,11)}),d.primaryFixed=C.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>j(e)?40:90,isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(1,1,3,4.5),toneDeltaPair:e=>new W(d.primaryFixed,d.primaryFixedDim,10,"lighter",!0)}),d.primaryFixedDim=C.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>j(e)?30:80,isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(1,1,3,4.5),toneDeltaPair:e=>new W(d.primaryFixed,d.primaryFixedDim,10,"lighter",!0)}),d.onPrimaryFixed=C.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,tone:e=>j(e)?100:10,background:e=>d.primaryFixedDim,secondBackground:e=>d.primaryFixed,contrastCurve:new P(4.5,7,11,21)}),d.onPrimaryFixedVariant=C.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,tone:e=>j(e)?90:30,background:e=>d.primaryFixedDim,secondBackground:e=>d.primaryFixed,contrastCurve:new P(3,4.5,7,11)}),d.secondaryFixed=C.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>j(e)?80:90,isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(1,1,3,4.5),toneDeltaPair:e=>new W(d.secondaryFixed,d.secondaryFixedDim,10,"lighter",!0)}),d.secondaryFixedDim=C.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>j(e)?70:80,isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(1,1,3,4.5),toneDeltaPair:e=>new W(d.secondaryFixed,d.secondaryFixedDim,10,"lighter",!0)}),d.onSecondaryFixed=C.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>10,background:e=>d.secondaryFixedDim,secondBackground:e=>d.secondaryFixed,contrastCurve:new P(4.5,7,11,21)}),d.onSecondaryFixedVariant=C.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,tone:e=>j(e)?25:30,background:e=>d.secondaryFixedDim,secondBackground:e=>d.secondaryFixed,contrastCurve:new P(3,4.5,7,11)}),d.tertiaryFixed=C.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>j(e)?40:90,isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(1,1,3,4.5),toneDeltaPair:e=>new W(d.tertiaryFixed,d.tertiaryFixedDim,10,"lighter",!0)}),d.tertiaryFixedDim=C.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>j(e)?30:80,isBackground:!0,background:e=>d.highestSurface(e),contrastCurve:new P(1,1,3,4.5),toneDeltaPair:e=>new W(d.tertiaryFixed,d.tertiaryFixedDim,10,"lighter",!0)}),d.onTertiaryFixed=C.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>j(e)?100:10,background:e=>d.tertiaryFixedDim,secondBackground:e=>d.tertiaryFixed,contrastCurve:new P(4.5,7,11,21)}),d.onTertiaryFixedVariant=C.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,tone:e=>j(e)?90:30,background:e=>d.tertiaryFixedDim,secondBackground:e=>d.tertiaryFixed,contrastCurve:new P(3,4.5,7,11)});/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */function Te(e){const t=ke(e),r=Ce(e),n=we(e),o=[t.toString(16),r.toString(16),n.toString(16)];for(const[a,i]of o.entries())i.length===1&&(o[a]="0"+i);return"#"+o.join("")}function gt(e){e=e.replace("#","");const t=e.length===3,r=e.length===6,n=e.length===8;if(!t&&!r&&!n)throw new Error("unexpected hex "+e);let o=0,a=0,i=0;return t?(o=at(e.slice(0,1).repeat(2)),a=at(e.slice(1,2).repeat(2)),i=at(e.slice(2,3).repeat(2))):r?(o=at(e.slice(0,2)),a=at(e.slice(2,4)),i=at(e.slice(4,6))):n&&(o=at(e.slice(2,4)),a=at(e.slice(4,6)),i=at(e.slice(6,8))),(255<<24|(o&255)<<16|(a&255)<<8|i&255)>>>0}function at(e){return parseInt(e,16)}var yr=Object.defineProperty,br=(e,t,r)=>t in e?yr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t,r)=>br(e,typeof t!="symbol"?t+"":t,r);class vr{constructor({colorApi:t,pluginApi:r,context:n,paletteApi:o}){L(this,"colors"),L(this,"plugins"),L(this,"context"),L(this,"palettes"),t.api=this,this.context=n,this.plugins=r,this.colors=t,this.palettes=o}async load(){return this.plugins.loadPlugins()}}/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */const Tt=class ${static solveToInt(t,r,n){if(r<1e-4||n<1e-4||n>99.9999)return Pe(n);t=Ft(t);const o=t/180*Math.PI,a=ot(n),i=$.findResultByJ(o,r,a);if(i!==0)return i;const c=$.bisectToLimit(a,o);return At(c)}static solveToCam(t,r,n){return z.fromInt($.solveToInt(t,r,n))}static sanitizeRadians(t){return(t+Math.PI*8)%(Math.PI*2)}static trueDelinearized(t){const r=t/100;let n=0;return r<=.0031308?n=r*12.92:n=1.055*Math.pow(r,1/2.4)-.055,n*255}static chromaticAdaptation(t){const r=Math.pow(Math.abs(t),.42);return U(t)*400*r/(r+27.13)}static hueOf(t){const r=Pt(t,$.SCALED_DISCOUNT_FROM_LINRGB),n=$.chromaticAdaptation(r[0]),o=$.chromaticAdaptation(r[1]),a=$.chromaticAdaptation(r[2]),i=(11*n+-12*o+a)/11,c=(n+o-2*a)/9;return Math.atan2(c,i)}static areInCyclicOrder(t,r,n){const o=$.sanitizeRadians(r-t),a=$.sanitizeRadians(n-t);return o<a}static intercept(t,r,n){return(r-t)/(n-t)}static lerpPoint(t,r,n){return[t[0]+(n[0]-t[0])*r,t[1]+(n[1]-t[1])*r,t[2]+(n[2]-t[2])*r]}static setCoordinate(t,r,n,o){const a=$.intercept(t[o],r,n[o]);return $.lerpPoint(t,a,n)}static isBounded(t){return 0<=t&&t<=100}static nthVertex(t,r){const n=$.Y_FROM_LINRGB[0],o=$.Y_FROM_LINRGB[1],a=$.Y_FROM_LINRGB[2],i=r%4<=1?0:100,c=r%2===0?0:100;if(r<4){const s=i,l=c,u=(t-s*o-l*a)/n;return $.isBounded(u)?[u,s,l]:[-1,-1,-1]}else if(r<8){const s=i,l=c,u=(t-l*n-s*a)/o;return $.isBounded(u)?[l,u,s]:[-1,-1,-1]}else{const s=i,l=c,u=(t-s*n-l*o)/a;return $.isBounded(u)?[s,l,u]:[-1,-1,-1]}}static bisectToSegment(t,r){let n=[-1,-1,-1],o=n,a=0,i=0,c=!1,s=!0;for(let l=0;l<12;l++){const u=$.nthVertex(t,l);if(u[0]<0)continue;const h=$.hueOf(u);if(!c){n=u,o=u,a=h,i=h,c=!0;continue}(s||$.areInCyclicOrder(a,h,i))&&(s=!1,$.areInCyclicOrder(a,r,h)?(o=u,i=h):(n=u,a=h))}return[n,o]}static midpoint(t,r){return[(t[0]+r[0])/2,(t[1]+r[1])/2,(t[2]+r[2])/2]}static criticalPlaneBelow(t){return Math.floor(t-.5)}static criticalPlaneAbove(t){return Math.ceil(t-.5)}static bisectToLimit(t,r){const n=$.bisectToSegment(t,r);let o=n[0],a=$.hueOf(o),i=n[1];for(let c=0;c<3;c++)if(o[c]!==i[c]){let s=-1,l=255;o[c]<i[c]?(s=$.criticalPlaneBelow($.trueDelinearized(o[c])),l=$.criticalPlaneAbove($.trueDelinearized(i[c]))):(s=$.criticalPlaneAbove($.trueDelinearized(o[c])),l=$.criticalPlaneBelow($.trueDelinearized(i[c])));for(let u=0;u<8&&!(Math.abs(l-s)<=1);u++){const h=Math.floor((s+l)/2),f=$.CRITICAL_PLANES[h],g=$.setCoordinate(o,f,i,c),p=$.hueOf(g);$.areInCyclicOrder(a,r,p)?(i=g,l=h):(o=g,a=p,s=h)}}return $.midpoint(o,i)}static inverseChromaticAdaptation(t){const r=Math.abs(t),n=Math.max(0,27.13*r/(400-r));return U(t)*Math.pow(n,1/.42)}static findResultByJ(t,r,n){let o=Math.sqrt(n)*11;const a=Q.DEFAULT,i=1/Math.pow(1.64-Math.pow(.29,a.n),.73),s=.25*(Math.cos(t+2)+3.8)*(5e4/13)*a.nc*a.ncb,l=Math.sin(t),u=Math.cos(t);for(let h=0;h<5;h++){const f=o/100,g=r===0||o===0?0:r/Math.sqrt(f),p=Math.pow(g*i,1/.9),b=a.aw*Math.pow(f,1/a.c/a.z)/a.nbb,I=23*(b+.305)*p/(23*s+11*p*u+108*p*l),O=I*u,A=I*l,k=(460*b+451*O+288*A)/1403,v=(460*b-891*O-261*A)/1403,T=(460*b-220*O-6300*A)/1403,F=$.inverseChromaticAdaptation(k),B=$.inverseChromaticAdaptation(v),R=$.inverseChromaticAdaptation(T),M=Pt([F,B,R],$.LINRGB_FROM_SCALED_DISCOUNT);if(M[0]<0||M[1]<0||M[2]<0)return 0;const J=$.Y_FROM_LINRGB[0],tt=$.Y_FROM_LINRGB[1],V=$.Y_FROM_LINRGB[2],G=J*M[0]+tt*M[1]+V*M[2];if(G<=0)return 0;if(h===4||Math.abs(G-n)<.002)return M[0]>100.01||M[1]>100.01||M[2]>100.01?0:At(M);o=o-(G-n)*o/(2*G)}return 0}};L(Tt,"SCALED_DISCOUNT_FROM_LINRGB",[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]]),L(Tt,"LINRGB_FROM_SCALED_DISCOUNT",[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]]),L(Tt,"Y_FROM_LINRGB",[.2126,.7152,.0722]),L(Tt,"CRITICAL_PLANES",[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776]);let xt=Tt;/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */class w{constructor(t){L(this,"internalHue"),L(this,"internalChroma"),L(this,"internalTone"),this.argb=t;const r=z.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=It(t),this.argb=t}get hue(){return this.internalHue}set hue(t){this.setInternalState(xt.solveToInt(t,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(t){this.setInternalState(xt.solveToInt(this.internalHue,t,this.internalTone))}get tone(){return this.internalTone}set tone(t){this.setInternalState(xt.solveToInt(this.internalHue,this.internalChroma,t))}static from(t,r,n){return new w(xt.solveToInt(t,r,n))}static fromInt(t){return new w(t)}static isBlue(t){return t>=250&&t<270}static isYellow(t){return t>=105&&t<125}static isCyan(t){return t>=170&&t<207}toInt(){return this.argb}setValue(t,r){this[t]=r}toString(){return`HCT(${this.hue.toFixed(0)}, ${this.chroma.toFixed(0)}, ${this.tone.toFixed(0)})`}inViewingConditions(t){const n=z.fromInt(this.toInt()).xyzInViewingConditions(t),o=z.fromXyzInViewingConditions(n[0],n[1],n[2],Q.make());return w.from(o.hue,o.chroma,Ot(n[1]))}setInternalState(t){const r=z.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=It(t),this.argb=t}}/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */class it{constructor(t,r,n,o){this.low=t,this.normal=r,this.medium=n,this.high=o}get(t){return t<=-1?this.low:t<0?lt(this.low,this.normal,(t- -1)/1):t<.5?lt(this.normal,this.medium,(t-0)/.5):t<1?lt(this.medium,this.high,(t-.5)/.5):this.high}}function y(e){return e===1.5?new it(1.5,1.5,3,4.5):e===3?new it(3,3,4.5,7):e===4.5?new it(4.5,4.5,7,11):e===6?new it(6,6,7,11):e===7?new it(7,7,11,21):e===9?new it(9,9,11,21):e===11?new it(11,11,21,21):e===21?new it(21,21,21,21):new it(e,e,7,21)}function S(e,t=0,r=100,n=1){const o=De(e.hue,e.chroma*n,100,!0);return H(t,r,o)}function q(e,t=0,r=100){const n=De(e.hue,e.chroma,0,!1);return H(t,r,n)}function De(e,t,r,n){let o=r,a=w.from(e,t,o);for(;a.chroma<t&&!(r<0||r>100);){r+=n?-1:1;const i=w.from(e,t,r);a.chroma<i.chroma&&(a=i,o=r)}return o}function kr(e,t,r){if(x.ratioOfTones(e,t)>=r)return 0;const o=x.lighter(e,r),a=x.darker(e,r);if(o!==-1&&t<o){const i=(t-o)/(e-o);return H(0,1,i)}if(a!==-1&&t>a){const i=(t-a)/(e-a);return H(0,1,i)}return 0}/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */class K{constructor(t,r,n,o,a,i,c,s,l){if(this.name=t,this.palette=r,this.tone=n,this.isBackground=o,this.chromaMultiplier=a,this.background=i,this.secondBackground=c,this.contrastCurve=s,this.adjustTone=l,!i&&c)throw new Error(`Color ${t} has secondBackgrounddefined, but background is not defined.`);if(!i&&s)throw new Error(`Color ${t} has contrastCurvedefined, but background is not defined.`);if(i&&!s)throw new Error(`Color ${t} has backgrounddefined, but contrastCurve is not defined.`)}static fromPalette(t){return new K(t.name??"",t.palette,t.tone??(()=>K.getInitialToneFromBackground(t.background)),t.isBackground??!1,t.chromaMultiplier,t.background,t.secondBackground,t.contrastCurve,t.adjustTone)}static foregroundTone(t,r){const n=x.lighterUnsafe(t,r),o=x.darkerUnsafe(t,r),a=x.ratioOfTones(n,t),i=x.ratioOfTones(o,t);if(K.tonePrefersLightForeground(t)){const s=Math.abs(a-i)<.1&&a<r&&i<r;return a>=r||a>=i||s?n:o}else return i>=r||i>=a?o:n}static tonePrefersLightForeground(t){return Math.round(t)<60}static toneAllowsLightForeground(t){return Math.round(t)<=49}static enableLightForeground(t){return K.tonePrefersLightForeground(t)&&!K.toneAllowsLightForeground(t)?49:t}clone(){return K.fromPalette({name:this.name,palette:this.palette,tone:this.tone,isBackground:this.isBackground,chromaMultiplier:this.chromaMultiplier,background:this.background,secondBackground:this.secondBackground,contrastCurve:this.contrastCurve,adjustTone:this.adjustTone})}getArgb(t){return this.getHct(t).toInt()}getHct(t){const r=this.palette(t),n=this.getTone(t),o=r.hue,a=r.chroma*(this.chromaMultiplier?this.chromaMultiplier(t):1);return w.from(o,a,n)}getTone(t){const r=this.adjustTone?this.adjustTone(t):void 0;if(r)return r({scheme:t,dynamicColor:this});{let n=this.tone(t);if(this.background==null||this.background(t)===void 0||this.contrastCurve==null||this.contrastCurve(t)===void 0)return n;const o=this.background(t).getTone(t),a=this.contrastCurve(t).get(t.contrastLevel);if(n=x.ratioOfTones(o,n)>=a&&t.contrastLevel>=0?n:K.foregroundTone(o,a),this.isBackground&&!this.name.endsWith("_fixed_dim")&&(n>=57?n=H(65,100,n):n=H(0,49,n)),this.secondBackground==null||this.secondBackground(t)===void 0)return n;const[i,c]=[this.background,this.secondBackground],[s,l]=[i(t).getTone(t),c(t).getTone(t)],[u,h]=[Math.max(s,l),Math.min(s,l)];if(x.ratioOfTones(u,n)>=a&&x.ratioOfTones(h,n)>=a)return n;const f=x.lighter(u,a),g=x.darker(h,a),p=[];return f!==-1&&p.push(f),g!==-1&&p.push(g),K.tonePrefersLightForeground(s)||K.tonePrefersLightForeground(l)?f<0?100:f:p.length===1?p[0]:g<0?0:g}}}/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */class Cr{constructor(t,r,n,o,a,i){this.roleA=t,this.roleB=r,this.delta=n,this.polarity=o,this.stayTogether=a,this.constraint=i,this.constraint=i??"exact"}adjustedTone({context:t,color:r}){const n=this.roleA,o=this.roleB,a=this.polarity,i=this.constraint,c=a==="darker"||a==="relative_lighter"&&t.isDark||a==="relative_darker"&&!t.isDark?-this.delta:this.delta,s=r.name===n.name,l=s?n:o,u=s?o:n;if(!(l instanceof Lt))throw new Error("selfRole is not a ColorFromPalette");let h=l.options.tone;const f=u.getTone(),g=c*(s?1:-1);if(i==="exact"?h=H(0,100,f+g):i==="nearer"?g>0?h=H(0,100,H(f,f+g,h)):h=H(0,100,H(f+g,f,h)):i==="farther"&&(g>0?h=H(f+g,100,h):h=H(0,f+g,h)),r instanceof Lt){if(r.options.background&&r.options.contrastCurve){const p=r.options.background,m=r.options.contrastCurve;if(p&&m){const b=p.getTone(),I=m.get(t.contrastLevel);h=x.ratioOfTones(b,h)>=I&&t.contrastLevel>=0?h:C.foregroundTone(b,I)}}r.options.isBackground&&!r.name.endsWith("_fixed_dim")&&(h>=57?h=H(65,100,h):h=H(0,49,h))}return h}}const _=(...e)=>t=>new Cr(...e).adjustedTone(t);function wr(e){return{r:e>>16&255,g:e>>8&255,b:e&255}}function qt(e){return e===void 0?50:e.getTone()}class Kt{constructor(t){this.name=t}static maxChroma(t,r=50){return w.from(t,200,r).chroma}getHex(){return Te(this.getArgb())}getArgb(){return this.getHct().toInt()}getRgb(){return wr(this.getArgb())}getTone(){return this.getHct().tone}}class Pr extends Kt{constructor(t,r,n){super(t),this.as=r,this.colorService=n}getHct(){return this.colorService.get(this.as).getHct()}color(){return this.colorService.get(this.as)}}class Mr extends Kt{constructor(t,r){super(t),this._hex=r,this._hex=r}getHct(){return w.fromInt(gt(this.getHex()))}getHex(){return this._hex}setHex(t){this._hex=t}}class Lt extends Kt{constructor(t,r,n){super(t),this._options=r,this.context=n,this.validateOption()}get options(){var t,r,n,o,a,i,c,s,l,u,h,f;const g={...this._options,palette:this._options.palette(),tone:(r=(t=this._options).tone)==null?void 0:r.call(t),chromaMultiplier:(o=(n=this._options).chromaMultiplier)==null?void 0:o.call(n),background:(i=(a=this._options).background)==null?void 0:i.call(a),secondBackground:(s=(c=this._options).secondBackground)==null?void 0:s.call(c),contrastCurve:(u=(l=this._options).contrastCurve)==null?void 0:u.call(l),adjustTone:(f=(h=this._options).adjustTone)==null?void 0:f.call(h)};return{...g,chromaMultiplier:g.chromaMultiplier??1,tone:g.tone??qt(g.background)}}update(t){this._options={...this._options,...t},this.validateOption()}validateOption(){const t=this._options;if("palette"in t){if(!t.background&&t.secondBackground)throw new Error(`Color ${this.name} has secondBackground defined, but background is not defined.`);if(!t.background&&t.contrastCurve)throw new Error(`Color ${this.name} has contrastCurve defined, but background is not defined.`);if(t.background&&!t.contrastCurve)throw new Error(`Color ${this.name} has background defined, but contrastCurve is not defined.`)}}getHct(){const t=this.options,r=t.palette,n=this.getTone(),o=r.hue,a=r.chroma*t.chromaMultiplier;return w.from(o,a,n)}getTone(){const t=this.context,r=this.options,n=r.adjustTone;if(n)return n({context:t,color:this});{let o=r.tone;if(!r.background||!r.contrastCurve)return o;const a=r.background.getTone(),i=r.contrastCurve.get(t.contrastLevel);if(o=x.ratioOfTones(a,o)>=i&&t.contrastLevel>=0?o:K.foregroundTone(a,i),r.isBackground&&!this.name.endsWith("_fixed_dim")&&(o>=57?o=H(65,100,o):o=H(0,49,o)),!r.secondBackground)return o;const[c,s]=[r.background,r.secondBackground],[l,u]=[c.getTone(),s.getTone()],[h,f]=[Math.max(l,u),Math.min(l,u)];if(x.ratioOfTones(h,o)>=i&&x.ratioOfTones(f,o)>=i)return o;const g=x.lighter(h,i),p=x.darker(f,i),m=[];return g!==-1&&m.push(g),p!==-1&&m.push(p),K.tonePrefersLightForeground(l)||K.tonePrefersLightForeground(u)?g<0?100:g:m.length===1?m[0]:p<0?0:p}}}const N=(e,t)=>(t instanceof Xt,e.isDark?t.get("surfaceBright"):t.get("surfaceDim")),Bt=({colors:e,context:t,palettes:r})=>{const n=o=>e.get(o);return{surface:{palette:()=>r.get("neutral"),tone:()=>t.isDark?4:w.isYellow(r.get("neutral").hue)?99:t.variant.name==="vibrant"?97:98,isBackground:!0},surfaceDim:{palette:()=>r.get("neutral"),tone:()=>t.isDark?4:w.isYellow(r.get("neutral").hue)?90:t.variant.name==="vibrant"?85:87,isBackground:!0,chromaMultiplier:()=>{if(!t.isDark){if(t.variant.name==="neutral")return 2.5;if(t.variant.name==="tonalSpot")return 1.7;if(t.variant.name==="expressive")return w.isYellow(r.get("neutral").hue)?2.7:1.75;if(t.variant.name==="vibrant")return 1.36}return 1}},surfaceBright:{palette:()=>r.get("neutral"),tone:()=>t.isDark?18:w.isYellow(r.get("neutral").hue)?99:t.variant.name==="vibrant"?97:98,isBackground:!0,chromaMultiplier:()=>{if(t.isDark){if(t.variant.name==="neutral")return 2.5;if(t.variant.name==="tonalSpot")return 1.7;if(t.variant.name==="expressive")return w.isYellow(r.get("neutral").hue)?2.7:1.75;if(t.variant.name==="vibrant")return 1.36}return 1}},surfaceContainerLowest:{palette:()=>r.get("neutral"),tone:()=>t.isDark?0:100,isBackground:!0},surfaceContainerLow:{palette:()=>r.get("neutral"),tone:()=>t.isDark?6:w.isYellow(r.get("neutral").hue)?98:t.variant.name==="vibrant"?95:96,isBackground:!0,chromaMultiplier:()=>t.variant.name==="neutral"?1.3:t.variant.name==="tonalSpot"?1.25:t.variant.name==="expressive"?w.isYellow(r.get("neutral").hue)?1.3:1.15:t.variant.name==="vibrant"?1.08:1},surfaceContainer:{palette:()=>r.get("neutral"),tone:()=>t.isDark?9:w.isYellow(r.get("neutral").hue)?96:t.variant.name==="vibrant"?92:94,isBackground:!0,chromaMultiplier:()=>t.variant.name==="neutral"?1.6:t.variant.name==="tonalSpot"?1.4:t.variant.name==="expressive"?w.isYellow(r.get("neutral").hue)?1.6:1.3:t.variant.name==="vibrant"?1.15:1},surfaceContainerHigh:{palette:()=>r.get("neutral"),tone:()=>t.isDark?12:w.isYellow(r.get("neutral").hue)?94:t.variant.name==="vibrant"?90:92,isBackground:!0,chromaMultiplier:()=>t.variant.name==="neutral"?1.9:t.variant.name==="tonalSpot"?1.5:t.variant.name==="expressive"?w.isYellow(r.get("neutral").hue)?1.95:1.45:t.variant.name==="vibrant"?1.22:1},surfaceContainerHighest:{palette:()=>r.get("neutral"),tone:()=>t.isDark?15:w.isYellow(r.get("neutral").hue)?92:t.variant.name==="vibrant"?88:90,isBackground:!0,chromaMultiplier:()=>t.variant.name==="neutral"?2.2:t.variant.name==="tonalSpot"?1.7:t.variant.name==="expressive"?w.isYellow(r.get("neutral").hue)?2.3:1.6:t.variant.name==="vibrant"?1.29:1},onSurface:{palette:()=>r.get("neutral"),tone:()=>t.variant.name==="vibrant"?S(r.get("neutral"),0,100,1.1):qt(N(t,e)),chromaMultiplier:()=>t.variant.name==="neutral"?2.2:t.variant.name==="tonalSpot"?1.7:t.variant.name==="expressive"?w.isYellow(r.get("neutral").hue)?t.isDark?3:2.3:1.6:1,background:()=>N(t,e),contrastCurve:()=>t.isDark?y(11):y(9)},onSurfaceVariant:{palette:()=>r.get("neutralVariant"),chromaMultiplier:()=>t.variant.name==="neutral"?2.2:t.variant.name==="tonalSpot"?1.7:t.variant.name==="expressive"?w.isYellow(r.get("neutral").hue)?t.isDark?3:2.3:1.6:1,background:()=>N(t,e),contrastCurve:()=>t.isDark?y(6):y(4.5)},outline:{palette:()=>r.get("neutralVariant"),chromaMultiplier:()=>t.variant.name==="neutral"?2.2:t.variant.name==="tonalSpot"?1.7:t.variant.name==="expressive"?w.isYellow(r.get("neutral").hue)?t.isDark?3:2.3:1.6:1,background:()=>N(t,e),contrastCurve:()=>y(3)},outlineVariant:{palette:()=>r.get("neutralVariant"),chromaMultiplier:()=>t.variant.name==="neutral"?2.2:t.variant.name==="tonalSpot"?1.7:t.variant.name==="expressive"?w.isYellow(r.get("neutral").hue)?t.isDark?3:2.3:1.6:1,background:()=>N(t,e),contrastCurve:()=>y(1.5)},inverseSurface:{palette:()=>r.get("neutral"),tone:()=>t.isDark?98:4,isBackground:!0},inverseOnSurface:{palette:()=>r.get("neutral"),tone:()=>t.isDark?20:95,background:()=>e.get("inverseSurface"),contrastCurve:()=>y(7)},primary:{palette:()=>r.get("primary"),tone:()=>t.variant.name==="neutral"?t.isDark?80:40:t.variant.name==="tonalSpot"?t.isDark?80:S(r.get("primary")):t.variant.name==="expressive"?S(r.get("primary"),0,w.isYellow(r.get("primary").hue)?25:w.isCyan(r.get("primary").hue)?88:98):S(r.get("primary"),0,w.isCyan(r.get("primary").hue)?88:98),isBackground:!0,background:()=>N(t,e),contrastCurve:()=>y(4.5),adjustTone:()=>_(e.get("primaryContainer"),e.get("primary"),5,"relative_lighter",!0,"farther")},primaryDim:{palette:()=>r.get("primary"),tone:()=>t.variant.name==="neutral"?85:t.variant.name==="tonalSpot"?S(r.get("primary"),0,90):S(r.get("primary")),isBackground:!0,background:()=>n("surfaceContainerHigh"),contrastCurve:()=>y(4.5),adjustTone:()=>_(e.get("primaryDim"),e.get("primary"),5,"darker",!0,"farther")},onPrimary:{palette:()=>r.get("primary"),background:()=>e.get("primary"),contrastCurve:()=>y(6)},primaryContainer:{palette:()=>r.get("primary"),tone:()=>t.variant.name==="neutral"?t.isDark?30:90:t.variant.name==="tonalSpot"?t.isDark?q(r.get("primary"),35,93):S(r.get("primary"),0,90):t.variant.name==="expressive"?t.isDark?S(r.get("primary"),30,93):S(r.get("primary"),78,w.isCyan(r.get("primary").hue)?88:90):t.isDark?q(r.get("primary"),66,93):S(r.get("primary"),66,w.isCyan(r.get("primary").hue)?88:93),isBackground:!0,background:()=>N(t,e),contrastCurve:()=>t.contrastLevel>0?y(1.5):void 0},onPrimaryContainer:{palette:()=>r.get("primary"),background:()=>e.get("primaryContainer"),contrastCurve:()=>y(6)},primaryFixed:{palette:()=>r.get("primary"),tone:()=>t.temp({isDark:!1,contrastLevel:0},()=>n("primaryContainer").getTone()),isBackground:!0,background:()=>N(t,e),contrastCurve:()=>t.contrastLevel>0?y(1.5):void 0},primaryFixedDim:{palette:()=>r.get("primary"),tone:()=>e.get("primaryFixed").getTone(),isBackground:!0,adjustTone:()=>_(n("primaryFixedDim"),n("primaryFixed"),5,"darker",!0,"exact")},onPrimaryFixed:{palette:()=>r.get("primary"),background:()=>e.get("primaryFixedDim"),contrastCurve:()=>y(7)},onPrimaryFixedVariant:{palette:()=>r.get("primary"),background:()=>e.get("primaryFixedDim"),contrastCurve:()=>y(4.5)},inversePrimary:{palette:()=>r.get("primary"),tone:()=>S(r.get("primary")),background:()=>e.get("inverseSurface"),contrastCurve:()=>y(6)},secondary:{palette:()=>r.get("secondary"),tone:()=>t.variant.name==="neutral"?t.isDark?q(r.get("secondary"),0,98):S(r.get("secondary")):t.variant.name==="vibrant"?S(r.get("secondary"),0,t.isDark?90:98):t.isDark?80:S(r.get("secondary")),isBackground:!0,background:()=>N(t,e),contrastCurve:()=>y(4.5),adjustTone:()=>_(n("secondaryContainer"),n("secondary"),5,"relative_lighter",!0,"farther")},secondaryDim:{palette:()=>r.get("secondary"),tone:()=>t.variant.name==="neutral"?85:S(r.get("secondary"),0,90),isBackground:!0,background:()=>n("surfaceContainerHigh"),contrastCurve:()=>y(4.5),adjustTone:()=>_(n("secondaryDim"),n("secondary"),5,"darker",!0,"farther")},onSecondary:{palette:()=>r.get("secondary"),background:()=>n("secondary"),contrastCurve:()=>y(6)},secondaryContainer:{palette:()=>r.get("secondary"),tone:()=>t.variant.name==="vibrant"?t.isDark?q(r.get("secondary"),30,40):S(r.get("secondary"),84,90):t.variant.name==="expressive"?t.isDark?15:S(r.get("secondary"),90,95):t.isDark?25:90,isBackground:!0,background:()=>N(t,e),adjustTone:()=>{},contrastCurve:()=>t.contrastLevel>0?y(1.5):void 0},onSecondaryContainer:{palette:()=>r.get("secondary"),background:()=>n("secondaryContainer"),contrastCurve:()=>y(6)},secondaryFixed:{palette:()=>r.get("secondary"),tone:()=>t.temp({isDark:!1,contrastLevel:0},()=>n("secondaryContainer").getTone()),isBackground:!0,background:()=>N(t,e),contrastCurve:()=>t.contrastLevel>0?y(1.5):void 0},secondaryFixedDim:{palette:()=>r.get("secondary"),tone:()=>n("secondaryFixed").getTone(),isBackground:!0,adjustTone:()=>_(n("secondaryFixedDim"),n("secondaryFixed"),5,"darker",!0,"exact")},onSecondaryFixed:{palette:()=>r.get("secondary"),background:()=>n("secondaryFixedDim"),contrastCurve:()=>y(7)},onSecondaryFixedVariant:{palette:()=>r.get("secondary"),background:()=>n("secondaryFixedDim"),contrastCurve:()=>y(4.5)},tertiary:{palette:()=>r.get("tertiary"),tone:()=>t.variant.name==="expressive"||t.variant.name==="vibrant"?S(r.get("tertiary"),0,w.isCyan(r.get("tertiary").hue)?88:t.isDark?98:100):t.isDark?S(r.get("tertiary"),0,98):S(r.get("tertiary")),isBackground:!0,background:()=>N(t,e),contrastCurve:()=>y(4.5),adjustTone:()=>_(n("tertiaryContainer"),n("tertiary"),5,"relative_lighter",!0,"farther")},tertiaryDim:{palette:()=>r.get("tertiary"),tone:()=>t.variant.name==="tonalSpot"?S(r.get("tertiary"),0,90):S(r.get("tertiary")),isBackground:!0,background:()=>n("surfaceContainerHigh"),contrastCurve:()=>y(4.5),adjustTone:()=>_(n("tertiaryDim"),n("tertiary"),5,"darker",!0,"farther")},onTertiary:{palette:()=>r.get("tertiary"),background:()=>n("tertiary"),contrastCurve:()=>y(6)},tertiaryContainer:{palette:()=>r.get("tertiary"),tone:()=>t.variant.name==="neutral"?t.isDark?S(r.get("tertiary"),0,93):S(r.get("tertiary"),0,96):t.variant.name==="tonalSpot"?S(r.get("tertiary"),0,t.isDark?93:100):t.variant.name==="expressive"?S(r.get("tertiary"),75,w.isCyan(r.get("tertiary").hue)?88:t.isDark?93:100):t.isDark?S(r.get("tertiary"),0,93):S(r.get("tertiary"),72,100),isBackground:!0,background:()=>N(t,e),adjustTone:()=>{},contrastCurve:()=>t.contrastLevel>0?y(1.5):void 0},onTertiaryContainer:{palette:()=>r.get("tertiary"),background:()=>n("tertiaryContainer"),contrastCurve:()=>y(6)},tertiaryFixed:{palette:()=>r.get("tertiary"),tone:()=>t.temp({isDark:!1,contrastLevel:0},()=>n("tertiaryContainer").getTone()),isBackground:!0,background:()=>N(t,e),contrastCurve:()=>t.contrastLevel>0?y(1.5):void 0},tertiaryFixedDim:{palette:()=>r.get("tertiary"),tone:()=>n("tertiaryFixed").getTone(),isBackground:!0,adjustTone:()=>_(n("tertiaryFixedDim"),n("tertiaryFixed"),5,"darker",!0,"exact")},onTertiaryFixed:{palette:()=>r.get("tertiary"),background:()=>n("tertiaryFixedDim"),contrastCurve:()=>y(7)},onTertiaryFixedVariant:{palette:()=>r.get("tertiary"),background:()=>n("tertiaryFixedDim"),contrastCurve:()=>y(4.5)},error:{palette:()=>r.get("error"),tone:()=>t.isDark?q(r.get("error"),0,98):S(r.get("error")),isBackground:!0,background:()=>N(t,e),contrastCurve:()=>y(4.5),adjustTone:()=>_(e.get("errorContainer"),e.get("error"),5,"relative_lighter",!0,"farther")},errorDim:{palette:()=>r.get("error"),tone:()=>q(r.get("error")),isBackground:!0,background:()=>n("surfaceContainerHigh"),contrastCurve:()=>y(4.5),adjustTone:()=>_(n("errorDim"),n("error"),5,"darker",!0,"farther")},onError:{palette:()=>r.get("error"),background:()=>e.get("error"),contrastCurve:()=>y(6)},errorContainer:{palette:()=>r.get("error"),tone:()=>t.isDark?q(r.get("error"),30,93):S(r.get("error"),0,90),isBackground:!0,background:()=>N(t,e),adjustTone:()=>{},contrastCurve:()=>t.contrastLevel>0?y(1.5):void 0},onErrorContainer:{palette:()=>r.get("error"),background:()=>e.get("errorContainer"),contrastCurve:()=>y(4.5)},surfaceVariant:{alias:"surfaceContainerHighest"},surfaceTint:{alias:"primary"},background:{alias:"surface"},onBackground:{alias:"onSurface"}}};function $e(e){return e.charAt(0).toUpperCase()+e.slice(1)}class Xt{constructor({colorManager:t,context:r}){L(this,"colorManager"),L(this,"context"),L(this,"api"),this.context=r,this.colorManager=t,this.context.onUpdate(n=>{n.includes("variant")&&(this.colorManager.clear(),this.addColors(this.context.variant.colors))})}getAll(){return this.colorManager.getAll()}addColor(t,r){return this.colorManager.createOrUpdate(t,r)}addColors(t){if(!this.api)throw new Error("The API is not initialized. Please call bootstrap() before calling addColors().");typeof t=="function"&&(t=t(this.api)),t&&Object.entries(t).forEach(([r,n])=>{this.addColor(r,n)})}get(t){return this.colorManager.get(t)}remove(t){return this.colorManager.remove(t)}update(t,r){return this.colorManager.createOrUpdate(t,r)}addFromCustomPalette(t){if(this.context.variant.colorsFromCustomPalette)return this.addColors(this.context.variant.colorsFromCustomPalette(t));const r=t,n=r+"Dim",o=$e(t),a="on"+o,i=r+"Container",c="on"+o+"Container",s=r+"Fixed",l=r+"FixedDim",u="on"+o+"Fixed",h="on"+o+"FixedVariant",f=({palettes:g,colors:p,context:m})=>({[r]:{palette:()=>g.get(r),tone:()=>m.variant.name==="neutral"?m.isDark?q(g.get(r),0,98):S(g.get(r)):m.variant.name==="vibrant"?S(g.get(r),0,m.isDark?90:98):m.isDark?80:S(g.get(r)),isBackground:!0,background:()=>N(m,this),contrastCurve:()=>y(4.5),adjustTone:()=>_(p.get(i),p.get(r),5,"relative_lighter",!0,"farther")},[n]:{palette:()=>g.get(r),tone:()=>m.variant.name==="neutral"?85:S(g.get(r),0,90),isBackground:!0,background:()=>this.get("surfaceContainerHigh"),contrastCurve:()=>y(4.5),adjustTone:()=>_(this.get(n),this.get(r),5,"darker",!0,"farther")},[a]:{palette:()=>g.get(r),background:()=>this.get(r),contrastCurve:()=>y(6)},[i]:{palette:()=>g.get(r),tone:()=>m.variant.name==="vibrant"?m.isDark?q(g.get(r),30,40):S(g.get(r),84,90):m.variant.name==="expressive"?m.isDark?15:S(g.get(r),90,95):m.isDark?25:90,isBackground:!0,background:()=>N(m,this),adjustTone:()=>{},contrastCurve:()=>m.contrastLevel>0?y(1.5):void 0},[c]:{palette:()=>g.get(r),background:()=>this.get(i),contrastCurve:()=>y(6)},[s]:{palette:()=>g.get(r),tone:()=>m.temp({isDark:!1,contrastLevel:0},()=>this.get(i).getTone()),isBackground:!0,background:()=>N(m,this),contrastCurve:()=>m.contrastLevel>0?y(1.5):void 0},[l]:{palette:()=>g.get(r),tone:()=>this.get(s).getTone(),isBackground:!0,adjustTone:()=>_(this.get(l),this.get(s),5,"darker",!0,"exact")},[u]:{palette:()=>g.get(r),background:()=>this.get(l),contrastCurve:()=>y(7)},[h]:{palette:()=>g.get(r),background:()=>this.get(l),contrastCurve:()=>y(4.5)}});this.addColors(f)}}class Tr{constructor(t){L(this,"colorMap",new Map),L(this,"context"),this.context=t.context}createOrUpdate(t,r){let n=this.colorMap.get(t);if("alias"in r)n=new Pr(t,r.alias,this);else if("hex"in r)n=new Mr(t,r.hex);else try{n instanceof Lt?n.update(r):n=new Lt(t,r,this.context)}catch(o){throw console.error(o),new Error(`Invalid color options provided for ${t}`)}return this.colorMap.set(t,n),n}remove(t){return this.colorMap.delete(t)}clear(){this.colorMap.clear()}get(t){const r=this.colorMap.get(t);if(r)return r;throw new Error(`Color ${t} does not exist`)}getAll(){return this.colorMap}}const Dr={colorManager:ut(Tr).scoped(),colorApi:ut(Xt).scoped()},$r={api:ut(vr).scoped()};class Sr{constructor(){L(this,"plugins",new Map)}addPlugin(t){this.plugins.set(t.name,t)}initPlugins(t){const r=new Map(this.plugins);let n=0;this.plugins=new Map;do n=r.size,r.forEach((o,a)=>{o.dependencies.filter(c=>!this.plugins.has(new c().name)).length===0&&(this.plugins.set(o.name,o.init(t)),r.delete(a))});while(r.size!=0&&r.size<n);if(r.size>0)throw new Error("Some plugins couldn\'t be loaded due to missing dependencies: "+Array.from(r.keys()))}async loadPlugins(){var t,r;for(const n of this.plugins.values())await((r=(t=n.getInstance()).onLoad)==null?void 0:r.call(t))}getPlugin(t){const r=this.plugins.get(new t().name);if(!r)throw new Error(`Plugin ${t.name} not found`);return r}}const Fr={pluginApi:ut(Sr).scoped()};class Et{constructor(){L(this,"_options"),L(this,"_temOptions",null),L(this,"updateCallbacks",[]),this.onUpdate(t=>{t.includes("variant")&&this.variant.init(this)})}static trackDependencies(t,r){const n=new Set,o=c=>{if(typeof c!="string")return!1;const s=Object.getOwnPropertyDescriptor(Et.prototype,c);return!!s&&typeof s.get=="function"},a=new Proxy(t,{get(c,s,l){return o(s)&&n.add(s),Reflect.get(c,s,l)}});return{result:r(a),dependencies:Array.from(n)}}set(t){if(this._options)return this.update(t);typeof t.sourceColor=="string"&&(t.sourceColor=w.fromInt(gt(t.sourceColor)));const r=[];for(const n of Object.keys(t))r.push(n);this._options=t,r.length>0&&this.updateCallbacks.forEach(n=>n(r))}update(t){const r=this._options;if(!r)throw new Error("Options not found");typeof t.sourceColor=="string"&&(t.sourceColor=w.fromInt(gt(t.sourceColor)));const n=[];for(const o of Object.keys(t))t[o]!==r[o]&&n.push(o);this._options={...r,...t},n.length>0&&this.updateCallbacks.forEach(o=>o(n))}getOptions(){let t;if(this._temOptions?t=this._temOptions:t=this._options,!t)throw new Error("Options not found");return t}set darkMode(t){this.update({isDark:t})}get isDark(){return this.getOptions().isDark}set contrastLevel(t){this.update({contrastLevel:t})}get contrastLevel(){return this.getOptions().contrastLevel}set sourceColor(t){this.update({sourceColor:t})}get sourceColor(){let t=this.getOptions().sourceColor;return typeof t=="function"&&(t=t(this)),typeof t=="string"&&(t=w.fromInt(gt(t))),t}get rawSourceColor(){return this.getOptions().sourceColor}set variant(t){this.update({variant:t})}get variant(){return this.getOptions().variant}temp(t,r){const n=this.getOptions();this._temOptions={...n,...t};const o=r();return this._temOptions=null,o}onUpdate(t){this.updateCallbacks.push(t)}}const Ar={context:ut(Et).scoped()};class st{constructor(t,r,n){L(this,"cache",new Map),L(this,"hueCache",null),L(this,"chromaCache",null),L(this,"dependencies",null),this.name=t,this.callback=r,this.context=n,this.update([])}static fromVariant(t,r,n){const o=a=>a.variant.customPalettes(a,r);return new st(t,o,n)}update(t){let r=null;if(this.dependencies==null){const n=Et.trackDependencies(this.context,o=>this.callback(o));this.dependencies=n.dependencies,r=n.result}else t.length>0&&t.some(n=>{var o;return(o=this.dependencies)==null?void 0:o.includes(n)})&&(r=this.callback(this.context));r&&(this.hueCache!==r.hue||this.chromaCache!==r.chroma)&&(this.clearCache(),this.hueCache=r.hue,this.chromaCache=r.chroma)}setCallback(t){this.callback=t,this.dependencies=null,this.cache.clear(),this.hueCache=null,this.chromaCache=null,this.update([])}clearCache(){this.cache.clear(),this.hueCache=null,this.chromaCache=null}tone(t){const r=this.hueCache,n=this.chromaCache;if(r==null||n==null)throw new Error("Palette must be updated before using tone");let o=this.cache.get(t);return o===void 0&&(t==99&&w.isYellow(r)?o=this.averageArgb(this.tone(98),this.tone(100)):o=w.from(r,n,t).toInt(),this.cache.set(t,o)),o}getHct(t){return w.fromInt(this.tone(t))}get hue(){const t=this.hueCache;if(t==null)throw new Error(`Palette ${this.name} must be updated before using hue`);return t}get chroma(){const t=this.chromaCache;if(t==null)throw new Error(`Palette ${this.name} must be updated before using hue`);return t}averageArgb(t,r){const n=t>>>16&255,o=t>>>8&255,a=t&255,i=r>>>16&255,c=r>>>8&255,s=r&255,l=Math.round((n+i)/2),u=Math.round((o+c)/2),h=Math.round((a+s)/2);return(255<<24|(l&255)<<16|(u&255)<<8|h&255)>>>0}}class Ir{constructor({paletteManager:t}){L(this,"paletteManager"),this.paletteManager=t}add(t){Object.entries(t).forEach(([r,n])=>{typeof n=="string"?this.paletteManager.addCustomPalette(r,w.fromInt(gt(n))):this.paletteManager.addCustomPalette(r,n)})}override(t){Object.entries(t).forEach(([r,n])=>{typeof n=="string"?this.paletteManager.override(r,w.fromInt(gt(n))):this.paletteManager.override(r,n)})}getSerializableState(){const t={};for(const[r,n]of Object.entries(this.paletteManager._palettes))t[r]={hue:n.hue,chroma:n.chroma};return t}sync(t){const r=new Set(Object.keys(t??{}));Object.keys(this.paletteManager._palettes).forEach(n=>{r.has(n)||this.paletteManager.remove(n)}),t&&this.override(t)}get(t){return this.paletteManager.get(t)}getAll(){return this.paletteManager.palettes}}class Or{constructor(t){L(this,"_palettes",{}),L(this,"context"),L(this,"colorApi"),this.colorApi=t.colorApi,this.context=t.context,this.context.onUpdate(r=>Object.entries(this.palettes).forEach(([n,o])=>{o.update(r)}))}get palettes(){return{...this.context.variant.palettes,...this._palettes}}addCustomPalette(t,r){let n;r instanceof w?n=st.fromVariant(t,r,this.context):n=new st(t,r,this.context),this.add(t,n),this.colorApi.addFromCustomPalette(t)}add(t,r){if(this._palettes.key)throw new Error(`Palette with key ${t} already exists`);r instanceof st||(r=new st(t,r,this.context)),this.set(t,r)}get(t){const r=this.palettes[t];if(!r)throw new Error(`Palette ${t} not found`);return r}set(t,r){this._palettes[t]=r}update(t,r){const n=this._palettes[t];if(!n)throw new Error(`Palette with key ${t} not found`);r instanceof st?this.set(t,r):n.setCallback(r)}remove(t){delete this._palettes[t]}override(t,r){const n=r instanceof w?o=>o.variant.customPalettes(o,r):r;if(this._palettes[t])this.update(t,n);else{const o=new st(t,n,this.context);this.set(t,o),!!this.context.variant.palettes[t]||this.colorApi.addFromCustomPalette(t)}}}const xr={paletteApi:ut(Ir).scoped(),paletteManager:ut(Or).scoped()};let Jt=null;const Se=e=>{if(!(e!=null&&e.fresh)&&Jt)return Jt;const t=be({injectionMode:yt.PROXY});function r(...n){return n.forEach(o=>{Object.entries(o).forEach(([a,i])=>{t.register(a,i)})}),Se}return r($r,Fr,Dr,xr,Ar),Jt=t,t};function Lr(){return Se().resolve("api")}const kt=(e,t,r)=>{const n=Math.min(t.length-1,r.length),o=e.hue;for(let a=0;a<n;a++)if(o>=t[a]&&o<t[a+1])return Ft(r[a]);return o},rt=(e,t,r)=>{let n=kt(e,t,r);return Math.min(t.length-1,r.length)<=0&&(n=0),Ft(e.hue+n)};class Br{constructor(t){L(this,"_palettes"),L(this,"customPalettes"),L(this,"colorsFromCustomPalette"),L(this,"colors"),L(this,"name"),L(this,"context"),this.options=t,this.customPalettes=t.customPalettes,this.colors=t.colors||{},this.name=t.name,this.colorsFromCustomPalette=t.colorsFromCustomPalette}get palettes(){if(!this._palettes)throw new Error("Variant not initialized");return this._palettes}init(t){this.context||(this.context=t,this._palettes=Object.entries(this.options.palettes).reduce((r,[n,o])=>({...r,[n]:new st(n,o,t)}),{}))}}const Dt=e=>new Br(e),Zt=e=>rt(e,[0,71,124,253,278,300,360],[10,0,10,0,10,0]),Fe=(e,t)=>{const r=Zt(e);return t?w.isYellow(r)?6:14:18},Er=Dt({name:"expressive",palettes:{primary:({sourceColor:e,isDark:t})=>({hue:e.hue,chroma:t?36:48}),secondary:({sourceColor:e,isDark:t})=>({hue:rt(e,[0,105,140,204,253,278,300,333,360],[-160,155,-100,96,-96,-156,-165,-160]),chroma:t?16:24}),tertiary:({sourceColor:e})=>E.fromHueAndChroma(rt(e,[0,105,140,204,253,278,300,333,360],[-165,160,-105,101,-101,-160,-170,-165]),48),neutral:({sourceColor:e,isDark:t})=>E.fromHueAndChroma(Zt(e),Fe(e,t)),neutralVariant:({sourceColor:e,isDark:t})=>{const r=Zt(e),n=Fe(e,t);return E.fromHueAndChroma(r,n*(r>=105&&r<125?1.6:2.3))},error:({sourceColor:e})=>{const t=kt(e,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);return E.fromHueAndChroma(t,64)}},customPalettes:({isDark:e},t)=>E.fromHueAndChroma(rt(t,[0,105,140,204,253,278,300,333,360],[-160,155,-100,96,-96,-156,-165,-160]),e?16:24),colors:Bt}),Rr=Dt({name:"neutral",palettes:{primary:({sourceColor:e})=>E.fromHueAndChroma(e.hue,w.isBlue(e.hue)?12:8),secondary:({sourceColor:e})=>E.fromHueAndChroma(e.hue,w.isBlue(e.hue)?6:4),tertiary:({sourceColor:e})=>E.fromHueAndChroma(rt(e,[0,38,105,161,204,278,333,360],[-32,26,10,-39,24,-15,-32]),20),neutral:({sourceColor:e})=>E.fromHueAndChroma(e.hue,1.4),neutralVariant:({sourceColor:e})=>E.fromHueAndChroma(e.hue,1.4*2.2),error:({sourceColor:e})=>{const t=kt(e,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);return E.fromHueAndChroma(t,50)}},customPalettes:(e,t)=>E.fromHueAndChroma(t.hue,w.isBlue(t.hue)?6:4),colors:Bt}),jr=Dt({name:"tonalSpot",palettes:{primary:({sourceColor:e,isDark:t})=>E.fromHueAndChroma(e.hue,t?26:32),secondary:({sourceColor:e})=>E.fromHueAndChroma(e.hue,16),tertiary:({sourceColor:e})=>E.fromHueAndChroma(rt(e,[0,20,71,161,333,360],[-40,48,-32,40,-32]),28),neutral:({sourceColor:e})=>E.fromHueAndChroma(e.hue,5),neutralVariant:({sourceColor:e})=>E.fromHueAndChroma(e.hue,5*1.7),error:({sourceColor:e})=>{const t=kt(e,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);return E.fromHueAndChroma(t,60)}},customPalettes:(e,t)=>E.fromHueAndChroma(t.hue,16),colors:Bt}),Ae=e=>rt(e,[0,38,105,140,333,360],[-14,10,-14,10,-14]),Ie=e=>28,Hr=Dt({name:"vibrant",palettes:{primary:({sourceColor:e})=>E.fromHueAndChroma(e.hue,74),secondary:({sourceColor:e})=>E.fromHueAndChroma(rt(e,[0,38,105,140,333,360],[-14,10,-14,10,-14]),56),tertiary:({sourceColor:e})=>E.fromHueAndChroma(rt(e,[0,38,71,105,140,161,253,333,360],[-72,35,24,-24,62,50,62,-72]),56),neutral:({sourceColor:e})=>E.fromHueAndChroma(Ae(e),Ie()),neutralVariant:({sourceColor:e})=>{const t=Ae(e),r=Ie();return E.fromHueAndChroma(t,r*1.29)},error:({sourceColor:e})=>{const t=kt(e,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]);return E.fromHueAndChroma(t,80)}},customPalettes:(e,t)=>E.fromHueAndChroma(rt(t,[0,38,105,140,333,360],[-14,10,-14,10,-14]),56),colors:Bt}),Oe=2.5,xe=(e,t,r=[0,1])=>{const[n,o]=t,[a,i]=r,s=(Math.max(n,Math.min(e,o))-n)/(o-n);return a+s*(i-a)},ct=(e,t)=>{const r=Oe*e*(1+t.context.contrastLevel);return t.context.isDark?r*1.5:w.isYellow(t.palettes.get("neutral").hue)?100-r-Oe:100-r},X=(e,t)=>(t instanceof Xt,e.isDark?t.get("surfaceBright"):t.get("surfaceDim")),_r=(e,t,r)=>{const{selfKey:n,referenceKey:o}=r,a=e.contrastLevel>=0?xe(e.contrastLevel,[0,1],[3,7]):xe(e.contrastLevel,[-1,0],[0,3]),i=o?t.get(o).getTone():X(e,t).getTone();let s=t.get(n).options.tone;if(x.ratioOfTones(i,s)<a){const l=kr(i,s,a),u=e.isDark?100:0;s=s+(u-s)*l}return s},Nr=Dt({name:"udixio",palettes:{primary:({sourceColor:e})=>({hue:e.hue,chroma:e.chroma}),secondary:({sourceColor:e})=>({hue:e.hue,chroma:e.chroma*.5}),tertiary:({sourceColor:e})=>({hue:rt(e,[0,20,71,161,333,360],[-40,48,-32,40,-32]),chroma:e.chroma}),neutral:({sourceColor:e})=>({hue:e.hue,chroma:5}),neutralVariant:({sourceColor:e})=>({hue:e.hue,chroma:5*1.7}),error:({sourceColor:e})=>({hue:kt(e,[0,3,13,23,33,43,153,273,360],[12,22,32,12,22,32,22,12]),chroma:60})},customPalettes:({sourceColor:e},t)=>({hue:t.hue,chroma:e.chroma}),colorsFromCustomPalette:e=>{const t=e,r=$e(e),n="on"+r,o=t+"Container",a="on"+r+"Container";return({palettes:c,colors:s,context:l})=>({[t]:{palette:()=>c.get(t),tone:()=>s.get("primary").getTone(),isBackground:!0},[n]:{palette:()=>c.get(t),background:()=>s.get(t),contrastCurve:()=>y(6)},[o]:{palette:()=>c.get(t),tone:()=>l.isDark?q(c.get(t),35,93):S(c.get(t),0,90),isBackground:!0,background:()=>X(l,s),adjustTone:()=>_(s.get(t),s.get(o),15,"relative_darker",!0,"farther"),contrastCurve:()=>l.contrastLevel>0?y(1.5):void 0},[a]:{palette:()=>c.get(t),background:()=>s.get(o),contrastCurve:()=>y(6)}})},colors:({colors:e,context:t,palettes:r})=>{const n=o=>e.get(o);return{surface:{palette:()=>r.get("neutral"),tone:()=>t.isDark?2:99,isBackground:!0},surfaceDim:{palette:()=>r.get("neutral"),tone:()=>t.isDark?ct(.5,{palettes:r,context:t}):ct(5,{palettes:r,context:t}),isBackground:!0,chromaMultiplier:()=>t.isDark?1:1.7},surfaceBright:{palette:()=>r.get("neutral"),tone:()=>t.isDark?ct(5,{palettes:r,context:t}):ct(.5,{palettes:r,context:t}),isBackground:!0,chromaMultiplier:()=>t.isDark?1.7:1},surfaceContainerLowest:{palette:()=>r.get("neutral"),tone:()=>ct(0,{palettes:r,context:t}),isBackground:!0},surfaceContainerLow:{palette:()=>r.get("neutral"),tone:()=>ct(1,{palettes:r,context:t}),isBackground:!0,chromaMultiplier:()=>1.25},surfaceContainer:{palette:()=>r.get("neutral"),tone:()=>ct(2,{palettes:r,context:t}),isBackground:!0,chromaMultiplier:()=>1.4},surfaceContainerHigh:{palette:()=>r.get("neutral"),tone:()=>ct(3,{palettes:r,context:t}),isBackground:!0,chromaMultiplier:()=>1.5},surfaceContainerHighest:{palette:()=>r.get("neutral"),tone:()=>ct(4,{palettes:r,context:t}),isBackground:!0,chromaMultiplier:()=>1.7},onSurface:{palette:()=>r.get("neutral"),tone:()=>qt(X(t,e)),chromaMultiplier:()=>1.7,background:()=>X(t,e),contrastCurve:()=>t.isDark?y(11):y(9)},onSurfaceVariant:{palette:()=>r.get("neutralVariant"),chromaMultiplier:()=>1.7,background:()=>X(t,e),contrastCurve:()=>t.isDark?y(6):y(4.5)},outline:{palette:()=>r.get("neutralVariant"),chromaMultiplier:()=>1.7,background:()=>X(t,e),contrastCurve:()=>y(3)},outlineVariant:{palette:()=>r.get("neutralVariant"),chromaMultiplier:()=>1.7,background:()=>X(t,e),contrastCurve:()=>y(1.5)},inverseSurface:{palette:()=>r.get("neutral"),tone:()=>100-e.get("surface").getTone(),isBackground:!0},inverseOnSurface:{palette:()=>r.get("neutral"),tone:()=>t.isDark?20:95,background:()=>e.get("inverseSurface"),contrastCurve:()=>y(7)},primary:{palette:()=>r.get("primary"),tone:()=>t.sourceColor.tone,isBackground:!0,background:()=>X(t,e),contrastCurve:()=>y(4.5),adjustTone:()=>()=>_r(t,e,{selfKey:"primary"})},onPrimary:{palette:()=>r.get("primary"),background:()=>e.get("primary"),contrastCurve:()=>y(6)},primaryContainer:{palette:()=>r.get("primary"),tone:()=>t.isDark?q(r.get("primary"),35,93):S(r.get("primary"),0,90),isBackground:!0,background:()=>X(t,e),adjustTone:()=>_(e.get("primary"),e.get("primaryContainer"),15,"relative_darker",!0,"farther"),contrastCurve:()=>t.contrastLevel>0?y(1.5):void 0},onPrimaryContainer:{palette:()=>r.get("primary"),background:()=>e.get("primaryContainer"),contrastCurve:()=>y(6)},inversePrimary:{palette:()=>r.get("primary"),tone:()=>S(r.get("primary")),background:()=>e.get("inverseSurface"),contrastCurve:()=>y(6)},secondary:{palette:()=>r.get("secondary"),tone:()=>e.get("primary").getTone(),isBackground:!0},onSecondary:{palette:()=>r.get("secondary"),background:()=>n("secondary"),contrastCurve:()=>y(6)},secondaryContainer:{palette:()=>r.get("secondary"),tone:()=>t.isDark?q(r.get("secondary"),35,93):S(r.get("secondary"),0,90),isBackground:!0,background:()=>X(t,e),adjustTone:()=>_(e.get("secondary"),e.get("secondaryContainer"),15,"relative_darker",!0,"farther"),contrastCurve:()=>t.contrastLevel>0?y(1.5):void 0},onSecondaryContainer:{palette:()=>r.get("secondary"),background:()=>n("secondaryContainer"),contrastCurve:()=>y(6)},tertiary:{palette:()=>r.get("tertiary"),tone:()=>{const o=e.get("primary").getTone();return Math.max(20,Math.min(80,o))},isBackground:!0},onTertiary:{palette:()=>r.get("tertiary"),background:()=>n("tertiary"),contrastCurve:()=>y(6)},tertiaryContainer:{palette:()=>r.get("tertiary"),tone:()=>S(r.get("tertiary"),0,t.isDark?93:100),isBackground:!0,background:()=>X(t,e),adjustTone:()=>_(e.get("tertiary"),e.get("tertiaryContainer"),15,"relative_darker",!0,"farther"),contrastCurve:()=>t.contrastLevel>0?y(1.5):void 0},onTertiaryContainer:{palette:()=>r.get("tertiary"),background:()=>n("tertiaryContainer"),contrastCurve:()=>y(6)},error:{palette:()=>r.get("error"),tone:()=>t.isDark?q(r.get("error"),0,98):S(r.get("error")),isBackground:!0,background:()=>X(t,e),contrastCurve:()=>y(4.5),adjustTone:()=>_(e.get("errorContainer"),e.get("error"),5,"relative_lighter",!0,"farther")},onError:{palette:()=>r.get("error"),background:()=>e.get("error"),contrastCurve:()=>y(6)},errorContainer:{palette:()=>r.get("error"),tone:()=>t.isDark?q(r.get("error"),30,93):S(r.get("error"),0,90),isBackground:!0,background:()=>X(t,e),adjustTone:()=>{},contrastCurve:()=>t.contrastLevel>0?y(1.5):void 0},onErrorContainer:{palette:()=>r.get("error"),background:()=>e.get("errorContainer"),contrastCurve:()=>y(4.5)},surfaceVariant:{alias:"surfaceContainerHighest"},surfaceTint:{alias:"primary"},background:{alias:"surface"},onBackground:{alias:"onSurface"}}}}),Qt={Expressive:Er,Neutral:Rr,TonalSpot:jr,Vibrant:Hr,Udixio:Nr};function Le(e){const t=Object.values(Qt).find(r=>r.name===e);if(!t)throw new Error(`Unknown variant: "${e}". Known: ${Object.values(Qt).map(r=>r.name).join(", ")}`);return t}const zr=async(e,t=!0)=>{const r=Lr();return(()=>{const{sourceColor:o,contrastLevel:a=0,isDark:i=!1,variant:c=Qt.TonalSpot,palettes:s,colors:l,plugins:u}=e;r.context.set({contrastLevel:a,isDark:i,sourceColor:o,variant:c}),s&&r.palettes.add(s),l&&r.colors.addColors(l),u&&(u.forEach(h=>{r.plugins.addPlugin(h)}),r.plugins.initPlugins(r))})(),t&&await r.load(),r};var Vr=Object.defineProperty,Yr=(e,t,r)=>t in e?Vr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mt=(e,t,r)=>Yr(e,typeof t!="symbol"?t+"":t,r);class Be{constructor(t){mt(this,"options"),mt(this,"pluginInstance"),this.options=t}init(t){var r,n;return this.pluginInstance=new this.pluginClass(t,this.options),(n=(r=this.pluginInstance).onInit)==null||n.call(r),this}getInstance(){if(!this.pluginInstance)throw new Error(`Plugin ${this.name} is not initialized`);return this.pluginInstance}}class Ee{constructor(t,r){var n;this.api=t,this.options=r,(n=this.onInit)==null||n.call(this)}}class te extends Be{constructor(){super(...arguments),mt(this,"dependencies",[]),mt(this,"name","font"),mt(this,"pluginClass",Ur)}}class Ur extends Ee{constructor(){super(...arguments),mt(this,"_fontFamily"),mt(this,"_fontStyles")}get fontFamily(){if(!this._fontFamily)throw new Error("Font family not initialized");return this._fontFamily}set fontFamily(t){this._fontFamily=t}get fontStyles(){if(!this._fontStyles)throw new Error("Font styles not initialized");return this._fontStyles}set fontStyles(t){this._fontStyles=t}getFonts(){return{fontStyles:this.fontStyles,fontFamily:this.fontFamily}}onInit(){var t,r,n,o;this.fontFamily={expressive:((r=(t=this.options)==null?void 0:t.fontFamily)==null?void 0:r.expressive)??["Roboto","sans-serif"],neutral:((o=(n=this.options)==null?void 0:n.fontFamily)==null?void 0:o.neutral)??["Roboto","sans-serif"]},this.fontStyles={display:{large:{fontWeight:400,fontSize:3.5625,lineHeight:4,letterSpacing:-.015625,fontFamily:"expressive"},medium:{fontWeight:400,fontSize:2.8125,lineHeight:3.25,fontFamily:"expressive"},small:{fontWeight:400,fontSize:2.25,lineHeight:2.75,fontFamily:"expressive"}},headline:{large:{fontWeight:400,fontSize:2,lineHeight:2.5,fontFamily:"expressive"},medium:{fontWeight:400,fontSize:1.75,lineHeight:2.25,fontFamily:"expressive"},small:{fontWeight:400,fontSize:1.5,lineHeight:2,fontFamily:"expressive"}},title:{large:{fontWeight:400,fontSize:1.375,lineHeight:1.75,fontFamily:"neutral"},medium:{fontWeight:500,fontSize:1,lineHeight:1.5,fontFamily:"neutral",letterSpacing:.009375},small:{fontWeight:500,fontSize:.875,lineHeight:1.25,fontFamily:"neutral",letterSpacing:.00625}},label:{large:{fontWeight:500,fontSize:.875,lineHeight:1.25,fontFamily:"neutral",letterSpacing:.00625},medium:{fontWeight:500,fontSize:.75,lineHeight:1,fontFamily:"neutral",letterSpacing:.03125},small:{fontWeight:500,fontSize:.6875,lineHeight:1,fontFamily:"neutral",letterSpacing:.03125}},body:{large:{fontWeight:400,fontSize:1,lineHeight:1.5625,fontFamily:"neutral",letterSpacing:.03125},medium:{fontWeight:400,fontSize:.875,lineHeight:1.25,fontFamily:"neutral",letterSpacing:.015625},small:{fontWeight:400,fontSize:.75,lineHeight:1,fontFamily:"neutral",letterSpacing:.025}}},this.options&&this.options.fontStyles&&Object.entries(this.options.fontStyles).forEach(([a,i])=>{const c=a;Object.entries(i).forEach(([s,l])=>{const u=s;l&&(this.fontStyles[c][u]={...this.fontStyles[c][u],...l})})})}}function Re(e,t){return{handler:e,config:t}}Re.withOptions=function(e,t=()=>({})){function r(n){return{handler:e(n),config:t(n)}}return r.__isOptionsFunction=!0,r};var $t=Re;function Gr(e){return e?e.toLowerCase():""}const Wr=[new RegExp("(\\\\p{Ll}|\\\\p{N})(\\\\p{Lu})","gu"),new RegExp("(\\\\p{Lu})(\\\\p{Lu}\\\\p{Ll})","gu")],qr=/[^\\p{L}\\p{N}]+/gu;function Kr(e,t={}){if(!e)return"";const{splitRegexp:r=Wr,stripRegexp:n=qr,transform:o=Gr,delimiter:a=" "}=t,i=je(je(e,r,"$1\\0$2"),n,"\\0");let c=0,s=i.length;for(;i.charAt(c)==="\\0";)c++;for(;i.charAt(s-1)==="\\0";)s--;return i.slice(c,s).split("\\0").map(o).join(a)}function je(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce((n,o)=>n.replace(o,r),e)}function Xr(e,t={}){return e?Kr(e,{delimiter:"-",...t}):""}var Jr=Object.defineProperty,Zr=(e,t,r)=>t in e?Jr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Rt=(e,t,r)=>Zr(e,typeof t!="symbol"?t+"":t,r);const Qr=({addBase:e,prefix:t,matchUtilities:r,addUtilities:n,animationNames:o})=>(a,i,c,s)=>{o.add(a);const l=f=>`--${t}-${f}`,u=(f,g=(p=>(p=c[f])==null?void 0:p.DEFAULT)())=>`var(${l(f)} ${g?`, ${g}`:""})`,h=[];Object.values(i({param:u,variableName:l})).forEach(f=>{Object.keys(f).forEach(g=>{h.push(Xr(g))})}),e({[`@keyframes ${t}-${a}`]:i({param:u,variableName:l})}),n({[`.${t}-${a}, .${t}-${a}-in, .${t}-${a}-out`]:{[`--${t}-name-${a}`]:`${t}-${a}`,[`--${t}-dependencies-${a}`]:h.join(", "),animationDuration:`var(--${t}-duration, 300ms)`,animationDelay:`var(--${t}-delay, 0)`,animationTimingFunction:`var(--${t}-ease, cubic-bezier(0.4, 0, 0.2, 1))`,animationFillMode:"both"},[`.${t}-${a}, .${t}-${a}-in`]:{[`--${t}-play-state-${a}`]:`var(--${t}-in-state, paused)`},[`.${t}-${a}-out`]:{[`--${t}-play-state-${a}`]:`var(--${t}-out-state, paused)`}}),n({[`.${t}-${a}-scroll`]:{[`--${t}-name-${a}`]:`${t}-${a}`,[`--${t}-dependencies-${a}`]:h.join(", "),[`--${t}-timeline-${a}`]:`var(--${t}-timeline, view())`,[`--${t}-range-${a}`]:`var(--${t}-range-start, entry 20%) var(--${t}-range-end, cover 50%)`,animationFillMode:"both"}}),Object.entries(c).forEach(([f,g],p)=>{let m=g.as;p!==0&&!g.as&&(m=f),r({[`${t}-${a}${m?"-"+m:""}`]:b=>({[l(f)]:b})},{values:g.values,supportsNegativeValues:g.supportsNegativeValues})}),s==null||s({variableName:l,name:a,dependencies:h})},tn=$t.withOptions(({prefix:e="anim"})=>({addBase:t,matchUtilities:r,addUtilities:n,theme:o})=>{const a=new Set,i=Qr({addBase:t,prefix:e,matchUtilities:r,addUtilities:n,animationNames:a});t({"@keyframes enter":{from:{opacity:`var(--${e}-enter-opacity, 1)`,transform:`translate3d(var(--${e}-enter-translate-x, 0), var(--${e}-enter-translate-y, 0), 0) scale3d(var(--${e}-enter-scale, 1), var(--${e}-enter-scale, 1), var(--${e}-enter-scale, 1)) rotate(var(--${e}-enter-rotate, 0))`}},"@keyframes exit":{to:{opacity:`var(--${e}-exit-opacity, 1)`,transform:`translate3d(var(--${e}-exit-translate-x, 0), var(--${e}-exit-translate-y, 0), 0) scale3d(var(--${e}-exit-scale, 1), var(--${e}-exit-scale, 1), var(--${e}-exit-scale, 1)) rotate(var(--${e}-exit-rotate, 0))`}}}),n({[`.${e}-in-run`]:{[`--${e}-in-state`]:"running"},[`.${e}-in-paused`]:{[`--${e}-in-state`]:"paused"},[`.${e}-out-run`]:{[`--${e}-out-state`]:"running"},[`.${e}-out-paused`]:{[`--${e}-out-state`]:"paused"},[`.${e}-timeline-block`]:{animationTimeline:"view(block)"},[`.${e}-timeline-inline`]:{animationTimeline:"view(inline)"},[`.${e}-timeline-y`]:{animationTimeline:"view(block)"},[`.${e}-timeline-x`]:{animationTimeline:"view(inline)"}}),t({[`[data-${e}-in-run]`]:{[`--${e}-in-state`]:"running"},[`[data-${e}-in-paused]`]:{[`--${e}-in-state`]:"paused"},[`[data-${e}-out-run]`]:{[`--${e}-out-state`]:"running"},[`[data-${e}-out-paused]`]:{[`--${e}-out-state`]:"paused"}}),i("fade",({param:s})=>({from:{opacity:s("opacity")}}),{opacity:{DEFAULT:"0",supportsNegativeValues:!0,values:{0:"0",5:"0.05",10:"0.1",20:"0.2",25:"0.25",30:"0.3",40:"0.4",50:"0.5",60:"0.6",70:"0.7",75:"0.75",80:"0.8",90:"0.9",95:"0.95",100:"1"}}}),i("scale",({param:s,variableName:l})=>({from:{scale:`${s("scale-x",s("scale"))} ${s("scale-y",s("scale"))}`}}),{scale:{DEFAULT:".95",values:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"}},"scale-x":{as:"x",DEFAULT:".95",values:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"}},"scale-y":{as:"y",DEFAULT:".95",values:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"}}});const c={DEFAULT:"2rem",values:{...o("spacing"),full:"100%","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","3/4":"75%"},supportsNegativeValues:!0};i("slide",({param:s})=>({from:{translate:`calc(${s("distance")} * ${s("dx")}) calc(${s("distance")} * ${s("dy")});`},to:{translate:"var(--tw-translate-x, 0) var(--tw-translate-y, 0)"}}),{distance:{...c}},({name:s,variableName:l,dependencies:u})=>{["up","down","left","right","from-top","from-bottom","from-left","from-right","from-top-left","from-top-right","from-bottom-left","from-bottom-right","up-left","up-right","down-left","down-right"].forEach(h=>{let f="";if(h.startsWith("from-")?f=h:h==="up"?f="from-bottom":h==="down"?f="from-top":h==="left"?f="from-right":h==="right"?f="from-left":h==="up-left"?f="from-bottom-right":h==="up-right"?f="from-bottom-left":h==="down-left"?f="from-top-right":h==="down-right"&&(f="from-top-left"),!f)throw new Error(`Invalid direction: ${h}`);const g={"from-top":{dx:"0",dy:"-1"},"from-bottom":{dx:"0",dy:"1"},"from-left":{dx:"-1",dy:"0"},"from-right":{dx:"1",dy:"0"},"from-top-left":{dx:"-1",dy:"-1"},"from-top-right":{dx:"1",dy:"-1"},"from-bottom-left":{dx:"-1",dy:"1"},"from-bottom-right":{dx:"1",dy:"1"}},{dx:p,dy:m}=g[f];n({[`.${e}-${s}-${h}, .${e}-${s}-in-${h}, .${e}-${s}-out-${h}`]:{[`--${e}-name-${s}-${h}`]:`${e}-${s}`,[`--${e}-name-${s}`]:`${e}-${s}`,[`--${e}-dependencies-${s}`]:u.join(", "),animationDuration:`var(--${e}-duration, 300ms)`,animationDelay:`var(--${e}-delay, 0)`,animationTimingFunction:`var(--${e}-eases, cubic-bezier(0.4, 0, 0.2, 1))`,animationFillMode:"both",[l("dx")]:p,[l("dy")]:m},[`.${e}-${s}-${h}, .${e}-${s}-in-${h}`]:{[`--${e}-play-state-${s}`]:`var(--${e}-in-state, paused)`},[`.${e}-${s}-out-${h}`]:{[`--${e}-play-state-${s}`]:`var(--${e}-out-state, paused)`}}),n({[`.${e}-${s}-scroll-${h}`]:{[`--${e}-name-${s}`]:`${e}-${s}`,[`--${e}-dependencies-${s}`]:u.join(", "),[`--${e}-timeline-${s}`]:`var(--${e}-timeline, view())`,[`--${e}-range-${s}`]:`var(--${e}-range-start, entry 20%) var(--${e}-range-end, cover 50%)`,animationFillMode:"both",[l("dx")]:p,[l("dy")]:m}})})}),r({[`${e}-duration`]:s=>({[`--${e}-duration`]:s})},{values:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",1500:"1500ms",2e3:"2000ms",3e3:"3000ms"}}),r({[`${e}-delay`]:s=>({[`--${e}-delay`]:s})},{values:{0:"0ms",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",1500:"1500ms",2e3:"2000ms",3e3:"3000ms"}}),r({[`${e}-ease`]:s=>({[`--${e}-ease`]:s})},{values:{linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"}}),r({[`${e}-fill`]:s=>({animationFillMode:s})},{values:{none:"none",forwards:"forwards",backwards:"backwards",both:"both"}}),r({[`${e}-timeline`]:s=>({[`--${e}-timeline`]:s})},{values:{view:"view()","view-block":"view(block)","view-inline":"view(inline)"}}),["start","end"].forEach(s=>{["entry","contain","cover","exit"].forEach(l=>{r({[`${e}-scroll-${s}-${l}`]:u=>({[`--${e}-range-${s}`]:`${l} ${u}`})},{values:{...o("spacing"),full:"100%","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","3/4":"75%"},supportsNegativeValues:!0})})}),t({[`[class*="${e}-"]`]:{animationName:Array.from(a).map(s=>`var(--${e}-name-${s}, noop)`).join(", "),"will-change":Array.from(a).map(s=>`var(--${e}-dependencies-${s}, noop)`).join(", "),animationPlayState:Array.from(a).map(s=>`var(--${e}-play-state-${s}, running)`).join(", ")}}),t({[`[class*="${e}-"][class*="-scroll"]`]:{animationTimeline:Array.from(a).map(s=>`var(--${e}-timeline-${s}, auto)`).join(", "),animationRange:Array.from(a).map(s=>`var(--${e}-range-${s}, normal)`).join(", ")}})}),en=$t.withOptions(e=>({addUtilities:t,theme:r})=>{const{fontStyles:n,responsiveBreakPoints:o,fontFamily:a}=e,i="rem",c={},s=u=>{const f=a[u.fontFamily].map(g=>g.trim().startsWith("var(")?g:`"${g}"`).join(", ");return{fontSize:u.fontSize+i,fontWeight:u.fontWeight,lineHeight:u.lineHeight+i,letterSpacing:u.letterSpacing?u.letterSpacing+i:null,fontFamily:f}},l=(u,h,f)=>({[`@media (min-width: ${r("screens."+h,{})})`]:{fontSize:u.fontSize*f+i,lineHeight:u.lineHeight*f+i}});for(const[u,h]of Object.entries(n))for(const[f,g]of Object.entries(h))c[`.text-${u}-${f}`]={...s(g),...Object.entries(o).reduce((p,[m,b])=>({...p,...l(g,m,b)}),{})};t(c)}),He={disabledStyles:{textOpacity:.38,backgroundOpacity:.1},transition:{duration:150}},rn=$t.withOptions(({colorKeys:e})=>{const t={disabledStyles:{...He.disabledStyles},transition:{...He.transition}};return({matchUtilities:r,addUtilities:n})=>{r({"state-group":o=>{const a=o?`/${o}`:"";return{[`@apply group-hover${a}:bg-[var(--state-color)]/[0.08]`]:{},[`@apply group-active${a}:bg-[var(--state-color)]/[0.10]`]:{},[`@apply group-focus-visible${a}:bg-[var(--state-color)]/[0.10]`]:{},"@apply transition-colors":{},[`@apply duration-${t.transition.duration}`]:{},[`@apply group-disabled${a}:text-on-surface/[${t.disabledStyles.textOpacity}]`]:{},[`@apply group-disabled${a}:bg-on-surface/[${t.disabledStyles.backgroundOpacity}]`]:{}}}},{values:{DEFAULT:""}}),r({"state-ripple-group":o=>{const a=o?`/${o}`:"";return{[`@apply group-hover${a}:bg-[var(--state-color)]/[0.08]`]:{},[`@apply group-focus-visible${a}:bg-[var(--state-color)]/[0.10]`]:{},"@apply transition-colors":{},[`@apply duration-${t.transition.duration}`]:{},[`@apply group-disabled${a}:text-on-surface/[${t.disabledStyles.textOpacity}]`]:{},[`@apply group-disabled${a}:bg-on-surface/[${t.disabledStyles.backgroundOpacity}]`]:{}}}},{values:{DEFAULT:""}}),n({".state-layer":{"@apply hover:bg-[var(--state-color)]/[0.08]":{},"@apply active:bg-[var(--state-color)]/[0.10]":{},"@apply focus-visible:bg-[var(--state-color)]/[0.10]":{},"@apply transition-colors":{},[`@apply duration-${t.transition.duration}`]:{},[`@apply disabled:text-on-surface/[${t.disabledStyles.textOpacity}]`]:{},[`@apply disabled:bg-on-surface/[${t.disabledStyles.backgroundOpacity}]`]:{}}}),r({state:o=>({"--state-color":`var(--color-${o})`})},{values:e.reduce((o,a)=>(o[a]=a,o),{})})}}),nn=$t(({addUtilities:e})=>{e({".shadow":{boxShadow:"0 4px 10px #00000008, 0 0 2px #0000000f, 0 2px 6px #0000001f"},".shadow-1":{boxShadow:"0px 1px 3px 1px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30)"},".shadow-2":{boxShadow:"0px 2px 6px 2px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30)"},".shadow-3":{boxShadow:"0px 1px 3px 0px rgba(0, 0, 0, 0.30), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)"},".shadow-4":{boxShadow:"0px 2px 3px 0px rgba(0, 0, 0, 0.30), 0px 6px 10px 4px rgba(0, 0, 0, 0.15)"},".box-shadow-5":{boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.30), 0px 8px 12px 6px rgba(0, 0, 0, 0.15)"}})});$t.withOptions(e=>{const t=e,r={};t.fontStyles.forEach(s=>{const[l,...u]=s.split(" "),[h,f]=l.split("-");r[h]??(r[h]={}),u.forEach(g=>{var p;(p=r[h])[f]??(p[f]={});const[m,b]=g.slice(0,-1).split("[");r[h][f][m]=b})});let n=t.responsiveBreakPoints;Array.isArray(n)||(n=[n]);const o={};n.forEach(s=>{const[l,u]=s.split(" ");o[l]=u});let a=t.fontFamily;Array.isArray(a)||(a=[a]);const i={};a.forEach(s=>{const[l,...u]=s.split(" ");i[l]=u.join(" ").split("|")});const c={colorKeys:t.colorKeys,fontStyles:r,responsiveBreakPoints:o,fontFamily:i};return s=>{en(c).handler(s),rn(c).handler(s),nn.handler(s),tn(c).handler(s)}});function ee(...e){if(e=e.filter(n=>!!n),e.length===0)return"";if(e.length===1&&e[0])return e[0];const t=[];t.push(e.join(""));for(let n=0;n<e.length;n++){const o=e[n],a=e.filter((i,c)=>c!==n&&!!i);if(a.length===1)t.push(`${o} ${a[0]}`);else if(a.length>1){t.push(`${o} ${a.join("")}`);for(const i of a)t.push(`${o} ${i}`)}}for(let n=0;n<e.length;n++)for(let o=n+1;o<e.length;o++)t.push(`${e[n]} ${e[o]}`),t.push(`${e[o]} ${e[n]}`);return`:is(${[...new Set(t)].join(", ")})`}function _e({selectors:e,mode:t,darkSelector:r,styles:n}){return e=e.filter(o=>!!o),t==="media"?e.length!==0?`@media (prefers-color-scheme: dark) {\n ${ee(...e)} {\n ${n}\n }\n }\n`:`@media (prefers-color-scheme: dark) {\n ${n}\n }\n`:`${ee(...e,r)} {\n ${n}\n }\n`}class re extends Be{constructor(){super(...arguments),Rt(this,"dependencies",[te]),Rt(this,"name","tailwind"),Rt(this,"pluginClass",on)}}class on extends Ee{constructor(){super(...arguments),Rt(this,"outputCss","")}onInit(){var t;(t=this.options).responsiveBreakPoints??(t.responsiveBreakPoints={lg:1.125}),this.options={responsiveBreakPoints:{lg:1.125},darkMode:"class",darkSelector:".dark",dynamicSelector:".dynamic",...this.options}}loadColor({isDynamic:t}){let{dynamicSelector:r,darkSelector:n}=this.options;t||(r=void 0);const o=this.options.darkMode??"class";o=="media"&&(n=void 0);const a=this.getColors();t?this.outputCss+=`\n@layer theme {\n .dynamic {\n ${Object.entries(a).map(([s,l])=>`--color-${s}: ${l.light};`).join(`\n `)}\n }\n}`:this.outputCss+=`\n@theme {\n --color-*: initial;\n ${Object.entries(a).map(([s,l])=>`--color-${s}: ${l.light};`).join(`\n `)}\n}`,this.outputCss+=`\n@layer theme {\n ${_e({selectors:[r],mode:o,darkSelector:n??"",styles:Object.entries(a).map(([s,l])=>`--color-${s}: ${l.dark};`).join(`\n `)})} \n}`;const i=this.api.context.sourceColor,c=this.api.context.rawSourceColor;for(const[s,l]of Object.entries(this.options.subThemes??{})){const u=et.fromInt(gt(l)).hue,h=et.from(u,i.chroma,i.tone);this.api.context.sourceColor=Te(h.toInt());const f=this.getColors();this.outputCss+=`\n@layer theme {\n ${ee(r,".theme-"+s)} {\n ${Object.entries(f).map(([g,p])=>`--color-${g}: ${p.light};`).join(`\n `)}\n }\n}\n`,this.outputCss+=`\n@layer theme {\n ${_e({selectors:[r,".theme-"+s],mode:o,darkSelector:n??"",styles:Object.entries(f).map(([g,p])=>`--color-${g}: ${p.dark};`).join(`\n `)})}\n}`}this.api.context.update({sourceColor:c})}getColors(){const t={},r=/([a-z0-9]|(?=[A-Z]))([A-Z])/g;return[!1,!0].forEach(n=>{this.api.context.darkMode=n,this.api.colors.getAll().forEach((o,a)=>{const i=a.replace(r,"$1-$2").toLowerCase();t[i]||(t[i]={light:"",dark:""}),t[i][n?"dark":"light"]=o.getHex()})}),t}async onLoad(){this.outputCss="",this.loadColor({isDynamic:!0})}}let nt=null,jt=null,ne=!1;async function Ne(){if(ne||!jt)return;ne=!0;const e=jt;jt=null;const{snapshot:t,tailwindOptions:r,fontOptions:n}=e,o=Object.fromEntries(Object.entries(t.palettes).map(([a,{hue:i,chroma:c}])=>[a,()=>({hue:i,chroma:c})]));try{nt?(nt.context.update({isDark:t.isDark,contrastLevel:t.contrastLevel,sourceColor:w.from(t.sourceColor.hue,t.sourceColor.chroma,t.sourceColor.tone),variant:Le(t.variantName)}),nt.palettes.sync(o),nt.plugins.getPlugin(re).options=r,nt.plugins.getPlugin(te).options=n):(nt=await zr({sourceColor:w.from(t.sourceColor.hue,t.sourceColor.chroma,t.sourceColor.tone),isDark:t.isDark,contrastLevel:t.contrastLevel,variant:Le(t.variantName),plugins:[new te(n),new re(r)]},!1),nt.palettes.sync(o)),await nt.load();const a=nt.plugins.getPlugin(re).getInstance().outputCss;self.postMessage({id:e.id,css:a})}catch(a){console.error("[Worker] error during processLatest:",a),nt=null}finally{ne=!1,Ne()}}self.onmessage=e=>{jt=e.data,Ne()}})();\n',st=typeof self<"u"&&self.Blob&&new Blob([Ct],{type:"text/javascript;charset=utf-8"});function Jn(e){let t;try{if(t=st&&(self.URL||self.webkitURL).createObjectURL(st),!t)throw"";const n=new Worker(t,{name:e==null?void 0:e.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Ct),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}function Zn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const Qn=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:r=!1})=>{const[o,u]=a.useState(null),[c,l]=a.useState(null),h=a.useRef(null),s=a.useRef(0),d=a.useRef(0),y=a.useRef(null),f=a.useRef(!1),p=a.useRef(n);a.useEffect(()=>{p.current=n},[n]),a.useEffect(()=>{let C=!1;return(async()=>{const b=await we.loader(e,r);if(C)return;y.current=b,u(b);const $=new Jn;h.current=$,$.onmessage=D=>{var v;D.data.id>d.current&&(d.current=D.data.id,f.current=!0,l(D.data.css),(v=p.current)==null||v.call(p,y.current))}})(),()=>{var b;C=!0,(b=h.current)==null||b.terminate(),h.current=null}},[]);const m=a.useRef(null),x=a.useRef(0),w=a.useRef(null);a.useEffect(()=>{if(!o)return;const C={...e,sourceColor:e.sourceColor},b=Date.now(),$=b-x.current,D=async v=>{await M(v)};if(x.current===0||$>=t)m.current&&(clearTimeout(m.current),m.current=null),w.current=null,x.current=b,D(C);else if(w.current=C,!m.current){const v=Math.max(0,t-$);m.current=setTimeout(async()=>{m.current=null;const L=w.current;w.current=null,L&&(x.current=Date.now(),await D(L))},v)}return()=>{}},[e,t,o]);const M=async C=>{if(typeof C.sourceColor=="string"&&!Zn(C.sourceColor))throw new Error("Invalid hex color");const b=y.current;if(!b)return;b.context.update(C),b.palettes.sync(C.palettes);const $=h.current;if(!$||!f.current){await b.load();const v=b.plugins.getPlugin(Fe.TailwindPlugin).getInstance().outputCss;l(v),f.current=!0,n==null||n(b);return}const D=++s.current;$.postMessage({id:D,snapshot:we.serializeThemeContext(b),tailwindOptions:b.plugins.getPlugin(Fe.TailwindPlugin).options,fontOptions:b.plugins.getPlugin(we.FontPlugin).options})};return a.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),c?i.jsx("style",{dangerouslySetInnerHTML:{__html:c}}):null};function er(){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 tr(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function We(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function it(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function Oe(e,t){if(!We(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 r=e.getAttribute(`data-${t}-end`);r&&e.style.setProperty(`--${t}-range-end`,r);const o=e.hasAttribute(`data-${t}-paused`)||e.classList.contains(`${t}-paused`),u=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!o&&!u&&e.setAttribute(`data-${t}-run`,"")}function je(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(r=>We(r))}function nr(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),r=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(o=>{if(!(o instanceof HTMLElement))return!1;const u=o.classList;return u.contains(`${t}-in`)||u.contains(`${t}-out`)||Array.from(u).some(h=>h.startsWith(`${t}-`)&&!h.includes("scroll")&&!r.has(h))?!0:!We(o)})}function rr(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function lt(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function ct(e,t,n){const r=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=r}const or=[0,.2],ut=new WeakSet;function ht(e,t){if(ut.has(e))return;ut.add(e);const n=o=>{o.target===e&&(e.hasAttribute(`data-${t}-in-run`)||e.hasAttribute(`data-${t}-out-run`))&&e.setAttribute(`data-${t}-animating`,"")},r=o=>{o.target===e&&e.removeAttribute(`data-${t}-animating`)};e.addEventListener("animationstart",n),e.addEventListener("animationend",r),e.addEventListener("animationcancel",r)}function Ve(e={}){const{prefix:t="anim",once:n=!0}=e;if(tr())return()=>{};const r=er(),o=new WeakSet;let u=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,c=!0;const l=()=>{const p=window.pageYOffset||window.scrollY||0;c=p>=u,u=p};typeof window<"u"&&window.addEventListener("scroll",l,{passive:!0});const h=new IntersectionObserver(p=>{for(const m of p){const x=m.target;if(!it(x)||x.hasAttribute(`data-${t}-animating`))continue;const w=rr(x.classList,t);m.isIntersecting?(w&&ct(x,t,"out"),lt(x,t,"in"),n&&h.unobserve(x)):n||(c||ct(x,t,"in"),w&&lt(x,t,"out"))}},{threshold:or}),s=p=>{const m=nr(p||document,t);for(const x of m)o.has(x)||(o.add(x),h.observe(x),ht(x,t))};s();let d,y=null,f=null;if(r)(()=>{f==null&&(f=requestAnimationFrame(()=>{f=null;const m=je(void 0,t);for(const x of m)Oe(x,t)}))})(),y=new MutationObserver(m=>{for(const x of m)if(x.type==="attributes"){const w=x.target;w instanceof HTMLElement&&(Oe(w,t),it(w)&&(o.has(w)||(o.add(w),h.observe(w),ht(w,t))))}else if(x.type==="childList"&&x.addedNodes&&x.addedNodes.length){for(const w of Array.from(x.addedNodes))if(w instanceof HTMLElement){const M=je(w,t);for(const C of M)Oe(C,t);s(w)}}}),y.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class",`data-${t}-scroll`,`data-${t}-start`,`data-${t}-end`,`data-${t}-paused`,`data-${t}-run`]}),d=()=>{f!=null&&cancelAnimationFrame(f),y&&y.disconnect()};else{let p;je(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(x=>{p=x.initScrollViewFallback({once:n})}),d=()=>{typeof p=="function"&&p()}}return()=>{d&&d(),typeof window<"u"&&window.removeEventListener("scroll",l),h.disconnect()}}const ar=Ve,sr=Ve,xe=({anchorRef:e,position:t="bottom",children:n,style:r,...o})=>{const c=`--anchor-${a.useId().replace(/:/g,"")}`,[l,h]=a.useState(!1);if(a.useLayoutEffect(()=>{typeof CSS<"u"&&CSS.supports("anchor-name","--a")&&h(!0)},[]),a.useLayoutEffect(()=>{if(l&&e.current){const d=e.current;return d.style.anchorName=c,()=>{e.current&&(e.current.style.anchorName="")}}},[l,e,c]),l){const d={position:"fixed",margin:0,zIndex:9999,positionAnchor:c,positionArea:t,positionTryFallbacks:"flip-block, flip-inline",...r};return He.createPortal(i.jsx("div",{style:d,...o,children:n}),document.body)}const s={position:"absolute",pointerEvents:"auto",...r};switch(t){case"top":s.bottom="100%",s.left="50%",s.transform="translateX(-50%)";break;case"top-left":s.bottom="100%",s.left=0;break;case"top-right":s.bottom="100%",s.right=0;break;case"bottom":s.top="100%",s.left="50%",s.transform="translateX(-50%)";break;case"bottom-left":s.top="100%",s.left=0;break;case"bottom-right":s.top="100%",s.right=0;break;case"left":s.right="100%",s.top="50%",s.transform="translateY(-50%)";break;case"right":s.left="100%",s.top="50%",s.transform="translateY(-50%)";break}return i.jsx(St,{targetRef:e,children:i.jsx("div",{style:s,...o,children:n})})},kt=({variant:e,disableTextMargins:t,disabled:n,iconPosition:r,icon:o,isActive:u,loading:c,shape:l,onToggle:h,size:s,allowShapeTransformation:d})=>({button:g(" relative cursor-pointer group/button outline-none inline-block flex w-fit justify-center items-center ",s==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",s==="small"&&"text-label-large px-4 py-2.5 gap-2",s==="medium"&&"text-title-medium px-6 py-4 gap-2",s==="large"&&"text-headline-small px-12 py-8 gap-3",s==="xLarge"&&"text-headline-large px-16 py-12 gap-4",l==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(l==="squared"||d&&u)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},d&&!n&&{"active:rounded-[12px]":s==="xSmall"||s=="small","active:rounded-[16px]":s==="medium","active:rounded-[28px]":s==="large"||s=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!u,"bg-primary text-on-primary":!n&&u,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!u&&h,"bg-primary text-on-primary":!n&&(u&&h||!h),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!u,"bg-secondary text-on-secondary":!n&&u,"text-on-surface/[0.38]":n},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":n,"text-primary border-outline focus:border-primary":!n&&!u,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&u}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[s==="xSmall"&&"-mx-3 ",s==="small"&&"-mx-4 ",s==="medium"&&"-mx-6 ",s==="large"&&"-mx-12",s==="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]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(l==="squared"||d&&u)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},d&&!n&&{"group-active/button:rounded-[12px]":s==="xSmall"||s=="small","group-active/button:rounded-[16px]":s==="medium","group-active/button:rounded-[28px]":s==="large"||s=="xLarge"}),label:g({invisible:c}),icon:g({invisible:c},s==="xSmall"&&"size-5",s==="small"&&"size-5",s==="medium"&&"size-6",s==="large"&&"size-8",s==="xLarge"&&"size-10")}),ir=ne("button",kt),Lt=Z("button",kt),It=({variant:e,interactive:t})=>({card:g(" rounded-xl overflow-hidden ",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest",{"group/card cursor-pointer":t})}),lr=ne("card",It),Mt=Z("card",It),Ue=()=>({carouselItem:g("rounded-[28px] overflow-hidden flex-none",{})}),cr=ne("carouselItem",Ue),Nt=Z("carouselItem",Ue),Dt=()=>({carousel:g(["w-full h-[400px]"]),track:g("flex h-full w-full")}),ur=ne("carousel",Dt),Et=Z("carousel",Dt),At=({isChecked:e,isIndeterminate:t,isDisabled:n,isError:r,isFocused:o,isHovered:u})=>({checkbox:g("inline-flex items-center justify-center relative size-4.5 ",{"pointer-events-none opacity-[0.38]":n}),input:g("absolute inset-0 w-full h-full opacity-0 z-10 cursor-pointer"),container:g("relative flex items-center justify-center w-[18px] h-[18px] "),box:g("absolute left-1/2 top-1/2 -translate-1/2 to rounded-[2px] size-4 border-2 transition-colors duration-200",!e&&!t&&{"border-on-surface-variant":!r&&!n,"border-error":r&&!n,"border-on-surface":n},(e||t)&&{"bg-primary border-primary":!r&&!n,"bg-error border-error":r&&!n,"bg-on-surface border-on-surface":n}),icon:g("z-10 relative text-on-primary w-full h-full flex items-center justify-center pointer-events-none",{"text-on-error":r&&!n,"text-surface":n}),stateLayer:"size-10 state-ripple-group-[checkbox] rounded-full cursor-pointer pointer-events-auto absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),hr=ne("checkbox",At),Tt=Z("checkbox",At),Pt=({variant:e,disabled:t,trailingIcon:n,icon:r,isActive:o,isInteractive:u,activated:c,isFocused:l,isDragging:h,isEditing:s})=>({chip:g(" group/chip px-3 py-1.5 rounded-lg flex items-center gap-2 outline-none",{"pl-2":r,"pr-2":n,"cursor-pointer":!t&&u},{" text-on-surface-variant":!c&&!l||s,"bg-secondary-container text-on-secondary-container":(c||l)&&!s},h&&["opacity-100 cursor-grabbing shadow-3"],e==="outlined"&&["border border-outline-variant",{"border-transparent":s}],e==="elevated"&&!s&&["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})}),dr=ne("chip",Pt),$t=Z("chip",Pt),Ot=({scrollable:e})=>({chips:g(" flex gap-3 outline-none",{"flex-wrap":!e,"overflow-x-auto":e})}),fr=ne("chips",Ot),jt=Z("chips",Ot),Rt=({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"})}),pr=ne("divider",Rt),Ft=Z("divider",Rt),Bt=({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"})}),mr=ne("fab",Bt),_t=Z("fab",Bt),Ht=({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")}),gr=ne("fabMenu",Ht),Wt=Z("fabMenu",Ht),Vt=({variant:e,disabled:t,onToggle:n,isActive:r,size:o,width:u,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]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(c==="squared"||l&&r)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},l&&!t&&{"active:rounded-[12px]":o==="xSmall"||o=="small","active:rounded-[16px]":o==="medium","active:rounded-[28px]":o==="large"||o=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!r&&!!n,"bg-primary":r||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-secondary-container text-on-secondary-container":!r&&!!n,"bg-secondary text-on-secondary":r||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!r,"border border-transparent bg-inverse-surface":r},!!t&&{"border border-on-surface/[0.12]":!r,"border border-transparent bg-on-surface/[0.12]":r}]),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&&r&&l)&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(c==="squared"||c==="rounded"&&n&&!t&&r&&l)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},l&&!t&&{"group-active/icon-button:rounded-[12px]":o==="xSmall"||o=="small","group-active/icon-button:rounded-[16px]":o==="medium","group-active/icon-button:rounded-[28px]":o==="large"||o=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!r,"state-primary":r},e==="filled"&&{"state-primary":!r&&!!n,"state-inverse-on-surface":r||!n},e==="tonal"&&{"state-on-surface-variant":!r&&!!n,"state-on-secondary-container":r||!n},e==="outlined"&&{"state-on-surface-variant":!r,"state-on-primary":r}]),icon:g(" transition-all duration-300",{"size-5 p-1.5":o==="xSmall"},{"size-6 p-2":o==="small"},{"size-6 p-4":o==="medium"},{"size-8 p-8":o==="large"},{"size-10 p-12":o==="xLarge"},u=="narrow"&&[{"px-1":o==="xSmall"},{"px-1":o==="small"},{"px-3":o==="medium"},{"px-4":o==="large"},{"px-8":o==="xLarge"}],u=="wide"&&[{"px-2.5":o==="xSmall"},{"px-3.5":o==="small"},{"px-6":o==="medium"},{"px-12":o==="large"},{"px-[72px]":o==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!r,"text-primary":r},e==="filled"&&{"text-primary":!r&&!!n,"text-on-primary":r||!n},e==="outlined"&&{"text-on-surface-variant":!r,"text-inverse-on-surface":r}],!!t&&"text-on-surface/[0.38]")}),yr=ne("iconButton",Vt),Ut=Z("iconButton",Vt),Yt=({variant:e,hasGroups:t})=>({menu:g("z-50 min-w-[112px] max-w-[280px] max-h-[300px] ","flex flex-col",{"overflow-y-auto":!t},{"bg-surface-container":!e||e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant","py-0.5 shadow-2 px-1 rounded-2xl":!t,"bg-transparent ":t})}),vr=ne("menu",Yt),zt=Z("menu",Yt),qt=({variant:e})=>({menuGroup:g("flex flex-col gap-0.5 mb-0.5 last:mb-0","rounded-lg py-0.5 px-1 shadow-2 first:rounded-t-2xl last:rounded-b-2xl",{"bg-surface-container":e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant"}),groupLabel:g("px-3 pt-2 text-label-small tracking-wide ",{"text-on-surface-variant":e==="standard","text-on-tertiary-container opacity-80":e==="vibrant"})}),br=ne("menuGroup",qt),Gt=Z("menuGroup",qt),Kt=({variant:e,isVisible:t})=>({progressIndicator:g((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1",e==="linear-indeterminate"&&"relative overflow-hidden rounded-full"),firstTrack:g((e==="linear-determinate"||e==="linear-indeterminate")&&"h-full rounded-full bg-primary-container",{"max-h-0":!t,"max-h-full":t}),activeIndicator:g("h-full rounded-full bg-primary",e==="linear-determinate"&&{"rounded-l-full":!0},(e==="linear-indeterminate"||e==="linear-determinate")&&{"max-h-0":!t,"max-h-full":t},(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),lastTrack:g((e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",{"max-h-0":!t,"max-h-full":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})}),wr=ne("progressIndicator",Kt),Xt=Z("progressIndicator",Kt),Ye=({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 flex flex-col",{}),header:g("p-4 flex items-center gap-2"),content:g("flex-1 overflow-y-auto"),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")}),Jt=ne("sideSheet",Ye),xr=Z("sideSheet",Ye),ze=({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"])}),Sr=ne("slider",ze),Zt=Z("slider",ze),Qt=()=>({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")}),Cr=ne("snackbar",Qt),en=Z("snackbar",Qt),tn=({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})}),kr=ne("switch",tn),nn=Z("switch",tn),rn=({isSelected:e,icon:t,label:n,variant:r})=>({tab:g("flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&r==="primary"&&"h-16",!(t&&n&&r==="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",r==="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},r==="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:r=="primary"},{"":!!(n&&!t)},r==="primary"&&"flex-col items-center",r==="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",r==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},r==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:g("text-title-small text-nowrap",r==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},r==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:g("bg-primary absolute w-full left-0 bottom-0",r==="primary"&&"h-[3px] rounded-t",r==="secondary"&&"h-0.5")}),Lr=ne("tab",rn),on=Z("tab",rn),an=({scrollable:e})=>({tabs:g("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Ir=ne("tabs",an),sn=Z("tabs",an),ln=()=>({tabPanels:g("overflow-hidden")}),Mr=ne("tabPanels",ln),cn=Z("tabPanels",ln),un=()=>({tabPanel:g("")}),Nr=ne("tabPanel",un),hn=Z("tabPanel",un),dn=({disabled:e,leadingIcon:t,trailingIcon:n,variant:r,errorText:o,isFocused:u,value:c,suffix:l,multiline:h})=>({textField:g({"opacity-[.38]":e}),content:g("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":!h},{"border-on-surface-variant":!(o!=null&&o.length)&&!u&&r=="filled","border-outline":!(o!=null&&o.length)&&!u&&r=="outlined","border-primary":!(o!=null&&o.length)&&u,"border-error":!!(o!=null&&o.length)},{"bg-on-surface/[0.04]":e},r=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],r=="outlined"&&["border rounded box-border",{"border-[3px]":u}]),stateLayer:g("absolute -z-10 w-full h-full top-0 left-0",{hidden:r=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":u}),label:g("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(o!=null&&o.length)},{"text-on-surface":e},{"text-error":!!(o!=null&&o.length)},{"text-primary":!(o!=null&&o.length)&&u}),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},r=="filled"&&" pb-2 pt-6",r=="outlined"&&"py-4 relative z-10"),activeIndicator:g("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",r=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(o!=null&&o.length)},{"bg-error":!!(o!=null&&o.length)},{"!w-full":u}]),supportingText:g(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(o!=null&&o.length)},{"text-on-surface":e},{"!w-full":u},{"text-error":!!(o!=null&&o.length)}),leadingIcon:g(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!a.isValidElement(t)}]),trailingIcon:g("h-12 w-12 flex items-center justify-center",{"cursor-text":!a.isValidElement(n)}),suffix:g("text-on-surface-variant pl-0 pr-4",r=="filled"&&" pb-2 pt-6",r=="outlined"&&"py-4 relative z-10")}),Dr=ne("textField",dn),fn=Z("textField",dn),pn=({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(""),content:g("w-full")}),Er=ne("toolTip",pn),mn=Z("toolTip",pn),ie=({icon:e,colors:t=[],className:n,...r})=>{if(typeof e=="string"){let d=e,y="";return t[0]&&(y=` fill="${t[0]}" color="${t[0]}"`,d=d.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),d=d.replace(/<svg([^>]*)>/,(f,p)=>`<svg${p.replace(/\s+(width|height)=["'][^"']*["']/g,"")} width="100%" height="100%"${y}>`),i.jsx("div",{className:g("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||""},dangerouslySetInnerHTML:{__html:d}})}if(e&&typeof e=="object"&&"src"in e){const d=e;return i.jsx("img",{src:d.src,width:d.width,height:d.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 o=e;if(!(o!=null&&o.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:u}=o,[c,l,,,h]=u||[],s=d=>{switch(d.length){case 2:return{"--fa-primary-color":d[0]||"inherit","--fa-secondary-color":d[1]||"inherit"};case 1:return{color:d[0]};default:return{}}};return i.jsx("svg",{className:g("size-5 box-content",n),style:{...s(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${c} ${l}`,role:"img","aria-hidden":"true",...r,children:typeof h=="string"?i.jsx("path",{className:"fill-current",d:h}):h.map((d,y)=>i.jsx("path",{d},y))})},gn=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:r,...o})=>{const[u,c]=a.useState(t),[l]=a.useState(1.5);a.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),c(t)},[t]);const[h,s]=a.useState(!0),d=()=>h?l:l*.5;a.useEffect(()=>{if(e==="circular-indeterminate"&&u!==100){const m=setInterval(()=>{c(h?20:40),s(!h)},d()*1e3);return()=>clearInterval(m)}},[e,h,u]);const[y,f]=a.useState(!1);a.useEffect(()=>{if(u>=100){const m=setTimeout(()=>{f(!1)},n);return()=>{clearTimeout(m)}}else f(!0)},[u,n]);const p=Xt({className:r,variant:e,value:t,transitionDuration:n,isVisible:y});return i.jsxs(i.Fragment,{children:[e==="linear-indeterminate"&&i.jsxs("div",{className:p.progressIndicator,...o,children:[i.jsx(Y.motion.div,{animate:{width:["0%","0%","0%","20%"],marginLeft:["0px","0px","6px","6px"],marginRight:["0px","0px","6px","6px"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut",times:[0,.499,.5,1]},style:{flexShrink:0},className:p.activeIndicator}),i.jsx(Y.motion.div,{animate:{width:["0%","40%","100%"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"},style:{flexShrink:0},className:p.firstTrack}),i.jsx(Y.motion.div,{animate:{width:["20%","60%","20%"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut",times:[0,.5,1]},style:{flexShrink:0,marginLeft:"6px"},className:p.activeIndicator}),i.jsx("div",{style:{marginLeft:"6px"},className:p.lastTrack})]}),e==="linear-determinate"&&i.jsxs("div",{className:p.progressIndicator,...o,children:[i.jsx("div",{style:{width:`${u}%`,transition:`width ${n}ms ease-in-out ${u==100?", max-height 200ms 0.5s ease-in-out":""}`},className:p.activeIndicator}),i.jsx("div",{style:{marginLeft:u!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${u==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:p.lastTrack}),i.jsx("div",{style:{width:"4px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:p.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&i.jsx(Y.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:e==="circular-indeterminate"?270:-90},transition:e==="circular-indeterminate"?{repeat:1/0,duration:d(),ease:"linear"}:{duration:n/1e3},className:p.progressIndicator,...o,children:i.jsx(Y.motion.circle,{cx:"50%",cy:"50%",r:y?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:e==="circular-indeterminate"?"hidden":"determinate",animate:e==="circular-indeterminate"?"visible":"determinate",className:p.activeIndicator,variants:{hidden:{pathLength:h?10/100:90/100},visible:{pathLength:h?90/100:10/100},determinate:{pathLength:u/100}},transition:{pathLength:e==="circular-indeterminate"?{type:"tween",ease:"linear",duration:d(),bounce:0}:{type:"tween",ease:"easeInOut",duration:n/1e3}}})},e==="circular-indeterminate"?h+"":"static")]})};function Ar(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const pe=({variant:e="filled",disabled:t=!1,icon:n,href:r,label:o,disableTextMargins:u,className:c,iconPosition:l="left",loading:h=!1,shape:s="rounded",onClick:d,onToggle:y,activated:f,ref:p,size:m="medium",allowShapeTransformation:x=!0,transition:w,children:M,...C})=>{if(M&&(o=M),!o)throw new Error("Button component requires either a label prop or children content");e=Ar(e);const b=r?"a":"button",$=a.useRef(null),D=p||$,[v,L]=a.useState(f);a.useEffect(()=>{L(f)},[f]),w={duration:.3,...w};const T=I=>{t&&I.preventDefault(),y?(L(!v),y(!v)):d&&d(I)},N=Lt({allowShapeTransformation:x,size:m,disableTextMargins:u,shape:s,href:r,disabled:t,icon:n,iconPosition:l,loading:h,variant:e,transition:w,className:c,isActive:v??!1,onToggle:y,activated:v,label:o,children:o}),F=n?i.jsx(ie,{icon:n,className:N.icon}):i.jsx(i.Fragment,{});return i.jsxs(b,{ref:D,href:r,className:N.button,...C,onClick:T,disabled:t,"aria-pressed":y?v:void 0,style:{transition:w.duration+"s"},children:[i.jsx("div",{className:N.touchTarget}),i.jsx(ue,{style:{transition:w.duration+"s"},className:N.stateLayer,colorName:g(e==="filled"&&{"on-surface-variant":!v&&!!y,"on-primary":v||!y},e==="elevated"&&{"on-primary":v&&!!y,primary:!v||!y},e==="tonal"&&{"on-secondary":v&&!!y,"on-secondary-container":!v||!y},e==="outlined"&&{"inverse-on-surface":v&&!!y,"on-surface-variant":!v||!y},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),l==="left"&&F,h&&i.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:i.jsx(gn,{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"})}),i.jsx("span",{className:N.label,children:o}),l==="right"&&F]})},Tr=({variant:e="outlined",className:t,children:n,interactive:r=!1,ref:o,...u})=>{const c=Mt({className:t,interactive:r,variant:e,children:n}),l=a.useRef(null),h=o||l;return i.jsxs("div",{...u,ref:h,className:c.card,children:[r&&i.jsx(ue,{className:c.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},ve=(e,t,n=[0,1])=>{const[r,o]=t,[u,c]=n,h=(Math.max(r,Math.min(e,o))-r)/(o-r);return u+h*(c-u)},yn=({className:e,children:t,width:n,index:r=0,outputRange:o,ref:u,...c})=>{const l=a.useRef(null),h=u||l,s=Nt({className:e,index:r,children:t});return i.jsx("div",{ref:h,style:{width:"var(--carousel-item-width, 100%)",maxWidth:o?o[1]+"px":void 0,minWidth:o?o[0]+"px":void 0},className:s.carouselItem,...c,children:t})},Pr=({variant:e="hero",className:t,children:n,ref:r,marginPourcent:o=0,inputRange:u=[.21,.65],outputRange:c=[42,300],gap:l=8,onChange:h,onMetricsChange:s,index:d,scrollSensitivity:y=1.25,...f})=>{const p=a.useRef(null),m=r||p,x=Et({index:d,className:t,children:n,variant:e,inputRange:u,outputRange:c,marginPourcent:o,onChange:h,gap:l,scrollSensitivity:y,onMetricsChange:s}),w=a.Children.toArray(n).filter(P=>a.isValidElement(P)&&P.type===yn),M=a.useRef(null),C=a.useRef({scrollProgress:0,scrollTotal:0,scrollVisible:0,scroll:0}),b=a.useRef(0),$=a.useRef(null),D=a.useRef([]).current,[v,L]=a.useState(0);D.length!==w.length&&(D.length=0,w.forEach((P,R)=>{D[R]=a.createRef()}));const T=a.useCallback(()=>{if(!M.current||!m.current)return;const P=b.current,R=C.current.scrollVisible||m.current.clientWidth||0;function K(_,ee){return _.map((ae,me)=>{const Se=(ae-ee)/Math.abs(_[1]-_[0]);return{itemScrollXCenter:ae,relativeIndex:Se,index:me,width:0}})}const S=w.map((_,ee)=>{const ae=ee/Math.max(1,w.length-1);return ve(ae,[0,1],[0,1])}),k=K(S,P).sort((_,ee)=>_.index-ee.index);let E=R+l+c[0]+l,z=v;const q=k.sort((_,ee)=>Math.abs(_.relativeIndex)-Math.abs(ee.relativeIndex)).map((_,ee)=>{if(!(E<=0)){if(ee===0&&(z=_.index),_.width=ve(E-l,[c[0],c[1]],[c[0],c[1]]),E-=_.width+l,E!==0&&E<(c[0]+l)*2){const ae=_.width-((c[0]+l)*2-E);E+=_.width,_.width=ae,E-=_.width}else if(E===0&&_.width>=c[0]*2+l){const ae=_.width-(c[0]+l-E);E+=_.width,_.width=ae,E-=_.width}return _}}).filter(Boolean),J=[...q].reverse(),te=[...q].sort((_,ee)=>Math.abs(_.index)-Math.abs(ee.index));J.forEach((_,ee)=>{const ae=J[ee+1];if(!ae)return;const me=1-(Math.abs(_.relativeIndex)-Math.abs(ae.relativeIndex)),Se=ve(me,[0,2],[_.width+E,ae.width]);E+=_.width,_.width=Se,E-=_.width});const re=q.length/2,O=ve(Math.abs(te[0].relativeIndex),[te[0].index===0?0:re-1,re],[0,1]),U=ve(O,[0,1],[0,1])*-(c[0]+l);D.forEach((_,ee)=>{if(_.current){const ae=q.find(me=>me.index===ee);ae?(_.current.style.setProperty("--carousel-item-width",`${ae.width}px`),_.current.style.display="block"):(_.current.style.setProperty("--carousel-item-width",`${c[0]}px`),_.current.style.display="none")}}),M.current.style.transform=`translateX(${U}px)`,z!==v&&L(z)},[w.length,c,l,v]);a.useLayoutEffect(()=>{T()},[T,w.length]),a.useEffect(()=>{h&&h(v)},[v,h]);const[N,F]=a.useState(0);a.useEffect(()=>{F(v)},[v]);const I=(P,R={})=>{if(!w.length)return 0;const K=D[P];if(!K||!K.current||!M.current)return 0;const S=ve(P/Math.max(1,w.length-1),[0,1],[0,1]);return F(P),M.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:S,orientation:"horizontal",animate:R.animate!==!1}})),S};a.useEffect(()=>{typeof d=="number"&&w.length>0&&d!==v&&I(d)},[d,w.length]);const G=P=>{var R;if(C.current=P,P.scrollTotal>0){(R=$.current)==null||R.stop();const K=b.current??0,S=P.scrollProgress??0;$.current=Y.animate(K,S,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:k=>{b.current=k,requestAnimationFrame(()=>{T()})}})}},W=a.useRef(s);a.useEffect(()=>{W.current=s},[s]);const Q=a.useRef(null);a.useEffect(()=>{const P=W.current;if(!P||!(m!=null&&m.current)||w.length<=0)return;const R=w.length,K=m.current.clientWidth||0,S=c[1],k=b.current,E=(K+l)/(S+l),z=Math.max(1,Math.floor(E)),q=Math.max(1,Math.round(z*(2/3))),J=Math.min(Math.max(0,v),Math.max(0,R-1)),te={total:R,selectedIndex:J,visibleApprox:E,visibleFull:z,stepHalf:q,canPrev:J>0,canNext:J<R-1,scrollProgress:k,viewportWidth:K,itemMaxWidth:S,gap:l},re=Q.current;let O=!re;if(!O){for(const U in te)if(te[U]!==re[U]){O=!0;break}}O&&(Q.current=te,P(te))},[m,w.length,v,l,c]),a.useEffect(()=>()=>{var P;(P=$.current)==null||P.stop()},[]);const[V,j]=a.useState(0);a.useLayoutEffect(()=>{let P=c[1];const R=C.current;R&&P>R.scrollVisible&&R.scrollVisible>0&&(P=R.scrollVisible);const K=(P+l)*w.length/y;j(K||400)},[m,w.length,l,c,y]);const A=P=>{if(!w.length)return;const R=N??v;switch(P.key){case"ArrowLeft":P.preventDefault(),I(Math.max(0,R-1));break;case"ArrowRight":P.preventDefault(),I(Math.min(w.length-1,R+1));break;case"Home":P.preventDefault(),I(0);break;case"End":P.preventDefault(),I(w.length-1);break;case"Enter":case" ":P.preventDefault(),I(R);break}};a.useEffect(()=>{const P=m.current;if(!P)return;const R=K=>{const S=K.detail;S&&typeof S.index=="number"&&I(S.index)};return P.addEventListener("udx:carousel:centerIndex",R),()=>{P.removeEventListener("udx:carousel:centerIndex",R)}},[m,w.length]);const B=w.map((P,R)=>{var k;const K=(k=P.props)==null?void 0:k.onClick,S=E=>{K==null||K(E)};return a.cloneElement(P,{outputRange:c,ref:D[R],key:R,index:R,role:"option","aria-selected":v===R,tabIndex:v===R?0:-1,onClick:S,onFocus:()=>F(R)})});return i.jsx("div",{className:x.carousel,ref:m,role:"listbox","aria-orientation":"horizontal",onKeyDown:A,...f,children:i.jsx(vt,{draggable:!0,orientation:"horizontal",onScroll:G,scrollSize:V,children:i.jsx("div",{className:x.track,ref:M,style:{gap:`${l}px`,willChange:"transform"},children:B})})})};/*!
1
+ "use strict";var Dn=Object.defineProperty;var An=(e,t,n)=>t in e?Dn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var H=(e,t,n)=>An(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("react"),Ve=require("react-dom"),Y=require("motion/react"),ht=require("clsx"),Fn=require("tailwind-merge"),we=require("@udixio/theme"),Oe=require("@udixio/tailwind"),Pn=require("react-textarea-autosize");var Pe=typeof document<"u"?document.currentScript:null;const mt=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:1,"--r":"25%"},animate:{opacity:1,"--r":"100%",transition:{duration:.5}},exit:{opacity:0,"--r":"100%",transition:{duration:.3}}},[s,r]=o.useState(!0),[u,c]=o.useState(!1),[a,d]=o.useState({x:50,y:50});o.useEffect(()=>{u&&(r(!0),r(!1))},[u]),o.useEffect(()=>{const p=t==null?void 0:t.current;if(p)return p.addEventListener("mousedown",i),p.addEventListener("mouseup",x),p.addEventListener("mouseleave",f),()=>{p.removeEventListener("mousedown",i),p.removeEventListener("mouseup",x),p.removeEventListener("mouseleave",f)}},[t]);const i=p=>{const b=t==null?void 0:t.current,w=b.getBoundingClientRect();c(!0),d({x:(p.clientX-w.left)/b.clientWidth*100,y:(p.clientY-w.top)/b.clientHeight*100})},f=p=>{c(!1)},x=p=>{c(!1)},h=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,m={position:"absolute",inset:0,width:"100%",height:"100%","--x":a.x+"%","--y":a.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${h} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return l.jsx(Y.AnimatePresence,{mode:"wait",children:(u||!u&&!s)&&l.jsx(Y.motion.div,{style:m,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},pt=Fn.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),y=(...e)=>pt(ht.clsx(e)),yt=(...e)=>pt(ht.clsx(e));function $n(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 Re=e=>{const t={};e.classNameList.forEach(s=>{var r;if(s)if(typeof s=="string")(t[r=e.default]??(t[r]=[])).push(s);else{const u=s(e.states);Object.entries(u).map(c=>{const[a,d]=c;(t[a]??(t[a]=[])).push(d)})}});const n=t;return Object.entries(t).map(s=>{let[r,u]=s;u=u.reverse(),r==e.default&&u.unshift("relative"),u.unshift($n(r)),n[r]=yt(...u)}),n},ne=(e,t)=>n=>Re({classNameList:[n.className,t],default:e,states:n}),Z=(e,t)=>n=>o.useMemo(()=>Re({classNameList:[n.className,t],default:e,states:n}),[n]);function Wn(e,t,n){return o.useMemo(()=>Re({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const xt=ne("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:y("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":n,"[&::-webkit-scrollbar-thumb]:bg-transparent":!n},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!n,"cursor-grabbing":t&&n}),track:y("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function Tn(e,t){let n=0,s=null,r=null;const u=(c,a)=>{n=Date.now(),t(c,a)};return(c,a)=>{const d=Date.now(),i=e-(d-n);i<=0?(s&&(clearTimeout(s),s=null),u(c,a)):(r={v:c,o:a},s||(s=setTimeout(()=>{s=null;const f=r;r=null,f&&u(f.v,f.o)},i)))}}const vt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:s,className:r,draggable:u=!1,throttleDuration:c=75,scroll:a,setScroll:d})=>{var G,S;const i=o.useRef(null),f=o.useRef(null),[x,h]=o.useState({width:null,height:null});o.useEffect(()=>{if(!i.current)return;const N=new ResizeObserver(C=>{for(const q of C)q.target===i.current&&h({width:q.contentRect.width,height:q.contentRect.height})});return N.observe(i.current),()=>{N.disconnect()}},[i]);const m=o.useRef(null),p=o.useRef(null),b=()=>{const N=f.current;return N?{width:n??N.scrollWidth,height:n??N.scrollHeight}:null},w=()=>{const N=i.current;return N?{width:N.clientWidth,height:N.clientHeight}:null},{scrollYProgress:L,scrollXProgress:E}=Y.useScroll({container:i}),g=o.useRef(null);g.current||(g.current=Tn(c,(N,C)=>{!p.current||!m.current||!i.current||(C===(t==="horizontal"?"x":"y")&&(d==null||d(N)),s&&(t==="horizontal"&&C==="x"&&s({scrollProgress:N,scroll:N*(m.current.width-i.current.clientWidth),scrollTotal:m.current.width-i.current.clientWidth,scrollVisible:p.current.width}),t==="vertical"&&C==="y"&&s({scrollProgress:N,scroll:N*(m.current.height-i.current.clientHeight),scrollTotal:m.current.height-i.current.clientHeight,scrollVisible:p.current.height})))}));const F=(N,C)=>{g.current&&g.current(N,C)};o.useEffect(()=>{x.width&&F(E.get(),"x"),x.height&&F(L.get(),"y")},[x]),o.useEffect(()=>{const N=i.current,C=f.current;if(!N||!C||typeof a!="number")return;const q=(U,J,te)=>Math.min(te,Math.max(J,U));if(t==="horizontal"){const U=Math.max(0,(n??C.scrollWidth)-N.clientWidth);N.scrollLeft=q(a*U,0,U)}else{const U=Math.max(0,(n??C.scrollHeight)-N.clientHeight);N.scrollTop=q(a*U,0,U)}},[a,t,n]),Y.useMotionValueEvent(E,"change",N=>{F(N,"x")}),Y.useMotionValueEvent(L,"change",N=>{F(N,"y")});const[I,v]=o.useState(!1);o.useLayoutEffect(()=>{I||!p.current||!m.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?m.current.height:m.current.width,scrollVisible:t=="vertical"?p.current.height:p.current.width}),v(!0))},[p,m,s]),m.current=b(),p.current=w();const[k,D]=o.useState(!1),M=xt({isDragging:k,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:u,throttleDuration:c}),[T,j]=o.useState(0),[X,V]=o.useState(0),Q=N=>{if(!u)return;const C=i.current;if(!C||T==null)return;const U=(N.pageX-C.offsetLeft-T)*1.5;C.scrollLeft=X-U},z=N=>{const C=i.current;C&&(D(!0),j(N.pageX-C.offsetLeft),V(C.scrollLeft))},$=N=>{k&&(N.preventDefault(),Q(N))},R=()=>{D(!1)},O=()=>{D(!1)},A=N=>{N.preventDefault()},W=o.useRef(null);return o.useEffect(()=>()=>{W.current&&clearTimeout(W.current)},[]),o.useEffect(()=>{const N=i.current;if(!N)return;const C=q=>{var se,P,_,B;const U=q.detail,J=i.current;if(!J||!U)return;const te=U.orientation??t;if(typeof U.progress=="number")if(te==="horizontal"){const ee=Math.max(0,(((se=m.current)==null?void 0:se.width)??0)-J.clientWidth);J.scrollLeft=Math.min(ee,Math.max(0,U.progress*ee))}else{const ee=Math.max(0,(((P=m.current)==null?void 0:P.height)??0)-J.clientHeight);J.scrollTop=Math.min(ee,Math.max(0,U.progress*ee))}else if(typeof U.scroll=="number")if(te==="horizontal"){const ee=Math.max(0,(((_=m.current)==null?void 0:_.width)??0)-J.clientWidth);J.scrollLeft=Math.min(ee,Math.max(0,U.scroll))}else{const ee=Math.max(0,(((B=m.current)==null?void 0:B.height)??0)-J.clientHeight);J.scrollTop=Math.min(ee,Math.max(0,U.scroll))}};return N.addEventListener("udx:customScroll:set",C),()=>{N.removeEventListener("udx:customScroll:set",C)}},[t]),l.jsxs("div",{className:M.customScroll,ref:i,onMouseDown:z,onMouseMove:$,onMouseUp:R,onMouseLeave:O,onDragStart:A,onScroll:N=>{k||(j(null),D(!0),W.current&&clearTimeout(W.current),W.current=setTimeout(()=>{D(!1)},1e3))},children:[l.jsx("div",{ref:f,style:t==="vertical"?{height:((G=p==null?void 0:p.current)==null?void 0:G.height)??"100%"}:{width:((S=p==null?void 0:p.current)==null?void 0:S.width)??"100%"},className:M.track,children:e}),p.current&&m.current&&l.jsxs(l.Fragment,{children:[t==="vertical"&&m.current.height>p.current.height&&l.jsx(Y.motion.div,{className:"flex-none",style:{height:m.current.height-p.current.height}}),t==="horizontal"&&m.current.width>p.current.width&&l.jsx(Y.motion.div,{className:"flex-none",style:{width:m.current.width-p.current.width}})]})]})};var On="1.3.17";function gt(e,t,n){return Math.max(e,Math.min(t,n))}function Bn(e,t,n){return(1-n)*e+n*t}function Hn(e,t,n,s){return Bn(e,t,1-Math.exp(-n*s))}function Vn(e,t){return(e%t+t)%t}var zn=class{constructor(){H(this,"isRunning",!1);H(this,"value",0);H(this,"from",0);H(this,"to",0);H(this,"currentTime",0);H(this,"lerp");H(this,"duration");H(this,"easing");H(this,"onUpdate")}advance(e){var n;if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;const s=gt(0,this.currentTime/this.duration,1);t=s>=1;const r=t?1:this.easing(s);this.value=this.from+(this.to-this.from)*r}else this.lerp?(this.value=Hn(this.value,this.to,this.lerp*60,e),Math.round(this.value)===this.to&&(this.value=this.to,t=!0)):(this.value=this.to,t=!0);t&&this.stop(),(n=this.onUpdate)==null||n.call(this,this.value,t)}stop(){this.isRunning=!1}fromTo(e,t,{lerp:n,duration:s,easing:r,onStart:u,onUpdate:c}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=s,this.easing=r,this.currentTime=0,this.isRunning=!0,u==null||u(),this.onUpdate=c}};function _n(e,t){let n;return function(...s){let r=this;clearTimeout(n),n=setTimeout(()=>{n=void 0,e.apply(r,s)},t)}}var Yn=class{constructor(e,t,{autoResize:n=!0,debounce:s=250}={}){H(this,"width",0);H(this,"height",0);H(this,"scrollHeight",0);H(this,"scrollWidth",0);H(this,"debouncedResize");H(this,"wrapperResizeObserver");H(this,"contentResizeObserver");H(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});H(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});H(this,"onContentResize",()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)});this.wrapper=e,this.content=t,n&&(this.debouncedResize=_n(this.resize,s),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){var e,t;(e=this.wrapperResizeObserver)==null||e.disconnect(),(t=this.contentResizeObserver)==null||t.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize,!1)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},wt=class{constructor(){H(this,"events",{})}emit(e,...t){var s;let n=this.events[e]||[];for(let r=0,u=n.length;r<u;r++)(s=n[r])==null||s.call(n,...t)}on(e,t){var n;return(n=this.events[e])!=null&&n.push(t)||(this.events[e]=[t]),()=>{var s;this.events[e]=(s=this.events[e])==null?void 0:s.filter(r=>t!==r)}}off(e,t){var n;this.events[e]=(n=this.events[e])==null?void 0:n.filter(s=>t!==s)}destroy(){this.events={}}},ot=100/6,he={passive:!1},qn=class{constructor(e,t={wheelMultiplier:1,touchMultiplier:1}){H(this,"touchStart",{x:0,y:0});H(this,"lastDelta",{x:0,y:0});H(this,"window",{width:0,height:0});H(this,"emitter",new wt);H(this,"onTouchStart",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:e})});H(this,"onTouchMove",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e,s=-(t-this.touchStart.x)*this.options.touchMultiplier,r=-(n-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:s,y:r},this.emitter.emit("scroll",{deltaX:s,deltaY:r,event:e})});H(this,"onTouchEnd",e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})});H(this,"onWheel",e=>{let{deltaX:t,deltaY:n,deltaMode:s}=e;const r=s===1?ot:s===2?this.window.width:1,u=s===1?ot:s===2?this.window.height:1;t*=r,n*=u,t*=this.options.wheelMultiplier,n*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:n,event:e})});H(this,"onWindowResize",()=>{this.window={width:window.innerWidth,height:window.innerHeight}});this.element=e,this.options=t,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,he),this.element.addEventListener("touchstart",this.onTouchStart,he),this.element.addEventListener("touchmove",this.onTouchMove,he),this.element.addEventListener("touchend",this.onTouchEnd,he)}on(e,t){return this.emitter.on(e,t)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,he),this.element.removeEventListener("touchstart",this.onTouchStart,he),this.element.removeEventListener("touchmove",this.onTouchMove,he),this.element.removeEventListener("touchend",this.onTouchEnd,he)}},it=e=>Math.min(1,1.001-Math.pow(2,-10*e)),Un=class{constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:n=e,smoothWheel:s=!0,syncTouch:r=!1,syncTouchLerp:u=.075,touchInertiaExponent:c=1.7,duration:a,easing:d,lerp:i=.1,infinite:f=!1,orientation:x="vertical",gestureOrientation:h=x==="horizontal"?"both":"vertical",touchMultiplier:m=1,wheelMultiplier:p=1,autoResize:b=!0,prevent:w,virtualScroll:L,overscroll:E=!0,autoRaf:g=!1,anchors:F=!1,autoToggle:I=!1,allowNestedScroll:v=!1,__experimental__naiveDimensions:k=!1,naiveDimensions:D=k,stopInertiaOnNavigate:M=!1}={}){H(this,"_isScrolling",!1);H(this,"_isStopped",!1);H(this,"_isLocked",!1);H(this,"_preventNextNativeScrollEvent",!1);H(this,"_resetVelocityTimeout",null);H(this,"_rafId",null);H(this,"isTouching");H(this,"time",0);H(this,"userData",{});H(this,"lastVelocity",0);H(this,"velocity",0);H(this,"direction",0);H(this,"options");H(this,"targetScroll");H(this,"animatedScroll");H(this,"animate",new zn);H(this,"emitter",new wt);H(this,"dimensions");H(this,"virtualScroll");H(this,"onScrollEnd",e=>{e instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&e.stopPropagation()});H(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});H(this,"onTransitionEnd",e=>{e.propertyName.includes("overflow")&&this.checkOverflow()});H(this,"onClick",e=>{const n=e.composedPath().filter(s=>s instanceof HTMLAnchorElement&&s.getAttribute("href"));if(this.options.anchors){const s=n.find(r=>{var u;return(u=r.getAttribute("href"))==null?void 0:u.includes("#")});if(s){const r=s.getAttribute("href");if(r){const u=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,c=`#${r.split("#")[1]}`;this.scrollTo(c,u)}}}this.options.stopInertiaOnNavigate&&n.find(r=>r.host===window.location.host)&&this.reset()});H(this,"onPointerDown",e=>{e.button===1&&this.reset()});H(this,"onVirtualScroll",e=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(e)===!1)return;const{deltaX:t,deltaY:n,event:s}=e;if(this.emitter.emit("virtual-scroll",{deltaX:t,deltaY:n,event:s}),s.ctrlKey||s.lenisStopPropagation)return;const r=s.type.includes("touch"),u=s.type.includes("wheel");this.isTouching=s.type==="touchstart"||s.type==="touchmove";const c=t===0&&n===0;if(this.options.syncTouch&&r&&s.type==="touchstart"&&c&&!this.isStopped&&!this.isLocked){this.reset();return}const d=this.options.gestureOrientation==="vertical"&&n===0||this.options.gestureOrientation==="horizontal"&&t===0;if(c||d)return;let i=s.composedPath();i=i.slice(0,i.indexOf(this.rootElement));const f=this.options.prevent;if(i.find(w=>{var L,E,g;return w instanceof HTMLElement&&(typeof f=="function"&&(f==null?void 0:f(w))||((L=w.hasAttribute)==null?void 0:L.call(w,"data-lenis-prevent"))||r&&((E=w.hasAttribute)==null?void 0:E.call(w,"data-lenis-prevent-touch"))||u&&((g=w.hasAttribute)==null?void 0:g.call(w,"data-lenis-prevent-wheel"))||this.options.allowNestedScroll&&this.checkNestedScroll(w,{deltaX:t,deltaY:n}))}))return;if(this.isStopped||this.isLocked){s.cancelable&&s.preventDefault();return}if(!(this.options.syncTouch&&r||this.options.smoothWheel&&u)){this.isScrolling="native",this.animate.stop(),s.lenisStopPropagation=!0;return}let h=n;this.options.gestureOrientation==="both"?h=Math.abs(n)>Math.abs(t)?n:t:this.options.gestureOrientation==="horizontal"&&(h=t),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||this.animatedScroll===0&&n>0||this.animatedScroll===this.limit&&n<0))&&(s.lenisStopPropagation=!0),s.cancelable&&s.preventDefault();const m=r&&this.options.syncTouch,b=r&&s.type==="touchend";b&&(h=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent)),this.scrollTo(this.targetScroll+h,{programmatic:!1,...m?{lerp:b?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});H(this,"onNativeScroll",()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){const e=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-e,this.direction=Math.sign(this.animatedScroll-e),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}});H(this,"raf",e=>{const t=e-(this.time||e);this.time=e,this.animate.advance(t*.001),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))});window.lenisVersion=On,(!e||e===document.documentElement)&&(e=window),typeof a=="number"&&typeof d!="function"?d=it:typeof d=="function"&&typeof a!="number"&&(a=1),this.options={wrapper:e,content:t,eventsTarget:n,smoothWheel:s,syncTouch:r,syncTouchLerp:u,touchInertiaExponent:c,duration:a,easing:d,lerp:i,infinite:f,gestureOrientation:h,orientation:x,touchMultiplier:m,wheelMultiplier:p,autoResize:b,prevent:w,virtualScroll:L,overscroll:E,autoRaf:g,anchors:F,autoToggle:I,allowNestedScroll:v,naiveDimensions:D,stopInertiaOnNavigate:M},this.dimensions=new Yn(e,t,{autoResize:b}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new qn(n,{touchMultiplier:m,wheelMultiplier:p}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd,{passive:!0})),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(e,t){return this.emitter.on(e,t)}off(e,t){return this.emitter.off(e,t)}get overflow(){const e=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[e]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}setScroll(e){this.isHorizontal?this.options.wrapper.scrollTo({left:e,behavior:"instant"}):this.options.wrapper.scrollTo({top:e,behavior:"instant"})}resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}scrollTo(e,{offset:t=0,immediate:n=!1,lock:s=!1,programmatic:r=!0,lerp:u=r?this.options.lerp:void 0,duration:c=r?this.options.duration:void 0,easing:a=r?this.options.easing:void 0,onStart:d,onComplete:i,force:f=!1,userData:x}={}){if(!((this.isStopped||this.isLocked)&&!f)){if(typeof e=="string"&&["top","left","start","#"].includes(e))e=0;else if(typeof e=="string"&&["bottom","right","end"].includes(e))e=this.limit;else{let h;if(typeof e=="string"?(h=document.querySelector(e),h||(e==="#top"?e=0:console.warn("Lenis: Target not found",e))):e instanceof HTMLElement&&(e!=null&&e.nodeType)&&(h=e),h){if(this.options.wrapper!==window){const p=this.rootElement.getBoundingClientRect();t-=this.isHorizontal?p.left:p.top}const m=h.getBoundingClientRect();e=(this.isHorizontal?m.left:m.top)+this.animatedScroll}}if(typeof e=="number"){if(e+=t,e=Math.round(e),this.options.infinite){if(r){this.targetScroll=this.animatedScroll=this.scroll;const h=e-this.animatedScroll;h>this.limit/2?e=e-this.limit:h<-this.limit/2&&(e=e+this.limit)}}else e=gt(0,e,this.limit);if(e===this.targetScroll){d==null||d(this),i==null||i(this);return}if(this.userData=x??{},n){this.animatedScroll=this.targetScroll=e,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),i==null||i(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}r||(this.targetScroll=e),typeof c=="number"&&typeof a!="function"?a=it:typeof a=="function"&&typeof c!="number"&&(c=1),this.animate.fromTo(this.animatedScroll,e,{duration:c,easing:a,lerp:u,onStart:()=>{s&&(this.isLocked=!0),this.isScrolling="smooth",d==null||d(this)},onUpdate:(h,m)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=h-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=h,this.setScroll(this.scroll),r&&(this.targetScroll=h),m||this.emit(),m&&(this.reset(),this.emit(),i==null||i(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}checkNestedScroll(e,{deltaX:t,deltaY:n}){const s=Date.now(),r=e._lenis??(e._lenis={});let u,c,a,d,i,f,x,h;const m=this.options.gestureOrientation;if(s-(r.time??0)>2e3){r.time=Date.now();const I=window.getComputedStyle(e);r.computedStyle=I;const v=I.overflowX,k=I.overflowY;if(u=["auto","overlay","scroll"].includes(v),c=["auto","overlay","scroll"].includes(k),r.hasOverflowX=u,r.hasOverflowY=c,!u&&!c||m==="vertical"&&!c||m==="horizontal"&&!u)return!1;i=e.scrollWidth,f=e.scrollHeight,x=e.clientWidth,h=e.clientHeight,a=i>x,d=f>h,r.isScrollableX=a,r.isScrollableY=d,r.scrollWidth=i,r.scrollHeight=f,r.clientWidth=x,r.clientHeight=h}else a=r.isScrollableX,d=r.isScrollableY,u=r.hasOverflowX,c=r.hasOverflowY,i=r.scrollWidth,f=r.scrollHeight,x=r.clientWidth,h=r.clientHeight;if(!u&&!c||!a&&!d||m==="vertical"&&(!c||!d)||m==="horizontal"&&(!u||!a))return!1;let p;if(m==="horizontal")p="x";else if(m==="vertical")p="y";else{const I=t!==0,v=n!==0;I&&u&&a&&(p="x"),v&&c&&d&&(p="y")}if(!p)return!1;let b,w,L,E,g;if(p==="x")b=e.scrollLeft,w=i-x,L=t,E=u,g=a;else if(p==="y")b=e.scrollTop,w=f-h,L=n,E=c,g=d;else return!1;return(L>0?b<w:b>0)&&E&&g}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){const e=this.options.wrapper;return this.isHorizontal?e.scrollX??e.scrollLeft:e.scrollY??e.scrollTop}get scroll(){return this.options.infinite?Vn(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(e){this._isScrolling!==e&&(this._isScrolling=e,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(e){this._isStopped!==e&&(this._isStopped=e,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let e="lenis";return this.options.autoToggle&&(e+=" lenis-autoToggle"),this.isStopped&&(e+=" lenis-stopped"),this.isLocked&&(e+=" lenis-locked"),this.isScrolling&&(e+=" lenis-scrolling"),this.isScrolling==="smooth"&&(e+=" lenis-smooth"),e}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}};const Xn=({transition:e=1.2,easing:t,orientation:n="vertical",smoothTouch:s=!1,touchMultiplier:r=2,children:u})=>{const c=o.useRef(null),a=o.useRef(null);return o.useEffect(()=>{let d;typeof e=="string"?e.endsWith("ms")?d=parseFloat(e)/1e3:e.endsWith("s")?d=parseFloat(e):d=parseFloat(e)||1.2:d=e;const i=x=>1-Math.pow(1-x,5);c.current=new Un({duration:d,easing:t??i,orientation:n,smoothWheel:!0,touchMultiplier:r,syncTouch:s});const f=x=>{var h;(h=c.current)==null||h.raf(x),a.current=requestAnimationFrame(f)};return a.current=requestAnimationFrame(f),()=>{var x;a.current!==null&&cancelAnimationFrame(a.current),(x=c.current)==null||x.destroy(),c.current=null}},[e,t,n,s,r]),u?l.jsx(l.Fragment,{children:u}):null},ue=({style:e,colorName:t,stateClassName:n="state-ripple-group",children:s,className:r})=>{const u=o.useRef(null),c=o.useRef(null),[a,d]=o.useState(!1),i=bt({isClient:a,stateClassName:n,className:r,colorName:t});return o.useEffect(()=>{if(u.current&&n!=="state-layer"){const x=(n.includes("[")?"group/"+n.split("[")[1].split("]")[0]:"group").replace(/\//g,"\\/"),h=u.current.closest(`.${x}:not(.${x} .${x})`);c.current=h}d(!0)},[]),l.jsxs("div",{ref:u,className:i.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:[a&&l.jsx(mt,{triggerRef:c}),s]})},Gn=({isClient:e,stateClassName:t})=>({stateLayer:y(["w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden",t])}),bt=Z("stateLayer",Gn),St=({targetRef:e,children:t})=>{const[n,s]=o.useState(null),r=o.useRef(null),u=()=>{const c=e.current;if(!c)return;const a=c.getBoundingClientRect();s({position:"fixed",top:a.top,left:a.left,width:a.width,height:a.height,pointerEvents:"none",zIndex:999})};return o.useEffect(()=>{const c=e.current;if(c)return u(),window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),r.current=new ResizeObserver(u),r.current.observe(c),()=>{var a;window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u),(a=r.current)==null||a.disconnect()}},[e]),n?Ve.createPortal(l.jsx("div",{style:n,children:t}),document.body):null};function Kn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const Jn=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:s=!1})=>{const[r,u]=o.useState(null),[c,a]=o.useState(null),d=o.useRef(null),i=o.useRef(0),f=o.useRef(0),x=o.useRef(null),h=o.useRef(!1),m=o.useRef(n);o.useEffect(()=>{m.current=n},[n]),o.useEffect(()=>{let E=!1;return(async()=>{const g=await we.loader(e,s);if(E)return;x.current=g,u(g);const F=new Worker(new URL(""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/theme.worker.js").href:new URL("theme.worker.js",document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"&&document.currentScript.src||document.baseURI).href),typeof document>"u"?require("url").pathToFileURL(__filename).href:Pe&&Pe.tagName.toUpperCase()==="SCRIPT"&&Pe.src||new URL("index.cjs",document.baseURI).href),{type:"module"});d.current=F,F.onmessage=I=>{var v;I.data.id>f.current&&(f.current=I.data.id,h.current=!0,a(I.data.css),(v=m.current)==null||v.call(m,x.current))}})(),()=>{var g;E=!0,(g=d.current)==null||g.terminate(),d.current=null}},[]);const p=o.useRef(null),b=o.useRef(0),w=o.useRef(null);o.useEffect(()=>{if(!r)return;const E={...e,sourceColor:e.sourceColor},g=Date.now(),F=g-b.current,I=async v=>{await L(v)};if(b.current===0||F>=t)p.current&&(clearTimeout(p.current),p.current=null),w.current=null,b.current=g,I(E);else if(w.current=E,!p.current){const v=Math.max(0,t-F);p.current=setTimeout(async()=>{p.current=null;const k=w.current;w.current=null,k&&(b.current=Date.now(),await I(k))},v)}return()=>{}},[e,t,r]);const L=async E=>{if(typeof E.sourceColor=="string"&&!Kn(E.sourceColor))throw new Error("Invalid hex color");const g=x.current;if(!g)return;g.context.update(E),g.palettes.sync(E.palettes);const F=d.current;if(!F||!h.current){await g.load();const v=g.plugins.getPlugin(Oe.TailwindPlugin).getInstance().outputCss;a(v),h.current=!0,n==null||n(g);return}const I=++i.current;F.postMessage({id:I,snapshot:we.serializeThemeContext(g),tailwindOptions:g.plugins.getPlugin(Oe.TailwindPlugin).options,fontOptions:g.plugins.getPlugin(we.FontPlugin).options})};return o.useEffect(()=>()=>{p.current&&(clearTimeout(p.current),p.current=null)},[]),c?l.jsx("style",{dangerouslySetInnerHTML:{__html:c}}):null};function Zn(){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 Qn(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ze(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function lt(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function $e(e,t){if(!ze(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const c=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),a=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`)||(a==="inline"?e.classList.add(`${t}-timeline-inline`):a==="block"?e.classList.add(`${t}-timeline-block`):e.classList.add(`${t}-scroll`))}const n=e.getAttribute(`data-${t}-start`);n&&e.style.setProperty(`--${t}-range-start`,n);const s=e.getAttribute(`data-${t}-end`);s&&e.style.setProperty(`--${t}-range-end`,s);const r=e.hasAttribute(`data-${t}-paused`)||e.classList.contains(`${t}-paused`),u=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!u&&e.setAttribute(`data-${t}-run`,"")}function We(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(s=>ze(s))}function es(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 u=r.classList;return u.contains(`${t}-in`)||u.contains(`${t}-out`)||Array.from(u).some(d=>d.startsWith(`${t}-`)&&!d.includes("scroll")&&!s.has(d))?!0:!ze(r)})}function ts(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function at(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function ct(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 ns=[0,.2],ut=new WeakSet;function dt(e,t){if(ut.has(e))return;ut.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 _e(e={}){const{prefix:t="anim",once:n=!0}=e;if(Qn())return()=>{};const s=Zn(),r=new WeakSet;let u=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,c=!0;const a=()=>{const m=window.pageYOffset||window.scrollY||0;c=m>=u,u=m};typeof window<"u"&&window.addEventListener("scroll",a,{passive:!0});const d=new IntersectionObserver(m=>{for(const p of m){const b=p.target;if(!lt(b)||b.hasAttribute(`data-${t}-animating`))continue;const w=ts(b.classList,t);p.isIntersecting?(w&&ct(b,t,"out"),at(b,t,"in"),n&&d.unobserve(b)):n||(c||ct(b,t,"in"),w&&at(b,t,"out"))}},{threshold:ns}),i=m=>{const p=es(m||document,t);for(const b of p)r.has(b)||(r.add(b),d.observe(b),dt(b,t))};i();let f,x=null,h=null;if(s)(()=>{h==null&&(h=requestAnimationFrame(()=>{h=null;const p=We(void 0,t);for(const b of p)$e(b,t)}))})(),x=new MutationObserver(p=>{for(const b of p)if(b.type==="attributes"){const w=b.target;w instanceof HTMLElement&&($e(w,t),lt(w)&&(r.has(w)||(r.add(w),d.observe(w),dt(w,t))))}else if(b.type==="childList"&&b.addedNodes&&b.addedNodes.length){for(const w of Array.from(b.addedNodes))if(w instanceof HTMLElement){const L=We(w,t);for(const E of L)$e(E,t);i(w)}}}),x.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class",`data-${t}-scroll`,`data-${t}-start`,`data-${t}-end`,`data-${t}-paused`,`data-${t}-run`]}),f=()=>{h!=null&&cancelAnimationFrame(h),x&&x.disconnect()};else{let m;We(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven.js")).then(b=>{m=b.initScrollViewFallback({once:n})}),f=()=>{typeof m=="function"&&m()}}return()=>{f&&f(),typeof window<"u"&&window.removeEventListener("scroll",a),d.disconnect()}}const ss=_e,rs=_e,be=({anchorRef:e,position:t="bottom",children:n,style:s,...r})=>{const c=`--anchor-${o.useId().replace(/:/g,"")}`,[a,d]=o.useState(!1);if(o.useLayoutEffect(()=>{typeof CSS<"u"&&CSS.supports("anchor-name","--a")&&d(!0)},[]),o.useLayoutEffect(()=>{if(a&&e.current){const f=e.current;return f.style.anchorName=c,()=>{e.current&&(e.current.style.anchorName="")}}},[a,e,c]),a){const f={position:"fixed",margin:0,zIndex:9999,positionAnchor:c,positionArea:t,positionTryFallbacks:"flip-block, flip-inline",...s};return Ve.createPortal(l.jsx("div",{style:f,...r,children:n}),document.body)}const i={position:"absolute",pointerEvents:"auto",...s};switch(t){case"top":i.bottom="100%",i.left="50%",i.transform="translateX(-50%)";break;case"top-left":i.bottom="100%",i.left=0;break;case"top-right":i.bottom="100%",i.right=0;break;case"bottom":i.top="100%",i.left="50%",i.transform="translateX(-50%)";break;case"bottom-left":i.top="100%",i.left=0;break;case"bottom-right":i.top="100%",i.right=0;break;case"left":i.right="100%",i.top="50%",i.transform="translateY(-50%)";break;case"right":i.left="100%",i.top="50%",i.transform="translateY(-50%)";break}return l.jsx(St,{targetRef:e,children:l.jsx("div",{style:i,...r,children:n})})},Et=({variant:e,disableTextMargins:t,disabled:n,iconPosition:s,icon:r,isActive:u,loading:c,shape:a,onToggle:d,size:i,allowShapeTransformation:f})=>({button:y(" relative cursor-pointer group/button outline-none inline-block flex w-fit justify-center items-center ",i==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",i==="small"&&"text-label-large px-4 py-2.5 gap-2",i==="medium"&&"text-title-medium px-6 py-4 gap-2",i==="large"&&"text-headline-small px-12 py-8 gap-3",i==="xLarge"&&"text-headline-large px-16 py-12 gap-4",a==="rounded"&&{"rounded-[30px]":i==="xSmall"||i=="small","rounded-[40px]":i==="medium","rounded-[70px]":i==="large"||i=="xLarge"},(a==="squared"||f&&u)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},f&&!n&&{"active:rounded-[12px]":i==="xSmall"||i=="small","active:rounded-[16px]":i==="medium","active:rounded-[28px]":i==="large"||i=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!u,"bg-primary text-on-primary":!n&&u,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!u&&d,"bg-primary text-on-primary":!n&&(u&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!u,"bg-secondary text-on-secondary":!n&&u,"text-on-surface/[0.38]":n},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":n,"text-primary border-outline focus:border-primary":!n&&!u,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&u}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[i==="xSmall"&&"-mx-3 ",i==="small"&&"-mx-4 ",i==="medium"&&"-mx-6 ",i==="large"&&"-mx-12",i==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("overflow-hidden",a==="rounded"&&{"rounded-[30px]":i==="xSmall"||i=="small","rounded-[40px]":i==="medium","rounded-[70px]":i==="large"||i=="xLarge"},(a==="squared"||f&&u)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},f&&!n&&{"group-active/button:rounded-[12px]":i==="xSmall"||i=="small","group-active/button:rounded-[16px]":i==="medium","group-active/button:rounded-[28px]":i==="large"||i=="xLarge"}),label:y({invisible:c}),icon:y({invisible:c},i==="xSmall"&&"size-5",i==="small"&&"size-5",i==="medium"&&"size-6",i==="large"&&"size-8",i==="xLarge"&&"size-10")}),os=ne("button",Et),Nt=Z("button",Et),kt=({variant:e,interactive:t})=>({card:y(" rounded-xl overflow-hidden ",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest",{"group/card cursor-pointer":t})}),is=ne("card",kt),jt=Z("card",kt),Ye=()=>({carouselItem:y("rounded-[28px] overflow-hidden flex-none",{})}),ls=ne("carouselItem",Ye),Lt=Z("carouselItem",Ye),Mt=()=>({carousel:y(["w-full h-[400px]"]),track:y("flex h-full w-full")}),as=ne("carousel",Mt),It=Z("carousel",Mt),Ct=({isChecked:e,isIndeterminate:t,isDisabled:n,isError:s,isFocused:r,isHovered:u})=>({checkbox:y("inline-flex items-center justify-center relative size-4.5 ",{"pointer-events-none opacity-[0.38]":n}),input:y("absolute inset-0 w-full h-full opacity-0 z-10 cursor-pointer"),container:y("relative flex items-center justify-center w-[18px] h-[18px] "),box:y("absolute left-1/2 top-1/2 -translate-1/2 to rounded-[2px] size-4 border-2 transition-colors duration-200",!e&&!t&&{"border-on-surface-variant":!s&&!n,"border-error":s&&!n,"border-on-surface":n},(e||t)&&{"bg-primary border-primary":!s&&!n,"bg-error border-error":s&&!n,"bg-on-surface border-on-surface":n}),icon:y("z-10 relative text-on-primary w-full h-full flex items-center justify-center pointer-events-none",{"text-on-error":s&&!n,"text-surface":n}),stateLayer:"size-10 state-ripple-group-[checkbox] rounded-full cursor-pointer pointer-events-auto absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),cs=ne("checkbox",Ct),Rt=Z("checkbox",Ct),Dt=({variant:e,disabled:t,trailingIcon:n,icon:s,isActive:r,isInteractive:u,activated:c,isFocused:a,isDragging:d,isEditing:i})=>({chip:y(" group/chip px-3 py-1.5 rounded-lg flex items-center gap-2 outline-none",{"pl-2":s,"pr-2":n,"cursor-pointer":!t&&u},{" text-on-surface-variant":!c&&!a||i,"bg-secondary-container text-on-secondary-container":(c||a)&&!i},d&&["opacity-100 cursor-grabbing shadow-3"],e==="outlined"&&["border border-outline-variant",{"border-transparent":i}],e==="elevated"&&!i&&["shadow-1 bg-surface-container-low","border border-outline-variant"]),stateLayer:y("rounded-lg overflow-hidden",{}),label:y("outline-none text-nowrap",{"opacity-[0.38]":t}),leadingIcon:y("text-primary size-[18px]",{"opacity-[0.38]":t}),trailingIcon:y("cursor-pointer size-[18px]",{"opacity-[0.38]":t})}),us=ne("chip",Dt),At=Z("chip",Dt),Ft=({scrollable:e})=>({chips:y(" flex gap-3 outline-none",{"flex-wrap":!e,"overflow-x-auto":e})}),ds=ne("chips",Ft),Pt=Z("chips",Ft),$t=({orientation:e})=>({divider:y("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),fs=ne("divider",$t),Wt=Z("divider",$t),Tt=({size:e,variant:t,extended:n})=>({fab:y("flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small","rounded-[16px]":e=="medium","rounded-[28px]":e=="large"},{"p-2":e=="small","p-4":e=="medium","p-[30px]":e=="large"},t==="primary"&&"bg-primary text-on-primary",t==="secondary"&&"bg-secondary text-on-secondary",t==="tertiary"&&"bg-tertiary text-on-tertiary",t==="primaryContainer"&&"bg-primary-container text-on-primary-container",t==="secondaryContainer"&&"bg-secondary-container text-on-secondary-container",t==="tertiaryContainer"&&"bg-tertiary-container text-on-tertiary-container"),icon:y({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:y("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),hs=ne("fab",Tt),Ot=Z("fab",Tt),Bt=({size:e,variant:t,open:n})=>({fabMenu:y("relative inline-flex flex-col items-end"),actions:y("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0"),label:y("text-nowrap")}),ms=ne("fabMenu",Bt),Ht=Z("fabMenu",Bt),Vt=({variant:e,disabled:t,onToggle:n,isActive:s,size:r,width:u,shape:c,allowShapeTransformation:a})=>({iconButton:y("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"||a&&s)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!t&&{"active:rounded-[12px]":r==="xSmall"||r=="small","active:rounded-[16px]":r==="medium","active:rounded-[28px]":r==="large"||r=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!s&&!!n,"bg-primary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-secondary-container text-on-secondary-container":!s&&!!n,"bg-secondary text-on-secondary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!s,"border border-transparent bg-inverse-surface":s},!!t&&{"border border-on-surface/[0.12]":!s,"border border-transparent bg-on-surface/[0.12]":s}]),touchTarget:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("absolute top-0 left-0 h-full w-full overflow-hidden",(c==="rounded"||c==="squared"&&n&&!t&&s&&a)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(c==="squared"||c==="rounded"&&n&&!t&&s&&a)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!t&&{"group-active/icon-button:rounded-[12px]":r==="xSmall"||r=="small","group-active/icon-button:rounded-[16px]":r==="medium","group-active/icon-button:rounded-[28px]":r==="large"||r=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!s,"state-primary":s},e==="filled"&&{"state-primary":!s&&!!n,"state-inverse-on-surface":s||!n},e==="tonal"&&{"state-on-surface-variant":!s&&!!n,"state-on-secondary-container":s||!n},e==="outlined"&&{"state-on-surface-variant":!s,"state-on-primary":s}]),icon:y(" transition-all duration-300",{"size-5 p-1.5":r==="xSmall"},{"size-6 p-2":r==="small"},{"size-6 p-4":r==="medium"},{"size-8 p-8":r==="large"},{"size-10 p-12":r==="xLarge"},u=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],u=="wide"&&[{"px-2.5":r==="xSmall"},{"px-3.5":r==="small"},{"px-6":r==="medium"},{"px-12":r==="large"},{"px-[72px]":r==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!s,"text-primary":s},e==="filled"&&{"text-primary":!s&&!!n,"text-on-primary":s||!n},e==="outlined"&&{"text-on-surface-variant":!s,"text-inverse-on-surface":s}],!!t&&"text-on-surface/[0.38]")}),ps=ne("iconButton",Vt),zt=Z("iconButton",Vt),_t=({variant:e,hasGroups:t})=>({menu:y("z-50 min-w-[112px] max-w-[280px] max-h-[300px] ","flex flex-col",{"overflow-y-auto":!t},{"bg-surface-container":!e||e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant","py-0.5 shadow-2 px-1 rounded-2xl":!t,"bg-transparent ":t})}),ys=ne("menu",_t),Yt=Z("menu",_t),qt=({variant:e})=>({menuGroup:y("flex flex-col gap-0.5 mb-0.5 last:mb-0","rounded-lg py-0.5 px-1 shadow-2 first:rounded-t-2xl last:rounded-b-2xl",{"bg-surface-container":e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant"}),groupLabel:y("px-3 pt-2 text-label-small tracking-wide ",{"text-on-surface-variant":e==="standard","text-on-tertiary-container opacity-80":e==="vibrant"})}),xs=ne("menuGroup",qt),Ut=Z("menuGroup",qt),Xt=({variant:e,isVisible:t})=>({progressIndicator:y((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1",e==="linear-indeterminate"&&"relative overflow-hidden rounded-full"),firstTrack:y((e==="linear-determinate"||e==="linear-indeterminate")&&"h-full rounded-full bg-primary-container",{"max-h-0":!t,"max-h-full":t}),activeIndicator:y("h-full rounded-full bg-primary",e==="linear-determinate"&&{"rounded-l-full":!0},(e==="linear-indeterminate"||e==="linear-determinate")&&{"max-h-0":!t,"max-h-full":t},(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),lastTrack:y((e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",{"max-h-0":!t,"max-h-full":t}),stop:y("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),vs=ne("progressIndicator",Xt),Gt=Z("progressIndicator",Xt),qe=({variant:e,position:t})=>({sideSheet:y("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-full":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:y("w-full overflow-hidden flex flex-col",{}),header:y("p-4 flex items-center gap-2"),content:y("flex-1 overflow-y-auto"),title:y("text-on-surface-variant text-title-large"),closeButton:y("ml-auto"),divider:y({hidden:e=="modal"}),overlay:y("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),Kt=ne("sideSheet",qe),gs=Z("sideSheet",qe),Ue=({isChanging:e})=>({slider:y(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:y(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:y(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:y(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:y(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:y(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),ws=ne("slider",Ue),Jt=Z("slider",Ue),Zt=()=>({snackbar:y(" rounded bg-inverse-surface "),container:y("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:y("text-body-medium text-inverse-on-surface "),icon:y(" ml-auto mr-0 text-inverse-on-surface block dark")}),bs=ne("snackbar",Zt),Qt=Z("snackbar",Zt),en=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:y("group/switch w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:y("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:y("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!n},{"w-[24px] h-[24px]":!(!e&&!n)},!t&&["cursor-pointer group-active/switch:h-[28px] group-active/switch:w-[28px]",{"bg-on-primary group-hover/switch:bg-primary-container":e},{"bg-outline group-hover/switch:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:y("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:y("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),Ss=ne("switch",en),tn=Z("switch",en),nn=({isSelected:e,icon:t,label:n,variant:s})=>({tab:y("flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&s==="primary"&&"h-16",!(t&&n&&s==="primary")&&"h-12"),stateLayer:y("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",s==="primary"&&{"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface":!e,"group-hover/tab:hover-state-primary group-focus-visible/tab:focus-state-primary":e},s==="secondary"&&"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"),content:y("flex gap-0.5 h-full justify-center",{relative:s=="primary"},{"":!!(n&&!t)},s==="primary"&&"flex-col items-center",s==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:y("h-6 w-6 p-0.5 !box-border",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:y("text-title-small text-nowrap",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:y("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")}),Es=ne("tab",nn),sn=Z("tab",nn),rn=({scrollable:e})=>({tabs:y("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Ns=ne("tabs",rn),on=Z("tabs",rn),ln=()=>({tabPanels:y("overflow-hidden")}),ks=ne("tabPanels",ln),an=Z("tabPanels",ln),cn=()=>({tabPanel:y("")}),js=ne("tabPanel",cn),un=Z("tabPanel",cn),dn=({disabled:e,leadingIcon:t,trailingIcon:n,variant:s,errorText:r,isFocused:u,value:c,suffix:a,multiline:d})=>({textField:y({"opacity-[.38]":e}),content:y("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":!d},{"border-on-surface-variant":!(r!=null&&r.length)&&!u&&s=="filled","border-outline":!(r!=null&&r.length)&&!u&&s=="outlined","border-primary":!(r!=null&&r.length)&&u,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},s=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],s=="outlined"&&["border rounded box-border",{"border-[3px]":u}]),stateLayer:y("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":u}),label:y("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"text-error":!!(r!=null&&r.length)},{"text-primary":!(r!=null&&r.length)&&u}),input:y("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!a},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:y("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",s=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":u}]),supportingText:y(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":u},{"text-error":!!(r!=null&&r.length)}),leadingIcon:y(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!o.isValidElement(t)}]),trailingIcon:y("h-12 w-12 flex items-center justify-center",{"cursor-text":!o.isValidElement(n)}),suffix:y("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")}),Ls=ne("textField",dn),fn=Z("textField",dn),hn=({position:e,variant:t})=>({toolTip:y(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",t=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface ",{"bottom-full left-1/2 -translate-x-1/2":e=="top","top-full left-1/2 -translate-x-1/2":e=="bottom","right-full top-1/2 -translate-y-1/2":e=="left","left-full top-1/2 -translate-y-1/2":e=="right","bottom-full right-full":e=="top-left","bottom-full left-full":e=="top-right","top-full right-full":e=="bottom-left","top-full left-full":e=="bottom-right"}),container:y("pb-2",t=="rich"&&"px-4 pt-3 ",t=="plain"&&"px-2 py-1"),actions:y("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:y("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:y(""),content:y("w-full")}),Ms=ne("toolTip",hn),mn=Z("toolTip",hn),le=({icon:e,colors:t=[],className:n,...s})=>{if(typeof e=="string"){let f=e,x="";return t[0]&&(x=` fill="${t[0]}" color="${t[0]}"`,f=f.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),f=f.replace(/<svg([^>]*)>/,(h,m)=>`<svg${m.replace(/\s+(width|height)=["'][^"']*["']/g,"")} width="100%" height="100%"${x}>`),l.jsx("div",{className:y("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||""},dangerouslySetInnerHTML:{__html:f}})}if(e&&typeof e=="object"&&"src"in e){const f=e;return l.jsx("img",{src:f.src,width:f.width,height:f.height,className:y("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const r=e;if(!(r!=null&&r.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:u}=r,[c,a,,,d]=u||[],i=f=>{switch(f.length){case 2:return{"--fa-primary-color":f[0]||"inherit","--fa-secondary-color":f[1]||"inherit"};case 1:return{color:f[0]};default:return{}}};return l.jsx("svg",{className:y("size-5 box-content",n),style:{...i(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${c} ${a}`,role:"img","aria-hidden":"true",...s,children:typeof d=="string"?l.jsx("path",{className:"fill-current",d}):d.map((f,x)=>l.jsx("path",{d:f},x))})},pn=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:s,...r})=>{const[u,c]=o.useState(t),[a]=o.useState(1.5);o.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),c(t)},[t]);const[d,i]=o.useState(!0),f=()=>d?a:a*.5;o.useEffect(()=>{if(e==="circular-indeterminate"&&u!==100){const p=setInterval(()=>{c(d?20:40),i(!d)},f()*1e3);return()=>clearInterval(p)}},[e,d,u]);const[x,h]=o.useState(!1);o.useEffect(()=>{if(u>=100){const p=setTimeout(()=>{h(!1)},n);return()=>{clearTimeout(p)}}else h(!0)},[u,n]);const m=Gt({className:s,variant:e,value:t,transitionDuration:n,isVisible:x});return l.jsxs(l.Fragment,{children:[e==="linear-indeterminate"&&l.jsxs("div",{className:m.progressIndicator,...r,children:[l.jsx(Y.motion.div,{animate:{width:["0%","0%","0%","20%"],marginLeft:["0px","0px","6px","6px"],marginRight:["0px","0px","6px","6px"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut",times:[0,.499,.5,1]},style:{flexShrink:0},className:m.activeIndicator}),l.jsx(Y.motion.div,{animate:{width:["0%","40%","100%"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"},style:{flexShrink:0},className:m.firstTrack}),l.jsx(Y.motion.div,{animate:{width:["20%","60%","20%"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut",times:[0,.5,1]},style:{flexShrink:0,marginLeft:"6px"},className:m.activeIndicator}),l.jsx("div",{style:{marginLeft:"6px"},className:m.lastTrack})]}),e==="linear-determinate"&&l.jsxs("div",{className:m.progressIndicator,...r,children:[l.jsx("div",{style:{width:`${u}%`,transition:`width ${n}ms ease-in-out ${u==100?", max-height 200ms 0.5s ease-in-out":""}`},className:m.activeIndicator}),l.jsx("div",{style:{marginLeft:u!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${u==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:m.lastTrack}),l.jsx("div",{style:{width:"4px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:m.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&l.jsx(Y.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:e==="circular-indeterminate"?270:-90},transition:e==="circular-indeterminate"?{repeat:1/0,duration:f(),ease:"linear"}:{duration:n/1e3},className:m.progressIndicator,...r,children:l.jsx(Y.motion.circle,{cx:"50%",cy:"50%",r:x?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:e==="circular-indeterminate"?"hidden":"determinate",animate:e==="circular-indeterminate"?"visible":"determinate",className:m.activeIndicator,variants:{hidden:{pathLength:d?10/100:90/100},visible:{pathLength:d?90/100:10/100},determinate:{pathLength:u/100}},transition:{pathLength:e==="circular-indeterminate"?{type:"tween",ease:"linear",duration:f(),bounce:0}:{type:"tween",ease:"easeInOut",duration:n/1e3}}})},e==="circular-indeterminate"?d+"":"static")]})};function Is(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const me=({variant:e="filled",disabled:t=!1,icon:n,href:s,label:r,disableTextMargins:u,className:c,iconPosition:a="left",loading:d=!1,shape:i="rounded",onClick:f,onToggle:x,activated:h,ref:m,size:p="medium",allowShapeTransformation:b=!0,transition:w,children:L,...E})=>{if(L&&(r=L),!r)throw new Error("Button component requires either a label prop or children content");e=Is(e);const g=s?"a":"button",F=o.useRef(null),I=m||F,[v,k]=o.useState(h);o.useEffect(()=>{k(h)},[h]),w={duration:.3,...w};const D=j=>{t&&j.preventDefault(),x?(k(!v),x(!v)):f&&f(j)},M=Nt({allowShapeTransformation:b,size:p,disableTextMargins:u,shape:i,href:s,disabled:t,icon:n,iconPosition:a,loading:d,variant:e,transition:w,className:c,isActive:v??!1,onToggle:x,activated:v,label:r,children:r}),T=n?l.jsx(le,{icon:n,className:M.icon}):l.jsx(l.Fragment,{});return l.jsxs(g,{ref:I,href:s,className:M.button,...E,onClick:D,disabled:t,"aria-pressed":x?v:void 0,style:{transition:w.duration+"s"},children:[l.jsx("div",{className:M.touchTarget}),l.jsx(ue,{style:{transition:w.duration+"s"},className:M.stateLayer,colorName:y(e==="filled"&&{"on-surface-variant":!v&&!!x,"on-primary":v||!x},e==="elevated"&&{"on-primary":v&&!!x,primary:!v||!x},e==="tonal"&&{"on-secondary":v&&!!x,"on-secondary-container":!v||!x},e==="outlined"&&{"inverse-on-surface":v&&!!x,"on-surface-variant":!v||!x},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),a==="left"&&T,d&&l.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:l.jsx(pn,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:y({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),l.jsx("span",{className:M.label,children:r}),a==="right"&&T]})},Cs=({variant:e="outlined",className:t,children:n,interactive:s=!1,ref:r,...u})=>{const c=jt({className:t,interactive:s,variant:e,children:n}),a=o.useRef(null),d=r||a;return l.jsxs("div",{...u,ref:d,className:c.card,children:[s&&l.jsx(ue,{className:c.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},ve=(e,t,n=[0,1])=>{const[s,r]=t,[u,c]=n,d=(Math.max(s,Math.min(e,r))-s)/(r-s);return u+d*(c-u)},yn=({className:e,children:t,width:n,index:s=0,outputRange:r,ref:u,...c})=>{const a=o.useRef(null),d=u||a,i=Lt({className:e,index:s,children:t});return l.jsx("div",{ref:d,style:{width:"var(--carousel-item-width, 100%)",maxWidth:r?r[1]+"px":void 0,minWidth:r?r[0]+"px":void 0},className:i.carouselItem,...c,children:t})},Rs=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:u=[.21,.65],outputRange:c=[42,300],gap:a=8,onChange:d,onMetricsChange:i,index:f,scrollSensitivity:x=1.25,...h})=>{const m=o.useRef(null),p=s||m,b=It({index:f,className:t,children:n,variant:e,inputRange:u,outputRange:c,marginPourcent:r,onChange:d,gap:a,scrollSensitivity:x,onMetricsChange:i}),w=o.Children.toArray(n).filter(A=>o.isValidElement(A)&&A.type===yn),L=o.useRef(null),E=o.useRef({scrollProgress:0,scrollTotal:0,scrollVisible:0,scroll:0}),g=o.useRef(0),F=o.useRef(null),I=o.useRef([]).current,[v,k]=o.useState(0);I.length!==w.length&&(I.length=0,w.forEach((A,W)=>{I[W]=o.createRef()}));const D=o.useCallback(()=>{if(!L.current||!p.current)return;const A=g.current,W=E.current.scrollVisible||p.current.clientWidth||0;function G(B,ee){return B.map((oe,pe)=>{const Se=(oe-ee)/Math.abs(B[1]-B[0]);return{itemScrollXCenter:oe,relativeIndex:Se,index:pe,width:0}})}const S=w.map((B,ee)=>{const oe=ee/Math.max(1,w.length-1);return ve(oe,[0,1],[0,1])}),N=G(S,A).sort((B,ee)=>B.index-ee.index);let C=W+a+c[0]+a,q=v;const U=N.sort((B,ee)=>Math.abs(B.relativeIndex)-Math.abs(ee.relativeIndex)).map((B,ee)=>{if(!(C<=0)){if(ee===0&&(q=B.index),B.width=ve(C-a,[c[0],c[1]],[c[0],c[1]]),C-=B.width+a,C!==0&&C<(c[0]+a)*2){const oe=B.width-((c[0]+a)*2-C);C+=B.width,B.width=oe,C-=B.width}else if(C===0&&B.width>=c[0]*2+a){const oe=B.width-(c[0]+a-C);C+=B.width,B.width=oe,C-=B.width}return B}}).filter(Boolean),J=[...U].reverse(),te=[...U].sort((B,ee)=>Math.abs(B.index)-Math.abs(ee.index));J.forEach((B,ee)=>{const oe=J[ee+1];if(!oe)return;const pe=1-(Math.abs(B.relativeIndex)-Math.abs(oe.relativeIndex)),Se=ve(pe,[0,2],[B.width+C,oe.width]);C+=B.width,B.width=Se,C-=B.width});const se=U.length/2,P=ve(Math.abs(te[0].relativeIndex),[te[0].index===0?0:se-1,se],[0,1]),_=ve(P,[0,1],[0,1])*-(c[0]+a);I.forEach((B,ee)=>{if(B.current){const oe=U.find(pe=>pe.index===ee);oe?(B.current.style.setProperty("--carousel-item-width",`${oe.width}px`),B.current.style.display="block"):(B.current.style.setProperty("--carousel-item-width",`${c[0]}px`),B.current.style.display="none")}}),L.current.style.transform=`translateX(${_}px)`,q!==v&&k(q)},[w.length,c,a,v]);o.useLayoutEffect(()=>{D()},[D,w.length]),o.useEffect(()=>{d&&d(v)},[v,d]);const[M,T]=o.useState(0);o.useEffect(()=>{T(v)},[v]);const j=(A,W={})=>{if(!w.length)return 0;const G=I[A];if(!G||!G.current||!L.current)return 0;const S=ve(A/Math.max(1,w.length-1),[0,1],[0,1]);return T(A),L.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:S,orientation:"horizontal",animate:W.animate!==!1}})),S};o.useEffect(()=>{typeof f=="number"&&w.length>0&&f!==v&&j(f)},[f,w.length]);const X=A=>{var W;if(E.current=A,A.scrollTotal>0){(W=F.current)==null||W.stop();const G=g.current??0,S=A.scrollProgress??0;F.current=Y.animate(G,S,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:N=>{g.current=N,requestAnimationFrame(()=>{D()})}})}},V=o.useRef(i);o.useEffect(()=>{V.current=i},[i]);const Q=o.useRef(null);o.useEffect(()=>{const A=V.current;if(!A||!(p!=null&&p.current)||w.length<=0)return;const W=w.length,G=p.current.clientWidth||0,S=c[1],N=g.current,C=(G+a)/(S+a),q=Math.max(1,Math.floor(C)),U=Math.max(1,Math.round(q*(2/3))),J=Math.min(Math.max(0,v),Math.max(0,W-1)),te={total:W,selectedIndex:J,visibleApprox:C,visibleFull:q,stepHalf:U,canPrev:J>0,canNext:J<W-1,scrollProgress:N,viewportWidth:G,itemMaxWidth:S,gap:a},se=Q.current;let P=!se;if(!P){for(const _ in te)if(te[_]!==se[_]){P=!0;break}}P&&(Q.current=te,A(te))},[p,w.length,v,a,c]),o.useEffect(()=>()=>{var A;(A=F.current)==null||A.stop()},[]);const[z,$]=o.useState(0);o.useLayoutEffect(()=>{let A=c[1];const W=E.current;W&&A>W.scrollVisible&&W.scrollVisible>0&&(A=W.scrollVisible);const G=(A+a)*w.length/x;$(G||400)},[p,w.length,a,c,x]);const R=A=>{if(!w.length)return;const W=M??v;switch(A.key){case"ArrowLeft":A.preventDefault(),j(Math.max(0,W-1));break;case"ArrowRight":A.preventDefault(),j(Math.min(w.length-1,W+1));break;case"Home":A.preventDefault(),j(0);break;case"End":A.preventDefault(),j(w.length-1);break;case"Enter":case" ":A.preventDefault(),j(W);break}};o.useEffect(()=>{const A=p.current;if(!A)return;const W=G=>{const S=G.detail;S&&typeof S.index=="number"&&j(S.index)};return A.addEventListener("udx:carousel:centerIndex",W),()=>{A.removeEventListener("udx:carousel:centerIndex",W)}},[p,w.length]);const O=w.map((A,W)=>{var N;const G=(N=A.props)==null?void 0:N.onClick,S=C=>{G==null||G(C)};return o.cloneElement(A,{outputRange:c,ref:I[W],key:W,index:W,role:"option","aria-selected":v===W,tabIndex:v===W?0:-1,onClick:S,onFocus:()=>T(W)})});return l.jsx("div",{className:b.carousel,ref:p,role:"listbox","aria-orientation":"horizontal",onKeyDown:R,...h,children:l.jsx(vt,{draggable:!0,orientation:"horizontal",onScroll:X,scrollSize:z,children:l.jsx("div",{className:b.track,ref:L,style:{gap:`${a}px`,willChange:"transform"},children:O})})})};/*!
2
2
  * Font Awesome Free 7.2.0 by @fontawesome - https://fontawesome.com
3
3
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4
4
  * Copyright 2026 Fonticons, Inc.
5
- */var $r={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32z"]},Or={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 32 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l32 0 0-32c0-17.7 14.3-32 32-32zM64 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z"]},jr={prefix:"fas",iconName:"chevron-up",icon:[448,512,[],"f077","M201.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 173.3 54.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},vn={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},Rr={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},qe={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]},Le={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},Fr=Le,bn={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},Br={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},_r={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 Hr=({checked:e,defaultChecked:t,indeterminate:n=!1,disabled:r=!1,error:o=!1,onChange:u,id:c,name:l,value:h,style:s,className:d,...y})=>{const f=a.useId(),p=c||f,m=e!==void 0,[x,w]=a.useState(t??!1),M=m?e:x,[C,b]=a.useState(!1),$=a.useRef(null);a.useEffect(()=>{$.current&&($.current.indeterminate=n)},[n]);const D=L=>{r||(m||w(L.target.checked),u&&u(L))},v=Tt({isChecked:!!M,isIndeterminate:n,isDisabled:r,isError:o,isFocused:C,isHovered:!1});return i.jsx("div",{className:g(v.checkbox,d,"group/checkbox"),style:s,children:i.jsxs(ue,{stateClassName:v.stateLayer,colorName:M||n?"primary":"on-surface",children:[i.jsx("input",{ref:$,type:"checkbox",id:p,name:l,value:h,checked:M,disabled:r,onChange:D,onFocus:()=>b(!0),onBlur:()=>b(!1),className:v.input,...y}),i.jsx("div",{className:v.box}),i.jsx(Y.AnimatePresence,{children:(M||n)&&i.jsx(Y.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.15},className:v.icon,children:i.jsx(ie,{icon:n?$r:qe,className:"size-3.5"})})})]})})},Be=({variant:e="outlined",disabled:t=!1,icon:n,href:r,label:o,className:u,onClick:c,onToggle:l,activated:h,ref:s,onRemove:d,editable:y,onEditStart:f,onEditCommit:p,onEditCancel:m,onChange:x,transition:w,children:M,editing:C,...b})=>{if(M&&(o=M),o===void 0&&!y)throw new Error("Chip component requires either a label prop or children content");const $=r?"a":"button",D=a.useRef(null),v=s||D,[L,T]=a.useState(h),[N,F]=a.useState(!1),[I,G]=a.useState(C&&y),[W,Q]=a.useState(!1),[V,j]=a.useState(typeof o=="string"?o:""),A=a.useRef(null);a.useEffect(()=>{T(h)},[h]),a.useEffect(()=>{if(C&&G(C),y&&N){const O=setTimeout(()=>{b!=null&&b.draggable&&W||G(!0)},1e3);return()=>clearTimeout(O)}else N||G(!1)},[N,y,W,b,V]),a.useEffect(()=>{if(I){j(typeof o=="string"?o:"");const O=te.current||A.current;if(O){O.focus();const U=document.createRange();U.selectNodeContents(O),U.collapse(!1);const _=window.getSelection();_==null||_.removeAllRanges(),_==null||_.addRange(U)}}},[I]),w={duration:.3,...w};const B=O=>{t&&O.preventDefault(),l?(T(!L),l(!L)):c&&c(O)},P=!!l||!!d||!!c||!!r||!!y;h&&(n=qe);const{onFocus:R,onBlur:K,onKeyDown:S,onDragStart:k,onDragEnd:E,onDoubleClick:z,...q}=b??{},J=$t({href:r,disabled:t,icon:n,variant:e,transition:w,className:u,isActive:L??!1,onToggle:l,activated:L,label:o,isInteractive:P,children:o,isFocused:N,isDragging:W,onEditCommit:p,isEditing:I}),te=a.useRef(null),re=()=>{const O=(V??"").trim();if(!O){d&&d();return}p==null||p(O)};return i.jsxs($,{contentEditable:!1,ref:v,href:r,className:J.chip,...q,onClick:O=>{I||B(O)},draggable:!t&&!!(b!=null&&b.draggable),onDragStart:O=>{!t&&(b!=null&&b.draggable)&&Q(!0),k==null||k(O)},onDragEnd:O=>{b!=null&&b.draggable&&Q(!1),E==null||E(O)},onDoubleClick:O=>{!t&&y&&!I&&(f==null||f(),O.preventDefault(),O.stopPropagation()),z==null||z(O)},onFocus:O=>{P&&F(!0),R==null||R(O)},onBlur:O=>{F(!1),K==null||K(O)},onKeyDown:O=>{const U=O.key;if(!t&&I){U==="Enter"?(O.preventDefault(),re()):U==="Escape"?(O.preventDefault(),m==null||m()):d&&(V==null?void 0:V.trim())===""&&(U==="Backspace"||U==="Delete"||U==="Del")&&(O.preventDefault(),O.stopPropagation(),d());return}if(!t&&N){if(y&&!l&&(U==="F2"||U==="Enter")){O.preventDefault(),f==null||f();return}if(l&&(U==="Enter"||U===" "||U==="Spacebar")){O.preventDefault();const _=!L;T(_),l(_)}d&&(U==="Backspace"||U==="Delete"||U==="Del")&&(O.preventDefault(),O.stopPropagation(),d())}S==null||S(O)},disabled:t,"aria-pressed":l?L:void 0,style:{transition:w.duration+"s"},children:[P&&!t&&!I&&i.jsx(ue,{style:{transition:w.duration+"s"},className:J.stateLayer,colorName:g({"on-surface-variant":!L,"on-secondary-container":L}),stateClassName:"state-ripple-group-[chip]"}),n&&i.jsx(ie,{icon:n,className:J.leadingIcon}),i.jsx("span",{ref:te,contentEditable:!!y&&!!I,suppressContentEditableWarning:!0,className:J.label,role:y?"textbox":void 0,spellCheck:!1,onInput:O=>{const U=O.currentTarget.innerText;j(U),x==null||x(U)},onBlur:O=>{y&&I&&re()},onKeyDown:O=>{if(y&&I&&O.key==="Enter"){O.preventDefault(),O.stopPropagation(),re();return}y&&I&&O.key==="Escape"&&(O.preventDefault(),O.stopPropagation(),m==null||m())},children:o}),d&&!I&&i.jsx(ie,{icon:Le,className:J.trailingIcon,onMouseDown:O=>{O.preventDefault(),O.stopPropagation()},onClick:O=>{O.stopPropagation(),t||d()}})]})},Wr=({variant:e,disabled:t,isActive:n})=>({menuItem:g("group/menu-item text-start overflow-hidden flex items-center h-12 px-3 cursor-pointer outline-none select-none shrink-0 ","text-label-large","transition-colors duration-200","rounded-xl",{"text-on-surface":!e||e==="standard","opacity-38 pointer-events-none":t},(e==="vibrant"||n)&&["bg-secondary-container text-on-secondary-container"]),itemLabel:g("flex-1 truncate"),itemIcon:g("w-6 h-6 flex items-center justify-center menu-item-icon"),leadingIcon:g("mr-3"),trailingIcon:g("ml-3")}),Vr=Z("menuItem",Wr),De=({label:e,children:t,leadingIcon:n,trailingIcon:r,disabled:o,variant:u="standard",href:c,onClick:l,onToggle:h,activated:s=!1,className:d,...y})=>{let f=null;const p=[];a.Children.forEach(t,I=>{var G,W;a.isValidElement(I)&&(((G=I.type)==null?void 0:G.name)==="Menu"||((W=I.type)==null?void 0:W.displayName)==="Menu")?f=I:p.push(I)});const m=p.length>0?p:e,[x,w]=a.useState(!1),[M,C]=a.useState(s);M&&(n=qe);const b=a.useRef(null),$=a.useRef(null);a.useEffect(()=>{C(s)},[s]);const D=Vr({variant:u,disabled:o,className:d,activated:M,isActive:M}),v=I=>{if(console.log("refrefd",o,f,h),o){I.preventDefault();return}if(f){I.stopPropagation();return}h?(C(!M),h(!M)):(console.log("click",l),l==null||l(I))},L=()=>{$.current&&(clearTimeout($.current),$.current=null),!o&&f&&w(!0)},T=()=>{f&&($.current=setTimeout(()=>{w(!1)},150))};a.useEffect(()=>()=>{$.current&&clearTimeout($.current)},[]);const N=r??(f?vn:void 0),F=c?"a":"button";return i.jsxs(F,{ref:b,href:c,className:D.menuItem,onClick:v,onMouseEnter:L,onMouseLeave:T,role:"option","aria-haspopup":!!f,"aria-expanded":x,"aria-pressed":h?M:void 0,tabIndex:o?-1:0,disabled:c?void 0:o,onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),f?w(!x):v(I)),I.key==="ArrowRight"&&f&&(w(!0),I.stopPropagation()),I.key==="ArrowLeft"&&x&&(w(!1),I.stopPropagation())},...y,children:[i.jsx(ue,{className:"absolute inset-0 pointer-events-none",colorName:g(u==="vibrant"||M?"on-tertiary-container":"on-secondary-container"),stateClassName:"state-ripple-group-[menu-item]"}),n&&i.jsx("div",{className:g(D.itemIcon,D.leadingIcon,"z-10 relative"),children:a.isValidElement(n)?n:i.jsx(ie,{icon:n})}),i.jsx("span",{className:g(D.itemLabel,"z-10 relative"),children:m}),N&&i.jsx("div",{className:g(D.itemIcon,D.trailingIcon,"z-10 relative"),children:a.isValidElement(N)?N:i.jsx(ie,{icon:N})}),f&&x&&i.jsx(xe,{anchorRef:b,position:"inline-end span-block-end",hoverOpen:!0,children:i.jsx("div",{onMouseEnter:L,onMouseLeave:T,children:f})})]})},Ie=({orientation:e="horizontal",className:t,...n})=>{const r=Ft({orientation:e,className:t});return i.jsx("hr",{className:r.divider,...n})},Ur=({props:e})=>({headline:g("px-3 py-1 text-label-small opacity-60 mt-1",{"text-on-surface-variant":!(e!=null&&e.variant)||e.variant==="standard"})}),Yr=Z("menu-headline",Ur),Ge=({label:e,children:t,variant:n,className:r,...o})=>{const u=Yr({variant:n,className:r});return i.jsx("div",{className:u.headline,role:"group","aria-label":e,...o,children:t??e})},_e=({children:e,className:t,variant:n,label:r,...o})=>{const u=Gt({children:e,className:t,variant:n,label:r,...o});return i.jsxs("div",{className:u.menuGroup,role:"group",...o,children:[r&&i.jsx("div",{className:u.groupLabel,children:r}),e]})},Ke=({children:e,className:t,variant:n="standard",...r})=>{const o=a.Children.toArray(e).some(h=>a.isValidElement(h)&&h.type===_e),u=zt({children:e,className:t,variant:n,hasGroups:o,...r}),c=a.useRef(null),l=h=>a.Children.map(h,s=>{if(!a.isValidElement(s))return s;if(s.type===_e){const d=l(s.props.children);return a.cloneElement(s,{children:d,variant:n})}return s.type===De?a.cloneElement(s,{variant:s.props.variant??n}):s.type===Ge?a.cloneElement(s,{variant:n}):s.type===Ie?a.cloneElement(s,{className:g("my-1",s.props.className)}):s});return i.jsxs("div",{ref:c,className:u.menu,role:"listbox",...r,children:[l(e),a.Children.count(e)===0&&i.jsx("div",{className:"px-4 py-3 text-on-surface-variant opacity-60 italic text-body-medium",children:"No options"})]})},zr=({trigger:e,children:t,...n})=>{const[r,o]=a.useState(null),u=a.useRef(null),c=d=>{d.preventDefault(),o({mouseX:d.clientX,mouseY:d.clientY})},l=()=>{o(null)},h=()=>{l()};a.useEffect(()=>{if(!r)return;const d=()=>o(null);return window.addEventListener("click",d),window.addEventListener("scroll",d,!0),()=>{window.removeEventListener("click",d),window.removeEventListener("scroll",d,!0)}},[r]);const s=a.isValidElement(e)?a.cloneElement(e,{onContextMenu:d=>{var y,f;c(d),(f=(y=e.props).onContextMenu)==null||f.call(y,d)}}):i.jsx("div",{onContextMenu:c,className:"inline-block",children:e});return i.jsxs(i.Fragment,{children:[s,i.jsx("div",{ref:u,style:{position:"fixed",top:(r==null?void 0:r.mouseY)??0,left:(r==null?void 0:r.mouseX)??0,width:1,height:1,pointerEvents:"none",visibility:"hidden"}}),r&&i.jsx(xe,{anchorRef:u,position:"bottom right",onClick:d=>d.stopPropagation(),children:i.jsx(Ke,{onClick:h,...n,children:t})})]})},se=[];for(let e=0;e<256;++e)se.push((e+256).toString(16).slice(1));function qr(e,t=0){return(se[e[t+0]]+se[e[t+1]]+se[e[t+2]]+se[e[t+3]]+"-"+se[e[t+4]]+se[e[t+5]]+"-"+se[e[t+6]]+se[e[t+7]]+"-"+se[e[t+8]]+se[e[t+9]]+"-"+se[e[t+10]]+se[e[t+11]]+se[e[t+12]]+se[e[t+13]]+se[e[t+14]]+se[e[t+15]]).toLowerCase()}let Re;const Gr=new Uint8Array(16);function Kr(){if(!Re){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Re=crypto.getRandomValues.bind(crypto)}return Re(Gr)}const Xr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),dt={randomUUID:Xr};function wn(e,t,n){var o;if(dt.randomUUID&&!e)return dt.randomUUID();e=e||{};const r=e.random??((o=e.rng)==null?void 0:o.call(e))??Kr();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,qr(r)}const Jr=({variant:e="input",className:t,scrollable:n=!0,draggable:r=!1,items:o,onItemsChange:u})=>{const c=o??[],l=a.useRef(null),[h,s]=a.useState(!1),d=a.useRef(new WeakMap),y=a.useCallback(v=>{const L=d.current;let T=L.get(v);return T||(T=wn(),L.set(v,T)),T},[]);a.useEffect(()=>{var v,L;h&&(e=="input"?(v=$.current)==null||v.focus():(L=l.current)==null||L.focus())},[h]);const f=a.useRef([]),p=a.useRef(!1),m=a.useCallback(v=>{u==null||u(v(c))},[u,c]),x=a.useCallback(v=>{m(L=>L.filter((T,N)=>N!==v))},[m]),w=jt({scrollable:n,className:t,variant:e}),M=a.useCallback((v="")=>{if(e!=="input"||p.current)return;p.current=!0;const L={label:v},T=y(L),N=[...c,L];u==null||u(N),requestAnimationFrame(()=>{b(T),p.current=!1})},[e,u,c,y]),[C,b]=a.useState(null);a.useEffect(()=>{var v;if(C){const L=c.findIndex(T=>y(T)===C);if(L!==-1){const T=f.current[L];(v=T==null?void 0:T.focus)==null||v.call(T);const N=l.current,F=T.offsetLeft+T.offsetWidth/2-N.offsetWidth/2;N.scrollTo({left:F,behavior:"smooth"})}}},[C,c,y]);const $=a.useRef(null),D=(h||c.length===0)&&e==="input";return i.jsxs("div",{ref:l,role:"list","aria-label":"Chips",className:w.chips,tabIndex:e==="input"?0:void 0,onFocus:v=>{v.target===v.currentTarget&&s(!0)},onBlur:()=>{s(!1)},onKeyDown:v=>{var G;if(e!=="input")return;const L=v.key,N=v.target===v.currentTarget;if(!h)return;const F=document.activeElement,I=f.current.findIndex(W=>W===F);if(L==="ArrowLeft"){v.preventDefault();const W=I>0?I-1:c.length-1,Q=y(c[W]);b(Q);return}if(L==="ArrowRight"){v.preventDefault();const W=I>=0?(I+1)%Math.max(1,c.length):0,Q=y(c[W]);b(Q);return}if(L==="Home"){v.preventDefault();const W=y(c[0]);b(W);return}if(L==="End"){v.preventDefault();const W=y(c[c.length-1]);b(W);return}if(N&&L==="Backspace"){if(v.preventDefault(),c.length>0){const W=f.current[c.length-1];(G=W==null?void 0:W.focus)==null||G.call(W)}return}},children:[c.map((v,L)=>{const T=y(v),N=e==="input",F=N?{editable:!0,editing:C===T,onEditCommit:I=>{s(!0),m(G=>G.map((W,Q)=>Q===L?{...W,label:I}:W))},onEditCancel:()=>{s(!0)},onChange:()=>{if(f.current.length==L+1){const I=l.current;requestAnimationFrame(()=>{I.scrollTo({left:I.scrollWidth,behavior:"smooth"})})}}}:{};return i.jsx(Be,{ref:I=>f.current[L]=I,label:v.label??"",icon:v.icon,activated:v.activated,disabled:v.disabled,variant:v.variant,href:v.href,draggable:r,...F,onToggle:v.activated===void 0?void 0:I=>m(G=>G.map((W,Q)=>Q===L?{...W,activated:I}:W)),onBlur:()=>{C===T&&b(null)},onRemove:N?()=>{s(!0),x(L)}:void 0},T)}),h&&i.jsxs(i.Fragment,{children:[i.jsx(Ie,{orientation:"vertical",className:"animate-[var(--animate-blink)] border-outline",style:{"--animate-blink":"blink 1s cubic-bezier(0.4, 0, 0.6, 1) infinite"}}),i.jsx("style",{children:`
5
+ */var Ds={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32z"]},As={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 32 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l32 0 0-32c0-17.7 14.3-32 32-32zM64 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z"]},Fs={prefix:"fas",iconName:"chevron-up",icon:[448,512,[],"f077","M201.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 173.3 54.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},xn={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},Ps={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},Xe={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]},ke={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"]},$s=ke,vn={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},Ws={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},Ts={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 Os=({checked:e,defaultChecked:t,indeterminate:n=!1,disabled:s=!1,error:r=!1,onChange:u,id:c,name:a,value:d,style:i,className:f,...x})=>{const h=o.useId(),m=c||h,p=e!==void 0,[b,w]=o.useState(t??!1),L=p?e:b,[E,g]=o.useState(!1),F=o.useRef(null);o.useEffect(()=>{F.current&&(F.current.indeterminate=n)},[n]);const I=k=>{s||(p||w(k.target.checked),u&&u(k))},v=Rt({isChecked:!!L,isIndeterminate:n,isDisabled:s,isError:r,isFocused:E,isHovered:!1});return l.jsx("div",{className:y(v.checkbox,f,"group/checkbox"),style:i,children:l.jsxs(ue,{stateClassName:v.stateLayer,colorName:L||n?"primary":"on-surface",children:[l.jsx("input",{ref:F,type:"checkbox",id:m,name:a,value:d,checked:L,disabled:s,onChange:I,onFocus:()=>g(!0),onBlur:()=>g(!1),className:v.input,...x}),l.jsx("div",{className:v.box}),l.jsx(Y.AnimatePresence,{children:(L||n)&&l.jsx(Y.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.15},className:v.icon,children:l.jsx(le,{icon:n?Ds:Xe,className:"size-3.5"})})})]})})},Be=({variant:e="outlined",disabled:t=!1,icon:n,href:s,label:r,className:u,onClick:c,onToggle:a,activated:d,ref:i,onRemove:f,editable:x,onEditStart:h,onEditCommit:m,onEditCancel:p,onChange:b,transition:w,children:L,editing:E,...g})=>{if(L&&(r=L),r===void 0&&!x)throw new Error("Chip component requires either a label prop or children content");const F=s?"a":"button",I=o.useRef(null),v=i||I,[k,D]=o.useState(d),[M,T]=o.useState(!1),[j,X]=o.useState(E&&x),[V,Q]=o.useState(!1),[z,$]=o.useState(typeof r=="string"?r:""),R=o.useRef(null);o.useEffect(()=>{D(d)},[d]),o.useEffect(()=>{if(E&&X(E),x&&M){const P=setTimeout(()=>{g!=null&&g.draggable&&V||X(!0)},1e3);return()=>clearTimeout(P)}else M||X(!1)},[M,x,V,g,z]),o.useEffect(()=>{if(j){$(typeof r=="string"?r:"");const P=te.current||R.current;if(P){P.focus();const _=document.createRange();_.selectNodeContents(P),_.collapse(!1);const B=window.getSelection();B==null||B.removeAllRanges(),B==null||B.addRange(_)}}},[j]),w={duration:.3,...w};const O=P=>{t&&P.preventDefault(),a?(D(!k),a(!k)):c&&c(P)},A=!!a||!!f||!!c||!!s||!!x;d&&(n=Xe);const{onFocus:W,onBlur:G,onKeyDown:S,onDragStart:N,onDragEnd:C,onDoubleClick:q,...U}=g??{},J=At({href:s,disabled:t,icon:n,variant:e,transition:w,className:u,isActive:k??!1,onToggle:a,activated:k,label:r,isInteractive:A,children:r,isFocused:M,isDragging:V,onEditCommit:m,isEditing:j}),te=o.useRef(null),se=()=>{const P=(z??"").trim();if(!P){f&&f();return}m==null||m(P)};return l.jsxs(F,{contentEditable:!1,ref:v,href:s,className:J.chip,...U,onClick:P=>{j||O(P)},draggable:!t&&!!(g!=null&&g.draggable),onDragStart:P=>{!t&&(g!=null&&g.draggable)&&Q(!0),N==null||N(P)},onDragEnd:P=>{g!=null&&g.draggable&&Q(!1),C==null||C(P)},onDoubleClick:P=>{!t&&x&&!j&&(h==null||h(),P.preventDefault(),P.stopPropagation()),q==null||q(P)},onFocus:P=>{A&&T(!0),W==null||W(P)},onBlur:P=>{T(!1),G==null||G(P)},onKeyDown:P=>{const _=P.key;if(!t&&j){_==="Enter"?(P.preventDefault(),se()):_==="Escape"?(P.preventDefault(),p==null||p()):f&&(z==null?void 0:z.trim())===""&&(_==="Backspace"||_==="Delete"||_==="Del")&&(P.preventDefault(),P.stopPropagation(),f());return}if(!t&&M){if(x&&!a&&(_==="F2"||_==="Enter")){P.preventDefault(),h==null||h();return}if(a&&(_==="Enter"||_===" "||_==="Spacebar")){P.preventDefault();const B=!k;D(B),a(B)}f&&(_==="Backspace"||_==="Delete"||_==="Del")&&(P.preventDefault(),P.stopPropagation(),f())}S==null||S(P)},disabled:t,"aria-pressed":a?k:void 0,style:{transition:w.duration+"s"},children:[A&&!t&&!j&&l.jsx(ue,{style:{transition:w.duration+"s"},className:J.stateLayer,colorName:y({"on-surface-variant":!k,"on-secondary-container":k}),stateClassName:"state-ripple-group-[chip]"}),n&&l.jsx(le,{icon:n,className:J.leadingIcon}),l.jsx("span",{ref:te,contentEditable:!!x&&!!j,suppressContentEditableWarning:!0,className:J.label,role:x?"textbox":void 0,spellCheck:!1,onInput:P=>{const _=P.currentTarget.innerText;$(_),b==null||b(_)},onBlur:P=>{x&&j&&se()},onKeyDown:P=>{if(x&&j&&P.key==="Enter"){P.preventDefault(),P.stopPropagation(),se();return}x&&j&&P.key==="Escape"&&(P.preventDefault(),P.stopPropagation(),p==null||p())},children:r}),f&&!j&&l.jsx(le,{icon:ke,className:J.trailingIcon,onMouseDown:P=>{P.preventDefault(),P.stopPropagation()},onClick:P=>{P.stopPropagation(),t||f()}})]})},Bs=({variant:e,disabled:t,isActive:n})=>({menuItem:y("group/menu-item text-start overflow-hidden flex items-center h-12 px-3 cursor-pointer outline-none select-none shrink-0 ","text-label-large","transition-colors duration-200","rounded-xl",{"text-on-surface":!e||e==="standard","opacity-38 pointer-events-none":t},(e==="vibrant"||n)&&["bg-secondary-container text-on-secondary-container"]),itemLabel:y("flex-1 truncate"),itemIcon:y("w-6 h-6 flex items-center justify-center menu-item-icon"),leadingIcon:y("mr-3"),trailingIcon:y("ml-3")}),Hs=Z("menuItem",Bs),Ie=({label:e,children:t,leadingIcon:n,trailingIcon:s,disabled:r,variant:u="standard",href:c,onClick:a,onToggle:d,activated:i=!1,className:f,...x})=>{let h=null;const m=[];o.Children.forEach(t,j=>{var X,V;o.isValidElement(j)&&(((X=j.type)==null?void 0:X.name)==="Menu"||((V=j.type)==null?void 0:V.displayName)==="Menu")?h=j:m.push(j)});const p=m.length>0?m:e,[b,w]=o.useState(!1),[L,E]=o.useState(i);L&&(n=Xe);const g=o.useRef(null),F=o.useRef(null);o.useEffect(()=>{E(i)},[i]);const I=Hs({variant:u,disabled:r,className:f,activated:L,isActive:L}),v=j=>{if(console.log("refrefd",r,h,d),r){j.preventDefault();return}if(h){j.stopPropagation();return}d?(E(!L),d(!L)):(console.log("click",a),a==null||a(j))},k=()=>{F.current&&(clearTimeout(F.current),F.current=null),!r&&h&&w(!0)},D=()=>{h&&(F.current=setTimeout(()=>{w(!1)},150))};o.useEffect(()=>()=>{F.current&&clearTimeout(F.current)},[]);const M=s??(h?xn:void 0),T=c?"a":"button";return l.jsxs(T,{ref:g,href:c,className:I.menuItem,onClick:v,onMouseEnter:k,onMouseLeave:D,role:"option","aria-haspopup":!!h,"aria-expanded":b,"aria-pressed":d?L:void 0,tabIndex:r?-1:0,disabled:c?void 0:r,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),h?w(!b):v(j)),j.key==="ArrowRight"&&h&&(w(!0),j.stopPropagation()),j.key==="ArrowLeft"&&b&&(w(!1),j.stopPropagation())},...x,children:[l.jsx(ue,{className:"absolute inset-0 pointer-events-none",colorName:y(u==="vibrant"||L?"on-tertiary-container":"on-secondary-container"),stateClassName:"state-ripple-group-[menu-item]"}),n&&l.jsx("div",{className:y(I.itemIcon,I.leadingIcon,"z-10 relative"),children:o.isValidElement(n)?n:l.jsx(le,{icon:n})}),l.jsx("span",{className:y(I.itemLabel,"z-10 relative"),children:p}),M&&l.jsx("div",{className:y(I.itemIcon,I.trailingIcon,"z-10 relative"),children:o.isValidElement(M)?M:l.jsx(le,{icon:M})}),h&&b&&l.jsx(be,{anchorRef:g,position:"inline-end span-block-end",hoverOpen:!0,children:l.jsx("div",{onMouseEnter:k,onMouseLeave:D,children:h})})]})},je=({orientation:e="horizontal",className:t,...n})=>{const s=Wt({orientation:e,className:t});return l.jsx("hr",{className:s.divider,...n})},Vs=({props:e})=>({headline:y("px-3 py-1 text-label-small opacity-60 mt-1",{"text-on-surface-variant":!(e!=null&&e.variant)||e.variant==="standard"})}),zs=Z("menu-headline",Vs),Ge=({label:e,children:t,variant:n,className:s,...r})=>{const u=zs({variant:n,className:s});return l.jsx("div",{className:u.headline,role:"group","aria-label":e,...r,children:t??e})},He=({children:e,className:t,variant:n,label:s,...r})=>{const u=Ut({children:e,className:t,variant:n,label:s,...r});return l.jsxs("div",{className:u.menuGroup,role:"group",...r,children:[s&&l.jsx("div",{className:u.groupLabel,children:s}),e]})},Ke=({children:e,className:t,variant:n="standard",...s})=>{const r=o.Children.toArray(e).some(d=>o.isValidElement(d)&&d.type===He),u=Yt({children:e,className:t,variant:n,hasGroups:r,...s}),c=o.useRef(null),a=d=>o.Children.map(d,i=>{if(!o.isValidElement(i))return i;if(i.type===He){const f=a(i.props.children);return o.cloneElement(i,{children:f,variant:n})}return i.type===Ie?o.cloneElement(i,{variant:i.props.variant??n}):i.type===Ge?o.cloneElement(i,{variant:n}):i.type===je?o.cloneElement(i,{className:y("my-1",i.props.className)}):i});return l.jsxs("div",{ref:c,className:u.menu,role:"listbox",...s,children:[a(e),o.Children.count(e)===0&&l.jsx("div",{className:"px-4 py-3 text-on-surface-variant opacity-60 italic text-body-medium",children:"No options"})]})},_s=({trigger:e,children:t,...n})=>{const[s,r]=o.useState(null),u=o.useRef(null),c=f=>{f.preventDefault(),r({mouseX:f.clientX,mouseY:f.clientY})},a=()=>{r(null)},d=()=>{a()};o.useEffect(()=>{if(!s)return;const f=()=>r(null);return window.addEventListener("click",f),window.addEventListener("scroll",f,!0),()=>{window.removeEventListener("click",f),window.removeEventListener("scroll",f,!0)}},[s]);const i=o.isValidElement(e)?o.cloneElement(e,{onContextMenu:f=>{var x,h;c(f),(h=(x=e.props).onContextMenu)==null||h.call(x,f)}}):l.jsx("div",{onContextMenu:c,className:"inline-block",children:e});return l.jsxs(l.Fragment,{children:[i,l.jsx("div",{ref:u,style:{position:"fixed",top:(s==null?void 0:s.mouseY)??0,left:(s==null?void 0:s.mouseX)??0,width:1,height:1,pointerEvents:"none",visibility:"hidden"}}),s&&l.jsx(be,{anchorRef:u,position:"bottom right",onClick:f=>f.stopPropagation(),children:l.jsx(Ke,{onClick:d,...n,children:t})})]})},ie=[];for(let e=0;e<256;++e)ie.push((e+256).toString(16).slice(1));function Ys(e,t=0){return(ie[e[t+0]]+ie[e[t+1]]+ie[e[t+2]]+ie[e[t+3]]+"-"+ie[e[t+4]]+ie[e[t+5]]+"-"+ie[e[t+6]]+ie[e[t+7]]+"-"+ie[e[t+8]]+ie[e[t+9]]+"-"+ie[e[t+10]]+ie[e[t+11]]+ie[e[t+12]]+ie[e[t+13]]+ie[e[t+14]]+ie[e[t+15]]).toLowerCase()}let Te;const qs=new Uint8Array(16);function Us(){if(!Te){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Te=crypto.getRandomValues.bind(crypto)}return Te(qs)}const Xs=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ft={randomUUID:Xs};function gn(e,t,n){var r;if(ft.randomUUID&&!e)return ft.randomUUID();e=e||{};const s=e.random??((r=e.rng)==null?void 0:r.call(e))??Us();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Ys(s)}const Gs=({variant:e="input",className:t,scrollable:n=!0,draggable:s=!1,items:r,onItemsChange:u})=>{const c=r??[],a=o.useRef(null),[d,i]=o.useState(!1),f=o.useRef(new WeakMap),x=o.useCallback(v=>{const k=f.current;let D=k.get(v);return D||(D=gn(),k.set(v,D)),D},[]);o.useEffect(()=>{var v,k;d&&(e=="input"?(v=F.current)==null||v.focus():(k=a.current)==null||k.focus())},[d]);const h=o.useRef([]),m=o.useRef(!1),p=o.useCallback(v=>{u==null||u(v(c))},[u,c]),b=o.useCallback(v=>{p(k=>k.filter((D,M)=>M!==v))},[p]),w=Pt({scrollable:n,className:t,variant:e}),L=o.useCallback((v="")=>{if(e!=="input"||m.current)return;m.current=!0;const k={label:v},D=x(k),M=[...c,k];u==null||u(M),requestAnimationFrame(()=>{g(D),m.current=!1})},[e,u,c,x]),[E,g]=o.useState(null);o.useEffect(()=>{var v;if(E){const k=c.findIndex(D=>x(D)===E);if(k!==-1){const D=h.current[k];(v=D==null?void 0:D.focus)==null||v.call(D);const M=a.current,T=D.offsetLeft+D.offsetWidth/2-M.offsetWidth/2;M.scrollTo({left:T,behavior:"smooth"})}}},[E,c,x]);const F=o.useRef(null),I=(d||c.length===0)&&e==="input";return l.jsxs("div",{ref:a,role:"list","aria-label":"Chips",className:w.chips,tabIndex:e==="input"?0:void 0,onFocus:v=>{v.target===v.currentTarget&&i(!0)},onBlur:()=>{i(!1)},onKeyDown:v=>{var X;if(e!=="input")return;const k=v.key,M=v.target===v.currentTarget;if(!d)return;const T=document.activeElement,j=h.current.findIndex(V=>V===T);if(k==="ArrowLeft"){v.preventDefault();const V=j>0?j-1:c.length-1,Q=x(c[V]);g(Q);return}if(k==="ArrowRight"){v.preventDefault();const V=j>=0?(j+1)%Math.max(1,c.length):0,Q=x(c[V]);g(Q);return}if(k==="Home"){v.preventDefault();const V=x(c[0]);g(V);return}if(k==="End"){v.preventDefault();const V=x(c[c.length-1]);g(V);return}if(M&&k==="Backspace"){if(v.preventDefault(),c.length>0){const V=h.current[c.length-1];(X=V==null?void 0:V.focus)==null||X.call(V)}return}},children:[c.map((v,k)=>{const D=x(v),M=e==="input",T=M?{editable:!0,editing:E===D,onEditCommit:j=>{i(!0),p(X=>X.map((V,Q)=>Q===k?{...V,label:j}:V))},onEditCancel:()=>{i(!0)},onChange:()=>{if(h.current.length==k+1){const j=a.current;requestAnimationFrame(()=>{j.scrollTo({left:j.scrollWidth,behavior:"smooth"})})}}}:{};return l.jsx(Be,{ref:j=>h.current[k]=j,label:v.label??"",icon:v.icon,activated:v.activated,disabled:v.disabled,variant:v.variant,href:v.href,draggable:s,...T,onToggle:v.activated===void 0?void 0:j=>p(X=>X.map((V,Q)=>Q===k?{...V,activated:j}:V)),onBlur:()=>{E===D&&g(null)},onRemove:M?()=>{i(!0),b(k)}:void 0},D)}),d&&l.jsxs(l.Fragment,{children:[l.jsx(je,{orientation:"vertical",className:"animate-[var(--animate-blink)] border-outline",style:{"--animate-blink":"blink 1s cubic-bezier(0.4, 0, 0.6, 1) infinite"}}),l.jsx("style",{children:`
6
6
  @keyframes blink {
7
7
  0%, 50% { opacity: 1; }
8
8
  50.01%, 100% { opacity: 0; }
9
9
  }
10
- `})]}),D&&i.jsx(Be,{ref:$,className:"opacity-0",draggable:r,editable:!0,editing:!0,onChange:v=>{var L;if(v=v.replace(/(&nbsp;)+/g," ").trim(),console.log("Ghost chip onChange",v,!!v),v)M(v);else if(c.length>0){const T=f.current[c.length-1];(L=T==null?void 0:T.focus)==null||L.call(T)}},onEditCommit:()=>{},onBlur:()=>{s(!1)},onFocus:v=>{s(!0),v.stopPropagation()},children:" "})]})};function xn({trigger:e=["hover","focus"],isOpen:t,defaultOpen:n=!1,onOpenChange:r,openDelay:o=400,closeDelay:u=150,id:c}={}){const l=a.useId(),h=c??`tooltip-${l}`,s=Array.isArray(e)?e:[e],d=typeof t=="boolean",[y,f]=a.useState(n?"hovered":"hidden"),[p,m]=a.useState(!1),x=a.useRef(null),w=a.useRef(null),M=a.useCallback(()=>{x.current&&(clearTimeout(x.current),x.current=null),w.current&&(clearTimeout(w.current),w.current=null)},[]);a.useEffect(()=>()=>M(),[M]);const C=a.useCallback(j=>{if(d){const A=j!=="hidden";r==null||r(A)}else{f(j);const A=j!=="hidden";r==null||r(A)}},[d,r]),b=d?t?"hovered":"hidden":y,$=b!=="hidden",D=j=>{switch(j){case"hidden":return 0;case"hovered":return 1;case"focused":return 2;case"clicked":return 3;default:return 0}},v=a.useCallback(j=>{M(),!(D(j)<=D(b))&&(x.current=setTimeout(()=>{C(j)},o))},[M,o,b,C]),L=a.useCallback(j=>{M(),w.current=setTimeout(()=>{(!d&&D(y)<=D(j)||d)&&C("hidden")},u)},[M,u,y,d,C]),T=a.useCallback(()=>{s.includes("hover")&&v("hovered")},[s,v]),N=a.useCallback(()=>{s.includes("hover")&&(b==="focused"||b==="clicked"||p||L("hovered"))},[s,b,p,L]),F=a.useCallback(()=>{s.includes("focus")&&(M(),C("focused"))},[s,M,C]),I=a.useCallback(()=>{if(s.includes("focus")&&b!=="clicked"){if(s.includes("hover")&&p){C("hovered");return}L("focused")}},[s,b,p,L,C]),G=a.useCallback(()=>{s.includes("click")&&(M(),C(b==="clicked"?"hidden":"clicked"))},[s,b,M,C]),W=a.useCallback(j=>{j.key==="Escape"&&$&&(M(),C("hidden"),j.preventDefault())},[$,M,C]),Q=a.useCallback(()=>{m(!0),M()},[M]),V=a.useCallback(()=>{m(!1),s.includes("hover")&&b==="hovered"&&L("hovered")},[s,b,L]);return{triggerProps:{"aria-describedby":$?h:void 0,onMouseEnter:T,onMouseLeave:N,onFocus:F,onBlur:I,onClick:G,onKeyDown:W},tooltipProps:{id:h,role:"tooltip","aria-hidden":!$,onMouseEnter:Q,onMouseLeave:V},isOpen:$,state:b}}const Xe=({variant:e="plain",buttons:t,className:n,children:r,title:o,text:u,content:c,position:l,targetRef:h,ref:s,trigger:d=["hover","focus"],transition:y,openDelay:f=400,closeDelay:p=150,isOpen:m,defaultOpen:x=!1,onOpenChange:w,id:M,anchorRef:C,...b})=>{const D=l||(e==="rich"?"bottom-right":"bottom");if(y={duration:.3,...y},!r&&!h)throw new Error("Tooltip must have a child or a targetRef");t&&!Array.isArray(t)&&(t=[t]);const v=a.useRef(null),T=C||(h||v),{triggerProps:N,tooltipProps:F,isOpen:I}=xn({trigger:d,isOpen:m,defaultOpen:x,onOpenChange:w,openDelay:f,closeDelay:p,id:M}),G=!h&&a.isValidElement(r)?a.cloneElement(r,{ref:v,...N,onMouseEnter:V=>{var j,A;N.onMouseEnter(),(A=(j=r.props)==null?void 0:j.onMouseEnter)==null||A.call(j,V)},onMouseLeave:V=>{var j,A;N.onMouseLeave(),(A=(j=r.props)==null?void 0:j.onMouseLeave)==null||A.call(j,V)},onFocus:V=>{var j,A;N.onFocus(),(A=(j=r.props)==null?void 0:j.onFocus)==null||A.call(j,V)},onBlur:V=>{var j,A;N.onBlur(),(A=(j=r.props)==null?void 0:j.onBlur)==null||A.call(j,V)},onClick:V=>{var j,A;N.onClick(),(A=(j=r.props)==null?void 0:j.onClick)==null||A.call(j,V)},onKeyDown:V=>{var j,A;N.onKeyDown(V),(A=(j=r.props)==null?void 0:j.onKeyDown)==null||A.call(j,V)}}):r;a.useEffect(()=>{if(!h)return;const V=h.current;if(!V)return;const j=()=>N.onMouseEnter(),A=()=>N.onMouseLeave(),B=()=>N.onFocus(),P=()=>N.onBlur(),R=()=>N.onClick(),K=S=>N.onKeyDown(S);return V.addEventListener("mouseenter",j),V.addEventListener("mouseleave",A),V.addEventListener("focus",B,!0),V.addEventListener("blur",P,!0),V.addEventListener("click",R),V.addEventListener("keydown",K),N["aria-describedby"]?V.setAttribute("aria-describedby",N["aria-describedby"]):V.removeAttribute("aria-describedby"),()=>{V.removeEventListener("mouseenter",j),V.removeEventListener("mouseleave",A),V.removeEventListener("focus",B,!0),V.removeEventListener("blur",P,!0),V.removeEventListener("click",R),V.removeEventListener("keydown",K)}},[h,N]);const W=mn({variant:e,buttons:t,className:n,title:o,text:u,position:D,trigger:d,targetRef:h,children:r}),Q={open:{opacity:1,height:"auto"},close:{opacity:0,height:16}};return i.jsxs(i.Fragment,{children:[G,i.jsx(Y.AnimatePresence,{children:I&&i.jsx(xe,{anchorRef:T,position:D,children:i.jsx(Y.motion.div,{initial:"close",variants:Q,animate:"open",transition:{duration:y.duration},exit:"close",className:W.toolTip,...b,...F,children:i.jsx("div",{className:W.container,children:c?i.jsx("div",{className:W.content,children:c}):i.jsxs(i.Fragment,{children:[o&&i.jsx("div",{className:W.subHead,children:o}),u&&i.jsx("div",{className:W.supportingText,children:u}),t&&i.jsx("div",{className:W.actions,children:Array.isArray(t)&&t.map((V,j)=>i.jsx(pe,{size:"small",variant:"text",...V},j))})]})})})})})]})},Ee=({className:e,label:t,variant:n="primary",size:r="medium",href:o,type:u,icon:c,extended:l=!1,ref:h,transition:s,children:d,...y})=>{if(d&&(t=d),!t)throw new Error("FAB component requires either a label prop or children content");const f=o?"a":"button",p=_t({href:o,icon:c,extended:l,label:t,size:r,variant:n,className:e,transition:s,children:t});s={duration:.3,...s};const m=a.useRef(null),x=h||m,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...s,opacity:{duration:s.duration/2,delay:s.duration-s.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...s,marginLeft:{duration:s.duration/2,delay:s.duration-s.duration/2}}}};return i.jsxs(f,{...y,ref:x,href:o,"aria-label":l?void 0:t,className:p.fab,children:[i.jsx(Xe,{trigger:l?null:void 0,text:t,targetRef:x}),i.jsx(ue,{style:{transition:s.duration+"s"},className:p.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]"}),i.jsx(ie,{icon:c,className:p.icon}),i.jsx(Y.AnimatePresence,{children:l&&i.jsx(Y.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:p.label,children:t})})]})},be=({variant:e="standard",href:t,disabled:n=!1,title:r,label:o,onToggle:u,activated:c=!1,onClick:l,icon:h,size:s="medium",iconSelected:d,className:y,ref:f,width:p="default",shape:m="rounded",allowShapeTransformation:x=!0,transition:w,children:M,...C})=>{if(M&&(o=M),!o)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");!r&&r!==null&&(r=o);const[b,$]=a.useState(c),D=F=>{n&&F.preventDefault(),u?($(!b),u(!b)):l&&l(F)};a.useEffect(()=>{$(c)},[c]);const v=t?"a":"button",L=Ut({transition:w,shape:m,allowShapeTransformation:x,width:p,href:t,activated:b,label:o,iconSelected:d,isActive:b,onToggle:u,disabled:n,icon:h,variant:e,className:y,size:s,children:o,...C}),T=a.useRef(null),N=f||T;return w={duration:.3,...w},i.jsxs(v,{disabled:n,href:t,style:{transition:w.duration+"s"},className:L.iconButton,"aria-label":o,...C,title:void 0,onClick:D,ref:N,children:[r!==null&&i.jsx(Xe,{targetRef:N,trigger:n?null:void 0,text:r}),i.jsx("div",{className:L.touchTarget}),i.jsx(ue,{style:{transition:w.duration+"s"},className:L.stateLayer,colorName:g(e==="standard"&&{"on-surface-variant":!b,"on-primary":b},e==="filled"&&{"on-surface-variant":!b&&!!u,"on-primary":b||!u},e==="tonal"&&{"on-secondary":b&&!!u,"on-secondary-container":!b||!u},e==="outlined"&&{"inverse-on-surface":b&&!!u,"on-surface-variant":!b||!u}),stateClassName:"state-ripple-group-[icon-button]"}),h?i.jsx(ie,{icon:h,className:L.icon}):M]})},Zr=({className:e,label:t,variant:n="primary",size:r="medium",href:o,icon:u,extended:c=!1,ref:l,transition:h,children:s,open:d,defaultOpen:y=!1,onOpenChange:f,...p})=>{h={duration:.3,ease:"easeInOut",...h};const m=a.useRef(null),x=l||m,w=typeof d=="boolean",[M,C]=a.useState(y),b=w?d:M,$=I=>{w||C(I),f==null||f(I)},D=a.Children.toArray(s).filter(I=>a.isValidElement(I)&&I.type===pe),v=Wt({href:o,icon:u,extended:c,label:t,size:r,variant:n,className:e,transition:h,children:t,open:b}),L=Y.motion.create(Ee),T=Y.motion.create(be),N=I=>i.jsx(L,{icon:u,extended:c,label:t,variant:n+"Container",size:r,className:v.fab+" "+(e??""),"aria-expanded":b,onClick:()=>$(!0),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:h.duration,ease:"easeInOut",borderRadius:{duration:h.duration,ease:"easeInOut"},background:{duration:h.duration,ease:"easeInOut"},...h},...I}),F=a.useId();return i.jsxs("div",{className:v.fabMenu,ref:x,...p,children:[i.jsx(Y.AnimatePresence,{children:b&&i.jsx("div",{className:v.actions,role:"menu","aria-hidden":!b,children:(()=>{const I=D.length;return D.map((G,W)=>{G.props;const Q=I-1-W,V=((h==null?void 0:h.delay)??0)+Q*.06,j={open:{overflow:"visible",opacity:1,width:"auto",transition:{...h,delay:V,opacity:{delay:(h==null?void 0:h.duration)/2+V}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...h,delay:V,opacity:{duration:(h==null?void 0:h.duration)/1.5}}}};return i.jsx(Y.motion.div,{initial:"close",animate:"open",variants:j,transition:h,exit:"close",children:a.cloneElement(G,{key:W,shape:"rounded",variant:"filled",className:()=>({button:g("max-w-full overflow-hidden text-nowrap",{"px-0":!b,"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"})})})})})})()})}),N({className:"invisible pointer-events-none"}),i.jsxs("div",{className:"absolute right-0 top-0",children:[!b&&N({className:"",layout:!0,layoutId:"fab-menu"+F}),b&&i.jsx(i.Fragment,{children:i.jsx(T,{layout:!0,layoutId:"fab-menu"+F,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:h.duration,ease:"easeInOut",borderRadius:{duration:h.duration,ease:"easeInOut"},background:{duration:h.duration,ease:"easeInOut"},...h},icon:Fr,onClick:()=>$(!1),children:"Close"})})]})]})},Qr=({className:e,valueFormatter:t,step:n=10,name:r,value:o=0,min:u=0,max:c=100,marks:l=[{value:0,label:"0"},{value:100,label:"100"}],ref:h,onChange:s,...d})=>{const y=A=>{const B=p(),P=f();return A===1/0?100:A===-1/0?0:(A-B)/(P-B)*100},f=(A=!1)=>A?c:c==1/0?l[(l==null?void 0:l.length)-1].value:c,p=(A=!1)=>A?u:u==-1/0?l[0].value:u,m=A=>{const B=p(!1);return(f(!1)-B)*A/100+B},[x,w]=a.useState(!1),M=a.useRef(null),C=h||M,[b,$]=a.useState(o),[D,v]=a.useState(y(o)),[L,T]=a.useState(!1);a.useEffect(()=>{$(o),v(y(o))},[o]);const N=A=>{T(!0),w(!0),G(A)},F=()=>{T(!1),w(!1)};a.useEffect(()=>(L?(window.addEventListener("mouseup",F),window.addEventListener("mousemove",G),window.addEventListener("touchend",F),window.addEventListener("touchmove",G)):(window.removeEventListener("mouseup",F),window.removeEventListener("mousemove",G),window.removeEventListener("touchend",F),window.removeEventListener("touchmove",G)),()=>{window.removeEventListener("mouseup",F),window.removeEventListener("mousemove",G),window.removeEventListener("touchend",F),window.removeEventListener("touchmove",G)}),[L]);const I=Zt({className:e,isChanging:x,marks:l,max:c,min:u,name:r,step:n,value:b,valueFormatter:t,onChange:s}),G=A=>{const B=C==null?void 0:C.current;if(B){const P=B.getBoundingClientRect().left,K=((A.type==="touchmove"||A.type==="touchstart"?A.touches[0].clientX:A.clientX)-P)/B.offsetWidth*100;W({percent:K})}},W=({percent:A,value:B})=>{if(A){if(A>=100){$(f(!0)),v(100);return}if(A<=0){$(p(!0)),v(0);return}B=m(A),B==p()&&(B=p(!0)),B==f()&&(B=f(!0))}else if(B!=null){if(B>=f()){$(f(!0)),v(100);return}if(B<=p()){$(p(!0)),v(0);return}A=y(B)}else return;n!=null?B=Math.round((B-p())/n)*n+p():l&&(B=l.reduce((P,R,K)=>{let S=R.value===1/0?f():R.value===-1/0?p():R.value,k=P.value===1/0?f():P.value===-1/0?p():P.value;return S=Math.abs(S-B),k=Math.abs(k-B),S<k?R:P}).value),B>=f()&&(B=f(!0)),B<=p()&&(B=p(!0)),A=y(B),$(B),v(A),s&&s(B)},[Q,V]=a.useState(0);a.useEffect(()=>{const A=()=>{C.current&&V(C.current.offsetWidth)};return A(),window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}},[]);const j=A=>{switch(A.key){case"ArrowRight":if(n)W({value:b+n});else if(l){const B=l.find(P=>P.value>b);B&&W({value:B.value})}break;case"ArrowLeft":if(n)W({value:b-n});else if(l){const B=l.slice(0).reverse().find((P,R,K)=>b===1/0?R===1:P.value<b);B&&W({value:B.value})}break;default:return}};return i.jsxs("div",{tabIndex:0,onKeyDown:j,role:"slider","aria-valuemin":p(!0),"aria-valuemax":f(!0),"aria-valuenow":b,"aria-valuetext":b.toString(),className:I.slider,onMouseDown:N,onClick:G,ref:C,onTouchStart:N,onDragStart:A=>A.preventDefault(),...d,children:[i.jsx("input",{type:"hidden",name:r,value:b}),i.jsx("div",{className:I.activeTrack,style:{flex:D/100}}),i.jsx("div",{className:I.handle,children:i.jsx(Y.AnimatePresence,{children:x&&i.jsx(Y.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(b):b})})}),i.jsx("div",{className:I.inactiveTrack,style:{flex:1-D/100}}),i.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:l&&l.map((A,B)=>{let P=null;const R=(x?9:10)/Q*100,K=y(A.value);return K<=D-R?P=!0:K>=D+R&&(P=!1),i.jsx("div",{className:g(I.dot,{"bg-primary-container":P!=null&&P,"bg-primary":P!=null&&!P}),style:{left:`${y(A.value)}%`}},B)})})]})},eo=({variant:e="standard",className:t,children:n,title:r,position:o="right",extended:u,divider:c,onExtendedChange:l,closeIcon:h=Le,transition:s,...d})=>{s={duration:.3,...s};const[y,f]=a.useState(u??!0),p=Jt({transition:s,title:r,position:o,closeIcon:h,className:t,children:n,onExtendedChange:l,divider:c,isExtended:y,extended:y,variant:e});a.useEffect(()=>{l==null||l(y??!1)},[y]),a.useEffect(()=>{u!=null&&f(u)},[u]);const m={close:{width:0},open:{width:"auto"}},x=()=>i.jsxs(i.Fragment,{children:[i.jsx(Y.AnimatePresence,{children:e=="modal"&&y&&i.jsx(Y.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:s,onClick:()=>f(!1),className:p.overlay})}),i.jsx(Y.AnimatePresence,{children:y&&i.jsxs("div",{...d,className:p.sideSheet,style:{transition:s.duration+"s"},children:[i.jsxs(Y.motion.div,{variants:m,initial:u===!1?"open":"close",animate:"open",exit:"close",className:p.container,children:[i.jsxs("div",{className:p.header,children:[r&&i.jsx("p",{className:p.title,children:r}),i.jsx(be,{size:"small",label:"close",icon:h,onClick:()=>f(!1),className:p.closeButton})]}),i.jsx("div",{className:p.content,style:{transition:s.duration+"s"},children:n})]}),(c==null&&e=="standard"?!0:c)&&i.jsx(Ie,{className:p.divider,orientation:"vertical"})]})})]});return e=="modal"?He.createPortal(x(),document.body):x()},to=({message:e,className:t,duration:n,closeIcon:r=Le,onClose:o,...u})=>{const[c,l]=a.useState(!0),h=en({className:t,closeIcon:r,duration:n,isVisible:c,onClose:o,message:e});a.useEffect(()=>{n&&setTimeout(()=>{s()},n)},[n]);const s=()=>{l(!1),o==null||o()};return i.jsx(Y.AnimatePresence,{children:c&&i.jsx(Y.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:h.snackbar,...u,children:i.jsxs("div",{className:h.container,children:[i.jsx("p",{className:h.supportingText,children:e}),i.jsx(be,{onClick:()=>s(),className:h.icon,icon:r,label:"close the snackbar"})]})})})},no=({selected:e=!1,className:t,activeIcon:n,disabled:r=!1,inactiveIcon:o,onChange:u,onClick:c,onKeyDown:l,ref:h,...s})=>{const[d,y]=a.useState(e);a.useEffect(()=>{y(e)},[e]);const f=C=>{r||(m(),c&&c(C))},p=C=>{r||((C.key===" "||C.key==="Enter")&&(C.preventDefault(),m()),l&&l(C))},m=()=>{y(!d),u==null||u(!d)},x=nn({className:t,isSelected:d,activeIcon:n,inactiveIcon:o,disabled:r,selected:d,onChange:u}),w=a.useRef(null),M=h||w;return i.jsxs(Y.motion.div,{role:"switch","aria-checked":d,tabIndex:r?-1:0,onKeyDown:p,onClick:f,ref:M,className:x.switch,...s,children:[i.jsx("input",{type:"hidden",value:d?"1":"0"}),i.jsxs(Y.motion.div,{layout:!0,style:{translate:d?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:x.handleContainer,children:[i.jsx("div",{className:x.handle,children:(d?n:o)&&i.jsx(ie,{className:x.icon,icon:d?n:o})}),i.jsx("div",{className:x.handleStateLayer})]})]})},Sn=({className:e,onClick:t,label:n,variant:r="primary",href:o,icon:u,selectedTab:c,setSelectedTab:l,tabsId:h,index:s,onTabSelected:d,scrollable:y=!1,selected:f=!1,children:p,ref:m,...x})=>{const w=a.useRef(null),M=m||w,C=n??(typeof p=="string"?p:void 0),[b,$]=a.useState(f);a.useEffect(()=>{f&&c==null?$(!0):$(c==s&&s!=null)},[c]),a.useEffect(()=>{c==s&&d&&d({ref:M,index:s||0,label:C,icon:u})},[c]);const D=o?"a":"button",v=T=>{l&&l(s??null),t&&t(T)},L=on({className:e,onTabSelected:d,scrollable:y,selectedTab:c,index:s,tabsId:h,selected:b,variant:r,icon:u,label:C,isSelected:b,setSelectedTab:l,href:o});return i.jsxs(D,{...x,role:"tab","aria-selected":b,ref:M,href:o,className:L.tab,onClick:v,...x,children:[i.jsx(ue,{style:{transition:.3+"s"},className:L.stateLayer,colorName:r==="primary"&&b?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),i.jsxs("span",{className:L.content,children:[u&&i.jsx(ie,{icon:u,className:L.icon}),i.jsx("span",{className:L.label,children:C}),b&&i.jsx(Y.motion.span,{layoutId:`underline-${h}`,className:L.underline,transition:{duration:.3}})]})]})},Je=a.createContext(null),ro=({variant:e="primary",onTabSelected:t,children:n,className:r,selectedTab:o,setSelectedTab:u,scrollable:c=!1})=>{const l=a.useContext(Je),[h,s]=a.useState(null);let d;o===0||o!=null?d=o:l?d=l.selectedTab:d=h;const y=u??(l==null?void 0:l.setSelectedTab)??s,f=a.Children.toArray(n).filter(M=>a.isValidElement(M)&&M.type===Sn),p=a.useRef(null),m=M=>{if(t==null||t(M),c){const C=p.current,b=M.ref.current;if(C&&b){const $=b.offsetLeft+b.offsetWidth/2-C.offsetWidth/2;C.scrollTo({left:$,behavior:"smooth"})}}},x=a.useMemo(()=>(l==null?void 0:l.tabsId)??wn(),[l==null?void 0:l.tabsId]),w=sn({children:n,onTabSelected:t,scrollable:c,selectedTab:d,setSelectedTab:y,className:r,variant:e});return i.jsx("div",{ref:p,role:"tablist",className:w.tabs,children:f.map((M,C)=>a.cloneElement(M,{key:C,index:C,variant:e,selectedTab:d,setSelectedTab:y,tabsId:x,onTabSelected:m,scrollable:c}))})},oo=({children:e,selectedTab:t,setSelectedTab:n,defaultTab:r=0})=>{const[o,u]=a.useState(r),c=a.useRef(null),l=t!==void 0?t:o,h=n??u,s=c.current!==null&&l!==null?l>c.current?1:-1:0;l!==c.current&&(c.current=l);const d=a.useId(),y=a.useMemo(()=>({selectedTab:l,setSelectedTab:h,previousTab:c.current,direction:s,tabsId:d}),[l,h,s,d]);return i.jsx(Je.Provider,{value:y,children:e})},Cn=({children:e,className:t,isSelected:n=!1})=>{const r=hn({children:e,className:t,isSelected:n});return i.jsx("div",{className:r.tabPanel,children:e})},ao=({children:e,className:t})=>{const n=a.useContext(Je);if(!n)return console.warn("TabPanels must be used within a TabGroup"),null;const{selectedTab:r,direction:o,tabsId:u}=n,c=a.Children.toArray(e).filter(h=>a.isValidElement(h)&&h.type===Cn),l=cn({children:e,className:t});return i.jsx("div",{className:l.tabPanels,children:i.jsx(Y.AnimatePresence,{initial:!1,custom:o,mode:"popLayout",children:c.map((h,s)=>r===s&&i.jsx(Y.motion.div,{custom:o,variants:{enter:d=>({x:d*100+"%",opacity:1}),center:{x:0,opacity:1},exit:d=>({x:d*-100+"%",opacity:1})},initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",stiffness:400,damping:40},role:"tabpanel","aria-labelledby":`tab-${u}-${s}`,children:a.cloneElement(h,{isSelected:!0})},s))})})},so=({hasSelected:e})=>({datePicker:g("inline-flex flex-col bg-surface-container-high rounded-[28px] p-3 select-none","min-w-[320px]"),header:g("flex items-center justify-between h-12 mb-2 px-2"),monthNav:g("flex items-center justify-center w-10 h-10 rounded-full text-on-surface-variant hover:bg-on-surface-variant/8 transition-colors cursor-pointer"),monthLabel:g("text-label-large text-on-surface font-bold capitalize"),weekDays:g("grid grid-cols-7 mb-2"),weekDay:g("h-10 flex items-center justify-center text-body-small text-on-surface-variant"),daysGrid:g("grid grid-cols-7 row-auto gap-y-2"),dayCell:g("flex items-center justify-center h-10 p-0 relative"),dayButton:g("w-10 h-10 rounded-full flex items-center justify-center text-body-large transition-all duration-200 relative overflow-hidden z-10 outline-none")}),io=Z("datePicker",so),kn=({value:e,defaultValue:t,onChange:n,minDate:r,maxDate:o,shouldDisableDate:u,locale:c="default",weekStartDay:l=0,className:h,style:s,mode:d="single",...y})=>{const[f,p]=a.useState(()=>{const S=E=>E instanceof Date?E:Array.isArray(E)&&E[0]?E[0]:null,k=S(e)||S(t)||new Date;return new Date(k.getFullYear(),k.getMonth(),1)}),[m,x]=a.useState(0),[w,M]=a.useState("day"),C=e!==void 0,[b,$]=a.useState(t||null),D=C?e||null:b,v=(S,k)=>new Date(S,k+1,0).getDate(),L=a.useMemo(()=>{const S=f.getFullYear(),k=f.getMonth(),E=v(S,k),q=(new Date(S,k,1).getDay()-l+7)%7,J=[],te=v(S,k-1);for(let U=q-1;U>=0;U--)J.push({date:new Date(S,k-1,te-U),isCurrentMonth:!1});for(let U=1;U<=E;U++)J.push({date:new Date(S,k,U),isCurrentMonth:!0});const O=42-J.length;for(let U=1;U<=O;U++)J.push({date:new Date(S,k+1,U),isCurrentMonth:!1});return J},[f,l]),T=a.useMemo(()=>{const S=new Date().getFullYear(),k=S-100,E=S+100,z=[];for(let q=k;q<=E;q++)z.push(q);return z},[]),N=a.useRef(null);a.useEffect(()=>{if(w==="year"&&N.current){const S=N.current.querySelector('[data-selected="true"]');S&&S.scrollIntoView({block:"center"})}},[w]);const F=a.useMemo(()=>new Intl.DateTimeFormat(c,{month:"long",year:"numeric"}),[c]),I=a.useMemo(()=>new Intl.DateTimeFormat(c,{weekday:"narrow"}),[c]),G=a.useMemo(()=>{const S=new Date(2023,0,1+l);return Array.from({length:7}).map((k,E)=>{const z=new Date(S);return z.setDate(S.getDate()+E),I.format(z).charAt(0).toUpperCase()})},[I,l]),W=()=>{x(-1),p(S=>new Date(S.getFullYear(),S.getMonth()-1,1))},Q=()=>{x(1),p(S=>new Date(S.getFullYear(),S.getMonth()+1,1))},V=S=>{p(k=>new Date(S,k.getMonth(),1)),M("day")},j=(S,k)=>S?S.getDate()===k.getDate()&&S.getMonth()===k.getMonth()&&S.getFullYear()===k.getFullYear():!1,A=S=>j(new Date,S),B=S=>{let k=S;if(d==="single")k=S;else{const E=D,[z,q]=Array.isArray(E)?E:[null,null];!z||z&&q?k=[S,null]:S<z?k=[S,z]:k=[z,S]}C||$(k),n&&n(k)},P=S=>{if(d==="single")return{isSelected:j(D,S),isStart:!1,isEnd:!1,isInRange:!1};const k=Array.isArray(D)?D:[D,null],[E,z]=k,q=j(E,S),J=j(z,S);let te=!1;if(E&&z){const re=new Date(E.getFullYear(),E.getMonth(),E.getDate()).getTime(),O=new Date(z.getFullYear(),z.getMonth(),z.getDate()).getTime(),U=new Date(S.getFullYear(),S.getMonth(),S.getDate()).getTime();te=U>re&&U<O}return{isSelected:q||J,isStart:q,isEnd:J,isInRange:te}},R=io({hasSelected:!!D}),K={enter:S=>({x:S>0?"100%":"-100%",opacity:0}),center:{x:0,opacity:1},exit:S=>({x:S<0?"100%":"-100%",opacity:0})};return i.jsxs("div",{className:g(R.datePicker,h),style:s,...y,children:[i.jsxs("div",{className:R.header,children:[i.jsxs(pe,{variant:"text",disableTextMargins:!0,size:"small",onClick:()=>M(S=>S==="day"?"year":"day"),className:"text-label-large font-bold capitalize text-on-surface hover:bg-surface-container-highest",children:[i.jsx("span",{className:"mr-2",children:w==="day"?F.format(f):f.getFullYear()}),i.jsx(ie,{icon:bn,className:g("w-3 h-3 transition-transform duration-200 inline",w==="year"&&"rotate-180")})]}),w==="day"&&i.jsxs("div",{className:"flex items-center",children:[i.jsx(be,{size:"xSmall",allowShapeTransformation:!1,onClick:W,icon:Br,label:"Previous month",title:null}),i.jsx(be,{size:"xSmall",allowShapeTransformation:!1,onClick:Q,icon:vn,label:"Next month",title:null})]})]}),w==="year"?i.jsx("div",{className:"h-[280px] overflow-y-auto grid grid-cols-3 gap-2 p-2 scrollbar-hide",ref:N,children:T.map(S=>i.jsx(pe,{size:"small",variant:S===f.getFullYear()?"filled":"text",onClick:()=>V(S),"data-selected":S===f.getFullYear(),className:g("w-full",{"text-on-surface":S!==f.getFullYear()}),label:S.toString(),children:S},S))}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:R.weekDays,children:G.map((S,k)=>i.jsx("div",{className:R.weekDay,children:S},k))}),i.jsx("div",{className:"overflow-hidden relative min-h-[240px]",children:i.jsx(Y.AnimatePresence,{mode:"popLayout",initial:!1,custom:m,children:i.jsx(Y.motion.div,{custom:m,variants:K,initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",bounce:0,duration:.3},className:R.daysGrid,children:L.map((S,k)=>{if(!S.isCurrentMonth)return i.jsx("div",{className:R.dayCell},k);const{isSelected:E,isStart:z,isEnd:q,isInRange:J}=P(S.date),te=A(S.date),re=r&&S.date<r||o&&S.date>o||(u==null?void 0:u(S.date));return i.jsx("div",{className:g(R.dayCell,J&&"bg-primary/20",z&&(D==null?void 0:D[1])&&"bg-gradient-to-r from-transparent to-primary/20",q&&(D==null?void 0:D[0])&&"bg-gradient-to-l from-transparent to-primary/20"),children:i.jsx(pe,{className:()=>({button:g("aspect-square h-[40px] p-0",{"text-on-surface":!E&&!te,"opacity-50":re}),stateLayer:g({"!bg-transparent":re})}),size:"small",allowShapeTransformation:!1,variant:g({filled:E,outlined:te,text:!E&&!te}),label:S.date.getDate().toString(),onClick:()=>B(S.date),disabled:re,children:S.date.getDate().toString()})},k)})},f.toISOString())})})]})]})},lo=({variant:e="filled",autoFocus:t,disabled:n=!1,errorText:r,placeholder:o,suffix:u,name:c,label:l,className:h,supportingText:s,trailingIcon:d,leadingIcon:y,type:f="text",multiline:p=!1,autoComplete:m="on",onChange:x,value:w,defaultValue:M,showSupportingText:C,id:b,style:$,ref:D,onFocus:v,onBlur:L,options:T,children:N,...F})=>{var tt;const I=a.useId(),G=b||I,W=`${G}-helper`,Q=w!==void 0,[V,j]=a.useState(M??""),A=Q?w:V,[B,P]=a.useState(!1),[R,K]=a.useState(!!(r!=null&&r.length)),S=a.useRef(null),k=D||S,E=a.useRef(null),z=a.useRef(null),q=a.useRef(null),J=C??(!!(r!=null&&r.length)||!!(s!=null&&s.length));a.useEffect(()=>{K(!!(r!=null&&r.length))},[r]);const te=()=>{k.current&&!B&&!n&&f!=="select"&&k.current.focus()};a.useEffect(()=>{if(!(!t||n)&&f!=="select"){const X=window.requestAnimationFrame(()=>{te()});return()=>window.cancelAnimationFrame(X)}},[t,n,k,f]),a.useEffect(()=>{B?(K(!1),v==null||v()):(r!=null&&r.length&&K(!0),L==null||L())},[B]);const re=X=>{const oe=X.target.value;Q||j(oe),K(!1),x&&x(X)},O=f==="date",[U,_]=a.useState(!1),[ee,ae]=a.useState(null),me=a.useMemo(()=>{const X=String(A);if(!X)return null;const[oe,ye,Ce]=X.split("-").map(Number);return oe&&ye&&Ce?new Date(oe,ye-1,Ce):null},[A]),Se=()=>{n||(U?_(!1):(ae(me),_(!0)))};a.useEffect(()=>{U?P(!0):(!le||!he)&&P(!1)},[U]),a.useEffect(()=>{if(!U)return;const X=de=>{var ke,Ne;return de?((ke=E.current)==null?void 0:ke.contains(de))||((Ne=q.current)==null?void 0:Ne.contains(de)):!1},oe=de=>{var nt,rt;const ke=de.target,Ne=(nt=q.current)==null?void 0:nt.contains(ke),Tn=(rt=z.current)==null?void 0:rt.contains(ke);!Ne&&!Tn&&_(!1)},ye=de=>{X(de.target)||_(!1)},Ce=de=>{de.key==="Escape"&&_(!1)};return document.addEventListener("pointerdown",oe),document.addEventListener("focusin",ye),document.addEventListener("keydown",Ce),()=>{document.removeEventListener("pointerdown",oe),document.removeEventListener("focusin",ye),document.removeEventListener("keydown",Ce)}},[U]);const Mn=()=>{const X=ee?ee.toLocaleDateString("en-CA"):"";Q||j(X),x&&x({target:{value:X,name:c,type:f}}),_(!1)},le=f==="select",[he,Te]=a.useState(!1),Pe=a.useRef(null),Ze=a.useMemo(()=>{if(le&&T){const X=T.find(oe=>String(oe.value)===String(A));return X?X.label:A}return A},[A,le,T]),Qe=()=>{n||(Te(!he),P(!he))},et=X=>{if(Q||j(String(X)),x){const oe={target:{value:String(X),name:c,type:f}};x(oe)}Te(!1),P(!1)};a.useEffect(()=>{if(!he)return;const X=oe=>{E.current&&!E.current.contains(oe.target)&&Pe.current&&!Pe.current.contains(oe.target)&&(Te(!1),P(!1))};return document.addEventListener("mousedown",X),()=>{document.removeEventListener("mousedown",X)}},[he]);const ge=a.useMemo(()=>{if(d)return d;if(O)return Or;if(le)return he?jr:bn},[d,O,le,he]),Nn=O||le?"[&::-webkit-calendar-picker-indicator]:hidden cursor-pointer selection:bg-transparent":"",ce=fn({showSupportingText:J,isFocused:B,showErrorIcon:R,disabled:n,name:c,label:l,autoComplete:m,className:h,onChange:x,placeholder:o,supportingText:s,type:f,leadingIcon:y,trailingIcon:ge,variant:e,errorText:r,value:String(Ze),suffix:u,multiline:p}),Dn=p?jn:"input",En=p?{}:{type:le?"text":f,readOnly:le},$e=B||typeof A=="string"&&A.length>0||f=="date"||le&&he,Me=$e&&e==="outlined",An=!Me;return i.jsxs("div",{ref:E,className:ce.textField,style:$,children:[i.jsxs("fieldset",{onClick:()=>{le?Qe():te()},className:ce.content,role:"presentation",children:[i.jsx("div",{className:ce.stateLayer}),y&&i.jsx("div",{className:ce.leadingIcon,children:a.isValidElement(y)?y:i.jsx(ie,{className:"w-5 h-5",icon:y})}),i.jsx(Y.motion.legend,{"aria-hidden":"true",variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:Me?"visible":"hidden",animate:Me?"visible":"hidden",className:"max-w-full ml-2 px-2 text-body-small h-0 overflow-hidden whitespace-nowrap",transition:{duration:.2},children:i.jsx("span",{className:"transform inline-flex -translate-y-1/2 opacity-0",children:l})}),i.jsxs("div",{className:"flex-1 relative",children:[An&&i.jsx(Y.motion.label,{htmlFor:G,className:g("absolute left-4 transition-all duration-300 pointer-events-none",{"text-body-small top-2":e=="filled"&&$e,"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&$e)}),transition:{duration:.3},layoutId:e==="outlined"?`${G}-label`:void 0,children:i.jsx("span",{className:ce.label,children:l})}),Me&&i.jsx(Y.motion.label,{htmlFor:G,className:g("absolute left-2 -top-3 px-1 text-body-small z-10",ce.label),layoutId:`${G}-label`,transition:{duration:.3},children:l}),i.jsx(Dn,{...F,ref:k,value:Ze,onChange:re,className:g(ce.input,Nn),id:G,name:c,placeholder:B?o??void 0:"",onFocus:()=>{le||P(!0)},onBlur:()=>{le||P(!1)},disabled:n,autoComplete:m,"aria-invalid":!!(r!=null&&r.length),"aria-describedby":J?W:void 0,...En})]}),i.jsx("div",{className:ce.activeIndicator}),!R&&i.jsxs(i.Fragment,{children:[ge&&i.jsx("div",{ref:O?z:void 0,onClick:X=>{X.stopPropagation(),O&&Se(),le&&Qe()},className:g(ce.trailingIcon,(O||le)&&"cursor-pointer"),children:i.jsx("div",{className:"flex items-center justify-center w-full h-full",children:a.isValidElement(ge)?ge:i.jsx(ie,{className:"h-5",icon:ge})})}),!ge&&u&&i.jsx("span",{className:ce.suffix,children:u})]}),R&&i.jsx("div",{className:g(ce.trailingIcon,{" absolute right-0":!ge}),children:i.jsx(ie,{className:"h-5 text-error",icon:Rr})})]}),J&&i.jsx("p",{className:ce.supportingText,id:W,children:r!=null&&r.length?r:s!=null&&s.length?s:" "}),O&&U&&i.jsx(i.Fragment,{children:i.jsx(xe,{anchorRef:E,position:"bottom",children:i.jsxs("div",{ref:q,className:"z-50 shadow-xl rounded-[28px] bg-surface-container-high overflow-hidden",children:[i.jsx(kn,{className:"",value:ee,onChange:ae}),i.jsxs("div",{className:"flex justify-end gap-2 p-4 pt-0",children:[i.jsx(pe,{variant:"text",size:"small",onClick:()=>_(!1),children:"Cancel"}),i.jsx(pe,{variant:"filled",size:"small",onClick:Mn,children:"OK"})]})]})})}),le&&he&&i.jsx(xe,{anchorRef:E,position:"bottom",style:{width:(tt=E.current)==null?void 0:tt.offsetWidth},children:i.jsx("div",{ref:Pe,children:i.jsx(Ke,{className:"max-w-full",selected:A,children:N?a.Children.map(N,X=>a.isValidElement(X)&&X.type===De?a.cloneElement(X,{onClick:oe=>{X.props.onClick&&X.props.onClick(oe),et(X.props.value??"")}}):X):T==null?void 0:T.map((X,oe)=>X.type==="divider"?i.jsx(Ie,{className:"my-1"},oe):X.type==="headline"?i.jsx(Ge,{label:X.label},oe):i.jsx(De,{onClick:ye=>{X.onClick&&X.onClick(ye),et(X.value??"")},...X,children:X.label},X.value??oe))})})})]})},co=({isSelected:e,icon:t,label:n,variant:r})=>({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]":r=="vertical","gap-0 h-[66px]":r=="horizontal"}),container:g(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":r=="horizontal","gap-0 ":r=="vertical","p-4":!n},n&&["px-4",{"py-1 ":r=="vertical","py-4 ":r=="horizontal"}]),stateLayer:g("rounded-full"),icon:g("size-6 flex"),label:g("w-fit mx-auto text-nowrap",{"text-label-large ":r=="horizontal","text-label-medium":r=="vertical"})}),uo=Z("navigationRailItem",co),Ln=({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})}),In=({className:e,onClick:t,label:n,variant:r="vertical",href:o,icon:u,selectedItem:c,setSelectedItem:l,index:h,onItemSelected:s,selected:d=!1,ref:y,transition:f,isExtended:p,iconSelected:m,style:x,extendedOnly:w,children:M,...C})=>{M&&(n=M);const b=a.useRef(null),$=y||b,[D,v]=a.useState(d);a.useEffect(()=>{d&&c==null?v(!0):v(c==h&&h!=null)},[c]),a.useEffect(()=>{c==h&&s&&s({ref:$,index:h||0,label:n,icon:u})},[c]);const L=o?"a":"button",T=F=>{l&&l(h??null),t&&t(F)},N=uo({isExtended:p,extendedOnly:w,className:e,onItemSelected:s,selectedItem:c,index:h,transition:f,selected:D,variant:r,icon:u,label:n,isSelected:D,setSelectedItem:l,href:o,children:n,iconSelected:m});return f={duration:.3,...f},w&&!p?null:i.jsxs(L,{...C,role:"tab","aria-selected":D,ref:$,href:o,className:N.navigationRailItem,onClick:T,style:{transition:f.duration+"s",...x},children:[i.jsxs(Y.motion.div,{style:{transition:r=="horizontal"?f.duration+`s, gap ${f.duration/2}s ${f.duration-f.duration/2}s`:f.duration+`s, gap ${f.duration/3}s ${f.duration-f.duration/3}s`},transition:f,className:N.container,children:[i.jsx(ue,{style:{transition:f.duration+"s"},className:N.stateLayer,colorName:g({"on-surface":!D,"on-secondary-container":D}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),u&&i.jsx(ie,{icon:D?m:u,className:N.icon}),i.jsx(Y.AnimatePresence,{children:r=="horizontal"&&(()=>{const F={width:0,opacity:0,transition:{...f}},I={width:"auto",opacity:1,transition:{...f,opacity:{duration:f.duration/2,delay:f.duration-f.duration/2}}};return i.jsx(Y.motion.span,{initial:F,animate:I,exit:F,className:N.label,children:n})})()})]}),i.jsx(Y.AnimatePresence,{children:r=="vertical"&&(()=>{const F={height:0,opacity:0,transition:{...f,opacity:{duration:0}}},I={height:"auto",opacity:1,transition:{...f,opacity:{duration:f.duration/3,delay:f.duration-f.duration/3}}};return i.jsx(Y.motion.span,{initial:I,animate:I,exit:F,className:N.label,transition:f,children:n})})()})]})},ho=({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})}),fo=Z("navigationRail",ho),po=({variant:e="standard",onItemSelected:t,children:n,className:r,selectedItem:o,extended:u,alignment:c="top",menu:l={closed:{icon:_r,label:"Open menu"},opened:{icon:Le,label:"Close menu"}},style:h,onExtendedChange:s,transition:d,setSelectedItem:y})=>{const[f,p]=a.useState(null),[m,x]=a.useState(u);let w;o==0||o!=null?w=o:w=f;const M=y||p,C=a.useRef(null),b=N=>{t==null||t(N)};function $(N){const F=[];return a.Children.forEach(N,I=>{a.isValidElement(I)&&I.type===a.Fragment?F.push(...$(I.props.children)):F.push(I)}),F}const D=$(n),v=D.filter(N=>a.isValidElement(N)&&N.type===Ee),L=fo({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:M,className:r,variant:e,extended:m,isExtended:m,alignment:c,menu:l,transition:d,onExtendedChange:s});d={duration:.3,...d};const T=a.useRef(!1);return T.current=!1,a.useEffect(()=>{s==null||s(m??!1)},[m]),i.jsxs("div",{style:{transition:d.duration+"s",...h},ref:C,className:L.navigationRail,children:[i.jsxs("div",{className:L.header,children:[i.jsx(be,{onClick:()=>x(!m),label:m?l==null?void 0:l.opened.label:l==null?void 0:l.closed.label,className:L.menuIcon,icon:m?l.opened.icon:l==null?void 0:l.closed.icon}),v.length>0&&a.cloneElement(v[0],{transition:d,isExtended:m,className:"!shadow-none mx-5 "+v[0].props.className})]}),i.jsx("div",{className:L.segments,children:(()=>{let N=0;return D.map(F=>a.isValidElement(F)&&F.type===In?a.cloneElement(F,{key:N,index:N++,variant:m?"horizontal":"vertical",selectedItem:w,setSelectedItem:M,onItemSelected:b,transition:d,extendedOnly:T.current,isExtended:m}):a.isValidElement(F)&&F.type===Ee?null:a.isValidElement(F)&&F.type===Ln?(T.current=!0,m?a.cloneElement(F,{}):null):F)})()}),i.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function mo(e){return we.defineConfig({variant:we.Variants.Udixio,...e,plugins:[new we.FontPlugin(e),new Fe.TailwindPlugin(e)]})}exports.AnchorPositioner=xe;exports.AnimateOnScrollInit=ar;exports.Button=pe;exports.Card=Tr;exports.Carousel=Pr;exports.CarouselItem=yn;exports.Checkbox=Hr;exports.Chip=Be;exports.Chips=Jr;exports.ContextMenu=zr;exports.CustomScroll=vt;exports.DatePicker=kn;exports.Divider=Ie;exports.Fab=Ee;exports.FabMenu=Zr;exports.Icon=ie;exports.IconButton=be;exports.Menu=Ke;exports.MenuGroup=_e;exports.MenuHeadline=Ge;exports.MenuItem=De;exports.NavigationRail=po;exports.NavigationRailItem=In;exports.NavigationRailSection=Ln;exports.ProgressIndicator=gn;exports.RippleEffect=pt;exports.SideSheet=eo;exports.Slider=Qr;exports.SmoothScroll=Kn;exports.Snackbar=to;exports.State=ue;exports.Switch=no;exports.SyncedFixedWrapper=St;exports.Tab=Sn;exports.TabGroup=oo;exports.TabPanel=Cn;exports.TabPanels=ao;exports.Tabs=ro;exports.TextField=lo;exports.ThemeProvider=Qn;exports.Tooltip=Xe;exports.animateOnScroll=sr;exports.buttonStyle=ir;exports.cardStyle=lr;exports.carouselItemConfig=Ue;exports.carouselItemStyle=cr;exports.carouselStyle=ur;exports.checkboxStyle=hr;exports.chipStyle=dr;exports.chipsStyle=fr;exports.classNames=g;exports.classnames=gt;exports.createUseClassNames=Z;exports.customScrollStyle=yt;exports.defaultClassNames=ne;exports.defineConfig=mo;exports.dividerStyle=pr;exports.fabMenuStyle=gr;exports.fabStyle=mr;exports.getClassNames=Ae;exports.iconButtonStyle=yr;exports.initAnimateOnScroll=Ve;exports.menuGroupStyle=br;exports.menuStyle=vr;exports.normalize=ve;exports.progressIndicatorStyle=wr;exports.sideSheetConfig=Ye;exports.sideSheetStyle=Jt;exports.sliderConfig=ze;exports.sliderStyle=Sr;exports.snackbarStyle=Cr;exports.switchStyle=kr;exports.tabPanelStyle=Nr;exports.tabPanelsStyle=Mr;exports.tabStyle=Lr;exports.tabsStyle=Ir;exports.textFieldStyle=Dr;exports.toolStyle=Er;exports.useButtonStyle=Lt;exports.useCardStyle=Mt;exports.useCarouselItemStyle=Nt;exports.useCarouselStyle=Et;exports.useCheckboxStyle=Tt;exports.useChipStyle=$t;exports.useChipsStyle=jt;exports.useClassNames=Fn;exports.useDividerStyle=Ft;exports.useFabMenuStyle=Wt;exports.useFabStyle=_t;exports.useIconButtonStyle=Ut;exports.useMenuGroupStyle=Gt;exports.useMenuStyle=zt;exports.useProgressIndicatorStyle=Xt;exports.useSideSheetStyle=xr;exports.useSliderStyle=Zt;exports.useSnackbarStyle=en;exports.useStateStyle=xt;exports.useSwitchStyle=nn;exports.useTabPanelStyle=hn;exports.useTabPanelsStyle=cn;exports.useTabStyle=on;exports.useTabsStyle=sn;exports.useTextFieldStyle=fn;exports.useToolTipStyle=mn;exports.useTooltipTrigger=xn;
10
+ `})]}),I&&l.jsx(Be,{ref:F,className:"opacity-0",draggable:s,editable:!0,editing:!0,onChange:v=>{var k;if(v=v.replace(/(&nbsp;)+/g," ").trim(),console.log("Ghost chip onChange",v,!!v),v)L(v);else if(c.length>0){const D=h.current[c.length-1];(k=D==null?void 0:D.focus)==null||k.call(D)}},onEditCommit:()=>{},onBlur:()=>{i(!1)},onFocus:v=>{i(!0),v.stopPropagation()},children:" "})]})};function wn({trigger:e=["hover","focus"],isOpen:t,defaultOpen:n=!1,onOpenChange:s,openDelay:r=400,closeDelay:u=150,id:c}={}){const a=o.useId(),d=c??`tooltip-${a}`,i=Array.isArray(e)?e:[e],f=typeof t=="boolean",[x,h]=o.useState(n?"hovered":"hidden"),[m,p]=o.useState(!1),b=o.useRef(null),w=o.useRef(null),L=o.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),w.current&&(clearTimeout(w.current),w.current=null)},[]);o.useEffect(()=>()=>L(),[L]);const E=o.useCallback($=>{if(f){const R=$!=="hidden";s==null||s(R)}else{h($);const R=$!=="hidden";s==null||s(R)}},[f,s]),g=f?t?"hovered":"hidden":x,F=g!=="hidden",I=$=>{switch($){case"hidden":return 0;case"hovered":return 1;case"focused":return 2;case"clicked":return 3;default:return 0}},v=o.useCallback($=>{L(),!(I($)<=I(g))&&(b.current=setTimeout(()=>{E($)},r))},[L,r,g,E]),k=o.useCallback($=>{L(),w.current=setTimeout(()=>{(!f&&I(x)<=I($)||f)&&E("hidden")},u)},[L,u,x,f,E]),D=o.useCallback(()=>{i.includes("hover")&&v("hovered")},[i,v]),M=o.useCallback(()=>{i.includes("hover")&&(g==="focused"||g==="clicked"||m||k("hovered"))},[i,g,m,k]),T=o.useCallback(()=>{i.includes("focus")&&(L(),E("focused"))},[i,L,E]),j=o.useCallback(()=>{if(i.includes("focus")&&g!=="clicked"){if(i.includes("hover")&&m){E("hovered");return}k("focused")}},[i,g,m,k,E]),X=o.useCallback(()=>{i.includes("click")&&(L(),E(g==="clicked"?"hidden":"clicked"))},[i,g,L,E]),V=o.useCallback($=>{$.key==="Escape"&&F&&(L(),E("hidden"),$.preventDefault())},[F,L,E]),Q=o.useCallback(()=>{p(!0),L()},[L]),z=o.useCallback(()=>{p(!1),i.includes("hover")&&g==="hovered"&&k("hovered")},[i,g,k]);return{triggerProps:{"aria-describedby":F?d:void 0,onMouseEnter:D,onMouseLeave:M,onFocus:T,onBlur:j,onClick:X,onKeyDown:V},tooltipProps:{id:d,role:"tooltip","aria-hidden":!F,onMouseEnter:Q,onMouseLeave:z},isOpen:F,state:g}}const Je=({variant:e="plain",buttons:t,className:n,children:s,title:r,text:u,content:c,position:a,targetRef:d,ref:i,trigger:f=["hover","focus"],transition:x,openDelay:h=400,closeDelay:m=150,isOpen:p,defaultOpen:b=!1,onOpenChange:w,id:L,anchorRef:E,...g})=>{const I=a||(e==="rich"?"bottom-right":"bottom");if(x={duration:.3,...x},!s&&!d)throw new Error("Tooltip must have a child or a targetRef");t&&!Array.isArray(t)&&(t=[t]);const v=o.useRef(null),D=E||(d||v),{triggerProps:M,tooltipProps:T,isOpen:j}=wn({trigger:f,isOpen:p,defaultOpen:b,onOpenChange:w,openDelay:h,closeDelay:m,id:L}),X=!d&&o.isValidElement(s)?o.cloneElement(s,{ref:v,...M,onMouseEnter:z=>{var $,R;M.onMouseEnter(),(R=($=s.props)==null?void 0:$.onMouseEnter)==null||R.call($,z)},onMouseLeave:z=>{var $,R;M.onMouseLeave(),(R=($=s.props)==null?void 0:$.onMouseLeave)==null||R.call($,z)},onFocus:z=>{var $,R;M.onFocus(),(R=($=s.props)==null?void 0:$.onFocus)==null||R.call($,z)},onBlur:z=>{var $,R;M.onBlur(),(R=($=s.props)==null?void 0:$.onBlur)==null||R.call($,z)},onClick:z=>{var $,R;M.onClick(),(R=($=s.props)==null?void 0:$.onClick)==null||R.call($,z)},onKeyDown:z=>{var $,R;M.onKeyDown(z),(R=($=s.props)==null?void 0:$.onKeyDown)==null||R.call($,z)}}):s;o.useEffect(()=>{if(!d)return;const z=d.current;if(!z)return;const $=()=>M.onMouseEnter(),R=()=>M.onMouseLeave(),O=()=>M.onFocus(),A=()=>M.onBlur(),W=()=>M.onClick(),G=S=>M.onKeyDown(S);return z.addEventListener("mouseenter",$),z.addEventListener("mouseleave",R),z.addEventListener("focus",O,!0),z.addEventListener("blur",A,!0),z.addEventListener("click",W),z.addEventListener("keydown",G),M["aria-describedby"]?z.setAttribute("aria-describedby",M["aria-describedby"]):z.removeAttribute("aria-describedby"),()=>{z.removeEventListener("mouseenter",$),z.removeEventListener("mouseleave",R),z.removeEventListener("focus",O,!0),z.removeEventListener("blur",A,!0),z.removeEventListener("click",W),z.removeEventListener("keydown",G)}},[d,M]);const V=mn({variant:e,buttons:t,className:n,title:r,text:u,position:I,trigger:f,targetRef:d,children:s}),Q={open:{opacity:1,height:"auto"},close:{opacity:0,height:16}};return l.jsxs(l.Fragment,{children:[X,l.jsx(Y.AnimatePresence,{children:j&&l.jsx(be,{anchorRef:D,position:I,children:l.jsx(Y.motion.div,{initial:"close",variants:Q,animate:"open",transition:{duration:x.duration},exit:"close",className:V.toolTip,...g,...T,children:l.jsx("div",{className:V.container,children:c?l.jsx("div",{className:V.content,children:c}):l.jsxs(l.Fragment,{children:[r&&l.jsx("div",{className:V.subHead,children:r}),u&&l.jsx("div",{className:V.supportingText,children:u}),t&&l.jsx("div",{className:V.actions,children:Array.isArray(t)&&t.map((z,$)=>l.jsx(me,{size:"small",variant:"text",...z},$))})]})})})})})]})},Ce=({className:e,label:t,variant:n="primary",size:s="medium",href:r,type:u,icon:c,extended:a=!1,ref:d,transition:i,children:f,...x})=>{if(f&&(t=f),!t)throw new Error("FAB component requires either a label prop or children content");const h=r?"a":"button",m=Ot({href:r,icon:c,extended:a,label:t,size:s,variant:n,className:e,transition:i,children:t});i={duration:.3,...i};const p=o.useRef(null),b=d||p,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...i,opacity:{duration:i.duration/2,delay:i.duration-i.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...i,marginLeft:{duration:i.duration/2,delay:i.duration-i.duration/2}}}};return l.jsxs(h,{...x,ref:b,href:r,"aria-label":a?void 0:t,className:m.fab,children:[l.jsx(Je,{trigger:a?null:void 0,text:t,targetRef:b}),l.jsx(ue,{style:{transition:i.duration+"s"},className:m.stateLayer,colorName:y({"on-primary":n=="primary","on-secondary":n=="secondary","on-tertiary":n=="tertiary","on-primary-container":n=="primaryContainer","on-secondary-container":n=="secondaryContainer","on-tertiary-container":n=="tertiaryContainer"}),stateClassName:"state-ripple-group-[fab]"}),l.jsx(le,{icon:c,className:m.icon}),l.jsx(Y.AnimatePresence,{children:a&&l.jsx(Y.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:m.label,children:t})})]})},ge=({variant:e="standard",href:t,disabled:n=!1,title:s,label:r,onToggle:u,activated:c=!1,onClick:a,icon:d,size:i="medium",iconSelected:f,className:x,ref:h,width:m="default",shape:p="rounded",allowShapeTransformation:b=!0,transition:w,children:L,...E})=>{if(L&&(r=L),!r)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");!s&&s!==null&&(s=r);const[g,F]=o.useState(c),I=T=>{n&&T.preventDefault(),u?(F(!g),u(!g)):a&&a(T)};o.useEffect(()=>{F(c)},[c]);const v=t?"a":"button",k=zt({transition:w,shape:p,allowShapeTransformation:b,width:m,href:t,activated:g,label:r,iconSelected:f,isActive:g,onToggle:u,disabled:n,icon:d,variant:e,className:x,size:i,children:r,...E}),D=o.useRef(null),M=h||D;return w={duration:.3,...w},l.jsxs(v,{disabled:n,href:t,style:{transition:w.duration+"s"},className:k.iconButton,"aria-label":r,...E,title:void 0,onClick:I,ref:M,children:[s!==null&&l.jsx(Je,{targetRef:M,trigger:n?null:void 0,text:s}),l.jsx("div",{className:k.touchTarget}),l.jsx(ue,{style:{transition:w.duration+"s"},className:k.stateLayer,colorName:y(e==="standard"&&{"on-surface-variant":!g,"on-primary":g},e==="filled"&&{"on-surface-variant":!g&&!!u,"on-primary":g||!u},e==="tonal"&&{"on-secondary":g&&!!u,"on-secondary-container":!g||!u},e==="outlined"&&{"inverse-on-surface":g&&!!u,"on-surface-variant":!g||!u}),stateClassName:"state-ripple-group-[icon-button]"}),d?l.jsx(le,{icon:d,className:k.icon}):L]})},Ks=({className:e,label:t,variant:n="primary",size:s="medium",href:r,icon:u,extended:c=!1,ref:a,transition:d,children:i,open:f,defaultOpen:x=!1,onOpenChange:h,...m})=>{d={duration:.3,ease:"easeInOut",...d};const p=o.useRef(null),b=a||p,w=typeof f=="boolean",[L,E]=o.useState(x),g=w?f:L,F=j=>{w||E(j),h==null||h(j)},I=o.Children.toArray(i).filter(j=>o.isValidElement(j)&&j.type===me),v=Ht({href:r,icon:u,extended:c,label:t,size:s,variant:n,className:e,transition:d,children:t,open:g}),k=Y.motion.create(Ce),D=Y.motion.create(ge),M=j=>l.jsx(k,{icon:u,extended:c,label:t,variant:n+"Container",size:s,className:v.fab+" "+(e??""),"aria-expanded":g,onClick:()=>F(!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}),T=o.useId();return l.jsxs("div",{className:v.fabMenu,ref:b,...m,children:[l.jsx(Y.AnimatePresence,{children:g&&l.jsx("div",{className:v.actions,role:"menu","aria-hidden":!g,children:(()=>{const j=I.length;return I.map((X,V)=>{X.props;const Q=j-1-V,z=((d==null?void 0:d.delay)??0)+Q*.06,$={open:{overflow:"visible",opacity:1,width:"auto",transition:{...d,delay:z,opacity:{delay:(d==null?void 0:d.duration)/2+z}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...d,delay:z,opacity:{duration:(d==null?void 0:d.duration)/1.5}}}};return l.jsx(Y.motion.div,{initial:"close",animate:"open",variants:$,transition:d,exit:"close",children:o.cloneElement(X,{key:V,shape:"rounded",variant:"filled",className:()=>({button:y("max-w-full overflow-hidden text-nowrap",{"px-0":!g,"bg-primary-container text-on-primary-container ":n==="primary","bg-secondary-container text-on-secondary-container":n==="secondary","bg-tertiary-container text-on-tertiary-container":n==="tertiary"}),stateLayer:y({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),M({className:"invisible pointer-events-none"}),l.jsxs("div",{className:"absolute right-0 top-0",children:[!g&&M({className:"",layout:!0,layoutId:"fab-menu"+T}),g&&l.jsx(l.Fragment,{children:l.jsx(D,{layout:!0,layoutId:"fab-menu"+T,variant:"filled",className:()=>({iconButton:y({"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:y({"[--default-color:var(--color-on-primary)]":n==="primary","[--default-color:var(--color-on-secondary)]":n==="secondary","[--default-color:var(--color-on-tertiary)]":n==="tertiary"})}),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},icon:$s,onClick:()=>F(!1),children:"Close"})})]})]})},Js=({className:e,valueFormatter:t,step:n=10,name:s,value:r=0,min:u=0,max:c=100,marks:a=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:i,...f})=>{const x=R=>{const O=m(),A=h();return R===1/0?100:R===-1/0?0:(R-O)/(A-O)*100},h=(R=!1)=>R?c:c==1/0?a[(a==null?void 0:a.length)-1].value:c,m=(R=!1)=>R?u:u==-1/0?a[0].value:u,p=R=>{const O=m(!1);return(h(!1)-O)*R/100+O},[b,w]=o.useState(!1),L=o.useRef(null),E=d||L,[g,F]=o.useState(r),[I,v]=o.useState(x(r)),[k,D]=o.useState(!1);o.useEffect(()=>{F(r),v(x(r))},[r]);const M=R=>{D(!0),w(!0),X(R)},T=()=>{D(!1),w(!1)};o.useEffect(()=>(k?(window.addEventListener("mouseup",T),window.addEventListener("mousemove",X),window.addEventListener("touchend",T),window.addEventListener("touchmove",X)):(window.removeEventListener("mouseup",T),window.removeEventListener("mousemove",X),window.removeEventListener("touchend",T),window.removeEventListener("touchmove",X)),()=>{window.removeEventListener("mouseup",T),window.removeEventListener("mousemove",X),window.removeEventListener("touchend",T),window.removeEventListener("touchmove",X)}),[k]);const j=Jt({className:e,isChanging:b,marks:a,max:c,min:u,name:s,step:n,value:g,valueFormatter:t,onChange:i}),X=R=>{const O=E==null?void 0:E.current;if(O){const A=O.getBoundingClientRect().left,G=((R.type==="touchmove"||R.type==="touchstart"?R.touches[0].clientX:R.clientX)-A)/O.offsetWidth*100;V({percent:G})}},V=({percent:R,value:O})=>{if(R){if(R>=100){F(h(!0)),v(100);return}if(R<=0){F(m(!0)),v(0);return}O=p(R),O==m()&&(O=m(!0)),O==h()&&(O=h(!0))}else if(O!=null){if(O>=h()){F(h(!0)),v(100);return}if(O<=m()){F(m(!0)),v(0);return}R=x(O)}else return;n!=null?O=Math.round((O-m())/n)*n+m():a&&(O=a.reduce((A,W,G)=>{let S=W.value===1/0?h():W.value===-1/0?m():W.value,N=A.value===1/0?h():A.value===-1/0?m():A.value;return S=Math.abs(S-O),N=Math.abs(N-O),S<N?W:A}).value),O>=h()&&(O=h(!0)),O<=m()&&(O=m(!0)),R=x(O),F(O),v(R),i&&i(O)},[Q,z]=o.useState(0);o.useEffect(()=>{const R=()=>{E.current&&z(E.current.offsetWidth)};return R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}},[]);const $=R=>{switch(R.key){case"ArrowRight":if(n)V({value:g+n});else if(a){const O=a.find(A=>A.value>g);O&&V({value:O.value})}break;case"ArrowLeft":if(n)V({value:g-n});else if(a){const O=a.slice(0).reverse().find((A,W,G)=>g===1/0?W===1:A.value<g);O&&V({value:O.value})}break;default:return}};return l.jsxs("div",{tabIndex:0,onKeyDown:$,role:"slider","aria-valuemin":m(!0),"aria-valuemax":h(!0),"aria-valuenow":g,"aria-valuetext":g.toString(),className:j.slider,onMouseDown:M,onClick:X,ref:E,onTouchStart:M,onDragStart:R=>R.preventDefault(),...f,children:[l.jsx("input",{type:"hidden",name:s,value:g}),l.jsx("div",{className:j.activeTrack,style:{flex:I/100}}),l.jsx("div",{className:j.handle,children:l.jsx(Y.AnimatePresence,{children:b&&l.jsx(Y.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(g):g})})}),l.jsx("div",{className:j.inactiveTrack,style:{flex:1-I/100}}),l.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:a&&a.map((R,O)=>{let A=null;const W=(b?9:10)/Q*100,G=x(R.value);return G<=I-W?A=!0:G>=I+W&&(A=!1),l.jsx("div",{className:y(j.dot,{"bg-primary-container":A!=null&&A,"bg-primary":A!=null&&!A}),style:{left:`${x(R.value)}%`}},O)})})]})},Zs=({variant:e="standard",className:t,children:n,title:s,position:r="right",extended:u,divider:c,onExtendedChange:a,closeIcon:d=ke,transition:i,...f})=>{i={duration:.3,...i};const[x,h]=o.useState(u??!0),m=Kt({transition:i,title:s,position:r,closeIcon:d,className:t,children:n,onExtendedChange:a,divider:c,isExtended:x,extended:x,variant:e});o.useEffect(()=>{a==null||a(x??!1)},[x]),o.useEffect(()=>{u!=null&&h(u)},[u]);const p={close:{width:0},open:{width:"auto"}},b=()=>l.jsxs(l.Fragment,{children:[l.jsx(Y.AnimatePresence,{children:e=="modal"&&x&&l.jsx(Y.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:i,onClick:()=>h(!1),className:m.overlay})}),l.jsx(Y.AnimatePresence,{children:x&&l.jsxs("div",{...f,className:m.sideSheet,style:{transition:i.duration+"s"},children:[l.jsxs(Y.motion.div,{variants:p,initial:u===!1?"open":"close",animate:"open",exit:"close",className:m.container,children:[l.jsxs("div",{className:m.header,children:[s&&l.jsx("p",{className:m.title,children:s}),l.jsx(ge,{size:"small",label:"close",icon:d,onClick:()=>h(!1),className:m.closeButton})]}),l.jsx("div",{className:m.content,style:{transition:i.duration+"s"},children:n})]}),(c==null&&e=="standard"?!0:c)&&l.jsx(je,{className:m.divider,orientation:"vertical"})]})})]});return e=="modal"?Ve.createPortal(b(),document.body):b()},Qs=({message:e,className:t,duration:n,closeIcon:s=ke,onClose:r,...u})=>{const[c,a]=o.useState(!0),d=Qt({className:t,closeIcon:s,duration:n,isVisible:c,onClose:r,message:e});o.useEffect(()=>{n&&setTimeout(()=>{i()},n)},[n]);const i=()=>{a(!1),r==null||r()};return l.jsx(Y.AnimatePresence,{children:c&&l.jsx(Y.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:d.snackbar,...u,children:l.jsxs("div",{className:d.container,children:[l.jsx("p",{className:d.supportingText,children:e}),l.jsx(ge,{onClick:()=>i(),className:d.icon,icon:s,label:"close the snackbar"})]})})})},er=({selected:e=!1,className:t,activeIcon:n,disabled:s=!1,inactiveIcon:r,onChange:u,onClick:c,onKeyDown:a,ref:d,...i})=>{const[f,x]=o.useState(e);o.useEffect(()=>{x(e)},[e]);const h=E=>{s||(p(),c&&c(E))},m=E=>{s||((E.key===" "||E.key==="Enter")&&(E.preventDefault(),p()),a&&a(E))},p=()=>{x(!f),u==null||u(!f)},b=tn({className:t,isSelected:f,activeIcon:n,inactiveIcon:r,disabled:s,selected:f,onChange:u}),w=o.useRef(null),L=d||w;return l.jsxs(Y.motion.div,{role:"switch","aria-checked":f,tabIndex:s?-1:0,onKeyDown:m,onClick:h,ref:L,className:b.switch,...i,children:[l.jsx("input",{type:"hidden",value:f?"1":"0"}),l.jsxs(Y.motion.div,{layout:!0,style:{translate:f?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:b.handleContainer,children:[l.jsx("div",{className:b.handle,children:(f?n:r)&&l.jsx(le,{className:b.icon,icon:f?n:r})}),l.jsx("div",{className:b.handleStateLayer})]})]})},bn=({className:e,onClick:t,label:n,variant:s="primary",href:r,icon:u,selectedTab:c,setSelectedTab:a,tabsId:d,index:i,onTabSelected:f,scrollable:x=!1,selected:h=!1,children:m,ref:p,...b})=>{const w=o.useRef(null),L=p||w,E=n??(typeof m=="string"?m:void 0),[g,F]=o.useState(h);o.useEffect(()=>{h&&c==null?F(!0):F(c==i&&i!=null)},[c]),o.useEffect(()=>{c==i&&f&&f({ref:L,index:i||0,label:E,icon:u})},[c]);const I=r?"a":"button",v=D=>{a&&a(i??null),t&&t(D)},k=sn({className:e,onTabSelected:f,scrollable:x,selectedTab:c,index:i,tabsId:d,selected:g,variant:s,icon:u,label:E,isSelected:g,setSelectedTab:a,href:r});return l.jsxs(I,{...b,role:"tab","aria-selected":g,ref:L,href:r,className:k.tab,onClick:v,...b,children:[l.jsx(ue,{style:{transition:.3+"s"},className:k.stateLayer,colorName:s==="primary"&&g?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),l.jsxs("span",{className:k.content,children:[u&&l.jsx(le,{icon:u,className:k.icon}),l.jsx("span",{className:k.label,children:E}),g&&l.jsx(Y.motion.span,{layoutId:`underline-${d}`,className:k.underline,transition:{duration:.3}})]})]})},Ze=o.createContext(null),tr=({variant:e="primary",onTabSelected:t,children:n,className:s,selectedTab:r,setSelectedTab:u,scrollable:c=!1})=>{const a=o.useContext(Ze),[d,i]=o.useState(null);let f;r===0||r!=null?f=r:a?f=a.selectedTab:f=d;const x=u??(a==null?void 0:a.setSelectedTab)??i,h=o.Children.toArray(n).filter(L=>o.isValidElement(L)&&L.type===bn),m=o.useRef(null),p=L=>{if(t==null||t(L),c){const E=m.current,g=L.ref.current;if(E&&g){const F=g.offsetLeft+g.offsetWidth/2-E.offsetWidth/2;E.scrollTo({left:F,behavior:"smooth"})}}},b=o.useMemo(()=>(a==null?void 0:a.tabsId)??gn(),[a==null?void 0:a.tabsId]),w=on({children:n,onTabSelected:t,scrollable:c,selectedTab:f,setSelectedTab:x,className:s,variant:e});return l.jsx("div",{ref:m,role:"tablist",className:w.tabs,children:h.map((L,E)=>o.cloneElement(L,{key:E,index:E,variant:e,selectedTab:f,setSelectedTab:x,tabsId:b,onTabSelected:p,scrollable:c}))})},nr=({children:e,selectedTab:t,setSelectedTab:n,defaultTab:s=0})=>{const[r,u]=o.useState(s),c=o.useRef(null),a=t!==void 0?t:r,d=n??u,i=c.current!==null&&a!==null?a>c.current?1:-1:0;a!==c.current&&(c.current=a);const f=o.useId(),x=o.useMemo(()=>({selectedTab:a,setSelectedTab:d,previousTab:c.current,direction:i,tabsId:f}),[a,d,i,f]);return l.jsx(Ze.Provider,{value:x,children:e})},Sn=({children:e,className:t,isSelected:n=!1})=>{const s=un({children:e,className:t,isSelected:n});return l.jsx("div",{className:s.tabPanel,children:e})},sr=({children:e,className:t})=>{const n=o.useContext(Ze);if(!n)return console.warn("TabPanels must be used within a TabGroup"),null;const{selectedTab:s,direction:r,tabsId:u}=n,c=o.Children.toArray(e).filter(d=>o.isValidElement(d)&&d.type===Sn),a=an({children:e,className:t});return l.jsx("div",{className:a.tabPanels,children:l.jsx(Y.AnimatePresence,{initial:!1,custom:r,mode:"popLayout",children:c.map((d,i)=>s===i&&l.jsx(Y.motion.div,{custom:r,variants:{enter:f=>({x:f*100+"%",opacity:1}),center:{x:0,opacity:1},exit:f=>({x:f*-100+"%",opacity:1})},initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",stiffness:400,damping:40},role:"tabpanel","aria-labelledby":`tab-${u}-${i}`,children:o.cloneElement(d,{isSelected:!0})},i))})})},rr=({hasSelected:e})=>({datePicker:y("inline-flex flex-col bg-surface-container-high rounded-[28px] p-3 select-none","min-w-[320px]"),header:y("flex items-center justify-between h-12 mb-2 px-2"),monthNav:y("flex items-center justify-center w-10 h-10 rounded-full text-on-surface-variant hover:bg-on-surface-variant/8 transition-colors cursor-pointer"),monthLabel:y("text-label-large text-on-surface font-bold capitalize"),weekDays:y("grid grid-cols-7 mb-2"),weekDay:y("h-10 flex items-center justify-center text-body-small text-on-surface-variant"),daysGrid:y("grid grid-cols-7 row-auto gap-y-2"),dayCell:y("flex items-center justify-center h-10 p-0 relative"),dayButton:y("w-10 h-10 rounded-full flex items-center justify-center text-body-large transition-all duration-200 relative overflow-hidden z-10 outline-none")}),or=Z("datePicker",rr),En=({value:e,defaultValue:t,onChange:n,minDate:s,maxDate:r,shouldDisableDate:u,locale:c="default",weekStartDay:a=0,className:d,style:i,mode:f="single",...x})=>{const[h,m]=o.useState(()=>{const S=C=>C instanceof Date?C:Array.isArray(C)&&C[0]?C[0]:null,N=S(e)||S(t)||new Date;return new Date(N.getFullYear(),N.getMonth(),1)}),[p,b]=o.useState(0),[w,L]=o.useState("day"),E=e!==void 0,[g,F]=o.useState(t||null),I=E?e||null:g,v=(S,N)=>new Date(S,N+1,0).getDate(),k=o.useMemo(()=>{const S=h.getFullYear(),N=h.getMonth(),C=v(S,N),U=(new Date(S,N,1).getDay()-a+7)%7,J=[],te=v(S,N-1);for(let _=U-1;_>=0;_--)J.push({date:new Date(S,N-1,te-_),isCurrentMonth:!1});for(let _=1;_<=C;_++)J.push({date:new Date(S,N,_),isCurrentMonth:!0});const P=42-J.length;for(let _=1;_<=P;_++)J.push({date:new Date(S,N+1,_),isCurrentMonth:!1});return J},[h,a]),D=o.useMemo(()=>{const S=new Date().getFullYear(),N=S-100,C=S+100,q=[];for(let U=N;U<=C;U++)q.push(U);return q},[]),M=o.useRef(null);o.useEffect(()=>{if(w==="year"&&M.current){const S=M.current.querySelector('[data-selected="true"]');S&&S.scrollIntoView({block:"center"})}},[w]);const T=o.useMemo(()=>new Intl.DateTimeFormat(c,{month:"long",year:"numeric"}),[c]),j=o.useMemo(()=>new Intl.DateTimeFormat(c,{weekday:"narrow"}),[c]),X=o.useMemo(()=>{const S=new Date(2023,0,1+a);return Array.from({length:7}).map((N,C)=>{const q=new Date(S);return q.setDate(S.getDate()+C),j.format(q).charAt(0).toUpperCase()})},[j,a]),V=()=>{b(-1),m(S=>new Date(S.getFullYear(),S.getMonth()-1,1))},Q=()=>{b(1),m(S=>new Date(S.getFullYear(),S.getMonth()+1,1))},z=S=>{m(N=>new Date(S,N.getMonth(),1)),L("day")},$=(S,N)=>S?S.getDate()===N.getDate()&&S.getMonth()===N.getMonth()&&S.getFullYear()===N.getFullYear():!1,R=S=>$(new Date,S),O=S=>{let N=S;if(f==="single")N=S;else{const C=I,[q,U]=Array.isArray(C)?C:[null,null];!q||q&&U?N=[S,null]:S<q?N=[S,q]:N=[q,S]}E||F(N),n&&n(N)},A=S=>{if(f==="single")return{isSelected:$(I,S),isStart:!1,isEnd:!1,isInRange:!1};const N=Array.isArray(I)?I:[I,null],[C,q]=N,U=$(C,S),J=$(q,S);let te=!1;if(C&&q){const se=new Date(C.getFullYear(),C.getMonth(),C.getDate()).getTime(),P=new Date(q.getFullYear(),q.getMonth(),q.getDate()).getTime(),_=new Date(S.getFullYear(),S.getMonth(),S.getDate()).getTime();te=_>se&&_<P}return{isSelected:U||J,isStart:U,isEnd:J,isInRange:te}},W=or({hasSelected:!!I}),G={enter:S=>({x:S>0?"100%":"-100%",opacity:0}),center:{x:0,opacity:1},exit:S=>({x:S<0?"100%":"-100%",opacity:0})};return l.jsxs("div",{className:y(W.datePicker,d),style:i,...x,children:[l.jsxs("div",{className:W.header,children:[l.jsxs(me,{variant:"text",disableTextMargins:!0,size:"small",onClick:()=>L(S=>S==="day"?"year":"day"),className:"text-label-large font-bold capitalize text-on-surface hover:bg-surface-container-highest",children:[l.jsx("span",{className:"mr-2",children:w==="day"?T.format(h):h.getFullYear()}),l.jsx(le,{icon:vn,className:y("w-3 h-3 transition-transform duration-200 inline",w==="year"&&"rotate-180")})]}),w==="day"&&l.jsxs("div",{className:"flex items-center",children:[l.jsx(ge,{size:"xSmall",allowShapeTransformation:!1,onClick:V,icon:Ws,label:"Previous month",title:null}),l.jsx(ge,{size:"xSmall",allowShapeTransformation:!1,onClick:Q,icon:xn,label:"Next month",title:null})]})]}),w==="year"?l.jsx("div",{className:"h-[280px] overflow-y-auto grid grid-cols-3 gap-2 p-2 scrollbar-hide",ref:M,children:D.map(S=>l.jsx(me,{size:"small",variant:S===h.getFullYear()?"filled":"text",onClick:()=>z(S),"data-selected":S===h.getFullYear(),className:y("w-full",{"text-on-surface":S!==h.getFullYear()}),label:S.toString(),children:S},S))}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:W.weekDays,children:X.map((S,N)=>l.jsx("div",{className:W.weekDay,children:S},N))}),l.jsx("div",{className:"overflow-hidden relative min-h-[240px]",children:l.jsx(Y.AnimatePresence,{mode:"popLayout",initial:!1,custom:p,children:l.jsx(Y.motion.div,{custom:p,variants:G,initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",bounce:0,duration:.3},className:W.daysGrid,children:k.map((S,N)=>{if(!S.isCurrentMonth)return l.jsx("div",{className:W.dayCell},N);const{isSelected:C,isStart:q,isEnd:U,isInRange:J}=A(S.date),te=R(S.date),se=s&&S.date<s||r&&S.date>r||(u==null?void 0:u(S.date));return l.jsx("div",{className:y(W.dayCell,J&&"bg-primary/20",q&&(I==null?void 0:I[1])&&"bg-gradient-to-r from-transparent to-primary/20",U&&(I==null?void 0:I[0])&&"bg-gradient-to-l from-transparent to-primary/20"),children:l.jsx(me,{className:()=>({button:y("aspect-square h-[40px] p-0",{"text-on-surface":!C&&!te,"opacity-50":se}),stateLayer:y({"!bg-transparent":se})}),size:"small",allowShapeTransformation:!1,variant:y({filled:C,outlined:te,text:!C&&!te}),label:S.date.getDate().toString(),onClick:()=>O(S.date),disabled:se,children:S.date.getDate().toString()})},N)})},h.toISOString())})})]})]})},ir=({variant:e="filled",autoFocus:t,disabled:n=!1,errorText:s,placeholder:r,suffix:u,name:c,label:a,className:d,supportingText:i,trailingIcon:f,leadingIcon:x,type:h="text",multiline:m=!1,autoComplete:p="on",onChange:b,value:w,defaultValue:L,showSupportingText:E,id:g,style:F,ref:I,onFocus:v,onBlur:k,options:D,children:M,...T})=>{var nt;const j=o.useId(),X=g||j,V=`${X}-helper`,Q=w!==void 0,[z,$]=o.useState(L??""),R=Q?w:z,[O,A]=o.useState(!1),[W,G]=o.useState(!!(s!=null&&s.length)),S=o.useRef(null),N=I||S,C=o.useRef(null),q=o.useRef(null),U=o.useRef(null),J=E??(!!(s!=null&&s.length)||!!(i!=null&&i.length));o.useEffect(()=>{G(!!(s!=null&&s.length))},[s]);const te=()=>{N.current&&!O&&!n&&h!=="select"&&N.current.focus()};o.useEffect(()=>{if(!(!t||n)&&h!=="select"){const K=window.requestAnimationFrame(()=>{te()});return()=>window.cancelAnimationFrame(K)}},[t,n,N,h]),o.useEffect(()=>{O?(G(!1),v==null||v()):(s!=null&&s.length&&G(!0),k==null||k())},[O]);const se=K=>{const re=K.target.value;Q||$(re),G(!1),b&&b(K)},P=h==="date",[_,B]=o.useState(!1),[ee,oe]=o.useState(null),pe=o.useMemo(()=>{const K=String(R);if(!K)return null;const[re,xe,Ee]=K.split("-").map(Number);return re&&xe&&Ee?new Date(re,xe-1,Ee):null},[R]),Se=()=>{n||(_?B(!1):(oe(pe),B(!0)))};o.useEffect(()=>{_?A(!0):(!ae||!de)&&A(!1)},[_]),o.useEffect(()=>{if(!_)return;const K=fe=>{var Ne,Me;return fe?((Ne=C.current)==null?void 0:Ne.contains(fe))||((Me=U.current)==null?void 0:Me.contains(fe)):!1},re=fe=>{var st,rt;const Ne=fe.target,Me=(st=U.current)==null?void 0:st.contains(Ne),Rn=(rt=q.current)==null?void 0:rt.contains(Ne);!Me&&!Rn&&B(!1)},xe=fe=>{K(fe.target)||B(!1)},Ee=fe=>{fe.key==="Escape"&&B(!1)};return document.addEventListener("pointerdown",re),document.addEventListener("focusin",xe),document.addEventListener("keydown",Ee),()=>{document.removeEventListener("pointerdown",re),document.removeEventListener("focusin",xe),document.removeEventListener("keydown",Ee)}},[_]);const jn=()=>{const K=ee?ee.toLocaleDateString("en-CA"):"";Q||$(K),b&&b({target:{value:K,name:c,type:h}}),B(!1)},ae=h==="select",[de,De]=o.useState(!1),Ae=o.useRef(null),Qe=o.useMemo(()=>{if(ae&&D){const K=D.find(re=>String(re.value)===String(R));return K?K.label:R}return R},[R,ae,D]),et=()=>{n||(De(!de),A(!de))},tt=K=>{if(Q||$(String(K)),b){const re={target:{value:String(K),name:c,type:h}};b(re)}De(!1),A(!1)};o.useEffect(()=>{if(!de)return;const K=re=>{C.current&&!C.current.contains(re.target)&&Ae.current&&!Ae.current.contains(re.target)&&(De(!1),A(!1))};return document.addEventListener("mousedown",K),()=>{document.removeEventListener("mousedown",K)}},[de]);const ye=o.useMemo(()=>{if(f)return f;if(P)return As;if(ae)return de?Fs:vn},[f,P,ae,de]),Ln=P||ae?"[&::-webkit-calendar-picker-indicator]:hidden cursor-pointer selection:bg-transparent":"",ce=fn({showSupportingText:J,isFocused:O,showErrorIcon:W,disabled:n,name:c,label:a,autoComplete:p,className:d,onChange:b,placeholder:r,supportingText:i,type:h,leadingIcon:x,trailingIcon:ye,variant:e,errorText:s,value:String(Qe),suffix:u,multiline:m}),Mn=m?Pn:"input",In=m?{}:{type:ae?"text":h,readOnly:ae},Fe=O||typeof R=="string"&&R.length>0||h=="date"||ae&&de,Le=Fe&&e==="outlined",Cn=!Le;return l.jsxs("div",{ref:C,className:ce.textField,style:F,children:[l.jsxs("fieldset",{onClick:()=>{ae?et():te()},className:ce.content,role:"presentation",children:[l.jsx("div",{className:ce.stateLayer}),x&&l.jsx("div",{className:ce.leadingIcon,children:o.isValidElement(x)?x:l.jsx(le,{className:"w-5 h-5",icon:x})}),l.jsx(Y.motion.legend,{"aria-hidden":"true",variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:Le?"visible":"hidden",animate:Le?"visible":"hidden",className:"max-w-full ml-2 px-2 text-body-small h-0 overflow-hidden whitespace-nowrap",transition:{duration:.2},children:l.jsx("span",{className:"transform inline-flex -translate-y-1/2 opacity-0",children:a})}),l.jsxs("div",{className:"flex-1 relative",children:[Cn&&l.jsx(Y.motion.label,{htmlFor:X,className:y("absolute left-4 transition-all duration-300 pointer-events-none",{"text-body-small top-2":e=="filled"&&Fe,"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&Fe)}),transition:{duration:.3},layoutId:e==="outlined"?`${X}-label`:void 0,children:l.jsx("span",{className:ce.label,children:a})}),Le&&l.jsx(Y.motion.label,{htmlFor:X,className:y("absolute left-2 -top-3 px-1 text-body-small z-10",ce.label),layoutId:`${X}-label`,transition:{duration:.3},children:a}),l.jsx(Mn,{...T,ref:N,value:Qe,onChange:se,className:y(ce.input,Ln),id:X,name:c,placeholder:O?r??void 0:"",onFocus:()=>{ae||A(!0)},onBlur:()=>{ae||A(!1)},disabled:n,autoComplete:p,"aria-invalid":!!(s!=null&&s.length),"aria-describedby":J?V:void 0,...In})]}),l.jsx("div",{className:ce.activeIndicator}),!W&&l.jsxs(l.Fragment,{children:[ye&&l.jsx("div",{ref:P?q:void 0,onClick:K=>{K.stopPropagation(),P&&Se(),ae&&et()},className:y(ce.trailingIcon,(P||ae)&&"cursor-pointer"),children:l.jsx("div",{className:"flex items-center justify-center w-full h-full",children:o.isValidElement(ye)?ye:l.jsx(le,{className:"h-5",icon:ye})})}),!ye&&u&&l.jsx("span",{className:ce.suffix,children:u})]}),W&&l.jsx("div",{className:y(ce.trailingIcon,{" absolute right-0":!ye}),children:l.jsx(le,{className:"h-5 text-error",icon:Ps})})]}),J&&l.jsx("p",{className:ce.supportingText,id:V,children:s!=null&&s.length?s:i!=null&&i.length?i:" "}),P&&_&&l.jsx(l.Fragment,{children:l.jsx(be,{anchorRef:C,position:"bottom",children:l.jsxs("div",{ref:U,className:"z-50 shadow-xl rounded-[28px] bg-surface-container-high overflow-hidden",children:[l.jsx(En,{className:"",value:ee,onChange:oe}),l.jsxs("div",{className:"flex justify-end gap-2 p-4 pt-0",children:[l.jsx(me,{variant:"text",size:"small",onClick:()=>B(!1),children:"Cancel"}),l.jsx(me,{variant:"filled",size:"small",onClick:jn,children:"OK"})]})]})})}),ae&&de&&l.jsx(be,{anchorRef:C,position:"bottom",style:{width:(nt=C.current)==null?void 0:nt.offsetWidth},children:l.jsx("div",{ref:Ae,children:l.jsx(Ke,{className:"max-w-full",selected:R,children:M?o.Children.map(M,K=>o.isValidElement(K)&&K.type===Ie?o.cloneElement(K,{onClick:re=>{K.props.onClick&&K.props.onClick(re),tt(K.props.value??"")}}):K):D==null?void 0:D.map((K,re)=>K.type==="divider"?l.jsx(je,{className:"my-1"},re):K.type==="headline"?l.jsx(Ge,{label:K.label},re):l.jsx(Ie,{onClick:xe=>{K.onClick&&K.onClick(xe),tt(K.value??"")},...K,children:K.label},K.value??re))})})})]})},lr=({isSelected:e,icon:t,label:n,variant:s})=>({navigationRailItem:y(" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":s=="vertical","gap-0 h-[66px]":s=="horizontal"}),container:y(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":s=="horizontal","gap-0 ":s=="vertical","p-4":!n},n&&["px-4",{"py-1 ":s=="vertical","py-4 ":s=="horizontal"}]),stateLayer:y("rounded-full"),icon:y("size-6 flex"),label:y("w-fit mx-auto text-nowrap",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})}),ar=Z("navigationRailItem",lr),Nn=({label:e})=>l.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:l.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),kn=({className:e,onClick:t,label:n,variant:s="vertical",href:r,icon:u,selectedItem:c,setSelectedItem:a,index:d,onItemSelected:i,selected:f=!1,ref:x,transition:h,isExtended:m,iconSelected:p,style:b,extendedOnly:w,children:L,...E})=>{L&&(n=L);const g=o.useRef(null),F=x||g,[I,v]=o.useState(f);o.useEffect(()=>{f&&c==null?v(!0):v(c==d&&d!=null)},[c]),o.useEffect(()=>{c==d&&i&&i({ref:F,index:d||0,label:n,icon:u})},[c]);const k=r?"a":"button",D=T=>{a&&a(d??null),t&&t(T)},M=ar({isExtended:m,extendedOnly:w,className:e,onItemSelected:i,selectedItem:c,index:d,transition:h,selected:I,variant:s,icon:u,label:n,isSelected:I,setSelectedItem:a,href:r,children:n,iconSelected:p});return h={duration:.3,...h},w&&!m?null:l.jsxs(k,{...E,role:"tab","aria-selected":I,ref:F,href:r,className:M.navigationRailItem,onClick:D,style:{transition:h.duration+"s",...b},children:[l.jsxs(Y.motion.div,{style:{transition:s=="horizontal"?h.duration+`s, gap ${h.duration/2}s ${h.duration-h.duration/2}s`:h.duration+`s, gap ${h.duration/3}s ${h.duration-h.duration/3}s`},transition:h,className:M.container,children:[l.jsx(ue,{style:{transition:h.duration+"s"},className:M.stateLayer,colorName:y({"on-surface":!I,"on-secondary-container":I}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),u&&l.jsx(le,{icon:I?p:u,className:M.icon}),l.jsx(Y.AnimatePresence,{children:s=="horizontal"&&(()=>{const T={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 l.jsx(Y.motion.span,{initial:T,animate:j,exit:T,className:M.label,children:n})})()})]}),l.jsx(Y.AnimatePresence,{children:s=="vertical"&&(()=>{const T={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 l.jsx(Y.motion.span,{initial:j,animate:j,exit:T,className:M.label,transition:h,children:n})})()})]})},cr=({isExtended:e,alignment:t})=>({navigationRail:y("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:y("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:y(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),ur=Z("navigationRail",cr),dr=({variant:e="standard",onItemSelected:t,children:n,className:s,selectedItem:r,extended:u,alignment:c="top",menu:a={closed:{icon:Ts,label:"Open menu"},opened:{icon:ke,label:"Close menu"}},style:d,onExtendedChange:i,transition:f,setSelectedItem:x})=>{const[h,m]=o.useState(null),[p,b]=o.useState(u);let w;r==0||r!=null?w=r:w=h;const L=x||m,E=o.useRef(null),g=M=>{t==null||t(M)};function F(M){const T=[];return o.Children.forEach(M,j=>{o.isValidElement(j)&&j.type===o.Fragment?T.push(...F(j.props.children)):T.push(j)}),T}const I=F(n),v=I.filter(M=>o.isValidElement(M)&&M.type===Ce),k=ur({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:L,className:s,variant:e,extended:p,isExtended:p,alignment:c,menu:a,transition:f,onExtendedChange:i});f={duration:.3,...f};const D=o.useRef(!1);return D.current=!1,o.useEffect(()=>{i==null||i(p??!1)},[p]),l.jsxs("div",{style:{transition:f.duration+"s",...d},ref:E,className:k.navigationRail,children:[l.jsxs("div",{className:k.header,children:[l.jsx(ge,{onClick:()=>b(!p),label:p?a==null?void 0:a.opened.label:a==null?void 0:a.closed.label,className:k.menuIcon,icon:p?a.opened.icon:a==null?void 0:a.closed.icon}),v.length>0&&o.cloneElement(v[0],{transition:f,isExtended:p,className:"!shadow-none mx-5 "+v[0].props.className})]}),l.jsx("div",{className:k.segments,children:(()=>{let M=0;return I.map(T=>o.isValidElement(T)&&T.type===kn?o.cloneElement(T,{key:M,index:M++,variant:p?"horizontal":"vertical",selectedItem:w,setSelectedItem:L,onItemSelected:g,transition:f,extendedOnly:D.current,isExtended:p}):o.isValidElement(T)&&T.type===Ce?null:o.isValidElement(T)&&T.type===Nn?(D.current=!0,p?o.cloneElement(T,{}):null):T)})()}),l.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function fr(e){return we.defineConfig({variant:we.Variants.Udixio,...e,plugins:[new we.FontPlugin(e),new Oe.TailwindPlugin(e)]})}exports.AnchorPositioner=be;exports.AnimateOnScrollInit=ss;exports.Button=me;exports.Card=Cs;exports.Carousel=Rs;exports.CarouselItem=yn;exports.Checkbox=Os;exports.Chip=Be;exports.Chips=Gs;exports.ContextMenu=_s;exports.CustomScroll=vt;exports.DatePicker=En;exports.Divider=je;exports.Fab=Ce;exports.FabMenu=Ks;exports.Icon=le;exports.IconButton=ge;exports.Menu=Ke;exports.MenuGroup=He;exports.MenuHeadline=Ge;exports.MenuItem=Ie;exports.NavigationRail=dr;exports.NavigationRailItem=kn;exports.NavigationRailSection=Nn;exports.ProgressIndicator=pn;exports.RippleEffect=mt;exports.SideSheet=Zs;exports.Slider=Js;exports.SmoothScroll=Xn;exports.Snackbar=Qs;exports.State=ue;exports.Switch=er;exports.SyncedFixedWrapper=St;exports.Tab=bn;exports.TabGroup=nr;exports.TabPanel=Sn;exports.TabPanels=sr;exports.Tabs=tr;exports.TextField=ir;exports.ThemeProvider=Jn;exports.Tooltip=Je;exports.animateOnScroll=rs;exports.buttonStyle=os;exports.cardStyle=is;exports.carouselItemConfig=Ye;exports.carouselItemStyle=ls;exports.carouselStyle=as;exports.checkboxStyle=cs;exports.chipStyle=us;exports.chipsStyle=ds;exports.classNames=y;exports.classnames=yt;exports.createUseClassNames=Z;exports.customScrollStyle=xt;exports.defaultClassNames=ne;exports.defineConfig=fr;exports.dividerStyle=fs;exports.fabMenuStyle=ms;exports.fabStyle=hs;exports.getClassNames=Re;exports.iconButtonStyle=ps;exports.initAnimateOnScroll=_e;exports.menuGroupStyle=xs;exports.menuStyle=ys;exports.normalize=ve;exports.progressIndicatorStyle=vs;exports.sideSheetConfig=qe;exports.sideSheetStyle=Kt;exports.sliderConfig=Ue;exports.sliderStyle=ws;exports.snackbarStyle=bs;exports.switchStyle=Ss;exports.tabPanelStyle=js;exports.tabPanelsStyle=ks;exports.tabStyle=Es;exports.tabsStyle=Ns;exports.textFieldStyle=Ls;exports.toolStyle=Ms;exports.useButtonStyle=Nt;exports.useCardStyle=jt;exports.useCarouselItemStyle=Lt;exports.useCarouselStyle=It;exports.useCheckboxStyle=Rt;exports.useChipStyle=At;exports.useChipsStyle=Pt;exports.useClassNames=Wn;exports.useDividerStyle=Wt;exports.useFabMenuStyle=Ht;exports.useFabStyle=Ot;exports.useIconButtonStyle=zt;exports.useMenuGroupStyle=Ut;exports.useMenuStyle=Yt;exports.useProgressIndicatorStyle=Gt;exports.useSideSheetStyle=gs;exports.useSliderStyle=Jt;exports.useSnackbarStyle=Qt;exports.useStateStyle=bt;exports.useSwitchStyle=tn;exports.useTabPanelStyle=un;exports.useTabPanelsStyle=an;exports.useTabStyle=sn;exports.useTabsStyle=on;exports.useTextFieldStyle=fn;exports.useToolTipStyle=mn;exports.useTooltipTrigger=wn;