@justin_evo/evo-ui 1.0.1 → 1.1.0
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/LICENSE +21 -0
- package/README.md +70 -0
- package/dist/Nav/Nav.d.ts +15 -0
- package/dist/evo-ui.css +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +2719 -2680
- package/package.json +1 -1
- package/src/Nav/Nav.tsx +96 -14
- package/src/css/nav.module.scss +170 -15
- package/src/index.ts +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),jn=require("react-dom"),kn=r.createContext(null),Nn="evo-ui-theme";function ln(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function dn(n){if(!n||typeof window>"u")return null;try{const t=window.localStorage.getItem(n);if(t==="light"||t==="dark"||t==="system")return t}catch{}return null}const ss=({children:n,defaultTheme:t="system",storageKey:s=Nn,attribute:o="data-theme",enableTransitions:a=!0,target:i})=>{const[l,c]=r.useState(()=>dn(s)??t),[p,v]=r.useState(()=>{const D=dn(s)??t;return D==="system"?ln():D}),y=r.useRef(!0),_=r.useCallback(D=>{if(typeof document>"u")return;const $=i??document.documentElement;a&&!y.current&&($.setAttribute("data-theme-transition","true"),window.clearTimeout($.__evoThemeTimer),$.__evoThemeTimer=window.setTimeout(()=>{$.removeAttribute("data-theme-transition")},250)),o==="class"&&($.classList.remove("light","dark"),$.classList.add(D)),$.setAttribute("data-theme",D),y.current=!1},[o,a,i]);r.useEffect(()=>{_(p)},[p,_]),r.useEffect(()=>{v(l==="system"?ln():l)},[l]),r.useEffect(()=>{if(l!=="system"||typeof window>"u"||!window.matchMedia)return;const D=window.matchMedia("(prefers-color-scheme: dark)"),$=z=>{v(z.matches?"dark":"light")};return D.addEventListener("change",$),()=>D.removeEventListener("change",$)},[l]);const b=r.useCallback(D=>{if(c(D),s&&typeof window<"u")try{window.localStorage.setItem(s,D)}catch{}},[s]),M=r.useCallback(()=>{b(p==="dark"?"light":"dark")},[p,b]),k=r.useMemo(()=>({theme:l,resolvedTheme:p,setTheme:b,toggleTheme:M}),[l,p,b,M]);return e.jsx(kn.Provider,{value:k,children:n})},En=()=>{const n=r.useContext(kn);if(n)return n;const t=typeof document<"u"&&document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light";return{theme:t,resolvedTheme:t,setTheme:()=>{typeof document<"u"&&console.warn("[evo-ui] useEvoTheme called without <EvoThemeProvider>. Wrap your app in <EvoThemeProvider> to enable setTheme().")},toggleTheme:()=>{}}},os=(n=Nn)=>`(function(){try{var s=localStorage.getItem('${n}');var t=s||'system';var r=t==='system'?(matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'):t;document.documentElement.setAttribute('data-theme',r);}catch(e){}})();`,rs="_toggle_1aoav_1",as="_track_1aoav_19",is="_thumb_1aoav_29",cs="_sun_1aoav_49",ls="_moon_1aoav_54",ds="_sm_1aoav_68",us="_md_1aoav_81",hs="_lg_1aoav_94",gt={toggle:rs,track:as,thumb:is,sun:cs,moon:ls,sm:ds,md:us,lg:hs},ps=({size:n="md",ariaLabel:t="Toggle color theme",className:s})=>{const{resolvedTheme:o,toggleTheme:a}=En(),i=o==="dark",l=[gt.toggle,gt[n],s].filter(Boolean).join(" ");return e.jsx("button",{type:"button",role:"switch","aria-checked":i,"aria-label":t,onClick:a,className:l,"data-theme-state":o,children:e.jsx("span",{className:gt.track,children:e.jsxs("span",{className:gt.thumb,children:[e.jsxs("svg",{className:gt.sun,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"4"}),e.jsx("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}),e.jsx("svg",{className:gt.moon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})]})})})},_s="_button_5wbw9_1",fs="_label_5wbw9_38",ms="_icon_5wbw9_44",vs="_spinner_5wbw9_56",xs="_sm_5wbw9_72",gs="_md_5wbw9_80",bs="_lg_5wbw9_82",ys="_rounded_5wbw9_90",ws="_square_5wbw9_94",js="_iconOnly_5wbw9_106",ks="_fullWidth_5wbw9_119",Ns="_solid_5wbw9_124",Es="_outline_5wbw9_126",Ts="_ghost_5wbw9_130",Is="_soft_5wbw9_135",$s="_primary_5wbw9_139",Cs="_secondary_5wbw9_197",Ms="_danger_5wbw9_257",Ls="_warning_5wbw9_315",Ds="_success_5wbw9_371",Bs="_info_5wbw9_429",Ge={button:_s,label:fs,icon:ms,spinner:vs,"evo-btn-spin":"_evo-btn-spin_5wbw9_1",sm:xs,md:gs,lg:bs,rounded:ys,square:ws,iconOnly:js,fullWidth:ks,solid:Ns,outline:Es,ghost:Ts,soft:Is,primary:$s,secondary:Cs,danger:Ms,warning:Ls,success:Ds,info:Bs},Ss=r.forwardRef(function({label:t,children:s,variant:o="solid",severity:a="primary",size:i="md",shape:l="default",iconLeft:c,iconRight:p,loading:v=!1,loadingText:y,fullWidth:_=!1,disabled:b,type:M="button",className:k,...D},$){const q=v?y:s??t,G=b||v,H=[Ge.button,Ge[o],Ge[a],Ge[i],l!=="default"?Ge[l]:"",_?Ge.fullWidth:"",q?"":Ge.iconOnly,k].filter(Boolean).join(" ");return e.jsxs("button",{ref:$,type:M,className:H,disabled:G,"aria-busy":v||void 0,...D,children:[v?e.jsx("span",{className:Ge.spinner,"aria-hidden":"true"}):c&&e.jsx("span",{className:Ge.icon,children:c}),q!=null&&q!==""&&e.jsx("span",{className:Ge.label,children:q}),!v&&p&&e.jsx("span",{className:Ge.icon,children:p})]})}),Rs="_root_kkcxo_1",As="_elevated_kkcxo_15",zs="_outlined_kkcxo_20",Ps="_ghost_kkcxo_26",Os="_media_kkcxo_40",Ws="_interactive_kkcxo_72",Hs="_mediaImg_kkcxo_112",Fs="_header_kkcxo_119",qs="_body_kkcxo_126",Vs="_footer_kkcxo_132",Us="_title_kkcxo_141",Gs="_description_kkcxo_149",Ke={root:Rs,elevated:As,outlined:zs,ghost:Ps,"orient-vertical":"_orient-vertical_kkcxo_32","orient-horizontal":"_orient-horizontal_kkcxo_36",media:Os,"orient-responsive":"_orient-responsive_kkcxo_51",interactive:Ws,mediaImg:Hs,header:Fs,body:qs,footer:Vs,title:Us,description:Gs};function xt(...n){return n.filter(Boolean).join(" ")}function Ks(n,t,s,o){return xt(Ke.root,Ke[n],Ke[`orient-${t}`],s&&Ke.interactive,o)}const Bt=r.forwardRef(function(t,s){const{variant:o="elevated",orientation:a="vertical",interactive:i,className:l,children:c,...p}=t,v=i===!0,y=Ks(o,a,v,l);if(v&&typeof p.href=="string"){const _=p;return e.jsx("a",{ref:s,className:y,..._,children:c})}if(v){const{type:_="button",...b}=p;return e.jsx("button",{ref:s,type:_,className:y,...b,children:c})}return e.jsx("div",{ref:s,className:y,...p,children:c})});Bt.displayName="EvoCardRoot";const Ut=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ke.header,t),...s})});Ut.displayName="EvoCardHeader";const Gt=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ke.body,t),...s})});Gt.displayName="EvoCardBody";const Kt=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ke.footer,t),...s})});Kt.displayName="EvoCardFooter";const Qt=r.forwardRef(function({as:t="h3",className:s,children:o,...a},i){return r.createElement(t,{ref:i,className:xt(Ke.title,s),...a},o)});Qt.displayName="EvoCardTitle";const Yt=r.forwardRef(function({className:t,...s},o){return e.jsx("p",{ref:o,className:xt(Ke.description,t),...s})});Yt.displayName="EvoCardDescription";const Xt=r.forwardRef(function({src:t,alt:s,aspectRatio:o,className:a,style:i,children:l,...c},p){const v=o!=null?{aspectRatio:o,...i}:i;return e.jsx("div",{ref:p,className:xt(Ke.media,a),style:v,...c,children:t?e.jsx("img",{src:t,alt:s??"",className:Ke.mediaImg}):l})});Xt.displayName="EvoCardMedia";const ct=Bt;ct.Root=Bt;ct.Header=Ut;ct.Title=Qt;ct.Description=Yt;ct.Body=Gt;ct.Footer=Kt;ct.Media=Xt;const Qs={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},Ys={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},Xs=({children:n,direction:t="column",gap:s="1rem",align:o="stretch",justify:a="start",wrap:i=!1,className:l="",style:c})=>e.jsx("div",{className:l,style:{display:"flex",flexDirection:t,gap:typeof s=="number"?`${s}px`:s,alignItems:Qs[o],justifyContent:Ys[a],flexWrap:i?"wrap":"nowrap",...c},children:n}),Pt=n=>n===void 0?void 0:typeof n=="number"?`${n}px`:n,Js=({children:n,colSpan:t,rowSpan:s,className:o="",style:a})=>e.jsx("div",{className:o,style:{gridColumn:t?`span ${t}`:void 0,gridRow:s?`span ${s}`:void 0,...a},children:n}),Tn=({children:n,cols:t=3,rows:s,gap:o="1rem",colGap:a,rowGap:i,className:l="",style:c})=>e.jsx("div",{className:l,style:{display:"grid",gridTemplateColumns:typeof t=="number"?`repeat(${t}, 1fr)`:t,gridTemplateRows:s?typeof s=="number"?`repeat(${s}, auto)`:s:void 0,gap:Pt(o),columnGap:Pt(a),rowGap:Pt(i),...c},children:n});Tn.Item=Js;const Zs="_divider_rorxd_1",eo="_horizontal_rorxd_6",to="_vertical_rorxd_13",no="_labeled_rorxd_20",so="_line_rorxd_27",oo="_labelText_rorxd_33",ut={divider:Zs,horizontal:eo,vertical:to,labeled:no,line:so,labelText:oo},ro=({orientation:n="horizontal",label:t,className:s=""})=>t?e.jsxs("div",{className:`${ut.labeled} ${s}`,children:[e.jsx("div",{className:ut.line}),e.jsx("span",{className:ut.labelText,children:t}),e.jsx("div",{className:ut.line})]}):e.jsx("div",{className:[ut.divider,n==="vertical"?ut.vertical:ut.horizontal,s].filter(Boolean).join(" ")}),ao="_container_131l9_1",io="_centered_131l9_7",co="_sm_131l9_12",lo="_md_131l9_16",uo="_lg_131l9_20",ho="_xl_131l9_24",po="_full_131l9_28",Ot={container:ao,centered:io,sm:co,md:lo,lg:uo,xl:ho,full:po},_o=({children:n,size:t="lg",centered:s=!0,className:o=""})=>e.jsx("div",{className:[Ot.container,Ot[t],s?Ot.centered:"",o].filter(Boolean).join(" "),children:n}),fo="_tabs_9memw_1",mo="_tabList_9memw_6",vo="_tab_9memw_1",xo="_disabled_9memw_36",go="_active_9memw_36",bo="_tabPanel_9memw_52",wt={tabs:fo,tabList:mo,tab:vo,disabled:xo,active:go,tabPanel:bo},In=r.createContext(null),$n=()=>{const n=r.useContext(In);if(!n)throw new Error("Tab components must be used within EvoTabs");return n},yo=({children:n,className:t=""})=>e.jsx("div",{className:`${wt.tabList} ${t}`,role:"tablist",children:n}),wo=({id:n,children:t,disabled:s=!1,className:o=""})=>{const{active:a,setActive:i}=$n();return e.jsx("button",{role:"tab","aria-selected":a===n,disabled:s,className:[wt.tab,a===n?wt.active:"",s?wt.disabled:"",o].filter(Boolean).join(" "),onClick:()=>i(n),children:t})},jo=({id:n,children:t,className:s=""})=>{const{active:o}=$n();return o!==n?null:e.jsx("div",{role:"tabpanel",className:`${wt.tabPanel} ${s}`,children:t})},St=({children:n,defaultTab:t="",className:s=""})=>{const[o,a]=r.useState(t);return e.jsx(In.Provider,{value:{active:o,setActive:a},children:e.jsx("div",{className:`${wt.tabs} ${s}`,children:n})})};St.List=yo;St.Tab=wo;St.Panel=jo;const ko="_breadcrumb_7jmv3_1",No="_item_7jmv3_12",Eo="_separator_7jmv3_18",To="_link_7jmv3_28",Io="_text_7jmv3_44",$o="_current_7jmv3_49",yt={breadcrumb:ko,item:No,separator:Eo,link:To,text:Io,current:$o},Co=({children:n,href:t,current:s=!1})=>e.jsx("li",{className:yt.item,children:t&&!s?e.jsx("a",{href:t,className:yt.link,children:n}):e.jsx("span",{className:[yt.text,s?yt.current:""].filter(Boolean).join(" "),"aria-current":s?"page":void 0,children:n})}),Cn=({children:n,separator:t="/",className:s=""})=>{const o=r.Children.toArray(n);return e.jsx("nav",{"aria-label":"breadcrumb",className:s,children:e.jsx("ol",{className:yt.breadcrumb,children:o.map((a,i)=>e.jsxs(r.Fragment,{children:[a,i<o.length-1&&e.jsx("li",{className:yt.separator,"aria-hidden":"true",children:t})]},i))})})};Cn.Item=Co;const Mo="_navContainer_petvt_1",Lo="_navList_petvt_7",Do="_navLi_petvt_7",Bo="_navRow_petvt_20",So="_active_petvt_51",Ro="_disabled_petvt_65",Ao="_navRowTop_petvt_71",zo="_navRowSub_petvt_75",Po="_navLabel_petvt_83",Oo="_navIcon_petvt_92",Wo="_chevron_petvt_103",Ho="_chevronOpen_petvt_108",Fo="_navSubList_petvt_112",qo="_navGroup_petvt_124",Vo="_navGroupLabel_petvt_130",Uo="_navSkeletonItem_petvt_140",Go="_navSkeletonIcon_petvt_147",Ko="_navSkeletonText_petvt_156",Qo="_navQuickAction_petvt_172",Yo="_navTrigger_petvt_201",Xo="_navBackdrop_petvt_224",Jo="_navDesktop_petvt_232",Zo="_navMobile_petvt_236",er="_navDrawerOpen_petvt_257",_e={navContainer:Mo,navList:Lo,navLi:Do,navRow:Bo,active:So,disabled:Ro,navRowTop:Ao,navRowSub:zo,navLabel:Po,navIcon:Oo,chevron:Wo,chevronOpen:Ho,navSubList:Fo,navGroup:qo,navGroupLabel:Vo,navSkeletonItem:Uo,navSkeletonIcon:Go,navSkeletonText:Ko,navQuickAction:Qo,navTrigger:Yo,navBackdrop:Xo,navDesktop:Jo,navMobile:Zo,navDrawerOpen:er},Mn=r.createContext(null),un=r.createContext({depth:0});function tr(n){const[t,s]=r.useState(!1);return r.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const o=window.matchMedia(`(max-width: ${n-1}px)`),a=()=>s(o.matches);return a(),o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[n]),t}function Ln(n,t,s){const[o,a]=r.useState(t),i=n!==void 0,l=i?n:o,c=r.useCallback(p=>{i||a(p),s==null||s(p)},[i,s]);return[l,c]}const Ft="data-evo-nav-row";function nr(n){return n?Array.from(n.querySelectorAll(`[${Ft}]:not([data-disabled="true"])`)).filter(t=>t.offsetParent!==null):[]}function $t(n,t,s){var l;const o=nr(n);if(o.length===0)return;const a=o.indexOf(t);let i;s==="first"?i=0:s==="last"?i=o.length-1:i=Math.max(0,Math.min(o.length-1,a+s)),(l=o[i])==null||l.focus()}const sr=({open:n})=>e.jsx("svg",{viewBox:"0 0 16 16",fill:"none",width:"12",height:"12","aria-hidden":"true",className:[_e.chevron,n?_e.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx("path",{d:"M6 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),or=()=>e.jsx("svg",{viewBox:"0 0 16 16",fill:"none",width:"14",height:"14","aria-hidden":"true",children:e.jsx("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),rr=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",width:"18",height:"18","aria-hidden":"true",children:e.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),ar=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",width:"18",height:"18","aria-hidden":"true",children:e.jsx("path",{d:"M5 5l10 10M15 5L5 15",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})});function ir(n){const t=[],s=[],o=a=>{if(Array.isArray(a)){a.forEach(o);return}if(r.isValidElement(a)){const i=a.type;if(typeof i!="string"&&(i==null?void 0:i.displayName)==="EvoNavSubItem"){s.push(a);return}}t.push(a)};return o(n),{label:t,subs:s}}const Dn=r.forwardRef(function({children:t,icon:s,active:o=!1,href:a,onClick:i,open:l,defaultOpen:c=!1,onOpenChange:p,disabled:v=!1,className:y,tier:_},b){const M=r.useContext(Mn),{depth:k}=r.useContext(un),D=r.useRef(null),$=r.useId(),z=`${$}-sub`,{label:q,subs:G}=r.useMemo(()=>ir(t),[t]),H=G.length>0,[w,S]=Ln(H?l:!1,H?c:!1,p),L=r.useCallback(()=>{H&&S(!w)},[H,w,S]),I=r.useCallback(N=>{v||(H&&!a&&L(),i==null||i(N),M!=null&&M.isMobile&&a&&!H&&M.closeDrawer())},[v,H,a,i,M,L]),ee=N=>{var se,J,de;if(v)return;const V=N.currentTarget,Y=V.closest(`.${_e.navContainer}`);switch(N.key){case"ArrowDown":N.preventDefault(),$t(Y,V,1);break;case"ArrowUp":N.preventDefault(),$t(Y,V,-1);break;case"ArrowRight":if(H)if(N.preventDefault(),!w)S(!0);else{const te=V.closest("li"),oe=te==null?void 0:te.querySelector(`ul [${Ft}]`);oe==null||oe.focus()}break;case"ArrowLeft":if(N.preventDefault(),H&&w)S(!1);else if(k>0){const te=(J=(se=V.closest("li"))==null?void 0:se.parentElement)==null?void 0:J.closest("li");(de=te==null?void 0:te.querySelector(`[${Ft}]`))==null||de.focus()}break;case"Home":N.preventDefault(),$t(Y,V,"first");break;case"End":N.preventDefault(),$t(Y,V,"last");break;case"Enter":case" ":{(N.key===" "||a===void 0)&&(N.preventDefault(),I(N));break}}},O=[_e.navRow,_==="subitem"?_e.navRowSub:_e.navRowTop,o?_e.active:"",v?_e.disabled:"",y].filter(Boolean).join(" "),x=_==="subitem"&&k>0?{"--evo-nav-indent":`${k*.875}rem`}:void 0,Q={"data-evo-nav-row":"",id:$,className:O,style:x,"aria-current":o?"page":void 0,"aria-expanded":H?w:void 0,"aria-controls":H?z:void 0,"aria-disabled":v||void 0,"data-disabled":v?"true":void 0,"data-active":o?"true":void 0,tabIndex:v?-1:0,onKeyDown:ee},B=e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:_e.navIcon,children:s}),e.jsx("span",{className:_e.navLabel,children:q}),H&&e.jsx(sr,{open:w})]});let re;if(a&&!v){const N={href:a,onClick:I};re=e.jsx("a",{ref:D,...Q,...N,children:B})}else re=e.jsx("button",{ref:D,type:"button",disabled:v,onClick:I,...Q,children:B});return e.jsxs("li",{ref:b,className:_e.navLi,children:[re,H&&e.jsx(un.Provider,{value:{depth:k+1},children:e.jsx("ul",{id:z,role:"group","aria-labelledby":$,hidden:!w,className:_e.navSubList,children:G})})]})}),Jt=r.forwardRef(function(t,s){return e.jsx(Dn,{ref:s,tier:"item",...t})});Jt.displayName="EvoNavItem";const Zt=r.forwardRef(function(t,s){return e.jsx(Dn,{ref:s,tier:"subitem",...t})});Zt.displayName="EvoNavSubItem";const en=r.forwardRef(function({label:t,children:s,className:o},a){const i=r.useId();return e.jsxs("li",{ref:a,className:[_e.navGroup,o].filter(Boolean).join(" "),children:[e.jsx("div",{id:i,role:"heading","aria-level":3,className:_e.navGroupLabel,children:t}),e.jsx("ul",{role:"group","aria-labelledby":i,className:_e.navList,children:s})]})});en.displayName="EvoNavGroup";const Bn=({count:n=4})=>e.jsx(e.Fragment,{children:Array.from({length:n}).map((t,s)=>e.jsxs("li",{"aria-hidden":"true",className:_e.navSkeletonItem,children:[e.jsx("span",{className:_e.navSkeletonIcon}),e.jsx("span",{className:_e.navSkeletonText,style:{width:`${45+s%4*12}%`}})]},s))}),tn=r.forwardRef(function({label:t="Create New",icon:s,className:o,type:a="button",...i},l){return e.jsx("li",{className:_e.navLi,children:e.jsxs("button",{ref:l,type:a,className:[_e.navQuickAction,o].filter(Boolean).join(" "),...i,children:[e.jsx("span",{className:_e.navIcon,children:s??e.jsx(or,{})}),e.jsx("span",{className:_e.navLabel,children:t})]})})});tn.displayName="EvoNavQuickAction";const Sn=r.forwardRef(function({children:t,breakpoint:s=768,drawerOpen:o,defaultDrawerOpen:a=!1,onDrawerOpenChange:i,hideTrigger:l=!1,className:c,"aria-label":p="Main navigation",...v},y){const _=tr(s),[b,M]=Ln(o,a,i),k=r.useCallback(()=>M(!1),[M]),D=r.useId(),$=r.useRef(null);r.useEffect(()=>{if(!_||!b)return;const H=w=>{w.key==="Escape"&&k()};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[_,b,k]),r.useEffect(()=>{if(!_||!b)return;const H=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=H}},[_,b]),r.useEffect(()=>{!_&&b&&k()},[_,b,k]);const z=r.useMemo(()=>({isMobile:_,drawerOpen:b,setDrawerOpen:M,closeDrawer:k,rootId:D}),[_,b,M,k,D]),q=[_e.navContainer,_?_e.navMobile:_e.navDesktop,_&&b?_e.navDrawerOpen:"",c].filter(Boolean).join(" "),G=H=>{$.current=H,typeof y=="function"?y(H):y&&(y.current=H)};return e.jsxs(Mn.Provider,{value:z,children:[_&&!l&&e.jsx("button",{type:"button",className:_e.navTrigger,"aria-expanded":b,"aria-controls":D,"aria-label":b?"Close navigation":"Open navigation",onClick:()=>M(!b),children:b?e.jsx(ar,{}):e.jsx(rr,{})}),_&&b&&e.jsx("div",{className:_e.navBackdrop,"aria-hidden":"true",onClick:k}),e.jsx("nav",{ref:G,id:D,role:"navigation","aria-label":p,"aria-hidden":_&&!b?!0:void 0,className:q,...v,children:e.jsx("ul",{className:_e.navList,children:t})})]})});Sn.displayName="EvoNav";const cr=Object.assign(Sn,{Group:en,Item:Jt,SubItem:Zt,Skeleton:Bn,QuickAction:tn}),lr="_topNav_hpesm_27",dr="_topNavInner_hpesm_35",ur="_topNavBrand_hpesm_43",hr="_topNavMenu_hpesm_52",pr="_topNavItemRow_hpesm_63",_r="_topNavMenuScroll_hpesm_68",fr="_topNavItem_hpesm_63",mr="_topNavItemActive_hpesm_108",vr="_topNavItemLabel_hpesm_117",xr="_topNavIcon_hpesm_121",gr="_topNavActions_hpesm_131",br="_topNavToggle_hpesm_139",yr="_toggleIcon_hpesm_163",wr="_topNavDropdown_hpesm_167",jr="_topNavDropdownContent_hpesm_183",kr="_topNavDropdownContentOpen_hpesm_206",Nr="_topNavDropdownItem_hpesm_211",Er="_topNavMenuDrawer_hpesm_247",Tr="_topNavDropdownTrigger_hpesm_265",Ir="_topNavMenuDrawerClosed_hpesm_272",$r="_topNavDropdownInDrawer_hpesm_278",Cr="_topNavBackdrop_hpesm_291",Mr="_topNavReducedMotion_hpesm_301",he={topNav:lr,topNavInner:dr,topNavBrand:ur,topNavMenu:hr,topNavItemRow:pr,topNavMenuScroll:_r,topNavItem:fr,topNavItemActive:mr,topNavItemLabel:vr,topNavIcon:xr,topNavActions:gr,topNavToggle:br,toggleIcon:yr,topNavDropdown:wr,topNavDropdownContent:jr,topNavDropdownContentOpen:kr,topNavDropdownItem:Nr,topNavMenuDrawer:Er,topNavDropdownTrigger:Tr,topNavMenuDrawerClosed:Ir,topNavDropdownInDrawer:$r,topNavBackdrop:Cr,topNavReducedMotion:Mr},Ue=(...n)=>n.filter(Boolean).join(" ");function Lr(n,t){return s=>{n==null||n(s),s.defaultPrevented||t==null||t(s)}}function Rn(n){const{value:t,defaultValue:s,onChange:o}=n,[a,i]=r.useState(s),l=t!==void 0,c=l?t:a,p=r.useCallback(v=>{l||i(v),o==null||o(v)},[l,o]);return[c,p]}const Dr=typeof window<"u"?r.useLayoutEffect:r.useEffect;function nn(n,t=!1){const[s,o]=r.useState(t);return Dr(()=>{var l;if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(n),i=()=>o(a.matches);return i(),(l=a.addEventListener)==null||l.call(a,"change",i),()=>{var c;return(c=a.removeEventListener)==null?void 0:c.call(a,"change",i)}},[n]),s}const Br=n=>nn(`(max-width: ${n-1}px)`),Sr=()=>nn("(hover: hover) and (pointer: fine)",!0),Rr=()=>nn("(prefers-reduced-motion: reduce)");function qt(n){return n?Array.from(n.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])')).filter(t=>!t.hasAttribute("aria-hidden")&&t.offsetParent!==null):[]}const An=r.forwardRef(function({children:t,...s},o){const a=r.Children.only(t),i=a.props??{},l={...s,...i};l.className=Ue(s.className,i.className),(s.style||i.style)&&(l.style={...s.style,...i.style});for(const c of Object.keys(s))if(c.startsWith("on")&&typeof s[c]=="function"){const p=s[c],v=i[c];l[c]=Lr(p,v)}return r.cloneElement(a,l)}),Tt=r.createContext(null);function zn(n){const t=r.useContext(Tt);if(!t)throw new Error(`EvoTopNav.${n} must be rendered inside <EvoTopNav>.`);return t}const Pn=r.createContext(null),Ar=({open:n})=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",className:he.toggleIcon,children:n?e.jsx(e.Fragment,{children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}):e.jsx(e.Fragment,{children:e.jsx("path",{d:"M3 5h12M3 9h12M3 13h12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}),zr=({open:n})=>e.jsx("svg",{viewBox:"0 0 12 12",width:"10",height:"10",fill:"none","aria-hidden":"true",className:Ue(he.dropdownChevron,n&&he.dropdownChevronOpen),children:e.jsx("path",{d:"M3 4.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),On=r.forwardRef(function({children:t,className:s,...o},a){return e.jsx("div",{ref:a,className:Ue(he.topNavBrand,s),...o,children:t})}),Wn=r.forwardRef(function({children:t,className:s,...o},a){const i=zn("Menu"),l=r.useRef(null),c=_=>{l.current=_,i.menuRef.current=_,typeof a=="function"?a(_):a&&(a.current=_)},p=i.toggleCount>0,v=i.isCollapsed&&p,y=v&&!i.drawerOpen;return e.jsx("ul",{ref:c,id:i.menuId,className:Ue(he.topNavMenu,v&&he.topNavMenuDrawer,y&&he.topNavMenuDrawerClosed,i.isCollapsed&&!p&&he.topNavMenuScroll,s),"data-state":v?i.drawerOpen?"open":"closed":"inline","aria-hidden":y||void 0,...o,children:t})}),Hn=r.forwardRef(function({children:t,active:s,icon:o,href:a,target:i,rel:l,onClick:c,asChild:p,className:v},y){const _=r.useContext(Tt),b=!!_&&_.isCollapsed&&_.drawerOpen,M=z=>{c==null||c(z),!z.defaultPrevented&&b&&_.setDrawerOpen(!1)},k={className:Ue(he.topNavItem,s&&he.topNavItemActive,v),"aria-current":s?"page":void 0,"data-active":s||void 0},D=e.jsxs(e.Fragment,{children:[o&&e.jsx("span",{className:he.topNavIcon,"aria-hidden":"true",children:o}),e.jsx("span",{className:he.topNavItemLabel,children:t})]});let $;return p?$=e.jsx(An,{...k,onClick:M,ref:y,children:t}):a?$=e.jsx("a",{ref:y,href:a,target:i,rel:l??(i==="_blank"?"noopener noreferrer":void 0),onClick:M,...k,children:D}):$=e.jsx("button",{ref:y,type:"button",onClick:M,...k,children:D}),e.jsx("li",{className:he.topNavItemRow,children:$})}),Fn=r.forwardRef(function({children:t,className:s,...o},a){return e.jsx("div",{ref:a,className:Ue(he.topNavActions,s),...o,children:t})}),qn=r.forwardRef(function({icon:t,className:s,onClick:o,"aria-label":a,...i},l){const c=zn("Toggle"),p=r.useRef(null);r.useEffect(()=>c.registerToggle(),[c]);const v=_=>{p.current=_,c.toggleRef.current=_,typeof l=="function"?l(_):l&&(l.current=_)},y=_=>{o==null||o(_),_.defaultPrevented||c.setDrawerOpen(!c.drawerOpen)};return e.jsx("button",{ref:v,id:c.toggleId,type:"button",className:Ue(he.topNavToggle,s),"aria-expanded":c.drawerOpen,"aria-controls":c.menuId,"aria-label":a??(c.drawerOpen?"Close menu":"Open menu"),onClick:y,...i,children:t??e.jsx(Ar,{open:c.drawerOpen})})}),Vn=({label:n,icon:t,active:s,hoverable:o=!0,open:a,defaultOpen:i=!1,onOpenChange:l,children:c,className:p})=>{const v=r.useContext(Tt),y=!!v&&v.isCollapsed&&v.toggleCount>0,[_,b]=Rn({value:a,defaultValue:i,onChange:l}),M=Sr(),k=o&&M&&!y,D=r.useRef(null),$=r.useRef(null),z=r.useRef(null),q=r.useId(),G=r.useRef(null),H=r.useCallback(()=>{var x;b(!1),(x=D.current)==null||x.focus()},[b]);r.useEffect(()=>{if(!_||y)return;const x=Q=>{const B=z.current;B&&Q.target instanceof Node&&!B.contains(Q.target)&&b(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[_,y,b]),r.useEffect(()=>{if(!_||y)return;const x=Q=>{Q.key==="Escape"&&(Q.stopPropagation(),H())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[_,y,H]);const w=r.useCallback(x=>{var V;const Q=qt($.current);if(Q.length===0)return;const B=document.activeElement,re=B?Q.indexOf(B):-1;let N=0;x==="first"?N=0:x==="last"?N=Q.length-1:x===1?N=re<0?0:(re+1)%Q.length:N=re<0?Q.length-1:(re-1+Q.length)%Q.length,(V=Q[N])==null||V.focus()},[]),S=x=>{x.key==="ArrowDown"||x.key==="Enter"||x.key===" "?(x.preventDefault(),b(!0),requestAnimationFrame(()=>w("first"))):x.key==="ArrowUp"&&(x.preventDefault(),b(!0),requestAnimationFrame(()=>w("last")))},L=x=>{x.key==="ArrowDown"?(x.preventDefault(),w(1)):x.key==="ArrowUp"?(x.preventDefault(),w(-1)):x.key==="Home"?(x.preventDefault(),w("first")):x.key==="End"?(x.preventDefault(),w("last")):x.key==="Tab"&&b(!1)},I=()=>{k&&(G.current&&clearTimeout(G.current),b(!0))},ee=()=>{k&&(G.current&&clearTimeout(G.current),G.current=setTimeout(()=>b(!1),120))},O=r.useMemo(()=>({open:_,setOpen:b,triggerRef:D,contentRef:$,contentId:q,focusItem:w,inDrawer:y}),[_,b,q,w,y]);return e.jsx(Pn.Provider,{value:O,children:e.jsxs("li",{ref:z,className:Ue(he.topNavDropdown,y&&he.topNavDropdownInDrawer,_&&he.topNavDropdownOpen,p),onMouseEnter:I,onMouseLeave:ee,children:[e.jsxs("button",{ref:D,type:"button",className:Ue(he.topNavItem,he.topNavDropdownTrigger,s&&he.topNavItemActive),"aria-haspopup":"menu","aria-expanded":_,"aria-controls":q,"aria-current":s?"page":void 0,onClick:()=>b(!_),onKeyDown:S,children:[t&&e.jsx("span",{className:he.topNavIcon,"aria-hidden":"true",children:t}),e.jsx("span",{className:he.topNavItemLabel,children:n}),e.jsx(zr,{open:_})]}),e.jsx("ul",{ref:$,id:q,role:"menu",className:Ue(he.topNavDropdownContent,_&&he.topNavDropdownContentOpen),"aria-hidden":!_||void 0,onKeyDown:L,children:c})]})})},Un=r.forwardRef(function({children:t,icon:s,active:o,href:a,target:i,rel:l,onClick:c,asChild:p,className:v},y){const _=r.useContext(Pn),b=r.useContext(Tt),M=z=>{c==null||c(z),z.defaultPrevented||(_==null||_.setOpen(!1),b&&b.isCollapsed&&b.drawerOpen&&b.setDrawerOpen(!1))},k={className:Ue(he.topNavDropdownItem,o&&he.topNavItemActive,v),role:"menuitem","aria-current":o?"page":void 0},D=e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:he.topNavIcon,"aria-hidden":"true",children:s}),e.jsx("span",{className:he.topNavItemLabel,children:t})]});let $;return p?$=e.jsx(An,{...k,onClick:M,ref:y,children:t}):a?$=e.jsx("a",{ref:y,href:a,target:i,rel:l??(i==="_blank"?"noopener noreferrer":void 0),onClick:M,...k,children:D}):$=e.jsx("button",{ref:y,type:"button",onClick:M,...k,children:D}),e.jsx("li",{children:$})}),tt=r.forwardRef(function({children:t,open:s,defaultOpen:o=!1,onOpenChange:a,collapseBelow:i=768,className:l,...c},p){const[v,y]=Rn({value:s,defaultValue:o,onChange:a}),_=Br(i),b=Rr(),[M,k]=r.useState(0),D=r.useCallback(()=>(k(L=>L+1),()=>k(L=>Math.max(0,L-1))),[]),$=r.useId(),z=r.useId(),q=r.useRef(null),G=r.useRef(null),H=r.useRef(null),w=_&&v&&M>0;r.useEffect(()=>{!_&&v&&y(!1)},[_,v,y]),r.useEffect(()=>{if(!w)return;const L=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=L}},[w]),r.useEffect(()=>{if(!w)return;H.current=document.activeElement??null;const I=requestAnimationFrame(()=>{var x;(x=qt(q.current)[0])==null||x.focus()}),ee=O=>{if(O.key==="Escape"){O.preventDefault(),y(!1);return}if(O.key!=="Tab"||!q.current)return;const x=qt(q.current);if(x.length===0)return;const Q=x[0],B=x[x.length-1],re=document.activeElement;O.shiftKey&&re===Q?(O.preventDefault(),B.focus()):(!O.shiftKey&&re===B||re&&!q.current.contains(re))&&(O.preventDefault(),Q.focus())};return document.addEventListener("keydown",ee),()=>{cancelAnimationFrame(I),document.removeEventListener("keydown",ee)}},[w,y]),r.useEffect(()=>{if(w)return;const L=H.current;if(L&&typeof L.focus=="function"){const I=document.activeElement;(!I||I===document.body||q.current&&q.current.contains(I))&&L.focus(),H.current=null}},[w]);const S=r.useMemo(()=>({drawerOpen:v,setDrawerOpen:y,isCollapsed:_,menuId:$,toggleId:z,registerToggle:D,toggleCount:M,menuRef:q,toggleRef:G}),[v,y,_,$,z,D,M]);return e.jsx(Tt.Provider,{value:S,children:e.jsxs("nav",{ref:p,className:Ue(he.topNav,w&&he.topNavDrawerOpen,b&&he.topNavReducedMotion,l),"data-collapsed":_||void 0,"data-drawer-open":w||void 0,...c,children:[e.jsx("div",{className:he.topNavInner,children:t}),w&&e.jsx("div",{className:he.topNavBackdrop,onClick:()=>y(!1),"aria-hidden":"true"})]})})});On.displayName="EvoTopNav.Brand";Wn.displayName="EvoTopNav.Menu";Hn.displayName="EvoTopNav.Item";Fn.displayName="EvoTopNav.Actions";qn.displayName="EvoTopNav.Toggle";Vn.displayName="EvoTopNav.Dropdown";Un.displayName="EvoTopNav.DropdownItem";tt.displayName="EvoTopNav";tt.Brand=On;tt.Menu=Wn;tt.Item=Hn;tt.Actions=Fn;tt.Toggle=qn;tt.Dropdown=Vn;tt.DropdownItem=Un;const Pr="_pagination_1lhxw_1",Or="_pageBtn_1lhxw_8",Wr="_activePage_1lhxw_34",Hr="_navBtn_1lhxw_45",Fr="_ellipsis_1lhxw_49",ot={pagination:Pr,pageBtn:Or,activePage:Wr,navBtn:Hr,ellipsis:Fr},hn=(n,t)=>Array.from({length:t-n+1},(s,o)=>n+o),qr=({total:n,page:t,pageSize:s=10,siblingCount:o=1,onChange:a,className:i=""})=>{const l=Math.max(1,Math.ceil(n/s)),c=()=>{if(l<=7)return hn(1,l);const p=Math.max(2,t-o),v=Math.min(l-1,t+o),y=[1];return p>2&&y.push("..."),y.push(...hn(p,v)),v<l-1&&y.push("..."),l>1&&y.push(l),y};return e.jsxs("nav",{className:`${ot.pagination} ${i}`,"aria-label":"Pagination",children:[e.jsx("button",{className:`${ot.pageBtn} ${ot.navBtn}`,disabled:t<=1,onClick:()=>a(t-1),"aria-label":"Previous page",children:"‹"}),c().map((p,v)=>p==="..."?e.jsx("span",{className:ot.ellipsis,children:"…"},`ellipsis-${v}`):e.jsx("button",{className:[ot.pageBtn,p===t?ot.activePage:""].filter(Boolean).join(" "),onClick:()=>a(p),"aria-label":`Page ${p}`,"aria-current":p===t?"page":void 0,children:p},p)),e.jsx("button",{className:`${ot.pageBtn} ${ot.navBtn}`,disabled:t>=l,onClick:()=>a(t+1),"aria-label":"Next page",children:"›"})]})},Vr="_overlay_1qpdy_1",Ur="_palette_1qpdy_23",Gr="_searchRow_1qpdy_46",Kr="_searchIconWrap_1qpdy_54",Qr="_searchInput_1qpdy_61",Yr="_escBadge_1qpdy_75",Xr="_results_1qpdy_86",Jr="_empty_1qpdy_102",Zr="_group_1qpdy_109",ea="_groupLabel_1qpdy_113",ta="_resultItem_1qpdy_122",na="_resultActive_1qpdy_135",sa="_resultIcon_1qpdy_139",oa="_resultLabel_1qpdy_149",ra="_resultDesc_1qpdy_157",aa="_resultShortcut_1qpdy_163",ia="_footer_1qpdy_178",ca="_footerRight_1qpdy_202",De={overlay:Vr,palette:Ur,searchRow:Gr,searchIconWrap:Kr,searchInput:Qr,escBadge:Yr,results:Xr,empty:Jr,group:Zr,groupLabel:ea,resultItem:ta,resultActive:na,resultIcon:sa,resultLabel:oa,resultDesc:ra,resultShortcut:aa,footer:ia,footerRight:ca},la=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),da=()=>e.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",width:"16",height:"16",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),ua=({items:n,placeholder:t="Search commands…",open:s,onClose:o})=>{const[a,i]=r.useState(!1),[l,c]=r.useState(""),[p,v]=r.useState(0),y=r.useRef(null),_=r.useRef(null),b=s!==void 0,M=b?s:a,k=r.useCallback(()=>{b||i(!1),o==null||o()},[b,o]);r.useEffect(()=>{const w=S=>{(S.ctrlKey||S.metaKey)&&S.key==="k"&&(S.preventDefault(),b||i(L=>!L)),S.key==="Escape"&&M&&k()};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[b,M,k]),r.useEffect(()=>{if(M){c(""),v(0);const w=setTimeout(()=>{var S;return(S=y.current)==null?void 0:S.focus()},30);return()=>clearTimeout(w)}},[M]);const $=(l.trim()?n.filter(w=>{var S,L;return w.label.toLowerCase().includes(l.toLowerCase())||((S=w.description)==null?void 0:S.toLowerCase().includes(l.toLowerCase()))||((L=w.group)==null?void 0:L.toLowerCase().includes(l.toLowerCase()))}):n).reduce((w,S)=>{const L=S.group??"Actions";return w[L]||(w[L]=[]),w[L].push(S),w},{}),z=Object.values($).flat(),q=w=>{var L;const S=(L=_.current)==null?void 0:L.querySelector(`[data-idx="${w}"]`);S==null||S.scrollIntoView({block:"nearest"})},G=w=>{w.key==="ArrowDown"?(w.preventDefault(),v(S=>{const L=Math.min(S+1,z.length-1);return q(L),L})):w.key==="ArrowUp"?(w.preventDefault(),v(S=>{const L=Math.max(S-1,0);return q(L),L})):w.key==="Enter"&&z[p]&&(z[p].onSelect(),k())};if(!M)return null;let H=0;return e.jsx("div",{className:De.overlay,onClick:k,role:"dialog","aria-modal":"true",children:e.jsxs("div",{className:De.palette,onClick:w=>w.stopPropagation(),onKeyDown:G,children:[e.jsxs("div",{className:De.searchRow,children:[e.jsx("span",{className:De.searchIconWrap,children:e.jsx(da,{})}),e.jsx("input",{ref:y,className:De.searchInput,placeholder:t,value:l,onChange:w=>{c(w.target.value),v(0)},"aria-label":"Command search"}),e.jsx("kbd",{className:De.escBadge,children:"Esc"})]}),e.jsxs("div",{className:De.results,ref:_,children:[z.length===0&&e.jsxs("div",{className:De.empty,children:["No results for “",l,"”"]}),Object.entries($).map(([w,S])=>e.jsxs("div",{className:De.group,children:[e.jsx("div",{className:De.groupLabel,children:w}),S.map(L=>{const I=H++;return e.jsxs("button",{"data-idx":I,className:[De.resultItem,I===p?De.resultActive:""].filter(Boolean).join(" "),onClick:()=>{L.onSelect(),k()},onMouseEnter:()=>v(I),children:[L.icon&&e.jsx("span",{className:De.resultIcon,children:L.icon}),e.jsx("span",{className:De.resultLabel,children:L.label}),L.description&&e.jsx("span",{className:De.resultDesc,children:L.description}),L.shortcut&&e.jsx("span",{className:De.resultShortcut,children:L.shortcut.map((ee,O)=>e.jsx("kbd",{children:ee},O))})]},L.label)})]},w))]}),e.jsxs("div",{className:De.footer,children:[e.jsxs("span",{children:[e.jsx("kbd",{children:"↑"}),e.jsx("kbd",{children:"↓"})," navigate"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"↵"})," select"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"Esc"})," close"]}),e.jsxs("span",{className:De.footerRight,children:[e.jsx("kbd",{children:la?"⌘":"Ctrl"}),e.jsx("kbd",{children:"K"})," toggle"]})]})]})})},ha="_field_l0kkf_1",pa="_fullWidth_l0kkf_8",_a="_label_l0kkf_12",fa="_inputWrapper_l0kkf_18",ma="_hasError_l0kkf_30",va="_sm_l0kkf_38",xa="_md_l0kkf_42",ga="_lg_l0kkf_46",ba="_input_l0kkf_18",ya="_adornment_l0kkf_69",wa="_trailingAdornment_l0kkf_78",ja="_errorText_l0kkf_83",ka="_helperText_l0kkf_89",Ve={field:ha,fullWidth:pa,label:_a,inputWrapper:fa,hasError:ma,sm:va,md:xa,lg:ga,input:ba,adornment:ya,trailingAdornment:wa,errorText:ja,helperText:ka},Na=({label:n,helperText:t,error:s,size:o="md",leadingAdornment:a,trailingAdornment:i,fullWidth:l=!1,className:c="",id:p,...v})=>{const y=p??(n==null?void 0:n.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:[Ve.field,l?Ve.fullWidth:"",c].filter(Boolean).join(" "),children:[n&&e.jsx("label",{htmlFor:y,className:Ve.label,children:n}),e.jsxs("div",{className:[Ve.inputWrapper,Ve[o],s?Ve.hasError:""].filter(Boolean).join(" "),children:[a&&e.jsx("span",{className:Ve.adornment,children:a}),e.jsx("input",{id:y,className:Ve.input,"aria-invalid":!!s,"aria-describedby":s?`${y}-error`:t?`${y}-helper`:void 0,...v}),i&&e.jsx("span",{className:`${Ve.adornment} ${Ve.trailingAdornment}`,children:i})]}),s&&e.jsx("p",{id:`${y}-error`,className:Ve.errorText,children:s}),!s&&t&&e.jsx("p",{id:`${y}-helper`,className:Ve.helperText,children:t})]})},Ea="_field_t1e02_1",Ta="_fullWidth_t1e02_9",Ia="_label_t1e02_13",$a="_shell_t1e02_19",Ca="_hasError_t1e02_33",Ma="_disabled_t1e02_39",La="_dragOver_t1e02_43",Da="_toolbar_t1e02_48",Ba="_divider_t1e02_61",Sa="_toolBtn_t1e02_69",Ra="_toolBtnActive_t1e02_101",Aa="_editor_t1e02_110",za="_editorEmpty_t1e02_122",Pa="_dropOverlay_t1e02_186",Oa="_linkPrompt_t1e02_202",Wa="_linkInput_t1e02_211",Ha="_linkBtn_t1e02_228",Fa="_linkBtnGhost_t1e02_229",qa="_helperText_t1e02_256",Va="_errorText_t1e02_262",Ne={field:Ea,fullWidth:Ta,label:Ia,shell:$a,hasError:Ca,disabled:Ma,dragOver:La,toolbar:Da,divider:Ba,toolBtn:Sa,toolBtnActive:Ra,editor:Aa,editorEmpty:za,dropOverlay:Pa,linkPrompt:Oa,linkInput:Wa,linkBtn:Ha,linkBtnGhost:Fa,helperText:qa,errorText:Va},Ce=({children:n})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n}),Me={bold:e.jsxs(Ce,{children:[e.jsx("path",{d:"M6 4h8a4 4 0 0 1 0 8H6z"}),e.jsx("path",{d:"M6 12h9a4 4 0 0 1 0 8H6z"})]}),italic:e.jsxs(Ce,{children:[e.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),e.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),e.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]}),underline:e.jsxs(Ce,{children:[e.jsx("path",{d:"M6 3v7a6 6 0 0 0 12 0V3"}),e.jsx("line",{x1:"4",y1:"21",x2:"20",y2:"21"})]}),strike:e.jsxs(Ce,{children:[e.jsx("path",{d:"M16 4H9a3 3 0 0 0-2.83 4"}),e.jsx("path",{d:"M14 12a4 4 0 0 1 0 8H6"}),e.jsx("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}),h1:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M17 10l3-2v10"})]}),h2:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"})]}),h3:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}),e.jsx("path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"})]}),paragraph:e.jsxs(Ce,{children:[e.jsx("path",{d:"M13 4v16"}),e.jsx("path",{d:"M17 4v16"}),e.jsx("path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13"})]}),ul:e.jsxs(Ce,{children:[e.jsx("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),e.jsx("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),e.jsx("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),e.jsx("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})]}),ol:e.jsxs(Ce,{children:[e.jsx("line",{x1:"10",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"10",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"10",y1:"18",x2:"21",y2:"18"}),e.jsx("path",{d:"M4 6h1v4"}),e.jsx("path",{d:"M4 10h2"}),e.jsx("path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1"})]}),quote:e.jsxs(Ce,{children:[e.jsx("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z"}),e.jsx("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z"})]}),code:e.jsxs(Ce,{children:[e.jsx("polyline",{points:"16 18 22 12 16 6"}),e.jsx("polyline",{points:"8 6 2 12 8 18"})]}),link:e.jsxs(Ce,{children:[e.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),e.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]}),image:e.jsxs(Ce,{children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),e.jsx("polyline",{points:"21 15 16 10 5 21"})]}),alignLeft:e.jsxs(Ce,{children:[e.jsx("line",{x1:"17",y1:"10",x2:"3",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"17",y1:"18",x2:"3",y2:"18"})]}),alignCenter:e.jsxs(Ce,{children:[e.jsx("line",{x1:"18",y1:"10",x2:"6",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"18",y1:"18",x2:"6",y2:"18"})]}),alignRight:e.jsxs(Ce,{children:[e.jsx("line",{x1:"21",y1:"10",x2:"7",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"21",y1:"18",x2:"7",y2:"18"})]}),clear:e.jsx(Ce,{children:e.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),undo:e.jsxs(Ce,{children:[e.jsx("path",{d:"M3 7v6h6"}),e.jsx("path",{d:"M21 17a9 9 0 0 0-15-6.7L3 13"})]}),redo:e.jsxs(Ce,{children:[e.jsx("path",{d:"M21 7v6h-6"}),e.jsx("path",{d:"M3 17a9 9 0 0 1 15-6.7L21 13"})]})},Wt={bold:{label:"Bold",icon:Me.bold,command:"bold",shortcut:"⌘B"},italic:{label:"Italic",icon:Me.italic,command:"italic",shortcut:"⌘I"},underline:{label:"Underline",icon:Me.underline,command:"underline",shortcut:"⌘U"},strike:{label:"Strikethrough",icon:Me.strike,command:"strikeThrough",query:"strikeThrough"},h1:{label:"Heading 1",icon:Me.h1,command:"formatBlock",arg:"H1"},h2:{label:"Heading 2",icon:Me.h2,command:"formatBlock",arg:"H2"},h3:{label:"Heading 3",icon:Me.h3,command:"formatBlock",arg:"H3"},paragraph:{label:"Paragraph",icon:Me.paragraph,command:"formatBlock",arg:"P"},ul:{label:"Bulleted list",icon:Me.ul,command:"insertUnorderedList"},ol:{label:"Numbered list",icon:Me.ol,command:"insertOrderedList"},quote:{label:"Blockquote",icon:Me.quote,command:"formatBlock",arg:"BLOCKQUOTE"},code:{label:"Inline code",icon:Me.code,command:"formatBlock",arg:"PRE"},"align-left":{label:"Align left",icon:Me.alignLeft,command:"justifyLeft"},"align-center":{label:"Align center",icon:Me.alignCenter,command:"justifyCenter"},"align-right":{label:"Align right",icon:Me.alignRight,command:"justifyRight"},clear:{label:"Clear formatting",icon:Me.clear,command:"removeFormat"},undo:{label:"Undo",icon:Me.undo,command:"undo",shortcut:"⌘Z"},redo:{label:"Redo",icon:Me.redo,command:"redo",shortcut:"⇧⌘Z"}},Ua=["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"];function Ga(n){return typeof n=="object"&&n!==null}function Ka(n){return new Promise((t,s)=>{const o=new FileReader;o.onload=()=>t(String(o.result)),o.onerror=()=>s(o.error),o.readAsDataURL(n)})}function ht(n,t){try{document.execCommand(n,!1,t)}catch{}}const Qa=/^(?:P|DIV|H[1-6]|BLOCKQUOTE|PRE|UL|OL|LI|TABLE)$/;function Ct(n,t){const s=window.getSelection();if(!s||s.rangeCount===0)return null;const o=s.getRangeAt(0).startContainer,a=o.nodeType===1?o:o.parentElement;let i=null;try{i=(a==null?void 0:a.closest(t))??null}catch{return null}return i&&n.contains(i)&&i!==n?i:null}function pn(n,t){var y;const s=window.getSelection();if(!s||s.rangeCount===0)return!1;const o=s.getRangeAt(0),a=o.startContainer,i=a.nodeType===1?a:a.parentElement;if(!i)return!1;const l=[];let c=null;try{c=i.closest(t)}catch{return!1}for(;c&&n.contains(c)&&c!==n;)l.push(c),c=((y=c.parentElement)==null?void 0:y.closest(t))??null;if(l.length===0)return!1;const p=document.createElement("span");p.setAttribute("data-evo-caret",""),o.insertNode(p),l.forEach(_=>{if(Array.from(_.children).some(M=>Qa.test(M.tagName)))_.replaceWith(...Array.from(_.childNodes));else{const M=document.createElement("p");for(;_.firstChild;)M.appendChild(_.firstChild);M.childNodes.length||M.appendChild(document.createElement("br")),_.replaceWith(M)}});const v=n.querySelector("span[data-evo-caret]");if(v){const _=v.parentElement,b=document.createRange();b.setStartBefore(v),b.collapse(!0),s.removeAllRanges(),s.addRange(b),v.remove(),_&&!_.childNodes.length&&_.appendChild(document.createElement("br"))}return!0}function Ya(n){const t=/^(?:P|DIV|H[1-6]|UL|OL|PRE|BLOCKQUOTE|TABLE)$/,s=[];let o=[];const a=()=>{if(!o.length)return;const i=document.createElement("p");o.forEach(l=>i.appendChild(l)),o=[],s.push(i)};return Array.from(n.childNodes).forEach(i=>{if(i.nodeType===1&&t.test(i.tagName)){a();let l=i;if(l.tagName==="DIV"){const c=document.createElement("p");for(;l.firstChild;)c.appendChild(l.firstChild);l=c}s.push(l)}else o.push(i)}),a(),s.forEach(i=>{!i.textContent&&!i.querySelector("br,img")&&i.appendChild(document.createElement("br"))}),s}function Xa(n){const t=window.getSelection();if(!t||t.rangeCount===0)return!1;const s=t.getRangeAt(0);if(!s.collapsed)return!1;const o=s.startContainer,a=o.nodeType===1?o:o.parentElement,i=(a==null?void 0:a.closest("pre,blockquote"))??null;if(!i||!n.contains(i)||i===n)return!1;const l=document.createRange();l.setStart(s.startContainer,s.startOffset),l.setEnd(i,i.childNodes.length);const c=Ya(l.extractContents());if(c.length===0){const y=document.createElement("p");y.appendChild(document.createElement("br")),c.push(y)}let p=i;c.forEach(y=>{p.after(y),p=y}),i.firstChild||i.remove();const v=document.createRange();return v.setStart(c[0],0),v.collapse(!0),t.removeAllRanges(),t.addRange(v),!0}const Ja=["bold","italic","underline","divider","h1","h2","divider","ul","ol","divider","link","image"],Za=r.forwardRef(function({value:t,defaultValue:s,onChange:o,tools:a=Ja,placeholder:i="Start writing…",minHeight:l=160,maxHeight:c,disabled:p=!1,readOnly:v=!1,label:y,helperText:_,error:b,fullWidth:M=!1,onImageUpload:k,acceptedImageTypes:D=Ua,maxImageSize:$,onImageError:z,className:q="",id:G},H){const w=r.useRef(null),S=r.useRef(null),L=r.useRef(""),I=t!==void 0,[ee,O]=r.useState({}),[x,Q]=r.useState(!0),[B,re]=r.useState(!1),[N,V]=r.useState(null),Y=G??(y==null?void 0:y.toLowerCase().replace(/\s+/g,"-"))??void 0;r.useEffect(()=>{var u,E;const m=w.current;m&&(I?t!==L.current&&(m.innerHTML=t??"",L.current=t??"",Q(!((u=m.textContent)!=null&&u.trim()))):s&&!L.current&&(m.innerHTML=s,L.current=s,Q(!((E=m.textContent)!=null&&E.trim()))))},[t,s,I]);const se=r.useCallback(()=>{const m=w.current,u={};Object.entries(Wt).forEach(([E,T])=>{try{T.command==="formatBlock"?m?(T.arg??"").toUpperCase()==="P"?u[E]=!!Ct(m,"P,DIV")&&!Ct(m,"BLOCKQUOTE,PRE,H1,H2,H3,H4,H5,H6"):u[E]=!!Ct(m,T.arg??""):u[E]=!1:u[E]=document.queryCommandState(T.query??T.command)}catch{u[E]=!1}}),O(u)},[]),J=r.useCallback(()=>{var E;const m=w.current;if(!m)return;const u=m.innerHTML;L.current=u,Q(!((E=m.textContent)!=null&&E.trim())&&!m.querySelector("img")),o==null||o(u),se()},[o,se]);r.useImperativeHandle(H,()=>({getHTML:()=>{var m;return((m=w.current)==null?void 0:m.innerHTML)??""},setHTML:m=>{const u=w.current;u&&(u.innerHTML=m,J())},getText:()=>{var m;return((m=w.current)==null?void 0:m.textContent)??""},focus:()=>{var m;return(m=w.current)==null?void 0:m.focus()},insertImage:(m,u="")=>de(m,u),insertHTML:m=>{var u;(u=w.current)==null||u.focus(),ht("insertHTML",m),J()},clear:()=>{const m=w.current;m&&(m.innerHTML="",J())}}),[J]);const de=r.useCallback((m,u="")=>{var T;(T=w.current)==null||T.focus();const E=`<img src="${m.replace(/"/g,""")}" alt="${u.replace(/"/g,""")}" />`;ht("insertHTML",E),J()},[J]),te=r.useCallback(async m=>{if(!D.includes(m.type)){z==null||z({code:"wrong-type",message:`Unsupported image type: ${m.type}`});return}if($&&m.size>$){z==null||z({code:"too-large",message:`Image exceeds ${($/1024/1024).toFixed(1)} MB`});return}try{const u=k?await k(m):await Ka(m);de(u,m.name)}catch(u){z==null||z({code:"upload-failed",message:u instanceof Error?u.message:"Upload failed"})}},[D,$,k,z,de]),oe=r.useCallback(m=>{const u=w.current;u==null||u.focus();const E=Wt[m];if(E){if(E.command==="formatBlock"&&u){const T=E.arg??"";T.toUpperCase()!=="P"&&Ct(u,T)?pn(u,T):(pn(u,"BLOCKQUOTE,PRE,H1,H2,H3,H4,H5,H6"),ht("formatBlock",T))}else ht(E.command,E.arg);J()}},[J]),ae=r.useCallback(()=>{var m;(m=S.current)==null||m.click()},[]),Ee=r.useCallback(()=>{const m=window.getSelection(),u=m&&m.rangeCount>0?m.getRangeAt(0).cloneRange():null;V({url:"https://",range:u})},[]),Te=r.useCallback(()=>{var E,T;if(!N)return;const{url:m,range:u}=N;if((E=w.current)==null||E.focus(),u){const U=window.getSelection();U==null||U.removeAllRanges(),U==null||U.addRange(u)}if(m&&m!=="https://"){ht("createLink",m);const U=(T=w.current)==null?void 0:T.querySelectorAll('a[href="'+m+'"]');U==null||U.forEach(ge=>ge.setAttribute("target","_blank"))}V(null),J()},[N,J]),be=r.useCallback(()=>{J()},[J]),ce=r.useCallback(m=>{if(m.key==="Enter"&&!m.shiftKey&&!m.metaKey&&!m.ctrlKey&&!m.altKey){const T=w.current;if(T&&Xa(T)){m.preventDefault(),J();return}}if(!(m.metaKey||m.ctrlKey))return;const E=m.key.toLowerCase();E==="b"?(m.preventDefault(),oe("bold")):E==="i"?(m.preventDefault(),oe("italic")):E==="u"&&(m.preventDefault(),oe("underline"))},[oe,J]),Be=r.useCallback(async m=>{var T,U;const u=(T=m.clipboardData)==null?void 0:T.items;if(!u)return;for(let ge=0;ge<u.length;ge++){const ue=u[ge];if(ue.type.startsWith("image/")){m.preventDefault();const Pe=ue.getAsFile();Pe&&await te(Pe);return}}const E=(U=m.clipboardData)==null?void 0:U.getData("text/plain");E!==void 0&&E!==""&&(m.preventDefault(),ht("insertText",E))},[te]),ye=r.useCallback(m=>{m.dataTransfer.types.includes("Files")&&(m.preventDefault(),re(!0))},[]),ve=r.useCallback(()=>re(!1),[]),le=r.useCallback(async m=>{re(!1);const u=Array.from(m.dataTransfer.files??[]).filter(E=>E.type.startsWith("image/"));if(u.length!==0){m.preventDefault();for(const E of u)await te(E)}},[te]),xe=r.useCallback(async m=>{const u=Array.from(m.target.files??[]);m.target.value="";for(const E of u)await te(E)},[te]);r.useEffect(()=>{const m=()=>{const u=w.current;u&&(document.activeElement===u||u.contains(document.activeElement))&&se()};return document.addEventListener("selectionchange",m),()=>document.removeEventListener("selectionchange",m)},[se]);const We=r.useMemo(()=>a.length>0?e.jsx("div",{className:Ne.toolbar,role:"toolbar","aria-label":"Formatting toolbar",children:a.map((u,E)=>{var ge;if(u==="divider")return e.jsx("span",{className:Ne.divider,"aria-hidden":"true"},`d-${E}`);if(Ga(u)){const ue=((ge=u.isActive)==null?void 0:ge.call(u))??!1;return e.jsx("button",{type:"button",className:[Ne.toolBtn,ue?Ne.toolBtnActive:""].filter(Boolean).join(" "),title:u.label,"aria-label":u.label,"aria-pressed":ue,disabled:p||v,onMouseDown:Pe=>Pe.preventDefault(),onClick:()=>u.onAction(we()),children:u.icon},u.key)}if(u==="image")return e.jsx("button",{type:"button",className:Ne.toolBtn,title:"Insert image","aria-label":"Insert image",disabled:p||v,onMouseDown:ue=>ue.preventDefault(),onClick:ae,children:Me.image},"image");if(u==="link")return e.jsx("button",{type:"button",className:Ne.toolBtn,title:"Insert link","aria-label":"Insert link",disabled:p||v,onMouseDown:ue=>ue.preventDefault(),onClick:Ee,children:Me.link},"link");const T=Wt[u];if(!T)return null;const U=!!ee[u];return e.jsx("button",{type:"button",className:[Ne.toolBtn,U?Ne.toolBtnActive:""].filter(Boolean).join(" "),title:`${T.label}${T.shortcut?` (${T.shortcut})`:""}`,"aria-label":T.label,"aria-pressed":U,disabled:p||v,onMouseDown:ue=>ue.preventDefault(),onClick:()=>oe(u),children:T.icon},u)})}):null,[a,ee,p,v,ae,Ee,oe]),we=r.useCallback(()=>({getHTML:()=>{var m;return((m=w.current)==null?void 0:m.innerHTML)??""},setHTML:m=>{const u=w.current;u&&(u.innerHTML=m,J())},getText:()=>{var m;return((m=w.current)==null?void 0:m.textContent)??""},focus:()=>{var m;return(m=w.current)==null?void 0:m.focus()},insertImage:(m,u="")=>de(m,u),insertHTML:m=>{var u;(u=w.current)==null||u.focus(),ht("insertHTML",m),J()},clear:()=>{const m=w.current;m&&(m.innerHTML="",J())}}),[J,de]),ke={minHeight:typeof l=="number"?`${l}px`:l,maxHeight:c!==void 0?typeof c=="number"?`${c}px`:c:void 0};return e.jsxs("div",{className:[Ne.field,M?Ne.fullWidth:"",q].filter(Boolean).join(" "),children:[y&&e.jsx("label",{htmlFor:Y,className:Ne.label,children:y}),e.jsxs("div",{className:[Ne.shell,b?Ne.hasError:"",p?Ne.disabled:"",B?Ne.dragOver:""].filter(Boolean).join(" "),children:[We,e.jsx("div",{ref:w,id:Y,className:[Ne.editor,x?Ne.editorEmpty:""].filter(Boolean).join(" "),contentEditable:!p&&!v,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":y??"Rich text editor","aria-invalid":!!b,"aria-readonly":v,"aria-disabled":p,"data-placeholder":i,style:ke,onInput:be,onKeyDown:ce,onPaste:Be,onDragOver:ye,onDragLeave:ve,onDrop:le,onBlur:se}),B&&e.jsx("div",{className:Ne.dropOverlay,"aria-hidden":"true",children:e.jsx("span",{children:"Drop image to upload"})}),N&&e.jsxs("div",{className:Ne.linkPrompt,role:"dialog","aria-label":"Insert link",children:[e.jsx("input",{type:"url",className:Ne.linkInput,value:N.url,autoFocus:!0,onChange:m=>V({...N,url:m.target.value}),onKeyDown:m=>{m.key==="Enter"?(m.preventDefault(),Te()):m.key==="Escape"&&(m.preventDefault(),V(null))},placeholder:"https://example.com"}),e.jsx("button",{type:"button",className:Ne.linkBtn,onClick:Te,children:"Apply"}),e.jsx("button",{type:"button",className:Ne.linkBtnGhost,onClick:()=>V(null),children:"Cancel"})]}),e.jsx("input",{ref:S,type:"file",accept:D.join(","),multiple:!0,hidden:!0,onChange:xe})]}),b&&e.jsx("p",{className:Ne.errorText,children:b}),!b&&_&&e.jsx("p",{className:Ne.helperText,children:_})]})}),ei="_field_121w6_7",ti="_fullWidth_121w6_15",ni="_disabled_121w6_19",si="_trigger_121w6_19",oi="_label_121w6_25",ri="_selectWrapper_121w6_33",ai="_open_121w6_66",ii="_hasError_121w6_70",ci="_sm_121w6_82",li="_md_121w6_89",di="_lg_121w6_95",ui="_triggerValue_121w6_102",hi="_triggerPlaceholder_121w6_103",pi="_triggerChips_121w6_113",_i="_chipRow_121w6_120",fi="_chip_121w6_120",mi="_chipIcon_121w6_143",vi="_chipLabel_121w6_151",xi="_chipRemove_121w6_158",gi="_countMore_121w6_175",bi="_triggerText_121w6_185",yi="_triggerIcon_121w6_192",wi="_triggerActions_121w6_200",ji="_clearBtn_121w6_208",ki="_chevron_121w6_225",Ni="_chevronOpen_121w6_233",Ei="_menu_121w6_245",Ti="_menuOpen_121w6_1",Ii="_searchRow_121w6_271",$i="_searchIconWrap_121w6_280",Ci="_searchInput_121w6_286",Mi="_bulkRow_121w6_302",Li="_bulkBtn_121w6_311",Di="_bulkCount_121w6_333",Bi="_list_121w6_341",Si="_empty_121w6_367",Ri="_option_121w6_375",Ai="_optionActive_121w6_396",zi="_optionDisabled_121w6_396",Pi="_optionSelected_121w6_401",Oi="_optionTitle_121w6_404",Wi="_optionIcon_121w6_413",Hi="_optionLabel_121w6_424",Fi="_optionDesc_121w6_439",qi="_check_121w6_448",Vi="_checkbox_121w6_459",Ui="_checkboxChecked_121w6_473",Gi="_errorText_121w6_484",Ki="_helperText_121w6_491",K={field:ei,fullWidth:ti,disabled:ni,trigger:si,label:oi,selectWrapper:ri,open:ai,hasError:ii,sm:ci,md:li,lg:di,triggerValue:ui,triggerPlaceholder:hi,triggerChips:pi,chipRow:_i,chip:fi,chipIcon:mi,chipLabel:vi,chipRemove:xi,countMore:gi,triggerText:bi,triggerIcon:yi,triggerActions:wi,clearBtn:ji,chevron:ki,chevronOpen:Ni,menu:Ei,menuOpen:Ti,searchRow:Ii,searchIconWrap:$i,searchInput:Ci,bulkRow:Mi,bulkBtn:Li,bulkCount:Di,list:Bi,empty:Si,option:Ri,optionActive:Ai,optionDisabled:zi,optionSelected:Pi,optionTitle:Oi,optionIcon:Wi,optionLabel:Hi,optionDesc:Fi,check:qi,checkbox:Vi,checkboxChecked:Ui,errorText:Gi,helperText:Ki},Qi=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),_n=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),fn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),Yi=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Xi=n=>{const{label:t,options:s,placeholder:o="Select an option",helperText:a,error:i,size:l="md",fullWidth:c=!1,disabled:p=!1,searchable:v=!1,clearable:y=!1,id:_,name:b,className:M=""}=n,k=n.multiple===!0,D=k?n.multipleDisplay??"chips":"chips",$=k?n.maxSelections:void 0,z=k?n.showSelectAll??!1:!1,q=r.useId(),G=_??`evo-select-${q}`,H=`${G}-listbox`,w=n.value,S=n.defaultValue,L=w!==void 0,I=k?Array.isArray(S)?S:[]:typeof S=="string"?S:"",[ee,O]=r.useState(I),x=L?w:ee,Q=k?Array.isArray(x)?x:[]:typeof x=="string"&&x?[x]:[],[B,re]=r.useState(!1),[N,V]=r.useState(-1),[Y,se]=r.useState(""),J=r.useRef(null),de=r.useRef(null),te=r.useRef(null),oe=r.useRef(null),ae=v&&Y?s.filter(u=>u.label.toLowerCase().includes(Y.toLowerCase())):s,Ee=k?void 0:s.find(u=>u.value===x),Te=k?s.filter(u=>Q.includes(u.value)):[],be=k&&$!==void 0&&Q.length>=$,ce=r.useCallback(u=>{var E,T;L||O(u),k?(E=n.onChange)==null||E.call(n,u):(T=n.onChange)==null||T.call(n,u)},[L,k,n.onChange]),Be=r.useCallback(u=>{if(k){const E=Array.isArray(x)?x:[];if(E.includes(u))ce(E.filter(T=>T!==u));else{if($!==void 0&&E.length>=$)return;ce([...E,u])}}else ce(u)},[ce,k,$,x]);r.useEffect(()=>{if(!B)return;const u=E=>{var T;(T=J.current)!=null&&T.contains(E.target)||(re(!1),se(""))};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[B]),r.useEffect(()=>{if(B){const u=ae.findIndex(E=>Q.includes(E.value));if(V(u>=0?u:ae.findIndex(E=>!E.disabled)),v){const E=setTimeout(()=>{var T;return(T=te.current)==null?void 0:T.focus()},30);return()=>clearTimeout(E)}}else se(""),V(-1)},[B]),r.useEffect(()=>{var E;if(!B||N<0)return;const u=(E=oe.current)==null?void 0:E.querySelector(`[data-idx="${N}"]`);u==null||u.scrollIntoView({block:"nearest"})},[N,B]);const ye=u=>{if(ae.length===0)return;let E=N;for(let T=0;T<ae.length;T++)if(E=(E+u+ae.length)%ae.length,!ae[E].disabled){V(E);return}},ve=u=>{var E,T;if(!p){if(!B){(u.key==="Enter"||u.key===" "||u.key==="ArrowDown"||u.key==="ArrowUp")&&(u.preventDefault(),re(!0));return}if(u.key==="Escape")u.preventDefault(),re(!1),(E=de.current)==null||E.focus();else if(u.key==="ArrowDown")u.preventDefault(),ye(1);else if(u.key==="ArrowUp")u.preventDefault(),ye(-1);else if(u.key==="Enter"){u.preventDefault();const U=ae[N];if(U&&!U.disabled){if(!Q.includes(U.value)&&be)return;Be(U.value),k||(re(!1),(T=de.current)==null||T.focus())}}else if(u.key==="Home"){u.preventDefault();const U=ae.findIndex(ge=>!ge.disabled);U>=0&&V(U)}else if(u.key==="End"){u.preventDefault();for(let U=ae.length-1;U>=0;U--)if(!ae[U].disabled){V(U);break}}else u.key==="Tab"&&re(!1)}},le=u=>{var T;u.disabled||!Q.includes(u.value)&&be||(Be(u.value),k||(re(!1),(T=de.current)==null||T.focus()))},xe=u=>{u.stopPropagation(),ce(k?[]:"")},We=(u,E)=>{if(u.stopPropagation(),!k)return;const T=Array.isArray(x)?x:[];ce(T.filter(U=>U!==E))},we=()=>{if(!k)return;const u=ae.filter(U=>!U.disabled).map(U=>U.value),E=Array.from(new Set([...Array.isArray(x)?x:[],...u])),T=$!==void 0?E.slice(0,$):E;ce(T)},ke=k?Q.length>0:!!x,m=()=>{var u;if(!ke)return e.jsx("span",{className:K.triggerPlaceholder,children:e.jsx("span",{className:K.triggerText,children:o})});if(!k)return e.jsxs("span",{className:K.triggerValue,children:[(Ee==null?void 0:Ee.icon)&&e.jsx("span",{className:K.triggerIcon,children:Ee.icon}),e.jsx("span",{className:K.triggerText,children:Ee==null?void 0:Ee.label})]});if(D==="count"){const E=((u=Te[0])==null?void 0:u.label)??"",T=Te.length-1;return e.jsx("span",{className:K.triggerValue,children:e.jsxs("span",{className:K.triggerText,children:[E,T>0&&e.jsxs("span",{className:K.countMore,children:[", +",T," more"]})]})})}return e.jsx("span",{className:K.chipRow,children:Te.map(E=>e.jsxs("span",{className:K.chip,children:[E.icon&&e.jsx("span",{className:K.chipIcon,children:E.icon}),e.jsx("span",{className:K.chipLabel,children:E.label}),!p&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":`Remove ${E.label}`,className:K.chipRemove,onClick:T=>We(T,E.value),onMouseDown:T=>T.preventDefault(),children:e.jsx(fn,{})})]},E.value))})};return e.jsxs("div",{ref:J,className:[K.field,c?K.fullWidth:"",p?K.disabled:"",M].filter(Boolean).join(" "),children:[t&&e.jsx("label",{htmlFor:G,className:K.label,children:t}),e.jsxs("div",{className:K.selectWrapper,children:[e.jsxs("button",{ref:de,id:G,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":B,"aria-controls":H,"aria-invalid":!!i,"aria-multiselectable":k||void 0,disabled:p,className:[K.trigger,K[l],B?K.open:"",i?K.hasError:"",k&&D==="chips"&&Q.length>0?K.triggerChips:""].filter(Boolean).join(" "),onClick:()=>!p&&re(u=>!u),onKeyDown:ve,children:[m(),e.jsxs("span",{className:K.triggerActions,children:[y&&ke&&!p&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":"Clear selection",className:K.clearBtn,onClick:xe,onMouseDown:u=>u.preventDefault(),children:e.jsx(fn,{})}),e.jsx("span",{className:[K.chevron,B?K.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(Qi,{})})]})]}),B&&e.jsxs("div",{className:K.menu,role:"listbox",id:H,"aria-labelledby":G,"aria-multiselectable":k||void 0,"aria-activedescendant":N>=0?`${G}-opt-${N}`:void 0,children:[v&&e.jsxs("div",{className:K.searchRow,children:[e.jsx("span",{className:K.searchIconWrap,children:e.jsx(Yi,{})}),e.jsx("input",{ref:te,type:"text",className:K.searchInput,placeholder:"Search...",value:Y,onChange:u=>{se(u.target.value),V(0)},onKeyDown:ve})]}),k&&z&&ae.length>0&&e.jsxs("div",{className:K.bulkRow,children:[e.jsx("button",{type:"button",className:K.bulkBtn,onClick:we,disabled:$!==void 0&&Q.length>=$,children:"Select all"}),e.jsx("button",{type:"button",className:K.bulkBtn,onClick:()=>ce([]),disabled:Q.length===0,children:"Clear all"}),$!==void 0&&e.jsxs("span",{className:K.bulkCount,children:[Q.length," / ",$]})]}),e.jsx("div",{className:K.list,ref:oe,role:"presentation",children:ae.length===0?e.jsx("div",{className:K.empty,children:"No results"}):ae.map((u,E)=>{const T=Q.includes(u.value),U=E===N,ge=!T&&be,ue=u.disabled||ge;return e.jsxs("div",{id:`${G}-opt-${E}`,role:"option","aria-selected":T,"aria-disabled":ue,"data-idx":E,className:[K.option,T?K.optionSelected:"",U?K.optionActive:"",ue?K.optionDisabled:""].filter(Boolean).join(" "),onClick:()=>!ue&&le(u),onMouseEnter:()=>!ue&&V(E),children:[k&&e.jsx("span",{className:[K.checkbox,T?K.checkboxChecked:""].filter(Boolean).join(" "),"aria-hidden":"true",children:T&&e.jsx(_n,{})}),u.icon&&e.jsx("span",{className:K.optionIcon,children:u.icon}),e.jsxs("span",{className:K.optionLabel,children:[e.jsx("span",{className:K.optionTitle,children:u.label}),u.description&&e.jsx("span",{className:K.optionDesc,children:u.description})]}),!k&&e.jsx("span",{className:K.check,"aria-hidden":!0,children:T&&e.jsx(_n,{})})]},u.value)})})]}),b&&!k&&e.jsx("input",{type:"hidden",name:b,value:x}),b&&k&&Q.map(u=>e.jsx("input",{type:"hidden",name:b,value:u},u))]}),i&&e.jsx("p",{className:K.errorText,children:i}),!i&&a&&e.jsx("p",{className:K.helperText,children:a})]})},Ji="_field_sc9v8_16",Zi="_fullWidth_sc9v8_24",ec="_disabled_sc9v8_28",tc="_trigger_sc9v8_28",nc="_label_sc9v8_34",sc="_selectWrapper_sc9v8_41",oc="_open_sc9v8_70",rc="_hasError_sc9v8_74",ac="_sm_sc9v8_86",ic="_md_sc9v8_93",cc="_lg_sc9v8_99",lc="_triggerValue_sc9v8_106",dc="_triggerPlaceholder_sc9v8_107",uc="_triggerText_sc9v8_120",hc="_triggerActions_sc9v8_127",pc="_chip_sc9v8_136",_c="_chipLabel_sc9v8_152",fc="_chipRemove_sc9v8_158",mc="_chipOverflow_sc9v8_174",vc="_clearBtn_sc9v8_188",xc="_chevron_sc9v8_204",gc="_chevronOpen_sc9v8_212",bc="_menu_sc9v8_224",yc="_menuOpen_sc9v8_1",wc="_searchRow_sc9v8_250",jc="_searchIconWrap_sc9v8_259",kc="_searchInput_sc9v8_265",Nc="_tree_sc9v8_281",Ec="_empty_sc9v8_306",Tc="_row_sc9v8_314",Ic="_rowDisabled_sc9v8_331",$c="_rowActive_sc9v8_335",Cc="_rowSelected_sc9v8_340",Mc="_rowLabel_sc9v8_343",Lc="_indent_sc9v8_353",Dc="_indentUnit_sc9v8_359",Bc="_toggle_sc9v8_375",Sc="_toggleOpen_sc9v8_391",Rc="_togglePlaceholder_sc9v8_396",Ac="_spinner_sc9v8_403",zc="_spin_sc9v8_403",Pc="_checkbox_sc9v8_418",Oc="_checkboxChecked_sc9v8_436",Wc="_checkboxMixed_sc9v8_442",Hc="_rowIcon_sc9v8_449",Fc="_rowText_sc9v8_459",qc="_rowDesc_sc9v8_474",Vc="_match_sc9v8_483",Uc="_check_sc9v8_418",Gc="_menuFooter_sc9v8_502",Kc="_footerBtn_sc9v8_513",Qc="_errorText_sc9v8_529",Yc="_helperText_sc9v8_536",F={field:Ji,fullWidth:Zi,disabled:ec,trigger:tc,label:nc,selectWrapper:sc,open:oc,hasError:rc,sm:ac,md:ic,lg:cc,triggerValue:lc,triggerPlaceholder:dc,triggerText:uc,triggerActions:hc,chip:pc,chipLabel:_c,chipRemove:fc,chipOverflow:mc,clearBtn:vc,chevron:xc,chevronOpen:gc,menu:bc,menuOpen:yc,searchRow:wc,searchIconWrap:jc,searchInput:kc,tree:Nc,empty:Ec,row:Tc,rowDisabled:Ic,rowActive:$c,rowSelected:Cc,rowLabel:Mc,indent:Lc,indentUnit:Dc,toggle:Bc,toggleOpen:Sc,togglePlaceholder:Rc,spinner:Ac,spin:zc,checkbox:Pc,checkboxChecked:Oc,checkboxMixed:Wc,rowIcon:Hc,rowText:Fc,rowDesc:qc,match:Vc,check:Uc,menuFooter:Gc,footerBtn:Kc,errorText:Qc,helperText:Yc},Xc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Jc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"10",height:"10",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M6 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),mn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Zc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"10",height:"10",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 8h8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),vn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),el=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),tl=n=>{const t=new Map,s=new Map,o=new Set,a=(i,l)=>{for(const c of i)t.set(c.value,c),s.set(c.value,l),!c.children||c.children.length===0?c.isLeaf!==!1&&o.add(c.value):a(c.children,c.value)};return a(n,null),{nodeByValue:t,parentByValue:s,leafValues:o}},bt=(n,t=[])=>{if(!n.children||n.children.length===0)return t.push(n.value),t;for(const s of n.children)bt(s,t);return t},nl=(n,t,s)=>{const o=new Set,a=new Set,i=(l,c)=>{let p=!1;for(const v of l){const y=s(v,t),_=v.children?i(v.children,[...c,v.value]):!1;(y||_)&&(o.add(v.value),c.forEach(b=>o.add(b)),p=!0,y&&a.add(v.value))}return p};return i(n,[]),{visible:o,matched:a}},sl=(n,t)=>n.label.toLowerCase().includes(t.toLowerCase()),ol=(n,t)=>{if(!t)return n;const s=n.toLowerCase().indexOf(t.toLowerCase());return s===-1?n:e.jsxs(e.Fragment,{children:[n.slice(0,s),e.jsx("span",{className:F.match,children:n.slice(s,s+t.length)}),n.slice(s+t.length)]})},rl=({data:n,value:t,defaultValue:s,onChange:o,multiple:a=!1,checkStrictly:i=!1,checkedStrategy:l="leaf",expandedKeys:c,defaultExpandedKeys:p,onExpandedChange:v,defaultExpandAll:y=!1,loadChildren:_,searchable:b=!1,filter:M=sl,maxTagCount:k=3,label:D,placeholder:$=a?"Select items":"Select an item",helperText:z,error:q,size:G="md",fullWidth:H=!1,disabled:w=!1,clearable:S=!1,id:L,name:I,className:ee=""})=>{const O=r.useId(),x=L??`evo-tree-${O}`,Q=`${x}-tree`,B=t!==void 0,re=r.useMemo(()=>{const h=B?t:s;return h==null?[]:Array.isArray(h)?h:[h]},[]),[N,V]=r.useState(re),Y=r.useMemo(()=>B?t==null?[]:Array.isArray(t)?t:[t]:N,[B,t,N]),[se,J]=r.useState({}),[de,te]=r.useState(new Set),oe=r.useMemo(()=>{if(Object.keys(se).length===0)return n;const h=d=>d.map(g=>{const R=se[g.value]??g.children;return R?{...g,children:h(R)}:g});return h(n)},[n,se]),ae=r.useMemo(()=>tl(oe),[oe]),Ee=r.useMemo(()=>{if(c)return c;if(p)return p;if(y){const h=[],d=g=>g.forEach(j=>{j.children&&j.children.length&&(h.push(j.value),d(j.children))});return d(n),h}return[]},[]),[Te,be]=r.useState(Ee),ce=c??Te,Be=r.useMemo(()=>new Set(ce),[ce]),ye=r.useCallback(h=>{c===void 0&&be(h),v==null||v(h)},[c,v]),[ve,le]=r.useState(!1),[xe,We]=r.useState(""),[we,ke]=r.useState(-1),m=r.useRef(null),u=r.useRef(null),E=r.useRef(null),T=r.useRef(null),U=r.useMemo(()=>!b||!xe.trim()?null:nl(oe,xe,M),[oe,xe,b,M]),ge=r.useMemo(()=>U?U.visible:Be,[U,Be]),ue=r.useMemo(()=>{const h=[],d=(g,j)=>{for(const R of g){if(U&&!U.visible.has(R.value))continue;const Z=R.children&&R.children.length>0||R.isLeaf===!1;h.push({node:R,level:j,hasChildren:Z}),Z&&ge.has(R.value)&&R.children&&d(R.children,j+1)}};return d(oe,0),h},[oe,ge,U]),Pe=r.useMemo(()=>new Set(Y),[Y]),ze=r.useCallback(h=>{if(!a||i||!h.children||h.children.length===0)return Pe.has(h.value)?"checked":"unchecked";const d=bt(h);if(d.length===0)return Pe.has(h.value)?"checked":"unchecked";let g=0;for(const j of d)Pe.has(j)&&g++;return g===0?"unchecked":g===d.length?"checked":"mixed"},[a,i,Pe]),He=r.useCallback(h=>{if(!a||i)return Array.from(h);if(l==="leaf")return Array.from(h).filter(j=>ae.leafValues.has(j));if(l==="all"){const j=new Set(h),R=Z=>{for(const pe of Z)pe.children&&pe.children.length&&(R(pe.children),bt(pe).every(je=>h.has(je))&&j.add(pe.value))};return R(oe),Array.from(j)}const d=[],g=j=>{for(const R of j)R.children&&R.children.length?bt(R).every(pe=>h.has(pe))?d.push(R.value):g(R.children):h.has(R.value)&&d.push(R.value)};return g(oe),d},[a,i,l,oe,ae.leafValues]),Le=r.useCallback(h=>{const d=He(h);B||V(d);const g=d.map(j=>ae.nodeByValue.get(j)).filter(Boolean);o==null||o(d,g)},[He,B,ae.nodeByValue,o]),Qe=r.useCallback(h=>{B||V(h?[h]:[]),o==null||o(h,h?ae.nodeByValue.get(h)??null:null)},[B,ae.nodeByValue,o]),Ze=r.useMemo(()=>{if(!a||i)return new Set(Y);const h=new Set;for(const d of Y){const g=ae.nodeByValue.get(d);if(!g){h.add(d);continue}!g.children||g.children.length===0?h.add(d):bt(g).forEach(j=>h.add(j))}return h},[Y,a,i,ae.nodeByValue]),nt=r.useCallback(h=>{if(Be.has(h.value)){ye(ce.filter(j=>j!==h.value));return}ye([...ce,h.value]),_&&!se[h.value]&&(h.isLeaf===!1||!h.children&&h.isLeaf!==!0)&&(te(j=>new Set(j).add(h.value)),_(h).then(j=>{J(R=>({...R,[h.value]:j}))}).finally(()=>{te(j=>{const R=new Set(j);return R.delete(h.value),R})}))},[ce,Be,ye,_,se]),Ye=r.useCallback(h=>{var R;if(h.disabled)return;if(!a){Qe(h.value),le(!1),(R=u.current)==null||R.focus();return}if(i){const Z=new Set(Y);Z.has(h.value)?Z.delete(h.value):Z.add(h.value);const pe=Array.from(Z);B||V(pe);const Se=pe.map(je=>ae.nodeByValue.get(je)).filter(Boolean);o==null||o(pe,Se);return}const d=new Set(Ze),g=ze(h),j=h.children&&h.children.length?bt(h):[h.value];g==="checked"?j.forEach(Z=>d.delete(Z)):j.forEach(Z=>d.add(Z)),Le(d)},[a,i,Y,Ze,ze,Le,Qe,B,ae.nodeByValue,o]);r.useEffect(()=>{if(!ve)return;const h=d=>{var g;(g=m.current)!=null&&g.contains(d.target)||(le(!1),We(""))};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[ve]),r.useEffect(()=>{if(ve){const h=ue.findIndex(d=>Pe.has(d.node.value));if(ke(h>=0?h:ue.findIndex(d=>!d.node.disabled)),b){const d=setTimeout(()=>{var g;return(g=E.current)==null?void 0:g.focus()},30);return()=>clearTimeout(d)}}else We(""),ke(-1)},[ve]),r.useEffect(()=>{var d;if(!ve||we<0)return;const h=(d=T.current)==null?void 0:d.querySelector(`[data-idx="${we}"]`);h==null||h.scrollIntoView({block:"nearest"})},[we,ve]);const lt=h=>{if(ue.length===0)return;let d=we;for(let g=0;g<ue.length;g++)if(d=(d+h+ue.length)%ue.length,!ue[d].node.disabled){ke(d);return}},dt=h=>{var g;if(w)return;if(!ve){(h.key==="Enter"||h.key===" "||h.key==="ArrowDown"||h.key==="ArrowUp")&&(h.preventDefault(),le(!0));return}const d=ue[we];if(h.key==="Escape")h.preventDefault(),le(!1),(g=u.current)==null||g.focus();else if(h.key==="ArrowDown")h.preventDefault(),lt(1);else if(h.key==="ArrowUp")h.preventDefault(),lt(-1);else if(h.key==="ArrowRight"){if(!d)return;if(h.preventDefault(),d.hasChildren&&!Be.has(d.node.value))nt(d.node);else if(d.hasChildren){const j=we+1;j<ue.length&&ue[j].level>d.level&&ke(j)}}else if(h.key==="ArrowLeft"){if(!d)return;if(h.preventDefault(),d.hasChildren&&Be.has(d.node.value))nt(d.node);else for(let j=we-1;j>=0;j--)if(ue[j].level<d.level){ke(j);break}}else if(h.key==="Enter")h.preventDefault(),d&&Ye(d.node);else if(h.key===" "&&a)h.preventDefault(),d&&Ye(d.node);else if(h.key==="Home"){h.preventDefault();const j=ue.findIndex(R=>!R.node.disabled);j>=0&&ke(j)}else if(h.key==="End"){h.preventDefault();for(let j=ue.length-1;j>=0;j--)if(!ue[j].node.disabled){ke(j);break}}else h.key==="Tab"&&le(!1)},kt=h=>{h.stopPropagation(),a?Le(new Set):Qe("")},f=()=>{if(a){const d=Y.map(R=>ae.nodeByValue.get(R)).filter(Boolean);if(d.length===0)return e.jsx("span",{className:F.triggerPlaceholder,children:e.jsx("span",{className:F.triggerText,children:$})});const g=d.slice(0,k),j=d.length-g.length;return e.jsxs("span",{className:F.triggerValue,children:[g.map(R=>e.jsxs("span",{className:F.chip,children:[e.jsx("span",{className:F.chipLabel,children:R.label}),e.jsx("span",{role:"button","aria-label":`Remove ${R.label}`,tabIndex:-1,className:F.chipRemove,onMouseDown:Z=>Z.preventDefault(),onClick:Z=>{Z.stopPropagation(),Ye(R)},children:e.jsx(vn,{})})]},R.value)),j>0&&e.jsxs("span",{className:F.chipOverflow,children:["+",j]})]})}const h=Y[0]?ae.nodeByValue.get(Y[0]):void 0;return e.jsxs("span",{className:h?F.triggerValue:F.triggerPlaceholder,children:[(h==null?void 0:h.icon)&&e.jsx("span",{className:F.rowIcon,children:h.icon}),e.jsx("span",{className:F.triggerText,children:(h==null?void 0:h.label)??$})]})},C=(h,d)=>{const{node:g,level:j,hasChildren:R}=h,Z=Be.has(g.value),pe=ze(g),Se=!a&&Pe.has(g.value),je=d===we,Ie=de.has(g.value);return e.jsxs("div",{id:`${x}-row-${d}`,role:"treeitem","aria-level":j+1,"aria-expanded":R?Z:void 0,"aria-selected":a?void 0:Se,"aria-checked":a?pe==="mixed"?"mixed":pe==="checked"?"true":"false":void 0,"aria-disabled":g.disabled,"data-idx":d,className:[F.row,je?F.rowActive:"",Se?F.rowSelected:"",g.disabled?F.rowDisabled:""].filter(Boolean).join(" "),onClick:()=>Ye(g),onMouseEnter:()=>!g.disabled&&ke(d),children:[e.jsx("span",{className:F.indent,"aria-hidden":!0,children:Array.from({length:j}).map(($e,Re)=>e.jsx("span",{className:F.indentUnit},Re))}),R?Ie?e.jsx("span",{className:F.toggle,"aria-hidden":!0,children:e.jsx("span",{className:F.spinner})}):e.jsx("span",{className:[F.toggle,Z?F.toggleOpen:""].filter(Boolean).join(" "),role:"button",tabIndex:-1,"aria-label":Z?"Collapse":"Expand",onClick:$e=>{$e.stopPropagation(),nt(g)},onMouseDown:$e=>$e.preventDefault(),children:e.jsx(Jc,{})}):e.jsx("span",{className:F.togglePlaceholder,"aria-hidden":!0}),a&&e.jsxs("span",{className:[F.checkbox,pe==="checked"?F.checkboxChecked:"",pe==="mixed"?F.checkboxMixed:""].filter(Boolean).join(" "),"aria-hidden":!0,children:[pe==="checked"&&e.jsx(mn,{}),pe==="mixed"&&e.jsx(Zc,{})]}),g.icon&&e.jsx("span",{className:F.rowIcon,children:g.icon}),e.jsxs("span",{className:F.rowText,children:[e.jsx("span",{className:F.rowLabel,children:xe?ol(g.label,xe):g.label}),g.description&&e.jsx("span",{className:F.rowDesc,children:g.description})]}),!a&&Se&&e.jsx("span",{className:F.check,"aria-hidden":!0,children:e.jsx(mn,{})})]},g.value)},W=Y.length>0,X=a?Y.join(","):Y[0]??"";return e.jsxs("div",{ref:m,className:[F.field,H?F.fullWidth:"",w?F.disabled:"",ee].filter(Boolean).join(" "),children:[D&&e.jsx("label",{htmlFor:x,className:F.label,children:D}),e.jsxs("div",{className:F.selectWrapper,children:[e.jsxs("button",{ref:u,id:x,type:"button",role:"combobox","aria-haspopup":"tree","aria-expanded":ve,"aria-controls":Q,"aria-invalid":!!q,disabled:w,className:[F.trigger,F[G],ve?F.open:"",q?F.hasError:""].filter(Boolean).join(" "),onClick:()=>!w&&le(h=>!h),onKeyDown:dt,children:[f(),e.jsxs("span",{className:F.triggerActions,children:[S&&W&&!w&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":"Clear selection",className:F.clearBtn,onClick:kt,onMouseDown:h=>h.preventDefault(),children:e.jsx(vn,{})}),e.jsx("span",{className:[F.chevron,ve?F.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(Xc,{})})]})]}),ve&&e.jsxs("div",{className:F.menu,children:[b&&e.jsxs("div",{className:F.searchRow,children:[e.jsx("span",{className:F.searchIconWrap,children:e.jsx(el,{})}),e.jsx("input",{ref:E,type:"text",className:F.searchInput,placeholder:"Search...",value:xe,onChange:h=>{We(h.target.value),ke(0)},onKeyDown:dt})]}),e.jsx("div",{ref:T,className:F.tree,role:"tree",id:Q,"aria-labelledby":x,"aria-multiselectable":a||void 0,"aria-activedescendant":we>=0?`${x}-row-${we}`:void 0,children:ue.length===0?e.jsx("div",{className:F.empty,children:"No results"}):ue.map((h,d)=>C(h,d))}),a&&W&&e.jsxs("div",{className:F.menuFooter,children:[e.jsxs("span",{children:[Y.length," selected"]}),e.jsx("button",{type:"button",className:F.footerBtn,onClick:()=>Le(new Set),children:"Clear all"})]})]}),I&&e.jsx("input",{type:"hidden",name:I,value:X})]}),q&&e.jsx("p",{className:F.errorText,children:q}),!q&&z&&e.jsx("p",{className:F.helperText,children:z})]})},al="_field_1i6oh_7",il="_fullWidth_1i6oh_15",cl="_disabled_1i6oh_19",ll="_inputWrapper_1i6oh_19",dl="_label_1i6oh_25",ul="_acWrapper_1i6oh_33",hl="_open_1i6oh_57",pl="_hasError_1i6oh_61",_l="_sm_1i6oh_69",fl="_md_1i6oh_74",ml="_lg_1i6oh_79",vl="_searchIconWrap_1i6oh_85",xl="_input_1i6oh_19",gl="_actions_1i6oh_119",bl="_statusIcon_1i6oh_126",yl="_clearBtn_1i6oh_132",wl="_spinner_1i6oh_152",jl="_evoAcSpin_1i6oh_1",kl="_menu_1i6oh_169",Nl="_evoAcMenuOpen_1i6oh_1",El="_sectionHeader_1i6oh_200",Tl="_recoveryBox_1i6oh_216",Il="_list_1i6oh_227",$l="_empty_1i6oh_252",Cl="_statusRow_1i6oh_253",Ml="_option_1i6oh_268",Ll="_optionActive_1i6oh_290",Dl="_optionDisabled_1i6oh_290",Bl="_optionSelected_1i6oh_294",Sl="_optionTitle_1i6oh_297",Rl="_optionRecovery_1i6oh_306",Al="_optionIcon_1i6oh_310",zl="_optionLabel_1i6oh_321",Pl="_optionDesc_1i6oh_336",Ol="_mark_1i6oh_346",Wl="_check_1i6oh_353",Hl="_errorText_1i6oh_364",Fl="_helperText_1i6oh_371",ie={field:al,fullWidth:il,disabled:cl,inputWrapper:ll,label:dl,acWrapper:ul,open:hl,hasError:pl,sm:_l,md:fl,lg:ml,searchIconWrap:vl,input:xl,actions:gl,statusIcon:bl,clearBtn:yl,spinner:wl,evoAcSpin:jl,menu:kl,evoAcMenuOpen:Nl,sectionHeader:El,recoveryBox:Tl,list:Il,empty:$l,statusRow:Cl,option:Ml,optionActive:Ll,optionDisabled:Dl,optionSelected:Bl,optionTitle:Sl,optionRecovery:Rl,optionIcon:Al,optionLabel:zl,optionDesc:Pl,mark:Ol,check:Wl,errorText:Hl,helperText:Fl},ql=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Vl=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),Ul=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),xn=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M8 4.5V8l2.5 1.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Gl=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M8 1.5l1.6 4.9 4.9 1.6-4.9 1.6L8 14.5l-1.6-4.9L1.5 8l4.9-1.6L8 1.5z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"})}),gn=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",className:ie.spinner,children:[e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2",strokeOpacity:"0.25"}),e.jsx("path",{d:"M14 8a6 6 0 0 0-6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),bn=new Map,Kl=n=>({get:()=>bn.get(n)??[],set:t=>{bn.set(n,t)}}),Ql=n=>({get:()=>{if(typeof window>"u")return[];try{const t=window.localStorage.getItem(`evo-recents:${n}`),s=t?JSON.parse(t):[];return Array.isArray(s)?s.filter(o=>typeof o=="string"):[]}catch{return[]}},set:t=>{if(!(typeof window>"u"))try{window.localStorage.setItem(`evo-recents:${n}`,JSON.stringify(t))}catch{}}});function yn(n,t){const s=n.length,o=t.length;if(s===0)return o;if(o===0)return s;let a=Array.from({length:o+1},(l,c)=>c),i=new Array(o+1);for(let l=1;l<=s;l++){i[0]=l;for(let c=1;c<=o;c++){const p=n[l-1]===t[c-1]?0:1;i[c]=Math.min(a[c]+1,i[c-1]+1,a[c-1]+p)}[a,i]=[i,a]}return a[o]}function Yl(n,t){const s=t.trim().toLowerCase();if(s.length<2)return null;let o=null,a=1/0;for(const l of n){if(l.disabled)continue;const c=l.label.toLowerCase(),p=Math.min(yn(s,c),yn(s,c.slice(0,s.length)));p<a&&(a=p,o=l)}if(!o)return null;const i=Math.max(1,Math.min(3,Math.round(s.length*.4)));return a<=i?{option:o,distance:a}:null}function Xl(n,t){const s=t.trim();if(!s)return n;const o=n.toLowerCase().indexOf(s.toLowerCase());return o<0?n:e.jsxs(e.Fragment,{children:[n.slice(0,o),e.jsx("mark",{className:ie.mark,children:n.slice(o,o+s.length)}),n.slice(o+s.length)]})}const Gn=r.forwardRef(({options:n,value:t,defaultValue:s=null,onChange:o,inputValue:a,onInputChange:i,label:l,placeholder:c="Search…",helperText:p,error:v,size:y="md",fullWidth:_=!1,disabled:b=!1,clearable:M=!0,loading:k=!1,debounce:D=0,minChars:$=0,maxResults:z=50,filter:q,highlightMatch:G=!0,openOnFocus:H=!0,emptyMessage:w="No results",smartRecovery:S=!1,recents:L=!1,renderOption:I,id:ee,name:O,className:x="",...Q},B)=>{const re=r.useId(),N=ee??`evo-autocomplete-${re}`,V=`${N}-listbox`,Y=t!==void 0,[se,J]=r.useState(s),de=Y?t:se,te=r.useMemo(()=>n.find(d=>d.value===de)??null,[n,de]),oe=a!==void 0,[ae,Ee]=r.useState(()=>{var d;return((d=n.find(g=>g.value===s))==null?void 0:d.label)??""}),Te=oe?a:ae,be=r.useMemo(()=>{if(!L)return null;const d={max:5,storage:Kl(O??N),label:"Recent"};return typeof L=="object"?{...d,...L}:d},[L,O,N]),[ce,Be]=r.useState(()=>(be==null?void 0:be.storage.get())??[]),[ye,ve]=r.useState(!1),[le,xe]=r.useState(0),We=r.useRef(null),we=r.useRef(null),ke=r.useRef(null),m=r.useRef(null),u=r.useCallback(d=>{we.current=d,typeof B=="function"?B(d):B&&(B.current=d)},[B]),T=Te.trim(),U=T.length>0&&T.length<$,ge=!!be&&T.length===0&&ce.length>0,ue=r.useMemo(()=>ge?ce.map(d=>n.find(g=>g.value===d)).filter(d=>!!d&&!d.disabled).slice(0,be.max):[],[ge,ce,n,be]),Pe=r.useMemo(()=>{if(U)return[];if(q===!1||T.length===0)return n.slice(0,z);const d=typeof q=="function"?q:(g,j)=>g.label.toLowerCase().includes(j.toLowerCase());return n.filter(g=>d(g,T)).slice(0,z)},[n,q,T,U,z]),ze=ge?ue:Pe,He=r.useMemo(()=>!S||k||U||ge||ze.length>0||T.length===0?null:Yl(n,T),[S,k,U,ge,ze.length,T,n]),Le=He?[He.option]:ze;r.useEffect(()=>{if(!ye)return;const d=g=>{var j;(j=We.current)!=null&&j.contains(g.target)||Ye()};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[ye]),r.useEffect(()=>{var g;if(!ye)return;const d=(g=ke.current)==null?void 0:g.querySelector(`[data-idx="${le}"]`);d==null||d.scrollIntoView({block:"nearest"})},[le,ye]),r.useEffect(()=>{ye||oe||Ee((te==null?void 0:te.label)??"")},[de]),r.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const Qe=r.useCallback(d=>{i&&(D>0?(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>i(d),D)):i(d))},[i,D]),Ze=r.useCallback((d,g)=>{Y||J(d),o==null||o(d,g)},[Y,o]),nt=r.useCallback(d=>{be&&Be(g=>{const j=[d,...g.filter(R=>R!==d)].slice(0,be.max);return be.storage.set(j),j})},[be]),Ye=r.useCallback(()=>{ve(!1),xe(0),!oe&&te&&Ee(te.label)},[oe,te]),lt=r.useCallback(d=>{var g;d.disabled||(Ze(d.value,d),oe||Ee(d.label),Qe(d.label),nt(d.value),ve(!1),xe(0),(g=we.current)==null||g.focus())},[Ze,oe,Qe,nt]),dt=d=>{const g=d.target.value;oe||Ee(g),Qe(g),te&&g!==te.label&&Ze(null,null),xe(0),ye||ve(!0)},kt=()=>{var d;oe||Ee(""),Qe(""),Ze(null,null),xe(0),(d=we.current)==null||d.focus(),ve(!0)},f=d=>{if(Le.length===0)return;let g=le;for(let j=0;j<Le.length;j++)if(g=(g+d+Le.length)%Le.length,!Le[g].disabled){xe(g);return}},C=d=>{if(!b){if(!ye){(d.key==="ArrowDown"||d.key==="ArrowUp")&&(d.preventDefault(),ve(!0));return}switch(d.key){case"ArrowDown":d.preventDefault(),f(1);break;case"ArrowUp":d.preventDefault(),f(-1);break;case"Home":d.preventDefault(),xe(Le.findIndex(g=>!g.disabled));break;case"End":d.preventDefault();for(let g=Le.length-1;g>=0;g--)if(!Le[g].disabled){xe(g);break}break;case"Enter":{const g=Le[le];g&&!g.disabled&&(d.preventDefault(),lt(g));break}case"Escape":d.preventDefault(),Ye();break;case"Tab":Ye();break}}},W=ie[y],X=ye&&Le[le]?`${N}-opt-${le}`:void 0,h=(d,g,j)=>{const R=g===le,Z=d.value===de;return e.jsx("div",{id:`${N}-opt-${g}`,role:"option","aria-selected":Z,"aria-disabled":d.disabled||void 0,"data-idx":g,className:[ie.option,R?ie.optionActive:"",Z?ie.optionSelected:"",d.disabled?ie.optionDisabled:"",j==="recovery"?ie.optionRecovery:""].filter(Boolean).join(" "),onClick:()=>lt(d),onMouseEnter:()=>!d.disabled&&xe(g),children:I?I(d,{active:R,query:T}):e.jsxs(e.Fragment,{children:[j==="recent"&&e.jsx("span",{className:ie.optionIcon,"aria-hidden":"true",children:e.jsx(xn,{})}),j!=="recent"&&d.icon&&e.jsx("span",{className:ie.optionIcon,"aria-hidden":"true",children:d.icon}),e.jsxs("span",{className:ie.optionLabel,children:[e.jsx("span",{className:ie.optionTitle,children:G&&j==="option"?Xl(d.label,T):d.label}),d.description&&e.jsx("span",{className:ie.optionDesc,children:d.description})]}),Z&&e.jsx("span",{className:ie.check,"aria-hidden":"true",children:e.jsx(Ul,{})})]})},`${j}-${d.value}`)};return e.jsxs("div",{ref:We,className:[ie.field,_?ie.fullWidth:"",b?ie.disabled:"",x].filter(Boolean).join(" "),children:[l&&e.jsx("label",{htmlFor:N,className:ie.label,children:l}),e.jsxs("div",{className:ie.acWrapper,children:[e.jsxs("div",{className:[ie.inputWrapper,W,ye?ie.open:"",v?ie.hasError:""].filter(Boolean).join(" "),children:[e.jsx("span",{className:ie.searchIconWrap,"aria-hidden":"true",children:e.jsx(ql,{})}),e.jsx("input",{...Q,ref:u,id:N,type:"text",role:"combobox",autoComplete:"off","aria-autocomplete":"list","aria-expanded":ye,"aria-controls":V,"aria-activedescendant":X,"aria-invalid":!!v||void 0,"aria-describedby":v?`${N}-error`:p?`${N}-helper`:void 0,className:ie.input,placeholder:c,value:Te,disabled:b,onChange:dt,onKeyDown:C,onFocus:()=>H&&!b&&ve(!0)}),e.jsxs("span",{className:ie.actions,children:[k&&e.jsx("span",{className:ie.statusIcon,"aria-hidden":"true",children:e.jsx(gn,{})}),M&&!b&&(Te.length>0||de)&&e.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Clear",className:ie.clearBtn,onClick:kt,onMouseDown:d=>d.preventDefault(),children:e.jsx(Vl,{})})]})]}),ye&&e.jsx("div",{className:ie.menu,role:"listbox",id:V,"aria-label":l??"Suggestions",children:k?e.jsxs("div",{className:ie.statusRow,children:[e.jsx(gn,{}),e.jsx("span",{children:"Loading…"})]}):U?e.jsxs("div",{className:ie.empty,children:["Type ",$-T.length," more character",$-T.length===1?"":"s","…"]}):He?e.jsxs("div",{className:ie.recoveryBox,children:[e.jsxs("div",{className:ie.sectionHeader,children:[e.jsx(Gl,{}),e.jsxs("span",{children:["No exact match — did you mean",He.distance===1?" this":"","?"]})]}),e.jsx("div",{className:ie.list,ref:ke,role:"presentation",children:h(He.option,0,"recovery")})]}):Le.length>0?e.jsxs(e.Fragment,{children:[ge&&e.jsxs("div",{className:ie.sectionHeader,children:[e.jsx(xn,{}),e.jsx("span",{children:be.label})]}),e.jsx("div",{className:ie.list,ref:ke,role:"presentation",children:Le.map((d,g)=>h(d,g,ge?"recent":"option"))})]}):T.length===0?e.jsx("div",{className:ie.empty,children:"Type to search…"}):e.jsx("div",{className:ie.empty,children:w})}),O&&e.jsx("input",{type:"hidden",name:O,value:de??""})]}),v&&e.jsx("p",{id:`${N}-error`,className:ie.errorText,children:v}),!v&&p&&e.jsx("p",{id:`${N}-helper`,className:ie.helperText,children:p})]})});Gn.displayName="EvoAutoComplete";const Jl="_group_ufbfw_1",Zl="_groupLabel_ufbfw_10",ed="_checkbox_ufbfw_18",td="_disabled_ufbfw_23",nd="_input_ufbfw_28",sd="_label_ufbfw_35",od="_checkmark_ufbfw_35",rd="_labelText_ufbfw_100",ad="_helperText_ufbfw_105",et={group:Jl,groupLabel:Zl,checkbox:ed,disabled:td,input:nd,label:sd,checkmark:od,labelText:rd,helperText:ad},id=({children:n,label:t,className:s=""})=>e.jsxs("fieldset",{className:`${et.group} ${s}`,children:[t&&e.jsx("legend",{className:et.groupLabel,children:t}),n]}),Kn=({label:n,helperText:t,indeterminate:s=!1,className:o="",disabled:a,id:i,...l})=>{const c=r.useRef(null);r.useEffect(()=>{c.current&&(c.current.indeterminate=s)},[s]);const p=i??(n==null?void 0:n.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:[et.checkbox,a?et.disabled:"",o].filter(Boolean).join(" "),children:[e.jsx("input",{type:"checkbox",id:p,ref:c,disabled:a,className:et.input,...l}),e.jsxs("label",{htmlFor:p,className:et.label,children:[e.jsx("span",{className:et.checkmark}),e.jsx("span",{className:et.labelText,children:n})]}),t&&e.jsx("p",{className:et.helperText,children:t})]})};Kn.Group=id;const cd="_group_1oqsu_1",ld="_groupLabel_1oqsu_10",dd="_radio_1oqsu_18",ud="_disabled_1oqsu_22",hd="_input_1oqsu_27",pd="_label_1oqsu_34",_d="_radiomark_1oqsu_34",fd="_labelText_1oqsu_78",at={group:cd,groupLabel:ld,radio:dd,disabled:ud,input:hd,label:pd,radiomark:_d,labelText:fd},Qn=r.createContext(null),md=({children:n,name:t,value:s,onChange:o,label:a,className:i=""})=>e.jsx(Qn.Provider,{value:{name:t,value:s,onChange:o},children:e.jsxs("fieldset",{className:`${at.group} ${i}`,children:[a&&e.jsx("legend",{className:at.groupLabel,children:a}),n]})}),Yn=({value:n,label:t,disabled:s=!1,className:o=""})=>{const a=r.useContext(Qn),i=a?a.value===n:!1,l=`${(a==null?void 0:a.name)??"radio"}-${n}`;return e.jsxs("div",{className:[at.radio,s?at.disabled:"",o].filter(Boolean).join(" "),children:[e.jsx("input",{type:"radio",id:l,name:a==null?void 0:a.name,value:n,checked:i,disabled:s,className:at.input,onChange:()=>a==null?void 0:a.onChange(n)}),e.jsxs("label",{htmlFor:l,className:at.label,children:[e.jsx("span",{className:at.radiomark}),e.jsx("span",{className:at.labelText,children:t})]})]})};Yn.Group=md;const vd="_toggleWrapper_ke3d2_1",xd="_disabled_ke3d2_8",gd="_hiddenInput_ke3d2_14",bd="_track_ke3d2_21",yd="_sm_ke3d2_29",wd="_md_ke3d2_33",jd="_lg_ke3d2_37",kd="_on_ke3d2_41",Nd="_thumb_ke3d2_45",Ed="_label_ke3d2_55",rt={toggleWrapper:vd,disabled:xd,hiddenInput:gd,track:bd,sm:yd,md:wd,lg:jd,on:kd,thumb:Nd,label:Ed},wn={sm:"0.75rem",md:"1rem",lg:"1.25rem"},Td={sm:"0.75rem",md:"1rem",lg:"1.25rem"},Id=({checked:n,onChange:t,label:s,disabled:o=!1,size:a="md",className:i=""})=>e.jsxs("label",{className:[rt.toggleWrapper,o?rt.disabled:"",i].filter(Boolean).join(" "),children:[e.jsx("input",{type:"checkbox",role:"switch",className:rt.hiddenInput,checked:n,disabled:o,onChange:l=>t(l.target.checked)}),e.jsx("span",{className:[rt.track,rt[a],n?rt.on:""].filter(Boolean).join(" "),children:e.jsx("span",{className:rt.thumb,style:{width:wn[a],height:wn[a],transform:n?`translateX(${Td[a]})`:"translateX(0)"}})}),s&&e.jsx("span",{className:rt.label,children:s})]}),$d="_form_1cylw_1",Cd="_form_sm_1cylw_10",Md="_form_md_1cylw_15",Ld="_form_lg_1cylw_20",Dd="_header_1cylw_25",Bd="_headerBadge_1cylw_33",Sd="_headerTitle_1cylw_47",Rd="_headerDesc_1cylw_56",Ad="_section_1cylw_63",zd="_sectionHead_1cylw_74",Pd="_sectionTitle_1cylw_93",Od="_sectionDesc_1cylw_102",Wd="_sectionBody_1cylw_109",Hd="_section_split_1cylw_116",Fd="_row_1cylw_130",qd="_row_sm_1cylw_139",Vd="_row_md_1cylw_143",Ud="_row_lg_1cylw_147",Gd="_row_align_start_1cylw_151",Kd="_row_align_center_1cylw_155",Qd="_row_align_end_1cylw_159",Yd="_field_1cylw_163",Xd="_fieldLabel_1cylw_170",Jd="_fieldRequired_1cylw_180",Zd="_fieldControl_1cylw_186",eu="_fieldDesc_1cylw_191",tu="_fieldError_1cylw_198",nu="_field_error_1cylw_217",su="_actions_1cylw_221",ou="_actions_divider_1cylw_229",ru="_actions_left_1cylw_235",au="_actions_right_1cylw_239",iu="_actions_center_1cylw_243",cu="_actions_between_1cylw_247",me={form:$d,form_sm:Cd,form_md:Md,form_lg:Ld,header:Dd,headerBadge:Bd,headerTitle:Sd,headerDesc:Rd,section:Ad,sectionHead:zd,sectionTitle:Pd,sectionDesc:Od,sectionBody:Wd,section_split:Hd,row:Fd,row_sm:qd,row_md:Vd,row_lg:Ud,row_align_start:Gd,row_align_center:Kd,row_align_end:Qd,field:Yd,fieldLabel:Xd,fieldRequired:Jd,fieldControl:Zd,fieldDesc:eu,fieldError:tu,field_error:nu,actions:su,actions_divider:ou,actions_left:ru,actions_right:au,actions_center:iu,actions_between:cu},Xn=r.createContext({}),lu=()=>r.useContext(Xn),vt=(...n)=>n.filter(Boolean).join(" "),jt=({children:n,disabled:t=!1,size:s="md",layout:o="vertical",maxWidth:a,className:i="",style:l,...c})=>e.jsx(Xn.Provider,{value:{disabled:t,size:s,layout:o},children:e.jsx("form",{className:vt(me.form,me[`form_${s}`],me[`form_${o}`],i),style:a!==void 0?{maxWidth:a,...l}:l,...c,children:n})}),du=({title:n,description:t,badge:s,children:o,className:a=""})=>e.jsxs("header",{className:vt(me.header,a),children:[s&&e.jsx("div",{className:me.headerBadge,children:s}),n&&e.jsx("h2",{className:me.headerTitle,children:n}),t&&e.jsx("p",{className:me.headerDesc,children:t}),o]}),uu=({title:n,description:t,variant:s="stacked",children:o,className:a=""})=>e.jsxs("section",{className:vt(me.section,me[`section_${s}`],a),children:[(n||t)&&e.jsxs("div",{className:me.sectionHead,children:[n&&e.jsx("h3",{className:me.sectionTitle,children:n}),t&&e.jsx("p",{className:me.sectionDesc,children:t})]}),e.jsx("div",{className:me.sectionBody,children:o})]}),hu=({children:n,gap:t="md",align:s="start",className:o=""})=>e.jsx("div",{className:vt(me.row,me[`row_${t}`],me[`row_align_${s}`],o),children:n}),pu=({children:n,label:t,description:s,error:o,required:a,htmlFor:i,className:l=""})=>{const c=r.useId(),p=i??`evo-field-${c}`;return t||s||o?e.jsxs("div",{className:vt(me.field,o?me.field_error:"",l),children:[t&&e.jsxs("label",{htmlFor:p,className:me.fieldLabel,children:[t,a&&e.jsx("span",{className:me.fieldRequired,"aria-hidden":"true",children:"*"})]}),e.jsx("div",{className:me.fieldControl,children:n}),o?e.jsx("p",{className:me.fieldError,role:"alert",children:o}):s?e.jsx("p",{className:me.fieldDesc,children:s}):null]}):e.jsx("div",{className:vt(me.field,l),children:n})},_u=({children:n,align:t="right",divider:s=!0,className:o=""})=>e.jsx("div",{className:vt(me.actions,me[`actions_${t}`],s?me.actions_divider:"",o),children:n});jt.Header=du;jt.Section=uu;jt.Row=hu;jt.Field=pu;jt.Actions=_u;const fu="_overlay_118t4_19",mu="_overlayFadeIn_118t4_1",vu="_dialog_118t4_32",xu="_dialogSlideUp_118t4_1",gu="_sm_118t4_45",bu="_md_118t4_48",yu="_lg_118t4_51",wu="_fullscreen_118t4_54",ju="_header_118t4_60",ku="_headerContent_118t4_70",Nu="_closeBtn_118t4_78",Eu="_body_118t4_98",Tu="_footer_118t4_108",it={overlay:fu,overlayFadeIn:mu,dialog:vu,dialogSlideUp:xu,sm:gu,md:bu,lg:yu,fullscreen:wu,header:ju,headerContent:ku,closeBtn:Nu,body:Eu,footer:Tu},Iu=({children:n,onClose:t})=>e.jsxs("div",{className:it.header,children:[e.jsx("div",{className:it.headerContent,children:n}),t&&e.jsx("button",{className:it.closeBtn,onClick:t,"aria-label":"Close modal",children:"✕"})]}),$u=({children:n})=>e.jsx("div",{className:it.body,children:n}),Cu=({children:n})=>e.jsx("div",{className:it.footer,children:n}),Rt=({open:n,onClose:t,children:s,size:o="md",className:a=""})=>(r.useEffect(()=>{if(n)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[n]),r.useEffect(()=>{if(!n)return;const i=l=>{l.key==="Escape"&&t()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[n,t]),n?jn.createPortal(e.jsx("div",{className:it.overlay,onClick:i=>{i.target===i.currentTarget&&t()},children:e.jsx("div",{className:[it.dialog,it[o],a].filter(Boolean).join(" "),role:"dialog","aria-modal":"true",children:s})}),document.body):null);Rt.Header=Iu;Rt.Body=$u;Rt.Footer=Cu;const Mu="_toasterRoot_izzak_61",Lu="_srOnly_izzak_68",Du="_anchor_izzak_80",Bu="_overflowPill_izzak_145",Su="_toast_izzak_61",Ru="_evoToastEnterRight_izzak_1",Au="_evoToastEnterLeft_izzak_1",zu="_evoToastEnterTop_izzak_1",Pu="_evoToastEnterBottom_izzak_1",Ou="_exiting_izzak_207",Wu="_evoToastExit_izzak_1",Hu="_noMotion_izzak_211",Fu="_toastIcon_izzak_227",qu="_toastBody_izzak_269",Vu="_toastTitle_izzak_274",Uu="_toastDescription_izzak_279",Gu="_toastCount_izzak_285",Ku="_toastProgressTrack_izzak_303",Qu="_toastProgressFill_izzak_315",Yu="_toastAction_izzak_348",Xu="_toastClose_izzak_371",Ju="_bellWrapper_izzak_392",Zu="_bell_izzak_392",eh="_bellOpen_izzak_442",th="_bellBadge_izzak_446",nh="_bellBadgeZero_izzak_465",sh="_bellPanelHost_izzak_470",oh="_panel_izzak_514",rh="_evoPanelEnter_izzak_1",ah="_panelHeader_izzak_532",ih="_panelTitle_izzak_541",ch="_panelHeaderActions_izzak_546",lh="_panelMarkAll_izzak_552",dh="_panelClose_izzak_572",uh="_panelBody_izzak_591",hh="_panelState_izzak_595",ph="_panelStateError_izzak_605",_h="_itemList_izzak_609",fh="_emptyState_izzak_621",mh="_emptyIcon_izzak_630",vh="_emptyTitle_izzak_641",xh="_emptyHint_izzak_647",gh="_item_izzak_609",bh="_itemUnread_izzak_661",yh="_itemInteractive_izzak_665",wh="_itemUnreadDot_izzak_676",jh="_itemMedia_izzak_690",kh="_itemAvatar_izzak_716",Nh="_itemMediaGlyph_izzak_722",Eh="_itemBody_izzak_726",Th="_itemTitle_izzak_731",Ih="_itemDescription_izzak_738",$h="_itemMeta_izzak_749",Ch="_itemTimestamp_izzak_758",Mh="_itemAction_izzak_762",Lh="_itemDismiss_izzak_782",A={toasterRoot:Mu,srOnly:Lu,anchor:Du,"anchor-top-left":"_anchor-top-left_izzak_94","anchor-top-center":"_anchor-top-center_izzak_101","anchor-top-right":"_anchor-top-right_izzak_109","anchor-bottom-left":"_anchor-bottom-left_izzak_116","anchor-bottom-center":"_anchor-bottom-center_izzak_122","anchor-bottom-right":"_anchor-bottom-right_izzak_129",overflowPill:Bu,toast:Su,evoToastEnterRight:Ru,evoToastEnterLeft:Au,evoToastEnterTop:zu,evoToastEnterBottom:Pu,exiting:Ou,evoToastExit:Wu,noMotion:Hu,"sev-success":"_sev-success_izzak_224",toastIcon:Fu,"sev-error":"_sev-error_izzak_232","sev-warning":"_sev-warning_izzak_240","sev-info":"_sev-info_izzak_248",toastBody:qu,toastTitle:Vu,toastDescription:Uu,toastCount:Gu,toastProgressTrack:Ku,toastProgressFill:Qu,toastAction:Yu,toastClose:Xu,bellWrapper:Ju,bell:Zu,"bell-ghost":"_bell-ghost_izzak_418","bell-solid":"_bell-solid_izzak_422","bell-sm":"_bell-sm_izzak_427","bell-md":"_bell-md_izzak_432","bell-lg":"_bell-lg_izzak_437",bellOpen:eh,bellBadge:th,bellBadgeZero:nh,bellPanelHost:sh,"place-bottom-end":"_place-bottom-end_izzak_488","place-bottom-start":"_place-bottom-start_izzak_493","place-bottom":"_place-bottom_izzak_488","place-top-end":"_place-top-end_izzak_504","place-top-start":"_place-top-start_izzak_509",panel:oh,evoPanelEnter:rh,panelHeader:ah,panelTitle:ih,panelHeaderActions:ch,panelMarkAll:lh,panelClose:dh,panelBody:uh,panelState:hh,panelStateError:ph,itemList:_h,emptyState:fh,emptyIcon:mh,emptyTitle:vh,emptyHint:xh,item:gh,itemUnread:bh,itemInteractive:yh,itemUnreadDot:wh,itemMedia:jh,itemAvatar:kh,itemMediaGlyph:Nh,itemBody:Eh,itemTitle:Th,itemDescription:Ih,itemMeta:$h,itemTimestamp:Ch,itemAction:Mh,itemDismiss:Lh},Jn={defaultAnchor:"top-right",defaultDuration:4e3,maxVisible:3,pauseOnFocusLoss:!0,persistErrors:!1},Dh=180,Bh=Object.freeze([]),Sh=Object.freeze({items:Object.freeze([]),unread:0});class Rh{constructor(){this.toasts=[],this.inboxItems=[],this.inboxSnapshot={items:[],unread:0},this.inboxOwnedExternally=!1,this.inboxOnChange=null,this.toastListeners=new Set,this.inboxListeners=new Set,this.configListeners=new Set,this.config=Jn,this.counter=0}setConfig(t){const s={...this.config,...t};Object.keys(s).some(a=>s[a]!==this.config[a])&&(this.config=s,this.notifyConfig())}getConfig(){return this.config}subscribeConfig(t){return this.configListeners.add(t),()=>{this.configListeners.delete(t)}}notifyConfig(){this.configListeners.forEach(t=>t())}resolveDuration(t,s){return t.persistent===!0?1/0:t.duration!=null?t.duration:s==="error"&&this.config.persistErrors&&t.persistent!==!1?1/0:this.config.defaultDuration}bindExternalInbox(t,s){t!==void 0?(this.inboxOwnedExternally=!0,this.inboxItems=t,this.inboxOnChange=s??null,this.refreshInboxSnapshot(),this.notifyInbox()):(this.inboxOwnedExternally=!1,this.inboxOnChange=null)}refreshInboxSnapshot(){let t=0;for(const s of this.inboxItems)s.read||(t+=1);this.inboxSnapshot={items:this.inboxItems,unread:t}}nextId(){return this.counter+=1,`evo-${Date.now().toString(36)}-${this.counter}`}pushToast(t,s={}){const o=s.severity??"info";if(s.groupKey!=null&&s.id==null){const c=this.toasts.find(p=>p.groupKey===s.groupKey&&!p.exiting);if(c)return this.toasts=this.toasts.map(p=>p.id===c.id?{...p,...s,id:c.id,severity:o,duration:this.resolveDuration(s,o),message:t,count:p.count+1,restartKey:p.restartKey+1}:p),this.applyInboxSideEffect(c.id,t,s),this.notifyToasts(),c.id}const a=s.id??this.nextId(),i=this.resolveDuration(s,o);if(this.toasts.find(c=>c.id===a))this.toasts=this.toasts.map(c=>c.id===a?{...c,...s,id:a,severity:o,duration:i,message:t,restartKey:c.restartKey+1,exiting:!1}:c);else{const c={...s,id:a,severity:o,duration:i,message:t,createdAt:Date.now(),count:1,restartKey:0};this.toasts=[...this.toasts,c]}return this.applyInboxSideEffect(a,t,s),this.notifyToasts(),a}applyInboxSideEffect(t,s,o){if(!o.inbox)return;const a={id:`${t}-inbox`,title:o.title??s,description:o.description,severity:o.severity??"info",icon:o.icon,action:o.action,...typeof o.inbox=="object"?o.inbox:{}};this.pushInbox(a)}updateToast(t,s){const o=this.toasts.findIndex(l=>l.id===t);if(o===-1)return;const a=this.toasts[o],i={...a,...s,id:t,severity:s.severity??a.severity,message:"title"in s&&s.title!=null?s.title:a.message,restartKey:a.restartKey+1};s.persistent===!0?i.duration=1/0:s.duration!=null?i.duration=s.duration:s.persistent===!1&&(i.duration=this.resolveDuration({...s,persistent:!1},i.severity)),this.toasts=this.toasts.map(l=>l.id===t?i:l),this.notifyToasts()}dismissToast(t,s="dismiss"){var a,i;if(t==null){const l=this.toasts.filter(c=>!c.exiting);if(l.length===0)return;l.forEach(c=>{var p;return(p=c.onDismiss)==null?void 0:p.call(c,c.id)}),this.toasts=this.toasts.map(c=>c.exiting?c:{...c,exiting:!0}),this.notifyToasts();return}const o=this.toasts.find(l=>l.id===t);!o||o.exiting||(s==="auto"?(a=o.onAutoClose)==null||a.call(o,t):(i=o.onDismiss)==null||i.call(o,t),this.toasts=this.toasts.map(l=>l.id===t?{...l,exiting:!0}:l),this.notifyToasts())}removeToast(t){const s=this.toasts.length;this.toasts=this.toasts.filter(o=>o.id!==t),this.toasts.length!==s&&this.notifyToasts()}getToasts(){return this.toasts}subscribeToasts(t){return this.toastListeners.add(t),()=>{this.toastListeners.delete(t)}}notifyToasts(){this.toastListeners.forEach(t=>t(this.toasts))}pushInbox(t){const s=t.id??this.nextId(),o=t.timestamp instanceof Date?t.timestamp.getTime():t.timestamp??Date.now(),a={id:s,title:t.title,description:t.description,severity:t.severity??"info",icon:t.icon,avatarUrl:t.avatarUrl,timestamp:o,read:t.read??!1,action:t.action,onClick:t.onClick,meta:t.meta},l=this.inboxItems.findIndex(c=>c.id===s)===-1?[a,...this.inboxItems]:this.inboxItems.map(c=>c.id===s?a:c);if(this.commitInbox(l),t.toast){const c={id:`${s}-toast`,title:a.title,description:a.description,severity:a.severity,icon:a.icon,action:a.action,...typeof t.toast=="object"?t.toast:{}};this.pushToast(a.title,c)}return s}markRead(t){this.commitInbox(this.inboxItems.map(s=>s.id===t?{...s,read:!0}:s))}markUnread(t){this.commitInbox(this.inboxItems.map(s=>s.id===t?{...s,read:!1}:s))}markAllRead(){this.commitInbox(this.inboxItems.map(t=>t.read?t:{...t,read:!0}))}removeInbox(t){this.commitInbox(this.inboxItems.filter(s=>s.id!==t))}clearInbox(){this.commitInbox([])}setInboxItems(t){this.commitInbox(t)}getInboxState(){return this.inboxSnapshot}subscribeInbox(t){return this.inboxListeners.add(t),()=>{this.inboxListeners.delete(t)}}commitInbox(t){var s;this.inboxItems=t,this.refreshInboxSnapshot(),this.inboxOwnedExternally&&((s=this.inboxOnChange)==null||s.call(this,t)),this.notifyInbox()}notifyInbox(){const t=this.inboxSnapshot;this.inboxListeners.forEach(s=>s(t))}}const ne=new Rh,Ah=(n,t)=>ne.pushToast(n,t),Je=Ah;Je.success=(n,t)=>ne.pushToast(n,{...t,severity:"success"});Je.error=(n,t)=>ne.pushToast(n,{...t,severity:"error"});Je.warning=(n,t)=>ne.pushToast(n,{...t,severity:"warning"});Je.info=(n,t)=>ne.pushToast(n,{...t,severity:"info"});Je.loading=(n,t)=>ne.pushToast(n,{...t,severity:"info",persistent:!0,dismissible:!1});Je.update=(n,t)=>ne.updateToast(n,t);Je.dismiss=n=>ne.dismissToast(n);Je.promise=(n,t)=>{const s=ne.pushToast(typeof t.loading=="object"&&t.loading!==null&&!Mt(t.loading)?t.loading.title??"":t.loading,{...typeof t.loading=="object"&&!Mt(t.loading)?t.loading:{},severity:"info",persistent:!0,dismissible:!1});return(typeof n=="function"?n():n).then(a=>{const i=typeof t.success=="function"?t.success(a):t.success,l=i!==null&&typeof i=="object"&&!Mt(i),c=l?i:{},p=l?c.title??"":i;ne.updateToast(s,{...c,severity:"success",persistent:!1,dismissible:!0,title:p})},a=>{const i=typeof t.error=="function"?t.error(a):t.error,l=i!==null&&typeof i=="object"&&!Mt(i),c=l?i:{},p=l?c.title??"":i;ne.updateToast(s,{...c,severity:"error",persistent:!1,dismissible:!0,title:p})}),s};Je.progress=(n,t)=>{const s=ne.pushToast(n,{...t,severity:(t==null?void 0:t.severity)??"info",persistent:!0,dismissible:(t==null?void 0:t.dismissible)??!1,progress:Vt((t==null?void 0:t.progress)??0)});return{id:s,setProgress:o=>ne.updateToast(s,{progress:Vt(o)}),update:o=>ne.updateToast(s,o),done:o=>ne.updateToast(s,{...o,severity:(o==null?void 0:o.severity)??"success",progress:1,persistent:!1,dismissible:!0}),fail:o=>ne.updateToast(s,{...o,severity:(o==null?void 0:o.severity)??"error",persistent:!1,dismissible:!0}),dismiss:()=>ne.dismissToast(s)}};function Mt(n){if(n==null)return!0;const t=typeof n;return!!(t==="string"||t==="number"||t==="boolean"||Array.isArray(n)||t==="object"&&n!==null&&"$$typeof"in n)}function Vt(n){return typeof n!="number"||Number.isNaN(n)||n<0?0:n>1?1:n}const zh={toast:Je,push:n=>ne.pushInbox(n),inbox:{markRead:n=>ne.markRead(n),markUnread:n=>ne.markUnread(n),markAllRead:()=>ne.markAllRead(),remove:n=>ne.removeInbox(n),clear:()=>ne.clearInbox(),setItems:n=>ne.setInboxItems(n),getState:()=>ne.getInboxState(),subscribe:n=>ne.subscribeInbox(n)},dismissAll:()=>ne.dismissToast()};function Xe(...n){return n.filter(Boolean).join(" ")}const Zn={success:"✓",error:"✕",warning:"!",info:"i"};function Ph(n,t){const s=Math.max(0,t-n),o=Math.floor(s/1e3);if(o<60)return"just now";const a=Math.floor(o/60);if(a<60)return`${a}m ago`;const i=Math.floor(a/60);if(i<24)return`${i}h ago`;const l=Math.floor(i/24);return l<7?`${l}d ago`:new Date(n).toLocaleDateString()}function es(n){const t=[],s=n.title??n.message;return(typeof s=="string"||typeof s=="number")&&t.push(String(s)),(typeof n.description=="string"||typeof n.description=="number")&&t.push(String(n.description)),t.join(". ")}function Oh(){return r.useSyncExternalStore(n=>ne.subscribeToasts(()=>n()),()=>ne.getToasts(),()=>Bh)}function sn(){return r.useSyncExternalStore(n=>ne.subscribeInbox(()=>n()),()=>ne.getInboxState(),()=>Sh)}function Wh(){return r.useSyncExternalStore(n=>ne.subscribeConfig(n),()=>ne.getConfig(),()=>Jn)}const on=({children:n,defaultAnchor:t="top-right",maxVisible:s=3,defaultDuration:o=4e3,pauseOnFocusLoss:a=!0,persistErrors:i=!1,inboxItems:l,onInboxChange:c})=>(r.useLayoutEffect(()=>{ne.setConfig({defaultAnchor:t,maxVisible:s,defaultDuration:o,pauseOnFocusLoss:a,persistErrors:i})},[t,s,o,a,i]),r.useLayoutEffect(()=>{ne.bindExternalInbox(l,c)},[l,c]),e.jsx(e.Fragment,{children:n}));on.displayName="EvoNotificationProvider";const Hh=({toast:n,anchor:t,index:s,total:o,hovered:a,pausedExternally:i,reducedMotion:l})=>{const c=r.useRef(0),p=r.useRef(null),v=r.useRef(null),y=r.useRef(n.restartKey),_=n.exiting??!1,b=a||i,M=Number.isFinite(n.duration);r.useEffect(()=>{if(!_)return;const x=window.setTimeout(()=>ne.removeToast(n.id),l?0:Dh);return()=>window.clearTimeout(x)},[_,l,n.id]),r.useEffect(()=>{if(y.current!==n.restartKey&&(y.current=n.restartKey,c.current=0),!M||_)return;if(b){p.current!=null&&(c.current+=Date.now()-p.current,p.current=null),v.current!=null&&(window.clearTimeout(v.current),v.current=null);return}const x=Math.max(0,n.duration-c.current);return p.current=Date.now(),v.current=window.setTimeout(()=>ne.dismissToast(n.id,"auto"),x),()=>{v.current!=null&&(window.clearTimeout(v.current),v.current=null),p.current!=null&&(c.current+=Date.now()-p.current,p.current=null)}},[b,M,_,n.duration,n.restartKey,n.id]);const k=o-1-s,D=a?1:Math.max(.94,1-k*.04),$=a?k*8:k*6,z=a?1:Math.max(.7,1-k*.15),q=t.startsWith("bottom")?1:-1,G={transform:`translateY(${$*q}px) scale(${D})`,opacity:z,zIndex:1e3+s},H=n.dismissible??!0,w=n.icon??Zn[n.severity],S=n.title??n.message,L=es(n),I=typeof n.progress=="number",ee=I?Vt(n.progress):0,O=L!=="";return e.jsxs("div",{className:Xe(A.toast,A[`sev-${n.severity}`],_&&A.exiting,l&&A.noMotion,n.className),style:G,role:O?"group":n.severity==="error"?"alert":"status","aria-label":O?L:void 0,children:[e.jsx("span",{className:A.toastIcon,"aria-hidden":"true",children:w}),e.jsxs("div",{className:A.toastBody,children:[S!=null&&e.jsxs("div",{className:A.toastTitle,children:[S,n.count>1&&e.jsxs("span",{className:A.toastCount,"aria-label":`repeated ${n.count} times`,children:["×",n.count]})]}),n.description!=null&&e.jsx("div",{className:A.toastDescription,children:n.description})]}),n.action&&e.jsx("button",{type:"button",className:A.toastAction,onClick:x=>{n.action.onClick(x),ne.dismissToast(n.id)},children:n.action.label}),H&&e.jsx("button",{type:"button",className:A.toastClose,onClick:()=>{ne.dismissToast(n.id)},"aria-label":"Dismiss notification",children:"✕"}),I&&e.jsx("div",{className:A.toastProgressTrack,role:"progressbar","aria-valuemin":0,"aria-valuemax":1,"aria-valuenow":ee,children:e.jsx("div",{className:A.toastProgressFill,style:{transform:`scaleX(${ee})`}})})]})},Fh=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"];let Nt=null;const rn=({anchor:n,className:t})=>{const s=Oh(),{defaultAnchor:o,maxVisible:a,pauseOnFocusLoss:i}=Wh(),l=n??o,[c,p]=r.useState(null),[v,y]=r.useState(!0),[_,b]=r.useState(!1),[M,k]=r.useState(!1),[D,$]=r.useState(!1),[z,q]=r.useState(""),[G,H]=r.useState(""),w=r.useRef(new Set),S=r.useRef(null);if(S.current||(S.current=Symbol("evo-toaster")),r.useEffect(()=>{const I=S.current;return Nt==null?(Nt=I,$(!0)):Nt!==I&&console.warn("[EvoNotification] More than one <EvoNotificationToaster> is mounted; only the first renders. Remove the duplicate(s)."),()=>{Nt===I&&(Nt=null)}},[]),r.useEffect(()=>{var O;if(k(!0),typeof window>"u")return;const I=window.matchMedia("(prefers-reduced-motion: reduce)");b(I.matches);const ee=x=>b(x.matches);return(O=I.addEventListener)==null||O.call(I,"change",ee),()=>{var x;return(x=I.removeEventListener)==null?void 0:x.call(I,"change",ee)}},[]),r.useEffect(()=>{if(!i)return;const I=()=>y(!0),ee=()=>y(!1);return window.addEventListener("focus",I),window.addEventListener("blur",ee),()=>{window.removeEventListener("focus",I),window.removeEventListener("blur",ee)}},[i]),r.useEffect(()=>{const I=w.current,ee=new Set;for(const O of s){if(ee.add(O.id),I.has(O.id)||O.exiting)continue;I.add(O.id);const x=es(O);x&&(O.severity==="error"?H(x):q(x))}for(const O of I)ee.has(O)||I.delete(O)},[s]),r.useEffect(()=>{const I=ee=>{if(ee.key==="Escape"&&c!=null){const O=s.filter(x=>!x.exiting&&(x.anchor??l)===c);O.length>0&&ne.dismissToast(O[O.length-1].id)}};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[s,l,c]),!M||typeof document>"u"||!D)return null;const L={"top-left":[],"top-center":[],"top-right":[],"bottom-left":[],"bottom-center":[],"bottom-right":[]};for(const I of s){const ee=I.anchor??l;L[ee].push(I)}return jn.createPortal(e.jsxs("div",{className:Xe(A.toasterRoot,t),"aria-label":"Notifications",children:[e.jsx("div",{className:A.srOnly,"aria-live":"polite","aria-atomic":"true",children:z}),e.jsx("div",{className:A.srOnly,"aria-live":"assertive","aria-atomic":"true",children:G}),Fh.map(I=>{const ee=L[I];if(ee.length===0)return null;const O=Math.max(0,ee.length-a),x=ee.slice(Math.max(0,ee.length-a)),Q=c===I,B=!v;return e.jsxs("div",{className:Xe(A.anchor,A[`anchor-${I}`]),onMouseEnter:()=>p(I),onMouseLeave:()=>p(null),onFocus:()=>p(I),onBlur:re=>{re.currentTarget.contains(re.relatedTarget)||p(null)},children:[O>0&&e.jsxs("div",{className:A.overflowPill,"aria-hidden":"true",children:["+",O," more"]}),x.map((re,N)=>e.jsx(Hh,{toast:re,anchor:I,index:N,total:x.length,hovered:Q,pausedExternally:B,reducedMotion:_},re.id))]},I)})]}),document.body)};rn.displayName="EvoNotificationToaster";const an=r.forwardRef(function({variant:t="ghost",size:s="md",hideZero:o=!0,maxBadgeCount:a=99,panelPlacement:i="bottom-end",renderPanel:l="popover",panelTitle:c,panelEmptyState:p,className:v,onClick:y,..._},b){const{unread:M}=sn(),[k,D]=r.useState(!1),$=r.useRef(null),z=r.useId();r.useEffect(()=>{if(!k||l!=="popover")return;const H=S=>{var L;(L=$.current)!=null&&L.contains(S.target)||D(!1)},w=S=>{S.key==="Escape"&&D(!1)};return document.addEventListener("mousedown",H),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",H),document.removeEventListener("keydown",w)}},[k,l]);const q=M>a?`${a}+`:String(M),G=M>0||!o;return e.jsxs("div",{ref:$,className:A.bellWrapper,children:[e.jsxs("button",{ref:b,type:"button",className:Xe(A.bell,A[`bell-${t}`],A[`bell-${s}`],k&&A.bellOpen,v),"aria-label":M>0?`Notifications, ${M} unread`:"Notifications","aria-haspopup":l==="popover"?"dialog":void 0,"aria-expanded":l==="popover"?k:void 0,"aria-controls":l==="popover"?z:void 0,onClick:H=>{y==null||y(H),l==="popover"&&D(w=>!w)},..._,children:[e.jsx(ts,{}),G&&e.jsx("span",{className:Xe(A.bellBadge,M===0&&A.bellBadgeZero),children:q})]}),l==="popover"&&k&&e.jsx("div",{id:z,className:Xe(A.bellPanelHost,A[`place-${i}`]),children:e.jsx(At,{open:!0,onClose:()=>D(!1),title:c,emptyState:p})})]})});an.displayName="EvoNotificationBell";const ts=()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 8 3 8H3s3-1 3-8"}),e.jsx("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"})]}),At=r.forwardRef(function({open:t=!0,onClose:s,title:o="Notifications",emptyState:a,loading:i=!1,error:l,showMarkAllRead:c=!0,maxHeight:p=480,className:v,style:y,..._},b){const{items:M,unread:k}=sn();return t?e.jsxs("div",{ref:b,className:Xe(A.panel,v),role:"dialog","aria-label":typeof o=="string"?o:"Notifications",style:y,..._,children:[e.jsxs("header",{className:A.panelHeader,children:[e.jsx("div",{className:A.panelTitle,children:o}),e.jsxs("div",{className:A.panelHeaderActions,children:[c&&k>0&&e.jsx("button",{type:"button",className:A.panelMarkAll,onClick:()=>ne.markAllRead(),children:"Mark all read"}),s&&e.jsx("button",{type:"button",className:A.panelClose,onClick:s,"aria-label":"Close notifications",children:"✕"})]})]}),e.jsx("div",{className:A.panelBody,style:{maxHeight:typeof p=="number"?`${p}px`:p},children:i?e.jsx("div",{className:A.panelState,children:"Loading…"}):l?e.jsx("div",{className:Xe(A.panelState,A.panelStateError),children:l}):M.length===0?e.jsx("div",{className:A.panelState,children:a??e.jsx(qh,{})}):e.jsx("ul",{className:A.itemList,children:M.map(D=>e.jsx("li",{children:e.jsx(zt,{item:D})},D.id))})})]}):null});At.displayName="EvoNotificationPanel";const qh=()=>e.jsxs("div",{className:A.emptyState,children:[e.jsx("div",{className:A.emptyIcon,"aria-hidden":"true",children:e.jsx(ts,{})}),e.jsx("div",{className:A.emptyTitle,children:"You're all caught up"}),e.jsx("div",{className:A.emptyHint,children:"New notifications will appear here."})]}),zt=r.forwardRef(function({item:t,onClick:s,className:o,...a},i){const[l,c]=r.useState(t.timestamp);r.useEffect(()=>{c(Date.now());const b=window.setInterval(()=>c(Date.now()),6e4);return()=>window.clearInterval(b)},[]);const p=r.useCallback(()=>{var b;(b=s??t.onClick)==null||b(t),t.read||ne.markRead(t.id)},[t,s]),v=r.useCallback(b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),p())},[p]),y=!!(s??t.onClick),_=t.icon??Zn[t.severity];return e.jsxs("div",{ref:i,className:Xe(A.item,!t.read&&A.itemUnread,y&&A.itemInteractive,o),role:y?"button":"group",tabIndex:y?0:void 0,onClick:y?p:void 0,onKeyDown:y?v:void 0,...a,children:[e.jsx("span",{className:A.itemUnreadDot,"aria-hidden":t.read}),e.jsx("div",{className:Xe(A.itemMedia,A[`sev-${t.severity}`]),"aria-hidden":"true",children:t.avatarUrl?e.jsx("img",{src:t.avatarUrl,alt:"",className:A.itemAvatar}):e.jsx("span",{className:A.itemMediaGlyph,children:_})}),e.jsxs("div",{className:A.itemBody,children:[e.jsx("div",{className:A.itemTitle,children:t.title}),t.description!=null&&e.jsx("div",{className:A.itemDescription,children:t.description}),e.jsxs("div",{className:A.itemMeta,children:[e.jsx("span",{className:A.itemTimestamp,children:Ph(t.timestamp,l)}),t.action&&e.jsx("button",{type:"button",className:A.itemAction,onClick:b=>{b.stopPropagation(),t.action.onClick(b)},children:t.action.label})]})]}),e.jsx("button",{type:"button",className:A.itemDismiss,onClick:b=>{b.stopPropagation(),ne.removeInbox(t.id)},"aria-label":"Remove notification",children:"✕"})]})});zt.displayName="EvoNotificationItem";function Vh(){return sn()}const Uh={Provider:on,Toaster:rn,Bell:an,Panel:At,Item:zt},Gh="_wrapper_1fxx0_11",Kh="_tooltip_1fxx0_17",Qh="_tooltipFadeIn_1fxx0_1",Yh="_top_1fxx0_33",Xh="_bottom_1fxx0_38",Jh="_left_1fxx0_43",Zh="_right_1fxx0_48",ep="_arrow_1fxx0_54",Lt={wrapper:Gh,tooltip:Kh,tooltipFadeIn:Qh,top:Yh,bottom:Xh,left:Jh,right:Zh,arrow:ep},tp=({content:n,children:t,placement:s="top",className:o=""})=>{const[a,i]=r.useState(!1);return e.jsxs("span",{className:`${Lt.wrapper} ${o}`,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),children:[t,a&&e.jsxs("span",{className:`${Lt.tooltip} ${Lt[s]}`,role:"tooltip",children:[n,e.jsx("span",{className:Lt.arrow})]})]})},np="_alert_slsq7_1",sp="_success_slsq7_10",op="_alertIcon_slsq7_14",rp="_alertTitle_slsq7_17",ap="_error_slsq7_20",ip="_warning_slsq7_30",cp="_info_slsq7_40",lp="_alertContent_slsq7_65",dp="_alertDescription_slsq7_76",up="_dismissBtn_slsq7_83",pt={alert:np,success:sp,alertIcon:op,alertTitle:rp,error:ap,warning:ip,info:cp,alertContent:lp,alertDescription:dp,dismissBtn:up},hp={success:"✓",error:"✕",warning:"⚠",info:"i"},pp=({type:n="info",title:t,children:s,dismissible:o=!1,className:a=""})=>{const[i,l]=r.useState(!1);return i?null:e.jsxs("div",{className:[pt.alert,pt[n],a].filter(Boolean).join(" "),role:"alert",children:[e.jsx("span",{className:pt.alertIcon,children:hp[n]}),e.jsxs("div",{className:pt.alertContent,children:[t&&e.jsx("p",{className:pt.alertTitle,children:t}),e.jsx("div",{className:pt.alertDescription,children:s})]}),o&&e.jsx("button",{className:pt.dismissBtn,onClick:()=>l(!0),"aria-label":"Dismiss alert",children:"✕"})]})},_p="_badge_nypvn_1",fp="_sm_nypvn_12",mp="_md_nypvn_16",vp="_lg_nypvn_20",xp="_solid_nypvn_25",gp="_primary_nypvn_25",bp="_secondary_nypvn_30",yp="_success_nypvn_35",wp="_warning_nypvn_40",jp="_danger_nypvn_45",kp="_info_nypvn_50",Np="_outline_nypvn_56",Ep="_subtle_nypvn_84",Tp="_dot_nypvn_115",Ip="_removeBtn_nypvn_123",$p="_badgeGroup_nypvn_142",ft={badge:_p,sm:fp,md:mp,lg:vp,solid:xp,primary:gp,secondary:bp,success:yp,warning:wp,danger:jp,info:kp,outline:Np,subtle:Ep,dot:Tp,removeBtn:Ip,badgeGroup:$p},Cp=({children:n,className:t=""})=>e.jsx("div",{className:`${ft.badgeGroup} ${t}`,children:n}),ns=({children:n,severity:t="primary",variant:s="solid",size:o="md",dot:a=!1,removable:i=!1,onRemove:l,className:c=""})=>e.jsxs("span",{className:[ft.badge,ft[t],ft[s],ft[o],c].filter(Boolean).join(" "),children:[a&&e.jsx("span",{className:ft.dot}),n,i&&e.jsx("button",{className:ft.removeBtn,onClick:l,"aria-label":"Remove",children:"✕"})]});ns.Group=Cp;const Mp="_skeleton_7wr3a_9",Lp="_animated_7wr3a_14",Dp="_textGroup_7wr3a_20",mt={skeleton:Mp,animated:Lp,textGroup:Dp},Et=n=>typeof n=="number"?`${n}px`:n,Bp=({lines:n=3,className:t="",animated:s=!0})=>e.jsx("div",{className:`${mt.textGroup} ${t}`,children:Array.from({length:n}).map((o,a)=>e.jsx("div",{className:[mt.skeleton,s?mt.animated:""].filter(Boolean).join(" "),style:{width:a===n-1?"65%":"100%",height:"0.875rem",borderRadius:"4px"}},a))}),Sp=({size:n=40,className:t="",animated:s=!0})=>e.jsx("div",{className:[mt.skeleton,s?mt.animated:"",t].filter(Boolean).join(" "),style:{width:Et(n),height:Et(n),borderRadius:"50%"}}),cn=({width:n="100%",height:t="1rem",borderRadius:s="6px",className:o="",animated:a=!0})=>e.jsx("div",{className:[mt.skeleton,a?mt.animated:"",o].filter(Boolean).join(" "),style:{width:Et(n),height:Et(t),borderRadius:Et(s)}});cn.Text=Bp;cn.Circle=Sp;const Rp="_wrapper_69yee_1",Ap="_scroll_69yee_11",zp="_table_69yee_30",Pp="_caption_69yee_38",Op="_thead_69yee_46",Wp="_th_69yee_46",Hp="_sortBtn_69yee_63",Fp="_sortIcon_69yee_85",qp="_sortActive_69yee_92",Vp="_tbody_69yee_99",Up="_tr_69yee_99",Gp="_td_69yee_103",Kp="_hoverable_69yee_167",Qp="_striped_69yee_171",Yp="_bordered_69yee_179",Xp="_stickyHeader_69yee_184",Jp="_clickable_69yee_195",Zp="_empty_69yee_202",e_="_emptyText_69yee_209",t_="_skeleton_69yee_213",n_="_evoTableShimmer_69yee_1",s_="_responsiveStack_69yee_237",o_="_emptyRow_69yee_272",fe={wrapper:Rp,scroll:Ap,table:zp,caption:Pp,thead:Op,th:Wp,sortBtn:Hp,sortIcon:Fp,sortActive:qp,tbody:Vp,tr:Up,td:Gp,"align-left":"_align-left_69yee_115","align-center":"_align-center_69yee_119","align-right":"_align-right_69yee_123","size-sm":"_size-sm_69yee_137","size-md":"_size-md_69yee_147","size-lg":"_size-lg_69yee_157",hoverable:Kp,striped:Qp,bordered:Yp,stickyHeader:Xp,clickable:Jp,empty:Zp,emptyText:e_,skeleton:t_,evoTableShimmer:n_,responsiveStack:s_,emptyRow:o_};function Ht(n,t){return t.split(".").reduce((s,o)=>{if(s!=null&&typeof s=="object")return s[o]},n)}function r_(n,t){return n==null&&t==null?0:n==null?-1:t==null?1:typeof n=="number"&&typeof t=="number"?n-t:String(n).localeCompare(String(t),void 0,{numeric:!0,sensitivity:"base"})}function a_(n,t,s){if(typeof s=="function")return s(n,t);if(s&&n&&typeof n=="object"){const o=n[s];if(typeof o=="string"||typeof o=="number")return o}return t}const i_=({direction:n})=>e.jsxs("svg",{className:fe.sortIcon,width:"8",height:"12",viewBox:"0 0 8 12","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{d:"M4 0 L8 4 H0 Z",fill:"currentColor",opacity:n==="asc"?1:.3}),e.jsx("path",{d:"M4 12 L0 8 H8 Z",fill:"currentColor",opacity:n==="desc"?1:.3})]}),c_=({columns:n,data:t,size:s="md",striped:o=!1,hoverable:a=!0,bordered:i=!1,stickyHeader:l=!1,loading:c=!1,loadingRows:p=5,rowKey:v,emptyState:y,emptyText:_="No data available.",onRowClick:b,onRowDoubleClick:M,getRowClassName:k,responsive:D="scroll",caption:$,sort:z,onSortChange:q,defaultSort:G,className:H})=>{const w=z!==void 0,[S,L]=r.useState(G??null),I=w?z:S,ee=N=>{let V;!I||I.key!==N?V={key:N,direction:"asc"}:I.direction==="asc"?V={key:N,direction:"desc"}:V=null,w||L(V),q==null||q(V)},O=r.useMemo(()=>{if(!I)return t;const N=n.find(se=>se.key===I.key);if(!N)return t;const V=I.direction,Y=[...t];return N.sortFn?Y.sort((se,J)=>N.sortFn(se,J,V)):Y.sort((se,J)=>{const de=Ht(se,N.key),te=Ht(J,N.key),oe=r_(de,te);return V==="asc"?oe:-oe}),Y},[t,n,I]),x=!!(b||M),Q=[fe.wrapper,fe[`size-${s}`],o&&fe.striped,a&&fe.hoverable,i&&fe.bordered,l&&fe.stickyHeader,D==="stack"&&fe.responsiveStack,x&&fe.clickable,H].filter(Boolean).join(" "),B=N=>{const V=N.align??"left",Y=(I==null?void 0:I.key)===N.key,se=Y?I.direction:void 0,J=Y?se==="asc"?"ascending":"descending":N.sortable?"none":void 0,de=[fe.th,fe[`align-${V}`],N.headerClassName].filter(Boolean).join(" ");return e.jsx("th",{scope:"col",className:de,style:N.width?{width:N.width}:void 0,"aria-sort":J,children:N.sortable?e.jsxs("button",{type:"button",className:[fe.sortBtn,Y?fe.sortActive:""].filter(Boolean).join(" "),onClick:()=>ee(N.key),children:[e.jsx("span",{children:N.header}),e.jsx(i_,{direction:se})]}):N.header},N.key)},re=()=>c?Array.from({length:Math.max(1,p)}).map((N,V)=>e.jsx("tr",{className:fe.tr,children:n.map(Y=>e.jsx("td",{className:[fe.td,fe[`align-${Y.align??"left"}`]].filter(Boolean).join(" "),"data-label":typeof Y.header=="string"?Y.header:Y.key,children:e.jsx("span",{className:fe.skeleton})},Y.key))},`evo-skeleton-${V}`)):O.length===0?e.jsx("tr",{className:fe.emptyRow,children:e.jsx("td",{colSpan:n.length,className:fe.empty,children:y??e.jsx("span",{className:fe.emptyText,children:_})})}):O.map((N,V)=>{const Y=[fe.tr,k==null?void 0:k(N,V)].filter(Boolean).join(" ");return e.jsx("tr",{className:Y,onClick:b?()=>b(N,V):void 0,onDoubleClick:M?()=>M(N,V):void 0,children:n.map(se=>{const J=Ht(N,se.key),de=se.align??"left",te=[fe.td,fe[`align-${de}`],se.cellClassName].filter(Boolean).join(" ");return e.jsx("td",{className:te,"data-label":typeof se.header=="string"?se.header:se.key,children:se.render?se.render(J,N,V):J==null?"":String(J)},se.key)})},a_(N,V,v))});return e.jsx("div",{className:Q,children:e.jsx("div",{className:fe.scroll,children:e.jsxs("table",{className:fe.table,children:[$&&e.jsx("caption",{className:fe.caption,children:$}),e.jsx("thead",{className:fe.thead,children:e.jsx("tr",{children:n.map(B)})}),e.jsx("tbody",{className:fe.tbody,children:re()})]})})})},l_="_root_1wpat_1",d_="_fullWidth_1wpat_11",u_="_label_1wpat_15",h_="_stage_1wpat_21",p_="_disabled_1wpat_38",__="_bgChecker_1wpat_43",f_="_imageWrap_1wpat_49",m_="_image_1wpat_49",v_="_overlay_1wpat_68",x_="_overlayCircle_1wpat_77",g_="_circleMask_1wpat_82",b_="_grid_1wpat_89",y_="_gridLine_1wpat_95",w_="_h_1wpat_99",j_="_v_1wpat_104",k_="_handle_1wpat_110",N_="_handleTL_1wpat_128",E_="_handleTR_1wpat_134",T_="_handleBL_1wpat_140",I_="_handleBR_1wpat_146",$_="_handleT_1wpat_128",C_="_handleB_1wpat_140",M_="_handleL_1wpat_166",L_="_handleR_1wpat_166",D_="_controls_1wpat_200",B_="_controlGroup_1wpat_211",S_="_controlLabel_1wpat_218",R_="_iconBtn_1wpat_227",A_="_zoomSlider_1wpat_260",z_="_ratioRow_1wpat_294",P_="_ratioChip_1wpat_300",O_="_active_1wpat_318",W_="_divider_1wpat_333",H_="_helper_1wpat_339",F_="_placeholder_1wpat_344",q_="_spinner_1wpat_356",P={root:l_,fullWidth:d_,label:u_,stage:h_,disabled:p_,bgChecker:__,imageWrap:f_,image:m_,overlay:v_,overlayCircle:x_,circleMask:g_,grid:b_,gridLine:y_,h:w_,v:j_,handle:k_,handleTL:N_,handleTR:E_,handleBL:T_,handleBR:I_,handleT:$_,handleB:C_,handleL:M_,handleR:L_,controls:D_,controlGroup:B_,controlLabel:S_,iconBtn:R_,zoomSlider:A_,ratioRow:z_,ratioChip:P_,active:O_,divider:W_,helper:H_,placeholder:F_,spinner:q_},V_=[{label:"Free",value:null},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"3:4",value:3/4},{label:"16:9",value:16/9},{label:"9:16",value:9/16}],Dt=24,Fe=(n,t,s)=>Math.min(s,Math.max(t,n)),_t=n=>(Math.round(n/90)*90%360+360)%360,U_=r.forwardRef(function({src:t,aspectRatio:s,circular:o=!1,showGrid:a=!0,showControls:i=!0,ratioPresets:l,minZoom:c=1,maxZoom:p=4,defaultZoom:v=1,defaultRotation:y=0,defaultCrop:_,height:b=360,background:M="checker",label:k,helperText:D,onChange:$,onReady:z,onError:q,disabled:G=!1,fullWidth:H=!0,className:w,ariaLabel:S},L){const I=o?1:s,ee=r.useRef(null),O=r.useRef(null),[x,Q]=r.useState({w:0,h:0}),[B,re]=r.useState(null),[N,V]=r.useState(!1),[Y,se]=r.useState(!1),[J,de]=r.useState(v),[te,oe]=r.useState(_t(y)),[ae,Ee]=r.useState({x:0,y:0}),[Te,be]=r.useState({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80}),[ce,Be]=r.useState(I??null);r.useEffect(()=>{Be(I??null)},[I]),r.useLayoutEffect(()=>{const f=ee.current;if(!f)return;const C=()=>{const X=f.getBoundingClientRect();Q({w:X.width,h:X.height})};C();const W=new ResizeObserver(C);return W.observe(f),()=>W.disconnect()},[]),r.useEffect(()=>{if(V(!1),se(!1),re(null),!t)return;const f=new Image;return f.crossOrigin="anonymous",f.onload=()=>{re({w:f.naturalWidth,h:f.naturalHeight}),V(!0),z==null||z({naturalWidth:f.naturalWidth,naturalHeight:f.naturalHeight})},f.onerror=()=>{se(!0),q==null||q(new Error(`Failed to load image: ${t}`))},f.src=t,()=>{f.onload=null,f.onerror=null}},[t]);const ye=r.useMemo(()=>{if(!B||!x.w||!x.h)return 1;const f=te===90||te===270,C=f?B.h:B.w,W=f?B.w:B.h;return Math.min(x.w/C,x.h/W)},[B,x.w,x.h,te]),ve=r.useMemo(()=>{if(!B)return{w:0,h:0};const f=ye*J;return{w:B.w*f,h:B.h*f}},[B,ye,J]),le=r.useMemo(()=>({left:Te.left/100*x.w,top:Te.top/100*x.h,width:Te.width/100*x.w,height:Te.height/100*x.h}),[Te,x]),xe=r.useCallback(()=>{if(!B||!x.w||!x.h)return null;const f=ye*J,C=x.w/2+ae.x,W=x.h/2+ae.y,X=le.left+le.width/2,h=le.top+le.height/2,d=X-C,g=h-W,j=-te*Math.PI/180,R=d*Math.cos(j)-g*Math.sin(j),Z=d*Math.sin(j)+g*Math.cos(j),pe=te===90||te===270,Se=pe?le.height:le.width,je=pe?le.width:le.height,Ie=(R-Se/2)/f+B.w/2,$e=(Z-je/2)/f+B.h/2,Re=Se/f,Oe=je/f;return{x:Ie,y:$e,width:Re,height:Oe,rotation:te,sourceWidth:B.w,sourceHeight:B.h}},[B,x,ye,J,ae,le,te]),We=r.useRef("");r.useEffect(()=>{if(!N)return;const f=xe();if(!f)return;const C=`${f.x.toFixed(2)},${f.y.toFixed(2)},${f.width.toFixed(2)},${f.height.toFixed(2)},${f.rotation}`;C!==We.current&&(We.current=C,$==null||$(f))},[N,xe,$]),r.useEffect(()=>{ce==null||!x.w||!x.h||be(f=>{const C=f.width/100*x.w,W=f.height/100*x.h,X=C/ce;let h=C,d=X;X>W&&(d=W,h=W*ce);const g=(f.left+f.width/2)/100*x.w,j=(f.top+f.height/2)/100*x.h;let R=g-h/2,Z=j-d/2;return R=Fe(R,0,x.w-h),Z=Fe(Z,0,x.h-d),{left:R/x.w*100,top:Z/x.h*100,width:h/x.w*100,height:d/x.h*100}})},[ce,x.w,x.h]);const we=r.useRef(null),ke=r.useRef(null),m=r.useRef(new Map),u=f=>{var C,W;if(!(G||!N)){if((W=(C=f.target).setPointerCapture)==null||W.call(C,f.pointerId),m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),m.current.size===2){const X=Array.from(m.current.values()),h=Math.hypot(X[0].x-X[1].x,X[0].y-X[1].y);ke.current={startDist:h,startZoom:J},we.current=null;return}we.current={type:"pan",startX:f.clientX,startY:f.clientY,startPan:ae}}},E=f=>{if(!m.current.has(f.pointerId))return;if(m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),ke.current&&m.current.size>=2){const h=Array.from(m.current.values()),d=Math.hypot(h[0].x-h[1].x,h[0].y-h[1].y),g=Fe(ke.current.startZoom*(d/ke.current.startDist),c,p);de(g);return}const C=we.current;if(!C)return;const W=f.clientX-C.startX,X=f.clientY-C.startY;C.type==="pan"?Ee({x:C.startPan.x+W,y:C.startPan.y+X}):C.type==="move"?ge(W,X,C.startCrop):C.type==="resize"&&ue(C.corner,W,X,C.startCrop)},T=f=>{m.current.delete(f.pointerId),m.current.size<2&&(ke.current=null),m.current.size===0&&(we.current=null)},U=f=>{if(G||!N)return;f.preventDefault();const C=-f.deltaY*.0015;de(W=>Fe(W*(1+C),c,p))},ge=(f,C,W)=>{const X=x.w,h=x.h,d=W.left/100*X,g=W.top/100*h,j=W.width/100*X,R=W.height/100*h,Z=Fe(d+f,0,X-j),pe=Fe(g+C,0,h-R);be({left:Z/X*100,top:pe/h*100,width:W.width,height:W.height})},ue=(f,C,W,X)=>{const h=x.w,d=x.h;let g=X.left/100*h,j=X.top/100*d,R=X.width/100*h,Z=X.height/100*d;const pe=g+R,Se=j+Z;let je=g,Ie=j,$e=pe,Re=Se;f.includes("l")&&(je=Fe(g+C,0,pe-Dt)),f.includes("r")&&($e=Fe(pe+C,g+Dt,h)),f.includes("t")&&(Ie=Fe(j+W,0,Se-Dt)),f.includes("b")&&(Re=Fe(Se+W,j+Dt,d));let Oe=$e-je,qe=Re-Ie;if(ce!=null){if(f.length===2){const Ae=Oe,st=Oe/ce;st<=qe||f==="tl"||f==="tr"||f==="bl"||f==="br"?qe=Ae/ce:Oe=st*ce,f.includes("t")&&(Ie=Re-qe),f.includes("b")&&(Re=Ie+qe),f.includes("l")&&(je=$e-Oe),f.includes("r")&&($e=je+Oe)}else if(f==="l"||f==="r"){qe=Oe/ce;const Ae=(j+Se)/2;Ie=Ae-qe/2,Re=Ae+qe/2}else if(f==="t"||f==="b"){Oe=qe*ce;const Ae=(g+pe)/2;je=Ae-Oe/2,$e=Ae+Oe/2}if(je<0&&($e+=-je,je=0),Ie<0&&(Re+=-Ie,Ie=0),$e>h){const Ae=$e-h;$e=h,je-=Ae}if(Re>d){const Ae=Re-d;Re=d,Ie-=Ae}if(Oe=$e-je,qe=Re-Ie,Math.abs(Oe/qe-ce)>.001)if(Oe/qe>ce){const Ae=qe*ce,st=(je+$e)/2;je=st-Ae/2,$e=st+Ae/2}else{const Ae=Oe/ce,st=(Ie+Re)/2;Ie=st-Ae/2,Re=st+Ae/2}}be({left:je/h*100,top:Ie/d*100,width:($e-je)/h*100,height:(Re-Ie)/d*100})},Pe=f=>{var C,W;G||!N||(f.stopPropagation(),(W=(C=f.target).setPointerCapture)==null||W.call(C,f.pointerId),m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),we.current={type:"move",startX:f.clientX,startY:f.clientY,startCrop:{...Te}})},ze=f=>C=>{var W,X;G||!N||(C.stopPropagation(),(X=(W=C.target).setPointerCapture)==null||X.call(W,C.pointerId),m.current.set(C.pointerId,{x:C.clientX,y:C.clientY}),we.current={type:"resize",corner:f,startX:C.clientX,startY:C.clientY,startCrop:{...Te}})},He=r.useCallback(f=>{const C=xe();if(!C||!O.current)return null;let W=Math.max(1,Math.round(C.width)),X=Math.max(1,Math.round(C.height));const{maxWidth:h,maxHeight:d}=f??{};if(h&&W>h){const Z=h/W;W=h,X=Math.round(X*Z)}if(d&&X>d){const Z=d/X;X=d,W=Math.round(W*Z)}const g=document.createElement("canvas");g.width=W,g.height=X;const j=g.getContext("2d");if(!j)return null;j.imageSmoothingQuality="high";const R=O.current;if(j.save(),C.rotation===0)j.drawImage(R,C.x,C.y,C.width,C.height,0,0,W,X);else{j.translate(W/2,X/2),j.rotate(C.rotation*Math.PI/180);const Z=C.rotation===90||C.rotation===270,pe=Z?X:W,Se=Z?W:X,je=Z?C.height:C.width,Ie=Z?C.width:C.height;j.drawImage(R,C.x,C.y,je,Ie,-pe/2,-Se/2,pe,Se)}return j.restore(),o&&(j.globalCompositeOperation="destination-in",j.beginPath(),j.arc(W/2,X/2,Math.min(W,X)/2,0,Math.PI*2),j.closePath(),j.fill()),g},[xe,o]);r.useImperativeHandle(L,()=>({getCrop:()=>xe(),getCroppedCanvas:f=>He(f),getCroppedBlob:f=>new Promise((C,W)=>{const X=He(f);if(!X)return W(new Error("Cropper not ready"));X.toBlob(h=>h?C(h):W(new Error("Canvas export failed")),(f==null?void 0:f.type)??"image/png",(f==null?void 0:f.quality)??.92)}),getCroppedDataURL:async f=>{const C=He(f);if(!C)throw new Error("Cropper not ready");return C.toDataURL((f==null?void 0:f.type)??"image/png",(f==null?void 0:f.quality)??.92)},reset:()=>{de(v),oe(_t(y)),Ee({x:0,y:0}),be({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80})},rotate:f=>{oe(f===void 0?C=>_t(C+90):_t(f))},setZoom:f=>de(Fe(f,c,p))}),[xe,He,v,y,_,c,p]);const Le={height:typeof b=="number"?`${b}px`:b},Qe=B?{width:ve.w,height:ve.h,transform:`translate(${ae.x}px, ${ae.y}px) rotate(${te}deg)`}:{display:"none"},Ze={left:le.left,top:le.top,width:le.width,height:le.height},nt=o?{"--mask-cx":`${le.left+le.width/2}px`,"--mask-cy":`${le.top+le.height/2}px`,"--mask-r":`${Math.min(le.width,le.height)/2}px`}:{},Ye=[P.stage,M==="checker"?P.bgChecker:"",G?P.disabled:""].filter(Boolean).join(" "),lt=[P.root,H?P.fullWidth:"",w??""].filter(Boolean).join(" "),dt=l??V_,kt=i&&!o&&dt.length>0;return e.jsxs("div",{className:lt,children:[k&&e.jsx("div",{className:P.label,children:k}),kt&&e.jsx("div",{className:P.ratioRow,role:"radiogroup","aria-label":"Aspect ratio",children:dt.map(f=>e.jsx("button",{type:"button",role:"radio","aria-checked":ce===f.value,className:`${P.ratioChip} ${ce===f.value?P.active:""}`,disabled:G,onClick:()=>Be(f.value),children:f.label},f.label))}),e.jsxs("div",{ref:ee,className:Ye,style:Le,role:"application","aria-label":S??"Image cropper","aria-disabled":G,onPointerDown:u,onPointerMove:E,onPointerUp:T,onPointerCancel:T,onWheel:U,children:[!N&&!Y&&e.jsxs("div",{className:P.placeholder,children:[e.jsx("div",{className:P.spinner,"aria-hidden":!0}),e.jsx("div",{children:"Loading image…"})]}),Y&&e.jsx("div",{className:P.placeholder,children:e.jsx("div",{children:"Couldn't load image."})}),e.jsx("div",{className:P.imageWrap,children:e.jsx("img",{ref:O,src:t,alt:"",draggable:!1,className:P.image,style:Qe})}),N&&e.jsxs(e.Fragment,{children:[o&&e.jsx("div",{className:P.circleMask,style:nt}),e.jsxs("div",{className:`${P.overlay} ${o?P.overlayCircle:""}`,style:Ze,onPointerDown:Pe,onPointerMove:E,onPointerUp:T,onPointerCancel:T,children:[a&&!o&&e.jsxs("div",{className:P.grid,"aria-hidden":!0,children:[e.jsx("div",{className:`${P.gridLine} ${P.h}`,style:{top:"33.33%"}}),e.jsx("div",{className:`${P.gridLine} ${P.h}`,style:{top:"66.66%"}}),e.jsx("div",{className:`${P.gridLine} ${P.v}`,style:{left:"33.33%"}}),e.jsx("div",{className:`${P.gridLine} ${P.v}`,style:{left:"66.66%"}})]}),e.jsx("div",{className:`${P.handle} ${P.handleTL}`,onPointerDown:ze("tl")}),e.jsx("div",{className:`${P.handle} ${P.handleTR}`,onPointerDown:ze("tr")}),e.jsx("div",{className:`${P.handle} ${P.handleBL}`,onPointerDown:ze("bl")}),e.jsx("div",{className:`${P.handle} ${P.handleBR}`,onPointerDown:ze("br")}),e.jsx("div",{className:`${P.handle} ${P.handleT}`,onPointerDown:ze("t")}),e.jsx("div",{className:`${P.handle} ${P.handleB}`,onPointerDown:ze("b")}),e.jsx("div",{className:`${P.handle} ${P.handleL}`,onPointerDown:ze("l")}),e.jsx("div",{className:`${P.handle} ${P.handleR}`,onPointerDown:ze("r")})]})]})]}),i&&e.jsxs("div",{className:P.controls,"aria-label":"Cropper controls",children:[e.jsxs("div",{className:P.controlGroup,children:[e.jsx("span",{className:P.controlLabel,children:"Zoom"}),e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Zoom out",disabled:G||J<=c,onClick:()=>de(f=>Fe(f-.1,c,p)),children:e.jsx(K_,{})}),e.jsx("input",{type:"range",className:P.zoomSlider,min:c,max:p,step:.01,value:J,disabled:G,onChange:f=>de(parseFloat(f.target.value)),"aria-label":"Zoom level"}),e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Zoom in",disabled:G||J>=p,onClick:()=>de(f=>Fe(f+.1,c,p)),children:e.jsx(G_,{})})]}),e.jsx("div",{className:P.divider,"aria-hidden":!0}),e.jsxs("div",{className:P.controlGroup,children:[e.jsx("span",{className:P.controlLabel,children:"Rotate"}),e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Rotate left",disabled:G,onClick:()=>oe(f=>_t(f-90)),children:e.jsx(Q_,{})}),e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Rotate right",disabled:G,onClick:()=>oe(f=>_t(f+90)),children:e.jsx(Y_,{})})]}),e.jsx("div",{className:P.divider,"aria-hidden":!0}),e.jsx("div",{className:P.controlGroup,children:e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Reset",disabled:G,onClick:()=>{de(v),oe(_t(y)),Ee({x:0,y:0}),be({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80})},children:e.jsx(X_,{})})})]}),D&&e.jsx("div",{className:P.helper,children:D})]})}),It={width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},G_=()=>e.jsxs("svg",{...It,children:[e.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),K_=()=>e.jsx("svg",{...It,children:e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),Q_=()=>e.jsxs("svg",{...It,children:[e.jsx("polyline",{points:"1 4 1 10 7 10"}),e.jsx("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]}),Y_=()=>e.jsxs("svg",{...It,children:[e.jsx("polyline",{points:"23 4 23 10 17 10"}),e.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.13-9.36L23 10"})]}),X_=()=>e.jsxs("svg",{...It,children:[e.jsx("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.jsx("polyline",{points:"3 3 3 8 8 8"})]});exports.EvoAlert=pp;exports.EvoAutoComplete=Gn;exports.EvoBadge=ns;exports.EvoBreadcrumb=Cn;exports.EvoButton=Ss;exports.EvoCard=ct;exports.EvoCardBody=Gt;exports.EvoCardDescription=Yt;exports.EvoCardFooter=Kt;exports.EvoCardHeader=Ut;exports.EvoCardMedia=Xt;exports.EvoCardRoot=Bt;exports.EvoCardTitle=Qt;exports.EvoCheckbox=Kn;exports.EvoCommandPalette=ua;exports.EvoContainer=_o;exports.EvoDivider=ro;exports.EvoForm=jt;exports.EvoGrid=Tn;exports.EvoImageCropper=U_;exports.EvoInput=Na;exports.EvoModal=Rt;exports.EvoNav=cr;exports.EvoNavGroup=en;exports.EvoNavItem=Jt;exports.EvoNavQuickAction=tn;exports.EvoNavSkeleton=Bn;exports.EvoNavSubItem=Zt;exports.EvoNotification=Uh;exports.EvoNotificationBell=an;exports.EvoNotificationItem=zt;exports.EvoNotificationPanel=At;exports.EvoNotificationProvider=on;exports.EvoNotificationToaster=rn;exports.EvoPagination=qr;exports.EvoRadio=Yn;exports.EvoRichTextArea=Za;exports.EvoSelect=Xi;exports.EvoSkeleton=cn;exports.EvoStack=Xs;exports.EvoTable=c_;exports.EvoTabs=St;exports.EvoThemeProvider=ss;exports.EvoThemeToggle=ps;exports.EvoToggle=Id;exports.EvoTooltip=tp;exports.EvoTopNav=tt;exports.EvoTreeSelect=rl;exports.evoLocalRecents=Ql;exports.evoNotify=zh;exports.getEvoThemeScript=os;exports.useEvoInbox=Vh;exports.useEvoTheme=En;exports.useFormContext=lu;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),Nn=require("react-dom"),En=r.createContext(null),Tn="evo-ui-theme";function un(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function hn(n){if(!n||typeof window>"u")return null;try{const t=window.localStorage.getItem(n);if(t==="light"||t==="dark"||t==="system")return t}catch{}return null}const os=({children:n,defaultTheme:t="system",storageKey:s=Tn,attribute:o="data-theme",enableTransitions:a=!0,target:i})=>{const[c,l]=r.useState(()=>hn(s)??t),[p,g]=r.useState(()=>{const B=hn(s)??t;return B==="system"?un():B}),b=r.useRef(!0),_=r.useCallback(B=>{if(typeof document>"u")return;const T=i??document.documentElement;a&&!b.current&&(T.setAttribute("data-theme-transition","true"),window.clearTimeout(T.__evoThemeTimer),T.__evoThemeTimer=window.setTimeout(()=>{T.removeAttribute("data-theme-transition")},250)),o==="class"&&(T.classList.remove("light","dark"),T.classList.add(B)),T.setAttribute("data-theme",B),b.current=!1},[o,a,i]);r.useEffect(()=>{_(p)},[p,_]),r.useEffect(()=>{g(c==="system"?un():c)},[c]),r.useEffect(()=>{if(c!=="system"||typeof window>"u"||!window.matchMedia)return;const B=window.matchMedia("(prefers-color-scheme: dark)"),T=R=>{g(R.matches?"dark":"light")};return B.addEventListener("change",T),()=>B.removeEventListener("change",T)},[c]);const y=r.useCallback(B=>{if(l(B),s&&typeof window<"u")try{window.localStorage.setItem(s,B)}catch{}},[s]),I=r.useCallback(()=>{y(p==="dark"?"light":"dark")},[p,y]),j=r.useMemo(()=>({theme:c,resolvedTheme:p,setTheme:y,toggleTheme:I}),[c,p,y,I]);return e.jsx(En.Provider,{value:j,children:n})},In=()=>{const n=r.useContext(En);if(n)return n;const t=typeof document<"u"&&document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light";return{theme:t,resolvedTheme:t,setTheme:()=>{typeof document<"u"&&console.warn("[evo-ui] useEvoTheme called without <EvoThemeProvider>. Wrap your app in <EvoThemeProvider> to enable setTheme().")},toggleTheme:()=>{}}},rs=(n=Tn)=>`(function(){try{var s=localStorage.getItem('${n}');var t=s||'system';var r=t==='system'?(matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'):t;document.documentElement.setAttribute('data-theme',r);}catch(e){}})();`,as="_toggle_1aoav_1",is="_track_1aoav_19",ls="_thumb_1aoav_29",cs="_sun_1aoav_49",ds="_moon_1aoav_54",us="_sm_1aoav_68",hs="_md_1aoav_81",ps="_lg_1aoav_94",gt={toggle:as,track:is,thumb:ls,sun:cs,moon:ds,sm:us,md:hs,lg:ps},_s=({size:n="md",ariaLabel:t="Toggle color theme",className:s})=>{const{resolvedTheme:o,toggleTheme:a}=In(),i=o==="dark",c=[gt.toggle,gt[n],s].filter(Boolean).join(" ");return e.jsx("button",{type:"button",role:"switch","aria-checked":i,"aria-label":t,onClick:a,className:c,"data-theme-state":o,children:e.jsx("span",{className:gt.track,children:e.jsxs("span",{className:gt.thumb,children:[e.jsxs("svg",{className:gt.sun,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"4"}),e.jsx("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}),e.jsx("svg",{className:gt.moon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})]})})})},fs="_button_5wbw9_1",ms="_label_5wbw9_38",vs="_icon_5wbw9_44",xs="_spinner_5wbw9_56",gs="_sm_5wbw9_72",bs="_md_5wbw9_80",ys="_lg_5wbw9_82",ws="_rounded_5wbw9_90",js="_square_5wbw9_94",ks="_iconOnly_5wbw9_106",Ns="_fullWidth_5wbw9_119",Es="_solid_5wbw9_124",Ts="_outline_5wbw9_126",Is="_ghost_5wbw9_130",$s="_soft_5wbw9_135",Cs="_primary_5wbw9_139",Ms="_secondary_5wbw9_197",Ls="_danger_5wbw9_257",Ds="_warning_5wbw9_315",Bs="_success_5wbw9_371",Ss="_info_5wbw9_429",Ue={button:fs,label:ms,icon:vs,spinner:xs,"evo-btn-spin":"_evo-btn-spin_5wbw9_1",sm:gs,md:bs,lg:ys,rounded:ws,square:js,iconOnly:ks,fullWidth:Ns,solid:Es,outline:Ts,ghost:Is,soft:$s,primary:Cs,secondary:Ms,danger:Ls,warning:Ds,success:Bs,info:Ss},Rs=r.forwardRef(function({label:t,children:s,variant:o="solid",severity:a="primary",size:i="md",shape:c="default",iconLeft:l,iconRight:p,loading:g=!1,loadingText:b,fullWidth:_=!1,disabled:y,type:I="button",className:j,...B},T){const O=g?b:s??t,q=y||g,oe=[Ue.button,Ue[o],Ue[a],Ue[i],c!=="default"?Ue[c]:"",_?Ue.fullWidth:"",O?"":Ue.iconOnly,j].filter(Boolean).join(" ");return e.jsxs("button",{ref:T,type:I,className:oe,disabled:q,"aria-busy":g||void 0,...B,children:[g?e.jsx("span",{className:Ue.spinner,"aria-hidden":"true"}):l&&e.jsx("span",{className:Ue.icon,children:l}),O!=null&&O!==""&&e.jsx("span",{className:Ue.label,children:O}),!g&&p&&e.jsx("span",{className:Ue.icon,children:p})]})}),As="_root_kkcxo_1",zs="_elevated_kkcxo_15",Ps="_outlined_kkcxo_20",Os="_ghost_kkcxo_26",Ws="_media_kkcxo_40",Hs="_interactive_kkcxo_72",Fs="_mediaImg_kkcxo_112",qs="_header_kkcxo_119",Gs="_body_kkcxo_126",Vs="_footer_kkcxo_132",Us="_title_kkcxo_141",Ks="_description_kkcxo_149",Ke={root:As,elevated:zs,outlined:Ps,ghost:Os,"orient-vertical":"_orient-vertical_kkcxo_32","orient-horizontal":"_orient-horizontal_kkcxo_36",media:Ws,"orient-responsive":"_orient-responsive_kkcxo_51",interactive:Hs,mediaImg:Fs,header:qs,body:Gs,footer:Vs,title:Us,description:Ks};function xt(...n){return n.filter(Boolean).join(" ")}function Qs(n,t,s,o){return xt(Ke.root,Ke[n],Ke[`orient-${t}`],s&&Ke.interactive,o)}const Bt=r.forwardRef(function(t,s){const{variant:o="elevated",orientation:a="vertical",interactive:i,className:c,children:l,...p}=t,g=i===!0,b=Qs(o,a,g,c);if(g&&typeof p.href=="string"){const _=p;return e.jsx("a",{ref:s,className:b,..._,children:l})}if(g){const{type:_="button",...y}=p;return e.jsx("button",{ref:s,type:_,className:b,...y,children:l})}return e.jsx("div",{ref:s,className:b,...p,children:l})});Bt.displayName="EvoCardRoot";const Vt=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ke.header,t),...s})});Vt.displayName="EvoCardHeader";const Ut=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ke.body,t),...s})});Ut.displayName="EvoCardBody";const Kt=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ke.footer,t),...s})});Kt.displayName="EvoCardFooter";const Qt=r.forwardRef(function({as:t="h3",className:s,children:o,...a},i){return r.createElement(t,{ref:i,className:xt(Ke.title,s),...a},o)});Qt.displayName="EvoCardTitle";const Yt=r.forwardRef(function({className:t,...s},o){return e.jsx("p",{ref:o,className:xt(Ke.description,t),...s})});Yt.displayName="EvoCardDescription";const Xt=r.forwardRef(function({src:t,alt:s,aspectRatio:o,className:a,style:i,children:c,...l},p){const g=o!=null?{aspectRatio:o,...i}:i;return e.jsx("div",{ref:p,className:xt(Ke.media,a),style:g,...l,children:t?e.jsx("img",{src:t,alt:s??"",className:Ke.mediaImg}):c})});Xt.displayName="EvoCardMedia";const lt=Bt;lt.Root=Bt;lt.Header=Vt;lt.Title=Qt;lt.Description=Yt;lt.Body=Ut;lt.Footer=Kt;lt.Media=Xt;const Ys={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},Xs={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},Js=({children:n,direction:t="column",gap:s="1rem",align:o="stretch",justify:a="start",wrap:i=!1,className:c="",style:l})=>e.jsx("div",{className:c,style:{display:"flex",flexDirection:t,gap:typeof s=="number"?`${s}px`:s,alignItems:Ys[o],justifyContent:Xs[a],flexWrap:i?"wrap":"nowrap",...l},children:n}),Pt=n=>n===void 0?void 0:typeof n=="number"?`${n}px`:n,Zs=({children:n,colSpan:t,rowSpan:s,className:o="",style:a})=>e.jsx("div",{className:o,style:{gridColumn:t?`span ${t}`:void 0,gridRow:s?`span ${s}`:void 0,...a},children:n}),$n=({children:n,cols:t=3,rows:s,gap:o="1rem",colGap:a,rowGap:i,className:c="",style:l})=>e.jsx("div",{className:c,style:{display:"grid",gridTemplateColumns:typeof t=="number"?`repeat(${t}, 1fr)`:t,gridTemplateRows:s?typeof s=="number"?`repeat(${s}, auto)`:s:void 0,gap:Pt(o),columnGap:Pt(a),rowGap:Pt(i),...l},children:n});$n.Item=Zs;const eo="_divider_rorxd_1",to="_horizontal_rorxd_6",no="_vertical_rorxd_13",so="_labeled_rorxd_20",oo="_line_rorxd_27",ro="_labelText_rorxd_33",ut={divider:eo,horizontal:to,vertical:no,labeled:so,line:oo,labelText:ro},ao=({orientation:n="horizontal",label:t,className:s=""})=>t?e.jsxs("div",{className:`${ut.labeled} ${s}`,children:[e.jsx("div",{className:ut.line}),e.jsx("span",{className:ut.labelText,children:t}),e.jsx("div",{className:ut.line})]}):e.jsx("div",{className:[ut.divider,n==="vertical"?ut.vertical:ut.horizontal,s].filter(Boolean).join(" ")}),io="_container_131l9_1",lo="_centered_131l9_7",co="_sm_131l9_12",uo="_md_131l9_16",ho="_lg_131l9_20",po="_xl_131l9_24",_o="_full_131l9_28",Ot={container:io,centered:lo,sm:co,md:uo,lg:ho,xl:po,full:_o},fo=({children:n,size:t="lg",centered:s=!0,className:o=""})=>e.jsx("div",{className:[Ot.container,Ot[t],s?Ot.centered:"",o].filter(Boolean).join(" "),children:n}),mo="_tabs_9memw_1",vo="_tabList_9memw_6",xo="_tab_9memw_1",go="_disabled_9memw_36",bo="_active_9memw_36",yo="_tabPanel_9memw_52",wt={tabs:mo,tabList:vo,tab:xo,disabled:go,active:bo,tabPanel:yo},Cn=r.createContext(null),Mn=()=>{const n=r.useContext(Cn);if(!n)throw new Error("Tab components must be used within EvoTabs");return n},wo=({children:n,className:t=""})=>e.jsx("div",{className:`${wt.tabList} ${t}`,role:"tablist",children:n}),jo=({id:n,children:t,disabled:s=!1,className:o=""})=>{const{active:a,setActive:i}=Mn();return e.jsx("button",{role:"tab","aria-selected":a===n,disabled:s,className:[wt.tab,a===n?wt.active:"",s?wt.disabled:"",o].filter(Boolean).join(" "),onClick:()=>i(n),children:t})},ko=({id:n,children:t,className:s=""})=>{const{active:o}=Mn();return o!==n?null:e.jsx("div",{role:"tabpanel",className:`${wt.tabPanel} ${s}`,children:t})},St=({children:n,defaultTab:t="",className:s=""})=>{const[o,a]=r.useState(t);return e.jsx(Cn.Provider,{value:{active:o,setActive:a},children:e.jsx("div",{className:`${wt.tabs} ${s}`,children:n})})};St.List=wo;St.Tab=jo;St.Panel=ko;const No="_breadcrumb_7jmv3_1",Eo="_item_7jmv3_12",To="_separator_7jmv3_18",Io="_link_7jmv3_28",$o="_text_7jmv3_44",Co="_current_7jmv3_49",yt={breadcrumb:No,item:Eo,separator:To,link:Io,text:$o,current:Co},Mo=({children:n,href:t,current:s=!1})=>e.jsx("li",{className:yt.item,children:t&&!s?e.jsx("a",{href:t,className:yt.link,children:n}):e.jsx("span",{className:[yt.text,s?yt.current:""].filter(Boolean).join(" "),"aria-current":s?"page":void 0,children:n})}),Ln=({children:n,separator:t="/",className:s=""})=>{const o=r.Children.toArray(n);return e.jsx("nav",{"aria-label":"breadcrumb",className:s,children:e.jsx("ol",{className:yt.breadcrumb,children:o.map((a,i)=>e.jsxs(r.Fragment,{children:[a,i<o.length-1&&e.jsx("li",{className:yt.separator,"aria-hidden":"true",children:t})]},i))})})};Ln.Item=Mo;const Lo="_navContainer_ng5y4_1",Do="_navList_ng5y4_7",Bo="_navLi_ng5y4_7",So="_navRow_ng5y4_20",Ro="_navIcon_ng5y4_47",Ao="_active_ng5y4_55",zo="_disabled_ng5y4_63",Po="_navRowTop_ng5y4_69",Oo="_navRowSub_ng5y4_73",Wo="_navLabel_ng5y4_81",Ho="_chevron_ng5y4_157",Fo="_chevronOpen_ng5y4_162",qo="_navSubList_ng5y4_166",Go="_navGroup_ng5y4_178",Vo="_navGroupLabel_ng5y4_187",Uo="_navGroupLabelText_ng5y4_199",Ko="_navGroupToggle_ng5y4_208",Qo="_navGroupCount_ng5y4_228",Yo="_navGroupPanel_ng5y4_244",Xo="_navSkeletonItem_ng5y4_260",Jo="_navSkeletonIcon_ng5y4_267",Zo="_navSkeletonText_ng5y4_276",er="_navQuickAction_ng5y4_292",tr="_navTrigger_ng5y4_321",nr="_navBackdrop_ng5y4_344",sr="_navDesktop_ng5y4_352",or="_navMobile_ng5y4_356",rr="_navDrawerOpen_ng5y4_377",ar="_navCollapsed_ng5y4_389",he={navContainer:Lo,navList:Do,navLi:Bo,navRow:So,navIcon:Ro,active:Ao,disabled:zo,navRowTop:Po,navRowSub:Oo,navLabel:Wo,chevron:Ho,chevronOpen:Fo,navSubList:qo,navGroup:Go,navGroupLabel:Vo,navGroupLabelText:Uo,navGroupToggle:Ko,navGroupCount:Qo,navGroupPanel:Yo,navSkeletonItem:Xo,navSkeletonIcon:Jo,navSkeletonText:Zo,navQuickAction:er,navTrigger:tr,navBackdrop:nr,navDesktop:sr,navMobile:or,navDrawerOpen:rr,navCollapsed:ar},Jt=r.createContext(null),pn=r.createContext({depth:0});function ir(n){const[t,s]=r.useState(!1);return r.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const o=window.matchMedia(`(max-width: ${n-1}px)`),a=()=>s(o.matches);return a(),o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[n]),t}function Zt(n,t,s){const[o,a]=r.useState(t),i=n!==void 0,c=i?n:o,l=r.useCallback(p=>{i||a(p),s==null||s(p)},[i,s]);return[c,l]}const Ft="data-evo-nav-row";function lr(n){return n?Array.from(n.querySelectorAll(`[${Ft}]:not([data-disabled="true"])`)).filter(t=>t.offsetParent!==null&&t.closest("[inert]")===null):[]}function $t(n,t,s){var c;const o=lr(n);if(o.length===0)return;const a=o.indexOf(t);let i;s==="first"?i=0:s==="last"?i=o.length-1:i=Math.max(0,Math.min(o.length-1,a+s)),(c=o[i])==null||c.focus()}const Dn=({open:n})=>e.jsx("svg",{viewBox:"0 0 16 16",fill:"none",width:"12",height:"12","aria-hidden":"true",className:[he.chevron,n?he.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx("path",{d:"M6 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),cr=()=>e.jsx("svg",{viewBox:"0 0 16 16",fill:"none",width:"14",height:"14","aria-hidden":"true",children:e.jsx("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),dr=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",width:"18",height:"18","aria-hidden":"true",children:e.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),ur=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",width:"18",height:"18","aria-hidden":"true",children:e.jsx("path",{d:"M5 5l10 10M15 5L5 15",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})});function hr(n){const t=[],s=[],o=a=>{if(Array.isArray(a)){a.forEach(o);return}if(r.isValidElement(a)){const i=a.type;if(typeof i!="string"&&(i==null?void 0:i.displayName)==="EvoNavSubItem"){s.push(a);return}}t.push(a)};return o(n),{label:t,subs:s}}const Bn=r.forwardRef(function({children:t,icon:s,active:o=!1,href:a,onClick:i,tooltip:c,open:l,defaultOpen:p=!1,onOpenChange:g,disabled:b=!1,className:_,tier:y},I){const j=r.useContext(Jt),B=(j==null?void 0:j.collapsed)??!1,{depth:T}=r.useContext(pn),R=r.useRef(null),O=r.useId(),q=`${O}-sub`,{label:oe,subs:w}=r.useMemo(()=>hr(t),[t]),D=w.length>0,[M,$]=Zt(D?l:!1,D?p:!1,g),te=r.useCallback(()=>{D&&$(!M)},[D,M,$]),W=r.useCallback(A=>{b||(D&&!a&&te(),i==null||i(A),j!=null&&j.isMobile&&a&&!D&&j.closeDrawer())},[b,D,a,i,j,te]),v=A=>{var de,ie,se;if(b)return;const Z=A.currentTarget,Q=Z.closest(`.${he.navContainer}`);switch(A.key){case"ArrowDown":A.preventDefault(),$t(Q,Z,1);break;case"ArrowUp":A.preventDefault(),$t(Q,Z,-1);break;case"ArrowRight":if(D)if(A.preventDefault(),!M)$(!0);else{const J=Z.closest("li"),ve=J==null?void 0:J.querySelector(`ul [${Ft}]`);ve==null||ve.focus()}break;case"ArrowLeft":if(A.preventDefault(),D&&M)$(!1);else if(T>0){const J=(ie=(de=Z.closest("li"))==null?void 0:de.parentElement)==null?void 0:ie.closest("li");(se=J==null?void 0:J.querySelector(`[${Ft}]`))==null||se.focus()}break;case"Home":A.preventDefault(),$t(Q,Z,"first");break;case"End":A.preventDefault(),$t(Q,Z,"last");break;case"Enter":case" ":{(A.key===" "||a===void 0)&&(A.preventDefault(),W(A));break}}},X=[he.navRow,y==="subitem"?he.navRowSub:he.navRowTop,o?he.active:"",b?he.disabled:"",_].filter(Boolean).join(" "),S=y==="subitem"&&T>0?{"--evo-nav-indent":`${T*.875}rem`}:void 0,re={"data-evo-nav-row":"",id:O,className:X,style:S,title:B&&c?c:void 0,"aria-current":o?"page":void 0,"aria-expanded":D?M:void 0,"aria-controls":D?q:void 0,"aria-disabled":b||void 0,"data-disabled":b?"true":void 0,"data-active":o?"true":void 0,tabIndex:b?-1:0,onKeyDown:v},C=e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:he.navIcon,children:s}),e.jsx("span",{className:he.navLabel,children:oe}),D&&e.jsx(Dn,{open:M})]});let K;if(a&&!b){const A={href:a,onClick:W};K=e.jsx("a",{ref:R,...re,...A,children:C})}else K=e.jsx("button",{ref:R,type:"button",disabled:b,onClick:W,...re,children:C});return e.jsxs("li",{ref:I,className:he.navLi,children:[K,D&&e.jsx(pn.Provider,{value:{depth:T+1},children:e.jsx("ul",{id:q,role:"group","aria-labelledby":O,hidden:!M,className:he.navSubList,children:w})})]})}),en=r.forwardRef(function(t,s){return e.jsx(Bn,{ref:s,tier:"item",...t})});en.displayName="EvoNavItem";const tn=r.forwardRef(function(t,s){return e.jsx(Bn,{ref:s,tier:"subitem",...t})});tn.displayName="EvoNavSubItem";const nn=r.forwardRef(function({label:t,children:s,className:o,collapsible:a=!1,defaultOpen:i=!0,open:c,onOpenChange:l,count:p},g){var oe;const b=r.useId(),_=`${b}-panel`,y=((oe=r.useContext(Jt))==null?void 0:oe.collapsed)??!1,I=a&&!y,[j,B]=Zt(I?c:!0,I?i:!0,l),T=y?!0:j,R=r.useRef(null);r.useEffect(()=>{const w=R.current;w&&(T?w.removeAttribute("inert"):w.setAttribute("inert",""))},[T]);const O=p!=null?e.jsx("span",{className:he.navGroupCount,"aria-hidden":"true",children:p}):null,q=e.jsx("ul",{role:"group","aria-labelledby":b,className:he.navList,children:s});return e.jsxs("li",{ref:g,className:[he.navGroup,o].filter(Boolean).join(" "),children:[I?e.jsxs("button",{type:"button",id:b,className:[he.navGroupLabel,he.navGroupToggle].join(" "),"aria-expanded":T,"aria-controls":_,onClick:()=>B(!j),children:[e.jsx("span",{className:he.navGroupLabelText,children:t}),O,e.jsx(Dn,{open:T})]}):e.jsxs("div",{id:b,role:"heading","aria-level":3,className:he.navGroupLabel,children:[e.jsx("span",{className:he.navGroupLabelText,children:t}),O]}),I?e.jsx("div",{ref:R,id:_,className:he.navGroupPanel,"data-open":T?"true":"false",children:q}):q]})});nn.displayName="EvoNavGroup";const Sn=({count:n=4})=>e.jsx(e.Fragment,{children:Array.from({length:n}).map((t,s)=>e.jsxs("li",{"aria-hidden":"true",className:he.navSkeletonItem,children:[e.jsx("span",{className:he.navSkeletonIcon}),e.jsx("span",{className:he.navSkeletonText,style:{width:`${45+s%4*12}%`}})]},s))}),sn=r.forwardRef(function({label:t="Create New",icon:s,className:o,type:a="button",...i},c){return e.jsx("li",{className:he.navLi,children:e.jsxs("button",{ref:c,type:a,className:[he.navQuickAction,o].filter(Boolean).join(" "),...i,children:[e.jsx("span",{className:he.navIcon,children:s??e.jsx(cr,{})}),e.jsx("span",{className:he.navLabel,children:t})]})})});sn.displayName="EvoNavQuickAction";const Rn=r.forwardRef(function({children:t,breakpoint:s=768,drawerOpen:o,defaultDrawerOpen:a=!1,onDrawerOpenChange:i,hideTrigger:c=!1,collapsed:l=!1,className:p,"aria-label":g="Main navigation",...b},_){const y=ir(s),[I,j]=Zt(o,a,i),B=r.useCallback(()=>j(!1),[j]),T=r.useId(),R=r.useRef(null);r.useEffect(()=>{if(!y||!I)return;const w=D=>{D.key==="Escape"&&B()};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[y,I,B]),r.useEffect(()=>{if(!y||!I)return;const w=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=w}},[y,I]),r.useEffect(()=>{!y&&I&&B()},[y,I,B]);const O=r.useMemo(()=>({isMobile:y,drawerOpen:I,setDrawerOpen:j,closeDrawer:B,rootId:T,collapsed:l}),[y,I,j,B,T,l]),q=[he.navContainer,y?he.navMobile:he.navDesktop,y&&I?he.navDrawerOpen:"",l?he.navCollapsed:"",p].filter(Boolean).join(" "),oe=w=>{R.current=w,typeof _=="function"?_(w):_&&(_.current=w)};return e.jsxs(Jt.Provider,{value:O,children:[y&&!c&&e.jsx("button",{type:"button",className:he.navTrigger,"aria-expanded":I,"aria-controls":T,"aria-label":I?"Close navigation":"Open navigation",onClick:()=>j(!I),children:I?e.jsx(ur,{}):e.jsx(dr,{})}),y&&I&&e.jsx("div",{className:he.navBackdrop,"aria-hidden":"true",onClick:B}),e.jsx("nav",{ref:oe,id:T,role:"navigation","aria-label":g,"aria-hidden":y&&!I?!0:void 0,className:q,...b,children:e.jsx("ul",{className:he.navList,children:t})})]})});Rn.displayName="EvoNav";const pr=Object.assign(Rn,{Group:nn,Item:en,SubItem:tn,Skeleton:Sn,QuickAction:sn}),_r="_topNav_hpesm_27",fr="_topNavInner_hpesm_35",mr="_topNavBrand_hpesm_43",vr="_topNavMenu_hpesm_52",xr="_topNavItemRow_hpesm_63",gr="_topNavMenuScroll_hpesm_68",br="_topNavItem_hpesm_63",yr="_topNavItemActive_hpesm_108",wr="_topNavItemLabel_hpesm_117",jr="_topNavIcon_hpesm_121",kr="_topNavActions_hpesm_131",Nr="_topNavToggle_hpesm_139",Er="_toggleIcon_hpesm_163",Tr="_topNavDropdown_hpesm_167",Ir="_topNavDropdownContent_hpesm_183",$r="_topNavDropdownContentOpen_hpesm_206",Cr="_topNavDropdownItem_hpesm_211",Mr="_topNavMenuDrawer_hpesm_247",Lr="_topNavDropdownTrigger_hpesm_265",Dr="_topNavMenuDrawerClosed_hpesm_272",Br="_topNavDropdownInDrawer_hpesm_278",Sr="_topNavBackdrop_hpesm_291",Rr="_topNavReducedMotion_hpesm_301",pe={topNav:_r,topNavInner:fr,topNavBrand:mr,topNavMenu:vr,topNavItemRow:xr,topNavMenuScroll:gr,topNavItem:br,topNavItemActive:yr,topNavItemLabel:wr,topNavIcon:jr,topNavActions:kr,topNavToggle:Nr,toggleIcon:Er,topNavDropdown:Tr,topNavDropdownContent:Ir,topNavDropdownContentOpen:$r,topNavDropdownItem:Cr,topNavMenuDrawer:Mr,topNavDropdownTrigger:Lr,topNavMenuDrawerClosed:Dr,topNavDropdownInDrawer:Br,topNavBackdrop:Sr,topNavReducedMotion:Rr},Ve=(...n)=>n.filter(Boolean).join(" ");function Ar(n,t){return s=>{n==null||n(s),s.defaultPrevented||t==null||t(s)}}function An(n){const{value:t,defaultValue:s,onChange:o}=n,[a,i]=r.useState(s),c=t!==void 0,l=c?t:a,p=r.useCallback(g=>{c||i(g),o==null||o(g)},[c,o]);return[l,p]}const zr=typeof window<"u"?r.useLayoutEffect:r.useEffect;function on(n,t=!1){const[s,o]=r.useState(t);return zr(()=>{var c;if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(n),i=()=>o(a.matches);return i(),(c=a.addEventListener)==null||c.call(a,"change",i),()=>{var l;return(l=a.removeEventListener)==null?void 0:l.call(a,"change",i)}},[n]),s}const Pr=n=>on(`(max-width: ${n-1}px)`),Or=()=>on("(hover: hover) and (pointer: fine)",!0),Wr=()=>on("(prefers-reduced-motion: reduce)");function qt(n){return n?Array.from(n.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])')).filter(t=>!t.hasAttribute("aria-hidden")&&t.offsetParent!==null):[]}const zn=r.forwardRef(function({children:t,...s},o){const a=r.Children.only(t),i=a.props??{},c={...s,...i};c.className=Ve(s.className,i.className),(s.style||i.style)&&(c.style={...s.style,...i.style});for(const l of Object.keys(s))if(l.startsWith("on")&&typeof s[l]=="function"){const p=s[l],g=i[l];c[l]=Ar(p,g)}return r.cloneElement(a,c)}),Tt=r.createContext(null);function Pn(n){const t=r.useContext(Tt);if(!t)throw new Error(`EvoTopNav.${n} must be rendered inside <EvoTopNav>.`);return t}const On=r.createContext(null),Hr=({open:n})=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",className:pe.toggleIcon,children:n?e.jsx(e.Fragment,{children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}):e.jsx(e.Fragment,{children:e.jsx("path",{d:"M3 5h12M3 9h12M3 13h12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}),Fr=({open:n})=>e.jsx("svg",{viewBox:"0 0 12 12",width:"10",height:"10",fill:"none","aria-hidden":"true",className:Ve(pe.dropdownChevron,n&&pe.dropdownChevronOpen),children:e.jsx("path",{d:"M3 4.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Wn=r.forwardRef(function({children:t,className:s,...o},a){return e.jsx("div",{ref:a,className:Ve(pe.topNavBrand,s),...o,children:t})}),Hn=r.forwardRef(function({children:t,className:s,...o},a){const i=Pn("Menu"),c=r.useRef(null),l=_=>{c.current=_,i.menuRef.current=_,typeof a=="function"?a(_):a&&(a.current=_)},p=i.toggleCount>0,g=i.isCollapsed&&p,b=g&&!i.drawerOpen;return e.jsx("ul",{ref:l,id:i.menuId,className:Ve(pe.topNavMenu,g&&pe.topNavMenuDrawer,b&&pe.topNavMenuDrawerClosed,i.isCollapsed&&!p&&pe.topNavMenuScroll,s),"data-state":g?i.drawerOpen?"open":"closed":"inline","aria-hidden":b||void 0,...o,children:t})}),Fn=r.forwardRef(function({children:t,active:s,icon:o,href:a,target:i,rel:c,onClick:l,asChild:p,className:g},b){const _=r.useContext(Tt),y=!!_&&_.isCollapsed&&_.drawerOpen,I=R=>{l==null||l(R),!R.defaultPrevented&&y&&_.setDrawerOpen(!1)},j={className:Ve(pe.topNavItem,s&&pe.topNavItemActive,g),"aria-current":s?"page":void 0,"data-active":s||void 0},B=e.jsxs(e.Fragment,{children:[o&&e.jsx("span",{className:pe.topNavIcon,"aria-hidden":"true",children:o}),e.jsx("span",{className:pe.topNavItemLabel,children:t})]});let T;return p?T=e.jsx(zn,{...j,onClick:I,ref:b,children:t}):a?T=e.jsx("a",{ref:b,href:a,target:i,rel:c??(i==="_blank"?"noopener noreferrer":void 0),onClick:I,...j,children:B}):T=e.jsx("button",{ref:b,type:"button",onClick:I,...j,children:B}),e.jsx("li",{className:pe.topNavItemRow,children:T})}),qn=r.forwardRef(function({children:t,className:s,...o},a){return e.jsx("div",{ref:a,className:Ve(pe.topNavActions,s),...o,children:t})}),Gn=r.forwardRef(function({icon:t,className:s,onClick:o,"aria-label":a,...i},c){const l=Pn("Toggle"),p=r.useRef(null);r.useEffect(()=>l.registerToggle(),[l]);const g=_=>{p.current=_,l.toggleRef.current=_,typeof c=="function"?c(_):c&&(c.current=_)},b=_=>{o==null||o(_),_.defaultPrevented||l.setDrawerOpen(!l.drawerOpen)};return e.jsx("button",{ref:g,id:l.toggleId,type:"button",className:Ve(pe.topNavToggle,s),"aria-expanded":l.drawerOpen,"aria-controls":l.menuId,"aria-label":a??(l.drawerOpen?"Close menu":"Open menu"),onClick:b,...i,children:t??e.jsx(Hr,{open:l.drawerOpen})})}),Vn=({label:n,icon:t,active:s,hoverable:o=!0,open:a,defaultOpen:i=!1,onOpenChange:c,children:l,className:p})=>{const g=r.useContext(Tt),b=!!g&&g.isCollapsed&&g.toggleCount>0,[_,y]=An({value:a,defaultValue:i,onChange:c}),I=Or(),j=o&&I&&!b,B=r.useRef(null),T=r.useRef(null),R=r.useRef(null),O=r.useId(),q=r.useRef(null),oe=r.useCallback(()=>{var v;y(!1),(v=B.current)==null||v.focus()},[y]);r.useEffect(()=>{if(!_||b)return;const v=X=>{const S=R.current;S&&X.target instanceof Node&&!S.contains(X.target)&&y(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[_,b,y]),r.useEffect(()=>{if(!_||b)return;const v=X=>{X.key==="Escape"&&(X.stopPropagation(),oe())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[_,b,oe]);const w=r.useCallback(v=>{var K;const X=qt(T.current);if(X.length===0)return;const S=document.activeElement,re=S?X.indexOf(S):-1;let C=0;v==="first"?C=0:v==="last"?C=X.length-1:v===1?C=re<0?0:(re+1)%X.length:C=re<0?X.length-1:(re-1+X.length)%X.length,(K=X[C])==null||K.focus()},[]),D=v=>{v.key==="ArrowDown"||v.key==="Enter"||v.key===" "?(v.preventDefault(),y(!0),requestAnimationFrame(()=>w("first"))):v.key==="ArrowUp"&&(v.preventDefault(),y(!0),requestAnimationFrame(()=>w("last")))},M=v=>{v.key==="ArrowDown"?(v.preventDefault(),w(1)):v.key==="ArrowUp"?(v.preventDefault(),w(-1)):v.key==="Home"?(v.preventDefault(),w("first")):v.key==="End"?(v.preventDefault(),w("last")):v.key==="Tab"&&y(!1)},$=()=>{j&&(q.current&&clearTimeout(q.current),y(!0))},te=()=>{j&&(q.current&&clearTimeout(q.current),q.current=setTimeout(()=>y(!1),120))},W=r.useMemo(()=>({open:_,setOpen:y,triggerRef:B,contentRef:T,contentId:O,focusItem:w,inDrawer:b}),[_,y,O,w,b]);return e.jsx(On.Provider,{value:W,children:e.jsxs("li",{ref:R,className:Ve(pe.topNavDropdown,b&&pe.topNavDropdownInDrawer,_&&pe.topNavDropdownOpen,p),onMouseEnter:$,onMouseLeave:te,children:[e.jsxs("button",{ref:B,type:"button",className:Ve(pe.topNavItem,pe.topNavDropdownTrigger,s&&pe.topNavItemActive),"aria-haspopup":"menu","aria-expanded":_,"aria-controls":O,"aria-current":s?"page":void 0,onClick:()=>y(!_),onKeyDown:D,children:[t&&e.jsx("span",{className:pe.topNavIcon,"aria-hidden":"true",children:t}),e.jsx("span",{className:pe.topNavItemLabel,children:n}),e.jsx(Fr,{open:_})]}),e.jsx("ul",{ref:T,id:O,role:"menu",className:Ve(pe.topNavDropdownContent,_&&pe.topNavDropdownContentOpen),"aria-hidden":!_||void 0,onKeyDown:M,children:l})]})})},Un=r.forwardRef(function({children:t,icon:s,active:o,href:a,target:i,rel:c,onClick:l,asChild:p,className:g},b){const _=r.useContext(On),y=r.useContext(Tt),I=R=>{l==null||l(R),R.defaultPrevented||(_==null||_.setOpen(!1),y&&y.isCollapsed&&y.drawerOpen&&y.setDrawerOpen(!1))},j={className:Ve(pe.topNavDropdownItem,o&&pe.topNavItemActive,g),role:"menuitem","aria-current":o?"page":void 0},B=e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:pe.topNavIcon,"aria-hidden":"true",children:s}),e.jsx("span",{className:pe.topNavItemLabel,children:t})]});let T;return p?T=e.jsx(zn,{...j,onClick:I,ref:b,children:t}):a?T=e.jsx("a",{ref:b,href:a,target:i,rel:c??(i==="_blank"?"noopener noreferrer":void 0),onClick:I,...j,children:B}):T=e.jsx("button",{ref:b,type:"button",onClick:I,...j,children:B}),e.jsx("li",{children:T})}),tt=r.forwardRef(function({children:t,open:s,defaultOpen:o=!1,onOpenChange:a,collapseBelow:i=768,className:c,...l},p){const[g,b]=An({value:s,defaultValue:o,onChange:a}),_=Pr(i),y=Wr(),[I,j]=r.useState(0),B=r.useCallback(()=>(j(M=>M+1),()=>j(M=>Math.max(0,M-1))),[]),T=r.useId(),R=r.useId(),O=r.useRef(null),q=r.useRef(null),oe=r.useRef(null),w=_&&g&&I>0;r.useEffect(()=>{!_&&g&&b(!1)},[_,g,b]),r.useEffect(()=>{if(!w)return;const M=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=M}},[w]),r.useEffect(()=>{if(!w)return;oe.current=document.activeElement??null;const $=requestAnimationFrame(()=>{var v;(v=qt(O.current)[0])==null||v.focus()}),te=W=>{if(W.key==="Escape"){W.preventDefault(),b(!1);return}if(W.key!=="Tab"||!O.current)return;const v=qt(O.current);if(v.length===0)return;const X=v[0],S=v[v.length-1],re=document.activeElement;W.shiftKey&&re===X?(W.preventDefault(),S.focus()):(!W.shiftKey&&re===S||re&&!O.current.contains(re))&&(W.preventDefault(),X.focus())};return document.addEventListener("keydown",te),()=>{cancelAnimationFrame($),document.removeEventListener("keydown",te)}},[w,b]),r.useEffect(()=>{if(w)return;const M=oe.current;if(M&&typeof M.focus=="function"){const $=document.activeElement;(!$||$===document.body||O.current&&O.current.contains($))&&M.focus(),oe.current=null}},[w]);const D=r.useMemo(()=>({drawerOpen:g,setDrawerOpen:b,isCollapsed:_,menuId:T,toggleId:R,registerToggle:B,toggleCount:I,menuRef:O,toggleRef:q}),[g,b,_,T,R,B,I]);return e.jsx(Tt.Provider,{value:D,children:e.jsxs("nav",{ref:p,className:Ve(pe.topNav,w&&pe.topNavDrawerOpen,y&&pe.topNavReducedMotion,c),"data-collapsed":_||void 0,"data-drawer-open":w||void 0,...l,children:[e.jsx("div",{className:pe.topNavInner,children:t}),w&&e.jsx("div",{className:pe.topNavBackdrop,onClick:()=>b(!1),"aria-hidden":"true"})]})})});Wn.displayName="EvoTopNav.Brand";Hn.displayName="EvoTopNav.Menu";Fn.displayName="EvoTopNav.Item";qn.displayName="EvoTopNav.Actions";Gn.displayName="EvoTopNav.Toggle";Vn.displayName="EvoTopNav.Dropdown";Un.displayName="EvoTopNav.DropdownItem";tt.displayName="EvoTopNav";tt.Brand=Wn;tt.Menu=Hn;tt.Item=Fn;tt.Actions=qn;tt.Toggle=Gn;tt.Dropdown=Vn;tt.DropdownItem=Un;const qr="_pagination_1lhxw_1",Gr="_pageBtn_1lhxw_8",Vr="_activePage_1lhxw_34",Ur="_navBtn_1lhxw_45",Kr="_ellipsis_1lhxw_49",ot={pagination:qr,pageBtn:Gr,activePage:Vr,navBtn:Ur,ellipsis:Kr},_n=(n,t)=>Array.from({length:t-n+1},(s,o)=>n+o),Qr=({total:n,page:t,pageSize:s=10,siblingCount:o=1,onChange:a,className:i=""})=>{const c=Math.max(1,Math.ceil(n/s)),l=()=>{if(c<=7)return _n(1,c);const p=Math.max(2,t-o),g=Math.min(c-1,t+o),b=[1];return p>2&&b.push("..."),b.push(..._n(p,g)),g<c-1&&b.push("..."),c>1&&b.push(c),b};return e.jsxs("nav",{className:`${ot.pagination} ${i}`,"aria-label":"Pagination",children:[e.jsx("button",{className:`${ot.pageBtn} ${ot.navBtn}`,disabled:t<=1,onClick:()=>a(t-1),"aria-label":"Previous page",children:"‹"}),l().map((p,g)=>p==="..."?e.jsx("span",{className:ot.ellipsis,children:"…"},`ellipsis-${g}`):e.jsx("button",{className:[ot.pageBtn,p===t?ot.activePage:""].filter(Boolean).join(" "),onClick:()=>a(p),"aria-label":`Page ${p}`,"aria-current":p===t?"page":void 0,children:p},p)),e.jsx("button",{className:`${ot.pageBtn} ${ot.navBtn}`,disabled:t>=c,onClick:()=>a(t+1),"aria-label":"Next page",children:"›"})]})},Yr="_overlay_1qpdy_1",Xr="_palette_1qpdy_23",Jr="_searchRow_1qpdy_46",Zr="_searchIconWrap_1qpdy_54",ea="_searchInput_1qpdy_61",ta="_escBadge_1qpdy_75",na="_results_1qpdy_86",sa="_empty_1qpdy_102",oa="_group_1qpdy_109",ra="_groupLabel_1qpdy_113",aa="_resultItem_1qpdy_122",ia="_resultActive_1qpdy_135",la="_resultIcon_1qpdy_139",ca="_resultLabel_1qpdy_149",da="_resultDesc_1qpdy_157",ua="_resultShortcut_1qpdy_163",ha="_footer_1qpdy_178",pa="_footerRight_1qpdy_202",De={overlay:Yr,palette:Xr,searchRow:Jr,searchIconWrap:Zr,searchInput:ea,escBadge:ta,results:na,empty:sa,group:oa,groupLabel:ra,resultItem:aa,resultActive:ia,resultIcon:la,resultLabel:ca,resultDesc:da,resultShortcut:ua,footer:ha,footerRight:pa},_a=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),fa=()=>e.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",width:"16",height:"16",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),ma=({items:n,placeholder:t="Search commands…",open:s,onClose:o})=>{const[a,i]=r.useState(!1),[c,l]=r.useState(""),[p,g]=r.useState(0),b=r.useRef(null),_=r.useRef(null),y=s!==void 0,I=y?s:a,j=r.useCallback(()=>{y||i(!1),o==null||o()},[y,o]);r.useEffect(()=>{const w=D=>{(D.ctrlKey||D.metaKey)&&D.key==="k"&&(D.preventDefault(),y||i(M=>!M)),D.key==="Escape"&&I&&j()};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[y,I,j]),r.useEffect(()=>{if(I){l(""),g(0);const w=setTimeout(()=>{var D;return(D=b.current)==null?void 0:D.focus()},30);return()=>clearTimeout(w)}},[I]);const T=(c.trim()?n.filter(w=>{var D,M;return w.label.toLowerCase().includes(c.toLowerCase())||((D=w.description)==null?void 0:D.toLowerCase().includes(c.toLowerCase()))||((M=w.group)==null?void 0:M.toLowerCase().includes(c.toLowerCase()))}):n).reduce((w,D)=>{const M=D.group??"Actions";return w[M]||(w[M]=[]),w[M].push(D),w},{}),R=Object.values(T).flat(),O=w=>{var M;const D=(M=_.current)==null?void 0:M.querySelector(`[data-idx="${w}"]`);D==null||D.scrollIntoView({block:"nearest"})},q=w=>{w.key==="ArrowDown"?(w.preventDefault(),g(D=>{const M=Math.min(D+1,R.length-1);return O(M),M})):w.key==="ArrowUp"?(w.preventDefault(),g(D=>{const M=Math.max(D-1,0);return O(M),M})):w.key==="Enter"&&R[p]&&(R[p].onSelect(),j())};if(!I)return null;let oe=0;return e.jsx("div",{className:De.overlay,onClick:j,role:"dialog","aria-modal":"true",children:e.jsxs("div",{className:De.palette,onClick:w=>w.stopPropagation(),onKeyDown:q,children:[e.jsxs("div",{className:De.searchRow,children:[e.jsx("span",{className:De.searchIconWrap,children:e.jsx(fa,{})}),e.jsx("input",{ref:b,className:De.searchInput,placeholder:t,value:c,onChange:w=>{l(w.target.value),g(0)},"aria-label":"Command search"}),e.jsx("kbd",{className:De.escBadge,children:"Esc"})]}),e.jsxs("div",{className:De.results,ref:_,children:[R.length===0&&e.jsxs("div",{className:De.empty,children:["No results for “",c,"”"]}),Object.entries(T).map(([w,D])=>e.jsxs("div",{className:De.group,children:[e.jsx("div",{className:De.groupLabel,children:w}),D.map(M=>{const $=oe++;return e.jsxs("button",{"data-idx":$,className:[De.resultItem,$===p?De.resultActive:""].filter(Boolean).join(" "),onClick:()=>{M.onSelect(),j()},onMouseEnter:()=>g($),children:[M.icon&&e.jsx("span",{className:De.resultIcon,children:M.icon}),e.jsx("span",{className:De.resultLabel,children:M.label}),M.description&&e.jsx("span",{className:De.resultDesc,children:M.description}),M.shortcut&&e.jsx("span",{className:De.resultShortcut,children:M.shortcut.map((te,W)=>e.jsx("kbd",{children:te},W))})]},M.label)})]},w))]}),e.jsxs("div",{className:De.footer,children:[e.jsxs("span",{children:[e.jsx("kbd",{children:"↑"}),e.jsx("kbd",{children:"↓"})," navigate"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"↵"})," select"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"Esc"})," close"]}),e.jsxs("span",{className:De.footerRight,children:[e.jsx("kbd",{children:_a?"⌘":"Ctrl"}),e.jsx("kbd",{children:"K"})," toggle"]})]})]})})},va="_field_l0kkf_1",xa="_fullWidth_l0kkf_8",ga="_label_l0kkf_12",ba="_inputWrapper_l0kkf_18",ya="_hasError_l0kkf_30",wa="_sm_l0kkf_38",ja="_md_l0kkf_42",ka="_lg_l0kkf_46",Na="_input_l0kkf_18",Ea="_adornment_l0kkf_69",Ta="_trailingAdornment_l0kkf_78",Ia="_errorText_l0kkf_83",$a="_helperText_l0kkf_89",Ge={field:va,fullWidth:xa,label:ga,inputWrapper:ba,hasError:ya,sm:wa,md:ja,lg:ka,input:Na,adornment:Ea,trailingAdornment:Ta,errorText:Ia,helperText:$a},Ca=({label:n,helperText:t,error:s,size:o="md",leadingAdornment:a,trailingAdornment:i,fullWidth:c=!1,className:l="",id:p,...g})=>{const b=p??(n==null?void 0:n.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:[Ge.field,c?Ge.fullWidth:"",l].filter(Boolean).join(" "),children:[n&&e.jsx("label",{htmlFor:b,className:Ge.label,children:n}),e.jsxs("div",{className:[Ge.inputWrapper,Ge[o],s?Ge.hasError:""].filter(Boolean).join(" "),children:[a&&e.jsx("span",{className:Ge.adornment,children:a}),e.jsx("input",{id:b,className:Ge.input,"aria-invalid":!!s,"aria-describedby":s?`${b}-error`:t?`${b}-helper`:void 0,...g}),i&&e.jsx("span",{className:`${Ge.adornment} ${Ge.trailingAdornment}`,children:i})]}),s&&e.jsx("p",{id:`${b}-error`,className:Ge.errorText,children:s}),!s&&t&&e.jsx("p",{id:`${b}-helper`,className:Ge.helperText,children:t})]})},Ma="_field_t1e02_1",La="_fullWidth_t1e02_9",Da="_label_t1e02_13",Ba="_shell_t1e02_19",Sa="_hasError_t1e02_33",Ra="_disabled_t1e02_39",Aa="_dragOver_t1e02_43",za="_toolbar_t1e02_48",Pa="_divider_t1e02_61",Oa="_toolBtn_t1e02_69",Wa="_toolBtnActive_t1e02_101",Ha="_editor_t1e02_110",Fa="_editorEmpty_t1e02_122",qa="_dropOverlay_t1e02_186",Ga="_linkPrompt_t1e02_202",Va="_linkInput_t1e02_211",Ua="_linkBtn_t1e02_228",Ka="_linkBtnGhost_t1e02_229",Qa="_helperText_t1e02_256",Ya="_errorText_t1e02_262",Ee={field:Ma,fullWidth:La,label:Da,shell:Ba,hasError:Sa,disabled:Ra,dragOver:Aa,toolbar:za,divider:Pa,toolBtn:Oa,toolBtnActive:Wa,editor:Ha,editorEmpty:Fa,dropOverlay:qa,linkPrompt:Ga,linkInput:Va,linkBtn:Ua,linkBtnGhost:Ka,helperText:Qa,errorText:Ya},Ce=({children:n})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n}),Me={bold:e.jsxs(Ce,{children:[e.jsx("path",{d:"M6 4h8a4 4 0 0 1 0 8H6z"}),e.jsx("path",{d:"M6 12h9a4 4 0 0 1 0 8H6z"})]}),italic:e.jsxs(Ce,{children:[e.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),e.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),e.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]}),underline:e.jsxs(Ce,{children:[e.jsx("path",{d:"M6 3v7a6 6 0 0 0 12 0V3"}),e.jsx("line",{x1:"4",y1:"21",x2:"20",y2:"21"})]}),strike:e.jsxs(Ce,{children:[e.jsx("path",{d:"M16 4H9a3 3 0 0 0-2.83 4"}),e.jsx("path",{d:"M14 12a4 4 0 0 1 0 8H6"}),e.jsx("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}),h1:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M17 10l3-2v10"})]}),h2:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"})]}),h3:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}),e.jsx("path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"})]}),paragraph:e.jsxs(Ce,{children:[e.jsx("path",{d:"M13 4v16"}),e.jsx("path",{d:"M17 4v16"}),e.jsx("path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13"})]}),ul:e.jsxs(Ce,{children:[e.jsx("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),e.jsx("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),e.jsx("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),e.jsx("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})]}),ol:e.jsxs(Ce,{children:[e.jsx("line",{x1:"10",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"10",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"10",y1:"18",x2:"21",y2:"18"}),e.jsx("path",{d:"M4 6h1v4"}),e.jsx("path",{d:"M4 10h2"}),e.jsx("path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1"})]}),quote:e.jsxs(Ce,{children:[e.jsx("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z"}),e.jsx("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z"})]}),code:e.jsxs(Ce,{children:[e.jsx("polyline",{points:"16 18 22 12 16 6"}),e.jsx("polyline",{points:"8 6 2 12 8 18"})]}),link:e.jsxs(Ce,{children:[e.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),e.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]}),image:e.jsxs(Ce,{children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),e.jsx("polyline",{points:"21 15 16 10 5 21"})]}),alignLeft:e.jsxs(Ce,{children:[e.jsx("line",{x1:"17",y1:"10",x2:"3",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"17",y1:"18",x2:"3",y2:"18"})]}),alignCenter:e.jsxs(Ce,{children:[e.jsx("line",{x1:"18",y1:"10",x2:"6",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"18",y1:"18",x2:"6",y2:"18"})]}),alignRight:e.jsxs(Ce,{children:[e.jsx("line",{x1:"21",y1:"10",x2:"7",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"21",y1:"18",x2:"7",y2:"18"})]}),clear:e.jsx(Ce,{children:e.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),undo:e.jsxs(Ce,{children:[e.jsx("path",{d:"M3 7v6h6"}),e.jsx("path",{d:"M21 17a9 9 0 0 0-15-6.7L3 13"})]}),redo:e.jsxs(Ce,{children:[e.jsx("path",{d:"M21 7v6h-6"}),e.jsx("path",{d:"M3 17a9 9 0 0 1 15-6.7L21 13"})]})},Wt={bold:{label:"Bold",icon:Me.bold,command:"bold",shortcut:"⌘B"},italic:{label:"Italic",icon:Me.italic,command:"italic",shortcut:"⌘I"},underline:{label:"Underline",icon:Me.underline,command:"underline",shortcut:"⌘U"},strike:{label:"Strikethrough",icon:Me.strike,command:"strikeThrough",query:"strikeThrough"},h1:{label:"Heading 1",icon:Me.h1,command:"formatBlock",arg:"H1"},h2:{label:"Heading 2",icon:Me.h2,command:"formatBlock",arg:"H2"},h3:{label:"Heading 3",icon:Me.h3,command:"formatBlock",arg:"H3"},paragraph:{label:"Paragraph",icon:Me.paragraph,command:"formatBlock",arg:"P"},ul:{label:"Bulleted list",icon:Me.ul,command:"insertUnorderedList"},ol:{label:"Numbered list",icon:Me.ol,command:"insertOrderedList"},quote:{label:"Blockquote",icon:Me.quote,command:"formatBlock",arg:"BLOCKQUOTE"},code:{label:"Inline code",icon:Me.code,command:"formatBlock",arg:"PRE"},"align-left":{label:"Align left",icon:Me.alignLeft,command:"justifyLeft"},"align-center":{label:"Align center",icon:Me.alignCenter,command:"justifyCenter"},"align-right":{label:"Align right",icon:Me.alignRight,command:"justifyRight"},clear:{label:"Clear formatting",icon:Me.clear,command:"removeFormat"},undo:{label:"Undo",icon:Me.undo,command:"undo",shortcut:"⌘Z"},redo:{label:"Redo",icon:Me.redo,command:"redo",shortcut:"⇧⌘Z"}},Xa=["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"];function Ja(n){return typeof n=="object"&&n!==null}function Za(n){return new Promise((t,s)=>{const o=new FileReader;o.onload=()=>t(String(o.result)),o.onerror=()=>s(o.error),o.readAsDataURL(n)})}function ht(n,t){try{document.execCommand(n,!1,t)}catch{}}const ei=/^(?:P|DIV|H[1-6]|BLOCKQUOTE|PRE|UL|OL|LI|TABLE)$/;function Ct(n,t){const s=window.getSelection();if(!s||s.rangeCount===0)return null;const o=s.getRangeAt(0).startContainer,a=o.nodeType===1?o:o.parentElement;let i=null;try{i=(a==null?void 0:a.closest(t))??null}catch{return null}return i&&n.contains(i)&&i!==n?i:null}function fn(n,t){var b;const s=window.getSelection();if(!s||s.rangeCount===0)return!1;const o=s.getRangeAt(0),a=o.startContainer,i=a.nodeType===1?a:a.parentElement;if(!i)return!1;const c=[];let l=null;try{l=i.closest(t)}catch{return!1}for(;l&&n.contains(l)&&l!==n;)c.push(l),l=((b=l.parentElement)==null?void 0:b.closest(t))??null;if(c.length===0)return!1;const p=document.createElement("span");p.setAttribute("data-evo-caret",""),o.insertNode(p),c.forEach(_=>{if(Array.from(_.children).some(I=>ei.test(I.tagName)))_.replaceWith(...Array.from(_.childNodes));else{const I=document.createElement("p");for(;_.firstChild;)I.appendChild(_.firstChild);I.childNodes.length||I.appendChild(document.createElement("br")),_.replaceWith(I)}});const g=n.querySelector("span[data-evo-caret]");if(g){const _=g.parentElement,y=document.createRange();y.setStartBefore(g),y.collapse(!0),s.removeAllRanges(),s.addRange(y),g.remove(),_&&!_.childNodes.length&&_.appendChild(document.createElement("br"))}return!0}function ti(n){const t=/^(?:P|DIV|H[1-6]|UL|OL|PRE|BLOCKQUOTE|TABLE)$/,s=[];let o=[];const a=()=>{if(!o.length)return;const i=document.createElement("p");o.forEach(c=>i.appendChild(c)),o=[],s.push(i)};return Array.from(n.childNodes).forEach(i=>{if(i.nodeType===1&&t.test(i.tagName)){a();let c=i;if(c.tagName==="DIV"){const l=document.createElement("p");for(;c.firstChild;)l.appendChild(c.firstChild);c=l}s.push(c)}else o.push(i)}),a(),s.forEach(i=>{!i.textContent&&!i.querySelector("br,img")&&i.appendChild(document.createElement("br"))}),s}function ni(n){const t=window.getSelection();if(!t||t.rangeCount===0)return!1;const s=t.getRangeAt(0);if(!s.collapsed)return!1;const o=s.startContainer,a=o.nodeType===1?o:o.parentElement,i=(a==null?void 0:a.closest("pre,blockquote"))??null;if(!i||!n.contains(i)||i===n)return!1;const c=document.createRange();c.setStart(s.startContainer,s.startOffset),c.setEnd(i,i.childNodes.length);const l=ti(c.extractContents());if(l.length===0){const b=document.createElement("p");b.appendChild(document.createElement("br")),l.push(b)}let p=i;l.forEach(b=>{p.after(b),p=b}),i.firstChild||i.remove();const g=document.createRange();return g.setStart(l[0],0),g.collapse(!0),t.removeAllRanges(),t.addRange(g),!0}const si=["bold","italic","underline","divider","h1","h2","divider","ul","ol","divider","link","image"],oi=r.forwardRef(function({value:t,defaultValue:s,onChange:o,tools:a=si,placeholder:i="Start writing…",minHeight:c=160,maxHeight:l,disabled:p=!1,readOnly:g=!1,label:b,helperText:_,error:y,fullWidth:I=!1,onImageUpload:j,acceptedImageTypes:B=Xa,maxImageSize:T,onImageError:R,className:O="",id:q},oe){const w=r.useRef(null),D=r.useRef(null),M=r.useRef(""),$=t!==void 0,[te,W]=r.useState({}),[v,X]=r.useState(!0),[S,re]=r.useState(!1),[C,K]=r.useState(null),A=q??(b==null?void 0:b.toLowerCase().replace(/\s+/g,"-"))??void 0;r.useEffect(()=>{var u,N;const m=w.current;m&&($?t!==M.current&&(m.innerHTML=t??"",M.current=t??"",X(!((u=m.textContent)!=null&&u.trim()))):s&&!M.current&&(m.innerHTML=s,M.current=s,X(!((N=m.textContent)!=null&&N.trim()))))},[t,s,$]);const Z=r.useCallback(()=>{const m=w.current,u={};Object.entries(Wt).forEach(([N,E])=>{try{E.command==="formatBlock"?m?(E.arg??"").toUpperCase()==="P"?u[N]=!!Ct(m,"P,DIV")&&!Ct(m,"BLOCKQUOTE,PRE,H1,H2,H3,H4,H5,H6"):u[N]=!!Ct(m,E.arg??""):u[N]=!1:u[N]=document.queryCommandState(E.query??E.command)}catch{u[N]=!1}}),W(u)},[]),Q=r.useCallback(()=>{var N;const m=w.current;if(!m)return;const u=m.innerHTML;M.current=u,X(!((N=m.textContent)!=null&&N.trim())&&!m.querySelector("img")),o==null||o(u),Z()},[o,Z]);r.useImperativeHandle(oe,()=>({getHTML:()=>{var m;return((m=w.current)==null?void 0:m.innerHTML)??""},setHTML:m=>{const u=w.current;u&&(u.innerHTML=m,Q())},getText:()=>{var m;return((m=w.current)==null?void 0:m.textContent)??""},focus:()=>{var m;return(m=w.current)==null?void 0:m.focus()},insertImage:(m,u="")=>de(m,u),insertHTML:m=>{var u;(u=w.current)==null||u.focus(),ht("insertHTML",m),Q()},clear:()=>{const m=w.current;m&&(m.innerHTML="",Q())}}),[Q]);const de=r.useCallback((m,u="")=>{var E;(E=w.current)==null||E.focus();const N=`<img src="${m.replace(/"/g,""")}" alt="${u.replace(/"/g,""")}" />`;ht("insertHTML",N),Q()},[Q]),ie=r.useCallback(async m=>{if(!B.includes(m.type)){R==null||R({code:"wrong-type",message:`Unsupported image type: ${m.type}`});return}if(T&&m.size>T){R==null||R({code:"too-large",message:`Image exceeds ${(T/1024/1024).toFixed(1)} MB`});return}try{const u=j?await j(m):await Za(m);de(u,m.name)}catch(u){R==null||R({code:"upload-failed",message:u instanceof Error?u.message:"Upload failed"})}},[B,T,j,R,de]),se=r.useCallback(m=>{const u=w.current;u==null||u.focus();const N=Wt[m];if(N){if(N.command==="formatBlock"&&u){const E=N.arg??"";E.toUpperCase()!=="P"&&Ct(u,E)?fn(u,E):(fn(u,"BLOCKQUOTE,PRE,H1,H2,H3,H4,H5,H6"),ht("formatBlock",E))}else ht(N.command,N.arg);Q()}},[Q]),J=r.useCallback(()=>{var m;(m=D.current)==null||m.click()},[]),ve=r.useCallback(()=>{const m=window.getSelection(),u=m&&m.rangeCount>0?m.getRangeAt(0).cloneRange():null;K({url:"https://",range:u})},[]),Te=r.useCallback(()=>{var N,E;if(!C)return;const{url:m,range:u}=C;if((N=w.current)==null||N.focus(),u){const V=window.getSelection();V==null||V.removeAllRanges(),V==null||V.addRange(u)}if(m&&m!=="https://"){ht("createLink",m);const V=(E=w.current)==null?void 0:E.querySelectorAll('a[href="'+m+'"]');V==null||V.forEach(be=>be.setAttribute("target","_blank"))}K(null),Q()},[C,Q]),ye=r.useCallback(()=>{Q()},[Q]),le=r.useCallback(m=>{if(m.key==="Enter"&&!m.shiftKey&&!m.metaKey&&!m.ctrlKey&&!m.altKey){const E=w.current;if(E&&ni(E)){m.preventDefault(),Q();return}}if(!(m.metaKey||m.ctrlKey))return;const N=m.key.toLowerCase();N==="b"?(m.preventDefault(),se("bold")):N==="i"?(m.preventDefault(),se("italic")):N==="u"&&(m.preventDefault(),se("underline"))},[se,Q]),Be=r.useCallback(async m=>{var E,V;const u=(E=m.clipboardData)==null?void 0:E.items;if(!u)return;for(let be=0;be<u.length;be++){const ue=u[be];if(ue.type.startsWith("image/")){m.preventDefault();const Pe=ue.getAsFile();Pe&&await ie(Pe);return}}const N=(V=m.clipboardData)==null?void 0:V.getData("text/plain");N!==void 0&&N!==""&&(m.preventDefault(),ht("insertText",N))},[ie]),we=r.useCallback(m=>{m.dataTransfer.types.includes("Files")&&(m.preventDefault(),re(!0))},[]),xe=r.useCallback(()=>re(!1),[]),ce=r.useCallback(async m=>{re(!1);const u=Array.from(m.dataTransfer.files??[]).filter(N=>N.type.startsWith("image/"));if(u.length!==0){m.preventDefault();for(const N of u)await ie(N)}},[ie]),ge=r.useCallback(async m=>{const u=Array.from(m.target.files??[]);m.target.value="";for(const N of u)await ie(N)},[ie]);r.useEffect(()=>{const m=()=>{const u=w.current;u&&(document.activeElement===u||u.contains(document.activeElement))&&Z()};return document.addEventListener("selectionchange",m),()=>document.removeEventListener("selectionchange",m)},[Z]);const We=r.useMemo(()=>a.length>0?e.jsx("div",{className:Ee.toolbar,role:"toolbar","aria-label":"Formatting toolbar",children:a.map((u,N)=>{var be;if(u==="divider")return e.jsx("span",{className:Ee.divider,"aria-hidden":"true"},`d-${N}`);if(Ja(u)){const ue=((be=u.isActive)==null?void 0:be.call(u))??!1;return e.jsx("button",{type:"button",className:[Ee.toolBtn,ue?Ee.toolBtnActive:""].filter(Boolean).join(" "),title:u.label,"aria-label":u.label,"aria-pressed":ue,disabled:p||g,onMouseDown:Pe=>Pe.preventDefault(),onClick:()=>u.onAction(je()),children:u.icon},u.key)}if(u==="image")return e.jsx("button",{type:"button",className:Ee.toolBtn,title:"Insert image","aria-label":"Insert image",disabled:p||g,onMouseDown:ue=>ue.preventDefault(),onClick:J,children:Me.image},"image");if(u==="link")return e.jsx("button",{type:"button",className:Ee.toolBtn,title:"Insert link","aria-label":"Insert link",disabled:p||g,onMouseDown:ue=>ue.preventDefault(),onClick:ve,children:Me.link},"link");const E=Wt[u];if(!E)return null;const V=!!te[u];return e.jsx("button",{type:"button",className:[Ee.toolBtn,V?Ee.toolBtnActive:""].filter(Boolean).join(" "),title:`${E.label}${E.shortcut?` (${E.shortcut})`:""}`,"aria-label":E.label,"aria-pressed":V,disabled:p||g,onMouseDown:ue=>ue.preventDefault(),onClick:()=>se(u),children:E.icon},u)})}):null,[a,te,p,g,J,ve,se]),je=r.useCallback(()=>({getHTML:()=>{var m;return((m=w.current)==null?void 0:m.innerHTML)??""},setHTML:m=>{const u=w.current;u&&(u.innerHTML=m,Q())},getText:()=>{var m;return((m=w.current)==null?void 0:m.textContent)??""},focus:()=>{var m;return(m=w.current)==null?void 0:m.focus()},insertImage:(m,u="")=>de(m,u),insertHTML:m=>{var u;(u=w.current)==null||u.focus(),ht("insertHTML",m),Q()},clear:()=>{const m=w.current;m&&(m.innerHTML="",Q())}}),[Q,de]),Ne={minHeight:typeof c=="number"?`${c}px`:c,maxHeight:l!==void 0?typeof l=="number"?`${l}px`:l:void 0};return e.jsxs("div",{className:[Ee.field,I?Ee.fullWidth:"",O].filter(Boolean).join(" "),children:[b&&e.jsx("label",{htmlFor:A,className:Ee.label,children:b}),e.jsxs("div",{className:[Ee.shell,y?Ee.hasError:"",p?Ee.disabled:"",S?Ee.dragOver:""].filter(Boolean).join(" "),children:[We,e.jsx("div",{ref:w,id:A,className:[Ee.editor,v?Ee.editorEmpty:""].filter(Boolean).join(" "),contentEditable:!p&&!g,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":b??"Rich text editor","aria-invalid":!!y,"aria-readonly":g,"aria-disabled":p,"data-placeholder":i,style:Ne,onInput:ye,onKeyDown:le,onPaste:Be,onDragOver:we,onDragLeave:xe,onDrop:ce,onBlur:Z}),S&&e.jsx("div",{className:Ee.dropOverlay,"aria-hidden":"true",children:e.jsx("span",{children:"Drop image to upload"})}),C&&e.jsxs("div",{className:Ee.linkPrompt,role:"dialog","aria-label":"Insert link",children:[e.jsx("input",{type:"url",className:Ee.linkInput,value:C.url,autoFocus:!0,onChange:m=>K({...C,url:m.target.value}),onKeyDown:m=>{m.key==="Enter"?(m.preventDefault(),Te()):m.key==="Escape"&&(m.preventDefault(),K(null))},placeholder:"https://example.com"}),e.jsx("button",{type:"button",className:Ee.linkBtn,onClick:Te,children:"Apply"}),e.jsx("button",{type:"button",className:Ee.linkBtnGhost,onClick:()=>K(null),children:"Cancel"})]}),e.jsx("input",{ref:D,type:"file",accept:B.join(","),multiple:!0,hidden:!0,onChange:ge})]}),y&&e.jsx("p",{className:Ee.errorText,children:y}),!y&&_&&e.jsx("p",{className:Ee.helperText,children:_})]})}),ri="_field_121w6_7",ai="_fullWidth_121w6_15",ii="_disabled_121w6_19",li="_trigger_121w6_19",ci="_label_121w6_25",di="_selectWrapper_121w6_33",ui="_open_121w6_66",hi="_hasError_121w6_70",pi="_sm_121w6_82",_i="_md_121w6_89",fi="_lg_121w6_95",mi="_triggerValue_121w6_102",vi="_triggerPlaceholder_121w6_103",xi="_triggerChips_121w6_113",gi="_chipRow_121w6_120",bi="_chip_121w6_120",yi="_chipIcon_121w6_143",wi="_chipLabel_121w6_151",ji="_chipRemove_121w6_158",ki="_countMore_121w6_175",Ni="_triggerText_121w6_185",Ei="_triggerIcon_121w6_192",Ti="_triggerActions_121w6_200",Ii="_clearBtn_121w6_208",$i="_chevron_121w6_225",Ci="_chevronOpen_121w6_233",Mi="_menu_121w6_245",Li="_menuOpen_121w6_1",Di="_searchRow_121w6_271",Bi="_searchIconWrap_121w6_280",Si="_searchInput_121w6_286",Ri="_bulkRow_121w6_302",Ai="_bulkBtn_121w6_311",zi="_bulkCount_121w6_333",Pi="_list_121w6_341",Oi="_empty_121w6_367",Wi="_option_121w6_375",Hi="_optionActive_121w6_396",Fi="_optionDisabled_121w6_396",qi="_optionSelected_121w6_401",Gi="_optionTitle_121w6_404",Vi="_optionIcon_121w6_413",Ui="_optionLabel_121w6_424",Ki="_optionDesc_121w6_439",Qi="_check_121w6_448",Yi="_checkbox_121w6_459",Xi="_checkboxChecked_121w6_473",Ji="_errorText_121w6_484",Zi="_helperText_121w6_491",U={field:ri,fullWidth:ai,disabled:ii,trigger:li,label:ci,selectWrapper:di,open:ui,hasError:hi,sm:pi,md:_i,lg:fi,triggerValue:mi,triggerPlaceholder:vi,triggerChips:xi,chipRow:gi,chip:bi,chipIcon:yi,chipLabel:wi,chipRemove:ji,countMore:ki,triggerText:Ni,triggerIcon:Ei,triggerActions:Ti,clearBtn:Ii,chevron:$i,chevronOpen:Ci,menu:Mi,menuOpen:Li,searchRow:Di,searchIconWrap:Bi,searchInput:Si,bulkRow:Ri,bulkBtn:Ai,bulkCount:zi,list:Pi,empty:Oi,option:Wi,optionActive:Hi,optionDisabled:Fi,optionSelected:qi,optionTitle:Gi,optionIcon:Vi,optionLabel:Ui,optionDesc:Ki,check:Qi,checkbox:Yi,checkboxChecked:Xi,errorText:Ji,helperText:Zi},el=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),mn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),vn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),tl=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),nl=n=>{const{label:t,options:s,placeholder:o="Select an option",helperText:a,error:i,size:c="md",fullWidth:l=!1,disabled:p=!1,searchable:g=!1,clearable:b=!1,id:_,name:y,className:I=""}=n,j=n.multiple===!0,B=j?n.multipleDisplay??"chips":"chips",T=j?n.maxSelections:void 0,R=j?n.showSelectAll??!1:!1,O=r.useId(),q=_??`evo-select-${O}`,oe=`${q}-listbox`,w=n.value,D=n.defaultValue,M=w!==void 0,$=j?Array.isArray(D)?D:[]:typeof D=="string"?D:"",[te,W]=r.useState($),v=M?w:te,X=j?Array.isArray(v)?v:[]:typeof v=="string"&&v?[v]:[],[S,re]=r.useState(!1),[C,K]=r.useState(-1),[A,Z]=r.useState(""),Q=r.useRef(null),de=r.useRef(null),ie=r.useRef(null),se=r.useRef(null),J=g&&A?s.filter(u=>u.label.toLowerCase().includes(A.toLowerCase())):s,ve=j?void 0:s.find(u=>u.value===v),Te=j?s.filter(u=>X.includes(u.value)):[],ye=j&&T!==void 0&&X.length>=T,le=r.useCallback(u=>{var N,E;M||W(u),j?(N=n.onChange)==null||N.call(n,u):(E=n.onChange)==null||E.call(n,u)},[M,j,n.onChange]),Be=r.useCallback(u=>{if(j){const N=Array.isArray(v)?v:[];if(N.includes(u))le(N.filter(E=>E!==u));else{if(T!==void 0&&N.length>=T)return;le([...N,u])}}else le(u)},[le,j,T,v]);r.useEffect(()=>{if(!S)return;const u=N=>{var E;(E=Q.current)!=null&&E.contains(N.target)||(re(!1),Z(""))};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[S]),r.useEffect(()=>{if(S){const u=J.findIndex(N=>X.includes(N.value));if(K(u>=0?u:J.findIndex(N=>!N.disabled)),g){const N=setTimeout(()=>{var E;return(E=ie.current)==null?void 0:E.focus()},30);return()=>clearTimeout(N)}}else Z(""),K(-1)},[S]),r.useEffect(()=>{var N;if(!S||C<0)return;const u=(N=se.current)==null?void 0:N.querySelector(`[data-idx="${C}"]`);u==null||u.scrollIntoView({block:"nearest"})},[C,S]);const we=u=>{if(J.length===0)return;let N=C;for(let E=0;E<J.length;E++)if(N=(N+u+J.length)%J.length,!J[N].disabled){K(N);return}},xe=u=>{var N,E;if(!p){if(!S){(u.key==="Enter"||u.key===" "||u.key==="ArrowDown"||u.key==="ArrowUp")&&(u.preventDefault(),re(!0));return}if(u.key==="Escape")u.preventDefault(),re(!1),(N=de.current)==null||N.focus();else if(u.key==="ArrowDown")u.preventDefault(),we(1);else if(u.key==="ArrowUp")u.preventDefault(),we(-1);else if(u.key==="Enter"){u.preventDefault();const V=J[C];if(V&&!V.disabled){if(!X.includes(V.value)&&ye)return;Be(V.value),j||(re(!1),(E=de.current)==null||E.focus())}}else if(u.key==="Home"){u.preventDefault();const V=J.findIndex(be=>!be.disabled);V>=0&&K(V)}else if(u.key==="End"){u.preventDefault();for(let V=J.length-1;V>=0;V--)if(!J[V].disabled){K(V);break}}else u.key==="Tab"&&re(!1)}},ce=u=>{var E;u.disabled||!X.includes(u.value)&&ye||(Be(u.value),j||(re(!1),(E=de.current)==null||E.focus()))},ge=u=>{u.stopPropagation(),le(j?[]:"")},We=(u,N)=>{if(u.stopPropagation(),!j)return;const E=Array.isArray(v)?v:[];le(E.filter(V=>V!==N))},je=()=>{if(!j)return;const u=J.filter(V=>!V.disabled).map(V=>V.value),N=Array.from(new Set([...Array.isArray(v)?v:[],...u])),E=T!==void 0?N.slice(0,T):N;le(E)},Ne=j?X.length>0:!!v,m=()=>{var u;if(!Ne)return e.jsx("span",{className:U.triggerPlaceholder,children:e.jsx("span",{className:U.triggerText,children:o})});if(!j)return e.jsxs("span",{className:U.triggerValue,children:[(ve==null?void 0:ve.icon)&&e.jsx("span",{className:U.triggerIcon,children:ve.icon}),e.jsx("span",{className:U.triggerText,children:ve==null?void 0:ve.label})]});if(B==="count"){const N=((u=Te[0])==null?void 0:u.label)??"",E=Te.length-1;return e.jsx("span",{className:U.triggerValue,children:e.jsxs("span",{className:U.triggerText,children:[N,E>0&&e.jsxs("span",{className:U.countMore,children:[", +",E," more"]})]})})}return e.jsx("span",{className:U.chipRow,children:Te.map(N=>e.jsxs("span",{className:U.chip,children:[N.icon&&e.jsx("span",{className:U.chipIcon,children:N.icon}),e.jsx("span",{className:U.chipLabel,children:N.label}),!p&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":`Remove ${N.label}`,className:U.chipRemove,onClick:E=>We(E,N.value),onMouseDown:E=>E.preventDefault(),children:e.jsx(vn,{})})]},N.value))})};return e.jsxs("div",{ref:Q,className:[U.field,l?U.fullWidth:"",p?U.disabled:"",I].filter(Boolean).join(" "),children:[t&&e.jsx("label",{htmlFor:q,className:U.label,children:t}),e.jsxs("div",{className:U.selectWrapper,children:[e.jsxs("button",{ref:de,id:q,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":S,"aria-controls":oe,"aria-invalid":!!i,"aria-multiselectable":j||void 0,disabled:p,className:[U.trigger,U[c],S?U.open:"",i?U.hasError:"",j&&B==="chips"&&X.length>0?U.triggerChips:""].filter(Boolean).join(" "),onClick:()=>!p&&re(u=>!u),onKeyDown:xe,children:[m(),e.jsxs("span",{className:U.triggerActions,children:[b&&Ne&&!p&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":"Clear selection",className:U.clearBtn,onClick:ge,onMouseDown:u=>u.preventDefault(),children:e.jsx(vn,{})}),e.jsx("span",{className:[U.chevron,S?U.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(el,{})})]})]}),S&&e.jsxs("div",{className:U.menu,role:"listbox",id:oe,"aria-labelledby":q,"aria-multiselectable":j||void 0,"aria-activedescendant":C>=0?`${q}-opt-${C}`:void 0,children:[g&&e.jsxs("div",{className:U.searchRow,children:[e.jsx("span",{className:U.searchIconWrap,children:e.jsx(tl,{})}),e.jsx("input",{ref:ie,type:"text",className:U.searchInput,placeholder:"Search...",value:A,onChange:u=>{Z(u.target.value),K(0)},onKeyDown:xe})]}),j&&R&&J.length>0&&e.jsxs("div",{className:U.bulkRow,children:[e.jsx("button",{type:"button",className:U.bulkBtn,onClick:je,disabled:T!==void 0&&X.length>=T,children:"Select all"}),e.jsx("button",{type:"button",className:U.bulkBtn,onClick:()=>le([]),disabled:X.length===0,children:"Clear all"}),T!==void 0&&e.jsxs("span",{className:U.bulkCount,children:[X.length," / ",T]})]}),e.jsx("div",{className:U.list,ref:se,role:"presentation",children:J.length===0?e.jsx("div",{className:U.empty,children:"No results"}):J.map((u,N)=>{const E=X.includes(u.value),V=N===C,be=!E&&ye,ue=u.disabled||be;return e.jsxs("div",{id:`${q}-opt-${N}`,role:"option","aria-selected":E,"aria-disabled":ue,"data-idx":N,className:[U.option,E?U.optionSelected:"",V?U.optionActive:"",ue?U.optionDisabled:""].filter(Boolean).join(" "),onClick:()=>!ue&&ce(u),onMouseEnter:()=>!ue&&K(N),children:[j&&e.jsx("span",{className:[U.checkbox,E?U.checkboxChecked:""].filter(Boolean).join(" "),"aria-hidden":"true",children:E&&e.jsx(mn,{})}),u.icon&&e.jsx("span",{className:U.optionIcon,children:u.icon}),e.jsxs("span",{className:U.optionLabel,children:[e.jsx("span",{className:U.optionTitle,children:u.label}),u.description&&e.jsx("span",{className:U.optionDesc,children:u.description})]}),!j&&e.jsx("span",{className:U.check,"aria-hidden":!0,children:E&&e.jsx(mn,{})})]},u.value)})})]}),y&&!j&&e.jsx("input",{type:"hidden",name:y,value:v}),y&&j&&X.map(u=>e.jsx("input",{type:"hidden",name:y,value:u},u))]}),i&&e.jsx("p",{className:U.errorText,children:i}),!i&&a&&e.jsx("p",{className:U.helperText,children:a})]})},sl="_field_sc9v8_16",ol="_fullWidth_sc9v8_24",rl="_disabled_sc9v8_28",al="_trigger_sc9v8_28",il="_label_sc9v8_34",ll="_selectWrapper_sc9v8_41",cl="_open_sc9v8_70",dl="_hasError_sc9v8_74",ul="_sm_sc9v8_86",hl="_md_sc9v8_93",pl="_lg_sc9v8_99",_l="_triggerValue_sc9v8_106",fl="_triggerPlaceholder_sc9v8_107",ml="_triggerText_sc9v8_120",vl="_triggerActions_sc9v8_127",xl="_chip_sc9v8_136",gl="_chipLabel_sc9v8_152",bl="_chipRemove_sc9v8_158",yl="_chipOverflow_sc9v8_174",wl="_clearBtn_sc9v8_188",jl="_chevron_sc9v8_204",kl="_chevronOpen_sc9v8_212",Nl="_menu_sc9v8_224",El="_menuOpen_sc9v8_1",Tl="_searchRow_sc9v8_250",Il="_searchIconWrap_sc9v8_259",$l="_searchInput_sc9v8_265",Cl="_tree_sc9v8_281",Ml="_empty_sc9v8_306",Ll="_row_sc9v8_314",Dl="_rowDisabled_sc9v8_331",Bl="_rowActive_sc9v8_335",Sl="_rowSelected_sc9v8_340",Rl="_rowLabel_sc9v8_343",Al="_indent_sc9v8_353",zl="_indentUnit_sc9v8_359",Pl="_toggle_sc9v8_375",Ol="_toggleOpen_sc9v8_391",Wl="_togglePlaceholder_sc9v8_396",Hl="_spinner_sc9v8_403",Fl="_spin_sc9v8_403",ql="_checkbox_sc9v8_418",Gl="_checkboxChecked_sc9v8_436",Vl="_checkboxMixed_sc9v8_442",Ul="_rowIcon_sc9v8_449",Kl="_rowText_sc9v8_459",Ql="_rowDesc_sc9v8_474",Yl="_match_sc9v8_483",Xl="_check_sc9v8_418",Jl="_menuFooter_sc9v8_502",Zl="_footerBtn_sc9v8_513",ec="_errorText_sc9v8_529",tc="_helperText_sc9v8_536",G={field:sl,fullWidth:ol,disabled:rl,trigger:al,label:il,selectWrapper:ll,open:cl,hasError:dl,sm:ul,md:hl,lg:pl,triggerValue:_l,triggerPlaceholder:fl,triggerText:ml,triggerActions:vl,chip:xl,chipLabel:gl,chipRemove:bl,chipOverflow:yl,clearBtn:wl,chevron:jl,chevronOpen:kl,menu:Nl,menuOpen:El,searchRow:Tl,searchIconWrap:Il,searchInput:$l,tree:Cl,empty:Ml,row:Ll,rowDisabled:Dl,rowActive:Bl,rowSelected:Sl,rowLabel:Rl,indent:Al,indentUnit:zl,toggle:Pl,toggleOpen:Ol,togglePlaceholder:Wl,spinner:Hl,spin:Fl,checkbox:ql,checkboxChecked:Gl,checkboxMixed:Vl,rowIcon:Ul,rowText:Kl,rowDesc:Ql,match:Yl,check:Xl,menuFooter:Jl,footerBtn:Zl,errorText:ec,helperText:tc},nc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),sc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"10",height:"10",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M6 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),xn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),oc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"10",height:"10",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 8h8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),gn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),rc=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),ac=n=>{const t=new Map,s=new Map,o=new Set,a=(i,c)=>{for(const l of i)t.set(l.value,l),s.set(l.value,c),!l.children||l.children.length===0?l.isLeaf!==!1&&o.add(l.value):a(l.children,l.value)};return a(n,null),{nodeByValue:t,parentByValue:s,leafValues:o}},bt=(n,t=[])=>{if(!n.children||n.children.length===0)return t.push(n.value),t;for(const s of n.children)bt(s,t);return t},ic=(n,t,s)=>{const o=new Set,a=new Set,i=(c,l)=>{let p=!1;for(const g of c){const b=s(g,t),_=g.children?i(g.children,[...l,g.value]):!1;(b||_)&&(o.add(g.value),l.forEach(y=>o.add(y)),p=!0,b&&a.add(g.value))}return p};return i(n,[]),{visible:o,matched:a}},lc=(n,t)=>n.label.toLowerCase().includes(t.toLowerCase()),cc=(n,t)=>{if(!t)return n;const s=n.toLowerCase().indexOf(t.toLowerCase());return s===-1?n:e.jsxs(e.Fragment,{children:[n.slice(0,s),e.jsx("span",{className:G.match,children:n.slice(s,s+t.length)}),n.slice(s+t.length)]})},dc=({data:n,value:t,defaultValue:s,onChange:o,multiple:a=!1,checkStrictly:i=!1,checkedStrategy:c="leaf",expandedKeys:l,defaultExpandedKeys:p,onExpandedChange:g,defaultExpandAll:b=!1,loadChildren:_,searchable:y=!1,filter:I=lc,maxTagCount:j=3,label:B,placeholder:T=a?"Select items":"Select an item",helperText:R,error:O,size:q="md",fullWidth:oe=!1,disabled:w=!1,clearable:D=!1,id:M,name:$,className:te=""})=>{const W=r.useId(),v=M??`evo-tree-${W}`,X=`${v}-tree`,S=t!==void 0,re=r.useMemo(()=>{const h=S?t:s;return h==null?[]:Array.isArray(h)?h:[h]},[]),[C,K]=r.useState(re),A=r.useMemo(()=>S?t==null?[]:Array.isArray(t)?t:[t]:C,[S,t,C]),[Z,Q]=r.useState({}),[de,ie]=r.useState(new Set),se=r.useMemo(()=>{if(Object.keys(Z).length===0)return n;const h=d=>d.map(x=>{const z=Z[x.value]??x.children;return z?{...x,children:h(z)}:x});return h(n)},[n,Z]),J=r.useMemo(()=>ac(se),[se]),ve=r.useMemo(()=>{if(l)return l;if(p)return p;if(b){const h=[],d=x=>x.forEach(k=>{k.children&&k.children.length&&(h.push(k.value),d(k.children))});return d(n),h}return[]},[]),[Te,ye]=r.useState(ve),le=l??Te,Be=r.useMemo(()=>new Set(le),[le]),we=r.useCallback(h=>{l===void 0&&ye(h),g==null||g(h)},[l,g]),[xe,ce]=r.useState(!1),[ge,We]=r.useState(""),[je,Ne]=r.useState(-1),m=r.useRef(null),u=r.useRef(null),N=r.useRef(null),E=r.useRef(null),V=r.useMemo(()=>!y||!ge.trim()?null:ic(se,ge,I),[se,ge,y,I]),be=r.useMemo(()=>V?V.visible:Be,[V,Be]),ue=r.useMemo(()=>{const h=[],d=(x,k)=>{for(const z of x){if(V&&!V.visible.has(z.value))continue;const ee=z.children&&z.children.length>0||z.isLeaf===!1;h.push({node:z,level:k,hasChildren:ee}),ee&&be.has(z.value)&&z.children&&d(z.children,k+1)}};return d(se,0),h},[se,be,V]),Pe=r.useMemo(()=>new Set(A),[A]),ze=r.useCallback(h=>{if(!a||i||!h.children||h.children.length===0)return Pe.has(h.value)?"checked":"unchecked";const d=bt(h);if(d.length===0)return Pe.has(h.value)?"checked":"unchecked";let x=0;for(const k of d)Pe.has(k)&&x++;return x===0?"unchecked":x===d.length?"checked":"mixed"},[a,i,Pe]),He=r.useCallback(h=>{if(!a||i)return Array.from(h);if(c==="leaf")return Array.from(h).filter(k=>J.leafValues.has(k));if(c==="all"){const k=new Set(h),z=ee=>{for(const _e of ee)_e.children&&_e.children.length&&(z(_e.children),bt(_e).every(ke=>h.has(ke))&&k.add(_e.value))};return z(se),Array.from(k)}const d=[],x=k=>{for(const z of k)z.children&&z.children.length?bt(z).every(_e=>h.has(_e))?d.push(z.value):x(z.children):h.has(z.value)&&d.push(z.value)};return x(se),d},[a,i,c,se,J.leafValues]),Le=r.useCallback(h=>{const d=He(h);S||K(d);const x=d.map(k=>J.nodeByValue.get(k)).filter(Boolean);o==null||o(d,x)},[He,S,J.nodeByValue,o]),Qe=r.useCallback(h=>{S||K(h?[h]:[]),o==null||o(h,h?J.nodeByValue.get(h)??null:null)},[S,J.nodeByValue,o]),Ze=r.useMemo(()=>{if(!a||i)return new Set(A);const h=new Set;for(const d of A){const x=J.nodeByValue.get(d);if(!x){h.add(d);continue}!x.children||x.children.length===0?h.add(d):bt(x).forEach(k=>h.add(k))}return h},[A,a,i,J.nodeByValue]),nt=r.useCallback(h=>{if(Be.has(h.value)){we(le.filter(k=>k!==h.value));return}we([...le,h.value]),_&&!Z[h.value]&&(h.isLeaf===!1||!h.children&&h.isLeaf!==!0)&&(ie(k=>new Set(k).add(h.value)),_(h).then(k=>{Q(z=>({...z,[h.value]:k}))}).finally(()=>{ie(k=>{const z=new Set(k);return z.delete(h.value),z})}))},[le,Be,we,_,Z]),Ye=r.useCallback(h=>{var z;if(h.disabled)return;if(!a){Qe(h.value),ce(!1),(z=u.current)==null||z.focus();return}if(i){const ee=new Set(A);ee.has(h.value)?ee.delete(h.value):ee.add(h.value);const _e=Array.from(ee);S||K(_e);const Se=_e.map(ke=>J.nodeByValue.get(ke)).filter(Boolean);o==null||o(_e,Se);return}const d=new Set(Ze),x=ze(h),k=h.children&&h.children.length?bt(h):[h.value];x==="checked"?k.forEach(ee=>d.delete(ee)):k.forEach(ee=>d.add(ee)),Le(d)},[a,i,A,Ze,ze,Le,Qe,S,J.nodeByValue,o]);r.useEffect(()=>{if(!xe)return;const h=d=>{var x;(x=m.current)!=null&&x.contains(d.target)||(ce(!1),We(""))};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[xe]),r.useEffect(()=>{if(xe){const h=ue.findIndex(d=>Pe.has(d.node.value));if(Ne(h>=0?h:ue.findIndex(d=>!d.node.disabled)),y){const d=setTimeout(()=>{var x;return(x=N.current)==null?void 0:x.focus()},30);return()=>clearTimeout(d)}}else We(""),Ne(-1)},[xe]),r.useEffect(()=>{var d;if(!xe||je<0)return;const h=(d=E.current)==null?void 0:d.querySelector(`[data-idx="${je}"]`);h==null||h.scrollIntoView({block:"nearest"})},[je,xe]);const ct=h=>{if(ue.length===0)return;let d=je;for(let x=0;x<ue.length;x++)if(d=(d+h+ue.length)%ue.length,!ue[d].node.disabled){Ne(d);return}},dt=h=>{var x;if(w)return;if(!xe){(h.key==="Enter"||h.key===" "||h.key==="ArrowDown"||h.key==="ArrowUp")&&(h.preventDefault(),ce(!0));return}const d=ue[je];if(h.key==="Escape")h.preventDefault(),ce(!1),(x=u.current)==null||x.focus();else if(h.key==="ArrowDown")h.preventDefault(),ct(1);else if(h.key==="ArrowUp")h.preventDefault(),ct(-1);else if(h.key==="ArrowRight"){if(!d)return;if(h.preventDefault(),d.hasChildren&&!Be.has(d.node.value))nt(d.node);else if(d.hasChildren){const k=je+1;k<ue.length&&ue[k].level>d.level&&Ne(k)}}else if(h.key==="ArrowLeft"){if(!d)return;if(h.preventDefault(),d.hasChildren&&Be.has(d.node.value))nt(d.node);else for(let k=je-1;k>=0;k--)if(ue[k].level<d.level){Ne(k);break}}else if(h.key==="Enter")h.preventDefault(),d&&Ye(d.node);else if(h.key===" "&&a)h.preventDefault(),d&&Ye(d.node);else if(h.key==="Home"){h.preventDefault();const k=ue.findIndex(z=>!z.node.disabled);k>=0&&Ne(k)}else if(h.key==="End"){h.preventDefault();for(let k=ue.length-1;k>=0;k--)if(!ue[k].node.disabled){Ne(k);break}}else h.key==="Tab"&&ce(!1)},kt=h=>{h.stopPropagation(),a?Le(new Set):Qe("")},f=()=>{if(a){const d=A.map(z=>J.nodeByValue.get(z)).filter(Boolean);if(d.length===0)return e.jsx("span",{className:G.triggerPlaceholder,children:e.jsx("span",{className:G.triggerText,children:T})});const x=d.slice(0,j),k=d.length-x.length;return e.jsxs("span",{className:G.triggerValue,children:[x.map(z=>e.jsxs("span",{className:G.chip,children:[e.jsx("span",{className:G.chipLabel,children:z.label}),e.jsx("span",{role:"button","aria-label":`Remove ${z.label}`,tabIndex:-1,className:G.chipRemove,onMouseDown:ee=>ee.preventDefault(),onClick:ee=>{ee.stopPropagation(),Ye(z)},children:e.jsx(gn,{})})]},z.value)),k>0&&e.jsxs("span",{className:G.chipOverflow,children:["+",k]})]})}const h=A[0]?J.nodeByValue.get(A[0]):void 0;return e.jsxs("span",{className:h?G.triggerValue:G.triggerPlaceholder,children:[(h==null?void 0:h.icon)&&e.jsx("span",{className:G.rowIcon,children:h.icon}),e.jsx("span",{className:G.triggerText,children:(h==null?void 0:h.label)??T})]})},L=(h,d)=>{const{node:x,level:k,hasChildren:z}=h,ee=Be.has(x.value),_e=ze(x),Se=!a&&Pe.has(x.value),ke=d===je,Ie=de.has(x.value);return e.jsxs("div",{id:`${v}-row-${d}`,role:"treeitem","aria-level":k+1,"aria-expanded":z?ee:void 0,"aria-selected":a?void 0:Se,"aria-checked":a?_e==="mixed"?"mixed":_e==="checked"?"true":"false":void 0,"aria-disabled":x.disabled,"data-idx":d,className:[G.row,ke?G.rowActive:"",Se?G.rowSelected:"",x.disabled?G.rowDisabled:""].filter(Boolean).join(" "),onClick:()=>Ye(x),onMouseEnter:()=>!x.disabled&&Ne(d),children:[e.jsx("span",{className:G.indent,"aria-hidden":!0,children:Array.from({length:k}).map(($e,Re)=>e.jsx("span",{className:G.indentUnit},Re))}),z?Ie?e.jsx("span",{className:G.toggle,"aria-hidden":!0,children:e.jsx("span",{className:G.spinner})}):e.jsx("span",{className:[G.toggle,ee?G.toggleOpen:""].filter(Boolean).join(" "),role:"button",tabIndex:-1,"aria-label":ee?"Collapse":"Expand",onClick:$e=>{$e.stopPropagation(),nt(x)},onMouseDown:$e=>$e.preventDefault(),children:e.jsx(sc,{})}):e.jsx("span",{className:G.togglePlaceholder,"aria-hidden":!0}),a&&e.jsxs("span",{className:[G.checkbox,_e==="checked"?G.checkboxChecked:"",_e==="mixed"?G.checkboxMixed:""].filter(Boolean).join(" "),"aria-hidden":!0,children:[_e==="checked"&&e.jsx(xn,{}),_e==="mixed"&&e.jsx(oc,{})]}),x.icon&&e.jsx("span",{className:G.rowIcon,children:x.icon}),e.jsxs("span",{className:G.rowText,children:[e.jsx("span",{className:G.rowLabel,children:ge?cc(x.label,ge):x.label}),x.description&&e.jsx("span",{className:G.rowDesc,children:x.description})]}),!a&&Se&&e.jsx("span",{className:G.check,"aria-hidden":!0,children:e.jsx(xn,{})})]},x.value)},F=A.length>0,Y=a?A.join(","):A[0]??"";return e.jsxs("div",{ref:m,className:[G.field,oe?G.fullWidth:"",w?G.disabled:"",te].filter(Boolean).join(" "),children:[B&&e.jsx("label",{htmlFor:v,className:G.label,children:B}),e.jsxs("div",{className:G.selectWrapper,children:[e.jsxs("button",{ref:u,id:v,type:"button",role:"combobox","aria-haspopup":"tree","aria-expanded":xe,"aria-controls":X,"aria-invalid":!!O,disabled:w,className:[G.trigger,G[q],xe?G.open:"",O?G.hasError:""].filter(Boolean).join(" "),onClick:()=>!w&&ce(h=>!h),onKeyDown:dt,children:[f(),e.jsxs("span",{className:G.triggerActions,children:[D&&F&&!w&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":"Clear selection",className:G.clearBtn,onClick:kt,onMouseDown:h=>h.preventDefault(),children:e.jsx(gn,{})}),e.jsx("span",{className:[G.chevron,xe?G.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(nc,{})})]})]}),xe&&e.jsxs("div",{className:G.menu,children:[y&&e.jsxs("div",{className:G.searchRow,children:[e.jsx("span",{className:G.searchIconWrap,children:e.jsx(rc,{})}),e.jsx("input",{ref:N,type:"text",className:G.searchInput,placeholder:"Search...",value:ge,onChange:h=>{We(h.target.value),Ne(0)},onKeyDown:dt})]}),e.jsx("div",{ref:E,className:G.tree,role:"tree",id:X,"aria-labelledby":v,"aria-multiselectable":a||void 0,"aria-activedescendant":je>=0?`${v}-row-${je}`:void 0,children:ue.length===0?e.jsx("div",{className:G.empty,children:"No results"}):ue.map((h,d)=>L(h,d))}),a&&F&&e.jsxs("div",{className:G.menuFooter,children:[e.jsxs("span",{children:[A.length," selected"]}),e.jsx("button",{type:"button",className:G.footerBtn,onClick:()=>Le(new Set),children:"Clear all"})]})]}),$&&e.jsx("input",{type:"hidden",name:$,value:Y})]}),O&&e.jsx("p",{className:G.errorText,children:O}),!O&&R&&e.jsx("p",{className:G.helperText,children:R})]})},uc="_field_1i6oh_7",hc="_fullWidth_1i6oh_15",pc="_disabled_1i6oh_19",_c="_inputWrapper_1i6oh_19",fc="_label_1i6oh_25",mc="_acWrapper_1i6oh_33",vc="_open_1i6oh_57",xc="_hasError_1i6oh_61",gc="_sm_1i6oh_69",bc="_md_1i6oh_74",yc="_lg_1i6oh_79",wc="_searchIconWrap_1i6oh_85",jc="_input_1i6oh_19",kc="_actions_1i6oh_119",Nc="_statusIcon_1i6oh_126",Ec="_clearBtn_1i6oh_132",Tc="_spinner_1i6oh_152",Ic="_evoAcSpin_1i6oh_1",$c="_menu_1i6oh_169",Cc="_evoAcMenuOpen_1i6oh_1",Mc="_sectionHeader_1i6oh_200",Lc="_recoveryBox_1i6oh_216",Dc="_list_1i6oh_227",Bc="_empty_1i6oh_252",Sc="_statusRow_1i6oh_253",Rc="_option_1i6oh_268",Ac="_optionActive_1i6oh_290",zc="_optionDisabled_1i6oh_290",Pc="_optionSelected_1i6oh_294",Oc="_optionTitle_1i6oh_297",Wc="_optionRecovery_1i6oh_306",Hc="_optionIcon_1i6oh_310",Fc="_optionLabel_1i6oh_321",qc="_optionDesc_1i6oh_336",Gc="_mark_1i6oh_346",Vc="_check_1i6oh_353",Uc="_errorText_1i6oh_364",Kc="_helperText_1i6oh_371",ae={field:uc,fullWidth:hc,disabled:pc,inputWrapper:_c,label:fc,acWrapper:mc,open:vc,hasError:xc,sm:gc,md:bc,lg:yc,searchIconWrap:wc,input:jc,actions:kc,statusIcon:Nc,clearBtn:Ec,spinner:Tc,evoAcSpin:Ic,menu:$c,evoAcMenuOpen:Cc,sectionHeader:Mc,recoveryBox:Lc,list:Dc,empty:Bc,statusRow:Sc,option:Rc,optionActive:Ac,optionDisabled:zc,optionSelected:Pc,optionTitle:Oc,optionRecovery:Wc,optionIcon:Hc,optionLabel:Fc,optionDesc:qc,mark:Gc,check:Vc,errorText:Uc,helperText:Kc},Qc=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Yc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),Xc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),bn=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M8 4.5V8l2.5 1.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Jc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M8 1.5l1.6 4.9 4.9 1.6-4.9 1.6L8 14.5l-1.6-4.9L1.5 8l4.9-1.6L8 1.5z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"})}),yn=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",className:ae.spinner,children:[e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2",strokeOpacity:"0.25"}),e.jsx("path",{d:"M14 8a6 6 0 0 0-6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),wn=new Map,Zc=n=>({get:()=>wn.get(n)??[],set:t=>{wn.set(n,t)}}),ed=n=>({get:()=>{if(typeof window>"u")return[];try{const t=window.localStorage.getItem(`evo-recents:${n}`),s=t?JSON.parse(t):[];return Array.isArray(s)?s.filter(o=>typeof o=="string"):[]}catch{return[]}},set:t=>{if(!(typeof window>"u"))try{window.localStorage.setItem(`evo-recents:${n}`,JSON.stringify(t))}catch{}}});function jn(n,t){const s=n.length,o=t.length;if(s===0)return o;if(o===0)return s;let a=Array.from({length:o+1},(c,l)=>l),i=new Array(o+1);for(let c=1;c<=s;c++){i[0]=c;for(let l=1;l<=o;l++){const p=n[c-1]===t[l-1]?0:1;i[l]=Math.min(a[l]+1,i[l-1]+1,a[l-1]+p)}[a,i]=[i,a]}return a[o]}function td(n,t){const s=t.trim().toLowerCase();if(s.length<2)return null;let o=null,a=1/0;for(const c of n){if(c.disabled)continue;const l=c.label.toLowerCase(),p=Math.min(jn(s,l),jn(s,l.slice(0,s.length)));p<a&&(a=p,o=c)}if(!o)return null;const i=Math.max(1,Math.min(3,Math.round(s.length*.4)));return a<=i?{option:o,distance:a}:null}function nd(n,t){const s=t.trim();if(!s)return n;const o=n.toLowerCase().indexOf(s.toLowerCase());return o<0?n:e.jsxs(e.Fragment,{children:[n.slice(0,o),e.jsx("mark",{className:ae.mark,children:n.slice(o,o+s.length)}),n.slice(o+s.length)]})}const Kn=r.forwardRef(({options:n,value:t,defaultValue:s=null,onChange:o,inputValue:a,onInputChange:i,label:c,placeholder:l="Search…",helperText:p,error:g,size:b="md",fullWidth:_=!1,disabled:y=!1,clearable:I=!0,loading:j=!1,debounce:B=0,minChars:T=0,maxResults:R=50,filter:O,highlightMatch:q=!0,openOnFocus:oe=!0,emptyMessage:w="No results",smartRecovery:D=!1,recents:M=!1,renderOption:$,id:te,name:W,className:v="",...X},S)=>{const re=r.useId(),C=te??`evo-autocomplete-${re}`,K=`${C}-listbox`,A=t!==void 0,[Z,Q]=r.useState(s),de=A?t:Z,ie=r.useMemo(()=>n.find(d=>d.value===de)??null,[n,de]),se=a!==void 0,[J,ve]=r.useState(()=>{var d;return((d=n.find(x=>x.value===s))==null?void 0:d.label)??""}),Te=se?a:J,ye=r.useMemo(()=>{if(!M)return null;const d={max:5,storage:Zc(W??C),label:"Recent"};return typeof M=="object"?{...d,...M}:d},[M,W,C]),[le,Be]=r.useState(()=>(ye==null?void 0:ye.storage.get())??[]),[we,xe]=r.useState(!1),[ce,ge]=r.useState(0),We=r.useRef(null),je=r.useRef(null),Ne=r.useRef(null),m=r.useRef(null),u=r.useCallback(d=>{je.current=d,typeof S=="function"?S(d):S&&(S.current=d)},[S]),E=Te.trim(),V=E.length>0&&E.length<T,be=!!ye&&E.length===0&&le.length>0,ue=r.useMemo(()=>be?le.map(d=>n.find(x=>x.value===d)).filter(d=>!!d&&!d.disabled).slice(0,ye.max):[],[be,le,n,ye]),Pe=r.useMemo(()=>{if(V)return[];if(O===!1||E.length===0)return n.slice(0,R);const d=typeof O=="function"?O:(x,k)=>x.label.toLowerCase().includes(k.toLowerCase());return n.filter(x=>d(x,E)).slice(0,R)},[n,O,E,V,R]),ze=be?ue:Pe,He=r.useMemo(()=>!D||j||V||be||ze.length>0||E.length===0?null:td(n,E),[D,j,V,be,ze.length,E,n]),Le=He?[He.option]:ze;r.useEffect(()=>{if(!we)return;const d=x=>{var k;(k=We.current)!=null&&k.contains(x.target)||Ye()};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[we]),r.useEffect(()=>{var x;if(!we)return;const d=(x=Ne.current)==null?void 0:x.querySelector(`[data-idx="${ce}"]`);d==null||d.scrollIntoView({block:"nearest"})},[ce,we]),r.useEffect(()=>{we||se||ve((ie==null?void 0:ie.label)??"")},[de]),r.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const Qe=r.useCallback(d=>{i&&(B>0?(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>i(d),B)):i(d))},[i,B]),Ze=r.useCallback((d,x)=>{A||Q(d),o==null||o(d,x)},[A,o]),nt=r.useCallback(d=>{ye&&Be(x=>{const k=[d,...x.filter(z=>z!==d)].slice(0,ye.max);return ye.storage.set(k),k})},[ye]),Ye=r.useCallback(()=>{xe(!1),ge(0),!se&&ie&&ve(ie.label)},[se,ie]),ct=r.useCallback(d=>{var x;d.disabled||(Ze(d.value,d),se||ve(d.label),Qe(d.label),nt(d.value),xe(!1),ge(0),(x=je.current)==null||x.focus())},[Ze,se,Qe,nt]),dt=d=>{const x=d.target.value;se||ve(x),Qe(x),ie&&x!==ie.label&&Ze(null,null),ge(0),we||xe(!0)},kt=()=>{var d;se||ve(""),Qe(""),Ze(null,null),ge(0),(d=je.current)==null||d.focus(),xe(!0)},f=d=>{if(Le.length===0)return;let x=ce;for(let k=0;k<Le.length;k++)if(x=(x+d+Le.length)%Le.length,!Le[x].disabled){ge(x);return}},L=d=>{if(!y){if(!we){(d.key==="ArrowDown"||d.key==="ArrowUp")&&(d.preventDefault(),xe(!0));return}switch(d.key){case"ArrowDown":d.preventDefault(),f(1);break;case"ArrowUp":d.preventDefault(),f(-1);break;case"Home":d.preventDefault(),ge(Le.findIndex(x=>!x.disabled));break;case"End":d.preventDefault();for(let x=Le.length-1;x>=0;x--)if(!Le[x].disabled){ge(x);break}break;case"Enter":{const x=Le[ce];x&&!x.disabled&&(d.preventDefault(),ct(x));break}case"Escape":d.preventDefault(),Ye();break;case"Tab":Ye();break}}},F=ae[b],Y=we&&Le[ce]?`${C}-opt-${ce}`:void 0,h=(d,x,k)=>{const z=x===ce,ee=d.value===de;return e.jsx("div",{id:`${C}-opt-${x}`,role:"option","aria-selected":ee,"aria-disabled":d.disabled||void 0,"data-idx":x,className:[ae.option,z?ae.optionActive:"",ee?ae.optionSelected:"",d.disabled?ae.optionDisabled:"",k==="recovery"?ae.optionRecovery:""].filter(Boolean).join(" "),onClick:()=>ct(d),onMouseEnter:()=>!d.disabled&&ge(x),children:$?$(d,{active:z,query:E}):e.jsxs(e.Fragment,{children:[k==="recent"&&e.jsx("span",{className:ae.optionIcon,"aria-hidden":"true",children:e.jsx(bn,{})}),k!=="recent"&&d.icon&&e.jsx("span",{className:ae.optionIcon,"aria-hidden":"true",children:d.icon}),e.jsxs("span",{className:ae.optionLabel,children:[e.jsx("span",{className:ae.optionTitle,children:q&&k==="option"?nd(d.label,E):d.label}),d.description&&e.jsx("span",{className:ae.optionDesc,children:d.description})]}),ee&&e.jsx("span",{className:ae.check,"aria-hidden":"true",children:e.jsx(Xc,{})})]})},`${k}-${d.value}`)};return e.jsxs("div",{ref:We,className:[ae.field,_?ae.fullWidth:"",y?ae.disabled:"",v].filter(Boolean).join(" "),children:[c&&e.jsx("label",{htmlFor:C,className:ae.label,children:c}),e.jsxs("div",{className:ae.acWrapper,children:[e.jsxs("div",{className:[ae.inputWrapper,F,we?ae.open:"",g?ae.hasError:""].filter(Boolean).join(" "),children:[e.jsx("span",{className:ae.searchIconWrap,"aria-hidden":"true",children:e.jsx(Qc,{})}),e.jsx("input",{...X,ref:u,id:C,type:"text",role:"combobox",autoComplete:"off","aria-autocomplete":"list","aria-expanded":we,"aria-controls":K,"aria-activedescendant":Y,"aria-invalid":!!g||void 0,"aria-describedby":g?`${C}-error`:p?`${C}-helper`:void 0,className:ae.input,placeholder:l,value:Te,disabled:y,onChange:dt,onKeyDown:L,onFocus:()=>oe&&!y&&xe(!0)}),e.jsxs("span",{className:ae.actions,children:[j&&e.jsx("span",{className:ae.statusIcon,"aria-hidden":"true",children:e.jsx(yn,{})}),I&&!y&&(Te.length>0||de)&&e.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Clear",className:ae.clearBtn,onClick:kt,onMouseDown:d=>d.preventDefault(),children:e.jsx(Yc,{})})]})]}),we&&e.jsx("div",{className:ae.menu,role:"listbox",id:K,"aria-label":c??"Suggestions",children:j?e.jsxs("div",{className:ae.statusRow,children:[e.jsx(yn,{}),e.jsx("span",{children:"Loading…"})]}):V?e.jsxs("div",{className:ae.empty,children:["Type ",T-E.length," more character",T-E.length===1?"":"s","…"]}):He?e.jsxs("div",{className:ae.recoveryBox,children:[e.jsxs("div",{className:ae.sectionHeader,children:[e.jsx(Jc,{}),e.jsxs("span",{children:["No exact match — did you mean",He.distance===1?" this":"","?"]})]}),e.jsx("div",{className:ae.list,ref:Ne,role:"presentation",children:h(He.option,0,"recovery")})]}):Le.length>0?e.jsxs(e.Fragment,{children:[be&&e.jsxs("div",{className:ae.sectionHeader,children:[e.jsx(bn,{}),e.jsx("span",{children:ye.label})]}),e.jsx("div",{className:ae.list,ref:Ne,role:"presentation",children:Le.map((d,x)=>h(d,x,be?"recent":"option"))})]}):E.length===0?e.jsx("div",{className:ae.empty,children:"Type to search…"}):e.jsx("div",{className:ae.empty,children:w})}),W&&e.jsx("input",{type:"hidden",name:W,value:de??""})]}),g&&e.jsx("p",{id:`${C}-error`,className:ae.errorText,children:g}),!g&&p&&e.jsx("p",{id:`${C}-helper`,className:ae.helperText,children:p})]})});Kn.displayName="EvoAutoComplete";const sd="_group_ufbfw_1",od="_groupLabel_ufbfw_10",rd="_checkbox_ufbfw_18",ad="_disabled_ufbfw_23",id="_input_ufbfw_28",ld="_label_ufbfw_35",cd="_checkmark_ufbfw_35",dd="_labelText_ufbfw_100",ud="_helperText_ufbfw_105",et={group:sd,groupLabel:od,checkbox:rd,disabled:ad,input:id,label:ld,checkmark:cd,labelText:dd,helperText:ud},hd=({children:n,label:t,className:s=""})=>e.jsxs("fieldset",{className:`${et.group} ${s}`,children:[t&&e.jsx("legend",{className:et.groupLabel,children:t}),n]}),Qn=({label:n,helperText:t,indeterminate:s=!1,className:o="",disabled:a,id:i,...c})=>{const l=r.useRef(null);r.useEffect(()=>{l.current&&(l.current.indeterminate=s)},[s]);const p=i??(n==null?void 0:n.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:[et.checkbox,a?et.disabled:"",o].filter(Boolean).join(" "),children:[e.jsx("input",{type:"checkbox",id:p,ref:l,disabled:a,className:et.input,...c}),e.jsxs("label",{htmlFor:p,className:et.label,children:[e.jsx("span",{className:et.checkmark}),e.jsx("span",{className:et.labelText,children:n})]}),t&&e.jsx("p",{className:et.helperText,children:t})]})};Qn.Group=hd;const pd="_group_1oqsu_1",_d="_groupLabel_1oqsu_10",fd="_radio_1oqsu_18",md="_disabled_1oqsu_22",vd="_input_1oqsu_27",xd="_label_1oqsu_34",gd="_radiomark_1oqsu_34",bd="_labelText_1oqsu_78",at={group:pd,groupLabel:_d,radio:fd,disabled:md,input:vd,label:xd,radiomark:gd,labelText:bd},Yn=r.createContext(null),yd=({children:n,name:t,value:s,onChange:o,label:a,className:i=""})=>e.jsx(Yn.Provider,{value:{name:t,value:s,onChange:o},children:e.jsxs("fieldset",{className:`${at.group} ${i}`,children:[a&&e.jsx("legend",{className:at.groupLabel,children:a}),n]})}),Xn=({value:n,label:t,disabled:s=!1,className:o=""})=>{const a=r.useContext(Yn),i=a?a.value===n:!1,c=`${(a==null?void 0:a.name)??"radio"}-${n}`;return e.jsxs("div",{className:[at.radio,s?at.disabled:"",o].filter(Boolean).join(" "),children:[e.jsx("input",{type:"radio",id:c,name:a==null?void 0:a.name,value:n,checked:i,disabled:s,className:at.input,onChange:()=>a==null?void 0:a.onChange(n)}),e.jsxs("label",{htmlFor:c,className:at.label,children:[e.jsx("span",{className:at.radiomark}),e.jsx("span",{className:at.labelText,children:t})]})]})};Xn.Group=yd;const wd="_toggleWrapper_ke3d2_1",jd="_disabled_ke3d2_8",kd="_hiddenInput_ke3d2_14",Nd="_track_ke3d2_21",Ed="_sm_ke3d2_29",Td="_md_ke3d2_33",Id="_lg_ke3d2_37",$d="_on_ke3d2_41",Cd="_thumb_ke3d2_45",Md="_label_ke3d2_55",rt={toggleWrapper:wd,disabled:jd,hiddenInput:kd,track:Nd,sm:Ed,md:Td,lg:Id,on:$d,thumb:Cd,label:Md},kn={sm:"0.75rem",md:"1rem",lg:"1.25rem"},Ld={sm:"0.75rem",md:"1rem",lg:"1.25rem"},Dd=({checked:n,onChange:t,label:s,disabled:o=!1,size:a="md",className:i=""})=>e.jsxs("label",{className:[rt.toggleWrapper,o?rt.disabled:"",i].filter(Boolean).join(" "),children:[e.jsx("input",{type:"checkbox",role:"switch",className:rt.hiddenInput,checked:n,disabled:o,onChange:c=>t(c.target.checked)}),e.jsx("span",{className:[rt.track,rt[a],n?rt.on:""].filter(Boolean).join(" "),children:e.jsx("span",{className:rt.thumb,style:{width:kn[a],height:kn[a],transform:n?`translateX(${Ld[a]})`:"translateX(0)"}})}),s&&e.jsx("span",{className:rt.label,children:s})]}),Bd="_form_1cylw_1",Sd="_form_sm_1cylw_10",Rd="_form_md_1cylw_15",Ad="_form_lg_1cylw_20",zd="_header_1cylw_25",Pd="_headerBadge_1cylw_33",Od="_headerTitle_1cylw_47",Wd="_headerDesc_1cylw_56",Hd="_section_1cylw_63",Fd="_sectionHead_1cylw_74",qd="_sectionTitle_1cylw_93",Gd="_sectionDesc_1cylw_102",Vd="_sectionBody_1cylw_109",Ud="_section_split_1cylw_116",Kd="_row_1cylw_130",Qd="_row_sm_1cylw_139",Yd="_row_md_1cylw_143",Xd="_row_lg_1cylw_147",Jd="_row_align_start_1cylw_151",Zd="_row_align_center_1cylw_155",eu="_row_align_end_1cylw_159",tu="_field_1cylw_163",nu="_fieldLabel_1cylw_170",su="_fieldRequired_1cylw_180",ou="_fieldControl_1cylw_186",ru="_fieldDesc_1cylw_191",au="_fieldError_1cylw_198",iu="_field_error_1cylw_217",lu="_actions_1cylw_221",cu="_actions_divider_1cylw_229",du="_actions_left_1cylw_235",uu="_actions_right_1cylw_239",hu="_actions_center_1cylw_243",pu="_actions_between_1cylw_247",me={form:Bd,form_sm:Sd,form_md:Rd,form_lg:Ad,header:zd,headerBadge:Pd,headerTitle:Od,headerDesc:Wd,section:Hd,sectionHead:Fd,sectionTitle:qd,sectionDesc:Gd,sectionBody:Vd,section_split:Ud,row:Kd,row_sm:Qd,row_md:Yd,row_lg:Xd,row_align_start:Jd,row_align_center:Zd,row_align_end:eu,field:tu,fieldLabel:nu,fieldRequired:su,fieldControl:ou,fieldDesc:ru,fieldError:au,field_error:iu,actions:lu,actions_divider:cu,actions_left:du,actions_right:uu,actions_center:hu,actions_between:pu},Jn=r.createContext({}),_u=()=>r.useContext(Jn),vt=(...n)=>n.filter(Boolean).join(" "),jt=({children:n,disabled:t=!1,size:s="md",layout:o="vertical",maxWidth:a,className:i="",style:c,...l})=>e.jsx(Jn.Provider,{value:{disabled:t,size:s,layout:o},children:e.jsx("form",{className:vt(me.form,me[`form_${s}`],me[`form_${o}`],i),style:a!==void 0?{maxWidth:a,...c}:c,...l,children:n})}),fu=({title:n,description:t,badge:s,children:o,className:a=""})=>e.jsxs("header",{className:vt(me.header,a),children:[s&&e.jsx("div",{className:me.headerBadge,children:s}),n&&e.jsx("h2",{className:me.headerTitle,children:n}),t&&e.jsx("p",{className:me.headerDesc,children:t}),o]}),mu=({title:n,description:t,variant:s="stacked",children:o,className:a=""})=>e.jsxs("section",{className:vt(me.section,me[`section_${s}`],a),children:[(n||t)&&e.jsxs("div",{className:me.sectionHead,children:[n&&e.jsx("h3",{className:me.sectionTitle,children:n}),t&&e.jsx("p",{className:me.sectionDesc,children:t})]}),e.jsx("div",{className:me.sectionBody,children:o})]}),vu=({children:n,gap:t="md",align:s="start",className:o=""})=>e.jsx("div",{className:vt(me.row,me[`row_${t}`],me[`row_align_${s}`],o),children:n}),xu=({children:n,label:t,description:s,error:o,required:a,htmlFor:i,className:c=""})=>{const l=r.useId(),p=i??`evo-field-${l}`;return t||s||o?e.jsxs("div",{className:vt(me.field,o?me.field_error:"",c),children:[t&&e.jsxs("label",{htmlFor:p,className:me.fieldLabel,children:[t,a&&e.jsx("span",{className:me.fieldRequired,"aria-hidden":"true",children:"*"})]}),e.jsx("div",{className:me.fieldControl,children:n}),o?e.jsx("p",{className:me.fieldError,role:"alert",children:o}):s?e.jsx("p",{className:me.fieldDesc,children:s}):null]}):e.jsx("div",{className:vt(me.field,c),children:n})},gu=({children:n,align:t="right",divider:s=!0,className:o=""})=>e.jsx("div",{className:vt(me.actions,me[`actions_${t}`],s?me.actions_divider:"",o),children:n});jt.Header=fu;jt.Section=mu;jt.Row=vu;jt.Field=xu;jt.Actions=gu;const bu="_overlay_118t4_19",yu="_overlayFadeIn_118t4_1",wu="_dialog_118t4_32",ju="_dialogSlideUp_118t4_1",ku="_sm_118t4_45",Nu="_md_118t4_48",Eu="_lg_118t4_51",Tu="_fullscreen_118t4_54",Iu="_header_118t4_60",$u="_headerContent_118t4_70",Cu="_closeBtn_118t4_78",Mu="_body_118t4_98",Lu="_footer_118t4_108",it={overlay:bu,overlayFadeIn:yu,dialog:wu,dialogSlideUp:ju,sm:ku,md:Nu,lg:Eu,fullscreen:Tu,header:Iu,headerContent:$u,closeBtn:Cu,body:Mu,footer:Lu},Du=({children:n,onClose:t})=>e.jsxs("div",{className:it.header,children:[e.jsx("div",{className:it.headerContent,children:n}),t&&e.jsx("button",{className:it.closeBtn,onClick:t,"aria-label":"Close modal",children:"✕"})]}),Bu=({children:n})=>e.jsx("div",{className:it.body,children:n}),Su=({children:n})=>e.jsx("div",{className:it.footer,children:n}),Rt=({open:n,onClose:t,children:s,size:o="md",className:a=""})=>(r.useEffect(()=>{if(n)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[n]),r.useEffect(()=>{if(!n)return;const i=c=>{c.key==="Escape"&&t()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[n,t]),n?Nn.createPortal(e.jsx("div",{className:it.overlay,onClick:i=>{i.target===i.currentTarget&&t()},children:e.jsx("div",{className:[it.dialog,it[o],a].filter(Boolean).join(" "),role:"dialog","aria-modal":"true",children:s})}),document.body):null);Rt.Header=Du;Rt.Body=Bu;Rt.Footer=Su;const Ru="_toasterRoot_izzak_61",Au="_srOnly_izzak_68",zu="_anchor_izzak_80",Pu="_overflowPill_izzak_145",Ou="_toast_izzak_61",Wu="_evoToastEnterRight_izzak_1",Hu="_evoToastEnterLeft_izzak_1",Fu="_evoToastEnterTop_izzak_1",qu="_evoToastEnterBottom_izzak_1",Gu="_exiting_izzak_207",Vu="_evoToastExit_izzak_1",Uu="_noMotion_izzak_211",Ku="_toastIcon_izzak_227",Qu="_toastBody_izzak_269",Yu="_toastTitle_izzak_274",Xu="_toastDescription_izzak_279",Ju="_toastCount_izzak_285",Zu="_toastProgressTrack_izzak_303",eh="_toastProgressFill_izzak_315",th="_toastAction_izzak_348",nh="_toastClose_izzak_371",sh="_bellWrapper_izzak_392",oh="_bell_izzak_392",rh="_bellOpen_izzak_442",ah="_bellBadge_izzak_446",ih="_bellBadgeZero_izzak_465",lh="_bellPanelHost_izzak_470",ch="_panel_izzak_514",dh="_evoPanelEnter_izzak_1",uh="_panelHeader_izzak_532",hh="_panelTitle_izzak_541",ph="_panelHeaderActions_izzak_546",_h="_panelMarkAll_izzak_552",fh="_panelClose_izzak_572",mh="_panelBody_izzak_591",vh="_panelState_izzak_595",xh="_panelStateError_izzak_605",gh="_itemList_izzak_609",bh="_emptyState_izzak_621",yh="_emptyIcon_izzak_630",wh="_emptyTitle_izzak_641",jh="_emptyHint_izzak_647",kh="_item_izzak_609",Nh="_itemUnread_izzak_661",Eh="_itemInteractive_izzak_665",Th="_itemUnreadDot_izzak_676",Ih="_itemMedia_izzak_690",$h="_itemAvatar_izzak_716",Ch="_itemMediaGlyph_izzak_722",Mh="_itemBody_izzak_726",Lh="_itemTitle_izzak_731",Dh="_itemDescription_izzak_738",Bh="_itemMeta_izzak_749",Sh="_itemTimestamp_izzak_758",Rh="_itemAction_izzak_762",Ah="_itemDismiss_izzak_782",P={toasterRoot:Ru,srOnly:Au,anchor:zu,"anchor-top-left":"_anchor-top-left_izzak_94","anchor-top-center":"_anchor-top-center_izzak_101","anchor-top-right":"_anchor-top-right_izzak_109","anchor-bottom-left":"_anchor-bottom-left_izzak_116","anchor-bottom-center":"_anchor-bottom-center_izzak_122","anchor-bottom-right":"_anchor-bottom-right_izzak_129",overflowPill:Pu,toast:Ou,evoToastEnterRight:Wu,evoToastEnterLeft:Hu,evoToastEnterTop:Fu,evoToastEnterBottom:qu,exiting:Gu,evoToastExit:Vu,noMotion:Uu,"sev-success":"_sev-success_izzak_224",toastIcon:Ku,"sev-error":"_sev-error_izzak_232","sev-warning":"_sev-warning_izzak_240","sev-info":"_sev-info_izzak_248",toastBody:Qu,toastTitle:Yu,toastDescription:Xu,toastCount:Ju,toastProgressTrack:Zu,toastProgressFill:eh,toastAction:th,toastClose:nh,bellWrapper:sh,bell:oh,"bell-ghost":"_bell-ghost_izzak_418","bell-solid":"_bell-solid_izzak_422","bell-sm":"_bell-sm_izzak_427","bell-md":"_bell-md_izzak_432","bell-lg":"_bell-lg_izzak_437",bellOpen:rh,bellBadge:ah,bellBadgeZero:ih,bellPanelHost:lh,"place-bottom-end":"_place-bottom-end_izzak_488","place-bottom-start":"_place-bottom-start_izzak_493","place-bottom":"_place-bottom_izzak_488","place-top-end":"_place-top-end_izzak_504","place-top-start":"_place-top-start_izzak_509",panel:ch,evoPanelEnter:dh,panelHeader:uh,panelTitle:hh,panelHeaderActions:ph,panelMarkAll:_h,panelClose:fh,panelBody:mh,panelState:vh,panelStateError:xh,itemList:gh,emptyState:bh,emptyIcon:yh,emptyTitle:wh,emptyHint:jh,item:kh,itemUnread:Nh,itemInteractive:Eh,itemUnreadDot:Th,itemMedia:Ih,itemAvatar:$h,itemMediaGlyph:Ch,itemBody:Mh,itemTitle:Lh,itemDescription:Dh,itemMeta:Bh,itemTimestamp:Sh,itemAction:Rh,itemDismiss:Ah},Zn={defaultAnchor:"top-right",defaultDuration:4e3,maxVisible:3,pauseOnFocusLoss:!0,persistErrors:!1},zh=180,Ph=Object.freeze([]),Oh=Object.freeze({items:Object.freeze([]),unread:0});class Wh{constructor(){this.toasts=[],this.inboxItems=[],this.inboxSnapshot={items:[],unread:0},this.inboxOwnedExternally=!1,this.inboxOnChange=null,this.toastListeners=new Set,this.inboxListeners=new Set,this.configListeners=new Set,this.config=Zn,this.counter=0}setConfig(t){const s={...this.config,...t};Object.keys(s).some(a=>s[a]!==this.config[a])&&(this.config=s,this.notifyConfig())}getConfig(){return this.config}subscribeConfig(t){return this.configListeners.add(t),()=>{this.configListeners.delete(t)}}notifyConfig(){this.configListeners.forEach(t=>t())}resolveDuration(t,s){return t.persistent===!0?1/0:t.duration!=null?t.duration:s==="error"&&this.config.persistErrors&&t.persistent!==!1?1/0:this.config.defaultDuration}bindExternalInbox(t,s){t!==void 0?(this.inboxOwnedExternally=!0,this.inboxItems=t,this.inboxOnChange=s??null,this.refreshInboxSnapshot(),this.notifyInbox()):(this.inboxOwnedExternally=!1,this.inboxOnChange=null)}refreshInboxSnapshot(){let t=0;for(const s of this.inboxItems)s.read||(t+=1);this.inboxSnapshot={items:this.inboxItems,unread:t}}nextId(){return this.counter+=1,`evo-${Date.now().toString(36)}-${this.counter}`}pushToast(t,s={}){const o=s.severity??"info";if(s.groupKey!=null&&s.id==null){const l=this.toasts.find(p=>p.groupKey===s.groupKey&&!p.exiting);if(l)return this.toasts=this.toasts.map(p=>p.id===l.id?{...p,...s,id:l.id,severity:o,duration:this.resolveDuration(s,o),message:t,count:p.count+1,restartKey:p.restartKey+1}:p),this.applyInboxSideEffect(l.id,t,s),this.notifyToasts(),l.id}const a=s.id??this.nextId(),i=this.resolveDuration(s,o);if(this.toasts.find(l=>l.id===a))this.toasts=this.toasts.map(l=>l.id===a?{...l,...s,id:a,severity:o,duration:i,message:t,restartKey:l.restartKey+1,exiting:!1}:l);else{const l={...s,id:a,severity:o,duration:i,message:t,createdAt:Date.now(),count:1,restartKey:0};this.toasts=[...this.toasts,l]}return this.applyInboxSideEffect(a,t,s),this.notifyToasts(),a}applyInboxSideEffect(t,s,o){if(!o.inbox)return;const a={id:`${t}-inbox`,title:o.title??s,description:o.description,severity:o.severity??"info",icon:o.icon,action:o.action,...typeof o.inbox=="object"?o.inbox:{}};this.pushInbox(a)}updateToast(t,s){const o=this.toasts.findIndex(c=>c.id===t);if(o===-1)return;const a=this.toasts[o],i={...a,...s,id:t,severity:s.severity??a.severity,message:"title"in s&&s.title!=null?s.title:a.message,restartKey:a.restartKey+1};s.persistent===!0?i.duration=1/0:s.duration!=null?i.duration=s.duration:s.persistent===!1&&(i.duration=this.resolveDuration({...s,persistent:!1},i.severity)),this.toasts=this.toasts.map(c=>c.id===t?i:c),this.notifyToasts()}dismissToast(t,s="dismiss"){var a,i;if(t==null){const c=this.toasts.filter(l=>!l.exiting);if(c.length===0)return;c.forEach(l=>{var p;return(p=l.onDismiss)==null?void 0:p.call(l,l.id)}),this.toasts=this.toasts.map(l=>l.exiting?l:{...l,exiting:!0}),this.notifyToasts();return}const o=this.toasts.find(c=>c.id===t);!o||o.exiting||(s==="auto"?(a=o.onAutoClose)==null||a.call(o,t):(i=o.onDismiss)==null||i.call(o,t),this.toasts=this.toasts.map(c=>c.id===t?{...c,exiting:!0}:c),this.notifyToasts())}removeToast(t){const s=this.toasts.length;this.toasts=this.toasts.filter(o=>o.id!==t),this.toasts.length!==s&&this.notifyToasts()}getToasts(){return this.toasts}subscribeToasts(t){return this.toastListeners.add(t),()=>{this.toastListeners.delete(t)}}notifyToasts(){this.toastListeners.forEach(t=>t(this.toasts))}pushInbox(t){const s=t.id??this.nextId(),o=t.timestamp instanceof Date?t.timestamp.getTime():t.timestamp??Date.now(),a={id:s,title:t.title,description:t.description,severity:t.severity??"info",icon:t.icon,avatarUrl:t.avatarUrl,timestamp:o,read:t.read??!1,action:t.action,onClick:t.onClick,meta:t.meta},c=this.inboxItems.findIndex(l=>l.id===s)===-1?[a,...this.inboxItems]:this.inboxItems.map(l=>l.id===s?a:l);if(this.commitInbox(c),t.toast){const l={id:`${s}-toast`,title:a.title,description:a.description,severity:a.severity,icon:a.icon,action:a.action,...typeof t.toast=="object"?t.toast:{}};this.pushToast(a.title,l)}return s}markRead(t){this.commitInbox(this.inboxItems.map(s=>s.id===t?{...s,read:!0}:s))}markUnread(t){this.commitInbox(this.inboxItems.map(s=>s.id===t?{...s,read:!1}:s))}markAllRead(){this.commitInbox(this.inboxItems.map(t=>t.read?t:{...t,read:!0}))}removeInbox(t){this.commitInbox(this.inboxItems.filter(s=>s.id!==t))}clearInbox(){this.commitInbox([])}setInboxItems(t){this.commitInbox(t)}getInboxState(){return this.inboxSnapshot}subscribeInbox(t){return this.inboxListeners.add(t),()=>{this.inboxListeners.delete(t)}}commitInbox(t){var s;this.inboxItems=t,this.refreshInboxSnapshot(),this.inboxOwnedExternally&&((s=this.inboxOnChange)==null||s.call(this,t)),this.notifyInbox()}notifyInbox(){const t=this.inboxSnapshot;this.inboxListeners.forEach(s=>s(t))}}const ne=new Wh,Hh=(n,t)=>ne.pushToast(n,t),Je=Hh;Je.success=(n,t)=>ne.pushToast(n,{...t,severity:"success"});Je.error=(n,t)=>ne.pushToast(n,{...t,severity:"error"});Je.warning=(n,t)=>ne.pushToast(n,{...t,severity:"warning"});Je.info=(n,t)=>ne.pushToast(n,{...t,severity:"info"});Je.loading=(n,t)=>ne.pushToast(n,{...t,severity:"info",persistent:!0,dismissible:!1});Je.update=(n,t)=>ne.updateToast(n,t);Je.dismiss=n=>ne.dismissToast(n);Je.promise=(n,t)=>{const s=ne.pushToast(typeof t.loading=="object"&&t.loading!==null&&!Mt(t.loading)?t.loading.title??"":t.loading,{...typeof t.loading=="object"&&!Mt(t.loading)?t.loading:{},severity:"info",persistent:!0,dismissible:!1});return(typeof n=="function"?n():n).then(a=>{const i=typeof t.success=="function"?t.success(a):t.success,c=i!==null&&typeof i=="object"&&!Mt(i),l=c?i:{},p=c?l.title??"":i;ne.updateToast(s,{...l,severity:"success",persistent:!1,dismissible:!0,title:p})},a=>{const i=typeof t.error=="function"?t.error(a):t.error,c=i!==null&&typeof i=="object"&&!Mt(i),l=c?i:{},p=c?l.title??"":i;ne.updateToast(s,{...l,severity:"error",persistent:!1,dismissible:!0,title:p})}),s};Je.progress=(n,t)=>{const s=ne.pushToast(n,{...t,severity:(t==null?void 0:t.severity)??"info",persistent:!0,dismissible:(t==null?void 0:t.dismissible)??!1,progress:Gt((t==null?void 0:t.progress)??0)});return{id:s,setProgress:o=>ne.updateToast(s,{progress:Gt(o)}),update:o=>ne.updateToast(s,o),done:o=>ne.updateToast(s,{...o,severity:(o==null?void 0:o.severity)??"success",progress:1,persistent:!1,dismissible:!0}),fail:o=>ne.updateToast(s,{...o,severity:(o==null?void 0:o.severity)??"error",persistent:!1,dismissible:!0}),dismiss:()=>ne.dismissToast(s)}};function Mt(n){if(n==null)return!0;const t=typeof n;return!!(t==="string"||t==="number"||t==="boolean"||Array.isArray(n)||t==="object"&&n!==null&&"$$typeof"in n)}function Gt(n){return typeof n!="number"||Number.isNaN(n)||n<0?0:n>1?1:n}const Fh={toast:Je,push:n=>ne.pushInbox(n),inbox:{markRead:n=>ne.markRead(n),markUnread:n=>ne.markUnread(n),markAllRead:()=>ne.markAllRead(),remove:n=>ne.removeInbox(n),clear:()=>ne.clearInbox(),setItems:n=>ne.setInboxItems(n),getState:()=>ne.getInboxState(),subscribe:n=>ne.subscribeInbox(n)},dismissAll:()=>ne.dismissToast()};function Xe(...n){return n.filter(Boolean).join(" ")}const es={success:"✓",error:"✕",warning:"!",info:"i"};function qh(n,t){const s=Math.max(0,t-n),o=Math.floor(s/1e3);if(o<60)return"just now";const a=Math.floor(o/60);if(a<60)return`${a}m ago`;const i=Math.floor(a/60);if(i<24)return`${i}h ago`;const c=Math.floor(i/24);return c<7?`${c}d ago`:new Date(n).toLocaleDateString()}function ts(n){const t=[],s=n.title??n.message;return(typeof s=="string"||typeof s=="number")&&t.push(String(s)),(typeof n.description=="string"||typeof n.description=="number")&&t.push(String(n.description)),t.join(". ")}function Gh(){return r.useSyncExternalStore(n=>ne.subscribeToasts(()=>n()),()=>ne.getToasts(),()=>Ph)}function rn(){return r.useSyncExternalStore(n=>ne.subscribeInbox(()=>n()),()=>ne.getInboxState(),()=>Oh)}function Vh(){return r.useSyncExternalStore(n=>ne.subscribeConfig(n),()=>ne.getConfig(),()=>Zn)}const an=({children:n,defaultAnchor:t="top-right",maxVisible:s=3,defaultDuration:o=4e3,pauseOnFocusLoss:a=!0,persistErrors:i=!1,inboxItems:c,onInboxChange:l})=>(r.useLayoutEffect(()=>{ne.setConfig({defaultAnchor:t,maxVisible:s,defaultDuration:o,pauseOnFocusLoss:a,persistErrors:i})},[t,s,o,a,i]),r.useLayoutEffect(()=>{ne.bindExternalInbox(c,l)},[c,l]),e.jsx(e.Fragment,{children:n}));an.displayName="EvoNotificationProvider";const Uh=({toast:n,anchor:t,index:s,total:o,hovered:a,pausedExternally:i,reducedMotion:c})=>{const l=r.useRef(0),p=r.useRef(null),g=r.useRef(null),b=r.useRef(n.restartKey),_=n.exiting??!1,y=a||i,I=Number.isFinite(n.duration);r.useEffect(()=>{if(!_)return;const v=window.setTimeout(()=>ne.removeToast(n.id),c?0:zh);return()=>window.clearTimeout(v)},[_,c,n.id]),r.useEffect(()=>{if(b.current!==n.restartKey&&(b.current=n.restartKey,l.current=0),!I||_)return;if(y){p.current!=null&&(l.current+=Date.now()-p.current,p.current=null),g.current!=null&&(window.clearTimeout(g.current),g.current=null);return}const v=Math.max(0,n.duration-l.current);return p.current=Date.now(),g.current=window.setTimeout(()=>ne.dismissToast(n.id,"auto"),v),()=>{g.current!=null&&(window.clearTimeout(g.current),g.current=null),p.current!=null&&(l.current+=Date.now()-p.current,p.current=null)}},[y,I,_,n.duration,n.restartKey,n.id]);const j=o-1-s,B=a?1:Math.max(.94,1-j*.04),T=a?j*8:j*6,R=a?1:Math.max(.7,1-j*.15),O=t.startsWith("bottom")?1:-1,q={transform:`translateY(${T*O}px) scale(${B})`,opacity:R,zIndex:1e3+s},oe=n.dismissible??!0,w=n.icon??es[n.severity],D=n.title??n.message,M=ts(n),$=typeof n.progress=="number",te=$?Gt(n.progress):0,W=M!=="";return e.jsxs("div",{className:Xe(P.toast,P[`sev-${n.severity}`],_&&P.exiting,c&&P.noMotion,n.className),style:q,role:W?"group":n.severity==="error"?"alert":"status","aria-label":W?M:void 0,children:[e.jsx("span",{className:P.toastIcon,"aria-hidden":"true",children:w}),e.jsxs("div",{className:P.toastBody,children:[D!=null&&e.jsxs("div",{className:P.toastTitle,children:[D,n.count>1&&e.jsxs("span",{className:P.toastCount,"aria-label":`repeated ${n.count} times`,children:["×",n.count]})]}),n.description!=null&&e.jsx("div",{className:P.toastDescription,children:n.description})]}),n.action&&e.jsx("button",{type:"button",className:P.toastAction,onClick:v=>{n.action.onClick(v),ne.dismissToast(n.id)},children:n.action.label}),oe&&e.jsx("button",{type:"button",className:P.toastClose,onClick:()=>{ne.dismissToast(n.id)},"aria-label":"Dismiss notification",children:"✕"}),$&&e.jsx("div",{className:P.toastProgressTrack,role:"progressbar","aria-valuemin":0,"aria-valuemax":1,"aria-valuenow":te,children:e.jsx("div",{className:P.toastProgressFill,style:{transform:`scaleX(${te})`}})})]})},Kh=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"];let Nt=null;const ln=({anchor:n,className:t})=>{const s=Gh(),{defaultAnchor:o,maxVisible:a,pauseOnFocusLoss:i}=Vh(),c=n??o,[l,p]=r.useState(null),[g,b]=r.useState(!0),[_,y]=r.useState(!1),[I,j]=r.useState(!1),[B,T]=r.useState(!1),[R,O]=r.useState(""),[q,oe]=r.useState(""),w=r.useRef(new Set),D=r.useRef(null);if(D.current||(D.current=Symbol("evo-toaster")),r.useEffect(()=>{const $=D.current;return Nt==null?(Nt=$,T(!0)):Nt!==$&&console.warn("[EvoNotification] More than one <EvoNotificationToaster> is mounted; only the first renders. Remove the duplicate(s)."),()=>{Nt===$&&(Nt=null)}},[]),r.useEffect(()=>{var W;if(j(!0),typeof window>"u")return;const $=window.matchMedia("(prefers-reduced-motion: reduce)");y($.matches);const te=v=>y(v.matches);return(W=$.addEventListener)==null||W.call($,"change",te),()=>{var v;return(v=$.removeEventListener)==null?void 0:v.call($,"change",te)}},[]),r.useEffect(()=>{if(!i)return;const $=()=>b(!0),te=()=>b(!1);return window.addEventListener("focus",$),window.addEventListener("blur",te),()=>{window.removeEventListener("focus",$),window.removeEventListener("blur",te)}},[i]),r.useEffect(()=>{const $=w.current,te=new Set;for(const W of s){if(te.add(W.id),$.has(W.id)||W.exiting)continue;$.add(W.id);const v=ts(W);v&&(W.severity==="error"?oe(v):O(v))}for(const W of $)te.has(W)||$.delete(W)},[s]),r.useEffect(()=>{const $=te=>{if(te.key==="Escape"&&l!=null){const W=s.filter(v=>!v.exiting&&(v.anchor??c)===l);W.length>0&&ne.dismissToast(W[W.length-1].id)}};return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[s,c,l]),!I||typeof document>"u"||!B)return null;const M={"top-left":[],"top-center":[],"top-right":[],"bottom-left":[],"bottom-center":[],"bottom-right":[]};for(const $ of s){const te=$.anchor??c;M[te].push($)}return Nn.createPortal(e.jsxs("div",{className:Xe(P.toasterRoot,t),"aria-label":"Notifications",children:[e.jsx("div",{className:P.srOnly,"aria-live":"polite","aria-atomic":"true",children:R}),e.jsx("div",{className:P.srOnly,"aria-live":"assertive","aria-atomic":"true",children:q}),Kh.map($=>{const te=M[$];if(te.length===0)return null;const W=Math.max(0,te.length-a),v=te.slice(Math.max(0,te.length-a)),X=l===$,S=!g;return e.jsxs("div",{className:Xe(P.anchor,P[`anchor-${$}`]),onMouseEnter:()=>p($),onMouseLeave:()=>p(null),onFocus:()=>p($),onBlur:re=>{re.currentTarget.contains(re.relatedTarget)||p(null)},children:[W>0&&e.jsxs("div",{className:P.overflowPill,"aria-hidden":"true",children:["+",W," more"]}),v.map((re,C)=>e.jsx(Uh,{toast:re,anchor:$,index:C,total:v.length,hovered:X,pausedExternally:S,reducedMotion:_},re.id))]},$)})]}),document.body)};ln.displayName="EvoNotificationToaster";const cn=r.forwardRef(function({variant:t="ghost",size:s="md",hideZero:o=!0,maxBadgeCount:a=99,panelPlacement:i="bottom-end",renderPanel:c="popover",panelTitle:l,panelEmptyState:p,className:g,onClick:b,..._},y){const{unread:I}=rn(),[j,B]=r.useState(!1),T=r.useRef(null),R=r.useId();r.useEffect(()=>{if(!j||c!=="popover")return;const oe=D=>{var M;(M=T.current)!=null&&M.contains(D.target)||B(!1)},w=D=>{D.key==="Escape"&&B(!1)};return document.addEventListener("mousedown",oe),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",oe),document.removeEventListener("keydown",w)}},[j,c]);const O=I>a?`${a}+`:String(I),q=I>0||!o;return e.jsxs("div",{ref:T,className:P.bellWrapper,children:[e.jsxs("button",{ref:y,type:"button",className:Xe(P.bell,P[`bell-${t}`],P[`bell-${s}`],j&&P.bellOpen,g),"aria-label":I>0?`Notifications, ${I} unread`:"Notifications","aria-haspopup":c==="popover"?"dialog":void 0,"aria-expanded":c==="popover"?j:void 0,"aria-controls":c==="popover"?R:void 0,onClick:oe=>{b==null||b(oe),c==="popover"&&B(w=>!w)},..._,children:[e.jsx(ns,{}),q&&e.jsx("span",{className:Xe(P.bellBadge,I===0&&P.bellBadgeZero),children:O})]}),c==="popover"&&j&&e.jsx("div",{id:R,className:Xe(P.bellPanelHost,P[`place-${i}`]),children:e.jsx(At,{open:!0,onClose:()=>B(!1),title:l,emptyState:p})})]})});cn.displayName="EvoNotificationBell";const ns=()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 8 3 8H3s3-1 3-8"}),e.jsx("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"})]}),At=r.forwardRef(function({open:t=!0,onClose:s,title:o="Notifications",emptyState:a,loading:i=!1,error:c,showMarkAllRead:l=!0,maxHeight:p=480,className:g,style:b,..._},y){const{items:I,unread:j}=rn();return t?e.jsxs("div",{ref:y,className:Xe(P.panel,g),role:"dialog","aria-label":typeof o=="string"?o:"Notifications",style:b,..._,children:[e.jsxs("header",{className:P.panelHeader,children:[e.jsx("div",{className:P.panelTitle,children:o}),e.jsxs("div",{className:P.panelHeaderActions,children:[l&&j>0&&e.jsx("button",{type:"button",className:P.panelMarkAll,onClick:()=>ne.markAllRead(),children:"Mark all read"}),s&&e.jsx("button",{type:"button",className:P.panelClose,onClick:s,"aria-label":"Close notifications",children:"✕"})]})]}),e.jsx("div",{className:P.panelBody,style:{maxHeight:typeof p=="number"?`${p}px`:p},children:i?e.jsx("div",{className:P.panelState,children:"Loading…"}):c?e.jsx("div",{className:Xe(P.panelState,P.panelStateError),children:c}):I.length===0?e.jsx("div",{className:P.panelState,children:a??e.jsx(Qh,{})}):e.jsx("ul",{className:P.itemList,children:I.map(B=>e.jsx("li",{children:e.jsx(zt,{item:B})},B.id))})})]}):null});At.displayName="EvoNotificationPanel";const Qh=()=>e.jsxs("div",{className:P.emptyState,children:[e.jsx("div",{className:P.emptyIcon,"aria-hidden":"true",children:e.jsx(ns,{})}),e.jsx("div",{className:P.emptyTitle,children:"You're all caught up"}),e.jsx("div",{className:P.emptyHint,children:"New notifications will appear here."})]}),zt=r.forwardRef(function({item:t,onClick:s,className:o,...a},i){const[c,l]=r.useState(t.timestamp);r.useEffect(()=>{l(Date.now());const y=window.setInterval(()=>l(Date.now()),6e4);return()=>window.clearInterval(y)},[]);const p=r.useCallback(()=>{var y;(y=s??t.onClick)==null||y(t),t.read||ne.markRead(t.id)},[t,s]),g=r.useCallback(y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),p())},[p]),b=!!(s??t.onClick),_=t.icon??es[t.severity];return e.jsxs("div",{ref:i,className:Xe(P.item,!t.read&&P.itemUnread,b&&P.itemInteractive,o),role:b?"button":"group",tabIndex:b?0:void 0,onClick:b?p:void 0,onKeyDown:b?g:void 0,...a,children:[e.jsx("span",{className:P.itemUnreadDot,"aria-hidden":t.read}),e.jsx("div",{className:Xe(P.itemMedia,P[`sev-${t.severity}`]),"aria-hidden":"true",children:t.avatarUrl?e.jsx("img",{src:t.avatarUrl,alt:"",className:P.itemAvatar}):e.jsx("span",{className:P.itemMediaGlyph,children:_})}),e.jsxs("div",{className:P.itemBody,children:[e.jsx("div",{className:P.itemTitle,children:t.title}),t.description!=null&&e.jsx("div",{className:P.itemDescription,children:t.description}),e.jsxs("div",{className:P.itemMeta,children:[e.jsx("span",{className:P.itemTimestamp,children:qh(t.timestamp,c)}),t.action&&e.jsx("button",{type:"button",className:P.itemAction,onClick:y=>{y.stopPropagation(),t.action.onClick(y)},children:t.action.label})]})]}),e.jsx("button",{type:"button",className:P.itemDismiss,onClick:y=>{y.stopPropagation(),ne.removeInbox(t.id)},"aria-label":"Remove notification",children:"✕"})]})});zt.displayName="EvoNotificationItem";function Yh(){return rn()}const Xh={Provider:an,Toaster:ln,Bell:cn,Panel:At,Item:zt},Jh="_wrapper_1fxx0_11",Zh="_tooltip_1fxx0_17",ep="_tooltipFadeIn_1fxx0_1",tp="_top_1fxx0_33",np="_bottom_1fxx0_38",sp="_left_1fxx0_43",op="_right_1fxx0_48",rp="_arrow_1fxx0_54",Lt={wrapper:Jh,tooltip:Zh,tooltipFadeIn:ep,top:tp,bottom:np,left:sp,right:op,arrow:rp},ap=({content:n,children:t,placement:s="top",className:o=""})=>{const[a,i]=r.useState(!1);return e.jsxs("span",{className:`${Lt.wrapper} ${o}`,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),children:[t,a&&e.jsxs("span",{className:`${Lt.tooltip} ${Lt[s]}`,role:"tooltip",children:[n,e.jsx("span",{className:Lt.arrow})]})]})},ip="_alert_slsq7_1",lp="_success_slsq7_10",cp="_alertIcon_slsq7_14",dp="_alertTitle_slsq7_17",up="_error_slsq7_20",hp="_warning_slsq7_30",pp="_info_slsq7_40",_p="_alertContent_slsq7_65",fp="_alertDescription_slsq7_76",mp="_dismissBtn_slsq7_83",pt={alert:ip,success:lp,alertIcon:cp,alertTitle:dp,error:up,warning:hp,info:pp,alertContent:_p,alertDescription:fp,dismissBtn:mp},vp={success:"✓",error:"✕",warning:"⚠",info:"i"},xp=({type:n="info",title:t,children:s,dismissible:o=!1,className:a=""})=>{const[i,c]=r.useState(!1);return i?null:e.jsxs("div",{className:[pt.alert,pt[n],a].filter(Boolean).join(" "),role:"alert",children:[e.jsx("span",{className:pt.alertIcon,children:vp[n]}),e.jsxs("div",{className:pt.alertContent,children:[t&&e.jsx("p",{className:pt.alertTitle,children:t}),e.jsx("div",{className:pt.alertDescription,children:s})]}),o&&e.jsx("button",{className:pt.dismissBtn,onClick:()=>c(!0),"aria-label":"Dismiss alert",children:"✕"})]})},gp="_badge_nypvn_1",bp="_sm_nypvn_12",yp="_md_nypvn_16",wp="_lg_nypvn_20",jp="_solid_nypvn_25",kp="_primary_nypvn_25",Np="_secondary_nypvn_30",Ep="_success_nypvn_35",Tp="_warning_nypvn_40",Ip="_danger_nypvn_45",$p="_info_nypvn_50",Cp="_outline_nypvn_56",Mp="_subtle_nypvn_84",Lp="_dot_nypvn_115",Dp="_removeBtn_nypvn_123",Bp="_badgeGroup_nypvn_142",ft={badge:gp,sm:bp,md:yp,lg:wp,solid:jp,primary:kp,secondary:Np,success:Ep,warning:Tp,danger:Ip,info:$p,outline:Cp,subtle:Mp,dot:Lp,removeBtn:Dp,badgeGroup:Bp},Sp=({children:n,className:t=""})=>e.jsx("div",{className:`${ft.badgeGroup} ${t}`,children:n}),ss=({children:n,severity:t="primary",variant:s="solid",size:o="md",dot:a=!1,removable:i=!1,onRemove:c,className:l=""})=>e.jsxs("span",{className:[ft.badge,ft[t],ft[s],ft[o],l].filter(Boolean).join(" "),children:[a&&e.jsx("span",{className:ft.dot}),n,i&&e.jsx("button",{className:ft.removeBtn,onClick:c,"aria-label":"Remove",children:"✕"})]});ss.Group=Sp;const Rp="_skeleton_7wr3a_9",Ap="_animated_7wr3a_14",zp="_textGroup_7wr3a_20",mt={skeleton:Rp,animated:Ap,textGroup:zp},Et=n=>typeof n=="number"?`${n}px`:n,Pp=({lines:n=3,className:t="",animated:s=!0})=>e.jsx("div",{className:`${mt.textGroup} ${t}`,children:Array.from({length:n}).map((o,a)=>e.jsx("div",{className:[mt.skeleton,s?mt.animated:""].filter(Boolean).join(" "),style:{width:a===n-1?"65%":"100%",height:"0.875rem",borderRadius:"4px"}},a))}),Op=({size:n=40,className:t="",animated:s=!0})=>e.jsx("div",{className:[mt.skeleton,s?mt.animated:"",t].filter(Boolean).join(" "),style:{width:Et(n),height:Et(n),borderRadius:"50%"}}),dn=({width:n="100%",height:t="1rem",borderRadius:s="6px",className:o="",animated:a=!0})=>e.jsx("div",{className:[mt.skeleton,a?mt.animated:"",o].filter(Boolean).join(" "),style:{width:Et(n),height:Et(t),borderRadius:Et(s)}});dn.Text=Pp;dn.Circle=Op;const Wp="_wrapper_69yee_1",Hp="_scroll_69yee_11",Fp="_table_69yee_30",qp="_caption_69yee_38",Gp="_thead_69yee_46",Vp="_th_69yee_46",Up="_sortBtn_69yee_63",Kp="_sortIcon_69yee_85",Qp="_sortActive_69yee_92",Yp="_tbody_69yee_99",Xp="_tr_69yee_99",Jp="_td_69yee_103",Zp="_hoverable_69yee_167",e_="_striped_69yee_171",t_="_bordered_69yee_179",n_="_stickyHeader_69yee_184",s_="_clickable_69yee_195",o_="_empty_69yee_202",r_="_emptyText_69yee_209",a_="_skeleton_69yee_213",i_="_evoTableShimmer_69yee_1",l_="_responsiveStack_69yee_237",c_="_emptyRow_69yee_272",fe={wrapper:Wp,scroll:Hp,table:Fp,caption:qp,thead:Gp,th:Vp,sortBtn:Up,sortIcon:Kp,sortActive:Qp,tbody:Yp,tr:Xp,td:Jp,"align-left":"_align-left_69yee_115","align-center":"_align-center_69yee_119","align-right":"_align-right_69yee_123","size-sm":"_size-sm_69yee_137","size-md":"_size-md_69yee_147","size-lg":"_size-lg_69yee_157",hoverable:Zp,striped:e_,bordered:t_,stickyHeader:n_,clickable:s_,empty:o_,emptyText:r_,skeleton:a_,evoTableShimmer:i_,responsiveStack:l_,emptyRow:c_};function Ht(n,t){return t.split(".").reduce((s,o)=>{if(s!=null&&typeof s=="object")return s[o]},n)}function d_(n,t){return n==null&&t==null?0:n==null?-1:t==null?1:typeof n=="number"&&typeof t=="number"?n-t:String(n).localeCompare(String(t),void 0,{numeric:!0,sensitivity:"base"})}function u_(n,t,s){if(typeof s=="function")return s(n,t);if(s&&n&&typeof n=="object"){const o=n[s];if(typeof o=="string"||typeof o=="number")return o}return t}const h_=({direction:n})=>e.jsxs("svg",{className:fe.sortIcon,width:"8",height:"12",viewBox:"0 0 8 12","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{d:"M4 0 L8 4 H0 Z",fill:"currentColor",opacity:n==="asc"?1:.3}),e.jsx("path",{d:"M4 12 L0 8 H8 Z",fill:"currentColor",opacity:n==="desc"?1:.3})]}),p_=({columns:n,data:t,size:s="md",striped:o=!1,hoverable:a=!0,bordered:i=!1,stickyHeader:c=!1,loading:l=!1,loadingRows:p=5,rowKey:g,emptyState:b,emptyText:_="No data available.",onRowClick:y,onRowDoubleClick:I,getRowClassName:j,responsive:B="scroll",caption:T,sort:R,onSortChange:O,defaultSort:q,className:oe})=>{const w=R!==void 0,[D,M]=r.useState(q??null),$=w?R:D,te=C=>{let K;!$||$.key!==C?K={key:C,direction:"asc"}:$.direction==="asc"?K={key:C,direction:"desc"}:K=null,w||M(K),O==null||O(K)},W=r.useMemo(()=>{if(!$)return t;const C=n.find(Z=>Z.key===$.key);if(!C)return t;const K=$.direction,A=[...t];return C.sortFn?A.sort((Z,Q)=>C.sortFn(Z,Q,K)):A.sort((Z,Q)=>{const de=Ht(Z,C.key),ie=Ht(Q,C.key),se=d_(de,ie);return K==="asc"?se:-se}),A},[t,n,$]),v=!!(y||I),X=[fe.wrapper,fe[`size-${s}`],o&&fe.striped,a&&fe.hoverable,i&&fe.bordered,c&&fe.stickyHeader,B==="stack"&&fe.responsiveStack,v&&fe.clickable,oe].filter(Boolean).join(" "),S=C=>{const K=C.align??"left",A=($==null?void 0:$.key)===C.key,Z=A?$.direction:void 0,Q=A?Z==="asc"?"ascending":"descending":C.sortable?"none":void 0,de=[fe.th,fe[`align-${K}`],C.headerClassName].filter(Boolean).join(" ");return e.jsx("th",{scope:"col",className:de,style:C.width?{width:C.width}:void 0,"aria-sort":Q,children:C.sortable?e.jsxs("button",{type:"button",className:[fe.sortBtn,A?fe.sortActive:""].filter(Boolean).join(" "),onClick:()=>te(C.key),children:[e.jsx("span",{children:C.header}),e.jsx(h_,{direction:Z})]}):C.header},C.key)},re=()=>l?Array.from({length:Math.max(1,p)}).map((C,K)=>e.jsx("tr",{className:fe.tr,children:n.map(A=>e.jsx("td",{className:[fe.td,fe[`align-${A.align??"left"}`]].filter(Boolean).join(" "),"data-label":typeof A.header=="string"?A.header:A.key,children:e.jsx("span",{className:fe.skeleton})},A.key))},`evo-skeleton-${K}`)):W.length===0?e.jsx("tr",{className:fe.emptyRow,children:e.jsx("td",{colSpan:n.length,className:fe.empty,children:b??e.jsx("span",{className:fe.emptyText,children:_})})}):W.map((C,K)=>{const A=[fe.tr,j==null?void 0:j(C,K)].filter(Boolean).join(" ");return e.jsx("tr",{className:A,onClick:y?()=>y(C,K):void 0,onDoubleClick:I?()=>I(C,K):void 0,children:n.map(Z=>{const Q=Ht(C,Z.key),de=Z.align??"left",ie=[fe.td,fe[`align-${de}`],Z.cellClassName].filter(Boolean).join(" ");return e.jsx("td",{className:ie,"data-label":typeof Z.header=="string"?Z.header:Z.key,children:Z.render?Z.render(Q,C,K):Q==null?"":String(Q)},Z.key)})},u_(C,K,g))});return e.jsx("div",{className:X,children:e.jsx("div",{className:fe.scroll,children:e.jsxs("table",{className:fe.table,children:[T&&e.jsx("caption",{className:fe.caption,children:T}),e.jsx("thead",{className:fe.thead,children:e.jsx("tr",{children:n.map(S)})}),e.jsx("tbody",{className:fe.tbody,children:re()})]})})})},__="_root_1wpat_1",f_="_fullWidth_1wpat_11",m_="_label_1wpat_15",v_="_stage_1wpat_21",x_="_disabled_1wpat_38",g_="_bgChecker_1wpat_43",b_="_imageWrap_1wpat_49",y_="_image_1wpat_49",w_="_overlay_1wpat_68",j_="_overlayCircle_1wpat_77",k_="_circleMask_1wpat_82",N_="_grid_1wpat_89",E_="_gridLine_1wpat_95",T_="_h_1wpat_99",I_="_v_1wpat_104",$_="_handle_1wpat_110",C_="_handleTL_1wpat_128",M_="_handleTR_1wpat_134",L_="_handleBL_1wpat_140",D_="_handleBR_1wpat_146",B_="_handleT_1wpat_128",S_="_handleB_1wpat_140",R_="_handleL_1wpat_166",A_="_handleR_1wpat_166",z_="_controls_1wpat_200",P_="_controlGroup_1wpat_211",O_="_controlLabel_1wpat_218",W_="_iconBtn_1wpat_227",H_="_zoomSlider_1wpat_260",F_="_ratioRow_1wpat_294",q_="_ratioChip_1wpat_300",G_="_active_1wpat_318",V_="_divider_1wpat_333",U_="_helper_1wpat_339",K_="_placeholder_1wpat_344",Q_="_spinner_1wpat_356",H={root:__,fullWidth:f_,label:m_,stage:v_,disabled:x_,bgChecker:g_,imageWrap:b_,image:y_,overlay:w_,overlayCircle:j_,circleMask:k_,grid:N_,gridLine:E_,h:T_,v:I_,handle:$_,handleTL:C_,handleTR:M_,handleBL:L_,handleBR:D_,handleT:B_,handleB:S_,handleL:R_,handleR:A_,controls:z_,controlGroup:P_,controlLabel:O_,iconBtn:W_,zoomSlider:H_,ratioRow:F_,ratioChip:q_,active:G_,divider:V_,helper:U_,placeholder:K_,spinner:Q_},Y_=[{label:"Free",value:null},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"3:4",value:3/4},{label:"16:9",value:16/9},{label:"9:16",value:9/16}],Dt=24,Fe=(n,t,s)=>Math.min(s,Math.max(t,n)),_t=n=>(Math.round(n/90)*90%360+360)%360,X_=r.forwardRef(function({src:t,aspectRatio:s,circular:o=!1,showGrid:a=!0,showControls:i=!0,ratioPresets:c,minZoom:l=1,maxZoom:p=4,defaultZoom:g=1,defaultRotation:b=0,defaultCrop:_,height:y=360,background:I="checker",label:j,helperText:B,onChange:T,onReady:R,onError:O,disabled:q=!1,fullWidth:oe=!0,className:w,ariaLabel:D},M){const $=o?1:s,te=r.useRef(null),W=r.useRef(null),[v,X]=r.useState({w:0,h:0}),[S,re]=r.useState(null),[C,K]=r.useState(!1),[A,Z]=r.useState(!1),[Q,de]=r.useState(g),[ie,se]=r.useState(_t(b)),[J,ve]=r.useState({x:0,y:0}),[Te,ye]=r.useState({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80}),[le,Be]=r.useState($??null);r.useEffect(()=>{Be($??null)},[$]),r.useLayoutEffect(()=>{const f=te.current;if(!f)return;const L=()=>{const Y=f.getBoundingClientRect();X({w:Y.width,h:Y.height})};L();const F=new ResizeObserver(L);return F.observe(f),()=>F.disconnect()},[]),r.useEffect(()=>{if(K(!1),Z(!1),re(null),!t)return;const f=new Image;return f.crossOrigin="anonymous",f.onload=()=>{re({w:f.naturalWidth,h:f.naturalHeight}),K(!0),R==null||R({naturalWidth:f.naturalWidth,naturalHeight:f.naturalHeight})},f.onerror=()=>{Z(!0),O==null||O(new Error(`Failed to load image: ${t}`))},f.src=t,()=>{f.onload=null,f.onerror=null}},[t]);const we=r.useMemo(()=>{if(!S||!v.w||!v.h)return 1;const f=ie===90||ie===270,L=f?S.h:S.w,F=f?S.w:S.h;return Math.min(v.w/L,v.h/F)},[S,v.w,v.h,ie]),xe=r.useMemo(()=>{if(!S)return{w:0,h:0};const f=we*Q;return{w:S.w*f,h:S.h*f}},[S,we,Q]),ce=r.useMemo(()=>({left:Te.left/100*v.w,top:Te.top/100*v.h,width:Te.width/100*v.w,height:Te.height/100*v.h}),[Te,v]),ge=r.useCallback(()=>{if(!S||!v.w||!v.h)return null;const f=we*Q,L=v.w/2+J.x,F=v.h/2+J.y,Y=ce.left+ce.width/2,h=ce.top+ce.height/2,d=Y-L,x=h-F,k=-ie*Math.PI/180,z=d*Math.cos(k)-x*Math.sin(k),ee=d*Math.sin(k)+x*Math.cos(k),_e=ie===90||ie===270,Se=_e?ce.height:ce.width,ke=_e?ce.width:ce.height,Ie=(z-Se/2)/f+S.w/2,$e=(ee-ke/2)/f+S.h/2,Re=Se/f,Oe=ke/f;return{x:Ie,y:$e,width:Re,height:Oe,rotation:ie,sourceWidth:S.w,sourceHeight:S.h}},[S,v,we,Q,J,ce,ie]),We=r.useRef("");r.useEffect(()=>{if(!C)return;const f=ge();if(!f)return;const L=`${f.x.toFixed(2)},${f.y.toFixed(2)},${f.width.toFixed(2)},${f.height.toFixed(2)},${f.rotation}`;L!==We.current&&(We.current=L,T==null||T(f))},[C,ge,T]),r.useEffect(()=>{le==null||!v.w||!v.h||ye(f=>{const L=f.width/100*v.w,F=f.height/100*v.h,Y=L/le;let h=L,d=Y;Y>F&&(d=F,h=F*le);const x=(f.left+f.width/2)/100*v.w,k=(f.top+f.height/2)/100*v.h;let z=x-h/2,ee=k-d/2;return z=Fe(z,0,v.w-h),ee=Fe(ee,0,v.h-d),{left:z/v.w*100,top:ee/v.h*100,width:h/v.w*100,height:d/v.h*100}})},[le,v.w,v.h]);const je=r.useRef(null),Ne=r.useRef(null),m=r.useRef(new Map),u=f=>{var L,F;if(!(q||!C)){if((F=(L=f.target).setPointerCapture)==null||F.call(L,f.pointerId),m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),m.current.size===2){const Y=Array.from(m.current.values()),h=Math.hypot(Y[0].x-Y[1].x,Y[0].y-Y[1].y);Ne.current={startDist:h,startZoom:Q},je.current=null;return}je.current={type:"pan",startX:f.clientX,startY:f.clientY,startPan:J}}},N=f=>{if(!m.current.has(f.pointerId))return;if(m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),Ne.current&&m.current.size>=2){const h=Array.from(m.current.values()),d=Math.hypot(h[0].x-h[1].x,h[0].y-h[1].y),x=Fe(Ne.current.startZoom*(d/Ne.current.startDist),l,p);de(x);return}const L=je.current;if(!L)return;const F=f.clientX-L.startX,Y=f.clientY-L.startY;L.type==="pan"?ve({x:L.startPan.x+F,y:L.startPan.y+Y}):L.type==="move"?be(F,Y,L.startCrop):L.type==="resize"&&ue(L.corner,F,Y,L.startCrop)},E=f=>{m.current.delete(f.pointerId),m.current.size<2&&(Ne.current=null),m.current.size===0&&(je.current=null)},V=f=>{if(q||!C)return;f.preventDefault();const L=-f.deltaY*.0015;de(F=>Fe(F*(1+L),l,p))},be=(f,L,F)=>{const Y=v.w,h=v.h,d=F.left/100*Y,x=F.top/100*h,k=F.width/100*Y,z=F.height/100*h,ee=Fe(d+f,0,Y-k),_e=Fe(x+L,0,h-z);ye({left:ee/Y*100,top:_e/h*100,width:F.width,height:F.height})},ue=(f,L,F,Y)=>{const h=v.w,d=v.h;let x=Y.left/100*h,k=Y.top/100*d,z=Y.width/100*h,ee=Y.height/100*d;const _e=x+z,Se=k+ee;let ke=x,Ie=k,$e=_e,Re=Se;f.includes("l")&&(ke=Fe(x+L,0,_e-Dt)),f.includes("r")&&($e=Fe(_e+L,x+Dt,h)),f.includes("t")&&(Ie=Fe(k+F,0,Se-Dt)),f.includes("b")&&(Re=Fe(Se+F,k+Dt,d));let Oe=$e-ke,qe=Re-Ie;if(le!=null){if(f.length===2){const Ae=Oe,st=Oe/le;st<=qe||f==="tl"||f==="tr"||f==="bl"||f==="br"?qe=Ae/le:Oe=st*le,f.includes("t")&&(Ie=Re-qe),f.includes("b")&&(Re=Ie+qe),f.includes("l")&&(ke=$e-Oe),f.includes("r")&&($e=ke+Oe)}else if(f==="l"||f==="r"){qe=Oe/le;const Ae=(k+Se)/2;Ie=Ae-qe/2,Re=Ae+qe/2}else if(f==="t"||f==="b"){Oe=qe*le;const Ae=(x+_e)/2;ke=Ae-Oe/2,$e=Ae+Oe/2}if(ke<0&&($e+=-ke,ke=0),Ie<0&&(Re+=-Ie,Ie=0),$e>h){const Ae=$e-h;$e=h,ke-=Ae}if(Re>d){const Ae=Re-d;Re=d,Ie-=Ae}if(Oe=$e-ke,qe=Re-Ie,Math.abs(Oe/qe-le)>.001)if(Oe/qe>le){const Ae=qe*le,st=(ke+$e)/2;ke=st-Ae/2,$e=st+Ae/2}else{const Ae=Oe/le,st=(Ie+Re)/2;Ie=st-Ae/2,Re=st+Ae/2}}ye({left:ke/h*100,top:Ie/d*100,width:($e-ke)/h*100,height:(Re-Ie)/d*100})},Pe=f=>{var L,F;q||!C||(f.stopPropagation(),(F=(L=f.target).setPointerCapture)==null||F.call(L,f.pointerId),m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),je.current={type:"move",startX:f.clientX,startY:f.clientY,startCrop:{...Te}})},ze=f=>L=>{var F,Y;q||!C||(L.stopPropagation(),(Y=(F=L.target).setPointerCapture)==null||Y.call(F,L.pointerId),m.current.set(L.pointerId,{x:L.clientX,y:L.clientY}),je.current={type:"resize",corner:f,startX:L.clientX,startY:L.clientY,startCrop:{...Te}})},He=r.useCallback(f=>{const L=ge();if(!L||!W.current)return null;let F=Math.max(1,Math.round(L.width)),Y=Math.max(1,Math.round(L.height));const{maxWidth:h,maxHeight:d}=f??{};if(h&&F>h){const ee=h/F;F=h,Y=Math.round(Y*ee)}if(d&&Y>d){const ee=d/Y;Y=d,F=Math.round(F*ee)}const x=document.createElement("canvas");x.width=F,x.height=Y;const k=x.getContext("2d");if(!k)return null;k.imageSmoothingQuality="high";const z=W.current;if(k.save(),L.rotation===0)k.drawImage(z,L.x,L.y,L.width,L.height,0,0,F,Y);else{k.translate(F/2,Y/2),k.rotate(L.rotation*Math.PI/180);const ee=L.rotation===90||L.rotation===270,_e=ee?Y:F,Se=ee?F:Y,ke=ee?L.height:L.width,Ie=ee?L.width:L.height;k.drawImage(z,L.x,L.y,ke,Ie,-_e/2,-Se/2,_e,Se)}return k.restore(),o&&(k.globalCompositeOperation="destination-in",k.beginPath(),k.arc(F/2,Y/2,Math.min(F,Y)/2,0,Math.PI*2),k.closePath(),k.fill()),x},[ge,o]);r.useImperativeHandle(M,()=>({getCrop:()=>ge(),getCroppedCanvas:f=>He(f),getCroppedBlob:f=>new Promise((L,F)=>{const Y=He(f);if(!Y)return F(new Error("Cropper not ready"));Y.toBlob(h=>h?L(h):F(new Error("Canvas export failed")),(f==null?void 0:f.type)??"image/png",(f==null?void 0:f.quality)??.92)}),getCroppedDataURL:async f=>{const L=He(f);if(!L)throw new Error("Cropper not ready");return L.toDataURL((f==null?void 0:f.type)??"image/png",(f==null?void 0:f.quality)??.92)},reset:()=>{de(g),se(_t(b)),ve({x:0,y:0}),ye({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80})},rotate:f=>{se(f===void 0?L=>_t(L+90):_t(f))},setZoom:f=>de(Fe(f,l,p))}),[ge,He,g,b,_,l,p]);const Le={height:typeof y=="number"?`${y}px`:y},Qe=S?{width:xe.w,height:xe.h,transform:`translate(${J.x}px, ${J.y}px) rotate(${ie}deg)`}:{display:"none"},Ze={left:ce.left,top:ce.top,width:ce.width,height:ce.height},nt=o?{"--mask-cx":`${ce.left+ce.width/2}px`,"--mask-cy":`${ce.top+ce.height/2}px`,"--mask-r":`${Math.min(ce.width,ce.height)/2}px`}:{},Ye=[H.stage,I==="checker"?H.bgChecker:"",q?H.disabled:""].filter(Boolean).join(" "),ct=[H.root,oe?H.fullWidth:"",w??""].filter(Boolean).join(" "),dt=c??Y_,kt=i&&!o&&dt.length>0;return e.jsxs("div",{className:ct,children:[j&&e.jsx("div",{className:H.label,children:j}),kt&&e.jsx("div",{className:H.ratioRow,role:"radiogroup","aria-label":"Aspect ratio",children:dt.map(f=>e.jsx("button",{type:"button",role:"radio","aria-checked":le===f.value,className:`${H.ratioChip} ${le===f.value?H.active:""}`,disabled:q,onClick:()=>Be(f.value),children:f.label},f.label))}),e.jsxs("div",{ref:te,className:Ye,style:Le,role:"application","aria-label":D??"Image cropper","aria-disabled":q,onPointerDown:u,onPointerMove:N,onPointerUp:E,onPointerCancel:E,onWheel:V,children:[!C&&!A&&e.jsxs("div",{className:H.placeholder,children:[e.jsx("div",{className:H.spinner,"aria-hidden":!0}),e.jsx("div",{children:"Loading image…"})]}),A&&e.jsx("div",{className:H.placeholder,children:e.jsx("div",{children:"Couldn't load image."})}),e.jsx("div",{className:H.imageWrap,children:e.jsx("img",{ref:W,src:t,alt:"",draggable:!1,className:H.image,style:Qe})}),C&&e.jsxs(e.Fragment,{children:[o&&e.jsx("div",{className:H.circleMask,style:nt}),e.jsxs("div",{className:`${H.overlay} ${o?H.overlayCircle:""}`,style:Ze,onPointerDown:Pe,onPointerMove:N,onPointerUp:E,onPointerCancel:E,children:[a&&!o&&e.jsxs("div",{className:H.grid,"aria-hidden":!0,children:[e.jsx("div",{className:`${H.gridLine} ${H.h}`,style:{top:"33.33%"}}),e.jsx("div",{className:`${H.gridLine} ${H.h}`,style:{top:"66.66%"}}),e.jsx("div",{className:`${H.gridLine} ${H.v}`,style:{left:"33.33%"}}),e.jsx("div",{className:`${H.gridLine} ${H.v}`,style:{left:"66.66%"}})]}),e.jsx("div",{className:`${H.handle} ${H.handleTL}`,onPointerDown:ze("tl")}),e.jsx("div",{className:`${H.handle} ${H.handleTR}`,onPointerDown:ze("tr")}),e.jsx("div",{className:`${H.handle} ${H.handleBL}`,onPointerDown:ze("bl")}),e.jsx("div",{className:`${H.handle} ${H.handleBR}`,onPointerDown:ze("br")}),e.jsx("div",{className:`${H.handle} ${H.handleT}`,onPointerDown:ze("t")}),e.jsx("div",{className:`${H.handle} ${H.handleB}`,onPointerDown:ze("b")}),e.jsx("div",{className:`${H.handle} ${H.handleL}`,onPointerDown:ze("l")}),e.jsx("div",{className:`${H.handle} ${H.handleR}`,onPointerDown:ze("r")})]})]})]}),i&&e.jsxs("div",{className:H.controls,"aria-label":"Cropper controls",children:[e.jsxs("div",{className:H.controlGroup,children:[e.jsx("span",{className:H.controlLabel,children:"Zoom"}),e.jsx("button",{type:"button",className:H.iconBtn,"aria-label":"Zoom out",disabled:q||Q<=l,onClick:()=>de(f=>Fe(f-.1,l,p)),children:e.jsx(Z_,{})}),e.jsx("input",{type:"range",className:H.zoomSlider,min:l,max:p,step:.01,value:Q,disabled:q,onChange:f=>de(parseFloat(f.target.value)),"aria-label":"Zoom level"}),e.jsx("button",{type:"button",className:H.iconBtn,"aria-label":"Zoom in",disabled:q||Q>=p,onClick:()=>de(f=>Fe(f+.1,l,p)),children:e.jsx(J_,{})})]}),e.jsx("div",{className:H.divider,"aria-hidden":!0}),e.jsxs("div",{className:H.controlGroup,children:[e.jsx("span",{className:H.controlLabel,children:"Rotate"}),e.jsx("button",{type:"button",className:H.iconBtn,"aria-label":"Rotate left",disabled:q,onClick:()=>se(f=>_t(f-90)),children:e.jsx(ef,{})}),e.jsx("button",{type:"button",className:H.iconBtn,"aria-label":"Rotate right",disabled:q,onClick:()=>se(f=>_t(f+90)),children:e.jsx(tf,{})})]}),e.jsx("div",{className:H.divider,"aria-hidden":!0}),e.jsx("div",{className:H.controlGroup,children:e.jsx("button",{type:"button",className:H.iconBtn,"aria-label":"Reset",disabled:q,onClick:()=>{de(g),se(_t(b)),ve({x:0,y:0}),ye({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80})},children:e.jsx(nf,{})})})]}),B&&e.jsx("div",{className:H.helper,children:B})]})}),It={width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},J_=()=>e.jsxs("svg",{...It,children:[e.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),Z_=()=>e.jsx("svg",{...It,children:e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),ef=()=>e.jsxs("svg",{...It,children:[e.jsx("polyline",{points:"1 4 1 10 7 10"}),e.jsx("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]}),tf=()=>e.jsxs("svg",{...It,children:[e.jsx("polyline",{points:"23 4 23 10 17 10"}),e.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.13-9.36L23 10"})]}),nf=()=>e.jsxs("svg",{...It,children:[e.jsx("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.jsx("polyline",{points:"3 3 3 8 8 8"})]});exports.EvoAlert=xp;exports.EvoAutoComplete=Kn;exports.EvoBadge=ss;exports.EvoBreadcrumb=Ln;exports.EvoButton=Rs;exports.EvoCard=lt;exports.EvoCardBody=Ut;exports.EvoCardDescription=Yt;exports.EvoCardFooter=Kt;exports.EvoCardHeader=Vt;exports.EvoCardMedia=Xt;exports.EvoCardRoot=Bt;exports.EvoCardTitle=Qt;exports.EvoCheckbox=Qn;exports.EvoCommandPalette=ma;exports.EvoContainer=fo;exports.EvoDivider=ao;exports.EvoForm=jt;exports.EvoGrid=$n;exports.EvoImageCropper=X_;exports.EvoInput=Ca;exports.EvoModal=Rt;exports.EvoNav=pr;exports.EvoNavGroup=nn;exports.EvoNavItem=en;exports.EvoNavQuickAction=sn;exports.EvoNavSkeleton=Sn;exports.EvoNavSubItem=tn;exports.EvoNotification=Xh;exports.EvoNotificationBell=cn;exports.EvoNotificationItem=zt;exports.EvoNotificationPanel=At;exports.EvoNotificationProvider=an;exports.EvoNotificationToaster=ln;exports.EvoPagination=Qr;exports.EvoRadio=Xn;exports.EvoRichTextArea=oi;exports.EvoSelect=nl;exports.EvoSkeleton=dn;exports.EvoStack=Js;exports.EvoTable=p_;exports.EvoTabs=St;exports.EvoThemeProvider=os;exports.EvoThemeToggle=_s;exports.EvoToggle=Dd;exports.EvoTooltip=ap;exports.EvoTopNav=tt;exports.EvoTreeSelect=dc;exports.evoLocalRecents=ed;exports.evoNotify=Fh;exports.getEvoThemeScript=rs;exports.useEvoInbox=Yh;exports.useEvoTheme=In;exports.useFormContext=_u;
|