@zuzjs/ui 1.0.71 → 1.0.72

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 as f$1,e,g,d,h,c}from'./chunk-SNPEZORB.js';export{e as PACKAGE_NAME,f as cleanProps,g as splitAtoms}from'./chunk-SNPEZORB.js';import {createContext,forwardRef,useMemo,Fragment,useState,useRef,useImperativeHandle,useEffect,useCallback,isValidElement,createElement,useId,memo,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 {uuid,MD5,withPost,_,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 gi="1.0.70",hi=gi;var Ur={Circle:"CIRCLE",Square:"SQUARE"},jf={Default:"DEFAULT",Circle:"CIRCLE"},Qf={Light:"light",Dark:"dark",System:"system"},Ke={Default:"DEFAULT",Switch:"SWITCH"},vt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ve=vt,St=AnchorType,Jf=St,ed={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"},q={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},td={Asc:"ASC",Desc:"DESC"},od={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},rd={Dots:"DOTS"},Je={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN",NotEmpty:"NOT_EMPTY",NotMinusOne:"NOT_MINUS_ONE"},Le={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"},nd={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},Me={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE",Confirm:"CONFIRM"},et=Me,Lo={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},qr=Lo,sd={Bar:"BAR",Ring:"RING"},Mo={Default:"range",Text:"number"},Oo={Default:"DEFAULT",Card:"CARD"},qt={Gooey:"gooey"},Pe={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Xr=Symbol.for("zuz.global.map"),Yr=e=>{globalThis[Xr]=e;},xi=()=>globalThis[Xr]||{},Do=e$1=>{let o=Array.isArray(e$1)?e$1.join(" "):e$1;if(!o||typeof o!="string")return "";let t=xi();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(o).filter(Boolean).map(r=>{let s=r.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,i,p]=s;return g(p).map(l=>{let c=`${i}(${l})`;return t[c]||l}).join(" ")}return t[r]||r}).join(" ")},Td=e=>{let o=Array.isArray(e)?e.join(" "):e;return !o||typeof o!="string"?"":Do(o)},jr=e=>{let o={};for(let t in e){let n=e[t];if(t.startsWith("--")){o[t]=n;continue}let r=d[t]?.toString()??t;if(r==="x"||r==="translateX"){let s=o.translate?.split(" ")??["0px","0px"];o.translate=`${h.addUnitsSafely(t,n)} ${s[1]??"0px"}`;}else if(r==="y"||r==="translateY"){let s=o.translate?.split(" ")??["0px","0px"];o.translate=`${s[0]??"0px"} ${h.addUnitsSafely(t,n)}`;}else c.includes(r)?o[r]=h.addUnitsSafely(t,n):o[r]=n;}return o},Vo=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,o=0,t=0)=>{let n={},r={},s=o||20,a=t||0;switch(e){case Q.SlideInLeft:case Q.SlideInRight:n={"--fx-x":e===Q.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},r={"--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},r={"--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},r={"--fx-y":`${a}px`,scale:1};break;case Q.ScaleIn:n={scale:0,opacity:0},r={scale:1,opacity:1};break;case Q.FadeIn:n={opacity:0},r={opacity:1};break}return {from:n,to:r}},Pd=(e,o,t)=>{let{from:n,to:r}=wt(e);return o?{...n,...r}:t?n:r};var vi=(e,o)=>{let t=useRef([]),n=useRef(false);return useEffect(()=>{e?.when||(n.current=false);},[e?.transition]),useEffect(()=>{let r=o?.current;if(!r||!e||!e.clearAtEnd)return;let s=a=>{t.current.includes(a.propertyName)&&e.clearAtEnd===true&&(r.style.transform="",r.style.filter="",t.current.forEach(i=>r.style.removeProperty(i)));};return r.addEventListener("transitionend",s),()=>r.removeEventListener("transitionend",s)},[e,o]),useEffect(()=>{if(typeof window>"u"||!o?.current)return;let r=o.current;(e?.scroll||e?.mouse)&&(r.style.willChange="transform",r.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",r.style.transition=`translate 0.1s ${e.curve?Vo(e.curve):"var(--spring)"}`);},[e,o]),useMemo(()=>{if(!e)return {style:{}};let{transition:r,from:s,to:a,exit:i,when:p,duration:l=.3,delay:c=0,curve:d,margin:u=0,offset:m=20,watch:y=[]}=e,R=p===false&&!n.current;p===true&&(n.current=true);let x={},{from:C,to:v}=r?wt(r,m,u):{from:s||{},to:a||{}};x=p===void 0?{...C,...v}:p?{...v}:i||C;let S=Vo(d),h=[],w=jr(x);t.current=Object.keys(w);let g={...w};return Object.keys(w).forEach(b=>{let I=b.startsWith("--")?"all":b;h.includes(I)||h.push(`${I} ${l}s ${S} ${c}s`);}),y.forEach(b=>{h.includes(b)||h.push(`${b} 0.1s ${S} 0s`);}),{style:{...g,transition:R?"none":h.join(", "),opacity:R?0:g.opacity,pointerEvents:R?"none":g.pointerEvents}}},[e,e?.when,e?.watch])},Se=vi;var Xt=null,Ct=e=>{if(e!=null)return typeof e=="number"?`${e}px`:e},Si=(e,o)=>{let{as:t,fx:n,busy:r=false,stripes:s,transition:a,skeleton:i,className:p,propsToRemove:l,draggable:c,dragOptions:d,style:u,...m}=e||{},y=typeof window<"u",R={},x={};if(c&&y&&!Xt&&(import('@zuzjs/hooks').then(g=>{Xt=g.useDrag;}).catch(g=>{console.error("Error loading useDrag:",g);}),Xt)){let g=Xt(d);R={onMouseDown:g.onMouseDown},x={transform:`translate(${g.position.x}px, ${g.position.y}px)`};}let C=[p,r===true?"--is-busy":"",s?`--has-stripes --stripes-${s}`:""].filter(Boolean).join(" "),v=a?{transition:a,duration:.3}:n||{},{style:S}=Se(v,o),h={};if(i?.enabled){let g=Ct(i.size),b=Ct(i.width),I=Ct(i.height),B=Ct(i.defaultSize),E=Ct(i.radius);g?(h["--skeleton-width"]=g,h["--skeleton-height"]=g):(b&&(h["--skeleton-width"]=b),I&&(h["--skeleton-height"]=I),B&&(h["--skeleton-default-size"]=B)),E&&(h["--skeleton-radius"]=E);}let w=Do(t??"");return {style:{...h,...u,...S,...x},className:[C,w||"",i?.enabled?"--skeleton":"",i?.enabled&&i?.type==="CIRCLE"?"--skeleton-circle":"",c?"--draggable":""].join(" ").trim(),rest:{...R,...f$1(m,l?[...l,"skeleton"]:["skeleton"])}}},O=Si;var en="(prefers-color-scheme: dark)",Ti=typeof window>"u",on=createContext(void 0),Fo=e=>{let o=useContext(on);if(!o){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return o},j=Fo,Pi=({children:e,storageKey:o="--ucs",forceTheme:t,zuzMap:n,...r})=>(n&&Yr(n),jsx(Ri,{storageKey:o,forceTheme:t,...r,children:e})),Ri=({children:e,storageKey:o,forceTheme:t,...n})=>{let[r,s]=useState(()=>t||tn(o,"system")),[a,i]=useState(()=>t||tn(o)),p=u=>(u||(u=window.matchMedia(en)),u.matches?"dark":"light"),l=useCallback(u=>{let m=u=="system"?p():u,y=document.documentElement;y.setAttribute("color-scheme",m),y.style.colorScheme=m,i(m);},[p]),c=useCallback(u=>{s(u),localStorage.setItem(o,u),l(u);},[r]),d=useCallback(u=>{let m=p(u);i(m),r==="system"&&l("system");},[r]);return useEffect(()=>{r==null&&window.localStorage.getItem(o);},[r]),useEffect(()=>{window.matchMedia(en).addEventListener("change",d);},[d]),useEffect(()=>{let u=m=>{m.key==o&&(m.newValue?c(m.newValue):c("system"));};return window.addEventListener("storage",u),()=>window.removeEventListener("storage",u)},[c]),useEffect(()=>{l(t||r||"system");},[r]),jsxs(on,{value:{colorScheme:r,resolvedScheme:a,setColorScheme:c,...n},children:[t?null:jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
1
+ import {f,e,g,d,h,c}from'./chunk-HNDEH7JC.js';export{e as PACKAGE_NAME,f as cleanProps,g as splitAtoms}from'./chunk-HNDEH7JC.js';import {createContext,forwardRef,useMemo,Fragment,useState,useRef,useImperativeHandle,useEffect,useCallback,isValidElement,createElement,useId,memo,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 {uuid,MD5,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 hi="1.0.71",yi=hi;var Gr={Circle:"CIRCLE",Square:"SQUARE"},Qf={Default:"DEFAULT",Circle:"CIRCLE"},Jf={Light:"light",Dark:"dark",System:"system"},Ke={Default:"DEFAULT",Switch:"SWITCH"},vt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ve=vt,St=AnchorType,ed=St,td={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"},q={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},od={Asc:"ASC",Desc:"DESC"},rd={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},nd={Dots:"DOTS"},Je={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN",NotEmpty:"NOT_EMPTY",NotMinusOne:"NOT_MINUS_ONE"},Le={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"},sd={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},Me={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE",Confirm:"CONFIRM"},et=Me,Lo={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},qr=Lo,ad={Bar:"BAR",Ring:"RING"},Mo={Default:"range",Text:"number"},Oo={Default:"DEFAULT",Card:"CARD"},qt={Gooey:"gooey"},Pe={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Xr=Symbol.for("zuz.global.map"),Yr=e=>{globalThis[Xr]=e;},bi=()=>globalThis[Xr]||{},Do=e$1=>{let o=Array.isArray(e$1)?e$1.join(" "):e$1;if(!o||typeof o!="string")return "";let t=bi();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(o).filter(Boolean).map(r=>{let s=r.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,i,p]=s;return g(p).map(l=>{let c=`${i}(${l})`;return t[c]||l}).join(" ")}return t[r]||r}).join(" ")},Pd=e=>{let o=Array.isArray(e)?e.join(" "):e;return !o||typeof o!="string"?"":Do(o)},jr=e=>{let o={};for(let t in e){let n=e[t];if(t.startsWith("--")){o[t]=n;continue}let r=d[t]?.toString()??t;if(r==="x"||r==="translateX"){let s=o.translate?.split(" ")??["0px","0px"];o.translate=`${h.addUnitsSafely(t,n)} ${s[1]??"0px"}`;}else if(r==="y"||r==="translateY"){let s=o.translate?.split(" ")??["0px","0px"];o.translate=`${s[0]??"0px"} ${h.addUnitsSafely(t,n)}`;}else c.includes(r)?o[r]=h.addUnitsSafely(t,n):o[r]=n;}return o},Vo=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,o=0,t=0)=>{let n={},r={},s=o||20,a=t||0;switch(e){case Q.SlideInLeft:case Q.SlideInRight:n={"--fx-x":e===Q.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},r={"--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},r={"--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},r={"--fx-y":`${a}px`,scale:1};break;case Q.ScaleIn:n={scale:0,opacity:0},r={scale:1,opacity:1};break;case Q.FadeIn:n={opacity:0},r={opacity:1};break}return {from:n,to:r}},Rd=(e,o,t)=>{let{from:n,to:r}=wt(e);return o?{...n,...r}:t?n:r};var Si=(e,o)=>{let t=useRef([]),n=useRef(false);return useEffect(()=>{e?.when||(n.current=false);},[e?.transition]),useEffect(()=>{let r=o?.current;if(!r||!e||!e.clearAtEnd)return;let s=a=>{t.current.includes(a.propertyName)&&e.clearAtEnd===true&&(r.style.transform="",r.style.filter="",t.current.forEach(i=>r.style.removeProperty(i)));};return r.addEventListener("transitionend",s),()=>r.removeEventListener("transitionend",s)},[e,o]),useEffect(()=>{if(typeof window>"u"||!o?.current)return;let r=o.current;(e?.scroll||e?.mouse)&&(r.style.willChange="transform",r.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",r.style.transition=`translate 0.1s ${e.curve?Vo(e.curve):"var(--spring)"}`);},[e,o]),useMemo(()=>{if(!e)return {style:{}};let{transition:r,from:s,to:a,exit:i,when:p,duration:l=.3,delay:c=0,curve:d,margin:f=0,offset:m=20,watch:y=[]}=e,R=p===false&&!n.current;p===true&&(n.current=true);let x={},{from:C,to:v}=r?wt(r,m,f):{from:s||{},to:a||{}};x=p===void 0?{...C,...v}:p?{...v}:i||C;let w=Vo(d),h=[],S=jr(x);t.current=Object.keys(S);let g={...S};return Object.keys(S).forEach(b=>{let I=b.startsWith("--")?"all":b;h.includes(I)||h.push(`${I} ${l}s ${w} ${c}s`);}),y.forEach(b=>{h.includes(b)||h.push(`${b} 0.1s ${w} 0s`);}),{style:{...g,transition:R?"none":h.join(", "),opacity:R?0:g.opacity,pointerEvents:R?"none":g.pointerEvents}}},[e,e?.when,e?.watch])},Se=Si;var Xt=null,Ct=e=>{if(e!=null)return typeof e=="number"?`${e}px`:e},wi=(e,o)=>{let{as:t,fx:n,busy:r=false,stripes:s,transition:a,skeleton:i,className:p,propsToRemove:l,draggable:c,dragOptions:d,style:f$1,...m}=e||{},y=typeof window<"u",R={},x={};if(c&&y&&!Xt&&(import('@zuzjs/hooks').then(g=>{Xt=g.useDrag;}).catch(g=>{console.error("Error loading useDrag:",g);}),Xt)){let g=Xt(d);R={onMouseDown:g.onMouseDown},x={transform:`translate(${g.position.x}px, ${g.position.y}px)`};}let C=[p,r===true?"--is-busy":"",s?`--has-stripes --stripes-${s}`:""].filter(Boolean).join(" "),v=a?{transition:a,duration:.3}:n||{},{style:w}=Se(v,o),h={};if(i?.enabled){let g=Ct(i.size),b=Ct(i.width),I=Ct(i.height),L=Ct(i.defaultSize),N=Ct(i.radius);g?(h["--skeleton-width"]=g,h["--skeleton-height"]=g):(b&&(h["--skeleton-width"]=b),I&&(h["--skeleton-height"]=I),L&&(h["--skeleton-default-size"]=L)),N&&(h["--skeleton-radius"]=N);}let S=Do(t??"");return {style:{...h,...f$1,...w,...x},className:[C,S||"",i?.enabled?"--skeleton":"",i?.enabled&&i?.type==="CIRCLE"?"--skeleton-circle":"",c?"--draggable":""].join(" ").trim(),rest:{...R,...f(m,l?[...l,"skeleton"]:["skeleton"])}}},O=wi;var en="(prefers-color-scheme: dark)",Pi=typeof window>"u",on=createContext(void 0),Fo=e=>{let o=useContext(on);if(!o){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return o},j=Fo,Ri=({children:e,storageKey:o="--ucs",forceTheme:t,zuzMap:n,...r})=>(n&&Yr(n),jsx(Ii,{storageKey:o,forceTheme:t,...r,children:e})),Ii=({children:e,storageKey:o,forceTheme:t,...n})=>{let[r,s]=useState(()=>t||tn(o,"system")),[a,i]=useState(()=>t||tn(o)),p=f=>(f||(f=window.matchMedia(en)),f.matches?"dark":"light"),l=useCallback(f=>{let m=f=="system"?p():f,y=document.documentElement;y.setAttribute("color-scheme",m),y.style.colorScheme=m,i(m);},[p]),c=useCallback(f=>{s(f),localStorage.setItem(o,f),l(f);},[r]),d=useCallback(f=>{let m=p(f);i(m),r==="system"&&l("system");},[r]);return useEffect(()=>{r==null&&window.localStorage.getItem(o);},[r]),useEffect(()=>{window.matchMedia(en).addEventListener("change",d);},[d]),useEffect(()=>{let f=m=>{m.key==o&&(m.newValue?c(m.newValue):c("system"));};return window.addEventListener("storage",f),()=>window.removeEventListener("storage",f)},[c]),useEffect(()=>{l(t||r||"system");},[r]),jsxs(on,{value:{colorScheme:r,resolvedScheme:a,setColorScheme:c,...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(\`${o}\`) || "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(zo,{children:e})]})},tn=(e,o)=>{if(Ti)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||o};var rn=({ref:e,...o})=>{let{style:t,...n}=o,{style:r,className:s,rest:a}=O(n);return jsx("span",{ref:e,style:t,className:s,...a})};rn.displayName="Zuz.Span";var ie=rn;var sn=forwardRef((e,o)=>{let{name:t,pathCount:n,variant:r,color:s,size:a,...i}=e,{variant:p}=j(true),{className:l,style:c,rest:d}=O(i);return jsx("div",{style:{color:s,...c,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${r||p||q.Small} ${l}`.trim(),ref:o,...d,children:Array(n||0).fill(0).map((u,m)=>jsx(ie,{className:`path${m+1}`},`${t}-layer-${m}`))})});sn.displayName="Zuz.Icon";var te=sn;var we={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var an=e=>{let{type:o,variant:t,color:n,...r}=e,{className:s,style:a,rest:i}=O(r),{spinner:p}=j(true),l=()=>{switch(o||p?.type||we.Simple){case we.Simple:return null;case we.Wave:return jsxs(Fragment$1,{children:[jsx(f,{as:"--bar --bar1"}),jsx(f,{as:"--bar --bar2"}),jsx(f,{as:"--bar --bar3"})]});case we.Roller:return null}};return jsx(f,{className:`${s} --spinner --${(o||p?.type||we.Simple).toLowerCase()} --${t||p?.variant||q.Small}`.trim(),style:{...a},...i,children:l()})};an.displayName="Zuz.Spinner";var Re=an;var ln=({ref:e,...o})=>{let{h:t,html:n,children:r,lines:s,tfx:a,delay:i=0,duration:p=.5,stagger:l=.05,repeat:c=true,reveal:d=false,hover:u=false,...m}=o,{style:y,className:R,rest:x}=O(m),C=useRef(null),[v,S]=useState(false),[h]=useIntersectionObserver([C],{threshold:[1]}),w=useMemo(()=>{if(y?.opacity!==void 0)return y.opacity;if(typeof o.as=="string"){let V=o.as.match(/opacity:([\d.]+)/);if(V)return V[1]}return 1},[o.as,y?.opacity]),g=useMemo(()=>a?u?v:d?h===1:true:false,[a,u,v,d,h]);useEffect(()=>{e&&(typeof e=="function"?e(C.current):e.current=C.current);},[e]);let b=`h${o.h||1}`,I=useMemo(()=>typeof r=="string"?r:Array.isArray(r)&&r.length===1&&typeof r[0]=="string"?r[0]:null,[r]),B=useMemo(()=>{let V=Array.isArray(o.as)?o.as.join(" "):o.as||"";return typeof V=="string"&&V.includes("text-clip")},[o.as]);useLayoutEffect(()=>{if(!B||!C.current||I===null)return;let V=C.current,k=0,D=0,$=()=>{let L=V.getBoundingClientRect(),U=getComputedStyle(V).backgroundImage,X=L.width;V.querySelectorAll(".--fx-char").forEach(Z=>{let W=Z.getBoundingClientRect().left-L.left;Z.style.backgroundImage=U,Z.style.backgroundRepeat="no-repeat",Z.style.backgroundSize=`${X}px 100%`,Z.style.backgroundPosition=`-${W}px 0`,Z.style.backgroundClip="text",Z.style.webkitBackgroundClip="text",Z.style.color="transparent";});},_=()=>{cancelAnimationFrame(k),cancelAnimationFrame(D),k=requestAnimationFrame(()=>{D=requestAnimationFrame($);});};_();let N=new ResizeObserver(_);return N.observe(V),typeof document<"u"&&"fonts"in document&&document.fonts?.ready.then(_),window.addEventListener("resize",_),()=>{cancelAnimationFrame(k),cancelAnimationFrame(D),N.disconnect(),window.removeEventListener("resize",_);}},[B,I,a,g]);let E=useMemo(()=>n?jsx(ie,{dangerouslySetInnerHTML:{__html:n}}):a&&I!==null?I.split("").map((V,k)=>{let D=V===" ",_=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":c?"infinite":"1";return jsx(ie,{"data-char":V,className:`--fx-char -fx ${g?`--fx-${a}`:""}`,style:{"--delay":`${i+k*l}s`,"--duration":`${p}s`,"--iteration":_,"--target-opacity":w,display:D?"inline":"inline-block",whiteSpace:"pre",opacity:!g&&a==="typewriter"?0:void 0},children:V},k)}):r,[r,n,a,I,g,i,l,p,c]);return jsx(b,{ref:C,onMouseEnter:()=>u&&S(true),onMouseLeave:()=>u&&S(false),style:a?{...y,display:a?"flex":y?.display,flexWrap:a?"wrap":y?.flexWrap,opacity:a&&!g?0:a?1:y?.opacity,transition:a?"opacity 0.4s ease":void 0}:y,className:`${R} ${a?"--text-fx -fx":""}`.trim(),...x,children:E})};ln.displayName="Zuz.Text";var z=ln;var pn=({ref:e,...o})=>{let {title:t,position:n,margin:r=4,anchorName:s="--tooltip-anchor",children:a,show:i,variant:p,...l}=o,{style:c,className:d,rest:u}=O(l),m=n||ve.Top;useRef(null);let [R,x]=useState(false);useRef(6);let v=i===true||R,h=`--anchor-${useId().replace(/:/g,"")}`,{tooltip:w}=j(true),g=useMemo(()=>{let I=false;return addPropsToChildren(a,B=>{let E=B.props.className?.includes(s);return E&&(I=true),E||!I},(B,E)=>{let V=E.props.className?.includes(s),k=B===0,D={};return (V||k)&&(D.style={...E.props.style,anchorName:h}),k&&(D.onMouseEnter=$=>{x(true),E.props.onMouseEnter?.($);},D.onMouseLeave=$=>{x(false),E.props.onMouseLeave?.($);}),D})},[a,s,h]),b=Se({transition:m==ve.Top?Q.SlideInTop:m==ve.Bottom?Q.SlideInBottom:m==ve.Left?Q.SlideInLeft:Q.SlideInRight,when:v,duration:.2,offset:r+6,margin:m==ve.Top||m==ve.Left?-r:r,curve:w?.curve||oe.EaseInOut});return useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxs(Fragment$1,{children:[g,createPortal(jsx(f,{style:{positionAnchor:h,...b.style,...m===ve.Top||m===ve.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${v} --${p||w?.variant||q.Small} --${m} abs ${d}`.trim(),children:typeof t=="string"?jsx(z,{as:"--text rel",children:t}):t}),document.body)]})};pn.displayName="Zuz.ToolTip";var Pt=pn;var Qt={Loading:"loading",Normal:"normal"};var fn=({ref:e,...o})=>{let{reset:t,kind:n="solid",variant:r,tooltip:s,tooltipProps:a,icon:i,iconSize:p,children:l,withLabel:c,spinner:d,state:u,disabled:m,...y}=o,{style:R,className:x,rest:C}=O(y),{variant:v}=j(true),S=jsxs("button",{className:removeDuplicateWords(`--button ${s?"--tooltip-anchor":""} --${n} --${r||v} flex aic ${t?"":"jcc"} ${i?"--with-icon":""} ${x}`).trim().replace(/\s+/g," "),style:R,ref:e,disabled:u==Qt.Loading||o.skeleton?.enabled||m,...C,children:[u==Qt.Loading&&jsx(Re,{variant:r||v,type:d||we.Simple}),(!u||u==Qt.Normal)&&jsxs(Fragment$1,{children:[i&&jsx(te,{variant:p,name:i}),c===true?jsx(ie,{children:l}):l]})]});return s?jsx(Pt,{title:s,...a,children:S}):S};fn.displayName="Zuz.Button";var K=fn;var Ui=e=>{let{label:o,labelColor:t,icon:n,iconColor:r,index:s,className:a,onSelect:i}=e;return o=="-"?jsx(f,{className:"--line"}):jsxs(K,{reset:true,onClick:p=>i?.(e),className:`--item ${a||""}`.trim(),children:[jsx(f,{as:"--icon",children:jsx(te,{name:n,className:"--ico",style:r?{color:r}:{}})}),jsx(z,{className:"--lbl flex aic",style:t?{color:t}:{},children:o})]})},dn=Ui;var yn=({ref:e,...o})=>{let {id:t,as:n,fx:r,offsetX:s,offsetY:a,parent:i,event:p,arrow:l,when:c,items:d,header:u,footer:m,origin:y=St.TopRight,...R}=o,[x,C]=useState(false),[v,S]=useState(d||[]),{position:h,targetRef:w,calculatedAnchor:g}=useAnchorPosition(i?.current,p,{offsetX:s,offsetY:a,preferredAnchor:y}),b=g.toLowerCase(),I=b.includes("top");b.includes("bottom");let E=I?"--arrow-top":"--arrow-bottom",V=useMemo(()=>b.includes("left")?"--arrow-left":b.includes("right")?"--arrow-right":"--arrow-center",[b]),k=h.top!==0||h.left!==0;useEffect(()=>{c&&k?C(true):c||C(false);},[c,k]);let{className:D,style:$,rest:_}=O(R),N=Se({...r?.transition?{transition:r.transition??Q.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:r?.curve??oe.EaseInOut,duration:r?.duration??.05,when:x&&k});return jsxs(f,{ref:w,className:`--contextmenu ${l||i!=null?`--has-arrow ${E} ${V}`:""} abs flex cols ${D}`.trim(),"aria-hidden":!x,style:{...$,...N.style,top:h.top,left:h.left,visibility:k?"visible":"hidden",transformOrigin:g},..._,children:[typeof u=="function"?createElement(u):u,v.map((L,U)=>jsx(dn,{...L,index:U},`context-${L.label.toLowerCase()}-${U}`)),typeof m=="function"?createElement(m):m]})};yn.displayName="Zuz.ContextMenu";var Zo=yn;var xn=forwardRef((e,o)=>{let{children:t,fx:n,when:r,fxDelay:s,fxStep:a,classToIgnore:i,...p}=e,l=j(true),c=useDelayed(),d=n||l?.group?.fx,u=s||l?.group?.fxDelay,m=a||l?.group?.fxStep,y=i||l?.group?.classToIgnore||"-fx",R=useMemo(()=>d?addPropsToChildren(t,x=>{if(x.type===Fragment)return false;let C=x.props||{},v="fx"in C,S="tfx"in C,h=C.as?Array.isArray(C.as)?C.as.join(" "):C.as:C.className||"";return !(typeof h=="string"&&h.includes(y))&&(!v||S)},(x,C)=>{let v=(u??0)+x*(m??.1),S=C.props||{};return "tfx"in S?{delay:(S.delay??0)+v}:{fx:{...d,delay:v,when:r??(n?.when||c)}}}):t,[t,r,c,d,u,m,y,n]);return jsx(f,{className:"--group",ref:o,...p,children:R})});xn.displayName="Zuz.Group";var Ko=xn;var vn=forwardRef((e,o)=>{let{message:t,spinner:n,spinnerSize:r,color:s,when:a,hideMessage:i,...p}=e,{className:l,style:c,rest:d}=O(p),{spinner:u}=j(true);return "when"in e&&e.when==false?null:jsxs(Ko,{fx:{transition:Q.SlideInBottom,curve:oe.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${l}`.trim(),style:{...c,backgroundColor:"var(--cover-bg)"},...d,children:[jsx(Re,{variant:r||u?.variant||q.Small,type:n||u?.type||we.Simple}),!i&&jsx(z,{className:"--label",tfx:"fade",style:{color:"var(--cover-label)"},children:t||"loading"})]})});vn.displayName="Zuz.Cover";var Fe=vn;var to=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(to||{}),oo=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(oo||{}),Sn=(t=>(t.Stack="stack",t.Individual="individual",t))(Sn||{}),wn={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var cl=()=>{let e=useContext(Ie);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let o=(l,c)=>e.add({type:"toast",props:{...c,type:l}});return {show:(l,c,d,u)=>o("default",{title:l,message:c,icon:d,duration:u}),hide:l=>e.remove(l),success:(l,c,d,u)=>o("success",{title:l,message:c,icon:d,duration:u}),error:(l,c,d,u)=>o("error",{title:l,message:c,icon:d,duration:u}),warn:(l,c,d,u)=>o("warn",{title:l,message:c,icon:d,duration:u}),promise:(l,c,d,u)=>o("promise",{title:l,message:c,icon:d,duration:u}),clearAll:()=>e.clear("toast")}},Wo=cl;var Cn=forwardRef((e,o)=>{let{when:t,...n}=e;return jsx(f,{ref:o,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:Q.FadeIn,when:t},...n})});Cn.displayName="Zuz.Overlay";var tt=Cn;var We=null,Ee=null,Pn=forwardRef((e,o)=>{let{title:t,message:n,transition:r,curve:s,speed:a,type:i,actionPosition:p,spinner:l,loadingMessage:c,onShow:d,onHide:u,...m}=e,{className:y,style:R,rest:x}=O(m),[C,v]=useState(t||""),[S,h]=useState(n||""),[w,g]=useState(null),[b,I]=useState(i||Me.Default),B=useMemo(()=>uuid(12),[]),[E,V]=useState(false),k=useRef(null),D=useRef(null),[$,_]=useState(false),[N,L]=useState(true),U=useRef(null),X=S;useImperativeHandle(o,()=>({setLoading(Z){_(Z);},showDialog(Z,G,W,re){We&&(clearTimeout(We),Ee&&clearTimeout(Ee),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),Ee=setTimeout(()=>{k.current.classList.remove("--wobble"),Ee=null;},500)),I(Me.Dialog),G&&h(G),Z&&v(Z),W&&g(W.reduce((J,ce)=>(J.push({...ce,key:ce.key||uuid(12)}),J),[])),V(true),setTimeout(()=>re?re():()=>{},1e3);},dialog(Z,G,W,re){We&&(clearTimeout(We),Ee&&clearTimeout(Ee),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),Ee=setTimeout(()=>{k.current.classList.remove("--wobble"),Ee=null;},500)),I(Me.Dialog),h(G),v(Z),W&&g(W.reduce((J,ce)=>(J.push({...ce,key:ce.key||uuid(12)}),J),[])),V(true),setTimeout(()=>re?re():()=>{},1e3);},error(Z,G){this.show(Z,G,Me.Error);},warn(Z,G){this.show(Z,G,Me.Warn);},success(Z,G){this.show(Z,G,Me.Success);},show(Z,G,W){We&&(clearTimeout(We),Ee&&clearTimeout(Ee),D.current=k.current.style.transform,k.current.style.transform="",k.current.classList.remove("--wobble"),setTimeout(()=>{k.current.classList.add("--wobble"),k.current.style.transform=`${D.current} scale(.9)`.trim();},50),Ee=setTimeout(()=>{k.current.classList.remove("--wobble"),k.current.style.transform=D.current||"",Ee=null;},500)),We=setTimeout(()=>{V(false),We=null,Ee=null;},(G||4)*1e3),I(W||Me.Default),h(Z),V(true),d?.();},hide(){V(false),u?.();}}));let F=useMemo(()=>{let Z={when:E,duration:a||.3,delay:.1};if(b==Me.Dialog){if(r){let{from:G,to:W}=wt(r,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}},[E,b]);return useEffect(()=>{U.current&&clearTimeout(U.current),E?L(true):U.current=setTimeout(()=>L(false),1e3);},[E]),b==Me.Dialog?jsxs(Fragment$1,{children:[jsx(tt,{when:E}),jsxs(f,{className:`--sheet --sheet-${b.toLowerCase()} ${E?"is-visible":""} ${y} fixed`.trim(),style:R,fx:F,...x,ref:k,children:[jsx(Fe,{when:$,spinner:l,message:c}),jsxs(f,{className:"--head flex aic rel",children:[jsx(f,{className:`--${C?"title":"dot"} flex aic rel`,children:C||""}),jsx(K,{onClick:Z=>V(false),className:"--closer abs",children:"\xD7"})]}),jsx(f,{className:`--body flex aic rel ${w?"":"--no-action"}`.trim(),children:N?X:null}),w&&jsx(f,{className:`--footer flex aic rel ${p?p==Lo.Center?"jcc":"":"jce"}`.trim(),children:w.map((Z,G)=>jsx(K,{onClick:W=>Z.handler?Z.handler():Z.onClick?Z.onClick():console.log("onClick Handler missing"),className:"--action",children:Z.label},`sheet-${B}-action-${Z.key}`))})]})]}):jsx(f,{className:`--sheet --sheet-${b.toLowerCase()} ${y} abs`.trim(),style:R,...x,fx:F,ref:k,children:E?S:null})}),Rn=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;Pn.displayName="Zuz.Sheet";var gl=Pn;var Rt=createContext(null),jo=()=>{let e=useContext(Rt);return e?useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},It=()=>useContext(Rt),En=()=>()=>{},Nn=e=>{let o=useContext(Rt);return useSyncExternalStore(o?.subscribe??En,()=>{if(!(!o||!e))return o.getSnapshot().values?.[e]},()=>{})},Bn=e=>{let o=useContext(Rt);return useSyncExternalStore(o?.subscribe??En,()=>!o||!e?null:o.getSnapshot().errors?.[e]??null,()=>null)},at=()=>{let e=It(),o=jo();return {...e,...o}},kn=({children:e,initialValues:o={}})=>{let t=useRef({values:o,errors:{},touched:{}}),n=useRef(new Set(Object.keys(o))),r=useRef(new Set),s=useCallback(()=>t.current,[]),a=useCallback(l=>(r.current.add(l),()=>r.current.delete(l)),[]),i=()=>{r.current.forEach(l=>l());};useEffect(()=>{if(!o||Object.keys(o).length===0)return;let l=new Set(Object.keys(o)),c=[...n.current].filter(C=>!l.has(C)),d={...t.current.values};c.forEach(C=>delete d[C]);let u={...d,...o},m=t.current.values||{},y=Object.entries(u),R=Object.entries(m),x=y.length!==R.length||y.some(([C,v])=>m[C]!==v);n.current=l,x&&(t.current={...t.current,values:u},i());},[o]);let p=useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(l,c)=>{t.current.values[l]!==c&&(t.current={...t.current,values:{...t.current.values,[l]:c}},i());},deleteFieldValue:l=>{if(!(l in t.current.values))return;let{[l]:c,...d}=t.current.values;t.current={...t.current,values:d},i();},setFieldError:(l,c)=>{t.current={...t.current,errors:{...t.current.errors,[l]:c}},i();},reset:()=>{t.current={values:{},errors:{},touched:{}},i();}}),[]);return jsx(Rt.Provider,{value:p,children:e})};var Il=e=>{let o={};for(let t in e){let n=t.split(/[\[\]]+/).filter(Boolean);n.reduce((r,s,a)=>{if(a===n.length-1)r[s]=e[t];else {let i=!isNaN(Number(n[a+1]));r[s]=r[s]||(i?[]:{});}return r[s]},o);}return o},Ln=({ref:e,...o})=>{let {schema:t,name:n,cover:r,spinner:s,errors:a,action:i,children:p,withData:l,beforeSubmit:c,onSubmit:d,onError:u,onSuccess:m,resetOnSuccess:y,...R}=o,{className:x,style:C,rest:v}=O(R),[S,h]=useState(false),w=useRef(null),g=Wo(),b=It();jo();let B=useRef(null),E=useCallback(F=>w.current?w.current.querySelectorAll(F):[],[w.current]),V=F=>({name:F.name||F.getAttribute("name")||F.getAttribute("data-name"),required:F.required?true:F.getAttribute("data-required")?F.getAttribute("data-required")=="true":false,with:F.with||F.getAttribute("with")}),k=F=>{let Z=[];return F.querySelectorAll(".--input").forEach(G=>{Z.push(G.value);}),Z.join("")},D=F=>F.classList.contains("--otp")?k(F):F.classList.contains("--select")?F.querySelector("button.--selected")?.dataset.value:F.classList.contains("--checkbox")||F.getAttribute("type")==="checkbox"?F.checked:F.value,$=useCallback(F=>{let{name:Z,required:G,with:W}=V(F),re=D(F);if(t&&t[Z]&&b?.getSnapshot()){let J=t[Z](re,b.getSnapshot().values);if(J===false||typeof J=="string")return typeof J=="string"&&b?.setFieldError(Z,J),false}if(G&&(F.type==="checkbox"&&!F.checked||F.classList.contains("--select")&&(re==="-1"||!re)||!re||re===""))return false;if(W)switch((W.includes("@")?W.split("@")[0]=="match"?Je.MatchField:W.split("@")[0]:W).toUpperCase()){case Je.IPV4:return _(re).isIPv4();case Je.IPV6:return _(re).isIPv6();case Je.Email:return _(re).isEmail();case Je.Uri:try{return new URL(re),!0}catch{return false}case Je.MatchField:let[ce,me,Ce]=W.split("@"),le=document.querySelector(`[name=${me.trim()}]`);if(!le)return false;switch(Ce||"direct-match"){case "if-not-empty":if(le&&!_(le.value).isEmpty()&&le.value!=F.value)return false;break;case "direct-match":if(le&&le.classList.contains("--otp")&&F.classList.contains("--otp")&&k(le)!=k(F))return false;if(le&&le.value!=F.value)return false;break}break}return true},[t,b]),_$1=useCallback(()=>{let F={},Z={...b?.getSnapshot().values||{}},G=null,W=null;if(E("[name]").forEach(J=>{let{name:ce,required:me,with:Ce}=V(J),le=me||Ce?$(J):true,pe=D(J);F[ce]={valid:le,value:pe},Z[ce]=pe,b?.setFieldError(ce,le?null:a?.[ce]||"Invalid"),le?J.classList.remove("--with-error"):(J.classList.add("--with-error"),G||(G=J),W=a?.[ce]);}),G){let J=G;if(J.classList.contains("--otp"))for(let ce of Array.from(J.querySelectorAll(".--input"))){let me=ce;if(me.value==""){me.focus();break}}else J.focus();}let re=Il(Z);return {error:G!=null,errorMsg:W||"Fix errors to continue...",data:F,payload:re}},[w.current,b]),N=useCallback((F={})=>{let{error:Z,errorMsg:G,payload:W,data:re}=_$1();if(Z){g.error(G);return}i?startTransition(async()=>{h(true),withPost(i,{...l,...W,...F}).then(J=>{h(false),y&&b?.reset(),m?.(J,{...l,...W,...F}),m||g.success(J.message||"Redirecting...");}).catch(J=>{h(false),u?u(J):g.error(J.message);});}):d?.(W,re);},[_$1,i,l,m,u,y,d]),L=useCallback(()=>{let F=E("[type=submit]");!F||F.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):F.forEach(Z=>{Z.addEventListener("click",N);});},[w.current]),U=useMemo(()=>addPropsToChildren(p,F=>F.props.type=="submit",F=>({ref:B})),[p]),X=useRef(N);return useImperativeHandle(e,()=>({setLoading:F=>h(F),submit:F=>X.current(F),init:L,hideError:()=>g.clearAll()}),[N,L]),useEffect(L,[]),useEffect(()=>{X.current=N;},[N]),useEffect(()=>{let F=E("[type=submit]"),Z=Array.from(F).map(G=>{let W=G;return W.addEventListener("click",N),()=>W.removeEventListener("click",N)});return ()=>Z.forEach(G=>G())},[N,E]),jsxs(f,{ref:w,style:C,className:`--form flex rel ${x}`,children:[!Rn(r)&&jsx(Fe,{when:S,spinner:s,...r}),U]})};Ln.displayName="Zuz.FormInternal";var Mn=e=>jsx(kn,{initialValues:e.withData,children:jsx(Ln,{...e})});Mn.displayName="Zuz.Form";var tr=Mn;var or=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(o){return this.stack[this.stack.length-1]===o}push(o){this.stack.includes(o)||(this.stack.push(o),this.updateScrollLock());}pop(o){this.stack=this.stack.filter(t=>t!==o),this.updateScrollLock();}handleEscape(){let o=this.stack[this.stack.length-1];return o?(o(),true):false}get count(){return this.stack.length}},Ve=new or;var Nl=({action:e,render:o=true,message:t=""})=>jsx(f,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:o?t:null}),On=Nl;var Dn=({cols:e,gap:o,ais:t,aic:n,aie:r,jcs:s,jcc:a,jce:i,className:p="",style:l,...c})=>{let d=["--flex",e?"--cols":"",t?"--ais":"",n?"--aic":"",r?"--aie":"",s?"--jcs":"",a?"--jcc":"",i?"--jce":"",p].filter(Boolean).join(" "),u={...l,gap:typeof o=="number"?`${o}px`:o};return jsx(f,{...c,className:d,style:u})};Dn.displayName="Zuz.FlexBox";var de=Dn;var Ll=({useForm:e,action:o,actionPosition:t,dialogID:n,variant:r})=>jsx(de,{aic:true,as:`--footer rel ${t?t==qr.Center?"--jcc":"":"--jce"}`.trim(),children:o.map((s,a)=>jsx(K,{variant:r,kind:s.kind,type:s.type||"button",onClick:()=>{if(!(e===true&&s.type==="submit")){if(s.handler)return s.handler();if(s.onClick)return s.onClick();console.log("onClick Handler missing");}},as:"--action",children:s.label},`dialog-${n}-action-${s.key||a}`))}),Hn=Ll;var Ml={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"})," "]}),[Le.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"})}),[Le.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"})}),[Le.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"})}),[Le.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"})]})},A=Ml;var Ol=({title:e="Alert",description:o,titlePosition:t="center",onClose:n})=>jsxs(de,{as:"--head rel",children:[jsxs(de,{cols:true,as:[`--${e?"title":"dot"} rel`,`--position-${t}`],children:[jsx(z,{children:e}),o&&jsx(z,{as:"--description",children:o})]}),jsx(K,{onClick:r=>n(),className:`--closer abs ${t=="center"?"center-v":""}`,children:A.close})]}),$n=Ol;var _n=({ref:e,...o})=>{let{index:t,id:n,title:r,description:s,titleAlignment:a,message:i,content:p,transition:l,curve:c,speed:d,type:u,width:m,action:y,actionPosition:R,spinner:x,loadingMessage:C,variant:v,inBackground:S,forceClose:h,forceLoading:w,useForm:g,formProps:b,onConfirm:I,onCancel:B,onClose:E,onShow:V,onHide:k,...D}=o,$=useMemo(()=>uuid(12),[]),[_,N]=useState(r||""),[L,U]=useState(s||""),[X,F]=useState(p||i||""),[Z,G]=useState(u||et.Dialog),[W,re]=useState(false),[J,ce]=useState(true),[me,Ce]=useState(()=>y?y.map(De=>({...De,key:De.key||uuid(12)})):null),[le,pe]=useState(false),{variant:Y,spinner:se,dialog:ne}=j(true),he=v||ne?.variant||Y||q.Small,{style:Ae,className:Te,rest:ye}=O(D),Oe=useRef(null),ae=Se({when:W,duration:d||ne?.speed||.3,delay:ne?.delay||.1,transition:l||ne?.transition||Q.SlideInBottom,curve:c||ne?.curve||oe.EaseInOut,watch:["scale","filter","transform"]}),be=()=>{re(false),E(n);},Wt=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ve.isTop(be)&&be();}}],[W]);useShortcuts(Wt),useEffect(()=>{G(et.Dialog),F(p||i),N(_),U(L),re(true),setTimeout(()=>V?V():()=>{},500);},[]),useEffect(()=>{h&&be();},[h]),useEffect(()=>{w!=null&&pe(w);},[w]),useEffect(()=>(W?Ve.push(be):Ve.pop(be),()=>Ve.pop(be)),[W]);let Gt=useMemo(()=>1e4+t*10,[t]),$e=jsxs(f,{as:`--dialog --${(u??et.Default).toLowerCase()} ${W?"--visible":""} ${Te} fixed abc`.trim(),style:{...ae.style,zIndex:Gt+1,pointerEvents:S==true?"none":"auto",width:m||"auto",...S==true?{scale:"0.92",filter:"blur(2px)"}:{}},...ye,ref:Oe,children:[jsx($n,{title:_,description:s,titlePosition:a||ne?.titleAlignment||"center",onClose:be}),jsx(On,{message:X,render:J,action:me}),me&&me.length>0&&jsx(Hn,{variant:he,action:me,dialogID:$,useForm:g,actionPosition:R}),jsx(Fe,{when:le,spinner:x||ne?.spinner||se?.type||we.Simple,message:C||ne?.loadingMessage})]});return jsxs(Fragment$1,{children:[jsx(tt,{style:{zIndex:Gt},when:W}),g?jsx(tr,{onSubmit:((De,No)=>{I?.(De,No);}),...b,children:$e}):$e]})};_n.displayName="Zuz.Dialog";var sr=_n;var Zn=forwardRef((e,o)=>{let{speed:t,smooth:n=false,breakpoints:r={},style:s,...a}=e,{rootRef:i,containerRef:p,thumbY:l,thumbX:c,onScrollY:d,onScrollX:u}=useScrollbar(t||1,r,n),{style:m,className:y,rest:R}=O(a);return useEffect(()=>{let x=p.current;if(!x)return;let C=()=>{window.dispatchEvent(new Event("resize"));},v=S=>{let h=S.target;if(h.closest(".--allow-scroll")){let g=h.closest(".--allow-scroll"),{scrollTop:b,scrollHeight:I,clientHeight:B}=g,E=S.deltaY<0,V=S.deltaY>0;(E&&b>0||V&&b+B<I)&&S.stopPropagation();}};return x.addEventListener("scroll",C),x.addEventListener("wheel",v,{passive:true}),()=>{x.removeEventListener("scroll",C),x.removeEventListener("wheel",v);}},[p]),jsxs(f,{ref:i,className:y.trim(),as:"--scrollview rel",children:[jsx(f,{as:`--scroll-content ${y}`.trim(),ref:p,style:s||{},children:R.children}),jsx(f,{as:"--scroll-track --track-y --abs",children:jsx(f,{as:"--scroll-thumb --abs --round",ref:l,onMouseDown:d})}),jsx(f,{as:"--scroll-track --track-x --abs",children:jsx(f,{as:"--scroll-thumb --abs --round",ref:c,onMouseDown:u})})]})});Zn.displayName="Zuz.ScrollView";var Bt=Zn;var Kn=({ref:e,...o})=>{let{id:t,index:n,from:r,speed:s,children:a,margin:i,animation:p,prerender:l,inBackground:c,forceClose:d,forceLoading:u,closeBtn:m,onClose:y,...R}=o,{drawer:x}=j(true),[C,v]=useState(a),[S,h]=useState(false),[w,g]=useState(l??(x?.prerender||true)),[b,I]=useState(false),B=()=>{h(false),y?.(t??-1);},{className:E,style:V,rest:k}=O(R),D=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ve.isTop(B)&&B();}}],[S]);useShortcuts(D),useEffect(()=>{v(a);},[a]),useEffect(()=>(S?Ve.push(B):Ve.pop(B),()=>Ve.pop(B)),[S]),useEffect(()=>{h(true);},[]),useEffect(()=>{d&&B();},[d]),useEffect(()=>{u!=null&&I(u);},[u]);let $=r||x?.from||Pe.Left,_=useMemo(()=>{switch($){case Pe.Left:return {from:{x:"-100vw"},to:{x:0}};case Pe.Right:return {from:{x:"100vw"},to:{x:0}};case Pe.Top:return {from:{y:"-100vh"},to:{y:0}};case Pe.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[r,x?.from]),N=Se({from:{..._.from,opacity:0},to:{..._.to,opacity:1},when:S,curve:p||x?.animation||oe.EaseInOut,duration:s||x?.speed||.5,watch:["scale","filter"]}),L=useMemo(()=>1e4+(n||1)*10,[n]);return jsxs(Fragment$1,{children:[jsx(tt,{onClick:U=>{S&&B();},when:S,style:{zIndex:L}}),jsxs(f,{ref:e,"aria-hidden":!S,className:`--drawer flex cols ${E} --${$.toLowerCase()} fixed`,style:{...V,...N.style,"--m":`${i||x?.margin||0}px`,zIndex:L+1,pointerEvents:c==true?"none":"auto",...c==true?{scale:"0.92",filter:"blur(2px)"}:{}},...k,children:[r==Pe.Top||r==Pe.Bottom?jsx(f,{className:"--handle"}):null,m&&jsx(K,{as:`--close-drawer --close-${m} --abs --round`,onClick:B,children:A.close}),jsxs(Bt,{as:"rel",children:[w||S?C:null,jsx(Fe,{when:b})]})]})]})};Kn.displayName="Zuz.Drawer";var lr=Kn;var Gn=forwardRef((e,o)=>{let{progress:t,type:n,animated:r,...s}=e,a=useRef(null);useImperativeHandle(o,()=>({setProgress:c=>{a.current.style.width=`${c*100}%`,a.current.setAttribute("data-value",c+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),useEffect(()=>{t&&a.current&&(r?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:i,style:p,rest:l}=O(s);return jsx(f,{className:`--progress ${r?"--animated":""} flex rel ${i}`.trim(),style:p,...l,children:jsx(f,{ref:a,className:"--bar rel"})})});Gn.displayName="Zuz.ProgressBar";var Lt=Gn;var Yl=e=>{let{index:o,id:t,type:n,icon:r,busy:s,width:a,title:i,message:p,duration:l,sticky:c=false,actions:d=[],position:u,style:m,isHovered:y,total:R,progress:x,progressValue:C,forceClose:v,variant:S,onClick:h,onClose:w}=e,[g,b]=useState(false),[I,B]=useState(false),{toast:E}=j(true),V=typeof C=="number",k=V?Math.max(0,Math.min(1,C)):void 0,D=I||v,$=u??E?.position??"TopCenter",_=n??E?.type??"default",N=m??E?.style??"stack",L=l??E?.duration??4,U=x??E?.progress??false,X=useRef(L*1e3),F=useRef(void 0),Z=useRef(void 0),G=useRef(null),W=Se({when:g&&!D,duration:.3,transition:E?.transition||($.includes("Top")?Q.SlideInTop:$.includes("Bottom")?Q.SlideInBottom:$.includes("Left")?Q.SlideInLeft:Q.SlideInRight),curve:E?.curve||oe.EaseInOut,watch:["transform","opacity","scale","filter"]});useEffect(()=>{b(true);let Y=se=>{if(Z.current!==void 0){let ne=se-Z.current;if(!V&&!y&&!c&&!D&&(X.current-=ne,G.current)){let he=Math.max(0,X.current/(L*1e3)*100);G.current?.setProgress?.(he/100);}}Z.current=se,X.current<=0?B(true):F.current=requestAnimationFrame(Y);};return F.current=requestAnimationFrame(Y),()=>{F.current&&cancelAnimationFrame(F.current);}},[y,c,D,L]),useEffect(()=>{if(D){let Y=setTimeout(()=>{w?.(t);},350);return ()=>clearTimeout(Y)}},[D,t]);let re=N==="stack",J=y?o*65:o*8,ce=y?1:Math.max(.85,1-o*.05),me=y?1:Math.max(.4,1-o*.2),Ce=Y=>{h?h(Y):s!==true&&(!d||d.length===0)&&B(true);},le=W.style.transform||"translate(0, 0)",pe=D?le:`${le} translateY(${$.includes("Top")?J:-J}px) scale(${ce})`;return jsxs(f,{onClick:Ce,as:`--snack --${D?"hidden":"visible"} --${S||E?.variant||q.Medium} --${_} --${$.toLowerCase()} abs flex aic`,style:{...W.style,zIndex:1e3-o,pointerEvents:D?"none":"auto",opacity:D?W.style.opacity:me,transform:pe,filter:!D&&re&&!y&&o>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(f,{as:"--ico flex aic jcc rel",children:[r?jsx(te,{name:r}):jsx(f,{as:"--no-icon"}),s===true&&jsx(Re,{as:"abs abc"})]}),jsxs(f,{as:"--meta flex cols",style:a?{width:a,minWidth:a,maxWidth:a}:void 0,children:[jsx(z,{as:"--tt",children:i||wn[n]}),jsx(z,{as:"--tm",children:p})]}),d&&d.length>0&&jsx(f,{as:"--actions flex gap:5",children:d.map((Y,se)=>jsx(K,{as:"--snack-btn bold",variant:q.XSmall,onClick:ne=>{ne.stopPropagation(),Y.onClick(ne);},children:Y.label},se))}),(U||V)&&jsx(Lt,{as:"abs",progress:k,ref:G})]})},mr=Yl;var Ie=createContext(null),oc=({ref:e,...o})=>{let n=useContext(Ie)?.depth??0,[r,s]=useState(null),[a,i]=useState(null),[p,l]=useState(false),[c,d]=useState([]),u=useDelayed(),m=useRef(0),y=()=>++m.current,R=()=>{l(false),setTimeout(()=>i(null),200);};useImperativeHandle(e,()=>({add(h){let w=y(),g={id:w,...h};return d(b=>[...b,g]),w},openMenu(h){l(false),setTimeout(()=>{i({id:y(),type:"menu",props:h}),l(true);},16);},update(h,w){d(g=>g.map(b=>b.id!==h?b:{...b,props:{...b.props,...w}}));},remove(h){d(w=>w.map(g=>g.id===h?{...g,props:{...g.props,forceClose:true}}:g)),a?.id===h&&R();},loading(h,w){d(g=>g.map(b=>b.id===h?{...b,props:{...b.props,forceLoading:w}}:b)),a?.id===h&&R();},clear(h){d(c.filter(w=>w.type!=h));}})),useEffect(()=>{if(a&&p){let h=()=>R();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[a,p,R]);let x=h=>{setTimeout(()=>{d(w=>w.filter(g=>g.id!==h)),a?.id===h&&i(null);},250);},C=useMemo(()=>[...c.filter(h=>h.type!="toast")],[c]);if(!u)return null;let v=c.filter(h=>h.type=="toast").reverse(),S=Object.values(oo);return createPortal(jsxs(f,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[C.map((h,w)=>{let g=w<C.length-1;return h.type==="dialog"?jsx(sr,{onClose:x,index:w,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsx(lr,{onClose:x,index:w,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):null}),S.map(h=>{let w=v.filter(g=>(g.props.position||"TopCenter")===h);return w.length===0?null:jsx(f,{onMouseEnter:()=>s(h),onMouseLeave:()=>s(null),as:`--toast-container fixed --${h.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:w.map((g,b)=>jsx(mr,{index:b,total:w.length,isHovered:r===h,onClose:x,id:g.id,...g.props},g.id))},h)}),a&&jsx(f,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsx(Zo,{onClose:R,when:p,...a.props},`menu-${a.id}`)})]}),document.body)},rc=({children:e})=>{let o=useContext(Ie),t=o?o.depth+1:0,n=useRef(null),r=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:!!o}),[o]);return jsxs(Ie.Provider,{value:r,children:[e,jsx(oc,{ref:n})]})},zo=rc;var sc=()=>{let e=useContext(Ie);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(n,r,s)=>{n.preventDefault(),e.openMenu({event:n,items:r,origin:s});},showMenu:(n,{items:r,origin:s,offsetX:a,offsetY:i,transition:p,curve:l,arrow:c,duration:d,header:u,footer:m})=>{e.openMenu({fx:{transition:p,curve:l,duration:d},parent:n,items:r,origin:s||St.TopCenter,offsetX:a,offsetY:i,arrow:c,header:u,footer:m});},hide:e.clear}},ac=sc;var lc=()=>{let e=useContext(Ie);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let o=()=>e.clear("dialog"),t=a=>e.remove(a),n=(a,i)=>e.loading(a,i);return {clearAll:o,show:a=>{let i=e.add({type:"dialog",props:{...a,type:et.Dialog}});return {id:i,setLoading:p=>n(i,p),hide:()=>t(i)}},confirm:a=>{let{confirmLabel:i,...p}=a,l=e.add({type:"dialog",props:{...p,type:et.Confirm,action:a.action??[{label:a.cancelLabel??"Cancel",kind:"ghost",onClick:()=>{a.onCancel?.(),t(l);}},{label:a.confirmLabel??"Confirm",kind:"solid",type:"submit",onClick:c=>{a.onConfirm?.(c);}}]}});return {id:l,setLoading:c=>n(l,c),hide:()=>t(l)}},hide:t}},cc=lc;var pc=()=>{let e=useContext(Ie);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let o=()=>e.clear("drawer"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a),r=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:i=>n(a,i),close:()=>t(a)}};return {clearAll:o,open:s=>r({children:s}),right:s=>r({children:s,from:Pe.Right}),left:s=>r({children:s,from:Pe.Left}),top:s=>r({children:s,from:Pe.Top}),bottom:s=>r({children:s,from:Pe.Bottom}),close:t}},uc=pc;var dc=(e,o,t={})=>{let[n,r]=useState(null),[s,a]=useState(false),{duration:i=.25,curve:p=oe.EaseOutBack,borderRadius:l={from:40,to:24},targetWidth:c=320}=t;return useLayoutEffect(()=>{o&&e.current?(r(e.current.getBoundingClientRect()),a(true)):o||a(false);},[o,e]),{style:Se({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:l.from},to:{opacity:1,width:c,height:"auto",borderRadius:l.to},curve:p,duration:i,when:s&&o}).style,isMeasured:s,sourceRect:n}},gc=dc;var bc=(e,o={})=>{let{offset:t=8,direction:n="bottom",container:r=null,triggerRef:s=null}=o,a=useRef(null),i=useCallback(()=>{let p=e.current;if(!p)return;let l=s?.current||p.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=p.getBoundingClientRect(),d=l.getBoundingClientRect(),u,m;r?(u=r.getBoundingClientRect(),m="absolute"):(window.getComputedStyle(p).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}),p.style.position!==m&&(p.style.position=m),a.current=m;let x=0,C=0;switch(n){case "top":x=d.top-c.height-t,C=d.left,x<u.top&&d.bottom+c.height+t<=u.bottom&&(x=d.bottom+t);break;case "bottom":x=d.bottom+t,C=d.left,x+c.height>u.bottom&&d.top-c.height-t>=u.top&&(x=d.top-c.height-t);break;case "left":x=d.top,C=d.left-c.width-t,C<u.left&&d.right+c.width+t<=u.right&&(C=d.right+t);break;case "right":x=d.top,C=d.right+t,C+c.width>u.right&&d.left-c.width-t>=u.left&&(C=d.left-c.width-t);break}if(x=Math.max(u.top,Math.min(x,u.bottom-c.height)),C=Math.max(u.left,Math.min(C,u.right-c.width)),a.current==="fixed")p.style.top=`${x}px`,p.style.left=`${C}px`;else {let v;p.offsetParent?v=p.offsetParent.getBoundingClientRect():v={top:0,left:0};let S=x-v.top+window.scrollY,h=C-v.left+window.scrollX;p.style.top=`${S}px`,p.style.left=`${h}px`;}},[e,s,t,n,r]);return useEffect(()=>{let p=e.current;if(!p)return;let l=s?.current||p.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=new ResizeObserver(i);return c.observe(p),l&&c.observe(l),i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,true),()=>{c.disconnect(),l&&c.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,true);}},[e,n,t,r,s]),{postion:a.current,reposition:i}},Mt=bc;var Sc=()=>{let e=useContext(Ie);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let o=(m,y)=>e.add({type:"toast",props:{...y,type:m}}),t=()=>e.clear("toast"),n=m=>e.remove(m),r=(m,y)=>e.update(m,y),s=m=>({id:m,update:y=>r(m,y),setType:y=>r(m,{type:y}),setProgress:y=>r(m,{progress:true,progressValue:y}),setBusy:y=>r(m,{busy:y}),success:()=>r(m,{type:"success"}),error:()=>r(m,{type:"error"}),warn:()=>r(m,{type:"warn"}),promise:()=>r(m,{type:"promise"}),default:()=>r(m,{type:"default"}),hide:()=>n(m)}),a=m=>s(o("default",m)),i=m=>s(o("success",m)),p=m=>s(o("error",m)),l=m=>s(o("warn",m)),c=m=>s(o("promise",m)),d=(m,y,R)=>{let x=o(m,{...y,sticky:y.sticky??false,actions:[{label:R?.label||"Ok",onClick:C=>{R?.onClick?.(C),n(x);}}]});return s(x)},u=(m,y,R,x)=>{let C=o(m,{...y,sticky:true,actions:[{label:R?.label||"Ok",onClick:v=>{R?.onClick?.(v),(R?.hide??false)===true&&n(C);}},{label:x?.label||"Cancel",onClick:v=>{x?.onClick?.(v),(x?.hide??true)===true&&n(C);}}]});return s(C)};return {show:a,hide:n,promise:c,clearAll:t,ok:(m,y)=>d("default",m,y),success:(m,y)=>y?d("success",m,y):i(m),error:(m,y)=>y?d("error",m,y):p(m),confirm:(m,y,R)=>u("default",m,y,R),warn:(m,y)=>y?d("warn",m,y):l(m),succes:(m,y)=>y?d("success",m,y):i(m)}},wc=Sc;var es=({ref:e,style:o,...t})=>{let n=useRef(null),r=useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:i}=O(t,r);return jsx("div",{ref:e||n,style:{...s,...o||{}},className:a,...i})};es.displayName="Zuz.Box";var f=es;var os=forwardRef((e,o)=>{let{title:t,message:n,...r}=e,[s,a]=useState(false);return jsxs(f,{className:"--accordion flex cols",...r,children:[jsxs(K,{onClick:i=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsx(z,{className:"--label flex",children:t}),jsx(f,{className:"--arrow flex",children:s?A.arrowUp:A.arrowDown})]}),s&&jsx(f,{className:"--detail",children:n})]})});os.displayName="Zuz.Accordion";var Ec=os;var Nc=({label:e,icon:o,onClick:t,idx:n,selected:r})=>jsx(K,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${r?"--selected":""} aic jcc rel`.trim(),children:typeof o=="string"?jsx(te,{name:o}):o}),ns=Nc;var ss=forwardRef((e,o)=>{let{items:t,name:n,selected:r,position:s,...a}=e,i=useRef(null),[p,l]=useState(r||t[0].tag||0),c=useCallback(({x,y:C})=>{if(i.current){let v=i.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-v.left}`),document.documentElement.style.setProperty("--tip-y",`${C-v.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),d=useCallback(()=>{i.current&&(i.current.removeEventListener("pointerleave",d),i.current.removeEventListener("pointermove",c),document.documentElement.style.setProperty("--tip-s","0"));},[]),u=useCallback(()=>{i.current&&(i.current.addEventListener("pointerleave",d),i.current.addEventListener("pointermove",c));},[]);useEffect(()=>{i.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,C)=>C.label.length>x.length?C.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),i.current?.addEventListener("pointerenter",u));},[]);let{className:m,style:y,rest:R}=O(a);return jsxs(f,{ref:i,style:y,className:[`--actionbar flex aic ${m}`,`${!s||s==ve.Auto?"rel":`--${s}`}`].join(" ").trim(),...R,children:[t.map((x,C)=>jsx(ns,{selected:p===x.tag||r==C,...x,idx:C},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsx(f,{className:"--tip abs",children:jsx(f,{className:"--track flex aic",children:t.map(({label:x})=>jsx(f,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});ss.displayName="Zuz.ActionBar";var Oc=ss;var is=forwardRef((e,o)=>{let{type:t,icon:n,title:r,message:s,iconSize:a,...i}=e,{className:p,style:l,rest:c}=O(i);return jsxs(f,{className:`--alert --${t||Le.Info} flex aic ${p}`.trim(),style:l,...c,children:[jsx(f,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&A[t||Le.Info]}),jsxs(f,{className:"--meta flex cols",children:[jsx(z,{className:`--title ${s?"--tm":""}`,children:r||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsx(z,{className:"--message",h:2,children:s})]})]})});is.displayName="Zuz.Alert";var Hc=is;var cs=({ref:e,...o})=>{let{variant:t,numeric:n,name:r,onConfirm:s,...a}=o,{style:i,className:p,rest:l}=O(a),{variant:c}=j(true),d=useRef(null),u=at(),m=r?u.errors?.[r]:null,y=r&&u.values&&u.setFieldValue,R=y?u.values?.[r]:void 0,x=useDebounce(v=>{y&&u.setFieldValue?.(r,v);},500),C=v=>{let S=v.currentTarget.value;n&&(S=S.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),v.currentTarget.value=S),x(S),o.onInput?.(v);};return useEffect(()=>{d.current&&r&&R!==void 0&&d.current.value!==String(R)&&(d.current.value=String(R));},[R,r]),useEffect(()=>()=>{y&&u.deleteFieldValue?.(r);},[]),jsx("input",{name:r,className:`--input --${t||c} ${m?"--has-error":""} --flex ${p}`.trim(),style:i,defaultValue:R??o.defaultValue??"",onInput:C,onKeyDown:v=>{v.key=="Enter"&&s?.(v.currentTarget.value);},ref:v=>{d.current=v,typeof e=="function"?e(v):e&&(e.current=v);},...l})};cs.displayName="Zuz.Input";var fe=cs;var ps=e=>{let{meta:o,children:t}=e,n=useDelayed(),{label:r,icon:s,...a}=isValidElement(o)?{}:o,{className:i,style:p,rest:l}=O({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return isValidElement(o)?jsx("li",{style:p,className:i,children:o}):jsxs("li",{style:p,className:i,...l,children:[t,typeof o=="string"?o:r]})};ps.displayName="Zuz.ListItem";var us=ps;var gs=forwardRef((e,o)=>{let{items:t,variant:n,direction:r,seperator:s,ol:a,virtual:i,...p}=e,l=useRef(null),c=useRef(null),{className:d,style:u,rest:m}=O(p),y=a==true?"ol":"ul",{visibleRange:R,scrollTop:x}=useMemo(()=>{if(!i||typeof window>"u")return {visibleRange:{start:0,end:t.length},scrollTop:0};i.itemHeight??50;i.overscan??5;i.height??400;return {visibleRange:{start:0,end:t.length},scrollTop:0}},[t.length,i]),C=useCallback(()=>{let{start:v,end:S}=R;return t.slice(v,S).map((w,g)=>{let b=v+g,I=t,B=`${typeof w=="string"?`li-${String(w)}`:isValidElement(w)?`li-${w.key}`||`${b}-${MD5(w.toString())}`:w.label}-${b}`;return jsxs(Fragment,{children:[jsx(us,{meta:w}),s&&I[b+1]?jsx("li",{className:"--list-seperator",children:s},`spt-${b+1}-${B}`):null]},B)})},[R,t,s]);return useEffect(()=>{let v=l.current;if(!v)return;let S=()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{},100);};return v.addEventListener("scroll",S,{passive:true}),()=>{v.removeEventListener("scroll",S),c.current&&clearTimeout(c.current);}},[]),createElement(y,{className:`--list --${n||q.Small} flex ${r??"cols"} ${d}`.trim(),style:u,ref:v=>{l.current=v,typeof o=="function"?o(v):o&&(o.current=v);},...m,children:C()})});gs.displayName="Zuz.List";var _e=gs;var ys=forwardRef((e,o)=>{let{fx:t,action:n,data:r,withStyle:s,onChange:a,...i}=e,{className:p}=O({as:s||""}),{style:l}=O(i),[c,d]=useState(false),[u,m]=useState(r||[]),y=useRef(null),R=useRef(null),x=useRef(null),C=useMemo(()=>i.name||uuid(12),[]),[v,S]=useState(null),[h,w]=useState(null),[g,b]=useState([]),B=useDebounce(N=>{N.target.value==""?(d(false),m([])):n&&N.target.value.trim()!=""&&withPost(n,{query:N.target.value}).then(L=>{"items"in L&&_(L.items).isArray()?(m(L.items),w(N.target.value),b(L.items)):console.error("Action Response should contain items array"),S(null);}).catch(L=>{S(null),m([]);});},250),E=()=>{if(R.current){let N=R.current.getBoundingClientRect(),L=window.innerHeight-N.bottom,U=N.top;if(x.current){let X=x.current;L<X.offsetHeight&&U>L?(X.style.top="auto",X.style.bottom=`${N.height}px`,X.style.maxHeight=`${U-150}px`):(X.style.top=`${N.height+5}px`,X.style.bottom="auto",X.style.maxHeight=`${L-150}px`);}}},V=N=>{if(u.length>0){if((N.key==="ArrowDown"||N.key==="ArrowUp")&&(N.preventDefault(),N.stopPropagation()),N.key==="Escape")S(null),d(false),m([]);else if(N.key==="ArrowDown")S(L=>{let U=L===null||L===u.length-1?0:L+1;return D(U),U});else if(N.key==="ArrowUp")S(L=>{let U=L===null||L===0?u.length-1:L-1;return D(U),U});else if(N.key==="Enter"&&v!==null){let L=u[v];y.current&&(y.current.value=L,d(false),m([]));}}},k=N=>{y.current&&(y.current.value=N,d(false),m([]));},D=N=>{let L=u[N];if(L&&y.current&&(y.current.value=L,y.current.setSelectionRange(L.length,L.length)),x.current){let X=x.current.children[N];X&&X.scrollIntoView({block:"nearest"});}},$=N=>{R.current&&!R.current.contains(N.target)&&(d(false),m([]));},_$1=()=>{y.current&&y.current.value===h&&(m(g),S(null),E());};return useEffect(()=>(window.addEventListener("resize",E),window.addEventListener("scroll",E,true),document.addEventListener("mousedown",$),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true),document.removeEventListener("mousedown",$);}),[]),useEffect(()=>{E();},[u]),jsxs(f,{style:l,ref:R,className:`--autocomplete --${e.size||q.Small} flex aic rel ${p}`.trim(),children:[jsx(fe,{ref:y,autoComplete:"off",onChange:B,onKeyDown:V,onFocus:_$1,...i}),jsx(f,{className:"--arrow rel flex aic jcc",children:u.length>0?A.arrowUp:A.arrowDown}),u.length>0&&jsx(_e,{id:C,ref:x,className:"--suggestion-list flex cols abs",items:u.map((N,L)=>({label:N,onClick:U=>{U.preventDefault(),U.stopPropagation(),k(N);},className:v===L?"--current":"",animate:{transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:clamp(.02*L,.02,.5)}}))})]})});ys.displayName="Zuz.AutoComplete";var am=ys;var xs=forwardRef((e,o)=>{let t=useRef(null),n=useMemo(()=>o&&typeof o!="function"&&o.current?o:t,[o]),{style:r,className:s,rest:a}=O(e,n);return !a.src||a.src==""?null:jsx("img",{ref:n,style:r,className:`${s} flex`,...a})});xs.displayName="Zuz.Image";var Dt=xs;var bs=forwardRef((e,o)=>{let{src:t,variant:n,type:r,crossOrigin:s,referrerPolicy:a,fx:i,as:p,alt:l,color:c,style:d,...u}=e,[m,y,R]=useImage(t??"",s,a),{className:x,style:C,rest:v}=O({fx:i,as:p});return jsx(f,{className:`--avatar --${n||q.Small} --${(r||Ur.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:c||"var(--avatar-bg, var(--primary))",...d,...C},...v,children:t?jsx(Dt,{src:m,crossOrigin:s,referrerPolicy:a,...u}):jsx(z,{className:"--avatar-label",children:(l?l.charAt(0):"A").toUpperCase()})})});bs.displayName="Zuz.Avatar";var yr=bs;var dm=({size:e=5,type:o="dead",label:t="",variant:n=q.Small,loading:r=false,spinner:s,...a})=>{let{style:i,className:p,rest:l}=O(a);return jsxs(f,{style:{..._(t).isEmpty()?{"--badge-size":e}:{},...i},as:`--badge --${n} --${o} rel flex aic jcc ${p}`.trim(),children:[jsx(f,{fx:{transition:Q.FadeIn,curve:oe.Liquid,duration:.5,when:r},as:"abs abc",children:jsx(Re,{type:s})}),_(t).isEmpty()?jsx(f,{as:`--dot --${o}`}):jsx(z,{as:"--label",children:t})]})},gm=dm;var Nm=[{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,o=e.getDay();return addDays(e,(6-o)%7||6)},getDateFormat:()=>{let e=new Date,o=e.getDay();return format(addDays(e,(6-o)%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)}],Bm=e=>{let o=new Set;return e.filter(t=>{if(t.label=="Later")return true;let n=t.getDate().toISOString().split("T")[0];return o.has(n)?false:(o.add(n),true)})},Ss=forwardRef((e,o)=>{let{defaultValue:t,variant:n,onChange:r,...s}=e,{style:a,className:i,rest:p}=O(s),[l,c]=useState(t||new Date),d=startOfMonth(l),u=endOfMonth(l),m=startOfWeek(d),y=endOfWeek(u),R=useMemo(()=>eachDayOfInterval({start:m,end:y}),[m,y]),x=S=>{r?.(S),c(S);},C=()=>{c(S=>new Date(S.getFullYear(),S.getMonth()-1));},v=()=>{c(S=>new Date(S.getFullYear(),S.getMonth()+1));};return jsxs(f,{as:`--calendar flex --${n||"sm"} ${i}`,style:a,children:[jsx(f,{as:"--calendar-quick-select flex cols flex:1",children:Bm(Nm).map(S=>{let h=S.getDate();return jsxs(K,{onClick:()=>x(h),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(z,{as:"flex:1",children:S.label}),jsx(z,{as:"tar",children:S.getDateFormat()})]},`--dtp-option-label-${S.label}`)})}),jsxs(f,{as:"--calendar-selector flex cols flex:1",children:[jsxs(f,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(z,{as:"flex:1 --calendar-cm bold",children:format(l,"MMMM yyyy")}),jsx(K,{onClick:C,as:"--calendar-chevron",children:A.chevronUpOutline}),jsx(K,{onClick:v,as:"--calendar-chevron",children:A.chevronDownOutline})]}),jsxs(f,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(S=>jsx(z,{as:"--calendar-day",children:S},`--calendar-hd-${S}`)),R.map((S,h)=>{let w=isSameMonth(S,l),g=isSameDay(S,l),b=isToday(S);return jsx(K,{disabled:!w,onClick:()=>x(S),as:["--calendar-day --calendar-dd",`${g?"--calendar-dd-selected":""}`,`${b?"--calendar-dd-current":""}`],children:format(S,"d")},`--calendar-day-${h}-${S.getFullYear()}-${S.getMonth()}-${S.getDay()}`)})]})]})]})});Ss.displayName="Zuz.Calendar";var xr=Ss;var fo=(t=>(t.Table="table",t.Gooey="gooey",t))(fo||{});var Ps=({ref:e,...o})=>{let{itemCount:t,itemsPerPage:n,startPage:r,pageRange:s,paginationStyle:a,breakLabel:i,prevLabel:p,nextLabel:l,hash:c,loading:d,seperator:u,renderOnZeroPageCount:m,asDots:y,progressBar:R,onPageChange:x,...C}=o,v=useRef(null),S=useMemo(()=>toHash(numberInRange(4,8)),[]),h=useCallback(N=>`${toHash(N,c||6,S)}${u||""}${S}`,[S]),w=useMemo(()=>i||"...",[i]),g=useRef(null),[b,I]=useState({id:c?r?typeof r=="number"?h(r):r:1:r||1,label:r||1});useImperativeHandle(e,()=>({setPage:N=>I(N),getPage:N=>b,setProgress:N=>g.current?.setProgress?.(N),getProgress:()=>g.current?.getProgress?.()??0}),[g.current]);let{style:B,className:E,rest:V}=O(C),k=useCallback(N=>typeof N=="number"?N:+N.label,[]);if(!t)throw new Error('"itemCount" prop is required');let D=useMemo(()=>Math.ceil(t/n),[t,n]),$=useMemo(()=>{let N=[],L=Math.max(k(b)-(s||2),1),U=Math.min(k(b)+(s||2),D);L>1&&N.push({id:c?h(1):1,label:1}),L>2&&N.push({id:-1,label:w});for(let X=L;X<=U;X++)N.push({id:c?h(X):X,label:X});return U<D-1&&N.push({id:-1,label:w}),U<D&&N.push({id:c?h(D):D,label:D}),N},[b]),_=useCallback(N=>{let L=N;+L.label<1||+L.label>D||(I(L),x?.(L));},[t,n,b]);return $.length<=1&&(m??false)===false?null:jsxs(f,{ref:v,as:`--pagination ${y===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${E}`,children:[jsx(f,{as:"flex flex:1 aic --pgt-btns",children:($.length>1?$:[{id:1,label:1},{id:-1,label:w}]).map((N,L,U)=>{let X=(typeof N=="string"?N:N.label)==k(b);return jsx(K,{disabled:N.id==-1||k(b)==+N.label,className:X?"--current-page":"",onClick:F=>_(N),children:y===true?R===true&&X?jsx(Lt,{ref:g}):"":typeof N=="string"?N:N.label},`--pg-${L}-${N.id}`)})}),jsx(f,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(k(b)-1)*n+1} - `,`${Math.min(k(b)*n,t)} of ${t} items`].join(" ")}),jsxs(f,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsx(K,{disabled:k(b)<=1,onClick:N=>_({id:c?h(k(b)-1):k(b)-1,label:k(b)-1}),children:A.chevronLeftOutline}),jsx(K,{disabled:$.length<=1||k(b)==k($[$.length-1]),onClick:N=>_({id:c?h(k(b)+1):k(b)+1,label:k(b)+1}),children:A.chevronRightOutline})]})]})};Ps.displayName="Zuz.Pagination";var Ht=Ps;function Am(e,o){let{items:t,renderItem:n,effect:r="slide",loop:s=true,loopMode:a="infinite",startIndex:i=0,useKeys:p=true,useWheel:l=true,spacing:c=160,rotation:d=20,scaleStep:u=.15,blur:m=4,animation:y="power",showDots:R=false,autoPlay:x=false,autoPlaySpeed:C=3,onChange:v,...S}=e,{className:h,style:w}=O(S),g=useRef(null),b=C/(C>=1e3?1e3:1),I=useCarousel({total:t.length,initialIndex:i,loop:s,useKeys:p,useWheel:l,onChange:D=>{g.current?.setPage({id:D+1,label:D+1}),g.current?.setProgress(0),v?.(D);}}),{pause:B,resume:E,reset:V}=useTimer({duration:b,autoStart:x===true,onProgress:D=>{x===true&&g.current?.setProgress(1-D);},onExpired:()=>{x===true&&I.next(),V();}}),k={...w,"--carousel-spacing":`${c}px`,"--carousel-rotation":`${d}deg`,"--carousel-blur":`${m}px`,"--carousel-scale-step":u,"--active-index":I.index,"--carousel-transition":`var(--${y})`};return jsxs(f,{ref:o,className:`--carousel --effect-${r} --loop-${a} flex cols aic jcc ${h}`.trim(),style:k,children:[jsx(f,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((D,$)=>{let _=$-I.index;if(a==="infinite"){let L=t.length;_=((_+L/2)%L+L)%L-L/2;}let N=$===I.index;return jsx(f,{onMouseEnter:()=>N&&B(),onMouseLeave:()=>N&&E(),className:`--carousel-item-wrapper abs ${N?"--is-active":""}`,style:{"--offset":_,zIndex:N?100:100-Math.abs(_),display:Math.abs(_)>5?"none":"flex"},children:n(D,$,I.index)},$)})}),R&&jsx(Ht,{ref:g,itemCount:t.length,itemsPerPage:1,startPage:i+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:D=>I.goTo(+D.label-1),asDots:true,progressBar:true})]})}var $m=forwardRef(Am),Fm=$m;var Rs=(o=>(o.Line="line",o))(Rs||{});var Ns=forwardRef((e,o)=>{let{data:t,width:n,height:r,lineColor:s,strokeWidth:a=2,gradientStartColor:i,gradientEndColor:p,animated:l,animDuration:c=2,animDelay:d=0,padding:u=0,type:m,...y}=e,{className:R,style:x,rest:C}=O(y),v=useRef(null),S=useResizeObserver(v.current?.parentElement||v),h=typeof n=="number"?n:S.width,w=typeof r=="number"?r:S.height,g={width:h,height:w},b=useId(),{pathD:I,areaPathD:B}=useLineChart(t,g,u+(a||2)),E=useRef(null),V=useRef(null),[k,D]=useState(0),[$,_]=useState(0);return useEffect(()=>{l&&(E.current&&D(E.current.getTotalLength()),V.current&&_(V.current.getTotalLength()));},[l,I,B,h,w]),jsx(f,{ref:v,as:`--chart --${m||"line"}-chart ${R}`.trim(),style:{...x,width:n,height:r},...C,children:h>0&&w>0&&jsxs("svg",{viewBox:`0 0 ${h} ${w}`,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:i}),jsx("stop",{offset:"100%",stopColor:p})]})}),jsx("path",{ref:V,d:B,fill:`url(#${b})`,stroke:"none",style:l?{strokeDasharray:$,strokeDashoffset:$}:{},children:l&&jsx("animate",{attributeName:"stroke-dashoffset",from:$,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})}),jsx("path",{ref:E,d:I,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:l?{strokeDasharray:k,strokeDashoffset:k}:{},children:l&&jsx("animate",{attributeName:"stroke-dashoffset",from:k,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})})]})})});Ns.displayName="Zuz.Chart";var Um=Ns;var Bs=(r=>(r[r.Sending=0]="Sending",r[r.Sent=1]="Sent",r[r.Delivered=2]="Delivered",r[r.Read=3]="Read",r))(Bs||{}),qm=(l=>(l.Image="img",l.Video="vid",l.Audio="audio",l.Link="link",l.Document="doc",l.Location="loc",l.Contact="contact",l.Event="event",l.Poll="poll",l))(qm||{}),Xm=(s=>(s.File="file",s.Image="image",s.Video="video",s.Audio="audio",s.Link="link",s))(Xm||{});var ks=memo(({ref:e,...o})=>{let{sender:t,text:n,media:r,side:s="me",stylePreset:a="default",status:i=1,timeStamp:p=Date.now(),arrow:l=true,attachments:c,autoFetchLinkPreview:d=false,linkPreviewFetcher:u,replyTo:m,reactions:y,forwarded:R,...x}=o,{className:C,style:v,rest:S}=O(x);return jsxs(de,{gap:8,as:`--bubble-wrapper --bw-${s}`.trim(),ref:e,children:[t&&jsx(yr,{alt:t.name,src:t.picture,style:{backgroundColor:t.color}}),jsxs(de,{cols:true,ref:e,className:["--bubble --bubble-enter rel",r?`--with-media --bma-${r.type}`:"",`--bubble-${s}`,`--bubble-style-${a}`,l?"":"--bubble-grouped",l===true?"--b-arrow":"",C].filter(Boolean).join(" ").trim(),style:{...v,contain:"layout style paint"},...S,children:[t&&jsx(z,{className:"--bubble-name",children:t.name}),n&&jsx(z,{className:"--bubble-text",children:n}),jsxs(de,{aie:true,jce:true,as:"--bubble-stats",children:[jsx(z,{className:"--bubble-stamp tar",children:timeSince(p)}),s==="me"&&jsx(ie,{className:`--bubble-status --bs-${i}`,children:i===0?A.pending:i===1?A.done:i===2?A.doneAll:A.doneAll})]})]})]})},(e,o)=>e.text===o.text&&e.side===o.side&&e.status===o.status&&e.timeStamp===o.timeStamp&&e.stylePreset===o.stylePreset&&e.media===o.media&&e.attachments===o.attachments&&e.reactions===o.reactions);ks.displayName="Zuz.Bubble";var Cr=ks;var Jm={today:"Today",yesterday:"Yesterday"},Ms=memo(({messages:e,autoScroll:o=true,onScrollTop:t,typing:n,dateLabels:r,locale:s,formatDateLabel:a})=>{let i=useRef(null),p=useRef(null),l=useRef(null),c=useRef(false),d=useRef(false),[u,m]=useState(0),[y,R]=useState(false),x=useRef(e.length),C=useMemo(()=>({...Jm,...r||{}}),[r]),v=useCallback(()=>i.current?.querySelector(".--scroll-content"),[]),S=useCallback(I=>{let B=I||Date.now(),E=new Date(B),V=new Date,k=new Date(V.getFullYear(),V.getMonth(),V.getDate()),D=new Date(E.getFullYear(),E.getMonth(),E.getDate()),$=Math.floor((k.getTime()-D.getTime())/864e5),_=`${E.getFullYear()}-${E.getMonth()+1}-${E.getDate()}`,N=C,L=a?a(B,{date:E,dayDiff:$,locale:s,labels:N}):$===0?N.today:$===1?N.yesterday:E.toLocaleDateString(s);return {key:_,label:L}},[a,s,C]),h=useMemo(()=>e.flatMap((I,B)=>{let E=e[B-1],V=S(I.timeStamp),k=E?S(E.timeStamp):null,D=B===0||V.key!==k?.key,$=B===0||E?.side!==I.side||V.key!==k?.key,_=[];return D&&_.push(jsx(f,{as:"flex aic jcc p:8,0",children:jsx(z,{as:"s:xs dim-50",children:V.label})},`date-${V.key}-${B}`)),_.push(jsx(Cr,{...I,arrow:I.arrow??$},I.id||B)),_}),[e,S]),w=useMemo(()=>n?[...h,jsx(f,{as:"flex jcs p:4,8",children:jsxs(f,{as:"--bubble --bubble-you --typing-indicator rel flex cols",children:[jsx(z,{as:"s:xs dim-75",children:typeof n=="string"?n:"Typing"}),jsxs(f,{as:"flex aic gap:4",children:[jsx(ie,{className:"--typing-dot"}),jsx(ie,{className:"--typing-dot"}),jsx(ie,{className:"--typing-dot"})]})]})},"typing-row")]:h,[h,n]);useEffect(()=>{let I=v();if(!I||!o)return;let B=e.length-x.current;B>0&&(x.current=e.length,c.current?(m(E=>E+B),R(true)):(requestAnimationFrame(()=>{I.scrollTop=I.scrollHeight;}),m(0),R(false)));},[e,o,v]);let g=useCallback(()=>{let I=v();if(!I)return;let B=I.scrollHeight-I.scrollTop-I.clientHeight<100,E=I.scrollTop<50;c.current=!B,R(!B),B&&(m(0),R(false)),E?d.current||(d.current=true,t?.()):d.current=false,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{c.current=false;},500);},[t,v]);useEffect(()=>{let I=v();if(I)return I.addEventListener("scroll",g,{passive:true}),()=>I.removeEventListener("scroll",g)},[g,v]);let b=useCallback(()=>{let I=v();I&&(I.scrollTop=I.scrollHeight,m(0),R(false));},[v]);return useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]),jsxs(f,{ref:i,as:"rel flex cols",style:{height:"100%",contain:"layout style paint"},children:[jsx(Bt,{as:"h:full",smooth:true,children:jsx(_e,{ref:p,items:w})}),y&&u>0&&jsx(f,{as:"abs bottom:0 left:0 right:0 flex aic jcc",style:{padding:"12px",background:"linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%)"},children:jsx(K,{onClick:b,style:{padding:"8px 16px",borderRadius:"20px",fontSize:"12px"},children:jsxs(z,{children:[u," new message",u!==1?"s":""]})})})]})},(e,o)=>e.messages.length===o.messages.length&&e.autoScroll===o.autoScroll&&e.onScrollTop===o.onScrollTop&&e.typing===o.typing&&e.locale===o.locale&&e.formatDateLabel===o.formatDateLabel&&e.dateLabels?.today===o.dateLabels?.today&&e.dateLabels?.yesterday===o.dateLabels?.yesterday);Ms.displayName="Zuz.ChatList";var ep=Ms;var Os=forwardRef((e,o)=>{let{style:t,className:n,rest:r}=O(e);return jsx("label",{ref:o,style:t,className:n,...r})});Os.displayName="Zuz.Label";var $t=Os;var Vs=({ref:e,...o})=>{let {name:t,required:n,type:r,value:s,size:a,variant:i,checked:p,disabled:l,onSwitch:c,...d}=o,u=at(),m=!!(t&&u.values);m?u.errors?.[t]:null;let R=m?u.values?.[t]:void 0,[x,C]=useState(p||false),v=useRef(null),{variant:S}=j(true),h=useMemo(()=>m&&R!=null?typeof R=="string"?R.toLowerCase()!=="false"&&R!=="":!!R:x,[R,x,m]);useEffect(()=>{v.current&&v.current.checked!==h&&(v.current.checked=h);},[h]),useEffect(()=>{p!==void 0&&C(p);},[p]);let w=g=>{let b=!!g;m&&u.setFieldValue?.(t,b),C(b),c?.(b,s||"cb");};return useImperativeHandle(e,()=>({setChecked(g,b=true){w(g);},toggle(g=true){w(!h);}})),jsxs($t,{"aria-hidden":l,className:[`--${(r||Ke.Default).toLowerCase()}`,`${!r||r===Ke.Default?"--checkbox":"--switch"}`,`--${i||S||q.Small}`,`flex aic jcc ${h?"is-checked":""} rel`,`${l?"--disabled":""}`].join(" ").trim(),...d,children:[(!r||r==Ke.Default)&&A.check,jsx(fe,{ref:g=>{v.current=g,e&&(e.current=g);},defaultChecked:h,type:"checkbox",className:"abs",name:t,required:n||false,onChange:g=>{g.stopPropagation(),w(g.target.checked);},disabled:l})]})};Vs.displayName="Zuz.CheckBox";var Ft=Vs;var pp=({ref:e,...o})=>{let{code:t,copy:n,lang:r="tsx",showLines:s=false,highlight:a="",as:i,fx:p,...l}=o,c=useRef(null),{className:d,style:u,rest:m}=O({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${i}`,fx:p},c),y=useMemo(()=>{let x=new Set;return a.split(",").forEach(C=>{if(C.includes("-")){let[v,S]=C.split("-").map(Number);for(let h=v;h<=S;h++)x.add(h);}else C&&x.add(Number(C));}),x},[a]),R=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 C=x[0]?.match(/^\s*/)?.[0].length||0,v=x.map(h=>{let w=h.match(/^\s*/)?.[0].length||0,g=Math.min(w,C);return h.slice(g)}),S=[{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 v.map((h,w)=>{let g=h.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),b=y.has(w+1);if(r!="plain"){let I=[];S.forEach(B=>{g=g.replace(B.re,E=>{let V=`ZUZ_ID_${I.length}_ZUZ`;return I.push(`<span class="--token-${B.name}">${E}</span>`),V});});for(let B=I.length-1;B>=0;B--)g=g.replace(`ZUZ_ID_${B}_ZUZ`,I[B]);}return `<div class="--code-line ${s==true?"--with-ln":""} ${b?"--is-highlighted":""}">
10
- ${s==true?`<span class="--line-number">${w+1}</span>`:""}
8
+ document.documentElement.style.colorScheme = theme;`}}),jsx(zo,{children:e})]})},tn=(e,o)=>{if(Pi)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||o};var rn=({ref:e,...o})=>{let{style:t,...n}=o,{style:r,className:s,rest:a}=O(n);return jsx("span",{ref:e,style:t,className:s,...a})};rn.displayName="Zuz.Span";var ie=rn;var sn=forwardRef((e,o)=>{let{name:t,pathCount:n,variant:r,color:s,size:a,...i}=e,{variant:p}=j(true),{className:l,style:c,rest:d}=O(i);return jsx("div",{style:{color:s,...c,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${r||p||q.Small} ${l}`.trim(),ref:o,...d,children:Array(n||0).fill(0).map((f,m)=>jsx(ie,{className:`path${m+1}`},`${t}-layer-${m}`))})});sn.displayName="Zuz.Icon";var te=sn;var we={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var an=e=>{let{type:o,variant:t,color:n,...r}=e,{className:s,style:a,rest:i}=O(r),{spinner:p}=j(true),l=()=>{switch(o||p?.type||we.Simple){case we.Simple:return null;case we.Wave:return jsxs(Fragment$1,{children:[jsx(u,{as:"--bar --bar1"}),jsx(u,{as:"--bar --bar2"}),jsx(u,{as:"--bar --bar3"})]});case we.Roller:return null}};return jsx(u,{className:`${s} --spinner --${(o||p?.type||we.Simple).toLowerCase()} --${t||p?.variant||q.Small}`.trim(),style:{...a},...i,children:l()})};an.displayName="Zuz.Spinner";var Re=an;var ln=({ref:e,...o})=>{let{h:t,html:n,children:r,lines:s,tfx:a,delay:i=0,duration:p=.5,stagger:l=.05,repeat:c=true,reveal:d=false,hover:f=false,...m}=o,{style:y,className:R,rest:x}=O(m),C=useRef(null),[v,w]=useState(false),[h]=useIntersectionObserver([C],{threshold:[1]}),S=useMemo(()=>{if(y?.opacity!==void 0)return y.opacity;if(typeof o.as=="string"){let V=o.as.match(/opacity:([\d.]+)/);if(V)return V[1]}return 1},[o.as,y?.opacity]),g=useMemo(()=>a?f?v:d?h===1:true:false,[a,f,v,d,h]);useEffect(()=>{e&&(typeof e=="function"?e(C.current):e.current=C.current);},[e]);let b=`h${o.h||1}`,I=useMemo(()=>typeof r=="string"?r:Array.isArray(r)&&r.length===1&&typeof r[0]=="string"?r[0]:null,[r]),L=useMemo(()=>{let V=Array.isArray(o.as)?o.as.join(" "):o.as||"";return typeof V=="string"&&V.includes("text-clip")},[o.as]);useLayoutEffect(()=>{if(!L||!C.current||I===null)return;let V=C.current,k=0,D=0,F=()=>{let B=V.getBoundingClientRect(),G=getComputedStyle(V).backgroundImage,X=B.width;V.querySelectorAll(".--fx-char").forEach(Z=>{let W=Z.getBoundingClientRect().left-B.left;Z.style.backgroundImage=G,Z.style.backgroundRepeat="no-repeat",Z.style.backgroundSize=`${X}px 100%`,Z.style.backgroundPosition=`-${W}px 0`,Z.style.backgroundClip="text",Z.style.webkitBackgroundClip="text",Z.style.color="transparent";});},z=()=>{cancelAnimationFrame(k),cancelAnimationFrame(D),k=requestAnimationFrame(()=>{D=requestAnimationFrame(F);});};z();let E=new ResizeObserver(z);return E.observe(V),typeof document<"u"&&"fonts"in document&&document.fonts?.ready.then(z),window.addEventListener("resize",z),()=>{cancelAnimationFrame(k),cancelAnimationFrame(D),E.disconnect(),window.removeEventListener("resize",z);}},[L,I,a,g]);let N=useMemo(()=>n?jsx(ie,{dangerouslySetInnerHTML:{__html:n}}):a&&I!==null?I.split("").map((V,k)=>{let D=V===" ",z=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":c?"infinite":"1";return jsx(ie,{"data-char":V,className:`--fx-char -fx ${g?`--fx-${a}`:""}`,style:{"--delay":`${i+k*l}s`,"--duration":`${p}s`,"--iteration":z,"--target-opacity":S,display:D?"inline":"inline-block",whiteSpace:"pre",opacity:!g&&a==="typewriter"?0:void 0},children:V},k)}):r,[r,n,a,I,g,i,l,p,c]);return jsx(b,{ref:C,onMouseEnter:()=>f&&w(true),onMouseLeave:()=>f&&w(false),style:a?{...y,display:a?"flex":y?.display,flexWrap:a?"wrap":y?.flexWrap,opacity:a&&!g?0:a?1:y?.opacity,transition:a?"opacity 0.4s ease":void 0}:y,className:`${R} ${a?"--text-fx -fx":""}`.trim(),...x,children:N})};ln.displayName="Zuz.Text";var _=ln;var un=({ref:e,...o})=>{let {title:t,position:n,margin:r=4,anchorName:s="--tooltip-anchor",children:a,show:i,variant:p,...l}=o,{style:c,className:d,rest:f}=O(l),m=n||ve.Top;useRef(null);let [R,x]=useState(false),[C,v]=useState(false);useRef(6);let h=i===true||R,S=C&&typeof document<"u";useEffect(()=>{v(true);},[]);let b=`--anchor-${useId().replace(/:/g,"")}`,{tooltip:I}=j(true),L=useMemo(()=>{let V=false;return addPropsToChildren(a,k=>{let D=k.props.className?.includes(s);return D&&(V=true),D||!V},(k,D)=>{let F=D.props.className?.includes(s),z=k===0,E={};return (F||z)&&(E.style={...D.props.style,anchorName:b}),z&&(E.onMouseEnter=B=>{x(true),D.props.onMouseEnter?.(B);},E.onMouseLeave=B=>{x(false),D.props.onMouseLeave?.(B);}),E})},[a,s,b]),N=Se({transition:m==ve.Top?Q.SlideInTop:m==ve.Bottom?Q.SlideInBottom:m==ve.Left?Q.SlideInLeft:Q.SlideInRight,when:h,duration:.2,offset:r+6,margin:m==ve.Top||m==ve.Left?-r:r,curve:I?.curve||oe.EaseInOut});return useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxs(Fragment$1,{children:[L,S?createPortal(jsx(u,{style:{positionAnchor:b,...N.style,...m===ve.Top||m===ve.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${h} --${p||I?.variant||q.Small} --${m} abs ${d}`.trim(),children:typeof t=="string"?jsx(_,{as:"--text rel",children:t}):t}),document.body):null]})};un.displayName="Zuz.ToolTip";var Pt=un;var Qt={Loading:"loading",Normal:"normal"};var dn=({ref:e,...o})=>{let{reset:t,kind:n="solid",variant:r,tooltip:s,tooltipProps:a,alignment:i="center",icon:p,iconSize:l,children:c,withLabel:d,spinner:f,state:m,disabled:y,...R}=o,{style:x,className:C,rest:v}=O(R),{variant:w}=j(true),S=jsxs("button",{className:removeDuplicateWords(`--button ${s?"--tooltip-anchor":""} --${n} --${r||w} --flex --aic ${t?"":i==="start"?"--jcs":i==="end"?"--jce":"--jcc"} ${p?"--with-icon":""} ${C}`).trim().replace(/\s+/g," "),style:x,ref:e,disabled:m==Qt.Loading||o.skeleton?.enabled||y,...v,children:[m==Qt.Loading&&jsx(Re,{variant:r||w,type:f||we.Simple}),(!m||m==Qt.Normal)&&jsxs(Fragment$1,{children:[p&&jsx(te,{variant:l,name:p}),d===true?jsx(ie,{children:c}):c]})]});return s?jsx(Pt,{title:s,...a,children:S}):S};dn.displayName="Zuz.Button";var K=dn;var qi=e=>{let{label:o,labelColor:t,icon:n,iconColor:r,index:s,className:a,onSelect:i}=e;return o=="-"?jsx(u,{className:"--line"}):jsxs(K,{reset:true,onClick:p=>i?.(e),className:`--item ${a||""}`.trim(),children:[jsx(u,{as:"--icon",children:jsx(te,{name:n,className:"--ico",style:r?{color:r}:{}})}),jsx(_,{className:"--lbl flex aic",style:t?{color:t}:{},children:o})]})},gn=qi;var xn=({ref:e,...o})=>{let {id:t,as:n,fx:r,offsetX:s,offsetY:a,parent:i,event:p,arrow:l,when:c,items:d,header:f,footer:m,origin:y=St.TopRight,...R}=o,[x,C]=useState(false),[v,w]=useState(d||[]),{position:h,targetRef:S,calculatedAnchor:g}=useAnchorPosition(i?.current,p,{offsetX:s,offsetY:a,preferredAnchor:y}),b=g.toLowerCase(),I=b.includes("top");b.includes("bottom");let N=I?"--arrow-top":"--arrow-bottom",V=useMemo(()=>b.includes("left")?"--arrow-left":b.includes("right")?"--arrow-right":"--arrow-center",[b]),k=h.top!==0||h.left!==0;useEffect(()=>{c&&k?C(true):c||C(false);},[c,k]);let{className:D,style:F,rest:z}=O(R),E=Se({...r?.transition?{transition:r.transition??Q.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:r?.curve??oe.EaseInOut,duration:r?.duration??.05,when:x&&k});return jsxs(u,{ref:S,className:`--contextmenu ${l||i!=null?`--has-arrow ${N} ${V}`:""} abs flex cols ${D}`.trim(),"aria-hidden":!x,style:{...F,...E.style,top:h.top,left:h.left,visibility:k?"visible":"hidden",transformOrigin:g},...z,children:[typeof f=="function"?createElement(f):f,v.map((B,G)=>jsx(gn,{...B,index:G},`context-${B.label.toLowerCase()}-${G}`)),typeof m=="function"?createElement(m):m]})};xn.displayName="Zuz.ContextMenu";var Zo=xn;var bn=forwardRef((e,o)=>{let{children:t,fx:n,when:r,fxDelay:s,fxStep:a,classToIgnore:i,...p}=e,l=j(true),c=useDelayed(),d=n||l?.group?.fx,f=s||l?.group?.fxDelay,m=a||l?.group?.fxStep,y=i||l?.group?.classToIgnore||"-fx",R=useMemo(()=>d?addPropsToChildren(t,x=>{if(x.type===Fragment)return false;let C=x.props||{},v="fx"in C,w="tfx"in C,h=C.as?Array.isArray(C.as)?C.as.join(" "):C.as:C.className||"";return !(typeof h=="string"&&h.includes(y))&&(!v||w)},(x,C)=>{let v=(f??0)+x*(m??.1),w=C.props||{};return "tfx"in w?{delay:(w.delay??0)+v}:{fx:{...d,delay:v,when:r??(n?.when||c)}}}):t,[t,r,c,d,f,m,y,n]);return jsx(u,{className:"--group",ref:o,...p,children:R})});bn.displayName="Zuz.Group";var Ko=bn;var Sn=forwardRef((e,o)=>{let{message:t,spinner:n,spinnerSize:r,color:s,when:a,hideMessage:i,...p}=e,{className:l,style:c,rest:d}=O(p),{spinner:f}=j(true);return "when"in e&&e.when==false?null:jsxs(Ko,{fx:{transition:Q.SlideInBottom,curve:oe.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${l}`.trim(),style:{...c,backgroundColor:"var(--cover-bg)"},...d,children:[jsx(Re,{variant:r||f?.variant||q.Small,type:n||f?.type||we.Simple}),!i&&jsx(_,{className:"--label",tfx:"fade",style:{color:"var(--cover-label)"},children:t||"loading"})]})});Sn.displayName="Zuz.Cover";var Fe=Sn;var to=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(to||{}),oo=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(oo||{}),wn=(t=>(t.Stack="stack",t.Individual="individual",t))(wn||{}),Cn={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var ml=()=>{let e=useContext(Ie);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let o=(l,c)=>e.add({type:"toast",props:{...c,type:l}});return {show:(l,c,d,f)=>o("default",{title:l,message:c,icon:d,duration:f}),hide:l=>e.remove(l),success:(l,c,d,f)=>o("success",{title:l,message:c,icon:d,duration:f}),error:(l,c,d,f)=>o("error",{title:l,message:c,icon:d,duration:f}),warn:(l,c,d,f)=>o("warn",{title:l,message:c,icon:d,duration:f}),promise:(l,c,d,f)=>o("promise",{title:l,message:c,icon:d,duration:f}),clearAll:()=>e.clear("toast")}},Wo=ml;var Tn=forwardRef((e,o)=>{let{when:t,...n}=e;return jsx(u,{ref:o,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:Q.FadeIn,when:t},...n})});Tn.displayName="Zuz.Overlay";var tt=Tn;var We=null,Ee=null,Rn=forwardRef((e,o)=>{let{title:t,message:n,transition:r,curve:s,speed:a,type:i,actionPosition:p,spinner:l,loadingMessage:c,onShow:d,onHide:f,...m}=e,{className:y,style:R,rest:x}=O(m),[C,v]=useState(t||""),[w,h]=useState(n||""),[S,g]=useState(null),[b,I]=useState(i||Me.Default),L=useMemo(()=>uuid(12),[]),[N,V]=useState(false),k=useRef(null),D=useRef(null),[F,z]=useState(false),[E,B]=useState(true),G=useRef(null),X=w;useImperativeHandle(o,()=>({setLoading(Z){z(Z);},showDialog(Z,U,W,re){We&&(clearTimeout(We),Ee&&clearTimeout(Ee),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),Ee=setTimeout(()=>{k.current.classList.remove("--wobble"),Ee=null;},500)),I(Me.Dialog),U&&h(U),Z&&v(Z),W&&g(W.reduce((J,ce)=>(J.push({...ce,key:ce.key||uuid(12)}),J),[])),V(true),setTimeout(()=>re?re():()=>{},1e3);},dialog(Z,U,W,re){We&&(clearTimeout(We),Ee&&clearTimeout(Ee),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),Ee=setTimeout(()=>{k.current.classList.remove("--wobble"),Ee=null;},500)),I(Me.Dialog),h(U),v(Z),W&&g(W.reduce((J,ce)=>(J.push({...ce,key:ce.key||uuid(12)}),J),[])),V(true),setTimeout(()=>re?re():()=>{},1e3);},error(Z,U){this.show(Z,U,Me.Error);},warn(Z,U){this.show(Z,U,Me.Warn);},success(Z,U){this.show(Z,U,Me.Success);},show(Z,U,W){We&&(clearTimeout(We),Ee&&clearTimeout(Ee),D.current=k.current.style.transform,k.current.style.transform="",k.current.classList.remove("--wobble"),setTimeout(()=>{k.current.classList.add("--wobble"),k.current.style.transform=`${D.current} scale(.9)`.trim();},50),Ee=setTimeout(()=>{k.current.classList.remove("--wobble"),k.current.style.transform=D.current||"",Ee=null;},500)),We=setTimeout(()=>{V(false),We=null,Ee=null;},(U||4)*1e3),I(W||Me.Default),h(Z),V(true),d?.();},hide(){V(false),f?.();}}));let $=useMemo(()=>{let Z={when:N,duration:a||.3,delay:.1};if(b==Me.Dialog){if(r){let{from:U,to:W}=wt(r,20);return {from:U,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}},[N,b]);return useEffect(()=>{G.current&&clearTimeout(G.current),N?B(true):G.current=setTimeout(()=>B(false),1e3);},[N]),b==Me.Dialog?jsxs(Fragment$1,{children:[jsx(tt,{when:N}),jsxs(u,{className:`--sheet --sheet-${b.toLowerCase()} ${N?"is-visible":""} ${y} fixed`.trim(),style:R,fx:$,...x,ref:k,children:[jsx(Fe,{when:F,spinner:l,message:c}),jsxs(u,{className:"--head flex aic rel",children:[jsx(u,{className:`--${C?"title":"dot"} flex aic rel`,children:C||""}),jsx(K,{onClick:Z=>V(false),className:"--closer abs",children:"\xD7"})]}),jsx(u,{className:`--body flex aic rel ${S?"":"--no-action"}`.trim(),children:E?X:null}),S&&jsx(u,{className:`--footer flex aic rel ${p?p==Lo.Center?"jcc":"":"jce"}`.trim(),children:S.map((Z,U)=>jsx(K,{onClick:W=>Z.handler?Z.handler():Z.onClick?Z.onClick():console.log("onClick Handler missing"),className:"--action",children:Z.label},`sheet-${L}-action-${Z.key}`))})]})]}):jsx(u,{className:`--sheet --sheet-${b.toLowerCase()} ${y} abs`.trim(),style:R,...x,fx:$,ref:k,children:N?w:null})}),In=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;Rn.displayName="Zuz.Sheet";var hl=Rn;var Rt=createContext(null),jo=()=>{let e=useContext(Rt);return e?useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},It=()=>useContext(Rt),Nn=()=>()=>{},Bn=e=>{let o=useContext(Rt);return useSyncExternalStore(o?.subscribe??Nn,()=>{if(!(!o||!e))return o.getSnapshot().values?.[e]},()=>{})},kn=e=>{let o=useContext(Rt);return useSyncExternalStore(o?.subscribe??Nn,()=>!o||!e?null:o.getSnapshot().errors?.[e]??null,()=>null)},at=()=>{let e=It(),o=jo();return {...e,...o}},Ln=({children:e,initialValues:o={}})=>{let t=useRef({values:o,errors:{},touched:{}}),n=useRef(new Set(Object.keys(o))),r=useRef(new Set),s=useCallback(()=>t.current,[]),a=useCallback(l=>(r.current.add(l),()=>r.current.delete(l)),[]),i=()=>{r.current.forEach(l=>l());};useEffect(()=>{if(!o||Object.keys(o).length===0)return;let l=new Set(Object.keys(o)),c=[...n.current].filter(C=>!l.has(C)),d={...t.current.values};c.forEach(C=>delete d[C]);let f={...d,...o},m=t.current.values||{},y=Object.entries(f),R=Object.entries(m),x=y.length!==R.length||y.some(([C,v])=>m[C]!==v);n.current=l,x&&(t.current={...t.current,values:f},i());},[o]);let p=useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(l,c)=>{t.current.values[l]!==c&&(t.current={...t.current,values:{...t.current.values,[l]:c}},i());},deleteFieldValue:l=>{if(!(l in t.current.values))return;let{[l]:c,...d}=t.current.values;t.current={...t.current,values:d},i();},setFieldError:(l,c)=>{t.current={...t.current,errors:{...t.current.errors,[l]:c}},i();},reset:()=>{t.current={values:{},errors:{},touched:{}},i();}}),[]);return jsx(Rt.Provider,{value:p,children:e})};var El=e=>{let o={};for(let t in e){let n=t.split(/[\[\]]+/).filter(Boolean);n.reduce((r,s,a)=>{if(a===n.length-1)r[s]=e[t];else {let i=!isNaN(Number(n[a+1]));r[s]=r[s]||(i?[]:{});}return r[s]},o);}return o},Mn=({ref:e,...o})=>{let {schema:t,name:n,cover:r,spinner:s,errors:a,action:i,children:p,withData:l,beforeSubmit:c,onSubmit:d,onError:f,onSuccess:m,resetOnSuccess:y,...R}=o,{className:x,style:C,rest:v}=O(R),[w,h]=useState(false),S=useRef(null),g=Wo(),b=It();jo();let L=useRef(null),N=useCallback($=>S.current?S.current.querySelectorAll($):[],[S.current]),V=$=>({name:$.name||$.getAttribute("name")||$.getAttribute("data-name"),required:$.required?true:$.getAttribute("data-required")?$.getAttribute("data-required")=="true":false,with:$.with||$.getAttribute("with")}),k=$=>{let Z=[];return $.querySelectorAll(".--input").forEach(U=>{Z.push(U.value);}),Z.join("")},D=$=>$.classList.contains("--otp")?k($):$.classList.contains("--select")?$.querySelector("button.--selected")?.dataset.value:$.classList.contains("--checkbox")||$.getAttribute("type")==="checkbox"?$.checked:$.value,F=useCallback($=>{let{name:Z,required:U,with:W}=V($),re=D($);if(t&&t[Z]&&b?.getSnapshot()){let J=t[Z](re,b.getSnapshot().values);if(J===false||typeof J=="string")return typeof J=="string"&&b?.setFieldError(Z,J),false}if(U&&($.type==="checkbox"&&!$.checked||$.classList.contains("--select")&&(re==="-1"||!re)||!re||re===""))return false;if(W)switch((W.includes("@")?W.split("@")[0]=="match"?Je.MatchField:W.split("@")[0]:W).toUpperCase()){case Je.IPV4:return _$1(re).isIPv4();case Je.IPV6:return _$1(re).isIPv6();case Je.Email:return _$1(re).isEmail();case Je.Uri:try{return new URL(re),!0}catch{return false}case Je.MatchField:let[ce,me,Ce]=W.split("@"),le=document.querySelector(`[name=${me.trim()}]`);if(!le)return false;switch(Ce||"direct-match"){case "if-not-empty":if(le&&!_$1(le.value).isEmpty()&&le.value!=$.value)return false;break;case "direct-match":if(le&&le.classList.contains("--otp")&&$.classList.contains("--otp")&&k(le)!=k($))return false;if(le&&le.value!=$.value)return false;break}break}return true},[t,b]),z=useCallback(()=>{let $={},Z={...b?.getSnapshot().values||{}},U=null,W=null;if(N("[name]").forEach(J=>{let{name:ce,required:me,with:Ce}=V(J),le=me||Ce?F(J):true,pe=D(J);$[ce]={valid:le,value:pe},Z[ce]=pe,b?.setFieldError(ce,le?null:a?.[ce]||"Invalid"),le?J.classList.remove("--with-error"):(J.classList.add("--with-error"),U||(U=J),W=a?.[ce]);}),U){let J=U;if(J.classList.contains("--otp"))for(let ce of Array.from(J.querySelectorAll(".--input"))){let me=ce;if(me.value==""){me.focus();break}}else J.focus();}let re=El(Z);return {error:U!=null,errorMsg:W||"Fix errors to continue...",data:$,payload:re}},[S.current,b]),E=useCallback(($={})=>{let{error:Z,errorMsg:U,payload:W,data:re}=z();if(Z){g.error(U);return}i?startTransition(async()=>{h(true),withPost(i,{...l,...W,...$}).then(J=>{h(false),y&&b?.reset(),m?.(J,{...l,...W,...$}),m||g.success(J.message||"Redirecting...");}).catch(J=>{h(false),f?f(J):g.error(J.message);});}):d?.(W,re);},[z,i,l,m,f,y,d]),B=useCallback(()=>{let $=N("[type=submit]");!$||$.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):$.forEach(Z=>{Z.addEventListener("click",E);});},[S.current]),G=useMemo(()=>addPropsToChildren(p,$=>$.props.type=="submit",$=>({ref:L})),[p]),X=useRef(E);return useImperativeHandle(e,()=>({setLoading:$=>h($),submit:$=>X.current($),init:B,hideError:()=>g.clearAll()}),[E,B]),useEffect(B,[]),useEffect(()=>{X.current=E;},[E]),useEffect(()=>{let $=N("[type=submit]"),Z=Array.from($).map(U=>{let W=U;return W.addEventListener("click",E),()=>W.removeEventListener("click",E)});return ()=>Z.forEach(U=>U())},[E,N]),jsxs(u,{ref:S,style:C,className:`--form flex rel ${x}`,children:[!In(r)&&jsx(Fe,{when:w,spinner:s,...r}),G]})};Mn.displayName="Zuz.FormInternal";var On=e=>jsx(Ln,{initialValues:e.withData,children:jsx(Mn,{...e})});On.displayName="Zuz.Form";var tr=On;var or=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(o){return this.stack[this.stack.length-1]===o}push(o){this.stack.includes(o)||(this.stack.push(o),this.updateScrollLock());}pop(o){this.stack=this.stack.filter(t=>t!==o),this.updateScrollLock();}handleEscape(){let o=this.stack[this.stack.length-1];return o?(o(),true):false}get count(){return this.stack.length}},Ve=new or;var Bl=({action:e,render:o=true,message:t=""})=>jsx(u,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:o?t:null}),Dn=Bl;var Vn=({cols:e,gap:o,ass:t,ais:n,aic:r,aie:s,jcs:a,jcc:i,jce:p,className:l="",style:c,...d})=>{let f=["--flex",e?"--cols":"",t?"--ass":"",n?"--ais":"",r?"--aic":"",s?"--aie":"",a?"--jcs":"",i?"--jcc":"",p?"--jce":"",l].filter(Boolean).join(" "),m={...c,gap:typeof o=="number"?`${o}px`:o};return jsx(u,{...d,className:f,style:m})};Vn.displayName="Zuz.FlexBox";var de=Vn;var Ml=({useForm:e,action:o,actionPosition:t,dialogID:n,variant:r})=>jsx(de,{aic:true,as:`--footer rel ${t?t==qr.Center?"--jcc":"":"--jce"}`.trim(),children:o.map((s,a)=>jsx(K,{variant:r,kind:s.kind,type:s.type||"button",onClick:()=>{if(!(e===true&&s.type==="submit")){if(s.handler)return s.handler();if(s.onClick)return s.onClick();console.log("onClick Handler missing");}},as:"--action",children:s.label},`dialog-${n}-action-${s.key||a}`))}),An=Ml;var Ol={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"})," "]}),[Le.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"})}),[Le.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"})}),[Le.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"})}),[Le.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"})]})},A=Ol;var Dl=({title:e="Alert",description:o,titlePosition:t="center",onClose:n})=>jsxs(de,{as:"--head rel",children:[jsxs(de,{cols:true,as:[`--${e?"title":"dot"} rel`,`--position-${t}`],children:[jsx(_,{children:e}),o&&jsx(_,{as:"--description",children:o})]}),jsx(K,{onClick:r=>n(),className:`--closer abs ${t=="center"?"center-v":""}`,children:A.close})]}),Fn=Dl;var Zn=({ref:e,...o})=>{let{index:t,id:n,title:r,description:s,titleAlignment:a,message:i,content:p,transition:l,curve:c,speed:d,type:f,width:m,action:y,actionPosition:R,spinner:x,loadingMessage:C,variant:v,inBackground:w,forceClose:h,forceLoading:S,useForm:g,formProps:b,onConfirm:I,onCancel:L,onClose:N,onShow:V,onHide:k,...D}=o,F=useMemo(()=>uuid(12),[]),[z,E]=useState(r||""),[B,G]=useState(s||""),[X,$]=useState(p||i||""),[Z,U]=useState(f||et.Dialog),[W,re]=useState(false),[J,ce]=useState(true),[me,Ce]=useState(()=>y?y.map(De=>({...De,key:De.key||uuid(12)})):null),[le,pe]=useState(false),{variant:Y,spinner:se,dialog:ne}=j(true),he=v||ne?.variant||Y||q.Small,{style:Ae,className:Te,rest:ye}=O(D),Oe=useRef(null),ae=Se({when:W,duration:d||ne?.speed||.3,delay:ne?.delay||.1,transition:l||ne?.transition||Q.SlideInBottom,curve:c||ne?.curve||oe.EaseInOut,watch:["scale","filter","transform"]}),be=()=>{re(false),N(n);},Wt=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ve.isTop(be)&&be();}}],[W]);useShortcuts(Wt),useEffect(()=>{U(et.Dialog),$(p||i),E(z),G(B),re(true),setTimeout(()=>V?V():()=>{},500);},[]),useEffect(()=>{h&&be();},[h]),useEffect(()=>{S!=null&&pe(S);},[S]),useEffect(()=>(W?Ve.push(be):Ve.pop(be),()=>Ve.pop(be)),[W]);let Ut=useMemo(()=>1e4+t*10,[t]),$e=jsxs(u,{as:`--dialog --${(f??et.Default).toLowerCase()} ${W?"--visible":""} ${Te} fixed abc`.trim(),style:{...ae.style,zIndex:Ut+1,pointerEvents:w==true?"none":"auto",width:m||"auto",...w==true?{scale:"0.92",filter:"blur(2px)"}:{}},...ye,ref:Oe,children:[jsx(Fn,{title:z,description:s,titlePosition:a||ne?.titleAlignment||"center",onClose:be}),jsx(Dn,{message:X,render:J,action:me}),me&&me.length>0&&jsx(An,{variant:he,action:me,dialogID:F,useForm:g,actionPosition:R}),jsx(Fe,{when:le,spinner:x||ne?.spinner||se?.type||we.Simple,message:C||ne?.loadingMessage})]});return jsxs(Fragment$1,{children:[jsx(tt,{style:{zIndex:Ut},when:W}),g?jsx(tr,{onSubmit:((De,No)=>{I?.(De,No);}),...b,children:$e}):$e]})};Zn.displayName="Zuz.Dialog";var sr=Zn;var Kn=forwardRef((e,o)=>{let{speed:t,smooth:n=false,breakpoints:r={},style:s,...a}=e,{rootRef:i,containerRef:p,thumbY:l,thumbX:c,onScrollY:d,onScrollX:f}=useScrollbar(t||1,r,n),{style:m,className:y,rest:R}=O(a);return useEffect(()=>{let x=p.current;if(!x)return;let C=()=>{window.dispatchEvent(new Event("resize"));},v=w=>{let h=w.target;if(h.closest(".--allow-scroll")){let g=h.closest(".--allow-scroll"),{scrollTop:b,scrollHeight:I,clientHeight:L}=g,N=w.deltaY<0,V=w.deltaY>0;(N&&b>0||V&&b+L<I)&&w.stopPropagation();}};return x.addEventListener("scroll",C),x.addEventListener("wheel",v,{passive:true}),()=>{x.removeEventListener("scroll",C),x.removeEventListener("wheel",v);}},[p]),jsxs(u,{ref:i,className:y.trim(),as:"--scrollview rel",children:[jsx(u,{as:`--scroll-content ${y}`.trim(),ref:p,style:s||{},children:R.children}),jsx(u,{as:"--scroll-track --track-y --abs",children:jsx(u,{as:"--scroll-thumb --abs --round",ref:l,onMouseDown:d})}),jsx(u,{as:"--scroll-track --track-x --abs",children:jsx(u,{as:"--scroll-thumb --abs --round",ref:c,onMouseDown:f})})]})});Kn.displayName="Zuz.ScrollView";var Bt=Kn;var Wn=({ref:e,...o})=>{let{id:t,index:n,from:r,speed:s,children:a,margin:i,animation:p,prerender:l,inBackground:c,forceClose:d,forceLoading:f,closeBtn:m,onClose:y,...R}=o,{drawer:x}=j(true),[C,v]=useState(a),[w,h]=useState(false),[S,g]=useState(l??(x?.prerender||true)),[b,I]=useState(false),L=()=>{h(false),y?.(t??-1);},{className:N,style:V,rest:k}=O(R),D=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ve.isTop(L)&&L();}}],[w]);useShortcuts(D),useEffect(()=>{v(a);},[a]),useEffect(()=>(w?Ve.push(L):Ve.pop(L),()=>Ve.pop(L)),[w]),useEffect(()=>{h(true);},[]),useEffect(()=>{d&&L();},[d]),useEffect(()=>{f!=null&&I(f);},[f]);let F=r||x?.from||Pe.Left,z=useMemo(()=>{switch(F){case Pe.Left:return {from:{x:"-100vw"},to:{x:0}};case Pe.Right:return {from:{x:"100vw"},to:{x:0}};case Pe.Top:return {from:{y:"-100vh"},to:{y:0}};case Pe.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[r,x?.from]),E=Se({from:{...z.from,opacity:0},to:{...z.to,opacity:1},when:w,curve:p||x?.animation||oe.EaseInOut,duration:s||x?.speed||.5,watch:["scale","filter"]}),B=useMemo(()=>1e4+(n||1)*10,[n]);return jsxs(Fragment$1,{children:[jsx(tt,{onClick:G=>{w&&L();},when:w,style:{zIndex:B}}),jsxs(u,{ref:e,"aria-hidden":!w,className:`--drawer flex cols ${N} --${F.toLowerCase()} fixed`,style:{...V,...E.style,"--m":`${i||x?.margin||0}px`,zIndex:B+1,pointerEvents:c==true?"none":"auto",...c==true?{scale:"0.92",filter:"blur(2px)"}:{}},...k,children:[r==Pe.Top||r==Pe.Bottom?jsx(u,{className:"--handle"}):null,m&&jsx(K,{as:`--close-drawer --close-${m} --abs --round`,onClick:L,children:A.close}),jsxs(Bt,{as:"rel",children:[S||w?C:null,jsx(Fe,{when:b})]})]})]})};Wn.displayName="Zuz.Drawer";var lr=Wn;var Gn=forwardRef((e,o)=>{let{progress:t,type:n,animated:r,...s}=e,a=useRef(null);useImperativeHandle(o,()=>({setProgress:c=>{a.current.style.width=`${c*100}%`,a.current.setAttribute("data-value",c+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),useEffect(()=>{t&&a.current&&(r?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:i,style:p,rest:l}=O(s);return jsx(u,{className:`--progress ${r?"--animated":""} flex rel ${i}`.trim(),style:p,...l,children:jsx(u,{ref:a,className:"--bar rel"})})});Gn.displayName="Zuz.ProgressBar";var Lt=Gn;var jl=e=>{let{index:o,id:t,type:n,icon:r,busy:s,width:a,title:i,message:p,duration:l,sticky:c=false,actions:d=[],position:f,style:m,isHovered:y,total:R,progress:x,progressValue:C,forceClose:v,variant:w,onClick:h,onClose:S}=e,[g,b]=useState(false),[I,L]=useState(false),{toast:N}=j(true),V=typeof C=="number",k=V?Math.max(0,Math.min(1,C)):void 0,D=I||v,F=f??N?.position??"TopCenter",z=n??N?.type??"default",E=m??N?.style??"stack",B=l??N?.duration??4,G=x??N?.progress??false,X=useRef(B*1e3),$=useRef(void 0),Z=useRef(void 0),U=useRef(null),W=Se({when:g&&!D,duration:.3,transition:N?.transition||(F.includes("Top")?Q.SlideInTop:F.includes("Bottom")?Q.SlideInBottom:F.includes("Left")?Q.SlideInLeft:Q.SlideInRight),curve:N?.curve||oe.EaseInOut,watch:["transform","opacity","scale","filter"]});useEffect(()=>{b(true);let Y=se=>{if(Z.current!==void 0){let ne=se-Z.current;if(!V&&!y&&!c&&!D&&(X.current-=ne,U.current)){let he=Math.max(0,X.current/(B*1e3)*100);U.current?.setProgress?.(he/100);}}Z.current=se,X.current<=0?L(true):$.current=requestAnimationFrame(Y);};return $.current=requestAnimationFrame(Y),()=>{$.current&&cancelAnimationFrame($.current);}},[y,c,D,B]),useEffect(()=>{if(D){let Y=setTimeout(()=>{S?.(t);},350);return ()=>clearTimeout(Y)}},[D,t]);let re=E==="stack",J=y?o*65:o*8,ce=y?1:Math.max(.85,1-o*.05),me=y?1:Math.max(.4,1-o*.2),Ce=Y=>{h?h(Y):s!==true&&(!d||d.length===0)&&L(true);},le=W.style.transform||"translate(0, 0)",pe=D?le:`${le} translateY(${F.includes("Top")?J:-J}px) scale(${ce})`;return jsxs(u,{onClick:Ce,as:`--snack --${D?"hidden":"visible"} --${w||N?.variant||q.Medium} --${z} --${F.toLowerCase()} abs flex aic`,style:{...W.style,zIndex:1e3-o,pointerEvents:D?"none":"auto",opacity:D?W.style.opacity:me,transform:pe,filter:!D&&re&&!y&&o>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(u,{as:"--ico flex aic jcc rel",children:[r?jsx(te,{name:r}):jsx(u,{as:"--no-icon"}),s===true&&jsx(Re,{as:"abs abc"})]}),jsxs(u,{as:"--meta flex cols",style:a?{width:a,minWidth:a,maxWidth:a}:void 0,children:[jsx(_,{as:"--tt",children:i||Cn[n]}),jsx(_,{as:"--tm",children:p})]}),d&&d.length>0&&jsx(u,{as:"--actions flex gap:5",children:d.map((Y,se)=>jsx(K,{as:"--snack-btn bold",variant:q.XSmall,onClick:ne=>{ne.stopPropagation(),Y.onClick(ne);},children:Y.label},se))}),(G||V)&&jsx(Lt,{as:"abs",progress:k,ref:U})]})},mr=jl;var Ie=createContext(null),rc=({ref:e,...o})=>{let n=useContext(Ie)?.depth??0,[r,s]=useState(null),[a,i]=useState(null),[p,l]=useState(false),[c,d]=useState([]),f=useDelayed(),m=useRef(0),y=()=>++m.current,R=()=>{l(false),setTimeout(()=>i(null),200);};useImperativeHandle(e,()=>({add(h){let S=y(),g={id:S,...h};return d(b=>[...b,g]),S},openMenu(h){l(false),setTimeout(()=>{i({id:y(),type:"menu",props:h}),l(true);},16);},update(h,S){d(g=>g.map(b=>b.id!==h?b:{...b,props:{...b.props,...S}}));},remove(h){d(S=>S.map(g=>g.id===h?{...g,props:{...g.props,forceClose:true}}:g)),a?.id===h&&R();},loading(h,S){d(g=>g.map(b=>b.id===h?{...b,props:{...b.props,forceLoading:S}}:b)),a?.id===h&&R();},clear(h){d(c.filter(S=>S.type!=h));}})),useEffect(()=>{if(a&&p){let h=()=>R();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[a,p,R]);let x=h=>{setTimeout(()=>{d(S=>S.filter(g=>g.id!==h)),a?.id===h&&i(null);},250);},C=useMemo(()=>[...c.filter(h=>h.type!="toast")],[c]);if(!f)return null;let v=c.filter(h=>h.type=="toast").reverse(),w=Object.values(oo);return createPortal(jsxs(u,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[C.map((h,S)=>{let g=S<C.length-1;return h.type==="dialog"?jsx(sr,{onClose:x,index:S,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsx(lr,{onClose:x,index:S,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):null}),w.map(h=>{let S=v.filter(g=>(g.props.position||"TopCenter")===h);return S.length===0?null:jsx(u,{onMouseEnter:()=>s(h),onMouseLeave:()=>s(null),as:`--toast-container fixed --${h.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:S.map((g,b)=>jsx(mr,{index:b,total:S.length,isHovered:r===h,onClose:x,id:g.id,...g.props},g.id))},h)}),a&&jsx(u,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsx(Zo,{onClose:R,when:p,...a.props},`menu-${a.id}`)})]}),document.body)},nc=({children:e})=>{let o=useContext(Ie),t=o?o.depth+1:0,n=useRef(null),r=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:!!o}),[o]);return jsxs(Ie.Provider,{value:r,children:[e,jsx(rc,{ref:n})]})},zo=nc;var ac=()=>{let e=useContext(Ie);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(n,r,s)=>{n.preventDefault(),e.openMenu({event:n,items:r,origin:s});},showMenu:(n,{items:r,origin:s,offsetX:a,offsetY:i,transition:p,curve:l,arrow:c,duration:d,header:f,footer:m})=>{e.openMenu({fx:{transition:p,curve:l,duration:d},parent:n,items:r,origin:s||St.TopCenter,offsetX:a,offsetY:i,arrow:c,header:f,footer:m});},hide:e.clear}},ic=ac;var cc=()=>{let e=useContext(Ie);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let o=()=>e.clear("dialog"),t=a=>e.remove(a),n=(a,i)=>e.loading(a,i);return {clearAll:o,show:a=>{let i=e.add({type:"dialog",props:{...a,type:et.Dialog}});return {id:i,setLoading:p=>n(i,p),hide:()=>t(i)}},confirm:a=>{let{confirmLabel:i,...p}=a,l=e.add({type:"dialog",props:{...p,type:et.Confirm,action:a.action??[{label:a.cancelLabel??"Cancel",kind:"ghost",onClick:()=>{a.onCancel?.(),t(l);}},{label:a.confirmLabel??"Confirm",kind:"solid",type:"submit",onClick:c=>{a.onConfirm?.(c);}}]}});return {id:l,setLoading:c=>n(l,c),hide:()=>t(l)}},hide:t}},mc=cc;var uc=()=>{let e=useContext(Ie);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let o=()=>e.clear("drawer"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a),r=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:i=>n(a,i),close:()=>t(a)}};return {clearAll:o,open:s=>r({children:s}),right:s=>r({children:s,from:Pe.Right}),left:s=>r({children:s,from:Pe.Left}),top:s=>r({children:s,from:Pe.Top}),bottom:s=>r({children:s,from:Pe.Bottom}),close:t}},fc=uc;var gc=(e,o,t={})=>{let[n,r]=useState(null),[s,a]=useState(false),{duration:i=.25,curve:p=oe.EaseOutBack,borderRadius:l={from:40,to:24},targetWidth:c=320}=t;return useLayoutEffect(()=>{o&&e.current?(r(e.current.getBoundingClientRect()),a(true)):o||a(false);},[o,e]),{style:Se({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:l.from},to:{opacity:1,width:c,height:"auto",borderRadius:l.to},curve:p,duration:i,when:s&&o}).style,isMeasured:s,sourceRect:n}},hc=gc;var vc=(e,o={})=>{let{offset:t=8,direction:n="bottom",container:r=null,triggerRef:s=null}=o,a=useRef(null),i=useCallback(()=>{let p=e.current;if(!p)return;let l=s?.current||p.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=p.getBoundingClientRect(),d=l.getBoundingClientRect(),f,m;r?(f=r.getBoundingClientRect(),m="absolute"):(window.getComputedStyle(p).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}),p.style.position!==m&&(p.style.position=m),a.current=m;let x=0,C=0;switch(n){case "top":x=d.top-c.height-t,C=d.left,x<f.top&&d.bottom+c.height+t<=f.bottom&&(x=d.bottom+t);break;case "bottom":x=d.bottom+t,C=d.left,x+c.height>f.bottom&&d.top-c.height-t>=f.top&&(x=d.top-c.height-t);break;case "left":x=d.top,C=d.left-c.width-t,C<f.left&&d.right+c.width+t<=f.right&&(C=d.right+t);break;case "right":x=d.top,C=d.right+t,C+c.width>f.right&&d.left-c.width-t>=f.left&&(C=d.left-c.width-t);break}if(x=Math.max(f.top,Math.min(x,f.bottom-c.height)),C=Math.max(f.left,Math.min(C,f.right-c.width)),a.current==="fixed")p.style.top=`${x}px`,p.style.left=`${C}px`;else {let v;p.offsetParent?v=p.offsetParent.getBoundingClientRect():v={top:0,left:0};let w=x-v.top+window.scrollY,h=C-v.left+window.scrollX;p.style.top=`${w}px`,p.style.left=`${h}px`;}},[e,s,t,n,r]);return useEffect(()=>{let p=e.current;if(!p)return;let l=s?.current||p.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=new ResizeObserver(i);return c.observe(p),l&&c.observe(l),i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,true),()=>{c.disconnect(),l&&c.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,true);}},[e,n,t,r,s]),{postion:a.current,reposition:i}},Mt=vc;var wc=()=>{let e=useContext(Ie);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let o=(m,y)=>e.add({type:"toast",props:{...y,type:m}}),t=()=>e.clear("toast"),n=m=>e.remove(m),r=(m,y)=>e.update(m,y),s=m=>({id:m,update:y=>r(m,y),setType:y=>r(m,{type:y}),setProgress:y=>r(m,{progress:true,progressValue:y}),setBusy:y=>r(m,{busy:y}),success:()=>r(m,{type:"success"}),error:()=>r(m,{type:"error"}),warn:()=>r(m,{type:"warn"}),promise:()=>r(m,{type:"promise"}),default:()=>r(m,{type:"default"}),hide:()=>n(m)}),a=m=>s(o("default",m)),i=m=>s(o("success",m)),p=m=>s(o("error",m)),l=m=>s(o("warn",m)),c=m=>s(o("promise",m)),d=(m,y,R)=>{let x=o(m,{...y,sticky:y.sticky??false,actions:[{label:R?.label||"Ok",onClick:C=>{R?.onClick?.(C),n(x);}}]});return s(x)},f=(m,y,R,x)=>{let C=o(m,{...y,sticky:true,actions:[{label:R?.label||"Ok",onClick:v=>{R?.onClick?.(v),(R?.hide??false)===true&&n(C);}},{label:x?.label||"Cancel",onClick:v=>{x?.onClick?.(v),(x?.hide??true)===true&&n(C);}}]});return s(C)};return {show:a,hide:n,promise:c,clearAll:t,ok:(m,y)=>d("default",m,y),success:(m,y)=>y?d("success",m,y):i(m),error:(m,y)=>y?d("error",m,y):p(m),confirm:(m,y,R)=>f("default",m,y,R),warn:(m,y)=>y?d("warn",m,y):l(m),succes:(m,y)=>y?d("success",m,y):i(m)}},Cc=wc;var ts=({ref:e,style:o,...t})=>{let n=useRef(null),r=useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:i}=O(t,r);return jsx("div",{ref:e||n,style:{...s,...o||{}},className:a,...i})};ts.displayName="Zuz.Box";var u=ts;var rs=forwardRef((e,o)=>{let{title:t,message:n,...r}=e,[s,a]=useState(false);return jsxs(u,{className:"--accordion flex cols",...r,children:[jsxs(K,{onClick:i=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsx(_,{className:"--label flex",children:t}),jsx(u,{className:"--arrow flex",children:s?A.arrowUp:A.arrowDown})]}),s&&jsx(u,{className:"--detail",children:n})]})});rs.displayName="Zuz.Accordion";var Nc=rs;var Bc=({label:e,icon:o,onClick:t,idx:n,selected:r})=>jsx(K,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${r?"--selected":""} aic jcc rel`.trim(),children:typeof o=="string"?jsx(te,{name:o}):o}),ss=Bc;var as=forwardRef((e,o)=>{let{items:t,name:n,selected:r,position:s,...a}=e,i=useRef(null),[p,l]=useState(r||t[0].tag||0),c=useCallback(({x,y:C})=>{if(i.current){let v=i.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-v.left}`),document.documentElement.style.setProperty("--tip-y",`${C-v.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),d=useCallback(()=>{i.current&&(i.current.removeEventListener("pointerleave",d),i.current.removeEventListener("pointermove",c),document.documentElement.style.setProperty("--tip-s","0"));},[]),f=useCallback(()=>{i.current&&(i.current.addEventListener("pointerleave",d),i.current.addEventListener("pointermove",c));},[]);useEffect(()=>{i.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,C)=>C.label.length>x.length?C.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),i.current?.addEventListener("pointerenter",f));},[]);let{className:m,style:y,rest:R}=O(a);return jsxs(u,{ref:i,style:y,className:[`--actionbar flex aic ${m}`,`${!s||s==ve.Auto?"rel":`--${s}`}`].join(" ").trim(),...R,children:[t.map((x,C)=>jsx(ss,{selected:p===x.tag||r==C,...x,idx:C},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsx(u,{className:"--tip abs",children:jsx(u,{className:"--track flex aic",children:t.map(({label:x})=>jsx(u,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});as.displayName="Zuz.ActionBar";var Dc=as;var ls=forwardRef((e,o)=>{let{type:t,icon:n,title:r,message:s,iconSize:a,...i}=e,{className:p,style:l,rest:c}=O(i);return jsxs(u,{className:`--alert --${t||Le.Info} flex aic ${p}`.trim(),style:l,...c,children:[jsx(u,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&A[t||Le.Info]}),jsxs(u,{className:"--meta flex cols",children:[jsx(_,{className:`--title ${s?"--tm":""}`,children:r||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsx(_,{className:"--message",h:2,children:s})]})]})});ls.displayName="Zuz.Alert";var Ac=ls;var ms=({ref:e,...o})=>{let{variant:t,numeric:n,name:r,onConfirm:s,...a}=o,{style:i,className:p,rest:l}=O(a),{variant:c}=j(true),d=useRef(null),f=at(),m=r?f.errors?.[r]:null,y=r&&f.values&&f.setFieldValue,R=y?f.values?.[r]:void 0,x=useDebounce(v=>{y&&f.setFieldValue?.(r,v);},500),C=v=>{let w=v.currentTarget.value;n&&(w=w.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),v.currentTarget.value=w),x(w),o.onInput?.(v);};return useEffect(()=>{d.current&&r&&R!==void 0&&d.current.value!==String(R)&&(d.current.value=String(R));},[R,r]),useEffect(()=>()=>{y&&f.deleteFieldValue?.(r);},[]),jsx("input",{name:r,className:`--input --${t||c} ${m?"--has-error":""} --flex ${p}`.trim(),style:i,defaultValue:R??o.defaultValue??"",onInput:C,onKeyDown:v=>{v.key=="Enter"&&s?.(v.currentTarget.value);},ref:v=>{d.current=v,typeof e=="function"?e(v):e&&(e.current=v);},...l})};ms.displayName="Zuz.Input";var fe=ms;var us=e=>{let{meta:o,children:t}=e,n=useDelayed(),{label:r,icon:s,...a}=isValidElement(o)?{}:o,{className:i,style:p,rest:l}=O({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return isValidElement(o)?jsx("li",{style:p,className:i,children:o}):jsxs("li",{style:p,className:i,...l,children:[t,typeof o=="string"?o:r]})};us.displayName="Zuz.ListItem";var fs=us;var hs=forwardRef((e,o)=>{let{items:t,variant:n,direction:r,seperator:s,ol:a,virtual:i,...p}=e,l=useRef(null),c=useRef(null),{className:d,style:f,rest:m}=O(p),y=a==true?"ol":"ul",{visibleRange:R,scrollTop:x}=useMemo(()=>{if(!i||typeof window>"u")return {visibleRange:{start:0,end:t.length},scrollTop:0};i.itemHeight??50;i.overscan??5;i.height??400;return {visibleRange:{start:0,end:t.length},scrollTop:0}},[t.length,i]),C=useCallback(()=>{let{start:v,end:w}=R;return t.slice(v,w).map((S,g)=>{let b=v+g,I=t,L=`${typeof S=="string"?`li-${String(S)}`:isValidElement(S)?`li-${S.key}`||`${b}-${MD5(S.toString())}`:S.label}-${b}`;return jsxs(Fragment,{children:[jsx(fs,{meta:S}),s&&I[b+1]?jsx("li",{className:"--list-seperator",children:s},`spt-${b+1}-${L}`):null]},L)})},[R,t,s]);return useEffect(()=>{let v=l.current;if(!v)return;let w=()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{},100);};return v.addEventListener("scroll",w,{passive:true}),()=>{v.removeEventListener("scroll",w),c.current&&clearTimeout(c.current);}},[]),createElement(y,{className:`--list --${n||q.Small} flex ${r??"cols"} ${d}`.trim(),style:f,ref:v=>{l.current=v,typeof o=="function"?o(v):o&&(o.current=v);},...m,children:C()})});hs.displayName="Zuz.List";var _e=hs;var xs=forwardRef((e,o)=>{let{fx:t,action:n,data:r,withStyle:s,onChange:a,...i}=e,{className:p}=O({as:s||""}),{style:l}=O(i),[c,d]=useState(false),[f,m]=useState(r||[]),y=useRef(null),R=useRef(null),x=useRef(null),C=useMemo(()=>i.name||uuid(12),[]),[v,w]=useState(null),[h,S]=useState(null),[g,b]=useState([]),L=useDebounce(E=>{E.target.value==""?(d(false),m([])):n&&E.target.value.trim()!=""&&withPost(n,{query:E.target.value}).then(B=>{"items"in B&&_$1(B.items).isArray()?(m(B.items),S(E.target.value),b(B.items)):console.error("Action Response should contain items array"),w(null);}).catch(B=>{w(null),m([]);});},250),N=()=>{if(R.current){let E=R.current.getBoundingClientRect(),B=window.innerHeight-E.bottom,G=E.top;if(x.current){let X=x.current;B<X.offsetHeight&&G>B?(X.style.top="auto",X.style.bottom=`${E.height}px`,X.style.maxHeight=`${G-150}px`):(X.style.top=`${E.height+5}px`,X.style.bottom="auto",X.style.maxHeight=`${B-150}px`);}}},V=E=>{if(f.length>0){if((E.key==="ArrowDown"||E.key==="ArrowUp")&&(E.preventDefault(),E.stopPropagation()),E.key==="Escape")w(null),d(false),m([]);else if(E.key==="ArrowDown")w(B=>{let G=B===null||B===f.length-1?0:B+1;return D(G),G});else if(E.key==="ArrowUp")w(B=>{let G=B===null||B===0?f.length-1:B-1;return D(G),G});else if(E.key==="Enter"&&v!==null){let B=f[v];y.current&&(y.current.value=B,d(false),m([]));}}},k=E=>{y.current&&(y.current.value=E,d(false),m([]));},D=E=>{let B=f[E];if(B&&y.current&&(y.current.value=B,y.current.setSelectionRange(B.length,B.length)),x.current){let X=x.current.children[E];X&&X.scrollIntoView({block:"nearest"});}},F=E=>{R.current&&!R.current.contains(E.target)&&(d(false),m([]));},z=()=>{y.current&&y.current.value===h&&(m(g),w(null),N());};return useEffect(()=>(window.addEventListener("resize",N),window.addEventListener("scroll",N,true),document.addEventListener("mousedown",F),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,true),document.removeEventListener("mousedown",F);}),[]),useEffect(()=>{N();},[f]),jsxs(u,{style:l,ref:R,className:`--autocomplete --${e.size||q.Small} flex aic rel ${p}`.trim(),children:[jsx(fe,{ref:y,autoComplete:"off",onChange:L,onKeyDown:V,onFocus:z,...i}),jsx(u,{className:"--arrow rel flex aic jcc",children:f.length>0?A.arrowUp:A.arrowDown}),f.length>0&&jsx(_e,{id:C,ref:x,className:"--suggestion-list flex cols abs",items:f.map((E,B)=>({label:E,onClick:G=>{G.preventDefault(),G.stopPropagation(),k(E);},className:v===B?"--current":"",animate:{transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:clamp(.02*B,.02,.5)}}))})]})});xs.displayName="Zuz.AutoComplete";var im=xs;var bs=forwardRef((e,o)=>{let t=useRef(null),n=useMemo(()=>o&&typeof o!="function"&&o.current?o:t,[o]),{style:r,className:s,rest:a}=O(e,n);return !a.src||a.src==""?null:jsx("img",{ref:n,style:r,className:`${s} flex`,...a})});bs.displayName="Zuz.Image";var Dt=bs;var vs=forwardRef((e,o)=>{let{src:t,variant:n,type:r,crossOrigin:s,referrerPolicy:a,fx:i,as:p,alt:l,color:c,style:d,...f}=e,[m,y,R]=useImage(t??"",s,a),{className:x,style:C,rest:v}=O({fx:i,as:p});return jsx(u,{className:`--avatar --${n||q.Small} --${(r||Gr.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:c||"var(--avatar-bg, var(--primary))",...d,...C},...v,children:t?jsx(Dt,{src:m,crossOrigin:s,referrerPolicy:a,...f}):jsx(_,{className:"--avatar-label",children:(l?l.charAt(0):"A").toUpperCase()})})});vs.displayName="Zuz.Avatar";var yr=vs;var gm=({size:e=5,type:o="dead",label:t="",variant:n=q.Small,loading:r=false,spinner:s,...a})=>{let{style:i,className:p,rest:l}=O(a);return jsxs(u,{style:{..._$1(t).isEmpty()?{"--badge-size":e}:{},...i},as:`--badge --${n} --${o} rel flex aic jcc ${p}`.trim(),children:[jsx(u,{fx:{transition:Q.FadeIn,curve:oe.Liquid,duration:.5,when:r},as:"abs abc",children:jsx(Re,{type:s})}),_$1(t).isEmpty()?jsx(u,{as:`--dot --${o}`}):jsx(_,{as:"--label",children:t})]})},hm=gm;var Bm=[{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,o=e.getDay();return addDays(e,(6-o)%7||6)},getDateFormat:()=>{let e=new Date,o=e.getDay();return format(addDays(e,(6-o)%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)}],km=e=>{let o=new Set;return e.filter(t=>{if(t.label=="Later")return true;let n=t.getDate().toISOString().split("T")[0];return o.has(n)?false:(o.add(n),true)})},ws=forwardRef((e,o)=>{let{defaultValue:t,variant:n,onChange:r,...s}=e,{style:a,className:i,rest:p}=O(s),[l,c]=useState(t||new Date),d=startOfMonth(l),f=endOfMonth(l),m=startOfWeek(d),y=endOfWeek(f),R=useMemo(()=>eachDayOfInterval({start:m,end:y}),[m,y]),x=w=>{r?.(w),c(w);},C=()=>{c(w=>new Date(w.getFullYear(),w.getMonth()-1));},v=()=>{c(w=>new Date(w.getFullYear(),w.getMonth()+1));};return jsxs(u,{as:`--calendar flex --${n||"sm"} ${i}`,style:a,children:[jsx(u,{as:"--calendar-quick-select flex cols flex:1",children:km(Bm).map(w=>{let h=w.getDate();return jsxs(K,{onClick:()=>x(h),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(_,{as:"flex:1",children:w.label}),jsx(_,{as:"tar",children:w.getDateFormat()})]},`--dtp-option-label-${w.label}`)})}),jsxs(u,{as:"--calendar-selector flex cols flex:1",children:[jsxs(u,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(_,{as:"flex:1 --calendar-cm bold",children:format(l,"MMMM yyyy")}),jsx(K,{onClick:C,as:"--calendar-chevron",children:A.chevronUpOutline}),jsx(K,{onClick:v,as:"--calendar-chevron",children:A.chevronDownOutline})]}),jsxs(u,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(w=>jsx(_,{as:"--calendar-day",children:w},`--calendar-hd-${w}`)),R.map((w,h)=>{let S=isSameMonth(w,l),g=isSameDay(w,l),b=isToday(w);return jsx(K,{disabled:!S,onClick:()=>x(w),as:["--calendar-day --calendar-dd",`${g?"--calendar-dd-selected":""}`,`${b?"--calendar-dd-current":""}`],children:format(w,"d")},`--calendar-day-${h}-${w.getFullYear()}-${w.getMonth()}-${w.getDay()}`)})]})]})]})});ws.displayName="Zuz.Calendar";var xr=ws;var fo=(t=>(t.Table="table",t.Gooey="gooey",t))(fo||{});var Rs=({ref:e,...o})=>{let{itemCount:t,itemsPerPage:n,startPage:r,pageRange:s,paginationStyle:a,breakLabel:i,prevLabel:p,nextLabel:l,hash:c,loading:d,seperator:f,renderOnZeroPageCount:m,asDots:y,progressBar:R,onPageChange:x,...C}=o,v=useRef(null),w=useMemo(()=>toHash(numberInRange(4,8)),[]),h=useCallback(E=>`${toHash(E,c||6,w)}${f||""}${w}`,[w]),S=useMemo(()=>i||"...",[i]),g=useRef(null),[b,I]=useState({id:c?r?typeof r=="number"?h(r):r:1:r||1,label:r||1});useImperativeHandle(e,()=>({setPage:E=>I(E),getPage:E=>b,setProgress:E=>g.current?.setProgress?.(E),getProgress:()=>g.current?.getProgress?.()??0}),[g.current]);let{style:L,className:N,rest:V}=O(C),k=useCallback(E=>typeof E=="number"?E:+E.label,[]);if(!t)throw new Error('"itemCount" prop is required');let D=useMemo(()=>Math.ceil(t/n),[t,n]),F=useMemo(()=>{let E=[],B=Math.max(k(b)-(s||2),1),G=Math.min(k(b)+(s||2),D);B>1&&E.push({id:c?h(1):1,label:1}),B>2&&E.push({id:-1,label:S});for(let X=B;X<=G;X++)E.push({id:c?h(X):X,label:X});return G<D-1&&E.push({id:-1,label:S}),G<D&&E.push({id:c?h(D):D,label:D}),E},[b]),z=useCallback(E=>{let B=E;+B.label<1||+B.label>D||(I(B),x?.(B));},[t,n,b]);return F.length<=1&&(m??false)===false?null:jsxs(u,{ref:v,as:`--pagination ${y===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${N}`,children:[jsx(u,{as:"flex flex:1 aic --pgt-btns",children:(F.length>1?F:[{id:1,label:1},{id:-1,label:S}]).map((E,B,G)=>{let X=(typeof E=="string"?E:E.label)==k(b);return jsx(K,{disabled:E.id==-1||k(b)==+E.label,className:X?"--current-page":"",onClick:$=>z(E),children:y===true?R===true&&X?jsx(Lt,{ref:g}):"":typeof E=="string"?E:E.label},`--pg-${B}-${E.id}`)})}),jsx(u,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(k(b)-1)*n+1} - `,`${Math.min(k(b)*n,t)} of ${t} items`].join(" ")}),jsxs(u,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsx(K,{disabled:k(b)<=1,onClick:E=>z({id:c?h(k(b)-1):k(b)-1,label:k(b)-1}),children:A.chevronLeftOutline}),jsx(K,{disabled:F.length<=1||k(b)==k(F[F.length-1]),onClick:E=>z({id:c?h(k(b)+1):k(b)+1,label:k(b)+1}),children:A.chevronRightOutline})]})]})};Rs.displayName="Zuz.Pagination";var Ht=Rs;function $m(e,o){let{items:t,renderItem:n,effect:r="slide",loop:s=true,loopMode:a="infinite",startIndex:i=0,useKeys:p=true,useWheel:l=true,spacing:c=160,rotation:d=20,scaleStep:f=.15,blur:m=4,animation:y="power",showDots:R=false,autoPlay:x=false,autoPlaySpeed:C=3,onChange:v,...w}=e,{className:h,style:S}=O(w),g=useRef(null),b=C/(C>=1e3?1e3:1),I=useCarousel({total:t.length,initialIndex:i,loop:s,useKeys:p,useWheel:l,onChange:D=>{g.current?.setPage({id:D+1,label:D+1}),g.current?.setProgress(0),v?.(D);}}),{pause:L,resume:N,reset:V}=useTimer({duration:b,autoStart:x===true,onProgress:D=>{x===true&&g.current?.setProgress(1-D);},onExpired:()=>{x===true&&I.next(),V();}}),k={...S,"--carousel-spacing":`${c}px`,"--carousel-rotation":`${d}deg`,"--carousel-blur":`${m}px`,"--carousel-scale-step":f,"--active-index":I.index,"--carousel-transition":`var(--${y})`};return jsxs(u,{ref:o,className:`--carousel --effect-${r} --loop-${a} flex cols aic jcc ${h}`.trim(),style:k,children:[jsx(u,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((D,F)=>{let z=F-I.index;if(a==="infinite"){let B=t.length;z=((z+B/2)%B+B)%B-B/2;}let E=F===I.index;return jsx(u,{onMouseEnter:()=>E&&L(),onMouseLeave:()=>E&&N(),className:`--carousel-item-wrapper abs ${E?"--is-active":""}`,style:{"--offset":z,zIndex:E?100:100-Math.abs(z),display:Math.abs(z)>5?"none":"flex"},children:n(D,F,I.index)},F)})}),R&&jsx(Ht,{ref:g,itemCount:t.length,itemsPerPage:1,startPage:i+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:D=>I.goTo(+D.label-1),asDots:true,progressBar:true})]})}var Fm=forwardRef($m),zm=Fm;var Is=(o=>(o.Line="line",o))(Is||{});var Bs=forwardRef((e,o)=>{let{data:t,width:n,height:r,lineColor:s,strokeWidth:a=2,gradientStartColor:i,gradientEndColor:p,animated:l,animDuration:c=2,animDelay:d=0,padding:f=0,type:m,...y}=e,{className:R,style:x,rest:C}=O(y),v=useRef(null),w=useResizeObserver(v.current?.parentElement||v),h=typeof n=="number"?n:w.width,S=typeof r=="number"?r:w.height,g={width:h,height:S},b=useId(),{pathD:I,areaPathD:L}=useLineChart(t,g,f+(a||2)),N=useRef(null),V=useRef(null),[k,D]=useState(0),[F,z]=useState(0);return useEffect(()=>{l&&(N.current&&D(N.current.getTotalLength()),V.current&&z(V.current.getTotalLength()));},[l,I,L,h,S]),jsx(u,{ref:v,as:`--chart --${m||"line"}-chart ${R}`.trim(),style:{...x,width:n,height:r},...C,children:h>0&&S>0&&jsxs("svg",{viewBox:`0 0 ${h} ${S}`,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:i}),jsx("stop",{offset:"100%",stopColor:p})]})}),jsx("path",{ref:V,d:L,fill:`url(#${b})`,stroke:"none",style:l?{strokeDasharray:F,strokeDashoffset:F}:{},children:l&&jsx("animate",{attributeName:"stroke-dashoffset",from:F,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})}),jsx("path",{ref:N,d:I,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:l?{strokeDasharray:k,strokeDashoffset:k}:{},children:l&&jsx("animate",{attributeName:"stroke-dashoffset",from:k,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})})]})})});Bs.displayName="Zuz.Chart";var qm=Bs;var ks=(r=>(r[r.Sending=0]="Sending",r[r.Sent=1]="Sent",r[r.Delivered=2]="Delivered",r[r.Read=3]="Read",r))(ks||{}),Xm=(l=>(l.Image="img",l.Video="vid",l.Audio="audio",l.Link="link",l.Document="doc",l.Location="loc",l.Contact="contact",l.Event="event",l.Poll="poll",l))(Xm||{}),Ym=(s=>(s.File="file",s.Image="image",s.Video="video",s.Audio="audio",s.Link="link",s))(Ym||{});var Ls=memo(({ref:e,...o})=>{let{sender:t,text:n,media:r,side:s="me",stylePreset:a="default",status:i=1,timeStamp:p=Date.now(),arrow:l=true,attachments:c,autoFetchLinkPreview:d=false,linkPreviewFetcher:f,replyTo:m,reactions:y,forwarded:R,...x}=o,{className:C,style:v,rest:w}=O(x);return jsxs(de,{gap:8,as:`--bubble-wrapper --bw-${s}`.trim(),ref:e,children:[t&&jsx(yr,{alt:t.name,src:t.picture,style:{backgroundColor:t.color}}),jsxs(de,{cols:true,ref:e,className:["--bubble --bubble-enter rel",r?`--with-media --bma-${r.type}`:"",`--bubble-${s}`,`--bubble-style-${a}`,l?"":"--bubble-grouped",l===true?"--b-arrow":"",C].filter(Boolean).join(" ").trim(),style:{...v,contain:"layout style paint"},...w,children:[t&&jsx(_,{className:"--bubble-name",children:t.name}),n&&jsx(_,{className:"--bubble-text",children:n}),jsxs(de,{aie:true,jce:true,as:"--bubble-stats",children:[jsx(_,{className:"--bubble-stamp tar",children:timeSince(p)}),s==="me"&&jsx(ie,{className:`--bubble-status --bs-${i}`,children:i===0?A.pending:i===1?A.done:i===2?A.doneAll:A.doneAll})]})]})]})},(e,o)=>e.text===o.text&&e.side===o.side&&e.status===o.status&&e.timeStamp===o.timeStamp&&e.stylePreset===o.stylePreset&&e.media===o.media&&e.attachments===o.attachments&&e.reactions===o.reactions);Ls.displayName="Zuz.Bubble";var Cr=Ls;var ep={today:"Today",yesterday:"Yesterday"},Os=memo(({messages:e,autoScroll:o=true,onScrollTop:t,typing:n,dateLabels:r,locale:s,formatDateLabel:a})=>{let i=useRef(null),p=useRef(null),l=useRef(null),c=useRef(false),d=useRef(false),[f,m]=useState(0),[y,R]=useState(false),x=useRef(e.length),C=useMemo(()=>({...ep,...r||{}}),[r]),v=useCallback(()=>i.current?.querySelector(".--scroll-content"),[]),w=useCallback(I=>{let L=I||Date.now(),N=new Date(L),V=new Date,k=new Date(V.getFullYear(),V.getMonth(),V.getDate()),D=new Date(N.getFullYear(),N.getMonth(),N.getDate()),F=Math.floor((k.getTime()-D.getTime())/864e5),z=`${N.getFullYear()}-${N.getMonth()+1}-${N.getDate()}`,E=C,B=a?a(L,{date:N,dayDiff:F,locale:s,labels:E}):F===0?E.today:F===1?E.yesterday:N.toLocaleDateString(s);return {key:z,label:B}},[a,s,C]),h=useMemo(()=>e.flatMap((I,L)=>{let N=e[L-1],V=w(I.timeStamp),k=N?w(N.timeStamp):null,D=L===0||V.key!==k?.key,F=L===0||N?.side!==I.side||V.key!==k?.key,z=[];return D&&z.push(jsx(u,{as:"flex aic jcc p:8,0",children:jsx(_,{as:"s:xs dim-50",children:V.label})},`date-${V.key}-${L}`)),z.push(jsx(Cr,{...I,arrow:I.arrow??F},I.id||L)),z}),[e,w]),S=useMemo(()=>n?[...h,jsx(u,{as:"flex jcs p:4,8",children:jsxs(u,{as:"--bubble --bubble-you --typing-indicator rel flex cols",children:[jsx(_,{as:"s:xs dim-75",children:typeof n=="string"?n:"Typing"}),jsxs(u,{as:"flex aic gap:4",children:[jsx(ie,{className:"--typing-dot"}),jsx(ie,{className:"--typing-dot"}),jsx(ie,{className:"--typing-dot"})]})]})},"typing-row")]:h,[h,n]);useEffect(()=>{let I=v();if(!I||!o)return;let L=e.length-x.current;L>0&&(x.current=e.length,c.current?(m(N=>N+L),R(true)):(requestAnimationFrame(()=>{I.scrollTop=I.scrollHeight;}),m(0),R(false)));},[e,o,v]);let g=useCallback(()=>{let I=v();if(!I)return;let L=I.scrollHeight-I.scrollTop-I.clientHeight<100,N=I.scrollTop<50;c.current=!L,R(!L),L&&(m(0),R(false)),N?d.current||(d.current=true,t?.()):d.current=false,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{c.current=false;},500);},[t,v]);useEffect(()=>{let I=v();if(I)return I.addEventListener("scroll",g,{passive:true}),()=>I.removeEventListener("scroll",g)},[g,v]);let b=useCallback(()=>{let I=v();I&&(I.scrollTop=I.scrollHeight,m(0),R(false));},[v]);return useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]),jsxs(u,{ref:i,as:"rel flex cols",style:{height:"100%",contain:"layout style paint"},children:[jsx(Bt,{as:"h:full",smooth:true,children:jsx(_e,{ref:p,items:S})}),y&&f>0&&jsx(u,{as:"abs bottom:0 left:0 right:0 flex aic jcc",style:{padding:"12px",background:"linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%)"},children:jsx(K,{onClick:b,style:{padding:"8px 16px",borderRadius:"20px",fontSize:"12px"},children:jsxs(_,{children:[f," new message",f!==1?"s":""]})})})]})},(e,o)=>e.messages.length===o.messages.length&&e.autoScroll===o.autoScroll&&e.onScrollTop===o.onScrollTop&&e.typing===o.typing&&e.locale===o.locale&&e.formatDateLabel===o.formatDateLabel&&e.dateLabels?.today===o.dateLabels?.today&&e.dateLabels?.yesterday===o.dateLabels?.yesterday);Os.displayName="Zuz.ChatList";var tp=Os;var Ds=forwardRef((e,o)=>{let{style:t,className:n,rest:r}=O(e);return jsx("label",{ref:o,style:t,className:n,...r})});Ds.displayName="Zuz.Label";var $t=Ds;var Hs=({ref:e,...o})=>{let {name:t,required:n,type:r,value:s,size:a,variant:i,checked:p,disabled:l,onSwitch:c,...d}=o,f=at(),m=!!(t&&f.values);m?f.errors?.[t]:null;let R=m?f.values?.[t]:void 0,[x,C]=useState(p||false),v=useRef(null),{variant:w}=j(true),h=useMemo(()=>m&&R!=null?typeof R=="string"?R.toLowerCase()!=="false"&&R!=="":!!R:x,[R,x,m]);useEffect(()=>{v.current&&v.current.checked!==h&&(v.current.checked=h);},[h]),useEffect(()=>{p!==void 0&&C(p);},[p]);let S=g=>{let b=!!g;m&&f.setFieldValue?.(t,b),C(b),c?.(b,s||"cb");};return useImperativeHandle(e,()=>({setChecked(g,b=true){S(g);},toggle(g=true){S(!h);}})),jsxs($t,{"aria-hidden":l,className:[`--${(r||Ke.Default).toLowerCase()}`,`${!r||r===Ke.Default?"--checkbox":"--switch"}`,`--${i||w||q.Small}`,`flex aic jcc ${h?"is-checked":""} rel`,`${l?"--disabled":""}`].join(" ").trim(),...d,children:[(!r||r==Ke.Default)&&A.check,jsx(fe,{ref:g=>{v.current=g,e&&(e.current=g);},defaultChecked:h,type:"checkbox",className:"abs",name:t,required:n||false,onChange:g=>{g.stopPropagation(),S(g.target.checked);},disabled:l})]})};Hs.displayName="Zuz.CheckBox";var Ft=Hs;var up=({ref:e,...o})=>{let{code:t,copy:n,lang:r="tsx",showLines:s=false,highlight:a="",as:i,fx:p,...l}=o,c=useRef(null),{className:d,style:f,rest:m}=O({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${i}`,fx:p},c),y=useMemo(()=>{let x=new Set;return a.split(",").forEach(C=>{if(C.includes("-")){let[v,w]=C.split("-").map(Number);for(let h=v;h<=w;h++)x.add(h);}else C&&x.add(Number(C));}),x},[a]),R=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 C=x[0]?.match(/^\s*/)?.[0].length||0,v=x.map(h=>{let S=h.match(/^\s*/)?.[0].length||0,g=Math.min(S,C);return h.slice(g)}),w=[{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 v.map((h,S)=>{let g=h.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),b=y.has(S+1);if(r!="plain"){let I=[];w.forEach(L=>{g=g.replace(L.re,N=>{let V=`ZUZ_ID_${I.length}_ZUZ`;return I.push(`<span class="--token-${L.name}">${N}</span>`),V});});for(let L=I.length-1;L>=0;L--)g=g.replace(`ZUZ_ID_${L}_ZUZ`,I[L]);}return `<div class="--code-line ${s==true?"--with-ln":""} ${b?"--is-highlighted":""}">
10
+ ${s==true?`<span class="--line-number">${S+1}</span>`:""}
11
11
  <span class="--line-content">${g||" "}</span>
12
- </div>`}).join("")},[t,y]);return jsxs(f,{as:`--code-block rel ${d}`,style:u,...l,children:[jsx("pre",{ref:e,children:jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:R}})}),n&&jsx(K,{as:"--copy-code abs",onClick:()=>{copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},up=pp;var As=({onSelect:e,meta:o,selected:t,disabled:n=false})=>{let r=useRef(null),{index:s,icon:a,label:i}=o,[p,l]=useState({x:0,width:0}),c=useDelayed();return useLayoutEffect(()=>{if(c&&r.current){let{width:d,x:u}=r.current.getBoundingClientRect();l({x:u,width:d}),t&&e(s,d,u,o,true);}},[c,r.current]),useEffect(()=>{t&&e(s,p.width,p.x,o,false);},[t]),jsxs(K,{disabled:n,onClick:()=>e(s,p.width,p.x,o,false),ref:r,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsx(te,{name:a,as:"--segment-icon"}):jsx(f,{as:"--segment-icon flex aic jcc",children:a}):null,i&&String(i).trim()!=""&&jsx(f,{className:"--segment-label",children:i||`Item ${s}`})]})};As.displayName="SelectTabItem";var $s=As;var zs=forwardRef((e,o)=>{let{fx:t,items:n,selected:r,variant:s,disabled:a=false,onSwitch:i,...p}=e,[l,c]=useState(r||0),d=useDelayed(50),u=useRef(l),{className:m,style:y,rest:R}=O(p),x=useRef(null),C=useRef(null),{variant:v}=j(true),S=(h,w,g,b,I)=>{if((I||l!=h&&l!=-2)&&(c(h),u.current=l,queueMicrotask(()=>{d&&i?.(b);})),x.current){let B=C.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${w}px`),x.current.style.setProperty("--x",`${B?g-B.left:g}px`);}};return useImperativeHandle(o,()=>({setSelected:h=>{typeof h=="number"&&h!=l&&c(h);}}),[l]),jsxs(f,{ref:C,"data-selected":l,className:`${m} --segmented --${s||v||q.Medium} flex aic rel`,style:y,...R,children:[jsx(f,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((h,w)=>jsx($s,{disabled:a,onSelect:S,selected:l==w,meta:{...h,index:w}},`segment-${h.label}-${w}`))]})});zs.displayName="Zuz.SelectTabs";var zt=zs;var Ks=forwardRef((e,o)=>{let{type:t,variant:n,...r}=e,s=useDelayed(),{colorScheme:a,setColorScheme:i}=Fo(),p=useCallback(()=>{i(a=="dark"?"light":a=="light"?"system":"dark");},[a]),{variant:l}=j(true),{className:c,style:d}=O(r),u=useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:A.colorSchemeLight},{tag:"system",index:1,label:"",icon:A.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:A.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:A.colorSchemeLight},{tag:"dark",index:2,label:"",icon:A.colorSchemeDark}],[]),m=useMemo(()=>["light","system","dark"].indexOf(a),[a]);return !s||m==-1?null:t=="system"||t=="switch"?jsx(zt,{className:`--color-scheme --${t}`,onSwitch:({tag:y})=>{i(y);},selected:m,items:u,...r}):jsx(K,{onClick:p,style:d,variant:n,as:`--color-scheme-switch ${c}`.trim(),children:a=="system"?A.colorSchemeSystem:a=="light"?A.colorSchemeLight:A.colorSchemeDark})});Ks.displayName="Zuz.ColorScheme";var Ep=Ks;var Gs=forwardRef((e,o)=>{let[t,n]=useState("wait"),{title:r,message:s,acceptLabel:a,rejectLabel:i,position:p}=e,l=async c=>{n(c==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(c));};return useEffect(()=>{let c=localStorage.getItem("--ccnt");n(c?c=="1"?"accepted":"rejected":"pending");},[]),jsxs(f,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:oe.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${p||ve.Left} flex cols`,children:[jsx(z,{as:"--title",children:r||"This site uses cookies"}),jsx(z,{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(f,{as:"--footer flex aic",children:[jsx(K,{onClick:c=>l(1),as:"--accept",children:a||"Accept All"}),jsx(K,{onClick:c=>l(0),as:"--reject",children:i||"Cancel"})]})]})});Gs.displayName="Zuz.CookiesConsent";var Lp=Gs;var Us=({ref:e,...o})=>{let {type:t,value:n=0,min:r=0,max:s=1,step:a=.01,onChange:i,showGhostBar:p,showKnobOnHover:l,showToolTip:c,roundValue:d,formatValue:u,...m}=o,{className:y,style:R,rest:x}=O(m),C=useRef(a||.01).current,v=useRef(r||0).current,S=useRef(s||1).current,h=useRef(n||0).current,w=useRef(null),g=useRef(null),b=useRef(null),I=useRef(null);useRef(null);let E=useRef(null),V=useRef(null),k=useRef(null),D=useRef(null),$=(se,ne,he)=>(se-ne)/(he-ne)*100,_=se=>{if(g.current){let ne=parseFloat(se.currentTarget.value);re(ne);let he=$(ne,parseFloat(se.currentTarget.min),parseFloat(se.currentTarget.max));g.current.style.setProperty("--value",`${he}`),g.current.setAttribute("data-value",`${ne}`),i&&i(d?+ne.toFixed(2):ne);}},[N,L]=useState(false),[U,X]=useState(0),[F,Z]=useState(0),[G,W]=useState(false),re=async se=>{let ne=u?u(+se):d?(+se).toFixed(2):Math.round(+se);k.current&&(k.current.textContent=String(ne));},ce=se=>{if(N){let ne=se.clientX-U,he=S-v,Te=ne/200*he,ye=Math.max(v,Math.min(F+Te,S));if(ye=Math.round(ye/C)*C,re(ye),g.current){let Oe=$(ye,v,S);g.current.style.setProperty("--value",`${Oe}`),g.current.setAttribute("data-value",`${ye}`),V.current&&(V.current.textContent=d?ye.toFixed(2):ye.toString()),i&&i(ye);}}},me=()=>{L(false),document.body.style.cursor="auto";},Ce=se=>(se-v)/(S-v)*100,le=se=>{if(!g.current)return;let ne=g.current.getBoundingClientRect(),he=se.clientX-ne.left,Ae=Math.max(0,Math.min(100,he/ne.width*100));if(c&&k.current){let Te=w.current?+w.current.value:n;re(Te*100);}if(p){let Te=Ce(w.current?+w.current.value:n),ye=Math.min(Te,Ae),Oe=Math.abs(Ae-Te);g.current.style.setProperty("--ghost-start",`${ye}`),g.current.style.setProperty("--ghost-width",`${Oe}`);}};useEffect(()=>{g.current&&g.current.style.setProperty("--value",w.current?`${$(parseFloat(w.current.value),parseFloat(w.current.min),parseFloat(w.current.max))}`:h.toString());},[]),useEffect(()=>(N?(document.addEventListener("mousemove",ce),document.addEventListener("mouseup",me)):(document.removeEventListener("mousemove",ce),document.removeEventListener("mouseup",me)),()=>{document.removeEventListener("mousemove",ce),document.removeEventListener("mouseup",me);}),[N]),useEffect(()=>{let se=$(n,v,S);g.current?.style.setProperty("--value",`${se}`),re(n);},[n,v,S,k.current]);let Y=()=>jsxs(f,{ref:g,onMouseEnter:()=>W(true),onMouseLeave:()=>W(false),onMouseMove:le,className:`--slider --${t||Mo.Default} ${l?"--knob-hover":""} flex rel ${y}`.trim(),style:{...R},children:[jsx(f,{ref:E,className:"--slider-track abs fill"}),p&&jsx(f,{ref:I,className:"--slider-ghost abs fill"}),jsx(f,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsx(f,{ref:b,className:"--slider-knob --tooltip-knob abs"}),jsx(fe,{ref:w,onInput:_,className:"abs fill",tabIndex:0,type:t||Mo.Default,defaultValue:h||0,step:C,max:S,min:v})]});if(c===true){let se=u?u(n):d?n.toFixed(2):n;return jsx(Pt,{ref:D,show:N,position:vt.Top,margin:15,anchorName:"--tooltip-knob",title:jsx(ie,{ref:k,children:se}),children:Y()})}return Y()};Us.displayName="Zuz.Slider";var mt=Us;var Xs=forwardRef((e,o)=>{let{src:t,shape:n,size:r,...s}=e,{style:a,className:i,rest:p}=O(s),{canvasRef:l,crop:c,setScale:d,handleMouseDown:u,handleMouseUp:m,handleMouseMove:y}=useImageCropper(t,r||200,n||CropShape.Circle);return useImperativeHandle(o,()=>({getCropped(){return c()},setScale(R){d(R);}})),jsxs(f,{as:`--cropper --${n||CropShape.Circle} ${i}`,style:a,...p,children:[jsx("canvas",{ref:l,width:r||200,height:r||200,onMouseDown:u,onMouseUp:m,onMouseLeave:m,onMouseMove:y}),jsx(f,{as:"--cropper-slider",children:jsx(mt,{onChange:R=>d(R),min:0,max:1,step:.01,value:1})})]})});Xs.displayName="Zuz.Cropper";var Hp=Xs;var $p=(t=>(t.Circle="circle",t.Square="square",t))($p||{});var js=forwardRef((e,o)=>{let{items:t,maxItems:n}=e,r=useMemo(()=>{let i=typeof t=="string",p=i?[]:t;return i&&t.split(",").forEach(l=>{p.push({label:l});}),p},[t]),a=useMemo(()=>n&&n>0&&r.length>n-1,[r,n])?[...r.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...r.slice(-n)]:r;return jsx(_e,{ref:o,className:"--crumb flex aic",direction:"rows",seperator:jsx(f,{as:"--crumb-chevron",children:A.chevronRightOutline}),items:a.map((i,p,l)=>i.ID=="."?jsx(f,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsx(f,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${p}`))}):jsxs(K,{onClick:()=>i.action?.(),className:"--crumb-item",disabled:!l[p+1],children:[i.icon&&jsx(te,{as:"--crumb-icon",name:i.icon}),jsx(z,{as:"--crumb-label",children:i.label})]},`${i.label.replace(/\s+/g,"-").toLowerCase()}-${p}`))})});js.displayName="Zuz.Crumb";var zp=js;var ea=forwardRef((e,o)=>{let{icon:t,defaultValue:n,value:r,size:s,variant:a,numeric:i,type:p,onConfirm:l,...c}=e,[d,u]=useState(false),[m,y]=useState(n||null),{style:R,className:x,rest:C}=O(c),v=useRef(null),S=useRef(null),{reposition:h}=Mt(S,{direction:ve.Bottom,offset:2}),w=b=>{i&&(b.currentTarget.value=b.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};useEffect(()=>{let b=I=>{let B=I.target,E=v.current?.contains(B),V=S.current?.contains(B);!E&&!V&&u(false);};return d&&document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b);}},[d]),useEffect(()=>{let b=I=>{I.key==="Escape"&&d&&(u(false),v.current?.focus());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let g=()=>{u(true);};return useEffect(()=>{d&&h();},[d,h]),jsx(Fragment$1,{children:jsxs(f,{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(ie,{as:"--date-picker-icon flex aic jcc",children:A.calendar}),jsx("input",{ref:v,value:m?format(m,"EEE, MMM d YYY hh:mm a"):r||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:R,onFocus:g,onInput:w,autoComplete:"new-password",onKeyDown:b=>{b.key=="Enter"&&l?.(b.currentTarget.value);},...C}),jsx(f,{"aria-hidden":!d,ref:S,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(xr,{defaultValue:m,onChange:b=>{y(b),u(false);}})})]})})});ea.displayName="Zuz.DatePicker";var Wp=ea;var ta=forwardRef((e,o)=>{let{icon:t,variant:n,position:r}=e;return jsx(K,{className:`--fab fixed --${n||q.Large} --${r||"bottomright"}`,children:t||A.plus})});ta.displayName="Zuz.Fab";var Xp=ta;var jp=({ref:e,children:o,...t})=>{let{legend:n,legendPlacement:r,variant:s,...a}=t,{variant:i}=j(true),{className:p,style:l,rest:c}=O(a);return jsxs(f,{as:`--fieldset --rel --flex --${s||i||q.Medium} ${p}`.trim(),style:l,children:[jsx(f,{as:`--legend --abs --${r||"top-start"}`,children:n&&typeof n=="string"?jsx("legend",{children:n}):n}),o]})},Qp=jp;var ra=e=>{let{names:o,strength:t}=e,n={[qt.Gooey]:r=>jsxs("filter",{id:"gooey",children:[jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:r||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-${qt.Gooey}`)};return useEffect(()=>{},[o]),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsx("defs",{children:(o||[qt.Gooey]).map(r=>n[r](t))})})};ra.displayName="Zuz.Filters";var tu=ra;var na=e=>typeof e=="number"?`repeat(${e}, 1fr)`:e,ru=e=>e==="between"?"space-between":e==="around"?"space-around":e,sa=e=>{let{ref:o,cols:t,rows:n,columns:r,gap:s,gapX:a,gapY:i,columnGap:p,rowGap:l,align:c,alignItems:d,justify:u,justifyContent:m,inline:y,flow:R,autoFlow:x,autoCols:C,autoRows:v,autoColumns:S,autoRow:h,template:w,areas:g,...b}=e,{className:I,style:B,rest:E}=O(b),V=r??t,k=p??a??s,D=l??i??s,$=d??c,_=m??u,N=x??R,L=S??C,U=h??v,X=g??w,F={...y?{display:"inline-grid"}:{},gridTemplateColumns:na(V),gridTemplateRows:na(n),columnGap:k,rowGap:D,alignItems:$,justifyContent:ru(_),gridAutoFlow:N,gridAutoColumns:L,gridAutoRows:U,gridTemplateAreas:X,...B};return jsx(f,{ref:o,className:["--grid",I].filter(Boolean).join(" "),style:F,...E})};sa.displayName="Zuz.Grid";var nu=sa;var aa=e=>typeof e=="string"&&e.includes("+"),ia={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"},la={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 ma=forwardRef(({children:e,keys:o,as:t,className:n,variant:r},s)=>{let{variant:a}=j(true),i=useMemo(()=>{if(aa(o)){let p=null;return {keys:String(o).split("+").reduce((c,d,u,m)=>(m[u+1]?c.push(d):p=d.toUpperCase(),c),[]),children:p}}return {keys:o,children:String(e).toUpperCase()}},[o]);return jsxs(f,{as:`--keyboard-keys --${r||a||q.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(i.keys)?i.keys:[i.keys]).map(p=>jsx("abbr",{title:la[p],children:ia[p]},p)),jsx(ie,{children:i?.children??e})]})});ma.displayName="Zuz.KeyboardKeys";var Lr=ma;var fa=createContext(null),ft=()=>{let e=useContext(fa);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},uu=({ref:e,icons:o,children:t,...n})=>{let{playlist:r=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:i="No Track",defaultCover:p,onTrackChange:l,...c}=n,{className:d,style:u,rest:m}=O(c),y=useMediaPlayer(r,r[0]??void 0),R=useMemo(()=>({play:A.play,pause:A.pause,prev:A.prev,next:A.next,volumeHigh:A.volumeHigh,volumeMute:A.volumeMute,...o}),[o]),x=useMemo(()=>({...y,mode:s,icons:R}),[y,R]);return jsx(fa.Provider,{value:x,children:jsx(f,{className:`--zuz-media-player ${d}`,style:u,children:t})})},da=uu;var ga=e=>{if(!e||isNaN(e))return "0:00";let o=Math.floor(e/60),t=Math.floor(e%60);return `${o}:${t.toString().padStart(2,"0")}`},vo=e=>typeof e=="string"?jsx(te,{name:e}):e,ha=()=>{let{mediaRef:e,state:o,controls:t,mode:n}=ft();return jsxs(f,{as:`--mediaplayer-stage rel --mode-${n}`,children:[n==="video"?jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsx("audio",{ref:e}),o.isLoading&&jsx(f,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsx(Re,{})})]})},ya=()=>{let{state:e,defaultArtist:o,defaultTitle:t,defaultCover:n}=ft();return jsxs(f,{as:"--track-info flex aic",children:[jsx(Dt,{src:e.currentItem?.cover||n||"",as:"--track-cover"}),jsxs(f,{as:"flex cols",children:[jsx(f,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsx(f,{as:"--track-artist",children:e.currentItem?.artist||o||"..."})]})]})},xa=()=>{let{state:e,controls:o,icons:t}=ft();return jsxs(f,{as:"--mediaplayer-controls flex aic",children:[jsx(K,{onClick:o.prev,as:"--prev",children:vo(t?.prev??A.prev)}),jsx(K,{onClick:o.togglePlay,as:"--play-pause",children:vo(e.isPlaying?t?.pause??A.pause:t?.play??A.play)}),jsx(K,{onClick:o.next,as:"--next",children:vo(t?.next??A.next)})]})},ba=()=>{let{state:e,controls:o,mediaRef:t}=ft(),n=e.progress*(e.duration||0);return jsxs(f,{as:"--track-progress flex aic",children:[jsx(f,{as:"--track-current-duration",children:ga(n)}),jsx(mt,{value:e.progress,onClick:r=>{let s=r.currentTarget.getBoundingClientRect(),a=(r.clientX-s.left)/s.width;o.seek(a);}}),jsx(f,{as:"--track-total-duration",children:ga(e.duration)})]})},va=()=>{let{state:e,controls:o,icons:t}=ft();return jsxs(f,{as:"--volume-control flex aic gap:8 w:120",children:[jsx(K,{onClick:()=>o.setIsMuted(),children:vo(e.isMuted?t?.volumeMute??A.volumeMute:t?.volumeHigh??A.volumeHigh)}),jsx(mt,{value:e.volume,className:"h:3 flex:1",onClick:n=>{let r=n.currentTarget.getBoundingClientRect();o.setVolume((n.clientX-r.left)/r.width);}})]})};var fu=Object.assign(da,{Stage:ha,TrackInfo:ya,Controls:xa,Progress:ba,Volume:va}),du=fu;var wa=forwardRef((e,o)=>{let t=useNetworkStatus(),{onlineMessage:n,offlineMessage:r,variant:s}=e;return jsxs(f,{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(f,{className:"--ico",children:t?A[Le.Success]:A[Le.Error]}),jsx(z,{as:"--message",children:t?n||"internet connection restored :)":r||"no internet connection"})]})});wa.displayName="Zuz.NetWorkManager";var yu=wa;var Ta=forwardRef((e,o)=>{let{strenthMeter:t,onChange:n,...r}=e;"type"in r&&delete r.type;let{style:s,className:a,rest:i}=O(r),[p,l]=useState(false),[c,d]=useState(""),u=useMemo(()=>checkPasswordStrength(c),[c]),m=useDebounce(y=>{t&&d(y.target.value),n&&n(y);},100);return useEffect(()=>{},[]),jsxs(f,{as:"w:100% flex cols",children:[jsxs(f,{style:s,className:"--password flex aic rel",children:[jsx(fe,{ref:o,type:p?"text":"password",className:a,onChange:m,...i}),jsx(K,{tabIndex:-1,onClick:()=>l(y=>!y),className:"--toggle flex aic jcc abs",children:p?A.eye:A.eyeSlash})]}),t&&jsxs(f,{as:`flex aic --password-meter --pb-score-${u.score}`,style:s,children:[jsxs(f,{as:"--password-bars flex aic",children:[jsx(f,{as:`--pbar ${u.score>=1?"--pb-on":""}`.trim()}),jsx(f,{as:`--pbar ${u.score>=2?"--pb-on":""}`.trim()}),jsx(f,{as:`--pbar ${u.score>=3?"--pb-on":""}`.trim()}),jsx(f,{as:`--pbar ${u.score>=4?"--pb-on":""}`.trim()}),jsx(f,{as:`--pbar ${u.score>=5?"--pb-on":""}`.trim()})]}),jsx(z,{as:"--password-meter-label","aria-hidden":true,children:u.result})]})]})});Ta.displayName="Zuz.Password";var Tu=Ta;var Ra=forwardRef((e,o)=>{let{size:t,length:n,mask:r,...s}=e,a=useRef([]),i="pinput",p=false,l={};"with"in s&&(l={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(i=s.name,delete s.name),"required"in s&&(p=true,delete s.required);let{style:c}=O(s),d=m=>{let y=m.currentTarget,R=a.current[parseInt(y.dataset.index)+1],x=a.current[parseInt(y.dataset.index)-1];y.value.length===1&&R?R.focus():y.value.length===0&&x&&x.focus();},{variant:u}=j(true);return useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsx(f,{name:i,style:c,className:`--otp --${s.variant??u??q.Medium} flex aic rel`,"data-required":p,"data-size":t||n||4,...l,children:Array(t||n||4).fill(1).map((m,y)=>jsx(fe,{autoComplete:"new-password","data-index":y,ref:R=>{a.current[y]=R;},numeric:true,onChange:d,maxLength:1,placeholder:r?"\xB7":"0",type:r?"password":"text",...s},`pin-${y}`))})});Ra.displayName="Zuz.PinInput";var Eu=Ra;var Ia=forwardRef((e,o)=>{let{children:t,className:n,name:r,required:s,type:a,value:i,variant:p,checked:l,onSwitch:c,...d}=e,[u,m]=useState(l||false),{variant:y}=j(true),R=useRef(null);return jsxs($t,{className:`${n} --${(a||Oo.Default).toLowerCase()} --radio${!a||a==Oo.Default?"":"card"} --${p||y||q.Small} flex aic rel`.trim(),...d,children:[jsx(fe,{ref:R,defaultChecked:u,value:i||"rd",type:"radio",className:"abs",name:r,required:s||false,onChange:x=>{c&&c(x.target.checked,i||"cb"),m(x.target.checked);}}),jsx(f,{className:"--dot rel",children:jsx(f,{className:"--rod abs abc"})}),jsx(f,{className:"--value",children:t})]})});Ia.displayName="Zuz.Radio";var Lu=Ia;var Ea=forwardRef((e,o)=>{let{fx:t,withStyle:n,as:r,reverse:s=false,searchIcon:a=A.search,hideSearchIcon:i=false,clearIcon:p=A.close,hideClearIcon:l=false,onChange:c,onClear:d,...u}=e,{style:m,className:y}=O({as:e.as}),[R,x]=useState(""),{variant:C}=j(true),v=useRef(null);"type"in e&&delete e.type;let S=g=>{x(g.target.value),c?.(g.target.value);},h=g=>{R.trim()!==""&&(x(""),c?.(""),v.current&&(v.current.value="",e.onConfirm?.("")));};useImperativeHandle(o,()=>({focus:()=>v.current?.focus(),value:()=>v.current?.value})),useEffect(()=>{},[]);let w=jsx(K,{tabIndex:-1,onClick:g=>h(),className:"--send flex aic jcc",variant:e.variant||q.Medium,children:R!==""?!l&&(typeof p=="string"?jsx(te,{name:p,as:"--search-action"}):p):!i&&(typeof a=="string"?jsx(te,{name:a,as:"--search-action"}):a)});return jsxs(f,{style:m,className:`--search --no-shrink --${e.variant||C||q.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${y}`.trim(),children:[s&&w,jsx(fe,{ref:v,onChange:S,...u}),e.shortcut&&jsx(Lr,{keys:e.shortcut,as:"--abs"}),!s&&w]})});Ea.displayName="Zuz.Search";var Mr=Ea;var Fu=({label:e,icon:o})=>jsxs(f,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[o&&jsx(te,{name:o}),jsx(z,{as:"--select-group-label",children:e})]}),Ba=Fu;var La=({checkIcon:e,selected:o,updateValue:t,o:n})=>{let r=e?typeof e=="string"?jsx(te,{name:"checkIcon"}):e:A.check,s=n.disabled===true;return jsxs(K,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${o?"--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(z,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),o&&jsx(de,{aic:true,jcc:true,as:"--select-option-check --abs",children:r})]})};La.displayName="Option";var Ma=La;var Da=(({ref:e,...o})=>{let{selected:t,options:n,label:r,name:s,variant:a,search:i,searchPlaceholder:p,maxHeight:l,arrowDownIcon:c=A.arrowDown,arrowUpIcon:d=A.arrowUp,expanded:u,multiple:m,tokenizer:y,wrapTokens:R,disabled:x,checkIcon:C,closeIcon:v,editable:S,editablePlaceholder:h,onChange:w,required:g,with:b,...I}=o,B=It(),E=!!(s&&B?.setFieldValue),V=Bn(s),k=Nn(s),D=S===true&&m!==true&&y!==true,$=M=>typeof M=="string"||typeof M=="number",_=M=>typeof M=="object"&&M!==null&&!Array.isArray(M)&&"value"in M&&"label"in M,N=M=>n.find(ee=>String(ee.value)===String(M)),L=M=>{if(M==null)return null;if(D&&M==="")return "";if(m||y)return (Array.isArray(M)?M:[M]).map(ge=>$(ge)?N(ge):ge).filter(ge=>_(ge));if($(M)){let ee=N(M);return ee||(D?String(M):null)}return _(M)?M:null},U=()=>{if(t!==void 0)return L(t);let M=n.find(ee=>String(ee.value)==="-1");return M||(D?"":null)},X=M=>Array.isArray(M)?M.map(ee=>ee.value):_(M)?M.value:M,[F,Z]=useState(()=>U()),[G,W]=useState(false),[re,J]=useState(null),ce=useRef(null),me=useRef(null),Ce=useRef(null),le=useId(),pe=useMemo(()=>s||le,[s,le]),{reposition:Y}=Mt(Ce,{direction:vt.Bottom,offset:2}),{variant:se}=j(true),ne=v?typeof v=="string"?jsx(te,{name:v}):v:A.close,{className:he,style:Ae,rest:Te}=O(I,void 0),{onClick:ye,...Oe}=Te||{},ae=useMemo(()=>k!==void 0?L(k):F,[k,F,n,D,m,y]),be=useMemo(()=>{if(!(!ae||Array.isArray(ae)||!_(ae)))return ae},[ae]),Wt=useMemo(()=>D?_(ae)?String(ae.value??""):$(ae)?String(ae):"":"",[D,ae]),Gt=M=>Array.isArray(ae)?ae.some(ee=>ee.value===M.value):_(ae)?ae.value===M.value:D&&$(ae)?String(ae)===String(M.value):false,$e=M=>{if(E&&B?.setFieldValue&&s){B.setFieldValue(s,X(M));return}Z(M);},De=M=>{w?.(S===true&&M instanceof Option?String(M.value):M);},No=M=>{if(!(x||M.disabled)){if(m||y){let ee=Array.isArray(ae)?ae:[],Be=ee.find(Bo=>Bo.value===M.value)?ee.filter(Bo=>Bo.value!==M.value):[...ee,M];$e(Be),De(Be);return}$e(M),W(false),De(M);}},ci=M=>{let ee=M.target.value,ge=ee===""?null:N(ee),Be=ge?ge.value:ee;$e(Be),De(Be);},mi=M=>{if(M.key==="Enter"&&(M.preventDefault(),D)){let ee=M.currentTarget.value.trim();if(!ee){W(false);return}let Be=N(ee)??ee;$e(Be),De(Be),W(false);}},pi=(M,ee)=>{if(M.stopPropagation(),x)return;let ge=ae.filter(Be=>Be.value!==ee.value);$e(ge),W(false),De(ge);},ui=M=>{let ee=M.currentTarget,ge=ee.scrollTop===0&&M.deltaY<0,Be=ee.scrollHeight-ee.scrollTop===ee.clientHeight&&M.deltaY>0;!ge&&!Be||M.preventDefault(),M.stopPropagation();};useImperativeHandle(e,()=>({setSelected:M=>{$e(L(M));},getValue:()=>ae??null}),[ae,n,D,m,y,E,s]),useEffect(()=>{E||t===void 0||Z(L(t));},[t,E,n,D,m,y]),useEffect(()=>{if(!G)return;let M=()=>{Y();};return window.addEventListener("scroll",M,true),window.addEventListener("resize",Y),()=>{window.removeEventListener("scroll",M,true),window.removeEventListener("resize",Y);}},[G,Y]),useEffect(()=>{if(!G){me.current&&(me.current.value=""),J(null);return}me.current?.focus(),Y();let M=ge=>{ce.current&&!ce.current.contains(ge.target)&&W(false);},ee=setTimeout(()=>{document.addEventListener("click",M);},0);return ()=>{clearTimeout(ee),document.removeEventListener("click",M);}},[G,Y]);let fi=useDebounce(M=>J(M===""?null:M),300),di=useDebounce(ci,300);return jsxs(f,{ref:ce,"data-required":g?"true":void 0,with:b,className:[`--select ${u==true?"--expanded":""}`,`--${a||se}`,`${s?`--${s}`:""}`,`${V?"--has-error":""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:pe,children:[D?jsxs(f,{"data-value":be?.value??(Wt||"-1"),className:`--select-display --selected --editable flex aic rel ${he}`.trim(),style:Ae,onClick:M=>M.stopPropagation(),...Oe,children:[be?.icon&&jsx(te,{as:"--selected-icon",name:be.icon}),jsx(de,{aic:true,as:"--label-wrapper",children:jsx(fe,{"aria-expanded":G,className:"--select-input",disabled:x,onChange:di,onClick:M=>{M.stopPropagation(),x||W(true);},onKeyDown:mi,placeholder:h||r||"Choose",type:"text",defaultValue:Wt})}),jsx(K,{className:"--select-toggle rel flex aic jcc",disabled:x,onClick:M=>{M.stopPropagation(),x||W(ee=>!ee);},tabIndex:-1,withLabel:false,children:G?typeof d=="string"?jsx(te,{name:d,as:"--search-action"}):d:typeof c=="string"?jsx(te,{name:c,as:"--search-action"}):c})]}):jsxs(K,{disabled:x,variant:a||se,"data-value":be?.value??"-1",className:`--select-display --selected flex aic rel ${he}`.trim(),withLabel:false,style:Ae,onClick:M=>{M.stopPropagation(),x||W(ee=>!ee);},...Oe,children:[be?.icon&&jsx(te,{as:"--selected-icon",name:be.icon}),jsx(de,{aic:true,as:"--label-wrapper",children:y&&Array.isArray(ae)&&ae.length>0?jsxs(de,{as:`--tokens-wrap${R===true?" --wrap":""}`,children:[ae.map(M=>jsxs(de,{aic:true,as:"--token",children:[jsx(z,{as:"--token-label",children:M.label}),jsx(f,{as:"--token-remove",onClick:ee=>pi(ee,M),children:ne})]},M.value)),ae.length<n.length&&jsx(z,{as:"--label",children:r||"Choose"})]}):jsx(z,{as:"--label",children:Array.isArray(ae)?ae.length>0?`${ae.length} selected`:r||"Choose":be?.label||r||"Choose"})}),jsx(f,{className:"--svg-arrow rel flex aic jcc",children:G?typeof d=="string"?jsx(te,{name:d,as:"--search-action"}):d:typeof c=="string"?jsx(te,{name:c,as:"--search-action"}):c})]}),jsxs(f,{id:pe,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!G,onWheel:ui,style:{maxHeight:l||"auto"},ref:Ce,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:G,duration:.05},children:[i&&jsx(f,{as:"--select-search --no-shrink flex --sticky",children:jsx(Mr,{ref:me,variant:q.Small,placeholder:p||"Search...",onChange:fi})}),r&&jsx(Ba,{label:r}),n?.filter(M=>!re||M.label.toLowerCase().includes(re.toLowerCase()))?.map(M=>jsx(Ma,{updateValue:No,checkIcon:C,selected:Gt(M),o:M},`option-${M.label.replace(/\s+/g,"-")}-${M.value}`))]})]})});Da.displayName="Zuz.Select";var Ku=Da;var Va=({ref:e,...o})=>jsx(Ft,{type:Ke.Switch,...o,ref:e});Va.displayName="Zuz.Switch";var Wu=Va;var Aa=e=>{let{idx:o,id:t,as:n,weight:r,style:s,value:a,render:i,resize:p,sortBy:l,sortable:c,onSort:d}=e,[u,m]=useState(0),y=()=>{c&&(d?.(String(t),u==1?-1:1),m(R=>R==1?-1:1));};return jsxs(f,{style:{flex:r||1,...s},as:`--col flex aic ${n||""} ${c?"--sortable":""}`,onClick:y,children:[jsx(f,{as:"--colv",children:a}),o==-1&&c&&l==t&&jsx(f,{as:"--arrow flex aib",children:u==1?A.arrowUp:A.arrowDown})]})};Aa.displayName="Zuz.Column";var Po=Aa;var Fa=e=>{let{index:o,pubsub:t,schema:n,data:r,ids:s,styles:a,animate:i,sortBy:p,selectable:l,tableRef:c,loading:d,rowClassName:u,onSort:m,onRowClick:y,onSelect:R,onContextMenu:x}=e,C=useDelayed(),v=useMemo(()=>({transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:.02*(o+1)}),[]),S=useRef(null),h=(g,b)=>{o==-1?t.emit(`ALL_ROWS_${g?"CHECKED":"UNCHECKED"}`,g):(R&&R(r,g),t.emit(`ROW_${g?"CHECKED":"UNCHECKED"}`,g,b));},w=(g,b,I)=>jsx(Po,{idx:g,id:b,as:"--selector",pubsub:t,value:jsx(Ft,{value:I,ref:S,onSwitch:h,type:Ke.Default})});return useEffect(()=>{let g=(E,V)=>{S.current?.setChecked(E,false);},b=(E,V)=>{let k=false;c?.current&&c.current.querySelectorAll(".--row").forEach(D=>{let $=D;if(!$.classList.contains("--row-head")){let _=$.querySelector(".--selector input[type=checkbox]");_&&_.checked&&!k&&(k=_.checked);}}),S.current.setChecked(k,false);},I=E=>{S.current?.setChecked(E,false),R&&R(r,E);},B=E=>{S.current?.setChecked(E,false),R&&R(r,E);};return o==-1?(t.on("ROW_CHECKED",g),t.on("ROW_UNCHECKED",b),()=>{t.off("ROW_CHECKED",g),t.off("ROW_UNCHECKED",b);}):(t.on("ALL_ROWS_CHECKED",I),t.on("ALL_ROWS_UNCHECKED",B),()=>{t.off("ALL_ROWS_CHECKED",I),t.off("ALL_ROWS_UNCHECKED",B);})},[]),jsxs(f,{onContextMenu:g=>x?x(g,r):null,onClick:g=>y?y(g,e.data):()=>{},...i?{fx:{...v,when:C}}:{},as:`--row flex aic ${y?"--row-clickable":""} ${o==-1?"--row-head":""} ${u||""}`,children:[o==-1&&n.map((g,b)=>{let{renderWhenHeader:I,render:B,value:E,...V}=g;return jsxs(Fragment,{children:[l&&b==0&&w(-1,`--selector-${g.id}`,"all"),jsx(Po,{idx:-1,onSort:m,sortBy:p,value:E,...V,pubsub:t,style:a[g.id]})]},`--col-${g.id}`)}),d&&o>-1&&jsx(f,{as:"--col",children:jsx(z,{as:"opacity:0",children:"..."})}),!d&&o>-1&&s&&r&&n.map((g,b)=>jsxs(Fragment,{children:[l&&b==0&&w(b,`--selector-${g.id}`,g.id.toString()),s.includes(String(g.id))?jsx(Po,{pubsub:t,idx:b,id:String(g.id),style:a[String(g.id)],value:g.render?g.render(r,o):r[String(g.id).includes(".")?String(g.id).split(".").reverse()[0]:g.id]}):null]},`--${String(g.id)}-val-${b}`))]})};Fa.displayName="Zuz.Row";var Ro=Fa;var Ka=(e,o)=>{let{schema:t,rows:n,rowCount:r,rowsPerPage:s,currentPage:a,pagination:i,paginationHash:p,showPaginationOnZeroPageCount:l,animateRows:c,header:d,rowClassName:u,selectableRows:m,hoverable:y,sortBy:R,loading:x,loadingRowCount:C,loadingMessage:v,spinner:S,emptyMessage:h,onSort:w,onRowClick:g,onRowSelectToggle:b,onPageChange:I,onRowContextMenu:B,...E}=e,V=useRef(null),k=useMemo(()=>t.reduce((pe,Y)=>(pe[Y.id]={flex:Y.weight||1,...Y.w&&{width:Y.w},...Y.maxW&&{maxWidth:Y.maxW},...Y.minW&&{minWidth:Y.minW},...Y.h&&{height:Y.h},...Y.maxH&&{maxHeight:Y.maxH},...Y.minH&&{minHeight:Y.minH}},pe),{}),[t]),D=useMemo(()=>Object.keys(k),[t]),$=useMemo(()=>d??true,[d]),{style:_,className:N,rest:L}=O(E),U=useRef(null),X=useMemo(()=>new PubSub,[]),F=useRef(n.map(()=>uuid(8))),[Z,G]=useState(R||null),[W,re]=useState(v||"loading"),J=useMemo(()=>!x&&n&&n.length==0,[x,n]),ce=useCallback(()=>h?typeof h=="function"?jsx(h,{}):h:jsx(z,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);useEffect(()=>{n.length&&!F.current&&(F.current=n.map(()=>uuid(8)));},[n]);let me=(pe,Y)=>{G(pe),w?.(pe,Y);},Ce=(r||(n?n.length:0))/(s||10),le=useMemo(()=>l||Ce>1?jsx(Ht,{hash:p,ref:V,renderOnZeroPageCount:l,onPageChange:I,paginationStyle:"table",startPage:a,itemCount:r||(n?n.length:0),itemsPerPage:s||10}):null,[a,r]);return useImperativeHandle(o,()=>({setLoading(pe){}})),jsxs(f,{as:`--table ${y??true?"--hoverable":""} flex cols rel ${N}`,ref:U,children:[$==true&&jsx(Ro,{sortBy:Z,onSort:me,tableRef:U,pubsub:X,selectable:m,index:-1,schema:t,loading:true,styles:k}),x&&jsxs(f,{as:"center-x flex aic --table-spinner",children:[jsx(Re,{type:S||we.Simple}),W&&jsx(z,{as:"--table-loading-message",children:W})]}),x&&Array(C||5).fill({}).map((pe,Y)=>jsx(Ro,{tableRef:U,index:Y,pubsub:X,schema:t,styles:k,loading:true,animate:c,onRowClick:g},`--trow-loading-${Y}-${t[0].id}`)),!x&&n&&n.map((pe,Y)=>jsx(Ro,{tableRef:U,pubsub:X,loading:false,index:Y,schema:t,ids:D,styles:k,animate:c,data:pe,onRowClick:g,rowClassName:u,selectable:m,onSelect:b,onContextMenu:B},`--trow-${F.current[Y]||Y}-${t[0].id}`)),J&&ce(),i&&le&&jsx(f,{"aria-hidden":!i||!le,...c?{fx:{transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&i&&le!=null}}:{},as:"--row flex aic --row-footer",children:le})]})};Ka.displayName="Zuz.Table";var nf=forwardRef(Ka),sf=nf;var lf=({ref:e,...o})=>{let{title:t,items:n}=o,[r,s]=useState(0),a=(i,p,l)=>{i.preventDefault(),s(p),document.getElementById(l)?.scrollIntoView({behavior:"smooth"});};return jsxs(f,{ref:e,as:"--table-of-contents rel flex cols",children:[jsx(z,{as:"--toc-title",children:t}),jsx(_e,{items:n.map((i,p)=>jsx("a",{className:r==p?"--toc-active":"",style:{anchorName:r===p?"--toc-active":"none",color:r==p?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:l=>a(l,p,i.tag),href:`#${i.tag}`,children:i.label}))})]})},cf=lf;var Wa=({isActive:e,transitionType:o,speed:t,width:n,render:r,content:s,onHeightChange:a})=>{let i=useRef(null),p=useResizeObserver(i);useEffect(()=>{e&&p.height>0&&a(p.height);},[e,p.height]);let c=useMemo(()=>{let d={width:n>0?`${n}px`:"100%",minWidth:n>0?`${n}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return o==="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}:o==="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,o,n,t]);return jsx(f,{ref:i,style:{...c},className:"--content",children:r||e?s:null})};Wa.displayName="Zuz.TabBody";var Ga=Wa;var Xa=({ref:e,...o})=>{let{tabs:t,speed:n=.3,prerender:r=true,variant:s,tabStyle:a="fixed",onChange:i,transitionType:p="slide",...l}=o,[c,d]=useState(0),u=useRef(null),m=useResizeObserver(u),y=useMemo(()=>uuid(8),[]),[R,x]=useState("auto"),C=useMemo(()=>m.width>0,[m.width]);useImperativeHandle(e,()=>({setTab:b=>d(b)}));let v=useMemo(()=>t.map(b=>({...b,key:b.key||uuid(8)})),[t]),{style:S,className:h,rest:w}=O({as:`flex cols w-full no-overflow ${l.as||""}`,...l}),g=()=>{if(!C)return {opacity:0};switch(p){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${v.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${c*m.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxs(f,{ref:u,style:S,className:`--tabview --${a} flex cols ${h}`,children:[jsx(zt,{as:"--tabview-head",onSwitch:b=>{d(b.index);let I=v.find(B=>B.tag==b.tag);I&&I.onSelect&&(I.onSelect(I,b.index),i?.(I,b.index));},selected:c,items:v.reduce((b,I,B)=>(b.push({icon:I.icon,index:B,label:I.label,tag:I.tag}),b),[])}),jsx(f,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:R,transition:C?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:C?1:0},children:jsx(f,{className:"--track",style:{...g()},children:v.map((b,I)=>jsx(Ga,{isActive:I===c,transitionType:p,speed:n,width:m.width,render:r||I===c,onHeightChange:B=>I===c&&x(B),content:b.body},`tab-body-${b.key||I}-${y}`))})})]})};Xa.displayName="Zuz.TabView";var bf=Xa;var Cf=({ref:e,commands:o,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:r="zuz ~ ",variant:s,...a})=>{let[i,p]=useState([{type:"output",content:n}]),[l,c]=useState(""),d=useRef(null),u=useRef(null),{variant:m}=j(true);useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight);},[i]);let y=h=>{let w=typeof h=="string"?{type:"output",content:h}:h;p(g=>{let b=[...g,w];return b.length>1e3?b.slice(-1e3):b});},R=()=>p([]);useImperativeHandle(e,()=>({write:y,clear:R}));let x=async h=>{let[w,...g]=h.split(" "),b=w.toLowerCase();return o&&o[b]?await o[b](g):t?await t(h):`command not found: ${w}`},C=h=>{let w=/\u001b\[(\d+)m/g,g=[],b={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,B="#d4d4d4",E=false,V;for(;(V=w.exec(h))!==null;){let D=h.slice(I,V.index);D&&g.push({text:D,color:B,bold:E});let $=V[1];$==="0"?(B="#d4d4d4",E=false):$==="1"?E=true:b[$]&&(B=b[$]),I=w.lastIndex;}let k=h.slice(I);return k&&g.push({text:k,color:B,bold:E}),g},v=(h,w)=>h.includes("\x1B")?C(h).map((g,b)=>jsx(ie,{style:{color:g.color||"#d4d4d4",fontWeight:g.bold?"bold":"normal"},children:g.text},`--terminal-msg-${b}-${g.text.replace(/\S+/g,"-")}`)):jsx(ie,{style:{color:w==="error"?"#ff5f56":w==="command"?"#00ff00":"#d4d4d4"},children:h}),S=async h=>{if(h.key==="Enter"&&l.trim()){let w=l.trim(),g=[...i,{type:"command",content:`${r}${w}`}];c(""),p(g);let b=await x(w);p(I=>[...I,{type:"output",content:b}]);}};return jsxs(f,{as:`--zuz-terminal --${s||m||q.Medium} flex cols ${a.className}`,onClick:()=>u.current?.focus(),children:[jsx(f,{ref:d,className:"--terminal-log",children:i.map((h,w)=>jsx(f,{children:jsx(z,{children:v(h.content,h.type)})},w))}),jsxs(f,{as:"flex aic --terminal-input",children:[jsx(z,{as:"--terminal-prompt",children:r}),jsx(fe,{ref:u,className:"--zuz-term-input",autoFocus:true,value:l,variant:s||m||q.Medium,onChange:h=>c(h.target.value),onKeyDown:S})]})]})},Tf=Cf;var Pf=({meta:e})=>jsxs(K,{as:"flex aic --command-item",children:[e.icon&&jsx(te,{name:e.icon,as:"--command-icon"}),jsx(z,{children:e.label})]}),Rf=({position:e,onSelect:o,commands:t,visible:n})=>jsx(f,{"aria-hidden":!n,fx:{transition:Q.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(r=>jsx(Pf,{meta:r},`cmd-${r.label.replace(/\s+/,"-")}`))}),Ja=Rf;var oi=({ref:e,...o})=>{let {autoResize:t,maxHeight:n,variant:r,resize:s="none",command:a,commands:i,name:p,onInput:l,cmd:c,renderDropdown:d,value:u,defaultValue:m,...y}=o,R=useRef(null),x=useRef(null),{variant:C}=j(true),{style:v,className:S,rest:h}=O(y),w=at();p?w.errors?.[p]:null;let b=p&&w.values&&w.setFieldValue,I=b?w.values?.[p]:void 0,B=useDebounce(L=>{b&&w.setFieldValue?.(p,L);},500),{showDropdown:E,dropdownPosition:V,handleKeyDown:k,handleInput:D,handleCommandSelect:$}=useCommandActions({command:a,commands:i,cmd:c,ref:R}),_=useCallback(()=>{let L=R.current;!L||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{L.style.height="auto";let U=L.scrollHeight;if(n){let X=parseInt(n.toString(),10);isNaN(X)||(U=Math.min(U,X));}L.style.height=`${U}px`,L.style.overflowY=n&&U>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),N=L=>{B(L.currentTarget.value),l?.(L),D(L),_();};return useEffect(()=>{R.current&&p&&I!==void 0&&R.current.value!==String(I)&&(R.current.value=String(I));},[I,p]),useEffect(()=>{_();},[u,m,_]),useEffect(()=>{t&&R.current&&_();},[t,_]),useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),useEffect(()=>()=>{b&&w.deleteFieldValue?.(p);},[]),jsxs(f,{as:"rel --flex w-full",children:[jsx("textarea",{name:p,className:`--input --textarea --${r||C||q.Medium} flex ${S}`.trim(),style:{...v,resize:s,height:t?"auto":v?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:k,onInput:N,ref:L=>{R.current=L,typeof e=="function"?e(L):e&&(e.current=L);},value:u,defaultValue:m,...h}),d?d({show:E,position:V,commands:i||[],onSelect:$}):i&&i.length>0&&jsx(Ja,{visible:E,commands:i,onSelect:$,position:V})]})};oi.displayName="Zuz.TextArea";var kf=oi;var ni=forwardRef((e,o)=>{let{as:t,value:n,color:r,direction:s,...a}=e,i=useRef(null),[p,l]=useState(n||0);return useImperativeHandle(o,()=>({updateValue(c){p.toString().length!==c.toString().length&&l(c);},setValue(c){if(this.updateValue(c),i.current){let d=c.toString().split("");i.current.querySelectorAll(".--wheel-char").forEach((u,m)=>{let y=d[m];if(u instanceof HTMLElement){u.setAttribute("data-value",y);let R=u.querySelector(".--wheel-char-track");R instanceof HTMLElement&&(R.style.setProperty("--v",y),R.offsetWidth);}});}}})),useEffect(()=>{l(n||0);},[n]),jsxs(f,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:i,...a,children:[(p||0).toString().split("").map((c,d)=>isNaN(parseInt(c,10))?jsx(ie,{className:"--wheel-char wheel-char-symbol grid",children:c},`wheel-char-symbol-${d}`):jsx(ie,{"data-value":c,className:`--wheel-char grid ${d>(p||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxs(ie,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":c},children:[jsx(ie,{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(ie,{children:u},`${d}--${m}`)),jsx(ie,{children:!s||s==="down"?9:0})]})},`wheel-char-${d}`)),r&&jsx(f,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${r}, transparent, transparent, transparent, ${r})`}})]})});ni.displayName="Zuz.TextWheel";var Af=ni;var _r=forwardRef((e,o)=>{let{as:t,meta:n,nodes:r,icons:s,onSelect:a,treeTag:i,selected:p,roots:l,expanded:c,...d}=e,{tag:u,label:m,icon:y,under:R,isHead:x}=n,C=useMemo(()=>l.includes(u),[l]),[v,S]=useState(c),h=()=>{localStorage.setItem(`--tn${i}-${u}`,v?"0":"1"),S(!v);};useEffect(()=>{c||C&&!localStorage.getItem(`--tn${i}-${u}`)?(localStorage.setItem(`--tn${i}-${u}`,"1"),S(true)):S(localStorage.getItem(`--tn${i}-${u}`)=="1");},[]);let w=useMemo(()=>r.filter(g=>g.under==u),[r,u]);return jsxs(f,{className:`--treenode ${C?"--is-root":""} --treenode-${u} flex cols`,children:[jsxs(f,{className:`--node --node-${u} flex aic ${p==u?" --selected":""}`,children:[jsx(K,{skeleton:d.skeleton,onClick:h,className:"--node-aro-btn",disabled:w.length==0,children:s?.arrowClose&&s?.arrowOpen?jsx(te,{skeleton:d.skeleton,className:"--node-aro-icon",name:w.length==0?s?.arrowDisabled||s?.arrowClose:v?s?.arrowOpen:s?.arrowClose}):w.length==0?A.chevronBottom:v?A.chevronBottom:A.chevronRight}),jsxs(K,{className:"--node-meta flex aic",onClick:g=>a(u),children:[(s?.nodeOpen&&s?.nodeClose||C&&s?.rootOpen&&s?.rootClose)&&jsx(te,{skeleton:d.skeleton,className:`--node-icon ${C?"--icon-root":""}`,name:y||(v?C&&s?.rootOpen||s.nodeOpen:C&&s?.rootClose||s?.nodeClose)}),jsx(z,{className:`--node-label ${C?"--node-label-root":""}`.trim(),skeleton:d.skeleton,children:m})]})]}),v&&w.length>0&&jsx(f,{className:`--sub-node tree-sub-node-${u} flex cols`,children:w.map(g=>jsx(_r,{treeTag:i,selected:p,onSelect:a,icons:s,roots:l,expanded:g.expanded||false,meta:g,nodes:r},`--node-${g.tag}`))})]})});_r.displayName="TreeItem";var ai=_r;var li=forwardRef((e,o)=>{let{as:t,nodes:n,onNodeSelect:r,tag:s,icons:a,roots:i,selected:p,...l}=e,[c,d]=useState(p);useImperativeHandle(o,()=>({getSelected:()=>c}),[r]);let u=m=>{d(m),r&&r(m);};return useEffect(()=>{c!=p&&d(p);},[p]),jsx(f,{className:"--treeview flex cols",children:n.filter(m=>i.includes(m.tag)).map(m=>jsx(ai,{treeTag:s?`-${s}`:"",selected:c,onSelect:y=>u(y),icons:a,meta:m,roots:i,expanded:m.expanded||false,skeleton:l.skeleton,nodes:n},`--node-${m.tag}`))})});li.displayName="Zuz.TreeView";var Gf=li;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
13
- export{Le as ALERT,Ur as AVATAR,Ec as Accordion,Oc as ActionBar,Hc as Alert,am as AutoComplete,yr as Avatar,gm as Badge,f as Box,Xm as BubbleAttachmentType,qm as BubbleMediaType,Bs as BubbleStatus,K as Button,Rs as CHART,Ke as CHECKBOX,Qf as COLORTHEME,xr as Calendar,Fm as Carousel,Um as Chart,Cr as ChatBubble,ep as ChatList,Ft as CheckBox,up as CodeBlock,Ep as ColorScheme,Zo as ContextMenu,Lp as CookiesConsent,Fe as Cover,$p as CropShape,Hp as Cropper,zp as Crumb,od as DATATYPE,et as DIALOG,qr as DIALOG_ACTION_POSITION,Pe as DRAWER_SIDE,Wp as DatePicker,sr as Dialog,lr as Drawer,qt as FILTER,Je as FORMVALIDATION,rd as FORMVALIDATION_STYLE,Xp as Fab,Qp as Fieldset,tu as Filters,de as Flex,tr as Form,nu as Grid,Ko as Group,te as Icon,Dt as Image,fe as Input,Lr as KeyboardKeys,la as KeysLabelMap,ia as KeysMap,$t as Label,zo as LayersProvider,_e as List,du as MediaPlayer,yu as NetworkStatus,St as ORIGIN,Jf as OriginType,tt as Overlay,ed as PLACEMENTS,vt as POSITION,sd as PROGRESS,Ht as Pagination,fo as PaginationStyle,Tu as Password,Eu as PinInput,ve as Position,Lt as ProgressBar,Oo as RADIO,Lu as Radio,Me as SHEET,Lo as SHEET_ACTION_POSITION,jf as SKELETON,Mo as SLIDER,td as SORT,we as SPINNER,Bt as ScrollView,Mr as Search,Ku as Select,zt as SelectTabs,gl as Sheet,mt as Slider,oo as SnackPosition,Sn as SnackStyle,to as SnackType,ie as Span,Re as Spinner,nd as Status,Wu as Switch,Q as TRANSITIONS,oe as TRANSITION_CURVES,bf as TabView,sf as Table,cf as TableOfContents,Tf as Terminal,z as Text,Af as TextWheel,kf as Textarea,Pi as ThemeProvider,wn as ToastDefaultTitle,oo as ToastPosition,mr as ToastProvider,Sn as ToastStyle,to as ToastType,Pt as ToolTip,Gf as TreeView,q as Variant,hi as __ZUZJS_UI_VERSION,wt as animationTransition,Do as buildClassString,jr as buildWithStyles,Td as css,Vo as getAnimationCurve,Pd as getAnimationTransition,xi as getZuzMap,aa as isKeyCombination,Yr as setZuzMap,O as useBase,ac as useContextMenu,cc as useDialog,uc as useDrawer,Se as useFx,gc as useMorph,Mt as usePosition,wc as useSnack,Wo as useToast};
12
+ </div>`}).join("")},[t,y]);return jsxs(u,{as:`--code-block rel ${d}`,style:f,...l,children:[jsx("pre",{ref:e,children:jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:R}})}),n&&jsx(K,{as:"--copy-code abs",onClick:()=>{copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},fp=up;var $s=({onSelect:e,meta:o,selected:t,disabled:n=false})=>{let r=useRef(null),{index:s,icon:a,label:i}=o,[p,l]=useState({x:0,width:0}),c=useDelayed();return useLayoutEffect(()=>{if(c&&r.current){let{width:d,x:f}=r.current.getBoundingClientRect();l({x:f,width:d}),t&&e(s,d,f,o,true);}},[c,r.current]),useEffect(()=>{t&&e(s,p.width,p.x,o,false);},[t]),jsxs(K,{disabled:n,onClick:()=>e(s,p.width,p.x,o,false),ref:r,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsx(te,{name:a,as:"--segment-icon"}):jsx(u,{as:"--segment-icon flex aic jcc",children:a}):null,i&&String(i).trim()!=""&&jsx(u,{className:"--segment-label",children:i||`Item ${s}`})]})};$s.displayName="SelectTabItem";var Fs=$s;var _s=forwardRef((e,o)=>{let{fx:t,items:n,selected:r,variant:s,disabled:a=false,onSwitch:i,...p}=e,[l,c]=useState(r||0),d=useDelayed(50),f=useRef(l),{className:m,style:y,rest:R}=O(p),x=useRef(null),C=useRef(null),{variant:v}=j(true),w=(h,S,g,b,I)=>{if((I||l!=h&&l!=-2)&&(c(h),f.current=l,queueMicrotask(()=>{d&&i?.(b);})),x.current){let L=C.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${S}px`),x.current.style.setProperty("--x",`${L?g-L.left:g}px`);}};return useImperativeHandle(o,()=>({setSelected:h=>{typeof h=="number"&&h!=l&&c(h);}}),[l]),jsxs(u,{ref:C,"data-selected":l,className:`${m} --segmented --${s||v||q.Medium} flex aic rel`,style:y,...R,children:[jsx(u,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((h,S)=>jsx(Fs,{disabled:a,onSelect:w,selected:l==S,meta:{...h,index:S}},`segment-${h.label}-${S}`))]})});_s.displayName="Zuz.SelectTabs";var zt=_s;var Ws=forwardRef((e,o)=>{let{type:t,variant:n,...r}=e,s=useDelayed(),{colorScheme:a,setColorScheme:i}=Fo(),p=useCallback(()=>{i(a=="dark"?"light":a=="light"?"system":"dark");},[a]),{variant:l}=j(true),{className:c,style:d}=O(r),f=useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:A.colorSchemeLight},{tag:"system",index:1,label:"",icon:A.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:A.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:A.colorSchemeLight},{tag:"dark",index:2,label:"",icon:A.colorSchemeDark}],[]),m=useMemo(()=>["light","system","dark"].indexOf(a),[a]);return !s||m==-1?null:t=="system"||t=="switch"?jsx(zt,{className:`--color-scheme --${t}`,onSwitch:({tag:y})=>{i(y);},selected:m,items:f,...r}):jsx(K,{onClick:p,style:d,variant:n,as:`--color-scheme-switch ${c}`.trim(),children:a=="system"?A.colorSchemeSystem:a=="light"?A.colorSchemeLight:A.colorSchemeDark})});Ws.displayName="Zuz.ColorScheme";var Np=Ws;var Gs=forwardRef((e,o)=>{let[t,n]=useState("wait"),{title:r,message:s,acceptLabel:a,rejectLabel:i,position:p}=e,l=async c=>{n(c==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(c));};return useEffect(()=>{let c=localStorage.getItem("--ccnt");n(c?c=="1"?"accepted":"rejected":"pending");},[]),jsxs(u,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:oe.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${p||ve.Left} flex cols`,children:[jsx(_,{as:"--title",children:r||"This site uses cookies"}),jsx(_,{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(u,{as:"--footer flex aic",children:[jsx(K,{onClick:c=>l(1),as:"--accept",children:a||"Accept All"}),jsx(K,{onClick:c=>l(0),as:"--reject",children:i||"Cancel"})]})]})});Gs.displayName="Zuz.CookiesConsent";var Mp=Gs;var qs=({ref:e,...o})=>{let {type:t,value:n=0,min:r=0,max:s=1,step:a=.01,onChange:i,showGhostBar:p,showKnobOnHover:l,showToolTip:c,roundValue:d,formatValue:f,...m}=o,{className:y,style:R,rest:x}=O(m),C=useRef(a||.01).current,v=useRef(r||0).current,w=useRef(s||1).current,h=useRef(n||0).current,S=useRef(null),g=useRef(null),b=useRef(null),I=useRef(null);useRef(null);let N=useRef(null),V=useRef(null),k=useRef(null),D=useRef(null),F=(se,ne,he)=>(se-ne)/(he-ne)*100,z=se=>{if(g.current){let ne=parseFloat(se.currentTarget.value);re(ne);let he=F(ne,parseFloat(se.currentTarget.min),parseFloat(se.currentTarget.max));g.current.style.setProperty("--value",`${he}`),g.current.setAttribute("data-value",`${ne}`),i&&i(d?+ne.toFixed(2):ne);}},[E,B]=useState(false),[G,X]=useState(0),[$,Z]=useState(0),[U,W]=useState(false),re=async se=>{let ne=f?f(+se):d?(+se).toFixed(2):Math.round(+se);k.current&&(k.current.textContent=String(ne));},ce=se=>{if(E){let ne=se.clientX-G,he=w-v,Te=ne/200*he,ye=Math.max(v,Math.min($+Te,w));if(ye=Math.round(ye/C)*C,re(ye),g.current){let Oe=F(ye,v,w);g.current.style.setProperty("--value",`${Oe}`),g.current.setAttribute("data-value",`${ye}`),V.current&&(V.current.textContent=d?ye.toFixed(2):ye.toString()),i&&i(ye);}}},me=()=>{B(false),document.body.style.cursor="auto";},Ce=se=>(se-v)/(w-v)*100,le=se=>{if(!g.current)return;let ne=g.current.getBoundingClientRect(),he=se.clientX-ne.left,Ae=Math.max(0,Math.min(100,he/ne.width*100));if(c&&k.current){let Te=S.current?+S.current.value:n;re(Te*100);}if(p){let Te=Ce(S.current?+S.current.value:n),ye=Math.min(Te,Ae),Oe=Math.abs(Ae-Te);g.current.style.setProperty("--ghost-start",`${ye}`),g.current.style.setProperty("--ghost-width",`${Oe}`);}};useEffect(()=>{g.current&&g.current.style.setProperty("--value",S.current?`${F(parseFloat(S.current.value),parseFloat(S.current.min),parseFloat(S.current.max))}`:h.toString());},[]),useEffect(()=>(E?(document.addEventListener("mousemove",ce),document.addEventListener("mouseup",me)):(document.removeEventListener("mousemove",ce),document.removeEventListener("mouseup",me)),()=>{document.removeEventListener("mousemove",ce),document.removeEventListener("mouseup",me);}),[E]),useEffect(()=>{let se=F(n,v,w);g.current?.style.setProperty("--value",`${se}`),re(n);},[n,v,w,k.current]);let Y=()=>jsxs(u,{ref:g,onMouseEnter:()=>W(true),onMouseLeave:()=>W(false),onMouseMove:le,className:`--slider --${t||Mo.Default} ${l?"--knob-hover":""} flex rel ${y}`.trim(),style:{...R},children:[jsx(u,{ref:N,className:"--slider-track abs fill"}),p&&jsx(u,{ref:I,className:"--slider-ghost abs fill"}),jsx(u,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsx(u,{ref:b,className:"--slider-knob --tooltip-knob abs"}),jsx(fe,{ref:S,onInput:z,className:"abs fill",tabIndex:0,type:t||Mo.Default,defaultValue:h||0,step:C,max:w,min:v})]});if(c===true){let se=f?f(n):d?n.toFixed(2):n;return jsx(Pt,{ref:D,show:E,position:vt.Top,margin:15,anchorName:"--tooltip-knob",title:jsx(ie,{ref:k,children:se}),children:Y()})}return Y()};qs.displayName="Zuz.Slider";var mt=qs;var Ys=forwardRef((e,o)=>{let{src:t,shape:n,size:r,...s}=e,{style:a,className:i,rest:p}=O(s),{canvasRef:l,crop:c,setScale:d,handleMouseDown:f,handleMouseUp:m,handleMouseMove:y}=useImageCropper(t,r||200,n||CropShape.Circle);return useImperativeHandle(o,()=>({getCropped(){return c()},setScale(R){d(R);}})),jsxs(u,{as:`--cropper --${n||CropShape.Circle} ${i}`,style:a,...p,children:[jsx("canvas",{ref:l,width:r||200,height:r||200,onMouseDown:f,onMouseUp:m,onMouseLeave:m,onMouseMove:y}),jsx(u,{as:"--cropper-slider",children:jsx(mt,{onChange:R=>d(R),min:0,max:1,step:.01,value:1})})]})});Ys.displayName="Zuz.Cropper";var Ap=Ys;var Fp=(t=>(t.Circle="circle",t.Square="square",t))(Fp||{});var Qs=forwardRef((e,o)=>{let{items:t,maxItems:n}=e,r=useMemo(()=>{let i=typeof t=="string",p=i?[]:t;return i&&t.split(",").forEach(l=>{p.push({label:l});}),p},[t]),a=useMemo(()=>n&&n>0&&r.length>n-1,[r,n])?[...r.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...r.slice(-n)]:r;return jsx(_e,{ref:o,className:"--crumb flex aic",direction:"rows",seperator:jsx(u,{as:"--crumb-chevron",children:A.chevronRightOutline}),items:a.map((i,p,l)=>i.ID=="."?jsx(u,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsx(u,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${p}`))}):jsxs(K,{onClick:()=>i.action?.(),className:"--crumb-item",disabled:!l[p+1],children:[i.icon&&jsx(te,{as:"--crumb-icon",name:i.icon}),jsx(_,{as:"--crumb-label",children:i.label})]},`${i.label.replace(/\s+/g,"-").toLowerCase()}-${p}`))})});Qs.displayName="Zuz.Crumb";var _p=Qs;var ta=forwardRef((e,o)=>{let{icon:t,defaultValue:n,value:r,size:s,variant:a,numeric:i,type:p,onConfirm:l,...c}=e,[d,f]=useState(false),[m,y]=useState(n||null),{style:R,className:x,rest:C}=O(c),v=useRef(null),w=useRef(null),{reposition:h}=Mt(w,{direction:ve.Bottom,offset:2}),S=b=>{i&&(b.currentTarget.value=b.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};useEffect(()=>{let b=I=>{let L=I.target,N=v.current?.contains(L),V=w.current?.contains(L);!N&&!V&&f(false);};return d&&document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b);}},[d]),useEffect(()=>{let b=I=>{I.key==="Escape"&&d&&(f(false),v.current?.focus());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let g=()=>{f(true);};return useEffect(()=>{d&&h();},[d,h]),jsx(Fragment$1,{children:jsxs(u,{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(ie,{as:"--date-picker-icon flex aic jcc",children:A.calendar}),jsx("input",{ref:v,value:m?format(m,"EEE, MMM d YYY hh:mm a"):r||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:R,onFocus:g,onInput:S,autoComplete:"new-password",onKeyDown:b=>{b.key=="Enter"&&l?.(b.currentTarget.value);},...C}),jsx(u,{"aria-hidden":!d,ref:w,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(xr,{defaultValue:m,onChange:b=>{y(b),f(false);}})})]})})});ta.displayName="Zuz.DatePicker";var Up=ta;var oa=forwardRef((e,o)=>{let{icon:t,variant:n,position:r}=e;return jsx(K,{className:`--fab fixed --${n||q.Large} --${r||"bottomright"}`,children:t||A.plus})});oa.displayName="Zuz.Fab";var Yp=oa;var Qp=({ref:e,children:o,...t})=>{let{legend:n,legendPlacement:r,variant:s,...a}=t,{variant:i}=j(true),{className:p,style:l,rest:c}=O(a);return jsxs(u,{as:`--fieldset --rel --flex --${s||i||q.Medium} ${p}`.trim(),style:l,children:[jsx(u,{as:`--legend --abs --${r||"top-start"}`,children:n&&typeof n=="string"?jsx("legend",{children:n}):n}),o]})},Jp=Qp;var na=e=>{let{names:o,strength:t}=e,n={[qt.Gooey]:r=>jsxs("filter",{id:"gooey",children:[jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:r||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-${qt.Gooey}`)};return useEffect(()=>{},[o]),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsx("defs",{children:(o||[qt.Gooey]).map(r=>n[r](t))})})};na.displayName="Zuz.Filters";var ou=na;var sa=e=>typeof e=="number"?`repeat(${e}, 1fr)`:e,nu=e=>e==="between"?"space-between":e==="around"?"space-around":e,aa=e=>{let{ref:o,cols:t,rows:n,columns:r,gap:s,gapX:a,gapY:i,columnGap:p,rowGap:l,align:c,alignItems:d,justify:f,justifyContent:m,inline:y,flow:R,autoFlow:x,autoCols:C,autoRows:v,autoColumns:w,autoRow:h,template:S,areas:g,...b}=e,{className:I,style:L,rest:N}=O(b),V=r??t,k=p??a??s,D=l??i??s,F=d??c,z=m??f,E=x??R,B=w??C,G=h??v,X=g??S,$={...y?{display:"inline-grid"}:{},gridTemplateColumns:sa(V),gridTemplateRows:sa(n),columnGap:k,rowGap:D,alignItems:F,justifyContent:nu(z),gridAutoFlow:E,gridAutoColumns:B,gridAutoRows:G,gridTemplateAreas:X,...L};return jsx(u,{ref:o,className:["--grid",I].filter(Boolean).join(" "),style:$,...N})};aa.displayName="Zuz.Grid";var su=aa;var ia=e=>typeof e=="string"&&e.includes("+"),la={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"},ca={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 pa=forwardRef(({children:e,keys:o,as:t,className:n,variant:r},s)=>{let{variant:a}=j(true),i=useMemo(()=>{if(ia(o)){let p=null;return {keys:String(o).split("+").reduce((c,d,f,m)=>(m[f+1]?c.push(d):p=d.toUpperCase(),c),[]),children:p}}return {keys:o,children:String(e).toUpperCase()}},[o]);return jsxs(u,{as:`--keyboard-keys --${r||a||q.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(i.keys)?i.keys:[i.keys]).map(p=>jsx("abbr",{title:ca[p],children:la[p]},p)),jsx(ie,{children:i?.children??e})]})});pa.displayName="Zuz.KeyboardKeys";var Lr=pa;var da=createContext(null),ft=()=>{let e=useContext(da);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},fu=({ref:e,icons:o,children:t,...n})=>{let{playlist:r=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:i="No Track",defaultCover:p,onTrackChange:l,...c}=n,{className:d,style:f,rest:m}=O(c),y=useMediaPlayer(r,r[0]??void 0),R=useMemo(()=>({play:A.play,pause:A.pause,prev:A.prev,next:A.next,volumeHigh:A.volumeHigh,volumeMute:A.volumeMute,...o}),[o]),x=useMemo(()=>({...y,mode:s,icons:R}),[y,R]);return jsx(da.Provider,{value:x,children:jsx(u,{className:`--zuz-media-player ${d}`,style:f,children:t})})},ga=fu;var ha=e=>{if(!e||isNaN(e))return "0:00";let o=Math.floor(e/60),t=Math.floor(e%60);return `${o}:${t.toString().padStart(2,"0")}`},vo=e=>typeof e=="string"?jsx(te,{name:e}):e,ya=()=>{let{mediaRef:e,state:o,controls:t,mode:n}=ft();return jsxs(u,{as:`--mediaplayer-stage rel --mode-${n}`,children:[n==="video"?jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsx("audio",{ref:e}),o.isLoading&&jsx(u,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsx(Re,{})})]})},xa=()=>{let{state:e,defaultArtist:o,defaultTitle:t,defaultCover:n}=ft();return jsxs(u,{as:"--track-info flex aic",children:[jsx(Dt,{src:e.currentItem?.cover||n||"",as:"--track-cover"}),jsxs(u,{as:"flex cols",children:[jsx(u,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsx(u,{as:"--track-artist",children:e.currentItem?.artist||o||"..."})]})]})},ba=()=>{let{state:e,controls:o,icons:t}=ft();return jsxs(u,{as:"--mediaplayer-controls flex aic",children:[jsx(K,{onClick:o.prev,as:"--prev",children:vo(t?.prev??A.prev)}),jsx(K,{onClick:o.togglePlay,as:"--play-pause",children:vo(e.isPlaying?t?.pause??A.pause:t?.play??A.play)}),jsx(K,{onClick:o.next,as:"--next",children:vo(t?.next??A.next)})]})},va=()=>{let{state:e,controls:o,mediaRef:t}=ft(),n=e.progress*(e.duration||0);return jsxs(u,{as:"--track-progress flex aic",children:[jsx(u,{as:"--track-current-duration",children:ha(n)}),jsx(mt,{value:e.progress,onClick:r=>{let s=r.currentTarget.getBoundingClientRect(),a=(r.clientX-s.left)/s.width;o.seek(a);}}),jsx(u,{as:"--track-total-duration",children:ha(e.duration)})]})},Sa=()=>{let{state:e,controls:o,icons:t}=ft();return jsxs(u,{as:"--volume-control flex aic gap:8 w:120",children:[jsx(K,{onClick:()=>o.setIsMuted(),children:vo(e.isMuted?t?.volumeMute??A.volumeMute:t?.volumeHigh??A.volumeHigh)}),jsx(mt,{value:e.volume,className:"h:3 flex:1",onClick:n=>{let r=n.currentTarget.getBoundingClientRect();o.setVolume((n.clientX-r.left)/r.width);}})]})};var du=Object.assign(ga,{Stage:ya,TrackInfo:xa,Controls:ba,Progress:va,Volume:Sa}),gu=du;var Ca=forwardRef((e,o)=>{let t=useNetworkStatus(),{onlineMessage:n,offlineMessage:r,variant:s}=e;return jsxs(u,{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(u,{className:"--ico",children:t?A[Le.Success]:A[Le.Error]}),jsx(_,{as:"--message",children:t?n||"internet connection restored :)":r||"no internet connection"})]})});Ca.displayName="Zuz.NetWorkManager";var xu=Ca;var Pa=forwardRef((e,o)=>{let{strenthMeter:t,onChange:n,...r}=e;"type"in r&&delete r.type;let{style:s,className:a,rest:i}=O(r),[p,l]=useState(false),[c,d]=useState(""),f=useMemo(()=>checkPasswordStrength(c),[c]),m=useDebounce(y=>{t&&d(y.target.value),n&&n(y);},100);return useEffect(()=>{},[]),jsxs(u,{as:"w:100% flex cols",children:[jsxs(u,{style:s,className:"--password flex aic rel",children:[jsx(fe,{ref:o,type:p?"text":"password",className:a,onChange:m,...i}),jsx(K,{tabIndex:-1,onClick:()=>l(y=>!y),className:"--toggle flex aic jcc abs",children:p?A.eye:A.eyeSlash})]}),t&&jsxs(u,{as:`flex aic --password-meter --pb-score-${f.score}`,style:s,children:[jsxs(u,{as:"--password-bars flex aic",children:[jsx(u,{as:`--pbar ${f.score>=1?"--pb-on":""}`.trim()}),jsx(u,{as:`--pbar ${f.score>=2?"--pb-on":""}`.trim()}),jsx(u,{as:`--pbar ${f.score>=3?"--pb-on":""}`.trim()}),jsx(u,{as:`--pbar ${f.score>=4?"--pb-on":""}`.trim()}),jsx(u,{as:`--pbar ${f.score>=5?"--pb-on":""}`.trim()})]}),jsx(_,{as:"--password-meter-label","aria-hidden":true,children:f.result})]})]})});Pa.displayName="Zuz.Password";var Pu=Pa;var Ia=forwardRef((e,o)=>{let{size:t,length:n,mask:r,...s}=e,a=useRef([]),i="pinput",p=false,l={};"with"in s&&(l={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(i=s.name,delete s.name),"required"in s&&(p=true,delete s.required);let{style:c}=O(s),d=m=>{let y=m.currentTarget,R=a.current[parseInt(y.dataset.index)+1],x=a.current[parseInt(y.dataset.index)-1];y.value.length===1&&R?R.focus():y.value.length===0&&x&&x.focus();},{variant:f}=j(true);return useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsx(u,{name:i,style:c,className:`--otp --${s.variant??f??q.Medium} flex aic rel`,"data-required":p,"data-size":t||n||4,...l,children:Array(t||n||4).fill(1).map((m,y)=>jsx(fe,{autoComplete:"new-password","data-index":y,ref:R=>{a.current[y]=R;},numeric:true,onChange:d,maxLength:1,placeholder:r?"\xB7":"0",type:r?"password":"text",...s},`pin-${y}`))})});Ia.displayName="Zuz.PinInput";var Nu=Ia;var Ea=forwardRef((e,o)=>{let{children:t,className:n,name:r,required:s,type:a,value:i,variant:p,checked:l,onSwitch:c,...d}=e,[f,m]=useState(l||false),{variant:y}=j(true),R=useRef(null);return jsxs($t,{className:`${n} --${(a||Oo.Default).toLowerCase()} --radio${!a||a==Oo.Default?"":"card"} --${p||y||q.Small} flex aic rel`.trim(),...d,children:[jsx(fe,{ref:R,defaultChecked:f,value:i||"rd",type:"radio",className:"abs",name:r,required:s||false,onChange:x=>{c&&c(x.target.checked,i||"cb"),m(x.target.checked);}}),jsx(u,{className:"--dot rel",children:jsx(u,{className:"--rod abs abc"})}),jsx(u,{className:"--value",children:t})]})});Ea.displayName="Zuz.Radio";var Mu=Ea;var Na=forwardRef((e,o)=>{let{fx:t,withStyle:n,as:r,reverse:s=false,searchIcon:a=A.search,hideSearchIcon:i=false,clearIcon:p=A.close,hideClearIcon:l=false,onChange:c,onClear:d,...f}=e,{style:m,className:y}=O({as:e.as}),[R,x]=useState(""),{variant:C}=j(true),v=useRef(null);"type"in e&&delete e.type;let w=g=>{x(g.target.value),c?.(g.target.value);},h=g=>{R.trim()!==""&&(x(""),c?.(""),v.current&&(v.current.value="",e.onConfirm?.("")));};useImperativeHandle(o,()=>({focus:()=>v.current?.focus(),value:()=>v.current?.value})),useEffect(()=>{},[]);let S=jsx(K,{tabIndex:-1,onClick:g=>h(),className:"--send flex aic jcc",variant:e.variant||q.Medium,children:R!==""?!l&&(typeof p=="string"?jsx(te,{name:p,as:"--search-action"}):p):!i&&(typeof a=="string"?jsx(te,{name:a,as:"--search-action"}):a)});return jsxs(u,{style:m,className:`--search --no-shrink --${e.variant||C||q.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${y}`.trim(),children:[s&&S,jsx(fe,{ref:v,onChange:w,...f}),e.shortcut&&jsx(Lr,{keys:e.shortcut,as:"--abs"}),!s&&S]})});Na.displayName="Zuz.Search";var Mr=Na;var zu=({label:e,icon:o})=>jsxs(u,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[o&&jsx(te,{name:o}),jsx(_,{as:"--select-group-label",children:e})]}),ka=zu;var Ma=({checkIcon:e,selected:o,updateValue:t,o:n})=>{let r=e?typeof e=="string"?jsx(te,{name:"checkIcon"}):e:A.check,s=n.disabled===true;return jsxs(K,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${o?"--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(_,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),o&&jsx(de,{aic:true,jcc:true,as:"--select-option-check --abs",children:r})]})};Ma.displayName="Option";var Oa=Ma;var Va=(({ref:e,...o})=>{let{selected:t,options:n,label:r,name:s,variant:a,search:i,searchPlaceholder:p,maxHeight:l,arrowDownIcon:c=A.arrowDown,arrowUpIcon:d=A.arrowUp,expanded:f,multiple:m,tokenizer:y,wrapTokens:R,disabled:x,checkIcon:C,closeIcon:v,editable:w,editablePlaceholder:h,onChange:S,required:g,with:b,...I}=o,L=It(),N=!!(s&&L?.setFieldValue),V=kn(s),k=Bn(s),D=w===true&&m!==true&&y!==true,F=M=>typeof M=="string"||typeof M=="number",z=M=>typeof M=="object"&&M!==null&&!Array.isArray(M)&&"value"in M&&"label"in M,E=M=>n.find(ee=>String(ee.value)===String(M)),B=M=>{if(M==null)return null;if(D&&M==="")return "";if(m||y)return (Array.isArray(M)?M:[M]).map(ge=>F(ge)?E(ge):ge).filter(ge=>z(ge));if(F(M)){let ee=E(M);return ee||(D?String(M):null)}return z(M)?M:null},G=()=>{if(t!==void 0)return B(t);let M=n.find(ee=>String(ee.value)==="-1");return M||(D?"":null)},X=M=>Array.isArray(M)?M.map(ee=>ee.value):z(M)?M.value:M,[$,Z]=useState(()=>G()),[U,W]=useState(false),[re,J]=useState(null),ce=useRef(null),me=useRef(null),Ce=useRef(null),le=useId(),pe=useMemo(()=>s||le,[s,le]),{reposition:Y}=Mt(Ce,{direction:vt.Bottom,offset:2}),{variant:se}=j(true),ne=v?typeof v=="string"?jsx(te,{name:v}):v:A.close,{className:he,style:Ae,rest:Te}=O(I,void 0),{onClick:ye,...Oe}=Te||{},ae=useMemo(()=>k!==void 0?B(k):$,[k,$,n,D,m,y]),be=useMemo(()=>{if(!(!ae||Array.isArray(ae)||!z(ae)))return ae},[ae]),Wt=useMemo(()=>D?z(ae)?String(ae.value??""):F(ae)?String(ae):"":"",[D,ae]),Ut=M=>Array.isArray(ae)?ae.some(ee=>ee.value===M.value):z(ae)?ae.value===M.value:D&&F(ae)?String(ae)===String(M.value):false,$e=M=>{if(N&&L?.setFieldValue&&s){L.setFieldValue(s,X(M));return}Z(M);},De=M=>{S?.(w===true&&M instanceof Option?String(M.value):M);},No=M=>{if(!(x||M.disabled)){if(m||y){let ee=Array.isArray(ae)?ae:[],Be=ee.find(Bo=>Bo.value===M.value)?ee.filter(Bo=>Bo.value!==M.value):[...ee,M];$e(Be),De(Be);return}$e(M),W(false),De(M);}},mi=M=>{let ee=M.target.value,ge=ee===""?null:E(ee),Be=ge?ge.value:ee;$e(Be),De(Be);},pi=M=>{if(M.key==="Enter"&&(M.preventDefault(),D)){let ee=M.currentTarget.value.trim();if(!ee){W(false);return}let Be=E(ee)??ee;$e(Be),De(Be),W(false);}},ui=(M,ee)=>{if(M.stopPropagation(),x)return;let ge=ae.filter(Be=>Be.value!==ee.value);$e(ge),W(false),De(ge);},fi=M=>{let ee=M.currentTarget,ge=ee.scrollTop===0&&M.deltaY<0,Be=ee.scrollHeight-ee.scrollTop===ee.clientHeight&&M.deltaY>0;!ge&&!Be||M.preventDefault(),M.stopPropagation();};useImperativeHandle(e,()=>({setSelected:M=>{$e(B(M));},getValue:()=>ae??null}),[ae,n,D,m,y,N,s]),useEffect(()=>{N||t===void 0||Z(B(t));},[t,N,n,D,m,y]),useEffect(()=>{if(!U)return;let M=()=>{Y();};return window.addEventListener("scroll",M,true),window.addEventListener("resize",Y),()=>{window.removeEventListener("scroll",M,true),window.removeEventListener("resize",Y);}},[U,Y]),useEffect(()=>{if(!U){me.current&&(me.current.value=""),J(null);return}me.current?.focus(),Y();let M=ge=>{ce.current&&!ce.current.contains(ge.target)&&W(false);},ee=setTimeout(()=>{document.addEventListener("click",M);},0);return ()=>{clearTimeout(ee),document.removeEventListener("click",M);}},[U,Y]);let di=useDebounce(M=>J(M===""?null:M),300),gi=useDebounce(mi,300);return jsxs(u,{ref:ce,"data-required":g?"true":void 0,with:b,className:[`--select ${f==true?"--expanded":""}`,`--${a||se}`,`${s?`--${s}`:""}`,`${V?"--has-error":""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:pe,children:[D?jsxs(u,{"data-value":be?.value??(Wt||"-1"),className:`--select-display --selected --editable flex aic rel ${he}`.trim(),style:Ae,onClick:M=>M.stopPropagation(),...Oe,children:[be?.icon&&jsx(te,{as:"--selected-icon",name:be.icon}),jsx(de,{aic:true,as:"--label-wrapper",children:jsx(fe,{"aria-expanded":U,className:"--select-input",disabled:x,onChange:gi,onClick:M=>{M.stopPropagation(),x||W(true);},onKeyDown:pi,placeholder:h||r||"Choose",type:"text",defaultValue:Wt})}),jsx(K,{className:"--select-toggle rel flex aic jcc",disabled:x,onClick:M=>{M.stopPropagation(),x||W(ee=>!ee);},tabIndex:-1,withLabel:false,children:U?typeof d=="string"?jsx(te,{name:d,as:"--search-action"}):d:typeof c=="string"?jsx(te,{name:c,as:"--search-action"}):c})]}):jsxs(K,{disabled:x,variant:a||se,"data-value":be?.value??"-1",className:`--select-display --selected flex aic rel ${he}`.trim(),withLabel:false,style:Ae,onClick:M=>{M.stopPropagation(),x||W(ee=>!ee);},...Oe,children:[be?.icon&&jsx(te,{as:"--selected-icon",name:be.icon}),jsx(de,{aic:true,as:"--label-wrapper",children:y&&Array.isArray(ae)&&ae.length>0?jsxs(de,{as:`--tokens-wrap${R===true?" --wrap":""}`,children:[ae.map(M=>jsxs(de,{aic:true,as:"--token",children:[jsx(_,{as:"--token-label",children:M.label}),jsx(u,{as:"--token-remove",onClick:ee=>ui(ee,M),children:ne})]},M.value)),ae.length<n.length&&jsx(_,{as:"--label",children:r||"Choose"})]}):jsx(_,{as:"--label",children:Array.isArray(ae)?ae.length>0?`${ae.length} selected`:r||"Choose":be?.label||r||"Choose"})}),jsx(u,{className:"--svg-arrow rel flex aic jcc",children:U?typeof d=="string"?jsx(te,{name:d,as:"--search-action"}):d:typeof c=="string"?jsx(te,{name:c,as:"--search-action"}):c})]}),jsxs(u,{id:pe,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!U,onWheel:fi,style:{maxHeight:l||"auto"},ref:Ce,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:U,duration:.05},children:[i&&jsx(u,{as:"--select-search --no-shrink flex --sticky",children:jsx(Mr,{ref:me,variant:q.Small,placeholder:p||"Search...",onChange:di})}),r&&jsx(ka,{label:r}),n?.filter(M=>!re||M.label.toLowerCase().includes(re.toLowerCase()))?.map(M=>jsx(Oa,{updateValue:No,checkIcon:C,selected:Ut(M),o:M},`option-${M.label.replace(/\s+/g,"-")}-${M.value}`))]})]})});Va.displayName="Zuz.Select";var Wu=Va;var Ha=({ref:e,...o})=>jsx(Ft,{type:Ke.Switch,...o,ref:e});Ha.displayName="Zuz.Switch";var Uu=Ha;var $a=e=>{let{idx:o,id:t,as:n,weight:r,style:s,value:a,render:i,resize:p,sortBy:l,sortable:c,onSort:d}=e,[f,m]=useState(0),y=()=>{c&&(d?.(String(t),f==1?-1:1),m(R=>R==1?-1:1));};return jsxs(u,{style:{flex:r||1,...s},as:`--col flex aic ${n||""} ${c?"--sortable":""}`,onClick:y,children:[jsx(u,{as:"--colv",children:a}),o==-1&&c&&l==t&&jsx(u,{as:"--arrow flex aib",children:f==1?A.arrowUp:A.arrowDown})]})};$a.displayName="Zuz.Column";var Po=$a;var za=e=>{let{index:o,pubsub:t,schema:n,data:r,ids:s,styles:a,animate:i,sortBy:p,selectable:l,tableRef:c,loading:d,rowClassName:f,onSort:m,onRowClick:y,onSelect:R,onContextMenu:x}=e,C=useDelayed(),v=useMemo(()=>({transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:.02*(o+1)}),[]),w=useRef(null),h=(g,b)=>{o==-1?t.emit(`ALL_ROWS_${g?"CHECKED":"UNCHECKED"}`,g):(R&&R(r,g),t.emit(`ROW_${g?"CHECKED":"UNCHECKED"}`,g,b));},S=(g,b,I)=>jsx(Po,{idx:g,id:b,as:"--selector",pubsub:t,value:jsx(Ft,{value:I,ref:w,onSwitch:h,type:Ke.Default})});return useEffect(()=>{let g=(N,V)=>{w.current?.setChecked(N,false);},b=(N,V)=>{let k=false;c?.current&&c.current.querySelectorAll(".--row").forEach(D=>{let F=D;if(!F.classList.contains("--row-head")){let z=F.querySelector(".--selector input[type=checkbox]");z&&z.checked&&!k&&(k=z.checked);}}),w.current.setChecked(k,false);},I=N=>{w.current?.setChecked(N,false),R&&R(r,N);},L=N=>{w.current?.setChecked(N,false),R&&R(r,N);};return o==-1?(t.on("ROW_CHECKED",g),t.on("ROW_UNCHECKED",b),()=>{t.off("ROW_CHECKED",g),t.off("ROW_UNCHECKED",b);}):(t.on("ALL_ROWS_CHECKED",I),t.on("ALL_ROWS_UNCHECKED",L),()=>{t.off("ALL_ROWS_CHECKED",I),t.off("ALL_ROWS_UNCHECKED",L);})},[]),jsxs(u,{onContextMenu:g=>x?x(g,r):null,onClick:g=>y?y(g,e.data):()=>{},...i?{fx:{...v,when:C}}:{},as:`--row flex aic ${y?"--row-clickable":""} ${o==-1?"--row-head":""} ${f||""}`,children:[o==-1&&n.map((g,b)=>{let{renderWhenHeader:I,render:L,value:N,...V}=g;return jsxs(Fragment,{children:[l&&b==0&&S(-1,`--selector-${g.id}`,"all"),jsx(Po,{idx:-1,onSort:m,sortBy:p,value:N,...V,pubsub:t,style:a[g.id]})]},`--col-${g.id}`)}),d&&o>-1&&jsx(u,{as:"--col",children:jsx(_,{as:"opacity:0",children:"..."})}),!d&&o>-1&&s&&r&&n.map((g,b)=>jsxs(Fragment,{children:[l&&b==0&&S(b,`--selector-${g.id}`,g.id.toString()),s.includes(String(g.id))?jsx(Po,{pubsub:t,idx:b,id:String(g.id),style:a[String(g.id)],value:g.render?g.render(r,o):r[String(g.id).includes(".")?String(g.id).split(".").reverse()[0]:g.id]}):null]},`--${String(g.id)}-val-${b}`))]})};za.displayName="Zuz.Row";var Ro=za;var Wa=(e,o)=>{let{schema:t,rows:n,rowCount:r,rowsPerPage:s,currentPage:a,pagination:i,paginationHash:p,showPaginationOnZeroPageCount:l,animateRows:c,header:d,rowClassName:f,selectableRows:m,hoverable:y,sortBy:R,loading:x,loadingRowCount:C,loadingMessage:v,spinner:w,emptyMessage:h,onSort:S,onRowClick:g,onRowSelectToggle:b,onPageChange:I,onRowContextMenu:L,...N}=e,V=useRef(null),k=useMemo(()=>t.reduce((pe,Y)=>(pe[Y.id]={flex:Y.weight||1,...Y.w&&{width:Y.w},...Y.maxW&&{maxWidth:Y.maxW},...Y.minW&&{minWidth:Y.minW},...Y.h&&{height:Y.h},...Y.maxH&&{maxHeight:Y.maxH},...Y.minH&&{minHeight:Y.minH}},pe),{}),[t]),D=useMemo(()=>Object.keys(k),[t]),F=useMemo(()=>d??true,[d]),{style:z,className:E,rest:B}=O(N),G=useRef(null),X=useMemo(()=>new PubSub,[]),$=useRef(n.map(()=>uuid(8))),[Z,U]=useState(R||null),[W,re]=useState(v||"loading"),J=useMemo(()=>!x&&n&&n.length==0,[x,n]),ce=useCallback(()=>h?typeof h=="function"?jsx(h,{}):h:jsx(_,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);useEffect(()=>{n.length&&!$.current&&($.current=n.map(()=>uuid(8)));},[n]);let me=(pe,Y)=>{U(pe),S?.(pe,Y);},Ce=(r||(n?n.length:0))/(s||10),le=useMemo(()=>l||Ce>1?jsx(Ht,{hash:p,ref:V,renderOnZeroPageCount:l,onPageChange:I,paginationStyle:"table",startPage:a,itemCount:r||(n?n.length:0),itemsPerPage:s||10}):null,[a,r]);return useImperativeHandle(o,()=>({setLoading(pe){}})),jsxs(u,{as:`--table ${y??true?"--hoverable":""} flex cols rel ${E}`,ref:G,children:[F==true&&jsx(Ro,{sortBy:Z,onSort:me,tableRef:G,pubsub:X,selectable:m,index:-1,schema:t,loading:true,styles:k}),x&&jsxs(u,{as:"center-x flex aic --table-spinner",children:[jsx(Re,{type:w||we.Simple}),W&&jsx(_,{as:"--table-loading-message",children:W})]}),x&&Array(C||5).fill({}).map((pe,Y)=>jsx(Ro,{tableRef:G,index:Y,pubsub:X,schema:t,styles:k,loading:true,animate:c,onRowClick:g},`--trow-loading-${Y}-${t[0].id}`)),!x&&n&&n.map((pe,Y)=>jsx(Ro,{tableRef:G,pubsub:X,loading:false,index:Y,schema:t,ids:D,styles:k,animate:c,data:pe,onRowClick:g,rowClassName:f,selectable:m,onSelect:b,onContextMenu:L},`--trow-${$.current[Y]||Y}-${t[0].id}`)),J&&ce(),i&&le&&jsx(u,{"aria-hidden":!i||!le,...c?{fx:{transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&i&&le!=null}}:{},as:"--row flex aic --row-footer",children:le})]})};Wa.displayName="Zuz.Table";var sf=forwardRef(Wa),af=sf;var cf=({ref:e,...o})=>{let{title:t,items:n}=o,[r,s]=useState(0),a=(i,p,l)=>{i.preventDefault(),s(p),document.getElementById(l)?.scrollIntoView({behavior:"smooth"});};return jsxs(u,{ref:e,as:"--table-of-contents rel flex cols",children:[jsx(_,{as:"--toc-title",children:t}),jsx(_e,{items:n.map((i,p)=>jsx("a",{className:r==p?"--toc-active":"",style:{anchorName:r===p?"--toc-active":"none",color:r==p?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:l=>a(l,p,i.tag),href:`#${i.tag}`,children:i.label}))})]})},mf=cf;var Ua=({isActive:e,transitionType:o,speed:t,width:n,render:r,content:s,onHeightChange:a})=>{let i=useRef(null),p=useResizeObserver(i);useEffect(()=>{e&&p.height>0&&a(p.height);},[e,p.height]);let c=useMemo(()=>{let d={width:n>0?`${n}px`:"100%",minWidth:n>0?`${n}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return o==="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}:o==="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,o,n,t]);return jsx(u,{ref:i,style:{...c},className:"--content",children:r||e?s:null})};Ua.displayName="Zuz.TabBody";var Ga=Ua;var Ya=({ref:e,...o})=>{let{tabs:t,speed:n=.3,prerender:r=true,variant:s,tabStyle:a="fixed",onChange:i,transitionType:p="slide",...l}=o,[c,d]=useState(0),f=useRef(null),m=useResizeObserver(f),y=useMemo(()=>uuid(8),[]),[R,x]=useState("auto"),C=useMemo(()=>m.width>0,[m.width]);useImperativeHandle(e,()=>({setTab:b=>d(b)}));let v=useMemo(()=>t.map(b=>({...b,key:b.key||uuid(8)})),[t]),{style:w,className:h,rest:S}=O({as:`flex cols w-full no-overflow ${l.as||""}`,...l}),g=()=>{if(!C)return {opacity:0};switch(p){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${v.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${c*m.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxs(u,{ref:f,style:w,className:`--tabview --${a} flex cols ${h}`,children:[jsx(zt,{as:"--tabview-head",onSwitch:b=>{d(b.index);let I=v.find(L=>L.tag==b.tag);I&&I.onSelect&&(I.onSelect(I,b.index),i?.(I,b.index));},selected:c,items:v.reduce((b,I,L)=>(b.push({icon:I.icon,index:L,label:I.label,tag:I.tag}),b),[])}),jsx(u,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:R,transition:C?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:C?1:0},children:jsx(u,{className:"--track",style:{...g()},children:v.map((b,I)=>jsx(Ga,{isActive:I===c,transitionType:p,speed:n,width:m.width,render:r||I===c,onHeightChange:L=>I===c&&x(L),content:b.body},`tab-body-${b.key||I}-${y}`))})})]})};Ya.displayName="Zuz.TabView";var vf=Ya;var Tf=({ref:e,commands:o,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:r="zuz ~ ",variant:s,...a})=>{let[i,p]=useState([{type:"output",content:n}]),[l,c]=useState(""),d=useRef(null),f=useRef(null),{variant:m}=j(true);useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight);},[i]);let y=h=>{let S=typeof h=="string"?{type:"output",content:h}:h;p(g=>{let b=[...g,S];return b.length>1e3?b.slice(-1e3):b});},R=()=>p([]);useImperativeHandle(e,()=>({write:y,clear:R}));let x=async h=>{let[S,...g]=h.split(" "),b=S.toLowerCase();return o&&o[b]?await o[b](g):t?await t(h):`command not found: ${S}`},C=h=>{let S=/\u001b\[(\d+)m/g,g=[],b={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,L="#d4d4d4",N=false,V;for(;(V=S.exec(h))!==null;){let D=h.slice(I,V.index);D&&g.push({text:D,color:L,bold:N});let F=V[1];F==="0"?(L="#d4d4d4",N=false):F==="1"?N=true:b[F]&&(L=b[F]),I=S.lastIndex;}let k=h.slice(I);return k&&g.push({text:k,color:L,bold:N}),g},v=(h,S)=>h.includes("\x1B")?C(h).map((g,b)=>jsx(ie,{style:{color:g.color||"#d4d4d4",fontWeight:g.bold?"bold":"normal"},children:g.text},`--terminal-msg-${b}-${g.text.replace(/\S+/g,"-")}`)):jsx(ie,{style:{color:S==="error"?"#ff5f56":S==="command"?"#00ff00":"#d4d4d4"},children:h}),w=async h=>{if(h.key==="Enter"&&l.trim()){let S=l.trim(),g=[...i,{type:"command",content:`${r}${S}`}];c(""),p(g);let b=await x(S);p(I=>[...I,{type:"output",content:b}]);}};return jsxs(u,{as:`--zuz-terminal --${s||m||q.Medium} flex cols ${a.className}`,onClick:()=>f.current?.focus(),children:[jsx(u,{ref:d,className:"--terminal-log",children:i.map((h,S)=>jsx(u,{children:jsx(_,{children:v(h.content,h.type)})},S))}),jsxs(u,{as:"flex aic --terminal-input",children:[jsx(_,{as:"--terminal-prompt",children:r}),jsx(fe,{ref:f,className:"--zuz-term-input",autoFocus:true,value:l,variant:s||m||q.Medium,onChange:h=>c(h.target.value),onKeyDown:w})]})]})},Pf=Tf;var Rf=({meta:e})=>jsxs(K,{as:"flex aic --command-item",children:[e.icon&&jsx(te,{name:e.icon,as:"--command-icon"}),jsx(_,{children:e.label})]}),If=({position:e,onSelect:o,commands:t,visible:n})=>jsx(u,{"aria-hidden":!n,fx:{transition:Q.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(r=>jsx(Rf,{meta:r},`cmd-${r.label.replace(/\s+/,"-")}`))}),ei=If;var ri=({ref:e,...o})=>{let {autoResize:t,maxHeight:n,variant:r,resize:s="none",command:a,commands:i,name:p,onInput:l,cmd:c,renderDropdown:d,value:f,defaultValue:m,...y}=o,R=useRef(null),x=useRef(null),{variant:C}=j(true),{style:v,className:w,rest:h}=O(y),S=at();p?S.errors?.[p]:null;let b=p&&S.values&&S.setFieldValue,I=b?S.values?.[p]:void 0,L=useDebounce(B=>{b&&S.setFieldValue?.(p,B);},500),{showDropdown:N,dropdownPosition:V,handleKeyDown:k,handleInput:D,handleCommandSelect:F}=useCommandActions({command:a,commands:i,cmd:c,ref:R}),z=useCallback(()=>{let B=R.current;!B||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{B.style.height="auto";let G=B.scrollHeight;if(n){let X=parseInt(n.toString(),10);isNaN(X)||(G=Math.min(G,X));}B.style.height=`${G}px`,B.style.overflowY=n&&G>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),E=B=>{L(B.currentTarget.value),l?.(B),D(B),z();};return useEffect(()=>{R.current&&p&&I!==void 0&&R.current.value!==String(I)&&(R.current.value=String(I));},[I,p]),useEffect(()=>{z();},[f,m,z]),useEffect(()=>{t&&R.current&&z();},[t,z]),useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),useEffect(()=>()=>{b&&S.deleteFieldValue?.(p);},[]),jsxs(u,{as:"rel --flex w-full",children:[jsx("textarea",{name:p,className:`--input --textarea --${r||C||q.Medium} flex ${w}`.trim(),style:{...v,resize:s,height:t?"auto":v?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:k,onInput:E,ref:B=>{R.current=B,typeof e=="function"?e(B):e&&(e.current=B);},value:f,defaultValue:m,...h}),d?d({show:N,position:V,commands:i||[],onSelect:F}):i&&i.length>0&&jsx(ei,{visible:N,commands:i,onSelect:F,position:V})]})};ri.displayName="Zuz.TextArea";var Lf=ri;var si=forwardRef((e,o)=>{let{as:t,value:n,color:r,direction:s,...a}=e,i=useRef(null),[p,l]=useState(n||0);return useImperativeHandle(o,()=>({updateValue(c){p.toString().length!==c.toString().length&&l(c);},setValue(c){if(this.updateValue(c),i.current){let d=c.toString().split("");i.current.querySelectorAll(".--wheel-char").forEach((f,m)=>{let y=d[m];if(f instanceof HTMLElement){f.setAttribute("data-value",y);let R=f.querySelector(".--wheel-char-track");R instanceof HTMLElement&&(R.style.setProperty("--v",y),R.offsetWidth);}});}}})),useEffect(()=>{l(n||0);},[n]),jsxs(u,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:i,...a,children:[(p||0).toString().split("").map((c,d)=>isNaN(parseInt(c,10))?jsx(ie,{className:"--wheel-char wheel-char-symbol grid",children:c},`wheel-char-symbol-${d}`):jsx(ie,{"data-value":c,className:`--wheel-char grid ${d>(p||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxs(ie,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":c},children:[jsx(ie,{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(ie,{children:f},`${d}--${m}`)),jsx(ie,{children:!s||s==="down"?9:0})]})},`wheel-char-${d}`)),r&&jsx(u,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${r}, transparent, transparent, transparent, ${r})`}})]})});si.displayName="Zuz.TextWheel";var $f=si;var _r=forwardRef((e,o)=>{let{as:t,meta:n,nodes:r,icons:s,onSelect:a,treeTag:i,selected:p,roots:l,expanded:c,...d}=e,{tag:f,label:m,icon:y,under:R,isHead:x}=n,C=useMemo(()=>l.includes(f),[l]),[v,w]=useState(c),h=()=>{localStorage.setItem(`--tn${i}-${f}`,v?"0":"1"),w(!v);};useEffect(()=>{c||C&&!localStorage.getItem(`--tn${i}-${f}`)?(localStorage.setItem(`--tn${i}-${f}`,"1"),w(true)):w(localStorage.getItem(`--tn${i}-${f}`)=="1");},[]);let S=useMemo(()=>r.filter(g=>g.under==f),[r,f]);return jsxs(u,{className:`--treenode ${C?"--is-root":""} --treenode-${f} flex cols`,children:[jsxs(u,{className:`--node --node-${f} flex aic ${p==f?" --selected":""}`,children:[jsx(K,{skeleton:d.skeleton,onClick:h,className:"--node-aro-btn",disabled:S.length==0,children:s?.arrowClose&&s?.arrowOpen?jsx(te,{skeleton:d.skeleton,className:"--node-aro-icon",name:S.length==0?s?.arrowDisabled||s?.arrowClose:v?s?.arrowOpen:s?.arrowClose}):S.length==0?A.chevronBottom:v?A.chevronBottom:A.chevronRight}),jsxs(K,{className:"--node-meta flex aic",onClick:g=>a(f),children:[(s?.nodeOpen&&s?.nodeClose||C&&s?.rootOpen&&s?.rootClose)&&jsx(te,{skeleton:d.skeleton,className:`--node-icon ${C?"--icon-root":""}`,name:y||(v?C&&s?.rootOpen||s.nodeOpen:C&&s?.rootClose||s?.nodeClose)}),jsx(_,{className:`--node-label ${C?"--node-label-root":""}`.trim(),skeleton:d.skeleton,children:m})]})]}),v&&S.length>0&&jsx(u,{className:`--sub-node tree-sub-node-${f} flex cols`,children:S.map(g=>jsx(_r,{treeTag:i,selected:p,onSelect:a,icons:s,roots:l,expanded:g.expanded||false,meta:g,nodes:r},`--node-${g.tag}`))})]})});_r.displayName="TreeItem";var ii=_r;var ci=forwardRef((e,o)=>{let{as:t,nodes:n,onNodeSelect:r,tag:s,icons:a,roots:i,selected:p,...l}=e,[c,d]=useState(p);useImperativeHandle(o,()=>({getSelected:()=>c}),[r]);let f=m=>{d(m),r&&r(m);};return useEffect(()=>{c!=p&&d(p);},[p]),jsx(u,{className:"--treeview flex cols",children:n.filter(m=>i.includes(m.tag)).map(m=>jsx(ii,{treeTag:s?`-${s}`:"",selected:c,onSelect:y=>f(y),icons:a,meta:m,roots:i,expanded:m.expanded||false,skeleton:l.skeleton,nodes:n},`--node-${m.tag}`))})});ci.displayName="Zuz.TreeView";var Gf=ci;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
13
+ export{Le as ALERT,Gr as AVATAR,Nc as Accordion,Dc as ActionBar,Ac as Alert,im as AutoComplete,yr as Avatar,hm as Badge,u as Box,Ym as BubbleAttachmentType,Xm as BubbleMediaType,ks as BubbleStatus,K as Button,Is as CHART,Ke as CHECKBOX,Jf as COLORTHEME,xr as Calendar,zm as Carousel,qm as Chart,Cr as ChatBubble,tp as ChatList,Ft as CheckBox,fp as CodeBlock,Np as ColorScheme,Zo as ContextMenu,Mp as CookiesConsent,Fe as Cover,Fp as CropShape,Ap as Cropper,_p as Crumb,rd as DATATYPE,et as DIALOG,qr as DIALOG_ACTION_POSITION,Pe as DRAWER_SIDE,Up as DatePicker,sr as Dialog,lr as Drawer,qt as FILTER,Je as FORMVALIDATION,nd as FORMVALIDATION_STYLE,Yp as Fab,Jp as Fieldset,ou as Filters,de as Flex,tr as Form,su as Grid,Ko as Group,te as Icon,Dt as Image,fe as Input,Lr as KeyboardKeys,ca as KeysLabelMap,la as KeysMap,$t as Label,zo as LayersProvider,_e as List,gu as MediaPlayer,xu as NetworkStatus,St as ORIGIN,ed as OriginType,tt as Overlay,td as PLACEMENTS,vt as POSITION,ad as PROGRESS,Ht as Pagination,fo as PaginationStyle,Pu as Password,Nu as PinInput,ve as Position,Lt as ProgressBar,Oo as RADIO,Mu as Radio,Me as SHEET,Lo as SHEET_ACTION_POSITION,Qf as SKELETON,Mo as SLIDER,od as SORT,we as SPINNER,Bt as ScrollView,Mr as Search,Wu as Select,zt as SelectTabs,hl as Sheet,mt as Slider,oo as SnackPosition,wn as SnackStyle,to as SnackType,ie as Span,Re as Spinner,sd as Status,Uu as Switch,Q as TRANSITIONS,oe as TRANSITION_CURVES,vf as TabView,af as Table,mf as TableOfContents,Pf as Terminal,_ as Text,$f as TextWheel,Lf as Textarea,Ri as ThemeProvider,Cn as ToastDefaultTitle,oo as ToastPosition,mr as ToastProvider,wn as ToastStyle,to as ToastType,Pt as ToolTip,Gf as TreeView,q as Variant,yi as __ZUZJS_UI_VERSION,wt as animationTransition,Do as buildClassString,jr as buildWithStyles,Pd as css,Vo as getAnimationCurve,Rd as getAnimationTransition,bi as getZuzMap,ia as isKeyCombination,Yr as setZuzMap,O as useBase,ic as useContextMenu,mc as useDialog,fc as useDrawer,Se as useFx,hc as useMorph,Mt as usePosition,Cc as useSnack,Wo as useToast};