@zuzjs/ui 1.0.52 → 1.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import {f,e,g,d,h,c}from'./chunk-AUKW5BSO.js';export{e as PACKAGE_NAME,f as cleanProps,g as splitAtoms}from'./chunk-AUKW5BSO.js';import {createContext,forwardRef,useMemo,Fragment,useEffect,useRef,useImperativeHandle,useState,useCallback,createElement,isValidElement,useId,useLayoutEffect,useContext,useSyncExternalStore,startTransition}from'react';import {useDelayed,useScrollbar,useDebounce,useImage,useResizeObserver,useLineChart,useImageCropper,CropShape,useNetworkStatus,useIntersectionObserver,useCarousel,useTimer,useMediaPlayer,AnchorType,useAnchorPosition,KeyCode,useShortcuts,useCommandActions}from'@zuzjs/hooks';import {createPortal}from'react-dom';import {MD5,uuid,withPost,_,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 wr={Circle:"CIRCLE",Square:"SQUARE"},af={Default:"DEFAULT",Circle:"CIRCLE"},lf={Light:"light",Dark:"dark",System:"system"},Ve={Default:"DEFAULT",Switch:"SWITCH"},ut={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ge=ut,ft=AnchorType,cf=ft,U={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},mf={Asc:"ASC",Desc:"DESC"},pf={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},uf={Dots:"DOTS"},We={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN",NotEmpty:"NOT_EMPTY",NotMinusOne:"NOT_MINUS_ONE"},Pe={Success:"success",Error:"error",Warning:"warning",Info:"info"},Q={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},Y={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},ff={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},Re={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},tt=Re,lo={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Sr=lo,df={Bar:"BAR",Ring:"RING"},co={Default:"range",Text:"number"},mo={Default:"DEFAULT",Card:"CARD"},kt={Gooey:"gooey"},we={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Cr=Symbol.for("zuz.global.map"),Tr=e=>{globalThis[Cr]=e;},La=()=>globalThis[Cr]||{},po=e$1=>{let r=Array.isArray(e$1)?e$1.join(" "):e$1;if(!r||typeof r!="string")return "";let t=La();return process.env.NODE_ENV==="development"&&Object.keys(t).length===0&&console.warn(`[${e}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),g(r).filter(Boolean).map(o=>{let s=o.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,p,f]=s;return g(f).map(l=>{let m=`${p}(${l})`;return t[m]||l}).join(" ")}return t[o]||o}).join(" ")},Lf=e=>{let r=Array.isArray(e)?e.join(" "):e;return !r||typeof r!="string"?"":po(r)},Pr=e=>{let r={};for(let t in e){let n=e[t];if(t.startsWith("--")){r[t]=n;continue}let o=d[t]?.toString()??t;if(o==="x"||o==="translateX"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${h.addUnitsSafely(t,n)} ${s[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${s[0]??"0px"} ${h.addUnitsSafely(t,n)}`;}else c.includes(o)?r[o]=h.addUnitsSafely(t,n):r[o]=n;}return r},uo=e=>{if(!e)return "linear";switch(e.toUpperCase()){case Q.Bounce:return "var(--bounce)";case Q.Liquid:return "var(--liquid)";case Q.Spring:return "var(--spring)";case Q.EaseInOut:return "ease-in-out";case Q.EaseOutBack:return "ease-out-back";default:return "linear"}},dt=(e,r=0,t=0)=>{let n={},o={},s=r||20,a=t||0;switch(e){case Y.SlideInLeft:case Y.SlideInRight:n={"--fx-x":e===Y.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},o={"--fx-x":`${a}px`,opacity:1};break;case Y.SlideInTop:case Y.SlideInBottom:n={"--fx-y":e===Y.SlideInTop?`-${s}px`:`${s}px`,opacity:0},o={"--fx-y":`${a}px`,opacity:1};break;case Y.ScaleIn:n={scale:0,opacity:0},o={scale:1,opacity:1};break;case Y.FadeIn:n={opacity:0},o={opacity:1};break}return {from:n,to:o}},Of=(e,r,t)=>{let{from:n,to:o}=dt(e);return r?{...n,...o}:t?n:o};var Va=(e,r)=>{let t=useRef([]),n=useRef(false);return useEffect(()=>{e?.when||(n.current=false);},[e?.transition]),useEffect(()=>{let o=r?.current;if(!o||!e||!e.clearAtEnd)return;let s=a=>{t.current.includes(a.propertyName)&&e.clearAtEnd===true&&(o.style.transform="",o.style.filter="",t.current.forEach(p=>o.style.removeProperty(p)));};return o.addEventListener("transitionend",s),()=>o.removeEventListener("transitionend",s)},[e,r]),useEffect(()=>{if(typeof window>"u"||!r?.current)return;let o=r.current;(e?.scroll||e?.mouse)&&(o.style.willChange="transform",o.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",o.style.transition=`translate 0.1s ${e.curve?uo(e.curve):"var(--spring)"}`);},[e,r]),useMemo(()=>{if(!e)return {style:{}};let{transition:o,from:s,to:a,exit:p,when:f,duration:l=.3,delay:m=0,curve:c,margin:i=0,offset:d=20,watch:P=[]}=e,S=f===false&&!n.current;f===true&&(n.current=true);let x={},{from:R,to:C}=o?dt(o,d,i):{from:s||{},to:a||{}};x=f===void 0?{...R,...C}:f?{...C}:p||R;let T=uo(c),g=[],b=Pr(x);t.current=Object.keys(b);let h={...b};return Object.keys(b).forEach(y=>{let I=y.startsWith("--")?"all":y;g.includes(I)||g.push(`${I} ${l}s ${T} ${m}s`);}),P.forEach(y=>{g.includes(y)||g.push(`${y} 0.1s ${T} 0s`);}),{style:{...h,transition:S?"none":g.join(", "),opacity:S?0:h.opacity,pointerEvents:S?"none":h.pointerEvents}}},[e,e?.when,e?.watch])},he=Va;var Mt=null,Da=(e,r)=>{let{as:t,fx:n,busy:o=false,stripes:s,transition:a,skeleton:p,className:f$1,propsToRemove:l,draggable:m,dragOptions:c,style:i,...d}=e||{},P=typeof window<"u",S={},x={};if(m&&P&&!Mt&&(import('@zuzjs/hooks').then(b=>{Mt=b.useDrag;}).catch(b=>{console.error("Error loading useDrag:",b);}),Mt)){let b=Mt(c);S={onMouseDown:b.onMouseDown},x={transform:`translate(${b.position.x}px, ${b.position.y}px)`};}let R=[f$1,o===true?"--is-busy":"",s?`--has-stripes --stripes-${s}`:""].filter(Boolean).join(" "),C=a?{transition:a,duration:.3}:n||{},{style:T}=he(C,r),g=po(t??"");return {style:{...i,...T,...x},className:[R,g||"",p?.enabled?"--skeleton":"",m?"--draggable":""].join(" ").trim(),rest:{...S,...f(d,l?[...l,"skeleton"]:["skeleton"])}}},B=Da;var Nr="(prefers-color-scheme: dark)",Aa=typeof window>"u",Er=createContext(void 0),yo=e=>{let r=useContext(Er);if(!r){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return r},J=yo,za=({children:e,storageKey:r="--ucs",forceTheme:t,zuzMap:n,...o})=>(n&&Tr(n),jsx(Fa,{storageKey:r,forceTheme:t,...o,children:e})),Fa=({children:e,storageKey:r,forceTheme:t,...n})=>{let[o,s]=useState(()=>t||Br(r,"system")),[a,p]=useState(()=>t||Br(r)),f=i=>(i||(i=window.matchMedia(Nr)),i.matches?"dark":"light"),l=useCallback(i=>{let d=i=="system"?f():i,P=document.documentElement;P.setAttribute("color-scheme",d),P.style.colorScheme=d,p(d);},[f]),m=useCallback(i=>{s(i),localStorage.setItem(r,i),l(i);},[o]),c=useCallback(i=>{let d=f(i);p(d),o==="system"&&l("system");},[o]);return useEffect(()=>{o==null&&window.localStorage.getItem(r);},[o]),useEffect(()=>{window.matchMedia(Nr).addEventListener("change",c);},[c]),useEffect(()=>{let i=d=>{d.key==r&&(d.newValue?m(d.newValue):m("system"));};return window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[m]),useEffect(()=>{l(t||o||"system");},[o]),jsxs(Er,{value:{colorScheme:o,resolvedScheme:a,setColorScheme:m,...n},children:[t?null:jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
1
+ import {f,e,g,d,h,c}from'./chunk-CXSDT3RX.js';export{e as PACKAGE_NAME,f as cleanProps,g as splitAtoms}from'./chunk-CXSDT3RX.js';import {createContext,forwardRef,useMemo,Fragment,useEffect,useRef,useImperativeHandle,useState,useCallback,createElement,isValidElement,useId,useLayoutEffect,useContext,useSyncExternalStore,startTransition}from'react';import {useDelayed,useScrollbar,useDebounce,useImage,useResizeObserver,useLineChart,useImageCropper,CropShape,useNetworkStatus,useIntersectionObserver,useCarousel,useTimer,useMediaPlayer,AnchorType,useAnchorPosition,KeyCode,useShortcuts,useCommandActions}from'@zuzjs/hooks';import {createPortal}from'react-dom';import {MD5,uuid,withPost,_,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 Tr={Circle:"CIRCLE",Square:"SQUARE"},lf={Default:"DEFAULT",Circle:"CIRCLE"},cf={Light:"light",Dark:"dark",System:"system"},Ve={Default:"DEFAULT",Switch:"SWITCH"},ut={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ge=ut,ft=AnchorType,mf=ft,U={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},pf={Asc:"ASC",Desc:"DESC"},uf={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},ff={Dots:"DOTS"},We={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN",NotEmpty:"NOT_EMPTY",NotMinusOne:"NOT_MINUS_ONE"},Re={Success:"success",Error:"error",Warning:"warning",Info:"info"},te={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},ee={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},df={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},Ie={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},tt=Ie,co={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Pr=co,gf={Bar:"BAR",Ring:"RING"},mo={Default:"range",Text:"number"},po={Default:"DEFAULT",Card:"CARD"},Lt={Gooey:"gooey"},we={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Rr=Symbol.for("zuz.global.map"),Ir=e=>{globalThis[Rr]=e;},Oa=()=>globalThis[Rr]||{},uo=e$1=>{let r=Array.isArray(e$1)?e$1.join(" "):e$1;if(!r||typeof r!="string")return "";let t=Oa();return process.env.NODE_ENV==="development"&&Object.keys(t).length===0&&console.warn(`[${e}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),g(r).filter(Boolean).map(o=>{let s=o.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,i,f]=s;return g(f).map(c=>{let l=`${i}(${c})`;return t[l]||c}).join(" ")}return t[o]||o}).join(" ")},Of=e=>{let r=Array.isArray(e)?e.join(" "):e;return !r||typeof r!="string"?"":uo(r)},Nr=e=>{let r={};for(let t in e){let n=e[t];if(t.startsWith("--")){r[t]=n;continue}let o=d[t]?.toString()??t;if(o==="x"||o==="translateX"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${h.addUnitsSafely(t,n)} ${s[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${s[0]??"0px"} ${h.addUnitsSafely(t,n)}`;}else c.includes(o)?r[o]=h.addUnitsSafely(t,n):r[o]=n;}return r},fo=e=>{if(!e)return "linear";switch(e.toUpperCase()){case te.Bounce:return "var(--bounce)";case te.Liquid:return "var(--liquid)";case te.Spring:return "var(--spring)";case te.EaseInOut:return "ease-in-out";case te.EaseOutBack:return "ease-out-back";default:return "linear"}},dt=(e,r=0,t=0)=>{let n={},o={},s=r||20,a=t||0;switch(e){case ee.SlideInLeft:case ee.SlideInRight:n={"--fx-x":e===ee.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},o={"--fx-x":`${a}px`,opacity:1};break;case ee.SlideInTop:case ee.SlideInBottom:n={"--fx-y":e===ee.SlideInTop?`-${s}px`:`${s}px`,opacity:0},o={"--fx-y":`${a}px`,opacity:1};break;case ee.ScaleIn:n={scale:0,opacity:0},o={scale:1,opacity:1};break;case ee.FadeIn:n={opacity:0},o={opacity:1};break}return {from:n,to:o}},Vf=(e,r,t)=>{let{from:n,to:o}=dt(e);return r?{...n,...o}:t?n:o};var Da=(e,r)=>{let t=useRef([]),n=useRef(false);return useEffect(()=>{e?.when||(n.current=false);},[e?.transition]),useEffect(()=>{let o=r?.current;if(!o||!e||!e.clearAtEnd)return;let s=a=>{t.current.includes(a.propertyName)&&e.clearAtEnd===true&&(o.style.transform="",o.style.filter="",t.current.forEach(i=>o.style.removeProperty(i)));};return o.addEventListener("transitionend",s),()=>o.removeEventListener("transitionend",s)},[e,r]),useEffect(()=>{if(typeof window>"u"||!r?.current)return;let o=r.current;(e?.scroll||e?.mouse)&&(o.style.willChange="transform",o.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",o.style.transition=`translate 0.1s ${e.curve?fo(e.curve):"var(--spring)"}`);},[e,r]),useMemo(()=>{if(!e)return {style:{}};let{transition:o,from:s,to:a,exit:i,when:f,duration:c=.3,delay:l=0,curve:d,margin:m=0,offset:p=20,watch:y=[]}=e,C=f===false&&!n.current;f===true&&(n.current=true);let x={},{from:R,to:T}=o?dt(o,p,m):{from:s||{},to:a||{}};x=f===void 0?{...R,...T}:f?{...T}:i||R;let P=fo(d),g=[],v=Nr(x);t.current=Object.keys(v);let h={...v};return Object.keys(v).forEach(b=>{let N=b.startsWith("--")?"all":b;g.includes(N)||g.push(`${N} ${c}s ${P} ${l}s`);}),y.forEach(b=>{g.includes(b)||g.push(`${b} 0.1s ${P} 0s`);}),{style:{...h,transition:C?"none":g.join(", "),opacity:C?0:h.opacity,pointerEvents:C?"none":h.pointerEvents}}},[e,e?.when,e?.watch])},he=Da;var Mt=null,Ha=(e,r)=>{let{as:t,fx:n,busy:o=false,stripes:s,transition:a,skeleton:i,className:f$1,propsToRemove:c,draggable:l,dragOptions:d,style:m,...p}=e||{},y=typeof window<"u",C={},x={};if(l&&y&&!Mt&&(import('@zuzjs/hooks').then(v=>{Mt=v.useDrag;}).catch(v=>{console.error("Error loading useDrag:",v);}),Mt)){let v=Mt(d);C={onMouseDown:v.onMouseDown},x={transform:`translate(${v.position.x}px, ${v.position.y}px)`};}let R=[f$1,o===true?"--is-busy":"",s?`--has-stripes --stripes-${s}`:""].filter(Boolean).join(" "),T=a?{transition:a,duration:.3}:n||{},{style:P}=he(T,r),g=uo(t??"");return {style:{...m,...P,...x},className:[R,g||"",i?.enabled?"--skeleton":"",l?"--draggable":""].join(" ").trim(),rest:{...C,...f(p,c?[...c,"skeleton"]:["skeleton"])}}},B=Ha;var kr="(prefers-color-scheme: dark)",za=typeof window>"u",Mr=createContext(void 0),xo=e=>{let r=useContext(Mr);if(!r){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return r},oe=xo,Fa=({children:e,storageKey:r="--ucs",forceTheme:t,zuzMap:n,...o})=>(n&&Ir(n),jsx(_a,{storageKey:r,forceTheme:t,...o,children:e})),_a=({children:e,storageKey:r,forceTheme:t,...n})=>{let[o,s]=useState(()=>t||Lr(r,"system")),[a,i]=useState(()=>t||Lr(r)),f=m=>(m||(m=window.matchMedia(kr)),m.matches?"dark":"light"),c=useCallback(m=>{let p=m=="system"?f():m,y=document.documentElement;y.setAttribute("color-scheme",p),y.style.colorScheme=p,i(p);},[f]),l=useCallback(m=>{s(m),localStorage.setItem(r,m),c(m);},[o]),d=useCallback(m=>{let p=f(m);i(p),o==="system"&&c("system");},[o]);return useEffect(()=>{o==null&&window.localStorage.getItem(r);},[o]),useEffect(()=>{window.matchMedia(kr).addEventListener("change",d);},[d]),useEffect(()=>{let m=p=>{p.key==r&&(p.newValue?l(p.newValue):l("system"));};return window.addEventListener("storage",m),()=>window.removeEventListener("storage",m)},[l]),useEffect(()=>{c(t||o||"system");},[o]),jsxs(Mr,{value:{colorScheme:o,resolvedScheme:a,setColorScheme:l,...n},children:[t?null:jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
2
2
  const themes = ['light', 'dark']
3
3
  let theme = localStorage.getItem(\`${r}\`) || "system";
4
4
  if (theme === "system") {
5
5
  theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
6
6
  }
7
7
  document.documentElement.setAttribute("color-scheme", theme);
8
- document.documentElement.style.colorScheme = theme;`}}),jsx(xo,{children:e})]})},Br=(e,r)=>{if(Aa)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||r};var kr=({ref:e,...r})=>{let{style:t,...n}=r,{style:o,className:s,rest:a}=B(n);return jsx("span",{ref:e,style:t,className:s,...a})};kr.displayName="Zuz.Span";var se=kr;var Lr=forwardRef((e,r)=>{let{name:t,pathCount:n,variant:o,color:s,size:a,...p}=e,{variant:f}=J(true),{className:l,style:m,rest:c}=B(p);return jsx("div",{style:{color:s,...m,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${o||f||U.Small} ${l}`.trim(),ref:r,...c,children:Array(n||0).fill(0).map((i,d)=>jsx(se,{className:`path${d+1}`},`${t}-layer-${d}`))})});Lr.displayName="Zuz.Icon";var ee=Lr;var ye={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Or=e=>{let{type:r,variant:t,color:n,...o}=e,{className:s,style:a,rest:p}=B(o),{spinner:f}=J(true),l=()=>{switch(r||f?.type||ye.Simple){case ye.Simple:return null;case ye.Wave:return jsxs(Fragment$1,{children:[jsx(u,{as:"--bar --bar1"}),jsx(u,{as:"--bar --bar2"}),jsx(u,{as:"--bar --bar3"})]});case ye.Roller:return null}};return jsx(u,{className:`${s} --spinner --${(r||f?.type||ye.Simple).toLowerCase()} --${t||f?.variant||U.Small}`.trim(),style:{...a},...p,children:l()})};Or.displayName="Zuz.Spinner";var Ie=Or;var Vt={Loading:"loading",Normal:"normal"};var Dr=({ref:e,...r})=>{let{reset:t,kind:n="solid",variant:o,icon:s,iconSize:a,children:p,withLabel:f,spinner:l,state:m,disabled:c,...i}=r,{style:d,className:P,rest:S}=B(i),{variant:x}=J(true);return jsxs("button",{className:removeDuplicateWords(`--button --${n} --${o||x} flex aic ${t?"":"jcc"} ${s?"--with-icon":""} ${P}`).trim().replace(/\s+/g," "),style:d,ref:e,disabled:m==Vt.Loading||r.skeleton?.enabled||c,...S,children:[m==Vt.Loading&&jsx(Ie,{variant:o||x,type:l||ye.Simple}),(!m||m==Vt.Normal)&&jsxs(Fragment$1,{children:[s&&jsx(ee,{variant:a,name:s}),f===true?jsx(se,{children:p}):p]})]})};Dr.displayName="Zuz.Button";var F=Dr;var Hr=({ref:e,...r})=>{let{h:t,html:n,children:o,lines:s,tfx:a,duration:p=.5,stagger:f=.05,repeat:l=true,reveal:m=false,hover:c=false,...i}=r,{style:d,className:P,rest:S}=B(i),x=useRef(null),[R,C]=useState(false),[T]=useIntersectionObserver([x],{threshold:[1]}),g=useMemo(()=>{if(d?.opacity!==void 0)return d.opacity;if(typeof r.as=="string"){let I=r.as.match(/opacity:([\d.]+)/);if(I)return I[1]}return 1},[r.as,d?.opacity]),b=useMemo(()=>a?c?R:m?T===1:true:false,[a,c,R,m,T]);useEffect(()=>{e&&(typeof e=="function"?e(x.current):e.current=x.current);},[e]);let h=`h${r.h||1}`,y=useMemo(()=>n?jsx(se,{dangerouslySetInnerHTML:{__html:n}}):a&&typeof o=="string"?o.split("").map((I,H)=>{let O=I===" ",k=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":l?"infinite":"1";return jsx(se,{"data-char":I,className:`--fx-char ${b?`--fx-${a}`:""}`,style:{"--delay":`${H*f}s`,"--duration":`${p}s`,"--iteration":k,"--target-opacity":g,display:O?"inline":"inline-block",whiteSpace:"pre",opacity:!b&&a==="typewriter"?0:void 0},children:I},H)}):o,[o,n,a,b,f,p,l]);return jsx(h,{ref:x,onMouseEnter:()=>c&&C(true),onMouseLeave:()=>c&&C(false),style:{...d,display:a?"flex":d?.display,flexWrap:a?"wrap":d?.flexWrap,opacity:a&&!b?0:a?1:d?.opacity,transition:a?"opacity 0.4s ease":void 0},className:`${P} ${a?"--text-fx":""}`.trim(),...S,children:y})};Hr.displayName="Zuz.Text";var z=Hr;var Ja=e=>{let{label:r,labelColor:t,icon:n,iconColor:o,index:s,className:a,onSelect:p}=e;return r=="-"?jsx(u,{className:"--line"}):jsxs(F,{reset:true,onClick:f=>p?.(e),className:`--item ${a||""}`.trim(),children:[jsx(u,{as:"--icon",children:jsx(ee,{name:n,className:"--ico",style:o?{color:o}:{}})}),jsx(z,{className:"--lbl flex aic",style:t?{color:t}:{},children:r})]})},$r=Ja;var Fr=({ref:e,...r})=>{let{id:t,as:n,fx:o,offsetX:s,offsetY:a,parent:p,event:f,arrow:l,when:m,items:c,header:i,footer:d,origin:P=ft.TopRight,...S}=r,[x,R]=useState(false),[C,T]=useState(c||[]),{position:g,targetRef:b,calculatedAnchor:h}=useAnchorPosition(p?.current,f,{offsetX:s,offsetY:a,preferredAnchor:P}),I=p&&g.top>p.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",H=useMemo(()=>{let Z=h.toLowerCase();return Z.includes("left")?"--arrow-left":Z.includes("right")?"--arrow-right":"--arrow-center"},[h]),O=g.top!==0||g.left!==0;useEffect(()=>{m&&O?R(true):m||R(false);},[m,O]);let{className:_,style:k,rest:A}=B(S),L=he({...o?.transition?{transition:o.transition??Y.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??Q.EaseInOut,duration:o?.duration??.05,when:x&&O});return jsxs(u,{ref:b,className:`--contextmenu ${l||p!=null?`--has-arrow ${I} ${H}`:""} abs flex cols ${_}`.trim(),"aria-hidden":!x,style:{...k,...L.style,top:g.top,left:g.left,visibility:O?"visible":"hidden",transformOrigin:h},...A,children:[typeof i=="function"?createElement(i):i,C.map((Z,N)=>jsx($r,{...Z,index:N},`context-${Z.label.toLowerCase()}-${N}`)),typeof d=="function"?createElement(d):d]})};Fr.displayName="Zuz.ContextMenu";var So=Fr;var _r=forwardRef((e,r)=>{let{children:t,fx:n,when:o,fxDelay:s,fxStep:a,classToIgnore:p,...f}=e,l=J(true),m=useDelayed(),c=n||l?.group?.fx,i=s||l?.group?.fxDelay,d=a||l?.group?.fxStep,P=p||l?.group?.classToIgnore||"-fx",S=useMemo(()=>c?addPropsToChildren(t,x=>{if(x.type===Fragment)return false;let R=x.props||{},C="fx"in R,T=R.as?Array.isArray(R.as)?R.as.join(" "):R.as:R.className||"",g=typeof T=="string"&&T.includes(P);return !C&&!g},x=>({fx:{...c,delay:(i||0)+x*(d||.1),when:o??(n?.when||m)}})):t,[t,o,m,c]);return jsx(u,{className:"--group",ref:r,...f,children:S})});_r.displayName="Zuz.Group";var Co=_r;var Kr=forwardRef((e,r)=>{let{message:t,spinner:n,spinnerSize:o,color:s,when:a,hideMessage:p,...f}=e,{className:l,style:m,rest:c}=B(f),{spinner:i}=J(true);return "when"in e&&e.when==false?null:jsxs(Co,{fx:{transition:Y.SlideInBottom,curve:Q.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${l}`.trim(),style:{...m,backgroundColor:"var(--cover-bg)"},...c,children:[jsx(Ie,{variant:o||i?.variant||U.Small,type:n||i?.type||ye.Simple}),!p&&jsx(z,{className:"--label",tfx:"bounce",style:{color:"var(--cover-label)"},children:t||"loading"})]})});Kr.displayName="Zuz.Cover";var ke=Kr;var To=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(r){return this.stack[this.stack.length-1]===r}push(r){this.stack.includes(r)||(this.stack.push(r),this.updateScrollLock());}pop(r){this.stack=this.stack.filter(t=>t!==r),this.updateScrollLock();}handleEscape(){let r=this.stack[this.stack.length-1];return r?(r(),true):false}get count(){return this.stack.length}},Ne=new To;var Wr=forwardRef((e,r)=>{let{when:t,...n}=e;return jsx(u,{ref:r,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:Y.FadeIn,when:t},...n})});Wr.displayName="Zuz.Overlay";var Ge=Wr;var hi=({action:e,render:r=true,message:t=""})=>jsx(u,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:r?t:null}),Gr=hi;var xi=({action:e,actionPosition:r,dialogID:t,variant:n})=>jsx(u,{as:`--footer flex aic rel ${r?r==Sr.Center?"jcc":"":"jce"}`.trim(),children:e.map((o,s)=>jsx(F,{variant:n,onClick:a=>o.handler?o.handler():o.onClick?o.onClick():console.log("onClick Handler missing"),as:"--action",children:o.label},`dialog-${t}-action-${o.key}`))}),qr=xi;var bi={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"})," "]}),[Pe.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"})}),[Pe.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"})}),[Pe.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"})}),[Pe.Success]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),volumeHigh:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{fill:"#292D32",d:"M22 11.25h-1.25V10c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.25H18c-.41 0-.75.34-.75.75s.34.75.75.75h1.25V14c0 .41.34.75.75.75s.75-.34.75-.75v-1.25H22c.41 0 .75-.34.75-.75s-.34-.75-.75-.75M14.02 3.782c-1.12-.62-2.55-.46-4.01.45l-2.92 1.83c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h1.4300000000000002c.23 0 .46.07.66.19l2.92 1.83c.88.55 1.74.82 2.54.82a3 3 0 0 0 1.47-.37c1.11-.62 1.73-1.91 1.73-3.63v-9.18c0-1.72-.62-3.01-1.73-3.63"})}),volumeMute:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#292D32",d:"M18 16.75a.75.75 0 0 1-.6-1.2 5.93 5.93 0 0 0 .72-5.84.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.02 2.42.67 5.23-.9 7.33-.15.19-.37.29-.6.29"}),jsx("path",{fill:"#292D32",d:"M19.828 19.25a.75.75 0 0 1-.6-1.2c2.14-2.85 2.61-6.67 1.23-9.96a.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.59 3.78 1.05 8.16-1.41 11.44-.14.2-.37.3-.6.3M14.04 12.958c.63-.63 1.71-.18 1.71.71v2.93c0 1.72-.62 3.01-1.73 3.63a3 3 0 0 1-1.47.37c-.8 0-1.66-.27-2.54-.82l-.64-.4c-.54-.34-.63-1.1-.18-1.55zM21.77 2.229c-.3-.3-.79-.3-1.09 0l-4.95 4.95c-.06-1.6-.66-2.8-1.72-3.39-1.12-.62-2.55-.46-4.01.45l-2.91 1.82c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h.16l-2.94 2.94c-.3.3-.3.79 0 1.09.16.14.35.22.55.22s.39-.08.54-.23l18.46-18.46c.31-.3.31-.78 0-1.08"})]}),plus:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},V=bi;var vi=({title:e="Alert",onClose:r})=>jsxs(u,{as:"--head flex aic rel",children:[jsx(u,{as:`--${e?"title":"dot"} flex aic jcc rel`,children:e}),jsx(F,{onClick:t=>r(),className:"--closer abs center-v",children:V.close})]}),Yr=vi;var Jr=({ref:e,...r})=>{let{index:t,id:n,title:o,message:s,transition:a,curve:p,speed:f,type:l,action:m,actionPosition:c,spinner:i,loadingMessage:d,variant:P,inBackground:S,forceClose:x,forceLoading:R,onClose:C,onShow:T,onHide:g,...b}=r,h=useMemo(()=>uuid(12),[]),[y,I]=useState(o||""),[H,O]=useState(s||""),[_,k]=useState(l||tt.Dialog),[A,L]=useState(false),[Z,N]=useState(true),[E,G]=useState(m||null),[M,te]=useState(false),{variant:K,spinner:j,dialog:W}=J(true),q=P||W?.variant||K||U.Small,{style:le,className:oe,rest:pe}=B(b),ae=useRef(null),de=he({when:A,duration:f||W?.speed||.3,delay:W?.delay||.1,transition:a||W?.transition||Y.SlideInBottom,curve:p||W?.curve||Q.EaseInOut,watch:["scale","filter","transform"]}),ce=()=>{L(false),C(n);},re=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ne.isTop(ce)&&ce();}}],[A]);useShortcuts(re),useEffect(()=>{k(tt.Dialog),O(s),I(y),E&&G(E.reduce((ie,xe)=>(ie.push({...xe,key:xe.key||uuid(12)}),ie),[])),L(true),setTimeout(()=>T?T():()=>{},500);},[]),useEffect(()=>{x&&ce();},[x]),useEffect(()=>{R!=null&&te(R);},[R]),useEffect(()=>(A?Ne.push(ce):Ne.pop(ce),()=>Ne.pop(ce)),[A]);let ne=useMemo(()=>1e4+t*10,[t]);return jsxs(Fragment$1,{children:[jsx(Ge,{style:{zIndex:ne},when:A}),jsxs(u,{as:`--dialog --${(l??tt.Default).toLowerCase()} ${A?"--visible":""} ${oe} fixed abc`.trim(),style:{...de.style,zIndex:ne+1,pointerEvents:S==true?"none":"auto",...S==true?{scale:"0.92",filter:"blur(2px)"}:{}},...pe,ref:ae,children:[jsx(Yr,{title:y,onClose:ce}),jsx(Gr,{message:H,render:Z,action:E}),E&&E.length>0&&jsx(qr,{variant:q,action:E,dialogID:h,actionPosition:c}),jsx(ke,{when:M,spinner:i||W?.spinner||j?.type||ye.Simple,message:d||W?.loadingMessage})]})]})};Jr.displayName="Zuz.Dialog";var Ro=Jr;var en=forwardRef((e,r)=>{let{speed:t,smooth:n=false,breakpoints:o={},style:s,...a}=e,{rootRef:p,containerRef:f,thumbY:l,thumbX:m,onScrollY:c,onScrollX:i}=useScrollbar(t||1,o,n),{style:d,className:P,rest:S}=B(a);return useEffect(()=>{let x=f.current;if(!x)return;let R=()=>{window.dispatchEvent(new Event("resize"));},C=T=>{let g=T.target;if(g.closest(".--allow-scroll")){let h=g.closest(".--allow-scroll"),{scrollTop:y,scrollHeight:I,clientHeight:H}=h,O=T.deltaY<0,_=T.deltaY>0;(O&&y>0||_&&y+H<I)&&T.stopPropagation();}};return x.addEventListener("scroll",R),x.addEventListener("wheel",C,{passive:true}),()=>{x.removeEventListener("scroll",R),x.removeEventListener("wheel",C);}},[f]),jsxs(u,{ref:p,className:P.trim(),as:"--scrollview rel",children:[jsx(u,{as:`--scroll-content ${P}`.trim(),ref:f,style:s||{},children:S.children}),jsx(u,{as:"--scroll-track --track-y --abs",children:jsx(u,{as:"--scroll-thumb --abs",ref:l,onMouseDown:c})}),jsx(u,{as:"--scroll-track --track-x --abs",children:jsx(u,{as:"--scroll-thumb --abs",ref:m,onMouseDown:i})})]})});en.displayName="Zuz.ScrollView";var Io=en;var tn=({ref:e,...r})=>{let{id:t,index:n,from:o,speed:s,children:a,margin:p,animation:f,prerender:l,inBackground:m,forceClose:c,forceLoading:i,onClose:d,...P}=r,{drawer:S}=J(true),[x,R]=useState(a),[C,T]=useState(false),[g,b]=useState(l??(S?.prerender||true)),[h,y]=useState(false),I=()=>{T(false),d?.(t??-1);},{className:H,style:O,rest:_}=B(P),k=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ne.isTop(I)&&I();}}],[C]);useShortcuts(k),useEffect(()=>{R(a);},[a]),useEffect(()=>(C?Ne.push(I):Ne.pop(I),()=>Ne.pop(I)),[C]),useEffect(()=>{T(true);},[]),useEffect(()=>{c&&I();},[c]),useEffect(()=>{i!=null&&y(i);},[i]);let A=o||S?.from||we.Left,L=useMemo(()=>{switch(A){case we.Left:return {from:{x:"-100vw"},to:{x:0}};case we.Right:return {from:{x:"100vw"},to:{x:0}};case we.Top:return {from:{y:"-100vh"},to:{y:0}};case we.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,S?.from]),Z=he({from:{...L.from,opacity:0},to:{...L.to,opacity:1},when:C,curve:f||S?.animation||Q.EaseInOut,duration:s||S?.speed||.5,watch:["scale","filter"]}),N=useMemo(()=>1e4+(n||1)*10,[n]);return jsxs(Fragment$1,{children:[jsx(Ge,{onClick:E=>{C&&I();},when:C,style:{zIndex:N}}),jsxs(u,{ref:e,"aria-hidden":!C,className:`--drawer flex cols ${H} --${A.toLowerCase()} fixed`,style:{...O,...Z.style,"--m":`${p||S?.margin||0}px`,zIndex:N+1,pointerEvents:m==true?"none":"auto",...m==true?{scale:"0.92",filter:"blur(2px)"}:{}},..._,children:[o==we.Top||o==we.Bottom?jsx(u,{className:"--handle"}):null,jsx(F,{as:"--close-drawer --abs",onClick:I,children:V.close}),jsxs(Io,{as:"rel",children:[g||C?x:null,jsx(ke,{when:h})]})]})]})};tn.displayName="Zuz.Drawer";var Eo=tn;var rn=forwardRef((e,r)=>{let{progress:t,type:n,animated:o,...s}=e,a=useRef(null);useImperativeHandle(r,()=>({setProgress:m=>{a.current.style.width=`${m*100}%`,a.current.setAttribute("data-value",m+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),useEffect(()=>{t&&a.current&&(o?setTimeout(()=>a.current.style.width=`${t*100}%`,500):a.current.style.width=`${t*100}%`,a.current.setAttribute("data-value",t+""));},[t,a.current]);let{className:p,style:f,rest:l}=B(s);return jsx(u,{className:`--progress ${o?"--animated":""} flex rel ${p}`.trim(),style:f,...l,children:jsx(u,{ref:a,className:"--bar rel"})})});rn.displayName="Zuz.ProgressBar";var qe=rn;var zt=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(zt||{}),Ft=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(Ft||{}),nn=(t=>(t.Stack="stack",t.Individual="individual",t))(nn||{}),sn={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var Hi=e=>{let{index:r,id:t,type:n,icon:o,title:s,message:a,duration:p,sticky:f=false,actions:l=[],position:m,style:c,isHovered:i,total:d,progress:P,forceClose:S,variant:x,onClick:R,onClose:C}=e,[T,g]=useState(false),[b,h]=useState(false),{toast:y}=J(true),I=b||S,H=m||y?.position||"TopCenter",O=n||y?.type||"default",_=c||y?.style||"stack",k=p||y?.duration||4,A=P||y?.progress||false,L=useRef(k*1e3),Z=useRef(void 0),N=useRef(void 0),E=useRef(null),G=he({when:T&&!I,duration:.3,transition:y?.transition||(H.includes("Top")?Y.SlideInTop:H.includes("Bottom")?Y.SlideInBottom:H.includes("Left")?Y.SlideInLeft:Y.SlideInRight),curve:y?.curve||Q.EaseInOut,watch:["transform","opacity","scale","filter"]});useEffect(()=>{g(true);let oe=pe=>{if(N.current!==void 0){let ae=pe-N.current;if(!i&&!f&&!I&&(L.current-=ae,E.current)){let de=Math.max(0,L.current/(k*1e3)*100);E.current?.setProgress?.(de/100);}}N.current=pe,L.current<=0?h(true):Z.current=requestAnimationFrame(oe);};return Z.current=requestAnimationFrame(oe),()=>{Z.current&&cancelAnimationFrame(Z.current);}},[i,f,I,k]),useEffect(()=>{if(I){let oe=setTimeout(()=>{C?.(t);},350);return ()=>clearTimeout(oe)}},[I,t]);let M=_==="stack",te=i?r*65:r*8,K=i?1:Math.max(.85,1-r*.05),j=i?1:Math.max(.4,1-r*.2),W=()=>{R?R():(!l||l.length===0)&&h(true);},q=G.style.transform||"translate(0, 0)",le=I?q:`${q} translateY(${H.includes("Top")?te:-te}px) scale(${K})`;return jsxs(u,{onClick:W,as:`--snack --${I?"hidden":"visible"} --${x||y?.variant||U.Medium} --${O} --${H.toLowerCase()} abs flex aic`,style:{...G.style,zIndex:1e3-r,pointerEvents:I?"none":"auto",opacity:I?G.style.opacity:j,transform:le,filter:!I&&M&&!i&&r>0?"blur(1px)":"none",cursor:!l||l.length===0?"pointer":"default",transition:`${G.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsx(u,{as:"--ico flex aic jcc",children:o?jsx(ee,{name:o}):jsx(u,{as:"--no-icon"})}),jsxs(u,{as:"--meta flex cols",children:[jsx(z,{as:"--tt",children:s||sn[n]}),jsx(z,{as:"--tm",children:a})]}),l&&l.length>0&&jsx(u,{as:"--actions flex gap:5",children:l.map((oe,pe)=>jsx(F,{as:"--snack-btn bold",onClick:ae=>{ae.stopPropagation(),oe.onClick();},children:oe.label},pe))}),A&&jsx(qe,{as:"abs",ref:E})]})},ko=Hi;var Se=createContext(null),Zi=({ref:e,...r})=>{let n=useContext(Se)?.depth??0,[o,s]=useState(null),[a,p]=useState(null),[f,l]=useState(false),[m,c]=useState([]),i=useDelayed(),d=useRef(0),P=()=>++d.current,S=()=>{l(false),setTimeout(()=>p(null),200);};useImperativeHandle(e,()=>({add(g){let b=P(),h={id:b,...g};return c(y=>[...y,h]),b},openMenu(g){l(false),setTimeout(()=>{p({id:P(),type:"menu",props:g}),l(true);},16);},remove(g){c(b=>b.map(h=>h.id===g?{...h,props:{...h.props,forceClose:true}}:h)),a?.id===g&&S();},loading(g,b){c(h=>h.map(y=>y.id===g?{...y,props:{...y.props,forceLoading:b}}:y)),a?.id===g&&S();},clear(g){c(m.filter(b=>b.type!=g));}})),useEffect(()=>{if(a&&f){let g=()=>S();return document.addEventListener("click",g),()=>document.removeEventListener("click",g)}},[a,f,S]);let x=g=>{setTimeout(()=>{c(b=>b.filter(h=>h.id!==g)),a?.id===g&&p(null);},250);},R=useMemo(()=>[...m.filter(g=>g.type!="toast")],[m]);if(!i)return null;let C=m.filter(g=>g.type=="toast").reverse(),T=Object.values(Ft);return createPortal(jsxs(u,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[R.map((g,b)=>{let h=b<R.length-1;return g.type==="dialog"?jsx(Ro,{onClose:x,index:b,id:g.id,...g.props,inBackground:h},`layer-${g.type}-${g.id}`):g.type==="drawer"?jsx(Eo,{onClose:x,index:b,id:g.id,...g.props,inBackground:h},`layer-${g.type}-${g.id}`):null}),T.map(g=>{let b=C.filter(h=>(h.props.position||"TopCenter")===g);return b.length===0?null:jsx(u,{onMouseEnter:()=>s(g),onMouseLeave:()=>s(null),as:`--toast-container fixed --${g.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:b.map((h,y)=>jsx(ko,{index:y,total:b.length,isHovered:o===g,onClose:x,id:h.id,...h.props},h.id))},g)}),a&&jsx(u,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsx(So,{onClose:S,when:f,...a.props},`menu-${a.id}`)})]}),document.body)},Ki=({children:e})=>{let r=useContext(Se),t=r?r.depth+1:0,n=useRef(null),o=useMemo(()=>({add:s=>n.current?.add(s),openMenu:s=>n.current?.openMenu(s),remove:s=>n.current?.remove(s),loading:(s,a)=>n.current?.loading(s,a),clear:s=>n.current?.clear(s),depth:t,isSubLayer:!!r}),[r]);return jsxs(Se.Provider,{value:o,children:[e,jsx(Zi,{ref:n})]})},xo=Ki;var Gi=()=>{let e=useContext(Se);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(n,o,s)=>{n.preventDefault(),e.openMenu({event:n,items:o,origin:s});},showMenu:(n,{items:o,origin:s,offsetX:a,offsetY:p,transition:f,curve:l,arrow:m,duration:c,header:i,footer:d})=>{e.openMenu({fx:{transition:f,curve:l,duration:c},parent:n,items:o,origin:s||ft.TopCenter,offsetX:a,offsetY:p,arrow:m,header:i,footer:d});},hide:e.clear}},Ui=Gi;var Xi=()=>{let e=useContext(Se);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("dialog"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a);return {clearAll:r,show:s=>{let a=e.add({type:"dialog",props:{...s,type:tt.Dialog}});return {id:a,setLoading:p=>n(a,p),hide:()=>t(a)}},hide:t}},Yi=Xi;var Qi=()=>{let e=useContext(Se);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("drawer"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a),o=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:p=>n(a,p),close:()=>t(a)}};return {clearAll:r,open:s=>o({children:s}),right:s=>o({children:s,from:we.Right}),left:s=>o({children:s,from:we.Left}),top:s=>o({children:s,from:we.Top}),bottom:s=>o({children:s,from:we.Bottom}),close:t}},Ji=Qi;var tl=(e,r,t={})=>{let[n,o]=useState(null),[s,a]=useState(false),{duration:p=.25,curve:f=Q.EaseOutBack,borderRadius:l={from:40,to:24},targetWidth:m=320}=t;return useLayoutEffect(()=>{r&&e.current?(o(e.current.getBoundingClientRect()),a(true)):r||a(false);},[r,e]),{style:he({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:l.from},to:{opacity:1,width:m,height:"auto",borderRadius:l.to},curve:f,duration:p,when:s&&r}).style,isMeasured:s,sourceRect:n}},ol=tl;var al=(e,r={})=>{let{offset:t=8,direction:n="bottom",container:o=null,triggerRef:s=null}=r,a=useRef(null),p=useCallback(()=>{let f=e.current;if(!f)return;let l=s?.current||f.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let m=f.getBoundingClientRect(),c=l.getBoundingClientRect(),i,d;o?(i=o.getBoundingClientRect(),d="absolute"):(window.getComputedStyle(f).position==="fixed"?d="fixed":d="absolute",d==="fixed"?i={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:i={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),f.style.position!==d&&(f.style.position=d),a.current=d;let x=0,R=0;switch(n){case "top":x=c.top-m.height-t,R=c.left,x<i.top&&c.bottom+m.height+t<=i.bottom&&(x=c.bottom+t);break;case "bottom":x=c.bottom+t,R=c.left,x+m.height>i.bottom&&c.top-m.height-t>=i.top&&(x=c.top-m.height-t);break;case "left":x=c.top,R=c.left-m.width-t,R<i.left&&c.right+m.width+t<=i.right&&(R=c.right+t);break;case "right":x=c.top,R=c.right+t,R+m.width>i.right&&c.left-m.width-t>=i.left&&(R=c.left-m.width-t);break}if(x=Math.max(i.top,Math.min(x,i.bottom-m.height)),R=Math.max(i.left,Math.min(R,i.right-m.width)),a.current==="fixed")f.style.top=`${x}px`,f.style.left=`${R}px`;else {let C;f.offsetParent?C=f.offsetParent.getBoundingClientRect():C={top:0,left:0};let T=x-C.top+window.scrollY,g=R-C.left+window.scrollX;f.style.top=`${T}px`,f.style.left=`${g}px`;}},[e,s,t,n,o]);return useEffect(()=>{let f=e.current;if(!f)return;let l=s?.current||f.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let m=new ResizeObserver(p);return m.observe(f),l&&m.observe(l),p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{m.disconnect(),l&&m.disconnect(),window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[e,n,t,o,s]),{postion:a.current,reposition:p}},xt=al;var ll=()=>{let e=useContext(Se);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(c,i)=>e.add({type:"toast",props:{...i,type:c}}),n=c=>e.remove(c),l=(c,i,d)=>{let P=r(c,{...i,sticky:i.sticky??false,actions:[{label:d?.label||"Ok",onClick:()=>{d?.onClick?.(),n(P);}}]});return P},m=(c,i,d,P)=>{let S=r(c,{...i,sticky:true,actions:[{label:P?.label||"Cancel",onClick:()=>{P?.onClick?.(),n(S);}},{label:d?.label||"Ok",onClick:()=>{d?.onClick?.(),n(S);}}]});return S};return {ok:(c,i)=>l("default",c,i),success:(c,i)=>l("success",c,i),error:(c,i)=>l("error",c,i),confirm:(c,i,d)=>m("default",c,i,d),warn:(c,i)=>l("warn",c,i)}},cl=ll;var pl=()=>{let e=useContext(Se);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(l,m)=>e.add({type:"toast",props:{...m,type:l}});return {show:(l,m,c,i)=>r("default",{title:l,message:m,icon:c,duration:i}),hide:l=>e.remove(l),success:(l,m,c,i)=>r("success",{title:l,message:m,icon:c,duration:i}),error:(l,m,c,i)=>r("error",{title:l,message:m,icon:c,duration:i}),warn:(l,m,c,i)=>r("warn",{title:l,message:m,icon:c,duration:i}),promise:(l,m,c,i)=>r("promise",{title:l,message:m,icon:c,duration:i}),clearAll:()=>e.clear("toast")}},Mo=pl;var gn=({ref:e,style:r,...t})=>{let n=useRef(null),o=useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:p}=B(t,o);return jsx("div",{ref:e||n,style:{...s,...r||{}},className:a,...p})};gn.displayName="Zuz.Box";var u=gn;var yn=forwardRef((e,r)=>{let{title:t,message:n,...o}=e,[s,a]=useState(false);return jsxs(u,{className:"--accordion flex cols",...o,children:[jsxs(F,{onClick:p=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsx(z,{className:"--label flex",children:t}),jsx(u,{className:"--arrow flex",children:s?V.arrowUp:V.arrowDown})]}),s&&jsx(u,{className:"--detail",children:n})]})});yn.displayName="Zuz.Accordion";var yl=yn;var xl=({label:e,icon:r,onClick:t,idx:n,selected:o})=>jsx(F,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof r=="string"?jsx(ee,{name:r}):r}),bn=xl;var vn=forwardRef((e,r)=>{let{items:t,name:n,selected:o,position:s,...a}=e,p=useRef(null),[f,l]=useState(o||t[0].tag||0),m=useCallback(({x,y:R})=>{if(p.current){let C=p.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-C.left}`),document.documentElement.style.setProperty("--tip-y",`${R-C.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),c=useCallback(()=>{p.current&&(p.current.removeEventListener("pointerleave",c),p.current.removeEventListener("pointermove",m),document.documentElement.style.setProperty("--tip-s","0"));},[]),i=useCallback(()=>{p.current&&(p.current.addEventListener("pointerleave",c),p.current.addEventListener("pointermove",m));},[]);useEffect(()=>{p.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,R)=>R.label.length>x.length?R.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),p.current?.addEventListener("pointerenter",i));},[]);let{className:d,style:P,rest:S}=B(a);return jsxs(u,{ref:p,style:P,className:[`--actionbar flex aic ${d}`,`${!s||s==ge.Auto?"rel":`--${s}`}`].join(" ").trim(),...S,children:[t.map((x,R)=>jsx(bn,{selected:f===x.tag||o==R,...x,idx:R},`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,"-")}`))})})]})});vn.displayName="Zuz.ActionBar";var Cl=vn;var Sn=forwardRef((e,r)=>{let{type:t,icon:n,title:o,message:s,iconSize:a,...p}=e,{className:f,style:l,rest:m}=B(p);return jsxs(u,{className:`--alert --${t||Pe.Info} flex aic ${f}`.trim(),style:l,...m,children:[jsx(u,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&V[t||Pe.Info]}),jsxs(u,{className:"--meta flex cols",children:[jsx(z,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsx(z,{className:"--message",h:2,children:s})]})]})});Sn.displayName="Zuz.Alert";var Rl=Sn;var Ho=createContext(null),$o=()=>{let e=useContext(Ho);return e?useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},Ao=()=>useContext(Ho),He=()=>{let e=Ao(),r=$o();return {...e,...r}},Pn=({children:e,initialValues:r={}})=>{let t=useRef({values:r,errors:{},touched:{}}),n=useRef(new Set(Object.keys(r))),o=useRef(new Set),s=useCallback(()=>t.current,[]),a=useCallback(l=>(o.current.add(l),()=>o.current.delete(l)),[]),p=()=>{o.current.forEach(l=>l());};useEffect(()=>{if(r&&Object.keys(r).length>0){let l=new Set(Object.keys(r)),m=[...n.current].filter(i=>!l.has(i)),c={...t.current.values};m.forEach(i=>delete c[i]),t.current={...t.current,values:{...c,...r}},n.current=l,p();}},[r]);let f=useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(l,m)=>{t.current.values[l]!==m&&(t.current={...t.current,values:{...t.current.values,[l]:m}},p());},deleteFieldValue:l=>{if(!(l in t.current.values))return;let{[l]:m,...c}=t.current.values;t.current={...t.current,values:c},p();},setFieldError:(l,m)=>{t.current={...t.current,errors:{...t.current.errors,[l]:m}},p();},reset:()=>{t.current={values:{},errors:{},touched:{}},p();}}),[]);return jsx(Ho.Provider,{value:f,children:e})};var In=({ref:e,...r})=>{let{variant:t,numeric:n,name:o,onConfirm:s,...a}=r,{style:p,className:f,rest:l}=B(a),{variant:m}=J(true),c=useRef(null),i=He(),d=o?i.errors?.[o]:null,P=o&&i.values&&i.setFieldValue,S=P?i.values?.[o]:void 0,x=useDebounce(C=>{P&&i.setFieldValue?.(o,C);},500),R=C=>{let T=C.currentTarget.value;n&&(T=T.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),C.currentTarget.value=T),x(T),r.onInput?.(C);};return useEffect(()=>{c.current&&o&&S!==void 0&&c.current.value!==String(S)&&(c.current.value=String(S));},[S,o]),useEffect(()=>()=>{P&&i.deleteFieldValue?.(o);},[]),jsx("input",{name:o,className:`--input --${t||m} ${d?"--has-error":""} --flex ${f}`.trim(),style:p,defaultValue:S??r.defaultValue??"",onInput:R,onKeyDown:C=>{C.key=="Enter"&&s?.(C.currentTarget.value);},ref:C=>{c.current=C,typeof e=="function"?e(C):e&&(e.current=C);},...l})};In.displayName="Zuz.Input";var ue=In;var Bn=e=>{let{meta:r,children:t}=e,n=useDelayed(),{label:o,icon:s,...a}=isValidElement(r)?{}:r,{className:p,style:f,rest:l}=B({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return isValidElement(r)?jsx("li",{style:f,className:p,children:r}):jsxs("li",{style:f,className:p,...l,children:[t,typeof r=="string"?r:o]})};Bn.displayName="Zuz.ListItem";var En=Bn;var Mn=forwardRef((e,r)=>{let{items:t,variant:n,direction:o,seperator:s,ol:a,...p}=e,{className:f,style:l,rest:m}=B(p),c=a==true?"ol":"ul";return createElement(c,{className:`--list --${n||U.Small} flex ${o??"cols"} ${f}`.trim(),style:l,ref:r,...m,children:t.map((i,d,P)=>{let S=`${typeof i=="string"?`li-${String(i)}`:isValidElement(i)?`li-${i.key}`||`${d}-${MD5(i.toString())}`:i.label}-${d}`;return jsxs(Fragment,{children:[jsx(En,{meta:i}),s&&P[d+1]?jsx("li",{className:"--list-seperator",children:s},`spt-${d+1}-${S}`):null]},S)})})});Mn.displayName="Zuz.List";var Ye=Mn;var On=forwardRef((e,r)=>{let{fx:t,action:n,data:o,withStyle:s,onChange:a,...p}=e,{className:f}=B({as:s||""}),{style:l}=B(p),[m,c]=useState(false),[i,d]=useState(o||[]),P=useRef(null),S=useRef(null),x=useRef(null),R=useMemo(()=>p.name||uuid(12),[]),[C,T]=useState(null),[g,b]=useState(null),[h,y]=useState([]),H=useDebounce(N=>{N.target.value==""?(c(false),d([])):n&&N.target.value.trim()!=""&&withPost(n,{query:N.target.value}).then(E=>{"items"in E&&_(E.items).isArray()?(d(E.items),b(N.target.value),y(E.items)):console.error("Action Response should contain items array"),T(null);}).catch(E=>{T(null),d([]);});},250),O=()=>{if(S.current){let N=S.current.getBoundingClientRect(),E=window.innerHeight-N.bottom,G=N.top;if(x.current){let M=x.current;E<M.offsetHeight&&G>E?(M.style.top="auto",M.style.bottom=`${N.height}px`,M.style.maxHeight=`${G-150}px`):(M.style.top=`${N.height+5}px`,M.style.bottom="auto",M.style.maxHeight=`${E-150}px`);}}},_$1=N=>{if(i.length>0){if((N.key==="ArrowDown"||N.key==="ArrowUp")&&(N.preventDefault(),N.stopPropagation()),N.key==="Escape")T(null),c(false),d([]);else if(N.key==="ArrowDown")T(E=>{let G=E===null||E===i.length-1?0:E+1;return A(G),G});else if(N.key==="ArrowUp")T(E=>{let G=E===null||E===0?i.length-1:E-1;return A(G),G});else if(N.key==="Enter"&&C!==null){let E=i[C];P.current&&(P.current.value=E,c(false),d([]));}}},k=N=>{P.current&&(P.current.value=N,c(false),d([]));},A=N=>{let E=i[N];if(E&&P.current&&(P.current.value=E,P.current.setSelectionRange(E.length,E.length)),x.current){let M=x.current.children[N];M&&M.scrollIntoView({block:"nearest"});}},L=N=>{S.current&&!S.current.contains(N.target)&&(c(false),d([]));},Z=()=>{P.current&&P.current.value===g&&(d(h),T(null),O());};return useEffect(()=>(window.addEventListener("resize",O),window.addEventListener("scroll",O,true),document.addEventListener("mousedown",L),()=>{window.removeEventListener("resize",O),window.removeEventListener("scroll",O,true),document.removeEventListener("mousedown",L);}),[]),useEffect(()=>{O();},[i]),jsxs(u,{style:l,ref:S,className:`--autocomplete --${e.size||U.Small} flex aic rel ${f}`.trim(),children:[jsx(ue,{ref:P,autoComplete:"off",onChange:H,onKeyDown:_$1,onFocus:Z,...p}),jsx(u,{className:"--arrow rel flex aic jcc",children:i.length>0?V.arrowUp:V.arrowDown}),i.length>0&&jsx(Ye,{id:R,ref:x,className:"--suggestion-list flex cols abs",items:i.map((N,E)=>({label:N,onClick:G=>{G.preventDefault(),G.stopPropagation(),k(N);},className:C===E?"--current":"",animate:{transition:Y.SlideInBottom,curve:Q.EaseInOut,delay:clamp(.02*E,.02,.5)}}))})]})});On.displayName="Zuz.AutoComplete";var jl=On;var Vn=forwardRef((e,r)=>{let t=useRef(null),n=useMemo(()=>r&&typeof r!="function"&&r.current?r:t,[r]),{style:o,className:s,rest:a}=B(e,n);return !a.src||a.src==""?null:jsx("img",{ref:n,style:o,className:`${s} flex`,...a})});Vn.displayName="Zuz.Image";var je=Vn;var Dn=forwardRef((e,r)=>{let{src:t,variant:n,type:o,crossOrigin:s,referrerPolicy:a,fx:p,as:f,alt:l,color:m,style:c,...i}=e,[d,P,S]=useImage(t??"",s,a),{className:x,style:R,rest:C}=B({fx:p,as:f});return jsx(u,{className:`--avatar --${n||U.Small} --${(o||wr.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:m||"var(--primary)",...c,...R},...C,children:t?jsx(je,{src:d,crossOrigin:s,referrerPolicy:a,...i}):jsx(z,{className:"--avatar-label",children:(l?l.charAt(0):"A").toUpperCase()})})});Dn.displayName="Zuz.Avatar";var sc=Dn;var ac=({size:e=5,type:r="dead",label:t="",variant:n=U.Small,loading:o=false,spinner:s,...a})=>{let{style:p,className:f,rest:l}=B(a);return jsxs(u,{style:{..._(t).isEmpty()?{"--badge-size":e}:{},...p},as:`--badge --${n} --${r} rel flex aic jcc ${f}`.trim(),children:[jsx(u,{fx:{transition:Y.FadeIn,curve:Q.Liquid,duration:.5,when:o},as:"abs abc",children:jsx(Ie,{type:s})}),_(t).isEmpty()?jsx(u,{as:`--dot --${r}`}):jsx(z,{as:"--label",children:t})]})},ic=ac;var wc=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>format(addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>addDays(new Date,1),getDateFormat:()=>format(addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let e=new Date,r=e.getDay();return addDays(e,(6-r)%7||6)},getDateFormat:()=>{let e=new Date,r=e.getDay();return format(addDays(e,(6-r)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>format(addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>format(addWeeks(new Date,1),"d MMM"),getDate:()=>addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>format(addWeeks(new Date,2),"d MMM"),getDate:()=>addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>format(addWeeks(new Date,4),"d MMM"),getDate:()=>addWeeks(new Date,4)}],Sc=e=>{let r=new Set;return e.filter(t=>{if(t.label=="Later")return true;let n=t.getDate().toISOString().split("T")[0];return r.has(n)?false:(r.add(n),true)})},$n=forwardRef((e,r)=>{let{defaultValue:t,variant:n,onChange:o,...s}=e,{style:a,className:p,rest:f}=B(s),[l,m]=useState(t||new Date),c=startOfMonth(l),i=endOfMonth(l),d=startOfWeek(c),P=endOfWeek(i),S=useMemo(()=>eachDayOfInterval({start:d,end:P}),[d,P]),x=T=>{o?.(T),m(T);},R=()=>{m(T=>new Date(T.getFullYear(),T.getMonth()-1));},C=()=>{m(T=>new Date(T.getFullYear(),T.getMonth()+1));};return jsxs(u,{as:`--calendar flex --${n||"sm"} ${p}`,style:a,children:[jsx(u,{as:"--calendar-quick-select flex cols flex:1",children:Sc(wc).map(T=>{let g=T.getDate();return jsxs(F,{onClick:()=>x(g),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(z,{as:"flex:1",children:T.label}),jsx(z,{as:"tar",children:T.getDateFormat()})]},`--dtp-option-label-${T.label}`)})}),jsxs(u,{as:"--calendar-selector flex cols flex:1",children:[jsxs(u,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(z,{as:"flex:1 --calendar-cm bold",children:format(l,"MMMM yyyy")}),jsx(F,{onClick:R,as:"--calendar-chevron",children:V.chevronUpOutline}),jsx(F,{onClick:C,as:"--calendar-chevron",children:V.chevronDownOutline})]}),jsxs(u,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(T=>jsx(z,{as:"--calendar-day",children:T},`--calendar-hd-${T}`)),S.map((T,g)=>{let b=isSameMonth(T,l),h=isSameDay(T,l),y=isToday(T);return jsx(F,{disabled:!b,onClick:()=>x(T),as:["--calendar-day --calendar-dd",`${h?"--calendar-dd-selected":""}`,`${y?"--calendar-dd-current":""}`],children:format(T,"d")},`--calendar-day-${g}-${T.getFullYear()}-${T.getMonth()}-${T.getDay()}`)})]})]})]})});$n.displayName="Zuz.Calendar";var Zo=$n;var Ut=(t=>(t.Table="table",t.Gooey="gooey",t))(Ut||{});var _n=({ref:e,...r})=>{let{itemCount:t,itemsPerPage:n,startPage:o,pageRange:s,paginationStyle:a,breakLabel:p,prevLabel:f,nextLabel:l,hash:m,loading:c,seperator:i,renderOnZeroPageCount:d,asDots:P,progressBar:S,onPageChange:x,...R}=r,C=useRef(null),T=useMemo(()=>toHash(numberInRange(4,8)),[]),g=useCallback(N=>`${toHash(N,m||6,T)}${i||""}${T}`,[T]),b=useMemo(()=>p||"...",[p]),h=useRef(null),[y,I]=useState({id:m?o?typeof o=="number"?g(o):o:1:o||1,label:o||1});useImperativeHandle(e,()=>({setPage:N=>I(N),getPage:N=>y,setProgress:N=>h.current?.setProgress?.(N),getProgress:()=>h.current?.getProgress?.()??0}),[h.current]);let{style:H,className:O,rest:_}=B(R),k=useCallback(N=>typeof N=="number"?N:+N.label,[]);if(!t)throw new Error('"itemCount" prop is required');let A=useMemo(()=>Math.ceil(t/n),[t,n]),L=useMemo(()=>{let N=[],E=Math.max(k(y)-(s||2),1),G=Math.min(k(y)+(s||2),A);E>1&&N.push({id:m?g(1):1,label:1}),E>2&&N.push({id:-1,label:b});for(let M=E;M<=G;M++)N.push({id:m?g(M):M,label:M});return G<A-1&&N.push({id:-1,label:b}),G<A&&N.push({id:m?g(A):A,label:A}),N},[y]),Z=useCallback(N=>{let E=N;+E.label<1||+E.label>A||(I(E),x?.(E));},[t,n,y]);return L.length<=1&&(d??false)===false?null:jsxs(u,{ref:C,as:`--pagination ${P===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${O}`,children:[jsx(u,{as:"flex flex:1 aic --pgt-btns",children:(L.length>1?L:[{id:1,label:1},{id:-1,label:b}]).map((N,E,G)=>{let M=(typeof N=="string"?N:N.label)==k(y);return jsx(F,{disabled:N.id==-1||k(y)==+N.label,className:M?"--current-page":"",onClick:te=>Z(N),children:P===true?S===true&&M?jsx(qe,{ref:h}):"":typeof N=="string"?N:N.label},`--pg-${E}-${N.id}`)})}),jsx(u,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(k(y)-1)*n+1} - `,`${Math.min(k(y)*n,t)} of ${t} items`].join(" ")}),jsxs(u,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsx(F,{disabled:k(y)<=1,onClick:N=>Z({id:m?g(k(y)-1):k(y)-1,label:k(y)-1}),children:V.chevronLeftOutline}),jsx(F,{disabled:L.length<=1||k(y)==k(L[L.length-1]),onClick:N=>Z({id:m?g(k(y)+1):k(y)+1,label:k(y)+1}),children:V.chevronRightOutline})]})]})};_n.displayName="Zuz.Pagination";var wt=_n;function Ec(e,r){let{items:t,renderItem:n,effect:o="slide",loop:s=true,loopMode:a="infinite",startIndex:p=0,useKeys:f=true,useWheel:l=true,spacing:m=160,rotation:c=20,scaleStep:i=.15,blur:d=4,animation:P="power",showDots:S=false,autoPlay:x=false,autoPlaySpeed:R=3,onChange:C,...T}=e,{className:g,style:b}=B(T),h=useRef(null),y=R/(R>=1e3?1e3:1),I=useCarousel({total:t.length,initialIndex:p,loop:s,useKeys:f,useWheel:l,onChange:A=>{h.current?.setPage({id:A+1,label:A+1}),h.current?.setProgress(0),C?.(A);}}),{pause:H,resume:O,reset:_}=useTimer({duration:y,autoStart:x===true,onProgress:A=>{x===true&&h.current?.setProgress(1-A);},onExpired:()=>{x===true&&I.next(),_();}}),k={...b,"--carousel-spacing":`${m}px`,"--carousel-rotation":`${c}deg`,"--carousel-blur":`${d}px`,"--carousel-scale-step":i,"--active-index":I.index,"--carousel-transition":`var(--${P})`};return jsxs(u,{ref:r,className:`--carousel --effect-${o} --loop-${a} flex cols aic jcc ${g}`.trim(),style:k,children:[jsx(u,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((A,L)=>{let Z=L-I.index;if(a==="infinite"){let E=t.length;Z=((Z+E/2)%E+E)%E-E/2;}let N=L===I.index;return jsx(u,{onMouseEnter:()=>N&&H(),onMouseLeave:()=>N&&O(),className:`--carousel-item-wrapper abs ${N?"--is-active":""}`,style:{"--offset":Z,zIndex:N?100:100-Math.abs(Z),display:Math.abs(Z)>5?"none":"flex"},children:n(A,L,I.index)},L)})}),S&&jsx(wt,{ref:h,itemCount:t.length,itemsPerPage:1,startPage:p+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:A=>I.goTo(+A.label-1),asDots:true,progressBar:true})]})}var kc=forwardRef(Ec),Mc=kc;var Zn=(r=>(r.Line="line",r))(Zn||{});var Gn=forwardRef((e,r)=>{let{data:t,width:n,height:o,lineColor:s,strokeWidth:a=2,gradientStartColor:p,gradientEndColor:f,animated:l,animDuration:m=2,animDelay:c=0,padding:i=0,type:d,...P}=e,{className:S,style:x,rest:R}=B(P),C=useRef(null),T=useResizeObserver(C.current?.parentElement||C),g=typeof n=="number"?n:T.width,b=typeof o=="number"?o:T.height,h={width:g,height:b},y=useId(),{pathD:I,areaPathD:H}=useLineChart(t,h,i+(a||2)),O=useRef(null),_=useRef(null),[k,A]=useState(0),[L,Z]=useState(0);return useEffect(()=>{l&&(O.current&&A(O.current.getTotalLength()),_.current&&Z(_.current.getTotalLength()));},[l,I,H,g,b]),jsx(u,{ref:C,as:`--chart --${d||"line"}-chart ${S}`.trim(),style:{...x,width:n,height:o},...R,children:g>0&&b>0&&jsxs("svg",{viewBox:`0 0 ${g} ${b}`,preserveAspectRatio:"xMidYMid meet",children:[jsx("defs",{children:jsxs("linearGradient",{id:y,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopColor:p}),jsx("stop",{offset:"100%",stopColor:f})]})}),jsx("path",{ref:_,d:H,fill:`url(#${y})`,stroke:"none",style:l?{strokeDasharray:L,strokeDashoffset:L}:{},children:l&&jsx("animate",{attributeName:"stroke-dashoffset",from:L,to:"0",dur:`${m||2}s`,begin:`${c||0}s`,fill:"freeze"})}),jsx("path",{ref:O,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:`${m||2}s`,begin:`${c||0}s`,fill:"freeze"})})]})})});Gn.displayName="Zuz.Chart";var Ac=Gn;var Un=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(Un||{}),qn=(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))(qn||{});var Xn=forwardRef((e,r)=>{let{text:t,media:n,side:o="me",status:s=1,timeStamp:a=Date.now(),arrow:p=true,...f}=e,{className:l,style:m,rest:c}=B(f);return jsx(u,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxs(u,{className:`--bubble --bubble-${o} ${n?`--with-media --bma-${n.type}`:""} rel flex cols ${p==true?"--b-arrow":""} ${l}`.trim(),style:{...m},...c,children:[t&&jsx(z,{className:"--bubble-text",children:t}),n?n.type=="audio"?jsxs(u,{as:"flex aic --bubble-audio",children:[jsx(se,{className:"--bm-action",children:V.play}),jsx(qe,{progress:.7}),jsx(z,{className:"--bm-dur",children:n.duration??"00:13"})]}):n.type=="img"?jsx(u,{as:"--bubble-image",children:jsx(je,{src:n.source})}):null:null,jsxs(u,{as:"flex aie jce --bubble-stats",children:[jsx(z,{className:"--bubble-stamp tar",children:timeSince(a)}),o=="me"&&jsx(se,{className:`--bubble-status --bs-${s}`,children:s==0?V.pending:s==1?V.done:s==2?V.doneAll:V.doneAll})]})]})})});Xn.displayName="Zuz.Bubble";var _c=Xn;var Yn=forwardRef((e,r)=>{let{style:t,className:n,rest:o}=B(e);return jsx("label",{ref:r,style:t,className:n,...o})});Yn.displayName="Zuz.Label";var St=Yn;var Qn=({ref:e,...r})=>{let {name:t,required:n,type:o,value:s,size:a,variant:p,checked:f,disabled:l,onSwitch:m,...c}=r,i=He(),d=!!(t&&i.values);d?i.errors?.[t]:null;let S=d?i.values?.[t]:void 0,[x,R]=useState(f||false),C=useRef(null),{variant:T}=J(true),g=useMemo(()=>d&&S!=null?typeof S=="string"?S.toLowerCase()!=="false"&&S!=="":!!S:x,[S,x,d]);useEffect(()=>{C.current&&C.current.checked!==g&&(C.current.checked=g);},[g]),useEffect(()=>{f!==void 0&&R(f);},[f]);let b=h=>{let y=!!h;d&&i.setFieldValue?.(t,y),R(y),m?.(y,s||"cb");};return useImperativeHandle(e,()=>({setChecked(h,y=true){b(h);},toggle(h=true){b(!g);}})),jsxs(St,{"aria-hidden":l,className:[`--${(o||Ve.Default).toLowerCase()}`,`${!o||o===Ve.Default?"--checkbox":"--switch"}`,`--${p||T||U.Small}`,`flex aic jcc ${g?"is-checked":""} rel`,`${l?"--disabled":""}`].join(" ").trim(),...c,children:[(!o||o==Ve.Default)&&V.check,jsx(ue,{ref:h=>{C.current=h,e&&(e.current=h);},defaultChecked:g,type:"checkbox",className:"abs",name:t,required:n||false,onChange:h=>{h.stopPropagation(),b(h.target.checked);},disabled:l})]})};Qn.displayName="Zuz.CheckBox";var Ct=Qn;var Jc=({ref:e,...r})=>{let{code:t,copy:n,lang:o="tsx",showLines:s=false,highlight:a="",as:p,fx:f,...l}=r,m=useRef(null),{className:c,style:i,rest:d}=B({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${p}`,fx:f},m),P=useMemo(()=>{let x=new Set;return a.split(",").forEach(R=>{if(R.includes("-")){let[C,T]=R.split("-").map(Number);for(let g=C;g<=T;g++)x.add(g);}else R&&x.add(Number(R));}),x},[a]),S=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 R=x[0]?.match(/^\s*/)?.[0].length||0,C=x.map(g=>{let b=g.match(/^\s*/)?.[0].length||0,h=Math.min(b,R);return g.slice(h)}),T=[{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 C.map((g,b)=>{let h=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),y=P.has(b+1);if(o!="plain"){let I=[];T.forEach(H=>{h=h.replace(H.re,O=>{let _=`ZUZ_ID_${I.length}_ZUZ`;return I.push(`<span class="--token-${H.name}">${O}</span>`),_});});for(let H=I.length-1;H>=0;H--)h=h.replace(`ZUZ_ID_${H}_ZUZ`,I[H]);}return `<div class="--code-line ${s==true?"--with-ln":""} ${y?"--is-highlighted":""}">
10
- ${s==true?`<span class="--line-number">${b+1}</span>`:""}
8
+ document.documentElement.style.colorScheme = theme;`}}),jsx(bo,{children:e})]})},Lr=(e,r)=>{if(za)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||r};var Or=({ref:e,...r})=>{let{style:t,...n}=r,{style:o,className:s,rest:a}=B(n);return jsx("span",{ref:e,style:t,className:s,...a})};Or.displayName="Zuz.Span";var ie=Or;var Dr=forwardRef((e,r)=>{let{name:t,pathCount:n,variant:o,color:s,size:a,...i}=e,{variant:f}=oe(true),{className:c,style:l,rest:d}=B(i);return jsx("div",{style:{color:s,...l,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${o||f||U.Small} ${c}`.trim(),ref:r,...d,children:Array(n||0).fill(0).map((m,p)=>jsx(ie,{className:`path${p+1}`},`${t}-layer-${p}`))})});Dr.displayName="Zuz.Icon";var re=Dr;var ye={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Hr=e=>{let{type:r,variant:t,color:n,...o}=e,{className:s,style:a,rest:i}=B(o),{spinner:f}=oe(true),c=()=>{switch(r||f?.type||ye.Simple){case ye.Simple:return null;case ye.Wave:return jsxs(Fragment$1,{children:[jsx(u,{as:"--bar --bar1"}),jsx(u,{as:"--bar --bar2"}),jsx(u,{as:"--bar --bar3"})]});case ye.Roller:return null}};return jsx(u,{className:`${s} --spinner --${(r||f?.type||ye.Simple).toLowerCase()} --${t||f?.variant||U.Small}`.trim(),style:{...a},...i,children:c()})};Hr.displayName="Zuz.Spinner";var Se=Hr;var Dt={Loading:"loading",Normal:"normal"};var $r=({ref:e,...r})=>{let{reset:t,kind:n="solid",variant:o,icon:s,iconSize:a,children:i,withLabel:f,spinner:c,state:l,disabled:d,...m}=r,{style:p,className:y,rest:C}=B(m),{variant:x}=oe(true);return jsxs("button",{className:removeDuplicateWords(`--button --${n} --${o||x} flex aic ${t?"":"jcc"} ${s?"--with-icon":""} ${y}`).trim().replace(/\s+/g," "),style:p,ref:e,disabled:l==Dt.Loading||r.skeleton?.enabled||d,...C,children:[l==Dt.Loading&&jsx(Se,{variant:o||x,type:c||ye.Simple}),(!l||l==Dt.Normal)&&jsxs(Fragment$1,{children:[s&&jsx(re,{variant:a,name:s}),f===true?jsx(ie,{children:i}):i]})]})};$r.displayName="Zuz.Button";var K=$r;var zr=({ref:e,...r})=>{let{h:t,html:n,children:o,lines:s,tfx:a,delay:i=0,duration:f=.5,stagger:c=.05,repeat:l=true,reveal:d=false,hover:m=false,...p}=r,{style:y,className:C,rest:x}=B(p),R=useRef(null),[T,P]=useState(false),[g]=useIntersectionObserver([R],{threshold:[1]}),v=useMemo(()=>{if(y?.opacity!==void 0)return y.opacity;if(typeof r.as=="string"){let A=r.as.match(/opacity:([\d.]+)/);if(A)return A[1]}return 1},[r.as,y?.opacity]),h=useMemo(()=>a?m?T:d?g===1:true:false,[a,m,T,d,g]);useEffect(()=>{e&&(typeof e=="function"?e(R.current):e.current=R.current);},[e]);let b=`h${r.h||1}`,N=useMemo(()=>typeof o=="string"?o:Array.isArray(o)&&o.length===1&&typeof o[0]=="string"?o[0]:null,[o]),F=useMemo(()=>{let A=Array.isArray(r.as)?r.as.join(" "):r.as||"";return typeof A=="string"&&A.includes("text-clip")},[r.as]);useLayoutEffect(()=>{if(!F||!R.current||N===null)return;let A=R.current,L=0,O=0,M=()=>{let E=A.getBoundingClientRect(),G=getComputedStyle(A).backgroundImage,q=E.width;A.querySelectorAll(".--fx-char").forEach($=>{let W=$.getBoundingClientRect().left-E.left;$.style.backgroundImage=G,$.style.backgroundRepeat="no-repeat",$.style.backgroundSize=`${q}px 100%`,$.style.backgroundPosition=`-${W}px 0`,$.style.backgroundClip="text",$.style.webkitBackgroundClip="text",$.style.color="transparent";});},_=()=>{cancelAnimationFrame(L),cancelAnimationFrame(O),L=requestAnimationFrame(()=>{O=requestAnimationFrame(M);});};_();let I=new ResizeObserver(_);return I.observe(A),typeof document<"u"&&"fonts"in document&&document.fonts?.ready.then(_),window.addEventListener("resize",_),()=>{cancelAnimationFrame(L),cancelAnimationFrame(O),I.disconnect(),window.removeEventListener("resize",_);}},[F,N,a,h]);let k=useMemo(()=>n?jsx(ie,{dangerouslySetInnerHTML:{__html:n}}):a&&N!==null?N.split("").map((A,L)=>{let O=A===" ",_=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":l?"infinite":"1";return jsx(ie,{"data-char":A,className:`--fx-char -fx ${h?`--fx-${a}`:""}`,style:{"--delay":`${i+L*c}s`,"--duration":`${f}s`,"--iteration":_,"--target-opacity":v,display:O?"inline":"inline-block",whiteSpace:"pre",opacity:!h&&a==="typewriter"?0:void 0},children:A},L)}):o,[o,n,a,N,h,i,c,f,l]);return jsx(b,{ref:R,onMouseEnter:()=>m&&P(true),onMouseLeave:()=>m&&P(false),style:a?{...y,display:a?"flex":y?.display,flexWrap:a?"wrap":y?.flexWrap,opacity:a&&!h?0:a?1:y?.opacity,transition:a?"opacity 0.4s ease":void 0}:y,className:`${C} ${a?"--text-fx -fx":""}`.trim(),...x,children:k})};zr.displayName="Zuz.Text";var Z=zr;var ti=e=>{let{label:r,labelColor:t,icon:n,iconColor:o,index:s,className:a,onSelect:i}=e;return r=="-"?jsx(u,{className:"--line"}):jsxs(K,{reset:true,onClick:f=>i?.(e),className:`--item ${a||""}`.trim(),children:[jsx(u,{as:"--icon",children:jsx(re,{name:n,className:"--ico",style:o?{color:o}:{}})}),jsx(Z,{className:"--lbl flex aic",style:t?{color:t}:{},children:r})]})},Fr=ti;var Kr=({ref:e,...r})=>{let{id:t,as:n,fx:o,offsetX:s,offsetY:a,parent:i,event:f,arrow:c,when:l,items:d,header:m,footer:p,origin:y=ft.TopRight,...C}=r,[x,R]=useState(false),[T,P]=useState(d||[]),{position:g,targetRef:v,calculatedAnchor:h}=useAnchorPosition(i?.current,f,{offsetX:s,offsetY:a,preferredAnchor:y}),N=i&&g.top>i.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",F=useMemo(()=>{let _=h.toLowerCase();return _.includes("left")?"--arrow-left":_.includes("right")?"--arrow-right":"--arrow-center"},[h]),k=g.top!==0||g.left!==0;useEffect(()=>{l&&k?R(true):l||R(false);},[l,k]);let{className:A,style:L,rest:O}=B(C),M=he({...o?.transition?{transition:o.transition??ee.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??te.EaseInOut,duration:o?.duration??.05,when:x&&k});return jsxs(u,{ref:v,className:`--contextmenu ${c||i!=null?`--has-arrow ${N} ${F}`:""} abs flex cols ${A}`.trim(),"aria-hidden":!x,style:{...L,...M.style,top:g.top,left:g.left,visibility:k?"visible":"hidden",transformOrigin:h},...O,children:[typeof m=="function"?createElement(m):m,T.map((_,I)=>jsx(Fr,{..._,index:I},`context-${_.label.toLowerCase()}-${I}`)),typeof p=="function"?createElement(p):p]})};Kr.displayName="Zuz.ContextMenu";var So=Kr;var Wr=forwardRef((e,r)=>{let{children:t,fx:n,when:o,fxDelay:s,fxStep:a,classToIgnore:i,...f}=e,c=oe(true),l=useDelayed(),d=n||c?.group?.fx,m=s||c?.group?.fxDelay,p=a||c?.group?.fxStep,y=i||c?.group?.classToIgnore||"-fx",C=useMemo(()=>d?addPropsToChildren(t,x=>{if(x.type===Fragment)return false;let R=x.props||{},T="fx"in R,P="tfx"in R,g=R.as?Array.isArray(R.as)?R.as.join(" "):R.as:R.className||"";return !(typeof g=="string"&&g.includes(y))&&(!T||P)},(x,R)=>{let T=(m??0)+x*(p??.1),P=R.props||{};return "tfx"in P?{delay:(P.delay??0)+T}:{fx:{...d,delay:T,when:o??(n?.when||l)}}}):t,[t,o,l,d,m,p,y,n]);return jsx(u,{className:"--group",ref:r,...f,children:C})});Wr.displayName="Zuz.Group";var Co=Wr;var Ur=forwardRef((e,r)=>{let{message:t,spinner:n,spinnerSize:o,color:s,when:a,hideMessage:i,...f}=e,{className:c,style:l,rest:d}=B(f),{spinner:m}=oe(true);return "when"in e&&e.when==false?null:jsxs(Co,{fx:{transition:ee.SlideInBottom,curve:te.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${c}`.trim(),style:{...l,backgroundColor:"var(--cover-bg)"},...d,children:[jsx(Se,{variant:o||m?.variant||U.Small,type:n||m?.type||ye.Simple}),!i&&jsx(Z,{className:"--label",tfx:"bounce",style:{color:"var(--cover-label)"},children:t||"loading"})]})});Ur.displayName="Zuz.Cover";var ke=Ur;var To=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(r){return this.stack[this.stack.length-1]===r}push(r){this.stack.includes(r)||(this.stack.push(r),this.updateScrollLock());}pop(r){this.stack=this.stack.filter(t=>t!==r),this.updateScrollLock();}handleEscape(){let r=this.stack[this.stack.length-1];return r?(r(),true):false}get count(){return this.stack.length}},Ne=new To;var qr=forwardRef((e,r)=>{let{when:t,...n}=e;return jsx(u,{ref:r,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:ee.FadeIn,when:t},...n})});qr.displayName="Zuz.Overlay";var Ge=qr;var xi=({action:e,render:r=true,message:t=""})=>jsx(u,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:r?t:null}),Xr=xi;var vi=({action:e,actionPosition:r,dialogID:t,variant:n})=>jsx(u,{as:`--footer flex aic rel ${r?r==Pr.Center?"jcc":"":"jce"}`.trim(),children:e.map((o,s)=>jsx(K,{variant:n,onClick:a=>o.handler?o.handler():o.onClick?o.onClick():console.log("onClick Handler missing"),as:"--action",children:o.label},`dialog-${t}-action-${o.key}`))}),jr=vi;var wi={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"})," "]}),[Re.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"})}),[Re.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"})}),[Re.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"})}),[Re.Success]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),volumeHigh:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{fill:"#292D32",d:"M22 11.25h-1.25V10c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.25H18c-.41 0-.75.34-.75.75s.34.75.75.75h1.25V14c0 .41.34.75.75.75s.75-.34.75-.75v-1.25H22c.41 0 .75-.34.75-.75s-.34-.75-.75-.75M14.02 3.782c-1.12-.62-2.55-.46-4.01.45l-2.92 1.83c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h1.4300000000000002c.23 0 .46.07.66.19l2.92 1.83c.88.55 1.74.82 2.54.82a3 3 0 0 0 1.47-.37c1.11-.62 1.73-1.91 1.73-3.63v-9.18c0-1.72-.62-3.01-1.73-3.63"})}),volumeMute:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#292D32",d:"M18 16.75a.75.75 0 0 1-.6-1.2 5.93 5.93 0 0 0 .72-5.84.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.02 2.42.67 5.23-.9 7.33-.15.19-.37.29-.6.29"}),jsx("path",{fill:"#292D32",d:"M19.828 19.25a.75.75 0 0 1-.6-1.2c2.14-2.85 2.61-6.67 1.23-9.96a.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.59 3.78 1.05 8.16-1.41 11.44-.14.2-.37.3-.6.3M14.04 12.958c.63-.63 1.71-.18 1.71.71v2.93c0 1.72-.62 3.01-1.73 3.63a3 3 0 0 1-1.47.37c-.8 0-1.66-.27-2.54-.82l-.64-.4c-.54-.34-.63-1.1-.18-1.55zM21.77 2.229c-.3-.3-.79-.3-1.09 0l-4.95 4.95c-.06-1.6-.66-2.8-1.72-3.39-1.12-.62-2.55-.46-4.01.45l-2.91 1.82c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h.16l-2.94 2.94c-.3.3-.3.79 0 1.09.16.14.35.22.55.22s.39-.08.54-.23l18.46-18.46c.31-.3.31-.78 0-1.08"})]}),plus:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},V=wi;var Si=({title:e="Alert",onClose:r})=>jsxs(u,{as:"--head flex aic rel",children:[jsx(u,{as:`--${e?"title":"dot"} flex aic jcc rel`,children:e}),jsx(K,{onClick:t=>r(),className:"--closer abs center-v",children:V.close})]}),Jr=Si;var on=({ref:e,...r})=>{let{index:t,id:n,title:o,message:s,transition:a,curve:i,speed:f,type:c,action:l,actionPosition:d,spinner:m,loadingMessage:p,variant:y,inBackground:C,forceClose:x,forceLoading:R,onClose:T,onShow:P,onHide:g,...v}=r,h=useMemo(()=>uuid(12),[]),[b,N]=useState(o||""),[F,k]=useState(s||""),[A,L]=useState(c||tt.Dialog),[O,M]=useState(false),[_,I]=useState(true),[E,G]=useState(l||null),[q,H]=useState(false),{variant:$,spinner:X,dialog:W}=oe(true),j=y||W?.variant||$||U.Small,{style:J,className:le,rest:pe}=B(v),xe=useRef(null),se=he({when:O,duration:f||W?.speed||.3,delay:W?.delay||.1,transition:a||W?.transition||ee.SlideInBottom,curve:i||W?.curve||te.EaseInOut,watch:["scale","filter","transform"]}),ce=()=>{M(false),T(n);},Q=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ne.isTop(ce)&&ce();}}],[O]);useShortcuts(Q),useEffect(()=>{L(tt.Dialog),k(s),N(b),E&&G(E.reduce((ae,fe)=>(ae.push({...fe,key:fe.key||uuid(12)}),ae),[])),M(true),setTimeout(()=>P?P():()=>{},500);},[]),useEffect(()=>{x&&ce();},[x]),useEffect(()=>{R!=null&&H(R);},[R]),useEffect(()=>(O?Ne.push(ce):Ne.pop(ce),()=>Ne.pop(ce)),[O]);let ne=useMemo(()=>1e4+t*10,[t]);return jsxs(Fragment$1,{children:[jsx(Ge,{style:{zIndex:ne},when:O}),jsxs(u,{as:`--dialog --${(c??tt.Default).toLowerCase()} ${O?"--visible":""} ${le} fixed abc`.trim(),style:{...se.style,zIndex:ne+1,pointerEvents:C==true?"none":"auto",...C==true?{scale:"0.92",filter:"blur(2px)"}:{}},...pe,ref:xe,children:[jsx(Jr,{title:b,onClose:ce}),jsx(Xr,{message:F,render:_,action:E}),E&&E.length>0&&jsx(jr,{variant:j,action:E,dialogID:h,actionPosition:d}),jsx(ke,{when:q,spinner:m||W?.spinner||X?.type||ye.Simple,message:p||W?.loadingMessage})]})]})};on.displayName="Zuz.Dialog";var Ro=on;var rn=forwardRef((e,r)=>{let{speed:t,smooth:n=false,breakpoints:o={},style:s,...a}=e,{rootRef:i,containerRef:f,thumbY:c,thumbX:l,onScrollY:d,onScrollX:m}=useScrollbar(t||1,o,n),{style:p,className:y,rest:C}=B(a);return useEffect(()=>{let x=f.current;if(!x)return;let R=()=>{window.dispatchEvent(new Event("resize"));},T=P=>{let g=P.target;if(g.closest(".--allow-scroll")){let h=g.closest(".--allow-scroll"),{scrollTop:b,scrollHeight:N,clientHeight:F}=h,k=P.deltaY<0,A=P.deltaY>0;(k&&b>0||A&&b+F<N)&&P.stopPropagation();}};return x.addEventListener("scroll",R),x.addEventListener("wheel",T,{passive:true}),()=>{x.removeEventListener("scroll",R),x.removeEventListener("wheel",T);}},[f]),jsxs(u,{ref:i,className:y.trim(),as:"--scrollview rel",children:[jsx(u,{as:`--scroll-content ${y}`.trim(),ref:f,style:s||{},children:C.children}),jsx(u,{as:"--scroll-track --track-y --abs",children:jsx(u,{as:"--scroll-thumb --abs",ref:c,onMouseDown:d})}),jsx(u,{as:"--scroll-track --track-x --abs",children:jsx(u,{as:"--scroll-thumb --abs",ref:l,onMouseDown:m})})]})});rn.displayName="Zuz.ScrollView";var Io=rn;var nn=({ref:e,...r})=>{let{id:t,index:n,from:o,speed:s,children:a,margin:i,animation:f,prerender:c,inBackground:l,forceClose:d,forceLoading:m,onClose:p,...y}=r,{drawer:C}=oe(true),[x,R]=useState(a),[T,P]=useState(false),[g,v]=useState(c??(C?.prerender||true)),[h,b]=useState(false),N=()=>{P(false),p?.(t??-1);},{className:F,style:k,rest:A}=B(y),L=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ne.isTop(N)&&N();}}],[T]);useShortcuts(L),useEffect(()=>{R(a);},[a]),useEffect(()=>(T?Ne.push(N):Ne.pop(N),()=>Ne.pop(N)),[T]),useEffect(()=>{P(true);},[]),useEffect(()=>{d&&N();},[d]),useEffect(()=>{m!=null&&b(m);},[m]);let O=o||C?.from||we.Left,M=useMemo(()=>{switch(O){case we.Left:return {from:{x:"-100vw"},to:{x:0}};case we.Right:return {from:{x:"100vw"},to:{x:0}};case we.Top:return {from:{y:"-100vh"},to:{y:0}};case we.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,C?.from]),_=he({from:{...M.from,opacity:0},to:{...M.to,opacity:1},when:T,curve:f||C?.animation||te.EaseInOut,duration:s||C?.speed||.5,watch:["scale","filter"]}),I=useMemo(()=>1e4+(n||1)*10,[n]);return jsxs(Fragment$1,{children:[jsx(Ge,{onClick:E=>{T&&N();},when:T,style:{zIndex:I}}),jsxs(u,{ref:e,"aria-hidden":!T,className:`--drawer flex cols ${F} --${O.toLowerCase()} fixed`,style:{...k,..._.style,"--m":`${i||C?.margin||0}px`,zIndex:I+1,pointerEvents:l==true?"none":"auto",...l==true?{scale:"0.92",filter:"blur(2px)"}:{}},...A,children:[o==we.Top||o==we.Bottom?jsx(u,{className:"--handle"}):null,jsx(K,{as:"--close-drawer --abs",onClick:N,children:V.close}),jsxs(Io,{as:"rel",children:[g||T?x:null,jsx(ke,{when:h})]})]})]})};nn.displayName="Zuz.Drawer";var Eo=nn;var an=forwardRef((e,r)=>{let{progress:t,type:n,animated:o,...s}=e,a=useRef(null);useImperativeHandle(r,()=>({setProgress:l=>{a.current.style.width=`${l*100}%`,a.current.setAttribute("data-value",l+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),useEffect(()=>{t&&a.current&&(o?setTimeout(()=>a.current.style.width=`${t*100}%`,500):a.current.style.width=`${t*100}%`,a.current.setAttribute("data-value",t+""));},[t,a.current]);let{className:i,style:f,rest:c}=B(s);return jsx(u,{className:`--progress ${o?"--animated":""} flex rel ${i}`.trim(),style:f,...c,children:jsx(u,{ref:a,className:"--bar rel"})})});an.displayName="Zuz.ProgressBar";var qe=an;var Ft=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Ft||{}),_t=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(_t||{}),ln=(t=>(t.Stack="stack",t.Individual="individual",t))(ln||{}),cn={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var $i=e=>{let{index:r,id:t,type:n,icon:o,busy:s,width:a,title:i,message:f,duration:c,sticky:l=false,actions:d=[],position:m,style:p,isHovered:y,total:C,progress:x,progressValue:R,forceClose:T,variant:P,onClick:g,onClose:v}=e,[h,b]=useState(false),[N,F]=useState(false),{toast:k}=oe(true),A=typeof R=="number",L=A?Math.max(0,Math.min(1,R)):void 0,O=N||T,M=m??k?.position??"TopCenter",_=n??k?.type??"default",I=p??k?.style??"stack",E=c??k?.duration??4,G=x??k?.progress??false,q=useRef(E*1e3),H=useRef(void 0),$=useRef(void 0),X=useRef(null),W=he({when:h&&!O,duration:.3,transition:k?.transition||(M.includes("Top")?ee.SlideInTop:M.includes("Bottom")?ee.SlideInBottom:M.includes("Left")?ee.SlideInLeft:ee.SlideInRight),curve:k?.curve||te.EaseInOut,watch:["transform","opacity","scale","filter"]});useEffect(()=>{b(true);let Q=ne=>{if($.current!==void 0){let ae=ne-$.current;if(!A&&!y&&!l&&!O&&(q.current-=ae,X.current)){let fe=Math.max(0,q.current/(E*1e3)*100);X.current?.setProgress?.(fe/100);}}$.current=ne,q.current<=0?F(true):H.current=requestAnimationFrame(Q);};return H.current=requestAnimationFrame(Q),()=>{H.current&&cancelAnimationFrame(H.current);}},[y,l,O,E]),useEffect(()=>{if(O){let Q=setTimeout(()=>{v?.(t);},350);return ()=>clearTimeout(Q)}},[O,t]);let j=I==="stack",J=y?r*65:r*8,le=y?1:Math.max(.85,1-r*.05),pe=y?1:Math.max(.4,1-r*.2),xe=()=>{g?g():(!d||d.length===0)&&F(true);},se=W.style.transform||"translate(0, 0)",ce=O?se:`${se} translateY(${M.includes("Top")?J:-J}px) scale(${le})`;return jsxs(u,{onClick:xe,as:`--snack --${O?"hidden":"visible"} --${P||k?.variant||U.Medium} --${_} --${M.toLowerCase()} abs flex aic`,style:{...W.style,zIndex:1e3-r,pointerEvents:O?"none":"auto",opacity:O?W.style.opacity:pe,transform:ce,filter:!O&&j&&!y&&r>0?"blur(1px)":"none",cursor:!d||d.length===0?"pointer":"default",transition:`${W.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxs(u,{as:"--ico flex aic jcc rel",children:[o?jsx(re,{name:o}):jsx(u,{as:"--no-icon"}),s===true&&jsx(Se,{as:"abs abc"})]}),jsxs(u,{as:"--meta flex cols",style:a?{width:a,minWidth:a,maxWidth:a}:void 0,children:[jsx(Z,{as:"--tt",children:i||cn[n]}),jsx(Z,{as:"--tm",children:f})]}),d&&d.length>0&&jsx(u,{as:"--actions flex gap:5",children:d.map((Q,ne)=>jsx(K,{as:"--snack-btn bold",onClick:ae=>{ae.stopPropagation(),Q.onClick();},children:Q.label},ne))}),(G||A)&&jsx(qe,{as:"abs",progress:L,ref:X})]})},Lo=$i;var Ce=createContext(null),Wi=({ref:e,...r})=>{let n=useContext(Ce)?.depth??0,[o,s]=useState(null),[a,i]=useState(null),[f,c]=useState(false),[l,d]=useState([]),m=useDelayed(),p=useRef(0),y=()=>++p.current,C=()=>{c(false),setTimeout(()=>i(null),200);};useImperativeHandle(e,()=>({add(g){let v=y(),h={id:v,...g};return d(b=>[...b,h]),v},openMenu(g){c(false),setTimeout(()=>{i({id:y(),type:"menu",props:g}),c(true);},16);},update(g,v){d(h=>h.map(b=>b.id!==g?b:{...b,props:{...b.props,...v}}));},remove(g){d(v=>v.map(h=>h.id===g?{...h,props:{...h.props,forceClose:true}}:h)),a?.id===g&&C();},loading(g,v){d(h=>h.map(b=>b.id===g?{...b,props:{...b.props,forceLoading:v}}:b)),a?.id===g&&C();},clear(g){d(l.filter(v=>v.type!=g));}})),useEffect(()=>{if(a&&f){let g=()=>C();return document.addEventListener("click",g),()=>document.removeEventListener("click",g)}},[a,f,C]);let x=g=>{setTimeout(()=>{d(v=>v.filter(h=>h.id!==g)),a?.id===g&&i(null);},250);},R=useMemo(()=>[...l.filter(g=>g.type!="toast")],[l]);if(!m)return null;let T=l.filter(g=>g.type=="toast").reverse(),P=Object.values(_t);return createPortal(jsxs(u,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[R.map((g,v)=>{let h=v<R.length-1;return g.type==="dialog"?jsx(Ro,{onClose:x,index:v,id:g.id,...g.props,inBackground:h},`layer-${g.type}-${g.id}`):g.type==="drawer"?jsx(Eo,{onClose:x,index:v,id:g.id,...g.props,inBackground:h},`layer-${g.type}-${g.id}`):null}),P.map(g=>{let v=T.filter(h=>(h.props.position||"TopCenter")===g);return v.length===0?null:jsx(u,{onMouseEnter:()=>s(g),onMouseLeave:()=>s(null),as:`--toast-container fixed --${g.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:v.map((h,b)=>jsx(Lo,{index:b,total:v.length,isHovered:o===g,onClose:x,id:h.id,...h.props},h.id))},g)}),a&&jsx(u,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsx(So,{onClose:C,when:f,...a.props},`menu-${a.id}`)})]}),document.body)},Gi=({children:e})=>{let r=useContext(Ce),t=r?r.depth+1:0,n=useRef(null),o=useMemo(()=>({add:s=>n.current?.add(s),openMenu:s=>n.current?.openMenu(s),update:(s,a)=>n.current?.update(s,a),remove:s=>n.current?.remove(s),loading:(s,a)=>n.current?.loading(s,a),clear:s=>n.current?.clear(s),depth:t,isSubLayer:!!r}),[r]);return jsxs(Ce.Provider,{value:o,children:[e,jsx(Wi,{ref:n})]})},bo=Gi;var qi=()=>{let e=useContext(Ce);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(n,o,s)=>{n.preventDefault(),e.openMenu({event:n,items:o,origin:s});},showMenu:(n,{items:o,origin:s,offsetX:a,offsetY:i,transition:f,curve:c,arrow:l,duration:d,header:m,footer:p})=>{e.openMenu({fx:{transition:f,curve:c,duration:d},parent:n,items:o,origin:s||ft.TopCenter,offsetX:a,offsetY:i,arrow:l,header:m,footer:p});},hide:e.clear}},Xi=qi;var ji=()=>{let e=useContext(Ce);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("dialog"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a);return {clearAll:r,show:s=>{let a=e.add({type:"dialog",props:{...s,type:tt.Dialog}});return {id:a,setLoading:i=>n(a,i),hide:()=>t(a)}},hide:t}},Qi=ji;var el=()=>{let e=useContext(Ce);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("drawer"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a),o=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:i=>n(a,i),close:()=>t(a)}};return {clearAll:r,open:s=>o({children:s}),right:s=>o({children:s,from:we.Right}),left:s=>o({children:s,from:we.Left}),top:s=>o({children:s,from:we.Top}),bottom:s=>o({children:s,from:we.Bottom}),close:t}},tl=el;var rl=(e,r,t={})=>{let[n,o]=useState(null),[s,a]=useState(false),{duration:i=.25,curve:f=te.EaseOutBack,borderRadius:c={from:40,to:24},targetWidth:l=320}=t;return useLayoutEffect(()=>{r&&e.current?(o(e.current.getBoundingClientRect()),a(true)):r||a(false);},[r,e]),{style:he({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:c.from},to:{opacity:1,width:l,height:"auto",borderRadius:c.to},curve:f,duration:i,when:s&&r}).style,isMeasured:s,sourceRect:n}},nl=rl;var ll=(e,r={})=>{let{offset:t=8,direction:n="bottom",container:o=null,triggerRef:s=null}=r,a=useRef(null),i=useCallback(()=>{let f=e.current;if(!f)return;let c=s?.current||f.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let l=f.getBoundingClientRect(),d=c.getBoundingClientRect(),m,p;o?(m=o.getBoundingClientRect(),p="absolute"):(window.getComputedStyle(f).position==="fixed"?p="fixed":p="absolute",p==="fixed"?m={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:m={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),f.style.position!==p&&(f.style.position=p),a.current=p;let x=0,R=0;switch(n){case "top":x=d.top-l.height-t,R=d.left,x<m.top&&d.bottom+l.height+t<=m.bottom&&(x=d.bottom+t);break;case "bottom":x=d.bottom+t,R=d.left,x+l.height>m.bottom&&d.top-l.height-t>=m.top&&(x=d.top-l.height-t);break;case "left":x=d.top,R=d.left-l.width-t,R<m.left&&d.right+l.width+t<=m.right&&(R=d.right+t);break;case "right":x=d.top,R=d.right+t,R+l.width>m.right&&d.left-l.width-t>=m.left&&(R=d.left-l.width-t);break}if(x=Math.max(m.top,Math.min(x,m.bottom-l.height)),R=Math.max(m.left,Math.min(R,m.right-l.width)),a.current==="fixed")f.style.top=`${x}px`,f.style.left=`${R}px`;else {let T;f.offsetParent?T=f.offsetParent.getBoundingClientRect():T={top:0,left:0};let P=x-T.top+window.scrollY,g=R-T.left+window.scrollX;f.style.top=`${P}px`,f.style.left=`${g}px`;}},[e,s,t,n,o]);return useEffect(()=>{let f=e.current;if(!f)return;let c=s?.current||f.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let l=new ResizeObserver(i);return l.observe(f),c&&l.observe(c),i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,true),()=>{l.disconnect(),c&&l.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,true);}},[e,n,t,o,s]),{postion:a.current,reposition:i}},bt=ll;var ml=()=>{let e=useContext(Ce);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(p,y)=>e.add({type:"toast",props:{...y,type:p}}),t=()=>e.clear("toast"),n=p=>e.remove(p),o=(p,y)=>e.update(p,y),s=p=>({id:p,update:y=>o(p,y),setType:y=>o(p,{type:y}),setProgress:y=>o(p,{progress:true,progressValue:y}),setBusy:y=>o(p,{busy:y}),success:()=>o(p,{type:"success"}),error:()=>o(p,{type:"error"}),warn:()=>o(p,{type:"warn"}),promise:()=>o(p,{type:"promise"}),default:()=>o(p,{type:"default"}),hide:()=>n(p)}),a=p=>s(r("default",p)),i=p=>s(r("success",p)),f=p=>s(r("error",p)),c=p=>s(r("warn",p)),l=p=>s(r("promise",p)),d=(p,y,C)=>{let x=r(p,{...y,sticky:y.sticky??false,actions:[{label:C?.label||"Ok",onClick:()=>{C?.onClick?.(),n(x);}}]});return s(x)},m=(p,y,C,x)=>{let R=r(p,{...y,sticky:true,actions:[{label:x?.label||"Cancel",onClick:()=>{x?.onClick?.(),n(R);}},{label:C?.label||"Ok",onClick:()=>{C?.onClick?.(),n(R);}}]});return s(R)};return {show:a,hide:n,promise:l,clearAll:t,ok:(p,y)=>d("default",p,y),success:(p,y)=>y?d("success",p,y):i(p),error:(p,y)=>y?d("error",p,y):f(p),confirm:(p,y,C)=>m("default",p,y,C),warn:(p,y)=>y?d("warn",p,y):c(p),succes:(p,y)=>y?d("success",p,y):i(p)}},pl=ml;var fl=()=>{let e=useContext(Ce);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(c,l)=>e.add({type:"toast",props:{...l,type:c}});return {show:(c,l,d,m)=>r("default",{title:c,message:l,icon:d,duration:m}),hide:c=>e.remove(c),success:(c,l,d,m)=>r("success",{title:c,message:l,icon:d,duration:m}),error:(c,l,d,m)=>r("error",{title:c,message:l,icon:d,duration:m}),warn:(c,l,d,m)=>r("warn",{title:c,message:l,icon:d,duration:m}),promise:(c,l,d,m)=>r("promise",{title:c,message:l,icon:d,duration:m}),clearAll:()=>e.clear("toast")}},Mo=fl;var yn=({ref:e,style:r,...t})=>{let n=useRef(null),o=useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:i}=B(t,o);return jsx("div",{ref:e||n,style:{...s,...r||{}},className:a,...i})};yn.displayName="Zuz.Box";var u=yn;var bn=forwardRef((e,r)=>{let{title:t,message:n,...o}=e,[s,a]=useState(false);return jsxs(u,{className:"--accordion flex cols",...o,children:[jsxs(K,{onClick:i=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsx(Z,{className:"--label flex",children:t}),jsx(u,{className:"--arrow flex",children:s?V.arrowUp:V.arrowDown})]}),s&&jsx(u,{className:"--detail",children:n})]})});bn.displayName="Zuz.Accordion";var bl=bn;var vl=({label:e,icon:r,onClick:t,idx:n,selected:o})=>jsx(K,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof r=="string"?jsx(re,{name:r}):r}),wn=vl;var Sn=forwardRef((e,r)=>{let{items:t,name:n,selected:o,position:s,...a}=e,i=useRef(null),[f,c]=useState(o||t[0].tag||0),l=useCallback(({x,y:R})=>{if(i.current){let T=i.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-T.left}`),document.documentElement.style.setProperty("--tip-y",`${R-T.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),d=useCallback(()=>{i.current&&(i.current.removeEventListener("pointerleave",d),i.current.removeEventListener("pointermove",l),document.documentElement.style.setProperty("--tip-s","0"));},[]),m=useCallback(()=>{i.current&&(i.current.addEventListener("pointerleave",d),i.current.addEventListener("pointermove",l));},[]);useEffect(()=>{i.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,R)=>R.label.length>x.length?R.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),i.current?.addEventListener("pointerenter",m));},[]);let{className:p,style:y,rest:C}=B(a);return jsxs(u,{ref:i,style:y,className:[`--actionbar flex aic ${p}`,`${!s||s==ge.Auto?"rel":`--${s}`}`].join(" ").trim(),...C,children:[t.map((x,R)=>jsx(wn,{selected:f===x.tag||o==R,...x,idx:R},`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,"-")}`))})})]})});Sn.displayName="Zuz.ActionBar";var Pl=Sn;var Tn=forwardRef((e,r)=>{let{type:t,icon:n,title:o,message:s,iconSize:a,...i}=e,{className:f,style:c,rest:l}=B(i);return jsxs(u,{className:`--alert --${t||Re.Info} flex aic ${f}`.trim(),style:c,...l,children:[jsx(u,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&V[t||Re.Info]}),jsxs(u,{className:"--meta flex cols",children:[jsx(Z,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsx(Z,{className:"--message",h:2,children:s})]})]})});Tn.displayName="Zuz.Alert";var Nl=Tn;var Ao=createContext(null),$o=()=>{let e=useContext(Ao);return e?useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},zo=()=>useContext(Ao),He=()=>{let e=zo(),r=$o();return {...e,...r}},In=({children:e,initialValues:r={}})=>{let t=useRef({values:r,errors:{},touched:{}}),n=useRef(new Set(Object.keys(r))),o=useRef(new Set),s=useCallback(()=>t.current,[]),a=useCallback(c=>(o.current.add(c),()=>o.current.delete(c)),[]),i=()=>{o.current.forEach(c=>c());};useEffect(()=>{if(r&&Object.keys(r).length>0){let c=new Set(Object.keys(r)),l=[...n.current].filter(m=>!c.has(m)),d={...t.current.values};l.forEach(m=>delete d[m]),t.current={...t.current,values:{...d,...r}},n.current=c,i();}},[r]);let f=useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(c,l)=>{t.current.values[c]!==l&&(t.current={...t.current,values:{...t.current.values,[c]:l}},i());},deleteFieldValue:c=>{if(!(c in t.current.values))return;let{[c]:l,...d}=t.current.values;t.current={...t.current,values:d},i();},setFieldError:(c,l)=>{t.current={...t.current,errors:{...t.current.errors,[c]:l}},i();},reset:()=>{t.current={values:{},errors:{},touched:{}},i();}}),[]);return jsx(Ao.Provider,{value:f,children:e})};var Bn=({ref:e,...r})=>{let{variant:t,numeric:n,name:o,onConfirm:s,...a}=r,{style:i,className:f,rest:c}=B(a),{variant:l}=oe(true),d=useRef(null),m=He(),p=o?m.errors?.[o]:null,y=o&&m.values&&m.setFieldValue,C=y?m.values?.[o]:void 0,x=useDebounce(T=>{y&&m.setFieldValue?.(o,T);},500),R=T=>{let P=T.currentTarget.value;n&&(P=P.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),T.currentTarget.value=P),x(P),r.onInput?.(T);};return useEffect(()=>{d.current&&o&&C!==void 0&&d.current.value!==String(C)&&(d.current.value=String(C));},[C,o]),useEffect(()=>()=>{y&&m.deleteFieldValue?.(o);},[]),jsx("input",{name:o,className:`--input --${t||l} ${p?"--has-error":""} --flex ${f}`.trim(),style:i,defaultValue:C??r.defaultValue??"",onInput:R,onKeyDown:T=>{T.key=="Enter"&&s?.(T.currentTarget.value);},ref:T=>{d.current=T,typeof e=="function"?e(T):e&&(e.current=T);},...c})};Bn.displayName="Zuz.Input";var ue=Bn;var kn=e=>{let{meta:r,children:t}=e,n=useDelayed(),{label:o,icon:s,...a}=isValidElement(r)?{}:r,{className:i,style:f,rest:c}=B({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return isValidElement(r)?jsx("li",{style:f,className:i,children:r}):jsxs("li",{style:f,className:i,...c,children:[t,typeof r=="string"?r:o]})};kn.displayName="Zuz.ListItem";var Ln=kn;var On=forwardRef((e,r)=>{let{items:t,variant:n,direction:o,seperator:s,ol:a,...i}=e,{className:f,style:c,rest:l}=B(i),d=a==true?"ol":"ul";return createElement(d,{className:`--list --${n||U.Small} flex ${o??"cols"} ${f}`.trim(),style:c,ref:r,...l,children:t.map((m,p,y)=>{let C=`${typeof m=="string"?`li-${String(m)}`:isValidElement(m)?`li-${m.key}`||`${p}-${MD5(m.toString())}`:m.label}-${p}`;return jsxs(Fragment,{children:[jsx(Ln,{meta:m}),s&&y[p+1]?jsx("li",{className:"--list-seperator",children:s},`spt-${p+1}-${C}`):null]},C)})})});On.displayName="Zuz.List";var Ye=On;var Dn=forwardRef((e,r)=>{let{fx:t,action:n,data:o,withStyle:s,onChange:a,...i}=e,{className:f}=B({as:s||""}),{style:c}=B(i),[l,d]=useState(false),[m,p]=useState(o||[]),y=useRef(null),C=useRef(null),x=useRef(null),R=useMemo(()=>i.name||uuid(12),[]),[T,P]=useState(null),[g,v]=useState(null),[h,b]=useState([]),F=useDebounce(I=>{I.target.value==""?(d(false),p([])):n&&I.target.value.trim()!=""&&withPost(n,{query:I.target.value}).then(E=>{"items"in E&&_(E.items).isArray()?(p(E.items),v(I.target.value),b(E.items)):console.error("Action Response should contain items array"),P(null);}).catch(E=>{P(null),p([]);});},250),k=()=>{if(C.current){let I=C.current.getBoundingClientRect(),E=window.innerHeight-I.bottom,G=I.top;if(x.current){let q=x.current;E<q.offsetHeight&&G>E?(q.style.top="auto",q.style.bottom=`${I.height}px`,q.style.maxHeight=`${G-150}px`):(q.style.top=`${I.height+5}px`,q.style.bottom="auto",q.style.maxHeight=`${E-150}px`);}}},A=I=>{if(m.length>0){if((I.key==="ArrowDown"||I.key==="ArrowUp")&&(I.preventDefault(),I.stopPropagation()),I.key==="Escape")P(null),d(false),p([]);else if(I.key==="ArrowDown")P(E=>{let G=E===null||E===m.length-1?0:E+1;return O(G),G});else if(I.key==="ArrowUp")P(E=>{let G=E===null||E===0?m.length-1:E-1;return O(G),G});else if(I.key==="Enter"&&T!==null){let E=m[T];y.current&&(y.current.value=E,d(false),p([]));}}},L=I=>{y.current&&(y.current.value=I,d(false),p([]));},O=I=>{let E=m[I];if(E&&y.current&&(y.current.value=E,y.current.setSelectionRange(E.length,E.length)),x.current){let q=x.current.children[I];q&&q.scrollIntoView({block:"nearest"});}},M=I=>{C.current&&!C.current.contains(I.target)&&(d(false),p([]));},_$1=()=>{y.current&&y.current.value===g&&(p(h),P(null),k());};return useEffect(()=>(window.addEventListener("resize",k),window.addEventListener("scroll",k,true),document.addEventListener("mousedown",M),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",k,true),document.removeEventListener("mousedown",M);}),[]),useEffect(()=>{k();},[m]),jsxs(u,{style:c,ref:C,className:`--autocomplete --${e.size||U.Small} flex aic rel ${f}`.trim(),children:[jsx(ue,{ref:y,autoComplete:"off",onChange:F,onKeyDown:A,onFocus:_$1,...i}),jsx(u,{className:"--arrow rel flex aic jcc",children:m.length>0?V.arrowUp:V.arrowDown}),m.length>0&&jsx(Ye,{id:R,ref:x,className:"--suggestion-list flex cols abs",items:m.map((I,E)=>({label:I,onClick:G=>{G.preventDefault(),G.stopPropagation(),L(I);},className:T===E?"--current":"",animate:{transition:ee.SlideInBottom,curve:te.EaseInOut,delay:clamp(.02*E,.02,.5)}}))})]})});Dn.displayName="Zuz.AutoComplete";var Jl=Dn;var Hn=forwardRef((e,r)=>{let t=useRef(null),n=useMemo(()=>r&&typeof r!="function"&&r.current?r:t,[r]),{style:o,className:s,rest:a}=B(e,n);return !a.src||a.src==""?null:jsx("img",{ref:n,style:o,className:`${s} flex`,...a})});Hn.displayName="Zuz.Image";var je=Hn;var An=forwardRef((e,r)=>{let{src:t,variant:n,type:o,crossOrigin:s,referrerPolicy:a,fx:i,as:f,alt:c,color:l,style:d,...m}=e,[p,y,C]=useImage(t??"",s,a),{className:x,style:R,rest:T}=B({fx:i,as:f});return jsx(u,{className:`--avatar --${n||U.Small} --${(o||Tr.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:l||"var(--primary)",...d,...R},...T,children:t?jsx(je,{src:p,crossOrigin:s,referrerPolicy:a,...m}):jsx(Z,{className:"--avatar-label",children:(c?c.charAt(0):"A").toUpperCase()})})});An.displayName="Zuz.Avatar";var ic=An;var lc=({size:e=5,type:r="dead",label:t="",variant:n=U.Small,loading:o=false,spinner:s,...a})=>{let{style:i,className:f,rest:c}=B(a);return jsxs(u,{style:{..._(t).isEmpty()?{"--badge-size":e}:{},...i},as:`--badge --${n} --${r} rel flex aic jcc ${f}`.trim(),children:[jsx(u,{fx:{transition:ee.FadeIn,curve:te.Liquid,duration:.5,when:o},as:"abs abc",children:jsx(Se,{type:s})}),_(t).isEmpty()?jsx(u,{as:`--dot --${r}`}):jsx(Z,{as:"--label",children:t})]})},cc=lc;var Cc=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>format(addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>addDays(new Date,1),getDateFormat:()=>format(addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let e=new Date,r=e.getDay();return addDays(e,(6-r)%7||6)},getDateFormat:()=>{let e=new Date,r=e.getDay();return format(addDays(e,(6-r)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>format(addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>format(addWeeks(new Date,1),"d MMM"),getDate:()=>addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>format(addWeeks(new Date,2),"d MMM"),getDate:()=>addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>format(addWeeks(new Date,4),"d MMM"),getDate:()=>addWeeks(new Date,4)}],Tc=e=>{let r=new Set;return e.filter(t=>{if(t.label=="Later")return true;let n=t.getDate().toISOString().split("T")[0];return r.has(n)?false:(r.add(n),true)})},zn=forwardRef((e,r)=>{let{defaultValue:t,variant:n,onChange:o,...s}=e,{style:a,className:i,rest:f}=B(s),[c,l]=useState(t||new Date),d=startOfMonth(c),m=endOfMonth(c),p=startOfWeek(d),y=endOfWeek(m),C=useMemo(()=>eachDayOfInterval({start:p,end:y}),[p,y]),x=P=>{o?.(P),l(P);},R=()=>{l(P=>new Date(P.getFullYear(),P.getMonth()-1));},T=()=>{l(P=>new Date(P.getFullYear(),P.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:Tc(Cc).map(P=>{let g=P.getDate();return jsxs(K,{onClick:()=>x(g),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(Z,{as:"flex:1",children:P.label}),jsx(Z,{as:"tar",children:P.getDateFormat()})]},`--dtp-option-label-${P.label}`)})}),jsxs(u,{as:"--calendar-selector flex cols flex:1",children:[jsxs(u,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(Z,{as:"flex:1 --calendar-cm bold",children:format(c,"MMMM yyyy")}),jsx(K,{onClick:R,as:"--calendar-chevron",children:V.chevronUpOutline}),jsx(K,{onClick:T,as:"--calendar-chevron",children:V.chevronDownOutline})]}),jsxs(u,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(P=>jsx(Z,{as:"--calendar-day",children:P},`--calendar-hd-${P}`)),C.map((P,g)=>{let v=isSameMonth(P,c),h=isSameDay(P,c),b=isToday(P);return jsx(K,{disabled:!v,onClick:()=>x(P),as:["--calendar-day --calendar-dd",`${h?"--calendar-dd-selected":""}`,`${b?"--calendar-dd-current":""}`],children:format(P,"d")},`--calendar-day-${g}-${P.getFullYear()}-${P.getMonth()}-${P.getDay()}`)})]})]})]})});zn.displayName="Zuz.Calendar";var Ko=zn;var qt=(t=>(t.Table="table",t.Gooey="gooey",t))(qt||{});var Kn=({ref:e,...r})=>{let{itemCount:t,itemsPerPage:n,startPage:o,pageRange:s,paginationStyle:a,breakLabel:i,prevLabel:f,nextLabel:c,hash:l,loading:d,seperator:m,renderOnZeroPageCount:p,asDots:y,progressBar:C,onPageChange:x,...R}=r,T=useRef(null),P=useMemo(()=>toHash(numberInRange(4,8)),[]),g=useCallback(I=>`${toHash(I,l||6,P)}${m||""}${P}`,[P]),v=useMemo(()=>i||"...",[i]),h=useRef(null),[b,N]=useState({id:l?o?typeof o=="number"?g(o):o:1:o||1,label:o||1});useImperativeHandle(e,()=>({setPage:I=>N(I),getPage:I=>b,setProgress:I=>h.current?.setProgress?.(I),getProgress:()=>h.current?.getProgress?.()??0}),[h.current]);let{style:F,className:k,rest:A}=B(R),L=useCallback(I=>typeof I=="number"?I:+I.label,[]);if(!t)throw new Error('"itemCount" prop is required');let O=useMemo(()=>Math.ceil(t/n),[t,n]),M=useMemo(()=>{let I=[],E=Math.max(L(b)-(s||2),1),G=Math.min(L(b)+(s||2),O);E>1&&I.push({id:l?g(1):1,label:1}),E>2&&I.push({id:-1,label:v});for(let q=E;q<=G;q++)I.push({id:l?g(q):q,label:q});return G<O-1&&I.push({id:-1,label:v}),G<O&&I.push({id:l?g(O):O,label:O}),I},[b]),_=useCallback(I=>{let E=I;+E.label<1||+E.label>O||(N(E),x?.(E));},[t,n,b]);return M.length<=1&&(p??false)===false?null:jsxs(u,{ref:T,as:`--pagination ${y===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${k}`,children:[jsx(u,{as:"flex flex:1 aic --pgt-btns",children:(M.length>1?M:[{id:1,label:1},{id:-1,label:v}]).map((I,E,G)=>{let q=(typeof I=="string"?I:I.label)==L(b);return jsx(K,{disabled:I.id==-1||L(b)==+I.label,className:q?"--current-page":"",onClick:H=>_(I),children:y===true?C===true&&q?jsx(qe,{ref:h}):"":typeof I=="string"?I:I.label},`--pg-${E}-${I.id}`)})}),jsx(u,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(L(b)-1)*n+1} - `,`${Math.min(L(b)*n,t)} of ${t} items`].join(" ")}),jsxs(u,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsx(K,{disabled:L(b)<=1,onClick:I=>_({id:l?g(L(b)-1):L(b)-1,label:L(b)-1}),children:V.chevronLeftOutline}),jsx(K,{disabled:M.length<=1||L(b)==L(M[M.length-1]),onClick:I=>_({id:l?g(L(b)+1):L(b)+1,label:L(b)+1}),children:V.chevronRightOutline})]})]})};Kn.displayName="Zuz.Pagination";var St=Kn;function Lc(e,r){let{items:t,renderItem:n,effect:o="slide",loop:s=true,loopMode:a="infinite",startIndex:i=0,useKeys:f=true,useWheel:c=true,spacing:l=160,rotation:d=20,scaleStep:m=.15,blur:p=4,animation:y="power",showDots:C=false,autoPlay:x=false,autoPlaySpeed:R=3,onChange:T,...P}=e,{className:g,style:v}=B(P),h=useRef(null),b=R/(R>=1e3?1e3:1),N=useCarousel({total:t.length,initialIndex:i,loop:s,useKeys:f,useWheel:c,onChange:O=>{h.current?.setPage({id:O+1,label:O+1}),h.current?.setProgress(0),T?.(O);}}),{pause:F,resume:k,reset:A}=useTimer({duration:b,autoStart:x===true,onProgress:O=>{x===true&&h.current?.setProgress(1-O);},onExpired:()=>{x===true&&N.next(),A();}}),L={...v,"--carousel-spacing":`${l}px`,"--carousel-rotation":`${d}deg`,"--carousel-blur":`${p}px`,"--carousel-scale-step":m,"--active-index":N.index,"--carousel-transition":`var(--${y})`};return jsxs(u,{ref:r,className:`--carousel --effect-${o} --loop-${a} flex cols aic jcc ${g}`.trim(),style:L,children:[jsx(u,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((O,M)=>{let _=M-N.index;if(a==="infinite"){let E=t.length;_=((_+E/2)%E+E)%E-E/2;}let I=M===N.index;return jsx(u,{onMouseEnter:()=>I&&F(),onMouseLeave:()=>I&&k(),className:`--carousel-item-wrapper abs ${I?"--is-active":""}`,style:{"--offset":_,zIndex:I?100:100-Math.abs(_),display:Math.abs(_)>5?"none":"flex"},children:n(O,M,N.index)},M)})}),C&&jsx(St,{ref:h,itemCount:t.length,itemsPerPage:1,startPage:i+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:O=>N.goTo(+O.label-1),asDots:true,progressBar:true})]})}var Mc=forwardRef(Lc),Oc=Mc;var Wn=(r=>(r.Line="line",r))(Wn||{});var qn=forwardRef((e,r)=>{let{data:t,width:n,height:o,lineColor:s,strokeWidth:a=2,gradientStartColor:i,gradientEndColor:f,animated:c,animDuration:l=2,animDelay:d=0,padding:m=0,type:p,...y}=e,{className:C,style:x,rest:R}=B(y),T=useRef(null),P=useResizeObserver(T.current?.parentElement||T),g=typeof n=="number"?n:P.width,v=typeof o=="number"?o:P.height,h={width:g,height:v},b=useId(),{pathD:N,areaPathD:F}=useLineChart(t,h,m+(a||2)),k=useRef(null),A=useRef(null),[L,O]=useState(0),[M,_]=useState(0);return useEffect(()=>{c&&(k.current&&O(k.current.getTotalLength()),A.current&&_(A.current.getTotalLength()));},[c,N,F,g,v]),jsx(u,{ref:T,as:`--chart --${p||"line"}-chart ${C}`.trim(),style:{...x,width:n,height:o},...R,children:g>0&&v>0&&jsxs("svg",{viewBox:`0 0 ${g} ${v}`,preserveAspectRatio:"xMidYMid meet",children:[jsx("defs",{children:jsxs("linearGradient",{id:b,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopColor:i}),jsx("stop",{offset:"100%",stopColor:f})]})}),jsx("path",{ref:A,d:F,fill:`url(#${b})`,stroke:"none",style:c?{strokeDasharray:M,strokeDashoffset:M}:{},children:c&&jsx("animate",{attributeName:"stroke-dashoffset",from:M,to:"0",dur:`${l||2}s`,begin:`${d||0}s`,fill:"freeze"})}),jsx("path",{ref:k,d:N,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:c?{strokeDasharray:L,strokeDashoffset:L}:{},children:c&&jsx("animate",{attributeName:"stroke-dashoffset",from:L,to:"0",dur:`${l||2}s`,begin:`${d||0}s`,fill:"freeze"})})]})})});qn.displayName="Zuz.Chart";var Fc=qn;var Xn=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(Xn||{}),Yn=(c=>(c.Image="img",c.Video="vid",c.Audio="audio",c.Link="link",c.Document="doc",c.Location="loc",c.Contact="contact",c.Event="event",c.Poll="poll",c))(Yn||{});var jn=forwardRef((e,r)=>{let{text:t,media:n,side:o="me",status:s=1,timeStamp:a=Date.now(),arrow:i=true,...f}=e,{className:c,style:l,rest:d}=B(f);return jsx(u,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxs(u,{className:`--bubble --bubble-${o} ${n?`--with-media --bma-${n.type}`:""} rel flex cols ${i==true?"--b-arrow":""} ${c}`.trim(),style:{...l},...d,children:[t&&jsx(Z,{className:"--bubble-text",children:t}),n?n.type=="audio"?jsxs(u,{as:"flex aic --bubble-audio",children:[jsx(ie,{className:"--bm-action",children:V.play}),jsx(qe,{progress:.7}),jsx(Z,{className:"--bm-dur",children:n.duration??"00:13"})]}):n.type=="img"?jsx(u,{as:"--bubble-image",children:jsx(je,{src:n.source})}):null:null,jsxs(u,{as:"flex aie jce --bubble-stats",children:[jsx(Z,{className:"--bubble-stamp tar",children:timeSince(a)}),o=="me"&&jsx(ie,{className:`--bubble-status --bs-${s}`,children:s==0?V.pending:s==1?V.done:s==2?V.doneAll:V.doneAll})]})]})})});jn.displayName="Zuz.Bubble";var Kc=jn;var Qn=forwardRef((e,r)=>{let{style:t,className:n,rest:o}=B(e);return jsx("label",{ref:r,style:t,className:n,...o})});Qn.displayName="Zuz.Label";var Ct=Qn;var es=({ref:e,...r})=>{let {name:t,required:n,type:o,value:s,size:a,variant:i,checked:f,disabled:c,onSwitch:l,...d}=r,m=He(),p=!!(t&&m.values);p?m.errors?.[t]:null;let C=p?m.values?.[t]:void 0,[x,R]=useState(f||false),T=useRef(null),{variant:P}=oe(true),g=useMemo(()=>p&&C!=null?typeof C=="string"?C.toLowerCase()!=="false"&&C!=="":!!C:x,[C,x,p]);useEffect(()=>{T.current&&T.current.checked!==g&&(T.current.checked=g);},[g]),useEffect(()=>{f!==void 0&&R(f);},[f]);let v=h=>{let b=!!h;p&&m.setFieldValue?.(t,b),R(b),l?.(b,s||"cb");};return useImperativeHandle(e,()=>({setChecked(h,b=true){v(h);},toggle(h=true){v(!g);}})),jsxs(Ct,{"aria-hidden":c,className:[`--${(o||Ve.Default).toLowerCase()}`,`${!o||o===Ve.Default?"--checkbox":"--switch"}`,`--${i||P||U.Small}`,`flex aic jcc ${g?"is-checked":""} rel`,`${c?"--disabled":""}`].join(" ").trim(),...d,children:[(!o||o==Ve.Default)&&V.check,jsx(ue,{ref:h=>{T.current=h,e&&(e.current=h);},defaultChecked:g,type:"checkbox",className:"abs",name:t,required:n||false,onChange:h=>{h.stopPropagation(),v(h.target.checked);},disabled:c})]})};es.displayName="Zuz.CheckBox";var Tt=es;var tm=({ref:e,...r})=>{let{code:t,copy:n,lang:o="tsx",showLines:s=false,highlight:a="",as:i,fx:f,...c}=r,l=useRef(null),{className:d,style:m,rest:p}=B({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${i}`,fx:f},l),y=useMemo(()=>{let x=new Set;return a.split(",").forEach(R=>{if(R.includes("-")){let[T,P]=R.split("-").map(Number);for(let g=T;g<=P;g++)x.add(g);}else R&&x.add(Number(R));}),x},[a]),C=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 R=x[0]?.match(/^\s*/)?.[0].length||0,T=x.map(g=>{let v=g.match(/^\s*/)?.[0].length||0,h=Math.min(v,R);return g.slice(h)}),P=[{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 T.map((g,v)=>{let h=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),b=y.has(v+1);if(o!="plain"){let N=[];P.forEach(F=>{h=h.replace(F.re,k=>{let A=`ZUZ_ID_${N.length}_ZUZ`;return N.push(`<span class="--token-${F.name}">${k}</span>`),A});});for(let F=N.length-1;F>=0;F--)h=h.replace(`ZUZ_ID_${F}_ZUZ`,N[F]);}return `<div class="--code-line ${s==true?"--with-ln":""} ${b?"--is-highlighted":""}">
10
+ ${s==true?`<span class="--line-number">${v+1}</span>`:""}
11
11
  <span class="--line-content">${h||" "}</span>
12
- </div>`}).join("")},[t,P]);return jsxs(u,{as:`--code-block rel ${c}`,style:i,...l,children:[jsx("pre",{ref:e,children:jsx("code",{className:`--code --lang-${o}`,dangerouslySetInnerHTML:{__html:S}})}),n&&jsx(F,{as:"--copy-code abs",onClick:()=>{copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},em=Jc;var es=({onSelect:e,meta:r,selected:t,disabled:n=false})=>{let o=useRef(null),{index:s,icon:a,label:p}=r,[f,l]=useState({x:0,width:0}),m=useDelayed();return useLayoutEffect(()=>{if(m&&o.current){let{width:c,x:i}=o.current.getBoundingClientRect();l({x:i,width:c}),t&&e(s,c,i,r,true);}},[m,o.current]),useEffect(()=>{t&&e(s,f.width,f.x,r,false);},[t]),jsxs(F,{disabled:n,onClick:()=>e(s,f.width,f.x,r,false),ref:o,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsx(ee,{name:a,as:"--segment-icon"}):jsx(u,{as:"--segment-icon flex aic jcc",children:a}):null,p&&String(p).trim()!=""&&jsx(u,{className:"--segment-label",children:p||`Item ${s}`})]})};es.displayName="SelectTabItem";var ts=es;var rs=forwardRef((e,r)=>{let{fx:t,items:n,selected:o,variant:s,disabled:a=false,onSwitch:p,...f}=e,[l,m]=useState(o||0),c=useDelayed(50),i=useRef(l),{className:d,style:P,rest:S}=B(f),x=useRef(null),R=useRef(null),{variant:C}=J(true),T=(g,b,h,y,I)=>{if((I||l!=g&&l!=-2)&&(m(g),i.current=l,queueMicrotask(()=>{c&&p?.(y);})),x.current){let H=R.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${b}px`),x.current.style.setProperty("--x",`${H?h-H.left:h}px`);}};return useImperativeHandle(r,()=>({setSelected:g=>{typeof g=="number"&&g!=l&&m(g);}}),[l]),jsxs(u,{ref:R,"data-selected":l,className:`${d} --segmented --${s||C||U.Medium} flex aic rel`,style:P,...S,children:[jsx(u,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((g,b)=>jsx(ts,{disabled:a,onSelect:T,selected:l==b,meta:{...g,index:b}},`segment-${g.label}-${b}`))]})});rs.displayName="Zuz.SelectTabs";var Tt=rs;var as=forwardRef((e,r)=>{let{type:t,...n}=e,o=useDelayed(),{colorScheme:s,setColorScheme:a}=yo(),p=useCallback(()=>{a(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:f,style:l}=B(n),m=useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"system",index:1,label:"",icon:V.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}],[]),c=useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !o||c==-1?null:t=="system"||t=="switch"?jsx(Tt,{className:`--color-scheme --${t}`,onSwitch:({tag:i})=>{a(i);},selected:c,items:m,...n}):jsx(F,{onClick:p,style:l,as:`--color-scheme-switch --${n.variant||U.Small} ${f}`.trim(),children:s=="system"?V.colorSchemeSystem:s=="light"?V.colorSchemeLight:V.colorSchemeDark})});as.displayName="Zuz.ColorScheme";var hm=as;var ls=forwardRef((e,r)=>{let[t,n]=useState("wait"),{title:o,message:s,acceptLabel:a,rejectLabel:p,position:f}=e,l=async m=>{n(m==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(m));};return useEffect(()=>{let m=localStorage.getItem("--ccnt");n(m?m=="1"?"accepted":"rejected":"pending");},[]),jsxs(u,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:Q.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${f||ge.Left} flex cols`,children:[jsx(z,{as:"--title",children:o||"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(u,{as:"--footer flex aic",children:[jsx(F,{onClick:m=>l(1),as:"--accept",children:a||"Accept All"}),jsx(F,{onClick:m=>l(0),as:"--reject",children:p||"Cancel"})]})]})});ls.displayName="Zuz.CookiesConsent";var vm=ls;var ps=({ref:e,...r})=>{let {title:t,position:n,margin:o=4,anchorName:s="--tooltip-anchor",children:a,show:p,variant:f,...l}=r,{style:m,className:c,rest:i}=B(l),d=n||ge.Top;useRef(null);let [S,x]=useState(false);useRef(6);let C=p===true||S,g=`--anchor-${useId().replace(/:/g,"")}`,{tooltip:b}=J(true),h=useMemo(()=>{let I=false;return addPropsToChildren(a,H=>{let O=H.props.className?.includes(s);return O&&(I=true),O||!I},(H,O)=>{let _=O.props.className?.includes(s),k=H===0,A={};return (_||k)&&(A.style={...O.props.style,anchorName:g}),k&&(A.onMouseEnter=L=>{x(true),O.props.onMouseEnter?.(L);},A.onMouseLeave=L=>{x(false),O.props.onMouseLeave?.(L);}),A})},[a,s,g]),y=he({transition:d==ge.Top?Y.SlideInTop:d==ge.Bottom?Y.SlideInBottom:d==ge.Left?Y.SlideInLeft:Y.SlideInRight,when:C,duration:.2,offset:o+6,margin:d==ge.Top||d==ge.Left?-o:o,curve:b?.curve||Q.EaseInOut});return useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxs(Fragment$1,{children:[h,jsx(u,{style:{positionAnchor:g,...y.style,...d===ge.Top||d===ge.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${C} --${f||b?.variant||U.Small} --${d} abs ${c}`.trim(),children:typeof t=="string"?jsx(z,{as:"--text rel",children:t}):t})]})};ps.displayName="Zuz.ToolTip";var jo=ps;var us=({ref:e,...r})=>{let {type:t,value:n=0,min:o=0,max:s=1,step:a=.01,onChange:p,showGhostBar:f,showKnobOnHover:l,showToolTip:m,roundValue:c,formatValue:i,...d}=r,{className:P,style:S,rest:x}=B(d),R=useRef(a||.01).current,C=useRef(o||0).current,T=useRef(s||1).current,g=useRef(n||0).current,b=useRef(null),h=useRef(null),y=useRef(null),I=useRef(null);useRef(null);let O=useRef(null),_=useRef(null),k=useRef(null),A=useRef(null),L=(ne,ie,xe)=>(ne-ie)/(xe-ie)*100,Z=ne=>{if(h.current){let ie=parseFloat(ne.currentTarget.value);q(ie);let xe=L(ie,parseFloat(ne.currentTarget.min),parseFloat(ne.currentTarget.max));h.current.style.setProperty("--value",`${xe}`),h.current.setAttribute("data-value",`${ie}`),p&&p(c?+ie.toFixed(2):ie);}},[N,E]=useState(false),[G,M]=useState(0),[te,K]=useState(0),[j,W]=useState(false),q=async ne=>{let ie=i?i(+ne):c?(+ne).toFixed(2):Math.round(+ne);k.current&&(k.current.textContent=String(ie));},oe=ne=>{if(N){let ie=ne.clientX-G,xe=T-C,$=ie/200*xe,X=Math.max(C,Math.min(te+$,T));if(X=Math.round(X/R)*R,q(X),h.current){let me=L(X,C,T);h.current.style.setProperty("--value",`${me}`),h.current.setAttribute("data-value",`${X}`),_.current&&(_.current.textContent=c?X.toFixed(2):X.toString()),p&&p(X);}}},pe=()=>{E(false),document.body.style.cursor="auto";},ae=ne=>(ne-C)/(T-C)*100,de=ne=>{if(!h.current)return;let ie=h.current.getBoundingClientRect(),xe=ne.clientX-ie.left,Ee=Math.max(0,Math.min(100,xe/ie.width*100));if(m&&k.current){let $=b.current?+b.current.value:n;q($*100);}if(f){let $=ae(b.current?+b.current.value:n),X=Math.min($,Ee),me=Math.abs(Ee-$);h.current.style.setProperty("--ghost-start",`${X}`),h.current.style.setProperty("--ghost-width",`${me}`);}};useEffect(()=>{h.current&&h.current.style.setProperty("--value",b.current?`${L(parseFloat(b.current.value),parseFloat(b.current.min),parseFloat(b.current.max))}`:g.toString());},[]),useEffect(()=>(N?(document.addEventListener("mousemove",oe),document.addEventListener("mouseup",pe)):(document.removeEventListener("mousemove",oe),document.removeEventListener("mouseup",pe)),()=>{document.removeEventListener("mousemove",oe),document.removeEventListener("mouseup",pe);}),[N]),useEffect(()=>{let ne=L(n,C,T);h.current?.style.setProperty("--value",`${ne}`),q(n);},[n,C,T,k.current]);let re=()=>jsxs(u,{ref:h,onMouseEnter:()=>W(true),onMouseLeave:()=>W(false),onMouseMove:de,className:`--slider --${t||co.Default} ${l?"--knob-hover":""} flex rel ${P}`.trim(),style:{...S},children:[jsx(u,{ref:O,className:"--slider-track abs fill"}),f&&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:y,className:"--slider-knob --tooltip-knob abs"}),jsx(ue,{ref:b,onInput:Z,className:"abs fill",tabIndex:0,type:t||co.Default,defaultValue:g||0,step:R,max:T,min:C})]});if(m===true){let ne=i?i(n):c?n.toFixed(2):n;return jsx(jo,{ref:A,show:N,position:ut.Top,margin:15,anchorName:"--tooltip-knob",title:jsx(se,{ref:k,children:ne}),children:re()})}return re()};us.displayName="Zuz.Slider";var rt=us;var ds=forwardRef((e,r)=>{let{src:t,shape:n,size:o,...s}=e,{style:a,className:p,rest:f}=B(s),{canvasRef:l,crop:m,setScale:c,handleMouseDown:i,handleMouseUp:d,handleMouseMove:P}=useImageCropper(t,o||200,n||CropShape.Circle);return useImperativeHandle(r,()=>({getCropped(){return m()},setScale(S){c(S);}})),jsxs(u,{as:`--cropper --${n||CropShape.Circle} ${p}`,style:a,...f,children:[jsx("canvas",{ref:l,width:o||200,height:o||200,onMouseDown:i,onMouseUp:d,onMouseLeave:d,onMouseMove:P}),jsx(u,{as:"--cropper-slider",children:jsx(rt,{onChange:S=>c(S),min:0,max:1,step:.01,value:1})})]})});ds.displayName="Zuz.Cropper";var Mm=ds;var Om=(t=>(t.Circle="circle",t.Square="square",t))(Om||{});var hs=forwardRef((e,r)=>{let{items:t,maxItems:n}=e,o=useMemo(()=>{let p=typeof t=="string",f=p?[]:t;return p&&t.split(",").forEach(l=>{f.push({label:l});}),f},[t]),a=useMemo(()=>n&&n>0&&o.length>n-1,[o,n])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-n)]:o;return jsx(Ye,{ref:r,className:"--crumb flex aic",direction:"rows",seperator:jsx(u,{as:"--crumb-chevron",children:V.chevronRightOutline}),items:a.map((p,f,l)=>p.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-${f}`))}):jsxs(F,{onClick:()=>p.action?.(),className:"--crumb-item",disabled:!l[f+1],children:[p.icon&&jsx(ee,{as:"--crumb-icon",name:p.icon}),jsx(z,{as:"--crumb-label",children:p.label})]},`${p.label.replace(/\s+/g,"-").toLowerCase()}-${f}`))})});hs.displayName="Zuz.Crumb";var Dm=hs;var bs=forwardRef((e,r)=>{let{icon:t,defaultValue:n,value:o,size:s,variant:a,numeric:p,type:f,onConfirm:l,...m}=e,[c,i]=useState(false),[d,P]=useState(n||null),{style:S,className:x,rest:R}=B(m),C=useRef(null),T=useRef(null),{reposition:g}=xt(T,{direction:ge.Bottom,offset:2}),b=y=>{p&&(y.currentTarget.value=y.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};useEffect(()=>{let y=I=>{let H=I.target,O=C.current?.contains(H),_=T.current?.contains(H);!O&&!_&&i(false);};return c&&document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y);}},[c]),useEffect(()=>{let y=I=>{I.key==="Escape"&&c&&(i(false),C.current?.focus());};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[c]);let h=()=>{i(true);};return useEffect(()=>{c&&g();},[c,g]),jsx(Fragment$1,{children:jsxs(u,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${x}`,"data-value":d?d.toISOString():"",children:[t?typeof t=="string"?jsx(ee,{as:"mr:10 c:#666",name:t}):t:jsx(se,{as:"--date-picker-icon flex aic jcc",children:V.calendar}),jsx("input",{ref:C,value:d?format(d,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:S,onFocus:h,onInput:b,autoComplete:"new-password",onKeyDown:y=>{y.key=="Enter"&&l?.(y.currentTarget.value);},...R}),jsx(u,{"aria-hidden":!c,ref:T,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:c,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsx(Zo,{defaultValue:d,onChange:y=>{P(y),i(false);}})})]})})});bs.displayName="Zuz.DatePicker";var zm=bs;var vs=forwardRef((e,r)=>{let{icon:t,variant:n,position:o}=e;return jsx(F,{className:`--fab fixed --${n||U.Large} --${o||"bottomright"}`,children:t||V.plus})});vs.displayName="Zuz.Fab";var Km=vs;var ws=e=>{let{names:r,strength:t}=e,n={[kt.Gooey]:o=>jsxs("filter",{id:"gooey",children:[jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:o||10,result:"blur"}),jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${kt.Gooey}`)};return useEffect(()=>{},[r]),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsx("defs",{children:(r||[kt.Gooey]).map(o=>n[o](t))})})};ws.displayName="Zuz.Filters";var Um=ws;var Ss=({cols:e,gap:r,ais:t,aic:n,aie:o,jcs:s,jcc:a,jce:p,className:f="",style:l,...m})=>{let c=["--flex",e?"--cols":"",t?"--ais":"",n?"--aic":"",o?"--aie":"",s?"--jcs":"",a?"--jcc":"",p?"--jce":"",f].filter(Boolean).join(" "),i={...l,gap:typeof r=="number"?`${r}px`:r};return jsx(u,{...m,className:c,style:i})};Ss.displayName="Zuz.FlexBox";var Fe=Ss;var _e=null,Te=null,Ts=forwardRef((e,r)=>{let{title:t,message:n,transition:o,curve:s,speed:a,type:p,actionPosition:f,spinner:l,loadingMessage:m,onShow:c,onHide:i,...d}=e,{className:P,style:S,rest:x}=B(d),[R,C]=useState(t||""),[T,g]=useState(n||""),[b,h]=useState(null),[y,I]=useState(p||Re.Default),H=useMemo(()=>uuid(12),[]),[O,_]=useState(false),k=useRef(null),A=useRef(null),[L,Z]=useState(false),[N,E]=useState(true),G=useRef(null),M=T;useImperativeHandle(r,()=>({setLoading(K){Z(K);},showDialog(K,j,W,q){_e&&(clearTimeout(_e),Te&&clearTimeout(Te),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),Te=setTimeout(()=>{k.current.classList.remove("--wobble"),Te=null;},500)),I(Re.Dialog),j&&g(j),K&&C(K),W&&h(W.reduce((le,oe)=>(le.push({...oe,key:oe.key||uuid(12)}),le),[])),_(true),setTimeout(()=>q?q():()=>{},1e3);},dialog(K,j,W,q){_e&&(clearTimeout(_e),Te&&clearTimeout(Te),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),Te=setTimeout(()=>{k.current.classList.remove("--wobble"),Te=null;},500)),I(Re.Dialog),g(j),C(K),W&&h(W.reduce((le,oe)=>(le.push({...oe,key:oe.key||uuid(12)}),le),[])),_(true),setTimeout(()=>q?q():()=>{},1e3);},error(K,j){this.show(K,j,Re.Error);},warn(K,j){this.show(K,j,Re.Warn);},success(K,j){this.show(K,j,Re.Success);},show(K,j,W){_e&&(clearTimeout(_e),Te&&clearTimeout(Te),A.current=k.current.style.transform,k.current.style.transform="",k.current.classList.remove("--wobble"),setTimeout(()=>{k.current.classList.add("--wobble"),k.current.style.transform=`${A.current} scale(.9)`.trim();},50),Te=setTimeout(()=>{k.current.classList.remove("--wobble"),k.current.style.transform=A.current||"",Te=null;},500)),_e=setTimeout(()=>{_(false),_e=null,Te=null;},(j||4)*1e3),I(W||Re.Default),g(K),_(true),c?.();},hide(){_(false),i?.();}}));let te=useMemo(()=>{let K={when:O,duration:a||.3,delay:.1};if(y==Re.Dialog){if(o){let{from:j,to:W}=dt(o,20);return {from:j,to:W,curve:s||Q.EaseInOut,...K}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:Q.Spring,...K}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:Q.Spring,...K}},[O,y]);return useEffect(()=>{G.current&&clearTimeout(G.current),O?E(true):G.current=setTimeout(()=>E(false),1e3);},[O]),y==Re.Dialog?jsxs(Fragment$1,{children:[jsx(Ge,{when:O}),jsxs(u,{className:`--sheet --sheet-${y.toLowerCase()} ${O?"is-visible":""} ${P} fixed`.trim(),style:S,fx:te,...x,ref:k,children:[jsx(ke,{when:L,spinner:l,message:m}),jsxs(u,{className:"--head flex aic rel",children:[jsx(u,{className:`--${R?"title":"dot"} flex aic rel`,children:R||""}),jsx(F,{onClick:K=>_(false),className:"--closer abs",children:"\xD7"})]}),jsx(u,{className:`--body flex aic rel ${b?"":"--no-action"}`.trim(),children:N?M:null}),b&&jsx(u,{className:`--footer flex aic rel ${f?f==lo.Center?"jcc":"":"jce"}`.trim(),children:b.map((K,j)=>jsx(F,{onClick:W=>K.handler?K.handler():K.onClick?K.onClick():console.log("onClick Handler missing"),className:"--action",children:K.label},`sheet-${H}-action-${K.key}`))})]})]}):jsx(u,{className:`--sheet --sheet-${y.toLowerCase()} ${P} abs`.trim(),style:S,...x,fx:te,ref:k,children:O?T:null})}),Ps=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;Ts.displayName="Zuz.Sheet";var Jm=Ts;var lp=e=>{let r={};for(let t in e){let n=t.split(/[\[\]]+/).filter(Boolean);n.reduce((o,s,a)=>{if(a===n.length-1)o[s]=e[t];else {let p=!isNaN(Number(n[a+1]));o[s]=o[s]||(p?[]:{});}return o[s]},r);}return r},Is=({ref:e,...r})=>{let {schema:t,name:n,cover:o,spinner:s,errors:a,action:p,children:f,withData:l,beforeSubmit:m,onSubmit:c,onError:i,onSuccess:d,resetOnSuccess:P,...S}=r,{className:x,style:R,rest:C}=B(S),[T,g]=useState(false),b=useRef(null),h=Mo(),y=Ao();$o();let H=useRef(null),O=useCallback(M=>b.current?b.current.querySelectorAll(M):[],[b.current]),_$1=M=>({name:M.name||M.getAttribute("name")||M.getAttribute("data-name"),required:M.required?true:M.getAttribute("data-required")?M.getAttribute("data-required")=="true":false,with:M.with||M.getAttribute("with")}),k=M=>{let te=[];return M.querySelectorAll(".--input").forEach(K=>{te.push(K.value);}),te.join("")},A=M=>M.classList.contains("--otp")?k(M):M.classList.contains("--select")?M.querySelector("button.--selected")?.dataset.value:M.classList.contains("--checkbox")||M.getAttribute("type")==="checkbox"?M.checked:M.value,L=useCallback(M=>{let{name:te,required:K,with:j}=_$1(M),W=A(M);if(t&&t[te]&&y?.getSnapshot()){let q=t[te](W,y.getSnapshot().values);if(q===false||typeof q=="string")return typeof q=="string"&&y?.setFieldError(te,q),false}if(K&&(M.type==="checkbox"&&!M.checked||M.classList.contains("--select")&&(W==="-1"||!W)||!W||W===""))return false;if(j)switch((j.includes("@")?j.split("@")[0]=="match"?We.MatchField:j.split("@")[0]:j).toUpperCase()){case We.IPV4:return _(W).isIPv4();case We.IPV6:return _(W).isIPv6();case We.Email:return _(W).isEmail();case We.Uri:try{return new URL(W),!0}catch{return false}case We.MatchField:let[le,oe,pe]=j.split("@"),ae=document.querySelector(`[name=${oe.trim()}]`);if(!ae)return false;switch(pe||"direct-match"){case "if-not-empty":if(ae&&!_(ae.value).isEmpty()&&ae.value!=M.value)return false;break;case "direct-match":if(ae&&ae.classList.contains("--otp")&&M.classList.contains("--otp")&&k(ae)!=k(M))return false;if(ae&&ae.value!=M.value)return false;break}break}return true},[t,y]),Z=useCallback(()=>{let M={},te={...y?.getSnapshot().values||{}},K=null,j=null;if(O("[name]").forEach(q=>{let{name:le,required:oe,with:pe}=_$1(q),ae=oe||pe?L(q):true,de=A(q);M[le]={valid:ae,value:de},te[le]=de,y?.setFieldError(le,ae?null:a?.[le]||"Invalid"),ae?q.classList.remove("--with-error"):(q.classList.add("--with-error"),K||(K=q),j=a?.[le]);}),K){let q=K;if(q.classList.contains("--otp"))for(let le of Array.from(q.querySelectorAll(".--input"))){let oe=le;if(oe.value==""){oe.focus();break}}else q.focus();}let W=lp(te);return {error:K!=null,errorMsg:j||"Fix errors to continue...",data:M,payload:W}},[b.current,y]),N=useCallback(()=>{let{error:M,errorMsg:te,payload:K,data:j}=Z();if(M){h.error(te);return}p?startTransition(async()=>{g(true),withPost(p,{...l,...K}).then(W=>{g(false),P&&y?.reset(),d?.(W),d||h.success(W.message||"Redirecting...");}).catch(W=>{g(false),i?i(W):h.error(W.message);});}):c?.(K,j);},[p,y,a]),E=useCallback(()=>{let M=O("[type=submit]");!M||M.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):M.forEach(te=>{te.addEventListener("click",N);});},[b.current]),G=useMemo(()=>addPropsToChildren(f,M=>M.props.type=="submit",M=>({ref:H})),[f]);return useImperativeHandle(e,()=>({setLoading:M=>g(M),submit:()=>N(),init:E,hideError:()=>h.clearAll()})),useEffect(E,[]),jsxs(u,{ref:b,style:R,className:`--form flex rel ${x}`,children:[!Ps(o)&&jsx(ke,{when:T,spinner:s,...o}),G]})};Is.displayName="Zuz.FormInternal";var Ns=e=>jsx(Pn,{initialValues:e.withData,children:jsx(Is,{...e})});Ns.displayName="Zuz.Form";var cp=Ns;var Bs=e=>{let {ref:r,cols:t,rows:n,gap:o,gapX:s,gapY:a,align:p,justify:f,inline:l,flow:m,autoCols:c,autoRows:i,template:d,...P}=e;useRef(null);let {className:x,style:R,rest:C}=B(P),T=b=>typeof b=="number"?`repeat(${b}, 1fr)`:b,g={display:l?"inline-grid":"grid",gridTemplateColumns:T(t),gridTemplateRows:T(n),gap:o,columnGap:s,rowGap:a,alignItems:p,justifyContent:f==="between"?"space-between":f==="around"?"space-around":f,gridAutoFlow:m,gridAutoColumns:c,gridAutoRows:i,gridTemplateAreas:d,...R};return jsx(u,{ref:r,as:`--grid ${x}`.trim(),style:g,...C})};Bs.displayName="Zuz.Grid";var up=Bs;var Es=e=>typeof e=="string"&&e.includes("+"),ks={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"},Ms={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 Os=forwardRef(({children:e,keys:r,as:t,className:n,variant:o},s)=>{let{variant:a}=J(true),p=useMemo(()=>{if(Es(r)){let f=null;return {keys:String(r).split("+").reduce((m,c,i,d)=>(d[i+1]?m.push(c):f=c.toUpperCase(),m),[]),children:f}}return {keys:r,children:String(e).toUpperCase()}},[r]);return jsxs(u,{as:`--keyboard-keys --${o||a||U.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(p.keys)?p.keys:[p.keys]).map(f=>jsx("abbr",{title:Ms[f],children:ks[f]},f)),jsx(se,{children:p?.children??e})]})});Os.displayName="Zuz.KeyboardKeys";var sr=Os;var Hs=createContext(null),at=()=>{let e=useContext(Hs);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},vp=({ref:e,icons:r,children:t,...n})=>{let{playlist:o=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:p="No Track",defaultCover:f,onTrackChange:l,...m}=n,{className:c,style:i,rest:d}=B(m),P=useMediaPlayer(o,o[0]??void 0),S=useMemo(()=>({play:V.play,pause:V.pause,prev:V.prev,next:V.next,volumeHigh:V.volumeHigh,volumeMute:V.volumeMute,...r}),[r]),x=useMemo(()=>({...P,mode:s,icons:S}),[P,S]);return jsx(Hs.Provider,{value:x,children:jsx(u,{className:`--zuz-media-player ${c}`,style:i,children:t})})},$s=vp;var As=e=>{if(!e||isNaN(e))return "0:00";let r=Math.floor(e/60),t=Math.floor(e%60);return `${r}:${t.toString().padStart(2,"0")}`},Qt=e=>typeof e=="string"?jsx(ee,{name:e}):e,zs=()=>{let{mediaRef:e,state:r,controls:t,mode:n}=at();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}),r.isLoading&&jsx(u,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsx(Ie,{})})]})},Fs=()=>{let{state:e,defaultArtist:r,defaultTitle:t,defaultCover:n}=at();return jsxs(u,{as:"--track-info flex aic",children:[jsx(je,{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||r||"..."})]})]})},_s=()=>{let{state:e,controls:r,icons:t}=at();return jsxs(u,{as:"--mediaplayer-controls flex aic",children:[jsx(F,{onClick:r.prev,as:"--prev",children:Qt(t?.prev??V.prev)}),jsx(F,{onClick:r.togglePlay,as:"--play-pause",children:Qt(e.isPlaying?t?.pause??V.pause:t?.play??V.play)}),jsx(F,{onClick:r.next,as:"--next",children:Qt(t?.next??V.next)})]})},Zs=()=>{let{state:e,controls:r,mediaRef:t}=at(),n=e.progress*(e.duration||0);return jsxs(u,{as:"--track-progress flex aic",children:[jsx(u,{as:"--track-current-duration",children:As(n)}),jsx(rt,{value:e.progress,onClick:o=>{let s=o.currentTarget.getBoundingClientRect(),a=(o.clientX-s.left)/s.width;r.seek(a);}}),jsx(u,{as:"--track-total-duration",children:As(e.duration)})]})},Ks=()=>{let{state:e,controls:r,icons:t}=at();return jsxs(u,{as:"--volume-control flex aic gap:8 w:120",children:[jsx(F,{onClick:()=>r.setIsMuted(),children:Qt(e.isMuted?t?.volumeMute??V.volumeMute:t?.volumeHigh??V.volumeHigh)}),jsx(rt,{value:e.volume,className:"h:3 flex:1",onClick:n=>{let o=n.currentTarget.getBoundingClientRect();r.setVolume((n.clientX-o.left)/o.width);}})]})};var wp=({ref:e,...r})=>jsx($s,{...r,ref:e}),Sp=Object.assign(wp,{Stage:zs,TrackInfo:Fs,Controls:_s,Progress:Zs,Volume:Ks}),Cp=Sp;var Gs=forwardRef((e,r)=>{let t=useNetworkStatus(),{onlineMessage:n,offlineMessage:o,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:Q.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||U.Small} fixed flex`,children:[jsx(u,{className:"--ico",children:t?V[Pe.Success]:V[Pe.Error]}),jsx(z,{as:"--message",children:t?n||"internet connection restored :)":o||"no internet connection"})]})});Gs.displayName="Zuz.NetWorkManager";var Ip=Gs;var qs=forwardRef((e,r)=>{let{strenthMeter:t,onChange:n,...o}=e;"type"in o&&delete o.type;let{style:s,className:a,rest:p}=B(o),[f,l]=useState(false),[m,c]=useState(""),i=useMemo(()=>checkPasswordStrength(m),[m]),d=useDebounce(P=>{t&&c(P.target.value),n&&n(P);},100);return useEffect(()=>{},[]),jsxs(u,{as:"w:100% flex cols",children:[jsxs(u,{style:s,className:"--password flex aic rel",children:[jsx(ue,{ref:r,type:f?"text":"password",className:a,onChange:d,...p}),jsx(F,{tabIndex:-1,onClick:()=>l(P=>!P),className:"--toggle flex aic jcc abs",children:f?V.eye:V.eyeSlash})]}),t&&jsxs(u,{as:`flex aic --password-meter --pb-score-${i.score}`,style:s,children:[jsxs(u,{as:"--password-bars flex aic",children:[jsx(u,{as:`--pbar ${i.score>=1?"--pb-on":""}`.trim()}),jsx(u,{as:`--pbar ${i.score>=2?"--pb-on":""}`.trim()}),jsx(u,{as:`--pbar ${i.score>=3?"--pb-on":""}`.trim()}),jsx(u,{as:`--pbar ${i.score>=4?"--pb-on":""}`.trim()}),jsx(u,{as:`--pbar ${i.score>=5?"--pb-on":""}`.trim()})]}),jsx(z,{as:"--password-meter-label","aria-hidden":true,children:i.result})]})]})});qs.displayName="Zuz.Password";var Op=qs;var Ys=forwardRef((e,r)=>{let{size:t,length:n,mask:o,...s}=e,a=useRef([]),p="pinput",f=false,l={};"with"in s&&(l={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(p=s.name,delete s.name),"required"in s&&(f=true,delete s.required);let{style:m}=B(s),c=i=>{let d=i.currentTarget,P=a.current[parseInt(d.dataset.index)+1],S=a.current[parseInt(d.dataset.index)-1];d.value.length===1&&P?P.focus():d.value.length===0&&S&&S.focus();};return useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsx(u,{name:p,style:m,className:"--otp flex aic rel","data-required":f,"data-size":t||n||4,...l,children:Array(t||n||4).fill(1).map((i,d)=>jsx(ue,{autoComplete:"new-password","data-index":d,ref:P=>{a.current[d]=P;},numeric:true,onChange:c,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${d}`))})});Ys.displayName="Zuz.PinInput";var $p=Ys;var js=forwardRef((e,r)=>{let{children:t,className:n,name:o,required:s,type:a,value:p,variant:f,checked:l,onSwitch:m,...c}=e,[i,d]=useState(l||false),{variant:P}=J(true),S=useRef(null);return jsxs(St,{className:`${n} --${(a||mo.Default).toLowerCase()} --radio${!a||a==mo.Default?"":"card"} --${f||P||U.Small} flex aic rel`.trim(),...c,children:[jsx(ue,{ref:S,defaultChecked:i,value:p||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:x=>{m&&m(x.target.checked,p||"cb"),d(x.target.checked);}}),jsx(u,{className:"--dot rel",children:jsx(u,{className:"--rod abs abc"})}),jsx(u,{className:"--value",children:t})]})});js.displayName="Zuz.Radio";var _p=js;var Qs=forwardRef((e,r)=>{let{fx:t,withStyle:n,as:o,reverse:s=false,searchIcon:a=V.search,hideSearchIcon:p=false,clearIcon:f=V.close,hideClearIcon:l=false,onChange:m,onClear:c,...i}=e,{style:d,className:P}=B({as:e.as}),[S,x]=useState(""),{variant:R}=J(true),C=useRef(null);"type"in e&&delete e.type;let T=b=>{x(b.target.value),m?.(b.target.value);},g=b=>{S.trim()!==""&&(x(""),m?.(""),C.current&&(C.current.value="",e.onConfirm?.("")));};return useImperativeHandle(r,()=>({focus:()=>C.current?.focus(),value:()=>C.current?.value})),useEffect(()=>{},[]),jsxs(u,{style:d,className:`--search --no-shrink ${s?"--search-rev":""} --${e.variant||R||U.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${P}`.trim(),children:[jsx(ue,{ref:C,onChange:T,...i}),e.shortcut&&jsx(sr,{keys:e.shortcut,as:"abs"}),jsx(F,{tabIndex:-1,onClick:b=>g(),className:"--send flex aic jcc",variant:e.variant||U.Medium,children:S!==""?!l&&(typeof f=="string"?jsx(ee,{name:f,as:"--search-action"}):f):!p&&(typeof a=="string"?jsx(ee,{name:a,as:"--search-action"}):a)})]})});Qs.displayName="Zuz.Search";var ar=Qs;var Yp=({label:e,icon:r})=>jsxs(u,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[r&&jsx(ee,{name:r}),jsx(z,{as:"--select-group-label",children:e})]}),ea=Yp;var oa=({checkIcon:e,selected:r,updateValue:t,o:n})=>{let o=e?typeof e=="string"?jsx(ee,{name:"checkIcon"}):e:V.check,s=n.disabled===true;return jsxs(F,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${r?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxs(Fe,{as:"--option-item-meta --aic",children:[n.icon&&jsx(ee,{name:n.icon,as:`--select-option-icon --icon-${n.value}`,color:n.iconColor}),jsx(z,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),r&&jsx(Fe,{aic:true,jcc:true,as:"--select-option-check --abs",children:o})]})};oa.displayName="Option";var ra=oa;var na=({ref:e,...r})=>{let{selected:t,options:n,label:o,name:s,variant:a,search:p,searchPlaceholder:f,maxHeight:l,arrowDownIcon:m=V.arrowDown,arrowUpIcon:c=V.arrowUp,expanded:i,multiple:d,tokenizer:P,wrapTokens:S,disabled:x,checkIcon:R,closeIcon:C,onChange:T,required:g,with:b,...h}=r,y=He(),I=s&&y.values&&y.setFieldValue,H=I?y.errors?.[s]:null,O=I?y.values?.[s]:void 0,_$1=$=>!$&&$!==0?null:d||P?(Array.isArray($)?$:[$]).map(me=>typeof me=="string"||typeof me=="number"?n.find(be=>String(be.value)===String(me)):me).filter(Boolean):typeof $=="string"||typeof $=="number"?n.find(X=>String(X.value)===String($)):$,[k,A]=useState(()=>t?_$1(t):n.find(X=>String(X.value)==="-1")||null),L=useMemo(()=>O?_$1(O):k,[O,k]),[Z,N]=useState(false),[E,G]=useState(null),M=useRef(null),te=useRef(null),K=useRef(null),j=useId(),W=useMemo(()=>s||j,[]),{reposition:q}=xt(K,{direction:ut.Bottom,offset:2}),{variant:le}=J(true),oe=C?typeof C=="string"?jsx(ee,{name:C}):C:V.close,{className:pe,style:ae,rest:de}=B(h,void 0),ce=$=>Array.isArray(L)?L.some(X=>X.value===$.value):L?.value===$.value,re=$=>{if(!(x||$.disabled))if(d||P){let X=Array.isArray(L)?L:[],be=X.find(ao=>ao.value===$.value)?X.filter(ao=>ao.value!==$.value):[...X,$];A(be),T?.(be);}else A($),N(false),T?.($);},ne=($,X)=>{if($.stopPropagation(),x)return;let me=L.filter(be=>be.value!==X.value);I?y.setFieldValue?.(s,me.map(be=>be.value)):A(me),N(false),T?.(me);},ie=$=>{let X=$.currentTarget,me=X.scrollTop===0&&$.deltaY<0,be=X.scrollHeight-X.scrollTop===X.clientHeight&&$.deltaY>0;!me&&!be||$.preventDefault(),$.stopPropagation();};useImperativeHandle(e,()=>({setSelected:$=>{let X=_$1($);if(I){let me=Array.isArray(X)?X.map(be=>be.value):X?.value;y.setFieldValue?.(s,me);}else A(X);},getValue:()=>L||null}),[L,n]),useEffect(()=>{if(!Z)return;let $=()=>{q();};return window.addEventListener("scroll",$,true),window.addEventListener("resize",q),()=>{window.removeEventListener("scroll",q,true),window.removeEventListener("resize",q);}},[Z,q]),useEffect(()=>{if(!Z){te.current&&(te.current.value=""),G(null);return}te.current?.focus(),q();let $=me=>{K.current&&!K.current.contains(me.target)&&N(false);},X=setTimeout(()=>{document.addEventListener("click",$);},0);return ()=>{clearTimeout(X),document.removeEventListener("click",$);}},[Z,q]),useEffect(()=>()=>{I&&y.deleteFieldValue?.(s);},[]);let xe=useDebounce($=>G($==""?null:$),300),Ee=useMemo(()=>{if(L)return _(L).isArray()?L.length>0?L[0]:void 0:L},[L]);return console.log(H),jsxs(u,{"data-required":g?"true":void 0,with:b,className:[`--select ${i==true?"--expanded":""}`,`--${a||le}`,`${s?`--${s}`:""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:W,children:[jsxs(F,{ref:M,disabled:x,"data-value":Ee?.value??"-1",className:`--select-display --selected flex aic rel ${pe}`.trim(),withLabel:false,style:ae,onClick:$=>{$.stopPropagation(),x||N(X=>!X);},...de,children:[Ee?.icon&&jsx(ee,{as:"--selected-icon",name:Ee.icon}),jsx(Fe,{aic:true,as:"--label-wrapper",children:P&&Array.isArray(L)&&L.length>0?jsxs(Fe,{as:`--tokens-wrap${S===true?" --wrap":""}`,children:[L?.map($=>jsxs(Fe,{aic:true,as:"--token",children:[jsx(z,{as:"--token-label",children:$.label}),jsx(u,{as:"--token-remove",onClick:X=>ne(X,$),children:oe})]},$.value)),L.length<n.length&&jsx(z,{as:"--label",children:o||"Choose"})]}):jsx(z,{as:"--label",children:Array.isArray(L)?L.length>0?`${L.length} selected`:o||"Choose":L?.label||o||"Choose"})}),jsx(u,{className:"--svg-arrow rel flex aic jcc",children:Z?typeof c=="string"?jsx(ee,{name:c,as:"--search-action"}):c:typeof m=="string"?jsx(ee,{name:m,as:"--search-action"}):m})]}),jsxs(u,{id:W,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!Z,onWheel:ie,style:{maxHeight:l||"auto"},ref:K,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:Z,duration:.05},children:[p&&jsx(u,{as:"--select-search --no-shrink flex --sticky",children:jsx(ar,{ref:te,variant:U.Small,placeholder:f||"Search...",onChange:xe})}),o&&jsx(ea,{label:o}),n?.filter($=>!E||$.label.toLowerCase().includes(E.toLowerCase()))?.map($=>jsx(ra,{updateValue:re,checkIcon:R,selected:ce($),o:$},`option-${(typeof $=="string"?$:$.label).replace(/\s+/g,"-")}-${typeof $=="string"?$:$.value}`))]})]})};na.displayName="Zuz.Select";var ou=na;var sa=({ref:e,...r})=>jsx(Ct,{type:Ve.Switch,...r,ref:e});sa.displayName="Zuz.Switch";var ru=sa;var ia=e=>{let{idx:r,id:t,as:n,weight:o,style:s,value:a,render:p,resize:f,sortBy:l,sortable:m,onSort:c}=e,[i,d]=useState(0),P=()=>{m&&(c?.(String(t),i==1?-1:1),d(S=>S==1?-1:1));};return jsxs(u,{style:{flex:o||1,...s},as:`--col flex aic ${n||""} ${m?"--sortable":""}`,onClick:P,children:[jsx(u,{as:"--colv",children:a}),r==-1&&m&&l==t&&jsx(u,{as:"--arrow flex aib",children:i==1?V.arrowUp:V.arrowDown})]})};ia.displayName="Zuz.Column";var oo=ia;var ca=e=>{let{index:r,pubsub:t,schema:n,data:o,ids:s,styles:a,animate:p,sortBy:f,selectable:l,tableRef:m,loading:c,rowClassName:i,onSort:d,onRowClick:P,onSelect:S,onContextMenu:x}=e,R=useDelayed(),C=useMemo(()=>({transition:Y.SlideInBottom,curve:Q.EaseInOut,delay:.02*(r+1)}),[]),T=useRef(null),g=(h,y)=>{r==-1?t.emit(`ALL_ROWS_${h?"CHECKED":"UNCHECKED"}`,h):(S&&S(o,h),t.emit(`ROW_${h?"CHECKED":"UNCHECKED"}`,h,y));},b=(h,y,I)=>jsx(oo,{idx:h,id:y,as:"--selector",pubsub:t,value:jsx(Ct,{value:I,ref:T,onSwitch:g,type:Ve.Default})});return useEffect(()=>{let h=(O,_)=>{T.current?.setChecked(O,false);},y=(O,_)=>{let k=false;m?.current&&m.current.querySelectorAll(".--row").forEach(A=>{let L=A;if(!L.classList.contains("--row-head")){let Z=L.querySelector(".--selector input[type=checkbox]");Z&&Z.checked&&!k&&(k=Z.checked);}}),T.current.setChecked(k,false);},I=O=>{T.current?.setChecked(O,false),S&&S(o,O);},H=O=>{T.current?.setChecked(O,false),S&&S(o,O);};return r==-1?(t.on("ROW_CHECKED",h),t.on("ROW_UNCHECKED",y),()=>{t.off("ROW_CHECKED",h),t.off("ROW_UNCHECKED",y);}):(t.on("ALL_ROWS_CHECKED",I),t.on("ALL_ROWS_UNCHECKED",H),()=>{t.off("ALL_ROWS_CHECKED",I),t.off("ALL_ROWS_UNCHECKED",H);})},[]),jsxs(u,{onContextMenu:h=>x?x(h,o):null,onClick:h=>P?P(h,e.data):()=>{},...p?{fx:{...C,when:R}}:{},as:`--row flex aic ${P?"--row-clickable":""} ${r==-1?"--row-head":""} ${i||""}`,children:[r==-1&&n.map((h,y)=>{let{renderWhenHeader:I,render:H,value:O,..._}=h;return jsxs(Fragment,{children:[l&&y==0&&b(-1,`--selector-${h.id}`,"all"),jsx(oo,{idx:-1,onSort:d,sortBy:f,value:O,..._,pubsub:t,style:a[h.id]})]},`--col-${h.id}`)}),c&&r>-1&&jsx(u,{as:"--col",children:jsx(z,{as:"opacity:0",children:"..."})}),!c&&r>-1&&s&&o&&n.map((h,y)=>jsxs(Fragment,{children:[l&&y==0&&b(y,`--selector-${h.id}`,h.id.toString()),s.includes(String(h.id))?jsx(oo,{pubsub:t,idx:y,id:String(h.id),style:a[String(h.id)],value:h.render?h.render(o,r):o[String(h.id).includes(".")?String(h.id).split(".").reverse()[0]:h.id]}):null]},`--${String(h.id)}-val-${y}`))]})};ca.displayName="Zuz.Row";var ro=ca;var fa=(e,r)=>{let{schema:t,rows:n,rowCount:o,rowsPerPage:s,currentPage:a,pagination:p,paginationHash:f,showPaginationOnZeroPageCount:l,animateRows:m,header:c,rowClassName:i,selectableRows:d,hoverable:P,sortBy:S,loading:x,loadingRowCount:R,loadingMessage:C,spinner:T,emptyMessage:g,onSort:b,onRowClick:h,onRowSelectToggle:y,onPageChange:I,onRowContextMenu:H,...O}=e,_=useRef(null),k=useMemo(()=>t.reduce((ce,re)=>(ce[re.id]={flex:re.weight||1,...re.w&&{width:re.w},...re.maxW&&{maxWidth:re.maxW},...re.minW&&{minWidth:re.minW},...re.h&&{height:re.h},...re.maxH&&{maxHeight:re.maxH},...re.minH&&{minHeight:re.minH}},ce),{}),[t]),A=useMemo(()=>Object.keys(k),[t]),L=useMemo(()=>c??true,[c]),{style:Z,className:N,rest:E}=B(O),G=useRef(null),M=useMemo(()=>new PubSub,[]),te=useRef(n.map(()=>uuid(8))),[K,j]=useState(S||null),[W,q]=useState(C||"loading"),le=useMemo(()=>!x&&n&&n.length==0,[x,n]),oe=useCallback(()=>g?typeof g=="function"?jsx(g,{}):g:jsx(z,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);useEffect(()=>{n.length&&!te.current&&(te.current=n.map(()=>uuid(8)));},[n]);let pe=(ce,re)=>{j(ce),b?.(ce,re);},ae=(o||(n?n.length:0))/(s||10),de=useMemo(()=>l||ae>1?jsx(wt,{hash:f,ref:_,renderOnZeroPageCount:l,onPageChange:I,paginationStyle:"table",startPage:a,itemCount:o||(n?n.length:0),itemsPerPage:s||10}):null,[a,o]);return useImperativeHandle(r,()=>({setLoading(ce){}})),jsxs(u,{as:`--table ${P??true?"--hoverable":""} flex cols rel ${N}`,ref:G,children:[L==true&&jsx(ro,{sortBy:K,onSort:pe,tableRef:G,pubsub:M,selectable:d,index:-1,schema:t,loading:true,styles:k}),x&&jsxs(u,{as:"center-x flex aic --table-spinner",children:[jsx(Ie,{type:T||ye.Simple}),W&&jsx(z,{as:"--table-loading-message",children:W})]}),x&&Array(R||5).fill({}).map((ce,re)=>jsx(ro,{tableRef:G,index:re,pubsub:M,schema:t,styles:k,loading:true,animate:m,onRowClick:h},`--trow-loading-${re}-${t[0].id}`)),!x&&n&&n.map((ce,re)=>jsx(ro,{tableRef:G,pubsub:M,loading:false,index:re,schema:t,ids:A,styles:k,animate:m,data:ce,onRowClick:h,rowClassName:i,selectable:d,onSelect:y,onContextMenu:H},`--trow-${te.current[re]||re}-${t[0].id}`)),le&&oe(),p&&de&&jsx(u,{"aria-hidden":!p||!de,...m?{fx:{transition:Y.SlideInBottom,curve:Q.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&p&&de!=null}}:{},as:"--row flex aic --row-footer",children:de})]})};fa.displayName="Zuz.Table";var hu=forwardRef(fa),yu=hu;var bu=({ref:e,...r})=>{let{title:t,items:n}=r,[o,s]=useState(0),a=(p,f,l)=>{p.preventDefault(),s(f),document.getElementById(l)?.scrollIntoView({behavior:"smooth"});};return jsxs(u,{ref:e,as:"--table-of-contents rel flex cols",children:[jsx(z,{as:"--toc-title",children:t}),jsx(Ye,{items:n.map((p,f)=>jsx("a",{className:o==f?"--toc-active":"",style:{anchorName:o===f?"--toc-active":"none",color:o==f?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:l=>a(l,f,p.tag),href:`#${p.tag}`,children:p.label}))})]})},vu=bu;var da=({isActive:e,transitionType:r,speed:t,width:n,render:o,content:s,onHeightChange:a})=>{let p=useRef(null),f=useResizeObserver(p);useEffect(()=>{e&&f.height>0&&a(f.height);},[e,f.height]);let m=useMemo(()=>{let c={width:n>0?`${n}px`:"100%",minWidth:n>0?`${n}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return r==="fade"?{...c,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,visibility:e?"visible":"hidden",transition:`opacity ${t}s ease-in-out`,zIndex:e?1:0}:r==="scale"?{...c,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}:c},[e,r,n,t]);return jsx(u,{ref:p,style:{...m},className:"--content",children:o||e?s:null})};da.displayName="Zuz.TabBody";var ga=da;var xa=({ref:e,...r})=>{let{tabs:t,speed:n=.3,prerender:o=true,variant:s,tabStyle:a="fixed",onChange:p,transitionType:f="slide",...l}=r,[m,c]=useState(0),i=useRef(null),d=useResizeObserver(i),P=useMemo(()=>uuid(8),[]),[S,x]=useState("auto"),R=useMemo(()=>d.width>0,[d.width]);useImperativeHandle(e,()=>({setTab:y=>c(y)}));let C=useMemo(()=>t.map(y=>({...y,key:y.key||uuid(8)})),[t]),{style:T,className:g,rest:b}=B({as:`flex cols w-full no-overflow ${l.as||""}`,...l}),h=()=>{if(!R)return {opacity:0};switch(f){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${C.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${m*d.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxs(u,{ref:i,style:T,className:`--tabview --${a} flex cols ${g}`,children:[jsx(Tt,{as:"--tabview-head",onSwitch:y=>{c(y.index);let I=C.find(H=>H.tag==y.tag);I&&I.onSelect&&(I.onSelect(I,y.index),p?.(I,y.index));},selected:m,items:C.reduce((y,I,H)=>(y.push({icon:I.icon,index:H,label:I.label,tag:I.tag}),y),[])}),jsx(u,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:S,transition:R?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:R?1:0},children:jsx(u,{className:"--track",style:{...h()},children:C.map((y,I)=>jsx(ga,{isActive:I===m,transitionType:f,speed:n,width:d.width,render:o||I===m,onHeightChange:H=>I===m&&x(H),content:y.body},`tab-body-${y.key||I}-${P}`))})})]})};xa.displayName="Zuz.TabView";var Eu=xa;var Ou=({ref:e,commands:r,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...a})=>{let[p,f]=useState([{type:"output",content:n}]),[l,m]=useState(""),c=useRef(null),i=useRef(null),{variant:d}=J(true);useEffect(()=>{c.current&&(c.current.scrollTop=c.current.scrollHeight);},[p]);let P=g=>{let b=typeof g=="string"?{type:"output",content:g}:g;f(h=>{let y=[...h,b];return y.length>1e3?y.slice(-1e3):y});},S=()=>f([]);useImperativeHandle(e,()=>({write:P,clear:S}));let x=async g=>{let[b,...h]=g.split(" "),y=b.toLowerCase();return r&&r[y]?await r[y](h):t?await t(g):`command not found: ${b}`},R=g=>{let b=/\u001b\[(\d+)m/g,h=[],y={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,H="#d4d4d4",O=false,_;for(;(_=b.exec(g))!==null;){let A=g.slice(I,_.index);A&&h.push({text:A,color:H,bold:O});let L=_[1];L==="0"?(H="#d4d4d4",O=false):L==="1"?O=true:y[L]&&(H=y[L]),I=b.lastIndex;}let k=g.slice(I);return k&&h.push({text:k,color:H,bold:O}),h},C=(g,b)=>g.includes("\x1B")?R(g).map((h,y)=>jsx(se,{style:{color:h.color||"#d4d4d4",fontWeight:h.bold?"bold":"normal"},children:h.text},`--terminal-msg-${y}-${h.text.replace(/\S+/g,"-")}`)):jsx(se,{style:{color:b==="error"?"#ff5f56":b==="command"?"#00ff00":"#d4d4d4"},children:g}),T=async g=>{if(g.key==="Enter"&&l.trim()){let b=l.trim(),h=[...p,{type:"command",content:`${o}${b}`}];m(""),f(h);let y=await x(b);f(I=>[...I,{type:"output",content:y}]);}};return jsxs(u,{as:`--zuz-terminal --${s||d||U.Medium} flex cols ${a.className}`,onClick:()=>i.current?.focus(),children:[jsx(u,{ref:c,className:"--terminal-log",children:p.map((g,b)=>jsx(u,{children:jsx(z,{children:C(g.content,g.type)})},b))}),jsxs(u,{as:"flex aic --terminal-input",children:[jsx(z,{as:"--terminal-prompt",children:o}),jsx(ue,{ref:i,className:"--zuz-term-input",autoFocus:true,value:l,variant:s||d||U.Medium,onChange:g=>m(g.target.value),onKeyDown:T})]})]})},Vu=Ou;var Du=({meta:e})=>jsxs(F,{as:"flex aic --command-item",children:[e.icon&&jsx(ee,{name:e.icon,as:"--command-icon"}),jsx(z,{children:e.label})]}),Hu=({position:e,onSelect:r,commands:t,visible:n})=>jsx(u,{"aria-hidden":!n,fx:{transition:Y.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(o=>jsx(Du,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),Sa=Hu;var Pa=({ref:e,...r})=>{let {autoResize:t,maxHeight:n,variant:o,resize:s="none",command:a,commands:p,name:f,onInput:l,cmd:m,renderDropdown:c,value:i,defaultValue:d,...P}=r,S=useRef(null),x=useRef(null),{variant:R}=J(true),{style:C,className:T,rest:g}=B(P),b=He();f?b.errors?.[f]:null;let y=f&&b.values&&b.setFieldValue,I=y?b.values?.[f]:void 0,H=useDebounce(E=>{y&&b.setFieldValue?.(f,E);},500),{showDropdown:O,dropdownPosition:_,handleKeyDown:k,handleInput:A,handleCommandSelect:L}=useCommandActions({command:a,commands:p,cmd:m,ref:S}),Z=useCallback(()=>{let E=S.current;!E||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{E.style.height="auto";let G=E.scrollHeight;if(n){let M=parseInt(n.toString(),10);isNaN(M)||(G=Math.min(G,M));}E.style.height=`${G}px`,E.style.overflowY=n&&G>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),N=E=>{H(E.currentTarget.value),l?.(E),A(E),Z();};return useEffect(()=>{S.current&&f&&I!==void 0&&S.current.value!==String(I)&&(S.current.value=String(I));},[I,f]),useEffect(()=>{Z();},[i,d,Z]),useEffect(()=>{t&&S.current&&Z();},[t,Z]),useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),useEffect(()=>()=>{y&&b.deleteFieldValue?.(f);},[]),jsxs(u,{as:"rel",children:[jsx("textarea",{name:f,className:`--input --textarea --${o||R||U.Medium} flex ${T}`.trim(),style:{...C,resize:s,height:t?"auto":C?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:k,onInput:N,ref:E=>{S.current=E,typeof e=="function"?e(E):e&&(e.current=E);},value:i,defaultValue:d,...g}),c?c({show:O,position:_,commands:p||[],onSelect:L}):p&&p.length>0&&jsx(Sa,{visible:O,commands:p,onSelect:L,position:_})]})};Pa.displayName="Zuz.TextArea";var _u=Pa;var Ia=forwardRef((e,r)=>{let{as:t,value:n,color:o,direction:s,...a}=e,p=useRef(null),[f,l]=useState(n||0);return useImperativeHandle(r,()=>({updateValue(m){f.toString().length!==m.toString().length&&l(m);},setValue(m){if(this.updateValue(m),p.current){let c=m.toString().split("");p.current.querySelectorAll(".--wheel-char").forEach((i,d)=>{let P=c[d];if(i instanceof HTMLElement){i.setAttribute("data-value",P);let S=i.querySelector(".--wheel-char-track");S instanceof HTMLElement&&(S.style.setProperty("--v",P),S.offsetWidth);}});}}})),useEffect(()=>{l(n||0);},[n]),jsxs(u,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:p,...a,children:[(f||0).toString().split("").map((m,c)=>isNaN(parseInt(m,10))?jsx(se,{className:"--wheel-char wheel-char-symbol grid",children:m},`wheel-char-symbol-${c}`):jsx(se,{"data-value":m,className:`--wheel-char grid ${c>(f||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxs(se,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":m},children:[jsx(se,{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((i,d)=>jsx(se,{children:i},`${c}--${d}`)),jsx(se,{children:!s||s==="down"?9:0})]})},`wheel-char-${c}`)),o&&jsx(u,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});Ia.displayName="Zuz.TextWheel";var Xu=Ia;var hr=forwardRef((e,r)=>{let{as:t,meta:n,nodes:o,icons:s,onSelect:a,treeTag:p,selected:f,roots:l,expanded:m,...c}=e,{tag:i,label:d,icon:P,under:S,isHead:x}=n,R=useMemo(()=>l.includes(i),[l]),[C,T]=useState(m),g=()=>{localStorage.setItem(`--tn${p}-${i}`,C?"0":"1"),T(!C);};useEffect(()=>{m||R&&!localStorage.getItem(`--tn${p}-${i}`)?(localStorage.setItem(`--tn${p}-${i}`,"1"),T(true)):T(localStorage.getItem(`--tn${p}-${i}`)=="1");},[]);let b=useMemo(()=>o.filter(h=>h.under==i),[o,i]);return jsxs(u,{className:`--treenode ${R?"--is-root":""} --treenode-${i} flex cols`,children:[jsxs(u,{className:`--node --node-${i} flex aic ${f==i?" --selected":""}`,children:[jsx(F,{skeleton:c.skeleton,onClick:g,className:"--node-aro-btn",disabled:b.length==0,children:s?.arrowClose&&s?.arrowOpen?jsx(ee,{skeleton:c.skeleton,className:"--node-aro-icon",name:b.length==0?s?.arrowDisabled||s?.arrowClose:C?s?.arrowOpen:s?.arrowClose}):b.length==0?V.chevronBottom:C?V.chevronBottom:V.chevronRight}),jsxs(F,{className:"--node-meta flex aic",onClick:h=>a(i),children:[(s?.nodeOpen&&s?.nodeClose||R&&s?.rootOpen&&s?.rootClose)&&jsx(ee,{skeleton:c.skeleton,className:`--node-icon ${R?"--icon-root":""}`,name:P||(C?R&&s?.rootOpen||s.nodeOpen:R&&s?.rootClose||s?.nodeClose)}),jsx(z,{className:`--node-label ${R?"--node-label-root":""}`.trim(),skeleton:c.skeleton,children:d})]})]}),C&&b.length>0&&jsx(u,{className:`--sub-node tree-sub-node-${i} flex cols`,children:b.map(h=>jsx(hr,{treeTag:p,selected:f,onSelect:a,icons:s,roots:l,expanded:h.expanded||false,meta:h,nodes:o},`--node-${h.tag}`))})]})});hr.displayName="TreeItem";var Ba=hr;var ka=forwardRef((e,r)=>{let{as:t,nodes:n,onNodeSelect:o,tag:s,icons:a,roots:p,selected:f,...l}=e,[m,c]=useState(f);useImperativeHandle(r,()=>({getSelected:()=>m}),[o]);let i=d=>{c(d),o&&o(d);};return useEffect(()=>{m!=f&&c(f);},[f]),jsx(u,{className:"--treeview flex cols",children:n.filter(d=>p.includes(d.tag)).map(d=>jsx(Ba,{treeTag:s?`-${s}`:"",selected:m,onSelect:P=>i(P),icons:a,meta:d,roots:p,expanded:d.expanded||false,skeleton:l.skeleton,nodes:n},`--node-${d.tag}`))})});ka.displayName="Zuz.TreeView";var rf=ka;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
13
- export{Pe as ALERT,wr as AVATAR,yl as Accordion,Cl as ActionBar,Rl as Alert,jl as AutoComplete,sc as Avatar,ic as Badge,u as Box,_c as Bubble,qn as BubbleMediaType,Un as BubbleStatus,F as Button,Zn as CHART,Ve as CHECKBOX,lf as COLORTHEME,Zo as Calendar,Mc as Carousel,Ac as Chart,Ct as CheckBox,em as CodeBlock,hm as ColorScheme,So as ContextMenu,vm as CookiesConsent,ke as Cover,Om as CropShape,Mm as Cropper,Dm as Crumb,pf as DATATYPE,tt as DIALOG,Sr as DIALOG_ACTION_POSITION,we as DRAWER_SIDE,zm as DatePicker,Ro as Dialog,Eo as Drawer,kt as FILTER,We as FORMVALIDATION,uf as FORMVALIDATION_STYLE,Km as Fab,Um as Filters,Fe as Flex,cp as Form,up as Grid,Co as Group,ee as Icon,je as Image,ue as Input,sr as KeyboardKeys,Ms as KeysLabelMap,ks as KeysMap,St as Label,xo as LayersProvider,Ye as List,Cp as MediaPlayer,Ip as NetworkStatus,ft as ORIGIN,cf as OriginType,Ge as Overlay,ut as POSITION,df as PROGRESS,wt as Pagination,Ut as PaginationStyle,Op as Password,$p as PinInput,ge as Position,qe as ProgressBar,mo as RADIO,_p as Radio,Re as SHEET,lo as SHEET_ACTION_POSITION,af as SKELETON,co as SLIDER,mf as SORT,ye as SPINNER,Io as ScrollView,ar as Search,ou as Select,Tt as SelectTabs,Jm as Sheet,rt as Slider,Ft as SnackPosition,nn as SnackStyle,zt as SnackType,se as Span,Ie as Spinner,ff as Status,ru as Switch,Y as TRANSITIONS,Q as TRANSITION_CURVES,Eu as TabView,yu as Table,vu as TableOfContents,Vu as Terminal,z as Text,Xu as TextWheel,_u as Textarea,za as ThemeProvider,sn as ToastDefaultTitle,Ft as ToastPosition,ko as ToastProvider,nn as ToastStyle,zt as ToastType,jo as ToolTip,rf as TreeView,U as Variant,dt as animationTransition,po as buildClassString,Pr as buildWithStyles,Lf as css,uo as getAnimationCurve,Of as getAnimationTransition,La as getZuzMap,Es as isKeyCombination,Tr as setZuzMap,B as useBase,Ui as useContextMenu,Yi as useDialog,Ji as useDrawer,he as useFx,ol as useMorph,xt as usePosition,cl as useSnack,Mo as useToast};
12
+ </div>`}).join("")},[t,y]);return jsxs(u,{as:`--code-block rel ${d}`,style:m,...c,children:[jsx("pre",{ref:e,children:jsx("code",{className:`--code --lang-${o}`,dangerouslySetInnerHTML:{__html:C}})}),n&&jsx(K,{as:"--copy-code abs",onClick:()=>{copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},om=tm;var os=({onSelect:e,meta:r,selected:t,disabled:n=false})=>{let o=useRef(null),{index:s,icon:a,label:i}=r,[f,c]=useState({x:0,width:0}),l=useDelayed();return useLayoutEffect(()=>{if(l&&o.current){let{width:d,x:m}=o.current.getBoundingClientRect();c({x:m,width:d}),t&&e(s,d,m,r,true);}},[l,o.current]),useEffect(()=>{t&&e(s,f.width,f.x,r,false);},[t]),jsxs(K,{disabled:n,onClick:()=>e(s,f.width,f.x,r,false),ref:o,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsx(re,{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}`})]})};os.displayName="SelectTabItem";var rs=os;var ss=forwardRef((e,r)=>{let{fx:t,items:n,selected:o,variant:s,disabled:a=false,onSwitch:i,...f}=e,[c,l]=useState(o||0),d=useDelayed(50),m=useRef(c),{className:p,style:y,rest:C}=B(f),x=useRef(null),R=useRef(null),{variant:T}=oe(true),P=(g,v,h,b,N)=>{if((N||c!=g&&c!=-2)&&(l(g),m.current=c,queueMicrotask(()=>{d&&i?.(b);})),x.current){let F=R.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${v}px`),x.current.style.setProperty("--x",`${F?h-F.left:h}px`);}};return useImperativeHandle(r,()=>({setSelected:g=>{typeof g=="number"&&g!=c&&l(g);}}),[c]),jsxs(u,{ref:R,"data-selected":c,className:`${p} --segmented --${s||T||U.Medium} flex aic rel`,style:y,...C,children:[jsx(u,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((g,v)=>jsx(rs,{disabled:a,onSelect:P,selected:c==v,meta:{...g,index:v}},`segment-${g.label}-${v}`))]})});ss.displayName="Zuz.SelectTabs";var Pt=ss;var ls=forwardRef((e,r)=>{let{type:t,...n}=e,o=useDelayed(),{colorScheme:s,setColorScheme:a}=xo(),i=useCallback(()=>{a(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:f,style:c}=B(n),l=useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"system",index:1,label:"",icon:V.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}],[]),d=useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !o||d==-1?null:t=="system"||t=="switch"?jsx(Pt,{className:`--color-scheme --${t}`,onSwitch:({tag:m})=>{a(m);},selected:d,items:l,...n}):jsx(K,{onClick:i,style:c,as:`--color-scheme-switch --${n.variant||U.Small} ${f}`.trim(),children:s=="system"?V.colorSchemeSystem:s=="light"?V.colorSchemeLight:V.colorSchemeDark})});ls.displayName="Zuz.ColorScheme";var xm=ls;var ms=forwardRef((e,r)=>{let[t,n]=useState("wait"),{title:o,message:s,acceptLabel:a,rejectLabel:i,position:f}=e,c=async l=>{n(l==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(l));};return useEffect(()=>{let l=localStorage.getItem("--ccnt");n(l?l=="1"?"accepted":"rejected":"pending");},[]),jsxs(u,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:te.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${f||ge.Left} flex cols`,children:[jsx(Z,{as:"--title",children:o||"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(u,{as:"--footer flex aic",children:[jsx(K,{onClick:l=>c(1),as:"--accept",children:a||"Accept All"}),jsx(K,{onClick:l=>c(0),as:"--reject",children:i||"Cancel"})]})]})});ms.displayName="Zuz.CookiesConsent";var Sm=ms;var fs=({ref:e,...r})=>{let {title:t,position:n,margin:o=4,anchorName:s="--tooltip-anchor",children:a,show:i,variant:f,...c}=r,{style:l,className:d,rest:m}=B(c),p=n||ge.Top;useRef(null);let [C,x]=useState(false);useRef(6);let T=i===true||C,g=`--anchor-${useId().replace(/:/g,"")}`,{tooltip:v}=oe(true),h=useMemo(()=>{let N=false;return addPropsToChildren(a,F=>{let k=F.props.className?.includes(s);return k&&(N=true),k||!N},(F,k)=>{let A=k.props.className?.includes(s),L=F===0,O={};return (A||L)&&(O.style={...k.props.style,anchorName:g}),L&&(O.onMouseEnter=M=>{x(true),k.props.onMouseEnter?.(M);},O.onMouseLeave=M=>{x(false),k.props.onMouseLeave?.(M);}),O})},[a,s,g]),b=he({transition:p==ge.Top?ee.SlideInTop:p==ge.Bottom?ee.SlideInBottom:p==ge.Left?ee.SlideInLeft:ee.SlideInRight,when:T,duration:.2,offset:o+6,margin:p==ge.Top||p==ge.Left?-o:o,curve:v?.curve||te.EaseInOut});return useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxs(Fragment$1,{children:[h,jsx(u,{style:{positionAnchor:g,...b.style,...p===ge.Top||p===ge.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${T} --${f||v?.variant||U.Small} --${p} abs ${d}`.trim(),children:typeof t=="string"?jsx(Z,{as:"--text rel",children:t}):t})]})};fs.displayName="Zuz.ToolTip";var Qo=fs;var ds=({ref:e,...r})=>{let {type:t,value:n=0,min:o=0,max:s=1,step:a=.01,onChange:i,showGhostBar:f,showKnobOnHover:c,showToolTip:l,roundValue:d,formatValue:m,...p}=r,{className:y,style:C,rest:x}=B(p),R=useRef(a||.01).current,T=useRef(o||0).current,P=useRef(s||1).current,g=useRef(n||0).current,v=useRef(null),h=useRef(null),b=useRef(null),N=useRef(null);useRef(null);let k=useRef(null),A=useRef(null),L=useRef(null),O=useRef(null),M=(ne,ae,fe)=>(ne-ae)/(fe-ae)*100,_=ne=>{if(h.current){let ae=parseFloat(ne.currentTarget.value);j(ae);let fe=M(ae,parseFloat(ne.currentTarget.min),parseFloat(ne.currentTarget.max));h.current.style.setProperty("--value",`${fe}`),h.current.setAttribute("data-value",`${ae}`),i&&i(d?+ae.toFixed(2):ae);}},[I,E]=useState(false),[G,q]=useState(0),[H,$]=useState(0),[X,W]=useState(false),j=async ne=>{let ae=m?m(+ne):d?(+ne).toFixed(2):Math.round(+ne);L.current&&(L.current.textContent=String(ae));},le=ne=>{if(I){let ae=ne.clientX-G,fe=P-T,z=ae/200*fe,Y=Math.max(T,Math.min(H+z,P));if(Y=Math.round(Y/R)*R,j(Y),h.current){let me=M(Y,T,P);h.current.style.setProperty("--value",`${me}`),h.current.setAttribute("data-value",`${Y}`),A.current&&(A.current.textContent=d?Y.toFixed(2):Y.toString()),i&&i(Y);}}},pe=()=>{E(false),document.body.style.cursor="auto";},xe=ne=>(ne-T)/(P-T)*100,se=ne=>{if(!h.current)return;let ae=h.current.getBoundingClientRect(),fe=ne.clientX-ae.left,Ee=Math.max(0,Math.min(100,fe/ae.width*100));if(l&&L.current){let z=v.current?+v.current.value:n;j(z*100);}if(f){let z=xe(v.current?+v.current.value:n),Y=Math.min(z,Ee),me=Math.abs(Ee-z);h.current.style.setProperty("--ghost-start",`${Y}`),h.current.style.setProperty("--ghost-width",`${me}`);}};useEffect(()=>{h.current&&h.current.style.setProperty("--value",v.current?`${M(parseFloat(v.current.value),parseFloat(v.current.min),parseFloat(v.current.max))}`:g.toString());},[]),useEffect(()=>(I?(document.addEventListener("mousemove",le),document.addEventListener("mouseup",pe)):(document.removeEventListener("mousemove",le),document.removeEventListener("mouseup",pe)),()=>{document.removeEventListener("mousemove",le),document.removeEventListener("mouseup",pe);}),[I]),useEffect(()=>{let ne=M(n,T,P);h.current?.style.setProperty("--value",`${ne}`),j(n);},[n,T,P,L.current]);let Q=()=>jsxs(u,{ref:h,onMouseEnter:()=>W(true),onMouseLeave:()=>W(false),onMouseMove:se,className:`--slider --${t||mo.Default} ${c?"--knob-hover":""} flex rel ${y}`.trim(),style:{...C},children:[jsx(u,{ref:k,className:"--slider-track abs fill"}),f&&jsx(u,{ref:N,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(ue,{ref:v,onInput:_,className:"abs fill",tabIndex:0,type:t||mo.Default,defaultValue:g||0,step:R,max:P,min:T})]});if(l===true){let ne=m?m(n):d?n.toFixed(2):n;return jsx(Qo,{ref:O,show:I,position:ut.Top,margin:15,anchorName:"--tooltip-knob",title:jsx(ie,{ref:L,children:ne}),children:Q()})}return Q()};ds.displayName="Zuz.Slider";var rt=ds;var hs=forwardRef((e,r)=>{let{src:t,shape:n,size:o,...s}=e,{style:a,className:i,rest:f}=B(s),{canvasRef:c,crop:l,setScale:d,handleMouseDown:m,handleMouseUp:p,handleMouseMove:y}=useImageCropper(t,o||200,n||CropShape.Circle);return useImperativeHandle(r,()=>({getCropped(){return l()},setScale(C){d(C);}})),jsxs(u,{as:`--cropper --${n||CropShape.Circle} ${i}`,style:a,...f,children:[jsx("canvas",{ref:c,width:o||200,height:o||200,onMouseDown:m,onMouseUp:p,onMouseLeave:p,onMouseMove:y}),jsx(u,{as:"--cropper-slider",children:jsx(rt,{onChange:C=>d(C),min:0,max:1,step:.01,value:1})})]})});hs.displayName="Zuz.Cropper";var Om=hs;var Dm=(t=>(t.Circle="circle",t.Square="square",t))(Dm||{});var xs=forwardRef((e,r)=>{let{items:t,maxItems:n}=e,o=useMemo(()=>{let i=typeof t=="string",f=i?[]:t;return i&&t.split(",").forEach(c=>{f.push({label:c});}),f},[t]),a=useMemo(()=>n&&n>0&&o.length>n-1,[o,n])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-n)]:o;return jsx(Ye,{ref:r,className:"--crumb flex aic",direction:"rows",seperator:jsx(u,{as:"--crumb-chevron",children:V.chevronRightOutline}),items:a.map((i,f,c)=>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-${f}`))}):jsxs(K,{onClick:()=>i.action?.(),className:"--crumb-item",disabled:!c[f+1],children:[i.icon&&jsx(re,{as:"--crumb-icon",name:i.icon}),jsx(Z,{as:"--crumb-label",children:i.label})]},`${i.label.replace(/\s+/g,"-").toLowerCase()}-${f}`))})});xs.displayName="Zuz.Crumb";var Am=xs;var ws=forwardRef((e,r)=>{let{icon:t,defaultValue:n,value:o,size:s,variant:a,numeric:i,type:f,onConfirm:c,...l}=e,[d,m]=useState(false),[p,y]=useState(n||null),{style:C,className:x,rest:R}=B(l),T=useRef(null),P=useRef(null),{reposition:g}=bt(P,{direction:ge.Bottom,offset:2}),v=b=>{i&&(b.currentTarget.value=b.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};useEffect(()=>{let b=N=>{let F=N.target,k=T.current?.contains(F),A=P.current?.contains(F);!k&&!A&&m(false);};return d&&document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b);}},[d]),useEffect(()=>{let b=N=>{N.key==="Escape"&&d&&(m(false),T.current?.focus());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let h=()=>{m(true);};return useEffect(()=>{d&&g();},[d,g]),jsx(Fragment$1,{children:jsxs(u,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${x}`,"data-value":p?p.toISOString():"",children:[t?typeof t=="string"?jsx(re,{as:"mr:10 c:#666",name:t}):t:jsx(ie,{as:"--date-picker-icon flex aic jcc",children:V.calendar}),jsx("input",{ref:T,value:p?format(p,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:C,onFocus:h,onInput:v,autoComplete:"new-password",onKeyDown:b=>{b.key=="Enter"&&c?.(b.currentTarget.value);},...R}),jsx(u,{"aria-hidden":!d,ref:P,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(Ko,{defaultValue:p,onChange:b=>{y(b),m(false);}})})]})})});ws.displayName="Zuz.DatePicker";var _m=ws;var Ss=forwardRef((e,r)=>{let{icon:t,variant:n,position:o}=e;return jsx(K,{className:`--fab fixed --${n||U.Large} --${o||"bottomright"}`,children:t||V.plus})});Ss.displayName="Zuz.Fab";var Gm=Ss;var Cs=e=>{let{names:r,strength:t}=e,n={[Lt.Gooey]:o=>jsxs("filter",{id:"gooey",children:[jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:o||10,result:"blur"}),jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${Lt.Gooey}`)};return useEffect(()=>{},[r]),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsx("defs",{children:(r||[Lt.Gooey]).map(o=>n[o](t))})})};Cs.displayName="Zuz.Filters";var Xm=Cs;var Ts=({cols:e,gap:r,ais:t,aic:n,aie:o,jcs:s,jcc:a,jce:i,className:f="",style:c,...l})=>{let d=["--flex",e?"--cols":"",t?"--ais":"",n?"--aic":"",o?"--aie":"",s?"--jcs":"",a?"--jcc":"",i?"--jce":"",f].filter(Boolean).join(" "),m={...c,gap:typeof r=="number"?`${r}px`:r};return jsx(u,{...l,className:d,style:m})};Ts.displayName="Zuz.FlexBox";var Fe=Ts;var _e=null,Pe=null,Rs=forwardRef((e,r)=>{let{title:t,message:n,transition:o,curve:s,speed:a,type:i,actionPosition:f,spinner:c,loadingMessage:l,onShow:d,onHide:m,...p}=e,{className:y,style:C,rest:x}=B(p),[R,T]=useState(t||""),[P,g]=useState(n||""),[v,h]=useState(null),[b,N]=useState(i||Ie.Default),F=useMemo(()=>uuid(12),[]),[k,A]=useState(false),L=useRef(null),O=useRef(null),[M,_]=useState(false),[I,E]=useState(true),G=useRef(null),q=P;useImperativeHandle(r,()=>({setLoading($){_($);},showDialog($,X,W,j){_e&&(clearTimeout(_e),Pe&&clearTimeout(Pe),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),Pe=setTimeout(()=>{L.current.classList.remove("--wobble"),Pe=null;},500)),N(Ie.Dialog),X&&g(X),$&&T($),W&&h(W.reduce((J,le)=>(J.push({...le,key:le.key||uuid(12)}),J),[])),A(true),setTimeout(()=>j?j():()=>{},1e3);},dialog($,X,W,j){_e&&(clearTimeout(_e),Pe&&clearTimeout(Pe),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),Pe=setTimeout(()=>{L.current.classList.remove("--wobble"),Pe=null;},500)),N(Ie.Dialog),g(X),T($),W&&h(W.reduce((J,le)=>(J.push({...le,key:le.key||uuid(12)}),J),[])),A(true),setTimeout(()=>j?j():()=>{},1e3);},error($,X){this.show($,X,Ie.Error);},warn($,X){this.show($,X,Ie.Warn);},success($,X){this.show($,X,Ie.Success);},show($,X,W){_e&&(clearTimeout(_e),Pe&&clearTimeout(Pe),O.current=L.current.style.transform,L.current.style.transform="",L.current.classList.remove("--wobble"),setTimeout(()=>{L.current.classList.add("--wobble"),L.current.style.transform=`${O.current} scale(.9)`.trim();},50),Pe=setTimeout(()=>{L.current.classList.remove("--wobble"),L.current.style.transform=O.current||"",Pe=null;},500)),_e=setTimeout(()=>{A(false),_e=null,Pe=null;},(X||4)*1e3),N(W||Ie.Default),g($),A(true),d?.();},hide(){A(false),m?.();}}));let H=useMemo(()=>{let $={when:k,duration:a||.3,delay:.1};if(b==Ie.Dialog){if(o){let{from:X,to:W}=dt(o,20);return {from:X,to:W,curve:s||te.EaseInOut,...$}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:te.Spring,...$}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:te.Spring,...$}},[k,b]);return useEffect(()=>{G.current&&clearTimeout(G.current),k?E(true):G.current=setTimeout(()=>E(false),1e3);},[k]),b==Ie.Dialog?jsxs(Fragment$1,{children:[jsx(Ge,{when:k}),jsxs(u,{className:`--sheet --sheet-${b.toLowerCase()} ${k?"is-visible":""} ${y} fixed`.trim(),style:C,fx:H,...x,ref:L,children:[jsx(ke,{when:M,spinner:c,message:l}),jsxs(u,{className:"--head flex aic rel",children:[jsx(u,{className:`--${R?"title":"dot"} flex aic rel`,children:R||""}),jsx(K,{onClick:$=>A(false),className:"--closer abs",children:"\xD7"})]}),jsx(u,{className:`--body flex aic rel ${v?"":"--no-action"}`.trim(),children:I?q:null}),v&&jsx(u,{className:`--footer flex aic rel ${f?f==co.Center?"jcc":"":"jce"}`.trim(),children:v.map(($,X)=>jsx(K,{onClick:W=>$.handler?$.handler():$.onClick?$.onClick():console.log("onClick Handler missing"),className:"--action",children:$.label},`sheet-${F}-action-${$.key}`))})]})]}):jsx(u,{className:`--sheet --sheet-${b.toLowerCase()} ${y} abs`.trim(),style:C,...x,fx:H,ref:L,children:k?P:null})}),Is=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;Rs.displayName="Zuz.Sheet";var tp=Rs;var cp=e=>{let r={};for(let t in e){let n=t.split(/[\[\]]+/).filter(Boolean);n.reduce((o,s,a)=>{if(a===n.length-1)o[s]=e[t];else {let i=!isNaN(Number(n[a+1]));o[s]=o[s]||(i?[]:{});}return o[s]},r);}return r},Ns=({ref:e,...r})=>{let {schema:t,name:n,cover:o,spinner:s,errors:a,action:i,children:f,withData:c,beforeSubmit:l,onSubmit:d,onError:m,onSuccess:p,resetOnSuccess:y,...C}=r,{className:x,style:R,rest:T}=B(C),[P,g]=useState(false),v=useRef(null),h=Mo(),b=zo();$o();let F=useRef(null),k=useCallback(H=>v.current?v.current.querySelectorAll(H):[],[v.current]),A=H=>({name:H.name||H.getAttribute("name")||H.getAttribute("data-name"),required:H.required?true:H.getAttribute("data-required")?H.getAttribute("data-required")=="true":false,with:H.with||H.getAttribute("with")}),L=H=>{let $=[];return H.querySelectorAll(".--input").forEach(X=>{$.push(X.value);}),$.join("")},O=H=>H.classList.contains("--otp")?L(H):H.classList.contains("--select")?H.querySelector("button.--selected")?.dataset.value:H.classList.contains("--checkbox")||H.getAttribute("type")==="checkbox"?H.checked:H.value,M=useCallback(H=>{let{name:$,required:X,with:W}=A(H),j=O(H);if(t&&t[$]&&b?.getSnapshot()){let J=t[$](j,b.getSnapshot().values);if(J===false||typeof J=="string")return typeof J=="string"&&b?.setFieldError($,J),false}if(X&&(H.type==="checkbox"&&!H.checked||H.classList.contains("--select")&&(j==="-1"||!j)||!j||j===""))return false;if(W)switch((W.includes("@")?W.split("@")[0]=="match"?We.MatchField:W.split("@")[0]:W).toUpperCase()){case We.IPV4:return _(j).isIPv4();case We.IPV6:return _(j).isIPv6();case We.Email:return _(j).isEmail();case We.Uri:try{return new URL(j),!0}catch{return false}case We.MatchField:let[le,pe,xe]=W.split("@"),se=document.querySelector(`[name=${pe.trim()}]`);if(!se)return false;switch(xe||"direct-match"){case "if-not-empty":if(se&&!_(se.value).isEmpty()&&se.value!=H.value)return false;break;case "direct-match":if(se&&se.classList.contains("--otp")&&H.classList.contains("--otp")&&L(se)!=L(H))return false;if(se&&se.value!=H.value)return false;break}break}return true},[t,b]),_$1=useCallback(()=>{let H={},$={...b?.getSnapshot().values||{}},X=null,W=null;if(k("[name]").forEach(J=>{let{name:le,required:pe,with:xe}=A(J),se=pe||xe?M(J):true,ce=O(J);H[le]={valid:se,value:ce},$[le]=ce,b?.setFieldError(le,se?null:a?.[le]||"Invalid"),se?J.classList.remove("--with-error"):(J.classList.add("--with-error"),X||(X=J),W=a?.[le]);}),X){let J=X;if(J.classList.contains("--otp"))for(let le of Array.from(J.querySelectorAll(".--input"))){let pe=le;if(pe.value==""){pe.focus();break}}else J.focus();}let j=cp($);return {error:X!=null,errorMsg:W||"Fix errors to continue...",data:H,payload:j}},[v.current,b]),I=useCallback((H={})=>{let{error:$,errorMsg:X,payload:W,data:j}=_$1();if($){h.error(X);return}i?startTransition(async()=>{g(true),withPost(i,{...c,...W,...H}).then(J=>{g(false),y&&b?.reset(),p?.(J),p||h.success(J.message||"Redirecting...");}).catch(J=>{g(false),m?m(J):h.error(J.message);});}):d?.(W,j);},[_$1,i,c,p,m,y,d]),E=useCallback(()=>{let H=k("[type=submit]");!H||H.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):H.forEach($=>{$.addEventListener("click",I);});},[v.current]),G=useMemo(()=>addPropsToChildren(f,H=>H.props.type=="submit",H=>({ref:F})),[f]),q=useRef(I);return useImperativeHandle(e,()=>({setLoading:H=>g(H),submit:H=>q.current(H),init:E,hideError:()=>h.clearAll()}),[I,E]),useEffect(E,[]),useEffect(()=>{q.current=I;},[I]),useEffect(()=>{let H=k("[type=submit]"),$=Array.from(H).map(X=>{let W=X;return W.addEventListener("click",I),()=>W.removeEventListener("click",I)});return ()=>$.forEach(X=>X())},[I,k]),jsxs(u,{ref:v,style:R,className:`--form flex rel ${x}`,children:[!Is(o)&&jsx(ke,{when:P,spinner:s,...o}),G]})};Ns.displayName="Zuz.FormInternal";var Bs=e=>jsx(In,{initialValues:e.withData,children:jsx(Ns,{...e})});Bs.displayName="Zuz.Form";var mp=Bs;var Es=e=>{let {ref:r,cols:t,rows:n,gap:o,gapX:s,gapY:a,align:i,justify:f,inline:c,flow:l,autoCols:d,autoRows:m,template:p,...y}=e;useRef(null);let {className:x,style:R,rest:T}=B(y),P=v=>typeof v=="number"?`repeat(${v}, 1fr)`:v,g={display:c?"inline-grid":"grid",gridTemplateColumns:P(t),gridTemplateRows:P(n),gap:o,columnGap:s,rowGap:a,alignItems:i,justifyContent:f==="between"?"space-between":f==="around"?"space-around":f,gridAutoFlow:l,gridAutoColumns:d,gridAutoRows:m,gridTemplateAreas:p,...R};return jsx(u,{ref:r,as:`--grid ${x}`.trim(),style:g,...T})};Es.displayName="Zuz.Grid";var fp=Es;var ks=e=>typeof e=="string"&&e.includes("+"),Ls={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"},Ms={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 Vs=forwardRef(({children:e,keys:r,as:t,className:n,variant:o},s)=>{let{variant:a}=oe(true),i=useMemo(()=>{if(ks(r)){let f=null;return {keys:String(r).split("+").reduce((l,d,m,p)=>(p[m+1]?l.push(d):f=d.toUpperCase(),l),[]),children:f}}return {keys:r,children:String(e).toUpperCase()}},[r]);return jsxs(u,{as:`--keyboard-keys --${o||a||U.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(i.keys)?i.keys:[i.keys]).map(f=>jsx("abbr",{title:Ms[f],children:Ls[f]},f)),jsx(ie,{children:i?.children??e})]})});Vs.displayName="Zuz.KeyboardKeys";var lr=Vs;var As=createContext(null),at=()=>{let e=useContext(As);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},wp=({ref:e,icons:r,children:t,...n})=>{let{playlist:o=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:i="No Track",defaultCover:f,onTrackChange:c,...l}=n,{className:d,style:m,rest:p}=B(l),y=useMediaPlayer(o,o[0]??void 0),C=useMemo(()=>({play:V.play,pause:V.pause,prev:V.prev,next:V.next,volumeHigh:V.volumeHigh,volumeMute:V.volumeMute,...r}),[r]),x=useMemo(()=>({...y,mode:s,icons:C}),[y,C]);return jsx(As.Provider,{value:x,children:jsx(u,{className:`--zuz-media-player ${d}`,style:m,children:t})})},$s=wp;var zs=e=>{if(!e||isNaN(e))return "0:00";let r=Math.floor(e/60),t=Math.floor(e%60);return `${r}:${t.toString().padStart(2,"0")}`},Jt=e=>typeof e=="string"?jsx(re,{name:e}):e,Fs=()=>{let{mediaRef:e,state:r,controls:t,mode:n}=at();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}),r.isLoading&&jsx(u,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsx(Se,{})})]})},_s=()=>{let{state:e,defaultArtist:r,defaultTitle:t,defaultCover:n}=at();return jsxs(u,{as:"--track-info flex aic",children:[jsx(je,{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||r||"..."})]})]})},Zs=()=>{let{state:e,controls:r,icons:t}=at();return jsxs(u,{as:"--mediaplayer-controls flex aic",children:[jsx(K,{onClick:r.prev,as:"--prev",children:Jt(t?.prev??V.prev)}),jsx(K,{onClick:r.togglePlay,as:"--play-pause",children:Jt(e.isPlaying?t?.pause??V.pause:t?.play??V.play)}),jsx(K,{onClick:r.next,as:"--next",children:Jt(t?.next??V.next)})]})},Ks=()=>{let{state:e,controls:r,mediaRef:t}=at(),n=e.progress*(e.duration||0);return jsxs(u,{as:"--track-progress flex aic",children:[jsx(u,{as:"--track-current-duration",children:zs(n)}),jsx(rt,{value:e.progress,onClick:o=>{let s=o.currentTarget.getBoundingClientRect(),a=(o.clientX-s.left)/s.width;r.seek(a);}}),jsx(u,{as:"--track-total-duration",children:zs(e.duration)})]})},Ws=()=>{let{state:e,controls:r,icons:t}=at();return jsxs(u,{as:"--volume-control flex aic gap:8 w:120",children:[jsx(K,{onClick:()=>r.setIsMuted(),children:Jt(e.isMuted?t?.volumeMute??V.volumeMute:t?.volumeHigh??V.volumeHigh)}),jsx(rt,{value:e.volume,className:"h:3 flex:1",onClick:n=>{let o=n.currentTarget.getBoundingClientRect();r.setVolume((n.clientX-o.left)/o.width);}})]})};var Sp=({ref:e,...r})=>jsx($s,{...r,ref:e}),Cp=Object.assign(Sp,{Stage:Fs,TrackInfo:_s,Controls:Zs,Progress:Ks,Volume:Ws}),Tp=Cp;var Us=forwardRef((e,r)=>{let t=useNetworkStatus(),{onlineMessage:n,offlineMessage:o,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:te.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||U.Small} fixed flex`,children:[jsx(u,{className:"--ico",children:t?V[Re.Success]:V[Re.Error]}),jsx(Z,{as:"--message",children:t?n||"internet connection restored :)":o||"no internet connection"})]})});Us.displayName="Zuz.NetWorkManager";var Np=Us;var Xs=forwardRef((e,r)=>{let{strenthMeter:t,onChange:n,...o}=e;"type"in o&&delete o.type;let{style:s,className:a,rest:i}=B(o),[f,c]=useState(false),[l,d]=useState(""),m=useMemo(()=>checkPasswordStrength(l),[l]),p=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(ue,{ref:r,type:f?"text":"password",className:a,onChange:p,...i}),jsx(K,{tabIndex:-1,onClick:()=>c(y=>!y),className:"--toggle flex aic jcc abs",children:f?V.eye:V.eyeSlash})]}),t&&jsxs(u,{as:`flex aic --password-meter --pb-score-${m.score}`,style:s,children:[jsxs(u,{as:"--password-bars flex aic",children:[jsx(u,{as:`--pbar ${m.score>=1?"--pb-on":""}`.trim()}),jsx(u,{as:`--pbar ${m.score>=2?"--pb-on":""}`.trim()}),jsx(u,{as:`--pbar ${m.score>=3?"--pb-on":""}`.trim()}),jsx(u,{as:`--pbar ${m.score>=4?"--pb-on":""}`.trim()}),jsx(u,{as:`--pbar ${m.score>=5?"--pb-on":""}`.trim()})]}),jsx(Z,{as:"--password-meter-label","aria-hidden":true,children:m.result})]})]})});Xs.displayName="Zuz.Password";var Vp=Xs;var js=forwardRef((e,r)=>{let{size:t,length:n,mask:o,...s}=e,a=useRef([]),i="pinput",f=false,c={};"with"in s&&(c={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(i=s.name,delete s.name),"required"in s&&(f=true,delete s.required);let{style:l}=B(s),d=m=>{let p=m.currentTarget,y=a.current[parseInt(p.dataset.index)+1],C=a.current[parseInt(p.dataset.index)-1];p.value.length===1&&y?y.focus():p.value.length===0&&C&&C.focus();};return useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsx(u,{name:i,style:l,className:"--otp flex aic rel","data-required":f,"data-size":t||n||4,...c,children:Array(t||n||4).fill(1).map((m,p)=>jsx(ue,{autoComplete:"new-password","data-index":p,ref:y=>{a.current[p]=y;},numeric:true,onChange:d,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${p}`))})});js.displayName="Zuz.PinInput";var $p=js;var Qs=forwardRef((e,r)=>{let{children:t,className:n,name:o,required:s,type:a,value:i,variant:f,checked:c,onSwitch:l,...d}=e,[m,p]=useState(c||false),{variant:y}=oe(true),C=useRef(null);return jsxs(Ct,{className:`${n} --${(a||po.Default).toLowerCase()} --radio${!a||a==po.Default?"":"card"} --${f||y||U.Small} flex aic rel`.trim(),...d,children:[jsx(ue,{ref:C,defaultChecked:m,value:i||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:x=>{l&&l(x.target.checked,i||"cb"),p(x.target.checked);}}),jsx(u,{className:"--dot rel",children:jsx(u,{className:"--rod abs abc"})}),jsx(u,{className:"--value",children:t})]})});Qs.displayName="Zuz.Radio";var Zp=Qs;var Js=forwardRef((e,r)=>{let{fx:t,withStyle:n,as:o,reverse:s=false,searchIcon:a=V.search,hideSearchIcon:i=false,clearIcon:f=V.close,hideClearIcon:c=false,onChange:l,onClear:d,...m}=e,{style:p,className:y}=B({as:e.as}),[C,x]=useState(""),{variant:R}=oe(true),T=useRef(null);"type"in e&&delete e.type;let P=v=>{x(v.target.value),l?.(v.target.value);},g=v=>{C.trim()!==""&&(x(""),l?.(""),T.current&&(T.current.value="",e.onConfirm?.("")));};return useImperativeHandle(r,()=>({focus:()=>T.current?.focus(),value:()=>T.current?.value})),useEffect(()=>{},[]),jsxs(u,{style:p,className:`--search --no-shrink ${s?"--search-rev":""} --${e.variant||R||U.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${y}`.trim(),children:[jsx(ue,{ref:T,onChange:P,...m}),e.shortcut&&jsx(lr,{keys:e.shortcut,as:"abs"}),jsx(K,{tabIndex:-1,onClick:v=>g(),className:"--send flex aic jcc",variant:e.variant||U.Medium,children:C!==""?!c&&(typeof f=="string"?jsx(re,{name:f,as:"--search-action"}):f):!i&&(typeof a=="string"?jsx(re,{name:a,as:"--search-action"}):a)})]})});Js.displayName="Zuz.Search";var cr=Js;var jp=({label:e,icon:r})=>jsxs(u,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[r&&jsx(re,{name:r}),jsx(Z,{as:"--select-group-label",children:e})]}),ta=jp;var ra=({checkIcon:e,selected:r,updateValue:t,o:n})=>{let o=e?typeof e=="string"?jsx(re,{name:"checkIcon"}):e:V.check,s=n.disabled===true;return jsxs(K,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${r?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxs(Fe,{as:"--option-item-meta --aic",children:[n.icon&&jsx(re,{name:n.icon,as:`--select-option-icon --icon-${n.value}`,color:n.iconColor}),jsx(Z,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),r&&jsx(Fe,{aic:true,jcc:true,as:"--select-option-check --abs",children:o})]})};ra.displayName="Option";var na=ra;var sa=({ref:e,...r})=>{let{selected:t,options:n,label:o,name:s,variant:a,search:i,searchPlaceholder:f,maxHeight:c,arrowDownIcon:l=V.arrowDown,arrowUpIcon:d=V.arrowUp,expanded:m,multiple:p,tokenizer:y,wrapTokens:C,disabled:x,checkIcon:R,closeIcon:T,onChange:P,required:g,with:v,...h}=r,b=He(),N=s&&b.values&&b.setFieldValue,F=N?b.errors?.[s]:null,k=N?b.values?.[s]:void 0,A=z=>!z&&z!==0?null:p||y?(Array.isArray(z)?z:[z]).map(me=>typeof me=="string"||typeof me=="number"?n.find(be=>String(be.value)===String(me)):me).filter(Boolean):typeof z=="string"||typeof z=="number"?n.find(Y=>String(Y.value)===String(z)):z,[L,O]=useState(()=>t?A(t):n.find(Y=>String(Y.value)==="-1")||null),M=useMemo(()=>k?A(k):L,[k,L]),[_$1,I]=useState(false),[E,G]=useState(null),q=useRef(null),H=useRef(null),$=useRef(null),X=useId(),W=useMemo(()=>s||X,[]),{reposition:j}=bt($,{direction:ut.Bottom,offset:2}),{variant:J}=oe(true),le=T?typeof T=="string"?jsx(re,{name:T}):T:V.close,{className:pe,style:xe,rest:se}=B(h,void 0),ce=z=>Array.isArray(M)?M.some(Y=>Y.value===z.value):M?.value===z.value,Q=z=>{if(!(x||z.disabled))if(p||y){let Y=Array.isArray(M)?M:[],be=Y.find(io=>io.value===z.value)?Y.filter(io=>io.value!==z.value):[...Y,z];O(be),P?.(be);}else O(z),I(false),P?.(z);},ne=(z,Y)=>{if(z.stopPropagation(),x)return;let me=M.filter(be=>be.value!==Y.value);N?b.setFieldValue?.(s,me.map(be=>be.value)):O(me),I(false),P?.(me);},ae=z=>{let Y=z.currentTarget,me=Y.scrollTop===0&&z.deltaY<0,be=Y.scrollHeight-Y.scrollTop===Y.clientHeight&&z.deltaY>0;!me&&!be||z.preventDefault(),z.stopPropagation();};useImperativeHandle(e,()=>({setSelected:z=>{let Y=A(z);if(N){let me=Array.isArray(Y)?Y.map(be=>be.value):Y?.value;b.setFieldValue?.(s,me);}else O(Y);},getValue:()=>M||null}),[M,n]),useEffect(()=>{if(!_$1)return;let z=()=>{j();};return window.addEventListener("scroll",z,true),window.addEventListener("resize",j),()=>{window.removeEventListener("scroll",j,true),window.removeEventListener("resize",j);}},[_$1,j]),useEffect(()=>{if(!_$1){H.current&&(H.current.value=""),G(null);return}H.current?.focus(),j();let z=me=>{$.current&&!$.current.contains(me.target)&&I(false);},Y=setTimeout(()=>{document.addEventListener("click",z);},0);return ()=>{clearTimeout(Y),document.removeEventListener("click",z);}},[_$1,j]),useEffect(()=>()=>{N&&b.deleteFieldValue?.(s);},[]);let fe=useDebounce(z=>G(z==""?null:z),300),Ee=useMemo(()=>{if(M)return _(M).isArray()?M.length>0?M[0]:void 0:M},[M]);return console.log(F),jsxs(u,{"data-required":g?"true":void 0,with:v,className:[`--select ${m==true?"--expanded":""}`,`--${a||J}`,`${s?`--${s}`:""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:W,children:[jsxs(K,{ref:q,disabled:x,"data-value":Ee?.value??"-1",className:`--select-display --selected flex aic rel ${pe}`.trim(),withLabel:false,style:xe,onClick:z=>{z.stopPropagation(),x||I(Y=>!Y);},...se,children:[Ee?.icon&&jsx(re,{as:"--selected-icon",name:Ee.icon}),jsx(Fe,{aic:true,as:"--label-wrapper",children:y&&Array.isArray(M)&&M.length>0?jsxs(Fe,{as:`--tokens-wrap${C===true?" --wrap":""}`,children:[M?.map(z=>jsxs(Fe,{aic:true,as:"--token",children:[jsx(Z,{as:"--token-label",children:z.label}),jsx(u,{as:"--token-remove",onClick:Y=>ne(Y,z),children:le})]},z.value)),M.length<n.length&&jsx(Z,{as:"--label",children:o||"Choose"})]}):jsx(Z,{as:"--label",children:Array.isArray(M)?M.length>0?`${M.length} selected`:o||"Choose":M?.label||o||"Choose"})}),jsx(u,{className:"--svg-arrow rel flex aic jcc",children:_$1?typeof d=="string"?jsx(re,{name:d,as:"--search-action"}):d:typeof l=="string"?jsx(re,{name:l,as:"--search-action"}):l})]}),jsxs(u,{id:W,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!_$1,onWheel:ae,style:{maxHeight:c||"auto"},ref:$,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:_$1,duration:.05},children:[i&&jsx(u,{as:"--select-search --no-shrink flex --sticky",children:jsx(cr,{ref:H,variant:U.Small,placeholder:f||"Search...",onChange:fe})}),o&&jsx(ta,{label:o}),n?.filter(z=>!E||z.label.toLowerCase().includes(E.toLowerCase()))?.map(z=>jsx(na,{updateValue:Q,checkIcon:R,selected:ce(z),o:z},`option-${(typeof z=="string"?z:z.label).replace(/\s+/g,"-")}-${typeof z=="string"?z:z.value}`))]})]})};sa.displayName="Zuz.Select";var ru=sa;var aa=({ref:e,...r})=>jsx(Tt,{type:Ve.Switch,...r,ref:e});aa.displayName="Zuz.Switch";var nu=aa;var la=e=>{let{idx:r,id:t,as:n,weight:o,style:s,value:a,render:i,resize:f,sortBy:c,sortable:l,onSort:d}=e,[m,p]=useState(0),y=()=>{l&&(d?.(String(t),m==1?-1:1),p(C=>C==1?-1:1));};return jsxs(u,{style:{flex:o||1,...s},as:`--col flex aic ${n||""} ${l?"--sortable":""}`,onClick:y,children:[jsx(u,{as:"--colv",children:a}),r==-1&&l&&c==t&&jsx(u,{as:"--arrow flex aib",children:m==1?V.arrowUp:V.arrowDown})]})};la.displayName="Zuz.Column";var ro=la;var ma=e=>{let{index:r,pubsub:t,schema:n,data:o,ids:s,styles:a,animate:i,sortBy:f,selectable:c,tableRef:l,loading:d,rowClassName:m,onSort:p,onRowClick:y,onSelect:C,onContextMenu:x}=e,R=useDelayed(),T=useMemo(()=>({transition:ee.SlideInBottom,curve:te.EaseInOut,delay:.02*(r+1)}),[]),P=useRef(null),g=(h,b)=>{r==-1?t.emit(`ALL_ROWS_${h?"CHECKED":"UNCHECKED"}`,h):(C&&C(o,h),t.emit(`ROW_${h?"CHECKED":"UNCHECKED"}`,h,b));},v=(h,b,N)=>jsx(ro,{idx:h,id:b,as:"--selector",pubsub:t,value:jsx(Tt,{value:N,ref:P,onSwitch:g,type:Ve.Default})});return useEffect(()=>{let h=(k,A)=>{P.current?.setChecked(k,false);},b=(k,A)=>{let L=false;l?.current&&l.current.querySelectorAll(".--row").forEach(O=>{let M=O;if(!M.classList.contains("--row-head")){let _=M.querySelector(".--selector input[type=checkbox]");_&&_.checked&&!L&&(L=_.checked);}}),P.current.setChecked(L,false);},N=k=>{P.current?.setChecked(k,false),C&&C(o,k);},F=k=>{P.current?.setChecked(k,false),C&&C(o,k);};return r==-1?(t.on("ROW_CHECKED",h),t.on("ROW_UNCHECKED",b),()=>{t.off("ROW_CHECKED",h),t.off("ROW_UNCHECKED",b);}):(t.on("ALL_ROWS_CHECKED",N),t.on("ALL_ROWS_UNCHECKED",F),()=>{t.off("ALL_ROWS_CHECKED",N),t.off("ALL_ROWS_UNCHECKED",F);})},[]),jsxs(u,{onContextMenu:h=>x?x(h,o):null,onClick:h=>y?y(h,e.data):()=>{},...i?{fx:{...T,when:R}}:{},as:`--row flex aic ${y?"--row-clickable":""} ${r==-1?"--row-head":""} ${m||""}`,children:[r==-1&&n.map((h,b)=>{let{renderWhenHeader:N,render:F,value:k,...A}=h;return jsxs(Fragment,{children:[c&&b==0&&v(-1,`--selector-${h.id}`,"all"),jsx(ro,{idx:-1,onSort:p,sortBy:f,value:k,...A,pubsub:t,style:a[h.id]})]},`--col-${h.id}`)}),d&&r>-1&&jsx(u,{as:"--col",children:jsx(Z,{as:"opacity:0",children:"..."})}),!d&&r>-1&&s&&o&&n.map((h,b)=>jsxs(Fragment,{children:[c&&b==0&&v(b,`--selector-${h.id}`,h.id.toString()),s.includes(String(h.id))?jsx(ro,{pubsub:t,idx:b,id:String(h.id),style:a[String(h.id)],value:h.render?h.render(o,r):o[String(h.id).includes(".")?String(h.id).split(".").reverse()[0]:h.id]}):null]},`--${String(h.id)}-val-${b}`))]})};ma.displayName="Zuz.Row";var no=ma;var da=(e,r)=>{let{schema:t,rows:n,rowCount:o,rowsPerPage:s,currentPage:a,pagination:i,paginationHash:f,showPaginationOnZeroPageCount:c,animateRows:l,header:d,rowClassName:m,selectableRows:p,hoverable:y,sortBy:C,loading:x,loadingRowCount:R,loadingMessage:T,spinner:P,emptyMessage:g,onSort:v,onRowClick:h,onRowSelectToggle:b,onPageChange:N,onRowContextMenu:F,...k}=e,A=useRef(null),L=useMemo(()=>t.reduce((ce,Q)=>(ce[Q.id]={flex:Q.weight||1,...Q.w&&{width:Q.w},...Q.maxW&&{maxWidth:Q.maxW},...Q.minW&&{minWidth:Q.minW},...Q.h&&{height:Q.h},...Q.maxH&&{maxHeight:Q.maxH},...Q.minH&&{minHeight:Q.minH}},ce),{}),[t]),O=useMemo(()=>Object.keys(L),[t]),M=useMemo(()=>d??true,[d]),{style:_,className:I,rest:E}=B(k),G=useRef(null),q=useMemo(()=>new PubSub,[]),H=useRef(n.map(()=>uuid(8))),[$,X]=useState(C||null),[W,j]=useState(T||"loading"),J=useMemo(()=>!x&&n&&n.length==0,[x,n]),le=useCallback(()=>g?typeof g=="function"?jsx(g,{}):g:jsx(Z,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);useEffect(()=>{n.length&&!H.current&&(H.current=n.map(()=>uuid(8)));},[n]);let pe=(ce,Q)=>{X(ce),v?.(ce,Q);},xe=(o||(n?n.length:0))/(s||10),se=useMemo(()=>c||xe>1?jsx(St,{hash:f,ref:A,renderOnZeroPageCount:c,onPageChange:N,paginationStyle:"table",startPage:a,itemCount:o||(n?n.length:0),itemsPerPage:s||10}):null,[a,o]);return useImperativeHandle(r,()=>({setLoading(ce){}})),jsxs(u,{as:`--table ${y??true?"--hoverable":""} flex cols rel ${I}`,ref:G,children:[M==true&&jsx(no,{sortBy:$,onSort:pe,tableRef:G,pubsub:q,selectable:p,index:-1,schema:t,loading:true,styles:L}),x&&jsxs(u,{as:"center-x flex aic --table-spinner",children:[jsx(Se,{type:P||ye.Simple}),W&&jsx(Z,{as:"--table-loading-message",children:W})]}),x&&Array(R||5).fill({}).map((ce,Q)=>jsx(no,{tableRef:G,index:Q,pubsub:q,schema:t,styles:L,loading:true,animate:l,onRowClick:h},`--trow-loading-${Q}-${t[0].id}`)),!x&&n&&n.map((ce,Q)=>jsx(no,{tableRef:G,pubsub:q,loading:false,index:Q,schema:t,ids:O,styles:L,animate:l,data:ce,onRowClick:h,rowClassName:m,selectable:p,onSelect:b,onContextMenu:F},`--trow-${H.current[Q]||Q}-${t[0].id}`)),J&&le(),i&&se&&jsx(u,{"aria-hidden":!i||!se,...l?{fx:{transition:ee.SlideInBottom,curve:te.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&i&&se!=null}}:{},as:"--row flex aic --row-footer",children:se})]})};da.displayName="Zuz.Table";var yu=forwardRef(da),xu=yu;var vu=({ref:e,...r})=>{let{title:t,items:n}=r,[o,s]=useState(0),a=(i,f,c)=>{i.preventDefault(),s(f),document.getElementById(c)?.scrollIntoView({behavior:"smooth"});};return jsxs(u,{ref:e,as:"--table-of-contents rel flex cols",children:[jsx(Z,{as:"--toc-title",children:t}),jsx(Ye,{items:n.map((i,f)=>jsx("a",{className:o==f?"--toc-active":"",style:{anchorName:o===f?"--toc-active":"none",color:o==f?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:c=>a(c,f,i.tag),href:`#${i.tag}`,children:i.label}))})]})},wu=vu;var ga=({isActive:e,transitionType:r,speed:t,width:n,render:o,content:s,onHeightChange:a})=>{let i=useRef(null),f=useResizeObserver(i);useEffect(()=>{e&&f.height>0&&a(f.height);},[e,f.height]);let l=useMemo(()=>{let d={width:n>0?`${n}px`:"100%",minWidth:n>0?`${n}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return r==="fade"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,visibility:e?"visible":"hidden",transition:`opacity ${t}s ease-in-out`,zIndex:e?1:0}:r==="scale"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,transform:`scale(${e?1:.95})`,transition:`all ${t}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:e?1:0}:d},[e,r,n,t]);return jsx(u,{ref:i,style:{...l},className:"--content",children:o||e?s:null})};ga.displayName="Zuz.TabBody";var ha=ga;var ba=({ref:e,...r})=>{let{tabs:t,speed:n=.3,prerender:o=true,variant:s,tabStyle:a="fixed",onChange:i,transitionType:f="slide",...c}=r,[l,d]=useState(0),m=useRef(null),p=useResizeObserver(m),y=useMemo(()=>uuid(8),[]),[C,x]=useState("auto"),R=useMemo(()=>p.width>0,[p.width]);useImperativeHandle(e,()=>({setTab:b=>d(b)}));let T=useMemo(()=>t.map(b=>({...b,key:b.key||uuid(8)})),[t]),{style:P,className:g,rest:v}=B({as:`flex cols w-full no-overflow ${c.as||""}`,...c}),h=()=>{if(!R)return {opacity:0};switch(f){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${T.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${l*p.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxs(u,{ref:m,style:P,className:`--tabview --${a} flex cols ${g}`,children:[jsx(Pt,{as:"--tabview-head",onSwitch:b=>{d(b.index);let N=T.find(F=>F.tag==b.tag);N&&N.onSelect&&(N.onSelect(N,b.index),i?.(N,b.index));},selected:l,items:T.reduce((b,N,F)=>(b.push({icon:N.icon,index:F,label:N.label,tag:N.tag}),b),[])}),jsx(u,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:C,transition:R?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:R?1:0},children:jsx(u,{className:"--track",style:{...h()},children:T.map((b,N)=>jsx(ha,{isActive:N===l,transitionType:f,speed:n,width:p.width,render:o||N===l,onHeightChange:F=>N===l&&x(F),content:b.body},`tab-body-${b.key||N}-${y}`))})})]})};ba.displayName="Zuz.TabView";var ku=ba;var Vu=({ref:e,commands:r,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...a})=>{let[i,f]=useState([{type:"output",content:n}]),[c,l]=useState(""),d=useRef(null),m=useRef(null),{variant:p}=oe(true);useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight);},[i]);let y=g=>{let v=typeof g=="string"?{type:"output",content:g}:g;f(h=>{let b=[...h,v];return b.length>1e3?b.slice(-1e3):b});},C=()=>f([]);useImperativeHandle(e,()=>({write:y,clear:C}));let x=async g=>{let[v,...h]=g.split(" "),b=v.toLowerCase();return r&&r[b]?await r[b](h):t?await t(g):`command not found: ${v}`},R=g=>{let v=/\u001b\[(\d+)m/g,h=[],b={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},N=0,F="#d4d4d4",k=false,A;for(;(A=v.exec(g))!==null;){let O=g.slice(N,A.index);O&&h.push({text:O,color:F,bold:k});let M=A[1];M==="0"?(F="#d4d4d4",k=false):M==="1"?k=true:b[M]&&(F=b[M]),N=v.lastIndex;}let L=g.slice(N);return L&&h.push({text:L,color:F,bold:k}),h},T=(g,v)=>g.includes("\x1B")?R(g).map((h,b)=>jsx(ie,{style:{color:h.color||"#d4d4d4",fontWeight:h.bold?"bold":"normal"},children:h.text},`--terminal-msg-${b}-${h.text.replace(/\S+/g,"-")}`)):jsx(ie,{style:{color:v==="error"?"#ff5f56":v==="command"?"#00ff00":"#d4d4d4"},children:g}),P=async g=>{if(g.key==="Enter"&&c.trim()){let v=c.trim(),h=[...i,{type:"command",content:`${o}${v}`}];l(""),f(h);let b=await x(v);f(N=>[...N,{type:"output",content:b}]);}};return jsxs(u,{as:`--zuz-terminal --${s||p||U.Medium} flex cols ${a.className}`,onClick:()=>m.current?.focus(),children:[jsx(u,{ref:d,className:"--terminal-log",children:i.map((g,v)=>jsx(u,{children:jsx(Z,{children:T(g.content,g.type)})},v))}),jsxs(u,{as:"flex aic --terminal-input",children:[jsx(Z,{as:"--terminal-prompt",children:o}),jsx(ue,{ref:m,className:"--zuz-term-input",autoFocus:true,value:c,variant:s||p||U.Medium,onChange:g=>l(g.target.value),onKeyDown:P})]})]})},Du=Vu;var Hu=({meta:e})=>jsxs(K,{as:"flex aic --command-item",children:[e.icon&&jsx(re,{name:e.icon,as:"--command-icon"}),jsx(Z,{children:e.label})]}),Au=({position:e,onSelect:r,commands:t,visible:n})=>jsx(u,{"aria-hidden":!n,fx:{transition:ee.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(o=>jsx(Hu,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),Ca=Au;var Ra=({ref:e,...r})=>{let {autoResize:t,maxHeight:n,variant:o,resize:s="none",command:a,commands:i,name:f,onInput:c,cmd:l,renderDropdown:d,value:m,defaultValue:p,...y}=r,C=useRef(null),x=useRef(null),{variant:R}=oe(true),{style:T,className:P,rest:g}=B(y),v=He();f?v.errors?.[f]:null;let b=f&&v.values&&v.setFieldValue,N=b?v.values?.[f]:void 0,F=useDebounce(E=>{b&&v.setFieldValue?.(f,E);},500),{showDropdown:k,dropdownPosition:A,handleKeyDown:L,handleInput:O,handleCommandSelect:M}=useCommandActions({command:a,commands:i,cmd:l,ref:C}),_=useCallback(()=>{let E=C.current;!E||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{E.style.height="auto";let G=E.scrollHeight;if(n){let q=parseInt(n.toString(),10);isNaN(q)||(G=Math.min(G,q));}E.style.height=`${G}px`,E.style.overflowY=n&&G>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),I=E=>{F(E.currentTarget.value),c?.(E),O(E),_();};return useEffect(()=>{C.current&&f&&N!==void 0&&C.current.value!==String(N)&&(C.current.value=String(N));},[N,f]),useEffect(()=>{_();},[m,p,_]),useEffect(()=>{t&&C.current&&_();},[t,_]),useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),useEffect(()=>()=>{b&&v.deleteFieldValue?.(f);},[]),jsxs(u,{as:"rel",children:[jsx("textarea",{name:f,className:`--input --textarea --${o||R||U.Medium} flex ${P}`.trim(),style:{...T,resize:s,height:t?"auto":T?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:L,onInput:I,ref:E=>{C.current=E,typeof e=="function"?e(E):e&&(e.current=E);},value:m,defaultValue:p,...g}),d?d({show:k,position:A,commands:i||[],onSelect:M}):i&&i.length>0&&jsx(Ca,{visible:k,commands:i,onSelect:M,position:A})]})};Ra.displayName="Zuz.TextArea";var Zu=Ra;var Na=forwardRef((e,r)=>{let{as:t,value:n,color:o,direction:s,...a}=e,i=useRef(null),[f,c]=useState(n||0);return useImperativeHandle(r,()=>({updateValue(l){f.toString().length!==l.toString().length&&c(l);},setValue(l){if(this.updateValue(l),i.current){let d=l.toString().split("");i.current.querySelectorAll(".--wheel-char").forEach((m,p)=>{let y=d[p];if(m instanceof HTMLElement){m.setAttribute("data-value",y);let C=m.querySelector(".--wheel-char-track");C instanceof HTMLElement&&(C.style.setProperty("--v",y),C.offsetWidth);}});}}})),useEffect(()=>{c(n||0);},[n]),jsxs(u,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:i,...a,children:[(f||0).toString().split("").map((l,d)=>isNaN(parseInt(l,10))?jsx(ie,{className:"--wheel-char wheel-char-symbol grid",children:l},`wheel-char-symbol-${d}`):jsx(ie,{"data-value":l,className:`--wheel-char grid ${d>(f||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxs(ie,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":l},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((m,p)=>jsx(ie,{children:m},`${d}--${p}`)),jsx(ie,{children:!s||s==="down"?9:0})]})},`wheel-char-${d}`)),o&&jsx(u,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});Na.displayName="Zuz.TextWheel";var Yu=Na;var br=forwardRef((e,r)=>{let{as:t,meta:n,nodes:o,icons:s,onSelect:a,treeTag:i,selected:f,roots:c,expanded:l,...d}=e,{tag:m,label:p,icon:y,under:C,isHead:x}=n,R=useMemo(()=>c.includes(m),[c]),[T,P]=useState(l),g=()=>{localStorage.setItem(`--tn${i}-${m}`,T?"0":"1"),P(!T);};useEffect(()=>{l||R&&!localStorage.getItem(`--tn${i}-${m}`)?(localStorage.setItem(`--tn${i}-${m}`,"1"),P(true)):P(localStorage.getItem(`--tn${i}-${m}`)=="1");},[]);let v=useMemo(()=>o.filter(h=>h.under==m),[o,m]);return jsxs(u,{className:`--treenode ${R?"--is-root":""} --treenode-${m} flex cols`,children:[jsxs(u,{className:`--node --node-${m} flex aic ${f==m?" --selected":""}`,children:[jsx(K,{skeleton:d.skeleton,onClick:g,className:"--node-aro-btn",disabled:v.length==0,children:s?.arrowClose&&s?.arrowOpen?jsx(re,{skeleton:d.skeleton,className:"--node-aro-icon",name:v.length==0?s?.arrowDisabled||s?.arrowClose:T?s?.arrowOpen:s?.arrowClose}):v.length==0?V.chevronBottom:T?V.chevronBottom:V.chevronRight}),jsxs(K,{className:"--node-meta flex aic",onClick:h=>a(m),children:[(s?.nodeOpen&&s?.nodeClose||R&&s?.rootOpen&&s?.rootClose)&&jsx(re,{skeleton:d.skeleton,className:`--node-icon ${R?"--icon-root":""}`,name:y||(T?R&&s?.rootOpen||s.nodeOpen:R&&s?.rootClose||s?.nodeClose)}),jsx(Z,{className:`--node-label ${R?"--node-label-root":""}`.trim(),skeleton:d.skeleton,children:p})]})]}),T&&v.length>0&&jsx(u,{className:`--sub-node tree-sub-node-${m} flex cols`,children:v.map(h=>jsx(br,{treeTag:i,selected:f,onSelect:a,icons:s,roots:c,expanded:h.expanded||false,meta:h,nodes:o},`--node-${h.tag}`))})]})});br.displayName="TreeItem";var Ea=br;var La=forwardRef((e,r)=>{let{as:t,nodes:n,onNodeSelect:o,tag:s,icons:a,roots:i,selected:f,...c}=e,[l,d]=useState(f);useImperativeHandle(r,()=>({getSelected:()=>l}),[o]);let m=p=>{d(p),o&&o(p);};return useEffect(()=>{l!=f&&d(f);},[f]),jsx(u,{className:"--treeview flex cols",children:n.filter(p=>i.includes(p.tag)).map(p=>jsx(Ea,{treeTag:s?`-${s}`:"",selected:l,onSelect:y=>m(y),icons:a,meta:p,roots:i,expanded:p.expanded||false,skeleton:c.skeleton,nodes:n},`--node-${p.tag}`))})});La.displayName="Zuz.TreeView";var nf=La;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
13
+ export{Re as ALERT,Tr as AVATAR,bl as Accordion,Pl as ActionBar,Nl as Alert,Jl as AutoComplete,ic as Avatar,cc as Badge,u as Box,Kc as Bubble,Yn as BubbleMediaType,Xn as BubbleStatus,K as Button,Wn as CHART,Ve as CHECKBOX,cf as COLORTHEME,Ko as Calendar,Oc as Carousel,Fc as Chart,Tt as CheckBox,om as CodeBlock,xm as ColorScheme,So as ContextMenu,Sm as CookiesConsent,ke as Cover,Dm as CropShape,Om as Cropper,Am as Crumb,uf as DATATYPE,tt as DIALOG,Pr as DIALOG_ACTION_POSITION,we as DRAWER_SIDE,_m as DatePicker,Ro as Dialog,Eo as Drawer,Lt as FILTER,We as FORMVALIDATION,ff as FORMVALIDATION_STYLE,Gm as Fab,Xm as Filters,Fe as Flex,mp as Form,fp as Grid,Co as Group,re as Icon,je as Image,ue as Input,lr as KeyboardKeys,Ms as KeysLabelMap,Ls as KeysMap,Ct as Label,bo as LayersProvider,Ye as List,Tp as MediaPlayer,Np as NetworkStatus,ft as ORIGIN,mf as OriginType,Ge as Overlay,ut as POSITION,gf as PROGRESS,St as Pagination,qt as PaginationStyle,Vp as Password,$p as PinInput,ge as Position,qe as ProgressBar,po as RADIO,Zp as Radio,Ie as SHEET,co as SHEET_ACTION_POSITION,lf as SKELETON,mo as SLIDER,pf as SORT,ye as SPINNER,Io as ScrollView,cr as Search,ru as Select,Pt as SelectTabs,tp as Sheet,rt as Slider,_t as SnackPosition,ln as SnackStyle,Ft as SnackType,ie as Span,Se as Spinner,df as Status,nu as Switch,ee as TRANSITIONS,te as TRANSITION_CURVES,ku as TabView,xu as Table,wu as TableOfContents,Du as Terminal,Z as Text,Yu as TextWheel,Zu as Textarea,Fa as ThemeProvider,cn as ToastDefaultTitle,_t as ToastPosition,Lo as ToastProvider,ln as ToastStyle,Ft as ToastType,Qo as ToolTip,nf as TreeView,U as Variant,dt as animationTransition,uo as buildClassString,Nr as buildWithStyles,Of as css,fo as getAnimationCurve,Vf as getAnimationTransition,Oa as getZuzMap,ks as isKeyCombination,Ir as setZuzMap,B as useBase,Xi as useContextMenu,Qi as useDialog,tl as useDrawer,he as useFx,nl as useMorph,bt as usePosition,pl as useSnack,Mo as useToast};