@jerry-fd/ui 0.6.3 → 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/{button-BNFX2JB5.d.ts → button-DxZ9iyob.d.ts} +1 -1
- package/{chunk-I55VLHX5.js → chunk-6YOHG3I6.js} +1 -1
- package/chunk-7T5LUFMY.js +2 -0
- package/chunk-R2S624AO.js +1 -0
- package/data-table.d.ts +13 -2
- package/data-table.js +2 -2
- package/index.d.ts +201 -8
- package/index.js +2 -2
- package/package.json +14 -3
- package/preset/badge.css +107 -0
- package/preset/index.css +2 -0
- package/preset/typography.css +141 -0
- package/source.css +6 -0
- package/styles/base.css +55 -0
- package/styles/index.css +1 -1
- package/styles/keyframes.css +61 -0
- package/theme/badge-tokens.css +95 -0
- package/theme/badge.css +3 -200
- package/theme/colors.css +1 -1
- package/theme/index.css +5 -7
- package/theme/shadows.css +1 -1
- package/theme/typography-tokens.css +120 -0
- package/theme/typography.css +3 -263
- package/chunk-4E3BXPKA.js +0 -2
- package/chunk-6KWUEETQ.js +0 -2
- package/chunk-L6CCY6AH.js +0 -1
package/index.d.ts
CHANGED
|
@@ -5,10 +5,11 @@ import * as tailwind_variants from 'tailwind-variants';
|
|
|
5
5
|
import { VariantProps } from 'tailwind-variants';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
import { Command as Command$1 } from 'cmdk';
|
|
8
|
-
import { Tabs as Tabs$1, Popover as Popover$1, Switch as Switch$1, DropdownMenu as DropdownMenu$2, Collapsible as Collapsible$1, Tooltip as Tooltip$1, ScrollArea as ScrollArea$1, HoverCard as HoverCard$1 } from 'radix-ui';
|
|
8
|
+
import { Tabs as Tabs$1, Popover as Popover$1, Switch as Switch$1, AlertDialog as AlertDialog$1, DropdownMenu as DropdownMenu$2, Separator as Separator$1, Collapsible as Collapsible$1, Tooltip as Tooltip$1, ScrollArea as ScrollArea$1, HoverCard as HoverCard$1 } from 'radix-ui';
|
|
9
|
+
import { OTPInputProps } from 'input-otp';
|
|
9
10
|
import { DialogProps } from 'vaul';
|
|
10
|
-
import { B as ButtonProps, a as ButtonSharedProps } from './button-
|
|
11
|
-
export {
|
|
11
|
+
import { B as ButtonProps, a as Button, b as ButtonSharedProps } from './button-DxZ9iyob.js';
|
|
12
|
+
export { c as baseButtonStyle, d as buttonVariants } from './button-DxZ9iyob.js';
|
|
12
13
|
import { I as IconType } from './icon-BmaneZ4I.js';
|
|
13
14
|
import * as tailwind_merge from 'tailwind-merge';
|
|
14
15
|
import { Variants, Transition } from 'motion/react';
|
|
@@ -923,6 +924,115 @@ declare function Switch({ className, size, disabled, loading, onChange, ...props
|
|
|
923
924
|
onChange?: RootProps['onCheckedChange'];
|
|
924
925
|
}): react_jsx_runtime.JSX.Element;
|
|
925
926
|
|
|
927
|
+
declare const inputOTPVariants: tailwind_variants.TVReturnType<{
|
|
928
|
+
variant: {
|
|
929
|
+
filled: {
|
|
930
|
+
slot: string;
|
|
931
|
+
};
|
|
932
|
+
stroke: {
|
|
933
|
+
slot: string;
|
|
934
|
+
};
|
|
935
|
+
};
|
|
936
|
+
size: {
|
|
937
|
+
xsmall: {
|
|
938
|
+
group: string;
|
|
939
|
+
slot: string;
|
|
940
|
+
};
|
|
941
|
+
small: {
|
|
942
|
+
group: string;
|
|
943
|
+
slot: string;
|
|
944
|
+
};
|
|
945
|
+
medium: {
|
|
946
|
+
group: string;
|
|
947
|
+
slot: string;
|
|
948
|
+
};
|
|
949
|
+
large: {
|
|
950
|
+
group: string;
|
|
951
|
+
slot: string;
|
|
952
|
+
};
|
|
953
|
+
};
|
|
954
|
+
}, {
|
|
955
|
+
group: string;
|
|
956
|
+
slot: string[];
|
|
957
|
+
}, undefined, {
|
|
958
|
+
variant: {
|
|
959
|
+
filled: {
|
|
960
|
+
slot: string;
|
|
961
|
+
};
|
|
962
|
+
stroke: {
|
|
963
|
+
slot: string;
|
|
964
|
+
};
|
|
965
|
+
};
|
|
966
|
+
size: {
|
|
967
|
+
xsmall: {
|
|
968
|
+
group: string;
|
|
969
|
+
slot: string;
|
|
970
|
+
};
|
|
971
|
+
small: {
|
|
972
|
+
group: string;
|
|
973
|
+
slot: string;
|
|
974
|
+
};
|
|
975
|
+
medium: {
|
|
976
|
+
group: string;
|
|
977
|
+
slot: string;
|
|
978
|
+
};
|
|
979
|
+
large: {
|
|
980
|
+
group: string;
|
|
981
|
+
slot: string;
|
|
982
|
+
};
|
|
983
|
+
};
|
|
984
|
+
}, {
|
|
985
|
+
group: string;
|
|
986
|
+
slot: string[];
|
|
987
|
+
}, tailwind_variants.TVReturnType<{
|
|
988
|
+
variant: {
|
|
989
|
+
filled: {
|
|
990
|
+
slot: string;
|
|
991
|
+
};
|
|
992
|
+
stroke: {
|
|
993
|
+
slot: string;
|
|
994
|
+
};
|
|
995
|
+
};
|
|
996
|
+
size: {
|
|
997
|
+
xsmall: {
|
|
998
|
+
group: string;
|
|
999
|
+
slot: string;
|
|
1000
|
+
};
|
|
1001
|
+
small: {
|
|
1002
|
+
group: string;
|
|
1003
|
+
slot: string;
|
|
1004
|
+
};
|
|
1005
|
+
medium: {
|
|
1006
|
+
group: string;
|
|
1007
|
+
slot: string;
|
|
1008
|
+
};
|
|
1009
|
+
large: {
|
|
1010
|
+
group: string;
|
|
1011
|
+
slot: string;
|
|
1012
|
+
};
|
|
1013
|
+
};
|
|
1014
|
+
}, {
|
|
1015
|
+
group: string;
|
|
1016
|
+
slot: string[];
|
|
1017
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
1018
|
+
type InputOTPContextValue = VariantProps<typeof inputOTPVariants> & {
|
|
1019
|
+
'aria-invalid'?: React$1.AriaAttributes['aria-invalid'];
|
|
1020
|
+
};
|
|
1021
|
+
type OTPInputChildrenProps = Extract<OTPInputProps, {
|
|
1022
|
+
render?: never;
|
|
1023
|
+
}>;
|
|
1024
|
+
type InputOTPHandle = {
|
|
1025
|
+
readonly input: HTMLInputElement | null;
|
|
1026
|
+
focus: () => void;
|
|
1027
|
+
blur: () => void;
|
|
1028
|
+
shake: () => Promise<void>;
|
|
1029
|
+
};
|
|
1030
|
+
type InputOTPProps = Omit<OTPInputChildrenProps, 'size' | 'containerClassName' | 'children' | 'ref'> & InputOTPContextValue & {
|
|
1031
|
+
classNames?: Partial<Record<'input' | 'group' | 'container', string>>;
|
|
1032
|
+
ref?: React$1.Ref<InputOTPHandle>;
|
|
1033
|
+
};
|
|
1034
|
+
declare function InputOTP({ maxLength, size, variant, className, classNames, ref, pattern, 'aria-invalid': ariaInvalid, ...props }: InputOTPProps): react_jsx_runtime.JSX.Element;
|
|
1035
|
+
|
|
926
1036
|
declare const fancyButtonVariants: tailwind_variants.TVReturnType<{
|
|
927
1037
|
variant: {
|
|
928
1038
|
neutral: {
|
|
@@ -1241,6 +1351,63 @@ declare function useDrawer<TData = unknown, TResult = unknown>(options?: UseDraw
|
|
|
1241
1351
|
result: TResult | undefined;
|
|
1242
1352
|
}, (record?: TData) => Promise<void>, () => void];
|
|
1243
1353
|
|
|
1354
|
+
declare const DIALOG_MEDIA_PRESET: {
|
|
1355
|
+
info: react_jsx_runtime.JSX.Element;
|
|
1356
|
+
form: react_jsx_runtime.JSX.Element;
|
|
1357
|
+
otp: react_jsx_runtime.JSX.Element;
|
|
1358
|
+
warning: react_jsx_runtime.JSX.Element;
|
|
1359
|
+
destructive: react_jsx_runtime.JSX.Element;
|
|
1360
|
+
};
|
|
1361
|
+
type AlertDialogIntent = keyof typeof DIALOG_MEDIA_PRESET;
|
|
1362
|
+
type AlertDialogIcon = React$1.ReactElement | false;
|
|
1363
|
+
|
|
1364
|
+
type AlertDialogContentMotion = 'scale-fade' | 'slide-fade';
|
|
1365
|
+
type AlertDialogRootProps = React$1.ComponentProps<typeof AlertDialog$1.Root> & {
|
|
1366
|
+
overlayBlur?: boolean;
|
|
1367
|
+
contentMotion?: AlertDialogContentMotion;
|
|
1368
|
+
dismissible?: boolean;
|
|
1369
|
+
disableClose?: boolean;
|
|
1370
|
+
};
|
|
1371
|
+
type AlertDialogContentProps = React$1.ComponentProps<typeof AlertDialog$1.Content> & {
|
|
1372
|
+
wrapperClassName?: string;
|
|
1373
|
+
};
|
|
1374
|
+
|
|
1375
|
+
type AlertDialogActionErrorFeedback = {
|
|
1376
|
+
status: 'error';
|
|
1377
|
+
message?: React$1.ReactNode;
|
|
1378
|
+
};
|
|
1379
|
+
type AlertDialogActionSuccessFeedback = {
|
|
1380
|
+
status: 'success';
|
|
1381
|
+
message?: React$1.ReactNode;
|
|
1382
|
+
closeDelay?: number;
|
|
1383
|
+
};
|
|
1384
|
+
type AlertDialogActionFeedback = AlertDialogActionSuccessFeedback | AlertDialogActionErrorFeedback;
|
|
1385
|
+
|
|
1386
|
+
type AlertDialogActionResponse = AlertDialogActionFeedback;
|
|
1387
|
+
type AlertDialogActionResult = void | AlertDialogActionResponse;
|
|
1388
|
+
type AlertDialogActionConfig = {
|
|
1389
|
+
text?: React$1.ReactNode;
|
|
1390
|
+
buttonProps?: Omit<React$1.ComponentProps<typeof Button>, 'children' | 'loading'>;
|
|
1391
|
+
onClick?: () => AlertDialogActionResult | Promise<AlertDialogActionResult>;
|
|
1392
|
+
};
|
|
1393
|
+
type AlertDialogProps = AlertDialogRootProps & {
|
|
1394
|
+
onOpenAutoFocus?: AlertDialogContentProps['onOpenAutoFocus'];
|
|
1395
|
+
title?: React$1.ReactNode;
|
|
1396
|
+
description?: React$1.ReactNode;
|
|
1397
|
+
/** dialog 场景意图,决定默认视觉和 footer 行为 */
|
|
1398
|
+
intent?: AlertDialogIntent;
|
|
1399
|
+
/** 自定义顶部图标;传 false 可关闭 intent 对应的默认图标 */
|
|
1400
|
+
icon?: AlertDialogIcon;
|
|
1401
|
+
trigger?: React$1.ReactNode;
|
|
1402
|
+
children?: React$1.ReactNode;
|
|
1403
|
+
footer?: React$1.ReactNode | null;
|
|
1404
|
+
action?: AlertDialogActionConfig;
|
|
1405
|
+
cancel?: false | AlertDialogActionConfig;
|
|
1406
|
+
className?: string;
|
|
1407
|
+
classNames?: Partial<Record<'wrapper' | 'header' | 'body' | 'footer' | 'title' | 'description', string>>;
|
|
1408
|
+
};
|
|
1409
|
+
declare function AlertDialog({ open, defaultOpen, onOpenChange, overlayBlur, contentMotion, dismissible, disableClose: disableCloseProp, intent, icon, title, description, footer, action, cancel, className, classNames, onOpenAutoFocus, trigger: dialogTrigger, children, ...rootProps }: AlertDialogProps): react_jsx_runtime.JSX.Element;
|
|
1410
|
+
|
|
1244
1411
|
type CopyableTextProps = Omit<ButtonSharedProps, 'loading'> & {
|
|
1245
1412
|
className?: string;
|
|
1246
1413
|
content: string;
|
|
@@ -1495,6 +1662,31 @@ declare const dropdownMenuStyles: {
|
|
|
1495
1662
|
} & {};
|
|
1496
1663
|
type DropdownMenuVariants = VariantProps<typeof menu>;
|
|
1497
1664
|
|
|
1665
|
+
declare const Separator: React__default.FC<React__default.ComponentProps<typeof Separator$1.Root>>;
|
|
1666
|
+
|
|
1667
|
+
declare const buttonGroupVariants: tailwind_variants.TVReturnType<{
|
|
1668
|
+
orientation: {
|
|
1669
|
+
horizontal: string;
|
|
1670
|
+
vertical: string;
|
|
1671
|
+
};
|
|
1672
|
+
}, undefined, "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", {
|
|
1673
|
+
orientation: {
|
|
1674
|
+
horizontal: string;
|
|
1675
|
+
vertical: string;
|
|
1676
|
+
};
|
|
1677
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
1678
|
+
orientation: {
|
|
1679
|
+
horizontal: string;
|
|
1680
|
+
vertical: string;
|
|
1681
|
+
};
|
|
1682
|
+
}, undefined, "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", unknown, unknown, undefined>>;
|
|
1683
|
+
type SharedProps$1 = VariantProps<typeof buttonGroupVariants>;
|
|
1684
|
+
declare function ButtonGroup({ className, orientation, ...props }: React$1.ComponentProps<'div'> & SharedProps$1): react_jsx_runtime.JSX.Element;
|
|
1685
|
+
declare function ButtonGroupText({ className, asChild, ...props }: React$1.ComponentProps<'div'> & {
|
|
1686
|
+
asChild?: boolean;
|
|
1687
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1688
|
+
declare function ButtonGroupSeparator({ className, orientation, ...props }: React$1.ComponentProps<typeof Separator>): react_jsx_runtime.JSX.Element;
|
|
1689
|
+
|
|
1498
1690
|
type OwnProps = {
|
|
1499
1691
|
stroke?: number | string;
|
|
1500
1692
|
className?: string;
|
|
@@ -1533,7 +1725,7 @@ declare const colorPanelVariants: tailwind_variants.TVReturnType<{
|
|
|
1533
1725
|
pink: string;
|
|
1534
1726
|
rose: string;
|
|
1535
1727
|
};
|
|
1536
|
-
}, undefined, "flex shrink-0 items-center justify-center rounded-2xl ring-1 ring-transparent
|
|
1728
|
+
}, undefined, "flex shrink-0 items-center justify-center rounded-2xl ring-1 ring-transparent", {
|
|
1537
1729
|
variant: {
|
|
1538
1730
|
filled: string;
|
|
1539
1731
|
lighter: string;
|
|
@@ -1593,12 +1785,13 @@ declare const colorPanelVariants: tailwind_variants.TVReturnType<{
|
|
|
1593
1785
|
pink: string;
|
|
1594
1786
|
rose: string;
|
|
1595
1787
|
};
|
|
1596
|
-
}, undefined, "flex shrink-0 items-center justify-center rounded-2xl ring-1 ring-transparent
|
|
1788
|
+
}, undefined, "flex shrink-0 items-center justify-center rounded-2xl ring-1 ring-transparent", unknown, unknown, undefined>>;
|
|
1597
1789
|
type SharedProps = VariantProps<typeof colorPanelVariants>;
|
|
1598
|
-
type ColorPanelProps = React__default.ComponentProps<'div'> & SharedProps & {
|
|
1790
|
+
type ColorPanelProps = React__default.ComponentProps<'div'> & Omit<SharedProps, 'ring'> & {
|
|
1599
1791
|
asChild?: boolean;
|
|
1792
|
+
ring?: true | 'inset';
|
|
1600
1793
|
};
|
|
1601
|
-
declare function ColorPanel({ asChild, children, className, color, variant, ring, ...props }: ColorPanelProps): react_jsx_runtime.JSX.Element;
|
|
1794
|
+
declare function ColorPanel({ asChild, children, className, color, variant, ring: ringProp, ...props }: ColorPanelProps): react_jsx_runtime.JSX.Element;
|
|
1602
1795
|
|
|
1603
1796
|
declare function Collapsible({ ...props }: React__default.ComponentProps<typeof Collapsible$1.Root>): react_jsx_runtime.JSX.Element;
|
|
1604
1797
|
declare function CollapsibleTrigger({ ...props }: React__default.ComponentProps<typeof Collapsible$1.CollapsibleTrigger>): react_jsx_runtime.JSX.Element;
|
|
@@ -2041,4 +2234,4 @@ declare const useFlag: (initial?: boolean) => [boolean, NoneToVoidFunction, None
|
|
|
2041
2234
|
|
|
2042
2235
|
declare const useToggle: (initial?: boolean) => [boolean, NoneToVoidFunction];
|
|
2043
2236
|
|
|
2044
|
-
export { AnimationCard, type AnimationCardProps, type AnimationName$1 as AnimationName, index as Avatar, Badge, type BadgeProps, ButtonProps, ButtonSharedProps, card as Card, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPanel, command as Command, CopyableText, type CopyableTextProps, type DebouncedFunction, Drawer, type DrawerProps, DropdownMenu, type DropdownMenuItemProps, type DropdownMenuProps, type DropdownMenuVariants, FancyButtonRoot as FancyButton, HoverCard, type MenuPropBase, PopConfirm, type PopConfirmProps, popover as Popover, PopoverPreset, type PopoverPresetProps, type Scheduler, ScrollArea, Skeleton, Spinner, StateSwitcher, Swap, Switch, tabs as Tabs, type ThrottledFunction, Tooltip, TooltipArrow, TooltipProvider, TooltipRoot, TooltipTrigger, UIMorphingModal, type UIMorphingModalContentAnimationState, type UIMorphingModalProps, UIProvider, UIScreen, type UIScreenControls, type UIScreenNavigateFn, type UIScreenNavigateOptions, type UIScreenProps, type UIScreenValue, type UIScreenViewProps, UIViewTransition, type UIViewTransitionProps, type UseDrawerOptions, cn, compact, debounce, dropdownMenuStyles, fancyButtonVariants, findOption, formatCurrency, formatIntegerCompact, formatNumber, getFirstLetters, mergeRefs, omit, pick, throttle, tooltipVariants, tv, twMergeConfig, unique, useDisableContentMenu, useDrawer, useFlag, useForceUpdate, usePrevious, useToggle, useUIScreen };
|
|
2237
|
+
export { AlertDialog, type AlertDialogActionConfig, type AlertDialogActionErrorFeedback, type AlertDialogActionResponse, type AlertDialogActionResult, type AlertDialogActionSuccessFeedback, type AlertDialogContentMotion, type AlertDialogIcon, type AlertDialogIntent, type AlertDialogProps, type AlertDialogRootProps, AnimationCard, type AnimationCardProps, type AnimationName$1 as AnimationName, index as Avatar, Badge, type BadgeProps, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, ButtonProps, ButtonSharedProps, card as Card, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPanel, command as Command, CopyableText, type CopyableTextProps, type DebouncedFunction, Drawer, type DrawerProps, DropdownMenu, type DropdownMenuItemProps, type DropdownMenuProps, type DropdownMenuVariants, FancyButtonRoot as FancyButton, HoverCard, InputOTP, type InputOTPHandle, type InputOTPProps, type MenuPropBase, PopConfirm, type PopConfirmProps, popover as Popover, PopoverPreset, type PopoverPresetProps, type Scheduler, ScrollArea, Skeleton, Spinner, StateSwitcher, Swap, Switch, tabs as Tabs, type ThrottledFunction, Tooltip, TooltipArrow, TooltipProvider, TooltipRoot, TooltipTrigger, UIMorphingModal, type UIMorphingModalContentAnimationState, type UIMorphingModalProps, UIProvider, UIScreen, type UIScreenControls, type UIScreenNavigateFn, type UIScreenNavigateOptions, type UIScreenProps, type UIScreenValue, type UIScreenViewProps, UIViewTransition, type UIViewTransitionProps, type UseDrawerOptions, buttonGroupVariants, cn, compact, debounce, dropdownMenuStyles, fancyButtonVariants, findOption, formatCurrency, formatIntegerCompact, formatNumber, getFirstLetters, mergeRefs, omit, pick, throttle, tooltipVariants, tv, twMergeConfig, unique, useDisableContentMenu, useDrawer, useFlag, useForceUpdate, usePrevious, useToggle, useUIScreen };
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import'./chunk-4E3BXPKA.js';import {k,a as a$1,l,p,s}from'./chunk-I55VLHX5.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-I55VLHX5.js';import {b,c,F,J,G,H,I as I$1,P,S,i,E}from'./chunk-6KWUEETQ.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-6KWUEETQ.js';import {a}from'./chunk-M7AD2PUT.js';import {Slot,Collapsible,ScrollArea,HoverCard,Portal}from'radix-ui';import*as I from'react';import I__default,{useRef,useState,useLayoutEffect}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {CircleAlert,Copy,CheckCheck}from'lucide-react';import {m,AnimatePresence}from'motion/react';import {Drawer}from'vaul';import mr from'react-use-measure';var st=new WeakMap;function lt(e){return((...t)=>{let o=st.get(e),r=t.map(String).join("_");if(o){let i=o.get(r);if(i)return i}else o=new Map,st.set(e,o);let a=e(...t);return o.set(r,a),a})}function xa(e,t,o="zh-CN"){return new Intl.NumberFormat(o,t).format(e)}function ya(e,t,o="zh-CN"){return new Intl.NumberFormat(o,{style:"currency",...t}).format(e)}function ba(e,t="en-US"){return new Intl.NumberFormat(t,{notation:"compact",compactDisplay:"short"}).format(e)}var Ra=lt((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 Ta(e,t){return Array.isArray(t)?e.filter(o=>t.some(r=>r===o.value)):e.find(o=>o.value===t)}function Sa(e){return Array.from(new Set(e))}function Ia(e){return e.filter(xo)}function xo(e){return !!e}function yo(e,t){return t.reduce((o,r)=>(o[r]=e[r],o),{})}function Aa(e,t){let o=new Set(t.map(String)),r=Object.keys(e).filter(a=>!o.has(a));return yo(e,r)}var wt={};a(wt,{AVATAR_ROOT_NAME:()=>dt,Badge:()=>Rt,BrandLogo:()=>yt,Image:()=>Be,Indicator:()=>vt,Notification:()=>bt,Root:()=>gt,Status:()=>xt,avatarRingVariants:()=>ft,avatarStatusVariants:()=>ht,avatarVariants:()=>Pe});function se(e,t,o,r,a){let i=I__default.Children.map(e,(s,l)=>{if(!I__default.isValidElement(s))return s;let f=s.type?.displayName||"",p=o.includes(f)?t:{},c=s.props;return I__default.cloneElement(s,{...p,key:`${r}-${l}`},se(c?.children,t,o,r,c?.asChild))});return a?i?.[0]:i}function ct(e){let t=I.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 pt(e){let t=I.useId(),o=I.useId(),r=I.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 dt="AvatarRoot",ut="AvatarImage",mt="AvatarIndicator",Ro="AvatarStatus",wo="AvatarBrandLogo",Co="AvatarNotification",Po="AvatarBadge",ze=Slot.Root,Pe=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"}}),ft=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"}}),Be=I.forwardRef(({asChild:e,className:t,size:o,color:r,...a},i)=>{let s=e?ze:"img",{image:l}=Pe({size:o,color:r});return jsx(s,{ref:i,className:l({class:t}),...a})});Be.displayName=ut;var gt=I.forwardRef(({asChild:e,children:t,size:o,color:r,ring:a,className:i,placeholderType:s="user",...l},f)=>{let p=I.useId(),c$1=e?ze:"div",d=a?ft({color:a===true?r:typeof a=="string"?a:void 0}):void 0,{root:v}=Pe({size:o,color:r}),m=c(v(),d,i),g={size:o,color:r};if(!t)return jsx("div",{className:m,...l,children:jsx(Be,{asChild:true,children:s==="company"?jsx(pt,{}):jsx(ct,{})})});let u=se(t,g,[ut,mt],p,e);return jsx(c$1,{ref:f,className:m,...l,children:u})});gt.displayName=dt;function vt({size:e,color:t,className:o,position:r="bottom",withRing:a,...i}){let{indicator:s}=Pe({size:e,color:t,withRing:a});return jsx("div",{className:c(s({class:o}),{"top-0 origin-top-right":r==="top","bottom-0 origin-bottom-right":r==="bottom"}),...i})}vt.displayName=mt;var ht=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:ht({status:e,class:t}),...o})}xt.displayName=Ro;var yt=I.forwardRef(({asChild:e,className:t,...o},r)=>jsx(e?ze:"img",{draggable:false,ref:r,className:c("box-content size-24 rounded-full border-2 border-bg-white",t),...o}));yt.displayName=wo;function bt({className:e,...t}){return jsx("div",{className:c("box-content size-12 rounded-full border-2 border-bg-white bg-error-base",e),...t})}bt.displayName=Co;function Rt({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})}Rt.displayName=Po;function Te({className:e,variant:t="neutral",mode:o="stroke",size:r="small",...a}){return jsx(P,{variant:t,mode:o,size:r,className:c("absolute top-12 right-10 z-10 m-auto aspect-square rounded-full border-transparent text-text-soft hover:text-text-strong",e),...a,children:jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M10.4854 1.99998L2.00007 10.4853",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),jsx("path",{d:"M10.4854 10.4844L2.00007 1.99908",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})}var _e=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 So({variant:e,className:t,contentClassName:o,closeableClassName:r,side:a="bottom",align:i="start",arrow:s=true,unstyled:l=true,closeable:f=true,sideOffset:p=1,title:c$1,content:d,children:v,asChild:m,defaultOpen:g,open:u,onOpenChange:b,onClose:S,...h}){let{root:y,content:P,header:R,close:A,arrowCls:w}=_e({variant:e}),[T,N]=I__default.useState(g??false),D=u!==void 0,M=D?u:T,L=I__default.useCallback(q=>{D||N(q),b?.(q);},[D,b]);return jsxs(F,{open:M,onOpenChange:L,children:[D&&M&&jsx(J,{}),jsx(G,{className:c(D&&M&&"relative z-20"),asChild:m,children:v}),jsxs(H,{className:y({className:t}),arrowClassName:w(),unstyled:l,side:a,align:i,sideOffset:p,arrow:s,...h,children:[c$1&&jsx("header",{className:R({className:f&&"pe-28"}),children:typeof c$1=="string"?jsx("h3",{className:"m-0 text-title-h6 text-text-strong",children:c$1}):c$1}),f&&jsx(I$1,{asChild:true,onClick:S,children:jsx(Te,{size:"xsmall",mode:"ghost",className:A({class:c("size-24 p-0",r)})})}),jsx("div",{className:P({className:o}),children:d})]})]})}function Do({variant:e="default",title:t,content:o,children:r,defaultOpen:a,className:i,side:s="top",align:l$1="center",sideOffset:f=1,arrow:p=true,open:c$1,contentClassName:d,onOpenChange:v,onConfirm:m$1,onCancel:g,...u}){let{root:b,content:S,header:h,arrowCls:y}=_e({variant:e}),[P$1,R]=I__default.useState(a??false),A=c$1!==void 0,w=A?c$1:P$1,T=I__default.useCallback(L=>{A||R(L),v?.(L);},[A,v]),[N,D]=I__default.useState(false),M=I__default.useCallback(async()=>{T(false);try{D(!0),await m$1?.();}catch{}finally{D(false);}},[T,m$1]);return jsxs(F,{open:w,onOpenChange:T,children:[jsx(AnimatePresence,{children:w&&jsx(J,{as:m.div,...l,className:"bg-black/5"})}),jsx(G,{className:c(w&&"relative z-20"),children:jsx("div",{className:"inline-flex items-center",children:I__default.isValidElement(r)?I__default.cloneElement(r,{loading:N}):r})}),jsxs(H,{className:b({className:c("max-w-lg",i)}),arrowClassName:y(),unstyled:true,side:s,align:l$1,sideOffset:f,arrow:p,...u,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:S({className:d}),children:[o,jsxs("div",{className:"mt-8 flex justify-end gap-12",children:[jsx(I$1,{unstyled:true,onClick:g,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"})]})]})]})]})}function Tt({...e}){return jsx(Drawer.Root,{"data-slot":"drawer",...e})}function St({...e}){return jsx(Drawer.Trigger,{"data-slot":"drawer-trigger",...e})}function Vo({...e}){return jsx(Drawer.Portal,{"data-slot":"drawer-portal",...e})}function He({...e}){return jsx(Drawer.Close,{"data-slot":"drawer-close",...e})}function Eo({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 ko={top:"max-h-[80vh]",bottom:"mt-96 max-h-[80vh]",left:"w-3/5",right:"w-3/5"};function It({className:e,direction:t,children:o,...r}){return jsxs(Vo,{"data-slot":"drawer-portal",children:[jsx(Eo,{}),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&&ko[t],e),...r,children:o})]})}function At({className:e,...t}){return jsx("div",{"data-slot":"drawer-header",className:c("flex flex-col px-16 py-12",e),...t})}function Fe({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 Nt({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 Ge({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 We({className:e,...t}){return jsx(Drawer.Description,{"data-slot":"drawer-description",className:c("m-0 text-md text-text-sub",e),...t})}var Bo=k({y:12,scale:.98}),Dt=m.create(Fe);function Lo({direction:e="right",dismissible:t=true,closeable:o=true,skeleton:r,className:a,classNames:i,title:s,description:l$1,footer:f,trigger:p,anchorContainer:c$1,children:d,open:v,onOpenChange:m,loading:g,handleOnly:u=true,style:b,width:S$1,gutter:h=8,okButtonProps:y,closeButtonProps:P$1,animation:R=true,onClose:A,onOk:w,...T}){let N=S(),D=typeof h=="number"?`${h}px`:h,M=I__default.useMemo(()=>({"--initial-transform":`calc(100% + ${D})`,...Ho(e,D),...b,width:S$1}),[e,D,S$1]),[L,q]=I__default.useState(false),[W,Y]=I__default.useState(false),ie=v!==void 0,Oe=ie?v:L,Z=I__default.useCallback(V=>{!V&&W||(ie||q(V),m?.(V));},[ie,m,W]),ve=I__default.useCallback(async()=>{if(!w){Z(false);return}let V=w();if(V instanceof Promise){Y(true);try{await V,Z(!1);}finally{Y(false);}}else Z(false);},[w,Z]);return jsxs(Tt,{container:c$1,direction:e,dismissible:!W&&t,handleOnly:u,autoFocus:true,open:Oe,onOpenChange:Z,...T,children:[p&&jsx(St,{asChild:true,children:p}),jsxs(It,{className:c(c$1&&c$1!==document.body&&"absolute",a),direction:e,style:M,children:[o&&jsx(He,{className:"aspect-square size-32 -translate-y-1 px-8",disabled:W,onClick:t?void 0:A,asChild:true,children:jsx(Te,{})}),jsx(Ge,{className:"sr-only hidden",children:"Drawer"}),jsx(We,{className:"sr-only hidden",children:"Description"}),(s||l$1)&&jsxs(At,{className:c("border-b border-b-stroke-antd",i?.header),children:[s&&jsx(Ge,{className:"pe-42",asChild:typeof s!="string",children:s}),l$1&&jsx(We,{children:l$1})]}),!R&&jsx(Fe,{className:i?.body,children:d}),R&&jsx(a$1,{children:jsx(AnimatePresence,{mode:"wait",children:g?jsx(Dt,{...l,className:c(i?.body,"overflow-hidden"),children:r??jsx(_o,{count:5})},"skeleton"):jsx(Dt,{...Bo,className:i?.body,children:d},"content")})}),f===null?jsx("div",{className:c("mt-auto h-16",i?.footer)}):jsxs(Nt,{className:c("border-t border-t-stroke-antd",!f&&"flex-col gap-8 @[420px]:flex-row-reverse",i?.footer),children:[f,!f&&jsxs(Fragment,{children:[jsx(P,{variant:"neutral",mode:"filled",className:"w-full @[420px]:w-7/10 @[620px]:w-6/10",...y,loading:g||W,onClick:ve,children:y?.children??N("ok")}),jsx(He,{asChild:true,children:jsx(P,{variant:"neutral",mode:"stroke",className:"w-full @[420px]:w-3/10 @[620px]:w-4/10",...P$1,disabled:W,onClick:t?void 0:A,children:P$1?.children??N("close")})})]})]})]})]})}function _o({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 Ho(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 Go={};function Wo(e){let{destroyPayloadOnClose:t=true,onOpen:o,getTitle:r,title:a,onOpenChange:i,onAnimationEnd:s,...l}=e??Go,[f,p]=I__default.useState(false),[c,d]=I__default.useState(),[v,m]=I__default.useState(),g=I__default.useRef(null),[u,b]=I__default.useState(false),S=I__default.useCallback(async T=>{g.current?.abort();let N=new AbortController;if(g.current=N,T&&d(T),p(true),o){b(true);try{let D=await o(T,N.signal);N.signal.aborted||m(D);}finally{N.signal.aborted||b(false);}}},[o]);I__default.useEffect(()=>()=>{g.current?.abort(),g.current=null;},[]);let h=I__default.useCallback(()=>{g.current?.abort(),g.current=null,b(false),p(false);},[]),y=I__default.useCallback(T=>{T||(g.current?.abort(),g.current=null,b(false)),p(T),i?.(T);},[i]),P=I__default.useCallback(T=>{!T&&t&&(d(void 0),m(void 0)),s?.(T);},[t,s]),R=I__default.useMemo(()=>({payload:c,result:v}),[c,v]),A=r?.(u,R);return [{...l,title:A||a,...o&&{loading:u},open:f,onOpenChange:y,onClose:h,onAnimationEnd:P},R,S,h]}var Vt=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 Ko={initial:{scale:.5,opacity:0,filter:"blur(2px)"},animate:{scale:1,opacity:1,filter:"blur(0px)"},exit:{scale:.5,opacity:0,filter:"blur(2px)"}},qo={opacity:{duration:.25},filter:{duration:.25},scale:{duration:.35,ease:[.34,1.56,.64,1]}},Yo={variants:Ko,initial:"initial",animate:"animate",exit:"exit",transition:qo};function $e({initial:e=false,state:t,states:o,asDiv:r,className:a,style:i,...s}){let l=r?m.div:m.span;return jsx(AnimatePresence,{initial:e,mode:"popLayout",children:jsx(l,{className:c("inline-flex items-center justify-center",a),...Yo,style:i,...s,children:o[t]},t)})}function Ke({swap:e,on:t,off:o,className:r}){return jsx($e,{state:e?"on":"off",states:{on:t,off:o},className:r})}function Jo({content:e,delay:t=700,tooltipDelayDuration:o=700,variant:r="neutral",mode:a="stroke",size:i$1="small",as:s="button",children:l,onCopy:f,className:p}){let c$1=S(),[d,v]=I__default.useState(false),[m,g]=I__default.useState(false),[u,b]=I__default.useState(false),S$1=I__default.useRef(null),h=I__default.useRef(null);I__default.useEffect(()=>()=>{S$1.current&&clearTimeout(S$1.current),h.current&&clearTimeout(h.current);},[]);let y=I__default.useCallback(async()=>{d||(v(true),b(true),await Vt(e),f?.(e),S$1.current=setTimeout(()=>{b(false),h.current=setTimeout(()=>v(false),150);},t));},[d,t,e,f]),P$1=jsx(Ke,{swap:d,on:jsx(CheckCheck,{width:"1em",height:"1em"}),off:jsx(Copy,{width:"1em",height:"1em"})}),R=(()=>{switch(s){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",p),onClick:y,children:jsx("span",{className:"relative z-1",children:l??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",p),onClick:y,children:[jsx("span",{className:"relative z-1",children:l??e}),jsx("span",{className:c("inline-flex items-center text-zinc-500",d&&"text-primary-base"),children:P$1})]});default:return jsx(P,{variant:r,mode:a,size:i$1,className:c(d&&"cursor-not-allowed",p),onClick:y,startContent:P$1})}})();return jsx(i,{content:c$1(d?"copied":"copy"),size:i$1,open:u||m,delayDuration:o,onOpenChange:g,hideWhenDetached:true,children:R})}var tr=b({base:"flex shrink-0 items-center justify-center rounded-2xl ring-1 ring-transparent ring-inset",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 Fn({asChild:e,children:t,className:o,color:r,variant:a,ring:i,...s}){let l=e?Slot.Root:"div",f=tr({variant:a,color:r,ring:i,className:o});return jsx(l,{className:f,...s,children:t})}function qn({...e}){return jsx(Collapsible.Root,{"data-slot":"collapsible",...e})}function Yn({...e}){return jsx(Collapsible.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...e})}function Zn({className:e,...t}){return jsx(Collapsible.CollapsibleContent,{"data-slot":"collapsible-content",className:c("collapsible-content",e),...t})}var ar="BadgeRoot",Ut="BadgeIcon",Mt="BadgeDot",Ze=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"}}),zt=({asChild:e,size:t,variant:o,color:r,shape:a,children:i,className:s,disabled:l,...f})=>{let p=I.useId(),c=e?Slot.Root:"div",{root:d}=Ze({variant:o,color:r,size:t,shape:a,disabled:l}),m=se(i,{size:t,variant:o,color:r},[Ut,Mt],p,e);return jsx(c,{"data-slot":"badge",className:d({class:s}),...f,children:m})};zt.displayName=ar;function Bt({className:e,size:t,variant:o,color:r,as:a,...i}){let s=a||"div",{icon:l}=Ze({size:t,variant:o,color:r});return jsx(s,{"data-slot":"icon",className:l({class:e}),...i})}Bt.displayName=Ut;function Lt({size:e,variant:t,color:o,className:r,...a}){let{dot:i}=Ze({size:e,variant:t,color:o});return jsx("div",{"data-slot":"dot",className:i({class:r}),...a})}Lt.displayName=Mt;function ti({icon:e,dot:t,children:o,asChild:r,...a}){return jsxs(zt,{asChild:r,...a,children:[e&&!r&&jsx(Bt,{as:e}),t&&!r&&jsx(Lt,{}),o]})}function ir({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(_t,{orientation:"vertical",className:t}),jsx(_t,{orientation:"horizontal",className:t}),jsx(ScrollArea.Corner,{})]})}function _t({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 lr({open:e,defaultOpen:t,openDelay:o=300,closeDelay:r,asChild:a=true,arrow:i=true,content:s,children:l,onOpenChange:f,...p}){return jsxs(cr,{"data-slot":"hover-card",open:e,defaultOpen:t,openDelay:o,closeDelay:r,onOpenChange:f,children:[jsx(pr,{asChild:a,children:l}),jsxs(dr,{...p,children:[s,i&&jsx(HoverCard.Arrow,{asChild:true,children:jsx(E,{className:"-translate-y-6.5"})})]})]})}function cr({...e}){return jsx(HoverCard.Root,{"data-slot":"hover-card",...e})}function pr({...e}){return jsx(HoverCard.Trigger,{"data-slot":"hover-card-trigger",...e})}function dr({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 fr={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)"}},gr={type:"spring",bounce:.1,duration:.25},vr={ease:[.26,.08,.25,1],duration:.27};function hr({activeKey:e,children:t,className:o,rootClassName:r,defaultCardHeight:a,initialKey:i,variants:s=fr,transition:l=vr,rootTransition:f=gr}){let[p,{height:c}]=mr(),d=I.useRef(a??0);c>0&&(d.current=c);let v=e===i?a:c||d.current;return jsx(a$1,{children:jsx(m.div,{"data-slot":"animation-root",className:r,initial:false,animate:{height:v},transition:f,children:jsx("div",{ref:p,"data-slot":"animation-container",children:jsx(AnimatePresence,{mode:"popLayout",initial:false,children:jsx(m.div,{"data-slot":"animation-page",variants:s,transition:l,initial:"initial",animate:"animate",exit:"exit",className:o,children:t},e)})})})})}function ee(e,t){let o=I.useRef(void 0),{current:r}=o;return I.useEffect(()=>{(!t||e!==void 0)&&(o.current=e);},[e,t]),r}var br={type:"tween",duration:.3,ease:[.25,1,.5,1]},Rr={type:"tween",duration:.38,ease:[.25,1,.5,1]},Ie={type:"spring",stiffness:260,damping:30},wr={type:"tween",duration:.35,ease:"easeIn"},Cr={type:"tween",duration:.35,ease:"easeOut"},Pr={type:"tween",duration:.35,ease:"linear"},ae={type:"tween",duration:.25,ease:"easeInOut"},Je=[.25,.1,.25,1],qt=1.12,Tr=.93,Ae={type:"tween",duration:.22,ease:Je},Sr={scale:{type:"tween",duration:.22,ease:Je},opacity:{type:"tween",duration:.16,ease:Je}},Ir={type:"spring",stiffness:260,damping:30},Ar=.7,Nr=.9,Dr="bg-white";function Yt(e){return e?Ar:Nr}function je(e,t){return e==="x"?{x:t}:{y:t}}function Zt(e,t=br){return {supportsDimmed:false,variants:{enterFrom:({direction:o})=>({...je(e,o===0?0:o>0?"100%":"-100%"),zIndex:1,transition:t}),active:{...je(e,0),zIndex:1,transition:t},exit:({direction:o})=>({...je(e,o<0?"100%":"-100%"),zIndex:0,transition:t})}}}function Vr(){return {supportsDimmed:true,variants:{enterFrom:({direction:e,dimmed:t})=>e===0?{x:0,opacity:1,transition:Ie}:{x:e>0?"100%":"-20%",opacity:e>0?1:Yt(t),zIndex:1,transition:Ie},active:{x:0,opacity:1,zIndex:1,transition:Ie},exit:({direction:e,dimmed:t})=>({x:e<0?"100%":"-20%",opacity:e<0?1:Yt(t),zIndex:e<0?5:0,transition:Ie})}}}function Er(){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?wr:void 0}),exit:({direction:e})=>e<0?{clipPath:"inset(0 100% 0 0)",zIndex:2,transition:Cr}:{opacity:.999,zIndex:0,transition:Pr}}}}function kr(){return {supportsDimmed:false,variants:{enterFrom:({direction:e})=>e===0?{x:0,scale:1,opacity:1,zIndex:1,transition:ae}:e>0?{x:"200%",opacity:1,zIndex:2,transition:ae}:{scale:.7,opacity:0,zIndex:0,transition:ae},active:{x:0,scale:1,opacity:1,zIndex:1,transition:ae},exit:({direction:e})=>e<0?{x:"200%",opacity:1,zIndex:2,transition:ae}:{x:0,scale:.7,opacity:0,zIndex:0,transition:ae}}}}function Or(){return {supportsDimmed:false,variants:{enterFrom:({direction:e})=>e===0?{scale:1,opacity:1,zIndex:1,transition:Ae}:{scale:e>0?qt:Tr,opacity:0,zIndex:e>0?1:0,transition:Ae},active:{scale:1,opacity:1,zIndex:1,transition:Ae},exit:({direction:e})=>e<0?{scale:qt,opacity:0,zIndex:2,transition:Sr}:{scale:1,opacity:0,zIndex:0,transition:Ae}}}}var jt={slide:Zt("x"),slideVertical:Zt("y",Rr),slideLayers:Vr(),reveal:Er(),pushSlide:kr(),zoomFade:Or()},Ur={enterFrom:{position:"relative",width:"100%"},active:{position:"relative",width:"100%"},exit:{position:"absolute",top:0,left:0,right:0,width:"100%"}};function Ne(e,t){let o=jt[e.animation].variants[t],r=Ur[t];if(typeof o=="function"){let s=o(e,{},{});return {...r,...s}}return typeof o=="string"?o:{...r,...o}}var Mr={enterFrom:e=>Ne(e,"enterFrom"),active:e=>Ne(e,"active"),exit:e=>Ne(e,"exit")};function Jt({activeKey:e,animation:t="slideLayers",dimmed:o=false,measureHeight:r=true,lockPointerDuringTransition:a=true,className:i,viewClassName:s,children:l},f){let p=ee(e),c$1=p!==void 0&&e!==p,d=c$1?e>p?1:-1:0,v=useRef(null),[m$1,g]=useState(false),u=jt[t],b={animation:t,direction:d,dimmed:!!(o&&u.supportsDimmed)},S=Ne(b,"active"),h=typeof S=="string"?S:{...S,transition:{duration:0}},y=useRef(new Map),[P,R]=mr(),[A,w]=useState(void 0);useLayoutEffect(()=>{if(!r||!R.height)return;let N=y.current.get(e);(!N||Math.abs(N-R.height)>1)&&(y.current.set(e,R.height),w(R.height));},[r,R.height,e]),useLayoutEffect(()=>{if(!r){w(void 0);return}let N=y.current.get(e);N&&w(N);},[r,e]),useLayoutEffect(()=>{if(!a){v.current=null,g(false);return}c$1&&(v.current=e,g(true));},[e,c$1,a]);let T=I__default.useCallback(()=>{v.current===e&&(v.current=null,g(false));},[e]);return jsx(a$1,{children:jsx(m.div,{"data-slot":"ui-transition-root",ref:f,className:c("relative w-full overflow-hidden",b.dimmed&&"bg-black",m$1&&"pointer-events-none",i),initial:false,animate:r&&A!==void 0?{height:A}:void 0,style:r&&A!==void 0?{height:A}:void 0,transition:Ir,children:jsx("div",{ref:r?P:void 0,className:"relative w-full",children:jsx(AnimatePresence,{initial:false,custom:b,mode:"sync",children:jsx(m.div,{"data-slot":"ui-transition-item",custom:b,variants:Mr,initial:d===0?false:"enterFrom",animate:c$1?"active":h,exit:"exit",onAnimationComplete:T,className:c("w-full",Dr,s),children:l},e)})})})})}Jt.displayName="UIViewTransition";var Qe=I__default.forwardRef(Jt);function eo(e,t){let o=ee(e);I.useEffect(()=>{t&&!o&&e?zr(t):t&&!e&&o&&Qt(t);},[t,e,o]),I.useEffect(()=>()=>{t&&e&&Qt(t);},[t,e]);}function zr(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 Qt(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 Lr={variants:{initial:{opacity:0},animate:{opacity:.08},exit:{opacity:0}},initial:"initial",animate:"animate",exit:"exit"},_r={initial:{opacity:0,y:24},animate:{opacity:1,y:0},exit:{opacity:0,y:24}},Hr={variants:_r,initial:"initial",animate:"animate",exit:"exit"},Fr={duration:.3,delay:.35},Gr={variants:{initial:{borderRadius:24,opacity:0},exit:{borderRadius:24,opacity:0},animate:{borderRadius:24,opacity:1}},initial:"initial",animate:"animate",exit:"exit"},Wr=100,$r=300,Kr={width:420,height:"auto"};function Ve(e){return typeof e=="number"?`${e}px`:e}function oo(e){return typeof e=="object"?e:{width:e,height:e}}function qr({open:e,loading:t,visual:o,backgroundViewRef:r,children:a,className:i,containerClassName:s$1,defaultSize:l=Wr,expandedSize:f=Kr,onBackdropClick:p,onCloseComplete:c$1,onContentAnimationComplete:d,onExpandedChangeComplete:v}){let[m$1,g]=I.useState(!!e),[u,b,S]=s(false),[h,y]=I.useState(false),P=I.useRef(false),R=I.useRef(null),A=I.useRef(false),w=I.useRef(null),T=oo(l),N=oo(f),D=Ve(T.width),M=Ve(T.height),L=Ve(N.width),q=Ve(N.height),W=I.useMemo(()=>u?{width:L,height:q}:{width:D,height:M},[M,D,u,q,L]);eo(!!(e&&u&&r?.current),r?.current);let Y=I.useCallback(()=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{w.current=null,g(false);},$r);},[]),ie=I.useCallback(()=>{if(R.current!==null&&(v?.(R.current),R.current=null),!P.current){e&&!t&&(!u||!a)&&y(true);return}P.current=false,Y();},[a,u,t,v,e,Y]),Oe=I.useCallback(()=>{y(false),A.current&&(A.current=false,c$1?.());},[c$1]),Z=I.useCallback(V=>{if(V==="animate"){e&&!t&&y(true),d?.("entered");return}V==="exit"&&(y(false),d?.("exited"));},[t,d,e]),ve=I.useCallback(V=>{V==="animate"&&e&&!t&&!u&&!P.current&&y(true);},[u,t,e]),rt=I.useCallback(V=>{h&&p?.(V);},[h,p]);return I.useEffect(()=>{e&&(w.current&&(clearTimeout(w.current),w.current=null),P.current=false,A.current=false,y(false),g(true));},[e]),I.useEffect(()=>{if(m$1){if(e){if(t){u&&(R.current=false,y(false)),S();return}u||(R.current=true,y(false)),b();return}if(A.current=true,y(false),!P.current){if(u){R.current=false,P.current=true,S();return}Y();}}},[S,u,t,e,m$1,Y,b]),I.useEffect(()=>()=>{w.current&&clearTimeout(w.current);},[]),jsx(a$1,{children:jsx(AnimatePresence,{onExitComplete:Oe,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:rt,onAnimationComplete:ve,...Lr}),jsxs(m.div,{layout:true,"data-slot":"ui-modal-container","data-state":u&&"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",s$1),style:W,onAnimationComplete:ve,onLayoutAnimationComplete:ie,...Gr,children:[jsx(m.div,{"data-slot":"ui-modal-visual",layout:true,children:o}),jsx(AnimatePresence,{children:u&&jsx(m.div,{"data-slot":"ui-modal-content",onAnimationComplete:Z,...Hr,transition:Fr,className:c("flex w-full flex-col overflow-hidden",i),children:a},"content")})]})]})})})}var ao=I__default.createContext(null);function Yr(){let e=I__default.useContext(ao);if(!e)throw new Error("useUIScreen must be used within <UIScreen>");return e}function ot({value:e,animation:t,className:o,children:r}){return jsx(Fragment,{children:r})}ot.displayName="UIScreen.View";function Zr(e){return I__default.isValidElement(e)&&e.type===ot}function no(e,t=[]){return I__default.Children.forEach(e,o=>{if(I__default.isValidElement(o)&&o.type===I__default.Fragment){no(o.props.children,t);return}if(!Zr(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 Xr(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 io({screen:e,defaultScreen:t,onScreenChange:o,children:r,...a},i){let s=e!==void 0,[l,f]=I__default.useState(t),p=e??l,c$1=ee(p),d=I__default.useRef(null),v=no(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(p===void 0)throw new Error("UIScreen requires either a screen or defaultScreen prop.");let m=p;Xr(v);let g=v.find(h=>h.values.includes(m));if(!g)throw new Error(`UIScreen could not find a UIScreen.View matching screen "${String(m)}".`);let u=d.current,b=u!==null&&c$1===u.from&&m===u.to;I__default.useLayoutEffect(()=>{let h=d.current;h&&m!==h.from&&(d.current=null);},[m]);let S=I__default.useMemo(()=>({screen:m,navigate:(h,y)=>{let P=y?.animation;d.current=h!==m&&P?{from:m,to:h,animation:P}:null,s||f(h),o?.(h);}}),[s,o,m]);return jsx(ao.Provider,{value:S,children:jsx(Qe,{ref:i,...a,animation:(b?u.animation:g.animation)??a.animation,viewClassName:c(a.viewClassName,g.className),activeKey:g.activeKey,children:g.children})})}io.displayName="UIScreen";var jr=I__default.forwardRef(io),Jr=Object.assign(jr,{View:ot});var ea=()=>{let[,e]=I.useState(false);return I.useCallback(()=>{e(t=>!t);},[])};var ta=(e=false)=>{let[t,o]=I.useState(e),r=I.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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jerry-fd/ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "UI component library based on Ant Design (Client-side only)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": ["index.js", "*.css"],
|
|
@@ -20,13 +20,23 @@
|
|
|
20
20
|
"import": "./data-table.js"
|
|
21
21
|
},
|
|
22
22
|
"./theme": "./theme/index.css",
|
|
23
|
+
"./theme/*": "./theme/*",
|
|
23
24
|
"./theme/colors": "./theme/colors.css",
|
|
24
25
|
"./theme/typography": "./theme/typography.css",
|
|
26
|
+
"./theme/typography-tokens": "./theme/typography-tokens.css",
|
|
25
27
|
"./theme/shadows": "./theme/shadows.css",
|
|
26
28
|
"./theme/badge": "./theme/badge.css",
|
|
29
|
+
"./theme/badge-tokens": "./theme/badge-tokens.css",
|
|
30
|
+
"./preset": "./preset/index.css",
|
|
31
|
+
"./preset/*": "./preset/*",
|
|
32
|
+
"./preset/typography": "./preset/typography.css",
|
|
33
|
+
"./preset/badge": "./preset/badge.css",
|
|
34
|
+
"./source": "./source.css",
|
|
35
|
+
"./source.css": "./source.css",
|
|
36
|
+
"./styles/*": "./styles/*",
|
|
27
37
|
"./styles/index": "./styles/index.css"
|
|
28
38
|
},
|
|
29
|
-
"files": ["*.js", "*.d.ts", "*.d.cts", "*.css", "theme/**/*.css", "styles/**/*.css"],
|
|
39
|
+
"files": ["*.js", "*.d.ts", "*.d.cts", "*.css", "theme/**/*.css", "preset/**/*.css", "styles/**/*.css"],
|
|
30
40
|
"keywords": ["react", "antd", "filter", "data-filter", "table-filter", "client-side"],
|
|
31
41
|
"author": "jerry.fd",
|
|
32
42
|
"license": "MIT",
|
|
@@ -48,6 +58,7 @@
|
|
|
48
58
|
"react-use-measure": "^2.1.7",
|
|
49
59
|
"tailwind-merge": "^3.5.0",
|
|
50
60
|
"tailwind-variants": "^3.2.2",
|
|
51
|
-
"tw-animate-css": "^1.4.0"
|
|
61
|
+
"tw-animate-css": "^1.4.0",
|
|
62
|
+
"input-otp": "^1.4.2"
|
|
52
63
|
}
|
|
53
64
|
}
|