@ryanodd/design-system 0.0.0-dev2 → 0.0.0-dev3
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/dist/esm/index.d.ts +2 -148
- package/dist/index.css +1 -0
- package/dist/index.js +45 -0
- package/dist/index.mjs +4984 -0
- package/package.json +9 -2
- package/dist/cjs/index.js +0 -923
- package/dist/cjs/index.js.map +0 -1
- package/dist/esm/index.js +0 -870
- package/dist/esm/index.js.map +0 -1
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,148 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
5
|
-
import * as RadixMenuButton from '@radix-ui/react-dropdown-menu';
|
|
6
|
-
import * as RadixToast from '@radix-ui/react-toast';
|
|
7
|
-
import * as RadixTooltip from '@radix-ui/react-tooltip';
|
|
8
|
-
|
|
9
|
-
declare const iconSizes: readonly ["xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl"];
|
|
10
|
-
type IconProps = ComponentPropsWithoutRef<"svg"> & {
|
|
11
|
-
size?: typeof iconSizes[number];
|
|
12
|
-
};
|
|
13
|
-
declare const createIcon: (SVG: ComponentType<HTMLAttributes<SVGSVGElement>>, label: string) => react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
14
|
-
size?: (typeof iconSizes)[number];
|
|
15
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
16
|
-
declare const ArrowLeft: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
17
|
-
size?: (typeof iconSizes)[number];
|
|
18
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
19
|
-
declare const ArrowRight: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
20
|
-
size?: (typeof iconSizes)[number];
|
|
21
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
22
|
-
declare const Check: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
23
|
-
size?: (typeof iconSizes)[number];
|
|
24
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
25
|
-
declare const Circle: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
26
|
-
size?: (typeof iconSizes)[number];
|
|
27
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
28
|
-
declare const Close: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
29
|
-
size?: (typeof iconSizes)[number];
|
|
30
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
31
|
-
declare const ExternalLink: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
32
|
-
size?: (typeof iconSizes)[number];
|
|
33
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
34
|
-
declare const Gear: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
35
|
-
size?: (typeof iconSizes)[number];
|
|
36
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
37
|
-
declare const Hammer: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
38
|
-
size?: (typeof iconSizes)[number];
|
|
39
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
40
|
-
declare const Heart: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
41
|
-
size?: (typeof iconSizes)[number];
|
|
42
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
43
|
-
declare const Kebab: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
44
|
-
size?: (typeof iconSizes)[number];
|
|
45
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
46
|
-
declare const Lightning: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
47
|
-
size?: (typeof iconSizes)[number];
|
|
48
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
49
|
-
declare const Mail: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
50
|
-
size?: (typeof iconSizes)[number];
|
|
51
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
52
|
-
declare const Menu: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
53
|
-
size?: (typeof iconSizes)[number];
|
|
54
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
55
|
-
declare const NoMobile: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
56
|
-
size?: (typeof iconSizes)[number];
|
|
57
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
58
|
-
declare const Pencil: react.ForwardRefExoticComponent<Omit<react.SVGProps<SVGSVGElement>, "ref"> & {
|
|
59
|
-
size?: (typeof iconSizes)[number];
|
|
60
|
-
} & react.RefAttributes<SVGSVGElement>>;
|
|
61
|
-
declare const IconMap: Record<string, ComponentType<IconProps> | null>;
|
|
62
|
-
|
|
63
|
-
type Props = {
|
|
64
|
-
children?: ReactNode;
|
|
65
|
-
size?: "small" | "medium" | "large";
|
|
66
|
-
variant?: "primary" | "secondary" | "destructive" | "tertiary";
|
|
67
|
-
loading?: boolean;
|
|
68
|
-
iconOnly?: boolean;
|
|
69
|
-
notificationDotText?: string;
|
|
70
|
-
/**
|
|
71
|
-
* Optionally indicates which icon to use as a leading icon before the button text,
|
|
72
|
-
* or the icon for an icon-only button.
|
|
73
|
-
*/
|
|
74
|
-
icon?: keyof typeof IconMap;
|
|
75
|
-
/**
|
|
76
|
-
* Optionally indicates which icon to use as a trailing icon after the button text.
|
|
77
|
-
*/
|
|
78
|
-
trailingIcon?: keyof typeof IconMap;
|
|
79
|
-
};
|
|
80
|
-
type ButtonProps = ComponentPropsWithoutRef<"button"> & Props;
|
|
81
|
-
declare const Button: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & Props & react.RefAttributes<HTMLButtonElement>>;
|
|
82
|
-
|
|
83
|
-
type CheckboxProps = {
|
|
84
|
-
id: string;
|
|
85
|
-
labelContent: ReactNode;
|
|
86
|
-
checked: boolean;
|
|
87
|
-
onClick: (checked: boolean) => void;
|
|
88
|
-
};
|
|
89
|
-
declare const Checkbox: ({ id, labelContent, checked, onClick }: CheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
90
|
-
|
|
91
|
-
type DialogProps = RadixDialog.DialogProps & {
|
|
92
|
-
title: ReactNode;
|
|
93
|
-
trigger: ReactNode;
|
|
94
|
-
content: ReactNode;
|
|
95
|
-
};
|
|
96
|
-
declare const Dialog: ({ trigger, content, title, ...props }: DialogProps) => react_jsx_runtime.JSX.Element;
|
|
97
|
-
|
|
98
|
-
type MenuButtonProps = React.ComponentPropsWithoutRef<typeof RadixMenuButton.Root> & {
|
|
99
|
-
children: ReactNode;
|
|
100
|
-
};
|
|
101
|
-
declare const MenuButton: ({ children, ...props }: MenuButtonProps) => react_jsx_runtime.JSX.Element;
|
|
102
|
-
type MenuButtonItemProps = React.ComponentPropsWithoutRef<typeof RadixMenuButton.Item> & {
|
|
103
|
-
children: ReactNode;
|
|
104
|
-
};
|
|
105
|
-
declare const MenuButtonItem: ({ children, ...props }: MenuButtonItemProps) => react_jsx_runtime.JSX.Element;
|
|
106
|
-
|
|
107
|
-
type SpinnerSize = typeof iconSizes[number];
|
|
108
|
-
type SpinnerProps = ComponentPropsWithoutRef<"div"> & {
|
|
109
|
-
/**
|
|
110
|
-
* Indicates the diameter (height/width) of the `Spinner`'s container
|
|
111
|
-
*/
|
|
112
|
-
size?: SpinnerSize;
|
|
113
|
-
};
|
|
114
|
-
declare const Spinner: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
115
|
-
/**
|
|
116
|
-
* Indicates the diameter (height/width) of the `Spinner`'s container
|
|
117
|
-
*/
|
|
118
|
-
size?: SpinnerSize;
|
|
119
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
120
|
-
|
|
121
|
-
type ToastProviderProps = RadixToast.ToastProviderProps;
|
|
122
|
-
declare const ToastProvider: ({ ...props }: ToastProviderProps) => react_jsx_runtime.JSX.Element;
|
|
123
|
-
type ToastViewportProps = RadixToast.ToastViewportProps;
|
|
124
|
-
declare const ToastViewport: react.ForwardRefExoticComponent<RadixToast.ToastViewportProps & react.RefAttributes<HTMLOListElement>>;
|
|
125
|
-
type ToastProps = RadixToast.ToastProps & {
|
|
126
|
-
toastTitle: ReactNode;
|
|
127
|
-
toastDescription?: ReactNode;
|
|
128
|
-
toastAction?: ReactNode;
|
|
129
|
-
};
|
|
130
|
-
declare const Toast: react.ForwardRefExoticComponent<RadixToast.ToastProps & {
|
|
131
|
-
toastTitle: ReactNode;
|
|
132
|
-
toastDescription?: ReactNode;
|
|
133
|
-
toastAction?: ReactNode;
|
|
134
|
-
} & react.RefAttributes<HTMLLIElement>>;
|
|
135
|
-
|
|
136
|
-
type TooltipProviderProps = RadixTooltip.TooltipProviderProps;
|
|
137
|
-
declare const TooltipProvider: ({ ...props }: TooltipProviderProps) => react_jsx_runtime.JSX.Element;
|
|
138
|
-
type TooltipProps = Omit<RadixTooltip.TooltipContentProps, "content"> & {
|
|
139
|
-
children: ReactNode;
|
|
140
|
-
content: ReactNode;
|
|
141
|
-
open?: boolean;
|
|
142
|
-
defaultOpen?: boolean;
|
|
143
|
-
onOpenChange?: (open: boolean) => void;
|
|
144
|
-
};
|
|
145
|
-
declare function Tooltip({ children, content, open, defaultOpen, onOpenChange, ...props }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
146
|
-
|
|
147
|
-
export { ArrowLeft, ArrowRight, Button, Check, Checkbox, Circle, Close, Dialog, ExternalLink, Gear, Hammer, Heart, IconMap, Kebab, Lightning, Mail, Menu, MenuButton, MenuButtonItem, NoMobile, Pencil, Spinner, Toast, ToastProvider, ToastViewport, Tooltip, TooltipProvider, createIcon, iconSizes };
|
|
148
|
-
export type { ButtonProps, CheckboxProps, DialogProps, IconProps, MenuButtonItemProps, MenuButtonProps, SpinnerProps, SpinnerSize, ToastProps, ToastProviderProps, ToastViewportProps, TooltipProps, TooltipProviderProps };
|
|
1
|
+
export * from '../index'
|
|
2
|
+
export {}
|
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
body{color:red}._button_w6zk1_1{flex-shrink:0;display:flex;align-items:center;justify-content:center;position:relative;gap:var(--spacing-2)}._button_w6zk1_1:not(:disabled){cursor:pointer}._button_w6zk1_1:not(:active),._button_w6zk1_1:disabled{box-shadow:var(--shadow-sm)}._button_w6zk1_1{padding-top:var(--spacing-1_5);padding-bottom:var(--spacing-1_5);padding-left:var(--spacing-3);padding-right:var(--spacing-3);border-radius:var(--radius-md);font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold)}._button_w6zk1_1[data-icon-only=true]{width:var(--size-8);height:var(--size-8);padding-left:var(--spacing-1);padding-right:var(--spacing-1);padding-top:var(--spacing-1);padding-bottom:var(--spacing-1)}._button_w6zk1_1[data-size=medium]{padding-top:var(--spacing-2);padding-bottom:var(--spacing-2);padding-left:var(--spacing-4);padding-right:var(--spacing-4);border-radius:var(--radius-md);font-size:var(--font-size-base);font-weight:var(--font-weight-semibold)}._button_w6zk1_1[data-icon-only=true][data-size=medium]{width:var(--size-10);height:var(--size-10);padding-left:var(--spacing-1);padding-right:var(--spacing-1);padding-top:var(--spacing-1);padding-bottom:var(--spacing-1)}._button_w6zk1_1[data-size=large]{padding-top:var(--spacing-2);padding-bottom:var(--spacing-2);padding-left:var(--spacing-5);padding-right:var(--spacing-5);border-radius:var(--radius-md);font-size:var(--font-size-lg);font-weight:var(--font-weight-semibold)}._button_w6zk1_1[data-icon-only=true][data-size=large]{width:var(--size-12);height:var(--size-12);padding-left:var(--spacing-1);padding-right:var(--spacing-1);padding-top:var(--spacing-1);padding-bottom:var(--spacing-1)}._button_w6zk1_1{background-color:var(--color-bg-secondary);border:1px solid var(--color-border-secondary);color:var(--color-text-secondary)}._button_w6zk1_1:hover:not(:disabled){background-color:var(--color-bg-tertiary)}._button_w6zk1_1:active{background-color:var(--color-bg-quaternary)}._button_w6zk1_1[data-variant=primary]{background-color:var(--color-bg-brand);color:var(--color-text-inverted);border:none}._button_w6zk1_1[data-variant=primary]:hover:not(:disabled){background-color:var(--color-bg-brand-hover)}._button_w6zk1_1[data-variant=destructive]{background-color:var(--color-text-error);color:var(--color-text-inverted);border:none}._button_w6zk1_1[data-variant=destructive]:hover:not(:disabled){background-color:var(--color-bg-error-hover)}._button_w6zk1_1[data-variant=tertiary]{background-color:var(--color-transparent);color:var(--color-text-secondary);border:none;box-shadow:var(--shadow-none)}._button_w6zk1_1[data-variant=tertiary]:hover:not(:disabled){background-color:#00000010}._button_w6zk1_1:disabled{background-color:var(--color-bg-disabled);border-color:var(--color-border-disabled);color:var(--color-text-disabled)}._button_w6zk1_1[data-variant=tertiary]:disabled{background-color:var(--color-transparent);border:none;color:var(--color-text-disabled)}._buttonNotificationDot_w6zk1_143{position:absolute;--dot-width: 1.525rem;top:calc(-1 * var(--dot-width) / 2);right:calc(-1 * var(--dot-width) / 2);width:var(--dot-width);height:var(--dot-width);border-radius:var(--radius-full);display:flex;align-items:center;justify-content:center;background-color:var(--color-text-error);font-size:var(--font-size-base);font-weight:var(--font-weight-bold);color:var(--color-text-inverted);padding-bottom:.0825rem}._icon_178c1_1{max-width:none;flex-shrink:0}._icon_178c1_1[data-size="2xs"]{width:var(--size-3);height:var(--size-3)}._icon_178c1_1[data-size=xs]{width:.875rem;height:.875rem}._icon_178c1_1[data-size=sm]{width:var(--size-4);height:var(--size-4)}._icon_178c1_1[data-size=md]{width:var(--size-5);height:var(--size-5)}._icon_178c1_1{width:var(--size-6);height:var(--size-6)}._icon_178c1_1[data-size=xl]{width:var(--size-8);height:var(--size-8)}._icon_178c1_1[data-size="2xl"]{width:var(--size-10);height:var(--size-10)}._icon_178c1_1[data-size="3xl"]{width:var(--size-12);height:var(--size-12)}._icon_178c1_1[data-size="4xl"]{width:var(--size-16);height:var(--size-16)}._spinnerWrapper_1mfc7_1{--spinner-size-2xs: var(--size-3);--spinner-size-xs: .875rem;--spinner-size-sm: var(--size-4);--spinner-size-md: var(--size-5);--spinner-size-lg: var(--size-6);--spinner-size-xl: var(--size-8);--spinner-size-2xl: var(--size-10);--spinner-size-3xl: var(--size-12);--spinner-size-4xl: var(--size-16);--spinner-size: var(--spinner-size-lg);width:var(--spinner-size);height:var(--spinner-size);aspect-ratio:1 / 1;flex-shrink:0;display:flex;justify-content:center;align-items:center}._spinner_1mfc7_1{--spinner-thickness: 2px;width:90%;height:90%;border-width:var(--spinner-thickness);border-radius:50%;box-sizing:border-box;position:relative;border-style:solid;border-right-color:transparent;border-left-color:currentcolor;border-top-color:currentcolor;border-bottom-color:currentcolor;animation:_rotate_1mfc7_1 1.2s infinite linear}._spinnerWrapper_1mfc7_1[data-size="2xs"]{--spinner-size: var(--spinner-size-2xs)}._spinnerWrapper_1mfc7_1[data-size="2xs"] ._spinner_1mfc7_1{--spinner-thickness: 1.33px}._spinnerWrapper_1mfc7_1[data-size=xs]{--spinner-size: var(--spinner-size-xs)}._spinnerWrapper_1mfc7_1[data-size=xs] ._spinner_1mfc7_1{--spinner-thickness: 1.5px}._spinnerWrapper_1mfc7_1[data-size=sm]{--spinner-size: var(--spinner-size-sm)}._spinnerWrapper_1mfc7_1[data-size=sm] ._spinner_1mfc7_1{--spinner-thickness: 1.67px}._spinnerWrapper_1mfc7_1[data-size=md]{--spinner-size: var(--spinner-size-md)}._spinnerWrapper_1mfc7_1[data-size=md] ._spinner_1mfc7_1{--spinner-thickness: 1.8px}._spinnerWrapper_1mfc7_1[data-size=xl]{--spinner-size: var(--spinner-size-xl)}._spinnerWrapper_1mfc7_1[data-size=xl] ._spinner_1mfc7_1{--spinner-thickness: 2.67px}._spinnerWrapper_1mfc7_1[data-size="2xl"]{--spinner-size: var(--spinner-size-2xl)}._spinnerWrapper_1mfc7_1[data-size="2xl"] ._spinner_1mfc7_1{--spinner-thickness: 3px}._spinnerWrapper_1mfc7_1[data-size="3xl"]{--spinner-size: var(--spinner-size-3xl)}._spinnerWrapper_1mfc7_1[data-size="3xl"] ._spinner_1mfc7_1{--spinner-thickness: 3.67px}._spinnerWrapper_1mfc7_1[data-size="4xl"]{--spinner-size: var(--spinner-size-4xl)}._spinnerWrapper_1mfc7_1[data-size="4xl"] ._spinner_1mfc7_1{--spinner-thickness: 4.33px}@keyframes _rotate_1mfc7_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._checkboxRow_5ztin_1{display:flex;align-items:center;gap:var(--spacing-2)}._checkboxRoot_5ztin_7{width:var(--size-6);height:var(--size-6);padding:0;border:1px solid var(--color-border-primary);border-radius:var(--radius-sm);display:flex;justify-content:center;align-items:center;background-color:var(--color-bg-primary)}._checkboxIndicator_5ztin_19{background-color:var(--color-bg-brand);border-radius:var(--radius-sm);width:100%;height:100%;display:flex;align-items:center;justify-content:center}._checkboxCheckmarkIcon_5ztin_29{width:var(--size-4);height:var(--size-4);color:var(--color-text-inverted)}._checkboxLabel_5ztin_35{font-size:var(--font-size-base);color:var(--color-text-primary)}._dialogOverlay_1flkk_1{background-color:var(--color-gray-950);position:fixed;inset:0;z-index:40;opacity:.5;animation:_overlayShow_1flkk_1 .2s cubic-bezier(.16,1,.3,1)}@keyframes _overlayShow_1flkk_1{0%{opacity:0}to{opacity:.5}}._dialogContent_1flkk_20{position:fixed;top:50%;left:50%;border-radius:var(--radius-md);box-shadow:var(--shadow-lg);background-color:var(--color-bg-primary);color:var(--color-text-primary);z-index:50;display:flex;flex-direction:column;padding:var(--spacing-8);gap:var(--spacing-8);animation:_contentShow_1flkk_1 .2s cubic-bezier(.16,1,.3,1);transform:translate(-50%,-50%);width:90vw;max-width:450px}._dialogContent_1flkk_20[data-size=sm]{max-width:450px}._dialogContent_1flkk_20[data-size=md]{max-width:600px}._dialogContent_1flkk_20[data-size=lg]{max-width:800px}@keyframes _contentShow_1flkk_1{0%{opacity:0;transform:translate(-50%,-48%) scale(.96)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}._dialogCloseButton_1flkk_65{position:absolute;top:var(--spacing-4);right:var(--spacing-4);color:var(--color-text-tertiary)}._dialogTitle_1flkk_72{margin:0;font-weight:var(--font-weight-semibold);font-size:var(--font-size-xl);color:var(--color-text-primary)}._dialogDescription_1flkk_79{margin:0;font-weight:var(--font-weight-normal);font-size:var(--font-size-sm);color:var(--color-text-secondary)}._menuButtonContent_boy14_1{background-color:var(--color-bg-primary);border-radius:var(--radius-md);padding:var(--spacing-1_5);border:1px solid var(--color-border-primary);box-shadow:var(--shadow-lg);min-width:10rem}._menuButtonItem_boy14_10{color:var(--color-text-secondary);display:flex;align-items:center;font-size:var(--font-size-sm);padding-left:var(--spacing-2_5);padding-right:var(--spacing-2_5);padding-top:var(--spacing-2);padding-bottom:var(--spacing-2);border-radius:var(--radius-md);line-height:var(--leading-none);height:25px;position:relative;-webkit-user-select:none;user-select:none;outline:none}._menuButtonItem_boy14_10[data-disabled]{color:var(--color-text-disabled);pointer-events:none}._menuButtonItem_boy14_10:hover:not([data-disabled]){background-color:var(--color-bg-tertiary);cursor:pointer}._menuButtonItem_boy14_10._focus-visible_boy14_37,._menuButtonItem_boy14_10:focus-visible{background-color:var(--color-bg-tertiary)}._menuButtonArrow_boy14_42{fill:var(--color-bg-primary)}._toast_7o27j_1{background-color:var(--color-bg-primary);box-shadow:var(--shadow-lg);border-radius:var(--radius-lg);display:flex;align-items:center;padding:var(--spacing-4);gap:var(--spacing-4);border:1px solid var(--color-border-primary)}._toastContent_7o27j_12{display:flex;flex-direction:column;gap:var(--spacing-1);flex-grow:1}._toast_7o27j_1[data-state=open]{animation:_slideIn_7o27j_1 .15s cubic-bezier(.16,1,.3,1)}._toast_7o27j_1[data-state=closed]{animation:_hide_7o27j_1 .1s ease-in}._toast_7o27j_1[data-swipe=move]{transform:translate(var(--radix-toast-swipe-move-x))}._toast_7o27j_1[data-swipe=cancel]{transform:translate(0);transition:transform .2s ease-out}._toast_7o27j_1[data-swipe=end]{animation:_swipeOut_7o27j_1 .1s ease-out}@keyframes _hide_7o27j_1{0%{opacity:1}to{opacity:0}}@keyframes _slideIn_7o27j_1{0%{transform:translate(calc(100% + var(--viewport-padding)))}to{transform:translate(0)}}@keyframes _swipeOut_7o27j_1{0%{transform:translate(var(--radix-toast-swipe-end-x))}to{transform:translate(calc(100% + var(--viewport-padding)))}}._toastViewport_7o27j_70{list-style-type:none;padding:0;position:fixed;bottom:0;right:0;display:flex;flex-direction:column;padding:var(--spacing-6);gap:var(--spacing-2);width:390px;max-width:100vw;margin:0;z-index:999;outline:none;--viewport-padding: var(--spacing-6)}._toastTitle_7o27j_89{color:var(--color-text-primary);font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold)}._toastDescription_7o27j_95{color:var(--color-text-secondary);font-size:var(--font-size-sm)}._tooltipContent_4rdhp_1{background-color:var(--color-bg-tooltip);color:var(--color-text-inverted);border-radius:var(--radius-md);padding:var(--spacing-2) var(--spacing-3);font-size:var(--font-size-xs);line-height:var(--leading-tight);box-shadow:var(--shadow-sm);z-index:50}._tooltipArrow_4rdhp_12{fill:var(--color-bg-tooltip)}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),K=require("react"),mo=require("react-dom");function vo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=vo(K),sn=vo(mo),Qs="_button_w6zk1_1",Js="_buttonNotificationDot_w6zk1_143",Fn={button:Qs,buttonNotificationDot:Js},ei="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='m12%2019l-7-7l7-7m7%207H5'/%3e%3c/svg%3e",ti="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M5%2012h14m-7-7l7%207l-7%207'/%3e%3c/svg%3e",ni="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='m9.55%2015.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175%209.2q-.3.3-.7.3t-.7-.3L4.55%2013q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z'/%3e%3c/svg%3e",oi="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3ccircle%20cx='12'%20cy='12'%20r='10'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3c/svg%3e",ri="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M18%206L6%2018M6%206l12%2012'/%3e%3c/svg%3e",si="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M15%203h6v6m-11%205L21%203m-3%2010v6a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2V8a2%202%200%200%201%202-2h6'/%3e%3c/svg%3e",ii="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='currentColor'%20d='M31.23%2017.736c.063-.57.103-1.148.103-1.736s-.04-1.166-.104-1.737l-4.378-1.557c-.218-.716-.504-1.4-.85-2.05l1.992-4.192a15.6%2015.6%200%200%200-2.458-2.46L21.343%206a11%2011%200%200%200-2.05-.85L17.737.772C17.166.708%2016.588.667%2016%20.667s-1.166.04-1.737.105L12.707%205.15q-1.075.327-2.05.85L6.464%204.004c-.91.725-1.734%201.55-2.46%202.46L6%2010.654q-.523.976-.85%202.05l-4.378%201.56c-.064.57-.105%201.15-.105%201.737s.04%201.165.105%201.736l4.378%201.558q.327%201.074.85%202.05l-1.995%204.192c.725.91%201.55%201.733%202.46%202.458L10.654%2026q.976.523%202.05.852l1.558%204.377c.57.063%201.148.103%201.737.103c.588%200%201.165-.04%201.736-.104l1.558-4.378c.715-.218%201.4-.504%202.05-.85l4.192%201.992c.91-.725%201.733-1.55%202.458-2.458L26%2021.343c.348-.647.634-1.334.852-2.05l4.377-1.557zM16%2020.87a4.871%204.871%200%201%201-.002-9.742A4.871%204.871%200%200%201%2016%2020.87'/%3e%3c/svg%3e",ci="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cg%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%3e%3cpath%20d='m15%2012l-8.373%208.373a1%201%200%201%201-3-3L12%209m6%206l4-4'/%3e%3cpath%20d='m21.5%2011.5l-1.914-1.914A2%202%200%200%201%2019%208.172V7l-2.26-2.26a6%206%200%200%200-4.202-1.756L9%202.96l.92.82A6.18%206.18%200%200%201%2012%208.4V10l2%202h1.172a2%202%200%200%201%201.414.586L18.5%2014.5'/%3e%3c/g%3e%3c/svg%3e",ai="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='M6.979%203.074a6%206%200%200%201%204.988%201.425l.037.033l.034-.03a6%206%200%200%201%204.733-1.44l.246.036a6%206%200%200%201%203.364%2010.008l-.18.185l-.048.041l-7.45%207.379a1%201%200%200%201-1.313.082l-.094-.082l-7.493-7.422A6%206%200%200%201%206.979%203.074'/%3e%3c/svg%3e",li="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cg%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3ccircle%20cx='8'%20cy='2.5'%20r='.75'/%3e%3ccircle%20cx='8'%20cy='8'%20r='.75'/%3e%3ccircle%20cx='8'%20cy='13.5'%20r='.75'/%3e%3c/g%3e%3c/svg%3e",ui="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20256%20256'%3e%3cpath%20fill='currentColor'%20d='m213.85%20125.46l-112%20120a8%208%200%200%201-13.69-7l14.66-73.33l-57.63-21.64a8%208%200%200%201-3-13l112-120a8%208%200%200%201%2013.69%207l-14.7%2073.41l57.63%2021.61a8%208%200%200%201%203%2012.95Z'/%3e%3c/svg%3e",di="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cg%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%3e%3crect%20width='20'%20height='16'%20x='2'%20y='4'%20rx='2'/%3e%3cpath%20d='m22%207l-8.97%205.7a1.94%201.94%200%200%201-2.06%200L2%207'/%3e%3c/g%3e%3c/svg%3e",fi="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M4%2012h16M4%206h16M4%2018h16'/%3e%3c/svg%3e",pi="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M7.159%203.185C7.415%203.066%207.699%203%208%203h8a2%202%200%200%201%202%202v9m0%204v1a2%202%200%200%201-2%202H8a2%202%200%200%201-2-2V6m5-2h2M3%203l18%2018m-9-4v.01'/%3e%3c/svg%3e",mi="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='currentColor'%20d='m12.9%206.855l4.242%204.242l-9.9%209.9H3v-4.243zm1.414-1.415l2.121-2.121a1%201%200%200%201%201.414%200l2.829%202.828a1%201%200%200%201%200%201.415l-2.122%202.121z'/%3e%3c/svg%3e",vi="_icon_178c1_1",hi={icon:vi},gi=["xs","sm","md","lg","xl","2xl","3xl","4xl"],V=(e,t)=>{const n=K.forwardRef(({size:o="lg",className:r,...s},c)=>p.jsx(e,{className:`${r} ${hi.icon}`,"data-size":o,ref:c,alt:t,...s}));return n.displayName=t,n},ho=V(ei,"Left"),go=V(ti,"Right"),cn=V(ni,"Check"),wo=V(oi,"Circle"),an=V(ri,"Close"),xo=V(si,"External Link"),yo=V(ii,"Gear"),Co=V(ci,"Hammer"),bo=V(ai,"Heart"),Eo=V(li,"Kebab"),Ro=V(ui,"Lightning"),To=V(di,"Mail"),So=V(fi,"Menu"),Po=V(pi,"No Mobile Devices"),_o=V(mi,"Pencil"),Ut={ArrowLeft:ho,ArrowRight:go,Check:cn,Circle:wo,Close:an,ExternalLink:xo,Gear:yo,Hammer:Co,Heart:bo,Kebab:Eo,Lightning:Ro,Mail:To,Menu:So,NoMobile:Po,Pencil:_o,None:null},wi="_spinnerWrapper_1mfc7_1",xi="_spinner_1mfc7_1",$n={spinnerWrapper:wi,spinner:xi},ln=K.forwardRef(({className:e,size:t="lg",...n},o)=>p.jsx("div",{ref:o,className:$n.spinnerWrapper,"data-size":t,...n,children:p.jsx("div",{className:$n.spinner})}));ln.displayName="Spinner";const Ve=K.forwardRef(({className:e,notificationDotText:t,children:n,icon:o,trailingIcon:r,size:s="medium",variant:c,loading:a,iconOnly:d,...l},u)=>{const f=o?Ut[o]:void 0,v=r?Ut[r]:void 0,h=s==="small"?"sm":s==="medium"?"md":"lg";return p.jsxs("button",{ref:u,...l,className:`${Fn.button} ${e??""}`,"data-size":s,"data-variant":c,"data-icon-only":d,children:[f&&p.jsx(f,{size:h}),a&&p.jsx(ln,{size:h}),n,v&&p.jsx(v,{size:h}),t&&p.jsx("span",{className:Fn.buttonNotificationDot,children:t})]})});Ve.displayName="Button";function Bn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Bn(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Bn(e[r],null)}}}}function B(...e){return i.useCallback(wt(...e),e)}function yi(e,t){const n=i.createContext(t),o=s=>{const{children:c,...a}=s,d=i.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:d,children:c})};o.displayName=e+"Provider";function r(s){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function de(e,t=[]){let n=[];function o(s,c){const a=i.createContext(c),d=n.length;n=[...n,c];const l=f=>{const{scope:v,children:h,...w}=f,m=v?.[e]?.[d]||a,g=i.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:g,children:h})};l.displayName=s+"Provider";function u(f,v){const h=v?.[e]?.[d]||a,w=i.useContext(h);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[l,u]}const r=()=>{const s=n.map(c=>i.createContext(c));return function(a){const d=a?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...a,[e]:d}}),[a,d])}};return r.scopeName=e,[o,Ci(r,...t)]}function Ci(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const c=o.reduce((a,{useScope:d,scopeName:l})=>{const f=d(s)[`__scope${l}`];return{...a,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function _(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var ae=globalThis?.document?i.useLayoutEffect:()=>{},bi=i[" useInsertionEffect ".trim().toString()]||ae;function Oe({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,c]=Ei({defaultProp:t,onChange:n}),a=e!==void 0,d=a?e:r;{const u=i.useRef(e!==void 0);i.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,o])}const l=i.useCallback(u=>{if(a){const f=Ri(u)?u(e):u;f!==e&&c.current?.(f)}else s(u)},[a,e,s,c]);return[d,l]}function Ei({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return bi(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function Ri(e){return typeof e=="function"}function Ti(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Mo(e){const[t,n]=i.useState(void 0);return ae(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let c,a;if("borderBoxSize"in s){const d=s.borderBoxSize,l=Array.isArray(d)?d[0]:d;c=l.inlineSize,a=l.blockSize}else c=e.offsetWidth,a=e.offsetHeight;n({width:c,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function Si(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Z=e=>{const{present:t,children:n}=e,o=Pi(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=B(o.ref,_i(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Z.displayName="Presence";function Pi(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[a,d]=Si(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const l=et(o.current);s.current=a==="mounted"?l:"none"},[a]),ae(()=>{const l=o.current,u=r.current;if(u!==e){const v=s.current,h=et(l);e?d("MOUNT"):h==="none"||l?.display==="none"?d("UNMOUNT"):d(u&&v!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),ae(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,f=h=>{const m=et(o.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(d("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},v=h=>{h.target===t&&(s.current=et(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:i.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function et(e){return e?.animationName||"none"}function _i(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function je(e){const t=Mi(e),n=i.forwardRef((o,r)=>{const{children:s,...c}=o,a=i.Children.toArray(s),d=a.find(Oi);if(d){const l=d.props.children,u=a.map(f=>f===d?i.Children.count(l)>1?i.Children.only(null):i.isValidElement(l)?l.props.children:null:f);return p.jsx(t,{...c,ref:r,children:i.isValidElement(l)?i.cloneElement(l,void 0,u):null})}return p.jsx(t,{...c,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Mi(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const c=Ni(r),a=Di(s,r.props);return r.type!==i.Fragment&&(a.ref=o?wt(o,c):c),i.cloneElement(r,a)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ao=Symbol("radix.slottable");function Ai(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ao,t}function Oi(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ao}function Di(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...a)=>{const d=s(...a);return r(...a),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Ni(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ii=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],I=Ii.reduce((e,t)=>{const n=je(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:c,...a}=r,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(d,{...a,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function un(e,t){e&&sn.flushSync(()=>e.dispatchEvent(t))}var xt="Checkbox",[ki]=de(xt),[Li,dn]=ki(xt);function ji(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:s,form:c,name:a,onCheckedChange:d,required:l,value:u="on",internal_do_not_use_render:f}=e,[v,h]=Oe({prop:n,defaultProp:r??!1,onChange:d,caller:xt}),[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useRef(!1),C=w?!!c||!!w.closest("form"):!0,b={checked:v,disabled:s,setChecked:h,control:w,setControl:m,name:a,form:c,value:u,hasConsumerStoppedPropagationRef:y,required:l,defaultChecked:me(r)?!1:r,isFormControl:C,bubbleInput:g,setBubbleInput:x};return p.jsx(Li,{scope:t,...b,children:Fi(f)?f(b):o})}var Oo="CheckboxTrigger",Do=i.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:s,value:c,disabled:a,checked:d,required:l,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:v,isFormControl:h,bubbleInput:w}=dn(Oo,e),m=B(r,u),g=i.useRef(d);return i.useEffect(()=>{const x=s?.form;if(x){const y=()=>f(g.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[s,f]),p.jsx(I.button,{type:"button",role:"checkbox","aria-checked":me(d)?"mixed":d,"aria-required":l,"data-state":Fo(d),"data-disabled":a?"":void 0,disabled:a,value:c,...o,ref:m,onKeyDown:_(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:_(n,x=>{f(y=>me(y)?!0:!y),w&&h&&(v.current=x.isPropagationStopped(),v.current||x.stopPropagation())})})});Do.displayName=Oo;var No=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:s,required:c,disabled:a,value:d,onCheckedChange:l,form:u,...f}=e;return p.jsx(ji,{__scopeCheckbox:n,checked:r,defaultChecked:s,disabled:a,required:c,onCheckedChange:l,name:o,form:u,value:d,internal_do_not_use_render:({isFormControl:v})=>p.jsxs(p.Fragment,{children:[p.jsx(Do,{...f,ref:t,__scopeCheckbox:n}),v&&p.jsx(jo,{__scopeCheckbox:n})]})})});No.displayName=xt;var Io="CheckboxIndicator",ko=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,s=dn(Io,n);return p.jsx(Z,{present:o||me(s.checked)||s.checked===!0,children:p.jsx(I.span,{"data-state":Fo(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});ko.displayName=Io;var Lo="CheckboxBubbleInput",jo=i.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:s,defaultChecked:c,required:a,disabled:d,name:l,value:u,form:f,bubbleInput:v,setBubbleInput:h}=dn(Lo,e),w=B(n,h),m=Ti(s),g=Mo(o);i.useEffect(()=>{const y=v;if(!y)return;const C=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(C,"checked").set,T=!r.current;if(m!==s&&E){const R=new Event("click",{bubbles:T});y.indeterminate=me(s),E.call(y,me(s)?!1:s),y.dispatchEvent(R)}},[v,m,s,r]);const x=i.useRef(me(s)?!1:s);return p.jsx(I.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??x.current,required:a,disabled:d,name:l,value:u,form:f,...t,tabIndex:-1,ref:w,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});jo.displayName=Lo;function Fi(e){return typeof e=="function"}function me(e){return e==="indeterminate"}function Fo(e){return me(e)?"indeterminate":e?"checked":"unchecked"}const $i="_checkboxRow_5ztin_1",Bi="_checkboxRoot_5ztin_7",Wi="_checkboxIndicator_5ztin_19",Hi="_checkboxCheckmarkIcon_5ztin_29",Vi="_checkboxLabel_5ztin_35",ke={checkboxRow:$i,checkboxRoot:Bi,checkboxIndicator:Wi,checkboxCheckmarkIcon:Hi,checkboxLabel:Vi},Ki=({id:e,labelContent:t,checked:n,onClick:o})=>p.jsxs("div",{className:ke.checkboxRow,children:[p.jsx(No,{checked:n,onCheckedChange:r=>{o(r===!0)},className:ke.checkboxRoot,defaultChecked:!0,id:e,children:p.jsx(ko,{className:ke.checkboxIndicator,children:p.jsx(cn,{className:ke.checkboxCheckmarkIcon})})}),p.jsx("label",{className:ke.checkboxLabel,htmlFor:e,children:t})]});var Ui=i[" useId ".trim().toString()]||(()=>{}),Gi=0;function we(e){const[t,n]=i.useState(Ui());return ae(()=>{n(o=>o??String(Gi++))},[e]),e||(t?`radix-${t}`:"")}function Y(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function zi(e,t=globalThis?.document){const n=Y(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Yi="DismissableLayer",Gt="dismissableLayer.update",Xi="dismissableLayer.pointerDownOutside",qi="dismissableLayer.focusOutside",Wn,$o=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ke=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:c,onDismiss:a,...d}=e,l=i.useContext($o),[u,f]=i.useState(null),v=u?.ownerDocument??globalThis?.document,[,h]=i.useState({}),w=B(t,R=>f(R)),m=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(g),y=u?m.indexOf(u):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,b=y>=x,E=Qi(R=>{const M=R.target,N=[...l.branches].some(D=>D.contains(M));!b||N||(r?.(R),c?.(R),R.defaultPrevented||a?.())},v),T=Ji(R=>{const M=R.target;[...l.branches].some(D=>D.contains(M))||(s?.(R),c?.(R),R.defaultPrevented||a?.())},v);return zi(R=>{y===l.layers.size-1&&(o?.(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},v),i.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Wn=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Hn(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Wn)}},[u,v,n,l]),i.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Hn())},[u,l]),i.useEffect(()=>{const R=()=>h({});return document.addEventListener(Gt,R),()=>document.removeEventListener(Gt,R)},[]),p.jsx(I.div,{...d,ref:w,style:{pointerEvents:C?b?"auto":"none":void 0,...e.style},onFocusCapture:_(e.onFocusCapture,T.onFocusCapture),onBlurCapture:_(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,E.onPointerDownCapture)})});Ke.displayName=Yi;var Zi="DismissableLayerBranch",Bo=i.forwardRef((e,t)=>{const n=i.useContext($o),o=i.useRef(null),r=B(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(I.div,{...e,ref:r})});Bo.displayName=Zi;function Qi(e,t=globalThis?.document){const n=Y(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let d=function(){Wo(Xi,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=d,t.addEventListener("click",r.current,{once:!0})):d()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Ji(e,t=globalThis?.document){const n=Y(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&Wo(qi,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Hn(){const e=new CustomEvent(Gt);document.dispatchEvent(e)}function Wo(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,s):r.dispatchEvent(s)}var ec=Ke,tc=Bo,It="focusScope.autoFocusOnMount",kt="focusScope.autoFocusOnUnmount",Vn={bubbles:!1,cancelable:!0},nc="FocusScope",fn=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...c}=e,[a,d]=i.useState(null),l=Y(r),u=Y(s),f=i.useRef(null),v=B(t,m=>d(m)),h=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let m=function(C){if(h.paused||!a)return;const b=C.target;a.contains(b)?f.current=b:pe(f.current,{select:!0})},g=function(C){if(h.paused||!a)return;const b=C.relatedTarget;b!==null&&(a.contains(b)||pe(f.current,{select:!0}))},x=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&pe(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const y=new MutationObserver(x);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),y.disconnect()}}},[o,a,h.paused]),i.useEffect(()=>{if(a){Un.add(h);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(It,Vn);a.addEventListener(It,l),a.dispatchEvent(x),x.defaultPrevented||(oc(ac(Ho(a)),{select:!0}),document.activeElement===m&&pe(a))}return()=>{a.removeEventListener(It,l),setTimeout(()=>{const x=new CustomEvent(kt,Vn);a.addEventListener(kt,u),a.dispatchEvent(x),x.defaultPrevented||pe(m??document.body,{select:!0}),a.removeEventListener(kt,u),Un.remove(h)},0)}}},[a,l,u,h]);const w=i.useCallback(m=>{if(!n&&!o||h.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(g&&x){const y=m.currentTarget,[C,b]=rc(y);C&&b?!m.shiftKey&&x===b?(m.preventDefault(),n&&pe(C,{select:!0})):m.shiftKey&&x===C&&(m.preventDefault(),n&&pe(b,{select:!0})):x===y&&m.preventDefault()}},[n,o,h.paused]);return p.jsx(I.div,{tabIndex:-1,...c,ref:v,onKeyDown:w})});fn.displayName=nc;function oc(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(pe(o,{select:t}),document.activeElement!==n)return}function rc(e){const t=Ho(e),n=Kn(t,e),o=Kn(t.reverse(),e);return[n,o]}function Ho(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kn(e,t){for(const n of e)if(!sc(n,{upTo:t}))return n}function sc(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ic(e){return e instanceof HTMLInputElement&&"select"in e}function pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ic(e)&&t&&e.select()}}var Un=cc();function cc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Gn(e,t),e.unshift(t)},remove(t){e=Gn(e,t),e[0]?.resume()}}}function Gn(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function ac(e){return e.filter(t=>t.tagName!=="A")}var lc="Portal",Ue=i.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=i.useState(!1);ae(()=>s(!0),[]);const c=n||r&&globalThis?.document?.body;return c?mo.createPortal(p.jsx(I.div,{...o,ref:t}),c):null});Ue.displayName=lc;var Lt=0;function Vo(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zn()),document.body.insertAdjacentElement("beforeend",e[1]??zn()),Lt++,()=>{Lt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Lt--}},[])}function zn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var oe=function(){return oe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},oe.apply(this,arguments)};function Ko(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function uc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var at="right-scroll-bar-position",lt="width-before-scroll-bar",dc="with-scroll-bars-hidden",fc="--removed-body-scroll-bar-size";function jt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pc(e,t){var n=K.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var mc=typeof window<"u"?i.useLayoutEffect:i.useEffect,Yn=new WeakMap;function vc(e,t){var n=pc(null,function(o){return e.forEach(function(r){return jt(r,o)})});return mc(function(){var o=Yn.get(n);if(o){var r=new Set(o),s=new Set(e),c=n.current;r.forEach(function(a){s.has(a)||jt(a,null)}),s.forEach(function(a){r.has(a)||jt(a,c)})}Yn.set(n,e)},[e]),n}function hc(e){return e}function gc(e,t){t===void 0&&(t=hc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var c=t(s,o);return n.push(c),function(){n=n.filter(function(a){return a!==c})}},assignSyncMedium:function(s){for(o=!0;n.length;){var c=n;n=[],c.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){o=!0;var c=[];if(n.length){var a=n;n=[],a.forEach(s),c=n}var d=function(){var u=c;c=[],u.forEach(s)},l=function(){return Promise.resolve().then(d)};l(),n={push:function(u){c.push(u),l()},filter:function(u){return c=c.filter(u),n}}}};return r}function wc(e){e===void 0&&(e={});var t=gc(null);return t.options=oe({async:!0,ssr:!1},e),t}var Uo=function(e){var t=e.sideCar,n=Ko(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,oe({},n))};Uo.isSideCarExport=!0;function xc(e,t){return e.useMedium(t),Uo}var Go=wc(),Ft=function(){},yt=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:Ft,onWheelCapture:Ft,onTouchMoveCapture:Ft}),r=o[0],s=o[1],c=e.forwardProps,a=e.children,d=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,v=e.sideCar,h=e.noRelative,w=e.noIsolation,m=e.inert,g=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,C=e.gapMode,b=Ko(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,T=vc([n,t]),R=oe(oe({},b),r);return i.createElement(i.Fragment,null,u&&i.createElement(E,{sideCar:Go,removeScrollBar:l,shards:f,noRelative:h,noIsolation:w,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:C}),c?i.cloneElement(i.Children.only(a),oe(oe({},R),{ref:T})):i.createElement(y,oe({},R,{className:d,ref:T}),a))});yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yt.classNames={fullWidth:lt,zeroRight:at};var yc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Cc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yc();return t&&e.setAttribute("nonce",t),e}function bc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ec(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Rc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Cc())&&(bc(t,n),Ec(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Tc=function(){var e=Rc();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zo=function(){var e=Tc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Sc={left:0,top:0,right:0,gap:0},$t=function(e){return parseInt(e||"",10)||0},Pc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[$t(n),$t(o),$t(r)]},_c=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Sc;var t=Pc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Mc=zo(),Pe="data-scroll-locked",Ac=function(e,t,n,o){var r=e.left,s=e.top,c=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(dc,` {
|
|
3
|
+
overflow: hidden `).concat(o,`;
|
|
4
|
+
padding-right: `).concat(a,"px ").concat(o,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(Pe,`] {
|
|
7
|
+
overflow: hidden `).concat(o,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(r,`px;
|
|
11
|
+
padding-top: `).concat(s,`px;
|
|
12
|
+
padding-right: `).concat(c,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(a,"px ").concat(o,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(at,` {
|
|
20
|
+
right: `).concat(a,"px ").concat(o,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(lt,` {
|
|
24
|
+
margin-right: `).concat(a,"px ").concat(o,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(at," .").concat(at,` {
|
|
28
|
+
right: 0 `).concat(o,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(lt," .").concat(lt,` {
|
|
32
|
+
margin-right: 0 `).concat(o,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(Pe,`] {
|
|
36
|
+
`).concat(fc,": ").concat(a,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},Xn=function(){var e=parseInt(document.body.getAttribute(Pe)||"0",10);return isFinite(e)?e:0},Oc=function(){i.useEffect(function(){return document.body.setAttribute(Pe,(Xn()+1).toString()),function(){var e=Xn()-1;e<=0?document.body.removeAttribute(Pe):document.body.setAttribute(Pe,e.toString())}},[])},Dc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Oc();var s=i.useMemo(function(){return _c(r)},[r]);return i.createElement(Mc,{styles:Ac(s,!t,r,n?"":"!important")})},zt=!1;if(typeof window<"u")try{var tt=Object.defineProperty({},"passive",{get:function(){return zt=!0,!0}});window.addEventListener("test",tt,tt),window.removeEventListener("test",tt,tt)}catch{zt=!1}var Ee=zt?{passive:!1}:!1,Nc=function(e){return e.tagName==="TEXTAREA"},Yo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Nc(e)&&n[t]==="visible")},Ic=function(e){return Yo(e,"overflowY")},kc=function(e){return Yo(e,"overflowX")},qn=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=Xo(e,o);if(r){var s=qo(e,o),c=s[1],a=s[2];if(c>a)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Lc=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},jc=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},Xo=function(e,t){return e==="v"?Ic(t):kc(t)},qo=function(e,t){return e==="v"?Lc(t):jc(t)},Fc=function(e,t){return e==="h"&&t==="rtl"?-1:1},$c=function(e,t,n,o,r){var s=Fc(e,window.getComputedStyle(t).direction),c=s*o,a=n.target,d=t.contains(a),l=!1,u=c>0,f=0,v=0;do{if(!a)break;var h=qo(e,a),w=h[0],m=h[1],g=h[2],x=m-g-s*w;(w||x)&&Xo(e,a)&&(f+=x,v+=w);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!d&&a!==document.body||d&&(t.contains(a)||t===a));return(u&&Math.abs(f)<1||!u&&Math.abs(v)<1)&&(l=!0),l},nt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Zn=function(e){return[e.deltaX,e.deltaY]},Qn=function(e){return e&&"current"in e?e.current:e},Bc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Wc=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},Hc=0,Re=[];function Vc(e){var t=i.useRef([]),n=i.useRef([0,0]),o=i.useRef(),r=i.useState(Hc++)[0],s=i.useState(zo)[0],c=i.useRef(e);i.useEffect(function(){c.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var m=uc([e.lockRef.current],(e.shards||[]).map(Qn),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var a=i.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!c.current.allowPinchZoom;var x=nt(m),y=n.current,C="deltaX"in m?m.deltaX:y[0]-x[0],b="deltaY"in m?m.deltaY:y[1]-x[1],E,T=m.target,R=Math.abs(C)>Math.abs(b)?"h":"v";if("touches"in m&&R==="h"&&T.type==="range")return!1;var M=qn(R,T);if(!M)return!0;if(M?E=R:(E=R==="v"?"h":"v",M=qn(R,T)),!M)return!1;if(!o.current&&"changedTouches"in m&&(C||b)&&(o.current=E),!E)return!0;var N=o.current||E;return $c(N,g,m,N==="h"?C:b)},[]),d=i.useCallback(function(m){var g=m;if(!(!Re.length||Re[Re.length-1]!==s)){var x="deltaY"in g?Zn(g):nt(g),y=t.current.filter(function(E){return E.name===g.type&&(E.target===g.target||g.target===E.shadowParent)&&Bc(E.delta,x)})[0];if(y&&y.should){g.cancelable&&g.preventDefault();return}if(!y){var C=(c.current.shards||[]).map(Qn).filter(Boolean).filter(function(E){return E.contains(g.target)}),b=C.length>0?a(g,C[0]):!c.current.noIsolation;b&&g.cancelable&&g.preventDefault()}}},[]),l=i.useCallback(function(m,g,x,y){var C={name:m,delta:g,target:x,should:y,shadowParent:Kc(x)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(b){return b!==C})},1)},[]),u=i.useCallback(function(m){n.current=nt(m),o.current=void 0},[]),f=i.useCallback(function(m){l(m.type,Zn(m),m.target,a(m,e.lockRef.current))},[]),v=i.useCallback(function(m){l(m.type,nt(m),m.target,a(m,e.lockRef.current))},[]);i.useEffect(function(){return Re.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:v}),document.addEventListener("wheel",d,Ee),document.addEventListener("touchmove",d,Ee),document.addEventListener("touchstart",u,Ee),function(){Re=Re.filter(function(m){return m!==s}),document.removeEventListener("wheel",d,Ee),document.removeEventListener("touchmove",d,Ee),document.removeEventListener("touchstart",u,Ee)}},[]);var h=e.removeScrollBar,w=e.inert;return i.createElement(i.Fragment,null,w?i.createElement(s,{styles:Wc(r)}):null,h?i.createElement(Dc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Kc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Uc=xc(Go,Vc);var pn=i.forwardRef(function(e,t){return i.createElement(yt,oe({},e,{ref:t,sideCar:Uc}))});pn.classNames=yt.classNames;var Gc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Te=new WeakMap,ot=new WeakMap,rt={},Bt=0,Zo=function(e){return e&&(e.host||Zo(e.parentNode))},zc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Zo(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Yc=function(e,t,n,o){var r=zc(t,Array.isArray(e)?e:[e]);rt[n]||(rt[n]=new WeakMap);var s=rt[n],c=[],a=new Set,d=new Set(r),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};r.forEach(l);var u=function(f){!f||d.has(f)||Array.prototype.forEach.call(f.children,function(v){if(a.has(v))u(v);else try{var h=v.getAttribute(o),w=h!==null&&h!=="false",m=(Te.get(v)||0)+1,g=(s.get(v)||0)+1;Te.set(v,m),s.set(v,g),c.push(v),m===1&&w&&ot.set(v,!0),g===1&&v.setAttribute(n,"true"),w||v.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",v,x)}})};return u(t),a.clear(),Bt++,function(){c.forEach(function(f){var v=Te.get(f)-1,h=s.get(f)-1;Te.set(f,v),s.set(f,h),v||(ot.has(f)||f.removeAttribute(o),ot.delete(f)),h||f.removeAttribute(n)}),Bt--,Bt||(Te=new WeakMap,Te=new WeakMap,ot=new WeakMap,rt={})}},Qo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Gc(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),Yc(o,r,n,"aria-hidden")):function(){return null}},Ct="Dialog",[Jo]=de(Ct),[Xc,te]=Jo(Ct),er=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:c=!0}=e,a=i.useRef(null),d=i.useRef(null),[l,u]=Oe({prop:o,defaultProp:r??!1,onChange:s,caller:Ct});return p.jsx(Xc,{scope:t,triggerRef:a,contentRef:d,contentId:we(),titleId:we(),descriptionId:we(),open:l,onOpenChange:u,onOpenToggle:i.useCallback(()=>u(f=>!f),[u]),modal:c,children:n})};er.displayName=Ct;var tr="DialogTrigger",nr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(tr,n),s=B(t,r.triggerRef);return p.jsx(I.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":hn(r.open),...o,ref:s,onClick:_(e.onClick,r.onOpenToggle)})});nr.displayName=tr;var mn="DialogPortal",[qc,or]=Jo(mn,{forceMount:void 0}),rr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=te(mn,t);return p.jsx(qc,{scope:t,forceMount:n,children:i.Children.map(o,c=>p.jsx(Z,{present:n||s.open,children:p.jsx(Ue,{asChild:!0,container:r,children:c})}))})};rr.displayName=mn;var dt="DialogOverlay",sr=i.forwardRef((e,t)=>{const n=or(dt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=te(dt,e.__scopeDialog);return s.modal?p.jsx(Z,{present:o||s.open,children:p.jsx(Qc,{...r,ref:t})}):null});sr.displayName=dt;var Zc=je("DialogOverlay.RemoveScroll"),Qc=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(dt,n);return p.jsx(pn,{as:Zc,allowPinchZoom:!0,shards:[r.contentRef],children:p.jsx(I.div,{"data-state":hn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),xe="DialogContent",ir=i.forwardRef((e,t)=>{const n=or(xe,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=te(xe,e.__scopeDialog);return p.jsx(Z,{present:o||s.open,children:s.modal?p.jsx(Jc,{...r,ref:t}):p.jsx(ea,{...r,ref:t})})});ir.displayName=xe;var Jc=i.forwardRef((e,t)=>{const n=te(xe,e.__scopeDialog),o=i.useRef(null),r=B(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return Qo(s)},[]),p.jsx(cr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:_(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,a=c.button===0&&c.ctrlKey===!0;(c.button===2||a)&&s.preventDefault()}),onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault())})}),ea=i.forwardRef((e,t)=>{const n=te(xe,e.__scopeDialog),o=i.useRef(!1),r=i.useRef(!1);return p.jsx(cr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const c=s.target;n.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),cr=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...c}=e,a=te(xe,n),d=i.useRef(null),l=B(t,d);return Vo(),p.jsxs(p.Fragment,{children:[p.jsx(fn,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:p.jsx(Ke,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":hn(a.open),...c,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(na,{titleId:a.titleId}),p.jsx(ra,{contentRef:d,descriptionId:a.descriptionId})]})]})}),vn="DialogTitle",ar=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(vn,n);return p.jsx(I.h2,{id:r.titleId,...o,ref:t})});ar.displayName=vn;var lr="DialogDescription",ta=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(lr,n);return p.jsx(I.p,{id:r.descriptionId,...o,ref:t})});ta.displayName=lr;var ur="DialogClose",dr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(ur,n);return p.jsx(I.button,{type:"button",...o,ref:t,onClick:_(e.onClick,()=>r.onOpenChange(!1))})});dr.displayName=ur;function hn(e){return e?"open":"closed"}var fr="DialogTitleWarning",[bf,pr]=yi(fr,{contentName:xe,titleName:vn,docsSlug:"dialog"}),na=({titleId:e})=>{const t=pr(fr),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
+
|
|
43
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
+
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},oa="DialogDescriptionWarning",ra=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pr(oa).contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},sa=er,ia=nr,ca=rr,aa=sr,la=ir,ua=ar,da=dr;const fa="_dialogOverlay_1flkk_1",pa="_dialogContent_1flkk_20",ma="_dialogCloseButton_1flkk_65",va="_dialogTitle_1flkk_72",st={dialogOverlay:fa,dialogContent:pa,dialogCloseButton:ma,dialogTitle:va},ha=({trigger:e,content:t,title:n,...o})=>p.jsxs(sa,{...o,children:[p.jsx(ia,{asChild:!0,children:e}),p.jsxs(ca,{children:[p.jsx(aa,{className:`${st.dialogOverlay}`}),p.jsxs(la,{className:st.dialogContent,onPointerDownOutside:r=>{r?.preventDefault()},"data-size":"md",children:[p.jsx(da,{asChild:!0,children:p.jsx(Ve,{className:`${st.dialogCloseButton}`,variant:"tertiary",iconOnly:!0,children:p.jsx(an,{})})}),p.jsx(ua,{className:st.dialogTitle,children:n}),t]})]})]});function gn(e){const t=e+"CollectionProvider",[n,o]=de(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=m=>{const{scope:g,children:x}=m,y=K.useRef(null),C=K.useRef(new Map).current;return p.jsx(r,{scope:g,itemMap:C,collectionRef:y,children:x})};c.displayName=t;const a=e+"CollectionSlot",d=je(a),l=K.forwardRef((m,g)=>{const{scope:x,children:y}=m,C=s(a,x),b=B(g,C.collectionRef);return p.jsx(d,{ref:b,children:y})});l.displayName=a;const u=e+"CollectionItemSlot",f="data-radix-collection-item",v=je(u),h=K.forwardRef((m,g)=>{const{scope:x,children:y,...C}=m,b=K.useRef(null),E=B(g,b),T=s(u,x);return K.useEffect(()=>(T.itemMap.set(b,{ref:b,...C}),()=>void T.itemMap.delete(b))),p.jsx(v,{[f]:"",ref:E,children:y})});h.displayName=u;function w(m){const g=s(e+"CollectionConsumer",m);return K.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const C=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((T,R)=>C.indexOf(T.ref.current)-C.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:c,Slot:l,ItemSlot:h},w,o]}var ga=i.createContext(void 0);function mr(e){const t=i.useContext(ga);return e||t||"ltr"}const wa=["top","right","bottom","left"],ve=Math.min,G=Math.max,ft=Math.round,it=Math.floor,se=e=>({x:e,y:e}),xa={left:"right",right:"left",bottom:"top",top:"bottom"},ya={start:"end",end:"start"};function Yt(e,t,n){return G(e,ve(t,n))}function le(e,t){return typeof e=="function"?e(t):e}function ue(e){return e.split("-")[0]}function De(e){return e.split("-")[1]}function wn(e){return e==="x"?"y":"x"}function xn(e){return e==="y"?"height":"width"}const Ca=new Set(["top","bottom"]);function re(e){return Ca.has(ue(e))?"y":"x"}function yn(e){return wn(re(e))}function ba(e,t,n){n===void 0&&(n=!1);const o=De(e),r=yn(e),s=xn(r);let c=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=pt(c)),[c,pt(c)]}function Ea(e){const t=pt(e);return[Xt(e),t,Xt(t)]}function Xt(e){return e.replace(/start|end/g,t=>ya[t])}const Jn=["left","right"],eo=["right","left"],Ra=["top","bottom"],Ta=["bottom","top"];function Sa(e,t,n){switch(e){case"top":case"bottom":return n?t?eo:Jn:t?Jn:eo;case"left":case"right":return t?Ra:Ta;default:return[]}}function Pa(e,t,n,o){const r=De(e);let s=Sa(ue(e),n==="start",o);return r&&(s=s.map(c=>c+"-"+r),t&&(s=s.concat(s.map(Xt)))),s}function pt(e){return e.replace(/left|right|bottom|top/g,t=>xa[t])}function _a(e){return{top:0,right:0,bottom:0,left:0,...e}}function vr(e){return typeof e!="number"?_a(e):{top:e,right:e,bottom:e,left:e}}function mt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function to(e,t,n){let{reference:o,floating:r}=e;const s=re(t),c=yn(t),a=xn(c),d=ue(t),l=s==="y",u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,v=o[a]/2-r[a]/2;let h;switch(d){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-r.width,y:f};break;default:h={x:o.x,y:o.y}}switch(De(t)){case"start":h[c]-=v*(n&&l?-1:1);break;case"end":h[c]+=v*(n&&l?-1:1);break}return h}const Ma=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:c}=n,a=s.filter(Boolean),d=await(c.isRTL==null?void 0:c.isRTL(t));let l=await c.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:f}=to(l,o,d),v=o,h={},w=0;for(let m=0;m<a.length;m++){const{name:g,fn:x}=a[m],{x:y,y:C,data:b,reset:E}=await x({x:u,y:f,initialPlacement:o,placement:v,strategy:r,middlewareData:h,rects:l,platform:c,elements:{reference:e,floating:t}});u=y??u,f=C??f,h={...h,[g]:{...h[g],...b}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(v=E.placement),E.rects&&(l=E.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:u,y:f}=to(l,v,d)),m=-1)}return{x:u,y:f,placement:v,strategy:r,middlewareData:h}};async function Fe(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:c,elements:a,strategy:d}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:v=!1,padding:h=0}=le(t,e),w=vr(h),g=a[v?f==="floating"?"reference":"floating":f],x=mt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:d})),y=f==="floating"?{x:o,y:r,width:c.floating.width,height:c.floating.height}:c.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},E=mt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:C,strategy:d}):y);return{top:(x.top-E.top+w.top)/b.y,bottom:(E.bottom-x.bottom+w.bottom)/b.y,left:(x.left-E.left+w.left)/b.x,right:(E.right-x.right+w.right)/b.x}}const Aa=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:c,elements:a,middlewareData:d}=t,{element:l,padding:u=0}=le(e,t)||{};if(l==null)return{};const f=vr(u),v={x:n,y:o},h=yn(r),w=xn(h),m=await c.getDimensions(l),g=h==="y",x=g?"top":"left",y=g?"bottom":"right",C=g?"clientHeight":"clientWidth",b=s.reference[w]+s.reference[h]-v[h]-s.floating[w],E=v[h]-s.reference[h],T=await(c.getOffsetParent==null?void 0:c.getOffsetParent(l));let R=T?T[C]:0;(!R||!await(c.isElement==null?void 0:c.isElement(T)))&&(R=a.floating[C]||s.floating[w]);const M=b/2-E/2,N=R/2-m[w]/2-1,D=ve(f[x],N),k=ve(f[y],N),$=D,L=R-m[w]-k,P=R/2-m[w]/2+M,j=Yt($,P,L),O=!d.arrow&&De(r)!=null&&P!==j&&s.reference[w]/2-(P<$?D:k)-m[w]/2<0,F=O?P<$?P-$:P-L:0;return{[h]:v[h]+F,data:{[h]:j,centerOffset:P-j-F,...O&&{alignmentOffset:F}},reset:O}}}),Oa=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:c,initialPlacement:a,platform:d,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...g}=le(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=ue(r),y=re(a),C=ue(a)===a,b=await(d.isRTL==null?void 0:d.isRTL(l.floating)),E=v||(C||!m?[pt(a)]:Ea(a)),T=w!=="none";!v&&T&&E.push(...Pa(a,m,w,b));const R=[a,...E],M=await Fe(t,g),N=[];let D=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&N.push(M[x]),f){const P=ba(r,c,b);N.push(M[P[0]],M[P[1]])}if(D=[...D,{placement:r,overflows:N}],!N.every(P=>P<=0)){var k,$;const P=(((k=s.flip)==null?void 0:k.index)||0)+1,j=R[P];if(j&&(!(f==="alignment"?y!==re(j):!1)||D.every(A=>re(A.placement)===y?A.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:j}};let O=($=D.filter(F=>F.overflows[0]<=0).sort((F,A)=>F.overflows[1]-A.overflows[1])[0])==null?void 0:$.placement;if(!O)switch(h){case"bestFit":{var L;const F=(L=D.filter(A=>{if(T){const S=re(A.placement);return S===y||S==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(S=>S>0).reduce((S,W)=>S+W,0)]).sort((A,S)=>A[1]-S[1])[0])==null?void 0:L[0];F&&(O=F);break}case"initialPlacement":O=a;break}if(r!==O)return{reset:{placement:O}}}return{}}}};function no(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oo(e){return wa.some(t=>e[t]>=0)}const Da=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=le(e,t);switch(o){case"referenceHidden":{const s=await Fe(t,{...r,elementContext:"reference"}),c=no(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:oo(c)}}}case"escaped":{const s=await Fe(t,{...r,altBoundary:!0}),c=no(s,n.floating);return{data:{escapedOffsets:c,escaped:oo(c)}}}default:return{}}}}},hr=new Set(["left","top"]);async function Na(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),c=ue(n),a=De(n),d=re(n)==="y",l=hr.has(c)?-1:1,u=s&&d?-1:1,f=le(t,e);let{mainAxis:v,crossAxis:h,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof w=="number"&&(h=a==="end"?w*-1:w),d?{x:h*u,y:v*l}:{x:v*l,y:h*u}}const Ia=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:c,middlewareData:a}=t,d=await Na(t,e);return c===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+d.x,y:s+d.y,data:{...d,placement:c}}}}},ka=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:a={fn:g=>{let{x,y}=g;return{x,y}}},...d}=le(e,t),l={x:n,y:o},u=await Fe(t,d),f=re(ue(r)),v=wn(f);let h=l[v],w=l[f];if(s){const g=v==="y"?"top":"left",x=v==="y"?"bottom":"right",y=h+u[g],C=h-u[x];h=Yt(y,h,C)}if(c){const g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=w+u[g],C=w-u[x];w=Yt(y,w,C)}const m=a.fn({...t,[v]:h,[f]:w});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[v]:s,[f]:c}}}}}},La=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:c}=t,{offset:a=0,mainAxis:d=!0,crossAxis:l=!0}=le(e,t),u={x:n,y:o},f=re(r),v=wn(f);let h=u[v],w=u[f];const m=le(a,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(d){const C=v==="y"?"height":"width",b=s.reference[v]-s.floating[C]+g.mainAxis,E=s.reference[v]+s.reference[C]-g.mainAxis;h<b?h=b:h>E&&(h=E)}if(l){var x,y;const C=v==="y"?"width":"height",b=hr.has(ue(r)),E=s.reference[f]-s.floating[C]+(b&&((x=c.offset)==null?void 0:x[f])||0)+(b?0:g.crossAxis),T=s.reference[f]+s.reference[C]+(b?0:((y=c.offset)==null?void 0:y[f])||0)-(b?g.crossAxis:0);w<E?w=E:w>T&&(w=T)}return{[v]:h,[f]:w}}}},ja=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:c,elements:a}=t,{apply:d=()=>{},...l}=le(e,t),u=await Fe(t,l),f=ue(r),v=De(r),h=re(r)==="y",{width:w,height:m}=s.floating;let g,x;f==="top"||f==="bottom"?(g=f,x=v===(await(c.isRTL==null?void 0:c.isRTL(a.floating))?"start":"end")?"left":"right"):(x=f,g=v==="end"?"top":"bottom");const y=m-u.top-u.bottom,C=w-u.left-u.right,b=ve(m-u[g],y),E=ve(w-u[x],C),T=!t.middlewareData.shift;let R=b,M=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(R=y),T&&!v){const D=G(u.left,0),k=G(u.right,0),$=G(u.top,0),L=G(u.bottom,0);h?M=w-2*(D!==0||k!==0?D+k:G(u.left,u.right)):R=m-2*($!==0||L!==0?$+L:G(u.top,u.bottom))}await d({...t,availableWidth:M,availableHeight:R});const N=await c.getDimensions(a.floating);return w!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function bt(){return typeof window<"u"}function Ne(e){return gr(e)?(e.nodeName||"").toLowerCase():"#document"}function z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ce(e){var t;return(t=(gr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gr(e){return bt()?e instanceof Node||e instanceof z(e).Node:!1}function J(e){return bt()?e instanceof Element||e instanceof z(e).Element:!1}function ie(e){return bt()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function ro(e){return!bt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}const Fa=new Set(["inline","contents"]);function Ge(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Fa.has(r)}const $a=new Set(["table","td","th"]);function Ba(e){return $a.has(Ne(e))}const Wa=[":popover-open",":modal"];function Et(e){return Wa.some(t=>{try{return e.matches(t)}catch{return!1}})}const Ha=["transform","translate","scale","rotate","perspective"],Va=["transform","translate","scale","rotate","perspective","filter"],Ka=["paint","layout","strict","content"];function Cn(e){const t=bn(),n=J(e)?ee(e):e;return Ha.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Va.some(o=>(n.willChange||"").includes(o))||Ka.some(o=>(n.contain||"").includes(o))}function Ua(e){let t=he(e);for(;ie(t)&&!Me(t);){if(Cn(t))return t;if(Et(t))return null;t=he(t)}return null}function bn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ga=new Set(["html","body","#document"]);function Me(e){return Ga.has(Ne(e))}function ee(e){return z(e).getComputedStyle(e)}function Rt(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function he(e){if(Ne(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ro(e)&&e.host||ce(e);return ro(t)?t.host:t}function wr(e){const t=he(e);return Me(t)?e.ownerDocument?e.ownerDocument.body:e.body:ie(t)&&Ge(t)?t:wr(t)}function $e(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=wr(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),c=z(r);if(s){const a=qt(c);return t.concat(c,c.visualViewport||[],Ge(r)?r:[],a&&n?$e(a):[])}return t.concat(r,$e(r,[],n))}function qt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xr(e){const t=ee(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ie(e),s=r?e.offsetWidth:n,c=r?e.offsetHeight:o,a=ft(n)!==s||ft(o)!==c;return a&&(n=s,o=c),{width:n,height:o,$:a}}function En(e){return J(e)?e:e.contextElement}function _e(e){const t=En(e);if(!ie(t))return se(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=xr(t);let c=(s?ft(n.width):n.width)/o,a=(s?ft(n.height):n.height)/r;return(!c||!Number.isFinite(c))&&(c=1),(!a||!Number.isFinite(a))&&(a=1),{x:c,y:a}}const za=se(0);function yr(e){const t=z(e);return!bn()||!t.visualViewport?za:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ya(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==z(e)?!1:t}function ye(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=En(e);let c=se(1);t&&(o?J(o)&&(c=_e(o)):c=_e(e));const a=Ya(s,n,o)?yr(s):se(0);let d=(r.left+a.x)/c.x,l=(r.top+a.y)/c.y,u=r.width/c.x,f=r.height/c.y;if(s){const v=z(s),h=o&&J(o)?z(o):o;let w=v,m=qt(w);for(;m&&o&&h!==w;){const g=_e(m),x=m.getBoundingClientRect(),y=ee(m),C=x.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,b=x.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;d*=g.x,l*=g.y,u*=g.x,f*=g.y,d+=C,l+=b,w=z(m),m=qt(w)}}return mt({width:u,height:f,x:d,y:l})}function Tt(e,t){const n=Rt(e).scrollLeft;return t?t.left+n:ye(ce(e)).left+n}function Cr(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Tt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Xa(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",c=ce(o),a=t?Et(t.floating):!1;if(o===c||a&&s)return n;let d={scrollLeft:0,scrollTop:0},l=se(1);const u=se(0),f=ie(o);if((f||!f&&!s)&&((Ne(o)!=="body"||Ge(c))&&(d=Rt(o)),ie(o))){const h=ye(o);l=_e(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const v=c&&!f&&!s?Cr(c,d):se(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-d.scrollLeft*l.x+u.x+v.x,y:n.y*l.y-d.scrollTop*l.y+u.y+v.y}}function qa(e){return Array.from(e.getClientRects())}function Za(e){const t=ce(e),n=Rt(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=G(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+Tt(e);const a=-n.scrollTop;return ee(o).direction==="rtl"&&(c+=G(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:c,y:a}}const so=25;function Qa(e,t){const n=z(e),o=ce(e),r=n.visualViewport;let s=o.clientWidth,c=o.clientHeight,a=0,d=0;if(r){s=r.width,c=r.height;const u=bn();(!u||u&&t==="fixed")&&(a=r.offsetLeft,d=r.offsetTop)}const l=Tt(o);if(l<=0){const u=o.ownerDocument,f=u.body,v=getComputedStyle(f),h=u.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,w=Math.abs(o.clientWidth-f.clientWidth-h);w<=so&&(s-=w)}else l<=so&&(s+=l);return{width:s,height:c,x:a,y:d}}const Ja=new Set(["absolute","fixed"]);function el(e,t){const n=ye(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=ie(e)?_e(e):se(1),c=e.clientWidth*s.x,a=e.clientHeight*s.y,d=r*s.x,l=o*s.y;return{width:c,height:a,x:d,y:l}}function io(e,t,n){let o;if(t==="viewport")o=Qa(e,n);else if(t==="document")o=Za(ce(e));else if(J(t))o=el(t,n);else{const r=yr(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return mt(o)}function br(e,t){const n=he(e);return n===t||!J(n)||Me(n)?!1:ee(n).position==="fixed"||br(n,t)}function tl(e,t){const n=t.get(e);if(n)return n;let o=$e(e,[],!1).filter(a=>J(a)&&Ne(a)!=="body"),r=null;const s=ee(e).position==="fixed";let c=s?he(e):e;for(;J(c)&&!Me(c);){const a=ee(c),d=Cn(c);!d&&a.position==="fixed"&&(r=null),(s?!d&&!r:!d&&a.position==="static"&&!!r&&Ja.has(r.position)||Ge(c)&&!d&&br(e,c))?o=o.filter(u=>u!==c):r=a,c=he(c)}return t.set(e,o),o}function nl(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const c=[...n==="clippingAncestors"?Et(t)?[]:tl(t,this._c):[].concat(n),o],a=c[0],d=c.reduce((l,u)=>{const f=io(t,u,r);return l.top=G(f.top,l.top),l.right=ve(f.right,l.right),l.bottom=ve(f.bottom,l.bottom),l.left=G(f.left,l.left),l},io(t,a,r));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ol(e){const{width:t,height:n}=xr(e);return{width:t,height:n}}function rl(e,t,n){const o=ie(t),r=ce(t),s=n==="fixed",c=ye(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const d=se(0);function l(){d.x=Tt(r)}if(o||!o&&!s)if((Ne(t)!=="body"||Ge(r))&&(a=Rt(t)),o){const h=ye(t,!0,s,t);d.x=h.x+t.clientLeft,d.y=h.y+t.clientTop}else r&&l();s&&!o&&r&&l();const u=r&&!o&&!s?Cr(r,a):se(0),f=c.left+a.scrollLeft-d.x-u.x,v=c.top+a.scrollTop-d.y-u.y;return{x:f,y:v,width:c.width,height:c.height}}function Wt(e){return ee(e).position==="static"}function co(e,t){if(!ie(e)||ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ce(e)===n&&(n=n.ownerDocument.body),n}function Er(e,t){const n=z(e);if(Et(e))return n;if(!ie(e)){let r=he(e);for(;r&&!Me(r);){if(J(r)&&!Wt(r))return r;r=he(r)}return n}let o=co(e,t);for(;o&&Ba(o)&&Wt(o);)o=co(o,t);return o&&Me(o)&&Wt(o)&&!Cn(o)?n:o||Ua(e)||n}const sl=async function(e){const t=this.getOffsetParent||Er,n=this.getDimensions,o=await n(e.floating);return{reference:rl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function il(e){return ee(e).direction==="rtl"}const cl={convertOffsetParentRelativeRectToViewportRelativeRect:Xa,getDocumentElement:ce,getClippingRect:nl,getOffsetParent:Er,getElementRects:sl,getClientRects:qa,getDimensions:ol,getScale:_e,isElement:J,isRTL:il};function Rr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function al(e,t){let n=null,o;const r=ce(e);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function c(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),s();const l=e.getBoundingClientRect(),{left:u,top:f,width:v,height:h}=l;if(a||t(),!v||!h)return;const w=it(f),m=it(r.clientWidth-(u+v)),g=it(r.clientHeight-(f+h)),x=it(u),C={rootMargin:-w+"px "+-m+"px "+-g+"px "+-x+"px",threshold:G(0,ve(1,d))||1};let b=!0;function E(T){const R=T[0].intersectionRatio;if(R!==d){if(!b)return c();R?c(!1,R):o=setTimeout(()=>{c(!1,1e-7)},1e3)}R===1&&!Rr(l,e.getBoundingClientRect())&&c(),b=!1}try{n=new IntersectionObserver(E,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,C)}n.observe(e)}return c(!0),s}function ll(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,l=En(e),u=r||s?[...l?$e(l):[],...$e(t)]:[];u.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=l&&a?al(l,n):null;let v=-1,h=null;c&&(h=new ResizeObserver(x=>{let[y]=x;y&&y.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(t)})),n()}),l&&!d&&h.observe(l),h.observe(t));let w,m=d?ye(e):null;d&&g();function g(){const x=ye(e);m&&!Rr(m,x)&&n(),m=x,w=requestAnimationFrame(g)}return n(),()=>{var x;u.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f?.(),(x=h)==null||x.disconnect(),h=null,d&&cancelAnimationFrame(w)}}const ul=Ia,dl=ka,fl=Oa,pl=ja,ml=Da,ao=Aa,vl=La,hl=(e,t,n)=>{const o=new Map,r={platform:cl,...n},s={...r.platform,_c:o};return Ma(e,t,{...r,platform:s})};var gl=typeof document<"u",wl=function(){},ut=gl?K.useLayoutEffect:wl;function vt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!vt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!vt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Tr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lo(e,t){const n=Tr(e);return Math.round(t*n)/n}function Ht(e){const t=i.useRef(e);return ut(()=>{t.current=e}),t}function xl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:c}={},transform:a=!0,whileElementsMounted:d,open:l}=e,[u,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,h]=i.useState(o);vt(v,o)||h(o);const[w,m]=i.useState(null),[g,x]=i.useState(null),y=i.useCallback(A=>{A!==T.current&&(T.current=A,m(A))},[]),C=i.useCallback(A=>{A!==R.current&&(R.current=A,x(A))},[]),b=s||w,E=c||g,T=i.useRef(null),R=i.useRef(null),M=i.useRef(u),N=d!=null,D=Ht(d),k=Ht(r),$=Ht(l),L=i.useCallback(()=>{if(!T.current||!R.current)return;const A={placement:t,strategy:n,middleware:v};k.current&&(A.platform=k.current),hl(T.current,R.current,A).then(S=>{const W={...S,isPositioned:$.current!==!1};P.current&&!vt(M.current,W)&&(M.current=W,sn.flushSync(()=>{f(W)}))})},[v,t,n,k,$]);ut(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[l]);const P=i.useRef(!1);ut(()=>(P.current=!0,()=>{P.current=!1}),[]),ut(()=>{if(b&&(T.current=b),E&&(R.current=E),b&&E){if(D.current)return D.current(b,E,L);L()}},[b,E,L,D,N]);const j=i.useMemo(()=>({reference:T,floating:R,setReference:y,setFloating:C}),[y,C]),O=i.useMemo(()=>({reference:b,floating:E}),[b,E]),F=i.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const S=lo(O.floating,u.x),W=lo(O.floating,u.y);return a?{...A,transform:"translate("+S+"px, "+W+"px)",...Tr(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:S,top:W}},[n,a,O.floating,u.x,u.y]);return i.useMemo(()=>({...u,update:L,refs:j,elements:O,floatingStyles:F}),[u,L,j,O,F])}const yl=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?ao({element:o.current,padding:r}).fn(n):{}:o?ao({element:o,padding:r}).fn(n):{}}}},Cl=(e,t)=>({...ul(e),options:[e,t]}),bl=(e,t)=>({...dl(e),options:[e,t]}),El=(e,t)=>({...vl(e),options:[e,t]}),Rl=(e,t)=>({...fl(e),options:[e,t]}),Tl=(e,t)=>({...pl(e),options:[e,t]}),Sl=(e,t)=>({...ml(e),options:[e,t]}),Pl=(e,t)=>({...yl(e),options:[e,t]});var _l="Arrow",Sr=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return p.jsx(I.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Sr.displayName=_l;var Ml=Sr,Rn="Popper",[Pr,St]=de(Rn),[Al,_r]=Pr(Rn),Mr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return p.jsx(Al,{scope:t,anchor:o,onAnchorChange:r,children:n})};Mr.displayName=Rn;var Ar="PopperAnchor",Or=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=_r(Ar,n),c=i.useRef(null),a=B(t,c),d=i.useRef(null);return i.useEffect(()=>{const l=d.current;d.current=o?.current||c.current,l!==d.current&&s.onAnchorChange(d.current)}),o?null:p.jsx(I.div,{...r,ref:a})});Or.displayName=Ar;var Tn="PopperContent",[Ol,Dl]=Pr(Tn),Dr=i.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:c=0,arrowPadding:a=0,avoidCollisions:d=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:v=!1,updatePositionStrategy:h="optimized",onPlaced:w,...m}=e,g=_r(Tn,n),[x,y]=i.useState(null),C=B(t,H=>y(H)),[b,E]=i.useState(null),T=Mo(b),R=T?.width??0,M=T?.height??0,N=o+(s!=="center"?"-"+s:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],$=k.length>0,L={padding:D,boundary:k.filter(Il),altBoundary:$},{refs:P,floatingStyles:j,placement:O,isPositioned:F,middlewareData:A}=xl({strategy:"fixed",placement:N,whileElementsMounted:(...H)=>ll(...H,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[Cl({mainAxis:r+M,alignmentAxis:c}),d&&bl({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?El():void 0,...L}),d&&Rl({...L}),Tl({...L,apply:({elements:H,rects:Ie,availableWidth:Ys,availableHeight:Xs})=>{const{width:qs,height:Zs}=Ie.reference,Je=H.floating.style;Je.setProperty("--radix-popper-available-width",`${Ys}px`),Je.setProperty("--radix-popper-available-height",`${Xs}px`),Je.setProperty("--radix-popper-anchor-width",`${qs}px`),Je.setProperty("--radix-popper-anchor-height",`${Zs}px`)}}),b&&Pl({element:b,padding:a}),kl({arrowWidth:R,arrowHeight:M}),v&&Sl({strategy:"referenceHidden",...L})]}),[S,W]=kr(O),X=Y(w);ae(()=>{F&&X?.()},[F,X]);const Q=A.arrow?.x,ne=A.arrow?.y,fe=A.arrow?.centerOffset!==0,[Qe,ge]=i.useState();return ae(()=>{x&&ge(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:F?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Qe,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Ol,{scope:n,placedSide:S,onArrowChange:E,arrowX:Q,arrowY:ne,shouldHideArrow:fe,children:p.jsx(I.div,{"data-side":S,"data-align":W,...m,ref:C,style:{...m.style,animation:F?void 0:"none"}})})})});Dr.displayName=Tn;var Nr="PopperArrow",Nl={top:"bottom",right:"left",bottom:"top",left:"right"},Ir=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=Dl(Nr,o),c=Nl[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Ml,{...r,ref:n,style:{...r.style,display:"block"}})})});Ir.displayName=Nr;function Il(e){return e!==null}var kl=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,c=r.arrow?.centerOffset!==0,a=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[l,u]=kr(n),f={start:"0%",center:"50%",end:"100%"}[u],v=(r.arrow?.x??0)+a/2,h=(r.arrow?.y??0)+d/2;let w="",m="";return l==="bottom"?(w=c?f:`${v}px`,m=`${-d}px`):l==="top"?(w=c?f:`${v}px`,m=`${o.floating.height+d}px`):l==="right"?(w=`${-d}px`,m=c?f:`${h}px`):l==="left"&&(w=`${o.floating.width+d}px`,m=c?f:`${h}px`),{data:{x:w,y:m}}}});function kr(e){const[t,n="center"]=e.split("-");return[t,n]}var Lr=Mr,jr=Or,Fr=Dr,$r=Ir,Vt="rovingFocusGroup.onEntryFocus",Ll={bubbles:!1,cancelable:!0},ze="RovingFocusGroup",[Zt,Br,jl]=gn(ze),[Fl,Wr]=de(ze,[jl]),[$l,Bl]=Fl(ze),Hr=i.forwardRef((e,t)=>p.jsx(Zt.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Zt.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Wl,{...e,ref:t})})}));Hr.displayName=ze;var Wl=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:d,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...f}=e,v=i.useRef(null),h=B(t,v),w=mr(s),[m,g]=Oe({prop:c,defaultProp:a??null,onChange:d,caller:ze}),[x,y]=i.useState(!1),C=Y(l),b=Br(n),E=i.useRef(!1),[T,R]=i.useState(0);return i.useEffect(()=>{const M=v.current;if(M)return M.addEventListener(Vt,C),()=>M.removeEventListener(Vt,C)},[C]),p.jsx($l,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:m,onItemFocus:i.useCallback(M=>g(M),[g]),onItemShiftTab:i.useCallback(()=>y(!0),[]),onFocusableItemAdd:i.useCallback(()=>R(M=>M+1),[]),onFocusableItemRemove:i.useCallback(()=>R(M=>M-1),[]),children:p.jsx(I.div,{tabIndex:x||T===0?-1:0,"data-orientation":o,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:_(e.onMouseDown,()=>{E.current=!0}),onFocus:_(e.onFocus,M=>{const N=!E.current;if(M.target===M.currentTarget&&N&&!x){const D=new CustomEvent(Vt,Ll);if(M.currentTarget.dispatchEvent(D),!D.defaultPrevented){const k=b().filter(O=>O.focusable),$=k.find(O=>O.active),L=k.find(O=>O.id===m),j=[$,L,...k].filter(Boolean).map(O=>O.ref.current);Ur(j,u)}}E.current=!1}),onBlur:_(e.onBlur,()=>y(!1))})})}),Vr="RovingFocusGroupItem",Kr=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:c,...a}=e,d=we(),l=s||d,u=Bl(Vr,n),f=u.currentTabStopId===l,v=Br(n),{onFocusableItemAdd:h,onFocusableItemRemove:w,currentTabStopId:m}=u;return i.useEffect(()=>{if(o)return h(),()=>w()},[o,h,w]),p.jsx(Zt.ItemSlot,{scope:n,id:l,focusable:o,active:r,children:p.jsx(I.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...a,ref:t,onMouseDown:_(e.onMouseDown,g=>{o?u.onItemFocus(l):g.preventDefault()}),onFocus:_(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:_(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const x=Kl(g,u.orientation,u.dir);if(x!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let C=v().filter(b=>b.focusable).map(b=>b.ref.current);if(x==="last")C.reverse();else if(x==="prev"||x==="next"){x==="prev"&&C.reverse();const b=C.indexOf(g.currentTarget);C=u.loop?Ul(C,b+1):C.slice(b+1)}setTimeout(()=>Ur(C))}}),children:typeof c=="function"?c({isCurrentTabStop:f,hasTabStop:m!=null}):c})})});Kr.displayName=Vr;var Hl={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Vl(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Kl(e,t,n){const o=Vl(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Hl[o]}function Ur(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Ul(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Gl=Hr,zl=Kr,Qt=["Enter"," "],Yl=["ArrowDown","PageUp","Home"],Gr=["ArrowUp","PageDown","End"],Xl=[...Yl,...Gr],ql={ltr:[...Qt,"ArrowRight"],rtl:[...Qt,"ArrowLeft"]},Zl={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ye="Menu",[Be,Ql,Jl]=gn(Ye),[Ce,zr]=de(Ye,[Jl,St,Wr]),Pt=St(),Yr=Wr(),[eu,be]=Ce(Ye),[tu,Xe]=Ce(Ye),Xr=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:c=!0}=e,a=Pt(t),[d,l]=i.useState(null),u=i.useRef(!1),f=Y(s),v=mr(r);return i.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),p.jsx(Lr,{...a,children:p.jsx(eu,{scope:t,open:n,onOpenChange:f,content:d,onContentChange:l,children:p.jsx(tu,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:v,modal:c,children:o})})})};Xr.displayName=Ye;var nu="MenuAnchor",Sn=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return p.jsx(jr,{...r,...o,ref:t})});Sn.displayName=nu;var Pn="MenuPortal",[ou,qr]=Ce(Pn,{forceMount:void 0}),Zr=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=be(Pn,t);return p.jsx(ou,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||s.open,children:p.jsx(Ue,{asChild:!0,container:r,children:o})})})};Zr.displayName=Pn;var q="MenuContent",[ru,_n]=Ce(q),Qr=i.forwardRef((e,t)=>{const n=qr(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=be(q,e.__scopeMenu),c=Xe(q,e.__scopeMenu);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||s.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:c.modal?p.jsx(su,{...r,ref:t}):p.jsx(iu,{...r,ref:t})})})})}),su=i.forwardRef((e,t)=>{const n=be(q,e.__scopeMenu),o=i.useRef(null),r=B(t,o);return i.useEffect(()=>{const s=o.current;if(s)return Qo(s)},[]),p.jsx(Mn,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),iu=i.forwardRef((e,t)=>{const n=be(q,e.__scopeMenu);return p.jsx(Mn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),cu=je("MenuContent.ScrollLock"),Mn=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:a,onEntryFocus:d,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,onDismiss:h,disableOutsideScroll:w,...m}=e,g=be(q,n),x=Xe(q,n),y=Pt(n),C=Yr(n),b=Ql(n),[E,T]=i.useState(null),R=i.useRef(null),M=B(t,R,g.onContentChange),N=i.useRef(0),D=i.useRef(""),k=i.useRef(0),$=i.useRef(null),L=i.useRef("right"),P=i.useRef(0),j=w?pn:i.Fragment,O=w?{as:cu,allowPinchZoom:!0}:void 0,F=S=>{const W=D.current+S,X=b().filter(H=>!H.disabled),Q=document.activeElement,ne=X.find(H=>H.ref.current===Q)?.textValue,fe=X.map(H=>H.textValue),Qe=xu(fe,W,ne),ge=X.find(H=>H.textValue===Qe)?.ref.current;(function H(Ie){D.current=Ie,window.clearTimeout(N.current),Ie!==""&&(N.current=window.setTimeout(()=>H(""),1e3))})(W),ge&&setTimeout(()=>ge.focus())};i.useEffect(()=>()=>window.clearTimeout(N.current),[]),Vo();const A=i.useCallback(S=>L.current===$.current?.side&&Cu(S,$.current?.area),[]);return p.jsx(ru,{scope:n,searchRef:D,onItemEnter:i.useCallback(S=>{A(S)&&S.preventDefault()},[A]),onItemLeave:i.useCallback(S=>{A(S)||(R.current?.focus(),T(null))},[A]),onTriggerLeave:i.useCallback(S=>{A(S)&&S.preventDefault()},[A]),pointerGraceTimerRef:k,onPointerGraceIntentChange:i.useCallback(S=>{$.current=S},[]),children:p.jsx(j,{...O,children:p.jsx(fn,{asChild:!0,trapped:r,onMountAutoFocus:_(s,S=>{S.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:p.jsx(Ke,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:v,onDismiss:h,children:p.jsx(Gl,{asChild:!0,...C,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:T,onEntryFocus:_(d,S=>{x.isUsingKeyboardRef.current||S.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Fr,{role:"menu","aria-orientation":"vertical","data-state":ms(g.open),"data-radix-menu-content":"",dir:x.dir,...y,...m,ref:M,style:{outline:"none",...m.style},onKeyDown:_(m.onKeyDown,S=>{const X=S.target.closest("[data-radix-menu-content]")===S.currentTarget,Q=S.ctrlKey||S.altKey||S.metaKey,ne=S.key.length===1;X&&(S.key==="Tab"&&S.preventDefault(),!Q&&ne&&F(S.key));const fe=R.current;if(S.target!==fe||!Xl.includes(S.key))return;S.preventDefault();const ge=b().filter(H=>!H.disabled).map(H=>H.ref.current);Gr.includes(S.key)&&ge.reverse(),gu(ge)}),onBlur:_(e.onBlur,S=>{S.currentTarget.contains(S.target)||(window.clearTimeout(N.current),D.current="")}),onPointerMove:_(e.onPointerMove,We(S=>{const W=S.target,X=P.current!==S.clientX;if(S.currentTarget.contains(W)&&X){const Q=S.clientX>P.current?"right":"left";L.current=Q,P.current=S.clientX}}))})})})})})})});Qr.displayName=q;var au="MenuGroup",An=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"group",...o,ref:t})});An.displayName=au;var lu="MenuLabel",Jr=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});Jr.displayName=lu;var ht="MenuItem",uo="menu.itemSelect",_t=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=i.useRef(null),c=Xe(ht,e.__scopeMenu),a=_n(ht,e.__scopeMenu),d=B(t,s),l=i.useRef(!1),u=()=>{const f=s.current;if(!n&&f){const v=new CustomEvent(uo,{bubbles:!0,cancelable:!0});f.addEventListener(uo,h=>o?.(h),{once:!0}),un(f,v),v.defaultPrevented?l.current=!1:c.onClose()}};return p.jsx(es,{...r,ref:d,disabled:n,onClick:_(e.onClick,u),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:_(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:_(e.onKeyDown,f=>{const v=a.searchRef.current!=="";n||v&&f.key===" "||Qt.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});_t.displayName=ht;var es=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,c=_n(ht,n),a=Yr(n),d=i.useRef(null),l=B(t,d),[u,f]=i.useState(!1),[v,h]=i.useState("");return i.useEffect(()=>{const w=d.current;w&&h((w.textContent??"").trim())},[s.children]),p.jsx(Be.ItemSlot,{scope:n,disabled:o,textValue:r??v,children:p.jsx(zl,{asChild:!0,...a,focusable:!o,children:p.jsx(I.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:l,onPointerMove:_(e.onPointerMove,We(w=>{o?c.onItemLeave(w):(c.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:_(e.onPointerLeave,We(w=>c.onItemLeave(w))),onFocus:_(e.onFocus,()=>f(!0)),onBlur:_(e.onBlur,()=>f(!1))})})})}),uu="MenuCheckboxItem",ts=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return p.jsx(is,{scope:e.__scopeMenu,checked:n,children:p.jsx(_t,{role:"menuitemcheckbox","aria-checked":gt(n)?"mixed":n,...r,ref:t,"data-state":Dn(n),onSelect:_(r.onSelect,()=>o?.(gt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ts.displayName=uu;var ns="MenuRadioGroup",[du,fu]=Ce(ns,{value:void 0,onValueChange:()=>{}}),os=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=Y(o);return p.jsx(du,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(An,{...r,ref:t})})});os.displayName=ns;var rs="MenuRadioItem",ss=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=fu(rs,e.__scopeMenu),s=n===r.value;return p.jsx(is,{scope:e.__scopeMenu,checked:s,children:p.jsx(_t,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":Dn(s),onSelect:_(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ss.displayName=rs;var On="MenuItemIndicator",[is,pu]=Ce(On,{checked:!1}),cs=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=pu(On,n);return p.jsx(Z,{present:o||gt(s.checked)||s.checked===!0,children:p.jsx(I.span,{...r,ref:t,"data-state":Dn(s.checked)})})});cs.displayName=On;var mu="MenuSeparator",as=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(I.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});as.displayName=mu;var vu="MenuArrow",ls=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Pt(n);return p.jsx($r,{...r,...o,ref:t})});ls.displayName=vu;var hu="MenuSub",[Ef,us]=Ce(hu),Le="MenuSubTrigger",ds=i.forwardRef((e,t)=>{const n=be(Le,e.__scopeMenu),o=Xe(Le,e.__scopeMenu),r=us(Le,e.__scopeMenu),s=_n(Le,e.__scopeMenu),c=i.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:d}=s,l={__scopeMenu:e.__scopeMenu},u=i.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return i.useEffect(()=>u,[u]),i.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),d(null)}},[a,d]),p.jsx(Sn,{asChild:!0,...l,children:p.jsx(es,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ms(n.open),...e,ref:wt(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:_(e.onPointerMove,We(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:_(e.onPointerLeave,We(f=>{u();const v=n.content?.getBoundingClientRect();if(v){const h=n.content?.dataset.side,w=h==="right",m=w?-5:5,g=v[w?"left":"right"],x=v[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+m,y:f.clientY},{x:g,y:v.top},{x,y:v.top},{x,y:v.bottom},{x:g,y:v.bottom}],side:h}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:_(e.onKeyDown,f=>{const v=s.searchRef.current!=="";e.disabled||v&&f.key===" "||ql[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ds.displayName=Le;var fs="MenuSubContent",ps=i.forwardRef((e,t)=>{const n=qr(q,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=be(q,e.__scopeMenu),c=Xe(q,e.__scopeMenu),a=us(fs,e.__scopeMenu),d=i.useRef(null),l=B(t,d);return p.jsx(Be.Provider,{scope:e.__scopeMenu,children:p.jsx(Z,{present:o||s.open,children:p.jsx(Be.Slot,{scope:e.__scopeMenu,children:p.jsx(Mn,{id:a.contentId,"aria-labelledby":a.triggerId,...r,ref:l,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{c.isUsingKeyboardRef.current&&d.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:_(e.onFocusOutside,u=>{u.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:_(e.onEscapeKeyDown,u=>{c.onClose(),u.preventDefault()}),onKeyDown:_(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),v=Zl[c.dir].includes(u.key);f&&v&&(s.onOpenChange(!1),a.trigger?.focus(),u.preventDefault())})})})})})});ps.displayName=fs;function ms(e){return e?"open":"closed"}function gt(e){return e==="indeterminate"}function Dn(e){return gt(e)?"indeterminate":e?"checked":"unchecked"}function gu(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function xu(e,t,n){const r=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let c=wu(e,Math.max(s,0));r.length===1&&(c=c.filter(l=>l!==n));const d=c.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return d!==n?d:void 0}function yu(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const a=t[s],d=t[c],l=a.x,u=a.y,f=d.x,v=d.y;u>o!=v>o&&n<(f-l)*(o-u)/(v-u)+l&&(r=!r)}return r}function Cu(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return yu(n,t)}function We(e){return t=>t.pointerType==="mouse"?e(t):void 0}var bu=Xr,Eu=Sn,Ru=Zr,Tu=Qr,Su=An,Pu=Jr,_u=_t,Mu=ts,Au=os,Ou=ss,Du=cs,Nu=as,Iu=ls,ku=ds,Lu=ps,Mt="DropdownMenu",[ju]=de(Mt,[zr]),U=zr(),[Fu,vs]=ju(Mt),hs=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:c,modal:a=!0}=e,d=U(t),l=i.useRef(null),[u,f]=Oe({prop:r,defaultProp:s??!1,onChange:c,caller:Mt});return p.jsx(Fu,{scope:t,triggerId:we(),triggerRef:l,contentId:we(),open:u,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(v=>!v),[f]),modal:a,children:p.jsx(bu,{...d,open:u,onOpenChange:f,dir:o,modal:a,children:n})})};hs.displayName=Mt;var gs="DropdownMenuTrigger",ws=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=vs(gs,n),c=U(n);return p.jsx(Eu,{asChild:!0,...c,children:p.jsx(I.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:wt(t,s.triggerRef),onPointerDown:_(e.onPointerDown,a=>{!o&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:_(e.onKeyDown,a=>{o||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});ws.displayName=gs;var $u="DropdownMenuPortal",xs=e=>{const{__scopeDropdownMenu:t,...n}=e,o=U(t);return p.jsx(Ru,{...o,...n})};xs.displayName=$u;var ys="DropdownMenuContent",Cs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=vs(ys,n),s=U(n),c=i.useRef(!1);return p.jsx(Tu,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:_(e.onCloseAutoFocus,a=>{c.current||r.triggerRef.current?.focus(),c.current=!1,a.preventDefault()}),onInteractOutside:_(e.onInteractOutside,a=>{const d=a.detail.originalEvent,l=d.button===0&&d.ctrlKey===!0,u=d.button===2||l;(!r.modal||u)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cs.displayName=ys;var Bu="DropdownMenuGroup",Wu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Su,{...r,...o,ref:t})});Wu.displayName=Bu;var Hu="DropdownMenuLabel",Vu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Pu,{...r,...o,ref:t})});Vu.displayName=Hu;var Ku="DropdownMenuItem",bs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(_u,{...r,...o,ref:t})});bs.displayName=Ku;var Uu="DropdownMenuCheckboxItem",Gu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Mu,{...r,...o,ref:t})});Gu.displayName=Uu;var zu="DropdownMenuRadioGroup",Yu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Au,{...r,...o,ref:t})});Yu.displayName=zu;var Xu="DropdownMenuRadioItem",qu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Ou,{...r,...o,ref:t})});qu.displayName=Xu;var Zu="DropdownMenuItemIndicator",Qu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Du,{...r,...o,ref:t})});Qu.displayName=Zu;var Ju="DropdownMenuSeparator",ed=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Nu,{...r,...o,ref:t})});ed.displayName=Ju;var td="DropdownMenuArrow",Es=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Iu,{...r,...o,ref:t})});Es.displayName=td;var nd="DropdownMenuSubTrigger",od=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(ku,{...r,...o,ref:t})});od.displayName=nd;var rd="DropdownMenuSubContent",sd=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=U(n);return p.jsx(Lu,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});sd.displayName=rd;var id=hs,cd=ws,ad=xs,ld=Cs,ud=bs,dd=Es;const fd="_menuButtonContent_boy14_1",pd="_menuButtonItem_boy14_10",md="_menuButtonArrow_boy14_42",Jt={menuButtonContent:fd,menuButtonItem:pd,menuButtonArrow:md},vd=({children:e,...t})=>p.jsxs(id,{modal:!1,...t,children:[p.jsx(cd,{asChild:!0,children:p.jsx(Ve,{"data-variant":"tertiary",iconOnly:!0,icon:"Menu"})}),p.jsx(ad,{children:p.jsxs(ld,{align:"end",className:Jt.menuButtonContent,sideOffset:5,children:[e,p.jsx(dd,{className:Jt.menuButtonArrow})]})})]}),hd=({children:e,...t})=>p.jsx(ud,{className:Jt.menuButtonItem,...t,children:e});var gd=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),wd="VisuallyHidden",At=i.forwardRef((e,t)=>p.jsx(I.span,{...e,ref:t,style:{...gd,...e.style}}));At.displayName=wd;var xd=At,Nn="ToastProvider",[In,yd,Cd]=gn("Toast"),[Rs]=de("Toast",[Cd]),[bd,Ot]=Rs(Nn),Ts=e=>{const{__scopeToast:t,label:n="Notification",duration:o=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:c}=e,[a,d]=i.useState(null),[l,u]=i.useState(0),f=i.useRef(!1),v=i.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Nn}\`. Expected non-empty \`string\`.`),p.jsx(In.Provider,{scope:t,children:p.jsx(bd,{scope:t,label:n,duration:o,swipeDirection:r,swipeThreshold:s,toastCount:l,viewport:a,onViewportChange:d,onToastAdd:i.useCallback(()=>u(h=>h+1),[]),onToastRemove:i.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:v,children:c})})};Ts.displayName=Nn;var Ss="ToastViewport",Ed=["F8"],en="toast.viewportPause",tn="toast.viewportResume",Ps=i.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:o=Ed,label:r="Notifications ({hotkey})",...s}=e,c=Ot(Ss,n),a=yd(n),d=i.useRef(null),l=i.useRef(null),u=i.useRef(null),f=i.useRef(null),v=B(t,f,c.onViewportChange),h=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=c.toastCount>0;i.useEffect(()=>{const g=x=>{o.length!==0&&o.every(C=>x[C]||x.code===C)&&f.current?.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[o]),i.useEffect(()=>{const g=d.current,x=f.current;if(w&&g&&x){const y=()=>{if(!c.isClosePausedRef.current){const T=new CustomEvent(en);x.dispatchEvent(T),c.isClosePausedRef.current=!0}},C=()=>{if(c.isClosePausedRef.current){const T=new CustomEvent(tn);x.dispatchEvent(T),c.isClosePausedRef.current=!1}},b=T=>{!g.contains(T.relatedTarget)&&C()},E=()=>{g.contains(document.activeElement)||C()};return g.addEventListener("focusin",y),g.addEventListener("focusout",b),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",E),window.addEventListener("blur",y),window.addEventListener("focus",C),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",b),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",E),window.removeEventListener("blur",y),window.removeEventListener("focus",C)}}},[w,c.isClosePausedRef]);const m=i.useCallback(({tabbingDirection:g})=>{const y=a().map(C=>{const b=C.ref.current,E=[b,...Ld(b)];return g==="forwards"?E:E.reverse()});return(g==="forwards"?y.reverse():y).flat()},[a]);return i.useEffect(()=>{const g=f.current;if(g){const x=y=>{const C=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!C){const E=document.activeElement,T=y.shiftKey;if(y.target===g&&T){l.current?.focus();return}const N=m({tabbingDirection:T?"backwards":"forwards"}),D=N.findIndex(k=>k===E);Kt(N.slice(D+1))?y.preventDefault():T?l.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",x),()=>g.removeEventListener("keydown",x)}},[a,m]),p.jsxs(tc,{ref:d,role:"region","aria-label":r.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&p.jsx(nn,{ref:l,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"forwards"});Kt(g)}}),p.jsx(In.Slot,{scope:n,children:p.jsx(I.ol,{tabIndex:-1,...s,ref:v})}),w&&p.jsx(nn,{ref:u,onFocusFromOutsideViewport:()=>{const g=m({tabbingDirection:"backwards"});Kt(g)}})]})});Ps.displayName=Ss;var _s="ToastFocusProxy",nn=i.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:o,...r}=e,s=Ot(_s,n);return p.jsx(At,{tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:c=>{const a=c.relatedTarget;!s.viewport?.contains(a)&&o()}})});nn.displayName=_s;var qe="Toast",Rd="toast.swipeStart",Td="toast.swipeMove",Sd="toast.swipeCancel",Pd="toast.swipeEnd",Ms=i.forwardRef((e,t)=>{const{forceMount:n,open:o,defaultOpen:r,onOpenChange:s,...c}=e,[a,d]=Oe({prop:o,defaultProp:r??!0,onChange:s,caller:qe});return p.jsx(Z,{present:n||a,children:p.jsx(Ad,{open:a,...c,ref:t,onClose:()=>d(!1),onPause:Y(e.onPause),onResume:Y(e.onResume),onSwipeStart:_(e.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:_(e.onSwipeMove,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:_(e.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:_(e.onSwipeEnd,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),d(!1)})})})});Ms.displayName=qe;var[_d,Md]=Rs(qe,{onClose(){}}),Ad=i.forwardRef((e,t)=>{const{__scopeToast:n,type:o="foreground",duration:r,open:s,onClose:c,onEscapeKeyDown:a,onPause:d,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:v,onSwipeEnd:h,...w}=e,m=Ot(qe,n),[g,x]=i.useState(null),y=B(t,P=>x(P)),C=i.useRef(null),b=i.useRef(null),E=r||m.duration,T=i.useRef(0),R=i.useRef(E),M=i.useRef(0),{onToastAdd:N,onToastRemove:D}=m,k=Y(()=>{g?.contains(document.activeElement)&&m.viewport?.focus(),c()}),$=i.useCallback(P=>{!P||P===1/0||(window.clearTimeout(M.current),T.current=new Date().getTime(),M.current=window.setTimeout(k,P))},[k]);i.useEffect(()=>{const P=m.viewport;if(P){const j=()=>{$(R.current),l?.()},O=()=>{const F=new Date().getTime()-T.current;R.current=R.current-F,window.clearTimeout(M.current),d?.()};return P.addEventListener(en,O),P.addEventListener(tn,j),()=>{P.removeEventListener(en,O),P.removeEventListener(tn,j)}}},[m.viewport,E,d,l,$]),i.useEffect(()=>{s&&!m.isClosePausedRef.current&&$(E)},[s,E,m.isClosePausedRef,$]),i.useEffect(()=>(N(),()=>D()),[N,D]);const L=i.useMemo(()=>g?Ls(g):null,[g]);return m.viewport?p.jsxs(p.Fragment,{children:[L&&p.jsx(Od,{__scopeToast:n,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:L}),p.jsx(_d,{scope:n,onClose:k,children:sn.createPortal(p.jsx(In.ItemSlot,{scope:n,children:p.jsx(ec,{asChild:!0,onEscapeKeyDown:_(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||k(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(I.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...w,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:_(e.onKeyDown,P=>{P.key==="Escape"&&(a?.(P.nativeEvent),P.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,k()))}),onPointerDown:_(e.onPointerDown,P=>{P.button===0&&(C.current={x:P.clientX,y:P.clientY})}),onPointerMove:_(e.onPointerMove,P=>{if(!C.current)return;const j=P.clientX-C.current.x,O=P.clientY-C.current.y,F=!!b.current,A=["left","right"].includes(m.swipeDirection),S=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,W=A?S(0,j):0,X=A?0:S(0,O),Q=P.pointerType==="touch"?10:2,ne={x:W,y:X},fe={originalEvent:P,delta:ne};F?(b.current=ne,ct(Td,f,fe,{discrete:!1})):fo(ne,m.swipeDirection,Q)?(b.current=ne,ct(Rd,u,fe,{discrete:!1}),P.target.setPointerCapture(P.pointerId)):(Math.abs(j)>Q||Math.abs(O)>Q)&&(C.current=null)}),onPointerUp:_(e.onPointerUp,P=>{const j=b.current,O=P.target;if(O.hasPointerCapture(P.pointerId)&&O.releasePointerCapture(P.pointerId),b.current=null,C.current=null,j){const F=P.currentTarget,A={originalEvent:P,delta:j};fo(j,m.swipeDirection,m.swipeThreshold)?ct(Pd,h,A,{discrete:!0}):ct(Sd,v,A,{discrete:!0}),F.addEventListener("click",S=>S.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Od=e=>{const{__scopeToast:t,children:n,...o}=e,r=Ot(qe,t),[s,c]=i.useState(!1),[a,d]=i.useState(!1);return Id(()=>c(!0)),i.useEffect(()=>{const l=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:p.jsx(Ue,{asChild:!0,children:p.jsx(At,{...o,children:s&&p.jsxs(p.Fragment,{children:[r.label," ",n]})})})},Dd="ToastTitle",As=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});As.displayName=Dd;var Nd="ToastDescription",Os=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e;return p.jsx(I.div,{...o,ref:t})});Os.displayName=Nd;var Ds="ToastAction",Ns=i.forwardRef((e,t)=>{const{altText:n,...o}=e;return n.trim()?p.jsx(ks,{altText:n,asChild:!0,children:p.jsx(kn,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ds}\`. Expected non-empty \`string\`.`),null)});Ns.displayName=Ds;var Is="ToastClose",kn=i.forwardRef((e,t)=>{const{__scopeToast:n,...o}=e,r=Md(Is,n);return p.jsx(ks,{asChild:!0,children:p.jsx(I.button,{type:"button",...o,ref:t,onClick:_(e.onClick,r.onClose)})})});kn.displayName=Is;var ks=i.forwardRef((e,t)=>{const{__scopeToast:n,altText:o,...r}=e;return p.jsx(I.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...r,ref:t})});function Ls(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),kd(o)){const r=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const c=o.dataset.radixToastAnnounceAlt;c&&t.push(c)}else t.push(...Ls(o))}}),t}function ct(e,t,n,{discrete:o}){const r=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?un(r,s):r.dispatchEvent(s)}var fo=(e,t,n=0)=>{const o=Math.abs(e.x),r=Math.abs(e.y),s=o>r;return t==="left"||t==="right"?s&&o>n:!s&&r>n};function Id(e=()=>{}){const t=Y(e);ae(()=>{let n=0,o=0;return n=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(o)}},[t])}function kd(e){return e.nodeType===e.ELEMENT_NODE}function Ld(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kt(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var jd=Ts,Fd=Ps,$d=Ms,Bd=As,Wd=Os,Hd=Ns,Vd=kn;const Kd="_toast_7o27j_1",Ud="_toastContent_7o27j_12",Gd="_toastViewport_7o27j_70",zd="_toastTitle_7o27j_89",Yd="_toastDescription_7o27j_95",Se={toast:Kd,toastContent:Ud,toastViewport:Gd,toastTitle:zd,toastDescription:Yd},Xd=({...e})=>p.jsx(jd,{...e}),js=K.forwardRef(({...e},t)=>p.jsx(Fd,{className:Se.toastViewport,ref:t,...e}));js.displayName="ToastViewport";const Fs=K.forwardRef(({toastTitle:e,toastDescription:t,toastAction:n,...o},r)=>p.jsxs($d,{className:Se.toast,ref:r,...o,children:[p.jsxs("div",{className:Se.toastContent,children:[p.jsx(Bd,{className:Se.toastTitle,children:e}),t&&p.jsx(Wd,{className:Se.toastDescription,children:t})]}),n&&p.jsx(Hd,{className:Se.toastAction,asChild:!0,altText:"Toast action",children:n}),p.jsx(Vd,{asChild:!0,children:p.jsx(Ve,{variant:"tertiary",iconOnly:!0,icon:"Close"})})]}));Fs.displayName="Toast";var[Dt]=de("Tooltip",[St]),Nt=St(),$s="TooltipProvider",qd=700,on="tooltip.open",[Zd,Ln]=Dt($s),Bs=e=>{const{__scopeTooltip:t,delayDuration:n=qd,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,c=i.useRef(!0),a=i.useRef(!1),d=i.useRef(0);return i.useEffect(()=>{const l=d.current;return()=>window.clearTimeout(l)},[]),p.jsx(Zd,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(d.current),c.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>c.current=!0,o)},[o]),isPointerInTransitRef:a,onPointerInTransitChange:i.useCallback(l=>{a.current=l},[]),disableHoverableContent:r,children:s})};Bs.displayName=$s;var He="Tooltip",[Qd,Ze]=Dt(He),Ws=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:c,delayDuration:a}=e,d=Ln(He,e.__scopeTooltip),l=Nt(t),[u,f]=i.useState(null),v=we(),h=i.useRef(0),w=c??d.disableHoverableContent,m=a??d.delayDuration,g=i.useRef(!1),[x,y]=Oe({prop:o,defaultProp:r??!1,onChange:R=>{R?(d.onOpen(),document.dispatchEvent(new CustomEvent(on))):d.onClose(),s?.(R)},caller:He}),C=i.useMemo(()=>x?g.current?"delayed-open":"instant-open":"closed",[x]),b=i.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,y(!0)},[y]),E=i.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y(!1)},[y]),T=i.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,y(!0),h.current=0},m)},[m,y]);return i.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),p.jsx(Lr,{...l,children:p.jsx(Qd,{scope:t,contentId:v,open:x,stateAttribute:C,trigger:u,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{d.isOpenDelayedRef.current?T():b()},[d.isOpenDelayedRef,T,b]),onTriggerLeave:i.useCallback(()=>{w?E():(window.clearTimeout(h.current),h.current=0)},[E,w]),onOpen:b,onClose:E,disableHoverableContent:w,children:n})})};Ws.displayName=He;var rn="TooltipTrigger",Hs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Ze(rn,n),s=Ln(rn,n),c=Nt(n),a=i.useRef(null),d=B(t,a,r.onTriggerChange),l=i.useRef(!1),u=i.useRef(!1),f=i.useCallback(()=>l.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(jr,{asChild:!0,...c,children:p.jsx(I.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:d,onPointerMove:_(e.onPointerMove,v=>{v.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:_(e.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:_(e.onPointerDown,()=>{r.open&&r.onClose(),l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:_(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:_(e.onBlur,r.onClose),onClick:_(e.onClick,r.onClose)})})});Hs.displayName=rn;var jn="TooltipPortal",[Jd,ef]=Dt(jn,{forceMount:void 0}),Vs=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=Ze(jn,t);return p.jsx(Jd,{scope:t,forceMount:n,children:p.jsx(Z,{present:n||s.open,children:p.jsx(Ue,{asChild:!0,container:r,children:o})})})};Vs.displayName=jn;var Ae="TooltipContent",Ks=i.forwardRef((e,t)=>{const n=ef(Ae,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,c=Ze(Ae,e.__scopeTooltip);return p.jsx(Z,{present:o||c.open,children:c.disableHoverableContent?p.jsx(Us,{side:r,...s,ref:t}):p.jsx(tf,{side:r,...s,ref:t})})}),tf=i.forwardRef((e,t)=>{const n=Ze(Ae,e.__scopeTooltip),o=Ln(Ae,e.__scopeTooltip),r=i.useRef(null),s=B(t,r),[c,a]=i.useState(null),{trigger:d,onClose:l}=n,u=r.current,{onPointerInTransitChange:f}=o,v=i.useCallback(()=>{a(null),f(!1)},[f]),h=i.useCallback((w,m)=>{const g=w.currentTarget,x={x:w.clientX,y:w.clientY},y=sf(x,g.getBoundingClientRect()),C=cf(x,y),b=af(m.getBoundingClientRect()),E=uf([...C,...b]);a(E),f(!0)},[f]);return i.useEffect(()=>()=>v(),[v]),i.useEffect(()=>{if(d&&u){const w=g=>h(g,u),m=g=>h(g,d);return d.addEventListener("pointerleave",w),u.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",m)}}},[d,u,h,v]),i.useEffect(()=>{if(c){const w=m=>{const g=m.target,x={x:m.clientX,y:m.clientY},y=d?.contains(g)||u?.contains(g),C=!lf(x,c);y?v():C&&(v(),l())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[d,u,c,l,v]),p.jsx(Us,{...e,ref:s})}),[nf,of]=Dt(He,{isInside:!1}),rf=Ai("TooltipContent"),Us=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:c,...a}=e,d=Ze(Ae,n),l=Nt(n),{onClose:u}=d;return i.useEffect(()=>(document.addEventListener(on,u),()=>document.removeEventListener(on,u)),[u]),i.useEffect(()=>{if(d.trigger){const f=v=>{v.target?.contains(d.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[d.trigger,u]),p.jsx(Ke,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:p.jsxs(Fr,{"data-state":d.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(rf,{children:o}),p.jsx(nf,{scope:n,isInside:!0,children:p.jsx(xd,{id:d.contentId,role:"tooltip",children:r||o})})]})})});Ks.displayName=Ae;var Gs="TooltipArrow",zs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Nt(n);return of(Gs,n).isInside?null:p.jsx($r,{...r,...o,ref:t})});zs.displayName=Gs;function sf(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function cf(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function af(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function lf(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,c=t.length-1;s<t.length;c=s++){const a=t[s],d=t[c],l=a.x,u=a.y,f=d.x,v=d.y;u>o!=v>o&&n<(f-l)*(o-u)/(v-u)+l&&(r=!r)}return r}function uf(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),df(t)}function df(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],c=t[t.length-2];if((s.x-c.x)*(r.y-c.y)>=(s.y-c.y)*(r.x-c.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(r.y-c.y)>=(s.y-c.y)*(r.x-c.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var ff=Bs,pf=Ws,mf=Hs,vf=Vs,hf=Ks,gf=zs;const wf="_tooltipContent_4rdhp_1",xf="_tooltipArrow_4rdhp_12",po={tooltipContent:wf,tooltipArrow:xf},yf=({...e})=>p.jsx(ff,{...e});function Cf({children:e,content:t,open:n,defaultOpen:o,onOpenChange:r,...s}){return t===void 0?p.jsx(p.Fragment,{children:e}):p.jsxs(pf,{open:n,defaultOpen:o,onOpenChange:c=>{r?.(c)},disableHoverableContent:!0,delayDuration:200,children:[p.jsx(mf,{asChild:!0,children:e}),p.jsx(vf,{children:p.jsxs(hf,{className:po.tooltipContent,...s,sideOffset:4,children:[t,p.jsx(gf,{className:po.tooltipArrow})]})})]})}exports.ArrowLeft=ho;exports.ArrowRight=go;exports.Button=Ve;exports.Check=cn;exports.Checkbox=Ki;exports.Circle=wo;exports.Close=an;exports.Dialog=ha;exports.ExternalLink=xo;exports.Gear=yo;exports.Hammer=Co;exports.Heart=bo;exports.IconMap=Ut;exports.Kebab=Eo;exports.Lightning=Ro;exports.Mail=To;exports.Menu=So;exports.MenuButton=vd;exports.MenuButtonItem=hd;exports.NoMobile=Po;exports.Pencil=_o;exports.Spinner=ln;exports.Toast=Fs;exports.ToastProvider=Xd;exports.ToastViewport=js;exports.Tooltip=Cf;exports.TooltipProvider=yf;exports.createIcon=V;exports.iconSizes=gi;
|