@jerry-fd/ui 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/antd-data-filter.js +1 -1
- package/{chunk-WHQZDGBC.js → chunk-6YOHG3I6.js} +1 -1
- package/chunk-7T5LUFMY.js +2 -0
- package/chunk-R2S624AO.js +1 -0
- package/data-table.js +2 -2
- package/index.d.ts +27 -2
- package/index.js +2 -2
- package/package.json +1 -1
- package/styles/index.css +1 -1
- package/chunk-MEOS5CC6.js +0 -1
- package/chunk-TL2HPXUT.js +0 -2
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {k,a as a$1,l,p,s,f}from'./chunk-WHQZDGBC.js';export{r as DropdownMenu,p as Skeleton,o as Switch,j as Tabs,b as UIProvider,d as debounce,q as dropdownMenuStyles,f as mergeRefs,e as throttle,s as useFlag}from'./chunk-WHQZDGBC.js';import {b,c,F,J as J$1,G,H,I,P,S as S$1,i,E,T}from'./chunk-TL2HPXUT.js';export{P as Button,v as Card,D as Command,R as FancyButton,K as Popover,M as Spinner,i as Tooltip,f as TooltipArrow,h as TooltipProvider,d as TooltipRoot,e as TooltipTrigger,N as baseButtonStyle,O as buttonVariants,c as cn,Q as fancyButtonVariants,g as tooltipVariants,b as tv,a as twMergeConfig,L as useDisableContentMenu}from'./chunk-TL2HPXUT.js';import {a}from'./chunk-M7AD2PUT.js';import {Slot,Collapsible,ScrollArea,HoverCard,Portal,AlertDialog}from'radix-ui';import*as S from'react';import S__default,{useRef,useState,useLayoutEffect}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {Trash2Icon,TriangleAlertIcon,LockKeyhole,NotebookPenIcon,CircleQuestionMark,CircleAlert,Copy,CheckCheck,XIcon,Check}from'lucide-react';import {m,AnimatePresence,useAnimate}from'motion/react';import {OTPInput,REGEXP_ONLY_DIGITS,OTPInputContext}from'input-otp';import {Drawer}from'vaul';import Qa from'react-use-measure';var Mt=new WeakMap;function Ut(e){return((...t)=>{let o=Mt.get(e),r=t.map(String).join("_");if(o){let n=o.get(r);if(n)return n}else o=new Map,Mt.set(e,o);let a=e(...t);return o.set(r,a),a})}function ai(e,t,o="zh-CN"){return new Intl.NumberFormat(o,t).format(e)}function ni(e,t,o="zh-CN"){return new Intl.NumberFormat(o,{style:"currency",...t}).format(e)}function ii(e,t="en-US"){return new Intl.NumberFormat(t,{notation:"compact",compactDisplay:"short"}).format(e)}var li=Ut((e,t=2)=>e.replace(/[.,!@#$%^&*()_+=\-`~[\]/\\{}:"|<>?]+/gi,"").trim().split(/\s+/).slice(0,t).map(o=>{if(!o.length)return "";if(/\s+/.test(e))return o.match(/./u)?.[0].toUpperCase();let r=new RegExp(".".repeat(t),"u"),a=o.match(r)?.[0];return a?a.charAt(0).toUpperCase()+a.slice(1):e.charAt(0).toUpperCase()+e.slice(1,2)}).join(""));function di(e,t){return Array.isArray(t)?e.filter(o=>t.some(r=>r===o.value)):e.find(o=>o.value===t)}function ui(e){return Array.from(new Set(e))}function mi(e){return e.filter(vr)}function vr(e){return !!e}function xr(e,t){return t.reduce((o,r)=>(o[r]=e[r],o),{})}function fi(e,t){let o=new Set(t.map(String)),r=Object.keys(e).filter(a=>!o.has(a));return xr(e,r)}var Zt={};a(Zt,{AVATAR_ROOT_NAME:()=>Lt,Badge:()=>Yt,BrandLogo:()=>qt,Image:()=>at,Indicator:()=>Kt,Notification:()=>Xt,Root:()=>Gt,Status:()=>$t,avatarRingVariants:()=>Ht,avatarStatusVariants:()=>Wt,avatarVariants:()=>Ue});function ye(e,t,o,r,a){let n=S__default.Children.map(e,(l,s)=>{if(!S__default.isValidElement(l))return l;let p=l.type?.displayName||"",c=o.includes(p)?t:{},d=l.props;return S__default.cloneElement(l,{...c,key:`${r}-${s}`},ye(d?.children,t,o,r,d?.asChild))});return a?n?.[0]:n}function zt(e){let t=S.useId();return jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 80 80",...e,children:[jsxs("g",{fill:"#fff",clipPath:`url(#${t})`,children:[jsx("ellipse",{cx:40,cy:78,fillOpacity:.72,rx:32,ry:24}),jsx("circle",{cx:40,cy:32,r:16,opacity:.9})]}),jsx("defs",{children:jsx("clipPath",{id:t,children:jsx("rect",{width:80,height:80,fill:"#fff",rx:40})})})]})}function Bt(e){let t=S.useId(),o=S.useId(),r=S.useId();return jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:56,height:56,fill:"none",viewBox:"0 0 56 56",...e,children:[jsxs("g",{clipPath:`url(#${t})`,children:[jsx("rect",{width:56,height:56,className:"fill-bg-soft",rx:28}),jsx("path",{className:"fill-bg-soft",d:"M0 0h56v56H0z"}),jsx("g",{filter:`url(#${o})`,opacity:.48,children:jsx("path",{fill:"#fff",d:"M7 24.9a2.8 2.8 0 012.8-2.8h21a2.8 2.8 0 012.8 2.8v49a2.8 2.8 0 01-2.8 2.8h-21A2.8 2.8 0 017 73.9v-49z"})}),jsx("path",{className:"fill-bg-soft",d:"M12.6 28.7a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2z"}),jsx("g",{filter:`url(#${r})`,children:jsx("path",{fill:"#fff",fillOpacity:.8,d:"M21 14a2.8 2.8 0 012.8-2.8h21a2.8 2.8 0 012.8 2.8v49a2.8 2.8 0 01-2.8 2.8h-21A2.8 2.8 0 0121 63V14z"})}),jsx("path",{className:"fill-bg-soft",d:"M26.6 17.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7V22a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm9.8-29.4a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7V22a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2z"})]}),jsxs("defs",{children:[jsxs("filter",{id:o,width:34.6,height:62.6,x:3,y:18.1,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),jsx("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:2}),jsx("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_36237_4888"}),jsx("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_36237_4888",result:"shape"})]}),jsxs("filter",{id:r,width:42.6,height:70.6,x:13,y:3.2,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),jsx("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:4}),jsx("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_36237_4888"}),jsx("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_36237_4888",result:"shape"}),jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),jsx("feOffset",{dy:4}),jsx("feGaussianBlur",{stdDeviation:2}),jsx("feComposite",{in2:"hardAlpha",k2:-1,k3:1,operator:"arithmetic"}),jsx("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0"}),jsx("feBlend",{in2:"shape",result:"effect2_innerShadow_36237_4888"})]}),jsx("clipPath",{id:t,children:jsx("rect",{width:56,height:56,fill:"#fff",rx:28})})]})]})}var Lt="AvatarRoot",_t="AvatarImage",Ft="AvatarIndicator",yr="AvatarStatus",br="AvatarBrandLogo",Ar="AvatarNotification",Cr="AvatarBadge",rt=Slot.Root,Ue=b({slots:{root:["relative flex shrink-0 items-center justify-center rounded-full","text-center uppercase select-none"],image:"size-full rounded-full object-cover",indicator:"absolute flex size-32 items-center justify-center drop-shadow-[0_2px_4px_#1b1c1d0a]"},variants:{withRing:{true:""},size:{80:{root:"size-80 text-title-h5"},72:{root:"size-72 text-title-h5"},64:{root:"size-64 text-title-h5"},56:{root:"size-56 text-label-lg"},48:{root:"size-48 text-label-lg"},42:{root:"size-42 text-label-md"},38:{root:"size-38 text-label-md"},32:{root:"size-32 text-label-sm"},24:{root:"size-24 text-label-xs"},20:{root:"size-20 text-label-xs"}},color:{gray:{root:"bg-bg-soft text-static-black/80"},yellow:{root:"bg-yellow-500 text-static-white"},blue:{root:"bg-blue-500 text-static-white"},sky:{root:"bg-sky-500 text-static-white"},purple:{root:"bg-purple-500 text-static-white"},red:{root:"bg-red-500 text-static-white"},green:{root:"bg-green-500 text-static-white"},teal:{root:"bg-teal-500 text-static-white"},violet:{root:"bg-violet-500 text-static-white"},pink:{root:"bg-pink-500 text-static-white"},orange:{root:"bg-orange-500 text-static-white"}}},compoundVariants:[{size:["80","72"],class:{indicator:"-right-8"}},{size:"64",class:{indicator:"-right-8 scale-[.875]"}},{size:"56",class:{indicator:"-right-6 scale-75"}},{size:"48",class:{indicator:"-right-6 scale-[.625]"}},{size:"42",class:{indicator:"-right-6 scale-[.5725]"}},{size:"38",class:{indicator:"-right-6 scale-[.5625]"}},{size:"32",class:{indicator:"-right-6 scale-50"}},{size:"24",class:{indicator:"-right-4 scale-[.375]"}},{size:"20",class:{indicator:"-right-4 scale-[.3125]"}},{withRing:true,size:"80",class:{indicator:"-right-12"}},{withRing:true,size:"72",class:{indicator:"-right-13"}},{withRing:true,size:"64",class:{indicator:"-right-12"}},{withRing:true,size:"56",class:{indicator:"-right-10"}},{withRing:true,size:["48","42","38","32"],class:{indicator:"-right-9"}},{withRing:true,size:["24","20"],class:{indicator:"-right-7"}}],defaultVariants:{size:"48",color:"gray"}}),Ht=b({base:"ring-2 ring-offset-2",variants:{color:{gray:"ring-black/10",yellow:"ring-yellow-500",blue:"ring-blue-500",sky:"ring-sky-500",purple:"ring-purple-500",red:"ring-red-500",green:"ring-green-500",teal:"ring-teal-500",violet:"ring-violet-500",pink:"ring-pink-500",orange:"ring-orange-500",white:"ring-static-white",black:"ring-static-black"}},defaultVariants:{color:"gray"}}),at=S.forwardRef(({asChild:e,className:t,size:o,color:r,...a},n)=>{let l=e?rt:"img",{image:s}=Ue({size:o,color:r});return jsx(l,{ref:n,className:s({class:t}),...a})});at.displayName=_t;var Gt=S.forwardRef(({asChild:e,children:t,size:o,color:r,ring:a,className:n,placeholderType:l="user",...s},p)=>{let c$1=S.useId(),d=e?rt:"div",u=a?Ht({color:a===true?r:typeof a=="string"?a:void 0}):void 0,{root:v}=Ue({size:o,color:r}),m=c(v(),u,n),f={size:o,color:r};if(!t)return jsx("div",{className:m,...s,children:jsx(at,{asChild:true,children:l==="company"?jsx(Bt,{}):jsx(zt,{})})});let g=ye(t,f,[_t,Ft],c$1,e);return jsx(d,{ref:p,className:m,...s,children:g})});Gt.displayName=Lt;function Kt({size:e,color:t,className:o,position:r="bottom",withRing:a,...n}){let{indicator:l}=Ue({size:e,color:t,withRing:a});return jsx("div",{className:c(l({class:o}),{"top-0 origin-top-right":r==="top","bottom-0 origin-bottom-right":r==="bottom"}),...n})}Kt.displayName=Ft;var Wt=b({base:"box-content size-12 rounded-full border-4 border-bg-white",variants:{status:{online:"bg-success-base",offline:"bg-gray-500",busy:"bg-error-base",away:"bg-away-base"}},defaultVariants:{status:"online"}});function $t({status:e,className:t,...o}){return jsx("div",{className:Wt({status:e,class:t}),...o})}$t.displayName=yr;var qt=S.forwardRef(({asChild:e,className:t,...o},r)=>jsx(e?rt:"img",{draggable:false,ref:r,className:c("box-content size-24 rounded-full border-2 border-bg-white",t),...o}));qt.displayName=br;function Xt({className:e,...t}){return jsx("div",{className:c("box-content size-12 rounded-full border-2 border-bg-white bg-error-base",e),...t})}Xt.displayName=Ar;function Yt({className:e,...t}){return jsx("div",{className:c("box-content rounded-full border-2 border-bg-white bg-error-base px-6 text-static-white",e),...t})}Yt.displayName=Cr;function me({className:e,iconClassName:t,variant:o="neutral",mode:r="stroke",size:a="small",...n}){return jsx(P,{variant:o,mode:r,size:a,className:c("absolute top-12 right-10 z-10 m-auto aspect-square gap-0 rounded-full border-transparent text-text-soft hover:text-text-strong",e),startContent:jsx(XIcon,{className:c("size-16",t)}),...n})}var nt=b({slots:{root:"relative flex w-fit max-w-xl flex-col rounded-[12px] border border-stroke-soft p-0 text-md",content:"text-md",arrowCls:"",header:"flex items-center select-none",close:"absolute rounded-full"},variants:{variant:{default:{root:"gap-8 bg-bg-white p-16",close:"top-12 right-12 hover:bg-bg-weak"},accent:{root:"bg-bg-weak p-4",content:"rounded-[8px] bg-bg-white px-12 py-8 shadow-sm",header:"px-12 py-4 pb-6",close:"top-9 right-8 hover:bg-bg-white",arrowCls:"bg-bg-weak"}}},defaultVariants:{variant:"default"}});function Rr({variant:e,className:t,contentClassName:o,closeableClassName:r,side:a="bottom",align:n="start",arrow:l=true,unstyled:s=true,closeable:p=true,sideOffset:c$1=1,title:d,content:u,children:v,asChild:m,defaultOpen:f,open:g,onOpenChange:x,onClose:D,...h}){let{root:b,content:C,header:A,close:w,arrowCls:y}=nt({variant:e}),[P,T]=S__default.useState(f??false),N=g!==void 0,M=N?g:P,F$1=S__default.useCallback(W=>{N||T(W),x?.(W);},[N,x]);return jsxs(F,{open:M,onOpenChange:F$1,children:[N&&M&&jsx(J$1,{}),jsx(G,{className:c(N&&M&&"relative z-20"),asChild:m,children:v}),jsxs(H,{className:b({className:t}),arrowClassName:y(),unstyled:s,side:a,align:n,sideOffset:c$1,arrow:l,...h,children:[d&&jsx("header",{className:A({className:p&&"pe-28"}),children:typeof d=="string"?jsx("h3",{className:"m-0 text-title-h6 text-text-strong",children:d}):d}),p&&jsx(I,{asChild:true,onClick:D,children:jsx(me,{size:"xsmall",mode:"ghost",className:w({class:c("size-24 p-0",r)})})}),jsx("div",{className:C({className:o}),children:u})]})]})}function Ir({variant:e="default",title:t,content:o,children:r,defaultOpen:a,className:n,side:l$1="top",align:s="center",sideOffset:p=1,arrow:c$1=true,open:d,contentClassName:u,onOpenChange:v,onConfirm:m$1,onCancel:f,...g}){let{root:x,content:D,header:h,arrowCls:b}=nt({variant:e}),[C,A]=S__default.useState(a??false),w=d!==void 0,y=w?d:C,P$1=S__default.useCallback(F=>{w||A(F),v?.(F);},[w,v]),[T,N]=S__default.useState(false),M=S__default.useCallback(async()=>{P$1(false);try{N(!0),await m$1?.();}catch{}finally{N(false);}},[P$1,m$1]);return jsxs(F,{open:y,onOpenChange:P$1,children:[jsx(AnimatePresence,{children:y&&jsx(J$1,{as:m.div,...l,className:"bg-black/5"})}),jsx(G,{className:c(y&&"relative z-20"),children:jsx("div",{className:"inline-flex items-center",children:S__default.isValidElement(r)?S__default.cloneElement(r,{loading:T}):r})}),jsxs(H,{className:x({className:c("max-w-lg",n)}),arrowClassName:b(),unstyled:true,side:l$1,align:s,sideOffset:p,arrow:c$1,...g,children:[t&&jsxs("header",{className:h({className:"gap-6"}),children:[jsx(CircleAlert,{className:"text-red-500",size:16}),jsx("h4",{className:"m-0 text-15 leading-26 font-medium text-text-strong",children:t})]}),jsxs("div",{className:D({className:u}),children:[o,jsxs("div",{className:"mt-8 flex justify-end gap-12",children:[jsx(I,{unstyled:true,onClick:f,asChild:true,children:jsx(P,{size:"xsmall",variant:"neutral",mode:"stroke",className:"h-26",children:"Cancel"})}),jsx(P,{size:"xsmall",mode:"stroke",className:"h-26",onClick:M,children:"Confirm"})]})]})]})]})}var eo=b({slots:{group:"flex items-center",slot:["relative flex items-center justify-center overflow-hidden border bg-white font-medium text-text-strong transition-all outline-none","data-[active=true]:border-primary-base data-[active=true]:ring-blue-100 data-[active=true]:aria-invalid:border-red-500 data-[active=true]:aria-invalid:ring-red-100","aria-invalid:border-red-500 aria-invalid:ring-2 aria-invalid:ring-red-100 aria-invalid:ring-offset-1 data-[active=true]:ring-2 data-[active=true]:ring-offset-1"]},variants:{variant:{filled:{slot:"border-black/5 bg-bg-weak aria-invalid:bg-red-50 data-[active=true]:bg-bg-white"},stroke:{slot:"border-stroke-soft"}},size:{xsmall:{group:"gap-8",slot:"size-28 rounded-lg text-md"},small:{group:"gap-10",slot:"size-32 rounded-xl text-md"},medium:{group:"gap-12",slot:"size-36 rounded-xl text-lg"},large:{group:"gap-14",slot:"size-40 rounded-2xl text-xl"}}},defaultVariants:{size:"small",variant:"stroke"}}),it=S.createContext({}),Mr=[0,-10,8,-8,6,-4,2,0],Ur={duration:.42,ease:"easeInOut"};function zr({className:e,slotClassName:t,shakeRef:o}){let{size:r}=S.useContext(it),a=S.useContext(OTPInputContext),[n,l]=useAnimate(),s=S.useRef(null),{group:p}=eo({size:r}),c=S.useCallback(()=>{if(s.current)return s.current;if(!n.current)return Promise.resolve();let d=l(n.current,{x:Mr},Ur),u=Promise.resolve(d).then(()=>{}).finally(()=>{s.current=null;});return s.current=u,u},[l,n]);return S.useEffect(()=>(o.current=c,()=>{o.current=()=>Promise.resolve(),s.current=null;}),[c,o]),jsx("div",{ref:n,"data-slot":"input-otp-group",className:p({className:e}),children:a.slots.map((d,u)=>jsx(Lr,{...d,className:t},u))})}var Br={initial:{opacity:0,y:20},animate:{opacity:1,y:0,transition:{type:"tween",ease:[.25,.1,.25,1],duration:.2}},exit:{opacity:0,y:20,transition:{type:"tween",ease:[.25,.1,.25,1],duration:.15}}};function Lr({char:e,hasFakeCaret:t,isActive:o,className:r,placeholderChar:a,...n}){let{size:l,variant:s,"aria-invalid":p}=S.useContext(it),{slot:c}=eo({size:l,variant:s});return jsxs("div",{"aria-label":a??"","data-slot":"input-otp-slot","data-active":o,"aria-invalid":p,className:c({className:r}),...n,children:[jsx(AnimatePresence,{mode:"wait",initial:false,children:e&&jsx(m.span,{...Br,children:e},e)}),t&&jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsx("div",{className:"h-16 w-px animate-caret-blink bg-bg-sub duration-1000"})})]})}function _r({maxLength:e=6,size:t,variant:o,className:r,classNames:a,ref:n,pattern:l=REGEXP_ONLY_DIGITS,"aria-invalid":s,...p}){let c$1=S.useRef(null),d=S.useRef(()=>Promise.resolve());return S.useImperativeHandle(n,()=>({get input(){return c$1.current},focus:()=>c$1.current?.focus(),blur:()=>c$1.current?.blur(),shake:()=>d.current()}),[]),jsx(a$1,{children:jsx(it,{value:{size:t,variant:o,"aria-invalid":s},children:jsx(OTPInput,{ref:c$1,"data-slot":"input-otp",maxLength:e,className:c("disabled:cursor-not-allowed",a?.input),containerClassName:c("group flex items-center has-disabled:opacity-70",a?.container),pattern:l,pushPasswordManagerStrategy:"none",spellCheck:false,...p,children:jsx(zr,{className:a?.group,slotClassName:r,shakeRef:d})})})})}function to({...e}){return jsx(Drawer.Root,{"data-slot":"drawer",...e})}function oo({...e}){return jsx(Drawer.Trigger,{"data-slot":"drawer-trigger",...e})}function Hr({...e}){return jsx(Drawer.Portal,{"data-slot":"drawer-portal",...e})}function lt({...e}){return jsx(Drawer.Close,{"data-slot":"drawer-close",...e})}function Gr({className:e,...t}){return jsx(Drawer.Overlay,{"data-slot":"drawer-overlay",className:c("fixed inset-0 z-50 bg-black/10 data-closed:animate-out data-closed:fade-out-0 data-open:animate-in data-open:fade-in-0",e),...t})}var Kr={top:"max-h-[80vh]",bottom:"mt-96 max-h-[80vh]",left:"w-3/5",right:"w-3/5"};function ro({className:e,direction:t,children:o,...r}){return jsxs(Hr,{"data-slot":"drawer-portal",children:[jsx(Gr,{}),jsx(Drawer.Content,{"data-slot":"drawer-content",className:c("group/drawer-content @container fixed z-50 m-auto flex h-auto flex-col overflow-clip rounded-3xl bg-static-white outline-none",t&&Kr[t],e),...r,children:o})]})}function ao({className:e,...t}){return jsx("div",{"data-slot":"drawer-header",className:c("flex flex-col px-16 py-12",e),...t})}function st({className:e,...t}){return jsx("div",{"data-slot":"drawer-body",className:c("scrollbar-thin overflow-y-auto overscroll-contain p-16 select-text",e),...t})}function no({className:e,...t}){return jsx("div",{"data-slot":"drawer-footer",className:c("mt-auto flex flex-col gap-8 px-16 py-18",e),...t})}function ct({className:e,...t}){return jsx(Drawer.Title,{"data-slot":"drawer-title",className:c("m-0 text-xl leading-32 font-medium text-text-strong",e),...t})}function pt({className:e,...t}){return jsx(Drawer.Description,{"data-slot":"drawer-description",className:c("m-0 text-md text-text-sub",e),...t})}var Yr=k({y:12,scale:.98}),io=m.create(st);function Zr({direction:e="right",dismissible:t=true,closeable:o=true,skeleton:r,className:a,classNames:n,title:l$1,description:s,footer:p,trigger:c$1,anchorContainer:d,children:u,open:v,onOpenChange:m,loading:f,handleOnly:g=true,style:x,width:D,gutter:h=8,okButtonProps:b,closeButtonProps:C,animation:A=true,onClose:w,onOk:y,...P$1}){let T=S$1(),N=typeof h=="number"?`${h}px`:h,M=S__default.useMemo(()=>({"--initial-transform":`calc(100% + ${N})`,...Qr(e,N),...x,width:D}),[e,N,D]),[F,W]=S__default.useState(false),[U,ne]=S__default.useState(false),he=v!==void 0,Je=he?v:F,ie=S__default.useCallback(z=>{!z&&U||(he||W(z),m?.(z));},[he,m,U]),Ne=S__default.useCallback(async()=>{if(!y){ie(false);return}let z=y();if(z instanceof Promise){ne(true);try{await z,ie(!1);}finally{ne(false);}}else ie(false);},[y,ie]);return jsxs(to,{container:d,direction:e,dismissible:!U&&t,handleOnly:g,autoFocus:true,open:Je,onOpenChange:ie,...P$1,children:[c$1&&jsx(oo,{asChild:true,children:c$1}),jsxs(ro,{className:c(d&&d!==document.body&&"absolute",a),direction:e,style:M,children:[o&&jsx(lt,{className:"aspect-square size-32 -translate-y-1 px-8",disabled:U,onClick:t?void 0:w,asChild:true,children:jsx(me,{})}),jsx(ct,{className:"sr-only hidden",children:"Drawer"}),jsx(pt,{className:"sr-only hidden",children:"Description"}),(l$1||s)&&jsxs(ao,{className:c("border-b border-b-stroke-antd",n?.header),children:[l$1&&jsx(ct,{className:"pe-42",asChild:typeof l$1!="string",children:l$1}),s&&jsx(pt,{children:s})]}),!A&&jsx(st,{className:n?.body,children:u}),A&&jsx(a$1,{children:jsx(AnimatePresence,{mode:"wait",children:f?jsx(io,{...l,className:c(n?.body,"overflow-hidden"),children:r??jsx(jr,{count:5})},"skeleton"):jsx(io,{...Yr,className:n?.body,children:u},"content")})}),p===null?jsx("div",{className:c("mt-auto h-16",n?.footer)}):jsxs(no,{className:c("border-t border-t-stroke-antd",!p&&"flex-col gap-8 @[420px]:flex-row-reverse",n?.footer),children:[p,!p&&jsxs(Fragment,{children:[jsx(P,{variant:"neutral",mode:"filled",className:"w-full @[420px]:w-7/10 @[620px]:w-6/10",...b,loading:f||U,onClick:Ne,children:b?.children??T("ok")}),jsx(lt,{asChild:true,children:jsx(P,{variant:"neutral",mode:"stroke",className:"w-full @[420px]:w-3/10 @[620px]:w-4/10",...C,disabled:U,onClick:t?void 0:w,children:C?.children??T("close")})})]})]})]})]})}function jr({count:e=5}){let t=Array.from({length:e});return jsxs("div",{className:"flex flex-col gap-16",children:[jsxs("div",{className:"flex flex-row items-center gap-12",children:[jsx(p,{className:"size-58 rounded-2xl"}),jsxs("div",{className:"flex flex-1 flex-col gap-4",children:[jsx(p,{className:"mb-4 h-14 w-3/10"}),jsx(p,{className:"h-10 w-7/10"}),jsx(p,{className:"h-10 w-9/10"})]})]}),t.map((o,r)=>jsxs("div",{className:"flex flex-col gap-8",children:[jsx(p,{className:"h-12 w-5/10"}),jsx(p,{className:"h-12 w-7/10"}),jsx(p,{className:"h-12 w-full"})]},r))]})}function Qr(e,t){return {top:{left:t,right:t,top:t},bottom:{left:t,right:t,bottom:t},left:{top:t,bottom:t,left:t},right:{top:t,bottom:t,right:t}}[e]??{}}var ea={};function ta(e){let{destroyPayloadOnClose:t=true,onOpen:o,getTitle:r,title:a,onOpenChange:n,onAnimationEnd:l,...s}=e??ea,[p,c]=S__default.useState(false),[d,u]=S__default.useState(),[v,m]=S__default.useState(),f=S__default.useRef(null),[g,x]=S__default.useState(false),D=S__default.useCallback(async P=>{f.current?.abort();let T=new AbortController;if(f.current=T,P&&u(P),c(true),o){x(true);try{let N=await o(P,T.signal);T.signal.aborted||m(N);}finally{T.signal.aborted||x(false);}}},[o]);S__default.useEffect(()=>()=>{f.current?.abort(),f.current=null;},[]);let h=S__default.useCallback(()=>{f.current?.abort(),f.current=null,x(false),c(false);},[]),b=S__default.useCallback(P=>{P||(f.current?.abort(),f.current=null,x(false)),c(P),n?.(P);},[n]),C=S__default.useCallback(P=>{!P&&t&&(u(void 0),m(void 0)),l?.(P);},[t,l]),A=S__default.useMemo(()=>({payload:d,result:v}),[d,v]),w=r?.(g,A);return [{...s,title:w||a,...o&&{loading:g},open:p,onOpenChange:b,onClose:h,onAnimationEnd:C},A,D,h]}var oa={variant:"error"},ze={variant:"neutral",mode:"stroke"};function lo(){let e=S$1(),t=e("ok"),o=e("submit"),r=e("continue"),a=e("delete"),n=e("cancel"),l=S.useMemo(()=>({default:{text:t},info:{text:t},form:{text:o},otp:false,warning:{text:r},destructive:{text:a,buttonProps:oa}}),[r,a,t,o]),s=S.useMemo(()=>({default:{text:n,buttonProps:ze},info:false,form:{text:n,buttonProps:ze},otp:false,warning:{text:n,buttonProps:ze},destructive:{text:n,buttonProps:ze}}),[n]);return {DEFAULT_ALERT_DIALOG_ACTION:l,DEFAULT_ALERT_DIALOG_CANCEL:s}}var aa=b({base:"flex shrink-0 items-center justify-center rounded-2xl ring-1 ring-transparent",variants:{variant:{filled:"text-static-white",lighter:"",outline:"ring-current"},ring:{true:""},color:{neutral:"",slate:"",red:"",orange:"",amber:"",yellow:"",lime:"",green:"",emerald:"",teal:"",cyan:"",sky:"",blue:"",indigo:"",violet:"",purple:"",fuchsia:"",pink:"",rose:""}},compoundVariants:[{variant:"filled",color:"neutral",class:"bg-black/90"},{variant:"filled",color:"slate",class:"bg-slate-500"},{variant:"filled",color:"red",class:"bg-red-500"},{variant:"filled",color:"orange",class:"bg-orange-500"},{variant:"filled",color:"amber",class:"bg-amber-500"},{variant:"filled",color:"yellow",class:"bg-yellow-500"},{variant:"filled",color:"lime",class:"bg-lime-500"},{variant:"filled",color:"green",class:"bg-green-500"},{variant:"filled",color:"emerald",class:"bg-emerald-500"},{variant:"filled",color:"teal",class:"bg-teal-500"},{variant:"filled",color:"cyan",class:"bg-cyan-500"},{variant:"filled",color:"sky",class:"bg-sky-500"},{variant:"filled",color:"blue",class:"bg-blue-500"},{variant:"filled",color:"indigo",class:"bg-indigo-500"},{variant:"filled",color:"violet",class:"bg-violet-500"},{variant:"filled",color:"purple",class:"bg-purple-500"},{variant:"filled",color:"fuchsia",class:"bg-fuchsia-500"},{variant:"filled",color:"pink",class:"bg-pink-500"},{variant:"filled",color:"rose",class:"bg-rose-500"},{variant:"filled",ring:true,color:"neutral",class:"ring-neutral-700"},{variant:"filled",ring:true,color:"slate",class:"ring-slate-600"},{variant:"filled",ring:true,color:"red",class:"ring-red-700"},{variant:"filled",ring:true,color:"orange",class:"ring-orange-600"},{variant:"filled",ring:true,color:"amber",class:"ring-amber-600"},{variant:"filled",ring:true,color:"yellow",class:"ring-yellow-600"},{variant:"filled",ring:true,color:"lime",class:"ring-lime-600"},{variant:"filled",ring:true,color:"green",class:"ring-green-600"},{variant:"filled",ring:true,color:"emerald",class:"ring-emerald-600"},{variant:"filled",ring:true,color:"teal",class:"ring-teal-600"},{variant:"filled",ring:true,color:"cyan",class:"ring-cyan-600"},{variant:"filled",ring:true,color:"sky",class:"ring-sky-600"},{variant:"filled",ring:true,color:"blue",class:"ring-blue-700"},{variant:"filled",ring:true,color:"indigo",class:"ring-indigo-600"},{variant:"filled",ring:true,color:"violet",class:"ring-violet-600"},{variant:"filled",ring:true,color:"purple",class:"ring-purple-600"},{variant:"filled",ring:true,color:"fuchsia",class:"ring-fuchsia-600"},{variant:"filled",ring:true,color:"pink",class:"ring-pink-600"},{variant:"filled",ring:true,color:"rose",class:"ring-rose-600"},{variant:"lighter",color:"neutral",class:"bg-neutral-100 text-neutral-600"},{variant:"lighter",color:"slate",class:"bg-slate-100 text-slate-500"},{variant:"lighter",color:"red",class:"bg-red-50 text-red-500"},{variant:"lighter",color:"orange",class:"bg-orange-50 text-orange-500"},{variant:"lighter",color:"amber",class:"bg-amber-50 text-amber-500"},{variant:"lighter",color:"yellow",class:"bg-yellow-50 text-yellow-500"},{variant:"lighter",color:"lime",class:"bg-lime-50 text-lime-500"},{variant:"lighter",color:"green",class:"bg-green-50 text-green-500"},{variant:"lighter",color:"emerald",class:"bg-emerald-50 text-emerald-500"},{variant:"lighter",color:"teal",class:"bg-teal-50 text-teal-500"},{variant:"lighter",color:"cyan",class:"bg-cyan-50 text-cyan-500"},{variant:"lighter",color:"sky",class:"bg-sky-50 text-sky-500"},{variant:"lighter",color:"blue",class:"bg-blue-50 text-blue-500"},{variant:"lighter",color:"indigo",class:"bg-indigo-50 text-indigo-500"},{variant:"lighter",color:"violet",class:"bg-violet-50 text-violet-500"},{variant:"lighter",color:"purple",class:"bg-purple-50 text-purple-500"},{variant:"lighter",color:"fuchsia",class:"bg-fuchsia-50 text-fuchsia-500"},{variant:"lighter",color:"pink",class:"bg-pink-50 text-pink-500"},{variant:"lighter",color:"rose",class:"bg-rose-50 text-rose-500"},{variant:["lighter","outline"],ring:true,color:"neutral",class:"ring-neutral-200"},{variant:["lighter","outline"],ring:true,color:"slate",class:"ring-slate-200"},{variant:["lighter","outline"],ring:true,color:"red",class:"ring-red-200"},{variant:["lighter","outline"],ring:true,color:"orange",class:"ring-orange-200"},{variant:["lighter","outline"],ring:true,color:"amber",class:"ring-amber-200"},{variant:["lighter","outline"],ring:true,color:"yellow",class:"ring-yellow-200"},{variant:["lighter","outline"],ring:true,color:"lime",class:"ring-lime-200"},{variant:["lighter","outline"],ring:true,color:"green",class:"ring-green-200"},{variant:["lighter","outline"],ring:true,color:"emerald",class:"ring-emerald-200"},{variant:["lighter","outline"],ring:true,color:"teal",class:"ring-teal-200"},{variant:["lighter","outline"],ring:true,color:"cyan",class:"ring-cyan-200"},{variant:["lighter","outline"],ring:true,color:"sky",class:"ring-sky-200"},{variant:["lighter","outline"],ring:true,color:"blue",class:"ring-blue-200"},{variant:["lighter","outline"],ring:true,color:"indigo",class:"ring-indigo-200"},{variant:["lighter","outline"],ring:true,color:"violet",class:"ring-violet-200"},{variant:["lighter","outline"],ring:true,color:"purple",class:"ring-purple-200"},{variant:["lighter","outline"],ring:true,color:"fuchsia",class:"ring-fuchsia-200"},{variant:["lighter","outline"],ring:true,color:"pink",class:"ring-pink-200"},{variant:["lighter","outline"],ring:true,color:"rose",class:"ring-rose-200"},{variant:"outline",color:"neutral",class:"text-neutral-500"},{variant:"outline",color:"slate",class:"text-slate-400"},{variant:"outline",color:"red",class:"text-red-500"},{variant:"outline",color:"orange",class:"text-orange-500"},{variant:"outline",color:"amber",class:"text-amber-500"},{variant:"outline",color:"yellow",class:"text-yellow-500"},{variant:"outline",color:"lime",class:"text-lime-500"},{variant:"outline",color:"green",class:"text-green-500"},{variant:"outline",color:"emerald",class:"text-emerald-500"},{variant:"outline",color:"teal",class:"text-teal-500"},{variant:"outline",color:"cyan",class:"text-cyan-500"},{variant:"outline",color:"sky",class:"text-sky-500"},{variant:"outline",color:"blue",class:"text-blue-500"},{variant:"outline",color:"indigo",class:"text-indigo-500"},{variant:"outline",color:"violet",class:"text-violet-500"},{variant:"outline",color:"purple",class:"text-purple-500"},{variant:"outline",color:"fuchsia",class:"text-fuchsia-500"},{variant:"outline",color:"pink",class:"text-pink-500"},{variant:"outline",color:"rose",class:"text-rose-500"}],defaultVariants:{variant:"outline",color:"slate"}});function J({asChild:e,children:t,className:o,color:r,variant:a,ring:n,...l}){let s=e?Slot.Root:"div",c$1=aa({variant:a,color:r,ring:n!==void 0,className:c(n==="inset"&&"ring-inset",o)});return jsx(s,{className:c$1,...l,children:t})}var co=S.createContext({open:false,overlayBlur:false,contentMotion:"scale-fade",dismissible:false,disableClose:false,setOpen:()=>{}});function Le(){return S.useContext(co)}function po({open:e,defaultOpen:t,overlayBlur:o=false,contentMotion:r="scale-fade",dismissible:a=false,disableClose:n=false,onOpenChange:l,...s}){let[p=false,c]=T({value:e,defaultValue:t??false,onChange:d=>l?.(d??false)});return jsx(co.Provider,{value:{open:p,overlayBlur:o,contentMotion:r,dismissible:a,disableClose:n,setOpen:c},children:jsx(AlertDialog.Root,{"data-slot":"alert-dialog",open:p,onOpenChange:c,...s})})}function uo({...e}){return jsx(AlertDialog.Trigger,{"data-slot":"alert-dialog-trigger",...e})}var ut=[.22,1,.36,1],Be=[.4,0,1,1],sa={initial:{opacity:0,backdropFilter:"blur(0px)"},animate:{opacity:1,backdropFilter:"blur(4px)",transition:{duration:.2,ease:ut}},exit:{opacity:0,backdropFilter:"blur(0px)",transition:{duration:.16,ease:Be}}},ca={initial:{opacity:0},animate:{opacity:1,transition:{duration:.2,ease:ut}},exit:{opacity:0,transition:{duration:.16,ease:Be}}},pa={"scale-fade":{initial:{opacity:0,scale:.88,y:-36},animate:{opacity:1,scale:1,y:0,transition:{duration:.25,ease:ut}},exit:{opacity:0,scale:.92,y:-32,transition:{duration:.18,ease:Be}}},"slide-fade":{initial:{opacity:0,y:-48},animate:{opacity:1,y:0,transition:{duration:.25}},exit:{opacity:0,y:-32,transition:{duration:.2,ease:Be}}}},da=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function ua(e){if(!e)return;let t=e.querySelector('[data-slot="alert-dialog-cancel"]'),o=e.querySelector('[data-slot="alert-dialog-action"]'),r=e.querySelector(da);(t??o??r??e).focus({preventScroll:true});}function ma({className:e,onClick:t,...o}){let{overlayBlur:r,dismissible:a,disableClose:n,setOpen:l}=Le(),s=S.useCallback(p=>{t?.(p),!(p.defaultPrevented||!a||n)&&l(false);},[n,a,t,l]);return jsx(AlertDialog.Overlay,{forceMount:true,asChild:true,...o,children:jsx(m.div,{"data-slot":"alert-dialog-overlay",...r?sa:ca,onClick:s,className:c("fixed inset-0 z-50 bg-black/10",e)})})}function mo({wrapperClassName:e,className:t,children:o,onOpenAutoFocus:r,onEscapeKeyDown:a,...n}){let{open:l,contentMotion:s,disableClose:p}=Le(),c$1=S.useRef(null),d=pa[s],u=S.useCallback(m=>{if(r?.(m),m.defaultPrevented)return;m.preventDefault();let f=document.activeElement;f instanceof HTMLElement&&f.blur(),requestAnimationFrame(()=>{ua(c$1.current);});},[r]),v=S.useCallback(m=>{a?.(m),!(m.defaultPrevented||!p)&&m.preventDefault();},[p,a]);return jsx(a$1,{children:jsx(AlertDialog.Portal,{"data-slot":"alert-dialog-portal",forceMount:true,children:jsx(AnimatePresence,{initial:false,children:l&&jsxs(Fragment,{children:[jsx(ma,{"data-slot":"alert-dialog-overlay"},"alert-dialog-overlay"),jsx(AlertDialog.Content,{forceMount:true,asChild:true,onOpenAutoFocus:u,onEscapeKeyDown:v,...n,children:jsx(m.div,{ref:f([c$1]),tabIndex:-1,"data-slot":"alert-dialog-wrapper",...d,className:c("fixed top-[35%] left-1/2 z-50 flex max-h-[calc(70dvh-108px)] -translate-x-1/2 -translate-y-1/2 outline-none","min-h-0 w-full max-w-4xl overflow-hidden rounded-[18px] bg-bg-weak p-4",e),children:jsx("div",{"data-slot":"alert-dialog-content",className:c("relative flex min-h-0 flex-1 flex-col rounded-[14px] bg-white px-2 py-24 ring ring-stroke-antd",t),children:o})},"alert-dialog-content")})]})})})})}function fo({className:e,...t}){return jsx("div",{"data-slot":"alert-dialog-header",className:c("flex shrink-0 flex-col px-22",e),...t})}function mt({className:e,...t}){return jsx(AlertDialog.Title,{"data-slot":"alert-dialog-title",className:c("m-0 text-[17px] font-medium",e),...t})}function ft({className:e,...t}){return jsx(AlertDialog.Description,{"data-slot":"alert-dialog-description",className:c("m-0 text-md leading-20 text-text-sub",e),...t})}function go({className:e,...t}){return jsx("div",{"data-slot":"alert-dialog-body",className:c("scrollbar-thin flex min-h-0 w-full flex-1 flex-col overflow-auto overscroll-contain px-22",e),...t})}function gt({className:e,...t}){return jsx("div",{"data-slot":"alert-dialog-footer",className:c("flex shrink-0 px-22",e),...t})}function vo({className:e,...t}){return jsx(AlertDialog.Cancel,{"data-slot":"alert-dialog-cancel",className:c(e),...t})}function xo({className:e,asChild:t,...o}){let r=t?Slot.Root:"div";return jsx(r,{"data-slot":"alert-dialog-media",className:c('mx-auto flex size-58 items-center justify-center rounded-full *:[svg:not([class*="size-"])]:size-26',e),...o})}var vt=S.createContext(null);vt.displayName="AlertDialogComposedContext";function va({children:e,...t}){return jsx(vt.Provider,{value:t,children:e})}function ho({children:e,actionPending:t,setActionPending:o,actionFeedback:r,setActionFeedback:a,closeLocked:n}){let{setOpen:l}=Le();return jsx(va,{actionPending:t,setActionPending:o,actionFeedback:r,setActionFeedback:a,closeLocked:n,setOpen:l,children:e})}function Pe(){let e=S.useContext(vt);if(!e)throw new Error("useAlertDialogComposedContext must be used within AlertDialogComposedProvider");return e}var ya={initial:{opacity:0,y:-8,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:-6,height:0}},ba={initial:{opacity:0,scale:.95,y:16},animate:{scale:1,opacity:1,y:0},exit:{scale:.96,opacity:0,y:12}};function Co({open:e=false,message:t}){let o=S$1(),{setActionFeedback:r}=Pe();return jsx(AnimatePresence,{initial:false,children:e&&jsx(m.div,{...ya,className:"px-22",children:jsxs(J,{color:"red",variant:"lighter",className:"relative flex justify-start gap-10 rounded-xl ps-12 pe-8 pt-8 pb-9",ring:true,children:[jsx(TriangleAlertIcon,{className:"size-16 shrink-0"}),jsx("div",{className:"pe-4 text-left text-md leading-18",children:t??o("alert_dialog_default_error_message")}),jsx(me,{size:"xsmall",iconClassName:"size-12",className:"-top-7 -right-7 size-20 border-red-200/50 bg-red-50 p-0 text-red-500 ring-1 ring-white/50 ring-offset-1 hover:bg-red-50",onClick:()=>r(null)})]})})})}function Po({open:e=false,message:t,closeDelay:o=3}){let r=S$1(),{setOpen:a}=Pe(),n=Math.max(0,Math.ceil(o)),[l,s]=S.useState(n);S.useEffect(()=>{if(!e)return;if(n===0){a(false);return}s(n);let c=window.setTimeout(()=>{a(false);},n*1e3);if(n<=1)return ()=>{window.clearTimeout(c);};let d=window.setInterval(()=>{s(u=>u<=2?(window.clearInterval(d),1):u-1);},1e3);return ()=>{window.clearTimeout(c),window.clearInterval(d);}},[n,e,a]);let p=n>0?r("alert_dialog_auto_close_in_seconds",{seconds:l}):r("close");return jsx(AnimatePresence,{initial:false,children:e&&jsxs(m.div,{...ba,className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-24 rounded-[14px] bg-white/96 px-24 py-24 text-center backdrop-blur-[2px]",children:[jsxs("div",{className:"flex w-full flex-col items-center gap-6",children:[jsx(J,{color:"green",variant:"filled",className:"size-68 rounded-full ring-6 ring-green-50",children:jsx(Check,{className:"translate-x-1"})}),jsx("div",{className:"text-paragraph-md text-text-sub",children:t??r("alert_dialog_default_success_message")})]}),jsx(P,{className:"h-32 w-full tabular-nums",onClick:()=>a(false),children:p})]})})}function Ro({footer:e,className:t,resolvedAction:o,resolvedCancel:r,actionPending:a,closeLocked:n,onActionClick:l}){if(e===null)return null;if(e!==void 0)return jsx(gt,{className:c("gap-12",t),children:e});let{className:s,onClick:p,...c$1}=r?.buttonProps??{},{className:d,...u}=o?.buttonProps??{};return !o&&!r?null:jsxs(gt,{className:c("gap-12",t),children:[r&&jsx(vo,{asChild:true,children:jsx(P,{variant:"neutral",mode:"stroke",className:c(o&&"w-4/10",!o&&"w-full",s),...c$1,disabled:n||c$1.disabled,onClick:Aa(p,r.onClick),children:r.text})}),o&&jsx(P,{className:c(r&&"w-6/10",!r&&"w-full",d),...u,loading:a,disabled:a||u.disabled,onClick:l,children:o.text})]})}function Aa(e,t){if(!(!e&&!t))return o=>{e?.(o),!o.defaultPrevented&&t?.();}}var Ia={info:jsx(J,{color:"indigo",variant:"lighter",children:jsx(CircleQuestionMark,{})}),form:jsx(J,{color:"blue",variant:"lighter",children:jsx(NotebookPenIcon,{})}),otp:jsx(J,{color:"blue",variant:"lighter",children:jsx(LockKeyhole,{})}),warning:jsx(J,{color:"orange",variant:"lighter",children:jsx(TriangleAlertIcon,{className:"-translate-y-1"})}),destructive:jsx(J,{color:"red",variant:"lighter",children:jsx(Trash2Icon,{})})};function wo({intent:e,icon:t,title:o,description:r,className:a,titleClassName:n,descriptionClassName:l}){let s=Na(e,t),p=!s?.node&&!o&&!r;return jsxs(Fragment,{children:[jsxs(fo,{className:c("gap-16 text-center",p&&"hidden",a),children:[s?.node&&jsx(xo,{asChild:s.asChild,children:s.node}),(o||r)&&jsxs("div",{className:"grid w-full gap-4",children:[o&&jsx(mt,{className:n,children:o}),r&&jsx(ft,{className:l,children:r})]})]}),jsxs("div",{className:"sr-only hidden",children:[jsx(mt,{children:"T"}),jsx(ft,{children:"D"})]})]})}function Na(e,t){return t===false?null:S.isValidElement(t)?{asChild:true,node:t}:e?{asChild:true,node:Ia[e]??null}:null}function Ke(e,t){return t?{...e,...t,buttonProps:e.buttonProps||t.buttonProps?{...e.buttonProps,...t.buttonProps}:void 0}:{...e,buttonProps:e.buttonProps?{...e.buttonProps}:void 0}}function To(e,t){return t===false?false:e===false?t?Ke(t,void 0):false:Ke(e,t)}function Io(e){return typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"}function ka({open:e,defaultOpen:t,onOpenChange:o,overlayBlur:r,contentMotion:a,dismissible:n,disableClose:l,intent:s,icon:p,title:c,description:d,footer:u,action:v,cancel:m,className:f,classNames:g,onOpenAutoFocus:x,trigger:D,children:h,...b}){let[C,A]=S.useState(false),[w,y]=S.useState(null),P=!!(l||C),T=S.useCallback(N=>{N||(A(false),y(null)),o?.(N);},[o]);return jsxs(po,{open:e,defaultOpen:t,onOpenChange:T,overlayBlur:r,contentMotion:a,dismissible:n,disableClose:P,...b,children:[D&&jsx(uo,{asChild:true,children:D}),jsx(ho,{actionPending:C,setActionPending:A,actionFeedback:w,setActionFeedback:y,closeLocked:P,children:jsx(Ea,{intent:s,icon:p,title:c,description:d,footer:u,action:v,cancel:m,className:f,classNames:g,onOpenAutoFocus:x,children:h})})]})}function Ea({intent:e,icon:t,title:o,description:r,footer:a,action:n,cancel:l,className:s,classNames:p,onOpenAutoFocus:c$1,children:d}){let{setOpen:u,actionPending:v,closeLocked:m,actionFeedback:f,setActionPending:g,setActionFeedback:x}=Pe(),{DEFAULT_ALERT_DIALOG_ACTION:D,DEFAULT_ALERT_DIALOG_CANCEL:h}=lo(),b=t!==false&&(!!e||S.isValidElement(t)),C=e??"default",A=a===void 0,w=D[C],y=A?w===false?n??null:Ke(w,n):null,P=A?To(h[C],l):null,T=P===false?null:P,N=f?.status==="error"?f:null,M=f?.status==="success"?f:null,F=S.useCallback(async W=>{if(!y||v||(x(null),y.buttonProps?.onClick?.(W),W.defaultPrevented))return;let U;try{U=y.onClick?.();}catch{x({status:"error"});return}if(!Io(U)){No(U,x,u);return}try{g(!0),No(await U,x,u);}catch{x({status:"error"});}finally{g(false);}},[v,y,x,g,u]);return jsxs(mo,{wrapperClassName:c("w-xl",p?.wrapper),className:c("gap-20 py-26",b&&"gap-28",s),onOpenAutoFocus:c$1,children:[jsx(wo,{intent:e,icon:t,title:o,description:r,className:p?.header,titleClassName:p?.title,descriptionClassName:p?.description}),jsx(Co,{open:!!N,message:N?.message}),d&&jsx(go,{className:p?.body,children:d}),jsx(Ro,{footer:a,className:p?.footer,resolvedAction:y,resolvedCancel:T,actionPending:v,closeLocked:m,onActionClick:F}),jsx(Po,{open:!!M,message:M?.message,closeDelay:M?.closeDelay})]})}function No(e,t,o){if(!e){o(false);return}if(e.status==="success"&&e.closeDelay!==void 0&&e.closeDelay<=0){o(false);return}t(e);}var ko=async e=>{if(!e)return;if(navigator.clipboard){await navigator.clipboard.writeText(e);return}let t=document.createElement("textarea");t.setAttribute("readonly",""),t.tabIndex=-1,t.style.position="fixed",t.style.left="-9999px",t.value=e,document.body.appendChild(t);let o=document.getSelection();if(o){let r=o.rangeCount>0&&o.getRangeAt(0);t.select(),document.execCommand("copy"),r&&(o.removeAllRanges(),o.addRange(r));}document.body.removeChild(t);};var Va={initial:{scale:.5,opacity:0,filter:"blur(2px)"},animate:{scale:1,opacity:1,filter:"blur(0px)"},exit:{scale:.5,opacity:0,filter:"blur(2px)"}},Ma={opacity:{duration:.25},filter:{duration:.25},scale:{duration:.35,ease:[.34,1.56,.64,1]}},Ua={variants:Va,initial:"initial",animate:"animate",exit:"exit",transition:Ma};function ht({initial:e=false,state:t,states:o,asDiv:r,className:a,style:n,...l}){let s=r?m.div:m.span;return jsx(AnimatePresence,{initial:e,mode:"popLayout",children:jsx(s,{className:c("inline-flex items-center justify-center",a),...Ua,style:n,...l,children:o[t]},t)})}function yt({swap:e,on:t,off:o,className:r}){return jsx(ht,{state:e?"on":"off",states:{on:t,off:o},className:r})}function _a({content:e,delay:t=700,tooltipDelayDuration:o=700,variant:r="neutral",mode:a="stroke",size:n="small",as:l="button",children:s,onCopy:p,className:c$1}){let d=S$1(),[u,v]=S__default.useState(false),[m,f]=S__default.useState(false),[g,x]=S__default.useState(false),D=S__default.useRef(null),h=S__default.useRef(null);S__default.useEffect(()=>()=>{D.current&&clearTimeout(D.current),h.current&&clearTimeout(h.current);},[]);let b=S__default.useCallback(async()=>{u||(v(true),x(true),await ko(e),p?.(e),D.current=setTimeout(()=>{x(false),h.current=setTimeout(()=>v(false),150);},t));},[u,t,e,p]),C=jsx(yt,{swap:u,on:jsx(CheckCheck,{width:"1em",height:"1em"}),off:jsx(Copy,{width:"1em",height:"1em"})}),A=(()=>{switch(l){case "text":return jsx("span",{className:c("relative cursor-pointer before:absolute before:-inset-x-4 before:-inset-y-1 before:rounded-md hover:before:bg-bg-antd",c$1),onClick:b,children:jsx("span",{className:"relative z-1",children:s??e})});case "inline":return jsxs("span",{className:c("relative inline-flex cursor-pointer items-center gap-6 before:absolute before:-inset-x-4 before:-inset-y-1 before:rounded-md hover:before:bg-bg-antd",c$1),onClick:b,children:[jsx("span",{className:"relative z-1",children:s??e}),jsx("span",{className:c("inline-flex items-center text-zinc-500",u&&"text-primary-base"),children:C})]});default:return jsx(P,{variant:r,mode:a,size:n,className:c(u&&"cursor-not-allowed",c$1),onClick:b,startContent:C})}})();return jsx(i,{content:d(u?"copied":"copy"),size:n,open:g||m,delayDuration:o,onOpenChange:f,hideWhenDetached:true,children:A})}function Is({...e}){return jsx(Collapsible.Root,{"data-slot":"collapsible",...e})}function Ns({...e}){return jsx(Collapsible.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...e})}function Ss({className:e,...t}){return jsx(Collapsible.CollapsibleContent,{"data-slot":"collapsible-content",className:c("collapsible-content",e),...t})}var Ga="BadgeRoot",Mo="BadgeIcon",Uo="BadgeDot",Ct=b({slots:{root:"inline-flex w-fit appearance-none items-center justify-center border-none leading-none font-medium whitespace-nowrap transition duration-200 ease-out select-none",icon:"uicon shrink-0",dot:["uidot flex items-center justify-center","before:size-4 before:rounded-full before:bg-current"]},variants:{size:{medium:{root:"h-24 gap-4 px-10 text-md has-[>.uicon]:gap-6 has-[>.uidot]:gap-4",icon:"-mx-2 size-14",dot:"-mx-4 size-16 before:size-6"},small:{root:"h-20 gap-4 px-8 text-sm has-[>.uicon]:gap-4 has-[>.uidot]:gap-3",icon:"-mx-px size-12",dot:"-mx-4 size-16 before:size-5"},xsmall:{root:"h-16 gap-3 px-7 text-xs has-[>.uicon]:gap-4 has-[>.uidot]:gap-4",icon:"-mx-px size-10",dot:"-mx-5 size-16"}},variant:{filled:{root:"text-static-white"},outline:{root:"ring-1 ring-current ring-inset"},lighter:"",ghost:""},color:{primary:"",info:"",success:"",warning:"",error:"",neutral:""},shape:{default:"",circle:{root:"rounded-full"}},disabled:{true:{root:"cursor-not-allowed opacity-75"}}},compoundVariants:[{shape:"default",size:"xsmall",class:{root:"rounded-[3px] px-5"}},{shape:"default",size:"small",class:{root:"rounded-[4px] px-6"}},{shape:"default",size:"medium",class:{root:"rounded-lg px-7",icon:"ms-0"}},{variant:"filled",color:"primary",class:{root:"bg-primary-base"}},{variant:"filled",color:"info",class:{root:"bg-cyan-500"}},{variant:"filled",color:"success",class:{root:"bg-emerald-500"}},{variant:"filled",color:"warning",class:{root:"bg-orange-500"}},{variant:"filled",color:"error",class:{root:"bg-red-600"}},{variant:"filled",color:"neutral",class:{root:"bg-black/90"}},{variant:"outline",color:"primary",class:{root:"text-primary-base"}},{variant:"outline",color:"info",class:{root:"text-cyan-600"}},{variant:"outline",color:"success",class:{root:"text-emerald-500"}},{variant:"outline",color:"warning",class:{root:"text-orange-500"}},{variant:"outline",color:"error",class:{root:"text-red-600"}},{variant:"outline",color:"neutral",class:{root:"text-neutral-600 ring-neutral-200"}},{variant:"lighter",color:"primary",class:{root:"bg-blue-50 text-primary-base"}},{variant:"lighter",color:"info",class:{root:"bg-cyan-50 text-cyan-600"}},{variant:"lighter",color:"success",class:{root:"bg-emerald-50 text-emerald-600"}},{variant:"lighter",color:"warning",class:{root:"bg-orange-50 text-orange-600"}},{variant:"lighter",color:"error",class:{root:"bg-red-50 text-red-600"}},{variant:"lighter",color:"neutral",class:{root:"bg-neutral-100 text-neutral-600"}},{variant:"ghost",color:"primary",class:{root:"text-primary-base"}},{variant:"ghost",color:"info",class:{root:"text-cyan-600"}},{variant:"ghost",color:"success",class:{root:"text-emerald-600"}},{variant:"ghost",color:"warning",class:{root:"text-orange-600"}},{variant:"ghost",color:"error",class:{root:"text-red-600"}},{variant:"ghost",color:"neutral",class:{root:"text-neutral-600"}}],defaultVariants:{variant:"filled",color:"primary",size:"medium",shape:"default"}}),zo=({asChild:e,size:t,variant:o,color:r,shape:a,children:n,className:l,disabled:s,...p})=>{let c=S.useId(),d=e?Slot.Root:"div",{root:u}=Ct({variant:o,color:r,size:t,shape:a,disabled:s}),m=ye(n,{size:t,variant:o,color:r},[Mo,Uo],c,e);return jsx(d,{"data-slot":"badge",className:u({class:l}),...p,children:m})};zo.displayName=Ga;function Bo({className:e,size:t,variant:o,color:r,as:a,...n}){let l=a||"div",{icon:s}=Ct({size:t,variant:o,color:r});return jsx(l,{"data-slot":"icon",className:s({class:e}),...n})}Bo.displayName=Mo;function Lo({size:e,variant:t,color:o,className:r,...a}){let{dot:n}=Ct({size:e,variant:t,color:o});return jsx("div",{"data-slot":"dot",className:n({class:r}),...a})}Lo.displayName=Uo;function Us({icon:e,dot:t,children:o,asChild:r,...a}){return jsxs(zo,{asChild:r,...a,children:[e&&!r&&jsx(Bo,{as:e}),t&&!r&&jsx(Lo,{}),o]})}function Wa({className:e,scrollBarClassName:t,children:o,...r}){return jsxs(ScrollArea.Root,{"data-slot":"scroll-area",className:c("relative",e),...r,children:[jsx(ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-2 focus-visible:ring-primary-base focus-visible:outline-1",children:o}),jsx(_o,{orientation:"vertical",className:t}),jsx(_o,{orientation:"horizontal",className:t}),jsx(ScrollArea.Corner,{})]})}function _o({className:e,orientation:t="vertical",...o}){return jsx(ScrollArea.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":t,orientation:t,className:c("flex touch-none p-2 transition-colors select-none data-[orientation=horizontal]:h-10 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:border-t data-[orientation=horizontal]:border-t-transparent data-[orientation=vertical]:h-full data-[orientation=vertical]:w-10 data-[orientation=vertical]:border-l data-[orientation=vertical]:border-l-transparent",e),...o,children:jsx(ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-stroke-sub"})})}function qa({open:e,defaultOpen:t,openDelay:o=300,closeDelay:r,asChild:a=true,arrow:n=true,content:l,children:s,onOpenChange:p,...c}){return jsxs(Xa,{"data-slot":"hover-card",open:e,defaultOpen:t,openDelay:o,closeDelay:r,onOpenChange:p,children:[jsx(Ya,{asChild:a,children:s}),jsxs(Za,{...c,children:[l,n&&jsx(HoverCard.Arrow,{asChild:true,children:jsx(E,{className:"-translate-y-6.5"})})]})]})}function Xa({...e}){return jsx(HoverCard.Root,{"data-slot":"hover-card",...e})}function Ya({...e}){return jsx(HoverCard.Trigger,{"data-slot":"hover-card-trigger",...e})}function Za({className:e,align:t="center",sideOffset:o=4,collisionPadding:r=16,...a}){return jsx(HoverCard.Portal,{"data-slot":"hover-card-portal",children:jsx(HoverCard.Content,{"data-slot":"hover-card-content",align:t,sideOffset:o,collisionPadding:r,className:c("z-50 rounded-2xl bg-bg-white px-10 py-6 text-md text-text-strong shadow-regular-md ring-1 ring-stroke-soft outline-hidden duration-100 ring-inset","origin-(--radix-hover-card-content-transform-origin) data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...a})})}var Ja={initial:{opacity:0,scale:.96,y:4,filter:"blur(2px)"},exit:{opacity:0,scale:.96,y:4,filter:"blur(2px)"},animate:{opacity:1,scale:1,y:0,filter:"blur(0px)"}},en={type:"spring",bounce:.1,duration:.25},tn={ease:[.26,.08,.25,1],duration:.27};function on({activeKey:e,children:t,className:o,rootClassName:r,defaultCardHeight:a,initialKey:n,variants:l=Ja,transition:s=tn,rootTransition:p=en}){let[c,{height:d}]=Qa(),u=S.useRef(a??0);d>0&&(u.current=d);let v=e===n?a:d||u.current;return jsx(a$1,{children:jsx(m.div,{"data-slot":"animation-root",className:r,initial:false,animate:{height:v},transition:p,children:jsx("div",{ref:c,"data-slot":"animation-container",children:jsx(AnimatePresence,{mode:"popLayout",initial:false,children:jsx(m.div,{"data-slot":"animation-page",variants:l,transition:s,initial:"initial",animate:"animate",exit:"exit",className:o,children:t},e)})})})})}function de(e,t){let o=S.useRef(void 0),{current:r}=o;return S.useEffect(()=>{(!t||e!==void 0)&&(o.current=e);},[e,t]),r}var nn={type:"tween",duration:.3,ease:[.25,1,.5,1]},ln={type:"tween",duration:.38,ease:[.25,1,.5,1]},$e={type:"spring",stiffness:260,damping:30},sn={type:"tween",duration:.35,ease:"easeIn"},cn={type:"tween",duration:.35,ease:"easeOut"},pn={type:"tween",duration:.35,ease:"linear"},ve={type:"tween",duration:.25,ease:"easeInOut"},Dt=[.25,.1,.25,1],qo=1.12,dn=.93,qe={type:"tween",duration:.22,ease:Dt},un={scale:{type:"tween",duration:.22,ease:Dt},opacity:{type:"tween",duration:.16,ease:Dt}},mn={type:"spring",stiffness:260,damping:30},fn=.7,gn=.9,vn="bg-white";function Xo(e){return e?fn:gn}function Rt(e,t){return e==="x"?{x:t}:{y:t}}function Yo(e,t=nn){return {supportsDimmed:false,variants:{enterFrom:({direction:o})=>({...Rt(e,o===0?0:o>0?"100%":"-100%"),zIndex:1,transition:t}),active:{...Rt(e,0),zIndex:1,transition:t},exit:({direction:o})=>({...Rt(e,o<0?"100%":"-100%"),zIndex:0,transition:t})}}}function xn(){return {supportsDimmed:true,variants:{enterFrom:({direction:e,dimmed:t})=>e===0?{x:0,opacity:1,transition:$e}:{x:e>0?"100%":"-20%",opacity:e>0?1:Xo(t),zIndex:1,transition:$e},active:{x:0,opacity:1,zIndex:1,transition:$e},exit:({direction:e,dimmed:t})=>({x:e<0?"100%":"-20%",opacity:e<0?1:Xo(t),zIndex:e<0?5:0,transition:$e})}}}function hn(){return {supportsDimmed:false,variants:{enterFrom:({direction:e})=>({clipPath:e>0?"inset(0 100% 0 0)":"inset(0 0 0 0)",zIndex:1}),active:({direction:e})=>({clipPath:"inset(0 0 0 0)",zIndex:1,transition:e>0?sn:void 0}),exit:({direction:e})=>e<0?{clipPath:"inset(0 100% 0 0)",zIndex:2,transition:cn}:{opacity:.999,zIndex:0,transition:pn}}}}function yn(){return {supportsDimmed:false,variants:{enterFrom:({direction:e})=>e===0?{x:0,scale:1,opacity:1,zIndex:1,transition:ve}:e>0?{x:"200%",opacity:1,zIndex:2,transition:ve}:{scale:.7,opacity:0,zIndex:0,transition:ve},active:{x:0,scale:1,opacity:1,zIndex:1,transition:ve},exit:({direction:e})=>e<0?{x:"200%",opacity:1,zIndex:2,transition:ve}:{x:0,scale:.7,opacity:0,zIndex:0,transition:ve}}}}function bn(){return {supportsDimmed:false,variants:{enterFrom:({direction:e})=>e===0?{scale:1,opacity:1,zIndex:1,transition:qe}:{scale:e>0?qo:dn,opacity:0,zIndex:e>0?1:0,transition:qe},active:{scale:1,opacity:1,zIndex:1,transition:qe},exit:({direction:e})=>e<0?{scale:qo,opacity:0,zIndex:2,transition:un}:{scale:1,opacity:0,zIndex:0,transition:qe}}}}var jo={slide:Yo("x"),slideVertical:Yo("y",ln),slideLayers:xn(),reveal:hn(),pushSlide:yn(),zoomFade:bn()},An={enterFrom:{position:"relative",width:"100%"},active:{position:"relative",width:"100%"},exit:{position:"absolute",top:0,left:0,right:0,width:"100%"}};function Xe(e,t){let o=jo[e.animation].variants[t],r=An[t];if(typeof o=="function"){let l=o(e,{},{});return {...r,...l}}return typeof o=="string"?o:{...r,...o}}var Cn={enterFrom:e=>Xe(e,"enterFrom"),active:e=>Xe(e,"active"),exit:e=>Xe(e,"exit")};function Qo({activeKey:e,animation:t="slideLayers",dimmed:o=false,measureHeight:r=true,lockPointerDuringTransition:a=true,className:n,viewClassName:l,children:s},p){let c$1=de(e),d=c$1!==void 0&&e!==c$1,u=d?e>c$1?1:-1:0,v=useRef(null),[m$1,f]=useState(false),g=jo[t],x={animation:t,direction:u,dimmed:!!(o&&g.supportsDimmed)},D=Xe(x,"active"),h=typeof D=="string"?D:{...D,transition:{duration:0}},b=useRef(new Map),[C,A]=Qa(),[w,y]=useState(void 0);useLayoutEffect(()=>{if(!r||!A.height)return;let T=b.current.get(e);(!T||Math.abs(T-A.height)>1)&&(b.current.set(e,A.height),y(A.height));},[r,A.height,e]),useLayoutEffect(()=>{if(!r){y(void 0);return}let T=b.current.get(e);T&&y(T);},[r,e]),useLayoutEffect(()=>{if(!a){v.current=null,f(false);return}d&&(v.current=e,f(true));},[e,d,a]);let P=S__default.useCallback(()=>{v.current===e&&(v.current=null,f(false));},[e]);return jsx(a$1,{children:jsx(m.div,{"data-slot":"ui-transition-root",ref:p,className:c("relative w-full overflow-hidden",x.dimmed&&"bg-black",m$1&&"pointer-events-none",n),initial:false,animate:r&&w!==void 0?{height:w}:void 0,style:r&&w!==void 0?{height:w}:void 0,transition:mn,children:jsx("div",{ref:r?C:void 0,className:"relative w-full",children:jsx(AnimatePresence,{initial:false,custom:x,mode:"sync",children:jsx(m.div,{"data-slot":"ui-transition-item",custom:x,variants:Cn,initial:u===0?false:"enterFrom",animate:d?"active":h,exit:"exit",onAnimationComplete:P,className:c("w-full",vn,l),children:s},e)})})})})}Qo.displayName="UIViewTransition";var wt=S__default.forwardRef(Qo);function er(e,t){let o=de(e);S.useEffect(()=>{t&&!o&&e?Pn(t):t&&!e&&o&&Jo(t);},[t,e,o]),S.useEffect(()=>()=>{t&&e&&Jo(t);},[t,e]);}function Pn(e){if(e){let o=e.clientHeight,r=(o-24)/o;e.style.overflow="hidden",e.style.willChange="transform",e.style.transition="transform 250ms linear",e.style.transform=`translateY(calc(env(safe-area-inset-top, 0) - 24px)) scale(${r})`;}}function Jo(e){function t(){e.style.removeProperty("overflow"),e.style.removeProperty("will-change"),e.style.removeProperty("transition"),e.removeEventListener("transitionend",t);}e&&(e.style.removeProperty("transform"),e.addEventListener("transitionend",t));}var Dn={variants:{initial:{opacity:0},animate:{opacity:.08},exit:{opacity:0}},initial:"initial",animate:"animate",exit:"exit"},wn={initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:24}},Tn={variants:wn,initial:"initial",animate:"animate",exit:"exit"},In={duration:.3,delay:.35},Nn={variants:{initial:{borderRadius:24,opacity:0},exit:{borderRadius:24,opacity:0},animate:{borderRadius:24,opacity:1}},initial:"initial",animate:"animate",exit:"exit"},Sn=100,kn=300,En={width:420,height:"auto"};function Ze(e){return typeof e=="number"?`${e}px`:e}function or(e){return typeof e=="object"?e:{width:e,height:e}}function On({open:e,loading:t,visual:o,backgroundViewRef:r,children:a,className:n,containerClassName:l,defaultSize:s$1=Sn,expandedSize:p=En,onBackdropClick:c$1,onCloseComplete:d,onContentAnimationComplete:u,onExpandedChangeComplete:v}){let[m$1,f]=S.useState(!!e),[g,x,D]=s(false),[h,b]=S.useState(false),C=S.useRef(false),A=S.useRef(null),w=S.useRef(false),y=S.useRef(null),P=or(s$1),T=or(p),N=Ze(P.width),M=Ze(P.height),F=Ze(T.width),W=Ze(T.height),U=S.useMemo(()=>g?{width:F,height:W}:{width:N,height:M},[M,N,g,W,F]);er(!!(e&&g&&r?.current),r?.current);let ne=S.useCallback(()=>{y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{y.current=null,f(false);},kn);},[]),he=S.useCallback(()=>{if(A.current!==null&&(v?.(A.current),A.current=null),!C.current){e&&!t&&(!g||!a)&&b(true);return}C.current=false,ne();},[a,g,t,v,e,ne]),Je=S.useCallback(()=>{b(false),w.current&&(w.current=false,d?.());},[d]),ie=S.useCallback(z=>{if(z==="animate"){e&&!t&&b(true),u?.("entered");return}z==="exit"&&(b(false),u?.("exited"));},[t,u,e]),Ne=S.useCallback(z=>{z==="animate"&&e&&!t&&!g&&!C.current&&b(true);},[g,t,e]),St=S.useCallback(z=>{h&&c$1?.(z);},[h,c$1]);return S.useEffect(()=>{e&&(y.current&&(clearTimeout(y.current),y.current=null),C.current=false,w.current=false,b(false),f(true));},[e]),S.useEffect(()=>{if(m$1){if(e){if(t){g&&(A.current=false,b(false)),D();return}g||(A.current=true,b(false)),x();return}if(w.current=true,b(false),!C.current){if(g){A.current=false,C.current=true,D();return}ne();}}},[D,g,t,e,m$1,ne,x]),S.useEffect(()=>()=>{y.current&&clearTimeout(y.current);},[]),jsx(a$1,{children:jsx(AnimatePresence,{onExitComplete:Je,children:m$1&&jsxs(Portal.Root,{"data-slot":"ui-modal-root",children:[jsx(m.div,{"data-slot":"ui-modal-backdrop",className:"fixed inset-0 z-10 bg-black",onClick:St,onAnimationComplete:Ne,...Dn}),jsxs(m.div,{layout:true,"data-slot":"ui-modal-container","data-state":g&&"expanded",className:c("flex flex-col items-center justify-start bg-white p-16 ring-1 ring-stone-950/6","fixed top-1/2 left-1/2 z-20 -translate-x-1/2 -translate-y-1/2",l),style:U,onAnimationComplete:Ne,onLayoutAnimationComplete:he,...Nn,children:[jsx(m.div,{"data-slot":"ui-modal-visual",layout:true,children:o}),jsx(AnimatePresence,{children:g&&jsx(m.div,{"data-slot":"ui-modal-content",onAnimationComplete:ie,...Tn,transition:In,className:c("flex w-full flex-col overflow-hidden",n),children:a},"content")})]})]})})})}var ar=S__default.createContext(null);function Vn(){let e=S__default.useContext(ar);if(!e)throw new Error("useUIScreen must be used within <UIScreen>");return e}function Nt({value:e,animation:t,className:o,children:r}){return jsx(Fragment,{children:r})}Nt.displayName="UIScreen.View";function Mn(e){return S__default.isValidElement(e)&&e.type===Nt}function nr(e,t=[]){return S__default.Children.forEach(e,o=>{if(S__default.isValidElement(o)&&o.type===S__default.Fragment){nr(o.props.children,t);return}if(!Mn(o))return;let r=o.props.value,a=Array.isArray(r)?Array.from(r):[r];t.push({values:a,animation:o.props.animation,className:o.props.className,activeKey:t.length,children:o.props.children});}),t}function Un(e){let t=new Set;e.forEach(({values:o})=>{if(!o.length)throw new Error("UIScreen.View value must not be an empty array.");o.forEach(r=>{if(t.has(r))throw new Error(`Duplicate UIScreen.View value "${String(r)}".`);t.add(r);});});}function ir({screen:e,defaultScreen:t,onScreenChange:o,children:r,...a},n){let l=e!==void 0,[s,p]=S__default.useState(t),c$1=e??s,d=de(c$1),u=S__default.useRef(null),v=nr(r);if(!v.length)throw new Error("UIScreen requires at least one UIScreen.View child.");if(e!==void 0&&t!==void 0)throw new Error("UIScreen accepts either screen or defaultScreen, but not both.");if(c$1===void 0)throw new Error("UIScreen requires either a screen or defaultScreen prop.");let m=c$1;Un(v);let f=v.find(h=>h.values.includes(m));if(!f)throw new Error(`UIScreen could not find a UIScreen.View matching screen "${String(m)}".`);let g=u.current,x=g!==null&&d===g.from&&m===g.to;S__default.useLayoutEffect(()=>{let h=u.current;h&&m!==h.from&&(u.current=null);},[m]);let D=S__default.useMemo(()=>({screen:m,navigate:(h,b)=>{let C=b?.animation;u.current=h!==m&&C?{from:m,to:h,animation:C}:null,l||p(h),o?.(h);}}),[l,o,m]);return jsx(ar.Provider,{value:D,children:jsx(wt,{ref:n,...a,animation:(x?g.animation:f.animation)??a.animation,viewClassName:c(a.viewClassName,f.className),activeKey:f.activeKey,children:f.children})})}ir.displayName="UIScreen";var zn=S__default.forwardRef(ir),Bn=Object.assign(zn,{View:Nt});var _n=()=>{let[,e]=S.useState(false);return S.useCallback(()=>{e(t=>!t);},[])};var Fn=(e=false)=>{let[t,o]=S.useState(e),r=S.useCallback(()=>{o(a=>!a);},[]);return [t,r]};
|
|
2
|
-
export{
|
|
1
|
+
import {k,a as a$1,l,p,s,f}from'./chunk-6YOHG3I6.js';export{r as DropdownMenu,p as Skeleton,o as Switch,j as Tabs,b as UIProvider,d as debounce,q as dropdownMenuStyles,f as mergeRefs,e as throttle,s as useFlag}from'./chunk-6YOHG3I6.js';import {b,c,F,J as J$1,G,H,I,P,S as S$1,i,V,E,T}from'./chunk-7T5LUFMY.js';export{P as Button,v as Card,D as Command,R as FancyButton,K as Popover,M as Spinner,i as Tooltip,f as TooltipArrow,h as TooltipProvider,d as TooltipRoot,e as TooltipTrigger,N as baseButtonStyle,O as buttonVariants,c as cn,Q as fancyButtonVariants,g as tooltipVariants,b as tv,a as twMergeConfig,L as useDisableContentMenu}from'./chunk-7T5LUFMY.js';import {a}from'./chunk-M7AD2PUT.js';import {Slot,Collapsible,ScrollArea,HoverCard,Portal,AlertDialog}from'radix-ui';import*as S from'react';import S__default,{useRef,useState,useLayoutEffect}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {Trash2Icon,TriangleAlertIcon,LockKeyhole,NotebookPenIcon,CircleQuestionMark,CircleAlert,Copy,CheckCheck,XIcon,Check}from'lucide-react';import {m,AnimatePresence,useAnimate}from'motion/react';import {OTPInput,REGEXP_ONLY_DIGITS,OTPInputContext}from'input-otp';import {Drawer}from'vaul';import nn from'react-use-measure';var zt=new WeakMap;function Bt(e){return((...t)=>{let o=zt.get(e),r=t.map(String).join("_");if(o){let n=o.get(r);if(n)return n}else o=new Map,zt.set(e,o);let a=e(...t);return o.set(r,a),a})}function di(e,t,o="zh-CN"){return new Intl.NumberFormat(o,t).format(e)}function ui(e,t,o="zh-CN"){return new Intl.NumberFormat(o,{style:"currency",...t}).format(e)}function mi(e,t="en-US"){return new Intl.NumberFormat(t,{notation:"compact",compactDisplay:"short"}).format(e)}var fi=Bt((e,t=2)=>e.replace(/[.,!@#$%^&*()_+=\-`~[\]/\\{}:"|<>?]+/gi,"").trim().split(/\s+/).slice(0,t).map(o=>{if(!o.length)return "";if(/\s+/.test(e))return o.match(/./u)?.[0].toUpperCase();let r=new RegExp(".".repeat(t),"u"),a=o.match(r)?.[0];return a?a.charAt(0).toUpperCase()+a.slice(1):e.charAt(0).toUpperCase()+e.slice(1,2)}).join(""));function hi(e,t){return Array.isArray(t)?e.filter(o=>t.some(r=>r===o.value)):e.find(o=>o.value===t)}function yi(e){return Array.from(new Set(e))}function bi(e){return e.filter(yr)}function yr(e){return !!e}function br(e,t){return t.reduce((o,r)=>(o[r]=e[r],o),{})}function Ai(e,t){let o=new Set(t.map(String)),r=Object.keys(e).filter(a=>!o.has(a));return br(e,r)}var jt={};a(jt,{AVATAR_ROOT_NAME:()=>Ft,Badge:()=>Qt,BrandLogo:()=>Yt,Image:()=>at,Indicator:()=>$t,Notification:()=>Zt,Root:()=>Wt,Status:()=>Xt,avatarRingVariants:()=>Kt,avatarStatusVariants:()=>qt,avatarVariants:()=>Ue});function ye(e,t,o,r,a){let n=S__default.Children.map(e,(l,s)=>{if(!S__default.isValidElement(l))return l;let p=l.type?.displayName||"",c=o.includes(p)?t:{},d=l.props;return S__default.cloneElement(l,{...c,key:`${r}-${s}`},ye(d?.children,t,o,r,d?.asChild))});return a?n?.[0]:n}function _t(e){let t=S.useId();return jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 80 80",...e,children:[jsxs("g",{fill:"#fff",clipPath:`url(#${t})`,children:[jsx("ellipse",{cx:40,cy:78,fillOpacity:.72,rx:32,ry:24}),jsx("circle",{cx:40,cy:32,r:16,opacity:.9})]}),jsx("defs",{children:jsx("clipPath",{id:t,children:jsx("rect",{width:80,height:80,fill:"#fff",rx:40})})})]})}function Lt(e){let t=S.useId(),o=S.useId(),r=S.useId();return jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:56,height:56,fill:"none",viewBox:"0 0 56 56",...e,children:[jsxs("g",{clipPath:`url(#${t})`,children:[jsx("rect",{width:56,height:56,className:"fill-bg-soft",rx:28}),jsx("path",{className:"fill-bg-soft",d:"M0 0h56v56H0z"}),jsx("g",{filter:`url(#${o})`,opacity:.48,children:jsx("path",{fill:"#fff",d:"M7 24.9a2.8 2.8 0 012.8-2.8h21a2.8 2.8 0 012.8 2.8v49a2.8 2.8 0 01-2.8 2.8h-21A2.8 2.8 0 017 73.9v-49z"})}),jsx("path",{className:"fill-bg-soft",d:"M12.6 28.7a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2z"}),jsx("g",{filter:`url(#${r})`,children:jsx("path",{fill:"#fff",fillOpacity:.8,d:"M21 14a2.8 2.8 0 012.8-2.8h21a2.8 2.8 0 012.8 2.8v49a2.8 2.8 0 01-2.8 2.8h-21A2.8 2.8 0 0121 63V14z"})}),jsx("path",{className:"fill-bg-soft",d:"M26.6 17.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7V22a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm9.8-29.4a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7V22a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2z"})]}),jsxs("defs",{children:[jsxs("filter",{id:o,width:34.6,height:62.6,x:3,y:18.1,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),jsx("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:2}),jsx("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_36237_4888"}),jsx("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_36237_4888",result:"shape"})]}),jsxs("filter",{id:r,width:42.6,height:70.6,x:13,y:3.2,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),jsx("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:4}),jsx("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_36237_4888"}),jsx("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_36237_4888",result:"shape"}),jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),jsx("feOffset",{dy:4}),jsx("feGaussianBlur",{stdDeviation:2}),jsx("feComposite",{in2:"hardAlpha",k2:-1,k3:1,operator:"arithmetic"}),jsx("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0"}),jsx("feBlend",{in2:"shape",result:"effect2_innerShadow_36237_4888"})]}),jsx("clipPath",{id:t,children:jsx("rect",{width:56,height:56,fill:"#fff",rx:28})})]})]})}var Ft="AvatarRoot",Ht="AvatarImage",Gt="AvatarIndicator",Cr="AvatarStatus",Pr="AvatarBrandLogo",Rr="AvatarNotification",Dr="AvatarBadge",rt=Slot.Root,Ue=b({slots:{root:["relative flex shrink-0 items-center justify-center rounded-full","text-center uppercase select-none"],image:"size-full rounded-full object-cover",indicator:"absolute flex size-32 items-center justify-center drop-shadow-[0_2px_4px_#1b1c1d0a]"},variants:{withRing:{true:""},size:{80:{root:"size-80 text-title-h5"},72:{root:"size-72 text-title-h5"},64:{root:"size-64 text-title-h5"},56:{root:"size-56 text-label-lg"},48:{root:"size-48 text-label-lg"},42:{root:"size-42 text-label-md"},38:{root:"size-38 text-label-md"},32:{root:"size-32 text-label-sm"},24:{root:"size-24 text-label-xs"},20:{root:"size-20 text-label-xs"}},color:{gray:{root:"bg-bg-soft text-static-black/80"},yellow:{root:"bg-yellow-500 text-static-white"},blue:{root:"bg-blue-500 text-static-white"},sky:{root:"bg-sky-500 text-static-white"},purple:{root:"bg-purple-500 text-static-white"},red:{root:"bg-red-500 text-static-white"},green:{root:"bg-green-500 text-static-white"},teal:{root:"bg-teal-500 text-static-white"},violet:{root:"bg-violet-500 text-static-white"},pink:{root:"bg-pink-500 text-static-white"},orange:{root:"bg-orange-500 text-static-white"}}},compoundVariants:[{size:["80","72"],class:{indicator:"-right-8"}},{size:"64",class:{indicator:"-right-8 scale-[.875]"}},{size:"56",class:{indicator:"-right-6 scale-75"}},{size:"48",class:{indicator:"-right-6 scale-[.625]"}},{size:"42",class:{indicator:"-right-6 scale-[.5725]"}},{size:"38",class:{indicator:"-right-6 scale-[.5625]"}},{size:"32",class:{indicator:"-right-6 scale-50"}},{size:"24",class:{indicator:"-right-4 scale-[.375]"}},{size:"20",class:{indicator:"-right-4 scale-[.3125]"}},{withRing:true,size:"80",class:{indicator:"-right-12"}},{withRing:true,size:"72",class:{indicator:"-right-13"}},{withRing:true,size:"64",class:{indicator:"-right-12"}},{withRing:true,size:"56",class:{indicator:"-right-10"}},{withRing:true,size:["48","42","38","32"],class:{indicator:"-right-9"}},{withRing:true,size:["24","20"],class:{indicator:"-right-7"}}],defaultVariants:{size:"48",color:"gray"}}),Kt=b({base:"ring-2 ring-offset-2",variants:{color:{gray:"ring-black/10",yellow:"ring-yellow-500",blue:"ring-blue-500",sky:"ring-sky-500",purple:"ring-purple-500",red:"ring-red-500",green:"ring-green-500",teal:"ring-teal-500",violet:"ring-violet-500",pink:"ring-pink-500",orange:"ring-orange-500",white:"ring-static-white",black:"ring-static-black"}},defaultVariants:{color:"gray"}}),at=S.forwardRef(({asChild:e,className:t,size:o,color:r,...a},n)=>{let l=e?rt:"img",{image:s}=Ue({size:o,color:r});return jsx(l,{ref:n,className:s({class:t}),...a})});at.displayName=Ht;var Wt=S.forwardRef(({asChild:e,children:t,size:o,color:r,ring:a,className:n,placeholderType:l="user",...s},p)=>{let c$1=S.useId(),d=e?rt:"div",u=a?Kt({color:a===true?r:typeof a=="string"?a:void 0}):void 0,{root:v}=Ue({size:o,color:r}),m=c(v(),u,n),f={size:o,color:r};if(!t)return jsx("div",{className:m,...s,children:jsx(at,{asChild:true,children:l==="company"?jsx(Lt,{}):jsx(_t,{})})});let g=ye(t,f,[Ht,Gt],c$1,e);return jsx(d,{ref:p,className:m,...s,children:g})});Wt.displayName=Ft;function $t({size:e,color:t,className:o,position:r="bottom",withRing:a,...n}){let{indicator:l}=Ue({size:e,color:t,withRing:a});return jsx("div",{className:c(l({class:o}),{"top-0 origin-top-right":r==="top","bottom-0 origin-bottom-right":r==="bottom"}),...n})}$t.displayName=Gt;var qt=b({base:"box-content size-12 rounded-full border-4 border-bg-white",variants:{status:{online:"bg-success-base",offline:"bg-gray-500",busy:"bg-error-base",away:"bg-away-base"}},defaultVariants:{status:"online"}});function Xt({status:e,className:t,...o}){return jsx("div",{className:qt({status:e,class:t}),...o})}Xt.displayName=Cr;var Yt=S.forwardRef(({asChild:e,className:t,...o},r)=>jsx(e?rt:"img",{draggable:false,ref:r,className:c("box-content size-24 rounded-full border-2 border-bg-white",t),...o}));Yt.displayName=Pr;function Zt({className:e,...t}){return jsx("div",{className:c("box-content size-12 rounded-full border-2 border-bg-white bg-error-base",e),...t})}Zt.displayName=Rr;function Qt({className:e,...t}){return jsx("div",{className:c("box-content rounded-full border-2 border-bg-white bg-error-base px-6 text-static-white",e),...t})}Qt.displayName=Dr;function me({className:e,iconClassName:t,variant:o="neutral",mode:r="stroke",size:a="small",...n}){return jsx(P,{variant:o,mode:r,size:a,className:c("absolute top-12 right-10 z-10 m-auto aspect-square gap-0 rounded-full border-transparent text-text-soft hover:text-text-strong",e),startContent:jsx(XIcon,{className:c("size-16",t)}),...n})}var nt=b({slots:{root:"relative flex w-fit max-w-xl flex-col rounded-[12px] border border-stroke-soft p-0 text-md",content:"text-md",arrowCls:"",header:"flex items-center select-none",close:"absolute rounded-full"},variants:{variant:{default:{root:"gap-8 bg-bg-white p-16",close:"top-12 right-12 hover:bg-bg-weak"},accent:{root:"bg-bg-weak p-4",content:"rounded-[8px] bg-bg-white px-12 py-8 shadow-sm",header:"px-12 py-4 pb-6",close:"top-9 right-8 hover:bg-bg-white",arrowCls:"bg-bg-weak"}}},defaultVariants:{variant:"default"}});function Tr({variant:e,className:t,contentClassName:o,closeableClassName:r,side:a="bottom",align:n="start",arrow:l=true,unstyled:s=true,closeable:p=true,sideOffset:c$1=1,title:d,content:u,children:v,asChild:m,defaultOpen:f,open:g,onOpenChange:x,onClose:D,...h}){let{root:b,content:C,header:A,close:w,arrowCls:y}=nt({variant:e}),[P,T]=S__default.useState(f??false),N=g!==void 0,M=N?g:P,F$1=S__default.useCallback(W=>{N||T(W),x?.(W);},[N,x]);return jsxs(F,{open:M,onOpenChange:F$1,children:[N&&M&&jsx(J$1,{}),jsx(G,{className:c(N&&M&&"relative z-20"),asChild:m,children:v}),jsxs(H,{className:b({className:t}),arrowClassName:y(),unstyled:s,side:a,align:n,sideOffset:c$1,arrow:l,...h,children:[d&&jsx("header",{className:A({className:p&&"pe-28"}),children:typeof d=="string"?jsx("h3",{className:"m-0 text-title-h6 text-text-strong",children:d}):d}),p&&jsx(I,{asChild:true,onClick:D,children:jsx(me,{size:"xsmall",mode:"ghost",className:w({class:c("size-24 p-0",r)})})}),jsx("div",{className:C({className:o}),children:u})]})]})}function kr({variant:e="default",title:t,content:o,children:r,defaultOpen:a,className:n,side:l$1="top",align:s="center",sideOffset:p=1,arrow:c$1=true,open:d,contentClassName:u,onOpenChange:v,onConfirm:m$1,onCancel:f,...g}){let{root:x,content:D,header:h,arrowCls:b}=nt({variant:e}),[C,A]=S__default.useState(a??false),w=d!==void 0,y=w?d:C,P$1=S__default.useCallback(F=>{w||A(F),v?.(F);},[w,v]),[T,N]=S__default.useState(false),M=S__default.useCallback(async()=>{P$1(false);try{N(!0),await m$1?.();}catch{}finally{N(false);}},[P$1,m$1]);return jsxs(F,{open:y,onOpenChange:P$1,children:[jsx(AnimatePresence,{children:y&&jsx(J$1,{as:m.div,...l,className:"bg-black/5"})}),jsx(G,{className:c(y&&"relative z-20"),children:jsx("div",{className:"inline-flex items-center",children:S__default.isValidElement(r)?S__default.cloneElement(r,{loading:T}):r})}),jsxs(H,{className:x({className:c("max-w-lg",n)}),arrowClassName:b(),unstyled:true,side:l$1,align:s,sideOffset:p,arrow:c$1,...g,children:[t&&jsxs("header",{className:h({className:"gap-6"}),children:[jsx(CircleAlert,{className:"text-red-500",size:16}),jsx("h4",{className:"m-0 text-15 leading-26 font-medium text-text-strong",children:t})]}),jsxs("div",{className:D({className:u}),children:[o,jsxs("div",{className:"mt-8 flex justify-end gap-12",children:[jsx(I,{unstyled:true,onClick:f,asChild:true,children:jsx(P,{size:"xsmall",variant:"neutral",mode:"stroke",className:"h-26",children:"Cancel"})}),jsx(P,{size:"xsmall",mode:"stroke",className:"h-26",onClick:M,children:"Confirm"})]})]})]})]})}var oo=b({slots:{group:"flex items-center",slot:["relative flex items-center justify-center overflow-hidden border bg-white font-medium text-text-strong transition-all outline-none","data-[active=true]:border-primary-base data-[active=true]:ring-blue-100 data-[active=true]:aria-invalid:border-red-500 data-[active=true]:aria-invalid:ring-red-100","aria-invalid:border-red-500 aria-invalid:ring-2 aria-invalid:ring-red-100 aria-invalid:ring-offset-1 data-[active=true]:ring-2 data-[active=true]:ring-offset-1"]},variants:{variant:{filled:{slot:"border-black/5 bg-bg-weak aria-invalid:bg-red-50 data-[active=true]:bg-bg-white"},stroke:{slot:"border-stroke-soft"}},size:{xsmall:{group:"gap-8",slot:"size-28 rounded-lg text-md"},small:{group:"gap-10",slot:"size-32 rounded-xl text-md"},medium:{group:"gap-12",slot:"size-36 rounded-xl text-lg"},large:{group:"gap-14",slot:"size-40 rounded-2xl text-xl"}}},defaultVariants:{size:"small",variant:"stroke"}}),it=S.createContext({}),Br=[0,-10,8,-8,6,-4,2,0],_r={duration:.42,ease:"easeInOut"};function Lr({className:e,slotClassName:t,shakeRef:o}){let{size:r}=S.useContext(it),a=S.useContext(OTPInputContext),[n,l]=useAnimate(),s=S.useRef(null),{group:p}=oo({size:r}),c=S.useCallback(()=>{if(s.current)return s.current;if(!n.current)return Promise.resolve();let d=l(n.current,{x:Br},_r),u=Promise.resolve(d).then(()=>{}).finally(()=>{s.current=null;});return s.current=u,u},[l,n]);return S.useEffect(()=>(o.current=c,()=>{o.current=()=>Promise.resolve(),s.current=null;}),[c,o]),jsx("div",{ref:n,"data-slot":"input-otp-group",className:p({className:e}),children:a.slots.map((d,u)=>jsx(Hr,{...d,className:t},u))})}var Fr={initial:{opacity:0,y:20},animate:{opacity:1,y:0,transition:{type:"tween",ease:[.25,.1,.25,1],duration:.2}},exit:{opacity:0,y:20,transition:{type:"tween",ease:[.25,.1,.25,1],duration:.15}}};function Hr({char:e,hasFakeCaret:t,isActive:o,className:r,placeholderChar:a,...n}){let{size:l,variant:s,"aria-invalid":p}=S.useContext(it),{slot:c}=oo({size:l,variant:s});return jsxs("div",{"aria-label":a??"","data-slot":"input-otp-slot","data-active":o,"aria-invalid":p,className:c({className:r}),...n,children:[jsx(AnimatePresence,{mode:"wait",initial:false,children:e&&jsx(m.span,{...Fr,children:e},e)}),t&&jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsx("div",{className:"h-16 w-px animate-caret-blink bg-bg-sub duration-1000"})})]})}function Gr({maxLength:e=6,size:t,variant:o,className:r,classNames:a,ref:n,pattern:l=REGEXP_ONLY_DIGITS,"aria-invalid":s,...p}){let c$1=S.useRef(null),d=S.useRef(()=>Promise.resolve());return S.useImperativeHandle(n,()=>({get input(){return c$1.current},focus:()=>c$1.current?.focus(),blur:()=>c$1.current?.blur(),shake:()=>d.current()}),[]),jsx(a$1,{children:jsx(it,{value:{size:t,variant:o,"aria-invalid":s},children:jsx(OTPInput,{ref:c$1,"data-slot":"input-otp",maxLength:e,className:c("disabled:cursor-not-allowed",a?.input),containerClassName:c("group flex items-center has-disabled:opacity-70",a?.container),pattern:l,pushPasswordManagerStrategy:"none",spellCheck:false,...p,children:jsx(Lr,{className:a?.group,slotClassName:r,shakeRef:d})})})})}function ro({...e}){return jsx(Drawer.Root,{"data-slot":"drawer",...e})}function ao({...e}){return jsx(Drawer.Trigger,{"data-slot":"drawer-trigger",...e})}function Wr({...e}){return jsx(Drawer.Portal,{"data-slot":"drawer-portal",...e})}function lt({...e}){return jsx(Drawer.Close,{"data-slot":"drawer-close",...e})}function $r({className:e,...t}){return jsx(Drawer.Overlay,{"data-slot":"drawer-overlay",className:c("fixed inset-0 z-50 bg-black/10 data-closed:animate-out data-closed:fade-out-0 data-open:animate-in data-open:fade-in-0",e),...t})}var qr={top:"max-h-[80vh]",bottom:"mt-96 max-h-[80vh]",left:"w-3/5",right:"w-3/5"};function no({className:e,direction:t,children:o,...r}){return jsxs(Wr,{"data-slot":"drawer-portal",children:[jsx($r,{}),jsx(Drawer.Content,{"data-slot":"drawer-content",className:c("group/drawer-content @container fixed z-50 m-auto flex h-auto flex-col overflow-clip rounded-3xl bg-static-white outline-none",t&&qr[t],e),...r,children:o})]})}function io({className:e,...t}){return jsx("div",{"data-slot":"drawer-header",className:c("flex flex-col px-16 py-12",e),...t})}function st({className:e,...t}){return jsx("div",{"data-slot":"drawer-body",className:c("scrollbar-thin overflow-y-auto overscroll-contain p-16 select-text",e),...t})}function lo({className:e,...t}){return jsx("div",{"data-slot":"drawer-footer",className:c("mt-auto flex flex-col gap-8 px-16 py-18",e),...t})}function ct({className:e,...t}){return jsx(Drawer.Title,{"data-slot":"drawer-title",className:c("m-0 text-xl leading-32 font-medium text-text-strong",e),...t})}function pt({className:e,...t}){return jsx(Drawer.Description,{"data-slot":"drawer-description",className:c("m-0 text-md text-text-sub",e),...t})}var jr=k({y:12,scale:.98}),so=m.create(st);function Jr({direction:e="right",dismissible:t=true,closeable:o=true,skeleton:r,className:a,classNames:n,title:l$1,description:s,footer:p,trigger:c$1,anchorContainer:d,children:u,open:v,onOpenChange:m,loading:f,handleOnly:g=true,style:x,width:D,gutter:h=8,okButtonProps:b,closeButtonProps:C,animation:A=true,onClose:w,onOk:y,...P$1}){let T=S$1(),N=typeof h=="number"?`${h}px`:h,M=S__default.useMemo(()=>({"--initial-transform":`calc(100% + ${N})`,...ta(e,N),...x,width:D}),[e,N,D]),[F,W]=S__default.useState(false),[z,ne]=S__default.useState(false),he=v!==void 0,Je=he?v:F,ie=S__default.useCallback(B=>{!B&&z||(he||W(B),m?.(B));},[he,m,z]),Ne=S__default.useCallback(async()=>{if(!y){ie(false);return}let B=y();if(B instanceof Promise){ne(true);try{await B,ie(!1);}finally{ne(false);}}else ie(false);},[y,ie]);return jsxs(ro,{container:d,direction:e,dismissible:!z&&t,handleOnly:g,autoFocus:true,open:Je,onOpenChange:ie,...P$1,children:[c$1&&jsx(ao,{asChild:true,children:c$1}),jsxs(no,{className:c(d&&d!==document.body&&"absolute",a),direction:e,style:M,children:[o&&jsx(lt,{className:"aspect-square size-32 -translate-y-1 px-8",disabled:z,onClick:t?void 0:w,asChild:true,children:jsx(me,{})}),jsx(ct,{className:"sr-only hidden",children:"Drawer"}),jsx(pt,{className:"sr-only hidden",children:"Description"}),(l$1||s)&&jsxs(io,{className:c("border-b border-b-stroke-antd",n?.header),children:[l$1&&jsx(ct,{className:"pe-42",asChild:typeof l$1!="string",children:l$1}),s&&jsx(pt,{children:s})]}),!A&&jsx(st,{className:n?.body,children:u}),A&&jsx(a$1,{children:jsx(AnimatePresence,{mode:"wait",children:f?jsx(so,{...l,className:c(n?.body,"overflow-hidden"),children:r??jsx(ea,{count:5})},"skeleton"):jsx(so,{...jr,className:n?.body,children:u},"content")})}),p===null?jsx("div",{className:c("mt-auto h-16",n?.footer)}):jsxs(lo,{className:c("border-t border-t-stroke-antd",!p&&"flex-col gap-8 @[420px]:flex-row-reverse",n?.footer),children:[p,!p&&jsxs(Fragment,{children:[jsx(P,{variant:"neutral",mode:"filled",className:"w-full @[420px]:w-7/10 @[620px]:w-6/10",...b,loading:f||z,onClick:Ne,children:b?.children??T("ok")}),jsx(lt,{asChild:true,children:jsx(P,{variant:"neutral",mode:"stroke",className:"w-full @[420px]:w-3/10 @[620px]:w-4/10",...C,disabled:z,onClick:t?void 0:w,children:C?.children??T("close")})})]})]})]})]})}function ea({count:e=5}){let t=Array.from({length:e});return jsxs("div",{className:"flex flex-col gap-16",children:[jsxs("div",{className:"flex flex-row items-center gap-12",children:[jsx(p,{className:"size-58 rounded-2xl"}),jsxs("div",{className:"flex flex-1 flex-col gap-4",children:[jsx(p,{className:"mb-4 h-14 w-3/10"}),jsx(p,{className:"h-10 w-7/10"}),jsx(p,{className:"h-10 w-9/10"})]})]}),t.map((o,r)=>jsxs("div",{className:"flex flex-col gap-8",children:[jsx(p,{className:"h-12 w-5/10"}),jsx(p,{className:"h-12 w-7/10"}),jsx(p,{className:"h-12 w-full"})]},r))]})}function ta(e,t){return {top:{left:t,right:t,top:t},bottom:{left:t,right:t,bottom:t},left:{top:t,bottom:t,left:t},right:{top:t,bottom:t,right:t}}[e]??{}}var ra={};function aa(e){let{destroyPayloadOnClose:t=true,onOpen:o,getTitle:r,title:a,onOpenChange:n,onAnimationEnd:l,...s}=e??ra,[p,c]=S__default.useState(false),[d,u]=S__default.useState(),[v,m]=S__default.useState(),f=S__default.useRef(null),[g,x]=S__default.useState(false),D=S__default.useCallback(async P=>{f.current?.abort();let T=new AbortController;if(f.current=T,P&&u(P),c(true),o){x(true);try{let N=await o(P,T.signal);T.signal.aborted||m(N);}finally{T.signal.aborted||x(false);}}},[o]);S__default.useEffect(()=>()=>{f.current?.abort(),f.current=null;},[]);let h=S__default.useCallback(()=>{f.current?.abort(),f.current=null,x(false),c(false);},[]),b=S__default.useCallback(P=>{P||(f.current?.abort(),f.current=null,x(false)),c(P),n?.(P);},[n]),C=S__default.useCallback(P=>{!P&&t&&(u(void 0),m(void 0)),l?.(P);},[t,l]),A=S__default.useMemo(()=>({payload:d,result:v}),[d,v]),w=r?.(g,A);return [{...s,title:w||a,...o&&{loading:g},open:p,onOpenChange:b,onClose:h,onAnimationEnd:C},A,D,h]}var na={variant:"error"},ze={variant:"neutral",mode:"stroke"};function co(){let e=S$1(),t=e("ok"),o=e("submit"),r=e("continue"),a=e("delete"),n=e("cancel"),l=S.useMemo(()=>({default:{text:t},info:{text:t},form:{text:o},otp:false,warning:{text:r},destructive:{text:a,buttonProps:na}}),[r,a,t,o]),s=S.useMemo(()=>({default:{text:n,buttonProps:ze},info:false,form:{text:n,buttonProps:ze},otp:false,warning:{text:n,buttonProps:ze},destructive:{text:n,buttonProps:ze}}),[n]);return {DEFAULT_ALERT_DIALOG_ACTION:l,DEFAULT_ALERT_DIALOG_CANCEL:s}}var la=b({base:"flex shrink-0 items-center justify-center rounded-2xl ring-1 ring-transparent",variants:{variant:{filled:"text-static-white",lighter:"",outline:"ring-current"},ring:{true:""},color:{neutral:"",slate:"",red:"",orange:"",amber:"",yellow:"",lime:"",green:"",emerald:"",teal:"",cyan:"",sky:"",blue:"",indigo:"",violet:"",purple:"",fuchsia:"",pink:"",rose:""}},compoundVariants:[{variant:"filled",color:"neutral",class:"bg-black/90"},{variant:"filled",color:"slate",class:"bg-slate-500"},{variant:"filled",color:"red",class:"bg-red-500"},{variant:"filled",color:"orange",class:"bg-orange-500"},{variant:"filled",color:"amber",class:"bg-amber-500"},{variant:"filled",color:"yellow",class:"bg-yellow-500"},{variant:"filled",color:"lime",class:"bg-lime-500"},{variant:"filled",color:"green",class:"bg-green-500"},{variant:"filled",color:"emerald",class:"bg-emerald-500"},{variant:"filled",color:"teal",class:"bg-teal-500"},{variant:"filled",color:"cyan",class:"bg-cyan-500"},{variant:"filled",color:"sky",class:"bg-sky-500"},{variant:"filled",color:"blue",class:"bg-blue-500"},{variant:"filled",color:"indigo",class:"bg-indigo-500"},{variant:"filled",color:"violet",class:"bg-violet-500"},{variant:"filled",color:"purple",class:"bg-purple-500"},{variant:"filled",color:"fuchsia",class:"bg-fuchsia-500"},{variant:"filled",color:"pink",class:"bg-pink-500"},{variant:"filled",color:"rose",class:"bg-rose-500"},{variant:"filled",ring:true,color:"neutral",class:"ring-neutral-700"},{variant:"filled",ring:true,color:"slate",class:"ring-slate-600"},{variant:"filled",ring:true,color:"red",class:"ring-red-700"},{variant:"filled",ring:true,color:"orange",class:"ring-orange-600"},{variant:"filled",ring:true,color:"amber",class:"ring-amber-600"},{variant:"filled",ring:true,color:"yellow",class:"ring-yellow-600"},{variant:"filled",ring:true,color:"lime",class:"ring-lime-600"},{variant:"filled",ring:true,color:"green",class:"ring-green-600"},{variant:"filled",ring:true,color:"emerald",class:"ring-emerald-600"},{variant:"filled",ring:true,color:"teal",class:"ring-teal-600"},{variant:"filled",ring:true,color:"cyan",class:"ring-cyan-600"},{variant:"filled",ring:true,color:"sky",class:"ring-sky-600"},{variant:"filled",ring:true,color:"blue",class:"ring-blue-700"},{variant:"filled",ring:true,color:"indigo",class:"ring-indigo-600"},{variant:"filled",ring:true,color:"violet",class:"ring-violet-600"},{variant:"filled",ring:true,color:"purple",class:"ring-purple-600"},{variant:"filled",ring:true,color:"fuchsia",class:"ring-fuchsia-600"},{variant:"filled",ring:true,color:"pink",class:"ring-pink-600"},{variant:"filled",ring:true,color:"rose",class:"ring-rose-600"},{variant:"lighter",color:"neutral",class:"bg-neutral-100 text-neutral-600"},{variant:"lighter",color:"slate",class:"bg-slate-100 text-slate-500"},{variant:"lighter",color:"red",class:"bg-red-50 text-red-500"},{variant:"lighter",color:"orange",class:"bg-orange-50 text-orange-500"},{variant:"lighter",color:"amber",class:"bg-amber-50 text-amber-500"},{variant:"lighter",color:"yellow",class:"bg-yellow-50 text-yellow-500"},{variant:"lighter",color:"lime",class:"bg-lime-50 text-lime-500"},{variant:"lighter",color:"green",class:"bg-green-50 text-green-500"},{variant:"lighter",color:"emerald",class:"bg-emerald-50 text-emerald-500"},{variant:"lighter",color:"teal",class:"bg-teal-50 text-teal-500"},{variant:"lighter",color:"cyan",class:"bg-cyan-50 text-cyan-500"},{variant:"lighter",color:"sky",class:"bg-sky-50 text-sky-500"},{variant:"lighter",color:"blue",class:"bg-blue-50 text-blue-500"},{variant:"lighter",color:"indigo",class:"bg-indigo-50 text-indigo-500"},{variant:"lighter",color:"violet",class:"bg-violet-50 text-violet-500"},{variant:"lighter",color:"purple",class:"bg-purple-50 text-purple-500"},{variant:"lighter",color:"fuchsia",class:"bg-fuchsia-50 text-fuchsia-500"},{variant:"lighter",color:"pink",class:"bg-pink-50 text-pink-500"},{variant:"lighter",color:"rose",class:"bg-rose-50 text-rose-500"},{variant:["lighter","outline"],ring:true,color:"neutral",class:"ring-neutral-200"},{variant:["lighter","outline"],ring:true,color:"slate",class:"ring-slate-200"},{variant:["lighter","outline"],ring:true,color:"red",class:"ring-red-200"},{variant:["lighter","outline"],ring:true,color:"orange",class:"ring-orange-200"},{variant:["lighter","outline"],ring:true,color:"amber",class:"ring-amber-200"},{variant:["lighter","outline"],ring:true,color:"yellow",class:"ring-yellow-200"},{variant:["lighter","outline"],ring:true,color:"lime",class:"ring-lime-200"},{variant:["lighter","outline"],ring:true,color:"green",class:"ring-green-200"},{variant:["lighter","outline"],ring:true,color:"emerald",class:"ring-emerald-200"},{variant:["lighter","outline"],ring:true,color:"teal",class:"ring-teal-200"},{variant:["lighter","outline"],ring:true,color:"cyan",class:"ring-cyan-200"},{variant:["lighter","outline"],ring:true,color:"sky",class:"ring-sky-200"},{variant:["lighter","outline"],ring:true,color:"blue",class:"ring-blue-200"},{variant:["lighter","outline"],ring:true,color:"indigo",class:"ring-indigo-200"},{variant:["lighter","outline"],ring:true,color:"violet",class:"ring-violet-200"},{variant:["lighter","outline"],ring:true,color:"purple",class:"ring-purple-200"},{variant:["lighter","outline"],ring:true,color:"fuchsia",class:"ring-fuchsia-200"},{variant:["lighter","outline"],ring:true,color:"pink",class:"ring-pink-200"},{variant:["lighter","outline"],ring:true,color:"rose",class:"ring-rose-200"},{variant:"outline",color:"neutral",class:"text-neutral-500"},{variant:"outline",color:"slate",class:"text-slate-400"},{variant:"outline",color:"red",class:"text-red-500"},{variant:"outline",color:"orange",class:"text-orange-500"},{variant:"outline",color:"amber",class:"text-amber-500"},{variant:"outline",color:"yellow",class:"text-yellow-500"},{variant:"outline",color:"lime",class:"text-lime-500"},{variant:"outline",color:"green",class:"text-green-500"},{variant:"outline",color:"emerald",class:"text-emerald-500"},{variant:"outline",color:"teal",class:"text-teal-500"},{variant:"outline",color:"cyan",class:"text-cyan-500"},{variant:"outline",color:"sky",class:"text-sky-500"},{variant:"outline",color:"blue",class:"text-blue-500"},{variant:"outline",color:"indigo",class:"text-indigo-500"},{variant:"outline",color:"violet",class:"text-violet-500"},{variant:"outline",color:"purple",class:"text-purple-500"},{variant:"outline",color:"fuchsia",class:"text-fuchsia-500"},{variant:"outline",color:"pink",class:"text-pink-500"},{variant:"outline",color:"rose",class:"text-rose-500"}],defaultVariants:{variant:"outline",color:"slate"}});function J({asChild:e,children:t,className:o,color:r,variant:a,ring:n,...l}){let s=e?Slot.Root:"div",c$1=la({variant:a,color:r,ring:n!==void 0,className:c(n==="inset"&&"ring-inset",o)});return jsx(s,{className:c$1,...l,children:t})}var uo=S.createContext({open:false,overlayBlur:false,contentMotion:"scale-fade",dismissible:false,disableClose:false,setOpen:()=>{}});function _e(){return S.useContext(uo)}function mo({open:e,defaultOpen:t,overlayBlur:o=false,contentMotion:r="scale-fade",dismissible:a=false,disableClose:n=false,onOpenChange:l,...s}){let[p=false,c]=T({value:e,defaultValue:t??false,onChange:d=>l?.(d??false)});return jsx(uo.Provider,{value:{open:p,overlayBlur:o,contentMotion:r,dismissible:a,disableClose:n,setOpen:c},children:jsx(AlertDialog.Root,{"data-slot":"alert-dialog",open:p,onOpenChange:c,...s})})}function fo({...e}){return jsx(AlertDialog.Trigger,{"data-slot":"alert-dialog-trigger",...e})}var ut=[.22,1,.36,1],Be=[.4,0,1,1],da={initial:{opacity:0,backdropFilter:"blur(0px)"},animate:{opacity:1,backdropFilter:"blur(4px)",transition:{duration:.2,ease:ut}},exit:{opacity:0,backdropFilter:"blur(0px)",transition:{duration:.16,ease:Be}}},ua={initial:{opacity:0},animate:{opacity:1,transition:{duration:.2,ease:ut}},exit:{opacity:0,transition:{duration:.16,ease:Be}}},ma={"scale-fade":{initial:{opacity:0,scale:.88,y:-36},animate:{opacity:1,scale:1,y:0,transition:{duration:.25,ease:ut}},exit:{opacity:0,scale:.92,y:-32,transition:{duration:.18,ease:Be}}},"slide-fade":{initial:{opacity:0,y:-48},animate:{opacity:1,y:0,transition:{duration:.25}},exit:{opacity:0,y:-32,transition:{duration:.2,ease:Be}}}},fa=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function ga(e){if(!e)return;let t=e.querySelector('[data-slot="alert-dialog-cancel"]'),o=e.querySelector('[data-slot="alert-dialog-action"]'),r=e.querySelector(fa);(t??o??r??e).focus({preventScroll:true});}function va({className:e,onClick:t,...o}){let{overlayBlur:r,dismissible:a,disableClose:n,setOpen:l}=_e(),s=S.useCallback(p=>{t?.(p),!(p.defaultPrevented||!a||n)&&l(false);},[n,a,t,l]);return jsx(AlertDialog.Overlay,{forceMount:true,asChild:true,...o,children:jsx(m.div,{"data-slot":"alert-dialog-overlay",...r?da:ua,onClick:s,className:c("fixed inset-0 z-50 bg-black/10",e)})})}function go({wrapperClassName:e,className:t,children:o,onOpenAutoFocus:r,onEscapeKeyDown:a,...n}){let{open:l,contentMotion:s,disableClose:p}=_e(),c$1=S.useRef(null),d=ma[s],u=S.useCallback(m=>{if(r?.(m),m.defaultPrevented)return;m.preventDefault();let f=document.activeElement;f instanceof HTMLElement&&f.blur(),requestAnimationFrame(()=>{ga(c$1.current);});},[r]),v=S.useCallback(m=>{a?.(m),!(m.defaultPrevented||!p)&&m.preventDefault();},[p,a]);return jsx(a$1,{children:jsx(AlertDialog.Portal,{"data-slot":"alert-dialog-portal",forceMount:true,children:jsx(AnimatePresence,{initial:false,children:l&&jsxs(Fragment,{children:[jsx(va,{"data-slot":"alert-dialog-overlay"},"alert-dialog-overlay"),jsx(AlertDialog.Content,{forceMount:true,asChild:true,onOpenAutoFocus:u,onEscapeKeyDown:v,...n,children:jsx(m.div,{ref:f([c$1]),tabIndex:-1,"data-slot":"alert-dialog-wrapper",...d,className:c("fixed top-[35%] left-1/2 z-50 flex max-h-[calc(70dvh-108px)] -translate-x-1/2 -translate-y-1/2 outline-none","min-h-0 w-full max-w-4xl overflow-hidden rounded-[18px] bg-bg-weak p-4",e),children:jsx("div",{"data-slot":"alert-dialog-content",className:c("relative flex min-h-0 flex-1 flex-col rounded-[14px] bg-white px-2 py-24 ring ring-stroke-antd",t),children:o})},"alert-dialog-content")})]})})})})}function vo({className:e,...t}){return jsx("div",{"data-slot":"alert-dialog-header",className:c("flex shrink-0 flex-col px-22",e),...t})}function mt({className:e,...t}){return jsx(AlertDialog.Title,{"data-slot":"alert-dialog-title",className:c("m-0 text-[17px] font-medium",e),...t})}function ft({className:e,...t}){return jsx(AlertDialog.Description,{"data-slot":"alert-dialog-description",className:c("m-0 text-md leading-20 text-text-sub",e),...t})}function xo({className:e,...t}){return jsx("div",{"data-slot":"alert-dialog-body",className:c("scrollbar-thin flex min-h-0 w-full flex-1 flex-col overflow-auto overscroll-contain px-22",e),...t})}function gt({className:e,...t}){return jsx("div",{"data-slot":"alert-dialog-footer",className:c("flex shrink-0 px-22",e),...t})}function ho({className:e,...t}){return jsx(AlertDialog.Cancel,{"data-slot":"alert-dialog-cancel",className:c(e),...t})}function yo({className:e,asChild:t,...o}){let r=t?Slot.Root:"div";return jsx(r,{"data-slot":"alert-dialog-media",className:c('mx-auto flex size-58 items-center justify-center rounded-full *:[svg:not([class*="size-"])]:size-26',e),...o})}var vt=S.createContext(null);vt.displayName="AlertDialogComposedContext";function ya({children:e,...t}){return jsx(vt.Provider,{value:t,children:e})}function bo({children:e,actionPending:t,setActionPending:o,actionFeedback:r,setActionFeedback:a,closeLocked:n}){let{setOpen:l}=_e();return jsx(ya,{actionPending:t,setActionPending:o,actionFeedback:r,setActionFeedback:a,closeLocked:n,setOpen:l,children:e})}function Pe(){let e=S.useContext(vt);if(!e)throw new Error("useAlertDialogComposedContext must be used within AlertDialogComposedProvider");return e}var Ca={initial:{opacity:0,y:-8,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:-6,height:0}},Pa={initial:{opacity:0,scale:.95,y:16},animate:{scale:1,opacity:1,y:0},exit:{scale:.96,opacity:0,y:12}};function Ro({open:e=false,message:t}){let o=S$1(),{setActionFeedback:r}=Pe();return jsx(AnimatePresence,{initial:false,children:e&&jsx(m.div,{...Ca,className:"px-22",children:jsxs(J,{color:"red",variant:"lighter",className:"relative flex justify-start gap-10 rounded-xl ps-12 pe-8 pt-8 pb-9",ring:true,children:[jsx(TriangleAlertIcon,{className:"size-16 shrink-0"}),jsx("div",{className:"pe-4 text-left text-md leading-18",children:t??o("alert_dialog_default_error_message")}),jsx(me,{size:"xsmall",iconClassName:"size-12",className:"-top-7 -right-7 size-20 border-red-200/50 bg-red-50 p-0 text-red-500 ring-1 ring-white/50 ring-offset-1 hover:bg-red-50",onClick:()=>r(null)})]})})})}function Do({open:e=false,message:t,closeDelay:o=3}){let r=S$1(),{setOpen:a}=Pe(),n=Math.max(0,Math.ceil(o)),[l,s]=S.useState(n);S.useEffect(()=>{if(!e)return;if(n===0){a(false);return}s(n);let c=window.setTimeout(()=>{a(false);},n*1e3);if(n<=1)return ()=>{window.clearTimeout(c);};let d=window.setInterval(()=>{s(u=>u<=2?(window.clearInterval(d),1):u-1);},1e3);return ()=>{window.clearTimeout(c),window.clearInterval(d);}},[n,e,a]);let p=n>0?r("alert_dialog_auto_close_in_seconds",{seconds:l}):r("close");return jsx(AnimatePresence,{initial:false,children:e&&jsxs(m.div,{...Pa,className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-24 rounded-[14px] bg-white/96 px-24 py-24 text-center backdrop-blur-[2px]",children:[jsxs("div",{className:"flex w-full flex-col items-center gap-6",children:[jsx(J,{color:"green",variant:"filled",className:"size-68 rounded-full ring-6 ring-green-50",children:jsx(Check,{className:"translate-x-1"})}),jsx("div",{className:"text-paragraph-md text-text-sub",children:t??r("alert_dialog_default_success_message")})]}),jsx(P,{className:"h-32 w-full tabular-nums",onClick:()=>a(false),children:p})]})})}function wo({footer:e,className:t,resolvedAction:o,resolvedCancel:r,actionPending:a,closeLocked:n,onActionClick:l}){if(e===null)return null;if(e!==void 0)return jsx(gt,{className:c("gap-12",t),children:e});let{className:s,onClick:p,...c$1}=r?.buttonProps??{},{className:d,...u}=o?.buttonProps??{};return !o&&!r?null:jsxs(gt,{className:c("gap-12",t),children:[r&&jsx(ho,{asChild:true,children:jsx(P,{variant:"neutral",mode:"stroke",className:c(o&&"w-4/10",!o&&"w-full",s),...c$1,disabled:n||c$1.disabled,onClick:Ra(p,r.onClick),children:r.text})}),o&&jsx(P,{className:c(r&&"w-6/10",!r&&"w-full",d),...u,loading:a,disabled:a||u.disabled,onClick:l,children:o.text})]})}function Ra(e,t){if(!(!e&&!t))return o=>{e?.(o),!o.defaultPrevented&&t?.();}}var ka={info:jsx(J,{color:"indigo",variant:"lighter",children:jsx(CircleQuestionMark,{})}),form:jsx(J,{color:"blue",variant:"lighter",children:jsx(NotebookPenIcon,{})}),otp:jsx(J,{color:"blue",variant:"lighter",children:jsx(LockKeyhole,{})}),warning:jsx(J,{color:"orange",variant:"lighter",children:jsx(TriangleAlertIcon,{className:"-translate-y-1"})}),destructive:jsx(J,{color:"red",variant:"lighter",children:jsx(Trash2Icon,{})})};function Io({intent:e,icon:t,title:o,description:r,className:a,titleClassName:n,descriptionClassName:l}){let s=Ea(e,t),p=!s?.node&&!o&&!r;return jsxs(Fragment,{children:[jsxs(vo,{className:c("gap-16 text-center",p&&"hidden",a),children:[s?.node&&jsx(yo,{asChild:s.asChild,children:s.node}),(o||r)&&jsxs("div",{className:"grid w-full gap-4",children:[o&&jsx(mt,{className:n,children:o}),r&&jsx(ft,{className:l,children:r})]})]}),jsxs("div",{className:"sr-only hidden",children:[jsx(mt,{children:"T"}),jsx(ft,{children:"D"})]})]})}function Ea(e,t){return t===false?null:S.isValidElement(t)?{asChild:true,node:t}:e?{asChild:true,node:ka[e]??null}:null}function Ke(e,t){return t?{...e,...t,buttonProps:e.buttonProps||t.buttonProps?{...e.buttonProps,...t.buttonProps}:void 0}:{...e,buttonProps:e.buttonProps?{...e.buttonProps}:void 0}}function No(e,t){return t===false?false:e===false?t?Ke(t,void 0):false:Ke(e,t)}function So(e){return typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"}function Va({open:e,defaultOpen:t,onOpenChange:o,overlayBlur:r,contentMotion:a,dismissible:n,disableClose:l,intent:s,icon:p,title:c,description:d,footer:u,action:v,cancel:m,className:f,classNames:g,onOpenAutoFocus:x,trigger:D,children:h,...b}){let[C,A]=S.useState(false),[w,y]=S.useState(null),P=!!(l||C),T=S.useCallback(N=>{N||(A(false),y(null)),o?.(N);},[o]);return jsxs(mo,{open:e,defaultOpen:t,onOpenChange:T,overlayBlur:r,contentMotion:a,dismissible:n,disableClose:P,...b,children:[D&&jsx(fo,{asChild:true,children:D}),jsx(bo,{actionPending:C,setActionPending:A,actionFeedback:w,setActionFeedback:y,closeLocked:P,children:jsx(Ma,{intent:s,icon:p,title:c,description:d,footer:u,action:v,cancel:m,className:f,classNames:g,onOpenAutoFocus:x,children:h})})]})}function Ma({intent:e,icon:t,title:o,description:r,footer:a,action:n,cancel:l,className:s,classNames:p,onOpenAutoFocus:c$1,children:d}){let{setOpen:u,actionPending:v,closeLocked:m,actionFeedback:f,setActionPending:g,setActionFeedback:x}=Pe(),{DEFAULT_ALERT_DIALOG_ACTION:D,DEFAULT_ALERT_DIALOG_CANCEL:h}=co(),b=t!==false&&(!!e||S.isValidElement(t)),C=e??"default",A=a===void 0,w=D[C],y=A?w===false?n??null:Ke(w,n):null,P=A?No(h[C],l):null,T=P===false?null:P,N=f?.status==="error"?f:null,M=f?.status==="success"?f:null,F=S.useCallback(async W=>{if(!y||v||(x(null),y.buttonProps?.onClick?.(W),W.defaultPrevented))return;let z;try{z=y.onClick?.();}catch{x({status:"error"});return}if(!So(z)){ko(z,x,u);return}try{g(!0),ko(await z,x,u);}catch{x({status:"error"});}finally{g(false);}},[v,y,x,g,u]);return jsxs(go,{wrapperClassName:c("w-xl",p?.wrapper),className:c("gap-20 py-26",b&&"gap-28",s),onOpenAutoFocus:c$1,children:[jsx(Io,{intent:e,icon:t,title:o,description:r,className:p?.header,titleClassName:p?.title,descriptionClassName:p?.description}),jsx(Ro,{open:!!N,message:N?.message}),d&&jsx(xo,{className:p?.body,children:d}),jsx(wo,{footer:a,className:p?.footer,resolvedAction:y,resolvedCancel:T,actionPending:v,closeLocked:m,onActionClick:F}),jsx(Do,{open:!!M,message:M?.message,closeDelay:M?.closeDelay})]})}function ko(e,t,o){if(!e){o(false);return}if(e.status==="success"&&e.closeDelay!==void 0&&e.closeDelay<=0){o(false);return}t(e);}var Oo=async e=>{if(!e)return;if(navigator.clipboard){await navigator.clipboard.writeText(e);return}let t=document.createElement("textarea");t.setAttribute("readonly",""),t.tabIndex=-1,t.style.position="fixed",t.style.left="-9999px",t.value=e,document.body.appendChild(t);let o=document.getSelection();if(o){let r=o.rangeCount>0&&o.getRangeAt(0);t.select(),document.execCommand("copy"),r&&(o.removeAllRanges(),o.addRange(r));}document.body.removeChild(t);};var za={initial:{scale:.5,opacity:0,filter:"blur(2px)"},animate:{scale:1,opacity:1,filter:"blur(0px)"},exit:{scale:.5,opacity:0,filter:"blur(2px)"}},Ba={opacity:{duration:.25},filter:{duration:.25},scale:{duration:.35,ease:[.34,1.56,.64,1]}},_a={variants:za,initial:"initial",animate:"animate",exit:"exit",transition:Ba};function ht({initial:e=false,state:t,states:o,asDiv:r,className:a,style:n,...l}){let s=r?m.div:m.span;return jsx(AnimatePresence,{initial:e,mode:"popLayout",children:jsx(s,{className:c("inline-flex items-center justify-center",a),..._a,style:n,...l,children:o[t]},t)})}function yt({swap:e,on:t,off:o,className:r}){return jsx(ht,{state:e?"on":"off",states:{on:t,off:o},className:r})}function Ga({content:e,delay:t=700,tooltipDelayDuration:o=700,variant:r="neutral",mode:a="stroke",size:n="small",as:l="button",children:s,onCopy:p,className:c$1}){let d=S$1(),[u,v]=S__default.useState(false),[m,f]=S__default.useState(false),[g,x]=S__default.useState(false),D=S__default.useRef(null),h=S__default.useRef(null);S__default.useEffect(()=>()=>{D.current&&clearTimeout(D.current),h.current&&clearTimeout(h.current);},[]);let b=S__default.useCallback(async()=>{u||(v(true),x(true),await Oo(e),p?.(e),D.current=setTimeout(()=>{x(false),h.current=setTimeout(()=>v(false),150);},t));},[u,t,e,p]),C=jsx(yt,{swap:u,on:jsx(CheckCheck,{width:"1em",height:"1em"}),off:jsx(Copy,{width:"1em",height:"1em"})}),A=(()=>{switch(l){case "text":return jsx("span",{className:c("relative cursor-pointer before:absolute before:-inset-x-4 before:-inset-y-1 before:rounded-md hover:before:bg-bg-antd",c$1),onClick:b,children:jsx("span",{className:"relative z-1",children:s??e})});case "inline":return jsxs("span",{className:c("relative inline-flex cursor-pointer items-center gap-6 before:absolute before:-inset-x-4 before:-inset-y-1 before:rounded-md hover:before:bg-bg-antd",c$1),onClick:b,children:[jsx("span",{className:"relative z-1",children:s??e}),jsx("span",{className:c("inline-flex items-center text-zinc-500",u&&"text-primary-base"),children:C})]});default:return jsx(P,{variant:r,mode:a,size:n,className:c(u&&"cursor-not-allowed",c$1),onClick:b,startContent:C})}})();return jsx(i,{content:d(u?"copied":"copy"),size:n,open:g||m,delayDuration:o,onOpenChange:f,hideWhenDetached:true,children:A})}var Uo=b({base:"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-8 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg!",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg!"}},defaultVariants:{orientation:"horizontal"}});function $a({className:e,orientation:t,...o}){return jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:c(Uo({orientation:t}),e),...o})}function qa({className:e,asChild:t=false,...o}){let r=t?Slot.Root:"div";return jsx(r,{className:c("flex items-center gap-8 rounded-lg border border-stroke-soft bg-white px-10 text-md font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-16",e),...o})}function Xa({className:e,orientation:t="vertical",...o}){return jsx(V,{"data-slot":"button-group-separator",orientation:t,className:c("relative h-auto self-stretch bg-stroke-soft",e),...o})}function Ls({...e}){return jsx(Collapsible.Root,{"data-slot":"collapsible",...e})}function Fs({...e}){return jsx(Collapsible.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...e})}function Hs({className:e,...t}){return jsx(Collapsible.CollapsibleContent,{"data-slot":"collapsible-content",className:c("collapsible-content",e),...t})}var Za="BadgeRoot",Bo="BadgeIcon",_o="BadgeDot",Pt=b({slots:{root:"inline-flex w-fit appearance-none items-center justify-center border-none leading-none font-medium whitespace-nowrap transition duration-200 ease-out select-none",icon:"uicon shrink-0",dot:["uidot flex items-center justify-center","before:size-4 before:rounded-full before:bg-current"]},variants:{size:{medium:{root:"h-24 gap-4 px-10 text-md has-[>.uicon]:gap-6 has-[>.uidot]:gap-4",icon:"-mx-2 size-14",dot:"-mx-4 size-16 before:size-6"},small:{root:"h-20 gap-4 px-8 text-sm has-[>.uicon]:gap-4 has-[>.uidot]:gap-3",icon:"-mx-px size-12",dot:"-mx-4 size-16 before:size-5"},xsmall:{root:"h-16 gap-3 px-7 text-xs has-[>.uicon]:gap-4 has-[>.uidot]:gap-4",icon:"-mx-px size-10",dot:"-mx-5 size-16"}},variant:{filled:{root:"text-static-white"},outline:{root:"ring-1 ring-current ring-inset"},lighter:"",ghost:""},color:{primary:"",info:"",success:"",warning:"",error:"",neutral:""},shape:{default:"",circle:{root:"rounded-full"}},disabled:{true:{root:"cursor-not-allowed opacity-75"}}},compoundVariants:[{shape:"default",size:"xsmall",class:{root:"rounded-[3px] px-5"}},{shape:"default",size:"small",class:{root:"rounded-[4px] px-6"}},{shape:"default",size:"medium",class:{root:"rounded-lg px-7",icon:"ms-0"}},{variant:"filled",color:"primary",class:{root:"bg-primary-base"}},{variant:"filled",color:"info",class:{root:"bg-cyan-500"}},{variant:"filled",color:"success",class:{root:"bg-emerald-500"}},{variant:"filled",color:"warning",class:{root:"bg-orange-500"}},{variant:"filled",color:"error",class:{root:"bg-red-600"}},{variant:"filled",color:"neutral",class:{root:"bg-black/90"}},{variant:"outline",color:"primary",class:{root:"text-primary-base"}},{variant:"outline",color:"info",class:{root:"text-cyan-600"}},{variant:"outline",color:"success",class:{root:"text-emerald-500"}},{variant:"outline",color:"warning",class:{root:"text-orange-500"}},{variant:"outline",color:"error",class:{root:"text-red-600"}},{variant:"outline",color:"neutral",class:{root:"text-neutral-600 ring-neutral-200"}},{variant:"lighter",color:"primary",class:{root:"bg-blue-50 text-primary-base"}},{variant:"lighter",color:"info",class:{root:"bg-cyan-50 text-cyan-600"}},{variant:"lighter",color:"success",class:{root:"bg-emerald-50 text-emerald-600"}},{variant:"lighter",color:"warning",class:{root:"bg-orange-50 text-orange-600"}},{variant:"lighter",color:"error",class:{root:"bg-red-50 text-red-600"}},{variant:"lighter",color:"neutral",class:{root:"bg-neutral-100 text-neutral-600"}},{variant:"ghost",color:"primary",class:{root:"text-primary-base"}},{variant:"ghost",color:"info",class:{root:"text-cyan-600"}},{variant:"ghost",color:"success",class:{root:"text-emerald-600"}},{variant:"ghost",color:"warning",class:{root:"text-orange-600"}},{variant:"ghost",color:"error",class:{root:"text-red-600"}},{variant:"ghost",color:"neutral",class:{root:"text-neutral-600"}}],defaultVariants:{variant:"filled",color:"primary",size:"medium",shape:"default"}}),Lo=({asChild:e,size:t,variant:o,color:r,shape:a,children:n,className:l,disabled:s,...p})=>{let c=S.useId(),d=e?Slot.Root:"div",{root:u}=Pt({variant:o,color:r,size:t,shape:a,disabled:s}),m=ye(n,{size:t,variant:o,color:r},[Bo,_o],c,e);return jsx(d,{"data-slot":"badge",className:u({class:l}),...p,children:m})};Lo.displayName=Za;function Fo({className:e,size:t,variant:o,color:r,as:a,...n}){let l=a||"div",{icon:s}=Pt({size:t,variant:o,color:r});return jsx(l,{"data-slot":"icon",className:s({class:e}),...n})}Fo.displayName=Bo;function Ho({size:e,variant:t,color:o,className:r,...a}){let{dot:n}=Pt({size:e,variant:t,color:o});return jsx("div",{"data-slot":"dot",className:n({class:r}),...a})}Ho.displayName=_o;function Xs({icon:e,dot:t,children:o,asChild:r,...a}){return jsxs(Lo,{asChild:r,...a,children:[e&&!r&&jsx(Fo,{as:e}),t&&!r&&jsx(Ho,{}),o]})}function ja({className:e,scrollBarClassName:t,children:o,...r}){return jsxs(ScrollArea.Root,{"data-slot":"scroll-area",className:c("relative",e),...r,children:[jsx(ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-2 focus-visible:ring-primary-base focus-visible:outline-1",children:o}),jsx(Go,{orientation:"vertical",className:t}),jsx(Go,{orientation:"horizontal",className:t}),jsx(ScrollArea.Corner,{})]})}function Go({className:e,orientation:t="vertical",...o}){return jsx(ScrollArea.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":t,orientation:t,className:c("flex touch-none p-2 transition-colors select-none data-[orientation=horizontal]:h-10 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:border-t data-[orientation=horizontal]:border-t-transparent data-[orientation=vertical]:h-full data-[orientation=vertical]:w-10 data-[orientation=vertical]:border-l data-[orientation=vertical]:border-l-transparent",e),...o,children:jsx(ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-stroke-sub"})})}function en({open:e,defaultOpen:t,openDelay:o=300,closeDelay:r,asChild:a=true,arrow:n=true,content:l,children:s,onOpenChange:p,...c}){return jsxs(tn,{"data-slot":"hover-card",open:e,defaultOpen:t,openDelay:o,closeDelay:r,onOpenChange:p,children:[jsx(on,{asChild:a,children:s}),jsxs(rn,{...c,children:[l,n&&jsx(HoverCard.Arrow,{asChild:true,children:jsx(E,{className:"-translate-y-6.5"})})]})]})}function tn({...e}){return jsx(HoverCard.Root,{"data-slot":"hover-card",...e})}function on({...e}){return jsx(HoverCard.Trigger,{"data-slot":"hover-card-trigger",...e})}function rn({className:e,align:t="center",sideOffset:o=4,collisionPadding:r=16,...a}){return jsx(HoverCard.Portal,{"data-slot":"hover-card-portal",children:jsx(HoverCard.Content,{"data-slot":"hover-card-content",align:t,sideOffset:o,collisionPadding:r,className:c("z-50 rounded-2xl bg-bg-white px-10 py-6 text-md text-text-strong shadow-regular-md ring-1 ring-stroke-soft outline-hidden duration-100 ring-inset","origin-(--radix-hover-card-content-transform-origin) data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...a})})}var ln={initial:{opacity:0,scale:.96,y:4,filter:"blur(2px)"},exit:{opacity:0,scale:.96,y:4,filter:"blur(2px)"},animate:{opacity:1,scale:1,y:0,filter:"blur(0px)"}},sn={type:"spring",bounce:.1,duration:.25},cn={ease:[.26,.08,.25,1],duration:.27};function pn({activeKey:e,children:t,className:o,rootClassName:r,defaultCardHeight:a,initialKey:n,variants:l=ln,transition:s=cn,rootTransition:p=sn}){let[c,{height:d}]=nn(),u=S.useRef(a??0);d>0&&(u.current=d);let v=e===n?a:d||u.current;return jsx(a$1,{children:jsx(m.div,{"data-slot":"animation-root",className:r,initial:false,animate:{height:v},transition:p,children:jsx("div",{ref:c,"data-slot":"animation-container",children:jsx(AnimatePresence,{mode:"popLayout",initial:false,children:jsx(m.div,{"data-slot":"animation-page",variants:l,transition:s,initial:"initial",animate:"animate",exit:"exit",className:o,children:t},e)})})})})}function de(e,t){let o=S.useRef(void 0),{current:r}=o;return S.useEffect(()=>{(!t||e!==void 0)&&(o.current=e);},[e,t]),r}var mn={type:"tween",duration:.3,ease:[.25,1,.5,1]},fn={type:"tween",duration:.38,ease:[.25,1,.5,1]},$e={type:"spring",stiffness:260,damping:30},gn={type:"tween",duration:.35,ease:"easeIn"},vn={type:"tween",duration:.35,ease:"easeOut"},xn={type:"tween",duration:.35,ease:"linear"},ve={type:"tween",duration:.25,ease:"easeInOut"},wt=[.25,.1,.25,1],Zo=1.12,hn=.93,qe={type:"tween",duration:.22,ease:wt},yn={scale:{type:"tween",duration:.22,ease:wt},opacity:{type:"tween",duration:.16,ease:wt}},bn={type:"spring",stiffness:260,damping:30},An=.7,Cn=.9,Pn="bg-white";function Qo(e){return e?An:Cn}function Dt(e,t){return e==="x"?{x:t}:{y:t}}function jo(e,t=mn){return {supportsDimmed:false,variants:{enterFrom:({direction:o})=>({...Dt(e,o===0?0:o>0?"100%":"-100%"),zIndex:1,transition:t}),active:{...Dt(e,0),zIndex:1,transition:t},exit:({direction:o})=>({...Dt(e,o<0?"100%":"-100%"),zIndex:0,transition:t})}}}function Rn(){return {supportsDimmed:true,variants:{enterFrom:({direction:e,dimmed:t})=>e===0?{x:0,opacity:1,transition:$e}:{x:e>0?"100%":"-20%",opacity:e>0?1:Qo(t),zIndex:1,transition:$e},active:{x:0,opacity:1,zIndex:1,transition:$e},exit:({direction:e,dimmed:t})=>({x:e<0?"100%":"-20%",opacity:e<0?1:Qo(t),zIndex:e<0?5:0,transition:$e})}}}function Dn(){return {supportsDimmed:false,variants:{enterFrom:({direction:e})=>({clipPath:e>0?"inset(0 100% 0 0)":"inset(0 0 0 0)",zIndex:1}),active:({direction:e})=>({clipPath:"inset(0 0 0 0)",zIndex:1,transition:e>0?gn:void 0}),exit:({direction:e})=>e<0?{clipPath:"inset(0 100% 0 0)",zIndex:2,transition:vn}:{opacity:.999,zIndex:0,transition:xn}}}}function wn(){return {supportsDimmed:false,variants:{enterFrom:({direction:e})=>e===0?{x:0,scale:1,opacity:1,zIndex:1,transition:ve}:e>0?{x:"200%",opacity:1,zIndex:2,transition:ve}:{scale:.7,opacity:0,zIndex:0,transition:ve},active:{x:0,scale:1,opacity:1,zIndex:1,transition:ve},exit:({direction:e})=>e<0?{x:"200%",opacity:1,zIndex:2,transition:ve}:{x:0,scale:.7,opacity:0,zIndex:0,transition:ve}}}}function Tn(){return {supportsDimmed:false,variants:{enterFrom:({direction:e})=>e===0?{scale:1,opacity:1,zIndex:1,transition:qe}:{scale:e>0?Zo:hn,opacity:0,zIndex:e>0?1:0,transition:qe},active:{scale:1,opacity:1,zIndex:1,transition:qe},exit:({direction:e})=>e<0?{scale:Zo,opacity:0,zIndex:2,transition:yn}:{scale:1,opacity:0,zIndex:0,transition:qe}}}}var er={slide:jo("x"),slideVertical:jo("y",fn),slideLayers:Rn(),reveal:Dn(),pushSlide:wn(),zoomFade:Tn()},In={enterFrom:{position:"relative",width:"100%"},active:{position:"relative",width:"100%"},exit:{position:"absolute",top:0,left:0,right:0,width:"100%"}};function Xe(e,t){let o=er[e.animation].variants[t],r=In[t];if(typeof o=="function"){let l=o(e,{},{});return {...r,...l}}return typeof o=="string"?o:{...r,...o}}var Nn={enterFrom:e=>Xe(e,"enterFrom"),active:e=>Xe(e,"active"),exit:e=>Xe(e,"exit")};function tr({activeKey:e,animation:t="slideLayers",dimmed:o=false,measureHeight:r=true,lockPointerDuringTransition:a=true,className:n,viewClassName:l,children:s},p){let c$1=de(e),d=c$1!==void 0&&e!==c$1,u=d?e>c$1?1:-1:0,v=useRef(null),[m$1,f]=useState(false),g=er[t],x={animation:t,direction:u,dimmed:!!(o&&g.supportsDimmed)},D=Xe(x,"active"),h=typeof D=="string"?D:{...D,transition:{duration:0}},b=useRef(new Map),[C,A]=nn(),[w,y]=useState(void 0);useLayoutEffect(()=>{if(!r||!A.height)return;let T=b.current.get(e);(!T||Math.abs(T-A.height)>1)&&(b.current.set(e,A.height),y(A.height));},[r,A.height,e]),useLayoutEffect(()=>{if(!r){y(void 0);return}let T=b.current.get(e);T&&y(T);},[r,e]),useLayoutEffect(()=>{if(!a){v.current=null,f(false);return}d&&(v.current=e,f(true));},[e,d,a]);let P=S__default.useCallback(()=>{v.current===e&&(v.current=null,f(false));},[e]);return jsx(a$1,{children:jsx(m.div,{"data-slot":"ui-transition-root",ref:p,className:c("relative w-full overflow-hidden",x.dimmed&&"bg-black",m$1&&"pointer-events-none",n),initial:false,animate:r&&w!==void 0?{height:w}:void 0,style:r&&w!==void 0?{height:w}:void 0,transition:bn,children:jsx("div",{ref:r?C:void 0,className:"relative w-full",children:jsx(AnimatePresence,{initial:false,custom:x,mode:"sync",children:jsx(m.div,{"data-slot":"ui-transition-item",custom:x,variants:Nn,initial:u===0?false:"enterFrom",animate:d?"active":h,exit:"exit",onAnimationComplete:P,className:c("w-full",Pn,l),children:s},e)})})})})}tr.displayName="UIViewTransition";var Tt=S__default.forwardRef(tr);function rr(e,t){let o=de(e);S.useEffect(()=>{t&&!o&&e?Sn(t):t&&!e&&o&&or(t);},[t,e,o]),S.useEffect(()=>()=>{t&&e&&or(t);},[t,e]);}function Sn(e){if(e){let o=e.clientHeight,r=(o-24)/o;e.style.overflow="hidden",e.style.willChange="transform",e.style.transition="transform 250ms linear",e.style.transform=`translateY(calc(env(safe-area-inset-top, 0) - 24px)) scale(${r})`;}}function or(e){function t(){e.style.removeProperty("overflow"),e.style.removeProperty("will-change"),e.style.removeProperty("transition"),e.removeEventListener("transitionend",t);}e&&(e.style.removeProperty("transform"),e.addEventListener("transitionend",t));}var En={variants:{initial:{opacity:0},animate:{opacity:.08},exit:{opacity:0}},initial:"initial",animate:"animate",exit:"exit"},On={initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:24}},Vn={variants:On,initial:"initial",animate:"animate",exit:"exit"},Mn={duration:.3,delay:.35},Un={variants:{initial:{borderRadius:24,opacity:0},exit:{borderRadius:24,opacity:0},animate:{borderRadius:24,opacity:1}},initial:"initial",animate:"animate",exit:"exit"},zn=100,Bn=300,_n={width:420,height:"auto"};function Ze(e){return typeof e=="number"?`${e}px`:e}function nr(e){return typeof e=="object"?e:{width:e,height:e}}function Ln({open:e,loading:t,visual:o,backgroundViewRef:r,children:a,className:n,containerClassName:l,defaultSize:s$1=zn,expandedSize:p=_n,onBackdropClick:c$1,onCloseComplete:d,onContentAnimationComplete:u,onExpandedChangeComplete:v}){let[m$1,f]=S.useState(!!e),[g,x,D]=s(false),[h,b]=S.useState(false),C=S.useRef(false),A=S.useRef(null),w=S.useRef(false),y=S.useRef(null),P=nr(s$1),T=nr(p),N=Ze(P.width),M=Ze(P.height),F=Ze(T.width),W=Ze(T.height),z=S.useMemo(()=>g?{width:F,height:W}:{width:N,height:M},[M,N,g,W,F]);rr(!!(e&&g&&r?.current),r?.current);let ne=S.useCallback(()=>{y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{y.current=null,f(false);},Bn);},[]),he=S.useCallback(()=>{if(A.current!==null&&(v?.(A.current),A.current=null),!C.current){e&&!t&&(!g||!a)&&b(true);return}C.current=false,ne();},[a,g,t,v,e,ne]),Je=S.useCallback(()=>{b(false),w.current&&(w.current=false,d?.());},[d]),ie=S.useCallback(B=>{if(B==="animate"){e&&!t&&b(true),u?.("entered");return}B==="exit"&&(b(false),u?.("exited"));},[t,u,e]),Ne=S.useCallback(B=>{B==="animate"&&e&&!t&&!g&&!C.current&&b(true);},[g,t,e]),kt=S.useCallback(B=>{h&&c$1?.(B);},[h,c$1]);return S.useEffect(()=>{e&&(y.current&&(clearTimeout(y.current),y.current=null),C.current=false,w.current=false,b(false),f(true));},[e]),S.useEffect(()=>{if(m$1){if(e){if(t){g&&(A.current=false,b(false)),D();return}g||(A.current=true,b(false)),x();return}if(w.current=true,b(false),!C.current){if(g){A.current=false,C.current=true,D();return}ne();}}},[D,g,t,e,m$1,ne,x]),S.useEffect(()=>()=>{y.current&&clearTimeout(y.current);},[]),jsx(a$1,{children:jsx(AnimatePresence,{onExitComplete:Je,children:m$1&&jsxs(Portal.Root,{"data-slot":"ui-modal-root",children:[jsx(m.div,{"data-slot":"ui-modal-backdrop",className:"fixed inset-0 z-10 bg-black",onClick:kt,onAnimationComplete:Ne,...En}),jsxs(m.div,{layout:true,"data-slot":"ui-modal-container","data-state":g&&"expanded",className:c("flex flex-col items-center justify-start bg-white p-16 ring-1 ring-stone-950/6","fixed top-1/2 left-1/2 z-20 -translate-x-1/2 -translate-y-1/2",l),style:z,onAnimationComplete:Ne,onLayoutAnimationComplete:he,...Un,children:[jsx(m.div,{"data-slot":"ui-modal-visual",layout:true,children:o}),jsx(AnimatePresence,{children:g&&jsx(m.div,{"data-slot":"ui-modal-content",onAnimationComplete:ie,...Vn,transition:Mn,className:c("flex w-full flex-col overflow-hidden",n),children:a},"content")})]})]})})})}var lr=S__default.createContext(null);function Fn(){let e=S__default.useContext(lr);if(!e)throw new Error("useUIScreen must be used within <UIScreen>");return e}function St({value:e,animation:t,className:o,children:r}){return jsx(Fragment,{children:r})}St.displayName="UIScreen.View";function Hn(e){return S__default.isValidElement(e)&&e.type===St}function sr(e,t=[]){return S__default.Children.forEach(e,o=>{if(S__default.isValidElement(o)&&o.type===S__default.Fragment){sr(o.props.children,t);return}if(!Hn(o))return;let r=o.props.value,a=Array.isArray(r)?Array.from(r):[r];t.push({values:a,animation:o.props.animation,className:o.props.className,activeKey:t.length,children:o.props.children});}),t}function Gn(e){let t=new Set;e.forEach(({values:o})=>{if(!o.length)throw new Error("UIScreen.View value must not be an empty array.");o.forEach(r=>{if(t.has(r))throw new Error(`Duplicate UIScreen.View value "${String(r)}".`);t.add(r);});});}function cr({screen:e,defaultScreen:t,onScreenChange:o,children:r,...a},n){let l=e!==void 0,[s,p]=S__default.useState(t),c$1=e??s,d=de(c$1),u=S__default.useRef(null),v=sr(r);if(!v.length)throw new Error("UIScreen requires at least one UIScreen.View child.");if(e!==void 0&&t!==void 0)throw new Error("UIScreen accepts either screen or defaultScreen, but not both.");if(c$1===void 0)throw new Error("UIScreen requires either a screen or defaultScreen prop.");let m=c$1;Gn(v);let f=v.find(h=>h.values.includes(m));if(!f)throw new Error(`UIScreen could not find a UIScreen.View matching screen "${String(m)}".`);let g=u.current,x=g!==null&&d===g.from&&m===g.to;S__default.useLayoutEffect(()=>{let h=u.current;h&&m!==h.from&&(u.current=null);},[m]);let D=S__default.useMemo(()=>({screen:m,navigate:(h,b)=>{let C=b?.animation;u.current=h!==m&&C?{from:m,to:h,animation:C}:null,l||p(h),o?.(h);}}),[l,o,m]);return jsx(lr.Provider,{value:D,children:jsx(Tt,{ref:n,...a,animation:(x?g.animation:f.animation)??a.animation,viewClassName:c(a.viewClassName,f.className),activeKey:f.activeKey,children:f.children})})}cr.displayName="UIScreen";var Kn=S__default.forwardRef(cr),Wn=Object.assign(Kn,{View:St});var qn=()=>{let[,e]=S.useState(false);return S.useCallback(()=>{e(t=>!t);},[])};var Xn=(e=false)=>{let[t,o]=S.useState(e),r=S.useCallback(()=>{o(a=>!a);},[]);return [t,r]};
|
|
2
|
+
export{Va as AlertDialog,pn as AnimationCard,jt as Avatar,Xs as Badge,$a as ButtonGroup,Xa as ButtonGroupSeparator,qa as ButtonGroupText,Ls as Collapsible,Hs as CollapsibleContent,Fs as CollapsibleTrigger,J as ColorPanel,Ga as CopyableText,Jr as Drawer,en as HoverCard,Gr as InputOTP,kr as PopConfirm,Tr as PopoverPreset,ja as ScrollArea,ht as StateSwitcher,yt as Swap,Ln as UIMorphingModal,Wn as UIScreen,Tt as UIViewTransition,Uo as buttonGroupVariants,bi as compact,hi as findOption,ui as formatCurrency,mi as formatIntegerCompact,di as formatNumber,fi as getFirstLetters,Ai as omit,br as pick,yi as unique,aa as useDrawer,qn as useForceUpdate,de as usePrevious,Xn as useToggle,Fn as useUIScreen};
|