@npm-questionpro/wick-ui-lib 1.29.0 → 1.29.2

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.
@@ -1,21 +1,21 @@
1
- (function(E,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("@radix-ui/react-avatar"),require("react"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-accordion"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("@radix-ui/react-label"),require("react-day-picker"),require("@radix-ui/react-checkbox"),require("cmdk"),require("@radix-ui/react-popover"),require("@radix-ui/react-tooltip"),require("react-virtuoso"),require("@radix-ui/react-dropdown-menu"),require("@tanstack/react-table"),require("date-fns"),require("@radix-ui/react-dialog"),require("@radix-ui/react-scroll-area"),require("@radix-ui/react-radio-group"),require("@radix-ui/react-separator"),require("react-dom"),require("@radix-ui/react-toggle-group"),require("@radix-ui/react-toggle"),require("@radix-ui/react-tabs"),require("@radix-ui/react-toast"),require("@radix-ui/react-switch")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@radix-ui/react-avatar","react","clsx","tailwind-merge","@radix-ui/react-accordion","@radix-ui/react-slot","class-variance-authority","@radix-ui/react-label","react-day-picker","@radix-ui/react-checkbox","cmdk","@radix-ui/react-popover","@radix-ui/react-tooltip","react-virtuoso","@radix-ui/react-dropdown-menu","@tanstack/react-table","date-fns","@radix-ui/react-dialog","@radix-ui/react-scroll-area","@radix-ui/react-radio-group","@radix-ui/react-separator","react-dom","@radix-ui/react-toggle-group","@radix-ui/react-toggle","@radix-ui/react-tabs","@radix-ui/react-toast","@radix-ui/react-switch"],a):(E=typeof globalThis<"u"?globalThis:E||self,a(E["wick-ui-lib"]={},E["react/jsx-runtime"],E.RadixUIAvatar,E.React,E.clsx,E.tailwindMerge,E.RadixUIAccordion,E.RadixUISlot,E.ClassVarianceAuthority,E.RadixUILabel,E.ReactDayPicker,E.RadixUICheckbox,E.cmdk,E.RadixUIPopover,E.RadixUITooltip,E.ReactVirtuoso,E.RadixUIDropdownMenu,E.TanstackReactTable,E.dateFns,E.RadixUIDialog,E.RadixUIScrollArea,E.RadixUIRadioGroup,E.RadixUISeparator,E.ReactDOM,E.RadixUIToggleGroup,E.RadixUIToggle,E.RadixUITabs,E.RadixUIToast,E.RadixUISwitch))})(this,(function(E,a,bt,h,Uc,jc,Gc,yt,_e,Kc,Ia,Yc,xe,Lt,bs,Xc,Zc,qe,Y,Da,Jc,Qc,Rc,ed,td,nd,sd,rd,ad){"use strict";var Ly=Object.defineProperty;var Wy=(E,a,bt)=>a in E?Ly(E,a,{enumerable:!0,configurable:!0,writable:!0,value:bt}):E[a]=bt;var Ne=(E,a,bt)=>Wy(E,typeof a!="symbol"?a+"":a,bt);var qc;function fe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const xt=fe(bt),y=fe(h),at=fe(Gc),Aa=fe(Kc),ys=fe(Yc),Wt=fe(Lt),Bt=fe(bs),ee=fe(Zc),R=fe(Da),ot=fe(Jc),qt=fe(Qc),ka=fe(Rc),Pa=fe(ed),Sn=fe(td),_a=fe(nd),it=fe(sd),Se=fe(rd),xs=fe(ad),od=jc.extendTailwindMerge({prefix:"wu-"});function p(...e){return od(Uc.clsx(e))}const vs=e=>{window.open(e,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600")};function Cn(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function zt(e){switch(e){case"top":return"wu-flex-col-reverse";case"left":return"wu-flex-row-reverse wu-gap-2";case"right":return"wu-flex-row wu-gap-2";default:return""}}const id=e=>e?/\S+@questionpro\.com/.test(e):!1,Va=at.Root,Ns=y.forwardRef(({className:e,...t},n)=>a.jsx(at.Item,{ref:n,className:p("wu-border-b",e),...t}));Ns.displayName="AccordionItem";const Ss=y.forwardRef(({className:e,children:t,...n},s)=>a.jsx(at.Header,{className:"wu-flex",children:a.jsxs(at.Trigger,{ref:s,className:p("wu-flex wu-flex-1 wu-text-xs wu-items-center wu-justify-between wu-p-2 wu-transition-all","[&[data-state=open]>.wu-arrow-icon]:wu-rotate-180",e),...n,children:[t,a.jsx("span",{className:"wu-arrow-icon wm-keyboard-arrow-down wu-transition-transform wu-duration-200"})]})}));Ss.displayName=at.Trigger.displayName;const Cs=y.forwardRef(({className:e,children:t,...n},s)=>a.jsx(at.Content,{ref:s,className:"wu-overflow-hidden wu-text-xs wu-px-2 wu-font-light wu-transition-all data-[state=closed]:wu-animate-accordion-up data-[state=open]:wu-animate-accordion-down",...n,children:a.jsx("div",{className:p("wu-pb-4 wu-pt-0",e),children:t})}));Cs.displayName=at.Content.displayName;const ud=e=>{const{items:t,className:n,dir:s="ltr"}=e;if(e.type==="multiple"){const{defaultValue:r=[],value:o,onValueChange:i}=e;return a.jsx(Va,{type:"multiple",className:"wu-w-full wu-accordion-container",defaultValue:r,value:o,onValueChange:i,dir:s,children:t.map(({value:u,Summary:l,Details:d,className:c})=>a.jsxs(Ns,{value:u,dir:s,className:p(n,c),children:[a.jsx(Ss,{dir:s,className:"wu-accordion-summary",children:l}),a.jsx(Cs,{dir:s,className:"wu-accordion-details",children:d})]},u))})}else{const{defaultValue:r,value:o,onValueChange:i}=e;return a.jsx(Va,{type:"single",className:"wu-w-full wu-accordion-container",defaultValue:r,value:o,onValueChange:i,dir:s,collapsible:!0,children:t.map(({value:u,Summary:l,Details:d,className:c})=>a.jsxs(Ns,{value:u,dir:s,className:p(n,c),children:[a.jsx(Ss,{dir:s,className:"wu-accordion-summary",children:l}),a.jsx(Cs,{dir:s,className:"wu-accordion-details",children:d})]},u))})}},Ts=y.forwardRef(({className:e,...t},n)=>a.jsx(xt.Root,{ref:n,className:p("wu-relative wu-flex wu-h-10 wu-w-10 wu-shrink-0 wu-overflow-hidden wu-rounded-full",e),...t}));Ts.displayName=xt.Root.displayName;const Es=y.forwardRef(({className:e,...t},n)=>a.jsx(xt.Image,{ref:n,className:p("wu-aspect-square wu-h-full wu-w-full",e),...t}));Es.displayName=xt.Image.displayName;const Ms=y.forwardRef(({className:e,...t},n)=>a.jsx(xt.Fallback,{ref:n,className:p("wu-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-rounded-full wu-bg-muted",e),...t}));Ms.displayName=xt.Fallback.displayName;const ce={timelineContainer:"_timelineContainer_1rtax_1",mainVerticalLine:"_mainVerticalLine_1rtax_5",dateGroup:"_dateGroup_1rtax_9",dateHeader:"_dateHeader_1rtax_13",dateDot:"_dateDot_1rtax_17",dateText:"_dateText_1rtax_21",logList:"_logList_1rtax_25",logItem:"_logItem_1rtax_29",timelineDotSmall:"_timelineDotSmall_1rtax_33",content:"_content_1rtax_37",time:"_time_1rtax_1",tags:"_tags_1rtax_45",tag:"_tag_1rtax_45",tagPrimary:"_tagPrimary_1rtax_53",tagSecondary:"_tagSecondary_1rtax_57",userActionRow:"_userActionRow_1rtax_61",avatar:"_avatar_1rtax_65",actionText:"_actionText_1rtax_69",userName:"_userName_1rtax_73"},Ye=(e,t)=>t.includes(".")?t.split(".").reduce((n,s)=>n==null?void 0:n[s],e):e==null?void 0:e[t],ld=({log:e,accessorKey:t})=>{const n=Ye(e,t.time),s=Ye(e,t.userName),r=Ye(e,t.userInitials),o=Ye(e,t.userImage??""),i=Ye(e,t.tags??""),u=Ye(e,t.description);return a.jsxs("div",{className:ce.logItem,"data-slot":"log-item",children:[a.jsx("div",{className:ce.timelineDotSmall,"data-slot":"timeline-dot-small"}),a.jsxs("div",{className:ce.content,"data-slot":"content",children:[a.jsx("div",{className:ce.time,"data-slot":"time",children:n}),(i==null?void 0:i.length)>0&&a.jsx("div",{className:ce.tags,"data-slot":"tags",children:i.map((l,d)=>a.jsx("span",{className:p(ce.tag,d===0?ce.tagPrimary:ce.tagSecondary),"data-slot":"tag",children:l},l))}),a.jsxs("div",{className:ce.userActionRow,"data-slot":"user-action-row",children:[a.jsxs(Ts,{className:ce.avatar,"data-slot":"avatar",children:[a.jsx(Es,{src:o,alt:s,"data-slot":"log-user-avatar-image"}),a.jsx(Ms,{className:"wu-text-[10px] wu-bg-slate-400 wu-text-white","data-slot":"log-user-avatar-fallback",children:r})]}),a.jsxs("p",{className:ce.actionText,"data-slot":"action-text",children:[a.jsx("span",{className:ce.userName,"data-slot":"log-username",children:s})," ",u]})]})]})]})},cd=h.memo(ld),dd=({logs:e,accessorKey:t,className:n,...s})=>{const r=h.useMemo(()=>e.reduce((o,i)=>{const u=Ye(i,t.date);return u&&(o[u]=o[u]||[],o[u].push(i)),o},{}),[e,t.date]);return a.jsxs("div",{className:p(ce.timelineContainer,n),"data-slot":"timeline-container",...s,children:[a.jsx("div",{className:ce.mainVerticalLine,"data-slot":"main-vertical-line"}),Object.entries(r).map(([o,i])=>a.jsxs("div",{className:ce.dateGroup,"data-slot":"date-group",children:[a.jsxs("div",{className:ce.dateHeader,"data-slot":"date-header",children:[a.jsx("div",{className:ce.dateDot,"data-slot":"date-dot"}),a.jsx("span",{className:ce.dateText,"data-slot":"date-text",children:o})]}),a.jsx("div",{className:ce.logList,"data-slot":"log-list",children:i.map(u=>{const l=Ye(u,t.id);return a.jsx(cd,{log:u,accessorKey:t},l)})})]},o))]})};function Is(e,t){h.useEffect(()=>{const n=s=>{Array.isArray(e)&&e.some(r=>!r.current||r.current.contains(s.target))||!Array.isArray(e)&&(!e.current||e.current.contains(s.target))||t(s)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])}const Ds={dropdownContainer:"_dropdownContainer_vvlo9_1",open:"_open_vvlo9_1",dropdownMenu:"_dropdownMenu_vvlo9_1"},Oa=({dir:e,Trigger:t,triggerClassName:n,DropdownContent:s,isAllowActiveStyle:r})=>{const[o,i]=h.useState(!1),u=h.useRef(null),l=h.useRef(null);Is([u,l],()=>i(!1));const d=()=>{i(!o)};return a.jsx(a.Fragment,{children:a.jsx("div",{className:Ds.dropdownContainer,children:a.jsx("ul",{children:a.jsxs("li",{className:p("wu-flex wu-relative",o&&Ds.open),children:[a.jsx("button",{className:p("wu-w-8 wu-h-8 wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher",n,r&&o&&"wu-bg-white wu-text-blue-switcher"),onClick:c=>{c.preventDefault(),d()},ref:l,"aria-label":"dropdown-trigger",children:t}),a.jsx("div",{className:p(Ds.dropdownMenu,{open:o},e==="rtl"?"wu-left-[-10px] wu-top-[38px]":"wu-right-[-7px] wu-top-[38px]"),dir:e,ref:u,"aria-label":"user-menu",children:s})]})})})})},As=_e.cva(["wu-inline-flex wu-items-center wu-justify-center wu-rounded","wu-whitespace-nowrap wu-text-sm wu-leading-normal wu-font-normal","wu-transition-colors wu-duration-300","focus:wu-outline-none focus-visible:wu-outline-2 focus-visible:wu-outline-offset-2","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle"],{variants:{size:{md:["wu-p-2 wu-h-8 wu-min-w-[104px]","wu-text-sm wu-leading-normal"],sm:["wu-p-1 wu-h-6 wu-min-w-[90px]","wu-text-xs"],mobile:["wu-p-4 wu-h-10 wu-min-w-[104px] wu-rounded-lg","wu-text-base"]},color:{primary:["wu-bg-blue-p hover:wu-bg-blue-pHoverDeep","wu-text-blue-p hover:wu-text-blue-q","wu-ring-1 wu-ring-blue-p hover:wu-ring-blue-pHoverDeep","focus-visible:wu-outline-blue-p/50"],upgrade:["wu-bg-orange-soft hover:wu-bg-orange-deep","wu-text-orange-deep hover:wu-text-orange-deep","wu-ring-1 wu-ring-orange-soft hover:wu-ring-orange-deep","focus-visible:wu-outline-orange-deep/50"],error:["wu-bg-red-deep hover:wu-bg-red-soft","wu-text-red-deep hover:wu-text-red-deep","wu-ring-1 wu-ring-red-deep hover:wu-ring-red-soft","focus-visible:wu-outline-red-deep/50"]},variant:{primary:["wu-text-white hover:wu-text-white","wu-ring-0"],secondary:["wu-bg-transparent hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-ring-0"],outline:["wu-bg-white hover:wu-text-white","disabled:wu-bg-transparent disabled:wu-ring-gray-subtle"],rounded:["wu-text-white hover:wu-text-white","wu-ring-0 wu-rounded-full"],link:["wu-bg-transparent hover:wu-bg-transparent","disabled:wu-bg-transparent","hover:wu-underline wu-underline-offset-2","wu-min-w-[auto] wu-px-2","wu-ring-0","focus-visible:wu-outline-offset-0"],iconOnly:["wu-aspect-square","wu-p-2 wu-h-8 wu-w-8 wu-min-w-[auto]","wu-text-xl wu-leading-5","wu-bg-transparent wu-text-gray-lead","hover:wu-bg-black hover:wu-bg-opacity-[0.04]","focus-visible:wu-bg-black focus-visible:wu-bg-opacity-[0.04]","wu-ring-0","disabled:wu-grayscale disabled:wu-opacity-80"]}},defaultVariants:{variant:"primary",size:"md",color:"primary"},compoundVariants:[]}),vt=y.forwardRef(({className:e,variant:t,size:n,color:s,asChild:r=!1,...o},i)=>{const u=r?yt.Slot:"button";return a.jsx(u,{className:p(As({size:n,color:s,variant:t,className:e})),ref:i,...o})});vt.displayName="Button";const Nt=h.forwardRef((e,t)=>wd(e,t)),wd=(e,t)=>{const{size:n="md",color:s="#1B87E6",variant:r="dots",...o}=e,i=p("wu-w-[4em] wu-h-[1em] wu-inline-block wu-text-xs wu-relative wu-loader-dot-container");let u="7px";n==="sm"?u="7px":n==="md"?u="12px":n==="lg"?u="18px":typeof n=="string"&&(u=n);const l={backgroundColor:s,width:u,height:u},d=a.jsxs("div",{...o,ref:t,className:p("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"status","aria-busy":"true",children:[a.jsx("div",{className:"wu-w-12 wu-h-12 wu-border-2 wu-rounded-full wu-animate-spin",style:{width:u,height:u,borderTopColor:s}}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]}),c=a.jsxs("div",{...o,ref:t,className:p("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"alert","aria-busy":"true",children:[a.jsxs("ul",{className:i,style:{fontSize:u},role:"loader",children:[a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l})]}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]});return a.jsx(a.Fragment,{children:r==="spinner"?d:c})};Nt.displayName="WuLoader";const Ce=h.forwardRef(({disabled:e,loading:t,variant:n="primary",size:s="md",Icon:r,iconPosition:o="left",children:i,floating:u,className:l,color:d="primary",selected:c,...w},f)=>{const m={primary:"#1986e688",upgrade:"#F5A300",error:"#ef444488"};return a.jsxs(vt,{...w,disabled:e,variant:n,size:s,className:p(u&&"wu-shadow-qp","wu-flex wu-items-center wu-justify-center wu-gap-2",o==="right"&&"wu-flex-row-reverse",t?"wu-cursor-not-allowed wu-ring-0":"",c&&"wu-bg-blue-p wu-bg-opacity-15 wu-text-blue-pHoverDeep wu-ring-0",d==="error"&&"hover:wu-text-maroon",l),color:d,style:{backgroundColor:t?m[d]:"",...w.style},ref:f,children:[!t&&r&&a.jsx(a.Fragment,{children:r}),t&&a.jsx(Nt,{color:"#fff",size:"sm"}),!t&&i]})});Ce.displayName="WuButton";const fd=({onLogout:e,DataCenter:t})=>a.jsxs("section",{className:"wu-flex wu-justify-between wu-px-4 wu-py-4 wu-text-white wu-bg-gray-lead",children:[a.jsx("div",{className:"wu-flex-1 wu-flex wu-items-start",children:t}),a.jsx(Ce,{variant:"outline",size:"sm",Icon:a.jsx("span",{className:"wm-logout"}),className:"wu-text-white wu-bg-transparent wu-ring-white hover:wu-bg-gray-10 hover:wu-text-gray-lead hover:wu-ring-gray-lead",onClick:e,"aria-label":"logout",children:"LOGOUT"})]}),pd=({user:e,dir:t})=>{const n=[e!=null&&e.usage&&Object.keys(e.usage).length>0?{title:e.usage.title,url:e.usage.url,icon:"wm-bar-chart wu-text-base",node:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-center wu-w-20",children:[a.jsx("code",{className:"wu-font-medium",children:e.usage.collectedResponseCount||"0"}),a.jsx("span",{className:"wu-text-xs wu-font-normal",children:"Responses"})]})}:null,e!=null&&e.invoice&&Object.keys(e.invoice).length>0?{title:e.invoice.title,url:e.invoice.url,icon:"wm-attach-money wu-text-base wu-font-semibold",node:a.jsx("div",{className:"wu-flex wu-justify-center wu-items-center wu-w-20",children:a.jsx("code",{children:e.invoice.size})})}:null].filter(Boolean);return a.jsxs(a.Fragment,{children:[a.jsx("ul",{children:n.map(({title:s,url:r,icon:o,node:i},u)=>a.jsx("li",{className:u<n.length-1?"wu-border-b wu-border-gray-subtle":"",children:a.jsxs("a",{href:r,className:p("wu-flex items-center wu-justify-between wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pl-4":"wu-pr-4"),children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2",children:[a.jsx("span",{className:p(o,"wu-w-12 wu-text-center")}),a.jsx("span",{children:s})]}),i]})},u))}),a.jsx("hr",{className:"wu-border-gray-subtle"})]})},hd=({settings:e,dir:t})=>a.jsxs(a.Fragment,{children:[a.jsx("hr",{className:"wu-border-gray-subtle"}),a.jsxs("section",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("span",{className:p("wu-absolute wm-settings wu-text-base",t==="rtl"?"wu-right-4":"wu-left-4")}),a.jsx("ul",{className:"wu-w-full",dir:t,children:e==null?void 0:e.map(n=>a.jsx("li",{tabIndex:-1,dir:t,children:a.jsx("a",{href:n.url,className:p("wu-inline-block wu-w-full wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pr-14 wu-text-right":"wu-pl-14"),children:n.title})},n.title))})]}),a.jsx("hr",{className:"wu-border-gray-subtle"})]}),md=({user:e,dir:t})=>{var n,s,r,o,i,u,l,d,c;return a.jsxs("section",{className:p("wu-flex wu-gap-2 wu-p-4 wu-w-full",t==="rtl"?"wu-pr-0":"wu-pl-0"),children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-12",children:a.jsx("span",{className:"wu-text-base wm-person"})}),a.jsxs("div",{className:p("wu-flex wu-flex-col wu-gap-1",t==="rtl"&&"wu-text-right"),children:[a.jsx("p",{children:(n=e==null?void 0:e.profile)==null?void 0:n.title}),a.jsxs("a",{href:(s=e==null?void 0:e.license)==null?void 0:s.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",dir:t,children:[a.jsx("p",{children:(r=e==null?void 0:e.profile)==null?void 0:r.subtitle}),a.jsx("p",{className:"wu-font-light",children:(o=e==null?void 0:e.profile)==null?void 0:o.companyName})]}),(e==null?void 0:e.license)&&Object.keys(e.license).length>0&&a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-between wu-gap-6 wu-mt-3",dir:t,children:[a.jsx("a",{href:(i=e==null?void 0:e.license)==null?void 0:i.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",children:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",children:[a.jsx("p",{className:"wu-font-normal",children:(u=e==null?void 0:e.license)==null?void 0:u.subtitle}),a.jsx("button",{tabIndex:-1,className:"wu-px-3 wu-py-1 wu-border wu-rounded-sm wu-border-gray-subtle group-hover/license:wu-border-blue-p",children:(l=e==null?void 0:e.license)==null?void 0:l.title})]})}),a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",dir:t,children:[a.jsx("p",{className:"wu-font-normal",children:(d=e==null?void 0:e.license)==null?void 0:d.expiryDatePostFixString}),a.jsx("p",{children:(c=e==null?void 0:e.license)==null?void 0:c.expiryDate})]})]})]})]})},Fa=({user:e,onLogout:t,dir:n,DataCenter:s})=>{var r,o;return e?a.jsx(Oa,{Trigger:a.jsxs(Ts,{className:p("wu-group wu-border wu-border-white wu-text-sm wu-font-medium wu-bg-transparent wu-w-8 wu-h-8 wu-ring-white wu-leading-[33px] wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-gray-switcher wu-header-user-avatar"),children:[a.jsx(Es,{className:"hover:wu-opacity-80",src:(r=e==null?void 0:e.profile)==null?void 0:r.profilePicture,alt:"User"}),a.jsx(Ms,{children:(o=e==null?void 0:e.profile)==null?void 0:o.initials})]}),dir:n,triggerClassName:"wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-w-8 wu-h-8 wu-app-user-button",DropdownContent:a.jsxs("div",{className:p("wu-p-0 wu-text-xs wu-font-medium wu-border wu-rounded-none wu-min-w-72 wu-w-max wu-max-w-96 wu-border-gray-subtle wu-text-gray-lead wu-overflow-hidden wu-bg-white"),dir:n,children:[a.jsx(md,{user:e,dir:n}),(e==null?void 0:e.settings)&&e.settings.length>0&&a.jsx(hd,{settings:e.settings,dir:n}),a.jsx(pd,{user:e,dir:n}),a.jsx(fd,{onLogout:t,DataCenter:s})]})}):null},La=({menuList:e,dir:t})=>{const n=[{icon:"wm-help",title:"Help center",subTitle:"Knowledge Base",link:"https://www.questionpro.com/help/"},{icon:"wm-live-tv",title:"Free training",subTitle:"Webinar",link:"https://www.questionpro.com/training"},{icon:"wm-local-fire-department",title:"Updates",subTitle:"What's new!",link:"https://www.questionpro.com/updates/"},{icon:"wm-support-agent",title:"Live support",subTitle:"Support",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"},{icon:"wm-book-2",title:"Org wiki",subTitle:"wiki",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"}];return a.jsx(Oa,{dir:t,Trigger:a.jsx("span",{className:"wm-question-mark wu-text-base"}),triggerClassName:"wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-rounded-full wu-border wu-border-white focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-blue-switcher wu-app-header-help",isAllowActiveStyle:!0,DropdownContent:a.jsx("ul",{children:(e||n).map((s,r)=>a.jsx("li",{className:"wu-p-0 wu-w-[136px]",dir:t,children:s.target==="window"?a.jsx("a",{tabIndex:0,rel:"noopener noreferrer",onClick:()=>vs(s.link),onKeyDown:o=>{o.key==="Enter"&&vs(s.link)},className:`wu-block wu-w-full wu-h-full wu-px-3 wu-py-2 hover:wu-bg-black hover:wu-bg-opacity-[.04] focus-visible:wu-border-none focus-visible:wu-bg-black
1
+ (function(E,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("@radix-ui/react-avatar"),require("react"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-accordion"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("@radix-ui/react-label"),require("react-day-picker"),require("@radix-ui/react-checkbox"),require("cmdk"),require("@radix-ui/react-popover"),require("@radix-ui/react-tooltip"),require("react-virtuoso"),require("@radix-ui/react-dropdown-menu"),require("@tanstack/react-table"),require("date-fns"),require("@radix-ui/react-dialog"),require("@radix-ui/react-scroll-area"),require("@radix-ui/react-radio-group"),require("@radix-ui/react-separator"),require("react-dom"),require("@radix-ui/react-toggle-group"),require("@radix-ui/react-toggle"),require("@radix-ui/react-tabs"),require("@radix-ui/react-toast"),require("@radix-ui/react-switch")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@radix-ui/react-avatar","react","clsx","tailwind-merge","@radix-ui/react-accordion","@radix-ui/react-slot","class-variance-authority","@radix-ui/react-label","react-day-picker","@radix-ui/react-checkbox","cmdk","@radix-ui/react-popover","@radix-ui/react-tooltip","react-virtuoso","@radix-ui/react-dropdown-menu","@tanstack/react-table","date-fns","@radix-ui/react-dialog","@radix-ui/react-scroll-area","@radix-ui/react-radio-group","@radix-ui/react-separator","react-dom","@radix-ui/react-toggle-group","@radix-ui/react-toggle","@radix-ui/react-tabs","@radix-ui/react-toast","@radix-ui/react-switch"],a):(E=typeof globalThis<"u"?globalThis:E||self,a(E["wick-ui-lib"]={},E["react/jsx-runtime"],E.RadixUIAvatar,E.React,E.clsx,E.tailwindMerge,E.RadixUIAccordion,E.RadixUISlot,E.ClassVarianceAuthority,E.RadixUILabel,E.ReactDayPicker,E.RadixUICheckbox,E.cmdk,E.RadixUIPopover,E.RadixUITooltip,E.ReactVirtuoso,E.RadixUIDropdownMenu,E.TanstackReactTable,E.dateFns,E.RadixUIDialog,E.RadixUIScrollArea,E.RadixUIRadioGroup,E.RadixUISeparator,E.ReactDOM,E.RadixUIToggleGroup,E.RadixUIToggle,E.RadixUITabs,E.RadixUIToast,E.RadixUISwitch))})(this,(function(E,a,yt,h,Uc,jc,Gc,xt,_e,Kc,Ia,Yc,xe,Lt,bs,Xc,Zc,qe,Y,Aa,Jc,Qc,Rc,ed,td,nd,sd,rd,ad){"use strict";var Ly=Object.defineProperty;var Wy=(E,a,yt)=>a in E?Ly(E,a,{enumerable:!0,configurable:!0,writable:!0,value:yt}):E[a]=yt;var Ne=(E,a,yt)=>Wy(E,typeof a!="symbol"?a+"":a,yt);var qc;function fe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const vt=fe(yt),y=fe(h),ot=fe(Gc),Da=fe(Kc),ys=fe(Yc),Wt=fe(Lt),Bt=fe(bs),ee=fe(Zc),R=fe(Aa),it=fe(Jc),qt=fe(Qc),ka=fe(Rc),Pa=fe(ed),Sn=fe(td),_a=fe(nd),ut=fe(sd),Se=fe(rd),xs=fe(ad),od=jc.extendTailwindMerge({prefix:"wu-"});function p(...e){return od(Uc.clsx(e))}const vs=e=>{window.open(e,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600")};function Cn(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function zt(e){switch(e){case"top":return"wu-flex-col-reverse";case"left":return"wu-flex-row-reverse wu-gap-2";case"right":return"wu-flex-row wu-gap-2";default:return""}}const id=e=>e?/\S+@questionpro\.com/.test(e):!1,Va=ot.Root,Ns=y.forwardRef(({className:e,...t},n)=>a.jsx(ot.Item,{ref:n,className:p("wu-border-b",e),...t}));Ns.displayName="AccordionItem";const Ss=y.forwardRef(({className:e,children:t,...n},s)=>a.jsx(ot.Header,{className:"wu-flex",children:a.jsxs(ot.Trigger,{ref:s,className:p("wu-flex wu-flex-1 wu-text-xs wu-items-center wu-justify-between wu-p-2 wu-transition-all","[&[data-state=open]>.wu-arrow-icon]:wu-rotate-180",e),...n,children:[t,a.jsx("span",{className:"wu-arrow-icon wm-keyboard-arrow-down wu-transition-transform wu-duration-200"})]})}));Ss.displayName=ot.Trigger.displayName;const Cs=y.forwardRef(({className:e,children:t,...n},s)=>a.jsx(ot.Content,{ref:s,className:"wu-overflow-hidden wu-text-xs wu-px-2 wu-font-light wu-transition-all data-[state=closed]:wu-animate-accordion-up data-[state=open]:wu-animate-accordion-down",...n,children:a.jsx("div",{className:p("wu-pb-4 wu-pt-0",e),children:t})}));Cs.displayName=ot.Content.displayName;const ud=e=>{const{items:t,className:n,dir:s="ltr"}=e;if(e.type==="multiple"){const{defaultValue:r=[],value:o,onValueChange:i}=e;return a.jsx(Va,{type:"multiple",className:"wu-w-full wu-accordion-container",defaultValue:r,value:o,onValueChange:i,dir:s,children:t.map(({value:u,Summary:l,Details:d,className:c})=>a.jsxs(Ns,{value:u,dir:s,className:p(n,c),children:[a.jsx(Ss,{dir:s,className:"wu-accordion-summary",children:l}),a.jsx(Cs,{dir:s,className:"wu-accordion-details",children:d})]},u))})}else{const{defaultValue:r,value:o,onValueChange:i}=e;return a.jsx(Va,{type:"single",className:"wu-w-full wu-accordion-container",defaultValue:r,value:o,onValueChange:i,dir:s,collapsible:!0,children:t.map(({value:u,Summary:l,Details:d,className:c})=>a.jsxs(Ns,{value:u,dir:s,className:p(n,c),children:[a.jsx(Ss,{dir:s,className:"wu-accordion-summary",children:l}),a.jsx(Cs,{dir:s,className:"wu-accordion-details",children:d})]},u))})}},Ts=y.forwardRef(({className:e,...t},n)=>a.jsx(vt.Root,{ref:n,className:p("wu-relative wu-flex wu-h-10 wu-w-10 wu-shrink-0 wu-overflow-hidden wu-rounded-full",e),...t}));Ts.displayName=vt.Root.displayName;const Es=y.forwardRef(({className:e,...t},n)=>a.jsx(vt.Image,{ref:n,className:p("wu-aspect-square wu-h-full wu-w-full",e),...t}));Es.displayName=vt.Image.displayName;const Ms=y.forwardRef(({className:e,...t},n)=>a.jsx(vt.Fallback,{ref:n,className:p("wu-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-rounded-full wu-bg-muted",e),...t}));Ms.displayName=vt.Fallback.displayName;const ce={timelineContainer:"_timelineContainer_1rtax_1",mainVerticalLine:"_mainVerticalLine_1rtax_5",dateGroup:"_dateGroup_1rtax_9",dateHeader:"_dateHeader_1rtax_13",dateDot:"_dateDot_1rtax_17",dateText:"_dateText_1rtax_21",logList:"_logList_1rtax_25",logItem:"_logItem_1rtax_29",timelineDotSmall:"_timelineDotSmall_1rtax_33",content:"_content_1rtax_37",time:"_time_1rtax_1",tags:"_tags_1rtax_45",tag:"_tag_1rtax_45",tagPrimary:"_tagPrimary_1rtax_53",tagSecondary:"_tagSecondary_1rtax_57",userActionRow:"_userActionRow_1rtax_61",avatar:"_avatar_1rtax_65",actionText:"_actionText_1rtax_69",userName:"_userName_1rtax_73"},Xe=(e,t)=>t.includes(".")?t.split(".").reduce((n,s)=>n==null?void 0:n[s],e):e==null?void 0:e[t],ld=({log:e,accessorKey:t})=>{const n=Xe(e,t.time),s=Xe(e,t.userName),r=Xe(e,t.userInitials),o=Xe(e,t.userImage??""),i=Xe(e,t.tags??""),u=Xe(e,t.description);return a.jsxs("div",{className:ce.logItem,"data-slot":"log-item",children:[a.jsx("div",{className:ce.timelineDotSmall,"data-slot":"timeline-dot-small"}),a.jsxs("div",{className:ce.content,"data-slot":"content",children:[a.jsx("div",{className:ce.time,"data-slot":"time",children:n}),(i==null?void 0:i.length)>0&&a.jsx("div",{className:ce.tags,"data-slot":"tags",children:i.map((l,d)=>a.jsx("span",{className:p(ce.tag,d===0?ce.tagPrimary:ce.tagSecondary),"data-slot":"tag",children:l},l))}),a.jsxs("div",{className:ce.userActionRow,"data-slot":"user-action-row",children:[a.jsxs(Ts,{className:ce.avatar,"data-slot":"avatar",children:[a.jsx(Es,{src:o,alt:s,"data-slot":"log-user-avatar-image"}),a.jsx(Ms,{className:"wu-text-[10px] wu-bg-slate-400 wu-text-white","data-slot":"log-user-avatar-fallback",children:r})]}),a.jsxs("p",{className:ce.actionText,"data-slot":"action-text",children:[a.jsx("span",{className:ce.userName,"data-slot":"log-username",children:s})," ",u]})]})]})]})},cd=h.memo(ld),dd=({logs:e,accessorKey:t,className:n,...s})=>{const r=h.useMemo(()=>e.reduce((o,i)=>{const u=Xe(i,t.date);return u&&(o[u]=o[u]||[],o[u].push(i)),o},{}),[e,t.date]);return a.jsxs("div",{className:p(ce.timelineContainer,n),"data-slot":"timeline-container",...s,children:[a.jsx("div",{className:ce.mainVerticalLine,"data-slot":"main-vertical-line"}),Object.entries(r).map(([o,i])=>a.jsxs("div",{className:ce.dateGroup,"data-slot":"date-group",children:[a.jsxs("div",{className:ce.dateHeader,"data-slot":"date-header",children:[a.jsx("div",{className:ce.dateDot,"data-slot":"date-dot"}),a.jsx("span",{className:ce.dateText,"data-slot":"date-text",children:o})]}),a.jsx("div",{className:ce.logList,"data-slot":"log-list",children:i.map(u=>{const l=Xe(u,t.id);return a.jsx(cd,{log:u,accessorKey:t},l)})})]},o))]})};function Is(e,t){h.useEffect(()=>{const n=s=>{Array.isArray(e)&&e.some(r=>!r.current||r.current.contains(s.target))||!Array.isArray(e)&&(!e.current||e.current.contains(s.target))||t(s)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])}const As={dropdownContainer:"_dropdownContainer_vvlo9_1",open:"_open_vvlo9_1",dropdownMenu:"_dropdownMenu_vvlo9_1"},Oa=({dir:e,Trigger:t,triggerClassName:n,DropdownContent:s,isAllowActiveStyle:r})=>{const[o,i]=h.useState(!1),u=h.useRef(null),l=h.useRef(null);Is([u,l],()=>i(!1));const d=()=>{i(!o)};return a.jsx(a.Fragment,{children:a.jsx("div",{className:As.dropdownContainer,children:a.jsx("ul",{children:a.jsxs("li",{className:p("wu-flex wu-relative",o&&As.open),children:[a.jsx("button",{className:p("wu-w-8 wu-h-8 wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher",n,r&&o&&"wu-bg-white wu-text-blue-switcher"),onClick:c=>{c.preventDefault(),d()},ref:l,"aria-label":"dropdown-trigger",children:t}),a.jsx("div",{className:p(As.dropdownMenu,{open:o},e==="rtl"?"wu-left-[-10px] wu-top-[38px]":"wu-right-[-7px] wu-top-[38px]"),dir:e,ref:u,"aria-label":"user-menu",children:s})]})})})})},Ds=_e.cva(["wu-inline-flex wu-items-center wu-justify-center wu-rounded","wu-whitespace-nowrap wu-text-sm wu-leading-normal wu-font-normal","wu-transition-colors wu-duration-300","focus:wu-outline-none focus-visible:wu-outline-2 focus-visible:wu-outline-offset-2","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle"],{variants:{size:{md:["wu-p-2 wu-h-8 wu-min-w-[104px]","wu-text-sm wu-leading-normal"],sm:["wu-p-1 wu-h-6 wu-min-w-[90px]","wu-text-xs"],mobile:["wu-p-4 wu-h-10 wu-min-w-[104px] wu-rounded-lg","wu-text-base"]},color:{primary:["wu-bg-blue-p hover:wu-bg-blue-pHoverDeep","wu-text-blue-p hover:wu-text-blue-q","wu-ring-1 wu-ring-blue-p hover:wu-ring-blue-pHoverDeep","focus-visible:wu-outline-blue-p/50"],upgrade:["wu-bg-orange-soft hover:wu-bg-orange-deep","wu-text-orange-deep hover:wu-text-orange-deep","wu-ring-1 wu-ring-orange-soft hover:wu-ring-orange-deep","focus-visible:wu-outline-orange-deep/50"],error:["wu-bg-red-deep hover:wu-bg-red-soft","wu-text-red-deep hover:wu-text-red-deep","wu-ring-1 wu-ring-red-deep hover:wu-ring-red-soft","focus-visible:wu-outline-red-deep/50"]},variant:{primary:["wu-text-white hover:wu-text-white","wu-ring-0"],secondary:["wu-bg-transparent hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-ring-0"],outline:["wu-bg-white hover:wu-text-white","disabled:wu-bg-transparent disabled:wu-ring-gray-subtle"],rounded:["wu-text-white hover:wu-text-white","wu-ring-0 wu-rounded-full"],link:["wu-bg-transparent hover:wu-bg-transparent","disabled:wu-bg-transparent","hover:wu-underline wu-underline-offset-2","wu-min-w-[auto] wu-px-2","wu-ring-0","focus-visible:wu-outline-offset-0"],iconOnly:["wu-aspect-square","wu-p-2 wu-h-8 wu-w-8 wu-min-w-[auto]","wu-text-xl wu-leading-5","wu-bg-transparent wu-text-gray-lead","hover:wu-bg-black hover:wu-bg-opacity-[0.04]","focus-visible:wu-bg-black focus-visible:wu-bg-opacity-[0.04]","wu-ring-0","disabled:wu-grayscale disabled:wu-opacity-80"]}},defaultVariants:{variant:"primary",size:"md",color:"primary"},compoundVariants:[]}),Nt=y.forwardRef(({className:e,variant:t,size:n,color:s,asChild:r=!1,...o},i)=>{const u=r?xt.Slot:"button";return a.jsx(u,{className:p(Ds({size:n,color:s,variant:t,className:e})),ref:i,...o})});Nt.displayName="Button";const St=h.forwardRef((e,t)=>wd(e,t)),wd=(e,t)=>{const{size:n="md",color:s="#1B87E6",variant:r="dots",...o}=e,i=p("wu-w-[4em] wu-h-[1em] wu-inline-block wu-text-xs wu-relative wu-loader-dot-container");let u="7px";n==="sm"?u="7px":n==="md"?u="12px":n==="lg"?u="18px":typeof n=="string"&&(u=n);const l={backgroundColor:s,width:u,height:u},d=a.jsxs("div",{...o,ref:t,className:p("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"status","aria-busy":"true",children:[a.jsx("div",{className:"wu-w-12 wu-h-12 wu-border-2 wu-rounded-full wu-animate-spin",style:{width:u,height:u,borderTopColor:s}}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]}),c=a.jsxs("div",{...o,ref:t,className:p("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"alert","aria-busy":"true",children:[a.jsxs("ul",{className:i,style:{fontSize:u},role:"loader",children:[a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l})]}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]});return a.jsx(a.Fragment,{children:r==="spinner"?d:c})};St.displayName="WuLoader";const Ce=h.forwardRef(({disabled:e,loading:t,variant:n="primary",size:s="md",Icon:r,iconPosition:o="left",children:i,floating:u,className:l,color:d="primary",selected:c,...w},f)=>{const m={primary:"#1986e688",upgrade:"#F5A300",error:"#ef444488"};return a.jsxs(Nt,{...w,disabled:e,variant:n,size:s,className:p(u&&"wu-shadow-qp","wu-flex wu-items-center wu-justify-center wu-gap-2",o==="right"&&"wu-flex-row-reverse",t?"wu-cursor-not-allowed wu-ring-0":"",c&&"wu-bg-blue-p wu-bg-opacity-15 wu-text-blue-pHoverDeep wu-ring-0",d==="error"&&"hover:wu-text-maroon",l),color:d,style:{backgroundColor:t?m[d]:"",...w.style},ref:f,children:[!t&&r&&a.jsx(a.Fragment,{children:r}),t&&a.jsx(St,{color:"#fff",size:"sm"}),!t&&i]})});Ce.displayName="WuButton";const fd=({onLogout:e,DataCenter:t})=>a.jsxs("section",{className:"wu-flex wu-justify-between wu-px-4 wu-py-4 wu-text-white wu-bg-gray-lead",children:[a.jsx("div",{className:"wu-flex-1 wu-flex wu-items-start",children:t}),a.jsx(Ce,{variant:"outline",size:"sm",Icon:a.jsx("span",{className:"wm-logout"}),className:"wu-text-white wu-bg-transparent wu-ring-white hover:wu-bg-gray-10 hover:wu-text-gray-lead hover:wu-ring-gray-lead",onClick:e,"aria-label":"logout",children:"LOGOUT"})]}),pd=({user:e,dir:t})=>{const n=[e!=null&&e.usage&&Object.keys(e.usage).length>0?{title:e.usage.title,url:e.usage.url,icon:"wm-bar-chart wu-text-base",node:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-center wu-w-20",children:[a.jsx("code",{className:"wu-font-medium",children:e.usage.collectedResponseCount||"0"}),a.jsx("span",{className:"wu-text-xs wu-font-normal",children:"Responses"})]})}:null,e!=null&&e.invoice&&Object.keys(e.invoice).length>0?{title:e.invoice.title,url:e.invoice.url,icon:"wm-attach-money wu-text-base wu-font-semibold",node:a.jsx("div",{className:"wu-flex wu-justify-center wu-items-center wu-w-20",children:a.jsx("code",{children:e.invoice.size})})}:null].filter(Boolean);return a.jsxs(a.Fragment,{children:[a.jsx("ul",{children:n.map(({title:s,url:r,icon:o,node:i},u)=>a.jsx("li",{className:u<n.length-1?"wu-border-b wu-border-gray-subtle":"",children:a.jsxs("a",{href:r,className:p("wu-flex items-center wu-justify-between wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pl-4":"wu-pr-4"),children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2",children:[a.jsx("span",{className:p(o,"wu-w-12 wu-text-center")}),a.jsx("span",{children:s})]}),i]})},u))}),a.jsx("hr",{className:"wu-border-gray-subtle"})]})},hd=({settings:e,dir:t})=>a.jsxs(a.Fragment,{children:[a.jsx("hr",{className:"wu-border-gray-subtle"}),a.jsxs("section",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("span",{className:p("wu-absolute wm-settings wu-text-base",t==="rtl"?"wu-right-4":"wu-left-4")}),a.jsx("ul",{className:"wu-w-full",dir:t,children:e==null?void 0:e.map(n=>a.jsx("li",{tabIndex:-1,dir:t,children:a.jsx("a",{href:n.url,className:p("wu-inline-block wu-w-full wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pr-14 wu-text-right":"wu-pl-14"),children:n.title})},n.title))})]}),a.jsx("hr",{className:"wu-border-gray-subtle"})]}),md=({user:e,dir:t})=>{var n,s,r,o,i,u,l,d,c;return a.jsxs("section",{className:p("wu-flex wu-gap-2 wu-p-4 wu-w-full",t==="rtl"?"wu-pr-0":"wu-pl-0"),children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-12",children:a.jsx("span",{className:"wu-text-base wm-person"})}),a.jsxs("div",{className:p("wu-flex wu-flex-col wu-gap-1",t==="rtl"&&"wu-text-right"),children:[a.jsx("p",{children:(n=e==null?void 0:e.profile)==null?void 0:n.title}),a.jsxs("a",{href:(s=e==null?void 0:e.license)==null?void 0:s.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",dir:t,children:[a.jsx("p",{children:(r=e==null?void 0:e.profile)==null?void 0:r.subtitle}),a.jsx("p",{className:"wu-font-light",children:(o=e==null?void 0:e.profile)==null?void 0:o.companyName})]}),(e==null?void 0:e.license)&&Object.keys(e.license).length>0&&a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-between wu-gap-6 wu-mt-3",dir:t,children:[a.jsx("a",{href:(i=e==null?void 0:e.license)==null?void 0:i.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",children:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",children:[a.jsx("p",{className:"wu-font-normal",children:(u=e==null?void 0:e.license)==null?void 0:u.subtitle}),a.jsx("button",{tabIndex:-1,className:"wu-px-3 wu-py-1 wu-border wu-rounded-sm wu-border-gray-subtle group-hover/license:wu-border-blue-p",children:(l=e==null?void 0:e.license)==null?void 0:l.title})]})}),a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",dir:t,children:[a.jsx("p",{className:"wu-font-normal",children:(d=e==null?void 0:e.license)==null?void 0:d.expiryDatePostFixString}),a.jsx("p",{children:(c=e==null?void 0:e.license)==null?void 0:c.expiryDate})]})]})]})]})},Fa=({user:e,onLogout:t,dir:n,DataCenter:s})=>{var r,o;return e?a.jsx(Oa,{Trigger:a.jsxs(Ts,{className:p("wu-group wu-border wu-border-white wu-text-sm wu-font-medium wu-bg-transparent wu-w-8 wu-h-8 wu-ring-white wu-leading-[33px] wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-gray-switcher wu-header-user-avatar"),children:[a.jsx(Es,{className:"hover:wu-opacity-80",src:(r=e==null?void 0:e.profile)==null?void 0:r.profilePicture,alt:"User"}),a.jsx(Ms,{children:(o=e==null?void 0:e.profile)==null?void 0:o.initials})]}),dir:n,triggerClassName:"wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-w-8 wu-h-8 wu-app-user-button",DropdownContent:a.jsxs("div",{className:p("wu-p-0 wu-text-xs wu-font-medium wu-border wu-rounded-none wu-min-w-72 wu-w-max wu-max-w-96 wu-border-gray-subtle wu-text-gray-lead wu-overflow-hidden wu-bg-white"),dir:n,children:[a.jsx(md,{user:e,dir:n}),(e==null?void 0:e.settings)&&e.settings.length>0&&a.jsx(hd,{settings:e.settings,dir:n}),a.jsx(pd,{user:e,dir:n}),a.jsx(fd,{onLogout:t,DataCenter:s})]})}):null},La=({menuList:e,dir:t})=>{const n=[{icon:"wm-help",title:"Help center",subTitle:"Knowledge Base",link:"https://www.questionpro.com/help/"},{icon:"wm-live-tv",title:"Free training",subTitle:"Webinar",link:"https://www.questionpro.com/training"},{icon:"wm-local-fire-department",title:"Updates",subTitle:"What's new!",link:"https://www.questionpro.com/updates/"},{icon:"wm-support-agent",title:"Live support",subTitle:"Support",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"},{icon:"wm-book-2",title:"Org wiki",subTitle:"wiki",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"}];return a.jsx(Oa,{dir:t,Trigger:a.jsx("span",{className:"wm-question-mark wu-text-base"}),triggerClassName:"wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-rounded-full wu-border wu-border-white focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-blue-switcher wu-app-header-help",isAllowActiveStyle:!0,DropdownContent:a.jsx("ul",{children:(e||n).map((s,r)=>a.jsx("li",{className:"wu-p-0 wu-w-[136px]",dir:t,children:s.target==="window"?a.jsx("a",{tabIndex:0,rel:"noopener noreferrer",onClick:()=>vs(s.link),onKeyDown:o=>{o.key==="Enter"&&vs(s.link)},className:`wu-block wu-w-full wu-h-full wu-px-3 wu-py-2 hover:wu-bg-black hover:wu-bg-opacity-[.04] focus-visible:wu-border-none focus-visible:wu-bg-black
2
2
  focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0 wu-cursor-pointer`,children:a.jsx(Wa,{item:s,dir:t})}):a.jsx("a",{href:s.link,target:"_blank",className:`wu-block wu-w-full wu-h-full wu-px-3 wu-py-2 hover:wu-bg-black hover:wu-bg-opacity-[0.04] focus-visible:wu-border-none
3
3
  focus-visible:wu-bg-black
4
- focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0`,rel:"noreferrer",children:a.jsx(Wa,{item:s,dir:t})})},r))})})},Wa=({item:e,dir:t})=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-[5px]",dir:t,children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6",children:a.jsx("span",{className:p("wu-text-xl wu-text-gray-lead",e.icon)})}),a.jsx("p",{className:"wu-text-sm wu-text-gray-lead",children:e.title})]}),gd=e=>{const[t,n]=h.useState(()=>window.innerWidth<=e);return h.useEffect(()=>{const s=()=>{n(window.innerWidth<=e)};return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[e]),t};function bd({productCategories:e,openCategory:t,setOpenCategory:n}){const s=(u,l)=>{const d=l[u];if(d){d.focus();const c=e[u]||null;n(c)}},r=(u,l,d,c)=>{u.preventDefault();const w=d==="down"?l+1:l-1;s(w,c)},o=(u,l,d,c)=>{t!=null&&t.products&&t.products[t.products.length-1].name===c&&(u.preventDefault(),s(l+1,d))},i=(u,l)=>{u.preventDefault();const d=e[l]===t?null:e[l];n(d)};return function(l,d,c){const w=document.querySelectorAll("[data-product-category]"),{key:f}=l;switch(f){case"ArrowDown":r(l,d,"down",w);break;case"ArrowUp":r(l,d,"up",w);break;case"Tab":o(l,d,w,c);break;case"Enter":case" ":i(l,d);break}}}const yd=e=>{const{size:t="lg",className:n,children:s,...r}=e,o={sm:"wu-text-body-3",md:"wu-text-body-2",lg:"wu-text-body-1"},i=e.as||"div";return a.jsx(i,{...r,className:p(o[t],n),children:s})},xd=e=>{const{size:t="xl",className:n,children:s,...r}=e,o={sm:"h4",md:"h3",lg:"h2",xl:"h1"},i={sm:"wu-text-heading-4",md:"wu-text-heading-3",lg:"wu-text-heading-2",xl:"wu-text-heading-1"},u=o[t];return a.jsx(u,{...r,className:p(i[t],n),children:s})},vd=e=>{const{size:t="lg",className:n,children:s,...r}=e,o={sm:"wu-text-sub-3",md:"wu-text-sub-2",lg:"wu-text-sub-1"},i=e.as||"div";return a.jsx(i,{...r,className:p(o[t],n),children:s})},Nd=e=>{const{size:t="lg",className:n,children:s,...r}=e,o={md:"wu-text-display-2",lg:"wu-text-display-1"},i=e.as||"h1";return a.jsx(i,{...r,className:p(o[t],n),children:s})},Ve=e=>{const{icon:t,className:n,...s}=e;return a.jsx("span",{...s,className:p(t,n),role:"presentation","aria-label":t})},Sd=({buttonRef:e,handleDropdownToggle:t,handleKeyDown:n,isDropdownOpen:s,activeProductName:r,dir:o="ltr",homeLink:i="/"})=>a.jsxs("button",{ref:e,type:"button",className:p("wu-text-base wu-font-normal wu-flex wu-items-center wu-justify-between wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger"),onClick:t,onKeyDown:u=>{s&&u.key==="ArrowDown"&&n(u,-1)},"aria-label":"product-switcher",children:[a.jsx("a",{className:"wu-pl-2 wu-pr-0 wu-aspect-auto focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-logo",tabIndex:-1,href:i,children:a.jsx(Ve,{icon:"wc-logo",className:"wu-text-xl wu-leading-4 wu-relative wu-top-1"})}),r,a.jsx("span",{className:p("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",s&&"wu-rotate-180",o==="rtl"?"wu-mr-auto":"wu-ml-auto")})]}),ne={productDropdownMenu:"_productDropdownMenu_amyba_1",productDropdownMenuOpen:"_productDropdownMenuOpen_amyba_38",rtlDropdownMenu:"_rtlDropdownMenu_amyba_51",productCategory:"_productCategory_amyba_55",open:"_open_amyba_61",productCategoryBorderTop:"_productCategoryBorderTop_amyba_66",productList:"_productList_amyba_93",rtlProductList:"_rtlProductList_amyba_114",productListItem:"_productListItem_amyba_137",productLink:"_productLink_amyba_162",activeProduct:"_activeProduct_amyba_164",topBorder:"_topBorder_amyba_169",topBorderRtl:"_topBorderRtl_amyba_190"},Cd=({category:e,dir:t="ltr",openCategory:n})=>{const s=e.active?"#c5cce0":"#f0c36a",r=(n==null?void 0:n.name)===e.name,o=p("wm-arrow-forward-ios wu-text-xs wu-tracking-widest wu-text-muted-foreground wu-mr-2.5 group-hover:wu-hidden wu-text-blue-q",t==="rtl"&&"wu-rotate-180 wu-ml-2.5 wu-text-blue-q group-hover:wu-hidden",r&&"wu-hidden","wu-relative wu-top-[5px]"),i=p("wm-lock wu-text-orange-soft wu-text-base wu-mr-2.5 group-hover:wu-hidden",t==="rtl"&&"wu-ml-2.5 group-hover:wu-hidden",r&&"wu-hidden","wu-relative wu-top-1");return a.jsxs("div",{className:p("group focus:wu-outline-none focus-visible:wu-outline-none wu-flex wu-items-center wu-w-full wu-bg-white wu-relative wu-justify-between"),dir:t,children:[a.jsx("div",{className:ne.productCategoryBorderTop,style:{backgroundColor:s}}),a.jsxs("div",{className:"wu-flex wu-items-center wu-px-1 wu-relative wu-top-1",children:[a.jsx("div",{className:"wu-w-[56px] wu-h-[56px] wu-flex wu-items-center wu-justify-center",children:a.jsx("img",{src:e.logo,alt:e.name,width:"32px",height:"32px"})}),a.jsx("span",{className:"wu-text-sm wu-leading-5 wu-text-blue-q wu-relative wu-top-[1px]",children:e.name})]}),e.active?a.jsx("span",{className:o}):a.jsx("span",{className:i})]})},Td={e309:"wp-audience",e381:"wp-bi",e329:"wp-closed-loop",e314:"wp-communities",e313:"wp-cx",e352:"wp-digsite",e324:"wp-empower",e317:"wp-insightshub",e380:"wp-instant-answers",e378:"wp-intercept",e311:"wp-livepolls",e316:"wp-reputation",e379:"wp-suite-cx",e382:"wp-suite-cx",e308:"wp-surveys",e315:"wp-workforce"},Ed=({product:e,currentProduct:t,activeProductName:n,dir:s,focusItem:r,setFocusItem:o})=>{const[i,u]=h.useState(e.name===t),l=e.name===n,d=e.name===t,c=!e.active,w="#1b3380",f="#c5cce0",m="#ffcf70",g=p("wu-font-normal wu-text-xs wu-text-gray-lead wu-text-center",d&&"wu-text-blue-q wu-font-normal",!e.active&&"wu-text-gray-subtle",i&&"wu-font-normal",e.active&&i&&"wu-text-blue-q"),b=p("wu-text-blue-p wu-text-base",d&&"wu-text-blue-q",!e.active&&"wu-text-gray-subtle",e.active&&i&&"wu-text-blue-q"),v=i||r===e.name||l?w:f;return a.jsxs("li",{className:p(ne.productListItem,"focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item",(l||i)&&ne.activeProduct,e.name.length>15&&window.innerWidth>768&&"wu-w-[130px] wu-min-w-[130px]",r===e.name&&ne.activeProduct,"wu-product-item"),onMouseOver:()=>u(!0),onMouseOut:()=>u(!1),"aria-label":e.name,"aria-disabled":c,dir:s,onKeyDown:C=>{if(C.key==="Enter"){C.preventDefault();const N=C.currentTarget.querySelector("a");N&&N.click()}},onFocus:()=>{o(e.name)},onBlur:()=>o(""),children:[a.jsx("div",{className:p(ne.topBorder,s==="rtl"&&ne.topBorderRtl),style:{backgroundColor:c?m:v}}),a.jsxs("a",{className:p(ne.productLink,"focus:wu-outline-none focus-visible:wu-outline-none"),href:e.link||"#",tabIndex:0,children:[a.jsx("span",{className:p(b,Td[e.icon||""]),"aria-hidden":!0}),a.jsx("span",{className:p(g),children:e.name})]})]},e.name)},Md=({category:e,currentProduct:t,activeProductName:n,dir:s="ltr",focusItem:r,setFocusItem:o,borderColorLocked:i="#f5a300"})=>{const{products:u=[],active:l}=e,d=h.useMemo(()=>u.filter(g=>g.active).sort((g,b)=>(g.order||100)-(b.order||100)),[u]),c=h.useMemo(()=>u.filter(g=>!g.active),[u]),[w,f]=h.useState(i),m=g=>g.map((b,v)=>a.jsx(Ed,{product:b,currentProduct:t,activeProductName:n,dir:s,focusItem:r,setFocusItem:o},v));return l?a.jsxs(a.Fragment,{children:[m(d),c.length>0&&a.jsxs("li",{className:p(ne.productListItem,"focus:wu-outline-none focus-visible:wu-outline-none !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee] wu-group"),onMouseOver:()=>f("#f5a300"),onMouseOut:()=>f(i),"aria-label":"Upgrade to unlock",children:[a.jsx("div",{className:p(ne.topBorder,s==="rtl"&&ne.topBorderRtl),style:{backgroundColor:w},"aria-label":"top-border"}),a.jsxs("a",{href:"https://www.questionpro.com/a/showUpgradeUser.do",className:p(ne.productLink,"wu-flex wu-flex-col wu-items-center wu-justify-center wu-py-2 wu-min-w-[88px]"),children:[a.jsx("span",{className:"wu-text-base wu-transition-colors wm-lock !wu-text-orange-soft group-hover:wu-text-orange-deep"}),a.jsxs("span",{className:"wu-text-[10px] wu-leading-[10px] wu-text-center wu-pt-1 !wu-text-orange-deep",children:["Upgrade to ",a.jsx("br",{})," unlock"]})]})]}),m(c)]}):a.jsxs("li",{className:p(ne.productListItem,ne.learnMore,"focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]",r==="learn"&&"activeProduct"),tabIndex:0,onFocus:()=>o("learn"),onBlur:()=>o(""),"aria-label":"Learn More",children:[a.jsx("div",{className:p(ne.topBorder,s==="rtl"&&ne.topBorderRtl),style:{backgroundColor:i}}),a.jsx("a",{className:ne.productLink,href:"https://www.questionpro.com/a/showUpgradeUser.do",tabIndex:-1,children:a.jsx("span",{className:"wu-text-[#f99e03]",children:"Learn More"})})]})},Ba=({dropdownRef:e,dir:t,isDropdownOpen:n,productCategories:s,openCategory:r,setOpenCategory:o,handleKeyDown:i,expandAll:u,activeProductName:l,focusItem:d,setFocusItem:c})=>{const w="#ffcf70",[f,m]=h.useState(window.innerWidth>768);return h.useEffect(()=>{const g=()=>{m(window.innerWidth>375)};return window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[]),a.jsx("ul",{className:p(ne.productDropdownMenu,n&&ne.productDropdownMenuOpen,t==="rtl"&&ne.rtlDropdownMenu,"wu-switcher-container"),ref:e,dir:t,"aria-label":"product-dropdown-menu","data-state":n?"open":"closed",children:s.map((g,b)=>a.jsxs("li",{className:p(ne.productCategory,"focus:wu-outline-none focus-visible:wu-outline-none wu-h-16 wu-category-item",r===g&&ne.open,u&&ne.open),onMouseEnter:()=>f&&o(g),onMouseLeave:()=>f&&o(null),"aria-label":g.name,dir:t,onKeyDown:v=>i(v,b),tabIndex:0,"data-product-category":!0,children:[a.jsx(Cd,{category:g,dir:t,openCategory:r}),a.jsx("ul",{className:p(ne.productList,t==="rtl"&&ne.rtlProductList),dir:t,children:a.jsx(Md,{category:g,dir:t,activeProductName:l,currentProduct:g.name,focusItem:d,setFocusItem:c,borderColorLocked:w})})]},g.name))})},Id=({isProductButtonShow:e,isDropdownOpen:t,activeProductColor:n,activeProductBgColor:s,activeProductName:r,dir:o,smallScreenButtonRef:i,handleDropdownToggle:u,handleKeyDown:l})=>a.jsx("div",{className:p("wu-absolute wu-top-11 wu-transition-all wu-duration-300 wu-ease-in-out wu-transform wu-opacity-100 wu-w-[256px] wu-z-10",e?o==="rtl"?"wu-right-0 wu-overflow-hidden":"wu-translate-x-0 wu-left-0":o==="rtl"?"wu-right-0 wu-w-0":"wu--translate-x-full"),style:{backgroundColor:t?n.hover:s},children:a.jsxs("button",{ref:i,type:"button",className:p("wu-text-base wu-leading-[48px] wu-flex wu-items-center wu-justify-center wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger",e?"wu-flex":o==="rtl"?"wu-hidden":"wu-flex"),onClick:u,onKeyDown:d=>{t&&d.key==="ArrowDown"&&l(d,-1)},"aria-label":"small-screen-product-btn",children:[r,a.jsx("span",{className:p("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",t&&"wu-rotate-180")})]})}),Dd=({dir:e,isProductButtonShow:t,smallScreenToggleButtonRef:n,setIsProductButtonShow:s,setDropdownOpen:r})=>{const o=()=>{s(i=>!i),t&&r(!1)};return a.jsxs("button",{className:p("wu-relative wu-w-10 wu-h-10 wu-flex wu-flex-col wu-justify-center wu-items-center",e==="rtl"?"wu-mr-4":"wu-ml-4"),onClick:o,ref:n,"aria-label":"menu-toggle-btn",children:[a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"wu-rotate-45 wu-translate-y-0":"-wu-translate-y-2.5"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-opacity wu-duration-300 ${t?"wu-opacity-0":"wu-opacity-100"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"-wu-rotate-45 wu-translate-y-0":"wu-translate-y-2.5"}`})]})},qa=({productCategories:e,activeProductName:t,activeProductColor:n={base:"#1b87e6",hover:"#54A5EC"},dir:s,homeLink:r,expandAll:o})=>{const i=h.useRef(null),u=h.useRef(null),l=h.useRef(null),d=h.useRef(null),[c,w]=h.useState(!1),[f,m]=h.useState(null),[g,b]=h.useState(n.base),[v,C]=h.useState(""),[N,S]=h.useState(!1),x=gd(768);Is([u,i],()=>{w(!1),m(null)}),Is([l,d,u],()=>{S(!1),w(!1),m(null)}),h.useEffect(()=>{const D=I=>{I.key==="Escape"&&w(!1)};return document.addEventListener("keydown",D),()=>{document.removeEventListener("keydown",D)}},[c]),h.useEffect(()=>b(n.base),[n.base]);const T=D=>{D.preventDefault(),D.stopPropagation(),w(I=>{const k=!I;return k||m(null),k})},A=(D,I)=>{bd({productCategories:e,openCategory:f,setOpenCategory:m})(D,I,v)};return a.jsx("div",{className:p("wu-inline-flex wu-items-center wu-justify-between wu-relative wu-z-auto wu-h-12 wu-text-white"),children:x?a.jsxs("div",{className:"wu-relative wu-flex",children:[a.jsx(Dd,{dir:s,isProductButtonShow:N,smallScreenToggleButtonRef:d,setDropdownOpen:w,setIsProductButtonShow:S}),a.jsx(Id,{isProductButtonShow:N,isDropdownOpen:c,activeProductColor:n,activeProductBgColor:g,activeProductName:t,handleDropdownToggle:T,smallScreenButtonRef:l,handleKeyDown:A,dir:s}),a.jsx("div",{className:p("wu-absolute wu-top-[92px] wu-left-0 wu-text-[18px]",s==="rtl"&&"wu-right-[256px] wu-left-auto"),children:a.jsx(Ba,{activeProductName:t,focusItem:v,setFocusItem:C,handleKeyDown:A,isDropdownOpen:c,openCategory:f,productCategories:e,setOpenCategory:m,dropdownRef:u,expandAll:o,dir:s})})]}):a.jsxs("div",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-h-full wu-w-[256px]",dir:s,style:{backgroundColor:c?n.hover:g},onMouseOver:()=>b(n.hover),onMouseOut:()=>b(n.base),children:[a.jsx(Sd,{activeProductName:t,dir:s,homeLink:r,buttonRef:i,handleDropdownToggle:T,handleKeyDown:A,isDropdownOpen:c}),a.jsx(Ba,{activeProductName:t,focusItem:v,setFocusItem:C,handleKeyDown:A,isDropdownOpen:c,openCategory:f,productCategories:e,setOpenCategory:m,dropdownRef:u,expandAll:o,dir:s})]})})},za=({children:e,dir:t,className:n})=>a.jsx("section",{className:p("wu-flex wu-items-center wu-flex-1 wu-min-w-0 wu-h-12 wu-gap-2 wu-px-2",t==="rtl"&&"wu-flex-row-reverse",n),children:a.jsx("div",{className:"wu-grow",children:e})}),ks=y.forwardRef(({className:e,type:t,...n},s)=>a.jsx("input",{type:t,className:p("wu-flex wu-h-8 wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","file:wu-border-0 file:wu-bg-gray-40 file:wu-text-gray-notification file:wu-text-sm file:wu-font-normal file:wu-relative file:wu-bottom-[3px]","wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle","focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40",e),ref:s,...n}));ks.displayName="Input";const Ad=e=>{const{message:t,className:n,...s}=e;return a.jsx("p",{...s,className:p("wu-text-sub-3 wu-break-words wu-font-light",n),style:{color:"rgb(var(--wu-red-deep))",...s.style},children:t})},kd=e=>{var u,l;const{inputRef:t,maxLength:n=50,className:s,...r}=e,[o,i]=h.useState(!1);return h.useEffect(()=>{var d;(((d=t==null?void 0:t.current)==null?void 0:d.value.length)||0)>.75*n?i(!0):i(!1)},[(u=t==null?void 0:t.current)==null?void 0:u.value,n]),a.jsx("p",{...r,className:p("wu-text-sub-3 wu-font-light",s),style:{color:"rgb(var(--wu-gray-subtle))",...r.style},children:o&&`${(l=t==null?void 0:t.current)==null?void 0:l.value.length}/${n}`})},Pd=_e.cva("wu-text-xs wu-font-normal wu-leading-none peer-disabled:wu-cursor-not-allowed peer-disabled:wu-text-gray-subtle peer-readonly:wu-text-gray-subtle peer-required:after:wu-content-['*'] peer-required:after:wu-ml-[2px] peer-required:after:wu-text-red-deep peer-aria-[required]:after:wu-content-['*'] peer-aria-[required]:after:wu-ml-[2px] peer-aria-[required]:after:wu-text-red-deep"),Tn=y.forwardRef(({className:e,...t},n)=>a.jsx(Aa.Root,{ref:n,className:p(Pd(),e),...t}));Tn.displayName=Aa.Root.displayName;const Te=e=>a.jsx(Tn,{...e,className:p("wu-text-gray-lead wu-leading-6",e.className)}),_d=({Label:e,Error:t,Hint:n,Input:s,labelPosition:r="top",dir:o="ltr",className:i,...u})=>{const d=p("wu-flex",r==="top"?"wu-flex-col wu-gap-1":"wu-flex-row wu-items-center wu-gap-2",i),c=p("wu-flex wu-flex-col wu-gap-1 wu-relative wu-flex-1 wu-form-group-wrapper"),w=p("wu-absolute -wu-bottom-5",o==="ltr"?"wu-right-0":"wu-left-0","wu-form-group-hint"),f=p("wu-absolute -wu-bottom-5",o==="ltr"?"wu-left-0":"wu-right-0","wu-form-group-error");return a.jsxs("div",{className:d,dir:o,...u,children:[e,a.jsxs("div",{className:c,children:[s,n&&a.jsx("div",{className:w,children:n}),t&&a.jsx("div",{className:f,children:t})]})]})},je=h.forwardRef((e,t)=>{const{Label:n,labelPosition:s="top",Icon:r,iconPosition:o,type:i,value:u,variant:l="flat",readonly:d,id:c=Cn(),...w}=e,f=zt(s),m=r?o!=="right"?"wu-pl-8":"wu-pr-8":"",[g,b]=h.useState(!1),v=()=>{b(N=>!N)},C=N=>{w.onChange&&w.onChange(N)};return a.jsx(a.Fragment,{children:i==="submit"?a.jsx(Ce,{type:"submit",className:w.className,id:c,children:n||"Submit"}):a.jsx("div",{className:p("wu-flex wu-flex-col wu-gap-2 wu-input-container"),dir:w.dir,children:a.jsxs("div",{className:p("wu-flex wu-gap-1 wu-relative",f,(s==="right"||s==="left")&&"wu-items-center","wu-input-wrapper"),children:[r&&o!=="right"&&a.jsx("div",{className:"wu-absolute wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-input-icon-container",children:r}),a.jsx(ks,{...w,className:p("wu-peer wu-text-xs wu-rounded-t-sm",l==="outlined"?"wu-border wu-border-gray-subtle":"",m,w.className),type:g?"text":i,ref:t,readOnly:d,onChange:w.onChange&&C,value:u,id:c}),r&&o==="right"&&a.jsx("div",{className:"wu-absolute wu-right-0 wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-input-icon-container",children:r}),i==="password"&&a.jsx("div",{className:"wu-absolute wu-right-0 wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-cursor-pointer",onClick:v,children:a.jsx("button",{type:"button",className:"wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6 wu-rounded-sm focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft","aria-label":"show-password",children:g?a.jsx("span",{className:"wm-visibility wu-text-gray-subtle"}):a.jsx("span",{className:"wm-visibility-off wu-text-gray-subtle"})})}),n&&a.jsx(Te,{htmlFor:c,className:"wu-flex-none wu-w-fit wu-input-label",children:n})]})})})});je.displayName="WuInput";const Vd=({className:e,placeholder:t="Search surveys, folders or tools",defaultCollapsed:n=!0,onSearch:s,...r})=>{const[o,i]=h.useState(n);return h.useEffect(()=>{i(n)},[n]),a.jsx(je,{...r,placeholder:t,onChange:u=>s(u.target.value),className:p("wu-rounded-full focus-visible:wu-outline-2 focus-visible:wu-outline-blue-focus -wu-outline-offset-2 wu-bg-white","wu-transition-all wu-duration-300 wu-ease-in-out",o?"wu-w-8 wu-px-2 wu-text-lg wu-rounded-full wu-h-8 wu-border wu-border-white wu-bg-transparent":"wu-w-40 sm:wu-w-60",e),type:"search",Icon:a.jsx(Ve,{"data-testid":"search-icon",icon:"wm-search",className:p("wu-text-gray-lead wu-cursor-pointer",o&&"wu-text-white"),onClick:()=>i(u=>!u)})})},$a=Bt.Provider,Ha=Bt.Root,Ua=Bt.Trigger,Ps=y.forwardRef(({className:e,sideOffset:t=4,...n},s)=>a.jsx(Bt.Content,{ref:s,sideOffset:t,className:p("wu-z-50 wu-overflow-hidden wu-bg-gray-notification wu-text-white wu-px-3 wu-py-1.5 wu-text-sm wu-shadow-md",e),...n}));Ps.displayName=Bt.Content.displayName;const En=h.forwardRef(({content:e,position:t,positionOffset:n,duration:s,children:r,className:o,showArrow:i=!1,open:u,onOpenChange:l,...d},c)=>a.jsx($a,{delayDuration:s||200,children:a.jsxs(Ha,{open:u,onOpenChange:l,children:[a.jsx(Ua,{asChild:!0,children:a.jsx("span",{ref:c,children:r})}),a.jsx(bs.Portal,{children:e&&a.jsxs(Ps,{...d,side:t||"top",sideOffset:n||0,className:p("wu-max-w-sm wu-max-h-96 wu-overflow-y-auto",o),children:[e,i&&a.jsx(bs.Arrow,{className:"wu-fill-gray-notification wu-tooltip-arrow"})]})})]})}));En.displayName="WuTooltip";const Od=({label:e,className:t})=>{const n=h.useRef(null),[s,r]=h.useState(!1);return h.useEffect(()=>{const o=n.current;if(o){const i=o.clientWidth,u=o.scrollWidth,l=u/e.length,d=e.length*l;r(d>i||u>i)}},[e]),a.jsx("p",{ref:n,className:p("wu-w-full wu-truncate",t),children:s?a.jsx(En,{content:e,positionOffset:8,children:e}):e})},Fd=e=>{var w;const{productName:t,categories:n=[],user:s,children:r,onLogout:o,homeLink:i=window.location.origin,brandColor:u,dir:l="ltr",expandAll:d,DataCenter:c}=e;return a.jsx("div",{className:"wu-sticky wu-top-0 wu-z-50 wu-w-full",children:a.jsxs("header",{className:p("wu-h-12 wu-flex wu-items-center wu-justify-between wu-relative wu-bg-blue-switcher wu-text-white",l==="rtl"&&"wu-flex-row-reverse",e.className),style:e.style,children:[id((w=s==null?void 0:s.profile)==null?void 0:w.subtitle)&&window.wickUiVersion&&a.jsxs("p",{className:"wu-text-[10px] wu-text-gray-subtle wu-font-normal wu-absolute wu-top-11 wu-right-1 wu-z-[-1] wu-invisible","aria-label":"wickUiVersion",children:["Wick UI: v",window.wickUiVersion]}),a.jsx("section",{className:"wu-flex wu-items-center wu-gap-2 wu-shrink-0",children:a.jsx(qa,{productCategories:n,activeProductName:t,activeProductColor:u,dir:l,homeLink:i,expandAll:d})}),a.jsx(za,{dir:l,children:r}),a.jsxs("section",{className:p("wu-flex wu-items-center wu-justify-end wu-shrink-0 wu-gap-2",l==="rtl"?"wu-flex-row-reverse wu-pl-4":"wu-flex-row wu-pr-4"),children:[a.jsx(La,{dir:l}),(s==null?void 0:s.profile)&&Object.keys(s.profile).length>0&&a.jsx(Fa,{user:s,onLogout:o,dir:l,DataCenter:c})]})]})})},ze=Wt.Root,ut=Wt.Trigger,Oe=y.forwardRef(({className:e,align:t="center",sideOffset:n=4,...s},r)=>a.jsx(Wt.Portal,{children:a.jsx(Wt.Content,{ref:r,align:t,sideOffset:n,className:p("wu-z-50 wu-w-72 wu-border wu-bg-popover wu-p-4 wu-text-popover-foreground wu-shadow-md wu-outline-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...s})}));Oe.displayName=Wt.Content.displayName;function ja({className:e,classNames:t,dir:n="ltr",...s}){const r=Ia.getDefaultClassNames();return a.jsx(Ia.DayPicker,{showOutsideDays:s.showOutsideDays||!1,className:p("wu-p-3",e),classNames:{root:p(r.root,"wu-relative wu-rounded-none wu-bg-white dark:wu-bg-gray-switcher"),caption_label:p("wu-text-xs",s.captionLayout==="dropdown"?"wu-hidden":""),month_caption:p(r.month_caption,"wu-mb-5"),months:p(r.months,"wu-flex wu-flex-col sm:wu-flex-row wu-gap-4"),dropdowns:p(r.dropdowns,"wu-flex wu-items-center wu-justify-start wu-gap-2",(s.mode==="range","")),dropdown:p(r.dropdown,"wu-px-2 wu-py-1 wu-text-sm wu-text-gray-lead wu-font-medium focus:wu-outline-none wu-bg-white wu-border-b wu-border-gray-subtle focus-visible:wu-border-blue-p"),weekday:p(r.weekday,"wu-text-gray-lead wu-rounded-none wu-w-9 wu-font-normal wu-text-xs wu-bg-gray-10 wu-py-2"),day_button:p(r.day_button,"wu-w-full wu-h-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-2"),day:p(r.day,"wu-text-gray-lead wu-transition-colors wu-duration-300 [&:not([aria-selected])]:hover:wu-bg-gray-25 wu-text-sm wu-w-9 wu-h-9 wu-min-w-0 wu-text-center wu-p-0 wu-rounded-none data-[today=true]:[&:not([aria-selected])]:wu-border data-[today=true]:[&:not([aria-selected])]:wu-border-blue-p data-[today=true]:[&:not([aria-selected])]:wu-text-gray-lead"),selected:p(r.selected,"wu-bg-blue-p [&:not(.rm)]:wu-text-white hover:wu-bg-blue-pHover"),range_middle:p("rm",r.range_middle,"wu-bg-blue-p/10 wu-rounded-none hover:wu-bg-blue-p/20 wu-text-gray-lead hover:wu-text-white data-[today=true]:wu-bg-blue-p/20 hover:data-[today=true]:wu-bg-blue-pHover"),range_end:p(r.range_end,"wu-rounded-none"),range_start:p(r.range_start,"wu-rounded-none wu-bg-blue-p hover:wu-bg-blue-pHover"),month_grid:p(r.month_grid,"[&>thead>tr>th]:wu-pb-2 wu-border-collapse wu-space-y-1"),button_next:p(r.button_next,As({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-text-gray-lead"),button_previous:p(r.button_previous,As({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-rotate-180 wu-text-gray-lead"),nav:p(r.nav,"wu-absolute wu-top-4 wu-right-3 wu-flex",n==="rtl"&&"wu-right-auto wu-left-3 wu-flex-row-reverse"),chevron:p(r.chevron,"!wu-text-red-500"),outside:p(r.outside,"wu-invisible"),disabled:p(r.disabled,"hover:wu-bg-white wu-text-gray-subtle"),...t},components:{Chevron:()=>a.jsx("span",{className:"wm-chevron-right wu-text-lg wu-leading-5"})},...s})}ja.displayName="Calendar";const _s=e=>a.jsx(ja,{...e}),Ga=e=>{const{handleDateChange:t,disabled:n,onReset:s,showResetButton:r}=e;return a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-end wu-gap-2 wu-mt-2 wu-date-picker-footer",children:[r&&a.jsx(Ce,{variant:"secondary",onClick:s,Icon:a.jsx("span",{className:"wu-text-[20px] wu-leading-5 -wu-mt-[1px] wm-refresh"}),className:"wu-date-picker-footer-reset",children:"Reset"}),a.jsx(Lt.PopoverClose,{asChild:!0,children:a.jsx(Ce,{onClick:t,disabled:n,className:"wu-date-picker-apply",children:"Apply"})})]})},Vs=({formattedString:e,dir:t,placeholder:n="Select Date",className:s,variant:r="primary",color:o,CustomTrigger:i,...u})=>a.jsx(Lt.PopoverTrigger,{asChild:!i,dir:t,children:i?a.jsx(a.Fragment,{children:i(e)}):a.jsx(Ce,{...u,className:p("wu-justify-between wu-w-full wu-gap-2 wu-text-xs wu-border-b wu-rounded-none wu-rounded-t-sm wu-min-w-48 wu-border-gray-subtle wu-text-gray-lead wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light wu-bg-gray-10 hover disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-subtle hover:wu-text-gray-lead hover:wu-bg-gray-10 hover:wu-border-gray-40 wu-datepicker-trigger",r==="outlined"&&"wu-border wu-border-subtle wu-bg-transparent",s),Icon:a.jsx("span",{className:"wm-calendar-month wu-text-sm"}),iconPosition:"right",children:e||n})}),Ka=(e,t,n,s)=>{const r=Y.startOfDay(e).getTime();return!!(t||n&&r<Y.startOfDay(n).getTime()||s&&r>Y.startOfDay(s).getTime())},Mn=e=>e?typeof e=="string"?new Date(e):e:new Date,Os="\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])",Ld=[{label:"Last 7 days",value:7},{label:"Last 30 days",value:30},{label:"Last 90 days",value:90},{label:"Last 365 days",value:365}],Wd=({formatString:e="yyyy-MM-dd",value:t,onChange:n,disabled:s,minDate:r=Y.sub(new Date,{years:5}),maxDate:o=Y.add(new Date,{years:1}),dir:i="ltr",Label:u,labelPosition:l="top",onReset:d,showResetButton:c=!1,placeholder:w="Select Date",CustomTrigger:f,...m})=>{const[g,b]=h.useState(),[v,C]=h.useState(""),N=h.useCallback(()=>{const x=Mn(g);C(Y.format(x,e)),n&&n(g)},[g,e,n]),S=h.useCallback(()=>{d?d():(b(void 0),C(""),n&&n(void 0))},[n,d]);return h.useEffect(()=>{const x=Mn(t);b(x),C(Y.format(x,e))},[t,e]),a.jsxs(Te,{className:p("wu-flex wu-gap-1",l==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[u,a.jsxs(ze,{children:[a.jsx(Vs,{formattedString:v,dir:i,placeholder:w,CustomTrigger:f,...m}),a.jsx(Oe,{className:"wu-p-0 wu-w-fit wu-date-picker-content",align:"start",sideOffset:-.5,dir:i,children:a.jsx(_s,{dir:i,mode:"single",captionLayout:"dropdown",selected:g,onSelect:b,disabled:x=>Ka(x,s,r,o),startMonth:r,endMonth:o,required:!0,autoFocus:!0,defaultMonth:g,className:p("wu-border wu-border-blue-p wu-date-picker"),footer:a.jsx(Ga,{handleDateChange:N,disabled:s,onReset:S,showResetButton:c})})})]})]})},Ya="yyyy-MM-dd",Bd=[{label:"Day",value:1},{label:"Week",value:7},{label:"Month",value:30},{label:"Quarter",value:90},{label:"Year",value:365}],qd=({current:e,onSelect:t,presetRanges:n=Ld})=>{const[s,r]=h.useState(),[o,i]=h.useState(!1),[u,l]=h.useState(""),[d,c]=h.useState(""),[w,f]=h.useState(!1),m=h.useMemo(()=>n.map(N=>N.value),[n]),g=p("wu-flex wu-w-full wu-gap-2 wu-px-4 wu-py-2 wu-text-sm wu-text-gray-lead wu-transition-colors","wu-rounded-none hover:wu-bg-gray-10 focus:wu-outline-none focus-visible:wu-ring-2","focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-1 wu-text-start"),b=h.useCallback(N=>{if(N===void 0){r(void 0),i(!0);return}const S=Number(N)-1;r(S),i(!1),t({from:Y.sub(new Date,{days:S}),to:new Date})},[t]),v=h.useCallback((N,S)=>{if(!N||!(e!=null&&e.to)||!(e!=null&&e.from)||!new RegExp(Os).test(N))return!1;const T=new Date(S==="start"?N:e.from),A=new Date(S==="end"?N:e.to);return Y.isBefore(A,T)?(f(!0),!1):(f(!1),!(Y.isSameDay(T,e.from)&&Y.isSameDay(A,e.to)))},[e]),C=h.useCallback((N,S)=>{if((S==="start"?l:c)(N),v(N,S)){const T={from:e==null?void 0:e.from,to:e==null?void 0:e.to};S==="start"&&(T.from=new Date(N)),S==="end"&&(T.to=new Date(N)),t(T)}},[e,t,v]);return h.useEffect(()=>{if(e!=null&&e.to&&(e!=null&&e.from)&&Y.isValid(e.to)&&Y.isValid(e.from)){l(Y.format(e.from,Ya)),c(Y.format(e.to,Ya));const N=Y.differenceInCalendarDays(e.to,e.from);Y.isToday(e.to)&&m.includes(N+1)?(r(N),i(!1)):(r(void 0),i(!0))}},[e,m]),a.jsxs("div",{className:"wu-flex wu-flex-col wu-gap-1 wu-p-2 wu-bg-white wu-w-60 wu-date-picker-sidebar",children:[a.jsx("ul",{className:"wu-flex wu-gap-1 wu-py-2 wu-date-picker-batch-list",children:Bd.map(({label:N,value:S})=>a.jsx(vt,{variant:"secondary",className:"wu-px-1 wu-py-1 wu-text-xs wu-h-fit wu-min-w-fit disabled:wu-bg-white",disabled:S!==1,children:N},S))}),a.jsxs("ul",{className:"wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges",children:[n.map(({label:N,value:S})=>a.jsx("li",{children:a.jsx("button",{className:p(g,s===S-1&&"wu-bg-blue-p/10"),onClick:()=>b(S),children:N})},S)),a.jsx("li",{children:a.jsx("button",{className:p(g,o&&"wu-bg-blue-p/10"),onClick:()=>b(),children:"Custom Range"})})]}),a.jsxs("div",{className:"wu-relative wu-flex wu-gap-3 wu-pt-2 wu-date-picker-range-footer",children:[a.jsx(je,{placeholder:"Start Date",pattern:Os,value:u,onChange:N=>C(N.target.value,"start"),"aria-label":"Start Date"}),a.jsx(je,{placeholder:"End Date",pattern:Os,value:d,onChange:N=>C(N.target.value,"end"),"aria-label":"End Date"}),w?a.jsx("small",{className:"wu-absolute wu-text-[10px] wu-leading-[14px] wu-text-red-deep wu-left-0 -wu-bottom-4 wu-text-start",children:"End date must be after start date"}):a.jsx("small",{className:"wu-absolute wu-right-0 wu-leading-[14px] -wu-bottom-4 wu-text-gray-subtle wu-text-end",children:"yyyy-mm-dd"})]})]})},Xa={wuDateRangeNativeSidebar:"_wuDateRangeNativeSidebar_cvfo0_1",customInputs:"_customInputs_cvfo0_26"},zd=({Trigger:e,children:t,className:n,dir:s,open:r,onOpenChange:o,modal:i,...u})=>a.jsxs(ze,{open:r,onOpenChange:o,modal:i,children:[a.jsx(ut,{asChild:!0,dir:s,children:e}),a.jsx(Oe,{className:p("wu-w-80 wu-p-0 wu-border-blue-p wu-bg-white wu-dark:border-gray-switcher",n),dir:s,...u,children:t})]}),Fs=e=>a.jsx(Lt.PopoverClose,{asChild:!0,children:a.jsx(Ce,{...e})}),$d=[{label:"Last week",value:7},{label:"Last month",value:30},{label:"Last quarter",value:90},{label:"Last year",value:365}],St=e=>(e?new Date(e):new Date).toISOString().split("T")[0],Za=e=>Y.sub(new Date,{days:e}),Hd=e=>e?Y.sub(new Date,{days:1}):new Date;function Ud({ranges:e=$d,excludeToday:t=!0,current:n,onSelect:s,onReset:r,onApply:o,showResetButton:i=!0,...u}){const[l,d]=h.useState(St(n==null?void 0:n.from)),[c,w]=h.useState(St(n==null?void 0:n.to)),[f,m]=h.useState(!1),[g,b]=h.useState();h.useEffect(()=>{n!=null&&n.from&&d(St(n.from)),n!=null&&n.to&&w(St(n.to))},[n==null?void 0:n.from,n==null?void 0:n.to]),h.useEffect(()=>{if(n!=null&&n.from&&(n!=null&&n.to)){const x=Y.differenceInCalendarDays(n.to,n.from)+1;b(x);const T=e.find(A=>A.value===x);m(!T)}},[n,e]);const v=h.useCallback(S=>{b(S);const x=Za(S),T=Hd(t);d(St(x)),w(St(T)),s&&s({to:T,from:x})},[t,s]),C=h.useCallback((S,x)=>{const T=new Date(S);if(!isNaN(T.getTime())){if(x==="start"&&c){const A=new Date(c);if(T>A)return}if(x==="end"&&l){const A=new Date(l);if(T<A)return}x==="start"&&d(S),x==="end"&&w(S),s&&s({to:x==="end"?T:new Date(c),from:x==="start"?T:new Date(l)})}},[l,c,s]),N=h.useMemo(()=>e.map(S=>{const x=Za(S.value);return{...S,displayStartDate:Y.format(x,"d MMM yy"),displayEndLabel:t?"Yesterday":"Today"}}),[e,t]);return a.jsxs("div",{className:Xa.wuDateRangeNativeSidebar,...u,children:[a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("button",{onClick:()=>m(!0),"data-selected":f,"aria-pressed":f,"aria-label":"Select custom date range",children:"Custom Range"})}),a.jsxs("li",{className:Xa.customInputs,"data-expanded":f,children:[a.jsx(je,{type:"date",value:l,onChange:S=>C(S.target.value,"start"),Label:"Start"}),a.jsx(je,{type:"date",value:c,onChange:S=>C(S.target.value,"end"),Label:"End",min:l})]}),N.map(S=>a.jsx("li",{children:a.jsxs("button",{onClick:()=>{m(!1),v(S.value)},"data-selected":!f&&g===S.value,"aria-pressed":!f&&g===S.value,"aria-label":`Select ${S.label}`,children:[S.label," ",a.jsxs("small",{children:["(",S.displayStartDate," - ",S.displayEndLabel,")"]})]})},S.value))]}),a.jsxs("footer",{children:[i&&a.jsx(Fs,{variant:"secondary",Icon:a.jsx(Ve,{icon:"wm-refresh"}),onClick:r,children:"Reset"}),a.jsx(Fs,{onClick:o,children:"Apply"})]})]})}const jd=({formatString:e="yyyy/MM/dd",value:t,onChange:n,disabled:s,minDate:r=Y.sub(new Date,{years:5}),maxDate:o=Y.add(new Date,{years:1}),dir:i="ltr",minDateToSelect:u,maxDateToSelect:l,presetRanges:d,Label:c,labelPosition:w="top",onReset:f,showResetButton:m=!0,placeholder:g="Select Date Range",CustomTrigger:b,native:v,...C})=>{const[N,S]=h.useState(t),[x,T]=h.useState(t),[A,D]=h.useState(""),I=h.useCallback(()=>{if(x){const P=x.from,M=x.to;S({from:P,to:M}),D(`${Y.format(P,e)} - ${Y.format(M,e)}`),n&&n({from:P,to:M})}},[x,e,n]),k=h.useCallback(()=>{T(N)},[N]),F=h.useCallback(()=>{f?f():(S(void 0),T(void 0),D(""),n&&n(void 0))},[f,n]);return h.useEffect(()=>{if(t!=null&&t.from&&(t!=null&&t.to)){const P=Mn(t.from),M=Mn(t.to);S(t),T(t),D(`${Y.format(P,e)} - ${Y.format(M,e)}`)}else S(void 0),T({to:new Date,from:new Date})},[t,e]),a.jsxs(Te,{className:p("wu-flex wu-gap-1",w==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[c,a.jsxs(ze,{onOpenChange:P=>!P&&k(),children:[a.jsx(Vs,{formattedString:A,dir:i,placeholder:g,CustomTrigger:b,...C}),a.jsx(Oe,{className:"wu-flex wu-p-0 wu-border wu-w-fit wu-border-blue-p",align:"start",sideOffset:-.5,dir:i,children:v?a.jsx(Ud,{current:x,onSelect:P=>{T(P)},ranges:d,onApply:I,onReset:F,showResetButton:m}):a.jsxs(a.Fragment,{children:[a.jsx(qd,{current:x,onSelect:T,presetRanges:d}),a.jsx(_s,{dir:i,numberOfMonths:2,mode:"range",captionLayout:"dropdown",selected:x,onSelect:T,disabled:P=>Ka(P,s,r,o),startMonth:r,endMonth:o,required:!0,autoFocus:!0,defaultMonth:N==null?void 0:N.from,className:p("wu-shadow-none wu-date-range-picker"),min:u,max:l,footer:a.jsx(Ga,{handleDateChange:I,disabled:s,onReset:F,showResetButton:m})})]})})]})]})},Ja=h.forwardRef((e,t)=>{const{className:n,rounded:s,...r}=e;return a.jsx("div",{className:p("wu-card wu-p-2 wu-pt-1 hover:wu-shadow-card wu-border wu-border-black/20 hover:wu-border-black/30 wu-transition-colors wu-duration-300",s?"wu-rounded-lg":"wu-rounded-sm",n),ref:t,...r})});Ja.displayName="WuCard";const Qa=h.forwardRef((e,t)=>{const{className:n,...s}=e;return a.jsx("div",{ref:t,...s,className:p("wu-p-2 wu-mb-2 wu-border-b wu-border-gray-40 min-h-12 wu-card-header",n)})});Qa.displayName="WuCardHeader";const Ra=h.forwardRef((e,t)=>{const{className:n,...s}=e;return a.jsx("div",{ref:t,...s,className:p("wu-p-2 wu-mt-2 wu-border-t wu-border-gray-40 min-h-12 wu-card-footer",n)})});Ra.displayName="WuCardHeader";const eo=y.forwardRef(({className:e,partial:t,...n},s)=>a.jsx(ys.Root,{ref:s,className:p("wu-h-4 wu-w-4 wu-shrink-0 wu-rounded-[2px] wu-bg-white wu-border wu-border-gray-subtle wu-ring-offset-background focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[1px] data-[state=checked]:wu-bg-blue-p data-[state=checked]:wu-text-white data-[state=checked]:wu-border-none data-[state=checked]:hover:wu-bg-blue-q hover:wu-bg-gray-20 hover:wu-border-blue-p wu-transition-all data-[state=checked]:disabled:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-opacity-50 disabled:data-[state=unchecked]:wu-bg-gray-20 disabled:hover:wu-border-gray-subtle disabled:wu-border-gray-subtle",e),...n,children:a.jsxs(ys.Indicator,{className:p("wu-flex wu-items-center wu-justify-center wu-text-current"),children:[!t&&a.jsx("span",{className:"wm-check wu-text-base wu-leading-4"}),t&&a.jsx("span",{className:"wm-check-indeterminate-small wu-text-base wu-leading-4"})]})}));eo.displayName=ys.Root.displayName;const Fe=h.forwardRef((e,t)=>{const{disabled:n,checked:s,Label:r,labelPosition:o="right",className:i,id:u=Cn(),partial:l,onChange:d,required:c,readonly:w,...f}=e;return h.useEffect(()=>{f.defaultChecked!==void 0&&s!==void 0&&console.error("WuCheckbox: Both `checked` and `defaultChecked` cannot be used together. Use only one of them.")},[f.defaultChecked,s]),a.jsxs("div",{className:Gd({labelPosition:o,className:"wu-checkbox-container"}),dir:f.dir,children:[a.jsx(eo,{id:u,...f,partial:l,checked:s,disabled:n||w,onCheckedChange:d,className:p("wu-peer wu-checkbox",i),required:c,ref:t}),r&&a.jsx(Te,{htmlFor:u,className:"wu-w-full wu-checkbox-label",children:r})]})}),Gd=_e.cva("wu-flex wu-items-center wu-gap-2 wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row-reverse wu-text-right",right:"wu-flex-row"}}});Fe.displayName="WuCheckbox";const Kd=e=>{const{className:t,children:n,...s}=e;return a.jsx("span",{...s,className:p("wu-flex wu-items-center wu-justify-center wu-truncate wu-max-w-28 wu-w-fit wu-px-2 wu-py-1 wu-text-xs wu-bg-gray-20 wu-rounded-sm hover:wu-bg-gray-40 hover:wu-text-blue-q",t),children:n})},Ls=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command,{ref:n,className:p("wu-flex wu-h-full wu-w-full wu-flex-col wu-overflow-hidden wu-rounded-md",e),...t}));Ls.displayName=xe.Command.displayName;const to=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{className:"wu-flex wu-items-center wu-border-b wu-px-3",children:a.jsx(xe.Command.Input,{ref:n,className:p("wu-flex wu-h-11 wu-w-full wu-rounded-md wu-bg-transparent wu-py-3 wu-text-sm wu-outline-none wu-placeholder:wu-text-muted-foreground disabled:wu-cursor-not-allowed disabled:wu-opacity-50",e),...t})}));to.displayName=xe.Command.Input.displayName;const Ws=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command.List,{ref:n,className:p("",e),...t}));Ws.displayName=xe.Command.List.displayName;const Bs=y.forwardRef((e,t)=>a.jsx(xe.Command.Empty,{ref:t,className:"wu-text-center wu-p-2 wu-pb-2.5 wu-text-xs",...e}));Bs.displayName=xe.Command.Empty.displayName;const $t=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command.Group,{ref:n,className:p("",e),...t}));$t.displayName=xe.Command.Group.displayName;const no=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command.Separator,{ref:n,className:p("wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));no.displayName=xe.Command.Separator.displayName;const Ht=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command.Item,{ref:n,className:p("wu-relative wu-flex wu-cursor-default wu-gap-2 wu-select-none wu-items-center wu-rounded-sm wu-px-2 wu-py-3 wu-text-sm wu-outline-none data-[disabled=true]:wu-pointer-events-none data-[disabled=true]:wu-opacity-50 [&_svg]:wu-pointer-events-none [&_svg]:wu-size-4 [&_svg]:wu-shrink-0",e),...t}));Ht.displayName=xe.Command.Item.displayName;const Ct=h.forwardRef(({containerHeight:e=400,list:t,callback:n,dir:s,className:r,style:o},i)=>a.jsx(Xc.Virtuoso,{ref:i,dir:s,className:r,style:{height:e,scrollbarWidth:"thin",scrollbarColor:"#d4d4d4 #f1f1f1",overflowX:"hidden",...o},data:t,itemContent:(u,l)=>n(u,l)}));Ct.displayName="WuVirtualScroll";const Yd=({tags:e,triggerRef:t})=>{const[n,s]=h.useState([]),[r,o]=h.useState([]),i=h.useMemo(()=>a.jsx("ul",{className:"wu-flex wu-flex-col wu-items-start wu-justify-center wu-list-none",children:r.map((l,d)=>a.jsx("li",{className:"wu-py-1 wu-text-xs wu-text-left",children:l},d))}),[r]),u=l=>{const d=document.createElement("div");Object.assign(d.style,{display:"inline-block",visibility:"hidden",position:"absolute",whiteSpace:"nowrap"}),d.textContent=l,document.body.appendChild(d);const c=d.offsetWidth;return document.body.removeChild(d),c+8};return h.useEffect(()=>{const l=()=>{if(t.current){const f=t.current.offsetWidth-20-36;let m=0;const g=[],b=[];e.forEach(v=>{const C=u(v);m+C+8<f?(g.push(v),m+=C+8):b.push(v)}),s(g),o(b)}};return l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[e,t]),a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-text-xs",children:[n.map((l,d)=>a.jsx("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:l},d)),r.length>0&&a.jsx(En,{content:i,className:"wu-z-[51] wu-text-left",children:a.jsxs("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:["+",r.length]})})]})},Xd=({placeholder:e="Select...",isEllipse:t=!1,selectedOptions:n,variant:s="flat",dir:r="ltr",accessorKey:o,multiple:i,id:u,disabled:l,selectAll:d,isCheckedAll:c,className:w,...f})=>{const[m,g]=h.useState([]),b=h.useRef(null);h.useEffect(()=>{if(!n||Array.isArray(n)&&n.length===0){g([]);return}if(i){const C=n;g(C==null?void 0:C.map(N=>N[o.label]));return}else g([n[o.label]])},[n]);const v=()=>{var C;return m.length?c&&(d!=null&&d.enable)&&(d!=null&&d.triggerText)?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",children:d.triggerText}):t?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",style:{width:`${(((C=b.current)==null?void 0:C.offsetWidth)||0)-32}px`},children:m.join(", ")}):a.jsx(Yd,{tags:m,triggerRef:b}):a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:e})};return a.jsx(ut,{dir:r,asChild:!0,id:u,disabled:l,children:a.jsxs("button",{...f,ref:b,disabled:l,className:p("focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover wu-bg-white focus-visible:wu-ring-offset-2 wu-flex wu-w-full wu-items-center wu-justify-between wu-border-b wu-border-gray-subtle wu-py-1.5 wu-px-2 placeholder:wu-text-gray-40 focus:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-bg-gray-10 hover:wu-border-blue-p wu-transition-colors focus-visible:wu-bg-gray-20 focus-visible:wu-border-blue-p wu-cursor-pointer wu-text-xs wu-rounded-t-sm wu-gap-2 wu-h-8 wu-group/wuCombobox wu-combobox-trigger",s==="outlined"&&"wu-border wu-border-gray-subtle","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10",w),children:[v(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]/wuCombobox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},so=ee.Root,ro=ee.Trigger,ao=ee.Group,Zd=ee.Portal,Jd=ee.Sub,Qd=ee.RadioGroup,oo=y.forwardRef(({className:e,inset:t,children:n,position:s,...r},o)=>a.jsxs(ee.SubTrigger,{ref:o,className:p("wu-flex wu-cursor-default wu-select-none wu-text-xs wu-items-center wu-p-2 wu-outline-none focus:wu-bg-gray-20 data-[state=open]:wu-bg-gray-20",t&&"wu-pl-8",e),...r,children:[s==="left"&&a.jsx("span",{className:p("wm-chevron-right",r.dir==="rtl"&&"ml-2")}),n,s!=="left"&&a.jsx("span",{className:p("wu-text-base wu-leading-4",r.dir==="rtl"&&"wu-mr-auto wm-chevron-left",r.dir!=="rtl"&&"wu-ml-auto wm-chevron-right")})]}));oo.displayName=ee.SubTrigger.displayName;const io=y.forwardRef(({className:e,...t},n)=>a.jsx(ee.SubContent,{ref:n,className:p("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-lg data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...t}));io.displayName=ee.SubContent.displayName;const qs=y.forwardRef(({className:e,sideOffset:t=4,...n},s)=>a.jsx(ee.Portal,{children:a.jsx(ee.Content,{ref:s,sideOffset:t,className:p("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-md data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...n})}));qs.displayName=ee.Content.displayName;const In=y.forwardRef(({className:e,inset:t,...n},s)=>a.jsx(ee.Item,{ref:s,className:p("wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-p-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",t&&"wu-pl-8",e),...n}));In.displayName=ee.Item.displayName;const uo=y.forwardRef(({className:e,children:t,checked:n,dir:s,...r},o)=>a.jsxs(ee.CheckboxItem,{ref:o,className:p("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",s==="rtl"&&"wu-pr-8 wu-pl-2",s!=="rtl"&&"wu-pl-8 wu-pr-2",e),checked:n,...r,children:[a.jsx("span",{className:p("wu-absolute wu-flex wu-items-center wu-justify-center wu-w-4 wu-h-4 wu-rounded-sm wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-blue-p group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p",s==="rtl"&&"wu-right-2",s!=="rtl"&&"wu-left-2"),children:a.jsx(ee.ItemIndicator,{children:a.jsx("span",{className:"wm-check wu-text-base wu-text-white"})})}),t]}));uo.displayName=ee.CheckboxItem.displayName;const lo=y.forwardRef(({className:e,children:t,...n},s)=>a.jsxs(ee.RadioItem,{ref:s,className:p("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-pl-8 wu-pr-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 focus:wu-text-accent-foreground data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",e),...n,children:[a.jsx("span",{className:"wu-absolute wu-rounded-full wu-left-2 wu-flex wu-h-4 wu-w-4 wu-items-center wu-justify-center wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-white group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p group-hover:group-data-[state=checked]:wu-ring-blue-q",children:a.jsx(ee.ItemIndicator,{className:"wu-w-4 wu-h-4 wu-flex wu-items-center wu-justify-center",children:a.jsx("span",{className:"wm-circle wu-text-blue-p group-hover:group-data-[state=checked]:wu-text-blue-q wu-text-xs"})})}),t]}));lo.displayName=ee.RadioItem.displayName;const Ut=y.forwardRef(({className:e,inset:t,...n},s)=>a.jsx(ee.Label,{ref:s,className:p("wu-p-2 wu-font-medium wu-text-xs",t&&"wu-pl-8",e),...n}));Ut.displayName=ee.Label.displayName;const Dn=y.forwardRef(({className:e,...t},n)=>a.jsx(ee.Separator,{ref:n,className:p("-wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));Dn.displayName=ee.Separator.displayName;const co=({option:e,value:t,multiple:n=!1,onSelect:s,accessorKey:r,dir:o})=>{const[i,u]=h.useState(n?[]:"");h.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[r.value])):JSON.stringify(t[r.value]))},[t,r.value,n]);const l=n?i.includes(JSON.stringify(e[r.value])):i===JSON.stringify(e[r.value]),d=()=>{e.disabled||s(e)};return a.jsxs(Ht,{onSelect:d,disabled:e.disabled,className:p("wu-cursor-pointer wu-text-xs wu-items-start wu-leading-4 wu-py-2 wu-combobox-item hover:wu-bg-gray-100",l&&"wu-bg-gray-10"),dir:o,children:[n&&a.jsx(Fe,{checked:l}),a.jsx(Rd,{option:e,accessorKey:r})]})},Rd=({option:e,accessorKey:t})=>{const n=e[t.label];return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1",children:[e.icon&&e.icon,n,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wu-text-sm wm-lock wu-text-orange-deep"})]})},wo=e=>{const{option:t,selectAll:n,handleSelectAll:s,isCheckedAll:r,isPartialSelected:o,...i}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(Ht,{onSelect:s,className:p("wu-cursor-pointer wu-text-xs wu-leading-4 wu-py-2 wu-combobox-item"),dir:i.dir,children:[a.jsx(Fe,{checked:r||o,partial:o,"data-partial":o,"aria-label":(n==null?void 0:n.label)||"Select All"}),a.jsx("span",{"aria-hidden":!0,children:(n==null?void 0:n.label)||"Select All"})]});case"group":return a.jsxs($t,{children:[a.jsx(Ut,{children:t.label}),t.options.map((l,d)=>h.createElement(co,{...i,option:l,key:d}))]});case"divider":return a.jsx(no,{className:"wu-mx-4"});default:return a.jsx(co,{...i,option:t})}},ew=e=>{const t=[],n=[],s=[],r=[];return e.forEach(o=>{o.type==="group"?(t.push(o),s.push(...o.options),r.push(...o.options.filter(i=>!i.disabled))):o.type==="divider"?n.push(o):s.push(o),o!=null&&o.disabled||r.push(o)}),{groups:t,dividers:n,allOptions:s,enabledOptions:r}},tw=h.memo(je),nw=({data:e,accessorKey:t,value:n,defaultValue:s,Header:r,virtualizedThreshold:o=100,isEllipse:i,placeholder:u,variant:l,dir:d,onSelect:c,Label:w,maxHeight:f=420,multiple:m=!1,hasGroup:g=!1,selectAll:b,id:v,disabled:C,labelPosition:N="top",className:S,onScroll:x,maxContentWidth:T,enableSearch:A=!0,noDataContent:D,...I})=>{const[k,F]=h.useState(""),[P,M]=h.useState(),[V,W]=h.useState(!1),[_,q]=h.useState(!1),[B,U]=h.useState(!1),$=h.useRef(null),{allOptions:H,enabledOptions:pe}=h.useMemo(()=>g||b&&!b.includeDisabled?ew(e):{allOptions:e,groups:[],dividers:[],enabledOptions:[]},[e,g]),de=h.useMemo(()=>{if(!k)return e;const z=k.toLowerCase();return H.filter(J=>J[t.label].toLowerCase().includes(z))},[k,H,e,t.label]),De=h.useMemo(()=>m&&b!=null&&b.enable&&!k&&de.length>0?[{type:"all"},...de]:de,[de,k,m]),ge=h.useCallback(z=>{const J=z[t.value];m?M(ie=>{const Ae=ie||[],be=Ae.some(ve=>ve[t.value]===J)?Ae.filter(ve=>ve[t.value]!==J):[...Ae,z];return c==null||c(be),be}):(W(!1),M(z),c==null||c(z))},[m,t.value,c]),X=h.useCallback(z=>F(z.target.value),[]),L=h.useCallback(()=>F(""),[]);h.useEffect(()=>{if(n!==void 0&&s!==void 0){console.error("defaultValue and value cannot be used simultaneously");return}else n!==void 0?M(n):s!==void 0&&M(s)},[n,s]),h.useEffect(()=>{if(!m)return;const z=b!=null&&b.includeDisabled?(P==null?void 0:P.length)===H.length:(P==null?void 0:P.length)===pe.length;q(z);const J=(P==null?void 0:P.length)>0&&!z;U(J)},[P,b]);const j=h.useCallback(()=>{const z=_?[]:b!=null&&b.includeDisabled?H:pe;M(z),c==null||c(z)},[_,m,H,pe,c,b]),K=zt(N);return a.jsxs("div",{className:p(K,"wu-flex wu-combobox-container"),ref:$,children:[a.jsxs(ze,{onOpenChange:z=>{z&&L(),W(z)},open:V,modal:!0,children:[a.jsx(Xd,{selectedOptions:P,accessorKey:t,isEllipse:i,placeholder:u,variant:l,dir:d,multiple:m,disabled:C,selectAll:b,isCheckedAll:_,className:S,id:v,...I}),a.jsx(Oe,{className:"wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-p-0 wu-bg-white wu-border wu-border-blue-p wu-combobox-content",align:"start",sideOffset:-1,style:{maxWidth:T},children:a.jsxs(Ls,{id:v,children:[A&&a.jsx("div",{className:"wu-m-2",children:a.jsx(tw,{placeholder:"Search...",Icon:a.jsx("span",{className:"wm-search"}),className:"wu-text-xs wu-combobox-search",onChange:X,name:"Search","aria-label":"Search",dir:d,iconPosition:d==="rtl"?"right":"left"})}),r,a.jsxs(Ws,{children:[a.jsx(Bs,{children:D||"No results found."}),De.length>=o?a.jsx(Ct,{className:"wu-combobox-list",containerHeight:f,list:De,callback:(z,J)=>a.jsx(wo,{option:J,value:P,onSelect:ge,multiple:m,accessorKey:t,dir:d,selectAll:b,handleSelectAll:j,isCheckedAll:_,isPartialSelected:B},z),dir:d}):a.jsx("div",{style:{height:"fit-content",maxHeight:f,overflow:"auto"},className:"wu-combobox-list",onScroll:x,children:De.map((z,J)=>a.jsx(wo,{option:z,value:P,onSelect:ge,multiple:m,accessorKey:t,dir:d,selectAll:b,handleSelectAll:j,isCheckedAll:_,isPartialSelected:B},J))})]})]})})]}),w&&a.jsx(Te,{htmlFor:v,className:"wu-combobox-label",children:w})]})},sw=e=>{const{textToCopy:t,notificationText:n,...s}=e,[r,o]=h.useState(!1),i=async()=>{if(t)try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),2e3)}catch(u){console.error("Failed to copy:",u)}};return a.jsxs(Ce,{...s,onClick:i,variant:"iconOnly",className:p("wu-relative",e.className),"aria-label":"Copy to clipboard",children:[n&&a.jsx("span",{className:p("wu-absolute wu-text-[6px] wu-leading-3 -wu-top-4 wu-right-0 wu-bg-gray-notification wu-text-white wu-rounded-sm wu-shadow-md wu-px-1 wu-animate-ping-once",r?"wu-block":"wu-hidden"),children:n}),a.jsx(Ve,{icon:"wm-content-copy",className:"wu-text-lg"})]})},fo=R.Root,rw=R.Trigger,aw=R.Close,ow=R.Portal,po=y.forwardRef(({className:e,...t},n)=>a.jsx(R.Overlay,{className:p("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30 data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0","wu-drawer-overlay",e),...t,ref:n}));po.displayName=R.Overlay.displayName;const iw=_e.cva("wu-fixed wu-z-50 wu-gap-4 wu-p-6 wu-shadow-lg wu-transition wu-ease-in-out data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-duration-500 data-[state=open]:wu-duration-500",{variants:{side:{top:"wu-inset-x-0 wu-top-0 wu-border-b data-[state=closed]:wu-slide-out-to-top data-[state=open]:wu-slide-in-from-top",bottom:"wu-inset-x-0 wu-bottom-0 wu-border-t data-[state=closed]:wu-slide-out-to-bottom data-[state=open]:wu-slide-in-from-bottom",left:"wu-inset-y-0 wu-left-0 wu-h-full wu-w-3/4 wu-border-r data-[state=closed]:wu-slide-out-to-left data-[state=open]:wu-slide-in-from-left sm:wu-max-w-sm",right:"wu-inset-y-0 wu-right-0 wu-h-full wu-w-3/4 wu-border-l data-[state=closed]:wu-slide-out-to-right data-[state=open]:wu-slide-in-from-right sm:wu-max-w-sm"}},defaultVariants:{side:"right"}}),zs=y.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:s,overlayClassName:r,closeButtonClassName:o,...i},u)=>a.jsxs(ow,{children:[a.jsx(po,{className:r}),a.jsxs(R.Content,{ref:u,className:p(iw({side:e}),t),...i,children:[n,!s&&a.jsx(R.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(vt,{variant:"iconOnly",className:p("wu-absolute wu-right-4 wu-top-4",o),children:[a.jsx("span",{className:"wm-close"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));zs.displayName=R.Content.displayName;const ho=y.forwardRef(({className:e,...t},n)=>a.jsx(R.Title,{ref:n,className:p("wu-text-lg wu-font-semibold",e),...t}));ho.displayName=R.Title.displayName;const uw=y.forwardRef(({className:e,...t},n)=>a.jsx(R.Description,{ref:n,className:p("wu-text-sm",e),...t}));uw.displayName=R.Description.displayName;const lw=e=>t=>{e&&t.preventDefault()},cw=e=>{const{Trigger:t,children:n,hideCloseButton:s,className:r,side:o="left",open:i,onOpenChange:u,preventClickOutside:l,overlayClassName:d,closeButtonClassName:c,...w}=e;return a.jsxs(fo,{open:i,onOpenChange:u,children:[a.jsx(rw,{asChild:!0,children:t}),a.jsxs(zs,{onInteractOutside:lw(l),side:o,className:p("wu-bg-white wu-text-gray-lead wu-px-0",r),hideCloseButton:s,overlayClassName:d,closeButtonClassName:c,...w,children:[a.jsx("div",{className:"wu-hidden",children:a.jsx(ho,{})}),n]})]})},dw=({children:e,...t})=>a.jsx(aw,{...t,children:e}),mo=h.createContext({});function $s(e){const t=h.useRef(null);return t.current===null&&(t.current=e()),t.current}const go=typeof window<"u",bo=go?h.useLayoutEffect:h.useEffect,An=h.createContext(null);function ww(e,t){e.indexOf(t)===-1&&e.push(t)}function fw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Xe=(e,t,n)=>n>t?t:n<e?e:n;function Hs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let jt=()=>{},lt=()=>{};typeof process<"u"&&((qc=process.env)==null?void 0:qc.NODE_ENV)!=="production"&&(jt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Hs(t,n))},lt=(e,t,n)=>{if(!e)throw new Error(Hs(t,n))});const Ge={},yo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function pw(e){return typeof e=="object"&&e!==null}const xo=e=>/^0[^.\s]+$/u.test(e);function Us(e){let t;return()=>(t===void 0&&(t=e()),t)}const Tt=e=>e,hw=(e,t)=>n=>t(e(n)),kn=(...e)=>e.reduce(hw),vo=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class No{constructor(){this.subscriptions=[]}add(t){return ww(this.subscriptions,t),()=>fw(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let o=0;o<r;o++){const i=this.subscriptions[o];i&&i(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $e=e=>e*1e3,Le=e=>e/1e3;function So(e,t){return t?e*(1e3/t):0}const Co=new Set;function To(e,t,n){e||Co.has(t)||(console.warn(Hs(t,n)),Co.add(t))}const Eo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mw=1e-7,gw=12;function bw(e,t,n,s,r){let o,i,u=0;do i=t+(n-t)/2,o=Eo(i,s,r)-e,o>0?n=i:t=i;while(Math.abs(o)>mw&&++u<gw);return i}function Gt(e,t,n,s){if(e===t&&n===s)return Tt;const r=o=>bw(o,0,1,e,n);return o=>o===0||o===1?o:Eo(r(o),t,s)}const Mo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Io=e=>t=>1-e(1-t),Do=Gt(.33,1.53,.69,.99),js=Io(Do),Ao=Mo(js),ko=e=>(e*=2)<1?.5*js(e):.5*(2-Math.pow(2,-10*(e-1))),Gs=e=>1-Math.sin(Math.acos(e)),yw=Io(Gs),Po=Mo(Gs),xw=Gt(.42,0,1,1),vw=Gt(0,0,.58,1),_o=Gt(.42,0,.58,1),Nw=e=>Array.isArray(e)&&typeof e[0]!="number",Vo=e=>Array.isArray(e)&&typeof e[0]=="number",Oo={linear:Tt,easeIn:xw,easeInOut:_o,easeOut:vw,circIn:Gs,circInOut:Po,circOut:yw,backIn:js,backInOut:Ao,backOut:Do,anticipate:ko},Sw=e=>typeof e=="string",Fo=e=>{if(Vo(e)){lt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,r]=e;return Gt(t,n,s,r)}else if(Sw(e))return lt(Oo[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Oo[e];return e},Pn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Cw(e,t){let n=new Set,s=new Set,r=!1,o=!1;const i=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function l(c){i.has(c)&&(d.schedule(c),e()),c(u)}const d={schedule:(c,w=!1,f=!1)=>{const g=f&&r?n:s;return w&&i.add(c),g.has(c)||g.add(c),c},cancel:c=>{s.delete(c),i.delete(c)},process:c=>{if(u=c,r){o=!0;return}r=!0,[n,s]=[s,n],n.forEach(l),n.clear(),r=!1,o&&(o=!1,d.process(c))}};return d}const Tw=40;function Lo(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=Pn.reduce((S,x)=>(S[x]=Cw(o),S),{}),{setup:u,read:l,resolveKeyframes:d,preUpdate:c,update:w,preRender:f,render:m,postRender:g}=i,b=()=>{const S=Ge.useManualTiming?r.timestamp:performance.now();n=!1,Ge.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(S-r.timestamp,Tw),1)),r.timestamp=S,r.isProcessing=!0,u.process(r),l.process(r),d.process(r),c.process(r),w.process(r),f.process(r),m.process(r),g.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(b))},v=()=>{n=!0,s=!0,r.isProcessing||e(b)};return{schedule:Pn.reduce((S,x)=>{const T=i[x];return S[x]=(A,D=!1,I=!1)=>(n||v(),T.schedule(A,D,I)),S},{}),cancel:S=>{for(let x=0;x<Pn.length;x++)i[Pn[x]].cancel(S)},state:r,steps:i}}const{schedule:We,cancel:Ks,state:_n}=Lo(typeof requestAnimationFrame<"u"?requestAnimationFrame:Tt,!0);let Vn;function Ew(){Vn=void 0}const Ee={now:()=>(Vn===void 0&&Ee.set(_n.isProcessing||Ge.useManualTiming?_n.timestamp:performance.now()),Vn),set:e=>{Vn=e,queueMicrotask(Ew)}},Wo=e=>t=>typeof t=="string"&&t.startsWith(e),Bo=Wo("--"),Mw=Wo("var(--"),Ys=e=>Mw(e)?Iw.test(e.split("/*")[0].trim()):!1,Iw=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qo(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Et={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Kt={...Et,transform:e=>Xe(0,1,e)},On={...Et,default:1},Yt=e=>Math.round(e*1e5)/1e5,Xs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Dw(e){return e==null}const Aw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zs=(e,t)=>n=>!!(typeof n=="string"&&Aw.test(n)&&n.startsWith(e)||t&&!Dw(n)&&Object.prototype.hasOwnProperty.call(n,t)),zo=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,o,i,u]=s.match(Xs);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(i),alpha:u!==void 0?parseFloat(u):1}},kw=e=>Xe(0,255,e),Js={...Et,transform:e=>Math.round(kw(e))},ct={test:Zs("rgb","red"),parse:zo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+Js.transform(e)+", "+Js.transform(t)+", "+Js.transform(n)+", "+Yt(Kt.transform(s))+")"};function Pw(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const Qs={test:Zs("#"),parse:Pw,transform:ct.transform},Xt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ze=Xt("deg"),Mt=Xt("%"),O=Xt("px"),_w=Xt("vh"),Vw=Xt("vw"),$o={...Mt,parse:e=>Mt.parse(e)/100,transform:e=>Mt.transform(e*100)},It={test:Zs("hsl","hue"),parse:zo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+Mt.transform(Yt(t))+", "+Mt.transform(Yt(n))+", "+Yt(Kt.transform(s))+")"},le={test:e=>ct.test(e)||Qs.test(e)||It.test(e),parse:e=>ct.test(e)?ct.parse(e):It.test(e)?It.parse(e):Qs.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ct.transform(e):It.transform(e),getAnimatableNone:e=>{const t=le.parse(e);return t.alpha=0,le.transform(t)}},Ow=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fw(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Xs))==null?void 0:t.length)||0)+(((n=e.match(Ow))==null?void 0:n.length)||0)>0}const Ho="number",Uo="color",Lw="var",Ww="var(",jo="${}",Bw=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Zt(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let o=0;const u=t.replace(Bw,l=>(le.test(l)?(s.color.push(o),r.push(Uo),n.push(le.parse(l))):l.startsWith(Ww)?(s.var.push(o),r.push(Lw),n.push(l)):(s.number.push(o),r.push(Ho),n.push(parseFloat(l))),++o,jo)).split(jo);return{values:n,split:u,indexes:s,types:r}}function Go(e){return Zt(e).values}function Ko(e){const{split:t,types:n}=Zt(e),s=t.length;return r=>{let o="";for(let i=0;i<s;i++)if(o+=t[i],r[i]!==void 0){const u=n[i];u===Ho?o+=Yt(r[i]):u===Uo?o+=le.transform(r[i]):o+=r[i]}return o}}const qw=e=>typeof e=="number"?0:le.test(e)?le.getAnimatableNone(e):e;function zw(e){const t=Go(e);return Ko(e)(t.map(qw))}const Je={test:Fw,parse:Go,createTransformer:Ko,getAnimatableNone:zw};function Rs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function $w({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let r=0,o=0,i=0;if(!t)r=o=i=n;else{const u=n<.5?n*(1+t):n+t-n*t,l=2*n-u;r=Rs(l,u,e+1/3),o=Rs(l,u,e),i=Rs(l,u,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:s}}function Fn(e,t){return n=>n>0?t:e}const Jt=(e,t,n)=>e+(t-e)*n,er=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},Hw=[Qs,ct,It],Uw=e=>Hw.find(t=>t.test(e));function Yo(e){const t=Uw(e);if(jt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===It&&(n=$w(n)),n}const Xo=(e,t)=>{const n=Yo(e),s=Yo(t);if(!n||!s)return Fn(e,t);const r={...n};return o=>(r.red=er(n.red,s.red,o),r.green=er(n.green,s.green,o),r.blue=er(n.blue,s.blue,o),r.alpha=Jt(n.alpha,s.alpha,o),ct.transform(r))},tr=new Set(["none","hidden"]);function jw(e,t){return tr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Gw(e,t){return n=>Jt(e,t,n)}function nr(e){return typeof e=="number"?Gw:typeof e=="string"?Ys(e)?Fn:le.test(e)?Xo:Xw:Array.isArray(e)?Zo:typeof e=="object"?le.test(e)?Xo:Kw:Fn}function Zo(e,t){const n=[...e],s=n.length,r=e.map((o,i)=>nr(o)(o,t[i]));return o=>{for(let i=0;i<s;i++)n[i]=r[i](o);return n}}function Kw(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=nr(e[r])(e[r],t[r]));return r=>{for(const o in s)n[o]=s[o](r);return n}}function Yw(e,t){const n=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],i=e.indexes[o][s[o]],u=e.values[i]??0;n[r]=u,s[o]++}return n}const Xw=(e,t)=>{const n=Je.createTransformer(t),s=Zt(e),r=Zt(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?tr.has(e)&&!r.values.length||tr.has(t)&&!s.values.length?jw(e,t):kn(Zo(Yw(s,r),r.values),n):(jt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Fn(e,t))};function Jo(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Jt(e,t,n):nr(e)(e,t)}const Zw=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>We.update(t,n),stop:()=>Ks(t),now:()=>_n.isProcessing?_n.timestamp:Ee.now()}},Qo=(e,t,n=10)=>{let s="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)s+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ln=2e4;function sr(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Ln;)t+=n,s=e.next(t);return t>=Ln?1/0:t}function Jw(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(sr(s),Ln);return{type:"keyframes",ease:o=>s.next(r*o).value/t,duration:Le(r)}}const Qw=5;function Ro(e,t,n){const s=Math.max(t-Qw,0);return So(n-e(s),t-s)}const se={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},rr=.001;function Rw({duration:e=se.duration,bounce:t=se.bounce,velocity:n=se.velocity,mass:s=se.mass}){let r,o;jt(e<=$e(se.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Xe(se.minDamping,se.maxDamping,i),e=Xe(se.minDuration,se.maxDuration,Le(e)),i<1?(r=d=>{const c=d*i,w=c*e,f=c-n,m=ar(d,i),g=Math.exp(-w);return rr-f/m*g},o=d=>{const w=d*i*e,f=w*n+n,m=Math.pow(i,2)*Math.pow(d,2)*e,g=Math.exp(-w),b=ar(Math.pow(d,2),i);return(-r(d)+rr>0?-1:1)*((f-m)*g)/b}):(r=d=>{const c=Math.exp(-d*e),w=(d-n)*e+1;return-rr+c*w},o=d=>{const c=Math.exp(-d*e),w=(n-d)*(e*e);return c*w});const u=5/e,l=tf(r,o,u);if(e=$e(e),isNaN(l))return{stiffness:se.stiffness,damping:se.damping,duration:e};{const d=Math.pow(l,2)*s;return{stiffness:d,damping:i*2*Math.sqrt(s*d),duration:e}}}const ef=12;function tf(e,t,n){let s=n;for(let r=1;r<ef;r++)s=s-e(s)/t(s);return s}function ar(e,t){return e*Math.sqrt(1-t*t)}const nf=["duration","bounce"],sf=["stiffness","damping","mass"];function ei(e,t){return t.some(n=>e[n]!==void 0)}function rf(e){let t={velocity:se.velocity,stiffness:se.stiffness,damping:se.damping,mass:se.mass,isResolvedFromDuration:!1,...e};if(!ei(e,sf)&&ei(e,nf))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,o=2*Xe(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:se.mass,stiffness:r,damping:o}}else{const n=Rw(e);t={...t,...n,mass:se.mass},t.isResolvedFromDuration=!0}return t}function Wn(e=se.visualDuration,t=se.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:r}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:l,damping:d,mass:c,duration:w,velocity:f,isResolvedFromDuration:m}=rf({...n,velocity:-Le(n.velocity||0)}),g=f||0,b=d/(2*Math.sqrt(l*c)),v=i-o,C=Le(Math.sqrt(l/c)),N=Math.abs(v)<5;s||(s=N?se.restSpeed.granular:se.restSpeed.default),r||(r=N?se.restDelta.granular:se.restDelta.default);let S;if(b<1){const T=ar(C,b);S=A=>{const D=Math.exp(-b*C*A);return i-D*((g+b*C*v)/T*Math.sin(T*A)+v*Math.cos(T*A))}}else if(b===1)S=T=>i-Math.exp(-C*T)*(v+(g+C*v)*T);else{const T=C*Math.sqrt(b*b-1);S=A=>{const D=Math.exp(-b*C*A),I=Math.min(T*A,300);return i-D*((g+b*C*v)*Math.sinh(I)+T*v*Math.cosh(I))/T}}const x={calculatedDuration:m&&w||null,next:T=>{const A=S(T);if(m)u.done=T>=w;else{let D=T===0?g:0;b<1&&(D=T===0?$e(g):Ro(S,T,A));const I=Math.abs(D)<=s,k=Math.abs(i-A)<=r;u.done=I&&k}return u.value=u.done?i:A,u},toString:()=>{const T=Math.min(sr(x),Ln),A=Qo(D=>x.next(T*D).value,T,30);return T+"ms "+A},toTransition:()=>{}};return x}Wn.applyToOptions=e=>{const t=Jw(e,100,Wn);return e.ease=t.ease,e.duration=$e(t.duration),e.type="keyframes",e};function or({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:i,min:u,max:l,restDelta:d=.5,restSpeed:c}){const w=e[0],f={done:!1,value:w},m=I=>u!==void 0&&I<u||l!==void 0&&I>l,g=I=>u===void 0?l:l===void 0||Math.abs(u-I)<Math.abs(l-I)?u:l;let b=n*t;const v=w+b,C=i===void 0?v:i(v);C!==v&&(b=C-w);const N=I=>-b*Math.exp(-I/s),S=I=>C+N(I),x=I=>{const k=N(I),F=S(I);f.done=Math.abs(k)<=d,f.value=f.done?C:F};let T,A;const D=I=>{m(f.value)&&(T=I,A=Wn({keyframes:[f.value,g(f.value)],velocity:Ro(S,I,f.value),damping:r,stiffness:o,restDelta:d,restSpeed:c}))};return D(0),{calculatedDuration:null,next:I=>{let k=!1;return!A&&T===void 0&&(k=!0,x(I),D(I)),T!==void 0&&I>=T?A.next(I-T):(!k&&x(I),f)}}}function af(e,t,n){const s=[],r=n||Ge.mix||Jo,o=e.length-1;for(let i=0;i<o;i++){let u=r(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||Tt:t;u=kn(l,u)}s.push(u)}return s}function of(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const o=e.length;if(lt(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=af(t,s,r),l=u.length,d=c=>{if(i&&c<e[0])return t[0];let w=0;if(l>1)for(;w<e.length-2&&!(c<e[w+1]);w++);const f=vo(e[w],e[w+1],c);return u[w](f)};return n?c=>d(Xe(e[0],e[o-1],c)):d}function uf(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=vo(0,t,s);e.push(Jt(n,1,r))}}function lf(e){const t=[0];return uf(t,e.length-1),t}function cf(e,t){return e.map(n=>n*t)}function df(e,t){return e.map(()=>t||_o).splice(0,e.length-1)}function Dt({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=Nw(s)?s.map(Fo):Fo(s),o={done:!1,value:t[0]},i=cf(n&&n.length===t.length?n:lf(t),e),u=of(i,t,{ease:Array.isArray(r)?r:df(t,r)});return{calculatedDuration:e,next:l=>(o.value=u(l),o.done=l>=e,o)}}const wf=e=>e!==null;function ir(e,{repeat:t,repeatType:n="loop"},s,r=1){const o=e.filter(wf),u=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||s===void 0?o[u]:s}const ff={decay:or,inertia:or,tween:Dt,keyframes:Dt,spring:Wn};function ti(e){typeof e.type=="string"&&(e.type=ff[e.type])}class ur{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const pf=e=>e/100;class lr extends ur{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,r;const{motionValue:n}=this.options;n&&n.updatedAt!==Ee.now()&&this.tick(Ee.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(s=this.options).onStop)==null||r.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ti(t);const{type:n=Dt,repeat:s=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=t;let{keyframes:u}=t;const l=n||Dt;process.env.NODE_ENV!=="production"&&l!==Dt&&lt(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),l!==Dt&&typeof u[0]!="number"&&(this.mixKeyframes=kn(pf,Jo(u[0],u[1])),u=[0,100]);const d=l({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...u].reverse(),velocity:-i})),d.calculatedDuration===null&&(d.calculatedDuration=sr(d));const{calculatedDuration:c}=d;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(s+1)-r,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:r,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:u,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:d=0,keyframes:c,repeat:w,repeatType:f,repeatDelay:m,type:g,onUpdate:b,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const C=this.currentTime-d*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?C<0:C>r;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let S=this.currentTime,x=s;if(w){const I=Math.min(this.currentTime,r)/u;let k=Math.floor(I),F=I%1;!F&&I>=1&&(F=1),F===1&&k--,k=Math.min(k,w+1),!!(k%2)&&(f==="reverse"?(F=1-F,m&&(F-=m/u)):f==="mirror"&&(x=i)),S=Xe(0,1,F)*u}const T=N?{done:!1,value:c[0]}:x.next(S);o&&(T.value=o(T.value));let{done:A}=T;!N&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return D&&g!==or&&(T.value=ir(c,this.options,v,this.speed)),b&&b(T.value),D&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return Le(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Le(t)}get time(){return Le(this.currentTime)}set time(t){var n;t=$e(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ee.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Le(this.currentTime))}play(){var r,o;if(this.isStopped)return;const{driver:t=Zw,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(r=this.options).onPlay)==null||o.call(r);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ee.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function hf(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const dt=e=>e*180/Math.PI,cr=e=>{const t=dt(Math.atan2(e[1],e[0]));return dr(t)},mf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:cr,rotateZ:cr,skewX:e=>dt(Math.atan(e[1])),skewY:e=>dt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},dr=e=>(e=e%360,e<0&&(e+=360),e),ni=cr,si=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ri=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),gf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:si,scaleY:ri,scale:e=>(si(e)+ri(e))/2,rotateX:e=>dr(dt(Math.atan2(e[6],e[5]))),rotateY:e=>dr(dt(Math.atan2(-e[2],e[0]))),rotateZ:ni,rotate:ni,skewX:e=>dt(Math.atan(e[4])),skewY:e=>dt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function wr(e){return e.includes("scale")?1:0}function fr(e,t){if(!e||e==="none")return wr(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=gf,r=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=mf,r=u}if(!r)return wr(t);const o=s[t],i=r[1].split(",").map(yf);return typeof o=="function"?o(i):i[o]}const bf=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return fr(n,t)};function yf(e){return parseFloat(e.trim())}const At=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kt=new Set(At),ai=e=>e===Et||e===O,xf=new Set(["x","y","z"]),vf=At.filter(e=>!xf.has(e));function Nf(e){const t=[];return vf.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Qe={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>fr(t,"x"),y:(e,{transform:t})=>fr(t,"y")};Qe.translateX=Qe.x,Qe.translateY=Qe.y;const wt=new Set;let pr=!1,hr=!1,mr=!1;function oi(){if(hr){const e=Array.from(wt).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=Nf(s);r.length&&(n.set(s,r),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=n.get(s);r&&r.forEach(([o,i])=>{var u;(u=s.getValue(o))==null||u.set(i)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}hr=!1,pr=!1,wt.forEach(e=>e.complete(mr)),wt.clear()}function ii(){wt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hr=!0)})}function Sf(){mr=!0,ii(),oi(),mr=!1}class gr{constructor(t,n,s,r,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(wt.add(this),pr||(pr=!0,We.read(ii),We.resolveKeyframes(oi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:r}=this;if(t[0]===null){const o=r==null?void 0:r.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const u=s.readValue(n,i);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=i),r&&o===void 0&&r.set(t[0])}hf(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),wt.delete(this)}cancel(){this.state==="scheduled"&&(wt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Cf=e=>e.startsWith("--");function Tf(e,t,n){Cf(t)?e.style.setProperty(t,n):e.style[t]=n}const Ef=Us(()=>window.ScrollTimeline!==void 0),Mf={};function If(e,t){const n=Us(e);return()=>Mf[t]??n()}const ui=If(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Qt=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,li={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qt([0,.65,.55,1]),circOut:Qt([.55,0,1,.45]),backIn:Qt([.31,.01,.66,-.59]),backOut:Qt([.33,1.53,.69,.99])};function ci(e,t){if(e)return typeof e=="function"?ui()?Qo(e,t):"ease-out":Vo(e)?Qt(e):Array.isArray(e)?e.map(n=>ci(n,t)||li.easeOut):li[e]}function Df(e,t,n,{delay:s=0,duration:r=300,repeat:o=0,repeatType:i="loop",ease:u="easeOut",times:l}={},d=void 0){const c={[t]:n};l&&(c.offset=l);const w=ci(u,r);Array.isArray(w)&&(c.easing=w);const f={delay:s,duration:r,easing:Array.isArray(w)?"linear":w,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return d&&(f.pseudoElement=d),e.animate(c,f)}function di(e){return typeof e=="function"&&"applyToOptions"in e}function Af({type:e,...t}){return di(e)&&ui()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class wi extends ur{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:s,keyframes:r,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:u,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,lt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=Af(t);this.animation=Df(n,s,r,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=ir(r,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(c):Tf(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,r;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((r=(s=this.animation).commitStyles)==null||r.call(s))}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return Le(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Le(t)}get time(){return Le(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$e(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ef()?(this.animation.timeline=t,Tt):n(this)}}const fi={anticipate:ko,backInOut:Ao,circInOut:Po};function kf(e){return e in fi}function Pf(e){typeof e.ease=="string"&&kf(e.ease)&&(e.ease=fi[e.ease])}const br=10;class _f extends wi{constructor(t){Pf(t),ti(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:r,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new lr({...i,autoplay:!1}),l=Math.max(br,Ee.now()-this.startTime),d=Xe(0,br,l-br);n.setWithVelocity(u.sample(Math.max(0,l-d)).value,u.sample(l).value,d),u.stop()}}const pi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Je.test(e)||e==="0")&&!e.startsWith("url("));function Vf(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Of(e,t,n,s){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=pi(r,t),u=pi(o,t);return jt(i===u,`You are trying to animate ${t} from "${r}" to "${o}". "${i?o:r}" is not an animatable value.`,"value-not-animatable"),!i||!u?!1:Vf(e)||(n==="spring"||di(n))&&s}function yr(e){e.duration=0,e.type="keyframes"}const Ff=new Set(["opacity","clipPath","filter","transform"]),Lf=Us(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wf(e){var c;const{motionValue:t,name:n,repeatDelay:s,repeatType:r,damping:o,type:i}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:d}=t.owner.getProps();return Lf()&&n&&Ff.has(n)&&(n!=="transform"||!d)&&!l&&!s&&r!=="mirror"&&o!==0&&i!=="inertia"}const Bf=40;class qf extends ur{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",keyframes:u,name:l,motionValue:d,element:c,...w}){var g;super(),this.stop=()=>{var b,v;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=Ee.now();const f={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:o,repeatType:i,name:l,motionValue:d,element:c,...w},m=(c==null?void 0:c.KeyframeResolver)||gr;this.keyframeResolver=new m(u,(b,v,C)=>this.onKeyframesResolved(b,v,f,!C),l,d,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,r){var v,C;this.keyframeResolver=void 0;const{name:o,type:i,velocity:u,delay:l,isHandoff:d,onUpdate:c}=s;this.resolvedAt=Ee.now(),Of(t,o,i,u)||((Ge.instantAnimations||!l)&&(c==null||c(ir(t,s,n))),t[0]=t[t.length-1],yr(s),s.repeat=0);const f={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>Bf?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},m=!d&&Wf(f),g=(C=(v=f.motionValue)==null?void 0:v.owner)==null?void 0:C.current,b=m?new _f({...f,element:g}):new lr(f);b.finished.then(()=>{this.notifyFinished()}).catch(Tt),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Sf()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function hi(e,t,n,s=0,r=1){const o=Array.from(e).sort((d,c)=>d.sortNodePosition(c)).indexOf(t),i=e.size,u=(i-1)*s;return typeof n=="function"?n(o,i):r===1?o*s:u-o*s}const zf=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $f(e){const t=zf.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const Hf=4;function mi(e,t,n=1){lt(n<=Hf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=$f(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const i=o.trim();return yo(i)?parseFloat(i):i}return Ys(r)?mi(r,t,n+1):r}const Uf={type:"spring",stiffness:500,damping:25,restSpeed:10},jf=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Gf={type:"keyframes",duration:.8},Kf={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yf=(e,{keyframes:t})=>t.length>2?Gf:kt.has(e)?e.startsWith("scale")?jf(t[1]):Uf:Kf,Xf=e=>e!==null;function Zf(e,{repeat:t,repeatType:n="loop"},s){const r=e.filter(Xf),o=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[o]}function gi(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function bi(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?gi(n,e):n}function Jf({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:o,repeatType:i,repeatDelay:u,from:l,elapsed:d,...c}){return!!Object.keys(c).length}const Qf=(e,t,n,s={},r,o)=>i=>{const u=bi(s,e)||{},l=u.delay||s.delay||0;let{elapsed:d=0}=s;d=d-$e(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-d,onUpdate:f=>{t.set(f),u.onUpdate&&u.onUpdate(f)},onComplete:()=>{i(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:r};Jf(u)||Object.assign(c,Yf(e,c)),c.duration&&(c.duration=$e(c.duration)),c.repeatDelay&&(c.repeatDelay=$e(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let w=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(yr(c),c.delay===0&&(w=!0)),(Ge.instantAnimations||Ge.skipAnimations||r!=null&&r.shouldSkipAnimations)&&(w=!0,yr(c),c.delay=0),c.allowFlatten=!u.type&&!u.ease,w&&!o&&t.get()!==void 0){const f=Zf(c.keyframes,u);if(f!==void 0){We.update(()=>{c.onUpdate(f),c.onComplete()});return}}return u.isSync?new lr(c):new qf(c)};function yi(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function xr(e,t,n,s){if(typeof t=="function"){const[r,o]=yi(s);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=yi(s);t=t(n!==void 0?n:e.custom,r,o)}return t}function Pt(e,t,n){const s=e.getProps();return xr(s,t,n!==void 0?n:s.custom,e)}const xi=new Set(["width","height","top","left","right","bottom",...At]),vi=30,Rf=e=>!isNaN(parseFloat(e));class ep{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const r=Ee.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ee.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Rf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&To(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new No);const s=this.events[t].add(n);return t==="change"?()=>{s(),We.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ee.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vi);return So(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Bn(e,t){return new ep(e,t)}const vr=e=>Array.isArray(e);function tp(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Bn(n))}function np(e){return vr(e)?e[e.length-1]||0:e}function sp(e,t){const n=Pt(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const i in o){const u=np(o[i]);tp(e,i,u)}}const me=e=>!!(e&&e.getVelocity);function rp(e){return!!(me(e)&&e.add)}function ap(e,t){const n=e.getValue("willChange");if(rp(n))return n.add(t);if(!n&&Ge.WillChange){const s=new Ge.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Nr(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ni="data-"+Nr("framerAppearId");function op(e){return e.props[Ni]}function ip({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Si(e,t,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:o,transitionEnd:i,...u}=t;const l=e.getDefaultTransition();o=o?gi(o,l):l;const d=o==null?void 0:o.reduceMotion;s&&(o=s);const c=[],w=r&&e.animationState&&e.animationState.getState()[r];for(const f in u){const m=e.getValue(f,e.latestValues[f]??null),g=u[f];if(g===void 0||w&&ip(w,f))continue;const b={delay:n,...bi(o||{},f)},v=m.get();if(v!==void 0&&!m.isAnimating&&!Array.isArray(g)&&g===v&&!b.velocity)continue;let C=!1;if(window.MotionHandoffAnimation){const x=op(e);if(x){const T=window.MotionHandoffAnimation(x,f,We);T!==null&&(b.startTime=T,C=!0)}}ap(e,f);const N=d??e.shouldReduceMotion;m.start(Qf(f,m,g,N&&xi.has(f)?{type:!1}:b,e,C));const S=m.animation;S&&c.push(S)}if(i){const f=()=>We.update(()=>{i&&sp(e,i)});c.length?Promise.all(c).then(f):f()}return c}function Sr(e,t,n={}){var l;const s=Pt(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const o=s?()=>Promise.all(Si(e,s,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:c=0,staggerChildren:w,staggerDirection:f}=r;return up(e,t,d,c,w,f,n)}:()=>Promise.resolve(),{when:u}=r;if(u){const[d,c]=u==="beforeChildren"?[o,i]:[i,o];return d().then(()=>c())}else return Promise.all([o(),i(n.delay)])}function up(e,t,n=0,s=0,r=0,o=1,i){const u=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),u.push(Sr(l,t,{...i,delay:n+(typeof s=="function"?0:s)+hi(e.variantChildren,l,s,r,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(u)}function lp(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(o=>Sr(e,o,n));s=Promise.all(r)}else if(typeof t=="string")s=Sr(e,t,n);else{const r=typeof t=="function"?Pt(e,t,n.custom):t;s=Promise.all(Si(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const cp={test:e=>e==="auto",parse:e=>e},Ci=e=>t=>t.test(e),Ti=[Et,O,Mt,Ze,Vw,_w,cp],Ei=e=>Ti.find(Ci(e));function dp(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xo(e):!0}const wp=new Set(["brightness","contrast","saturate","opacity"]);function fp(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(Xs)||[];if(!s)return e;const r=n.replace(s,"");let o=wp.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const pp=/\b([a-z-]*)\(.*?\)/gu,Cr={...Je,getAnimatableNone:e=>{const t=e.match(pp);return t?t.map(fp).join(" "):e}},Mi={...Et,transform:Math.round},Tr={borderWidth:O,borderTopWidth:O,borderRightWidth:O,borderBottomWidth:O,borderLeftWidth:O,borderRadius:O,borderTopLeftRadius:O,borderTopRightRadius:O,borderBottomRightRadius:O,borderBottomLeftRadius:O,width:O,maxWidth:O,height:O,maxHeight:O,top:O,right:O,bottom:O,left:O,inset:O,insetBlock:O,insetBlockStart:O,insetBlockEnd:O,insetInline:O,insetInlineStart:O,insetInlineEnd:O,padding:O,paddingTop:O,paddingRight:O,paddingBottom:O,paddingLeft:O,paddingBlock:O,paddingBlockStart:O,paddingBlockEnd:O,paddingInline:O,paddingInlineStart:O,paddingInlineEnd:O,margin:O,marginTop:O,marginRight:O,marginBottom:O,marginLeft:O,marginBlock:O,marginBlockStart:O,marginBlockEnd:O,marginInline:O,marginInlineStart:O,marginInlineEnd:O,fontSize:O,backgroundPositionX:O,backgroundPositionY:O,...{rotate:Ze,rotateX:Ze,rotateY:Ze,rotateZ:Ze,scale:On,scaleX:On,scaleY:On,scaleZ:On,skew:Ze,skewX:Ze,skewY:Ze,distance:O,translateX:O,translateY:O,translateZ:O,x:O,y:O,z:O,perspective:O,transformPerspective:O,opacity:Kt,originX:$o,originY:$o,originZ:O},zIndex:Mi,fillOpacity:Kt,strokeOpacity:Kt,numOctaves:Mi},hp={...Tr,color:le,backgroundColor:le,outlineColor:le,fill:le,stroke:le,borderColor:le,borderTopColor:le,borderRightColor:le,borderBottomColor:le,borderLeftColor:le,filter:Cr,WebkitFilter:Cr},Ii=e=>hp[e];function Di(e,t){let n=Ii(e);return n!==Cr&&(n=Je),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const mp=new Set(["auto","none","0"]);function gp(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!mp.has(o)&&Zt(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=Di(n,r)}class bp extends gr{constructor(t,n,s,r,o){super(t,n,s,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let w=t[c];if(typeof w=="string"&&(w=w.trim(),Ys(w))){const f=mi(w,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=w)}}if(this.resolveNoneKeyframes(),!xi.has(s)||t.length!==2)return;const[r,o]=t,i=Ei(r),u=Ei(o),l=qo(r),d=qo(o);if(l!==d&&Qe[s]){this.needsMeasurement=!0;return}if(i!==u)if(ai(i)&&ai(u))for(let c=0;c<t.length;c++){const w=t[c];typeof w=="string"&&(t[c]=parseFloat(w))}else Qe[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||dp(t[r]))&&s.push(r);s.length&&gp(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Qe[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=s.length-1,i=s[o];s[o]=Qe[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([l,d])=>{t.getValue(l).set(d)}),this.resolveNoneKeyframes()}}const yp=new Set(["opacity","clipPath","filter","transform"]);function xp(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const r=(n==null?void 0:n[e])??s.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(s=>s!=null)}const Ai=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Er(e){return pw(e)&&"offsetHeight"in e}const{schedule:vp}=Lo(queueMicrotask,!1),Np={y:!1};function Sp(){return Np.y}function ki(e,t){const n=xp(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function Cp(e){return!(e.pointerType==="touch"||Sp())}function Tp(e,t,n={}){const[s,r,o]=ki(e,n);return s.forEach(i=>{let u=!1,l=!1,d;const c=()=>{i.removeEventListener("pointerleave",g)},w=v=>{d&&(d(v),d=void 0),c()},f=v=>{u=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,w(v))},m=()=>{u=!0,window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",f,r)},g=v=>{if(v.pointerType!=="touch"){if(u){l=!0;return}w(v)}},b=v=>{if(!Cp(v))return;l=!1;const C=t(i,v);typeof C=="function"&&(d=C,i.addEventListener("pointerleave",g,r))};i.addEventListener("pointerenter",b,r),i.addEventListener("pointerdown",m,r)}),o}const Pi=(e,t)=>t?e===t?!0:Pi(e,t.parentElement):!1,Ep=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Mp=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ip(e){return Mp.has(e.tagName)||e.isContentEditable===!0}const qn=new WeakSet;function _i(e){return t=>{t.key==="Enter"&&e(t)}}function Mr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Dp=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=_i(()=>{if(qn.has(n))return;Mr(n,"down");const r=_i(()=>{Mr(n,"up")}),o=()=>Mr(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Vi(e){return Ep(e)&&!0}const Oi=new WeakSet;function Ap(e,t,n={}){const[s,r,o]=ki(e,n),i=u=>{const l=u.currentTarget;if(!Vi(u)||Oi.has(u))return;qn.add(l),n.stopPropagation&&Oi.add(u);const d=t(l,u),c=(m,g)=>{window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",f),qn.has(l)&&qn.delete(l),Vi(m)&&typeof d=="function"&&d(m,{success:g})},w=m=>{c(m,l===window||l===document||n.useGlobalTarget||Pi(l,m.target))},f=m=>{c(m,!1)};window.addEventListener("pointerup",w,r),window.addEventListener("pointercancel",f,r)};return s.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",i,r),Er(u)&&(u.addEventListener("focus",d=>Dp(d,r)),!Ip(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}const kp=[...Ti,le,Je],Pp=e=>kp.find(Ci(e)),Fi=()=>({min:0,max:0}),Li=()=>({x:Fi(),y:Fi()}),_p=new WeakMap;function zn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Rt(e){return typeof e=="string"||Array.isArray(e)}const Ir=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dr=["initial",...Ir];function $n(e){return zn(e.animate)||Dr.some(t=>Rt(e[t]))}function Wi(e){return!!($n(e)||e.variants)}function Vp(e,t,n){for(const s in t){const r=t[s],o=n[s];if(me(r))e.addValue(s,r);else if(me(o))e.addValue(s,Bn(r,{owner:e}));else if(o!==r)if(e.hasValue(s)){const i=e.getValue(s);i.liveStyle===!0?i.jump(r):i.hasAnimated||i.set(r)}else{const i=e.getStaticValue(s);e.addValue(s,Bn(i!==void 0?i:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Ar={current:null},Bi={current:!1},Op=typeof window<"u";function Fp(){if(Bi.current=!0,!!Op)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ar.current=e.matches;e.addEventListener("change",t),t()}else Ar.current=!1}const qi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Hn={};function zi(e){Hn=e}function Lp(){return Hn}class Wp{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:i,visualState:u},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=gr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Ee.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,We.render(this.render,!1,!0))};const{latestValues:d,renderState:c}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=$n(n),this.isVariantNode=Wi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:w,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];d[m]!==void 0&&me(g)&&g.set(d[m])}}mount(t){var n,s;if(this.hasBeenMounted)for(const r in this.initialValues)(n=this.values.get(r))==null||n.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=t,_p.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Bi.current||Fp(),this.shouldReduceMotion=Ar.current),process.env.NODE_ENV!=="production"&&To(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ks(this.notifyUpdate),Ks(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&yp.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:u,times:l,ease:d,duration:c}=n.accelerate,w=new wi({element:this.current,name:t,keyframes:u,times:l,ease:d,duration:$e(c)}),f=i(w);this.valueSubscriptions.set(t,()=>{f(),w.cancel()});return}const s=kt.has(t);s&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&We.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Hn){const n=Hn[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Li()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<qi.length;s++){const r=qi[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,i=t[o];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=Vp(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Bn(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(yo(s)||xo(s))?s=parseFloat(s):!Pp(s)&&Je.test(n)&&(s=Di(t,n)),this.setBaseTarget(t,me(s)?s.get():s)),me(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const i=xr(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(s=i[t])}if(n&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!me(r)?r:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new No),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){vp.render(this.render)}}class $i extends Wp{constructor(){super(...arguments),this.KeyframeResolver=bp}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;me(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class _t{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Bp({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function qp(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function zp(e,t){return Bp(qp(e.getBoundingClientRect(),t))}const $p={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Hp=At.length;function Up(e,t,n){let s="",r=!0;for(let o=0;o<Hp;o++){const i=At[o],u=e[i];if(u===void 0)continue;let l=!0;if(typeof u=="number")l=u===(i.startsWith("scale")?1:0);else{const d=parseFloat(u);l=i.startsWith("scale")?d===1:d===0}if(!l||n){const d=Ai(u,Tr[i]);if(!l){r=!1;const c=$p[i]||i;s+=`${c}(${d}) `}n&&(t[i]=d)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function kr(e,t,n){const{style:s,vars:r,transformOrigin:o}=e;let i=!1,u=!1;for(const l in t){const d=t[l];if(kt.has(l)){i=!0;continue}else if(Bo(l)){r[l]=d;continue}else{const c=Ai(d,Tr[l]);l.startsWith("origin")?(u=!0,o[l]=c):s[l]=c}}if(t.transform||(i||n?s.transform=Up(t,e.transform,n):s.transform&&(s.transform="none")),u){const{originX:l="50%",originY:d="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${d} ${c}`}}function Hi(e,{style:t,vars:n},s,r){const o=e.style;let i;for(i in t)o[i]=t[i];r==null||r.applyProjectionStyles(o,s);for(i in n)o.setProperty(i,n[i])}function Ui(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const en={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(O.test(e))e=parseFloat(e);else return e;const n=Ui(e,t.target.x),s=Ui(e,t.target.y);return`${n}% ${s}%`}},jp={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=Je.parse(e);if(r.length>5)return s;const o=Je.createTransformer(e),i=typeof r[0]!="number"?1:0,u=n.x.scale*t.x,l=n.y.scale*t.y;r[0+i]/=u,r[1+i]/=l;const d=Jt(u,l,.5);return typeof r[2+i]=="number"&&(r[2+i]/=d),typeof r[3+i]=="number"&&(r[3+i]/=d),o(r)}},Gp={borderRadius:{...en,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:en,borderTopRightRadius:en,borderBottomLeftRadius:en,borderBottomRightRadius:en,boxShadow:jp};function ji(e,{layout:t,layoutId:n}){return kt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Gp[e]||e==="opacity")}function Pr(e,t,n){var i;const s=e.style,r=t==null?void 0:t.style,o={};if(!s)return o;for(const u in s)(me(s[u])||r&&me(r[u])||ji(u,e)||((i=n==null?void 0:n.getValue(u))==null?void 0:i.liveStyle)!==void 0)&&(o[u]=s[u]);return o}function Kp(e){return window.getComputedStyle(e)}class Yp extends $i{constructor(){super(...arguments),this.type="html",this.renderInstance=Hi}readValueFromInstance(t,n){var s;if(kt.has(n))return(s=this.projection)!=null&&s.isProjecting?wr(n):bf(t,n);{const r=Kp(t),o=(Bo(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return zp(t,n)}build(t,n,s){kr(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Pr(t,n,s)}}const Xp={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zp={offset:"strokeDashoffset",array:"strokeDasharray"};function Jp(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?Xp:Zp;e[o.offset]=`${-s}`,e[o.array]=`${t} ${n}`}const Qp=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Gi(e,{attrX:t,attrY:n,attrScale:s,pathLength:r,pathSpacing:o=1,pathOffset:i=0,...u},l,d,c){if(kr(e,u,d),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:w,style:f}=e;w.transform&&(f.transform=w.transform,delete w.transform),(f.transform||w.transformOrigin)&&(f.transformOrigin=w.transformOrigin??"50% 50%",delete w.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete w.transformBox);for(const m of Qp)w[m]!==void 0&&(f[m]=w[m],delete w[m]);t!==void 0&&(w.x=t),n!==void 0&&(w.y=n),s!==void 0&&(w.scale=s),r!==void 0&&Jp(w,r,o,i,!1)}const Ki=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Yi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Rp(e,t,n,s){Hi(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(Ki.has(r)?r:Nr(r),t.attrs[r])}function Xi(e,t,n){const s=Pr(e,t,n);for(const r in e)if(me(e[r])||me(t[r])){const o=At.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[o]=e[r]}return s}class eh extends $i{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Li}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(kt.has(n)){const s=Ii(n);return s&&s.default||0}return n=Ki.has(n)?n:Nr(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Xi(t,n,s)}build(t,n,s){Gi(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){Rp(t,n,s,r)}mount(t){this.isSVGTag=Yi(t.tagName),super.mount(t)}}const th=Dr.length;function Zi(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Zi(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<th;n++){const s=Dr[n],r=e.props[s];(Rt(r)||r===!1)&&(t[s]=r)}return t}function Ji(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const nh=[...Ir].reverse(),sh=Ir.length;function rh(e){return t=>Promise.all(t.map(({animation:n,options:s})=>lp(e,n,s)))}function ah(e){let t=rh(e),n=Qi(),s=!0;const r=l=>(d,c)=>{var f;const w=Pt(e,c,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(w){const{transition:m,transitionEnd:g,...b}=w;d={...d,...b,...g}}return d};function o(l){t=l(e)}function i(l){const{props:d}=e,c=Zi(e.parent)||{},w=[],f=new Set;let m={},g=1/0;for(let v=0;v<sh;v++){const C=nh[v],N=n[C],S=d[C]!==void 0?d[C]:c[C],x=Rt(S),T=C===l?N.isActive:null;T===!1&&(g=v);let A=S===c[C]&&S!==d[C]&&x;if(A&&s&&e.manuallyAnimateOnMount&&(A=!1),N.protectedKeys={...m},!N.isActive&&T===null||!S&&!N.prevProp||zn(S)||typeof S=="boolean")continue;if(C==="exit"&&N.isActive&&T!==!0){N.prevResolvedValues&&(m={...m,...N.prevResolvedValues});continue}const D=oh(N.prevProp,S);let I=D||C===l&&N.isActive&&!A&&x||v>g&&x,k=!1;const F=Array.isArray(S)?S:[S];let P=F.reduce(r(C),{});T===!1&&(P={});const{prevResolvedValues:M={}}=N,V={...M,...P},W=B=>{I=!0,f.has(B)&&(k=!0,f.delete(B)),N.needsAnimating[B]=!0;const U=e.getValue(B);U&&(U.liveStyle=!1)};for(const B in V){const U=P[B],$=M[B];if(m.hasOwnProperty(B))continue;let H=!1;vr(U)&&vr($)?H=!Ji(U,$):H=U!==$,H?U!=null?W(B):f.add(B):U!==void 0&&f.has(B)?W(B):N.protectedKeys[B]=!0}N.prevProp=S,N.prevResolvedValues=P,N.isActive&&(m={...m,...P}),s&&e.blockInitialAnimation&&(I=!1);const _=A&&D;I&&(!_||k)&&w.push(...F.map(B=>{const U={type:C};if(typeof B=="string"&&s&&!_&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,H=Pt($,B);if($.enteringChildren&&H){const{delayChildren:pe}=H.transition||{};U.delay=hi($.enteringChildren,e,pe)}}return{animation:B,options:U}}))}if(f.size){const v={};if(typeof d.initial!="boolean"){const C=Pt(e,Array.isArray(d.initial)?d.initial[0]:d.initial);C&&C.transition&&(v.transition=C.transition)}f.forEach(C=>{const N=e.getBaseTarget(C),S=e.getValue(C);S&&(S.liveStyle=!0),v[C]=N??null}),w.push({animation:v})}let b=!!w.length;return s&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),s=!1,b?t(w):Promise.resolve()}function u(l,d){var w;if(n[l].isActive===d)return Promise.resolve();(w=e.variantChildren)==null||w.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(l,d)}),n[l].isActive=d;const c=i(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:i,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Qi()}}}function oh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ji(t,e):!1}function ft(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qi(){return{animate:ft(!0),whileInView:ft(),whileHover:ft(),whileTap:ft(),whileDrag:ft(),whileFocus:ft(),exit:ft()}}function Ri(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function ih(e){return me(e)?e.get():e}const _r=h.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function eu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uh(...e){return t=>{let n=!1;const s=e.map(r=>{const o=eu(r,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let r=0;r<s.length;r++){const o=s[r];typeof o=="function"?o():eu(e[r],null)}}}}function lh(...e){return y.useCallback(uh(...e),e)}class ch extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,r=Er(s)&&s.offsetWidth||0,o=Er(s)&&s.offsetHeight||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=r-i.width-i.left,i.bottom=o-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function dh({children:e,isPresent:t,anchorX:n,anchorY:s,root:r,pop:o}){var f;const i=h.useId(),u=h.useRef(null),l=h.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=h.useContext(_r),c=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),w=lh(u,c);return h.useInsertionEffect(()=>{const{width:m,height:g,top:b,left:v,right:C,bottom:N}=l.current;if(t||o===!1||!u.current||!m||!g)return;const S=n==="left"?`left: ${v}`:`right: ${C}`,x=s==="bottom"?`bottom: ${N}`:`top: ${b}`;u.current.dataset.motionPopId=i;const T=document.createElement("style");d&&(T.nonce=d);const A=r??document.head;return A.appendChild(T),T.sheet&&T.sheet.insertRule(`
4
+ focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0`,rel:"noreferrer",children:a.jsx(Wa,{item:s,dir:t})})},r))})})},Wa=({item:e,dir:t})=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-[5px]",dir:t,children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6",children:a.jsx("span",{className:p("wu-text-xl wu-text-gray-lead",e.icon)})}),a.jsx("p",{className:"wu-text-sm wu-text-gray-lead",children:e.title})]}),gd=e=>{const[t,n]=h.useState(()=>window.innerWidth<=e);return h.useEffect(()=>{const s=()=>{n(window.innerWidth<=e)};return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[e]),t};function bd({productCategories:e,openCategory:t,setOpenCategory:n}){const s=(u,l)=>{const d=l[u];if(d){d.focus();const c=e[u]||null;n(c)}},r=(u,l,d,c)=>{u.preventDefault();const w=d==="down"?l+1:l-1;s(w,c)},o=(u,l,d,c)=>{t!=null&&t.products&&t.products[t.products.length-1].name===c&&(u.preventDefault(),s(l+1,d))},i=(u,l)=>{u.preventDefault();const d=e[l]===t?null:e[l];n(d)};return function(l,d,c){const w=document.querySelectorAll("[data-product-category]"),{key:f}=l;switch(f){case"ArrowDown":r(l,d,"down",w);break;case"ArrowUp":r(l,d,"up",w);break;case"Tab":o(l,d,w,c);break;case"Enter":case" ":i(l,d);break}}}const yd=e=>{const{size:t="lg",className:n,children:s,...r}=e,o={sm:"wu-text-body-3",md:"wu-text-body-2",lg:"wu-text-body-1"},i=e.as||"div";return a.jsx(i,{...r,className:p(o[t],n),children:s})},xd=e=>{const{size:t="xl",className:n,children:s,...r}=e,o={sm:"h4",md:"h3",lg:"h2",xl:"h1"},i={sm:"wu-text-heading-4",md:"wu-text-heading-3",lg:"wu-text-heading-2",xl:"wu-text-heading-1"},u=o[t];return a.jsx(u,{...r,className:p(i[t],n),children:s})},vd=e=>{const{size:t="lg",className:n,children:s,...r}=e,o={sm:"wu-text-sub-3",md:"wu-text-sub-2",lg:"wu-text-sub-1"},i=e.as||"div";return a.jsx(i,{...r,className:p(o[t],n),children:s})},Nd=e=>{const{size:t="lg",className:n,children:s,...r}=e,o={md:"wu-text-display-2",lg:"wu-text-display-1"},i=e.as||"h1";return a.jsx(i,{...r,className:p(o[t],n),children:s})},Ve=e=>{const{icon:t,className:n,...s}=e;return a.jsx("span",{...s,className:p(t,n),role:"presentation","aria-label":t})},Sd=({buttonRef:e,handleDropdownToggle:t,handleKeyDown:n,isDropdownOpen:s,activeProductName:r,dir:o="ltr",homeLink:i="/"})=>a.jsxs("button",{ref:e,type:"button",className:p("wu-text-base wu-font-normal wu-flex wu-items-center wu-justify-between wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger"),onClick:t,onKeyDown:u=>{s&&u.key==="ArrowDown"&&n(u,-1)},"aria-label":"product-switcher",children:[a.jsx("a",{className:"wu-pl-2 wu-pr-0 wu-aspect-auto focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-logo",tabIndex:-1,href:i,children:a.jsx(Ve,{icon:"wc-logo",className:"wu-text-xl wu-leading-4 wu-relative wu-top-1"})}),r,a.jsx("span",{className:p("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",s&&"wu-rotate-180",o==="rtl"?"wu-mr-auto":"wu-ml-auto")})]}),ne={productDropdownMenu:"_productDropdownMenu_amyba_1",productDropdownMenuOpen:"_productDropdownMenuOpen_amyba_38",rtlDropdownMenu:"_rtlDropdownMenu_amyba_51",productCategory:"_productCategory_amyba_55",open:"_open_amyba_61",productCategoryBorderTop:"_productCategoryBorderTop_amyba_66",productList:"_productList_amyba_93",rtlProductList:"_rtlProductList_amyba_114",productListItem:"_productListItem_amyba_137",productLink:"_productLink_amyba_162",activeProduct:"_activeProduct_amyba_164",topBorder:"_topBorder_amyba_169",topBorderRtl:"_topBorderRtl_amyba_190"},Cd=({category:e,dir:t="ltr",openCategory:n})=>{const s=e.active?"#c5cce0":"#f0c36a",r=(n==null?void 0:n.name)===e.name,o=p("wm-arrow-forward-ios wu-text-xs wu-tracking-widest wu-text-muted-foreground wu-mr-2.5 group-hover:wu-hidden wu-text-blue-q",t==="rtl"&&"wu-rotate-180 wu-ml-2.5 wu-text-blue-q group-hover:wu-hidden",r&&"wu-hidden","wu-relative wu-top-[5px]"),i=p("wm-lock wu-text-orange-soft wu-text-base wu-mr-2.5 group-hover:wu-hidden",t==="rtl"&&"wu-ml-2.5 group-hover:wu-hidden",r&&"wu-hidden","wu-relative wu-top-1");return a.jsxs("div",{className:p("group focus:wu-outline-none focus-visible:wu-outline-none wu-flex wu-items-center wu-w-full wu-bg-white wu-relative wu-justify-between"),dir:t,children:[a.jsx("div",{className:ne.productCategoryBorderTop,style:{backgroundColor:s}}),a.jsxs("div",{className:"wu-flex wu-items-center wu-px-1 wu-relative wu-top-1",children:[a.jsx("div",{className:"wu-w-[56px] wu-h-[56px] wu-flex wu-items-center wu-justify-center",children:a.jsx("img",{src:e.logo,alt:e.name,width:"32px",height:"32px"})}),a.jsx("span",{className:"wu-text-sm wu-leading-5 wu-text-blue-q wu-relative wu-top-[1px]",children:e.name})]}),e.active?a.jsx("span",{className:o}):a.jsx("span",{className:i})]})},Td={e309:"wp-audience",e381:"wp-bi",e329:"wp-closed-loop",e314:"wp-communities",e313:"wp-cx",e352:"wp-digsite",e324:"wp-empower",e317:"wp-insightshub",e380:"wp-instant-answers",e378:"wp-intercept",e311:"wp-livepolls",e316:"wp-reputation",e379:"wp-suite-cx",e382:"wp-suite-cx",e308:"wp-surveys",e315:"wp-workforce"},Ed=({product:e,currentProduct:t,activeProductName:n,dir:s,focusItem:r,setFocusItem:o})=>{const[i,u]=h.useState(e.name===t),l=e.name===n,d=e.name===t,c=!e.active,w="#1b3380",f="#c5cce0",m="#ffcf70",g=p("wu-font-normal wu-text-xs wu-text-gray-lead wu-text-center",d&&"wu-text-blue-q wu-font-normal",!e.active&&"wu-text-gray-subtle",i&&"wu-font-normal",e.active&&i&&"wu-text-blue-q"),b=p("wu-text-blue-p wu-text-base",d&&"wu-text-blue-q",!e.active&&"wu-text-gray-subtle",e.active&&i&&"wu-text-blue-q"),x=i||r===e.name||l?w:f;return a.jsxs("li",{className:p(ne.productListItem,"focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item",(l||i)&&ne.activeProduct,e.name.length>15&&window.innerWidth>768&&"wu-w-[130px] wu-min-w-[130px]",r===e.name&&ne.activeProduct,"wu-product-item"),onMouseOver:()=>u(!0),onMouseOut:()=>u(!1),"aria-label":e.name,"aria-disabled":c,dir:s,onKeyDown:S=>{if(S.key==="Enter"){S.preventDefault();const v=S.currentTarget.querySelector("a");v&&v.click()}},onFocus:()=>{o(e.name)},onBlur:()=>o(""),children:[a.jsx("div",{className:p(ne.topBorder,s==="rtl"&&ne.topBorderRtl),style:{backgroundColor:c?m:x}}),a.jsxs("a",{className:p(ne.productLink,"focus:wu-outline-none focus-visible:wu-outline-none"),href:e.link||"#",tabIndex:0,children:[a.jsx("span",{className:p(b,Td[e.icon||""]),"aria-hidden":!0}),a.jsx("span",{className:p(g),children:e.name})]})]},e.name)},Md=({category:e,currentProduct:t,activeProductName:n,dir:s="ltr",focusItem:r,setFocusItem:o,borderColorLocked:i="#f5a300"})=>{const{products:u=[],active:l}=e,d=h.useMemo(()=>u.filter(g=>g.active).sort((g,b)=>(g.order||100)-(b.order||100)),[u]),c=h.useMemo(()=>u.filter(g=>!g.active),[u]),[w,f]=h.useState(i),m=g=>g.map((b,x)=>a.jsx(Ed,{product:b,currentProduct:t,activeProductName:n,dir:s,focusItem:r,setFocusItem:o},x));return l?a.jsxs(a.Fragment,{children:[m(d),c.length>0&&a.jsxs("li",{className:p(ne.productListItem,"focus:wu-outline-none focus-visible:wu-outline-none !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee] wu-group"),onMouseOver:()=>f("#f5a300"),onMouseOut:()=>f(i),"aria-label":"Upgrade to unlock",children:[a.jsx("div",{className:p(ne.topBorder,s==="rtl"&&ne.topBorderRtl),style:{backgroundColor:w},"aria-label":"top-border"}),a.jsxs("a",{href:"https://www.questionpro.com/a/showUpgradeUser.do",className:p(ne.productLink,"wu-flex wu-flex-col wu-items-center wu-justify-center wu-py-2 wu-min-w-[88px]"),children:[a.jsx("span",{className:"wu-text-base wu-transition-colors wm-lock !wu-text-orange-soft group-hover:wu-text-orange-deep"}),a.jsxs("span",{className:"wu-text-[10px] wu-leading-[10px] wu-text-center wu-pt-1 !wu-text-orange-deep",children:["Upgrade to ",a.jsx("br",{})," unlock"]})]})]}),m(c)]}):a.jsxs("li",{className:p(ne.productListItem,ne.learnMore,"focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]",r==="learn"&&"activeProduct"),tabIndex:0,onFocus:()=>o("learn"),onBlur:()=>o(""),"aria-label":"Learn More",children:[a.jsx("div",{className:p(ne.topBorder,s==="rtl"&&ne.topBorderRtl),style:{backgroundColor:i}}),a.jsx("a",{className:ne.productLink,href:"https://www.questionpro.com/a/showUpgradeUser.do",tabIndex:-1,children:a.jsx("span",{className:"wu-text-[#f99e03]",children:"Learn More"})})]})},Ba=({dropdownRef:e,dir:t,isDropdownOpen:n,productCategories:s,openCategory:r,setOpenCategory:o,handleKeyDown:i,expandAll:u,activeProductName:l,focusItem:d,setFocusItem:c})=>{const w="#ffcf70",[f,m]=h.useState(window.innerWidth>768);return h.useEffect(()=>{const g=()=>{m(window.innerWidth>375)};return window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[]),a.jsx("ul",{className:p(ne.productDropdownMenu,n&&ne.productDropdownMenuOpen,t==="rtl"&&ne.rtlDropdownMenu,"wu-switcher-container"),ref:e,dir:t,"aria-label":"product-dropdown-menu","data-state":n?"open":"closed",children:s.map((g,b)=>a.jsxs("li",{className:p(ne.productCategory,"focus:wu-outline-none focus-visible:wu-outline-none wu-h-16 wu-category-item",r===g&&ne.open,u&&ne.open),onMouseEnter:()=>f&&o(g),onMouseLeave:()=>f&&o(null),"aria-label":g.name,dir:t,onKeyDown:x=>i(x,b),tabIndex:0,"data-product-category":!0,children:[a.jsx(Cd,{category:g,dir:t,openCategory:r}),a.jsx("ul",{className:p(ne.productList,t==="rtl"&&ne.rtlProductList),dir:t,children:a.jsx(Md,{category:g,dir:t,activeProductName:l,currentProduct:g.name,focusItem:d,setFocusItem:c,borderColorLocked:w})})]},g.name))})},Id=({isProductButtonShow:e,isDropdownOpen:t,activeProductColor:n,activeProductBgColor:s,activeProductName:r,dir:o,smallScreenButtonRef:i,handleDropdownToggle:u,handleKeyDown:l})=>a.jsx("div",{className:p("wu-absolute wu-top-11 wu-transition-all wu-duration-300 wu-ease-in-out wu-transform wu-opacity-100 wu-w-[256px] wu-z-10",e?o==="rtl"?"wu-right-0 wu-overflow-hidden":"wu-translate-x-0 wu-left-0":o==="rtl"?"wu-right-0 wu-w-0":"wu--translate-x-full"),style:{backgroundColor:t?n.hover:s},children:a.jsxs("button",{ref:i,type:"button",className:p("wu-text-base wu-leading-[48px] wu-flex wu-items-center wu-justify-center wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger",e?"wu-flex":o==="rtl"?"wu-hidden":"wu-flex"),onClick:u,onKeyDown:d=>{t&&d.key==="ArrowDown"&&l(d,-1)},"aria-label":"small-screen-product-btn",children:[r,a.jsx("span",{className:p("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",t&&"wu-rotate-180")})]})}),Ad=({dir:e,isProductButtonShow:t,smallScreenToggleButtonRef:n,setIsProductButtonShow:s,setDropdownOpen:r})=>{const o=()=>{s(i=>!i),t&&r(!1)};return a.jsxs("button",{className:p("wu-relative wu-w-10 wu-h-10 wu-flex wu-flex-col wu-justify-center wu-items-center",e==="rtl"?"wu-mr-4":"wu-ml-4"),onClick:o,ref:n,"aria-label":"menu-toggle-btn",children:[a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"wu-rotate-45 wu-translate-y-0":"-wu-translate-y-2.5"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-opacity wu-duration-300 ${t?"wu-opacity-0":"wu-opacity-100"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"-wu-rotate-45 wu-translate-y-0":"wu-translate-y-2.5"}`})]})},qa=({productCategories:e,activeProductName:t,activeProductColor:n={base:"#1b87e6",hover:"#54A5EC"},dir:s,homeLink:r,expandAll:o})=>{const i=h.useRef(null),u=h.useRef(null),l=h.useRef(null),d=h.useRef(null),[c,w]=h.useState(!1),[f,m]=h.useState(null),[g,b]=h.useState(n.base),[x,S]=h.useState(""),[v,T]=h.useState(!1),N=gd(768);Is([u,i],()=>{w(!1),m(null)}),Is([l,d,u],()=>{T(!1),w(!1),m(null)}),h.useEffect(()=>{const M=I=>{I.key==="Escape"&&w(!1)};return document.addEventListener("keydown",M),()=>{document.removeEventListener("keydown",M)}},[c]),h.useEffect(()=>b(n.base),[n.base]);const C=M=>{M.preventDefault(),M.stopPropagation(),w(I=>{const k=!I;return k||m(null),k})},D=(M,I)=>{bd({productCategories:e,openCategory:f,setOpenCategory:m})(M,I,x)};return a.jsx("div",{className:p("wu-inline-flex wu-items-center wu-justify-between wu-relative wu-z-auto wu-h-12 wu-text-white"),children:N?a.jsxs("div",{className:"wu-relative wu-flex",children:[a.jsx(Ad,{dir:s,isProductButtonShow:v,smallScreenToggleButtonRef:d,setDropdownOpen:w,setIsProductButtonShow:T}),a.jsx(Id,{isProductButtonShow:v,isDropdownOpen:c,activeProductColor:n,activeProductBgColor:g,activeProductName:t,handleDropdownToggle:C,smallScreenButtonRef:l,handleKeyDown:D,dir:s}),a.jsx("div",{className:p("wu-absolute wu-top-[92px] wu-left-0 wu-text-[18px]",s==="rtl"&&"wu-right-[256px] wu-left-auto"),children:a.jsx(Ba,{activeProductName:t,focusItem:x,setFocusItem:S,handleKeyDown:D,isDropdownOpen:c,openCategory:f,productCategories:e,setOpenCategory:m,dropdownRef:u,expandAll:o,dir:s})})]}):a.jsxs("div",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-h-full wu-w-[256px]",dir:s,style:{backgroundColor:c?n.hover:g},onMouseOver:()=>b(n.hover),onMouseOut:()=>b(n.base),children:[a.jsx(Sd,{activeProductName:t,dir:s,homeLink:r,buttonRef:i,handleDropdownToggle:C,handleKeyDown:D,isDropdownOpen:c}),a.jsx(Ba,{activeProductName:t,focusItem:x,setFocusItem:S,handleKeyDown:D,isDropdownOpen:c,openCategory:f,productCategories:e,setOpenCategory:m,dropdownRef:u,expandAll:o,dir:s})]})})},za=({children:e,dir:t,className:n})=>a.jsx("section",{className:p("wu-flex wu-items-center wu-flex-1 wu-min-w-0 wu-h-12 wu-gap-2 wu-px-2",t==="rtl"&&"wu-flex-row-reverse",n),children:a.jsx("div",{className:"wu-grow",children:e})}),ks=y.forwardRef(({className:e,type:t,...n},s)=>a.jsx("input",{type:t,className:p("wu-flex wu-h-8 wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","file:wu-border-0 file:wu-bg-gray-40 file:wu-text-gray-notification file:wu-text-sm file:wu-font-normal file:wu-relative file:wu-bottom-[3px]","wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle","focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40",e),ref:s,...n}));ks.displayName="Input";const Dd=e=>{const{message:t,className:n,...s}=e;return a.jsx("p",{...s,className:p("wu-text-sub-3 wu-break-words wu-font-light",n),style:{color:"rgb(var(--wu-red-deep))",...s.style},children:t})},kd=e=>{var u,l;const{inputRef:t,maxLength:n=50,className:s,...r}=e,[o,i]=h.useState(!1);return h.useEffect(()=>{var d;(((d=t==null?void 0:t.current)==null?void 0:d.value.length)||0)>.75*n?i(!0):i(!1)},[(u=t==null?void 0:t.current)==null?void 0:u.value,n]),a.jsx("p",{...r,className:p("wu-text-sub-3 wu-font-light",s),style:{color:"rgb(var(--wu-gray-subtle))",...r.style},children:o&&`${(l=t==null?void 0:t.current)==null?void 0:l.value.length}/${n}`})},Pd=_e.cva("wu-text-xs wu-font-normal wu-leading-none peer-disabled:wu-cursor-not-allowed peer-disabled:wu-text-gray-subtle peer-readonly:wu-text-gray-subtle peer-required:after:wu-content-['*'] peer-required:after:wu-ml-[2px] peer-required:after:wu-text-red-deep peer-aria-[required]:after:wu-content-['*'] peer-aria-[required]:after:wu-ml-[2px] peer-aria-[required]:after:wu-text-red-deep"),Tn=y.forwardRef(({className:e,...t},n)=>a.jsx(Da.Root,{ref:n,className:p(Pd(),e),...t}));Tn.displayName=Da.Root.displayName;const Te=e=>a.jsx(Tn,{...e,className:p("wu-text-gray-lead wu-leading-6",e.className)}),_d=({Label:e,Error:t,Hint:n,Input:s,labelPosition:r="top",dir:o="ltr",className:i,...u})=>{const d=p("wu-flex",r==="top"?"wu-flex-col wu-gap-1":"wu-flex-row wu-items-center wu-gap-2",i),c=p("wu-flex wu-flex-col wu-gap-1 wu-relative wu-flex-1 wu-form-group-wrapper"),w=p("wu-absolute -wu-bottom-5",o==="ltr"?"wu-right-0":"wu-left-0","wu-form-group-hint"),f=p("wu-absolute -wu-bottom-5",o==="ltr"?"wu-left-0":"wu-right-0","wu-form-group-error");return a.jsxs("div",{className:d,dir:o,...u,children:[e,a.jsxs("div",{className:c,children:[s,n&&a.jsx("div",{className:w,children:n}),t&&a.jsx("div",{className:f,children:t})]})]})},Ge=h.forwardRef((e,t)=>{const{Label:n,labelPosition:s="top",Icon:r,iconPosition:o,type:i,value:u,variant:l="flat",readonly:d,id:c=Cn(),...w}=e,f=zt(s),m=r?o!=="right"?"wu-pl-8":"wu-pr-8":"",[g,b]=h.useState(!1),x=()=>{b(v=>!v)},S=v=>{w.onChange&&w.onChange(v)};return a.jsx(a.Fragment,{children:i==="submit"?a.jsx(Ce,{type:"submit",className:w.className,id:c,children:n||"Submit"}):a.jsx("div",{className:p("wu-flex wu-flex-col wu-gap-2 wu-input-container"),dir:w.dir,children:a.jsxs("div",{className:p("wu-flex wu-gap-1 wu-relative",f,(s==="right"||s==="left")&&"wu-items-center","wu-input-wrapper"),children:[r&&o!=="right"&&a.jsx("div",{className:"wu-absolute wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-input-icon-container",children:r}),a.jsx(ks,{...w,className:p("wu-peer wu-text-xs wu-rounded-t-sm",l==="outlined"?"wu-border wu-border-gray-subtle":"",m,w.className),type:g?"text":i,ref:t,readOnly:d,onChange:w.onChange&&S,value:u,id:c}),r&&o==="right"&&a.jsx("div",{className:"wu-absolute wu-right-0 wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-input-icon-container",children:r}),i==="password"&&a.jsx("div",{className:"wu-absolute wu-right-0 wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-cursor-pointer",onClick:x,children:a.jsx("button",{type:"button",className:"wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6 wu-rounded-sm focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft","aria-label":"show-password",children:g?a.jsx("span",{className:"wm-visibility wu-text-gray-subtle"}):a.jsx("span",{className:"wm-visibility-off wu-text-gray-subtle"})})}),n&&a.jsx(Te,{htmlFor:c,className:"wu-flex-none wu-w-fit wu-input-label",children:n})]})})})});Ge.displayName="WuInput";const Vd=({className:e,placeholder:t="Search surveys, folders or tools",defaultCollapsed:n=!0,onSearch:s,...r})=>{const[o,i]=h.useState(n);return h.useEffect(()=>{i(n)},[n]),a.jsx(Ge,{...r,placeholder:t,onChange:u=>s(u.target.value),className:p("wu-rounded-full focus-visible:wu-outline-2 focus-visible:wu-outline-blue-focus -wu-outline-offset-2 wu-bg-white","wu-transition-all wu-duration-300 wu-ease-in-out",o?"wu-w-8 wu-px-2 wu-text-lg wu-rounded-full wu-h-8 wu-border wu-border-white wu-bg-transparent":"wu-w-40 sm:wu-w-60",e),type:"search",Icon:a.jsx(Ve,{"data-testid":"search-icon",icon:"wm-search",className:p("wu-text-gray-lead wu-cursor-pointer",o&&"wu-text-white"),onClick:()=>i(u=>!u)})})},$a=Bt.Provider,Ha=Bt.Root,Ua=Bt.Trigger,Ps=y.forwardRef(({className:e,sideOffset:t=4,...n},s)=>a.jsx(Bt.Content,{ref:s,sideOffset:t,className:p("wu-z-50 wu-overflow-hidden wu-bg-gray-notification wu-text-white wu-px-3 wu-py-1.5 wu-text-sm wu-shadow-md",e),...n}));Ps.displayName=Bt.Content.displayName;const En=h.forwardRef(({content:e,position:t,positionOffset:n,duration:s,children:r,className:o,showArrow:i=!1,open:u,onOpenChange:l,...d},c)=>a.jsx($a,{delayDuration:s||200,children:a.jsxs(Ha,{open:u,onOpenChange:l,children:[a.jsx(Ua,{asChild:!0,children:a.jsx("span",{ref:c,children:r})}),a.jsx(bs.Portal,{children:e&&a.jsxs(Ps,{...d,side:t||"top",sideOffset:n||0,className:p("wu-max-w-sm wu-max-h-96 wu-overflow-y-auto",o),children:[e,i&&a.jsx(bs.Arrow,{className:"wu-fill-gray-notification wu-tooltip-arrow"})]})})]})}));En.displayName="WuTooltip";const Od=({label:e,className:t})=>{const n=h.useRef(null),[s,r]=h.useState(!1);return h.useEffect(()=>{const o=n.current;if(o){const i=o.clientWidth,u=o.scrollWidth,l=u/e.length,d=e.length*l;r(d>i||u>i)}},[e]),a.jsx("p",{ref:n,className:p("wu-w-full wu-truncate",t),children:s?a.jsx(En,{content:e,positionOffset:8,children:e}):e})},Fd=e=>{var w;const{productName:t,categories:n=[],user:s,children:r,onLogout:o,homeLink:i=window.location.origin,brandColor:u,dir:l="ltr",expandAll:d,DataCenter:c}=e;return a.jsx("div",{className:"wu-sticky wu-top-0 wu-z-50 wu-w-full",children:a.jsxs("header",{className:p("wu-h-12 wu-flex wu-items-center wu-justify-between wu-relative wu-bg-blue-switcher wu-text-white",l==="rtl"&&"wu-flex-row-reverse",e.className),style:e.style,children:[id((w=s==null?void 0:s.profile)==null?void 0:w.subtitle)&&window.wickUiVersion&&a.jsxs("p",{className:"wu-text-[10px] wu-text-gray-subtle wu-font-normal wu-absolute wu-top-11 wu-right-1 wu-z-[-1] wu-invisible","aria-label":"wickUiVersion",children:["Wick UI: v",window.wickUiVersion]}),a.jsx("section",{className:"wu-flex wu-items-center wu-gap-2 wu-shrink-0",children:a.jsx(qa,{productCategories:n,activeProductName:t,activeProductColor:u,dir:l,homeLink:i,expandAll:d})}),a.jsx(za,{dir:l,children:r}),a.jsxs("section",{className:p("wu-flex wu-items-center wu-justify-end wu-shrink-0 wu-gap-2",l==="rtl"?"wu-flex-row-reverse wu-pl-4":"wu-flex-row wu-pr-4"),children:[a.jsx(La,{dir:l}),(s==null?void 0:s.profile)&&Object.keys(s.profile).length>0&&a.jsx(Fa,{user:s,onLogout:o,dir:l,DataCenter:c})]})]})})},ze=Wt.Root,lt=Wt.Trigger,Oe=y.forwardRef(({className:e,align:t="center",sideOffset:n=4,...s},r)=>a.jsx(Wt.Portal,{children:a.jsx(Wt.Content,{ref:r,align:t,sideOffset:n,className:p("wu-z-50 wu-w-72 wu-border wu-bg-popover wu-p-4 wu-text-popover-foreground wu-shadow-md wu-outline-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...s})}));Oe.displayName=Wt.Content.displayName;function ja({className:e,classNames:t,dir:n="ltr",...s}){const r=Ia.getDefaultClassNames();return a.jsx(Ia.DayPicker,{showOutsideDays:s.showOutsideDays||!1,className:p("wu-p-3",e),classNames:{root:p(r.root,"wu-relative wu-rounded-none wu-bg-white dark:wu-bg-gray-switcher"),caption_label:p("wu-text-xs",s.captionLayout==="dropdown"?"wu-hidden":""),month_caption:p(r.month_caption,"wu-mb-5"),months:p(r.months,"wu-flex wu-flex-col sm:wu-flex-row wu-gap-4"),dropdowns:p(r.dropdowns,"wu-flex wu-items-center wu-justify-start wu-gap-2",(s.mode==="range","")),dropdown:p(r.dropdown,"wu-px-2 wu-py-1 wu-text-sm wu-text-gray-lead wu-font-medium focus:wu-outline-none wu-bg-white wu-border-b wu-border-gray-subtle focus-visible:wu-border-blue-p"),weekday:p(r.weekday,"wu-text-gray-lead wu-rounded-none wu-w-9 wu-font-normal wu-text-xs wu-bg-gray-10 wu-py-2"),day_button:p(r.day_button,"wu-w-full wu-h-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-2"),day:p(r.day,"wu-text-gray-lead wu-transition-colors wu-duration-300 [&:not([aria-selected])]:hover:wu-bg-gray-25 wu-text-sm wu-w-9 wu-h-9 wu-min-w-0 wu-text-center wu-p-0 wu-rounded-none data-[today=true]:[&:not([aria-selected])]:wu-border data-[today=true]:[&:not([aria-selected])]:wu-border-blue-p data-[today=true]:[&:not([aria-selected])]:wu-text-gray-lead"),selected:p(r.selected,"wu-bg-blue-p [&:not(.rm)]:wu-text-white hover:wu-bg-blue-pHover"),range_middle:p("rm",r.range_middle,"wu-bg-blue-p/10 wu-rounded-none hover:wu-bg-blue-p/20 wu-text-gray-lead hover:wu-text-white data-[today=true]:wu-bg-blue-p/20 hover:data-[today=true]:wu-bg-blue-pHover"),range_end:p(r.range_end,"wu-rounded-none"),range_start:p(r.range_start,"wu-rounded-none wu-bg-blue-p hover:wu-bg-blue-pHover"),month_grid:p(r.month_grid,"[&>thead>tr>th]:wu-pb-2 wu-border-collapse wu-space-y-1"),button_next:p(r.button_next,Ds({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-text-gray-lead"),button_previous:p(r.button_previous,Ds({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-rotate-180 wu-text-gray-lead"),nav:p(r.nav,"wu-absolute wu-top-4 wu-right-3 wu-flex",n==="rtl"&&"wu-right-auto wu-left-3 wu-flex-row-reverse"),chevron:p(r.chevron,"!wu-text-red-500"),outside:p(r.outside,"wu-invisible"),disabled:p(r.disabled,"hover:wu-bg-white wu-text-gray-subtle"),...t},components:{Chevron:()=>a.jsx("span",{className:"wm-chevron-right wu-text-lg wu-leading-5"})},...s})}ja.displayName="Calendar";const _s=e=>a.jsx(ja,{...e}),Ga=e=>{const{handleDateChange:t,disabled:n,onReset:s,showResetButton:r}=e;return a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-end wu-gap-2 wu-mt-2 wu-date-picker-footer",children:[r&&a.jsx(Ce,{variant:"secondary",onClick:s,Icon:a.jsx("span",{className:"wu-text-[20px] wu-leading-5 -wu-mt-[1px] wm-refresh"}),className:"wu-date-picker-footer-reset",children:"Reset"}),a.jsx(Lt.PopoverClose,{asChild:!0,children:a.jsx(Ce,{onClick:t,disabled:n,className:"wu-date-picker-apply",children:"Apply"})})]})},Vs=({formattedString:e,dir:t,placeholder:n="Select Date",className:s,variant:r="primary",color:o,CustomTrigger:i,...u})=>a.jsx(Lt.PopoverTrigger,{asChild:!i,dir:t,children:i?a.jsx(a.Fragment,{children:i(e)}):a.jsx(Ce,{...u,className:p("wu-justify-between wu-w-full wu-gap-2 wu-text-xs wu-border-b wu-rounded-none wu-rounded-t-sm wu-min-w-48 wu-border-gray-subtle wu-text-gray-lead wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light wu-bg-gray-10 hover disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-subtle hover:wu-text-gray-lead hover:wu-bg-gray-10 hover:wu-border-gray-40 wu-datepicker-trigger",r==="outlined"&&"wu-border wu-border-subtle wu-bg-transparent",s),Icon:a.jsx("span",{className:"wm-calendar-month wu-text-sm"}),iconPosition:"right",children:e||n})}),Ka=(e,t,n,s)=>{const r=Y.startOfDay(e).getTime();return!!(t||n&&r<Y.startOfDay(n).getTime()||s&&r>Y.startOfDay(s).getTime())},Mn=e=>e?typeof e=="string"?new Date(e):e:new Date,Os="\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])",Ld=[{label:"Last 7 days",value:7},{label:"Last 30 days",value:30},{label:"Last 90 days",value:90},{label:"Last 365 days",value:365}],Wd=({formatString:e="yyyy-MM-dd",value:t,onChange:n,disabled:s,minDate:r=Y.sub(new Date,{years:5}),maxDate:o=Y.add(new Date,{years:1}),dir:i="ltr",Label:u,labelPosition:l="top",onReset:d,showResetButton:c=!1,placeholder:w="Select Date",CustomTrigger:f,...m})=>{const[g,b]=h.useState(),[x,S]=h.useState(""),v=h.useCallback(()=>{const N=Mn(g);S(Y.format(N,e)),n&&n(g)},[g,e,n]),T=h.useCallback(()=>{d?d():(b(void 0),S(""),n&&n(void 0))},[n,d]);return h.useEffect(()=>{const N=Mn(t);b(N),S(Y.format(N,e))},[t,e]),a.jsxs(Te,{className:p("wu-flex wu-gap-1",l==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[u,a.jsxs(ze,{children:[a.jsx(Vs,{formattedString:x,dir:i,placeholder:w,CustomTrigger:f,...m}),a.jsx(Oe,{className:"wu-p-0 wu-w-fit wu-date-picker-content",align:"start",sideOffset:-.5,dir:i,children:a.jsx(_s,{dir:i,mode:"single",captionLayout:"dropdown",selected:g,onSelect:b,disabled:N=>Ka(N,s,r,o),startMonth:r,endMonth:o,required:!0,autoFocus:!0,defaultMonth:g,className:p("wu-border wu-border-blue-p wu-date-picker"),footer:a.jsx(Ga,{handleDateChange:v,disabled:s,onReset:T,showResetButton:c})})})]})]})},Ya="yyyy-MM-dd",Bd=[{label:"Day",value:1},{label:"Week",value:7},{label:"Month",value:30},{label:"Quarter",value:90},{label:"Year",value:365}],qd=({current:e,onSelect:t,presetRanges:n=Ld})=>{const[s,r]=h.useState(),[o,i]=h.useState(!1),[u,l]=h.useState(""),[d,c]=h.useState(""),[w,f]=h.useState(!1),m=h.useMemo(()=>n.map(v=>v.value),[n]),g=p("wu-flex wu-w-full wu-gap-2 wu-px-4 wu-py-2 wu-text-sm wu-text-gray-lead wu-transition-colors","wu-rounded-none hover:wu-bg-gray-10 focus:wu-outline-none focus-visible:wu-ring-2","focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-1 wu-text-start"),b=h.useCallback(v=>{if(v===void 0){r(void 0),i(!0);return}const T=Number(v)-1;r(T),i(!1),t({from:Y.sub(new Date,{days:T}),to:new Date})},[t]),x=h.useCallback((v,T)=>{if(!v||!(e!=null&&e.to)||!(e!=null&&e.from)||!new RegExp(Os).test(v))return!1;const C=new Date(T==="start"?v:e.from),D=new Date(T==="end"?v:e.to);return Y.isBefore(D,C)?(f(!0),!1):(f(!1),!(Y.isSameDay(C,e.from)&&Y.isSameDay(D,e.to)))},[e]),S=h.useCallback((v,T)=>{if((T==="start"?l:c)(v),x(v,T)){const C={from:e==null?void 0:e.from,to:e==null?void 0:e.to};T==="start"&&(C.from=new Date(v)),T==="end"&&(C.to=new Date(v)),t(C)}},[e,t,x]);return h.useEffect(()=>{if(e!=null&&e.to&&(e!=null&&e.from)&&Y.isValid(e.to)&&Y.isValid(e.from)){l(Y.format(e.from,Ya)),c(Y.format(e.to,Ya));const v=Y.differenceInCalendarDays(e.to,e.from);Y.isToday(e.to)&&m.includes(v+1)?(r(v),i(!1)):(r(void 0),i(!0))}},[e,m]),a.jsxs("div",{className:"wu-flex wu-flex-col wu-gap-1 wu-p-2 wu-bg-white wu-w-60 wu-date-picker-sidebar",children:[a.jsx("ul",{className:"wu-flex wu-gap-1 wu-py-2 wu-date-picker-batch-list",children:Bd.map(({label:v,value:T})=>a.jsx(Nt,{variant:"secondary",className:"wu-px-1 wu-py-1 wu-text-xs wu-h-fit wu-min-w-fit disabled:wu-bg-white",disabled:T!==1,children:v},T))}),a.jsxs("ul",{className:"wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges",children:[n.map(({label:v,value:T})=>a.jsx("li",{children:a.jsx("button",{className:p(g,s===T-1&&"wu-bg-blue-p/10"),onClick:()=>b(T),children:v})},T)),a.jsx("li",{children:a.jsx("button",{className:p(g,o&&"wu-bg-blue-p/10"),onClick:()=>b(),children:"Custom Range"})})]}),a.jsxs("div",{className:"wu-relative wu-flex wu-gap-3 wu-pt-2 wu-date-picker-range-footer",children:[a.jsx(Ge,{placeholder:"Start Date",pattern:Os,value:u,onChange:v=>S(v.target.value,"start"),"aria-label":"Start Date"}),a.jsx(Ge,{placeholder:"End Date",pattern:Os,value:d,onChange:v=>S(v.target.value,"end"),"aria-label":"End Date"}),w?a.jsx("small",{className:"wu-absolute wu-text-[10px] wu-leading-[14px] wu-text-red-deep wu-left-0 -wu-bottom-4 wu-text-start",children:"End date must be after start date"}):a.jsx("small",{className:"wu-absolute wu-right-0 wu-leading-[14px] -wu-bottom-4 wu-text-gray-subtle wu-text-end",children:"yyyy-mm-dd"})]})]})},Xa={wuDateRangeNativeSidebar:"_wuDateRangeNativeSidebar_cvfo0_1",customInputs:"_customInputs_cvfo0_26"},zd=({Trigger:e,children:t,className:n,dir:s,open:r,onOpenChange:o,modal:i,...u})=>a.jsxs(ze,{open:r,onOpenChange:o,modal:i,children:[a.jsx(lt,{asChild:!0,dir:s,children:e}),a.jsx(Oe,{className:p("wu-w-80 wu-p-0 wu-border-blue-p wu-bg-white wu-dark:border-gray-switcher",n),dir:s,...u,children:t})]}),Fs=e=>a.jsx(Lt.PopoverClose,{asChild:!0,children:a.jsx(Ce,{...e})}),$d=[{label:"Last week",value:7},{label:"Last month",value:30},{label:"Last quarter",value:90},{label:"Last year",value:365}],$e=e=>(e?new Date(e):new Date).toISOString().split("T")[0],Za=e=>Y.sub(new Date,{days:e}),Hd=e=>e?Y.sub(new Date,{days:1}):new Date;function Ud({ranges:e=$d,excludeToday:t=!0,current:n,onSelect:s,onReset:r,onApply:o,showResetButton:i=!0,maxDate:u,minDate:l,...d}){const[c,w]=h.useState($e(n==null?void 0:n.from)),[f,m]=h.useState($e(n==null?void 0:n.to)),[g,b]=h.useState(!1),[x,S]=h.useState();h.useEffect(()=>{n!=null&&n.from&&w($e(n.from)),n!=null&&n.to&&m($e(n.to))},[n==null?void 0:n.from,n==null?void 0:n.to]),h.useEffect(()=>{if(n!=null&&n.from&&(n!=null&&n.to)){const D=Y.differenceInCalendarDays(n.to,n.from)+1;S(D);const M=e.find(I=>I.value===D);b(!M)}},[n,e]);const v=h.useCallback(C=>{S(C);const D=Za(C),M=Hd(t);w($e(D)),m($e(M)),s&&s({to:M,from:D})},[t,s]),T=h.useCallback((C,D)=>{const M=new Date(C);if(!isNaN(M.getTime())){if(D==="start"&&f){const I=new Date(f);if(M>I)return}if(D==="end"&&c){const I=new Date(c);if(M<I)return}D==="start"&&w(C),D==="end"&&m(C),s&&s({to:D==="end"?M:new Date(f),from:D==="start"?M:new Date(c)})}},[c,f,s]),N=h.useMemo(()=>e.map(C=>{const D=Za(C.value);return{...C,displayStartDate:Y.format(D,"d MMM yy"),displayEndLabel:t?"Yesterday":"Today"}}),[e,t]);return a.jsxs("div",{className:Xa.wuDateRangeNativeSidebar,...d,children:[a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("button",{onClick:()=>b(!0),"data-selected":g,"aria-pressed":g,"aria-label":"Select custom date range",children:"Custom Range"})}),a.jsxs("li",{className:Xa.customInputs,"data-expanded":g,children:[a.jsx(Ge,{type:"date",value:c,onChange:C=>T(C.target.value,"start"),Label:"Start",min:$e(l),max:$e(u)}),a.jsx(Ge,{type:"date",value:f,onChange:C=>T(C.target.value,"end"),Label:"End",min:c||$e(l),max:$e(u)})]}),N.map(C=>a.jsx("li",{children:a.jsxs("button",{onClick:()=>{b(!1),v(C.value)},"data-selected":!g&&x===C.value,"aria-pressed":!g&&x===C.value,"aria-label":`Select ${C.label}`,children:[C.label," ",a.jsxs("small",{children:["(",C.displayStartDate," - ",C.displayEndLabel,")"]})]})},C.value))]}),a.jsxs("footer",{children:[i&&a.jsx(Fs,{variant:"secondary",Icon:a.jsx(Ve,{icon:"wm-refresh"}),onClick:r,children:"Reset"}),a.jsx(Fs,{onClick:o,children:"Apply"})]})]})}const jd=({formatString:e="yyyy/MM/dd",value:t,onChange:n,disabled:s,minDate:r=Y.sub(new Date,{years:5}),maxDate:o=Y.add(new Date,{years:1}),dir:i="ltr",minDateToSelect:u,maxDateToSelect:l,presetRanges:d,Label:c,labelPosition:w="top",onReset:f,showResetButton:m=!0,placeholder:g="Select Date Range",CustomTrigger:b,native:x,...S})=>{const[v,T]=h.useState(t),[N,C]=h.useState(t),[D,M]=h.useState(""),I=h.useCallback(()=>{if(N){const P=N.from,A=N.to;T({from:P,to:A}),M(`${Y.format(P,e)} - ${Y.format(A,e)}`),n&&n({from:P,to:A})}},[N,e,n]),k=h.useCallback(()=>{C(v)},[v]),F=h.useCallback(()=>{f?f():(T(void 0),C(void 0),M(""),n&&n(void 0))},[f,n]);return h.useEffect(()=>{if(t!=null&&t.from&&(t!=null&&t.to)){const P=Mn(t.from),A=Mn(t.to);T(t),C(t),M(`${Y.format(P,e)} - ${Y.format(A,e)}`)}else T(void 0),C({to:new Date,from:new Date})},[t,e]),a.jsxs(Te,{className:p("wu-flex wu-gap-1",w==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[c,a.jsxs(ze,{onOpenChange:P=>!P&&k(),children:[a.jsx(Vs,{formattedString:D,dir:i,placeholder:g,CustomTrigger:b,...S}),a.jsx(Oe,{className:"wu-flex wu-p-0 wu-border wu-w-fit wu-border-blue-p wu-bg-white",align:"start",sideOffset:-.5,dir:i,children:x?a.jsx(Ud,{current:N,onSelect:P=>{C(P)},ranges:d,onApply:I,onReset:F,showResetButton:m,minDate:r,maxDate:o}):a.jsxs(a.Fragment,{children:[a.jsx(qd,{current:N,onSelect:C,presetRanges:d}),a.jsx(_s,{dir:i,numberOfMonths:2,mode:"range",captionLayout:"dropdown",selected:N,onSelect:C,disabled:P=>Ka(P,s,r,o),startMonth:r,endMonth:o,required:!0,autoFocus:!0,defaultMonth:v==null?void 0:v.from,className:p("wu-shadow-none wu-date-range-picker"),min:u,max:l,footer:a.jsx(Ga,{handleDateChange:I,disabled:s,onReset:F,showResetButton:m})})]})})]})]})},Ja=h.forwardRef((e,t)=>{const{className:n,rounded:s,...r}=e;return a.jsx("div",{className:p("wu-card wu-p-2 wu-pt-1 hover:wu-shadow-card wu-border wu-border-black/20 hover:wu-border-black/30 wu-transition-colors wu-duration-300",s?"wu-rounded-lg":"wu-rounded-sm",n),ref:t,...r})});Ja.displayName="WuCard";const Qa=h.forwardRef((e,t)=>{const{className:n,...s}=e;return a.jsx("div",{ref:t,...s,className:p("wu-p-2 wu-mb-2 wu-border-b wu-border-gray-40 min-h-12 wu-card-header",n)})});Qa.displayName="WuCardHeader";const Ra=h.forwardRef((e,t)=>{const{className:n,...s}=e;return a.jsx("div",{ref:t,...s,className:p("wu-p-2 wu-mt-2 wu-border-t wu-border-gray-40 min-h-12 wu-card-footer",n)})});Ra.displayName="WuCardHeader";const eo=y.forwardRef(({className:e,partial:t,...n},s)=>a.jsx(ys.Root,{ref:s,className:p("wu-h-4 wu-w-4 wu-shrink-0 wu-rounded-[2px] wu-bg-white wu-border wu-border-gray-subtle wu-ring-offset-background focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[1px] data-[state=checked]:wu-bg-blue-p data-[state=checked]:wu-text-white data-[state=checked]:wu-border-none data-[state=checked]:hover:wu-bg-blue-q hover:wu-bg-gray-20 hover:wu-border-blue-p wu-transition-all data-[state=checked]:disabled:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-opacity-50 disabled:data-[state=unchecked]:wu-bg-gray-20 disabled:hover:wu-border-gray-subtle disabled:wu-border-gray-subtle",e),...n,children:a.jsxs(ys.Indicator,{className:p("wu-flex wu-items-center wu-justify-center wu-text-current"),children:[!t&&a.jsx("span",{className:"wm-check wu-text-base wu-leading-4"}),t&&a.jsx("span",{className:"wm-check-indeterminate-small wu-text-base wu-leading-4"})]})}));eo.displayName=ys.Root.displayName;const Fe=h.forwardRef((e,t)=>{const{disabled:n,checked:s,Label:r,labelPosition:o="right",className:i,id:u=Cn(),partial:l,onChange:d,required:c,readonly:w,...f}=e;return h.useEffect(()=>{f.defaultChecked!==void 0&&s!==void 0&&console.error("WuCheckbox: Both `checked` and `defaultChecked` cannot be used together. Use only one of them.")},[f.defaultChecked,s]),a.jsxs("div",{className:Gd({labelPosition:o,className:"wu-checkbox-container"}),dir:f.dir,children:[a.jsx(eo,{id:u,...f,partial:l,checked:s,disabled:n||w,onCheckedChange:d,className:p("wu-peer wu-checkbox",i),required:c,ref:t}),r&&a.jsx(Te,{htmlFor:u,className:"wu-w-full wu-checkbox-label",children:r})]})}),Gd=_e.cva("wu-flex wu-items-center wu-gap-2 wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row-reverse wu-text-right",right:"wu-flex-row"}}});Fe.displayName="WuCheckbox";const Kd=e=>{const{className:t,children:n,...s}=e;return a.jsx("span",{...s,className:p("wu-flex wu-items-center wu-justify-center wu-truncate wu-max-w-28 wu-w-fit wu-px-2 wu-py-1 wu-text-xs wu-bg-gray-20 wu-rounded-sm hover:wu-bg-gray-40 hover:wu-text-blue-q",t),children:n})},Ls=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command,{ref:n,className:p("wu-flex wu-h-full wu-w-full wu-flex-col wu-overflow-hidden wu-rounded-md",e),...t}));Ls.displayName=xe.Command.displayName;const to=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{className:"wu-flex wu-items-center wu-border-b wu-px-3",children:a.jsx(xe.Command.Input,{ref:n,className:p("wu-flex wu-h-11 wu-w-full wu-rounded-md wu-bg-transparent wu-py-3 wu-text-sm wu-outline-none wu-placeholder:wu-text-muted-foreground disabled:wu-cursor-not-allowed disabled:wu-opacity-50",e),...t})}));to.displayName=xe.Command.Input.displayName;const Ws=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command.List,{ref:n,className:p("",e),...t}));Ws.displayName=xe.Command.List.displayName;const Bs=y.forwardRef((e,t)=>a.jsx(xe.Command.Empty,{ref:t,className:"wu-text-center wu-p-2 wu-pb-2.5 wu-text-xs",...e}));Bs.displayName=xe.Command.Empty.displayName;const $t=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command.Group,{ref:n,className:p("",e),...t}));$t.displayName=xe.Command.Group.displayName;const no=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command.Separator,{ref:n,className:p("wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));no.displayName=xe.Command.Separator.displayName;const Ht=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command.Item,{ref:n,className:p("wu-relative wu-flex wu-cursor-default wu-gap-2 wu-select-none wu-items-center wu-rounded-sm wu-px-2 wu-py-3 wu-text-sm wu-outline-none data-[disabled=true]:wu-pointer-events-none data-[disabled=true]:wu-opacity-50 [&_svg]:wu-pointer-events-none [&_svg]:wu-size-4 [&_svg]:wu-shrink-0",e),...t}));Ht.displayName=xe.Command.Item.displayName;const Ct=h.forwardRef(({containerHeight:e=400,list:t,callback:n,dir:s,className:r,style:o},i)=>a.jsx(Xc.Virtuoso,{ref:i,dir:s,className:r,style:{height:e,scrollbarWidth:"thin",scrollbarColor:"#d4d4d4 #f1f1f1",overflowX:"hidden",...o},data:t,itemContent:(u,l)=>n(u,l)}));Ct.displayName="WuVirtualScroll";const Yd=({tags:e,triggerRef:t})=>{const[n,s]=h.useState([]),[r,o]=h.useState([]),i=h.useMemo(()=>a.jsx("ul",{className:"wu-flex wu-flex-col wu-items-start wu-justify-center wu-list-none",children:r.map((l,d)=>a.jsx("li",{className:"wu-py-1 wu-text-xs wu-text-left",children:l},d))}),[r]),u=l=>{const d=document.createElement("div");Object.assign(d.style,{display:"inline-block",visibility:"hidden",position:"absolute",whiteSpace:"nowrap"}),d.textContent=l,document.body.appendChild(d);const c=d.offsetWidth;return document.body.removeChild(d),c+8};return h.useEffect(()=>{const l=()=>{if(t.current){const f=t.current.offsetWidth-20-36;let m=0;const g=[],b=[];e.forEach(x=>{const S=u(x);m+S+8<f?(g.push(x),m+=S+8):b.push(x)}),s(g),o(b)}};return l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[e,t]),a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-text-xs",children:[n.map((l,d)=>a.jsx("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:l},d)),r.length>0&&a.jsx(En,{content:i,className:"wu-z-[51] wu-text-left",children:a.jsxs("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:["+",r.length]})})]})},Xd=({placeholder:e="Select...",isEllipse:t=!1,selectedOptions:n,variant:s="flat",dir:r="ltr",accessorKey:o,multiple:i,id:u,disabled:l,selectAll:d,isCheckedAll:c,className:w,...f})=>{const[m,g]=h.useState([]),b=h.useRef(null);h.useEffect(()=>{if(!n||Array.isArray(n)&&n.length===0){g([]);return}if(i){const S=n;g(S==null?void 0:S.map(v=>v[o.label]));return}else g([n[o.label]])},[n]);const x=()=>{var S;return m.length?c&&(d!=null&&d.enable)&&(d!=null&&d.triggerText)?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",children:d.triggerText}):t?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",style:{width:`${(((S=b.current)==null?void 0:S.offsetWidth)||0)-32}px`},children:m.join(", ")}):a.jsx(Yd,{tags:m,triggerRef:b}):a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:e})};return a.jsx(lt,{dir:r,asChild:!0,id:u,disabled:l,children:a.jsxs("button",{...f,ref:b,disabled:l,className:p("focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover wu-bg-white focus-visible:wu-ring-offset-2 wu-flex wu-w-full wu-items-center wu-justify-between wu-border-b wu-border-gray-subtle wu-py-1.5 wu-px-2 placeholder:wu-text-gray-40 focus:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-bg-gray-10 hover:wu-border-blue-p wu-transition-colors focus-visible:wu-bg-gray-20 focus-visible:wu-border-blue-p wu-cursor-pointer wu-text-xs wu-rounded-t-sm wu-gap-2 wu-h-8 wu-group/wuCombobox wu-combobox-trigger",s==="outlined"&&"wu-border wu-border-gray-subtle","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10",w),children:[x(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]/wuCombobox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},so=ee.Root,ro=ee.Trigger,ao=ee.Group,Zd=ee.Portal,Jd=ee.Sub,Qd=ee.RadioGroup,oo=y.forwardRef(({className:e,inset:t,children:n,position:s,...r},o)=>a.jsxs(ee.SubTrigger,{ref:o,className:p("wu-flex wu-cursor-default wu-select-none wu-text-xs wu-items-center wu-p-2 wu-outline-none focus:wu-bg-gray-20 data-[state=open]:wu-bg-gray-20",t&&"wu-pl-8",e),...r,children:[s==="left"&&a.jsx("span",{className:p("wm-chevron-right",r.dir==="rtl"&&"ml-2")}),n,s!=="left"&&a.jsx("span",{className:p("wu-text-base wu-leading-4",r.dir==="rtl"&&"wu-mr-auto wm-chevron-left",r.dir!=="rtl"&&"wu-ml-auto wm-chevron-right")})]}));oo.displayName=ee.SubTrigger.displayName;const io=y.forwardRef(({className:e,...t},n)=>a.jsx(ee.SubContent,{ref:n,className:p("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-lg data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...t}));io.displayName=ee.SubContent.displayName;const qs=y.forwardRef(({className:e,sideOffset:t=4,...n},s)=>a.jsx(ee.Portal,{children:a.jsx(ee.Content,{ref:s,sideOffset:t,className:p("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-md data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...n})}));qs.displayName=ee.Content.displayName;const In=y.forwardRef(({className:e,inset:t,...n},s)=>a.jsx(ee.Item,{ref:s,className:p("wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-p-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",t&&"wu-pl-8",e),...n}));In.displayName=ee.Item.displayName;const uo=y.forwardRef(({className:e,children:t,checked:n,dir:s,...r},o)=>a.jsxs(ee.CheckboxItem,{ref:o,className:p("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",s==="rtl"&&"wu-pr-8 wu-pl-2",s!=="rtl"&&"wu-pl-8 wu-pr-2",e),checked:n,...r,children:[a.jsx("span",{className:p("wu-absolute wu-flex wu-items-center wu-justify-center wu-w-4 wu-h-4 wu-rounded-sm wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-blue-p group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p",s==="rtl"&&"wu-right-2",s!=="rtl"&&"wu-left-2"),children:a.jsx(ee.ItemIndicator,{children:a.jsx("span",{className:"wm-check wu-text-base wu-text-white"})})}),t]}));uo.displayName=ee.CheckboxItem.displayName;const lo=y.forwardRef(({className:e,children:t,...n},s)=>a.jsxs(ee.RadioItem,{ref:s,className:p("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-pl-8 wu-pr-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 focus:wu-text-accent-foreground data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",e),...n,children:[a.jsx("span",{className:"wu-absolute wu-rounded-full wu-left-2 wu-flex wu-h-4 wu-w-4 wu-items-center wu-justify-center wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-white group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p group-hover:group-data-[state=checked]:wu-ring-blue-q",children:a.jsx(ee.ItemIndicator,{className:"wu-w-4 wu-h-4 wu-flex wu-items-center wu-justify-center",children:a.jsx("span",{className:"wm-circle wu-text-blue-p group-hover:group-data-[state=checked]:wu-text-blue-q wu-text-xs"})})}),t]}));lo.displayName=ee.RadioItem.displayName;const Ut=y.forwardRef(({className:e,inset:t,...n},s)=>a.jsx(ee.Label,{ref:s,className:p("wu-p-2 wu-font-medium wu-text-xs",t&&"wu-pl-8",e),...n}));Ut.displayName=ee.Label.displayName;const An=y.forwardRef(({className:e,...t},n)=>a.jsx(ee.Separator,{ref:n,className:p("-wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));An.displayName=ee.Separator.displayName;const co=({option:e,value:t,multiple:n=!1,onSelect:s,accessorKey:r,dir:o})=>{const[i,u]=h.useState(n?[]:"");h.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[r.value])):JSON.stringify(t[r.value]))},[t,r.value,n]);const l=n?i.includes(JSON.stringify(e[r.value])):i===JSON.stringify(e[r.value]),d=()=>{e.disabled||s(e)};return a.jsxs(Ht,{onSelect:d,disabled:e.disabled,className:p("wu-cursor-pointer wu-text-xs wu-items-start wu-leading-4 wu-py-2 wu-combobox-item hover:wu-bg-gray-100",l&&"wu-bg-gray-10"),dir:o,children:[n&&a.jsx(Fe,{checked:l}),a.jsx(Rd,{option:e,accessorKey:r})]})},Rd=({option:e,accessorKey:t})=>{const n=e[t.label];return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1",children:[e.icon&&e.icon,n,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wu-text-sm wm-lock wu-text-orange-deep"})]})},wo=e=>{const{option:t,selectAll:n,handleSelectAll:s,isCheckedAll:r,isPartialSelected:o,...i}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(Ht,{onSelect:s,className:p("wu-cursor-pointer wu-text-xs wu-leading-4 wu-py-2 wu-combobox-item"),dir:i.dir,children:[a.jsx(Fe,{checked:r||o,partial:o,"data-partial":o,"aria-label":(n==null?void 0:n.label)||"Select All"}),a.jsx("span",{"aria-hidden":!0,children:(n==null?void 0:n.label)||"Select All"})]});case"group":return a.jsxs($t,{children:[a.jsx(Ut,{children:t.label}),t.options.map((l,d)=>h.createElement(co,{...i,option:l,key:d}))]});case"divider":return a.jsx(no,{className:"wu-mx-4"});default:return a.jsx(co,{...i,option:t})}},ew=e=>{const t=[],n=[],s=[],r=[];return e.forEach(o=>{o.type==="group"?(t.push(o),s.push(...o.options),r.push(...o.options.filter(i=>!i.disabled))):o.type==="divider"?n.push(o):s.push(o),o!=null&&o.disabled||r.push(o)}),{groups:t,dividers:n,allOptions:s,enabledOptions:r}},tw=h.memo(Ge),nw=({data:e,accessorKey:t,value:n,defaultValue:s,Header:r,virtualizedThreshold:o=100,isEllipse:i,placeholder:u,variant:l,dir:d,onSelect:c,Label:w,maxHeight:f=420,multiple:m=!1,hasGroup:g=!1,selectAll:b,id:x,disabled:S,labelPosition:v="top",className:T,onScroll:N,maxContentWidth:C,enableSearch:D=!0,noDataContent:M,...I})=>{const[k,F]=h.useState(""),[P,A]=h.useState(),[V,W]=h.useState(!1),[_,q]=h.useState(!1),[B,U]=h.useState(!1),$=h.useRef(null),{allOptions:H,enabledOptions:pe}=h.useMemo(()=>g||b&&!b.includeDisabled?ew(e):{allOptions:e,groups:[],dividers:[],enabledOptions:[]},[e,g]),de=h.useMemo(()=>{if(!k)return e;const z=k.toLowerCase();return H.filter(J=>J[t.label].toLowerCase().includes(z))},[k,H,e,t.label]),Ae=h.useMemo(()=>m&&b!=null&&b.enable&&!k&&de.length>0?[{type:"all"},...de]:de,[de,k,m]),ge=h.useCallback(z=>{const J=z[t.value];m?A(ie=>{const De=ie||[],be=De.some(ve=>ve[t.value]===J)?De.filter(ve=>ve[t.value]!==J):[...De,z];return c==null||c(be),be}):(W(!1),A(z),c==null||c(z))},[m,t.value,c]),X=h.useCallback(z=>F(z.target.value),[]),L=h.useCallback(()=>F(""),[]);h.useEffect(()=>{if(n!==void 0&&s!==void 0){console.error("defaultValue and value cannot be used simultaneously");return}else n!==void 0?A(n):s!==void 0&&A(s)},[n,s]),h.useEffect(()=>{if(!m)return;const z=b!=null&&b.includeDisabled?(P==null?void 0:P.length)===H.length:(P==null?void 0:P.length)===pe.length;q(z);const J=(P==null?void 0:P.length)>0&&!z;U(J)},[P,b]);const j=h.useCallback(()=>{const z=_?[]:b!=null&&b.includeDisabled?H:pe;A(z),c==null||c(z)},[_,m,H,pe,c,b]),K=zt(v);return a.jsxs("div",{className:p(K,"wu-flex wu-combobox-container"),ref:$,children:[a.jsxs(ze,{onOpenChange:z=>{z&&L(),W(z)},open:V,modal:!0,children:[a.jsx(Xd,{selectedOptions:P,accessorKey:t,isEllipse:i,placeholder:u,variant:l,dir:d,multiple:m,disabled:S,selectAll:b,isCheckedAll:_,className:T,id:x,...I}),a.jsx(Oe,{className:"wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-p-0 wu-bg-white wu-border wu-border-blue-p wu-combobox-content",align:"start",sideOffset:-1,style:{maxWidth:C},children:a.jsxs(Ls,{id:x,children:[D&&a.jsx("div",{className:"wu-m-2",children:a.jsx(tw,{placeholder:"Search...",Icon:a.jsx("span",{className:"wm-search"}),className:"wu-text-xs wu-combobox-search",onChange:X,name:"Search","aria-label":"Search",dir:d,iconPosition:d==="rtl"?"right":"left"})}),r,a.jsxs(Ws,{children:[a.jsx(Bs,{children:M||"No results found."}),Ae.length>=o?a.jsx(Ct,{className:"wu-combobox-list",containerHeight:f,list:Ae,callback:(z,J)=>a.jsx(wo,{option:J,value:P,onSelect:ge,multiple:m,accessorKey:t,dir:d,selectAll:b,handleSelectAll:j,isCheckedAll:_,isPartialSelected:B},z),dir:d}):a.jsx("div",{style:{height:"fit-content",maxHeight:f,overflow:"auto"},className:"wu-combobox-list",onScroll:N,children:Ae.map((z,J)=>a.jsx(wo,{option:z,value:P,onSelect:ge,multiple:m,accessorKey:t,dir:d,selectAll:b,handleSelectAll:j,isCheckedAll:_,isPartialSelected:B},J))})]})]})})]}),w&&a.jsx(Te,{htmlFor:x,className:"wu-combobox-label",children:w})]})},sw=e=>{const{textToCopy:t,notificationText:n,...s}=e,[r,o]=h.useState(!1),i=async()=>{if(t)try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),2e3)}catch(u){console.error("Failed to copy:",u)}};return a.jsxs(Ce,{...s,onClick:i,variant:"iconOnly",className:p("wu-relative",e.className),"aria-label":"Copy to clipboard",children:[n&&a.jsx("span",{className:p("wu-absolute wu-text-[6px] wu-leading-3 -wu-top-4 wu-right-0 wu-bg-gray-notification wu-text-white wu-rounded-sm wu-shadow-md wu-px-1 wu-animate-ping-once",r?"wu-block":"wu-hidden"),children:n}),a.jsx(Ve,{icon:"wm-content-copy",className:"wu-text-lg"})]})},fo=R.Root,rw=R.Trigger,aw=R.Close,ow=R.Portal,po=y.forwardRef(({className:e,...t},n)=>a.jsx(R.Overlay,{className:p("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30 data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0","wu-drawer-overlay",e),...t,ref:n}));po.displayName=R.Overlay.displayName;const iw=_e.cva("wu-fixed wu-z-50 wu-gap-4 wu-p-6 wu-shadow-lg wu-transition wu-ease-in-out data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-duration-500 data-[state=open]:wu-duration-500",{variants:{side:{top:"wu-inset-x-0 wu-top-0 wu-border-b data-[state=closed]:wu-slide-out-to-top data-[state=open]:wu-slide-in-from-top",bottom:"wu-inset-x-0 wu-bottom-0 wu-border-t data-[state=closed]:wu-slide-out-to-bottom data-[state=open]:wu-slide-in-from-bottom",left:"wu-inset-y-0 wu-left-0 wu-h-full wu-w-3/4 wu-border-r data-[state=closed]:wu-slide-out-to-left data-[state=open]:wu-slide-in-from-left sm:wu-max-w-sm",right:"wu-inset-y-0 wu-right-0 wu-h-full wu-w-3/4 wu-border-l data-[state=closed]:wu-slide-out-to-right data-[state=open]:wu-slide-in-from-right sm:wu-max-w-sm"}},defaultVariants:{side:"right"}}),zs=y.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:s,overlayClassName:r,closeButtonClassName:o,...i},u)=>a.jsxs(ow,{children:[a.jsx(po,{className:r}),a.jsxs(R.Content,{ref:u,className:p(iw({side:e}),t),...i,children:[n,!s&&a.jsx(R.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Nt,{variant:"iconOnly",className:p("wu-absolute wu-right-4 wu-top-4",o),children:[a.jsx("span",{className:"wm-close"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));zs.displayName=R.Content.displayName;const ho=y.forwardRef(({className:e,...t},n)=>a.jsx(R.Title,{ref:n,className:p("wu-text-lg wu-font-semibold",e),...t}));ho.displayName=R.Title.displayName;const uw=y.forwardRef(({className:e,...t},n)=>a.jsx(R.Description,{ref:n,className:p("wu-text-sm",e),...t}));uw.displayName=R.Description.displayName;const lw=e=>t=>{e&&t.preventDefault()},cw=e=>{const{Trigger:t,children:n,hideCloseButton:s,className:r,side:o="left",open:i,onOpenChange:u,preventClickOutside:l,overlayClassName:d,closeButtonClassName:c,...w}=e;return a.jsxs(fo,{open:i,onOpenChange:u,children:[a.jsx(rw,{asChild:!0,children:t}),a.jsxs(zs,{onInteractOutside:lw(l),side:o,className:p("wu-bg-white wu-text-gray-lead wu-px-0",r),hideCloseButton:s,overlayClassName:d,closeButtonClassName:c,...w,children:[a.jsx("div",{className:"wu-hidden",children:a.jsx(ho,{})}),n]})]})},dw=({children:e,...t})=>a.jsx(aw,{...t,children:e}),mo=h.createContext({});function $s(e){const t=h.useRef(null);return t.current===null&&(t.current=e()),t.current}const go=typeof window<"u",bo=go?h.useLayoutEffect:h.useEffect,Dn=h.createContext(null);function ww(e,t){e.indexOf(t)===-1&&e.push(t)}function fw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ze=(e,t,n)=>n>t?t:n<e?e:n;function Hs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let jt=()=>{},ct=()=>{};typeof process<"u"&&((qc=process.env)==null?void 0:qc.NODE_ENV)!=="production"&&(jt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Hs(t,n))},ct=(e,t,n)=>{if(!e)throw new Error(Hs(t,n))});const Ke={},yo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function pw(e){return typeof e=="object"&&e!==null}const xo=e=>/^0[^.\s]+$/u.test(e);function Us(e){let t;return()=>(t===void 0&&(t=e()),t)}const Tt=e=>e,hw=(e,t)=>n=>t(e(n)),kn=(...e)=>e.reduce(hw),vo=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class No{constructor(){this.subscriptions=[]}add(t){return ww(this.subscriptions,t),()=>fw(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let o=0;o<r;o++){const i=this.subscriptions[o];i&&i(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const He=e=>e*1e3,Le=e=>e/1e3;function So(e,t){return t?e*(1e3/t):0}const Co=new Set;function To(e,t,n){e||Co.has(t)||(console.warn(Hs(t,n)),Co.add(t))}const Eo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mw=1e-7,gw=12;function bw(e,t,n,s,r){let o,i,u=0;do i=t+(n-t)/2,o=Eo(i,s,r)-e,o>0?n=i:t=i;while(Math.abs(o)>mw&&++u<gw);return i}function Gt(e,t,n,s){if(e===t&&n===s)return Tt;const r=o=>bw(o,0,1,e,n);return o=>o===0||o===1?o:Eo(r(o),t,s)}const Mo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Io=e=>t=>1-e(1-t),Ao=Gt(.33,1.53,.69,.99),js=Io(Ao),Do=Mo(js),ko=e=>(e*=2)<1?.5*js(e):.5*(2-Math.pow(2,-10*(e-1))),Gs=e=>1-Math.sin(Math.acos(e)),yw=Io(Gs),Po=Mo(Gs),xw=Gt(.42,0,1,1),vw=Gt(0,0,.58,1),_o=Gt(.42,0,.58,1),Nw=e=>Array.isArray(e)&&typeof e[0]!="number",Vo=e=>Array.isArray(e)&&typeof e[0]=="number",Oo={linear:Tt,easeIn:xw,easeInOut:_o,easeOut:vw,circIn:Gs,circInOut:Po,circOut:yw,backIn:js,backInOut:Do,backOut:Ao,anticipate:ko},Sw=e=>typeof e=="string",Fo=e=>{if(Vo(e)){ct(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,r]=e;return Gt(t,n,s,r)}else if(Sw(e))return ct(Oo[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Oo[e];return e},Pn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Cw(e,t){let n=new Set,s=new Set,r=!1,o=!1;const i=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function l(c){i.has(c)&&(d.schedule(c),e()),c(u)}const d={schedule:(c,w=!1,f=!1)=>{const g=f&&r?n:s;return w&&i.add(c),g.has(c)||g.add(c),c},cancel:c=>{s.delete(c),i.delete(c)},process:c=>{if(u=c,r){o=!0;return}r=!0,[n,s]=[s,n],n.forEach(l),n.clear(),r=!1,o&&(o=!1,d.process(c))}};return d}const Tw=40;function Lo(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=Pn.reduce((T,N)=>(T[N]=Cw(o),T),{}),{setup:u,read:l,resolveKeyframes:d,preUpdate:c,update:w,preRender:f,render:m,postRender:g}=i,b=()=>{const T=Ke.useManualTiming?r.timestamp:performance.now();n=!1,Ke.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(T-r.timestamp,Tw),1)),r.timestamp=T,r.isProcessing=!0,u.process(r),l.process(r),d.process(r),c.process(r),w.process(r),f.process(r),m.process(r),g.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(b))},x=()=>{n=!0,s=!0,r.isProcessing||e(b)};return{schedule:Pn.reduce((T,N)=>{const C=i[N];return T[N]=(D,M=!1,I=!1)=>(n||x(),C.schedule(D,M,I)),T},{}),cancel:T=>{for(let N=0;N<Pn.length;N++)i[Pn[N]].cancel(T)},state:r,steps:i}}const{schedule:We,cancel:Ks,state:_n}=Lo(typeof requestAnimationFrame<"u"?requestAnimationFrame:Tt,!0);let Vn;function Ew(){Vn=void 0}const Ee={now:()=>(Vn===void 0&&Ee.set(_n.isProcessing||Ke.useManualTiming?_n.timestamp:performance.now()),Vn),set:e=>{Vn=e,queueMicrotask(Ew)}},Wo=e=>t=>typeof t=="string"&&t.startsWith(e),Bo=Wo("--"),Mw=Wo("var(--"),Ys=e=>Mw(e)?Iw.test(e.split("/*")[0].trim()):!1,Iw=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qo(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Et={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Kt={...Et,transform:e=>Ze(0,1,e)},On={...Et,default:1},Yt=e=>Math.round(e*1e5)/1e5,Xs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Aw(e){return e==null}const Dw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zs=(e,t)=>n=>!!(typeof n=="string"&&Dw.test(n)&&n.startsWith(e)||t&&!Aw(n)&&Object.prototype.hasOwnProperty.call(n,t)),zo=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,o,i,u]=s.match(Xs);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(i),alpha:u!==void 0?parseFloat(u):1}},kw=e=>Ze(0,255,e),Js={...Et,transform:e=>Math.round(kw(e))},dt={test:Zs("rgb","red"),parse:zo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+Js.transform(e)+", "+Js.transform(t)+", "+Js.transform(n)+", "+Yt(Kt.transform(s))+")"};function Pw(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const Qs={test:Zs("#"),parse:Pw,transform:dt.transform},Xt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Je=Xt("deg"),Mt=Xt("%"),O=Xt("px"),_w=Xt("vh"),Vw=Xt("vw"),$o={...Mt,parse:e=>Mt.parse(e)/100,transform:e=>Mt.transform(e*100)},It={test:Zs("hsl","hue"),parse:zo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+Mt.transform(Yt(t))+", "+Mt.transform(Yt(n))+", "+Yt(Kt.transform(s))+")"},le={test:e=>dt.test(e)||Qs.test(e)||It.test(e),parse:e=>dt.test(e)?dt.parse(e):It.test(e)?It.parse(e):Qs.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?dt.transform(e):It.transform(e),getAnimatableNone:e=>{const t=le.parse(e);return t.alpha=0,le.transform(t)}},Ow=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fw(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Xs))==null?void 0:t.length)||0)+(((n=e.match(Ow))==null?void 0:n.length)||0)>0}const Ho="number",Uo="color",Lw="var",Ww="var(",jo="${}",Bw=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Zt(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let o=0;const u=t.replace(Bw,l=>(le.test(l)?(s.color.push(o),r.push(Uo),n.push(le.parse(l))):l.startsWith(Ww)?(s.var.push(o),r.push(Lw),n.push(l)):(s.number.push(o),r.push(Ho),n.push(parseFloat(l))),++o,jo)).split(jo);return{values:n,split:u,indexes:s,types:r}}function Go(e){return Zt(e).values}function Ko(e){const{split:t,types:n}=Zt(e),s=t.length;return r=>{let o="";for(let i=0;i<s;i++)if(o+=t[i],r[i]!==void 0){const u=n[i];u===Ho?o+=Yt(r[i]):u===Uo?o+=le.transform(r[i]):o+=r[i]}return o}}const qw=e=>typeof e=="number"?0:le.test(e)?le.getAnimatableNone(e):e;function zw(e){const t=Go(e);return Ko(e)(t.map(qw))}const Qe={test:Fw,parse:Go,createTransformer:Ko,getAnimatableNone:zw};function Rs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function $w({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let r=0,o=0,i=0;if(!t)r=o=i=n;else{const u=n<.5?n*(1+t):n+t-n*t,l=2*n-u;r=Rs(l,u,e+1/3),o=Rs(l,u,e),i=Rs(l,u,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:s}}function Fn(e,t){return n=>n>0?t:e}const Jt=(e,t,n)=>e+(t-e)*n,er=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},Hw=[Qs,dt,It],Uw=e=>Hw.find(t=>t.test(e));function Yo(e){const t=Uw(e);if(jt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===It&&(n=$w(n)),n}const Xo=(e,t)=>{const n=Yo(e),s=Yo(t);if(!n||!s)return Fn(e,t);const r={...n};return o=>(r.red=er(n.red,s.red,o),r.green=er(n.green,s.green,o),r.blue=er(n.blue,s.blue,o),r.alpha=Jt(n.alpha,s.alpha,o),dt.transform(r))},tr=new Set(["none","hidden"]);function jw(e,t){return tr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Gw(e,t){return n=>Jt(e,t,n)}function nr(e){return typeof e=="number"?Gw:typeof e=="string"?Ys(e)?Fn:le.test(e)?Xo:Xw:Array.isArray(e)?Zo:typeof e=="object"?le.test(e)?Xo:Kw:Fn}function Zo(e,t){const n=[...e],s=n.length,r=e.map((o,i)=>nr(o)(o,t[i]));return o=>{for(let i=0;i<s;i++)n[i]=r[i](o);return n}}function Kw(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=nr(e[r])(e[r],t[r]));return r=>{for(const o in s)n[o]=s[o](r);return n}}function Yw(e,t){const n=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],i=e.indexes[o][s[o]],u=e.values[i]??0;n[r]=u,s[o]++}return n}const Xw=(e,t)=>{const n=Qe.createTransformer(t),s=Zt(e),r=Zt(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?tr.has(e)&&!r.values.length||tr.has(t)&&!s.values.length?jw(e,t):kn(Zo(Yw(s,r),r.values),n):(jt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Fn(e,t))};function Jo(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Jt(e,t,n):nr(e)(e,t)}const Zw=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>We.update(t,n),stop:()=>Ks(t),now:()=>_n.isProcessing?_n.timestamp:Ee.now()}},Qo=(e,t,n=10)=>{let s="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)s+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ln=2e4;function sr(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Ln;)t+=n,s=e.next(t);return t>=Ln?1/0:t}function Jw(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(sr(s),Ln);return{type:"keyframes",ease:o=>s.next(r*o).value/t,duration:Le(r)}}const Qw=5;function Ro(e,t,n){const s=Math.max(t-Qw,0);return So(n-e(s),t-s)}const se={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},rr=.001;function Rw({duration:e=se.duration,bounce:t=se.bounce,velocity:n=se.velocity,mass:s=se.mass}){let r,o;jt(e<=He(se.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Ze(se.minDamping,se.maxDamping,i),e=Ze(se.minDuration,se.maxDuration,Le(e)),i<1?(r=d=>{const c=d*i,w=c*e,f=c-n,m=ar(d,i),g=Math.exp(-w);return rr-f/m*g},o=d=>{const w=d*i*e,f=w*n+n,m=Math.pow(i,2)*Math.pow(d,2)*e,g=Math.exp(-w),b=ar(Math.pow(d,2),i);return(-r(d)+rr>0?-1:1)*((f-m)*g)/b}):(r=d=>{const c=Math.exp(-d*e),w=(d-n)*e+1;return-rr+c*w},o=d=>{const c=Math.exp(-d*e),w=(n-d)*(e*e);return c*w});const u=5/e,l=tf(r,o,u);if(e=He(e),isNaN(l))return{stiffness:se.stiffness,damping:se.damping,duration:e};{const d=Math.pow(l,2)*s;return{stiffness:d,damping:i*2*Math.sqrt(s*d),duration:e}}}const ef=12;function tf(e,t,n){let s=n;for(let r=1;r<ef;r++)s=s-e(s)/t(s);return s}function ar(e,t){return e*Math.sqrt(1-t*t)}const nf=["duration","bounce"],sf=["stiffness","damping","mass"];function ei(e,t){return t.some(n=>e[n]!==void 0)}function rf(e){let t={velocity:se.velocity,stiffness:se.stiffness,damping:se.damping,mass:se.mass,isResolvedFromDuration:!1,...e};if(!ei(e,sf)&&ei(e,nf))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,o=2*Ze(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:se.mass,stiffness:r,damping:o}}else{const n=Rw(e);t={...t,...n,mass:se.mass},t.isResolvedFromDuration=!0}return t}function Wn(e=se.visualDuration,t=se.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:r}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:l,damping:d,mass:c,duration:w,velocity:f,isResolvedFromDuration:m}=rf({...n,velocity:-Le(n.velocity||0)}),g=f||0,b=d/(2*Math.sqrt(l*c)),x=i-o,S=Le(Math.sqrt(l/c)),v=Math.abs(x)<5;s||(s=v?se.restSpeed.granular:se.restSpeed.default),r||(r=v?se.restDelta.granular:se.restDelta.default);let T;if(b<1){const C=ar(S,b);T=D=>{const M=Math.exp(-b*S*D);return i-M*((g+b*S*x)/C*Math.sin(C*D)+x*Math.cos(C*D))}}else if(b===1)T=C=>i-Math.exp(-S*C)*(x+(g+S*x)*C);else{const C=S*Math.sqrt(b*b-1);T=D=>{const M=Math.exp(-b*S*D),I=Math.min(C*D,300);return i-M*((g+b*S*x)*Math.sinh(I)+C*x*Math.cosh(I))/C}}const N={calculatedDuration:m&&w||null,next:C=>{const D=T(C);if(m)u.done=C>=w;else{let M=C===0?g:0;b<1&&(M=C===0?He(g):Ro(T,C,D));const I=Math.abs(M)<=s,k=Math.abs(i-D)<=r;u.done=I&&k}return u.value=u.done?i:D,u},toString:()=>{const C=Math.min(sr(N),Ln),D=Qo(M=>N.next(C*M).value,C,30);return C+"ms "+D},toTransition:()=>{}};return N}Wn.applyToOptions=e=>{const t=Jw(e,100,Wn);return e.ease=t.ease,e.duration=He(t.duration),e.type="keyframes",e};function or({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:i,min:u,max:l,restDelta:d=.5,restSpeed:c}){const w=e[0],f={done:!1,value:w},m=I=>u!==void 0&&I<u||l!==void 0&&I>l,g=I=>u===void 0?l:l===void 0||Math.abs(u-I)<Math.abs(l-I)?u:l;let b=n*t;const x=w+b,S=i===void 0?x:i(x);S!==x&&(b=S-w);const v=I=>-b*Math.exp(-I/s),T=I=>S+v(I),N=I=>{const k=v(I),F=T(I);f.done=Math.abs(k)<=d,f.value=f.done?S:F};let C,D;const M=I=>{m(f.value)&&(C=I,D=Wn({keyframes:[f.value,g(f.value)],velocity:Ro(T,I,f.value),damping:r,stiffness:o,restDelta:d,restSpeed:c}))};return M(0),{calculatedDuration:null,next:I=>{let k=!1;return!D&&C===void 0&&(k=!0,N(I),M(I)),C!==void 0&&I>=C?D.next(I-C):(!k&&N(I),f)}}}function af(e,t,n){const s=[],r=n||Ke.mix||Jo,o=e.length-1;for(let i=0;i<o;i++){let u=r(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||Tt:t;u=kn(l,u)}s.push(u)}return s}function of(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const o=e.length;if(ct(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=af(t,s,r),l=u.length,d=c=>{if(i&&c<e[0])return t[0];let w=0;if(l>1)for(;w<e.length-2&&!(c<e[w+1]);w++);const f=vo(e[w],e[w+1],c);return u[w](f)};return n?c=>d(Ze(e[0],e[o-1],c)):d}function uf(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=vo(0,t,s);e.push(Jt(n,1,r))}}function lf(e){const t=[0];return uf(t,e.length-1),t}function cf(e,t){return e.map(n=>n*t)}function df(e,t){return e.map(()=>t||_o).splice(0,e.length-1)}function At({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=Nw(s)?s.map(Fo):Fo(s),o={done:!1,value:t[0]},i=cf(n&&n.length===t.length?n:lf(t),e),u=of(i,t,{ease:Array.isArray(r)?r:df(t,r)});return{calculatedDuration:e,next:l=>(o.value=u(l),o.done=l>=e,o)}}const wf=e=>e!==null;function ir(e,{repeat:t,repeatType:n="loop"},s,r=1){const o=e.filter(wf),u=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||s===void 0?o[u]:s}const ff={decay:or,inertia:or,tween:At,keyframes:At,spring:Wn};function ti(e){typeof e.type=="string"&&(e.type=ff[e.type])}class ur{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const pf=e=>e/100;class lr extends ur{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,r;const{motionValue:n}=this.options;n&&n.updatedAt!==Ee.now()&&this.tick(Ee.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(s=this.options).onStop)==null||r.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ti(t);const{type:n=At,repeat:s=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=t;let{keyframes:u}=t;const l=n||At;process.env.NODE_ENV!=="production"&&l!==At&&ct(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),l!==At&&typeof u[0]!="number"&&(this.mixKeyframes=kn(pf,Jo(u[0],u[1])),u=[0,100]);const d=l({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...u].reverse(),velocity:-i})),d.calculatedDuration===null&&(d.calculatedDuration=sr(d));const{calculatedDuration:c}=d;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(s+1)-r,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:r,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:u,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:d=0,keyframes:c,repeat:w,repeatType:f,repeatDelay:m,type:g,onUpdate:b,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const S=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?S<0:S>r;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let T=this.currentTime,N=s;if(w){const I=Math.min(this.currentTime,r)/u;let k=Math.floor(I),F=I%1;!F&&I>=1&&(F=1),F===1&&k--,k=Math.min(k,w+1),!!(k%2)&&(f==="reverse"?(F=1-F,m&&(F-=m/u)):f==="mirror"&&(N=i)),T=Ze(0,1,F)*u}const C=v?{done:!1,value:c[0]}:N.next(T);o&&(C.value=o(C.value));let{done:D}=C;!v&&l!==null&&(D=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return M&&g!==or&&(C.value=ir(c,this.options,x,this.speed)),b&&b(C.value),M&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return Le(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Le(t)}get time(){return Le(this.currentTime)}set time(t){var n;t=He(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ee.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Le(this.currentTime))}play(){var r,o;if(this.isStopped)return;const{driver:t=Zw,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(r=this.options).onPlay)==null||o.call(r);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ee.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function hf(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const wt=e=>e*180/Math.PI,cr=e=>{const t=wt(Math.atan2(e[1],e[0]));return dr(t)},mf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:cr,rotateZ:cr,skewX:e=>wt(Math.atan(e[1])),skewY:e=>wt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},dr=e=>(e=e%360,e<0&&(e+=360),e),ni=cr,si=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ri=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),gf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:si,scaleY:ri,scale:e=>(si(e)+ri(e))/2,rotateX:e=>dr(wt(Math.atan2(e[6],e[5]))),rotateY:e=>dr(wt(Math.atan2(-e[2],e[0]))),rotateZ:ni,rotate:ni,skewX:e=>wt(Math.atan(e[4])),skewY:e=>wt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function wr(e){return e.includes("scale")?1:0}function fr(e,t){if(!e||e==="none")return wr(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=gf,r=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=mf,r=u}if(!r)return wr(t);const o=s[t],i=r[1].split(",").map(yf);return typeof o=="function"?o(i):i[o]}const bf=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return fr(n,t)};function yf(e){return parseFloat(e.trim())}const Dt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kt=new Set(Dt),ai=e=>e===Et||e===O,xf=new Set(["x","y","z"]),vf=Dt.filter(e=>!xf.has(e));function Nf(e){const t=[];return vf.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Re={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>fr(t,"x"),y:(e,{transform:t})=>fr(t,"y")};Re.translateX=Re.x,Re.translateY=Re.y;const ft=new Set;let pr=!1,hr=!1,mr=!1;function oi(){if(hr){const e=Array.from(ft).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=Nf(s);r.length&&(n.set(s,r),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=n.get(s);r&&r.forEach(([o,i])=>{var u;(u=s.getValue(o))==null||u.set(i)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}hr=!1,pr=!1,ft.forEach(e=>e.complete(mr)),ft.clear()}function ii(){ft.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hr=!0)})}function Sf(){mr=!0,ii(),oi(),mr=!1}class gr{constructor(t,n,s,r,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(ft.add(this),pr||(pr=!0,We.read(ii),We.resolveKeyframes(oi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:r}=this;if(t[0]===null){const o=r==null?void 0:r.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const u=s.readValue(n,i);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=i),r&&o===void 0&&r.set(t[0])}hf(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ft.delete(this)}cancel(){this.state==="scheduled"&&(ft.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Cf=e=>e.startsWith("--");function Tf(e,t,n){Cf(t)?e.style.setProperty(t,n):e.style[t]=n}const Ef=Us(()=>window.ScrollTimeline!==void 0),Mf={};function If(e,t){const n=Us(e);return()=>Mf[t]??n()}const ui=If(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Qt=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,li={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qt([0,.65,.55,1]),circOut:Qt([.55,0,1,.45]),backIn:Qt([.31,.01,.66,-.59]),backOut:Qt([.33,1.53,.69,.99])};function ci(e,t){if(e)return typeof e=="function"?ui()?Qo(e,t):"ease-out":Vo(e)?Qt(e):Array.isArray(e)?e.map(n=>ci(n,t)||li.easeOut):li[e]}function Af(e,t,n,{delay:s=0,duration:r=300,repeat:o=0,repeatType:i="loop",ease:u="easeOut",times:l}={},d=void 0){const c={[t]:n};l&&(c.offset=l);const w=ci(u,r);Array.isArray(w)&&(c.easing=w);const f={delay:s,duration:r,easing:Array.isArray(w)?"linear":w,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return d&&(f.pseudoElement=d),e.animate(c,f)}function di(e){return typeof e=="function"&&"applyToOptions"in e}function Df({type:e,...t}){return di(e)&&ui()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class wi extends ur{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:s,keyframes:r,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:u,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,ct(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=Df(t);this.animation=Af(n,s,r,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=ir(r,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(c):Tf(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,r;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((r=(s=this.animation).commitStyles)==null||r.call(s))}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return Le(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Le(t)}get time(){return Le(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=He(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ef()?(this.animation.timeline=t,Tt):n(this)}}const fi={anticipate:ko,backInOut:Do,circInOut:Po};function kf(e){return e in fi}function Pf(e){typeof e.ease=="string"&&kf(e.ease)&&(e.ease=fi[e.ease])}const br=10;class _f extends wi{constructor(t){Pf(t),ti(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:r,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new lr({...i,autoplay:!1}),l=Math.max(br,Ee.now()-this.startTime),d=Ze(0,br,l-br);n.setWithVelocity(u.sample(Math.max(0,l-d)).value,u.sample(l).value,d),u.stop()}}const pi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Qe.test(e)||e==="0")&&!e.startsWith("url("));function Vf(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Of(e,t,n,s){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=pi(r,t),u=pi(o,t);return jt(i===u,`You are trying to animate ${t} from "${r}" to "${o}". "${i?o:r}" is not an animatable value.`,"value-not-animatable"),!i||!u?!1:Vf(e)||(n==="spring"||di(n))&&s}function yr(e){e.duration=0,e.type="keyframes"}const Ff=new Set(["opacity","clipPath","filter","transform"]),Lf=Us(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wf(e){var c;const{motionValue:t,name:n,repeatDelay:s,repeatType:r,damping:o,type:i}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:d}=t.owner.getProps();return Lf()&&n&&Ff.has(n)&&(n!=="transform"||!d)&&!l&&!s&&r!=="mirror"&&o!==0&&i!=="inertia"}const Bf=40;class qf extends ur{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",keyframes:u,name:l,motionValue:d,element:c,...w}){var g;super(),this.stop=()=>{var b,x;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Ee.now();const f={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:o,repeatType:i,name:l,motionValue:d,element:c,...w},m=(c==null?void 0:c.KeyframeResolver)||gr;this.keyframeResolver=new m(u,(b,x,S)=>this.onKeyframesResolved(b,x,f,!S),l,d,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,r){var x,S;this.keyframeResolver=void 0;const{name:o,type:i,velocity:u,delay:l,isHandoff:d,onUpdate:c}=s;this.resolvedAt=Ee.now(),Of(t,o,i,u)||((Ke.instantAnimations||!l)&&(c==null||c(ir(t,s,n))),t[0]=t[t.length-1],yr(s),s.repeat=0);const f={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>Bf?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},m=!d&&Wf(f),g=(S=(x=f.motionValue)==null?void 0:x.owner)==null?void 0:S.current,b=m?new _f({...f,element:g}):new lr(f);b.finished.then(()=>{this.notifyFinished()}).catch(Tt),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Sf()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function hi(e,t,n,s=0,r=1){const o=Array.from(e).sort((d,c)=>d.sortNodePosition(c)).indexOf(t),i=e.size,u=(i-1)*s;return typeof n=="function"?n(o,i):r===1?o*s:u-o*s}const zf=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $f(e){const t=zf.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const Hf=4;function mi(e,t,n=1){ct(n<=Hf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=$f(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const i=o.trim();return yo(i)?parseFloat(i):i}return Ys(r)?mi(r,t,n+1):r}const Uf={type:"spring",stiffness:500,damping:25,restSpeed:10},jf=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Gf={type:"keyframes",duration:.8},Kf={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yf=(e,{keyframes:t})=>t.length>2?Gf:kt.has(e)?e.startsWith("scale")?jf(t[1]):Uf:Kf,Xf=e=>e!==null;function Zf(e,{repeat:t,repeatType:n="loop"},s){const r=e.filter(Xf),o=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[o]}function gi(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function bi(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?gi(n,e):n}function Jf({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:o,repeatType:i,repeatDelay:u,from:l,elapsed:d,...c}){return!!Object.keys(c).length}const Qf=(e,t,n,s={},r,o)=>i=>{const u=bi(s,e)||{},l=u.delay||s.delay||0;let{elapsed:d=0}=s;d=d-He(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-d,onUpdate:f=>{t.set(f),u.onUpdate&&u.onUpdate(f)},onComplete:()=>{i(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:r};Jf(u)||Object.assign(c,Yf(e,c)),c.duration&&(c.duration=He(c.duration)),c.repeatDelay&&(c.repeatDelay=He(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let w=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(yr(c),c.delay===0&&(w=!0)),(Ke.instantAnimations||Ke.skipAnimations||r!=null&&r.shouldSkipAnimations)&&(w=!0,yr(c),c.delay=0),c.allowFlatten=!u.type&&!u.ease,w&&!o&&t.get()!==void 0){const f=Zf(c.keyframes,u);if(f!==void 0){We.update(()=>{c.onUpdate(f),c.onComplete()});return}}return u.isSync?new lr(c):new qf(c)};function yi(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function xr(e,t,n,s){if(typeof t=="function"){const[r,o]=yi(s);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=yi(s);t=t(n!==void 0?n:e.custom,r,o)}return t}function Pt(e,t,n){const s=e.getProps();return xr(s,t,n!==void 0?n:s.custom,e)}const xi=new Set(["width","height","top","left","right","bottom",...Dt]),vi=30,Rf=e=>!isNaN(parseFloat(e));class ep{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const r=Ee.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ee.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Rf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&To(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new No);const s=this.events[t].add(n);return t==="change"?()=>{s(),We.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ee.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vi);return So(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Bn(e,t){return new ep(e,t)}const vr=e=>Array.isArray(e);function tp(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Bn(n))}function np(e){return vr(e)?e[e.length-1]||0:e}function sp(e,t){const n=Pt(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const i in o){const u=np(o[i]);tp(e,i,u)}}const me=e=>!!(e&&e.getVelocity);function rp(e){return!!(me(e)&&e.add)}function ap(e,t){const n=e.getValue("willChange");if(rp(n))return n.add(t);if(!n&&Ke.WillChange){const s=new Ke.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Nr(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ni="data-"+Nr("framerAppearId");function op(e){return e.props[Ni]}function ip({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Si(e,t,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:o,transitionEnd:i,...u}=t;const l=e.getDefaultTransition();o=o?gi(o,l):l;const d=o==null?void 0:o.reduceMotion;s&&(o=s);const c=[],w=r&&e.animationState&&e.animationState.getState()[r];for(const f in u){const m=e.getValue(f,e.latestValues[f]??null),g=u[f];if(g===void 0||w&&ip(w,f))continue;const b={delay:n,...bi(o||{},f)},x=m.get();if(x!==void 0&&!m.isAnimating&&!Array.isArray(g)&&g===x&&!b.velocity)continue;let S=!1;if(window.MotionHandoffAnimation){const N=op(e);if(N){const C=window.MotionHandoffAnimation(N,f,We);C!==null&&(b.startTime=C,S=!0)}}ap(e,f);const v=d??e.shouldReduceMotion;m.start(Qf(f,m,g,v&&xi.has(f)?{type:!1}:b,e,S));const T=m.animation;T&&c.push(T)}if(i){const f=()=>We.update(()=>{i&&sp(e,i)});c.length?Promise.all(c).then(f):f()}return c}function Sr(e,t,n={}){var l;const s=Pt(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const o=s?()=>Promise.all(Si(e,s,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:c=0,staggerChildren:w,staggerDirection:f}=r;return up(e,t,d,c,w,f,n)}:()=>Promise.resolve(),{when:u}=r;if(u){const[d,c]=u==="beforeChildren"?[o,i]:[i,o];return d().then(()=>c())}else return Promise.all([o(),i(n.delay)])}function up(e,t,n=0,s=0,r=0,o=1,i){const u=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),u.push(Sr(l,t,{...i,delay:n+(typeof s=="function"?0:s)+hi(e.variantChildren,l,s,r,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(u)}function lp(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(o=>Sr(e,o,n));s=Promise.all(r)}else if(typeof t=="string")s=Sr(e,t,n);else{const r=typeof t=="function"?Pt(e,t,n.custom):t;s=Promise.all(Si(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const cp={test:e=>e==="auto",parse:e=>e},Ci=e=>t=>t.test(e),Ti=[Et,O,Mt,Je,Vw,_w,cp],Ei=e=>Ti.find(Ci(e));function dp(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xo(e):!0}const wp=new Set(["brightness","contrast","saturate","opacity"]);function fp(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(Xs)||[];if(!s)return e;const r=n.replace(s,"");let o=wp.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const pp=/\b([a-z-]*)\(.*?\)/gu,Cr={...Qe,getAnimatableNone:e=>{const t=e.match(pp);return t?t.map(fp).join(" "):e}},Mi={...Et,transform:Math.round},Tr={borderWidth:O,borderTopWidth:O,borderRightWidth:O,borderBottomWidth:O,borderLeftWidth:O,borderRadius:O,borderTopLeftRadius:O,borderTopRightRadius:O,borderBottomRightRadius:O,borderBottomLeftRadius:O,width:O,maxWidth:O,height:O,maxHeight:O,top:O,right:O,bottom:O,left:O,inset:O,insetBlock:O,insetBlockStart:O,insetBlockEnd:O,insetInline:O,insetInlineStart:O,insetInlineEnd:O,padding:O,paddingTop:O,paddingRight:O,paddingBottom:O,paddingLeft:O,paddingBlock:O,paddingBlockStart:O,paddingBlockEnd:O,paddingInline:O,paddingInlineStart:O,paddingInlineEnd:O,margin:O,marginTop:O,marginRight:O,marginBottom:O,marginLeft:O,marginBlock:O,marginBlockStart:O,marginBlockEnd:O,marginInline:O,marginInlineStart:O,marginInlineEnd:O,fontSize:O,backgroundPositionX:O,backgroundPositionY:O,...{rotate:Je,rotateX:Je,rotateY:Je,rotateZ:Je,scale:On,scaleX:On,scaleY:On,scaleZ:On,skew:Je,skewX:Je,skewY:Je,distance:O,translateX:O,translateY:O,translateZ:O,x:O,y:O,z:O,perspective:O,transformPerspective:O,opacity:Kt,originX:$o,originY:$o,originZ:O},zIndex:Mi,fillOpacity:Kt,strokeOpacity:Kt,numOctaves:Mi},hp={...Tr,color:le,backgroundColor:le,outlineColor:le,fill:le,stroke:le,borderColor:le,borderTopColor:le,borderRightColor:le,borderBottomColor:le,borderLeftColor:le,filter:Cr,WebkitFilter:Cr},Ii=e=>hp[e];function Ai(e,t){let n=Ii(e);return n!==Cr&&(n=Qe),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const mp=new Set(["auto","none","0"]);function gp(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!mp.has(o)&&Zt(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=Ai(n,r)}class bp extends gr{constructor(t,n,s,r,o){super(t,n,s,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let w=t[c];if(typeof w=="string"&&(w=w.trim(),Ys(w))){const f=mi(w,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=w)}}if(this.resolveNoneKeyframes(),!xi.has(s)||t.length!==2)return;const[r,o]=t,i=Ei(r),u=Ei(o),l=qo(r),d=qo(o);if(l!==d&&Re[s]){this.needsMeasurement=!0;return}if(i!==u)if(ai(i)&&ai(u))for(let c=0;c<t.length;c++){const w=t[c];typeof w=="string"&&(t[c]=parseFloat(w))}else Re[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||dp(t[r]))&&s.push(r);s.length&&gp(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Re[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=s.length-1,i=s[o];s[o]=Re[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([l,d])=>{t.getValue(l).set(d)}),this.resolveNoneKeyframes()}}const yp=new Set(["opacity","clipPath","filter","transform"]);function xp(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const r=(n==null?void 0:n[e])??s.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(s=>s!=null)}const Di=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Er(e){return pw(e)&&"offsetHeight"in e}const{schedule:vp}=Lo(queueMicrotask,!1),Np={y:!1};function Sp(){return Np.y}function ki(e,t){const n=xp(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function Cp(e){return!(e.pointerType==="touch"||Sp())}function Tp(e,t,n={}){const[s,r,o]=ki(e,n);return s.forEach(i=>{let u=!1,l=!1,d;const c=()=>{i.removeEventListener("pointerleave",g)},w=x=>{d&&(d(x),d=void 0),c()},f=x=>{u=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,w(x))},m=()=>{u=!0,window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",f,r)},g=x=>{if(x.pointerType!=="touch"){if(u){l=!0;return}w(x)}},b=x=>{if(!Cp(x))return;l=!1;const S=t(i,x);typeof S=="function"&&(d=S,i.addEventListener("pointerleave",g,r))};i.addEventListener("pointerenter",b,r),i.addEventListener("pointerdown",m,r)}),o}const Pi=(e,t)=>t?e===t?!0:Pi(e,t.parentElement):!1,Ep=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Mp=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ip(e){return Mp.has(e.tagName)||e.isContentEditable===!0}const qn=new WeakSet;function _i(e){return t=>{t.key==="Enter"&&e(t)}}function Mr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ap=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=_i(()=>{if(qn.has(n))return;Mr(n,"down");const r=_i(()=>{Mr(n,"up")}),o=()=>Mr(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Vi(e){return Ep(e)&&!0}const Oi=new WeakSet;function Dp(e,t,n={}){const[s,r,o]=ki(e,n),i=u=>{const l=u.currentTarget;if(!Vi(u)||Oi.has(u))return;qn.add(l),n.stopPropagation&&Oi.add(u);const d=t(l,u),c=(m,g)=>{window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",f),qn.has(l)&&qn.delete(l),Vi(m)&&typeof d=="function"&&d(m,{success:g})},w=m=>{c(m,l===window||l===document||n.useGlobalTarget||Pi(l,m.target))},f=m=>{c(m,!1)};window.addEventListener("pointerup",w,r),window.addEventListener("pointercancel",f,r)};return s.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",i,r),Er(u)&&(u.addEventListener("focus",d=>Ap(d,r)),!Ip(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}const kp=[...Ti,le,Qe],Pp=e=>kp.find(Ci(e)),Fi=()=>({min:0,max:0}),Li=()=>({x:Fi(),y:Fi()}),_p=new WeakMap;function zn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Rt(e){return typeof e=="string"||Array.isArray(e)}const Ir=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ar=["initial",...Ir];function $n(e){return zn(e.animate)||Ar.some(t=>Rt(e[t]))}function Wi(e){return!!($n(e)||e.variants)}function Vp(e,t,n){for(const s in t){const r=t[s],o=n[s];if(me(r))e.addValue(s,r);else if(me(o))e.addValue(s,Bn(r,{owner:e}));else if(o!==r)if(e.hasValue(s)){const i=e.getValue(s);i.liveStyle===!0?i.jump(r):i.hasAnimated||i.set(r)}else{const i=e.getStaticValue(s);e.addValue(s,Bn(i!==void 0?i:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Dr={current:null},Bi={current:!1},Op=typeof window<"u";function Fp(){if(Bi.current=!0,!!Op)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Dr.current=e.matches;e.addEventListener("change",t),t()}else Dr.current=!1}const qi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Hn={};function zi(e){Hn=e}function Lp(){return Hn}class Wp{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:i,visualState:u},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=gr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Ee.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,We.render(this.render,!1,!0))};const{latestValues:d,renderState:c}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=$n(n),this.isVariantNode=Wi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:w,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];d[m]!==void 0&&me(g)&&g.set(d[m])}}mount(t){var n,s;if(this.hasBeenMounted)for(const r in this.initialValues)(n=this.values.get(r))==null||n.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=t,_p.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Bi.current||Fp(),this.shouldReduceMotion=Dr.current),process.env.NODE_ENV!=="production"&&To(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ks(this.notifyUpdate),Ks(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&yp.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:u,times:l,ease:d,duration:c}=n.accelerate,w=new wi({element:this.current,name:t,keyframes:u,times:l,ease:d,duration:He(c)}),f=i(w);this.valueSubscriptions.set(t,()=>{f(),w.cancel()});return}const s=kt.has(t);s&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&We.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Hn){const n=Hn[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Li()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<qi.length;s++){const r=qi[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,i=t[o];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=Vp(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Bn(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(yo(s)||xo(s))?s=parseFloat(s):!Pp(s)&&Qe.test(n)&&(s=Ai(t,n)),this.setBaseTarget(t,me(s)?s.get():s)),me(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const i=xr(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(s=i[t])}if(n&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!me(r)?r:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new No),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){vp.render(this.render)}}class $i extends Wp{constructor(){super(...arguments),this.KeyframeResolver=bp}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;me(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class _t{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Bp({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function qp(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function zp(e,t){return Bp(qp(e.getBoundingClientRect(),t))}const $p={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Hp=Dt.length;function Up(e,t,n){let s="",r=!0;for(let o=0;o<Hp;o++){const i=Dt[o],u=e[i];if(u===void 0)continue;let l=!0;if(typeof u=="number")l=u===(i.startsWith("scale")?1:0);else{const d=parseFloat(u);l=i.startsWith("scale")?d===1:d===0}if(!l||n){const d=Di(u,Tr[i]);if(!l){r=!1;const c=$p[i]||i;s+=`${c}(${d}) `}n&&(t[i]=d)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function kr(e,t,n){const{style:s,vars:r,transformOrigin:o}=e;let i=!1,u=!1;for(const l in t){const d=t[l];if(kt.has(l)){i=!0;continue}else if(Bo(l)){r[l]=d;continue}else{const c=Di(d,Tr[l]);l.startsWith("origin")?(u=!0,o[l]=c):s[l]=c}}if(t.transform||(i||n?s.transform=Up(t,e.transform,n):s.transform&&(s.transform="none")),u){const{originX:l="50%",originY:d="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${d} ${c}`}}function Hi(e,{style:t,vars:n},s,r){const o=e.style;let i;for(i in t)o[i]=t[i];r==null||r.applyProjectionStyles(o,s);for(i in n)o.setProperty(i,n[i])}function Ui(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const en={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(O.test(e))e=parseFloat(e);else return e;const n=Ui(e,t.target.x),s=Ui(e,t.target.y);return`${n}% ${s}%`}},jp={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=Qe.parse(e);if(r.length>5)return s;const o=Qe.createTransformer(e),i=typeof r[0]!="number"?1:0,u=n.x.scale*t.x,l=n.y.scale*t.y;r[0+i]/=u,r[1+i]/=l;const d=Jt(u,l,.5);return typeof r[2+i]=="number"&&(r[2+i]/=d),typeof r[3+i]=="number"&&(r[3+i]/=d),o(r)}},Gp={borderRadius:{...en,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:en,borderTopRightRadius:en,borderBottomLeftRadius:en,borderBottomRightRadius:en,boxShadow:jp};function ji(e,{layout:t,layoutId:n}){return kt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Gp[e]||e==="opacity")}function Pr(e,t,n){var i;const s=e.style,r=t==null?void 0:t.style,o={};if(!s)return o;for(const u in s)(me(s[u])||r&&me(r[u])||ji(u,e)||((i=n==null?void 0:n.getValue(u))==null?void 0:i.liveStyle)!==void 0)&&(o[u]=s[u]);return o}function Kp(e){return window.getComputedStyle(e)}class Yp extends $i{constructor(){super(...arguments),this.type="html",this.renderInstance=Hi}readValueFromInstance(t,n){var s;if(kt.has(n))return(s=this.projection)!=null&&s.isProjecting?wr(n):bf(t,n);{const r=Kp(t),o=(Bo(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return zp(t,n)}build(t,n,s){kr(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Pr(t,n,s)}}const Xp={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zp={offset:"strokeDashoffset",array:"strokeDasharray"};function Jp(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?Xp:Zp;e[o.offset]=`${-s}`,e[o.array]=`${t} ${n}`}const Qp=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Gi(e,{attrX:t,attrY:n,attrScale:s,pathLength:r,pathSpacing:o=1,pathOffset:i=0,...u},l,d,c){if(kr(e,u,d),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:w,style:f}=e;w.transform&&(f.transform=w.transform,delete w.transform),(f.transform||w.transformOrigin)&&(f.transformOrigin=w.transformOrigin??"50% 50%",delete w.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete w.transformBox);for(const m of Qp)w[m]!==void 0&&(f[m]=w[m],delete w[m]);t!==void 0&&(w.x=t),n!==void 0&&(w.y=n),s!==void 0&&(w.scale=s),r!==void 0&&Jp(w,r,o,i,!1)}const Ki=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Yi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Rp(e,t,n,s){Hi(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(Ki.has(r)?r:Nr(r),t.attrs[r])}function Xi(e,t,n){const s=Pr(e,t,n);for(const r in e)if(me(e[r])||me(t[r])){const o=Dt.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[o]=e[r]}return s}class eh extends $i{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Li}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(kt.has(n)){const s=Ii(n);return s&&s.default||0}return n=Ki.has(n)?n:Nr(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Xi(t,n,s)}build(t,n,s){Gi(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){Rp(t,n,s,r)}mount(t){this.isSVGTag=Yi(t.tagName),super.mount(t)}}const th=Ar.length;function Zi(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Zi(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<th;n++){const s=Ar[n],r=e.props[s];(Rt(r)||r===!1)&&(t[s]=r)}return t}function Ji(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const nh=[...Ir].reverse(),sh=Ir.length;function rh(e){return t=>Promise.all(t.map(({animation:n,options:s})=>lp(e,n,s)))}function ah(e){let t=rh(e),n=Qi(),s=!0;const r=l=>(d,c)=>{var f;const w=Pt(e,c,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(w){const{transition:m,transitionEnd:g,...b}=w;d={...d,...b,...g}}return d};function o(l){t=l(e)}function i(l){const{props:d}=e,c=Zi(e.parent)||{},w=[],f=new Set;let m={},g=1/0;for(let x=0;x<sh;x++){const S=nh[x],v=n[S],T=d[S]!==void 0?d[S]:c[S],N=Rt(T),C=S===l?v.isActive:null;C===!1&&(g=x);let D=T===c[S]&&T!==d[S]&&N;if(D&&s&&e.manuallyAnimateOnMount&&(D=!1),v.protectedKeys={...m},!v.isActive&&C===null||!T&&!v.prevProp||zn(T)||typeof T=="boolean")continue;if(S==="exit"&&v.isActive&&C!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const M=oh(v.prevProp,T);let I=M||S===l&&v.isActive&&!D&&N||x>g&&N,k=!1;const F=Array.isArray(T)?T:[T];let P=F.reduce(r(S),{});C===!1&&(P={});const{prevResolvedValues:A={}}=v,V={...A,...P},W=B=>{I=!0,f.has(B)&&(k=!0,f.delete(B)),v.needsAnimating[B]=!0;const U=e.getValue(B);U&&(U.liveStyle=!1)};for(const B in V){const U=P[B],$=A[B];if(m.hasOwnProperty(B))continue;let H=!1;vr(U)&&vr($)?H=!Ji(U,$):H=U!==$,H?U!=null?W(B):f.add(B):U!==void 0&&f.has(B)?W(B):v.protectedKeys[B]=!0}v.prevProp=T,v.prevResolvedValues=P,v.isActive&&(m={...m,...P}),s&&e.blockInitialAnimation&&(I=!1);const _=D&&M;I&&(!_||k)&&w.push(...F.map(B=>{const U={type:S};if(typeof B=="string"&&s&&!_&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,H=Pt($,B);if($.enteringChildren&&H){const{delayChildren:pe}=H.transition||{};U.delay=hi($.enteringChildren,e,pe)}}return{animation:B,options:U}}))}if(f.size){const x={};if(typeof d.initial!="boolean"){const S=Pt(e,Array.isArray(d.initial)?d.initial[0]:d.initial);S&&S.transition&&(x.transition=S.transition)}f.forEach(S=>{const v=e.getBaseTarget(S),T=e.getValue(S);T&&(T.liveStyle=!0),x[S]=v??null}),w.push({animation:x})}let b=!!w.length;return s&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),s=!1,b?t(w):Promise.resolve()}function u(l,d){var w;if(n[l].isActive===d)return Promise.resolve();(w=e.variantChildren)==null||w.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(l,d)}),n[l].isActive=d;const c=i(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:i,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Qi()}}}function oh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ji(t,e):!1}function pt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qi(){return{animate:pt(!0),whileInView:pt(),whileHover:pt(),whileTap:pt(),whileDrag:pt(),whileFocus:pt(),exit:pt()}}function Ri(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function ih(e){return me(e)?e.get():e}const _r=h.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function eu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uh(...e){return t=>{let n=!1;const s=e.map(r=>{const o=eu(r,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let r=0;r<s.length;r++){const o=s[r];typeof o=="function"?o():eu(e[r],null)}}}}function lh(...e){return y.useCallback(uh(...e),e)}class ch extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,r=Er(s)&&s.offsetWidth||0,o=Er(s)&&s.offsetHeight||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=r-i.width-i.left,i.bottom=o-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function dh({children:e,isPresent:t,anchorX:n,anchorY:s,root:r,pop:o}){var f;const i=h.useId(),u=h.useRef(null),l=h.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=h.useContext(_r),c=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),w=lh(u,c);return h.useInsertionEffect(()=>{const{width:m,height:g,top:b,left:x,right:S,bottom:v}=l.current;if(t||o===!1||!u.current||!m||!g)return;const T=n==="left"?`left: ${x}`:`right: ${S}`,N=s==="bottom"?`bottom: ${v}`:`top: ${b}`;u.current.dataset.motionPopId=i;const C=document.createElement("style");d&&(C.nonce=d);const D=r??document.head;return D.appendChild(C),C.sheet&&C.sheet.insertRule(`
5
5
  [data-motion-pop-id="${i}"] {
6
6
  position: absolute !important;
7
7
  width: ${m}px !important;
8
8
  height: ${g}px !important;
9
- ${S}px !important;
10
- ${x}px !important;
9
+ ${T}px !important;
10
+ ${N}px !important;
11
11
  }
12
- `),()=>{A.contains(T)&&A.removeChild(T)}},[t]),a.jsx(ch,{isPresent:t,childRef:u,sizeRef:l,pop:o,children:o===!1?e:y.cloneElement(e,{ref:w})})}const wh=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:u,anchorY:l,root:d})=>{const c=$s(fh),w=h.useId();let f=!0,m=h.useMemo(()=>(f=!1,{id:w,initial:t,isPresent:n,custom:r,onExitComplete:g=>{c.set(g,!0);for(const b of c.values())if(!b)return;s&&s()},register:g=>(c.set(g,!1),()=>c.delete(g))}),[n,c,s]);return o&&f&&(m={...m}),h.useMemo(()=>{c.forEach((g,b)=>c.set(b,!1))},[n]),y.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),e=a.jsx(dh,{pop:i==="popLayout",isPresent:n,anchorX:u,anchorY:l,root:d,children:e}),a.jsx(An.Provider,{value:m,children:e})};function fh(){return new Map}function ph(e=!0){const t=h.useContext(An);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=h.useId();h.useEffect(()=>{if(e)return r(o)},[e]);const i=h.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,i]:[!0]}const Un=e=>e.key||"";function tu(e){const t=[];return h.Children.forEach(e,n=>{h.isValidElement(n)&&t.push(n)}),t}const nu=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:o="sync",propagate:i=!1,anchorX:u="left",anchorY:l="top",root:d})=>{const[c,w]=ph(i),f=h.useMemo(()=>tu(e),[e]),m=i&&!c?[]:f.map(Un),g=h.useRef(!0),b=h.useRef(f),v=$s(()=>new Map),C=h.useRef(new Set),[N,S]=h.useState(f),[x,T]=h.useState(f);bo(()=>{g.current=!1,b.current=f;for(let I=0;I<x.length;I++){const k=Un(x[I]);m.includes(k)?(v.delete(k),C.current.delete(k)):v.get(k)!==!0&&v.set(k,!1)}},[x,m.length,m.join("-")]);const A=[];if(f!==N){let I=[...f];for(let k=0;k<x.length;k++){const F=x[k],P=Un(F);m.includes(P)||(I.splice(k,0,F),A.push(F))}return o==="wait"&&A.length&&(I=A),T(tu(I)),S(f),null}process.env.NODE_ENV!=="production"&&o==="wait"&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:D}=h.useContext(mo);return a.jsx(a.Fragment,{children:x.map(I=>{const k=Un(I),F=i&&!c?!1:f===x||m.includes(k),P=()=>{if(C.current.has(k))return;if(C.current.add(k),v.has(k))v.set(k,!0);else return;let M=!0;v.forEach(V=>{V||(M=!1)}),M&&(D==null||D(),T(b.current),i&&(w==null||w()),s&&s())};return a.jsx(wh,{isPresent:F,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:d,onExitComplete:F?void 0:P,anchorX:u,anchorY:l,children:I},k)})})},Vr=h.createContext({strict:!1}),su={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let ru=!1;function hh(){if(ru)return;const e={};for(const t in su)e[t]={isEnabled:n=>su[t].some(s=>!!n[s])};zi(e),ru=!0}function au(){return hh(),Lp()}function ou(e){const t=au();for(const n in e)t[n]={...t[n],...e[n]};zi(t)}function iu({children:e,features:t,strict:n=!1}){const[,s]=h.useState(!Or(t)),r=h.useRef(void 0);if(!Or(t)){const{renderer:o,...i}=t;r.current=o,ou(i)}return h.useEffect(()=>{Or(t)&&t().then(({renderer:o,...i})=>{ou(i),r.current=o,s(!0)})},[]),a.jsx(Vr.Provider,{value:{renderer:r.current,strict:n},children:e})}function Or(e){return typeof e=="function"}const mh=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function jn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||mh.has(e)}let uu=e=>!jn(e);function gh(e){typeof e=="function"&&(uu=t=>t.startsWith("on")?!jn(t):e(t))}try{gh(require("@emotion/is-prop-valid").default)}catch{}function bh(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||(uu(r)||n===!0&&jn(r)||!t&&!jn(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const Gn=h.createContext({});function yh(e,t){if($n(e)){const{initial:n,animate:s}=e;return{initial:n===!1||Rt(n)?n:void 0,animate:Rt(s)?s:void 0}}return e.inherit!==!1?t:{}}function xh(e){const{initial:t,animate:n}=yh(e,h.useContext(Gn));return h.useMemo(()=>({initial:t,animate:n}),[lu(t),lu(n)])}function lu(e){return Array.isArray(e)?e.join(" "):e}const Fr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cu(e,t,n){for(const s in t)!me(t[s])&&!ji(s,n)&&(e[s]=t[s])}function vh({transformTemplate:e},t){return h.useMemo(()=>{const n=Fr();return kr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Nh(e,t){const n=e.style||{},s={};return cu(s,n,e),Object.assign(s,vh(e,t)),s}function Sh(e,t){const n={},s=Nh(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const du=()=>({...Fr(),attrs:{}});function Ch(e,t,n,s){const r=h.useMemo(()=>{const o=du();return Gi(o,t,Yi(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};cu(o,e.style,e),r.style={...o,...r.style}}return r}const Th=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Lr(e){return typeof e!="string"||e.includes("-")?!1:!!(Th.indexOf(e)>-1||/[A-Z]/u.test(e))}function Eh(e,t,n,{latestValues:s},r,o=!1,i){const l=(i??Lr(e)?Ch:Sh)(t,s,r,e),d=bh(t,typeof e=="string",o),c=e!==h.Fragment?{...d,...l,ref:n}:{},{children:w}=t,f=h.useMemo(()=>me(w)?w.get():w,[w]);return h.createElement(e,{...c,children:f})}function Mh({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Ih(n,s,r,e),renderState:t()}}function Ih(e,t,n,s){const r={},o=s(e,{});for(const f in o)r[f]=ih(o[f]);let{initial:i,animate:u}=e;const l=$n(e),d=Wi(e);t&&d&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),u===void 0&&(u=t.animate));let c=n?n.initial===!1:!1;c=c||i===!1;const w=c?u:i;if(w&&typeof w!="boolean"&&!zn(w)){const f=Array.isArray(w)?w:[w];for(let m=0;m<f.length;m++){const g=xr(e,f[m]);if(g){const{transitionEnd:b,transition:v,...C}=g;for(const N in C){let S=C[N];if(Array.isArray(S)){const x=c?S.length-1:0;S=S[x]}S!==null&&(r[N]=S)}for(const N in b)r[N]=b[N]}}}return r}const wu=e=>(t,n)=>{const s=h.useContext(Gn),r=h.useContext(An),o=()=>Mh(e,t,s,r);return n?o():$s(o)},Dh=wu({scrapeMotionValuesFromProps:Pr,createRenderState:Fr}),Ah=wu({scrapeMotionValuesFromProps:Xi,createRenderState:du}),kh=Symbol.for("motionComponentSymbol");function Ph(e,t,n){const s=h.useRef(n);h.useInsertionEffect(()=>{s.current=n});const r=h.useRef(null);return h.useCallback(o=>{var u;o&&((u=e.onMount)==null||u.call(e,o)),t&&(o?t.mount(o):t.unmount());const i=s.current;if(typeof i=="function")if(o){const l=i(o);typeof l=="function"&&(r.current=l)}else r.current?(r.current(),r.current=null):i(o);else i&&(i.current=o)},[t])}const _h=h.createContext({});function Vh(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Oh(e,t,n,s,r,o){var S,x;const{visualElement:i}=h.useContext(Gn),u=h.useContext(Vr),l=h.useContext(An),d=h.useContext(_r),c=d.reducedMotion,w=d.skipAnimations,f=h.useRef(null),m=h.useRef(!1);s=s||u.renderer,!f.current&&s&&(f.current=s(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:w,isSVG:o}),m.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const g=f.current,b=h.useContext(_h);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&Fh(f.current,n,r,b);const v=h.useRef(!1);h.useInsertionEffect(()=>{g&&v.current&&g.update(n,l)});const C=n[Ni],N=h.useRef(!!C&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,C))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,C)));return bo(()=>{m.current=!0,g&&(v.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),N.current&&g.animationState&&g.animationState.animateChanges())}),h.useEffect(()=>{g&&(!N.current&&g.animationState&&g.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{var T;(T=window.MotionHandoffMarkAsComplete)==null||T.call(window,C)}),N.current=!1),g.enteringChildren=void 0)}),g}function Fh(e,t,n,s){const{layoutId:r,layout:o,drag:i,dragConstraints:u,layoutScroll:l,layoutRoot:d,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:fu(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!i||u&&Vh(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:d})}function fu(e){if(e)return e.options.allowProjection!==!1?e.projection:fu(e.parent)}function Lh(e,{forwardMotionProps:t=!1,type:n}={},s,r){const o=n?n==="svg":Lr(e),i=o?Ah:Dh;function u(d,c){let w;const f={...h.useContext(_r),...d,layoutId:Wh(d)},{isStatic:m}=f,g=xh(d),b=i(d,m);if(!m&&go){Bh(f,s);const v=qh(f);w=v.MeasureLayout,g.visualElement=Oh(e,b,f,r,v.ProjectionNode,o)}return a.jsxs(Gn.Provider,{value:g,children:[w&&g.visualElement?a.jsx(w,{visualElement:g.visualElement,...f}):null,Eh(e,d,Ph(b,g.visualElement,c),b,m,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=h.forwardRef(u);return l[kh]=e,l}function Wh({layoutId:e}){const t=h.useContext(mo).id;return t&&e!==void 0?t+"-"+e:e}function Bh(e,t){h.useContext(Vr).strict,process.env.NODE_ENV}function qh(e){const t=au(),{drag:n,layout:s}=t;if(!n&&!s)return{};const r={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(e)||s!=null&&s.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const zh=(e,t)=>t.isSVG??Lr(e)?new eh(t):new Yp(t,{allowProjection:e!==h.Fragment});class $h extends _t{constructor(t){super(t),t.animationState||(t.animationState=ah(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();zn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Hh=0;class Uh extends _t{constructor(){super(...arguments),this.id=Hh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const jh={animation:{Feature:$h},exit:{Feature:Uh}};function pu(e){return{point:{x:e.pageX,y:e.pageY}}}function hu(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=s[r];o&&We.postRender(()=>o(t,pu(t)))}class Gh extends _t{mount(){const{current:t}=this.node;t&&(this.unmount=Tp(t,(n,s)=>(hu(this.node,s,"Start"),r=>hu(this.node,r,"End"))))}unmount(){}}class Kh extends _t{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=kn(Ri(this.node.current,"focus",()=>this.onFocus()),Ri(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function mu(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=s[r];o&&We.postRender(()=>o(t,pu(t)))}class Yh extends _t{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Ap(t,(r,o)=>(mu(this.node,o,"Start"),(i,{success:u})=>mu(this.node,i,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const Wr=new WeakMap,Br=new WeakMap,Xh=e=>{const t=Wr.get(e.target);t&&t(e)},Zh=e=>{e.forEach(Xh)};function Jh({root:e,...t}){const n=e||document;Br.has(n)||Br.set(n,{});const s=Br.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(Zh,{root:e,...t})),s[r]}function Qh(e,t,n){const s=Jh(t);return Wr.set(e,n),s.observe(e),()=>{Wr.delete(e),s.unobserve(e)}}const Rh={some:0,all:1};class em extends _t{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:Rh[r]},u=l=>{const{isIntersecting:d}=l;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:c,onViewportLeave:w}=this.node.getProps(),f=d?c:w;f&&f(l)};return Qh(this.node.current,i,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(tm(t,n))&&this.startObserver()}unmount(){}}function tm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const gu={renderer:zh,...jh,...{inView:{Feature:em},tap:{Feature:Yh},focus:{Feature:Kh},hover:{Feature:Gh}}};function nm(e,t){return Lh(e,t)}const bu=nm("div"),sm=e=>{const{checked:t,onSelect:n,children:s,disabled:r,preventCloseOnSelect:o}=e;return a.jsx(uo,{disabled:r,checked:t,onCheckedChange:n,onSelect:i=>o&&i.preventDefault(),children:s})},Kn=e=>{const{children:t,className:n,Icon:s,iconPosition:r="left",disabled:o,onSelect:i,preventCloseOnSelect:u}=e,l=p("wu-flex wu-items-center wu-gap-2",s&&(r==="left"?"":"wu-justify-between wu-flex-row-reverse"),n),d=c=>{i&&i(c),u&&c.preventDefault()};return a.jsxs(In,{onSelect:d,disabled:o,className:l,children:[s&&a.jsx("div",{className:"wu-text-base",children:s}),t]})},rm=e=>{const{children:t,Label:n,...s}=e;return a.jsxs(ao,{...s,children:[a.jsx(Ut,{children:n||e.label}),t]})},am=e=>{const{options:t,value:n,onSelect:s}=e;return a.jsx(Qd,{value:n,onValueChange:s,children:t.map(r=>a.jsx(lo,{value:r.value,disabled:r.disabled,children:r.Label||r.label},r.value))})},om=e=>{const{className:t,...n}=e,s=p("wu-w-11/12 wu-mx-auto wu-border-gray-40",t);return a.jsx(Dn,{...n,className:s})},Vt=y.forwardRef(({className:e,children:t,thumbColor:n,railColor:s,...r},o)=>a.jsxs(ot.Root,{ref:o,className:p("wu-relative wu-overflow-hidden",e),children:[a.jsx(ot.Viewport,{className:"wu-h-full wu-w-full wu-rounded-[inherit]",...r,children:t}),a.jsx(qr,{thumbColor:n,railColor:s}),a.jsx(ot.Corner,{})]}));Vt.displayName=ot.Root.displayName;const qr=y.forwardRef(({className:e,orientation:t="vertical",thumbColor:n="#d4d4d4",railColor:s="#eeeeee",...r},o)=>a.jsx(ot.ScrollAreaScrollbar,{ref:o,orientation:t,className:p("wu-flex wu-touch-none wu-select-none wu-transition-colors",t==="vertical"&&"wu-h-full wu-w-2 wu-border-l wu-border-l-transparent wu-p-[1px]",t==="horizontal"&&"wu-h-2 wu-flex-col wu-border-t wu-border-t-transparent wu-p-[1px]",e),style:{background:s},...r,children:a.jsx(ot.ScrollAreaThumb,{className:"wu-relative wu-flex-1 wu-rounded-full",style:{background:n}})}));qr.displayName=ot.ScrollAreaScrollbar.displayName;const im=e=>{const{children:t,label:n,Label:s,open:r,onOpenChange:o,height:i,dir:u,...l}=e;return a.jsxs(Jd,{...l,open:r,onOpenChange:o,children:[a.jsx(oo,{dir:u,children:s||n}),a.jsx(Zd,{children:a.jsx(io,{onInteractOutside:d=>d.preventDefault(),children:a.jsx(Vt,{className:"wu-h-fit",style:{height:i},dir:u,children:t})})})]})},um="wu-p-1.5 wu-cursor-pointer hover:wu-bg-gray-20 wu-border-gray-40 wu-transition wu-duration-300 focus:wu-outline-2 focus:wu-outline-offset focus:wu-outline-blue-p/80 focus:wu-bg-gray-20 hover:wu-bg-gray-20 wu-rounded-t-sm",zr=e=>{const{children:t,menuTitle:n,MenuTitle:s,variant:r="flat",name:o,open:i,onOpenChange:u,height:l,preventCloseOnClickOutside:d,dir:c,Trigger:w,align:f="start",sideOffset:m=0,side:g="bottom",alignOffset:b,className:v,disabled:C,...N}=e;return a.jsxs(so,{...N,open:i,onOpenChange:u,dir:c,children:[a.jsx(ro,{asChild:!0,dir:c,disabled:C,className:p("disabled:wu-text-zinc-300 disabled:wu-bg-white disabled:wu-cursor-not-allowed disabled:hover:wu-bg-transparent"),children:w??lm(r,o,C)}),a.jsx(qs,{className:p("wu-w-56 wu-border wu-border-blue-p disabled:wu-border-gray-40",v,"wu-menu-content"),align:f,sideOffset:m,side:g,alignOffset:b,onInteractOutside:S=>d&&S.preventDefault(),children:a.jsxs(Vt,{className:"h-fit",style:{height:l},dir:c,children:[(n||s)&&a.jsxs(a.Fragment,{children:[a.jsx(Ut,{dir:c,className:"wu-menu-title",children:s||n}),a.jsx(Dn,{className:"wu-mt-0 wu-menu-separator",dir:c})]}),t??a.jsx("p",{children:"Menu Is Empty"})]})})]})},lm=(e,t,n)=>{const s=p(um,"wu-flex wu-items-center wu-justify-between wu-gap-2 wu-h-8 wu-text-xs wu-group/wuMenu",e==="outlined"?"wu-border":"wu-border-b","wu-trigger-btn");return a.jsxs("button",{className:s,"aria-label":"menu-trigger",children:[a.jsx("span",{children:t??"Menu"}),a.jsx("span",{className:p("wm-arrow-drop-down wu-text-gray-lead wu-text-base wu-rotate-180 group-data-[state=closed]/wuMenu:wu-rotate-0 wu-transition-transform wu-duration-300 group-hover:wu-text-blue-q",n&&"wu-text-zinc-300 group-hover:wu-text-zinc-300")})]})},cm=({titles:e,dir:t="ltr",handleTitleClick:n})=>{const[s,r]=h.useState(!1);return a.jsx(zr,{open:s,onOpenChange:r,align:t==="rtl"?"end":"start",Trigger:a.jsx(Ce,{variant:"iconOnly",className:"wu-w-6 wu-h-6 wu-shrink-0 wu-p-0",Icon:a.jsx("span",{className:p("wm-arrow-drop-down wu-w-5 wu-h-5 wu-transition-transform wu-duration-300",s&&"wu-rotate-180")})}),children:e.map(o=>a.jsx(Kn,{onSelect:i=>n(i,o.id),children:o.title},o.id))})},dm=({titles:e,currentLevel:t,initial:n,handleTitleClick:s,headerClasses:r,offsetHeight:o,dir:i="ltr"})=>{const u=h.useMemo(()=>i==="rtl"?{initial:{x:8,opacity:0,zIndex:0},animate:{x:0,opacity:1,zIndex:50},exit:{x:-8,opacity:0,zIndex:0}}:{initial:{x:-8,opacity:0,zIndex:0},animate:{x:0,opacity:1,zIndex:50},exit:{x:8,opacity:0,zIndex:0}},[i]);return a.jsxs("div",{className:p("wu-absolute wu-top-0 wu-left-0 wu-flex wu-gap-x-1 wu-px-4 wu-items-center wu-origin-left wu-w-full wu-transition",t!==n?"wu-translate-y-0 wu-opacity-100 wu-z-50 wu-delay-200":"wu-translate-y-1 wu-opacity-0 wu-z-0 wu-delay-0",r),style:{height:t!==n?`${o}px`:"-40px"},dir:i,children:[a.jsx(cm,{titles:e,handleTitleClick:s,dir:i}),a.jsx("div",{className:"wu-w-full wu-relative wu-h-full wu-flex wu-items-center wu-flex-nowrap wu-whitespace-nowrap wu-text-nowrap wu-gap-2 wu-overflow-x-auto wu-no-scrollbar wu-snap-x wu-snap-mandatory wu-scroll-smooth",children:a.jsx(iu,{features:gu,children:a.jsxs(nu,{initial:!1,mode:"popLayout",children:[wm(e).map((l,d)=>a.jsx(bu,{initial:u.initial,animate:u.animate,exit:u.exit,transition:{duration:.4,ease:"easeInOut"},children:a.jsxs("h6",{"data-id":l.id,onClick:s,className:p("wu-flex wu-text-sm wu-font-normal wu-items-center wu-gap-2 wu-h-6",d===2||d===1||l.id==="LEVEL_DOTS"?"wu-cursor-default wu-text-gray-600":"wu-cursor-pointer wu-text-[#1B87E6] wu-hover:text-[#145DBF]/70"),children:[d!==0&&a.jsx("span",{className:p("wm-chevron-right wu-text-[20px] wu-font-light",i==="rtl"&&"wu-rotate-180")}),l.title]})},l.id)),"``"]})})})]})},wm=e=>{const t=e.length;if(t>2){const n=e[0],s=e[t-1];return[n,{id:"LEVEL_DOTS",title:"..."},s]}return e},fm=({items:e,initial:t,baseTitle:n,mode:s="popLayout",headerClasses:r="",offsetHeight:o=40,variant:i="default",dir:u="ltr"})=>{const[l,d]=h.useState(n?[n]:[]),[[c,w],f]=h.useState([t,1]),m=(C,N)=>{N&&d([...l,N]),f([C,1])},g=C=>{const N=l.findIndex(S=>S.id===C);if(N!==-1){const S=l.slice(0,N+1);d(S)}f([C,-1])},b=(C,N)=>{const S=N||C.currentTarget.getAttribute("data-id")||"";if(S&&S!==c){const x=l.findIndex(T=>T.id===S);x!==-1&&(d(l.slice(0,x+1)),g(S))}},v=()=>{const C=e[c]?e[c]:null;if(!C)return a.jsx("div",{className:"wu-absolute wu-inset-0 wu-w-full wu-h-full wu-flex wu-items-center wu-justify-center",children:a.jsx("p",{className:"wu-text-gray-500",children:"No content available."})});const N=typeof C.component=="function"?C.component({goNext:m,goBack:g}):C.component;return a.jsx(bu,{dir:u,custom:w,variants:pm(i),initial:"enter",animate:"center",exit:"exit",transition:{opacity:{duration:.325,ease:"easeInOut"},scale:{duration:.275,ease:"easeInOut"}},className:"wu-w-full wu-h-full",style:{paddingTop:c!==t?`${o}px`:"0px"},children:N},c)};return a.jsxs("div",{dir:u,className:"wu-w-full wu-h-full wu-relative wu-overflow-hidden wu-flex wu-flex-col",children:[a.jsx(dm,{titles:l,currentLevel:c,initial:t,handleTitleClick:b,headerClasses:r,offsetHeight:o,dir:u}),a.jsx(iu,{features:gu,children:a.jsx(nu,{initial:!1,custom:w,mode:s,children:v()})})]})},pm=e=>{switch(e){case"slideRight":return mm;case"slideLeft":return gm;case"fadeZoom":return bm;case"default":default:return hm}},hm={enter:e=>({scale:e>0?.825:1.1,opacity:0,zIndex:0}),center:{scale:1,opacity:1,zIndex:1},exit:e=>({scale:e>0?1.1:.825,opacity:0,zIndex:0})},mm={enter:e=>({x:e>0?-15:15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?15:-15,opacity:0,zIndex:0})},gm={enter:e=>({x:e>0?15:-15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?-15:15,opacity:0,zIndex:0})},bm={enter:e=>({opacity:0,zIndex:0,scale:e>0?.925:1.1}),center:{opacity:1,zIndex:1,scale:1},exit:{opacity:0,zIndex:0,scale:1}},yu=({className:e,isLoading:t,loadingText:n,children:s,...r})=>a.jsxs("footer",{className:p("wu-flex wu-items-center wu-justify-between wu-gap-2 wu-border-t wu-border-gray-10 wu-py-3 wu-px-4 wu-bg-white/80 wu-backdrop-blur-sm wu-text-xs wu-font-normal wu-text-gray-footer wu-sticky wu-bottom-0",e),...r,children:[a.jsx("div",{className:"wu-flex-1",children:s}),t&&a.jsx(Nt,{size:"16px",variant:"spinner",color:"#a3a3a3",message:n})]});yu.displayName="WuFooter";const xu=h.forwardRef((e,t)=>{const{size:n="sm",idOrSlugOrUrl:s,variant:r="primary",...o}=e,i=n==="sm"?16:18,u=s.includes("http")?s:`/help/${s}.html`,l=r==="primary"?"wu-text-blue-p":"wu-text-gray-lead";return a.jsx("button",{...o,ref:t,onClick:()=>vs(u),children:a.jsx("span",{className:p("wm-help wu-text-gray-subtle",`wu-text-[${i}px]`,l,o.disabled&&"wu-text-neutral-300","wu-help-button-icon")})})});xu.displayName="WuHelpButton";const Re=(e,t)=>`wu-listbox-${e}`;function ym(e){const{option:t,accessorKey:n,onSelect:s,multiple:r,dir:o,GroupLabel:i,Item:u,isSelected:l,...d}=e,c=n.group&&Array.isArray(t[n.group]),w=({item:f,className:m})=>h.createElement(Ht,{...d,key:JSON.stringify(f),onSelect:()=>s==null?void 0:s(f),value:t[n.value],className:p("data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",!!(l!=null&&l(f))&&!r&&"wu-bg-blue-p/10",o==="rtl"&&"wu-justify-end",m,Re("item")),disabled:f.disabled},r&&a.jsx(Fe,{checked:l==null?void 0:l(f)}),u?u({value:f,isSelected:l==null?void 0:l(f)}):a.jsx(a.Fragment,{children:f[n.label]}));if(c){const f=t[n.group],m=typeof i=="string"?t[i]:i==null?void 0:i(t);return a.jsx($t,{heading:m,children:f==null?void 0:f.map(g=>a.jsx(w,{item:g,className:"wu-pl-6"},JSON.stringify(g)))})}return a.jsx(w,{item:t})}const xm=h.memo(ym),vm=e=>{const{className:t,...n}=e;return a.jsxs("div",{className:"wu-relative",children:[a.jsx(Ve,{icon:"wm-search",className:"wu-absolute wu-top-[14px] wu-left-5"}),a.jsx(to,{...n,"aria-label":"Search",className:p("wu-bg-gray-10 wu-border-b wu-border-gray-subtle wu-rounded-none wu-rounded-t-sm wu-h-8 wu-my-2 wu-pl-8","focus:wu-border-blue-p focus-visible:wu-outline-none;",Re("input"),t)})]})},Nm=e=>{const{label:t,onSelectAll:n,data:s,value:r}=e,[o,i]=h.useState(!1),[u,l]=h.useState(!1);return h.useEffect(()=>{!r||!s||(i(r.length>0),l(r.length>0&&r.length<s.length))},[s,r]),a.jsxs(Ht,{className:"data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",onSelect:()=>n==null?void 0:n(!o),children:[a.jsx(Fe,{checked:o,partial:u}),t||"Select All"]})},Sm=e=>{const{CustomTrigger:t,disabled:n,value:s,placeholder:r,accessorKey:o,Chip:i,handleUnselect:u,variant:l,dir:d,className:c,...w}=e,[f,m]=h.useState(),g=h.useRef(null);return h.useEffect(()=>{if(!s){m(null);return}m(Array.isArray(s)?i?s.map((v,C)=>i({value:v,unselect:u,key:C})):s.map(v=>v[o.label]).join(", "):i?i({value:s,unselect:u}):s[o.label])},[s,i,o.label,m]),a.jsx(ut,{asChild:!0,id:e.id,disabled:n,ref:g,children:(t==null?void 0:t(s))||a.jsxs("button",{...w,className:p("wu-group/wuListbox wu-relative wu-min-h-8 wu-text-xs wu-border-gray-subtle wu-bg-gray-10 wu-p-1 wu-pl-2 rtl:wu-pr-2 wu-border-b wu-w-full wu-text-left wu-pr-5 rtl:wu-pl-5","hover:wu-border-blue-p","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","rtl:wu-text-right",l==="outlined"&&"wu-border wu-border-gray-subtle wu-bg-white",c,Re("trigger")),children:[a.jsx("div",{className:p("wu-truncate",i&&"wu-flex wu-items-center wu-gap-1 wu-flex-wrap",!f&&"wu-font-light"),children:f||r}),a.jsx(Ve,{icon:"wm-arrow-drop-down",className:p("wu-absolute wu-top-1 wm-arrow-drop-down group-data-[state=open]/wuListbox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base",d==="rtl"?"wu-left-1":"wu-right-1",Re("drop-icon"))})]})})},vu=(e,t,n)=>{const s=String(e[n.label]??"").toLowerCase(),r=String(e[n.value]??"").toLowerCase();return s.includes(t)||r.includes(t)},Cm=(e,t,n)=>{const s=t.trim();if(s==="")return e;const r=s.toLowerCase(),o=[];for(const i of e){const u=n.group,l=u?i[u]:void 0;if(Array.isArray(l)){const d=l.filter(c=>vu(c,r,n));d.length>0&&o.push({...i,[u]:d})}else vu(i,r,n)&&o.push(i)}return o},Tm=e=>{const{data:t,accessorKey:n,value:s,Item:r,Label:o,GroupLabel:i,CustomHeader:u,CustomTrigger:l,NoDataContent:d,Chip:c,onSelect:w,onScroll:f,disabled:m,multiple:g,searchable:b,selectAll:v,virtualizedThreshold:C=100,id:N,dir:S,className:x,listClass:T,placeholder:A="Select items...",variant:D,labelPosition:I="top",maxContentWidth:k,maxContentHeight:F,modal:P,...M}=e,[V,W]=h.useState(!1),[_,q]=h.useState(""),[B,U]=h.useState(s),$=h.useMemo(()=>n,[n]),H=h.useMemo(()=>{if(!b||!_)return t;const X=_.toLowerCase().trim();return Cm(t,X,n)},[t,_,n.label,b]),pe=X=>{g?U(L=>{const j=X[n.value],K=Array.isArray(L)?L:[],J=K.some(ie=>ie[n.value]===j)?K.filter(ie=>ie[n.value]!==j):[...K,X];return w&&w(J),J}):(U(X),w&&w(X),W(!1))},de=h.useCallback(X=>{const L=X?t:[];U(L),v!=null&&v.onSelectAll&&v.onSelectAll(X),w&&w(L)},[t,v,w]),De=X=>Array.isArray(B)?B.some(L=>L[n.value]===X[n.value]):(B==null?void 0:B[n.value])===X[n.value];h.useEffect(()=>{U(s)},[s]);const ge=X=>{const L=j=>a.jsx(xm,{option:j,accessorKey:$,multiple:g,onSelect:K=>pe(K),dir:S,GroupLabel:i,Item:r,isSelected:K=>De(K)},JSON.stringify(j));return X.length>C?a.jsx(Ct,{list:X,callback:(j,K)=>L(K),dir:S}):X.map(L)};return a.jsxs("div",{className:p("wu-flex wu-text-sm wu-gap-2",I==="top"&&"wu-flex-col wu-gap-1",I==="left"&&"wu-flex-row",I==="right"&&"wu-flex-row-reverse",Re("container")),dir:S,children:[o&&a.jsx(Te,{htmlFor:N,className:Re("label"),children:o}),a.jsxs(ze,{open:V,onOpenChange:X=>{W(X),X||setTimeout(()=>{q("")},100)},modal:P,children:[a.jsx(Sm,{CustomTrigger:l,disabled:m,value:B,accessorKey:n,placeholder:A,Chip:c,className:x,handleUnselect:pe,variant:D,id:N,dir:S,...M}),a.jsx(Oe,{className:p("wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-w-auto wu-p-0 wu-bg-white wu-border wu-border-blue-p",Re("content")),align:"start",sideOffset:-1,style:{maxWidth:k},children:a.jsxs(Ls,{id:e.id,shouldFilter:!1,children:[b&&a.jsx(vm,{value:_,onValueChange:q}),u,a.jsxs(Ws,{className:p("wu-overflow-y-auto",Re("list"),T),onScroll:f,style:{maxHeight:F||"420px"},children:[a.jsx(Bs,{children:d||"No results found."}),a.jsx($t,{children:g&&(v==null?void 0:v.enabled)&&!_&&a.jsx(Nm,{data:t,value:B,onSelectAll:de,label:v.label})}),a.jsx($t,{children:ge(H)})]})]})})]})]})},$r=h.forwardRef(({showMenu:e=!1,className:t,color:n="#1B3380",...s},r)=>{const o=p("wu-w-full wu-border wu-transition-all wu-duration-300");return a.jsxs("div",{...s,className:p("wu-flex wu-flex-col wu-w-[18px] wu-justify-between wu-aspect-[3/2] wu-transition-all wu-duration-300",t),ref:r,"aria-label":"menu-icon",children:[a.jsx("div",{className:`${o} wu-origin-center ${e?"wu-rotate-45 wu-translate-y-[5px]":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} ${e?"wu-opacity-0":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} wu-origin-center ${e?"-wu-rotate-45 -wu-translate-y-[5px]":""}`,style:{borderColor:n}})]})});$r.displayName="WuMenuIcon";const Nu={overlay:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0",content:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[state=closed]:wu-slide-out-to-left-1/2 data-[state=closed]:wu-slide-out-to-top-[48%] data-[state=open]:wu-slide-in-from-left-1/2 data-[state=open]:wu-slide-in-from-top-[48%]"},Su=R.Root,Cu=R.Trigger,Em=R.Portal,Mm=R.Close,Tu=h.forwardRef(({className:e,...t},n)=>a.jsx(R.Overlay,{ref:n,className:p("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30",Nu.overlay,e),...t}));Tu.displayName=R.Overlay.displayName;const Hr=h.forwardRef(({className:e,children:t,hideCloseButton:n,isStackedCard:s,...r},o)=>a.jsxs(Em,{children:[a.jsx(Tu,{className:s?"wu-bg-transparent":""}),a.jsxs(R.Content,{ref:o,className:p("wu-fixed wu-left-[50%] wu-z-50 wu-top-[50%] wu-flex wu-flex-col wu-w-full wu-max-w-lg wu-translate-x-[-50%] wu-translate-y-[-50%] wu-bg-white wu-shadow-lg wu-duration-200",Nu.content,e),...r,children:[t,!n&&a.jsx(R.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(vt,{variant:"iconOnly",className:p("wu-absolute wu-right-2 wu-top-1 hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-top-3 wu-right-4 wu-p-1.5","group-data-[variant=action]:wu-text-blue-q","group-data-[variant=upgrade]:wu-text-yellow-deep","group-data-[variant=critical]:wu-text-red-deep"),children:[a.jsx("span",{className:"wm-close wu-text-xl wu-leading-5"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));Hr.displayName=R.Content.displayName;const Ur=({className:e,...t})=>a.jsx("div",{className:p("wu-text-center wu-bg-gray-20 wu-w-full",e),...t});Ur.displayName="DialogHeader";const Eu=({className:e,...t})=>a.jsx("div",{className:p("wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2 wu-p-4",e),...t});Eu.displayName="DialogFooter";const jr=h.forwardRef(({className:e,...t},n)=>a.jsx(R.Title,{ref:n,className:p("wu-text-lg wu-font-medium wu-flex wu-items-center wu-justify-center wu-gap-1 wu-h-10 wu-leading-none wu-tracking-tight",e),...t}));jr.displayName=R.Title.displayName;const Im=h.forwardRef(({className:e,...t},n)=>a.jsx(R.Description,{ref:n,className:p("wu-text-sm wu-text-muted-foreground",e),...t}));Im.displayName=R.Description.displayName;const Dm={gradientBackground:"_gradientBackground_1uc4j_1"},Mu=e=>{const{colors:t,size:n=.55,children:s,className:r,strokeWidth:o,centerOffset:i={x:0,y:0},...u}=e,l=h.useRef(null);return h.useEffect(()=>{const d=l.current;if(d){d.style.setProperty("--width",`${d.offsetWidth*n}px`),d.style.setProperty("--height",`${d.offsetHeight*n}px`),d.style.setProperty("--colors",t.join(",")),d.style.setProperty("--stroke-width",`-${o||2}px`),d.style.setProperty("--spotlight-background","radial-gradient(100% var(--height) ellipse at 25% 70%, var(--colors))");let w;const f=m=>{w&&cancelAnimationFrame(w),w=requestAnimationFrame(()=>{const g=d.getBoundingClientRect();let b=m.clientX-g.left,v=m.clientY-g.top;b=Math.max(0,Math.min(b+i.x,g.width)),v=Math.max(0,Math.min(v+i.y,g.height));const C=`radial-gradient(
13
- var(--width) var(--height) ellipse at ${b}px ${v}px,
12
+ `),()=>{D.contains(C)&&D.removeChild(C)}},[t]),a.jsx(ch,{isPresent:t,childRef:u,sizeRef:l,pop:o,children:o===!1?e:y.cloneElement(e,{ref:w})})}const wh=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:u,anchorY:l,root:d})=>{const c=$s(fh),w=h.useId();let f=!0,m=h.useMemo(()=>(f=!1,{id:w,initial:t,isPresent:n,custom:r,onExitComplete:g=>{c.set(g,!0);for(const b of c.values())if(!b)return;s&&s()},register:g=>(c.set(g,!1),()=>c.delete(g))}),[n,c,s]);return o&&f&&(m={...m}),h.useMemo(()=>{c.forEach((g,b)=>c.set(b,!1))},[n]),y.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),e=a.jsx(dh,{pop:i==="popLayout",isPresent:n,anchorX:u,anchorY:l,root:d,children:e}),a.jsx(Dn.Provider,{value:m,children:e})};function fh(){return new Map}function ph(e=!0){const t=h.useContext(Dn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=h.useId();h.useEffect(()=>{if(e)return r(o)},[e]);const i=h.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,i]:[!0]}const Un=e=>e.key||"";function tu(e){const t=[];return h.Children.forEach(e,n=>{h.isValidElement(n)&&t.push(n)}),t}const nu=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:o="sync",propagate:i=!1,anchorX:u="left",anchorY:l="top",root:d})=>{const[c,w]=ph(i),f=h.useMemo(()=>tu(e),[e]),m=i&&!c?[]:f.map(Un),g=h.useRef(!0),b=h.useRef(f),x=$s(()=>new Map),S=h.useRef(new Set),[v,T]=h.useState(f),[N,C]=h.useState(f);bo(()=>{g.current=!1,b.current=f;for(let I=0;I<N.length;I++){const k=Un(N[I]);m.includes(k)?(x.delete(k),S.current.delete(k)):x.get(k)!==!0&&x.set(k,!1)}},[N,m.length,m.join("-")]);const D=[];if(f!==v){let I=[...f];for(let k=0;k<N.length;k++){const F=N[k],P=Un(F);m.includes(P)||(I.splice(k,0,F),D.push(F))}return o==="wait"&&D.length&&(I=D),C(tu(I)),T(f),null}process.env.NODE_ENV!=="production"&&o==="wait"&&N.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:M}=h.useContext(mo);return a.jsx(a.Fragment,{children:N.map(I=>{const k=Un(I),F=i&&!c?!1:f===N||m.includes(k),P=()=>{if(S.current.has(k))return;if(S.current.add(k),x.has(k))x.set(k,!0);else return;let A=!0;x.forEach(V=>{V||(A=!1)}),A&&(M==null||M(),C(b.current),i&&(w==null||w()),s&&s())};return a.jsx(wh,{isPresent:F,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:d,onExitComplete:F?void 0:P,anchorX:u,anchorY:l,children:I},k)})})},Vr=h.createContext({strict:!1}),su={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let ru=!1;function hh(){if(ru)return;const e={};for(const t in su)e[t]={isEnabled:n=>su[t].some(s=>!!n[s])};zi(e),ru=!0}function au(){return hh(),Lp()}function ou(e){const t=au();for(const n in e)t[n]={...t[n],...e[n]};zi(t)}function iu({children:e,features:t,strict:n=!1}){const[,s]=h.useState(!Or(t)),r=h.useRef(void 0);if(!Or(t)){const{renderer:o,...i}=t;r.current=o,ou(i)}return h.useEffect(()=>{Or(t)&&t().then(({renderer:o,...i})=>{ou(i),r.current=o,s(!0)})},[]),a.jsx(Vr.Provider,{value:{renderer:r.current,strict:n},children:e})}function Or(e){return typeof e=="function"}const mh=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function jn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||mh.has(e)}let uu=e=>!jn(e);function gh(e){typeof e=="function"&&(uu=t=>t.startsWith("on")?!jn(t):e(t))}try{gh(require("@emotion/is-prop-valid").default)}catch{}function bh(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||(uu(r)||n===!0&&jn(r)||!t&&!jn(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const Gn=h.createContext({});function yh(e,t){if($n(e)){const{initial:n,animate:s}=e;return{initial:n===!1||Rt(n)?n:void 0,animate:Rt(s)?s:void 0}}return e.inherit!==!1?t:{}}function xh(e){const{initial:t,animate:n}=yh(e,h.useContext(Gn));return h.useMemo(()=>({initial:t,animate:n}),[lu(t),lu(n)])}function lu(e){return Array.isArray(e)?e.join(" "):e}const Fr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cu(e,t,n){for(const s in t)!me(t[s])&&!ji(s,n)&&(e[s]=t[s])}function vh({transformTemplate:e},t){return h.useMemo(()=>{const n=Fr();return kr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Nh(e,t){const n=e.style||{},s={};return cu(s,n,e),Object.assign(s,vh(e,t)),s}function Sh(e,t){const n={},s=Nh(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const du=()=>({...Fr(),attrs:{}});function Ch(e,t,n,s){const r=h.useMemo(()=>{const o=du();return Gi(o,t,Yi(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};cu(o,e.style,e),r.style={...o,...r.style}}return r}const Th=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Lr(e){return typeof e!="string"||e.includes("-")?!1:!!(Th.indexOf(e)>-1||/[A-Z]/u.test(e))}function Eh(e,t,n,{latestValues:s},r,o=!1,i){const l=(i??Lr(e)?Ch:Sh)(t,s,r,e),d=bh(t,typeof e=="string",o),c=e!==h.Fragment?{...d,...l,ref:n}:{},{children:w}=t,f=h.useMemo(()=>me(w)?w.get():w,[w]);return h.createElement(e,{...c,children:f})}function Mh({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Ih(n,s,r,e),renderState:t()}}function Ih(e,t,n,s){const r={},o=s(e,{});for(const f in o)r[f]=ih(o[f]);let{initial:i,animate:u}=e;const l=$n(e),d=Wi(e);t&&d&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),u===void 0&&(u=t.animate));let c=n?n.initial===!1:!1;c=c||i===!1;const w=c?u:i;if(w&&typeof w!="boolean"&&!zn(w)){const f=Array.isArray(w)?w:[w];for(let m=0;m<f.length;m++){const g=xr(e,f[m]);if(g){const{transitionEnd:b,transition:x,...S}=g;for(const v in S){let T=S[v];if(Array.isArray(T)){const N=c?T.length-1:0;T=T[N]}T!==null&&(r[v]=T)}for(const v in b)r[v]=b[v]}}}return r}const wu=e=>(t,n)=>{const s=h.useContext(Gn),r=h.useContext(Dn),o=()=>Mh(e,t,s,r);return n?o():$s(o)},Ah=wu({scrapeMotionValuesFromProps:Pr,createRenderState:Fr}),Dh=wu({scrapeMotionValuesFromProps:Xi,createRenderState:du}),kh=Symbol.for("motionComponentSymbol");function Ph(e,t,n){const s=h.useRef(n);h.useInsertionEffect(()=>{s.current=n});const r=h.useRef(null);return h.useCallback(o=>{var u;o&&((u=e.onMount)==null||u.call(e,o)),t&&(o?t.mount(o):t.unmount());const i=s.current;if(typeof i=="function")if(o){const l=i(o);typeof l=="function"&&(r.current=l)}else r.current?(r.current(),r.current=null):i(o);else i&&(i.current=o)},[t])}const _h=h.createContext({});function Vh(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Oh(e,t,n,s,r,o){var T,N;const{visualElement:i}=h.useContext(Gn),u=h.useContext(Vr),l=h.useContext(Dn),d=h.useContext(_r),c=d.reducedMotion,w=d.skipAnimations,f=h.useRef(null),m=h.useRef(!1);s=s||u.renderer,!f.current&&s&&(f.current=s(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:w,isSVG:o}),m.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const g=f.current,b=h.useContext(_h);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&Fh(f.current,n,r,b);const x=h.useRef(!1);h.useInsertionEffect(()=>{g&&x.current&&g.update(n,l)});const S=n[Ni],v=h.useRef(!!S&&!((T=window.MotionHandoffIsComplete)!=null&&T.call(window,S))&&((N=window.MotionHasOptimisedAnimation)==null?void 0:N.call(window,S)));return bo(()=>{m.current=!0,g&&(x.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),v.current&&g.animationState&&g.animationState.animateChanges())}),h.useEffect(()=>{g&&(!v.current&&g.animationState&&g.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,S)}),v.current=!1),g.enteringChildren=void 0)}),g}function Fh(e,t,n,s){const{layoutId:r,layout:o,drag:i,dragConstraints:u,layoutScroll:l,layoutRoot:d,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:fu(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!i||u&&Vh(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:d})}function fu(e){if(e)return e.options.allowProjection!==!1?e.projection:fu(e.parent)}function Lh(e,{forwardMotionProps:t=!1,type:n}={},s,r){const o=n?n==="svg":Lr(e),i=o?Dh:Ah;function u(d,c){let w;const f={...h.useContext(_r),...d,layoutId:Wh(d)},{isStatic:m}=f,g=xh(d),b=i(d,m);if(!m&&go){Bh(f,s);const x=qh(f);w=x.MeasureLayout,g.visualElement=Oh(e,b,f,r,x.ProjectionNode,o)}return a.jsxs(Gn.Provider,{value:g,children:[w&&g.visualElement?a.jsx(w,{visualElement:g.visualElement,...f}):null,Eh(e,d,Ph(b,g.visualElement,c),b,m,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=h.forwardRef(u);return l[kh]=e,l}function Wh({layoutId:e}){const t=h.useContext(mo).id;return t&&e!==void 0?t+"-"+e:e}function Bh(e,t){h.useContext(Vr).strict,process.env.NODE_ENV}function qh(e){const t=au(),{drag:n,layout:s}=t;if(!n&&!s)return{};const r={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(e)||s!=null&&s.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const zh=(e,t)=>t.isSVG??Lr(e)?new eh(t):new Yp(t,{allowProjection:e!==h.Fragment});class $h extends _t{constructor(t){super(t),t.animationState||(t.animationState=ah(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();zn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Hh=0;class Uh extends _t{constructor(){super(...arguments),this.id=Hh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const jh={animation:{Feature:$h},exit:{Feature:Uh}};function pu(e){return{point:{x:e.pageX,y:e.pageY}}}function hu(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=s[r];o&&We.postRender(()=>o(t,pu(t)))}class Gh extends _t{mount(){const{current:t}=this.node;t&&(this.unmount=Tp(t,(n,s)=>(hu(this.node,s,"Start"),r=>hu(this.node,r,"End"))))}unmount(){}}class Kh extends _t{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=kn(Ri(this.node.current,"focus",()=>this.onFocus()),Ri(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function mu(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=s[r];o&&We.postRender(()=>o(t,pu(t)))}class Yh extends _t{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Dp(t,(r,o)=>(mu(this.node,o,"Start"),(i,{success:u})=>mu(this.node,i,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const Wr=new WeakMap,Br=new WeakMap,Xh=e=>{const t=Wr.get(e.target);t&&t(e)},Zh=e=>{e.forEach(Xh)};function Jh({root:e,...t}){const n=e||document;Br.has(n)||Br.set(n,{});const s=Br.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(Zh,{root:e,...t})),s[r]}function Qh(e,t,n){const s=Jh(t);return Wr.set(e,n),s.observe(e),()=>{Wr.delete(e),s.unobserve(e)}}const Rh={some:0,all:1};class em extends _t{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:Rh[r]},u=l=>{const{isIntersecting:d}=l;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:c,onViewportLeave:w}=this.node.getProps(),f=d?c:w;f&&f(l)};return Qh(this.node.current,i,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(tm(t,n))&&this.startObserver()}unmount(){}}function tm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const gu={renderer:zh,...jh,...{inView:{Feature:em},tap:{Feature:Yh},focus:{Feature:Kh},hover:{Feature:Gh}}};function nm(e,t){return Lh(e,t)}const bu=nm("div"),sm=e=>{const{checked:t,onSelect:n,children:s,disabled:r,preventCloseOnSelect:o}=e;return a.jsx(uo,{disabled:r,checked:t,onCheckedChange:n,onSelect:i=>o&&i.preventDefault(),children:s})},Kn=e=>{const{children:t,className:n,Icon:s,iconPosition:r="left",disabled:o,onSelect:i,preventCloseOnSelect:u}=e,l=p("wu-flex wu-items-center wu-gap-2",s&&(r==="left"?"":"wu-justify-between wu-flex-row-reverse"),n),d=c=>{i&&i(c),u&&c.preventDefault()};return a.jsxs(In,{onSelect:d,disabled:o,className:l,children:[s&&a.jsx("div",{className:"wu-text-base",children:s}),t]})},rm=e=>{const{children:t,Label:n,...s}=e;return a.jsxs(ao,{...s,children:[a.jsx(Ut,{children:n||e.label}),t]})},am=e=>{const{options:t,value:n,onSelect:s}=e;return a.jsx(Qd,{value:n,onValueChange:s,children:t.map(r=>a.jsx(lo,{value:r.value,disabled:r.disabled,children:r.Label||r.label},r.value))})},om=e=>{const{className:t,...n}=e,s=p("wu-w-11/12 wu-mx-auto wu-border-gray-40",t);return a.jsx(An,{...n,className:s})},Vt=y.forwardRef(({className:e,children:t,thumbColor:n,railColor:s,...r},o)=>a.jsxs(it.Root,{ref:o,className:p("wu-relative wu-overflow-hidden",e),children:[a.jsx(it.Viewport,{className:"wu-h-full wu-w-full wu-rounded-[inherit]",...r,children:t}),a.jsx(qr,{thumbColor:n,railColor:s}),a.jsx(it.Corner,{})]}));Vt.displayName=it.Root.displayName;const qr=y.forwardRef(({className:e,orientation:t="vertical",thumbColor:n="#d4d4d4",railColor:s="#eeeeee",...r},o)=>a.jsx(it.ScrollAreaScrollbar,{ref:o,orientation:t,className:p("wu-flex wu-touch-none wu-select-none wu-transition-colors",t==="vertical"&&"wu-h-full wu-w-2 wu-border-l wu-border-l-transparent wu-p-[1px]",t==="horizontal"&&"wu-h-2 wu-flex-col wu-border-t wu-border-t-transparent wu-p-[1px]",e),style:{background:s},...r,children:a.jsx(it.ScrollAreaThumb,{className:"wu-relative wu-flex-1 wu-rounded-full",style:{background:n}})}));qr.displayName=it.ScrollAreaScrollbar.displayName;const im=e=>{const{children:t,label:n,Label:s,open:r,onOpenChange:o,height:i,dir:u,...l}=e;return a.jsxs(Jd,{...l,open:r,onOpenChange:o,children:[a.jsx(oo,{dir:u,children:s||n}),a.jsx(Zd,{children:a.jsx(io,{onInteractOutside:d=>d.preventDefault(),children:a.jsx(Vt,{className:"wu-h-fit",style:{height:i},dir:u,children:t})})})]})},um="wu-p-1.5 wu-cursor-pointer hover:wu-bg-gray-20 wu-border-gray-40 wu-transition wu-duration-300 focus:wu-outline-2 focus:wu-outline-offset focus:wu-outline-blue-p/80 focus:wu-bg-gray-20 hover:wu-bg-gray-20 wu-rounded-t-sm",zr=e=>{const{children:t,menuTitle:n,MenuTitle:s,variant:r="flat",name:o,open:i,onOpenChange:u,height:l,preventCloseOnClickOutside:d,dir:c,Trigger:w,align:f="start",sideOffset:m=0,side:g="bottom",alignOffset:b,className:x,disabled:S,...v}=e;return a.jsxs(so,{...v,open:i,onOpenChange:u,dir:c,children:[a.jsx(ro,{asChild:!0,dir:c,disabled:S,className:p("disabled:wu-text-zinc-300 disabled:wu-bg-white disabled:wu-cursor-not-allowed disabled:hover:wu-bg-transparent"),children:w??lm(r,o,S)}),a.jsx(qs,{className:p("wu-w-56 wu-border wu-border-blue-p disabled:wu-border-gray-40",x,"wu-menu-content"),align:f,sideOffset:m,side:g,alignOffset:b,onInteractOutside:T=>d&&T.preventDefault(),children:a.jsxs(Vt,{className:"h-fit",style:{height:l},dir:c,children:[(n||s)&&a.jsxs(a.Fragment,{children:[a.jsx(Ut,{dir:c,className:"wu-menu-title",children:s||n}),a.jsx(An,{className:"wu-mt-0 wu-menu-separator",dir:c})]}),t??a.jsx("p",{children:"Menu Is Empty"})]})})]})},lm=(e,t,n)=>{const s=p(um,"wu-flex wu-items-center wu-justify-between wu-gap-2 wu-h-8 wu-text-xs wu-group/wuMenu",e==="outlined"?"wu-border":"wu-border-b","wu-trigger-btn");return a.jsxs("button",{className:s,"aria-label":"menu-trigger",children:[a.jsx("span",{children:t??"Menu"}),a.jsx("span",{className:p("wm-arrow-drop-down wu-text-gray-lead wu-text-base wu-rotate-180 group-data-[state=closed]/wuMenu:wu-rotate-0 wu-transition-transform wu-duration-300 group-hover:wu-text-blue-q",n&&"wu-text-zinc-300 group-hover:wu-text-zinc-300")})]})},cm=({titles:e,dir:t="ltr",handleTitleClick:n})=>{const[s,r]=h.useState(!1);return a.jsx(zr,{open:s,onOpenChange:r,align:t==="rtl"?"end":"start",Trigger:a.jsx(Ce,{variant:"iconOnly",className:"wu-w-6 wu-h-6 wu-shrink-0 wu-p-0",Icon:a.jsx("span",{className:p("wm-arrow-drop-down wu-w-5 wu-h-5 wu-transition-transform wu-duration-300",s&&"wu-rotate-180")})}),children:e.map(o=>a.jsx(Kn,{onSelect:i=>n(i,o.id),children:o.title},o.id))})},dm=({titles:e,currentLevel:t,initial:n,handleTitleClick:s,headerClasses:r,offsetHeight:o,dir:i="ltr"})=>{const u=h.useMemo(()=>i==="rtl"?{initial:{x:8,opacity:0,zIndex:0},animate:{x:0,opacity:1,zIndex:50},exit:{x:-8,opacity:0,zIndex:0}}:{initial:{x:-8,opacity:0,zIndex:0},animate:{x:0,opacity:1,zIndex:50},exit:{x:8,opacity:0,zIndex:0}},[i]);return a.jsxs("div",{className:p("wu-absolute wu-top-0 wu-left-0 wu-flex wu-gap-x-1 wu-px-4 wu-items-center wu-origin-left wu-w-full wu-transition",t!==n?"wu-translate-y-0 wu-opacity-100 wu-z-50 wu-delay-200":"wu-translate-y-1 wu-opacity-0 wu-z-0 wu-delay-0",r),style:{height:t!==n?`${o}px`:"-40px"},dir:i,children:[a.jsx(cm,{titles:e,handleTitleClick:s,dir:i}),a.jsx("div",{className:"wu-w-full wu-relative wu-h-full wu-flex wu-items-center wu-flex-nowrap wu-whitespace-nowrap wu-text-nowrap wu-gap-2 wu-overflow-x-auto wu-no-scrollbar wu-snap-x wu-snap-mandatory wu-scroll-smooth",children:a.jsx(iu,{features:gu,children:a.jsxs(nu,{initial:!1,mode:"popLayout",children:[wm(e).map((l,d)=>a.jsx(bu,{initial:u.initial,animate:u.animate,exit:u.exit,transition:{duration:.4,ease:"easeInOut"},children:a.jsxs("h6",{"data-id":l.id,onClick:s,className:p("wu-flex wu-text-sm wu-font-normal wu-items-center wu-gap-2 wu-h-6",d===2||d===1||l.id==="LEVEL_DOTS"?"wu-cursor-default wu-text-gray-600":"wu-cursor-pointer wu-text-[#1B87E6] wu-hover:text-[#145DBF]/70"),children:[d!==0&&a.jsx("span",{className:p("wm-chevron-right wu-text-[20px] wu-font-light",i==="rtl"&&"wu-rotate-180")}),l.title]})},l.id)),"``"]})})})]})},wm=e=>{const t=e.length;if(t>2){const n=e[0],s=e[t-1];return[n,{id:"LEVEL_DOTS",title:"..."},s]}return e},fm=({items:e,initial:t,baseTitle:n,mode:s="popLayout",headerClasses:r="",offsetHeight:o=40,variant:i="default",dir:u="ltr"})=>{const[l,d]=h.useState(n?[n]:[]),[[c,w],f]=h.useState([t,1]),m=(S,v)=>{v&&d([...l,v]),f([S,1])},g=S=>{const v=l.findIndex(T=>T.id===S);if(v!==-1){const T=l.slice(0,v+1);d(T)}f([S,-1])},b=(S,v)=>{const T=v||S.currentTarget.getAttribute("data-id")||"";if(T&&T!==c){const N=l.findIndex(C=>C.id===T);N!==-1&&(d(l.slice(0,N+1)),g(T))}},x=()=>{const S=e[c]?e[c]:null;if(!S)return a.jsx("div",{className:"wu-absolute wu-inset-0 wu-w-full wu-h-full wu-flex wu-items-center wu-justify-center",children:a.jsx("p",{className:"wu-text-gray-500",children:"No content available."})});const v=typeof S.component=="function"?S.component({goNext:m,goBack:g}):S.component;return a.jsx(bu,{dir:u,custom:w,variants:pm(i),initial:"enter",animate:"center",exit:"exit",transition:{opacity:{duration:.325,ease:"easeInOut"},scale:{duration:.275,ease:"easeInOut"}},className:"wu-w-full wu-h-full",style:{paddingTop:c!==t?`${o}px`:"0px"},children:v},c)};return a.jsxs("div",{dir:u,className:"wu-w-full wu-h-full wu-relative wu-overflow-hidden wu-flex wu-flex-col",children:[a.jsx(dm,{titles:l,currentLevel:c,initial:t,handleTitleClick:b,headerClasses:r,offsetHeight:o,dir:u}),a.jsx(iu,{features:gu,children:a.jsx(nu,{initial:!1,custom:w,mode:s,children:x()})})]})},pm=e=>{switch(e){case"slideRight":return mm;case"slideLeft":return gm;case"fadeZoom":return bm;case"default":default:return hm}},hm={enter:e=>({scale:e>0?.825:1.1,opacity:0,zIndex:0}),center:{scale:1,opacity:1,zIndex:1},exit:e=>({scale:e>0?1.1:.825,opacity:0,zIndex:0})},mm={enter:e=>({x:e>0?-15:15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?15:-15,opacity:0,zIndex:0})},gm={enter:e=>({x:e>0?15:-15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?-15:15,opacity:0,zIndex:0})},bm={enter:e=>({opacity:0,zIndex:0,scale:e>0?.925:1.1}),center:{opacity:1,zIndex:1,scale:1},exit:{opacity:0,zIndex:0,scale:1}},yu=({className:e,isLoading:t,loadingText:n,children:s,...r})=>a.jsxs("footer",{className:p("wu-flex wu-items-center wu-justify-between wu-gap-2 wu-border-t wu-border-gray-10 wu-py-3 wu-px-4 wu-bg-white/80 wu-backdrop-blur-sm wu-text-xs wu-font-normal wu-text-gray-footer wu-sticky wu-bottom-0",e),...r,children:[a.jsx("div",{className:"wu-flex-1",children:s}),t&&a.jsx(St,{size:"16px",variant:"spinner",color:"#a3a3a3",message:n})]});yu.displayName="WuFooter";const xu=h.forwardRef((e,t)=>{const{size:n="sm",idOrSlugOrUrl:s,variant:r="primary",...o}=e,i=n==="sm"?16:18,u=s.includes("http")?s:`/help/${s}.html`,l=r==="primary"?"wu-text-blue-p":"wu-text-gray-lead";return a.jsx("button",{...o,ref:t,onClick:()=>vs(u),children:a.jsx("span",{className:p("wm-help wu-text-gray-subtle",`wu-text-[${i}px]`,l,o.disabled&&"wu-text-neutral-300","wu-help-button-icon")})})});xu.displayName="WuHelpButton";const et=(e,t)=>`wu-listbox-${e}`;function ym(e){const{option:t,accessorKey:n,onSelect:s,multiple:r,dir:o,GroupLabel:i,Item:u,isSelected:l,...d}=e,c=n.group&&Array.isArray(t[n.group]),w=({item:f,className:m})=>h.createElement(Ht,{...d,key:JSON.stringify(f),onSelect:()=>s==null?void 0:s(f),value:t[n.value],className:p("data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",!!(l!=null&&l(f))&&!r&&"wu-bg-blue-p/10",o==="rtl"&&"wu-justify-end",m,et("item")),disabled:f.disabled},r&&a.jsx(Fe,{checked:l==null?void 0:l(f)}),u?u({value:f,isSelected:l==null?void 0:l(f)}):a.jsx(a.Fragment,{children:f[n.label]}));if(c){const f=t[n.group],m=typeof i=="string"?t[i]:i==null?void 0:i(t);return a.jsx($t,{heading:m,children:f==null?void 0:f.map(g=>a.jsx(w,{item:g,className:"wu-pl-6"},JSON.stringify(g)))})}return a.jsx(w,{item:t})}const xm=h.memo(ym),vm=e=>{const{className:t,...n}=e;return a.jsxs("div",{className:"wu-relative",children:[a.jsx(Ve,{icon:"wm-search",className:"wu-absolute wu-top-[14px] wu-left-5"}),a.jsx(to,{...n,"aria-label":"Search",className:p("wu-bg-gray-10 wu-border-b wu-border-gray-subtle wu-rounded-none wu-rounded-t-sm wu-h-8 wu-my-2 wu-pl-8","focus:wu-border-blue-p focus-visible:wu-outline-none;",et("input"),t)})]})},Nm=e=>{const{label:t,onSelectAll:n,data:s,value:r}=e,[o,i]=h.useState(!1),[u,l]=h.useState(!1);return h.useEffect(()=>{!r||!s||(i(r.length>0),l(r.length>0&&r.length<s.length))},[s,r]),a.jsxs(Ht,{className:"data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",onSelect:()=>n==null?void 0:n(!o),children:[a.jsx(Fe,{checked:o,partial:u}),t||"Select All"]})},Sm=e=>{const{CustomTrigger:t,disabled:n,value:s,placeholder:r,accessorKey:o,Chip:i,handleUnselect:u,variant:l,dir:d,className:c,...w}=e,[f,m]=h.useState(),g=h.useRef(null);return h.useEffect(()=>{if(!s){m(null);return}m(Array.isArray(s)?i?s.map((x,S)=>i({value:x,unselect:u,key:S})):s.map(x=>x[o.label]).join(", "):i?i({value:s,unselect:u}):s[o.label])},[s,i,o.label,m]),a.jsx(lt,{asChild:!0,id:e.id,disabled:n,ref:g,children:(t==null?void 0:t(s))||a.jsxs("button",{...w,className:p("wu-group/wuListbox wu-relative wu-min-h-8 wu-text-xs wu-border-gray-subtle wu-bg-gray-10 wu-p-1 wu-pl-2 rtl:wu-pr-2 wu-border-b wu-w-full wu-text-left wu-pr-5 rtl:wu-pl-5","hover:wu-border-blue-p","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","rtl:wu-text-right",l==="outlined"&&"wu-border wu-border-gray-subtle wu-bg-white",c,et("trigger")),children:[a.jsx("div",{className:p("wu-truncate",i&&"wu-flex wu-items-center wu-gap-1 wu-flex-wrap",!f&&"wu-font-light"),children:f||r}),a.jsx(Ve,{icon:"wm-arrow-drop-down",className:p("wu-absolute wu-top-1 wm-arrow-drop-down group-data-[state=open]/wuListbox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base",d==="rtl"?"wu-left-1":"wu-right-1",et("drop-icon"))})]})})},vu=(e,t,n)=>{const s=String(e[n.label]??"").toLowerCase(),r=String(e[n.value]??"").toLowerCase();return s.includes(t)||r.includes(t)},Cm=(e,t,n)=>{const s=t.trim();if(s==="")return e;const r=s.toLowerCase(),o=[];for(const i of e){const u=n.group,l=u?i[u]:void 0;if(Array.isArray(l)){const d=l.filter(c=>vu(c,r,n));d.length>0&&o.push({...i,[u]:d})}else vu(i,r,n)&&o.push(i)}return o},Tm=e=>{const{data:t,accessorKey:n,value:s,Item:r,Label:o,GroupLabel:i,CustomHeader:u,CustomTrigger:l,NoDataContent:d,Chip:c,onSelect:w,onScroll:f,disabled:m,multiple:g,searchable:b,selectAll:x,virtualizedThreshold:S=100,id:v,dir:T,className:N,listClass:C,placeholder:D="Select items...",variant:M,labelPosition:I="top",maxContentWidth:k,maxContentHeight:F,modal:P,...A}=e,[V,W]=h.useState(!1),[_,q]=h.useState(""),[B,U]=h.useState(s),$=h.useMemo(()=>n,[n]),H=h.useMemo(()=>{if(!b||!_)return t;const X=_.toLowerCase().trim();return Cm(t,X,n)},[t,_,n.label,b]),pe=X=>{g?U(L=>{const j=X[n.value],K=Array.isArray(L)?L:[],J=K.some(ie=>ie[n.value]===j)?K.filter(ie=>ie[n.value]!==j):[...K,X];return w&&w(J),J}):(U(X),w&&w(X),W(!1))},de=h.useCallback(X=>{const L=X?t:[];U(L),x!=null&&x.onSelectAll&&x.onSelectAll(X),w&&w(L)},[t,x,w]),Ae=X=>Array.isArray(B)?B.some(L=>L[n.value]===X[n.value]):(B==null?void 0:B[n.value])===X[n.value];h.useEffect(()=>{U(s)},[s]);const ge=X=>{const L=j=>a.jsx(xm,{option:j,accessorKey:$,multiple:g,onSelect:K=>pe(K),dir:T,GroupLabel:i,Item:r,isSelected:K=>Ae(K)},JSON.stringify(j));return X.length>S?a.jsx(Ct,{list:X,callback:(j,K)=>L(K),dir:T}):X.map(L)};return a.jsxs("div",{className:p("wu-flex wu-text-sm wu-gap-2",I==="top"&&"wu-flex-col wu-gap-1",I==="left"&&"wu-flex-row",I==="right"&&"wu-flex-row-reverse",et("container")),dir:T,children:[o&&a.jsx(Te,{htmlFor:v,className:et("label"),children:o}),a.jsxs(ze,{open:V,onOpenChange:X=>{W(X),X||setTimeout(()=>{q("")},100)},modal:P,children:[a.jsx(Sm,{CustomTrigger:l,disabled:m,value:B,accessorKey:n,placeholder:D,Chip:c,className:N,handleUnselect:pe,variant:M,id:v,dir:T,...A}),a.jsx(Oe,{className:p("wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-w-auto wu-p-0 wu-bg-white wu-border wu-border-blue-p",et("content")),align:"start",sideOffset:-1,style:{maxWidth:k},children:a.jsxs(Ls,{id:e.id,shouldFilter:!1,children:[b&&a.jsx(vm,{value:_,onValueChange:q}),u,a.jsxs(Ws,{className:p("wu-overflow-y-auto",et("list"),C),onScroll:f,style:{maxHeight:F||"420px"},children:[a.jsx(Bs,{children:d||"No results found."}),a.jsx($t,{children:g&&(x==null?void 0:x.enabled)&&!_&&a.jsx(Nm,{data:t,value:B,onSelectAll:de,label:x.label})}),a.jsx($t,{children:ge(H)})]})]})})]})]})},$r=h.forwardRef(({showMenu:e=!1,className:t,color:n="#1B3380",...s},r)=>{const o=p("wu-w-full wu-border wu-transition-all wu-duration-300");return a.jsxs("div",{...s,className:p("wu-flex wu-flex-col wu-w-[18px] wu-justify-between wu-aspect-[3/2] wu-transition-all wu-duration-300",t),ref:r,"aria-label":"menu-icon",children:[a.jsx("div",{className:`${o} wu-origin-center ${e?"wu-rotate-45 wu-translate-y-[5px]":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} ${e?"wu-opacity-0":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} wu-origin-center ${e?"-wu-rotate-45 -wu-translate-y-[5px]":""}`,style:{borderColor:n}})]})});$r.displayName="WuMenuIcon";const Nu={overlay:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0",content:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[state=closed]:wu-slide-out-to-left-1/2 data-[state=closed]:wu-slide-out-to-top-[48%] data-[state=open]:wu-slide-in-from-left-1/2 data-[state=open]:wu-slide-in-from-top-[48%]"},Su=R.Root,Cu=R.Trigger,Em=R.Portal,Mm=R.Close,Tu=h.forwardRef(({className:e,...t},n)=>a.jsx(R.Overlay,{ref:n,className:p("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30",Nu.overlay,e),...t}));Tu.displayName=R.Overlay.displayName;const Hr=h.forwardRef(({className:e,children:t,hideCloseButton:n,isStackedCard:s,...r},o)=>a.jsxs(Em,{children:[a.jsx(Tu,{className:s?"wu-bg-transparent":""}),a.jsxs(R.Content,{ref:o,className:p("wu-fixed wu-left-[50%] wu-z-50 wu-top-[50%] wu-flex wu-flex-col wu-w-full wu-max-w-lg wu-translate-x-[-50%] wu-translate-y-[-50%] wu-bg-white wu-shadow-lg wu-duration-200",Nu.content,e),...r,children:[t,!n&&a.jsx(R.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Nt,{variant:"iconOnly",className:p("wu-absolute wu-right-2 wu-top-1 hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-top-3 wu-right-4 wu-p-1.5","group-data-[variant=action]:wu-text-blue-q","group-data-[variant=upgrade]:wu-text-yellow-deep","group-data-[variant=critical]:wu-text-red-deep"),children:[a.jsx("span",{className:"wm-close wu-text-xl wu-leading-5"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));Hr.displayName=R.Content.displayName;const Ur=({className:e,...t})=>a.jsx("div",{className:p("wu-text-center wu-bg-gray-20 wu-w-full",e),...t});Ur.displayName="DialogHeader";const Eu=({className:e,...t})=>a.jsx("div",{className:p("wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2 wu-p-4",e),...t});Eu.displayName="DialogFooter";const jr=h.forwardRef(({className:e,...t},n)=>a.jsx(R.Title,{ref:n,className:p("wu-text-lg wu-font-medium wu-flex wu-items-center wu-justify-center wu-gap-1 wu-h-10 wu-leading-none wu-tracking-tight",e),...t}));jr.displayName=R.Title.displayName;const Im=h.forwardRef(({className:e,...t},n)=>a.jsx(R.Description,{ref:n,className:p("wu-text-sm wu-text-muted-foreground",e),...t}));Im.displayName=R.Description.displayName;const Am={gradientBackground:"_gradientBackground_1uc4j_1"},Mu=e=>{const{colors:t,size:n=.55,children:s,className:r,strokeWidth:o,centerOffset:i={x:0,y:0},...u}=e,l=h.useRef(null);return h.useEffect(()=>{const d=l.current;if(d){d.style.setProperty("--width",`${d.offsetWidth*n}px`),d.style.setProperty("--height",`${d.offsetHeight*n}px`),d.style.setProperty("--colors",t.join(",")),d.style.setProperty("--stroke-width",`-${o||2}px`),d.style.setProperty("--spotlight-background","radial-gradient(100% var(--height) ellipse at 25% 70%, var(--colors))");let w;const f=m=>{w&&cancelAnimationFrame(w),w=requestAnimationFrame(()=>{const g=d.getBoundingClientRect();let b=m.clientX-g.left,x=m.clientY-g.top;b=Math.max(0,Math.min(b+i.x,g.width)),x=Math.max(0,Math.min(x+i.y,g.height));const S=`radial-gradient(
13
+ var(--width) var(--height) ellipse at ${b}px ${x}px,
14
14
  var(--colors)
15
- )`;d.style.setProperty("--spotlight-background",C)})};return window.addEventListener("mousemove",f),()=>{window.removeEventListener("mousemove",f),w&&cancelAnimationFrame(w)}}},[t,n,o,i]),a.jsx("div",{ref:l,className:p(Dm.gradientBackground,"wu-transform-gpu",r),...u,children:s})},Yn={wuModalBodyWrapper:"_wuModalBodyWrapper_10o33_1","wu-modal-footer":"_wu-modal-footer_10o33_5","wu-modal-content":"_wu-modal-content_10o33_5","wu-modal-header":"_wu-modal-header_10o33_9"},Iu="calc(100vh - 64px)",Am={sm:"400px",md:"600px",lg:"1200px"},km=({Trigger:e,children:t,size:n="md",hideCloseButton:s,preventClickOutside:r,onOpenChange:o,open:i,dir:u,maxWidth:l,maxHeight:d,className:c,style:w,variant:f="action",...m})=>{const g={action:["#EEF3FBcc 32%","#1D50F4cc"],upgrade:["#FDEDCCcc 32%","#FF9F00cc"],critical:["#FFB6B6cc 32%","#CC0000cc"]};return a.jsxs(Su,{modal:!0,onOpenChange:o,open:i,children:[e&&a.jsx(Cu,{asChild:!0,children:e}),a.jsx(Hr,{style:{width:"calc(100% - 64px)",maxWidth:l||Am[n],maxHeight:d||Iu,...w},hideCloseButton:s,onInteractOutside:b=>r&&b.preventDefault(),dir:u,"aria-describedby":void 0,"data-variant":f,className:p("wu-group wu-rounded-[1.1rem]",Yn.wuModalBodyWrapper,c),...m,children:a.jsx(Mu,{colors:g[f],strokeWidth:4,className:p("wu-rounded-[1.1rem] wu-transform-gpu wu-flex wu-flex-col",c),style:{maxHeight:d||Iu},children:t})})]})},Pm=({children:e,className:t,...n})=>a.jsx("div",{className:p("wu-flex wu-flex-col wu-gap-4 wu-p-4 rtl:wu-text-right wu-overflow-auto wu-bg-white","wu-p-8 wu-text-gray-lead",Yn["wu-modal-content"],t),...n,children:e}),_m=({children:e,className:t,...n})=>a.jsx(Ur,{...n,"data-variant":"action",className:p("wu-text-lg wu-text-gray-lead wu-font-medium","wu-rounded-t-xl wu-px-4","group-data-[variant=action]:wu-bg-blue-sidebar group-data-[variant=action]:wu-text-blue-q","group-data-[variant=critical]:wu-bg-[#F9E0E0] group-data-[variant=critical]:wu-text-red-deep","group-data-[variant=upgrade]:wu-bg-[#FEF1D9] group-data-[variant=upgrade]:wu-text-yellow-deep",Yn["wu-modal-header"],t),children:a.jsx(jr,{className:"wu-font-normal wu-justify-start wu-text-2xl wu-h-14",children:e})}),Vm=({children:e,className:t,...n})=>a.jsx(Eu,{...n,className:p("wu-border-t wu-border-gray-40 wu-bg-white wu-min-h-16 wu-mx-4 wu-px-0","wu-mx-0 wu-rounded-b-xl wu-min-h-16 wu-p-4","group-data-[variant=upgrade]:wu-border-[#EED6A8]","group-data-[variant=action]:wu-border-[#BAC9F8]","group-data-[variant=critical]:wu-border-[#F0B3B3]",Yn["wu-modal-footer"],t),children:e}),Om=({children:e,className:t,...n})=>{const s=h.useRef(null);return a.jsx(Mm,{asChild:!0,children:a.jsx(Ce,{className:t,ref:s,...n,children:e})})},Fm=({placeholder:e="Select...",value:t,multiple:n=!1,accessorKey:s,variant:r="flat",dir:o="ltr",customTriggerChildren:i,id:u,disabled:l,selectAll:d,isCheckedAll:c,width:w,...f})=>{const[m,g]=h.useState(""),[b,v]=h.useState(e);h.useEffect(()=>{if(!t||Array.isArray(t)&&t.length===0){v(e),g("");return}const N=s.label;if(n&&Array.isArray(t)){const S=t.map(x=>x[N]).join(", ");g(S)}else!n&&!Array.isArray(t)&&g(t[N])},[t,s.label,n,e]);const C=()=>e&&!m?a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:b}):a.jsx("span",{className:p("wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap"),style:{width:`${(w||0)-32}px`},children:c?(d==null?void 0:d.triggerText)??m:m});return a.jsx(ro,{asChild:!0,dir:o,id:u,disabled:l,children:a.jsxs("button",{...f,disabled:l,className:p("wu-flex wu-gap-2 wu-w-full wu-items-center wu-justify-between wu-py-1.5 wu-px-2 wu-text-xs wu-transition-colors wu-cursor-pointer wu-border-b wu-bg-white wu-border-gray-subtle wu-h-8","focus:wu-outline-none focus-visible:wu-border-blue-p/80 wu-rounded-t-sm","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10 disabled:wu-opacity-50","hover:wu-bg-gray-10 hover:wu-border-blue-p",r==="outlined"&&"wu-border wu-border-gray-subtle","wu-group/wuSelect wu-select-trigger",f.className),children:[i??C(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]/wuSelect:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},Du=({option:e,value:t,multiple:n=!1,onSelect:s,accessorKey:r,dir:o="ltr"})=>{const[i,u]=h.useState(n?[]:"");h.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[r.value])):JSON.stringify(t[r.value]))},[t,r.value,n]);const l=n?i.includes(JSON.stringify(e[r.value])):i===JSON.stringify(e[r.value]),d=c=>{e.disabled||(s(e),n&&c.preventDefault())};return a.jsxs(In,{onClick:d,disabled:e.disabled,className:p("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item wu-items-start",l&&"wu-bg-gray-10"),dir:o,children:[n&&a.jsx(Fe,{checked:l}),a.jsx(Au,{option:e,accessorKey:r})]})},Au=({option:e,accessorKey:t})=>{const n=String(e[t.label]);return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1 wu-text-xs wu-pl-2",children:[e.icon,n,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wm-lock wu-text-sm wu-text-orange-deep"})]})},ku=e=>{const{option:t,handleSelectAll:n,isCheckedAll:s,isPartialSelected:r,...o}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(In,{onSelect:u=>{u.stopPropagation(),u.preventDefault(),n==null||n()},className:p("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item"),dir:o.dir,children:[a.jsx(Fe,{"data-partial":r,checked:s||r,partial:r}),a.jsx(Au,{option:t,accessorKey:o.accessorKey})]});case"group":return a.jsxs(ao,{dir:o.dir,children:[a.jsx(Ut,{className:"wu-text-xs",children:t.label}),t.options.map((u,l)=>h.createElement(Du,{...o,option:u,key:l}))]});case"divider":return a.jsx(Dn,{className:"wu-mx-4"});default:return a.jsx(Du,{...o,option:t})}},Lm=e=>{let t=0,n=0;const s=[],r=[],o=i=>{i.type==="divider"?t++:i.type==="group"?(n++,i.options.forEach(u=>{o(u)})):(s.push(i),i.disabled||r.push(i))};return e.forEach(i=>{o(i)}),{separators:t,groups:n,enabledOptions:r,totalData:s.length,cleanData:s}},Wm=100,Bm=400,Pu=({data:e,onSelect:t,multiple:n=!1,defaultValue:s,value:r,accessorKey:o,variant:i="flat",dir:u="ltr",placeholder:l,Label:d,virtualizedThreshold:c=Wm,maxHeight:w=Bm,hasGroup:f=!1,Header:m,CustomTrigger:g,selectAll:b,disabled:v,labelPosition:C="top",onScroll:N,maxContentWidth:S,...x})=>{const[T,A]=h.useState(),D=h.useRef(null),[I,k]=h.useState(!1),[F,P]=h.useState(!1),{cleanData:M,enabledOptions:V}=f||b!=null&&b.enable?Lm(e):{cleanData:e,enabledOptions:[]},W=h.useMemo(()=>n&&b!=null&&b.enable&&e.length>0?[{type:"all",[o.label]:b.label||"Select All"},...e]:e,[e,b,n]),_=h.useCallback($=>{const H=$[o.value];if(n)A((pe=[])=>{const de=pe,ge=de.some(X=>X[o.value]===H)?de.filter(X=>X[o.value]!==H):[...de,$];return t==null||t(ge),ge});else{const pe=$;A(pe),t==null||t(pe)}},[n,o.value,t]);h.useEffect(()=>{if(s&&r){console.error("defaultValue and value cannot be used simultaneously");return}!s&&!r&&A(void 0),s!==void 0&&A(s),r!==void 0&&A(r)},[s,r]);const q=W.length>c;h.useEffect(()=>{if(!n)return;const $=b!=null&&b.includeDisabled?(T==null?void 0:T.length)===e.length:(T==null?void 0:T.length)===V.length;k($);const H=(T==null?void 0:T.length)>0&&!$;P(H)},[T,b]);const B=h.useCallback(()=>{const $=I?[]:b!=null&&b.includeDisabled?f?M:e:V;A($),t==null||t($)},[I,n,e,V,t,b]),U=zt(C);return a.jsxs("div",{className:p(U,"wu-flex wu-select-container"),ref:D,dir:u,children:[a.jsxs(so,{children:[a.jsx(Fm,{...x,value:T,multiple:n,variant:i,dir:u,placeholder:l,accessorKey:o,customTriggerChildren:g,id:x.id,disabled:v,selectAll:b,isCheckedAll:I}),a.jsxs(qs,{className:"wu-min-w-[--radix-dropdown-menu-trigger-width] wu-max-w-[calc(100vw-32px)] wu-border-blue-p wu-select-content",role:"listbox",sideOffset:-1,align:"start",id:x.id,style:{maxWidth:S},children:[m,q?a.jsx(Ct,{list:W,containerHeight:w,callback:($,H)=>a.jsx(ku,{option:H,accessorKey:o,multiple:n,onSelect:_,value:T,dir:u,handleSelectAll:B,isCheckedAll:I,isPartialSelected:F}),dir:u}):a.jsx("div",{onScroll:N,style:{maxHeight:w,height:"fit-content",overflow:"auto"},className:"wu-select-list",children:W.map(($,H)=>a.jsx(ku,{option:$,accessorKey:o,multiple:n,onSelect:_,value:T,handleSelectAll:B,isCheckedAll:I,dir:u,isPartialSelected:F},`${H}`))})]})]}),d&&a.jsx(Te,{htmlFor:x.id,className:"wu-select-label",children:d})]})},Xn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],qm=({value:e,onChange:t,min:n=Y.sub(new Date,{years:5}),max:s=Y.add(new Date,{years:1}),placeholder:r="Select a month",Label:o,labelPosition:i="top",disabled:u,id:l,readonly:d,disabledMonths:c=[],...w})=>{const[f,m]=h.useState(null),[g,b]=h.useState(""),[v,C]=h.useState({value:Math.min(new Date().getFullYear(),new Date(s).getFullYear()),label:Math.min(new Date().getFullYear(),new Date(s).getFullYear())}),N=h.useMemo(()=>{const x=new Date(n).getFullYear(),T=new Date(s).getFullYear();return Array.from({length:T-x+1},(A,D)=>({value:T-D,label:T-D}))},[n,s]);h.useEffect(()=>{if(e){const x=new Date(e),T=x.getFullYear(),A=x.getMonth();m({year:T,month:A}),b(`${Xn[A]} ${T}`),C({value:T,label:T})}},[e]);const S=()=>{f&&t&&(t(new Date(f.year,f.month,15)),b(`${Xn[f.month]} ${f.year}`))};return a.jsxs("div",{className:p("wu-flex wu-flex-col wu-items-center",zt(i),i==="top"&&"wu-items-start"),children:[a.jsxs(ze,{children:[a.jsx(Vs,{...w,disabled:u||d,id:l,dir:"ltr",placeholder:r,formattedString:g}),a.jsxs(Oe,{className:"wu-flex wu-flex-col wu-gap-4 wu-p-4 wu-bg-white wu-border-blue-p wu-month-picker-content",align:"start",sideOffset:-1,children:[a.jsx("div",{className:"wu-px-1 wu-mx-auto wu-w-full",children:a.jsx(Pu,{data:N,accessorKey:{value:"value",label:"label"},value:v,onSelect:x=>C(x),multiple:!1,maxHeight:224})}),a.jsx(zm,{year:v==null?void 0:v.value,selectedMonth:f==null?void 0:f.month,selectedYear:f==null?void 0:f.year,onClick:(x,T)=>m({year:T,month:x}),disabledMonths:c}),a.jsx("div",{className:"wu-flex wu-justify-end wu-px-0.5",children:a.jsx(Lt.PopoverClose,{asChild:!0,children:a.jsx(Ce,{onClick:S,children:"Apply"})})})]})]}),o&&a.jsx(Te,{className:"wu-truncate wu-max-w-[120px] wu-min-w-fit wu-select-label",children:o})]})},zm=({year:e,selectedMonth:t,selectedYear:n,onClick:s,disabledMonths:r=[]})=>{const o=new Date,i=o.getFullYear(),u=o.getMonth(),l=h.useMemo(()=>{const d=new Set;return r.forEach(c=>{const w=typeof c=="string"?new Date(c):c;d.add(`${w.getFullYear()}-${w.getMonth()}`)}),d},[r]);return a.jsx("div",{className:"wu-grid wu-grid-cols-3 wu-grid-rows-4 wu-w-fit wu-gap-[1px] wu-bg-[#d9d9d9] wu-border wu-border-[#d9d9d9] wu-month-picker-grid",children:Xn.map((d,c)=>{const w=e===i&&c===u,f=t===c&&n===e;return a.jsx("button",{disabled:l.has(`${e}-${c}`),onClick:()=>s(c,e),className:p("wu-bg-white wu-flex wu-items-center wu-justify-center wu-w-[83px] wu-h-[53px] wu-text-xs wu-transition-colors","hover:wu-bg-gray-25 hover:wu-text-blue-q hover:wu-font-medium","focus:wu-outline-none focus-visible:wu-border focus-visible:wu-border-blue-p/50",w&&"wu-border wu-border-blue-p",f&&"wu-bg-blue-p wu-text-white hover:wu-bg-blue-p/80 hover:wu-text-white wu-font-medium","disabled:wu-bg-gray-20 disabled:wu-text-gray-subtle disabled:hover:wu-bg-gray-20 disabled:hover:wu-text-gray-subtle disabled:hover:wu-font-normal","wu-month-picker-month"),"data-value":`${Xn[c]} ${e}`,"data-month":c,"data-year":e,children:d},d)})})},_u=(e,t,n,s=96)=>{if(e.length===0||s<=0)return[[],[]];const[o,i]=h.useState([]),[u,l]=h.useState([]);return h.useEffect(()=>{const d=()=>{var g,b;const c=((g=t.current)==null?void 0:g.clientWidth)||0,w=((b=n.current)==null?void 0:b.clientWidth)||0,f=c-w,m=Math.floor(f/s);i(e.slice(0,m)),l(e.slice(m))};return d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)}},[e,s]),[o,u]},Vu={wuPrimaryLink:"_wuPrimaryLink_1sy3v_1",wuPrimaryPopoverContent:"_wuPrimaryPopoverContent_1sy3v_8"},$m=e=>{const{Links:t,children:n,className:s,...r}=e,o=h.useMemo(()=>t.map((c,w)=>h.cloneElement(c,{className:p(Vu.wuPrimaryLink,c.props.className,"wu-primary-nav-link"),key:w})),[t]),i=h.useRef(null),u=h.useRef(null),[l,d]=_u(o,i,u);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:p("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-px-2 wu-py-1 wu-bg-white wu-border-b",s),...r,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2",children:[a.jsx("nav",{className:"wu-flex wu-items-center wu-justify-start wu-gap-4 wu-primary-nav-left",children:l}),d.length>0&&a.jsxs(ze,{children:[a.jsx(ut,{className:"wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25","aria-label":"more",children:a.jsx("span",{className:"wm-more-vert"})}),a.jsx(Oe,{className:p(Vu.wuPrimaryPopoverContent,"wu-primary-nav-popover-left"),align:"start",sideOffset:12,children:d})]})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("section",{className:"wu-items-center wu-justify-end wu-hidden wu-gap-4 sm:wu-flex wu-primary-nav-right",ref:u,children:n}),a.jsxs(ze,{children:[a.jsx(ut,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Oe,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-primary-nav-popover-right",align:"end",sideOffset:4,children:n})]})]})]})})},Gr={wuSecondaryLink:"_wuSecondaryLink_1edl1_1",wuSecondaryNav:"_wuSecondaryNav_1edl1_6"},Hm=e=>{const{Links:t,children:n,className:s,...r}=e,o=h.useMemo(()=>t.map((w,f)=>h.cloneElement(w.link,{key:f,className:p(Gr.wuSecondaryLink,w.link.props.className,"wu-secondary-nav-link-container"),children:a.jsxs(a.Fragment,{children:[h.cloneElement(w.imgOrIcon,{className:p("wu-w-5 wu-h-5 wu-flex wu-items-center wu-justify-center wu-text-lg wu-leading-5",w.imgOrIcon.props.className)}),a.jsx("div",{className:"wu-secondary-nav-link",children:w.link.props.children})]})})),[t]),i=h.useRef(null),u=h.useRef(null),l=h.useRef(null),[d,c]=_u(o,i,l);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:p("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-border-y wu-border-gray-25 wu-h-[50px]",s),...r,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("nav",{className:p(Gr.wuSecondaryNav,"wu-flex wu-items-center wu-justify-start wu-w-full wu-h-full wu-secondary-nav-left"),ref:u,children:d}),c.length>0&&a.jsxs(ze,{children:[a.jsx(ut,{className:"wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25","aria-label":"more",children:a.jsx("span",{className:"wm-more-vert"})}),a.jsx(Oe,{className:p(Gr.wuSecondaryNavPopover,"wu-secondary-nav-popover-left"),align:"start",sideOffset:12,children:c})]})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"wu-items-center wu-justify-end wu-hidden sm:wu-flex",ref:l,children:n}),a.jsxs(ze,{children:[a.jsx(ut,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Oe,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-secondary-nav-popover-right",align:"end",sideOffset:12,children:n})]})]})]})})},Ou=h.forwardRef(({totalRows:e,initialPage:t=0,initialPageSize:n=100,onPageChange:s,className:r,disabled:o=!1,...i},u)=>{const[l,d]=h.useState(t),[c,w]=h.useState(n);h.useEffect(()=>{d(t),w(n)},[t,n]);const f=Math.ceil(e/c),m=l*c+1,g=Math.min((l+1)*c,e),b=Array.from({length:f},(N,S)=>S),v=h.useCallback(N=>{N>=0&&N<f&&(d(N),s==null||s(N))},[f,s]),C=224;return a.jsxs("div",{className:p("wu-flex wu-items-center wu-gap-[2px]",r,"wu-pagination"),...i,role:"navigation",children:[a.jsx(Fu,{label:"Previous page",onClick:()=>v(l-1),disabled:l===0||o,icon:"wm-arrow-back-ios-new",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-prev-btn"}),a.jsx(zr,{name:`${m} - ${g}`,className:"wu-w-[96px] wu-min-w-[96px] wu-pagination-menu",align:"end",disabled:o,children:a.jsx(Vt,{style:{maxHeight:C+"px"},dir:i.dir,children:b.length>100?a.jsx(Ct,{className:"wu-pagination-list",containerHeight:C,list:b,callback:(N,S)=>a.jsxs(Kn,{onSelect:()=>v(S),className:p("wu-py-2",S===l&&"wu-bg-gray-20","wu-pagination-item"),children:[S*c+1," -"," ",Math.min((S+1)*c,e)]},N)}):b.map(N=>a.jsxs(Kn,{onSelect:()=>v(N),className:p(N===l&&"wu-bg-gray-20","wu-py-2 hover:wu-bg-gray-20","wu-pagination-item"),children:[N*c+1," -"," ",Math.min((N+1)*c,e)]},N))})}),a.jsx(Fu,{label:"Next page",onClick:()=>v(l+1),disabled:l===f-1||o,icon:"wm-arrow-forward-ios",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-next-btn"})]})});Ou.displayName="WuPagination";const Fu=({label:e,onClick:t,disabled:n,icon:s,className:r})=>a.jsx(Ce,{variant:"iconOnly",onClick:t,disabled:n,className:p("wu-w-8 wu-h-8 wu-rounded-xs wu-group disabled:wu-text-zinc-300 disabled:wu-bg-white wu-text-gray-lead focus:wu-bg-color-none",r),"aria-label":e,children:a.jsx("span",{className:p("wu-text-sm",s)})}),Lu=y.forwardRef(({className:e,...t},n)=>a.jsx(qt.Root,{className:p("wu-grid wu-gap-2",e),...t,ref:n}));Lu.displayName=qt.Root.displayName;const Wu=y.forwardRef(({className:e,...t},n)=>a.jsx(qt.Item,{ref:n,className:p("wu-group wu-aspect-square wu-h-4 wu-w-4 wu-rounded-full wu-border wu-border-gray-subtle wu-text-blue-p wu-ring-offset-white disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-border-blue-p hover:wu-bg-gray-20 data-[state=checked]:wu-border-blue-p hover:data-[state=checked]:wu-border-blue-q hover:data-[state=checked]:wu-bg-inherit focus:wu-outline-2 focus:wu-outline-offset-4 focus:wu-outline-blue-soft disabled:hover:wu-border-gray-subtle disabled:wu-hover:bg-gray-20 disabled:wu-bg-gray-20",e),...t,children:a.jsx(qt.Indicator,{className:"wu-flex wu-items-center wu-justify-center",children:a.jsx("div",{className:"wu-w-2 wu-h-2 wu-rounded-full wu-bg-blue-p group-hover:group-data-[state=checked]:wu-bg-blue-q"})})}));Wu.displayName=qt.Item.displayName;const Bu=h.forwardRef((e,t)=>{const{options:n,defaultValue:s,onChange:r,label:o,dir:i,...u}=e;return a.jsxs(Lu,{defaultValue:s,required:u.required,disabled:u.disabled,onValueChange:r,id:u.id,dir:i,name:u.name,className:p("w-fit",u.className),ref:t,style:u.style,children:[a.jsx(Tn,{htmlFor:u.id,className:"wu-text-sm wu-font-normal wu-text-gray-lead wu-leading-6 wu-radio-group-label",children:o}),n.map(l=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-radio-item-container",children:[a.jsx(Wu,{value:l.value,id:l.value,disabled:l.disabled,required:l.required,"aria-label":l.value,className:"wu-peer wu-radio-item"}),a.jsx(Tn,{htmlFor:l.value,className:p(l.required&&"after:wu-content-['*'] after:wu-mx-[2px] after:wu-text-rose-500","wu-radio-item-label"),children:l.label})]},l.value))]})});Bu.displayName="WuRadioGroup";const Um=e=>{const{children:t,...n}=e;return a.jsxs(Vt,{...n,role:"complementary","aria-label":"ScrollArea",children:[t,a.jsx(qr,{orientation:"horizontal"})]})},qu=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...s},r)=>a.jsx(ka.Root,{ref:r,decorative:n,orientation:t,className:p("wu-shrink-0 wu-bg-gray-40",t==="horizontal"?"wu-h-[1px] wu-w-full":"wu-h-full wu-w-[1px]",e),...s}));qu.displayName=ka.Root.displayName;function zu({className:e,...t}){return a.jsx("div",{className:p("animate-pulse rounded-md bg-muted",e),...t})}const Kr=768;function Yr(){const[e,t]=y.useState(void 0);return y.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Kr-1}px)`),s=()=>{t(window.innerWidth<Kr)};return n.addEventListener("change",s),t(window.innerWidth<Kr),()=>n.removeEventListener("change",s)},[]),!!e}const jm="sidebar_state",Gm=3600*24*7,Km="256px",Ym="256px",Xm="3rem",Zm="b",$u=y.createContext(null);function et(){const e=y.useContext($u);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Hu=y.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:s,style:r,children:o,...i},u)=>{const l=Yr(),[d,c]=y.useState(!1),[w,f]=y.useState(l?!0:e),m=t??w,g=y.useCallback(N=>{const S=typeof N=="function"?N(m):N;n?n(S):f(S),document.cookie=`${jm}=${S}; path=/; max-age=${Gm}`},[n,m]),b=y.useCallback(()=>l?c(N=>!N):g(N=>!N),[l,g,c]);y.useEffect(()=>{const N=S=>{S.key===Zm&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),b())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[b]);const v=m?"expanded":"collapsed",C=y.useMemo(()=>({state:v,open:m,setOpen:g,isMobile:l,openMobile:d,setOpenMobile:c,toggleSidebar:b}),[v,m,g,l,d,c,b]);return a.jsx($u.Provider,{value:C,children:a.jsx($a,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":Km,"--sidebar-width-icon":Xm,...r},className:p("wu-group/sidebar-wrapper wu-flex wu-min-h-[calc(100svh-48px)] wu-w-full",s),ref:u,...i,children:o})})})});Hu.displayName="SidebarProvider";const Uu=y.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:s,children:r,...o},i)=>{const{isMobile:u,state:l,openMobile:d,setOpenMobile:c}=et();return n==="none"?a.jsx("div",{className:p("wu-flex wu-h-full wu-w-[--sidebar-width] wu-flex-col",s),ref:i,...o,children:r}):u?a.jsx(fo,{open:d,onOpenChange:c,...o,children:a.jsx(zs,{"data-sidebar":"sidebar","data-mobile":"true",className:"wu-w-[--sidebar-width] wu-bg-blue-sidebar wu-p-0 [&>button]:wu-hidden",style:{"--sidebar-width":Ym},side:e,children:a.jsx("div",{className:"wu-flex wu-flex-col wu-w-full wu-h-full",children:r})})}):a.jsxs("div",{ref:i,className:"wu-hidden wu-group wu-peer md:wu-block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[a.jsx("div",{className:p("wu-relative wu-w-[--sidebar-width] wu-bg-transparent wu-transition-[width] wu-duration-150 wu-ease-linear","group-data-[collapsible=offcanvas]:wu-w-0","group-data-[side=right]:wu-rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon]")}),a.jsx("div",{className:p("wu-fixed wu-inset-y-0 wu-z-20 wu-hidden wu-h-svh wu-w-[--sidebar-width] wu-transition-[left,right,width] wu-duration-150 wu-ease-linear md:wu-flex",e==="left"?"wu-left-0 group-data-[collapsible=offcanvas]:wu-left-[calc(var(--sidebar-width)*-1)]":"wu-right-0 group-data-[collapsible=offcanvas]:wu-right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"wu-p-2 group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon] group-data-[side=left]:wu-border-r group-data-[side=right]:wu-border-l",s),...o,children:a.jsx("div",{"data-sidebar":"sidebar",className:"wu-flex wu-h-full wu-w-full wu-flex-col wu-bg-[#eef3fb] group-data-[variant=floating]:wu-rounded-lg group-data-[variant=floating]:wu-border group-data-[variant=floating]:wu-border-sidebar-border group-data-[variant=floating]:wu-shadow",children:r})})]})});Uu.displayName="Sidebar";const ju=y.forwardRef(({className:e,onClick:t,children:n,...s},r)=>{const{toggleSidebar:o}=et();return a.jsxs(vt,{ref:r,"data-sidebar":"trigger",variant:"secondary",className:p("wu-h-8 wu-w-8 wu-min-w-0 wu-p-0 wu-text-2xl wu-font-light hover:wu-bg-blue-sidebarHover wu-text-blue-q",e),onClick:i=>{t==null||t(i),o()},...s,children:[n,a.jsx("span",{className:"wu-sr-only",children:"Toggle Sidebar"})]})});ju.displayName="SidebarTrigger";const Jm=y.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:s}=et();return a.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:s,title:"Toggle Sidebar",className:p("wu-absolute wu-inset-y-0 wu-z-20 wu-hidden wu-w-4 wu-translate-x-1/2 wu-transition-all wu-ease-linear after:wu-absolute after:wu-inset-y-0 after:wu-left-1/2 after:wu-w-[2px] group-data-[side=left]:wu-right-4 group-data-[side=right]:wu-left-0 sm:wu-flex","[[data-side=left]_&]:wu-cursor-w-resize [[data-side=right]_&]:wu-cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:wu-cursor-e-resize [[data-side=right][data-state=collapsed]_&]:wu-cursor-w-resize","group-data-[collapsible=offcanvas]:wu-translate-x-0 group-data-[collapsible=offcanvas]:after:wu-left-full","[[data-side=left][data-collapsible=offcanvas]_&]:wu-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:wu-left-2",e),...t})});Jm.displayName="SidebarRail";const Gu=y.forwardRef(({className:e,...t},n)=>a.jsx("main",{ref:n,className:p("wu-relative wu-flex wu-w-full wu-flex-1 wu-flex-col","md:peer-data-[variant=inset]:wu-m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:wu-ml-2 md:peer-data-[variant=inset]:wu-ml-0 md:peer-data-[variant=inset]:wu-rounded-xl md:peer-data-[variant=inset]:wu-shadow",e),...t}));Gu.displayName="SidebarInset";const Qm=y.forwardRef(({className:e,...t},n)=>a.jsx(ks,{ref:n,"data-sidebar":"input",className:p("wu-h-8 wu-w-full wu-shadow-none focus-visible:wu-ring-2",e),...t}));Qm.displayName="SidebarInput";const Ku=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"header",className:p("wu-flex wu-flex-col wu-gap-2 wu-p-2",e),...t}));Ku.displayName="SidebarHeader";const Yu=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"footer",className:p("wu-flex wu-flex-col wu-gap-2 wu-pb-2",e),...t}));Yu.displayName="SidebarFooter";const Rm=y.forwardRef(({className:e,...t},n)=>a.jsx(qu,{ref:n,"data-sidebar":"separator",className:p("wu-mx-2 wu-w-auto",e),...t}));Rm.displayName="SidebarSeparator";const Xu=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"content",className:p("wu-flex wu-min-h-0 wu-flex-1 wu-flex-col wu-gap-2 wu-overflow-auto group-data-[collapsible=icon]:wu-overflow-hidden",e),...t}));Xu.displayName="SidebarContent";const Zu=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group",className:p("wu-relative wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-p-2",e),...t}));Zu.displayName="SidebarGroup";const Ju=y.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const r=t?yt.Slot:"div";return a.jsx(r,{ref:s,"data-sidebar":"group-label",className:p("wu-flex wu-h-8 wu-shrink-0 wu-items-center wu-rounded-md wu-px-2 wu-text-xs wu-font-medium wu-outline-none wu-transition-[margin,opacity] wu-duration-150 wu-ease-linear focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","group-data-[collapsible=icon]:wu-opacity-0",e),...n})});Ju.displayName="SidebarGroupLabel";const eg=y.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const r=t?yt.Slot:"button";return a.jsx(r,{ref:s,"data-sidebar":"group-action",className:p("wu-absolute wu-right-3 wu-top-3.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","after:wu-absolute after:wu-inset-2 after:md:wu-hidden","group-data-[collapsible=icon]:wu-hidden",e),...n})});eg.displayName="SidebarGroupAction";const Qu=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group-content",className:p("wu-w-full wu-text-sm",e),...t}));Qu.displayName="SidebarGroupContent";const Xr=y.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu",className:p("wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-gap-1",e),...t}));Xr.displayName="SidebarMenu";const Ru=y.forwardRef(({className:e,...t},n)=>a.jsx("li",{ref:n,"data-sidebar":"menu-item",className:p("wu-group/menu-item wu-relative",e),...t}));Ru.displayName="SidebarMenuItem";const tg=_e.cva("wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-p-2 wu-text-left wu-text-sm wu-outline-none wu-transition-[width,height,padding] focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:wu-pr-8 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 data-[active=true]:wu-font-medium group-data-[collapsible=icon]:!wu-size-8 group-data-[collapsible=icon]:!wu-p-2 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0",{variants:{variant:{default:"",outline:""},size:{default:"wu-h-8 wu-text-sm",sm:"wu-h-7 wu-text-xs",lg:"wu-h-12 wu-text-sm group-data-[collapsible=icon]:!wu-p-0"}},defaultVariants:{variant:"default",size:"default"}}),el=y.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:s="default",tooltip:r,className:o,...i},u)=>{const l=e?yt.Slot:"button",{isMobile:d,state:c}=et(),w=a.jsx(l,{ref:u,"data-sidebar":"menu-button","data-size":s,"data-active":t,className:p(tg({variant:n,size:s}),o),...i});return r?(typeof r=="string"&&(r={children:r}),a.jsxs(Ha,{children:[a.jsx(Ua,{asChild:!0,children:w}),a.jsx(Ps,{side:"right",align:"center",hidden:c!=="collapsed"||d,...r})]})):w});el.displayName="SidebarMenuButton";const ng=y.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...s},r)=>{const o=t?yt.Slot:"button";return a.jsx(o,{ref:r,"data-sidebar":"menu-action",className:p("wu-absolute wu-right-1 wu-top-1.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","after:wu-absolute after:wu-inset-2 after:md:wu-hidden","peer-data-[size=sm]/menu-button:wu-top-1","peer-data-[size=default]/menu-button:wu-top-1.5","peer-data-[size=lg]/menu-button:wu-top-2.5","group-data-[collapsible=icon]:wu-hidden",n&&"group-focus-within/menu-item:wu-opacity-100 group-hover/menu-item:wu-opacity-100 data-[state=open]:wu-opacity-100 md:wu-opacity-0",e),...s})});ng.displayName="SidebarMenuAction";const sg=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:p("wu-pointer-events-none wu-absolute wu-right-1 wu-flex wu-h-5 wu-min-w-5 wu-select-none wu-items-center wu-justify-center wu-rounded-md wu-px-1 wu-text-xs wu-font-medium wu-tabular-nums","","peer-data-[size=sm]/menu-button:wu-top-1","peer-data-[size=default]/menu-button:wu-top-1.5","peer-data-[size=lg]/menu-button:wu-top-2.5","group-data-[collapsible=icon]:wu-hidden",e),...t}));sg.displayName="SidebarMenuBadge";const rg=y.forwardRef(({className:e,showIcon:t=!1,...n},s)=>{const r=y.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.jsxs("div",{ref:s,"data-sidebar":"menu-skeleton",className:p("wu-flex wu-h-8 wu-items-center wu-gap-2 wu-rounded-md wu-px-2",e),...n,children:[t&&a.jsx(zu,{className:"wu-rounded-md wu-size-4","data-sidebar":"menu-skeleton-icon"}),a.jsx(zu,{className:"wu-h-4 wu-max-w-[--skeleton-width] wu-flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});rg.displayName="SidebarMenuSkeleton";const ag=y.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:p("wu-mx-3.5 wu-flex wu-min-w-0 wu-translate-x-px wu-flex-col wu-gap-1 wu-border-l wu-px-2.5 wu-py-0.5","group-data-[collapsible=icon]:wu-hidden",e),...t}));ag.displayName="SidebarMenuSub";const og=y.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e}));og.displayName="SidebarMenuSubItem";const ig=y.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:s,...r},o)=>{const i=e?yt.Slot:"a";return a.jsx(i,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:p("wu-flex wu-h-7 wu-min-w-0 wu-translate-x-px wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-px-2 wu-outline-none focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","data-[active=true]:wu-bg-sidebar-accent data-[active=true]:wu-text-sidebar-accent-foreground",t==="sm"&&"wu-text-xs",t==="md"&&"wu-text-sm","group-data-[collapsible=icon]:wu-hidden",s),...r})});ig.displayName="SidebarMenuSubButton";const tl={};function tt(e,t){const n=y.useRef(tl);return n.current===tl&&(n.current=e(t)),n}const Zr=y[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],ug=Zr&&Zr!==y.useLayoutEffect?Zr:e=>e();function he(e){const t=tt(lg).current;return t.next=e,ug(t.effect),t.trampoline}function lg(){const e={next:void 0,callback:cg,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function cg(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}function tn(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(s=>n.searchParams.append("args[]",s)),`Base UI error #${e}; visit ${n} for the full message.`}function Zn(e,t,n,s){const r=tt(nl).current;return wg(r,e,t,n,s)&&sl(r,[e,t,n,s]),r.callback}function dg(e){const t=tt(nl).current;return fg(t,e)&&sl(t,e),t.callback}function nl(){return{callback:null,cleanup:null,refs:[]}}function wg(e,t,n,s,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==s||e.refs[3]!==r}function fg(e,t){return e.refs.length!==t.length||e.refs.some((n,s)=>n!==t[s])}function sl(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const s=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const o=t[r];if(o!=null)switch(typeof o){case"function":{const i=o(n);typeof i=="function"&&(s[r]=i);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const o=t[r];if(o!=null)switch(typeof o){case"function":{const i=s[r];typeof i=="function"?i():o(null);break}case"object":{o.current=null;break}}}}}}}const pg=parseInt(y.version,10);function hg(e){return pg>=e}function rl(e){if(!y.isValidElement(e))return null;const t=e,n=t.props;return(hg(19)?n==null?void 0:n.ref:t.ref)??null}function Jr(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function mg(e,t){const n={};for(const s in e){const r=e[s];if(t!=null&&t.hasOwnProperty(s)){const o=t[s](r);o!=null&&Object.assign(n,o);continue}r===!0?n[`data-${s.toLowerCase()}`]="":r&&(n[`data-${s.toLowerCase()}`]=r.toString())}return n}function gg(e,t){return typeof e=="function"?e(t):e}function bg(e,t){return typeof e=="function"?e(t):e}const nn={};function al(e,t,n,s,r){let o={...Qr(e,nn)};return t&&(o=Jn(o,t)),n&&(o=Jn(o,n)),s&&(o=Jn(o,s)),o}function yg(e){if(e.length===0)return nn;if(e.length===1)return Qr(e[0],nn);let t={...Qr(e[0],nn)};for(let n=1;n<e.length;n+=1)t=Jn(t,e[n]);return t}function Jn(e,t){return ol(t)?t(e):xg(e,t)}function xg(e,t){if(!t)return e;for(const n in t){const s=t[n];switch(n){case"style":{e[n]=Jr(e.style,s);break}case"className":{e[n]=il(e.className,s);break}default:vg(n,s)?e[n]=Ng(e[n],s):e[n]=s}}return e}function vg(e,t){const n=e.charCodeAt(0),s=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&s===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function ol(e){return typeof e=="function"}function Qr(e,t){return ol(e)?e(t):e??nn}function Ng(e,t){return t?e?n=>{if(Sg(n)){const r=n;Rr(r);const o=t(r);return r.baseUIHandlerPrevented||e==null||e(r),o}const s=t(n);return e==null||e(n),s}:t:e}function Rr(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function il(e,t){return t?e?t+" "+e:t:e}function Sg(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Me(){}const He=Object.freeze({});function nt(e,t,n={}){const s=t.render,r=Cg(t,n);if(n.enabled===!1)return null;const o=n.state??He;return Eg(e,s,r,o)}function Cg(e,t={}){const{className:n,style:s,render:r}=e,{state:o=He,ref:i,props:u,stateAttributesMapping:l,enabled:d=!0}=t,c=d?gg(n,o):void 0,w=d?bg(s,o):void 0,f=d?mg(o,l):He,m=d?Jr(f,Array.isArray(u)?yg(u):u)??He:He;return typeof document<"u"&&(d?Array.isArray(i)?m.ref=dg([m.ref,rl(r),...i]):m.ref=Zn(m.ref,rl(r),i):Zn(null,null)),d?(c!==void 0&&(m.className=il(m.className,c)),w!==void 0&&(m.style=Jr(m.style,w)),m):He}const Tg=Symbol.for("react.lazy");function Eg(e,t,n,s){if(t){if(typeof t=="function")return t(n,s);const r=al(n,t.props);r.ref=n.ref;let o=t;if((o==null?void 0:o.$$typeof)===Tg&&(o=y.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!y.isValidElement(o))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
15
+ )`;d.style.setProperty("--spotlight-background",S)})};return window.addEventListener("mousemove",f),()=>{window.removeEventListener("mousemove",f),w&&cancelAnimationFrame(w)}}},[t,n,o,i]),a.jsx("div",{ref:l,className:p(Am.gradientBackground,"wu-transform-gpu",r),...u,children:s})},Yn={wuModalBodyWrapper:"_wuModalBodyWrapper_10o33_1","wu-modal-footer":"_wu-modal-footer_10o33_5","wu-modal-content":"_wu-modal-content_10o33_5","wu-modal-header":"_wu-modal-header_10o33_9"},Iu="calc(100vh - 64px)",Dm={sm:"400px",md:"600px",lg:"1200px"},km=({Trigger:e,children:t,size:n="md",hideCloseButton:s,preventClickOutside:r,onOpenChange:o,open:i,dir:u,maxWidth:l,maxHeight:d,className:c,style:w,variant:f="action",...m})=>{const g={action:["#EEF3FBcc 32%","#1D50F4cc"],upgrade:["#FDEDCCcc 32%","#FF9F00cc"],critical:["#FFB6B6cc 32%","#CC0000cc"]};return a.jsxs(Su,{modal:!0,onOpenChange:o,open:i,children:[e&&a.jsx(Cu,{asChild:!0,children:e}),a.jsx(Hr,{style:{width:"calc(100% - 64px)",maxWidth:l||Dm[n],maxHeight:d||Iu,...w},hideCloseButton:s,onInteractOutside:b=>r&&b.preventDefault(),dir:u,"aria-describedby":void 0,"data-variant":f,className:p("wu-group wu-rounded-[1.1rem]",Yn.wuModalBodyWrapper,c),...m,children:a.jsx(Mu,{colors:g[f],strokeWidth:4,className:p("wu-rounded-[1.1rem] wu-transform-gpu wu-flex wu-flex-col",c),style:{maxHeight:d||Iu},children:t})})]})},Pm=({children:e,className:t,...n})=>a.jsx("div",{className:p("wu-flex wu-flex-col wu-gap-4 wu-p-4 rtl:wu-text-right wu-overflow-auto wu-bg-white","wu-p-8 wu-text-gray-lead",Yn["wu-modal-content"],t),...n,children:e}),_m=({children:e,className:t,...n})=>a.jsx(Ur,{...n,"data-variant":"action",className:p("wu-text-lg wu-text-gray-lead wu-font-medium","wu-rounded-t-xl wu-px-4","group-data-[variant=action]:wu-bg-blue-sidebar group-data-[variant=action]:wu-text-blue-q","group-data-[variant=critical]:wu-bg-[#F9E0E0] group-data-[variant=critical]:wu-text-red-deep","group-data-[variant=upgrade]:wu-bg-[#FEF1D9] group-data-[variant=upgrade]:wu-text-yellow-deep",Yn["wu-modal-header"],t),children:a.jsx(jr,{className:"wu-font-normal wu-justify-start wu-text-2xl wu-h-14",children:e})}),Vm=({children:e,className:t,...n})=>a.jsx(Eu,{...n,className:p("wu-border-t wu-border-gray-40 wu-bg-white wu-min-h-16 wu-mx-4 wu-px-0","wu-mx-0 wu-rounded-b-xl wu-min-h-16 wu-p-4","group-data-[variant=upgrade]:wu-border-[#EED6A8]","group-data-[variant=action]:wu-border-[#BAC9F8]","group-data-[variant=critical]:wu-border-[#F0B3B3]",Yn["wu-modal-footer"],t),children:e}),Om=({children:e,className:t,...n})=>{const s=h.useRef(null);return a.jsx(Mm,{asChild:!0,children:a.jsx(Ce,{className:t,ref:s,...n,children:e})})},Fm=({placeholder:e="Select...",value:t,multiple:n=!1,accessorKey:s,variant:r="flat",dir:o="ltr",customTriggerChildren:i,id:u,disabled:l,selectAll:d,isCheckedAll:c,width:w,...f})=>{const[m,g]=h.useState(""),[b,x]=h.useState(e);h.useEffect(()=>{if(!t||Array.isArray(t)&&t.length===0){x(e),g("");return}const v=s.label;if(n&&Array.isArray(t)){const T=t.map(N=>N[v]).join(", ");g(T)}else!n&&!Array.isArray(t)&&g(t[v])},[t,s.label,n,e]);const S=()=>e&&!m?a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:b}):a.jsx("span",{className:p("wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap"),style:{width:`${(w||0)-32}px`},children:c?(d==null?void 0:d.triggerText)??m:m});return a.jsx(ro,{asChild:!0,dir:o,id:u,disabled:l,children:a.jsxs("button",{...f,disabled:l,className:p("wu-flex wu-gap-2 wu-w-full wu-items-center wu-justify-between wu-py-1.5 wu-px-2 wu-text-xs wu-transition-colors wu-cursor-pointer wu-border-b wu-bg-white wu-border-gray-subtle wu-h-8","focus:wu-outline-none focus-visible:wu-border-blue-p/80 wu-rounded-t-sm","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10 disabled:wu-opacity-50","hover:wu-bg-gray-10 hover:wu-border-blue-p",r==="outlined"&&"wu-border wu-border-gray-subtle","wu-group/wuSelect wu-select-trigger",f.className),children:[i??S(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]/wuSelect:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},Au=({option:e,value:t,multiple:n=!1,onSelect:s,accessorKey:r,dir:o="ltr"})=>{const[i,u]=h.useState(n?[]:"");h.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[r.value])):JSON.stringify(t[r.value]))},[t,r.value,n]);const l=n?i.includes(JSON.stringify(e[r.value])):i===JSON.stringify(e[r.value]),d=c=>{e.disabled||(s(e),n&&c.preventDefault())};return a.jsxs(In,{onClick:d,disabled:e.disabled,className:p("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item wu-items-start",l&&"wu-bg-gray-10"),dir:o,children:[n&&a.jsx(Fe,{checked:l}),a.jsx(Du,{option:e,accessorKey:r})]})},Du=({option:e,accessorKey:t})=>{const n=String(e[t.label]);return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1 wu-text-xs wu-pl-2",children:[e.icon,n,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wm-lock wu-text-sm wu-text-orange-deep"})]})},ku=e=>{const{option:t,handleSelectAll:n,isCheckedAll:s,isPartialSelected:r,...o}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(In,{onSelect:u=>{u.stopPropagation(),u.preventDefault(),n==null||n()},className:p("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item"),dir:o.dir,children:[a.jsx(Fe,{"data-partial":r,checked:s||r,partial:r}),a.jsx(Du,{option:t,accessorKey:o.accessorKey})]});case"group":return a.jsxs(ao,{dir:o.dir,children:[a.jsx(Ut,{className:"wu-text-xs",children:t.label}),t.options.map((u,l)=>h.createElement(Au,{...o,option:u,key:l}))]});case"divider":return a.jsx(An,{className:"wu-mx-4"});default:return a.jsx(Au,{...o,option:t})}},Lm=e=>{let t=0,n=0;const s=[],r=[],o=i=>{i.type==="divider"?t++:i.type==="group"?(n++,i.options.forEach(u=>{o(u)})):(s.push(i),i.disabled||r.push(i))};return e.forEach(i=>{o(i)}),{separators:t,groups:n,enabledOptions:r,totalData:s.length,cleanData:s}},Wm=100,Bm=400,Pu=({data:e,onSelect:t,multiple:n=!1,defaultValue:s,value:r,accessorKey:o,variant:i="flat",dir:u="ltr",placeholder:l,Label:d,virtualizedThreshold:c=Wm,maxHeight:w=Bm,hasGroup:f=!1,Header:m,CustomTrigger:g,selectAll:b,disabled:x,labelPosition:S="top",onScroll:v,maxContentWidth:T,...N})=>{const[C,D]=h.useState(),M=h.useRef(null),[I,k]=h.useState(!1),[F,P]=h.useState(!1),{cleanData:A,enabledOptions:V}=f||b!=null&&b.enable?Lm(e):{cleanData:e,enabledOptions:[]},W=h.useMemo(()=>n&&b!=null&&b.enable&&e.length>0?[{type:"all",[o.label]:b.label||"Select All"},...e]:e,[e,b,n]),_=h.useCallback($=>{const H=$[o.value];if(n)D((pe=[])=>{const de=pe,ge=de.some(X=>X[o.value]===H)?de.filter(X=>X[o.value]!==H):[...de,$];return t==null||t(ge),ge});else{const pe=$;D(pe),t==null||t(pe)}},[n,o.value,t]);h.useEffect(()=>{if(s&&r){console.error("defaultValue and value cannot be used simultaneously");return}!s&&!r&&D(void 0),s!==void 0&&D(s),r!==void 0&&D(r)},[s,r]);const q=W.length>c;h.useEffect(()=>{if(!n)return;const $=b!=null&&b.includeDisabled?(C==null?void 0:C.length)===e.length:(C==null?void 0:C.length)===V.length;k($);const H=(C==null?void 0:C.length)>0&&!$;P(H)},[C,b]);const B=h.useCallback(()=>{const $=I?[]:b!=null&&b.includeDisabled?f?A:e:V;D($),t==null||t($)},[I,n,e,V,t,b]),U=zt(S);return a.jsxs("div",{className:p(U,"wu-flex wu-select-container"),ref:M,dir:u,children:[a.jsxs(so,{children:[a.jsx(Fm,{...N,value:C,multiple:n,variant:i,dir:u,placeholder:l,accessorKey:o,customTriggerChildren:g,id:N.id,disabled:x,selectAll:b,isCheckedAll:I}),a.jsxs(qs,{className:"wu-min-w-[--radix-dropdown-menu-trigger-width] wu-max-w-[calc(100vw-32px)] wu-border-blue-p wu-select-content",role:"listbox",sideOffset:-1,align:"start",id:N.id,style:{maxWidth:T},children:[m,q?a.jsx(Ct,{list:W,containerHeight:w,callback:($,H)=>a.jsx(ku,{option:H,accessorKey:o,multiple:n,onSelect:_,value:C,dir:u,handleSelectAll:B,isCheckedAll:I,isPartialSelected:F}),dir:u}):a.jsx("div",{onScroll:v,style:{maxHeight:w,height:"fit-content",overflow:"auto"},className:"wu-select-list",children:W.map(($,H)=>a.jsx(ku,{option:$,accessorKey:o,multiple:n,onSelect:_,value:C,handleSelectAll:B,isCheckedAll:I,dir:u,isPartialSelected:F},`${H}`))})]})]}),d&&a.jsx(Te,{htmlFor:N.id,className:"wu-select-label",children:d})]})},Xn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],qm=({value:e,onChange:t,min:n=Y.sub(new Date,{years:5}),max:s=Y.add(new Date,{years:1}),placeholder:r="Select a month",Label:o,labelPosition:i="top",disabled:u,id:l,readonly:d,disabledMonths:c=[],...w})=>{const[f,m]=h.useState(null),[g,b]=h.useState(""),[x,S]=h.useState({value:Math.min(new Date().getFullYear(),new Date(s).getFullYear()),label:Math.min(new Date().getFullYear(),new Date(s).getFullYear())}),v=h.useMemo(()=>{const N=new Date(n).getFullYear(),C=new Date(s).getFullYear();return Array.from({length:C-N+1},(D,M)=>({value:C-M,label:C-M}))},[n,s]);h.useEffect(()=>{if(e){const N=new Date(e),C=N.getFullYear(),D=N.getMonth();m({year:C,month:D}),b(`${Xn[D]} ${C}`),S({value:C,label:C})}},[e]);const T=()=>{f&&t&&(t(new Date(f.year,f.month,15)),b(`${Xn[f.month]} ${f.year}`))};return a.jsxs("div",{className:p("wu-flex wu-flex-col wu-items-center",zt(i),i==="top"&&"wu-items-start"),children:[a.jsxs(ze,{children:[a.jsx(Vs,{...w,disabled:u||d,id:l,dir:"ltr",placeholder:r,formattedString:g}),a.jsxs(Oe,{className:"wu-flex wu-flex-col wu-gap-4 wu-p-4 wu-bg-white wu-border-blue-p wu-month-picker-content",align:"start",sideOffset:-1,children:[a.jsx("div",{className:"wu-px-1 wu-mx-auto wu-w-full",children:a.jsx(Pu,{data:v,accessorKey:{value:"value",label:"label"},value:x,onSelect:N=>S(N),multiple:!1,maxHeight:224})}),a.jsx(zm,{year:x==null?void 0:x.value,selectedMonth:f==null?void 0:f.month,selectedYear:f==null?void 0:f.year,onClick:(N,C)=>m({year:C,month:N}),disabledMonths:c}),a.jsx("div",{className:"wu-flex wu-justify-end wu-px-0.5",children:a.jsx(Lt.PopoverClose,{asChild:!0,children:a.jsx(Ce,{onClick:T,children:"Apply"})})})]})]}),o&&a.jsx(Te,{className:"wu-truncate wu-max-w-[120px] wu-min-w-fit wu-select-label",children:o})]})},zm=({year:e,selectedMonth:t,selectedYear:n,onClick:s,disabledMonths:r=[]})=>{const o=new Date,i=o.getFullYear(),u=o.getMonth(),l=h.useMemo(()=>{const d=new Set;return r.forEach(c=>{const w=typeof c=="string"?new Date(c):c;d.add(`${w.getFullYear()}-${w.getMonth()}`)}),d},[r]);return a.jsx("div",{className:"wu-grid wu-grid-cols-3 wu-grid-rows-4 wu-w-fit wu-gap-[1px] wu-bg-[#d9d9d9] wu-border wu-border-[#d9d9d9] wu-month-picker-grid",children:Xn.map((d,c)=>{const w=e===i&&c===u,f=t===c&&n===e;return a.jsx("button",{disabled:l.has(`${e}-${c}`),onClick:()=>s(c,e),className:p("wu-bg-white wu-flex wu-items-center wu-justify-center wu-w-[83px] wu-h-[53px] wu-text-xs wu-transition-colors","hover:wu-bg-gray-25 hover:wu-text-blue-q hover:wu-font-medium","focus:wu-outline-none focus-visible:wu-border focus-visible:wu-border-blue-p/50",w&&"wu-border wu-border-blue-p",f&&"wu-bg-blue-p wu-text-white hover:wu-bg-blue-p/80 hover:wu-text-white wu-font-medium","disabled:wu-bg-gray-20 disabled:wu-text-gray-subtle disabled:hover:wu-bg-gray-20 disabled:hover:wu-text-gray-subtle disabled:hover:wu-font-normal","wu-month-picker-month"),"data-value":`${Xn[c]} ${e}`,"data-month":c,"data-year":e,children:d},d)})})},_u=(e,t,n,s=96)=>{if(e.length===0||s<=0)return[[],[]];const[o,i]=h.useState([]),[u,l]=h.useState([]);return h.useEffect(()=>{const d=()=>{var g,b;const c=((g=t.current)==null?void 0:g.clientWidth)||0,w=((b=n.current)==null?void 0:b.clientWidth)||0,f=c-w,m=Math.floor(f/s);i(e.slice(0,m)),l(e.slice(m))};return d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)}},[e,s]),[o,u]},Vu={wuPrimaryLink:"_wuPrimaryLink_1sy3v_1",wuPrimaryPopoverContent:"_wuPrimaryPopoverContent_1sy3v_8"},$m=e=>{const{Links:t,children:n,className:s,...r}=e,o=h.useMemo(()=>t.map((c,w)=>h.cloneElement(c,{className:p(Vu.wuPrimaryLink,c.props.className,"wu-primary-nav-link"),key:w})),[t]),i=h.useRef(null),u=h.useRef(null),[l,d]=_u(o,i,u);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:p("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-px-2 wu-py-1 wu-bg-white wu-border-b",s),...r,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2",children:[a.jsx("nav",{className:"wu-flex wu-items-center wu-justify-start wu-gap-4 wu-primary-nav-left",children:l}),d.length>0&&a.jsxs(ze,{children:[a.jsx(lt,{className:"wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25","aria-label":"more",children:a.jsx("span",{className:"wm-more-vert"})}),a.jsx(Oe,{className:p(Vu.wuPrimaryPopoverContent,"wu-primary-nav-popover-left"),align:"start",sideOffset:12,children:d})]})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("section",{className:"wu-items-center wu-justify-end wu-hidden wu-gap-4 sm:wu-flex wu-primary-nav-right",ref:u,children:n}),a.jsxs(ze,{children:[a.jsx(lt,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Oe,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-primary-nav-popover-right",align:"end",sideOffset:4,children:n})]})]})]})})},Gr={wuSecondaryLink:"_wuSecondaryLink_1edl1_1",wuSecondaryNav:"_wuSecondaryNav_1edl1_6"},Hm=e=>{const{Links:t,children:n,className:s,...r}=e,o=h.useMemo(()=>t.map((w,f)=>h.cloneElement(w.link,{key:f,className:p(Gr.wuSecondaryLink,w.link.props.className,"wu-secondary-nav-link-container"),children:a.jsxs(a.Fragment,{children:[h.cloneElement(w.imgOrIcon,{className:p("wu-w-5 wu-h-5 wu-flex wu-items-center wu-justify-center wu-text-lg wu-leading-5",w.imgOrIcon.props.className)}),a.jsx("div",{className:"wu-secondary-nav-link",children:w.link.props.children})]})})),[t]),i=h.useRef(null),u=h.useRef(null),l=h.useRef(null),[d,c]=_u(o,i,l);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:p("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-border-y wu-border-gray-25 wu-h-[50px]",s),...r,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("nav",{className:p(Gr.wuSecondaryNav,"wu-flex wu-items-center wu-justify-start wu-w-full wu-h-full wu-secondary-nav-left"),ref:u,children:d}),c.length>0&&a.jsxs(ze,{children:[a.jsx(lt,{className:"wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25","aria-label":"more",children:a.jsx("span",{className:"wm-more-vert"})}),a.jsx(Oe,{className:p(Gr.wuSecondaryNavPopover,"wu-secondary-nav-popover-left"),align:"start",sideOffset:12,children:c})]})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"wu-items-center wu-justify-end wu-hidden sm:wu-flex",ref:l,children:n}),a.jsxs(ze,{children:[a.jsx(lt,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Oe,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-secondary-nav-popover-right",align:"end",sideOffset:12,children:n})]})]})]})})},Ou=h.forwardRef(({totalRows:e,initialPage:t=0,initialPageSize:n=100,onPageChange:s,className:r,disabled:o=!1,...i},u)=>{const[l,d]=h.useState(t),[c,w]=h.useState(n);h.useEffect(()=>{d(t),w(n)},[t,n]);const f=Math.ceil(e/c),m=l*c+1,g=Math.min((l+1)*c,e),b=Array.from({length:f},(v,T)=>T),x=h.useCallback(v=>{v>=0&&v<f&&(d(v),s==null||s(v))},[f,s]),S=224;return a.jsxs("div",{className:p("wu-flex wu-items-center wu-gap-[2px]",r,"wu-pagination"),...i,role:"navigation",children:[a.jsx(Fu,{label:"Previous page",onClick:()=>x(l-1),disabled:l===0||o,icon:"wm-arrow-back-ios-new",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-prev-btn"}),a.jsx(zr,{name:`${m} - ${g}`,className:"wu-w-[96px] wu-min-w-[96px] wu-pagination-menu",align:"end",disabled:o,children:a.jsx(Vt,{style:{maxHeight:S+"px"},dir:i.dir,children:b.length>100?a.jsx(Ct,{className:"wu-pagination-list",containerHeight:S,list:b,callback:(v,T)=>a.jsxs(Kn,{onSelect:()=>x(T),className:p("wu-py-2",T===l&&"wu-bg-gray-20","wu-pagination-item"),children:[T*c+1," -"," ",Math.min((T+1)*c,e)]},v)}):b.map(v=>a.jsxs(Kn,{onSelect:()=>x(v),className:p(v===l&&"wu-bg-gray-20","wu-py-2 hover:wu-bg-gray-20","wu-pagination-item"),children:[v*c+1," -"," ",Math.min((v+1)*c,e)]},v))})}),a.jsx(Fu,{label:"Next page",onClick:()=>x(l+1),disabled:l===f-1||o,icon:"wm-arrow-forward-ios",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-next-btn"})]})});Ou.displayName="WuPagination";const Fu=({label:e,onClick:t,disabled:n,icon:s,className:r})=>a.jsx(Ce,{variant:"iconOnly",onClick:t,disabled:n,className:p("wu-w-8 wu-h-8 wu-rounded-xs wu-group disabled:wu-text-zinc-300 disabled:wu-bg-white wu-text-gray-lead focus:wu-bg-color-none",r),"aria-label":e,children:a.jsx("span",{className:p("wu-text-sm",s)})}),Lu=y.forwardRef(({className:e,...t},n)=>a.jsx(qt.Root,{className:p("wu-grid wu-gap-2",e),...t,ref:n}));Lu.displayName=qt.Root.displayName;const Wu=y.forwardRef(({className:e,...t},n)=>a.jsx(qt.Item,{ref:n,className:p("wu-group wu-aspect-square wu-h-4 wu-w-4 wu-rounded-full wu-border wu-border-gray-subtle wu-text-blue-p wu-ring-offset-white disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-border-blue-p hover:wu-bg-gray-20 data-[state=checked]:wu-border-blue-p hover:data-[state=checked]:wu-border-blue-q hover:data-[state=checked]:wu-bg-inherit focus:wu-outline-2 focus:wu-outline-offset-4 focus:wu-outline-blue-soft disabled:hover:wu-border-gray-subtle disabled:wu-hover:bg-gray-20 disabled:wu-bg-gray-20",e),...t,children:a.jsx(qt.Indicator,{className:"wu-flex wu-items-center wu-justify-center",children:a.jsx("div",{className:"wu-w-2 wu-h-2 wu-rounded-full wu-bg-blue-p group-hover:group-data-[state=checked]:wu-bg-blue-q"})})}));Wu.displayName=qt.Item.displayName;const Bu=h.forwardRef((e,t)=>{const{options:n,defaultValue:s,onChange:r,label:o,dir:i,...u}=e;return a.jsxs(Lu,{defaultValue:s,required:u.required,disabled:u.disabled,onValueChange:r,id:u.id,dir:i,name:u.name,className:p("w-fit",u.className),ref:t,style:u.style,children:[a.jsx(Tn,{htmlFor:u.id,className:"wu-text-sm wu-font-normal wu-text-gray-lead wu-leading-6 wu-radio-group-label",children:o}),n.map(l=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-radio-item-container",children:[a.jsx(Wu,{value:l.value,id:l.value,disabled:l.disabled,required:l.required,"aria-label":l.value,className:"wu-peer wu-radio-item"}),a.jsx(Tn,{htmlFor:l.value,className:p(l.required&&"after:wu-content-['*'] after:wu-mx-[2px] after:wu-text-rose-500","wu-radio-item-label"),children:l.label})]},l.value))]})});Bu.displayName="WuRadioGroup";const Um=e=>{const{children:t,...n}=e;return a.jsxs(Vt,{...n,role:"complementary","aria-label":"ScrollArea",children:[t,a.jsx(qr,{orientation:"horizontal"})]})},qu=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...s},r)=>a.jsx(ka.Root,{ref:r,decorative:n,orientation:t,className:p("wu-shrink-0 wu-bg-gray-40",t==="horizontal"?"wu-h-[1px] wu-w-full":"wu-h-full wu-w-[1px]",e),...s}));qu.displayName=ka.Root.displayName;function zu({className:e,...t}){return a.jsx("div",{className:p("animate-pulse rounded-md bg-muted",e),...t})}const Kr=768;function Yr(){const[e,t]=y.useState(void 0);return y.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Kr-1}px)`),s=()=>{t(window.innerWidth<Kr)};return n.addEventListener("change",s),t(window.innerWidth<Kr),()=>n.removeEventListener("change",s)},[]),!!e}const jm="sidebar_state",Gm=3600*24*7,Km="256px",Ym="256px",Xm="3rem",Zm="b",$u=y.createContext(null);function tt(){const e=y.useContext($u);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Hu=y.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:s,style:r,children:o,...i},u)=>{const l=Yr(),[d,c]=y.useState(!1),[w,f]=y.useState(l?!0:e),m=t??w,g=y.useCallback(v=>{const T=typeof v=="function"?v(m):v;n?n(T):f(T),document.cookie=`${jm}=${T}; path=/; max-age=${Gm}`},[n,m]),b=y.useCallback(()=>l?c(v=>!v):g(v=>!v),[l,g,c]);y.useEffect(()=>{const v=T=>{T.key===Zm&&(T.metaKey||T.ctrlKey)&&(T.preventDefault(),b())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[b]);const x=m?"expanded":"collapsed",S=y.useMemo(()=>({state:x,open:m,setOpen:g,isMobile:l,openMobile:d,setOpenMobile:c,toggleSidebar:b}),[x,m,g,l,d,c,b]);return a.jsx($u.Provider,{value:S,children:a.jsx($a,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":Km,"--sidebar-width-icon":Xm,...r},className:p("wu-group/sidebar-wrapper wu-flex wu-min-h-[calc(100svh-48px)] wu-w-full",s),ref:u,...i,children:o})})})});Hu.displayName="SidebarProvider";const Uu=y.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:s,children:r,...o},i)=>{const{isMobile:u,state:l,openMobile:d,setOpenMobile:c}=tt();return n==="none"?a.jsx("div",{className:p("wu-flex wu-h-full wu-w-[--sidebar-width] wu-flex-col",s),ref:i,...o,children:r}):u?a.jsx(fo,{open:d,onOpenChange:c,...o,children:a.jsx(zs,{"data-sidebar":"sidebar","data-mobile":"true",className:"wu-w-[--sidebar-width] wu-bg-blue-sidebar wu-p-0 [&>button]:wu-hidden",style:{"--sidebar-width":Ym},side:e,children:a.jsx("div",{className:"wu-flex wu-flex-col wu-w-full wu-h-full",children:r})})}):a.jsxs("div",{ref:i,className:"wu-hidden wu-group wu-peer md:wu-block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[a.jsx("div",{className:p("wu-relative wu-w-[--sidebar-width] wu-bg-transparent wu-transition-[width] wu-duration-150 wu-ease-linear","group-data-[collapsible=offcanvas]:wu-w-0","group-data-[side=right]:wu-rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon]")}),a.jsx("div",{className:p("wu-fixed wu-inset-y-0 wu-z-20 wu-hidden wu-h-svh wu-w-[--sidebar-width] wu-transition-[left,right,width] wu-duration-150 wu-ease-linear md:wu-flex",e==="left"?"wu-left-0 group-data-[collapsible=offcanvas]:wu-left-[calc(var(--sidebar-width)*-1)]":"wu-right-0 group-data-[collapsible=offcanvas]:wu-right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"wu-p-2 group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon] group-data-[side=left]:wu-border-r group-data-[side=right]:wu-border-l",s),...o,children:a.jsx("div",{"data-sidebar":"sidebar",className:"wu-flex wu-h-full wu-w-full wu-flex-col wu-bg-[#eef3fb] group-data-[variant=floating]:wu-rounded-lg group-data-[variant=floating]:wu-border group-data-[variant=floating]:wu-border-sidebar-border group-data-[variant=floating]:wu-shadow",children:r})})]})});Uu.displayName="Sidebar";const ju=y.forwardRef(({className:e,onClick:t,children:n,...s},r)=>{const{toggleSidebar:o}=tt();return a.jsxs(Nt,{ref:r,"data-sidebar":"trigger",variant:"secondary",className:p("wu-h-8 wu-w-8 wu-min-w-0 wu-p-0 wu-text-2xl wu-font-light hover:wu-bg-blue-sidebarHover wu-text-blue-q",e),onClick:i=>{t==null||t(i),o()},...s,children:[n,a.jsx("span",{className:"wu-sr-only",children:"Toggle Sidebar"})]})});ju.displayName="SidebarTrigger";const Jm=y.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:s}=tt();return a.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:s,title:"Toggle Sidebar",className:p("wu-absolute wu-inset-y-0 wu-z-20 wu-hidden wu-w-4 wu-translate-x-1/2 wu-transition-all wu-ease-linear after:wu-absolute after:wu-inset-y-0 after:wu-left-1/2 after:wu-w-[2px] group-data-[side=left]:wu-right-4 group-data-[side=right]:wu-left-0 sm:wu-flex","[[data-side=left]_&]:wu-cursor-w-resize [[data-side=right]_&]:wu-cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:wu-cursor-e-resize [[data-side=right][data-state=collapsed]_&]:wu-cursor-w-resize","group-data-[collapsible=offcanvas]:wu-translate-x-0 group-data-[collapsible=offcanvas]:after:wu-left-full","[[data-side=left][data-collapsible=offcanvas]_&]:wu-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:wu-left-2",e),...t})});Jm.displayName="SidebarRail";const Gu=y.forwardRef(({className:e,...t},n)=>a.jsx("main",{ref:n,className:p("wu-relative wu-flex wu-w-full wu-flex-1 wu-flex-col","md:peer-data-[variant=inset]:wu-m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:wu-ml-2 md:peer-data-[variant=inset]:wu-ml-0 md:peer-data-[variant=inset]:wu-rounded-xl md:peer-data-[variant=inset]:wu-shadow",e),...t}));Gu.displayName="SidebarInset";const Qm=y.forwardRef(({className:e,...t},n)=>a.jsx(ks,{ref:n,"data-sidebar":"input",className:p("wu-h-8 wu-w-full wu-shadow-none focus-visible:wu-ring-2",e),...t}));Qm.displayName="SidebarInput";const Ku=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"header",className:p("wu-flex wu-flex-col wu-gap-2 wu-p-2",e),...t}));Ku.displayName="SidebarHeader";const Yu=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"footer",className:p("wu-flex wu-flex-col wu-gap-2 wu-pb-2",e),...t}));Yu.displayName="SidebarFooter";const Rm=y.forwardRef(({className:e,...t},n)=>a.jsx(qu,{ref:n,"data-sidebar":"separator",className:p("wu-mx-2 wu-w-auto",e),...t}));Rm.displayName="SidebarSeparator";const Xu=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"content",className:p("wu-flex wu-min-h-0 wu-flex-1 wu-flex-col wu-gap-2 wu-overflow-auto group-data-[collapsible=icon]:wu-overflow-hidden",e),...t}));Xu.displayName="SidebarContent";const Zu=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group",className:p("wu-relative wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-p-2",e),...t}));Zu.displayName="SidebarGroup";const Ju=y.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const r=t?xt.Slot:"div";return a.jsx(r,{ref:s,"data-sidebar":"group-label",className:p("wu-flex wu-h-8 wu-shrink-0 wu-items-center wu-rounded-md wu-px-2 wu-text-xs wu-font-medium wu-outline-none wu-transition-[margin,opacity] wu-duration-150 wu-ease-linear focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","group-data-[collapsible=icon]:wu-opacity-0",e),...n})});Ju.displayName="SidebarGroupLabel";const eg=y.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const r=t?xt.Slot:"button";return a.jsx(r,{ref:s,"data-sidebar":"group-action",className:p("wu-absolute wu-right-3 wu-top-3.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","after:wu-absolute after:wu-inset-2 after:md:wu-hidden","group-data-[collapsible=icon]:wu-hidden",e),...n})});eg.displayName="SidebarGroupAction";const Qu=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group-content",className:p("wu-w-full wu-text-sm",e),...t}));Qu.displayName="SidebarGroupContent";const Xr=y.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu",className:p("wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-gap-1",e),...t}));Xr.displayName="SidebarMenu";const Ru=y.forwardRef(({className:e,...t},n)=>a.jsx("li",{ref:n,"data-sidebar":"menu-item",className:p("wu-group/menu-item wu-relative",e),...t}));Ru.displayName="SidebarMenuItem";const tg=_e.cva("wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-p-2 wu-text-left wu-text-sm wu-outline-none wu-transition-[width,height,padding] focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:wu-pr-8 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 data-[active=true]:wu-font-medium group-data-[collapsible=icon]:!wu-size-8 group-data-[collapsible=icon]:!wu-p-2 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0",{variants:{variant:{default:"",outline:""},size:{default:"wu-h-8 wu-text-sm",sm:"wu-h-7 wu-text-xs",lg:"wu-h-12 wu-text-sm group-data-[collapsible=icon]:!wu-p-0"}},defaultVariants:{variant:"default",size:"default"}}),el=y.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:s="default",tooltip:r,className:o,...i},u)=>{const l=e?xt.Slot:"button",{isMobile:d,state:c}=tt(),w=a.jsx(l,{ref:u,"data-sidebar":"menu-button","data-size":s,"data-active":t,className:p(tg({variant:n,size:s}),o),...i});return r?(typeof r=="string"&&(r={children:r}),a.jsxs(Ha,{children:[a.jsx(Ua,{asChild:!0,children:w}),a.jsx(Ps,{side:"right",align:"center",hidden:c!=="collapsed"||d,...r})]})):w});el.displayName="SidebarMenuButton";const ng=y.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...s},r)=>{const o=t?xt.Slot:"button";return a.jsx(o,{ref:r,"data-sidebar":"menu-action",className:p("wu-absolute wu-right-1 wu-top-1.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","after:wu-absolute after:wu-inset-2 after:md:wu-hidden","peer-data-[size=sm]/menu-button:wu-top-1","peer-data-[size=default]/menu-button:wu-top-1.5","peer-data-[size=lg]/menu-button:wu-top-2.5","group-data-[collapsible=icon]:wu-hidden",n&&"group-focus-within/menu-item:wu-opacity-100 group-hover/menu-item:wu-opacity-100 data-[state=open]:wu-opacity-100 md:wu-opacity-0",e),...s})});ng.displayName="SidebarMenuAction";const sg=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:p("wu-pointer-events-none wu-absolute wu-right-1 wu-flex wu-h-5 wu-min-w-5 wu-select-none wu-items-center wu-justify-center wu-rounded-md wu-px-1 wu-text-xs wu-font-medium wu-tabular-nums","","peer-data-[size=sm]/menu-button:wu-top-1","peer-data-[size=default]/menu-button:wu-top-1.5","peer-data-[size=lg]/menu-button:wu-top-2.5","group-data-[collapsible=icon]:wu-hidden",e),...t}));sg.displayName="SidebarMenuBadge";const rg=y.forwardRef(({className:e,showIcon:t=!1,...n},s)=>{const r=y.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.jsxs("div",{ref:s,"data-sidebar":"menu-skeleton",className:p("wu-flex wu-h-8 wu-items-center wu-gap-2 wu-rounded-md wu-px-2",e),...n,children:[t&&a.jsx(zu,{className:"wu-rounded-md wu-size-4","data-sidebar":"menu-skeleton-icon"}),a.jsx(zu,{className:"wu-h-4 wu-max-w-[--skeleton-width] wu-flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});rg.displayName="SidebarMenuSkeleton";const ag=y.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:p("wu-mx-3.5 wu-flex wu-min-w-0 wu-translate-x-px wu-flex-col wu-gap-1 wu-border-l wu-px-2.5 wu-py-0.5","group-data-[collapsible=icon]:wu-hidden",e),...t}));ag.displayName="SidebarMenuSub";const og=y.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e}));og.displayName="SidebarMenuSubItem";const ig=y.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:s,...r},o)=>{const i=e?xt.Slot:"a";return a.jsx(i,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:p("wu-flex wu-h-7 wu-min-w-0 wu-translate-x-px wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-px-2 wu-outline-none focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","data-[active=true]:wu-bg-sidebar-accent data-[active=true]:wu-text-sidebar-accent-foreground",t==="sm"&&"wu-text-xs",t==="md"&&"wu-text-sm","group-data-[collapsible=icon]:wu-hidden",s),...r})});ig.displayName="SidebarMenuSubButton";const tl={};function nt(e,t){const n=y.useRef(tl);return n.current===tl&&(n.current=e(t)),n}const Zr=y[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],ug=Zr&&Zr!==y.useLayoutEffect?Zr:e=>e();function he(e){const t=nt(lg).current;return t.next=e,ug(t.effect),t.trampoline}function lg(){const e={next:void 0,callback:cg,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function cg(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}function tn(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(s=>n.searchParams.append("args[]",s)),`Base UI error #${e}; visit ${n} for the full message.`}function Zn(e,t,n,s){const r=nt(nl).current;return wg(r,e,t,n,s)&&sl(r,[e,t,n,s]),r.callback}function dg(e){const t=nt(nl).current;return fg(t,e)&&sl(t,e),t.callback}function nl(){return{callback:null,cleanup:null,refs:[]}}function wg(e,t,n,s,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==s||e.refs[3]!==r}function fg(e,t){return e.refs.length!==t.length||e.refs.some((n,s)=>n!==t[s])}function sl(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const s=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const o=t[r];if(o!=null)switch(typeof o){case"function":{const i=o(n);typeof i=="function"&&(s[r]=i);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const o=t[r];if(o!=null)switch(typeof o){case"function":{const i=s[r];typeof i=="function"?i():o(null);break}case"object":{o.current=null;break}}}}}}}const pg=parseInt(y.version,10);function hg(e){return pg>=e}function rl(e){if(!y.isValidElement(e))return null;const t=e,n=t.props;return(hg(19)?n==null?void 0:n.ref:t.ref)??null}function Jr(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function mg(e,t){const n={};for(const s in e){const r=e[s];if(t!=null&&t.hasOwnProperty(s)){const o=t[s](r);o!=null&&Object.assign(n,o);continue}r===!0?n[`data-${s.toLowerCase()}`]="":r&&(n[`data-${s.toLowerCase()}`]=r.toString())}return n}function gg(e,t){return typeof e=="function"?e(t):e}function bg(e,t){return typeof e=="function"?e(t):e}const nn={};function al(e,t,n,s,r){let o={...Qr(e,nn)};return t&&(o=Jn(o,t)),n&&(o=Jn(o,n)),s&&(o=Jn(o,s)),o}function yg(e){if(e.length===0)return nn;if(e.length===1)return Qr(e[0],nn);let t={...Qr(e[0],nn)};for(let n=1;n<e.length;n+=1)t=Jn(t,e[n]);return t}function Jn(e,t){return ol(t)?t(e):xg(e,t)}function xg(e,t){if(!t)return e;for(const n in t){const s=t[n];switch(n){case"style":{e[n]=Jr(e.style,s);break}case"className":{e[n]=il(e.className,s);break}default:vg(n,s)?e[n]=Ng(e[n],s):e[n]=s}}return e}function vg(e,t){const n=e.charCodeAt(0),s=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&s===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function ol(e){return typeof e=="function"}function Qr(e,t){return ol(e)?e(t):e??nn}function Ng(e,t){return t?e?n=>{if(Sg(n)){const r=n;Rr(r);const o=t(r);return r.baseUIHandlerPrevented||e==null||e(r),o}const s=t(n);return e==null||e(n),s}:t:e}function Rr(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function il(e,t){return t?e?t+" "+e:t:e}function Sg(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Me(){}const Ue=Object.freeze({});function st(e,t,n={}){const s=t.render,r=Cg(t,n);if(n.enabled===!1)return null;const o=n.state??Ue;return Eg(e,s,r,o)}function Cg(e,t={}){const{className:n,style:s,render:r}=e,{state:o=Ue,ref:i,props:u,stateAttributesMapping:l,enabled:d=!0}=t,c=d?gg(n,o):void 0,w=d?bg(s,o):void 0,f=d?mg(o,l):Ue,m=d?Jr(f,Array.isArray(u)?yg(u):u)??Ue:Ue;return typeof document<"u"&&(d?Array.isArray(i)?m.ref=dg([m.ref,rl(r),...i]):m.ref=Zn(m.ref,rl(r),i):Zn(null,null)),d?(c!==void 0&&(m.className=il(m.className,c)),w!==void 0&&(m.style=Jr(m.style,w)),m):Ue}const Tg=Symbol.for("react.lazy");function Eg(e,t,n,s){if(t){if(typeof t=="function")return t(n,s);const r=al(n,t.props);r.ref=n.ref;let o=t;if((o==null?void 0:o.$$typeof)===Tg&&(o=y.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!y.isValidElement(o))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
16
16
  `));return y.cloneElement(o,r)}if(e&&typeof e=="string")return Mg(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":tn(8))}function Mg(e,t){return e==="button"?h.createElement("button",{type:"button",...t,key:t.key}):e==="img"?h.createElement("img",{alt:"",...t,key:t.key}):y.createElement(e,t)}function ul({controlled:e,default:t,name:n,state:s="value"}){const{current:r}=y.useRef(e!==void 0),[o,i]=y.useState(t),u=r?e:o;if(process.env.NODE_ENV!=="production"){y.useEffect(()=>{r!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${r?"":"un"}controlled ${s} state of ${n} to be ${r?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
17
17
  `))},[s,n,e]);const{current:d}=y.useRef(t);y.useEffect(()=>{!r&&JSON.stringify(d)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${s} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
18
- `))},[JSON.stringify(t)])}const l=y.useCallback(d=>{r||i(d)},[]);return[u,l]}const re=typeof document<"u"?y.useLayoutEffect:()=>{},pt={...y};let ll=0;function Ig(e,t="mui"){const[n,s]=y.useState(e),r=e||n;return y.useEffect(()=>{n==null&&(ll+=1,s(`${t}-${ll}`))},[n,t]),r}const cl=pt.useId;function Dg(e,t){if(cl!==void 0){const n=cl();return e??(t?`${t}-${n}`:n)}return Ig(e,t)}function dl(e){return Dg(e,"base-ui")}const Qn="none",Ag="trigger-press",ea="input-change",sn="input-clear",Rn="input-blur",ta="input-paste",rn="keyboard";function Ie(e,t,n,s){let r=!1,o=!1;const i=s??He;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){o=!0},get isCanceled(){return r},get isPropagationAllowed(){return o},trigger:n,...i}}function an(e,t,n){const s=He;return{reason:e,event:t??new Event("base-ui"),...s}}const kg=[];function es(e){y.useEffect(e,kg)}const ts=null;let wl=globalThis.requestAnimationFrame;class Pg{constructor(){Ne(this,"callbacks",[]);Ne(this,"callbacksCount",0);Ne(this,"nextId",1);Ne(this,"startId",1);Ne(this,"isScheduled",!1);Ne(this,"tick",t=>{var r;this.isScheduled=!1;const n=this.callbacks,s=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,s>0)for(let o=0;o<n.length;o+=1)(r=n[o])==null||r.call(n,t)})}request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const s=process.env.NODE_ENV!=="production"&&wl!==requestAnimationFrame&&(wl=requestAnimationFrame,!0);return(!this.isScheduled||s)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const ns=new Pg;class oe{constructor(){Ne(this,"currentId",ts);Ne(this,"cancel",()=>{this.currentId!==ts&&(ns.cancel(this.currentId),this.currentId=ts)});Ne(this,"disposeEffect",()=>this.cancel)}static create(){return new oe}static request(t){return ns.request(t)}static cancel(t){return ns.cancel(t)}request(t){this.cancel(),this.currentId=ns.request(()=>{this.currentId=ts,t()})}}function fl(){const e=tt(oe.create).current;return es(e.disposeEffect),e}function _g(e){return e==null?e:"current"in e?e.current:e}let on=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Vg={[on.startingStyle]:""},Og={[on.endingStyle]:""},pl={transitionStatus(e){return e==="starting"?Vg:e==="ending"?Og:null}};function hl(e,t=!1,n=!0){const s=fl();return he((r,o=null)=>{s.cancel();function i(){Pa.flushSync(r)}const u=_g(e);if(u==null)return;const l=u;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)r();else{let d=function(){const w=on.startingStyle;if(!l.hasAttribute(w)){s.request(c);return}const f=new MutationObserver(()=>{l.hasAttribute(w)||(f.disconnect(),c())});f.observe(l,{attributes:!0,attributeFilter:[w]}),o==null||o.addEventListener("abort",()=>f.disconnect(),{once:!0})},c=function(){Promise.all(l.getAnimations().map(w=>w.finished)).then(()=>{o!=null&&o.aborted||i()}).catch(()=>{const w=l.getAnimations();if(n){if(o!=null&&o.aborted)return;i()}else w.length>0&&w.some(f=>f.pending||f.playState!=="finished")&&c()})};if(t){d();return}s.request(c)}})}function Fg(e,t=!1,n=!1){const[s,r]=y.useState(e&&t?"idle":void 0),[o,i]=y.useState(e);return e&&!o&&(i(!0),r("starting")),!e&&o&&s!=="ending"&&!n&&r("ending"),!e&&!o&&s==="ending"&&r(void 0),re(()=>{if(!e&&o&&s!=="ending"&&n){const u=oe.request(()=>{r("ending")});return()=>{oe.cancel(u)}}},[e,o,s,n]),re(()=>{if(!e||t)return;const u=oe.request(()=>{r(void 0)});return()=>{oe.cancel(u)}},[t,e]),re(()=>{if(!e||!t)return;e&&o&&s!=="idle"&&r("starting");const u=oe.request(()=>{r("idle")});return()=>{oe.cancel(u)}},[t,e,o,r,s]),y.useMemo(()=>({mounted:o,setMounted:i,transitionStatus:s}),[o,s])}function Lg(e){const{open:t,defaultOpen:n,onOpenChange:s,disabled:r}=e,o=t!==void 0,[i,u]=ul({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:l,setMounted:d,transitionStatus:c}=Fg(i,!0,!0),[w,f]=y.useState(i),[{height:m,width:g},b]=y.useState({height:void 0,width:void 0}),v=dl(),[C,N]=y.useState(),S=C??v,[x,T]=y.useState(!1),[A,D]=y.useState(!1),I=y.useRef(null),k=y.useRef(null),F=y.useRef(null),P=y.useRef(null),M=hl(P,!1),V=he(W=>{const _=!i,q=Ie(Ag,W.nativeEvent);if(s(_,q),q.isCanceled)return;const B=P.current;k.current==="css-animation"&&B!=null&&B.style.removeProperty("animation-name"),!x&&!A&&(k.current!=null&&k.current!=="css-animation"&&!l&&_&&d(!0),k.current==="css-animation"&&(!w&&_&&f(!0),!l&&_&&d(!0))),u(_),k.current==="none"&&l&&!_&&d(!1)});return re(()=>{o&&k.current==="none"&&!A&&!i&&d(!1)},[o,A,i,t,d]),y.useMemo(()=>({abortControllerRef:I,animationTypeRef:k,disabled:r,handleTrigger:V,height:m,mounted:l,open:i,panelId:S,panelRef:P,runOnceAnimationsFinish:M,setDimensions:b,setHiddenUntilFound:T,setKeepMounted:D,setMounted:d,setOpen:u,setPanelIdState:N,setVisible:f,transitionDimensionRef:F,transitionStatus:c,visible:w,width:g}),[I,k,r,V,m,l,i,S,P,M,b,T,D,d,u,f,F,c,w,g])}const na=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(na.displayName="CollapsibleRootContext");function ml(){const e=y.useContext(na);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.":tn(15));return e}let un=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=on.startingStyle]="startingStyle",e[e.endingStyle=on.endingStyle]="endingStyle",e})({}),Wg=(function(e){return e.panelOpen="data-panel-open",e})({});const Bg={[un.open]:""},qg={[un.closed]:""},zg={open(e){return e?{[Wg.panelOpen]:""}:null}},gl={...{open(e){return e?Bg:qg}},...pl},bl=y.forwardRef(function(t,n){const{render:s,className:r,defaultOpen:o=!1,disabled:i=!1,onOpenChange:u,open:l,...d}=t,c=he(u),w=Lg({open:l,defaultOpen:o,onOpenChange:c,disabled:i}),f=y.useMemo(()=>({open:w.open,disabled:w.disabled,transitionStatus:w.transitionStatus}),[w.open,w.disabled,w.transitionStatus]),m=y.useMemo(()=>({...w,onOpenChange:c,state:f}),[w,c,f]),g=nt("div",t,{state:f,ref:n,props:d,stateAttributesMapping:gl});return a.jsx(na.Provider,{value:m,children:g})});process.env.NODE_ENV!=="production"&&(bl.displayName="CollapsibleRoot");function yl(){return typeof window<"u"}function sa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $g(e){return yl()?e instanceof Element||e instanceof sa(e).Element:!1}function Hg(e){return yl()?e instanceof HTMLElement||e instanceof sa(e).HTMLElement:!1}let ra;process.env.NODE_ENV!=="production"&&(ra=new Set);function xl(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ra.has(t)||(ra.add(t),console.error(`Base UI: ${t}`))}}const vl=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(vl.displayName="CompositeRootContext");function Ug(e=!1){const t=y.useContext(vl);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":tn(16));return t}function jg(e){const{focusableWhenDisabled:t,disabled:n,composite:s=!1,tabIndex:r=0,isNativeButton:o}=e,i=s&&t!==!1,u=s&&t===!1;return{props:y.useMemo(()=>{const d={onKeyDown(c){n&&t&&c.key!=="Tab"&&c.preventDefault()}};return s||(d.tabIndex=r,!o&&n&&(d.tabIndex=t?r:-1)),(o&&(t||i)||!o&&n)&&(d["aria-disabled"]=n),o&&(!t||u)&&(d.disabled=n),d},[s,n,t,i,u,o,r])}}function aa(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:s=0,native:r=!0}=e,o=y.useRef(null),i=Ug(!0)!==void 0,u=he(()=>{const f=o.current;return!!((f==null?void 0:f.tagName)==="A"&&(f!=null&&f.href))}),{props:l}=jg({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:s,isNativeButton:r});process.env.NODE_ENV!=="production"&&y.useEffect(()=>{var m,g;if(!o.current)return;const f=o.current.tagName==="BUTTON";if(r){if(!f){const b=((m=pt.captureOwnerStack)==null?void 0:m.call(pt))||"";xl(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${b}`)}}else if(f){const b=((g=pt.captureOwnerStack)==null?void 0:g.call(pt))||"";xl(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${b}`)}},[r]);const d=y.useCallback(()=>{const f=o.current;Gg(f)&&i&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,i]);re(d,[d]);const c=y.useCallback((f={})=>{const{onClick:m,onMouseDown:g,onKeyUp:b,onKeyDown:v,onPointerDown:C,...N}=f;return al({type:r?"button":void 0,onClick(x){if(t){x.preventDefault();return}m==null||m(x)},onMouseDown(x){t||g==null||g(x)},onKeyDown(x){if(t||(Rr(x),v==null||v(x)),x.baseUIHandlerPrevented)return;const T=x.target===x.currentTarget&&!r&&!u()&&!t,A=x.key==="Enter",D=x.key===" ";T&&((D||A)&&x.preventDefault(),A&&(m==null||m(x)))},onKeyUp(x){t||(Rr(x),b==null||b(x)),!x.baseUIHandlerPrevented&&x.target===x.currentTarget&&!r&&!t&&x.key===" "&&(m==null||m(x))},onPointerDown(x){if(t){x.preventDefault();return}C==null||C(x)}},r?void 0:{role:"button"},l,N)},[t,l,r,u]),w=he(f=>{o.current=f,d()});return{getButtonProps:c,buttonRef:w}}function Gg(e){return Hg(e)&&e.tagName==="BUTTON"}const Kg={...zg,...pl},Nl=y.forwardRef(function(t,n){const{panelId:s,open:r,handleTrigger:o,state:i,disabled:u}=ml(),{className:l,disabled:d=u,id:c,render:w,nativeButton:f=!0,...m}=t,{getButtonProps:g,buttonRef:b}=aa({disabled:d,focusableWhenDisabled:!0,native:f}),v=y.useMemo(()=>({"aria-controls":r?s:void 0,"aria-expanded":r,onClick:o}),[s,r,o]);return nt("button",t,{state:i,ref:[n,b],props:[v,m,g],stateAttributesMapping:Kg})});process.env.NODE_ENV!=="production"&&(Nl.displayName="CollapsibleTrigger");let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function Sl(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");oa.has(t)||(oa.add(t),console.warn(`Base UI: ${t}`))}}let Yg=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function Xg(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:s,height:r,hiddenUntilFound:o,keepMounted:i,id:u,mounted:l,onOpenChange:d,open:c,panelRef:w,runOnceAnimationsFinish:f,setDimensions:m,setMounted:g,setOpen:b,setVisible:v,transitionDimensionRef:C,visible:N,width:S}=e,x=y.useRef(!1),T=y.useRef(null),A=y.useRef(c),D=y.useRef(c),I=fl(),k=y.useMemo(()=>n.current==="css-animation"?!N:!c&&!l,[c,l,N,n]),F=he(M=>{if(!M)return;if(n.current==null||C.current==null){const _=getComputedStyle(M),q=_.animationName!=="none"&&_.animationName!=="",B=_.transitionDuration!=="0s"&&_.transitionDuration!=="";q&&B?process.env.NODE_ENV!=="production"&&Sl("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.","Only one of either animation type should be used."):_.animationName==="none"&&_.transitionDuration!=="0s"?n.current="css-transition":_.animationName!=="none"&&_.transitionDuration==="0s"?n.current="css-animation":n.current="none",M.getAttribute(Yg.orientation)==="horizontal"||_.transitionProperty.indexOf("width")>-1?C.current="width":C.current="height"}if(n.current!=="css-transition")return;(r===void 0||S===void 0)&&(m({height:M.scrollHeight,width:M.scrollWidth}),D.current&&M.style.setProperty("transition-duration","0s"));let V=-1,W=-1;return V=oe.request(()=>{D.current=!1,W=oe.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})}),()=>{oe.cancel(V),oe.cancel(W)}}),P=Zn(s,w,F);return re(()=>{if(n.current!=="css-transition")return;const M=w.current;if(!M)return;let V=-1;if(t.current!=null&&(t.current.abort(),t.current=null),c){const W={"justify-content":M.style.justifyContent,"align-items":M.style.alignItems,"align-content":M.style.alignContent,"justify-items":M.style.justifyItems};Object.keys(W).forEach(_=>{M.style.setProperty(_,"initial","important")}),!D.current&&!i&&M.setAttribute(un.startingStyle,""),m({height:M.scrollHeight,width:M.scrollWidth}),V=oe.request(()=>{Object.entries(W).forEach(([_,q])=>{q===""?M.style.removeProperty(_):M.style.setProperty(_,q)})})}else{if(M.scrollHeight===0&&M.scrollWidth===0)return;m({height:M.scrollHeight,width:M.scrollWidth});const W=new AbortController;t.current=W;const _=W.signal;let q=null;const B=un.endingStyle;return q=new MutationObserver(U=>{U.some(H=>H.type==="attributes"&&H.attributeName===B)&&(q==null||q.disconnect(),q=null,f(()=>{m({height:0,width:0}),M.style.removeProperty("content-visibility"),g(!1),t.current===W&&(t.current=null)},_))}),q.observe(M,{attributes:!0,attributeFilter:[B]}),()=>{q==null||q.disconnect(),I.cancel(),t.current===W&&(W.abort(),t.current=null)}}return()=>{oe.cancel(V)}},[t,n,I,o,i,l,c,w,f,m,g]),re(()=>{if(n.current!=="css-animation")return;const M=w.current;M&&(T.current=M.style.animationName||T.current,M.style.setProperty("animation-name","none"),m({height:M.scrollHeight,width:M.scrollWidth}),!A.current&&!x.current&&M.style.removeProperty("animation-name"),c?(t.current!=null&&(t.current.abort(),t.current=null),g(!0),v(!0)):(t.current=new AbortController,f(()=>{g(!1),v(!1),t.current=null},t.current.signal)))},[t,n,c,w,f,m,g,v,N]),es(()=>{const M=oe.request(()=>{A.current=!1});return()=>oe.cancel(M)}),re(()=>{if(!o)return;const M=w.current;if(!M)return;let V=-1,W=-1;return c&&x.current&&(M.style.transitionDuration="0s",m({height:M.scrollHeight,width:M.scrollWidth}),V=oe.request(()=>{x.current=!1,W=oe.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})})),()=>{oe.cancel(V),oe.cancel(W)}},[o,c,w,m]),re(()=>{const M=w.current;M&&o&&k&&(M.setAttribute("hidden","until-found"),n.current==="css-transition"&&M.setAttribute(un.startingStyle,""))},[o,k,n,w]),y.useEffect(function(){const V=w.current;if(!V)return;function W(_){x.current=!0,b(!0),d(!0,Ie(Qn,_))}return V.addEventListener("beforematch",W),()=>{V.removeEventListener("beforematch",W)}},[d,w,b]),y.useMemo(()=>({props:{hidden:k,id:u,ref:P}}),[k,u,P])}let Cl=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});function Zg(e){const{enabled:t=!0,open:n,ref:s,onComplete:r}=e,o=he(r),i=hl(s,n,!1);y.useEffect(()=>{if(!t)return;const u=new AbortController;return i(o,u.signal),()=>{u.abort()}},[t,n,o,i])}const Tl=y.forwardRef(function(t,n){const{className:s,hiddenUntilFound:r,keepMounted:o,render:i,id:u,...l}=t;process.env.NODE_ENV!=="production"&&re(()=>{r&&o===!1&&Sl("The `keepMounted={false}` prop on a Collapsible will be ignored when using `hiddenUntilFound` since it requires the Panel to remain mounted even when closed.")},[r,o]);const{abortControllerRef:d,animationTypeRef:c,height:w,mounted:f,onOpenChange:m,open:g,panelId:b,panelRef:v,runOnceAnimationsFinish:C,setDimensions:N,setHiddenUntilFound:S,setKeepMounted:x,setMounted:T,setPanelIdState:A,setOpen:D,setVisible:I,state:k,transitionDimensionRef:F,visible:P,width:M,transitionStatus:V}=ml(),W=r??!1,_=o??!1;re(()=>{if(u)return A(u),()=>{A(void 0)}},[u,A]),re(()=>{S(W)},[S,W]),re(()=>{x(_)},[x,_]);const{props:q}=Xg({abortControllerRef:d,animationTypeRef:c,externalRef:n,height:w,hiddenUntilFound:W,id:b,keepMounted:_,mounted:f,onOpenChange:m,open:g,panelRef:v,runOnceAnimationsFinish:C,setDimensions:N,setMounted:T,setOpen:D,setVisible:I,transitionDimensionRef:F,visible:P,width:M});Zg({open:g&&V==="idle",ref:v,onComplete(){g&&N({height:void 0,width:void 0})}});const B=y.useMemo(()=>({...k,transitionStatus:V}),[k,V]),U=nt("div",t,{state:B,ref:[n,v],props:[q,{style:{[Cl.collapsiblePanelHeight]:w===void 0?"auto":`${w}px`,[Cl.collapsiblePanelWidth]:M===void 0?"auto":`${M}px`}},l],stateAttributesMapping:gl});return _||W||!_&&f?U:null});process.env.NODE_ENV!=="production"&&(Tl.displayName="CollapsiblePanel");const Jg=({children:e,Sidebar:t,className:n,defaultOpen:s=!0,open:r,onOpenChange:o,style:i})=>a.jsxs(Hu,{defaultOpen:s,open:r,onOpenChange:o,children:[a.jsxs(Uu,{variant:"sidebar",collapsible:"icon",className:p("wu-top-12 wu-h-[calc(100%-48px)] wu-shadow-sidebar wu-border-none",n),style:i,role:"complementary",children:[a.jsx(Ku,{className:"wu-py-2",children:a.jsx(El,{})}),t]}),a.jsx(Gu,{className:"wu-contain-inline-size",children:e})]}),El=e=>{const{state:t,isMobile:n,openMobile:s}=et();return a.jsx(ju,{...e,children:a.jsx($r,{showMenu:n?s:t==="expanded"})})},Qg=({className:e,children:t,...n})=>{const s=h.useRef(null),r=h.useRef(null),o=({currentTarget:u})=>{const{scrollTop:l,clientHeight:d,scrollHeight:c}=u;s.current&&s.current.classList.toggle("wu-border-[#1b338014]",l!==0),r.current&&r.current.classList.toggle("wu-border-[#1b338014]",l+d!==c)},i="wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent";return a.jsxs(Xu,{...n,className:p("wu-overflow-hidden wu-gap-0",e),children:[a.jsx("hr",{className:i,ref:s}),a.jsx(Vt,{onScroll:o,className:"wu-gap-2",thumbColor:"#b9c3dc",railColor:"#00000000","data-testid":"scroll-area",children:t}),a.jsx("hr",{className:i,ref:r})]})},Rg=e=>a.jsx(Yu,{...e,children:e.children}),eb=({label:e,children:t,...n})=>a.jsxs(Zu,{...n,className:"wu-p-0",children:[a.jsx("div",{className:"wu-h-8",children:a.jsx(Ju,{className:"wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q",children:e})}),a.jsx(Qu,{children:a.jsx(Xr,{children:t})})]}),tb=e=>a.jsx(Xr,{...e}),Ml=({Icon:e,children:t,className:n,isActive:s,...r})=>{var w;const{state:o}=et(),[i,u]=h.useState(),l=Yr(),d=h.isValidElement(t)?h.cloneElement(t,{children:a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[e,a.jsx("span",{className:p("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&!l&&"wu-opacity-0"),children:(w=t.props)==null?void 0:w.children})]})}):t&&a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[e,a.jsx("span",{className:p("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&!l&&"wu-opacity-0"),children:t})]}),c=h.useRef(null);return h.useEffect(()=>{var f;u(((f=c.current)==null?void 0:f.textContent)||"")},[]),a.jsx(Ru,{...r,className:"wu-flex wu-items-center wu-gap-2 wu-px-2",children:a.jsx(el,{className:p("wu-flex wu-items-center wu-text-blue-q hover:wu-bg-blue-sidebarHover wu-cursor-pointer wu-h-8 wu-rounded-sm",n,s&&"wu-bg-white wu-shadow-[4px_4px_16px_0_#1B338014] wu-font-medium wu-text-blue-p hover:wu-bg-white wu-cursor-default"),isActive:s,tooltip:i,asChild:h.isValidElement(t),ref:c,children:d})})},nb=({Title:e,Icon:t,children:n,className:s,...r})=>{const{state:o}=et(),i=Yr();return a.jsxs(bl,{children:[a.jsx(Nl,{render:u=>{const l="data-panel-open"in u;return a.jsxs(Ml,{Icon:t,...u,children:[e,(o==="expanded"||i)&&a.jsx(Ve,{icon:"wm-arrow-forward-ios",className:p("wu-absolute wu-right-4 wu-transition-transform wu-duration-300",l&&"wu-rotate-90","wu-scale-75")})]})}}),a.jsx(Tl,{className:p(o==="collapsed"?"":"wu-pl-2","wu-h-[var(--collapsible-panel-height)] wu-overflow-hidden","wu-transition-all wu-duration-300 wu-ease-in-out","data-[starting-style]:wu-h-0 data-[ending-style]:wu-h-0",'[&[hidden]:not([hidden="until-found"])]:wu-hidden',s),...r,children:n})]})},sb=new Map([[-3,{top:-20,left:-4,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-2,{top:0,left:0,zIndex:1,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-1,{top:20,left:4,zIndex:2,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[0,{top:40,left:8,zIndex:3,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.10s",position:"absolute"}],[1,{left:12,zIndex:4,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[2,{left:16,zIndex:5,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[3,{left:20,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}]]),ia=(e,t,n=1)=>{const s=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);if(!s)throw new Error("Invalid HSL color format");const r=parseFloat(s[1]),o=parseFloat(s[2]),i=Math.max(0,parseFloat(s[3])+t);return`hsl(${r} ${o}% ${i}% / ${n})`},rb=({index:e,viewIndex:t,length:n,itemHeight:s})=>{const r=(e-t+n)%n;let o;r===0?o=0:r===n-1&&n>=2?o=-1:r===n-2&&n>=3?o=-2:r===1?o=1:r===2?o=2:r===n-3&&n>=4?o=-3:o=3;const i=sb.get(o)||{},u=o>0?s+28+(o-1)*20:i.top;return{position:o,styles:{...i,...o>0&&{top:`${u}px`},height:o>0?"32px":s}}},ln={LIGHTNESS_STEP:8,BORDER_LIGHTNESS:10,CONTENT_HEIGHT:"calc(100% - 2rem)",FONT_SIZE_ACTIVE:"14px",FONT_SIZE_INACTIVE:"12px"},ab=({children:e,className:t,header:n,baseColor:s,position:r=0,style:o,...i})=>{const u=r<=0,l=r===0,d={border:l?`4px solid ${ia(s,ln.BORDER_LIGHTNESS)}`:"",...o},c={backgroundColor:ia(s,r*ln.LIGHTNESS_STEP),fontSize:l?ln.FONT_SIZE_ACTIVE:ln.FONT_SIZE_INACTIVE,transition:"all 0.3s ease",position:"relative",bottom:r<0?"4px":"0px",height:"32px",padding:"4px 8px"},w={backgroundColor:ia(s,45+r*6),height:ln.CONTENT_HEIGHT,position:"relative",bottom:r<0?"4px":"0px"};return a.jsxs("div",{className:p("wu-font-normal wu-transition-all wu-rounded-lg wu-overflow-hidden wu-w-full wu-cursor-pointer hover:-wu-translate-y-2",t),style:d,...i,children:[a.jsx("div",{style:c,className:"wu-text-white",children:n}),u&&a.jsx("div",{className:"wu-p-2 wu-overflow-y-auto wu-text-sm",style:w,children:e})]})},ob=({children:e,Trigger:t,Header:n,styles:s={},classNames:r={},open:o,onOpenChange:i,itemHeight:u})=>{const l={height:u,...s.Trigger};return a.jsxs(Su,{open:o,onOpenChange:i,children:[a.jsx(Cu,{className:p("wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative",r.Trigger),style:l,children:a.jsx("span",{className:"wu-absolute wu-text-xs wu-font-medium wu-bg-gray-25 -wu-top-6 wu-left-0 wu-p-1 wu-rounded-t-lg",children:t})}),a.jsxs(Hr,{className:p("wu-top-[50%] wu-left-[50%] wu-bg-black/75 wu-backdrop-blur-[4px] wu-min-h-full wu-overflow-auto wu-shadow-none wu-max-w-none wu-border-none wu-text-white",r.Content),hideCloseButton:!0,isStackedCard:!0,style:s.Content,children:[a.jsx(jr,{}),a.jsx(Da.DialogClose,{className:p("wu-absolute wu-right-2 wu-top-2 wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-z-10",r.CloseButton),style:s.CloseButton,"aria-label":"Close dialog",children:a.jsx(Ve,{icon:"wm-close",className:"wu-text-lg wu-m-4 wu-cursor-pointer"})}),n&&a.jsx(Ur,{className:p("wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]",r.Header),style:s.Header,children:n}),e]})]})},cn=0;class ss{constructor(){Ne(this,"currentId",cn);Ne(this,"clear",()=>{this.currentId!==cn&&(clearTimeout(this.currentId),this.currentId=cn)});Ne(this,"disposeEffect",()=>this.clear)}static create(){return new ss}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=cn,n()},t)}isStarted(){return this.currentId!==cn}}function Il(){const e=tt(ss.create).current;return es(e.disposeEffect),e}const Dl=0;class ua extends ss{constructor(){super(...arguments);Ne(this,"clear",()=>{this.currentId!==Dl&&(clearInterval(this.currentId),this.currentId=Dl)})}static create(){return new ua}start(n,s){this.clear(),this.currentId=setInterval(()=>{s()},n)}}function ib(){const e=tt(ua.create).current;return es(e.disposeEffect),e}function Al(e){const t=tt(ub,e).current;return t.next=e,re(t.effect),t}function ub(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function lb(){const[,e]=y.useState({});return y.useCallback(()=>{e({})},[])}const kl={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},cb={...kl,position:"fixed",top:0,left:0},db={...kl,position:"absolute"};function wb(e){return(e==null?void 0:e.ownerDocument)||document}const rs=typeof navigator<"u",la=mb(),fb=bb(),pb=gb();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none");const hb=la.platform==="MacIntel"&&la.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(la.platform);rs&&fb.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints,pb.includes("jsdom/");function mb(){if(!rs)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function gb(){if(!rs)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function bb(){if(!rs)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const ca=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(ca.displayName="NumberFieldRootContext");function as(){const e=y.useContext(ca);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.":tn(43));return e}let Pl=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const yb={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},_l={valid(e){return e===null?null:e?{[Pl.valid]:""}:{[Pl.invalid]:""}}},Vl=y.createContext({invalid:void 0,name:void 0,validityData:{state:yb,errors:[],error:"",value:"",initialValue:null},setValidityData:Me,disabled:void 0,touched:!1,setTouched:Me,dirty:!1,setDirty:Me,filled:!1,setFilled:Me,focused:!1,setFocused:Me,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=He)=>e,getInputValidationProps:(e=He)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Vl.displayName="FieldRootContext");function da(e=!0){const t=y.useContext(Vl);if(t.setValidityData===Me&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":tn(28));return t}const Ol=y.createContext({controlId:void 0,registerControlId:Me,labelId:void 0,setLabelId:Me,messageIds:[],setMessageIds:Me,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(Ol.displayName="LabelableContext");function Fl(){return y.useContext(Ol)}function xb(e={}){const{id:t,implicit:n=!1,controlRef:s}=e,{controlId:r,registerControlId:o}=Fl(),i=dl(t),u=n?r:void 0,l=tt(()=>Symbol("labelable-control")),d=y.useRef(!1),c=y.useRef(t!=null),w=he(()=>{!d.current||o===Me||(d.current=!1,o(l.current,void 0))});return re(()=>{if(o===Me)return;let f;if(n){const m=s==null?void 0:s.current;$g(m)&&m.closest("label")!=null?f=t??null:f=u??i}else if(t!=null)c.current=!0,f=t;else if(c.current)f=i;else{w();return}if(f===void 0){w();return}d.current=!0,o(l.current,f)},[t,s,u,o,n,i,l,w]),y.useEffect(()=>w,[w]),r??i}const dn={inputValue:()=>null,value:()=>null,..._l},Ll=new Map;function wn(e,t){const n=JSON.stringify({locale:e,options:t}),s=Ll.get(n);if(s)return s;const r=new Intl.NumberFormat(e,t);return Ll.set(n,r),r}function Ot(e,t,n){return e==null?"":wn(t,n).format(e)}function Wl(e,t,n){return Ot(e,t,{...n,maximumFractionDigits:20})}const vb=["零","〇","一","二","三","四","五","六","七","八","九"],Nb={零:"0","〇":"0",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9"},Bl=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],ql=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],wa=["0","1","2","3","4","5","6","7","8","9"],zl=["%","٪","%","﹪"],$l=["‰","؉"],Hl=["−","-","‒","–","—","﹣"],Ul=["+","﹢"],Sb=".",Cb=",",Tb=new RegExp(`[${Bl.join("")}]`,"g"),Eb=new RegExp(`[${ql.join("")}]`,"g"),Mb=new RegExp(`[${wa.join("")}]`,"g"),Ib=new RegExp(`[${vb.join("")}]`,"g"),Db=new RegExp(`[${zl.join("")}]`),Ab=new RegExp(`[${$l.join("")}]`),fa=/[٠١٢٣٤٥٦٧٨٩]/,jl=/[۰۱۲۳۴۵۶۷۸۹]/,pa=/[零〇一二三四五六七八九]/,Gl=new RegExp(`[${wa.join("")}]`),kb=[".",",",Sb,Cb,"٫","٬"],Kl=new RegExp("\\p{Zs}","u"),Pb=["+",...Ul],_b=["-",...Hl],os=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Vb=e=>e.replace(/[-\\\]^]/g,t=>`\\${t}`),Yl=e=>`[${e.map(Vb).join("")}]`,Xl=Yl(["-"].concat(Hl)),Zl=Yl(["+"].concat(Ul)),Jl=new RegExp(Xl,"gu"),Ql=new RegExp(Zl,"gu"),fn=new RegExp(Xl),is=new RegExp(Zl);function ha(e,t){const n=wn(e,t).formatToParts(11111.1),s={};return n.forEach(r=>{s[r.type]=r.value}),wn(e).formatToParts(.1).forEach(r=>{r.type==="decimal"&&(s[r.type]=r.value)}),s}function pn(e,t,n){if(e==null)return null;let s=String(e).replace(new RegExp("\\p{Cf}","gu"),"").trim();s=s.replace(Jl,"-").replace(Ql,"+");let r=!1;const o=s.match(/([+-])\s*$/);o&&(o[1]==="-"&&(r=!0),s=s.replace(/([+-])\s*$/,""));const i=s.match(/^\s*([+-])/);i&&(i[1]==="-"&&(r=!0),s=s.replace(/^\s*[+-]/,""));let u=t;u===void 0&&(fa.test(s)||jl.test(s)?u="ar":pa.test(s)&&(u="zh"));const{group:l,decimal:d,currency:c}=ha(u,n),w=wn(u,n).formatToParts(1).filter(D=>D.type==="unit").map(D=>os(D.value)),f=w.length?new RegExp(w.join("|"),"g"):null;let m=null;l&&(new RegExp("\\p{Zs}","u").test(l)?m=new RegExp("\\p{Zs}","gu"):l==="'"||l==="’"?m=/['’]/g:m=new RegExp(os(l),"g"));let b=[{regex:l?m:null,replacement:""},{regex:d?new RegExp(os(d),"g"):null,replacement:"."},{regex:/./g,replacement:"."},{regex:/,/g,replacement:""},{regex:/٫/g,replacement:"."},{regex:/٬/g,replacement:""},{regex:c?new RegExp(os(c),"g"):null,replacement:""},{regex:f,replacement:""},{regex:Tb,replacement:D=>String(Bl.indexOf(D))},{regex:Eb,replacement:D=>String(ql.indexOf(D))},{regex:Mb,replacement:D=>String(wa.indexOf(D))},{regex:Ib,replacement:D=>Nb[D]}].reduce((D,{regex:I,replacement:k})=>I?D.replace(I,k):D,s);const v=b.lastIndexOf(".");if(v!==-1&&(b=`${b.slice(0,v).replace(/\./g,"")}.${b.slice(v+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(s)||/[∞]/.test(s))return null;const C=(r?"-":"")+b;let N=parseFloat(C);const S=n==null?void 0:n.style,x=S==="unit"&&(n==null?void 0:n.unit)==="percent",T=Db.test(e)||S==="percent";return Ab.test(e)?N/=1e3:!x&&T&&(N/=100),Number.isNaN(N)?null:N}const Ob=60,Fb=400,Lb=50,Wb=3,Bb=8,us=1;function qb(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const zb=1e-10;function $b(e){const t=wn("en-US").resolvedOptions(),n=(e==null?void 0:e.minimumFractionDigits)??t.minimumFractionDigits??0;return{maximumFractionDigits:Math.max((e==null?void 0:e.maximumFractionDigits)??t.maximumFractionDigits??20,n),minimumFractionDigits:n}}function Hb(e,t){if(!Number.isFinite(e))return e;const n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function ma(e,t){const{maximumFractionDigits:n}=$b(t);return Hb(e,n)}function Ub(e,t,n,s="directional"){if(n===0)return e;const r=Math.abs(n),o=Math.sign(n),i=r*zb*o,u=s==="nearest"?n:r,l=(e-t+i)/u;let d;return s==="nearest"?d=Math.round(l):o>0?d=Math.floor(l):d=Math.ceil(l),t+d*(s==="nearest"?n:r)}function jb(e,{step:t,minWithDefault:n,maxWithDefault:s,minWithZeroDefault:r,format:o,snapOnStep:i,small:u,clamp:l}){if(e===null)return e;const d=l?qb(e,n,s):e;if(t!=null&&i){if(t===0)return ma(d,o);let c=r;!u&&n!==Number.MIN_SAFE_INTEGER&&(c=n);const w=Ub(d,c,t,u?"nearest":"directional");return ma(w,o)}return ma(d,o)}const Rl=y.forwardRef(function(t,n){const{id:s,min:r,max:o,smallStep:i=.1,step:u=1,largeStep:l=10,required:d=!1,disabled:c=!1,readOnly:w=!1,name:f,defaultValue:m,value:g,onValueChange:b,onValueCommitted:v,allowWheelScrub:C=!1,snapOnStep:N=!1,allowOutOfRange:S=!1,format:x,locale:T,render:A,className:D,inputRef:I,...k}=t,{setDirty:F,validityData:P,disabled:M,setFilled:V,invalid:W,name:_,state:q,validation:B,shouldValidateOnChange:U}=da(),$=M||c,H=_??f,pe=u==="any"?1:u,[de,De]=y.useState(!1),ge=r??Number.MIN_SAFE_INTEGER,X=o??Number.MAX_SAFE_INTEGER,L=r??0,j=x==null?void 0:x.style,K=y.useRef(null),z=Zn(I,B.inputRef),J=xb({id:s}),[ie,Ae]=ul({controlled:g,default:m,name:"NumberField",state:"value"}),Q=ie??null,be=Al(Q);re(()=>{V(Q!==null)},[V,Q]);const ve=lb(),Be=Al(x),Ue=y.useRef(!1),mt=he((Z,G)=>{Ue.current=!1,v==null||v(Z,G)}),bn=Il(),hs=ib(),yn=Il(),xn=y.useRef(!1),vn=y.useRef(0),Ke=y.useRef(!0),ae=y.useRef(null),st=y.useRef(()=>{}),[gt,ms]=y.useState(()=>g!==void 0?ec(Q,T,x):Ot(Q,T,x)),[zc,Vy]=y.useState("numeric"),$c=he(()=>{const{decimal:Z,group:G,currency:ue,literal:we}=ha(T,x),te=new Set;kb.forEach(ye=>te.add(ye)),Z&&te.add(Z),G&&(te.add(G),Kl.test(G)&&te.add(" "));const ke=j==="percent"||j==="unit"&&(x==null?void 0:x.unit)==="percent",Pe=j==="percent"||j==="unit"&&(x==null?void 0:x.unit)==="permille";return ke&&zl.forEach(ye=>te.add(ye)),Pe&&$l.forEach(ye=>te.add(ye)),j==="currency"&&ue&&te.add(ue),we&&(Array.from(we).forEach(ye=>te.add(ye)),Kl.test(we)&&te.add(" ")),Pb.forEach(ye=>te.add(ye)),ge<0&&_b.forEach(ye=>te.add(ye)),te}),Ft=he(Z=>Z!=null&&Z.altKey?i:Z!=null&&Z.shiftKey?l:pe),gs=he((Z,G)=>{const ue=G.event,we=G.direction,te=G.reason,ke=!S||!(te===ea||te===Rn||te===ta||te===sn||te===Qn),Pe=jb(Z,{step:we?Ft(ue)*we:void 0,format:Be.current,minWithDefault:ge,maxWithDefault:X,minWithZeroDefault:L,snapOnStep:N,small:(ue==null?void 0:ue.altKey)??!1,clamp:ke}),ye=G.reason===ea||G.reason===sn||G.reason===Rn||G.reason===ta||G.reason===Qn,Ma=Pe!==Q||ye&&(Z!==Q||Ke.current===!1);if(Ma){if(ae.current=Pe,b==null||b(Pe,G),G.isCanceled)return Ma;Ae(Pe),F(Pe!==P.initialValue),Ue.current=!0}return Ke.current&&ms(Ot(Pe,T,x)),ve(),Ma}),Nn=he((Z,{direction:G,currentValue:ue,event:we,reason:te})=>{const ke=ue??be.current,Pe=typeof ke=="number"?ke+Z*G:Math.max(0,r??0);return gs(Pe,Ie(te,we,void 0,{direction:G}))}),rt=he(()=>{yn.clear(),bn.clear(),hs.clear(),st.current(),vn.current=0}),Hc=he((Z,G)=>{if(rt(),!K.current)return;const ue=sa(K.current);function we(ke){ke.preventDefault()}ue.addEventListener("contextmenu",we),st.current=()=>{ue.removeEventListener("contextmenu",we)},ue.addEventListener("pointerup",ke=>{xn.current=!1,rt();const Pe=ae.current??be.current;mt(Pe,an(Z?"increment":"decrement",ke))},{once:!0});function te(){const ke=Ft(G)??us;return Nn(ke,{direction:Z?1:-1,event:G,reason:Z?"increment-press":"decrement-press"})}if(!te()){rt();return}bn.start(Fb,()=>{hs.start(Ob,()=>{te()||rt()})})});re(function(){if(!Ke.current)return;const G=g!==void 0?ec(Q,T,x):Ot(Q,T,x);G!==gt&&ms(G)}),re(function(){if(!hb)return;let G="text";ge>=0&&(G="decimal"),Vy(G)},[ge,j]),y.useEffect(()=>()=>rt(),[rt]),y.useEffect(function(){const G=K.current;if($||w||!C||!G)return;function ue(we){if(we.ctrlKey||wb(K.current).activeElement!==K.current)return;we.preventDefault();const te=Ft(we)??us;Nn(te,{direction:we.deltaY>0?-1:1,event:we,reason:"wheel"})}return G.addEventListener("wheel",ue),()=>{G.removeEventListener("wheel",ue)}},[C,Nn,$,w,l,pe,Ft]);const Ea=y.useMemo(()=>({...q,disabled:$,readOnly:w,required:d,value:Q,inputValue:gt,scrubbing:de}),[q,$,w,d,Q,gt,de]),Oy=y.useMemo(()=>({inputRef:K,inputValue:gt,value:Q,startAutoChange:Hc,stopAutoChange:rt,minWithDefault:ge,maxWithDefault:X,disabled:$,readOnly:w,id:J,setValue:gs,incrementValue:Nn,getStepAmount:Ft,allowInputSyncRef:Ke,formatOptionsRef:Be,valueRef:be,lastChangedValueRef:ae,hasPendingCommitRef:Ue,isPressedRef:xn,intentionalTouchCheckTimeout:yn,movesAfterTouchRef:vn,name:H,required:d,invalid:W,inputMode:zc,getAllowedNonNumericKeys:$c,min:r,max:o,setInputValue:ms,locale:T,isScrubbing:de,setIsScrubbing:De,state:Ea,onValueCommitted:mt}),[K,gt,Q,Hc,rt,ge,X,$,w,J,gs,Nn,Ft,Be,be,yn,H,d,W,zc,$c,r,o,ms,T,de,Ea,mt]),Fy=nt("div",t,{ref:n,state:Ea,props:k,stateAttributesMapping:dn});return a.jsxs(ca.Provider,{value:Oy,children:[Fy,a.jsx("input",{...B.getInputValidationProps({onFocus(){var Z;(Z=K.current)==null||Z.focus()},onChange(Z){if(Z.nativeEvent.defaultPrevented)return;const G=Z.currentTarget.valueAsNumber,ue=Number.isNaN(G)?null:G,we=Ie(Qn,Z.nativeEvent);F(ue!==P.initialValue),gs(ue,we),U()&&B.commit(ue)}}),ref:z,type:"number",name:H,value:Q??"",min:r,max:o,step:u,disabled:$,required:d,"aria-hidden":!0,tabIndex:-1,style:H?db:cb})]})});process.env.NODE_ENV!=="production"&&(Rl.displayName="NumberFieldRoot");function ec(e,t,n){return(n==null?void 0:n.maximumFractionDigits)!=null||(n==null?void 0:n.minimumFractionDigits)!=null?Ot(e,t,n):Wl(e,t,n)}const tc=y.forwardRef(function(t,n){const{render:s,className:r,...o}=t,{state:i}=as();return nt("div",t,{ref:n,state:i,props:[{role:"group"},o],stateAttributesMapping:dn})});process.env.NODE_ENV!=="production"&&(tc.displayName="NumberFieldGroup");function hn(e){return e==="touch"||e==="pen"}function nc(e){const{allowInputSyncRef:t,disabled:n,formatOptionsRef:s,getStepAmount:r,id:o,incrementValue:i,inputRef:u,inputValue:l,intentionalTouchCheckTimeout:d,isIncrement:c,isPressedRef:w,locale:f,movesAfterTouchRef:m,readOnly:g,setValue:b,startAutoChange:v,stopAutoChange:C,valueRef:N,lastChangedValueRef:S,onValueCommitted:x}=e,T=y.useRef({x:0,y:0}),A=y.useRef(!1),D=y.useRef(!1),I=y.useRef(""),k=c?"increment-press":"decrement-press";function F(M){t.current=!0;const V=pn(l,f,s.current);V!==null&&(N.current=V,b(V,Ie(k,M,void 0,{direction:c?1:-1})))}return{disabled:n,"aria-readonly":g||void 0,"aria-label":c?"Increase":"Decrease","aria-controls":o,tabIndex:-1,style:{WebkitUserSelect:"none",userSelect:"none"},onTouchStart(){A.current=!0},onTouchEnd(){A.current=!1},onClick(M){const V=n||g;if(M.defaultPrevented||V||(hn(I.current)?D.current:M.detail!==0))return;F(M.nativeEvent);const W=r(M)??us,_=N.current;i(W,{direction:c?1:-1,event:M.nativeEvent,reason:k});const q=S.current??N.current;q!==_&&x(q,an(k,M.nativeEvent))},onPointerDown(M){var _;const V=!M.button||M.button===0;if(M.defaultPrevented||g||!V||n)return;I.current=M.pointerType,D.current=!1,w.current=!0,T.current={x:M.clientX,y:M.clientY},F(M.nativeEvent),hn(M.pointerType)?d.start(Lb,()=>{const q=m.current;m.current=0,w.current&&q!=null&&q<Wb?(v(c,M),D.current=!0):(D.current=!1,C())}):(M.preventDefault(),(_=u.current)==null||_.focus(),v(c,M))},onPointerUp(M){hn(M.pointerType)&&(w.current=!1)},onPointerMove(M){if(n||g||!hn(M.pointerType)||!w.current)return;m.current!=null&&(m.current+=1);const{x:W,y:_}=T.current,q=W-M.clientX,B=_-M.clientY;q**2+B**2>Bb**2&&C()},onMouseEnter(M){const V=n||g;M.defaultPrevented||V||!w.current||A.current||hn(I.current)||v(c,M)},onMouseLeave(){A.current||C()},onMouseUp(){A.current||C()}}}const sc=y.forwardRef(function(t,n){const{render:s,className:r,disabled:o=!1,nativeButton:i=!0,...u}=t,{allowInputSyncRef:l,disabled:d,formatOptionsRef:c,getStepAmount:w,id:f,incrementValue:m,inputRef:g,inputValue:b,intentionalTouchCheckTimeout:v,isPressedRef:C,locale:N,maxWithDefault:S,movesAfterTouchRef:x,readOnly:T,setValue:A,startAutoChange:D,state:I,stopAutoChange:k,value:F,valueRef:P,lastChangedValueRef:M,onValueCommitted:V}=as(),W=F!=null&&F>=S,_=o||d||W,q=nc({isIncrement:!0,inputRef:g,startAutoChange:D,stopAutoChange:k,inputValue:b,disabled:_,readOnly:T,id:f,setValue:A,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:c,valueRef:P,isPressedRef:C,intentionalTouchCheckTimeout:v,movesAfterTouchRef:x,locale:N,lastChangedValueRef:M,onValueCommitted:V}),{getButtonProps:B,buttonRef:U}=aa({disabled:_,native:i,focusableWhenDisabled:!0}),$=y.useMemo(()=>({...I,disabled:_}),[I,_]);return nt("button",t,{ref:[n,U],state:$,props:[q,u,B],stateAttributesMapping:dn})});process.env.NODE_ENV!=="production"&&(sc.displayName="NumberFieldIncrement");const rc=y.forwardRef(function(t,n){const{render:s,className:r,disabled:o=!1,nativeButton:i=!0,...u}=t,{allowInputSyncRef:l,disabled:d,formatOptionsRef:c,getStepAmount:w,id:f,incrementValue:m,inputRef:g,inputValue:b,intentionalTouchCheckTimeout:v,isPressedRef:C,minWithDefault:N,movesAfterTouchRef:S,readOnly:x,setValue:T,startAutoChange:A,state:D,stopAutoChange:I,value:k,valueRef:F,locale:P,lastChangedValueRef:M,onValueCommitted:V}=as(),W=k!=null&&k<=N,_=o||d||W,q=nc({isIncrement:!1,inputRef:g,startAutoChange:A,stopAutoChange:I,inputValue:b,disabled:_,readOnly:x,id:f,setValue:T,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:c,valueRef:F,isPressedRef:C,intentionalTouchCheckTimeout:v,movesAfterTouchRef:S,locale:P,lastChangedValueRef:M,onValueCommitted:V}),{getButtonProps:B,buttonRef:U}=aa({disabled:_,native:i,focusableWhenDisabled:!0}),$=y.useMemo(()=>({...D,disabled:_}),[D,_]);return nt("button",t,{ref:[n,U],state:$,props:[q,u,B],stateAttributesMapping:dn})});process.env.NODE_ENV!=="production"&&(rc.displayName="NumberFieldDecrement");function Gb(e){e.preventDefault(),e.stopPropagation()}function Kb(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const ac=y.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Me,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(ac.displayName="FormContext");function oc(){return y.useContext(ac)}function Yb(e){const{enabled:t=!0,value:n,id:s,name:r,controlRef:o,commit:i}=e,{formRef:u}=oc(),{invalid:l,markedDirtyRef:d,validityData:c,setValidityData:w}=da(),f=he(e.getValue);re(()=>{if(!t)return;let m=n;m===void 0&&(m=f()),c.initialValue===null&&m!==null&&w(g=>({...g,initialValue:m}))},[t,w,n,c.initialValue,f]),re(()=>{!t||!s||u.current.fields.set(s,{getValue:f,name:r,controlRef:o,validityData:Kb(c,l),validate(m=!0){let g=n;g===void 0&&(g=f()),d.current=!0,m?Pa.flushSync(()=>i(g)):i(g)}})},[i,o,t,u,f,s,l,d,r,c,n]),re(()=>{const m=u.current.fields;return()=>{s&&m.delete(s)}},[u,s])}function Xb(e,t){const n=y.useRef(e),s=he(t);re(()=>{n.current!==e&&s(n.current)},[e,s]),re(()=>{n.current=e},[e])}const Zb={..._l,...dn},Jb=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),ic=y.forwardRef(function(t,n){const{render:s,className:r,...o}=t,{allowInputSyncRef:i,disabled:u,formatOptionsRef:l,getAllowedNonNumericKeys:d,getStepAmount:c,id:w,incrementValue:f,inputMode:m,inputValue:g,max:b,min:v,name:C,readOnly:N,required:S,setValue:x,state:T,setInputValue:A,locale:D,inputRef:I,value:k,onValueCommitted:F,lastChangedValueRef:P,hasPendingCommitRef:M,valueRef:V}=as(),{clearErrors:W}=oc(),{validationMode:_,setTouched:q,setFocused:B,invalid:U,shouldValidateOnChange:$,validation:H}=da(),{labelId:pe}=Fl(),de=y.useRef(!1),De=y.useRef(!1);return Yb({id:w,commit:H.commit,value:k,controlRef:I,name:C,getValue:()=>k??null}),Xb(k,L=>{const j=$();if(W(C),j&&H.commit(k),!(L===k||j)){if(De.current){De.current=!1;return}H.commit(k,!0)}}),nt("input",t,{ref:[n,I],state:T,props:[{id:w,required:S,disabled:u,readOnly:N,inputMode:m,value:g,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":U||void 0,"aria-labelledby":pe,suppressHydrationWarning:!0,onFocus(L){if(L.defaultPrevented||N||u||(B(!0),de.current))return;de.current=!0;const j=L.currentTarget,K=j.value.length;j.setSelectionRange(K,K)},onBlur(L){if(L.defaultPrevented||N||u)return;q(!0),B(!1);const j=!i.current,K=M.current;if(i.current=!0,g.trim()===""){x(null,Ie(sn,L.nativeEvent)),_==="onBlur"&&H.commit(null),F(null,an(sn,L.nativeEvent));return}const z=l.current,J=pn(g,D,z);if(J===null)return;const ie=(z==null?void 0:z.maximumFractionDigits)!=null||(z==null?void 0:z.minimumFractionDigits)!=null,Ae=z==null?void 0:z.maximumFractionDigits,Q=ie&&typeof Ae=="number"?Number(J.toFixed(Ae)):J,be=an(Rn,L.nativeEvent),ve=k!==Q,Be=j||ve||K;_==="onBlur"&&H.commit(Q),ve&&(De.current=!0,x(Q,Ie(Rn,L.nativeEvent))),Be&&F(Q,be);const Ue=Ot(Q,D,z),mt=Wl(J,D,z);!(!ie&&J===k&&g===mt)&&g!==Ue&&A(Ue)},onChange(L){if(L.nativeEvent.defaultPrevented)return;i.current=!1;const j=L.target.value;if(j.trim()===""){A(j),x(null,Ie(sn,L.nativeEvent));return}const K=d();if(!Array.from(j).every(ie=>{const Ae=ie>="0"&&ie<="9",Q=fa.test(ie),be=pa.test(ie),ve=jl.test(ie),Be=Gl.test(ie),Ue=fn.test(ie);return Ae||Q||be||ve||Be||Ue||K.has(ie)}))return;const J=pn(j,D,l.current);A(j),J!==null&&x(J,Ie(ea,L.nativeEvent))},onKeyDown(L){if(L.defaultPrevented||N||u)return;const j=L.nativeEvent;i.current=!0;const K=d();let z=K.has(L.key);const{decimal:J,currency:ie,percentSign:Ae}=ha(D,l.current),Q=L.currentTarget.selectionStart,be=L.currentTarget.selectionEnd,ve=Q===0&&be===g.length,Be=ae=>Q!=null&&be!=null&&ae>=Q&&ae<be;if(fn.test(L.key)&&Array.from(K).some(ae=>fn.test(ae||""))){const ae=g.search(Jl),st=ae!=null&&ae!==-1&&Be(ae);z=!(fn.test(g)||is.test(g))||ve||st}if(is.test(L.key)&&Array.from(K).some(ae=>is.test(ae||""))){const ae=g.search(Ql),st=ae!=null&&ae!==-1&&Be(ae);z=!(fn.test(g)||is.test(g))||ve||st}[J,ie,Ae].forEach(ae=>{if(L.key===ae){const st=g.indexOf(ae),gt=Be(st);z=!g.includes(ae)||ve||gt}});const Ue=L.key>="0"&&L.key<="9",mt=fa.test(L.key),bn=pa.test(L.key),hs=Gl.test(L.key),yn=Jb.has(L.key);if(L.which===229||L.altKey||L.ctrlKey||L.metaKey||z||Ue||mt||hs||bn||yn)return;const xn=pn(g,D,l.current),vn=c(L)??us;Gb(L);const Ke=an(rn,j);L.key==="ArrowUp"?(f(vn,{direction:1,currentValue:xn,event:j,reason:rn}),F(P.current??V.current,Ke)):L.key==="ArrowDown"?(f(vn,{direction:-1,currentValue:xn,event:j,reason:rn}),F(P.current??V.current,Ke)):L.key==="Home"&&v!=null?(x(v,Ie(rn,j)),F(P.current??V.current,Ke)):L.key==="End"&&b!=null&&(x(b,Ie(rn,j)),F(P.current??V.current,Ke))},onPaste(L){if(L.defaultPrevented||N||u)return;L.preventDefault();const K=(L.clipboardData||window.Clipboard).getData("text/plain"),z=pn(K,D,l.current);z!==null&&(i.current=!1,x(z,Ie(ta,L.nativeEvent)),A(K))}},H.getValidationProps(),o],stateAttributesMapping:Zb})});process.env.NODE_ENV!=="production"&&(ic.displayName="NumberFieldInput");const Qb={wuStepper:"_wuStepper_apbnq_1"},Rb=({onChange:e,Label:t,defaultValue:n=0,readonly:s,dir:r,step:o=1,min:i,max:u,value:l,className:d,labelPosition:c="left",disabled:w,resetInvalidValueOnBlur:f=!0,...m})=>{const g=y.useId(),[b,v]=y.useState(l!==void 0?Number(l):n||0);y.useEffect(()=>{l!==void 0&&v(Number(l))},[l]);const C=D=>{v(D),e==null||e(D)},N=D=>{const I=Number(D.target.value);Number.isNaN(I)||v(I)},S=()=>{f&&(i!==void 0&&b<i?(v(i),e==null||e(i)):u!==void 0&&b>u&&(v(u),e==null||e(u)))};y.useEffect(()=>{l&&n&&console.warn("As both value and defaultValue are passed, value will be used")},[l,n]);const x={inc:s||u!==void 0&&b>=u||w,dec:s||i!==void 0&&b<=i||w},T=i!==void 0&&b<i||u!==void 0&&b>u,A=p("wu-flex wu-items-center wu-justify-center wu-rounded-none wu-bg-gray-10 wu-w-8 wu-h-8 wu-text-blue-q wu-p-2 wu-absolute wu-top-0 hover:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle");return a.jsxs(Rl,{id:g,value:b,step:o,readOnly:s,onValueChange:D=>typeof D=="number"&&C(D),dir:r,className:p("wu-flex wu-stepper",r==="rtl"&&c!=="top"&&"wu-gap-2",Qb.wuStepper,ey({labelPosition:c}),d),children:[t&&a.jsx(Te,{htmlFor:g,className:"wu-input-label",children:t}),a.jsxs(tc,{className:"wu-flex wu-max-w-[97px] wu-relative",children:[a.jsx(rc,{"aria-label":"decrement",className:p(A,r==="rtl"?"wu-right-0":"wu-left-0","wu-stepper-button"),disabled:x.dec,children:a.jsx("span",{className:"wu-text-base wm-minimize"})}),a.jsx(ic,{"aria-label":"stepper",role:"spinbutton",type:"text","aria-invalid":T||void 0,dir:r,className:p("wu-flex wu-w-[97px] wu-h-8 wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","wu-h-[33px] wu-text-center wu-text-blue-q wu-text-xs wu-rounded-t-sm ","focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle",T&&"wu-border-red-deep focus:wu-border-red-deep","wu-stepper-input"),readOnly:s,onChange:N,onBlur:S,disabled:w,min:i,max:u,step:o,value:b,...m}),a.jsx(sc,{"aria-label":"increment",className:p(A,r==="rtl"?"wu-left-0":"wu-right-0","wu-stepper-button"),disabled:x.inc,children:a.jsx("span",{className:"wu-text-base wm-add"})})]})]})},ey=_e.cva("wu-flex wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row wu-text-right wu-gap-2 wu-items-center",top:"wu-flex-col"}}}),uc=_e.cva("wu-inline-flex wu-items-center wu-justify-center wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-muted hover:wu-text-muted-foreground focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-80",{variants:{variant:{default:"wu-bg-transparent",outline:"wu-border wu-border-input wu-bg-transparent hover:wu-bg-accent hover:wu-text-accent-foreground"},size:{default:"wu-h-10 wu-px-3",sm:"wu-h-9 wu-px-2.5",lg:"wu-h-11 wu-px-5"}},defaultVariants:{variant:"default",size:"default"}}),ty=y.forwardRef(({className:e,variant:t,size:n,...s},r)=>a.jsx(_a.Root,{ref:r,className:p(uc({variant:t,size:n,className:e})),...s}));ty.displayName=_a.Root.displayName;const lc=y.createContext({size:"default",variant:"default"}),ls=y.forwardRef(({className:e,variant:t,size:n,children:s,...r},o)=>a.jsx(Sn.Root,{ref:o,className:p("wu-flex wu-items-center wu-justify-center wu-gap-1",e),...r,children:a.jsx(lc.Provider,{value:{variant:t,size:n},children:s})}));ls.displayName=Sn.Root.displayName;const ht=y.forwardRef(({className:e,children:t,variant:n,size:s,...r},o)=>{const i=y.useContext(lc);return a.jsx(Sn.Item,{ref:o,className:p(uc({variant:i.variant||n,size:i.size||s}),e),...r,children:t})});ht.displayName=Sn.Item.displayName;const cc=h.forwardRef((e,t)=>{const{options:n,value:s,disabled:r,dir:o,onChange:i}=e,u=l=>p("wu-w-8 wu-h-8 wu-text-xl wu-leading-5 wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-p-0 wu-flex wu-items-center wu-justify-center",r&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",l===s&&"wu-text-white",r&&s===l&&"wu-text-gray-lead","wu-switcher-icon-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(ls,{ref:t,type:"single",value:s,onValueChange:i,disabled:r,dir:o,className:p("wu-relative wu-group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-16 wu-bg-gray-25 wu-rounded-full",r&&"wu-cursor-not-allowed","wu-switcher-icon-tab-group"),children:[a.jsx("div",{role:"slider",className:p("wu-absolute wu-z-0 wu-w-8 wu-h-8 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",s==="opt1"&&"",s==="opt2"&&o!=="rtl"&&"wu-translate-x-full",s==="opt2"&&o==="rtl"&&"-wu-translate-x-full",r&&"wu-bg-gray-40","wu-switcher-icon-tab-slider")}),a.jsx(ht,{value:"opt1",className:u("opt1"),children:n[0].label}),a.jsx(ht,{value:"opt2",className:u("opt2"),children:n[1].label})]})})});cc.displayName="_IconTab";const dc=h.forwardRef((e,t)=>{const{options:n,value:s,disabled:r,dir:o,size:i="md",onChange:u}=e,l=d=>p("wu-w-1/2 wu-text-xs wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-font-normal",r&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",d===s&&"wu-text-white wu-font-medium",r&&s===d&&"wu-text-gray-lead","wu-switcher-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(ls,{ref:t,type:"single",value:s,onValueChange:u,disabled:r,dir:o,className:p("wu-relative group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-fit wu-bg-gray-25 wu-rounded-full",r&&"wu-cursor-not-allowed","wu-switcher-tab-group"),children:[a.jsx("div",{role:"slider",className:p("wu-absolute wu-z-0 wu-w-1/2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out ",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",s==="opt1"&&"",s==="opt2"&&o!=="rtl"&&"wu-translate-x-full",s==="opt2"&&o==="rtl"&&"-wu-translate-x-full",r&&"wu-bg-gray-40","wu-switcher-tab-slider")}),a.jsx(ht,{value:"opt1",className:l("opt1"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[0].label})}),a.jsx(ht,{value:"opt2",className:l("opt2"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[1].label})})]})})});dc.displayName="_Tab";const wc=h.forwardRef((e,t)=>{const{options:n,value:s,disabled:r,dir:o,onChange:i}=e,u=w=>p("wu-p-0 wu-w-fit wu-text-xs wu-text-gray-lead wu-h-fit wu-font-normal",r&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle",w===s&&"wu-text-primary wu-font-medium",r&&s===w&&"wu-text-gray-lead","wu-switcher-toggle-item"),l=p("wu-w-fit wu-gap-2",r&&"wu-cursor-not-allowed","wu-switcher-toggle-group"),d=p("wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-3 wu-p-0 wu-border wu-rounded-full wu-cursor-pointer wu-border-blue-p focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2",r&&"wu-border-gray-subtle wu-cursor-not-allowed","wu-switcher-toggle-button"),c=p("wu-w-2 wu-h-2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",s==="opt1"&&o!=="rtl"&&"-wu-translate-x-[10px]",s==="opt1"&&o==="rtl"&&"wu-translate-x-[10px]",s==="opt2"&&o!=="rtl"&&"wu-translate-x-[10px]",s==="opt2"&&o==="rtl"&&"-wu-translate-x-[10px]",r&&"wu-hidden","wu-switcher-toggle-knob");return a.jsx(a.Fragment,{children:a.jsxs(ls,{ref:t,type:"single",value:s,disabled:r,dir:o,className:l,onValueChange:i,children:[a.jsx(ht,{value:"opt1",className:u("opt1"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-text-right wu-switcher-toggle-item-label",children:n[0].label})}),a.jsx("button",{onClick:()=>i(s==="opt1"?"opt2":"opt1"),className:d,disabled:r,"aria-label":"knob",dir:o,children:a.jsx("div",{className:c,role:"knob",dir:o})}),a.jsx(ht,{value:"opt2",className:u("opt2"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-switcher-toggle-item-label",children:n[1].label})})]})})});wc.displayName="_Toggle";const fc=h.forwardRef((e,t)=>{const{type:n,options:s,value:r,disabled:o,dir:i,size:u,onChange:l,toggle:d=!0,...c}=e,[w,f]=h.useState(),m=g=>{let b=w;g!==""?b=g:d&&(b=w==="opt1"?"opt2":"opt1");const v=b==="opt1"?s[0].value:s[1].value;l&&l(v),f(b)};if(h.useEffect(()=>{if(!Array.isArray(s)||s.length<2)throw new Error("Options are not sufficient");f(r===s[0].value?"opt1":"opt2")},[s,r]),!Array.isArray(s)||s.length<2)return a.jsx(a.Fragment,{});switch(n){case"toggle":return a.jsx(wc,{...c,ref:t,options:s,value:w||"opt1",onChange:m,disabled:o,dir:i});case"iconTab":return a.jsx(cc,{ref:t,options:s,value:w||"opt1",onChange:m,disabled:o,dir:i});default:return a.jsx(dc,{ref:t,options:s,value:w||"opt1",onChange:m,disabled:o,dir:i,size:u})}});fc.displayName="WuSwitcher";const pc=it.Root,ga=y.forwardRef(({className:e,children:t,...n},s)=>a.jsx(it.List,{className:p("wu-relative wu-flex",e),...n,ref:s,children:t}));ga.displayName=it.List.displayName;const ba=y.forwardRef(({className:e,...t},n)=>a.jsx(it.Trigger,{ref:n,className:p("wu-relative wu-inline-flex wu-items-center wu-whitespace-nowrap wu-text-xs wu-px-4 wu-py-2 wu-text-gray-600 wu-transition-colors wu-duration-200 data-[state=active]:wu-text-blue-p","data-[orientation=horizontal]:wu-justify-center",e),...t}));ba.displayName=it.Trigger.displayName;const hc=y.forwardRef(({className:e,...t},n)=>a.jsx(it.Content,{ref:n,className:e,...t}));hc.displayName=it.Content.displayName;const mc=({items:e,enableAnimation:t})=>{const n="wu-duration-700 wu-ease-in-out wu-transition-all data-[state=inactive]:wu-absolute data-[state=inactive]:wu-inset-0 data-[state=inactive]:wu-opacity-0 data-[state=inactive]:wu-z-0 data-[state=active]:wu-relative data-[state=active]:wu-opacity-100 data-[state=active]:wu-z-10";return a.jsx("div",{className:p("wu-w-full wu-h-full wu-flex-1 wu-overflow-auto",t&&"wu-relative wu-overflow-hidden","wu-tab-content-container"),children:e.map(s=>a.jsx(hc,{value:s.value,forceMount:t||void 0,className:p("wu-w-full wu-h-full wu-overflow-y-auto",t&&n,"wu-tab-content"),children:s.Content},s.value))})},ny=e=>{const[t,n]=h.useState(!1),[s,r]=h.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollLeft>0),r(u.scrollLeft+u.clientWidth<u.scrollWidth))};return h.useEffect(()=>{const u=e.current;return o(),u&&u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u&&u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showLeftArrow:t,showRightArrow:s,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="right"?l.clientWidth:-l.clientWidth)*.8;l.scrollBy({left:d,behavior:"smooth"})}}}},gc=(e,t)=>{const[n,s]=h.useState({width:0,left:0,height:0,top:0}),r=t==="vertical";return h.useEffect(()=>{const o=e.current;if(o){const i=()=>{const l=o.querySelector('[data-state="active"]');if(l){const d={width:r?2:l.offsetWidth,left:r?0:l.offsetLeft,height:r?l.offsetHeight:1,top:r?l.offsetTop:0};s(d)}},u=new MutationObserver(i);return u.observe(o,{attributes:!0,subtree:!0}),i(),()=>{u.disconnect()}}},[e,r]),n},sy=({items:e,value:t,defaultValue:n,onValueChange:s,enableAnimation:r=!1,className:o,dir:i="ltr",position:u="top"})=>{var S;const l=h.useRef(null),d=gc(l,"horizontal"),{showLeftArrow:c,showRightArrow:w,scrollByTab:f}=ny(l),[m,g]=h.useState(!1),b=()=>f("left"),v=()=>f("right"),C=x=>a.jsx("div",{"data-testid":`gradient-overlay-${x}`,className:p("wu-absolute wu-top-0 wu-h-full wu-w-20 wu-z-10 wu-pointer-events-none",x==="left"?"wu-left-0 wu-bg-gradient-to-r wu-from-white wu-to-transparent":"wu-right-0 wu-bg-gradient-to-l wu-from-white wu-to-transparent")}),N=(x,T,A)=>{const D=T==="left";return a.jsx("button",{onClick:x,className:p("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-h-8",D?"wu-left-0":"wu-right-0",A&&"wu-translate-x-0 wu-opacity-100",!A&&[D?"-wu-translate-x-full":"wu-translate-x-full","wu-opacity-0"]),"aria-label":D?"scroll-left":"scroll-right",children:a.jsx("span",{className:p("wu-text-blue-p wu-text-lg",D?"wm-keyboard-arrow-left":"wm-keyboard-arrow-right")})})};return a.jsxs(pc,{defaultValue:n||((S=e[0])==null?void 0:S.value),value:t,onValueChange:s,orientation:"horizontal",dir:i,className:p("wu-relative wu-flex wu-flex-col wu-w-full wu-h-full",u==="bottom"?"wu-flex-col-reverse":"wu-flex-col",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0 wu-border-b wu-border-gray-200",onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),"aria-label":"tablistWrapper",children:[c&&m&&C("left"),N(b,"left",c&&m),a.jsxs(ga,{ref:l,className:p("wu-relative wu-flex wu-w-full wu-overflow-x-auto wu-flex-row","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(x=>a.jsx(ba,{value:x.value,children:x.Trigger},x.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator wu-bottom-0",style:{width:d.width,left:d.left,height:1.25,bottom:u==="bottom"?void 0:0,top:u==="bottom"?0:void 0}})]}),w&&m&&C("right"),N(v,"right",w&&m)]}),a.jsx(mc,{items:e,enableAnimation:r})]})},ry=e=>{const[t,n]=h.useState(!1),[s,r]=h.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollTop>0),r(u.scrollTop+u.clientHeight<u.scrollHeight))};return h.useEffect(()=>{const u=e.current;if(u)return o(),u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showTopArrow:t,showBottomArrow:s,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="down"?l.clientHeight:-l.clientHeight)*.8;l.scrollBy({top:d,behavior:"smooth"})}}}},ay=({items:e,value:t,defaultValue:n,onValueChange:s,enableAnimation:r=!1,className:o,dir:i="ltr",position:u="left"})=>{var S;const l=h.useRef(null),d=gc(l,"vertical"),{showTopArrow:c,showBottomArrow:w,scrollByTab:f}=ry(l),[m,g]=h.useState(!1),b=()=>f("up"),v=()=>f("down"),C=x=>a.jsx("div",{className:p("wu-absolute wu-left-0 wu-w-full wu-h-12 wu-z-10 wu-pointer-events-none",x==="top"?"wu-top-0 wu-bg-gradient-to-b wu-from-white wu-to-transparent":"wu-bottom-0 wu-bg-gradient-to-t wu-from-white wu-to-transparent")}),N=(x,T,A)=>{const D=T==="up";return a.jsx("button",{onClick:x,className:p("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-w-full",D?"-wu-top-1":"-wu-bottom-1",A&&"wu-translate-y-0 wu-opacity-100",!A&&[D?"-wu-translate-y-full":"wu-translate-y-full","wu-opacity-0"]),"aria-label":D?"scroll-up":"scroll-down",children:a.jsx("span",{className:p("wu-text-blue-p wu-text-lg",D?"wm-keyboard-arrow-up":"wm-keyboard-arrow-down")})})};return a.jsxs(pc,{defaultValue:n||((S=e[0])==null?void 0:S.value),value:t,onValueChange:s,orientation:"vertical",dir:i,className:p("wu-relative wu-h-full wu-w-full wu-flex",u==="left"?"wu-flex-row":"wu-flex-row-reverse",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0",onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),"aria-label":"tablistWrapper",children:[c&&m&&C("top"),N(b,"up",c&&m),a.jsxs(ga,{ref:l,className:p("wu-relative wu-flex wu-h-full wu-overflow-y-auto wu-flex-col","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(x=>a.jsx(ba,{value:x.value,children:x.Trigger},x.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator",style:{width:2,left:u==="left"?0:void 0,right:u==="right"?0:void 0,height:d.height,top:d.top}})]}),w&&m&&C("bottom"),N(v,"down",w&&m)]}),a.jsx(mc,{items:e,enableAnimation:r})]})},oy=({...e})=>e.orientation==="vertical"?a.jsx(ay,{...e}):a.jsx(sy,{...e}),ya=y.forwardRef(({className:e,...t},n)=>a.jsx("table",{ref:n,className:p("wu-w-full wu-caption-bottom wu-text-sm",e),...t}));ya.displayName="Table";const bc=y.forwardRef(({className:e,...t},n)=>a.jsx("thead",{ref:n,className:p("[&_tr]:wu-border-b",e),...t}));bc.displayName="TableHeader";const yc=y.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:p("",e),...t}));yc.displayName="TableBody";const iy=y.forwardRef(({className:e,...t},n)=>a.jsx("tfoot",{ref:n,className:p("wu-border-t wu-bg-muted/50 wu-font-medium [&>tr]:last:wu-border-b-0",e),...t}));iy.displayName="TableFooter";const mn=y.forwardRef(({className:e,...t},n)=>a.jsx("tr",{ref:n,className:p("wu-border-b wu-transition-colors wu-hover:wu-bg-muted/50 data-[state=selected]:wu-bg-muted",e),...t}));mn.displayName="TableRow";const xa=y.forwardRef(({className:e,...t},n)=>a.jsx("th",{ref:n,className:p("wu-px-4 wu-text-left wu-align-middle wu-font-medium wu-text-muted-foreground [&:has([role=checkbox])]:wu-pr-0",e),...t}));xa.displayName="TableHead";const cs=y.forwardRef(({className:e,...t},n)=>a.jsx("td",{ref:n,className:p("wu-p-4 wu-align-middle [&:has([role=checkbox])]:wu-pr-0",e),...t}));cs.displayName="TableCell";const va=y.forwardRef(({className:e,...t},n)=>a.jsx("caption",{ref:n,className:p("wu-mt-4 wu-text-sm wu-text-gray-subtle wu-font-normal",e),...t}));va.displayName="TableCaption";const uy=({columns:e,rowSelection:t})=>{const n=(t==null?void 0:t.isEnabled)??!1,s=(t==null?void 0:t.size)??48,{onRowSelect:r,rowUniqueKey:o,isRowDisabled:i,hideSelectAll:u}=t||{},l=h.useCallback(c=>w=>{r==null||r(w?c:[])},[r]);return{finalColumns:h.useMemo(()=>n?[{id:"select",header:({table:c})=>{const w=c.getRowModel().rows.map(m=>m.original).filter(m=>!(i!=null&&i(m))),f=l(w);return u?a.jsx("div",{}):a.jsx(Fe,{checked:c.getIsSomeRowsSelected()||c.getIsAllRowsSelected(),partial:c.getIsSomeRowsSelected()&&!c.getIsAllRowsSelected(),onChange:m=>{c.toggleAllRowsSelected(!!m),f(!!m)},"aria-label":"Select all","data-testid":c.getIsSomeRowsSelected()&&!c.getIsAllRowsSelected()?"select-partial":"select-all"})},cell:({row:c})=>{const w=(i==null?void 0:i(c.original))??!1;return a.jsx(Fe,{checked:c.getIsSelected(),disabled:w,onChange:f=>{w||c.toggleSelected(!!f)},"aria-label":String(c.original[o])})},filterable:!1,accessorKey:"select",size:s},...e]:e,[e,n,l,i,u])}};function xc({data:e,columns:t,rowSelection:n}){const{finalColumns:s}=uy({columns:t,rowSelection:n}),r=h.useMemo(()=>{if(!(n!=null&&n.isEnabled))return{};const o={};for(const i of n.selectedRows){const u=e.findIndex(l=>l[n.rowUniqueKey]===i[n.rowUniqueKey]);u!==-1&&(o[u]=!0)}return o},[e,n]);return{finalColumns:s,rowSelectionState:r}}const vc=({table:e,size:t,NoDataContent:n,isLoading:s,CustomLoader:r,isRowDisabled:o})=>{var i;return a.jsx(yc,{children:s?a.jsx(mn,{children:a.jsx(cs,{colSpan:e.getAllColumns().length,className:"wu-text-center wu-h-[35vh] wu-loader-container",children:r||a.jsx(Nt,{className:"wu-w-full"})})}):(i=e.getRowModel().rows)!=null&&i.length?e.getRowModel().rows.map((u,l)=>{const d=(o==null?void 0:o(u.original))??!1;return a.jsx(mn,{"data-disabled":d,"data-state":u.getIsSelected()&&"selected",className:p("wu-group wu-transition-colors wu-border-b wu-border-black/[12%]",u.getIsSelected()&&"wu-bg-blue-p/[8%]",!d&&(u.getIsSelected()?"hover:wu-bg-blue-p/[16%]":"hover:wu-bg-black/[2%]")),children:u.getVisibleCells().map((c,w)=>a.jsx(cs,{className:p("wu-py-0 wu-font-light wu-text-xs",t==="compact"?"wu-h-8":"wu-h-10",c.column.id==="actions"?"wu-opacity-0 wu-transition-opacity wu-duration-150 wu-ease-in-out group-hover:wu-opacity-100":"",c.column.columnDef.cellAlign==="right"&&"wu-text-right",c.column.columnDef.cellAlign==="center"&&"wu-text-center",c.column.columnDef.cellAlign==="left"&&"wu-text-left"),children:qe.flexRender(c.column.columnDef.cell,c.getContext())},`${c.id}-${w}`))},`${u.id}-${l}`)}):a.jsx(mn,{children:a.jsx(cs,{colSpan:e.getAllColumns().length,children:n})})})},Nc=({table:e,sortableColumns:t,manual:n=!1,onSort:s,size:r,isRowSelected:o,HeaderAction:i,isStickyHeader:u})=>{const l=r==="compact"?"wu-h-8":"wu-h-10",d=c=>{const{id:w,columnDef:f,getIsSorted:m,toggleSorting:g}=c,{header:b}=f;if(!t.includes(w))return b;const v=m(),C=v==="asc",N=v==="desc",S=()=>{n?(g(!N),s==null||s({id:w,desc:N})):g(c.getIsSorted()==="asc")};return a.jsxs("button",{onClick:S,"aria-label":`Sort by ${b}`,className:"wu-flex wu-items-center wu-gap-4",children:[b,a.jsxs("div",{className:"wu-relative",children:[a.jsx("span",{className:p("wu-absolute -wu-top-[15px] wm-arrow-drop-down wu-text-xl",C&&"wu-hidden",!v&&"-wu-top-[11px]")}),a.jsx("span",{className:p("wu-absolute -wu-bottom-[13px] wm-arrow-drop-up wu-text-xl",N&&"wu-hidden",!v&&"-wu-bottom-[10px]")})]})]})};return a.jsxs(bc,{className:p("wu-border-t wu-border-black/[12%] wu-bg-gray-20 wu-relative",u&&"wu-sticky wu-top-[-.5px] wu-z-10",l),children:[e.getHeaderGroups().map(c=>a.jsx(mn,{className:"wu-relative",children:c.headers.map(w=>w.column.id==="actions"?a.jsx(xa,{colSpan:w.colSpan,className:"wu-text-xs wu-font-medium",style:{width:`${w.getSize()}px`}},w.id):a.jsx(xa,{colSpan:w.colSpan,className:p("wu-text-xs wu-font-medium wu-bg-[#EEEEEE]","wu-relative wu-z-0",w.column.columnDef.headerAlign==="right"&&"wu-text-right",w.column.columnDef.headerAlign==="center"&&"wu-text-center",w.column.columnDef.headerAlign==="left"&&"wu-text-left"),style:{width:`${w.getSize()}px`},children:qe.flexRender(d(w.column),w.getContext())},w.id))},c.id)),o&&i&&a.jsxs("div",{className:p("wu-absolute wu-top-[-1px] wu-left-0 wu-right-0 wu-flex wu-items-center wu-border-b wu-border-t wu-bg-gray-20 wu-z-10",l),children:[a.jsx("div",{className:"wu-flex wu-items-center wu-px-4",style:{width:e.getVisibleLeafColumns()[0].getSize()},children:a.jsx(Fe,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:c=>{e.toggleAllRowsSelected(!!c)},"aria-label":"Select all","data-testid":"select-all-header-checkbox"})}),a.jsx("div",{className:"wu-flex-1 wu-flex wu-pr-4",children:i})]})]})},Sc=_e.cva("",{variants:{variant:{striped:"[&_tr:nth-child(even)]:wu-bg-zinc-50",unstyled:"",bordered:"wu-border-collapse wu-border [&_th]:wu-border [&_td]:wu-border"}}}),ly=({data:e,columns:t,isLoading:n=!1,variant:s="unstyled",sort:r,size:o,rowSelection:i,HeaderAction:u,NoDataContent:l,stickyHeader:d=!1,CustomLoader:c,caption:w,...f})=>{var S;const{finalColumns:m,rowSelectionState:g}=xc({data:e,columns:t,rowSelection:i}),b=h.useMemo(()=>m.filter(x=>x.enableSorting).map(x=>x.accessorKey),[m]),v=((S=i==null?void 0:i.selectedRows)==null?void 0:S.length)??0,C=x=>{if(typeof x=="function"){const T=x(g),A=Object.keys(T).filter(D=>T[Number(D)]).map(D=>e[Number(D)]);i==null||i.onRowSelect(A)}},N=qe.useReactTable({data:e,columns:m,getCoreRowModel:qe.getCoreRowModel(),getPaginationRowModel:qe.getPaginationRowModel(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:i==null?void 0:i.isEnabled,state:{...i!=null&&i.isEnabled?{rowSelection:g}:{}},onRowSelectionChange:C});return a.jsxs("div",{className:p("wu-text-gray-lead wu-table-container wu-relative"),children:[w&&a.jsx(va,{className:"wu-font-light",children:w}),a.jsxs(ya,{...f,className:p(Sc({variant:s}),f.className),children:[a.jsx(Nc,{table:N,sortableColumns:b,manual:!0,onSort:r==null?void 0:r.onSort,size:o,HeaderAction:u,isRowSelected:v>0,isStickyHeader:d}),!n&&a.jsx(vc,{table:N,size:o,NoDataContent:l,CustomLoader:c})]}),n&&a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-h-96",children:a.jsx(Nt,{})})]})},cy=({data:e,columns:t,variant:n="unstyled",size:s="default",sort:r,filterText:o,pagination:i,stickyHeader:u,HeaderAction:l,CustomLoader:d,NoDataContent:c,isLoading:w,caption:f,rowSelection:m,...g})=>{var M;const[b,v]=h.useState((r==null?void 0:r.initial)||[]),[C,N]=h.useState([]),[S,x]=h.useState((i==null?void 0:i.pageIndex)??0),{finalColumns:T,rowSelectionState:A}=xc({data:e,columns:t,rowSelection:m}),D=h.useMemo(()=>T.filter(V=>V.enableSorting).map(V=>V.accessorKey),[T]),I=h.useMemo(()=>T.filter(V=>V.filterable).map(V=>V.accessorKey),[T]),k=((M=m==null?void 0:m.selectedRows)==null?void 0:M.length)??0,F=V=>{const W=typeof V=="function"?V(A):V,_=[],q=m==null?void 0:m.isRowDisabled;for(const B in W){if(!W[B])continue;const U=e[Number(B)];U&&(q!=null&&q(U)||_.push(U))}m==null||m.onRowSelect(_)},P=qe.useReactTable({data:e,columns:T,getCoreRowModel:qe.getCoreRowModel(),getFilteredRowModel:qe.getFilteredRowModel(),getSortedRowModel:qe.getSortedRowModel(),getPaginationRowModel:i?qe.getPaginationRowModel():void 0,enableRowSelection:m!=null&&m.isRowDisabled?V=>!m.isRowDisabled(V.original):!0,state:{sorting:b,columnFilters:C,...i?{pagination:i}:{},...m!=null&&m.isEnabled?{rowSelection:A}:{}},onSortingChange:v,onColumnFiltersChange:N,onRowSelectionChange:F});return h.useEffect(()=>{I.forEach(V=>{var W;(W=P.getColumn(V))==null||W.setFilterValue(o)})},[o,I,P]),h.useEffect(()=>{i&&(i==null?void 0:i.pageIndex)!==S&&(m==null||m.onRowSelect(()=>[]),P.resetRowSelection(),x(i.pageIndex))},[i==null?void 0:i.pageIndex]),a.jsx("div",{className:"wu-text-gray-lead wu-table-container wu-relative",children:a.jsxs(ya,{...g,className:p("wu-overflow-x-auto wu-w-full",Sc({variant:n}),"wu-table-fixed",g.className),children:[f&&a.jsx(va,{children:f}),a.jsx(Nc,{table:P,sortableColumns:D,size:s,HeaderAction:l,isRowSelected:k>0,isStickyHeader:u}),a.jsx(vc,{table:P,size:s,NoDataContent:c,CustomLoader:d,isLoading:w,isRowDisabled:m==null?void 0:m.isRowDisabled})]})})},Cc=y.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:p("wu-flex wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-text-gray-lead wu-p-2 wu-text-sm wu-font-normal wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light focus-visible:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle focus:wu-border-blue-p wu-transition-colors hover:wu-border-gray-40 ",e),ref:n,...t}));Cc.displayName="Textarea";const Tc=h.forwardRef((e,t)=>{const{Label:n,id:s=Cn(),variant:r="flat",readonly:o,maxLength:i,labelPosition:u="top",...l}=e,d=w=>{l.onChange&&l.onChange(w)},c=zt(u);return a.jsxs("div",{className:p(c,"wu-flex wu-textarea-container"),dir:l.dir,children:[a.jsx(Cc,{...l,ref:t,id:s,className:p("wu-peer wu-rounded-t-sm",r==="outlined"?"wu-border wu-border-gray-subtle":"",l.className),onChange:d,readOnly:o,maxLength:i}),n&&a.jsx(Te,{htmlFor:s,className:"wu-textarea-label",children:n})]})});Tc.displayName="WuTextarea";function dy(e){if(typeof e=="string"&&e.includes("T")){const t=Y.parseISO(e);return Y.format(t,"HH:mm")}if(typeof e=="string"&&/^\d{2}:\d{2}:\d{2}$/.test(e)){const t=Y.parse(e,"HH:mm:ss",new Date);return Y.format(t,"HH:mm")}return typeof e=="string"&&/^\d{2}:\d{2}$/.test(e)?e:"00:00"}const Ec=["12",...Array.from({length:11},(e,t)=>String(t+1).padStart(2,"0"))],Mc=Array.from({length:60},(e,t)=>String(t).padStart(2,"0")),Ic=["am","pm"],ds=50;function wy(e){return Array(ds).fill(e).flat()}function Na(e,t){const n=e.indexOf(t);return[...e.slice(n),...e.slice(0,n)]}function fy(e,t){let n=Number(e);return t==="pm"&&n<12&&(n+=12),t==="am"&&n===12&&(n=0),String(n).padStart(2,"0")}function Dc(e){const t=Number(e),n=t>=12?"pm":"am",s=t%12===0?12:t%12;return{hour:String(s),meridiem:n}}const py=({value:e,isSelected:t,onClick:n})=>a.jsx("div",{onClick:n,className:p("wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-text-center wu-snap-start wu-rounded-[2px] wu-cursor-pointer hover:wu-bg-blue-p hover:wu-text-white",t&&"wu-bg-blue-p/15 wu-text-blue-p"),children:e}),Sa=({values:e,selectedValue:t,scrollRef:n,onSelect:s,repeatItems:r=!0,className:o})=>a.jsx("div",{ref:n,className:p("wu-overflow-y-scroll wu-w-8 wu-snap-y wu-snap-mandatory [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",o),role:"presentation",children:(r?wy(e):e).map((i,u)=>a.jsx(py,{value:i,isSelected:i===t,onClick:()=>s(i)},`${i}-${u}`))});function hy(e,t,n,s){const r=h.useMemo(()=>e?Na(Ec,t.padStart(2,"0")):Ec,[e]),o=h.useMemo(()=>e?Na(Mc,n.padStart(2,"0")):Mc,[e]),i=h.useMemo(()=>e?Na(Ic,s):Ic,[e]);return{rotatedHours:r,rotatedMinutes:o,rotatedMeridiem:i}}function my(e,t,n){h.useEffect(()=>{function s(i){if(i){const u=i.scrollHeight/ds,l=Math.floor(ds/2);i.scrollTop=l*u;const d=()=>{const{scrollTop:c}=i,w=Math.round(c/u);(w<=1||w>=ds-2)&&(i.scrollTop=l*u)};return i.addEventListener("scroll",d),()=>{i.removeEventListener("scroll",d)}}}if(!e)return;const r=s(t.current),o=s(n.current);return()=>{r==null||r(),o==null||o()}},[e,t,n])}const Ac=({className:e,time:t,Label:n,labelPosition:s,dir:r,...o})=>{const[i,u]=h.useState(!1),[l,d]=h.useState(""),c=h.useRef(null),w=h.useRef(null),f=h.useRef(null),m=h.useRef(null),[g,b]=h.useState("12"),[v,C]=h.useState("00"),[N,S]=h.useState("am");h.useEffect(()=>{if(!t){d(""),b("12"),C("00"),S("am"),c.current&&(c.current.value="");return}const I=dy(t);d(I);const[k,F]=I.split(":"),{hour:P,meridiem:M}=Dc(k);b(P),C(F),S(M),c.current&&(c.current.value=I)},[t]),h.useEffect(()=>{const I=k=>{w.current&&!w.current.contains(k.target)&&u(!1)};return document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[]),my(i,f,m);const{rotatedHours:x,rotatedMinutes:T,rotatedMeridiem:A}=hy(i,g,v,N),D=h.useCallback((I,k,F)=>{const P=I??g,M=k??v,V=F??N;b(P),C(M),S(V);const W=`${fy(P,V)}:${M}`;d(W)},[g,v,N]);return a.jsxs("div",{className:p("wu-flex wu-gap-1 wu-relative wu-w-fit wu-flex-col",(s==="right"||s==="left")&&"wu-items-center",s==="left"&&"wu-flex-row",s==="right"&&"wu-flex-row-reverse","wu-input-wrapper"),dir:r,children:[n&&a.jsx(Te,{htmlFor:"time-picker",className:"wu-timepicker-label",children:n}),a.jsxs("div",{className:p("relative inline-block"),ref:w,dir:r,children:[a.jsx(je,{ref:c,type:"time",value:l,variant:"flat",role:"textbox",onChange:I=>{d(I.target.value);const[k,F]=I.target.value.split(":"),{hour:P,meridiem:M}=Dc(k);b(P),C(F),S(M)},className:"wu-w-[136px] wu-h-8 wu-pr-6 wu-border wu-border-lead/40 wu-text-gray-lead wu-timepicker-input",style:{WebkitAppearance:"none",MozAppearance:"textfield"},Icon:a.jsx(Ve,{icon:"wm-schedule",className:p("wu-text-base",o.disabled&&"wu-text-lead/50 wu-pointer-events-none wu-opacity-50"),onClick:()=>u(I=>!I),"data-testid":"wu-timepicker-icon"}),iconPosition:"right",dir:r,...o}),a.jsx("style",{children:`
18
+ `))},[JSON.stringify(t)])}const l=y.useCallback(d=>{r||i(d)},[]);return[u,l]}const re=typeof document<"u"?y.useLayoutEffect:()=>{},ht={...y};let ll=0;function Ig(e,t="mui"){const[n,s]=y.useState(e),r=e||n;return y.useEffect(()=>{n==null&&(ll+=1,s(`${t}-${ll}`))},[n,t]),r}const cl=ht.useId;function Ag(e,t){if(cl!==void 0){const n=cl();return e??(t?`${t}-${n}`:n)}return Ig(e,t)}function dl(e){return Ag(e,"base-ui")}const Qn="none",Dg="trigger-press",ea="input-change",sn="input-clear",Rn="input-blur",ta="input-paste",rn="keyboard";function Ie(e,t,n,s){let r=!1,o=!1;const i=s??Ue;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){o=!0},get isCanceled(){return r},get isPropagationAllowed(){return o},trigger:n,...i}}function an(e,t,n){const s=Ue;return{reason:e,event:t??new Event("base-ui"),...s}}const kg=[];function es(e){y.useEffect(e,kg)}const ts=null;let wl=globalThis.requestAnimationFrame;class Pg{constructor(){Ne(this,"callbacks",[]);Ne(this,"callbacksCount",0);Ne(this,"nextId",1);Ne(this,"startId",1);Ne(this,"isScheduled",!1);Ne(this,"tick",t=>{var r;this.isScheduled=!1;const n=this.callbacks,s=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,s>0)for(let o=0;o<n.length;o+=1)(r=n[o])==null||r.call(n,t)})}request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const s=process.env.NODE_ENV!=="production"&&wl!==requestAnimationFrame&&(wl=requestAnimationFrame,!0);return(!this.isScheduled||s)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const ns=new Pg;class oe{constructor(){Ne(this,"currentId",ts);Ne(this,"cancel",()=>{this.currentId!==ts&&(ns.cancel(this.currentId),this.currentId=ts)});Ne(this,"disposeEffect",()=>this.cancel)}static create(){return new oe}static request(t){return ns.request(t)}static cancel(t){return ns.cancel(t)}request(t){this.cancel(),this.currentId=ns.request(()=>{this.currentId=ts,t()})}}function fl(){const e=nt(oe.create).current;return es(e.disposeEffect),e}function _g(e){return e==null?e:"current"in e?e.current:e}let on=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Vg={[on.startingStyle]:""},Og={[on.endingStyle]:""},pl={transitionStatus(e){return e==="starting"?Vg:e==="ending"?Og:null}};function hl(e,t=!1,n=!0){const s=fl();return he((r,o=null)=>{s.cancel();function i(){Pa.flushSync(r)}const u=_g(e);if(u==null)return;const l=u;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)r();else{let d=function(){const w=on.startingStyle;if(!l.hasAttribute(w)){s.request(c);return}const f=new MutationObserver(()=>{l.hasAttribute(w)||(f.disconnect(),c())});f.observe(l,{attributes:!0,attributeFilter:[w]}),o==null||o.addEventListener("abort",()=>f.disconnect(),{once:!0})},c=function(){Promise.all(l.getAnimations().map(w=>w.finished)).then(()=>{o!=null&&o.aborted||i()}).catch(()=>{const w=l.getAnimations();if(n){if(o!=null&&o.aborted)return;i()}else w.length>0&&w.some(f=>f.pending||f.playState!=="finished")&&c()})};if(t){d();return}s.request(c)}})}function Fg(e,t=!1,n=!1){const[s,r]=y.useState(e&&t?"idle":void 0),[o,i]=y.useState(e);return e&&!o&&(i(!0),r("starting")),!e&&o&&s!=="ending"&&!n&&r("ending"),!e&&!o&&s==="ending"&&r(void 0),re(()=>{if(!e&&o&&s!=="ending"&&n){const u=oe.request(()=>{r("ending")});return()=>{oe.cancel(u)}}},[e,o,s,n]),re(()=>{if(!e||t)return;const u=oe.request(()=>{r(void 0)});return()=>{oe.cancel(u)}},[t,e]),re(()=>{if(!e||!t)return;e&&o&&s!=="idle"&&r("starting");const u=oe.request(()=>{r("idle")});return()=>{oe.cancel(u)}},[t,e,o,r,s]),y.useMemo(()=>({mounted:o,setMounted:i,transitionStatus:s}),[o,s])}function Lg(e){const{open:t,defaultOpen:n,onOpenChange:s,disabled:r}=e,o=t!==void 0,[i,u]=ul({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:l,setMounted:d,transitionStatus:c}=Fg(i,!0,!0),[w,f]=y.useState(i),[{height:m,width:g},b]=y.useState({height:void 0,width:void 0}),x=dl(),[S,v]=y.useState(),T=S??x,[N,C]=y.useState(!1),[D,M]=y.useState(!1),I=y.useRef(null),k=y.useRef(null),F=y.useRef(null),P=y.useRef(null),A=hl(P,!1),V=he(W=>{const _=!i,q=Ie(Dg,W.nativeEvent);if(s(_,q),q.isCanceled)return;const B=P.current;k.current==="css-animation"&&B!=null&&B.style.removeProperty("animation-name"),!N&&!D&&(k.current!=null&&k.current!=="css-animation"&&!l&&_&&d(!0),k.current==="css-animation"&&(!w&&_&&f(!0),!l&&_&&d(!0))),u(_),k.current==="none"&&l&&!_&&d(!1)});return re(()=>{o&&k.current==="none"&&!D&&!i&&d(!1)},[o,D,i,t,d]),y.useMemo(()=>({abortControllerRef:I,animationTypeRef:k,disabled:r,handleTrigger:V,height:m,mounted:l,open:i,panelId:T,panelRef:P,runOnceAnimationsFinish:A,setDimensions:b,setHiddenUntilFound:C,setKeepMounted:M,setMounted:d,setOpen:u,setPanelIdState:v,setVisible:f,transitionDimensionRef:F,transitionStatus:c,visible:w,width:g}),[I,k,r,V,m,l,i,T,P,A,b,C,M,d,u,f,F,c,w,g])}const na=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(na.displayName="CollapsibleRootContext");function ml(){const e=y.useContext(na);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.":tn(15));return e}let un=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=on.startingStyle]="startingStyle",e[e.endingStyle=on.endingStyle]="endingStyle",e})({}),Wg=(function(e){return e.panelOpen="data-panel-open",e})({});const Bg={[un.open]:""},qg={[un.closed]:""},zg={open(e){return e?{[Wg.panelOpen]:""}:null}},gl={...{open(e){return e?Bg:qg}},...pl},bl=y.forwardRef(function(t,n){const{render:s,className:r,defaultOpen:o=!1,disabled:i=!1,onOpenChange:u,open:l,...d}=t,c=he(u),w=Lg({open:l,defaultOpen:o,onOpenChange:c,disabled:i}),f=y.useMemo(()=>({open:w.open,disabled:w.disabled,transitionStatus:w.transitionStatus}),[w.open,w.disabled,w.transitionStatus]),m=y.useMemo(()=>({...w,onOpenChange:c,state:f}),[w,c,f]),g=st("div",t,{state:f,ref:n,props:d,stateAttributesMapping:gl});return a.jsx(na.Provider,{value:m,children:g})});process.env.NODE_ENV!=="production"&&(bl.displayName="CollapsibleRoot");function yl(){return typeof window<"u"}function sa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $g(e){return yl()?e instanceof Element||e instanceof sa(e).Element:!1}function Hg(e){return yl()?e instanceof HTMLElement||e instanceof sa(e).HTMLElement:!1}let ra;process.env.NODE_ENV!=="production"&&(ra=new Set);function xl(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ra.has(t)||(ra.add(t),console.error(`Base UI: ${t}`))}}const vl=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(vl.displayName="CompositeRootContext");function Ug(e=!1){const t=y.useContext(vl);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":tn(16));return t}function jg(e){const{focusableWhenDisabled:t,disabled:n,composite:s=!1,tabIndex:r=0,isNativeButton:o}=e,i=s&&t!==!1,u=s&&t===!1;return{props:y.useMemo(()=>{const d={onKeyDown(c){n&&t&&c.key!=="Tab"&&c.preventDefault()}};return s||(d.tabIndex=r,!o&&n&&(d.tabIndex=t?r:-1)),(o&&(t||i)||!o&&n)&&(d["aria-disabled"]=n),o&&(!t||u)&&(d.disabled=n),d},[s,n,t,i,u,o,r])}}function aa(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:s=0,native:r=!0}=e,o=y.useRef(null),i=Ug(!0)!==void 0,u=he(()=>{const f=o.current;return!!((f==null?void 0:f.tagName)==="A"&&(f!=null&&f.href))}),{props:l}=jg({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:s,isNativeButton:r});process.env.NODE_ENV!=="production"&&y.useEffect(()=>{var m,g;if(!o.current)return;const f=o.current.tagName==="BUTTON";if(r){if(!f){const b=((m=ht.captureOwnerStack)==null?void 0:m.call(ht))||"";xl(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${b}`)}}else if(f){const b=((g=ht.captureOwnerStack)==null?void 0:g.call(ht))||"";xl(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${b}`)}},[r]);const d=y.useCallback(()=>{const f=o.current;Gg(f)&&i&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,i]);re(d,[d]);const c=y.useCallback((f={})=>{const{onClick:m,onMouseDown:g,onKeyUp:b,onKeyDown:x,onPointerDown:S,...v}=f;return al({type:r?"button":void 0,onClick(N){if(t){N.preventDefault();return}m==null||m(N)},onMouseDown(N){t||g==null||g(N)},onKeyDown(N){if(t||(Rr(N),x==null||x(N)),N.baseUIHandlerPrevented)return;const C=N.target===N.currentTarget&&!r&&!u()&&!t,D=N.key==="Enter",M=N.key===" ";C&&((M||D)&&N.preventDefault(),D&&(m==null||m(N)))},onKeyUp(N){t||(Rr(N),b==null||b(N)),!N.baseUIHandlerPrevented&&N.target===N.currentTarget&&!r&&!t&&N.key===" "&&(m==null||m(N))},onPointerDown(N){if(t){N.preventDefault();return}S==null||S(N)}},r?void 0:{role:"button"},l,v)},[t,l,r,u]),w=he(f=>{o.current=f,d()});return{getButtonProps:c,buttonRef:w}}function Gg(e){return Hg(e)&&e.tagName==="BUTTON"}const Kg={...zg,...pl},Nl=y.forwardRef(function(t,n){const{panelId:s,open:r,handleTrigger:o,state:i,disabled:u}=ml(),{className:l,disabled:d=u,id:c,render:w,nativeButton:f=!0,...m}=t,{getButtonProps:g,buttonRef:b}=aa({disabled:d,focusableWhenDisabled:!0,native:f}),x=y.useMemo(()=>({"aria-controls":r?s:void 0,"aria-expanded":r,onClick:o}),[s,r,o]);return st("button",t,{state:i,ref:[n,b],props:[x,m,g],stateAttributesMapping:Kg})});process.env.NODE_ENV!=="production"&&(Nl.displayName="CollapsibleTrigger");let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function Sl(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");oa.has(t)||(oa.add(t),console.warn(`Base UI: ${t}`))}}let Yg=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function Xg(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:s,height:r,hiddenUntilFound:o,keepMounted:i,id:u,mounted:l,onOpenChange:d,open:c,panelRef:w,runOnceAnimationsFinish:f,setDimensions:m,setMounted:g,setOpen:b,setVisible:x,transitionDimensionRef:S,visible:v,width:T}=e,N=y.useRef(!1),C=y.useRef(null),D=y.useRef(c),M=y.useRef(c),I=fl(),k=y.useMemo(()=>n.current==="css-animation"?!v:!c&&!l,[c,l,v,n]),F=he(A=>{if(!A)return;if(n.current==null||S.current==null){const _=getComputedStyle(A),q=_.animationName!=="none"&&_.animationName!=="",B=_.transitionDuration!=="0s"&&_.transitionDuration!=="";q&&B?process.env.NODE_ENV!=="production"&&Sl("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.","Only one of either animation type should be used."):_.animationName==="none"&&_.transitionDuration!=="0s"?n.current="css-transition":_.animationName!=="none"&&_.transitionDuration==="0s"?n.current="css-animation":n.current="none",A.getAttribute(Yg.orientation)==="horizontal"||_.transitionProperty.indexOf("width")>-1?S.current="width":S.current="height"}if(n.current!=="css-transition")return;(r===void 0||T===void 0)&&(m({height:A.scrollHeight,width:A.scrollWidth}),M.current&&A.style.setProperty("transition-duration","0s"));let V=-1,W=-1;return V=oe.request(()=>{M.current=!1,W=oe.request(()=>{setTimeout(()=>{A.style.removeProperty("transition-duration")})})}),()=>{oe.cancel(V),oe.cancel(W)}}),P=Zn(s,w,F);return re(()=>{if(n.current!=="css-transition")return;const A=w.current;if(!A)return;let V=-1;if(t.current!=null&&(t.current.abort(),t.current=null),c){const W={"justify-content":A.style.justifyContent,"align-items":A.style.alignItems,"align-content":A.style.alignContent,"justify-items":A.style.justifyItems};Object.keys(W).forEach(_=>{A.style.setProperty(_,"initial","important")}),!M.current&&!i&&A.setAttribute(un.startingStyle,""),m({height:A.scrollHeight,width:A.scrollWidth}),V=oe.request(()=>{Object.entries(W).forEach(([_,q])=>{q===""?A.style.removeProperty(_):A.style.setProperty(_,q)})})}else{if(A.scrollHeight===0&&A.scrollWidth===0)return;m({height:A.scrollHeight,width:A.scrollWidth});const W=new AbortController;t.current=W;const _=W.signal;let q=null;const B=un.endingStyle;return q=new MutationObserver(U=>{U.some(H=>H.type==="attributes"&&H.attributeName===B)&&(q==null||q.disconnect(),q=null,f(()=>{m({height:0,width:0}),A.style.removeProperty("content-visibility"),g(!1),t.current===W&&(t.current=null)},_))}),q.observe(A,{attributes:!0,attributeFilter:[B]}),()=>{q==null||q.disconnect(),I.cancel(),t.current===W&&(W.abort(),t.current=null)}}return()=>{oe.cancel(V)}},[t,n,I,o,i,l,c,w,f,m,g]),re(()=>{if(n.current!=="css-animation")return;const A=w.current;A&&(C.current=A.style.animationName||C.current,A.style.setProperty("animation-name","none"),m({height:A.scrollHeight,width:A.scrollWidth}),!D.current&&!N.current&&A.style.removeProperty("animation-name"),c?(t.current!=null&&(t.current.abort(),t.current=null),g(!0),x(!0)):(t.current=new AbortController,f(()=>{g(!1),x(!1),t.current=null},t.current.signal)))},[t,n,c,w,f,m,g,x,v]),es(()=>{const A=oe.request(()=>{D.current=!1});return()=>oe.cancel(A)}),re(()=>{if(!o)return;const A=w.current;if(!A)return;let V=-1,W=-1;return c&&N.current&&(A.style.transitionDuration="0s",m({height:A.scrollHeight,width:A.scrollWidth}),V=oe.request(()=>{N.current=!1,W=oe.request(()=>{setTimeout(()=>{A.style.removeProperty("transition-duration")})})})),()=>{oe.cancel(V),oe.cancel(W)}},[o,c,w,m]),re(()=>{const A=w.current;A&&o&&k&&(A.setAttribute("hidden","until-found"),n.current==="css-transition"&&A.setAttribute(un.startingStyle,""))},[o,k,n,w]),y.useEffect(function(){const V=w.current;if(!V)return;function W(_){N.current=!0,b(!0),d(!0,Ie(Qn,_))}return V.addEventListener("beforematch",W),()=>{V.removeEventListener("beforematch",W)}},[d,w,b]),y.useMemo(()=>({props:{hidden:k,id:u,ref:P}}),[k,u,P])}let Cl=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});function Zg(e){const{enabled:t=!0,open:n,ref:s,onComplete:r}=e,o=he(r),i=hl(s,n,!1);y.useEffect(()=>{if(!t)return;const u=new AbortController;return i(o,u.signal),()=>{u.abort()}},[t,n,o,i])}const Tl=y.forwardRef(function(t,n){const{className:s,hiddenUntilFound:r,keepMounted:o,render:i,id:u,...l}=t;process.env.NODE_ENV!=="production"&&re(()=>{r&&o===!1&&Sl("The `keepMounted={false}` prop on a Collapsible will be ignored when using `hiddenUntilFound` since it requires the Panel to remain mounted even when closed.")},[r,o]);const{abortControllerRef:d,animationTypeRef:c,height:w,mounted:f,onOpenChange:m,open:g,panelId:b,panelRef:x,runOnceAnimationsFinish:S,setDimensions:v,setHiddenUntilFound:T,setKeepMounted:N,setMounted:C,setPanelIdState:D,setOpen:M,setVisible:I,state:k,transitionDimensionRef:F,visible:P,width:A,transitionStatus:V}=ml(),W=r??!1,_=o??!1;re(()=>{if(u)return D(u),()=>{D(void 0)}},[u,D]),re(()=>{T(W)},[T,W]),re(()=>{N(_)},[N,_]);const{props:q}=Xg({abortControllerRef:d,animationTypeRef:c,externalRef:n,height:w,hiddenUntilFound:W,id:b,keepMounted:_,mounted:f,onOpenChange:m,open:g,panelRef:x,runOnceAnimationsFinish:S,setDimensions:v,setMounted:C,setOpen:M,setVisible:I,transitionDimensionRef:F,visible:P,width:A});Zg({open:g&&V==="idle",ref:x,onComplete(){g&&v({height:void 0,width:void 0})}});const B=y.useMemo(()=>({...k,transitionStatus:V}),[k,V]),U=st("div",t,{state:B,ref:[n,x],props:[q,{style:{[Cl.collapsiblePanelHeight]:w===void 0?"auto":`${w}px`,[Cl.collapsiblePanelWidth]:A===void 0?"auto":`${A}px`}},l],stateAttributesMapping:gl});return _||W||!_&&f?U:null});process.env.NODE_ENV!=="production"&&(Tl.displayName="CollapsiblePanel");const Jg=({children:e,Sidebar:t,className:n,defaultOpen:s=!0,open:r,onOpenChange:o,style:i})=>a.jsxs(Hu,{defaultOpen:s,open:r,onOpenChange:o,children:[a.jsxs(Uu,{variant:"sidebar",collapsible:"icon",className:p("wu-top-12 wu-h-[calc(100%-48px)] wu-shadow-sidebar wu-border-none",n),style:i,role:"complementary",children:[a.jsx(Ku,{className:"wu-py-2",children:a.jsx(El,{})}),t]}),a.jsx(Gu,{className:"wu-contain-inline-size",children:e})]}),El=e=>{const{state:t,isMobile:n,openMobile:s}=tt();return a.jsx(ju,{...e,children:a.jsx($r,{showMenu:n?s:t==="expanded"})})},Qg=({className:e,children:t,...n})=>{const s=h.useRef(null),r=h.useRef(null),o=({currentTarget:u})=>{const{scrollTop:l,clientHeight:d,scrollHeight:c}=u;s.current&&s.current.classList.toggle("wu-border-[#1b338014]",l!==0),r.current&&r.current.classList.toggle("wu-border-[#1b338014]",l+d!==c)},i="wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent";return a.jsxs(Xu,{...n,className:p("wu-overflow-hidden wu-gap-0",e),children:[a.jsx("hr",{className:i,ref:s}),a.jsx(Vt,{onScroll:o,className:"wu-gap-2",thumbColor:"#b9c3dc",railColor:"#00000000","data-testid":"scroll-area",children:t}),a.jsx("hr",{className:i,ref:r})]})},Rg=e=>a.jsx(Yu,{...e,children:e.children}),eb=({label:e,children:t,...n})=>a.jsxs(Zu,{...n,className:"wu-p-0",children:[a.jsx("div",{className:"wu-h-8",children:a.jsx(Ju,{className:"wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q",children:e})}),a.jsx(Qu,{children:a.jsx(Xr,{children:t})})]}),tb=e=>a.jsx(Xr,{...e}),Ml=({Icon:e,children:t,className:n,isActive:s,...r})=>{var w;const{state:o}=tt(),[i,u]=h.useState(),l=Yr(),d=h.isValidElement(t)?h.cloneElement(t,{children:a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[e,a.jsx("span",{className:p("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&!l&&"wu-opacity-0"),children:(w=t.props)==null?void 0:w.children})]})}):t&&a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[e,a.jsx("span",{className:p("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&!l&&"wu-opacity-0"),children:t})]}),c=h.useRef(null);return h.useEffect(()=>{var f;u(((f=c.current)==null?void 0:f.textContent)||"")},[]),a.jsx(Ru,{...r,className:"wu-flex wu-items-center wu-gap-2 wu-px-2",children:a.jsx(el,{className:p("wu-flex wu-items-center wu-text-blue-q hover:wu-bg-blue-sidebarHover wu-cursor-pointer wu-h-8 wu-rounded-sm",n,s&&"wu-bg-white wu-shadow-[4px_4px_16px_0_#1B338014] wu-font-medium wu-text-blue-p hover:wu-bg-white wu-cursor-default"),isActive:s,tooltip:i,asChild:h.isValidElement(t),ref:c,children:d})})},nb=({Title:e,Icon:t,children:n,className:s,...r})=>{const{state:o}=tt(),i=Yr();return a.jsxs(bl,{children:[a.jsx(Nl,{render:u=>{const l="data-panel-open"in u;return a.jsxs(Ml,{Icon:t,...u,children:[e,(o==="expanded"||i)&&a.jsx(Ve,{icon:"wm-arrow-forward-ios",className:p("wu-absolute wu-right-4 wu-transition-transform wu-duration-300",l&&"wu-rotate-90","wu-scale-75")})]})}}),a.jsx(Tl,{className:p(o==="collapsed"?"":"wu-pl-2","wu-h-[var(--collapsible-panel-height)] wu-overflow-hidden","wu-transition-all wu-duration-300 wu-ease-in-out","data-[starting-style]:wu-h-0 data-[ending-style]:wu-h-0",'[&[hidden]:not([hidden="until-found"])]:wu-hidden',s),...r,children:n})]})},sb=new Map([[-3,{top:-20,left:-4,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-2,{top:0,left:0,zIndex:1,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-1,{top:20,left:4,zIndex:2,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[0,{top:40,left:8,zIndex:3,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.10s",position:"absolute"}],[1,{left:12,zIndex:4,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[2,{left:16,zIndex:5,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[3,{left:20,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}]]),ia=(e,t,n=1)=>{const s=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);if(!s)throw new Error("Invalid HSL color format");const r=parseFloat(s[1]),o=parseFloat(s[2]),i=Math.max(0,parseFloat(s[3])+t);return`hsl(${r} ${o}% ${i}% / ${n})`},rb=({index:e,viewIndex:t,length:n,itemHeight:s})=>{const r=(e-t+n)%n;let o;r===0?o=0:r===n-1&&n>=2?o=-1:r===n-2&&n>=3?o=-2:r===1?o=1:r===2?o=2:r===n-3&&n>=4?o=-3:o=3;const i=sb.get(o)||{},u=o>0?s+28+(o-1)*20:i.top;return{position:o,styles:{...i,...o>0&&{top:`${u}px`},height:o>0?"32px":s}}},ln={LIGHTNESS_STEP:8,BORDER_LIGHTNESS:10,CONTENT_HEIGHT:"calc(100% - 2rem)",FONT_SIZE_ACTIVE:"14px",FONT_SIZE_INACTIVE:"12px"},ab=({children:e,className:t,header:n,baseColor:s,position:r=0,style:o,...i})=>{const u=r<=0,l=r===0,d={border:l?`4px solid ${ia(s,ln.BORDER_LIGHTNESS)}`:"",...o},c={backgroundColor:ia(s,r*ln.LIGHTNESS_STEP),fontSize:l?ln.FONT_SIZE_ACTIVE:ln.FONT_SIZE_INACTIVE,transition:"all 0.3s ease",position:"relative",bottom:r<0?"4px":"0px",height:"32px",padding:"4px 8px"},w={backgroundColor:ia(s,45+r*6),height:ln.CONTENT_HEIGHT,position:"relative",bottom:r<0?"4px":"0px"};return a.jsxs("div",{className:p("wu-font-normal wu-transition-all wu-rounded-lg wu-overflow-hidden wu-w-full wu-cursor-pointer hover:-wu-translate-y-2",t),style:d,...i,children:[a.jsx("div",{style:c,className:"wu-text-white",children:n}),u&&a.jsx("div",{className:"wu-p-2 wu-overflow-y-auto wu-text-sm",style:w,children:e})]})},ob=({children:e,Trigger:t,Header:n,styles:s={},classNames:r={},open:o,onOpenChange:i,itemHeight:u})=>{const l={height:u,...s.Trigger};return a.jsxs(Su,{open:o,onOpenChange:i,children:[a.jsx(Cu,{className:p("wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative",r.Trigger),style:l,children:a.jsx("span",{className:"wu-absolute wu-text-xs wu-font-medium wu-bg-gray-25 -wu-top-6 wu-left-0 wu-p-1 wu-rounded-t-lg",children:t})}),a.jsxs(Hr,{className:p("wu-top-[50%] wu-left-[50%] wu-bg-black/75 wu-backdrop-blur-[4px] wu-min-h-full wu-overflow-auto wu-shadow-none wu-max-w-none wu-border-none wu-text-white",r.Content),hideCloseButton:!0,isStackedCard:!0,style:s.Content,children:[a.jsx(jr,{}),a.jsx(Aa.DialogClose,{className:p("wu-absolute wu-right-2 wu-top-2 wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-z-10",r.CloseButton),style:s.CloseButton,"aria-label":"Close dialog",children:a.jsx(Ve,{icon:"wm-close",className:"wu-text-lg wu-m-4 wu-cursor-pointer"})}),n&&a.jsx(Ur,{className:p("wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]",r.Header),style:s.Header,children:n}),e]})]})},cn=0;class ss{constructor(){Ne(this,"currentId",cn);Ne(this,"clear",()=>{this.currentId!==cn&&(clearTimeout(this.currentId),this.currentId=cn)});Ne(this,"disposeEffect",()=>this.clear)}static create(){return new ss}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=cn,n()},t)}isStarted(){return this.currentId!==cn}}function Il(){const e=nt(ss.create).current;return es(e.disposeEffect),e}const Al=0;class ua extends ss{constructor(){super(...arguments);Ne(this,"clear",()=>{this.currentId!==Al&&(clearInterval(this.currentId),this.currentId=Al)})}static create(){return new ua}start(n,s){this.clear(),this.currentId=setInterval(()=>{s()},n)}}function ib(){const e=nt(ua.create).current;return es(e.disposeEffect),e}function Dl(e){const t=nt(ub,e).current;return t.next=e,re(t.effect),t}function ub(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function lb(){const[,e]=y.useState({});return y.useCallback(()=>{e({})},[])}const kl={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},cb={...kl,position:"fixed",top:0,left:0},db={...kl,position:"absolute"};function wb(e){return(e==null?void 0:e.ownerDocument)||document}const rs=typeof navigator<"u",la=mb(),fb=bb(),pb=gb();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none");const hb=la.platform==="MacIntel"&&la.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(la.platform);rs&&fb.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints,pb.includes("jsdom/");function mb(){if(!rs)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function gb(){if(!rs)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function bb(){if(!rs)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const ca=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(ca.displayName="NumberFieldRootContext");function as(){const e=y.useContext(ca);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.":tn(43));return e}let Pl=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const yb={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},_l={valid(e){return e===null?null:e?{[Pl.valid]:""}:{[Pl.invalid]:""}}},Vl=y.createContext({invalid:void 0,name:void 0,validityData:{state:yb,errors:[],error:"",value:"",initialValue:null},setValidityData:Me,disabled:void 0,touched:!1,setTouched:Me,dirty:!1,setDirty:Me,filled:!1,setFilled:Me,focused:!1,setFocused:Me,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Ue)=>e,getInputValidationProps:(e=Ue)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Vl.displayName="FieldRootContext");function da(e=!0){const t=y.useContext(Vl);if(t.setValidityData===Me&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":tn(28));return t}const Ol=y.createContext({controlId:void 0,registerControlId:Me,labelId:void 0,setLabelId:Me,messageIds:[],setMessageIds:Me,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(Ol.displayName="LabelableContext");function Fl(){return y.useContext(Ol)}function xb(e={}){const{id:t,implicit:n=!1,controlRef:s}=e,{controlId:r,registerControlId:o}=Fl(),i=dl(t),u=n?r:void 0,l=nt(()=>Symbol("labelable-control")),d=y.useRef(!1),c=y.useRef(t!=null),w=he(()=>{!d.current||o===Me||(d.current=!1,o(l.current,void 0))});return re(()=>{if(o===Me)return;let f;if(n){const m=s==null?void 0:s.current;$g(m)&&m.closest("label")!=null?f=t??null:f=u??i}else if(t!=null)c.current=!0,f=t;else if(c.current)f=i;else{w();return}if(f===void 0){w();return}d.current=!0,o(l.current,f)},[t,s,u,o,n,i,l,w]),y.useEffect(()=>w,[w]),r??i}const dn={inputValue:()=>null,value:()=>null,..._l},Ll=new Map;function wn(e,t){const n=JSON.stringify({locale:e,options:t}),s=Ll.get(n);if(s)return s;const r=new Intl.NumberFormat(e,t);return Ll.set(n,r),r}function Ot(e,t,n){return e==null?"":wn(t,n).format(e)}function Wl(e,t,n){return Ot(e,t,{...n,maximumFractionDigits:20})}const vb=["零","〇","一","二","三","四","五","六","七","八","九"],Nb={零:"0","〇":"0",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9"},Bl=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],ql=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],wa=["0","1","2","3","4","5","6","7","8","9"],zl=["%","٪","%","﹪"],$l=["‰","؉"],Hl=["−","-","‒","–","—","﹣"],Ul=["+","﹢"],Sb=".",Cb=",",Tb=new RegExp(`[${Bl.join("")}]`,"g"),Eb=new RegExp(`[${ql.join("")}]`,"g"),Mb=new RegExp(`[${wa.join("")}]`,"g"),Ib=new RegExp(`[${vb.join("")}]`,"g"),Ab=new RegExp(`[${zl.join("")}]`),Db=new RegExp(`[${$l.join("")}]`),fa=/[٠١٢٣٤٥٦٧٨٩]/,jl=/[۰۱۲۳۴۵۶۷۸۹]/,pa=/[零〇一二三四五六七八九]/,Gl=new RegExp(`[${wa.join("")}]`),kb=[".",",",Sb,Cb,"٫","٬"],Kl=new RegExp("\\p{Zs}","u"),Pb=["+",...Ul],_b=["-",...Hl],os=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Vb=e=>e.replace(/[-\\\]^]/g,t=>`\\${t}`),Yl=e=>`[${e.map(Vb).join("")}]`,Xl=Yl(["-"].concat(Hl)),Zl=Yl(["+"].concat(Ul)),Jl=new RegExp(Xl,"gu"),Ql=new RegExp(Zl,"gu"),fn=new RegExp(Xl),is=new RegExp(Zl);function ha(e,t){const n=wn(e,t).formatToParts(11111.1),s={};return n.forEach(r=>{s[r.type]=r.value}),wn(e).formatToParts(.1).forEach(r=>{r.type==="decimal"&&(s[r.type]=r.value)}),s}function pn(e,t,n){if(e==null)return null;let s=String(e).replace(new RegExp("\\p{Cf}","gu"),"").trim();s=s.replace(Jl,"-").replace(Ql,"+");let r=!1;const o=s.match(/([+-])\s*$/);o&&(o[1]==="-"&&(r=!0),s=s.replace(/([+-])\s*$/,""));const i=s.match(/^\s*([+-])/);i&&(i[1]==="-"&&(r=!0),s=s.replace(/^\s*[+-]/,""));let u=t;u===void 0&&(fa.test(s)||jl.test(s)?u="ar":pa.test(s)&&(u="zh"));const{group:l,decimal:d,currency:c}=ha(u,n),w=wn(u,n).formatToParts(1).filter(M=>M.type==="unit").map(M=>os(M.value)),f=w.length?new RegExp(w.join("|"),"g"):null;let m=null;l&&(new RegExp("\\p{Zs}","u").test(l)?m=new RegExp("\\p{Zs}","gu"):l==="'"||l==="’"?m=/['’]/g:m=new RegExp(os(l),"g"));let b=[{regex:l?m:null,replacement:""},{regex:d?new RegExp(os(d),"g"):null,replacement:"."},{regex:/./g,replacement:"."},{regex:/,/g,replacement:""},{regex:/٫/g,replacement:"."},{regex:/٬/g,replacement:""},{regex:c?new RegExp(os(c),"g"):null,replacement:""},{regex:f,replacement:""},{regex:Tb,replacement:M=>String(Bl.indexOf(M))},{regex:Eb,replacement:M=>String(ql.indexOf(M))},{regex:Mb,replacement:M=>String(wa.indexOf(M))},{regex:Ib,replacement:M=>Nb[M]}].reduce((M,{regex:I,replacement:k})=>I?M.replace(I,k):M,s);const x=b.lastIndexOf(".");if(x!==-1&&(b=`${b.slice(0,x).replace(/\./g,"")}.${b.slice(x+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(s)||/[∞]/.test(s))return null;const S=(r?"-":"")+b;let v=parseFloat(S);const T=n==null?void 0:n.style,N=T==="unit"&&(n==null?void 0:n.unit)==="percent",C=Ab.test(e)||T==="percent";return Db.test(e)?v/=1e3:!N&&C&&(v/=100),Number.isNaN(v)?null:v}const Ob=60,Fb=400,Lb=50,Wb=3,Bb=8,us=1;function qb(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const zb=1e-10;function $b(e){const t=wn("en-US").resolvedOptions(),n=(e==null?void 0:e.minimumFractionDigits)??t.minimumFractionDigits??0;return{maximumFractionDigits:Math.max((e==null?void 0:e.maximumFractionDigits)??t.maximumFractionDigits??20,n),minimumFractionDigits:n}}function Hb(e,t){if(!Number.isFinite(e))return e;const n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function ma(e,t){const{maximumFractionDigits:n}=$b(t);return Hb(e,n)}function Ub(e,t,n,s="directional"){if(n===0)return e;const r=Math.abs(n),o=Math.sign(n),i=r*zb*o,u=s==="nearest"?n:r,l=(e-t+i)/u;let d;return s==="nearest"?d=Math.round(l):o>0?d=Math.floor(l):d=Math.ceil(l),t+d*(s==="nearest"?n:r)}function jb(e,{step:t,minWithDefault:n,maxWithDefault:s,minWithZeroDefault:r,format:o,snapOnStep:i,small:u,clamp:l}){if(e===null)return e;const d=l?qb(e,n,s):e;if(t!=null&&i){if(t===0)return ma(d,o);let c=r;!u&&n!==Number.MIN_SAFE_INTEGER&&(c=n);const w=Ub(d,c,t,u?"nearest":"directional");return ma(w,o)}return ma(d,o)}const Rl=y.forwardRef(function(t,n){const{id:s,min:r,max:o,smallStep:i=.1,step:u=1,largeStep:l=10,required:d=!1,disabled:c=!1,readOnly:w=!1,name:f,defaultValue:m,value:g,onValueChange:b,onValueCommitted:x,allowWheelScrub:S=!1,snapOnStep:v=!1,allowOutOfRange:T=!1,format:N,locale:C,render:D,className:M,inputRef:I,...k}=t,{setDirty:F,validityData:P,disabled:A,setFilled:V,invalid:W,name:_,state:q,validation:B,shouldValidateOnChange:U}=da(),$=A||c,H=_??f,pe=u==="any"?1:u,[de,Ae]=y.useState(!1),ge=r??Number.MIN_SAFE_INTEGER,X=o??Number.MAX_SAFE_INTEGER,L=r??0,j=N==null?void 0:N.style,K=y.useRef(null),z=Zn(I,B.inputRef),J=xb({id:s}),[ie,De]=ul({controlled:g,default:m,name:"NumberField",state:"value"}),Q=ie??null,be=Dl(Q);re(()=>{V(Q!==null)},[V,Q]);const ve=lb(),Be=Dl(N),je=y.useRef(!1),gt=he((Z,G)=>{je.current=!1,x==null||x(Z,G)}),bn=Il(),hs=ib(),yn=Il(),xn=y.useRef(!1),vn=y.useRef(0),Ye=y.useRef(!0),ae=y.useRef(null),rt=y.useRef(()=>{}),[bt,ms]=y.useState(()=>g!==void 0?ec(Q,C,N):Ot(Q,C,N)),[zc,Vy]=y.useState("numeric"),$c=he(()=>{const{decimal:Z,group:G,currency:ue,literal:we}=ha(C,N),te=new Set;kb.forEach(ye=>te.add(ye)),Z&&te.add(Z),G&&(te.add(G),Kl.test(G)&&te.add(" "));const ke=j==="percent"||j==="unit"&&(N==null?void 0:N.unit)==="percent",Pe=j==="percent"||j==="unit"&&(N==null?void 0:N.unit)==="permille";return ke&&zl.forEach(ye=>te.add(ye)),Pe&&$l.forEach(ye=>te.add(ye)),j==="currency"&&ue&&te.add(ue),we&&(Array.from(we).forEach(ye=>te.add(ye)),Kl.test(we)&&te.add(" ")),Pb.forEach(ye=>te.add(ye)),ge<0&&_b.forEach(ye=>te.add(ye)),te}),Ft=he(Z=>Z!=null&&Z.altKey?i:Z!=null&&Z.shiftKey?l:pe),gs=he((Z,G)=>{const ue=G.event,we=G.direction,te=G.reason,ke=!T||!(te===ea||te===Rn||te===ta||te===sn||te===Qn),Pe=jb(Z,{step:we?Ft(ue)*we:void 0,format:Be.current,minWithDefault:ge,maxWithDefault:X,minWithZeroDefault:L,snapOnStep:v,small:(ue==null?void 0:ue.altKey)??!1,clamp:ke}),ye=G.reason===ea||G.reason===sn||G.reason===Rn||G.reason===ta||G.reason===Qn,Ma=Pe!==Q||ye&&(Z!==Q||Ye.current===!1);if(Ma){if(ae.current=Pe,b==null||b(Pe,G),G.isCanceled)return Ma;De(Pe),F(Pe!==P.initialValue),je.current=!0}return Ye.current&&ms(Ot(Pe,C,N)),ve(),Ma}),Nn=he((Z,{direction:G,currentValue:ue,event:we,reason:te})=>{const ke=ue??be.current,Pe=typeof ke=="number"?ke+Z*G:Math.max(0,r??0);return gs(Pe,Ie(te,we,void 0,{direction:G}))}),at=he(()=>{yn.clear(),bn.clear(),hs.clear(),rt.current(),vn.current=0}),Hc=he((Z,G)=>{if(at(),!K.current)return;const ue=sa(K.current);function we(ke){ke.preventDefault()}ue.addEventListener("contextmenu",we),rt.current=()=>{ue.removeEventListener("contextmenu",we)},ue.addEventListener("pointerup",ke=>{xn.current=!1,at();const Pe=ae.current??be.current;gt(Pe,an(Z?"increment":"decrement",ke))},{once:!0});function te(){const ke=Ft(G)??us;return Nn(ke,{direction:Z?1:-1,event:G,reason:Z?"increment-press":"decrement-press"})}if(!te()){at();return}bn.start(Fb,()=>{hs.start(Ob,()=>{te()||at()})})});re(function(){if(!Ye.current)return;const G=g!==void 0?ec(Q,C,N):Ot(Q,C,N);G!==bt&&ms(G)}),re(function(){if(!hb)return;let G="text";ge>=0&&(G="decimal"),Vy(G)},[ge,j]),y.useEffect(()=>()=>at(),[at]),y.useEffect(function(){const G=K.current;if($||w||!S||!G)return;function ue(we){if(we.ctrlKey||wb(K.current).activeElement!==K.current)return;we.preventDefault();const te=Ft(we)??us;Nn(te,{direction:we.deltaY>0?-1:1,event:we,reason:"wheel"})}return G.addEventListener("wheel",ue),()=>{G.removeEventListener("wheel",ue)}},[S,Nn,$,w,l,pe,Ft]);const Ea=y.useMemo(()=>({...q,disabled:$,readOnly:w,required:d,value:Q,inputValue:bt,scrubbing:de}),[q,$,w,d,Q,bt,de]),Oy=y.useMemo(()=>({inputRef:K,inputValue:bt,value:Q,startAutoChange:Hc,stopAutoChange:at,minWithDefault:ge,maxWithDefault:X,disabled:$,readOnly:w,id:J,setValue:gs,incrementValue:Nn,getStepAmount:Ft,allowInputSyncRef:Ye,formatOptionsRef:Be,valueRef:be,lastChangedValueRef:ae,hasPendingCommitRef:je,isPressedRef:xn,intentionalTouchCheckTimeout:yn,movesAfterTouchRef:vn,name:H,required:d,invalid:W,inputMode:zc,getAllowedNonNumericKeys:$c,min:r,max:o,setInputValue:ms,locale:C,isScrubbing:de,setIsScrubbing:Ae,state:Ea,onValueCommitted:gt}),[K,bt,Q,Hc,at,ge,X,$,w,J,gs,Nn,Ft,Be,be,yn,H,d,W,zc,$c,r,o,ms,C,de,Ea,gt]),Fy=st("div",t,{ref:n,state:Ea,props:k,stateAttributesMapping:dn});return a.jsxs(ca.Provider,{value:Oy,children:[Fy,a.jsx("input",{...B.getInputValidationProps({onFocus(){var Z;(Z=K.current)==null||Z.focus()},onChange(Z){if(Z.nativeEvent.defaultPrevented)return;const G=Z.currentTarget.valueAsNumber,ue=Number.isNaN(G)?null:G,we=Ie(Qn,Z.nativeEvent);F(ue!==P.initialValue),gs(ue,we),U()&&B.commit(ue)}}),ref:z,type:"number",name:H,value:Q??"",min:r,max:o,step:u,disabled:$,required:d,"aria-hidden":!0,tabIndex:-1,style:H?db:cb})]})});process.env.NODE_ENV!=="production"&&(Rl.displayName="NumberFieldRoot");function ec(e,t,n){return(n==null?void 0:n.maximumFractionDigits)!=null||(n==null?void 0:n.minimumFractionDigits)!=null?Ot(e,t,n):Wl(e,t,n)}const tc=y.forwardRef(function(t,n){const{render:s,className:r,...o}=t,{state:i}=as();return st("div",t,{ref:n,state:i,props:[{role:"group"},o],stateAttributesMapping:dn})});process.env.NODE_ENV!=="production"&&(tc.displayName="NumberFieldGroup");function hn(e){return e==="touch"||e==="pen"}function nc(e){const{allowInputSyncRef:t,disabled:n,formatOptionsRef:s,getStepAmount:r,id:o,incrementValue:i,inputRef:u,inputValue:l,intentionalTouchCheckTimeout:d,isIncrement:c,isPressedRef:w,locale:f,movesAfterTouchRef:m,readOnly:g,setValue:b,startAutoChange:x,stopAutoChange:S,valueRef:v,lastChangedValueRef:T,onValueCommitted:N}=e,C=y.useRef({x:0,y:0}),D=y.useRef(!1),M=y.useRef(!1),I=y.useRef(""),k=c?"increment-press":"decrement-press";function F(A){t.current=!0;const V=pn(l,f,s.current);V!==null&&(v.current=V,b(V,Ie(k,A,void 0,{direction:c?1:-1})))}return{disabled:n,"aria-readonly":g||void 0,"aria-label":c?"Increase":"Decrease","aria-controls":o,tabIndex:-1,style:{WebkitUserSelect:"none",userSelect:"none"},onTouchStart(){D.current=!0},onTouchEnd(){D.current=!1},onClick(A){const V=n||g;if(A.defaultPrevented||V||(hn(I.current)?M.current:A.detail!==0))return;F(A.nativeEvent);const W=r(A)??us,_=v.current;i(W,{direction:c?1:-1,event:A.nativeEvent,reason:k});const q=T.current??v.current;q!==_&&N(q,an(k,A.nativeEvent))},onPointerDown(A){var _;const V=!A.button||A.button===0;if(A.defaultPrevented||g||!V||n)return;I.current=A.pointerType,M.current=!1,w.current=!0,C.current={x:A.clientX,y:A.clientY},F(A.nativeEvent),hn(A.pointerType)?d.start(Lb,()=>{const q=m.current;m.current=0,w.current&&q!=null&&q<Wb?(x(c,A),M.current=!0):(M.current=!1,S())}):(A.preventDefault(),(_=u.current)==null||_.focus(),x(c,A))},onPointerUp(A){hn(A.pointerType)&&(w.current=!1)},onPointerMove(A){if(n||g||!hn(A.pointerType)||!w.current)return;m.current!=null&&(m.current+=1);const{x:W,y:_}=C.current,q=W-A.clientX,B=_-A.clientY;q**2+B**2>Bb**2&&S()},onMouseEnter(A){const V=n||g;A.defaultPrevented||V||!w.current||D.current||hn(I.current)||x(c,A)},onMouseLeave(){D.current||S()},onMouseUp(){D.current||S()}}}const sc=y.forwardRef(function(t,n){const{render:s,className:r,disabled:o=!1,nativeButton:i=!0,...u}=t,{allowInputSyncRef:l,disabled:d,formatOptionsRef:c,getStepAmount:w,id:f,incrementValue:m,inputRef:g,inputValue:b,intentionalTouchCheckTimeout:x,isPressedRef:S,locale:v,maxWithDefault:T,movesAfterTouchRef:N,readOnly:C,setValue:D,startAutoChange:M,state:I,stopAutoChange:k,value:F,valueRef:P,lastChangedValueRef:A,onValueCommitted:V}=as(),W=F!=null&&F>=T,_=o||d||W,q=nc({isIncrement:!0,inputRef:g,startAutoChange:M,stopAutoChange:k,inputValue:b,disabled:_,readOnly:C,id:f,setValue:D,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:c,valueRef:P,isPressedRef:S,intentionalTouchCheckTimeout:x,movesAfterTouchRef:N,locale:v,lastChangedValueRef:A,onValueCommitted:V}),{getButtonProps:B,buttonRef:U}=aa({disabled:_,native:i,focusableWhenDisabled:!0}),$=y.useMemo(()=>({...I,disabled:_}),[I,_]);return st("button",t,{ref:[n,U],state:$,props:[q,u,B],stateAttributesMapping:dn})});process.env.NODE_ENV!=="production"&&(sc.displayName="NumberFieldIncrement");const rc=y.forwardRef(function(t,n){const{render:s,className:r,disabled:o=!1,nativeButton:i=!0,...u}=t,{allowInputSyncRef:l,disabled:d,formatOptionsRef:c,getStepAmount:w,id:f,incrementValue:m,inputRef:g,inputValue:b,intentionalTouchCheckTimeout:x,isPressedRef:S,minWithDefault:v,movesAfterTouchRef:T,readOnly:N,setValue:C,startAutoChange:D,state:M,stopAutoChange:I,value:k,valueRef:F,locale:P,lastChangedValueRef:A,onValueCommitted:V}=as(),W=k!=null&&k<=v,_=o||d||W,q=nc({isIncrement:!1,inputRef:g,startAutoChange:D,stopAutoChange:I,inputValue:b,disabled:_,readOnly:N,id:f,setValue:C,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:c,valueRef:F,isPressedRef:S,intentionalTouchCheckTimeout:x,movesAfterTouchRef:T,locale:P,lastChangedValueRef:A,onValueCommitted:V}),{getButtonProps:B,buttonRef:U}=aa({disabled:_,native:i,focusableWhenDisabled:!0}),$=y.useMemo(()=>({...M,disabled:_}),[M,_]);return st("button",t,{ref:[n,U],state:$,props:[q,u,B],stateAttributesMapping:dn})});process.env.NODE_ENV!=="production"&&(rc.displayName="NumberFieldDecrement");function Gb(e){e.preventDefault(),e.stopPropagation()}function Kb(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const ac=y.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Me,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(ac.displayName="FormContext");function oc(){return y.useContext(ac)}function Yb(e){const{enabled:t=!0,value:n,id:s,name:r,controlRef:o,commit:i}=e,{formRef:u}=oc(),{invalid:l,markedDirtyRef:d,validityData:c,setValidityData:w}=da(),f=he(e.getValue);re(()=>{if(!t)return;let m=n;m===void 0&&(m=f()),c.initialValue===null&&m!==null&&w(g=>({...g,initialValue:m}))},[t,w,n,c.initialValue,f]),re(()=>{!t||!s||u.current.fields.set(s,{getValue:f,name:r,controlRef:o,validityData:Kb(c,l),validate(m=!0){let g=n;g===void 0&&(g=f()),d.current=!0,m?Pa.flushSync(()=>i(g)):i(g)}})},[i,o,t,u,f,s,l,d,r,c,n]),re(()=>{const m=u.current.fields;return()=>{s&&m.delete(s)}},[u,s])}function Xb(e,t){const n=y.useRef(e),s=he(t);re(()=>{n.current!==e&&s(n.current)},[e,s]),re(()=>{n.current=e},[e])}const Zb={..._l,...dn},Jb=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),ic=y.forwardRef(function(t,n){const{render:s,className:r,...o}=t,{allowInputSyncRef:i,disabled:u,formatOptionsRef:l,getAllowedNonNumericKeys:d,getStepAmount:c,id:w,incrementValue:f,inputMode:m,inputValue:g,max:b,min:x,name:S,readOnly:v,required:T,setValue:N,state:C,setInputValue:D,locale:M,inputRef:I,value:k,onValueCommitted:F,lastChangedValueRef:P,hasPendingCommitRef:A,valueRef:V}=as(),{clearErrors:W}=oc(),{validationMode:_,setTouched:q,setFocused:B,invalid:U,shouldValidateOnChange:$,validation:H}=da(),{labelId:pe}=Fl(),de=y.useRef(!1),Ae=y.useRef(!1);return Yb({id:w,commit:H.commit,value:k,controlRef:I,name:S,getValue:()=>k??null}),Xb(k,L=>{const j=$();if(W(S),j&&H.commit(k),!(L===k||j)){if(Ae.current){Ae.current=!1;return}H.commit(k,!0)}}),st("input",t,{ref:[n,I],state:C,props:[{id:w,required:T,disabled:u,readOnly:v,inputMode:m,value:g,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":U||void 0,"aria-labelledby":pe,suppressHydrationWarning:!0,onFocus(L){if(L.defaultPrevented||v||u||(B(!0),de.current))return;de.current=!0;const j=L.currentTarget,K=j.value.length;j.setSelectionRange(K,K)},onBlur(L){if(L.defaultPrevented||v||u)return;q(!0),B(!1);const j=!i.current,K=A.current;if(i.current=!0,g.trim()===""){N(null,Ie(sn,L.nativeEvent)),_==="onBlur"&&H.commit(null),F(null,an(sn,L.nativeEvent));return}const z=l.current,J=pn(g,M,z);if(J===null)return;const ie=(z==null?void 0:z.maximumFractionDigits)!=null||(z==null?void 0:z.minimumFractionDigits)!=null,De=z==null?void 0:z.maximumFractionDigits,Q=ie&&typeof De=="number"?Number(J.toFixed(De)):J,be=an(Rn,L.nativeEvent),ve=k!==Q,Be=j||ve||K;_==="onBlur"&&H.commit(Q),ve&&(Ae.current=!0,N(Q,Ie(Rn,L.nativeEvent))),Be&&F(Q,be);const je=Ot(Q,M,z),gt=Wl(J,M,z);!(!ie&&J===k&&g===gt)&&g!==je&&D(je)},onChange(L){if(L.nativeEvent.defaultPrevented)return;i.current=!1;const j=L.target.value;if(j.trim()===""){D(j),N(null,Ie(sn,L.nativeEvent));return}const K=d();if(!Array.from(j).every(ie=>{const De=ie>="0"&&ie<="9",Q=fa.test(ie),be=pa.test(ie),ve=jl.test(ie),Be=Gl.test(ie),je=fn.test(ie);return De||Q||be||ve||Be||je||K.has(ie)}))return;const J=pn(j,M,l.current);D(j),J!==null&&N(J,Ie(ea,L.nativeEvent))},onKeyDown(L){if(L.defaultPrevented||v||u)return;const j=L.nativeEvent;i.current=!0;const K=d();let z=K.has(L.key);const{decimal:J,currency:ie,percentSign:De}=ha(M,l.current),Q=L.currentTarget.selectionStart,be=L.currentTarget.selectionEnd,ve=Q===0&&be===g.length,Be=ae=>Q!=null&&be!=null&&ae>=Q&&ae<be;if(fn.test(L.key)&&Array.from(K).some(ae=>fn.test(ae||""))){const ae=g.search(Jl),rt=ae!=null&&ae!==-1&&Be(ae);z=!(fn.test(g)||is.test(g))||ve||rt}if(is.test(L.key)&&Array.from(K).some(ae=>is.test(ae||""))){const ae=g.search(Ql),rt=ae!=null&&ae!==-1&&Be(ae);z=!(fn.test(g)||is.test(g))||ve||rt}[J,ie,De].forEach(ae=>{if(L.key===ae){const rt=g.indexOf(ae),bt=Be(rt);z=!g.includes(ae)||ve||bt}});const je=L.key>="0"&&L.key<="9",gt=fa.test(L.key),bn=pa.test(L.key),hs=Gl.test(L.key),yn=Jb.has(L.key);if(L.which===229||L.altKey||L.ctrlKey||L.metaKey||z||je||gt||hs||bn||yn)return;const xn=pn(g,M,l.current),vn=c(L)??us;Gb(L);const Ye=an(rn,j);L.key==="ArrowUp"?(f(vn,{direction:1,currentValue:xn,event:j,reason:rn}),F(P.current??V.current,Ye)):L.key==="ArrowDown"?(f(vn,{direction:-1,currentValue:xn,event:j,reason:rn}),F(P.current??V.current,Ye)):L.key==="Home"&&x!=null?(N(x,Ie(rn,j)),F(P.current??V.current,Ye)):L.key==="End"&&b!=null&&(N(b,Ie(rn,j)),F(P.current??V.current,Ye))},onPaste(L){if(L.defaultPrevented||v||u)return;L.preventDefault();const K=(L.clipboardData||window.Clipboard).getData("text/plain"),z=pn(K,M,l.current);z!==null&&(i.current=!1,N(z,Ie(ta,L.nativeEvent)),D(K))}},H.getValidationProps(),o],stateAttributesMapping:Zb})});process.env.NODE_ENV!=="production"&&(ic.displayName="NumberFieldInput");const Qb={wuStepper:"_wuStepper_apbnq_1"},Rb=({onChange:e,Label:t,defaultValue:n=0,readonly:s,dir:r,step:o=1,min:i,max:u,value:l,className:d,labelPosition:c="left",disabled:w,resetInvalidValueOnBlur:f=!0,...m})=>{const g=y.useId(),[b,x]=y.useState(l!==void 0?Number(l):n||0);y.useEffect(()=>{l!==void 0&&x(Number(l))},[l]);const S=M=>{x(M),e==null||e(M)},v=M=>{const I=Number(M.target.value);Number.isNaN(I)||x(I)},T=()=>{f&&(i!==void 0&&b<i?(x(i),e==null||e(i)):u!==void 0&&b>u&&(x(u),e==null||e(u)))};y.useEffect(()=>{l&&n&&console.warn("As both value and defaultValue are passed, value will be used")},[l,n]);const N={inc:s||u!==void 0&&b>=u||w,dec:s||i!==void 0&&b<=i||w},C=i!==void 0&&b<i||u!==void 0&&b>u,D=p("wu-flex wu-items-center wu-justify-center wu-rounded-none wu-bg-gray-10 wu-w-8 wu-h-8 wu-text-blue-q wu-p-2 wu-absolute wu-top-0 hover:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle");return a.jsxs(Rl,{id:g,value:b,step:o,readOnly:s,onValueChange:M=>typeof M=="number"&&S(M),dir:r,className:p("wu-flex wu-stepper",r==="rtl"&&c!=="top"&&"wu-gap-2",Qb.wuStepper,ey({labelPosition:c}),d),children:[t&&a.jsx(Te,{htmlFor:g,className:"wu-input-label",children:t}),a.jsxs(tc,{className:"wu-flex wu-max-w-[97px] wu-relative",children:[a.jsx(rc,{"aria-label":"decrement",className:p(D,r==="rtl"?"wu-right-0":"wu-left-0","wu-stepper-button"),disabled:N.dec,children:a.jsx("span",{className:"wu-text-base wm-minimize"})}),a.jsx(ic,{"aria-label":"stepper",role:"spinbutton",type:"text","aria-invalid":C||void 0,dir:r,className:p("wu-flex wu-w-[97px] wu-h-8 wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","wu-h-[33px] wu-text-center wu-text-blue-q wu-text-xs wu-rounded-t-sm ","focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle",C&&"wu-border-red-deep focus:wu-border-red-deep","wu-stepper-input"),readOnly:s,onChange:v,onBlur:T,disabled:w,min:i,max:u,step:o,value:b,...m}),a.jsx(sc,{"aria-label":"increment",className:p(D,r==="rtl"?"wu-left-0":"wu-right-0","wu-stepper-button"),disabled:N.inc,children:a.jsx("span",{className:"wu-text-base wm-add"})})]})]})},ey=_e.cva("wu-flex wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row wu-text-right wu-gap-2 wu-items-center",top:"wu-flex-col"}}}),uc=_e.cva("wu-inline-flex wu-items-center wu-justify-center wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-muted hover:wu-text-muted-foreground focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-80",{variants:{variant:{default:"wu-bg-transparent",outline:"wu-border wu-border-input wu-bg-transparent hover:wu-bg-accent hover:wu-text-accent-foreground"},size:{default:"wu-h-10 wu-px-3",sm:"wu-h-9 wu-px-2.5",lg:"wu-h-11 wu-px-5"}},defaultVariants:{variant:"default",size:"default"}}),ty=y.forwardRef(({className:e,variant:t,size:n,...s},r)=>a.jsx(_a.Root,{ref:r,className:p(uc({variant:t,size:n,className:e})),...s}));ty.displayName=_a.Root.displayName;const lc=y.createContext({size:"default",variant:"default"}),ls=y.forwardRef(({className:e,variant:t,size:n,children:s,...r},o)=>a.jsx(Sn.Root,{ref:o,className:p("wu-flex wu-items-center wu-justify-center wu-gap-1",e),...r,children:a.jsx(lc.Provider,{value:{variant:t,size:n},children:s})}));ls.displayName=Sn.Root.displayName;const mt=y.forwardRef(({className:e,children:t,variant:n,size:s,...r},o)=>{const i=y.useContext(lc);return a.jsx(Sn.Item,{ref:o,className:p(uc({variant:i.variant||n,size:i.size||s}),e),...r,children:t})});mt.displayName=Sn.Item.displayName;const cc=h.forwardRef((e,t)=>{const{options:n,value:s,disabled:r,dir:o,onChange:i}=e,u=l=>p("wu-w-8 wu-h-8 wu-text-xl wu-leading-5 wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-p-0 wu-flex wu-items-center wu-justify-center",r&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",l===s&&"wu-text-white",r&&s===l&&"wu-text-gray-lead","wu-switcher-icon-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(ls,{ref:t,type:"single",value:s,onValueChange:i,disabled:r,dir:o,className:p("wu-relative wu-group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-16 wu-bg-gray-25 wu-rounded-full",r&&"wu-cursor-not-allowed","wu-switcher-icon-tab-group"),children:[a.jsx("div",{role:"slider",className:p("wu-absolute wu-z-0 wu-w-8 wu-h-8 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",s==="opt1"&&"",s==="opt2"&&o!=="rtl"&&"wu-translate-x-full",s==="opt2"&&o==="rtl"&&"-wu-translate-x-full",r&&"wu-bg-gray-40","wu-switcher-icon-tab-slider")}),a.jsx(mt,{value:"opt1",className:u("opt1"),children:n[0].label}),a.jsx(mt,{value:"opt2",className:u("opt2"),children:n[1].label})]})})});cc.displayName="_IconTab";const dc=h.forwardRef((e,t)=>{const{options:n,value:s,disabled:r,dir:o,size:i="md",onChange:u}=e,l=d=>p("wu-w-1/2 wu-text-xs wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-font-normal",r&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",d===s&&"wu-text-white wu-font-medium",r&&s===d&&"wu-text-gray-lead","wu-switcher-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(ls,{ref:t,type:"single",value:s,onValueChange:u,disabled:r,dir:o,className:p("wu-relative group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-fit wu-bg-gray-25 wu-rounded-full",r&&"wu-cursor-not-allowed","wu-switcher-tab-group"),children:[a.jsx("div",{role:"slider",className:p("wu-absolute wu-z-0 wu-w-1/2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out ",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",s==="opt1"&&"",s==="opt2"&&o!=="rtl"&&"wu-translate-x-full",s==="opt2"&&o==="rtl"&&"-wu-translate-x-full",r&&"wu-bg-gray-40","wu-switcher-tab-slider")}),a.jsx(mt,{value:"opt1",className:l("opt1"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[0].label})}),a.jsx(mt,{value:"opt2",className:l("opt2"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[1].label})})]})})});dc.displayName="_Tab";const wc=h.forwardRef((e,t)=>{const{options:n,value:s,disabled:r,dir:o,onChange:i}=e,u=w=>p("wu-p-0 wu-w-fit wu-text-xs wu-text-gray-lead wu-h-fit wu-font-normal",r&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle",w===s&&"wu-text-primary wu-font-medium",r&&s===w&&"wu-text-gray-lead","wu-switcher-toggle-item"),l=p("wu-w-fit wu-gap-2",r&&"wu-cursor-not-allowed","wu-switcher-toggle-group"),d=p("wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-3 wu-p-0 wu-border wu-rounded-full wu-cursor-pointer wu-border-blue-p focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2",r&&"wu-border-gray-subtle wu-cursor-not-allowed","wu-switcher-toggle-button"),c=p("wu-w-2 wu-h-2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",s==="opt1"&&o!=="rtl"&&"-wu-translate-x-[10px]",s==="opt1"&&o==="rtl"&&"wu-translate-x-[10px]",s==="opt2"&&o!=="rtl"&&"wu-translate-x-[10px]",s==="opt2"&&o==="rtl"&&"-wu-translate-x-[10px]",r&&"wu-hidden","wu-switcher-toggle-knob");return a.jsx(a.Fragment,{children:a.jsxs(ls,{ref:t,type:"single",value:s,disabled:r,dir:o,className:l,onValueChange:i,children:[a.jsx(mt,{value:"opt1",className:u("opt1"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-text-right wu-switcher-toggle-item-label",children:n[0].label})}),a.jsx("button",{onClick:()=>i(s==="opt1"?"opt2":"opt1"),className:d,disabled:r,"aria-label":"knob",dir:o,children:a.jsx("div",{className:c,role:"knob",dir:o})}),a.jsx(mt,{value:"opt2",className:u("opt2"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-switcher-toggle-item-label",children:n[1].label})})]})})});wc.displayName="_Toggle";const fc=h.forwardRef((e,t)=>{const{type:n,options:s,value:r,disabled:o,dir:i,size:u,onChange:l,toggle:d=!0,...c}=e,[w,f]=h.useState(),m=g=>{let b=w;g!==""?b=g:d&&(b=w==="opt1"?"opt2":"opt1");const x=b==="opt1"?s[0].value:s[1].value;l&&l(x),f(b)};if(h.useEffect(()=>{if(!Array.isArray(s)||s.length<2)throw new Error("Options are not sufficient");f(r===s[0].value?"opt1":"opt2")},[s,r]),!Array.isArray(s)||s.length<2)return a.jsx(a.Fragment,{});switch(n){case"toggle":return a.jsx(wc,{...c,ref:t,options:s,value:w||"opt1",onChange:m,disabled:o,dir:i});case"iconTab":return a.jsx(cc,{ref:t,options:s,value:w||"opt1",onChange:m,disabled:o,dir:i});default:return a.jsx(dc,{ref:t,options:s,value:w||"opt1",onChange:m,disabled:o,dir:i,size:u})}});fc.displayName="WuSwitcher";const pc=ut.Root,ga=y.forwardRef(({className:e,children:t,...n},s)=>a.jsx(ut.List,{className:p("wu-relative wu-flex",e),...n,ref:s,children:t}));ga.displayName=ut.List.displayName;const ba=y.forwardRef(({className:e,...t},n)=>a.jsx(ut.Trigger,{ref:n,className:p("wu-relative wu-inline-flex wu-items-center wu-whitespace-nowrap wu-text-xs wu-px-4 wu-py-2 wu-text-gray-600 wu-transition-colors wu-duration-200 data-[state=active]:wu-text-blue-p","data-[orientation=horizontal]:wu-justify-center",e),...t}));ba.displayName=ut.Trigger.displayName;const hc=y.forwardRef(({className:e,...t},n)=>a.jsx(ut.Content,{ref:n,className:e,...t}));hc.displayName=ut.Content.displayName;const mc=({items:e,enableAnimation:t})=>{const n="wu-duration-700 wu-ease-in-out wu-transition-all data-[state=inactive]:wu-absolute data-[state=inactive]:wu-inset-0 data-[state=inactive]:wu-opacity-0 data-[state=inactive]:wu-z-0 data-[state=active]:wu-relative data-[state=active]:wu-opacity-100 data-[state=active]:wu-z-10";return a.jsx("div",{className:p("wu-w-full wu-h-full wu-flex-1 wu-overflow-auto",t&&"wu-relative wu-overflow-hidden","wu-tab-content-container"),children:e.map(s=>a.jsx(hc,{value:s.value,forceMount:t||void 0,className:p("wu-w-full wu-h-full wu-overflow-y-auto",t&&n,"wu-tab-content"),children:s.Content},s.value))})},ny=e=>{const[t,n]=h.useState(!1),[s,r]=h.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollLeft>0),r(u.scrollLeft+u.clientWidth<u.scrollWidth))};return h.useEffect(()=>{const u=e.current;return o(),u&&u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u&&u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showLeftArrow:t,showRightArrow:s,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="right"?l.clientWidth:-l.clientWidth)*.8;l.scrollBy({left:d,behavior:"smooth"})}}}},gc=(e,t)=>{const[n,s]=h.useState({width:0,left:0,height:0,top:0}),r=t==="vertical";return h.useEffect(()=>{const o=e.current;if(o){const i=()=>{const l=o.querySelector('[data-state="active"]');if(l){const d={width:r?2:l.offsetWidth,left:r?0:l.offsetLeft,height:r?l.offsetHeight:1,top:r?l.offsetTop:0};s(d)}},u=new MutationObserver(i);return u.observe(o,{attributes:!0,subtree:!0}),i(),()=>{u.disconnect()}}},[e,r]),n},sy=({items:e,value:t,defaultValue:n,onValueChange:s,enableAnimation:r=!1,className:o,dir:i="ltr",position:u="top"})=>{var T;const l=h.useRef(null),d=gc(l,"horizontal"),{showLeftArrow:c,showRightArrow:w,scrollByTab:f}=ny(l),[m,g]=h.useState(!1),b=()=>f("left"),x=()=>f("right"),S=N=>a.jsx("div",{"data-testid":`gradient-overlay-${N}`,className:p("wu-absolute wu-top-0 wu-h-full wu-w-20 wu-z-10 wu-pointer-events-none",N==="left"?"wu-left-0 wu-bg-gradient-to-r wu-from-white wu-to-transparent":"wu-right-0 wu-bg-gradient-to-l wu-from-white wu-to-transparent")}),v=(N,C,D)=>{const M=C==="left";return a.jsx("button",{onClick:N,className:p("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-h-8",M?"wu-left-0":"wu-right-0",D&&"wu-translate-x-0 wu-opacity-100",!D&&[M?"-wu-translate-x-full":"wu-translate-x-full","wu-opacity-0"]),"aria-label":M?"scroll-left":"scroll-right",children:a.jsx("span",{className:p("wu-text-blue-p wu-text-lg",M?"wm-keyboard-arrow-left":"wm-keyboard-arrow-right")})})};return a.jsxs(pc,{defaultValue:n||((T=e[0])==null?void 0:T.value),value:t,onValueChange:s,orientation:"horizontal",dir:i,className:p("wu-relative wu-flex wu-flex-col wu-w-full wu-h-full",u==="bottom"?"wu-flex-col-reverse":"wu-flex-col",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0 wu-border-b wu-border-gray-200",onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),"aria-label":"tablistWrapper",children:[c&&m&&S("left"),v(b,"left",c&&m),a.jsxs(ga,{ref:l,className:p("wu-relative wu-flex wu-w-full wu-overflow-x-auto wu-flex-row","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(N=>a.jsx(ba,{value:N.value,children:N.Trigger},N.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator wu-bottom-0",style:{width:d.width,left:d.left,height:1.25,bottom:u==="bottom"?void 0:0,top:u==="bottom"?0:void 0}})]}),w&&m&&S("right"),v(x,"right",w&&m)]}),a.jsx(mc,{items:e,enableAnimation:r})]})},ry=e=>{const[t,n]=h.useState(!1),[s,r]=h.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollTop>0),r(u.scrollTop+u.clientHeight<u.scrollHeight))};return h.useEffect(()=>{const u=e.current;if(u)return o(),u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showTopArrow:t,showBottomArrow:s,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="down"?l.clientHeight:-l.clientHeight)*.8;l.scrollBy({top:d,behavior:"smooth"})}}}},ay=({items:e,value:t,defaultValue:n,onValueChange:s,enableAnimation:r=!1,className:o,dir:i="ltr",position:u="left"})=>{var T;const l=h.useRef(null),d=gc(l,"vertical"),{showTopArrow:c,showBottomArrow:w,scrollByTab:f}=ry(l),[m,g]=h.useState(!1),b=()=>f("up"),x=()=>f("down"),S=N=>a.jsx("div",{className:p("wu-absolute wu-left-0 wu-w-full wu-h-12 wu-z-10 wu-pointer-events-none",N==="top"?"wu-top-0 wu-bg-gradient-to-b wu-from-white wu-to-transparent":"wu-bottom-0 wu-bg-gradient-to-t wu-from-white wu-to-transparent")}),v=(N,C,D)=>{const M=C==="up";return a.jsx("button",{onClick:N,className:p("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-w-full",M?"-wu-top-1":"-wu-bottom-1",D&&"wu-translate-y-0 wu-opacity-100",!D&&[M?"-wu-translate-y-full":"wu-translate-y-full","wu-opacity-0"]),"aria-label":M?"scroll-up":"scroll-down",children:a.jsx("span",{className:p("wu-text-blue-p wu-text-lg",M?"wm-keyboard-arrow-up":"wm-keyboard-arrow-down")})})};return a.jsxs(pc,{defaultValue:n||((T=e[0])==null?void 0:T.value),value:t,onValueChange:s,orientation:"vertical",dir:i,className:p("wu-relative wu-h-full wu-w-full wu-flex",u==="left"?"wu-flex-row":"wu-flex-row-reverse",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0",onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),"aria-label":"tablistWrapper",children:[c&&m&&S("top"),v(b,"up",c&&m),a.jsxs(ga,{ref:l,className:p("wu-relative wu-flex wu-h-full wu-overflow-y-auto wu-flex-col","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(N=>a.jsx(ba,{value:N.value,children:N.Trigger},N.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator",style:{width:2,left:u==="left"?0:void 0,right:u==="right"?0:void 0,height:d.height,top:d.top}})]}),w&&m&&S("bottom"),v(x,"down",w&&m)]}),a.jsx(mc,{items:e,enableAnimation:r})]})},oy=({...e})=>e.orientation==="vertical"?a.jsx(ay,{...e}):a.jsx(sy,{...e}),ya=y.forwardRef(({className:e,...t},n)=>a.jsx("table",{ref:n,className:p("wu-w-full wu-caption-bottom wu-text-sm",e),...t}));ya.displayName="Table";const bc=y.forwardRef(({className:e,...t},n)=>a.jsx("thead",{ref:n,className:p("[&_tr]:wu-border-b",e),...t}));bc.displayName="TableHeader";const yc=y.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:p("",e),...t}));yc.displayName="TableBody";const iy=y.forwardRef(({className:e,...t},n)=>a.jsx("tfoot",{ref:n,className:p("wu-border-t wu-bg-muted/50 wu-font-medium [&>tr]:last:wu-border-b-0",e),...t}));iy.displayName="TableFooter";const mn=y.forwardRef(({className:e,...t},n)=>a.jsx("tr",{ref:n,className:p("wu-border-b wu-transition-colors wu-hover:wu-bg-muted/50 data-[state=selected]:wu-bg-muted",e),...t}));mn.displayName="TableRow";const xa=y.forwardRef(({className:e,...t},n)=>a.jsx("th",{ref:n,className:p("wu-px-4 wu-text-left wu-align-middle wu-font-medium wu-text-muted-foreground [&:has([role=checkbox])]:wu-pr-0",e),...t}));xa.displayName="TableHead";const cs=y.forwardRef(({className:e,...t},n)=>a.jsx("td",{ref:n,className:p("wu-p-4 wu-align-middle [&:has([role=checkbox])]:wu-pr-0",e),...t}));cs.displayName="TableCell";const va=y.forwardRef(({className:e,...t},n)=>a.jsx("caption",{ref:n,className:p("wu-mt-4 wu-text-sm wu-text-gray-subtle wu-font-normal",e),...t}));va.displayName="TableCaption";const uy=({columns:e,rowSelection:t})=>{const n=(t==null?void 0:t.isEnabled)??!1,s=(t==null?void 0:t.size)??48,{onRowSelect:r,rowUniqueKey:o,isRowDisabled:i,hideSelectAll:u}=t||{},l=h.useCallback(c=>w=>{r==null||r(w?c:[])},[r]);return{finalColumns:h.useMemo(()=>n?[{id:"select",header:({table:c})=>{const w=c.getRowModel().rows.map(m=>m.original).filter(m=>!(i!=null&&i(m))),f=l(w);return u?a.jsx("div",{}):a.jsx(Fe,{checked:c.getIsSomeRowsSelected()||c.getIsAllRowsSelected(),partial:c.getIsSomeRowsSelected()&&!c.getIsAllRowsSelected(),onChange:m=>{c.toggleAllRowsSelected(!!m),f(!!m)},"aria-label":"Select all","data-testid":c.getIsSomeRowsSelected()&&!c.getIsAllRowsSelected()?"select-partial":"select-all"})},cell:({row:c})=>{const w=(i==null?void 0:i(c.original))??!1;return a.jsx(Fe,{checked:c.getIsSelected(),disabled:w,onChange:f=>{w||c.toggleSelected(!!f)},"aria-label":String(c.original[o])})},filterable:!1,accessorKey:"select",size:s},...e]:e,[e,n,l,i,u])}};function xc({data:e,columns:t,rowSelection:n}){const{finalColumns:s}=uy({columns:t,rowSelection:n}),r=h.useMemo(()=>{if(!(n!=null&&n.isEnabled))return{};const o={};for(const i of n.selectedRows){const u=e.findIndex(l=>l[n.rowUniqueKey]===i[n.rowUniqueKey]);u!==-1&&(o[u]=!0)}return o},[e,n]);return{finalColumns:s,rowSelectionState:r}}const vc=({table:e,size:t,NoDataContent:n,isLoading:s,CustomLoader:r,isRowDisabled:o})=>{var i;return a.jsx(yc,{children:s?a.jsx(mn,{children:a.jsx(cs,{colSpan:e.getAllColumns().length,className:"wu-text-center wu-h-[35vh] wu-loader-container",children:r||a.jsx(St,{className:"wu-w-full"})})}):(i=e.getRowModel().rows)!=null&&i.length?e.getRowModel().rows.map((u,l)=>{const d=(o==null?void 0:o(u.original))??!1;return a.jsx(mn,{"data-disabled":d,"data-state":u.getIsSelected()&&"selected",className:p("wu-group wu-transition-colors wu-border-b wu-border-black/[12%]",u.getIsSelected()&&"wu-bg-blue-p/[8%]",!d&&(u.getIsSelected()?"hover:wu-bg-blue-p/[16%]":"hover:wu-bg-black/[2%]")),children:u.getVisibleCells().map((c,w)=>a.jsx(cs,{className:p("wu-py-0 wu-font-light wu-text-xs",t==="compact"?"wu-h-8":"wu-h-10",c.column.id==="actions"?"wu-opacity-0 wu-transition-opacity wu-duration-150 wu-ease-in-out group-hover:wu-opacity-100":"",c.column.columnDef.cellAlign==="right"&&"wu-text-right",c.column.columnDef.cellAlign==="center"&&"wu-text-center",c.column.columnDef.cellAlign==="left"&&"wu-text-left"),children:qe.flexRender(c.column.columnDef.cell,c.getContext())},`${c.id}-${w}`))},`${u.id}-${l}`)}):a.jsx(mn,{children:a.jsx(cs,{colSpan:e.getAllColumns().length,children:n})})})},Nc=({table:e,sortableColumns:t,manual:n=!1,onSort:s,size:r,isRowSelected:o,HeaderAction:i,isStickyHeader:u})=>{const l=r==="compact"?"wu-h-8":"wu-h-10",d=c=>{const{id:w,columnDef:f,getIsSorted:m,toggleSorting:g}=c,{header:b}=f;if(!t.includes(w))return b;const x=m(),S=x==="asc",v=x==="desc",T=()=>{n?(g(!v),s==null||s({id:w,desc:v})):g(c.getIsSorted()==="asc")};return a.jsxs("button",{onClick:T,"aria-label":`Sort by ${b}`,className:"wu-flex wu-items-center wu-gap-4",children:[b,a.jsxs("div",{className:"wu-relative",children:[a.jsx("span",{className:p("wu-absolute -wu-top-[15px] wm-arrow-drop-down wu-text-xl",S&&"wu-hidden",!x&&"-wu-top-[11px]")}),a.jsx("span",{className:p("wu-absolute -wu-bottom-[13px] wm-arrow-drop-up wu-text-xl",v&&"wu-hidden",!x&&"-wu-bottom-[10px]")})]})]})};return a.jsxs(bc,{className:p("wu-border-t wu-border-black/[12%] wu-bg-gray-20 wu-relative",u&&"wu-sticky wu-top-[-.5px] wu-z-10",l),children:[e.getHeaderGroups().map(c=>a.jsx(mn,{className:"wu-relative",children:c.headers.map(w=>w.column.id==="actions"?a.jsx(xa,{colSpan:w.colSpan,className:"wu-text-xs wu-font-medium",style:{width:`${w.getSize()}px`}},w.id):a.jsx(xa,{colSpan:w.colSpan,className:p("wu-text-xs wu-font-medium wu-bg-[#EEEEEE]","wu-relative wu-z-0",w.column.columnDef.headerAlign==="right"&&"wu-text-right",w.column.columnDef.headerAlign==="center"&&"wu-text-center",w.column.columnDef.headerAlign==="left"&&"wu-text-left"),style:{width:`${w.getSize()}px`},children:qe.flexRender(d(w.column),w.getContext())},w.id))},c.id)),o&&i&&a.jsxs("div",{className:p("wu-absolute wu-top-[-1px] wu-left-0 wu-right-0 wu-flex wu-items-center wu-border-b wu-border-t wu-bg-gray-20 wu-z-10",l),children:[a.jsx("div",{className:"wu-flex wu-items-center wu-px-4",style:{width:e.getVisibleLeafColumns()[0].getSize()},children:a.jsx(Fe,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:c=>{e.toggleAllRowsSelected(!!c)},"aria-label":"Select all","data-testid":"select-all-header-checkbox"})}),a.jsx("div",{className:"wu-flex-1 wu-flex wu-pr-4",children:i})]})]})},Sc=_e.cva("",{variants:{variant:{striped:"[&_tr:nth-child(even)]:wu-bg-zinc-50",unstyled:"",bordered:"wu-border-collapse wu-border [&_th]:wu-border [&_td]:wu-border"}}}),ly=({data:e,columns:t,isLoading:n=!1,variant:s="unstyled",sort:r,size:o,rowSelection:i,HeaderAction:u,NoDataContent:l,stickyHeader:d=!1,CustomLoader:c,caption:w,...f})=>{var T;const{finalColumns:m,rowSelectionState:g}=xc({data:e,columns:t,rowSelection:i}),b=h.useMemo(()=>m.filter(N=>N.enableSorting).map(N=>N.accessorKey),[m]),x=((T=i==null?void 0:i.selectedRows)==null?void 0:T.length)??0,S=N=>{if(typeof N=="function"){const C=N(g),D=Object.keys(C).filter(M=>C[Number(M)]).map(M=>e[Number(M)]);i==null||i.onRowSelect(D)}},v=qe.useReactTable({data:e,columns:m,getCoreRowModel:qe.getCoreRowModel(),getPaginationRowModel:qe.getPaginationRowModel(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:i==null?void 0:i.isEnabled,state:{...i!=null&&i.isEnabled?{rowSelection:g}:{}},onRowSelectionChange:S});return a.jsxs("div",{className:p("wu-text-gray-lead wu-table-container wu-relative"),children:[w&&a.jsx(va,{className:"wu-font-light",children:w}),a.jsxs(ya,{...f,className:p(Sc({variant:s}),f.className),children:[a.jsx(Nc,{table:v,sortableColumns:b,manual:!0,onSort:r==null?void 0:r.onSort,size:o,HeaderAction:u,isRowSelected:x>0,isStickyHeader:d}),!n&&a.jsx(vc,{table:v,size:o,NoDataContent:l,CustomLoader:c})]}),n&&a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-h-96",children:a.jsx(St,{})})]})},cy=({data:e,columns:t,variant:n="unstyled",size:s="default",sort:r,filterText:o,pagination:i,stickyHeader:u,HeaderAction:l,CustomLoader:d,NoDataContent:c,isLoading:w,caption:f,rowSelection:m,...g})=>{var A;const[b,x]=h.useState((r==null?void 0:r.initial)||[]),[S,v]=h.useState([]),[T,N]=h.useState((i==null?void 0:i.pageIndex)??0),{finalColumns:C,rowSelectionState:D}=xc({data:e,columns:t,rowSelection:m}),M=h.useMemo(()=>C.filter(V=>V.enableSorting).map(V=>V.accessorKey),[C]),I=h.useMemo(()=>C.filter(V=>V.filterable).map(V=>V.accessorKey),[C]),k=((A=m==null?void 0:m.selectedRows)==null?void 0:A.length)??0,F=V=>{const W=typeof V=="function"?V(D):V,_=[],q=m==null?void 0:m.isRowDisabled;for(const B in W){if(!W[B])continue;const U=e[Number(B)];U&&(q!=null&&q(U)||_.push(U))}m==null||m.onRowSelect(_)},P=qe.useReactTable({data:e,columns:C,getCoreRowModel:qe.getCoreRowModel(),getFilteredRowModel:qe.getFilteredRowModel(),getSortedRowModel:qe.getSortedRowModel(),getPaginationRowModel:i?qe.getPaginationRowModel():void 0,enableRowSelection:m!=null&&m.isRowDisabled?V=>!m.isRowDisabled(V.original):!0,state:{sorting:b,columnFilters:S,...i?{pagination:i}:{},...m!=null&&m.isEnabled?{rowSelection:D}:{}},onSortingChange:x,onColumnFiltersChange:v,onRowSelectionChange:F});return h.useEffect(()=>{I.forEach(V=>{var W;(W=P.getColumn(V))==null||W.setFilterValue(o)})},[o,I,P]),h.useEffect(()=>{i&&(i==null?void 0:i.pageIndex)!==T&&(m==null||m.onRowSelect(()=>[]),P.resetRowSelection(),N(i.pageIndex))},[i==null?void 0:i.pageIndex]),a.jsx("div",{className:"wu-text-gray-lead wu-table-container wu-relative",children:a.jsxs(ya,{...g,className:p("wu-overflow-x-auto wu-w-full",Sc({variant:n}),"wu-table-fixed",g.className),children:[f&&a.jsx(va,{children:f}),a.jsx(Nc,{table:P,sortableColumns:M,size:s,HeaderAction:l,isRowSelected:k>0,isStickyHeader:u}),a.jsx(vc,{table:P,size:s,NoDataContent:c,CustomLoader:d,isLoading:w,isRowDisabled:m==null?void 0:m.isRowDisabled})]})})},Cc=y.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:p("wu-flex wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-text-gray-lead wu-p-2 wu-text-sm wu-font-normal wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light focus-visible:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle focus:wu-border-blue-p wu-transition-colors hover:wu-border-gray-40 ",e),ref:n,...t}));Cc.displayName="Textarea";const Tc=h.forwardRef((e,t)=>{const{Label:n,id:s=Cn(),variant:r="flat",readonly:o,maxLength:i,labelPosition:u="top",...l}=e,d=w=>{l.onChange&&l.onChange(w)},c=zt(u);return a.jsxs("div",{className:p(c,"wu-flex wu-textarea-container"),dir:l.dir,children:[a.jsx(Cc,{...l,ref:t,id:s,className:p("wu-peer wu-rounded-t-sm",r==="outlined"?"wu-border wu-border-gray-subtle":"",l.className),onChange:d,readOnly:o,maxLength:i}),n&&a.jsx(Te,{htmlFor:s,className:"wu-textarea-label",children:n})]})});Tc.displayName="WuTextarea";function dy(e){if(typeof e=="string"&&e.includes("T")){const t=Y.parseISO(e);return Y.format(t,"HH:mm")}if(typeof e=="string"&&/^\d{2}:\d{2}:\d{2}$/.test(e)){const t=Y.parse(e,"HH:mm:ss",new Date);return Y.format(t,"HH:mm")}return typeof e=="string"&&/^\d{2}:\d{2}$/.test(e)?e:"00:00"}const Ec=["12",...Array.from({length:11},(e,t)=>String(t+1).padStart(2,"0"))],Mc=Array.from({length:60},(e,t)=>String(t).padStart(2,"0")),Ic=["am","pm"],ds=50;function wy(e){return Array(ds).fill(e).flat()}function Na(e,t){const n=e.indexOf(t);return[...e.slice(n),...e.slice(0,n)]}function fy(e,t){let n=Number(e);return t==="pm"&&n<12&&(n+=12),t==="am"&&n===12&&(n=0),String(n).padStart(2,"0")}function Ac(e){const t=Number(e),n=t>=12?"pm":"am",s=t%12===0?12:t%12;return{hour:String(s),meridiem:n}}const py=({value:e,isSelected:t,onClick:n})=>a.jsx("div",{onClick:n,className:p("wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-text-center wu-snap-start wu-rounded-[2px] wu-cursor-pointer hover:wu-bg-blue-p hover:wu-text-white",t&&"wu-bg-blue-p/15 wu-text-blue-p"),children:e}),Sa=({values:e,selectedValue:t,scrollRef:n,onSelect:s,repeatItems:r=!0,className:o})=>a.jsx("div",{ref:n,className:p("wu-overflow-y-scroll wu-w-8 wu-snap-y wu-snap-mandatory [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",o),role:"presentation",children:(r?wy(e):e).map((i,u)=>a.jsx(py,{value:i,isSelected:i===t,onClick:()=>s(i)},`${i}-${u}`))});function hy(e,t,n,s){const r=h.useMemo(()=>e?Na(Ec,t.padStart(2,"0")):Ec,[e]),o=h.useMemo(()=>e?Na(Mc,n.padStart(2,"0")):Mc,[e]),i=h.useMemo(()=>e?Na(Ic,s):Ic,[e]);return{rotatedHours:r,rotatedMinutes:o,rotatedMeridiem:i}}function my(e,t,n){h.useEffect(()=>{function s(i){if(i){const u=i.scrollHeight/ds,l=Math.floor(ds/2);i.scrollTop=l*u;const d=()=>{const{scrollTop:c}=i,w=Math.round(c/u);(w<=1||w>=ds-2)&&(i.scrollTop=l*u)};return i.addEventListener("scroll",d),()=>{i.removeEventListener("scroll",d)}}}if(!e)return;const r=s(t.current),o=s(n.current);return()=>{r==null||r(),o==null||o()}},[e,t,n])}const Dc=({className:e,time:t,Label:n,labelPosition:s,dir:r,...o})=>{const[i,u]=h.useState(!1),[l,d]=h.useState(""),c=h.useRef(null),w=h.useRef(null),f=h.useRef(null),m=h.useRef(null),[g,b]=h.useState("12"),[x,S]=h.useState("00"),[v,T]=h.useState("am");h.useEffect(()=>{if(!t){d(""),b("12"),S("00"),T("am"),c.current&&(c.current.value="");return}const I=dy(t);d(I);const[k,F]=I.split(":"),{hour:P,meridiem:A}=Ac(k);b(P),S(F),T(A),c.current&&(c.current.value=I)},[t]),h.useEffect(()=>{const I=k=>{w.current&&!w.current.contains(k.target)&&u(!1)};return document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[]),my(i,f,m);const{rotatedHours:N,rotatedMinutes:C,rotatedMeridiem:D}=hy(i,g,x,v),M=h.useCallback((I,k,F)=>{const P=I??g,A=k??x,V=F??v;b(P),S(A),T(V);const W=`${fy(P,V)}:${A}`;d(W)},[g,x,v]);return a.jsxs("div",{className:p("wu-flex wu-gap-1 wu-relative wu-w-fit wu-flex-col",(s==="right"||s==="left")&&"wu-items-center",s==="left"&&"wu-flex-row",s==="right"&&"wu-flex-row-reverse","wu-input-wrapper"),dir:r,children:[n&&a.jsx(Te,{htmlFor:"time-picker",className:"wu-timepicker-label",children:n}),a.jsxs("div",{className:p("relative inline-block"),ref:w,dir:r,children:[a.jsx(Ge,{ref:c,type:"time",value:l,variant:"flat",role:"textbox",onChange:I=>{d(I.target.value);const[k,F]=I.target.value.split(":"),{hour:P,meridiem:A}=Ac(k);b(P),S(F),T(A)},className:"wu-w-[136px] wu-h-8 wu-pr-6 wu-border wu-border-lead/40 wu-text-gray-lead wu-timepicker-input",style:{WebkitAppearance:"none",MozAppearance:"textfield"},Icon:a.jsx(Ve,{icon:"wm-schedule",className:p("wu-text-base",o.disabled&&"wu-text-lead/50 wu-pointer-events-none wu-opacity-50"),onClick:()=>u(I=>!I),"data-testid":"wu-timepicker-icon"}),iconPosition:"right",dir:r,...o}),a.jsx("style",{children:`
19
19
  input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
20
- `}),i&&a.jsxs("div",{className:p("wu-absolute wu-w-[136px] wu-h-[228px] wu-flex wu-bg-white wu-border wu-shadow wu-z-50 wu-text-xs wu-gap-1 wu-p-1 wu-border-blue-p wu-text-lead",e),children:[a.jsx(Sa,{values:x,selectedValue:g.padStart(2,"0"),scrollRef:f,onSelect:I=>D(I,v),className:"wu-time-hour-picker"}),a.jsx(Sa,{values:T,selectedValue:v.padStart(2,"0"),scrollRef:m,onSelect:I=>D(g,I),className:"wu-time-minute-picker"}),a.jsx(Sa,{values:A,selectedValue:N,onSelect:I=>D(void 0,void 0,I),className:"wu-time-meridiem-picker",repeatItems:!1})]})]})]})};Ac.displayName="WuTimePicker";const gy=1,by=1e6;let Ca=0;function yy(){return Ca=(Ca+1)%Number.MAX_SAFE_INTEGER,Ca.toString()}const Ta=new Map,kc=e=>{if(Ta.has(e))return;const t=setTimeout(()=>{Ta.delete(e),gn({type:"REMOVE_TOAST",toastId:e})},by);Ta.set(e,t)},xy=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,gy)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?kc(n):e.toasts.forEach(s=>{kc(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===n||n===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},ws=[];let fs={toasts:[]};function gn(e){fs=xy(fs,e),ws.forEach(t=>{t(fs)})}function Pc({...e}){const t=yy(),n=r=>gn({type:"UPDATE_TOAST",toast:{...r,id:t}}),s=()=>gn({type:"DISMISS_TOAST",toastId:t});return gn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||s()}}}),{id:t,dismiss:s,update:n}}function vy(){const[e,t]=h.useState(fs);return h.useEffect(()=>(ws.push(t),()=>{const n=ws.indexOf(t);n>-1&&ws.splice(n,1)}),[e]),{...e,toast:Pc,dismiss:n=>gn({type:"DISMISS_TOAST",toastId:n})}}const Ny=()=>({showToast:({message:t,variant:n,duration:s,position:r})=>Pc({description:t,variant:n,duration:s,position:r})}),Sy=Se.Provider,Cy=_e.cva("wu-fixed wu-z-[100] wu-flex wu-max-h-screen wu-w-full wu-flex-col-reverse wu-px-4 wu-py-2 sm:wu-flex-col md:wu-max-w-[720px] wu-w-fit wu-toast-container",{variants:{position:{topRight:"wu-right-0 wu-top-0",top:"wu-top-0 wu-left-1/2 wu--translate-x-1/2",topLeft:"wu-left-0 wu-top-0",bottom:"wu-bottom-0 wu-left-1/2 wu--translate-x-1/2",bottomRight:"wu-right-0 wu-bottom-0",bottomLeft:"wu-left-0 wu-bottom-0"}},defaultVariants:{position:"top"}}),_c=y.forwardRef(({className:e,position:t,...n},s)=>a.jsx(Se.Viewport,{ref:s,className:p(Cy({position:t}),e),...n}));_c.displayName=Se.Viewport.displayName;const Ty=_e.cva("group wu-pointer-events-auto wu-text-xs wu-font-normal wu-relative wu-flex wu-w-full wu-min-h-12 wu-items-center wu-justify-between wu-overflow-hidden wu-px-4 wu-pr-0 wu-py-2 wu-shadow-sm wu-transition-all data-[swipe=cancel]:wu-translate-y-0 data-[swipe=end]:wu-translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:wu-translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:wu-transition-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[swipe=end]:wu-animate-out data-[state=closed]:wu-fade-out-80",{variants:{variant:{default:"wu-border wu-bg-white wu-text-text",success:"wu-text-green-deep wu-bg-green-soft",error:"wu-text-red-deep wu-bg-red-soft",warning:"wu-text-yellow-deep wu-bg-yellow-soft",info:"wu-text-blue-deep wu-bg-blue-soft"},position:{topRight:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",top:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",topLeft:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",bottom:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomRight:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomLeft:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full"}},defaultVariants:{variant:"success",position:"top"}}),Vc=y.forwardRef(({className:e,variant:t,position:n,...s},r)=>a.jsx(Se.Root,{ref:r,className:p(Ty({variant:t,position:n}),e),...s}));Vc.displayName=Se.Root.displayName;const Ey=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Action,{ref:n,className:p("wu-inline-flex wu-h-8 wu-shrink-0 wu-items-center wu-justify-center wu-border wu-bg-transparent wu-px-3 wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-secondary focus:wu-outline-none focus:wu-ring-2 focus:wu-ring-ring focus:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-50 group-[.destructive]:wu-border-muted/40 group-[.destructive]:hover:wu-border-destructive/30 group-[.destructive]:hover:wu-bg-destructive group-[.destructive]:hover:wu-text-destructive-foreground group-[.destructive]:focus:wu-ring-destructive",e),...t}));Ey.displayName=Se.Action.displayName;const Oc=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Close,{ref:n,className:p("wu-relative wu-right-4 wu-bottom-2 wu-rounded-sm wu-w-4 wu-h-4 wu-p-1 wu-text-foreground/50 wu-opacity-100 wu-transition-opacity hover:wu-text-foreground focus:wu-opacity-100 focus:wu-outline-none group-hover:wu-opacity-100 group-[.destructive]:wu-text-red-300 group-[.destructive]:hover:wu-text-red-50 group-[.destructive]:focus:wu-ring-red-400 group-[.destructive]:focus:wu-ring-offset-red-600",e),"toast-close":"","aria-label":"Close toast",...t,children:a.jsx("span",{className:"wm-close wu-text-base"})}));Oc.displayName=Se.Close.displayName;const Fc=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Title,{ref:n,className:p("wu-text-sm wu-font-semibold",e),...t}));Fc.displayName=Se.Title.displayName;const Lc=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Description,{ref:n,className:p("wu-text-sm wu-opacity-90",e),...t}));Lc.displayName=Se.Description.displayName;function My(){const{toasts:e}=vy(),t=e.reduce((n,s)=>{const r=s.position||"top";return n[r]||(n[r]=[]),n[r].push(s),n},{});return a.jsx(Sy,{children:Object.entries(t).map(([n,s])=>a.jsx(_c,{position:n,children:s.map(function({id:r,title:o,description:i,action:u,variant:l,position:d,...c}){const w={success:"wm-check-circle",info:"wm-info",warning:"wm-error",error:"wm-cancel"};return a.jsxs(Vc,{variant:l||"success",position:d,...c,children:[a.jsxs("div",{className:"wu-grid wu-gap-1",children:[o&&a.jsx(Fc,{children:o}),i&&a.jsxs(Lc,{className:"wu-flex wu-items-center wu-gap-3 wu-pr-6",children:[a.jsx(Ve,{icon:w[l||"success"],className:"wu-text-xl"}),i]})]}),u,a.jsx(Oc,{})]},r)})},n))})}const Iy=()=>a.jsx(My,{}),Wc=y.forwardRef(({className:e,dir:t,...n},s)=>a.jsx(xs.Root,{className:p("wu-bg-gray-40 wu-inline-flex wu-h-2 wu-w-8 wu-shrink-0 wu-cursor-pointer wu-items-center wu-rounded-full wu-transition-colors focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[5px] focus-visible:wu-ring-offset-background disabled:wu-cursor-not-allowed disabled:wu-opacity-50 data-[state=unchecked]:wu-bg-gray-25 wu-group","hover:wu-bg-gray-subtle hover:data-[state=unchecked]:wu-bg-gray-subtle",e),...n,ref:s,children:a.jsx(xs.Thumb,{className:p("wu-block wu-h-4 wu-w-4 wu-rounded-full wu-bg-gray-subtle wu-shadow-lg wu-ring-0 wu-transition-all data-[state=checked]:wu-bg-blue-p","group-hover:data-[state=unchecked]:wu-bg-gray-lead",t==="rtl"&&"-wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0",t!=="rtl"&&"wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0","wu-toggle-thumb")})}));Wc.displayName=xs.Root.displayName;const Bc=h.forwardRef((e,t)=>{const{Label:n,labelPosition:s="right",onChange:r,className:o,dir:i,disabled:u,id:l=Cn(),...d}=e;return h.useEffect(()=>{const{checked:c,defaultChecked:w}=d;c!==void 0&&w!==void 0&&console.error("WuToggle: Both `checked` and `defaultChecked` props are set. Use only one of them.")},[d.checked,d.defaultChecked]),a.jsxs("div",{className:p(Dy({labelPosition:s}),"wu-toggle-container"),dir:i,children:[a.jsx(Wc,{...d,id:l,disabled:u,ref:t,onCheckedChange:r,className:p("wu-peer",o),dir:i}),a.jsx(Te,{htmlFor:l,className:"wu-toggle-label",children:n})]})});Bc.displayName="WuToggle";const Dy=_e.cva("wu-flex wu-items-center wu-gap-3 wu-w-fit",{variants:{labelPosition:{right:"wu-flex-row",left:"wu-flex-row-reverse",top:"wu-flex-col-reverse wu-items-baseline"}}}),ps=h.createContext(null),Ay=()=>{const e=h.useContext(ps);if(!e)throw new Error("useTranslation must be used within a WuTranslationProvider");return e.useTranslation()},ky=()=>{const e=h.useContext(ps);if(!e)throw new Error("useLoadTranslationsFunction must be used within a WuTranslationProvider");return e},Py=({children:e})=>{const[t,n]=h.useState({}),[s,r]=h.useState({}),o=h.useCallback(async(d,c)=>{try{const f=await(await fetch(d)).json();n(f)}catch(w){console.error("Failed to load translations:",w),c&&n(c)}c&&r(c)},[]),i=h.useCallback(d=>{r(d)},[]),u=h.useCallback(()=>({t:(c,w)=>t[c]?t[c]:s[c]?s[c]:w||c}),[t,s]),l={loadTranslations:o,setFallbackTranslations:i,useTranslation:u};return a.jsx(ps.Provider,{value:l,children:e})},_y={qualitative:{"--wu-qualitative-1":"#4C5B94","--wu-qualitative-2":"#5B7AAE","--wu-qualitative-3":"#409EB5","--wu-qualitative-4":"#40B59E","--wu-qualitative-5":"#60C790","--wu-qualitative-6":"#9AD69A","--wu-qualitative-7":"#B3BD56","--wu-qualitative-8":"#DD8F40","--wu-qualitative-9":"#CE6550","--wu-qualitative-10":"#AE4C3D","--wu-qualitative-11":"#8F3328","--wu-qualitative-12":"#985D75","--wu-qualitative-13":"#B181A8","--wu-qualitative-14":"#C5A0C2","--wu-qualitative-15":"#DAC2E0","--wu-qualitative-16":"#E3D9E8"},blueSequential:{"--wu-blue-sequential-1":"#EBF8FF","--wu-blue-sequential-2":"#D7EFFF","--wu-blue-sequential-3":"#C2DEFF","--wu-blue-sequential-4":"#AAD0FF","--wu-blue-sequential-5":"#94C1F3","--wu-blue-sequential-6":"#7DB2E7","--wu-blue-sequential-7":"#67A3DB","--wu-blue-sequential-8":"#5194CF","--wu-blue-sequential-9":"#3B85C3","--wu-blue-sequential-10":"#2576B7","--wu-blue-sequential-11":"#256CAC","--wu-blue-sequential-12":"#1A60A6","--wu-blue-sequential-13":"#184994","--wu-blue-sequential-14":"#1C337F","--wu-blue-sequential-15":"#0D2163","--wu-blue-sequential-16":"#00083D"},greenSequential:{"--wu-green-sequential-1":"#E0F9ED","--wu-green-sequential-2":"#C4F3DC","--wu-green-sequential-3":"#A8ECCC","--wu-green-sequential-4":"#8DE5BD","--wu-green-sequential-5":"#78DDB1","--wu-green-sequential-6":"#62D3A3","--wu-green-sequential-7":"#4CC996","--wu-green-sequential-8":"#3ABF8A","--wu-green-sequential-9":"#35AF7F","--wu-green-sequential-10":"#329D75","--wu-green-sequential-11":"#308A6A","--wu-green-sequential-12":"#2D7A60","--wu-green-sequential-13":"#286A55","--wu-green-sequential-14":"#255C4B","--wu-green-sequential-15":"#1F4B3E","--wu-green-sequential-16":"#1B3D34"},redSequential:{"--wu-red-sequential-1":"#FEE9EC","--wu-red-sequential-2":"#FFD2D8","--wu-red-sequential-3":"#FFBBC4","--wu-red-sequential-4":"#FFA6B3","--wu-red-sequential-5":"#FB97A5","--wu-red-sequential-6":"#F78998","--wu-red-sequential-7":"#F37C8C","--wu-red-sequential-8":"#EE6F80","--wu-red-sequential-9":"#E76172","--wu-red-sequential-10":"#E15466","--wu-red-sequential-11":"#DA465B","--wu-red-sequential-12":"#D33B50","--wu-red-sequential-13":"#BC3548","--wu-red-sequential-14":"#A73343","--wu-red-sequential-15":"#91313E","--wu-red-sequential-16":"#7D2D38"},orangeSequential:{"--wu-orange-sequential-1":"#FDEDE5","--wu-orange-sequential-2":"#FCDFCF","--wu-orange-sequential-3":"#FBCFBA","--wu-orange-sequential-4":"#FAC5AB","--wu-orange-sequential-5":"#F7B694","--wu-orange-sequential-6":"#F6AB85","--wu-orange-sequential-7":"#F79D70","--wu-orange-sequential-8":"#F6915F","--wu-orange-sequential-9":"#EF8450","--wu-orange-sequential-10":"#E37944","--wu-orange-sequential-11":"#DB713C","--wu-orange-sequential-12":"#D06530","--wu-orange-sequential-13":"#C95E29","--wu-orange-sequential-14":"#BD521C","--wu-orange-sequential-15":"#B24610","--wu-orange-sequential-16":"#AA3F08"},divergent:{"--wu-red-divergent-1":"#661200","--wu-red-divergent-2":"#A11C00","--wu-red-divergent-3":"#D2300E","--wu-red-divergent-4":"#DF4828","--wu-red-divergent-5":"#EB6A4A","--wu-red-divergent-6":"#F4896C","--wu-red-divergent-7":"#FFC4B3","--wu-red-divergent-8":"#FFE2D9","--wu-divergent-neutral":"#F5F5F5","--wu-blue-divergent-1":"#DBD9E9","--wu-blue-divergent-2":"#B7B5D4","--wu-blue-divergent-3":"#9392BF","--wu-blue-divergent-4":"#7070AA","--wu-blue-divergent-5":"#4A5195","--wu-blue-divergent-6":"#1B3380","--wu-blue-divergent-7":"#182D72","--wu-blue-divergent-8":"#122254"},nps:{"--wu-nps-detractor":"#F85271","--wu-nps-passive":"#F1DA7E","--wu-nps-promoter":"#42BD84"},sentiment:{"--wu-sentiment-negative":"#F85271","--wu-sentiment-slightly-negative":"#F69A79","--wu-sentiment-neutral":"#F1DA7E","--wu-sentiment-slightly-positive":"#94D08B","--wu-sentiment-positive":"#42BD84","--wu-sentiment-no-sentiment":"#E0E0E0"}};window.wickUiVersion="1.29.0",Object.defineProperty(E,"useContext",{enumerable:!0,get:()=>h.useContext}),E.CHART_COLOR_SYSTEM=_y,E.WuAccordion=ud,E.WuActivityLog=dd,E.WuAppHeader=Fd,E.WuAppHeaderAccount=Fa,E.WuAppHeaderBar=za,E.WuAppHeaderHelp=La,E.WuAppHeaderMenu=qa,E.WuAppHeaderSearch=Vd,E.WuButton=Ce,E.WuCalender=_s,E.WuCard=Ja,E.WuCardFooter=Ra,E.WuCardHeader=Qa,E.WuCheckbox=Fe,E.WuChip=Kd,E.WuCombobox=nw,E.WuCopyToClipboard=sw,E.WuDataTable=ly,E.WuDatePicker=Wd,E.WuDateRangePicker=jd,E.WuDisplay=Nd,E.WuDrawer=cw,E.WuDrawerClose=dw,E.WuDrilldown=fm,E.WuFooter=yu,E.WuFormGroup=_d,E.WuHeading=xd,E.WuHelpButton=xu,E.WuIcon=Ve,E.WuInput=je,E.WuInputError=Ad,E.WuInputHint=kd,E.WuLabel=Te,E.WuListbox=Tm,E.WuLoader=Nt,E.WuMenu=zr,E.WuMenuCheckboxItem=sm,E.WuMenuIcon=$r,E.WuMenuItem=Kn,E.WuMenuItemGroup=rm,E.WuMenuRadioItem=am,E.WuMenuSeparatorItem=om,E.WuModal=km,E.WuModalClose=Om,E.WuModalContent=Pm,E.WuModalFooter=Vm,E.WuModalHeader=_m,E.WuMonthPicker=qm,E.WuPagination=Ou,E.WuPopover=zd,E.WuPopoverClose=Fs,E.WuPrimaryNavbar=$m,E.WuRadioGroup=Bu,E.WuScrollArea=Um,E.WuSecondaryNavbar=Hm,E.WuSelect=Pu,E.WuSidebar=Jg,E.WuSidebarCollapsibleMenu=nb,E.WuSidebarContent=Qg,E.WuSidebarFooter=Rg,E.WuSidebarGroup=eb,E.WuSidebarItem=Ml,E.WuSidebarMenu=tb,E.WuSidebarTrigger=El,E.WuSpotlight=Mu,E.WuStackedCard=ab,E.WuStackedCardOverlay=ob,E.WuStepper=Rb,E.WuSubMenu=im,E.WuSubtext=vd,E.WuSwitcher=fc,E.WuTab=oy,E.WuTable=cy,E.WuText=yd,E.WuTextarea=Tc,E.WuTimePicker=Ac,E.WuToast=Iy,E.WuToggle=Bc,E.WuTooltip=En,E.WuTranslationContext=ps,E.WuTranslationProvider=Py,E.WuTruncatedLabel=Od,E.WuVirtualScroll=Ct,E.calculatePosition=rb,E.useTranslation=Ay,E.useTranslationsContext=ky,E.useWuShowToast=Ny,E.useWuSidebar=et,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
20
+ `}),i&&a.jsxs("div",{className:p("wu-absolute wu-w-[136px] wu-h-[228px] wu-flex wu-bg-white wu-border wu-shadow wu-z-50 wu-text-xs wu-gap-1 wu-p-1 wu-border-blue-p wu-text-lead",e),children:[a.jsx(Sa,{values:N,selectedValue:g.padStart(2,"0"),scrollRef:f,onSelect:I=>M(I,x),className:"wu-time-hour-picker"}),a.jsx(Sa,{values:C,selectedValue:x.padStart(2,"0"),scrollRef:m,onSelect:I=>M(g,I),className:"wu-time-minute-picker"}),a.jsx(Sa,{values:D,selectedValue:v,onSelect:I=>M(void 0,void 0,I),className:"wu-time-meridiem-picker",repeatItems:!1})]})]})]})};Dc.displayName="WuTimePicker";const gy=1,by=1e6;let Ca=0;function yy(){return Ca=(Ca+1)%Number.MAX_SAFE_INTEGER,Ca.toString()}const Ta=new Map,kc=e=>{if(Ta.has(e))return;const t=setTimeout(()=>{Ta.delete(e),gn({type:"REMOVE_TOAST",toastId:e})},by);Ta.set(e,t)},xy=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,gy)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?kc(n):e.toasts.forEach(s=>{kc(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===n||n===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},ws=[];let fs={toasts:[]};function gn(e){fs=xy(fs,e),ws.forEach(t=>{t(fs)})}function Pc({...e}){const t=yy(),n=r=>gn({type:"UPDATE_TOAST",toast:{...r,id:t}}),s=()=>gn({type:"DISMISS_TOAST",toastId:t});return gn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||s()}}}),{id:t,dismiss:s,update:n}}function vy(){const[e,t]=h.useState(fs);return h.useEffect(()=>(ws.push(t),()=>{const n=ws.indexOf(t);n>-1&&ws.splice(n,1)}),[e]),{...e,toast:Pc,dismiss:n=>gn({type:"DISMISS_TOAST",toastId:n})}}const Ny=()=>({showToast:({message:t,variant:n,duration:s,position:r})=>Pc({description:t,variant:n,duration:s,position:r})}),Sy=Se.Provider,Cy=_e.cva("wu-fixed wu-z-[100] wu-flex wu-max-h-screen wu-w-full wu-flex-col-reverse wu-px-4 wu-py-2 sm:wu-flex-col md:wu-max-w-[720px] wu-w-fit wu-toast-container",{variants:{position:{topRight:"wu-right-0 wu-top-0",top:"wu-top-0 wu-left-1/2 wu--translate-x-1/2",topLeft:"wu-left-0 wu-top-0",bottom:"wu-bottom-0 wu-left-1/2 wu--translate-x-1/2",bottomRight:"wu-right-0 wu-bottom-0",bottomLeft:"wu-left-0 wu-bottom-0"}},defaultVariants:{position:"top"}}),_c=y.forwardRef(({className:e,position:t,...n},s)=>a.jsx(Se.Viewport,{ref:s,className:p(Cy({position:t}),e),...n}));_c.displayName=Se.Viewport.displayName;const Ty=_e.cva("group wu-pointer-events-auto wu-text-xs wu-font-normal wu-relative wu-flex wu-w-full wu-min-h-12 wu-items-center wu-justify-between wu-overflow-hidden wu-px-4 wu-pr-0 wu-py-2 wu-shadow-sm wu-transition-all data-[swipe=cancel]:wu-translate-y-0 data-[swipe=end]:wu-translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:wu-translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:wu-transition-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[swipe=end]:wu-animate-out data-[state=closed]:wu-fade-out-80",{variants:{variant:{default:"wu-border wu-bg-white wu-text-text",success:"wu-text-green-deep wu-bg-green-soft",error:"wu-text-red-deep wu-bg-red-soft",warning:"wu-text-yellow-deep wu-bg-yellow-soft",info:"wu-text-blue-deep wu-bg-blue-soft"},position:{topRight:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",top:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",topLeft:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",bottom:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomRight:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomLeft:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full"}},defaultVariants:{variant:"success",position:"top"}}),Vc=y.forwardRef(({className:e,variant:t,position:n,...s},r)=>a.jsx(Se.Root,{ref:r,className:p(Ty({variant:t,position:n}),e),...s}));Vc.displayName=Se.Root.displayName;const Ey=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Action,{ref:n,className:p("wu-inline-flex wu-h-8 wu-shrink-0 wu-items-center wu-justify-center wu-border wu-bg-transparent wu-px-3 wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-secondary focus:wu-outline-none focus:wu-ring-2 focus:wu-ring-ring focus:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-50 group-[.destructive]:wu-border-muted/40 group-[.destructive]:hover:wu-border-destructive/30 group-[.destructive]:hover:wu-bg-destructive group-[.destructive]:hover:wu-text-destructive-foreground group-[.destructive]:focus:wu-ring-destructive",e),...t}));Ey.displayName=Se.Action.displayName;const Oc=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Close,{ref:n,className:p("wu-relative wu-right-4 wu-bottom-2 wu-rounded-sm wu-w-4 wu-h-4 wu-p-1 wu-text-foreground/50 wu-opacity-100 wu-transition-opacity hover:wu-text-foreground focus:wu-opacity-100 focus:wu-outline-none group-hover:wu-opacity-100 group-[.destructive]:wu-text-red-300 group-[.destructive]:hover:wu-text-red-50 group-[.destructive]:focus:wu-ring-red-400 group-[.destructive]:focus:wu-ring-offset-red-600",e),"toast-close":"","aria-label":"Close toast",...t,children:a.jsx("span",{className:"wm-close wu-text-base"})}));Oc.displayName=Se.Close.displayName;const Fc=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Title,{ref:n,className:p("wu-text-sm wu-font-semibold",e),...t}));Fc.displayName=Se.Title.displayName;const Lc=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Description,{ref:n,className:p("wu-text-sm wu-opacity-90",e),...t}));Lc.displayName=Se.Description.displayName;function My(){const{toasts:e}=vy(),t=e.reduce((n,s)=>{const r=s.position||"top";return n[r]||(n[r]=[]),n[r].push(s),n},{});return a.jsx(Sy,{children:Object.entries(t).map(([n,s])=>a.jsx(_c,{position:n,children:s.map(function({id:r,title:o,description:i,action:u,variant:l,position:d,...c}){const w={success:"wm-check-circle",info:"wm-info",warning:"wm-error",error:"wm-cancel"};return a.jsxs(Vc,{variant:l||"success",position:d,...c,children:[a.jsxs("div",{className:"wu-grid wu-gap-1",children:[o&&a.jsx(Fc,{children:o}),i&&a.jsxs(Lc,{className:"wu-flex wu-items-center wu-gap-3 wu-pr-6",children:[a.jsx(Ve,{icon:w[l||"success"],className:"wu-text-xl"}),i]})]}),u,a.jsx(Oc,{})]},r)})},n))})}const Iy=()=>a.jsx(My,{}),Wc=y.forwardRef(({className:e,dir:t,...n},s)=>a.jsx(xs.Root,{className:p("wu-bg-gray-40 wu-inline-flex wu-h-2 wu-w-8 wu-shrink-0 wu-cursor-pointer wu-items-center wu-rounded-full wu-transition-colors focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[5px] focus-visible:wu-ring-offset-background disabled:wu-cursor-not-allowed disabled:wu-opacity-50 data-[state=unchecked]:wu-bg-gray-25 wu-group","hover:wu-bg-gray-subtle hover:data-[state=unchecked]:wu-bg-gray-subtle",e),...n,ref:s,children:a.jsx(xs.Thumb,{className:p("wu-block wu-h-4 wu-w-4 wu-rounded-full wu-bg-gray-subtle wu-shadow-lg wu-ring-0 wu-transition-all data-[state=checked]:wu-bg-blue-p","group-hover:data-[state=unchecked]:wu-bg-gray-lead",t==="rtl"&&"-wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0",t!=="rtl"&&"wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0","wu-toggle-thumb")})}));Wc.displayName=xs.Root.displayName;const Bc=h.forwardRef((e,t)=>{const{Label:n,labelPosition:s="right",onChange:r,className:o,dir:i,disabled:u,id:l=Cn(),...d}=e;return h.useEffect(()=>{const{checked:c,defaultChecked:w}=d;c!==void 0&&w!==void 0&&console.error("WuToggle: Both `checked` and `defaultChecked` props are set. Use only one of them.")},[d.checked,d.defaultChecked]),a.jsxs("div",{className:p(Ay({labelPosition:s}),"wu-toggle-container"),dir:i,children:[a.jsx(Wc,{...d,id:l,disabled:u,ref:t,onCheckedChange:r,className:p("wu-peer",o),dir:i}),a.jsx(Te,{htmlFor:l,className:"wu-toggle-label",children:n})]})});Bc.displayName="WuToggle";const Ay=_e.cva("wu-flex wu-items-center wu-gap-3 wu-w-fit",{variants:{labelPosition:{right:"wu-flex-row",left:"wu-flex-row-reverse",top:"wu-flex-col-reverse wu-items-baseline"}}}),ps=h.createContext(null),Dy=()=>{const e=h.useContext(ps);if(!e)throw new Error("useTranslation must be used within a WuTranslationProvider");return e.useTranslation()},ky=()=>{const e=h.useContext(ps);if(!e)throw new Error("useLoadTranslationsFunction must be used within a WuTranslationProvider");return e},Py=({children:e})=>{const[t,n]=h.useState({}),[s,r]=h.useState({}),o=h.useCallback(async(d,c)=>{try{const f=await(await fetch(d)).json();n(f)}catch(w){console.error("Failed to load translations:",w),c&&n(c)}c&&r(c)},[]),i=h.useCallback(d=>{r(d)},[]),u=h.useCallback(()=>({t:(c,w)=>t[c]?t[c]:s[c]?s[c]:w||c}),[t,s]),l={loadTranslations:o,setFallbackTranslations:i,useTranslation:u};return a.jsx(ps.Provider,{value:l,children:e})},_y={qualitative:{"--wu-qualitative-1":"#4C5B94","--wu-qualitative-2":"#5B7AAE","--wu-qualitative-3":"#409EB5","--wu-qualitative-4":"#40B59E","--wu-qualitative-5":"#60C790","--wu-qualitative-6":"#9AD69A","--wu-qualitative-7":"#B3BD56","--wu-qualitative-8":"#DD8F40","--wu-qualitative-9":"#CE6550","--wu-qualitative-10":"#AE4C3D","--wu-qualitative-11":"#8F3328","--wu-qualitative-12":"#985D75","--wu-qualitative-13":"#B181A8","--wu-qualitative-14":"#C5A0C2","--wu-qualitative-15":"#DAC2E0","--wu-qualitative-16":"#E3D9E8"},blueSequential:{"--wu-blue-sequential-1":"#EBF8FF","--wu-blue-sequential-2":"#D7EFFF","--wu-blue-sequential-3":"#C2DEFF","--wu-blue-sequential-4":"#AAD0FF","--wu-blue-sequential-5":"#94C1F3","--wu-blue-sequential-6":"#7DB2E7","--wu-blue-sequential-7":"#67A3DB","--wu-blue-sequential-8":"#5194CF","--wu-blue-sequential-9":"#3B85C3","--wu-blue-sequential-10":"#2576B7","--wu-blue-sequential-11":"#256CAC","--wu-blue-sequential-12":"#1A60A6","--wu-blue-sequential-13":"#184994","--wu-blue-sequential-14":"#1C337F","--wu-blue-sequential-15":"#0D2163","--wu-blue-sequential-16":"#00083D"},greenSequential:{"--wu-green-sequential-1":"#E0F9ED","--wu-green-sequential-2":"#C4F3DC","--wu-green-sequential-3":"#A8ECCC","--wu-green-sequential-4":"#8DE5BD","--wu-green-sequential-5":"#78DDB1","--wu-green-sequential-6":"#62D3A3","--wu-green-sequential-7":"#4CC996","--wu-green-sequential-8":"#3ABF8A","--wu-green-sequential-9":"#35AF7F","--wu-green-sequential-10":"#329D75","--wu-green-sequential-11":"#308A6A","--wu-green-sequential-12":"#2D7A60","--wu-green-sequential-13":"#286A55","--wu-green-sequential-14":"#255C4B","--wu-green-sequential-15":"#1F4B3E","--wu-green-sequential-16":"#1B3D34"},redSequential:{"--wu-red-sequential-1":"#FEE9EC","--wu-red-sequential-2":"#FFD2D8","--wu-red-sequential-3":"#FFBBC4","--wu-red-sequential-4":"#FFA6B3","--wu-red-sequential-5":"#FB97A5","--wu-red-sequential-6":"#F78998","--wu-red-sequential-7":"#F37C8C","--wu-red-sequential-8":"#EE6F80","--wu-red-sequential-9":"#E76172","--wu-red-sequential-10":"#E15466","--wu-red-sequential-11":"#DA465B","--wu-red-sequential-12":"#D33B50","--wu-red-sequential-13":"#BC3548","--wu-red-sequential-14":"#A73343","--wu-red-sequential-15":"#91313E","--wu-red-sequential-16":"#7D2D38"},orangeSequential:{"--wu-orange-sequential-1":"#FDEDE5","--wu-orange-sequential-2":"#FCDFCF","--wu-orange-sequential-3":"#FBCFBA","--wu-orange-sequential-4":"#FAC5AB","--wu-orange-sequential-5":"#F7B694","--wu-orange-sequential-6":"#F6AB85","--wu-orange-sequential-7":"#F79D70","--wu-orange-sequential-8":"#F6915F","--wu-orange-sequential-9":"#EF8450","--wu-orange-sequential-10":"#E37944","--wu-orange-sequential-11":"#DB713C","--wu-orange-sequential-12":"#D06530","--wu-orange-sequential-13":"#C95E29","--wu-orange-sequential-14":"#BD521C","--wu-orange-sequential-15":"#B24610","--wu-orange-sequential-16":"#AA3F08"},divergent:{"--wu-red-divergent-1":"#661200","--wu-red-divergent-2":"#A11C00","--wu-red-divergent-3":"#D2300E","--wu-red-divergent-4":"#DF4828","--wu-red-divergent-5":"#EB6A4A","--wu-red-divergent-6":"#F4896C","--wu-red-divergent-7":"#FFC4B3","--wu-red-divergent-8":"#FFE2D9","--wu-divergent-neutral":"#F5F5F5","--wu-blue-divergent-1":"#DBD9E9","--wu-blue-divergent-2":"#B7B5D4","--wu-blue-divergent-3":"#9392BF","--wu-blue-divergent-4":"#7070AA","--wu-blue-divergent-5":"#4A5195","--wu-blue-divergent-6":"#1B3380","--wu-blue-divergent-7":"#182D72","--wu-blue-divergent-8":"#122254"},nps:{"--wu-nps-detractor":"#F85271","--wu-nps-passive":"#F1DA7E","--wu-nps-promoter":"#42BD84"},sentiment:{"--wu-sentiment-negative":"#F85271","--wu-sentiment-slightly-negative":"#F69A79","--wu-sentiment-neutral":"#F1DA7E","--wu-sentiment-slightly-positive":"#94D08B","--wu-sentiment-positive":"#42BD84","--wu-sentiment-no-sentiment":"#E0E0E0"}};window.wickUiVersion="1.29.2",Object.defineProperty(E,"useContext",{enumerable:!0,get:()=>h.useContext}),E.CHART_COLOR_SYSTEM=_y,E.WuAccordion=ud,E.WuActivityLog=dd,E.WuAppHeader=Fd,E.WuAppHeaderAccount=Fa,E.WuAppHeaderBar=za,E.WuAppHeaderHelp=La,E.WuAppHeaderMenu=qa,E.WuAppHeaderSearch=Vd,E.WuButton=Ce,E.WuCalender=_s,E.WuCard=Ja,E.WuCardFooter=Ra,E.WuCardHeader=Qa,E.WuCheckbox=Fe,E.WuChip=Kd,E.WuCombobox=nw,E.WuCopyToClipboard=sw,E.WuDataTable=ly,E.WuDatePicker=Wd,E.WuDateRangePicker=jd,E.WuDisplay=Nd,E.WuDrawer=cw,E.WuDrawerClose=dw,E.WuDrilldown=fm,E.WuFooter=yu,E.WuFormGroup=_d,E.WuHeading=xd,E.WuHelpButton=xu,E.WuIcon=Ve,E.WuInput=Ge,E.WuInputError=Dd,E.WuInputHint=kd,E.WuLabel=Te,E.WuListbox=Tm,E.WuLoader=St,E.WuMenu=zr,E.WuMenuCheckboxItem=sm,E.WuMenuIcon=$r,E.WuMenuItem=Kn,E.WuMenuItemGroup=rm,E.WuMenuRadioItem=am,E.WuMenuSeparatorItem=om,E.WuModal=km,E.WuModalClose=Om,E.WuModalContent=Pm,E.WuModalFooter=Vm,E.WuModalHeader=_m,E.WuMonthPicker=qm,E.WuPagination=Ou,E.WuPopover=zd,E.WuPopoverClose=Fs,E.WuPrimaryNavbar=$m,E.WuRadioGroup=Bu,E.WuScrollArea=Um,E.WuSecondaryNavbar=Hm,E.WuSelect=Pu,E.WuSidebar=Jg,E.WuSidebarCollapsibleMenu=nb,E.WuSidebarContent=Qg,E.WuSidebarFooter=Rg,E.WuSidebarGroup=eb,E.WuSidebarItem=Ml,E.WuSidebarMenu=tb,E.WuSidebarTrigger=El,E.WuSpotlight=Mu,E.WuStackedCard=ab,E.WuStackedCardOverlay=ob,E.WuStepper=Rb,E.WuSubMenu=im,E.WuSubtext=vd,E.WuSwitcher=fc,E.WuTab=oy,E.WuTable=cy,E.WuText=yd,E.WuTextarea=Tc,E.WuTimePicker=Dc,E.WuToast=Iy,E.WuToggle=Bc,E.WuTooltip=En,E.WuTranslationContext=ps,E.WuTranslationProvider=Py,E.WuTruncatedLabel=Od,E.WuVirtualScroll=Ct,E.calculatePosition=rb,E.useTranslation=Dy,E.useTranslationsContext=ky,E.useWuShowToast=Ny,E.useWuSidebar=tt,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
21
21
  //# sourceMappingURL=index.js.map