@zuzjs/ui 1.0.62 → 1.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import {f,e,g,d,h,c}from'./chunk-S3AC6XMO.js';export{e as PACKAGE_NAME,f as cleanProps,g as splitAtoms}from'./chunk-S3AC6XMO.js';import {createContext,forwardRef,useMemo,Fragment,useEffect,useRef,useImperativeHandle,useState,useCallback,createElement,isValidElement,useId,useLayoutEffect,useContext,useSyncExternalStore,startTransition}from'react';import {useDelayed,useScrollbar,useDebounce,useImage,useResizeObserver,useLineChart,useImageCropper,CropShape,useNetworkStatus,useIntersectionObserver,useCarousel,useTimer,useMediaPlayer,AnchorType,useAnchorPosition,KeyCode,useShortcuts,useCommandActions}from'@zuzjs/hooks';import {createPortal}from'react-dom';import {MD5,uuid,withPost,_ as _$1,clamp,timeSince,checkPasswordStrength,removeDuplicateWords,PubSub,toHash,numberInRange,copyToClipboard}from'@zuzjs/core';import {jsx,jsxs,Fragment as Fragment$1}from'react/jsx-runtime';import {addPropsToChildren}from'@zuzjs/core/react';import {startOfMonth,endOfMonth,startOfWeek,endOfWeek,eachDayOfInterval,format,isSameMonth,isSameDay,isToday,addHours,addDays,addWeeks}from'date-fns';var Or={Circle:"CIRCLE",Square:"SQUARE"},Tf={Default:"DEFAULT",Circle:"CIRCLE"},Pf={Light:"light",Dark:"dark",System:"system"},Fe={Default:"DEFAULT",Switch:"SWITCH"},vt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},xe=vt,St=AnchorType,Rf=St,q={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},If={Asc:"ASC",Desc:"DESC"},Ef={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Nf={Dots:"DOTS"},Xe={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN",NotEmpty:"NOT_EMPTY",NotMinusOne:"NOT_MINUS_ONE"},Ne={Success:"success",Error:"error",Warning:"warning",Info:"info"},oe={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},j={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInTopScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInBottomScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInLeft:"SLIDE_FROM_LEFT"},Bf={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},Be={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},at=Be,So={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Vr=So,kf={Bar:"BAR",Ring:"RING"},wo={Default:"range",Text:"number"},Co={Default:"DEFAULT",Card:"CARD"},zt={Gooey:"gooey"},we={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Dr=Symbol.for("zuz.global.map"),Hr=e=>{globalThis[Dr]=e;},ti=()=>globalThis[Dr]||{},To=e$1=>{let r=Array.isArray(e$1)?e$1.join(" "):e$1;if(!r||typeof r!="string")return "";let t=ti();return process.env.NODE_ENV==="development"&&Object.keys(t).length===0&&console.warn(`[${e}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),g(r).filter(Boolean).map(o=>{let s=o.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,l,f]=s;return g(f).map(c=>{let i=`${l}(${c})`;return t[i]||c}).join(" ")}return t[o]||o}).join(" ")},Yf=e=>{let r=Array.isArray(e)?e.join(" "):e;return !r||typeof r!="string"?"":To(r)},Ar=e=>{let r={};for(let t in e){let n=e[t];if(t.startsWith("--")){r[t]=n;continue}let o=d[t]?.toString()??t;if(o==="x"||o==="translateX"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${h.addUnitsSafely(t,n)} ${s[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${s[0]??"0px"} ${h.addUnitsSafely(t,n)}`;}else c.includes(o)?r[o]=h.addUnitsSafely(t,n):r[o]=n;}return r},Po=e=>{if(!e)return "linear";switch(e.toUpperCase()){case oe.Bounce:return "var(--bounce)";case oe.Liquid:return "var(--liquid)";case oe.Spring:return "var(--spring)";case oe.EaseInOut:return "ease-in-out";case oe.EaseOutBack:return "ease-out-back";default:return "linear"}},wt=(e,r=0,t=0)=>{let n={},o={},s=r||20,a=t||0;switch(e){case j.SlideInLeft:case j.SlideInRight:n={"--fx-x":e===j.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},o={"--fx-x":`${a}px`,opacity:1};break;case j.SlideInTop:case j.SlideInBottom:n={"--fx-y":e===j.SlideInTop?`-${s}px`:`${s}px`,opacity:0},o={"--fx-y":`${a}px`,opacity:1};break;case j.SlideInTopScale:case j.SlideInBottomScale:n={"--fx-y":e===j.SlideInTopScale?`-${s}px`:`${s}px`,scale:1.1},o={"--fx-y":`${a}px`,scale:1};break;case j.ScaleIn:n={scale:0,opacity:0},o={scale:1,opacity:1};break;case j.FadeIn:n={opacity:0},o={opacity:1};break}return {from:n,to:o}},jf=(e,r,t)=>{let{from:n,to:o}=wt(e);return r?{...n,...o}:t?n:o};var ri=(e,r)=>{let t=useRef([]),n=useRef(false);return useEffect(()=>{e?.when||(n.current=false);},[e?.transition]),useEffect(()=>{let o=r?.current;if(!o||!e||!e.clearAtEnd)return;let s=a=>{t.current.includes(a.propertyName)&&e.clearAtEnd===true&&(o.style.transform="",o.style.filter="",t.current.forEach(l=>o.style.removeProperty(l)));};return o.addEventListener("transitionend",s),()=>o.removeEventListener("transitionend",s)},[e,r]),useEffect(()=>{if(typeof window>"u"||!r?.current)return;let o=r.current;(e?.scroll||e?.mouse)&&(o.style.willChange="transform",o.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",o.style.transition=`translate 0.1s ${e.curve?Po(e.curve):"var(--spring)"}`);},[e,r]),useMemo(()=>{if(!e)return {style:{}};let{transition:o,from:s,to:a,exit:l,when:f,duration:c=.3,delay:i=0,curve:d,margin:u=0,offset:m=20,watch:g=[]}=e,w=f===false&&!n.current;f===true&&(n.current=true);let x={},{from:P,to:S}=o?wt(o,m,u):{from:s||{},to:a||{}};x=f===void 0?{...P,...S}:f?{...S}:l||P;let R=Po(d),h=[],v=Ar(x);t.current=Object.keys(v);let y={...v};return Object.keys(v).forEach(b=>{let E=b.startsWith("--")?"all":b;h.includes(E)||h.push(`${E} ${c}s ${R} ${i}s`);}),g.forEach(b=>{h.includes(b)||h.push(`${b} 0.1s ${R} 0s`);}),{style:{...y,transition:w?"none":h.join(", "),opacity:w?0:y.opacity,pointerEvents:w?"none":y.pointerEvents}}},[e,e?.when,e?.watch])},be=ri;var _t=null,ni=(e,r)=>{let{as:t,fx:n,busy:o=false,stripes:s,transition:a,skeleton:l,className:f$1,propsToRemove:c,draggable:i,dragOptions:d,style:u,...m}=e||{},g=typeof window<"u",w={},x={};if(i&&g&&!_t&&(import('@zuzjs/hooks').then(v=>{_t=v.useDrag;}).catch(v=>{console.error("Error loading useDrag:",v);}),_t)){let v=_t(d);w={onMouseDown:v.onMouseDown},x={transform:`translate(${v.position.x}px, ${v.position.y}px)`};}let P=[f$1,o===true?"--is-busy":"",s?`--has-stripes --stripes-${s}`:""].filter(Boolean).join(" "),S=a?{transition:a,duration:.3}:n||{},{style:R}=be(S,r),h=To(t??"");return {style:{...u,...R,...x},className:[P,h||"",l?.enabled?"--skeleton":"",i?"--draggable":""].join(" ").trim(),rest:{...w,...f(m,c?[...c,"skeleton"]:["skeleton"])}}},B=ni;var zr="(prefers-color-scheme: dark)",ii=typeof window>"u",Kr=createContext(void 0),No=e=>{let r=useContext(Kr);if(!r){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return r},Q=No,li=({children:e,storageKey:r="--ucs",forceTheme:t,zuzMap:n,...o})=>(n&&Hr(n),jsx(ci,{storageKey:r,forceTheme:t,...o,children:e})),ci=({children:e,storageKey:r,forceTheme:t,...n})=>{let[o,s]=useState(()=>t||_r(r,"system")),[a,l]=useState(()=>t||_r(r)),f=u=>(u||(u=window.matchMedia(zr)),u.matches?"dark":"light"),c=useCallback(u=>{let m=u=="system"?f():u,g=document.documentElement;g.setAttribute("color-scheme",m),g.style.colorScheme=m,l(m);},[f]),i=useCallback(u=>{s(u),localStorage.setItem(r,u),c(u);},[o]),d=useCallback(u=>{let m=f(u);l(m),o==="system"&&c("system");},[o]);return useEffect(()=>{o==null&&window.localStorage.getItem(r);},[o]),useEffect(()=>{window.matchMedia(zr).addEventListener("change",d);},[d]),useEffect(()=>{let u=m=>{m.key==r&&(m.newValue?i(m.newValue):i("system"));};return window.addEventListener("storage",u),()=>window.removeEventListener("storage",u)},[i]),useEffect(()=>{c(t||o||"system");},[o]),jsxs(Kr,{value:{colorScheme:o,resolvedScheme:a,setColorScheme:i,...n},children:[t?null:jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
1
+ import {f,e,g,d,h,c}from'./chunk-Y3JDFLHY.js';export{e as PACKAGE_NAME,f as cleanProps,g as splitAtoms}from'./chunk-Y3JDFLHY.js';import {createContext,forwardRef,useMemo,Fragment,useEffect,useRef,useImperativeHandle,useState,useCallback,createElement,isValidElement,useId,useLayoutEffect,useContext,useSyncExternalStore,startTransition}from'react';import {useDelayed,useScrollbar,useDebounce,useImage,useResizeObserver,useLineChart,useImageCropper,CropShape,useNetworkStatus,useIntersectionObserver,useCarousel,useTimer,useMediaPlayer,AnchorType,useAnchorPosition,KeyCode,useShortcuts,useCommandActions}from'@zuzjs/hooks';import {createPortal}from'react-dom';import {MD5,uuid,withPost,_ as _$1,clamp,timeSince,checkPasswordStrength,removeDuplicateWords,PubSub,toHash,numberInRange,copyToClipboard}from'@zuzjs/core';import {jsx,jsxs,Fragment as Fragment$1}from'react/jsx-runtime';import {addPropsToChildren}from'@zuzjs/core/react';import {startOfMonth,endOfMonth,startOfWeek,endOfWeek,eachDayOfInterval,format,isSameMonth,isSameDay,isToday,addHours,addDays,addWeeks}from'date-fns';var Or={Circle:"CIRCLE",Square:"SQUARE"},Ef={Default:"DEFAULT",Circle:"CIRCLE"},Nf={Light:"light",Dark:"dark",System:"system"},Fe={Default:"DEFAULT",Switch:"SWITCH"},vt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},xe=vt,St=AnchorType,Bf=St,kf={Top:"top",TopStart:"top-start",TopCenter:"top-center",TopEnd:"top-end",Bottom:"bottom",BottomStart:"bottom-start",BottomCenter:"bottom-center",BottomEnd:"bottom-end",Left:"left",LeftStart:"left-start",LeftCenter:"left-center",LeftEnd:"left-end",Right:"right",RightStart:"right-start",RightCenter:"right-center",RightEnd:"right-end"},U={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Lf={Asc:"ASC",Desc:"DESC"},Mf={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Of={Dots:"DOTS"},Xe={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN",NotEmpty:"NOT_EMPTY",NotMinusOne:"NOT_MINUS_ONE"},Ne={Success:"success",Error:"error",Warning:"warning",Info:"info"},oe={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},Q={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInTopScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInBottomScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInLeft:"SLIDE_FROM_LEFT"},Vf={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},Be={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},at=Be,So={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Vr=So,Df={Bar:"BAR",Ring:"RING"},wo={Default:"range",Text:"number"},Co={Default:"DEFAULT",Card:"CARD"},zt={Gooey:"gooey"},we={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Dr=Symbol.for("zuz.global.map"),Hr=e=>{globalThis[Dr]=e;},oi=()=>globalThis[Dr]||{},Po=e$1=>{let r=Array.isArray(e$1)?e$1.join(" "):e$1;if(!r||typeof r!="string")return "";let t=oi();return process.env.NODE_ENV==="development"&&Object.keys(t).length===0&&console.warn(`[${e}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),g(r).filter(Boolean).map(o=>{let s=o.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,l,u]=s;return g(u).map(c=>{let i=`${l}(${c})`;return t[i]||c}).join(" ")}return t[o]||o}).join(" ")},td=e=>{let r=Array.isArray(e)?e.join(" "):e;return !r||typeof r!="string"?"":Po(r)},Ar=e=>{let r={};for(let t in e){let n=e[t];if(t.startsWith("--")){r[t]=n;continue}let o=d[t]?.toString()??t;if(o==="x"||o==="translateX"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${h.addUnitsSafely(t,n)} ${s[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${s[0]??"0px"} ${h.addUnitsSafely(t,n)}`;}else c.includes(o)?r[o]=h.addUnitsSafely(t,n):r[o]=n;}return r},To=e=>{if(!e)return "linear";switch(e.toUpperCase()){case oe.Bounce:return "var(--bounce)";case oe.Liquid:return "var(--liquid)";case oe.Spring:return "var(--spring)";case oe.EaseInOut:return "ease-in-out";case oe.EaseOutBack:return "ease-out-back";default:return "linear"}},wt=(e,r=0,t=0)=>{let n={},o={},s=r||20,a=t||0;switch(e){case Q.SlideInLeft:case Q.SlideInRight:n={"--fx-x":e===Q.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},o={"--fx-x":`${a}px`,opacity:1};break;case Q.SlideInTop:case Q.SlideInBottom:n={"--fx-y":e===Q.SlideInTop?`-${s}px`:`${s}px`,opacity:0},o={"--fx-y":`${a}px`,opacity:1};break;case Q.SlideInTopScale:case Q.SlideInBottomScale:n={"--fx-y":e===Q.SlideInTopScale?`-${s}px`:`${s}px`,scale:1.1},o={"--fx-y":`${a}px`,scale:1};break;case Q.ScaleIn:n={scale:0,opacity:0},o={scale:1,opacity:1};break;case Q.FadeIn:n={opacity:0},o={opacity:1};break}return {from:n,to:o}},od=(e,r,t)=>{let{from:n,to:o}=wt(e);return r?{...n,...o}:t?n:o};var ni=(e,r)=>{let t=useRef([]),n=useRef(false);return useEffect(()=>{e?.when||(n.current=false);},[e?.transition]),useEffect(()=>{let o=r?.current;if(!o||!e||!e.clearAtEnd)return;let s=a=>{t.current.includes(a.propertyName)&&e.clearAtEnd===true&&(o.style.transform="",o.style.filter="",t.current.forEach(l=>o.style.removeProperty(l)));};return o.addEventListener("transitionend",s),()=>o.removeEventListener("transitionend",s)},[e,r]),useEffect(()=>{if(typeof window>"u"||!r?.current)return;let o=r.current;(e?.scroll||e?.mouse)&&(o.style.willChange="transform",o.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",o.style.transition=`translate 0.1s ${e.curve?To(e.curve):"var(--spring)"}`);},[e,r]),useMemo(()=>{if(!e)return {style:{}};let{transition:o,from:s,to:a,exit:l,when:u,duration:c=.3,delay:i=0,curve:d,margin:f=0,offset:m=20,watch:g=[]}=e,P=u===false&&!n.current;u===true&&(n.current=true);let x={},{from:T,to:S}=o?wt(o,m,f):{from:s||{},to:a||{}};x=u===void 0?{...T,...S}:u?{...S}:l||T;let R=To(d),h=[],v=Ar(x);t.current=Object.keys(v);let y={...v};return Object.keys(v).forEach(b=>{let E=b.startsWith("--")?"all":b;h.includes(E)||h.push(`${E} ${c}s ${R} ${i}s`);}),g.forEach(b=>{h.includes(b)||h.push(`${b} 0.1s ${R} 0s`);}),{style:{...y,transition:P?"none":h.join(", "),opacity:P?0:y.opacity,pointerEvents:P?"none":y.pointerEvents}}},[e,e?.when,e?.watch])},be=ni;var _t=null,si=(e,r)=>{let{as:t,fx:n,busy:o=false,stripes:s,transition:a,skeleton:l,className:u,propsToRemove:c,draggable:i,dragOptions:d,style:f$1,...m}=e||{},g=typeof window<"u",P={},x={};if(i&&g&&!_t&&(import('@zuzjs/hooks').then(v=>{_t=v.useDrag;}).catch(v=>{console.error("Error loading useDrag:",v);}),_t)){let v=_t(d);P={onMouseDown:v.onMouseDown},x={transform:`translate(${v.position.x}px, ${v.position.y}px)`};}let T=[u,o===true?"--is-busy":"",s?`--has-stripes --stripes-${s}`:""].filter(Boolean).join(" "),S=a?{transition:a,duration:.3}:n||{},{style:R}=be(S,r),h=Po(t??"");return {style:{...f$1,...R,...x},className:[T,h||"",l?.enabled?"--skeleton":"",i?"--draggable":""].join(" ").trim(),rest:{...P,...f(m,c?[...c,"skeleton"]:["skeleton"])}}},B=si;var zr="(prefers-color-scheme: dark)",li=typeof window>"u",Kr=createContext(void 0),No=e=>{let r=useContext(Kr);if(!r){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return r},j=No,ci=({children:e,storageKey:r="--ucs",forceTheme:t,zuzMap:n,...o})=>(n&&Hr(n),jsx(mi,{storageKey:r,forceTheme:t,...o,children:e})),mi=({children:e,storageKey:r,forceTheme:t,...n})=>{let[o,s]=useState(()=>t||_r(r,"system")),[a,l]=useState(()=>t||_r(r)),u=f=>(f||(f=window.matchMedia(zr)),f.matches?"dark":"light"),c=useCallback(f=>{let m=f=="system"?u():f,g=document.documentElement;g.setAttribute("color-scheme",m),g.style.colorScheme=m,l(m);},[u]),i=useCallback(f=>{s(f),localStorage.setItem(r,f),c(f);},[o]),d=useCallback(f=>{let m=u(f);l(m),o==="system"&&c("system");},[o]);return useEffect(()=>{o==null&&window.localStorage.getItem(r);},[o]),useEffect(()=>{window.matchMedia(zr).addEventListener("change",d);},[d]),useEffect(()=>{let f=m=>{m.key==r&&(m.newValue?i(m.newValue):i("system"));};return window.addEventListener("storage",f),()=>window.removeEventListener("storage",f)},[i]),useEffect(()=>{c(t||o||"system");},[o]),jsxs(Kr,{value:{colorScheme:o,resolvedScheme:a,setColorScheme:i,...n},children:[t?null:jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
2
2
  const themes = ['light', 'dark']
3
3
  let theme = localStorage.getItem(\`${r}\`) || "system";
4
4
  if (theme === "system") {
5
5
  theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
6
6
  }
7
7
  document.documentElement.setAttribute("color-scheme", theme);
8
- document.documentElement.style.colorScheme = theme;`}}),jsx(Bo,{children:e})]})},_r=(e,r)=>{if(ii)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||r};var Zr=({ref:e,...r})=>{let{style:t,...n}=r,{style:o,className:s,rest:a}=B(n);return jsx("span",{ref:e,style:t,className:s,...a})};Zr.displayName="Zuz.Span";var me=Zr;var Gr=forwardRef((e,r)=>{let{name:t,pathCount:n,variant:o,color:s,size:a,...l}=e,{variant:f}=Q(true),{className:c,style:i,rest:d}=B(l);return jsx("div",{style:{color:s,...i,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${o||f||q.Small} ${c}`.trim(),ref:r,...d,children:Array(n||0).fill(0).map((u,m)=>jsx(me,{className:`path${m+1}`},`${t}-layer-${m}`))})});Gr.displayName="Zuz.Icon";var te=Gr;var ve={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Ur=e=>{let{type:r,variant:t,color:n,...o}=e,{className:s,style:a,rest:l}=B(o),{spinner:f}=Q(true),c=()=>{switch(r||f?.type||ve.Simple){case ve.Simple:return null;case ve.Wave:return jsxs(Fragment$1,{children:[jsx(p,{as:"--bar --bar1"}),jsx(p,{as:"--bar --bar2"}),jsx(p,{as:"--bar --bar3"})]});case ve.Roller:return null}};return jsx(p,{className:`${s} --spinner --${(r||f?.type||ve.Simple).toLowerCase()} --${t||f?.variant||q.Small}`.trim(),style:{...a},...l,children:c()})};Ur.displayName="Zuz.Spinner";var Ce=Ur;var Wt={Loading:"loading",Normal:"normal"};var Xr=({ref:e,...r})=>{let{reset:t,kind:n="solid",variant:o,icon:s,iconSize:a,children:l,withLabel:f,spinner:c,state:i,disabled:d,...u}=r,{style:m,className:g,rest:w}=B(u),{variant:x}=Q(true);return jsxs("button",{className:removeDuplicateWords(`--button --${n} --${o||x} flex aic ${t?"":"jcc"} ${s?"--with-icon":""} ${g}`).trim().replace(/\s+/g," "),style:m,ref:e,disabled:i==Wt.Loading||r.skeleton?.enabled||d,...w,children:[i==Wt.Loading&&jsx(Ce,{variant:o||x,type:c||ve.Simple}),(!i||i==Wt.Normal)&&jsxs(Fragment$1,{children:[s&&jsx(te,{variant:a,name:s}),f===true?jsx(me,{children:l}):l]})]})};Xr.displayName="Zuz.Button";var _=Xr;var Yr=({ref:e,...r})=>{let{h:t,html:n,children:o,lines:s,tfx:a,delay:l=0,duration:f=.5,stagger:c=.05,repeat:i=true,reveal:d=false,hover:u=false,...m}=r,{style:g,className:w,rest:x}=B(m),P=useRef(null),[S,R]=useState(false),[h]=useIntersectionObserver([P],{threshold:[1]}),v=useMemo(()=>{if(g?.opacity!==void 0)return g.opacity;if(typeof r.as=="string"){let A=r.as.match(/opacity:([\d.]+)/);if(A)return A[1]}return 1},[r.as,g?.opacity]),y=useMemo(()=>a?u?S:d?h===1:true:false,[a,u,S,d,h]);useEffect(()=>{e&&(typeof e=="function"?e(P.current):e.current=P.current);},[e]);let b=`h${r.h||1}`,E=useMemo(()=>typeof o=="string"?o:Array.isArray(o)&&o.length===1&&typeof o[0]=="string"?o[0]:null,[o]),$=useMemo(()=>{let A=Array.isArray(r.as)?r.as.join(" "):r.as||"";return typeof A=="string"&&A.includes("text-clip")},[r.as]);useLayoutEffect(()=>{if(!$||!P.current||E===null)return;let A=P.current,M=0,O=0,F=()=>{let k=A.getBoundingClientRect(),X=getComputedStyle(A).backgroundImage,Y=k.width;A.querySelectorAll(".--fx-char").forEach(z=>{let W=z.getBoundingClientRect().left-k.left;z.style.backgroundImage=X,z.style.backgroundRepeat="no-repeat",z.style.backgroundSize=`${Y}px 100%`,z.style.backgroundPosition=`-${W}px 0`,z.style.backgroundClip="text",z.style.webkitBackgroundClip="text",z.style.color="transparent";});},Z=()=>{cancelAnimationFrame(M),cancelAnimationFrame(O),M=requestAnimationFrame(()=>{O=requestAnimationFrame(F);});};Z();let I=new ResizeObserver(Z);return I.observe(A),typeof document<"u"&&"fonts"in document&&document.fonts?.ready.then(Z),window.addEventListener("resize",Z),()=>{cancelAnimationFrame(M),cancelAnimationFrame(O),I.disconnect(),window.removeEventListener("resize",Z);}},[$,E,a,y]);let L=useMemo(()=>n?jsx(me,{dangerouslySetInnerHTML:{__html:n}}):a&&E!==null?E.split("").map((A,M)=>{let O=A===" ",Z=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":i?"infinite":"1";return jsx(me,{"data-char":A,className:`--fx-char -fx ${y?`--fx-${a}`:""}`,style:{"--delay":`${l+M*c}s`,"--duration":`${f}s`,"--iteration":Z,"--target-opacity":v,display:O?"inline":"inline-block",whiteSpace:"pre",opacity:!y&&a==="typewriter"?0:void 0},children:A},M)}):o,[o,n,a,E,y,l,c,f,i]);return jsx(b,{ref:P,onMouseEnter:()=>u&&R(true),onMouseLeave:()=>u&&R(false),style:a?{...g,display:a?"flex":g?.display,flexWrap:a?"wrap":g?.flexWrap,opacity:a&&!y?0:a?1:g?.opacity,transition:a?"opacity 0.4s ease":void 0}:g,className:`${w} ${a?"--text-fx -fx":""}`.trim(),...x,children:L})};Yr.displayName="Zuz.Text";var K=Yr;var wi=e=>{let{label:r,labelColor:t,icon:n,iconColor:o,index:s,className:a,onSelect:l}=e;return r=="-"?jsx(p,{className:"--line"}):jsxs(_,{reset:true,onClick:f=>l?.(e),className:`--item ${a||""}`.trim(),children:[jsx(p,{as:"--icon",children:jsx(te,{name:n,className:"--ico",style:o?{color:o}:{}})}),jsx(K,{className:"--lbl flex aic",style:t?{color:t}:{},children:r})]})},jr=wi;var en=({ref:e,...r})=>{let{id:t,as:n,fx:o,offsetX:s,offsetY:a,parent:l,event:f,arrow:c,when:i,items:d,header:u,footer:m,origin:g=St.TopRight,...w}=r,[x,P]=useState(false),[S,R]=useState(d||[]),{position:h,targetRef:v,calculatedAnchor:y}=useAnchorPosition(l?.current,f,{offsetX:s,offsetY:a,preferredAnchor:g}),E=l&&h.top>l.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",$=useMemo(()=>{let Z=y.toLowerCase();return Z.includes("left")?"--arrow-left":Z.includes("right")?"--arrow-right":"--arrow-center"},[y]),L=h.top!==0||h.left!==0;useEffect(()=>{i&&L?P(true):i||P(false);},[i,L]);let{className:A,style:M,rest:O}=B(w),F=be({...o?.transition?{transition:o.transition??j.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??oe.EaseInOut,duration:o?.duration??.05,when:x&&L});return jsxs(p,{ref:v,className:`--contextmenu ${c||l!=null?`--has-arrow ${E} ${$}`:""} abs flex cols ${A}`.trim(),"aria-hidden":!x,style:{...M,...F.style,top:h.top,left:h.left,visibility:L?"visible":"hidden",transformOrigin:y},...O,children:[typeof u=="function"?createElement(u):u,S.map((Z,I)=>jsx(jr,{...Z,index:I},`context-${Z.label.toLowerCase()}-${I}`)),typeof m=="function"?createElement(m):m]})};en.displayName="Zuz.ContextMenu";var Mo=en;var tn=forwardRef((e,r)=>{let{children:t,fx:n,when:o,fxDelay:s,fxStep:a,classToIgnore:l,...f}=e,c=Q(true),i=useDelayed(),d=n||c?.group?.fx,u=s||c?.group?.fxDelay,m=a||c?.group?.fxStep,g=l||c?.group?.classToIgnore||"-fx",w=useMemo(()=>d?addPropsToChildren(t,x=>{if(x.type===Fragment)return false;let P=x.props||{},S="fx"in P,R="tfx"in P,h=P.as?Array.isArray(P.as)?P.as.join(" "):P.as:P.className||"";return !(typeof h=="string"&&h.includes(g))&&(!S||R)},(x,P)=>{let S=(u??0)+x*(m??.1),R=P.props||{};return "tfx"in R?{delay:(R.delay??0)+S}:{fx:{...d,delay:S,when:o??(n?.when||i)}}}):t,[t,o,i,d,u,m,g,n]);return jsx(p,{className:"--group",ref:r,...f,children:w})});tn.displayName="Zuz.Group";var Oo=tn;var rn=forwardRef((e,r)=>{let{message:t,spinner:n,spinnerSize:o,color:s,when:a,hideMessage:l,...f}=e,{className:c,style:i,rest:d}=B(f),{spinner:u}=Q(true);return "when"in e&&e.when==false?null:jsxs(Oo,{fx:{transition:j.SlideInBottom,curve:oe.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${c}`.trim(),style:{...i,backgroundColor:"var(--cover-bg)"},...d,children:[jsx(Ce,{variant:o||u?.variant||q.Small,type:n||u?.type||ve.Simple}),!l&&jsx(K,{className:"--label",tfx:"fade",style:{color:"var(--cover-label)"},children:t||"loading"})]})});rn.displayName="Zuz.Cover";var Me=rn;var Vo=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(r){return this.stack[this.stack.length-1]===r}push(r){this.stack.includes(r)||(this.stack.push(r),this.updateScrollLock());}pop(r){this.stack=this.stack.filter(t=>t!==r),this.updateScrollLock();}handleEscape(){let r=this.stack[this.stack.length-1];return r?(r(),true):false}get count(){return this.stack.length}},ke=new Vo;var nn=forwardRef((e,r)=>{let{when:t,...n}=e;return jsx(p,{ref:r,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:j.FadeIn,when:t},...n})});nn.displayName="Zuz.Overlay";var Ye=nn;var $i=({action:e,render:r=true,message:t=""})=>jsx(p,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:r?t:null}),sn=$i;var zi=({action:e,actionPosition:r,dialogID:t,variant:n})=>jsx(p,{as:`--footer flex aic rel ${r?r==Vr.Center?"jcc":"":"jce"}`.trim(),children:e.map((o,s)=>jsx(_,{variant:n,onClick:a=>o.handler?o.handler():o.onClick?o.onClick():console.log("onClick Handler missing"),as:"--action",children:o.label},`dialog-${t}-action-${o.key}`))}),ln=zi;var _i={colorSchemeLight:jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsx("circle",{cx:"12",cy:"12",r:"5"}),jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),colorSchemeSystem:jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark:jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{d:"M17.919 8.18H6.079c-.96 0-1.44 1.16-.76 1.84l5.18 5.18c.83.83 2.18.83 3.01 0l1.97-1.97 3.21-3.21c.67-.68.19-1.84-.77-1.84z"})}),arrowUp:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{d:"M18.68 13.978l-3.21-3.21-1.96-1.97a2.13 2.13 0 00-3.01 0l-5.18 5.18c-.68.68-.19 1.84.76 1.84h11.84c.96 0 1.44-1.16.76-1.84z"})}),search:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children:jsx("path",{d:"M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14 s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0 C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z"})}),close:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),eye:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#333",d:"M12 20.5c-4.299 0-8.24-3.023-10.544-8.086a1 1 0 010-.828C3.759 6.523 7.701 3.5 12 3.5s8.24 3.023 10.544 8.086a1.001 1.001 0 010 .828 18.14 18.14 0 01-1.391 2.52 1 1 0 11-1.666-1.106A15.87 15.87 0 0020.529 12C18.543 7.92 15.379 5.5 12 5.5S5.457 7.92 3.471 12c1.986 4.08 5.15 6.5 8.529 6.5a7.964 7.964 0 005.036-1.92 1 1 0 111.265 1.55A9.94 9.94 0 0112 20.5z"}),jsx("path",{fill:"#333",d:"M12 16a4.004 4.004 0 01-3.929-4.756 1 1 0 011.965.375A2 2 0 1014 12a2.034 2.034 0 00-2.053-1.999 1.04 1.04 0 01-1.043-.947.963.963 0 01.902-1.05L12 8a4 4 0 010 8z"})]}),eyeSlash:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#333",d:"M12 15c-4.132 0-7.98-1.214-10.294-3.249a1 1 0 111.32-1.502C4.986 11.972 8.34 13 12 13s7.014-1.028 8.974-2.751a1 1 0 111.32 1.502C19.98 13.786 16.132 15 12 15z"}),jsx("path",{fill:"#333",d:"M12 18a1 1 0 01-1-1v-3a1 1 0 012 0v3a1 1 0 01-1 1zM7.749 17.667a.964.964 0 01-.17-.014 1 1 0 01-.817-1.155l.505-2.935a1 1 0 111.97.339l-.504 2.935a1 1 0 01-.984.83zM3.636 16.306a1.001 1.001 0 01-.942-1.336l.978-2.745a1 1 0 111.884.672l-.978 2.745a1 1 0 01-.942.664zM16.251 17.667a1 1 0 01-.984-.83l-.505-2.935a1 1 0 011.97-.339l.506 2.935a1 1 0 01-.816 1.155.964.964 0 01-.17.014zM20.364 16.306a1 1 0 01-.942-.664l-.978-2.745a1 1 0 111.884-.672l.978 2.745a1.001 1.001 0 01-.942 1.336z"})]}),check:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[Ne.Info]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{fill:"#292D32",d:"M21.56 10.738l-1.35-1.58c-.25-.3-.46-.86-.46-1.26v-1.7c0-1.06-.87-1.93-1.93-1.93h-1.7c-.4 0-.97-.21-1.27-.46l-1.58-1.35c-.69-.59-1.82-.59-2.51 0l-1.6 1.35c-.3.25-.86.46-1.26.46H6.17c-1.06 0-1.93.87-1.93 1.93v1.7c0 .39-.2.95-.45 1.25l-1.35 1.59c-.58.7-.58 1.82 0 2.5l1.35 1.59c.25.29.45.86.45 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.74c.39 0 .96.21 1.26.46l1.58 1.35c.69.59 1.82.59 2.51 0l1.58-1.35c.3-.25.86-.46 1.26-.46h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.4.21-.96.46-1.26l1.35-1.58c.61-.68.61-1.81.02-2.51zm-10.31-2.61c0-.41.34-.75.75-.75s.75.34.75.75v4.83c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-4.83zm.75 8.74c-.55 0-1-.45-1-1s.44-1 1-1c.55 0 1 .45 1 1s-.44 1-1 1z"})}),[Ne.Warning]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{fill:"#292D32",d:"M19.51 5.85l-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 00-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 001.57-2.73V8.58a3.192 3.192 0 00-1.58-2.73zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 01-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 01-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38z"})}),[Ne.Error]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[Ne.Success]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),volumeHigh:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{fill:"#292D32",d:"M22 11.25h-1.25V10c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.25H18c-.41 0-.75.34-.75.75s.34.75.75.75h1.25V14c0 .41.34.75.75.75s.75-.34.75-.75v-1.25H22c.41 0 .75-.34.75-.75s-.34-.75-.75-.75M14.02 3.782c-1.12-.62-2.55-.46-4.01.45l-2.92 1.83c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h1.4300000000000002c.23 0 .46.07.66.19l2.92 1.83c.88.55 1.74.82 2.54.82a3 3 0 0 0 1.47-.37c1.11-.62 1.73-1.91 1.73-3.63v-9.18c0-1.72-.62-3.01-1.73-3.63"})}),volumeMute:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#292D32",d:"M18 16.75a.75.75 0 0 1-.6-1.2 5.93 5.93 0 0 0 .72-5.84.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.02 2.42.67 5.23-.9 7.33-.15.19-.37.29-.6.29"}),jsx("path",{fill:"#292D32",d:"M19.828 19.25a.75.75 0 0 1-.6-1.2c2.14-2.85 2.61-6.67 1.23-9.96a.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.59 3.78 1.05 8.16-1.41 11.44-.14.2-.37.3-.6.3M14.04 12.958c.63-.63 1.71-.18 1.71.71v2.93c0 1.72-.62 3.01-1.73 3.63a3 3 0 0 1-1.47.37c-.8 0-1.66-.27-2.54-.82l-.64-.4c-.54-.34-.63-1.1-.18-1.55zM21.77 2.229c-.3-.3-.79-.3-1.09 0l-4.95 4.95c-.06-1.6-.66-2.8-1.72-3.39-1.12-.62-2.55-.46-4.01.45l-2.91 1.82c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h.16l-2.94 2.94c-.3.3-.3.79 0 1.09.16.14.35.22.55.22s.39-.08.54-.23l18.46-18.46c.31-.3.31-.78 0-1.08"})]}),plus:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},V=_i;var Ki=({title:e="Alert",onClose:r})=>jsxs(p,{as:"--head flex aic rel",children:[jsx(p,{as:`--${e?"title":"dot"} flex aic jcc rel`,children:e}),jsx(_,{onClick:t=>r(),className:"--closer abs center-v",children:V.close})]}),mn=Ki;var fn=({ref:e,...r})=>{let{index:t,id:n,title:o,message:s,transition:a,curve:l,speed:f,type:c,action:i,actionPosition:d,spinner:u,loadingMessage:m,variant:g,inBackground:w,forceClose:x,forceLoading:P,onClose:S,onShow:R,onHide:h,...v}=r,y=useMemo(()=>uuid(12),[]),[b,E]=useState(o||""),[$,L]=useState(s||""),[A,M]=useState(c||at.Dialog),[O,F]=useState(false),[Z,I]=useState(true),[k,X]=useState(i||null),[Y,H]=useState(false),{variant:z,spinner:G,dialog:W}=Q(true),ne=g||W?.variant||z||q.Small,{style:J,className:ae,rest:pe}=B(v),ye=useRef(null),ie=be({when:O,duration:f||W?.speed||.3,delay:W?.delay||.1,transition:a||W?.transition||j.SlideInBottom,curve:l||W?.curve||oe.EaseInOut,watch:["scale","filter","transform"]}),ce=()=>{F(false),S(n);},U=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{ke.isTop(ce)&&ce();}}],[O]);useShortcuts(U),useEffect(()=>{M(at.Dialog),L(s),E(b),k&&X(k.reduce((le,de)=>(le.push({...de,key:de.key||uuid(12)}),le),[])),F(true),setTimeout(()=>R?R():()=>{},500);},[]),useEffect(()=>{x&&ce();},[x]),useEffect(()=>{P!=null&&H(P);},[P]),useEffect(()=>(O?ke.push(ce):ke.pop(ce),()=>ke.pop(ce)),[O]);let re=useMemo(()=>1e4+t*10,[t]);return jsxs(Fragment$1,{children:[jsx(Ye,{style:{zIndex:re},when:O}),jsxs(p,{as:`--dialog --${(c??at.Default).toLowerCase()} ${O?"--visible":""} ${ae} fixed abc`.trim(),style:{...ie.style,zIndex:re+1,pointerEvents:w==true?"none":"auto",...w==true?{scale:"0.92",filter:"blur(2px)"}:{}},...pe,ref:ye,children:[jsx(mn,{title:b,onClose:ce}),jsx(sn,{message:$,render:Z,action:k}),k&&k.length>0&&jsx(ln,{variant:ne,action:k,dialogID:y,actionPosition:d}),jsx(Me,{when:Y,spinner:u||W?.spinner||G?.type||ve.Simple,message:m||W?.loadingMessage})]})]})};fn.displayName="Zuz.Dialog";var Ho=fn;var dn=forwardRef((e,r)=>{let{speed:t,smooth:n=false,breakpoints:o={},style:s,...a}=e,{rootRef:l,containerRef:f,thumbY:c,thumbX:i,onScrollY:d,onScrollX:u}=useScrollbar(t||1,o,n),{style:m,className:g,rest:w}=B(a);return useEffect(()=>{let x=f.current;if(!x)return;let P=()=>{window.dispatchEvent(new Event("resize"));},S=R=>{let h=R.target;if(h.closest(".--allow-scroll")){let y=h.closest(".--allow-scroll"),{scrollTop:b,scrollHeight:E,clientHeight:$}=y,L=R.deltaY<0,A=R.deltaY>0;(L&&b>0||A&&b+$<E)&&R.stopPropagation();}};return x.addEventListener("scroll",P),x.addEventListener("wheel",S,{passive:true}),()=>{x.removeEventListener("scroll",P),x.removeEventListener("wheel",S);}},[f]),jsxs(p,{ref:l,className:g.trim(),as:"--scrollview rel",children:[jsx(p,{as:`--scroll-content ${g}`.trim(),ref:f,style:s||{},children:w.children}),jsx(p,{as:"--scroll-track --track-y --abs",children:jsx(p,{as:"--scroll-thumb --abs",ref:c,onMouseDown:d})}),jsx(p,{as:"--scroll-track --track-x --abs",children:jsx(p,{as:"--scroll-thumb --abs",ref:i,onMouseDown:u})})]})});dn.displayName="Zuz.ScrollView";var Ao=dn;var gn=({ref:e,...r})=>{let{id:t,index:n,from:o,speed:s,children:a,margin:l,animation:f,prerender:c,inBackground:i,forceClose:d,forceLoading:u,onClose:m,...g}=r,{drawer:w}=Q(true),[x,P]=useState(a),[S,R]=useState(false),[h,v]=useState(c??(w?.prerender||true)),[y,b]=useState(false),E=()=>{R(false),m?.(t??-1);},{className:$,style:L,rest:A}=B(g),M=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{ke.isTop(E)&&E();}}],[S]);useShortcuts(M),useEffect(()=>{P(a);},[a]),useEffect(()=>(S?ke.push(E):ke.pop(E),()=>ke.pop(E)),[S]),useEffect(()=>{R(true);},[]),useEffect(()=>{d&&E();},[d]),useEffect(()=>{u!=null&&b(u);},[u]);let O=o||w?.from||we.Left,F=useMemo(()=>{switch(O){case we.Left:return {from:{x:"-100vw"},to:{x:0}};case we.Right:return {from:{x:"100vw"},to:{x:0}};case we.Top:return {from:{y:"-100vh"},to:{y:0}};case we.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,w?.from]),Z=be({from:{...F.from,opacity:0},to:{...F.to,opacity:1},when:S,curve:f||w?.animation||oe.EaseInOut,duration:s||w?.speed||.5,watch:["scale","filter"]}),I=useMemo(()=>1e4+(n||1)*10,[n]);return jsxs(Fragment$1,{children:[jsx(Ye,{onClick:k=>{S&&E();},when:S,style:{zIndex:I}}),jsxs(p,{ref:e,"aria-hidden":!S,className:`--drawer flex cols ${$} --${O.toLowerCase()} fixed`,style:{...L,...Z.style,"--m":`${l||w?.margin||0}px`,zIndex:I+1,pointerEvents:i==true?"none":"auto",...i==true?{scale:"0.92",filter:"blur(2px)"}:{}},...A,children:[o==we.Top||o==we.Bottom?jsx(p,{className:"--handle"}):null,jsx(_,{as:"--close-drawer --abs",onClick:E,children:V.close}),jsxs(Ao,{as:"rel",children:[h||S?x:null,jsx(Me,{when:y})]})]})]})};gn.displayName="Zuz.Drawer";var zo=gn;var yn=forwardRef((e,r)=>{let{progress:t,type:n,animated:o,...s}=e,a=useRef(null);useImperativeHandle(r,()=>({setProgress:i=>{a.current.style.width=`${i*100}%`,a.current.setAttribute("data-value",i+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),useEffect(()=>{t&&a.current&&(o?setTimeout(()=>a.current.style.width=`${t*100}%`,500):a.current.style.width=`${t*100}%`,a.current.setAttribute("data-value",t+""));},[t,a.current]);let{className:l,style:f,rest:c}=B(s);return jsx(p,{className:`--progress ${o?"--animated":""} flex rel ${l}`.trim(),style:f,...c,children:jsx(p,{ref:a,className:"--bar rel"})})});yn.displayName="Zuz.ProgressBar";var Qe=yn;var Yt=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Yt||{}),jt=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(jt||{}),xn=(t=>(t.Stack="stack",t.Individual="individual",t))(xn||{}),bn={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var al=e=>{let{index:r,id:t,type:n,icon:o,busy:s,width:a,title:l,message:f,duration:c,sticky:i=false,actions:d=[],position:u,style:m,isHovered:g,total:w,progress:x,progressValue:P,forceClose:S,variant:R,onClick:h,onClose:v}=e,[y,b]=useState(false),[E,$]=useState(false),{toast:L}=Q(true),A=typeof P=="number",M=A?Math.max(0,Math.min(1,P)):void 0,O=E||S,F=u??L?.position??"TopCenter",Z=n??L?.type??"default",I=m??L?.style??"stack",k=c??L?.duration??4,X=x??L?.progress??false,Y=useRef(k*1e3),H=useRef(void 0),z=useRef(void 0),G=useRef(null),W=be({when:y&&!O,duration:.3,transition:L?.transition||(F.includes("Top")?j.SlideInTop:F.includes("Bottom")?j.SlideInBottom:F.includes("Left")?j.SlideInLeft:j.SlideInRight),curve:L?.curve||oe.EaseInOut,watch:["transform","opacity","scale","filter"]});useEffect(()=>{b(true);let U=re=>{if(z.current!==void 0){let le=re-z.current;if(!A&&!g&&!i&&!O&&(Y.current-=le,G.current)){let de=Math.max(0,Y.current/(k*1e3)*100);G.current?.setProgress?.(de/100);}}z.current=re,Y.current<=0?$(true):H.current=requestAnimationFrame(U);};return H.current=requestAnimationFrame(U),()=>{H.current&&cancelAnimationFrame(H.current);}},[g,i,O,k]),useEffect(()=>{if(O){let U=setTimeout(()=>{v?.(t);},350);return ()=>clearTimeout(U)}},[O,t]);let ne=I==="stack",J=g?r*65:r*8,ae=g?1:Math.max(.85,1-r*.05),pe=g?1:Math.max(.4,1-r*.2),ye=U=>{h?h(U):s!==true&&(!d||d.length===0)&&$(true);},ie=W.style.transform||"translate(0, 0)",ce=O?ie:`${ie} translateY(${F.includes("Top")?J:-J}px) scale(${ae})`;return jsxs(p,{onClick:ye,as:`--snack --${O?"hidden":"visible"} --${R||L?.variant||q.Medium} --${Z} --${F.toLowerCase()} abs flex aic`,style:{...W.style,zIndex:1e3-r,pointerEvents:O?"none":"auto",opacity:O?W.style.opacity:pe,transform:ce,filter:!O&&ne&&!g&&r>0?"blur(1px)":"none",cursor:!d||d.length===0?"pointer":"default",transition:`${W.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxs(p,{as:"--ico flex aic jcc rel",children:[o?jsx(te,{name:o}):jsx(p,{as:"--no-icon"}),s===true&&jsx(Ce,{as:"abs abc"})]}),jsxs(p,{as:"--meta flex cols",style:a?{width:a,minWidth:a,maxWidth:a}:void 0,children:[jsx(K,{as:"--tt",children:l||bn[n]}),jsx(K,{as:"--tm",children:f})]}),d&&d.length>0&&jsx(p,{as:"--actions flex gap:5",children:d.map((U,re)=>jsx(_,{as:"--snack-btn bold",variant:q.XSmall,onClick:le=>{le.stopPropagation(),U.onClick(le);},children:U.label},re))}),(X||A)&&jsx(Qe,{as:"abs",progress:M,ref:G})]})},Ko=al;var Te=createContext(null),ul=({ref:e,...r})=>{let n=useContext(Te)?.depth??0,[o,s]=useState(null),[a,l]=useState(null),[f,c]=useState(false),[i,d]=useState([]),u=useDelayed(),m=useRef(0),g=()=>++m.current,w=()=>{c(false),setTimeout(()=>l(null),200);};useImperativeHandle(e,()=>({add(h){let v=g(),y={id:v,...h};return d(b=>[...b,y]),v},openMenu(h){c(false),setTimeout(()=>{l({id:g(),type:"menu",props:h}),c(true);},16);},update(h,v){d(y=>y.map(b=>b.id!==h?b:{...b,props:{...b.props,...v}}));},remove(h){d(v=>v.map(y=>y.id===h?{...y,props:{...y.props,forceClose:true}}:y)),a?.id===h&&w();},loading(h,v){d(y=>y.map(b=>b.id===h?{...b,props:{...b.props,forceLoading:v}}:b)),a?.id===h&&w();},clear(h){d(i.filter(v=>v.type!=h));}})),useEffect(()=>{if(a&&f){let h=()=>w();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[a,f,w]);let x=h=>{setTimeout(()=>{d(v=>v.filter(y=>y.id!==h)),a?.id===h&&l(null);},250);},P=useMemo(()=>[...i.filter(h=>h.type!="toast")],[i]);if(!u)return null;let S=i.filter(h=>h.type=="toast").reverse(),R=Object.values(jt);return createPortal(jsxs(p,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[P.map((h,v)=>{let y=v<P.length-1;return h.type==="dialog"?jsx(Ho,{onClose:x,index:v,id:h.id,...h.props,inBackground:y},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsx(zo,{onClose:x,index:v,id:h.id,...h.props,inBackground:y},`layer-${h.type}-${h.id}`):null}),R.map(h=>{let v=S.filter(y=>(y.props.position||"TopCenter")===h);return v.length===0?null:jsx(p,{onMouseEnter:()=>s(h),onMouseLeave:()=>s(null),as:`--toast-container fixed --${h.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:v.map((y,b)=>jsx(Ko,{index:b,total:v.length,isHovered:o===h,onClose:x,id:y.id,...y.props},y.id))},h)}),a&&jsx(p,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsx(Mo,{onClose:w,when:f,...a.props},`menu-${a.id}`)})]}),document.body)},fl=({children:e})=>{let r=useContext(Te),t=r?r.depth+1:0,n=useRef(null),o=useMemo(()=>({add:s=>n.current?.add(s),openMenu:s=>n.current?.openMenu(s),update:(s,a)=>n.current?.update(s,a),remove:s=>n.current?.remove(s),loading:(s,a)=>n.current?.loading(s,a),clear:s=>n.current?.clear(s),depth:t,isSubLayer:!!r}),[r]);return jsxs(Te.Provider,{value:o,children:[e,jsx(ul,{ref:n})]})},Bo=fl;var gl=()=>{let e=useContext(Te);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(n,o,s)=>{n.preventDefault(),e.openMenu({event:n,items:o,origin:s});},showMenu:(n,{items:o,origin:s,offsetX:a,offsetY:l,transition:f,curve:c,arrow:i,duration:d,header:u,footer:m})=>{e.openMenu({fx:{transition:f,curve:c,duration:d},parent:n,items:o,origin:s||St.TopCenter,offsetX:a,offsetY:l,arrow:i,header:u,footer:m});},hide:e.clear}},hl=gl;var xl=()=>{let e=useContext(Te);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("dialog"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a);return {clearAll:r,show:s=>{let a=e.add({type:"dialog",props:{...s,type:at.Dialog}});return {id:a,setLoading:l=>n(a,l),hide:()=>t(a)}},hide:t}},bl=xl;var Sl=()=>{let e=useContext(Te);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("drawer"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a),o=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:l=>n(a,l),close:()=>t(a)}};return {clearAll:r,open:s=>o({children:s}),right:s=>o({children:s,from:we.Right}),left:s=>o({children:s,from:we.Left}),top:s=>o({children:s,from:we.Top}),bottom:s=>o({children:s,from:we.Bottom}),close:t}},wl=Sl;var Tl=(e,r,t={})=>{let[n,o]=useState(null),[s,a]=useState(false),{duration:l=.25,curve:f=oe.EaseOutBack,borderRadius:c={from:40,to:24},targetWidth:i=320}=t;return useLayoutEffect(()=>{r&&e.current?(o(e.current.getBoundingClientRect()),a(true)):r||a(false);},[r,e]),{style:be({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:c.from},to:{opacity:1,width:i,height:"auto",borderRadius:c.to},curve:f,duration:l,when:s&&r}).style,isMeasured:s,sourceRect:n}},Pl=Tl;var Nl=(e,r={})=>{let{offset:t=8,direction:n="bottom",container:o=null,triggerRef:s=null}=r,a=useRef(null),l=useCallback(()=>{let f=e.current;if(!f)return;let c=s?.current||f.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=f.getBoundingClientRect(),d=c.getBoundingClientRect(),u,m;o?(u=o.getBoundingClientRect(),m="absolute"):(window.getComputedStyle(f).position==="fixed"?m="fixed":m="absolute",m==="fixed"?u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),f.style.position!==m&&(f.style.position=m),a.current=m;let x=0,P=0;switch(n){case "top":x=d.top-i.height-t,P=d.left,x<u.top&&d.bottom+i.height+t<=u.bottom&&(x=d.bottom+t);break;case "bottom":x=d.bottom+t,P=d.left,x+i.height>u.bottom&&d.top-i.height-t>=u.top&&(x=d.top-i.height-t);break;case "left":x=d.top,P=d.left-i.width-t,P<u.left&&d.right+i.width+t<=u.right&&(P=d.right+t);break;case "right":x=d.top,P=d.right+t,P+i.width>u.right&&d.left-i.width-t>=u.left&&(P=d.left-i.width-t);break}if(x=Math.max(u.top,Math.min(x,u.bottom-i.height)),P=Math.max(u.left,Math.min(P,u.right-i.width)),a.current==="fixed")f.style.top=`${x}px`,f.style.left=`${P}px`;else {let S;f.offsetParent?S=f.offsetParent.getBoundingClientRect():S={top:0,left:0};let R=x-S.top+window.scrollY,h=P-S.left+window.scrollX;f.style.top=`${R}px`,f.style.left=`${h}px`;}},[e,s,t,n,o]);return useEffect(()=>{let f=e.current;if(!f)return;let c=s?.current||f.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=new ResizeObserver(l);return i.observe(f),c&&i.observe(c),l(),window.addEventListener("resize",l),window.addEventListener("scroll",l,true),()=>{i.disconnect(),c&&i.disconnect(),window.removeEventListener("resize",l),window.removeEventListener("scroll",l,true);}},[e,n,t,o,s]),{postion:a.current,reposition:l}},It=Nl;var kl=()=>{let e=useContext(Te);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(m,g)=>e.add({type:"toast",props:{...g,type:m}}),t=()=>e.clear("toast"),n=m=>e.remove(m),o=(m,g)=>e.update(m,g),s=m=>({id:m,update:g=>o(m,g),setType:g=>o(m,{type:g}),setProgress:g=>o(m,{progress:true,progressValue:g}),setBusy:g=>o(m,{busy:g}),success:()=>o(m,{type:"success"}),error:()=>o(m,{type:"error"}),warn:()=>o(m,{type:"warn"}),promise:()=>o(m,{type:"promise"}),default:()=>o(m,{type:"default"}),hide:()=>n(m)}),a=m=>s(r("default",m)),l=m=>s(r("success",m)),f=m=>s(r("error",m)),c=m=>s(r("warn",m)),i=m=>s(r("promise",m)),d=(m,g,w)=>{let x=r(m,{...g,sticky:g.sticky??false,actions:[{label:w?.label||"Ok",onClick:P=>{w?.onClick?.(P),n(x);}}]});return s(x)},u=(m,g,w,x)=>{let P=r(m,{...g,sticky:true,actions:[{label:w?.label||"Ok",onClick:S=>{w?.onClick?.(S),(w?.hide??false)===true&&n(P);}},{label:x?.label||"Cancel",onClick:S=>{x?.onClick?.(S),(x?.hide??true)===true&&n(P);}}]});return s(P)};return {show:a,hide:n,promise:i,clearAll:t,ok:(m,g)=>d("default",m,g),success:(m,g)=>g?d("success",m,g):l(m),error:(m,g)=>g?d("error",m,g):f(m),confirm:(m,g,w)=>u("default",m,g,w),warn:(m,g)=>g?d("warn",m,g):c(m),succes:(m,g)=>g?d("success",m,g):l(m)}},Ll=kl;var Ol=()=>{let e=useContext(Te);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(c,i)=>e.add({type:"toast",props:{...i,type:c}});return {show:(c,i,d,u)=>r("default",{title:c,message:i,icon:d,duration:u}),hide:c=>e.remove(c),success:(c,i,d,u)=>r("success",{title:c,message:i,icon:d,duration:u}),error:(c,i,d,u)=>r("error",{title:c,message:i,icon:d,duration:u}),warn:(c,i,d,u)=>r("warn",{title:c,message:i,icon:d,duration:u}),promise:(c,i,d,u)=>r("promise",{title:c,message:i,icon:d,duration:u}),clearAll:()=>e.clear("toast")}},Zo=Ol;var In=({ref:e,style:r,...t})=>{let n=useRef(null),o=useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:l}=B(t,o);return jsx("div",{ref:e||n,style:{...s,...r||{}},className:a,...l})};In.displayName="Zuz.Box";var p=In;var Nn=forwardRef((e,r)=>{let{title:t,message:n,...o}=e,[s,a]=useState(false);return jsxs(p,{className:"--accordion flex cols",...o,children:[jsxs(_,{onClick:l=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsx(K,{className:"--label flex",children:t}),jsx(p,{className:"--arrow flex",children:s?V.arrowUp:V.arrowDown})]}),s&&jsx(p,{className:"--detail",children:n})]})});Nn.displayName="Zuz.Accordion";var Fl=Nn;var zl=({label:e,icon:r,onClick:t,idx:n,selected:o})=>jsx(_,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof r=="string"?jsx(te,{name:r}):r}),kn=zl;var Ln=forwardRef((e,r)=>{let{items:t,name:n,selected:o,position:s,...a}=e,l=useRef(null),[f,c]=useState(o||t[0].tag||0),i=useCallback(({x,y:P})=>{if(l.current){let S=l.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-S.left}`),document.documentElement.style.setProperty("--tip-y",`${P-S.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),d=useCallback(()=>{l.current&&(l.current.removeEventListener("pointerleave",d),l.current.removeEventListener("pointermove",i),document.documentElement.style.setProperty("--tip-s","0"));},[]),u=useCallback(()=>{l.current&&(l.current.addEventListener("pointerleave",d),l.current.addEventListener("pointermove",i));},[]);useEffect(()=>{l.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,P)=>P.label.length>x.length?P.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),l.current?.addEventListener("pointerenter",u));},[]);let{className:m,style:g,rest:w}=B(a);return jsxs(p,{ref:l,style:g,className:[`--actionbar flex aic ${m}`,`${!s||s==xe.Auto?"rel":`--${s}`}`].join(" ").trim(),...w,children:[t.map((x,P)=>jsx(kn,{selected:f===x.tag||o==P,...x,idx:P},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsx(p,{className:"--tip abs",children:jsx(p,{className:"--track flex aic",children:t.map(({label:x})=>jsx(p,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Ln.displayName="Zuz.ActionBar";var Gl=Ln;var On=forwardRef((e,r)=>{let{type:t,icon:n,title:o,message:s,iconSize:a,...l}=e,{className:f,style:c,rest:i}=B(l);return jsxs(p,{className:`--alert --${t||Ne.Info} flex aic ${f}`.trim(),style:c,...i,children:[jsx(p,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&V[t||Ne.Info]}),jsxs(p,{className:"--meta flex cols",children:[jsx(K,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsx(K,{className:"--message",h:2,children:s})]})]})});On.displayName="Zuz.Alert";var Xl=On;var Et=createContext(null),Yo=()=>{let e=useContext(Et);return e?useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},Nt=()=>useContext(Et),Dn=()=>()=>{},Hn=e=>{let r=useContext(Et);return useSyncExternalStore(r?.subscribe??Dn,()=>{if(!(!r||!e))return r.getSnapshot().values?.[e]},()=>{})},An=e=>{let r=useContext(Et);return useSyncExternalStore(r?.subscribe??Dn,()=>!r||!e?null:r.getSnapshot().errors?.[e]??null,()=>null)},it=()=>{let e=Nt(),r=Yo();return {...e,...r}},$n=({children:e,initialValues:r={}})=>{let t=useRef({values:r,errors:{},touched:{}}),n=useRef(new Set(Object.keys(r))),o=useRef(new Set),s=useCallback(()=>t.current,[]),a=useCallback(c=>(o.current.add(c),()=>o.current.delete(c)),[]),l=()=>{o.current.forEach(c=>c());};useEffect(()=>{if(!r||Object.keys(r).length===0)return;let c=new Set(Object.keys(r)),i=[...n.current].filter(P=>!c.has(P)),d={...t.current.values};i.forEach(P=>delete d[P]);let u={...d,...r},m=t.current.values||{},g=Object.entries(u),w=Object.entries(m),x=g.length!==w.length||g.some(([P,S])=>m[P]!==S);n.current=c,x&&(t.current={...t.current,values:u},l());},[r]);let f=useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(c,i)=>{t.current.values[c]!==i&&(t.current={...t.current,values:{...t.current.values,[c]:i}},l());},deleteFieldValue:c=>{if(!(c in t.current.values))return;let{[c]:i,...d}=t.current.values;t.current={...t.current,values:d},l();},setFieldError:(c,i)=>{t.current={...t.current,errors:{...t.current.errors,[c]:i}},l();},reset:()=>{t.current={values:{},errors:{},touched:{}},l();}}),[]);return jsx(Et.Provider,{value:f,children:e})};var zn=({ref:e,...r})=>{let{variant:t,numeric:n,name:o,onConfirm:s,...a}=r,{style:l,className:f,rest:c}=B(a),{variant:i}=Q(true),d=useRef(null),u=it(),m=o?u.errors?.[o]:null,g=o&&u.values&&u.setFieldValue,w=g?u.values?.[o]:void 0,x=useDebounce(S=>{g&&u.setFieldValue?.(o,S);},500),P=S=>{let R=S.currentTarget.value;n&&(R=R.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),S.currentTarget.value=R),x(R),r.onInput?.(S);};return useEffect(()=>{d.current&&o&&w!==void 0&&d.current.value!==String(w)&&(d.current.value=String(w));},[w,o]),useEffect(()=>()=>{g&&u.deleteFieldValue?.(o);},[]),jsx("input",{name:o,className:`--input --${t||i} ${m?"--has-error":""} --flex ${f}`.trim(),style:l,defaultValue:w??r.defaultValue??"",onInput:P,onKeyDown:S=>{S.key=="Enter"&&s?.(S.currentTarget.value);},ref:S=>{d.current=S,typeof e=="function"?e(S):e&&(e.current=S);},...c})};zn.displayName="Zuz.Input";var fe=zn;var Kn=e=>{let{meta:r,children:t}=e,n=useDelayed(),{label:o,icon:s,...a}=isValidElement(r)?{}:r,{className:l,style:f,rest:c}=B({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return isValidElement(r)?jsx("li",{style:f,className:l,children:r}):jsxs("li",{style:f,className:l,...c,children:[t,typeof r=="string"?r:o]})};Kn.displayName="Zuz.ListItem";var Zn=Kn;var Gn=forwardRef((e,r)=>{let{items:t,variant:n,direction:o,seperator:s,ol:a,...l}=e,{className:f,style:c,rest:i}=B(l),d=a==true?"ol":"ul";return createElement(d,{className:`--list --${n||q.Small} flex ${o??"cols"} ${f}`.trim(),style:c,ref:r,...i,children:t.map((u,m,g)=>{let w=`${typeof u=="string"?`li-${String(u)}`:isValidElement(u)?`li-${u.key}`||`${m}-${MD5(u.toString())}`:u.label}-${m}`;return jsxs(Fragment,{children:[jsx(Zn,{meta:u}),s&&g[m+1]?jsx("li",{className:"--list-seperator",children:s},`spt-${m+1}-${w}`):null]},w)})})});Gn.displayName="Zuz.List";var et=Gn;var qn=forwardRef((e,r)=>{let{fx:t,action:n,data:o,withStyle:s,onChange:a,...l}=e,{className:f}=B({as:s||""}),{style:c}=B(l),[i,d]=useState(false),[u,m]=useState(o||[]),g=useRef(null),w=useRef(null),x=useRef(null),P=useMemo(()=>l.name||uuid(12),[]),[S,R]=useState(null),[h,v]=useState(null),[y,b]=useState([]),$=useDebounce(I=>{I.target.value==""?(d(false),m([])):n&&I.target.value.trim()!=""&&withPost(n,{query:I.target.value}).then(k=>{"items"in k&&_$1(k.items).isArray()?(m(k.items),v(I.target.value),b(k.items)):console.error("Action Response should contain items array"),R(null);}).catch(k=>{R(null),m([]);});},250),L=()=>{if(w.current){let I=w.current.getBoundingClientRect(),k=window.innerHeight-I.bottom,X=I.top;if(x.current){let Y=x.current;k<Y.offsetHeight&&X>k?(Y.style.top="auto",Y.style.bottom=`${I.height}px`,Y.style.maxHeight=`${X-150}px`):(Y.style.top=`${I.height+5}px`,Y.style.bottom="auto",Y.style.maxHeight=`${k-150}px`);}}},A=I=>{if(u.length>0){if((I.key==="ArrowDown"||I.key==="ArrowUp")&&(I.preventDefault(),I.stopPropagation()),I.key==="Escape")R(null),d(false),m([]);else if(I.key==="ArrowDown")R(k=>{let X=k===null||k===u.length-1?0:k+1;return O(X),X});else if(I.key==="ArrowUp")R(k=>{let X=k===null||k===0?u.length-1:k-1;return O(X),X});else if(I.key==="Enter"&&S!==null){let k=u[S];g.current&&(g.current.value=k,d(false),m([]));}}},M=I=>{g.current&&(g.current.value=I,d(false),m([]));},O=I=>{let k=u[I];if(k&&g.current&&(g.current.value=k,g.current.setSelectionRange(k.length,k.length)),x.current){let Y=x.current.children[I];Y&&Y.scrollIntoView({block:"nearest"});}},F=I=>{w.current&&!w.current.contains(I.target)&&(d(false),m([]));},Z=()=>{g.current&&g.current.value===h&&(m(y),R(null),L());};return useEffect(()=>(window.addEventListener("resize",L),window.addEventListener("scroll",L,true),document.addEventListener("mousedown",F),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,true),document.removeEventListener("mousedown",F);}),[]),useEffect(()=>{L();},[u]),jsxs(p,{style:c,ref:w,className:`--autocomplete --${e.size||q.Small} flex aic rel ${f}`.trim(),children:[jsx(fe,{ref:g,autoComplete:"off",onChange:$,onKeyDown:A,onFocus:Z,...l}),jsx(p,{className:"--arrow rel flex aic jcc",children:u.length>0?V.arrowUp:V.arrowDown}),u.length>0&&jsx(et,{id:P,ref:x,className:"--suggestion-list flex cols abs",items:u.map((I,k)=>({label:I,onClick:X=>{X.preventDefault(),X.stopPropagation(),M(I);},className:S===k?"--current":"",animate:{transition:j.SlideInBottom,curve:oe.EaseInOut,delay:clamp(.02*k,.02,.5)}}))})]})});qn.displayName="Zuz.AutoComplete";var bc=qn;var Xn=forwardRef((e,r)=>{let t=useRef(null),n=useMemo(()=>r&&typeof r!="function"&&r.current?r:t,[r]),{style:o,className:s,rest:a}=B(e,n);return !a.src||a.src==""?null:jsx("img",{ref:n,style:o,className:`${s} flex`,...a})});Xn.displayName="Zuz.Image";var tt=Xn;var Yn=forwardRef((e,r)=>{let{src:t,variant:n,type:o,crossOrigin:s,referrerPolicy:a,fx:l,as:f,alt:c,color:i,style:d,...u}=e,[m,g,w]=useImage(t??"",s,a),{className:x,style:P,rest:S}=B({fx:l,as:f});return jsx(p,{className:`--avatar --${n||q.Small} --${(o||Or.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:i||"var(--avatar-bg, var(--primary))",...d,...P},...S,children:t?jsx(tt,{src:m,crossOrigin:s,referrerPolicy:a,...u}):jsx(K,{className:"--avatar-label",children:(c?c.charAt(0):"A").toUpperCase()})})});Yn.displayName="Zuz.Avatar";var Ic=Yn;var Ec=({size:e=5,type:r="dead",label:t="",variant:n=q.Small,loading:o=false,spinner:s,...a})=>{let{style:l,className:f,rest:c}=B(a);return jsxs(p,{style:{..._$1(t).isEmpty()?{"--badge-size":e}:{},...l},as:`--badge --${n} --${r} rel flex aic jcc ${f}`.trim(),children:[jsx(p,{fx:{transition:j.FadeIn,curve:oe.Liquid,duration:.5,when:o},as:"abs abc",children:jsx(Ce,{type:s})}),_$1(t).isEmpty()?jsx(p,{as:`--dot --${r}`}):jsx(K,{as:"--label",children:t})]})},Nc=Ec;var Kc=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>format(addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>addDays(new Date,1),getDateFormat:()=>format(addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let e=new Date,r=e.getDay();return addDays(e,(6-r)%7||6)},getDateFormat:()=>{let e=new Date,r=e.getDay();return format(addDays(e,(6-r)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>format(addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>format(addWeeks(new Date,1),"d MMM"),getDate:()=>addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>format(addWeeks(new Date,2),"d MMM"),getDate:()=>addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>format(addWeeks(new Date,4),"d MMM"),getDate:()=>addWeeks(new Date,4)}],Zc=e=>{let r=new Set;return e.filter(t=>{if(t.label=="Later")return true;let n=t.getDate().toISOString().split("T")[0];return r.has(n)?false:(r.add(n),true)})},Qn=forwardRef((e,r)=>{let{defaultValue:t,variant:n,onChange:o,...s}=e,{style:a,className:l,rest:f}=B(s),[c,i]=useState(t||new Date),d=startOfMonth(c),u=endOfMonth(c),m=startOfWeek(d),g=endOfWeek(u),w=useMemo(()=>eachDayOfInterval({start:m,end:g}),[m,g]),x=R=>{o?.(R),i(R);},P=()=>{i(R=>new Date(R.getFullYear(),R.getMonth()-1));},S=()=>{i(R=>new Date(R.getFullYear(),R.getMonth()+1));};return jsxs(p,{as:`--calendar flex --${n||"sm"} ${l}`,style:a,children:[jsx(p,{as:"--calendar-quick-select flex cols flex:1",children:Zc(Kc).map(R=>{let h=R.getDate();return jsxs(_,{onClick:()=>x(h),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(K,{as:"flex:1",children:R.label}),jsx(K,{as:"tar",children:R.getDateFormat()})]},`--dtp-option-label-${R.label}`)})}),jsxs(p,{as:"--calendar-selector flex cols flex:1",children:[jsxs(p,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(K,{as:"flex:1 --calendar-cm bold",children:format(c,"MMMM yyyy")}),jsx(_,{onClick:P,as:"--calendar-chevron",children:V.chevronUpOutline}),jsx(_,{onClick:S,as:"--calendar-chevron",children:V.chevronDownOutline})]}),jsxs(p,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(R=>jsx(K,{as:"--calendar-day",children:R},`--calendar-hd-${R}`)),w.map((R,h)=>{let v=isSameMonth(R,c),y=isSameDay(R,c),b=isToday(R);return jsx(_,{disabled:!v,onClick:()=>x(R),as:["--calendar-day --calendar-dd",`${y?"--calendar-dd-selected":""}`,`${b?"--calendar-dd-current":""}`],children:format(R,"d")},`--calendar-day-${h}-${R.getFullYear()}-${R.getMonth()}-${R.getDay()}`)})]})]})]})});Qn.displayName="Zuz.Calendar";var er=Qn;var no=(t=>(t.Table="table",t.Gooey="gooey",t))(no||{});var os=({ref:e,...r})=>{let{itemCount:t,itemsPerPage:n,startPage:o,pageRange:s,paginationStyle:a,breakLabel:l,prevLabel:f,nextLabel:c,hash:i,loading:d,seperator:u,renderOnZeroPageCount:m,asDots:g,progressBar:w,onPageChange:x,...P}=r,S=useRef(null),R=useMemo(()=>toHash(numberInRange(4,8)),[]),h=useCallback(I=>`${toHash(I,i||6,R)}${u||""}${R}`,[R]),v=useMemo(()=>l||"...",[l]),y=useRef(null),[b,E]=useState({id:i?o?typeof o=="number"?h(o):o:1:o||1,label:o||1});useImperativeHandle(e,()=>({setPage:I=>E(I),getPage:I=>b,setProgress:I=>y.current?.setProgress?.(I),getProgress:()=>y.current?.getProgress?.()??0}),[y.current]);let{style:$,className:L,rest:A}=B(P),M=useCallback(I=>typeof I=="number"?I:+I.label,[]);if(!t)throw new Error('"itemCount" prop is required');let O=useMemo(()=>Math.ceil(t/n),[t,n]),F=useMemo(()=>{let I=[],k=Math.max(M(b)-(s||2),1),X=Math.min(M(b)+(s||2),O);k>1&&I.push({id:i?h(1):1,label:1}),k>2&&I.push({id:-1,label:v});for(let Y=k;Y<=X;Y++)I.push({id:i?h(Y):Y,label:Y});return X<O-1&&I.push({id:-1,label:v}),X<O&&I.push({id:i?h(O):O,label:O}),I},[b]),Z=useCallback(I=>{let k=I;+k.label<1||+k.label>O||(E(k),x?.(k));},[t,n,b]);return F.length<=1&&(m??false)===false?null:jsxs(p,{ref:S,as:`--pagination ${g===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${L}`,children:[jsx(p,{as:"flex flex:1 aic --pgt-btns",children:(F.length>1?F:[{id:1,label:1},{id:-1,label:v}]).map((I,k,X)=>{let Y=(typeof I=="string"?I:I.label)==M(b);return jsx(_,{disabled:I.id==-1||M(b)==+I.label,className:Y?"--current-page":"",onClick:H=>Z(I),children:g===true?w===true&&Y?jsx(Qe,{ref:y}):"":typeof I=="string"?I:I.label},`--pg-${k}-${I.id}`)})}),jsx(p,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(M(b)-1)*n+1} - `,`${Math.min(M(b)*n,t)} of ${t} items`].join(" ")}),jsxs(p,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsx(_,{disabled:M(b)<=1,onClick:I=>Z({id:i?h(M(b)-1):M(b)-1,label:M(b)-1}),children:V.chevronLeftOutline}),jsx(_,{disabled:F.length<=1||M(b)==M(F[F.length-1]),onClick:I=>Z({id:i?h(M(b)+1):M(b)+1,label:M(b)+1}),children:V.chevronRightOutline})]})]})};os.displayName="Zuz.Pagination";var Lt=os;function Qc(e,r){let{items:t,renderItem:n,effect:o="slide",loop:s=true,loopMode:a="infinite",startIndex:l=0,useKeys:f=true,useWheel:c=true,spacing:i=160,rotation:d=20,scaleStep:u=.15,blur:m=4,animation:g="power",showDots:w=false,autoPlay:x=false,autoPlaySpeed:P=3,onChange:S,...R}=e,{className:h,style:v}=B(R),y=useRef(null),b=P/(P>=1e3?1e3:1),E=useCarousel({total:t.length,initialIndex:l,loop:s,useKeys:f,useWheel:c,onChange:O=>{y.current?.setPage({id:O+1,label:O+1}),y.current?.setProgress(0),S?.(O);}}),{pause:$,resume:L,reset:A}=useTimer({duration:b,autoStart:x===true,onProgress:O=>{x===true&&y.current?.setProgress(1-O);},onExpired:()=>{x===true&&E.next(),A();}}),M={...v,"--carousel-spacing":`${i}px`,"--carousel-rotation":`${d}deg`,"--carousel-blur":`${m}px`,"--carousel-scale-step":u,"--active-index":E.index,"--carousel-transition":`var(--${g})`};return jsxs(p,{ref:r,className:`--carousel --effect-${o} --loop-${a} flex cols aic jcc ${h}`.trim(),style:M,children:[jsx(p,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((O,F)=>{let Z=F-E.index;if(a==="infinite"){let k=t.length;Z=((Z+k/2)%k+k)%k-k/2;}let I=F===E.index;return jsx(p,{onMouseEnter:()=>I&&$(),onMouseLeave:()=>I&&L(),className:`--carousel-item-wrapper abs ${I?"--is-active":""}`,style:{"--offset":Z,zIndex:I?100:100-Math.abs(Z),display:Math.abs(Z)>5?"none":"flex"},children:n(O,F,E.index)},F)})}),w&&jsx(Lt,{ref:y,itemCount:t.length,itemsPerPage:1,startPage:l+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:O=>E.goTo(+O.label-1),asDots:true,progressBar:true})]})}var Jc=forwardRef(Qc),em=Jc;var rs=(r=>(r.Line="line",r))(rs||{});var as=forwardRef((e,r)=>{let{data:t,width:n,height:o,lineColor:s,strokeWidth:a=2,gradientStartColor:l,gradientEndColor:f,animated:c,animDuration:i=2,animDelay:d=0,padding:u=0,type:m,...g}=e,{className:w,style:x,rest:P}=B(g),S=useRef(null),R=useResizeObserver(S.current?.parentElement||S),h=typeof n=="number"?n:R.width,v=typeof o=="number"?o:R.height,y={width:h,height:v},b=useId(),{pathD:E,areaPathD:$}=useLineChart(t,y,u+(a||2)),L=useRef(null),A=useRef(null),[M,O]=useState(0),[F,Z]=useState(0);return useEffect(()=>{c&&(L.current&&O(L.current.getTotalLength()),A.current&&Z(A.current.getTotalLength()));},[c,E,$,h,v]),jsx(p,{ref:S,as:`--chart --${m||"line"}-chart ${w}`.trim(),style:{...x,width:n,height:o},...P,children:h>0&&v>0&&jsxs("svg",{viewBox:`0 0 ${h} ${v}`,preserveAspectRatio:"xMidYMid meet",children:[jsx("defs",{children:jsxs("linearGradient",{id:b,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopColor:l}),jsx("stop",{offset:"100%",stopColor:f})]})}),jsx("path",{ref:A,d:$,fill:`url(#${b})`,stroke:"none",style:c?{strokeDasharray:F,strokeDashoffset:F}:{},children:c&&jsx("animate",{attributeName:"stroke-dashoffset",from:F,to:"0",dur:`${i||2}s`,begin:`${d||0}s`,fill:"freeze"})}),jsx("path",{ref:L,d:E,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:c?{strokeDasharray:M,strokeDashoffset:M}:{},children:c&&jsx("animate",{attributeName:"stroke-dashoffset",from:M,to:"0",dur:`${i||2}s`,begin:`${d||0}s`,fill:"freeze"})})]})})});as.displayName="Zuz.Chart";var im=as;var is=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(is||{}),ls=(c=>(c.Image="img",c.Video="vid",c.Audio="audio",c.Link="link",c.Document="doc",c.Location="loc",c.Contact="contact",c.Event="event",c.Poll="poll",c))(ls||{});var cs=forwardRef((e,r)=>{let{text:t,media:n,side:o="me",status:s=1,timeStamp:a=Date.now(),arrow:l=true,...f}=e,{className:c,style:i,rest:d}=B(f);return jsx(p,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxs(p,{className:`--bubble --bubble-${o} ${n?`--with-media --bma-${n.type}`:""} rel flex cols ${l==true?"--b-arrow":""} ${c}`.trim(),style:{...i},...d,children:[t&&jsx(K,{className:"--bubble-text",children:t}),n?n.type=="audio"?jsxs(p,{as:"flex aic --bubble-audio",children:[jsx(me,{className:"--bm-action",children:V.play}),jsx(Qe,{progress:.7}),jsx(K,{className:"--bm-dur",children:n.duration??"00:13"})]}):n.type=="img"?jsx(p,{as:"--bubble-image",children:jsx(tt,{src:n.source})}):null:null,jsxs(p,{as:"flex aie jce --bubble-stats",children:[jsx(K,{className:"--bubble-stamp tar",children:timeSince(a)}),o=="me"&&jsx(me,{className:`--bubble-status --bs-${s}`,children:s==0?V.pending:s==1?V.done:s==2?V.doneAll:V.doneAll})]})]})})});cs.displayName="Zuz.Bubble";var mm=cs;var ms=forwardRef((e,r)=>{let{style:t,className:n,rest:o}=B(e);return jsx("label",{ref:r,style:t,className:n,...o})});ms.displayName="Zuz.Label";var Mt=ms;var us=({ref:e,...r})=>{let {name:t,required:n,type:o,value:s,size:a,variant:l,checked:f,disabled:c,onSwitch:i,...d}=r,u=it(),m=!!(t&&u.values);m?u.errors?.[t]:null;let w=m?u.values?.[t]:void 0,[x,P]=useState(f||false),S=useRef(null),{variant:R}=Q(true),h=useMemo(()=>m&&w!=null?typeof w=="string"?w.toLowerCase()!=="false"&&w!=="":!!w:x,[w,x,m]);useEffect(()=>{S.current&&S.current.checked!==h&&(S.current.checked=h);},[h]),useEffect(()=>{f!==void 0&&P(f);},[f]);let v=y=>{let b=!!y;m&&u.setFieldValue?.(t,b),P(b),i?.(b,s||"cb");};return useImperativeHandle(e,()=>({setChecked(y,b=true){v(y);},toggle(y=true){v(!h);}})),jsxs(Mt,{"aria-hidden":c,className:[`--${(o||Fe.Default).toLowerCase()}`,`${!o||o===Fe.Default?"--checkbox":"--switch"}`,`--${l||R||q.Small}`,`flex aic jcc ${h?"is-checked":""} rel`,`${c?"--disabled":""}`].join(" ").trim(),...d,children:[(!o||o==Fe.Default)&&V.check,jsx(fe,{ref:y=>{S.current=y,e&&(e.current=y);},defaultChecked:h,type:"checkbox",className:"abs",name:t,required:n||false,onChange:y=>{y.stopPropagation(),v(y.target.checked);},disabled:c})]})};us.displayName="Zuz.CheckBox";var Ot=us;var Sm=({ref:e,...r})=>{let{code:t,copy:n,lang:o="tsx",showLines:s=false,highlight:a="",as:l,fx:f,...c}=r,i=useRef(null),{className:d,style:u,rest:m}=B({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${l}`,fx:f},i),g=useMemo(()=>{let x=new Set;return a.split(",").forEach(P=>{if(P.includes("-")){let[S,R]=P.split("-").map(Number);for(let h=S;h<=R;h++)x.add(h);}else P&&x.add(Number(P));}),x},[a]),w=useMemo(()=>{let x=t.split(`
9
- `);for(;x.length>0&&x[0].trim()==="";)x.shift();for(;x.length>0&&x[x.length-1].trim()==="";)x.pop();let P=x[0]?.match(/^\s*/)?.[0].length||0,S=x.map(h=>{let v=h.match(/^\s*/)?.[0].length||0,y=Math.min(v,P);return h.slice(y)}),R=[{name:"comm",re:/\/\/.*/g},{name:"str",re:/(["'`])(?:(?=(\\?))\2.)*?\1/g},{name:"key",re:/\b(const|let|var|export|default|import|from|return|if|else|switch|case|break|as|type|interface|class|extends|await|async|new|void|typeof)\b/g},{name:"tag",re:/(&lt;\/?[A-Z][\w\.]*|&gt;)/g},{name:"var",re:/(?<!&lt;\/|&lt;)\b[A-Z]\w*\b/g},{name:"fn",re:/\b([a-z_]\w*)(?=\s*\()/gi},{name:"prop",re:/\.([a-z_]\w*)\b/gi},{name:"num",re:/\b\d+\b(?![#|A-Z|a-z|_|ZUZ])/g}];return S.map((h,v)=>{let y=h.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),b=g.has(v+1);if(o!="plain"){let E=[];R.forEach($=>{y=y.replace($.re,L=>{let A=`ZUZ_ID_${E.length}_ZUZ`;return E.push(`<span class="--token-${$.name}">${L}</span>`),A});});for(let $=E.length-1;$>=0;$--)y=y.replace(`ZUZ_ID_${$}_ZUZ`,E[$]);}return `<div class="--code-line ${s==true?"--with-ln":""} ${b?"--is-highlighted":""}">
8
+ document.documentElement.style.colorScheme = theme;`}}),jsx(Bo,{children:e})]})},_r=(e,r)=>{if(li)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||r};var Zr=({ref:e,...r})=>{let{style:t,...n}=r,{style:o,className:s,rest:a}=B(n);return jsx("span",{ref:e,style:t,className:s,...a})};Zr.displayName="Zuz.Span";var me=Zr;var Gr=forwardRef((e,r)=>{let{name:t,pathCount:n,variant:o,color:s,size:a,...l}=e,{variant:u}=j(true),{className:c,style:i,rest:d}=B(l);return jsx("div",{style:{color:s,...i,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${o||u||U.Small} ${c}`.trim(),ref:r,...d,children:Array(n||0).fill(0).map((f,m)=>jsx(me,{className:`path${m+1}`},`${t}-layer-${m}`))})});Gr.displayName="Zuz.Icon";var te=Gr;var ve={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Ur=e=>{let{type:r,variant:t,color:n,...o}=e,{className:s,style:a,rest:l}=B(o),{spinner:u}=j(true),c=()=>{switch(r||u?.type||ve.Simple){case ve.Simple:return null;case ve.Wave:return jsxs(Fragment$1,{children:[jsx(p,{as:"--bar --bar1"}),jsx(p,{as:"--bar --bar2"}),jsx(p,{as:"--bar --bar3"})]});case ve.Roller:return null}};return jsx(p,{className:`${s} --spinner --${(r||u?.type||ve.Simple).toLowerCase()} --${t||u?.variant||U.Small}`.trim(),style:{...a},...l,children:c()})};Ur.displayName="Zuz.Spinner";var Ce=Ur;var Wt={Loading:"loading",Normal:"normal"};var Xr=({ref:e,...r})=>{let{reset:t,kind:n="solid",variant:o,icon:s,iconSize:a,children:l,withLabel:u,spinner:c,state:i,disabled:d,...f}=r,{style:m,className:g,rest:P}=B(f),{variant:x}=j(true);return jsxs("button",{className:removeDuplicateWords(`--button --${n} --${o||x} flex aic ${t?"":"jcc"} ${s?"--with-icon":""} ${g}`).trim().replace(/\s+/g," "),style:m,ref:e,disabled:i==Wt.Loading||r.skeleton?.enabled||d,...P,children:[i==Wt.Loading&&jsx(Ce,{variant:o||x,type:c||ve.Simple}),(!i||i==Wt.Normal)&&jsxs(Fragment$1,{children:[s&&jsx(te,{variant:a,name:s}),u===true?jsx(me,{children:l}):l]})]})};Xr.displayName="Zuz.Button";var _=Xr;var Yr=({ref:e,...r})=>{let{h:t,html:n,children:o,lines:s,tfx:a,delay:l=0,duration:u=.5,stagger:c=.05,repeat:i=true,reveal:d=false,hover:f=false,...m}=r,{style:g,className:P,rest:x}=B(m),T=useRef(null),[S,R]=useState(false),[h]=useIntersectionObserver([T],{threshold:[1]}),v=useMemo(()=>{if(g?.opacity!==void 0)return g.opacity;if(typeof r.as=="string"){let A=r.as.match(/opacity:([\d.]+)/);if(A)return A[1]}return 1},[r.as,g?.opacity]),y=useMemo(()=>a?f?S:d?h===1:true:false,[a,f,S,d,h]);useEffect(()=>{e&&(typeof e=="function"?e(T.current):e.current=T.current);},[e]);let b=`h${r.h||1}`,E=useMemo(()=>typeof o=="string"?o:Array.isArray(o)&&o.length===1&&typeof o[0]=="string"?o[0]:null,[o]),$=useMemo(()=>{let A=Array.isArray(r.as)?r.as.join(" "):r.as||"";return typeof A=="string"&&A.includes("text-clip")},[r.as]);useLayoutEffect(()=>{if(!$||!T.current||E===null)return;let A=T.current,M=0,O=0,F=()=>{let k=A.getBoundingClientRect(),X=getComputedStyle(A).backgroundImage,Y=k.width;A.querySelectorAll(".--fx-char").forEach(z=>{let W=z.getBoundingClientRect().left-k.left;z.style.backgroundImage=X,z.style.backgroundRepeat="no-repeat",z.style.backgroundSize=`${Y}px 100%`,z.style.backgroundPosition=`-${W}px 0`,z.style.backgroundClip="text",z.style.webkitBackgroundClip="text",z.style.color="transparent";});},Z=()=>{cancelAnimationFrame(M),cancelAnimationFrame(O),M=requestAnimationFrame(()=>{O=requestAnimationFrame(F);});};Z();let I=new ResizeObserver(Z);return I.observe(A),typeof document<"u"&&"fonts"in document&&document.fonts?.ready.then(Z),window.addEventListener("resize",Z),()=>{cancelAnimationFrame(M),cancelAnimationFrame(O),I.disconnect(),window.removeEventListener("resize",Z);}},[$,E,a,y]);let L=useMemo(()=>n?jsx(me,{dangerouslySetInnerHTML:{__html:n}}):a&&E!==null?E.split("").map((A,M)=>{let O=A===" ",Z=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":i?"infinite":"1";return jsx(me,{"data-char":A,className:`--fx-char -fx ${y?`--fx-${a}`:""}`,style:{"--delay":`${l+M*c}s`,"--duration":`${u}s`,"--iteration":Z,"--target-opacity":v,display:O?"inline":"inline-block",whiteSpace:"pre",opacity:!y&&a==="typewriter"?0:void 0},children:A},M)}):o,[o,n,a,E,y,l,c,u,i]);return jsx(b,{ref:T,onMouseEnter:()=>f&&R(true),onMouseLeave:()=>f&&R(false),style:a?{...g,display:a?"flex":g?.display,flexWrap:a?"wrap":g?.flexWrap,opacity:a&&!y?0:a?1:g?.opacity,transition:a?"opacity 0.4s ease":void 0}:g,className:`${P} ${a?"--text-fx -fx":""}`.trim(),...x,children:L})};Yr.displayName="Zuz.Text";var K=Yr;var Ci=e=>{let{label:r,labelColor:t,icon:n,iconColor:o,index:s,className:a,onSelect:l}=e;return r=="-"?jsx(p,{className:"--line"}):jsxs(_,{reset:true,onClick:u=>l?.(e),className:`--item ${a||""}`.trim(),children:[jsx(p,{as:"--icon",children:jsx(te,{name:n,className:"--ico",style:o?{color:o}:{}})}),jsx(K,{className:"--lbl flex aic",style:t?{color:t}:{},children:r})]})},jr=Ci;var en=({ref:e,...r})=>{let{id:t,as:n,fx:o,offsetX:s,offsetY:a,parent:l,event:u,arrow:c,when:i,items:d,header:f,footer:m,origin:g=St.TopRight,...P}=r,[x,T]=useState(false),[S,R]=useState(d||[]),{position:h,targetRef:v,calculatedAnchor:y}=useAnchorPosition(l?.current,u,{offsetX:s,offsetY:a,preferredAnchor:g}),E=l&&h.top>l.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",$=useMemo(()=>{let Z=y.toLowerCase();return Z.includes("left")?"--arrow-left":Z.includes("right")?"--arrow-right":"--arrow-center"},[y]),L=h.top!==0||h.left!==0;useEffect(()=>{i&&L?T(true):i||T(false);},[i,L]);let{className:A,style:M,rest:O}=B(P),F=be({...o?.transition?{transition:o.transition??Q.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??oe.EaseInOut,duration:o?.duration??.05,when:x&&L});return jsxs(p,{ref:v,className:`--contextmenu ${c||l!=null?`--has-arrow ${E} ${$}`:""} abs flex cols ${A}`.trim(),"aria-hidden":!x,style:{...M,...F.style,top:h.top,left:h.left,visibility:L?"visible":"hidden",transformOrigin:y},...O,children:[typeof f=="function"?createElement(f):f,S.map((Z,I)=>jsx(jr,{...Z,index:I},`context-${Z.label.toLowerCase()}-${I}`)),typeof m=="function"?createElement(m):m]})};en.displayName="Zuz.ContextMenu";var Mo=en;var tn=forwardRef((e,r)=>{let{children:t,fx:n,when:o,fxDelay:s,fxStep:a,classToIgnore:l,...u}=e,c=j(true),i=useDelayed(),d=n||c?.group?.fx,f=s||c?.group?.fxDelay,m=a||c?.group?.fxStep,g=l||c?.group?.classToIgnore||"-fx",P=useMemo(()=>d?addPropsToChildren(t,x=>{if(x.type===Fragment)return false;let T=x.props||{},S="fx"in T,R="tfx"in T,h=T.as?Array.isArray(T.as)?T.as.join(" "):T.as:T.className||"";return !(typeof h=="string"&&h.includes(g))&&(!S||R)},(x,T)=>{let S=(f??0)+x*(m??.1),R=T.props||{};return "tfx"in R?{delay:(R.delay??0)+S}:{fx:{...d,delay:S,when:o??(n?.when||i)}}}):t,[t,o,i,d,f,m,g,n]);return jsx(p,{className:"--group",ref:r,...u,children:P})});tn.displayName="Zuz.Group";var Oo=tn;var rn=forwardRef((e,r)=>{let{message:t,spinner:n,spinnerSize:o,color:s,when:a,hideMessage:l,...u}=e,{className:c,style:i,rest:d}=B(u),{spinner:f}=j(true);return "when"in e&&e.when==false?null:jsxs(Oo,{fx:{transition:Q.SlideInBottom,curve:oe.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${c}`.trim(),style:{...i,backgroundColor:"var(--cover-bg)"},...d,children:[jsx(Ce,{variant:o||f?.variant||U.Small,type:n||f?.type||ve.Simple}),!l&&jsx(K,{className:"--label",tfx:"fade",style:{color:"var(--cover-label)"},children:t||"loading"})]})});rn.displayName="Zuz.Cover";var Me=rn;var Vo=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(r){return this.stack[this.stack.length-1]===r}push(r){this.stack.includes(r)||(this.stack.push(r),this.updateScrollLock());}pop(r){this.stack=this.stack.filter(t=>t!==r),this.updateScrollLock();}handleEscape(){let r=this.stack[this.stack.length-1];return r?(r(),true):false}get count(){return this.stack.length}},ke=new Vo;var nn=forwardRef((e,r)=>{let{when:t,...n}=e;return jsx(p,{ref:r,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:Q.FadeIn,when:t},...n})});nn.displayName="Zuz.Overlay";var Ye=nn;var Fi=({action:e,render:r=true,message:t=""})=>jsx(p,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:r?t:null}),sn=Fi;var _i=({action:e,actionPosition:r,dialogID:t,variant:n})=>jsx(p,{as:`--footer flex aic rel ${r?r==Vr.Center?"jcc":"":"jce"}`.trim(),children:e.map((o,s)=>jsx(_,{variant:n,onClick:a=>o.handler?o.handler():o.onClick?o.onClick():console.log("onClick Handler missing"),as:"--action",children:o.label},`dialog-${t}-action-${o.key}`))}),ln=_i;var Ki={colorSchemeLight:jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsx("circle",{cx:"12",cy:"12",r:"5"}),jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),colorSchemeSystem:jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark:jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{d:"M17.919 8.18H6.079c-.96 0-1.44 1.16-.76 1.84l5.18 5.18c.83.83 2.18.83 3.01 0l1.97-1.97 3.21-3.21c.67-.68.19-1.84-.77-1.84z"})}),arrowUp:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{d:"M18.68 13.978l-3.21-3.21-1.96-1.97a2.13 2.13 0 00-3.01 0l-5.18 5.18c-.68.68-.19 1.84.76 1.84h11.84c.96 0 1.44-1.16.76-1.84z"})}),search:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children:jsx("path",{d:"M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14 s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0 C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z"})}),close:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),eye:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#333",d:"M12 20.5c-4.299 0-8.24-3.023-10.544-8.086a1 1 0 010-.828C3.759 6.523 7.701 3.5 12 3.5s8.24 3.023 10.544 8.086a1.001 1.001 0 010 .828 18.14 18.14 0 01-1.391 2.52 1 1 0 11-1.666-1.106A15.87 15.87 0 0020.529 12C18.543 7.92 15.379 5.5 12 5.5S5.457 7.92 3.471 12c1.986 4.08 5.15 6.5 8.529 6.5a7.964 7.964 0 005.036-1.92 1 1 0 111.265 1.55A9.94 9.94 0 0112 20.5z"}),jsx("path",{fill:"#333",d:"M12 16a4.004 4.004 0 01-3.929-4.756 1 1 0 011.965.375A2 2 0 1014 12a2.034 2.034 0 00-2.053-1.999 1.04 1.04 0 01-1.043-.947.963.963 0 01.902-1.05L12 8a4 4 0 010 8z"})]}),eyeSlash:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#333",d:"M12 15c-4.132 0-7.98-1.214-10.294-3.249a1 1 0 111.32-1.502C4.986 11.972 8.34 13 12 13s7.014-1.028 8.974-2.751a1 1 0 111.32 1.502C19.98 13.786 16.132 15 12 15z"}),jsx("path",{fill:"#333",d:"M12 18a1 1 0 01-1-1v-3a1 1 0 012 0v3a1 1 0 01-1 1zM7.749 17.667a.964.964 0 01-.17-.014 1 1 0 01-.817-1.155l.505-2.935a1 1 0 111.97.339l-.504 2.935a1 1 0 01-.984.83zM3.636 16.306a1.001 1.001 0 01-.942-1.336l.978-2.745a1 1 0 111.884.672l-.978 2.745a1 1 0 01-.942.664zM16.251 17.667a1 1 0 01-.984-.83l-.505-2.935a1 1 0 011.97-.339l.506 2.935a1 1 0 01-.816 1.155.964.964 0 01-.17.014zM20.364 16.306a1 1 0 01-.942-.664l-.978-2.745a1 1 0 111.884-.672l.978 2.745a1.001 1.001 0 01-.942 1.336z"})]}),check:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[Ne.Info]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{fill:"#292D32",d:"M21.56 10.738l-1.35-1.58c-.25-.3-.46-.86-.46-1.26v-1.7c0-1.06-.87-1.93-1.93-1.93h-1.7c-.4 0-.97-.21-1.27-.46l-1.58-1.35c-.69-.59-1.82-.59-2.51 0l-1.6 1.35c-.3.25-.86.46-1.26.46H6.17c-1.06 0-1.93.87-1.93 1.93v1.7c0 .39-.2.95-.45 1.25l-1.35 1.59c-.58.7-.58 1.82 0 2.5l1.35 1.59c.25.29.45.86.45 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.74c.39 0 .96.21 1.26.46l1.58 1.35c.69.59 1.82.59 2.51 0l1.58-1.35c.3-.25.86-.46 1.26-.46h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.4.21-.96.46-1.26l1.35-1.58c.61-.68.61-1.81.02-2.51zm-10.31-2.61c0-.41.34-.75.75-.75s.75.34.75.75v4.83c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-4.83zm.75 8.74c-.55 0-1-.45-1-1s.44-1 1-1c.55 0 1 .45 1 1s-.44 1-1 1z"})}),[Ne.Warning]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{fill:"#292D32",d:"M19.51 5.85l-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 00-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 001.57-2.73V8.58a3.192 3.192 0 00-1.58-2.73zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 01-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 01-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38z"})}),[Ne.Error]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[Ne.Success]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),volumeHigh:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{fill:"#292D32",d:"M22 11.25h-1.25V10c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.25H18c-.41 0-.75.34-.75.75s.34.75.75.75h1.25V14c0 .41.34.75.75.75s.75-.34.75-.75v-1.25H22c.41 0 .75-.34.75-.75s-.34-.75-.75-.75M14.02 3.782c-1.12-.62-2.55-.46-4.01.45l-2.92 1.83c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h1.4300000000000002c.23 0 .46.07.66.19l2.92 1.83c.88.55 1.74.82 2.54.82a3 3 0 0 0 1.47-.37c1.11-.62 1.73-1.91 1.73-3.63v-9.18c0-1.72-.62-3.01-1.73-3.63"})}),volumeMute:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#292D32",d:"M18 16.75a.75.75 0 0 1-.6-1.2 5.93 5.93 0 0 0 .72-5.84.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.02 2.42.67 5.23-.9 7.33-.15.19-.37.29-.6.29"}),jsx("path",{fill:"#292D32",d:"M19.828 19.25a.75.75 0 0 1-.6-1.2c2.14-2.85 2.61-6.67 1.23-9.96a.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.59 3.78 1.05 8.16-1.41 11.44-.14.2-.37.3-.6.3M14.04 12.958c.63-.63 1.71-.18 1.71.71v2.93c0 1.72-.62 3.01-1.73 3.63a3 3 0 0 1-1.47.37c-.8 0-1.66-.27-2.54-.82l-.64-.4c-.54-.34-.63-1.1-.18-1.55zM21.77 2.229c-.3-.3-.79-.3-1.09 0l-4.95 4.95c-.06-1.6-.66-2.8-1.72-3.39-1.12-.62-2.55-.46-4.01.45l-2.91 1.82c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h.16l-2.94 2.94c-.3.3-.3.79 0 1.09.16.14.35.22.55.22s.39-.08.54-.23l18.46-18.46c.31-.3.31-.78 0-1.08"})]}),plus:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},V=Ki;var Zi=({title:e="Alert",onClose:r})=>jsxs(p,{as:"--head flex aic rel",children:[jsx(p,{as:`--${e?"title":"dot"} flex aic jcc rel`,children:e}),jsx(_,{onClick:t=>r(),className:"--closer abs center-v",children:V.close})]}),mn=Zi;var fn=({ref:e,...r})=>{let{index:t,id:n,title:o,message:s,transition:a,curve:l,speed:u,type:c,action:i,actionPosition:d,spinner:f,loadingMessage:m,variant:g,inBackground:P,forceClose:x,forceLoading:T,onClose:S,onShow:R,onHide:h,...v}=r,y=useMemo(()=>uuid(12),[]),[b,E]=useState(o||""),[$,L]=useState(s||""),[A,M]=useState(c||at.Dialog),[O,F]=useState(false),[Z,I]=useState(true),[k,X]=useState(i||null),[Y,H]=useState(false),{variant:z,spinner:G,dialog:W}=j(true),ne=g||W?.variant||z||U.Small,{style:J,className:ae,rest:pe}=B(v),ye=useRef(null),ie=be({when:O,duration:u||W?.speed||.3,delay:W?.delay||.1,transition:a||W?.transition||Q.SlideInBottom,curve:l||W?.curve||oe.EaseInOut,watch:["scale","filter","transform"]}),ce=()=>{F(false),S(n);},q=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{ke.isTop(ce)&&ce();}}],[O]);useShortcuts(q),useEffect(()=>{M(at.Dialog),L(s),E(b),k&&X(k.reduce((le,de)=>(le.push({...de,key:de.key||uuid(12)}),le),[])),F(true),setTimeout(()=>R?R():()=>{},500);},[]),useEffect(()=>{x&&ce();},[x]),useEffect(()=>{T!=null&&H(T);},[T]),useEffect(()=>(O?ke.push(ce):ke.pop(ce),()=>ke.pop(ce)),[O]);let re=useMemo(()=>1e4+t*10,[t]);return jsxs(Fragment$1,{children:[jsx(Ye,{style:{zIndex:re},when:O}),jsxs(p,{as:`--dialog --${(c??at.Default).toLowerCase()} ${O?"--visible":""} ${ae} fixed abc`.trim(),style:{...ie.style,zIndex:re+1,pointerEvents:P==true?"none":"auto",...P==true?{scale:"0.92",filter:"blur(2px)"}:{}},...pe,ref:ye,children:[jsx(mn,{title:b,onClose:ce}),jsx(sn,{message:$,render:Z,action:k}),k&&k.length>0&&jsx(ln,{variant:ne,action:k,dialogID:y,actionPosition:d}),jsx(Me,{when:Y,spinner:f||W?.spinner||G?.type||ve.Simple,message:m||W?.loadingMessage})]})]})};fn.displayName="Zuz.Dialog";var Ho=fn;var dn=forwardRef((e,r)=>{let{speed:t,smooth:n=false,breakpoints:o={},style:s,...a}=e,{rootRef:l,containerRef:u,thumbY:c,thumbX:i,onScrollY:d,onScrollX:f}=useScrollbar(t||1,o,n),{style:m,className:g,rest:P}=B(a);return useEffect(()=>{let x=u.current;if(!x)return;let T=()=>{window.dispatchEvent(new Event("resize"));},S=R=>{let h=R.target;if(h.closest(".--allow-scroll")){let y=h.closest(".--allow-scroll"),{scrollTop:b,scrollHeight:E,clientHeight:$}=y,L=R.deltaY<0,A=R.deltaY>0;(L&&b>0||A&&b+$<E)&&R.stopPropagation();}};return x.addEventListener("scroll",T),x.addEventListener("wheel",S,{passive:true}),()=>{x.removeEventListener("scroll",T),x.removeEventListener("wheel",S);}},[u]),jsxs(p,{ref:l,className:g.trim(),as:"--scrollview rel",children:[jsx(p,{as:`--scroll-content ${g}`.trim(),ref:u,style:s||{},children:P.children}),jsx(p,{as:"--scroll-track --track-y --abs",children:jsx(p,{as:"--scroll-thumb --abs --round",ref:c,onMouseDown:d})}),jsx(p,{as:"--scroll-track --track-x --abs",children:jsx(p,{as:"--scroll-thumb --abs --round",ref:i,onMouseDown:f})})]})});dn.displayName="Zuz.ScrollView";var Ao=dn;var gn=({ref:e,...r})=>{let{id:t,index:n,from:o,speed:s,children:a,margin:l,animation:u,prerender:c,inBackground:i,forceClose:d,forceLoading:f,onClose:m,...g}=r,{drawer:P}=j(true),[x,T]=useState(a),[S,R]=useState(false),[h,v]=useState(c??(P?.prerender||true)),[y,b]=useState(false),E=()=>{R(false),m?.(t??-1);},{className:$,style:L,rest:A}=B(g),M=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{ke.isTop(E)&&E();}}],[S]);useShortcuts(M),useEffect(()=>{T(a);},[a]),useEffect(()=>(S?ke.push(E):ke.pop(E),()=>ke.pop(E)),[S]),useEffect(()=>{R(true);},[]),useEffect(()=>{d&&E();},[d]),useEffect(()=>{f!=null&&b(f);},[f]);let O=o||P?.from||we.Left,F=useMemo(()=>{switch(O){case we.Left:return {from:{x:"-100vw"},to:{x:0}};case we.Right:return {from:{x:"100vw"},to:{x:0}};case we.Top:return {from:{y:"-100vh"},to:{y:0}};case we.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,P?.from]),Z=be({from:{...F.from,opacity:0},to:{...F.to,opacity:1},when:S,curve:u||P?.animation||oe.EaseInOut,duration:s||P?.speed||.5,watch:["scale","filter"]}),I=useMemo(()=>1e4+(n||1)*10,[n]);return jsxs(Fragment$1,{children:[jsx(Ye,{onClick:k=>{S&&E();},when:S,style:{zIndex:I}}),jsxs(p,{ref:e,"aria-hidden":!S,className:`--drawer flex cols ${$} --${O.toLowerCase()} fixed`,style:{...L,...Z.style,"--m":`${l||P?.margin||0}px`,zIndex:I+1,pointerEvents:i==true?"none":"auto",...i==true?{scale:"0.92",filter:"blur(2px)"}:{}},...A,children:[o==we.Top||o==we.Bottom?jsx(p,{className:"--handle"}):null,jsx(_,{as:"--close-drawer --abs",onClick:E,children:V.close}),jsxs(Ao,{as:"rel",children:[h||S?x:null,jsx(Me,{when:y})]})]})]})};gn.displayName="Zuz.Drawer";var zo=gn;var yn=forwardRef((e,r)=>{let{progress:t,type:n,animated:o,...s}=e,a=useRef(null);useImperativeHandle(r,()=>({setProgress:i=>{a.current.style.width=`${i*100}%`,a.current.setAttribute("data-value",i+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),useEffect(()=>{t&&a.current&&(o?setTimeout(()=>a.current.style.width=`${t*100}%`,500):a.current.style.width=`${t*100}%`,a.current.setAttribute("data-value",t+""));},[t,a.current]);let{className:l,style:u,rest:c}=B(s);return jsx(p,{className:`--progress ${o?"--animated":""} flex rel ${l}`.trim(),style:u,...c,children:jsx(p,{ref:a,className:"--bar rel"})})});yn.displayName="Zuz.ProgressBar";var Qe=yn;var Yt=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Yt||{}),jt=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(jt||{}),xn=(t=>(t.Stack="stack",t.Individual="individual",t))(xn||{}),bn={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var il=e=>{let{index:r,id:t,type:n,icon:o,busy:s,width:a,title:l,message:u,duration:c,sticky:i=false,actions:d=[],position:f,style:m,isHovered:g,total:P,progress:x,progressValue:T,forceClose:S,variant:R,onClick:h,onClose:v}=e,[y,b]=useState(false),[E,$]=useState(false),{toast:L}=j(true),A=typeof T=="number",M=A?Math.max(0,Math.min(1,T)):void 0,O=E||S,F=f??L?.position??"TopCenter",Z=n??L?.type??"default",I=m??L?.style??"stack",k=c??L?.duration??4,X=x??L?.progress??false,Y=useRef(k*1e3),H=useRef(void 0),z=useRef(void 0),G=useRef(null),W=be({when:y&&!O,duration:.3,transition:L?.transition||(F.includes("Top")?Q.SlideInTop:F.includes("Bottom")?Q.SlideInBottom:F.includes("Left")?Q.SlideInLeft:Q.SlideInRight),curve:L?.curve||oe.EaseInOut,watch:["transform","opacity","scale","filter"]});useEffect(()=>{b(true);let q=re=>{if(z.current!==void 0){let le=re-z.current;if(!A&&!g&&!i&&!O&&(Y.current-=le,G.current)){let de=Math.max(0,Y.current/(k*1e3)*100);G.current?.setProgress?.(de/100);}}z.current=re,Y.current<=0?$(true):H.current=requestAnimationFrame(q);};return H.current=requestAnimationFrame(q),()=>{H.current&&cancelAnimationFrame(H.current);}},[g,i,O,k]),useEffect(()=>{if(O){let q=setTimeout(()=>{v?.(t);},350);return ()=>clearTimeout(q)}},[O,t]);let ne=I==="stack",J=g?r*65:r*8,ae=g?1:Math.max(.85,1-r*.05),pe=g?1:Math.max(.4,1-r*.2),ye=q=>{h?h(q):s!==true&&(!d||d.length===0)&&$(true);},ie=W.style.transform||"translate(0, 0)",ce=O?ie:`${ie} translateY(${F.includes("Top")?J:-J}px) scale(${ae})`;return jsxs(p,{onClick:ye,as:`--snack --${O?"hidden":"visible"} --${R||L?.variant||U.Medium} --${Z} --${F.toLowerCase()} abs flex aic`,style:{...W.style,zIndex:1e3-r,pointerEvents:O?"none":"auto",opacity:O?W.style.opacity:pe,transform:ce,filter:!O&&ne&&!g&&r>0?"blur(1px)":"none",cursor:!d||d.length===0?"pointer":"default",transition:`${W.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxs(p,{as:"--ico flex aic jcc rel",children:[o?jsx(te,{name:o}):jsx(p,{as:"--no-icon"}),s===true&&jsx(Ce,{as:"abs abc"})]}),jsxs(p,{as:"--meta flex cols",style:a?{width:a,minWidth:a,maxWidth:a}:void 0,children:[jsx(K,{as:"--tt",children:l||bn[n]}),jsx(K,{as:"--tm",children:u})]}),d&&d.length>0&&jsx(p,{as:"--actions flex gap:5",children:d.map((q,re)=>jsx(_,{as:"--snack-btn bold",variant:U.XSmall,onClick:le=>{le.stopPropagation(),q.onClick(le);},children:q.label},re))}),(X||A)&&jsx(Qe,{as:"abs",progress:M,ref:G})]})},Ko=il;var Pe=createContext(null),fl=({ref:e,...r})=>{let n=useContext(Pe)?.depth??0,[o,s]=useState(null),[a,l]=useState(null),[u,c]=useState(false),[i,d]=useState([]),f=useDelayed(),m=useRef(0),g=()=>++m.current,P=()=>{c(false),setTimeout(()=>l(null),200);};useImperativeHandle(e,()=>({add(h){let v=g(),y={id:v,...h};return d(b=>[...b,y]),v},openMenu(h){c(false),setTimeout(()=>{l({id:g(),type:"menu",props:h}),c(true);},16);},update(h,v){d(y=>y.map(b=>b.id!==h?b:{...b,props:{...b.props,...v}}));},remove(h){d(v=>v.map(y=>y.id===h?{...y,props:{...y.props,forceClose:true}}:y)),a?.id===h&&P();},loading(h,v){d(y=>y.map(b=>b.id===h?{...b,props:{...b.props,forceLoading:v}}:b)),a?.id===h&&P();},clear(h){d(i.filter(v=>v.type!=h));}})),useEffect(()=>{if(a&&u){let h=()=>P();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[a,u,P]);let x=h=>{setTimeout(()=>{d(v=>v.filter(y=>y.id!==h)),a?.id===h&&l(null);},250);},T=useMemo(()=>[...i.filter(h=>h.type!="toast")],[i]);if(!f)return null;let S=i.filter(h=>h.type=="toast").reverse(),R=Object.values(jt);return createPortal(jsxs(p,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[T.map((h,v)=>{let y=v<T.length-1;return h.type==="dialog"?jsx(Ho,{onClose:x,index:v,id:h.id,...h.props,inBackground:y},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsx(zo,{onClose:x,index:v,id:h.id,...h.props,inBackground:y},`layer-${h.type}-${h.id}`):null}),R.map(h=>{let v=S.filter(y=>(y.props.position||"TopCenter")===h);return v.length===0?null:jsx(p,{onMouseEnter:()=>s(h),onMouseLeave:()=>s(null),as:`--toast-container fixed --${h.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:v.map((y,b)=>jsx(Ko,{index:b,total:v.length,isHovered:o===h,onClose:x,id:y.id,...y.props},y.id))},h)}),a&&jsx(p,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsx(Mo,{onClose:P,when:u,...a.props},`menu-${a.id}`)})]}),document.body)},dl=({children:e})=>{let r=useContext(Pe),t=r?r.depth+1:0,n=useRef(null),o=useMemo(()=>({add:s=>n.current?.add(s),openMenu:s=>n.current?.openMenu(s),update:(s,a)=>n.current?.update(s,a),remove:s=>n.current?.remove(s),loading:(s,a)=>n.current?.loading(s,a),clear:s=>n.current?.clear(s),depth:t,isSubLayer:!!r}),[r]);return jsxs(Pe.Provider,{value:o,children:[e,jsx(fl,{ref:n})]})},Bo=dl;var hl=()=>{let e=useContext(Pe);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(n,o,s)=>{n.preventDefault(),e.openMenu({event:n,items:o,origin:s});},showMenu:(n,{items:o,origin:s,offsetX:a,offsetY:l,transition:u,curve:c,arrow:i,duration:d,header:f,footer:m})=>{e.openMenu({fx:{transition:u,curve:c,duration:d},parent:n,items:o,origin:s||St.TopCenter,offsetX:a,offsetY:l,arrow:i,header:f,footer:m});},hide:e.clear}},yl=hl;var bl=()=>{let e=useContext(Pe);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("dialog"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a);return {clearAll:r,show:s=>{let a=e.add({type:"dialog",props:{...s,type:at.Dialog}});return {id:a,setLoading:l=>n(a,l),hide:()=>t(a)}},hide:t}},vl=bl;var wl=()=>{let e=useContext(Pe);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("drawer"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a),o=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:l=>n(a,l),close:()=>t(a)}};return {clearAll:r,open:s=>o({children:s}),right:s=>o({children:s,from:we.Right}),left:s=>o({children:s,from:we.Left}),top:s=>o({children:s,from:we.Top}),bottom:s=>o({children:s,from:we.Bottom}),close:t}},Cl=wl;var Tl=(e,r,t={})=>{let[n,o]=useState(null),[s,a]=useState(false),{duration:l=.25,curve:u=oe.EaseOutBack,borderRadius:c={from:40,to:24},targetWidth:i=320}=t;return useLayoutEffect(()=>{r&&e.current?(o(e.current.getBoundingClientRect()),a(true)):r||a(false);},[r,e]),{style:be({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:c.from},to:{opacity:1,width:i,height:"auto",borderRadius:c.to},curve:u,duration:l,when:s&&r}).style,isMeasured:s,sourceRect:n}},Rl=Tl;var Bl=(e,r={})=>{let{offset:t=8,direction:n="bottom",container:o=null,triggerRef:s=null}=r,a=useRef(null),l=useCallback(()=>{let u=e.current;if(!u)return;let c=s?.current||u.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=u.getBoundingClientRect(),d=c.getBoundingClientRect(),f,m;o?(f=o.getBoundingClientRect(),m="absolute"):(window.getComputedStyle(u).position==="fixed"?m="fixed":m="absolute",m==="fixed"?f={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:f={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),u.style.position!==m&&(u.style.position=m),a.current=m;let x=0,T=0;switch(n){case "top":x=d.top-i.height-t,T=d.left,x<f.top&&d.bottom+i.height+t<=f.bottom&&(x=d.bottom+t);break;case "bottom":x=d.bottom+t,T=d.left,x+i.height>f.bottom&&d.top-i.height-t>=f.top&&(x=d.top-i.height-t);break;case "left":x=d.top,T=d.left-i.width-t,T<f.left&&d.right+i.width+t<=f.right&&(T=d.right+t);break;case "right":x=d.top,T=d.right+t,T+i.width>f.right&&d.left-i.width-t>=f.left&&(T=d.left-i.width-t);break}if(x=Math.max(f.top,Math.min(x,f.bottom-i.height)),T=Math.max(f.left,Math.min(T,f.right-i.width)),a.current==="fixed")u.style.top=`${x}px`,u.style.left=`${T}px`;else {let S;u.offsetParent?S=u.offsetParent.getBoundingClientRect():S={top:0,left:0};let R=x-S.top+window.scrollY,h=T-S.left+window.scrollX;u.style.top=`${R}px`,u.style.left=`${h}px`;}},[e,s,t,n,o]);return useEffect(()=>{let u=e.current;if(!u)return;let c=s?.current||u.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=new ResizeObserver(l);return i.observe(u),c&&i.observe(c),l(),window.addEventListener("resize",l),window.addEventListener("scroll",l,true),()=>{i.disconnect(),c&&i.disconnect(),window.removeEventListener("resize",l),window.removeEventListener("scroll",l,true);}},[e,n,t,o,s]),{postion:a.current,reposition:l}},It=Bl;var Ll=()=>{let e=useContext(Pe);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(m,g)=>e.add({type:"toast",props:{...g,type:m}}),t=()=>e.clear("toast"),n=m=>e.remove(m),o=(m,g)=>e.update(m,g),s=m=>({id:m,update:g=>o(m,g),setType:g=>o(m,{type:g}),setProgress:g=>o(m,{progress:true,progressValue:g}),setBusy:g=>o(m,{busy:g}),success:()=>o(m,{type:"success"}),error:()=>o(m,{type:"error"}),warn:()=>o(m,{type:"warn"}),promise:()=>o(m,{type:"promise"}),default:()=>o(m,{type:"default"}),hide:()=>n(m)}),a=m=>s(r("default",m)),l=m=>s(r("success",m)),u=m=>s(r("error",m)),c=m=>s(r("warn",m)),i=m=>s(r("promise",m)),d=(m,g,P)=>{let x=r(m,{...g,sticky:g.sticky??false,actions:[{label:P?.label||"Ok",onClick:T=>{P?.onClick?.(T),n(x);}}]});return s(x)},f=(m,g,P,x)=>{let T=r(m,{...g,sticky:true,actions:[{label:P?.label||"Ok",onClick:S=>{P?.onClick?.(S),(P?.hide??false)===true&&n(T);}},{label:x?.label||"Cancel",onClick:S=>{x?.onClick?.(S),(x?.hide??true)===true&&n(T);}}]});return s(T)};return {show:a,hide:n,promise:i,clearAll:t,ok:(m,g)=>d("default",m,g),success:(m,g)=>g?d("success",m,g):l(m),error:(m,g)=>g?d("error",m,g):u(m),confirm:(m,g,P)=>f("default",m,g,P),warn:(m,g)=>g?d("warn",m,g):c(m),succes:(m,g)=>g?d("success",m,g):l(m)}},Ml=Ll;var Vl=()=>{let e=useContext(Pe);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(c,i)=>e.add({type:"toast",props:{...i,type:c}});return {show:(c,i,d,f)=>r("default",{title:c,message:i,icon:d,duration:f}),hide:c=>e.remove(c),success:(c,i,d,f)=>r("success",{title:c,message:i,icon:d,duration:f}),error:(c,i,d,f)=>r("error",{title:c,message:i,icon:d,duration:f}),warn:(c,i,d,f)=>r("warn",{title:c,message:i,icon:d,duration:f}),promise:(c,i,d,f)=>r("promise",{title:c,message:i,icon:d,duration:f}),clearAll:()=>e.clear("toast")}},Zo=Vl;var In=({ref:e,style:r,...t})=>{let n=useRef(null),o=useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:l}=B(t,o);return jsx("div",{ref:e||n,style:{...s,...r||{}},className:a,...l})};In.displayName="Zuz.Box";var p=In;var Nn=forwardRef((e,r)=>{let{title:t,message:n,...o}=e,[s,a]=useState(false);return jsxs(p,{className:"--accordion flex cols",...o,children:[jsxs(_,{onClick:l=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsx(K,{className:"--label flex",children:t}),jsx(p,{className:"--arrow flex",children:s?V.arrowUp:V.arrowDown})]}),s&&jsx(p,{className:"--detail",children:n})]})});Nn.displayName="Zuz.Accordion";var zl=Nn;var _l=({label:e,icon:r,onClick:t,idx:n,selected:o})=>jsx(_,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof r=="string"?jsx(te,{name:r}):r}),kn=_l;var Ln=forwardRef((e,r)=>{let{items:t,name:n,selected:o,position:s,...a}=e,l=useRef(null),[u,c]=useState(o||t[0].tag||0),i=useCallback(({x,y:T})=>{if(l.current){let S=l.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-S.left}`),document.documentElement.style.setProperty("--tip-y",`${T-S.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),d=useCallback(()=>{l.current&&(l.current.removeEventListener("pointerleave",d),l.current.removeEventListener("pointermove",i),document.documentElement.style.setProperty("--tip-s","0"));},[]),f=useCallback(()=>{l.current&&(l.current.addEventListener("pointerleave",d),l.current.addEventListener("pointermove",i));},[]);useEffect(()=>{l.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,T)=>T.label.length>x.length?T.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),l.current?.addEventListener("pointerenter",f));},[]);let{className:m,style:g,rest:P}=B(a);return jsxs(p,{ref:l,style:g,className:[`--actionbar flex aic ${m}`,`${!s||s==xe.Auto?"rel":`--${s}`}`].join(" ").trim(),...P,children:[t.map((x,T)=>jsx(kn,{selected:u===x.tag||o==T,...x,idx:T},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsx(p,{className:"--tip abs",children:jsx(p,{className:"--track flex aic",children:t.map(({label:x})=>jsx(p,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Ln.displayName="Zuz.ActionBar";var Ul=Ln;var On=forwardRef((e,r)=>{let{type:t,icon:n,title:o,message:s,iconSize:a,...l}=e,{className:u,style:c,rest:i}=B(l);return jsxs(p,{className:`--alert --${t||Ne.Info} flex aic ${u}`.trim(),style:c,...i,children:[jsx(p,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&V[t||Ne.Info]}),jsxs(p,{className:"--meta flex cols",children:[jsx(K,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsx(K,{className:"--message",h:2,children:s})]})]})});On.displayName="Zuz.Alert";var Yl=On;var Et=createContext(null),Yo=()=>{let e=useContext(Et);return e?useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},Nt=()=>useContext(Et),Dn=()=>()=>{},Hn=e=>{let r=useContext(Et);return useSyncExternalStore(r?.subscribe??Dn,()=>{if(!(!r||!e))return r.getSnapshot().values?.[e]},()=>{})},An=e=>{let r=useContext(Et);return useSyncExternalStore(r?.subscribe??Dn,()=>!r||!e?null:r.getSnapshot().errors?.[e]??null,()=>null)},it=()=>{let e=Nt(),r=Yo();return {...e,...r}},$n=({children:e,initialValues:r={}})=>{let t=useRef({values:r,errors:{},touched:{}}),n=useRef(new Set(Object.keys(r))),o=useRef(new Set),s=useCallback(()=>t.current,[]),a=useCallback(c=>(o.current.add(c),()=>o.current.delete(c)),[]),l=()=>{o.current.forEach(c=>c());};useEffect(()=>{if(!r||Object.keys(r).length===0)return;let c=new Set(Object.keys(r)),i=[...n.current].filter(T=>!c.has(T)),d={...t.current.values};i.forEach(T=>delete d[T]);let f={...d,...r},m=t.current.values||{},g=Object.entries(f),P=Object.entries(m),x=g.length!==P.length||g.some(([T,S])=>m[T]!==S);n.current=c,x&&(t.current={...t.current,values:f},l());},[r]);let u=useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(c,i)=>{t.current.values[c]!==i&&(t.current={...t.current,values:{...t.current.values,[c]:i}},l());},deleteFieldValue:c=>{if(!(c in t.current.values))return;let{[c]:i,...d}=t.current.values;t.current={...t.current,values:d},l();},setFieldError:(c,i)=>{t.current={...t.current,errors:{...t.current.errors,[c]:i}},l();},reset:()=>{t.current={values:{},errors:{},touched:{}},l();}}),[]);return jsx(Et.Provider,{value:u,children:e})};var zn=({ref:e,...r})=>{let{variant:t,numeric:n,name:o,onConfirm:s,...a}=r,{style:l,className:u,rest:c}=B(a),{variant:i}=j(true),d=useRef(null),f=it(),m=o?f.errors?.[o]:null,g=o&&f.values&&f.setFieldValue,P=g?f.values?.[o]:void 0,x=useDebounce(S=>{g&&f.setFieldValue?.(o,S);},500),T=S=>{let R=S.currentTarget.value;n&&(R=R.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),S.currentTarget.value=R),x(R),r.onInput?.(S);};return useEffect(()=>{d.current&&o&&P!==void 0&&d.current.value!==String(P)&&(d.current.value=String(P));},[P,o]),useEffect(()=>()=>{g&&f.deleteFieldValue?.(o);},[]),jsx("input",{name:o,className:`--input --${t||i} ${m?"--has-error":""} --flex ${u}`.trim(),style:l,defaultValue:P??r.defaultValue??"",onInput:T,onKeyDown:S=>{S.key=="Enter"&&s?.(S.currentTarget.value);},ref:S=>{d.current=S,typeof e=="function"?e(S):e&&(e.current=S);},...c})};zn.displayName="Zuz.Input";var fe=zn;var Kn=e=>{let{meta:r,children:t}=e,n=useDelayed(),{label:o,icon:s,...a}=isValidElement(r)?{}:r,{className:l,style:u,rest:c}=B({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return isValidElement(r)?jsx("li",{style:u,className:l,children:r}):jsxs("li",{style:u,className:l,...c,children:[t,typeof r=="string"?r:o]})};Kn.displayName="Zuz.ListItem";var Zn=Kn;var Gn=forwardRef((e,r)=>{let{items:t,variant:n,direction:o,seperator:s,ol:a,...l}=e,{className:u,style:c,rest:i}=B(l),d=a==true?"ol":"ul";return createElement(d,{className:`--list --${n||U.Small} flex ${o??"cols"} ${u}`.trim(),style:c,ref:r,...i,children:t.map((f,m,g)=>{let P=`${typeof f=="string"?`li-${String(f)}`:isValidElement(f)?`li-${f.key}`||`${m}-${MD5(f.toString())}`:f.label}-${m}`;return jsxs(Fragment,{children:[jsx(Zn,{meta:f}),s&&g[m+1]?jsx("li",{className:"--list-seperator",children:s},`spt-${m+1}-${P}`):null]},P)})})});Gn.displayName="Zuz.List";var et=Gn;var qn=forwardRef((e,r)=>{let{fx:t,action:n,data:o,withStyle:s,onChange:a,...l}=e,{className:u}=B({as:s||""}),{style:c}=B(l),[i,d]=useState(false),[f,m]=useState(o||[]),g=useRef(null),P=useRef(null),x=useRef(null),T=useMemo(()=>l.name||uuid(12),[]),[S,R]=useState(null),[h,v]=useState(null),[y,b]=useState([]),$=useDebounce(I=>{I.target.value==""?(d(false),m([])):n&&I.target.value.trim()!=""&&withPost(n,{query:I.target.value}).then(k=>{"items"in k&&_$1(k.items).isArray()?(m(k.items),v(I.target.value),b(k.items)):console.error("Action Response should contain items array"),R(null);}).catch(k=>{R(null),m([]);});},250),L=()=>{if(P.current){let I=P.current.getBoundingClientRect(),k=window.innerHeight-I.bottom,X=I.top;if(x.current){let Y=x.current;k<Y.offsetHeight&&X>k?(Y.style.top="auto",Y.style.bottom=`${I.height}px`,Y.style.maxHeight=`${X-150}px`):(Y.style.top=`${I.height+5}px`,Y.style.bottom="auto",Y.style.maxHeight=`${k-150}px`);}}},A=I=>{if(f.length>0){if((I.key==="ArrowDown"||I.key==="ArrowUp")&&(I.preventDefault(),I.stopPropagation()),I.key==="Escape")R(null),d(false),m([]);else if(I.key==="ArrowDown")R(k=>{let X=k===null||k===f.length-1?0:k+1;return O(X),X});else if(I.key==="ArrowUp")R(k=>{let X=k===null||k===0?f.length-1:k-1;return O(X),X});else if(I.key==="Enter"&&S!==null){let k=f[S];g.current&&(g.current.value=k,d(false),m([]));}}},M=I=>{g.current&&(g.current.value=I,d(false),m([]));},O=I=>{let k=f[I];if(k&&g.current&&(g.current.value=k,g.current.setSelectionRange(k.length,k.length)),x.current){let Y=x.current.children[I];Y&&Y.scrollIntoView({block:"nearest"});}},F=I=>{P.current&&!P.current.contains(I.target)&&(d(false),m([]));},Z=()=>{g.current&&g.current.value===h&&(m(y),R(null),L());};return useEffect(()=>(window.addEventListener("resize",L),window.addEventListener("scroll",L,true),document.addEventListener("mousedown",F),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,true),document.removeEventListener("mousedown",F);}),[]),useEffect(()=>{L();},[f]),jsxs(p,{style:c,ref:P,className:`--autocomplete --${e.size||U.Small} flex aic rel ${u}`.trim(),children:[jsx(fe,{ref:g,autoComplete:"off",onChange:$,onKeyDown:A,onFocus:Z,...l}),jsx(p,{className:"--arrow rel flex aic jcc",children:f.length>0?V.arrowUp:V.arrowDown}),f.length>0&&jsx(et,{id:T,ref:x,className:"--suggestion-list flex cols abs",items:f.map((I,k)=>({label:I,onClick:X=>{X.preventDefault(),X.stopPropagation(),M(I);},className:S===k?"--current":"",animate:{transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:clamp(.02*k,.02,.5)}}))})]})});qn.displayName="Zuz.AutoComplete";var vc=qn;var Xn=forwardRef((e,r)=>{let t=useRef(null),n=useMemo(()=>r&&typeof r!="function"&&r.current?r:t,[r]),{style:o,className:s,rest:a}=B(e,n);return !a.src||a.src==""?null:jsx("img",{ref:n,style:o,className:`${s} flex`,...a})});Xn.displayName="Zuz.Image";var tt=Xn;var Yn=forwardRef((e,r)=>{let{src:t,variant:n,type:o,crossOrigin:s,referrerPolicy:a,fx:l,as:u,alt:c,color:i,style:d,...f}=e,[m,g,P]=useImage(t??"",s,a),{className:x,style:T,rest:S}=B({fx:l,as:u});return jsx(p,{className:`--avatar --${n||U.Small} --${(o||Or.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:i||"var(--avatar-bg, var(--primary))",...d,...T},...S,children:t?jsx(tt,{src:m,crossOrigin:s,referrerPolicy:a,...f}):jsx(K,{className:"--avatar-label",children:(c?c.charAt(0):"A").toUpperCase()})})});Yn.displayName="Zuz.Avatar";var Ec=Yn;var Nc=({size:e=5,type:r="dead",label:t="",variant:n=U.Small,loading:o=false,spinner:s,...a})=>{let{style:l,className:u,rest:c}=B(a);return jsxs(p,{style:{..._$1(t).isEmpty()?{"--badge-size":e}:{},...l},as:`--badge --${n} --${r} rel flex aic jcc ${u}`.trim(),children:[jsx(p,{fx:{transition:Q.FadeIn,curve:oe.Liquid,duration:.5,when:o},as:"abs abc",children:jsx(Ce,{type:s})}),_$1(t).isEmpty()?jsx(p,{as:`--dot --${r}`}):jsx(K,{as:"--label",children:t})]})},Bc=Nc;var Zc=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>format(addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>addDays(new Date,1),getDateFormat:()=>format(addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let e=new Date,r=e.getDay();return addDays(e,(6-r)%7||6)},getDateFormat:()=>{let e=new Date,r=e.getDay();return format(addDays(e,(6-r)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>format(addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>format(addWeeks(new Date,1),"d MMM"),getDate:()=>addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>format(addWeeks(new Date,2),"d MMM"),getDate:()=>addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>format(addWeeks(new Date,4),"d MMM"),getDate:()=>addWeeks(new Date,4)}],Wc=e=>{let r=new Set;return e.filter(t=>{if(t.label=="Later")return true;let n=t.getDate().toISOString().split("T")[0];return r.has(n)?false:(r.add(n),true)})},Qn=forwardRef((e,r)=>{let{defaultValue:t,variant:n,onChange:o,...s}=e,{style:a,className:l,rest:u}=B(s),[c,i]=useState(t||new Date),d=startOfMonth(c),f=endOfMonth(c),m=startOfWeek(d),g=endOfWeek(f),P=useMemo(()=>eachDayOfInterval({start:m,end:g}),[m,g]),x=R=>{o?.(R),i(R);},T=()=>{i(R=>new Date(R.getFullYear(),R.getMonth()-1));},S=()=>{i(R=>new Date(R.getFullYear(),R.getMonth()+1));};return jsxs(p,{as:`--calendar flex --${n||"sm"} ${l}`,style:a,children:[jsx(p,{as:"--calendar-quick-select flex cols flex:1",children:Wc(Zc).map(R=>{let h=R.getDate();return jsxs(_,{onClick:()=>x(h),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(K,{as:"flex:1",children:R.label}),jsx(K,{as:"tar",children:R.getDateFormat()})]},`--dtp-option-label-${R.label}`)})}),jsxs(p,{as:"--calendar-selector flex cols flex:1",children:[jsxs(p,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(K,{as:"flex:1 --calendar-cm bold",children:format(c,"MMMM yyyy")}),jsx(_,{onClick:T,as:"--calendar-chevron",children:V.chevronUpOutline}),jsx(_,{onClick:S,as:"--calendar-chevron",children:V.chevronDownOutline})]}),jsxs(p,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(R=>jsx(K,{as:"--calendar-day",children:R},`--calendar-hd-${R}`)),P.map((R,h)=>{let v=isSameMonth(R,c),y=isSameDay(R,c),b=isToday(R);return jsx(_,{disabled:!v,onClick:()=>x(R),as:["--calendar-day --calendar-dd",`${y?"--calendar-dd-selected":""}`,`${b?"--calendar-dd-current":""}`],children:format(R,"d")},`--calendar-day-${h}-${R.getFullYear()}-${R.getMonth()}-${R.getDay()}`)})]})]})]})});Qn.displayName="Zuz.Calendar";var er=Qn;var no=(t=>(t.Table="table",t.Gooey="gooey",t))(no||{});var os=({ref:e,...r})=>{let{itemCount:t,itemsPerPage:n,startPage:o,pageRange:s,paginationStyle:a,breakLabel:l,prevLabel:u,nextLabel:c,hash:i,loading:d,seperator:f,renderOnZeroPageCount:m,asDots:g,progressBar:P,onPageChange:x,...T}=r,S=useRef(null),R=useMemo(()=>toHash(numberInRange(4,8)),[]),h=useCallback(I=>`${toHash(I,i||6,R)}${f||""}${R}`,[R]),v=useMemo(()=>l||"...",[l]),y=useRef(null),[b,E]=useState({id:i?o?typeof o=="number"?h(o):o:1:o||1,label:o||1});useImperativeHandle(e,()=>({setPage:I=>E(I),getPage:I=>b,setProgress:I=>y.current?.setProgress?.(I),getProgress:()=>y.current?.getProgress?.()??0}),[y.current]);let{style:$,className:L,rest:A}=B(T),M=useCallback(I=>typeof I=="number"?I:+I.label,[]);if(!t)throw new Error('"itemCount" prop is required');let O=useMemo(()=>Math.ceil(t/n),[t,n]),F=useMemo(()=>{let I=[],k=Math.max(M(b)-(s||2),1),X=Math.min(M(b)+(s||2),O);k>1&&I.push({id:i?h(1):1,label:1}),k>2&&I.push({id:-1,label:v});for(let Y=k;Y<=X;Y++)I.push({id:i?h(Y):Y,label:Y});return X<O-1&&I.push({id:-1,label:v}),X<O&&I.push({id:i?h(O):O,label:O}),I},[b]),Z=useCallback(I=>{let k=I;+k.label<1||+k.label>O||(E(k),x?.(k));},[t,n,b]);return F.length<=1&&(m??false)===false?null:jsxs(p,{ref:S,as:`--pagination ${g===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${L}`,children:[jsx(p,{as:"flex flex:1 aic --pgt-btns",children:(F.length>1?F:[{id:1,label:1},{id:-1,label:v}]).map((I,k,X)=>{let Y=(typeof I=="string"?I:I.label)==M(b);return jsx(_,{disabled:I.id==-1||M(b)==+I.label,className:Y?"--current-page":"",onClick:H=>Z(I),children:g===true?P===true&&Y?jsx(Qe,{ref:y}):"":typeof I=="string"?I:I.label},`--pg-${k}-${I.id}`)})}),jsx(p,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(M(b)-1)*n+1} - `,`${Math.min(M(b)*n,t)} of ${t} items`].join(" ")}),jsxs(p,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsx(_,{disabled:M(b)<=1,onClick:I=>Z({id:i?h(M(b)-1):M(b)-1,label:M(b)-1}),children:V.chevronLeftOutline}),jsx(_,{disabled:F.length<=1||M(b)==M(F[F.length-1]),onClick:I=>Z({id:i?h(M(b)+1):M(b)+1,label:M(b)+1}),children:V.chevronRightOutline})]})]})};os.displayName="Zuz.Pagination";var Lt=os;function Jc(e,r){let{items:t,renderItem:n,effect:o="slide",loop:s=true,loopMode:a="infinite",startIndex:l=0,useKeys:u=true,useWheel:c=true,spacing:i=160,rotation:d=20,scaleStep:f=.15,blur:m=4,animation:g="power",showDots:P=false,autoPlay:x=false,autoPlaySpeed:T=3,onChange:S,...R}=e,{className:h,style:v}=B(R),y=useRef(null),b=T/(T>=1e3?1e3:1),E=useCarousel({total:t.length,initialIndex:l,loop:s,useKeys:u,useWheel:c,onChange:O=>{y.current?.setPage({id:O+1,label:O+1}),y.current?.setProgress(0),S?.(O);}}),{pause:$,resume:L,reset:A}=useTimer({duration:b,autoStart:x===true,onProgress:O=>{x===true&&y.current?.setProgress(1-O);},onExpired:()=>{x===true&&E.next(),A();}}),M={...v,"--carousel-spacing":`${i}px`,"--carousel-rotation":`${d}deg`,"--carousel-blur":`${m}px`,"--carousel-scale-step":f,"--active-index":E.index,"--carousel-transition":`var(--${g})`};return jsxs(p,{ref:r,className:`--carousel --effect-${o} --loop-${a} flex cols aic jcc ${h}`.trim(),style:M,children:[jsx(p,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((O,F)=>{let Z=F-E.index;if(a==="infinite"){let k=t.length;Z=((Z+k/2)%k+k)%k-k/2;}let I=F===E.index;return jsx(p,{onMouseEnter:()=>I&&$(),onMouseLeave:()=>I&&L(),className:`--carousel-item-wrapper abs ${I?"--is-active":""}`,style:{"--offset":Z,zIndex:I?100:100-Math.abs(Z),display:Math.abs(Z)>5?"none":"flex"},children:n(O,F,E.index)},F)})}),P&&jsx(Lt,{ref:y,itemCount:t.length,itemsPerPage:1,startPage:l+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:O=>E.goTo(+O.label-1),asDots:true,progressBar:true})]})}var em=forwardRef(Jc),tm=em;var rs=(r=>(r.Line="line",r))(rs||{});var as=forwardRef((e,r)=>{let{data:t,width:n,height:o,lineColor:s,strokeWidth:a=2,gradientStartColor:l,gradientEndColor:u,animated:c,animDuration:i=2,animDelay:d=0,padding:f=0,type:m,...g}=e,{className:P,style:x,rest:T}=B(g),S=useRef(null),R=useResizeObserver(S.current?.parentElement||S),h=typeof n=="number"?n:R.width,v=typeof o=="number"?o:R.height,y={width:h,height:v},b=useId(),{pathD:E,areaPathD:$}=useLineChart(t,y,f+(a||2)),L=useRef(null),A=useRef(null),[M,O]=useState(0),[F,Z]=useState(0);return useEffect(()=>{c&&(L.current&&O(L.current.getTotalLength()),A.current&&Z(A.current.getTotalLength()));},[c,E,$,h,v]),jsx(p,{ref:S,as:`--chart --${m||"line"}-chart ${P}`.trim(),style:{...x,width:n,height:o},...T,children:h>0&&v>0&&jsxs("svg",{viewBox:`0 0 ${h} ${v}`,preserveAspectRatio:"xMidYMid meet",children:[jsx("defs",{children:jsxs("linearGradient",{id:b,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopColor:l}),jsx("stop",{offset:"100%",stopColor:u})]})}),jsx("path",{ref:A,d:$,fill:`url(#${b})`,stroke:"none",style:c?{strokeDasharray:F,strokeDashoffset:F}:{},children:c&&jsx("animate",{attributeName:"stroke-dashoffset",from:F,to:"0",dur:`${i||2}s`,begin:`${d||0}s`,fill:"freeze"})}),jsx("path",{ref:L,d:E,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:c?{strokeDasharray:M,strokeDashoffset:M}:{},children:c&&jsx("animate",{attributeName:"stroke-dashoffset",from:M,to:"0",dur:`${i||2}s`,begin:`${d||0}s`,fill:"freeze"})})]})})});as.displayName="Zuz.Chart";var lm=as;var is=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(is||{}),ls=(c=>(c.Image="img",c.Video="vid",c.Audio="audio",c.Link="link",c.Document="doc",c.Location="loc",c.Contact="contact",c.Event="event",c.Poll="poll",c))(ls||{});var cs=forwardRef((e,r)=>{let{text:t,media:n,side:o="me",status:s=1,timeStamp:a=Date.now(),arrow:l=true,...u}=e,{className:c,style:i,rest:d}=B(u);return jsx(p,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxs(p,{className:`--bubble --bubble-${o} ${n?`--with-media --bma-${n.type}`:""} rel flex cols ${l==true?"--b-arrow":""} ${c}`.trim(),style:{...i},...d,children:[t&&jsx(K,{className:"--bubble-text",children:t}),n?n.type=="audio"?jsxs(p,{as:"flex aic --bubble-audio",children:[jsx(me,{className:"--bm-action",children:V.play}),jsx(Qe,{progress:.7}),jsx(K,{className:"--bm-dur",children:n.duration??"00:13"})]}):n.type=="img"?jsx(p,{as:"--bubble-image",children:jsx(tt,{src:n.source})}):null:null,jsxs(p,{as:"flex aie jce --bubble-stats",children:[jsx(K,{className:"--bubble-stamp tar",children:timeSince(a)}),o=="me"&&jsx(me,{className:`--bubble-status --bs-${s}`,children:s==0?V.pending:s==1?V.done:s==2?V.doneAll:V.doneAll})]})]})})});cs.displayName="Zuz.Bubble";var pm=cs;var ms=forwardRef((e,r)=>{let{style:t,className:n,rest:o}=B(e);return jsx("label",{ref:r,style:t,className:n,...o})});ms.displayName="Zuz.Label";var Mt=ms;var us=({ref:e,...r})=>{let {name:t,required:n,type:o,value:s,size:a,variant:l,checked:u,disabled:c,onSwitch:i,...d}=r,f=it(),m=!!(t&&f.values);m?f.errors?.[t]:null;let P=m?f.values?.[t]:void 0,[x,T]=useState(u||false),S=useRef(null),{variant:R}=j(true),h=useMemo(()=>m&&P!=null?typeof P=="string"?P.toLowerCase()!=="false"&&P!=="":!!P:x,[P,x,m]);useEffect(()=>{S.current&&S.current.checked!==h&&(S.current.checked=h);},[h]),useEffect(()=>{u!==void 0&&T(u);},[u]);let v=y=>{let b=!!y;m&&f.setFieldValue?.(t,b),T(b),i?.(b,s||"cb");};return useImperativeHandle(e,()=>({setChecked(y,b=true){v(y);},toggle(y=true){v(!h);}})),jsxs(Mt,{"aria-hidden":c,className:[`--${(o||Fe.Default).toLowerCase()}`,`${!o||o===Fe.Default?"--checkbox":"--switch"}`,`--${l||R||U.Small}`,`flex aic jcc ${h?"is-checked":""} rel`,`${c?"--disabled":""}`].join(" ").trim(),...d,children:[(!o||o==Fe.Default)&&V.check,jsx(fe,{ref:y=>{S.current=y,e&&(e.current=y);},defaultChecked:h,type:"checkbox",className:"abs",name:t,required:n||false,onChange:y=>{y.stopPropagation(),v(y.target.checked);},disabled:c})]})};us.displayName="Zuz.CheckBox";var Ot=us;var wm=({ref:e,...r})=>{let{code:t,copy:n,lang:o="tsx",showLines:s=false,highlight:a="",as:l,fx:u,...c}=r,i=useRef(null),{className:d,style:f,rest:m}=B({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${l}`,fx:u},i),g=useMemo(()=>{let x=new Set;return a.split(",").forEach(T=>{if(T.includes("-")){let[S,R]=T.split("-").map(Number);for(let h=S;h<=R;h++)x.add(h);}else T&&x.add(Number(T));}),x},[a]),P=useMemo(()=>{let x=t.split(`
9
+ `);for(;x.length>0&&x[0].trim()==="";)x.shift();for(;x.length>0&&x[x.length-1].trim()==="";)x.pop();let T=x[0]?.match(/^\s*/)?.[0].length||0,S=x.map(h=>{let v=h.match(/^\s*/)?.[0].length||0,y=Math.min(v,T);return h.slice(y)}),R=[{name:"comm",re:/\/\/.*/g},{name:"str",re:/(["'`])(?:(?=(\\?))\2.)*?\1/g},{name:"key",re:/\b(const|let|var|export|default|import|from|return|if|else|switch|case|break|as|type|interface|class|extends|await|async|new|void|typeof)\b/g},{name:"tag",re:/(&lt;\/?[A-Z][\w\.]*|&gt;)/g},{name:"var",re:/(?<!&lt;\/|&lt;)\b[A-Z]\w*\b/g},{name:"fn",re:/\b([a-z_]\w*)(?=\s*\()/gi},{name:"prop",re:/\.([a-z_]\w*)\b/gi},{name:"num",re:/\b\d+\b(?![#|A-Z|a-z|_|ZUZ])/g}];return S.map((h,v)=>{let y=h.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),b=g.has(v+1);if(o!="plain"){let E=[];R.forEach($=>{y=y.replace($.re,L=>{let A=`ZUZ_ID_${E.length}_ZUZ`;return E.push(`<span class="--token-${$.name}">${L}</span>`),A});});for(let $=E.length-1;$>=0;$--)y=y.replace(`ZUZ_ID_${$}_ZUZ`,E[$]);}return `<div class="--code-line ${s==true?"--with-ln":""} ${b?"--is-highlighted":""}">
10
10
  ${s==true?`<span class="--line-number">${v+1}</span>`:""}
11
11
  <span class="--line-content">${y||" "}</span>
12
- </div>`}).join("")},[t,g]);return jsxs(p,{as:`--code-block rel ${d}`,style:u,...c,children:[jsx("pre",{ref:e,children:jsx("code",{className:`--code --lang-${o}`,dangerouslySetInnerHTML:{__html:w}})}),n&&jsx(_,{as:"--copy-code abs",onClick:()=>{copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},wm=Sm;var ds=({onSelect:e,meta:r,selected:t,disabled:n=false})=>{let o=useRef(null),{index:s,icon:a,label:l}=r,[f,c]=useState({x:0,width:0}),i=useDelayed();return useLayoutEffect(()=>{if(i&&o.current){let{width:d,x:u}=o.current.getBoundingClientRect();c({x:u,width:d}),t&&e(s,d,u,r,true);}},[i,o.current]),useEffect(()=>{t&&e(s,f.width,f.x,r,false);},[t]),jsxs(_,{disabled:n,onClick:()=>e(s,f.width,f.x,r,false),ref:o,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsx(te,{name:a,as:"--segment-icon"}):jsx(p,{as:"--segment-icon flex aic jcc",children:a}):null,l&&String(l).trim()!=""&&jsx(p,{className:"--segment-label",children:l||`Item ${s}`})]})};ds.displayName="SelectTabItem";var gs=ds;var ys=forwardRef((e,r)=>{let{fx:t,items:n,selected:o,variant:s,disabled:a=false,onSwitch:l,...f}=e,[c,i]=useState(o||0),d=useDelayed(50),u=useRef(c),{className:m,style:g,rest:w}=B(f),x=useRef(null),P=useRef(null),{variant:S}=Q(true),R=(h,v,y,b,E)=>{if((E||c!=h&&c!=-2)&&(i(h),u.current=c,queueMicrotask(()=>{d&&l?.(b);})),x.current){let $=P.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${v}px`),x.current.style.setProperty("--x",`${$?y-$.left:y}px`);}};return useImperativeHandle(r,()=>({setSelected:h=>{typeof h=="number"&&h!=c&&i(h);}}),[c]),jsxs(p,{ref:P,"data-selected":c,className:`${m} --segmented --${s||S||q.Medium} flex aic rel`,style:g,...w,children:[jsx(p,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((h,v)=>jsx(gs,{disabled:a,onSelect:R,selected:c==v,meta:{...h,index:v}},`segment-${h.label}-${v}`))]})});ys.displayName="Zuz.SelectTabs";var Vt=ys;var vs=forwardRef((e,r)=>{let{type:t,variant:n,...o}=e,s=useDelayed(),{colorScheme:a,setColorScheme:l}=No(),f=useCallback(()=>{l(a=="dark"?"light":a=="light"?"system":"dark");},[a]),{variant:c}=Q(true),{className:i,style:d}=B(o),u=useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"system",index:1,label:"",icon:V.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}],[]),m=useMemo(()=>["light","system","dark"].indexOf(a),[a]);return !s||m==-1?null:t=="system"||t=="switch"?jsx(Vt,{className:`--color-scheme --${t}`,onSwitch:({tag:g})=>{l(g);},selected:m,items:u,...o}):jsx(_,{onClick:f,style:d,variant:n,as:`--color-scheme-switch ${i}`.trim(),children:a=="system"?V.colorSchemeSystem:a=="light"?V.colorSchemeLight:V.colorSchemeDark})});vs.displayName="Zuz.ColorScheme";var Am=vs;var ws=forwardRef((e,r)=>{let[t,n]=useState("wait"),{title:o,message:s,acceptLabel:a,rejectLabel:l,position:f}=e,c=async i=>{n(i==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(i));};return useEffect(()=>{let i=localStorage.getItem("--ccnt");n(i?i=="1"?"accepted":"rejected":"pending");},[]),jsxs(p,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:oe.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${f||xe.Left} flex cols`,children:[jsx(K,{as:"--title",children:o||"This site uses cookies"}),jsx(K,{as:"--message",children:s||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxs(p,{as:"--footer flex aic",children:[jsx(_,{onClick:i=>c(1),as:"--accept",children:a||"Accept All"}),jsx(_,{onClick:i=>c(0),as:"--reject",children:l||"Cancel"})]})]})});ws.displayName="Zuz.CookiesConsent";var _m=ws;var Ps=({ref:e,...r})=>{let {title:t,position:n,margin:o=4,anchorName:s="--tooltip-anchor",children:a,show:l,variant:f,...c}=r,{style:i,className:d,rest:u}=B(c),m=n||xe.Top;useRef(null);let [w,x]=useState(false);useRef(6);let S=l===true||w,h=`--anchor-${useId().replace(/:/g,"")}`,{tooltip:v}=Q(true),y=useMemo(()=>{let E=false;return addPropsToChildren(a,$=>{let L=$.props.className?.includes(s);return L&&(E=true),L||!E},($,L)=>{let A=L.props.className?.includes(s),M=$===0,O={};return (A||M)&&(O.style={...L.props.style,anchorName:h}),M&&(O.onMouseEnter=F=>{x(true),L.props.onMouseEnter?.(F);},O.onMouseLeave=F=>{x(false),L.props.onMouseLeave?.(F);}),O})},[a,s,h]),b=be({transition:m==xe.Top?j.SlideInTop:m==xe.Bottom?j.SlideInBottom:m==xe.Left?j.SlideInLeft:j.SlideInRight,when:S,duration:.2,offset:o+6,margin:m==xe.Top||m==xe.Left?-o:o,curve:v?.curve||oe.EaseInOut});return useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxs(Fragment$1,{children:[y,jsx(p,{style:{positionAnchor:h,...b.style,...m===xe.Top||m===xe.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${S} --${f||v?.variant||q.Small} --${m} abs ${d}`.trim(),children:typeof t=="string"?jsx(K,{as:"--text rel",children:t}):t})]})};Ps.displayName="Zuz.ToolTip";var lr=Ps;var Rs=({ref:e,...r})=>{let {type:t,value:n=0,min:o=0,max:s=1,step:a=.01,onChange:l,showGhostBar:f,showKnobOnHover:c,showToolTip:i,roundValue:d,formatValue:u,...m}=r,{className:g,style:w,rest:x}=B(m),P=useRef(a||.01).current,S=useRef(o||0).current,R=useRef(s||1).current,h=useRef(n||0).current,v=useRef(null),y=useRef(null),b=useRef(null),E=useRef(null);useRef(null);let L=useRef(null),A=useRef(null),M=useRef(null),O=useRef(null),F=(re,le,de)=>(re-le)/(de-le)*100,Z=re=>{if(y.current){let le=parseFloat(re.currentTarget.value);ne(le);let de=F(le,parseFloat(re.currentTarget.min),parseFloat(re.currentTarget.max));y.current.style.setProperty("--value",`${de}`),y.current.setAttribute("data-value",`${le}`),l&&l(d?+le.toFixed(2):le);}},[I,k]=useState(false),[X,Y]=useState(0),[H,z]=useState(0),[G,W]=useState(false),ne=async re=>{let le=u?u(+re):d?(+re).toFixed(2):Math.round(+re);M.current&&(M.current.textContent=String(le));},ae=re=>{if(I){let le=re.clientX-X,de=R-S,Ee=le/200*de,Se=Math.max(S,Math.min(H+Ee,R));if(Se=Math.round(Se/P)*P,ne(Se),y.current){let $e=F(Se,S,R);y.current.style.setProperty("--value",`${$e}`),y.current.setAttribute("data-value",`${Se}`),A.current&&(A.current.textContent=d?Se.toFixed(2):Se.toString()),l&&l(Se);}}},pe=()=>{k(false),document.body.style.cursor="auto";},ye=re=>(re-S)/(R-S)*100,ie=re=>{if(!y.current)return;let le=y.current.getBoundingClientRect(),de=re.clientX-le.left,Ae=Math.max(0,Math.min(100,de/le.width*100));if(i&&M.current){let Ee=v.current?+v.current.value:n;ne(Ee*100);}if(f){let Ee=ye(v.current?+v.current.value:n),Se=Math.min(Ee,Ae),$e=Math.abs(Ae-Ee);y.current.style.setProperty("--ghost-start",`${Se}`),y.current.style.setProperty("--ghost-width",`${$e}`);}};useEffect(()=>{y.current&&y.current.style.setProperty("--value",v.current?`${F(parseFloat(v.current.value),parseFloat(v.current.min),parseFloat(v.current.max))}`:h.toString());},[]),useEffect(()=>(I?(document.addEventListener("mousemove",ae),document.addEventListener("mouseup",pe)):(document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",pe)),()=>{document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",pe);}),[I]),useEffect(()=>{let re=F(n,S,R);y.current?.style.setProperty("--value",`${re}`),ne(n);},[n,S,R,M.current]);let U=()=>jsxs(p,{ref:y,onMouseEnter:()=>W(true),onMouseLeave:()=>W(false),onMouseMove:ie,className:`--slider --${t||wo.Default} ${c?"--knob-hover":""} flex rel ${g}`.trim(),style:{...w},children:[jsx(p,{ref:L,className:"--slider-track abs fill"}),f&&jsx(p,{ref:E,className:"--slider-ghost abs fill"}),jsx(p,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsx(p,{ref:b,className:"--slider-knob --tooltip-knob abs"}),jsx(fe,{ref:v,onInput:Z,className:"abs fill",tabIndex:0,type:t||wo.Default,defaultValue:h||0,step:P,max:R,min:S})]});if(i===true){let re=u?u(n):d?n.toFixed(2):n;return jsx(lr,{ref:O,show:I,position:vt.Top,margin:15,anchorName:"--tooltip-knob",title:jsx(me,{ref:M,children:re}),children:U()})}return U()};Rs.displayName="Zuz.Slider";var ct=Rs;var Es=forwardRef((e,r)=>{let{src:t,shape:n,size:o,...s}=e,{style:a,className:l,rest:f}=B(s),{canvasRef:c,crop:i,setScale:d,handleMouseDown:u,handleMouseUp:m,handleMouseMove:g}=useImageCropper(t,o||200,n||CropShape.Circle);return useImperativeHandle(r,()=>({getCropped(){return i()},setScale(w){d(w);}})),jsxs(p,{as:`--cropper --${n||CropShape.Circle} ${l}`,style:a,...f,children:[jsx("canvas",{ref:c,width:o||200,height:o||200,onMouseDown:u,onMouseUp:m,onMouseLeave:m,onMouseMove:g}),jsx(p,{as:"--cropper-slider",children:jsx(ct,{onChange:w=>d(w),min:0,max:1,step:.01,value:1})})]})});Es.displayName="Zuz.Cropper";var ep=Es;var op=(t=>(t.Circle="circle",t.Square="square",t))(op||{});var Bs=forwardRef((e,r)=>{let{items:t,maxItems:n}=e,o=useMemo(()=>{let l=typeof t=="string",f=l?[]:t;return l&&t.split(",").forEach(c=>{f.push({label:c});}),f},[t]),a=useMemo(()=>n&&n>0&&o.length>n-1,[o,n])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-n)]:o;return jsx(et,{ref:r,className:"--crumb flex aic",direction:"rows",seperator:jsx(p,{as:"--crumb-chevron",children:V.chevronRightOutline}),items:a.map((l,f,c)=>l.ID=="."?jsx(p,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsx(p,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${f}`))}):jsxs(_,{onClick:()=>l.action?.(),className:"--crumb-item",disabled:!c[f+1],children:[l.icon&&jsx(te,{as:"--crumb-icon",name:l.icon}),jsx(K,{as:"--crumb-label",children:l.label})]},`${l.label.replace(/\s+/g,"-").toLowerCase()}-${f}`))})});Bs.displayName="Zuz.Crumb";var np=Bs;var Ms=forwardRef((e,r)=>{let{icon:t,defaultValue:n,value:o,size:s,variant:a,numeric:l,type:f,onConfirm:c,...i}=e,[d,u]=useState(false),[m,g]=useState(n||null),{style:w,className:x,rest:P}=B(i),S=useRef(null),R=useRef(null),{reposition:h}=It(R,{direction:xe.Bottom,offset:2}),v=b=>{l&&(b.currentTarget.value=b.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};useEffect(()=>{let b=E=>{let $=E.target,L=S.current?.contains($),A=R.current?.contains($);!L&&!A&&u(false);};return d&&document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b);}},[d]),useEffect(()=>{let b=E=>{E.key==="Escape"&&d&&(u(false),S.current?.focus());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let y=()=>{u(true);};return useEffect(()=>{d&&h();},[d,h]),jsx(Fragment$1,{children:jsxs(p,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${x}`,"data-value":m?m.toISOString():"",children:[t?typeof t=="string"?jsx(te,{as:"mr:10 c:#666",name:t}):t:jsx(me,{as:"--date-picker-icon flex aic jcc",children:V.calendar}),jsx("input",{ref:S,value:m?format(m,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:w,onFocus:y,onInput:v,autoComplete:"new-password",onKeyDown:b=>{b.key=="Enter"&&c?.(b.currentTarget.value);},...P}),jsx(p,{"aria-hidden":!d,ref:R,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:d,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsx(er,{defaultValue:m,onChange:b=>{g(b),u(false);}})})]})})});Ms.displayName="Zuz.DatePicker";var lp=Ms;var Os=forwardRef((e,r)=>{let{icon:t,variant:n,position:o}=e;return jsx(_,{className:`--fab fixed --${n||q.Large} --${o||"bottomright"}`,children:t||V.plus})});Os.displayName="Zuz.Fab";var up=Os;var Vs=e=>{let{names:r,strength:t}=e,n={[zt.Gooey]:o=>jsxs("filter",{id:"gooey",children:[jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:o||10,result:"blur"}),jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${zt.Gooey}`)};return useEffect(()=>{},[r]),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsx("defs",{children:(r||[zt.Gooey]).map(o=>n[o](t))})})};Vs.displayName="Zuz.Filters";var gp=Vs;var Ds=({cols:e,gap:r,ais:t,aic:n,aie:o,jcs:s,jcc:a,jce:l,className:f="",style:c,...i})=>{let d=["--flex",e?"--cols":"",t?"--ais":"",n?"--aic":"",o?"--aie":"",s?"--jcs":"",a?"--jcc":"",l?"--jce":"",f].filter(Boolean).join(" "),u={...c,gap:typeof r=="number"?`${r}px`:r};return jsx(p,{...i,className:d,style:u})};Ds.displayName="Zuz.FlexBox";var De=Ds;var We=null,Re=null,As=forwardRef((e,r)=>{let{title:t,message:n,transition:o,curve:s,speed:a,type:l,actionPosition:f,spinner:c,loadingMessage:i,onShow:d,onHide:u,...m}=e,{className:g,style:w,rest:x}=B(m),[P,S]=useState(t||""),[R,h]=useState(n||""),[v,y]=useState(null),[b,E]=useState(l||Be.Default),$=useMemo(()=>uuid(12),[]),[L,A]=useState(false),M=useRef(null),O=useRef(null),[F,Z]=useState(false),[I,k]=useState(true),X=useRef(null),Y=R;useImperativeHandle(r,()=>({setLoading(z){Z(z);},showDialog(z,G,W,ne){We&&(clearTimeout(We),Re&&clearTimeout(Re),M.current.classList.remove("--wobble"),setTimeout(()=>M.current.classList.add("--wobble"),50),Re=setTimeout(()=>{M.current.classList.remove("--wobble"),Re=null;},500)),E(Be.Dialog),G&&h(G),z&&S(z),W&&y(W.reduce((J,ae)=>(J.push({...ae,key:ae.key||uuid(12)}),J),[])),A(true),setTimeout(()=>ne?ne():()=>{},1e3);},dialog(z,G,W,ne){We&&(clearTimeout(We),Re&&clearTimeout(Re),M.current.classList.remove("--wobble"),setTimeout(()=>M.current.classList.add("--wobble"),50),Re=setTimeout(()=>{M.current.classList.remove("--wobble"),Re=null;},500)),E(Be.Dialog),h(G),S(z),W&&y(W.reduce((J,ae)=>(J.push({...ae,key:ae.key||uuid(12)}),J),[])),A(true),setTimeout(()=>ne?ne():()=>{},1e3);},error(z,G){this.show(z,G,Be.Error);},warn(z,G){this.show(z,G,Be.Warn);},success(z,G){this.show(z,G,Be.Success);},show(z,G,W){We&&(clearTimeout(We),Re&&clearTimeout(Re),O.current=M.current.style.transform,M.current.style.transform="",M.current.classList.remove("--wobble"),setTimeout(()=>{M.current.classList.add("--wobble"),M.current.style.transform=`${O.current} scale(.9)`.trim();},50),Re=setTimeout(()=>{M.current.classList.remove("--wobble"),M.current.style.transform=O.current||"",Re=null;},500)),We=setTimeout(()=>{A(false),We=null,Re=null;},(G||4)*1e3),E(W||Be.Default),h(z),A(true),d?.();},hide(){A(false),u?.();}}));let H=useMemo(()=>{let z={when:L,duration:a||.3,delay:.1};if(b==Be.Dialog){if(o){let{from:G,to:W}=wt(o,20);return {from:G,to:W,curve:s||oe.EaseInOut,...z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:oe.Spring,...z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:oe.Spring,...z}},[L,b]);return useEffect(()=>{X.current&&clearTimeout(X.current),L?k(true):X.current=setTimeout(()=>k(false),1e3);},[L]),b==Be.Dialog?jsxs(Fragment$1,{children:[jsx(Ye,{when:L}),jsxs(p,{className:`--sheet --sheet-${b.toLowerCase()} ${L?"is-visible":""} ${g} fixed`.trim(),style:w,fx:H,...x,ref:M,children:[jsx(Me,{when:F,spinner:c,message:i}),jsxs(p,{className:"--head flex aic rel",children:[jsx(p,{className:`--${P?"title":"dot"} flex aic rel`,children:P||""}),jsx(_,{onClick:z=>A(false),className:"--closer abs",children:"\xD7"})]}),jsx(p,{className:`--body flex aic rel ${v?"":"--no-action"}`.trim(),children:I?Y:null}),v&&jsx(p,{className:`--footer flex aic rel ${f?f==So.Center?"jcc":"":"jce"}`.trim(),children:v.map((z,G)=>jsx(_,{onClick:W=>z.handler?z.handler():z.onClick?z.onClick():console.log("onClick Handler missing"),className:"--action",children:z.label},`sheet-${$}-action-${z.key}`))})]})]}):jsx(p,{className:`--sheet --sheet-${b.toLowerCase()} ${g} abs`.trim(),style:w,...x,fx:H,ref:M,children:L?R:null})}),$s=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;As.displayName="Zuz.Sheet";var Sp=As;var Np=e=>{let r={};for(let t in e){let n=t.split(/[\[\]]+/).filter(Boolean);n.reduce((o,s,a)=>{if(a===n.length-1)o[s]=e[t];else {let l=!isNaN(Number(n[a+1]));o[s]=o[s]||(l?[]:{});}return o[s]},r);}return r},Fs=({ref:e,...r})=>{let {schema:t,name:n,cover:o,spinner:s,errors:a,action:l,children:f,withData:c,beforeSubmit:i,onSubmit:d,onError:u,onSuccess:m,resetOnSuccess:g,...w}=r,{className:x,style:P,rest:S}=B(w),[R,h]=useState(false),v=useRef(null),y=Zo(),b=Nt();Yo();let $=useRef(null),L=useCallback(H=>v.current?v.current.querySelectorAll(H):[],[v.current]),A=H=>({name:H.name||H.getAttribute("name")||H.getAttribute("data-name"),required:H.required?true:H.getAttribute("data-required")?H.getAttribute("data-required")=="true":false,with:H.with||H.getAttribute("with")}),M=H=>{let z=[];return H.querySelectorAll(".--input").forEach(G=>{z.push(G.value);}),z.join("")},O=H=>H.classList.contains("--otp")?M(H):H.classList.contains("--select")?H.querySelector("button.--selected")?.dataset.value:H.classList.contains("--checkbox")||H.getAttribute("type")==="checkbox"?H.checked:H.value,F=useCallback(H=>{let{name:z,required:G,with:W}=A(H),ne=O(H);if(t&&t[z]&&b?.getSnapshot()){let J=t[z](ne,b.getSnapshot().values);if(J===false||typeof J=="string")return typeof J=="string"&&b?.setFieldError(z,J),false}if(G&&(H.type==="checkbox"&&!H.checked||H.classList.contains("--select")&&(ne==="-1"||!ne)||!ne||ne===""))return false;if(W)switch((W.includes("@")?W.split("@")[0]=="match"?Xe.MatchField:W.split("@")[0]:W).toUpperCase()){case Xe.IPV4:return _$1(ne).isIPv4();case Xe.IPV6:return _$1(ne).isIPv6();case Xe.Email:return _$1(ne).isEmail();case Xe.Uri:try{return new URL(ne),!0}catch{return false}case Xe.MatchField:let[ae,pe,ye]=W.split("@"),ie=document.querySelector(`[name=${pe.trim()}]`);if(!ie)return false;switch(ye||"direct-match"){case "if-not-empty":if(ie&&!_$1(ie.value).isEmpty()&&ie.value!=H.value)return false;break;case "direct-match":if(ie&&ie.classList.contains("--otp")&&H.classList.contains("--otp")&&M(ie)!=M(H))return false;if(ie&&ie.value!=H.value)return false;break}break}return true},[t,b]),Z=useCallback(()=>{let H={},z={...b?.getSnapshot().values||{}},G=null,W=null;if(L("[name]").forEach(J=>{let{name:ae,required:pe,with:ye}=A(J),ie=pe||ye?F(J):true,ce=O(J);H[ae]={valid:ie,value:ce},z[ae]=ce,b?.setFieldError(ae,ie?null:a?.[ae]||"Invalid"),ie?J.classList.remove("--with-error"):(J.classList.add("--with-error"),G||(G=J),W=a?.[ae]);}),G){let J=G;if(J.classList.contains("--otp"))for(let ae of Array.from(J.querySelectorAll(".--input"))){let pe=ae;if(pe.value==""){pe.focus();break}}else J.focus();}let ne=Np(z);return {error:G!=null,errorMsg:W||"Fix errors to continue...",data:H,payload:ne}},[v.current,b]),I=useCallback((H={})=>{let{error:z,errorMsg:G,payload:W,data:ne}=Z();if(z){y.error(G);return}l?startTransition(async()=>{h(true),withPost(l,{...c,...W,...H}).then(J=>{h(false),g&&b?.reset(),m?.(J,{...c,...W,...H}),m||y.success(J.message||"Redirecting...");}).catch(J=>{h(false),u?u(J):y.error(J.message);});}):d?.(W,ne);},[Z,l,c,m,u,g,d]),k=useCallback(()=>{let H=L("[type=submit]");!H||H.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):H.forEach(z=>{z.addEventListener("click",I);});},[v.current]),X=useMemo(()=>addPropsToChildren(f,H=>H.props.type=="submit",H=>({ref:$})),[f]),Y=useRef(I);return useImperativeHandle(e,()=>({setLoading:H=>h(H),submit:H=>Y.current(H),init:k,hideError:()=>y.clearAll()}),[I,k]),useEffect(k,[]),useEffect(()=>{Y.current=I;},[I]),useEffect(()=>{let H=L("[type=submit]"),z=Array.from(H).map(G=>{let W=G;return W.addEventListener("click",I),()=>W.removeEventListener("click",I)});return ()=>z.forEach(G=>G())},[I,L]),jsxs(p,{ref:v,style:P,className:`--form flex rel ${x}`,children:[!$s(o)&&jsx(Me,{when:R,spinner:s,...o}),X]})};Fs.displayName="Zuz.FormInternal";var zs=e=>jsx($n,{initialValues:e.withData,children:jsx(Fs,{...e})});zs.displayName="Zuz.Form";var Bp=zs;var _s=e=>{let {ref:r,cols:t,rows:n,gap:o,gapX:s,gapY:a,align:l,justify:f,inline:c,flow:i,autoCols:d,autoRows:u,template:m,...g}=e;useRef(null);let {className:x,style:P,rest:S}=B(g),R=v=>typeof v=="number"?`repeat(${v}, 1fr)`:v,h={display:c?"inline-grid":"grid",gridTemplateColumns:R(t),gridTemplateRows:R(n),gap:o,columnGap:s,rowGap:a,alignItems:l,justifyContent:f==="between"?"space-between":f==="around"?"space-around":f,gridAutoFlow:i,gridAutoColumns:d,gridAutoRows:u,gridTemplateAreas:m,...P};return jsx(p,{ref:r,as:`--grid ${x}`.trim(),style:h,...S})};_s.displayName="Zuz.Grid";var Mp=_s;var Ks=e=>typeof e=="string"&&e.includes("+"),Zs={command:"\u2318",shift:"\u21E7",ctrl:"\u2303",option:"\u2325",enter:"\u21B5",delete:"\u232B",escape:"\u238B",tab:"\u21E5",capslock:"\u21EA",up:"\u2191",right:"\u2192",down:"\u2193",left:"\u2190",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2196",end:"\u2198",help:"?",space:"\u2423",fn:"Fn",win:"\u2318",alt:"\u2325"},Ws={command:"Command",shift:"Shift",ctrl:"Control",option:"Option",enter:"Enter",delete:"Delete",escape:"Escape",tab:"Tab",capslock:"Caps Lock",up:"Up",right:"Right",down:"Down",left:"Left",pageup:"Page Up",pagedown:"Page Down",home:"Home",end:"End",help:"Help",space:"Space",fn:"Fn",win:"Win",alt:"Alt"};var Us=forwardRef(({children:e,keys:r,as:t,className:n,variant:o},s)=>{let{variant:a}=Q(true),l=useMemo(()=>{if(Ks(r)){let f=null;return {keys:String(r).split("+").reduce((i,d,u,m)=>(m[u+1]?i.push(d):f=d.toUpperCase(),i),[]),children:f}}return {keys:r,children:String(e).toUpperCase()}},[r]);return jsxs(p,{as:`--keyboard-keys --${o||a||q.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(l.keys)?l.keys:[l.keys]).map(f=>jsx("abbr",{title:Ws[f],children:Zs[f]},f)),jsx(me,{children:l?.children??e})]})});Us.displayName="Zuz.KeyboardKeys";var xr=Us;var Ys=createContext(null),ut=()=>{let e=useContext(Ys);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},zp=({ref:e,icons:r,children:t,...n})=>{let{playlist:o=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:l="No Track",defaultCover:f,onTrackChange:c,...i}=n,{className:d,style:u,rest:m}=B(i),g=useMediaPlayer(o,o[0]??void 0),w=useMemo(()=>({play:V.play,pause:V.pause,prev:V.prev,next:V.next,volumeHigh:V.volumeHigh,volumeMute:V.volumeMute,...r}),[r]),x=useMemo(()=>({...g,mode:s,icons:w}),[g,w]);return jsx(Ys.Provider,{value:x,children:jsx(p,{className:`--zuz-media-player ${d}`,style:u,children:t})})},js=zp;var Qs=e=>{if(!e||isNaN(e))return "0:00";let r=Math.floor(e/60),t=Math.floor(e%60);return `${r}:${t.toString().padStart(2,"0")}`},co=e=>typeof e=="string"?jsx(te,{name:e}):e,Js=()=>{let{mediaRef:e,state:r,controls:t,mode:n}=ut();return jsxs(p,{as:`--mediaplayer-stage rel --mode-${n}`,children:[n==="video"?jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsx("audio",{ref:e}),r.isLoading&&jsx(p,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsx(Ce,{})})]})},ea=()=>{let{state:e,defaultArtist:r,defaultTitle:t,defaultCover:n}=ut();return jsxs(p,{as:"--track-info flex aic",children:[jsx(tt,{src:e.currentItem?.cover||n||"",as:"--track-cover"}),jsxs(p,{as:"flex cols",children:[jsx(p,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsx(p,{as:"--track-artist",children:e.currentItem?.artist||r||"..."})]})]})},ta=()=>{let{state:e,controls:r,icons:t}=ut();return jsxs(p,{as:"--mediaplayer-controls flex aic",children:[jsx(_,{onClick:r.prev,as:"--prev",children:co(t?.prev??V.prev)}),jsx(_,{onClick:r.togglePlay,as:"--play-pause",children:co(e.isPlaying?t?.pause??V.pause:t?.play??V.play)}),jsx(_,{onClick:r.next,as:"--next",children:co(t?.next??V.next)})]})},oa=()=>{let{state:e,controls:r,mediaRef:t}=ut(),n=e.progress*(e.duration||0);return jsxs(p,{as:"--track-progress flex aic",children:[jsx(p,{as:"--track-current-duration",children:Qs(n)}),jsx(ct,{value:e.progress,onClick:o=>{let s=o.currentTarget.getBoundingClientRect(),a=(o.clientX-s.left)/s.width;r.seek(a);}}),jsx(p,{as:"--track-total-duration",children:Qs(e.duration)})]})},ra=()=>{let{state:e,controls:r,icons:t}=ut();return jsxs(p,{as:"--volume-control flex aic gap:8 w:120",children:[jsx(_,{onClick:()=>r.setIsMuted(),children:co(e.isMuted?t?.volumeMute??V.volumeMute:t?.volumeHigh??V.volumeHigh)}),jsx(ct,{value:e.volume,className:"h:3 flex:1",onClick:n=>{let o=n.currentTarget.getBoundingClientRect();r.setVolume((n.clientX-o.left)/o.width);}})]})};var _p=Object.assign(js,{Stage:Js,TrackInfo:ea,Controls:ta,Progress:oa,Volume:ra}),Kp=_p;var sa=forwardRef((e,r)=>{let t=useNetworkStatus(),{onlineMessage:n,offlineMessage:o,variant:s}=e;return jsxs(p,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:t==false,curve:oe.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||q.Small} fixed flex`,children:[jsx(p,{className:"--ico",children:t?V[Ne.Success]:V[Ne.Error]}),jsx(K,{as:"--message",children:t?n||"internet connection restored :)":o||"no internet connection"})]})});sa.displayName="Zuz.NetWorkManager";var Gp=sa;var ia=forwardRef((e,r)=>{let{strenthMeter:t,onChange:n,...o}=e;"type"in o&&delete o.type;let{style:s,className:a,rest:l}=B(o),[f,c]=useState(false),[i,d]=useState(""),u=useMemo(()=>checkPasswordStrength(i),[i]),m=useDebounce(g=>{t&&d(g.target.value),n&&n(g);},100);return useEffect(()=>{},[]),jsxs(p,{as:"w:100% flex cols",children:[jsxs(p,{style:s,className:"--password flex aic rel",children:[jsx(fe,{ref:r,type:f?"text":"password",className:a,onChange:m,...l}),jsx(_,{tabIndex:-1,onClick:()=>c(g=>!g),className:"--toggle flex aic jcc abs",children:f?V.eye:V.eyeSlash})]}),t&&jsxs(p,{as:`flex aic --password-meter --pb-score-${u.score}`,style:s,children:[jsxs(p,{as:"--password-bars flex aic",children:[jsx(p,{as:`--pbar ${u.score>=1?"--pb-on":""}`.trim()}),jsx(p,{as:`--pbar ${u.score>=2?"--pb-on":""}`.trim()}),jsx(p,{as:`--pbar ${u.score>=3?"--pb-on":""}`.trim()}),jsx(p,{as:`--pbar ${u.score>=4?"--pb-on":""}`.trim()}),jsx(p,{as:`--pbar ${u.score>=5?"--pb-on":""}`.trim()})]}),jsx(K,{as:"--password-meter-label","aria-hidden":true,children:u.result})]})]})});ia.displayName="Zuz.Password";var Jp=ia;var ca=forwardRef((e,r)=>{let{size:t,length:n,mask:o,...s}=e,a=useRef([]),l="pinput",f=false,c={};"with"in s&&(c={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(l=s.name,delete s.name),"required"in s&&(f=true,delete s.required);let{style:i}=B(s),d=m=>{let g=m.currentTarget,w=a.current[parseInt(g.dataset.index)+1],x=a.current[parseInt(g.dataset.index)-1];g.value.length===1&&w?w.focus():g.value.length===0&&x&&x.focus();},{variant:u}=Q(true);return useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsx(p,{name:l,style:i,className:`--otp --${s.variant??u??q.Medium} flex aic rel`,"data-required":f,"data-size":t||n||4,...c,children:Array(t||n||4).fill(1).map((m,g)=>jsx(fe,{autoComplete:"new-password","data-index":g,ref:w=>{a.current[g]=w;},numeric:true,onChange:d,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${g}`))})});ca.displayName="Zuz.PinInput";var ru=ca;var ma=forwardRef((e,r)=>{let{children:t,className:n,name:o,required:s,type:a,value:l,variant:f,checked:c,onSwitch:i,...d}=e,[u,m]=useState(c||false),{variant:g}=Q(true),w=useRef(null);return jsxs(Mt,{className:`${n} --${(a||Co.Default).toLowerCase()} --radio${!a||a==Co.Default?"":"card"} --${f||g||q.Small} flex aic rel`.trim(),...d,children:[jsx(fe,{ref:w,defaultChecked:u,value:l||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:x=>{i&&i(x.target.checked,l||"cb"),m(x.target.checked);}}),jsx(p,{className:"--dot rel",children:jsx(p,{className:"--rod abs abc"})}),jsx(p,{className:"--value",children:t})]})});ma.displayName="Zuz.Radio";var iu=ma;var pa=forwardRef((e,r)=>{let{fx:t,withStyle:n,as:o,reverse:s=false,searchIcon:a=V.search,hideSearchIcon:l=false,clearIcon:f=V.close,hideClearIcon:c=false,onChange:i,onClear:d,...u}=e,{style:m,className:g}=B({as:e.as}),[w,x]=useState(""),{variant:P}=Q(true),S=useRef(null);"type"in e&&delete e.type;let R=v=>{x(v.target.value),i?.(v.target.value);},h=v=>{w.trim()!==""&&(x(""),i?.(""),S.current&&(S.current.value="",e.onConfirm?.("")));};return useImperativeHandle(r,()=>({focus:()=>S.current?.focus(),value:()=>S.current?.value})),useEffect(()=>{},[]),jsxs(p,{style:m,className:`--search --no-shrink ${s?"--search-rev":""} --${e.variant||P||q.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${g}`.trim(),children:[jsx(fe,{ref:S,onChange:R,...u}),e.shortcut&&jsx(xr,{keys:e.shortcut,as:"abs"}),jsx(_,{tabIndex:-1,onClick:v=>h(),className:"--send flex aic jcc",variant:e.variant||q.Medium,children:w!==""?!c&&(typeof f=="string"?jsx(te,{name:f,as:"--search-action"}):f):!l&&(typeof a=="string"?jsx(te,{name:a,as:"--search-action"}):a)})]})});pa.displayName="Zuz.Search";var br=pa;var gu=({label:e,icon:r})=>jsxs(p,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[r&&jsx(te,{name:r}),jsx(K,{as:"--select-group-label",children:e})]}),fa=gu;var ga=({checkIcon:e,selected:r,updateValue:t,o:n})=>{let o=e?typeof e=="string"?jsx(te,{name:"checkIcon"}):e:V.check,s=n.disabled===true;return jsxs(_,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${r?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxs(De,{as:"--option-item-meta --aic",children:[n.icon&&jsx(te,{name:n.icon,as:`--select-option-icon --icon-${n.value}`,color:n.iconColor}),jsx(K,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),r&&jsx(De,{aic:true,jcc:true,as:"--select-option-check --abs",children:o})]})};ga.displayName="Option";var ha=ga;var xa=(({ref:e,...r})=>{let{selected:t,options:n,label:o,name:s,variant:a,search:l,searchPlaceholder:f,maxHeight:c,arrowDownIcon:i=V.arrowDown,arrowUpIcon:d=V.arrowUp,expanded:u,multiple:m,tokenizer:g,wrapTokens:w,disabled:x,checkIcon:P,closeIcon:S,editable:R,editablePlaceholder:h,onChange:v,required:y,with:b,...E}=r,$=Nt(),L=!!(s&&$?.setFieldValue),A=An(s),M=Hn(s),O=R===true&&m!==true&&g!==true,F=N=>typeof N=="string"||typeof N=="number",Z=N=>typeof N=="object"&&N!==null&&!Array.isArray(N)&&"value"in N&&"label"in N,I=N=>n.find(ee=>String(ee.value)===String(N)),k=N=>{if(N==null)return null;if(O&&N==="")return "";if(m||g)return (Array.isArray(N)?N:[N]).map(ge=>F(ge)?I(ge):ge).filter(ge=>Z(ge));if(F(N)){let ee=I(N);return ee||(O?String(N):null)}return Z(N)?N:null},X=()=>{if(t!==void 0)return k(t);let N=n.find(ee=>String(ee.value)==="-1");return N||(O?"":null)},Y=N=>Array.isArray(N)?N.map(ee=>ee.value):Z(N)?N.value:N,[H,z]=useState(()=>X()),[G,W]=useState(false),[ne,J]=useState(null),ae=useRef(null),pe=useRef(null),ye=useRef(null),ie=useId(),ce=useMemo(()=>s||ie,[s,ie]),{reposition:U}=It(ye,{direction:vt.Bottom,offset:2}),{variant:re}=Q(true),le=S?typeof S=="string"?jsx(te,{name:S}):S:V.close,{className:de,style:Ae,rest:Ee}=B(E,void 0),{onClick:Se,...$e}=Ee||{},se=useMemo(()=>M!==void 0?k(M):H,[M,H,n,O,m,g]),qe=useMemo(()=>{if(!(!se||Array.isArray(se)||!Z(se)))return se},[se]),Nr=useMemo(()=>O?Z(se)?String(se.value??""):F(se)?String(se):"":"",[O,se]),Ga=N=>Array.isArray(se)?se.some(ee=>ee.value===N.value):Z(se)?se.value===N.value:O&&F(se)?String(se)===String(N.value):false,st=N=>{if(L&&$?.setFieldValue&&s){$.setFieldValue(s,Y(N));return}z(N);},bt=N=>{v?.(R===true&&N instanceof Option?String(N.value):N);},Ua=N=>{if(!(x||N.disabled)){if(m||g){let ee=Array.isArray(se)?se:[],Ie=ee.find(bo=>bo.value===N.value)?ee.filter(bo=>bo.value!==N.value):[...ee,N];st(Ie),bt(Ie);return}st(N),W(false),bt(N);}},qa=N=>{let ee=N.target.value,ge=ee===""?null:I(ee),Ie=ge?ge.value:ee;st(Ie),bt(Ie);},Xa=N=>{if(N.key==="Enter"&&(N.preventDefault(),O)){let ee=N.currentTarget.value.trim();if(!ee){W(false);return}let Ie=I(ee)??ee;st(Ie),bt(Ie),W(false);}},Ya=(N,ee)=>{if(N.stopPropagation(),x)return;let ge=se.filter(Ie=>Ie.value!==ee.value);st(ge),W(false),bt(ge);},ja=N=>{let ee=N.currentTarget,ge=ee.scrollTop===0&&N.deltaY<0,Ie=ee.scrollHeight-ee.scrollTop===ee.clientHeight&&N.deltaY>0;!ge&&!Ie||N.preventDefault(),N.stopPropagation();};useImperativeHandle(e,()=>({setSelected:N=>{st(k(N));},getValue:()=>se??null}),[se,n,O,m,g,L,s]),useEffect(()=>{L||t===void 0||z(k(t));},[t,L,n,O,m,g]),useEffect(()=>{if(!G)return;let N=()=>{U();};return window.addEventListener("scroll",N,true),window.addEventListener("resize",U),()=>{window.removeEventListener("scroll",N,true),window.removeEventListener("resize",U);}},[G,U]),useEffect(()=>{if(!G){pe.current&&(pe.current.value=""),J(null);return}pe.current?.focus(),U();let N=ge=>{ae.current&&!ae.current.contains(ge.target)&&W(false);},ee=setTimeout(()=>{document.addEventListener("click",N);},0);return ()=>{clearTimeout(ee),document.removeEventListener("click",N);}},[G,U]);let Qa=useDebounce(N=>J(N===""?null:N),300),Ja=useDebounce(qa,300);return jsxs(p,{ref:ae,"data-required":y?"true":void 0,with:b,className:[`--select ${u==true?"--expanded":""}`,`--${a||re}`,`${s?`--${s}`:""}`,`${A?"--has-error":""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:ce,children:[O?jsxs(p,{"data-value":qe?.value??(Nr||"-1"),className:`--select-display --selected --editable flex aic rel ${de}`.trim(),style:Ae,onClick:N=>N.stopPropagation(),...$e,children:[qe?.icon&&jsx(te,{as:"--selected-icon",name:qe.icon}),jsx(De,{aic:true,as:"--label-wrapper",children:jsx(fe,{"aria-expanded":G,className:"--select-input",disabled:x,onChange:Ja,onClick:N=>{N.stopPropagation(),x||W(true);},onKeyDown:Xa,placeholder:h||o||"Choose",type:"text",defaultValue:Nr})}),jsx(_,{className:"--select-toggle rel flex aic jcc",disabled:x,onClick:N=>{N.stopPropagation(),x||W(ee=>!ee);},tabIndex:-1,withLabel:false,children:G?typeof d=="string"?jsx(te,{name:d,as:"--search-action"}):d:typeof i=="string"?jsx(te,{name:i,as:"--search-action"}):i})]}):jsxs(_,{disabled:x,variant:a||re,"data-value":qe?.value??"-1",className:`--select-display --selected flex aic rel ${de}`.trim(),withLabel:false,style:Ae,onClick:N=>{N.stopPropagation(),x||W(ee=>!ee);},...$e,children:[qe?.icon&&jsx(te,{as:"--selected-icon",name:qe.icon}),jsx(De,{aic:true,as:"--label-wrapper",children:g&&Array.isArray(se)&&se.length>0?jsxs(De,{as:`--tokens-wrap${w===true?" --wrap":""}`,children:[se.map(N=>jsxs(De,{aic:true,as:"--token",children:[jsx(K,{as:"--token-label",children:N.label}),jsx(p,{as:"--token-remove",onClick:ee=>Ya(ee,N),children:le})]},N.value)),se.length<n.length&&jsx(K,{as:"--label",children:o||"Choose"})]}):jsx(K,{as:"--label",children:Array.isArray(se)?se.length>0?`${se.length} selected`:o||"Choose":qe?.label||o||"Choose"})}),jsx(p,{className:"--svg-arrow rel flex aic jcc",children:G?typeof d=="string"?jsx(te,{name:d,as:"--search-action"}):d:typeof i=="string"?jsx(te,{name:i,as:"--search-action"}):i})]}),jsxs(p,{id:ce,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!G,onWheel:ja,style:{maxHeight:c||"auto"},ref:ye,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:G,duration:.05},children:[l&&jsx(p,{as:"--select-search --no-shrink flex --sticky",children:jsx(br,{ref:pe,variant:q.Small,placeholder:f||"Search...",onChange:Qa})}),o&&jsx(fa,{label:o}),n?.filter(N=>!ne||N.label.toLowerCase().includes(ne.toLowerCase()))?.map(N=>jsx(ha,{updateValue:Ua,checkIcon:P,selected:Ga(N),o:N},`option-${N.label.replace(/\s+/g,"-")}-${N.value}`))]})]})});xa.displayName="Zuz.Select";var bu=xa;var ba=({ref:e,...r})=>jsx(Ot,{type:Fe.Switch,...r,ref:e});ba.displayName="Zuz.Switch";var vu=ba;var Sa=e=>{let{idx:r,id:t,as:n,weight:o,style:s,value:a,render:l,resize:f,sortBy:c,sortable:i,onSort:d}=e,[u,m]=useState(0),g=()=>{i&&(d?.(String(t),u==1?-1:1),m(w=>w==1?-1:1));};return jsxs(p,{style:{flex:o||1,...s},as:`--col flex aic ${n||""} ${i?"--sortable":""}`,onClick:g,children:[jsx(p,{as:"--colv",children:a}),r==-1&&i&&c==t&&jsx(p,{as:"--arrow flex aib",children:u==1?V.arrowUp:V.arrowDown})]})};Sa.displayName="Zuz.Column";var go=Sa;var Ca=e=>{let{index:r,pubsub:t,schema:n,data:o,ids:s,styles:a,animate:l,sortBy:f,selectable:c,tableRef:i,loading:d,rowClassName:u,onSort:m,onRowClick:g,onSelect:w,onContextMenu:x}=e,P=useDelayed(),S=useMemo(()=>({transition:j.SlideInBottom,curve:oe.EaseInOut,delay:.02*(r+1)}),[]),R=useRef(null),h=(y,b)=>{r==-1?t.emit(`ALL_ROWS_${y?"CHECKED":"UNCHECKED"}`,y):(w&&w(o,y),t.emit(`ROW_${y?"CHECKED":"UNCHECKED"}`,y,b));},v=(y,b,E)=>jsx(go,{idx:y,id:b,as:"--selector",pubsub:t,value:jsx(Ot,{value:E,ref:R,onSwitch:h,type:Fe.Default})});return useEffect(()=>{let y=(L,A)=>{R.current?.setChecked(L,false);},b=(L,A)=>{let M=false;i?.current&&i.current.querySelectorAll(".--row").forEach(O=>{let F=O;if(!F.classList.contains("--row-head")){let Z=F.querySelector(".--selector input[type=checkbox]");Z&&Z.checked&&!M&&(M=Z.checked);}}),R.current.setChecked(M,false);},E=L=>{R.current?.setChecked(L,false),w&&w(o,L);},$=L=>{R.current?.setChecked(L,false),w&&w(o,L);};return r==-1?(t.on("ROW_CHECKED",y),t.on("ROW_UNCHECKED",b),()=>{t.off("ROW_CHECKED",y),t.off("ROW_UNCHECKED",b);}):(t.on("ALL_ROWS_CHECKED",E),t.on("ALL_ROWS_UNCHECKED",$),()=>{t.off("ALL_ROWS_CHECKED",E),t.off("ALL_ROWS_UNCHECKED",$);})},[]),jsxs(p,{onContextMenu:y=>x?x(y,o):null,onClick:y=>g?g(y,e.data):()=>{},...l?{fx:{...S,when:P}}:{},as:`--row flex aic ${g?"--row-clickable":""} ${r==-1?"--row-head":""} ${u||""}`,children:[r==-1&&n.map((y,b)=>{let{renderWhenHeader:E,render:$,value:L,...A}=y;return jsxs(Fragment,{children:[c&&b==0&&v(-1,`--selector-${y.id}`,"all"),jsx(go,{idx:-1,onSort:m,sortBy:f,value:L,...A,pubsub:t,style:a[y.id]})]},`--col-${y.id}`)}),d&&r>-1&&jsx(p,{as:"--col",children:jsx(K,{as:"opacity:0",children:"..."})}),!d&&r>-1&&s&&o&&n.map((y,b)=>jsxs(Fragment,{children:[c&&b==0&&v(b,`--selector-${y.id}`,y.id.toString()),s.includes(String(y.id))?jsx(go,{pubsub:t,idx:b,id:String(y.id),style:a[String(y.id)],value:y.render?y.render(o,r):o[String(y.id).includes(".")?String(y.id).split(".").reverse()[0]:y.id]}):null]},`--${String(y.id)}-val-${b}`))]})};Ca.displayName="Zuz.Row";var ho=Ca;var Ia=(e,r)=>{let{schema:t,rows:n,rowCount:o,rowsPerPage:s,currentPage:a,pagination:l,paginationHash:f,showPaginationOnZeroPageCount:c,animateRows:i,header:d,rowClassName:u,selectableRows:m,hoverable:g,sortBy:w,loading:x,loadingRowCount:P,loadingMessage:S,spinner:R,emptyMessage:h,onSort:v,onRowClick:y,onRowSelectToggle:b,onPageChange:E,onRowContextMenu:$,...L}=e,A=useRef(null),M=useMemo(()=>t.reduce((ce,U)=>(ce[U.id]={flex:U.weight||1,...U.w&&{width:U.w},...U.maxW&&{maxWidth:U.maxW},...U.minW&&{minWidth:U.minW},...U.h&&{height:U.h},...U.maxH&&{maxHeight:U.maxH},...U.minH&&{minHeight:U.minH}},ce),{}),[t]),O=useMemo(()=>Object.keys(M),[t]),F=useMemo(()=>d??true,[d]),{style:Z,className:I,rest:k}=B(L),X=useRef(null),Y=useMemo(()=>new PubSub,[]),H=useRef(n.map(()=>uuid(8))),[z,G]=useState(w||null),[W,ne]=useState(S||"loading"),J=useMemo(()=>!x&&n&&n.length==0,[x,n]),ae=useCallback(()=>h?typeof h=="function"?jsx(h,{}):h:jsx(K,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);useEffect(()=>{n.length&&!H.current&&(H.current=n.map(()=>uuid(8)));},[n]);let pe=(ce,U)=>{G(ce),v?.(ce,U);},ye=(o||(n?n.length:0))/(s||10),ie=useMemo(()=>c||ye>1?jsx(Lt,{hash:f,ref:A,renderOnZeroPageCount:c,onPageChange:E,paginationStyle:"table",startPage:a,itemCount:o||(n?n.length:0),itemsPerPage:s||10}):null,[a,o]);return useImperativeHandle(r,()=>({setLoading(ce){}})),jsxs(p,{as:`--table ${g??true?"--hoverable":""} flex cols rel ${I}`,ref:X,children:[F==true&&jsx(ho,{sortBy:z,onSort:pe,tableRef:X,pubsub:Y,selectable:m,index:-1,schema:t,loading:true,styles:M}),x&&jsxs(p,{as:"center-x flex aic --table-spinner",children:[jsx(Ce,{type:R||ve.Simple}),W&&jsx(K,{as:"--table-loading-message",children:W})]}),x&&Array(P||5).fill({}).map((ce,U)=>jsx(ho,{tableRef:X,index:U,pubsub:Y,schema:t,styles:M,loading:true,animate:i,onRowClick:y},`--trow-loading-${U}-${t[0].id}`)),!x&&n&&n.map((ce,U)=>jsx(ho,{tableRef:X,pubsub:Y,loading:false,index:U,schema:t,ids:O,styles:M,animate:i,data:ce,onRowClick:y,rowClassName:u,selectable:m,onSelect:b,onContextMenu:$},`--trow-${H.current[U]||U}-${t[0].id}`)),J&&ae(),l&&ie&&jsx(p,{"aria-hidden":!l||!ie,...i?{fx:{transition:j.SlideInBottom,curve:oe.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&l&&ie!=null}}:{},as:"--row flex aic --row-footer",children:ie})]})};Ia.displayName="Zuz.Table";var Mu=forwardRef(Ia),Ou=Mu;var Du=({ref:e,...r})=>{let{title:t,items:n}=r,[o,s]=useState(0),a=(l,f,c)=>{l.preventDefault(),s(f),document.getElementById(c)?.scrollIntoView({behavior:"smooth"});};return jsxs(p,{ref:e,as:"--table-of-contents rel flex cols",children:[jsx(K,{as:"--toc-title",children:t}),jsx(et,{items:n.map((l,f)=>jsx("a",{className:o==f?"--toc-active":"",style:{anchorName:o===f?"--toc-active":"none",color:o==f?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:c=>a(c,f,l.tag),href:`#${l.tag}`,children:l.label}))})]})},Hu=Du;var Ea=({isActive:e,transitionType:r,speed:t,width:n,render:o,content:s,onHeightChange:a})=>{let l=useRef(null),f=useResizeObserver(l);useEffect(()=>{e&&f.height>0&&a(f.height);},[e,f.height]);let i=useMemo(()=>{let d={width:n>0?`${n}px`:"100%",minWidth:n>0?`${n}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return r==="fade"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,visibility:e?"visible":"hidden",transition:`opacity ${t}s ease-in-out`,zIndex:e?1:0}:r==="scale"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,transform:`scale(${e?1:.95})`,transition:`all ${t}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:e?1:0}:d},[e,r,n,t]);return jsx(p,{ref:l,style:{...i},className:"--content",children:o||e?s:null})};Ea.displayName="Zuz.TabBody";var Na=Ea;var La=({ref:e,...r})=>{let{tabs:t,speed:n=.3,prerender:o=true,variant:s,tabStyle:a="fixed",onChange:l,transitionType:f="slide",...c}=r,[i,d]=useState(0),u=useRef(null),m=useResizeObserver(u),g=useMemo(()=>uuid(8),[]),[w,x]=useState("auto"),P=useMemo(()=>m.width>0,[m.width]);useImperativeHandle(e,()=>({setTab:b=>d(b)}));let S=useMemo(()=>t.map(b=>({...b,key:b.key||uuid(8)})),[t]),{style:R,className:h,rest:v}=B({as:`flex cols w-full no-overflow ${c.as||""}`,...c}),y=()=>{if(!P)return {opacity:0};switch(f){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${S.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${i*m.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxs(p,{ref:u,style:R,className:`--tabview --${a} flex cols ${h}`,children:[jsx(Vt,{as:"--tabview-head",onSwitch:b=>{d(b.index);let E=S.find($=>$.tag==b.tag);E&&E.onSelect&&(E.onSelect(E,b.index),l?.(E,b.index));},selected:i,items:S.reduce((b,E,$)=>(b.push({icon:E.icon,index:$,label:E.label,tag:E.tag}),b),[])}),jsx(p,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:w,transition:P?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:P?1:0},children:jsx(p,{className:"--track",style:{...y()},children:S.map((b,E)=>jsx(Na,{isActive:E===i,transitionType:f,speed:n,width:m.width,render:o||E===i,onHeightChange:$=>E===i&&x($),content:b.body},`tab-body-${b.key||E}-${g}`))})})]})};La.displayName="Zuz.TabView";var Uu=La;var ju=({ref:e,commands:r,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...a})=>{let[l,f]=useState([{type:"output",content:n}]),[c,i]=useState(""),d=useRef(null),u=useRef(null),{variant:m}=Q(true);useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight);},[l]);let g=h=>{let v=typeof h=="string"?{type:"output",content:h}:h;f(y=>{let b=[...y,v];return b.length>1e3?b.slice(-1e3):b});},w=()=>f([]);useImperativeHandle(e,()=>({write:g,clear:w}));let x=async h=>{let[v,...y]=h.split(" "),b=v.toLowerCase();return r&&r[b]?await r[b](y):t?await t(h):`command not found: ${v}`},P=h=>{let v=/\u001b\[(\d+)m/g,y=[],b={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},E=0,$="#d4d4d4",L=false,A;for(;(A=v.exec(h))!==null;){let O=h.slice(E,A.index);O&&y.push({text:O,color:$,bold:L});let F=A[1];F==="0"?($="#d4d4d4",L=false):F==="1"?L=true:b[F]&&($=b[F]),E=v.lastIndex;}let M=h.slice(E);return M&&y.push({text:M,color:$,bold:L}),y},S=(h,v)=>h.includes("\x1B")?P(h).map((y,b)=>jsx(me,{style:{color:y.color||"#d4d4d4",fontWeight:y.bold?"bold":"normal"},children:y.text},`--terminal-msg-${b}-${y.text.replace(/\S+/g,"-")}`)):jsx(me,{style:{color:v==="error"?"#ff5f56":v==="command"?"#00ff00":"#d4d4d4"},children:h}),R=async h=>{if(h.key==="Enter"&&c.trim()){let v=c.trim(),y=[...l,{type:"command",content:`${o}${v}`}];i(""),f(y);let b=await x(v);f(E=>[...E,{type:"output",content:b}]);}};return jsxs(p,{as:`--zuz-terminal --${s||m||q.Medium} flex cols ${a.className}`,onClick:()=>u.current?.focus(),children:[jsx(p,{ref:d,className:"--terminal-log",children:l.map((h,v)=>jsx(p,{children:jsx(K,{children:S(h.content,h.type)})},v))}),jsxs(p,{as:"flex aic --terminal-input",children:[jsx(K,{as:"--terminal-prompt",children:o}),jsx(fe,{ref:u,className:"--zuz-term-input",autoFocus:true,value:c,variant:s||m||q.Medium,onChange:h=>i(h.target.value),onKeyDown:R})]})]})},Qu=ju;var Ju=({meta:e})=>jsxs(_,{as:"flex aic --command-item",children:[e.icon&&jsx(te,{name:e.icon,as:"--command-icon"}),jsx(K,{children:e.label})]}),ef=({position:e,onSelect:r,commands:t,visible:n})=>jsx(p,{"aria-hidden":!n,fx:{transition:j.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(o=>jsx(Ju,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),Da=ef;var $a=({ref:e,...r})=>{let {autoResize:t,maxHeight:n,variant:o,resize:s="none",command:a,commands:l,name:f,onInput:c,cmd:i,renderDropdown:d,value:u,defaultValue:m,...g}=r,w=useRef(null),x=useRef(null),{variant:P}=Q(true),{style:S,className:R,rest:h}=B(g),v=it();f?v.errors?.[f]:null;let b=f&&v.values&&v.setFieldValue,E=b?v.values?.[f]:void 0,$=useDebounce(k=>{b&&v.setFieldValue?.(f,k);},500),{showDropdown:L,dropdownPosition:A,handleKeyDown:M,handleInput:O,handleCommandSelect:F}=useCommandActions({command:a,commands:l,cmd:i,ref:w}),Z=useCallback(()=>{let k=w.current;!k||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{k.style.height="auto";let X=k.scrollHeight;if(n){let Y=parseInt(n.toString(),10);isNaN(Y)||(X=Math.min(X,Y));}k.style.height=`${X}px`,k.style.overflowY=n&&X>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),I=k=>{$(k.currentTarget.value),c?.(k),O(k),Z();};return useEffect(()=>{w.current&&f&&E!==void 0&&w.current.value!==String(E)&&(w.current.value=String(E));},[E,f]),useEffect(()=>{Z();},[u,m,Z]),useEffect(()=>{t&&w.current&&Z();},[t,Z]),useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),useEffect(()=>()=>{b&&v.deleteFieldValue?.(f);},[]),jsxs(p,{as:"rel",children:[jsx("textarea",{name:f,className:`--input --textarea --${o||P||q.Medium} flex ${R}`.trim(),style:{...S,resize:s,height:t?"auto":S?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:M,onInput:I,ref:k=>{w.current=k,typeof e=="function"?e(k):e&&(e.current=k);},value:u,defaultValue:m,...h}),d?d({show:L,position:A,commands:l||[],onSelect:F}):l&&l.length>0&&jsx(Da,{visible:L,commands:l,onSelect:F,position:A})]})};$a.displayName="Zuz.TextArea";var sf=$a;var za=forwardRef((e,r)=>{let{as:t,value:n,color:o,direction:s,...a}=e,l=useRef(null),[f,c]=useState(n||0);return useImperativeHandle(r,()=>({updateValue(i){f.toString().length!==i.toString().length&&c(i);},setValue(i){if(this.updateValue(i),l.current){let d=i.toString().split("");l.current.querySelectorAll(".--wheel-char").forEach((u,m)=>{let g=d[m];if(u instanceof HTMLElement){u.setAttribute("data-value",g);let w=u.querySelector(".--wheel-char-track");w instanceof HTMLElement&&(w.style.setProperty("--v",g),w.offsetWidth);}});}}})),useEffect(()=>{c(n||0);},[n]),jsxs(p,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:l,...a,children:[(f||0).toString().split("").map((i,d)=>isNaN(parseInt(i,10))?jsx(me,{className:"--wheel-char wheel-char-symbol grid",children:i},`wheel-char-symbol-${d}`):jsx(me,{"data-value":i,className:`--wheel-char grid ${d>(f||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxs(me,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":i},children:[jsx(me,{children:!s||s==="down"?0:9}),(!s||s==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((u,m)=>jsx(me,{children:u},`${d}--${m}`)),jsx(me,{children:!s||s==="down"?9:0})]})},`wheel-char-${d}`)),o&&jsx(p,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});za.displayName="Zuz.TextWheel";var ff=za;var Er=forwardRef((e,r)=>{let{as:t,meta:n,nodes:o,icons:s,onSelect:a,treeTag:l,selected:f,roots:c,expanded:i,...d}=e,{tag:u,label:m,icon:g,under:w,isHead:x}=n,P=useMemo(()=>c.includes(u),[c]),[S,R]=useState(i),h=()=>{localStorage.setItem(`--tn${l}-${u}`,S?"0":"1"),R(!S);};useEffect(()=>{i||P&&!localStorage.getItem(`--tn${l}-${u}`)?(localStorage.setItem(`--tn${l}-${u}`,"1"),R(true)):R(localStorage.getItem(`--tn${l}-${u}`)=="1");},[]);let v=useMemo(()=>o.filter(y=>y.under==u),[o,u]);return jsxs(p,{className:`--treenode ${P?"--is-root":""} --treenode-${u} flex cols`,children:[jsxs(p,{className:`--node --node-${u} flex aic ${f==u?" --selected":""}`,children:[jsx(_,{skeleton:d.skeleton,onClick:h,className:"--node-aro-btn",disabled:v.length==0,children:s?.arrowClose&&s?.arrowOpen?jsx(te,{skeleton:d.skeleton,className:"--node-aro-icon",name:v.length==0?s?.arrowDisabled||s?.arrowClose:S?s?.arrowOpen:s?.arrowClose}):v.length==0?V.chevronBottom:S?V.chevronBottom:V.chevronRight}),jsxs(_,{className:"--node-meta flex aic",onClick:y=>a(u),children:[(s?.nodeOpen&&s?.nodeClose||P&&s?.rootOpen&&s?.rootClose)&&jsx(te,{skeleton:d.skeleton,className:`--node-icon ${P?"--icon-root":""}`,name:g||(S?P&&s?.rootOpen||s.nodeOpen:P&&s?.rootClose||s?.nodeClose)}),jsx(K,{className:`--node-label ${P?"--node-label-root":""}`.trim(),skeleton:d.skeleton,children:m})]})]}),S&&v.length>0&&jsx(p,{className:`--sub-node tree-sub-node-${u} flex cols`,children:v.map(y=>jsx(Er,{treeTag:l,selected:f,onSelect:a,icons:s,roots:c,expanded:y.expanded||false,meta:y,nodes:o},`--node-${y.tag}`))})]})});Er.displayName="TreeItem";var Ka=Er;var Wa=forwardRef((e,r)=>{let{as:t,nodes:n,onNodeSelect:o,tag:s,icons:a,roots:l,selected:f,...c}=e,[i,d]=useState(f);useImperativeHandle(r,()=>({getSelected:()=>i}),[o]);let u=m=>{d(m),o&&o(m);};return useEffect(()=>{i!=f&&d(f);},[f]),jsx(p,{className:"--treeview flex cols",children:n.filter(m=>l.includes(m.tag)).map(m=>jsx(Ka,{treeTag:s?`-${s}`:"",selected:i,onSelect:g=>u(g),icons:a,meta:m,roots:l,expanded:m.expanded||false,skeleton:c.skeleton,nodes:n},`--node-${m.tag}`))})});Wa.displayName="Zuz.TreeView";var Sf=Wa;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
13
- export{Ne as ALERT,Or as AVATAR,Fl as Accordion,Gl as ActionBar,Xl as Alert,bc as AutoComplete,Ic as Avatar,Nc as Badge,p as Box,mm as Bubble,ls as BubbleMediaType,is as BubbleStatus,_ as Button,rs as CHART,Fe as CHECKBOX,Pf as COLORTHEME,er as Calendar,em as Carousel,im as Chart,Ot as CheckBox,wm as CodeBlock,Am as ColorScheme,Mo as ContextMenu,_m as CookiesConsent,Me as Cover,op as CropShape,ep as Cropper,np as Crumb,Ef as DATATYPE,at as DIALOG,Vr as DIALOG_ACTION_POSITION,we as DRAWER_SIDE,lp as DatePicker,Ho as Dialog,zo as Drawer,zt as FILTER,Xe as FORMVALIDATION,Nf as FORMVALIDATION_STYLE,up as Fab,gp as Filters,De as Flex,Bp as Form,Mp as Grid,Oo as Group,te as Icon,tt as Image,fe as Input,xr as KeyboardKeys,Ws as KeysLabelMap,Zs as KeysMap,Mt as Label,Bo as LayersProvider,et as List,Kp as MediaPlayer,Gp as NetworkStatus,St as ORIGIN,Rf as OriginType,Ye as Overlay,vt as POSITION,kf as PROGRESS,Lt as Pagination,no as PaginationStyle,Jp as Password,ru as PinInput,xe as Position,Qe as ProgressBar,Co as RADIO,iu as Radio,Be as SHEET,So as SHEET_ACTION_POSITION,Tf as SKELETON,wo as SLIDER,If as SORT,ve as SPINNER,Ao as ScrollView,br as Search,bu as Select,Vt as SelectTabs,Sp as Sheet,ct as Slider,jt as SnackPosition,xn as SnackStyle,Yt as SnackType,me as Span,Ce as Spinner,Bf as Status,vu as Switch,j as TRANSITIONS,oe as TRANSITION_CURVES,Uu as TabView,Ou as Table,Hu as TableOfContents,Qu as Terminal,K as Text,ff as TextWheel,sf as Textarea,li as ThemeProvider,bn as ToastDefaultTitle,jt as ToastPosition,Ko as ToastProvider,xn as ToastStyle,Yt as ToastType,lr as ToolTip,Sf as TreeView,q as Variant,wt as animationTransition,To as buildClassString,Ar as buildWithStyles,Yf as css,Po as getAnimationCurve,jf as getAnimationTransition,ti as getZuzMap,Ks as isKeyCombination,Hr as setZuzMap,B as useBase,hl as useContextMenu,bl as useDialog,wl as useDrawer,be as useFx,Pl as useMorph,It as usePosition,Ll as useSnack,Zo as useToast};
12
+ </div>`}).join("")},[t,g]);return jsxs(p,{as:`--code-block rel ${d}`,style:f,...c,children:[jsx("pre",{ref:e,children:jsx("code",{className:`--code --lang-${o}`,dangerouslySetInnerHTML:{__html:P}})}),n&&jsx(_,{as:"--copy-code abs",onClick:()=>{copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},Cm=wm;var ds=({onSelect:e,meta:r,selected:t,disabled:n=false})=>{let o=useRef(null),{index:s,icon:a,label:l}=r,[u,c]=useState({x:0,width:0}),i=useDelayed();return useLayoutEffect(()=>{if(i&&o.current){let{width:d,x:f}=o.current.getBoundingClientRect();c({x:f,width:d}),t&&e(s,d,f,r,true);}},[i,o.current]),useEffect(()=>{t&&e(s,u.width,u.x,r,false);},[t]),jsxs(_,{disabled:n,onClick:()=>e(s,u.width,u.x,r,false),ref:o,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsx(te,{name:a,as:"--segment-icon"}):jsx(p,{as:"--segment-icon flex aic jcc",children:a}):null,l&&String(l).trim()!=""&&jsx(p,{className:"--segment-label",children:l||`Item ${s}`})]})};ds.displayName="SelectTabItem";var gs=ds;var ys=forwardRef((e,r)=>{let{fx:t,items:n,selected:o,variant:s,disabled:a=false,onSwitch:l,...u}=e,[c,i]=useState(o||0),d=useDelayed(50),f=useRef(c),{className:m,style:g,rest:P}=B(u),x=useRef(null),T=useRef(null),{variant:S}=j(true),R=(h,v,y,b,E)=>{if((E||c!=h&&c!=-2)&&(i(h),f.current=c,queueMicrotask(()=>{d&&l?.(b);})),x.current){let $=T.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${v}px`),x.current.style.setProperty("--x",`${$?y-$.left:y}px`);}};return useImperativeHandle(r,()=>({setSelected:h=>{typeof h=="number"&&h!=c&&i(h);}}),[c]),jsxs(p,{ref:T,"data-selected":c,className:`${m} --segmented --${s||S||U.Medium} flex aic rel`,style:g,...P,children:[jsx(p,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((h,v)=>jsx(gs,{disabled:a,onSelect:R,selected:c==v,meta:{...h,index:v}},`segment-${h.label}-${v}`))]})});ys.displayName="Zuz.SelectTabs";var Vt=ys;var vs=forwardRef((e,r)=>{let{type:t,variant:n,...o}=e,s=useDelayed(),{colorScheme:a,setColorScheme:l}=No(),u=useCallback(()=>{l(a=="dark"?"light":a=="light"?"system":"dark");},[a]),{variant:c}=j(true),{className:i,style:d}=B(o),f=useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"system",index:1,label:"",icon:V.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}],[]),m=useMemo(()=>["light","system","dark"].indexOf(a),[a]);return !s||m==-1?null:t=="system"||t=="switch"?jsx(Vt,{className:`--color-scheme --${t}`,onSwitch:({tag:g})=>{l(g);},selected:m,items:f,...o}):jsx(_,{onClick:u,style:d,variant:n,as:`--color-scheme-switch ${i}`.trim(),children:a=="system"?V.colorSchemeSystem:a=="light"?V.colorSchemeLight:V.colorSchemeDark})});vs.displayName="Zuz.ColorScheme";var $m=vs;var ws=forwardRef((e,r)=>{let[t,n]=useState("wait"),{title:o,message:s,acceptLabel:a,rejectLabel:l,position:u}=e,c=async i=>{n(i==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(i));};return useEffect(()=>{let i=localStorage.getItem("--ccnt");n(i?i=="1"?"accepted":"rejected":"pending");},[]),jsxs(p,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:oe.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${u||xe.Left} flex cols`,children:[jsx(K,{as:"--title",children:o||"This site uses cookies"}),jsx(K,{as:"--message",children:s||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxs(p,{as:"--footer flex aic",children:[jsx(_,{onClick:i=>c(1),as:"--accept",children:a||"Accept All"}),jsx(_,{onClick:i=>c(0),as:"--reject",children:l||"Cancel"})]})]})});ws.displayName="Zuz.CookiesConsent";var Km=ws;var Ts=({ref:e,...r})=>{let {title:t,position:n,margin:o=4,anchorName:s="--tooltip-anchor",children:a,show:l,variant:u,...c}=r,{style:i,className:d,rest:f}=B(c),m=n||xe.Top;useRef(null);let [P,x]=useState(false);useRef(6);let S=l===true||P,h=`--anchor-${useId().replace(/:/g,"")}`,{tooltip:v}=j(true),y=useMemo(()=>{let E=false;return addPropsToChildren(a,$=>{let L=$.props.className?.includes(s);return L&&(E=true),L||!E},($,L)=>{let A=L.props.className?.includes(s),M=$===0,O={};return (A||M)&&(O.style={...L.props.style,anchorName:h}),M&&(O.onMouseEnter=F=>{x(true),L.props.onMouseEnter?.(F);},O.onMouseLeave=F=>{x(false),L.props.onMouseLeave?.(F);}),O})},[a,s,h]),b=be({transition:m==xe.Top?Q.SlideInTop:m==xe.Bottom?Q.SlideInBottom:m==xe.Left?Q.SlideInLeft:Q.SlideInRight,when:S,duration:.2,offset:o+6,margin:m==xe.Top||m==xe.Left?-o:o,curve:v?.curve||oe.EaseInOut});return useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxs(Fragment$1,{children:[y,jsx(p,{style:{positionAnchor:h,...b.style,...m===xe.Top||m===xe.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${S} --${u||v?.variant||U.Small} --${m} abs ${d}`.trim(),children:typeof t=="string"?jsx(K,{as:"--text rel",children:t}):t})]})};Ts.displayName="Zuz.ToolTip";var lr=Ts;var Rs=({ref:e,...r})=>{let {type:t,value:n=0,min:o=0,max:s=1,step:a=.01,onChange:l,showGhostBar:u,showKnobOnHover:c,showToolTip:i,roundValue:d,formatValue:f,...m}=r,{className:g,style:P,rest:x}=B(m),T=useRef(a||.01).current,S=useRef(o||0).current,R=useRef(s||1).current,h=useRef(n||0).current,v=useRef(null),y=useRef(null),b=useRef(null),E=useRef(null);useRef(null);let L=useRef(null),A=useRef(null),M=useRef(null),O=useRef(null),F=(re,le,de)=>(re-le)/(de-le)*100,Z=re=>{if(y.current){let le=parseFloat(re.currentTarget.value);ne(le);let de=F(le,parseFloat(re.currentTarget.min),parseFloat(re.currentTarget.max));y.current.style.setProperty("--value",`${de}`),y.current.setAttribute("data-value",`${le}`),l&&l(d?+le.toFixed(2):le);}},[I,k]=useState(false),[X,Y]=useState(0),[H,z]=useState(0),[G,W]=useState(false),ne=async re=>{let le=f?f(+re):d?(+re).toFixed(2):Math.round(+re);M.current&&(M.current.textContent=String(le));},ae=re=>{if(I){let le=re.clientX-X,de=R-S,Ee=le/200*de,Se=Math.max(S,Math.min(H+Ee,R));if(Se=Math.round(Se/T)*T,ne(Se),y.current){let $e=F(Se,S,R);y.current.style.setProperty("--value",`${$e}`),y.current.setAttribute("data-value",`${Se}`),A.current&&(A.current.textContent=d?Se.toFixed(2):Se.toString()),l&&l(Se);}}},pe=()=>{k(false),document.body.style.cursor="auto";},ye=re=>(re-S)/(R-S)*100,ie=re=>{if(!y.current)return;let le=y.current.getBoundingClientRect(),de=re.clientX-le.left,Ae=Math.max(0,Math.min(100,de/le.width*100));if(i&&M.current){let Ee=v.current?+v.current.value:n;ne(Ee*100);}if(u){let Ee=ye(v.current?+v.current.value:n),Se=Math.min(Ee,Ae),$e=Math.abs(Ae-Ee);y.current.style.setProperty("--ghost-start",`${Se}`),y.current.style.setProperty("--ghost-width",`${$e}`);}};useEffect(()=>{y.current&&y.current.style.setProperty("--value",v.current?`${F(parseFloat(v.current.value),parseFloat(v.current.min),parseFloat(v.current.max))}`:h.toString());},[]),useEffect(()=>(I?(document.addEventListener("mousemove",ae),document.addEventListener("mouseup",pe)):(document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",pe)),()=>{document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",pe);}),[I]),useEffect(()=>{let re=F(n,S,R);y.current?.style.setProperty("--value",`${re}`),ne(n);},[n,S,R,M.current]);let q=()=>jsxs(p,{ref:y,onMouseEnter:()=>W(true),onMouseLeave:()=>W(false),onMouseMove:ie,className:`--slider --${t||wo.Default} ${c?"--knob-hover":""} flex rel ${g}`.trim(),style:{...P},children:[jsx(p,{ref:L,className:"--slider-track abs fill"}),u&&jsx(p,{ref:E,className:"--slider-ghost abs fill"}),jsx(p,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsx(p,{ref:b,className:"--slider-knob --tooltip-knob abs"}),jsx(fe,{ref:v,onInput:Z,className:"abs fill",tabIndex:0,type:t||wo.Default,defaultValue:h||0,step:T,max:R,min:S})]});if(i===true){let re=f?f(n):d?n.toFixed(2):n;return jsx(lr,{ref:O,show:I,position:vt.Top,margin:15,anchorName:"--tooltip-knob",title:jsx(me,{ref:M,children:re}),children:q()})}return q()};Rs.displayName="Zuz.Slider";var ct=Rs;var Es=forwardRef((e,r)=>{let{src:t,shape:n,size:o,...s}=e,{style:a,className:l,rest:u}=B(s),{canvasRef:c,crop:i,setScale:d,handleMouseDown:f,handleMouseUp:m,handleMouseMove:g}=useImageCropper(t,o||200,n||CropShape.Circle);return useImperativeHandle(r,()=>({getCropped(){return i()},setScale(P){d(P);}})),jsxs(p,{as:`--cropper --${n||CropShape.Circle} ${l}`,style:a,...u,children:[jsx("canvas",{ref:c,width:o||200,height:o||200,onMouseDown:f,onMouseUp:m,onMouseLeave:m,onMouseMove:g}),jsx(p,{as:"--cropper-slider",children:jsx(ct,{onChange:P=>d(P),min:0,max:1,step:.01,value:1})})]})});Es.displayName="Zuz.Cropper";var tp=Es;var rp=(t=>(t.Circle="circle",t.Square="square",t))(rp||{});var Bs=forwardRef((e,r)=>{let{items:t,maxItems:n}=e,o=useMemo(()=>{let l=typeof t=="string",u=l?[]:t;return l&&t.split(",").forEach(c=>{u.push({label:c});}),u},[t]),a=useMemo(()=>n&&n>0&&o.length>n-1,[o,n])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-n)]:o;return jsx(et,{ref:r,className:"--crumb flex aic",direction:"rows",seperator:jsx(p,{as:"--crumb-chevron",children:V.chevronRightOutline}),items:a.map((l,u,c)=>l.ID=="."?jsx(p,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsx(p,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${u}`))}):jsxs(_,{onClick:()=>l.action?.(),className:"--crumb-item",disabled:!c[u+1],children:[l.icon&&jsx(te,{as:"--crumb-icon",name:l.icon}),jsx(K,{as:"--crumb-label",children:l.label})]},`${l.label.replace(/\s+/g,"-").toLowerCase()}-${u}`))})});Bs.displayName="Zuz.Crumb";var sp=Bs;var Ms=forwardRef((e,r)=>{let{icon:t,defaultValue:n,value:o,size:s,variant:a,numeric:l,type:u,onConfirm:c,...i}=e,[d,f]=useState(false),[m,g]=useState(n||null),{style:P,className:x,rest:T}=B(i),S=useRef(null),R=useRef(null),{reposition:h}=It(R,{direction:xe.Bottom,offset:2}),v=b=>{l&&(b.currentTarget.value=b.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};useEffect(()=>{let b=E=>{let $=E.target,L=S.current?.contains($),A=R.current?.contains($);!L&&!A&&f(false);};return d&&document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b);}},[d]),useEffect(()=>{let b=E=>{E.key==="Escape"&&d&&(f(false),S.current?.focus());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let y=()=>{f(true);};return useEffect(()=>{d&&h();},[d,h]),jsx(Fragment$1,{children:jsxs(p,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${x}`,"data-value":m?m.toISOString():"",children:[t?typeof t=="string"?jsx(te,{as:"mr:10 c:#666",name:t}):t:jsx(me,{as:"--date-picker-icon flex aic jcc",children:V.calendar}),jsx("input",{ref:S,value:m?format(m,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:P,onFocus:y,onInput:v,autoComplete:"new-password",onKeyDown:b=>{b.key=="Enter"&&c?.(b.currentTarget.value);},...T}),jsx(p,{"aria-hidden":!d,ref:R,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:d,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsx(er,{defaultValue:m,onChange:b=>{g(b),f(false);}})})]})})});Ms.displayName="Zuz.DatePicker";var cp=Ms;var Os=forwardRef((e,r)=>{let{icon:t,variant:n,position:o}=e;return jsx(_,{className:`--fab fixed --${n||U.Large} --${o||"bottomright"}`,children:t||V.plus})});Os.displayName="Zuz.Fab";var fp=Os;var gp=({ref:e,children:r,...t})=>{let{legend:n,legendPlacement:o,variant:s,...a}=t,{variant:l}=j(true),{className:u,style:c,rest:i}=B(a);return jsxs(p,{as:`--fieldset --rel --flex --${s||l||U.Medium} ${u}`.trim(),style:c,children:[jsx(p,{as:`--legend --abs --${o||"top-start"}`,children:n&&typeof n=="string"?jsx("legend",{children:n}):n}),r]})},hp=gp;var Ds=e=>{let{names:r,strength:t}=e,n={[zt.Gooey]:o=>jsxs("filter",{id:"gooey",children:[jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:o||10,result:"blur"}),jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${zt.Gooey}`)};return useEffect(()=>{},[r]),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsx("defs",{children:(r||[zt.Gooey]).map(o=>n[o](t))})})};Ds.displayName="Zuz.Filters";var bp=Ds;var Hs=({cols:e,gap:r,ais:t,aic:n,aie:o,jcs:s,jcc:a,jce:l,className:u="",style:c,...i})=>{let d=["--flex",e?"--cols":"",t?"--ais":"",n?"--aic":"",o?"--aie":"",s?"--jcs":"",a?"--jcc":"",l?"--jce":"",u].filter(Boolean).join(" "),f={...c,gap:typeof r=="number"?`${r}px`:r};return jsx(p,{...i,className:d,style:f})};Hs.displayName="Zuz.FlexBox";var De=Hs;var We=null,Re=null,$s=forwardRef((e,r)=>{let{title:t,message:n,transition:o,curve:s,speed:a,type:l,actionPosition:u,spinner:c,loadingMessage:i,onShow:d,onHide:f,...m}=e,{className:g,style:P,rest:x}=B(m),[T,S]=useState(t||""),[R,h]=useState(n||""),[v,y]=useState(null),[b,E]=useState(l||Be.Default),$=useMemo(()=>uuid(12),[]),[L,A]=useState(false),M=useRef(null),O=useRef(null),[F,Z]=useState(false),[I,k]=useState(true),X=useRef(null),Y=R;useImperativeHandle(r,()=>({setLoading(z){Z(z);},showDialog(z,G,W,ne){We&&(clearTimeout(We),Re&&clearTimeout(Re),M.current.classList.remove("--wobble"),setTimeout(()=>M.current.classList.add("--wobble"),50),Re=setTimeout(()=>{M.current.classList.remove("--wobble"),Re=null;},500)),E(Be.Dialog),G&&h(G),z&&S(z),W&&y(W.reduce((J,ae)=>(J.push({...ae,key:ae.key||uuid(12)}),J),[])),A(true),setTimeout(()=>ne?ne():()=>{},1e3);},dialog(z,G,W,ne){We&&(clearTimeout(We),Re&&clearTimeout(Re),M.current.classList.remove("--wobble"),setTimeout(()=>M.current.classList.add("--wobble"),50),Re=setTimeout(()=>{M.current.classList.remove("--wobble"),Re=null;},500)),E(Be.Dialog),h(G),S(z),W&&y(W.reduce((J,ae)=>(J.push({...ae,key:ae.key||uuid(12)}),J),[])),A(true),setTimeout(()=>ne?ne():()=>{},1e3);},error(z,G){this.show(z,G,Be.Error);},warn(z,G){this.show(z,G,Be.Warn);},success(z,G){this.show(z,G,Be.Success);},show(z,G,W){We&&(clearTimeout(We),Re&&clearTimeout(Re),O.current=M.current.style.transform,M.current.style.transform="",M.current.classList.remove("--wobble"),setTimeout(()=>{M.current.classList.add("--wobble"),M.current.style.transform=`${O.current} scale(.9)`.trim();},50),Re=setTimeout(()=>{M.current.classList.remove("--wobble"),M.current.style.transform=O.current||"",Re=null;},500)),We=setTimeout(()=>{A(false),We=null,Re=null;},(G||4)*1e3),E(W||Be.Default),h(z),A(true),d?.();},hide(){A(false),f?.();}}));let H=useMemo(()=>{let z={when:L,duration:a||.3,delay:.1};if(b==Be.Dialog){if(o){let{from:G,to:W}=wt(o,20);return {from:G,to:W,curve:s||oe.EaseInOut,...z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:oe.Spring,...z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:oe.Spring,...z}},[L,b]);return useEffect(()=>{X.current&&clearTimeout(X.current),L?k(true):X.current=setTimeout(()=>k(false),1e3);},[L]),b==Be.Dialog?jsxs(Fragment$1,{children:[jsx(Ye,{when:L}),jsxs(p,{className:`--sheet --sheet-${b.toLowerCase()} ${L?"is-visible":""} ${g} fixed`.trim(),style:P,fx:H,...x,ref:M,children:[jsx(Me,{when:F,spinner:c,message:i}),jsxs(p,{className:"--head flex aic rel",children:[jsx(p,{className:`--${T?"title":"dot"} flex aic rel`,children:T||""}),jsx(_,{onClick:z=>A(false),className:"--closer abs",children:"\xD7"})]}),jsx(p,{className:`--body flex aic rel ${v?"":"--no-action"}`.trim(),children:I?Y:null}),v&&jsx(p,{className:`--footer flex aic rel ${u?u==So.Center?"jcc":"":"jce"}`.trim(),children:v.map((z,G)=>jsx(_,{onClick:W=>z.handler?z.handler():z.onClick?z.onClick():console.log("onClick Handler missing"),className:"--action",children:z.label},`sheet-${$}-action-${z.key}`))})]})]}):jsx(p,{className:`--sheet --sheet-${b.toLowerCase()} ${g} abs`.trim(),style:P,...x,fx:H,ref:M,children:L?R:null})}),Fs=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;$s.displayName="Zuz.Sheet";var Tp=$s;var Mp=e=>{let r={};for(let t in e){let n=t.split(/[\[\]]+/).filter(Boolean);n.reduce((o,s,a)=>{if(a===n.length-1)o[s]=e[t];else {let l=!isNaN(Number(n[a+1]));o[s]=o[s]||(l?[]:{});}return o[s]},r);}return r},zs=({ref:e,...r})=>{let {schema:t,name:n,cover:o,spinner:s,errors:a,action:l,children:u,withData:c,beforeSubmit:i,onSubmit:d,onError:f,onSuccess:m,resetOnSuccess:g,...P}=r,{className:x,style:T,rest:S}=B(P),[R,h]=useState(false),v=useRef(null),y=Zo(),b=Nt();Yo();let $=useRef(null),L=useCallback(H=>v.current?v.current.querySelectorAll(H):[],[v.current]),A=H=>({name:H.name||H.getAttribute("name")||H.getAttribute("data-name"),required:H.required?true:H.getAttribute("data-required")?H.getAttribute("data-required")=="true":false,with:H.with||H.getAttribute("with")}),M=H=>{let z=[];return H.querySelectorAll(".--input").forEach(G=>{z.push(G.value);}),z.join("")},O=H=>H.classList.contains("--otp")?M(H):H.classList.contains("--select")?H.querySelector("button.--selected")?.dataset.value:H.classList.contains("--checkbox")||H.getAttribute("type")==="checkbox"?H.checked:H.value,F=useCallback(H=>{let{name:z,required:G,with:W}=A(H),ne=O(H);if(t&&t[z]&&b?.getSnapshot()){let J=t[z](ne,b.getSnapshot().values);if(J===false||typeof J=="string")return typeof J=="string"&&b?.setFieldError(z,J),false}if(G&&(H.type==="checkbox"&&!H.checked||H.classList.contains("--select")&&(ne==="-1"||!ne)||!ne||ne===""))return false;if(W)switch((W.includes("@")?W.split("@")[0]=="match"?Xe.MatchField:W.split("@")[0]:W).toUpperCase()){case Xe.IPV4:return _$1(ne).isIPv4();case Xe.IPV6:return _$1(ne).isIPv6();case Xe.Email:return _$1(ne).isEmail();case Xe.Uri:try{return new URL(ne),!0}catch{return false}case Xe.MatchField:let[ae,pe,ye]=W.split("@"),ie=document.querySelector(`[name=${pe.trim()}]`);if(!ie)return false;switch(ye||"direct-match"){case "if-not-empty":if(ie&&!_$1(ie.value).isEmpty()&&ie.value!=H.value)return false;break;case "direct-match":if(ie&&ie.classList.contains("--otp")&&H.classList.contains("--otp")&&M(ie)!=M(H))return false;if(ie&&ie.value!=H.value)return false;break}break}return true},[t,b]),Z=useCallback(()=>{let H={},z={...b?.getSnapshot().values||{}},G=null,W=null;if(L("[name]").forEach(J=>{let{name:ae,required:pe,with:ye}=A(J),ie=pe||ye?F(J):true,ce=O(J);H[ae]={valid:ie,value:ce},z[ae]=ce,b?.setFieldError(ae,ie?null:a?.[ae]||"Invalid"),ie?J.classList.remove("--with-error"):(J.classList.add("--with-error"),G||(G=J),W=a?.[ae]);}),G){let J=G;if(J.classList.contains("--otp"))for(let ae of Array.from(J.querySelectorAll(".--input"))){let pe=ae;if(pe.value==""){pe.focus();break}}else J.focus();}let ne=Mp(z);return {error:G!=null,errorMsg:W||"Fix errors to continue...",data:H,payload:ne}},[v.current,b]),I=useCallback((H={})=>{let{error:z,errorMsg:G,payload:W,data:ne}=Z();if(z){y.error(G);return}l?startTransition(async()=>{h(true),withPost(l,{...c,...W,...H}).then(J=>{h(false),g&&b?.reset(),m?.(J,{...c,...W,...H}),m||y.success(J.message||"Redirecting...");}).catch(J=>{h(false),f?f(J):y.error(J.message);});}):d?.(W,ne);},[Z,l,c,m,f,g,d]),k=useCallback(()=>{let H=L("[type=submit]");!H||H.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):H.forEach(z=>{z.addEventListener("click",I);});},[v.current]),X=useMemo(()=>addPropsToChildren(u,H=>H.props.type=="submit",H=>({ref:$})),[u]),Y=useRef(I);return useImperativeHandle(e,()=>({setLoading:H=>h(H),submit:H=>Y.current(H),init:k,hideError:()=>y.clearAll()}),[I,k]),useEffect(k,[]),useEffect(()=>{Y.current=I;},[I]),useEffect(()=>{let H=L("[type=submit]"),z=Array.from(H).map(G=>{let W=G;return W.addEventListener("click",I),()=>W.removeEventListener("click",I)});return ()=>z.forEach(G=>G())},[I,L]),jsxs(p,{ref:v,style:T,className:`--form flex rel ${x}`,children:[!Fs(o)&&jsx(Me,{when:R,spinner:s,...o}),X]})};zs.displayName="Zuz.FormInternal";var _s=e=>jsx($n,{initialValues:e.withData,children:jsx(zs,{...e})});_s.displayName="Zuz.Form";var Op=_s;var Ks=e=>{let {ref:r,cols:t,rows:n,gap:o,gapX:s,gapY:a,align:l,justify:u,inline:c,flow:i,autoCols:d,autoRows:f,template:m,...g}=e;useRef(null);let {className:x,style:T,rest:S}=B(g),R=v=>typeof v=="number"?`repeat(${v}, 1fr)`:v,h={display:c?"inline-grid":"grid",gridTemplateColumns:R(t),gridTemplateRows:R(n),gap:o,columnGap:s,rowGap:a,alignItems:l,justifyContent:u==="between"?"space-between":u==="around"?"space-around":u,gridAutoFlow:i,gridAutoColumns:d,gridAutoRows:f,gridTemplateAreas:m,...T};return jsx(p,{ref:r,as:`--grid ${x}`.trim(),style:h,...S})};Ks.displayName="Zuz.Grid";var Hp=Ks;var Zs=e=>typeof e=="string"&&e.includes("+"),Ws={command:"\u2318",shift:"\u21E7",ctrl:"\u2303",option:"\u2325",enter:"\u21B5",delete:"\u232B",escape:"\u238B",tab:"\u21E5",capslock:"\u21EA",up:"\u2191",right:"\u2192",down:"\u2193",left:"\u2190",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2196",end:"\u2198",help:"?",space:"\u2423",fn:"Fn",win:"\u2318",alt:"\u2325"},Gs={command:"Command",shift:"Shift",ctrl:"Control",option:"Option",enter:"Enter",delete:"Delete",escape:"Escape",tab:"Tab",capslock:"Caps Lock",up:"Up",right:"Right",down:"Down",left:"Left",pageup:"Page Up",pagedown:"Page Down",home:"Home",end:"End",help:"Help",space:"Space",fn:"Fn",win:"Win",alt:"Alt"};var qs=forwardRef(({children:e,keys:r,as:t,className:n,variant:o},s)=>{let{variant:a}=j(true),l=useMemo(()=>{if(Zs(r)){let u=null;return {keys:String(r).split("+").reduce((i,d,f,m)=>(m[f+1]?i.push(d):u=d.toUpperCase(),i),[]),children:u}}return {keys:r,children:String(e).toUpperCase()}},[r]);return jsxs(p,{as:`--keyboard-keys --${o||a||U.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(l.keys)?l.keys:[l.keys]).map(u=>jsx("abbr",{title:Gs[u],children:Ws[u]},u)),jsx(me,{children:l?.children??e})]})});qs.displayName="Zuz.KeyboardKeys";var xr=qs;var js=createContext(null),ut=()=>{let e=useContext(js);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},Wp=({ref:e,icons:r,children:t,...n})=>{let{playlist:o=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:l="No Track",defaultCover:u,onTrackChange:c,...i}=n,{className:d,style:f,rest:m}=B(i),g=useMediaPlayer(o,o[0]??void 0),P=useMemo(()=>({play:V.play,pause:V.pause,prev:V.prev,next:V.next,volumeHigh:V.volumeHigh,volumeMute:V.volumeMute,...r}),[r]),x=useMemo(()=>({...g,mode:s,icons:P}),[g,P]);return jsx(js.Provider,{value:x,children:jsx(p,{className:`--zuz-media-player ${d}`,style:f,children:t})})},Qs=Wp;var Js=e=>{if(!e||isNaN(e))return "0:00";let r=Math.floor(e/60),t=Math.floor(e%60);return `${r}:${t.toString().padStart(2,"0")}`},co=e=>typeof e=="string"?jsx(te,{name:e}):e,ea=()=>{let{mediaRef:e,state:r,controls:t,mode:n}=ut();return jsxs(p,{as:`--mediaplayer-stage rel --mode-${n}`,children:[n==="video"?jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsx("audio",{ref:e}),r.isLoading&&jsx(p,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsx(Ce,{})})]})},ta=()=>{let{state:e,defaultArtist:r,defaultTitle:t,defaultCover:n}=ut();return jsxs(p,{as:"--track-info flex aic",children:[jsx(tt,{src:e.currentItem?.cover||n||"",as:"--track-cover"}),jsxs(p,{as:"flex cols",children:[jsx(p,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsx(p,{as:"--track-artist",children:e.currentItem?.artist||r||"..."})]})]})},oa=()=>{let{state:e,controls:r,icons:t}=ut();return jsxs(p,{as:"--mediaplayer-controls flex aic",children:[jsx(_,{onClick:r.prev,as:"--prev",children:co(t?.prev??V.prev)}),jsx(_,{onClick:r.togglePlay,as:"--play-pause",children:co(e.isPlaying?t?.pause??V.pause:t?.play??V.play)}),jsx(_,{onClick:r.next,as:"--next",children:co(t?.next??V.next)})]})},ra=()=>{let{state:e,controls:r,mediaRef:t}=ut(),n=e.progress*(e.duration||0);return jsxs(p,{as:"--track-progress flex aic",children:[jsx(p,{as:"--track-current-duration",children:Js(n)}),jsx(ct,{value:e.progress,onClick:o=>{let s=o.currentTarget.getBoundingClientRect(),a=(o.clientX-s.left)/s.width;r.seek(a);}}),jsx(p,{as:"--track-total-duration",children:Js(e.duration)})]})},na=()=>{let{state:e,controls:r,icons:t}=ut();return jsxs(p,{as:"--volume-control flex aic gap:8 w:120",children:[jsx(_,{onClick:()=>r.setIsMuted(),children:co(e.isMuted?t?.volumeMute??V.volumeMute:t?.volumeHigh??V.volumeHigh)}),jsx(ct,{value:e.volume,className:"h:3 flex:1",onClick:n=>{let o=n.currentTarget.getBoundingClientRect();r.setVolume((n.clientX-o.left)/o.width);}})]})};var Gp=Object.assign(Qs,{Stage:ea,TrackInfo:ta,Controls:oa,Progress:ra,Volume:na}),Up=Gp;var aa=forwardRef((e,r)=>{let t=useNetworkStatus(),{onlineMessage:n,offlineMessage:o,variant:s}=e;return jsxs(p,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:t==false,curve:oe.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||U.Small} fixed flex`,children:[jsx(p,{className:"--ico",children:t?V[Ne.Success]:V[Ne.Error]}),jsx(K,{as:"--message",children:t?n||"internet connection restored :)":o||"no internet connection"})]})});aa.displayName="Zuz.NetWorkManager";var Yp=aa;var la=forwardRef((e,r)=>{let{strenthMeter:t,onChange:n,...o}=e;"type"in o&&delete o.type;let{style:s,className:a,rest:l}=B(o),[u,c]=useState(false),[i,d]=useState(""),f=useMemo(()=>checkPasswordStrength(i),[i]),m=useDebounce(g=>{t&&d(g.target.value),n&&n(g);},100);return useEffect(()=>{},[]),jsxs(p,{as:"w:100% flex cols",children:[jsxs(p,{style:s,className:"--password flex aic rel",children:[jsx(fe,{ref:r,type:u?"text":"password",className:a,onChange:m,...l}),jsx(_,{tabIndex:-1,onClick:()=>c(g=>!g),className:"--toggle flex aic jcc abs",children:u?V.eye:V.eyeSlash})]}),t&&jsxs(p,{as:`flex aic --password-meter --pb-score-${f.score}`,style:s,children:[jsxs(p,{as:"--password-bars flex aic",children:[jsx(p,{as:`--pbar ${f.score>=1?"--pb-on":""}`.trim()}),jsx(p,{as:`--pbar ${f.score>=2?"--pb-on":""}`.trim()}),jsx(p,{as:`--pbar ${f.score>=3?"--pb-on":""}`.trim()}),jsx(p,{as:`--pbar ${f.score>=4?"--pb-on":""}`.trim()}),jsx(p,{as:`--pbar ${f.score>=5?"--pb-on":""}`.trim()})]}),jsx(K,{as:"--password-meter-label","aria-hidden":true,children:f.result})]})]})});la.displayName="Zuz.Password";var ru=la;var ma=forwardRef((e,r)=>{let{size:t,length:n,mask:o,...s}=e,a=useRef([]),l="pinput",u=false,c={};"with"in s&&(c={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(l=s.name,delete s.name),"required"in s&&(u=true,delete s.required);let{style:i}=B(s),d=m=>{let g=m.currentTarget,P=a.current[parseInt(g.dataset.index)+1],x=a.current[parseInt(g.dataset.index)-1];g.value.length===1&&P?P.focus():g.value.length===0&&x&&x.focus();},{variant:f}=j(true);return useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsx(p,{name:l,style:i,className:`--otp --${s.variant??f??U.Medium} flex aic rel`,"data-required":u,"data-size":t||n||4,...c,children:Array(t||n||4).fill(1).map((m,g)=>jsx(fe,{autoComplete:"new-password","data-index":g,ref:P=>{a.current[g]=P;},numeric:true,onChange:d,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${g}`))})});ma.displayName="Zuz.PinInput";var iu=ma;var pa=forwardRef((e,r)=>{let{children:t,className:n,name:o,required:s,type:a,value:l,variant:u,checked:c,onSwitch:i,...d}=e,[f,m]=useState(c||false),{variant:g}=j(true),P=useRef(null);return jsxs(Mt,{className:`${n} --${(a||Co.Default).toLowerCase()} --radio${!a||a==Co.Default?"":"card"} --${u||g||U.Small} flex aic rel`.trim(),...d,children:[jsx(fe,{ref:P,defaultChecked:f,value:l||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:x=>{i&&i(x.target.checked,l||"cb"),m(x.target.checked);}}),jsx(p,{className:"--dot rel",children:jsx(p,{className:"--rod abs abc"})}),jsx(p,{className:"--value",children:t})]})});pa.displayName="Zuz.Radio";var pu=pa;var ua=forwardRef((e,r)=>{let{fx:t,withStyle:n,as:o,reverse:s=false,searchIcon:a=V.search,hideSearchIcon:l=false,clearIcon:u=V.close,hideClearIcon:c=false,onChange:i,onClear:d,...f}=e,{style:m,className:g}=B({as:e.as}),[P,x]=useState(""),{variant:T}=j(true),S=useRef(null);"type"in e&&delete e.type;let R=v=>{x(v.target.value),i?.(v.target.value);},h=v=>{P.trim()!==""&&(x(""),i?.(""),S.current&&(S.current.value="",e.onConfirm?.("")));};return useImperativeHandle(r,()=>({focus:()=>S.current?.focus(),value:()=>S.current?.value})),useEffect(()=>{},[]),jsxs(p,{style:m,className:`--search --no-shrink ${s?"--search-rev":""} --${e.variant||T||U.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${g}`.trim(),children:[jsx(fe,{ref:S,onChange:R,...f}),e.shortcut&&jsx(xr,{keys:e.shortcut,as:"abs"}),jsx(_,{tabIndex:-1,onClick:v=>h(),className:"--send flex aic jcc",variant:e.variant||U.Medium,children:P!==""?!c&&(typeof u=="string"?jsx(te,{name:u,as:"--search-action"}):u):!l&&(typeof a=="string"?jsx(te,{name:a,as:"--search-action"}):a)})]})});ua.displayName="Zuz.Search";var br=ua;var bu=({label:e,icon:r})=>jsxs(p,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[r&&jsx(te,{name:r}),jsx(K,{as:"--select-group-label",children:e})]}),da=bu;var ha=({checkIcon:e,selected:r,updateValue:t,o:n})=>{let o=e?typeof e=="string"?jsx(te,{name:"checkIcon"}):e:V.check,s=n.disabled===true;return jsxs(_,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${r?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxs(De,{as:"--option-item-meta --aic",children:[n.icon&&jsx(te,{name:n.icon,as:`--select-option-icon --icon-${n.value}`,color:n.iconColor}),jsx(K,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),r&&jsx(De,{aic:true,jcc:true,as:"--select-option-check --abs",children:o})]})};ha.displayName="Option";var ya=ha;var ba=(({ref:e,...r})=>{let{selected:t,options:n,label:o,name:s,variant:a,search:l,searchPlaceholder:u,maxHeight:c,arrowDownIcon:i=V.arrowDown,arrowUpIcon:d=V.arrowUp,expanded:f,multiple:m,tokenizer:g,wrapTokens:P,disabled:x,checkIcon:T,closeIcon:S,editable:R,editablePlaceholder:h,onChange:v,required:y,with:b,...E}=r,$=Nt(),L=!!(s&&$?.setFieldValue),A=An(s),M=Hn(s),O=R===true&&m!==true&&g!==true,F=N=>typeof N=="string"||typeof N=="number",Z=N=>typeof N=="object"&&N!==null&&!Array.isArray(N)&&"value"in N&&"label"in N,I=N=>n.find(ee=>String(ee.value)===String(N)),k=N=>{if(N==null)return null;if(O&&N==="")return "";if(m||g)return (Array.isArray(N)?N:[N]).map(ge=>F(ge)?I(ge):ge).filter(ge=>Z(ge));if(F(N)){let ee=I(N);return ee||(O?String(N):null)}return Z(N)?N:null},X=()=>{if(t!==void 0)return k(t);let N=n.find(ee=>String(ee.value)==="-1");return N||(O?"":null)},Y=N=>Array.isArray(N)?N.map(ee=>ee.value):Z(N)?N.value:N,[H,z]=useState(()=>X()),[G,W]=useState(false),[ne,J]=useState(null),ae=useRef(null),pe=useRef(null),ye=useRef(null),ie=useId(),ce=useMemo(()=>s||ie,[s,ie]),{reposition:q}=It(ye,{direction:vt.Bottom,offset:2}),{variant:re}=j(true),le=S?typeof S=="string"?jsx(te,{name:S}):S:V.close,{className:de,style:Ae,rest:Ee}=B(E,void 0),{onClick:Se,...$e}=Ee||{},se=useMemo(()=>M!==void 0?k(M):H,[M,H,n,O,m,g]),qe=useMemo(()=>{if(!(!se||Array.isArray(se)||!Z(se)))return se},[se]),Nr=useMemo(()=>O?Z(se)?String(se.value??""):F(se)?String(se):"":"",[O,se]),Ua=N=>Array.isArray(se)?se.some(ee=>ee.value===N.value):Z(se)?se.value===N.value:O&&F(se)?String(se)===String(N.value):false,st=N=>{if(L&&$?.setFieldValue&&s){$.setFieldValue(s,Y(N));return}z(N);},bt=N=>{v?.(R===true&&N instanceof Option?String(N.value):N);},qa=N=>{if(!(x||N.disabled)){if(m||g){let ee=Array.isArray(se)?se:[],Ie=ee.find(bo=>bo.value===N.value)?ee.filter(bo=>bo.value!==N.value):[...ee,N];st(Ie),bt(Ie);return}st(N),W(false),bt(N);}},Xa=N=>{let ee=N.target.value,ge=ee===""?null:I(ee),Ie=ge?ge.value:ee;st(Ie),bt(Ie);},Ya=N=>{if(N.key==="Enter"&&(N.preventDefault(),O)){let ee=N.currentTarget.value.trim();if(!ee){W(false);return}let Ie=I(ee)??ee;st(Ie),bt(Ie),W(false);}},ja=(N,ee)=>{if(N.stopPropagation(),x)return;let ge=se.filter(Ie=>Ie.value!==ee.value);st(ge),W(false),bt(ge);},Qa=N=>{let ee=N.currentTarget,ge=ee.scrollTop===0&&N.deltaY<0,Ie=ee.scrollHeight-ee.scrollTop===ee.clientHeight&&N.deltaY>0;!ge&&!Ie||N.preventDefault(),N.stopPropagation();};useImperativeHandle(e,()=>({setSelected:N=>{st(k(N));},getValue:()=>se??null}),[se,n,O,m,g,L,s]),useEffect(()=>{L||t===void 0||z(k(t));},[t,L,n,O,m,g]),useEffect(()=>{if(!G)return;let N=()=>{q();};return window.addEventListener("scroll",N,true),window.addEventListener("resize",q),()=>{window.removeEventListener("scroll",N,true),window.removeEventListener("resize",q);}},[G,q]),useEffect(()=>{if(!G){pe.current&&(pe.current.value=""),J(null);return}pe.current?.focus(),q();let N=ge=>{ae.current&&!ae.current.contains(ge.target)&&W(false);},ee=setTimeout(()=>{document.addEventListener("click",N);},0);return ()=>{clearTimeout(ee),document.removeEventListener("click",N);}},[G,q]);let Ja=useDebounce(N=>J(N===""?null:N),300),ei=useDebounce(Xa,300);return jsxs(p,{ref:ae,"data-required":y?"true":void 0,with:b,className:[`--select ${f==true?"--expanded":""}`,`--${a||re}`,`${s?`--${s}`:""}`,`${A?"--has-error":""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:ce,children:[O?jsxs(p,{"data-value":qe?.value??(Nr||"-1"),className:`--select-display --selected --editable flex aic rel ${de}`.trim(),style:Ae,onClick:N=>N.stopPropagation(),...$e,children:[qe?.icon&&jsx(te,{as:"--selected-icon",name:qe.icon}),jsx(De,{aic:true,as:"--label-wrapper",children:jsx(fe,{"aria-expanded":G,className:"--select-input",disabled:x,onChange:ei,onClick:N=>{N.stopPropagation(),x||W(true);},onKeyDown:Ya,placeholder:h||o||"Choose",type:"text",defaultValue:Nr})}),jsx(_,{className:"--select-toggle rel flex aic jcc",disabled:x,onClick:N=>{N.stopPropagation(),x||W(ee=>!ee);},tabIndex:-1,withLabel:false,children:G?typeof d=="string"?jsx(te,{name:d,as:"--search-action"}):d:typeof i=="string"?jsx(te,{name:i,as:"--search-action"}):i})]}):jsxs(_,{disabled:x,variant:a||re,"data-value":qe?.value??"-1",className:`--select-display --selected flex aic rel ${de}`.trim(),withLabel:false,style:Ae,onClick:N=>{N.stopPropagation(),x||W(ee=>!ee);},...$e,children:[qe?.icon&&jsx(te,{as:"--selected-icon",name:qe.icon}),jsx(De,{aic:true,as:"--label-wrapper",children:g&&Array.isArray(se)&&se.length>0?jsxs(De,{as:`--tokens-wrap${P===true?" --wrap":""}`,children:[se.map(N=>jsxs(De,{aic:true,as:"--token",children:[jsx(K,{as:"--token-label",children:N.label}),jsx(p,{as:"--token-remove",onClick:ee=>ja(ee,N),children:le})]},N.value)),se.length<n.length&&jsx(K,{as:"--label",children:o||"Choose"})]}):jsx(K,{as:"--label",children:Array.isArray(se)?se.length>0?`${se.length} selected`:o||"Choose":qe?.label||o||"Choose"})}),jsx(p,{className:"--svg-arrow rel flex aic jcc",children:G?typeof d=="string"?jsx(te,{name:d,as:"--search-action"}):d:typeof i=="string"?jsx(te,{name:i,as:"--search-action"}):i})]}),jsxs(p,{id:ce,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!G,onWheel:Qa,style:{maxHeight:c||"auto"},ref:ye,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:G,duration:.05},children:[l&&jsx(p,{as:"--select-search --no-shrink flex --sticky",children:jsx(br,{ref:pe,variant:U.Small,placeholder:u||"Search...",onChange:Ja})}),o&&jsx(da,{label:o}),n?.filter(N=>!ne||N.label.toLowerCase().includes(ne.toLowerCase()))?.map(N=>jsx(ya,{updateValue:qa,checkIcon:T,selected:Ua(N),o:N},`option-${N.label.replace(/\s+/g,"-")}-${N.value}`))]})]})});ba.displayName="Zuz.Select";var Cu=ba;var va=({ref:e,...r})=>jsx(Ot,{type:Fe.Switch,...r,ref:e});va.displayName="Zuz.Switch";var Pu=va;var wa=e=>{let{idx:r,id:t,as:n,weight:o,style:s,value:a,render:l,resize:u,sortBy:c,sortable:i,onSort:d}=e,[f,m]=useState(0),g=()=>{i&&(d?.(String(t),f==1?-1:1),m(P=>P==1?-1:1));};return jsxs(p,{style:{flex:o||1,...s},as:`--col flex aic ${n||""} ${i?"--sortable":""}`,onClick:g,children:[jsx(p,{as:"--colv",children:a}),r==-1&&i&&c==t&&jsx(p,{as:"--arrow flex aib",children:f==1?V.arrowUp:V.arrowDown})]})};wa.displayName="Zuz.Column";var go=wa;var Pa=e=>{let{index:r,pubsub:t,schema:n,data:o,ids:s,styles:a,animate:l,sortBy:u,selectable:c,tableRef:i,loading:d,rowClassName:f,onSort:m,onRowClick:g,onSelect:P,onContextMenu:x}=e,T=useDelayed(),S=useMemo(()=>({transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:.02*(r+1)}),[]),R=useRef(null),h=(y,b)=>{r==-1?t.emit(`ALL_ROWS_${y?"CHECKED":"UNCHECKED"}`,y):(P&&P(o,y),t.emit(`ROW_${y?"CHECKED":"UNCHECKED"}`,y,b));},v=(y,b,E)=>jsx(go,{idx:y,id:b,as:"--selector",pubsub:t,value:jsx(Ot,{value:E,ref:R,onSwitch:h,type:Fe.Default})});return useEffect(()=>{let y=(L,A)=>{R.current?.setChecked(L,false);},b=(L,A)=>{let M=false;i?.current&&i.current.querySelectorAll(".--row").forEach(O=>{let F=O;if(!F.classList.contains("--row-head")){let Z=F.querySelector(".--selector input[type=checkbox]");Z&&Z.checked&&!M&&(M=Z.checked);}}),R.current.setChecked(M,false);},E=L=>{R.current?.setChecked(L,false),P&&P(o,L);},$=L=>{R.current?.setChecked(L,false),P&&P(o,L);};return r==-1?(t.on("ROW_CHECKED",y),t.on("ROW_UNCHECKED",b),()=>{t.off("ROW_CHECKED",y),t.off("ROW_UNCHECKED",b);}):(t.on("ALL_ROWS_CHECKED",E),t.on("ALL_ROWS_UNCHECKED",$),()=>{t.off("ALL_ROWS_CHECKED",E),t.off("ALL_ROWS_UNCHECKED",$);})},[]),jsxs(p,{onContextMenu:y=>x?x(y,o):null,onClick:y=>g?g(y,e.data):()=>{},...l?{fx:{...S,when:T}}:{},as:`--row flex aic ${g?"--row-clickable":""} ${r==-1?"--row-head":""} ${f||""}`,children:[r==-1&&n.map((y,b)=>{let{renderWhenHeader:E,render:$,value:L,...A}=y;return jsxs(Fragment,{children:[c&&b==0&&v(-1,`--selector-${y.id}`,"all"),jsx(go,{idx:-1,onSort:m,sortBy:u,value:L,...A,pubsub:t,style:a[y.id]})]},`--col-${y.id}`)}),d&&r>-1&&jsx(p,{as:"--col",children:jsx(K,{as:"opacity:0",children:"..."})}),!d&&r>-1&&s&&o&&n.map((y,b)=>jsxs(Fragment,{children:[c&&b==0&&v(b,`--selector-${y.id}`,y.id.toString()),s.includes(String(y.id))?jsx(go,{pubsub:t,idx:b,id:String(y.id),style:a[String(y.id)],value:y.render?y.render(o,r):o[String(y.id).includes(".")?String(y.id).split(".").reverse()[0]:y.id]}):null]},`--${String(y.id)}-val-${b}`))]})};Pa.displayName="Zuz.Row";var ho=Pa;var Ea=(e,r)=>{let{schema:t,rows:n,rowCount:o,rowsPerPage:s,currentPage:a,pagination:l,paginationHash:u,showPaginationOnZeroPageCount:c,animateRows:i,header:d,rowClassName:f,selectableRows:m,hoverable:g,sortBy:P,loading:x,loadingRowCount:T,loadingMessage:S,spinner:R,emptyMessage:h,onSort:v,onRowClick:y,onRowSelectToggle:b,onPageChange:E,onRowContextMenu:$,...L}=e,A=useRef(null),M=useMemo(()=>t.reduce((ce,q)=>(ce[q.id]={flex:q.weight||1,...q.w&&{width:q.w},...q.maxW&&{maxWidth:q.maxW},...q.minW&&{minWidth:q.minW},...q.h&&{height:q.h},...q.maxH&&{maxHeight:q.maxH},...q.minH&&{minHeight:q.minH}},ce),{}),[t]),O=useMemo(()=>Object.keys(M),[t]),F=useMemo(()=>d??true,[d]),{style:Z,className:I,rest:k}=B(L),X=useRef(null),Y=useMemo(()=>new PubSub,[]),H=useRef(n.map(()=>uuid(8))),[z,G]=useState(P||null),[W,ne]=useState(S||"loading"),J=useMemo(()=>!x&&n&&n.length==0,[x,n]),ae=useCallback(()=>h?typeof h=="function"?jsx(h,{}):h:jsx(K,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);useEffect(()=>{n.length&&!H.current&&(H.current=n.map(()=>uuid(8)));},[n]);let pe=(ce,q)=>{G(ce),v?.(ce,q);},ye=(o||(n?n.length:0))/(s||10),ie=useMemo(()=>c||ye>1?jsx(Lt,{hash:u,ref:A,renderOnZeroPageCount:c,onPageChange:E,paginationStyle:"table",startPage:a,itemCount:o||(n?n.length:0),itemsPerPage:s||10}):null,[a,o]);return useImperativeHandle(r,()=>({setLoading(ce){}})),jsxs(p,{as:`--table ${g??true?"--hoverable":""} flex cols rel ${I}`,ref:X,children:[F==true&&jsx(ho,{sortBy:z,onSort:pe,tableRef:X,pubsub:Y,selectable:m,index:-1,schema:t,loading:true,styles:M}),x&&jsxs(p,{as:"center-x flex aic --table-spinner",children:[jsx(Ce,{type:R||ve.Simple}),W&&jsx(K,{as:"--table-loading-message",children:W})]}),x&&Array(T||5).fill({}).map((ce,q)=>jsx(ho,{tableRef:X,index:q,pubsub:Y,schema:t,styles:M,loading:true,animate:i,onRowClick:y},`--trow-loading-${q}-${t[0].id}`)),!x&&n&&n.map((ce,q)=>jsx(ho,{tableRef:X,pubsub:Y,loading:false,index:q,schema:t,ids:O,styles:M,animate:i,data:ce,onRowClick:y,rowClassName:f,selectable:m,onSelect:b,onContextMenu:$},`--trow-${H.current[q]||q}-${t[0].id}`)),J&&ae(),l&&ie&&jsx(p,{"aria-hidden":!l||!ie,...i?{fx:{transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&l&&ie!=null}}:{},as:"--row flex aic --row-footer",children:ie})]})};Ea.displayName="Zuz.Table";var Hu=forwardRef(Ea),Au=Hu;var Fu=({ref:e,...r})=>{let{title:t,items:n}=r,[o,s]=useState(0),a=(l,u,c)=>{l.preventDefault(),s(u),document.getElementById(c)?.scrollIntoView({behavior:"smooth"});};return jsxs(p,{ref:e,as:"--table-of-contents rel flex cols",children:[jsx(K,{as:"--toc-title",children:t}),jsx(et,{items:n.map((l,u)=>jsx("a",{className:o==u?"--toc-active":"",style:{anchorName:o===u?"--toc-active":"none",color:o==u?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:c=>a(c,u,l.tag),href:`#${l.tag}`,children:l.label}))})]})},zu=Fu;var Na=({isActive:e,transitionType:r,speed:t,width:n,render:o,content:s,onHeightChange:a})=>{let l=useRef(null),u=useResizeObserver(l);useEffect(()=>{e&&u.height>0&&a(u.height);},[e,u.height]);let i=useMemo(()=>{let d={width:n>0?`${n}px`:"100%",minWidth:n>0?`${n}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return r==="fade"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,visibility:e?"visible":"hidden",transition:`opacity ${t}s ease-in-out`,zIndex:e?1:0}:r==="scale"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,transform:`scale(${e?1:.95})`,transition:`all ${t}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:e?1:0}:d},[e,r,n,t]);return jsx(p,{ref:l,style:{...i},className:"--content",children:o||e?s:null})};Na.displayName="Zuz.TabBody";var Ba=Na;var Ma=({ref:e,...r})=>{let{tabs:t,speed:n=.3,prerender:o=true,variant:s,tabStyle:a="fixed",onChange:l,transitionType:u="slide",...c}=r,[i,d]=useState(0),f=useRef(null),m=useResizeObserver(f),g=useMemo(()=>uuid(8),[]),[P,x]=useState("auto"),T=useMemo(()=>m.width>0,[m.width]);useImperativeHandle(e,()=>({setTab:b=>d(b)}));let S=useMemo(()=>t.map(b=>({...b,key:b.key||uuid(8)})),[t]),{style:R,className:h,rest:v}=B({as:`flex cols w-full no-overflow ${c.as||""}`,...c}),y=()=>{if(!T)return {opacity:0};switch(u){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${S.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${i*m.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxs(p,{ref:f,style:R,className:`--tabview --${a} flex cols ${h}`,children:[jsx(Vt,{as:"--tabview-head",onSwitch:b=>{d(b.index);let E=S.find($=>$.tag==b.tag);E&&E.onSelect&&(E.onSelect(E,b.index),l?.(E,b.index));},selected:i,items:S.reduce((b,E,$)=>(b.push({icon:E.icon,index:$,label:E.label,tag:E.tag}),b),[])}),jsx(p,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:P,transition:T?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:T?1:0},children:jsx(p,{className:"--track",style:{...y()},children:S.map((b,E)=>jsx(Ba,{isActive:E===i,transitionType:u,speed:n,width:m.width,render:o||E===i,onHeightChange:$=>E===i&&x($),content:b.body},`tab-body-${b.key||E}-${g}`))})})]})};Ma.displayName="Zuz.TabView";var ju=Ma;var tf=({ref:e,commands:r,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...a})=>{let[l,u]=useState([{type:"output",content:n}]),[c,i]=useState(""),d=useRef(null),f=useRef(null),{variant:m}=j(true);useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight);},[l]);let g=h=>{let v=typeof h=="string"?{type:"output",content:h}:h;u(y=>{let b=[...y,v];return b.length>1e3?b.slice(-1e3):b});},P=()=>u([]);useImperativeHandle(e,()=>({write:g,clear:P}));let x=async h=>{let[v,...y]=h.split(" "),b=v.toLowerCase();return r&&r[b]?await r[b](y):t?await t(h):`command not found: ${v}`},T=h=>{let v=/\u001b\[(\d+)m/g,y=[],b={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},E=0,$="#d4d4d4",L=false,A;for(;(A=v.exec(h))!==null;){let O=h.slice(E,A.index);O&&y.push({text:O,color:$,bold:L});let F=A[1];F==="0"?($="#d4d4d4",L=false):F==="1"?L=true:b[F]&&($=b[F]),E=v.lastIndex;}let M=h.slice(E);return M&&y.push({text:M,color:$,bold:L}),y},S=(h,v)=>h.includes("\x1B")?T(h).map((y,b)=>jsx(me,{style:{color:y.color||"#d4d4d4",fontWeight:y.bold?"bold":"normal"},children:y.text},`--terminal-msg-${b}-${y.text.replace(/\S+/g,"-")}`)):jsx(me,{style:{color:v==="error"?"#ff5f56":v==="command"?"#00ff00":"#d4d4d4"},children:h}),R=async h=>{if(h.key==="Enter"&&c.trim()){let v=c.trim(),y=[...l,{type:"command",content:`${o}${v}`}];i(""),u(y);let b=await x(v);u(E=>[...E,{type:"output",content:b}]);}};return jsxs(p,{as:`--zuz-terminal --${s||m||U.Medium} flex cols ${a.className}`,onClick:()=>f.current?.focus(),children:[jsx(p,{ref:d,className:"--terminal-log",children:l.map((h,v)=>jsx(p,{children:jsx(K,{children:S(h.content,h.type)})},v))}),jsxs(p,{as:"flex aic --terminal-input",children:[jsx(K,{as:"--terminal-prompt",children:o}),jsx(fe,{ref:f,className:"--zuz-term-input",autoFocus:true,value:c,variant:s||m||U.Medium,onChange:h=>i(h.target.value),onKeyDown:R})]})]})},of=tf;var rf=({meta:e})=>jsxs(_,{as:"flex aic --command-item",children:[e.icon&&jsx(te,{name:e.icon,as:"--command-icon"}),jsx(K,{children:e.label})]}),nf=({position:e,onSelect:r,commands:t,visible:n})=>jsx(p,{"aria-hidden":!n,fx:{transition:Q.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(o=>jsx(rf,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),Ha=nf;var Fa=({ref:e,...r})=>{let {autoResize:t,maxHeight:n,variant:o,resize:s="none",command:a,commands:l,name:u,onInput:c,cmd:i,renderDropdown:d,value:f,defaultValue:m,...g}=r,P=useRef(null),x=useRef(null),{variant:T}=j(true),{style:S,className:R,rest:h}=B(g),v=it();u?v.errors?.[u]:null;let b=u&&v.values&&v.setFieldValue,E=b?v.values?.[u]:void 0,$=useDebounce(k=>{b&&v.setFieldValue?.(u,k);},500),{showDropdown:L,dropdownPosition:A,handleKeyDown:M,handleInput:O,handleCommandSelect:F}=useCommandActions({command:a,commands:l,cmd:i,ref:P}),Z=useCallback(()=>{let k=P.current;!k||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{k.style.height="auto";let X=k.scrollHeight;if(n){let Y=parseInt(n.toString(),10);isNaN(Y)||(X=Math.min(X,Y));}k.style.height=`${X}px`,k.style.overflowY=n&&X>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),I=k=>{$(k.currentTarget.value),c?.(k),O(k),Z();};return useEffect(()=>{P.current&&u&&E!==void 0&&P.current.value!==String(E)&&(P.current.value=String(E));},[E,u]),useEffect(()=>{Z();},[f,m,Z]),useEffect(()=>{t&&P.current&&Z();},[t,Z]),useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),useEffect(()=>()=>{b&&v.deleteFieldValue?.(u);},[]),jsxs(p,{as:"rel",children:[jsx("textarea",{name:u,className:`--input --textarea --${o||T||U.Medium} flex ${R}`.trim(),style:{...S,resize:s,height:t?"auto":S?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:M,onInput:I,ref:k=>{P.current=k,typeof e=="function"?e(k):e&&(e.current=k);},value:f,defaultValue:m,...h}),d?d({show:L,position:A,commands:l||[],onSelect:F}):l&&l.length>0&&jsx(Ha,{visible:L,commands:l,onSelect:F,position:A})]})};Fa.displayName="Zuz.TextArea";var mf=Fa;var _a=forwardRef((e,r)=>{let{as:t,value:n,color:o,direction:s,...a}=e,l=useRef(null),[u,c]=useState(n||0);return useImperativeHandle(r,()=>({updateValue(i){u.toString().length!==i.toString().length&&c(i);},setValue(i){if(this.updateValue(i),l.current){let d=i.toString().split("");l.current.querySelectorAll(".--wheel-char").forEach((f,m)=>{let g=d[m];if(f instanceof HTMLElement){f.setAttribute("data-value",g);let P=f.querySelector(".--wheel-char-track");P instanceof HTMLElement&&(P.style.setProperty("--v",g),P.offsetWidth);}});}}})),useEffect(()=>{c(n||0);},[n]),jsxs(p,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:l,...a,children:[(u||0).toString().split("").map((i,d)=>isNaN(parseInt(i,10))?jsx(me,{className:"--wheel-char wheel-char-symbol grid",children:i},`wheel-char-symbol-${d}`):jsx(me,{"data-value":i,className:`--wheel-char grid ${d>(u||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxs(me,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":i},children:[jsx(me,{children:!s||s==="down"?0:9}),(!s||s==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((f,m)=>jsx(me,{children:f},`${d}--${m}`)),jsx(me,{children:!s||s==="down"?9:0})]})},`wheel-char-${d}`)),o&&jsx(p,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});_a.displayName="Zuz.TextWheel";var yf=_a;var Er=forwardRef((e,r)=>{let{as:t,meta:n,nodes:o,icons:s,onSelect:a,treeTag:l,selected:u,roots:c,expanded:i,...d}=e,{tag:f,label:m,icon:g,under:P,isHead:x}=n,T=useMemo(()=>c.includes(f),[c]),[S,R]=useState(i),h=()=>{localStorage.setItem(`--tn${l}-${f}`,S?"0":"1"),R(!S);};useEffect(()=>{i||T&&!localStorage.getItem(`--tn${l}-${f}`)?(localStorage.setItem(`--tn${l}-${f}`,"1"),R(true)):R(localStorage.getItem(`--tn${l}-${f}`)=="1");},[]);let v=useMemo(()=>o.filter(y=>y.under==f),[o,f]);return jsxs(p,{className:`--treenode ${T?"--is-root":""} --treenode-${f} flex cols`,children:[jsxs(p,{className:`--node --node-${f} flex aic ${u==f?" --selected":""}`,children:[jsx(_,{skeleton:d.skeleton,onClick:h,className:"--node-aro-btn",disabled:v.length==0,children:s?.arrowClose&&s?.arrowOpen?jsx(te,{skeleton:d.skeleton,className:"--node-aro-icon",name:v.length==0?s?.arrowDisabled||s?.arrowClose:S?s?.arrowOpen:s?.arrowClose}):v.length==0?V.chevronBottom:S?V.chevronBottom:V.chevronRight}),jsxs(_,{className:"--node-meta flex aic",onClick:y=>a(f),children:[(s?.nodeOpen&&s?.nodeClose||T&&s?.rootOpen&&s?.rootClose)&&jsx(te,{skeleton:d.skeleton,className:`--node-icon ${T?"--icon-root":""}`,name:g||(S?T&&s?.rootOpen||s.nodeOpen:T&&s?.rootClose||s?.nodeClose)}),jsx(K,{className:`--node-label ${T?"--node-label-root":""}`.trim(),skeleton:d.skeleton,children:m})]})]}),S&&v.length>0&&jsx(p,{className:`--sub-node tree-sub-node-${f} flex cols`,children:v.map(y=>jsx(Er,{treeTag:l,selected:u,onSelect:a,icons:s,roots:c,expanded:y.expanded||false,meta:y,nodes:o},`--node-${y.tag}`))})]})});Er.displayName="TreeItem";var Za=Er;var Ga=forwardRef((e,r)=>{let{as:t,nodes:n,onNodeSelect:o,tag:s,icons:a,roots:l,selected:u,...c}=e,[i,d]=useState(u);useImperativeHandle(r,()=>({getSelected:()=>i}),[o]);let f=m=>{d(m),o&&o(m);};return useEffect(()=>{i!=u&&d(u);},[u]),jsx(p,{className:"--treeview flex cols",children:n.filter(m=>l.includes(m.tag)).map(m=>jsx(Za,{treeTag:s?`-${s}`:"",selected:i,onSelect:g=>f(g),icons:a,meta:m,roots:l,expanded:m.expanded||false,skeleton:c.skeleton,nodes:n},`--node-${m.tag}`))})});Ga.displayName="Zuz.TreeView";var Tf=Ga;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
13
+ export{Ne as ALERT,Or as AVATAR,zl as Accordion,Ul as ActionBar,Yl as Alert,vc as AutoComplete,Ec as Avatar,Bc as Badge,p as Box,pm as Bubble,ls as BubbleMediaType,is as BubbleStatus,_ as Button,rs as CHART,Fe as CHECKBOX,Nf as COLORTHEME,er as Calendar,tm as Carousel,lm as Chart,Ot as CheckBox,Cm as CodeBlock,$m as ColorScheme,Mo as ContextMenu,Km as CookiesConsent,Me as Cover,rp as CropShape,tp as Cropper,sp as Crumb,Mf as DATATYPE,at as DIALOG,Vr as DIALOG_ACTION_POSITION,we as DRAWER_SIDE,cp as DatePicker,Ho as Dialog,zo as Drawer,zt as FILTER,Xe as FORMVALIDATION,Of as FORMVALIDATION_STYLE,fp as Fab,hp as Fieldset,bp as Filters,De as Flex,Op as Form,Hp as Grid,Oo as Group,te as Icon,tt as Image,fe as Input,xr as KeyboardKeys,Gs as KeysLabelMap,Ws as KeysMap,Mt as Label,Bo as LayersProvider,et as List,Up as MediaPlayer,Yp as NetworkStatus,St as ORIGIN,Bf as OriginType,Ye as Overlay,kf as PLACEMENTS,vt as POSITION,Df as PROGRESS,Lt as Pagination,no as PaginationStyle,ru as Password,iu as PinInput,xe as Position,Qe as ProgressBar,Co as RADIO,pu as Radio,Be as SHEET,So as SHEET_ACTION_POSITION,Ef as SKELETON,wo as SLIDER,Lf as SORT,ve as SPINNER,Ao as ScrollView,br as Search,Cu as Select,Vt as SelectTabs,Tp as Sheet,ct as Slider,jt as SnackPosition,xn as SnackStyle,Yt as SnackType,me as Span,Ce as Spinner,Vf as Status,Pu as Switch,Q as TRANSITIONS,oe as TRANSITION_CURVES,ju as TabView,Au as Table,zu as TableOfContents,of as Terminal,K as Text,yf as TextWheel,mf as Textarea,ci as ThemeProvider,bn as ToastDefaultTitle,jt as ToastPosition,Ko as ToastProvider,xn as ToastStyle,Yt as ToastType,lr as ToolTip,Tf as TreeView,U as Variant,wt as animationTransition,Po as buildClassString,Ar as buildWithStyles,td as css,To as getAnimationCurve,od as getAnimationTransition,oi as getZuzMap,Zs as isKeyCombination,Hr as setZuzMap,B as useBase,yl as useContextMenu,vl as useDialog,Cl as useDrawer,be as useFx,Rl as useMorph,It as usePosition,Ml as useSnack,Zo as useToast};