@npm-questionpro/wick-ui-lib 1.48.1 → 1.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,20 @@
1
- (function(k,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("react-day-picker"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("@radix-ui/react-checkbox"),require("@radix-ui/react-label"),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","react-day-picker","@radix-ui/react-slot","class-variance-authority","@radix-ui/react-checkbox","@radix-ui/react-label","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):(k=typeof globalThis<"u"?globalThis:k||self,a(k["wick-ui-lib"]={},k["react/jsx-runtime"],k.RadixUIAvatar,k.React,k.clsx,k.tailwindMerge,k.RadixUIAccordion,k.ReactDayPicker,k.RadixUISlot,k.ClassVarianceAuthority,k.RadixUICheckbox,k.RadixUILabel,k.cmdk,k.RadixUIPopover,k.RadixUITooltip,k.ReactVirtuoso,k.RadixUIDropdownMenu,k.TanstackReactTable,k.dateFns,k.RadixUIDialog,k.RadixUIScrollArea,k.RadixUIRadioGroup,k.RadixUISeparator,k.ReactDOM,k.RadixUIToggleGroup,k.RadixUIToggle,k.RadixUITabs,k.RadixUIToast,k.RadixUISwitch))})(this,(function(k,a,St,f,Ld,Fd,Wd,Ra,Ct,Be,Bd,$d,Ne,jt,Lr,eo,qd,Ve,z,to,Hd,zd,Ud,jd,Gd,Kd,Yd,Xd,Zd){"use strict";var Xv=Object.defineProperty;var Zv=(k,a,St)=>a in k?Xv(k,a,{enumerable:!0,configurable:!0,writable:!0,value:St}):k[a]=St;var Te=(k,a,St)=>Zv(k,typeof a!="symbol"?a+"":a,St);var Od;function me(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Tt=me(St),E=me(f),it=me(Wd),Fr=me(Bd),no=me($d),Gt=me(jt),Kt=me(Lr),se=me(qd),re=me(to),ut=me(Hd),Yt=me(zd),ro=me(Ud),Jd=me(jd),kn=me(Gd),so=me(Kd),lt=me(Yd),Ee=me(Xd),Wr=me(Zd),Qd=Fd.extendTailwindMerge({prefix:"wu-"});function h(...e){return Qd(Ld.clsx(e))}const Br=e=>{window==null||window.open(e,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600")};function $r(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function Dn(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 Rd=e=>e?/\S+@questionpro\.com/.test(e):!1,ao=it.Root,qr=E.forwardRef(({className:e,...t},n)=>a.jsx(it.Item,{ref:n,className:h("wu-border-b",e),...t}));qr.displayName="AccordionItem";const Hr=E.forwardRef(({className:e,children:t,...n},r)=>a.jsx(it.Header,{className:"wu-flex",children:a.jsxs(it.Trigger,{ref:r,className:h("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"})]})}));Hr.displayName=it.Trigger.displayName;const zr=E.forwardRef(({className:e,children:t,...n},r)=>a.jsx(it.Content,{ref:r,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:h("wu-pb-4 wu-pt-0",e),children:t})}));zr.displayName=it.Content.displayName;const ew=e=>{const{items:t,className:n,dir:r="ltr"}=e;if(e.type==="multiple"){const{defaultValue:s=[],value:o,onValueChange:i}=e;return a.jsx(ao,{type:"multiple",className:"wu-w-full wu-accordion-container",defaultValue:s,value:o,onValueChange:i,dir:r,children:t.map(({value:u,Summary:l,Details:d,className:c})=>a.jsxs(qr,{value:u,dir:r,className:h(n,c),children:[a.jsx(Hr,{dir:r,className:"wu-accordion-summary",children:l}),a.jsx(zr,{dir:r,className:"wu-accordion-details",children:d})]},u))})}else{const{defaultValue:s,value:o,onValueChange:i}=e;return a.jsx(ao,{type:"single",className:"wu-w-full wu-accordion-container",defaultValue:s,value:o,onValueChange:i,dir:r,collapsible:!0,children:t.map(({value:u,Summary:l,Details:d,className:c})=>a.jsxs(qr,{value:u,dir:r,className:h(n,c),children:[a.jsx(Hr,{dir:r,className:"wu-accordion-summary",children:l}),a.jsx(zr,{dir:r,className:"wu-accordion-details",children:d})]},u))})}},Ur=E.forwardRef(({className:e,...t},n)=>a.jsx(Tt.Root,{ref:n,className:h("wu-relative wu-flex wu-h-10 wu-w-10 wu-shrink-0 wu-overflow-hidden wu-rounded-full",e),...t}));Ur.displayName=Tt.Root.displayName;const jr=E.forwardRef(({className:e,...t},n)=>a.jsx(Tt.Image,{ref:n,className:h("wu-aspect-square wu-h-full wu-w-full",e),...t}));jr.displayName=Tt.Image.displayName;const Gr=E.forwardRef(({className:e,...t},n)=>a.jsx(Tt.Fallback,{ref:n,className:h("wu-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-rounded-full wu-bg-muted",e),...t}));Gr.displayName=Tt.Fallback.displayName;const we={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"},Je=(e,t)=>t.includes(".")?t.split(".").reduce((n,r)=>n==null?void 0:n[r],e):e==null?void 0:e[t],tw=({log:e,accessorKey:t})=>{const n=Je(e,t.time),r=Je(e,t.userName),s=Je(e,t.userInitials),o=Je(e,t.userImage??""),i=Je(e,t.tags??""),u=Je(e,t.description);return a.jsxs("div",{className:we.logItem,"data-slot":"log-item",children:[a.jsx("div",{className:we.timelineDotSmall,"data-slot":"timeline-dot-small"}),a.jsxs("div",{className:we.content,"data-slot":"content",children:[a.jsx("div",{className:we.time,"data-slot":"time",children:n}),(i==null?void 0:i.length)>0&&a.jsx("div",{className:we.tags,"data-slot":"tags",children:i.map((l,d)=>a.jsx("span",{className:h(we.tag,d===0?we.tagPrimary:we.tagSecondary),"data-slot":"tag",children:l},l))}),a.jsxs("div",{className:we.userActionRow,"data-slot":"user-action-row",children:[a.jsxs(Ur,{className:we.avatar,"data-slot":"avatar",children:[a.jsx(jr,{src:o,alt:r,"data-slot":"log-user-avatar-image"}),a.jsx(Gr,{className:"wu-text-[10px] wu-bg-slate-400 wu-text-white","data-slot":"log-user-avatar-fallback",children:s})]}),a.jsxs("p",{className:we.actionText,"data-slot":"action-text",children:[a.jsx("span",{className:we.userName,"data-slot":"log-username",children:r})," ",u]})]})]})]})},nw=f.memo(tw),rw=({logs:e,accessorKey:t,className:n,...r})=>{const s=f.useMemo(()=>e.reduce((o,i)=>{const u=Je(i,t.date);return u&&(o[u]=o[u]||[],o[u].push(i)),o},{}),[e,t.date]);return a.jsxs("div",{className:h(we.timelineContainer,n),"data-slot":"timeline-container",...r,children:[a.jsx("div",{className:we.mainVerticalLine,"data-slot":"main-vertical-line"}),Object.entries(s).map(([o,i])=>a.jsxs("div",{className:we.dateGroup,"data-slot":"date-group",children:[a.jsxs("div",{className:we.dateHeader,"data-slot":"date-header",children:[a.jsx("div",{className:we.dateDot,"data-slot":"date-dot"}),a.jsx("span",{className:we.dateText,"data-slot":"date-text",children:o})]}),a.jsx("div",{className:we.logList,"data-slot":"log-list",children:i.map(u=>{const l=Je(u,t.id);return a.jsx(nw,{log:u,accessorKey:t},l)})})]},o))]})};function Kr(e,t){f.useEffect(()=>{const n=r=>{Array.isArray(e)&&e.some(s=>!s.current||s.current.contains(r.target))||!Array.isArray(e)&&(!e.current||e.current.contains(r.target))||t(r)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])}const Yr={dropdownContainer:"_dropdownContainer_vvlo9_1",open:"_open_vvlo9_1",dropdownMenu:"_dropdownMenu_vvlo9_1"},oo=({dir:e,Trigger:t,triggerClassName:n,DropdownContent:r,isAllowActiveStyle:s})=>{const[o,i]=f.useState(!1),u=f.useRef(null),l=f.useRef(null);Kr([u,l],()=>i(!1));const d=()=>{i(!o)};return a.jsx(a.Fragment,{children:a.jsx("div",{className:Yr.dropdownContainer,children:a.jsx("ul",{children:a.jsxs("li",{className:h("wu-flex wu-relative",o&&Yr.open),children:[a.jsx("button",{className:h("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,s&&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:h(Yr.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:r})]})})})})},ct=f.forwardRef((e,t)=>sw(e,t)),sw=(e,t)=>{const{size:n="md",color:r="#1B87E6",variant:s="dots",...o}=e,i=h("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:r,width:u,height:u},d=a.jsxs("div",{...o,ref:t,className:h("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:r}}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]}),c=a.jsxs("div",{...o,ref:t,className:h("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:s==="spinner"?d:c})};ct.displayName="WuLoader";const aw={wuButton:"_wuButton_1ftm8_1"},Ie=f.forwardRef(({disabled:e,loading:t,variant:n="primary",size:r="md",Icon:s,iconPosition:o="left",children:i,floating:u,className:l,color:d="primary",selected:c,...w},m)=>a.jsxs("button",{ref:m,disabled:e||t,"data-variant":n,"data-size":r,"data-color":d,"data-loading":t||void 0,"data-selected":c||void 0,"data-floating":u||void 0,"data-icon-position":o,className:h(aw.wuButton,l),...w,children:[!t&&s&&a.jsx(a.Fragment,{children:s}),t&&a.jsx(ct,{color:d==="neutral"?"#000":"#fff",size:n==="iconOnly"?"lg":"sm",variant:n==="iconOnly"?"spinner":"dots"}),!t&&i]}));Ie.displayName="WuButton";const ow=({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(Ie,{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"})]}),iw=({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:r,url:s,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:s,className:h("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:h(o,"wu-w-12 wu-text-center")}),a.jsx("span",{children:r})]}),i]})},u))}),a.jsx("hr",{className:"wu-border-gray-subtle"})]})},uw=({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:h("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:h("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"})]}),lw=({user:e,dir:t})=>{var n,r,s,o,i,u,l,d,c;return a.jsxs("section",{className:h("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:h("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:(r=e==null?void 0:e.license)==null?void 0:r.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:(s=e==null?void 0:e.profile)==null?void 0:s.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})]})]})]})]})},io=({user:e,onLogout:t,dir:n,DataCenter:r})=>{var s,o;return e?a.jsx(oo,{Trigger:a.jsxs(Ur,{className:h("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(jr,{className:"hover:wu-opacity-80",src:(s=e==null?void 0:e.profile)==null?void 0:s.profilePicture,alt:"User"}),a.jsx(Gr,{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:h("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(lw,{user:e,dir:n}),(e==null?void 0:e.settings)&&e.settings.length>0&&a.jsx(uw,{settings:e.settings,dir:n}),a.jsx(iw,{user:e,dir:n}),a.jsx(ow,{onLogout:t,DataCenter:r})]})}):null},uo=({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(oo,{dir:t,Trigger:a.jsx("span",{className:"wm-question-mark wu-text-xl"}),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((r,s)=>a.jsx("li",{className:"wu-p-0 wu-w-[136px]",dir:t,children:r.target==="window"?a.jsx("a",{tabIndex:0,rel:"noopener noreferrer",onClick:()=>Br(r.link),onKeyDown:o=>{o.key==="Enter"&&Br(r.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
- 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(lo,{item:r,dir:t})}):a.jsx("a",{href:r.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
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@radix-ui/react-accordion`),require(`react`),require(`clsx`),require(`tailwind-merge`),require(`react/jsx-runtime`),require(`@radix-ui/react-avatar`),require(`@radix-ui/react-tooltip`),require(`date-fns`),require(`@radix-ui/react-popover`),require(`react-day-picker`),require(`@radix-ui/react-slot`),require(`class-variance-authority`),require(`@radix-ui/react-label`),require(`react-dom`),require(`@radix-ui/react-checkbox`),require(`cmdk`),require(`react-virtuoso`),require(`@radix-ui/react-dropdown-menu`),require(`@radix-ui/react-dialog`),require(`@radix-ui/react-scroll-area`),require(`@radix-ui/react-radio-group`),require(`@radix-ui/react-separator`),require(`@radix-ui/react-toggle-group`),require(`@radix-ui/react-toggle`),require(`@radix-ui/react-tabs`),require(`@tanstack/react-table`),require(`@radix-ui/react-toast`),require(`@radix-ui/react-switch`)):typeof define==`function`&&define.amd?define(`exports.@radix-ui/react-accordion.react.clsx.tailwind-merge.react/jsx-runtime.@radix-ui/react-avatar.@radix-ui/react-tooltip.date-fns.@radix-ui/react-popover.react-day-picker.@radix-ui/react-slot.class-variance-authority.@radix-ui/react-label.react-dom.@radix-ui/react-checkbox.cmdk.react-virtuoso.@radix-ui/react-dropdown-menu.@radix-ui/react-dialog.@radix-ui/react-scroll-area.@radix-ui/react-radio-group.@radix-ui/react-separator.@radix-ui/react-toggle-group.@radix-ui/react-toggle.@radix-ui/react-tabs.@tanstack/react-table.@radix-ui/react-toast.@radix-ui/react-switch`.split(`.`),t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`wick-ui-lib`]={},e.RadixUIAccordion,e.React,e.clsx,e.tailwindMerge,e[`react/jsx-runtime`],e.RadixUIAvatar,e.RadixUITooltip,e.dateFns,e.RadixUIPopover,e.ReactDayPicker,e.RadixUISlot,e.ClassVarianceAuthority,e.RadixUILabel,e.ReactDOM,e.RadixUICheckbox,e.cmdk,e.ReactVirtuoso,e.RadixUIDropdownMenu,e.RadixUIDialog,e.RadixUIScrollArea,e.RadixUIRadioGroup,e.RadixUISeparator,e.RadixUIToggleGroup,e.RadixUIToggle,e.RadixUITabs,e.TanstackReactTable,e.RadixUIToast,e.RadixUISwitch))})(this,function(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var k=Object.create,A=Object.defineProperty,j=Object.getOwnPropertyDescriptor,M=Object.getOwnPropertyNames,N=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,F=(e,t)=>()=>(e&&(t=e(e=0)),t),I=(e,t)=>{let n={};for(var r in e)A(n,r,{get:e[r],enumerable:!0});return t||A(n,Symbol.toStringTag,{value:`Module`}),n},ee=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=M(t),a=0,o=i.length,s;a<o;a++)s=i[a],!P.call(e,s)&&s!==n&&A(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=j(t,s))||r.enumerable});return e},L=(e,t,n)=>(n=e==null?{}:k(N(e)),ee(t||!e||!e.__esModule?A(n,`default`,{value:e,enumerable:!0}):n,e)),te=e=>P.call(e,`module.exports`)?e[`module.exports`]:ee(A({},`__esModule`,{value:!0}),e);t=L(t,1);let R=L(n,1);n=L(n),o=L(o,1),s=L(s,1),l=L(l,1),p=L(p,1),m=L(m),h=L(h,1),v=L(v,1),y=L(y,1),b=L(b,1),x=L(x,1),S=L(S,1),C=L(C,1),w=L(w,1),T=L(T,1),D=L(D,1),O=L(O,1);var ne=(0,i.extendTailwindMerge)({prefix:`wu-`});function z(...e){return ne((0,r.clsx)(e))}var B=e=>{window?.open(e,`_blank`,`toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600`)};function V(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function re(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``}}var ie=e=>e?/\S+@questionpro\.com/.test(e):!1,ae=t.Root,oe=R.forwardRef(({className:e,...n},r)=>(0,a.jsx)(t.Item,{ref:r,className:z(`wu-border-b`,e),...n}));oe.displayName=`AccordionItem`;var se=R.forwardRef(({className:e,children:n,...r},i)=>(0,a.jsx)(t.Header,{className:`wu-flex`,children:(0,a.jsxs)(t.Trigger,{ref:i,className:z(`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),...r,children:[n,(0,a.jsx)(`span`,{className:`wu-arrow-icon wm-keyboard-arrow-down wu-transition-transform wu-duration-200`})]})}));se.displayName=t.Trigger.displayName;var ce=R.forwardRef(({className:e,children:n,...r},i)=>(0,a.jsx)(t.Content,{ref:i,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`,...r,children:(0,a.jsx)(`div`,{className:z(`wu-pb-4 wu-pt-0`,e),children:n})}));ce.displayName=t.Content.displayName;var le=e=>{let{items:t,className:n,dir:r=`ltr`}=e;if(e.type===`multiple`){let{defaultValue:i=[],value:o,onValueChange:s}=e;return(0,a.jsx)(ae,{type:`multiple`,className:`wu-w-full wu-accordion-container`,defaultValue:i,value:o,onValueChange:s,dir:r,children:t.map(({value:e,Summary:t,Details:i,className:o})=>(0,a.jsxs)(oe,{value:e,dir:r,className:z(n,o),children:[(0,a.jsx)(se,{dir:r,className:`wu-accordion-summary`,children:t}),(0,a.jsx)(ce,{dir:r,className:`wu-accordion-details`,children:i})]},e))})}else{let{defaultValue:i,value:o,onValueChange:s}=e;return(0,a.jsx)(ae,{type:`single`,className:`wu-w-full wu-accordion-container`,defaultValue:i,value:o,onValueChange:s,dir:r,collapsible:!0,children:t.map(({value:e,Summary:t,Details:i,className:o})=>(0,a.jsxs)(oe,{value:e,dir:r,className:z(n,o),children:[(0,a.jsx)(se,{dir:r,className:`wu-accordion-summary`,children:t}),(0,a.jsx)(ce,{dir:r,className:`wu-accordion-details`,children:i})]},e))})}},H=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(o.Root,{ref:n,className:z(`wu-relative wu-flex wu-h-10 wu-w-10 wu-shrink-0 wu-overflow-hidden wu-rounded-full`,e),...t}));H.displayName=o.Root.displayName;var ue=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(o.Image,{ref:n,className:z(`wu-aspect-square wu-h-full wu-w-full`,e),...t}));ue.displayName=o.Image.displayName;var de=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(o.Fallback,{ref:n,className:z(`wu-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-rounded-full wu-bg-muted`,e),...t}));de.displayName=o.Fallback.displayName;var U={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`},fe=(e,t)=>t.includes(`.`)?t.split(`.`).reduce((e,t)=>e?.[t],e):e?.[t],pe=R.default.memo(({log:e,accessorKey:t})=>{let n=fe(e,t.time),r=fe(e,t.userName),i=fe(e,t.userInitials),o=fe(e,t.userImage??``),s=fe(e,t.tags??``),c=fe(e,t.description);return(0,a.jsxs)(`div`,{className:U.logItem,"data-slot":`log-item`,children:[(0,a.jsx)(`div`,{className:U.timelineDotSmall,"data-slot":`timeline-dot-small`}),(0,a.jsxs)(`div`,{className:U.content,"data-slot":`content`,children:[(0,a.jsx)(`div`,{className:U.time,"data-slot":`time`,children:n}),s?.length>0&&(0,a.jsx)(`div`,{className:U.tags,"data-slot":`tags`,children:s.map((e,t)=>(0,a.jsx)(`span`,{className:z(U.tag,t===0?U.tagPrimary:U.tagSecondary),"data-slot":`tag`,children:e},e))}),(0,a.jsxs)(`div`,{className:U.userActionRow,"data-slot":`user-action-row`,children:[(0,a.jsxs)(H,{className:U.avatar,"data-slot":`avatar`,children:[(0,a.jsx)(ue,{src:o,alt:r,"data-slot":`log-user-avatar-image`}),(0,a.jsx)(de,{className:`wu-text-[10px] wu-bg-slate-400 wu-text-white`,"data-slot":`log-user-avatar-fallback`,children:i})]}),(0,a.jsxs)(`p`,{className:U.actionText,"data-slot":`action-text`,children:[(0,a.jsx)(`span`,{className:U.userName,"data-slot":`log-username`,children:r}),`\xA0`,c]})]})]})]})}),me=({logs:e,accessorKey:t,className:n,...r})=>{let i=(0,R.useMemo)(()=>e.reduce((e,n)=>{let r=fe(n,t.date);return r?(e[r]=e[r]||[],e[r].push(n),e):e},{}),[e,t.date]);return(0,a.jsxs)(`div`,{className:z(U.timelineContainer,n),"data-slot":`timeline-container`,...r,children:[(0,a.jsx)(`div`,{className:U.mainVerticalLine,"data-slot":`main-vertical-line`}),Object.entries(i).map(([e,n])=>(0,a.jsxs)(`div`,{className:U.dateGroup,"data-slot":`date-group`,children:[(0,a.jsxs)(`div`,{className:U.dateHeader,"data-slot":`date-header`,children:[(0,a.jsx)(`div`,{className:U.dateDot,"data-slot":`date-dot`}),(0,a.jsx)(`span`,{className:U.dateText,"data-slot":`date-text`,children:e})]}),(0,a.jsx)(`div`,{className:U.logList,"data-slot":`log-list`,children:n.map(e=>{let n=fe(e,t.id);return(0,a.jsx)(pe,{log:e,accessorKey:t},n)})})]},e))]})};function he(e,t){R.default.useEffect(()=>{let n=n=>{Array.isArray(e)&&e.some(e=>!e.current||e.current.contains(n.target))||!Array.isArray(e)&&(!e.current||e.current.contains(n.target))||t(n)};return document.addEventListener(`mousedown`,n),document.addEventListener(`touchstart`,n),()=>{document.removeEventListener(`mousedown`,n),document.removeEventListener(`touchstart`,n)}},[e,t])}var ge={dropdownContainer:`_dropdownContainer_vvlo9_1`,open:`_open_vvlo9_1`,dropdownMenu:`_dropdownMenu_vvlo9_1`},_e=({dir:e,Trigger:t,triggerClassName:n,DropdownContent:r,isAllowActiveStyle:i})=>{let[o,s]=(0,R.useState)(!1),c=(0,R.useRef)(null),l=(0,R.useRef)(null);he([c,l],()=>s(!1));let u=()=>{s(!o)};return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(`div`,{className:ge.dropdownContainer,children:(0,a.jsx)(`ul`,{children:(0,a.jsxs)(`li`,{className:z(`wu-flex wu-relative`,o&&ge.open),children:[(0,a.jsx)(`button`,{className:z(`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,i&&o&&`wu-bg-white wu-text-blue-switcher`),onClick:e=>{e.preventDefault(),u()},ref:l,"aria-label":`dropdown-trigger`,children:t}),(0,a.jsx)(`div`,{className:z(ge.dropdownMenu,{open:o},e===`rtl`?`wu-left-[-10px] wu-top-[38px]`:`wu-right-[-7px] wu-top-[38px]`),dir:e,ref:c,"aria-label":`user-menu`,children:r})]})})})})},ve=R.default.forwardRef((e,t)=>ye(e,t)),ye=(e,t)=>{let{size:n=`md`,color:r=`#1B87E6`,variant:i=`dots`,...o}=e,s=z(`wu-w-[4em] wu-h-[1em] wu-inline-block wu-text-xs wu-relative wu-loader-dot-container`),c=`7px`;n===`sm`?c=`7px`:n===`md`?c=`12px`:n===`lg`?c=`18px`:typeof n==`string`&&(c=n);let l={backgroundColor:r,width:c,height:c},u=(0,a.jsxs)(`div`,{...o,ref:t,className:z(`wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit`,e.className),role:`status`,"aria-busy":`true`,children:[(0,a.jsx)(`div`,{className:`wu-w-12 wu-h-12 wu-border-2 wu-rounded-full wu-animate-spin`,style:{width:c,height:c,borderTopColor:r}}),e.message&&(0,a.jsx)(`p`,{className:`wu-inline-block wu-loader-message`,children:e.message})]}),d=(0,a.jsxs)(`div`,{...o,ref:t,className:z(`wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit`,e.className),role:`alert`,"aria-busy":`true`,children:[(0,a.jsxs)(`ul`,{className:s,style:{fontSize:c},role:`loader`,children:[(0,a.jsx)(`li`,{className:`wu-dot wu-loader-dot`,style:l}),(0,a.jsx)(`li`,{className:`wu-dot wu-loader-dot`,style:l}),(0,a.jsx)(`li`,{className:`wu-dot wu-loader-dot`,style:l}),(0,a.jsx)(`li`,{className:`wu-dot wu-loader-dot`,style:l})]}),e.message&&(0,a.jsx)(`p`,{className:`wu-inline-block wu-loader-message`,children:e.message})]});return(0,a.jsx)(a.Fragment,{children:i===`spinner`?u:d})};ve.displayName=`WuLoader`;var be={wuButton:`_wuButton_1ftm8_1`},W=(0,R.forwardRef)(({disabled:e,loading:t,variant:n=`primary`,size:r=`md`,Icon:i,iconPosition:o=`left`,children:s,floating:c,className:l,color:u=`primary`,selected:d,...f},p)=>(0,a.jsxs)(`button`,{ref:p,disabled:e||t,"data-variant":n,"data-size":r,"data-color":u,"data-loading":t||void 0,"data-selected":d||void 0,"data-floating":c||void 0,"data-icon-position":o,className:z(be.wuButton,l),...f,children:[!t&&i&&(0,a.jsx)(a.Fragment,{children:i}),t&&(0,a.jsx)(ve,{color:u===`neutral`?`#000`:`#fff`,size:n===`iconOnly`?`lg`:`sm`,variant:n===`iconOnly`?`spinner`:`dots`}),!t&&s]}));W.displayName=`WuButton`;var xe=({onLogout:e,DataCenter:t})=>(0,a.jsxs)(`section`,{className:`wu-flex wu-justify-between wu-px-4 wu-py-4 wu-text-white wu-bg-gray-lead`,children:[(0,a.jsx)(`div`,{className:`wu-flex-1 wu-flex wu-items-start`,children:t}),(0,a.jsx)(W,{variant:`outline`,size:`sm`,Icon:(0,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`})]}),Se=({user:e,dir:t})=>{let n=[e?.usage&&Object.keys(e.usage).length>0?{title:e.usage.title,url:e.usage.url,icon:`wm-bar-chart wu-text-base`,node:(0,a.jsxs)(`div`,{className:`wu-flex wu-flex-col wu-items-center wu-w-20`,children:[(0,a.jsx)(`code`,{className:`wu-font-medium`,children:e.usage.collectedResponseCount||`0`}),(0,a.jsx)(`span`,{className:`wu-text-xs wu-font-normal`,children:`Responses`})]})}: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:(0,a.jsx)(`div`,{className:`wu-flex wu-justify-center wu-items-center wu-w-20`,children:(0,a.jsx)(`code`,{children:e.invoice.size})})}:null].filter(Boolean);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`ul`,{children:n.map(({title:e,url:r,icon:i,node:o},s)=>(0,a.jsx)(`li`,{className:s<n.length-1?`wu-border-b wu-border-gray-subtle`:``,children:(0,a.jsxs)(`a`,{href:r,className:z(`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:[(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-gap-2`,children:[(0,a.jsx)(`span`,{className:z(i,`wu-w-12 wu-text-center`)}),(0,a.jsx)(`span`,{children:e})]}),o]})},s))}),(0,a.jsx)(`hr`,{className:`wu-border-gray-subtle`})]})},Ce=({settings:e,dir:t})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`hr`,{className:`wu-border-gray-subtle`}),(0,a.jsxs)(`section`,{className:`wu-relative wu-flex wu-items-center wu-justify-start wu-gap-2`,children:[(0,a.jsx)(`span`,{className:z(`wu-absolute wm-settings wu-text-base`,t===`rtl`?`wu-right-4`:`wu-left-4`)}),(0,a.jsx)(`ul`,{className:`wu-w-full`,dir:t,children:e?.map(e=>(0,a.jsx)(`li`,{tabIndex:-1,dir:t,children:(0,a.jsx)(`a`,{href:e.url,className:z(`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:e.title})},e.title))})]}),(0,a.jsx)(`hr`,{className:`wu-border-gray-subtle`})]}),we=({user:e,dir:t})=>(0,a.jsxs)(`section`,{className:z(`wu-flex wu-gap-2 wu-p-4 wu-w-full`,t===`rtl`?`wu-pr-0`:`wu-pl-0`),children:[(0,a.jsx)(`div`,{className:`wu-flex wu-items-center wu-justify-center wu-w-12`,children:(0,a.jsx)(`span`,{className:`wu-text-base wm-person`})}),(0,a.jsxs)(`div`,{className:z(`wu-flex wu-flex-col wu-gap-1`,t===`rtl`&&`wu-text-right`),children:[(0,a.jsx)(`p`,{children:e?.profile?.title}),(0,a.jsxs)(`a`,{href:e?.license?.url,className:`hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p`,dir:t,children:[(0,a.jsx)(`p`,{children:e?.profile?.subtitle}),(0,a.jsx)(`p`,{className:`wu-font-light`,children:e?.profile?.companyName})]}),e?.license&&Object.keys(e.license).length>0&&(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-justify-between wu-gap-6 wu-mt-3`,dir:t,children:[(0,a.jsx)(`a`,{href:e?.license?.url,className:`hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p`,children:(0,a.jsxs)(`div`,{className:`wu-flex wu-flex-col wu-items-start wu-gap-1`,children:[(0,a.jsx)(`p`,{className:`wu-font-normal`,children:e?.license?.subtitle}),(0,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:e?.license?.title})]})}),(0,a.jsxs)(`div`,{className:`wu-flex wu-flex-col wu-items-start wu-gap-1`,dir:t,children:[(0,a.jsx)(`p`,{className:`wu-font-normal`,children:e?.license?.expiryDatePostFixString}),(0,a.jsx)(`p`,{children:e?.license?.expiryDate})]})]})]})]}),Te=({user:e,onLogout:t,dir:n,DataCenter:r})=>e?(0,a.jsx)(_e,{Trigger:(0,a.jsxs)(H,{className:z(`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:[(0,a.jsx)(ue,{className:`hover:wu-opacity-80`,src:e?.profile?.profilePicture,alt:`User`}),(0,a.jsx)(de,{children:e?.profile?.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:(0,a.jsxs)(`div`,{className:z(`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:[(0,a.jsx)(we,{user:e,dir:n}),e?.settings&&e.settings.length>0&&(0,a.jsx)(Ce,{settings:e.settings,dir:n}),(0,a.jsx)(Se,{user:e,dir:n}),(0,a.jsx)(xe,{onLogout:t,DataCenter:r})]})}):null,Ee=({menuList:e,dir:t})=>(0,a.jsx)(_e,{dir:t,Trigger:(0,a.jsx)(`span`,{className:`wm-question-mark wu-text-xl`}),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:(0,a.jsx)(`ul`,{children:(e||[{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`}]).map((e,n)=>(0,a.jsx)(`li`,{className:`wu-p-0 wu-w-[136px]`,dir:t,children:e.target===`window`?(0,a.jsx)(`a`,{tabIndex:0,rel:`noopener noreferrer`,onClick:()=>B(e.link),onKeyDown:t=>{t.key===`Enter`&&B(e.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
+ 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:(0,a.jsx)(De,{item:e,dir:t})}):(0,a.jsx)(`a`,{href:e.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(lo,{item:r,dir:t})})},s))})})},lo=({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:h("wu-text-xl wu-text-gray-lead",e.icon)})}),a.jsx("p",{className:"wu-text-sm wu-text-gray-lead",children:e.title})]}),cw=e=>{const[t,n]=f.useState(()=>window.innerWidth<=e);return f.useEffect(()=>{const r=()=>{n(window.innerWidth<=e)};return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[e]),t};function dw({productCategories:e,openCategory:t,setOpenCategory:n}){const r=(u,l)=>{const d=l[u];if(d){d.focus();const c=e[u]||null;n(c)}},s=(u,l,d,c)=>{u.preventDefault();const w=d==="down"?l+1:l-1;r(w,c)},o=(u,l,d,c)=>{t!=null&&t.products&&t.products[t.products.length-1].name===c&&(u.preventDefault(),r(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:m}=l;switch(m){case"ArrowDown":s(l,d,"down",w);break;case"ArrowUp":s(l,d,"up",w);break;case"Tab":o(l,d,w,c);break;case"Enter":case" ":i(l,d);break}}}const ww=e=>{const{size:t="lg",className:n,children:r,...s}=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,{...s,className:h(o[t],n),children:r})},fw=e=>{const{size:t="xl",className:n,children:r,...s}=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,{...s,className:h(i[t],n),children:r})},pw=e=>{const{size:t="lg",className:n,children:r,...s}=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,{...s,className:h(o[t],n),children:r})},hw=e=>{const{size:t="lg",className:n,children:r,...s}=e,o={md:"wu-text-display-2",lg:"wu-text-display-1"},i=e.as||"h1";return a.jsx(i,{...s,className:h(o[t],n),children:r})},Oe=e=>{const{icon:t,className:n,...r}=e;return a.jsx("span",{...r,className:h(t,n),role:"presentation","aria-label":t})},mw=({buttonRef:e,handleDropdownToggle:t,handleKeyDown:n,isDropdownOpen:r,activeProductName:s,dir:o="ltr",homeLink:i="/"})=>a.jsxs("button",{ref:e,type:"button",className:h("wu-text-base wu-font-normal wu-flex wu-items-center wu-justify-between wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger","rtl:wu-pr-2 wu-pl-2 rtl:wu-pl-1 wu-pr-1"),onClick:t,onKeyDown:u=>{r&&u.key==="ArrowDown"&&n(u,-1)},"aria-label":"product-switcher",children:[a.jsx("a",{className:"wu-aspect-auto focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-logo",tabIndex:-1,href:i,children:a.jsx(Oe,{icon:"wc-logo",className:"wu-text-[23px] wu-leading-4 wu-relative wu-top-1 wu-right-[2px]"})}),a.jsx("span",{className:"wu-relative wu-bottom-[1.5px]",children:s}),a.jsx("span",{className:h("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300 wu-relative wu-bottom-[1.5px]",r&&"wu-rotate-180",o==="rtl"?"wu-mr-auto wu-left-[2px]":"wu-ml-auto wu-right-[2px]")})]}),oe={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"},gw=({category:e,dir:t="ltr",openCategory:n})=>{const r=e.active?"#c5cce0":"#f0c36a",s=(n==null?void 0:n.name)===e.name,o=h("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",s&&"wu-hidden","wu-relative wu-top-[5px]"),i=h("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",s&&"wu-hidden","wu-relative wu-top-1");return a.jsxs("div",{className:h("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:oe.productCategoryBorderTop,style:{backgroundColor:r}}),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})]})},bw={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"},yw=({product:e,currentProduct:t,activeProductName:n,dir:r,focusItem:s,setFocusItem:o})=>{const[i,u]=f.useState(e.name===t),l=e.name===n,d=e.name===t,c=!e.active,w="#1b3380",m="#c5cce0",p="#ffcf70",b=h("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"),g=h("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"),y=i||s===e.name||l?w:m;return a.jsxs("li",{className:h(oe.productListItem,"focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item",(l||i)&&oe.activeProduct,e.name.length>15&&window.innerWidth>768&&"wu-w-[130px] wu-min-w-[130px]",s===e.name&&oe.activeProduct,"wu-product-item"),onMouseOver:()=>u(!0),onMouseOut:()=>u(!1),"aria-label":e.name,"aria-disabled":c,dir:r,onKeyDown:x=>{if(x.key==="Enter"){x.preventDefault();const v=x.currentTarget.querySelector("a");v&&v.click()}},onFocus:()=>{o(e.name)},onBlur:()=>o(""),children:[a.jsx("div",{className:h(oe.topBorder,r==="rtl"&&oe.topBorderRtl),style:{backgroundColor:c?p:y}}),a.jsxs("a",{className:h(oe.productLink,"focus:wu-outline-none focus-visible:wu-outline-none"),href:e.link||"#",tabIndex:0,children:[a.jsx("span",{className:h(g,bw[e.icon||""]),"aria-hidden":!0}),a.jsx("span",{className:h(b),children:e.name})]})]},e.name)},vw=({category:e,currentProduct:t,activeProductName:n,dir:r="ltr",focusItem:s,setFocusItem:o,borderColorLocked:i="#f5a300"})=>{const{products:u=[],active:l}=e,d=f.useMemo(()=>u.filter(b=>b.active).sort((b,g)=>(b.order||100)-(g.order||100)),[u]),c=f.useMemo(()=>u.filter(b=>!b.active),[u]),[w,m]=f.useState(i),p=b=>b.map((g,y)=>a.jsx(yw,{product:g,currentProduct:t,activeProductName:n,dir:r,focusItem:s,setFocusItem:o},y));return l?a.jsxs(a.Fragment,{children:[p(d),c.length>0&&a.jsxs("li",{className:h(oe.productListItem,"focus:wu-outline-none focus-visible:wu-outline-none !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee] wu-group"),onMouseOver:()=>m("#f5a300"),onMouseOut:()=>m(i),"aria-label":"Upgrade to unlock",children:[a.jsx("div",{className:h(oe.topBorder,r==="rtl"&&oe.topBorderRtl),style:{backgroundColor:w},"aria-label":"top-border"}),a.jsxs("a",{href:"https://www.questionpro.com/a/showUpgradeUser.do",className:h(oe.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"]})]})]}),p(c)]}):a.jsxs("li",{className:h(oe.productListItem,oe.learnMore,"focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]",s==="learn"&&"activeProduct"),tabIndex:0,onFocus:()=>o("learn"),onBlur:()=>o(""),"aria-label":"Learn More",children:[a.jsx("div",{className:h(oe.topBorder,r==="rtl"&&oe.topBorderRtl),style:{backgroundColor:i}}),a.jsx("a",{className:oe.productLink,href:"https://www.questionpro.com/a/showUpgradeUser.do",tabIndex:-1,children:a.jsx("span",{className:"wu-text-[#f99e03]",children:"Learn More"})})]})},co=({dropdownRef:e,dir:t,isDropdownOpen:n,productCategories:r,openCategory:s,setOpenCategory:o,handleKeyDown:i,expandAll:u,activeProductName:l,focusItem:d,setFocusItem:c})=>{const w="#ffcf70",[p,b]=f.useState(window.innerWidth>768);return f.useEffect(()=>{const g=()=>{b(window.innerWidth>768)};return window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[]),a.jsx("ul",{className:h(oe.productDropdownMenu,n&&oe.productDropdownMenuOpen,t==="rtl"&&oe.rtlDropdownMenu,"wu-switcher-container"),ref:e,dir:t,"aria-label":"product-dropdown-menu","data-state":n?"open":"closed",children:r.map((g,y)=>a.jsxs("li",{className:h(oe.productCategory,"focus:wu-outline-none focus-visible:wu-outline-none wu-h-16 wu-category-item",s===g&&oe.open,u&&oe.open),onMouseEnter:()=>p&&o(g),onMouseLeave:()=>p&&o(null),onClick:()=>{p||o(x=>x===g?null:g)},"aria-label":g.name,dir:t,onKeyDown:x=>i(x,y),tabIndex:0,"data-product-category":!0,children:[a.jsx(gw,{category:g,dir:t,openCategory:s}),a.jsx("ul",{className:h(oe.productList,t==="rtl"&&oe.rtlProductList),dir:t,children:a.jsx(vw,{category:g,dir:t,activeProductName:l,currentProduct:g.name,focusItem:d,setFocusItem:c,borderColorLocked:w})})]},g.name))})},xw=({isProductButtonShow:e,isDropdownOpen:t,activeProductColor:n,activeProductBgColor:r,activeProductName:s,dir:o,smallScreenButtonRef:i,handleDropdownToggle:u,handleKeyDown:l})=>a.jsx("div",{className:h("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:r},children:a.jsxs("button",{ref:i,type:"button",className:h("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:[s,a.jsx("span",{className:h("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",t&&"wu-rotate-180")})]})}),Nw=({dir:e,isProductButtonShow:t,smallScreenToggleButtonRef:n,setIsProductButtonShow:r,setDropdownOpen:s})=>{const o=()=>{r(i=>!i),t&&s(!1)};return a.jsxs("button",{className:h("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"}`})]})},wo=({productCategories:e,activeProductName:t,activeProductColor:n={base:"#1b87e6",hover:"#54A5EC"},dir:r,homeLink:s,expandAll:o})=>{const i=f.useRef(null),u=f.useRef(null),l=f.useRef(null),d=f.useRef(null),[c,w]=f.useState(!1),[m,p]=f.useState(null),[b,g]=f.useState(n.base),[y,x]=f.useState(""),[v,C]=f.useState(!1),N=cw(768);Kr([u,i],()=>{w(!1),p(null)}),Kr([l,d,u],()=>{C(!1),w(!1),p(null)}),f.useEffect(()=>{const T=I=>{I.key==="Escape"&&w(!1)};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[c]),f.useEffect(()=>g(n.base),[n.base]);const S=T=>{T.preventDefault(),T.stopPropagation(),w(I=>{const D=!I;return D||p(null),D})},M=(T,I)=>{dw({productCategories:e,openCategory:m,setOpenCategory:p})(T,I,y)};return a.jsx("div",{className:h("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(Nw,{dir:r,isProductButtonShow:v,smallScreenToggleButtonRef:d,setDropdownOpen:w,setIsProductButtonShow:C}),a.jsx(xw,{isProductButtonShow:v,isDropdownOpen:c,activeProductColor:n,activeProductBgColor:b,activeProductName:t,handleDropdownToggle:S,smallScreenButtonRef:l,handleKeyDown:M,dir:r}),a.jsx("div",{className:h("wu-absolute wu-top-[92px] wu-left-0 wu-text-[18px]",r==="rtl"&&"wu-right-[256px] wu-left-auto"),children:a.jsx(co,{activeProductName:t,focusItem:y,setFocusItem:x,handleKeyDown:M,isDropdownOpen:c,openCategory:m,productCategories:e,setOpenCategory:p,dropdownRef:u,expandAll:o,dir:r})})]}):a.jsxs("div",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-h-full wu-w-[256px]",dir:r,style:{backgroundColor:c?n.hover:b},onMouseOver:()=>g(n.hover),onMouseOut:()=>g(n.base),children:[a.jsx(mw,{activeProductName:t,dir:r,homeLink:s,buttonRef:i,handleDropdownToggle:S,handleKeyDown:M,isDropdownOpen:c}),a.jsx(co,{activeProductName:t,focusItem:y,setFocusItem:x,handleKeyDown:M,isDropdownOpen:c,openCategory:m,productCategories:e,setOpenCategory:p,dropdownRef:u,expandAll:o,dir:r})]})})},fo=({children:e,dir:t,className:n})=>a.jsx("section",{className:h("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})}),Sw=({className:e,placeholder:t="Search surveys, folders or tools",defaultCollapsed:n=!0,onSearch:r,...s})=>{const[o,i]=f.useState(n);return f.useEffect(()=>{i(n)},[n]),a.jsxs("div",{className:"wu-relative",children:[a.jsx(Oe,{"data-testid":"search-icon",icon:"wm-search",className:h("wu-absolute wu-top-1 wu-left-0.5","wu-text-gray-lead wu-cursor-pointer wu-text-[19px]",o&&"wu-text-white"),onClick:()=>i(u=>!u)}),a.jsx("input",{placeholder:t,onChange:u=>r(u.target.value),className:h("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","wu-h-8 wu-pl-8 wu-pr-4 wu-text-xs wu-text-gray-lead",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",...s})]})},po=Kt.Provider,ho=Kt.Root,mo=Kt.Trigger,Xr=E.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(Kt.Content,{ref:r,sideOffset:t,className:h("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}));Xr.displayName=Kt.Content.displayName;const An=f.forwardRef(({content:e,position:t,positionOffset:n,duration:r,children:s,className:o,showArrow:i=!1,open:u,onOpenChange:l,style:d,...c},w)=>a.jsx(po,{delayDuration:r||200,children:a.jsxs(ho,{open:u,onOpenChange:l,children:[a.jsx(mo,{asChild:!0,children:a.jsx("span",{ref:w,...c,children:s})}),a.jsx(Lr.Portal,{children:e&&a.jsxs(Xr,{side:t||"top",sideOffset:n||0,className:h("wu-max-w-sm wu-max-h-96 wu-overflow-y-auto",o),style:d,children:[e,i&&a.jsx(Lr.Arrow,{className:"wu-fill-gray-notification wu-tooltip-arrow"})]})})]})}));An.displayName="WuTooltip";const Cw=({label:e,className:t})=>{const n=f.useRef(null),[r,s]=f.useState(!1);return f.useEffect(()=>{const o=n.current;if(o){const i=o.clientWidth,u=o.scrollWidth,l=u/e.length,d=e.length*l;s(d>i||u>i)}},[e]),a.jsx("p",{ref:n,className:h("wu-w-full wu-truncate",t),children:r?a.jsx(An,{content:e,positionOffset:8,children:e}):e})},Tw=e=>{var w;const{productName:t,categories:n=[],user:r,children:s,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:h("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:[Rd((w=r==null?void 0:r.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(wo,{productCategories:n,activeProductName:t,activeProductColor:u,dir:l,homeLink:i,expandAll:d})}),a.jsx(fo,{dir:l,children:s}),a.jsxs("section",{className:h("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(uo,{dir:l}),(r==null?void 0:r.profile)&&Object.keys(r.profile).length>0&&a.jsx(io,{user:r,onLogout:o,dir:l,DataCenter:c})]})]})})},je=Gt.Root,dt=Gt.Trigger,$e=E.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>a.jsx(Gt.Portal,{children:a.jsx(Gt.Content,{ref:s,align:t,sideOffset:n,className:h("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),...r})}));$e.displayName=Gt.Content.displayName;const Zr=Be.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-border wu-border-blue-p hover:wu-border-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-border-1 wu-border-orange-soft hover:wu-border-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-border-1 wu-border-red-deep hover:wu-border-red-soft","focus-visible:wu-outline-red-deep/50"]},variant:{primary:["wu-text-white hover:wu-text-white","wu-border-0"],secondary:["wu-bg-transparent hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-border-0"],outline:["wu-bg-white hover:wu-text-white","disabled:wu-bg-transparent disabled:wu-border-gray-subtle"],rounded:["wu-text-white hover:wu-text-white","wu-border-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-border-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-border-0","disabled:wu-grayscale disabled:wu-opacity-80"]}},defaultVariants:{variant:"primary",size:"md",color:"primary"},compoundVariants:[]}),Xt=E.forwardRef(({className:e,variant:t,size:n,color:r,asChild:s=!1,...o},i)=>{const u=s?Ct.Slot:"button";return a.jsx(u,{className:h(Zr({size:n,color:r,variant:t,className:e})),ref:i,...o})});Xt.displayName="Button";function go({className:e,classNames:t,dir:n="ltr",...r}){const s=Ra.getDefaultClassNames();return a.jsx(Ra.DayPicker,{showOutsideDays:r.showOutsideDays||!1,className:h("wu-p-3",e),classNames:{root:h(s.root,"wu-relative wu-rounded-none wu-bg-white dark:wu-bg-gray-switcher"),caption_label:h("wu-text-xs",r.captionLayout==="dropdown"?"wu-hidden":""),month_caption:h(s.month_caption,"wu-mb-5"),months:h(s.months,"wu-flex wu-flex-col sm:wu-flex-row wu-gap-4"),dropdowns:h(s.dropdowns,"wu-flex wu-items-center wu-justify-start wu-gap-2",(r.mode==="range","")),dropdown:h(s.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:h(s.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:h(s.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:h(s.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:h(s.selected,"wu-bg-blue-p [&:not(.rm)]:wu-text-white hover:wu-bg-blue-pHover"),range_middle:h("rm",s.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:h(s.range_end,"wu-rounded-none"),range_start:h(s.range_start,"wu-rounded-none wu-bg-blue-p hover:wu-bg-blue-pHover"),month_grid:h(s.month_grid,"[&>thead>tr>th]:wu-pb-2 wu-border-collapse wu-space-y-1"),button_next:h(s.button_next,Zr({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-text-gray-lead"),button_previous:h(s.button_previous,Zr({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-rotate-180 wu-text-gray-lead"),nav:h(s.nav,"wu-absolute wu-top-4 wu-right-3 wu-flex",n==="rtl"&&"wu-right-auto wu-left-3 wu-flex-row-reverse"),chevron:h(s.chevron,"!wu-text-red-500"),outside:h(s.outside,"wu-invisible"),disabled:h(s.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"})},...r})}go.displayName="Calendar";const Jr=e=>a.jsx(go,{...e}),bo=e=>{const{handleDateChange:t,disabled:n,onReset:r,showResetButton:s}=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:[s&&a.jsx(Ie,{variant:"secondary",onClick:r,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(jt.PopoverClose,{asChild:!0,children:a.jsx(Ie,{onClick:t,disabled:n,className:"wu-date-picker-apply",children:"Apply"})})]})},Qr=({formattedString:e,dir:t,placeholder:n="Select Date",className:r,variant:s="primary",color:o,CustomTrigger:i,...u})=>a.jsx(jt.PopoverTrigger,{asChild:!i,dir:t,children:i?a.jsx(a.Fragment,{children:i(e)}):a.jsx(Ie,{...u,className:h("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",s==="outlined"&&"wu-border wu-border-subtle wu-bg-transparent",r),Icon:a.jsx("span",{className:"wm-calendar-month wu-text-sm"}),iconPosition:"right",children:e||n})}),yo=(e,t,n,r)=>{const s=z.startOfDay(e).getTime();return!!(t||n&&s<z.startOfDay(n).getTime()||r&&s>z.startOfDay(r).getTime())},_n=e=>e?typeof e=="string"?new Date(e):e:new Date,Rr="(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])-\\d{4}",Ew=[{label:"Last week",value:7},{label:"Last month",value:30},{label:"Last quarter",value:90},{label:"Last year",value:365}],Iw=e=>{const{message:t,className:n,...r}=e;return a.jsx("p",{...r,className:h("wu-text-sub-3 wu-break-words wu-font-light",n),style:{color:"rgb(var(--wu-red-deep))",...r.style},children:t})},Mw=e=>{var u,l;const{inputRef:t,maxLength:n=50,className:r,...s}=e,[o,i]=f.useState(!1);return f.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",{...s,className:h("wu-text-sub-3 wu-font-light",r),style:{color:"rgb(var(--wu-gray-subtle))",...s.style},children:o&&`${(l=t==null?void 0:t.current)==null?void 0:l.value.length}/${n}`})},kw=Be.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"),Pn=E.forwardRef(({className:e,...t},n)=>a.jsx(no.Root,{ref:n,className:h(kw(),e),...t}));Pn.displayName=no.Root.displayName;const Me=e=>a.jsx(Pn,{...e,className:h("wu-text-gray-lead wu-leading-6",e.className)}),Dw=({Label:e,Error:t,Hint:n,Input:r,labelPosition:s="top",dir:o="ltr",className:i,...u})=>{const d=h("wu-flex",s==="top"?"wu-flex-col wu-gap-1":"wu-flex-row wu-items-center wu-gap-2",i),c=h("wu-flex wu-flex-col wu-gap-1 wu-relative wu-flex-1 wu-form-group-wrapper"),w=h("wu-absolute -wu-bottom-5",o==="ltr"?"wu-right-0":"wu-left-0","wu-form-group-hint"),m=h("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:[r,n&&a.jsx("div",{className:w,children:n}),t&&a.jsx("div",{className:m,children:t})]})]})},Aw=({formatString:e="MMM dd, yyyy",value:t,onChange:n,disabled:r,minDate:s=z.sub(new Date,{years:5}),maxDate:o=z.add(new Date,{years:1}),dir:i="ltr",Label:u,labelPosition:l="top",onReset:d,showResetButton:c=!1,placeholder:w="Select Date",CustomTrigger:m,align:p="start",sideOffset:b=-.5,side:g,alignOffset:y,...x})=>{const[v,C]=f.useState(),[N,S]=f.useState(""),M=f.useCallback(()=>{const I=_n(v);S(z.format(I,e)),n&&n(v)},[v,e,n]),T=f.useCallback(()=>{d?d():(C(void 0),S(""),n&&n(void 0))},[n,d]);return f.useEffect(()=>{const I=_n(t);C(I),S(z.format(I,e))},[t,e]),a.jsxs(Me,{className:h("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(je,{children:[a.jsx(Qr,{formattedString:N,dir:i,placeholder:w,CustomTrigger:m,...x}),a.jsx($e,{className:"wu-p-0 wu-w-fit wu-date-picker-content",align:p,sideOffset:b,side:g,alignOffset:y,dir:i,children:a.jsx(Jr,{dir:i,mode:"single",captionLayout:"dropdown",selected:v,onSelect:C,disabled:I=>yo(I,r,s,o),startMonth:s,endMonth:o,required:!0,autoFocus:!0,defaultMonth:v,className:h("wu-border wu-border-blue-p wu-date-picker"),footer:a.jsx(bo,{handleDateChange:M,disabled:r,onReset:T,showResetButton:c})})})]})]})},Ye={...E},vo={};function Qe(e,t){const n=E.useRef(vo);return n.current===vo&&(n.current=e(t)),n}const es=Ye.useInsertionEffect,_w=es&&es!==Ye.useLayoutEffect?es:e=>e();function fe(e){const t=Qe(Pw).current;return t.next=e,_w(t.effect),t.trampoline}function Pw(){const e={next:void 0,callback:Vw,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Vw(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}function Ow(e,t){return function(r,...s){const o=new URL(e);return o.searchParams.set("code",r.toString()),s.forEach(i=>o.searchParams.append("args[]",i)),`${t} error #${r}; visit ${o} for the full message.`}}const Zt=Ow("https://base-ui.com/production-error","Base UI");function ke(){}const Xe=Object.freeze({});let xo=(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 Lw={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Jt={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Fw={disabled:!1,...Jt},ts={valid(e){return e===null?null:e?{[xo.valid]:""}:{[xo.invalid]:""}}},Ww={invalid:void 0,name:void 0,validityData:{state:Lw,errors:[],error:"",value:"",initialValue:null},setValidityData:ke,disabled:void 0,touched:Jt.touched,setTouched:ke,dirty:Jt.dirty,setDirty:ke,filled:Jt.filled,setFilled:ke,focused:Jt.focused,setFocused:ke,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Fw,markedDirtyRef:{current:!1},registerFieldControl:ke,validation:{getValidationProps:(e=Xe)=>e,getInputValidationProps:(e=Xe)=>e,inputRef:{current:null},commit:async()=>{}}},No=E.createContext(Ww);process.env.NODE_ENV!=="production"&&(No.displayName="FieldRootContext");function Vn(e=!0){const t=E.useContext(No);if(t.setValidityData===ke&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Zt(28));return t}const So=E.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:ke,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(So.displayName="FormContext");function Bw(){return E.useContext(So)}function ns(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const rs={};function ss(e,t,n,r,s){if(!n&&!r&&!e)return On(t);let o=On(e);return t&&(o=Ln(o,t)),n&&(o=Ln(o,n)),r&&(o=Ln(o,r)),o}function $w(e){if(e.length===0)return rs;if(e.length===1)return On(e[0]);let t=On(e[0]);for(let n=1;n<e.length;n+=1)t=Ln(t,e[n]);return t}function On(e){return as(e)?{...To(e,rs)}:qw(e)}function Ln(e,t){return as(t)?To(t,e):Hw(e,t)}function qw(e){const t={...e};for(const n in t){const r=t[n];Co(n,r)&&(t[n]=Eo(r))}return t}function Hw(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ns(e.style,r);break}case"className":{e[n]=Io(e.className,r);break}default:Co(n,r)?e[n]=zw(e[n],r):e[n]=r}}return e}function Co(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&r===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function as(e){return typeof e=="function"}function To(e,t){return as(e)?e(t):e??rs}function zw(e,t){return t?e?(...n)=>{const r=n[0];if(Mo(r)){const o=r;Fn(o);const i=t(...n);return o.baseUIHandlerPrevented||e==null||e(...n),i}const s=t(...n);return e==null||e(...n),s}:Eo(t):e}function Eo(e){return e&&((...t)=>{const n=t[0];return Mo(n)&&Fn(n),e(...t)})}function Fn(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Io(e,t){return t?e?t+" "+e:t:e}function Mo(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}let ko=0;function Uw(e,t="mui"){const[n,r]=E.useState(e),s=e||n;return E.useEffect(()=>{n==null&&(ko+=1,r(`${t}-${ko}`))},[n,t]),s}const Do=Ye.useId;function jw(e,t){if(Do!==void 0){const n=Do();return e??(t?`${t}-${n}`:n)}return Uw(e,t)}function Ao(e){return jw(e,"base-ui")}const _o=E.createContext({controlId:void 0,registerControlId:ke,labelId:void 0,setLabelId:ke,messageIds:[],setMessageIds:ke,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(_o.displayName="LabelableContext");function os(){return E.useContext(_o)}const pe=typeof document<"u"?E.useLayoutEffect:()=>{};function Po(){return typeof window<"u"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gw(e){return Po()?e instanceof Element||e instanceof Wn(e).Element:!1}function Kw(e){return Po()?e instanceof HTMLElement||e instanceof Wn(e).HTMLElement:!1}function Vo(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:o}=os(),i=Ao(t),u=n?s:void 0,l=Qe(()=>Symbol("labelable-control")),d=E.useRef(!1),c=E.useRef(t!=null),w=fe(()=>{!d.current||o===ke||(d.current=!1,o(l.current,void 0))});return pe(()=>{if(o===ke)return;let m;if(n){const p=r==null?void 0:r.current;Gw(p)&&p.closest("label")!=null?m=t??null:m=u??i}else if(t!=null)c.current=!0,m=t;else if(c.current)m=i;else{w();return}if(m===void 0){w();return}d.current=!0,o(l.current,m)},[t,r,u,o,n,i,l,w]),E.useEffect(()=>w,[w]),s??i}function Oo(e){return(e==null?void 0:e.ownerDocument)||document}const Bn=typeof navigator<"u",is=Jw(),Yw=Rw(),Xw=Qw();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none");const Zw=is.platform==="MacIntel"&&is.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(is.platform);Bn&&Yw.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints,Xw.includes("jsdom/");function Jw(){if(!Bn)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 Qw(){if(!Bn)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Rw(){if(!Bn)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function Lo(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function ef(e){e.preventDefault(),e.stopPropagation()}function $n(e,t,n,r){const s=Qe(Fo).current;return nf(s,e,t,n,r)&&Wo(s,[e,t,n,r]),s.callback}function tf(e){const t=Qe(Fo).current;return rf(t,e)&&Wo(t,e),t.callback}function Fo(){return{callback:null,cleanup:null,refs:[]}}function nf(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function rf(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Wo(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 r=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const o=t[s];if(o!=null)switch(typeof o){case"function":{const i=o(n);typeof i=="function"&&(r[s]=i);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const o=t[s];if(o!=null)switch(typeof o){case"function":{const i=r[s];typeof i=="function"?i():o(null);break}case"object":{o.current=null;break}}}}}}}const sf=parseInt(E.version,10);function af(e){return sf>=e}function Bo(e){if(!E.isValidElement(e))return null;const t=e,n=t.props;return(af(19)?n==null?void 0:n.ref:t.ref)??null}let us;process.env.NODE_ENV!=="production"&&(us=new Set);function ls(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");us.has(t)||(us.add(t),console.warn(`Base UI: ${t}`))}}function of(e,t){const n={};for(const r in e){const s=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](s);o!=null&&Object.assign(n,o);continue}s===!0?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}function uf(e,t){return typeof e=="function"?e(t):e}function $o(e,t){return typeof e=="function"?e(t):e}function Ze(e,t,n={}){const r=t.render,s=lf(t,n);if(n.enabled===!1)return null;const o=n.state??Xe;return pf(e,r,s,o)}function lf(e,t={}){const{className:n,style:r,render:s}=e,{state:o=Xe,ref:i,props:u,stateAttributesMapping:l,enabled:d=!0}=t,c=d?uf(n,o):void 0,w=d?$o(r,o):void 0,m=d?of(o,l):Xe,p=d&&u?cf(u):void 0,b=d?ns(m,p)??{}:Xe;return typeof document<"u"&&(d?Array.isArray(i)?b.ref=tf([b.ref,Bo(s),...i]):b.ref=$n(b.ref,Bo(s),i):$n(null,null)),d?(c!==void 0&&(b.className=Io(b.className,c)),w!==void 0&&(b.style=ns(b.style,w)),b):Xe}function cf(e){return Array.isArray(e)?$w(e):ss(void 0,e)}const df=Symbol.for("react.lazy"),wf=/^[A-Z][A-Za-z0-9$]*$/,ff=/[a-z]/;function pf(e,t,n,r){if(t){if(typeof t=="function")return process.env.NODE_ENV!=="production"&&hf(t),t(n,r);const s=ss(n,t.props);s.ref=n.ref;let o=t;if((o==null?void 0:o.$$typeof)===df&&(o=E.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!E.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(`
5
- `));return E.cloneElement(o,s)}if(e&&typeof e=="string")return mf(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Zt(8))}function hf(e){const t=e.name;t.length!==0&&wf.test(t)&&ff.test(t)&&ls(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.","If this is an intentional render callback, rename it to start with a lowercase letter.","Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.","https://base-ui.com/r/invalid-render-prop")}function mf(e,t){return e==="button"?f.createElement("button",{type:"button",...t,key:t.key}):e==="img"?f.createElement("img",{alt:"",...t,key:t.key}):E.createElement(e,t)}const gf=[];function cs(e){E.useEffect(e,gf)}const Qt=0;class qn{constructor(){Te(this,"currentId",Qt);Te(this,"clear",()=>{this.currentId!==Qt&&(clearTimeout(this.currentId),this.currentId=Qt)});Te(this,"disposeEffect",()=>this.clear)}static create(){return new qn}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Qt,n()},t)}isStarted(){return this.currentId!==Qt}}function qo(){const e=Qe(qn.create).current;return cs(e.disposeEffect),e}let ds;process.env.NODE_ENV!=="production"&&(ds=new Set);function Hn(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ds.has(t)||(ds.add(t),console.error(`Base UI: ${t}`))}}const zn=null;let Ho=globalThis.requestAnimationFrame;class bf{constructor(){Te(this,"callbacks",[]);Te(this,"callbacksCount",0);Te(this,"nextId",1);Te(this,"startId",1);Te(this,"isScheduled",!1);Te(this,"tick",t=>{var s;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(s=n[o])==null||s.call(n,t)})}request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&Ho!==requestAnimationFrame&&(Ho=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(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 Un=new bf;class De{constructor(){Te(this,"currentId",zn);Te(this,"cancel",()=>{this.currentId!==zn&&(Un.cancel(this.currentId),this.currentId=zn)});Te(this,"disposeEffect",()=>this.cancel)}static create(){return new De}static request(t){return Un.request(t)}static cancel(t){return Un.cancel(t)}request(t){this.cancel(),this.currentId=Un.request(()=>{this.currentId=zn,t()})}}function yf(){const e=Qe(De.create).current;return cs(e.disposeEffect),e}function vf(e){return e==null?e:"current"in e?e.current:e}let Rt=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const xf={[Rt.startingStyle]:""},Nf={[Rt.endingStyle]:""},zo={transitionStatus(e){return e==="starting"?xf:e==="ending"?Nf:null}};function Uo(e,t=!1,n=!0){const r=yf();return fe((s,o=null)=>{r.cancel();const i=vf(e);if(i==null)return;const u=i,l=()=>{Jd.flushSync(s)};if(typeof u.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function d(){Promise.all(u.getAnimations().map(c=>c.finished)).then(()=>{o!=null&&o.aborted||l()}).catch(()=>{if(n){o!=null&&o.aborted||l();return}const c=u.getAnimations();!(o!=null&&o.aborted)&&c.length>0&&c.some(w=>w.pending||w.playState!=="finished")&&d()})}if(t){const c=Rt.startingStyle;if(!u.hasAttribute(c)){r.request(d);return}const w=new MutationObserver(()=>{u.hasAttribute(c)||(w.disconnect(),d())});w.observe(u,{attributes:!0,attributeFilter:[c]}),o==null||o.addEventListener("abort",()=>w.disconnect(),{once:!0});return}r.request(d)})}function Sf(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,o=fe(s),i=Uo(r,n,!1);E.useEffect(()=>{if(!t)return;const u=new AbortController;return i(o,u.signal),()=>{u.abort()}},[t,n,o,i])}function Cf(e,t=!1,n=!1){const[r,s]=E.useState(e&&t?"idle":void 0),[o,i]=E.useState(e);return e&&!o&&(i(!0),s("starting")),!e&&o&&r!=="ending"&&!n&&s("ending"),!e&&!o&&r==="ending"&&s(void 0),pe(()=>{if(!e&&o&&r!=="ending"&&n){const u=De.request(()=>{s("ending")});return()=>{De.cancel(u)}}},[e,o,r,n]),pe(()=>{if(!e||t)return;const u=De.request(()=>{s(void 0)});return()=>{De.cancel(u)}},[t,e]),pe(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&s("starting");const u=De.request(()=>{s("idle")});return()=>{De.cancel(u)}},[t,e,o,r]),{mounted:o,setMounted:i,transitionStatus:r}}function ws({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=E.useRef(e!==void 0),[o,i]=E.useState(t),u=s?e:o;if(process.env.NODE_ENV!=="production"){E.useEffect(()=>{s!==(e!==void 0)&&Hn([`A component is changing the ${s?"":"un"}controlled ${r} state of ${n} to be ${s?"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(`
6
- `))},[r,n,e]);const{current:d}=E.useRef(t);E.useEffect(()=>{!s&&jo(d)!==jo(t)&&Hn([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
7
- `))},[t])}const l=E.useCallback(d=>{s||i(d)},[]);return[u,l]}function jo(e){let t=0;const n=new WeakMap;try{return JSON.stringify(e,function(o,i){if(!(o==="_owner"&&this!=null&&typeof this=="object"&&"$$typeof"in this)){if(typeof i=="bigint")return`__bigint__:${i}`;if(i!==null&&typeof i=="object"){const u=n.get(i);if(u!==void 0)return`__object__:${u}`;n.set(i,t),t+=1}return i}})??`__top__:${typeof e}`}catch{return"__unserializable__"}}function Go(e,t,n,r,s=!0){const{registerFieldControl:o}=Vn(),i=E.useRef(null);i.current||(i.current=Symbol()),pe(()=>{const u=i.current;return!u||!s?void 0:(o(u,{controlRef:e,getValue:r,id:t,value:n}),()=>{o(u,void 0)})},[e,s,r,t,o,n])}const en="none",Tf="trigger-press",Ef="increment-press",If="decrement-press",fs="input-change",tn="input-clear",jn="input-blur",ps="input-paste",nn="keyboard";function Ae(e,t,n,r){let s=!1,o=!1;const i=r??Xe;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){o=!0},get isCanceled(){return s},get isPropagationAllowed(){return o},trigger:n,...i}}function rn(e,t,n){const r=Xe;return{reason:e,event:t??new Event("base-ui"),...r}}const Ko=E.forwardRef(function(t,n){const{render:r,className:s,id:o,name:i,value:u,disabled:l=!1,onValueChange:d,defaultValue:c,autoFocus:w=!1,style:m,...p}=t,{state:b,name:g,disabled:y,setTouched:x,setDirty:v,validityData:C,setFocused:N,setFilled:S,validationMode:M,validation:T}=Vn(),I=y||l,D=g??i,A={...b,disabled:I},{labelId:_}=os(),P=Vo({id:o});pe(()=>{var q;const V=u!=null;(q=T.inputRef.current)!=null&&q.value||V&&u!==""?S(!0):V&&u===""&&S(!1)},[T.inputRef,S,u]);const W=E.useRef(null);pe(()=>{w&&W.current===Lo(Oo(W.current))&&N(!0)},[w,N]);const[F]=ws({controlled:u,default:c,name:"FieldControl",state:"value"}),B=u!==void 0,$=B?F:void 0,ie=fe(()=>{var V;return(V=T.inputRef.current)==null?void 0:V.value});return Go(T.inputRef,P,$,ie),Ze("input",t,{ref:[n,W],state:A,props:[{id:P,disabled:I,name:D,ref:T.inputRef,"aria-labelledby":_,autoFocus:w,...B?{value:$}:{defaultValue:c},onChange(V){const q=V.currentTarget.value;d==null||d(q,Ae(en,V.nativeEvent)),v(q!==C.initialValue),S(q!=="")},onFocus(){N(!0)},onBlur(V){x(!0),N(!1),M==="onBlur"&&T.commit(V.currentTarget.value)},onKeyDown(V){V.currentTarget.tagName==="INPUT"&&V.key==="Enter"&&(x(!0),T.commit(V.currentTarget.value))}},T.getInputValidationProps(),p],stateAttributesMapping:ts})});process.env.NODE_ENV!=="production"&&(Ko.displayName="FieldControl");const Yo=E.forwardRef(function(t,n){return a.jsx(Ko,{ref:n,...t})});process.env.NODE_ENV!=="production"&&(Yo.displayName="Input");const Gn={wuInputGroup:"_wuInputGroup_1t4ep_1",wuInputIcon:"_wuInputIcon_1t4ep_20",wuInput:"_wuInput_1t4ep_1",passwordToggle:"_passwordToggle_1t4ep_89"},Xo=f.memo(({showPassword:e,onToggle:t,disabled:n,readOnly:r})=>{const s=f.useCallback(i=>{if(n||r){i.preventDefault(),i.stopPropagation();return}t()},[n,r,t]),o=n||r;return a.jsx("button",{type:"button","data-slot":"wu-input-password-toggle",className:Gn.passwordToggle,onClick:s,disabled:o,"aria-disabled":o||void 0,"aria-label":e?"Hide password":"Show password",children:a.jsx(Oe,{icon:e?"wm-visibility":"wm-visibility-off"})})});Xo.displayName="PasswordToggle";const Re=f.memo(f.forwardRef(({className:e,Label:t,labelPosition:n="top",Icon:r,iconPosition:s="left",variant:o="flat",type:i,readonly:u,invalid:l,id:d,...c},w)=>{const m=f.useId(),p=d||m;if(i==="submit")return a.jsx(Ie,{className:e,id:p,"aria-label":c["aria-label"],type:"submit","data-slot":"wu-input-submit",disabled:c.disabled,children:t||"Submit"});const[b,g]=f.useState(!1),y=f.useCallback(()=>{g(S=>!S)},[]),{finalIcon:x,finalIconPosition:v}=f.useMemo(()=>i==="password"?{finalIcon:a.jsx(Xo,{showPassword:b,onToggle:y,readOnly:u,disabled:c.disabled}),finalIconPosition:"right"}:{finalIcon:r,finalIconPosition:s},[i,r,s,b,y]),C=f.useMemo(()=>i==="password"&&b?"text":i,[i,b]),N=f.useMemo(()=>h(Gn.wuInput,"wu-peer",e),[e]);return a.jsxs("div",{"data-slot":"wu-input-group",role:"group",className:Gn.wuInputGroup,"data-label-position":n,"data-icon-position":x&&v,children:[x&&a.jsx("span",{className:Gn.wuInputIcon,children:x}),a.jsx(Yo,{ref:w,className:N,"data-variant":o,type:C,readOnly:u,"aria-invalid":l,id:p,...c}),t&&a.jsx(Me,{htmlFor:p,children:t})]})}));Re.displayName="WuInput";const Et="MM-dd-yyyy",Mf=[{label:"Day",value:1},{label:"Week",value:7},{label:"Month",value:30},{label:"Quarter",value:90},{label:"Year",value:365}],kf=({current:e,onSelect:t,presetRanges:n=Ew})=>{const[r,s]=f.useState(),[o,i]=f.useState(!1),[u,l]=f.useState(""),[d,c]=f.useState(""),[w,m]=f.useState(!1),p=f.useMemo(()=>n.map(v=>v.value),[n]),b=h("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"),g=f.useCallback(v=>{if(v===void 0){s(void 0),i(!0);return}const C=Number(v)-1;s(C),i(!1),t({from:z.sub(new Date,{days:C}),to:new Date})},[t]),y=f.useCallback((v,C)=>{if(!v||!(e!=null&&e.to)||!(e!=null&&e.from)||!new RegExp(Rr).test(v))return!1;const S=C==="start"?z.parse(v,Et,new Date):new Date(e.from),M=C==="end"?z.parse(v,Et,new Date):new Date(e.to);return z.isBefore(M,S)?(m(!0),!1):(m(!1),!(z.isSameDay(S,e.from)&&z.isSameDay(M,e.to)))},[e]),x=f.useCallback((v,C)=>{if((C==="start"?l:c)(v),y(v,C)){const S={from:e==null?void 0:e.from,to:e==null?void 0:e.to};C==="start"&&(S.from=z.parse(v,Et,new Date)),C==="end"&&(S.to=z.parse(v,Et,new Date)),t(S)}},[e,t,y]);return f.useEffect(()=>{if(e!=null&&e.to&&(e!=null&&e.from)&&z.isValid(e.to)&&z.isValid(e.from)){l(z.format(e.from,Et)),c(z.format(e.to,Et));const v=z.differenceInCalendarDays(e.to,e.from);z.isToday(e.to)&&p.includes(v+1)?(s(v),i(!1)):(s(void 0),i(!0))}},[e,p]),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 wu-hidden",children:Mf.map(({label:v,value:C})=>a.jsx(Xt,{variant:"secondary",className:"wu-px-1 wu-py-1 wu-text-xs wu-h-fit wu-min-w-fit disabled:wu-bg-white",disabled:C!==1,children:v},C))}),a.jsxs("ul",{className:"wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges",children:[n.map(({label:v,value:C})=>a.jsx("li",{children:a.jsx("button",{className:h(b,r===C-1&&"wu-bg-blue-p/10"),onClick:()=>g(C),children:v})},C)),a.jsx("li",{children:a.jsx("button",{className:h(b,o&&"wu-bg-blue-p/10"),onClick:()=>g(),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(Re,{placeholder:"Start Date",pattern:Rr,value:u,onChange:v=>x(v.target.value,"start"),"aria-label":"Start Date"}),a.jsx(Re,{placeholder:"End Date",pattern:Rr,value:d,onChange:v=>x(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-5 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:"mm-dd-yyyy"})]})]})},Df=({Trigger:e,children:t,className:n,dir:r,open:s,onOpenChange:o,modal:i,...u})=>a.jsxs(je,{open:s,onOpenChange:o,modal:i,children:[a.jsx(dt,{asChild:!0,dir:r,children:e}),a.jsx($e,{className:h("wu-w-80 wu-p-0 wu-border-blue-p wu-bg-white wu-dark:border-gray-switcher",n),dir:r,...u,children:t})]}),hs=e=>a.jsx(jt.PopoverClose,{asChild:!0,children:a.jsx(Ie,{...e})}),It={wuDateRangeNativeSidebar:"_wuDateRangeNativeSidebar_1oiuh_1",customInputs:"_customInputs_1oiuh_26",inputsRow:"_inputsRow_1oiuh_42",errorWrapper:"_errorWrapper_1oiuh_63",errorText:"_errorText_1oiuh_67"},Af=[{label:"Last week",value:7},{label:"Last month",value:30},{label:"Last quarter",value:90},{label:"Last year",value:365}],Se=e=>{if(!e)return"";try{const t=new Date(e);if(!z.isValid(t))return"";const n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${n}-${r}-${s}`}catch{return""}},Zo=e=>{if(!e)return null;try{const t=z.parseISO(e);return z.isValid(t)?z.startOfDay(t):null}catch{return null}},_f=(e,t,n)=>!(t&&e<z.startOfDay(t)||n&&e>z.startOfDay(n)),Jo=e=>z.sub(new Date,{days:e}),Qo=e=>e?z.sub(new Date,{days:1}):new Date;function Pf({ranges:e=Af,excludeToday:t=!0,current:n,onSelect:r,onReset:s,onApply:o,showResetButton:i=!0,maxDate:u,minDate:l,...d}){const[c,w]=f.useState(Se(n==null?void 0:n.from)||Se(l)),[m,p]=f.useState(Se(n==null?void 0:n.to)||Se(u)),[b,g]=f.useState(!1),[y,x]=f.useState(""),[v,C]=f.useState("");f.useEffect(()=>{w(Se(n==null?void 0:n.from)||Se(l)),p(Se(n==null?void 0:n.to)||Se(u)),x(""),C("")},[n==null?void 0:n.from,n==null?void 0:n.to,l,u]);const N=f.useMemo(()=>{if(!(n!=null&&n.from)||!(n!=null&&n.to))return null;const D=z.differenceInCalendarDays(n.to,n.from)+1;return e.find(A=>A.value===D)??null},[n==null?void 0:n.from,n==null?void 0:n.to,e]),S=f.useCallback(D=>{const A=Jo(D),_=Qo(t);w(Se(A)),p(Se(_)),x(""),C(""),g(!1),r==null||r({from:A,to:_})},[t,r]),M=f.useCallback((D,A)=>{const _=Zo(D);if(A==="start"?(w(D),x("")):(p(D),C("")),!_){if(D){const F="Please enter a valid date";A==="start"?x(F):C(F)}return}if(!_f(_,l,u)){const F=l&&_<z.startOfDay(l)?`Date must be on or after ${z.format(l,"MMM d, yyyy")}`:`Date must be on or before ${z.format(u,"MMM d, yyyy")}`;A==="start"?x(F):C(F);return}const W=Zo(A==="start"?m:c);A==="start"&&W?_<=W?r==null||r({from:_,to:W}):x("Start date must be before or equal to end date"):A==="end"&&W&&(_>=W?r==null||r({from:W,to:_}):C("End date must be after or equal to start date"))},[c,m,r,l,u]),T=f.useMemo(()=>e.map(D=>{const A=Jo(D.value),_=Qo(t);return{...D,displayStartDate:z.format(A,"MMM d, yyyy"),displayEndDate:z.format(_,"MMM d, yyyy")}}),[e,t]),I=b||(n==null?void 0:n.from)&&(n==null?void 0:n.to)&&!N;return a.jsxs("div",{className:It.wuDateRangeNativeSidebar,...d,children:[a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("button",{onClick:()=>g(!0),"data-selected":I,"aria-pressed":I,"aria-label":"Select custom date range",children:"Custom Range"})}),a.jsxs("li",{className:It.customInputs,"data-expanded":I,children:[a.jsxs("div",{className:It.inputsRow,children:[a.jsx(Re,{type:"date",value:c,onChange:D=>M(D.target.value,"start"),Label:"Start",min:Se(l),max:Se(u),"aria-describedby":y?"start-date-error":void 0}),a.jsx(Re,{type:"date",value:m,onChange:D=>M(D.target.value,"end"),Label:"End",min:c||Se(l),max:Se(u),"aria-describedby":v?"end-date-error":void 0})]}),(y||v)&&a.jsxs("div",{className:It.errorWrapper,role:"alert","aria-live":"polite",children:[y&&a.jsx("p",{id:"start-date-error",className:It.errorText,children:y}),v&&a.jsx("p",{id:"end-date-error",className:It.errorText,children:v})]})]}),T.map(D=>a.jsx("li",{children:a.jsxs("button",{onClick:()=>S(D.value),"data-selected":!I&&(N==null?void 0:N.value)===D.value,"aria-pressed":!I&&(N==null?void 0:N.value)===D.value,"aria-label":`Select ${D.label}`,children:[D.label," ",a.jsxs("small",{children:["(",D.displayStartDate," - ",D.displayEndDate,")"]})]})},D.value))]}),a.jsxs("footer",{children:[i&&a.jsx(hs,{variant:"secondary",Icon:a.jsx(Oe,{icon:"wm-refresh"}),onClick:s,children:"Reset"}),a.jsx(hs,{onClick:o,disabled:!!(y||v),children:"Apply"})]})]})}const Vf=({formatString:e="MMM dd, yyyy",value:t,onChange:n,disabled:r,minDate:s=z.sub(new Date,{years:5}),maxDate:o=z.add(new Date,{years:1}),dir:i="ltr",minDateToSelect:u,maxDateToSelect:l,presetRanges:d,Label:c,labelPosition:w="top",onReset:m,showResetButton:p=!0,placeholder:b="Select Date Range",CustomTrigger:g,native:y,align:x="start",alignOffset:v,side:C,sideOffset:N=-.5,...S})=>{const[M,T]=f.useState(t),[I,D]=f.useState(t),[A,_]=f.useState(""),P=f.useCallback(()=>{if(I){const B=I.from,$=I.to;T({from:B,to:$}),_(`${z.format(B,e)} - ${z.format($,e)}`),n&&n({from:B,to:$})}},[I,e,n]),W=f.useCallback(()=>{D(M)},[M]),F=f.useCallback(()=>{m?m():(T(void 0),D(void 0),_(""),n&&n(void 0))},[m,n]);return f.useEffect(()=>{if(t!=null&&t.from&&(t!=null&&t.to)){const B=_n(t.from),$=_n(t.to);T(t),D(t),_(`${z.format(B,e)} - ${z.format($,e)}`)}else T(void 0),D({to:new Date,from:new Date})},[t,e]),a.jsxs(Me,{className:h("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(je,{onOpenChange:B=>!B&&W(),children:[a.jsx(Qr,{formattedString:A,dir:i,placeholder:b,CustomTrigger:g,...S}),a.jsx($e,{className:"wu-flex wu-p-0 wu-border wu-w-fit wu-border-blue-p wu-bg-white",align:x,sideOffset:N,side:C,alignOffset:v,dir:i,children:y?a.jsx(Pf,{current:I,onSelect:B=>{D(B)},ranges:d,onApply:P,onReset:F,showResetButton:p,minDate:s,maxDate:o}):a.jsxs(a.Fragment,{children:[a.jsx(kf,{current:I,onSelect:D,presetRanges:d}),a.jsx(Jr,{dir:i,numberOfMonths:2,mode:"range",captionLayout:"dropdown",selected:I,onSelect:D,disabled:B=>yo(B,r,s,o),startMonth:s,endMonth:o,required:!0,autoFocus:!0,defaultMonth:M==null?void 0:M.from,className:h("wu-shadow-none wu-date-range-picker"),min:u,max:l,footer:a.jsx(bo,{handleDateChange:P,disabled:r,onReset:F,showResetButton:p})})]})})]})]})},Ro=f.forwardRef((e,t)=>{const{className:n,rounded:r,...s}=e;return a.jsx("div",{className:h("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",r?"wu-rounded-lg":"wu-rounded-sm",n),ref:t,...s})});Ro.displayName="WuCard";const ei=f.forwardRef((e,t)=>{const{className:n,...r}=e;return a.jsx("div",{ref:t,...r,className:h("wu-p-2 wu-mb-2 wu-border-b wu-border-gray-40 min-h-12 wu-card-header",n)})});ei.displayName="WuCardHeader";const ti=f.forwardRef((e,t)=>{const{className:n,...r}=e;return a.jsx("div",{ref:t,...r,className:h("wu-p-2 wu-mt-2 wu-border-t wu-border-gray-40 min-h-12 wu-card-footer",n)})});ti.displayName="WuCardHeader";const ni=E.forwardRef(({className:e,partial:t,...n},r)=>a.jsx(Fr.Root,{ref:r,className:h("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(Fr.Indicator,{className:h("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"})]})}));ni.displayName=Fr.Root.displayName;const qe=f.forwardRef((e,t)=>{const{disabled:n,checked:r,Label:s,labelPosition:o="right",className:i,id:u=$r(),partial:l,onChange:d,required:c,readonly:w,...m}=e;return f.useEffect(()=>{m.defaultChecked!==void 0&&r!==void 0&&console.error("WuCheckbox: Both `checked` and `defaultChecked` cannot be used together. Use only one of them.")},[m.defaultChecked,r]),a.jsxs("div",{className:Of({labelPosition:o,className:"wu-checkbox-container"}),dir:m.dir,children:[a.jsx(ni,{id:u,...m,partial:l,checked:r,disabled:n||w,onCheckedChange:d,className:h("wu-peer wu-checkbox",i),required:c,ref:t}),s&&a.jsx(Me,{htmlFor:u,className:"wu-w-full wu-checkbox-label",children:s})]})}),Of=Be.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"}}});qe.displayName="WuCheckbox";const ms={WuChip:"_WuChip_l50hr_1",WuLabel:"_WuLabel_l50hr_70",WuCloseBtn:"_WuCloseBtn_l50hr_74"},ri=f.forwardRef(({variant:e="primary",size:t="md",shape:n="default",color:r,disabled:s=!1,selected:o=!1,onClose:i,className:u,children:l,onClick:d,onKeyDown:c,...w},m)=>{const p=!!d,b=!!i,g=p?"button":"span",y=v=>{v.stopPropagation(),!s&&(i==null||i())},x=v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),y(v))};return a.jsxs(g,{ref:m,type:p?"button":void 0,disabled:p?s:void 0,"aria-disabled":s||void 0,"data-variant":e,"data-size":t,"data-shape":n,"data-color":r,"data-selected":o?"true":"false","data-disabled":s||void 0,"data-closable":b||void 0,className:h(ms.WuChip,u),onClick:s?void 0:d,onKeyDown:c,...w,children:[a.jsx("span",{className:ms.WuLabel,children:l}),b&&a.jsx("span",{role:"button",tabIndex:s?-1:0,"aria-label":"Remove",className:ms.WuCloseBtn,onClick:y,onKeyDown:x,children:a.jsx("span",{className:"wm-close"})})]})});ri.displayName="WuChip";const gs=E.forwardRef(({className:e,...t},n)=>a.jsx(Ne.Command,{ref:n,className:h("wu-flex wu-h-full wu-w-full wu-flex-col wu-overflow-hidden wu-rounded-md",e),...t}));gs.displayName=Ne.Command.displayName;const si=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{className:"wu-flex wu-items-center wu-border-b wu-px-3",children:a.jsx(Ne.Command.Input,{ref:n,className:h("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})}));si.displayName=Ne.Command.Input.displayName;const bs=E.forwardRef(({className:e,...t},n)=>a.jsx(Ne.Command.List,{ref:n,className:h("",e),...t}));bs.displayName=Ne.Command.List.displayName;const ys=E.forwardRef((e,t)=>a.jsx(Ne.Command.Empty,{ref:t,className:"wu-text-center wu-p-2 wu-pb-2.5 wu-text-xs",...e}));ys.displayName=Ne.Command.Empty.displayName;const sn=E.forwardRef(({className:e,...t},n)=>a.jsx(Ne.Command.Group,{ref:n,className:h("",e),...t}));sn.displayName=Ne.Command.Group.displayName;const vs=E.forwardRef(({className:e,...t},n)=>a.jsx(Ne.Command.Separator,{ref:n,className:h("wu-mx-2 wu-my-1 wu-h-px wu-bg-gray-40",e),...t}));vs.displayName=Ne.Command.Separator.displayName;const an=E.forwardRef(({className:e,...t},n)=>a.jsx(Ne.Command.Item,{ref:n,className:h("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}));an.displayName=Ne.Command.Item.displayName;const ai=(e,t,n,r)=>f.useMemo(()=>{if(!e||!n||t.length===0)return t;const s=Array.isArray(n)?n:[n];if(s.length===0)return t;const o=new Set(s.map(d=>String(d[r.value]))),i=[],u=[],l=[];return t.forEach(d=>{const c=d[r.value];c===void 0?i.push(d):o.has(String(c))?u.push(d):l.push(d)}),[...i,...u,...l]},[t,n,r.value,e]),Mt=f.forwardRef(({containerHeight:e=400,list:t,callback:n,dir:r,className:s,style:o},i)=>a.jsx(eo.Virtuoso,{ref:i,dir:r,className:s,style:{height:e,scrollbarWidth:"thin",scrollbarColor:"#d4d4d4 #f1f1f1",overflowX:"hidden",...o},data:t,itemContent:(u,l)=>n(u,l)}));Mt.displayName="WuVirtualScroll";const Lf=({tags:e,triggerRef:t})=>{const[n,r]=f.useState([]),[s,o]=f.useState([]),i=f.useMemo(()=>a.jsx("ul",{className:"wu-flex wu-flex-col wu-items-start wu-justify-center wu-list-none",children:s.map(l=>a.jsx("li",{className:"wu-py-1 wu-text-xs wu-text-left",children:l},l))}),[s]),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 f.useEffect(()=>{const l=()=>{if(t.current){const m=t.current.offsetWidth-20-36;let p=0;const b=[],g=[];e.forEach(y=>{const x=u(y);p+x+8<m?(b.push(y),p+=x+8):g.push(y)}),r(b),o(g)}};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=>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},l)),s.length>0&&a.jsx(An,{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:["+",s.length]})})]})},Ff=({placeholder:e="Select...",isEllipse:t=!1,selectedOptions:n,variant:r="flat",dir:s="ltr",accessorKey:o,multiple:i,id:u,disabled:l,selectAll:d,isCheckedAll:c,className:w,...m})=>{const[p,b]=f.useState([]),g=f.useRef(null);f.useEffect(()=>{if(!n||Array.isArray(n)&&n.length===0){b([]);return}if(i){const x=n;b(x==null?void 0:x.map(v=>v[o.label]));return}else b([n[o.label]])},[n]);const y=()=>{var x;return p.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:`${(((x=g.current)==null?void 0:x.offsetWidth)||0)-32}px`},children:p.join(", ")}):a.jsx(Lf,{tags:p,triggerRef:g}):a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:e})};return a.jsx(dt,{dir:s,asChild:!0,id:u,disabled:l,children:a.jsxs("button",{...m,ref:g,disabled:l,className:h("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",r==="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:[y(),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"})]})})},oi=se.Root,ii=se.Trigger,ui=se.Group,Wf=se.Portal,Bf=se.Sub,$f=se.RadioGroup,li=E.forwardRef(({className:e,inset:t,children:n,position:r,...s},o)=>a.jsxs(se.SubTrigger,{ref:o,className:h("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),...s,children:[r==="left"&&a.jsx("span",{className:h("wm-chevron-right",s.dir==="rtl"&&"ml-2")}),n,r!=="left"&&a.jsx("span",{className:h("wu-text-base wu-leading-4",s.dir==="rtl"&&"wu-mr-auto wm-chevron-left",s.dir!=="rtl"&&"wu-ml-auto wm-chevron-right")})]}));li.displayName=se.SubTrigger.displayName;const ci=E.forwardRef(({className:e,...t},n)=>a.jsx(se.SubContent,{ref:n,className:h("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}));ci.displayName=se.SubContent.displayName;const xs=E.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(se.Portal,{children:a.jsx(se.Content,{ref:r,sideOffset:t,className:h("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})}));xs.displayName=se.Content.displayName;const Kn=E.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(se.Item,{ref:r,className:h("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}));Kn.displayName=se.Item.displayName;const di=E.forwardRef(({className:e,children:t,checked:n,dir:r,...s},o)=>a.jsxs(se.CheckboxItem,{ref:o,className:h("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",r==="rtl"&&"wu-pr-8 wu-pl-2",r!=="rtl"&&"wu-pl-8 wu-pr-2",e),checked:n,...s,children:[a.jsx("span",{className:h("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",r==="rtl"&&"wu-right-2",r!=="rtl"&&"wu-left-2"),children:a.jsx(se.ItemIndicator,{children:a.jsx("span",{className:"wm-check wu-text-base wu-text-white"})})}),t]}));di.displayName=se.CheckboxItem.displayName;const wi=E.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(se.RadioItem,{ref:r,className:h("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(se.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]}));wi.displayName=se.RadioItem.displayName;const on=E.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(se.Label,{ref:r,className:h("wu-p-2 wu-font-medium wu-text-xs",t&&"wu-pl-8",e),...n}));on.displayName=se.Label.displayName;const Yn=E.forwardRef(({className:e,...t},n)=>a.jsx(se.Separator,{ref:n,className:h("-wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));Yn.displayName=se.Separator.displayName;const fi=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:s,dir:o})=>{const[i,u]=f.useState(n?[]:"");f.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[s.value])):JSON.stringify(t[s.value]))},[t,s.value,n]);const l=n?i.includes(JSON.stringify(e[s.value])):i===JSON.stringify(e[s.value]),d=()=>{e.disabled||r(e)};return a.jsxs(an,{onSelect:d,disabled:e.disabled,className:h("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(qe,{checked:l}),a.jsx(qf,{option:e,accessorKey:s})]})},qf=({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"})]})},pi=e=>{const{option:t,selectAll:n,handleSelectAll:r,isCheckedAll:s,isPartialSelected:o,...i}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(an,{onSelect:r,className:h("wu-cursor-pointer wu-text-xs wu-leading-4 wu-py-2 wu-combobox-item"),dir:i.dir,children:[a.jsx(qe,{checked:s||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(sn,{children:[a.jsx(on,{children:t.label}),t.options.map((l,d)=>{const c=l[i.accessorKey.value],w=c!=null?String(c):`group-item-${d}`;return f.createElement(fi,{...i,option:l,key:w})})]});case"divider":return a.jsx(vs,{className:"wu-mx-4"});default:return a.jsx(fi,{...i,option:t})}},Hf=e=>{const t=[],n=[],r=[],s=[];return e.forEach(o=>{o.type==="group"?(t.push(o),r.push(...o.options),s.push(...o.options.filter(i=>!i.disabled))):o.type==="divider"?n.push(o):r.push(o),o!=null&&o.disabled||s.push(o)}),{groups:t,dividers:n,allOptions:r,enabledOptions:s}},zf=f.memo(Re),Uf=({data:e,accessorKey:t,value:n,defaultValue:r,Header:s,virtualizedThreshold:o=100,isEllipse:i,placeholder:u,variant:l,dir:d,onSelect:c,Label:w,maxHeight:m=420,multiple:p=!1,hasGroup:b=!1,selectAll:g,id:y,disabled:x,labelPosition:v="top",className:C,onScroll:N,maxContentWidth:S,enableSearch:M=!0,noDataContent:T,selectedToTop:I=!1,...D})=>{const[A,_]=f.useState(""),[P,W]=f.useState(),[F,B]=f.useState(!1),[$,ie]=f.useState(!1),[U,V]=f.useState(!1),q=f.useRef(null),{allOptions:H,enabledOptions:Q}=f.useMemo(()=>b||g&&!g.includeDisabled?Hf(e):{allOptions:e,groups:[],dividers:[],enabledOptions:[]},[e,b]),ee=f.useMemo(()=>{if(!A)return e;const G=A.toLowerCase();return H.filter(X=>X[t.label].toLowerCase().includes(G))},[A,H,e,t.label]),J=f.useMemo(()=>p&&g!=null&&g.enable&&!A&&ee.length>0?[{type:"all"},...ee]:ee,[ee,A,p]),ge=ai(I,J,P,t),K=f.useCallback(G=>{const X=G[t.value];p?W(he=>{const le=he||[],xe=le.some(Pe=>Pe[t.value]===X)?le.filter(Pe=>Pe[t.value]!==X):[...le,G];return c==null||c(xe),xe}):(B(!1),W(G),c==null||c(G))},[p,t.value,c]),O=f.useCallback(G=>_(G.target.value),[]),j=f.useCallback(()=>_(""),[]);f.useEffect(()=>{if(n!==void 0&&r!==void 0){console.error("defaultValue and value cannot be used simultaneously");return}else n!==void 0?W(n):r!==void 0&&W(r)},[n,r]),f.useEffect(()=>{if(!p)return;const G=g!=null&&g.includeDisabled?(P==null?void 0:P.length)===H.length:(P==null?void 0:P.length)===Q.length;ie(G);const X=(P==null?void 0:P.length)>0&&!G;V(X)},[P,g]);const Y=f.useCallback(()=>{const G=$?[]:g!=null&&g.includeDisabled?H:Q;W(G),c==null||c(G)},[$,p,H,Q,c,g]),Z=Dn(v);return a.jsxs("div",{className:h(Z,"wu-flex wu-combobox-container"),ref:q,children:[a.jsxs(je,{onOpenChange:G=>{G&&j(),B(G)},open:F,modal:!0,children:[a.jsx(Ff,{selectedOptions:P,accessorKey:t,isEllipse:i,placeholder:u,variant:l,dir:d,multiple:p,disabled:x,selectAll:g,isCheckedAll:$,className:C,id:y,...D}),a.jsx($e,{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:S},children:a.jsxs(gs,{id:y,children:[M&&a.jsx("div",{className:"wu-m-2",children:a.jsx(zf,{placeholder:"Search...",Icon:a.jsx("span",{className:"wm-search"}),className:"wu-text-xs wu-combobox-search",onChange:O,name:"Search","aria-label":"Search",dir:d,iconPosition:d==="rtl"?"right":"left"})}),s,a.jsxs(bs,{children:[a.jsx(ys,{children:T||"No results found."}),ge.length>=o?a.jsx(Mt,{className:"wu-combobox-list",containerHeight:m,list:ge,callback:(G,X)=>{const he=X,le=he[t.value],ne=le!=null?String(le):`__${"type"in he?he.type:"item"}__${G}`;return a.jsx(pi,{option:X,value:P,onSelect:K,multiple:p,accessorKey:t,dir:d,selectAll:g,handleSelectAll:Y,isCheckedAll:$,isPartialSelected:U},ne)},dir:d}):a.jsx("div",{style:{height:"fit-content",maxHeight:m,overflow:"auto"},className:"wu-combobox-list",onScroll:N,children:ge.map((G,X)=>{const he=G,le=he[t.value],ne=le!=null?String(le):`__${"type"in he?he.type:"item"}__${X}`;return a.jsx(pi,{option:he,value:P,onSelect:K,multiple:p,accessorKey:t,dir:d,selectAll:g,handleSelectAll:Y,isCheckedAll:$,isPartialSelected:U},ne)})})]})]})})]}),w&&a.jsx(Me,{htmlFor:y,className:"wu-combobox-label",children:w})]})},jf=e=>{const{textToCopy:t,notificationText:n,...r}=e,[s,o]=f.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(Ie,{...r,onClick:i,variant:"iconOnly",className:h("wu-relative",e.className),"aria-label":"Copy to clipboard",children:[n&&a.jsx("span",{className:h("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",s?"wu-block":"wu-hidden"),children:n}),a.jsx(Oe,{icon:"wm-content-copy",className:"wu-text-lg"})]})},hi=re.Root,Gf=re.Trigger,Kf=re.Close,Yf=re.Portal,mi=E.forwardRef(({className:e,...t},n)=>a.jsx(re.Overlay,{className:h("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}));mi.displayName=re.Overlay.displayName;const Xf=Be.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"}}),Ns=E.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,overlayClassName:s,closeButtonClassName:o,...i},u)=>a.jsxs(Yf,{children:[a.jsx(mi,{className:s}),a.jsxs(re.Content,{ref:u,className:h(Xf({side:e}),t),...i,children:[n,!r&&a.jsx(re.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Xt,{variant:"iconOnly",className:h("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"})]})})]})]}));Ns.displayName=re.Content.displayName;const gi=E.forwardRef(({className:e,...t},n)=>a.jsx(re.Title,{ref:n,className:h("wu-text-lg wu-font-semibold",e),...t}));gi.displayName=re.Title.displayName;const Zf=E.forwardRef(({className:e,...t},n)=>a.jsx(re.Description,{ref:n,className:h("wu-text-sm",e),...t}));Zf.displayName=re.Description.displayName;const Jf=e=>t=>{e&&t.preventDefault()},Qf=e=>{const{Trigger:t,children:n,hideCloseButton:r,className:s,side:o="left",open:i,onOpenChange:u,preventClickOutside:l,overlayClassName:d,closeButtonClassName:c,...w}=e;return a.jsxs(hi,{open:i,onOpenChange:u,children:[a.jsx(Gf,{asChild:!0,children:t}),a.jsxs(Ns,{onInteractOutside:Jf(l),side:o,className:h("wu-bg-white wu-text-gray-lead wu-px-0",s),hideCloseButton:r,overlayClassName:d,closeButtonClassName:c,...w,children:[a.jsx("div",{className:"wu-hidden",children:a.jsx(gi,{})}),n]})]})},Rf=({children:e,...t})=>a.jsx(Kf,{...t,children:e}),bi=f.createContext({});function Ss(e){const t=f.useRef(null);return t.current===null&&(t.current=e()),t.current}const yi=typeof window<"u"?f.useLayoutEffect:f.useEffect,Xn=f.createContext(null);function ep(e,t){e.indexOf(t)===-1&&e.push(t)}function tp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const et=(e,t,n)=>n>t?t:n<e?e:n;function Cs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let un=()=>{},wt=()=>{};typeof process<"u"&&((Od=process.env)==null?void 0:Od.NODE_ENV)!=="production"&&(un=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Cs(t,n))},wt=(e,t,n)=>{if(!e)throw new Error(Cs(t,n))});const tt={},vi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),np=e=>typeof e=="object"&&e!==null,xi=e=>/^0[^.\s]+$/u.test(e);function Ni(e){let t;return()=>(t===void 0&&(t=e()),t)}const kt=e=>e,Zn=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Si=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Ci{constructor(){this.subscriptions=[]}add(t){return ep(this.subscriptions,t),()=>tp(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Le=e=>e*1e3,He=e=>e/1e3,Ti=(e,t)=>t?e*(1e3/t):0,Ei=new Set;function Ii(e,t,n){e||Ei.has(t)||(console.warn(Cs(t,n)),Ei.add(t))}const Mi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rp=1e-7,sp=12;function ap(e,t,n,r,s){let o,i,u=0;do i=t+(n-t)/2,o=Mi(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>rp&&++u<sp);return i}function ln(e,t,n,r){if(e===t&&n===r)return kt;const s=o=>ap(o,0,1,e,n);return o=>o===0||o===1?o:Mi(s(o),t,r)}const ki=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Di=e=>t=>1-e(1-t),Ai=ln(.33,1.53,.69,.99),Ts=Di(Ai),_i=ki(Ts),Pi=e=>e>=1?1:(e*=2)<1?.5*Ts(e):.5*(2-Math.pow(2,-10*(e-1))),Es=e=>1-Math.sin(Math.acos(e)),op=Di(Es),Vi=ki(Es),ip=ln(.42,0,1,1),up=ln(0,0,.58,1),Oi=ln(.42,0,.58,1),lp=e=>Array.isArray(e)&&typeof e[0]!="number",Li=e=>Array.isArray(e)&&typeof e[0]=="number",Fi={linear:kt,easeIn:ip,easeInOut:Oi,easeOut:up,circIn:Es,circInOut:Vi,circOut:op,backIn:Ts,backInOut:_i,backOut:Ai,anticipate:Pi},cp=e=>typeof e=="string",Wi=e=>{if(Li(e)){wt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return ln(t,n,r,s)}else if(cp(e))return wt(Fi[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Fi[e];return e},Jn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function dp(e,t){let n=new Set,r=new Set,s=!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,m=!1)=>{const b=m&&s?n:r;return w&&i.add(c),b.add(c),c},cancel:c=>{r.delete(c),i.delete(c)},process:c=>{if(u=c,s){o=!0;return}s=!0;const w=n;n=r,r=w,n.forEach(l),n.clear(),s=!1,o&&(o=!1,d.process(c))}};return d}const wp=40;function Bi(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=Jn.reduce((C,N)=>(C[N]=dp(o),C),{}),{setup:u,read:l,resolveKeyframes:d,preUpdate:c,update:w,preRender:m,render:p,postRender:b}=i,g=()=>{const C=tt.useManualTiming,N=C?s.timestamp:performance.now();n=!1,C||(s.delta=r?1e3/60:Math.max(Math.min(N-s.timestamp,wp),1)),s.timestamp=N,s.isProcessing=!0,u.process(s),l.process(s),d.process(s),c.process(s),w.process(s),m.process(s),p.process(s),b.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},y=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:Jn.reduce((C,N)=>{const S=i[N];return C[N]=(M,T=!1,I=!1)=>(n||y(),S.schedule(M,T,I)),C},{}),cancel:C=>{for(let N=0;N<Jn.length;N++)i[Jn[N]].cancel(C)},state:s,steps:i}}const{schedule:Fe,cancel:Is,state:Qn}=Bi(typeof requestAnimationFrame<"u"?requestAnimationFrame:kt,!0);let Rn;function fp(){Rn=void 0}const _e={now:()=>(Rn===void 0&&_e.set(Qn.isProcessing||tt.useManualTiming?Qn.timestamp:performance.now()),Rn),set:e=>{Rn=e,queueMicrotask(fp)}},$i=e=>t=>typeof t=="string"&&t.startsWith(e),qi=$i("--"),pp=$i("var(--"),Ms=e=>pp(e)?hp.test(e.split("/*")[0].trim()):!1,hp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Hi(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Dt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},cn={...Dt,transform:e=>et(0,1,e)},er={...Dt,default:1},dn=e=>Math.round(e*1e5)/1e5,ks=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function mp(e){return e==null}const gp=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ds=(e,t)=>n=>!!(typeof n=="string"&&gp.test(n)&&n.startsWith(e)||t&&!mp(n)&&Object.prototype.hasOwnProperty.call(n,t)),zi=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,u]=r.match(ks);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:u!==void 0?parseFloat(u):1}},bp=e=>et(0,255,e),As={...Dt,transform:e=>Math.round(bp(e))},ft={test:Ds("rgb","red"),parse:zi("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+As.transform(e)+", "+As.transform(t)+", "+As.transform(n)+", "+dn(cn.transform(r))+")"};function yp(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const _s={test:Ds("#"),parse:yp,transform:ft.transform},wn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),nt=wn("deg"),At=wn("%"),L=wn("px"),vp=wn("vh"),xp=wn("vw"),Ui={...At,parse:e=>At.parse(e)/100,transform:e=>At.transform(e*100)},_t={test:Ds("hsl","hue"),parse:zi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+At.transform(dn(t))+", "+At.transform(dn(n))+", "+dn(cn.transform(r))+")"},de={test:e=>ft.test(e)||_s.test(e)||_t.test(e),parse:e=>ft.test(e)?ft.parse(e):_t.test(e)?_t.parse(e):_s.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ft.transform(e):_t.transform(e),getAnimatableNone:e=>{const t=de.parse(e);return t.alpha=0,de.transform(t)}},Np=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Sp(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ks))==null?void 0:t.length)||0)+(((n=e.match(Np))==null?void 0:n.length)||0)>0}const ji="number",Gi="color",Cp="var",Tp="var(",Ki="${}",Ep=/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 Pt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const u=t.replace(Ep,l=>(de.test(l)?(r.color.push(o),s.push(Gi),n.push(de.parse(l))):l.startsWith(Tp)?(r.var.push(o),s.push(Cp),n.push(l)):(r.number.push(o),s.push(ji),n.push(parseFloat(l))),++o,Ki)).split(Ki);return{values:n,split:u,indexes:r,types:s}}function Ip(e){return Pt(e).values}function Yi({split:e,types:t}){const n=e.length;return r=>{let s="";for(let o=0;o<n;o++)if(s+=e[o],r[o]!==void 0){const i=t[o];i===ji?s+=dn(r[o]):i===Gi?s+=de.transform(r[o]):s+=r[o]}return s}}function Mp(e){return Yi(Pt(e))}const kp=e=>typeof e=="number"?0:de.test(e)?de.getAnimatableNone(e):e,Dp=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:kp(e);function Ap(e){const t=Pt(e);return Yi(t)(t.values.map((r,s)=>Dp(r,t.split[s])))}const ze={test:Sp,parse:Ip,createTransformer:Mp,getAnimatableNone:Ap};function Ps(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 _p({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const u=n<.5?n*(1+t):n+t-n*t,l=2*n-u;s=Ps(l,u,e+1/3),o=Ps(l,u,e),i=Ps(l,u,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function tr(e,t){return n=>n>0?t:e}const fn=(e,t,n)=>e+(t-e)*n,Vs=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Pp=[_s,ft,_t],Vp=e=>Pp.find(t=>t.test(e));function Xi(e){const t=Vp(e);if(un(!!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===_t&&(n=_p(n)),n}const Zi=(e,t)=>{const n=Xi(e),r=Xi(t);if(!n||!r)return tr(e,t);const s={...n};return o=>(s.red=Vs(n.red,r.red,o),s.green=Vs(n.green,r.green,o),s.blue=Vs(n.blue,r.blue,o),s.alpha=fn(n.alpha,r.alpha,o),ft.transform(s))},Os=new Set(["none","hidden"]);function Op(e,t){return Os.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Lp(e,t){return n=>fn(e,t,n)}function Ls(e){return typeof e=="number"?Lp:typeof e=="string"?Ms(e)?tr:de.test(e)?Zi:Bp:Array.isArray(e)?Ji:typeof e=="object"?de.test(e)?Zi:Fp:tr}function Ji(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>Ls(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function Fp(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Ls(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function Wp(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],i=e.indexes[o][r[o]],u=e.values[i]??0;n[s]=u,r[o]++}return n}const Bp=(e,t)=>{const n=ze.createTransformer(t),r=Pt(e),s=Pt(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Os.has(e)&&!s.values.length||Os.has(t)&&!r.values.length?Op(e,t):Zn(Ji(Wp(r,s),s.values),n):(un(!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"),tr(e,t))};function Qi(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?fn(e,t,n):Ls(e)(e,t)}const $p=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Fe.update(t,n),stop:()=>Is(t),now:()=>Qn.isProcessing?Qn.timestamp:_e.now()}},Ri=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},nr=2e4;function Fs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<nr;)t+=n,r=e.next(t);return t>=nr?1/0:t}function qp(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Fs(r),nr);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:He(s)}}const ue={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};function Ws(e,t){return e*Math.sqrt(1-t*t)}const Hp=12;function zp(e,t,n){let r=n;for(let s=1;s<Hp;s++)r=r-e(r)/t(r);return r}const Bs=.001;function Up({duration:e=ue.duration,bounce:t=ue.bounce,velocity:n=ue.velocity,mass:r=ue.mass}){let s,o;un(e<=Le(ue.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=et(ue.minDamping,ue.maxDamping,i),e=et(ue.minDuration,ue.maxDuration,He(e)),i<1?(s=d=>{const c=d*i,w=c*e,m=c-n,p=Ws(d,i),b=Math.exp(-w);return Bs-m/p*b},o=d=>{const w=d*i*e,m=w*n+n,p=Math.pow(i,2)*Math.pow(d,2)*e,b=Math.exp(-w),g=Ws(Math.pow(d,2),i);return(-s(d)+Bs>0?-1:1)*((m-p)*b)/g}):(s=d=>{const c=Math.exp(-d*e),w=(d-n)*e+1;return-Bs+c*w},o=d=>{const c=Math.exp(-d*e),w=(n-d)*(e*e);return c*w});const u=5/e,l=zp(s,o,u);if(e=Le(e),isNaN(l))return{stiffness:ue.stiffness,damping:ue.damping,duration:e};{const d=Math.pow(l,2)*r;return{stiffness:d,damping:i*2*Math.sqrt(r*d),duration:e}}}const jp=["duration","bounce"],Gp=["stiffness","damping","mass"];function eu(e,t){return t.some(n=>e[n]!==void 0)}function Kp(e){let t={velocity:ue.velocity,stiffness:ue.stiffness,damping:ue.damping,mass:ue.mass,isResolvedFromDuration:!1,...e};if(!eu(e,Gp)&&eu(e,jp))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*et(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ue.mass,stiffness:s,damping:o}}else{const n=Up({...e,velocity:0});t={...t,...n,mass:ue.mass},t.isResolvedFromDuration=!0}return t}function rr(e=ue.visualDuration,t=ue.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=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:m,isResolvedFromDuration:p}=Kp({...n,velocity:-He(n.velocity||0)}),b=m||0,g=d/(2*Math.sqrt(l*c)),y=i-o,x=He(Math.sqrt(l/c)),v=Math.abs(y)<5;r||(r=v?ue.restSpeed.granular:ue.restSpeed.default),s||(s=v?ue.restDelta.granular:ue.restDelta.default);let C,N,S,M,T,I;if(g<1)S=Ws(x,g),M=(b+g*x*y)/S,C=A=>{const _=Math.exp(-g*x*A);return i-_*(M*Math.sin(S*A)+y*Math.cos(S*A))},T=g*x*M+y*S,I=g*x*y-M*S,N=A=>Math.exp(-g*x*A)*(T*Math.sin(S*A)+I*Math.cos(S*A));else if(g===1){C=_=>i-Math.exp(-x*_)*(y+(b+x*y)*_);const A=b+x*y;N=_=>Math.exp(-x*_)*(x*A*_-b)}else{const A=x*Math.sqrt(g*g-1);C=F=>{const B=Math.exp(-g*x*F),$=Math.min(A*F,300);return i-B*((b+g*x*y)*Math.sinh($)+A*y*Math.cosh($))/A};const _=(b+g*x*y)/A,P=g*x*_-y*A,W=g*x*y-_*A;N=F=>{const B=Math.exp(-g*x*F),$=Math.min(A*F,300);return B*(P*Math.sinh($)+W*Math.cosh($))}}const D={calculatedDuration:p&&w||null,velocity:A=>Le(N(A)),next:A=>{if(!p&&g<1){const P=Math.exp(-g*x*A),W=Math.sin(S*A),F=Math.cos(S*A),B=i-P*(M*W+y*F),$=Le(P*(T*W+I*F));return u.done=Math.abs($)<=r&&Math.abs(i-B)<=s,u.value=u.done?i:B,u}const _=C(A);if(p)u.done=A>=w;else{const P=Le(N(A));u.done=Math.abs(P)<=r&&Math.abs(i-_)<=s}return u.value=u.done?i:_,u},toString:()=>{const A=Math.min(Fs(D),nr),_=Ri(P=>D.next(A*P).value,A,30);return A+"ms "+_},toTransition:()=>{}};return D}rr.applyToOptions=e=>{const t=qp(e,100,rr);return e.ease=t.ease,e.duration=Le(t.duration),e.type="keyframes",e};const Yp=5;function tu(e,t,n){const r=Math.max(t-Yp,0);return Ti(n-e(r),t-r)}function $s({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:u,max:l,restDelta:d=.5,restSpeed:c}){const w=e[0],m={done:!1,value:w},p=I=>u!==void 0&&I<u||l!==void 0&&I>l,b=I=>u===void 0?l:l===void 0||Math.abs(u-I)<Math.abs(l-I)?u:l;let g=n*t;const y=w+g,x=i===void 0?y:i(y);x!==y&&(g=x-w);const v=I=>-g*Math.exp(-I/r),C=I=>x+v(I),N=I=>{const D=v(I),A=C(I);m.done=Math.abs(D)<=d,m.value=m.done?x:A};let S,M;const T=I=>{p(m.value)&&(S=I,M=rr({keyframes:[m.value,b(m.value)],velocity:tu(C,I,m.value),damping:s,stiffness:o,restDelta:d,restSpeed:c}))};return T(0),{calculatedDuration:null,next:I=>{let D=!1;return!M&&S===void 0&&(D=!0,N(I),T(I)),S!==void 0&&I>=S?M.next(I-S):(!D&&N(I),m)}}}function Xp(e,t,n){const r=[],s=n||tt.mix||Qi,o=e.length-1;for(let i=0;i<o;i++){let u=s(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||kt:t;u=Zn(l,u)}r.push(u)}return r}function Zp(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(wt(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=Xp(t,r,s),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 m=Si(e[w],e[w+1],c);return u[w](m)};return n?c=>d(et(e[0],e[o-1],c)):d}function Jp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Si(0,t,r);e.push(fn(n,1,s))}}function Qp(e){const t=[0];return Jp(t,e.length-1),t}function Rp(e,t){return e.map(n=>n*t)}function eh(e,t){return e.map(()=>t||Oi).splice(0,e.length-1)}function Vt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=lp(r)?r.map(Wi):Wi(r),o={done:!1,value:t[0]},i=Rp(n&&n.length===t.length?n:Qp(t),e),u=Zp(i,t,{ease:Array.isArray(s)?s:eh(t,s)});return{calculatedDuration:e,next:l=>(o.value=u(l),o.done=l>=e,o)}}const th=e=>e!==null;function sr(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(th),u=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const nh={decay:$s,inertia:$s,tween:Vt,keyframes:Vt,spring:rr};function nu(e){typeof e.type=="string"&&(e.type=nh[e.type])}class qs{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 rh=e=>e/100;class ar extends qs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==_e.now()&&this.tick(_e.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;nu(t);const{type:n=Vt,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=t;let{keyframes:u}=t;const l=n||Vt;process.env.NODE_ENV!=="production"&&l!==Vt&&wt(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),l!==Vt&&typeof u[0]!="number"&&(this.mixKeyframes=Zn(rh,Qi(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=Fs(d));const{calculatedDuration:c}=d;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(r+1)-s,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:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:u,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:c,repeat:w,repeatType:m,repeatDelay:p,type:b,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?x<0:x>s;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let C=this.currentTime,N=r;if(w){const I=Math.min(this.currentTime,s)/u;let D=Math.floor(I),A=I%1;!A&&I>=1&&(A=1),A===1&&D--,D=Math.min(D,w+1),!!(D%2)&&(m==="reverse"?(A=1-A,p&&(A-=p/u)):m==="mirror"&&(N=i)),C=et(0,1,A)*u}let S;v?(this.delayState.value=c[0],S=this.delayState):S=N.next(C),o&&!v&&(S.value=o(S.value));let{done:M}=S;!v&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return T&&b!==$s&&(S.value=sr(c,this.options,y,this.speed)),g&&g(S.value),T&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return He(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+He(t)}get time(){return He(this.currentTime)}set time(t){t=Le(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),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return tu(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(_e.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=He(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=$p,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(_e.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 sh(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const pt=e=>e*180/Math.PI,Hs=e=>{const t=pt(Math.atan2(e[1],e[0]));return zs(t)},ah={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Hs,rotateZ:Hs,skewX:e=>pt(Math.atan(e[1])),skewY:e=>pt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},zs=e=>(e=e%360,e<0&&(e+=360),e),ru=Hs,su=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),au=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),oh={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:su,scaleY:au,scale:e=>(su(e)+au(e))/2,rotateX:e=>zs(pt(Math.atan2(e[6],e[5]))),rotateY:e=>zs(pt(Math.atan2(-e[2],e[0]))),rotateZ:ru,rotate:ru,skewX:e=>pt(Math.atan(e[4])),skewY:e=>pt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Us(e){return e.includes("scale")?1:0}function js(e,t){if(!e||e==="none")return Us(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=oh,s=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ah,s=u}if(!s)return Us(t);const o=r[t],i=s[1].split(",").map(uh);return typeof o=="function"?o(i):i[o]}const ih=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return js(n,t)};function uh(e){return parseFloat(e.trim())}const Ot=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Lt=new Set(Ot),ou=e=>e===Dt||e===L,lh=new Set(["x","y","z"]),ch=Ot.filter(e=>!lh.has(e));function dh(e){const t=[];return ch.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const rt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-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})=>js(t,"x"),y:(e,{transform:t})=>js(t,"y")};rt.translateX=rt.x,rt.translateY=rt.y;const ht=new Set;let Gs=!1,Ks=!1,Ys=!1;function iu(){if(Ks){const e=Array.from(ht).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=dh(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{var u;(u=r.getValue(o))==null||u.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ks=!1,Gs=!1,ht.forEach(e=>e.complete(Ys)),ht.clear()}function uu(){ht.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ks=!0)})}function wh(){Ys=!0,uu(),iu(),Ys=!1}class Xs{constructor(t,n,r,s,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(ht.add(this),Gs||(Gs=!0,Fe.read(uu),Fe.resolveKeyframes(iu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,i);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=i),s&&o===void 0&&s.set(t[0])}sh(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ht.delete(this)}cancel(){this.state==="scheduled"&&(ht.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const fh=e=>e.startsWith("--");function lu(e,t,n){fh(t)?e.style.setProperty(t,n):e.style[t]=n}const ph={};function cu(e,t){const n=Ni(e);return()=>ph[t]??n()}const hh=cu(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),du=cu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),pn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,wu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pn([0,.65,.55,1]),circOut:pn([.55,0,1,.45]),backIn:pn([.31,.01,.66,-.59]),backOut:pn([.33,1.53,.69,.99])};function fu(e,t){if(e)return typeof e=="function"?du()?Ri(e,t):"ease-out":Li(e)?pn(e):Array.isArray(e)?e.map(n=>fu(n,t)||wu.easeOut):wu[e]}function mh(e,t,n,{delay:r=0,duration:s=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=fu(u,s);Array.isArray(w)&&(c.easing=w);const m={delay:r,duration:s,easing:Array.isArray(w)?"linear":w,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return d&&(m.pseudoElement=d),e.animate(c,m)}function pu(e){return typeof e=="function"&&"applyToOptions"in e}function gh({type:e,...t}){return pu(e)&&du()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class hu extends qs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:u,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,wt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=gh(t);this.animation=mh(n,r,s,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=sr(s,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(c),lu(n,r,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,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return He(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+He(t)}get time(){return He(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Le(t),n&&this.animation.pause()}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,rangeStart:n,rangeEnd:r,observe:s}){var o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&hh()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),kt):s(this)}}const mu={anticipate:Pi,backInOut:_i,circInOut:Vi};function bh(e){return e in mu}function yh(e){typeof e.ease=="string"&&bh(e.ease)&&(e.ease=mu[e.ease])}const Zs=10;class vh extends hu{constructor(t){yh(t),nu(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new ar({...i,autoplay:!1}),l=Math.max(Zs,_e.now()-this.startTime),d=et(0,Zs,l-Zs),c=u.sample(l).value,{name:w}=this.options;o&&w&&lu(o,w,c),n.setWithVelocity(u.sample(Math.max(0,l-d)).value,c,d),u.stop()}}const gu=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ze.test(e)||e==="0")&&!e.startsWith("url("));function xh(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 Nh(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=gu(s,t),u=gu(o,t);return un(i===u,`You are trying to animate ${t} from "${s}" to "${o}". "${i?o:s}" is not an animatable value.`,"value-not-animatable"),!i||!u?!1:xh(e)||(n==="spring"||pu(n))&&r}function Js(e){e.duration=0,e.type="keyframes"}const bu=new Set(["opacity","clipPath","filter","transform"]),Sh=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Ch(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Sh.test(e[t]))return!0;return!1}const Th=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Eh=Ni(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ih(e){var w;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:i,keyframes:u}=e;if(!(((w=t==null?void 0:t.owner)==null?void 0:w.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:c}=t.owner.getProps();return Eh()&&n&&(bu.has(n)||Th.has(n)&&Ch(u))&&(n!=="transform"||!c)&&!d&&!r&&s!=="mirror"&&o!==0&&i!=="inertia"}const Mh=40;class kh extends qs{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",keyframes:u,name:l,motionValue:d,element:c,...w}){var b;super(),this.stop=()=>{var g,y;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=_e.now();const m={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,name:l,motionValue:d,element:c,...w},p=(c==null?void 0:c.KeyframeResolver)||Xs;this.keyframeResolver=new p(u,(g,y,x)=>this.onKeyframesResolved(g,y,m,!x),l,d,c),(b=this.keyframeResolver)==null||b.scheduleResolve()}onKeyframesResolved(t,n,r,s){var x,v;this.keyframeResolver=void 0;const{name:o,type:i,velocity:u,delay:l,isHandoff:d,onUpdate:c}=r;this.resolvedAt=_e.now();let w=!0;Nh(t,o,i,u)||(w=!1,(tt.instantAnimations||!l)&&(c==null||c(sr(t,r,n))),t[0]=t[t.length-1],Js(r),r.repeat=0);const p={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Mh?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=w&&!d&&Ih(p),g=(v=(x=p.motionValue)==null?void 0:x.owner)==null?void 0:v.current;let y;if(b)try{y=new vh({...p,element:g})}catch{y=new ar(p)}else y=new ar(p);y.finished.then(()=>{this.notifyFinished()}).catch(kt),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}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(),wh()),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 yu(e,t,n,r=0,s=1){const o=Array.from(e).sort((d,c)=>d.sortNodePosition(c)).indexOf(t),i=e.size,u=(i-1)*r;return typeof n=="function"?n(o,i):s===1?o*r:u-o*r}const Dh=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ah(e){const t=Dh.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const _h=4;function vu(e,t,n=1){wt(n<=_h,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=Ah(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return vi(i)?parseFloat(i):i}return Ms(s)?vu(s,t,n+1):s}const Ph={type:"spring",stiffness:500,damping:25,restSpeed:10},Vh=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Oh={type:"keyframes",duration:.8},Lh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Fh=(e,{keyframes:t})=>t.length>2?Oh:Lt.has(e)?e.startsWith("scale")?Vh(t[1]):Ph:Lh;function xu(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Nu(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?xu(n,e):n}const Wh=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Bh(e){for(const t in e)if(!Wh.has(t))return!0;return!1}const $h=(e,t,n,r={},s,o)=>i=>{const u=Nu(r,e)||{},l=u.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Le(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-d,onUpdate:m=>{t.set(m),u.onUpdate&&u.onUpdate(m)},onComplete:()=>{i(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:s};Bh(u)||Object.assign(c,Fh(e,c)),c.duration&&(c.duration=Le(c.duration)),c.repeatDelay&&(c.repeatDelay=Le(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let w=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Js(c),c.delay===0&&(w=!0)),(tt.instantAnimations||tt.skipAnimations||s!=null&&s.shouldSkipAnimations||u.skipAnimations)&&(w=!0,Js(c),c.delay=0),c.allowFlatten=!u.type&&!u.ease,w&&!o&&t.get()!==void 0){const m=sr(c.keyframes,u);if(m!==void 0){Fe.update(()=>{c.onUpdate(m),c.onComplete()});return}}return u.isSync?new ar(c):new kh(c)};function Su(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Qs(e,t,n,r){if(typeof t=="function"){const[s,o]=Su(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Su(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function mt(e,t,n){const r=e.getProps();return Qs(r,t,n!==void 0?n:r.custom,e)}const Cu=new Set(["width","height","top","left","right","bottom",...Ot]),Tu=30,qh=e=>!isNaN(parseFloat(e));class Hh{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=_e.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),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=_e.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=qh(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ii(!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 Ci);const r=this.events[t].add(n);return t==="change"?()=>{r(),Fe.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}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=_e.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Tu)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Tu);return Ti(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 or(e,t){return new Hh(e,t)}const Rs=e=>Array.isArray(e);function zh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,or(n))}function Uh(e){return Rs(e)?e[e.length-1]||0:e}function jh(e,t){const n=mt(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const u=Uh(o[i]);zh(e,i,u)}}const be=e=>!!(e&&e.getVelocity);function Gh(e){return!!(be(e)&&e.add)}function Kh(e,t){const n=e.getValue("willChange");if(Gh(n))return n.add(t);if(!n&&tt.WillChange){const r=new tt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ea(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Eu="data-"+ea("framerAppearId");function Yh(e){return e.props[Eu]}function Xh({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Iu(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o,transitionEnd:i,...u}=t;const l=e.getDefaultTransition();o=o?xu(o,l):l;const d=o==null?void 0:o.reduceMotion,c=o==null?void 0:o.skipAnimations;r&&(o=r);const w=[],m=s&&e.animationState&&e.animationState.getState()[s];for(const p in u){const b=e.getValue(p,e.latestValues[p]??null),g=u[p];if(g===void 0||m&&Xh(m,p))continue;const y={delay:n,...Nu(o||{},p)};c&&(y.skipAnimations=!0);const x=b.get();if(x!==void 0&&!b.isAnimating()&&!Array.isArray(g)&&g===x&&!y.velocity){Fe.update(()=>b.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){const S=Yh(e);if(S){const M=window.MotionHandoffAnimation(S,p,Fe);M!==null&&(y.startTime=M,v=!0)}}Kh(e,p);const C=d??e.shouldReduceMotion;b.start($h(p,b,g,C&&Cu.has(p)?{type:!1}:y,e,v));const N=b.animation;N&&w.push(N)}if(i){const p=()=>Fe.update(()=>{i&&jh(e,i)});w.length?Promise.all(w).then(p):p()}return w}function ta(e,t,n={}){var l;const r=mt(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(Iu(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:c=0,staggerChildren:w,staggerDirection:m}=s;return Zh(e,t,d,c,w,m,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[d,c]=u==="beforeChildren"?[o,i]:[i,o];return d().then(()=>c())}else return Promise.all([o(),i(n.delay)])}function Zh(e,t,n=0,r=0,s=0,o=1,i){const u=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),u.push(ta(l,t,{...i,delay:n+(typeof r=="function"?0:r)+yu(e.variantChildren,l,r,s,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(u)}function Jh(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>ta(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=ta(e,t,n);else{const s=typeof t=="function"?mt(e,t,n.custom):t;r=Promise.all(Iu(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Qh={test:e=>e==="auto",parse:e=>e},Mu=e=>t=>t.test(e),ku=[Dt,L,At,nt,xp,vp,Qh],Du=e=>ku.find(Mu(e));function Rh(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xi(e):!0}const em=new Set(["brightness","contrast","saturate","opacity"]);function tm(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ks)||[];if(!r)return e;const s=n.replace(r,"");let o=em.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const nm=/\b([a-z-]*)\(.*?\)/gu,na={...ze,getAnimatableNone:e=>{const t=e.match(nm);return t?t.map(tm).join(" "):e}},ra={...ze,getAnimatableNone:e=>{const t=ze.parse(e);return ze.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Au={...Dt,transform:Math.round},sa={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,inset:L,insetBlock:L,insetBlockStart:L,insetBlockEnd:L,insetInline:L,insetInlineStart:L,insetInlineEnd:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,paddingBlock:L,paddingBlockStart:L,paddingBlockEnd:L,paddingInline:L,paddingInlineStart:L,paddingInlineEnd:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,marginBlock:L,marginBlockStart:L,marginBlockEnd:L,marginInline:L,marginInlineStart:L,marginInlineEnd:L,fontSize:L,backgroundPositionX:L,backgroundPositionY:L,...{rotate:nt,rotateX:nt,rotateY:nt,rotateZ:nt,scale:er,scaleX:er,scaleY:er,scaleZ:er,skew:nt,skewX:nt,skewY:nt,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:cn,originX:Ui,originY:Ui,originZ:L},zIndex:Au,fillOpacity:cn,strokeOpacity:cn,numOctaves:Au},rm={...sa,color:de,backgroundColor:de,outlineColor:de,fill:de,stroke:de,borderColor:de,borderTopColor:de,borderRightColor:de,borderBottomColor:de,borderLeftColor:de,filter:na,WebkitFilter:na,mask:ra,WebkitMask:ra},_u=e=>rm[e],sm=new Set([na,ra]);function Pu(e,t){let n=_u(e);return sm.has(n)||(n=ze),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const am=new Set(["auto","none","0"]);function om(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!am.has(o)&&Pt(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=Pu(n,s)}class im extends Xs{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=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(),Ms(w))){const m=vu(w,n.current);m!==void 0&&(t[c]=m),c===t.length-1&&(this.finalKeyframe=w)}}if(this.resolveNoneKeyframes(),!Cu.has(r)||t.length!==2)return;const[s,o]=t,i=Du(s),u=Du(o),l=Hi(s),d=Hi(o);if(l!==d&&rt[r]){this.needsMeasurement=!0;return}if(i!==u)if(ou(i)&&ou(u))for(let c=0;c<t.length;c++){const w=t[c];typeof w=="string"&&(t[c]=parseFloat(w))}else rt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||Rh(t[s]))&&r.push(s);r.length&&om(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=rt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,i=r[o];r[o]=rt[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()}}function um(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const Vu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ir(e){return np(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:lm}=Bi(queueMicrotask,!1),cm={y:!1};function dm(){return cm.y}function Ou(e,t){const n=um(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function wm(e){return!(e.pointerType==="touch"||dm())}function fm(e,t,n={}){const[r,s,o]=Ou(e,n);return r.forEach(i=>{let u=!1,l=!1,d;const c=()=>{i.removeEventListener("pointerleave",b)},w=y=>{d&&(d(y),d=void 0),c()},m=y=>{u=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),l&&(l=!1,w(y))},p=()=>{u=!0,window.addEventListener("pointerup",m,s),window.addEventListener("pointercancel",m,s)},b=y=>{if(y.pointerType!=="touch"){if(u){l=!0;return}w(y)}},g=y=>{if(!wm(y))return;l=!1;const x=t(i,y);typeof x=="function"&&(d=x,i.addEventListener("pointerleave",b,s))};i.addEventListener("pointerenter",g,s),i.addEventListener("pointerdown",p,s)}),o}const Lu=(e,t)=>t?e===t?!0:Lu(e,t.parentElement):!1,pm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,hm=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function mm(e){return hm.has(e.tagName)||e.isContentEditable===!0}const ur=new WeakSet;function Fu(e){return t=>{t.key==="Enter"&&e(t)}}function aa(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const gm=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Fu(()=>{if(ur.has(n))return;aa(n,"down");const s=Fu(()=>{aa(n,"up")}),o=()=>aa(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Wu(e){return pm(e)&&!0}const Bu=new WeakSet;function bm(e,t,n={}){const[r,s,o]=Ou(e,n),i=u=>{const l=u.currentTarget;if(!Wu(u)||Bu.has(u))return;ur.add(l),n.stopPropagation&&Bu.add(u);const d=t(l,u),c=(p,b)=>{window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",m),ur.has(l)&&ur.delete(l),Wu(p)&&typeof d=="function"&&d(p,{success:b})},w=p=>{c(p,l===window||l===document||n.useGlobalTarget||Lu(l,p.target))},m=p=>{c(p,!1)};window.addEventListener("pointerup",w,s),window.addEventListener("pointercancel",m,s)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",i,s),ir(u)&&(u.addEventListener("focus",d=>gm(d,s)),!mm(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}const ym=[...ku,de,ze],vm=e=>ym.find(Mu(e)),$u=()=>({min:0,max:0}),qu=()=>({x:$u(),y:$u()}),xm=new WeakMap;function lr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function hn(e){return typeof e=="string"||Array.isArray(e)}const oa=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ia=["initial",...oa];function cr(e){return lr(e.animate)||ia.some(t=>hn(e[t]))}function Hu(e){return!!(cr(e)||e.variants)}function Nm(e,t,n){for(const r in t){const s=t[r],o=n[r];if(be(s))e.addValue(r,s);else if(be(o))e.addValue(r,or(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,or(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ua={current:null},zu={current:!1},Sm=typeof window<"u";function Cm(){if(zu.current=!0,!!Sm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ua.current=e.matches;e.addEventListener("change",t),t()}else ua.current=!1}const Uu=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let dr={};function ju(e){dr=e}function Tm(){return dr}class Em{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,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=Xs,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 p=_e.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Fe.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=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=cr(n),this.isVariantNode=Hu(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:w,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in m){const b=m[p];d[p]!==void 0&&be(b)&&b.set(d[p])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,xm.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((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(zu.current||Cm(),this.shouldReduceMotion=ua.current),process.env.NODE_ENV!=="production"&&Ii(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,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Is(this.notifyUpdate),Is(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 r=this.features[n];r&&(r.unmount(),r.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&&bu.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:u,times:l,ease:d,duration:c}=n.accelerate,w=new hu({element:this.current,name:t,keyframes:u,times:l,ease:d,duration:Le(c)}),m=i(w);this.valueSubscriptions.set(t,()=>{m(),w.cancel()});return}const r=Lt.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Fe.preRender(this.notifyUpdate),r&&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,()=>{s(),o&&o()})}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 dr){const n=dr[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(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):qu()}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 r=0;r<Uu.length;r++){const s=Uu[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=Nm(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 r=this.values.get(t);n!==r&&(r&&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 r=this.values.get(t);return r===void 0&&n!==void 0&&(r=or(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(vi(r)||xi(r))?r=parseFloat(r):!vm(r)&&ze.test(n)&&(r=Pu(t,n)),this.setBaseTarget(t,be(r)?r.get():r)),be(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Qs(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!be(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ci),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){lm.render(this.render)}}class Gu extends Em{constructor(){super(...arguments),this.KeyframeResolver=im}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;be(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ft{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Im({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Mm(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function km(e,t){return Im(Mm(e.getBoundingClientRect(),t))}const Dm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Am=Ot.length;function _m(e,t,n){let r="",s=!0;for(let o=0;o<Am;o++){const i=Ot[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=Vu(u,sa[i]);if(!l){s=!1;const c=Dm[i]||i;r+=`${c}(${d}) `}n&&(t[i]=d)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function la(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,u=!1;for(const l in t){const d=t[l];if(Lt.has(l)){i=!0;continue}else if(qi(l)){s[l]=d;continue}else{const c=Vu(d,sa[l]);l.startsWith("origin")?(u=!0,o[l]=c):r[l]=c}}if(t.transform||(i||n?r.transform=_m(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:l="50%",originY:d="50%",originZ:c=0}=o;r.transformOrigin=`${l} ${d} ${c}`}}function Ku(e,{style:t,vars:n},r,s){const o=e.style;let i;for(i in t)o[i]=t[i];s==null||s.applyProjectionStyles(o,r);for(i in n)o.setProperty(i,n[i])}function Yu(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const mn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(L.test(e))e=parseFloat(e);else return e;const n=Yu(e,t.target.x),r=Yu(e,t.target.y);return`${n}% ${r}%`}},Pm={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=ze.parse(e);if(s.length>5)return r;const o=ze.createTransformer(e),i=typeof s[0]!="number"?1:0,u=n.x.scale*t.x,l=n.y.scale*t.y;s[0+i]/=u,s[1+i]/=l;const d=fn(u,l,.5);return typeof s[2+i]=="number"&&(s[2+i]/=d),typeof s[3+i]=="number"&&(s[3+i]/=d),o(s)}},Vm={borderRadius:{...mn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mn,borderTopRightRadius:mn,borderBottomLeftRadius:mn,borderBottomRightRadius:mn,boxShadow:Pm};function Xu(e,{layout:t,layoutId:n}){return Lt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Vm[e]||e==="opacity")}function ca(e,t,n){var i;const r=e.style,s=t==null?void 0:t.style,o={};if(!r)return o;for(const u in r)(be(r[u])||s&&be(s[u])||Xu(u,e)||((i=n==null?void 0:n.getValue(u))==null?void 0:i.liveStyle)!==void 0)&&(o[u]=r[u]);return o}function Om(e){return window.getComputedStyle(e)}class Lm extends Gu{constructor(){super(...arguments),this.type="html",this.renderInstance=Ku}readValueFromInstance(t,n){var r;if(Lt.has(n))return(r=this.projection)!=null&&r.isProjecting?Us(n):ih(t,n);{const s=Om(t),o=(qi(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return km(t,n)}build(t,n,r){la(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ca(t,n,r)}}const Fm={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wm={offset:"strokeDashoffset",array:"strokeDasharray"};function Bm(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?Fm:Wm;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const $m=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Zu(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...u},l,d,c){if(la(e,u,d),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:w,style:m}=e;w.transform&&(m.transform=w.transform,delete w.transform),(m.transform||w.transformOrigin)&&(m.transformOrigin=w.transformOrigin??"50% 50%",delete w.transformOrigin),m.transform&&(m.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete w.transformBox);for(const p of $m)w[p]!==void 0&&(m[p]=w[p],delete w[p]);t!==void 0&&(w.x=t),n!==void 0&&(w.y=n),r!==void 0&&(w.scale=r),s!==void 0&&Bm(w,s,o,i,!1)}const Ju=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"]),Qu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function qm(e,t,n,r){Ku(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Ju.has(s)?s:ea(s),t.attrs[s])}function Ru(e,t,n){const r=ca(e,t,n);for(const s in e)if(be(e[s])||be(t[s])){const o=Ot.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}class Hm extends Gu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=qu}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Lt.has(n)){const r=_u(n);return r&&r.default||0}return n=Ju.has(n)?n:ea(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ru(t,n,r)}build(t,n,r){Zu(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){qm(t,n,r,s)}mount(t){this.isSVGTag=Qu(t.tagName),super.mount(t)}}const zm=ia.length;function el(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?el(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<zm;n++){const r=ia[n],s=e.props[r];(hn(s)||s===!1)&&(t[r]=s)}return t}function tl(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Um=[...oa].reverse(),jm=oa.length;function Gm(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Jh(e,n,r)))}function Km(e){let t=Gm(e),n=nl(),r=!0,s=!1;const o=d=>(c,w)=>{var p;const m=mt(e,w,d==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(m){const{transition:b,transitionEnd:g,...y}=m;c={...c,...y,...g}}return c};function i(d){t=d(e)}function u(d){const{props:c}=e,w=el(e.parent)||{},m=[],p=new Set;let b={},g=1/0;for(let x=0;x<jm;x++){const v=Um[x],C=n[v],N=c[v]!==void 0?c[v]:w[v],S=hn(N),M=v===d?C.isActive:null;M===!1&&(g=x);let T=N===w[v]&&N!==c[v]&&S;if(T&&(r||s)&&e.manuallyAnimateOnMount&&(T=!1),C.protectedKeys={...b},!C.isActive&&M===null||!N&&!C.prevProp||lr(N)||typeof N=="boolean")continue;if(v==="exit"&&C.isActive&&M!==!0){C.prevResolvedValues&&(b={...b,...C.prevResolvedValues});continue}const I=Ym(C.prevProp,N);let D=I||v===d&&C.isActive&&!T&&S||x>g&&S,A=!1;const _=Array.isArray(N)?N:[N];let P=_.reduce(o(v),{});M===!1&&(P={});const{prevResolvedValues:W={}}=C,F={...W,...P},B=U=>{D=!0,p.has(U)&&(A=!0,p.delete(U)),C.needsAnimating[U]=!0;const V=e.getValue(U);V&&(V.liveStyle=!1)};for(const U in F){const V=P[U],q=W[U];if(b.hasOwnProperty(U))continue;let H=!1;Rs(V)&&Rs(q)?H=!tl(V,q)||I:H=V!==q,H?V!=null?B(U):p.add(U):V!==void 0&&p.has(U)?B(U):C.protectedKeys[U]=!0}C.prevProp=N,C.prevResolvedValues=P,C.isActive&&(b={...b,...P}),(r||s)&&e.blockInitialAnimation&&(D=!1);const $=T&&I;D&&(!$||A)&&m.push(..._.map(U=>{const V={type:v};if(typeof U=="string"&&(r||s)&&!$&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,H=mt(q,U);if(q.enteringChildren&&H){const{delayChildren:Q}=H.transition||{};V.delay=yu(q.enteringChildren,e,Q)}}return{animation:U,options:V}}))}if(p.size){const x={};if(typeof c.initial!="boolean"){const v=mt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(x.transition=v.transition)}p.forEach(v=>{const C=e.getBaseTarget(v),N=e.getValue(v);N&&(N.liveStyle=!0),x[v]=C??null}),m.push({animation:x})}let y=!!m.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,s=!1,y?t(m):Promise.resolve()}function l(d,c){var m;if(n[d].isActive===c)return Promise.resolve();(m=e.variantChildren)==null||m.forEach(p=>{var b;return(b=p.animationState)==null?void 0:b.setActive(d,c)}),n[d].isActive=c;const w=u(d);for(const p in n)n[p].protectedKeys={};return w}return{animateChanges:u,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=nl(),s=!0}}}function Ym(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!tl(t,e):!1}function gt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function nl(){return{animate:gt(!0),whileInView:gt(),whileHover:gt(),whileTap:gt(),whileDrag:gt(),whileFocus:gt(),exit:gt()}}function rl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Xm(e){return be(e)?e.get():e}const da=f.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function sl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zm(...e){return t=>{let n=!1;const r=e.map(s=>{const o=sl(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():sl(e[s],null)}}}}function Jm(...e){return E.useCallback(Zm(...e),e)}class Qm extends E.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(ir(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=ir(r)&&r.offsetWidth||0,o=ir(r)&&r.offsetHeight||0,i=getComputedStyle(n),u=this.props.sizeRef.current;u.height=parseFloat(i.height),u.width=parseFloat(i.width),u.top=n.offsetTop,u.left=n.offsetLeft,u.right=s-u.width-u.left,u.bottom=o-u.height-u.top,u.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function Rm({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:o}){var m;const i=f.useId(),u=f.useRef(null),l=f.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:d}=f.useContext(da),c=((m=e.props)==null?void 0:m.ref)??(e==null?void 0:e.ref),w=Jm(u,c);return f.useInsertionEffect(()=>{const{width:p,height:b,top:g,left:y,right:x,bottom:v,direction:C}=l.current;if(t||o===!1||!u.current||!p||!b)return;const N=C==="rtl",S=n==="left"?N?`right: ${x}`:`left: ${y}`:N?`left: ${y}`:`right: ${x}`,M=r==="bottom"?`bottom: ${v}`:`top: ${g}`;u.current.dataset.motionPopId=i;const T=document.createElement("style");d&&(T.nonce=d);const I=s??document.head;return I.appendChild(T),T.sheet&&T.sheet.insertRule(`
8
- [data-motion-pop-id="${i}"] {
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:(0,a.jsx)(De,{item:e,dir:t})})},n))})}),De=({item:e,dir:t})=>(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-gap-[5px]`,dir:t,children:[(0,a.jsx)(`div`,{className:`wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6`,children:(0,a.jsx)(`span`,{className:z(`wu-text-xl wu-text-gray-lead`,e.icon)})}),(0,a.jsx)(`p`,{className:`wu-text-sm wu-text-gray-lead`,children:e.title})]}),Oe=e=>{let[t,n]=(0,R.useState)(()=>window.innerWidth<=e);return(0,R.useEffect)(()=>{let t=()=>{n(window.innerWidth<=e)};return window.addEventListener(`resize`,t),()=>{window.removeEventListener(`resize`,t)}},[e]),t};function ke({productCategories:e,openCategory:t,setOpenCategory:n}){let r=(t,r)=>{let i=r[t];i&&(i.focus(),n(e[t]||null))},i=(e,t,n,i)=>{e.preventDefault(),r(n===`down`?t+1:t-1,i)},a=(e,n,i,a)=>{t?.products&&t.products[t.products.length-1].name===a&&(e.preventDefault(),r(n+1,i))},o=(r,i)=>{r.preventDefault(),n(e[i]===t?null:e[i])};return function(e,t,n){let r=document.querySelectorAll(`[data-product-category]`),{key:s}=e;switch(s){case`ArrowDown`:i(e,t,`down`,r);break;case`ArrowUp`:i(e,t,`up`,r);break;case`Tab`:a(e,t,r,n);break;case`Enter`:case` `:o(e,t);break;default:break}}}var Ae=e=>{let{size:t=`lg`,className:n,children:r,...i}=e,o={sm:`wu-text-body-3`,md:`wu-text-body-2`,lg:`wu-text-body-1`};return(0,a.jsx)(e.as||`div`,{...i,className:z(o[t],n),children:r})},je=e=>{let{size:t=`xl`,className:n,children:r,...i}=e,o={sm:`h4`,md:`h3`,lg:`h2`,xl:`h1`},s={sm:`wu-text-heading-4`,md:`wu-text-heading-3`,lg:`wu-text-heading-2`,xl:`wu-text-heading-1`},c=o[t];return(0,a.jsx)(c,{...i,className:z(s[t],n),children:r})},Me=e=>{let{size:t=`lg`,className:n,children:r,...i}=e,o={sm:`wu-text-sub-3`,md:`wu-text-sub-2`,lg:`wu-text-sub-1`};return(0,a.jsx)(e.as||`div`,{...i,className:z(o[t],n),children:r})},Ne=e=>{let{size:t=`lg`,className:n,children:r,...i}=e,o={md:`wu-text-display-2`,lg:`wu-text-display-1`};return(0,a.jsx)(e.as||`h1`,{...i,className:z(o[t],n),children:r})},Pe=e=>{let{icon:t,className:n,...r}=e;return(0,a.jsx)(`span`,{...r,className:z(t,n),role:`presentation`,"aria-label":t})},Fe=({buttonRef:e,handleDropdownToggle:t,handleKeyDown:n,isDropdownOpen:r,activeProductName:i,dir:o=`ltr`,homeLink:s=`/`})=>(0,a.jsxs)(`button`,{ref:e,type:`button`,className:z(`wu-text-base wu-font-normal wu-flex wu-items-center wu-justify-between wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger`,`rtl:wu-pr-2 wu-pl-2 rtl:wu-pl-1 wu-pr-1`),onClick:t,onKeyDown:e=>{r&&e.key===`ArrowDown`&&n(e,-1)},"aria-label":`product-switcher`,children:[(0,a.jsx)(`a`,{className:`wu-aspect-auto focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-logo`,tabIndex:-1,href:s,children:(0,a.jsx)(Pe,{icon:`wc-logo`,className:`wu-text-[23px] wu-leading-4 wu-relative wu-top-1 wu-right-[2px]`})}),(0,a.jsx)(`span`,{className:`wu-relative wu-bottom-[1.5px]`,children:i}),(0,a.jsx)(`span`,{className:z(`wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300 wu-relative wu-bottom-[1.5px]`,r&&`wu-rotate-180`,o===`rtl`?`wu-mr-auto wu-left-[2px]`:`wu-ml-auto wu-right-[2px]`)})]}),G={productDropdownMenu:`_productDropdownMenu_amyba_1`,productDropdownMenuOpen:`_productDropdownMenuOpen_amyba_38`,rtlDropdownMenu:`_rtlDropdownMenu_amyba_51`,productCategory:`_productCategory_amyba_55`,open:`_open_amyba_61`,productCategoryBorderTop:`_productCategoryBorderTop_amyba_66`,rightArrowIcon:`_rightArrowIcon_amyba_80`,productList:`_productList_amyba_93`,learnMoreItem:`_learnMoreItem_amyba_110`,rtlProductList:`_rtlProductList_amyba_114`,productListItem:`_productListItem_amyba_137`,productLink:`_productLink_amyba_162`,productIcon:`_productIcon_amyba_163`,activeProduct:`_activeProduct_amyba_164`,productListCategory:`_productListCategory_amyba_169`,topBorder:`_topBorder_amyba_169`,topBorderRtl:`_topBorderRtl_amyba_190`,productText:`_productText_amyba_214`},Ie=({category:e,dir:t=`ltr`,openCategory:n})=>{let r=e.active?`#c5cce0`:`#f0c36a`,i=n?.name===e.name,o=z(`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`,i&&`wu-hidden`,`wu-relative wu-top-[5px]`),s=z(`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`,i&&`wu-hidden`,`wu-relative wu-top-1`);return(0,a.jsxs)(`div`,{className:z(`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:[(0,a.jsx)(`div`,{className:G.productCategoryBorderTop,style:{backgroundColor:r}}),(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-px-1 wu-relative wu-top-1`,children:[(0,a.jsx)(`div`,{className:`wu-w-[56px] wu-h-[56px] wu-flex wu-items-center wu-justify-center`,children:(0,a.jsx)(`img`,{src:e.logo,alt:e.name,width:`32px`,height:`32px`})}),(0,a.jsx)(`span`,{className:`wu-text-sm wu-leading-5 wu-text-blue-q wu-relative wu-top-[1px]`,children:e.name})]}),e.active?(0,a.jsx)(`span`,{className:o}):(0,a.jsx)(`span`,{className:s})]})},Le={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`},Re=({product:e,currentProduct:t,activeProductName:n,dir:r,focusItem:i,setFocusItem:o})=>{let[s,c]=(0,R.useState)(e.name===t),l=e.name===n,u=e.name===t,d=!e.active,f=z(`wu-font-normal wu-text-xs wu-text-gray-lead wu-text-center`,u&&`wu-text-blue-q wu-font-normal`,!e.active&&`wu-text-gray-subtle`,s&&`wu-font-normal`,e.active&&s&&`wu-text-blue-q`),p=z(`wu-text-blue-p wu-text-base`,u&&`wu-text-blue-q`,!e.active&&`wu-text-gray-subtle`,e.active&&s&&`wu-text-blue-q`),m=s||i===e.name||l?`#1b3380`:`#c5cce0`;return(0,a.jsxs)(`li`,{className:z(G.productListItem,`focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item`,(l||s)&&G.activeProduct,e.name.length>15&&window.innerWidth>768&&`wu-w-[130px] wu-min-w-[130px]`,i===e.name&&G.activeProduct,`wu-product-item`),onMouseOver:()=>c(!0),onMouseOut:()=>c(!1),"aria-label":e.name,"aria-disabled":d,dir:r,onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault();let t=e.currentTarget.querySelector(`a`);t&&t.click()}},onFocus:()=>{o(e.name)},onBlur:()=>o(``),children:[(0,a.jsx)(`div`,{className:z(G.topBorder,r===`rtl`&&G.topBorderRtl),style:{backgroundColor:d?`#ffcf70`:m}}),(0,a.jsxs)(`a`,{className:z(G.productLink,`focus:wu-outline-none focus-visible:wu-outline-none`),href:e.link||`#`,tabIndex:0,children:[(0,a.jsx)(`span`,{className:z(p,Le[e.icon||``]),"aria-hidden":!0}),(0,a.jsx)(`span`,{className:z(f),children:e.name})]})]},e.name)},ze=({category:e,currentProduct:t,activeProductName:n,dir:r=`ltr`,focusItem:i,setFocusItem:o,borderColorLocked:s=`#f5a300`})=>{let{products:c=[],active:l}=e,u=(0,R.useMemo)(()=>c.filter(e=>e.active).sort((e,t)=>(e.order||100)-(t.order||100)),[c]),d=(0,R.useMemo)(()=>c.filter(e=>!e.active),[c]),[f,p]=(0,R.useState)(s),m=e=>e.map((e,s)=>(0,a.jsx)(Re,{product:e,currentProduct:t,activeProductName:n,dir:r,focusItem:i,setFocusItem:o},s));return l?(0,a.jsxs)(a.Fragment,{children:[m(u),d.length>0&&(0,a.jsxs)(`li`,{className:z(G.productListItem,`focus:wu-outline-none focus-visible:wu-outline-none !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee] wu-group`),onMouseOver:()=>p(`#f5a300`),onMouseOut:()=>p(s),"aria-label":`Upgrade to unlock`,children:[(0,a.jsx)(`div`,{className:z(G.topBorder,r===`rtl`&&G.topBorderRtl),style:{backgroundColor:f},"aria-label":`top-border`}),(0,a.jsxs)(`a`,{href:`https://www.questionpro.com/a/showUpgradeUser.do`,className:z(G.productLink,`wu-flex wu-flex-col wu-items-center wu-justify-center wu-py-2 wu-min-w-[88px]`),children:[(0,a.jsx)(`span`,{className:`wu-text-base wu-transition-colors wm-lock !wu-text-orange-soft group-hover:wu-text-orange-deep`}),(0,a.jsxs)(`span`,{className:`wu-text-[10px] wu-leading-[10px] wu-text-center wu-pt-1 !wu-text-orange-deep`,children:[`Upgrade to `,(0,a.jsx)(`br`,{}),` unlock`]})]})]}),m(d)]}):(0,a.jsxs)(`li`,{className:z(G.productListItem,G.learnMore,`focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]`,i===`learn`&&`activeProduct`),tabIndex:0,onFocus:()=>o(`learn`),onBlur:()=>o(``),"aria-label":`Learn More`,children:[(0,a.jsx)(`div`,{className:z(G.topBorder,r===`rtl`&&G.topBorderRtl),style:{backgroundColor:s}}),(0,a.jsx)(`a`,{className:G.productLink,href:`https://www.questionpro.com/a/showUpgradeUser.do`,tabIndex:-1,children:(0,a.jsx)(`span`,{className:`wu-text-[#f99e03]`,children:`Learn More`})})]})},Be=({dropdownRef:e,dir:t,isDropdownOpen:n,productCategories:r,openCategory:i,setOpenCategory:o,handleKeyDown:s,expandAll:c,activeProductName:l,focusItem:u,setFocusItem:d})=>{let[f,p]=(0,R.useState)(window.innerWidth>768);return(0,R.useEffect)(()=>{let e=()=>{p(window.innerWidth>768)};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,a.jsx)(`ul`,{className:z(G.productDropdownMenu,n&&G.productDropdownMenuOpen,t===`rtl`&&G.rtlDropdownMenu,`wu-switcher-container`),ref:e,dir:t,"aria-label":`product-dropdown-menu`,"data-state":n?`open`:`closed`,children:r.map((e,n)=>(0,a.jsxs)(`li`,{className:z(G.productCategory,`focus:wu-outline-none focus-visible:wu-outline-none wu-h-16 wu-category-item`,i===e&&G.open,c&&G.open),onMouseEnter:()=>f&&o(e),onMouseLeave:()=>f&&o(null),onClick:()=>{f||o(t=>t===e?null:e)},"aria-label":e.name,dir:t,onKeyDown:e=>s(e,n),tabIndex:0,"data-product-category":!0,children:[(0,a.jsx)(Ie,{category:e,dir:t,openCategory:i}),(0,a.jsx)(`ul`,{className:z(G.productList,t===`rtl`&&G.rtlProductList),dir:t,children:(0,a.jsx)(ze,{category:e,dir:t,activeProductName:l,currentProduct:e.name,focusItem:u,setFocusItem:d,borderColorLocked:`#ffcf70`})})]},e.name))})},Ve=({isProductButtonShow:e,isDropdownOpen:t,activeProductColor:n,activeProductBgColor:r,activeProductName:i,dir:o,smallScreenButtonRef:s,handleDropdownToggle:c,handleKeyDown:l})=>(0,a.jsx)(`div`,{className:z(`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:r},children:(0,a.jsxs)(`button`,{ref:s,type:`button`,className:z(`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:c,onKeyDown:e=>{t&&e.key===`ArrowDown`&&l(e,-1)},"aria-label":`small-screen-product-btn`,children:[i,(0,a.jsx)(`span`,{className:z(`wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300`,t&&`wu-rotate-180`)})]})}),He=({dir:e,isProductButtonShow:t,smallScreenToggleButtonRef:n,setIsProductButtonShow:r,setDropdownOpen:i})=>(0,a.jsxs)(`button`,{className:z(`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:()=>{r(e=>!e),t&&i(!1)},ref:n,"aria-label":`menu-toggle-btn`,children:[(0,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`}`}),(0,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`}`}),(0,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`}`})]}),Ue=({productCategories:e,activeProductName:t,activeProductColor:n={base:`#1b87e6`,hover:`#54A5EC`},dir:r,homeLink:i,expandAll:o})=>{let s=(0,R.useRef)(null),c=(0,R.useRef)(null),l=(0,R.useRef)(null),u=(0,R.useRef)(null),[d,f]=(0,R.useState)(!1),[p,m]=(0,R.useState)(null),[h,g]=(0,R.useState)(n.base),[_,v]=(0,R.useState)(``),[y,b]=(0,R.useState)(!1),x=Oe(768);he([c,s],()=>{f(!1),m(null)}),he([l,u,c],()=>{b(!1),f(!1),m(null)}),(0,R.useEffect)(()=>{let e=e=>{e.key===`Escape`&&f(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[d]),(0,R.useEffect)(()=>g(n.base),[n.base]);let S=e=>{e.preventDefault(),e.stopPropagation(),f(e=>{let t=!e;return t||m(null),t})},C=(t,n)=>{ke({productCategories:e,openCategory:p,setOpenCategory:m})(t,n,_)};return(0,a.jsx)(`div`,{className:z(`wu-inline-flex wu-items-center wu-justify-between wu-relative wu-z-auto wu-h-12 wu-text-white`),children:x?(0,a.jsxs)(`div`,{className:`wu-relative wu-flex`,children:[(0,a.jsx)(He,{dir:r,isProductButtonShow:y,smallScreenToggleButtonRef:u,setDropdownOpen:f,setIsProductButtonShow:b}),(0,a.jsx)(Ve,{isProductButtonShow:y,isDropdownOpen:d,activeProductColor:n,activeProductBgColor:h,activeProductName:t,handleDropdownToggle:S,smallScreenButtonRef:l,handleKeyDown:C,dir:r}),(0,a.jsx)(`div`,{className:z(`wu-absolute wu-top-[92px] wu-left-0 wu-text-[18px]`,r===`rtl`&&`wu-right-[256px] wu-left-auto`),children:(0,a.jsx)(Be,{activeProductName:t,focusItem:_,setFocusItem:v,handleKeyDown:C,isDropdownOpen:d,openCategory:p,productCategories:e,setOpenCategory:m,dropdownRef:c,expandAll:o,dir:r})})]}):(0,a.jsxs)(`div`,{className:`wu-relative wu-flex wu-items-center wu-justify-start wu-h-full wu-w-[256px]`,dir:r,style:{backgroundColor:d?n.hover:h},onMouseOver:()=>g(n.hover),onMouseOut:()=>g(n.base),children:[(0,a.jsx)(Fe,{activeProductName:t,dir:r,homeLink:i,buttonRef:s,handleDropdownToggle:S,handleKeyDown:C,isDropdownOpen:d}),(0,a.jsx)(Be,{activeProductName:t,focusItem:_,setFocusItem:v,handleKeyDown:C,isDropdownOpen:d,openCategory:p,productCategories:e,setOpenCategory:m,dropdownRef:c,expandAll:o,dir:r})]})})},We=({children:e,dir:t,className:n})=>(0,a.jsx)(`section`,{className:z(`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:(0,a.jsx)(`div`,{className:`wu-grow`,children:e})}),Ge=({className:e,placeholder:t=`Search surveys, folders or tools`,defaultCollapsed:n=!0,onSearch:r,...i})=>{let[o,s]=(0,R.useState)(n);return(0,R.useEffect)(()=>{s(n)},[n]),(0,a.jsxs)(`div`,{className:`wu-relative`,children:[(0,a.jsx)(Pe,{"data-testid":`search-icon`,icon:`wm-search`,className:z(`wu-absolute wu-top-1 wu-left-0.5`,`wu-text-gray-lead wu-cursor-pointer wu-text-[19px]`,o&&`wu-text-white`),onClick:()=>s(e=>!e)}),(0,a.jsx)(`input`,{placeholder:t,onChange:e=>r(e.target.value),className:z(`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`,`wu-h-8 wu-pl-8 wu-pr-4 wu-text-xs wu-text-gray-lead`,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`,...i})]})},Ke=s.Provider,qe=s.Root,Je=s.Trigger,Ye=R.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,a.jsx)(s.Content,{ref:r,sideOffset:t,className:z(`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}));Ye.displayName=s.Content.displayName;var Xe=R.default.forwardRef(({content:e,position:t,positionOffset:n,duration:r,children:i,className:o,showArrow:c=!1,open:l,onOpenChange:u,style:d,...f},p)=>(0,a.jsx)(Ke,{delayDuration:r||200,children:(0,a.jsxs)(qe,{open:l,onOpenChange:u,children:[(0,a.jsx)(Je,{asChild:!0,children:(0,a.jsx)(`span`,{ref:p,...f,children:i})}),(0,a.jsx)(s.Portal,{children:e&&(0,a.jsxs)(Ye,{side:t||`top`,sideOffset:n||0,className:z(`wu-max-w-sm wu-max-h-96 wu-overflow-y-auto`,o),style:d,children:[e,c&&(0,a.jsx)(s.Arrow,{className:`wu-fill-gray-notification wu-tooltip-arrow`})]})})]})}));Xe.displayName=`WuTooltip`;var Ze=({label:e,className:t})=>{let n=(0,R.useRef)(null),[r,i]=(0,R.useState)(!1);return(0,R.useEffect)(()=>{let t=n.current;if(t){let n=t.clientWidth,r=t.scrollWidth,a=r/e.length;i(e.length*a>n||r>n)}},[e]),(0,a.jsx)(`p`,{ref:n,className:z(`wu-w-full wu-truncate`,t),children:r?(0,a.jsx)(Xe,{content:e,positionOffset:8,children:e}):e})},Qe=e=>{let{productName:t,categories:n=[],user:r,children:i,onLogout:o,homeLink:s=window.location.origin,brandColor:c,dir:l=`ltr`,expandAll:u,DataCenter:d}=e;return(0,a.jsx)(`div`,{className:`wu-sticky wu-top-0 wu-z-50 wu-w-full`,children:(0,a.jsxs)(`header`,{className:z(`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:[ie(r?.profile?.subtitle)&&window.wickUiVersion&&(0,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]}),(0,a.jsx)(`section`,{className:`wu-flex wu-items-center wu-gap-2 wu-shrink-0`,children:(0,a.jsx)(Ue,{productCategories:n,activeProductName:t,activeProductColor:c,dir:l,homeLink:s,expandAll:u})}),(0,a.jsx)(We,{dir:l,children:i}),(0,a.jsxs)(`section`,{className:z(`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:[(0,a.jsx)(Ee,{dir:l}),r?.profile&&Object.keys(r.profile).length>0&&(0,a.jsx)(Te,{user:r,onLogout:o,dir:l,DataCenter:d})]})]})})},$e=l.Root,et=l.Trigger,tt=R.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,a.jsx)(l.Portal,{children:(0,a.jsx)(l.Content,{ref:i,align:t,sideOffset:n,className:z(`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),...r})}));tt.displayName=l.Content.displayName;var nt=(0,f.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-border wu-border-blue-p hover:wu-border-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-border-1 wu-border-orange-soft hover:wu-border-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-border-1 wu-border-red-deep hover:wu-border-red-soft`,`focus-visible:wu-outline-red-deep/50`]},variant:{primary:[`wu-text-white hover:wu-text-white`,`wu-border-0`],secondary:[`wu-bg-transparent hover:wu-bg-black hover:wu-bg-opacity-[0.04]`,`wu-border-0`],outline:[`wu-bg-white hover:wu-text-white`,`disabled:wu-bg-transparent disabled:wu-border-gray-subtle`],rounded:[`wu-text-white hover:wu-text-white`,`wu-border-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-border-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-border-0`,`disabled:wu-grayscale disabled:wu-opacity-80`]}},defaultVariants:{variant:`primary`,size:`md`,color:`primary`},compoundVariants:[]}),rt=R.forwardRef(({className:e,variant:t,size:n,color:r,asChild:i=!1,...o},s)=>(0,a.jsx)(i?d.Slot:`button`,{className:z(nt({size:n,color:r,variant:t,className:e})),ref:s,...o}));rt.displayName=`Button`;function it({className:e,classNames:t,dir:n=`ltr`,...r}){let i=(0,u.getDefaultClassNames)();return(0,a.jsx)(u.DayPicker,{showOutsideDays:r.showOutsideDays||!1,className:z(`wu-p-3`,e),classNames:{root:z(i.root,`wu-relative wu-rounded-none wu-bg-white dark:wu-bg-gray-switcher`),caption_label:z(`wu-text-xs`,r.captionLayout===`dropdown`?`wu-hidden`:``),month_caption:z(i.month_caption,`wu-mb-5`),months:z(i.months,`wu-flex wu-flex-col sm:wu-flex-row wu-gap-4`),dropdowns:z(i.dropdowns,`wu-flex wu-items-center wu-justify-start wu-gap-2`,(r.mode,``)),dropdown:z(i.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:z(i.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:z(i.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:z(i.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:z(i.selected,`wu-bg-blue-p [&:not(.rm)]:wu-text-white hover:wu-bg-blue-pHover`),range_middle:z(`rm`,i.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:z(i.range_end,`wu-rounded-none`),range_start:z(i.range_start,`wu-rounded-none wu-bg-blue-p hover:wu-bg-blue-pHover`),month_grid:z(i.month_grid,`[&>thead>tr>th]:wu-pb-2 wu-border-collapse wu-space-y-1`),button_next:z(i.button_next,nt({variant:`iconOnly`}),`wu-h-6 wu-w-6 wu-text-gray-lead`),button_previous:z(i.button_previous,nt({variant:`iconOnly`}),`wu-h-6 wu-w-6 wu-rotate-180 wu-text-gray-lead`),nav:z(i.nav,`wu-absolute wu-top-4 wu-right-3 wu-flex`,n===`rtl`&&`wu-right-auto wu-left-3 wu-flex-row-reverse`),chevron:z(i.chevron,`!wu-text-red-500`),outside:z(i.outside,`wu-invisible`),disabled:z(i.disabled,`hover:wu-bg-white wu-text-gray-subtle`),...t},components:{Chevron:()=>(0,a.jsx)(`span`,{className:`wm-chevron-right wu-text-lg wu-leading-5`})},...r})}it.displayName=`Calendar`;var at=e=>(0,a.jsx)(it,{...e}),ot=e=>{let{handleDateChange:t,disabled:n,onReset:r,showResetButton:i}=e;return(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-justify-end wu-gap-2 wu-mt-2 wu-date-picker-footer`,children:[i&&(0,a.jsx)(W,{variant:`secondary`,onClick:r,Icon:(0,a.jsx)(`span`,{className:`wu-text-[20px] wu-leading-5 -wu-mt-[1px] wm-refresh`}),className:`wu-date-picker-footer-reset`,children:`Reset`}),(0,a.jsx)(l.PopoverClose,{asChild:!0,children:(0,a.jsx)(W,{onClick:t,disabled:n,className:`wu-date-picker-apply`,children:`Apply`})})]})},st=({formattedString:e,dir:t,placeholder:n=`Select Date`,className:r,variant:i=`primary`,color:o,CustomTrigger:s,...c})=>(0,a.jsx)(l.PopoverTrigger,{asChild:!s,dir:t,children:s?(0,a.jsx)(a.Fragment,{children:s(e)}):(0,a.jsxs)(`button`,{type:`button`,className:z(`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`,`wu-flex wu-items-center wu-justify-between wu-px-2 wu-h-8`,i===`outlined`&&`wu-border wu-border-subtle wu-bg-transparent`,r),...c,children:[(0,a.jsx)(`span`,{children:e||n}),(0,a.jsx)(`span`,{className:`wm-calendar-month wu-text-sm`})]})}),ct=(e,t,n,r)=>{let i=(0,c.startOfDay)(e).getTime();return!!(t||n&&i<(0,c.startOfDay)(n).getTime()||r&&i>(0,c.startOfDay)(r).getTime())},lt=e=>e?typeof e==`string`?new Date(e):e:new Date,ut=`(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])-\\d{4}`,dt=[{label:`Last week`,value:7},{label:`Last month`,value:30},{label:`Last quarter`,value:90},{label:`Last year`,value:365}],ft=e=>{let{message:t,className:n,...r}=e;return(0,a.jsx)(`p`,{...r,className:z(`wu-text-sub-3 wu-break-words wu-font-light`,n),style:{color:`rgb(var(--wu-red-deep))`,...r.style},children:t})},pt=e=>{let{inputRef:t,maxLength:n=50,className:r,...i}=e,[o,s]=(0,R.useState)(!1);return(0,R.useEffect)(()=>{(t?.current?.value.length||0)>.75*n?s(!0):s(!1)},[t?.current?.value,n]),(0,a.jsx)(`p`,{...i,className:z(`wu-text-sub-3 wu-font-light`,r),style:{color:`rgb(var(--wu-gray-subtle))`,...i.style},children:o&&`${t?.current?.value.length}/${n}`})},mt=(0,f.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`),ht=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(p.Root,{ref:n,className:z(mt(),e),...t}));ht.displayName=p.Root.displayName;var K=e=>(0,a.jsx)(ht,{...e,className:z(`wu-text-gray-lead wu-leading-6`,e.className)}),gt=({Label:e,Error:t,Hint:n,Input:r,labelPosition:i=`top`,dir:o=`ltr`,className:s,...c})=>{let l=z(`wu-flex`,i===`top`?`wu-flex-col wu-gap-1`:`wu-flex-row wu-items-center wu-gap-2`,s),u=z(`wu-flex wu-flex-col wu-gap-1 wu-relative wu-flex-1 wu-form-group-wrapper`),d=z(`wu-absolute -wu-bottom-5`,o===`ltr`?`wu-right-0`:`wu-left-0`,`wu-form-group-hint`),f=z(`wu-absolute -wu-bottom-5`,o===`ltr`?`wu-left-0`:`wu-right-0`,`wu-form-group-error`);return(0,a.jsxs)(`div`,{className:l,dir:o,...c,children:[e,(0,a.jsxs)(`div`,{className:u,children:[r,n&&(0,a.jsx)(`div`,{className:d,children:n}),t&&(0,a.jsx)(`div`,{className:f,children:t})]})]})},_t=({formatString:e=`MMM dd, yyyy`,value:t,onChange:n,disabled:r,minDate:i=(0,c.sub)(new Date,{years:5}),maxDate:o=(0,c.add)(new Date,{years:1}),dir:s=`ltr`,Label:l,labelPosition:u=`top`,onReset:d,showResetButton:f=!1,placeholder:p=`Select Date`,CustomTrigger:m,align:h=`start`,sideOffset:g=-.5,side:_,alignOffset:v,...y})=>{let[b,x]=(0,R.useState)(),[S,C]=(0,R.useState)(``),w=(0,R.useCallback)(()=>{C((0,c.format)(lt(b),e)),n&&n(b)},[b,e,n]),T=(0,R.useCallback)(()=>{d?d():(x(void 0),C(``),n&&n(void 0))},[n,d]);return(0,R.useEffect)(()=>{let n=lt(t);x(n),C((0,c.format)(n,e))},[t,e]),(0,a.jsxs)(K,{className:z(`wu-flex wu-gap-1`,u===`left`?`wu-items-center`:`wu-flex-col wu-items-start`,`wu-date-picker-label`),dir:s,children:[l,(0,a.jsxs)($e,{children:[(0,a.jsx)(st,{formattedString:S,dir:s,placeholder:p,CustomTrigger:m,...y}),(0,a.jsx)(tt,{className:`wu-p-0 wu-w-fit wu-date-picker-content`,align:h,sideOffset:g,side:_,alignOffset:v,dir:s,children:(0,a.jsx)(at,{dir:s,mode:`single`,captionLayout:`dropdown`,selected:b,onSelect:x,disabled:e=>ct(e,r,i,o),startMonth:i,endMonth:o,required:!0,autoFocus:!0,defaultMonth:b,className:z(`wu-border wu-border-blue-p wu-date-picker`),footer:(0,a.jsx)(ot,{handleDateChange:w,disabled:r,onReset:T,showResetButton:f})})})]})]})},vt={...n},yt={};function bt(e,t){let r=n.useRef(yt);return r.current===yt&&(r.current=e(t)),r}var xt=vt.useInsertionEffect,St=xt&&xt!==vt.useLayoutEffect?xt:e=>e();function q(e){let t=bt(Ct).current;return t.next=e,St(t.effect),t.trampoline}function Ct(){let e={next:void 0,callback:wt,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function wt(){if(process.env.NODE_ENV!==`production`)throw Error(`Base UI: Cannot call an event handler while rendering.`)}function Tt(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var Et=Tt(`https://base-ui.com/production-error`,`Base UI`);function Dt(){}Object.freeze([]);var Ot=Object.freeze({}),kt=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}({}),At={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},jt={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Mt={disabled:!1,...jt},Nt={valid(e){return e===null?null:e?{[kt.valid]:``}:{[kt.invalid]:``}}},Pt={invalid:void 0,name:void 0,validityData:{state:At,errors:[],error:``,value:``,initialValue:null},setValidityData:Dt,disabled:void 0,touched:jt.touched,setTouched:Dt,dirty:jt.dirty,setDirty:Dt,filled:jt.filled,setFilled:Dt,focused:jt.focused,setFocused:Dt,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Mt,markedDirtyRef:{current:!1},registerFieldControl:Dt,validation:{getValidationProps:(e=Ot)=>e,getInputValidationProps:(e=Ot)=>e,inputRef:{current:null},commit:async()=>{}}},Ft=n.createContext(Pt);process.env.NODE_ENV!==`production`&&(Ft.displayName=`FieldRootContext`);function It(e=!0){let t=n.useContext(Ft);if(t.setValidityData===Dt&&!e)throw Error(process.env.NODE_ENV===`production`?Et(28):`Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.`);return t}var Lt=n.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Dt,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});process.env.NODE_ENV!==`production`&&(Lt.displayName=`FormContext`);function Rt(){return n.useContext(Lt)}function zt(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var Bt={};function Vt(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Ut(t);let a=Ut(e);return t&&(a=Wt(a,t)),n&&(a=Wt(a,n)),r&&(a=Wt(a,r)),i&&(a=Wt(a,i)),a}function Ht(e){if(e.length===0)return Bt;if(e.length===1)return Ut(e[0]);let t=Ut(e[0]);for(let n=1;n<e.length;n+=1)t=Wt(t,e[n]);return t}function Ut(e){return Jt(e)?{...Yt(e,Bt)}:Gt(e)}function Wt(e,t){return Jt(t)?Yt(t,e):Kt(e,t)}function Gt(e){let t={...e};for(let e in t){let n=t[e];qt(e,n)&&(t[e]=Zt(n))}return t}function Kt(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=zt(e.style,r);break;case`className`:e[n]=$t(e.className,r);break;default:qt(n,r)?e[n]=Xt(e[n],r):e[n]=r}}return e}function qt(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function Jt(e){return typeof e==`function`}function Yt(e,t){return Jt(e)?e(t):e??Bt}function Xt(e,t){return t?e?(...n)=>{let r=n[0];if(en(r)){let i=r;Qt(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Zt(t):e}function Zt(e){return e&&((...t)=>{let n=t[0];return en(n)&&Qt(n),e(...t)})}function Qt(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function $t(e,t){return t?e?t+` `+e:t:e}function en(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}var tn=0;function nn(e,t=`mui`){let[r,i]=n.useState(e),a=e||r;return n.useEffect(()=>{r??(tn+=1,i(`${t}-${tn}`))},[r,t]),a}var rn=vt.useId;function an(e,t){if(rn!==void 0){let n=rn();return e??(t?`${t}-${n}`:n)}return nn(e,t)}function on(e){return an(e,`base-ui`)}var sn=n.createContext({controlId:void 0,registerControlId:Dt,labelId:void 0,setLabelId:Dt,messageIds:[],setMessageIds:Dt,getDescriptionProps:e=>e});process.env.NODE_ENV!==`production`&&(sn.displayName=`LabelableContext`);function cn(){return n.useContext(sn)}var J=typeof document<`u`?n.useLayoutEffect:()=>{};function ln(){return typeof window<`u`}function un(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function dn(e){return ln()?e instanceof Element||e instanceof un(e).Element:!1}function fn(e){return ln()?e instanceof HTMLElement||e instanceof un(e).HTMLElement:!1}function pn(e={}){let{id:t,implicit:r=!1,controlRef:i}=e,{controlId:a,registerControlId:o}=cn(),s=on(t),c=r?a:void 0,l=bt(()=>Symbol(`labelable-control`)),u=n.useRef(!1),d=n.useRef(t!=null),f=q(()=>{!u.current||o===Dt||(u.current=!1,o(l.current,void 0))});return J(()=>{if(o===Dt)return;let e;if(r){let n=i?.current;e=dn(n)&&n.closest(`label`)!=null?t??null:c??s}else if(t!=null)d.current=!0,e=t;else if(d.current)e=s;else{f();return}if(e===void 0){f();return}u.current=!0,o(l.current,e)},[t,i,c,o,r,s,l,f]),n.useEffect(()=>f,[f]),a??s}function mn(e){return e?.ownerDocument||document}var hn=typeof navigator<`u`,gn=bn(),_n=Sn(),vn=xn();typeof CSS>`u`||!CSS.supports||CSS.supports(`-webkit-backdrop-filter:none`);var yn=gn.platform===`MacIntel`&&gn.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(gn.platform);hn&&/firefox/i.test(vn),hn&&/apple/i.test(navigator.vendor),hn&&/Edg/i.test(vn),hn&&/android/i.test(_n)||/android/i.test(vn),hn&&_n.toLowerCase().startsWith(`mac`)&&navigator.maxTouchPoints,vn.includes(`jsdom/`);function bn(){if(!hn)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function xn(){if(!hn)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function Sn(){if(!hn)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}function Cn(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function wn(e){e.preventDefault(),e.stopPropagation()}function Tn(e,t,n,r){let i=bt(Dn).current;return On(i,e,t,n,r)&&An(i,[e,t,n,r]),i.callback}function En(e){let t=bt(Dn).current;return kn(t,e)&&An(t,e),t.callback}function Dn(){return{callback:null,cleanup:null,refs:[]}}function On(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function kn(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function An(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var jn=parseInt(n.version,10);function Mn(e){return jn>=e}function Nn(e){if(!n.isValidElement(e))return null;let t=e,r=t.props;return(Mn(19)?r?.ref:t.ref)??null}var Pn;process.env.NODE_ENV!==`production`&&(Pn=new Set);function Fn(...e){if(process.env.NODE_ENV!==`production`){let t=e.join(` `);Pn.has(t)||(Pn.add(t),console.warn(`Base UI: ${t}`))}}function In(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Ln(e,t){return typeof e==`function`?e(t):e}function Rn(e,t){return typeof e==`function`?e(t):e}function zn(e,t,n={}){let r=t.render,i=Bn(t,n);return n.enabled===!1?null:Gn(e,r,i,n.state??Ot)}function Bn(e,t={}){let{className:n,style:r,render:i}=e,{state:a=Ot,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Ln(n,a):void 0,d=l?Rn(r,a):void 0,f=l?In(a,c):Ot,p=l&&s?Vn(s):void 0,m=l?zt(f,p)??{}:Ot;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=En([m.ref,Nn(i),...o]):m.ref=Tn(m.ref,Nn(i),o):Tn(null,null)),l?(u!==void 0&&(m.className=$t(m.className,u)),d!==void 0&&(m.style=zt(m.style,d)),m):Ot}function Vn(e){return Array.isArray(e)?Ht(e):Vt(void 0,e)}var Hn=Symbol.for(`react.lazy`),Un=/^[A-Z][A-Za-z0-9$]*$/,Wn=/[a-z]/;function Gn(e,t,r,i){if(t){if(typeof t==`function`)return process.env.NODE_ENV!==`production`&&Kn(t),t(r,i);let e=Vt(r,t.props);e.ref=r.ref;let a=t;if(a?.$$typeof===Hn&&(a=n.Children.toArray(t)[0]),process.env.NODE_ENV!==`production`&&!n.isValidElement(a))throw 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(`
5
+ `));return n.cloneElement(a,e)}if(e&&typeof e==`string`)return qn(e,r);throw Error(process.env.NODE_ENV===`production`?Et(8):`Base UI: Render element or function are not defined.`)}function Kn(e){let t=e.name;t.length!==0&&Un.test(t)&&Wn.test(t)&&Fn(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.",`If this is an intentional render callback, rename it to start with a lowercase letter.`,"Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.",`https://base-ui.com/r/invalid-render-prop`)}function qn(e,t){return e===`button`?(0,n.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,n.createElement)(`img`,{alt:``,...t,key:t.key}):n.createElement(e,t)}var Jn=[];function Yn(e){n.useEffect(e,Jn)}var Xn=0,Zn=class e{static create(){return new e}currentId=Xn;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Xn,t()},e)}isStarted(){return this.currentId!==Xn}clear=()=>{this.currentId!==Xn&&(clearTimeout(this.currentId),this.currentId=Xn)};disposeEffect=()=>this.clear};function Qn(){let e=bt(Zn.create).current;return Yn(e.disposeEffect),e}var $n;process.env.NODE_ENV!==`production`&&($n=new Set);function er(...e){if(process.env.NODE_ENV!==`production`){let t=e.join(` `);$n.has(t)||($n.add(t),console.error(`Base UI: ${t}`))}}var tr=null,nr=globalThis.requestAnimationFrame,rr=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;let n=process.env.NODE_ENV!==`production`&&nr!==requestAnimationFrame&&(nr=requestAnimationFrame,!0);return(!this.isScheduled||n)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},ir=class e{static create(){return new e}static request(e){return rr.request(e)}static cancel(e){return rr.cancel(e)}currentId=tr;request(e){this.cancel(),this.currentId=rr.request(()=>{this.currentId=tr,e()})}cancel=()=>{this.currentId!==tr&&(rr.cancel(this.currentId),this.currentId=tr)};disposeEffect=()=>this.cancel};function ar(){let e=bt(ir.create).current;return Yn(e.disposeEffect),e}function or(e){return e==null?e:`current`in e?e.current:e}var sr=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),cr={[sr.startingStyle]:``},lr={[sr.endingStyle]:``},ur={transitionStatus(e){return e===`starting`?cr:e===`ending`?lr:null}};function dr(e,t=!1,n=!0){let r=ar();return q((i,a=null)=>{r.cancel();let o=or(e);if(o==null)return;let s=o,c=()=>{m.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=sr.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function fr(e){let{enabled:t=!0,open:r,ref:i,onComplete:a}=e,o=q(a),s=dr(i,r,!1);n.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,r,o,s])}function pr(e,t=!1,r=!1){let[i,a]=n.useState(e&&t?`idle`:void 0),[o,s]=n.useState(e);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!r&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),J(()=>{if(!e&&o&&i!==`ending`&&r){let e=ir.request(()=>{a(`ending`)});return()=>{ir.cancel(e)}}},[e,o,i,r]),J(()=>{if(!e||t)return;let n=ir.request(()=>{a(void 0)});return()=>{ir.cancel(n)}},[t,e]),J(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=ir.request(()=>{a(`idle`)});return()=>{ir.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function mr({controlled:e,default:t,name:r,state:i=`value`}){let{current:a}=n.useRef(e!==void 0),[o,s]=n.useState(t),c=a?e:o;if(process.env.NODE_ENV!==`production`){n.useEffect(()=>{a!==(e!==void 0)&&er([`A component is changing the ${a?``:`un`}controlled ${i} state of ${r} to be ${a?`un`:``}controlled.`,`Elements should not switch from uncontrolled to controlled (or vice versa).`,`Decide between using a controlled or uncontrolled ${r} 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(`
6
+ `))},[i,r,e]);let{current:o}=n.useRef(t);n.useEffect(()=>{!a&&hr(o)!==hr(t)&&er([`A component is changing the default ${i} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
7
+ `))},[t])}return[c,n.useCallback(e=>{a||s(e)},[])]}function hr(e){let t=0,n=new WeakMap;try{return JSON.stringify(e,function(e,r){if(!(e===`_owner`&&this!=null&&typeof this==`object`&&`$$typeof`in this)){if(typeof r==`bigint`)return`__bigint__:${r}`;if(typeof r==`object`&&r){let e=n.get(r);if(e!==void 0)return`__object__:${e}`;n.set(r,t),t+=1}return r}})??`__top__:${typeof e}`}catch{return`__unserializable__`}}function gr(e,t,r,i,a=!0){let{registerFieldControl:o}=It(),s=n.useRef(null);s.current||=Symbol(),J(()=>{let n=s.current;if(!(!n||!a))return o(n,{controlRef:e,getValue:i,id:t,value:r}),()=>{o(n,void 0)}},[e,a,i,t,o,r])}var _r=`none`,vr=`trigger-press`,yr=`increment-press`,br=`decrement-press`,xr=`input-change`,Sr=`input-clear`,Cr=`input-blur`,wr=`input-paste`,Tr=`keyboard`;function Er(e,t,n,r){let i=!1,a=!1,o=r??Ot;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function Dr(e,t,n){let r=n??Ot;return{reason:e,event:t??new Event(`base-ui`),...r}}var Or=n.forwardRef(function(e,t){let{render:r,className:i,id:a,name:o,value:s,disabled:c=!1,onValueChange:l,defaultValue:u,autoFocus:d=!1,style:f,...p}=e,{state:m,name:h,disabled:g,setTouched:_,setDirty:v,validityData:y,setFocused:b,setFilled:x,validationMode:S,validation:C}=It(),w=g||c,T=h??o,E={...m,disabled:w},{labelId:D}=cn(),O=pn({id:a});J(()=>{let e=s!=null;C.inputRef.current?.value||e&&s!==``?x(!0):e&&s===``&&x(!1)},[C.inputRef,x,s]);let k=n.useRef(null);J(()=>{d&&k.current===Cn(mn(k.current))&&b(!0)},[d,b]);let[A]=mr({controlled:s,default:u,name:`FieldControl`,state:`value`}),j=s!==void 0,M=j?A:void 0,N=q(()=>C.inputRef.current?.value);return gr(C.inputRef,O,M,N),zn(`input`,e,{ref:[t,k],state:E,props:[{id:O,disabled:w,name:T,ref:C.inputRef,"aria-labelledby":D,autoFocus:d,...j?{value:M}:{defaultValue:u},onChange(e){let t=e.currentTarget.value;l?.(t,Er(_r,e.nativeEvent)),v(t!==y.initialValue),x(t!==``)},onFocus(){b(!0)},onBlur(e){_(!0),b(!1),S===`onBlur`&&C.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(_(!0),C.commit(e.currentTarget.value))}},C.getInputValidationProps(),p],stateAttributesMapping:Nt})});process.env.NODE_ENV!==`production`&&(Or.displayName=`FieldControl`);var kr=n.forwardRef(function(e,t){return(0,a.jsx)(Or,{ref:t,...e})});process.env.NODE_ENV!==`production`&&(kr.displayName=`Input`);var Ar={wuInputGroup:`_wuInputGroup_1t4ep_1`,wuInputIcon:`_wuInputIcon_1t4ep_20`,wuInput:`_wuInput_1t4ep_1`,passwordToggle:`_passwordToggle_1t4ep_89`},jr=R.default.memo(({showPassword:e,onToggle:t,disabled:n,readOnly:r})=>{let i=R.default.useCallback(e=>{if(n||r){e.preventDefault(),e.stopPropagation();return}t()},[n,r,t]),o=n||r;return(0,a.jsx)(`button`,{type:`button`,"data-slot":`wu-input-password-toggle`,className:Ar.passwordToggle,onClick:i,disabled:o,"aria-disabled":o||void 0,"aria-label":e?`Hide password`:`Show password`,children:(0,a.jsx)(Pe,{icon:e?`wm-visibility`:`wm-visibility-off`})})});jr.displayName=`PasswordToggle`;var Mr=R.default.memo(R.default.forwardRef(({className:e,Label:t,labelPosition:n=`top`,Icon:r,iconPosition:i=`left`,variant:o=`flat`,type:s,readonly:c,invalid:l,id:u,...d},f)=>{let p=R.default.useId(),m=u||p;if(s===`submit`)return(0,a.jsx)(W,{className:e,id:m,"aria-label":d[`aria-label`],type:`submit`,"data-slot":`wu-input-submit`,disabled:d.disabled,children:t||`Submit`});let[h,g]=(0,R.useState)(!1),_=(0,R.useCallback)(()=>{g(e=>!e)},[]),{finalIcon:v,finalIconPosition:y}=(0,R.useMemo)(()=>s===`password`?{finalIcon:(0,a.jsx)(jr,{showPassword:h,onToggle:_,readOnly:c,disabled:d.disabled}),finalIconPosition:`right`}:{finalIcon:r,finalIconPosition:i},[s,r,i,h,_]),b=(0,R.useMemo)(()=>s===`password`&&h?`text`:s,[s,h]),x=(0,R.useMemo)(()=>z(Ar.wuInput,`wu-peer`,e),[e]);return(0,a.jsxs)(`div`,{"data-slot":`wu-input-group`,role:`group`,className:Ar.wuInputGroup,"data-label-position":n,"data-icon-position":v&&y,children:[v&&(0,a.jsx)(`span`,{className:Ar.wuInputIcon,children:v}),(0,a.jsx)(kr,{ref:f,className:x,"data-variant":o,type:b,readOnly:c,"aria-invalid":l,id:m,...d}),t&&(0,a.jsx)(K,{htmlFor:m,children:t})]})}));Mr.displayName=`WuInput`;var Nr=`MM-dd-yyyy`,Pr=[{label:`Day`,value:1},{label:`Week`,value:7},{label:`Month`,value:30},{label:`Quarter`,value:90},{label:`Year`,value:365}],Fr=({current:e,onSelect:t,presetRanges:n=dt})=>{let[r,i]=(0,R.useState)(),[o,s]=(0,R.useState)(!1),[l,u]=(0,R.useState)(``),[d,f]=(0,R.useState)(``),[p,m]=(0,R.useState)(!1),h=(0,R.useMemo)(()=>n.map(e=>e.value),[n]),g=z(`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`),_=(0,R.useCallback)(e=>{if(e===void 0){i(void 0),s(!0);return}let n=Number(e)-1;i(n),s(!1),t({from:(0,c.sub)(new Date,{days:n}),to:new Date})},[t]),v=(0,R.useCallback)((t,n)=>{if(!t||!e?.to||!e?.from||!RegExp(`(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])-\\d{4}`).test(t))return!1;let r=n===`start`?(0,c.parse)(t,Nr,new Date):new Date(e.from),i=n===`end`?(0,c.parse)(t,Nr,new Date):new Date(e.to);return(0,c.isBefore)(i,r)?(m(!0),!1):(m(!1),!((0,c.isSameDay)(r,e.from)&&(0,c.isSameDay)(i,e.to)))},[e]),y=(0,R.useCallback)((n,r)=>{if((r===`start`?u:f)(n),v(n,r)){let i={from:e?.from,to:e?.to};r===`start`&&(i.from=(0,c.parse)(n,Nr,new Date)),r===`end`&&(i.to=(0,c.parse)(n,Nr,new Date)),t(i)}},[e,t,v]);return(0,R.useEffect)(()=>{if(e?.to&&e?.from&&(0,c.isValid)(e.to)&&(0,c.isValid)(e.from)){u((0,c.format)(e.from,Nr)),f((0,c.format)(e.to,Nr));let t=(0,c.differenceInCalendarDays)(e.to,e.from);(0,c.isToday)(e.to)&&h.includes(t+1)?(i(t),s(!1)):(i(void 0),s(!0))}},[e,h]),(0,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:[(0,a.jsx)(`ul`,{className:`wu-flex wu-gap-1 wu-py-2 wu-date-picker-batch-list wu-hidden`,children:Pr.map(({label:e,value:t})=>(0,a.jsx)(rt,{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:e},t))}),(0,a.jsxs)(`ul`,{className:`wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges`,children:[n.map(({label:e,value:t})=>(0,a.jsx)(`li`,{children:(0,a.jsx)(`button`,{className:z(g,r===t-1&&`wu-bg-blue-p/10`),onClick:()=>_(t),children:e})},t)),(0,a.jsx)(`li`,{children:(0,a.jsx)(`button`,{className:z(g,o&&`wu-bg-blue-p/10`),onClick:()=>_(),children:`Custom Range`})})]}),(0,a.jsxs)(`div`,{className:`wu-relative wu-flex wu-gap-3 wu-pt-2 wu-date-picker-range-footer`,children:[(0,a.jsx)(Mr,{placeholder:`Start Date`,pattern:ut,value:l,onChange:e=>y(e.target.value,`start`),"aria-label":`Start Date`}),(0,a.jsx)(Mr,{placeholder:`End Date`,pattern:ut,value:d,onChange:e=>y(e.target.value,`end`),"aria-label":`End Date`}),p?(0,a.jsx)(`small`,{className:`wu-absolute wu-text-[10px] wu-leading-[14px] wu-text-red-deep wu-left-0 -wu-bottom-5 wu-text-start`,children:`End date must be after start date`}):(0,a.jsx)(`small`,{className:`wu-absolute wu-right-0 wu-leading-[14px] -wu-bottom-4 wu-text-gray-subtle wu-text-end`,children:`mm-dd-yyyy`})]})]})},Ir=({Trigger:e,children:t,className:n,dir:r,open:i,onOpenChange:o,modal:s,...c})=>(0,a.jsxs)($e,{open:i,onOpenChange:o,modal:s,children:[(0,a.jsx)(et,{asChild:!0,dir:r,children:e}),(0,a.jsx)(tt,{className:z(`wu-w-80 wu-p-0 wu-border-blue-p wu-bg-white wu-dark:border-gray-switcher`,n),dir:r,...c,children:t})]}),Lr=e=>(0,a.jsx)(l.PopoverClose,{asChild:!0,children:(0,a.jsx)(W,{...e})}),Rr={wuDateRangeNativeSidebar:`_wuDateRangeNativeSidebar_1oiuh_1`,customInputs:`_customInputs_1oiuh_26`,inputsRow:`_inputsRow_1oiuh_42`,errorWrapper:`_errorWrapper_1oiuh_63`,errorText:`_errorText_1oiuh_67`},zr=[{label:`Last week`,value:7},{label:`Last month`,value:30},{label:`Last quarter`,value:90},{label:`Last year`,value:365}],Y=e=>{if(!e)return``;try{let t=new Date(e);return(0,c.isValid)(t)?`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`:``}catch{return``}},Br=e=>{if(!e)return null;try{let t=(0,c.parseISO)(e);return(0,c.isValid)(t)?(0,c.startOfDay)(t):null}catch{return null}},Vr=(e,t,n)=>!(t&&e<(0,c.startOfDay)(t)||n&&e>(0,c.startOfDay)(n)),Hr=e=>(0,c.sub)(new Date,{days:e}),Ur=e=>e?(0,c.sub)(new Date,{days:1}):new Date;function Wr({ranges:e=zr,excludeToday:t=!0,current:n,onSelect:r,onReset:i,onApply:o,showResetButton:s=!0,maxDate:l,minDate:u,...d}){let[f,p]=R.default.useState(Y(n?.from)||Y(u)),[m,h]=R.default.useState(Y(n?.to)||Y(l)),[g,_]=R.default.useState(!1),[v,y]=R.default.useState(``),[b,x]=R.default.useState(``);R.default.useEffect(()=>{p(Y(n?.from)||Y(u)),h(Y(n?.to)||Y(l)),y(``),x(``)},[n?.from,n?.to,u,l]);let S=R.default.useMemo(()=>{if(!n?.from||!n?.to)return null;let t=(0,c.differenceInCalendarDays)(n.to,n.from)+1;return e.find(e=>e.value===t)??null},[n?.from,n?.to,e]),C=R.default.useCallback(e=>{let n=Hr(e),i=Ur(t);p(Y(n)),h(Y(i)),y(``),x(``),_(!1),r?.({from:n,to:i})},[t,r]),w=R.default.useCallback((e,t)=>{let n=Br(e);if(t===`start`?(p(e),y(``)):(h(e),x(``)),!n){if(e){let e=`Please enter a valid date`;t===`start`?y(e):x(e)}return}if(!Vr(n,u,l)){let e=u&&n<(0,c.startOfDay)(u)?`Date must be on or after ${(0,c.format)(u,`MMM d, yyyy`)}`:`Date must be on or before ${(0,c.format)(l,`MMM d, yyyy`)}`;t===`start`?y(e):x(e);return}let i=Br(t===`start`?m:f);t===`start`&&i?n<=i?r?.({from:n,to:i}):y(`Start date must be before or equal to end date`):t===`end`&&i&&(n>=i?r?.({from:i,to:n}):x(`End date must be after or equal to start date`))},[f,m,r,u,l]),T=R.default.useMemo(()=>e.map(e=>{let n=Hr(e.value),r=Ur(t);return{...e,displayStartDate:(0,c.format)(n,`MMM d, yyyy`),displayEndDate:(0,c.format)(r,`MMM d, yyyy`)}}),[e,t]),E=g||n?.from&&n?.to&&!S;return(0,a.jsxs)(`div`,{className:Rr.wuDateRangeNativeSidebar,...d,children:[(0,a.jsxs)(`ul`,{children:[(0,a.jsx)(`li`,{children:(0,a.jsx)(`button`,{onClick:()=>_(!0),"data-selected":E,"aria-pressed":E,"aria-label":`Select custom date range`,children:`Custom Range`})}),(0,a.jsxs)(`li`,{className:Rr.customInputs,"data-expanded":E,children:[(0,a.jsxs)(`div`,{className:Rr.inputsRow,children:[(0,a.jsx)(Mr,{type:`date`,value:f,onChange:e=>w(e.target.value,`start`),Label:`Start`,min:Y(u),max:Y(l),"aria-describedby":v?`start-date-error`:void 0}),(0,a.jsx)(Mr,{type:`date`,value:m,onChange:e=>w(e.target.value,`end`),Label:`End`,min:f||Y(u),max:Y(l),"aria-describedby":b?`end-date-error`:void 0})]}),(v||b)&&(0,a.jsxs)(`div`,{className:Rr.errorWrapper,role:`alert`,"aria-live":`polite`,children:[v&&(0,a.jsx)(`p`,{id:`start-date-error`,className:Rr.errorText,children:v}),b&&(0,a.jsx)(`p`,{id:`end-date-error`,className:Rr.errorText,children:b})]})]}),T.map(e=>(0,a.jsx)(`li`,{children:(0,a.jsx)(`button`,{onClick:()=>C(e.value),"data-selected":!E&&S?.value===e.value,"aria-pressed":!E&&S?.value===e.value,"aria-label":`Select ${e.label}`,children:e.label})},e.value))]}),(0,a.jsxs)(`footer`,{children:[s&&(0,a.jsx)(Lr,{variant:`secondary`,Icon:(0,a.jsx)(Pe,{icon:`wm-refresh`}),onClick:i,children:`Reset`}),(0,a.jsx)(Lr,{onClick:o,disabled:!!(v||b),children:`Apply`})]})]})}var Gr=({formatString:e=`MMM dd, yyyy`,value:t,onChange:n,disabled:r,minDate:i=(0,c.sub)(new Date,{years:5}),maxDate:o=(0,c.add)(new Date,{years:1}),dir:s=`ltr`,minDateToSelect:l,maxDateToSelect:u,presetRanges:d,Label:f,labelPosition:p=`top`,onReset:m,showResetButton:h=!0,placeholder:g=`Select Date Range`,CustomTrigger:_,native:v,align:y=`start`,alignOffset:b,side:x,sideOffset:S=-.5,...C})=>{let[w,T]=R.default.useState(t),[E,D]=R.default.useState(t),[O,k]=R.default.useState(``),A=R.default.useCallback(()=>{if(E){let t=E.from,r=E.to;T({from:t,to:r}),k(`${(0,c.format)(t,e)} - ${(0,c.format)(r,e)}`),n&&n({from:t,to:r})}},[E,e,n]),j=R.default.useCallback(()=>{D(w)},[w]),M=R.default.useCallback(()=>{m?m():(T(void 0),D(void 0),k(``),n&&n(void 0))},[m,n]);return R.default.useEffect(()=>{if(t?.from&&t?.to){let n=lt(t.from),r=lt(t.to);T(t),D(t),k(`${(0,c.format)(n,e)} - ${(0,c.format)(r,e)}`)}else T(void 0),D({to:new Date,from:new Date})},[t,e]),(0,a.jsxs)(K,{className:z(`wu-flex wu-gap-1`,p===`left`?`wu-items-center`:`wu-flex-col wu-items-start`,`wu-date-picker-label`),dir:s,children:[f,(0,a.jsxs)($e,{onOpenChange:e=>!e&&j(),children:[(0,a.jsx)(st,{formattedString:O,dir:s,placeholder:g,CustomTrigger:_,...C}),(0,a.jsx)(tt,{className:`wu-flex wu-p-0 wu-border wu-w-fit wu-border-blue-p wu-bg-white`,align:y,sideOffset:S,side:x,alignOffset:b,dir:s,children:v?(0,a.jsx)(Wr,{current:E,onSelect:e=>{D(e)},ranges:d,onApply:A,onReset:M,showResetButton:h,minDate:i,maxDate:o}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Fr,{current:E,onSelect:D,presetRanges:d}),(0,a.jsx)(at,{dir:s,numberOfMonths:2,mode:`range`,captionLayout:`dropdown`,selected:E,onSelect:D,disabled:e=>ct(e,r,i,o),startMonth:i,endMonth:o,required:!0,autoFocus:!0,defaultMonth:w?.from,className:z(`wu-shadow-none wu-date-range-picker`),min:l,max:u,footer:(0,a.jsx)(ot,{handleDateChange:A,disabled:r,onReset:M,showResetButton:h})})]})})]})]})},Kr=R.default.forwardRef((e,t)=>{let{className:n,rounded:r,...i}=e;return(0,a.jsx)(`div`,{className:z(`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`,r?`wu-rounded-lg`:`wu-rounded-sm`,n),ref:t,...i})});Kr.displayName=`WuCard`;var qr=R.default.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(`div`,{ref:t,...r,className:z(`wu-p-2 wu-mb-2 wu-border-b wu-border-gray-40 min-h-12 wu-card-header`,n)})});qr.displayName=`WuCardHeader`;var Jr=R.default.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,a.jsx)(`div`,{ref:t,...r,className:z(`wu-p-2 wu-mt-2 wu-border-t wu-border-gray-40 min-h-12 wu-card-footer`,n)})});Jr.displayName=`WuCardHeader`;var Yr=R.forwardRef(({className:e,partial:t,...n},r)=>(0,a.jsx)(h.Root,{ref:r,className:z(`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:(0,a.jsxs)(h.Indicator,{className:z(`wu-flex wu-items-center wu-justify-center wu-text-current`),children:[!t&&(0,a.jsx)(`span`,{className:`wm-check wu-text-base wu-leading-4`}),t&&(0,a.jsx)(`span`,{className:`wm-check-indeterminate-small wu-text-base wu-leading-4`})]})}));Yr.displayName=h.Root.displayName;var Xr=R.default.forwardRef((e,t)=>{let{disabled:n,checked:r,Label:i,labelPosition:o=`right`,className:s,id:c=V(),partial:l,onChange:u,required:d,readonly:f,...p}=e;return R.default.useEffect(()=>{p.defaultChecked!==void 0&&r!==void 0&&console.error("WuCheckbox: Both `checked` and `defaultChecked` cannot be used together. Use only one of them.")},[p.defaultChecked,r]),(0,a.jsxs)(`div`,{className:Zr({labelPosition:o,className:`wu-checkbox-container`}),dir:p.dir,children:[(0,a.jsx)(Yr,{id:c,...p,partial:l,checked:r,disabled:n||f,onCheckedChange:u,className:z(`wu-peer wu-checkbox`,s),required:d,ref:t}),i&&(0,a.jsx)(K,{htmlFor:c,className:`wu-w-full wu-checkbox-label`,children:i})]})}),Zr=(0,f.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`}}});Xr.displayName=`WuCheckbox`;var Qr={WuChip:`_WuChip_l50hr_1`,WuLabel:`_WuLabel_l50hr_70`,WuCloseBtn:`_WuCloseBtn_l50hr_74`},$r=(0,R.forwardRef)(({variant:e=`primary`,size:t=`md`,shape:n=`default`,color:r,disabled:i=!1,selected:o=!1,onClose:s,className:c,children:l,onClick:u,onKeyDown:d,...f},p)=>{let m=!!u,h=!!s,g=m?`button`:`span`,_=e=>{e.stopPropagation(),!i&&s?.()},v=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),_(e))};return(0,a.jsxs)(g,{ref:p,type:m?`button`:void 0,disabled:m?i:void 0,"aria-disabled":i||void 0,"data-variant":e,"data-size":t,"data-shape":n,"data-color":r,"data-selected":o?`true`:`false`,"data-disabled":i||void 0,"data-closable":h||void 0,className:z(Qr.WuChip,c),onClick:i?void 0:u,onKeyDown:d,...f,children:[(0,a.jsx)(`span`,{className:Qr.WuLabel,children:l}),h&&(0,a.jsx)(`span`,{role:`button`,tabIndex:i?-1:0,"aria-label":`Remove`,className:Qr.WuCloseBtn,onClick:_,onKeyDown:v,children:(0,a.jsx)(`span`,{className:`wm-close`})})]})});$r.displayName=`WuChip`;var ei=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(g.Command,{ref:n,className:z(`wu-flex wu-h-full wu-w-full wu-flex-col wu-overflow-hidden wu-rounded-md`,e),...t}));ei.displayName=g.Command.displayName;var ti=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{className:`wu-flex wu-items-center wu-border-b wu-px-3`,children:(0,a.jsx)(g.Command.Input,{ref:n,className:z(`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})}));ti.displayName=g.Command.Input.displayName;var ni=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(g.Command.List,{ref:n,className:z(``,e),...t}));ni.displayName=g.Command.List.displayName;var ri=R.forwardRef((e,t)=>(0,a.jsx)(g.Command.Empty,{ref:t,className:`wu-text-center wu-p-2 wu-pb-2.5 wu-text-xs`,...e}));ri.displayName=g.Command.Empty.displayName;var ii=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(g.Command.Group,{ref:n,className:z(``,e),...t}));ii.displayName=g.Command.Group.displayName;var ai=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(g.Command.Separator,{ref:n,className:z(`wu-mx-2 wu-my-1 wu-h-px wu-bg-gray-40`,e),...t}));ai.displayName=g.Command.Separator.displayName;var oi=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(g.Command.Item,{ref:n,className:z(`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}));oi.displayName=g.Command.Item.displayName;var si=({className:e,...t})=>(0,a.jsx)(`span`,{className:z(`wu-ml-auto wu-text-xs wu-tracking-widest`,e),...t});si.displayName=`CommandShortcut`;var ci=(e,t,n,r)=>(0,R.useMemo)(()=>{if(!e||!n||t.length===0)return t;let i=Array.isArray(n)?n:[n];if(i.length===0)return t;let a=new Set(i.map(e=>String(e[r.value]))),o=[],s=[],c=[];return t.forEach(e=>{let t=e[r.value];t===void 0?o.push(e):a.has(String(t))?s.push(e):c.push(e)}),[...o,...s,...c]},[t,n,r.value,e]),li=R.default.forwardRef(({containerHeight:e=400,list:t,callback:n,dir:r,className:i,style:o},s)=>(0,a.jsx)(_.Virtuoso,{ref:s,dir:r,className:i,style:{height:e,scrollbarWidth:`thin`,scrollbarColor:`#d4d4d4 #f1f1f1`,overflowX:`hidden`,...o},data:t,itemContent:(e,t)=>n(e,t)}));li.displayName=`WuVirtualScroll`;var ui=({tags:e,triggerRef:t})=>{let[n,r]=(0,R.useState)([]),[i,o]=(0,R.useState)([]),s=(0,R.useMemo)(()=>(0,a.jsx)(`ul`,{className:`wu-flex wu-flex-col wu-items-start wu-justify-center wu-list-none`,children:i.map(e=>(0,a.jsx)(`li`,{className:`wu-py-1 wu-text-xs wu-text-left`,children:e},e))}),[i]),c=e=>{let t=document.createElement(`div`);Object.assign(t.style,{display:`inline-block`,visibility:`hidden`,position:`absolute`,whiteSpace:`nowrap`}),t.textContent=e,document.body.appendChild(t);let n=t.offsetWidth;return document.body.removeChild(t),n+8};return(0,R.useEffect)(()=>{let n=()=>{if(t.current){let n=t.current.offsetWidth-20-36,i=0,a=[],s=[];e.forEach(e=>{let t=c(e);i+t+8<n?(a.push(e),i+=t+8):s.push(e)}),r(a),o(s)}};return n(),window.addEventListener(`resize`,n),()=>{window.removeEventListener(`resize`,n)}},[e,t]),(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-gap-2 wu-text-xs`,children:[n.map(e=>(0,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:e},e)),i.length>0&&(0,a.jsx)(Xe,{content:s,className:`wu-z-[51] wu-text-left`,children:(0,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:[`+`,i.length]})})]})},di=({placeholder:e=`Select...`,isEllipse:t=!1,selectedOptions:n,variant:r=`flat`,dir:i=`ltr`,accessorKey:o,multiple:s,id:c,disabled:l,selectAll:u,isCheckedAll:d,className:f,...p})=>{let[m,h]=(0,R.useState)([]),g=(0,R.useRef)(null);(0,R.useEffect)(()=>{if(!n||Array.isArray(n)&&n.length===0){h([]);return}if(s){h(n?.map(e=>e[o.label]));return}else h([n[o.label]])},[n]);let _=()=>m.length?d&&u?.enable&&u?.triggerText?(0,a.jsx)(`span`,{className:`wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap`,children:u.triggerText}):t?(0,a.jsx)(`span`,{className:`wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap`,style:{width:`${(g.current?.offsetWidth||0)-32}px`},children:m.join(`, `)}):(0,a.jsx)(ui,{tags:m,triggerRef:g}):(0,a.jsx)(`p`,{className:`wu-text-xs wu-opacity-70`,children:e});return(0,a.jsx)(et,{dir:i,asChild:!0,id:c,disabled:l,children:(0,a.jsxs)(`button`,{...p,ref:g,disabled:l,className:z(`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`,r===`outlined`&&`wu-border wu-border-gray-subtle`,`disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10`,f),children:[_(),(0,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`})]})})},fi=v.Root,pi=v.Trigger,mi=v.Group,hi=v.Portal,gi=v.Sub,_i=v.RadioGroup,vi=R.forwardRef(({className:e,inset:t,children:n,position:r,...i},o)=>(0,a.jsxs)(v.SubTrigger,{ref:o,className:z(`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),...i,children:[r===`left`&&(0,a.jsx)(`span`,{className:z(`wm-chevron-right`,i.dir===`rtl`&&`ml-2`)}),n,r!==`left`&&(0,a.jsx)(`span`,{className:z(`wu-text-base wu-leading-4`,i.dir===`rtl`&&`wu-mr-auto wm-chevron-left`,i.dir!==`rtl`&&`wu-ml-auto wm-chevron-right`)})]}));vi.displayName=v.SubTrigger.displayName;var yi=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(v.SubContent,{ref:n,className:z(`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}));yi.displayName=v.SubContent.displayName;var bi=R.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,a.jsx)(v.Portal,{children:(0,a.jsx)(v.Content,{ref:r,sideOffset:t,className:z(`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})}));bi.displayName=v.Content.displayName;var xi=R.forwardRef(({className:e,inset:t,...n},r)=>(0,a.jsx)(v.Item,{ref:r,className:z(`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}));xi.displayName=v.Item.displayName;var Si=R.forwardRef(({className:e,children:t,checked:n,dir:r,...i},o)=>(0,a.jsxs)(v.CheckboxItem,{ref:o,className:z(`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`,r===`rtl`&&`wu-pr-8 wu-pl-2`,r!==`rtl`&&`wu-pl-8 wu-pr-2`,e),checked:n,...i,children:[(0,a.jsx)(`span`,{className:z(`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`,r===`rtl`&&`wu-right-2`,r!==`rtl`&&`wu-left-2`),children:(0,a.jsx)(v.ItemIndicator,{children:(0,a.jsx)(`span`,{className:`wm-check wu-text-base wu-text-white`})})}),t]}));Si.displayName=v.CheckboxItem.displayName;var Ci=R.forwardRef(({className:e,children:t,...n},r)=>(0,a.jsxs)(v.RadioItem,{ref:r,className:z(`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:[(0,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:(0,a.jsx)(v.ItemIndicator,{className:`wu-w-4 wu-h-4 wu-flex wu-items-center wu-justify-center`,children:(0,a.jsx)(`span`,{className:`wm-circle wu-text-blue-p group-hover:group-data-[state=checked]:wu-text-blue-q wu-text-xs`})})}),t]}));Ci.displayName=v.RadioItem.displayName;var wi=R.forwardRef(({className:e,inset:t,...n},r)=>(0,a.jsx)(v.Label,{ref:r,className:z(`wu-p-2 wu-font-medium wu-text-xs`,t&&`wu-pl-8`,e),...n}));wi.displayName=v.Label.displayName;var Ti=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(v.Separator,{ref:n,className:z(`-wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20`,e),...t}));Ti.displayName=v.Separator.displayName;var Ei=({className:e,...t})=>(0,a.jsx)(`span`,{className:z(`wu-ml-auto wu-text-xs wu-tracking-widest wu-opacity-60`,e),...t});Ei.displayName=`DropdownMenuShortcut`;var Di=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:i,dir:o})=>{let[s,c]=(0,R.useState)(n?[]:``);(0,R.useEffect)(()=>{t&&c(n?t.map(e=>JSON.stringify(e[i.value])):JSON.stringify(t[i.value]))},[t,i.value,n]);let l=n?s.includes(JSON.stringify(e[i.value])):s===JSON.stringify(e[i.value]);return(0,a.jsxs)(oi,{onSelect:()=>{e.disabled||r(e)},disabled:e.disabled,className:z(`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&&(0,a.jsx)(Xr,{checked:l}),(0,a.jsx)(Oi,{option:e,accessorKey:i})]})},Oi=({option:e,accessorKey:t})=>{let n=e[t.label];return(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-w-full wu-gap-1`,children:[e.icon&&e.icon,n,e.isAdmin&&(0,a.jsx)(`span`,{className:`wu-ml-auto wu-text-sm wm-lock wu-text-orange-deep`})]})},ki=e=>{let{option:t,selectAll:n,handleSelectAll:r,isCheckedAll:i,isPartialSelected:o,...s}=e;switch(`type`in t?t.type:`option`){case`all`:return(0,a.jsxs)(oi,{onSelect:r,className:z(`wu-cursor-pointer wu-text-xs wu-leading-4 wu-py-2 wu-combobox-item`),dir:s.dir,children:[(0,a.jsx)(Xr,{checked:i||o,partial:o,"data-partial":o,"aria-label":n?.label||`Select All`}),(0,a.jsx)(`span`,{"aria-hidden":!0,children:n?.label||`Select All`})]});case`group`:return(0,a.jsxs)(ii,{children:[(0,a.jsx)(wi,{children:t.label}),t.options.map((e,t)=>{let n=e[s.accessorKey.value],r=n==null?`group-item-${t}`:String(n);return(0,R.createElement)(Di,{...s,option:e,key:r})})]});case`divider`:return(0,a.jsx)(ai,{className:`wu-mx-4`});default:return(0,a.jsx)(Di,{...s,option:t})}},Ai=e=>{let t=[],n=[],r=[],i=[];return e.forEach(e=>{e.type===`group`?(t.push(e),r.push(...e.options),i.push(...e.options.filter(e=>!e.disabled))):e.type===`divider`?n.push(e):r.push(e),e?.disabled||i.push(e)}),{groups:t,dividers:n,allOptions:r,enabledOptions:i}},ji=(0,R.memo)(Mr),Mi=({data:e,accessorKey:t,value:n,defaultValue:r,Header:i,virtualizedThreshold:o=100,isEllipse:s,placeholder:c,variant:l,dir:u,onSelect:d,Label:f,maxHeight:p=420,multiple:m=!1,hasGroup:h=!1,selectAll:g,id:_,disabled:v,labelPosition:y=`top`,className:b,onScroll:x,maxContentWidth:S,enableSearch:C=!0,noDataContent:w,selectedToTop:T=!1,...E})=>{let[D,O]=(0,R.useState)(``),[k,A]=(0,R.useState)(),[j,M]=(0,R.useState)(!1),[N,P]=(0,R.useState)(!1),[F,I]=(0,R.useState)(!1),ee=(0,R.useRef)(null),{allOptions:L,enabledOptions:te}=(0,R.useMemo)(()=>h||g&&!g.includeDisabled?Ai(e):{allOptions:e,groups:[],dividers:[],enabledOptions:[]},[e,h]),ne=(0,R.useMemo)(()=>{if(!D)return e;let n=D.toLowerCase();return L.filter(e=>e[t.label].toLowerCase().includes(n))},[D,L,e,t.label]),B=ci(T,(0,R.useMemo)(()=>m&&g?.enable&&!D&&ne.length>0?[{type:`all`},...ne]:ne,[ne,D,m]),k,t),V=(0,R.useCallback)(e=>{let n=e[t.value];m?A(r=>{let i=r||[],a=i.some(e=>e[t.value]===n)?i.filter(e=>e[t.value]!==n):[...i,e];return d?.(a),a}):(M(!1),A(e),d?.(e))},[m,t.value,d]),ie=(0,R.useCallback)(e=>O(e.target.value),[]),ae=(0,R.useCallback)(()=>O(``),[]);(0,R.useEffect)(()=>{if(n!==void 0&&r!==void 0){console.error(`defaultValue and value cannot be used simultaneously`);return}else n===void 0?r!==void 0&&A(r):A(n)},[n,r]),(0,R.useEffect)(()=>{if(!m)return;let e=g?.includeDisabled?k?.length===L.length:k?.length===te.length;P(e),I(k?.length>0&&!e)},[k,g]);let oe=(0,R.useCallback)(()=>{let e=N?[]:g?.includeDisabled?L:te;A(e),d?.(e)},[N,m,L,te,d,g]);return(0,a.jsxs)(`div`,{className:z(re(y),`wu-flex wu-combobox-container`),ref:ee,children:[(0,a.jsxs)($e,{onOpenChange:e=>{e&&ae(),M(e)},open:j,modal:!0,children:[(0,a.jsx)(di,{selectedOptions:k,accessorKey:t,isEllipse:s,placeholder:c,variant:l,dir:u,multiple:m,disabled:v,selectAll:g,isCheckedAll:N,className:b,id:_,...E}),(0,a.jsx)(tt,{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:S},children:(0,a.jsxs)(ei,{id:_,children:[C&&(0,a.jsx)(`div`,{className:`wu-m-2`,children:(0,a.jsx)(ji,{placeholder:`Search...`,Icon:(0,a.jsx)(`span`,{className:`wm-search`}),className:`wu-text-xs wu-combobox-search`,onChange:ie,name:`Search`,"aria-label":`Search`,dir:u,iconPosition:u===`rtl`?`right`:`left`})}),i,(0,a.jsxs)(ni,{children:[(0,a.jsx)(ri,{children:w||`No results found.`}),B.length>=o?(0,a.jsx)(li,{className:`wu-combobox-list`,containerHeight:p,list:B,callback:(e,n)=>{let r=n,i=r[t.value],o=i==null?`__${`type`in r?r.type:`item`}__${e}`:String(i);return(0,a.jsx)(ki,{option:n,value:k,onSelect:V,multiple:m,accessorKey:t,dir:u,selectAll:g,handleSelectAll:oe,isCheckedAll:N,isPartialSelected:F},o)},dir:u}):(0,a.jsx)(`div`,{style:{height:`fit-content`,maxHeight:p,overflow:`auto`},className:`wu-combobox-list`,onScroll:x,children:B.map((e,n)=>{let r=e,i=r[t.value],o=i==null?`__${`type`in r?r.type:`item`}__${n}`:String(i);return(0,a.jsx)(ki,{option:r,value:k,onSelect:V,multiple:m,accessorKey:t,dir:u,selectAll:g,handleSelectAll:oe,isCheckedAll:N,isPartialSelected:F},o)})})]})]})})]}),f&&(0,a.jsx)(K,{htmlFor:_,className:`wu-combobox-label`,children:f})]})},Ni=e=>{let{textToCopy:t,notificationText:n,...r}=e,[i,o]=R.default.useState(!1),s=async()=>{if(t)try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),2e3)}catch(e){console.error(`Failed to copy:`,e)}};return(0,a.jsxs)(W,{...r,onClick:s,variant:`iconOnly`,className:z(`wu-relative`,e.className),"aria-label":`Copy to clipboard`,children:[n&&(0,a.jsx)(`span`,{className:z(`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`,i?`wu-block`:`wu-hidden`),children:n}),(0,a.jsx)(Pe,{icon:`wm-content-copy`,className:`wu-text-lg`})]})},Pi=y.Root,Fi=y.Trigger,Ii=y.Close,Li=y.Portal,Ri=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(y.Overlay,{className:z(`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}));Ri.displayName=y.Overlay.displayName;var zi=(0,f.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`}}),Bi=R.forwardRef(({side:e=`right`,className:t,children:n,hideCloseButton:r,overlayClassName:i,closeButtonClassName:o,...s},c)=>(0,a.jsxs)(Li,{children:[(0,a.jsx)(Ri,{className:i}),(0,a.jsxs)(y.Content,{ref:c,className:z(zi({side:e}),t),...s,children:[n,!r&&(0,a.jsx)(y.Close,{"aria-label":`close`,asChild:!0,children:(0,a.jsxs)(rt,{variant:`iconOnly`,className:z(`wu-absolute wu-right-4 wu-top-4`,o),children:[(0,a.jsx)(`span`,{className:`wm-close`}),(0,a.jsx)(`span`,{className:`wu-sr-only`,children:`Close`})]})})]})]}));Bi.displayName=y.Content.displayName;var Vi=({className:e,...t})=>(0,a.jsx)(`div`,{className:z(``,e),...t});Vi.displayName=`SheetHeader`;var Hi=({className:e,...t})=>(0,a.jsx)(`div`,{className:z(`wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2`,e),...t});Hi.displayName=`SheetFooter`;var Ui=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(y.Title,{ref:n,className:z(`wu-text-lg wu-font-semibold`,e),...t}));Ui.displayName=y.Title.displayName;var Wi=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(y.Description,{ref:n,className:z(`wu-text-sm`,e),...t}));Wi.displayName=y.Description.displayName;var Gi=e=>t=>{e&&t.preventDefault()},Ki=e=>{let{Trigger:t,children:n,hideCloseButton:r,className:i,side:o=`left`,open:s,onOpenChange:c,preventClickOutside:l,overlayClassName:u,closeButtonClassName:d,...f}=e;return(0,a.jsxs)(Pi,{open:s,onOpenChange:c,children:[(0,a.jsx)(Fi,{asChild:!0,children:t}),(0,a.jsxs)(Bi,{onInteractOutside:Gi(l),side:o,className:z(`wu-bg-white wu-text-gray-lead wu-px-0`,i),hideCloseButton:r,overlayClassName:u,closeButtonClassName:d,...f,children:[(0,a.jsx)(`div`,{className:`wu-hidden`,children:(0,a.jsx)(Ui,{})}),n]})]})},qi=({children:e,...t})=>(0,a.jsx)(Ii,{...t,children:e}),Ji=(0,R.createContext)({});function Yi(e){let t=(0,R.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Xi=typeof window<`u`?R.useLayoutEffect:R.useEffect,Zi=(0,R.createContext)(null);function Qi(e,t){e.indexOf(t)===-1&&e.push(t)}function $i(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var ea=(e,t,n)=>n>t?t:n<e?e:n;function ta(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var na=()=>{},ra=()=>{};typeof process<`u`&&process.env.NODE_ENV!==`production`&&(na=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(ta(t,n))},ra=(e,t,n)=>{if(!e)throw Error(ta(t,n))});var ia={},aa=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),oa=e=>typeof e==`object`&&!!e,sa=e=>/^0[^.\s]+$/u.test(e);function ca(e){let t;return()=>(t===void 0&&(t=e()),t)}var la=e=>e,ua=(...e)=>e.reduce((e,t)=>n=>t(e(n))),da=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},fa=class{constructor(){this.subscriptions=[]}add(e){return Qi(this.subscriptions,e),()=>$i(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},pa=e=>e*1e3,ma=e=>e/1e3,ha=(e,t)=>t?1e3/t*e:0,ga=new Set;function _a(e,t,n){e||ga.has(t)||(console.warn(ta(t,n)),ga.add(t))}var va=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ya=1e-7,ba=12;function xa(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=va(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>ya&&++s<ba);return o}function Sa(e,t,n,r){if(e===t&&n===r)return la;let i=t=>xa(t,0,1,e,n);return e=>e===0||e===1?e:va(i(e),t,r)}var Ca=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,wa=e=>t=>1-e(1-t),Ta=Sa(.33,1.53,.69,.99),Ea=wa(Ta),Da=Ca(Ea),Oa=e=>e>=1?1:(e*=2)<1?.5*Ea(e):.5*(2-2**(-10*(e-1))),ka=e=>1-Math.sin(Math.acos(e)),Aa=wa(ka),ja=Ca(ka),Ma=Sa(.42,0,1,1),Na=Sa(0,0,.58,1),Pa=Sa(.42,0,.58,1),Fa=e=>Array.isArray(e)&&typeof e[0]!=`number`,Ia=e=>Array.isArray(e)&&typeof e[0]==`number`,La={linear:la,easeIn:Ma,easeInOut:Pa,easeOut:Na,circIn:ka,circInOut:ja,circOut:Aa,backIn:Ea,backInOut:Da,backOut:Ta,anticipate:Oa},Ra=e=>typeof e==`string`,za=e=>{if(Ia(e)){ra(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return Sa(t,n,r,i)}else if(Ra(e))return ra(La[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),La[e];return e},Ba=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Va={value:null,addProjectionMetrics:null};function Ha(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&Va.value&&Va.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Ua=40;function Wa(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Ba.reduce((e,n)=>(e[n]=Ha(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=ia.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Ua),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Ba.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Ba.length;t++)o[Ba[t]].cancel(e)},state:i,steps:o}}var{schedule:Ga,cancel:Ka,state:qa,steps:Ja}=Wa(typeof requestAnimationFrame<`u`?requestAnimationFrame:la,!0),Ya;function Xa(){Ya=void 0}var Za={now:()=>(Ya===void 0&&Za.set(qa.isProcessing||ia.useManualTiming?qa.timestamp:performance.now()),Ya),set:e=>{Ya=e,queueMicrotask(Xa)}},Qa={layout:0,mainThread:0,waapi:0},$a=e=>t=>typeof t==`string`&&t.startsWith(e),eo=$a(`--`),to=$a(`var(--`),no=e=>to(e)?ro.test(e.split(`/*`)[0].trim()):!1,ro=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function io(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var ao={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},oo={...ao,transform:e=>ea(0,1,e)},so={...ao,default:1},co=e=>Math.round(e*1e5)/1e5,lo=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function uo(e){return e==null}var fo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,po=(e,t)=>n=>!!(typeof n==`string`&&fo.test(n)&&n.startsWith(e)||t&&!uo(n)&&Object.prototype.hasOwnProperty.call(n,t)),mo=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(lo);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},ho=e=>ea(0,255,e),go={...ao,transform:e=>Math.round(ho(e))},_o={test:po(`rgb`,`red`),parse:mo(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+go.transform(e)+`, `+go.transform(t)+`, `+go.transform(n)+`, `+co(oo.transform(r))+`)`};function vo(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var yo={test:po(`#`),parse:vo,transform:_o.transform},bo=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),xo=bo(`deg`),So=bo(`%`),X=bo(`px`),Co=bo(`vh`),wo=bo(`vw`),To={...So,parse:e=>So.parse(e)/100,transform:e=>So.transform(e*100)},Eo={test:po(`hsl`,`hue`),parse:mo(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+So.transform(co(t))+`, `+So.transform(co(n))+`, `+co(oo.transform(r))+`)`},Z={test:e=>_o.test(e)||yo.test(e)||Eo.test(e),parse:e=>_o.test(e)?_o.parse(e):Eo.test(e)?Eo.parse(e):yo.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?_o.transform(e):Eo.transform(e),getAnimatableNone:e=>{let t=Z.parse(e);return t.alpha=0,Z.transform(t)}},Do=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Oo(e){return isNaN(e)&&typeof e==`string`&&(e.match(lo)?.length||0)+(e.match(Do)?.length||0)>0}var ko=`number`,Ao=`color`,jo=`var`,Mo=`var(`,No="${}",Po=/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 Fo(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Po,e=>(Z.test(e)?(r.color.push(a),i.push(Ao),n.push(Z.parse(e))):e.startsWith(Mo)?(r.var.push(a),i.push(jo),n.push(e)):(r.number.push(a),i.push(ko),n.push(parseFloat(e))),++a,No)).split(No),indexes:r,types:i}}function Io(e){return Fo(e).values}function Lo({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===ko?i+=co(r[a]):e===Ao?i+=Z.transform(r[a]):i+=r[a]}return i}}function Ro(e){return Lo(Fo(e))}var zo=e=>typeof e==`number`?0:Z.test(e)?Z.getAnimatableNone(e):e,Bo=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:zo(e);function Vo(e){let t=Fo(e);return Lo(t)(t.values.map((e,n)=>Bo(e,t.split[n])))}var Ho={test:Oo,parse:Io,createTransformer:Ro,getAnimatableNone:Vo};function Uo(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Wo({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Uo(s,r,e+1/3),a=Uo(s,r,e),o=Uo(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Go(e,t){return n=>n>0?t:e}var Ko=(e,t,n)=>e+(t-e)*n,qo=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Jo=[yo,_o,Eo],Yo=e=>Jo.find(t=>t.test(e));function Xo(e){let t=Yo(e);if(na(!!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===Eo&&(n=Wo(n)),n}var Zo=(e,t)=>{let n=Xo(e),r=Xo(t);if(!n||!r)return Go(e,t);let i={...n};return e=>(i.red=qo(n.red,r.red,e),i.green=qo(n.green,r.green,e),i.blue=qo(n.blue,r.blue,e),i.alpha=Ko(n.alpha,r.alpha,e),_o.transform(i))},Qo=new Set([`none`,`hidden`]);function $o(e,t){return Qo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function es(e,t){return n=>Ko(e,t,n)}function ts(e){return typeof e==`number`?es:typeof e==`string`?no(e)?Go:Z.test(e)?Zo:as:Array.isArray(e)?ns:typeof e==`object`?Z.test(e)?Zo:rs:Go}function ns(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>ts(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function rs(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=ts(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function is(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var as=(e,t)=>{let n=Ho.createTransformer(t),r=Fo(e),i=Fo(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Qo.has(e)&&!i.values.length||Qo.has(t)&&!r.values.length?$o(e,t):ua(ns(is(r,i),i.values),n):(na(!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`),Go(e,t))};function os(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Ko(e,t,n):ts(e)(e,t)}var ss=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>Ga.update(t,e),stop:()=>Ka(t),now:()=>qa.isProcessing?qa.timestamp:Za.now()}},cs=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},ls=2e4;function us(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function ds(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(us(r),ls);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:ma(i)}}var Q={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};function fs(e,t){return e*Math.sqrt(1-t*t)}var ps=12;function ms(e,t,n){let r=n;for(let n=1;n<ps;n++)r-=e(r)/t(r);return r}var hs=.001;function gs({duration:e=Q.duration,bounce:t=Q.bounce,velocity:n=Q.velocity,mass:r=Q.mass}){let i,a;na(e<=pa(Q.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=ea(Q.minDamping,Q.maxDamping,o),e=ea(Q.minDuration,Q.maxDuration,ma(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=fs(t,o),c=Math.exp(-i);return hs-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=fs(t**2,o);return(-i(t)+hs>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-hs+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=ms(i,a,s);if(e=pa(e),isNaN(c))return{stiffness:Q.stiffness,damping:Q.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var _s=[`duration`,`bounce`],vs=[`stiffness`,`damping`,`mass`];function ys(e,t){return t.some(t=>e[t]!==void 0)}function bs(e){let t={velocity:Q.velocity,stiffness:Q.stiffness,damping:Q.damping,mass:Q.mass,isResolvedFromDuration:!1,...e};if(!ys(e,vs)&&ys(e,_s))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*ea(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Q.mass,stiffness:i,damping:a}}else{let n=gs({...e,velocity:0});t={...t,...n,mass:Q.mass},t.isResolvedFromDuration=!0}return t}function xs(e=Q.visualDuration,t=Q.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=bs({...n,velocity:-ma(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=ma(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?Q.restSpeed.granular:Q.restSpeed.default,i||=v?Q.restDelta.granular:Q.restDelta.default;let y,b,x,S,C,w;if(h<1)x=fs(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>pa(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=pa(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=pa(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(us(T),ls),t=cs(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}xs.applyToOptions=e=>{let t=ds(e,100,xs);return e.ease=t.ease,e.duration=pa(t.duration),e.type=`keyframes`,e};var Ss=5;function Cs(e,t,n){let r=Math.max(t-Ss,0);return ha(n-e(r),t-r)}function ws({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=xs({keyframes:[f.value,m(f.value)],velocity:Cs(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function Ts(e,t,n){let r=[],i=n||ia.mix||os,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=ua(Array.isArray(t)?t[n]||la:t,a)),r.push(a)}return r}function Es(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(ra(a===t.length,`Both input and output ranges must be the same length`,`range-length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Ts(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=da(e[r],e[r+1],n);return s[r](i)};return n?t=>l(ea(e[0],e[a-1],t)):l}function Ds(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=da(0,t,r);e.push(Ko(n,1,i))}}function Os(e){let t=[0];return Ds(t,e.length-1),t}function ks(e,t){return e.map(e=>e*t)}function As(e,t){return e.map(()=>t||Pa).splice(0,e.length-1)}function js({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Fa(r)?r.map(za):za(r),a={done:!1,value:t[0]},o=Es(ks(n&&n.length===t.length?n:Os(t),e),t,{ease:Array.isArray(i)?i:As(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Ms=e=>e!==null;function Ns(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Ms),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Ps={decay:ws,inertia:ws,tween:js,keyframes:js,spring:xs};function Fs(e){typeof e.type==`string`&&(e.type=Ps[e.type])}var Is=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Ls=e=>e/100,Rs=class extends Is{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Za.now()&&this.tick(Za.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Qa.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Fs(e);let{type:t=js,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||js;process.env.NODE_ENV!==`production`&&s!==js&&ra(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==js&&typeof o[0]!=`number`&&(this.mixKeyframes=ua(Ls,os(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=us(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=ea(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==ws&&(b.value=Ns(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return ma(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ma(e)}get time(){return ma(this.currentTime)}set time(e){e=pa(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Cs(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Za.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=ma(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=ss,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,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(Za.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,Qa.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function zs(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Bs=e=>e*180/Math.PI,Vs=e=>Us(Bs(Math.atan2(e[1],e[0]))),Hs={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Vs,rotateZ:Vs,skewX:e=>Bs(Math.atan(e[1])),skewY:e=>Bs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Us=e=>(e%=360,e<0&&(e+=360),e),Ws=Vs,Gs=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ks=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),qs={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Gs,scaleY:Ks,scale:e=>(Gs(e)+Ks(e))/2,rotateX:e=>Us(Bs(Math.atan2(e[6],e[5]))),rotateY:e=>Us(Bs(Math.atan2(-e[2],e[0]))),rotateZ:Ws,rotate:Ws,skewX:e=>Bs(Math.atan(e[4])),skewY:e=>Bs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Js(e){return+!!e.includes(`scale`)}function Ys(e,t){if(!e||e===`none`)return Js(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=qs,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Hs,i=t}if(!i)return Js(t);let a=r[t],o=i[1].split(`,`).map(Zs);return typeof a==`function`?a(o):o[a]}var Xs=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Ys(n,t)};function Zs(e){return parseFloat(e.trim())}var Qs=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],$s=new Set(Qs),ec=e=>e===ao||e===X,tc=new Set([`x`,`y`,`z`]),nc=Qs.filter(e=>!tc.has(e));function rc(e){let t=[];return nc.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var ic={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-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})=>Ys(t,`x`),y:(e,{transform:t})=>Ys(t,`y`)};ic.translateX=ic.x,ic.translateY=ic.y;var ac=new Set,oc=!1,sc=!1,cc=!1;function lc(){if(sc){let e=Array.from(ac).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=rc(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}sc=!1,oc=!1,ac.forEach(e=>e.complete(cc)),ac.clear()}function uc(){ac.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(sc=!0)})}function dc(){cc=!0,uc(),lc(),cc=!1}var fc=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(ac.add(this),oc||(oc=!0,Ga.read(uc),Ga.resolveKeyframes(lc))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}zs(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ac.delete(this)}cancel(){this.state===`scheduled`&&(ac.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},pc=e=>e.startsWith(`--`);function mc(e,t,n){pc(t)?e.style.setProperty(t,n):e.style[t]=n}var hc={};function gc(e,t){let n=ca(e);return()=>hc[t]??n()}var _c=gc(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),vc=gc(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),yc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,bc={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:yc([0,.65,.55,1]),circOut:yc([.55,0,1,.45]),backIn:yc([.31,.01,.66,-.59]),backOut:yc([.33,1.53,.69,.99])};function xc(e,t){if(e)return typeof e==`function`?vc()?cs(e,t):`ease-out`:Ia(e)?yc(e):Array.isArray(e)?e.map(e=>xc(e,t)||bc.easeOut):bc[e]}function Sc(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=xc(s,i);Array.isArray(d)&&(u.easing=d),Va.value&&Qa.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return Va.value&&p.finished.finally(()=>{Qa.waapi--}),p}function Cc(e){return typeof e==`function`&&`applyToOptions`in e}function wc({type:e,...t}){return Cc(e)&&vc()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Tc=class extends Is{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,ra(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=wc(e);this.animation=Sc(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Ns(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),mc(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return ma(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ma(e)}get time(){return ma(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=pa(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&_c()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),la):r(this)}},Ec={anticipate:Oa,backInOut:Da,circInOut:ja};function Dc(e){return e in Ec}function Oc(e){typeof e.ease==`string`&&Dc(e.ease)&&(e.ease=Ec[e.ease])}var kc=10,Ac=class extends Tc{constructor(e){Oc(e),Fs(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Rs({...a,autoplay:!1}),s=Math.max(kc,Za.now()-this.startTime),c=ea(0,kc,s-kc),l=o.sample(s).value,{name:u}=this.options;i&&u&&mc(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},jc=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Ho.test(e)||e===`0`)&&!e.startsWith(`url(`));function Mc(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Nc(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=jc(i,t),s=jc(a,t);return na(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:Mc(e)||(n===`spring`||Cc(n))&&r}function Pc(e){e.duration=0,e.type=`keyframes`}var Fc=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Ic=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Lc(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Ic.test(e[t]))return!0;return!1}var Rc=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),zc=ca(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Bc(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return zc()&&n&&(Fc.has(n)||Rc.has(n)&&Lc(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Vc=40,Hc=class extends Is{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Za.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||fc;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Za.now();let u=!0;Nc(e,i,a,o)||(u=!1,(ia.instantAnimations||!s)&&l?.(Ns(e,n,t)),e[0]=e[e.length-1],Pc(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Vc?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Bc(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new Ac({...d,element:p})}catch{m=new Rs(d)}else m=new Rs(d);m.finished.then(()=>{this.notifyFinished()}).catch(la),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),dc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Uc(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Wc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Gc(e){let t=Wc.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var Kc=4;function qc(e,t,n=1){ra(n<=Kc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=Gc(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return aa(e)?parseFloat(e):e}return no(i)?qc(i,t,n+1):i}var Jc={type:`spring`,stiffness:500,damping:25,restSpeed:10},Yc=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Xc={type:`keyframes`,duration:.8},Zc={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Qc=(e,{keyframes:t})=>t.length>2?Xc:$s.has(e)?e.startsWith(`scale`)?Yc(t[1]):Jc:Zc;function $c(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function el(e,t){let n=e?.[t]??e?.default??e;return n===e?n:$c(n,e)}var tl=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function nl(e){for(let t in e)if(!tl.has(t))return!0;return!1}var rl=(e,t,n,r={},i,a)=>o=>{let s=el(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=pa(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};nl(s)||Object.assign(u,Qc(e,u)),u.duration&&=pa(u.duration),u.repeatDelay&&=pa(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Pc(u),u.delay===0&&(d=!0)),(ia.instantAnimations||ia.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Pc(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Ns(u.keyframes,s);if(e!==void 0){Ga.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Rs(u):new Hc(u)};function il(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function al(e,t,n,r){if(typeof t==`function`){let[i,a]=il(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=il(r);t=t(n===void 0?e.custom:n,i,a)}return t}function ol(e,t,n){let r=e.getProps();return al(r,t,n===void 0?r.custom:n,e)}var sl=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Qs]),cl=30,ll=e=>!isNaN(parseFloat(e)),ul={current:void 0},dl=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Za.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Za.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ll(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&_a(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new fa);let n=this.events[e].add(t);return e===`change`?()=>{n(),Ga.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return ul.current&&ul.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=Za.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>cl)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,cl);return ha(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function fl(e,t){return new dl(e,t)}var pl=e=>Array.isArray(e);function ml(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fl(n))}function hl(e){return pl(e)?e[e.length-1]||0:e}function gl(e,t){let{transitionEnd:n={},transition:r={},...i}=ol(e,t)||{};i={...i,...n};for(let t in i)ml(e,t,hl(i[t]))}var $=e=>!!(e&&e.getVelocity);function _l(e){return!!($(e)&&e.add)}function vl(e,t){let n=e.getValue(`willChange`);if(_l(n))return n.add(t);if(!n&&ia.WillChange){let n=new ia.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function yl(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var bl=`data-`+yl(`framerAppearId`);function xl(e){return e.props[bl]}function Sl({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Cl(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?$c(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Sl(f,t))continue;let o={delay:n,...el(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){Ga.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=xl(e);if(n){let e=window.MotionHandoffAnimation(n,t,Ga);e!==null&&(o.startTime=e,p=!0)}}vl(e,t);let m=l??e.shouldReduceMotion;r.start(rl(t,r,i,m&&sl.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>Ga.update(()=>{o&&gl(e,o)});d.length?Promise.all(d).then(t):t()}return d}function wl(e,t,n={}){let r=ol(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Cl(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Tl(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Tl(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(wl(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Uc(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function El(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>wl(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=wl(e,t,n);else{let i=typeof t==`function`?ol(e,t,n.custom):t;r=Promise.all(Cl(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Dl={test:e=>e===`auto`,parse:e=>e},Ol=e=>t=>t.test(e),kl=[ao,X,So,xo,wo,Co,Dl],Al=e=>kl.find(Ol(e));function jl(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||sa(e)}var Ml=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Nl(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(lo)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Ml.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Pl=/\b([a-z-]*)\(.*?\)/gu,Fl={...Ho,getAnimatableNone:e=>{let t=e.match(Pl);return t?t.map(Nl).join(` `):e}},Il={...Ho,getAnimatableNone:e=>{let t=Ho.parse(e);return Ho.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Ll={...ao,transform:Math.round},Rl={borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,inset:X,insetBlock:X,insetBlockStart:X,insetBlockEnd:X,insetInline:X,insetInlineStart:X,insetInlineEnd:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,paddingBlock:X,paddingBlockStart:X,paddingBlockEnd:X,paddingInline:X,paddingInlineStart:X,paddingInlineEnd:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,marginBlock:X,marginBlockStart:X,marginBlockEnd:X,marginInline:X,marginInlineStart:X,marginInlineEnd:X,fontSize:X,backgroundPositionX:X,backgroundPositionY:X,rotate:xo,rotateX:xo,rotateY:xo,rotateZ:xo,scale:so,scaleX:so,scaleY:so,scaleZ:so,skew:xo,skewX:xo,skewY:xo,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:oo,originX:To,originY:To,originZ:X,zIndex:Ll,fillOpacity:oo,strokeOpacity:oo,numOctaves:Ll},zl={...Rl,color:Z,backgroundColor:Z,outlineColor:Z,fill:Z,stroke:Z,borderColor:Z,borderTopColor:Z,borderRightColor:Z,borderBottomColor:Z,borderLeftColor:Z,filter:Fl,WebkitFilter:Fl,mask:Il,WebkitMask:Il},Bl=e=>zl[e],Vl=new Set([Fl,Il]);function Hl(e,t){let n=Bl(e);return Vl.has(n)||(n=Ho),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Ul=new Set([`auto`,`none`,`0`]);function Wl(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Ul.has(t)&&Fo(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Hl(n,i)}var Gl=class extends fc{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),no(r))){let i=qc(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!sl.has(n)||e.length!==2)return;let[r,i]=e,a=Al(r),o=Al(i);if(io(r)!==io(i)&&ic[n]){this.needsMeasurement=!0;return}if(a!==o)if(ec(a)&&ec(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else ic[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||jl(e[t]))&&n.push(t);n.length&&Wl(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ic[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=ic[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function Kl(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var ql=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Jl(e){return oa(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:Yl,cancel:Xl}=Wa(queueMicrotask,!1),Zl={x:!1,y:!1};function Ql(){return Zl.x||Zl.y}function $l(e,t){let n=Kl(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function eu(e){return!(e.pointerType===`touch`||Ql())}function tu(e,t,n={}){let[r,i,a]=$l(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!eu(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var nu=(e,t)=>t?e===t?!0:nu(e,t.parentElement):!1,ru=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,iu=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function au(e){return iu.has(e.tagName)||e.isContentEditable===!0}var ou=new WeakSet;function su(e){return t=>{t.key===`Enter`&&e(t)}}function cu(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var lu=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=su(()=>{if(ou.has(n))return;cu(n,`down`);let e=su(()=>{cu(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>cu(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function uu(e){return ru(e)&&!Ql()}var du=new WeakSet;function fu(e,t,n={}){let[r,i,a]=$l(e,n),o=e=>{let r=e.currentTarget;if(!uu(e)||du.has(e))return;ou.add(r),n.stopPropagation&&du.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),ou.has(r)&&ou.delete(r),uu(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||nu(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Jl(e)&&(e.addEventListener(`focus`,e=>lu(e,i)),!au(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var pu=[...kl,Z,Ho],mu=e=>pu.find(Ol(e)),hu=()=>({min:0,max:0}),gu=()=>({x:hu(),y:hu()}),_u=new WeakMap;function vu(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function yu(e){return typeof e==`string`||Array.isArray(e)}var bu=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],xu=[`initial`,...bu];function Su(e){return vu(e.animate)||xu.some(t=>yu(e[t]))}function Cu(e){return!!(Su(e)||e.variants)}function wu(e,t,n){for(let r in t){let i=t[r],a=n[r];if($(i))e.addValue(r,i);else if($(a))e.addValue(r,fl(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,fl(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Tu={current:null},Eu={current:!1},Du=typeof window<`u`;function Ou(){if(Eu.current=!0,Du)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Tu.current=e.matches;e.addEventListener(`change`,t),t()}else Tu.current=!1}var ku=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Au={};function ju(e){Au=e}function Mu(){return Au}var Nu=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){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=fc,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=()=>{let e=Za.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Ga.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Su(t),this.isVariantNode=Cu(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&$(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,_u.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Eu.current||Ou(),this.shouldReduceMotion=Tu.current),process.env.NODE_ENV!==`production`&&_a(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,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ka(this.notifyUpdate),Ka(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Fc.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Tc({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:pa(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=$s.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&Ga.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Au){let t=Au[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gu()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ku.length;t++){let n=ku[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=wu(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=fl(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(aa(n)||sa(n))?n=parseFloat(n):!mu(n)&&Ho.test(t)&&(n=Hl(e,t)),this.setBaseTarget(e,$(n)?n.get():n)),$(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=al(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!$(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new fa),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Yl.render(this.render)}},Pu=class extends Nu{constructor(){super(...arguments),this.KeyframeResolver=Gl}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;$(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Fu=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Iu({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Lu(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ru(e,t){return Iu(Lu(e.getBoundingClientRect(),t))}var zu={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Bu=Qs.length;function Vu(e,t,n){let r=``,i=!0;for(let a=0;a<Bu;a++){let o=Qs[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=ql(s,Rl[o]);if(!c){i=!1;let t=zu[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Hu(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if($s.has(e)){o=!0;continue}else if(eo(e)){i[e]=n;continue}else{let t=ql(n,Rl[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Vu(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Uu(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Wu(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Gu={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(X.test(e))e=parseFloat(e);else return e;return`${Wu(e,t.target.x)}% ${Wu(e,t.target.y)}%`}},Ku={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Ho.parse(e);if(i.length>5)return r;let a=Ho.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Ko(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},qu={borderRadius:{...Gu,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Gu,borderTopRightRadius:Gu,borderBottomLeftRadius:Gu,borderBottomRightRadius:Gu,boxShadow:Ku};function Ju(e,{layout:t,layoutId:n}){return $s.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!qu[e]||e===`opacity`)}function Yu(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)($(r[t])||i&&$(i[t])||Ju(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Xu(e){return window.getComputedStyle(e)}var Zu=class extends Pu{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Uu}readValueFromInstance(e,t){if($s.has(t))return this.projection?.isProjecting?Js(t):Xs(e,t);{let n=Xu(e),r=(eo(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ru(e,t)}build(e,t,n){Hu(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Yu(e,t,n)}},Qu={offset:`stroke-dashoffset`,array:`stroke-dasharray`},$u={offset:`strokeDashoffset`,array:`strokeDasharray`};function ed(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Qu:$u;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var td=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function nd(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Hu(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of td)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&ed(d,i,a,o,!1)}var rd=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`]),id=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function ad(e,t,n,r){Uu(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(rd.has(n)?n:yl(n),t.attrs[n])}function od(e,t,n){let r=Yu(e,t,n);for(let n in e)if($(e[n])||$(t[n])){let t=Qs.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var sd=class extends Pu{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=gu}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if($s.has(t)){let e=Bl(t);return e&&e.default||0}return t=rd.has(t)?t:yl(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return od(e,t,n)}build(e,t,n){nd(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){ad(e,t,n,r)}mount(e){this.isSVGTag=id(e.tagName),super.mount(e)}},cd=xu.length;function ld(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&ld(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<cd;n++){let r=xu[n],i=e.props[r];(yu(i)||i===!1)&&(t[r]=i)}return t}function ud(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var dd=[...bu].reverse(),fd=bu.length;function pd(e){return t=>Promise.all(t.map(({animation:t,options:n})=>El(e,t,n)))}function md(e){let t=pd(e),n=_d(),r=!0,i=!1,a=t=>(n,r)=>{let i=ol(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=ld(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<fd;t++){let p=dd[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=yu(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||vu(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=hd(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=pl(t)&&pl(n)?!ud(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=ol(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Uc(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=ol(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=_d(),i=!0}}}function hd(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!ud(t,e):!1}function gd(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _d(){return{animate:gd(!0),whileInView:gd(),whileHover:gd(),whileTap:gd(),whileDrag:gd(),whileFocus:gd(),exit:gd()}}function vd(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function yd(e){return $(e)?e.get():e}var bd=(0,R.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function xd(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Sd(...e){return t=>{let n=!1,r=e.map(e=>{let r=xd(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():xd(e[t],null)}}}}function Cd(...e){return R.useCallback(Sd(...e),e)}var wd=class extends R.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(Jl(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=Jl(e)&&e.offsetWidth||0,r=Jl(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function Td({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:o}){let s=(0,R.useId)(),c=(0,R.useRef)(null),l=(0,R.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:u}=(0,R.useContext)(bd),d=Cd(c,e.props?.ref??e?.ref);return(0,R.useInsertionEffect)(()=>{let{width:e,height:a,top:d,left:f,right:p,bottom:m,direction:h}=l.current;if(t||o===!1||!c.current||!e||!a)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;c.current.dataset.motionPopId=s;let y=document.createElement(`style`);u&&(y.nonce=u);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
8
+ [data-motion-pop-id="${s}"] {
9
9
  position: absolute !important;
10
- width: ${p}px !important;
11
- height: ${b}px !important;
12
- ${S}px !important;
13
- ${M}px !important;
10
+ width: ${e}px !important;
11
+ height: ${a}px !important;
12
+ ${_}px !important;
13
+ ${v}px !important;
14
14
  }
15
- `),()=>{var D;(D=u.current)==null||D.removeAttribute("data-motion-pop-id"),I.contains(T)&&I.removeChild(T)}},[t]),a.jsx(Qm,{isPresent:t,childRef:u,sizeRef:l,pop:o,children:o===!1?e:E.cloneElement(e,{ref:w})})}const eg=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:i,anchorX:u,anchorY:l,root:d})=>{const c=Ss(tg),w=f.useId();let m=!0,p=f.useMemo(()=>(m=!1,{id:w,initial:t,isPresent:n,custom:s,onExitComplete:b=>{c.set(b,!0);for(const g of c.values())if(!g)return;r&&r()},register:b=>(c.set(b,!1),()=>c.delete(b))}),[n,c,r]);return o&&m&&(p={...p}),f.useMemo(()=>{c.forEach((b,g)=>c.set(g,!1))},[n]),E.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=a.jsx(Rm,{pop:i==="popLayout",isPresent:n,anchorX:u,anchorY:l,root:d,children:e}),a.jsx(Xn.Provider,{value:p,children:e})};function tg(){return new Map}function ng(e=!0){const t=f.useContext(Xn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=f.useId();f.useEffect(()=>{if(e)return s(o)},[e]);const i=f.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}const wr=e=>e.key||"";function al(e){const t=[];return f.Children.forEach(e,n=>{f.isValidElement(n)&&t.push(n)}),t}const ol=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:i=!1,anchorX:u="left",anchorY:l="top",root:d})=>{const[c,w]=ng(i),m=f.useMemo(()=>al(e),[e]),p=i&&!c?[]:m.map(wr),b=f.useRef(!0),g=f.useRef(m),y=Ss(()=>new Map),x=f.useRef(new Set),[v,C]=f.useState(m),[N,S]=f.useState(m);yi(()=>{b.current=!1,g.current=m;for(let I=0;I<N.length;I++){const D=wr(N[I]);p.includes(D)?(y.delete(D),x.current.delete(D)):y.get(D)!==!0&&y.set(D,!1)}},[N,p.length,p.join("-")]);const M=[];if(m!==v){let I=[...m];for(let D=0;D<N.length;D++){const A=N[D],_=wr(A);p.includes(_)||(I.splice(D,0,A),M.push(A))}return o==="wait"&&M.length&&(I=M),S(al(I)),C(m),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:T}=f.useContext(bi);return a.jsx(a.Fragment,{children:N.map(I=>{const D=wr(I),A=i&&!c?!1:m===N||p.includes(D),_=()=>{if(x.current.has(D))return;if(y.has(D))x.current.add(D),y.set(D,!0);else return;let P=!0;y.forEach(W=>{W||(P=!1)}),P&&(T==null||T(),S(g.current),i&&(w==null||w()),r&&r())};return a.jsx(eg,{isPresent:A,initial:!b.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:d,onExitComplete:A?void 0:_,anchorX:u,anchorY:l,children:I},D)})})},wa=f.createContext({strict:!1}),il={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 ul=!1;function rg(){if(ul)return;const e={};for(const t in il)e[t]={isEnabled:n=>il[t].some(r=>!!n[r])};ju(e),ul=!0}function ll(){return rg(),Tm()}function cl(e){const t=ll();for(const n in e)t[n]={...t[n],...e[n]};ju(t)}function dl({children:e,features:t,strict:n=!1}){const[,r]=f.useState(!fa(t)),s=f.useRef(void 0);if(!fa(t)){const{renderer:o,...i}=t;s.current=o,cl(i)}return f.useEffect(()=>{fa(t)&&t().then(({renderer:o,...i})=>{cl(i),s.current=o,r(!0)})},[]),a.jsx(wa.Provider,{value:{renderer:s.current,strict:n},children:e})}function fa(e){return typeof e=="function"}const sg=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 fr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||sg.has(e)}let wl=e=>!fr(e);function ag(e){typeof e=="function"&&(wl=t=>t.startsWith("on")?!fr(t):e(t))}try{ag(require("@emotion/is-prop-valid").default)}catch{}function og(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||be(e[s])||(wl(s)||n===!0&&fr(s)||!t&&!fr(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const pr=f.createContext({});function ig(e,t){if(cr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||hn(n)?n:void 0,animate:hn(r)?r:void 0}}return e.inherit!==!1?t:{}}function ug(e){const{initial:t,animate:n}=ig(e,f.useContext(pr));return f.useMemo(()=>({initial:t,animate:n}),[fl(t),fl(n)])}function fl(e){return Array.isArray(e)?e.join(" "):e}const pa=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function pl(e,t,n){for(const r in t)!be(t[r])&&!Xu(r,n)&&(e[r]=t[r])}function lg({transformTemplate:e},t){return f.useMemo(()=>{const n=pa();return la(n,t,e),Object.assign({},n.vars,n.style)},[t])}function cg(e,t){const n=e.style||{},r={};return pl(r,n,e),Object.assign(r,lg(e,t)),r}function dg(e,t){const n={},r=cg(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,n}const hl=()=>({...pa(),attrs:{}});function wg(e,t,n,r){const s=f.useMemo(()=>{const o=hl();return Zu(o,t,Qu(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};pl(o,e.style,e),s.style={...o,...s.style}}return s}const fg=["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 ha(e){return typeof e!="string"||e.includes("-")?!1:!!(fg.indexOf(e)>-1||/[A-Z]/u.test(e))}function pg(e,t,n,{latestValues:r},s,o=!1,i){const l=(i??ha(e)?wg:dg)(t,r,s,e),d=og(t,typeof e=="string",o),c=e!==f.Fragment?{...d,...l,ref:n}:{},{children:w}=t,m=f.useMemo(()=>be(w)?w.get():w,[w]);return f.createElement(e,{...c,children:m})}function hg({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:mg(n,r,s,e),renderState:t()}}function mg(e,t,n,r){const s={},o=r(e,{});for(const m in o)s[m]=Xm(o[m]);let{initial:i,animate:u}=e;const l=cr(e),d=Hu(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"&&!lr(w)){const m=Array.isArray(w)?w:[w];for(let p=0;p<m.length;p++){const b=Qs(e,m[p]);if(b){const{transitionEnd:g,transition:y,...x}=b;for(const v in x){let C=x[v];if(Array.isArray(C)){const N=c?C.length-1:0;C=C[N]}C!==null&&(s[v]=C)}for(const v in g)s[v]=g[v]}}}return s}const ml=e=>(t,n)=>{const r=f.useContext(pr),s=f.useContext(Xn),o=()=>hg(e,t,r,s);return n?o():Ss(o)},gg=ml({scrapeMotionValuesFromProps:ca,createRenderState:pa}),bg=ml({scrapeMotionValuesFromProps:Ru,createRenderState:hl}),yg=Symbol.for("motionComponentSymbol");function vg(e,t,n){const r=f.useRef(n);f.useInsertionEffect(()=>{r.current=n});const s=f.useRef(null);return f.useCallback(o=>{var u;o&&((u=e.onMount)==null||u.call(e,o)),t&&(o?t.mount(o):t.unmount());const i=r.current;if(typeof i=="function")if(o){const l=i(o);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):i(o);else i&&(i.current=o)},[t])}const xg=f.createContext({});function Ng(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Sg(e,t,n,r,s,o){var C,N;const{visualElement:i}=f.useContext(pr),u=f.useContext(wa),l=f.useContext(Xn),d=f.useContext(da),c=d.reducedMotion,w=d.skipAnimations,m=f.useRef(null),p=f.useRef(!1);r=r||u.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:w,isSVG:o}),p.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const b=m.current,g=f.useContext(xg);b&&!b.projection&&s&&(b.type==="html"||b.type==="svg")&&Cg(m.current,n,s,g);const y=f.useRef(!1);f.useInsertionEffect(()=>{b&&y.current&&b.update(n,l)});const x=n[Eu],v=f.useRef(!!x&&typeof window<"u"&&!((C=window.MotionHandoffIsComplete)!=null&&C.call(window,x))&&((N=window.MotionHasOptimisedAnimation)==null?void 0:N.call(window,x)));return yi(()=>{p.current=!0,b&&(y.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),v.current&&b.animationState&&b.animationState.animateChanges())}),f.useEffect(()=>{b&&(!v.current&&b.animationState&&b.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,x)}),v.current=!1),b.enteringChildren=void 0)}),b}function Cg(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:u,layoutScroll:l,layoutRoot:d,layoutAnchor:c,layoutCrossfade:w}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:gl(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||u&&Ng(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:w,layoutScroll:l,layoutRoot:d,layoutAnchor:c})}function gl(e){if(e)return e.options.allowProjection!==!1?e.projection:gl(e.parent)}function Tg(e,{forwardMotionProps:t=!1,type:n}={},r,s){const o=n?n==="svg":ha(e),i=o?bg:gg;function u(d,c){let w;const m={...f.useContext(da),...d,layoutId:Eg(d)},{isStatic:p}=m,b=ug(d),g=i(d,p);if(!p&&typeof window<"u"){Ig(m,r);const y=Mg(m);w=y.MeasureLayout,b.visualElement=Sg(e,g,m,s,y.ProjectionNode,o)}return a.jsxs(pr.Provider,{value:b,children:[w&&b.visualElement?a.jsx(w,{visualElement:b.visualElement,...m}):null,pg(e,d,vg(g,b.visualElement,c),g,p,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=f.forwardRef(u);return l[yg]=e,l}function Eg({layoutId:e}){const t=f.useContext(bi).id;return t&&e!==void 0?t+"-"+e:e}function Ig(e,t){f.useContext(wa).strict,process.env.NODE_ENV}function Mg(e){const t=ll(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const kg=(e,t)=>t.isSVG??ha(e)?new Hm(t):new Lm(t,{allowProjection:e!==f.Fragment});class Dg extends Ft{constructor(t){super(t),t.animationState||(t.animationState=Km(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();lr(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 Ag=0;class _g extends Ft{constructor(){super(...arguments),this.id=Ag++,this.isExitComplete=!1}update(){var o;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:i,custom:u}=this.node.getProps();if(typeof i=="string"||typeof i=="object"&&i!==null&&!Array.isArray(i)){const l=mt(this.node,i,u);if(l){const{transition:d,transitionEnd:c,...w}=l;for(const m in w)(o=this.node.getValue(m))==null||o.jump(w[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Pg={animation:{Feature:Dg},exit:{Feature:_g}};function bl(e){return{point:{x:e.pageX,y:e.pageY}}}function yl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&Fe.postRender(()=>o(t,bl(t)))}class Vg extends Ft{mount(){const{current:t}=this.node;t&&(this.unmount=fm(t,(n,r)=>(yl(this.node,r,"Start"),s=>yl(this.node,s,"End"))))}unmount(){}}class Og extends Ft{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=Zn(rl(this.node.current,"focus",()=>this.onFocus()),rl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function vl(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&Fe.postRender(()=>o(t,bl(t)))}class Lg extends Ft{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=bm(t,(s,o)=>(vl(this.node,o,"Start"),(i,{success:u})=>vl(this.node,i,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const ma=new WeakMap,ga=new WeakMap,Fg=e=>{const t=ma.get(e.target);t&&t(e)},Wg=e=>{e.forEach(Fg)};function Bg({root:e,...t}){const n=e||document;ga.has(n)||ga.set(n,{});const r=ga.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(Wg,{root:e,...t})),r[s]}function $g(e,t,n){const r=Bg(t);return ma.set(e,n),r.observe(e),()=>{ma.delete(e),r.unobserve(e)}}const qg={some:0,all:1};class Hg extends Ft{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:qg[s]},u=d=>{const{isIntersecting:c}=d;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:w,onViewportLeave:m}=this.node.getProps(),p=c?w:m;p&&p(d)};this.stopObserver=$g(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(zg(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function zg({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const xl={renderer:kg,...Pg,...{inView:{Feature:Hg},tap:{Feature:Lg},focus:{Feature:Og},hover:{Feature:Vg}}};function Ug(e,t){return Tg(e,t)}const Nl=Ug("div"),jg=e=>{const{checked:t,onSelect:n,children:r,disabled:s,preventCloseOnSelect:o}=e;return a.jsx(di,{disabled:s,checked:t,onCheckedChange:n,onSelect:i=>o&&i.preventDefault(),children:r})},hr=e=>{const{children:t,className:n,Icon:r,iconPosition:s="left",disabled:o,onSelect:i,preventCloseOnSelect:u}=e,l=h("wu-flex wu-items-center wu-gap-2",r&&(s==="left"?"":"wu-justify-between wu-flex-row-reverse"),n),d=c=>{i&&i(c),u&&c.preventDefault()};return a.jsxs(Kn,{onSelect:d,disabled:o,className:l,children:[r&&a.jsx("div",{className:"wu-text-base",children:r}),t]})},Gg=e=>{const{children:t,Label:n,...r}=e;return a.jsxs(ui,{...r,children:[a.jsx(on,{children:n||e.label}),t]})},Kg=e=>{const{options:t,value:n,onSelect:r}=e;return a.jsx($f,{value:n,onValueChange:r,children:t.map(s=>a.jsx(wi,{value:s.value,disabled:s.disabled,children:s.Label||s.label},s.value))})},Yg=e=>{const{className:t,...n}=e,r=h("wu-w-11/12 wu-mx-auto wu-border-gray-40",t);return a.jsx(Yn,{...n,className:r})},Wt=E.forwardRef(({className:e,children:t,thumbColor:n,railColor:r,...s},o)=>a.jsxs(ut.Root,{ref:o,className:h("wu-relative wu-overflow-hidden",e),children:[a.jsx(ut.Viewport,{className:"wu-h-full wu-w-full wu-rounded-[inherit]",...s,children:t}),a.jsx(ba,{thumbColor:n,railColor:r}),a.jsx(ut.Corner,{})]}));Wt.displayName=ut.Root.displayName;const ba=E.forwardRef(({className:e,orientation:t="vertical",thumbColor:n="#d4d4d4",railColor:r="#eeeeee",...s},o)=>a.jsx(ut.ScrollAreaScrollbar,{ref:o,orientation:t,className:h("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:r},...s,children:a.jsx(ut.ScrollAreaThumb,{className:"wu-relative wu-flex-1 wu-rounded-full",style:{background:n}})}));ba.displayName=ut.ScrollAreaScrollbar.displayName;const Xg=e=>{const{children:t,label:n,Label:r,open:s,onOpenChange:o,height:i,dir:u,...l}=e;return a.jsxs(Bf,{...l,open:s,onOpenChange:o,children:[a.jsx(li,{dir:u,children:r||n}),a.jsx(Wf,{children:a.jsx(ci,{onInteractOutside:d=>d.preventDefault(),children:a.jsx(Wt,{className:"wu-h-fit",style:{height:i},dir:u,children:t})})})]})},Zg="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",ya=e=>{const{children:t,menuTitle:n,MenuTitle:r,variant:s="flat",name:o,open:i,onOpenChange:u,height:l,preventCloseOnClickOutside:d,dir:c,Trigger:w,align:m="start",sideOffset:p=0,side:b="bottom",alignOffset:g,className:y,disabled:x,...v}=e;return a.jsxs(oi,{...v,open:i,onOpenChange:u,dir:c,children:[a.jsx(ii,{asChild:!0,dir:c,disabled:x,className:h("disabled:wu-text-zinc-300 disabled:wu-bg-white disabled:wu-cursor-not-allowed disabled:hover:wu-bg-transparent"),children:w??Jg(s,o,x)}),a.jsx(xs,{className:h("wu-w-56 wu-border wu-border-blue-p disabled:wu-border-gray-40",y,"wu-menu-content"),align:m,sideOffset:p,side:b,alignOffset:g,onInteractOutside:C=>d&&C.preventDefault(),children:a.jsxs(Wt,{className:"h-fit",style:{height:l},dir:c,children:[(n||r)&&a.jsxs(a.Fragment,{children:[a.jsx(on,{dir:c,className:"wu-menu-title",children:r||n}),a.jsx(Yn,{className:"wu-mt-0 wu-menu-separator",dir:c})]}),t??a.jsx("p",{children:"Menu Is Empty"})]})})]})},Jg=(e,t,n)=>{const r=h(Zg,"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:r,"aria-label":"menu-trigger",children:[a.jsx("span",{children:t??"Menu"}),a.jsx("span",{className:h("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")})]})},Qg=({titles:e,dir:t="ltr",handleTitleClick:n})=>{const[r,s]=f.useState(!1);return a.jsx(ya,{className:"wu-rounded-sm",open:r,onOpenChange:s,dir:t,sideOffset:4,Trigger:a.jsx(Ie,{variant:"iconOnly",className:h("wu-w-6 wu-h-6 wu-shrink-0 wu-rounded-sm"),Icon:a.jsx("span",{className:h("wm-keyboard-arrow-down wu-text-[16px] wu-origin-center wu-transition-transform wu-duration-300",r&&(t==="rtl"?"-wu-rotate-180":"wu-rotate-180"))})}),children:e.map(o=>a.jsx(hr,{onSelect:i=>n(i,o.id),children:o.title},o.id))})},Rg=({titles:e,currentLevel:t,initial:n,handleTitleClick:r,headerClasses:s,offsetHeight:o,dir:i="ltr"})=>{const u=f.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:h("wu-absolute wu-top-0 wu-left-0 wu-flex wu-gap-x-2 wu-px-4 wu-items-center wu-origin-left wu-w-full wu-transition wu-duration-200",t!==n?"wu-translate-x-0 wu-opacity-100 wu-z-50 wu-delay-200":i==="rtl"?"wu-translate-x-1 wu-opacity-0 wu-z-0 wu-delay-0":"-wu-translate-x-1 wu-opacity-0 wu-z-0 wu-delay-0",s),style:{height:t!==n?`${o}px`:"-40px"},dir:i,children:[a.jsx(Qg,{titles:e,handleTitleClick:r,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(dl,{features:xl,children:a.jsxs(ol,{initial:!1,mode:"popLayout",children:[eb(e).map((l,d)=>a.jsx(Nl,{initial:u.initial,animate:u.animate,exit:u.exit,transition:{duration:.4,ease:"easeInOut"},children:a.jsxs("h6",{"data-id":l.id,onClick:r,className:h("wu-flex wu-text-sm wu-leading-4 wu-font-normal wu-items-center wu-gap-2",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:h("wm-keyboard-arrow-right wu-text-[16px] wu-font-light wu-max-w-4 wu-flex wu-justify-center",i==="rtl"&&"wu-rotate-180")}),l.id==="LEVEL_DOTS"?a.jsx("span",{className:"wu-flex wu-justify-center wu-w-[11px]",children:l.title}):l.title]})},l.id)),"``"]})})})]})},eb=e=>{const t=e.length;if(t>2){const n=e[0],r=e[t-1];return[n,{id:"LEVEL_DOTS",title:"..."},r]}return e},tb=({items:e,initial:t,baseTitle:n,mode:r="popLayout",headerClasses:s="",offsetHeight:o=40,variant:i="default",dir:u="ltr"})=>{const[l,d]=f.useState(n?[n]:[]),[[c,w],m]=f.useState([t,1]),p=(x,v)=>{v&&d([...l,v]),m([x,1])},b=x=>{const v=l.findIndex(C=>C.id===x);if(v!==-1){const C=l.slice(0,v+1);d(C)}m([x,-1])},g=(x,v)=>{const C=v||x.currentTarget.getAttribute("data-id")||"";if(C&&C!==c){const N=l.findIndex(S=>S.id===C);N!==-1&&(d(l.slice(0,N+1)),b(C))}},y=()=>{const x=e[c]?e[c]:null;if(!x)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 x.component=="function"?x.component({goNext:p,goBack:b}):x.component;return a.jsx(Nl,{dir:u,custom:w,variants:nb(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(Rg,{titles:l,currentLevel:c,initial:t,handleTitleClick:g,headerClasses:s,offsetHeight:o,dir:u}),a.jsx(dl,{features:xl,children:a.jsx(ol,{initial:!1,custom:w,mode:r,children:y()})})]})},nb=e=>{switch(e){case"slideRight":return sb;case"slideLeft":return ab;case"fadeZoom":return ob;case"default":default:return rb}},rb={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})},sb={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})},ab={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})},ob={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}},Sl=({className:e,isLoading:t,loadingText:n,children:r,...s})=>a.jsxs("footer",{className:h("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),...s,children:[a.jsx("div",{className:"wu-flex-1",children:r}),t&&a.jsx(ct,{size:"16px",variant:"spinner",color:"#a3a3a3",message:n})]});Sl.displayName="WuFooter";const Cl=f.forwardRef((e,t)=>{const{size:n="sm",idOrSlugOrUrl:r,variant:s="primary",...o}=e,i=n==="sm"?16:18,u=r.includes("http")?r:`/help/${r}.html`,l=s==="primary"?"wu-text-blue-p":"wu-text-gray-lead";return a.jsx("button",{...o,ref:t,onClick:()=>Br(u),children:a.jsx("span",{className:h("wm-help wu-text-gray-subtle",`wu-text-[${i}px]`,l,o.disabled&&"wu-text-neutral-300","wu-help-button-icon")})})});Cl.displayName="WuHelpButton";const st=(e,t)=>`wu-listbox-${e}`;function ib(e){const{option:t,accessorKey:n,onSelect:r,multiple:s,dir:o,GroupLabel:i,Item:u,isSelected:l,...d}=e,c=n.group&&Array.isArray(t[n.group]),w=({item:m,className:p})=>f.createElement(an,{...d,key:JSON.stringify(m),onSelect:()=>r==null?void 0:r(m),value:t[n.value],className:h("data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-10",!!(l!=null&&l(m))&&!s&&"wu-bg-blue-p/10",o==="rtl"&&"wu-justify-end",p,st("item")),disabled:m.disabled},s&&a.jsx(qe,{checked:l==null?void 0:l(m)}),u?u({value:m,isSelected:l==null?void 0:l(m)}):a.jsx(a.Fragment,{children:m[n.label]}));if(c){const m=t[n.group],p=typeof i=="string"?t[i]:i==null?void 0:i(t);return a.jsx(sn,{heading:p,children:m==null?void 0:m.map(b=>a.jsx(w,{item:b,className:"wu-pl-6"},JSON.stringify(b)))})}return a.jsx(w,{item:t})}const ub=f.memo(ib),lb=e=>{const{className:t,...n}=e;return a.jsxs("div",{className:"wu-relative",children:[a.jsx(Oe,{icon:"wm-search",className:"wu-absolute wu-top-[14px] wu-left-5"}),a.jsx(si,{...n,"aria-label":"Search",className:h("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;",st("input"),t)})]})},cb=e=>{const{label:t,onSelectAll:n,data:r,value:s}=e,[o,i]=f.useState(!1),[u,l]=f.useState(!1);return f.useEffect(()=>{!s||!r||(i(s.length>0),l(s.length>0&&s.length<r.length))},[r,s]),a.jsxs(an,{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(qe,{checked:o,partial:u}),t||"Select All"]})},db=e=>{const{CustomTrigger:t,disabled:n,value:r,placeholder:s,accessorKey:o,Chip:i,handleUnselect:u,variant:l,dir:d,className:c,...w}=e,[m,p]=f.useState(),b=f.useRef(null);return f.useEffect(()=>{if(!r){p(null);return}p(Array.isArray(r)?i?r.map((y,x)=>i({value:y,unselect:u,key:x})):r.map(y=>y[o.label]).join(", "):i?i({value:r,unselect:u}):r[o.label])},[r,i,o.label,p]),a.jsx(dt,{asChild:!0,id:e.id,disabled:n,ref:b,children:(t==null?void 0:t(r))||a.jsxs("button",{...w,className:h("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,st("trigger")),children:[a.jsx("div",{className:h("wu-truncate",i&&"wu-flex wu-items-center wu-gap-1 wu-flex-wrap",!m&&"wu-font-light"),children:m||s}),a.jsx(Oe,{icon:"wm-arrow-drop-down",className:h("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",st("drop-icon"))})]})})},Tl=(e,t,n)=>{const r=String(e[n.label]??"").toLowerCase(),s=String(e[n.value]??"").toLowerCase();return r.includes(t)||s.includes(t)},wb=(e,t,n)=>{const r=t.trim();if(r==="")return e;const s=r.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=>Tl(c,s,n));d.length>0&&o.push({...i,[u]:d})}else Tl(i,s,n)&&o.push(i)}return o},El=e=>{const{data:t,accessorKey:n,value:r,Item:s,Label:o,GroupLabel:i,CustomHeader:u,CustomTrigger:l,NoDataContent:d,Chip:c,onSelect:w,onScroll:m,disabled:p,multiple:b,searchable:g,selectAll:y,virtualizedThreshold:x=100,showGroupSeparator:v,id:C,dir:N,className:S,listClass:M,placeholder:T="Select items...",variant:I,labelPosition:D="top",maxContentWidth:A,maxContentHeight:_,modal:P,...W}=e,[F,B]=f.useState(!1),[$,ie]=f.useState(""),[U,V]=f.useState(r),q=f.useMemo(()=>n,[n]),H=f.useMemo(()=>{if(!g||!$)return t;const K=$.toLowerCase().trim();return wb(t,K,n)},[t,$,n.label,g]),Q=K=>{b?V(O=>{const j=K[n.value],Y=Array.isArray(O)?O:[],G=Y.some(X=>X[n.value]===j)?Y.filter(X=>X[n.value]!==j):[...Y,K];return w&&w(G),G}):(V(K),w&&w(K),B(!1))},ee=f.useCallback(K=>{const O=K?t:[];V(O),y!=null&&y.onSelectAll&&y.onSelectAll(K),w&&w(O)},[t,y,w]),J=K=>Array.isArray(U)?U.some(O=>O[n.value]===K[n.value]):(U==null?void 0:U[n.value])===K[n.value];f.useEffect(()=>{V(r)},[r]);const ge=K=>{const O=(j,Y)=>{const Z=n.group&&Array.isArray(j[n.group]),G=v&&Z&&Y>0&&K.length>1;return a.jsxs(f.Fragment,{children:[G&&a.jsx(vs,{}),a.jsx(ub,{option:j,accessorKey:q,multiple:b,onSelect:X=>Q(X),dir:N,GroupLabel:i,Item:s,isSelected:X=>J(X)})]},JSON.stringify(j))};return K.length>x?a.jsx(Mt,{list:K,callback:(j,Y)=>O(Y,j),dir:N}):K.map((j,Y)=>O(j,Y))};return a.jsxs("div",{className:h("wu-flex wu-text-sm wu-gap-2",D==="top"&&"wu-flex-col wu-gap-1",D==="left"&&"wu-flex-row",D==="right"&&"wu-flex-row-reverse",st("container")),dir:N,children:[o&&a.jsx(Me,{htmlFor:C,className:st("label"),children:o}),a.jsxs(je,{open:F,onOpenChange:K=>{B(K),K||setTimeout(()=>{ie("")},100)},modal:P,children:[a.jsx(db,{CustomTrigger:l,disabled:p,value:U,accessorKey:n,placeholder:T,Chip:c,className:S,handleUnselect:Q,variant:I,id:C,dir:N,...W}),a.jsx($e,{className:h("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",st("content")),align:"start",sideOffset:-1,style:{maxWidth:A},children:a.jsxs(gs,{id:e.id,shouldFilter:!1,children:[g&&a.jsx(lb,{value:$,onValueChange:ie}),u,a.jsxs(bs,{className:h("wu-overflow-y-auto",st("list"),M),onScroll:m,style:{maxHeight:_||"420px"},children:[a.jsx(ys,{children:d||"No results found."}),a.jsx(sn,{children:b&&(y==null?void 0:y.enabled)&&!$&&a.jsx(cb,{data:t,value:U,onSelectAll:ee,label:y.label})}),a.jsx(sn,{children:ge(H)})]})]})})]})]})},va=f.forwardRef(({showMenu:e=!1,className:t,color:n="#1B3380",...r},s)=>{const o=h("wu-w-full wu-border wu-transition-all wu-duration-300");return a.jsxs("div",{...r,className:h("wu-flex wu-flex-col wu-w-[18px] wu-justify-between wu-aspect-[3/2] wu-transition-all wu-duration-300",t),ref:s,"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}})]})});va.displayName="WuMenuIcon";const Il={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%]"},Ml=re.Root,kl=re.Trigger,fb=re.Portal,pb=re.Close,Dl=f.forwardRef(({className:e,...t},n)=>a.jsx(re.Overlay,{ref:n,className:h("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30",Il.overlay,e),...t}));Dl.displayName=re.Overlay.displayName;const xa=f.forwardRef(({className:e,children:t,hideCloseButton:n,isStackedCard:r,...s},o)=>a.jsxs(fb,{children:[a.jsx(Dl,{className:r?"wu-bg-transparent":"","data-wu-overlay":!0}),a.jsxs(re.Content,{ref:o,className:h("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",Il.content,e),...s,children:[t,!n&&a.jsx(re.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Xt,{variant:"iconOnly",className:h("wu-absolute wu-right-2 wu-top-1 hover:wu-bg-black/[0.08] wu-w-8 wu-h-8 wu-p-0","wu-top-3 wu-right-4","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-leading-5"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));xa.displayName=re.Content.displayName;const Na=({className:e,...t})=>a.jsx("div",{className:h("wu-text-center wu-bg-gray-20 wu-w-full",e),...t});Na.displayName="DialogHeader";const Al=({className:e,...t})=>a.jsx("div",{className:h("wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2 wu-p-4",e),...t});Al.displayName="DialogFooter";const Sa=f.forwardRef(({className:e,...t},n)=>a.jsx(re.Title,{ref:n,className:h("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}));Sa.displayName=re.Title.displayName;const hb=f.forwardRef(({className:e,...t},n)=>a.jsx(re.Description,{ref:n,className:h("wu-text-sm wu-text-muted-foreground",e),...t}));hb.displayName=re.Description.displayName;const mb={gradientBackground:"_gradientBackground_1uc4j_1"},_l=e=>{const{colors:t,size:n=.55,children:r,className:s,strokeWidth:o,centerOffset:i={x:0,y:0},...u}=e,l=f.useRef(null);return f.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 m=p=>{w&&cancelAnimationFrame(w),w=requestAnimationFrame(()=>{const b=d.getBoundingClientRect();let g=p.clientX-b.left,y=p.clientY-b.top;g=Math.max(0,Math.min(g+i.x,b.width)),y=Math.max(0,Math.min(y+i.y,b.height));const x=`radial-gradient(
16
- var(--width) var(--height) ellipse at ${g}px ${y}px,
15
+ `),()=>{c.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,a.jsx)(wd,{isPresent:t,childRef:c,sizeRef:l,pop:o,children:o===!1?e:R.cloneElement(e,{ref:d})})}var Ed=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:c,anchorY:l,root:u})=>{let d=Yi(Dd),f=(0,R.useId)(),p=!0,m=(0,R.useMemo)(()=>(p=!1,{id:f,initial:t,isPresent:n,custom:i,onExitComplete:e=>{d.set(e,!0);for(let e of d.values())if(!e)return;r&&r()},register:e=>(d.set(e,!1),()=>d.delete(e))}),[n,d,r]);return o&&p&&(m={...m}),(0,R.useMemo)(()=>{d.forEach((e,t)=>d.set(t,!1))},[n]),R.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=(0,a.jsx)(Td,{pop:s===`popLayout`,isPresent:n,anchorX:c,anchorY:l,root:u,children:e}),(0,a.jsx)(Zi.Provider,{value:m,children:e})};function Dd(){return new Map}function Od(e=!0){let t=(0,R.useContext)(Zi);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,R.useId)();(0,R.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,R.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var kd=e=>e.key||``;function Ad(e){let t=[];return R.Children.forEach(e,e=>{(0,R.isValidElement)(e)&&t.push(e)}),t}var jd=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o=`sync`,propagate:s=!1,anchorX:c=`left`,anchorY:l=`top`,root:u})=>{let[d,f]=Od(s),p=(0,R.useMemo)(()=>Ad(e),[e]),m=s&&!d?[]:p.map(kd),h=(0,R.useRef)(!0),g=(0,R.useRef)(p),_=Yi(()=>new Map),v=(0,R.useRef)(new Set),[y,b]=(0,R.useState)(p),[x,S]=(0,R.useState)(p);Xi(()=>{h.current=!1,g.current=p;for(let e=0;e<x.length;e++){let t=kd(x[e]);m.includes(t)?(_.delete(t),v.current.delete(t)):_.get(t)!==!0&&_.set(t,!1)}},[x,m.length,m.join(`-`)]);let C=[];if(p!==y){let e=[...p];for(let t=0;t<x.length;t++){let n=x[t],r=kd(n);m.includes(r)||(e.splice(t,0,n),C.push(n))}return o===`wait`&&C.length&&(e=C),S(Ad(e)),b(p),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.`);let{forceRender:w}=(0,R.useContext)(Ji);return(0,a.jsx)(a.Fragment,{children:x.map(e=>{let y=kd(e),b=s&&!d?!1:p===x||m.includes(y);return(0,a.jsx)(Ed,{isPresent:b,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:u,onExitComplete:b?void 0:()=>{if(v.current.has(y))return;if(_.has(y))v.current.add(y),_.set(y,!0);else return;let e=!0;_.forEach(t=>{t||(e=!1)}),e&&(w?.(),S(g.current),s&&f?.(),r&&r())},anchorX:c,anchorY:l,children:e},y)})})},Md=(0,R.createContext)({strict:!1}),Nd={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`]},Pd=!1;function Fd(){if(Pd)return;let e={};for(let t in Nd)e[t]={isEnabled:e=>Nd[t].some(t=>!!e[t])};ju(e),Pd=!0}function Id(){return Fd(),Mu()}function Ld(e){let t=Id();for(let n in e)t[n]={...t[n],...e[n]};ju(t)}function Rd({children:e,features:t,strict:n=!1}){let[,r]=(0,R.useState)(!zd(t)),i=(0,R.useRef)(void 0);if(!zd(t)){let{renderer:e,...n}=t;i.current=e,Ld(n)}return(0,R.useEffect)(()=>{zd(t)&&t().then(({renderer:e,...t})=>{Ld(t),i.current=e,r(!0)})},[]),(0,a.jsx)(Md.Provider,{value:{renderer:i.current,strict:n},children:e})}function zd(e){return typeof e==`function`}var Bd=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`.split(`.`));function Vd(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Bd.has(e)}var Hd=I({default:()=>Ud}),Ud,Wd=F((()=>{throw Ud={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),Gd=e=>!Vd(e);function Kd(e){typeof e==`function`&&(Gd=t=>t.startsWith(`on`)?!Vd(t):e(t))}try{Kd((Wd(),te(Hd)).default)}catch{}function qd(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||$(e[i])||(Gd(i)||n===!0&&Vd(i)||!t&&!Vd(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var Jd=(0,R.createContext)({});function Yd(e,t){if(Su(e)){let{initial:t,animate:n}=e;return{initial:t===!1||yu(t)?t:void 0,animate:yu(n)?n:void 0}}return e.inherit===!1?{}:t}function Xd(e){let{initial:t,animate:n}=Yd(e,(0,R.useContext)(Jd));return(0,R.useMemo)(()=>({initial:t,animate:n}),[Zd(t),Zd(n)])}function Zd(e){return Array.isArray(e)?e.join(` `):e}var Qd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $d(e,t,n){for(let r in t)!$(t[r])&&!Ju(r,n)&&(e[r]=t[r])}function ef({transformTemplate:e},t){return(0,R.useMemo)(()=>{let n=Qd();return Hu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tf(e,t){let n=e.style||{},r={};return $d(r,n,e),Object.assign(r,ef(e,t)),r}function nf(e,t){let n={},r=tf(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.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=r,n}var rf=()=>({...Qd(),attrs:{}});function af(e,t,n,r){let i=(0,R.useMemo)(()=>{let n=rf();return nd(n,t,id(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};$d(t,e.style,e),i.style={...t,...i.style}}return i}var of=[`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 sf(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(of.indexOf(e)>-1||/[A-Z]/u.test(e))}function cf(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??sf(e)?af:nf)(t,r,i,e),c=qd(t,typeof e==`string`,a),l=e===R.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,R.useMemo)(()=>$(u)?u.get():u,[u]);return(0,R.createElement)(e,{...l,children:d})}function lf({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:uf(n,r,i,e),renderState:t()}}function uf(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=yd(a[e]);let{initial:o,animate:s}=e,c=Su(e),l=Cu(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!vu(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=al(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var df=e=>(t,n)=>{let r=(0,R.useContext)(Jd),i=(0,R.useContext)(Zi),a=()=>lf(e,t,r,i);return n?a():Yi(a)},ff=df({scrapeMotionValuesFromProps:Yu,createRenderState:Qd}),pf=df({scrapeMotionValuesFromProps:od,createRenderState:rf}),mf=Symbol.for(`motionComponentSymbol`);function hf(e,t,n){let r=(0,R.useRef)(n);(0,R.useInsertionEffect)(()=>{r.current=n});let i=(0,R.useRef)(null);return(0,R.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var gf=(0,R.createContext)({});function _f(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function vf(e,t,n,r,i,a){let{visualElement:o}=(0,R.useContext)(Jd),s=(0,R.useContext)(Md),c=(0,R.useContext)(Zi),l=(0,R.useContext)(bd),u=l.reducedMotion,d=l.skipAnimations,f=(0,R.useRef)(null),p=(0,R.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,R.useContext)(gf);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&yf(f.current,n,i,h);let g=(0,R.useRef)(!1);(0,R.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[bl],v=(0,R.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return Xi(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,R.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function yf(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:bf(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&_f(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function bf(e){if(e)return e.options.allowProjection===!1?bf(e.parent):e.projection}function xf(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Ld(r);let o=n?n===`svg`:sf(e),s=o?pf:ff;function c(n,c){let l,u={...(0,R.useContext)(bd),...n,layoutId:Sf(n)},{isStatic:d}=u,f=Xd(n),p=s(n,d);if(!d&&typeof window<`u`){Cf(u,r);let t=wf(u);l=t.MeasureLayout,f.visualElement=vf(e,p,u,i,t.ProjectionNode,o)}return(0,a.jsxs)(Jd.Provider,{value:f,children:[l&&f.visualElement?(0,a.jsx)(l,{visualElement:f.visualElement,...u}):null,cf(e,n,hf(p,f.visualElement,c),p,d,t,o)]})}c.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let l=(0,R.forwardRef)(c);return l[mf]=e,l}function Sf({layoutId:e}){let t=(0,R.useContext)(Ji).id;return t&&e!==void 0?t+`-`+e:e}function Cf(e,t){let n=(0,R.useContext)(Md).strict;if(process.env.NODE_ENV!==`production`&&t&&n){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?na(!1,t,`lazy-strict-mode`):ra(!1,t,`lazy-strict-mode`)}}function wf(e){let{drag:t,layout:n}=Id();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}var Tf=(e,t)=>t.isSVG??sf(e)?new sd(t):new Zu(t,{allowProjection:e!==R.Fragment}),Ef=class extends Fu{constructor(e){super(e),e.animationState||=md(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();vu(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Df=0,Of={animation:{Feature:Ef},exit:{Feature:class extends Fu{constructor(){super(...arguments),this.id=Df++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=ol(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function kf(e){return{point:{x:e.pageX,y:e.pageY}}}function Af(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&Ga.postRender(()=>i(t,kf(t)))}var jf=class extends Fu{mount(){let{current:e}=this.node;e&&(this.unmount=tu(e,(e,t)=>(Af(this.node,t,`Start`),e=>Af(this.node,e,`End`))))}unmount(){}},Mf=class extends Fu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!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=ua(vd(this.node.current,`focus`,()=>this.onFocus()),vd(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Nf(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&Ga.postRender(()=>i(t,kf(t)))}var Pf=class extends Fu{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=fu(e,(e,t)=>(Nf(this.node,t,`Start`),(e,{success:t})=>Nf(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Ff=new WeakMap,If=new WeakMap,Lf=e=>{let t=Ff.get(e.target);t&&t(e)},Rf=e=>{e.forEach(Lf)};function zf({root:e,...t}){let n=e||document;If.has(n)||If.set(n,{});let r=If.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Rf,{root:e,...t})),r[i]}function Bf(e,t,n){let r=zf(t);return Ff.set(e,n),r.observe(e),()=>{Ff.delete(e),r.unobserve(e)}}var Vf={some:0,all:1},Hf=class extends Fu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Vf[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Bf(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Uf(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Uf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Wf={inView:{Feature:Hf},tap:{Feature:Pf},focus:{Feature:Mf},hover:{Feature:jf}},Gf={renderer:Tf,...Of,...Wf};function Kf(e,t){return xf(e,t)}var qf=Kf(`div`),Jf=e=>{let{checked:t,onSelect:n,children:r,disabled:i,preventCloseOnSelect:o}=e;return(0,a.jsx)(Si,{disabled:i,checked:t,onCheckedChange:n,onSelect:e=>o&&e.preventDefault(),children:r})},Yf=e=>{let{children:t,className:n,Icon:r,iconPosition:i=`left`,disabled:o,onSelect:s,preventCloseOnSelect:c}=e,l=z(`wu-flex wu-items-center wu-gap-2`,r&&(i===`left`?``:`wu-justify-between wu-flex-row-reverse`),n);return(0,a.jsxs)(xi,{onSelect:e=>{s&&s(e),c&&e.preventDefault()},disabled:o,className:l,children:[r&&(0,a.jsx)(`div`,{className:`wu-text-base`,children:r}),t]})},Xf=e=>{let{children:t,Label:n,...r}=e;return(0,a.jsxs)(mi,{...r,children:[(0,a.jsx)(wi,{children:n||e.label}),t]})},Zf=e=>{let{options:t,value:n,onSelect:r}=e;return(0,a.jsx)(_i,{value:n,onValueChange:r,children:t.map(e=>(0,a.jsx)(Ci,{value:e.value,disabled:e.disabled,children:e.Label||e.label},e.value))})},Qf=e=>{let{className:t,...n}=e,r=z(`wu-w-11/12 wu-mx-auto wu-border-gray-40`,t);return(0,a.jsx)(Ti,{...n,className:r})},$f=R.forwardRef(({className:e,children:t,thumbColor:n,railColor:r,...i},o)=>(0,a.jsxs)(b.Root,{ref:o,className:z(`wu-relative wu-overflow-hidden`,e),children:[(0,a.jsx)(b.Viewport,{className:`wu-h-full wu-w-full wu-rounded-[inherit]`,...i,children:t}),(0,a.jsx)(ep,{thumbColor:n,railColor:r}),(0,a.jsx)(b.Corner,{})]}));$f.displayName=b.Root.displayName;var ep=R.forwardRef(({className:e,orientation:t=`vertical`,thumbColor:n=`#d4d4d4`,railColor:r=`#eeeeee`,...i},o)=>(0,a.jsx)(b.ScrollAreaScrollbar,{ref:o,orientation:t,className:z(`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:r},...i,children:(0,a.jsx)(b.ScrollAreaThumb,{className:`wu-relative wu-flex-1 wu-rounded-full`,style:{background:n}})}));ep.displayName=b.ScrollAreaScrollbar.displayName;var tp=e=>{let{children:t,label:n,Label:r,open:i,onOpenChange:o,height:s,dir:c,...l}=e;return(0,a.jsxs)(gi,{...l,open:i,onOpenChange:o,children:[(0,a.jsx)(vi,{dir:c,children:r||n}),(0,a.jsx)(hi,{children:(0,a.jsx)(yi,{onInteractOutside:e=>e.preventDefault(),children:(0,a.jsx)($f,{className:`wu-h-fit`,style:{height:s},dir:c,children:t})})})]})},np=`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`,rp=e=>{let{children:t,menuTitle:n,MenuTitle:r,variant:i=`flat`,name:o,open:s,onOpenChange:c,height:l,preventCloseOnClickOutside:u,dir:d,Trigger:f,align:p=`start`,sideOffset:m=0,side:h=`bottom`,alignOffset:g,className:_,disabled:v,...y}=e;return(0,a.jsxs)(fi,{...y,open:s,onOpenChange:c,dir:d,children:[(0,a.jsx)(pi,{asChild:!0,dir:d,disabled:v,className:z(`disabled:wu-text-zinc-300 disabled:wu-bg-white disabled:wu-cursor-not-allowed disabled:hover:wu-bg-transparent`),children:f??ip(i,o,v)}),(0,a.jsx)(bi,{className:z(`wu-w-56 wu-border wu-border-blue-p disabled:wu-border-gray-40`,_,`wu-menu-content`),align:p,sideOffset:m,side:h,alignOffset:g,onInteractOutside:e=>u&&e.preventDefault(),children:(0,a.jsxs)($f,{className:`h-fit`,style:{height:l},dir:d,children:[(n||r)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(wi,{dir:d,className:`wu-menu-title`,children:r||n}),(0,a.jsx)(Ti,{className:`wu-mt-0 wu-menu-separator`,dir:d})]}),t??(0,a.jsx)(`p`,{children:`Menu Is Empty`})]})})]})},ip=(e,t,n)=>(0,a.jsxs)(`button`,{className:z(np,`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`),"aria-label":`menu-trigger`,children:[(0,a.jsx)(`span`,{children:t??`Menu`}),(0,a.jsx)(`span`,{className:z(`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`)})]}),ap=({titles:e,dir:t=`ltr`,handleTitleClick:n})=>{let[r,i]=R.default.useState(!1);return(0,a.jsx)(rp,{className:`wu-rounded-sm`,open:r,onOpenChange:i,dir:t,sideOffset:4,Trigger:(0,a.jsx)(W,{variant:`iconOnly`,className:z(`wu-w-6 wu-h-6 wu-shrink-0 wu-rounded-sm`),Icon:(0,a.jsx)(`span`,{className:z(`wm-keyboard-arrow-down wu-text-[16px] wu-origin-center wu-transition-transform wu-duration-300`,r&&(t===`rtl`?`-wu-rotate-180`:`wu-rotate-180`))})}),children:e.map(e=>(0,a.jsx)(Yf,{onSelect:t=>n(t,e.id),children:e.title},e.id))})},op=({titles:e,currentLevel:t,initial:n,handleTitleClick:r,headerClasses:i,offsetHeight:o,dir:s=`ltr`})=>{let c=(0,R.useMemo)(()=>s===`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}},[s]);return(0,a.jsxs)(`div`,{className:z(`wu-absolute wu-top-0 wu-left-0 wu-flex wu-gap-x-2 wu-px-4 wu-items-center wu-origin-left wu-w-full wu-transition wu-duration-200`,t===n?s===`rtl`?`wu-translate-x-1 wu-opacity-0 wu-z-0 wu-delay-0`:`-wu-translate-x-1 wu-opacity-0 wu-z-0 wu-delay-0`:`wu-translate-x-0 wu-opacity-100 wu-z-50 wu-delay-200`,i),style:{height:t===n?`-40px`:`${o}px`},dir:s,children:[(0,a.jsx)(ap,{titles:e,handleTitleClick:r,dir:s}),(0,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:(0,a.jsx)(Rd,{features:Gf,children:(0,a.jsxs)(jd,{initial:!1,mode:`popLayout`,children:[sp(e).map((e,t)=>(0,a.jsx)(qf,{initial:c.initial,animate:c.animate,exit:c.exit,transition:{duration:.4,ease:`easeInOut`},children:(0,a.jsxs)(`h6`,{"data-id":e.id,onClick:r,className:z(`wu-flex wu-text-sm wu-leading-4 wu-font-normal wu-items-center wu-gap-2`,t===2||t===1||e.id===`LEVEL_DOTS`?`wu-cursor-default wu-text-gray-600`:`wu-cursor-pointer wu-text-[#1B87E6] wu-hover:text-[#145DBF]/70`),children:[t!==0&&(0,a.jsx)(`span`,{className:z(`wm-keyboard-arrow-right wu-text-[16px] wu-font-light wu-max-w-4 wu-flex wu-justify-center`,s===`rtl`&&`wu-rotate-180`)}),e.id===`LEVEL_DOTS`?(0,a.jsx)(`span`,{className:`wu-flex wu-justify-center wu-w-[11px]`,children:e.title}):e.title]})},e.id)),"``"]})})})]})},sp=e=>{let t=e.length;return t>2?[e[0],{id:`LEVEL_DOTS`,title:`...`},e[t-1]]:e},cp=({items:e,initial:t,baseTitle:n,mode:r=`popLayout`,headerClasses:i=``,offsetHeight:o=40,variant:s=`default`,dir:c=`ltr`})=>{let[l,u]=(0,R.useState)(n?[n]:[]),[[d,f],p]=(0,R.useState)([t,1]),m=(e,t)=>{t&&u([...l,t]),p([e,1])},h=e=>{let t=l.findIndex(t=>t.id===e);t!==-1&&u(l.slice(0,t+1)),p([e,-1])};return(0,a.jsxs)(`div`,{dir:c,className:`wu-w-full wu-h-full wu-relative wu-overflow-hidden wu-flex wu-flex-col`,children:[(0,a.jsx)(op,{titles:l,currentLevel:d,initial:t,handleTitleClick:(e,t)=>{let n=t||e.currentTarget.getAttribute(`data-id`)||``;if(n&&n!==d){let e=l.findIndex(e=>e.id===n);e!==-1&&(u(l.slice(0,e+1)),h(n))}},headerClasses:i,offsetHeight:o,dir:c}),(0,a.jsx)(Rd,{features:Gf,children:(0,a.jsx)(jd,{initial:!1,custom:f,mode:r,children:(()=>{let n=e[d]?e[d]:null;if(!n)return(0,a.jsx)(`div`,{className:`wu-absolute wu-inset-0 wu-w-full wu-h-full wu-flex wu-items-center wu-justify-center`,children:(0,a.jsx)(`p`,{className:`wu-text-gray-500`,children:`No content available.`})});let r=typeof n.component==`function`?n.component({goNext:m,goBack:h}):n.component;return(0,a.jsx)(qf,{dir:c,custom:f,variants:lp(s),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:d===t?`0px`:`${o}px`},children:r},d)})()})})]})},lp=e=>{switch(e){case`slideRight`:return dp;case`slideLeft`:return fp;case`fadeZoom`:return pp;default:return up}},up={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})},dp={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})},fp={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})},pp={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}},mp=({className:e,isLoading:t,loadingText:n,children:r,...i})=>(0,a.jsxs)(`footer`,{className:z(`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),...i,children:[(0,a.jsx)(`div`,{className:`wu-flex-1`,children:r}),t&&(0,a.jsx)(ve,{size:`16px`,variant:`spinner`,color:`#a3a3a3`,message:n})]});mp.displayName=`WuFooter`;var hp=R.default.forwardRef((e,t)=>{let{size:n=`sm`,idOrSlugOrUrl:r,variant:i=`primary`,...o}=e,s=n===`sm`?16:18,c=r.includes(`http`)?r:`/help/${r}.html`,l=i===`primary`?`wu-text-blue-p`:`wu-text-gray-lead`;return(0,a.jsx)(`button`,{...o,ref:t,onClick:()=>B(c),children:(0,a.jsx)(`span`,{className:z(`wm-help wu-text-gray-subtle`,`wu-text-[${s}px]`,l,o.disabled&&`wu-text-neutral-300`,`wu-help-button-icon`)})})});hp.displayName=`WuHelpButton`;var gp=(e,t)=>`wu-${t?`combobox`:`listbox`}-${e}`;function _p(e){let{option:t,accessorKey:n,onSelect:r,multiple:i,dir:o,GroupLabel:s,Item:c,isSelected:l,...u}=e,d=n.group&&Array.isArray(t[n.group]),f=({item:e,className:s})=>(0,R.createElement)(oi,{...u,key:JSON.stringify(e),onSelect:()=>r?.(e),value:t[n.value],className:z(`data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-10`,!!l?.(e)&&!i&&`wu-bg-blue-p/10`,o===`rtl`&&`wu-justify-end`,s,gp(`item`)),disabled:e.disabled},i&&(0,a.jsx)(Xr,{checked:l?.(e)}),c?c({value:e,isSelected:l?.(e)}):(0,a.jsx)(a.Fragment,{children:e[n.label]}));if(d){let e=t[n.group];return(0,a.jsx)(ii,{heading:typeof s==`string`?t[s]:s?.(t),children:e?.map(e=>(0,a.jsx)(f,{item:e,className:`wu-pl-6`},JSON.stringify(e)))})}return(0,a.jsx)(f,{item:t})}var vp=R.default.memo(_p),yp=e=>{let{className:t,...n}=e;return(0,a.jsxs)(`div`,{className:`wu-relative`,children:[(0,a.jsx)(Pe,{icon:`wm-search`,className:`wu-absolute wu-top-[14px] wu-left-5`}),(0,a.jsx)(ti,{...n,"aria-label":`Search`,className:z(`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;`,gp(`input`),t)})]})},bp=e=>{let{label:t,onSelectAll:n,data:r,value:i}=e,[o,s]=R.default.useState(!1),[c,l]=R.default.useState(!1);return R.default.useEffect(()=>{!i||!r||(s(i.length>0),l(i.length>0&&i.length<r.length))},[r,i]),(0,a.jsxs)(oi,{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?.(!o),children:[(0,a.jsx)(Xr,{checked:o,partial:c}),t||`Select All`]})},xp=e=>{let{CustomTrigger:t,disabled:n,value:r,placeholder:i,accessorKey:o,Chip:s,handleUnselect:c,variant:l,dir:u,className:d,...f}=e,[p,m]=R.default.useState(),h=R.default.useRef(null);return R.default.useEffect(()=>{if(!r){m(null);return}m(Array.isArray(r)?s?r.map((e,t)=>s({value:e,unselect:c,key:t})):r.map(e=>e[o.label]).join(`, `):s?s({value:r,unselect:c}):r[o.label])},[r,s,o.label,m]),(0,a.jsx)(et,{asChild:!0,id:e.id,disabled:n,ref:h,children:t?.(r)||(0,a.jsxs)(`button`,{...f,className:z(`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`,d,gp(`trigger`)),children:[(0,a.jsx)(`div`,{className:z(`wu-truncate`,s&&`wu-flex wu-items-center wu-gap-1 wu-flex-wrap`,!p&&`wu-font-light`),children:p||i}),(0,a.jsx)(Pe,{icon:`wm-arrow-drop-down`,className:z(`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`,u===`rtl`?`wu-left-1`:`wu-right-1`,gp(`drop-icon`))})]})})},Sp=(e,t,n)=>{let r=String(e[n.label]??``).toLowerCase(),i=String(e[n.value]??``).toLowerCase();return r.includes(t)||i.includes(t)},Cp=(e,t,n)=>{let r=t.trim();if(r===``)return e;let i=r.toLowerCase(),a=[];for(let t of e){let e=n.group,r=e?t[e]:void 0;if(Array.isArray(r)){let o=r.filter(e=>Sp(e,i,n));o.length>0&&a.push({...t,[e]:o})}else Sp(t,i,n)&&a.push(t)}return a},wp=e=>{let{data:t,accessorKey:n,value:r,Item:i,Label:o,GroupLabel:s,CustomHeader:c,CustomTrigger:l,NoDataContent:u,Chip:d,onSelect:f,onScroll:p,disabled:m,multiple:h,searchable:g,selectAll:_,virtualizedThreshold:v=100,showGroupSeparator:y,id:b,dir:x,className:S,listClass:C,placeholder:w=`Select items...`,variant:T,labelPosition:E=`top`,maxContentWidth:D,maxContentHeight:O,modal:k,...A}=e,[j,M]=R.default.useState(!1),[N,P]=R.default.useState(``),[F,I]=R.default.useState(r),ee=R.default.useMemo(()=>n,[n]),L=R.default.useMemo(()=>!g||!N?t:Cp(t,N.toLowerCase().trim(),n),[t,N,n.label,g]),te=e=>{h?I(t=>{let r=e[n.value],i=Array.isArray(t)?t:[],a=i.some(e=>e[n.value]===r)?i.filter(e=>e[n.value]!==r):[...i,e];return f&&f(a),a}):(I(e),f&&f(e),M(!1))},ne=R.default.useCallback(e=>{let n=e?t:[];I(n),_?.onSelectAll&&_.onSelectAll(e),f&&f(n)},[t,_,f]),B=e=>Array.isArray(F)?F.some(t=>t[n.value]===e[n.value]):F?.[n.value]===e[n.value];R.default.useEffect(()=>{I(r)},[r]);let V=e=>{let t=(t,r)=>{let o=n.group&&Array.isArray(t[n.group]),c=y&&o&&r>0&&e.length>1;return(0,a.jsxs)(R.default.Fragment,{children:[c&&(0,a.jsx)(ai,{}),(0,a.jsx)(vp,{option:t,accessorKey:ee,multiple:h,onSelect:e=>te(e),dir:x,GroupLabel:s,Item:i,isSelected:e=>B(e)})]},JSON.stringify(t))};return e.length>v?(0,a.jsx)(li,{list:e,callback:(e,n)=>t(n,e),dir:x}):e.map((e,n)=>t(e,n))};return(0,a.jsxs)(`div`,{className:z(`wu-flex wu-text-sm wu-gap-2`,E===`top`&&`wu-flex-col wu-gap-1`,E===`left`&&`wu-flex-row`,E===`right`&&`wu-flex-row-reverse`,gp(`container`)),dir:x,children:[o&&(0,a.jsx)(K,{htmlFor:b,className:gp(`label`),children:o}),(0,a.jsxs)($e,{open:j,onOpenChange:e=>{M(e),e||setTimeout(()=>{P(``)},100)},modal:k,children:[(0,a.jsx)(xp,{CustomTrigger:l,disabled:m,value:F,accessorKey:n,placeholder:w,Chip:d,className:S,handleUnselect:te,variant:T,id:b,dir:x,...A}),(0,a.jsx)(tt,{className:z(`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`,gp(`content`)),align:`start`,sideOffset:-1,style:{maxWidth:D},children:(0,a.jsxs)(ei,{id:e.id,shouldFilter:!1,children:[g&&(0,a.jsx)(yp,{value:N,onValueChange:P}),c,(0,a.jsxs)(ni,{className:z(`wu-overflow-y-auto`,gp(`list`),C),onScroll:p,style:{maxHeight:O||`420px`},children:[(0,a.jsx)(ri,{children:u||`No results found.`}),(0,a.jsx)(ii,{children:h&&_?.enabled&&!N&&(0,a.jsx)(bp,{data:t,value:F,onSelectAll:ne,label:_.label})}),(0,a.jsx)(ii,{children:V(L)})]})]})})]})]})},Tp=R.default.forwardRef(({showMenu:e=!1,className:t,color:n=`#1B3380`,...r},i)=>{let o=z(`wu-w-full wu-border wu-transition-all wu-duration-300`);return(0,a.jsxs)(`div`,{...r,className:z(`wu-flex wu-flex-col wu-w-[18px] wu-justify-between wu-aspect-[3/2] wu-transition-all wu-duration-300`,t),ref:i,"aria-label":`menu-icon`,children:[(0,a.jsx)(`div`,{className:`${o} wu-origin-center ${e?`wu-rotate-45 wu-translate-y-[5px]`:``}`,style:{borderColor:n}}),(0,a.jsx)(`div`,{className:`${o} ${e?`wu-opacity-0`:``}`,style:{borderColor:n}}),(0,a.jsx)(`div`,{className:`${o} wu-origin-center ${e?`-wu-rotate-45 -wu-translate-y-[5px]`:``}`,style:{borderColor:n}})]})});Tp.displayName=`WuMenuIcon`;var Ep={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%]`},Dp=y.Root,Op=y.Trigger,kp=y.Portal,Ap=y.Close,jp=(0,R.forwardRef)(({className:e,...t},n)=>(0,a.jsx)(y.Overlay,{ref:n,className:z(`wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30`,Ep.overlay,e),...t}));jp.displayName=y.Overlay.displayName;var Mp=(0,R.forwardRef)(({className:e,children:t,hideCloseButton:n,isStackedCard:r,...i},o)=>(0,a.jsxs)(kp,{children:[(0,a.jsx)(jp,{className:r?`wu-bg-transparent`:``,"data-wu-overlay":!0}),(0,a.jsxs)(y.Content,{ref:o,className:z(`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`,Ep.content,e),...i,children:[t,!n&&(0,a.jsx)(y.Close,{"aria-label":`close`,asChild:!0,children:(0,a.jsxs)(rt,{variant:`iconOnly`,className:z(`wu-absolute wu-right-2 wu-top-1 hover:wu-bg-black/[0.08] wu-w-8 wu-h-8 wu-p-0`,`wu-top-3 wu-right-4`,`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:[(0,a.jsx)(`span`,{className:`wm-close wu-leading-5`}),(0,a.jsx)(`span`,{className:`wu-sr-only`,children:`Close`})]})})]})]}));Mp.displayName=y.Content.displayName;var Np=({className:e,...t})=>(0,a.jsx)(`div`,{className:z(`wu-text-center wu-bg-gray-20 wu-w-full`,e),...t});Np.displayName=`DialogHeader`;var Pp=({className:e,...t})=>(0,a.jsx)(`div`,{className:z(`wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2 wu-p-4`,e),...t});Pp.displayName=`DialogFooter`;var Fp=(0,R.forwardRef)(({className:e,...t},n)=>(0,a.jsx)(y.Title,{ref:n,className:z(`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}));Fp.displayName=y.Title.displayName;var Ip=(0,R.forwardRef)(({className:e,...t},n)=>(0,a.jsx)(y.Description,{ref:n,className:z(`wu-text-sm wu-text-muted-foreground`,e),...t}));Ip.displayName=y.Description.displayName;var Lp={gradientBackground:`_gradientBackground_1uc4j_1`},Rp=e=>{let{colors:t,size:n=.55,children:r,className:i,strokeWidth:o,centerOffset:s={x:0,y:0},...c}=e,l=(0,R.useRef)(null);return(0,R.useEffect)(()=>{let e=l.current;if(e){e.style.setProperty(`--width`,`${e.offsetWidth*n}px`),e.style.setProperty(`--height`,`${e.offsetHeight*n}px`),e.style.setProperty(`--colors`,t.join(`,`)),e.style.setProperty(`--stroke-width`,`-${o||2}px`),e.style.setProperty(`--spotlight-background`,`radial-gradient(100% var(--height) ellipse at 25% 70%, var(--colors))`);let r,i=t=>{r&&cancelAnimationFrame(r),r=requestAnimationFrame(()=>{let n=e.getBoundingClientRect(),r=t.clientX-n.left,i=t.clientY-n.top;r=Math.max(0,Math.min(r+s.x,n.width)),i=Math.max(0,Math.min(i+s.y,n.height));let a=`radial-gradient(
16
+ var(--width) var(--height) ellipse at ${r}px ${i}px,
17
17
  var(--colors)
18
- )`;d.style.setProperty("--spotlight-background",x)})};return window.addEventListener("mousemove",m),()=>{window.removeEventListener("mousemove",m),w&&cancelAnimationFrame(w)}}},[t,n,o,i]),a.jsx("div",{ref:l,className:h(mb.gradientBackground,"wu-transform-gpu",s),...u,children:r})},mr={wuModalBodyWrapper:"_wuModalBodyWrapper_uaelx_1","wu-modal-footer":"_wu-modal-footer_uaelx_5","wu-modal-content":"_wu-modal-content_uaelx_5","wu-modal-header":"_wu-modal-header_uaelx_9"},Pl="calc(100vh - 64px)",gb={sm:"400px",md:"600px",lg:"1200px"},bb=({Trigger:e,children:t,size:n="md",hideCloseButton:r,preventClickOutside:s,onOpenChange:o,open:i,dir:u,maxWidth:l,maxHeight:d,className:c,style:w,variant:m="action",allowExternalPortals:p,onOpenAutoFocus:b,onCloseAutoFocus:g,...y})=>{const x={action:["#EEF3FBcc 32%","#1D50F4cc"],upgrade:["#FDEDCCcc 32%","#FF9F00cc"],critical:["#FFB6B6cc 32%","#CC0000cc"]},v=f.useRef(null),C=f.useRef(null);return f.useEffect(()=>()=>{v.current&&(document.removeEventListener("focusin",v.current.focusin,!0),document.removeEventListener("focusout",v.current.focusout,!0),document.body.style.pointerEvents="",v.current=null)},[]),a.jsxs(Ml,{modal:!0,onOpenChange:o,open:i,children:[e&&a.jsx(kl,{asChild:!0,children:e}),a.jsx(xa,{ref:C,style:{width:"calc(100% - 64px)",maxWidth:l||gb[n],maxHeight:d||Pl,...w},hideCloseButton:r,onInteractOutside:N=>{var S,M;if(s){N.preventDefault();return}if(p){const T=(M=(S=N.detail)==null?void 0:S.originalEvent)==null?void 0:M.target;T!=null&&T.closest("[data-wu-overlay]")||N.preventDefault()}},onFocusOutside:N=>p&&N.preventDefault(),onOpenAutoFocus:N=>{if(p){document.body.style.pointerEvents="all";const S=I=>!!C.current&&!C.current.contains(I),M=I=>{S(I.target)&&I.stopImmediatePropagation()},T=I=>{S(I.relatedTarget)&&I.stopImmediatePropagation()};v.current={focusin:M,focusout:T},document.addEventListener("focusin",M,!0),document.addEventListener("focusout",T,!0)}b==null||b(N)},onCloseAutoFocus:N=>{p&&(document.body.style.pointerEvents="",v.current&&(document.removeEventListener("focusin",v.current.focusin,!0),document.removeEventListener("focusout",v.current.focusout,!0),v.current=null)),g==null||g(N)},dir:u,"aria-describedby":void 0,"data-variant":m,className:h("wu-group wu-rounded-[.88rem]",mr.wuModalBodyWrapper,c),...y,children:a.jsx(_l,{colors:x[m],strokeWidth:4,className:h("wu-rounded-[1.1rem] wu-transform-gpu wu-flex wu-flex-col",c),style:{maxHeight:d||Pl},children:t})})]})},yb=({children:e,className:t,...n})=>a.jsx("div",{className:h("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",mr["wu-modal-content"],t),...n,children:e}),vb=({children:e,className:t,...n})=>a.jsx(Na,{...n,"data-variant":"action",className:h("wu-text-lg wu-text-gray-lead wu-font-medium","wu-rounded-t-[.88rem] 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",mr["wu-modal-header"],t),children:a.jsx(Sa,{className:"wu-font-normal wu-justify-start wu-text-2xl wu-h-14",children:e})}),xb=({children:e,className:t,...n})=>a.jsx(Al,{...n,className:h("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-[.88rem] 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]",mr["wu-modal-footer"],t),children:e}),Nb=({children:e,className:t,...n})=>{const r=f.useRef(null);return a.jsx(pb,{asChild:!0,children:a.jsx(Ie,{className:t,ref:r,...n,children:e})})},Sb=({placeholder:e="Select...",value:t,multiple:n=!1,accessorKey:r,variant:s="flat",dir:o="ltr",customTriggerChildren:i,id:u,disabled:l,selectAll:d,isCheckedAll:c,width:w,...m})=>{const[p,b]=f.useState(""),[g,y]=f.useState(e);f.useEffect(()=>{if(!t||Array.isArray(t)&&t.length===0){y(e),b("");return}const v=r.label;if(n&&Array.isArray(t)){const C=t.map(N=>N[v]).join(", ");b(C)}else!n&&!Array.isArray(t)&&b(t[v])},[t,r.label,n,e]);const x=()=>e&&!p?a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:g}):a.jsx("span",{className:h("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)??p:p});return a.jsx(ii,{asChild:!0,dir:o,id:u,disabled:l,children:a.jsxs("button",{...m,disabled:l,className:h("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",s==="outlined"&&"wu-border wu-border-gray-subtle","wu-group/wuSelect wu-select-trigger",m.className),children:[i??x(),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"})]})})},Vl=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:s,dir:o="ltr"})=>{const[i,u]=f.useState(n?[]:"");f.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[s.value])):JSON.stringify(t[s.value]))},[t,s.value,n]);const l=n?i.includes(JSON.stringify(e[s.value])):i===JSON.stringify(e[s.value]),d=c=>{e.disabled||(r(e),n&&c.preventDefault())};return a.jsxs(Kn,{onClick:d,disabled:e.disabled,className:h("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(qe,{checked:l}),a.jsx(Ol,{option:e,accessorKey:s})]})},Ol=({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"})]})},Ll=e=>{const{option:t,handleSelectAll:n,isCheckedAll:r,isPartialSelected:s,...o}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(Kn,{onSelect:u=>{u.stopPropagation(),u.preventDefault(),n==null||n()},className:h("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item"),dir:o.dir,children:[a.jsx(qe,{"data-partial":s,checked:r||s,partial:s}),a.jsx(Ol,{option:t,accessorKey:o.accessorKey})]});case"group":return a.jsxs(ui,{dir:o.dir,children:[a.jsx(on,{className:"wu-text-xs",children:t.label}),t.options.map((u,l)=>{const d=u[o.accessorKey.value],c=d!=null?String(d):`group-item-${l}`;return f.createElement(Vl,{...o,option:u,key:c})})]});case"divider":return a.jsx(Yn,{className:"wu-mx-4"});default:return a.jsx(Vl,{...o,option:t})}},Cb=e=>{let t=0,n=0;const r=[],s=[],o=i=>{i.type==="divider"?t++:i.type==="group"?(n++,i.options.forEach(u=>{o(u)})):(r.push(i),i.disabled||s.push(i))};return e.forEach(i=>{o(i)}),{separators:t,groups:n,enabledOptions:s,totalData:r.length,cleanData:r}},Tb=100,Eb=400,Fl=({data:e,onSelect:t,multiple:n=!1,defaultValue:r,value:s,accessorKey:o,variant:i="flat",dir:u="ltr",placeholder:l,Label:d,virtualizedThreshold:c=Tb,maxHeight:w=Eb,hasGroup:m=!1,Header:p,CustomTrigger:b,selectAll:g,disabled:y,labelPosition:x="top",onScroll:v,maxContentWidth:C,selectedToTop:N=!1,...S})=>{const[M,T]=f.useState(),I=f.useRef(null),[D,A]=f.useState(!1),[_,P]=f.useState(!1),{cleanData:W,enabledOptions:F}=Cb(e),B=f.useMemo(()=>n&&g!=null&&g.enable&&e.length>0?[{type:"all",[o.label]:g.label||"Select All"},...e]:e,[e,g,n]),$=f.useCallback(H=>{const Q=H[o.value];if(n)T((ee=[])=>{const J=ee,K=J.some(O=>O[o.value]===Q)?J.filter(O=>O[o.value]!==Q):[...J,H];return t==null||t(K),K});else{const ee=H;T(ee),t==null||t(ee)}},[n,o.value,t]);f.useEffect(()=>{if(r&&s){console.error("defaultValue and value cannot be used simultaneously");return}!r&&!s&&T(void 0),r!==void 0&&T(r),s!==void 0&&T(s)},[r,s]);const ie=ai(N,B,M,o),U=ie.length>c;f.useEffect(()=>{if(!n)return;const H=g!=null&&g.includeDisabled?(M==null?void 0:M.length)===e.length:(M==null?void 0:M.length)===F.length;A(H);const Q=(M==null?void 0:M.length)>0&&!H;P(Q)},[M,g]);const V=f.useCallback(()=>{const H=D?[]:g!=null&&g.includeDisabled?m?W:e:F;T(H),t==null||t(H)},[D,n,e,F,t,g]),q=Dn(x);return a.jsxs("div",{className:h(q,"wu-flex wu-select-container"),ref:I,dir:u,children:[a.jsxs(oi,{children:[a.jsx(Sb,{...S,value:M,multiple:n,variant:i,dir:u,placeholder:l,accessorKey:o,customTriggerChildren:b,id:S.id,disabled:y,selectAll:g,isCheckedAll:D}),a.jsxs(xs,{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:S.id,style:{maxWidth:C},children:[p,U?a.jsx(Mt,{list:ie,containerHeight:w,callback:(H,Q)=>a.jsx(Ll,{option:Q,accessorKey:o,multiple:n,onSelect:$,value:M,dir:u,handleSelectAll:V,isCheckedAll:D,isPartialSelected:_}),dir:u}):a.jsx("div",{onScroll:v,style:{maxHeight:w,height:"fit-content",overflow:"auto"},className:"wu-select-list",children:ie.map((H,Q)=>{const ee=H,J=ee[o.value],ge=J!=null?String(J):`__${"type"in ee?ee.type:"item"}__${Q}`;return a.jsx(Ll,{option:ee,accessorKey:o,multiple:n,onSelect:$,value:M,handleSelectAll:V,isCheckedAll:D,dir:u,isPartialSelected:_},ge)})})]})]}),d&&a.jsx(Me,{htmlFor:S.id,className:"wu-select-label",children:d})]})},gr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ib=({value:e,onChange:t,min:n=z.sub(new Date,{years:5}),max:r=z.add(new Date,{years:1}),placeholder:s="Select a month",Label:o,labelPosition:i="top",disabled:u,id:l,readonly:d,disabledMonths:c=[],...w})=>{const[m,p]=f.useState(null),[b,g]=f.useState(""),[y,x]=f.useState({value:Math.min(new Date().getFullYear(),new Date(r).getFullYear()),label:Math.min(new Date().getFullYear(),new Date(r).getFullYear())}),v=f.useMemo(()=>{const N=new Date(n).getFullYear(),S=new Date(r).getFullYear();return Array.from({length:S-N+1},(M,T)=>({value:S-T,label:S-T}))},[n,r]);f.useEffect(()=>{if(e){const N=new Date(e),S=N.getFullYear(),M=N.getMonth();p({year:S,month:M}),g(`${gr[M]} ${S}`),x({value:S,label:S})}},[e]);const C=()=>{m&&t&&(t(new Date(m.year,m.month,15)),g(`${gr[m.month]} ${m.year}`))};return a.jsxs("div",{className:h("wu-flex wu-flex-col wu-items-center",Dn(i),i==="top"&&"wu-items-start"),children:[a.jsxs(je,{children:[a.jsx(Qr,{...w,disabled:u||d,id:l,dir:"ltr",placeholder:s,formattedString:b}),a.jsxs($e,{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(Fl,{data:v,accessorKey:{value:"value",label:"label"},value:y,onSelect:N=>x(N),multiple:!1,maxHeight:224})}),a.jsx(Mb,{year:y==null?void 0:y.value,selectedMonth:m==null?void 0:m.month,selectedYear:m==null?void 0:m.year,onClick:(N,S)=>p({year:S,month:N}),disabledMonths:c}),a.jsx("div",{className:"wu-flex wu-justify-end wu-px-0.5",children:a.jsx(jt.PopoverClose,{asChild:!0,children:a.jsx(Ie,{onClick:C,children:"Apply"})})})]})]}),o&&a.jsx(Me,{className:"wu-truncate wu-max-w-[120px] wu-min-w-fit wu-select-label",children:o})]})},Mb=({year:e,selectedMonth:t,selectedYear:n,onClick:r,disabledMonths:s=[]})=>{const o=new Date,i=o.getFullYear(),u=o.getMonth(),l=f.useMemo(()=>{const d=new Set;return s.forEach(c=>{const w=typeof c=="string"?new Date(c):c;d.add(`${w.getFullYear()}-${w.getMonth()}`)}),d},[s]);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:gr.map((d,c)=>{const w=e===i&&c===u,m=t===c&&n===e;return a.jsx("button",{disabled:l.has(`${e}-${c}`),onClick:()=>r(c,e),className:h("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",m&&"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":`${gr[c]} ${e}`,"data-month":c,"data-year":e,children:d},d)})})},Wl=(e,t,n,r=96)=>{if(e.length===0||r<=0)return[[],[]];const[o,i]=f.useState([]),[u,l]=f.useState([]);return f.useEffect(()=>{const d=()=>{var b,g;const c=((b=t.current)==null?void 0:b.clientWidth)||0,w=((g=n.current)==null?void 0:g.clientWidth)||0,m=c-w,p=Math.floor(m/r);i(e.slice(0,p)),l(e.slice(p))};return d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)}},[e,r]),[o,u]},Bl={wuPrimaryLink:"_wuPrimaryLink_1sy3v_1",wuPrimaryPopoverContent:"_wuPrimaryPopoverContent_1sy3v_8"},kb=e=>{const{Links:t,children:n,className:r,...s}=e,o=f.useMemo(()=>t.map((c,w)=>f.cloneElement(c,{className:h(Bl.wuPrimaryLink,c.props.className,"wu-primary-nav-link"),key:w})),[t]),i=f.useRef(null),u=f.useRef(null),[l,d]=Wl(o,i,u);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:h("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-px-2 wu-py-1 wu-bg-white wu-border-b",r),...s,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(je,{children:[a.jsx(dt,{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($e,{className:h(Bl.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(je,{children:[a.jsx(dt,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx($e,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-primary-nav-popover-right",align:"end",sideOffset:4,children:n})]})]})]})})},Ca={wuSecondaryLink:"_wuSecondaryLink_1edl1_1",wuSecondaryNav:"_wuSecondaryNav_1edl1_6"},Db=e=>{const{Links:t,children:n,className:r,...s}=e,o=f.useMemo(()=>t.map((w,m)=>f.cloneElement(w.link,{key:m,className:h(Ca.wuSecondaryLink,w.link.props.className,"wu-secondary-nav-link-container"),children:a.jsxs(a.Fragment,{children:[f.cloneElement(w.imgOrIcon,{className:h("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=f.useRef(null),u=f.useRef(null),l=f.useRef(null),[d,c]=Wl(o,i,l);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:h("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-border-y wu-border-gray-25 wu-h-[50px]",r),...s,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("nav",{className:h(Ca.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(je,{children:[a.jsx(dt,{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($e,{className:h(Ca.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(je,{children:[a.jsx(dt,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx($e,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-secondary-nav-popover-right",align:"end",sideOffset:12,children:n})]})]})]})})},$l=f.forwardRef(({totalRows:e,initialPage:t=0,initialPageSize:n=100,onPageChange:r,className:s,disabled:o=!1,...i},u)=>{const[l,d]=f.useState(t),[c,w]=f.useState(n);f.useEffect(()=>{d(t),w(n)},[t,n]);const m=Math.ceil(e/c),p=l*c+1,b=Math.min((l+1)*c,e),g=Array.from({length:m},(v,C)=>C),y=f.useCallback(v=>{v>=0&&v<m&&(d(v),r==null||r(v))},[m,r]),x=224;return a.jsxs("div",{className:h("wu-flex wu-items-center wu-gap-[2px]",s,"wu-pagination"),...i,role:"navigation",children:[a.jsx(ql,{label:"Previous page",onClick:()=>y(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(ya,{name:`${p} - ${b}`,className:"wu-w-[96px] wu-min-w-[96px] wu-pagination-menu",align:"end",disabled:o,children:a.jsx(Wt,{style:{maxHeight:x+"px"},dir:i.dir,children:g.length>100?a.jsx(Mt,{className:"wu-pagination-list",containerHeight:x,list:g,callback:(v,C)=>a.jsxs(hr,{onSelect:()=>y(C),className:h("wu-py-2",C===l&&"wu-bg-gray-20","wu-pagination-item"),children:[C*c+1," -"," ",Math.min((C+1)*c,e)]},v)}):g.map(v=>a.jsxs(hr,{onSelect:()=>y(v),className:h(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(ql,{label:"Next page",onClick:()=>y(l+1),disabled:l===m-1||o,icon:"wm-arrow-forward-ios",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-next-btn"})]})});$l.displayName="WuPagination";const ql=({label:e,onClick:t,disabled:n,icon:r,className:s})=>a.jsx(Ie,{variant:"iconOnly",onClick:t,disabled:n,className:h("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",s),"aria-label":e,children:a.jsx("span",{className:h("wu-text-sm",r)})}),Hl=E.forwardRef(({className:e,...t},n)=>a.jsx(Yt.Root,{className:h("wu-grid wu-gap-2",e),...t,ref:n}));Hl.displayName=Yt.Root.displayName;const zl=E.forwardRef(({className:e,...t},n)=>a.jsx(Yt.Item,{ref:n,className:h("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(Yt.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"})})}));zl.displayName=Yt.Item.displayName;const Ul=f.forwardRef((e,t)=>{const{options:n,defaultValue:r,onChange:s,label:o,dir:i,...u}=e;return a.jsxs(Hl,{defaultValue:r,required:u.required,disabled:u.disabled,onValueChange:s,id:u.id,dir:i,name:u.name,className:h("w-fit",u.className),ref:t,style:u.style,children:[a.jsx(Pn,{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(zl,{value:l.value,id:l.value,disabled:l.disabled,required:l.required,"aria-label":l.value,className:"wu-peer wu-radio-item"}),a.jsx(Pn,{htmlFor:l.value,className:h(l.required&&"after:wu-content-['*'] after:wu-mx-[2px] after:wu-text-rose-500","wu-radio-item-label"),children:l.label})]},l.value))]})});Ul.displayName="WuRadioGroup";const Ab=e=>{const{children:t,...n}=e;return a.jsxs(Wt,{...n,role:"complementary","aria-label":"ScrollArea",children:[t,a.jsx(ba,{orientation:"horizontal"})]})},jl=E.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:h("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:r,...n}));jl.displayName="Input";const Gl=E.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>a.jsx(ro.Root,{ref:s,decorative:n,orientation:t,className:h("wu-shrink-0 wu-bg-gray-40",t==="horizontal"?"wu-h-[1px] wu-w-full":"wu-h-full wu-w-[1px]",e),...r}));Gl.displayName=ro.Root.displayName;function Kl({className:e,...t}){return a.jsx("div",{className:h("animate-pulse rounded-md bg-muted",e),...t})}const Ta=768;function Ea(){const[e,t]=E.useState(void 0);return E.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Ta-1}px)`),r=()=>{t(window.innerWidth<Ta)};return n.addEventListener("change",r),t(window.innerWidth<Ta),()=>n.removeEventListener("change",r)},[]),!!e}const _b="sidebar_state",Pb=3600*24*7,Vb="256px",Ob="256px",Lb="3rem",Fb="b",Yl=E.createContext(null);function at(){const e=E.useContext(Yl);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Xl=E.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:s,children:o,...i},u)=>{const l=Ea(),[d,c]=E.useState(!1),[w,m]=E.useState(l?!0:e),p=t??w,b=E.useCallback(v=>{const C=typeof v=="function"?v(p):v;n?n(C):m(C),document.cookie=`${_b}=${C}; path=/; max-age=${Pb}`},[n,p]),g=E.useCallback(()=>l?c(v=>!v):b(v=>!v),[l,b,c]);E.useEffect(()=>{const v=C=>{C.key===Fb&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),g())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[g]);const y=p?"expanded":"collapsed",x=E.useMemo(()=>({state:y,open:p,setOpen:b,isMobile:l,openMobile:d,setOpenMobile:c,toggleSidebar:g}),[y,p,b,l,d,c,g]);return a.jsx(Yl.Provider,{value:x,children:a.jsx(po,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":Vb,"--sidebar-width-icon":Lb,...s},className:h("wu-group/sidebar-wrapper wu-flex wu-min-h-[calc(100svh-48px)] wu-w-full",r),ref:u,...i,children:o})})})});Xl.displayName="SidebarProvider";const Zl=E.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:s,...o},i)=>{const{isMobile:u,state:l,openMobile:d,setOpenMobile:c}=at();return n==="none"?a.jsx("div",{className:h("wu-flex wu-h-full wu-w-[--sidebar-width] wu-flex-col",r),ref:i,...o,children:s}):u?a.jsx(hi,{open:d,onOpenChange:c,...o,children:a.jsx(Ns,{"data-sidebar":"sidebar","data-mobile":"true",className:"wu-w-[--sidebar-width] wu-bg-blue-sidebar wu-p-0 [&>button]:wu-hidden",style:{"--sidebar-width":Ob},side:e,children:a.jsx("div",{className:"wu-flex wu-flex-col wu-w-full wu-h-full",children:s})})}):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:h("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:h("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",r),...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:s})})]})});Zl.displayName="Sidebar";const Jl=E.forwardRef(({className:e,onClick:t,children:n,...r},s)=>{const{toggleSidebar:o}=at();return a.jsxs(Xt,{ref:s,"data-sidebar":"trigger",variant:"secondary",className:h("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()},...r,children:[n,a.jsx("span",{className:"wu-sr-only",children:"Toggle Sidebar"})]})});Jl.displayName="SidebarTrigger";const Wb=E.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=at();return a.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:h("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})});Wb.displayName="SidebarRail";const Ql=E.forwardRef(({className:e,...t},n)=>a.jsx("main",{ref:n,className:h("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}));Ql.displayName="SidebarInset";const Bb=E.forwardRef(({className:e,...t},n)=>a.jsx(jl,{ref:n,"data-sidebar":"input",className:h("wu-h-8 wu-w-full wu-shadow-none focus-visible:wu-ring-2",e),...t}));Bb.displayName="SidebarInput";const Rl=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"header",className:h("wu-flex wu-flex-col wu-gap-2 wu-p-2",e),...t}));Rl.displayName="SidebarHeader";const ec=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"footer",className:h("wu-flex wu-flex-col wu-gap-2 wu-pb-2",e),...t}));ec.displayName="SidebarFooter";const $b=E.forwardRef(({className:e,...t},n)=>a.jsx(Gl,{ref:n,"data-sidebar":"separator",className:h("wu-mx-2 wu-w-auto",e),...t}));$b.displayName="SidebarSeparator";const tc=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"content",className:h("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}));tc.displayName="SidebarContent";const nc=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group",className:h("wu-relative wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-p-2",e),...t}));nc.displayName="SidebarGroup";const rc=E.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?Ct.Slot:"div";return a.jsx(s,{ref:r,"data-sidebar":"group-label",className:h("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})});rc.displayName="SidebarGroupLabel";const qb=E.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?Ct.Slot:"button";return a.jsx(s,{ref:r,"data-sidebar":"group-action",className:h("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})});qb.displayName="SidebarGroupAction";const sc=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group-content",className:h("wu-w-full wu-text-sm",e),...t}));sc.displayName="SidebarGroupContent";const Ia=E.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu",className:h("wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-gap-1",e),...t}));Ia.displayName="SidebarMenu";const ac=E.forwardRef(({className:e,...t},n)=>a.jsx("li",{ref:n,"data-sidebar":"menu-item",className:h("wu-group/menu-item wu-relative",e),...t}));ac.displayName="SidebarMenuItem";const Hb=Be.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"}}),oc=E.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:s,className:o,...i},u)=>{const l=e?Ct.Slot:"button",{isMobile:d,state:c}=at(),w=a.jsx(l,{ref:u,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:h(Hb({variant:n,size:r}),o),...i});return s?(typeof s=="string"&&(s={children:s}),a.jsxs(ho,{children:[a.jsx(mo,{asChild:!0,children:w}),a.jsx(Xr,{side:"right",align:"center",hidden:c!=="collapsed"||d,...s})]})):w});oc.displayName="SidebarMenuButton";const zb=E.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},s)=>{const o=t?Ct.Slot:"button";return a.jsx(o,{ref:s,"data-sidebar":"menu-action",className:h("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),...r})});zb.displayName="SidebarMenuAction";const Ub=E.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:h("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}));Ub.displayName="SidebarMenuBadge";const jb=E.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const s=E.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:h("wu-flex wu-h-8 wu-items-center wu-gap-2 wu-rounded-md wu-px-2",e),...n,children:[t&&a.jsx(Kl,{className:"wu-rounded-md wu-size-4","data-sidebar":"menu-skeleton-icon"}),a.jsx(Kl,{className:"wu-h-4 wu-max-w-[--skeleton-width] wu-flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});jb.displayName="SidebarMenuSkeleton";const Gb=E.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:h("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}));Gb.displayName="SidebarMenuSub";const Kb=E.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e}));Kb.displayName="SidebarMenuSubItem";const Yb=E.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...s},o)=>{const i=e?Ct.Slot:"a";return a.jsx(i,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:h("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",r),...s})});Yb.displayName="SidebarMenuSubButton";function Xb(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:s}=e,[o,i]=ws({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:u,setMounted:l,transitionStatus:d}=Cf(o,!0,!0),c=Ao(),[w,m]=E.useState(),p=w??c,b=fe(g=>{const y=!o,x=Ae(Tf,g.nativeEvent);r(y,x),!x.isCanceled&&i(y)});return E.useMemo(()=>({disabled:s,handleTrigger:b,mounted:u,open:o,panelId:p,setMounted:l,setOpen:i,setPanelIdState:m,transitionStatus:d}),[s,b,u,o,p,l,i,m,d])}const Ma=E.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ma.displayName="CollapsibleRootContext");function ic(){const e=E.useContext(Ma);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>.":Zt(15));return e}let ka=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Rt.startingStyle]="startingStyle",e[e.endingStyle=Rt.endingStyle]="endingStyle",e})({}),Zb=(function(e){return e.panelOpen="data-panel-open",e})({});const Jb={[ka.open]:""},Qb={[ka.closed]:""},Rb={open(e){return e?{[Zb.panelOpen]:""}:null}},uc={...{open(e){return e?Jb:Qb}},...zo},lc=E.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:o=!1,disabled:i=!1,onOpenChange:u,open:l,style:d,...c}=t,w=fe(u),m=Xb({open:l,defaultOpen:o,onOpenChange:w,disabled:i}),p=E.useMemo(()=>({open:m.open,disabled:m.disabled,transitionStatus:m.transitionStatus}),[m.open,m.disabled,m.transitionStatus]),b=E.useMemo(()=>({...m,onOpenChange:w,state:p}),[m,w,p]),g=Ze("div",t,{state:p,ref:n,props:c,stateAttributesMapping:uc});return a.jsx(Ma.Provider,{value:b,children:g})});process.env.NODE_ENV!=="production"&&(lc.displayName="CollapsibleRoot");const cc=E.createContext(void 0);process.env.NODE_ENV!=="production"&&(cc.displayName="CompositeRootContext");function ey(e=!1){const t=E.useContext(cc);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>.":Zt(16));return t}function ty(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:o}=e,i=r&&t!==!1,u=r&&t===!1;return{props:E.useMemo(()=>{const d={onKeyDown(c){n&&t&&c.key!=="Tab"&&c.preventDefault()}};return r||(d.tabIndex=s,!o&&n&&(d.tabIndex=t?s:-1)),(o&&(t||i)||!o&&n)&&(d["aria-disabled"]=n),o&&(!t||u)&&(d.disabled=n),d},[r,n,t,i,u,o,s])}}function Da(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:o}=e,i=E.useRef(null),u=ey(!0),l=o??u!==void 0,{props:d}=ty({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:s});process.env.NODE_ENV!=="production"&&E.useEffect(()=>{var b,g;if(!i.current)return;const p=br(i.current);if(s){if(!p){const y=((b=Ye.captureOwnerStack)==null?void 0:b.call(Ye))||"";Hn(`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\`.${y}`)}}else if(p){const y=((g=Ye.captureOwnerStack)==null?void 0:g.call(Ye))||"";Hn(`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\`.${y}`)}},[s]);const c=E.useCallback(()=>{const p=i.current;br(p)&&l&&t&&d.disabled===void 0&&p.disabled&&(p.disabled=!1)},[t,d.disabled,l]);pe(c,[c]);const w=E.useCallback((p={})=>{const{onClick:b,onMouseDown:g,onKeyUp:y,onKeyDown:x,onPointerDown:v,...C}=p;return ss({onClick(N){if(t){N.preventDefault();return}b==null||b(N)},onMouseDown(N){t||g==null||g(N)},onKeyDown(N){if(t||(Fn(N),x==null||x(N),N.baseUIHandlerPrevented))return;const S=N.target===N.currentTarget,M=N.currentTarget,T=br(M),I=!s&&ny(M),D=S&&(s?T:!I),A=N.key==="Enter",_=N.key===" ",P=M.getAttribute("role"),W=(P==null?void 0:P.startsWith("menuitem"))||P==="option"||P==="gridcell";if(S&&l&&_){if(N.defaultPrevented&&W)return;N.preventDefault(),I||s&&T?(M.click(),N.preventBaseUIHandler()):D&&(b==null||b(N),N.preventBaseUIHandler());return}D&&(!s&&(_||A)&&N.preventDefault(),!s&&A&&(b==null||b(N)))},onKeyUp(N){if(!t){if(Fn(N),y==null||y(N),N.target===N.currentTarget&&s&&l&&br(N.currentTarget)&&N.key===" "){N.preventDefault();return}N.baseUIHandlerPrevented||N.target===N.currentTarget&&!s&&!l&&N.key===" "&&(b==null||b(N))}},onPointerDown(N){if(t){N.preventDefault();return}v==null||v(N)}},s?{type:"button"}:{role:"button"},d,C)},[t,d,l,s]),m=fe(p=>{i.current=p,c()});return{getButtonProps:w,buttonRef:m}}function br(e){return Kw(e)&&e.tagName==="BUTTON"}function ny(e){return!!((e==null?void 0:e.tagName)==="A"&&(e!=null&&e.href))}const ry={...Rb,...zo},dc=E.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:o,state:i,disabled:u}=ic(),{className:l,disabled:d=u,id:c,render:w,nativeButton:m=!0,style:p,...b}=t,{getButtonProps:g,buttonRef:y}=Da({disabled:d,focusableWhenDisabled:!0,native:m});return Ze("button",t,{state:i,ref:[n,y],props:[{"aria-controls":s?r:void 0,"aria-expanded":s,onClick:o},b,g],stateAttributesMapping:ry})});process.env.NODE_ENV!=="production"&&(dc.displayName="CollapsibleTrigger");function yr(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Aa(e){const t=Qe(sy,e).current;return t.next=e,pe(t.effect),t}function sy(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const gn={height:void 0,width:void 0};function ay(e){const{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:s,mounted:o,onOpenChange:i,open:u,setMounted:l,setOpen:d,transitionStatus:c}=e,w=E.useRef(null),m=E.useRef(null),[p,b]=E.useState(gn),g=E.useRef(gn),y=E.useRef(!1),x=E.useRef(u),v=E.useRef(!1),[C,N]=E.useState(!1),S=E.useRef(null),M=$n(t,w),T=Aa({mounted:o,open:u}),I=Uo(w,!1,!1),D=!u&&!o,A=C?"idle":c,_=u&&(x.current||v.current),P=!u&&o&&m.current==="css-animation"&&p.height===void 0&&p.width===void 0?g.current:p,W=n&&D&&m.current!=="css-animation",F=fe((V,q=!0)=>{q&&(g.current=V),b(V)}),B=fe(()=>{var V;(V=S.current)==null||V.call(S),S.current=null}),$=fe(V=>{B(),S.current=()=>{S.current=null,V()}}),ie=fe(()=>{u&&o&&m.current==="css-animation"&&(v.current=!0)});pe(()=>{!C||c==="starting"||N(!1)},[C,c]),E.useEffect(()=>()=>{ie(),B()},[ie,B]),pe(()=>{const V=w.current;if(!V)return;!u&&S.current&&B();const q=oy(V,_);if(m.current=q,u&&c==="idle"&&x.current&&q==="css-animation"){g.current=Bt(V);return}if(u&&c==="starting"){const ee=y.current;if(y.current=!1,q==="none"){F(Bt(V)),N(!0);return}if(q==="css-transition"){const J=iy(V);if(F(Bt(V)),!ee)return J;const ge=bn(V,"transition-duration","0s");return $(ge),N(!0),J}if(q==="css-animation"){if(F(Bt(V)),!ee){bn(V,"animation-name","none")();return}const J=bn(V,"animation-name","none"),ge=bn(V,"animation-duration","0s");J(),$(ge),N(!0);return}}if(!u&&o&&(c==="idle"||c==="starting")){if(q==="none"){F(gn,!1),l(!1);return}q==="css-animation"&&(x.current=!1,v.current=!1),F(Bt(V));return}if(c!=="ending")return;if(q==="none"){l(!1);return}const H=Bt(V);if(!((H.height??0)>0||(H.width??0)>0)){l(!1);return}F(H),q==="css-animation"&&bn(V,"animation-name","none")()},[o,u,B,F,l,$,_,c]),Sf({enabled:u&&o&&A==="idle",open:!0,ref:w,onComplete(){u&&F(gn,!1)}}),E.useEffect(()=>{if(u||!o||A!=="ending"||!w.current)return;const q=new AbortController;let H=-1;function Q(){T.current.open||(l(!1),F(gn,!1))}return H=De.request(()=>{q.signal.aborted||I(Q,q.signal)}),()=>{De.cancel(H),q.abort()}},[T,o,u,A,I,F,l]),pe(()=>{const V=w.current;!V||!n||!D||V.setAttribute("hidden","until-found")},[D,n]),E.useEffect(function(){const q=w.current;if(!q)return;function H(Q){y.current=!0,d(!0),i(!0,Ae(en,Q))}return yr(q,"beforematch",H)},[i,d]);const U=s||n||o||u;return{height:P.height,props:{...W?{[ka.startingStyle]:""}:void 0,hidden:D,id:r},ref:M,shouldPreventOpenAnimation:_,shouldRender:U,transitionStatus:A,width:P.width}}function Bt(e){return{height:e.scrollHeight,width:e.scrollWidth}}function oy(e,t=!1){const n=Wn(e).getComputedStyle(e),r=(n.animationName.split(",").map(o=>o.trim()).some(o=>o!==""&&o!=="none")||t)&&wc(n.animationDuration),s=wc(n.transitionDuration);return r&&s?(process.env.NODE_ENV!=="production"&&ls("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.","Only one of either animation type should be used."),"css-transition"):s?"css-transition":r?"css-animation":"none"}function wc(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function bn(e,t,n){const r=e.style.getPropertyValue(t),s=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===""){e.style.removeProperty(t);return}e.style.setProperty(t,r,s)}}function iy(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(s=>{e.style.setProperty(s,"initial","important")});function n(){Object.entries(t).forEach(([s,o])=>{if(o===""){e.style.removeProperty(s);return}e.style.setProperty(s,o)})}const r=De.request(n);return()=>{De.cancel(r),n()}}let fc=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const pc=E.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:o,render:i,id:u,style:l,...d}=t;process.env.NODE_ENV!=="production"&&pe(()=>{s&&o===!1&&ls("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.")},[s,o]);const{mounted:c,onOpenChange:w,open:m,panelId:p,setMounted:b,setPanelIdState:g,setOpen:y,state:x,transitionStatus:v}=ic(),C=s??!1,N=o??!1;pe(()=>{if(u)return g(u),()=>{g(void 0)}},[u,g]);const{height:S,props:M,ref:T,shouldPreventOpenAnimation:I,shouldRender:D,transitionStatus:A,width:_}=ay({externalRef:n,hiddenUntilFound:C,id:p,keepMounted:N,mounted:c,onOpenChange:w,open:m,setMounted:b,setOpen:y,transitionStatus:v}),P={...x,transitionStatus:A},W=$o(l,P),F=Ze("div",{...t,style:void 0},{state:P,ref:T,props:[M,{style:{[fc.collapsiblePanelHeight]:S===void 0?"auto":`${S}px`,[fc.collapsiblePanelWidth]:_===void 0?"auto":`${_}px`}},d,W?{style:W}:void 0,I?{style:{animationName:"none"}}:void 0],stateAttributesMapping:uc});return D?F:null});process.env.NODE_ENV!=="production"&&(pc.displayName="CollapsiblePanel");const uy=({children:e,Sidebar:t,className:n,defaultOpen:r=!0,open:s,onOpenChange:o,style:i})=>a.jsxs(Xl,{defaultOpen:r,open:s,onOpenChange:o,children:[a.jsxs(Zl,{variant:"sidebar",collapsible:"icon",className:h("wu-top-12 wu-h-[calc(100%-48px)] wu-shadow-sidebar wu-border-none",n),style:i,role:"complementary",children:[a.jsx(Rl,{className:"wu-py-2",children:a.jsx(hc,{})}),t]}),a.jsx(Ql,{className:"wu-contain-inline-size",children:e})]}),hc=e=>{const{state:t,isMobile:n,openMobile:r}=at();return a.jsx(Jl,{...e,children:a.jsx(va,{showMenu:n?r:t==="expanded"})})},ly=({className:e,children:t,...n})=>{const r=f.useRef(null),s=f.useRef(null),o=({currentTarget:u})=>{const{scrollTop:l,clientHeight:d,scrollHeight:c}=u;r.current&&r.current.classList.toggle("wu-border-[#1b338014]",l!==0),s.current&&s.current.classList.toggle("wu-border-[#1b338014]",l+d!==c)},i="wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent";return a.jsxs(tc,{...n,className:h("wu-overflow-hidden wu-gap-0",e),children:[a.jsx("hr",{className:i,ref:r}),a.jsx(Wt,{onScroll:o,className:"wu-gap-2",thumbColor:"#b9c3dc",railColor:"#00000000","data-testid":"scroll-area",children:t}),a.jsx("hr",{className:i,ref:s})]})},cy=e=>a.jsx(ec,{...e,children:e.children}),dy=({label:e,children:t,...n})=>a.jsxs(nc,{...n,className:"wu-p-0",children:[a.jsx("div",{className:"wu-h-8",children:a.jsx(rc,{className:"wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q",children:e})}),a.jsx(sc,{children:a.jsx(Ia,{children:t})})]}),wy=e=>a.jsx(Ia,{...e}),mc=({Icon:e,children:t,className:n,isActive:r,...s})=>{var w;const{state:o}=at(),[i,u]=f.useState(),l=Ea(),d=f.isValidElement(t)?f.cloneElement(t,{children:a.jsxs("div",{className:"wu-flex wu-items-center wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[a.jsx("div",{className:"wu-relative wu-right-1",children:e}),a.jsx("span",{className:h("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-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[a.jsx("div",{className:"wu-relative wu-right-1",children:e}),a.jsx("span",{className:h("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&!l&&"wu-opacity-0"),children:t})]}),c=f.useRef(null);return f.useEffect(()=>{var m;u(((m=c.current)==null?void 0:m.textContent)||"")},[]),a.jsx(ac,{...s,className:"wu-flex wu-items-center wu-gap-2 wu-px-2",children:a.jsx(oc,{className:h("wu-flex wu-items-center wu-text-blue-q hover:wu-bg-blue-sidebarHover wu-cursor-pointer wu-h-8 wu-rounded-sm",n,r&&"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:r,tooltip:i,asChild:f.isValidElement(t),ref:c,children:d})})},fy=({Title:e,Icon:t,children:n,className:r,...s})=>{const{state:o}=at(),i=Ea();return a.jsxs(lc,{children:[a.jsx(dc,{render:u=>{const l="data-panel-open"in u;return a.jsxs(mc,{Icon:t,...u,children:[e,(o==="expanded"||i)&&a.jsx(Oe,{icon:"wm-arrow-forward-ios",className:h("wu-absolute wu-right-4 wu-transition-transform wu-duration-300",l&&"wu-rotate-90","wu-scale-75")})]})}}),a.jsx(pc,{className:h(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',r),...s,children:n})]})},py=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"}]]),_a=(e,t,n=1)=>{const r=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);if(!r)throw new Error("Invalid HSL color format");const s=parseFloat(r[1]),o=parseFloat(r[2]),i=Math.max(0,parseFloat(r[3])+t);return`hsl(${s} ${o}% ${i}% / ${n})`},hy=({index:e,viewIndex:t,length:n,itemHeight:r})=>{const s=(e-t+n)%n;let o;s===0?o=0:s===n-1&&n>=2?o=-1:s===n-2&&n>=3?o=-2:s===1?o=1:s===2?o=2:s===n-3&&n>=4?o=-3:o=3;const i=py.get(o)||{},u=o>0?r+28+(o-1)*20:i.top;return{position:o,styles:{...i,...o>0&&{top:`${u}px`},height:o>0?"32px":r}}},yn={LIGHTNESS_STEP:8,BORDER_LIGHTNESS:10,CONTENT_HEIGHT:"calc(100% - 2rem)",FONT_SIZE_ACTIVE:"14px",FONT_SIZE_INACTIVE:"12px"},my=({children:e,className:t,header:n,baseColor:r,position:s=0,style:o,...i})=>{const u=s<=0,l=s===0,d={border:l?`4px solid ${_a(r,yn.BORDER_LIGHTNESS)}`:"",...o},c={backgroundColor:_a(r,s*yn.LIGHTNESS_STEP),fontSize:l?yn.FONT_SIZE_ACTIVE:yn.FONT_SIZE_INACTIVE,transition:"all 0.3s ease",position:"relative",bottom:s<0?"4px":"0px",height:"32px",padding:"4px 8px"},w={backgroundColor:_a(r,45+s*6),height:yn.CONTENT_HEIGHT,position:"relative",bottom:s<0?"4px":"0px"};return a.jsxs("div",{className:h("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})]})},gy=({children:e,Trigger:t,Header:n,styles:r={},classNames:s={},open:o,onOpenChange:i,itemHeight:u})=>{const l={height:u,...r.Trigger};return a.jsxs(Ml,{open:o,onOpenChange:i,children:[a.jsx(kl,{className:h("wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative",s.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(xa,{className:h("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",s.Content),hideCloseButton:!0,isStackedCard:!0,style:r.Content,children:[a.jsx(Sa,{}),a.jsx(to.DialogClose,{className:h("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",s.CloseButton),style:r.CloseButton,"aria-label":"Close dialog",children:a.jsx(Oe,{icon:"wm-close",className:"wu-text-lg wu-m-4 wu-cursor-pointer"})}),n&&a.jsx(Na,{className:h("wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]",s.Header),style:r.Header,children:n}),e]})]})};function by(){const[,e]=E.useState({});return E.useCallback(()=>{e({})},[])}const gc={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},yy={...gc,position:"fixed",top:0,left:0},vy={...gc,position:"absolute"},Pa=E.createContext(void 0);process.env.NODE_ENV!=="production"&&(Pa.displayName="NumberFieldRootContext");function vr(){const e=E.useContext(Pa);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>.":Zt(43));return e}const vn={inputValue:()=>null,value:()=>null,...ts},bc=new Map;function xn(e,t){const n=JSON.stringify({locale:e,options:t}),r=bc.get(n);if(r)return r;const s=new Intl.NumberFormat(e,t);return bc.set(n,s),s}function $t(e,t,n){return e==null?"":xn(t,n).format(e)}function yc(e,t,n){return $t(e,t,{...n,maximumFractionDigits:20})}const xy=["零","〇","一","二","三","四","五","六","七","八","九"],Ny={零:"0","〇":"0",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9"},vc=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],xc=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],Va=["0","1","2","3","4","5","6","7","8","9"],Nc=["%","٪","%","﹪"],Sc=["‰","؉"],Cc=["−","-","‒","–","—","﹣"],Tc=["+","﹢"],Sy=".",Cy=",",Ty=new RegExp(`[${vc.join("")}]`,"g"),Ey=new RegExp(`[${xc.join("")}]`,"g"),Iy=new RegExp(`[${Va.join("")}]`,"g"),My=new RegExp(`[${xy.join("")}]`,"g"),ky=new RegExp(`[${Nc.join("")}]`),Dy=new RegExp(`[${Sc.join("")}]`),Oa=/[٠١٢٣٤٥٦٧٨٩]/,La=/[۰۱۲۳۴۵۶۷۸۹]/,Fa=/[零〇一二三四五六七八九]/,Ec=new RegExp(`[${Va.join("")}]`),Ay=[".",",",Sy,Cy,"٫","٬"],Ic=new RegExp("\\p{Zs}","u"),_y=["+",...Tc],Py=["-",...Cc],xr=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Vy=e=>e.replace(/[-\\\]^]/g,t=>`\\${t}`),Mc=e=>`[${e.map(Vy).join("")}]`,kc=Mc(["-"].concat(Cc)),Dc=Mc(["+"].concat(Tc)),Ac=new RegExp(kc,"gu"),_c=new RegExp(Dc,"gu"),Nn=new RegExp(kc),Nr=new RegExp(Dc);function Wa(e,t){const n=xn(e,t).formatToParts(11111.1),r={};return n.forEach(s=>{r[s.type]=s.value}),xn(e).formatToParts(.1).forEach(s=>{s.type==="decimal"&&(r[s.type]=s.value)}),r}function Sn(e,t,n){if(e==null)return null;let r=String(e).replace(new RegExp("\\p{Cf}","gu"),"").trim();r=r.replace(Ac,"-").replace(_c,"+");let s=!1;const o=r.match(/([+-])\s*$/);o&&(o[1]==="-"&&(s=!0),r=r.replace(/([+-])\s*$/,""));const i=r.match(/^\s*([+-])/);i&&(i[1]==="-"&&(s=!0),r=r.replace(/^\s*[+-]/,""));let u=t;u===void 0&&(Oa.test(r)||La.test(r)?u="ar":Fa.test(r)&&(u="zh"));const{group:l,decimal:d,currency:c}=Wa(u,n),w=xn(u,n).formatToParts(1).filter(T=>T.type==="unit").map(T=>xr(T.value)),m=w.length?new RegExp(w.join("|"),"g"):null;let p=null;l&&(new RegExp("\\p{Zs}","u").test(l)?p=new RegExp("\\p{Zs}","gu"):l==="'"||l==="’"?p=/['’]/g:p=new RegExp(xr(l),"g"));let g=[{regex:l?p:null,replacement:""},{regex:d?new RegExp(xr(d),"g"):null,replacement:"."},{regex:/./g,replacement:"."},{regex:/,/g,replacement:""},{regex:/٫/g,replacement:"."},{regex:/٬/g,replacement:""},{regex:c?new RegExp(xr(c),"g"):null,replacement:""},{regex:m,replacement:""},{regex:Ty,replacement:T=>String(vc.indexOf(T))},{regex:Ey,replacement:T=>String(xc.indexOf(T))},{regex:Iy,replacement:T=>String(Va.indexOf(T))},{regex:My,replacement:T=>Ny[T]}].reduce((T,{regex:I,replacement:D})=>I?T.replace(I,D):T,r);const y=g.lastIndexOf(".");if(y!==-1&&(g=`${g.slice(0,y).replace(/\./g,"")}.${g.slice(y+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(r)||/[∞]/.test(r))return null;const x=(s?"-":"")+g;let v=parseFloat(x);const C=n==null?void 0:n.style,N=C==="unit"&&(n==null?void 0:n.unit)==="percent",S=ky.test(e)||C==="percent";return Dy.test(e)?v/=1e3:!N&&S&&(v/=100),Number.isNaN(v)?null:v}const Oy=60,Ly=400,Fy=8,Sr=1;function Wy(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const By=1e-10;function $y(e){const t=xn("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 qy(e,t){if(!Number.isFinite(e))return e;const n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function Ba(e,t){const{maximumFractionDigits:n}=$y(t);return qy(e,n)}function Hy(e,t,n,r="directional"){if(n===0)return e;const s=Math.abs(n),o=Math.sign(n),i=s*By*o,u=r==="nearest"?n:s,l=(e-t+i)/u;let d;return r==="nearest"?d=Math.round(l):o>0?d=Math.floor(l):d=Math.ceil(l),t+d*(r==="nearest"?n:s)}function zy(e,{step:t,minWithDefault:n,maxWithDefault:r,minWithZeroDefault:s,format:o,snapOnStep:i,small:u,clamp:l}){if(e===null)return e;const d=l?Wy(e,n,r):e;if(t!=null&&i){if(t===0)return Ba(d,o);let c=s;!u&&n!==Number.MIN_SAFE_INTEGER&&(c=n);const w=Hy(d,c,t,u?"nearest":"directional");return Ba(w,o)}return Ba(d,o)}const Pc=E.forwardRef(function(t,n){const{id:r,min:s,max:o,smallStep:i=.1,step:u=1,largeStep:l=10,required:d=!1,disabled:c=!1,readOnly:w=!1,form:m,name:p,defaultValue:b,value:g,onValueChange:y,onValueCommitted:x,allowWheelScrub:v=!1,snapOnStep:C=!1,allowOutOfRange:N=!1,format:S,locale:M,render:T,className:I,inputRef:D,style:A,..._}=t,{setDirty:P,validityData:W,disabled:F,setFilled:B,invalid:$,name:ie,state:U,validation:V,shouldValidateOnChange:q}=Vn(),H=F||c,Q=ie??p,ee=u==="any"?1:u,[J,ge]=E.useState(!1),K=s??Number.MIN_SAFE_INTEGER,O=o??Number.MAX_SAFE_INTEGER,j=s??0,Y=S==null?void 0:S.style,Z=E.useRef(null),G=$n(D,V.inputRef),X=Vo({id:r}),[he,le]=ws({controlled:g,default:b,name:"NumberField",state:"value"}),ne=he??null,xe=Aa(ne);pe(()=>{B(ne!==null)},[B,ne]);const Pe=by(),Ge=Aa(S),qt=E.useRef(!1),Pr=fe((te,R)=>{qt.current=!1,x==null||x(te,R)}),vt=E.useRef(!0),Vr=E.useRef(null),[xt,Nt]=E.useState(()=>g!==void 0?Vc(ne,M,S):$t(ne,M,S)),[Mn,Ht]=E.useState("numeric"),ce=fe(()=>{const{decimal:te,group:R,currency:ye,literal:ve}=Wa(M,S),ae=new Set;Ay.forEach(Ce=>ae.add(Ce)),te&&ae.add(te),R&&(ae.add(R),Ic.test(R)&&ae.add(" "));const Ut=Y==="percent"||Y==="unit"&&(S==null?void 0:S.unit)==="percent",Ke=Y==="percent"||Y==="unit"&&(S==null?void 0:S.unit)==="permille";return Ut&&Nc.forEach(Ce=>ae.add(Ce)),Ke&&Sc.forEach(Ce=>ae.add(Ce)),Y==="currency"&&ye&&ae.add(ye),ve&&(Array.from(ve).forEach(Ce=>ae.add(Ce)),Ic.test(ve)&&ae.add(" ")),_y.forEach(Ce=>ae.add(Ce)),K<0&&Py.forEach(Ce=>ae.add(Ce)),ae}),Ue=fe(te=>te!=null&&te.altKey?i:te!=null&&te.shiftKey?l:ee),zt=fe((te,R)=>{const ye=R.event,ve=R.direction,ae=R.reason,Ut=!N||!(ae===fs||ae===jn||ae===ps||ae===tn||ae===en),Ke=zy(te,{step:ve?Ue(ye)*ve:void 0,format:Ge.current,minWithDefault:K,maxWithDefault:O,minWithZeroDefault:j,snapOnStep:C,small:(ye==null?void 0:ye.altKey)??!1,clamp:Ut}),Ce=R.reason===fs||R.reason===tn||R.reason===jn||R.reason===ps||R.reason===en,Qa=Ke!==ne||Ce&&(te!==ne||vt.current===!1);if(Qa){if(Vr.current=Ke,y==null||y(Ke,R),R.isCanceled)return Qa;le(Ke),P(Ke!==W.initialValue),qt.current=!0}return vt.current&&Nt($t(Ke,M,S)),Pe(),Qa}),Or=fe((te,{direction:R,currentValue:ye,event:ve,reason:ae})=>{const Ut=ye??xe.current,Ke=typeof Ut=="number"?Ut+te*R:Math.max(0,s??0);return zt(Ke,Ae(ae,ve,void 0,{direction:R}))});pe(function(){if(!vt.current)return;const R=g!==void 0?Vc(ne,M,S):$t(ne,M,S);R!==xt&&Nt(R)}),pe(function(){if(!Zw)return;let R="text";K>=0&&(R="decimal"),Ht(R)},[K,Y]),E.useEffect(function(){const R=Z.current;if(H||w||!v||!R)return;function ye(ve){if(ve.ctrlKey||Lo(Oo(Z.current))!==Z.current)return;ve.preventDefault(),vt.current=!0;const ae=Ue(ve)??Sr;Or(ae,{direction:ve.deltaY>0?-1:1,event:ve,reason:"wheel"})}return yr(R,"wheel",ye)},[v,Or,H,w,Ue]);const Ja=E.useMemo(()=>({...U,disabled:H,readOnly:w,required:d,value:ne,inputValue:xt,scrubbing:J}),[U,H,w,d,ne,xt,J]),Kv=E.useMemo(()=>({inputRef:Z,inputValue:xt,value:ne,minWithDefault:K,maxWithDefault:O,disabled:H,readOnly:w,id:X,setValue:zt,incrementValue:Or,getStepAmount:Ue,allowInputSyncRef:vt,formatOptionsRef:Ge,valueRef:xe,lastChangedValueRef:Vr,hasPendingCommitRef:qt,name:Q,required:d,invalid:$,inputMode:Mn,getAllowedNonNumericKeys:ce,min:s,max:o,setInputValue:Nt,locale:M,isScrubbing:J,setIsScrubbing:ge,state:Ja,onValueCommitted:Pr}),[Z,xt,ne,K,O,H,w,X,zt,Or,Ue,Ge,xe,Q,d,$,Mn,ce,s,o,Nt,M,J,Ja,Pr]),Yv=Ze("div",t,{ref:n,state:Ja,props:_,stateAttributesMapping:vn});return a.jsxs(Pa.Provider,{value:Kv,children:[Yv,a.jsx("input",{...V.getInputValidationProps({onFocus(){var te;(te=Z.current)==null||te.focus()},onChange(te){var ae;if(te.nativeEvent.defaultPrevented||H||w){(ae=te.preventBaseUIHandler)==null||ae.call(te);return}const R=te.currentTarget.valueAsNumber,ye=Number.isNaN(R)?null:R,ve=Ae(en,te.nativeEvent);P(ye!==W.initialValue),zt(ye,ve),q()&&V.commit(ye)}}),ref:G,type:"number",form:m,name:Q,value:ne??"",min:s,max:o,step:u,disabled:H,required:d,"aria-hidden":!0,tabIndex:-1,style:Q?vy:yy,suppressHydrationWarning:!0})]})});process.env.NODE_ENV!=="production"&&(Pc.displayName="NumberFieldRoot");function Vc(e,t,n){return(n==null?void 0:n.maximumFractionDigits)!=null||(n==null?void 0:n.minimumFractionDigits)!=null?$t(e,t,n):yc(e,t,n)}const Oc=E.forwardRef(function(t,n){const{render:r,className:s,style:o,...i}=t,{state:u}=vr();return Ze("div",t,{ref:n,state:u,props:[{role:"group"},i],stateAttributesMapping:vn})});process.env.NODE_ENV!=="production"&&(Oc.displayName="NumberFieldGroup");const Lc=0;class $a extends qn{constructor(){super(...arguments);Te(this,"clear",()=>{this.currentId!==Lc&&(clearInterval(this.currentId),this.currentId=Lc)})}static create(){return new $a}start(n,r){this.clear(),this.currentId=setInterval(()=>{r()},n)}}function Uy(){const e=Qe($a.create).current;return cs(e.disposeEffect),e}const jy=60,Gy=400,Ky=8,Yy=50,Xy=3;function Cn(e){return e==="touch"||e==="pen"}function Zy(e){const{disabled:t,readOnly:n=!1,tick:r,onStop:s,tickDelay:o=jy,startDelay:i=Gy,scrollDistance:u=Ky,elementRef:l}=e,d=qo(),c=Uy(),w=qo(),m=E.useRef(!1),p=E.useRef(0),b=E.useRef({x:0,y:0}),g=E.useRef(!1),y=E.useRef(!1),x=E.useRef(""),v=E.useRef(()=>{}),C=fe(()=>{w.clear(),d.clear(),c.clear(),v.current(),p.current=0});function N(T){C();const I=l.current;if(!I)return;const D=Wn(I);function A(_){_.preventDefault()}if(v.current=yr(D,"contextmenu",A),yr(D,"pointerup",_=>{m.current=!1,C(),s==null||s(_)},{once:!0}),!r(T)){C();return}d.start(i,()=>{c.start(o,()=>{r(T)||C()})})}E.useEffect(()=>()=>C(),[C]);const S={onTouchStart(){g.current=!0},onTouchEnd(){g.current=!1},onPointerDown(T){const I=!T.button||T.button===0;if(T.defaultPrevented||!I||t||n)return;x.current=T.pointerType,y.current=!1,m.current=!0,b.current={x:T.clientX,y:T.clientY},Cn(T.pointerType)?w.start(Yy,()=>{const A=p.current;p.current=0,m.current&&A<Xy?(N(T.nativeEvent),y.current=!0):(y.current=!1,C())}):(T.preventDefault(),N(T.nativeEvent))},onPointerUp(T){Cn(T.pointerType)&&(m.current=!1)},onPointerMove(T){if(t||n||!Cn(T.pointerType)||!m.current)return;p.current!=null&&(p.current+=1);const{x:I,y:D}=b.current,A=I-T.clientX,_=D-T.clientY;A**2+_**2>u**2&&C()},onMouseEnter(T){T.defaultPrevented||t||n||!m.current||g.current||Cn(x.current)||N(T.nativeEvent)},onMouseLeave(){g.current||C()},onMouseUp(){g.current||C()}},M=fe(T=>T.defaultPrevented?!0:Cn(x.current)?y.current:T.detail!==0);return{pointerHandlers:S,shouldSkipClick:M}}function Jy(e){return e==="touch"||e==="pen"}function Fc(e){const{allowInputSyncRef:t,disabled:n,formatOptionsRef:r,getStepAmount:s,id:o,incrementValue:i,inputRef:u,inputValue:l,isIncrement:d,locale:c,readOnly:w,setValue:m,valueRef:p,lastChangedValueRef:b,onValueCommitted:g}=e,y=d?Ef:If;function x(S){t.current=!0;const M=Sn(l,c,r.current);M!==null&&(p.current=M,m(M,Ae(y,S,void 0,{direction:d?1:-1})))}const{pointerHandlers:v,shouldSkipClick:C}=Zy({disabled:n||w,elementRef:u,tickDelay:Oy,startDelay:Ly,scrollDistance:Fy,tick(S){const M=s(S)??Sr;return i(M,{direction:d?1:-1,event:S,reason:y})},onStop(S){const M=b.current??p.current;g(M,rn(y,S))}});return{disabled:n,"aria-readonly":w||void 0,"aria-label":d?"Increase":"Decrease","aria-controls":o,tabIndex:-1,style:{WebkitUserSelect:"none",userSelect:"none"},...v,onClick(S){const M=n||w;if(S.defaultPrevented||M||C(S))return;x(S.nativeEvent);const T=s(S)??Sr,I=p.current;i(T,{direction:d?1:-1,event:S.nativeEvent,reason:y});const D=b.current??p.current;D!==I&&g(D,rn(y,S.nativeEvent))},onPointerDown(S){var T;const M=!S.button||S.button===0;S.defaultPrevented||w||!M||n||(x(S.nativeEvent),Jy(S.pointerType)||(T=u.current)==null||T.focus(),v.onPointerDown(S))}}}const Wc=E.forwardRef(function(t,n){const{render:r,className:s,disabled:o=!1,nativeButton:i=!0,style:u,...l}=t,{allowInputSyncRef:d,disabled:c,formatOptionsRef:w,getStepAmount:m,id:p,incrementValue:b,inputRef:g,inputValue:y,locale:x,maxWithDefault:v,readOnly:C,setValue:N,state:S,value:M,valueRef:T,lastChangedValueRef:I,onValueCommitted:D}=vr(),A=M!=null&&M>=v,_=o||c||A,P=Fc({isIncrement:!0,inputRef:g,inputValue:y,disabled:_,readOnly:C,id:p,setValue:N,getStepAmount:m,incrementValue:b,allowInputSyncRef:d,formatOptionsRef:w,valueRef:T,locale:x,lastChangedValueRef:I,onValueCommitted:D}),{getButtonProps:W,buttonRef:F}=Da({disabled:_,native:i,focusableWhenDisabled:!0}),B=E.useMemo(()=>({...S,disabled:_}),[S,_]);return Ze("button",t,{ref:[n,F],state:B,props:[P,l,W],stateAttributesMapping:vn})});process.env.NODE_ENV!=="production"&&(Wc.displayName="NumberFieldIncrement");const Bc=E.forwardRef(function(t,n){const{render:r,className:s,disabled:o=!1,nativeButton:i=!0,style:u,...l}=t,{allowInputSyncRef:d,disabled:c,formatOptionsRef:w,getStepAmount:m,id:p,incrementValue:b,inputRef:g,inputValue:y,minWithDefault:x,readOnly:v,setValue:C,state:N,value:S,valueRef:M,locale:T,lastChangedValueRef:I,onValueCommitted:D}=vr(),A=S!=null&&S<=x,_=o||c||A,P=Fc({isIncrement:!1,inputRef:g,inputValue:y,disabled:_,readOnly:v,id:p,setValue:C,getStepAmount:m,incrementValue:b,allowInputSyncRef:d,formatOptionsRef:w,valueRef:M,locale:T,lastChangedValueRef:I,onValueCommitted:D}),{getButtonProps:W,buttonRef:F}=Da({disabled:_,native:i,focusableWhenDisabled:!0}),B=E.useMemo(()=>({...N,disabled:_}),[N,_]);return Ze("button",t,{ref:[n,F],state:B,props:[P,l,W],stateAttributesMapping:vn})});process.env.NODE_ENV!=="production"&&(Bc.displayName="NumberFieldDecrement");function Qy(e,t){const n=E.useRef(e),r=fe(t);pe(()=>{n.current!==e&&r(n.current)},[e,r]),pe(()=>{n.current=e},[e])}const Ry={...ts,...vn},ev=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),$c=E.forwardRef(function(t,n){const{render:r,className:s,style:o,...i}=t,{allowInputSyncRef:u,disabled:l,formatOptionsRef:d,getAllowedNonNumericKeys:c,getStepAmount:w,id:m,incrementValue:p,inputMode:b,inputValue:g,max:y,min:x,name:v,readOnly:C,required:N,setValue:S,state:M,setInputValue:T,locale:I,inputRef:D,value:A,onValueCommitted:_,lastChangedValueRef:P,hasPendingCommitRef:W,valueRef:F}=vr(),{clearErrors:B}=Bw(),{validationMode:$,setTouched:ie,setFocused:U,invalid:V,shouldValidateOnChange:q,validation:H}=Vn(),{labelId:Q}=os(),ee=E.useRef(!1),J=E.useRef(!1);return Go(D,m,A),Qy(A,O=>{const j=q();if(B(v),j&&H.commit(A),!(O===A||j)){if(J.current){J.current=!1;return}H.commit(A,!0)}}),Ze("input",t,{ref:[n,D],state:M,props:[{id:m,required:N,disabled:l,readOnly:C,inputMode:b,value:g,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":V||void 0,"aria-labelledby":Q,suppressHydrationWarning:!0,onFocus(O){if(O.defaultPrevented||C||l||(U(!0),ee.current))return;ee.current=!0;const j=O.currentTarget,Y=j.value.length;j.setSelectionRange(Y,Y)},onBlur(O){if(O.defaultPrevented||C||l)return;ie(!0),U(!1);const j=!u.current,Y=W.current;if(u.current=!0,g.trim()===""){S(null,Ae(tn,O.nativeEvent)),$==="onBlur"&&H.commit(null),_(null,rn(tn,O.nativeEvent));return}const Z=d.current,G=Sn(g,I,Z);if(G===null)return;const X=(Z==null?void 0:Z.maximumFractionDigits)!=null||(Z==null?void 0:Z.minimumFractionDigits)!=null,he=Z==null?void 0:Z.maximumFractionDigits,le=X&&typeof he=="number"?Number(G.toFixed(he)):G,ne=rn(jn,O.nativeEvent),xe=A!==le,Pe=j||xe||Y;$==="onBlur"&&H.commit(le),xe&&(J.current=!0,S(le,Ae(jn,O.nativeEvent))),Pe&&_(le,ne);const Ge=$t(le,I,Z);!(!X&&G===A&&g===yc(G,I,Z))&&g!==Ge&&T(Ge)},onChange(O){if(O.nativeEvent.defaultPrevented)return;u.current=!1;const j=O.currentTarget.value;if(j.trim()===""){T(j),S(null,Ae(tn,O.nativeEvent));return}const Y=c();if(!Array.from(j).every(X=>{const he=X>="0"&&X<="9",le=Oa.test(X),ne=Fa.test(X),xe=La.test(X),Pe=Ec.test(X),Ge=Nn.test(X);return he||le||ne||xe||Pe||Ge||Y.has(X)}))return;const G=Sn(j,I,d.current);T(j),G!==null&&S(G,Ae(fs,O.nativeEvent))},onKeyDown(O){if(O.defaultPrevented||C||l)return;const j=O.nativeEvent;u.current=!0;const Y=c();let Z=Y.has(O.key);const{decimal:G,currency:X,percentSign:he}=Wa(I,d.current),le=O.currentTarget.selectionStart,ne=O.currentTarget.selectionEnd,xe=le===0&&ne===g.length,Pe=ce=>le!=null&&ne!=null&&ce>=le&&ce<ne;if(Nn.test(O.key)&&Array.from(Y).some(ce=>Nn.test(ce||""))){const ce=g.search(Ac),Ue=ce!=null&&ce!==-1&&Pe(ce);Z=!(Nn.test(g)||Nr.test(g))||xe||Ue}if(Nr.test(O.key)&&Array.from(Y).some(ce=>Nr.test(ce||""))){const ce=g.search(_c),Ue=ce!=null&&ce!==-1&&Pe(ce);Z=!(Nn.test(g)||Nr.test(g))||xe||Ue}[G,X,he].forEach(ce=>{if(O.key===ce){const Ue=g.indexOf(ce),zt=Pe(Ue);Z=!g.includes(ce)||xe||zt}});const Ge=O.key>="0"&&O.key<="9",qt=Oa.test(O.key),Pr=Fa.test(O.key),vt=La.test(O.key),Vr=Ec.test(O.key),xt=ev.has(O.key);if(O.which===229||O.altKey||O.ctrlKey||O.metaKey||Z||Ge||qt||Vr||Pr||vt||xt)return;const Nt=Sn(g,I,d.current),Mn=w(O)??Sr;ef(O);const Ht=rn(nn,j);O.key==="ArrowUp"?(p(Mn,{direction:1,currentValue:Nt,event:j,reason:nn}),_(P.current??F.current,Ht)):O.key==="ArrowDown"?(p(Mn,{direction:-1,currentValue:Nt,event:j,reason:nn}),_(P.current??F.current,Ht)):O.key==="Home"&&x!=null?(S(x,Ae(nn,j)),_(P.current??F.current,Ht)):O.key==="End"&&y!=null&&(S(y,Ae(nn,j)),_(P.current??F.current,Ht))},onPaste(O){if(O.defaultPrevented||C||l)return;O.preventDefault();const Y=(O.clipboardData||window.Clipboard).getData("text/plain"),Z=Sn(Y,I,d.current);Z!==null&&(u.current=!1,S(Z,Ae(ps,O.nativeEvent)),T(Y))}},H.getValidationProps(),i],stateAttributesMapping:Ry})});process.env.NODE_ENV!=="production"&&($c.displayName="NumberFieldInput");const tv={wuStepper:"_wuStepper_apbnq_1"},nv=({onChange:e,Label:t,defaultValue:n=0,readonly:r,dir:s,step:o=1,min:i,max:u,value:l,className:d,labelPosition:c="left",disabled:w,resetInvalidValueOnBlur:m=!0,...p})=>{const b=E.useId(),[g,y]=E.useState(l!==void 0?Number(l):n||0);E.useEffect(()=>{l!==void 0&&y(Number(l))},[l]);const x=T=>{y(T),e==null||e(T)},v=T=>{const I=Number(T.target.value);Number.isNaN(I)||y(I)},C=()=>{m&&(i!==void 0&&g<i?(y(i),e==null||e(i)):u!==void 0&&g>u&&(y(u),e==null||e(u)))};E.useEffect(()=>{l&&n&&console.warn("As both value and defaultValue are passed, value will be used")},[l,n]);const N={inc:r||u!==void 0&&g>=u||w,dec:r||i!==void 0&&g<=i||w},S=i!==void 0&&g<i||u!==void 0&&g>u,M=h("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(Pc,{id:b,value:g,step:o,readOnly:r,onValueChange:T=>typeof T=="number"&&x(T),dir:s,className:h("wu-flex wu-stepper",s==="rtl"&&c!=="top"&&"wu-gap-2",tv.wuStepper,rv({labelPosition:c}),d),children:[t&&a.jsx(Me,{htmlFor:b,className:"wu-input-label",children:t}),a.jsxs(Oc,{className:"wu-flex wu-max-w-[97px] wu-relative",children:[a.jsx(Bc,{"aria-label":"decrement",className:h(M,s==="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($c,{"aria-label":"stepper",role:"spinbutton",type:"text","aria-invalid":S||void 0,dir:s,className:h("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",S&&"wu-border-red-deep focus:wu-border-red-deep","wu-stepper-input"),readOnly:r,onChange:v,onBlur:C,disabled:w,min:i,max:u,step:o,value:g,...p}),a.jsx(Wc,{"aria-label":"increment",className:h(M,s==="rtl"?"wu-left-0":"wu-right-0","wu-stepper-button"),disabled:N.inc,children:a.jsx("span",{className:"wu-text-base wm-add"})})]})]})},rv=Be.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"}}}),We={container:"_container_1cpdq_1",sidebar:"_sidebar_1cpdq_5",content:"_content_1cpdq_13",sourceWrapper:"_sourceWrapper_1cpdq_17",list:"_list_1cpdq_25",listItem:"_listItem_1cpdq_29",listItemActive:"_listItemActive_1cpdq_42",label:"_label_1cpdq_46",icon:"_icon_1cpdq_50",sharedWrapper:"_sharedWrapper_1cpdq_54"},qc=f.memo(({className:e,label:t="Shared surveys",...n})=>a.jsxs("button",{className:h(We.sharedWrapper,e),"data-slot":"survey-select-shared","aria-label":t,...n,children:[a.jsx("span",{className:"wm-share","aria-hidden":"true"}),a.jsx("span",{children:t})]}));qc.displayName="WuSharedSurvey";const sv=(e,t=!1)=>{if(e)return a.jsx("span",{className:We.icon,"aria-hidden":"true",children:e});const n=t?"wm-folder-supervised":"wm-folder";return a.jsx("span",{className:h(We.icon,n),"aria-hidden":"true"})},Hc=f.memo(({children:e,icon:t,isActive:n,isShared:r,className:s,...o})=>a.jsxs("button",{className:h(We.listItem,n&&We.listItemActive,s),"aria-selected":n,"data-slot":"survey-select-item",type:"button",...o,children:[sv(t,r),a.jsx("span",{className:We.label,children:e})]}));Hc.displayName="WuSurveyItem";const zc=f.memo(({children:e,className:t,...n})=>a.jsx("div",{className:h(We.list,t),...n,children:e}));zc.displayName="WuSurveyList";const Uc=e=>{const{className:t,variant:n="outlined",...r}=e;return a.jsx("div",{className:We.sourceWrapper,"data-slot":"survey-select-source",children:a.jsx(El,{variant:n,showGroupSeparator:!0,className:h(We.source,t),...r})})};Uc.displayName="WuSurveySource";const av=f.memo(Uc),jc=f.memo(({Sidebar:e,children:t,className:n,...r})=>a.jsxs("div",{className:h(We.container,n),role:"region","aria-label":"Survey selection interface","data-slot":"survey-select",...r,children:[e&&a.jsx("div",{className:We.sidebar,role:"complementary","aria-label":"Survey sidebar","data-slot":"survey-select-sidebar",children:e}),a.jsx("div",{className:We.content,"aria-label":"Survey content","data-slot":"survey-select-content",children:t})]}));jc.displayName="WuSurveySelect";const Gc=Be.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"}}),ov=E.forwardRef(({className:e,variant:t,size:n,...r},s)=>a.jsx(so.Root,{ref:s,className:h(Gc({variant:t,size:n,className:e})),...r}));ov.displayName=so.Root.displayName;const Kc=E.createContext({size:"default",variant:"default"}),Cr=E.forwardRef(({className:e,variant:t,size:n,children:r,...s},o)=>a.jsx(kn.Root,{ref:o,className:h("wu-flex wu-items-center wu-justify-center wu-gap-1",e),...s,children:a.jsx(Kc.Provider,{value:{variant:t,size:n},children:r})}));Cr.displayName=kn.Root.displayName;const bt=E.forwardRef(({className:e,children:t,variant:n,size:r,...s},o)=>{const i=E.useContext(Kc);return a.jsx(kn.Item,{ref:o,className:h(Gc({variant:i.variant||n,size:i.size||r}),e),...s,children:t})});bt.displayName=kn.Item.displayName;const Yc=f.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,dir:o,onChange:i}=e,u=l=>h("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",s&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",l===r&&"wu-text-white",s&&r===l&&"wu-text-gray-lead","wu-switcher-icon-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(Cr,{ref:t,type:"single",value:r,onValueChange:i,disabled:s,dir:o,className:h("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",s&&"wu-cursor-not-allowed","wu-switcher-icon-tab-group"),children:[a.jsx("div",{role:"slider",className:h("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",r==="opt1"&&"",r==="opt2"&&o!=="rtl"&&"wu-translate-x-full",r==="opt2"&&o==="rtl"&&"-wu-translate-x-full",s&&"wu-bg-gray-40","wu-switcher-icon-tab-slider")}),a.jsx(bt,{value:"opt1",className:u("opt1"),children:n[0].label}),a.jsx(bt,{value:"opt2",className:u("opt2"),children:n[1].label})]})})});Yc.displayName="_IconTab";const Xc=f.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,dir:o,size:i="md",onChange:u}=e,l=d=>h("wu-w-1/2 wu-text-xs wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-font-normal",s&&"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===r&&"wu-text-white wu-font-medium",s&&r===d&&"wu-text-gray-lead","wu-switcher-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(Cr,{ref:t,type:"single",value:r,onValueChange:u,disabled:s,dir:o,className:h("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",s&&"wu-cursor-not-allowed","wu-switcher-tab-group"),children:[a.jsx("div",{role:"slider",className:h("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",r==="opt1"&&"",r==="opt2"&&o!=="rtl"&&"wu-translate-x-full",r==="opt2"&&o==="rtl"&&"-wu-translate-x-full",s&&"wu-bg-gray-40","wu-switcher-tab-slider")}),a.jsx(bt,{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(bt,{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})})]})})});Xc.displayName="_Tab";const Zc=f.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,dir:o,onChange:i}=e,u=w=>h("wu-p-0 wu-w-fit wu-text-xs wu-text-gray-lead wu-h-fit wu-font-normal",s&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle",w===r&&"wu-text-primary wu-font-medium",s&&r===w&&"wu-text-gray-lead","wu-switcher-toggle-item"),l=h("wu-w-fit wu-gap-2",s&&"wu-cursor-not-allowed","wu-switcher-toggle-group"),d=h("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",s&&"wu-border-gray-subtle wu-cursor-not-allowed","wu-switcher-toggle-button"),c=h("wu-w-2 wu-h-2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",r==="opt1"&&o!=="rtl"&&"-wu-translate-x-[10px]",r==="opt1"&&o==="rtl"&&"wu-translate-x-[10px]",r==="opt2"&&o!=="rtl"&&"wu-translate-x-[10px]",r==="opt2"&&o==="rtl"&&"-wu-translate-x-[10px]",s&&"wu-hidden","wu-switcher-toggle-knob");return a.jsx(a.Fragment,{children:a.jsxs(Cr,{ref:t,type:"single",value:r,disabled:s,dir:o,className:l,onValueChange:i,children:[a.jsx(bt,{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(r==="opt1"?"opt2":"opt1"),className:d,disabled:s,"aria-label":"knob",dir:o,children:a.jsx("div",{className:c,role:"knob",dir:o})}),a.jsx(bt,{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})})]})})});Zc.displayName="_Toggle";const Jc=f.forwardRef((e,t)=>{const{type:n,options:r,value:s,disabled:o,dir:i,size:u,onChange:l,toggle:d=!0,...c}=e,[w,m]=f.useState(),p=b=>{let g=w;b!==""?g=b:d&&(g=w==="opt1"?"opt2":"opt1");const y=g==="opt1"?r[0].value:r[1].value;l&&l(y),m(g)};if(f.useEffect(()=>{if(!Array.isArray(r)||r.length<2)throw new Error("Options are not sufficient");m(s===r[0].value?"opt1":"opt2")},[r,s]),!Array.isArray(r)||r.length<2)return a.jsx(a.Fragment,{});switch(n){case"toggle":return a.jsx(Zc,{...c,ref:t,options:r,value:w||"opt1",onChange:p,disabled:o,dir:i});case"iconTab":return a.jsx(Yc,{ref:t,options:r,value:w||"opt1",onChange:p,disabled:o,dir:i});default:return a.jsx(Xc,{ref:t,options:r,value:w||"opt1",onChange:p,disabled:o,dir:i,size:u})}});Jc.displayName="WuSwitcher";const Qc=lt.Root,qa=E.forwardRef(({className:e,children:t,...n},r)=>a.jsx(lt.List,{className:h("wu-relative wu-flex",e),...n,ref:r,children:t}));qa.displayName=lt.List.displayName;const Ha=E.forwardRef(({className:e,...t},n)=>a.jsx(lt.Trigger,{ref:n,className:h("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}));Ha.displayName=lt.Trigger.displayName;const Rc=E.forwardRef(({className:e,...t},n)=>a.jsx(lt.Content,{ref:n,className:e,...t}));Rc.displayName=lt.Content.displayName;const ed=({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:h("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(r=>a.jsx(Rc,{value:r.value,forceMount:t||void 0,className:h("wu-w-full wu-h-full wu-overflow-y-auto",t&&n,"wu-tab-content"),children:r.Content},r.value))})},iv=e=>{const[t,n]=f.useState(!1),[r,s]=f.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollLeft>0),s(u.scrollLeft+u.clientWidth<u.scrollWidth))};return f.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:r,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="right"?l.clientWidth:-l.clientWidth)*.8;l.scrollBy({left:d,behavior:"smooth"})}}}},td=(e,t)=>{const[n,r]=f.useState({width:0,left:0,height:0,top:0}),s=t==="vertical";return f.useEffect(()=>{const o=e.current;if(o){const i=()=>{const l=o.querySelector('[data-state="active"]');if(l){const d={width:s?2:l.offsetWidth,left:s?0:l.offsetLeft,height:s?l.offsetHeight:1,top:s?l.offsetTop:0};r(d)}},u=new MutationObserver(i);return u.observe(o,{attributes:!0,subtree:!0}),i(),()=>{u.disconnect()}}},[e,s]),n},uv=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:s=!1,className:o,dir:i="ltr",position:u="top"})=>{var C;const l=f.useRef(null),d=td(l,"horizontal"),{showLeftArrow:c,showRightArrow:w,scrollByTab:m}=iv(l),[p,b]=f.useState(!1),g=()=>m("left"),y=()=>m("right"),x=N=>a.jsx("div",{"data-testid":`gradient-overlay-${N}`,className:h("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,S,M)=>{const T=S==="left";return a.jsx("button",{onClick:N,className:h("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",T?"wu-left-0":"wu-right-0",M&&"wu-translate-x-0 wu-opacity-100",!M&&[T?"-wu-translate-x-full":"wu-translate-x-full","wu-opacity-0"]),"aria-label":T?"scroll-left":"scroll-right",children:a.jsx("span",{className:h("wu-text-blue-p wu-text-lg",T?"wm-keyboard-arrow-left":"wm-keyboard-arrow-right")})})};return a.jsxs(Qc,{defaultValue:n||((C=e[0])==null?void 0:C.value),value:t,onValueChange:r,orientation:"horizontal",dir:i,className:h("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:()=>b(!0),onMouseLeave:()=>b(!1),"aria-label":"tablistWrapper",children:[c&&p&&x("left"),v(g,"left",c&&p),a.jsxs(qa,{ref:l,className:h("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(Ha,{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&&p&&x("right"),v(y,"right",w&&p)]}),a.jsx(ed,{items:e,enableAnimation:s})]})},lv=e=>{const[t,n]=f.useState(!1),[r,s]=f.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollTop>0),s(u.scrollTop+u.clientHeight<u.scrollHeight))};return f.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:r,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="down"?l.clientHeight:-l.clientHeight)*.8;l.scrollBy({top:d,behavior:"smooth"})}}}},cv=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:s=!1,className:o,dir:i="ltr",position:u="left"})=>{var C;const l=f.useRef(null),d=td(l,"vertical"),{showTopArrow:c,showBottomArrow:w,scrollByTab:m}=lv(l),[p,b]=f.useState(!1),g=()=>m("up"),y=()=>m("down"),x=N=>a.jsx("div",{className:h("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,S,M)=>{const T=S==="up";return a.jsx("button",{onClick:N,className:h("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",T?"-wu-top-1":"-wu-bottom-1",M&&"wu-translate-y-0 wu-opacity-100",!M&&[T?"-wu-translate-y-full":"wu-translate-y-full","wu-opacity-0"]),"aria-label":T?"scroll-up":"scroll-down",children:a.jsx("span",{className:h("wu-text-blue-p wu-text-lg",T?"wm-keyboard-arrow-up":"wm-keyboard-arrow-down")})})};return a.jsxs(Qc,{defaultValue:n||((C=e[0])==null?void 0:C.value),value:t,onValueChange:r,orientation:"vertical",dir:i,className:h("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:()=>b(!0),onMouseLeave:()=>b(!1),"aria-label":"tablistWrapper",children:[c&&p&&x("top"),v(g,"up",c&&p),a.jsxs(qa,{ref:l,className:h("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(Ha,{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&&p&&x("bottom"),v(y,"down",w&&p)]}),a.jsx(ed,{items:e,enableAnimation:s})]})},dv=({...e})=>e.orientation==="vertical"?a.jsx(cv,{...e}):a.jsx(uv,{...e}),za=E.forwardRef(({className:e,...t},n)=>a.jsx("table",{ref:n,className:h("wu-w-full wu-caption-bottom wu-text-sm",e),...t}));za.displayName="Table";const Ua=E.forwardRef(({className:e,...t},n)=>a.jsx("thead",{ref:n,className:h("[&_tr]:wu-border-b",e),...t}));Ua.displayName="TableHeader";const Tn=E.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:h("",e),...t}));Tn.displayName="TableBody";const wv=E.forwardRef(({className:e,...t},n)=>a.jsx("tfoot",{ref:n,className:h("wu-border-t wu-bg-muted/50 wu-font-medium [&>tr]:last:wu-border-b-0",e),...t}));wv.displayName="TableFooter";const ot=E.forwardRef(({className:e,...t},n)=>a.jsx("tr",{ref:n,className:h("wu-border-b wu-transition-colors wu-hover:wu-bg-muted/50 data-[state=selected]:wu-bg-muted",e),...t}));ot.displayName="TableRow";const Tr=E.forwardRef(({className:e,...t},n)=>a.jsx("th",{ref:n,className:h("wu-px-4 wu-text-left wu-align-middle wu-font-medium wu-text-muted-foreground [&:has([role=checkbox])]:wu-pr-0",e),...t}));Tr.displayName="TableHead";const yt=E.forwardRef(({className:e,...t},n)=>a.jsx("td",{ref:n,className:h("wu-p-4 wu-align-middle [&:has([role=checkbox])]:wu-pr-0",e),...t}));yt.displayName="TableCell";const En=E.forwardRef(({className:e,...t},n)=>a.jsx("caption",{ref:n,className:h("wu-mt-4 wu-text-sm wu-text-gray-subtle wu-font-normal",e),...t}));En.displayName="TableCaption";function nd(){const e=f.useRef(null),[t,n]=f.useState(!1),[r,s]=f.useState(!1),o=f.useCallback(()=>{const i=e.current;i&&(n(i.scrollLeft>12),s(i.scrollLeft<i.scrollWidth-i.clientWidth-1))},[]);return f.useEffect(()=>{o()},[o]),{scrollContainerRef:e,isScrolledLeft:t,isScrolledRight:r,handleScroll:o}}const rd=48,sd="expander";function fv(e,t){return e?[{id:sd,accessorKey:sd,header:"",cell:({row:n})=>{const r=n.getIsExpanded();return a.jsx("button",{type:"button",className:"wu-inline-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-text-[10px]",onClick:()=>n.toggleExpanded(),"aria-label":r?"Collapse row":"Expand row",children:a.jsx("span",{className:h("wm-arrow-forward-ios wu-transition-all",r?"wu-rotate-90":"")})})},enableSorting:!1,enableColumnFilter:!1,enableGlobalFilter:!1,enableHiding:!1,size:rd},...t]:t}function ad(e,t){const n=t.map(r=>{var s;return(s=r.columnDef)==null?void 0:s.expandableRowContent}).find(r=>r);return n==null?void 0:n.call(null,e)}function ja(e){const t=new Map;let n=0;for(let s=0;s<e.length;s++){const o=e[s];if(o.columnDef.sticky!=="left")continue;const i=e[s+1];t.set(o.id,{sticky:"left",offset:n,isStickyEdge:!i||i.columnDef.sticky!=="left"}),n+=o.getSize()}let r=0;for(let s=e.length-1;s>=0;s--){const o=e[s];if(o.columnDef.sticky!=="right")continue;const i=e[s-1];t.set(o.id,{sticky:"right",offset:r,isStickyEdge:!i||i.columnDef.sticky!=="right"}),r+=o.getSize()}return t}function Er(e,t,n,r){return t?e==="left"&&n?a.jsx("div",{style:{position:"absolute",top:0,right:-12,bottom:0,width:12,background:"linear-gradient(to right, rgba(115,115,115,0.12), transparent)",pointerEvents:"none"}}):e==="right"&&r?a.jsx("div",{style:{position:"absolute",top:0,left:-12,bottom:0,width:12,background:"linear-gradient(to left, rgba(115,115,115,0.12), transparent)",pointerEvents:"none"}}):null:null}function od(e,t,n){return e===!0&&(!t||n>t)}function id(e,t){const n=Ve.flexRender(t.cell,e.getContext());return e.column.id!=="actions"?n:a.jsx("div",{className:"wu-opacity-0 wu-transition-opacity wu-duration-150 wu-ease-in-out group-hover:wu-opacity-100",children:n})}const pv=({columns:e,rowSelection:t})=>{const n=(t==null?void 0:t.isEnabled)??!1,r=(t==null?void 0:t.size)??48,{onRowSelect:s,rowUniqueKey:o,isRowDisabled:i,hideSelectAll:u}=t||{},l=f.useCallback(c=>w=>{s==null||s(w?c:[])},[s]);return{finalColumns:f.useMemo(()=>n?[{id:"select",header:({table:c})=>{const w=c.getRowModel().rows.map(p=>p.original).filter(p=>!(i!=null&&i(p))),m=l(w);return u?a.jsx("div",{}):a.jsx(qe,{checked:c.getIsSomeRowsSelected()||c.getIsAllRowsSelected(),partial:c.getIsSomeRowsSelected()&&!c.getIsAllRowsSelected(),onChange:p=>{c.toggleAllRowsSelected(!!p),m(!!p)},"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(qe,{checked:c.getIsSelected(),disabled:w,onChange:m=>{w||c.toggleSelected(!!m)},"aria-label":String(c.original[o])})},filterable:!1,accessorKey:"select",size:r},...e]:e,[e,n,l,i,u])}};function ud({data:e,columns:t,rowSelection:n,isRowExpandable:r}){var m;const[s,o]=f.useState({}),{finalColumns:i}=pv({columns:t,rowSelection:n}),u=f.useMemo(()=>{if(!(n!=null&&n.isEnabled))return{};const p={};for(const b of n.selectedRows){const g=e.findIndex(y=>y[n.rowUniqueKey]===b[n.rowUniqueKey]);g!==-1&&(p[g]=!0)}return p},[e,n]),l=f.useMemo(()=>i.filter(p=>p.enableSorting).map(p=>p.accessorKey),[i]),d=((m=n==null?void 0:n.selectedRows)==null?void 0:m.length)??0,c=f.useMemo(()=>fv(r,i),[i,r]);return{finalColumns:i,rowSelectionState:u,sortableColumns:l,selectedRowCount:d,columnsWithExpand:c,expanded:s,setExpanded:o,handleRowSelectionChange:p=>{const b=typeof p=="function"?p(u):p,g=[],y=n==null?void 0:n.isRowDisabled;for(const x in b){if(!b[x])continue;const v=e[Number(x)];v&&(y!=null&&y(v)||g.push(v))}n==null||n.onRowSelect(g)}}}const ld=e=>h("wu-group wu-border-b wu-border-black/[12%] [--wu-row-overlay:transparent]","data-[state=selected]:[--wu-row-overlay:rgb(var(--wu-blue-p)/0.08)]",!e&&["hover:[--wu-row-overlay:rgba(0,0,0,0.02)]","data-[state=selected]:hover:[--wu-row-overlay:rgb(var(--wu-blue-p)/0.16)]"]),cd=(e="default",t)=>h("wu-py-0 wu-font-light wu-text-xs wu-bg-white","[background-image:linear-gradient(var(--wu-row-overlay),var(--wu-row-overlay))]",e==="compact"?"wu-h-8":"wu-h-10",t==="right"&&"wu-text-right",t==="center"&&"wu-text-center",t==="left"&&"wu-text-left"),hv=(e="default")=>e==="compact"?"wu-h-8":"wu-h-10",mv=e=>h({"wu-text-right":e==="right","wu-text-center":e==="center","wu-text-left":e==="left"}),gv=e=>h({"wu-justify-end":e==="right","wu-justify-center":e==="center"}),bv=(e,t)=>h("wu-absolute -wu-bottom-[13px] wu-left-0 wm-arrow-drop-up wu-text-xl",e&&"wu-hidden",!t&&"-wu-bottom-[10px]"),yv=(e,t)=>h("wu-absolute -wu-top-[15px] wu-left-0 wm-arrow-drop-down wu-text-xl",e&&"wu-hidden",!t&&"-wu-top-[11px]"),dd=({table:e,size:t,NoDataContent:n,isLoading:r,CustomLoader:s,isRowDisabled:o,isRowExpandable:i,isScrolledLeft:u,isScrolledRight:l})=>{const d=e.getVisibleLeafColumns(),c=d.length,w=e.getRowModel().rows,m=ja(d);return r?a.jsx(Tn,{children:a.jsx(ot,{children:a.jsx(yt,{colSpan:c,className:"wu-text-center wu-h-[35vh] wu-loader-container",children:s??a.jsx(ct,{className:"wu-w-full"})})})}):w.length?a.jsx(Tn,{children:w.flatMap((p,b)=>{const g=(o==null?void 0:o(p.original))??!1,y=p.getIsSelected(),x=p.getIsExpanded(),v=a.jsx(ot,{"data-disabled":g,"data-state":y&&"selected",className:ld(g),"data-expanded":x,children:p.getVisibleCells().map((N,S)=>{const M=N.column.columnDef,T=m.get(N.column.id);return a.jsxs(yt,{className:h(cd(t,M.cellAlign),T&&"wu-sticky wu-z-[1]"),style:{width:`${N.column.getSize()}px`,...T&&{[T.sticky]:T.offset}},children:[id(N,M),Er(T==null?void 0:T.sticky,(T==null?void 0:T.isStickyEdge)??!1,u,l)]},`${N.id}-${S}`)})},`${p.id}-${b}`),C=i&&x?ad(p,e.getVisibleLeafColumns()):null;return C?[v,a.jsx(ot,{"data-expanded":"true","data-state":y&&"selected",children:a.jsx(yt,{colSpan:c,children:C})},`${p.id}-expanded-${b}`)]:[v]})}):a.jsx(Tn,{children:a.jsx(ot,{children:a.jsx(yt,{colSpan:c,children:n})})})},Ga=({table:e,sortableColumns:t,manual:n=!1,onSort:r,size:s,isRowSelected:o,HeaderAction:i,isStickyHeader:u,asVirtualContent:l=!1,isRowExpandable:d,isScrolledLeft:c,isScrolledRight:w})=>{var N;const m=s==="compact"?"wu-h-8":"wu-h-10",p=e.getVisibleLeafColumns(),b=ja(p),g=S=>{const{id:M,columnDef:T,getIsSorted:I,toggleSorting:D}=S.column,A=T.headerAlign,_=Ve.flexRender(T.header,S.getContext());if(!t.includes(M))return _;const P=I(),W=P==="asc",F=P==="desc",B=()=>{n?r==null||r({id:M,desc:S.column.getIsSorted()==="asc"}):D(S.column.getIsSorted()==="asc")};return a.jsxs("button",{onClick:B,"aria-label":`Sort by ${typeof T.header=="string"?T.header:M}`,className:h("wu-flex wu-items-center wu-gap-1 wu-w-full",gv(A)),children:[_,a.jsxs("div",{className:"wu-relative wu-flex-shrink-0 wu-w-4",children:[a.jsx("span",{className:yv(W,!!P)}),a.jsx("span",{className:bv(F,!!P)})]})]})},y=S=>{const M=S.column.id==="actions",T=b.get(S.column.id),I=T?{[T.sticky]:T.offset}:{};return M?a.jsx(Tr,{colSpan:S.colSpan,className:h("wu-text-xs wu-font-medium",T&&"wu-sticky wu-z-[2] wu-bg-[#EEEEEE]"),style:{width:`${S.getSize()}px`,...I},children:Er(T==null?void 0:T.sticky,(T==null?void 0:T.isStickyEdge)??!1,c,w)},S.id):a.jsxs(Tr,{colSpan:S.colSpan,className:h("wu-text-xs wu-font-medium wu-bg-[#EEEEEE]",T?"wu-sticky wu-z-[2]":"wu-relative wu-z-0",mv(S.column.columnDef.headerAlign)),style:{width:`${S.getSize()}px`,...I},children:[g(S),Er(T==null?void 0:T.sticky,(T==null?void 0:T.isStickyEdge)??!1,c,w)]},S.id)},x=()=>e.getHeaderGroups().map(S=>a.jsx(ot,{className:"wu-relative",children:S.headers.map(y)},S.id)),v=()=>{var S;return a.jsxs("div",{className:h("wu-flex wu-items-center wu-border-b wu-border-t wu-bg-gray-20",m),children:[a.jsx("div",{className:h("wu-flex wu-items-center wu-px-4"),style:{width:(S=p[0])==null?void 0:S.getSize(),marginLeft:d?rd:void 0},children:a.jsx(qe,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:M=>e.toggleAllRowsSelected(!!M),"aria-label":"Select all","data-testid":"select-all-header-checkbox"})}),a.jsx("div",{className:"wu-flex-1 wu-flex wu-pr-4",children:i})]})},C=o&&i;if(l){const S=((N=e.getHeaderGroups()[0])==null?void 0:N.headers)??[];return a.jsxs(ot,{className:"wu-relative",children:[S.map(y),C&&a.jsx(Tr,{colSpan:p.length,className:"wu-p-0 wu-absolute wu-top-0 wu-left-0 wu-right-0 wu-z-10",children:v()})]})}return a.jsxs(Ua,{className:h("wu-border-t wu-border-black/[12%] wu-bg-gray-20 wu-relative",u&&"wu-sticky wu-top-[-.5px] wu-z-10",m),children:[x(),C&&a.jsx("div",{className:h("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",m),children:v()})]})},wd=f.forwardRef((e,t)=>a.jsx(Tn,{...e,ref:t}));wd.displayName="TableBodyComponent";const fd=({table:e,size:t,isRowDisabled:n,containerHeight:r=600,sortableColumns:s,HeaderAction:o,isRowSelected:i,manual:u=!1,onSort:l,tableLayout:d="auto",isScrolledLeft:c,isScrolledRight:w,isRowExpandable:m,hideHeader:p=!1})=>{const b=e.getRowModel().rows,g=e.getVisibleLeafColumns(),y=ja(g),x=[];for(const v of b)x.push({type:"row",row:v}),m&&v.getIsExpanded()&&x.push({type:"expanded",row:v});return a.jsx("div",{className:"wu-w-full",children:a.jsx(eo.TableVirtuoso,{style:{height:r},totalCount:x.length,fixedHeaderContent:p?void 0:()=>a.jsx(Ga,{table:e,sortableColumns:s,manual:u,onSort:l,size:t,isRowSelected:i,HeaderAction:o,asVirtualContent:!0,isScrolledLeft:c,isScrolledRight:w}),itemContent:v=>{const C=x[v];if(!C)return null;if(C.type==="expanded"){const S=ad(C.row,e.getVisibleLeafColumns());return a.jsx(yt,{colSpan:g.length,children:S})}const N=C.row;return a.jsx(a.Fragment,{children:N.getVisibleCells().map((S,M)=>{const T=S.column.columnDef,I=y.get(S.column.id);return a.jsxs(yt,{className:h(cd(t,T.cellAlign),I&&"wu-sticky wu-z-[1]"),style:I?{[I.sticky]:I.offset}:void 0,children:[id(S,T),Er(I==null?void 0:I.sticky,(I==null?void 0:I.isStickyEdge)??!1,c,w)]},`${S.id}-${M}`)})})},components:{Table:({style:v,...C})=>a.jsxs("table",{...C,style:{...v,width:"100%",borderCollapse:"collapse",tableLayout:d},children:[a.jsx("colgroup",{children:g.map(N=>a.jsx("col",{style:{width:`${N.getSize()}px`}},N.id))}),C.children]}),TableBody:wd,TableHead:v=>a.jsx(Ua,{...v,className:h("wu-border-t wu-border-black/[12%] wu-bg-gray-20",hv(t),v.className)}),TableRow:({...v})=>{const C=v["data-index"],N=x[C],S=N==null?void 0:N.row,M=S?(n==null?void 0:n(S.original))??!1:!1,T=(S==null?void 0:S.getIsSelected())??!1;return a.jsx(ot,{...v,"data-disabled":M,"data-state":T&&"selected","data-expanded":(N==null?void 0:N.type)==="expanded"?"true":void 0,className:ld(M)})}}})})},Ir=Be.cva("",{variants:{variant:{striped:'[&_tr:nth-child(even):not([data-expanded])_td]:wu-bg-zinc-50 [&_tr:nth-child(odd)[data-expanded]:not([data-state="selected"])_td]:wu-bg-zinc-50',unstyled:"",bordered:"wu-border-collapse wu-border wu-border-black/[12%] [&_th]:wu-border [&_td]:wu-border"}}}),vv=({data:e,columns:t,isLoading:n=!1,variant:r="unstyled",sort:s,size:o,rowSelection:i,HeaderAction:u,NoDataContent:l,stickyHeader:d=!1,CustomLoader:c,caption:w,virtualization:m,isRowExpandable:p,hideHeader:b=!1,tableLayout:g="fixed",style:y,className:x,...v})=>{var V;const[C,N]=f.useState(()=>(s==null?void 0:s.defaultSort)??null),{scrollContainerRef:S,isScrolledLeft:M,isScrolledRight:T,handleScroll:I}=nd(),{rowSelectionState:D,sortableColumns:A,selectedRowCount:_,columnsWithExpand:P,expanded:W,setExpanded:F,handleRowSelectionChange:B}=ud({data:e,columns:t,rowSelection:i,isRowExpandable:p}),$=Ve.useReactTable({data:e,columns:P,getCoreRowModel:Ve.getCoreRowModel(),getPaginationRowModel:Ve.getPaginationRowModel(),getExpandedRowModel:p?Ve.getExpandedRowModel():void 0,manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:i!=null&&i.isRowDisabled?q=>!i.isRowDisabled(q.original):!0,enableExpanding:!!p,state:{sorting:C?[{id:C.id,desc:C.desc}]:[],...i!=null&&i.isEnabled?{rowSelection:D}:{},...p?{expanded:W}:{}},onRowSelectionChange:B,...p?{onExpandedChange:F}:{}}),ie=od(m==null?void 0:m.enabled,m==null?void 0:m.threshold,e.length),U=(m==null?void 0:m.maxHeight)??600;return a.jsx("div",{className:h("wu-text-gray-lead wu-table-container wu-relative",!ie&&d&&"wu-h-full"),children:ie?a.jsxs("div",{ref:S,onScroll:I,className:h("wu-overflow-x-auto wu-w-full",Ir({variant:r})),children:[w&&a.jsx(En,{className:"wu-font-light",children:w}),n?a.jsx("div",{className:"wu-text-center wu-h-[35vh] wu-flex wu-items-center wu-justify-center",children:c??a.jsx(ct,{className:"wu-w-full"})}):(V=$.getRowModel().rows)!=null&&V.length?a.jsx(fd,{table:$,size:o,isRowDisabled:i==null?void 0:i.isRowDisabled,containerHeight:U,sortableColumns:A,HeaderAction:u,isRowSelected:_>0,manual:!0,onSort:q=>{N(q),s==null||s.onSort(q)},tableLayout:g,isScrolledLeft:M,isScrolledRight:T,hideHeader:b}):a.jsx("div",{className:"wu-p-4 wu-text-center",children:l})]}):a.jsx("div",{ref:S,onScroll:I,className:h("wu-overflow-x-auto wu-w-full",d&&"wu-overflow-y-auto wu-h-full"),children:a.jsxs(za,{...v,className:h("wu-w-full",Ir({variant:r}),x),style:{tableLayout:g,...y},children:[w&&a.jsx(En,{className:"wu-font-light",children:w}),!b&&a.jsx(Ga,{table:$,sortableColumns:A,manual:!0,onSort:q=>{N(q),s==null||s.onSort(q)},size:o,HeaderAction:u,isRowSelected:_>0,isStickyHeader:d,isRowExpandable:p,isScrolledLeft:M,isScrolledRight:T}),a.jsx(dd,{table:$,size:o,NoDataContent:l,CustomLoader:c,isLoading:n,isRowDisabled:i==null?void 0:i.isRowDisabled,isRowExpandable:p,isScrolledLeft:M,isScrolledRight:T})]})})})},xv=({data:e,columns:t,variant:n="unstyled",size:r="default",sort:s,filterText:o,pagination:i,stickyHeader:u,HeaderAction:l,CustomLoader:d,NoDataContent:c,isLoading:w,caption:m,rowSelection:p,isRowExpandable:b,hideHeader:g=!1,virtualization:y,tableLayout:x="fixed",style:v,className:C,...N})=>{var O;const[S,M]=f.useState(()=>s!=null&&s.defaultSort?[{id:s.defaultSort.id,desc:s.defaultSort.desc}]:[]),[T,I]=f.useState([]),[D,A]=f.useState((i==null?void 0:i.pageIndex)??0),{scrollContainerRef:_,isScrolledLeft:P,isScrolledRight:W,handleScroll:F}=nd(),{finalColumns:B,rowSelectionState:$,sortableColumns:ie,selectedRowCount:U,columnsWithExpand:V,expanded:q,setExpanded:H,handleRowSelectionChange:Q}=ud({data:e,columns:t,rowSelection:p,isRowExpandable:b}),ee=f.useMemo(()=>B.filter(j=>j.filterable).map(j=>j.accessorKey),[B]),J=Ve.useReactTable({data:e,columns:V,getCoreRowModel:Ve.getCoreRowModel(),getFilteredRowModel:Ve.getFilteredRowModel(),getSortedRowModel:Ve.getSortedRowModel(),getPaginationRowModel:i?Ve.getPaginationRowModel():void 0,getExpandedRowModel:b?Ve.getExpandedRowModel():void 0,enableRowSelection:p!=null&&p.isRowDisabled?j=>!p.isRowDisabled(j.original):!0,enableExpanding:!!b,state:{sorting:S,columnFilters:T,...i?{pagination:i}:{},...p!=null&&p.isEnabled?{rowSelection:$}:{},...b?{expanded:q}:{}},onSortingChange:M,onColumnFiltersChange:I,onRowSelectionChange:Q,...b?{onExpandedChange:H}:{}});f.useEffect(()=>{ee.forEach(j=>{var Y;(Y=J.getColumn(j))==null||Y.setFilterValue(o)})},[o,ee,J]),f.useEffect(()=>{i&&(i==null?void 0:i.pageIndex)!==D&&(p==null||p.onRowSelect([]),J.resetRowSelection(),A(i.pageIndex))},[i==null?void 0:i.pageIndex]);const ge=od(y==null?void 0:y.enabled,y==null?void 0:y.threshold,e.length),K=(y==null?void 0:y.maxHeight)??600;return a.jsx("div",{className:h("wu-text-gray-lead wu-table-container wu-relative",!ge&&u&&"wu-h-full"),children:ge?a.jsxs("div",{ref:_,onScroll:F,className:h("wu-overflow-x-auto wu-w-full",Ir({variant:n})),children:[m&&a.jsx(En,{children:m}),w?a.jsx("div",{className:"wu-text-center wu-h-[35vh] wu-flex wu-items-center wu-justify-center",children:d??a.jsx(ct,{className:"wu-w-full"})}):(O=J.getRowModel().rows)!=null&&O.length?a.jsx(fd,{table:J,size:r,isRowDisabled:p==null?void 0:p.isRowDisabled,containerHeight:K,sortableColumns:ie,HeaderAction:l,isRowSelected:U>0,tableLayout:x,isScrolledLeft:P,isScrolledRight:W,isRowExpandable:b,hideHeader:g}):a.jsx("div",{className:"wu-p-4 wu-text-center",children:c})]}):a.jsx("div",{ref:_,onScroll:F,className:h("wu-overflow-x-auto wu-w-full",u&&"wu-overflow-y-auto wu-h-full"),children:a.jsxs(za,{...N,className:h(`wu-table-${x}`,"wu-w-full",Ir({variant:n}),C),style:{tableLayout:x,...v},children:[m&&a.jsx(En,{children:m}),!g&&a.jsx(Ga,{table:J,sortableColumns:ie,size:r,HeaderAction:l,isRowSelected:U>0,isStickyHeader:u,isRowExpandable:b,isScrolledLeft:P,isScrolledRight:W}),a.jsx(dd,{table:J,size:r,NoDataContent:c,CustomLoader:d,isLoading:w,isRowDisabled:p==null?void 0:p.isRowDisabled,isRowExpandable:b,isScrolledLeft:P,isScrolledRight:W})]})})})},pd=E.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:h("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}));pd.displayName="Textarea";const hd=f.forwardRef((e,t)=>{const{Label:n,id:r=$r(),variant:s="flat",readonly:o,maxLength:i,labelPosition:u="top",...l}=e,d=w=>{l.onChange&&l.onChange(w)},c=Dn(u);return a.jsxs("div",{className:h(c,"wu-flex wu-textarea-container"),dir:l.dir,children:[a.jsx(pd,{...l,ref:t,id:r,className:h("wu-peer wu-rounded-t-sm",s==="outlined"?"wu-border wu-border-gray-subtle":"",l.className),onChange:d,readOnly:o,maxLength:i}),n&&a.jsx(Me,{htmlFor:r,className:"wu-textarea-label",children:n})]})});hd.displayName="WuTextarea";function Nv(e){if(typeof e=="string"&&e.includes("T")){const t=z.parseISO(e);return z.format(t,"HH:mm")}if(typeof e=="string"&&/^\d{2}:\d{2}:\d{2}$/.test(e)){const t=z.parse(e,"HH:mm:ss",new Date);return z.format(t,"HH:mm")}return typeof e=="string"&&/^\d{2}:\d{2}$/.test(e)?e:"00:00"}const md=["12",...Array.from({length:11},(e,t)=>String(t+1).padStart(2,"0"))],gd=Array.from({length:60},(e,t)=>String(t).padStart(2,"0")),bd=["am","pm"],Mr=50;function Sv(e){return Array(Mr).fill(e).flat()}function Ka(e,t){const n=e.indexOf(t);return[...e.slice(n),...e.slice(0,n)]}function Cv(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 yd(e){const t=Number(e),n=t>=12?"pm":"am",r=t%12===0?12:t%12;return{hour:String(r),meridiem:n}}const Tv=({value:e,isSelected:t,onClick:n})=>a.jsx("div",{onClick:n,className:h("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}),Ya=({values:e,selectedValue:t,scrollRef:n,onSelect:r,repeatItems:s=!0,className:o})=>a.jsx("div",{ref:n,className:h("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:(s?Sv(e):e).map((i,u)=>a.jsx(Tv,{value:i,isSelected:i===t,onClick:()=>r(i)},`${i}-${u}`))});function Ev(e,t,n,r){const s=f.useMemo(()=>e?Ka(md,t.padStart(2,"0")):md,[e]),o=f.useMemo(()=>e?Ka(gd,n.padStart(2,"0")):gd,[e]),i=f.useMemo(()=>e?Ka(bd,r):bd,[e]);return{rotatedHours:s,rotatedMinutes:o,rotatedMeridiem:i}}function Iv(e,t,n){f.useEffect(()=>{function r(i){if(i){const u=i.scrollHeight/Mr,l=Math.floor(Mr/2);i.scrollTop=l*u;const d=()=>{const{scrollTop:c}=i,w=Math.round(c/u);(w<=1||w>=Mr-2)&&(i.scrollTop=l*u)};return i.addEventListener("scroll",d),()=>{i.removeEventListener("scroll",d)}}}if(!e)return;const s=r(t.current),o=r(n.current);return()=>{s==null||s(),o==null||o()}},[e,t,n])}const vd=({className:e,time:t,Label:n,labelPosition:r,dir:s,...o})=>{const[i,u]=f.useState(!1),[l,d]=f.useState(""),c=f.useRef(null),w=f.useRef(null),m=f.useRef(null),p=f.useRef(null),[b,g]=f.useState("12"),[y,x]=f.useState("00"),[v,C]=f.useState("am");f.useEffect(()=>{if(!t){d(""),g("12"),x("00"),C("am"),c.current&&(c.current.value="");return}const I=Nv(t);d(I);const[D,A]=I.split(":"),{hour:_,meridiem:P}=yd(D);g(_),x(A),C(P),c.current&&(c.current.value=I)},[t]),f.useEffect(()=>{const I=D=>{w.current&&!w.current.contains(D.target)&&u(!1)};return document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[]),Iv(i,m,p);const{rotatedHours:N,rotatedMinutes:S,rotatedMeridiem:M}=Ev(i,b,y,v),T=f.useCallback((I,D,A)=>{const _=I??b,P=D??y,W=A??v;g(_),x(P),C(W);const F=`${Cv(_,W)}:${P}`;d(F)},[b,y,v]);return a.jsxs("div",{className:h("wu-flex wu-gap-1 wu-relative wu-w-fit wu-flex-col",(r==="right"||r==="left")&&"wu-items-center",r==="left"&&"wu-flex-row",r==="right"&&"wu-flex-row-reverse","wu-input-wrapper"),dir:s,children:[n&&a.jsx(Me,{htmlFor:"time-picker",className:"wu-timepicker-label",children:n}),a.jsxs("div",{className:h("relative inline-block"),ref:w,dir:s,children:[a.jsx(Re,{ref:c,type:"time",value:l,variant:"flat",role:"textbox",onChange:I=>{d(I.target.value);const[D,A]=I.target.value.split(":"),{hour:_,meridiem:P}=yd(D);g(_),x(A),C(P)},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(Oe,{icon:"wm-schedule",className:h("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:s,...o}),a.jsx("style",{children:`
18
+ )`;e.style.setProperty(`--spotlight-background`,a)})};return window.addEventListener(`mousemove`,i),()=>{window.removeEventListener(`mousemove`,i),r&&cancelAnimationFrame(r)}}},[t,n,o,s]),(0,a.jsx)(`div`,{ref:l,className:z(Lp.gradientBackground,`wu-transform-gpu`,i),...c,children:r})},zp={wuModalBodyWrapper:`_wuModalBodyWrapper_uaelx_1`,"wu-modal-footer":`_wu-modal-footer_uaelx_5`,"wu-modal-content":`_wu-modal-content_uaelx_5`,"wu-modal-header":`_wu-modal-header_uaelx_9`},Bp=`calc(100vh - 64px)`,Vp={sm:`400px`,md:`600px`,lg:`1200px`},Hp=({Trigger:e,children:t,size:n=`md`,hideCloseButton:r,preventClickOutside:i,onOpenChange:o,open:s,dir:c,maxWidth:l,maxHeight:u,className:d,style:f,variant:p=`action`,allowExternalPortals:m,onOpenAutoFocus:h,onCloseAutoFocus:g,..._})=>{let v={action:[`#EEF3FBcc 32%`,`#1D50F4cc`],upgrade:[`#FDEDCCcc 32%`,`#FF9F00cc`],critical:[`#FFB6B6cc 32%`,`#CC0000cc`]},y=(0,R.useRef)(null),b=(0,R.useRef)(null);return(0,R.useEffect)(()=>()=>{y.current&&=(document.removeEventListener(`focusin`,y.current.focusin,!0),document.removeEventListener(`focusout`,y.current.focusout,!0),document.body.style.pointerEvents=``,null)},[]),(0,a.jsxs)(Dp,{modal:!0,onOpenChange:o,open:s,children:[e&&(0,a.jsx)(Op,{asChild:!0,children:e}),(0,a.jsx)(Mp,{ref:b,style:{width:`calc(100% - 64px)`,maxWidth:l||Vp[n],maxHeight:u||Bp,...f},hideCloseButton:r,onInteractOutside:e=>{if(i){e.preventDefault();return}m&&((e.detail?.originalEvent?.target)?.closest(`[data-wu-overlay]`)||e.preventDefault())},onFocusOutside:e=>m&&e.preventDefault(),onOpenAutoFocus:e=>{if(m){document.body.style.pointerEvents=`all`;let e=e=>!!b.current&&!b.current.contains(e),t=t=>{e(t.target)&&t.stopImmediatePropagation()},n=t=>{e(t.relatedTarget)&&t.stopImmediatePropagation()};y.current={focusin:t,focusout:n},document.addEventListener(`focusin`,t,!0),document.addEventListener(`focusout`,n,!0)}h?.(e)},onCloseAutoFocus:e=>{m&&(document.body.style.pointerEvents=``,y.current&&=(document.removeEventListener(`focusin`,y.current.focusin,!0),document.removeEventListener(`focusout`,y.current.focusout,!0),null)),g?.(e)},dir:c,"aria-describedby":void 0,"data-variant":p,className:z(`wu-group wu-rounded-[.88rem]`,zp.wuModalBodyWrapper,d),..._,children:(0,a.jsx)(Rp,{colors:v[p],strokeWidth:4,className:z(`wu-rounded-[1.1rem] wu-transform-gpu wu-flex wu-flex-col`,d),style:{maxHeight:u||Bp},children:t})})]})},Up=({children:e,className:t,...n})=>(0,a.jsx)(`div`,{className:z(`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`,zp[`wu-modal-content`],t),...n,children:e}),Wp=({children:e,className:t,...n})=>(0,a.jsx)(Np,{...n,"data-variant":`action`,className:z(`wu-text-lg wu-text-gray-lead wu-font-medium`,`wu-rounded-t-[.88rem] 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`,zp[`wu-modal-header`],t),children:(0,a.jsx)(Fp,{className:`wu-font-normal wu-justify-start wu-text-2xl wu-h-14`,children:e})}),Gp=({children:e,className:t,...n})=>(0,a.jsx)(Pp,{...n,className:z(`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-[.88rem] 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]`,zp[`wu-modal-footer`],t),children:e}),Kp=({children:e,className:t,...n})=>(0,a.jsx)(Ap,{asChild:!0,children:(0,a.jsx)(W,{className:t,ref:R.default.useRef(null),...n,children:e})}),qp=({placeholder:e=`Select...`,value:t,multiple:n=!1,accessorKey:r,variant:i=`flat`,dir:o=`ltr`,customTriggerChildren:s,id:c,disabled:l,selectAll:u,isCheckedAll:d,width:f,...p})=>{let[m,h]=(0,R.useState)(``),[g,_]=(0,R.useState)(e);(0,R.useEffect)(()=>{if(!t||Array.isArray(t)&&t.length===0){_(e),h(``);return}let i=r.label;n&&Array.isArray(t)?h(t.map(e=>e[i]).join(`, `)):!n&&!Array.isArray(t)&&h(t[i])},[t,r.label,n,e]);let v=()=>e&&!m?(0,a.jsx)(`p`,{className:`wu-text-xs wu-opacity-70`,children:g}):(0,a.jsx)(`span`,{className:z(`wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap`),style:{width:`${(f||0)-32}px`},children:d?u?.triggerText??m:m});return(0,a.jsx)(pi,{asChild:!0,dir:o,id:c,disabled:l,children:(0,a.jsxs)(`button`,{...p,disabled:l,className:z(`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`,i===`outlined`&&`wu-border wu-border-gray-subtle`,`wu-group/wuSelect wu-select-trigger`,p.className),children:[s??v(),(0,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`})]})})},Jp=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:i,dir:o=`ltr`})=>{let[s,c]=(0,R.useState)(n?[]:``);(0,R.useEffect)(()=>{t&&c(n?t.map(e=>JSON.stringify(e[i.value])):JSON.stringify(t[i.value]))},[t,i.value,n]);let l=n?s.includes(JSON.stringify(e[i.value])):s===JSON.stringify(e[i.value]);return(0,a.jsxs)(xi,{onClick:t=>{e.disabled||(r(e),n&&t.preventDefault())},disabled:e.disabled,className:z(`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&&(0,a.jsx)(Xr,{checked:l}),(0,a.jsx)(Yp,{option:e,accessorKey:i})]})},Yp=({option:e,accessorKey:t})=>{let n=String(e[t.label]);return(0,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&&(0,a.jsx)(`span`,{className:`wu-ml-auto wm-lock wu-text-sm wu-text-orange-deep`})]})},Xp=e=>{let{option:t,handleSelectAll:n,isCheckedAll:r,isPartialSelected:i,...o}=e;switch(`type`in t?t.type:`option`){case`all`:return(0,a.jsxs)(xi,{onSelect:e=>{e.stopPropagation(),e.preventDefault(),n?.()},className:z(`wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item`),dir:o.dir,children:[(0,a.jsx)(Xr,{"data-partial":i,checked:r||i,partial:i}),(0,a.jsx)(Yp,{option:t,accessorKey:o.accessorKey})]});case`group`:return(0,a.jsxs)(mi,{dir:o.dir,children:[(0,a.jsx)(wi,{className:`wu-text-xs`,children:t.label}),t.options.map((e,t)=>{let n=e[o.accessorKey.value],r=n==null?`group-item-${t}`:String(n);return(0,R.createElement)(Jp,{...o,option:e,key:r})})]});case`divider`:return(0,a.jsx)(Ti,{className:`wu-mx-4`});default:return(0,a.jsx)(Jp,{...o,option:t})}},Zp=e=>{let t=0,n=0,r=[],i=[],a=e=>{e.type===`divider`?t++:e.type===`group`?(n++,e.options.forEach(e=>{a(e)})):(r.push(e),e.disabled||i.push(e))};return e.forEach(e=>{a(e)}),{separators:t,groups:n,enabledOptions:i,totalData:r.length,cleanData:r}},Qp=100,$p=400,em=({data:e,onSelect:t,multiple:n=!1,defaultValue:r,value:i,accessorKey:o,variant:s=`flat`,dir:c=`ltr`,placeholder:l,Label:u,virtualizedThreshold:d=Qp,maxHeight:f=$p,hasGroup:p=!1,Header:m,CustomTrigger:h,selectAll:g,disabled:_,labelPosition:v=`top`,onScroll:y,maxContentWidth:b,selectedToTop:x=!1,...S})=>{let[C,w]=(0,R.useState)(),T=(0,R.useRef)(null),[E,D]=(0,R.useState)(!1),[O,k]=(0,R.useState)(!1),{cleanData:A,enabledOptions:j}=Zp(e),M=(0,R.useMemo)(()=>n&&g?.enable&&e.length>0?[{type:`all`,[o.label]:g.label||`Select All`},...e]:e,[e,g,n]),N=(0,R.useCallback)(e=>{let r=e[o.value];if(n)w((n=[])=>{let i=n,a=i.some(e=>e[o.value]===r)?i.filter(e=>e[o.value]!==r):[...i,e];return t?.(a),a});else{let n=e;w(n),t?.(n)}},[n,o.value,t]);(0,R.useEffect)(()=>{if(r&&i){console.error(`defaultValue and value cannot be used simultaneously`);return}!r&&!i&&w(void 0),r!==void 0&&w(r),i!==void 0&&w(i)},[r,i]);let P=ci(x,M,C,o),F=P.length>d;(0,R.useEffect)(()=>{if(!n)return;let t=g?.includeDisabled?C?.length===e.length:C?.length===j.length;D(t),k(C?.length>0&&!t)},[C,g]);let I=(0,R.useCallback)(()=>{let n=E?[]:g?.includeDisabled?p?A:e:j;w(n),t?.(n)},[E,n,e,j,t,g]);return(0,a.jsxs)(`div`,{className:z(re(v),`wu-flex wu-select-container`),ref:T,dir:c,children:[(0,a.jsxs)(fi,{children:[(0,a.jsx)(qp,{...S,value:C,multiple:n,variant:s,dir:c,placeholder:l,accessorKey:o,customTriggerChildren:h,id:S.id,disabled:_,selectAll:g,isCheckedAll:E}),(0,a.jsxs)(bi,{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:S.id,style:{maxWidth:b},children:[m,F?(0,a.jsx)(li,{list:P,containerHeight:f,callback:(e,t)=>(0,a.jsx)(Xp,{option:t,accessorKey:o,multiple:n,onSelect:N,value:C,dir:c,handleSelectAll:I,isCheckedAll:E,isPartialSelected:O}),dir:c}):(0,a.jsx)(`div`,{onScroll:y,style:{maxHeight:f,height:`fit-content`,overflow:`auto`},className:`wu-select-list`,children:P.map((e,t)=>{let r=e,i=r[o.value],s=i==null?`__${`type`in r?r.type:`item`}__${t}`:String(i);return(0,a.jsx)(Xp,{option:r,accessorKey:o,multiple:n,onSelect:N,value:C,handleSelectAll:I,isCheckedAll:E,dir:c,isPartialSelected:O},s)})})]})]}),u&&(0,a.jsx)(K,{htmlFor:S.id,className:`wu-select-label`,children:u})]})},tm=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],nm=({value:e,onChange:t,min:n=(0,c.sub)(new Date,{years:5}),max:r=(0,c.add)(new Date,{years:1}),placeholder:i=`Select a month`,Label:o,labelPosition:s=`top`,disabled:u,id:d,readonly:f,disabledMonths:p=[],...m})=>{let[h,g]=(0,R.useState)(null),[_,v]=(0,R.useState)(``),[y,b]=(0,R.useState)({value:Math.min(new Date().getFullYear(),new Date(r).getFullYear()),label:Math.min(new Date().getFullYear(),new Date(r).getFullYear())}),x=(0,R.useMemo)(()=>{let e=new Date(n).getFullYear(),t=new Date(r).getFullYear();return Array.from({length:t-e+1},(e,n)=>({value:t-n,label:t-n}))},[n,r]);(0,R.useEffect)(()=>{if(e){let t=new Date(e),n=t.getFullYear(),r=t.getMonth();g({year:n,month:r}),v(`${tm[r]} ${n}`),b({value:n,label:n})}},[e]);let S=()=>{h&&t&&(t(new Date(h.year,h.month,15)),v(`${tm[h.month]} ${h.year}`))};return(0,a.jsxs)(`div`,{className:z(`wu-flex wu-flex-col wu-items-center`,re(s),s===`top`&&`wu-items-start`),children:[(0,a.jsxs)($e,{children:[(0,a.jsx)(st,{...m,disabled:u||f,id:d,dir:`ltr`,placeholder:i,formattedString:_}),(0,a.jsxs)(tt,{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:[(0,a.jsx)(`div`,{className:`wu-px-1 wu-mx-auto wu-w-full`,children:(0,a.jsx)(em,{data:x,accessorKey:{value:`value`,label:`label`},value:y,onSelect:e=>b(e),multiple:!1,maxHeight:224})}),(0,a.jsx)(rm,{year:y?.value,selectedMonth:h?.month,selectedYear:h?.year,onClick:(e,t)=>g({year:t,month:e}),disabledMonths:p}),(0,a.jsx)(`div`,{className:`wu-flex wu-justify-end wu-px-0.5`,children:(0,a.jsx)(l.PopoverClose,{asChild:!0,children:(0,a.jsx)(W,{onClick:S,children:`Apply`})})})]})]}),o&&(0,a.jsx)(K,{className:`wu-truncate wu-max-w-[120px] wu-min-w-fit wu-select-label`,children:o})]})},rm=({year:e,selectedMonth:t,selectedYear:n,onClick:r,disabledMonths:i=[]})=>{let o=new Date,s=o.getFullYear(),c=o.getMonth(),l=R.default.useMemo(()=>{let e=new Set;return i.forEach(t=>{let n=typeof t==`string`?new Date(t):t;e.add(`${n.getFullYear()}-${n.getMonth()}`)}),e},[i]);return(0,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:tm.map((i,o)=>{let u=e===s&&o===c,d=t===o&&n===e;return(0,a.jsx)(`button`,{disabled:l.has(`${e}-${o}`),onClick:()=>r(o,e),className:z(`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`,u&&`wu-border wu-border-blue-p`,d&&`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":`${tm[o]} ${e}`,"data-month":o,"data-year":e,children:i},i)})})},im=(e,t,n,r=96)=>{if(e.length===0||r<=0)return[[],[]];let[i,a]=R.default.useState([]),[o,s]=R.default.useState([]);return R.default.useEffect(()=>{let i=()=>{let i=(t.current?.clientWidth||0)-(n.current?.clientWidth||0),o=Math.floor(i/r);a(e.slice(0,o)),s(e.slice(o))};return i(),window.addEventListener(`resize`,i),()=>{window.removeEventListener(`resize`,i)}},[e,r]),[i,o]},am={wuPrimaryLink:`_wuPrimaryLink_1sy3v_1`,wuPrimaryPopoverContent:`_wuPrimaryPopoverContent_1sy3v_8`},om=e=>{let{Links:t,children:n,className:r,...i}=e,o=R.default.useMemo(()=>t.map((e,t)=>R.default.cloneElement(e,{className:z(am.wuPrimaryLink,e.props.className,`wu-primary-nav-link`),key:t})),[t]),s=R.default.useRef(null),c=R.default.useRef(null),[l,u]=im(o,s,c);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(`header`,{className:z(`wu-flex wu-items-center wu-justify-between wu-gap-4 wu-px-2 wu-py-1 wu-bg-white wu-border-b`,r),...i,ref:s,children:[(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-gap-2`,children:[(0,a.jsx)(`nav`,{className:`wu-flex wu-items-center wu-justify-start wu-gap-4 wu-primary-nav-left`,children:l}),u.length>0&&(0,a.jsxs)($e,{children:[(0,a.jsx)(et,{className:`wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25`,"aria-label":`more`,children:(0,a.jsx)(`span`,{className:`wm-more-vert`})}),(0,a.jsx)(tt,{className:z(am.wuPrimaryPopoverContent,`wu-primary-nav-popover-left`),align:`start`,sideOffset:12,children:u})]})]}),n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`section`,{className:`wu-items-center wu-justify-end wu-hidden wu-gap-4 sm:wu-flex wu-primary-nav-right`,ref:c,children:n}),(0,a.jsxs)($e,{children:[(0,a.jsx)(et,{className:`sm:wu-hidden`,children:(0,a.jsx)(`span`,{className:`wu-text-lg wm-menu`})}),(0,a.jsx)(tt,{className:`wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-primary-nav-popover-right`,align:`end`,sideOffset:4,children:n})]})]})]})})},sm={wuSecondaryLink:`_wuSecondaryLink_1edl1_1`,wuSecondaryNav:`_wuSecondaryNav_1edl1_6`,wuSecondaryPopoverContent:`_wuSecondaryPopoverContent_1edl1_11`},cm=e=>{let{Links:t,children:n,className:r,...i}=e,o=(0,R.useMemo)(()=>t.map((e,t)=>R.default.cloneElement(e.link,{key:t,className:z(sm.wuSecondaryLink,e.link.props.className,`wu-secondary-nav-link-container`),children:(0,a.jsxs)(a.Fragment,{children:[R.default.cloneElement(e.imgOrIcon,{className:z(`wu-w-5 wu-h-5 wu-flex wu-items-center wu-justify-center wu-text-lg wu-leading-5`,e.imgOrIcon.props.className)}),(0,a.jsx)(`div`,{className:`wu-secondary-nav-link`,children:e.link.props.children})]})})),[t]),s=R.default.useRef(null),c=R.default.useRef(null),l=R.default.useRef(null),[u,d]=im(o,s,l);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(`header`,{className:z(`wu-flex wu-items-center wu-justify-between wu-gap-4 wu-border-y wu-border-gray-25 wu-h-[50px]`,r),...i,ref:s,children:[(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-justify-start wu-gap-2`,children:[(0,a.jsx)(`nav`,{className:z(sm.wuSecondaryNav,`wu-flex wu-items-center wu-justify-start wu-w-full wu-h-full wu-secondary-nav-left`),ref:c,children:u}),d.length>0&&(0,a.jsxs)($e,{children:[(0,a.jsx)(et,{className:`wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25`,"aria-label":`more`,children:(0,a.jsx)(`span`,{className:`wm-more-vert`})}),(0,a.jsx)(tt,{className:z(sm.wuSecondaryNavPopover,`wu-secondary-nav-popover-left`),align:`start`,sideOffset:12,children:d})]})]}),n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(`div`,{className:`wu-items-center wu-justify-end wu-hidden sm:wu-flex`,ref:l,children:n}),(0,a.jsxs)($e,{children:[(0,a.jsx)(et,{className:`sm:wu-hidden`,children:(0,a.jsx)(`span`,{className:`wu-text-lg wm-menu`})}),(0,a.jsx)(tt,{className:`wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-secondary-nav-popover-right`,align:`end`,sideOffset:12,children:n})]})]})]})})},lm=R.default.forwardRef(({totalRows:e,initialPage:t=0,initialPageSize:n=100,onPageChange:r,className:i,disabled:o=!1,...s},c)=>{let[l,u]=(0,R.useState)(t),[d,f]=(0,R.useState)(n);(0,R.useEffect)(()=>{u(t),f(n)},[t,n]);let p=Math.ceil(e/d),m=l*d+1,h=Math.min((l+1)*d,e),g=Array.from({length:p},(e,t)=>t),_=(0,R.useCallback)(e=>{e>=0&&e<p&&(u(e),r?.(e))},[p,r]);return(0,a.jsxs)(`div`,{className:z(`wu-flex wu-items-center wu-gap-[2px]`,i,`wu-pagination`),...s,role:`navigation`,children:[(0,a.jsx)(um,{label:`Previous page`,onClick:()=>_(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`}),(0,a.jsx)(rp,{name:`${m} - ${h}`,className:`wu-w-[96px] wu-min-w-[96px] wu-pagination-menu`,align:`end`,disabled:o,children:(0,a.jsx)($f,{style:{maxHeight:`224px`},dir:s.dir,children:g.length>100?(0,a.jsx)(li,{className:`wu-pagination-list`,containerHeight:224,list:g,callback:(t,n)=>(0,a.jsxs)(Yf,{onSelect:()=>_(n),className:z(`wu-py-2`,n===l&&`wu-bg-gray-20`,`wu-pagination-item`),children:[n*d+1,` -`,` `,Math.min((n+1)*d,e)]},t)}):g.map(t=>(0,a.jsxs)(Yf,{onSelect:()=>_(t),className:z(t===l&&`wu-bg-gray-20`,`wu-py-2 hover:wu-bg-gray-20`,`wu-pagination-item`),children:[t*d+1,` -`,` `,Math.min((t+1)*d,e)]},t))})}),(0,a.jsx)(um,{label:`Next page`,onClick:()=>_(l+1),disabled:l===p-1||o,icon:`wm-arrow-forward-ios`,className:`hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-next-btn`})]})});lm.displayName=`WuPagination`;var um=({label:e,onClick:t,disabled:n,icon:r,className:i})=>(0,a.jsx)(W,{variant:`iconOnly`,onClick:t,disabled:n,className:z(`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`,i),"aria-label":e,children:(0,a.jsx)(`span`,{className:z(`wu-text-sm`,r)})}),dm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(x.Root,{className:z(`wu-grid wu-gap-2`,e),...t,ref:n}));dm.displayName=x.Root.displayName;var fm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(x.Item,{ref:n,className:z(`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:(0,a.jsx)(x.Indicator,{className:`wu-flex wu-items-center wu-justify-center`,children:(0,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`})})}));fm.displayName=x.Item.displayName;var pm=R.default.forwardRef((e,t)=>{let{options:n,defaultValue:r,onChange:i,label:o,dir:s,...c}=e;return(0,a.jsxs)(dm,{defaultValue:r,required:c.required,disabled:c.disabled,onValueChange:i,id:c.id,dir:s,name:c.name,className:z(`w-fit`,c.className),ref:t,style:c.style,children:[(0,a.jsx)(ht,{htmlFor:c.id,className:`wu-text-sm wu-font-normal wu-text-gray-lead wu-leading-6 wu-radio-group-label`,children:o}),n.map(e=>(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-gap-2 wu-radio-item-container`,children:[(0,a.jsx)(fm,{value:e.value,id:e.value,disabled:e.disabled,required:e.required,"aria-label":e.value,className:`wu-peer wu-radio-item`}),(0,a.jsx)(ht,{htmlFor:e.value,className:z(e.required&&`after:wu-content-['*'] after:wu-mx-[2px] after:wu-text-rose-500`,`wu-radio-item-label`),children:e.label})]},e.value))]})});pm.displayName=`WuRadioGroup`;var mm=e=>{let{children:t,...n}=e;return(0,a.jsxs)($f,{...n,role:`complementary`,"aria-label":`ScrollArea`,children:[t,(0,a.jsx)(ep,{orientation:`horizontal`})]})},hm=R.forwardRef(({className:e,type:t,...n},r)=>(0,a.jsx)(`input`,{type:t,className:z(`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:r,...n}));hm.displayName=`Input`;var gm=R.forwardRef(({className:e,orientation:t=`horizontal`,decorative:n=!0,...r},i)=>(0,a.jsx)(S.Root,{ref:i,decorative:n,orientation:t,className:z(`wu-shrink-0 wu-bg-gray-40`,t===`horizontal`?`wu-h-[1px] wu-w-full`:`wu-h-full wu-w-[1px]`,e),...r}));gm.displayName=S.Root.displayName;function _m({className:e,...t}){return(0,a.jsx)(`div`,{className:z(`animate-pulse rounded-md bg-muted`,e),...t})}var vm=768;function ym(){let[e,t]=R.useState(void 0);return R.useEffect(()=>{let e=window.matchMedia(`(max-width: ${vm-1}px)`),n=()=>{t(window.innerWidth<vm)};return e.addEventListener(`change`,n),t(window.innerWidth<vm),()=>e.removeEventListener(`change`,n)},[]),!!e}var bm=`sidebar_state`,xm=3600*24*7,Sm=`256px`,Cm=`256px`,wm=`3rem`,Tm=`b`,Em=R.createContext(null);function Dm(){let e=R.useContext(Em);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}var Om=R.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:o,...s},c)=>{let l=ym(),[u,d]=R.useState(!1),[f,p]=R.useState(l?!0:e),m=t??f,h=R.useCallback(e=>{let t=typeof e==`function`?e(m):e;n?n(t):p(t),document.cookie=`${bm}=${t}; path=/; max-age=${xm}`},[n,m]),g=R.useCallback(()=>l?d(e=>!e):h(e=>!e),[l,h,d]);R.useEffect(()=>{let e=e=>{e.key===Tm&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),g())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[g]);let _=m?`expanded`:`collapsed`,v=R.useMemo(()=>({state:_,open:m,setOpen:h,isMobile:l,openMobile:u,setOpenMobile:d,toggleSidebar:g}),[_,m,h,l,u,d,g]);return(0,a.jsx)(Em.Provider,{value:v,children:(0,a.jsx)(Ke,{delayDuration:0,children:(0,a.jsx)(`div`,{style:{"--sidebar-width":Sm,"--sidebar-width-icon":wm,...i},className:z(`wu-group/sidebar-wrapper wu-flex wu-min-h-[calc(100svh-48px)] wu-w-full`,r),ref:c,...s,children:o})})})});Om.displayName=`SidebarProvider`;var km=R.forwardRef(({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,...o},s)=>{let{isMobile:c,state:l,openMobile:u,setOpenMobile:d}=Dm();return n===`none`?(0,a.jsx)(`div`,{className:z(`wu-flex wu-h-full wu-w-[--sidebar-width] wu-flex-col`,r),ref:s,...o,children:i}):c?(0,a.jsx)(Pi,{open:u,onOpenChange:d,...o,children:(0,a.jsx)(Bi,{"data-sidebar":`sidebar`,"data-mobile":`true`,className:`wu-w-[--sidebar-width] wu-bg-blue-sidebar wu-p-0 [&>button]:wu-hidden`,style:{"--sidebar-width":Cm},side:e,children:(0,a.jsx)(`div`,{className:`wu-flex wu-flex-col wu-w-full wu-h-full`,children:i})})}):(0,a.jsxs)(`div`,{ref:s,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:[(0,a.jsx)(`div`,{className:z(`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]`)}),(0,a.jsx)(`div`,{className:z(`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`,r),...o,children:(0,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:i})})]})});km.displayName=`Sidebar`;var Am=R.forwardRef(({className:e,onClick:t,children:n,...r},i)=>{let{toggleSidebar:o}=Dm();return(0,a.jsxs)(rt,{ref:i,"data-sidebar":`trigger`,variant:`secondary`,className:z(`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:e=>{t?.(e),o()},...r,children:[n,(0,a.jsx)(`span`,{className:`wu-sr-only`,children:`Toggle Sidebar`})]})});Am.displayName=`SidebarTrigger`;var jm=R.forwardRef(({className:e,...t},n)=>{let{toggleSidebar:r}=Dm();return(0,a.jsx)(`button`,{ref:n,"data-sidebar":`rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:r,title:`Toggle Sidebar`,className:z(`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`;var Mm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`main`,{ref:n,className:z(`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}));Mm.displayName=`SidebarInset`;var Nm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(hm,{ref:n,"data-sidebar":`input`,className:z(`wu-h-8 wu-w-full wu-shadow-none focus-visible:wu-ring-2`,e),...t}));Nm.displayName=`SidebarInput`;var Pm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{ref:n,"data-sidebar":`header`,className:z(`wu-flex wu-flex-col wu-gap-2 wu-p-2`,e),...t}));Pm.displayName=`SidebarHeader`;var Fm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{ref:n,"data-sidebar":`footer`,className:z(`wu-flex wu-flex-col wu-gap-2 wu-pb-2`,e),...t}));Fm.displayName=`SidebarFooter`;var Im=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(gm,{ref:n,"data-sidebar":`separator`,className:z(`wu-mx-2 wu-w-auto`,e),...t}));Im.displayName=`SidebarSeparator`;var Lm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{ref:n,"data-sidebar":`content`,className:z(`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}));Lm.displayName=`SidebarContent`;var Rm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{ref:n,"data-sidebar":`group`,className:z(`wu-relative wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-p-2`,e),...t}));Rm.displayName=`SidebarGroup`;var zm=R.forwardRef(({className:e,asChild:t=!1,...n},r)=>(0,a.jsx)(t?d.Slot:`div`,{ref:r,"data-sidebar":`group-label`,className:z(`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}));zm.displayName=`SidebarGroupLabel`;var Bm=R.forwardRef(({className:e,asChild:t=!1,...n},r)=>(0,a.jsx)(t?d.Slot:`button`,{ref:r,"data-sidebar":`group-action`,className:z(`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}));Bm.displayName=`SidebarGroupAction`;var Vm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{ref:n,"data-sidebar":`group-content`,className:z(`wu-w-full wu-text-sm`,e),...t}));Vm.displayName=`SidebarGroupContent`;var Hm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`ul`,{ref:n,"data-sidebar":`menu`,className:z(`wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-gap-1`,e),...t}));Hm.displayName=`SidebarMenu`;var Um=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`li`,{ref:n,"data-sidebar":`menu-item`,className:z(`wu-group/menu-item wu-relative`,e),...t}));Um.displayName=`SidebarMenuItem`;var Wm=(0,f.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`}}),Gm=R.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:o,...s},c)=>{let l=e?d.Slot:`button`,{isMobile:u,state:f}=Dm(),p=(0,a.jsx)(l,{ref:c,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:z(Wm({variant:n,size:r}),o),...s});return i?(typeof i==`string`&&(i={children:i}),(0,a.jsxs)(qe,{children:[(0,a.jsx)(Je,{asChild:!0,children:p}),(0,a.jsx)(Ye,{side:`right`,align:`center`,hidden:f!==`collapsed`||u,...i})]})):p});Gm.displayName=`SidebarMenuButton`;var Km=R.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},i)=>(0,a.jsx)(t?d.Slot:`button`,{ref:i,"data-sidebar":`menu-action`,className:z(`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),...r}));Km.displayName=`SidebarMenuAction`;var qm=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{ref:n,"data-sidebar":`menu-badge`,className:z(`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}));qm.displayName=`SidebarMenuBadge`;var Jm=R.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{let i=R.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,a.jsxs)(`div`,{ref:r,"data-sidebar":`menu-skeleton`,className:z(`wu-flex wu-h-8 wu-items-center wu-gap-2 wu-rounded-md wu-px-2`,e),...n,children:[t&&(0,a.jsx)(_m,{className:`wu-rounded-md wu-size-4`,"data-sidebar":`menu-skeleton-icon`}),(0,a.jsx)(_m,{className:`wu-h-4 wu-max-w-[--skeleton-width] wu-flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":i}})]})});Jm.displayName=`SidebarMenuSkeleton`;var Ym=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`ul`,{ref:n,"data-sidebar":`menu-sub`,className:z(`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}));Ym.displayName=`SidebarMenuSub`;var Xm=R.forwardRef(({...e},t)=>(0,a.jsx)(`li`,{ref:t,...e}));Xm.displayName=`SidebarMenuSubItem`;var Zm=R.forwardRef(({asChild:e=!1,size:t=`md`,isActive:n,className:r,...i},o)=>(0,a.jsx)(e?d.Slot:`a`,{ref:o,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:z(`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`,r),...i}));Zm.displayName=`SidebarMenuSubButton`;function Qm(e){let{open:t,defaultOpen:r,onOpenChange:i,disabled:a}=e,[o,s]=mr({controlled:t,default:r,name:`Collapsible`,state:`open`}),{mounted:c,setMounted:l,transitionStatus:u}=pr(o,!0,!0),d=on(),[f,p]=n.useState(),m=f??d,h=q(e=>{let t=!o,n=Er(vr,e.nativeEvent);i(t,n),!n.isCanceled&&s(t)});return n.useMemo(()=>({disabled:a,handleTrigger:h,mounted:c,open:o,panelId:m,setMounted:l,setOpen:s,setPanelIdState:p,transitionStatus:u}),[a,h,c,o,m,l,s,p,u])}var $m=n.createContext(void 0);process.env.NODE_ENV!==`production`&&($m.displayName=`CollapsibleRootContext`);function eh(){let e=n.useContext($m);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?Et(15):`Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.`);return e}var th=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=sr.startingStyle]=`startingStyle`,e[e.endingStyle=sr.endingStyle]=`endingStyle`,e}({}),nh=function(e){return e.panelOpen=`data-panel-open`,e}({}),rh={[th.open]:``},ih={[th.closed]:``},ah={open(e){return e?{[nh.panelOpen]:``}:null}},oh={open(e){return e?rh:ih},...ur},sh=n.forwardRef(function(e,t){let{render:r,className:i,defaultOpen:o=!1,disabled:s=!1,onOpenChange:c,open:l,style:u,...d}=e,f=q(c),p=Qm({open:l,defaultOpen:o,onOpenChange:f,disabled:s}),m=n.useMemo(()=>({open:p.open,disabled:p.disabled,transitionStatus:p.transitionStatus}),[p.open,p.disabled,p.transitionStatus]),h=n.useMemo(()=>({...p,onOpenChange:f,state:m}),[p,f,m]),g=zn(`div`,e,{state:m,ref:t,props:d,stateAttributesMapping:oh});return(0,a.jsx)($m.Provider,{value:h,children:g})});process.env.NODE_ENV!==`production`&&(sh.displayName=`CollapsibleRoot`);var ch=n.createContext(void 0);process.env.NODE_ENV!==`production`&&(ch.displayName=`CompositeRootContext`);function lh(e=!1){let t=n.useContext(ch);if(t===void 0&&!e)throw Error(process.env.NODE_ENV===`production`?Et(16):`Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.`);return t}function uh(e){let{focusableWhenDisabled:t,disabled:r,composite:i=!1,tabIndex:a=0,isNativeButton:o}=e,s=i&&t!==!1,c=i&&t===!1;return{props:n.useMemo(()=>{let e={onKeyDown(e){r&&t&&e.key!==`Tab`&&e.preventDefault()}};return i||(e.tabIndex=a,!o&&r&&(e.tabIndex=t?a:-1)),(o&&(t||s)||!o&&r)&&(e[`aria-disabled`]=r),o&&(!t||c)&&(e.disabled=r),e},[i,r,t,s,c,o,a])}}function dh(e={}){let{disabled:t=!1,focusableWhenDisabled:r,tabIndex:i=0,native:a=!0,composite:o}=e,s=n.useRef(null),c=lh(!0),l=o??c!==void 0,{props:u}=uh({focusableWhenDisabled:r,disabled:t,composite:l,tabIndex:i,isNativeButton:a});process.env.NODE_ENV!==`production`&&n.useEffect(()=>{if(!s.current)return;let e=fh(s.current);a?e||er(`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\`.${vt.captureOwnerStack?.()||``}`):e&&er(`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\`.${vt.captureOwnerStack?.()||``}`)},[a]);let d=n.useCallback(()=>{let e=s.current;fh(e)&&l&&t&&u.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,u.disabled,l]);return J(d,[d]),{getButtonProps:n.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:i,onKeyDown:o,onPointerDown:s,...c}=e;return Vt({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(Qt(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,i=e.currentTarget,s=fh(i),c=!a&&ph(i),u=r&&(a?s:!c),d=e.key===`Enter`,f=e.key===` `,p=i.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&l&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),c||a&&s?(i.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!a&&(f||d)&&e.preventDefault(),!a&&d&&n?.(e))},onKeyUp(e){if(!t){if(Qt(e),i?.(e),e.target===e.currentTarget&&a&&l&&fh(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!a&&!l&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},a?{type:`button`}:{role:`button`},u,c)},[t,u,l,a]),buttonRef:q(e=>{s.current=e,d()})}}function fh(e){return fn(e)&&e.tagName===`BUTTON`}function ph(e){return!!(e?.tagName===`A`&&e?.href)}var mh={...ah,...ur},hh=n.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=eh(),{className:s,disabled:c=o,id:l,render:u,nativeButton:d=!0,style:f,...p}=e,{getButtonProps:m,buttonRef:h}=dh({disabled:c,focusableWhenDisabled:!0,native:d});return zn(`button`,e,{state:a,ref:[t,h],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},p,m],stateAttributesMapping:mh})});process.env.NODE_ENV!==`production`&&(hh.displayName=`CollapsibleTrigger`);function gh(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function _h(e){let t=bt(vh,e).current;return t.next=e,J(t.effect),t}function vh(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var yh={height:void 0,width:void 0};function bh(e){let{externalRef:t,hiddenUntilFound:r,id:i,keepMounted:a,mounted:o,onOpenChange:s,open:c,setMounted:l,setOpen:u,transitionStatus:d}=e,f=n.useRef(null),p=n.useRef(null),[m,h]=n.useState(yh),g=n.useRef(yh),_=n.useRef(!1),v=n.useRef(c),y=n.useRef(!1),[b,x]=n.useState(!1),S=n.useRef(null),C=Tn(t,f),w=_h({mounted:o,open:c}),T=dr(f,!1,!1),E=!c&&!o,D=b?`idle`:d,O=c&&(v.current||y.current),k=!c&&o&&p.current===`css-animation`&&m.height===void 0&&m.width===void 0?g.current:m,A=r&&E&&p.current!==`css-animation`,j=q((e,t=!0)=>{t&&(g.current=e),h(e)}),M=q(()=>{S.current?.(),S.current=null}),N=q(e=>{M(),S.current=()=>{S.current=null,e()}}),P=q(()=>{c&&o&&p.current===`css-animation`&&(y.current=!0)});J(()=>{!b||d===`starting`||x(!1)},[b,d]),n.useEffect(()=>()=>{P(),M()},[P,M]),J(()=>{let e=f.current;if(!e)return;!c&&S.current&&M();let t=Sh(e,O);if(p.current=t,c&&d===`idle`&&v.current&&t===`css-animation`){g.current=xh(e);return}if(c&&d===`starting`){let n=_.current;if(_.current=!1,t===`none`){j(xh(e)),x(!0);return}if(t===`css-transition`){let t=Th(e);return j(xh(e)),n?(N(wh(e,`transition-duration`,`0s`)),x(!0),t):t}if(t===`css-animation`){if(j(xh(e)),!n){wh(e,`animation-name`,`none`)();return}let t=wh(e,`animation-name`,`none`),r=wh(e,`animation-duration`,`0s`);t(),N(r),x(!0);return}}if(!c&&o&&(d===`idle`||d===`starting`)){if(t===`none`){j(yh,!1),l(!1);return}t===`css-animation`&&(v.current=!1,y.current=!1),j(xh(e));return}if(d!==`ending`)return;if(t===`none`){l(!1);return}let n=xh(e);if(!((n.height??0)>0||(n.width??0)>0)){l(!1);return}j(n),t===`css-animation`&&wh(e,`animation-name`,`none`)()},[o,c,M,j,l,N,O,d]),fr({enabled:c&&o&&D===`idle`,open:!0,ref:f,onComplete(){c&&j(yh,!1)}}),n.useEffect(()=>{if(c||!o||D!==`ending`||!f.current)return;let e=new AbortController,t=-1;function n(){w.current.open||(l(!1),j(yh,!1))}return t=ir.request(()=>{e.signal.aborted||T(n,e.signal)}),()=>{ir.cancel(t),e.abort()}},[w,o,c,D,T,j,l]),J(()=>{let e=f.current;!e||!r||!E||e.setAttribute(`hidden`,`until-found`)},[E,r]),n.useEffect(function(){let e=f.current;if(!e)return;function t(e){_.current=!0,u(!0),s(!0,Er(_r,e))}return gh(e,`beforematch`,t)},[s,u]);let F=a||r||o||c;return{height:k.height,props:{...A?{[th.startingStyle]:``}:void 0,hidden:E,id:i},ref:C,shouldPreventOpenAnimation:O,shouldRender:F,transitionStatus:D,width:k.width}}function xh(e){return{height:e.scrollHeight,width:e.scrollWidth}}function Sh(e,t=!1){let n=un(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&Ch(n.animationDuration),i=Ch(n.transitionDuration);return r&&i?(process.env.NODE_ENV!==`production`&&Fn(`CSS transitions and CSS animations both detected on Collapsible or Accordion panel.`,`Only one of either animation type should be used.`),`css-transition`):i?`css-transition`:r?`css-animation`:`none`}function Ch(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function wh(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function Th(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=ir.request(n);return()=>{ir.cancel(r),n()}}var Eh=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({}),Dh=n.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e;process.env.NODE_ENV!==`production`&&J(()=>{r&&i===!1&&Fn("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.")},[r,i]);let{mounted:l,onOpenChange:u,open:d,panelId:f,setMounted:p,setPanelIdState:m,setOpen:h,state:g,transitionStatus:_}=eh(),v=r??!1,y=i??!1;J(()=>{if(o)return m(o),()=>{m(void 0)}},[o,m]);let{height:b,props:x,ref:S,shouldPreventOpenAnimation:C,shouldRender:w,transitionStatus:T,width:E}=bh({externalRef:t,hiddenUntilFound:v,id:f,keepMounted:y,mounted:l,onOpenChange:u,open:d,setMounted:p,setOpen:h,transitionStatus:_}),D={...g,transitionStatus:T},O=Rn(s,D),k=zn(`div`,{...e,style:void 0},{state:D,ref:S,props:[x,{style:{[Eh.collapsiblePanelHeight]:b===void 0?`auto`:`${b}px`,[Eh.collapsiblePanelWidth]:E===void 0?`auto`:`${E}px`}},c,O?{style:O}:void 0,C?{style:{animationName:`none`}}:void 0],stateAttributesMapping:oh});return w?k:null});process.env.NODE_ENV!==`production`&&(Dh.displayName=`CollapsiblePanel`);var Oh=({children:e,Sidebar:t,className:n,defaultOpen:r=!0,open:i,onOpenChange:o,style:s})=>(0,a.jsxs)(Om,{defaultOpen:r,open:i,onOpenChange:o,children:[(0,a.jsxs)(km,{variant:`sidebar`,collapsible:`icon`,className:z(`wu-top-12 wu-h-[calc(100%-48px)] wu-shadow-sidebar wu-border-none`,n),style:s,role:`complementary`,children:[(0,a.jsx)(Pm,{className:`wu-py-2`,children:(0,a.jsx)(kh,{})}),t]}),(0,a.jsx)(Mm,{className:`wu-contain-inline-size`,children:e})]}),kh=e=>{let{state:t,isMobile:n,openMobile:r}=Dm();return(0,a.jsx)(Am,{...e,children:(0,a.jsx)(Tp,{showMenu:n?r:t===`expanded`})})},Ah=({className:e,children:t,...n})=>{let r=(0,R.useRef)(null),i=(0,R.useRef)(null),o=({currentTarget:e})=>{let{scrollTop:t,clientHeight:n,scrollHeight:a}=e;r.current&&r.current.classList.toggle(`wu-border-[#1b338014]`,t!==0),i.current&&i.current.classList.toggle(`wu-border-[#1b338014]`,t+n!==a)},s=`wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent`;return(0,a.jsxs)(Lm,{...n,className:z(`wu-overflow-hidden wu-gap-0`,e),children:[(0,a.jsx)(`hr`,{className:s,ref:r}),(0,a.jsx)($f,{onScroll:o,className:`wu-gap-2`,thumbColor:`#b9c3dc`,railColor:`#00000000`,"data-testid":`scroll-area`,children:t}),(0,a.jsx)(`hr`,{className:s,ref:i})]})},jh=e=>(0,a.jsx)(Fm,{...e,children:e.children}),Mh=({label:e,children:t,...n})=>(0,a.jsxs)(Rm,{...n,className:`wu-p-0`,children:[(0,a.jsx)(`div`,{className:`wu-h-8`,children:(0,a.jsx)(zm,{className:`wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q`,children:e})}),(0,a.jsx)(Vm,{children:(0,a.jsx)(Hm,{children:t})})]}),Nh=e=>(0,a.jsx)(Hm,{...e}),Ph=({Icon:e,children:t,className:n,isActive:r,...i})=>{let{state:o}=Dm(),[s,c]=R.default.useState(),l=ym(),u=R.default.isValidElement(t)?R.default.cloneElement(t,{children:(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis`,children:[(0,a.jsx)(`div`,{className:`wu-relative wu-right-1`,children:e}),(0,a.jsx)(`span`,{className:z(`wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150`,o===`collapsed`&&!l&&`wu-opacity-0`),children:t.props?.children})]})}):t&&(0,a.jsxs)(`div`,{className:`wu-flex wu-items-center wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis`,children:[(0,a.jsx)(`div`,{className:`wu-relative wu-right-1`,children:e}),(0,a.jsx)(`span`,{className:z(`wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150`,o===`collapsed`&&!l&&`wu-opacity-0`),children:t})]}),d=(0,R.useRef)(null);return R.default.useEffect(()=>{c(d.current?.textContent||``)},[]),(0,a.jsx)(Um,{...i,className:`wu-flex wu-items-center wu-gap-2 wu-px-2`,children:(0,a.jsx)(Gm,{className:z(`wu-flex wu-items-center wu-text-blue-q hover:wu-bg-blue-sidebarHover wu-cursor-pointer wu-h-8 wu-rounded-sm`,n,r&&`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:r,tooltip:s,asChild:R.default.isValidElement(t),ref:d,children:u})})},Fh=({Title:e,Icon:t,children:n,className:r,...i})=>{let{state:o}=Dm(),s=ym();return(0,a.jsxs)(sh,{children:[(0,a.jsx)(hh,{render:n=>{let r=`data-panel-open`in n;return(0,a.jsxs)(Ph,{Icon:t,...n,children:[e,(o===`expanded`||s)&&(0,a.jsx)(Pe,{icon:`wm-arrow-forward-ios`,className:z(`wu-absolute wu-right-4 wu-transition-transform wu-duration-300`,r&&`wu-rotate-90`,`wu-scale-75`)})]})}}),(0,a.jsx)(Dh,{className:z(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`,r),...i,children:n})]})},Ih=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`}]]),Lh=(e,t,n=1)=>{let r=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);if(!r)throw Error(`Invalid HSL color format`);return`hsl(${parseFloat(r[1])} ${parseFloat(r[2])}% ${Math.max(0,parseFloat(r[3])+t)}% / ${n})`},Rh=({index:e,viewIndex:t,length:n,itemHeight:r})=>{let i=(e-t+n)%n,a;a=i===0?0:i===n-1&&n>=2?-1:i===n-2&&n>=3?-2:i===1?1:i===2?2:i===n-3&&n>=4?-3:3;let o=Ih.get(a)||{},s=a>0?r+28+(a-1)*20:o.top;return{position:a,styles:{...o,...a>0&&{top:`${s}px`},height:a>0?`32px`:r}}},zh={LIGHTNESS_STEP:8,BORDER_LIGHTNESS:10,CONTENT_LIGHTNESS:45,CONTENT_HEIGHT:`calc(100% - 2rem)`,FONT_SIZE_ACTIVE:`14px`,FONT_SIZE_INACTIVE:`12px`,HEADER_HEIGHT:`2rem`},Bh=({children:e,className:t,header:n,baseColor:r,position:i=0,style:o,...s})=>{let c=i<=0,l=i===0,u={border:l?`4px solid ${Lh(r,zh.BORDER_LIGHTNESS)}`:``,...o},d={backgroundColor:Lh(r,i*zh.LIGHTNESS_STEP),fontSize:l?zh.FONT_SIZE_ACTIVE:zh.FONT_SIZE_INACTIVE,transition:`all 0.3s ease`,position:`relative`,bottom:i<0?`4px`:`0px`,height:`32px`,padding:`4px 8px`},f={backgroundColor:Lh(r,45+i*6),height:zh.CONTENT_HEIGHT,position:`relative`,bottom:i<0?`4px`:`0px`};return(0,a.jsxs)(`div`,{className:z(`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:u,...s,children:[(0,a.jsx)(`div`,{style:d,className:`wu-text-white`,children:n}),c&&(0,a.jsx)(`div`,{className:`wu-p-2 wu-overflow-y-auto wu-text-sm`,style:f,children:e})]})},Vh=({children:e,Trigger:t,Header:n,styles:r={},classNames:i={},open:o,onOpenChange:s,itemHeight:c})=>{let l={height:c,...r.Trigger};return(0,a.jsxs)(Dp,{open:o,onOpenChange:s,children:[(0,a.jsx)(Op,{className:z(`wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative`,i.Trigger),style:l,children:(0,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})}),(0,a.jsxs)(Mp,{className:z(`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`,i.Content),hideCloseButton:!0,isStackedCard:!0,style:r.Content,children:[(0,a.jsx)(Fp,{}),(0,a.jsx)(y.DialogClose,{className:z(`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`,i.CloseButton),style:r.CloseButton,"aria-label":`Close dialog`,children:(0,a.jsx)(Pe,{icon:`wm-close`,className:`wu-text-lg wu-m-4 wu-cursor-pointer`})}),n&&(0,a.jsx)(Np,{className:z(`wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]`,i.Header),style:r.Header,children:n}),e]})]})};function Hh(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}var Uh={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Wh={...Uh,position:`fixed`,top:0,left:0},Gh={...Uh,position:`absolute`},Kh=n.createContext(void 0);process.env.NODE_ENV!==`production`&&(Kh.displayName=`NumberFieldRootContext`);function qh(){let e=n.useContext(Kh);if(e===void 0)throw Error(process.env.NODE_ENV===`production`?Et(43):`Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.`);return e}var Jh={inputValue:()=>null,value:()=>null,...Nt},Yh=new Map;function Xh(e,t){let n=JSON.stringify({locale:e,options:t}),r=Yh.get(n);if(r)return r;let i=new Intl.NumberFormat(e,t);return Yh.set(n,i),i}function Zh(e,t,n){return e==null?``:Xh(t,n).format(e)}function Qh(e,t,n){return Zh(e,t,{...n,maximumFractionDigits:20})}var $h=[`零`,`〇`,`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`],eg={零:`0`,〇:`0`,一:`1`,二:`2`,三:`3`,四:`4`,五:`5`,六:`6`,七:`7`,八:`8`,九:`9`},tg=[`٠`,`١`,`٢`,`٣`,`٤`,`٥`,`٦`,`٧`,`٨`,`٩`],ng=[`۰`,`۱`,`۲`,`۳`,`۴`,`۵`,`۶`,`۷`,`۸`,`۹`],rg=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],ig=[`%`,`٪`,`%`,`﹪`],ag=[`‰`,`؉`],og=[`−`,`-`,`‒`,`–`,`—`,`﹣`],sg=[`+`,`﹢`],cg=RegExp(`[${tg.join(``)}]`,`g`),lg=RegExp(`[${ng.join(``)}]`,`g`),ug=RegExp(`[${rg.join(``)}]`,`g`),dg=RegExp(`[${$h.join(``)}]`,`g`),fg=RegExp(`[${ig.join(``)}]`),pg=RegExp(`[${ag.join(``)}]`),mg=/[٠١٢٣٤٥٦٧٨٩]/,hg=/[۰۱۲۳۴۵۶۷۸۹]/,gg=/[零〇一二三四五六七八九]/,_g=RegExp(`[${rg.join(``)}]`),vg=[`.`,`,`,`.`,`,`,`٫`,`٬`],yg=/\p{Zs}/u,bg=[`+`,...sg],xg=[`-`,...og],Sg=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),Cg=e=>e.replace(/[-\\\]^]/g,e=>`\\${e}`),wg=e=>`[${e.map(Cg).join(``)}]`,Tg=wg([`-`].concat(og)),Eg=wg([`+`].concat(sg)),Dg=new RegExp(Tg,`gu`),Og=new RegExp(Eg,`gu`),kg=new RegExp(Tg),Ag=new RegExp(Eg);function jg(e,t){let n=Xh(e,t).formatToParts(11111.1),r={};return n.forEach(e=>{r[e.type]=e.value}),Xh(e).formatToParts(.1).forEach(e=>{e.type===`decimal`&&(r[e.type]=e.value)}),r}function Mg(e,t,n){if(e==null)return null;let r=String(e).replace(/\p{Cf}/gu,``).trim();r=r.replace(Dg,`-`).replace(Og,`+`);let i=!1,a=r.match(/([+-])\s*$/);a&&(a[1]===`-`&&(i=!0),r=r.replace(/([+-])\s*$/,``));let o=r.match(/^\s*([+-])/);o&&(o[1]===`-`&&(i=!0),r=r.replace(/^\s*[+-]/,``));let s=t;s===void 0&&(mg.test(r)||hg.test(r)?s=`ar`:gg.test(r)&&(s=`zh`));let{group:c,decimal:l,currency:u}=jg(s,n),d=Xh(s,n).formatToParts(1).filter(e=>e.type===`unit`).map(e=>Sg(e.value)),f=d.length?new RegExp(d.join(`|`),`g`):null,p=null;c&&(p=/\p{Zs}/u.test(c)?/\p{Zs}/gu:c===`'`||c===`’`?/['’]/g:new RegExp(Sg(c),`g`));let m=[{regex:c?p:null,replacement:``},{regex:l?new RegExp(Sg(l),`g`):null,replacement:`.`},{regex:/./g,replacement:`.`},{regex:/,/g,replacement:``},{regex:/٫/g,replacement:`.`},{regex:/٬/g,replacement:``},{regex:u?new RegExp(Sg(u),`g`):null,replacement:``},{regex:f,replacement:``},{regex:cg,replacement:e=>String(tg.indexOf(e))},{regex:lg,replacement:e=>String(ng.indexOf(e))},{regex:ug,replacement:e=>String(rg.indexOf(e))},{regex:dg,replacement:e=>eg[e]}].reduce((e,{regex:t,replacement:n})=>t?e.replace(t,n):e,r),h=m.lastIndexOf(`.`);if(h!==-1&&(m=`${m.slice(0,h).replace(/\./g,``)}.${m.slice(h+1).replace(/\./g,``)}`),/^[-+]?Infinity$/i.test(r)||/[∞]/.test(r))return null;let g=(i?`-`:``)+m,_=parseFloat(g),v=n?.style,y=v===`unit`&&n?.unit===`percent`,b=fg.test(e)||v===`percent`;return pg.test(e)?_/=1e3:!y&&b&&(_/=100),Number.isNaN(_)?null:_}function Ng(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var Pg=1e-10;function Fg(e){let t=Xh(`en-US`).resolvedOptions(),n=e?.minimumFractionDigits??t.minimumFractionDigits??0;return{maximumFractionDigits:Math.max(e?.maximumFractionDigits??t.maximumFractionDigits??20,n),minimumFractionDigits:n}}function Ig(e,t){if(!Number.isFinite(e))return e;let n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function Lg(e,t){let{maximumFractionDigits:n}=Fg(t);return Ig(e,n)}function Rg(e,t,n,r=`directional`){if(n===0)return e;let i=Math.abs(n),a=Math.sign(n),o=i*Pg*a,s=r===`nearest`?n:i,c=(e-t+o)/s,l;return l=r===`nearest`?Math.round(c):a>0?Math.floor(c):Math.ceil(c),t+l*(r===`nearest`?n:i)}function zg(e,{step:t,minWithDefault:n,maxWithDefault:r,minWithZeroDefault:i,format:a,snapOnStep:o,small:s,clamp:c}){if(e===null)return e;let l=c?Ng(e,n,r):e;if(t!=null&&o){if(t===0)return Lg(l,a);let e=i;return!s&&n!==-(2**53-1)&&(e=n),Lg(Rg(l,e,t,s?`nearest`:`directional`),a)}return Lg(l,a)}var Bg=n.forwardRef(function(e,t){let{id:r,min:i,max:o,smallStep:s=.1,step:c=1,largeStep:l=10,required:u=!1,disabled:d=!1,readOnly:f=!1,form:p,name:m,defaultValue:h,value:g,onValueChange:_,onValueCommitted:v,allowWheelScrub:y=!1,snapOnStep:b=!1,allowOutOfRange:x=!1,format:S,locale:C,render:w,className:T,inputRef:E,style:D,...O}=e,{setDirty:k,validityData:A,disabled:j,setFilled:M,invalid:N,name:P,state:F,validation:I,shouldValidateOnChange:ee}=It(),L=j||d,te=P??m,R=c===`any`?1:c,[ne,z]=n.useState(!1),B=i??-(2**53-1),V=o??2**53-1,re=i??0,ie=S?.style,ae=n.useRef(null),oe=Tn(E,I.inputRef),se=pn({id:r}),[ce,le]=mr({controlled:g,default:h,name:`NumberField`,state:`value`}),H=ce??null,ue=_h(H);J(()=>{M(H!==null)},[M,H]);let de=Hh(),U=_h(S),fe=n.useRef(!1),pe=q((e,t)=>{fe.current=!1,v?.(e,t)}),me=n.useRef(!0),he=n.useRef(null),[ge,_e]=n.useState(()=>g===void 0?Zh(H,C,S):Vg(H,C,S)),[ve,ye]=n.useState(`numeric`),be=q(()=>{let{decimal:e,group:t,currency:n,literal:r}=jg(C,S),i=new Set;vg.forEach(e=>i.add(e)),e&&i.add(e),t&&(i.add(t),yg.test(t)&&i.add(` `));let a=ie===`percent`||ie===`unit`&&S?.unit===`percent`,o=ie===`percent`||ie===`unit`&&S?.unit===`permille`;return a&&ig.forEach(e=>i.add(e)),o&&ag.forEach(e=>i.add(e)),ie===`currency`&&n&&i.add(n),r&&(Array.from(r).forEach(e=>i.add(e)),yg.test(r)&&i.add(` `)),bg.forEach(e=>i.add(e)),B<0&&xg.forEach(e=>i.add(e)),i}),W=q(e=>e?.altKey?s:e?.shiftKey?l:R),xe=q((e,t)=>{let n=t.event,r=t.direction,i=t.reason,a=!x||!(i===`input-change`||i===`input-blur`||i===`input-paste`||i===`input-clear`||i===`none`),o=zg(e,{step:r?W(n)*r:void 0,format:U.current,minWithDefault:B,maxWithDefault:V,minWithZeroDefault:re,snapOnStep:b,small:n?.altKey??!1,clamp:a}),s=t.reason===`input-change`||t.reason===`input-clear`||t.reason===`input-blur`||t.reason===`input-paste`||t.reason===`none`,c=o!==H||s&&(e!==H||me.current===!1);if(c){if(he.current=o,_?.(o,t),t.isCanceled)return c;le(o),k(o!==A.initialValue),fe.current=!0}return me.current&&_e(Zh(o,C,S)),de(),c}),Se=q((e,{direction:t,currentValue:n,event:r,reason:a})=>{let o=n??ue.current;return xe(typeof o==`number`?o+e*t:Math.max(0,i??0),Er(a,r,void 0,{direction:t}))});J(function(){if(!me.current)return;let e=g===void 0?Zh(H,C,S):Vg(H,C,S);e!==ge&&_e(e)}),J(function(){if(!yn)return;let e=`text`;B>=0&&(e=`decimal`),ye(e)},[B,ie]),n.useEffect(function(){let e=ae.current;if(L||f||!y||!e)return;function t(e){e.ctrlKey||Cn(mn(ae.current))!==ae.current||(e.preventDefault(),me.current=!0,Se(W(e)??1,{direction:e.deltaY>0?-1:1,event:e,reason:`wheel`}))}return gh(e,`wheel`,t)},[y,Se,L,f,W]);let Ce=n.useMemo(()=>({...F,disabled:L,readOnly:f,required:u,value:H,inputValue:ge,scrubbing:ne}),[F,L,f,u,H,ge,ne]),we=n.useMemo(()=>({inputRef:ae,inputValue:ge,value:H,minWithDefault:B,maxWithDefault:V,disabled:L,readOnly:f,id:se,setValue:xe,incrementValue:Se,getStepAmount:W,allowInputSyncRef:me,formatOptionsRef:U,valueRef:ue,lastChangedValueRef:he,hasPendingCommitRef:fe,name:te,required:u,invalid:N,inputMode:ve,getAllowedNonNumericKeys:be,min:i,max:o,setInputValue:_e,locale:C,isScrubbing:ne,setIsScrubbing:z,state:Ce,onValueCommitted:pe}),[ae,ge,H,B,V,L,f,se,xe,Se,W,U,ue,te,u,N,ve,be,i,o,_e,C,ne,Ce,pe]),Te=zn(`div`,e,{ref:t,state:Ce,props:O,stateAttributesMapping:Jh});return(0,a.jsxs)(Kh.Provider,{value:we,children:[Te,(0,a.jsx)(`input`,{...I.getInputValidationProps({onFocus(){ae.current?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||L||f){e.preventBaseUIHandler?.();return}let t=e.currentTarget.valueAsNumber,n=Number.isNaN(t)?null:t,r=Er(_r,e.nativeEvent);k(n!==A.initialValue),xe(n,r),ee()&&I.commit(n)}}),ref:oe,type:`number`,form:p,name:te,value:H??``,min:i,max:o,step:c,disabled:L,required:u,"aria-hidden":!0,tabIndex:-1,style:te?Gh:Wh,suppressHydrationWarning:!0})]})});process.env.NODE_ENV!==`production`&&(Bg.displayName=`NumberFieldRoot`);function Vg(e,t,n){return n?.maximumFractionDigits!=null||n?.minimumFractionDigits!=null?Zh(e,t,n):Qh(e,t,n)}var Hg=n.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=qh();return zn(`div`,e,{ref:t,state:o,props:[{role:`group`},a],stateAttributesMapping:Jh})});process.env.NODE_ENV!==`production`&&(Hg.displayName=`NumberFieldGroup`);var Ug=0,Wg=class e extends Zn{static create(){return new e}start(e,t){this.clear(),this.currentId=setInterval(()=>{t()},e)}clear=()=>{this.currentId!==Ug&&(clearInterval(this.currentId),this.currentId=Ug)}};function Gg(){let e=bt(Wg.create).current;return Yn(e.disposeEffect),e}var Kg=60,qg=400,Jg=8,Yg=50,Xg=3;function Zg(e){return e===`touch`||e===`pen`}function Qg(e){let{disabled:t,readOnly:r=!1,tick:i,onStop:a,tickDelay:o=Kg,startDelay:s=qg,scrollDistance:c=Jg,elementRef:l}=e,u=Qn(),d=Gg(),f=Qn(),p=n.useRef(!1),m=n.useRef(0),h=n.useRef({x:0,y:0}),g=n.useRef(!1),_=n.useRef(!1),v=n.useRef(``),y=n.useRef(()=>{}),b=q(()=>{f.clear(),u.clear(),d.clear(),y.current(),m.current=0});function x(e){b();let t=l.current;if(!t)return;let n=un(t);function r(e){e.preventDefault()}if(y.current=gh(n,`contextmenu`,r),gh(n,`pointerup`,e=>{p.current=!1,b(),a?.(e)},{once:!0}),!i(e)){b();return}u.start(s,()=>{d.start(o,()=>{i(e)||b()})})}return n.useEffect(()=>()=>b(),[b]),{pointerHandlers:{onTouchStart(){g.current=!0},onTouchEnd(){g.current=!1},onPointerDown(e){let n=!e.button||e.button===0;e.defaultPrevented||!n||t||r||(v.current=e.pointerType,_.current=!1,p.current=!0,h.current={x:e.clientX,y:e.clientY},Zg(e.pointerType)?f.start(Yg,()=>{let t=m.current;m.current=0,p.current&&t<Xg?(x(e.nativeEvent),_.current=!0):(_.current=!1,b())}):(e.preventDefault(),x(e.nativeEvent)))},onPointerUp(e){Zg(e.pointerType)&&(p.current=!1)},onPointerMove(e){if(t||r||!Zg(e.pointerType)||!p.current)return;m.current!=null&&(m.current+=1);let{x:n,y:i}=h.current,a=n-e.clientX,o=i-e.clientY;a**2+o**2>c**2&&b()},onMouseEnter(e){e.defaultPrevented||t||r||!p.current||g.current||Zg(v.current)||x(e.nativeEvent)},onMouseLeave(){g.current||b()},onMouseUp(){g.current||b()}},shouldSkipClick:q(e=>e.defaultPrevented?!0:Zg(v.current)?_.current:e.detail!==0)}}function $g(e){return e===`touch`||e===`pen`}function e_(e){let{allowInputSyncRef:t,disabled:n,formatOptionsRef:r,getStepAmount:i,id:a,incrementValue:o,inputRef:s,inputValue:c,isIncrement:l,locale:u,readOnly:d,setValue:f,valueRef:p,lastChangedValueRef:m,onValueCommitted:h}=e,g=l?yr:br;function _(e){t.current=!0;let n=Mg(c,u,r.current);n!==null&&(p.current=n,f(n,Er(g,e,void 0,{direction:l?1:-1})))}let{pointerHandlers:v,shouldSkipClick:y}=Qg({disabled:n||d,elementRef:s,tickDelay:60,startDelay:400,scrollDistance:8,tick(e){return o(i(e)??1,{direction:l?1:-1,event:e,reason:g})},onStop(e){h(m.current??p.current,Dr(g,e))}});return{disabled:n,"aria-readonly":d||void 0,"aria-label":l?`Increase`:`Decrease`,"aria-controls":a,tabIndex:-1,style:{WebkitUserSelect:`none`,userSelect:`none`},...v,onClick(e){let t=n||d;if(e.defaultPrevented||t||y(e))return;_(e.nativeEvent);let r=i(e)??1,a=p.current;o(r,{direction:l?1:-1,event:e.nativeEvent,reason:g});let s=m.current??p.current;s!==a&&h(s,Dr(g,e.nativeEvent))},onPointerDown(e){let t=!e.button||e.button===0;e.defaultPrevented||d||!t||n||(_(e.nativeEvent),$g(e.pointerType)||s.current?.focus(),v.onPointerDown(e))}}}var t_=n.forwardRef(function(e,t){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,disabled:u,formatOptionsRef:d,getStepAmount:f,id:p,incrementValue:m,inputRef:h,inputValue:g,locale:_,maxWithDefault:v,readOnly:y,setValue:b,state:x,value:S,valueRef:C,lastChangedValueRef:w,onValueCommitted:T}=qh(),E=a||u||S!=null&&S>=v,D=e_({isIncrement:!0,inputRef:h,inputValue:g,disabled:E,readOnly:y,id:p,setValue:b,getStepAmount:f,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:C,locale:_,lastChangedValueRef:w,onValueCommitted:T}),{getButtonProps:O,buttonRef:k}=dh({disabled:E,native:o,focusableWhenDisabled:!0}),A=n.useMemo(()=>({...x,disabled:E}),[x,E]);return zn(`button`,e,{ref:[t,k],state:A,props:[D,c,O],stateAttributesMapping:Jh})});process.env.NODE_ENV!==`production`&&(t_.displayName=`NumberFieldIncrement`);var n_=n.forwardRef(function(e,t){let{render:r,className:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{allowInputSyncRef:l,disabled:u,formatOptionsRef:d,getStepAmount:f,id:p,incrementValue:m,inputRef:h,inputValue:g,minWithDefault:_,readOnly:v,setValue:y,state:b,value:x,valueRef:S,locale:C,lastChangedValueRef:w,onValueCommitted:T}=qh(),E=a||u||x!=null&&x<=_,D=e_({isIncrement:!1,inputRef:h,inputValue:g,disabled:E,readOnly:v,id:p,setValue:y,getStepAmount:f,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:d,valueRef:S,locale:C,lastChangedValueRef:w,onValueCommitted:T}),{getButtonProps:O,buttonRef:k}=dh({disabled:E,native:o,focusableWhenDisabled:!0}),A=n.useMemo(()=>({...b,disabled:E}),[b,E]);return zn(`button`,e,{ref:[t,k],state:A,props:[D,c,O],stateAttributesMapping:Jh})});process.env.NODE_ENV!==`production`&&(n_.displayName=`NumberFieldDecrement`);function r_(e,t){let r=n.useRef(e),i=q(t);J(()=>{r.current!==e&&i(r.current)},[e,i]),J(()=>{r.current=e},[e])}var i_={...Nt,...Jh},a_=new Set([`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`Tab`,`Enter`,`Escape`]),o_=n.forwardRef(function(e,t){let{render:r,className:i,style:a,...o}=e,{allowInputSyncRef:s,disabled:c,formatOptionsRef:l,getAllowedNonNumericKeys:u,getStepAmount:d,id:f,incrementValue:p,inputMode:m,inputValue:h,max:g,min:_,name:v,readOnly:y,required:b,setValue:x,state:S,setInputValue:C,locale:w,inputRef:T,value:E,onValueCommitted:D,lastChangedValueRef:O,hasPendingCommitRef:k,valueRef:A}=qh(),{clearErrors:j}=Rt(),{validationMode:M,setTouched:N,setFocused:P,invalid:F,shouldValidateOnChange:I,validation:ee}=It(),{labelId:L}=cn(),te=n.useRef(!1),R=n.useRef(!1);return gr(T,f,E),r_(E,e=>{let t=I();if(j(v),t&&ee.commit(E),!(e===E||t)){if(R.current){R.current=!1;return}ee.commit(E,!0)}}),zn(`input`,e,{ref:[t,T],state:S,props:[{id:f,required:b,disabled:c,readOnly:y,inputMode:m,value:h,type:`text`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,"aria-roledescription":`Number field`,"aria-invalid":F||void 0,"aria-labelledby":L,suppressHydrationWarning:!0,onFocus(e){if(e.defaultPrevented||y||c||(P(!0),te.current))return;te.current=!0;let t=e.currentTarget,n=t.value.length;t.setSelectionRange(n,n)},onBlur(e){if(e.defaultPrevented||y||c)return;N(!0),P(!1);let t=!s.current,n=k.current;if(s.current=!0,h.trim()===``){x(null,Er(Sr,e.nativeEvent)),M===`onBlur`&&ee.commit(null),D(null,Dr(Sr,e.nativeEvent));return}let r=l.current,i=Mg(h,w,r);if(i===null)return;let a=r?.maximumFractionDigits!=null||r?.minimumFractionDigits!=null,o=r?.maximumFractionDigits,u=a&&typeof o==`number`?Number(i.toFixed(o)):i,d=Dr(Cr,e.nativeEvent),f=E!==u,p=t||f||n;M===`onBlur`&&ee.commit(u),f&&(R.current=!0,x(u,Er(Cr,e.nativeEvent))),p&&D(u,d);let m=Zh(u,w,r);!(!a&&i===E&&h===Qh(i,w,r))&&h!==m&&C(m)},onChange(e){if(e.nativeEvent.defaultPrevented)return;s.current=!1;let t=e.currentTarget.value;if(t.trim()===``){C(t),x(null,Er(Sr,e.nativeEvent));return}let n=u();if(!Array.from(t).every(e=>{let t=e>=`0`&&e<=`9`,r=mg.test(e),i=gg.test(e),a=hg.test(e),o=_g.test(e),s=kg.test(e);return t||r||i||a||o||s||n.has(e)}))return;let r=Mg(t,w,l.current);C(t),r!==null&&x(r,Er(xr,e.nativeEvent))},onKeyDown(e){if(e.defaultPrevented||y||c)return;let t=e.nativeEvent;s.current=!0;let n=u(),r=n.has(e.key),{decimal:i,currency:a,percentSign:o}=jg(w,l.current),f=e.currentTarget.selectionStart,m=e.currentTarget.selectionEnd,v=f===0&&m===h.length,b=e=>f!=null&&m!=null&&e>=f&&e<m;if(kg.test(e.key)&&Array.from(n).some(e=>kg.test(e||``))){let e=h.search(Dg),t=e!=null&&e!==-1&&b(e);r=!(kg.test(h)||Ag.test(h))||v||t}if(Ag.test(e.key)&&Array.from(n).some(e=>Ag.test(e||``))){let e=h.search(Og),t=e!=null&&e!==-1&&b(e);r=!(kg.test(h)||Ag.test(h))||v||t}[i,a,o].forEach(t=>{if(e.key===t){let e=b(h.indexOf(t));r=!h.includes(t)||v||e}});let S=e.key>=`0`&&e.key<=`9`,C=mg.test(e.key),T=gg.test(e.key),E=hg.test(e.key),k=_g.test(e.key),j=a_.has(e.key);if(e.which===229||e.altKey||e.ctrlKey||e.metaKey||r||S||C||k||T||E||j)return;let M=Mg(h,w,l.current),N=d(e)??1;wn(e);let P=Dr(Tr,t);e.key===`ArrowUp`?(p(N,{direction:1,currentValue:M,event:t,reason:Tr}),D(O.current??A.current,P)):e.key===`ArrowDown`?(p(N,{direction:-1,currentValue:M,event:t,reason:Tr}),D(O.current??A.current,P)):e.key===`Home`&&_!=null?(x(_,Er(Tr,t)),D(O.current??A.current,P)):e.key===`End`&&g!=null&&(x(g,Er(Tr,t)),D(O.current??A.current,P))},onPaste(e){if(e.defaultPrevented||y||c)return;e.preventDefault();let t=(e.clipboardData||window.Clipboard).getData(`text/plain`),n=Mg(t,w,l.current);n!==null&&(s.current=!1,x(n,Er(wr,e.nativeEvent)),C(t))}},ee.getValidationProps(),o],stateAttributesMapping:i_})});process.env.NODE_ENV!==`production`&&(o_.displayName=`NumberFieldInput`);var s_={wuStepper:`_wuStepper_apbnq_1`},c_=({onChange:e,Label:t,defaultValue:n=0,readonly:r,dir:i,step:o=1,min:s,max:c,value:l,className:u,labelPosition:d=`left`,disabled:f,resetInvalidValueOnBlur:p=!0,...m})=>{let h=R.useId(),[g,_]=R.useState(l===void 0?n||0:Number(l));R.useEffect(()=>{l!==void 0&&_(Number(l))},[l]);let v=t=>{_(t),e?.(t)},y=e=>{let t=Number(e.target.value);Number.isNaN(t)||_(t)},b=()=>{p&&(s!==void 0&&g<s?(_(s),e?.(s)):c!==void 0&&g>c&&(_(c),e?.(c)))};R.useEffect(()=>{l&&n&&console.warn(`As both value and defaultValue are passed, value will be used`)},[l,n]);let x={inc:r||c!==void 0&&g>=c||f,dec:r||s!==void 0&&g<=s||f},S=s!==void 0&&g<s||c!==void 0&&g>c,C=z(`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(0,a.jsxs)(Bg,{id:h,value:g,step:o,readOnly:r,onValueChange:e=>typeof e==`number`&&v(e),dir:i,className:z(`wu-flex wu-stepper`,i===`rtl`&&d!==`top`&&`wu-gap-2`,s_.wuStepper,l_({labelPosition:d}),u),children:[t&&(0,a.jsx)(K,{htmlFor:h,className:`wu-input-label`,children:t}),(0,a.jsxs)(Hg,{className:`wu-flex wu-max-w-[97px] wu-relative`,children:[(0,a.jsx)(n_,{"aria-label":`decrement`,className:z(C,i===`rtl`?`wu-right-0`:`wu-left-0`,`wu-stepper-button`),disabled:x.dec,children:(0,a.jsx)(`span`,{className:`wu-text-base wm-minimize`})}),(0,a.jsx)(o_,{"aria-label":`stepper`,role:`spinbutton`,type:`text`,"aria-invalid":S||void 0,dir:i,className:z(`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`,S&&`wu-border-red-deep focus:wu-border-red-deep`,`wu-stepper-input`),readOnly:r,onChange:y,onBlur:b,disabled:f,min:s,max:c,step:o,value:g,...m}),(0,a.jsx)(t_,{"aria-label":`increment`,className:z(C,i===`rtl`?`wu-left-0`:`wu-right-0`,`wu-stepper-button`),disabled:x.inc,children:(0,a.jsx)(`span`,{className:`wu-text-base wm-add`})})]})]})},l_=(0,f.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`}}}),u_={container:`_container_1cpdq_1`,sidebar:`_sidebar_1cpdq_5`,content:`_content_1cpdq_13`,sourceWrapper:`_sourceWrapper_1cpdq_17`,menuItem:`_menuItem_1cpdq_21`,list:`_list_1cpdq_25`,listItem:`_listItem_1cpdq_29`,listItemActive:`_listItemActive_1cpdq_42`,label:`_label_1cpdq_46`,icon:`_icon_1cpdq_50`,sharedWrapper:`_sharedWrapper_1cpdq_54`,emptyState:`_emptyState_1cpdq_64`},d_=R.default.memo(({className:e,label:t=`Shared surveys`,...n})=>(0,a.jsxs)(`button`,{className:z(u_.sharedWrapper,e),"data-slot":`survey-select-shared`,"aria-label":t,...n,children:[(0,a.jsx)(`span`,{className:`wm-share`,"aria-hidden":`true`}),(0,a.jsx)(`span`,{children:t})]}));d_.displayName=`WuSharedSurvey`;var f_=(e,t=!1)=>{if(e)return(0,a.jsx)(`span`,{className:u_.icon,"aria-hidden":`true`,children:e});let n=t?`wm-folder-supervised`:`wm-folder`;return(0,a.jsx)(`span`,{className:z(u_.icon,n),"aria-hidden":`true`})},p_=R.default.memo(({children:e,icon:t,isActive:n,isShared:r,className:i,...o})=>(0,a.jsxs)(`button`,{className:z(u_.listItem,n&&u_.listItemActive,i),"aria-selected":n,"data-slot":`survey-select-item`,type:`button`,...o,children:[f_(t,r),(0,a.jsx)(`span`,{className:u_.label,children:e})]}));p_.displayName=`WuSurveyItem`;var m_=R.default.memo(({children:e,className:t,...n})=>(0,a.jsx)(`div`,{className:z(u_.list,t),...n,children:e}));m_.displayName=`WuSurveyList`;var h_=e=>{let{className:t,variant:n=`outlined`,...r}=e;return(0,a.jsx)(`div`,{className:u_.sourceWrapper,"data-slot":`survey-select-source`,children:(0,a.jsx)(wp,{variant:n,showGroupSeparator:!0,className:z(u_.source,t),...r})})};h_.displayName=`WuSurveySource`;var g_=R.default.memo(h_),__=R.default.memo(({Sidebar:e,children:t,className:n,...r})=>(0,a.jsxs)(`div`,{className:z(u_.container,n),role:`region`,"aria-label":`Survey selection interface`,"data-slot":`survey-select`,...r,children:[e&&(0,a.jsx)(`div`,{className:u_.sidebar,role:`complementary`,"aria-label":`Survey sidebar`,"data-slot":`survey-select-sidebar`,children:e}),(0,a.jsx)(`div`,{className:u_.content,"aria-label":`Survey content`,"data-slot":`survey-select-content`,children:t})]}));__.displayName=`WuSurveySelect`;var v_=(0,f.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`}}),y_=R.forwardRef(({className:e,variant:t,size:n,...r},i)=>(0,a.jsx)(w.Root,{ref:i,className:z(v_({variant:t,size:n,className:e})),...r}));y_.displayName=w.Root.displayName;var b_=R.createContext({size:`default`,variant:`default`}),x_=R.forwardRef(({className:e,variant:t,size:n,children:r,...i},o)=>(0,a.jsx)(C.Root,{ref:o,className:z(`wu-flex wu-items-center wu-justify-center wu-gap-1`,e),...i,children:(0,a.jsx)(b_.Provider,{value:{variant:t,size:n},children:r})}));x_.displayName=C.Root.displayName;var S_=R.forwardRef(({className:e,children:t,variant:n,size:r,...i},o)=>{let s=R.useContext(b_);return(0,a.jsx)(C.Item,{ref:o,className:z(v_({variant:s.variant||n,size:s.size||r}),e),...i,children:t})});S_.displayName=C.Item.displayName;var C_=R.default.forwardRef((e,t)=>{let{options:n,value:r,disabled:i,dir:o,onChange:s}=e,c=e=>z(`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`,i&&`wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead`,e===r&&`wu-text-white`,i&&r===e&&`wu-text-gray-lead`,`wu-switcher-icon-tab-item`);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(x_,{ref:t,type:`single`,value:r,onValueChange:s,disabled:i,dir:o,className:z(`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`,i&&`wu-cursor-not-allowed`,`wu-switcher-icon-tab-group`),children:[(0,a.jsx)(`div`,{role:`slider`,className:z(`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`,r===`opt1`&&``,r===`opt2`&&o!==`rtl`&&`wu-translate-x-full`,r===`opt2`&&o===`rtl`&&`-wu-translate-x-full`,i&&`wu-bg-gray-40`,`wu-switcher-icon-tab-slider`)}),(0,a.jsx)(S_,{value:`opt1`,className:c(`opt1`),children:n[0].label}),(0,a.jsx)(S_,{value:`opt2`,className:c(`opt2`),children:n[1].label})]})})});C_.displayName=`_IconTab`;var w_=R.default.forwardRef((e,t)=>{let{options:n,value:r,disabled:i,dir:o,size:s=`md`,onChange:c}=e,l=e=>z(`wu-w-1/2 wu-text-xs wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-font-normal`,i&&`wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead`,s===`sm`&&`wu-h-6 wu-min-w-20`,s===`md`&&`wu-h-8 wu-min-w-28`,s===`lg`&&`wu-h-10 wu-min-w-36`,e===r&&`wu-text-white wu-font-medium`,i&&r===e&&`wu-text-gray-lead`,`wu-switcher-tab-item`);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(x_,{ref:t,type:`single`,value:r,onValueChange:c,disabled:i,dir:o,className:z(`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`,i&&`wu-cursor-not-allowed`,`wu-switcher-tab-group`),children:[(0,a.jsx)(`div`,{role:`slider`,className:z(`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 `,s===`sm`&&`wu-h-6 wu-min-w-20`,s===`md`&&`wu-h-8 wu-min-w-28`,s===`lg`&&`wu-h-10 wu-min-w-36`,r===`opt1`&&``,r===`opt2`&&o!==`rtl`&&`wu-translate-x-full`,r===`opt2`&&o===`rtl`&&`-wu-translate-x-full`,i&&`wu-bg-gray-40`,`wu-switcher-tab-slider`)}),(0,a.jsx)(S_,{value:`opt1`,className:l(`opt1`),children:(0,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})}),(0,a.jsx)(S_,{value:`opt2`,className:l(`opt2`),children:(0,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})})]})})});w_.displayName=`_Tab`;var T_=R.default.forwardRef((e,t)=>{let{options:n,value:r,disabled:i,dir:o,onChange:s}=e,c=e=>z(`wu-p-0 wu-w-fit wu-text-xs wu-text-gray-lead wu-h-fit wu-font-normal`,i&&`wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle`,e===r&&`wu-text-primary wu-font-medium`,i&&r===e&&`wu-text-gray-lead`,`wu-switcher-toggle-item`),l=z(`wu-w-fit wu-gap-2`,i&&`wu-cursor-not-allowed`,`wu-switcher-toggle-group`),u=z(`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`,i&&`wu-border-gray-subtle wu-cursor-not-allowed`,`wu-switcher-toggle-button`),d=z(`wu-w-2 wu-h-2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out`,r===`opt1`&&o!==`rtl`&&`-wu-translate-x-[10px]`,r===`opt1`&&o===`rtl`&&`wu-translate-x-[10px]`,r===`opt2`&&o!==`rtl`&&`wu-translate-x-[10px]`,r===`opt2`&&o===`rtl`&&`-wu-translate-x-[10px]`,i&&`wu-hidden`,`wu-switcher-toggle-knob`);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(x_,{ref:t,type:`single`,value:r,disabled:i,dir:o,className:l,onValueChange:s,children:[(0,a.jsx)(S_,{value:`opt1`,className:c(`opt1`),children:(0,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})}),(0,a.jsx)(`button`,{onClick:()=>s(r===`opt1`?`opt2`:`opt1`),className:u,disabled:i,"aria-label":`knob`,dir:o,children:(0,a.jsx)(`div`,{className:d,role:`knob`,dir:o})}),(0,a.jsx)(S_,{value:`opt2`,className:c(`opt2`),children:(0,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})})]})})});T_.displayName=`_Toggle`;var E_=R.default.forwardRef((e,t)=>{let{type:n,options:r,value:i,disabled:o,dir:s,size:c,onChange:l,toggle:u=!0,...d}=e,[f,p]=R.default.useState(),m=e=>{let t=f;e===``?u&&(t=f===`opt1`?`opt2`:`opt1`):t=e;let n=t===`opt1`?r[0].value:r[1].value;l&&l(n),p(t)};if(R.default.useEffect(()=>{if(!Array.isArray(r)||r.length<2)throw Error(`Options are not sufficient`);p(i===r[0].value?`opt1`:`opt2`)},[r,i]),!Array.isArray(r)||r.length<2)return(0,a.jsx)(a.Fragment,{});switch(n){case`toggle`:return(0,a.jsx)(T_,{...d,ref:t,options:r,value:f||`opt1`,onChange:m,disabled:o,dir:s});case`iconTab`:return(0,a.jsx)(C_,{ref:t,options:r,value:f||`opt1`,onChange:m,disabled:o,dir:s});default:return(0,a.jsx)(w_,{ref:t,options:r,value:f||`opt1`,onChange:m,disabled:o,dir:s,size:c})}});E_.displayName=`WuSwitcher`;var D_=T.Root,O_=R.forwardRef(({className:e,children:t,...n},r)=>(0,a.jsx)(T.List,{className:z(`wu-relative wu-flex`,e),...n,ref:r,children:t}));O_.displayName=T.List.displayName;var k_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(T.Trigger,{ref:n,className:z(`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}));k_.displayName=T.Trigger.displayName;var A_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(T.Content,{ref:n,className:e,...t}));A_.displayName=T.Content.displayName;var j_=({items:e,enableAnimation:t})=>(0,a.jsx)(`div`,{className:z(`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(e=>(0,a.jsx)(A_,{value:e.value,forceMount:t||void 0,className:z(`wu-w-full wu-h-full wu-overflow-y-auto`,t&&`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`,`wu-tab-content`),children:e.Content},e.value))}),M_=e=>{let[t,n]=(0,R.useState)(!1),[r,i]=(0,R.useState)(!1),a=()=>{let t=e.current;t&&(n(t.scrollLeft>0),i(t.scrollLeft+t.clientWidth<t.scrollWidth))};return(0,R.useEffect)(()=>{let t=e.current;return a(),t&&t.addEventListener(`scroll`,a),window.addEventListener(`resize`,a),()=>{t&&t.removeEventListener(`scroll`,a),window.removeEventListener(`resize`,a)}},[e]),{showLeftArrow:t,showRightArrow:r,scrollByTab:t=>{let n=e.current;if(n){let e=(t===`right`?n.clientWidth:-n.clientWidth)*.8;n.scrollBy({left:e,behavior:`smooth`})}}}},N_=(e,t)=>{let[n,r]=(0,R.useState)({width:0,left:0,height:0,top:0}),i=t===`vertical`;return(0,R.useEffect)(()=>{let t=e.current;if(t){let e=()=>{let e=t.querySelector(`[data-state="active"]`);e&&r({width:i?2:e.offsetWidth,left:i?0:e.offsetLeft,height:i?e.offsetHeight:1,top:i?e.offsetTop:0})},n=new MutationObserver(e);return n.observe(t,{attributes:!0,subtree:!0}),e(),()=>{n.disconnect()}}},[e,i]),n},P_=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:i=!1,className:o,dir:s=`ltr`,position:c=`top`})=>{let l=R.default.useRef(null),u=N_(l,`horizontal`),{showLeftArrow:d,showRightArrow:f,scrollByTab:p}=M_(l),[m,h]=R.default.useState(!1),g=()=>p(`left`),_=()=>p(`right`),v=e=>(0,a.jsx)(`div`,{"data-testid":`gradient-overlay-${e}`,className:z(`wu-absolute wu-top-0 wu-h-full wu-w-20 wu-z-10 wu-pointer-events-none`,e===`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`)}),y=(e,t,n)=>{let r=t===`left`;return(0,a.jsx)(`button`,{onClick:e,className:z(`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`,r?`wu-left-0`:`wu-right-0`,n&&`wu-translate-x-0 wu-opacity-100`,!n&&[r?`-wu-translate-x-full`:`wu-translate-x-full`,`wu-opacity-0`]),"aria-label":r?`scroll-left`:`scroll-right`,children:(0,a.jsx)(`span`,{className:z(`wu-text-blue-p wu-text-lg`,r?`wm-keyboard-arrow-left`:`wm-keyboard-arrow-right`)})})};return(0,a.jsxs)(D_,{defaultValue:n||e[0]?.value,value:t,onValueChange:r,orientation:`horizontal`,dir:s,className:z(`wu-relative wu-flex wu-flex-col wu-w-full wu-h-full`,c===`bottom`?`wu-flex-col-reverse`:`wu-flex-col`,o),role:`tabs`,children:[(0,a.jsxs)(`div`,{className:`wu-relative wu-flex wu-overflow-hidden wu-shrink-0 wu-border-b wu-border-gray-200`,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),"aria-label":`tablistWrapper`,children:[d&&m&&v(`left`),y(g,`left`,d&&m),(0,a.jsxs)(O_,{ref:l,className:z(`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(e=>(0,a.jsx)(k_,{value:e.value,children:e.Trigger},e.value)),(0,a.jsx)(`span`,{className:`wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator wu-bottom-0`,style:{width:u.width,left:u.left,height:1.25,bottom:c===`bottom`?void 0:0,top:c===`bottom`?0:void 0}})]}),f&&m&&v(`right`),y(_,`right`,f&&m)]}),(0,a.jsx)(j_,{items:e,enableAnimation:i})]})},F_=e=>{let[t,n]=(0,R.useState)(!1),[r,i]=(0,R.useState)(!1),a=()=>{let t=e.current;t&&(n(t.scrollTop>0),i(t.scrollTop+t.clientHeight<t.scrollHeight))};return(0,R.useEffect)(()=>{let t=e.current;if(t)return a(),t.addEventListener(`scroll`,a),window.addEventListener(`resize`,a),()=>{t.removeEventListener(`scroll`,a),window.removeEventListener(`resize`,a)}},[e]),{showTopArrow:t,showBottomArrow:r,scrollByTab:t=>{let n=e.current;if(n){let e=(t===`down`?n.clientHeight:-n.clientHeight)*.8;n.scrollBy({top:e,behavior:`smooth`})}}}},I_=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:i=!1,className:o,dir:s=`ltr`,position:c=`left`})=>{let l=R.default.useRef(null),u=N_(l,`vertical`),{showTopArrow:d,showBottomArrow:f,scrollByTab:p}=F_(l),[m,h]=R.default.useState(!1),g=()=>p(`up`),_=()=>p(`down`),v=e=>(0,a.jsx)(`div`,{className:z(`wu-absolute wu-left-0 wu-w-full wu-h-12 wu-z-10 wu-pointer-events-none`,e===`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`)}),y=(e,t,n)=>{let r=t===`up`;return(0,a.jsx)(`button`,{onClick:e,className:z(`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`,r?`-wu-top-1`:`-wu-bottom-1`,n&&`wu-translate-y-0 wu-opacity-100`,!n&&[r?`-wu-translate-y-full`:`wu-translate-y-full`,`wu-opacity-0`]),"aria-label":r?`scroll-up`:`scroll-down`,children:(0,a.jsx)(`span`,{className:z(`wu-text-blue-p wu-text-lg`,r?`wm-keyboard-arrow-up`:`wm-keyboard-arrow-down`)})})};return(0,a.jsxs)(D_,{defaultValue:n||e[0]?.value,value:t,onValueChange:r,orientation:`vertical`,dir:s,className:z(`wu-relative wu-h-full wu-w-full wu-flex`,c===`left`?`wu-flex-row`:`wu-flex-row-reverse`,o),role:`tabs`,children:[(0,a.jsxs)(`div`,{className:`wu-relative wu-flex wu-overflow-hidden wu-shrink-0`,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),"aria-label":`tablistWrapper`,children:[d&&m&&v(`top`),y(g,`up`,d&&m),(0,a.jsxs)(O_,{ref:l,className:z(`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(e=>(0,a.jsx)(k_,{value:e.value,children:e.Trigger},e.value)),(0,a.jsx)(`span`,{className:`wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator`,style:{width:2,left:c===`left`?0:void 0,right:c===`right`?0:void 0,height:u.height,top:u.top}})]}),f&&m&&v(`bottom`),y(_,`down`,f&&m)]}),(0,a.jsx)(j_,{items:e,enableAnimation:i})]})},L_=({...e})=>e.orientation===`vertical`?(0,a.jsx)(I_,{...e}):(0,a.jsx)(P_,{...e}),R_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`table`,{ref:n,className:z(`wu-w-full wu-caption-bottom wu-text-sm`,e),...t}));R_.displayName=`Table`;var z_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`thead`,{ref:n,className:z(`[&_tr]:wu-border-b`,e),...t}));z_.displayName=`TableHeader`;var B_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`tbody`,{ref:n,className:z(``,e),...t}));B_.displayName=`TableBody`;var V_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`tfoot`,{ref:n,className:z(`wu-border-t wu-bg-muted/50 wu-font-medium [&>tr]:last:wu-border-b-0`,e),...t}));V_.displayName=`TableFooter`;var H_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`tr`,{ref:n,className:z(`wu-border-b wu-transition-colors wu-hover:wu-bg-muted/50 data-[state=selected]:wu-bg-muted`,e),...t}));H_.displayName=`TableRow`;var U_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`th`,{ref:n,className:z(`wu-px-4 wu-text-left wu-align-middle wu-font-medium wu-text-muted-foreground [&:has([role=checkbox])]:wu-pr-0`,e),...t}));U_.displayName=`TableHead`;var W_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`td`,{ref:n,className:z(`wu-p-4 wu-align-middle [&:has([role=checkbox])]:wu-pr-0`,e),...t}));W_.displayName=`TableCell`;var G_=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`caption`,{ref:n,className:z(`wu-mt-4 wu-text-sm wu-text-gray-subtle wu-font-normal`,e),...t}));G_.displayName=`TableCaption`;function K_(){let e=(0,R.useRef)(null),[t,n]=(0,R.useState)(!1),[r,i]=(0,R.useState)(!1),a=(0,R.useCallback)(()=>{let t=e.current;t&&(n(t.scrollLeft>12),i(t.scrollLeft<t.scrollWidth-t.clientWidth-1))},[]);return(0,R.useEffect)(()=>{a()},[a]),{scrollContainerRef:e,isScrolledLeft:t,isScrolledRight:r,handleScroll:a}}var q_=`expander`;function J_(e,t){return e?[{id:q_,accessorKey:q_,header:``,cell:({row:e})=>{let t=e.getIsExpanded();return(0,a.jsx)(`button`,{type:`button`,className:`wu-inline-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-text-[10px]`,onClick:()=>e.toggleExpanded(),"aria-label":t?`Collapse row`:`Expand row`,children:(0,a.jsx)(`span`,{className:z(`wm-arrow-forward-ios wu-transition-all`,t?`wu-rotate-90`:``)})})},enableSorting:!1,enableColumnFilter:!1,enableGlobalFilter:!1,enableHiding:!1,size:48},...t]:t}function Y_(e,t){return t.map(e=>e.columnDef?.expandableRowContent).find(e=>e)?.call(null,e)}function X_(e){let t=new Map,n=0;for(let r=0;r<e.length;r++){let i=e[r];if(i.columnDef.sticky!==`left`)continue;let a=e[r+1];t.set(i.id,{sticky:`left`,offset:n,isStickyEdge:!a||a.columnDef.sticky!==`left`}),n+=i.getSize()}let r=0;for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.columnDef.sticky!==`right`)continue;let a=e[n-1];t.set(i.id,{sticky:`right`,offset:r,isStickyEdge:!a||a.columnDef.sticky!==`right`}),r+=i.getSize()}return t}function Z_(e,t,n,r){return t?e===`left`&&n?(0,a.jsx)(`div`,{style:{position:`absolute`,top:0,right:-12,bottom:0,width:12,background:`linear-gradient(to right, rgba(115,115,115,0.12), transparent)`,pointerEvents:`none`}}):e===`right`&&r?(0,a.jsx)(`div`,{style:{position:`absolute`,top:0,left:-12,bottom:0,width:12,background:`linear-gradient(to left, rgba(115,115,115,0.12), transparent)`,pointerEvents:`none`}}):null:null}function Q_(e,t,n){return e===!0&&(!t||n>t)}function $_(e,t){let n=(0,E.flexRender)(t.cell,e.getContext());return e.column.id===`actions`?(0,a.jsx)(`div`,{className:`wu-opacity-0 wu-transition-opacity wu-duration-150 wu-ease-in-out group-hover:wu-opacity-100`,children:n}):n}var ev=({columns:e,rowSelection:t})=>{let n=t?.isEnabled??!1,r=t?.size??48,{onRowSelect:i,rowUniqueKey:o,isRowDisabled:s,hideSelectAll:c}=t||{},l=(0,R.useCallback)(e=>t=>{i?.(t?e:[])},[i]);return{finalColumns:(0,R.useMemo)(()=>n?[{id:`select`,header:({table:e})=>{let t=l(e.getRowModel().rows.map(e=>e.original).filter(e=>!s?.(e)));return c?(0,a.jsx)(`div`,{}):(0,a.jsx)(Xr,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:n=>{e.toggleAllRowsSelected(!!n),t(!!n)},"aria-label":`Select all`,"data-testid":e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected()?`select-partial`:`select-all`})},cell:({row:e})=>{let t=s?.(e.original)??!1;return(0,a.jsx)(Xr,{checked:e.getIsSelected(),disabled:t,onChange:n=>{t||e.toggleSelected(!!n)},"aria-label":String(e.original[o])})},filterable:!1,accessorKey:`select`,size:r},...e]:e,[e,n,l,s,c])}};function tv({data:e,columns:t,rowSelection:n,isRowExpandable:r}){let[i,a]=(0,R.useState)({}),{finalColumns:o}=ev({columns:t,rowSelection:n}),s=(0,R.useMemo)(()=>{if(!n?.isEnabled)return{};let t={};for(let r of n.selectedRows){let i=e.findIndex(e=>e[n.rowUniqueKey]===r[n.rowUniqueKey]);i!==-1&&(t[i]=!0)}return t},[e,n]);return{finalColumns:o,rowSelectionState:s,sortableColumns:(0,R.useMemo)(()=>o.filter(e=>e.enableSorting).map(e=>e.accessorKey),[o]),selectedRowCount:n?.selectedRows?.length??0,columnsWithExpand:(0,R.useMemo)(()=>J_(r,o),[o,r]),expanded:i,setExpanded:a,handleRowSelectionChange:t=>{let r=typeof t==`function`?t(s):t,i=[],a=n?.isRowDisabled;for(let t in r){if(!r[t])continue;let n=e[Number(t)];n&&(a?.(n)||i.push(n))}n?.onRowSelect(i)}}}var nv=e=>z(`wu-group wu-border-b wu-border-black/[12%] [--wu-row-overlay:transparent]`,`data-[state=selected]:[--wu-row-overlay:rgb(var(--wu-blue-p)/0.08)]`,!e&&[`hover:[--wu-row-overlay:rgba(0,0,0,0.02)]`,`data-[state=selected]:hover:[--wu-row-overlay:rgb(var(--wu-blue-p)/0.16)]`]),rv=(e=`default`,t)=>z(`wu-py-0 wu-font-light wu-text-xs wu-bg-white`,`[background-image:linear-gradient(var(--wu-row-overlay),var(--wu-row-overlay))]`,e===`compact`?`wu-h-8`:`wu-h-10`,t===`right`&&`wu-text-right`,t===`center`&&`wu-text-center`,t===`left`&&`wu-text-left`),iv=(e=`default`)=>e===`compact`?`wu-h-8`:`wu-h-10`,av=e=>z({"wu-text-right":e===`right`,"wu-text-center":e===`center`,"wu-text-left":e===`left`}),ov=e=>z({"wu-justify-end":e===`right`,"wu-justify-center":e===`center`}),sv=(e,t)=>z(`wu-absolute -wu-bottom-[13px] wu-left-0 wm-arrow-drop-up wu-text-xl`,e&&`wu-hidden`,!t&&`-wu-bottom-[10px]`),cv=(e,t)=>z(`wu-absolute -wu-top-[15px] wu-left-0 wm-arrow-drop-down wu-text-xl`,e&&`wu-hidden`,!t&&`-wu-top-[11px]`),lv=({table:e,size:t,NoDataContent:n,isLoading:r,CustomLoader:i,isRowDisabled:o,isRowExpandable:s,isScrolledLeft:c,isScrolledRight:l})=>{let u=e.getVisibleLeafColumns(),d=u.length,f=e.getRowModel().rows,p=X_(u);return r?(0,a.jsx)(B_,{children:(0,a.jsx)(H_,{children:(0,a.jsx)(W_,{colSpan:d,className:`wu-text-center wu-h-[35vh] wu-loader-container`,children:i??(0,a.jsx)(ve,{className:`wu-w-full`})})})}):f.length?(0,a.jsx)(B_,{children:f.flatMap((n,r)=>{let i=o?.(n.original)??!1,u=n.getIsSelected(),f=n.getIsExpanded(),m=(0,a.jsx)(H_,{"data-disabled":i,"data-state":u&&`selected`,className:nv(i),"data-expanded":f,children:n.getVisibleCells().map((e,n)=>{let r=e.column.columnDef,i=p.get(e.column.id);return(0,a.jsxs)(W_,{className:z(rv(t,r.cellAlign),i&&`wu-sticky wu-z-[1]`),style:{width:`${e.column.getSize()}px`,...i&&{[i.sticky]:i.offset}},children:[$_(e,r),Z_(i?.sticky,i?.isStickyEdge??!1,c,l)]},`${e.id}-${n}`)})},`${n.id}-${r}`),h=s&&f?Y_(n,e.getVisibleLeafColumns()):null;return h?[m,(0,a.jsx)(H_,{"data-expanded":`true`,"data-state":u&&`selected`,children:(0,a.jsx)(W_,{colSpan:d,children:h})},`${n.id}-expanded-${r}`)]:[m]})}):(0,a.jsx)(B_,{children:(0,a.jsx)(H_,{children:(0,a.jsx)(W_,{colSpan:d,children:n})})})},uv=({table:e,sortableColumns:t,manual:n=!1,onSort:r,size:i,isRowSelected:o,HeaderAction:s,isStickyHeader:c,asVirtualContent:l=!1,isRowExpandable:u,isScrolledLeft:d,isScrolledRight:f})=>{let p=i===`compact`?`wu-h-8`:`wu-h-10`,m=e.getVisibleLeafColumns(),h=X_(m),g=e=>{let{id:i,columnDef:o,getIsSorted:s,toggleSorting:c}=e.column,l=o.headerAlign,u=(0,E.flexRender)(o.header,e.getContext());if(!t.includes(i))return u;let d=s(),f=d===`asc`,p=d===`desc`;return(0,a.jsxs)(`button`,{onClick:()=>{n?r?.({id:i,desc:e.column.getIsSorted()===`asc`}):c(e.column.getIsSorted()===`asc`)},"aria-label":`Sort by ${typeof o.header==`string`?o.header:i}`,className:z(`wu-flex wu-items-center wu-gap-1 wu-w-full`,ov(l)),children:[u,(0,a.jsxs)(`div`,{className:`wu-relative wu-flex-shrink-0 wu-w-4`,children:[(0,a.jsx)(`span`,{className:cv(f,!!d)}),(0,a.jsx)(`span`,{className:sv(p,!!d)})]})]})},_=e=>{let t=e.column.id===`actions`,n=h.get(e.column.id),r=n?{[n.sticky]:n.offset}:{};return t?(0,a.jsx)(U_,{colSpan:e.colSpan,className:z(`wu-text-xs wu-font-medium`,n&&`wu-sticky wu-z-[2] wu-bg-[#EEEEEE]`),style:{width:`${e.getSize()}px`,...r},children:Z_(n?.sticky,n?.isStickyEdge??!1,d,f)},e.id):(0,a.jsxs)(U_,{colSpan:e.colSpan,className:z(`wu-text-xs wu-font-medium wu-bg-[#EEEEEE]`,n?`wu-sticky wu-z-[2]`:`wu-relative wu-z-0`,av(e.column.columnDef.headerAlign)),style:{width:`${e.getSize()}px`,...r},children:[g(e),Z_(n?.sticky,n?.isStickyEdge??!1,d,f)]},e.id)},v=()=>e.getHeaderGroups().map(e=>(0,a.jsx)(H_,{className:`wu-relative`,children:e.headers.map(_)},e.id)),y=()=>(0,a.jsxs)(`div`,{className:z(`wu-flex wu-items-center wu-border-b wu-border-t wu-bg-gray-20`,p),children:[(0,a.jsx)(`div`,{className:z(`wu-flex wu-items-center wu-px-4`),style:{width:m[0]?.getSize(),marginLeft:u?48:void 0},children:(0,a.jsx)(Xr,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:t=>e.toggleAllRowsSelected(!!t),"aria-label":`Select all`,"data-testid":`select-all-header-checkbox`})}),(0,a.jsx)(`div`,{className:`wu-flex-1 wu-flex wu-pr-4`,children:s})]}),b=o&&s;return l?(0,a.jsxs)(H_,{className:`wu-relative`,children:[(e.getHeaderGroups()[0]?.headers??[]).map(_),b&&(0,a.jsx)(U_,{colSpan:m.length,className:`wu-p-0 wu-absolute wu-top-0 wu-left-0 wu-right-0 wu-z-10`,children:y()})]}):(0,a.jsxs)(z_,{className:z(`wu-border-t wu-border-black/[12%] wu-bg-gray-20 wu-relative`,c&&`wu-sticky wu-top-[-.5px] wu-z-10`,p),children:[v(),b&&(0,a.jsx)(`div`,{className:z(`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`,p),children:y()})]})},dv=R.default.forwardRef((e,t)=>(0,a.jsx)(B_,{...e,ref:t}));dv.displayName=`TableBodyComponent`;var fv=({table:e,size:t,isRowDisabled:n,containerHeight:r=600,sortableColumns:i,HeaderAction:o,isRowSelected:s,manual:c=!1,onSort:l,tableLayout:u=`auto`,isScrolledLeft:d,isScrolledRight:f,isRowExpandable:p,hideHeader:m=!1})=>{let h=e.getRowModel().rows,g=e.getVisibleLeafColumns(),v=X_(g),y=[];for(let e of h)y.push({type:`row`,row:e}),p&&e.getIsExpanded()&&y.push({type:`expanded`,row:e});return(0,a.jsx)(`div`,{className:`wu-w-full`,children:(0,a.jsx)(_.TableVirtuoso,{style:{height:r},totalCount:y.length,fixedHeaderContent:m?void 0:()=>(0,a.jsx)(uv,{table:e,sortableColumns:i,manual:c,onSort:l,size:t,isRowSelected:s,HeaderAction:o,asVirtualContent:!0,isScrolledLeft:d,isScrolledRight:f}),itemContent:n=>{let r=y[n];if(!r)return null;if(r.type===`expanded`){let t=Y_(r.row,e.getVisibleLeafColumns());return(0,a.jsx)(W_,{colSpan:g.length,children:t})}let i=r.row;return(0,a.jsx)(a.Fragment,{children:i.getVisibleCells().map((e,n)=>{let r=e.column.columnDef,i=v.get(e.column.id);return(0,a.jsxs)(W_,{className:z(rv(t,r.cellAlign),i&&`wu-sticky wu-z-[1]`),style:i?{[i.sticky]:i.offset}:void 0,children:[$_(e,r),Z_(i?.sticky,i?.isStickyEdge??!1,d,f)]},`${e.id}-${n}`)})})},components:{Table:({style:e,...t})=>(0,a.jsxs)(`table`,{...t,style:{...e,width:`100%`,borderCollapse:`collapse`,tableLayout:u},children:[(0,a.jsx)(`colgroup`,{children:g.map(e=>(0,a.jsx)(`col`,{style:{width:`${e.getSize()}px`}},e.id))}),t.children]}),TableBody:dv,TableHead:e=>(0,a.jsx)(z_,{...e,className:z(`wu-border-t wu-border-black/[12%] wu-bg-gray-20`,iv(t),e.className)}),TableRow:({...e})=>{let t=y[e[`data-index`]],r=t?.row,i=r?n?.(r.original)??!1:!1,o=r?.getIsSelected()??!1;return(0,a.jsx)(H_,{...e,"data-disabled":i,"data-state":o&&`selected`,"data-expanded":t?.type===`expanded`?`true`:void 0,className:nv(i)})}}})})},pv=(0,f.cva)(``,{variants:{variant:{striped:`[&_tr:nth-child(even):not([data-expanded])_td]:wu-bg-zinc-50 [&_tr:nth-child(odd)[data-expanded]:not([data-state="selected"])_td]:wu-bg-zinc-50`,unstyled:``,bordered:`wu-border-collapse wu-border wu-border-black/[12%] [&_th]:wu-border [&_td]:wu-border`}}}),mv=({data:e,columns:t,isLoading:n=!1,variant:r=`unstyled`,sort:i,size:o,rowSelection:s,HeaderAction:c,NoDataContent:l,stickyHeader:u=!1,CustomLoader:d,caption:f,virtualization:p,isRowExpandable:m,hideHeader:h=!1,tableLayout:g=`fixed`,style:_,className:v,...y})=>{let[b,x]=R.default.useState(()=>i?.defaultSort??null),{scrollContainerRef:S,isScrolledLeft:C,isScrolledRight:w,handleScroll:T}=K_(),{rowSelectionState:D,sortableColumns:O,selectedRowCount:k,columnsWithExpand:A,expanded:j,setExpanded:M,handleRowSelectionChange:N}=tv({data:e,columns:t,rowSelection:s,isRowExpandable:m}),P=(0,E.useReactTable)({data:e,columns:A,getCoreRowModel:(0,E.getCoreRowModel)(),getPaginationRowModel:(0,E.getPaginationRowModel)(),getExpandedRowModel:m?(0,E.getExpandedRowModel)():void 0,manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:s?.isRowDisabled?e=>!s.isRowDisabled(e.original):!0,enableExpanding:!!m,state:{sorting:b?[{id:b.id,desc:b.desc}]:[],...s?.isEnabled?{rowSelection:D}:{},...m?{expanded:j}:{}},onRowSelectionChange:N,...m?{onExpandedChange:M}:{}}),F=Q_(p?.enabled,p?.threshold,e.length),I=p?.maxHeight??600;return(0,a.jsx)(`div`,{className:z(`wu-text-gray-lead wu-table-container wu-relative`,!F&&u&&`wu-h-full`),children:F?(0,a.jsxs)(`div`,{ref:S,onScroll:T,className:z(`wu-overflow-x-auto wu-w-full`,pv({variant:r})),children:[f&&(0,a.jsx)(G_,{className:`wu-font-light`,children:f}),n?(0,a.jsx)(`div`,{className:`wu-text-center wu-h-[35vh] wu-flex wu-items-center wu-justify-center`,children:d??(0,a.jsx)(ve,{className:`wu-w-full`})}):P.getRowModel().rows?.length?(0,a.jsx)(fv,{table:P,size:o,isRowDisabled:s?.isRowDisabled,containerHeight:I,sortableColumns:O,HeaderAction:c,isRowSelected:k>0,manual:!0,onSort:e=>{x(e),i?.onSort(e)},tableLayout:g,isScrolledLeft:C,isScrolledRight:w,hideHeader:h}):(0,a.jsx)(`div`,{className:`wu-p-4 wu-text-center`,children:l})]}):(0,a.jsx)(`div`,{ref:S,onScroll:T,className:z(`wu-overflow-x-auto wu-w-full`,u&&`wu-overflow-y-auto wu-h-full`),children:(0,a.jsxs)(R_,{...y,className:z(`wu-w-full`,pv({variant:r}),v),style:{tableLayout:g,..._},children:[f&&(0,a.jsx)(G_,{className:`wu-font-light`,children:f}),!h&&(0,a.jsx)(uv,{table:P,sortableColumns:O,manual:!0,onSort:e=>{x(e),i?.onSort(e)},size:o,HeaderAction:c,isRowSelected:k>0,isStickyHeader:u,isRowExpandable:m,isScrolledLeft:C,isScrolledRight:w}),(0,a.jsx)(lv,{table:P,size:o,NoDataContent:l,CustomLoader:d,isLoading:n,isRowDisabled:s?.isRowDisabled,isRowExpandable:m,isScrolledLeft:C,isScrolledRight:w})]})})})},hv=({data:e,columns:t,variant:n=`unstyled`,size:r=`default`,sort:i,filterText:o,pagination:s,stickyHeader:c,HeaderAction:l,CustomLoader:u,NoDataContent:d,isLoading:f,caption:p,rowSelection:m,isRowExpandable:h,hideHeader:g=!1,virtualization:_,tableLayout:v=`fixed`,style:y,className:b,...x})=>{let[S,C]=R.default.useState(()=>i?.defaultSort?[{id:i.defaultSort.id,desc:i.defaultSort.desc}]:[]),[w,T]=(0,R.useState)([]),[D,O]=(0,R.useState)(s?.pageIndex??0),{scrollContainerRef:k,isScrolledLeft:A,isScrolledRight:j,handleScroll:M}=K_(),{finalColumns:N,rowSelectionState:P,sortableColumns:F,selectedRowCount:I,columnsWithExpand:ee,expanded:L,setExpanded:te,handleRowSelectionChange:ne}=tv({data:e,columns:t,rowSelection:m,isRowExpandable:h}),B=(0,R.useMemo)(()=>N.filter(e=>e.filterable).map(e=>e.accessorKey),[N]),V=(0,E.useReactTable)({data:e,columns:ee,getCoreRowModel:(0,E.getCoreRowModel)(),getFilteredRowModel:(0,E.getFilteredRowModel)(),getSortedRowModel:(0,E.getSortedRowModel)(),getPaginationRowModel:s?(0,E.getPaginationRowModel)():void 0,getExpandedRowModel:h?(0,E.getExpandedRowModel)():void 0,enableRowSelection:m?.isRowDisabled?e=>!m.isRowDisabled(e.original):!0,enableExpanding:!!h,state:{sorting:S,columnFilters:w,...s?{pagination:s}:{},...m?.isEnabled?{rowSelection:P}:{},...h?{expanded:L}:{}},onSortingChange:C,onColumnFiltersChange:T,onRowSelectionChange:ne,...h?{onExpandedChange:te}:{}});(0,R.useEffect)(()=>{B.forEach(e=>{V.getColumn(e)?.setFilterValue(o)})},[o,B,V]),(0,R.useEffect)(()=>{s&&s?.pageIndex!==D&&(m?.onRowSelect([]),V.resetRowSelection(),O(s.pageIndex))},[s?.pageIndex]);let re=Q_(_?.enabled,_?.threshold,e.length),ie=_?.maxHeight??600;return(0,a.jsx)(`div`,{className:z(`wu-text-gray-lead wu-table-container wu-relative`,!re&&c&&`wu-h-full`),children:re?(0,a.jsxs)(`div`,{ref:k,onScroll:M,className:z(`wu-overflow-x-auto wu-w-full`,pv({variant:n})),children:[p&&(0,a.jsx)(G_,{children:p}),f?(0,a.jsx)(`div`,{className:`wu-text-center wu-h-[35vh] wu-flex wu-items-center wu-justify-center`,children:u??(0,a.jsx)(ve,{className:`wu-w-full`})}):V.getRowModel().rows?.length?(0,a.jsx)(fv,{table:V,size:r,isRowDisabled:m?.isRowDisabled,containerHeight:ie,sortableColumns:F,HeaderAction:l,isRowSelected:I>0,tableLayout:v,isScrolledLeft:A,isScrolledRight:j,isRowExpandable:h,hideHeader:g}):(0,a.jsx)(`div`,{className:`wu-p-4 wu-text-center`,children:d})]}):(0,a.jsx)(`div`,{ref:k,onScroll:M,className:z(`wu-overflow-x-auto wu-w-full`,c&&`wu-overflow-y-auto wu-h-full`),children:(0,a.jsxs)(R_,{...x,className:z(`wu-table-${v}`,`wu-w-full`,pv({variant:n}),b),style:{tableLayout:v,...y},children:[p&&(0,a.jsx)(G_,{children:p}),!g&&(0,a.jsx)(uv,{table:V,sortableColumns:F,size:r,HeaderAction:l,isRowSelected:I>0,isStickyHeader:c,isRowExpandable:h,isScrolledLeft:A,isScrolledRight:j}),(0,a.jsx)(lv,{table:V,size:r,NoDataContent:d,CustomLoader:u,isLoading:f,isRowDisabled:m?.isRowDisabled,isRowExpandable:h,isScrolledLeft:A,isScrolledRight:j})]})})})},gv=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`textarea`,{className:z(`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}));gv.displayName=`Textarea`;var _v=R.default.forwardRef((e,t)=>{let{Label:n,id:r=V(),variant:i=`flat`,readonly:o,maxLength:s,labelPosition:c=`top`,...l}=e,u=e=>{l.onChange&&l.onChange(e)};return(0,a.jsxs)(`div`,{className:z(re(c),`wu-flex wu-textarea-container`),dir:l.dir,children:[(0,a.jsx)(gv,{...l,ref:t,id:r,className:z(`wu-peer wu-rounded-t-sm`,i===`outlined`?`wu-border wu-border-gray-subtle`:``,l.className),onChange:u,readOnly:o,maxLength:s}),n&&(0,a.jsx)(K,{htmlFor:r,className:`wu-textarea-label`,children:n})]})});_v.displayName=`WuTextarea`;function vv(e){return typeof e==`string`&&e.includes(`T`)?(0,c.format)((0,c.parseISO)(e),`HH:mm`):typeof e==`string`&&/^\d{2}:\d{2}:\d{2}$/.test(e)?(0,c.format)((0,c.parse)(e,`HH:mm:ss`,new Date),`HH:mm`):typeof e==`string`&&/^\d{2}:\d{2}$/.test(e)?e:`00:00`}var yv=[`12`,...Array.from({length:11},(e,t)=>String(t+1).padStart(2,`0`))],bv=Array.from({length:60},(e,t)=>String(t).padStart(2,`0`)),xv=[`am`,`pm`];function Sv(e){return Array(50).fill(e).flat()}function Cv(e,t){let n=e.indexOf(t);return[...e.slice(n),...e.slice(0,n)]}function wv(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 Tv(e){let t=Number(e),n=t>=12?`pm`:`am`,r=t%12==0?12:t%12;return{hour:String(r),meridiem:n}}var Ev=({value:e,isSelected:t,onClick:n})=>(0,a.jsx)(`div`,{onClick:n,className:z(`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}),Dv=({values:e,selectedValue:t,scrollRef:n,onSelect:r,repeatItems:i=!0,className:o})=>(0,a.jsx)(`div`,{ref:n,className:z(`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:(i?Sv(e):e).map((e,n)=>(0,a.jsx)(Ev,{value:e,isSelected:e===t,onClick:()=>r(e)},`${e}-${n}`))});function Ov(e,t,n,r){return{rotatedHours:(0,R.useMemo)(()=>e?Cv(yv,t.padStart(2,`0`)):yv,[e]),rotatedMinutes:(0,R.useMemo)(()=>e?Cv(bv,n.padStart(2,`0`)):bv,[e]),rotatedMeridiem:(0,R.useMemo)(()=>e?Cv(xv,r):xv,[e])}}function kv(e,t,n){(0,R.useEffect)(()=>{function r(e){if(e){let t=e.scrollHeight/50;e.scrollTop=25*t;let n=()=>{let{scrollTop:n}=e,r=Math.round(n/t);(r<=1||r>=48)&&(e.scrollTop=25*t)};return e.addEventListener(`scroll`,n),()=>{e.removeEventListener(`scroll`,n)}}}if(!e)return;let i=r(t.current),a=r(n.current);return()=>{i?.(),a?.()}},[e,t,n])}var Av=({className:e,time:t,Label:n,labelPosition:r,dir:i,...o})=>{let[s,c]=(0,R.useState)(!1),[l,u]=(0,R.useState)(``),d=(0,R.useRef)(null),f=(0,R.useRef)(null),p=(0,R.useRef)(null),m=(0,R.useRef)(null),[h,g]=(0,R.useState)(`12`),[_,v]=(0,R.useState)(`00`),[y,b]=(0,R.useState)(`am`);R.default.useEffect(()=>{if(!t){u(``),g(`12`),v(`00`),b(`am`),d.current&&(d.current.value=``);return}let e=vv(t);u(e);let[n,r]=e.split(`:`),{hour:i,meridiem:a}=Tv(n);g(i),v(r),b(a),d.current&&(d.current.value=e)},[t]),R.default.useEffect(()=>{let e=e=>{f.current&&!f.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),kv(s,p,m);let{rotatedHours:x,rotatedMinutes:S,rotatedMeridiem:C}=Ov(s,h,_,y),w=(0,R.useCallback)((e,t,n)=>{let r=e??h,i=t??_,a=n??y;g(r),v(i),b(a),u(`${wv(r,a)}:${i}`)},[h,_,y]);return(0,a.jsxs)(`div`,{className:z(`wu-flex wu-gap-1 wu-relative wu-w-fit wu-flex-col`,(r===`right`||r===`left`)&&`wu-items-center`,r===`left`&&`wu-flex-row`,r===`right`&&`wu-flex-row-reverse`,`wu-input-wrapper`),dir:i,children:[n&&(0,a.jsx)(K,{htmlFor:`time-picker`,className:`wu-timepicker-label`,children:n}),(0,a.jsxs)(`div`,{className:z(`relative inline-block`),ref:f,dir:i,children:[(0,a.jsx)(Mr,{ref:d,type:`time`,value:l,variant:`flat`,role:`textbox`,onChange:e=>{u(e.target.value);let[t,n]=e.target.value.split(`:`),{hour:r,meridiem:i}=Tv(t);g(r),v(n),b(i)},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:(0,a.jsx)(Pe,{icon:`wm-schedule`,className:z(`wu-text-base`,o.disabled&&`wu-text-lead/50 wu-pointer-events-none wu-opacity-50`),onClick:()=>c(e=>!e),"data-testid":`wu-timepicker-icon`}),iconPosition:`right`,dir:i,...o}),(0,a.jsx)(`style`,{children:`
19
19
  input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
20
- `}),i&&a.jsxs("div",{className:h("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(Ya,{values:N,selectedValue:b.padStart(2,"0"),scrollRef:m,onSelect:I=>T(I,y),className:"wu-time-hour-picker"}),a.jsx(Ya,{values:S,selectedValue:y.padStart(2,"0"),scrollRef:p,onSelect:I=>T(b,I),className:"wu-time-minute-picker"}),a.jsx(Ya,{values:M,selectedValue:v,onSelect:I=>T(void 0,void 0,I),className:"wu-time-meridiem-picker",repeatItems:!1})]})]})]})};vd.displayName="WuTimePicker";const Mv=1,kv=1e6;let Xa=0;function Dv(){return Xa=(Xa+1)%Number.MAX_SAFE_INTEGER,Xa.toString()}const Za=new Map,xd=e=>{if(Za.has(e))return;const t=setTimeout(()=>{Za.delete(e),In({type:"REMOVE_TOAST",toastId:e})},kv);Za.set(e,t)},Av=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Mv)};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?xd(n):e.toasts.forEach(r=>{xd(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},kr=[];let Dr={toasts:[]};function In(e){Dr=Av(Dr,e),kr.forEach(t=>{t(Dr)})}function Nd({...e}){const t=Dv(),n=s=>In({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>In({type:"DISMISS_TOAST",toastId:t});return In({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function _v(){const[e,t]=f.useState(Dr);return f.useEffect(()=>(kr.push(t),()=>{const n=kr.indexOf(t);n>-1&&kr.splice(n,1)}),[e]),{...e,toast:Nd,dismiss:n=>In({type:"DISMISS_TOAST",toastId:n})}}const Pv=()=>({showToast:({message:t,variant:n,duration:r,position:s})=>Nd({description:t,variant:n,duration:r,position:s})}),Vv=Ee.Provider,Ov=Be.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"}}),Sd=E.forwardRef(({className:e,position:t,...n},r)=>a.jsx(Ee.Viewport,{ref:r,className:h(Ov({position:t}),e),...n}));Sd.displayName=Ee.Viewport.displayName;const Lv=Be.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"}}),Cd=E.forwardRef(({className:e,variant:t,position:n,...r},s)=>a.jsx(Ee.Root,{ref:s,className:h(Lv({variant:t,position:n}),e),...r}));Cd.displayName=Ee.Root.displayName;const Fv=E.forwardRef(({className:e,...t},n)=>a.jsx(Ee.Action,{ref:n,className:h("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}));Fv.displayName=Ee.Action.displayName;const Td=E.forwardRef(({className:e,...t},n)=>a.jsx(Ee.Close,{ref:n,className:h("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"})}));Td.displayName=Ee.Close.displayName;const Ed=E.forwardRef(({className:e,...t},n)=>a.jsx(Ee.Title,{ref:n,className:h("wu-text-sm wu-font-semibold",e),...t}));Ed.displayName=Ee.Title.displayName;const Id=E.forwardRef(({className:e,...t},n)=>a.jsx(Ee.Description,{ref:n,className:h("wu-text-sm wu-opacity-90",e),...t}));Id.displayName=Ee.Description.displayName;function Wv(){const{toasts:e}=_v(),t=e.reduce((n,r)=>{const s=r.position||"top";return n[s]||(n[s]=[]),n[s].push(r),n},{});return a.jsx(Vv,{children:Object.entries(t).map(([n,r])=>a.jsx(Sd,{position:n,children:r.map(function({id:s,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(Cd,{variant:l||"success",position:d,...c,children:[a.jsxs("div",{className:"wu-grid wu-gap-1",children:[o&&a.jsx(Ed,{children:o}),i&&a.jsxs(Id,{className:"wu-flex wu-items-center wu-gap-3 wu-pr-6",children:[a.jsx(Oe,{icon:w[l||"success"],className:"wu-text-xl"}),i]})]}),u,a.jsx(Td,{})]},s)})},n))})}const Bv=()=>a.jsx(Wv,{}),Md=E.forwardRef(({className:e,dir:t,...n},r)=>a.jsx(Wr.Root,{className:h("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:r,children:a.jsx(Wr.Thumb,{className:h("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")})}));Md.displayName=Wr.Root.displayName;const kd=f.forwardRef((e,t)=>{const{Label:n,labelPosition:r="right",onChange:s,className:o,dir:i,disabled:u,id:l=$r(),...d}=e;return f.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:h($v({labelPosition:r}),"wu-toggle-container"),dir:i,children:[a.jsx(Md,{...d,id:l,disabled:u,ref:t,onCheckedChange:s,className:h("wu-peer",o),dir:i}),a.jsx(Me,{htmlFor:l,className:"wu-toggle-label",children:n})]})});kd.displayName="WuToggle";const $v=Be.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"}}}),Ar=f.createContext(null),qv=()=>{const e=f.useContext(Ar);if(!e)throw new Error("useTranslation must be used within a WuTranslationProvider");return e.useTranslation()},Hv=()=>{const e=f.useContext(Ar);if(!e)throw new Error("useLoadTranslationsFunction must be used within a WuTranslationProvider");return e},zv=({children:e})=>{const[t,n]=f.useState({}),[r,s]=f.useState({}),o=f.useCallback(async(d,c)=>{try{const m=await(await fetch(d)).json();n(m)}catch(w){console.error("Failed to load translations:",w),c&&n(c)}c&&s(c)},[]),i=f.useCallback(d=>{s(d)},[]),u=f.useCallback(()=>({t:(c,w)=>t[c]?t[c]:r[c]?r[c]:w||c}),[t,r]),l={loadTranslations:o,setFallbackTranslations:i,useTranslation:u};return a.jsx(Ar.Provider,{value:l,children:e})},Uv={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"}};let Dd={};const _r=e=>{Dd=e},jv=e=>Dd[e]??e,Ad=f.createContext(null),_d=()=>{const e=f.useContext(Ad);if(!e)throw new Error("[WuTranslateProvider] Must be used within a provider.");return e},Pd=e=>e.name==="AbortError",Gv=({children:e,defaultLocale:t="en",baseApi:n="https://admin2.questionpro.com/cs/api/gad/translate",keys:r="/wick-ui-i18n.json"})=>{const[s,o]=f.useState(t),[i,u]=f.useState({}),[l,d]=f.useState(!0),c=f.useRef(!1),w=f.useCallback(p=>{c.current=!0,o(p)},[]);f.useEffect(()=>{c.current||o(t)},[t]),f.useEffect(()=>{const p=new AbortController;return(async()=>{d(!0);try{const g=await fetch(r,{signal:p.signal});if(!g.ok)throw new Error("Failed to fetch translation keys");const y=await g.json();if(s==="en"){_r(y),u(y);return}try{const x=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keys:y,code:s}),signal:p.signal});if(!x.ok)throw new Error("Failed to fetch translations");const{data:v}=await x.json();_r(v),u(v)}catch(x){if(Pd(x))return;console.error("[WuTranslateProvider] Translation fetch failed:",x),_r(y),u(y)}}catch(g){if(Pd(g))return;console.error("[WuTranslateProvider] Keys fetch failed:",g),_r({}),u({})}finally{p.signal.aborted||d(!1)}})(),()=>{p.abort()}},[s,n,r]);const m=f.useMemo(()=>({dictionary:i,locale:s,setLocale:w,isLoading:l}),[i,s,l,w]);return a.jsx(Ad.Provider,{value:m,children:e})},Vd=f.memo(({__i18nKey:e})=>{const{dictionary:t}=_d();return a.jsx(a.Fragment,{children:t[e]??e})});Vd.displayName="WuTranslate",typeof window<"u"&&(window.wickUiVersion="1.48.0",window.wickUiIcon="9.1.0",window.wickUiEditor="0.14.1"),Object.defineProperty(k,"useContext",{enumerable:!0,get:()=>f.useContext}),k.CHART_COLOR_SYSTEM=Uv,k.WuAccordion=ew,k.WuActivityLog=rw,k.WuAppHeader=Tw,k.WuAppHeaderAccount=io,k.WuAppHeaderBar=fo,k.WuAppHeaderHelp=uo,k.WuAppHeaderMenu=wo,k.WuAppHeaderSearch=Sw,k.WuButton=Ie,k.WuCalender=Jr,k.WuCard=Ro,k.WuCardFooter=ti,k.WuCardHeader=ei,k.WuCheckbox=qe,k.WuChip=ri,k.WuCombobox=Uf,k.WuCopyToClipboard=jf,k.WuDataTable=vv,k.WuDatePicker=Aw,k.WuDateRangePicker=Vf,k.WuDisplay=hw,k.WuDrawer=Qf,k.WuDrawerClose=Rf,k.WuDrilldown=tb,k.WuFooter=Sl,k.WuFormGroup=Dw,k.WuHeading=fw,k.WuHelpButton=Cl,k.WuIcon=Oe,k.WuInput=Re,k.WuInputError=Iw,k.WuInputHint=Mw,k.WuLabel=Me,k.WuListbox=El,k.WuLoader=ct,k.WuMenu=ya,k.WuMenuCheckboxItem=jg,k.WuMenuIcon=va,k.WuMenuItem=hr,k.WuMenuItemGroup=Gg,k.WuMenuRadioItem=Kg,k.WuMenuSeparatorItem=Yg,k.WuModal=bb,k.WuModalClose=Nb,k.WuModalContent=yb,k.WuModalFooter=xb,k.WuModalHeader=vb,k.WuMonthPicker=Ib,k.WuPagination=$l,k.WuPopover=Df,k.WuPopoverClose=hs,k.WuPrimaryNavbar=kb,k.WuRadioGroup=Ul,k.WuScrollArea=Ab,k.WuSecondaryNavbar=Db,k.WuSelect=Fl,k.WuSharedSurvey=qc,k.WuSidebar=uy,k.WuSidebarCollapsibleMenu=fy,k.WuSidebarContent=ly,k.WuSidebarFooter=cy,k.WuSidebarGroup=dy,k.WuSidebarItem=mc,k.WuSidebarMenu=wy,k.WuSidebarTrigger=hc,k.WuSpotlight=_l,k.WuStackedCard=my,k.WuStackedCardOverlay=gy,k.WuStepper=nv,k.WuSubMenu=Xg,k.WuSubtext=pw,k.WuSurveyItem=Hc,k.WuSurveyList=zc,k.WuSurveySelect=jc,k.WuSurveySource=av,k.WuSwitcher=Jc,k.WuTab=dv,k.WuTable=xv,k.WuText=ww,k.WuTextarea=hd,k.WuTimePicker=vd,k.WuToast=Bv,k.WuToggle=kd,k.WuTooltip=An,k.WuTranslate=Vd,k.WuTranslateProvider=Gv,k.WuTranslationContext=Ar,k.WuTranslationProvider=zv,k.WuTruncatedLabel=Cw,k.WuVirtualScroll=Mt,k.calculatePosition=hy,k.useTranslation=qv,k.useTranslationsContext=Hv,k.useWickuiTranslate=_d,k.useWuShowToast=Pv,k.useWuSidebar=at,k.wt=jv,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
20
+ `}),s&&(0,a.jsxs)(`div`,{className:z(`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:[(0,a.jsx)(Dv,{values:x,selectedValue:h.padStart(2,`0`),scrollRef:p,onSelect:e=>w(e,_),className:`wu-time-hour-picker`}),(0,a.jsx)(Dv,{values:S,selectedValue:_.padStart(2,`0`),scrollRef:m,onSelect:e=>w(h,e),className:`wu-time-minute-picker`}),(0,a.jsx)(Dv,{values:C,selectedValue:y,onSelect:e=>w(void 0,void 0,e),className:`wu-time-meridiem-picker`,repeatItems:!1})]})]})]})};Av.displayName=`WuTimePicker`;var jv=1,Mv=1e6,Nv=0;function Pv(){return Nv=(Nv+1)%(2**53-1),Nv.toString()}var Fv=new Map,Iv=e=>{if(Fv.has(e))return;let t=setTimeout(()=>{Fv.delete(e),Bv({type:`REMOVE_TOAST`,toastId:e})},Mv);Fv.set(e,t)},Lv=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,jv)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?Iv(n):e.toasts.forEach(e=>{Iv(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},Rv=[],zv={toasts:[]};function Bv(e){zv=Lv(zv,e),Rv.forEach(e=>{e(zv)})}function Vv({...e}){let t=Pv(),n=e=>Bv({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>Bv({type:`DISMISS_TOAST`,toastId:t});return Bv({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}}function Hv(){let[e,t]=(0,R.useState)(zv);return(0,R.useEffect)(()=>(Rv.push(t),()=>{let e=Rv.indexOf(t);e>-1&&Rv.splice(e,1)}),[e]),{...e,toast:Vv,dismiss:e=>Bv({type:`DISMISS_TOAST`,toastId:e})}}var Uv=()=>({showToast:({message:e,variant:t,duration:n,position:r})=>Vv({description:e,variant:t,duration:n,position:r})}),Wv=D.Provider,Gv=(0,f.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`}}),Kv=R.forwardRef(({className:e,position:t,...n},r)=>(0,a.jsx)(D.Viewport,{ref:r,className:z(Gv({position:t}),e),...n}));Kv.displayName=D.Viewport.displayName;var qv=(0,f.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`}}),Jv=R.forwardRef(({className:e,variant:t,position:n,...r},i)=>(0,a.jsx)(D.Root,{ref:i,className:z(qv({variant:t,position:n}),e),...r}));Jv.displayName=D.Root.displayName;var Yv=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(D.Action,{ref:n,className:z(`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}));Yv.displayName=D.Action.displayName;var Xv=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(D.Close,{ref:n,className:z(`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:(0,a.jsx)(`span`,{className:`wm-close wu-text-base`})}));Xv.displayName=D.Close.displayName;var Zv=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(D.Title,{ref:n,className:z(`wu-text-sm wu-font-semibold`,e),...t}));Zv.displayName=D.Title.displayName;var Qv=R.forwardRef(({className:e,...t},n)=>(0,a.jsx)(D.Description,{ref:n,className:z(`wu-text-sm wu-opacity-90`,e),...t}));Qv.displayName=D.Description.displayName;function $v(){let{toasts:e}=Hv(),t=e.reduce((e,t)=>{let n=t.position||`top`;return e[n]||(e[n]=[]),e[n].push(t),e},{});return(0,a.jsx)(Wv,{children:Object.entries(t).map(([e,t])=>(0,a.jsx)(Kv,{position:e,children:t.map(function({id:e,title:t,description:n,action:r,variant:i,position:o,...s}){let c={success:`wm-check-circle`,info:`wm-info`,warning:`wm-error`,error:`wm-cancel`};return(0,a.jsxs)(Jv,{variant:i||`success`,position:o,...s,children:[(0,a.jsxs)(`div`,{className:`wu-grid wu-gap-1`,children:[t&&(0,a.jsx)(Zv,{children:t}),n&&(0,a.jsxs)(Qv,{className:`wu-flex wu-items-center wu-gap-3 wu-pr-6`,children:[(0,a.jsx)(Pe,{icon:c[i||`success`],className:`wu-text-xl`}),n]})]}),r,(0,a.jsx)(Xv,{})]},e)})},e))})}var ey=()=>(0,a.jsx)($v,{}),ty=R.forwardRef(({className:e,dir:t,...n},r)=>(0,a.jsx)(O.Root,{className:z(`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:r,children:(0,a.jsx)(O.Thumb,{className:z(`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`)})}));ty.displayName=O.Root.displayName;var ny=R.default.forwardRef((e,t)=>{let{Label:n,labelPosition:r=`right`,onChange:i,className:o,dir:s,disabled:c,id:l=V(),...u}=e;return R.default.useEffect(()=>{let{checked:e,defaultChecked:t}=u;e!==void 0&&t!==void 0&&console.error("WuToggle: Both `checked` and `defaultChecked` props are set. Use only one of them.")},[u.checked,u.defaultChecked]),(0,a.jsxs)(`div`,{className:z(ry({labelPosition:r}),`wu-toggle-container`),dir:s,children:[(0,a.jsx)(ty,{...u,id:l,disabled:c,ref:t,onCheckedChange:i,className:z(`wu-peer`,o),dir:s}),(0,a.jsx)(K,{htmlFor:l,className:`wu-toggle-label`,children:n})]})});ny.displayName=`WuToggle`;var ry=(0,f.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`}}}),iy=(0,R.createContext)(null),ay=()=>{let e=(0,R.useContext)(iy);if(!e)throw Error(`useTranslation must be used within a WuTranslationProvider`);return e.useTranslation()},oy=()=>{let e=(0,R.useContext)(iy);if(!e)throw Error(`useLoadTranslationsFunction must be used within a WuTranslationProvider`);return e},sy=({children:e})=>{let[t,n]=(0,R.useState)({}),[r,i]=(0,R.useState)({}),o={loadTranslations:(0,R.useCallback)(async(e,t)=>{try{n(await(await fetch(e)).json())}catch(e){console.error(`Failed to load translations:`,e),t&&n(t)}t&&i(t)},[]),setFallbackTranslations:(0,R.useCallback)(e=>{i(e)},[]),useTranslation:(0,R.useCallback)(()=>({t:(e,n)=>t[e]?t[e]:r[e]?r[e]:n||e}),[t,r])};return(0,a.jsx)(iy.Provider,{value:o,children:e})},cy={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`}},ly={},uy=e=>{ly=e},dy=e=>ly[e]??e,fy=(0,R.createContext)(null),py=()=>{let e=(0,R.useContext)(fy);if(!e)throw Error(`[WuTranslateProvider] Must be used within a provider.`);return e},my=e=>e.name===`AbortError`,hy=({children:e,defaultLocale:t=`en`,baseApi:n=`https://admin2.questionpro.com/cs/api/gad/translate`,keys:r=`/wick-ui-i18n.json`})=>{let[i,o]=(0,R.useState)(t),[s,c]=(0,R.useState)({}),[l,u]=(0,R.useState)(!0),d=(0,R.useRef)(!1),f=(0,R.useCallback)(e=>{d.current=!0,o(e)},[]);(0,R.useEffect)(()=>{d.current||o(t)},[t]),(0,R.useEffect)(()=>{let e=new AbortController;return(async()=>{u(!0);try{let t=await fetch(r,{signal:e.signal});if(!t.ok)throw Error(`Failed to fetch translation keys`);let a=await t.json();if(i===`en`){uy(a),c(a);return}try{let t=await fetch(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({keys:a,code:i}),signal:e.signal});if(!t.ok)throw Error(`Failed to fetch translations`);let{data:r}=await t.json();uy(r),c(r)}catch(e){if(my(e))return;console.error(`[WuTranslateProvider] Translation fetch failed:`,e),uy(a),c(a)}}catch(e){if(my(e))return;console.error(`[WuTranslateProvider] Keys fetch failed:`,e),uy({}),c({})}finally{e.signal.aborted||u(!1)}})(),()=>{e.abort()}},[i,n,r]);let p=(0,R.useMemo)(()=>({dictionary:s,locale:i,setLocale:f,isLoading:l}),[s,i,l,f]);return(0,a.jsx)(fy.Provider,{value:p,children:e})},gy=R.default.memo(({__i18nKey:e})=>{let{dictionary:t}=py();return(0,a.jsx)(a.Fragment,{children:t[e]??e})});gy.displayName=`WuTranslate`,typeof window<`u`&&(window.wickUiVersion=`1.49.0`,window.wickUiIcon=`9.1.0`,window.wickUiEditor=`0.14.1`),e.CHART_COLOR_SYSTEM=cy,e.WuAccordion=le,e.WuActivityLog=me,e.WuAppHeader=Qe,e.WuAppHeaderAccount=Te,e.WuAppHeaderBar=We,e.WuAppHeaderHelp=Ee,e.WuAppHeaderMenu=Ue,e.WuAppHeaderSearch=Ge,e.WuButton=W,e.WuCalender=at,e.WuCard=Kr,e.WuCardFooter=Jr,e.WuCardHeader=qr,e.WuCheckbox=Xr,e.WuChip=$r,e.WuCombobox=Mi,e.WuCopyToClipboard=Ni,e.WuDataTable=mv,e.WuDatePicker=_t,e.WuDateRangePicker=Gr,e.WuDisplay=Ne,e.WuDrawer=Ki,e.WuDrawerClose=qi,e.WuDrilldown=cp,e.WuFooter=mp,e.WuFormGroup=gt,e.WuHeading=je,e.WuHelpButton=hp,e.WuIcon=Pe,e.WuInput=Mr,e.WuInputError=ft,e.WuInputHint=pt,e.WuLabel=K,e.WuListbox=wp,e.WuLoader=ve,e.WuMenu=rp,e.WuMenuCheckboxItem=Jf,e.WuMenuIcon=Tp,e.WuMenuItem=Yf,e.WuMenuItemGroup=Xf,e.WuMenuRadioItem=Zf,e.WuMenuSeparatorItem=Qf,e.WuModal=Hp,e.WuModalClose=Kp,e.WuModalContent=Up,e.WuModalFooter=Gp,e.WuModalHeader=Wp,e.WuMonthPicker=nm,e.WuPagination=lm,e.WuPopover=Ir,e.WuPopoverClose=Lr,e.WuPrimaryNavbar=om,e.WuRadioGroup=pm,e.WuScrollArea=mm,e.WuSecondaryNavbar=cm,e.WuSelect=em,e.WuSharedSurvey=d_,e.WuSidebar=Oh,e.WuSidebarCollapsibleMenu=Fh,e.WuSidebarContent=Ah,e.WuSidebarFooter=jh,e.WuSidebarGroup=Mh,e.WuSidebarItem=Ph,e.WuSidebarMenu=Nh,e.WuSidebarTrigger=kh,e.WuSpotlight=Rp,e.WuStackedCard=Bh,e.WuStackedCardOverlay=Vh,e.WuStepper=c_,e.WuSubMenu=tp,e.WuSubtext=Me,e.WuSurveyItem=p_,e.WuSurveyList=m_,e.WuSurveySelect=__,e.WuSurveySource=g_,e.WuSwitcher=E_,e.WuTab=L_,e.WuTable=hv,e.WuText=Ae,e.WuTextarea=_v,e.WuTimePicker=Av,e.WuToast=ey,e.WuToggle=ny,e.WuTooltip=Xe,e.WuTranslate=gy,e.WuTranslateProvider=hy,e.WuTranslationContext=iy,e.WuTranslationProvider=sy,e.WuTruncatedLabel=Ze,e.WuVirtualScroll=li,e.calculatePosition=Rh,Object.defineProperty(e,`useContext`,{enumerable:!0,get:function(){return n.useContext}}),e.useTranslation=ay,e.useTranslationsContext=oy,e.useWickuiTranslate=py,e.useWuShowToast=Uv,e.useWuSidebar=Dm,e.wt=dy});