@theaiplatform/miniapp-sdk 0.1.0-dev.5264044 → 0.1.0-dev.e198ea6

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/ui.js ADDED
@@ -0,0 +1,1852 @@
1
+ import { cva } from "class-variance-authority";
2
+ import { clsx } from "clsx";
3
+ import { twMerge } from "tailwind-merge";
4
+ import { Slot } from "@radix-ui/react-slot";
5
+ import { Check, CheckIcon, ChevronDown, ChevronUp, Circle, CopyIcon, GripVertical, X, XIcon } from "lucide-react";
6
+ import { Highlight, themes } from "prism-react-renderer";
7
+ import { composeRefs } from "@radix-ui/react-compose-refs";
8
+ import { useCallback, useEffect, useRef } from "react";
9
+ import { Group, Panel, Separator as external_react_resizable_panels_Separator } from "react-resizable-panels";
10
+ import * as __rspack_external_react from "react";
11
+ import * as __rspack_external__radix_ui_react_alert_dialog_df21c073 from "@radix-ui/react-alert-dialog";
12
+ import * as __rspack_external__radix_ui_react_separator_c79cca86 from "@radix-ui/react-separator";
13
+ import * as __rspack_external__radix_ui_react_checkbox_76182ac8 from "@radix-ui/react-checkbox";
14
+ import * as __rspack_external__radix_ui_react_dialog_dabd8325 from "@radix-ui/react-dialog";
15
+ import * as __rspack_external__radix_ui_react_label_73c6aeea from "@radix-ui/react-label";
16
+ import * as __rspack_external__radix_ui_react_tooltip_b301f25d from "@radix-ui/react-tooltip";
17
+ import * as __rspack_external__radix_ui_react_progress_67feda0a from "@radix-ui/react-progress";
18
+ import * as __rspack_external__radix_ui_react_radio_group_295a43fb from "@radix-ui/react-radio-group";
19
+ import * as __rspack_external__radix_ui_react_scroll_area_bdec1136 from "@radix-ui/react-scroll-area";
20
+ import * as __rspack_external__radix_ui_react_select_4606f4d3 from "@radix-ui/react-select";
21
+ import * as __rspack_external__radix_ui_react_slider_302f41eb from "@radix-ui/react-slider";
22
+ import * as __rspack_external__radix_ui_react_tabs_62268d7a from "@radix-ui/react-tabs";
23
+ import * as __rspack_external__radix_ui_react_toggle_f6d72b6a from "@radix-ui/react-toggle";
24
+ import * as __rspack_external__radix_ui_react_toggle_group_1cb63752 from "@radix-ui/react-toggle-group";
25
+ function cn(...inputs) {
26
+ return twMerge(clsx(inputs));
27
+ }
28
+ const headingVariants = cva('font-semibold', {
29
+ defaultVariants: {
30
+ level: 'h1'
31
+ },
32
+ variants: {
33
+ level: {
34
+ h1: 'text-4xl leading-11 font-bold tracking-[-0.025em]',
35
+ h2: 'text-3xl leading-11 font-bold tracking-[-0.025em]',
36
+ h3: 'text-2xl leading-8 font-semibold tracking-[-0.025em]',
37
+ h4: 'text-xl leading-7 font-semibold tracking-[-0.025em]',
38
+ h5: 'text-lg leading-7 font-semibold',
39
+ h6: 'text-base leading-6 font-semibold'
40
+ }
41
+ }
42
+ });
43
+ const headingSizeOverrides = {
44
+ sm: 'text-sm leading-tight font-semibold tracking-normal'
45
+ };
46
+ function H1({ asChild = false, className, ...props }) {
47
+ return /*#__PURE__*/ __rspack_external_react.createElement(Heading, {
48
+ asChild: asChild,
49
+ className: className,
50
+ level: "h1",
51
+ ...props
52
+ });
53
+ }
54
+ function H2({ asChild = false, className, ...props }) {
55
+ return /*#__PURE__*/ __rspack_external_react.createElement(Heading, {
56
+ asChild: asChild,
57
+ className: className,
58
+ level: "h2",
59
+ ...props
60
+ });
61
+ }
62
+ function H3({ asChild = false, className, ...props }) {
63
+ return /*#__PURE__*/ __rspack_external_react.createElement(Heading, {
64
+ asChild: asChild,
65
+ className: className,
66
+ level: "h3",
67
+ ...props
68
+ });
69
+ }
70
+ function H4({ asChild = false, className, ...props }) {
71
+ return /*#__PURE__*/ __rspack_external_react.createElement(Heading, {
72
+ asChild: asChild,
73
+ className: className,
74
+ level: "h4",
75
+ ...props
76
+ });
77
+ }
78
+ const H5 = /*#__PURE__*/ __rspack_external_react.forwardRef(({ asChild = false, className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement(Heading, {
79
+ ref: ref,
80
+ asChild: asChild,
81
+ className: className,
82
+ level: "h5",
83
+ ...props
84
+ }));
85
+ H5.displayName = 'H5';
86
+ function H6({ asChild = false, className, ...props }) {
87
+ return /*#__PURE__*/ __rspack_external_react.createElement(Heading, {
88
+ asChild: asChild,
89
+ className: className,
90
+ level: "h6",
91
+ ...props
92
+ });
93
+ }
94
+ const Heading = /*#__PURE__*/ __rspack_external_react.forwardRef(({ asChild = false, className, level = 'h1', size, ...props }, ref)=>{
95
+ const Component = asChild ? Slot : level ?? 'h1';
96
+ return /*#__PURE__*/ __rspack_external_react.createElement(Component, {
97
+ ref: ref,
98
+ className: cn(headingVariants({
99
+ level
100
+ }), size && headingSizeOverrides[size], className),
101
+ ...props
102
+ });
103
+ });
104
+ Heading.displayName = 'Heading';
105
+ const alertVariants = cva('relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground', {
106
+ variants: {
107
+ variant: {
108
+ default: 'bg-background text-foreground',
109
+ info: 'border-info/50 bg-info/10 text-info-accent-foreground [&>svg]:text-info',
110
+ destructive: 'border-destructive/50 bg-destructive/10 text-destructive [&>svg]:text-destructive',
111
+ warning: 'border-warning/50 bg-warning/10 text-warning-accent-foreground [&>svg]:text-warning',
112
+ success: 'border-success/50 bg-success/10 text-success-accent-foreground [&>svg]:text-success'
113
+ }
114
+ },
115
+ defaultVariants: {
116
+ variant: 'default'
117
+ }
118
+ });
119
+ function Alert({ className, variant, ref, ...props }) {
120
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
121
+ ref: ref,
122
+ role: "alert",
123
+ className: cn(alertVariants({
124
+ variant
125
+ }), className),
126
+ ...props
127
+ });
128
+ }
129
+ Alert.displayName = 'Alert';
130
+ const AlertTitle = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement(Heading, {
131
+ ref: ref,
132
+ level: "h5",
133
+ className: cn('mb-1 leading-none font-medium', className),
134
+ ...props
135
+ }));
136
+ AlertTitle.displayName = 'AlertTitle';
137
+ function AlertDescription({ className, ref, ...props }) {
138
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
139
+ ref: ref,
140
+ className: cn('text-sm [&_p]:leading-relaxed', className),
141
+ ...props
142
+ });
143
+ }
144
+ AlertDescription.displayName = "AlertDescription";
145
+ const NativeViewOcclusionContext = /*#__PURE__*/ __rspack_external_react.createContext(null);
146
+ function NativeViewOcclusionProvider({ adapter, children }) {
147
+ return /*#__PURE__*/ __rspack_external_react.createElement(NativeViewOcclusionContext.Provider, {
148
+ value: adapter
149
+ }, children);
150
+ }
151
+ let nextClaimId = 0;
152
+ function useNativeViewOcclusion({ enabled = true } = {}) {
153
+ const adapter = __rspack_external_react.useContext(NativeViewOcclusionContext);
154
+ const [element, setElement] = __rspack_external_react.useState(null);
155
+ const [ready, setReady] = __rspack_external_react.useState(!enabled || null === adapter);
156
+ const claimIdRef = __rspack_external_react.useRef(null);
157
+ if (null === claimIdRef.current) {
158
+ nextClaimId += 1;
159
+ claimIdRef.current = `native-view-occlusion-${nextClaimId}`;
160
+ }
161
+ const ref = __rspack_external_react.useCallback((node)=>{
162
+ setElement(node);
163
+ }, []);
164
+ __rspack_external_react.useEffect(()=>{
165
+ if (!enabled || null === adapter) return void setReady(true);
166
+ if (null === element) return void setReady(false);
167
+ setReady(false);
168
+ let cancelled = false;
169
+ let release = null;
170
+ const claimId = claimIdRef.current;
171
+ if (null === claimId) return;
172
+ const rafId = requestAnimationFrame(()=>{
173
+ Promise.resolve(adapter.acquire(element, claimId)).then((acquiredRelease)=>{
174
+ if (cancelled) return void acquiredRelease();
175
+ release = acquiredRelease;
176
+ setReady(true);
177
+ }, ()=>void 0);
178
+ });
179
+ return ()=>{
180
+ cancelled = true;
181
+ cancelAnimationFrame(rafId);
182
+ release?.();
183
+ };
184
+ }, [
185
+ adapter,
186
+ element,
187
+ enabled
188
+ ]);
189
+ return {
190
+ ref,
191
+ ready
192
+ };
193
+ }
194
+ const buttonVariants = cva('inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium outline-none transition-[box-shadow,background-color,border-color,color] duration-200 focus-visible:outline-none focus-visible:shadow-input-focus disabled:pointer-events-none disabled:opacity-50 cursor-pointer [&_svg]:pointer-events-none [&_svg:not([width])]:size-4 [&_svg]:shrink-0 [&_svg]:text-current', {
195
+ variants: {
196
+ variant: {
197
+ default: 'btn-primary-shine bg-primary text-primary-foreground shadow-(--shadow-button-primary) hover:bg-primary-hover active:bg-primary active:shadow-none',
198
+ destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive-hover shadow-sm hover:shadow-md active:bg-destructive/90',
199
+ outline: 'shadow-(--shadow-button-outline) bg-background hover:shadow-(--shadow-button-outline-hover) hover:bg-accent hover:text-accent-foreground active:bg-accent/90',
200
+ secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary-hover shadow-(--shadow-button-secondary) hover:shadow-(--shadow-button-secondary-hover) active:bg-secondary/90',
201
+ tertiary: 'bg-button-tertiary-default text-foreground hover:bg-button-tertiary-hover active:bg-button-tertiary-hover/90',
202
+ ghost: 'bg-button-borderless-default hover:bg-button-borderless-hover active:bg-button-borderless-hover',
203
+ link: 'text-primary underline-offset-4 hover:underline'
204
+ },
205
+ size: {
206
+ default: 'h-10 px-3 py-2.5 rounded-lg',
207
+ sm: 'h-9 px-3 rounded-lg',
208
+ compact: 'h-8 px-3 rounded-lg',
209
+ lg: 'h-11 px-8 rounded-lg',
210
+ icon: 'h-10 w-10 rounded-lg',
211
+ 'icon-md': 'h-9 w-9 rounded-lg',
212
+ 'icon-sm': 'h-8 w-8 rounded-lg',
213
+ 'icon-xs': 'h-6 w-6 rounded-lg'
214
+ },
215
+ shape: {
216
+ default: '',
217
+ pill: 'rounded-full'
218
+ }
219
+ },
220
+ defaultVariants: {
221
+ variant: 'default',
222
+ size: 'default',
223
+ shape: 'default'
224
+ },
225
+ compoundVariants: [
226
+ {
227
+ variant: 'ghost',
228
+ size: [
229
+ 'icon',
230
+ 'icon-md'
231
+ ],
232
+ className: 'text-foreground opacity-65 hover:opacity-100'
233
+ }
234
+ ]
235
+ });
236
+ function Button({ className, variant, size, shape, asChild = false, ref, ...props }) {
237
+ const Comp = asChild ? Slot : 'button';
238
+ return /*#__PURE__*/ __rspack_external_react.createElement(Comp, {
239
+ className: cn(buttonVariants({
240
+ variant,
241
+ size,
242
+ shape
243
+ }), className),
244
+ ref: ref,
245
+ ...props
246
+ });
247
+ }
248
+ Button.displayName = 'Button';
249
+ const DIALOG_FOOTER_ATTRIBUTE = 'data-dialog-footer';
250
+ const DIALOG_PRIMARY_ACTION_ATTRIBUTE = 'data-dialog-primary-action';
251
+ const DIALOG_CANCEL_ACTION_ATTRIBUTE = 'data-dialog-cancel-action';
252
+ const DIALOG_FIELD_SELECTOR = 'input:not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]),select,textarea,[contenteditable="true"],[role="textbox"]';
253
+ const DIALOG_PRIMARY_ACTION_SELECTOR = [
254
+ `[${DIALOG_PRIMARY_ACTION_ATTRIBUTE}]:not([${DIALOG_PRIMARY_ACTION_ATTRIBUTE}="false"])`
255
+ ].join(',');
256
+ const DIALOG_SUBMIT_ACTION_SELECTOR = 'button[type="submit"],input[type="submit"]';
257
+ const DIALOG_FOOTER_ACTION_SELECTOR = 'button,a[href],input:not([type="hidden"]),select,textarea,[role="button"],[tabindex]:not([tabindex="-1"])';
258
+ function pickDialogDefaultFocusTarget({ footerActions, formFields, primaryActions, submitActions }) {
259
+ const firstFormField = formFields.find((candidate)=>!candidate.disabled);
260
+ if (firstFormField) return firstFormField.element;
261
+ if (primaryActions.length > 0) return primaryActions.find((candidate)=>!candidate.disabled)?.element ?? null;
262
+ if (submitActions.length > 0) return submitActions.find((candidate)=>!candidate.disabled)?.element ?? null;
263
+ const lastFooterAction = footerActions.at(-1);
264
+ if (!lastFooterAction || lastFooterAction.disabled || lastFooterAction.isCancel) return null;
265
+ return lastFooterAction.element;
266
+ }
267
+ function hasHiddenAncestor(element) {
268
+ let current = element;
269
+ while(current){
270
+ if (current.hidden || 'true' === current.getAttribute('aria-hidden')) return true;
271
+ current = current.parentElement;
272
+ }
273
+ return false;
274
+ }
275
+ function isElementVisible(element) {
276
+ if (hasHiddenAncestor(element)) return false;
277
+ const computedStyle = element.ownerDocument.defaultView?.getComputedStyle(element);
278
+ return computedStyle?.display !== 'none' && computedStyle?.visibility !== 'hidden' && computedStyle?.visibility !== 'collapse';
279
+ }
280
+ function isDisabledElement(element) {
281
+ return element.matches(':disabled') || 'true' === element.getAttribute('aria-disabled') || 'true' === element.getAttribute('data-disabled');
282
+ }
283
+ function toFocusCandidate(element) {
284
+ return {
285
+ disabled: isDisabledElement(element) || !isElementVisible(element),
286
+ element,
287
+ isCancel: element.matches(`[${DIALOG_CANCEL_ACTION_ATTRIBUTE}]`)
288
+ };
289
+ }
290
+ function queryFocusCandidates(root, selector) {
291
+ return Array.from(root.querySelectorAll(selector)).map(toFocusCandidate);
292
+ }
293
+ function isHtmlElement(value) {
294
+ return "u" > typeof HTMLElement && value instanceof HTMLElement;
295
+ }
296
+ function getDialogDefaultFocusTarget(content) {
297
+ const footers = Array.from(content.querySelectorAll(`[${DIALOG_FOOTER_ATTRIBUTE}]`));
298
+ const lastFooter = footers.at(-1);
299
+ return pickDialogDefaultFocusTarget({
300
+ footerActions: lastFooter ? queryFocusCandidates(lastFooter, DIALOG_FOOTER_ACTION_SELECTOR) : [],
301
+ formFields: queryFocusCandidates(content, DIALOG_FIELD_SELECTOR),
302
+ primaryActions: queryFocusCandidates(content, DIALOG_PRIMARY_ACTION_SELECTOR),
303
+ submitActions: queryFocusCandidates(content, DIALOG_SUBMIT_ACTION_SELECTOR)
304
+ });
305
+ }
306
+ function focusDialogDefaultTarget(content) {
307
+ const focusTarget = getDialogDefaultFocusTarget(content);
308
+ if (!focusTarget) return false;
309
+ requestAnimationFrame(()=>{
310
+ if (focusTarget.isConnected) focusTarget.focus({
311
+ preventScroll: true
312
+ });
313
+ });
314
+ return true;
315
+ }
316
+ function shouldFlushQueuedDialogDefaultFocus({ contentAvailable, ready, shouldFocus }) {
317
+ return ready && shouldFocus && contentAvailable;
318
+ }
319
+ function flushQueuedDialogDefaultFocus({ content, ready, shouldFocus }) {
320
+ if (!shouldFlushQueuedDialogDefaultFocus({
321
+ contentAvailable: null !== content,
322
+ ready,
323
+ shouldFocus
324
+ }) || !content) return false;
325
+ focusDialogDefaultTarget(content);
326
+ return true;
327
+ }
328
+ function shouldQueueDialogDefaultFocus(event, onOpenAutoFocus) {
329
+ onOpenAutoFocus?.(event);
330
+ if (event.defaultPrevented) return false;
331
+ event.preventDefault();
332
+ return true;
333
+ }
334
+ function handleDialogOpenAutoFocus(event, onOpenAutoFocus) {
335
+ if (!shouldQueueDialogDefaultFocus(event, onOpenAutoFocus)) return;
336
+ const content = event.currentTarget;
337
+ if (isHtmlElement(content)) focusDialogDefaultTarget(content);
338
+ }
339
+ const AlertDialog = __rspack_external__radix_ui_react_alert_dialog_df21c073.Root;
340
+ const AlertDialogTrigger = __rspack_external__radix_ui_react_alert_dialog_df21c073.Trigger;
341
+ const AlertDialogPortal = __rspack_external__radix_ui_react_alert_dialog_df21c073.Portal;
342
+ function AlertDialogOverlay({ className, ref, ...props }) {
343
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_alert_dialog_df21c073.Overlay, {
344
+ ref: ref,
345
+ className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-(--z-modal) bg-black/50', className),
346
+ ...props
347
+ });
348
+ }
349
+ AlertDialogOverlay.displayName = __rspack_external__radix_ui_react_alert_dialog_df21c073.Overlay.displayName;
350
+ function AlertDialogContent({ className, onOpenAutoFocus, ref, ...props }) {
351
+ const { ref: occlusionRef, ready } = useNativeViewOcclusion();
352
+ const handleOpenAutoFocus = __rspack_external_react.useCallback((event)=>{
353
+ handleDialogOpenAutoFocus(event, onOpenAutoFocus);
354
+ }, [
355
+ onOpenAutoFocus
356
+ ]);
357
+ return /*#__PURE__*/ __rspack_external_react.createElement(AlertDialogPortal, null, /*#__PURE__*/ __rspack_external_react.createElement(AlertDialogOverlay, {
358
+ ref: occlusionRef,
359
+ className: cn(!ready && 'invisible')
360
+ }), /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_alert_dialog_df21c073.Content, {
361
+ ref: ref,
362
+ className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed top-[50%] left-[50%] z-(--z-modal) grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg', !ready && 'invisible', className),
363
+ ...props,
364
+ onOpenAutoFocus: handleOpenAutoFocus
365
+ }));
366
+ }
367
+ AlertDialogContent.displayName = __rspack_external__radix_ui_react_alert_dialog_df21c073.Content.displayName;
368
+ const AlertDialogHeader = ({ className, ...props })=>/*#__PURE__*/ __rspack_external_react.createElement("div", {
369
+ className: cn('flex flex-col space-y-2 text-center sm:text-left', className),
370
+ ...props
371
+ });
372
+ AlertDialogHeader.displayName = 'AlertDialogHeader';
373
+ const AlertDialogFooter = ({ className, ...props })=>/*#__PURE__*/ __rspack_external_react.createElement("div", {
374
+ className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className),
375
+ [DIALOG_FOOTER_ATTRIBUTE]: '',
376
+ ...props
377
+ });
378
+ AlertDialogFooter.displayName = 'AlertDialogFooter';
379
+ const AlertDialogTitle = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_alert_dialog_df21c073.Title, {
380
+ ref: ref,
381
+ className: cn('text-lg font-semibold', className),
382
+ ...props
383
+ }));
384
+ AlertDialogTitle.displayName = __rspack_external__radix_ui_react_alert_dialog_df21c073.Title.displayName;
385
+ const AlertDialogDescription = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_alert_dialog_df21c073.Description, {
386
+ ref: ref,
387
+ className: cn('text-muted-foreground text-sm', className),
388
+ ...props
389
+ }));
390
+ AlertDialogDescription.displayName = __rspack_external__radix_ui_react_alert_dialog_df21c073.Description.displayName;
391
+ const AlertDialogAction = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_alert_dialog_df21c073.Action, {
392
+ ref: ref,
393
+ className: cn(buttonVariants(), className),
394
+ [DIALOG_PRIMARY_ACTION_ATTRIBUTE]: '',
395
+ ...props
396
+ }));
397
+ AlertDialogAction.displayName = __rspack_external__radix_ui_react_alert_dialog_df21c073.Action.displayName;
398
+ const AlertDialogCancel = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_alert_dialog_df21c073.Cancel, {
399
+ ref: ref,
400
+ className: cn(buttonVariants({
401
+ variant: 'outline'
402
+ }), 'mt-2 sm:mt-0', className),
403
+ [DIALOG_CANCEL_ACTION_ATTRIBUTE]: '',
404
+ ...props
405
+ }));
406
+ AlertDialogCancel.displayName = __rspack_external__radix_ui_react_alert_dialog_df21c073.Cancel.displayName;
407
+ const badgeVariants = cva('inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors duration-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', {
408
+ variants: {
409
+ variant: {
410
+ default: 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',
411
+ secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
412
+ destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
413
+ success: 'border-transparent bg-success text-success-foreground hover:bg-success/80',
414
+ warning: 'border-transparent bg-warning text-warning-foreground hover:bg-warning/80',
415
+ info: 'border-transparent bg-info text-info-foreground hover:bg-info/80',
416
+ outline: 'text-foreground',
417
+ draft: 'border-surface-border-1 bg-muted text-foreground gap-2 h-8 px-3 py-2 font-medium'
418
+ }
419
+ },
420
+ defaultVariants: {
421
+ variant: 'default'
422
+ }
423
+ });
424
+ function Badge({ className, variant, ...props }) {
425
+ return /*#__PURE__*/ __rspack_external_react.createElement("span", {
426
+ className: cn(badgeVariants({
427
+ variant
428
+ }), className),
429
+ ...props
430
+ });
431
+ }
432
+ function Separator({ className, orientation = 'horizontal', decorative = true, ref, ...props }) {
433
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_separator_c79cca86.Root, {
434
+ ref: ref,
435
+ decorative: decorative,
436
+ orientation: orientation,
437
+ className: cn('bg-border shrink-0', 'horizontal' === orientation ? 'h-[1px] w-full' : 'h-full w-[1px]', className),
438
+ ...props
439
+ });
440
+ }
441
+ Separator.displayName = __rspack_external__radix_ui_react_separator_c79cca86.Root.displayName;
442
+ const buttonGroupVariants = cva("flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
443
+ variants: {
444
+ orientation: {
445
+ horizontal: '[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none',
446
+ vertical: 'flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none'
447
+ }
448
+ },
449
+ defaultVariants: {
450
+ orientation: 'horizontal'
451
+ }
452
+ });
453
+ function ButtonGroup({ className, orientation, ...props }) {
454
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
455
+ role: "group",
456
+ "data-slot": "button-group",
457
+ "data-orientation": orientation,
458
+ className: cn(buttonGroupVariants({
459
+ orientation
460
+ }), className),
461
+ ...props
462
+ });
463
+ }
464
+ function ButtonGroupText({ className, asChild = false, ...props }) {
465
+ const Comp = asChild ? Slot : 'div';
466
+ return /*#__PURE__*/ __rspack_external_react.createElement(Comp, {
467
+ className: cn("bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
468
+ ...props
469
+ });
470
+ }
471
+ function ButtonGroupSeparator({ className, orientation = 'vertical', ...props }) {
472
+ return /*#__PURE__*/ __rspack_external_react.createElement(Separator, {
473
+ "data-slot": "button-group-separator",
474
+ orientation: orientation,
475
+ className: cn('bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto', className),
476
+ ...props
477
+ });
478
+ }
479
+ const cardVariants = cva('text-card-foreground rounded-2xl', {
480
+ variants: {
481
+ variant: {
482
+ default: 'bg-card/40',
483
+ transparent: 'bg-transparent'
484
+ }
485
+ },
486
+ defaultVariants: {
487
+ variant: 'default'
488
+ }
489
+ });
490
+ function Card({ className, variant, ref, ...props }) {
491
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
492
+ ref: ref,
493
+ className: cn(cardVariants({
494
+ variant
495
+ }), className),
496
+ ...props
497
+ });
498
+ }
499
+ Card.displayName = 'Card';
500
+ function CardHeader({ className, ref, ...props }) {
501
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
502
+ ref: ref,
503
+ className: cn('flex flex-col space-y-1.5 p-6', className),
504
+ ...props
505
+ });
506
+ }
507
+ CardHeader.displayName = 'CardHeader';
508
+ function CardTitle({ className, ref, ...props }) {
509
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
510
+ ref: ref,
511
+ className: cn('text-2xl leading-none font-semibold tracking-tight', className),
512
+ ...props
513
+ });
514
+ }
515
+ CardTitle.displayName = 'CardTitle';
516
+ function CardDescription({ className, ref, ...props }) {
517
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
518
+ ref: ref,
519
+ className: cn('text-muted-foreground text-sm', className),
520
+ ...props
521
+ });
522
+ }
523
+ CardDescription.displayName = "CardDescription";
524
+ function CardContent({ className, ref, ...props }) {
525
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
526
+ ref: ref,
527
+ className: cn('p-6 pt-0', className),
528
+ ...props
529
+ });
530
+ }
531
+ CardContent.displayName = 'CardContent';
532
+ function CardFooter({ className, ref, ...props }) {
533
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
534
+ ref: ref,
535
+ className: cn('flex items-center p-6 pt-0', className),
536
+ ...props
537
+ });
538
+ }
539
+ CardFooter.displayName = 'CardFooter';
540
+ const Checkbox = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_checkbox_76182ac8.Root, {
541
+ ref: ref,
542
+ className: cn('peer border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground h-4 w-4 shrink-0 rounded-sm border focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50', className),
543
+ ...props
544
+ }, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_checkbox_76182ac8.Indicator, {
545
+ className: cn('flex items-center justify-center text-current')
546
+ }, /*#__PURE__*/ __rspack_external_react.createElement(Check, {
547
+ className: "h-4 w-4"
548
+ }))));
549
+ Checkbox.displayName = __rspack_external__radix_ui_react_checkbox_76182ac8.Root.displayName;
550
+ const CodeBlockContext = /*#__PURE__*/ (0, __rspack_external_react.createContext)({
551
+ code: ''
552
+ });
553
+ const normalizeLanguage = (lang)=>{
554
+ const languageMap = {
555
+ ts: "typescript",
556
+ js: "javascript",
557
+ py: 'python',
558
+ sh: 'bash',
559
+ shell: 'bash',
560
+ zsh: 'bash',
561
+ yml: 'yaml',
562
+ md: 'markdown',
563
+ 'c++': 'cpp',
564
+ 'c#': 'csharp',
565
+ cs: 'csharp',
566
+ rs: 'rust',
567
+ rb: 'ruby',
568
+ kt: 'kotlin',
569
+ ex: 'elixir',
570
+ clj: 'clojure',
571
+ hs: 'haskell',
572
+ pl: 'perl',
573
+ gql: 'graphql',
574
+ text: 'plaintext',
575
+ txt: 'plaintext'
576
+ };
577
+ if ('string' != typeof lang) return 'plaintext';
578
+ const normalized = lang.trim().toLowerCase();
579
+ if (!normalized) return 'plaintext';
580
+ return languageMap[normalized] || normalized;
581
+ };
582
+ const code_block_CodeLine = /*#__PURE__*/ (0, __rspack_external_react.memo)(function({ line, lineNumber, showLineNumbers, getLineProps, getTokenProps }) {
583
+ const lineProps = getLineProps({
584
+ line
585
+ });
586
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
587
+ ...lineProps,
588
+ className: cn(lineProps.className, 'table-row')
589
+ }, showLineNumbers && /*#__PURE__*/ __rspack_external_react.createElement("span", {
590
+ className: "text-muted-foreground table-cell min-w-[2.5rem] pr-4 text-right select-none"
591
+ }, lineNumber), /*#__PURE__*/ __rspack_external_react.createElement("span", {
592
+ className: "table-cell"
593
+ }, line.map((token, key)=>{
594
+ const tokenProps = getTokenProps({
595
+ token
596
+ });
597
+ return /*#__PURE__*/ __rspack_external_react.createElement("span", {
598
+ key: key,
599
+ ...tokenProps
600
+ });
601
+ })));
602
+ });
603
+ const code_block_HighlightedCode = /*#__PURE__*/ (0, __rspack_external_react.memo)(function({ code, language, showLineNumbers, theme, className }) {
604
+ return /*#__PURE__*/ __rspack_external_react.createElement(Highlight, {
605
+ theme: theme,
606
+ code: code,
607
+ language: language
608
+ }, ({ className: highlightClassName, style, tokens, getLineProps, getTokenProps })=>/*#__PURE__*/ __rspack_external_react.createElement("pre", {
609
+ className: cn(highlightClassName, 'm-0 table w-full overflow-x-auto p-4 font-mono text-sm', className),
610
+ style: {
611
+ ...style,
612
+ background: 'transparent'
613
+ }
614
+ }, /*#__PURE__*/ __rspack_external_react.createElement("code", {
615
+ className: "table-row-group"
616
+ }, tokens.map((line, i)=>/*#__PURE__*/ __rspack_external_react.createElement(code_block_CodeLine, {
617
+ key: i,
618
+ line: line,
619
+ lineNumber: i + 1,
620
+ showLineNumbers: showLineNumbers,
621
+ getLineProps: getLineProps,
622
+ getTokenProps: getTokenProps
623
+ })))));
624
+ });
625
+ const code_block_CodeBlock = /*#__PURE__*/ (0, __rspack_external_react.memo)(function({ code, language, highlight = true, showLineNumbers = false, command, collapsible = false, defaultExpanded = false, className, children, ...props }) {
626
+ const safeCode = 'string' == typeof code ? code : String(code ?? '');
627
+ const trimmedCode = safeCode.replace(/\n+$/, '');
628
+ const normalizedLanguage = normalizeLanguage(language);
629
+ const [isExpanded, setIsExpanded] = (0, __rspack_external_react.useState)(collapsible ? defaultExpanded : true);
630
+ const commandLines = (0, __rspack_external_react.useMemo)(()=>{
631
+ if (!command) return [];
632
+ return Array.isArray(command) ? command : [
633
+ command
634
+ ];
635
+ }, [
636
+ command
637
+ ]);
638
+ const shouldShowCollapseToggle = collapsible && trimmedCode.length > 0;
639
+ return /*#__PURE__*/ __rspack_external_react.createElement(CodeBlockContext.Provider, {
640
+ value: {
641
+ code: trimmedCode
642
+ }
643
+ }, /*#__PURE__*/ __rspack_external_react.createElement("div", {
644
+ "data-syntax-highlighted": highlight,
645
+ className: cn('bg-background text-foreground group relative w-full overflow-hidden rounded-md border', className),
646
+ ...props
647
+ }, commandLines.length > 0 && /*#__PURE__*/ __rspack_external_react.createElement("div", {
648
+ className: "bg-muted/50 border-border text-muted-foreground sticky top-0 z-10 border-b px-3 py-2 font-mono text-xs"
649
+ }, commandLines.map((line, idx)=>/*#__PURE__*/ __rspack_external_react.createElement("div", {
650
+ key: `${line}-${idx}`,
651
+ className: "truncate"
652
+ }, "$ ", line))), /*#__PURE__*/ __rspack_external_react.createElement("div", {
653
+ className: cn('relative', shouldShowCollapseToggle && !isExpanded && 'max-h-64 overflow-hidden')
654
+ }, highlight ? /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external_react.Fragment, null, /*#__PURE__*/ __rspack_external_react.createElement("div", {
655
+ className: cn('code-block-light overflow-hidden', shouldShowCollapseToggle && isExpanded && 'max-h-96 overflow-auto')
656
+ }, /*#__PURE__*/ __rspack_external_react.createElement(code_block_HighlightedCode, {
657
+ code: trimmedCode,
658
+ language: normalizedLanguage,
659
+ showLineNumbers: showLineNumbers,
660
+ theme: themes.oneLight
661
+ })), /*#__PURE__*/ __rspack_external_react.createElement("div", {
662
+ className: cn('code-block-dark overflow-hidden', shouldShowCollapseToggle && isExpanded && 'max-h-96 overflow-auto')
663
+ }, /*#__PURE__*/ __rspack_external_react.createElement(code_block_HighlightedCode, {
664
+ code: trimmedCode,
665
+ language: normalizedLanguage,
666
+ showLineNumbers: showLineNumbers,
667
+ theme: themes.oneDark
668
+ }))) : /*#__PURE__*/ __rspack_external_react.createElement("pre", {
669
+ className: "m-0 w-full overflow-auto p-4 font-mono text-sm whitespace-pre"
670
+ }, /*#__PURE__*/ __rspack_external_react.createElement("code", null, trimmedCode)), children && /*#__PURE__*/ __rspack_external_react.createElement("div", {
671
+ className: "absolute top-2 right-2 flex items-center gap-2"
672
+ }, children), shouldShowCollapseToggle && /*#__PURE__*/ __rspack_external_react.createElement("div", {
673
+ className: "border-border bg-background/95 absolute right-2 bottom-2 rounded-md border px-1.5 py-1"
674
+ }, /*#__PURE__*/ __rspack_external_react.createElement(Button, {
675
+ size: "sm",
676
+ variant: "ghost",
677
+ className: "h-6 px-2 text-xs",
678
+ onClick: ()=>{
679
+ setIsExpanded((prev)=>!prev);
680
+ }
681
+ }, isExpanded ? 'Collapse' : 'Expand')))));
682
+ });
683
+ const code_block_CodeBlockCopyButton = /*#__PURE__*/ (0, __rspack_external_react.memo)(function({ onCopy, onError, timeout = 2000, children, className, ...props }) {
684
+ const [isCopied, setIsCopied] = (0, __rspack_external_react.useState)(false);
685
+ const { code } = (0, __rspack_external_react.useContext)(CodeBlockContext);
686
+ const copyToClipboard = (0, __rspack_external_react.useCallback)(async ()=>{
687
+ if ("u" < typeof window || !navigator?.clipboard?.writeText) return void onError?.(new Error('Clipboard API not available'));
688
+ try {
689
+ await navigator.clipboard.writeText(code);
690
+ setIsCopied(true);
691
+ onCopy?.();
692
+ setTimeout(()=>{
693
+ setIsCopied(false);
694
+ }, timeout);
695
+ } catch (error) {
696
+ onError?.(error);
697
+ }
698
+ }, [
699
+ code,
700
+ onCopy,
701
+ onError,
702
+ timeout
703
+ ]);
704
+ const Icon = isCopied ? CheckIcon : CopyIcon;
705
+ return /*#__PURE__*/ __rspack_external_react.createElement(Button, {
706
+ className: cn('shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100', className),
707
+ onClick: copyToClipboard,
708
+ size: "icon",
709
+ variant: "ghost",
710
+ ...props
711
+ }, children ?? /*#__PURE__*/ __rspack_external_react.createElement(Icon, {
712
+ size: 14
713
+ }));
714
+ });
715
+ const ICON_SIZES = {
716
+ xs: '0.75em',
717
+ sm: '1em',
718
+ default: '1em',
719
+ md: '1.25em',
720
+ lg: '1.5em',
721
+ xl: '2em'
722
+ };
723
+ const iconVariants = cva('', {
724
+ defaultVariants: {
725
+ size: 'default'
726
+ },
727
+ variants: {
728
+ color: {
729
+ default: 'text-foreground',
730
+ destructive: 'text-destructive',
731
+ inherit: 'text-current',
732
+ muted: 'text-muted-foreground',
733
+ primary: 'text-primary',
734
+ secondary: 'text-secondary-foreground',
735
+ success: 'text-green-500',
736
+ warning: 'text-yellow-500'
737
+ },
738
+ size: {
739
+ xs: '',
740
+ sm: '',
741
+ default: '',
742
+ md: '',
743
+ lg: '',
744
+ xl: ''
745
+ }
746
+ }
747
+ });
748
+ function icon_Icon({ className, color, icon: IconComponent, size, ...props }) {
749
+ const iconSize = ICON_SIZES[size ?? 'default'];
750
+ return /*#__PURE__*/ __rspack_external_react.createElement(IconComponent, {
751
+ "aria-hidden": "true",
752
+ size: iconSize,
753
+ className: cn(iconVariants({
754
+ color: color ?? void 0,
755
+ size
756
+ }), className),
757
+ ...props
758
+ });
759
+ }
760
+ const Dialog = __rspack_external__radix_ui_react_dialog_dabd8325.Root;
761
+ const DialogTrigger = __rspack_external__radix_ui_react_dialog_dabd8325.Trigger;
762
+ const DialogPortal = __rspack_external__radix_ui_react_dialog_dabd8325.Portal;
763
+ const DialogClose = __rspack_external__radix_ui_react_dialog_dabd8325.Close;
764
+ function DialogOverlay({ className, ref, ...props }) {
765
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Overlay, {
766
+ ref: ref,
767
+ className: cn('fixed inset-0 z-(--z-modal) bg-black/50', className),
768
+ ...props
769
+ });
770
+ }
771
+ DialogOverlay.displayName = __rspack_external__radix_ui_react_dialog_dabd8325.Overlay.displayName;
772
+ function DialogContentPrimitive({ className, ref, ...props }) {
773
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
774
+ ref: ref,
775
+ className: cn('focus-visible:border focus-visible:ring-0 focus-visible:outline-none', className),
776
+ ...props
777
+ });
778
+ }
779
+ DialogContentPrimitive.displayName = __rspack_external__radix_ui_react_dialog_dabd8325.Content.displayName;
780
+ function DialogContent({ className, children, ref, container, hideCloseButton, onOpenAutoFocus, onEscapeKeyDown, ...props }) {
781
+ const { ref: occlusionRef, ready } = useNativeViewOcclusion();
782
+ const contentRef = __rspack_external_react.useRef(null);
783
+ const closeButtonRef = __rspack_external_react.useRef(null);
784
+ const shouldFocusWhenReadyRef = __rspack_external_react.useRef(false);
785
+ const handleOpenAutoFocus = __rspack_external_react.useCallback((event)=>{
786
+ shouldFocusWhenReadyRef.current = shouldQueueDialogDefaultFocus(event, onOpenAutoFocus);
787
+ if (flushQueuedDialogDefaultFocus({
788
+ content: contentRef.current,
789
+ ready,
790
+ shouldFocus: shouldFocusWhenReadyRef.current
791
+ })) shouldFocusWhenReadyRef.current = false;
792
+ }, [
793
+ onOpenAutoFocus,
794
+ ready
795
+ ]);
796
+ __rspack_external_react.useEffect(()=>{
797
+ if (flushQueuedDialogDefaultFocus({
798
+ content: contentRef.current,
799
+ ready,
800
+ shouldFocus: shouldFocusWhenReadyRef.current
801
+ })) shouldFocusWhenReadyRef.current = false;
802
+ }, [
803
+ ready
804
+ ]);
805
+ const handleEscapeKeyDown = __rspack_external_react.useCallback((event)=>{
806
+ onEscapeKeyDown?.(event);
807
+ if (!event.defaultPrevented && void 0 !== container) closeButtonRef.current?.click();
808
+ }, [
809
+ container,
810
+ onEscapeKeyDown
811
+ ]);
812
+ const overlay = container ? /*#__PURE__*/ __rspack_external_react.createElement("div", {
813
+ ref: occlusionRef,
814
+ className: cn('pointer-events-auto absolute inset-0 z-(--z-modal) bg-black/50', !ready && 'invisible')
815
+ }) : /*#__PURE__*/ __rspack_external_react.createElement(DialogOverlay, {
816
+ ref: occlusionRef,
817
+ className: cn(!ready && 'invisible')
818
+ });
819
+ return /*#__PURE__*/ __rspack_external_react.createElement(DialogPortal, {
820
+ container: container
821
+ }, overlay, /*#__PURE__*/ __rspack_external_react.createElement("div", {
822
+ className: cn('pointer-events-none z-(--z-modal) flex items-center justify-center', container ? 'absolute top-0 right-0 left-0 p-4 sm:p-6' : 'fixed inset-0 p-4 sm:p-10', !ready && 'invisible'),
823
+ style: container ? {
824
+ bottom: 'var(--chat-input-offset, 0px)'
825
+ } : void 0
826
+ }, /*#__PURE__*/ __rspack_external_react.createElement(DialogContentPrimitive, {
827
+ ref: composeRefs(ref, contentRef),
828
+ className: cn('bg-surface-level-1 pointer-events-auto relative grid max-h-full w-full max-w-lg min-w-0 gap-4 overflow-auto rounded-3xl border p-8 break-words shadow-lg', className),
829
+ ...container ? {
830
+ onInteractOutside: (e)=>{
831
+ const target = e.detail.originalEvent.target;
832
+ if (!container.contains(target)) e.preventDefault();
833
+ }
834
+ } : {},
835
+ ...props,
836
+ onOpenAutoFocus: handleOpenAutoFocus,
837
+ onEscapeKeyDown: handleEscapeKeyDown
838
+ }, children, !hideCloseButton && /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Close, {
839
+ asChild: true,
840
+ "data-testid": "dialog-close-button"
841
+ }, /*#__PURE__*/ __rspack_external_react.createElement(Button, {
842
+ ref: closeButtonRef,
843
+ variant: "ghost",
844
+ size: "icon-sm",
845
+ className: "absolute top-3 right-3"
846
+ }, /*#__PURE__*/ __rspack_external_react.createElement(icon_Icon, {
847
+ icon: X,
848
+ size: "sm"
849
+ }), /*#__PURE__*/ __rspack_external_react.createElement("span", {
850
+ className: "sr-only"
851
+ }, "Close"))), hideCloseButton && /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Close, {
852
+ ref: closeButtonRef,
853
+ className: "sr-only",
854
+ tabIndex: -1,
855
+ "aria-hidden": true
856
+ }))));
857
+ }
858
+ DialogContent.displayName = __rspack_external__radix_ui_react_dialog_dabd8325.Content.displayName;
859
+ const DialogHeader = ({ className, ...props })=>/*#__PURE__*/ __rspack_external_react.createElement("div", {
860
+ className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className),
861
+ ...props
862
+ });
863
+ DialogHeader.displayName = 'DialogHeader';
864
+ const DialogFooter = ({ className, ...props })=>/*#__PURE__*/ __rspack_external_react.createElement("div", {
865
+ className: cn('flex flex-wrap justify-end gap-2', className),
866
+ [DIALOG_FOOTER_ATTRIBUTE]: '',
867
+ ...props
868
+ });
869
+ DialogFooter.displayName = 'DialogFooter';
870
+ const DialogTitle = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement(H5, {
871
+ asChild: true,
872
+ className: cn('leading-none', className)
873
+ }, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Title, {
874
+ ref: ref,
875
+ ...props
876
+ })));
877
+ DialogTitle.displayName = __rspack_external__radix_ui_react_dialog_dabd8325.Title.displayName;
878
+ function DialogDescription({ className, ref, ...props }) {
879
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Description, {
880
+ ref: ref,
881
+ className: cn('text-muted-foreground text-sm', className),
882
+ ...props
883
+ });
884
+ }
885
+ DialogDescription.displayName = __rspack_external__radix_ui_react_dialog_dabd8325.Description.displayName;
886
+ const emptyVariants = cva('flex flex-col items-center justify-center text-center', {
887
+ variants: {
888
+ size: {
889
+ default: 'gap-6 p-8',
890
+ compact: 'gap-4 p-6'
891
+ },
892
+ variant: {
893
+ default: '',
894
+ outline: 'rounded-lg border border-dashed'
895
+ }
896
+ },
897
+ defaultVariants: {
898
+ size: 'default',
899
+ variant: 'default'
900
+ }
901
+ });
902
+ function Empty({ className, ref, size, variant, ...props }) {
903
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
904
+ ref: ref,
905
+ className: cn(emptyVariants({
906
+ size,
907
+ variant
908
+ }), className),
909
+ ...props
910
+ });
911
+ }
912
+ Empty.displayName = 'Empty';
913
+ function EmptyHeader({ className, ref, ...props }) {
914
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
915
+ ref: ref,
916
+ className: cn('flex flex-col items-center gap-2', className),
917
+ ...props
918
+ });
919
+ }
920
+ EmptyHeader.displayName = 'EmptyHeader';
921
+ const emptyMediaVariants = cva('flex items-center justify-center', {
922
+ variants: {
923
+ variant: {
924
+ default: '',
925
+ icon: 'text-muted-foreground rounded-lg bg-muted p-3'
926
+ }
927
+ },
928
+ defaultVariants: {
929
+ variant: 'default'
930
+ }
931
+ });
932
+ function EmptyMedia({ className, variant, ref, ...props }) {
933
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
934
+ ref: ref,
935
+ className: cn(emptyMediaVariants({
936
+ variant
937
+ }), className),
938
+ ...props
939
+ });
940
+ }
941
+ EmptyMedia.displayName = 'EmptyMedia';
942
+ const EmptyTitle = (props)=>/*#__PURE__*/ __rspack_external_react.createElement(H3, props);
943
+ EmptyTitle.displayName = 'EmptyTitle';
944
+ function EmptyDescription({ className, ref, ...props }) {
945
+ return /*#__PURE__*/ __rspack_external_react.createElement("p", {
946
+ ref: ref,
947
+ className: cn('text-muted-foreground text-sm', className),
948
+ ...props
949
+ });
950
+ }
951
+ EmptyDescription.displayName = "EmptyDescription";
952
+ function EmptyContent({ className, ref, ...props }) {
953
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
954
+ ref: ref,
955
+ className: cn('flex flex-col items-center gap-2', className),
956
+ ...props
957
+ });
958
+ }
959
+ EmptyContent.displayName = 'EmptyContent';
960
+ function Label({ className, ...props }) {
961
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_label_73c6aeea.Root, {
962
+ "data-slot": "label",
963
+ className: cn('flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50', className),
964
+ ...props
965
+ });
966
+ }
967
+ function FieldSet({ className, ...props }) {
968
+ return /*#__PURE__*/ __rspack_external_react.createElement("fieldset", {
969
+ "data-slot": "field-set",
970
+ className: cn('flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3', className),
971
+ ...props
972
+ });
973
+ }
974
+ function FieldLegend({ className, variant = 'legend', ...props }) {
975
+ return /*#__PURE__*/ __rspack_external_react.createElement("legend", {
976
+ "data-slot": "field-legend",
977
+ "data-variant": variant,
978
+ className: cn('mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base', className),
979
+ ...props
980
+ });
981
+ }
982
+ function FieldGroup({ className, ...props }) {
983
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
984
+ "data-slot": "field-group",
985
+ className: cn('group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4', className),
986
+ ...props
987
+ });
988
+ }
989
+ const fieldVariants = cva('group/field data-[invalid=true]:text-destructive flex w-full gap-3', {
990
+ variants: {
991
+ orientation: {
992
+ vertical: 'flex-col [&>*]:w-full [&>.sr-only]:w-auto',
993
+ horizontal: [
994
+ 'flex-row items-center',
995
+ '[&>[data-slot=field-label]]:flex-auto',
996
+ 'has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start'
997
+ ],
998
+ responsive: [
999
+ '@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto',
1000
+ '@md/field-group:[&>[data-slot=field-label]]:flex-auto',
1001
+ '@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px'
1002
+ ]
1003
+ }
1004
+ },
1005
+ defaultVariants: {
1006
+ orientation: 'vertical'
1007
+ }
1008
+ });
1009
+ function Field({ className, orientation = 'vertical', ...props }) {
1010
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1011
+ role: "group",
1012
+ "data-slot": "field",
1013
+ "data-orientation": orientation,
1014
+ className: cn(fieldVariants({
1015
+ orientation
1016
+ }), className),
1017
+ ...props
1018
+ });
1019
+ }
1020
+ function FieldContent({ className, ...props }) {
1021
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1022
+ "data-slot": "field-content",
1023
+ className: cn('group/field-content flex flex-1 flex-col gap-1.5 leading-snug', className),
1024
+ ...props
1025
+ });
1026
+ }
1027
+ function FieldLabel({ className, ...props }) {
1028
+ return /*#__PURE__*/ __rspack_external_react.createElement(Label, {
1029
+ "data-slot": "field-label",
1030
+ className: cn('group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50', 'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4', 'has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10', className),
1031
+ ...props
1032
+ });
1033
+ }
1034
+ function FieldTitle({ className, ...props }) {
1035
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1036
+ "data-slot": "field-label",
1037
+ className: cn('flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50', className),
1038
+ ...props
1039
+ });
1040
+ }
1041
+ function FieldDescription({ className, ...props }) {
1042
+ return /*#__PURE__*/ __rspack_external_react.createElement("p", {
1043
+ "data-slot": "field-description",
1044
+ className: cn('text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance', 'nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5', '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4', className),
1045
+ ...props
1046
+ });
1047
+ }
1048
+ function FieldSeparator({ children, className, ...props }) {
1049
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1050
+ "data-slot": "field-separator",
1051
+ "data-content": Boolean(children),
1052
+ className: cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className),
1053
+ ...props
1054
+ }, /*#__PURE__*/ __rspack_external_react.createElement(Separator, {
1055
+ className: "absolute inset-0 top-1/2"
1056
+ }), children ? /*#__PURE__*/ __rspack_external_react.createElement("span", {
1057
+ className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
1058
+ "data-slot": "field-separator-content"
1059
+ }, children) : null);
1060
+ }
1061
+ function FieldError({ className, children, errors, ...props }) {
1062
+ const content = __rspack_external_react.useMemo(()=>{
1063
+ if (children) return children;
1064
+ if (!errors) return null;
1065
+ if (1 === errors.length && errors[0]?.message) return errors[0].message;
1066
+ return /*#__PURE__*/ __rspack_external_react.createElement("ul", {
1067
+ className: "ml-4 flex list-disc flex-col gap-1"
1068
+ }, errors.map((error, index)=>error?.message ? /*#__PURE__*/ __rspack_external_react.createElement("li", {
1069
+ key: index
1070
+ }, error.message) : null));
1071
+ }, [
1072
+ children,
1073
+ errors
1074
+ ]);
1075
+ if (!content) return null;
1076
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1077
+ role: "alert",
1078
+ "data-slot": "field-error",
1079
+ className: cn('text-destructive text-sm font-normal', className),
1080
+ ...props
1081
+ }, content);
1082
+ }
1083
+ function useNativeInputSync(ref, onChange) {
1084
+ const lastSeenRef = useRef(null);
1085
+ const onChangeRef = useRef(onChange);
1086
+ useEffect(()=>{
1087
+ onChangeRef.current = onChange;
1088
+ });
1089
+ const wrappedOnChange = useCallback((event)=>{
1090
+ lastSeenRef.current = event.target.value;
1091
+ onChangeRef.current?.(event);
1092
+ }, []);
1093
+ useEffect(()=>{
1094
+ const el = ref.current;
1095
+ if (!el) return;
1096
+ const handler = (nativeEvent)=>{
1097
+ queueMicrotask(()=>{
1098
+ const next = el.value;
1099
+ if (next === lastSeenRef.current) return;
1100
+ lastSeenRef.current = next;
1101
+ const handlerFn = onChangeRef.current;
1102
+ if (!handlerFn) return;
1103
+ const syntheticEvent = {
1104
+ bubbles: nativeEvent.bubbles,
1105
+ cancelable: nativeEvent.cancelable,
1106
+ currentTarget: el,
1107
+ defaultPrevented: nativeEvent.defaultPrevented,
1108
+ eventPhase: nativeEvent.eventPhase,
1109
+ isDefaultPrevented: ()=>nativeEvent.defaultPrevented,
1110
+ isPropagationStopped: ()=>false,
1111
+ isTrusted: nativeEvent.isTrusted,
1112
+ nativeEvent,
1113
+ persist: ()=>{},
1114
+ preventDefault: ()=>nativeEvent.preventDefault(),
1115
+ stopPropagation: ()=>nativeEvent.stopPropagation(),
1116
+ target: el,
1117
+ timeStamp: nativeEvent.timeStamp,
1118
+ type: 'change'
1119
+ };
1120
+ handlerFn(syntheticEvent);
1121
+ });
1122
+ };
1123
+ el.addEventListener('input', handler);
1124
+ return ()=>el.removeEventListener('input', handler);
1125
+ }, [
1126
+ ref
1127
+ ]);
1128
+ return wrappedOnChange;
1129
+ }
1130
+ function Input({ className, density = 'default', type, error, ref, onChange, ...props }) {
1131
+ const internalRef = __rspack_external_react.useRef(null);
1132
+ __rspack_external_react.useImperativeHandle(ref, ()=>internalRef.current, []);
1133
+ const wrappedOnChange = useNativeInputSync(internalRef, onChange);
1134
+ return /*#__PURE__*/ __rspack_external_react.createElement("input", {
1135
+ type: type,
1136
+ className: cn('bg-input-background placeholder:text-muted-foreground shadow-input-rest focus-visible:border-input-border-focus focus-visible:shadow-input-focus aria-invalid:border-input-border-error aria-invalid:ring-destructive flex w-full border border-transparent transition-[box-shadow,border-color] duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none aria-invalid:ring-1 disabled:cursor-not-allowed disabled:opacity-50', 'default' === density && 'h-10 rounded-lg px-3 py-2.5 text-base md:text-sm', 'compact' === density && 'h-8 rounded-md px-2 py-1 text-xs', error && 'border-input-border-error ring-destructive ring-1', className),
1137
+ ref: internalRef,
1138
+ onChange: wrappedOnChange,
1139
+ ...props
1140
+ });
1141
+ }
1142
+ Input.displayName = 'Input';
1143
+ function Textarea({ className, error, ref, onChange, ...props }) {
1144
+ const internalRef = __rspack_external_react.useRef(null);
1145
+ __rspack_external_react.useImperativeHandle(ref, ()=>internalRef.current, []);
1146
+ const wrappedOnChange = useNativeInputSync(internalRef, onChange);
1147
+ return /*#__PURE__*/ __rspack_external_react.createElement("textarea", {
1148
+ className: cn('bg-input-background placeholder:text-muted-foreground shadow-input-rest focus-visible:border-input-border-focus focus-visible:shadow-input-focus textarea-scrollbar flex min-h-[80px] w-full rounded-lg border border-transparent px-3 py-2.5 text-base transition-[box-shadow,border-color] duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', error && 'border-input-border-error ring-destructive ring-1', className),
1149
+ ref: internalRef,
1150
+ onChange: wrappedOnChange,
1151
+ ...props
1152
+ });
1153
+ }
1154
+ Textarea.displayName = 'Textarea';
1155
+ function InputGroup({ className, ...props }) {
1156
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1157
+ "data-slot": "input-group",
1158
+ role: "group",
1159
+ className: cn('group/input-group bg-card shadow-input-rest focus-within:shadow-input-focus relative flex w-full items-center rounded-md p-2 transition-[color,box-shadow] outline-none', 'h-9 has-[>textarea]:h-auto', 'has-[>[data-align=inline-start]]:[&>input]:pl-2', 'has-[>[data-align=inline-end]]:[&>input]:pr-2', 'has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3', 'has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:gap-1 has-[>[data-align=block-end]]:[&>input]:pt-3', 'has-[[data-slot][aria-invalid=true]]:ring-destructive/30 has-[[data-slot][aria-invalid=true]]:border-destructive', className),
1160
+ ...props
1161
+ });
1162
+ }
1163
+ const inputGroupAddonVariants = cva("text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-']):not([width])]:size-4", {
1164
+ variants: {
1165
+ align: {
1166
+ 'inline-start': 'order-first has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]',
1167
+ 'inline-end': 'order-last has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]',
1168
+ 'block-start': 'order-first w-full justify-start',
1169
+ 'block-end': 'order-last w-full justify-start'
1170
+ }
1171
+ },
1172
+ defaultVariants: {
1173
+ align: 'inline-start'
1174
+ }
1175
+ });
1176
+ function InputGroupAddon({ className, align = 'inline-start', ...props }) {
1177
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1178
+ role: "group",
1179
+ "data-slot": "input-group-addon",
1180
+ "data-align": align,
1181
+ className: cn(inputGroupAddonVariants({
1182
+ align
1183
+ }), className),
1184
+ onClick: (e)=>{
1185
+ if (e.target.closest('button, input, select, textarea, [role="button"], [role="combobox"]')) return;
1186
+ e.currentTarget.parentElement?.querySelector('input')?.focus();
1187
+ },
1188
+ ...props
1189
+ });
1190
+ }
1191
+ const inputGroupButtonVariants = cva('flex items-center gap-2 text-sm', {
1192
+ variants: {
1193
+ size: {
1194
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-']):not([width])]:size-3.5",
1195
+ sm: 'h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5',
1196
+ 'icon-xs': 'size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0',
1197
+ 'icon-sm': 'size-8 p-0 has-[>svg]:p-0'
1198
+ }
1199
+ },
1200
+ defaultVariants: {
1201
+ size: 'xs'
1202
+ }
1203
+ });
1204
+ function InputGroupButton({ className, type = 'button', variant = 'ghost', size = 'xs', ...props }) {
1205
+ const buttonSize = 'icon-sm' === size || 'icon-xs' === size ? 'icon' : void 0;
1206
+ return /*#__PURE__*/ __rspack_external_react.createElement(Button, {
1207
+ type: type,
1208
+ "data-size": size,
1209
+ variant: variant,
1210
+ size: buttonSize,
1211
+ className: cn(inputGroupButtonVariants({
1212
+ size
1213
+ }), className),
1214
+ ...props
1215
+ });
1216
+ }
1217
+ function InputGroupText({ className, ...props }) {
1218
+ return /*#__PURE__*/ __rspack_external_react.createElement("span", {
1219
+ className: cn("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-']):not([width])]:size-4", className),
1220
+ ...props
1221
+ });
1222
+ }
1223
+ function InputGroupInput({ className, ...props }) {
1224
+ return /*#__PURE__*/ __rspack_external_react.createElement(Input, {
1225
+ "data-slot": "input-group-control",
1226
+ className: cn('flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:shadow-none focus-visible:ring-0 focus-visible:ring-offset-0', className),
1227
+ ...props
1228
+ });
1229
+ }
1230
+ function InputGroupTextarea({ className, ref, ...props }) {
1231
+ return /*#__PURE__*/ __rspack_external_react.createElement(Textarea, {
1232
+ ref: ref,
1233
+ "data-slot": "input-group-control",
1234
+ className: cn('flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none focus-visible:shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:outline-none', className),
1235
+ ...props
1236
+ });
1237
+ }
1238
+ InputGroupTextarea.displayName = 'InputGroupTextarea';
1239
+ function ItemGroup({ className, ...props }) {
1240
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1241
+ role: "list",
1242
+ "data-slot": "item-group",
1243
+ className: cn('group/item-group flex flex-col', className),
1244
+ ...props
1245
+ });
1246
+ }
1247
+ function ItemSeparator({ className, ...props }) {
1248
+ return /*#__PURE__*/ __rspack_external_react.createElement(Separator, {
1249
+ "data-slot": "item-separator",
1250
+ orientation: "horizontal",
1251
+ className: cn('my-0', className),
1252
+ ...props
1253
+ });
1254
+ }
1255
+ const itemVariants = cva('group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors [button]:cursor-pointer [button]:hover:bg-accent/50 [button]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]', {
1256
+ variants: {
1257
+ variant: {
1258
+ default: 'bg-transparent',
1259
+ outline: 'border-border',
1260
+ muted: 'bg-muted/50'
1261
+ },
1262
+ size: {
1263
+ default: 'p-4 gap-4 ',
1264
+ sm: 'py-3 px-4 gap-2.5'
1265
+ }
1266
+ },
1267
+ defaultVariants: {
1268
+ variant: 'default',
1269
+ size: 'default'
1270
+ }
1271
+ });
1272
+ function Item({ className, variant = 'default', size = 'default', asChild = false, ...props }) {
1273
+ const Comp = asChild ? Slot : 'div';
1274
+ return /*#__PURE__*/ __rspack_external_react.createElement(Comp, {
1275
+ "data-slot": "item",
1276
+ "data-variant": variant,
1277
+ "data-size": size,
1278
+ className: cn(itemVariants({
1279
+ variant,
1280
+ size,
1281
+ className
1282
+ })),
1283
+ ...props
1284
+ });
1285
+ }
1286
+ const itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5", {
1287
+ variants: {
1288
+ variant: {
1289
+ default: 'bg-transparent',
1290
+ icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
1291
+ image: 'size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover'
1292
+ }
1293
+ },
1294
+ defaultVariants: {
1295
+ variant: 'default'
1296
+ }
1297
+ });
1298
+ function ItemMedia({ className, variant = 'default', ...props }) {
1299
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1300
+ "data-slot": "item-media",
1301
+ "data-variant": variant,
1302
+ className: cn(itemMediaVariants({
1303
+ variant,
1304
+ className
1305
+ })),
1306
+ ...props
1307
+ });
1308
+ }
1309
+ function ItemContent({ className, ...props }) {
1310
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1311
+ "data-slot": "item-content",
1312
+ className: cn('flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none', className),
1313
+ ...props
1314
+ });
1315
+ }
1316
+ function ItemTitle({ className, ...props }) {
1317
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1318
+ "data-slot": "item-title",
1319
+ className: cn('flex w-fit items-center gap-2 text-sm leading-snug font-medium', className),
1320
+ ...props
1321
+ });
1322
+ }
1323
+ function ItemDescription({ className, ...props }) {
1324
+ return /*#__PURE__*/ __rspack_external_react.createElement("p", {
1325
+ "data-slot": "item-description",
1326
+ className: cn('text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance', '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4', className),
1327
+ ...props
1328
+ });
1329
+ }
1330
+ function ItemActions({ className, ...props }) {
1331
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1332
+ "data-slot": "item-actions",
1333
+ className: cn('flex items-center gap-2', className),
1334
+ ...props
1335
+ });
1336
+ }
1337
+ function ItemHeader({ className, ...props }) {
1338
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1339
+ "data-slot": "item-header",
1340
+ className: cn('flex basis-full items-center justify-between gap-2', className),
1341
+ ...props
1342
+ });
1343
+ }
1344
+ function ItemFooter({ className, ...props }) {
1345
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1346
+ "data-slot": "item-footer",
1347
+ className: cn('flex basis-full items-center justify-between gap-2', className),
1348
+ ...props
1349
+ });
1350
+ }
1351
+ const TooltipProvider = __rspack_external__radix_ui_react_tooltip_b301f25d.Provider;
1352
+ const Tooltip = __rspack_external__radix_ui_react_tooltip_b301f25d.Root;
1353
+ const TooltipTrigger = __rspack_external__radix_ui_react_tooltip_b301f25d.Trigger;
1354
+ function TooltipContent({ className, sideOffset = 4, variant = 'default', ref, ...props }) {
1355
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_tooltip_b301f25d.Portal, null, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_tooltip_b301f25d.Content, {
1356
+ ref: ref,
1357
+ sideOffset: sideOffset,
1358
+ className: cn('animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-(--z-tooltip) origin-[--radix-tooltip-content-transform-origin] overflow-hidden rounded-lg px-3 py-1.5 text-sm data-[state=instant-open]:animate-none', 'chrome' === variant ? 'border-border bg-tooltip-chrome text-tooltip-chrome-foreground border shadow-md' : 'bg-popover text-popover-foreground shadow-popover', className),
1359
+ ...props
1360
+ }));
1361
+ }
1362
+ TooltipContent.displayName = __rspack_external__radix_ui_react_tooltip_b301f25d.Content.displayName;
1363
+ function MiniAppToolbar({ className, ref, ...props }) {
1364
+ return /*#__PURE__*/ __rspack_external_react.createElement("header", {
1365
+ ref: ref,
1366
+ "data-slot": "mini-app-toolbar",
1367
+ className: cn('bg-sidebar/50 border-workspace-divider flex min-h-12 shrink-0 items-center gap-3 border-b px-4 py-2', className),
1368
+ ...props
1369
+ });
1370
+ }
1371
+ MiniAppToolbar.displayName = 'MiniAppToolbar';
1372
+ function MiniAppIconButton({ icon, label, size = 'icon-xs', tooltipSide = 'bottom', type = 'button', variant = 'ghost', ...props }) {
1373
+ return /*#__PURE__*/ __rspack_external_react.createElement(Tooltip, {
1374
+ disableHoverableContent: true
1375
+ }, /*#__PURE__*/ __rspack_external_react.createElement(TooltipTrigger, {
1376
+ asChild: true
1377
+ }, /*#__PURE__*/ __rspack_external_react.createElement(Button, {
1378
+ type: type,
1379
+ variant: variant,
1380
+ size: size,
1381
+ "aria-label": label,
1382
+ "data-slot": "mini-app-icon-button",
1383
+ ...props
1384
+ }, /*#__PURE__*/ __rspack_external_react.createElement(icon_Icon, {
1385
+ icon: icon,
1386
+ size: "sm",
1387
+ "data-icon": "icon"
1388
+ }))), /*#__PURE__*/ __rspack_external_react.createElement(TooltipContent, {
1389
+ side: tooltipSide
1390
+ }, label));
1391
+ }
1392
+ MiniAppIconButton.displayName = 'MiniAppIconButton';
1393
+ function MiniAppStatusBar({ children, className, tone = 'neutral', ...props }) {
1394
+ return /*#__PURE__*/ __rspack_external_react.createElement(Alert, {
1395
+ role: "status",
1396
+ "aria-live": "polite",
1397
+ "data-slot": "mini-app-status-bar",
1398
+ variant: 'error' === tone ? 'destructive' : 'success' === tone ? 'success' : 'default',
1399
+ className: cn('max-h-16 overflow-auto rounded-none border-x-0 border-b-0 px-3 py-1.5', className),
1400
+ ...props
1401
+ }, /*#__PURE__*/ __rspack_external_react.createElement(AlertDescription, {
1402
+ className: "text-xs"
1403
+ }, children));
1404
+ }
1405
+ MiniAppStatusBar.displayName = 'MiniAppStatusBar';
1406
+ function NativeSelect({ className, density = 'default', ref, wrapperClassName, ...props }) {
1407
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1408
+ className: cn('relative min-w-0 max-w-full', wrapperClassName)
1409
+ }, /*#__PURE__*/ __rspack_external_react.createElement("select", {
1410
+ className: cn('bg-background ring-offset-background placeholder:text-muted-foreground shadow-input-rest focus-visible:ring-ring flex w-full appearance-none rounded-md border border-transparent text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50', 'default' === density && 'h-10 px-3 py-2 pr-10', 'compact' === density && 'h-8 py-1 pr-8 pl-2 text-xs', className),
1411
+ ref: ref,
1412
+ ...props
1413
+ }), /*#__PURE__*/ __rspack_external_react.createElement(ChevronDown, {
1414
+ className: cn('pointer-events-none absolute top-1/2 -translate-y-1/2 opacity-50', 'default' === density && 'right-3 h-4 w-4', 'compact' === density && 'right-2 h-3.5 w-3.5')
1415
+ }));
1416
+ }
1417
+ NativeSelect.displayName = 'NativeSelect';
1418
+ function NativeSelectOption({ className, ref, ...props }) {
1419
+ return /*#__PURE__*/ __rspack_external_react.createElement("option", {
1420
+ className: className,
1421
+ ref: ref,
1422
+ ...props
1423
+ });
1424
+ }
1425
+ NativeSelectOption.displayName = 'NativeSelectOption';
1426
+ function NativeSelectOptGroup({ className, ref, ...props }) {
1427
+ return /*#__PURE__*/ __rspack_external_react.createElement("optgroup", {
1428
+ className: className,
1429
+ ref: ref,
1430
+ ...props
1431
+ });
1432
+ }
1433
+ NativeSelectOptGroup.displayName = 'NativeSelectOptGroup';
1434
+ function Progress({ className, value, ref, ...props }) {
1435
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_progress_67feda0a.Root, {
1436
+ ref: ref,
1437
+ className: cn('bg-secondary relative h-4 w-full overflow-hidden rounded-full', className),
1438
+ ...props
1439
+ }, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_progress_67feda0a.Indicator, {
1440
+ className: "bg-primary h-full w-full flex-1 transition-all",
1441
+ style: {
1442
+ transform: `translateX(-${100 - (value || 0)}%)`
1443
+ }
1444
+ }));
1445
+ }
1446
+ Progress.displayName = __rspack_external__radix_ui_react_progress_67feda0a.Root.displayName;
1447
+ function RadioGroup({ className, ref, ...props }) {
1448
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_radio_group_295a43fb.Root, {
1449
+ className: cn('grid gap-2', className),
1450
+ ...props,
1451
+ ref: ref
1452
+ });
1453
+ }
1454
+ RadioGroup.displayName = __rspack_external__radix_ui_react_radio_group_295a43fb.Root.displayName;
1455
+ function RadioGroupItem({ className, ref, ...props }) {
1456
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_radio_group_295a43fb.Item, {
1457
+ ref: ref,
1458
+ className: cn('ring-offset-background focus-visible:ring-ring border-input bg-input-background data-[state=checked]:border-primary data-[state=checked]:bg-primary aspect-square h-4 w-4 rounded-full border transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50', className),
1459
+ ...props
1460
+ }, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_radio_group_295a43fb.Indicator, {
1461
+ className: "flex items-center justify-center"
1462
+ }, /*#__PURE__*/ __rspack_external_react.createElement(Circle, {
1463
+ className: "h-2 w-2 fill-white text-white"
1464
+ })));
1465
+ }
1466
+ RadioGroupItem.displayName = __rspack_external__radix_ui_react_radio_group_295a43fb.Item.displayName;
1467
+ function RadioCard({ id, value, children, className, ref, ...props }) {
1468
+ return /*#__PURE__*/ __rspack_external_react.createElement("label", {
1469
+ ref: ref,
1470
+ htmlFor: id,
1471
+ className: cn('bg-surface-level-2 rounded-inset relative flex cursor-pointer items-start gap-3 px-3 py-2.5 shadow-sm transition-all duration-150', 'hover:bg-accent/50', 'has-[[data-state=checked]]:bg-interactive-focus has-[[data-state=checked]]:ring-ring has-[[data-state=checked]]:ring-1', className)
1472
+ }, /*#__PURE__*/ __rspack_external_react.createElement(RadioGroupItem, {
1473
+ id: id,
1474
+ value: value,
1475
+ className: "mt-0.5 shrink-0",
1476
+ ...props
1477
+ }), /*#__PURE__*/ __rspack_external_react.createElement("div", {
1478
+ className: "flex-1 space-y-1"
1479
+ }, children));
1480
+ }
1481
+ RadioCard.displayName = 'RadioCard';
1482
+ const panelOverflowClassName = {
1483
+ auto: '!overflow-auto',
1484
+ hidden: '!overflow-hidden',
1485
+ visible: '!overflow-visible'
1486
+ };
1487
+ const ResizablePanelGroup = ({ className, direction = 'horizontal', ...props })=>/*#__PURE__*/ __rspack_external_react.createElement(Group, {
1488
+ orientation: direction,
1489
+ className: cn('flex h-full min-h-0 w-full min-w-0 overflow-hidden data-[orientation=vertical]:flex-col', className),
1490
+ ...props
1491
+ });
1492
+ const ResizablePanel = ({ className, panelOverflow = 'hidden', style, ...props })=>/*#__PURE__*/ __rspack_external_react.createElement(Panel, {
1493
+ className: cn('min-h-0 min-w-0', className, panelOverflowClassName[panelOverflow]),
1494
+ style: {
1495
+ ...style,
1496
+ overflow: panelOverflow
1497
+ },
1498
+ ...props
1499
+ });
1500
+ const ResizableHandle = ({ withHandle, className, ...props })=>/*#__PURE__*/ __rspack_external_react.createElement(external_react_resizable_panels_Separator, {
1501
+ className: cn('bg-border relative flex w-px items-center justify-center outline-none after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:outline-none data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:translate-x-0 data-[orientation=vertical]:after:-translate-y-1/2 [&[data-orientation=vertical]>div]:rotate-90', className),
1502
+ ...props
1503
+ }, withHandle && /*#__PURE__*/ __rspack_external_react.createElement("div", {
1504
+ className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border"
1505
+ }, /*#__PURE__*/ __rspack_external_react.createElement(GripVertical, {
1506
+ className: "h-2.5 w-2.5"
1507
+ })));
1508
+ function ScrollArea({ className, viewportClassName, viewportRef, viewportProps, children, ...props }) {
1509
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_scroll_area_bdec1136.Root, {
1510
+ "data-slot": "scroll-area",
1511
+ className: cn('relative', className),
1512
+ ...props
1513
+ }, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_scroll_area_bdec1136.Viewport, {
1514
+ ref: viewportRef,
1515
+ "data-slot": "scroll-area-viewport",
1516
+ className: cn('focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&>div]:!block', viewportClassName),
1517
+ ...viewportProps
1518
+ }, children), /*#__PURE__*/ __rspack_external_react.createElement(ScrollBar, null), /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_scroll_area_bdec1136.Corner, null));
1519
+ }
1520
+ function ScrollBar({ className, orientation = 'vertical', ...props }) {
1521
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_scroll_area_bdec1136.ScrollAreaScrollbar, {
1522
+ "data-slot": "scroll-area-scrollbar",
1523
+ orientation: orientation,
1524
+ className: cn('flex touch-none p-px transition-colors select-none', 'vertical' === orientation && 'h-full w-2.5 border-l border-l-transparent', 'horizontal' === orientation && 'h-2.5 flex-col border-t border-t-transparent', className),
1525
+ ...props
1526
+ }, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_scroll_area_bdec1136.ScrollAreaThumb, {
1527
+ "data-slot": "scroll-area-thumb",
1528
+ className: "bg-border relative flex-1 rounded-full"
1529
+ }));
1530
+ }
1531
+ const Select = __rspack_external__radix_ui_react_select_4606f4d3.Root;
1532
+ const SelectGroup = __rspack_external__radix_ui_react_select_4606f4d3.Group;
1533
+ const SelectValue = __rspack_external__radix_ui_react_select_4606f4d3.Value;
1534
+ function SelectTrigger({ className, children, density = 'default', ref, ...props }) {
1535
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_select_4606f4d3.Trigger, {
1536
+ ref: ref,
1537
+ className: cn('bg-input-background data-[placeholder]:text-muted-foreground shadow-input-rest focus-visible:border-input-border-focus focus-visible:shadow-input-focus flex w-full min-w-0 items-center justify-between gap-2 rounded-lg border border-transparent transition-[box-shadow,border-color] duration-200 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:min-w-0 [&>span]:flex-1 [&>span]:truncate [&>span]:text-left', 'default' === density && 'h-9 px-3 py-2 text-base md:text-sm', 'compact' === density && 'h-8 px-2 py-1 text-xs', className),
1538
+ ...props
1539
+ }, children, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_select_4606f4d3.Icon, {
1540
+ asChild: true
1541
+ }, /*#__PURE__*/ __rspack_external_react.createElement(ChevronDown, {
1542
+ className: "h-4 w-4 opacity-50"
1543
+ })));
1544
+ }
1545
+ SelectTrigger.displayName = __rspack_external__radix_ui_react_select_4606f4d3.Trigger.displayName;
1546
+ function SelectScrollUpButton({ className, ref, ...props }) {
1547
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_select_4606f4d3.ScrollUpButton, {
1548
+ ref: ref,
1549
+ className: cn('flex cursor-default items-center justify-center py-1', className),
1550
+ ...props
1551
+ }, /*#__PURE__*/ __rspack_external_react.createElement(ChevronUp, {
1552
+ className: "h-4 w-4"
1553
+ }));
1554
+ }
1555
+ SelectScrollUpButton.displayName = __rspack_external__radix_ui_react_select_4606f4d3.ScrollUpButton.displayName;
1556
+ function SelectScrollDownButton({ className, ref, ...props }) {
1557
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_select_4606f4d3.ScrollDownButton, {
1558
+ ref: ref,
1559
+ className: cn('flex cursor-default items-center justify-center py-1', className),
1560
+ ...props
1561
+ }, /*#__PURE__*/ __rspack_external_react.createElement(ChevronDown, {
1562
+ className: "h-4 w-4"
1563
+ }));
1564
+ }
1565
+ SelectScrollDownButton.displayName = __rspack_external__radix_ui_react_select_4606f4d3.ScrollDownButton.displayName;
1566
+ function SelectContent({ className, children, position = 'popper', ref, ...props }) {
1567
+ const { ref: occlusionRef, ready } = useNativeViewOcclusion();
1568
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_select_4606f4d3.Portal, null, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_select_4606f4d3.Content, {
1569
+ ref: composeRefs(ref, occlusionRef),
1570
+ className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-(--z-popover) max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-lg shadow-sm data-[side=bottom]:origin-top data-[side=left]:origin-right data-[side=right]:origin-left data-[side=top]:origin-bottom', 'popper' === position && 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', !ready && 'invisible', className),
1571
+ position: position,
1572
+ ...props
1573
+ }, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_select_4606f4d3.Viewport, {
1574
+ className: cn('p-1', 'popper' === position && 'max-h-[min(var(--radix-select-content-available-height),24rem)] w-full min-w-[var(--radix-select-trigger-width)]')
1575
+ }, children)));
1576
+ }
1577
+ SelectContent.displayName = __rspack_external__radix_ui_react_select_4606f4d3.Content.displayName;
1578
+ function SelectLabel({ className, ref, ...props }) {
1579
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_select_4606f4d3.Label, {
1580
+ ref: ref,
1581
+ className: cn('py-1.5 pr-2 pl-8 text-sm font-semibold', className),
1582
+ ...props
1583
+ });
1584
+ }
1585
+ SelectLabel.displayName = __rspack_external__radix_ui_react_select_4606f4d3.Label.displayName;
1586
+ function SelectItem({ className, children, ref, ...props }) {
1587
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_select_4606f4d3.Item, {
1588
+ ref: ref,
1589
+ className: cn('data-[highlighted]:bg-sidebar-accent data-[highlighted]:text-sidebar-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className),
1590
+ ...props
1591
+ }, /*#__PURE__*/ __rspack_external_react.createElement("span", {
1592
+ className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center"
1593
+ }, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_select_4606f4d3.ItemIndicator, null, /*#__PURE__*/ __rspack_external_react.createElement(Check, {
1594
+ className: "h-4 w-4"
1595
+ }))), /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_select_4606f4d3.ItemText, null, children));
1596
+ }
1597
+ SelectItem.displayName = __rspack_external__radix_ui_react_select_4606f4d3.Item.displayName;
1598
+ function SelectSeparator({ className, ref, ...props }) {
1599
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_select_4606f4d3.Separator, {
1600
+ ref: ref,
1601
+ className: cn('bg-muted -mx-1 my-1 h-px', className),
1602
+ ...props
1603
+ });
1604
+ }
1605
+ SelectSeparator.displayName = __rspack_external__radix_ui_react_select_4606f4d3.Separator.displayName;
1606
+ function Sheet(props) {
1607
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
1608
+ "data-slot": "sheet",
1609
+ ...props
1610
+ });
1611
+ }
1612
+ function SheetTrigger({ ...props }) {
1613
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Trigger, {
1614
+ "data-slot": "sheet-trigger",
1615
+ ...props
1616
+ });
1617
+ }
1618
+ function SheetClose({ ...props }) {
1619
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Close, {
1620
+ "data-slot": "sheet-close",
1621
+ ...props
1622
+ });
1623
+ }
1624
+ function SheetPortal({ ...props }) {
1625
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Portal, {
1626
+ "data-slot": "sheet-portal",
1627
+ ...props
1628
+ });
1629
+ }
1630
+ function SheetOverlay({ className, ...props }) {
1631
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Overlay, {
1632
+ "data-slot": "sheet-overlay",
1633
+ className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:pointer-events-none data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-(--z-modal) bg-black/50', className),
1634
+ ...props
1635
+ });
1636
+ }
1637
+ function SheetContent({ className, children, occlusionEnabled = true, side = 'right', overlayClassName, ...props }) {
1638
+ const { ref: occlusionRef, ready } = useNativeViewOcclusion({
1639
+ enabled: occlusionEnabled
1640
+ });
1641
+ return /*#__PURE__*/ __rspack_external_react.createElement(SheetPortal, null, /*#__PURE__*/ __rspack_external_react.createElement(SheetOverlay, {
1642
+ ref: occlusionRef,
1643
+ className: cn(overlayClassName, !ready && 'invisible')
1644
+ }), /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Content, {
1645
+ "data-slot": "sheet-content",
1646
+ className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:pointer-events-none data-[state=open]:pointer-events-auto fixed z-(--z-modal) flex flex-col gap-4 transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500', 'right' === side && 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm', 'left' === side && 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm', 'top' === side && 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b', 'bottom' === side && 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t', !ready && 'invisible', className),
1647
+ ...props
1648
+ }, children, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Close, {
1649
+ className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"
1650
+ }, /*#__PURE__*/ __rspack_external_react.createElement(XIcon, {
1651
+ className: "size-4"
1652
+ }), /*#__PURE__*/ __rspack_external_react.createElement("span", {
1653
+ className: "sr-only"
1654
+ }, "Close"))));
1655
+ }
1656
+ function SheetHeader({ className, ...props }) {
1657
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1658
+ "data-slot": "sheet-header",
1659
+ className: cn('flex flex-col gap-1.5 p-4', className),
1660
+ ...props
1661
+ });
1662
+ }
1663
+ function SheetFooter({ className, ...props }) {
1664
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1665
+ "data-slot": "sheet-footer",
1666
+ className: cn('mt-auto flex flex-col gap-2 p-4', className),
1667
+ ...props
1668
+ });
1669
+ }
1670
+ function SheetTitle({ className, ...props }) {
1671
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Title, {
1672
+ "data-slot": "sheet-title",
1673
+ className: cn('text-foreground font-semibold', className),
1674
+ ...props
1675
+ });
1676
+ }
1677
+ function SheetDescription({ className, ...props }) {
1678
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_dialog_dabd8325.Description, {
1679
+ "data-slot": "sheet-description",
1680
+ className: cn('text-muted-foreground text-sm', className),
1681
+ ...props
1682
+ });
1683
+ }
1684
+ function Skeleton({ className, ...props }) {
1685
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1686
+ "data-slot": "skeleton",
1687
+ className: cn('bg-accent animate-pulse rounded-md', className),
1688
+ ...props
1689
+ });
1690
+ }
1691
+ function Slider({ className, ref, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, ...props }) {
1692
+ const thumbCount = __rspack_external_react.useMemo(()=>{
1693
+ if (props.value?.length) return props.value.length;
1694
+ if (props.defaultValue?.length) return props.defaultValue.length;
1695
+ return 1;
1696
+ }, [
1697
+ props.value,
1698
+ props.defaultValue
1699
+ ]);
1700
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_slider_302f41eb.Root, {
1701
+ ref: ref,
1702
+ className: cn('relative flex w-full touch-none items-center select-none', 'disabled:pointer-events-none disabled:opacity-50', className),
1703
+ ...props
1704
+ }, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_slider_302f41eb.Track, {
1705
+ className: cn('bg-muted relative h-2 w-full grow overflow-hidden rounded-full', 'data-[disabled]:opacity-50')
1706
+ }, /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_slider_302f41eb.Range, {
1707
+ className: "bg-primary absolute h-full"
1708
+ })), Array.from({
1709
+ length: thumbCount
1710
+ }).map((_, index)=>/*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_slider_302f41eb.Thumb, {
1711
+ key: index,
1712
+ "aria-label": ariaLabel,
1713
+ "aria-labelledby": ariaLabelledby,
1714
+ className: cn('border-primary bg-switch-thumb ring-offset-background block h-5 w-5 rounded-full border-2 shadow-sm transition-colors', 'focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none', 'disabled:pointer-events-none disabled:opacity-50')
1715
+ })));
1716
+ }
1717
+ Slider.displayName = 'Slider';
1718
+ const Table = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, density = 'default', ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement("div", {
1719
+ className: "relative w-full overflow-auto"
1720
+ }, /*#__PURE__*/ __rspack_external_react.createElement("table", {
1721
+ ref: ref,
1722
+ "data-density": density,
1723
+ className: cn('w-full caption-bottom text-sm', 'compact' === density && '[&_th]:h-8 [&_th]:px-2 [&_th]:text-xs [&_td]:p-1', className),
1724
+ ...props
1725
+ })));
1726
+ Table.displayName = 'Table';
1727
+ const TableHeader = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement("thead", {
1728
+ ref: ref,
1729
+ className: cn('[&_tr]:border-b', className),
1730
+ ...props
1731
+ }));
1732
+ TableHeader.displayName = 'TableHeader';
1733
+ const TableBody = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement("tbody", {
1734
+ ref: ref,
1735
+ className: cn('[&_tr:last-child]:border-0', className),
1736
+ ...props
1737
+ }));
1738
+ TableBody.displayName = 'TableBody';
1739
+ const TableFooter = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement("tfoot", {
1740
+ ref: ref,
1741
+ className: cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className),
1742
+ ...props
1743
+ }));
1744
+ TableFooter.displayName = 'TableFooter';
1745
+ const TableRow = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement("tr", {
1746
+ ref: ref,
1747
+ className: cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors duration-100', className),
1748
+ ...props
1749
+ }));
1750
+ TableRow.displayName = 'TableRow';
1751
+ const TableHead = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement("th", {
1752
+ ref: ref,
1753
+ className: cn('text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0', className),
1754
+ ...props
1755
+ }));
1756
+ TableHead.displayName = 'TableHead';
1757
+ const TableCell = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement("td", {
1758
+ ref: ref,
1759
+ className: cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className),
1760
+ ...props
1761
+ }));
1762
+ TableCell.displayName = 'TableCell';
1763
+ const TableCaption = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement("caption", {
1764
+ ref: ref,
1765
+ className: cn('text-muted-foreground mt-4 text-sm', className),
1766
+ ...props
1767
+ }));
1768
+ TableCaption.displayName = 'TableCaption';
1769
+ function Tabs({ className, orientation = 'horizontal', ...props }) {
1770
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_tabs_62268d7a.Root, {
1771
+ "data-slot": "tabs",
1772
+ "data-orientation": orientation,
1773
+ orientation: orientation,
1774
+ className: cn('group/tabs flex gap-2 data-[orientation=horizontal]:flex-col', className),
1775
+ ...props
1776
+ });
1777
+ }
1778
+ const tabsListVariants = cva('group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none', {
1779
+ variants: {
1780
+ variant: {
1781
+ default: 'bg-muted',
1782
+ line: 'gap-1 bg-transparent'
1783
+ }
1784
+ },
1785
+ defaultVariants: {
1786
+ variant: 'default'
1787
+ }
1788
+ });
1789
+ function TabsList({ className, variant = 'default', ...props }) {
1790
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_tabs_62268d7a.List, {
1791
+ "data-slot": "tabs-list",
1792
+ "data-variant": variant,
1793
+ className: cn(tabsListVariants({
1794
+ variant
1795
+ }), className),
1796
+ ...props
1797
+ });
1798
+ }
1799
+ function TabsTrigger({ className, ...props }) {
1800
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_tabs_62268d7a.Trigger, {
1801
+ "data-slot": "tabs-trigger",
1802
+ className: cn("text-foreground/60 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", 'group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent', 'data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground', 'after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100', className),
1803
+ ...props
1804
+ });
1805
+ }
1806
+ function TabsContent({ className, ...props }) {
1807
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_tabs_62268d7a.Content, {
1808
+ "data-slot": "tabs-content",
1809
+ className: cn('focus-visible:ring-ring/50 flex-1 outline-none focus-visible:ring-[3px] focus-visible:ring-inset focus-visible:outline-1', className),
1810
+ ...props
1811
+ });
1812
+ }
1813
+ const toggleVariants = cva('inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2', {
1814
+ variants: {
1815
+ variant: {
1816
+ default: 'bg-transparent',
1817
+ outline: 'border border-input bg-transparent hover:bg-accent hover:text-accent-foreground'
1818
+ },
1819
+ size: {
1820
+ default: 'h-10 px-3 min-w-10',
1821
+ sm: 'h-9 px-2.5 min-w-9',
1822
+ lg: 'h-11 px-5 min-w-11'
1823
+ }
1824
+ },
1825
+ defaultVariants: {
1826
+ variant: 'default',
1827
+ size: 'default'
1828
+ }
1829
+ });
1830
+ const Toggle = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, variant, size, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_toggle_f6d72b6a.Root, {
1831
+ ref: ref,
1832
+ className: cn(toggleVariants({
1833
+ variant,
1834
+ size,
1835
+ className
1836
+ })),
1837
+ ...props
1838
+ }));
1839
+ Toggle.displayName = __rspack_external__radix_ui_react_toggle_f6d72b6a.Root.displayName;
1840
+ const ToggleGroup = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_toggle_group_1cb63752.Root, {
1841
+ ref: ref,
1842
+ className: cn('bg-muted inline-flex items-center justify-center rounded-md p-1', className),
1843
+ ...props
1844
+ }));
1845
+ ToggleGroup.displayName = __rspack_external__radix_ui_react_toggle_group_1cb63752.Root.displayName;
1846
+ const ToggleGroupItem = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_toggle_group_1cb63752.Item, {
1847
+ ref: ref,
1848
+ className: cn('ring-offset-background inline-flex cursor-pointer items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-all', 'focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none', 'disabled:pointer-events-none disabled:opacity-50', 'data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm', 'hover:bg-muted-foreground/10', className),
1849
+ ...props
1850
+ }, children));
1851
+ ToggleGroupItem.displayName = __rspack_external__radix_ui_react_toggle_group_1cb63752.Item.displayName;
1852
+ export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Badge, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, H1, H2, H3, H4, H5, H6, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, MiniAppIconButton, MiniAppStatusBar, MiniAppToolbar, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NativeViewOcclusionProvider, Progress, RadioCard, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Slider, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, cn, code_block_CodeBlock as CodeBlock, code_block_CodeBlockCopyButton as CodeBlockCopyButton, icon_Icon as Icon, useNativeViewOcclusion };