@zuzjs/ui 1.0.4 → 1.0.6

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 {h,g,i,e,j as j$1,c,d}from'./chunk-AOMKZOJG.js';export{g as PACKAGE_NAME,h as cleanProps,i as splitAtoms}from'./chunk-AOMKZOJG.js';import {forwardRef,createContext,useState,useRef,useImperativeHandle,useMemo,useCallback,useEffect,createElement,isValidElement,Fragment,useId,startTransition,useContext,useLayoutEffect}from'react';import {jsx,jsxs,Fragment as Fragment$1}from'react/jsx-runtime';import {MD5,uuid,withPost,_,clamp,timeSince,addPropsToChildren,toHash,numberInRange,checkPasswordStrength,PubSub}from'@zuzjs/core';import {useDebounce,useImage,useResizeObserver,useLineChart,useDelayed,useAnchorPosition,useImageCropper,CropShape,KeyCode,useShortcuts,useNetworkStatus,useScrollbar,useCommandActions,useDimensions}from'@zuzjs/hooks';import {startOfMonth,endOfMonth,startOfWeek,endOfWeek,eachDayOfInterval,format,isSameMonth,isSameDay,isToday,addHours,addDays,addWeeks}from'date-fns';var Et={Circle:"CIRCLE",Square:"SQUARE"},yp={Default:"DEFAULT",Circle:"CIRCLE"},bp={Light:"light",Dark:"dark",System:"system"},xe={Default:"DEFAULT",Switch:"SWITCH"},Bt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ee=Bt,U={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},vp={Asc:"ASC",Desc:"DESC"},wp={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Sp={Dots:"DOTS"},ye={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},se={Success:"success",Error:"error",Warning:"warning",Info:"info"},F={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",Bounce:"BOUNCE"},q={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},Cp={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},ae={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},ke=ae,Lt={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Bo=Lt,Tp={Bar:"BAR",Ring:"RING"},ct={Default:"range",Text:"number"},kt={Default:"DEFAULT",Card:"CARD"},pt={Gooey:"gooey"},be={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Lo=Symbol.for("zuz.global.map"),ko=o=>{globalThis[Lo]=o;},Ss=()=>globalThis[Lo]||{},Mt=o=>{let s=Array.isArray(o)?o.join(" "):o;if(!s||typeof s!="string")return "";let e=Ss();return process.env.NODE_ENV==="development"&&Object.keys(e).length===0&&console.warn(`[${g}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),i(s).filter(Boolean).map(r=>{let n=r.match(/^([&@][\w-]+)\((.*)\)$/);if(n){let[p,a,c]=n;return i(c).map(l=>{let i=`${a}(${l})`;return e[i]||l}).join(" ")}return e[r]||r}).join(" ")},Zp=o=>{let s=Array.isArray(o)?o.join(" "):o;return !s||typeof s!="string"?"":Mt(s)},Mo=o=>{let s={};for(let e$1 in o){let t=o[e$1];if(e$1.startsWith("--")){s[e$1]=t;continue}let r=e[e$1]?.toString()??e$1;if(r==="x"||r==="translateX"){let n=s.translate?.split(" ")??["0px","0px"];s.translate=`${j$1.addUnitsSafely(e$1,t)} ${n[1]??"0px"}`;}else if(r==="y"||r==="translateY"){let n=s.translate?.split(" ")??["0px","0px"];s.translate=`${n[0]??"0px"} ${j$1.addUnitsSafely(e$1,t)}`;}else c.includes(r)?s[r]=j$1.addUnitsSafely(e$1,t):s[r]=t;}return s},Kp=o=>{let s={};if(Object.keys(o).length>0)for(let e$1 in o){let t=e$1,r=o[t];if(t.startsWith("--")){s[t]=r;continue}let n=t in e?e[t].toString():t;c.includes(n)?n==="translateX"||n==="x"?s.translate=`${j$1.addUnitsToComplexValue(t,r)} ${s.translate?.split(" ")[1]||"0px"}`:n==="translateY"||n==="y"?s.translate=`${s.translate?.split(" ")[0]||"0px"} ${j$1.addUnitsToComplexValue(t,r)}`:s[n.replace("translate","translate")]=j$1.addUnitsToComplexValue(t,r):d.includes(n)?s[n]=j$1.addUnitsToComplexValue(t,r):s[n]=r;}return s},Ot=o=>{if(!o)return "linear";switch(o.toUpperCase()){case F.Bounce:return "var(--bounce)";case F.Liquid:return "var(--liquid)";case F.Spring:return "var(--spring)";case F.EaseInOut:return "ease-in-out";default:return "linear"}},ze=(o,s=0)=>{let e={},t={},r=s||20;switch(o){case q.SlideInLeft:case q.SlideInRight:e={"--fx-x":o===q.SlideInLeft?`-${r}px`:`${r}px`,opacity:0},t={"--fx-x":"0px",opacity:1};break;case q.SlideInTop:case q.SlideInBottom:e={"--fx-y":o===q.SlideInTop?`-${r}px`:`${r}px`,opacity:0},t={"--fx-y":"0px",opacity:1};break;case q.ScaleIn:e={scale:0,opacity:0},t={scale:1,opacity:1};break;case q.FadeIn:e={opacity:0},t={opacity:1};break}return {from:e,to:t}},Up=(o,s,e)=>{let{from:t,to:r}=ze(o);return s?{...t,...r}:e?t:r};var Ps=(o,s)=>{let e=useRef([]);return useEffect(()=>{let t=s?.current;if(!t||!o||!o.clearAtEnd)return;let r=n=>{e.current.includes(n.propertyName)&&o.clearAtEnd===true&&(t.style.transform="",t.style.filter="",e.current.forEach(p=>t.style.removeProperty(p)));};return t.addEventListener("transitionend",r),()=>t.removeEventListener("transitionend",r)},[o,s]),useEffect(()=>{if(typeof window>"u"||!s?.current)return;let t=s.current;(o?.scroll||o?.mouse)&&(t.style.willChange="transform",t.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",t.style.transition=`translate 0.1s ${o.curve?Ot(o.curve):"var(--spring)"}`);},[o,s]),useMemo(()=>{if(!o)return {style:{}};let{transition:t,from:r,to:n,exit:p,when:a,duration:c=.3,delay:l=0,curve:i}=o,f={},{from:u,to:d}=t?ze(t):{from:r||{},to:n||{}};f=a===void 0?{...u,...d}:a?{...d}:p||u;let v=Ot(i),y=[],b=Mo(f);e.current=Object.keys(b);let C={...b};return Object.keys(b).forEach(w=>{let g=w.startsWith("--")?"all":w;y.includes(g)||y.push(`${g} ${c}s ${v} ${l}s`);}),{style:{...C,transition:y.join(", ")}}},[o])},Re=Ps;var Ns=(o,s)=>{let{as:e,fx:t,transition:r,skeleton:n,className:p,propsToRemove:a,style:c,...l}=o||{},i=r?{transition:r,duration:.3}:t||{},{style:f}=Re(i,s),u=Mt(e??"");return {style:{...c,...f},className:[p||"",u||"",n?.enabled?"--skeleton":""].join(" ").trim(),rest:{...h(l,a?[...a,"skeleton"]:["skeleton"])}}},N=Ns;var Bs=(o,s={})=>{let{offset:e=8,direction:t="bottom",container:r=null,triggerRef:n=null}=s,p=useRef(null),a=useCallback(()=>{let c=o.current;if(!c)return;let l=n?.current||c.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=c.getBoundingClientRect(),f=l.getBoundingClientRect(),u,d;r?(u=r.getBoundingClientRect(),d="absolute"):(window.getComputedStyle(c).position==="fixed"?d="fixed":d="absolute",d==="fixed"?u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),c.style.position!==d&&(c.style.position=d),p.current=d;let b=0,C=0;switch(t){case "top":b=f.top-i.height-e,C=f.left,b<u.top&&f.bottom+i.height+e<=u.bottom&&(b=f.bottom+e);break;case "bottom":b=f.bottom+e,C=f.left,b+i.height>u.bottom&&f.top-i.height-e>=u.top&&(b=f.top-i.height-e);break;case "left":b=f.top,C=f.left-i.width-e,C<u.left&&f.right+i.width+e<=u.right&&(C=f.right+e);break;case "right":b=f.top,C=f.right+e,C+i.width>u.right&&f.left-i.width-e>=u.left&&(C=f.left-i.width-e);break}if(b=Math.max(u.top,Math.min(b,u.bottom-i.height)),C=Math.max(u.left,Math.min(C,u.right-i.width)),p.current==="fixed")c.style.top=`${b}px`,c.style.left=`${C}px`;else {let w;c.offsetParent?w=c.offsetParent.getBoundingClientRect():w={top:0,left:0};let g=b-w.top+window.scrollY,P=C-w.left+window.scrollX;c.style.top=`${g}px`,c.style.left=`${P}px`;}},[o,n,e,t,r]);return useEffect(()=>{let c=o.current;if(!c)return;let l=n?.current||c.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=new ResizeObserver(a);return i.observe(c),l&&i.observe(l),a(),window.addEventListener("resize",a),window.addEventListener("scroll",a,true),()=>{i.disconnect(),l&&i.disconnect(),window.removeEventListener("resize",a),window.removeEventListener("scroll",a,true);}},[o,t,e,r,n]),{postion:p.current,reposition:a}},Fe=Bs;var Do=forwardRef((o,s)=>{let{when:e,...t}=o;return jsx(m,{ref:s,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:q.FadeIn,when:e},...t})});Do.displayName="Zuz.Overlay";var Ie=Do;var Ho=({ref:o,...s})=>{let{style:e,...t}=s,{style:r,className:n,rest:p}=N(t);return jsx("span",{ref:o,style:e,className:n,...p})};Ho.displayName="Zuz.Span";var j=Ho;var Ao="(prefers-color-scheme: dark)",Hs=typeof window>"u",_o=createContext(void 0),Ht=o=>{let s=useContext(_o);if(!s){if(o===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return s},oe=Ht,Vs=({children:o,storageKey:s="--ucs",forceTheme:e,zuzMap:t,...r})=>(t&&ko(t),jsx(As,{storageKey:s,forceTheme:e,...r,children:o})),As=({children:o,storageKey:s,forceTheme:e,...t})=>{let[r,n]=useState(()=>e||$o(s,"system")),[p,a]=useState(()=>e||$o(s)),c=u=>(u||(u=window.matchMedia(Ao)),u.matches?"dark":"light"),l=useCallback(u=>{let d=u=="system"?c():u,v=document.documentElement;v.setAttribute("color-scheme",d),v.style.colorScheme=d,a(d);},[c]),i=useCallback(u=>{n(u),localStorage.setItem(s,u),l(u);},[r]),f=useCallback(u=>{let d=c(u);a(d),r==="system"&&l("system");},[r]);return useEffect(()=>{r==null&&window.localStorage.getItem(s);},[r]),useEffect(()=>{window.matchMedia(Ao).addEventListener("change",f);},[f]),useEffect(()=>{let u=d=>{d.key==s&&(d.newValue?i(d.newValue):i("system"));};return window.addEventListener("storage",u),()=>window.removeEventListener("storage",u)},[i]),useEffect(()=>{l(e||r||"system");},[r]),jsxs(_o,{value:{colorScheme:r,resolvedScheme:p,setColorScheme:i,...t},children:[e?null:jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
1
+ import {f,e,g,d,h,c}from'./chunk-5WRS6WIY.js';export{e as PACKAGE_NAME,f as cleanProps,g as splitAtoms}from'./chunk-5WRS6WIY.js';import {forwardRef,createContext,useRef,useMemo,useState,useCallback,useEffect,createElement,isValidElement,Fragment,useId,useImperativeHandle,startTransition,useLayoutEffect,useContext}from'react';import {useDebounce,useImage,useResizeObserver,useLineChart,useDelayed,useImageCropper,CropShape,useNetworkStatus,useScrollbar,useCommandActions,useDimensions,AnchorType,KeyCode,useShortcuts,useAnchorPosition}from'@zuzjs/hooks';import {jsx,jsxs,Fragment as Fragment$1}from'react/jsx-runtime';import {MD5,uuid,withPost,_,clamp,timeSince,addPropsToChildren,toHash,numberInRange,checkPasswordStrength,PubSub}from'@zuzjs/core';import {createPortal}from'react-dom';import {startOfMonth,endOfMonth,startOfWeek,endOfWeek,eachDayOfInterval,format,isSameMonth,isSameDay,isToday,addHours,addDays,addWeeks}from'date-fns';var Bt={Circle:"CIRCLE",Square:"SQUARE"},Pp={Default:"DEFAULT",Circle:"CIRCLE"},Rp={Light:"light",Dark:"dark",System:"system"},ve={Default:"DEFAULT",Switch:"SWITCH"},Lt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},te=Lt,Ke=AnchorType,Np=Ke,W={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Ip={Asc:"ASC",Desc:"DESC"},Ep={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Bp={Dots:"DOTS"},we={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},ie={Success:"success",Error:"error",Warning:"warning",Info:"info"},Z={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},q={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},Lp={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},le={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},De=le,Mt={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Do=Mt,Mp={Bar:"BAR",Ring:"RING"},ut={Default:"range",Text:"number"},Ot={Default:"DEFAULT",Card:"CARD"},ft={Gooey:"gooey"},ne={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Ho=Symbol.for("zuz.global.map"),Ao=t=>{globalThis[Ho]=t;},Is=()=>globalThis[Ho]||{},kt=t=>{let n=Array.isArray(t)?t.join(" "):t;if(!n||typeof n!="string")return "";let e$1=Is();return process.env.NODE_ENV==="development"&&Object.keys(e$1).length===0&&console.warn(`[${e}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),g(n).filter(Boolean).map(o=>{let s=o.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[u,m,p]=s;return g(p).map(i=>{let a=`${m}(${i})`;return e$1[a]||i}).join(" ")}return e$1[o]||o}).join(" ")},Jp=t=>{let n=Array.isArray(t)?t.join(" "):t;return !n||typeof n!="string"?"":kt(n)},Vo=t=>{let n={};for(let e in t){let r=t[e];if(e.startsWith("--")){n[e]=r;continue}let o=d[e]?.toString()??e;if(o==="x"||o==="translateX"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${h.addUnitsSafely(e,r)} ${s[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${s[0]??"0px"} ${h.addUnitsSafely(e,r)}`;}else c.includes(o)?n[o]=h.addUnitsSafely(e,r):n[o]=r;}return n},Dt=t=>{if(!t)return "linear";switch(t.toUpperCase()){case Z.Bounce:return "var(--bounce)";case Z.Liquid:return "var(--liquid)";case Z.Spring:return "var(--spring)";case Z.EaseInOut:return "ease-in-out";case Z.EaseOutBack:return "ease-out-back";default:return "linear"}},Ue=(t,n=0)=>{let e={},r={},o=n||20;switch(t){case q.SlideInLeft:case q.SlideInRight:e={"--fx-x":t===q.SlideInLeft?`-${o}px`:`${o}px`,opacity:0},r={"--fx-x":"0px",opacity:1};break;case q.SlideInTop:case q.SlideInBottom:e={"--fx-y":t===q.SlideInTop?`-${o}px`:`${o}px`,opacity:0},r={"--fx-y":"0px",opacity:1};break;case q.ScaleIn:e={scale:0,opacity:0},r={scale:1,opacity:1};break;case q.FadeIn:e={opacity:0},r={opacity:1};break}return {from:e,to:r}},jp=(t,n,e)=>{let{from:r,to:o}=Ue(t);return n?{...r,...o}:e?r:o};var Ls=(t,n)=>{let e=useRef([]);return useEffect(()=>{let r=n?.current;if(!r||!t||!t.clearAtEnd)return;let o=s=>{e.current.includes(s.propertyName)&&t.clearAtEnd===true&&(r.style.transform="",r.style.filter="",e.current.forEach(u=>r.style.removeProperty(u)));};return r.addEventListener("transitionend",o),()=>r.removeEventListener("transitionend",o)},[t,n]),useEffect(()=>{if(typeof window>"u"||!n?.current)return;let r=n.current;(t?.scroll||t?.mouse)&&(r.style.willChange="transform",r.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",r.style.transition=`translate 0.1s ${t.curve?Dt(t.curve):"var(--spring)"}`);},[t,n]),useMemo(()=>{if(!t)return {style:{}};let{transition:r,from:o,to:s,exit:u,when:m,duration:p=.3,delay:i=0,curve:a}=t,f={},{from:c,to:d}=r?Ue(r):{from:o||{},to:s||{}};f=m===void 0?{...c,...d}:m?{...d}:u||c;let b=Dt(a),h=[],v=Vo(f);e.current=Object.keys(v);let R={...v};return Object.keys(v).forEach(C=>{let g=C.startsWith("--")?"all":C;h.includes(g)||h.push(`${g} ${p}s ${b} ${i}s`);}),{style:{...R,transition:h.join(", ")}}},[t])},se=Ls;var Ms=(t,n)=>{let{as:e,fx:r,transition:o,skeleton:s,className:u,propsToRemove:m,style:p,...i}=t||{},a=o?{transition:o,duration:.3}:r||{},{style:f$1}=se(a,n),c=kt(e??"");return {style:{...p,...f$1},className:[u||"",c||"",s?.enabled?"--skeleton":""].join(" ").trim(),rest:{...f(i,m?[...m,"skeleton"]:["skeleton"])}}},N=Ms;var Hs=(t,n={})=>{let{offset:e=8,direction:r="bottom",container:o=null,triggerRef:s=null}=n,u=useRef(null),m=useCallback(()=>{let p=t.current;if(!p)return;let i=s?.current||p.parentElement;if(!i){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let a=p.getBoundingClientRect(),f=i.getBoundingClientRect(),c,d;o?(c=o.getBoundingClientRect(),d="absolute"):(window.getComputedStyle(p).position==="fixed"?d="fixed":d="absolute",d==="fixed"?c={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:c={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),p.style.position!==d&&(p.style.position=d),u.current=d;let v=0,R=0;switch(r){case "top":v=f.top-a.height-e,R=f.left,v<c.top&&f.bottom+a.height+e<=c.bottom&&(v=f.bottom+e);break;case "bottom":v=f.bottom+e,R=f.left,v+a.height>c.bottom&&f.top-a.height-e>=c.top&&(v=f.top-a.height-e);break;case "left":v=f.top,R=f.left-a.width-e,R<c.left&&f.right+a.width+e<=c.right&&(R=f.right+e);break;case "right":v=f.top,R=f.right+e,R+a.width>c.right&&f.left-a.width-e>=c.left&&(R=f.left-a.width-e);break}if(v=Math.max(c.top,Math.min(v,c.bottom-a.height)),R=Math.max(c.left,Math.min(R,c.right-a.width)),u.current==="fixed")p.style.top=`${v}px`,p.style.left=`${R}px`;else {let C;p.offsetParent?C=p.offsetParent.getBoundingClientRect():C={top:0,left:0};let g=v-C.top+window.scrollY,S=R-C.left+window.scrollX;p.style.top=`${g}px`,p.style.left=`${S}px`;}},[t,s,e,r,o]);return useEffect(()=>{let p=t.current;if(!p)return;let i=s?.current||p.parentElement;if(!i){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let a=new ResizeObserver(m);return a.observe(p),i&&a.observe(i),m(),window.addEventListener("resize",m),window.addEventListener("scroll",m,true),()=>{a.disconnect(),i&&a.disconnect(),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,true);}},[t,r,e,o,s]),{postion:u.current,reposition:m}},We=Hs;var zo=forwardRef((t,n)=>{let{when:e,...r}=t;return jsx(l,{ref:n,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:q.FadeIn,when:e},...r})});zo.displayName="Zuz.Overlay";var Ee=zo;var _o=({ref:t,...n})=>{let{style:e,...r}=n,{style:o,className:s,rest:u}=N(r);return jsx("span",{ref:t,style:e,className:s,...u})};_o.displayName="Zuz.Span";var Q=_o;var Zo="(prefers-color-scheme: dark)",Fs=typeof window>"u",Uo=createContext(void 0),Vt=t=>{let n=useContext(Uo);if(!n){if(t===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return n},ee=Vt,Zs=({children:t,storageKey:n="--ucs",forceTheme:e,zuzMap:r,...o})=>(r&&Ao(r),jsx(Ks,{storageKey:n,forceTheme:e,...o,children:t})),Ks=({children:t,storageKey:n,forceTheme:e,...r})=>{let[o,s]=useState(()=>e||Ko(n,"system")),[u,m]=useState(()=>e||Ko(n)),p=c=>(c||(c=window.matchMedia(Zo)),c.matches?"dark":"light"),i=useCallback(c=>{let d=c=="system"?p():c,b=document.documentElement;b.setAttribute("color-scheme",d),b.style.colorScheme=d,m(d);},[p]),a=useCallback(c=>{s(c),localStorage.setItem(n,c),i(c);},[o]),f=useCallback(c=>{let d=p(c);m(d),o==="system"&&i("system");},[o]);return useEffect(()=>{o==null&&window.localStorage.getItem(n);},[o]),useEffect(()=>{window.matchMedia(Zo).addEventListener("change",f);},[f]),useEffect(()=>{let c=d=>{d.key==n&&(d.newValue?a(d.newValue):a("system"));};return window.addEventListener("storage",c),()=>window.removeEventListener("storage",c)},[a]),useEffect(()=>{i(e||o||"system");},[o]),jsxs(Uo,{value:{colorScheme:o,resolvedScheme:u,setColorScheme:a,...r},children:[e?null:jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
2
2
  const themes = ['light', 'dark']
3
- let theme = localStorage.getItem(\`${s}\`) || "system";
3
+ let theme = localStorage.getItem(\`${n}\`) || "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;`}}),o]})},$o=(o,s)=>{if(Hs)return;let e;try{e=localStorage.getItem(o)||void 0;}catch{}return e||s};var Zo=forwardRef((o,s)=>{let{name:e,pathCount:t,variant:r,color:n,...p}=o,{variant:a}=oe(true),{className:c,style:l,rest:i}=N(p);return jsx("div",{style:{color:n,...l},className:`icon-${e} --icon --${r||a||U.Small} ${c}`.trim(),ref:s,...i,children:Array(t||0).fill(0).map((f,u)=>jsx(j,{className:`path${u+1}`},`${e}-layer-${u}`))})});Zo.displayName="Zuz.Icon";var X=Zo;var ie={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Ko=o=>{let {type:s,variant:e,width:t,speed:r,color:n,background:p,foreground:a,...c}=o,{className:i,style:f,rest:u}=N(c);return jsx(m,{className:`${i} --spinner --${(s||ie.Simple).toLowerCase()} --${e}`.trim(),style:{...f},...u})};Ko.displayName="Zuz.Spinner";var fe=Ko;var ft={Loading:"loading",Normal:"normal"};var Wo=({ref:o,...s})=>{let{reset:e,variant:t,icon:r,iconSize:n,children:p,withLabel:a,spinner:c,state:l,disabled:i,...f}=s,{style:u,className:d,rest:v}=N(f),{variant:y}=oe(true);return jsxs("button",{className:`--button --${t||y} flex aic ${e?"":"jcc"} ${r?"ico-btn":""} ${d}`.trim().replace(/\s+/g," "),style:u,ref:o,disabled:l==ft.Loading||s.skeleton?.enabled||i,...v,children:[l==ft.Loading&&jsx(fe,{variant:t||y,type:c||ie.Simple}),(!l||l==ft.Normal)&&jsxs(Fragment$1,{children:[r&&jsx(X,{variant:n,name:r}),a===true?jsx(j,{children:p}):p]})]})};Wo.displayName="Zuz.Button";var $=Wo;var Zs={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"})," "]}),[se.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"})}),[se.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"})}),[se.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"})}),[se.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"})}),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"})]})},O=Zs;var Ks=({title:o="Alert",onClose:s})=>jsxs(m,{as:"--head flex aic rel",children:[jsx(m,{as:`--${o?"title":"dot"} flex aic jcc rel`,children:o}),jsx($,{onClick:e=>s(),className:"--closer abs center-v",children:O.close})]}),qo=Ks;var Ws=({action:o,render:s=true,message:e=""})=>jsx(m,{as:`--body flex aic rel ${o?"":"--no-action"}`.trim(),children:s?e:null}),Xo=Ws;var qs=({action:o,actionPosition:s,dialogID:e,variant:t})=>jsx(m,{as:`--footer flex aic rel ${s?s==Bo.Center?"jcc":"":"jce"}`.trim(),children:o.map((r,n)=>jsx($,{variant:t,onClick:p=>r.handler?r.handler():r.onClick?r.onClick():console.log("onClick Handler missing"),as:"--action",children:r.label},`dialog-${e}-action-${r.key}`))}),Qo=qs;var jo=forwardRef((o,s)=>{let{h:e,html:t,children:r,lines:n,...p}=o,{style:a,className:c,rest:l}=N(p),i=`h${o.h||1}`;return jsx(i,{ref:s,style:a,className:c,...l,children:t?jsx(j,{dangerouslySetInnerHTML:{__html:t}}):r})});jo.displayName="Zuz.Text";var H=jo;var tr=forwardRef((o,s)=>{let{message:e,spinner:t,spinnerSize:r,color:n,when:p,hideMessage:a,...c}=o,{className:l,style:i,rest:f}=N(c);return "when"in o&&o.when==false?null:jsxs(m,{className:`--cover flex aic jcc cols abs fillx nope nous ${l}`.trim(),style:{...i,backgroundColor:"var(--cover-bg)"},...f,children:[jsx(fe,{variant:r||U.Small,type:t||ie.Simple}),!a&&jsx(H,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});tr.displayName="Zuz.Cover";var Ee=tr;var nr=({ref:o,...s})=>{let{index:e,id:t,title:r,message:n,transition:p,curve:a,speed:c,type:l,action:i,actionPosition:f,spinner:u,loadingMessage:d,variant:v,onClose:y,onShow:b,onHide:C,...w}=s,g=useMemo(()=>uuid(12),[]),[P,L]=useState(r||""),[R,T]=useState(n||""),[I,_]=useState(l||ke.Dialog),[E,Z]=useState(false),[k,W]=useState(true),[G,V]=useState(i||null),[S,D]=useState(false),{variant:A,spinner:K,dialog:M}=oe(true),z=v||M?.variant||A||U.Small,{style:Y,className:te,rest:J}=N(w),le=useRef(null),ue=Re({when:E,duration:c||M?.speed||.3,delay:M?.delay||.1,transition:p||M?.transition||q.SlideInBottom,curve:a||M?.curve||F.EaseInOut});return useEffect(()=>{_(ke.Dialog),T(n),L(P),G&&V(G.reduce((at,it)=>(at.push({...it,key:it.key||uuid(12)}),at),[])),Z(true),setTimeout(()=>b?b():()=>{},1e3);},[]),jsxs(Fragment$1,{children:[jsx(Ie,{when:E}),jsxs(m,{as:`--dialog --${(l??ke.Default).toLowerCase()} ${E?"--visible":""} ${te} fixed abc`.trim(),style:ue.style,...J,ref:le,children:[jsx(Ee,{when:S,spinner:u||M?.spinner||K?.type||ie.Simple,message:d||M?.loadingMessage}),jsx(qo,{title:P,onClose:()=>{Z(false),y(t);}}),jsx(Xo,{message:R,render:k,action:G}),G&&jsx(Qo,{variant:z,action:G,dialogID:g,actionPosition:f})]})]})};nr.displayName="Zuz.Dialog";var At=nr;var _t=createContext(null),aa=forwardRef((o,s)=>{let[e,t]=useState([]),r=useRef(0),n=()=>++r.current;useImperativeHandle(s,()=>({add(a){let c=n(),l={id:c,...a};return t(i=>[l,...i.slice(0,4)]),c},remove(a){t(c=>c.filter(l=>l.id!==a));},clear(){t([]);}}));let p=a=>{setTimeout(()=>t(c=>c.filter(l=>l.id!==a)),1e3);};return jsx(m,{as:"--dialog-wrapper rel",children:e.map((a,c)=>jsx(At,{onClose:p,index:c,...a},`sheet-${a.id}`))})}),ia=forwardRef(({children:o,fx:s},e)=>{let t=useRef(null),r=useMemo(()=>({add:n=>t.current?.add(n),remove:n=>t.current?.remove(n),clear:()=>t.current?.clear(),fx:s||{curve:F.EaseInOut,duration:.4}}),[t.current]);return jsxs(_t.Provider,{value:r,children:[o,jsx(aa,{ref:t})]})}),la=ia;var pa=()=>{let o=useContext(_t);if(!o)throw new Error("useDialog must be used inside <DialogProvider>");let s=(n,p)=>o.add({...p,type:n});return {clearAll:()=>o.clear(),show:n=>s(ke.Dialog,n),hide:n=>o.remove(n)}},ua=pa;var zt=(n=>(n.Default="default",n.Success="success",n.Error="error",n.Warn="warn",n.Promise="promise",n))(zt||{}),ir={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var da=({index:o,id:s,type:e,icon:t,title:r,message:n,duration:p})=>{let a=useDelayed(),c=useDelayed(((p||4)-1)*1e3),l=useContext(Ue);return jsxs(m,{as:`--snack --${e} --snack-${s} ${o>2?"--snacked":""} flex aic`,fx:{from:{left:"50%",x:"-50%",top:-100,scale:1,opacity:.5},to:{left:"50%",x:"-50%",top:25,scale:1,opacity:1},curve:l?.fx.curve,duration:l?.fx.duration,when:a&&!c},children:[jsx(m,{as:"--ico flex aic jcc",fx:{transition:q.ScaleIn,curve:F.Spring,delay:.2,when:a&&!c},children:t?jsx(X,{name:t,fx:{transition:q.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:a&&!c}}):jsx(m,{as:"--no-icon",fx:{transition:q.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:a&&!c}})}),jsxs(m,{as:"--meta",children:[jsx(H,{as:"--tt",fx:{transition:q.SlideInTop,curve:F.Spring,delay:.3,when:a},children:r||ir[e]}),jsx(H,{as:"--tm",fx:{transition:q.SlideInTop,curve:F.Spring,delay:.4,duration:.5,when:a},children:n})]})]})},cr=da;var Ue=createContext(null),ba=forwardRef((o,s)=>{let[e,t]=useState([]),r=useRef(0),n=()=>++r.current;return useImperativeHandle(s,()=>({add(p){let a=n(),c={id:a,...p};return t(l=>[c,...l.slice(0,4)]),p.duration!==1/0&&p.type!="promise"&&setTimeout(()=>this.remove(a),((p.duration??4)+1)*1e3),a},remove(p){t(a=>a.filter(c=>c.id!==p));},clear(){t([]);}})),jsx(m,{as:"--toast-wrapper rel",children:e.map((p,a)=>jsx(cr,{index:a,...p},`toast-${p.id}`))})}),va=forwardRef(({children:o,fx:s},e)=>{let t=useRef(null),r=useMemo(()=>({add:n=>t.current?.add(n),remove:n=>t.current?.remove(n),clear:()=>t.current?.clear(),fx:s||{curve:F.EaseInOut,duration:.4}}),[t.current]);return jsxs(Ue.Provider,{value:r,children:[o,jsx(ba,{ref:t})]})}),wa=va;var Ta=()=>{let o=useContext(Ue);if(!o)throw new Error("useToast must be used inside <ToastProvider>");let s=(l,i)=>o.add({...i,type:l});return {show:(l,i,f,u)=>s("default",{title:l,message:i,icon:f,duration:u}),hide:l=>o.remove(l),success:(l,i,f,u)=>s("success",{title:l,message:i,icon:f,duration:u}),error:(l,i,f,u)=>s("error",{title:l,message:i,icon:f,duration:u}),warn:(l,i,f,u)=>s("warn",{title:l,message:i,icon:f,duration:u}),promise:(l,i,f,u)=>s("promise",{title:l,message:i,icon:f,duration:u}),clearAll:()=>o.clear()}},Zt=Ta;var Na=o=>{let s=(t,r)=>{t.preventDefault(),t.stopPropagation(),setTimeout(()=>{o.current?.show(t,r);},0);},e=t=>{o.current?.hide(t);};return useEffect(()=>(document.addEventListener("click",e),()=>{document.removeEventListener("click",e);}),[o]),{show:s,hide:e}},Ra=Na;var fr=({ref:o,style:s,...e})=>{let t=useRef(null),r=useMemo(()=>o&&typeof o!="function"&&o.current?o:t,[o]),{style:n,className:p,rest:a}=N(e,r);return jsx("div",{ref:o||t,style:{...n,...s||{}},className:p,...a})};fr.displayName="Zuz.Box";var m=fr;var gr=forwardRef((o,s)=>{let{title:e,message:t,...r}=o,[n,p]=useState(false);return jsxs(m,{className:"--accordion flex cols",...r,children:[jsxs($,{onClick:a=>p(!n),className:`--toggle flex aic ${n?"--open":""}`.trim(),children:[jsx(H,{className:"--label flex",children:e}),jsx(m,{className:"--arrow flex",children:n?O.arrowUp:O.arrowDown})]}),n&&jsx(m,{className:"--detail",children:t})]})});gr.displayName="Zuz.Accordion";var Ma=gr;var Oa=({label:o,icon:s,onClick:e,idx:t,selected:r})=>jsx($,{onClick:e,onMouseMove:n=>document.documentElement.style.setProperty("--tip-m",`${t}`),className:`--action ${r?"--selected":""} aic jcc rel`.trim(),children:typeof s=="string"?jsx(X,{name:s}):s}),xr=Oa;var yr=forwardRef((o,s)=>{let{items:e,name:t,selected:r,position:n,...p}=o,a=useRef(null),[c,l]=useState(r||e[0].tag||0),i=useCallback(({x:b,y:C})=>{if(a.current){let w=a.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${b-w.left}`),document.documentElement.style.setProperty("--tip-y",`${C-w.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=useCallback(()=>{a.current&&(a.current.removeEventListener("pointerleave",f),a.current.removeEventListener("pointermove",i),document.documentElement.style.setProperty("--tip-s","0"));},[]),u=useCallback(()=>{a.current&&(a.current.addEventListener("pointerleave",f),a.current.addEventListener("pointermove",i));},[]);useEffect(()=>{a.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((b,C)=>C.label.length>b.length?C.label:b,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),a.current?.addEventListener("pointerenter",u));},[]);let{className:d,style:v,rest:y}=N(p);return jsxs(m,{ref:a,style:v,className:[`--actionbar flex aic ${d}`,`${!n||n==ee.Auto?"rel":`--${n}`}`].join(" ").trim(),...y,children:[e.map((b,C)=>jsx(xr,{selected:c===b.tag||r==C,...b,idx:C},`actionbar-action-${b.label.toLowerCase().replace(/\s+/g,"-")}`)),jsx(m,{className:"--tip abs",children:jsx(m,{className:"--track flex aic",children:e.map(({label:b})=>jsx(m,{className:"--lb",children:b},`tool-tip-${b.toLowerCase().replace(/\s+/g,"-")}`))})})]})});yr.displayName="Zuz.ActionBar";var $a=yr;var vr=forwardRef((o,s)=>{let{type:e,icon:t,title:r,message:n,iconSize:p,...a}=o,{className:c,style:l,rest:i}=N(a);return jsxs(m,{className:`--alert --${e||se.Info} flex aic ${c}`.trim(),style:l,...i,children:[jsx(m,{className:`--icon icon-${t||"auto-matic"}`,style:p?{fontSize:p,width:p,height:p}:{},children:!t&&O[e||se.Info]}),jsxs(m,{className:"--meta flex cols",children:[jsx(H,{className:`--title ${n?"--tm":""}`,children:r||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),n&&jsx(H,{className:"--message",h:2,children:n})]})]})});vr.displayName="Zuz.Alert";var Fa=vr;var wr=({ref:o,...s})=>{let{variant:e,numeric:t,onConfirm:r,...n}=s,{style:p,className:a,rest:c}=N(n),{variant:l}=oe(true),i=f=>{t&&(f.currentTarget.value=f.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsx("input",{className:`--input --${e||l} flex ${a}`.trim(),style:p,onInput:i,onKeyDown:f=>{f.key=="Enter"&&r?.(f.currentTarget.value);},ref:o,...c})};wr.displayName="Zuz.Input";var re=wr;var Tr=o=>{let{meta:s}=o,e=useDelayed(),{label:t,icon:r,...n}=isValidElement(s)?{}:s,{className:p,style:a,rest:c}=N({...n,...n.animate?{animate:{...n.animate,when:e}}:{}});return isValidElement(s)?jsx("li",{style:a,className:p,children:s}):jsx("li",{style:a,className:p,...c,children:typeof s=="string"?s:t})};Tr.displayName="Zuz.ListItem";var Pr=Tr;var Rr=forwardRef((o,s)=>{let{items:e,variant:t,direction:r,seperator:n,ol:p,...a}=o,{className:c,style:l,rest:i}=N(a),f=p==true?"ol":"ul";return createElement(f,{className:`--list --${t||U.Small} flex ${r??"cols"} ${c}`.trim(),style:l,ref:s,...i,children:e.map((u,d,v)=>{let y=`${typeof u=="string"?`li-${String(u)}`:isValidElement(u)?`li-${u.key}`||`${d}-${MD5(u.toString())}`:u.label}-${d}`;return jsxs(Fragment,{children:[jsx(Pr,{meta:u}),n&&v[d+1]?jsx("li",{className:"--list-seperator",children:n},`spt-${d+1}-${y}`):null]},y)})})});Rr.displayName="Zuz.List";var We=Rr;var Er=forwardRef((o,s)=>{let{fx:e,action:t,data:r,withStyle:n,onChange:p,...a}=o,{className:c}=N({as:n||""}),{style:l}=N(a),[i,f]=useState(false),[u,d]=useState(r||[]),v=useRef(null),y=useRef(null),b=useRef(null),C=useMemo(()=>a.name||uuid(12),[]),[w,g]=useState(null),[P,L]=useState(null),[R,T]=useState([]),_$1=useDebounce(S=>{S.target.value==""?(f(false),d([])):t&&S.target.value.trim()!=""&&withPost(t,{query:S.target.value}).then(D=>{"items"in D&&_(D.items).isArray()?(d(D.items),L(S.target.value),T(D.items)):console.error("Action Response should contain items array"),g(null);}).catch(D=>{g(null),d([]);});},250),E=()=>{if(y.current){let S=y.current.getBoundingClientRect(),D=window.innerHeight-S.bottom,A=S.top;if(b.current){let K=b.current;D<K.offsetHeight&&A>D?(K.style.top="auto",K.style.bottom=`${S.height}px`,K.style.maxHeight=`${A-150}px`):(K.style.top=`${S.height+5}px`,K.style.bottom="auto",K.style.maxHeight=`${D-150}px`);}}},Z=S=>{if(u.length>0){if((S.key==="ArrowDown"||S.key==="ArrowUp")&&(S.preventDefault(),S.stopPropagation()),S.key==="Escape")g(null),f(false),d([]);else if(S.key==="ArrowDown")g(D=>{let A=D===null||D===u.length-1?0:D+1;return W(A),A});else if(S.key==="ArrowUp")g(D=>{let A=D===null||D===0?u.length-1:D-1;return W(A),A});else if(S.key==="Enter"&&w!==null){let D=u[w];v.current&&(v.current.value=D,f(false),d([]));}}},k=S=>{v.current&&(v.current.value=S,f(false),d([]));},W=S=>{let D=u[S];if(D&&v.current&&(v.current.value=D,v.current.setSelectionRange(D.length,D.length)),b.current){let K=b.current.children[S];K&&K.scrollIntoView({block:"nearest"});}},G=S=>{y.current&&!y.current.contains(S.target)&&(f(false),d([]));},V=()=>{v.current&&v.current.value===P&&(d(R),g(null),E());};return useEffect(()=>(window.addEventListener("resize",E),window.addEventListener("scroll",E,true),document.addEventListener("mousedown",G),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true),document.removeEventListener("mousedown",G);}),[]),useEffect(()=>{E();},[u]),jsxs(m,{style:l,ref:y,className:`--autocomplete --${o.size||U.Small} flex aic rel ${c}`.trim(),children:[jsx(re,{ref:v,autoComplete:"off",onChange:_$1,onKeyDown:Z,onFocus:V,...a}),jsx(m,{className:"--arrow rel flex aic jcc",children:u.length>0?O.arrowUp:O.arrowDown}),u.length>0&&jsx(We,{id:C,ref:b,className:"--suggestion-list flex cols abs",items:u.map((S,D)=>({label:S,onClick:A=>{A.preventDefault(),A.stopPropagation(),k(S);},className:w===D?"--current":"",animate:{transition:q.SlideInBottom,curve:F.EaseInOut,delay:clamp(.02*D,.02,.5)}}))})]})});Er.displayName="Zuz.AutoComplete";var ni=Er;var Br=forwardRef((o,s)=>{let e=useRef(null),t=useMemo(()=>s&&typeof s!="function"&&s.current?s:e,[s]),{style:r,className:n,rest:p}=N(o,t);return !p.src||p.src==""?null:jsx("img",{ref:t,style:r,className:`${n} flex`,...p})});Br.displayName="Zuz.Image";var qe=Br;var Lr=forwardRef((o,s)=>{let{src:e,variant:t,type:r,crossOrigin:n,referrerPolicy:p,fx:a,as:c,alt:l,color:i,style:f,...u}=o,[d,v,y]=useImage(e??"",n,p),{className:b,style:C,rest:w}=N({fx:a,as:c});return useEffect(()=>{if(r==Et.Square&&!document.getElementById("squareRadiusClipPath")){let g="http://www.w3.org/2000/svg",P=document.createElementNS(g,"svg");P.setAttribute("width","0"),P.setAttribute("height","0");let L=document.createElementNS(g,"defs"),R=document.createElementNS(g,"clipPath");R.setAttribute("id","squareRadiusClipPath"),R.setAttribute("clipPathUnits","objectBoundingBox");let T=document.createElementNS(g,"path");T.setAttribute("d","M0.986 0.347C0.951 0.11 0.777 -0.002 0.5 0C0.223 -0.002 0.049 0.11 0.014 0.347C0.005 0.404 0 0.452 0 0.5C0 0.548 0.005 0.596 0.014 0.653C0.049 0.89 0.223 1.002 0.5 1C0.777 1.002 0.951 0.89 0.986 0.653C0.995 0.596 1 0.548 1 0.5C1 0.452 0.995 0.404 0.986 0.347Z"),R.appendChild(T),L.appendChild(R),P.appendChild(L),document.body.appendChild(P);}},[e]),jsx(m,{className:`--avatar --${t||U.Small} --${(r||Et.Circle).toLowerCase()} rel flex aic jcc ${b}`.trim(),style:{background:i||"var(--primary)",...f,...C},...w,children:e?jsx(qe,{src:d,crossOrigin:n,referrerPolicy:p,...u}):jsx(H,{className:"--avatar-label",children:(l?l.charAt(0):"A").toUpperCase()})})});Lr.displayName="Zuz.Avatar";var fi=Lr;var di=({size:o=6,type:s="idle",label:e="",loading:t=false,...r})=>{let{style:n,className:p,rest:a}=N(r);return jsxs(m,{style:{width:`${o+4}px`,height:`${o+4}px`,...n},as:`--badge rel flex aic jcc ${p}`.trim(),children:[jsx(m,{fx:{transition:q.FadeIn,curve:F.Liquid,duration:.5,when:t},as:"abs abc",children:jsx(fe,{})}),jsx(m,{style:{width:`${o}px`,height:`${o}px`},as:`--dot --${s}`})]})},gi=di;var Ei=[{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 o=new Date,s=o.getDay();return addDays(o,(6-s)%7||6)},getDateFormat:()=>{let o=new Date,s=o.getDay();return format(addDays(o,(6-s)%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)}],Bi=o=>{let s=new Set;return o.filter(e=>{if(e.label=="Later")return true;let t=e.getDate().toISOString().split("T")[0];return s.has(t)?false:(s.add(t),true)})},kr=forwardRef((o,s)=>{let{defaultValue:e,variant:t,onChange:r,...n}=o,{style:p,className:a,rest:c}=N(n),[l,i]=useState(e||new Date),f=startOfMonth(l),u=endOfMonth(l),d=startOfWeek(f),v=endOfWeek(u),y=useMemo(()=>eachDayOfInterval({start:d,end:v}),[d,v]),b=g=>{r?.(g),i(g);},C=()=>{i(g=>new Date(g.getFullYear(),g.getMonth()-1));},w=()=>{i(g=>new Date(g.getFullYear(),g.getMonth()+1));};return jsxs(m,{as:`--calendar flex --${t||"sm"} ${a}`,style:p,children:[jsx(m,{as:"--calendar-quick-select flex cols flex:1",children:Bi(Ei).map(g=>{let P=g.getDate();return jsxs($,{onClick:()=>b(P),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(H,{as:"flex:1",children:g.label}),jsx(H,{as:"tar",children:g.getDateFormat()})]},`--dtp-option-label-${g.label}`)})}),jsxs(m,{as:"--calendar-selector flex cols flex:1",children:[jsxs(m,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(H,{as:"flex:1 --calendar-cm bold",children:format(l,"MMMM yyyy")}),jsx($,{onClick:C,as:"--calendar-chevron",children:O.chevronUpOutline}),jsx($,{onClick:w,as:"--calendar-chevron",children:O.chevronDownOutline})]}),jsxs(m,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(g=>jsx(H,{as:"--calendar-day",children:g},`--calendar-hd-${g}`)),y.map((g,P)=>{let L=isSameMonth(g,l),R=isSameDay(g,l),T=isToday(g);return jsx($,{disabled:!L,onClick:()=>b(g),as:["--calendar-day --calendar-dd",`${R?"--calendar-dd-selected":""}`,`${T?"--calendar-dd-current":""}`],children:format(g,"d")},`--calendar-day-${P}-${g.getFullYear()}-${g.getMonth()}-${g.getDay()}`)})]})]})]})});kr.displayName="Zuz.Calendar";var Qt=kr;var Mr=(s=>(s.Line="line",s))(Mr||{});var Hr=forwardRef((o,s)=>{let{data:e,width:t,height:r,lineColor:n,strokeWidth:p=2,gradientStartColor:a,gradientEndColor:c,animated:l,animDuration:i=2,animDelay:f=0,padding:u=0,type:d,...v}=o,{className:y,style:b,rest:C}=N(v),w=useRef(null),g=useResizeObserver(w.current?.parentElement||w),P=typeof t=="number"?t:g.width,L=typeof r=="number"?r:g.height,R={width:P,height:L},T=useId(),{pathD:I,areaPathD:_}=useLineChart(e,R,u+(p||2)),E=useRef(null),Z=useRef(null),[k,W]=useState(0),[G,V]=useState(0);return useEffect(()=>{l&&(E.current&&W(E.current.getTotalLength()),Z.current&&V(Z.current.getTotalLength()));},[l,I,_,P,L]),jsx(m,{ref:w,as:`--chart --${d||"line"}-chart ${y}`.trim(),style:{...b,width:t,height:r},...C,children:P>0&&L>0&&jsxs("svg",{viewBox:`0 0 ${P} ${L}`,preserveAspectRatio:"xMidYMid meet",children:[jsx("defs",{children:jsxs("linearGradient",{id:T,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopColor:a}),jsx("stop",{offset:"100%",stopColor:c})]})}),jsx("path",{ref:Z,d:_,fill:`url(#${T})`,stroke:"none",style:l?{strokeDasharray:G,strokeDashoffset:G}:{},children:l&&jsx("animate",{attributeName:"stroke-dashoffset",from:G,to:"0",dur:`${i||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsx("path",{ref:E,d:I,fill:"none",stroke:n,strokeWidth:p,strokeLinecap:"round",strokeLinejoin:"round",style:l?{strokeDasharray:k,strokeDashoffset:k}:{},children:l&&jsx("animate",{attributeName:"stroke-dashoffset",from:k,to:"0",dur:`${i||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});Hr.displayName="Zuz.Chart";var Hi=Hr;var Vr=(r=>(r[r.Sending=0]="Sending",r[r.Sent=1]="Sent",r[r.Delivered=2]="Delivered",r[r.Read=3]="Read",r))(Vr||{}),Ar=(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))(Ar||{});var _r=forwardRef((o,s)=>{let{progress:e,type:t,animated:r,...n}=o,p=useRef(null);useImperativeHandle(s,()=>({setProgress:i=>{p.current.style.width=`${i*100}%`;}}),[]),useEffect(()=>{e&&p.current&&(r?setTimeout(()=>p.current.style.width=`${e*100}%`,500):p.current.style.width=`${e*100}%`);},[e,p.current]);let{className:a,style:c,rest:l}=N(n);return jsx(m,{className:`--progress ${r?"--animated":""} flex rel ${a}`.trim(),style:c,...l,children:jsx(m,{ref:p,className:"--bar rel"})})});_r.displayName="Zuz.ProgressBar";var jt=_r;var zr=forwardRef((o,s)=>{let{text:e,media:t,side:r="me",status:n=1,timeStamp:p=Date.now(),arrow:a=true,...c}=o,{className:l,style:i,rest:f}=N(c);return jsx(m,{className:`--bubble-wrapper flex --bw-${r}`.trim(),children:jsxs(m,{className:`--bubble --bubble-${r} ${t?`--with-media --bma-${t.type}`:""} rel flex cols ${a==true?"--b-arrow":""} ${l}`.trim(),style:{...i},...f,children:[e&&jsx(H,{className:"--bubble-text",children:e}),t?t.type=="audio"?jsxs(m,{as:"flex aic --bubble-audio",children:[jsx(j,{className:"--bm-action",children:O.play}),jsx(jt,{progress:.7}),jsx(H,{className:"--bm-dur",children:t.duration??"00:13"})]}):t.type=="img"?jsx(m,{as:"--bubble-image",children:jsx(qe,{src:t.source})}):null:null,jsxs(m,{as:"flex aie jce --bubble-stats",children:[jsx(H,{className:"--bubble-stamp tar",children:timeSince(p)}),r=="me"&&jsx(j,{className:`--bubble-status --bs-${n}`,children:n==0?O.pending:n==1?O.done:n==2?O.doneAll:O.doneAll})]})]})})});zr.displayName="Zuz.Bubble";var Zi=zr;var Fr=forwardRef((o,s)=>{let{style:e,className:t,rest:r}=N(o);return jsx("label",{ref:s,style:e,className:t,...r})});Fr.displayName="Zuz.Label";var Ye=Fr;var Zr=forwardRef((o,s)=>{let{name:e,required:t,type:r,value:n,size:p,variant:a,checked:c,onSwitch:l,...i}=o,[f,u]=useState(c||false),d=useRef(null),{variant:v}=oe(true);return useImperativeHandle(s,()=>({setChecked(y,b=true){u(y),d.current&&(d.current.checked=y),b&&l&&l(y,n||"cb");},toggle(y=true){d.current&&(d.current.checked=!f),y&&l&&l&&l(!f,n||"cb"),u(!f);}})),jsxs(Ye,{className:`--${(r||xe.Default).toLowerCase()} ${!r||r==xe.Default?"--checkbox":"--switch"} --${a||v||U.Small} flex aic jcc ${f?"is-checked":""} rel`.trim(),...i,children:[(!r||r==xe.Default)&&O.check,jsx(re,{ref:d,defaultChecked:f,value:n||"cb",type:"checkbox",className:"abs",name:e,required:t||false,onChange:y=>{l&&l(y.target.checked,n||"cb"),u(y.target.checked);}})]})});Zr.displayName="Zuz.CheckBox";var Qe=Zr;var ji=({ref:o,...s})=>{let{code:e,lang:t="tsx",showLines:r=false,highlight:n="",as:p,fx:a,...c}=s,l=useRef(null),{className:i,style:f,rest:u}=N({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${p}`,fx:a},l),d=useMemo(()=>{let y=new Set;return n.split(",").forEach(b=>{if(b.includes("-")){let[C,w]=b.split("-").map(Number);for(let g=C;g<=w;g++)y.add(g);}else b&&y.add(Number(b));}),y},[n]),v=useMemo(()=>{let y=e.split(`
9
- `);for(;y.length>0&&y[0].trim()==="";)y.shift();for(;y.length>0&&y[y.length-1].trim()==="";)y.pop();let b=y[0]?.match(/^\s*/)?.[0].length||0,C=y.map(g=>{let P=g.match(/^\s*/)?.[0].length||0,L=Math.min(P,b);return g.slice(L)}),w=[{name:"comm",re:/\/\/.*/g},{name:"str",re:/(["'`])(?:(?=(\\?))\2.)*?\1/g},{name:"key",re:/\b(const|let|var|export|default|import|from|return|if|else|switch|case|break|as|type|interface|class|extends|await|async|new|void|typeof)\b/g},{name:"tag",re:/(&lt;\/?[A-Z][\w\.]*|&gt;)/g},{name:"var",re:/(?<!&lt;\/|&lt;)\b[A-Z]\w*\b/g},{name:"fn",re:/\b([a-z_]\w*)(?=\s*\()/gi},{name:"prop",re:/\.([a-z_]\w*)\b/gi},{name:"num",re:/\b\d+\b(?![#|A-Z|a-z|_|ZUZ])/g}];return C.map((g,P)=>{let L=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),R=d.has(P+1),T=[];w.forEach(I=>{L=L.replace(I.re,_=>{let E=`ZUZ_ID_${T.length}_ZUZ`;return T.push(`<span class="--token-${I.name}">${_}</span>`),E});});for(let I=T.length-1;I>=0;I--)L=L.replace(`ZUZ_ID_${I}_ZUZ`,T[I]);return `<div class="--code-line ${r==true?"--with-ln":""} ${R?"--is-highlighted":""}">
10
- ${r==true?`<span class="--line-number">${P+1}</span>`:""}
11
- <span class="--line-content">${L||" "}</span>
12
- </div>`}).join("")},[e,d]);return jsx(m,{as:`--code-block ${i}`,style:f,...c,children:jsx("pre",{ref:o,children:jsx("code",{className:`--code --lang-${t}`,dangerouslySetInnerHTML:{__html:v}})})})},el=ji;var Ur=({onSelect:o,meta:s,selected:e})=>{let t=useRef(null),{index:r,icon:n,label:p}=s,[a,c]=useState({x:0,width:0}),l=useDelayed();return useLayoutEffect(()=>{if(l&&t.current){let{width:i,x:f}=t.current.getBoundingClientRect();c({x:f,width:i}),e&&o(r,i,f,s,true);}},[l,t.current]),useEffect(()=>{e&&o(r,a.width,a.x,s,false);},[e]),jsxs($,{onClick:()=>o(r,a.width,a.x,s,false),ref:t,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[n?typeof n=="string"?jsx(X,{name:n,as:"--segment-icon"}):jsx(m,{as:"--segment-icon flex aic jcc",children:n}):null,p&&String(p).trim()!=""&&jsx(m,{className:"--segment-label",children:p||`Item ${r}`})]})};Ur.displayName="SelectTabItem";var Wr=Ur;var qr=forwardRef((o,s)=>{let{fx:e,items:t,selected:r,variant:n,onSwitch:p,...a}=o,[c,l]=useState(r||0),i=useRef(false),f=useRef(c),{className:u,style:d,rest:v}=N(a),y=useRef(null),b=useRef(null),C=(w,g,P,L,R)=>{if((R||c!=w&&c!=-2)&&(l(w),f.current=c,i.current&&p?.(L)),y.current){let T=b.current?.getBoundingClientRect();y.current.style.setProperty("--w",`${g}px`),y.current.style.setProperty("--x",`${T?P-T.left:P}px`);}};return useImperativeHandle(s,()=>({setSelected:w=>{typeof w=="number"&&w!=c&&l(w);}}),[c]),useEffect(()=>{i.current=true;},[]),jsxs(m,{ref:b,"data-selected":c,className:`${u} --segmented --${n||U.Small} flex aic rel`,style:d,...v,children:[jsx(m,{ref:y,className:"--segment-tab abs"}),t.map((w,g)=>jsx(Wr,{onSelect:C,selected:c==g,meta:{...w,index:g}},`segment-${w.label}-${g}`))]})});qr.displayName="Zuz.SelectTabs";var Je=qr;var Qr=forwardRef((o,s)=>{let{type:e,...t}=o,r=useDelayed(),{colorScheme:n,setColorScheme:p}=Ht(),a=useCallback(()=>{p(n=="dark"?"light":n=="light"?"system":"dark");},[n]),{className:c,style:l}=N(t),i=useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"system",index:1,label:"",icon:O.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}],[]),f=useMemo(()=>["light","system","dark"].indexOf(n),[n]);return !r||f==-1?null:e=="system"||e=="switch"?jsx(Je,{className:`--color-scheme --${e}`,onSwitch:({tag:u})=>{p(u);},selected:f,items:i,...t}):jsx($,{onClick:a,style:l,as:`--color-scheme-switch --${t.variant||U.Small} ${c}`.trim(),children:n=="system"?O.colorSchemeSystem:n=="light"?O.colorSchemeLight:O.colorSchemeDark})});Qr.displayName="Zuz.ColorScheme";var gl=Qr;var hl=o=>{let{label:s,labelColor:e,icon:t,iconColor:r,index:n,className:p,onSelect:a}=o;return s=="-"?jsx(m,{className:"--line"}):jsxs($,{reset:true,onClick:c=>a(),className:`--item ${p||""}`.trim(),children:[jsx(m,{as:"--icon",children:jsx(X,{name:t,className:"--ico",style:r?{color:r}:{}})}),jsx(H,{className:"--lbl flex aic",style:e?{color:e}:{},children:s})]})},Jr=hl;var tn=forwardRef((o,s)=>{let{as:e,offsetX:t,offsetY:r,parent:n,items:p,header:a,footer:c,...l}=o,{className:i,style:f,rest:u}=N(l),d=useRef(void 0),[v,y]=useState(false),[b,C]=useState(p||[]),{position:w,targetRef:g}=useAnchorPosition(n,d.current,{offsetX:t,offsetY:r});return useImperativeHandle(s,()=>({show:(P,L)=>{n||(d.current=P),L&&C(L),y(true);},hide:P=>y(false)})),jsxs(m,{className:`--contextmenu abs flex cols ${i}`.trim(),"aria-hidden":!v,style:{...f,top:w.top,left:w.left},fx:{from:{opacity:0,y:20},to:{opacity:1,y:0},curve:F.EaseInOut,duration:.05,when:v},ref:g,...u,children:[typeof a=="function"?createElement(a):a,b.map((P,L)=>jsx(Jr,{...P,index:L},`context-${P.label.toLowerCase()}-${L}`)),typeof c=="function"?createElement(c):c]})});tn.displayName="Zuz.ContextMenu";var Sl=tn;var rn=forwardRef((o,s)=>{let[e,t]=useState("wait"),{title:r,message:n,acceptLabel:p,rejectLabel:a,position:c}=o,l=async i=>{t(i==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(i));};return useEffect(()=>{let i=localStorage.getItem("--ccnt");t(i?i=="1"?"accepted":"rejected":"pending");},[]),jsxs(m,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:F.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${c||ee.Left} flex cols`,children:[jsx(H,{as:"--title",children:r||"This site uses cookies"}),jsx(H,{as:"--message",children:n||"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(m,{as:"--footer flex aic",children:[jsx($,{onClick:i=>l(1),as:"--accept",children:p||"Accept All"}),jsx($,{onClick:i=>l(0),as:"--reject",children:a||"Cancel"})]})]})});rn.displayName="Zuz.CookiesConsent";var Il=rn;var an=forwardRef((o,s)=>{let {type:e,value:t,min:r,max:n,step:p,onChange:a,roundValue:c,...l}=o,{className:i,style:f,rest:u}=N(l),d=useRef(p||.01).current,v=useRef(r||0).current,y=useRef(n||1).current,b=useRef(t||0).current,C=useRef(null),w=useRef(null),g=useRef(null);useRef(null);let L=useRef(null),R=useRef(null),T=(A,K,M)=>(A-K)/(M-K)*100,I=A=>{if(w.current){let K=parseFloat(A.currentTarget.value),M=T(K,parseFloat(A.currentTarget.min),parseFloat(A.currentTarget.max));w.current.style.setProperty("--value",`${M}`),w.current.setAttribute("data-value",`${K}`),a&&a(c?+K.toFixed(2):K);}},[_,E]=useState(false),[Z,k]=useState(0),[W,G]=useState(0),V=A=>{E(true),k(A.clientX),G(w.current?parseFloat(w.current.getAttribute("data-value")):0),document.body.style.cursor="ew-resize";},S=A=>{if(_){let K=A.clientX-Z,M=Math.max(v,Math.min(W+K*d,y));w.current&&(w.current.setAttribute("data-value",`${M}`),R.current.textContent=c?M.toFixed(2):M.toString(),a&&a(c?+M.toFixed(2):M));}},D=()=>{E(false),document.body.style.cursor="auto";};return useEffect(()=>{w.current&&w.current.style.setProperty("--value",C.current?`${T(parseFloat(C.current.value),parseFloat(C.current.min),parseFloat(C.current.max))}`:b.toString());},[]),useEffect(()=>(_?(document.addEventListener("mousemove",S),document.addEventListener("mouseup",D)):(document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",D)),()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",D);}),[_]),jsx(m,{ref:w,"data-value":b||0,className:`--slider --${e||ct.Default} flex rel ${i}`.trim(),style:{...f},children:ct.Text===e?jsx(Fragment$1,{children:jsx(H,{ref:R,onMouseDown:V,className:"--slider-text",children:b||0})}):jsxs(Fragment$1,{children:[jsx(m,{ref:L,className:"--slider-track abs fill"}),jsx(m,{ref:g,className:"--slider-knob abs"}),jsx(re,{ref:C,onInput:I,className:"abs fill",tabIndex:0,type:e||ct.Default,defaultValue:b||0,step:d,max:y,min:v})]})})});an.displayName="Zuz.Slider";var no=an;var mn=forwardRef((o,s)=>{let{src:e,shape:t,size:r,...n}=o,{style:p,className:a,rest:c}=N(n),{canvasRef:l,crop:i,setScale:f,handleMouseDown:u,handleMouseUp:d,handleMouseMove:v}=useImageCropper(e,r||200,t||CropShape.Circle);return useImperativeHandle(s,()=>({getCropped(){return i()},setScale(y){f(y);}})),jsxs(m,{as:`--cropper --${t||CropShape.Circle} ${a}`,style:p,...c,children:[jsx("canvas",{ref:l,width:r||200,height:r||200,onMouseDown:u,onMouseUp:d,onMouseLeave:d,onMouseMove:v}),jsx(m,{as:"--cropper-slider",children:jsx(no,{onChange:y=>f(y),min:0,max:1,step:.01,value:1})})]})});mn.displayName="Zuz.Cropper";var Ol=mn;var Hl=(e=>(e.Circle="circle",e.Square="square",e))(Hl||{});var pn=forwardRef((o,s)=>{let{items:e,maxItems:t}=o,r=useMemo(()=>{let a=typeof e=="string",c=a?[]:e;return a&&e.split(",").forEach(l=>{c.push({label:l});}),c},[e]),p=useMemo(()=>t&&t>0&&r.length>t-1,[r,t])?[...r.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...r.slice(-t)]:r;return jsx(We,{ref:s,className:"--crumb flex aic",direction:"rows",seperator:jsx(m,{as:"--crumb-chevron",children:O.chevronRightOutline}),items:p.map((a,c,l)=>a.ID=="."?jsx(m,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsx(m,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${c}`))}):jsxs($,{onClick:()=>a.action?.(),className:"--crumb-item",disabled:!l[c+1],children:[a.icon&&jsx(X,{as:"--crumb-icon",name:a.icon}),jsx(H,{as:"--crumb-label",children:a.label})]},`${a.label.replace(/\s+/g,"-").toLowerCase()}-${c}`))})});pn.displayName="Zuz.Crumb";var Al=pn;var dn=forwardRef((o,s)=>{let{icon:e,defaultValue:t,value:r,size:n,variant:p,numeric:a,type:c,onConfirm:l,...i}=o,[f,u]=useState(false),[d,v]=useState(t||null),{style:y,className:b,rest:C}=N(i),w=useRef(null),g=useRef(null),{reposition:P}=Fe(g,{direction:ee.Bottom,offset:2}),L=T=>{a&&(T.currentTarget.value=T.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};useEffect(()=>{let T=I=>{let _=I.target,E=w.current?.contains(_),Z=g.current?.contains(_);!E&&!Z&&u(false);};return f&&document.addEventListener("mousedown",T),()=>{document.removeEventListener("mousedown",T);}},[f]),useEffect(()=>{let T=I=>{I.key==="Escape"&&f&&(u(false),w.current?.focus());};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[f]);let R=()=>{u(true);};return useEffect(()=>{f&&P();},[f,P]),jsx(Fragment$1,{children:jsxs(m,{as:`--date-picker ${p?`--${p}`:""} rel flex aic ${b}`,"data-value":d?d.toISOString():"",children:[e?typeof e=="string"?jsx(X,{as:"mr:10 c:#666",name:e}):e:jsx(j,{as:"--date-picker-icon flex aic jcc",children:O.calendar}),jsx("input",{ref:w,value:d?format(d,"EEE, MMM d YYY hh:mm a"):r||"",className:`--input ${p?`--${p}`:""} flex`.trim(),style:y,onFocus:R,onInput:L,autoComplete:"new-password",onKeyDown:T=>{T.key=="Enter"&&l?.(T.currentTarget.value);},...C}),jsx(m,{"aria-hidden":!f,ref:g,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:f,duration:.05},as:`--date-picker-chooser flex aic ${p?`--${p}`:""}`,children:jsx(Qt,{defaultValue:d,onChange:T=>{v(T),u(false);}})})]})})});dn.displayName="Zuz.DatePicker";var Fl=dn;var io=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(s){return this.stack[this.stack.length-1]===s}push(s){this.stack.includes(s)||(this.stack.push(s),this.updateScrollLock());}pop(s){this.stack=this.stack.filter(e=>e!==s),this.updateScrollLock();}handleEscape(){let s=this.stack[this.stack.length-1];return s?(s(),true):false}get count(){return this.stack.length}},je=new io;var bn=forwardRef((o,s)=>{let{from:e,speed:t,children:r,margin:n,animation:p,prerender:a,onClose:c,...l}=o,{drawer:i}=oe(),[f,u]=useState(a??(i?.prerender||true)),[d,v]=useState(false),y=useRef(null),[b,C]=useState(r),{className:w,style:g,rest:P}=N(l),L=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{je.isTop(R)&&R();}}],[d]);useShortcuts(L);let R=useCallback(()=>{v(false),c?.();},[]);useEffect(()=>{C(r);},[r]),useEffect(()=>(d?je.push(R):je.pop(R),()=>je.pop(R)),[d]);let T=e||i?.from||be.Left,I=useMemo(()=>{switch(T){case be.Left:return {from:{x:"-100vw"},to:{x:0}};case be.Right:return {from:{x:"100vw"},to:{x:0}};case be.Top:return {from:{y:"-100vh"},to:{y:0}};case be.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[e,i?.from]);useImperativeHandle(s,()=>({open(E){E&&C(E),v(true);},close(){R();}}));let _=Re({from:{...I.from,opacity:0},to:{...I.to,opacity:1},when:d,curve:p||i?.animation||F.EaseInOut,duration:t||i?.speed||.5});return jsxs(Fragment$1,{children:[jsx(Ie,{onClick:E=>{d&&R();},when:d}),jsxs(m,{ref:y,style:{...g,..._.style,"--m":`${n||i?.margin||0}px`},"aria-hidden":!d,className:`--drawer flex cols ${w} --${T.toLowerCase()} fixed`,...P,children:[e==be.Top||e==be.Bottom?jsx(m,{className:"--handle"}):null,f||d?b:null]})]})});bn.displayName="Zuz.Drawer";var Ql=bn;var vn=forwardRef((o,s)=>{let{icon:e,variant:t,position:r}=o;return jsx($,{className:`--fab fixed --${t||U.Large} --${r||"bottomright"}`,children:e||O.plus})});vn.displayName="Zuz.Fab";var em=vn;var wn=o=>{let{names:s,strength:e}=o,t={[pt.Gooey]:r=>jsxs("filter",{id:"gooey",children:[jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:r||10,result:"blur"}),jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${pt.Gooey}`)};return useEffect(()=>{},[s]),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsx("defs",{children:(s||[pt.Gooey]).map(r=>t[r](e))})})};wn.displayName="Zuz.Filters";var rm=wn;var Te=null,ne=null,Cn=forwardRef((o,s)=>{let{title:e,message:t,transition:r,curve:n,speed:p,type:a,actionPosition:c,spinner:l,loadingMessage:i,onShow:f,onHide:u,...d}=o,{className:v,style:y,rest:b}=N(d),[C,w]=useState(e||""),[g,P]=useState(t||""),[L,R]=useState(null),[T,I]=useState(a||ae.Default),_=useMemo(()=>uuid(12),[]),[E,Z]=useState(false),k=useRef(null),W=useRef(null),[G,V]=useState(false),[S,D]=useState(true),A=useRef(null),K=g;useImperativeHandle(s,()=>({setLoading(z){V(z);},showDialog(z,Y,te,J){Te&&(clearTimeout(Te),ne&&clearTimeout(ne),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),ne=setTimeout(()=>{k.current.classList.remove("--wobble"),ne=null;},500)),I(ae.Dialog),Y&&P(Y),z&&w(z),te&&R(te.reduce((le,ue)=>(le.push({...ue,key:ue.key||uuid(12)}),le),[])),Z(true),setTimeout(()=>J?J():()=>{},1e3);},dialog(z,Y,te,J){Te&&(clearTimeout(Te),ne&&clearTimeout(ne),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),ne=setTimeout(()=>{k.current.classList.remove("--wobble"),ne=null;},500)),I(ae.Dialog),P(Y),w(z),te&&R(te.reduce((le,ue)=>(le.push({...ue,key:ue.key||uuid(12)}),le),[])),Z(true),setTimeout(()=>J?J():()=>{},1e3);},error(z,Y){this.show(z,Y,ae.Error);},warn(z,Y){this.show(z,Y,ae.Warn);},success(z,Y){this.show(z,Y,ae.Success);},show(z,Y,te){Te&&(clearTimeout(Te),ne&&clearTimeout(ne),W.current=k.current.style.transform,k.current.style.transform="",k.current.classList.remove("--wobble"),setTimeout(()=>{k.current.classList.add("--wobble"),k.current.style.transform=`${W.current} scale(.9)`.trim();},50),ne=setTimeout(()=>{k.current.classList.remove("--wobble"),k.current.style.transform=W.current||"",ne=null;},500)),Te=setTimeout(()=>{Z(false),Te=null,ne=null;},(Y||4)*1e3),I(te||ae.Default),P(z),Z(true),f?.();},hide(){Z(false),u?.();}}));let M=useMemo(()=>{let z={when:E,duration:p||.3,delay:.1};if(T==ae.Dialog){if(r){let{from:Y,to:te}=ze(r,20);return {from:Y,to:te,curve:n||F.EaseInOut,...z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:F.Spring,...z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:F.Spring,...z}},[E,T]);return useEffect(()=>{A.current&&clearTimeout(A.current),E?D(true):A.current=setTimeout(()=>D(false),1e3);},[E]),T==ae.Dialog?jsxs(Fragment$1,{children:[jsx(Ie,{when:E}),jsxs(m,{className:`--sheet --sheet-${T.toLowerCase()} ${E?"is-visible":""} ${v} fixed`.trim(),style:y,fx:M,...b,ref:k,children:[jsx(Ee,{when:G,spinner:l,message:i}),jsxs(m,{className:"--head flex aic rel",children:[jsx(m,{className:`--${C?"title":"dot"} flex aic rel`,children:C||""}),jsx($,{onClick:z=>Z(false),className:"--closer abs",children:"\xD7"})]}),jsx(m,{className:`--body flex aic rel ${L?"":"--no-action"}`.trim(),children:S?K:null}),L&&jsx(m,{className:`--footer flex aic rel ${c?c==Lt.Center?"jcc":"":"jce"}`.trim(),children:L.map((z,Y)=>jsx($,{onClick:te=>z.handler?z.handler():z.onClick?z.onClick():console.log("onClick Handler missing"),className:"--action",children:z.label},`sheet-${_}-action-${z.key}`))})]})]}):jsx(m,{className:`--sheet --sheet-${T.toLowerCase()} ${v} abs`.trim(),style:y,...b,fx:M,ref:k,children:E?g:null})}),tt=o=>typeof o=="object"&&o!=null&&"setLoading"in o&&"success"in o&&"error"in o;Cn.displayName="Zuz.Sheet";var lm=Cn;var Tn=forwardRef((o,s)=>{let{name:e,cover:t,spinner:r,errors:n,action:p,children:a,withData:c,beforeSubmit:l,onSubmit:i,onError:f,onSuccess:u,resetOnSuccess:d,...v}=o,{className:y,style:b,rest:C}=N(v),[w,g]=useState(false),P=useRef(null),L=useRef(null),R=useRef(null),T=Zt(),I=useCallback(S=>P.current?P.current.querySelectorAll(S):[],[P.current]),_$1=S=>({name:S.name||S.getAttribute("name")||S.getAttribute("data-name"),required:S.required?true:S.getAttribute("data-required")?S.getAttribute("data-required")=="true":false,with:S.with||S.getAttribute("with")}),E=S=>{let D=[];return S.querySelectorAll(".--input").forEach(A=>{D.push(A.value);}),D.join("")},Z=useCallback(S=>{let{required:A}=_$1(S);if(A){if(S.type=="checkbox"&&S.checked==false)return false;if(S.classList.contains("--otp")){let M=E(S);if(M==""||M.length<parseInt(S.getAttribute("data-size")))return false}if(S.classList.contains("--select")&&S.querySelector("button.--selected").dataset.value=="-1"||S.value=="")return false}if(S.getAttribute("with")){let M=S.getAttribute("with");switch(M.includes("@")&&(M=M.split("@")[0],M=="match"&&(M=ye.MatchField)),M.toUpperCase()){case ye.IPV4:return _(S.value).isIPv4();case ye.IPV6:return _(S.value).isIPv6();case ye.Email:return _(S.value).isEmail();case ye.Uri:try{return new URL(S.value),!0}catch{return false}case ye.Password:return console.log("Add FORMVALIDATION.Password"),false;case ye.MatchField:let[z,Y,te]=S.getAttribute("with").split("@"),J=document.querySelector(`[name=${Y.trim()}]`);if(!J)return false;switch(te||"direct-match"){case "if-not-empty":if(J&&!_(J.value).isEmpty()&&J.value!=S.value)return false;break;case "direct-match":if(J&&J.classList.contains("--otp")&&S.classList.contains("--otp")&&E(J)!=E(S))return false;if(J&&J.value!=S.value)return false;break}break;default:return true}}return true},[P.current]),k=useCallback(()=>{let S={},D={},A=null,K=null;if(Array.from(I("[name]")).forEach(M=>{let{name:z,required:Y,with:te}=_$1(M),J=true;(Y||te)&&(J=Z(M)),S[z]={valid:J,value:M.type=="checkbox"?M.checked==true?M.value:false:M.classList.contains("--otp")?E(M):M.classList.contains("--select")?M.querySelector("button.--selected").dataset.value:M.value},D[z]=M.type=="checkbox"?M.checked==true:M.classList.contains("--otp")?E(M):M.classList.contains("--select")?M.querySelector("button.--selected").dataset.value:M.value,J?M.classList.remove("input-with-error"):(A==null&&n&&(A=M,K=n[z]),M.classList.add("input-with-error"));}),A){let M=A;if(M.classList.contains("--otp"))for(let z of Array.from(M.querySelectorAll(".--input"))){let Y=z;if(Y.value==""){Y.focus();break}}else M.focus();}return {error:A!=null,errorMsg:K||"Fix errors to continue...",data:S,payload:D}},[P.current]),W=useCallback(()=>{let{error:S,errorMsg:D,payload:A}=k();S?T.error(D):p?startTransition(async()=>{l&&l(A),tt(t)?t.setLoading(true):g(true),T.clearAll(),withPost(p,{...A,...c||{}}).then(K=>{let M=K;tt(t)?t.setLoading(false):g(false),d&&Array.from(I("[name]")).forEach(z=>{z instanceof HTMLInputElement&&(z.value="");}),u?u(M):(T.clearAll(),T.success(M.message||"Redirecting..."));}).catch(K=>{tt(t)?t.setLoading(false):g(false),f?f(K):T.error(K.message||"We cannot process your request at this time.");});}):i&&i(A);},[p,L.current,P.current]),G=useCallback(()=>{let S=I("[type=submit]");!S||S.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):S.forEach(D=>{D.addEventListener("click",W);});},[P.current]),V=useMemo(()=>addPropsToChildren(a,S=>S.props.type=="submit",S=>({ref:R})),[a]);return useImperativeHandle(s,()=>({setLoading(S){if(S){L.current.hide();try{T.clearAll();}catch{}}g(S);},showError(S){typeof S=="string"?T.error(S):L.current.error(S,4);},hideError(){L.current.hide();try{T.clearAll();}catch{}},init(){G();},submit(){W();}})),useEffect(G,[]),jsxs(m,{ref:P,style:b,className:`--form flex rel ${y} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!tt(t)&&jsx(Ee,{message:t?t.message||void 0:"working",spinner:r,color:t&&"color"in t?t.color:"#ffffff",when:w}),V]})});Tn.displayName="Zuz.Form";var ym=Tn;var Pn=forwardRef((o,s)=>{let {children:e,fx:t,fxDelay:r,fxStep:n,classToIgnore:p,...a}=o,c=oe(true),l=useDelayed(),i=t||c?.group?.fx,f=r||c?.group?.fxDelay,u=n||c?.group?.fxStep;p||c?.group?.classToIgnore;let v=useMemo(()=>i?addPropsToChildren(e,y=>{if(y.type===Fragment)return false;let b=y.props||{},C="fx"in b,w=b.as?Array.isArray(b.as)?b.as.join(" "):b.as:b.className||"",g=typeof w=="string"&&w.includes(p||"--ignore");return !C&&!g},y=>({fx:{...i,delay:(f||0)+y*(u||.1),when:l}})):e,[e,l,i]);return jsx(m,{className:"--group",ref:s,...a,children:v})});Pn.displayName="Zuz.Group";var Nm=Pn;var Nn=o=>typeof o=="string"&&o.includes("+"),Rn={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"},In={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 Bn=forwardRef(({children:o,keys:s,variant:e},t)=>{let r=useMemo(()=>{if(Nn(s)){let n=null;return {keys:String(s).split("+").reduce((a,c,l,i)=>(i[l+1]?a.push(c):n=c.toUpperCase(),a),[]),children:n}}return {keys:s,children:String(o).toUpperCase()}},[s]);return jsxs(m,{as:`--keyboard-keys --${e||U.Small} flex aic`,children:[(Array.isArray(r.keys)?r.keys:[r.keys]).map(n=>jsx("abbr",{title:In[n],children:Rn[n]},n)),jsx(j,{children:r?.children??o})]})});Bn.displayName="Zuz.KeyboardKeys";var fo=Bn;var kn=forwardRef((o,s)=>{let e=useNetworkStatus(),{onlineMessage:t,offlineMessage:r,variant:n}=o;return jsxs(m,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:e==false,curve:F.Spring,duration:.5,delay:2},className:`--network-manager --${e==true?"online":"offline"} --${n||U.Small} fixed flex`,children:[jsx(m,{className:"--ico",children:e?O[se.Success]:O[se.Error]}),jsx(H,{as:"--message",children:e?t||"internet connection restored :)":r||"no internet connection"})]})});kn.displayName="Zuz.NetWorkManager";var Mm=kn;var go=(e=>(e.Table="table",e.Gooey="gooey",e))(go||{});var Dn=forwardRef((o,s)=>{let{itemCount:e,itemsPerPage:t,startPage:r,pageRange:n,paginationStyle:p,breakLabel:a,prevLabel:c,nextLabel:l,hash:i,loading:f,seperator:u,renderOnZeroPageCount:d,onPageChange:v,...y}=o,b=useMemo(()=>toHash(numberInRange(4,8)),[]),C=useCallback(k=>`${toHash(k,i||6,b)}${u||""}${b}`,[b]),w=useMemo(()=>a||"...",[a]),[g,P]=useState({id:i?r?typeof r=="number"?C(r):r:1:r||1,label:r||1}),{style:L,className:R,rest:T}=N(y),I=useCallback(k=>typeof k=="number"?k:+k.label,[]);if(!e)throw new Error('"itemCount" prop is required');let _=useMemo(()=>Math.ceil(e/t),[e,t]),E=useMemo(()=>{let k=[],W=Math.max(I(g)-(n||2),1),G=Math.min(I(g)+(n||2),_);W>1&&k.push({id:i?C(1):1,label:1}),W>2&&k.push({id:-1,label:w});for(let V=W;V<=G;V++)k.push({id:i?C(V):V,label:V});return G<_-1&&k.push({id:-1,label:w}),G<_&&k.push({id:i?C(_):_,label:_}),k},[g]),Z=useCallback(k=>{let W=k;+W.label<1||+W.label>_||(P(W),v?.(W));},[e,t,g]);return E.length<=1&&(d??false)===false?null:jsxs(m,{ref:s,as:`--pagination --pgt-${p||"table"} flex aic w:100% jcc ${R}`,children:[jsx(m,{as:"flex flex:1 aic --pgt-btns",children:(E.length>1?E:[{id:1,label:1},{id:-1,label:w}]).map((k,W,G)=>jsx($,{disabled:k.id==-1||I(g)==+k.label,className:(typeof k=="string"?k:k.label)==I(g)?"--current-page":"",onClick:V=>Z(k),children:typeof k=="string"?k:k.label},`--pg-${W}-${k.id}`))}),jsx(m,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(I(g)-1)*t+1} - `,`${Math.min(I(g)*t,e)} of ${e} items`].join(" ")}),jsxs(m,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsx($,{disabled:I(g)<=1,onClick:k=>Z({id:i?C(I(g)-1):I(g)-1,label:I(g)-1}),children:O.chevronLeftOutline}),jsx($,{disabled:E.length<=1||I(g)==I(E[E.length-1]),onClick:k=>Z({id:i?C(I(g)+1):I(g)+1,label:I(g)+1}),children:O.chevronRightOutline})]})]})});Dn.displayName="Zuz.Pagination";var xo=Dn;var Vn=forwardRef((o,s)=>{let{strenthMeter:e,onChange:t,...r}=o;"type"in r&&delete r.type;let{style:n,className:p,rest:a}=N(r),[c,l]=useState(false),[i,f]=useState(""),u=useMemo(()=>checkPasswordStrength(i),[i]),d=useDebounce(v=>{e&&f(v.target.value),t&&t(v);},100);return useEffect(()=>{},[]),jsxs(m,{as:"w:100% flex cols",children:[jsxs(m,{style:n,className:"--password flex aic rel",children:[jsx(re,{ref:s,type:c?"text":"password",className:p,onChange:d,...a}),jsx($,{tabIndex:-1,onClick:()=>l(v=>!v),className:"--toggle flex aic jcc abs",children:c?O.eye:O.eyeSlash})]}),e&&jsxs(m,{as:`flex aic --password-meter --pb-score-${u.score}`,style:n,children:[jsxs(m,{as:"--password-bars flex aic",children:[jsx(m,{as:`--pbar ${u.score>=1?"--pb-on":""}`.trim()}),jsx(m,{as:`--pbar ${u.score>=2?"--pb-on":""}`.trim()}),jsx(m,{as:`--pbar ${u.score>=3?"--pb-on":""}`.trim()}),jsx(m,{as:`--pbar ${u.score>=4?"--pb-on":""}`.trim()}),jsx(m,{as:`--pbar ${u.score>=5?"--pb-on":""}`.trim()})]}),jsx(H,{as:"--password-meter-label","aria-hidden":true,children:u.result})]})]})});Vn.displayName="Zuz.Password";var Zm=Vn;var $n=forwardRef((o,s)=>{let{size:e,length:t,mask:r,...n}=o,p=useRef([]),a="pinput",c=false,l={};"with"in n&&(l={with:n.with},delete n.with),"type"in n&&delete n.type,"name"in n&&(a=n.name,delete n.name),"required"in n&&(c=true,delete n.required);let{style:i}=N(n),f=u=>{let d=u.currentTarget,v=p.current[parseInt(d.dataset.index)+1],y=p.current[parseInt(d.dataset.index)-1];d.value.length===1&&v?v.focus():d.value.length===0&&y&&y.focus();};return useEffect(()=>{p.current=p.current.slice(0,e||t);},[e||t]),jsx(m,{name:a,style:i,className:"--otp flex aic rel","data-required":c,"data-size":e||t||4,...l,children:Array(e||t||4).fill(1).map((u,d)=>jsx(re,{autoComplete:"new-password","data-index":d,ref:v=>{p.current[d]=v;},numeric:true,onChange:f,maxLength:1,placeholder:r?"\xB7":"0",type:r?"password":"text",...n},`pin-${d}`))})});$n.displayName="Zuz.PinInput";var Gm=$n;var _n=forwardRef((o,s)=>{let{children:e,className:t,name:r,required:n,type:p,value:a,variant:c,checked:l,onSwitch:i,...f}=o,[u,d]=useState(l||false),{variant:v}=oe(true),y=useRef(null);return jsxs(Ye,{className:`${t} --${(p||kt.Default).toLowerCase()} --radio${!p||p==kt.Default?"":"card"} --${c||v||U.Small} flex aic rel`.trim(),...f,children:[jsx(re,{ref:y,defaultChecked:u,value:a||"rd",type:"radio",className:"abs",name:r,required:n||false,onChange:b=>{i&&i(b.target.checked,a||"cb"),d(b.target.checked);}}),jsx(m,{className:"--dot rel",children:jsx(m,{className:"--rod abs abc"})}),jsx(m,{className:"--value",children:e})]})});_n.displayName="Zuz.Radio";var Qm=_n;var zn=forwardRef((o,s)=>{let{speed:e,style:t,...r}=o,{rootRef:n,containerRef:p,thumbY:a,thumbX:c,onScrollY:l,onScrollX:i}=useScrollbar(e||1),{style:f,className:u,rest:d}=N(r);return jsxs(m,{ref:n,className:u.trim(),as:"--scrollview rel",children:[jsx(m,{as:`--scroll-content ${u}`.trim(),ref:p,style:t||{},children:d.children}),jsx(m,{as:"--scroll-track --track-y --abs",children:jsx(m,{as:"--scroll-thumb --abs",ref:a,onMouseDown:l})}),jsx(m,{as:"--scroll-track --track-x --abs",children:jsx(m,{as:"--scroll-thumb --abs",ref:c,onMouseDown:i})})]})});zn.displayName="Zuz.ScrollView";var tc=zn;var Fn=forwardRef((o,s)=>{let{fx:e,withStyle:t,as:r,reverse:n=false,searchIcon:p=O.search,hideSearchIcon:a=false,clearIcon:c=O.close,hideClearIcon:l=false,onChange:i,onClear:f,...u}=o,{style:d,className:v}=N({as:o.as}),[y,b]=useState(""),C=useRef(null),w=useMemo(()=>jsx($,{tabIndex:-1,onClick:L=>P(),className:"--send flex aic jcc",variant:o.variant||U.Small,children:y!==""?!l&&(typeof c=="string"?jsx(X,{name:c,as:"--search-action"}):c):!a&&(typeof p=="string"?jsx(X,{name:p,as:"--search-action"}):p)}),[n,p,l,c,a]);"type"in o&&delete o.type;let g=L=>{b(L.target.value),i?.(L.target.value);},P=L=>{y.trim()!==""&&(b(""),i?.(""),C.current&&(C.current.value="",o.onConfirm?.("")));};return useImperativeHandle(s,()=>({focus:()=>C.current?.focus(),value:()=>C.current?.value})),useEffect(()=>{},[]),jsxs(m,{style:d,className:`--search ${n?"--search-rev":""} --${o.variant||U.Small} flex aic ${typeof o.as=="string"&&o.as.includes("abs")?"":"rel"} ${v}`.trim(),children:[n&&w,jsx(re,{ref:C,onChange:g,className:`--${o.variant||U.Small}`,...u}),o.shortcut&&jsx(fo,{keys:o.shortcut,as:"abs"}),!n&&w]})});Fn.displayName="Zuz.Search";var mc=Fn;var Kn=({value:o,updateValue:s,o:e})=>jsxs($,{onClick:t=>s(e),as:"--select-option-item",className:o&&(typeof e=="string"?e:e.value)==(typeof o=="string"?o:o.value)?"selected":"",children:[e.icon&&jsx(X,{name:e.icon,as:`--select-option-icon --icon-${e.value}`,color:e.iconColor||void 0}),jsx(H,{children:typeof e=="string"?e:e.label})]});Kn.displayName="Option";var Un=Kn;var Gn=forwardRef((o,s)=>{let {selected:e,options:t,label:r,name:n,variant:p,search:a,searchPlaceholder:c,maxHeight:l,arrowDownIcon:i=O.arrowDown,arrowUpIcon:f=O.arrowUp,onChange:u,...d}=o,[v,y]=useState(e?typeof e=="string"?t.find(V=>V.value===e):e:t[0]),[b,C]=useState(false),[w,g]=useState(null);useRef(null);let L=useRef(null),R=useRef(null),T=useId(),I=useMemo(()=>n||T,[]),{reposition:_}=Fe(R,{direction:Bt.Bottom,offset:2}),{variant:E}=oe(true),{className:Z,style:k,rest:W}=N(d),G=V=>{y(V),u&&u(V);};return useImperativeHandle(s,()=>({setSelected:V=>{if(typeof V=="string"){let S=t.find(D=>D.value===V);S&&y(S);}else y(V);},getValue:()=>v||null})),useEffect(()=>{document.body.addEventListener("click",V=>{C(false);}),window.dispatchEvent(new Event("resize"));},[]),useEffect(()=>{b?L.current&&L.current.focus():(L.current&&(L.current.value=""),g(null)),_();},[b]),jsxs(m,{className:`--select --${p||E} ${n?`--${n}`:""} rel`.trim(),name:I,children:[jsxs($,{"data-value":v?typeof v=="string"?v:v.value:v||"-1",className:`--selected flex aic rel ${Z}`.trim(),withLabel:false,style:k,onClick:V=>C(S=>!S),...W,children:[jsx(H,{className:"--label",children:v?typeof v=="string"?v:v.label:r||"Choose"}),jsx(m,{className:"--svg-arrow rel flex aic jcc",children:b?typeof f=="string"?jsx(X,{name:f,as:"--search-action"}):f:typeof i=="string"?jsx(X,{name:i,as:"--search-action"}):i})]}),jsxs(m,{id:I,className:"--options-list flex cols abs","aria-hidden":!b,style:{maxHeight:l||"auto"},ref:R,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:b,duration:.05},children:[a&&jsx(re,{ref:L,onChange:V=>{g(V.target.value==""?null:V.target.value);},className:"--select-search",placeholder:c||"Search..."}),(w==null?t:t.filter(V=>V.label.toLowerCase().includes(w.toLowerCase())||V.value.toLowerCase().includes(w.toLowerCase()))).map(V=>jsx(Un,{updateValue:G,value:v,o:V},`option-${(typeof V=="string"?V:V.label).replace(/\s+/g,"-")}-${typeof V=="string"?V:V.value}`))]})]})});Gn.displayName="Zuz.Select";var hc=Gn;var qn=forwardRef((o,s)=>jsx(Qe,{type:xe.Switch,...o,ref:s}));qn.displayName="Zuz.Switch";var yc=qn;var Yn=o=>{let{idx:s,id:e,as:t,weight:r,style:n,value:p,render:a,resize:c,sortBy:l,sortable:i,onSort:f}=o,[u,d]=useState(0),v=()=>{i&&(f?.(String(e),u==1?-1:1),d(y=>y==1?-1:1));};return jsxs(m,{style:{flex:r||1,...n},as:`--col flex aic ${t||""} ${i?"--sortable":""}`,onClick:v,children:[jsx(m,{children:p}),s==-1&&i&&l==e&&jsx(m,{as:"--arrow flex aib",children:u==1?O.arrowUp:O.arrowDown})]})};Yn.displayName="Zuz.Column";var Ct=Yn;var Jn=o=>{let{index:s,pubsub:e,schema:t,data:r,ids:n,styles:p,animate:a,sortBy:c,selectable:l,tableRef:i,loading:f,rowClassName:u,onSort:d,onRowClick:v,onSelect:y,onContextMenu:b}=o,C=useDelayed(),w=useMemo(()=>({transition:q.SlideInBottom,curve:F.EaseInOut,delay:.02*(s+1)}),[]),g=useRef(null),P=(R,T)=>{s==-1?e.emit(`ALL_ROWS_${R?"CHECKED":"UNCHECKED"}`,R):(y&&y(r,R),e.emit(`ROW_${R?"CHECKED":"UNCHECKED"}`,R,T));},L=(R,T,I)=>jsx(Ct,{idx:R,id:T,as:"--selector",pubsub:e,value:jsx(Qe,{value:I,ref:g,onSwitch:P,type:xe.Default})});return useEffect(()=>{let R=(E,Z)=>{g.current?.setChecked(E,false);},T=(E,Z)=>{let k=false;i?.current&&i.current.querySelectorAll(".--row").forEach(W=>{let G=W;if(!G.classList.contains("--row-head")){let V=G.querySelector(".--selector input[type=checkbox]");V&&V.checked&&!k&&(k=V.checked);}}),g.current.setChecked(k,false);},I=E=>{g.current?.setChecked(E,false),y&&y(r,E);},_=E=>{g.current?.setChecked(E,false),y&&y(r,E);};return s==-1?(e.on("ROW_CHECKED",R),e.on("ROW_UNCHECKED",T),()=>{e.off("ROW_CHECKED",R),e.off("ROW_UNCHECKED",T);}):(e.on("ALL_ROWS_CHECKED",I),e.on("ALL_ROWS_UNCHECKED",_),()=>{e.off("ALL_ROWS_CHECKED",I),e.off("ALL_ROWS_UNCHECKED",_);})},[]),jsxs(m,{onContextMenu:R=>b?b(R,r):null,onClick:R=>v?v(R,o.data):()=>{},...a?{fx:{...w,when:C}}:{},as:`--row flex aic ${v?"--row-clickable":""} ${s==-1?"--row-head":""} ${u||""}`,children:[s==-1&&t.map((R,T)=>{let{renderWhenHeader:I,render:_,value:E,...Z}=R;return jsxs(Fragment,{children:[l&&T==0&&L(-1,`--selector-${R.id}`,"all"),jsx(Ct,{idx:-1,onSort:d,sortBy:c,value:E,...Z,pubsub:e,style:p[R.id]})]},`--col-${R.id}`)}),f&&s>-1&&jsx(m,{as:"--col",children:jsx(H,{as:"opacity:0",children:"..."})}),!f&&s>-1&&n&&r&&t.map((R,T)=>jsxs(Fragment,{children:[l&&T==0&&L(T,`--selector-${R.id}`,R.id.toString()),n.includes(String(R.id))?jsx(Ct,{pubsub:e,idx:T,id:String(R.id),style:p[String(R.id)],value:R.render?R.render(r,s):r[String(R.id).includes(".")?String(R.id).split(".").reverse()[0]:R.id]}):null]},`--${String(R.id)}-val-${T}`))]})};Jn.displayName="Zuz.Row";var Tt=Jn;var os=(o,s)=>{let{schema:e,rows:t,rowCount:r,rowsPerPage:n,currentPage:p,pagination:a,paginationHash:c,showPaginationOnZeroPageCount:l,animateRows:i,header:f,rowClassName:u,selectableRows:d,hoverable:v,sortBy:y,loading:b,loadingRowCount:C,loadingMessage:w,spinner:g,emptyMessage:P,onSort:L,onRowClick:R,onRowSelectToggle:T,onPageChange:I,onRowContextMenu:_,...E}=o,Z=useRef(null),k=useMemo(()=>e.reduce((me,Q)=>(me[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}},me),{}),[e]),W=useMemo(()=>Object.keys(k),[e]),G=useMemo(()=>f??true,[f]),{style:V,className:S,rest:D}=N(E),A=useRef(null),K=useMemo(()=>new PubSub,[]),M=useRef(t.map(()=>uuid(8))),[z,Y]=useState(y||null),[te,J]=useState(w||"loading"),le=useMemo(()=>!b&&t&&t.length==0,[b,t]),ue=useCallback(()=>P?typeof P=="function"?jsx(P,{}):P:jsx(H,{as:"tac s:18 mt:75",children:"No Record Found"}),[b,t]);useEffect(()=>{M.current=t.map(()=>uuid(8));},[t]);let at=(me,Q)=>{Y(me),L?.(me,Q);},it=(r||(t?t.length:0))/(n||10),lt=useMemo(()=>l||it>1?jsx(xo,{hash:c,ref:Z,renderOnZeroPageCount:l,onPageChange:I,paginationStyle:"table",startPage:p,itemCount:r||(t?t.length:0),itemsPerPage:n||10}):null,[p,r]);return useImperativeHandle(s,()=>({setLoading(me){}})),jsxs(m,{as:`--table ${v??true?"--hoverable":""} flex cols rel ${S}`,ref:A,children:[G==true&&jsx(Tt,{sortBy:z,onSort:at,tableRef:A,pubsub:K,selectable:d,index:-1,schema:e,loading:true,styles:k}),b&&jsxs(m,{as:"center-x flex aic --table-spinner",children:[jsx(fe,{type:g||ie.Simple}),te&&jsx(H,{as:"--table-loading-message",children:te})]}),b&&Array(C||5).fill({}).map((me,Q)=>jsx(Tt,{tableRef:A,index:Q,pubsub:K,schema:e,styles:k,loading:true,animate:i,onRowClick:R},`--trow-loading-${Q}-${e[0].id}`)),!b&&t&&t.map((me,Q)=>jsx(Tt,{tableRef:A,pubsub:K,loading:false,index:Q,schema:e,ids:W,styles:k,animate:i,data:me,onRowClick:R,rowClassName:u,selectable:d,onSelect:T,onContextMenu:_},`--trow-${M.current[Q]||Q}-${e[0].id}`)),le&&ue(),jsx(m,{"aria-hidden":!a||!lt,...i?{fx:{transition:q.SlideInBottom,curve:F.EaseInOut,delay:.02*(t.length+1),when:!b&&t&&a&&lt!=null}}:{},as:"--row flex aic --row-footer",children:a&&lt?lt:null})]})};os.displayName="Zuz.Table";var Lc=forwardRef(os),kc=Lc;var rs=({isActive:o,transitionType:s,speed:e,width:t,render:r,content:n,onHeightChange:p})=>{let a=useRef(null),c=useResizeObserver(a);useEffect(()=>{o&&c.height>0&&p(c.height);},[o,c.height]);let l=useMemo(()=>{let i={flexShrink:0,height:"fit-content"};return s==="fade"?{...i,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,visibility:o?"visible":"hidden",transition:`opacity ${e}s ease-in-out`,zIndex:o?1:0}:s==="scale"?{...i,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,transform:`scale(${o?1:.95})`,transition:`all ${e}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:o?1:0}:i},[o,s,t,e]);return jsx(m,{ref:a,style:{...l},className:"--content",children:r||o?n:null})};rs.displayName="Zuz.TabBody";var ns=rs;var is=({ref:o,...s})=>{let{tabs:e,speed:t=.3,prerender:r=true,variant:n,tabStyle:p="fixed",onChange:a,transitionType:c="slide",...l}=s,[i,f]=useState(0),u=useRef(null),d=useResizeObserver(u),v=useMemo(()=>uuid(8),[]),[y,b]=useState("auto"),C=useMemo(()=>d.width>0,[d.width]);useImperativeHandle(o,()=>({setTab:T=>f(T)}));let w=useMemo(()=>e.map(T=>({...T,key:T.key||uuid(8)})),[e]),{style:g,className:P,rest:L}=N({as:`flex cols w-full no-overflow ${l.as||""}`,...l}),R=()=>{if(!C)return {opacity:0};switch(c){case "fade":return {display:"grid",gridTemplateColumns:"1fr"};case "scale":return {display:"grid",gridTemplateColumns:"1fr"};default:return {display:"flex",transform:`translate3d(-${i*d.width}px, 0, 0)`,transition:`transform ${t}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxs(m,{ref:u,style:g,className:`--tabview --${p} flex cols ${P}`,children:[jsx(Je,{as:"--tabview-head",onSwitch:T=>{f(T.index);let I=w.find(_=>_.tag==T.tag);I&&I.onSelect&&(I.onSelect(I,T.index),a?.(I,T.index));},selected:i,items:w.reduce((T,I,_)=>(T.push({icon:I.icon,index:_,label:I.label,tag:I.tag}),T),[])}),jsx(m,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:y,transition:C?`height ${t}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:C?1:0},children:jsx(m,{className:"--track",style:{...R()},children:w.map((T,I)=>jsx(ns,{isActive:I===i,transitionType:c,speed:t,width:d.width,render:r||I===i,onHeightChange:_=>I===i&&b(_),content:T.body},`tab-body-${T.key||I}-${v}`))})})]})};is.displayName="Zuz.TabView";var zc=is;var Zc=({meta:o})=>jsxs($,{as:"flex aic --command-item",children:[o.icon&&jsx(X,{name:o.icon,as:"--command-icon"}),jsx(H,{children:o.label})]}),Kc=({position:o,onSelect:s,commands:e,visible:t})=>jsx(m,{"aria-hidden":!t,fx:{transition:q.SlideInBottom,duration:.1,when:t},className:"--command-box abs grid",style:{...o},children:e.map(r=>jsx(Zc,{meta:r},`cmd-${r.label.replace(/\s+/,"-")}`))}),ls=Kc;var ps=forwardRef((o,s)=>{let{autoResize:e,maxHeight:t,variant:r=U.Small,resize:n="none",command:p,commands:a,onInput:c,cmd:l,renderDropdown:i,value:f,defaultValue:u,...d}=o,v=useRef(null),y=useRef(null),{style:b,className:C,rest:w}=N(d),{showDropdown:g,dropdownPosition:P,handleKeyDown:L,handleInput:R,handleCommandSelect:T}=useCommandActions({command:p,commands:a,cmd:l,ref:v}),I=useCallback(()=>{let E=v.current;!E||!e||(y.current&&cancelAnimationFrame(y.current),y.current=requestAnimationFrame(()=>{E.style.height="auto";let Z=E.scrollHeight;if(t){let k=parseInt(t.toString(),10);isNaN(k)||(Z=Math.min(Z,k));}E.style.height=`${Z}px`,E.style.overflowY=t&&Z>=parseInt(t.toString(),10)?"auto":"hidden";}));},[e,t]),_=E=>{c?.(E),R(E),I();};return useEffect(()=>{I();},[f,u,I]),useEffect(()=>{e&&v.current&&I();},[e,I]),useEffect(()=>()=>{y.current&&cancelAnimationFrame(y.current);},[]),jsxs(m,{as:"rel",children:[jsx("textarea",{className:`--input --textarea --${r} flex ${C}`.trim(),style:{...b,resize:n,height:e?"auto":b?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:L,onInput:_,ref:E=>{typeof s=="function"?s(E):s&&(s.current=E),v.current=E;},value:f,defaultValue:u,...w}),i?i({show:g,position:P,commands:a||[],onSelect:T}):a&&a.length>0&&jsx(ls,{visible:g,commands:a,onSelect:T,position:P})]})});ps.displayName="Zuz.TextArea";var Xc=ps;var fs=forwardRef((o,s)=>{let{as:e,value:t,color:r,direction:n,...p}=o,a=useRef(null),[c,l]=useState(t||0);return useImperativeHandle(s,()=>({updateValue(i){c.toString().length!==i.toString().length&&l(i);},setValue(i){if(this.updateValue(i),a.current){let f=i.toString().split("");a.current.querySelectorAll(".--wheel-char").forEach((u,d)=>{let v=f[d];if(u instanceof HTMLElement){u.setAttribute("data-value",v);let y=u.querySelector(".--wheel-char-track");y instanceof HTMLElement&&(y.style.setProperty("--v",v),y.offsetWidth);}});}}})),useEffect(()=>{l(t||0);},[t]),jsxs(m,{className:"--text-wheel flex aic rel","aria-hidden":true,as:e,ref:a,...p,children:[(c||0).toString().split("").map((i,f)=>isNaN(parseInt(i,10))?jsx(j,{className:"--wheel-char wheel-char-symbol grid",children:i},`wheel-char-symbol-${f}`):jsx(j,{"data-value":i,className:`--wheel-char grid ${f>(c||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxs(j,{className:`--wheel-char-track --wheel-track-${n||"down"} grid`,style:{"--v":i},children:[jsx(j,{children:!n||n==="down"?0:9}),(!n||n==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((u,d)=>jsx(j,{children:u},`${f}--${d}`)),jsx(j,{children:!n||n==="down"?9:0})]})},`wheel-char-${f}`)),r&&jsx(m,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${r}, transparent, transparent, transparent, ${r})`}})]})});fs.displayName="Zuz.TextWheel";var op=fs;var xs=forwardRef((o,s)=>{let{title:e,position:t,margin:r,children:n,...p}=o,{style:a,className:c,rest:l}=N(p),[i,f]=useState(false),u=useMemo(()=>t||ee.Top,[]),d=useRef(null),v=useRef(null),y=g=>{},b=typeof ResizeObserver<"u"?new ResizeObserver(y):{observe:()=>{},unobserve:()=>{}},C=useDimensions(),w=useMemo(()=>{if(!v.current)return {left:0,top:0};let g=v.current.previousElementSibling;if(g){let P=g.getBoundingClientRect();switch(b.observe(g),u){case ee.Top:return {left:P.left+P.width/2,top:P.top-(r||25)};case ee.Bottom:return {left:P.left+P.width/2,top:P.top+(r||25)};case ee.Left:return {left:P.left-P.width/2,top:P.top+P.height/2};case ee.Right:return {left:P.right,top:P.top+P.height/2};default:return {left:0,top:0}}}},[v.current,C,b]);return useEffect(()=>{},[]),jsxs(m,{ref:d,className:"--with-tooltip rel",onMouseEnter:g=>f(true),onMouseLeave:g=>f(false),children:[n,jsx(m,{ref:v,style:{left:w?.left+"px",top:w?.top+"px"},className:`--tooltip --${t||ee.Top} fixed ${c}`.trim(),fx:{from:u==ee.Bottom||u==ee.Top?{opacity:0,x:"-50%",y:u==ee.Top?-5:5}:{opacity:0,y:"-50%",x:u==ee.Right?15:-25},to:u==ee.Bottom||u==ee.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:u==ee.Right?10:-20},curve:F.EaseInOut,when:i},children:jsx(H,{className:"--text rel",children:e})})]})});xs.displayName="Zuz.ToolTip";var ip=xs;var No=forwardRef((o,s)=>{let{as:e,meta:t,nodes:r,icons:n,onSelect:p,treeTag:a,selected:c,roots:l,expanded:i,...f}=o,{tag:u,label:d,icon:v,under:y,isHead:b}=t,C=useMemo(()=>l.includes(u),[l]),[w,g]=useState(i),P=()=>{localStorage.setItem(`--tn${a}-${u}`,w?"0":"1"),g(!w);};useEffect(()=>{i||C&&!localStorage.getItem(`--tn${a}-${u}`)?(localStorage.setItem(`--tn${a}-${u}`,"1"),g(true)):g(localStorage.getItem(`--tn${a}-${u}`)=="1");},[]);let L=useMemo(()=>r.filter(R=>R.under==u),[r,u]);return jsxs(m,{className:`--treenode ${C?"--is-root":""} --treenode-${u} flex cols`,children:[jsxs(m,{className:`--node --node-${u} flex aic ${c==u?" --selected":""}`,children:[jsx($,{skeleton:f.skeleton,onClick:P,className:"--node-aro-btn",disabled:L.length==0,children:n?.arrowClose&&n?.arrowOpen?jsx(X,{skeleton:f.skeleton,className:"--node-aro-icon",name:L.length==0?n?.arrowDisabled||n?.arrowClose:w?n?.arrowOpen:n?.arrowClose}):L.length==0?O.chevronBottom:w?O.chevronBottom:O.chevronRight}),jsxs($,{className:"--node-meta flex aic",onClick:R=>p(u),children:[(n?.nodeOpen&&n?.nodeClose||C&&n?.rootOpen&&n?.rootClose)&&jsx(X,{skeleton:f.skeleton,className:`--node-icon ${C?"--icon-root":""}`,name:v||(w?C&&n?.rootOpen||n.nodeOpen:C&&n?.rootClose||n?.nodeClose)}),jsx(H,{className:`--node-label ${C?"--node-label-root":""}`.trim(),skeleton:f.skeleton,children:d})]})]}),w&&L.length>0&&jsx(m,{className:`--sub-node tree-sub-node-${u} flex cols`,children:L.map(R=>jsx(No,{treeTag:a,selected:c,onSelect:p,icons:n,roots:l,expanded:R.expanded||false,meta:R,nodes:r},`--node-${R.tag}`))})]})});No.displayName="TreeItem";var bs=No;var ws=forwardRef((o,s)=>{let{as:e,nodes:t,onNodeSelect:r,tag:n,icons:p,roots:a,selected:c,...l}=o,[i,f]=useState(c);useImperativeHandle(s,()=>({getSelected:()=>i}),[r]);let u=d=>{f(d),r&&r(d);};return useEffect(()=>{i!=c&&f(c);},[c]),jsx(m,{className:"--treeview flex cols",children:t.filter(d=>a.includes(d.tag)).map(d=>jsx(bs,{treeTag:n?`-${n}`:"",selected:i,onSelect:v=>u(v),icons:p,meta:d,roots:a,expanded:d.expanded||false,skeleton:l.skeleton,nodes:t},`--node-${d.tag}`))})});ws.displayName="Zuz.TreeView";var hp=ws;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
13
- export{se as ALERT,Et as AVATAR,Ma as Accordion,$a as ActionBar,Fa as Alert,ni as AutoComplete,fi as Avatar,gi as Badge,m as Box,Zi as Bubble,Ar as BubbleMediaType,Vr as BubbleStatus,$ as Button,Mr as CHART,xe as CHECKBOX,bp as COLORTHEME,Qt as Calendar,Hi as Chart,Qe as CheckBox,el as CodeBlock,gl as ColorScheme,Sl as ContextMenu,Il as CookiesConsent,Ee as Cover,Hl as CropShape,Ol as Cropper,Al as Crumb,wp as DATATYPE,ke as DIALOG,Bo as DIALOG_ACTION_POSITION,be as DRAWER_SIDE,Fl as DatePicker,At as Dialog,la as DialogProvider,Ql as Drawer,pt as FILTER,ye as FORMVALIDATION,Sp as FORMVALIDATION_STYLE,em as Fab,rm as Filters,ym as Form,Nm as Group,X as Icon,qe as Image,re as Input,fo as KeyboardKeys,In as KeysLabelMap,Rn as KeysMap,Ye as Label,We as List,Mm as NetworkStatus,Ie as Overlay,Bt as POSITION,Tp as PROGRESS,xo as Pagination,go as PaginationStyle,Zm as Password,Gm as PinInput,ee as Position,jt as ProgressBar,kt as RADIO,Qm as Radio,ae as SHEET,Lt as SHEET_ACTION_POSITION,yp as SKELETON,ct as SLIDER,vp as SORT,ie as SPINNER,tc as ScrollView,mc as Search,hc as Select,Je as SelectTabs,lm as Sheet,no as Slider,j as Span,fe as Spinner,Cp as Status,yc as Switch,q as TRANSITIONS,F as TRANSITION_CURVES,zc as TabView,kc as Table,H as Text,op as TextWheel,Xc as Textarea,Vs as ThemeProvider,ir as ToastDefaultTitle,wa as ToastProvider,zt as ToastType,ip as ToolTip,hp as TreeView,U as Variant,Kp as _buildWithStyles,ze as animationTransition,Mt as buildClassString,Mo as buildWithStyles,Zp as css,Ot as getAnimationCurve,Up as getAnimationTransition,Ss as getZuzMap,Nn as isKeyCombination,ko as setZuzMap,N as useBase,Ra as useContextMenu,ua as useDialog,Re as useFx,Fe as usePosition,Zt as useToast};
8
+ document.documentElement.style.colorScheme = theme;`}}),jsx(Wo,{children:t})]})},Ko=(t,n)=>{if(Fs)return;let e;try{e=localStorage.getItem(t)||void 0;}catch{}return e||n};var qo=forwardRef((t,n)=>{let{name:e,pathCount:r,variant:o,color:s,...u}=t,{variant:m}=ee(true),{className:p,style:i,rest:a}=N(u);return jsx("div",{style:{color:s,...i},className:`icon-${e} --icon --${o||m||W.Small} ${p}`.trim(),ref:n,...a,children:Array(r||0).fill(0).map((f,c)=>jsx(Q,{className:`path${c+1}`},`${e}-layer-${c}`))})});qo.displayName="Zuz.Icon";var X=qo;var me={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Xo=t=>{let {type:n,variant:e,width:r,speed:o,color:s,background:u,foreground:m,...p}=t,{className:a,style:f,rest:c}=N(p);return jsx(l,{className:`${a} --spinner --${(n||me.Simple).toLowerCase()} --${e}`.trim(),style:{...f},...c})};Xo.displayName="Zuz.Spinner";var ge=Xo;var gt={Loading:"loading",Normal:"normal"};var Qo=({ref:t,...n})=>{let{reset:e,variant:r,icon:o,iconSize:s,children:u,withLabel:m,spinner:p,state:i,disabled:a,...f}=n,{style:c,className:d,rest:b}=N(f),{variant:h}=ee(true);return jsxs("button",{className:`--button --${r||h} flex aic ${e?"":"jcc"} ${o?"ico-btn":""} ${d}`.trim().replace(/\s+/g," "),style:c,ref:t,disabled:i==gt.Loading||n.skeleton?.enabled||a,...b,children:[i==gt.Loading&&jsx(ge,{variant:r||h,type:p||me.Simple}),(!i||i==gt.Normal)&&jsxs(Fragment$1,{children:[o&&jsx(X,{variant:s,name:o}),m===true?jsx(Q,{children:u}):u]})]})};Qo.displayName="Zuz.Button";var z=Qo;var Xs={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"})," "]}),[ie.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"})}),[ie.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"})}),[ie.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"})}),[ie.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"})}),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"})]})},k=Xs;var Ys=({title:t="Alert",onClose:n})=>jsxs(l,{as:"--head flex aic rel",children:[jsx(l,{as:`--${t?"title":"dot"} flex aic jcc rel`,children:t}),jsx(z,{onClick:e=>n(),className:"--closer abs center-v",children:k.close})]}),jo=Ys;var Js=({action:t,render:n=true,message:e=""})=>jsx(l,{as:`--body flex aic rel ${t?"":"--no-action"}`.trim(),children:n?e:null}),er=Js;var ea=({action:t,actionPosition:n,dialogID:e,variant:r})=>jsx(l,{as:`--footer flex aic rel ${n?n==Do.Center?"jcc":"":"jce"}`.trim(),children:t.map((o,s)=>jsx(z,{variant:r,onClick:u=>o.handler?o.handler():o.onClick?o.onClick():console.log("onClick Handler missing"),as:"--action",children:o.label},`dialog-${e}-action-${o.key}`))}),or=ea;var nr=forwardRef((t,n)=>{let{h:e,html:r,children:o,lines:s,...u}=t,{style:m,className:p,rest:i}=N(u),a=`h${t.h||1}`;return jsx(a,{ref:n,style:m,className:p,...i,children:r?jsx(Q,{dangerouslySetInnerHTML:{__html:r}}):o})});nr.displayName="Zuz.Text";var H=nr;var ar=forwardRef((t,n)=>{let{message:e,spinner:r,spinnerSize:o,color:s,when:u,hideMessage:m,...p}=t,{className:i,style:a,rest:f}=N(p);return "when"in t&&t.when==false?null:jsxs(l,{className:`--cover flex aic jcc cols abs fillx nope nous ${i}`.trim(),style:{...a,backgroundColor:"var(--cover-bg)"},...f,children:[jsx(ge,{variant:o||W.Small,type:r||me.Simple}),!m&&jsx(H,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});ar.displayName="Zuz.Cover";var Be=ar;var mr=({ref:t,...n})=>{let{index:e,id:r,title:o,message:s,transition:u,curve:m,speed:p,type:i,action:a,actionPosition:f,spinner:c,loadingMessage:d,variant:b,onClose:h,onShow:v,onHide:R,...C}=n,g=useMemo(()=>uuid(12),[]),[S,E]=useState(o||""),[P,w]=useState(s||""),[I,D]=useState(i||De.Dialog),[B,_]=useState(false),[L,G]=useState(true),[U,V]=useState(a||null),[T,A]=useState(false),{variant:$,spinner:K,dialog:O}=ee(true),F=b||O?.variant||$||W.Small,{style:Y,className:oe,rest:j}=N(C),ce=useRef(null),de=se({when:B,duration:p||O?.speed||.3,delay:O?.delay||.1,transition:u||O?.transition||q.SlideInBottom,curve:m||O?.curve||Z.EaseInOut});return useEffect(()=>{D(De.Dialog),w(s),E(S),U&&V(U.reduce((lt,mt)=>(lt.push({...mt,key:mt.key||uuid(12)}),lt),[])),_(true),setTimeout(()=>v?v():()=>{},1e3);},[]),jsxs(Fragment$1,{children:[jsx(Ee,{when:B}),jsxs(l,{as:`--dialog --${(i??De.Default).toLowerCase()} ${B?"--visible":""} ${oe} fixed abc`.trim(),style:de.style,...j,ref:ce,children:[jsx(Be,{when:T,spinner:c||O?.spinner||K?.type||me.Simple,message:d||O?.loadingMessage}),jsx(jo,{title:S,onClose:()=>{h(r),_(false);}}),jsx(er,{message:P,render:L,action:U}),U&&jsx(or,{variant:F,action:U,dialogID:g,actionPosition:f})]})]})};mr.displayName="Zuz.Dialog";var zt=mr;var cr=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(cr||{}),pr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var ma=({index:t,id:n,type:e,icon:r,title:o,message:s,duration:u,onClose:m})=>{let p=useDelayed(),i=useDelayed(((u||4)-1)*1e3),{toast:a}=ee(true),f=se({when:p&&!i,duration:a?.duration||.2,transition:q.SlideInTop,curve:a?.curve||Z.EaseInOut});return useEffect(()=>{console.log("--expired",i,n),i&&n&&m?.(n);},[i,n]),jsxs(l,{as:`--snack --${e} --snack-${n} ${t>2?"--snacked":""} flex aic`,style:f.style,children:[jsx(l,{as:"--ico flex aic jcc",fx:{transition:q.ScaleIn,curve:Z.Spring,delay:.2,when:p&&!i},children:r?jsx(X,{name:r,fx:{transition:q.ScaleIn,curve:Z.Spring,delay:.4,duration:.5,when:p&&!i}}):jsx(l,{as:"--no-icon",fx:{transition:q.ScaleIn,curve:Z.Spring,delay:.4,duration:.5,when:p&&!i}})}),jsxs(l,{as:"--meta",children:[jsx(H,{as:"--tt",fx:{transition:q.SlideInTop,curve:Z.Spring,delay:.3,when:p},children:o||pr[e]}),jsx(H,{as:"--tm",fx:{transition:q.SlideInTop,curve:Z.Spring,delay:.4,duration:.5,when:p},children:s})]})]})},_t=ma;var Ft=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(n){return this.stack[this.stack.length-1]===n}push(n){this.stack.includes(n)||(this.stack.push(n),this.updateScrollLock());}pop(n){this.stack=this.stack.filter(e=>e!==n),this.updateScrollLock();}handleEscape(){let n=this.stack[this.stack.length-1];return n?(n(),true):false}get count(){return this.stack.length}},Xe=new Ft;var xr=({ref:t,...n})=>{let{id:e,index:r,from:o,speed:s,children:u,margin:m,animation:p,prerender:i,onClose:a,...f}=n,{drawer:c}=ee(true),[d,b]=useState(u),[h,v]=useState(false),[R,C]=useState(i??(c?.prerender||true)),g=()=>{v(false),a?.(e??-1);},{className:S,style:E,rest:P}=N(f),w=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Xe.isTop(g)&&g();}}],[h]);useShortcuts(w),useEffect(()=>{b(u);},[u]),useEffect(()=>(h?Xe.push(g):Xe.pop(g),()=>Xe.pop(g)),[h]),useEffect(()=>{v(true);},[]);let I=o||c?.from||ne.Left,D=useMemo(()=>{switch(I){case ne.Left:return {from:{x:"-100vw"},to:{x:0}};case ne.Right:return {from:{x:"100vw"},to:{x:0}};case ne.Top:return {from:{y:"-100vh"},to:{y:0}};case ne.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,c?.from]),B=se({from:{...D.from,opacity:0},to:{...D.to,opacity:1},when:h,curve:p||c?.animation||Z.EaseInOut,duration:s||c?.speed||.5});return jsxs(Fragment$1,{children:[jsx(Ee,{onClick:_=>{h&&g();},when:h}),jsxs(l,{ref:t,"aria-hidden":!h,className:`--drawer flex cols ${S} --${I.toLowerCase()} fixed`,style:{...E,...B.style,"--m":`${m||c?.margin||0}px`},...P,children:[o==ne.Top||o==ne.Bottom?jsx(l,{className:"--handle"}):null,R||h?d:null]})]})};xr.displayName="Zuz.Drawer";var Ut=xr;var fa=t=>{let{label:n,labelColor:e,icon:r,iconColor:o,index:s,className:u,onSelect:m}=t;return n=="-"?jsx(l,{className:"--line"}):jsxs(z,{reset:true,onClick:p=>m(),className:`--item ${u||""}`.trim(),children:[jsx(l,{as:"--icon",children:jsx(X,{name:r,className:"--ico",style:o?{color:o}:{}})}),jsx(H,{className:"--lbl flex aic",style:e?{color:e}:{},children:n})]})},yr=fa;var wr=({ref:t,...n})=>{let{id:e,as:r,offsetX:o,offsetY:s,parent:u,event:m,when:p,items:i,header:a,footer:f,origin:c=Ke.TopRight,...d}=n,[b,h]=useState(false),[v,R]=useState(i||[]),{position:C,targetRef:g,calculatedAnchor:S}=useAnchorPosition(u?.current,m,{offsetX:o,offsetY:s,preferredAnchor:c});useEffect(()=>{p&&C.top!==0?h(true):p||h(false);},[p,C]);let{className:E,style:P,rest:w}=N(d),I=se({from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0},curve:Z.EaseInOut,duration:.05,when:b});return jsxs(l,{className:`--contextmenu abs flex cols ${E}`.trim(),"aria-hidden":!b,style:{...P,...I.style,top:C.top,left:C.left,overflow:"hidden",transformOrigin:S},...w,children:[typeof a=="function"?createElement(a):a,v.map((D,B)=>jsx(yr,{...D,index:B},`context-${D.label.toLowerCase()}-${B}`)),typeof f=="function"?createElement(f):f]})};wr.displayName="Zuz.ContextMenu";var Wt=wr;var xe=createContext(null),Pa=({ref:t,...n})=>{let[e,r]=useState(null),[o,s]=useState(false),[u,m]=useState([]),p=useDelayed(),i=useRef(0),a=()=>++i.current,f=()=>{s(false),setTimeout(()=>r(null),200);};useImperativeHandle(t,()=>({add(d){let b=a(),h={id:b,...d};return m(v=>[h,...v.slice(0,20)]),b},openMenu(d){s(false),setTimeout(()=>{r({id:a(),type:"menu",props:d}),s(true);},16);},remove(d){m(b=>b.filter(h=>h.id!==d)),e?.id===d&&f();},clear(){m([]);}})),useEffect(()=>{if(e&&o){let d=()=>f();return document.addEventListener("click",d),()=>document.removeEventListener("click",d)}},[e,o,f]);let c=d=>{setTimeout(()=>{m(b=>b.filter(h=>h.id!==d)),e?.id===d&&r(null);},1e3);};return p?createPortal(jsxs(l,{as:"--zuz-layers-wrapper fixed fill nope",children:[jsx(l,{as:"--zuz-layer-dialogs fixed fill nope",children:u.filter(d=>d.type=="dialog").map((d,b)=>jsx(zt,{onClose:c,index:b,id:d.id,...d.props},`layer-${d.type}-${d.id}`))}),jsx(l,{as:"--zuz-layer-drawers fixed fill nope",children:u.filter(d=>d.type=="drawer").map((d,b)=>jsx(Ut,{onClose:c,index:b,id:d.id,...d.props},`layer-${d.type}-${d.id}`))}),jsx(l,{as:"--zuz-layer-toasts fixed fill nope",children:u.filter(d=>d.type=="toast").map((d,b)=>jsx(_t,{onClose:c,index:b,id:d.id,...d.props},`layer-${d.type}-${d.id}`))}),jsx(l,{as:"--zuz-layer-menus fixed fill nope",children:e&&jsx(Wt,{onClose:f,when:o,...e.props},`menu-${e.id}`)})]}),document.body):null},Ra=({children:t})=>{let n=useRef(null),e=useMemo(()=>({add:r=>n.current?.add(r),openMenu:r=>n.current?.openMenu(r),remove:r=>n.current?.remove(r),clear:()=>n.current?.clear()}),[n.current]);return jsxs(xe.Provider,{value:e,children:[t,jsx(Pa,{ref:n})]})},Wo=Ra;var Ia=()=>{let t=useContext(xe);if(!t)throw new Error("useDialog must be used inside <ThemeProvider>");return {clearAll:()=>t.clear(),show:o=>t.add({type:"dialog",props:{...o,type:De.Dialog}}),hide:o=>t.remove(o)}},Ea=Ia;var La=()=>{let t=useContext(xe);if(!t)throw new Error("useToast must be used inside <ToastProvider>");let n=(i,a)=>t.add({type:"toast",props:{...a,type:i}});return {show:(i,a,f,c)=>n("default",{title:i,message:a,icon:f,duration:c}),hide:i=>t.remove(i),success:(i,a,f,c)=>n("success",{title:i,message:a,icon:f,duration:c}),error:(i,a,f,c)=>n("error",{title:i,message:a,icon:f,duration:c}),warn:(i,a,f,c)=>n("warn",{title:i,message:a,icon:f,duration:c}),promise:(i,a,f,c)=>n("promise",{title:i,message:a,icon:f,duration:c}),clearAll:()=>t.clear()}},qt=La;var Oa=()=>{let t=useContext(xe);if(!t)throw new Error("useDialog must be used inside <ThemeProvider>");let n=()=>t.clear(),e=o=>t.remove(o),r=o=>t.add({type:"drawer",props:o});return {clearAll:n,open:o=>r({children:o}),right:o=>r({children:o,from:ne.Right}),left:o=>r({children:o,from:ne.Left}),top:o=>r({children:o,from:ne.Top}),bottom:o=>r({children:o,from:ne.Bottom}),close:e}},ka=Oa;var Ha=(t,n,e={})=>{let[r,o]=useState(null),[s,u]=useState(false),{duration:m=.25,curve:p=Z.EaseOutBack,borderRadius:i={from:40,to:24},targetWidth:a=320}=e;return useLayoutEffect(()=>{n&&t.current?(o(t.current.getBoundingClientRect()),u(true)):n||u(false);},[n,t]),{style:se({from:{opacity:0,width:r?.width,height:r?.height,borderRadius:i.from},to:{opacity:1,width:a,height:"auto",borderRadius:i.to},curve:p,duration:m,when:s&&n}).style,isMeasured:s,sourceRect:r}},Aa=Ha;var $a=()=>{let t=useContext(xe);if(!t)throw new Error("useContextMenu must be used inside <ThemeProvider>");return {showContextMenu:(r,o,s)=>{r.preventDefault(),t.openMenu({event:r,items:o,origin:s});},showMenu:(r,o,s)=>{t.openMenu({parent:r,items:o,origin:s||Ke.TopCenter});},hide:t.clear}},za=$a;var Pr=({ref:t,style:n,...e})=>{let r=useRef(null),o=useMemo(()=>t&&typeof t!="function"&&t.current?t:r,[t]),{style:s,className:u,rest:m}=N(e,o);return jsx("div",{ref:t||r,style:{...s,...n||{}},className:u,...m})};Pr.displayName="Zuz.Box";var l=Pr;var Nr=forwardRef((t,n)=>{let{title:e,message:r,...o}=t,[s,u]=useState(false);return jsxs(l,{className:"--accordion flex cols",...o,children:[jsxs(z,{onClick:m=>u(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsx(H,{className:"--label flex",children:e}),jsx(l,{className:"--arrow flex",children:s?k.arrowUp:k.arrowDown})]}),s&&jsx(l,{className:"--detail",children:r})]})});Nr.displayName="Zuz.Accordion";var Wa=Nr;var Ga=({label:t,icon:n,onClick:e,idx:r,selected:o})=>jsx(z,{onClick:e,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${r}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsx(X,{name:n}):n}),Er=Ga;var Br=forwardRef((t,n)=>{let{items:e,name:r,selected:o,position:s,...u}=t,m=useRef(null),[p,i]=useState(o||e[0].tag||0),a=useCallback(({x:v,y:R})=>{if(m.current){let C=m.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${v-C.left}`),document.documentElement.style.setProperty("--tip-y",`${R-C.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=useCallback(()=>{m.current&&(m.current.removeEventListener("pointerleave",f),m.current.removeEventListener("pointermove",a),document.documentElement.style.setProperty("--tip-s","0"));},[]),c=useCallback(()=>{m.current&&(m.current.addEventListener("pointerleave",f),m.current.addEventListener("pointermove",a));},[]);useEffect(()=>{m.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((v,R)=>R.label.length>v.length?R.label:v,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),m.current?.addEventListener("pointerenter",c));},[]);let{className:d,style:b,rest:h}=N(u);return jsxs(l,{ref:m,style:b,className:[`--actionbar flex aic ${d}`,`${!s||s==te.Auto?"rel":`--${s}`}`].join(" ").trim(),...h,children:[e.map((v,R)=>jsx(Er,{selected:p===v.tag||o==R,...v,idx:R},`actionbar-action-${v.label.toLowerCase().replace(/\s+/g,"-")}`)),jsx(l,{className:"--tip abs",children:jsx(l,{className:"--track flex aic",children:e.map(({label:v})=>jsx(l,{className:"--lb",children:v},`tool-tip-${v.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Br.displayName="Zuz.ActionBar";var Ja=Br;var Mr=forwardRef((t,n)=>{let{type:e,icon:r,title:o,message:s,iconSize:u,...m}=t,{className:p,style:i,rest:a}=N(m);return jsxs(l,{className:`--alert --${e||ie.Info} flex aic ${p}`.trim(),style:i,...a,children:[jsx(l,{className:`--icon icon-${r||"auto-matic"}`,style:u?{fontSize:u,width:u,height:u}:{},children:!r&&k[e||ie.Info]}),jsxs(l,{className:"--meta flex cols",children:[jsx(H,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsx(H,{className:"--message",h:2,children:s})]})]})});Mr.displayName="Zuz.Alert";var ti=Mr;var Or=({ref:t,...n})=>{let{variant:e,numeric:r,onConfirm:o,...s}=n,{style:u,className:m,rest:p}=N(s),{variant:i}=ee(true),a=f=>{r&&(f.currentTarget.value=f.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsx("input",{className:`--input --${e||i} flex ${m}`.trim(),style:u,onInput:a,onKeyDown:f=>{f.key=="Enter"&&o?.(f.currentTarget.value);},ref:t,...p})};Or.displayName="Zuz.Input";var re=Or;var Dr=t=>{let{meta:n,children:e}=t,r=useDelayed(),{label:o,icon:s,...u}=isValidElement(n)?{}:n,{className:m,style:p,rest:i}=N({...u,...u.animate?{animate:{...u.animate,when:r}}:{}});return isValidElement(n)?jsx("li",{style:p,className:m,children:n}):jsxs("li",{style:p,className:m,...i,children:[e,typeof n=="string"?n:o]})};Dr.displayName="Zuz.ListItem";var Hr=Dr;var Vr=forwardRef((t,n)=>{let{items:e,variant:r,direction:o,seperator:s,ol:u,...m}=t,{className:p,style:i,rest:a}=N(m),f=u==true?"ol":"ul";return createElement(f,{className:`--list --${r||W.Small} flex ${o??"cols"} ${p}`.trim(),style:i,ref:n,...a,children:e.map((c,d,b)=>{let h=`${typeof c=="string"?`li-${String(c)}`:isValidElement(c)?`li-${c.key}`||`${d}-${MD5(c.toString())}`:c.label}-${d}`;return jsxs(Fragment,{children:[jsx(Hr,{meta:c}),s&&b[d+1]?jsx("li",{className:"--list-seperator",children:s},`spt-${d+1}-${h}`):null]},h)})})});Vr.displayName="Zuz.List";var Me=Vr;var zr=forwardRef((t,n)=>{let{fx:e,action:r,data:o,withStyle:s,onChange:u,...m}=t,{className:p}=N({as:s||""}),{style:i}=N(m),[a,f]=useState(false),[c,d]=useState(o||[]),b=useRef(null),h=useRef(null),v=useRef(null),R=useMemo(()=>m.name||uuid(12),[]),[C,g]=useState(null),[S,E]=useState(null),[P,w]=useState([]),D=useDebounce(T=>{T.target.value==""?(f(false),d([])):r&&T.target.value.trim()!=""&&withPost(r,{query:T.target.value}).then(A=>{"items"in A&&_(A.items).isArray()?(d(A.items),E(T.target.value),w(A.items)):console.error("Action Response should contain items array"),g(null);}).catch(A=>{g(null),d([]);});},250),B=()=>{if(h.current){let T=h.current.getBoundingClientRect(),A=window.innerHeight-T.bottom,$=T.top;if(v.current){let K=v.current;A<K.offsetHeight&&$>A?(K.style.top="auto",K.style.bottom=`${T.height}px`,K.style.maxHeight=`${$-150}px`):(K.style.top=`${T.height+5}px`,K.style.bottom="auto",K.style.maxHeight=`${A-150}px`);}}},_$1=T=>{if(c.length>0){if((T.key==="ArrowDown"||T.key==="ArrowUp")&&(T.preventDefault(),T.stopPropagation()),T.key==="Escape")g(null),f(false),d([]);else if(T.key==="ArrowDown")g(A=>{let $=A===null||A===c.length-1?0:A+1;return G($),$});else if(T.key==="ArrowUp")g(A=>{let $=A===null||A===0?c.length-1:A-1;return G($),$});else if(T.key==="Enter"&&C!==null){let A=c[C];b.current&&(b.current.value=A,f(false),d([]));}}},L=T=>{b.current&&(b.current.value=T,f(false),d([]));},G=T=>{let A=c[T];if(A&&b.current&&(b.current.value=A,b.current.setSelectionRange(A.length,A.length)),v.current){let K=v.current.children[T];K&&K.scrollIntoView({block:"nearest"});}},U=T=>{h.current&&!h.current.contains(T.target)&&(f(false),d([]));},V=()=>{b.current&&b.current.value===S&&(d(P),g(null),B());};return useEffect(()=>(window.addEventListener("resize",B),window.addEventListener("scroll",B,true),document.addEventListener("mousedown",U),()=>{window.removeEventListener("resize",B),window.removeEventListener("scroll",B,true),document.removeEventListener("mousedown",U);}),[]),useEffect(()=>{B();},[c]),jsxs(l,{style:i,ref:h,className:`--autocomplete --${t.size||W.Small} flex aic rel ${p}`.trim(),children:[jsx(re,{ref:b,autoComplete:"off",onChange:D,onKeyDown:_$1,onFocus:V,...m}),jsx(l,{className:"--arrow rel flex aic jcc",children:c.length>0?k.arrowUp:k.arrowDown}),c.length>0&&jsx(Me,{id:R,ref:v,className:"--suggestion-list flex cols abs",items:c.map((T,A)=>({label:T,onClick:$=>{$.preventDefault(),$.stopPropagation(),L(T);},className:C===A?"--current":"",animate:{transition:q.SlideInBottom,curve:Z.EaseInOut,delay:clamp(.02*A,.02,.5)}}))})]})});zr.displayName="Zuz.AutoComplete";var bi=zr;var _r=forwardRef((t,n)=>{let e=useRef(null),r=useMemo(()=>n&&typeof n!="function"&&n.current?n:e,[n]),{style:o,className:s,rest:u}=N(t,r);return !u.src||u.src==""?null:jsx("img",{ref:r,style:o,className:`${s} flex`,...u})});_r.displayName="Zuz.Image";var Qe=_r;var Fr=forwardRef((t,n)=>{let{src:e,variant:r,type:o,crossOrigin:s,referrerPolicy:u,fx:m,as:p,alt:i,color:a,style:f,...c}=t,[d,b,h]=useImage(e??"",s,u),{className:v,style:R,rest:C}=N({fx:m,as:p});return useEffect(()=>{if(o==Bt.Square&&!document.getElementById("squareRadiusClipPath")){let g="http://www.w3.org/2000/svg",S=document.createElementNS(g,"svg");S.setAttribute("width","0"),S.setAttribute("height","0");let E=document.createElementNS(g,"defs"),P=document.createElementNS(g,"clipPath");P.setAttribute("id","squareRadiusClipPath"),P.setAttribute("clipPathUnits","objectBoundingBox");let w=document.createElementNS(g,"path");w.setAttribute("d","M0.986 0.347C0.951 0.11 0.777 -0.002 0.5 0C0.223 -0.002 0.049 0.11 0.014 0.347C0.005 0.404 0 0.452 0 0.5C0 0.548 0.005 0.596 0.014 0.653C0.049 0.89 0.223 1.002 0.5 1C0.777 1.002 0.951 0.89 0.986 0.653C0.995 0.596 1 0.548 1 0.5C1 0.452 0.995 0.404 0.986 0.347Z"),P.appendChild(w),E.appendChild(P),S.appendChild(E),document.body.appendChild(S);}},[e]),jsx(l,{className:`--avatar --${r||W.Small} --${(o||Bt.Circle).toLowerCase()} rel flex aic jcc ${v}`.trim(),style:{background:a||"var(--primary)",...f,...R},...C,children:e?jsx(Qe,{src:d,crossOrigin:s,referrerPolicy:u,...c}):jsx(H,{className:"--avatar-label",children:(i?i.charAt(0):"A").toUpperCase()})})});Fr.displayName="Zuz.Avatar";var Ii=Fr;var Ei=({size:t=6,type:n="idle",label:e="",loading:r=false,...o})=>{let{style:s,className:u,rest:m}=N(o);return jsxs(l,{style:{width:`${t+4}px`,height:`${t+4}px`,...s},as:`--badge rel flex aic jcc ${u}`.trim(),children:[jsx(l,{fx:{transition:q.FadeIn,curve:Z.Liquid,duration:.5,when:r},as:"abs abc",children:jsx(ge,{})}),jsx(l,{style:{width:`${t}px`,height:`${t}px`},as:`--dot --${n}`})]})},Bi=Ei;var Ki=[{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 t=new Date,n=t.getDay();return addDays(t,(6-n)%7||6)},getDateFormat:()=>{let t=new Date,n=t.getDay();return format(addDays(t,(6-n)%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)}],Ui=t=>{let n=new Set;return t.filter(e=>{if(e.label=="Later")return true;let r=e.getDate().toISOString().split("T")[0];return n.has(r)?false:(n.add(r),true)})},Zr=forwardRef((t,n)=>{let{defaultValue:e,variant:r,onChange:o,...s}=t,{style:u,className:m,rest:p}=N(s),[i,a]=useState(e||new Date),f=startOfMonth(i),c=endOfMonth(i),d=startOfWeek(f),b=endOfWeek(c),h=useMemo(()=>eachDayOfInterval({start:d,end:b}),[d,b]),v=g=>{o?.(g),a(g);},R=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()-1));},C=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()+1));};return jsxs(l,{as:`--calendar flex --${r||"sm"} ${m}`,style:u,children:[jsx(l,{as:"--calendar-quick-select flex cols flex:1",children:Ui(Ki).map(g=>{let S=g.getDate();return jsxs(z,{onClick:()=>v(S),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(H,{as:"flex:1",children:g.label}),jsx(H,{as:"tar",children:g.getDateFormat()})]},`--dtp-option-label-${g.label}`)})}),jsxs(l,{as:"--calendar-selector flex cols flex:1",children:[jsxs(l,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(H,{as:"flex:1 --calendar-cm bold",children:format(i,"MMMM yyyy")}),jsx(z,{onClick:R,as:"--calendar-chevron",children:k.chevronUpOutline}),jsx(z,{onClick:C,as:"--calendar-chevron",children:k.chevronDownOutline})]}),jsxs(l,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(g=>jsx(H,{as:"--calendar-day",children:g},`--calendar-hd-${g}`)),h.map((g,S)=>{let E=isSameMonth(g,i),P=isSameDay(g,i),w=isToday(g);return jsx(z,{disabled:!E,onClick:()=>v(g),as:["--calendar-day --calendar-dd",`${P?"--calendar-dd-selected":""}`,`${w?"--calendar-dd-current":""}`],children:format(g,"d")},`--calendar-day-${S}-${g.getFullYear()}-${g.getMonth()}-${g.getDay()}`)})]})]})]})});Zr.displayName="Zuz.Calendar";var oo=Zr;var Kr=(n=>(n.Line="line",n))(Kr||{});var Gr=forwardRef((t,n)=>{let{data:e,width:r,height:o,lineColor:s,strokeWidth:u=2,gradientStartColor:m,gradientEndColor:p,animated:i,animDuration:a=2,animDelay:f=0,padding:c=0,type:d,...b}=t,{className:h,style:v,rest:R}=N(b),C=useRef(null),g=useResizeObserver(C.current?.parentElement||C),S=typeof r=="number"?r:g.width,E=typeof o=="number"?o:g.height,P={width:S,height:E},w=useId(),{pathD:I,areaPathD:D}=useLineChart(e,P,c+(u||2)),B=useRef(null),_=useRef(null),[L,G]=useState(0),[U,V]=useState(0);return useEffect(()=>{i&&(B.current&&G(B.current.getTotalLength()),_.current&&V(_.current.getTotalLength()));},[i,I,D,S,E]),jsx(l,{ref:C,as:`--chart --${d||"line"}-chart ${h}`.trim(),style:{...v,width:r,height:o},...R,children:S>0&&E>0&&jsxs("svg",{viewBox:`0 0 ${S} ${E}`,preserveAspectRatio:"xMidYMid meet",children:[jsx("defs",{children:jsxs("linearGradient",{id:w,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopColor:m}),jsx("stop",{offset:"100%",stopColor:p})]})}),jsx("path",{ref:_,d:D,fill:`url(#${w})`,stroke:"none",style:i?{strokeDasharray:U,strokeDashoffset:U}:{},children:i&&jsx("animate",{attributeName:"stroke-dashoffset",from:U,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsx("path",{ref:B,d:I,fill:"none",stroke:s,strokeWidth:u,strokeLinecap:"round",strokeLinejoin:"round",style:i?{strokeDasharray:L,strokeDashoffset:L}:{},children:i&&jsx("animate",{attributeName:"stroke-dashoffset",from:L,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});Gr.displayName="Zuz.Chart";var Qi=Gr;var qr=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(qr||{}),Xr=(i=>(i.Image="img",i.Video="vid",i.Audio="audio",i.Link="link",i.Document="doc",i.Location="loc",i.Contact="contact",i.Event="event",i.Poll="poll",i))(Xr||{});var Qr=forwardRef((t,n)=>{let{progress:e,type:r,animated:o,...s}=t,u=useRef(null);useImperativeHandle(n,()=>({setProgress:a=>{u.current.style.width=`${a*100}%`;}}),[]),useEffect(()=>{e&&u.current&&(o?setTimeout(()=>u.current.style.width=`${e*100}%`,500):u.current.style.width=`${e*100}%`);},[e,u.current]);let{className:m,style:p,rest:i}=N(s);return jsx(l,{className:`--progress ${o?"--animated":""} flex rel ${m}`.trim(),style:p,...i,children:jsx(l,{ref:u,className:"--bar rel"})})});Qr.displayName="Zuz.ProgressBar";var no=Qr;var Jr=forwardRef((t,n)=>{let{text:e,media:r,side:o="me",status:s=1,timeStamp:u=Date.now(),arrow:m=true,...p}=t,{className:i,style:a,rest:f}=N(p);return jsx(l,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxs(l,{className:`--bubble --bubble-${o} ${r?`--with-media --bma-${r.type}`:""} rel flex cols ${m==true?"--b-arrow":""} ${i}`.trim(),style:{...a},...f,children:[e&&jsx(H,{className:"--bubble-text",children:e}),r?r.type=="audio"?jsxs(l,{as:"flex aic --bubble-audio",children:[jsx(Q,{className:"--bm-action",children:k.play}),jsx(no,{progress:.7}),jsx(H,{className:"--bm-dur",children:r.duration??"00:13"})]}):r.type=="img"?jsx(l,{as:"--bubble-image",children:jsx(Qe,{src:r.source})}):null:null,jsxs(l,{as:"flex aie jce --bubble-stats",children:[jsx(H,{className:"--bubble-stamp tar",children:timeSince(u)}),o=="me"&&jsx(Q,{className:`--bubble-status --bs-${s}`,children:s==0?k.pending:s==1?k.done:s==2?k.doneAll:k.doneAll})]})]})})});Jr.displayName="Zuz.Bubble";var nl=Jr;var jr=forwardRef((t,n)=>{let{style:e,className:r,rest:o}=N(t);return jsx("label",{ref:n,style:e,className:r,...o})});jr.displayName="Zuz.Label";var je=jr;var en=forwardRef((t,n)=>{let{name:e,required:r,type:o,value:s,size:u,variant:m,checked:p,onSwitch:i,...a}=t,[f,c]=useState(p||false),d=useRef(null),{variant:b}=ee(true);return useImperativeHandle(n,()=>({setChecked(h,v=true){c(h),d.current&&(d.current.checked=h),v&&i&&i(h,s||"cb");},toggle(h=true){d.current&&(d.current.checked=!f),h&&i&&i&&i(!f,s||"cb"),c(!f);}})),jsxs(je,{className:`--${(o||ve.Default).toLowerCase()} ${!o||o==ve.Default?"--checkbox":"--switch"} --${m||b||W.Small} flex aic jcc ${f?"is-checked":""} rel`.trim(),...a,children:[(!o||o==ve.Default)&&k.check,jsx(re,{ref:d,defaultChecked:f,value:s||"cb",type:"checkbox",className:"abs",name:e,required:r||false,onChange:h=>{i&&i(h.target.checked,s||"cb"),c(h.target.checked);}})]})});en.displayName="Zuz.CheckBox";var et=en;var dl=({ref:t,...n})=>{let{code:e,lang:r="tsx",showLines:o=false,highlight:s="",as:u,fx:m,...p}=n,i=useRef(null),{className:a,style:f,rest:c}=N({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${u}`,fx:m},i),d=useMemo(()=>{let h=new Set;return s.split(",").forEach(v=>{if(v.includes("-")){let[R,C]=v.split("-").map(Number);for(let g=R;g<=C;g++)h.add(g);}else v&&h.add(Number(v));}),h},[s]),b=useMemo(()=>{let h=e.split(`
9
+ `);for(;h.length>0&&h[0].trim()==="";)h.shift();for(;h.length>0&&h[h.length-1].trim()==="";)h.pop();let v=h[0]?.match(/^\s*/)?.[0].length||0,R=h.map(g=>{let S=g.match(/^\s*/)?.[0].length||0,E=Math.min(S,v);return g.slice(E)}),C=[{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 R.map((g,S)=>{let E=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),P=d.has(S+1),w=[];C.forEach(I=>{E=E.replace(I.re,D=>{let B=`ZUZ_ID_${w.length}_ZUZ`;return w.push(`<span class="--token-${I.name}">${D}</span>`),B});});for(let I=w.length-1;I>=0;I--)E=E.replace(`ZUZ_ID_${I}_ZUZ`,w[I]);return `<div class="--code-line ${o==true?"--with-ln":""} ${P?"--is-highlighted":""}">
10
+ ${o==true?`<span class="--line-number">${S+1}</span>`:""}
11
+ <span class="--line-content">${E||" "}</span>
12
+ </div>`}).join("")},[e,d]);return jsx(l,{as:`--code-block ${a}`,style:f,...p,children:jsx("pre",{ref:t,children:jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:b}})})})},gl=dl;var on=({onSelect:t,meta:n,selected:e})=>{let r=useRef(null),{index:o,icon:s,label:u}=n,[m,p]=useState({x:0,width:0}),i=useDelayed();return useLayoutEffect(()=>{if(i&&r.current){let{width:a,x:f}=r.current.getBoundingClientRect();p({x:f,width:a}),e&&t(o,a,f,n,true);}},[i,r.current]),useEffect(()=>{e&&t(o,m.width,m.x,n,false);},[e]),jsxs(z,{onClick:()=>t(o,m.width,m.x,n,false),ref:r,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[s?typeof s=="string"?jsx(X,{name:s,as:"--segment-icon"}):jsx(l,{as:"--segment-icon flex aic jcc",children:s}):null,u&&String(u).trim()!=""&&jsx(l,{className:"--segment-label",children:u||`Item ${o}`})]})};on.displayName="SelectTabItem";var rn=on;var sn=forwardRef((t,n)=>{let{fx:e,items:r,selected:o,variant:s,onSwitch:u,...m}=t,[p,i]=useState(o||0),a=useRef(false),f=useRef(p),{className:c,style:d,rest:b}=N(m),h=useRef(null),v=useRef(null),R=(C,g,S,E,P)=>{if((P||p!=C&&p!=-2)&&(i(C),f.current=p,a.current&&u?.(E)),h.current){let w=v.current?.getBoundingClientRect();h.current.style.setProperty("--w",`${g}px`),h.current.style.setProperty("--x",`${w?S-w.left:S}px`);}};return useImperativeHandle(n,()=>({setSelected:C=>{typeof C=="number"&&C!=p&&i(C);}}),[p]),useEffect(()=>{a.current=true;},[]),jsxs(l,{ref:v,"data-selected":p,className:`${c} --segmented --${s||W.Small} flex aic rel`,style:d,...b,children:[jsx(l,{ref:h,className:"--segment-tab abs"}),r.map((C,g)=>jsx(rn,{onSelect:R,selected:p==g,meta:{...C,index:g}},`segment-${C.label}-${g}`))]})});sn.displayName="Zuz.SelectTabs";var tt=sn;var mn=forwardRef((t,n)=>{let{type:e,...r}=t,o=useDelayed(),{colorScheme:s,setColorScheme:u}=Vt(),m=useCallback(()=>{u(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:p,style:i}=N(r),a=useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon:k.colorSchemeLight},{tag:"system",index:1,label:"",icon:k.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:k.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:k.colorSchemeLight},{tag:"dark",index:2,label:"",icon:k.colorSchemeDark}],[]),f=useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !o||f==-1?null:e=="system"||e=="switch"?jsx(tt,{className:`--color-scheme --${e}`,onSwitch:({tag:c})=>{u(c);},selected:f,items:a,...r}):jsx(z,{onClick:m,style:i,as:`--color-scheme-switch --${r.variant||W.Small} ${p}`.trim(),children:s=="system"?k.colorSchemeSystem:s=="light"?k.colorSchemeLight:k.colorSchemeDark})});mn.displayName="Zuz.ColorScheme";var Bl=mn;var pn=forwardRef((t,n)=>{let[e,r]=useState("wait"),{title:o,message:s,acceptLabel:u,rejectLabel:m,position:p}=t,i=async a=>{r(a==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(a));};return useEffect(()=>{let a=localStorage.getItem("--ccnt");r(a?a=="1"?"accepted":"rejected":"pending");},[]),jsxs(l,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:Z.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${p||te.Left} flex cols`,children:[jsx(H,{as:"--title",children:o||"This site uses cookies"}),jsx(H,{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(l,{as:"--footer flex aic",children:[jsx(z,{onClick:a=>i(1),as:"--accept",children:u||"Accept All"}),jsx(z,{onClick:a=>i(0),as:"--reject",children:m||"Cancel"})]})]})});pn.displayName="Zuz.CookiesConsent";var kl=pn;var dn=forwardRef((t,n)=>{let {type:e,value:r,min:o,max:s,step:u,onChange:m,roundValue:p,...i}=t,{className:a,style:f,rest:c}=N(i),d=useRef(u||.01).current,b=useRef(o||0).current,h=useRef(s||1).current,v=useRef(r||0).current,R=useRef(null),C=useRef(null),g=useRef(null);useRef(null);let E=useRef(null),P=useRef(null),w=($,K,O)=>($-K)/(O-K)*100,I=$=>{if(C.current){let K=parseFloat($.currentTarget.value),O=w(K,parseFloat($.currentTarget.min),parseFloat($.currentTarget.max));C.current.style.setProperty("--value",`${O}`),C.current.setAttribute("data-value",`${K}`),m&&m(p?+K.toFixed(2):K);}},[D,B]=useState(false),[_,L]=useState(0),[G,U]=useState(0),V=$=>{B(true),L($.clientX),U(C.current?parseFloat(C.current.getAttribute("data-value")):0),document.body.style.cursor="ew-resize";},T=$=>{if(D){let K=$.clientX-_,O=Math.max(b,Math.min(G+K*d,h));C.current&&(C.current.setAttribute("data-value",`${O}`),P.current.textContent=p?O.toFixed(2):O.toString(),m&&m(p?+O.toFixed(2):O));}},A=()=>{B(false),document.body.style.cursor="auto";};return useEffect(()=>{C.current&&C.current.style.setProperty("--value",R.current?`${w(parseFloat(R.current.value),parseFloat(R.current.min),parseFloat(R.current.max))}`:v.toString());},[]),useEffect(()=>(D?(document.addEventListener("mousemove",T),document.addEventListener("mouseup",A)):(document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",A)),()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",A);}),[D]),jsx(l,{ref:C,"data-value":v||0,className:`--slider --${e||ut.Default} flex rel ${a}`.trim(),style:{...f},children:ut.Text===e?jsx(Fragment$1,{children:jsx(H,{ref:P,onMouseDown:V,className:"--slider-text",children:v||0})}):jsxs(Fragment$1,{children:[jsx(l,{ref:E,className:"--slider-track abs fill"}),jsx(l,{ref:g,className:"--slider-knob abs"}),jsx(re,{ref:R,onInput:I,className:"abs fill",tabIndex:0,type:e||ut.Default,defaultValue:v||0,step:d,max:h,min:b})]})})});dn.displayName="Zuz.Slider";var mo=dn;var hn=forwardRef((t,n)=>{let{src:e,shape:r,size:o,...s}=t,{style:u,className:m,rest:p}=N(s),{canvasRef:i,crop:a,setScale:f,handleMouseDown:c,handleMouseUp:d,handleMouseMove:b}=useImageCropper(e,o||200,r||CropShape.Circle);return useImperativeHandle(n,()=>({getCropped(){return a()},setScale(h){f(h);}})),jsxs(l,{as:`--cropper --${r||CropShape.Circle} ${m}`,style:u,...p,children:[jsx("canvas",{ref:i,width:o||200,height:o||200,onMouseDown:c,onMouseUp:d,onMouseLeave:d,onMouseMove:b}),jsx(l,{as:"--cropper-slider",children:jsx(mo,{onChange:h=>f(h),min:0,max:1,step:.01,value:1})})]})});hn.displayName="Zuz.Cropper";var zl=hn;var Fl=(e=>(e.Circle="circle",e.Square="square",e))(Fl||{});var yn=forwardRef((t,n)=>{let{items:e,maxItems:r}=t,o=useMemo(()=>{let m=typeof e=="string",p=m?[]:e;return m&&e.split(",").forEach(i=>{p.push({label:i});}),p},[e]),u=useMemo(()=>r&&r>0&&o.length>r-1,[o,r])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-r)]:o;return jsx(Me,{ref:n,className:"--crumb flex aic",direction:"rows",seperator:jsx(l,{as:"--crumb-chevron",children:k.chevronRightOutline}),items:u.map((m,p,i)=>m.ID=="."?jsx(l,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsx(l,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${p}`))}):jsxs(z,{onClick:()=>m.action?.(),className:"--crumb-item",disabled:!i[p+1],children:[m.icon&&jsx(X,{as:"--crumb-icon",name:m.icon}),jsx(H,{as:"--crumb-label",children:m.label})]},`${m.label.replace(/\s+/g,"-").toLowerCase()}-${p}`))})});yn.displayName="Zuz.Crumb";var Kl=yn;var wn=forwardRef((t,n)=>{let{icon:e,defaultValue:r,value:o,size:s,variant:u,numeric:m,type:p,onConfirm:i,...a}=t,[f,c]=useState(false),[d,b]=useState(r||null),{style:h,className:v,rest:R}=N(a),C=useRef(null),g=useRef(null),{reposition:S}=We(g,{direction:te.Bottom,offset:2}),E=w=>{m&&(w.currentTarget.value=w.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};useEffect(()=>{let w=I=>{let D=I.target,B=C.current?.contains(D),_=g.current?.contains(D);!B&&!_&&c(false);};return f&&document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w);}},[f]),useEffect(()=>{let w=I=>{I.key==="Escape"&&f&&(c(false),C.current?.focus());};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[f]);let P=()=>{c(true);};return useEffect(()=>{f&&S();},[f,S]),jsx(Fragment$1,{children:jsxs(l,{as:`--date-picker ${u?`--${u}`:""} rel flex aic ${v}`,"data-value":d?d.toISOString():"",children:[e?typeof e=="string"?jsx(X,{as:"mr:10 c:#666",name:e}):e:jsx(Q,{as:"--date-picker-icon flex aic jcc",children:k.calendar}),jsx("input",{ref:C,value:d?format(d,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${u?`--${u}`:""} flex`.trim(),style:h,onFocus:P,onInput:E,autoComplete:"new-password",onKeyDown:w=>{w.key=="Enter"&&i?.(w.currentTarget.value);},...R}),jsx(l,{"aria-hidden":!f,ref:g,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:f,duration:.05},as:`--date-picker-chooser flex aic ${u?`--${u}`:""}`,children:jsx(oo,{defaultValue:d,onChange:w=>{b(w),c(false);}})})]})})});wn.displayName="Zuz.DatePicker";var ql=wn;var Sn=forwardRef((t,n)=>{let{icon:e,variant:r,position:o}=t;return jsx(z,{className:`--fab fixed --${r||W.Large} --${o||"bottomright"}`,children:e||k.plus})});Sn.displayName="Zuz.Fab";var Jl=Sn;var Cn=t=>{let{names:n,strength:e}=t,r={[ft.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-${ft.Gooey}`)};return useEffect(()=>{},[n]),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsx("defs",{children:(n||[ft.Gooey]).map(o=>r[o](e))})})};Cn.displayName="Zuz.Filters";var tm=Cn;var Re=null,ae=null,Pn=forwardRef((t,n)=>{let{title:e,message:r,transition:o,curve:s,speed:u,type:m,actionPosition:p,spinner:i,loadingMessage:a,onShow:f,onHide:c,...d}=t,{className:b,style:h,rest:v}=N(d),[R,C]=useState(e||""),[g,S]=useState(r||""),[E,P]=useState(null),[w,I]=useState(m||le.Default),D=useMemo(()=>uuid(12),[]),[B,_]=useState(false),L=useRef(null),G=useRef(null),[U,V]=useState(false),[T,A]=useState(true),$=useRef(null),K=g;useImperativeHandle(n,()=>({setLoading(F){V(F);},showDialog(F,Y,oe,j){Re&&(clearTimeout(Re),ae&&clearTimeout(ae),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),ae=setTimeout(()=>{L.current.classList.remove("--wobble"),ae=null;},500)),I(le.Dialog),Y&&S(Y),F&&C(F),oe&&P(oe.reduce((ce,de)=>(ce.push({...de,key:de.key||uuid(12)}),ce),[])),_(true),setTimeout(()=>j?j():()=>{},1e3);},dialog(F,Y,oe,j){Re&&(clearTimeout(Re),ae&&clearTimeout(ae),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),ae=setTimeout(()=>{L.current.classList.remove("--wobble"),ae=null;},500)),I(le.Dialog),S(Y),C(F),oe&&P(oe.reduce((ce,de)=>(ce.push({...de,key:de.key||uuid(12)}),ce),[])),_(true),setTimeout(()=>j?j():()=>{},1e3);},error(F,Y){this.show(F,Y,le.Error);},warn(F,Y){this.show(F,Y,le.Warn);},success(F,Y){this.show(F,Y,le.Success);},show(F,Y,oe){Re&&(clearTimeout(Re),ae&&clearTimeout(ae),G.current=L.current.style.transform,L.current.style.transform="",L.current.classList.remove("--wobble"),setTimeout(()=>{L.current.classList.add("--wobble"),L.current.style.transform=`${G.current} scale(.9)`.trim();},50),ae=setTimeout(()=>{L.current.classList.remove("--wobble"),L.current.style.transform=G.current||"",ae=null;},500)),Re=setTimeout(()=>{_(false),Re=null,ae=null;},(Y||4)*1e3),I(oe||le.Default),S(F),_(true),f?.();},hide(){_(false),c?.();}}));let O=useMemo(()=>{let F={when:B,duration:u||.3,delay:.1};if(w==le.Dialog){if(o){let{from:Y,to:oe}=Ue(o,20);return {from:Y,to:oe,curve:s||Z.EaseInOut,...F}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:Z.Spring,...F}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:Z.Spring,...F}},[B,w]);return useEffect(()=>{$.current&&clearTimeout($.current),B?A(true):$.current=setTimeout(()=>A(false),1e3);},[B]),w==le.Dialog?jsxs(Fragment$1,{children:[jsx(Ee,{when:B}),jsxs(l,{className:`--sheet --sheet-${w.toLowerCase()} ${B?"is-visible":""} ${b} fixed`.trim(),style:h,fx:O,...v,ref:L,children:[jsx(Be,{when:U,spinner:i,message:a}),jsxs(l,{className:"--head flex aic rel",children:[jsx(l,{className:`--${R?"title":"dot"} flex aic rel`,children:R||""}),jsx(z,{onClick:F=>_(false),className:"--closer abs",children:"\xD7"})]}),jsx(l,{className:`--body flex aic rel ${E?"":"--no-action"}`.trim(),children:T?K:null}),E&&jsx(l,{className:`--footer flex aic rel ${p?p==Mt.Center?"jcc":"":"jce"}`.trim(),children:E.map((F,Y)=>jsx(z,{onClick:oe=>F.handler?F.handler():F.onClick?F.onClick():console.log("onClick Handler missing"),className:"--action",children:F.label},`sheet-${D}-action-${F.key}`))})]})]}):jsx(l,{className:`--sheet --sheet-${w.toLowerCase()} ${b} abs`.trim(),style:h,...v,fx:O,ref:L,children:B?g:null})}),rt=t=>typeof t=="object"&&t!=null&&"setLoading"in t&&"success"in t&&"error"in t;Pn.displayName="Zuz.Sheet";var am=Pn;var Rn=forwardRef((t,n)=>{let{name:e,cover:r,spinner:o,errors:s,action:u,children:m,withData:p,beforeSubmit:i,onSubmit:a,onError:f,onSuccess:c,resetOnSuccess:d,...b}=t,{className:h,style:v,rest:R}=N(b),[C,g]=useState(false),S=useRef(null),E=useRef(null),P=useRef(null),w=qt(),I=useCallback(T=>S.current?S.current.querySelectorAll(T):[],[S.current]),D=T=>({name:T.name||T.getAttribute("name")||T.getAttribute("data-name"),required:T.required?true:T.getAttribute("data-required")?T.getAttribute("data-required")=="true":false,with:T.with||T.getAttribute("with")}),B=T=>{let A=[];return T.querySelectorAll(".--input").forEach($=>{A.push($.value);}),A.join("")},_$1=useCallback(T=>{let{required:$}=D(T);if($){if(T.type=="checkbox"&&T.checked==false)return false;if(T.classList.contains("--otp")){let O=B(T);if(O==""||O.length<parseInt(T.getAttribute("data-size")))return false}if(T.classList.contains("--select")&&T.querySelector("button.--selected").dataset.value=="-1"||T.value=="")return false}if(T.getAttribute("with")){let O=T.getAttribute("with");switch(O.includes("@")&&(O=O.split("@")[0],O=="match"&&(O=we.MatchField)),O.toUpperCase()){case we.IPV4:return _(T.value).isIPv4();case we.IPV6:return _(T.value).isIPv6();case we.Email:return _(T.value).isEmail();case we.Uri:try{return new URL(T.value),!0}catch{return false}case we.Password:return console.log("Add FORMVALIDATION.Password"),false;case we.MatchField:let[F,Y,oe]=T.getAttribute("with").split("@"),j=document.querySelector(`[name=${Y.trim()}]`);if(!j)return false;switch(oe||"direct-match"){case "if-not-empty":if(j&&!_(j.value).isEmpty()&&j.value!=T.value)return false;break;case "direct-match":if(j&&j.classList.contains("--otp")&&T.classList.contains("--otp")&&B(j)!=B(T))return false;if(j&&j.value!=T.value)return false;break}break;default:return true}}return true},[S.current]),L=useCallback(()=>{let T={},A={},$=null,K=null;if(Array.from(I("[name]")).forEach(O=>{let{name:F,required:Y,with:oe}=D(O),j=true;(Y||oe)&&(j=_$1(O)),T[F]={valid:j,value:O.type=="checkbox"?O.checked==true?O.value:false:O.classList.contains("--otp")?B(O):O.classList.contains("--select")?O.querySelector("button.--selected").dataset.value:O.value},A[F]=O.type=="checkbox"?O.checked==true:O.classList.contains("--otp")?B(O):O.classList.contains("--select")?O.querySelector("button.--selected").dataset.value:O.value,j?O.classList.remove("input-with-error"):($==null&&s&&($=O,K=s[F]),O.classList.add("input-with-error"));}),$){let O=$;if(O.classList.contains("--otp"))for(let F of Array.from(O.querySelectorAll(".--input"))){let Y=F;if(Y.value==""){Y.focus();break}}else O.focus();}return {error:$!=null,errorMsg:K||"Fix errors to continue...",data:T,payload:A}},[S.current]),G=useCallback(()=>{let{error:T,errorMsg:A,payload:$}=L();T?w.error(A):u?startTransition(async()=>{i&&i($),rt(r)?r.setLoading(true):g(true),w.clearAll(),withPost(u,{...$,...p||{}}).then(K=>{let O=K;rt(r)?r.setLoading(false):g(false),d&&Array.from(I("[name]")).forEach(F=>{F instanceof HTMLInputElement&&(F.value="");}),c?c(O):(w.clearAll(),w.success(O.message||"Redirecting..."));}).catch(K=>{rt(r)?r.setLoading(false):g(false),f?f(K):w.error(K.message||"We cannot process your request at this time.");});}):a&&a($);},[u,E.current,S.current]),U=useCallback(()=>{let T=I("[type=submit]");!T||T.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):T.forEach(A=>{A.addEventListener("click",G);});},[S.current]),V=useMemo(()=>addPropsToChildren(m,T=>T.props.type=="submit",T=>({ref:P})),[m]);return useImperativeHandle(n,()=>({setLoading(T){if(T){E.current.hide();try{w.clearAll();}catch{}}g(T);},showError(T){typeof T=="string"?w.error(T):E.current.error(T,4);},hideError(){E.current.hide();try{w.clearAll();}catch{}},init(){U();},submit(){G();}})),useEffect(U,[]),jsxs(l,{ref:S,style:v,className:`--form flex rel ${h} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!rt(r)&&jsx(Be,{message:r?r.message||void 0:"working",spinner:o,color:r&&"color"in r?r.color:"#ffffff",when:C}),V]})});Rn.displayName="Zuz.Form";var hm=Rn;var Nn=forwardRef((t,n)=>{let {children:e,fx:r,fxDelay:o,fxStep:s,classToIgnore:u,...m}=t,p=ee(true),i=useDelayed(),a=r||p?.group?.fx,f=o||p?.group?.fxDelay,c=s||p?.group?.fxStep;u||p?.group?.classToIgnore;let b=useMemo(()=>a?addPropsToChildren(e,h=>{if(h.type===Fragment)return false;let v=h.props||{},R="fx"in v,C=v.as?Array.isArray(v.as)?v.as.join(" "):v.as:v.className||"",g=typeof C=="string"&&C.includes(u||"--ignore");return !R&&!g},h=>({fx:{...a,delay:(f||0)+h*(c||.1),when:i}})):e,[e,i,a]);return jsx(l,{className:"--group",ref:n,...m,children:b})});Nn.displayName="Zuz.Group";var Tm=Nn;var In=t=>typeof t=="string"&&t.includes("+"),En={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"},Bn={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 Mn=forwardRef(({children:t,keys:n,variant:e},r)=>{let o=useMemo(()=>{if(In(n)){let s=null;return {keys:String(n).split("+").reduce((m,p,i,a)=>(a[i+1]?m.push(p):s=p.toUpperCase(),m),[]),children:s}}return {keys:n,children:String(t).toUpperCase()}},[n]);return jsxs(l,{as:`--keyboard-keys --${e||W.Small} flex aic`,children:[(Array.isArray(o.keys)?o.keys:[o.keys]).map(s=>jsx("abbr",{title:Bn[s],children:En[s]},s)),jsx(Q,{children:o?.children??t})]})});Mn.displayName="Zuz.KeyboardKeys";var xo=Mn;var kn=forwardRef((t,n)=>{let e=useNetworkStatus(),{onlineMessage:r,offlineMessage:o,variant:s}=t;return jsxs(l,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:e==false,curve:Z.Spring,duration:.5,delay:2},className:`--network-manager --${e==true?"online":"offline"} --${s||W.Small} fixed flex`,children:[jsx(l,{className:"--ico",children:e?k[ie.Success]:k[ie.Error]}),jsx(H,{as:"--message",children:e?r||"internet connection restored :)":o||"no internet connection"})]})});kn.displayName="Zuz.NetWorkManager";var Lm=kn;var yo=(e=>(e.Table="table",e.Gooey="gooey",e))(yo||{});var An=forwardRef((t,n)=>{let{itemCount:e,itemsPerPage:r,startPage:o,pageRange:s,paginationStyle:u,breakLabel:m,prevLabel:p,nextLabel:i,hash:a,loading:f,seperator:c,renderOnZeroPageCount:d,onPageChange:b,...h}=t,v=useMemo(()=>toHash(numberInRange(4,8)),[]),R=useCallback(L=>`${toHash(L,a||6,v)}${c||""}${v}`,[v]),C=useMemo(()=>m||"...",[m]),[g,S]=useState({id:a?o?typeof o=="number"?R(o):o:1:o||1,label:o||1}),{style:E,className:P,rest:w}=N(h),I=useCallback(L=>typeof L=="number"?L:+L.label,[]);if(!e)throw new Error('"itemCount" prop is required');let D=useMemo(()=>Math.ceil(e/r),[e,r]),B=useMemo(()=>{let L=[],G=Math.max(I(g)-(s||2),1),U=Math.min(I(g)+(s||2),D);G>1&&L.push({id:a?R(1):1,label:1}),G>2&&L.push({id:-1,label:C});for(let V=G;V<=U;V++)L.push({id:a?R(V):V,label:V});return U<D-1&&L.push({id:-1,label:C}),U<D&&L.push({id:a?R(D):D,label:D}),L},[g]),_=useCallback(L=>{let G=L;+G.label<1||+G.label>D||(S(G),b?.(G));},[e,r,g]);return B.length<=1&&(d??false)===false?null:jsxs(l,{ref:n,as:`--pagination --pgt-${u||"table"} flex aic w:100% jcc ${P}`,children:[jsx(l,{as:"flex flex:1 aic --pgt-btns",children:(B.length>1?B:[{id:1,label:1},{id:-1,label:C}]).map((L,G,U)=>jsx(z,{disabled:L.id==-1||I(g)==+L.label,className:(typeof L=="string"?L:L.label)==I(g)?"--current-page":"",onClick:V=>_(L),children:typeof L=="string"?L:L.label},`--pg-${G}-${L.id}`))}),jsx(l,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(I(g)-1)*r+1} - `,`${Math.min(I(g)*r,e)} of ${e} items`].join(" ")}),jsxs(l,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsx(z,{disabled:I(g)<=1,onClick:L=>_({id:a?R(I(g)-1):I(g)-1,label:I(g)-1}),children:k.chevronLeftOutline}),jsx(z,{disabled:B.length<=1||I(g)==I(B[B.length-1]),onClick:L=>_({id:a?R(I(g)+1):I(g)+1,label:I(g)+1}),children:k.chevronRightOutline})]})]})});An.displayName="Zuz.Pagination";var vo=An;var $n=forwardRef((t,n)=>{let{strenthMeter:e,onChange:r,...o}=t;"type"in o&&delete o.type;let{style:s,className:u,rest:m}=N(o),[p,i]=useState(false),[a,f]=useState(""),c=useMemo(()=>checkPasswordStrength(a),[a]),d=useDebounce(b=>{e&&f(b.target.value),r&&r(b);},100);return useEffect(()=>{},[]),jsxs(l,{as:"w:100% flex cols",children:[jsxs(l,{style:s,className:"--password flex aic rel",children:[jsx(re,{ref:n,type:p?"text":"password",className:u,onChange:d,...m}),jsx(z,{tabIndex:-1,onClick:()=>i(b=>!b),className:"--toggle flex aic jcc abs",children:p?k.eye:k.eyeSlash})]}),e&&jsxs(l,{as:`flex aic --password-meter --pb-score-${c.score}`,style:s,children:[jsxs(l,{as:"--password-bars flex aic",children:[jsx(l,{as:`--pbar ${c.score>=1?"--pb-on":""}`.trim()}),jsx(l,{as:`--pbar ${c.score>=2?"--pb-on":""}`.trim()}),jsx(l,{as:`--pbar ${c.score>=3?"--pb-on":""}`.trim()}),jsx(l,{as:`--pbar ${c.score>=4?"--pb-on":""}`.trim()}),jsx(l,{as:`--pbar ${c.score>=5?"--pb-on":""}`.trim()})]}),jsx(H,{as:"--password-meter-label","aria-hidden":true,children:c.result})]})]})});$n.displayName="Zuz.Password";var _m=$n;var _n=forwardRef((t,n)=>{let{size:e,length:r,mask:o,...s}=t,u=useRef([]),m="pinput",p=false,i={};"with"in s&&(i={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(m=s.name,delete s.name),"required"in s&&(p=true,delete s.required);let{style:a}=N(s),f=c=>{let d=c.currentTarget,b=u.current[parseInt(d.dataset.index)+1],h=u.current[parseInt(d.dataset.index)-1];d.value.length===1&&b?b.focus():d.value.length===0&&h&&h.focus();};return useEffect(()=>{u.current=u.current.slice(0,e||r);},[e||r]),jsx(l,{name:m,style:a,className:"--otp flex aic rel","data-required":p,"data-size":e||r||4,...i,children:Array(e||r||4).fill(1).map((c,d)=>jsx(re,{autoComplete:"new-password","data-index":d,ref:b=>{u.current[d]=b;},numeric:true,onChange:f,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${d}`))})});_n.displayName="Zuz.PinInput";var Um=_n;var Fn=forwardRef((t,n)=>{let{children:e,className:r,name:o,required:s,type:u,value:m,variant:p,checked:i,onSwitch:a,...f}=t,[c,d]=useState(i||false),{variant:b}=ee(true),h=useRef(null);return jsxs(je,{className:`${r} --${(u||Ot.Default).toLowerCase()} --radio${!u||u==Ot.Default?"":"card"} --${p||b||W.Small} flex aic rel`.trim(),...f,children:[jsx(re,{ref:h,defaultChecked:c,value:m||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:v=>{a&&a(v.target.checked,m||"cb"),d(v.target.checked);}}),jsx(l,{className:"--dot rel",children:jsx(l,{className:"--rod abs abc"})}),jsx(l,{className:"--value",children:e})]})});Fn.displayName="Zuz.Radio";var Xm=Fn;var Zn=forwardRef((t,n)=>{let{speed:e,style:r,...o}=t,{rootRef:s,containerRef:u,thumbY:m,thumbX:p,onScrollY:i,onScrollX:a}=useScrollbar(e||1),{style:f,className:c,rest:d}=N(o);return jsxs(l,{ref:s,className:c.trim(),as:"--scrollview rel",children:[jsx(l,{as:`--scroll-content ${c}`.trim(),ref:u,style:r||{},children:d.children}),jsx(l,{as:"--scroll-track --track-y --abs",children:jsx(l,{as:"--scroll-thumb --abs",ref:m,onMouseDown:i})}),jsx(l,{as:"--scroll-track --track-x --abs",children:jsx(l,{as:"--scroll-thumb --abs",ref:p,onMouseDown:a})})]})});Zn.displayName="Zuz.ScrollView";var jm=Zn;var Kn=forwardRef((t,n)=>{let{fx:e,withStyle:r,as:o,reverse:s=false,searchIcon:u=k.search,hideSearchIcon:m=false,clearIcon:p=k.close,hideClearIcon:i=false,onChange:a,onClear:f,...c}=t,{style:d,className:b}=N({as:t.as}),[h,v]=useState(""),R=useRef(null),C=useMemo(()=>jsx(z,{tabIndex:-1,onClick:E=>S(),className:"--send flex aic jcc",variant:t.variant||W.Small,children:h!==""?!i&&(typeof p=="string"?jsx(X,{name:p,as:"--search-action"}):p):!m&&(typeof u=="string"?jsx(X,{name:u,as:"--search-action"}):u)}),[s,u,i,p,m]);"type"in t&&delete t.type;let g=E=>{v(E.target.value),a?.(E.target.value);},S=E=>{h.trim()!==""&&(v(""),a?.(""),R.current&&(R.current.value="",t.onConfirm?.("")));};return useImperativeHandle(n,()=>({focus:()=>R.current?.focus(),value:()=>R.current?.value})),useEffect(()=>{},[]),jsxs(l,{style:d,className:`--search ${s?"--search-rev":""} --${t.variant||W.Small} flex aic ${typeof t.as=="string"&&t.as.includes("abs")?"":"rel"} ${b}`.trim(),children:[s&&C,jsx(re,{ref:R,onChange:g,className:`--${t.variant||W.Small}`,...c}),t.shortcut&&jsx(xo,{keys:t.shortcut,as:"abs"}),!s&&C]})});Kn.displayName="Zuz.Search";var ic=Kn;var Wn=({value:t,updateValue:n,o:e})=>jsxs(z,{onClick:r=>n(e),as:"--select-option-item",className:t&&(typeof e=="string"?e:e.value)==(typeof t=="string"?t:t.value)?"selected":"",children:[e.icon&&jsx(X,{name:e.icon,as:`--select-option-icon --icon-${e.value}`,color:e.iconColor||void 0}),jsx(H,{children:typeof e=="string"?e:e.label})]});Wn.displayName="Option";var Gn=Wn;var Xn=forwardRef((t,n)=>{let {selected:e,options:r,label:o,name:s,variant:u,search:m,searchPlaceholder:p,maxHeight:i,arrowDownIcon:a=k.arrowDown,arrowUpIcon:f=k.arrowUp,onChange:c,...d}=t,[b,h]=useState(e?typeof e=="string"?r.find(V=>V.value===e):e:r[0]),[v,R]=useState(false),[C,g]=useState(null);useRef(null);let E=useRef(null),P=useRef(null),w=useId(),I=useMemo(()=>s||w,[]),{reposition:D}=We(P,{direction:Lt.Bottom,offset:2}),{variant:B}=ee(true),{className:_,style:L,rest:G}=N(d),U=V=>{h(V),c&&c(V);};return useImperativeHandle(n,()=>({setSelected:V=>{if(typeof V=="string"){let T=r.find(A=>A.value===V);T&&h(T);}else h(V);},getValue:()=>b||null})),useEffect(()=>{document.body.addEventListener("click",V=>{R(false);}),window.dispatchEvent(new Event("resize"));},[]),useEffect(()=>{v?E.current&&E.current.focus():(E.current&&(E.current.value=""),g(null)),D();},[v]),jsxs(l,{className:`--select --${u||B} ${s?`--${s}`:""} rel`.trim(),name:I,children:[jsxs(z,{"data-value":b?typeof b=="string"?b:b.value:b||"-1",className:`--selected flex aic rel ${_}`.trim(),withLabel:false,style:L,onClick:V=>R(T=>!T),...G,children:[jsx(H,{className:"--label",children:b?typeof b=="string"?b:b.label:o||"Choose"}),jsx(l,{className:"--svg-arrow rel flex aic jcc",children:v?typeof f=="string"?jsx(X,{name:f,as:"--search-action"}):f:typeof a=="string"?jsx(X,{name:a,as:"--search-action"}):a})]}),jsxs(l,{id:I,className:"--options-list flex cols abs","aria-hidden":!v,style:{maxHeight:i||"auto"},ref:P,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:v,duration:.05},children:[m&&jsx(re,{ref:E,onChange:V=>{g(V.target.value==""?null:V.target.value);},className:"--select-search",placeholder:p||"Search..."}),(C==null?r:r.filter(V=>V.label.toLowerCase().includes(C.toLowerCase())||V.value.toLowerCase().includes(C.toLowerCase()))).map(V=>jsx(Gn,{updateValue:U,value:b,o:V},`option-${(typeof V=="string"?V:V.label).replace(/\s+/g,"-")}-${typeof V=="string"?V:V.value}`))]})]})});Xn.displayName="Zuz.Select";var dc=Xn;var Yn=forwardRef((t,n)=>jsx(et,{type:ve.Switch,...t,ref:n}));Yn.displayName="Zuz.Switch";var hc=Yn;var Jn=t=>{let{idx:n,id:e,as:r,weight:o,style:s,value:u,render:m,resize:p,sortBy:i,sortable:a,onSort:f}=t,[c,d]=useState(0),b=()=>{a&&(f?.(String(e),c==1?-1:1),d(h=>h==1?-1:1));};return jsxs(l,{style:{flex:o||1,...s},as:`--col flex aic ${r||""} ${a?"--sortable":""}`,onClick:b,children:[jsx(l,{children:u}),n==-1&&a&&i==e&&jsx(l,{as:"--arrow flex aib",children:c==1?k.arrowUp:k.arrowDown})]})};Jn.displayName="Zuz.Column";var Pt=Jn;var es=t=>{let{index:n,pubsub:e,schema:r,data:o,ids:s,styles:u,animate:m,sortBy:p,selectable:i,tableRef:a,loading:f,rowClassName:c,onSort:d,onRowClick:b,onSelect:h,onContextMenu:v}=t,R=useDelayed(),C=useMemo(()=>({transition:q.SlideInBottom,curve:Z.EaseInOut,delay:.02*(n+1)}),[]),g=useRef(null),S=(P,w)=>{n==-1?e.emit(`ALL_ROWS_${P?"CHECKED":"UNCHECKED"}`,P):(h&&h(o,P),e.emit(`ROW_${P?"CHECKED":"UNCHECKED"}`,P,w));},E=(P,w,I)=>jsx(Pt,{idx:P,id:w,as:"--selector",pubsub:e,value:jsx(et,{value:I,ref:g,onSwitch:S,type:ve.Default})});return useEffect(()=>{let P=(B,_)=>{g.current?.setChecked(B,false);},w=(B,_)=>{let L=false;a?.current&&a.current.querySelectorAll(".--row").forEach(G=>{let U=G;if(!U.classList.contains("--row-head")){let V=U.querySelector(".--selector input[type=checkbox]");V&&V.checked&&!L&&(L=V.checked);}}),g.current.setChecked(L,false);},I=B=>{g.current?.setChecked(B,false),h&&h(o,B);},D=B=>{g.current?.setChecked(B,false),h&&h(o,B);};return n==-1?(e.on("ROW_CHECKED",P),e.on("ROW_UNCHECKED",w),()=>{e.off("ROW_CHECKED",P),e.off("ROW_UNCHECKED",w);}):(e.on("ALL_ROWS_CHECKED",I),e.on("ALL_ROWS_UNCHECKED",D),()=>{e.off("ALL_ROWS_CHECKED",I),e.off("ALL_ROWS_UNCHECKED",D);})},[]),jsxs(l,{onContextMenu:P=>v?v(P,o):null,onClick:P=>b?b(P,t.data):()=>{},...m?{fx:{...C,when:R}}:{},as:`--row flex aic ${b?"--row-clickable":""} ${n==-1?"--row-head":""} ${c||""}`,children:[n==-1&&r.map((P,w)=>{let{renderWhenHeader:I,render:D,value:B,..._}=P;return jsxs(Fragment,{children:[i&&w==0&&E(-1,`--selector-${P.id}`,"all"),jsx(Pt,{idx:-1,onSort:d,sortBy:p,value:B,..._,pubsub:e,style:u[P.id]})]},`--col-${P.id}`)}),f&&n>-1&&jsx(l,{as:"--col",children:jsx(H,{as:"opacity:0",children:"..."})}),!f&&n>-1&&s&&o&&r.map((P,w)=>jsxs(Fragment,{children:[i&&w==0&&E(w,`--selector-${P.id}`,P.id.toString()),s.includes(String(P.id))?jsx(Pt,{pubsub:e,idx:w,id:String(P.id),style:u[String(P.id)],value:P.render?P.render(o,n):o[String(P.id).includes(".")?String(P.id).split(".").reverse()[0]:P.id]}):null]},`--${String(P.id)}-val-${w}`))]})};es.displayName="Zuz.Row";var Rt=es;var ns=(t,n)=>{let{schema:e,rows:r,rowCount:o,rowsPerPage:s,currentPage:u,pagination:m,paginationHash:p,showPaginationOnZeroPageCount:i,animateRows:a,header:f,rowClassName:c,selectableRows:d,hoverable:b,sortBy:h,loading:v,loadingRowCount:R,loadingMessage:C,spinner:g,emptyMessage:S,onSort:E,onRowClick:P,onRowSelectToggle:w,onPageChange:I,onRowContextMenu:D,...B}=t,_=useRef(null),L=useMemo(()=>e.reduce((pe,J)=>(pe[J.id]={flex:J.weight||1,...J.w&&{width:J.w},...J.maxW&&{maxWidth:J.maxW},...J.minW&&{minWidth:J.minW},...J.h&&{height:J.h},...J.maxH&&{maxHeight:J.maxH},...J.minH&&{minHeight:J.minH}},pe),{}),[e]),G=useMemo(()=>Object.keys(L),[e]),U=useMemo(()=>f??true,[f]),{style:V,className:T,rest:A}=N(B),$=useRef(null),K=useMemo(()=>new PubSub,[]),O=useRef(r.map(()=>uuid(8))),[F,Y]=useState(h||null),[oe,j]=useState(C||"loading"),ce=useMemo(()=>!v&&r&&r.length==0,[v,r]),de=useCallback(()=>S?typeof S=="function"?jsx(S,{}):S:jsx(H,{as:"tac s:18 mt:75",children:"No Record Found"}),[v,r]);useEffect(()=>{O.current=r.map(()=>uuid(8));},[r]);let lt=(pe,J)=>{Y(pe),E?.(pe,J);},mt=(o||(r?r.length:0))/(s||10),ct=useMemo(()=>i||mt>1?jsx(vo,{hash:p,ref:_,renderOnZeroPageCount:i,onPageChange:I,paginationStyle:"table",startPage:u,itemCount:o||(r?r.length:0),itemsPerPage:s||10}):null,[u,o]);return useImperativeHandle(n,()=>({setLoading(pe){}})),jsxs(l,{as:`--table ${b??true?"--hoverable":""} flex cols rel ${T}`,ref:$,children:[U==true&&jsx(Rt,{sortBy:F,onSort:lt,tableRef:$,pubsub:K,selectable:d,index:-1,schema:e,loading:true,styles:L}),v&&jsxs(l,{as:"center-x flex aic --table-spinner",children:[jsx(ge,{type:g||me.Simple}),oe&&jsx(H,{as:"--table-loading-message",children:oe})]}),v&&Array(R||5).fill({}).map((pe,J)=>jsx(Rt,{tableRef:$,index:J,pubsub:K,schema:e,styles:L,loading:true,animate:a,onRowClick:P},`--trow-loading-${J}-${e[0].id}`)),!v&&r&&r.map((pe,J)=>jsx(Rt,{tableRef:$,pubsub:K,loading:false,index:J,schema:e,ids:G,styles:L,animate:a,data:pe,onRowClick:P,rowClassName:c,selectable:d,onSelect:w,onContextMenu:D},`--trow-${O.current[J]||J}-${e[0].id}`)),ce&&de(),jsx(l,{"aria-hidden":!m||!ct,...a?{fx:{transition:q.SlideInBottom,curve:Z.EaseInOut,delay:.02*(r.length+1),when:!v&&r&&m&&ct!=null}}:{},as:"--row flex aic --row-footer",children:m&&ct?ct:null})]})};ns.displayName="Zuz.Table";var Ec=forwardRef(ns),Bc=Ec;var Mc=({ref:t,...n})=>{let{title:e,items:r}=n,[o,s]=useState(0),u=(m,p,i)=>{m.preventDefault(),s(p),document.getElementById(i)?.scrollIntoView({behavior:"smooth"});};return jsxs(l,{ref:t,as:"--table-of-contents rel flex cols",children:[jsx(H,{as:"--toc-title",children:e}),jsx(Me,{items:r.map((m,p)=>jsx("a",{className:o==p?"--toc-active":"",style:{anchorName:o===p?"--toc-active":"none",color:o==p?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:i=>u(i,p,m.tag),href:`#${m.tag}`,children:m.label}))})]})},Oc=Mc;var ss=({isActive:t,transitionType:n,speed:e,width:r,render:o,content:s,onHeightChange:u})=>{let m=useRef(null),p=useResizeObserver(m);useEffect(()=>{t&&p.height>0&&u(p.height);},[t,p.height]);let i=useMemo(()=>{let a={flexShrink:0,height:"fit-content"};return n==="fade"?{...a,gridArea:"1 / 1 / 2 / 2",opacity:t?1:0,visibility:t?"visible":"hidden",transition:`opacity ${e}s ease-in-out`,zIndex:t?1:0}:n==="scale"?{...a,gridArea:"1 / 1 / 2 / 2",opacity:t?1:0,transform:`scale(${t?1:.95})`,transition:`all ${e}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:t?1:0}:a},[t,n,r,e]);return jsx(l,{ref:m,style:{...i},className:"--content",children:o||t?s:null})};ss.displayName="Zuz.TabBody";var as=ss;var ms=({ref:t,...n})=>{let{tabs:e,speed:r=.3,prerender:o=true,variant:s,tabStyle:u="fixed",onChange:m,transitionType:p="slide",...i}=n,[a,f]=useState(0),c=useRef(null),d=useResizeObserver(c),b=useMemo(()=>uuid(8),[]),[h,v]=useState("auto"),R=useMemo(()=>d.width>0,[d.width]);useImperativeHandle(t,()=>({setTab:w=>f(w)}));let C=useMemo(()=>e.map(w=>({...w,key:w.key||uuid(8)})),[e]),{style:g,className:S,rest:E}=N({as:`flex cols w-full no-overflow ${i.as||""}`,...i}),P=()=>{if(!R)return {opacity:0};switch(p){case "fade":return {display:"grid",gridTemplateColumns:"1fr"};case "scale":return {display:"grid",gridTemplateColumns:"1fr"};default:return {display:"flex",transform:`translate3d(-${a*d.width}px, 0, 0)`,transition:`transform ${r}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxs(l,{ref:c,style:g,className:`--tabview --${u} flex cols ${S}`,children:[jsx(tt,{as:"--tabview-head",onSwitch:w=>{f(w.index);let I=C.find(D=>D.tag==w.tag);I&&I.onSelect&&(I.onSelect(I,w.index),m?.(I,w.index));},selected:a,items:C.reduce((w,I,D)=>(w.push({icon:I.icon,index:D,label:I.label,tag:I.tag}),w),[])}),jsx(l,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:h,transition:R?`height ${r}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:R?1:0},children:jsx(l,{className:"--track",style:{...P()},children:C.map((w,I)=>jsx(as,{isActive:I===a,transitionType:p,speed:r,width:d.width,render:o||I===a,onHeightChange:D=>I===a&&v(D),content:w.body},`tab-body-${w.key||I}-${b}`))})})]})};ms.displayName="Zuz.TabView";var Zc=ms;var Gc=({ref:t,commands:n,onCommand:e,welcomeMessage:r="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...u})=>{let[m,p]=useState([{type:"output",content:r}]),[i,a]=useState(""),f=useRef(null),c=useRef(null),{variant:d}=ee(true);useEffect(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight);},[m]);let b=S=>{let E=typeof S=="string"?{type:"output",content:S}:S;p(P=>{let w=[...P,E];return w.length>1e3?w.slice(-1e3):w});},h=()=>p([]);useImperativeHandle(t,()=>({push:b,clear:h}));let v=async S=>{let[E,...P]=S.split(" "),w=E.toLowerCase();return n&&n[w]?await n[w](P):e?await e(S):`command not found: ${E}`},R=S=>{let E=/\u001b\[(\d+)m/g,P=[],w={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,D="",B=false,_;for(;(_=E.exec(S))!==null;){let G=S.slice(I,_.index);G&&P.push({text:G,color:D,bold:B});let U=_[1];U==="0"?(D="",B=false):U==="1"?B=true:w[U]&&(D=w[U]),I=E.lastIndex;}let L=S.slice(I);return L&&P.push({text:L,color:D,bold:B}),P},C=(S,E)=>S.includes("\x1B")?R(S).map((P,w)=>jsx(Q,{style:{color:P.color,fontWeight:P.bold?"bold":"normal"},children:P.text},w)):jsx(Q,{style:{color:E==="error"?"#ff5f56":E==="command"?"#00ff00":"#d4d4d4"},children:S}),g=async S=>{if(S.key==="Enter"&&i.trim()){let E=i.trim(),P=[...m,{type:"command",content:`${o}${E}`}];a(""),p(P);let w=await v(E);p(I=>[...I,{type:"output",content:w}]);}};return jsxs(l,{as:`--zuz-terminal --${s||d||W.Medium} flex cols p:15 bg:#1e1e1e rad:8 shadow:xl h:400 o:hidden ${u.className}`,onClick:()=>c.current?.focus(),children:[jsx(l,{ref:f,className:"--terminal-log",children:m.map((S,E)=>jsx(l,{as:"mb:4",children:jsx(H,{as:"font:mono s:14",children:C(S.content,S.type)})},E))}),jsxs(l,{as:"flex aic gap:8 --terminal-input",children:[jsx(H,{as:"font:mono s:14 c:#00ff00 b",children:o}),jsx(re,{ref:c,className:"--zuz-term-input",autoFocus:true,value:i,variant:s||d||W.Medium,onChange:S=>a(S.target.value),onKeyDown:g})]})]})},qc=Gc;var Xc=({meta:t})=>jsxs(z,{as:"flex aic --command-item",children:[t.icon&&jsx(X,{name:t.icon,as:"--command-icon"}),jsx(H,{children:t.label})]}),Yc=({position:t,onSelect:n,commands:e,visible:r})=>jsx(l,{"aria-hidden":!r,fx:{transition:q.SlideInBottom,duration:.1,when:r},className:"--command-box abs grid",style:{...t},children:e.map(o=>jsx(Xc,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),fs=Yc;var hs=forwardRef((t,n)=>{let{autoResize:e,maxHeight:r,variant:o=W.Small,resize:s="none",command:u,commands:m,onInput:p,cmd:i,renderDropdown:a,value:f,defaultValue:c,...d}=t,b=useRef(null),h=useRef(null),{style:v,className:R,rest:C}=N(d),{showDropdown:g,dropdownPosition:S,handleKeyDown:E,handleInput:P,handleCommandSelect:w}=useCommandActions({command:u,commands:m,cmd:i,ref:b}),I=useCallback(()=>{let B=b.current;!B||!e||(h.current&&cancelAnimationFrame(h.current),h.current=requestAnimationFrame(()=>{B.style.height="auto";let _=B.scrollHeight;if(r){let L=parseInt(r.toString(),10);isNaN(L)||(_=Math.min(_,L));}B.style.height=`${_}px`,B.style.overflowY=r&&_>=parseInt(r.toString(),10)?"auto":"hidden";}));},[e,r]),D=B=>{p?.(B),P(B),I();};return useEffect(()=>{I();},[f,c,I]),useEffect(()=>{e&&b.current&&I();},[e,I]),useEffect(()=>()=>{h.current&&cancelAnimationFrame(h.current);},[]),jsxs(l,{as:"rel",children:[jsx("textarea",{className:`--input --textarea --${o} flex ${R}`.trim(),style:{...v,resize:s,height:e?"auto":v?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:E,onInput:D,ref:B=>{typeof n=="function"?n(B):n&&(n.current=B),b.current=B;},value:f,defaultValue:c,...C}),a?a({show:g,position:S,commands:m||[],onSelect:w}):m&&m.length>0&&jsx(fs,{visible:g,commands:m,onSelect:w,position:S})]})});hs.displayName="Zuz.TextArea";var tp=hs;var ys=forwardRef((t,n)=>{let{as:e,value:r,color:o,direction:s,...u}=t,m=useRef(null),[p,i]=useState(r||0);return useImperativeHandle(n,()=>({updateValue(a){p.toString().length!==a.toString().length&&i(a);},setValue(a){if(this.updateValue(a),m.current){let f=a.toString().split("");m.current.querySelectorAll(".--wheel-char").forEach((c,d)=>{let b=f[d];if(c instanceof HTMLElement){c.setAttribute("data-value",b);let h=c.querySelector(".--wheel-char-track");h instanceof HTMLElement&&(h.style.setProperty("--v",b),h.offsetWidth);}});}}})),useEffect(()=>{i(r||0);},[r]),jsxs(l,{className:"--text-wheel flex aic rel","aria-hidden":true,as:e,ref:m,...u,children:[(p||0).toString().split("").map((a,f)=>isNaN(parseInt(a,10))?jsx(Q,{className:"--wheel-char wheel-char-symbol grid",children:a},`wheel-char-symbol-${f}`):jsx(Q,{"data-value":a,className:`--wheel-char grid ${f>(p||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxs(Q,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":a},children:[jsx(Q,{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((c,d)=>jsx(Q,{children:c},`${f}--${d}`)),jsx(Q,{children:!s||s==="down"?9:0})]})},`wheel-char-${f}`)),o&&jsx(l,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});ys.displayName="Zuz.TextWheel";var lp=ys;var Ss=forwardRef((t,n)=>{let{title:e,position:r,margin:o,children:s,...u}=t,{style:m,className:p,rest:i}=N(u),[a,f]=useState(false),c=useMemo(()=>r||te.Top,[]),d=useRef(null),b=useRef(null),h=g=>{},v=typeof ResizeObserver<"u"?new ResizeObserver(h):{observe:()=>{},unobserve:()=>{}},R=useDimensions(),C=useMemo(()=>{if(!b.current)return {left:0,top:0};let g=b.current.previousElementSibling;if(g){let S=g.getBoundingClientRect();switch(v.observe(g),c){case te.Top:return {left:S.left+S.width/2,top:S.top-(o||25)};case te.Bottom:return {left:S.left+S.width/2,top:S.top+(o||25)};case te.Left:return {left:S.left-S.width/2,top:S.top+S.height/2};case te.Right:return {left:S.right,top:S.top+S.height/2};default:return {left:0,top:0}}}},[b.current,R,v]);return useEffect(()=>{},[]),jsxs(l,{ref:d,className:"--with-tooltip rel",onMouseEnter:g=>f(true),onMouseLeave:g=>f(false),children:[s,jsx(l,{ref:b,style:{left:C?.left+"px",top:C?.top+"px"},className:`--tooltip --${r||te.Top} fixed ${p}`.trim(),fx:{from:c==te.Bottom||c==te.Top?{opacity:0,x:"-50%",y:c==te.Top?-5:5}:{opacity:0,y:"-50%",x:c==te.Right?15:-25},to:c==te.Bottom||c==te.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:c==te.Right?10:-20},curve:Z.EaseInOut,when:a},children:jsx(H,{className:"--text rel",children:e})})]})});Ss.displayName="Zuz.ToolTip";var fp=Ss;var Bo=forwardRef((t,n)=>{let{as:e,meta:r,nodes:o,icons:s,onSelect:u,treeTag:m,selected:p,roots:i,expanded:a,...f}=t,{tag:c,label:d,icon:b,under:h,isHead:v}=r,R=useMemo(()=>i.includes(c),[i]),[C,g]=useState(a),S=()=>{localStorage.setItem(`--tn${m}-${c}`,C?"0":"1"),g(!C);};useEffect(()=>{a||R&&!localStorage.getItem(`--tn${m}-${c}`)?(localStorage.setItem(`--tn${m}-${c}`,"1"),g(true)):g(localStorage.getItem(`--tn${m}-${c}`)=="1");},[]);let E=useMemo(()=>o.filter(P=>P.under==c),[o,c]);return jsxs(l,{className:`--treenode ${R?"--is-root":""} --treenode-${c} flex cols`,children:[jsxs(l,{className:`--node --node-${c} flex aic ${p==c?" --selected":""}`,children:[jsx(z,{skeleton:f.skeleton,onClick:S,className:"--node-aro-btn",disabled:E.length==0,children:s?.arrowClose&&s?.arrowOpen?jsx(X,{skeleton:f.skeleton,className:"--node-aro-icon",name:E.length==0?s?.arrowDisabled||s?.arrowClose:C?s?.arrowOpen:s?.arrowClose}):E.length==0?k.chevronBottom:C?k.chevronBottom:k.chevronRight}),jsxs(z,{className:"--node-meta flex aic",onClick:P=>u(c),children:[(s?.nodeOpen&&s?.nodeClose||R&&s?.rootOpen&&s?.rootClose)&&jsx(X,{skeleton:f.skeleton,className:`--node-icon ${R?"--icon-root":""}`,name:b||(C?R&&s?.rootOpen||s.nodeOpen:R&&s?.rootClose||s?.nodeClose)}),jsx(H,{className:`--node-label ${R?"--node-label-root":""}`.trim(),skeleton:f.skeleton,children:d})]})]}),C&&E.length>0&&jsx(l,{className:`--sub-node tree-sub-node-${c} flex cols`,children:E.map(P=>jsx(Bo,{treeTag:m,selected:p,onSelect:u,icons:s,roots:i,expanded:P.expanded||false,meta:P,nodes:o},`--node-${P.tag}`))})]})});Bo.displayName="TreeItem";var Ts=Bo;var Rs=forwardRef((t,n)=>{let{as:e,nodes:r,onNodeSelect:o,tag:s,icons:u,roots:m,selected:p,...i}=t,[a,f]=useState(p);useImperativeHandle(n,()=>({getSelected:()=>a}),[o]);let c=d=>{f(d),o&&o(d);};return useEffect(()=>{a!=p&&f(p);},[p]),jsx(l,{className:"--treeview flex cols",children:r.filter(d=>m.includes(d.tag)).map(d=>jsx(Ts,{treeTag:s?`-${s}`:"",selected:a,onSelect:b=>c(b),icons:u,meta:d,roots:m,expanded:d.expanded||false,skeleton:i.skeleton,nodes:r},`--node-${d.tag}`))})});Rs.displayName="Zuz.TreeView";var Sp=Rs;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
13
+ export{ie as ALERT,Bt as AVATAR,Wa as Accordion,Ja as ActionBar,ti as Alert,bi as AutoComplete,Ii as Avatar,Bi as Badge,l as Box,nl as Bubble,Xr as BubbleMediaType,qr as BubbleStatus,z as Button,Kr as CHART,ve as CHECKBOX,Rp as COLORTHEME,oo as Calendar,Qi as Chart,et as CheckBox,gl as CodeBlock,Bl as ColorScheme,Wt as ContextMenu,kl as CookiesConsent,Be as Cover,Fl as CropShape,zl as Cropper,Kl as Crumb,Ep as DATATYPE,De as DIALOG,Do as DIALOG_ACTION_POSITION,ne as DRAWER_SIDE,ql as DatePicker,zt as Dialog,Ut as Drawer,ft as FILTER,we as FORMVALIDATION,Bp as FORMVALIDATION_STYLE,Jl as Fab,tm as Filters,hm as Form,Tm as Group,X as Icon,Qe as Image,re as Input,xo as KeyboardKeys,Bn as KeysLabelMap,En as KeysMap,je as Label,Me as List,Lm as NetworkStatus,Ke as ORIGIN,Np as OriginType,Ee as Overlay,Lt as POSITION,Mp as PROGRESS,vo as Pagination,yo as PaginationStyle,_m as Password,Um as PinInput,te as Position,no as ProgressBar,Ot as RADIO,Xm as Radio,le as SHEET,Mt as SHEET_ACTION_POSITION,Pp as SKELETON,ut as SLIDER,Ip as SORT,me as SPINNER,jm as ScrollView,ic as Search,dc as Select,tt as SelectTabs,am as Sheet,mo as Slider,Q as Span,ge as Spinner,Lp as Status,hc as Switch,q as TRANSITIONS,Z as TRANSITION_CURVES,Zc as TabView,Bc as Table,Oc as TableOfContents,qc as Terminal,H as Text,lp as TextWheel,tp as Textarea,Zs as ThemeProvider,pr as ToastDefaultTitle,_t as ToastProvider,cr as ToastType,fp as ToolTip,Sp as TreeView,W as Variant,Ue as animationTransition,kt as buildClassString,Vo as buildWithStyles,Jp as css,Dt as getAnimationCurve,jp as getAnimationTransition,Is as getZuzMap,In as isKeyCombination,Ao as setZuzMap,N as useBase,za as useContextMenu,Ea as useDialog,ka as useDrawer,se as useFx,Aa as useMorph,We as usePosition,qt as useToast};