ui-cmdk 0.0.2

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/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # use-tgrid
2
+
3
+ To install dependencies:
4
+
5
+ ```bash
6
+ bun install
7
+ ```
8
+
9
+ To run:
10
+
11
+ ```bash
12
+ bun run index.ts
13
+ ```
14
+
15
+ This project was created using `bun init` in bun v1.3.5. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
@@ -0,0 +1,387 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ /// <reference types="react" />
4
+
5
+ import { Dialog as BaseDialog } from '@base-ui/react/dialog';
6
+ import { useRender } from '@base-ui/react/use-render';
7
+
8
+ export type Children = {
9
+ children?: React.ReactNode;
10
+ };
11
+ export type RenderableProps<T extends React.ElementType, State = Record<string, unknown>> = React.ComponentPropsWithoutRef<T> & {
12
+ render?: useRender.RenderProp<State>;
13
+ };
14
+ export type DivProps = RenderableProps<"div">;
15
+ export type CommandFilter = (value: string, search: string, keywords?: string[]) => number;
16
+ export type State = {
17
+ search: string;
18
+ value: string;
19
+ selectedItemId?: string;
20
+ filtered: {
21
+ count: number;
22
+ items: Map<string, number>;
23
+ groups: Set<string>;
24
+ };
25
+ };
26
+ type Group = {
27
+ id: string;
28
+ forceMount?: boolean;
29
+ };
30
+ export declare const defaultFilter: CommandFilter;
31
+ declare const Command: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
32
+ render?: useRender.RenderProp<Record<string, unknown>> | undefined;
33
+ } & {
34
+ /**
35
+ * Accessible label for this command menu. Not shown visibly.
36
+ */
37
+ label?: string;
38
+ /**
39
+ * Optionally set to `false` to turn off the automatic filtering and sorting.
40
+ * If `false`, you must conditionally render valid items based on the search query yourself.
41
+ */
42
+ shouldFilter?: boolean;
43
+ /**
44
+ * Custom filter function for whether each command menu item should matches the given search query.
45
+ * It should return a number between 0 and 1, with 1 being the best match and 0 being hidden entirely.
46
+ * By default, uses the `command-score` library.
47
+ */
48
+ filter?: CommandFilter;
49
+ /**
50
+ * Optional default item value when it is initially rendered.
51
+ */
52
+ defaultValue?: string;
53
+ /**
54
+ * Optional controlled state of the selected command menu item.
55
+ */
56
+ value?: string;
57
+ /**
58
+ * Event handler called when the selected item of the menu changes.
59
+ */
60
+ onValueChange?: (value: string) => void;
61
+ /**
62
+ * Optionally set to `true` to turn on looping around when using the arrow keys.
63
+ */
64
+ loop?: boolean;
65
+ /**
66
+ * Optionally set to `true` to disable selection via pointer events.
67
+ */
68
+ disablePointerSelection?: boolean;
69
+ /**
70
+ * Set to `false` to disable ctrl+n/j/p/k shortcuts. Defaults to `true`.
71
+ */
72
+ vimBindings?: boolean;
73
+ } & React.RefAttributes<HTMLDivElement>>;
74
+ /**
75
+ * Command menu item. Becomes active on pointer enter or through keyboard navigation.
76
+ * Preferably pass a `value`, otherwise the value will be inferred from `children` or
77
+ * the rendered item's `textContent`.
78
+ */
79
+ declare const Item: React.ForwardRefExoticComponent<Children & Omit<DivProps, "onSelect" | "disabled" | "value"> & {
80
+ /** Whether this item is currently disabled. */
81
+ disabled?: boolean;
82
+ /** Event handler for when this item is selected, either via click or keyboard selection. */
83
+ onSelect?: (value: string) => void;
84
+ /**
85
+ * A unique value for this item.
86
+ * If no value is provided, it will be inferred from `children` or the rendered `textContent`. If your `textContent` changes between renders, you _must_ provide a stable, unique `value`.
87
+ */
88
+ value?: string;
89
+ /** Optional keywords to match against when filtering. */
90
+ keywords?: string[];
91
+ /** Whether this item is forcibly rendered regardless of filtering. */
92
+ forceMount?: boolean;
93
+ } & React.RefAttributes<HTMLDivElement>>;
94
+ /**
95
+ * Group command menu items together with a heading.
96
+ * Grouped items are always shown together.
97
+ */
98
+ declare const Group: React.ForwardRefExoticComponent<Children & Omit<DivProps, "value" | "heading"> & {
99
+ /** Optional heading to render for this group. */
100
+ heading?: React.ReactNode;
101
+ /** If no heading is provided, you must provide a value that is unique for this group. */
102
+ value?: string;
103
+ /** Whether this group is forcibly rendered regardless of filtering. */
104
+ forceMount?: boolean;
105
+ } & React.RefAttributes<HTMLDivElement>>;
106
+ /**
107
+ * A visual and semantic separator between items or groups.
108
+ * Visible when the search query is empty or `alwaysRender` is true, hidden otherwise.
109
+ */
110
+ declare const Separator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
111
+ render?: useRender.RenderProp<Record<string, unknown>> | undefined;
112
+ } & {
113
+ /** Whether this separator should always be rendered. Useful if you disable automatic filtering. */
114
+ alwaysRender?: boolean;
115
+ } & React.RefAttributes<HTMLDivElement>>;
116
+ /**
117
+ * Command menu input.
118
+ * All props are forwarded to the underyling `input` element.
119
+ */
120
+ declare const Input: React.ForwardRefExoticComponent<Omit<RenderableProps<"input", Record<string, unknown>>, "onChange" | "value" | "type"> & {
121
+ /**
122
+ * Optional controlled state for the value of the search input.
123
+ */
124
+ value?: string;
125
+ /**
126
+ * Event handler called when the search value changes.
127
+ */
128
+ onValueChange?: (search: string) => void;
129
+ } & React.RefAttributes<HTMLInputElement>>;
130
+ /**
131
+ * Contains `Item`, `Group`, and `Separator`.
132
+ * Use the `--cmdk-list-height` CSS variable to animate height based on the number of results.
133
+ */
134
+ declare const List: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
135
+ render?: useRender.RenderProp<Record<string, unknown>> | undefined;
136
+ } & {
137
+ /**
138
+ * Accessible label for this List of suggestions. Not shown visibly.
139
+ */
140
+ label?: string;
141
+ } & React.RefAttributes<HTMLDivElement>>;
142
+ /**
143
+ * Renders the command menu in a Base UI Dialog.
144
+ */
145
+ declare const Dialog: React.ForwardRefExoticComponent<Omit<BaseDialog.Root.Props<unknown>, "onOpenChange"> & Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
146
+ render?: useRender.RenderProp<Record<string, unknown>> | undefined;
147
+ } & {
148
+ /**
149
+ * Accessible label for this command menu. Not shown visibly.
150
+ */
151
+ label?: string;
152
+ /**
153
+ * Optionally set to `false` to turn off the automatic filtering and sorting.
154
+ * If `false`, you must conditionally render valid items based on the search query yourself.
155
+ */
156
+ shouldFilter?: boolean;
157
+ /**
158
+ * Custom filter function for whether each command menu item should matches the given search query.
159
+ * It should return a number between 0 and 1, with 1 being the best match and 0 being hidden entirely.
160
+ * By default, uses the `command-score` library.
161
+ */
162
+ filter?: CommandFilter;
163
+ /**
164
+ * Optional default item value when it is initially rendered.
165
+ */
166
+ defaultValue?: string;
167
+ /**
168
+ * Optional controlled state of the selected command menu item.
169
+ */
170
+ value?: string;
171
+ /**
172
+ * Event handler called when the selected item of the menu changes.
173
+ */
174
+ onValueChange?: (value: string) => void;
175
+ /**
176
+ * Optionally set to `true` to turn on looping around when using the arrow keys.
177
+ */
178
+ loop?: boolean;
179
+ /**
180
+ * Optionally set to `true` to disable selection via pointer events.
181
+ */
182
+ disablePointerSelection?: boolean;
183
+ /**
184
+ * Set to `false` to disable ctrl+n/j/p/k shortcuts. Defaults to `true`.
185
+ */
186
+ vimBindings?: boolean;
187
+ } & {
188
+ onOpenChange?: (open: boolean) => void;
189
+ /** Provide a className to the Dialog overlay. */
190
+ overlayClassName?: string;
191
+ /** Provide a className to the Dialog content. */
192
+ contentClassName?: string;
193
+ /** Provide a custom element the Dialog should portal into. */
194
+ container?: BaseDialog.Portal.Props["container"];
195
+ } & React.RefAttributes<HTMLDivElement>>;
196
+ /**
197
+ * Automatically renders when there are no results for the search query.
198
+ */
199
+ declare const Empty: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
200
+ render?: useRender.RenderProp<Record<string, unknown>> | undefined;
201
+ } & React.RefAttributes<HTMLDivElement>>;
202
+ /**
203
+ * You should conditionally render this with `progress` while loading asynchronous items.
204
+ */
205
+ declare const Loading: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
206
+ render?: useRender.RenderProp<Record<string, unknown>> | undefined;
207
+ } & {
208
+ /** Estimated progress of loading asynchronous options. */
209
+ progress?: number;
210
+ /**
211
+ * Accessible label for this loading progressbar. Not shown visibly.
212
+ */
213
+ label?: string;
214
+ } & React.RefAttributes<HTMLDivElement>>;
215
+ declare const pkg: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
216
+ render?: useRender.RenderProp<Record<string, unknown>> | undefined;
217
+ } & {
218
+ /**
219
+ * Accessible label for this command menu. Not shown visibly.
220
+ */
221
+ label?: string;
222
+ /**
223
+ * Optionally set to `false` to turn off the automatic filtering and sorting.
224
+ * If `false`, you must conditionally render valid items based on the search query yourself.
225
+ */
226
+ shouldFilter?: boolean;
227
+ /**
228
+ * Custom filter function for whether each command menu item should matches the given search query.
229
+ * It should return a number between 0 and 1, with 1 being the best match and 0 being hidden entirely.
230
+ * By default, uses the `command-score` library.
231
+ */
232
+ filter?: CommandFilter;
233
+ /**
234
+ * Optional default item value when it is initially rendered.
235
+ */
236
+ defaultValue?: string;
237
+ /**
238
+ * Optional controlled state of the selected command menu item.
239
+ */
240
+ value?: string;
241
+ /**
242
+ * Event handler called when the selected item of the menu changes.
243
+ */
244
+ onValueChange?: (value: string) => void;
245
+ /**
246
+ * Optionally set to `true` to turn on looping around when using the arrow keys.
247
+ */
248
+ loop?: boolean;
249
+ /**
250
+ * Optionally set to `true` to disable selection via pointer events.
251
+ */
252
+ disablePointerSelection?: boolean;
253
+ /**
254
+ * Set to `false` to disable ctrl+n/j/p/k shortcuts. Defaults to `true`.
255
+ */
256
+ vimBindings?: boolean;
257
+ } & React.RefAttributes<HTMLDivElement>> & {
258
+ List: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
259
+ render?: useRender.RenderProp<Record<string, unknown>> | undefined;
260
+ } & {
261
+ /**
262
+ * Accessible label for this List of suggestions. Not shown visibly.
263
+ */
264
+ label?: string;
265
+ } & React.RefAttributes<HTMLDivElement>>;
266
+ Item: React.ForwardRefExoticComponent<Children & Omit<DivProps, "onSelect" | "disabled" | "value"> & {
267
+ /** Whether this item is currently disabled. */
268
+ disabled?: boolean;
269
+ /** Event handler for when this item is selected, either via click or keyboard selection. */
270
+ onSelect?: (value: string) => void;
271
+ /**
272
+ * A unique value for this item.
273
+ * If no value is provided, it will be inferred from `children` or the rendered `textContent`. If your `textContent` changes between renders, you _must_ provide a stable, unique `value`.
274
+ */
275
+ value?: string;
276
+ /** Optional keywords to match against when filtering. */
277
+ keywords?: string[];
278
+ /** Whether this item is forcibly rendered regardless of filtering. */
279
+ forceMount?: boolean;
280
+ } & React.RefAttributes<HTMLDivElement>>;
281
+ Input: React.ForwardRefExoticComponent<Omit<RenderableProps<"input", Record<string, unknown>>, "onChange" | "value" | "type"> & {
282
+ /**
283
+ * Optional controlled state for the value of the search input.
284
+ */
285
+ value?: string;
286
+ /**
287
+ * Event handler called when the search value changes.
288
+ */
289
+ onValueChange?: (search: string) => void;
290
+ } & React.RefAttributes<HTMLInputElement>>;
291
+ Group: React.ForwardRefExoticComponent<Children & Omit<DivProps, "value" | "heading"> & {
292
+ /** Optional heading to render for this group. */
293
+ heading?: React.ReactNode;
294
+ /** If no heading is provided, you must provide a value that is unique for this group. */
295
+ value?: string;
296
+ /** Whether this group is forcibly rendered regardless of filtering. */
297
+ forceMount?: boolean;
298
+ } & React.RefAttributes<HTMLDivElement>>;
299
+ Separator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
300
+ render?: useRender.RenderProp<Record<string, unknown>> | undefined;
301
+ } & {
302
+ /** Whether this separator should always be rendered. Useful if you disable automatic filtering. */
303
+ alwaysRender?: boolean;
304
+ } & React.RefAttributes<HTMLDivElement>>;
305
+ Dialog: React.ForwardRefExoticComponent<Omit<BaseDialog.Root.Props<unknown>, "onOpenChange"> & Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
306
+ render?: useRender.RenderProp<Record<string, unknown>> | undefined;
307
+ } & {
308
+ /**
309
+ * Accessible label for this command menu. Not shown visibly.
310
+ */
311
+ label?: string;
312
+ /**
313
+ * Optionally set to `false` to turn off the automatic filtering and sorting.
314
+ * If `false`, you must conditionally render valid items based on the search query yourself.
315
+ */
316
+ shouldFilter?: boolean;
317
+ /**
318
+ * Custom filter function for whether each command menu item should matches the given search query.
319
+ * It should return a number between 0 and 1, with 1 being the best match and 0 being hidden entirely.
320
+ * By default, uses the `command-score` library.
321
+ */
322
+ filter?: CommandFilter;
323
+ /**
324
+ * Optional default item value when it is initially rendered.
325
+ */
326
+ defaultValue?: string;
327
+ /**
328
+ * Optional controlled state of the selected command menu item.
329
+ */
330
+ value?: string;
331
+ /**
332
+ * Event handler called when the selected item of the menu changes.
333
+ */
334
+ onValueChange?: (value: string) => void;
335
+ /**
336
+ * Optionally set to `true` to turn on looping around when using the arrow keys.
337
+ */
338
+ loop?: boolean;
339
+ /**
340
+ * Optionally set to `true` to disable selection via pointer events.
341
+ */
342
+ disablePointerSelection?: boolean;
343
+ /**
344
+ * Set to `false` to disable ctrl+n/j/p/k shortcuts. Defaults to `true`.
345
+ */
346
+ vimBindings?: boolean;
347
+ } & {
348
+ onOpenChange?: (open: boolean) => void;
349
+ /** Provide a className to the Dialog overlay. */
350
+ overlayClassName?: string;
351
+ /** Provide a className to the Dialog content. */
352
+ contentClassName?: string;
353
+ /** Provide a custom element the Dialog should portal into. */
354
+ container?: BaseDialog.Portal.Props["container"];
355
+ } & React.RefAttributes<HTMLDivElement>>;
356
+ Empty: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
357
+ render?: useRender.RenderProp<Record<string, unknown>> | undefined;
358
+ } & React.RefAttributes<HTMLDivElement>>;
359
+ Loading: React.ForwardRefExoticComponent<Children & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
360
+ render?: useRender.RenderProp<Record<string, unknown>> | undefined;
361
+ } & {
362
+ /** Estimated progress of loading asynchronous options. */
363
+ progress?: number;
364
+ /**
365
+ * Accessible label for this loading progressbar. Not shown visibly.
366
+ */
367
+ label?: string;
368
+ } & React.RefAttributes<HTMLDivElement>>;
369
+ };
370
+ /** Run a selector against the store state. */
371
+ declare function useCmdk<T = any>(selector: (state: State) => T): T;
372
+
373
+ export {
374
+ Command as CommandRoot,
375
+ Dialog as CommandDialog,
376
+ Empty as CommandEmpty,
377
+ Group as CommandGroup,
378
+ Input as CommandInput,
379
+ Item as CommandItem,
380
+ List as CommandList,
381
+ Loading as CommandLoading,
382
+ Separator as CommandSeparator,
383
+ pkg as Command,
384
+ useCmdk as useCommandState,
385
+ };
386
+
387
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ var K7=Object.create;var{getPrototypeOf:W7,defineProperty:c8,getOwnPropertyNames:U7}=Object;var z7=Object.prototype.hasOwnProperty;var cQ=(Q,Z,J)=>{J=Q!=null?K7(W7(Q)):{};let X=Z||!Q||!Q.__esModule?c8(J,"default",{value:Q,enumerable:!0}):J;for(let q of U7(Q))if(!z7.call(X,q))c8(X,q,{get:()=>Q[q],enumerable:!0});return X};var dQ=(Q,Z)=>()=>(Z||Q((Z={exports:{}}).exports,Z),Z.exports);var iQ=(Q,Z)=>{for(var J in Z)c8(Q,J,{get:Z[J],enumerable:!0,configurable:!0,set:(X)=>Z[J]=()=>X})};import*as M0 from"react";var TQ=dQ((M9)=>{(function(){function Q(z,B){return z===B&&(z!==0||1/z===1/B)||z!==z&&B!==B}function Z(z,B){Y||M0.startTransition===void 0||(Y=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var L=B();if(!U){var j=B();q(L,j)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),U=!0)}j=$({inst:{value:L,getSnapshot:B}});var M=j[0].inst,w=j[1];return W(function(){M.value=L,M.getSnapshot=B,J(M)&&w({inst:M})},[z,L,B]),G(function(){return J(M)&&w({inst:M}),z(function(){J(M)&&w({inst:M})})},[z]),K(L),L}function J(z){var B=z.getSnapshot;z=z.value;try{var L=B();return!q(z,L)}catch(j){return!0}}function X(z,B){return B()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var q=typeof Object.is==="function"?Object.is:Q,$=M0.useState,G=M0.useEffect,W=M0.useLayoutEffect,K=M0.useDebugValue,Y=!1,U=!1,H=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?X:Z;M9.useSyncExternalStore=M0.useSyncExternalStore!==void 0?M0.useSyncExternalStore:H,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});import*as P0 from"react";var K5=dQ((N9)=>{(function(){function Q(K,Y){return K===Y&&(K!==0||1/K===1/Y)||K!==K&&Y!==Y}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Z=TQ(),J=typeof Object.is==="function"?Object.is:Q,X=Z.useSyncExternalStore,q=P0.useRef,$=P0.useEffect,G=P0.useMemo,W=P0.useDebugValue;N9.useSyncExternalStoreWithSelector=function(K,Y,U,H,z){var B=q(null);if(B.current===null){var L={hasValue:!1,value:null};B.current=L}else L=B.current;B=G(function(){function M(O){if(!w){if(w=!0,A=O,O=H(O),z!==void 0&&L.hasValue){var I=L.value;if(z(I,O))return x=I}return x=O}if(I=x,J(A,O))return I;var D=H(O);if(z!==void 0&&z(I,D))return A=O,I;return A=O,x=D}var w=!1,A,x,N=U===void 0?null:U;return[function(){return M(Y())},N===null?void 0:function(){return M(N())}]},[Y,U,H,z]);var j=X(K,B[0],B[1]);return $(function(){L.hasValue=!0,L.value=j},[j]),W(j),j},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var Q1={};iQ(Q1,{createHandle:()=>r5,Viewport:()=>hQ,Trigger:()=>bQ,Title:()=>RQ,Root:()=>i5,Portal:()=>CQ,Popup:()=>yQ,Handle:()=>u8,Description:()=>ZQ,Close:()=>QQ,Backdrop:()=>s8});import*as J8 from"react";import*as n1 from"react";var o1=n1.createContext(void 0);o1.displayName="DialogRootContext";function X0(Q){let Z=n1.useContext(o1);if(Q===!1&&Z===void 0)throw Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");return Z}import*as Z8 from"react";import*as rQ from"react";var lQ={};function W0(Q,Z){let J=rQ.useRef(lQ);if(J.current===lQ)J.current=Q(Z);return J}function $1(Q,Z,J,X){let q=W0(aQ).current;if(B7(q,Q,Z,J,X))nQ(q,[Q,Z,J,X]);return q.callback}function sQ(Q){let Z=W0(aQ).current;if(H7(Z,Q))nQ(Z,Q);return Z.callback}function aQ(){return{callback:null,cleanup:null,refs:[]}}function B7(Q,Z,J,X,q){return Q.refs[0]!==Z||Q.refs[1]!==J||Q.refs[2]!==X||Q.refs[3]!==q}function H7(Q,Z){return Q.refs.length!==Z.length||Q.refs.some((J,X)=>J!==Z[X])}function nQ(Q,Z){if(Q.refs=Z,Z.every((J)=>J==null)){Q.callback=null;return}Q.callback=(J)=>{if(Q.cleanup)Q.cleanup(),Q.cleanup=null;if(J!=null){let X=Array(Z.length).fill(null);for(let q=0;q<Z.length;q+=1){let $=Z[q];if($==null)continue;switch(typeof $){case"function":{let G=$(J);if(typeof G==="function")X[q]=G;break}case"object":{$.current=J;break}default:}}Q.cleanup=()=>{for(let q=0;q<Z.length;q+=1){let $=Z[q];if($==null)continue;switch(typeof $){case"function":{let G=X[q];if(typeof G==="function")G();else $(null);break}case"object":{$.current=null;break}default:}}}}}}import*as tQ from"react";import*as oQ from"react";var L7=parseInt(oQ.version,10);function G1(Q){return L7>=Q}function d8(Q){if(!tQ.isValidElement(Q))return null;let Z=Q,J=Z.props;return(G1(19)?J?.ref:Z.ref)??null}function w1(Q,Z){if(Q&&!Z)return Q;if(!Q&&Z)return Z;if(Q||Z)return{...Q,...Z};return}function eQ(Q,Z){let J={};for(let X in Q){let q=Q[X];if(Z?.hasOwnProperty(X)){let $=Z[X](q);if($!=null)Object.assign(J,$);continue}if(q===!0)J[`data-${X.toLowerCase()}`]="";else if(q)J[`data-${X.toLowerCase()}`]=q.toString()}return J}function Q6(Q,Z){return typeof Q==="function"?Q(Z):Q}function Z6(Q,Z){return typeof Q==="function"?Q(Z):Q}var D1={};function Y1(Q,Z,J,X,q){let $={...i8(Q,D1)};if(Z)$=O1($,Z);if(J)$=O1($,J);if(X)$=O1($,X);if(q)$=O1($,q);return $}function J6(Q){if(Q.length===0)return D1;if(Q.length===1)return i8(Q[0],D1);let Z={...i8(Q[0],D1)};for(let J=1;J<Q.length;J+=1)Z=O1(Z,Q[J]);return Z}function O1(Q,Z){if(X6(Z))return Z(Q);return _7(Q,Z)}function _7(Q,Z){if(!Z)return Q;for(let J in Z){let X=Z[J];switch(J){case"style":{Q[J]=w1(Q.style,X);break}case"className":{Q[J]=l8(Q.className,X);break}default:if(j7(J,X))Q[J]=V7(Q[J],X);else Q[J]=X}}return Q}function j7(Q,Z){let J=Q.charCodeAt(0),X=Q.charCodeAt(1),q=Q.charCodeAt(2);return J===111&&X===110&&q>=65&&q<=90&&(typeof Z==="function"||typeof Z>"u")}function X6(Q){return typeof Q==="function"}function i8(Q,Z){if(X6(Q))return Q(Z);return Q??D1}function V7(Q,Z){if(!Z)return Q;if(!Q)return Z;return(J)=>{if(F7(J)){let q=J;t1(q);let $=Z(q);if(!q.baseUIHandlerPrevented)Q?.(q);return $}let X=Z(J);return Q?.(J),X}}function t1(Q){return Q.preventBaseUIHandler=()=>{Q.baseUIHandlerPrevented=!0},Q}function l8(Q,Z){if(Z){if(Q)return Z+" "+Q;return Z}return Q}function F7(Q){return Q!=null&&typeof Q==="object"&&"nativeEvent"in Q}function e1(){}var M7=Object.freeze([]),J0=Object.freeze({});var Q8="data-base-ui-click-trigger";var q6={clipPath:"inset(50%)",position:"fixed",top:0,left:0};import{createElement as $6}from"react";function q0(Q,Z,J={}){let X=Z.render,q=N7(Z,J);if(J.enabled===!1)return null;let $=J.state??J0;return A7(Q,X,q,$)}function N7(Q,Z={}){let{className:J,style:X,render:q}=Q,{state:$=J0,ref:G,props:W,stateAttributesMapping:K,enabled:Y=!0}=Z,U=Y?Q6(J,$):void 0,H=Y?Z6(X,$):void 0,z=Y?eQ($,K):J0,B=Y?w1(z,Array.isArray(W)?J6(W):W)??J0:J0;if(typeof document<"u")if(!Y)$1(null,null);else if(Array.isArray(G))B.ref=sQ([B.ref,d8(q),...G]);else B.ref=$1(B.ref,d8(q),G);if(!Y)return J0;if(U!==void 0)B.className=l8(B.className,U);if(H!==void 0)B.style=w1(B.style,H);return B}function A7(Q,Z,J,X){if(Z){if(typeof Z==="function")return Z(J,X);let q=Y1(J,Z.props);return q.ref=J.ref,Z8.cloneElement(Z,q)}if(Q){if(typeof Q==="string")return x7(Q,J)}throw Error("Base UI: Render element or function are not defined.")}function x7(Q,Z){if(Q==="button")return $6("button",{type:"button",...Z,key:Z.key});if(Q==="img")return $6("img",{alt:"",...Z,key:Z.key});return Z8.createElement(Q,Z)}var T1=function(Q){return Q.startingStyle="data-starting-style",Q.endingStyle="data-ending-style",Q}({}),w7={[T1.startingStyle]:""},O7={[T1.endingStyle]:""},K1={transitionStatus(Q){if(Q==="starting")return w7;if(Q==="ending")return O7;return null}};var j0=function(Q){return Q.open="data-open",Q.closed="data-closed",Q[Q.startingStyle=T1.startingStyle]="startingStyle",Q[Q.endingStyle=T1.endingStyle]="endingStyle",Q.anchorHidden="data-anchor-hidden",Q}({}),r8=function(Q){return Q.popupOpen="data-popup-open",Q.pressed="data-pressed",Q}({}),D7={[r8.popupOpen]:""},iJ={[r8.popupOpen]:"",[r8.pressed]:""},T7={[j0.open]:""},k7={[j0.closed]:""},I7={[j0.anchorHidden]:""},G6={open(Q){if(Q)return D7;return null}};var W1={open(Q){if(Q)return T7;return k7},anchorHidden(Q){if(Q)return I7;return null}};var S7={...W1,...K1},s8=J8.forwardRef(function(Z,J){let{render:X,className:q,forceRender:$=!1,...G}=Z,{store:W}=X0(),K=W.useState("open"),Y=W.useState("nested"),U=W.useState("mounted"),H=W.useState("transitionStatus"),z=J8.useMemo(()=>({open:K,transitionStatus:H}),[K,H]);return q0("div",Z,{state:z,ref:[W.context.backdropRef,J],stateAttributesMapping:S7,props:[{role:"presentation",hidden:!U,style:{userSelect:"none",WebkitUserSelect:"none"}},G],enabled:$||!Y})});s8.displayName="DialogBackdrop";import*as Y8 from"react";import*as r0 from"react";function q8(){return typeof window<"u"}function U1(Q){if($8(Q))return(Q.nodeName||"").toLowerCase();return"#document"}function V0(Q){var Z;return(Q==null||(Z=Q.ownerDocument)==null?void 0:Z.defaultView)||window}function y7(Q){var Z;return(Z=($8(Q)?Q.ownerDocument:Q.document)||window.document)==null?void 0:Z.documentElement}function $8(Q){if(!q8())return!1;return Q instanceof Node||Q instanceof V0(Q).Node}function S0(Q){if(!q8())return!1;return Q instanceof Element||Q instanceof V0(Q).Element}function F0(Q){if(!q8())return!1;return Q instanceof HTMLElement||Q instanceof V0(Q).HTMLElement}function X8(Q){if(!q8()||typeof ShadowRoot>"u")return!1;return Q instanceof ShadowRoot||Q instanceof V0(Q).ShadowRoot}var P7=new Set(["inline","contents"]);function k1(Q){let{overflow:Z,overflowX:J,overflowY:X,display:q}=S1(Q);return/auto|scroll|overlay|hidden|clip/.test(Z+X+J)&&!P7.has(q)}function Y6(){if(typeof CSS>"u"||!CSS.supports)return!1;return CSS.supports("-webkit-backdrop-filter","none")}var C7=new Set(["html","body","#document"]);function I1(Q){return C7.has(U1(Q))}function S1(Q){return V0(Q).getComputedStyle(Q)}function a8(Q){if(U1(Q)==="html")return Q;let Z=Q.assignedSlot||Q.parentNode||X8(Q)&&Q.host||y7(Q);return X8(Z)?Z.host:Z}function K6(Q){let Z=a8(Q);if(I1(Z))return Q.ownerDocument?Q.ownerDocument.body:Q.body;if(F0(Z)&&k1(Z))return Z;return K6(Z)}function h0(Q,Z,J){var X;if(Z===void 0)Z=[];if(J===void 0)J=!0;let q=K6(Q),$=q===((X=Q.ownerDocument)==null?void 0:X.body),G=V0(q);if($){let W=E7(G);return Z.concat(G,G.visualViewport||[],k1(q)?q:[],W&&J?h0(W):[])}return Z.concat(q,h0(q,[],J))}function E7(Q){return Q.parent&&Object.getPrototypeOf(Q.parent)?Q.frameElement:null}import*as o8 from"react";var n8=o8[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],h7=n8&&n8!==o8.useLayoutEffect?n8:(Q)=>Q();function R(Q){let Z=W0(R7).current;return Z.next=Q,h7(Z.effect),Z.trampoline}function R7(){let Q={next:void 0,callback:b7,trampoline:(...Z)=>Q.callback?.(...Z),effect:()=>{Q.callback=Q.next}};return Q}function b7(){throw Error("Base UI: Cannot call an event handler while rendering.")}var t8;t8=new Set;function e8(...Q){{let Z=Q.join(" ");if(!t8.has(Z))t8.add(Z),console.error(`Base UI: ${Z}`)}}import*as W6 from"react";var v7=()=>{},p=typeof document<"u"?W6.useLayoutEffect:v7;import*as G8 from"react";var U6=G8.createContext(void 0);U6.displayName="CompositeRootContext";function z6(Q=!1){let Z=G8.useContext(U6);if(Z===void 0&&!Q)throw Error("Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");return Z}import*as B6 from"react";function H6(Q){let{focusableWhenDisabled:Z,disabled:J,composite:X=!1,tabIndex:q=0,isNativeButton:$}=Q,G=X&&Z!==!1,W=X&&Z===!1;return{props:B6.useMemo(()=>{let Y={onKeyDown(U){if(J&&Z&&U.key!=="Tab")U.preventDefault()}};if(!X){if(Y.tabIndex=q,!$&&J)Y.tabIndex=Z?q:-1}if($&&(Z||G)||!$&&J)Y["aria-disabled"]=J;if($&&(!Z||W))Y.disabled=J;return Y},[X,J,Z,G,W,$,q])}}function y1(Q={}){let{disabled:Z=!1,focusableWhenDisabled:J,tabIndex:X=0,native:q=!0}=Q,$=r0.useRef(null),G=z6(!0)!==void 0,W=R(()=>{let z=$.current;return Boolean(z?.tagName==="A"&&z?.href)}),{props:K}=H6({focusableWhenDisabled:J,disabled:Z,composite:G,tabIndex:X,isNativeButton:q});r0.useEffect(()=>{if(!$.current)return;let z=$.current.tagName==="BUTTON";if(q){if(!z)e8("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`.")}else if(z)e8("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[q]);let Y=r0.useCallback(()=>{let z=$.current;if(!f7(z))return;if(G&&Z&&K.disabled===void 0&&z.disabled)z.disabled=!1},[Z,K.disabled,G]);p(Y,[Y]);let U=r0.useCallback((z={})=>{let{onClick:B,onMouseDown:L,onKeyUp:j,onKeyDown:M,onPointerDown:w,...A}=z;return Y1({type:q?"button":void 0,onClick(N){if(Z){N.preventDefault();return}B?.(N)},onMouseDown(N){if(!Z)L?.(N)},onKeyDown(N){if(!Z)t1(N),M?.(N);if(N.baseUIHandlerPrevented)return;let O=N.target===N.currentTarget&&!q&&!W()&&!Z,I=N.key==="Enter",D=N.key===" ";if(O){if(D||I)N.preventDefault();if(I)B?.(N)}},onKeyUp(N){if(!Z)t1(N),j?.(N);if(N.baseUIHandlerPrevented)return;if(N.target===N.currentTarget&&!q&&!Z&&N.key===" ")B?.(N)},onPointerDown(N){if(Z){N.preventDefault();return}w?.(N)}},!q?{role:"button"}:void 0,K,A)},[Z,K,q,W]),H=R((z)=>{$.current=z,Y()});return{getButtonProps:U,buttonRef:H}}function f7(Q){return F0(Q)&&Q.tagName==="BUTTON"}var r={};iQ(r,{windowResize:()=>LZ,wheel:()=>KZ,triggerPress:()=>m7,triggerHover:()=>u7,triggerFocus:()=>p7,trackPress:()=>a7,siblingOpen:()=>zZ,scrub:()=>WZ,pointer:()=>GZ,outsidePress:()=>c7,none:()=>g7,listNavigation:()=>qZ,linkPress:()=>l7,keyboard:()=>$Z,itemPress:()=>d7,inputPaste:()=>ZZ,inputClear:()=>e7,inputChange:()=>t7,inputBlur:()=>QZ,incrementPress:()=>n7,imperativeAction:()=>HZ,focusOut:()=>JZ,escapeKey:()=>XZ,drag:()=>YZ,disabled:()=>BZ,decrementPress:()=>o7,closePress:()=>i7,clearPress:()=>r7,chipRemovePress:()=>s7,cancelOpen:()=>UZ});var g7="none",m7="trigger-press",u7="trigger-hover",p7="trigger-focus",c7="outside-press",d7="item-press",i7="close-press",l7="link-press",r7="clear-press",s7="chip-remove-press",a7="track-press",n7="increment-press",o7="decrement-press",t7="input-change",e7="input-clear",QZ="input-blur",ZZ="input-paste",JZ="focus-out",XZ="escape-key",qZ="list-navigation",$Z="keyboard",GZ="pointer",YZ="drag",KZ="wheel",WZ="scrub",UZ="cancel-open",zZ="sibling-open",BZ="disabled",HZ="imperative-action",LZ="window-resize";function Q0(Q,Z,J,X){let q=!1,$=!1,G=X??J0;return{reason:Q,event:Z??new Event("base-ui"),cancel(){q=!0},allowPropagation(){$=!0},get isCanceled(){return q},get isPropagationAllowed(){return $},trigger:J,...G}}var QQ=Y8.forwardRef(function(Z,J){let{render:X,className:q,disabled:$=!1,nativeButton:G=!0,...W}=Z,{store:K}=X0(),Y=K.useState("open");function U(L){if(Y)K.setOpen(!1,Q0(r.closePress,L.nativeEvent))}let{getButtonProps:H,buttonRef:z}=y1({disabled:$,native:G}),B=Y8.useMemo(()=>({disabled:$}),[$]);return q0("button",Z,{state:B,ref:[J,z],props:[{onClick:U},W,H]})});QQ.displayName="DialogClose";import*as V6 from"react";import*as K8 from"react";import*as _Z from"react";var L6={..._Z};var _6=0;function jZ(Q,Z="mui"){let[J,X]=K8.useState(Q),q=Q||J;return K8.useEffect(()=>{if(J==null)_6+=1,X(`${Z}-${_6}`)},[J,Z]),q}var j6=L6.useId;function R0(Q,Z){if(j6!==void 0){let J=j6();return Q??(Z?`${Z}-${J}`:J)}return jZ(Q,Z)}function z1(Q){return R0(Q,"base-ui")}var ZQ=V6.forwardRef(function(Z,J){let{render:X,className:q,id:$,...G}=Z,{store:W}=X0(),K=z1($);return W.useSyncedValueWithCleanup("descriptionElementId",K),q0("p",Z,{ref:J,props:[{id:K},G]})});ZQ.displayName="DialogDescription";import*as f8 from"react";import*as F6 from"react";var VZ=[];function W8(Q){F6.useEffect(Q,VZ)}var P1=0;class b0{static create(){return new b0}currentId=P1;start(Q,Z){this.clear(),this.currentId=setTimeout(()=>{this.currentId=P1,Z()},Q)}isStarted(){return this.currentId!==P1}clear=()=>{if(this.currentId!==P1)clearTimeout(this.currentId),this.currentId=P1};disposeEffect=()=>{return this.clear}}function v0(){let Q=W0(b0.create).current;return W8(Q.disposeEffect),Q}function s0(Q){let Z=W0(FZ,Q).current;return Z.next=Q,p(Z.effect),Z}function FZ(Q){let Z={current:Q,next:Q,effect:()=>{Z.current=Z.next}};return Z}var f0=typeof navigator<"u",JQ=MZ(),M6=AZ(),U8=NZ(),N6=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),A6=JQ.platform==="MacIntel"&&JQ.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(JQ.platform),mX=f0&&/firefox/i.test(U8),x6=f0&&/apple/i.test(navigator.vendor),uX=f0&&/Edg/i.test(U8),z8=f0&&/android/i.test(M6)||/android/i.test(U8),pX=f0&&M6.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,w6=U8.includes("jsdom/");function MZ(){if(!f0)return{platform:"",maxTouchPoints:-1};let Q=navigator.userAgentData;if(Q?.platform)return{platform:Q.platform,maxTouchPoints:navigator.maxTouchPoints};return{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function NZ(){if(!f0)return"";let Q=navigator.userAgentData;if(Q&&Array.isArray(Q.brands))return Q.brands.map(({brand:Z,version:J})=>`${Z}/${J}`).join(" ");return navigator.userAgent}function AZ(){if(!f0)return"";let Q=navigator.userAgentData;if(Q?.platform)return Q.platform;return navigator.platform??""}var C1="data-base-ui-focusable",XQ="active",qQ="selected",O6="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function g0(Q){let Z=Q.activeElement;while(Z?.shadowRoot?.activeElement!=null)Z=Z.shadowRoot.activeElement;return Z}function s(Q,Z){if(!Q||!Z)return!1;let J=Z.getRootNode?.();if(Q.contains(Z))return!0;if(J&&X8(J)){let X=Z;while(X){if(Q===X)return!0;X=X.parentNode||X.host}}return!1}function B0(Q){if("composedPath"in Q)return Q.composedPath()[0];return Q.target}function A0(Q,Z){if(Z==null)return!1;if("composedPath"in Q)return Q.composedPath().includes(Z);let J=Q;return J.target!=null&&Z.contains(J.target)}function D6(Q){return Q.matches("html,body")}function $0(Q){return Q?.ownerDocument||document}function $Q(Q){return F0(Q)&&Q.matches(O6)}function GQ(Q){if(!Q)return!1;return Q.getAttribute("role")==="combobox"&&$Q(Q)}function E1(Q){if(!Q)return null;return Q.hasAttribute(C1)?Q:Q.querySelector(`[${C1}]`)||Q}function m0(Q,Z,J=!0){return Q.filter((q)=>q.parentId===Z&&(!J||q.context?.open)).flatMap((q)=>[q,...m0(Q,q.id,J)])}function YQ(Q,Z){let J=[],X=Q.find((q)=>q.id===Z)?.parentId;while(X){let q=Q.find(($)=>$.id===X);if(X=q?.parentId,q)J=J.concat(q)}return J}function T6(Q){Q.preventDefault(),Q.stopPropagation()}function k6(Q){return"nativeEvent"in Q}function I6(Q){if(Q.mozInputSource===0&&Q.isTrusted)return!0;if(z8&&Q.pointerType)return Q.type==="click"&&Q.buttons===1;return Q.detail===0&&!Q.pointerType}function S6(Q){if(w6)return!1;return!z8&&Q.width===0&&Q.height===0||z8&&Q.width===1&&Q.height===1&&Q.pressure===0&&Q.detail===0&&Q.pointerType==="mouse"||Q.width<1&&Q.height<1&&Q.pressure===0&&Q.detail===0&&Q.pointerType==="touch"}function KQ(Q,Z){let J=["mouse","pen"];if(!Z)J.push("",void 0);return J.includes(Q)}function B8(Q){let Z=Q.type;return Z==="click"||Z==="mousedown"||Z==="keydown"||Z==="keyup"}/*!
2
+ * tabbable 6.3.0
3
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4
+ */var xZ=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],H8=xZ.join(","),P6=typeof Element>"u",B1=P6?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,L8=!P6&&Element.prototype.getRootNode?function(Q){var Z;return Q===null||Q===void 0?void 0:(Z=Q.getRootNode)===null||Z===void 0?void 0:Z.call(Q)}:function(Q){return Q===null||Q===void 0?void 0:Q.ownerDocument},h1=function(Z,J){var X;if(J===void 0)J=!0;var q=Z===null||Z===void 0?void 0:(X=Z.getAttribute)===null||X===void 0?void 0:X.call(Z,"inert"),$=q===""||q==="true",G=$||J&&Z&&h1(Z.parentNode);return G},wZ=function(Z){var J,X=Z===null||Z===void 0?void 0:(J=Z.getAttribute)===null||J===void 0?void 0:J.call(Z,"contenteditable");return X===""||X==="true"},C6=function(Z,J,X){if(h1(Z))return[];var q=Array.prototype.slice.apply(Z.querySelectorAll(H8));if(J&&B1.call(Z,H8))q.unshift(Z);return q=q.filter(X),q},_8=function(Z,J,X){var q=[],$=Array.from(Z);while($.length){var G=$.shift();if(h1(G,!1))continue;if(G.tagName==="SLOT"){var W=G.assignedElements(),K=W.length?W:G.children,Y=_8(K,!0,X);if(X.flatten)q.push.apply(q,Y);else q.push({scopeParent:G,candidates:Y})}else{var U=B1.call(G,H8);if(U&&X.filter(G)&&(J||!Z.includes(G)))q.push(G);var H=G.shadowRoot||typeof X.getShadowRoot==="function"&&X.getShadowRoot(G),z=!h1(H,!1)&&(!X.shadowRootFilter||X.shadowRootFilter(G));if(H&&z){var B=_8(H===!0?G.children:H.children,!0,X);if(X.flatten)q.push.apply(q,B);else q.push({scopeParent:G,candidates:B})}else $.unshift.apply($,G.children)}}return q},E6=function(Z){return!isNaN(parseInt(Z.getAttribute("tabindex"),10))},h6=function(Z){if(!Z)throw Error("No node provided");if(Z.tabIndex<0){if((/^(AUDIO|VIDEO|DETAILS)$/.test(Z.tagName)||wZ(Z))&&!E6(Z))return 0}return Z.tabIndex},OZ=function(Z,J){var X=h6(Z);if(X<0&&J&&!E6(Z))return 0;return X},DZ=function(Z,J){return Z.tabIndex===J.tabIndex?Z.documentOrder-J.documentOrder:Z.tabIndex-J.tabIndex},R6=function(Z){return Z.tagName==="INPUT"},TZ=function(Z){return R6(Z)&&Z.type==="hidden"},kZ=function(Z){var J=Z.tagName==="DETAILS"&&Array.prototype.slice.apply(Z.children).some(function(X){return X.tagName==="SUMMARY"});return J},IZ=function(Z,J){for(var X=0;X<Z.length;X++)if(Z[X].checked&&Z[X].form===J)return Z[X]},SZ=function(Z){if(!Z.name)return!0;var J=Z.form||L8(Z),X=function(W){return J.querySelectorAll('input[type="radio"][name="'+W+'"]')},q;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape==="function")q=X(window.CSS.escape(Z.name));else try{q=X(Z.name)}catch(G){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",G.message),!1}var $=IZ(q,Z.form);return!$||$===Z},yZ=function(Z){return R6(Z)&&Z.type==="radio"},PZ=function(Z){return yZ(Z)&&!SZ(Z)},CZ=function(Z){var J,X=Z&&L8(Z),q=(J=X)===null||J===void 0?void 0:J.host,$=!1;if(X&&X!==Z){var G,W,K;$=!!((G=q)!==null&&G!==void 0&&(W=G.ownerDocument)!==null&&W!==void 0&&W.contains(q)||Z!==null&&Z!==void 0&&(K=Z.ownerDocument)!==null&&K!==void 0&&K.contains(Z));while(!$&&q){var Y,U,H;X=L8(q),q=(Y=X)===null||Y===void 0?void 0:Y.host,$=!!((U=q)!==null&&U!==void 0&&(H=U.ownerDocument)!==null&&H!==void 0&&H.contains(q))}}return $},y6=function(Z){var J=Z.getBoundingClientRect(),X=J.width,q=J.height;return X===0&&q===0},EZ=function(Z,J){var{displayCheck:X,getShadowRoot:q}=J;if(X==="full-native"){if("checkVisibility"in Z){var $=Z.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!$}}if(getComputedStyle(Z).visibility==="hidden")return!0;var G=B1.call(Z,"details>summary:first-of-type"),W=G?Z.parentElement:Z;if(B1.call(W,"details:not([open]) *"))return!0;if(!X||X==="full"||X==="full-native"||X==="legacy-full"){if(typeof q==="function"){var K=Z;while(Z){var Y=Z.parentElement,U=L8(Z);if(Y&&!Y.shadowRoot&&q(Y)===!0)return y6(Z);else if(Z.assignedSlot)Z=Z.assignedSlot;else if(!Y&&U!==Z.ownerDocument)Z=U.host;else Z=Y}Z=K}if(CZ(Z))return!Z.getClientRects().length;if(X!=="legacy-full")return!0}else if(X==="non-zero-area")return y6(Z);return!1},hZ=function(Z){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(Z.tagName)){var J=Z.parentElement;while(J){if(J.tagName==="FIELDSET"&&J.disabled){for(var X=0;X<J.children.length;X++){var q=J.children.item(X);if(q.tagName==="LEGEND")return B1.call(J,"fieldset[disabled] *")?!0:!q.contains(Z)}return!0}J=J.parentElement}}return!1},WQ=function(Z,J){if(J.disabled||h1(J)||TZ(J)||EZ(J,Z)||kZ(J)||hZ(J))return!1;return!0},UQ=function(Z,J){if(PZ(J)||h6(J)<0||!WQ(Z,J))return!1;return!0},RZ=function(Z){var J=parseInt(Z.getAttribute("tabindex"),10);if(isNaN(J)||J>=0)return!0;return!1},b6=function(Z){var J=[],X=[];return Z.forEach(function(q,$){var G=!!q.scopeParent,W=G?q.scopeParent:q,K=OZ(W,G),Y=G?b6(q.candidates):W;if(K===0)G?J.push.apply(J,Y):J.push(W);else X.push({documentOrder:$,tabIndex:K,item:q,isScope:G,content:Y})}),X.sort(DZ).reduce(function(q,$){return $.isScope?q.push.apply(q,$.content):q.push($.content),q},[]).concat(J)},H1=function(Z,J){J=J||{};var X;if(J.getShadowRoot)X=_8([Z],J.includeContainer,{filter:UQ.bind(null,J),flatten:!1,getShadowRoot:J.getShadowRoot,shadowRootFilter:RZ});else X=C6(Z,J.includeContainer,UQ.bind(null,J));return b6(X)},v6=function(Z,J){J=J||{};var X;if(J.getShadowRoot)X=_8([Z],J.includeContainer,{filter:WQ.bind(null,J),flatten:!0,getShadowRoot:J.getShadowRoot});else X=C6(Z,J.includeContainer,WQ.bind(null,J));return X},zQ=function(Z,J){if(J=J||{},!Z)throw Error("No node provided");if(B1.call(Z,H8)===!1)return!1;return UQ(J,Z)};var L1=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function f6(Q,Z){let J=H1(Q,L1()),X=J.length;if(X===0)return;let q=g0($0(Q)),$=J.indexOf(q),G=$===-1?Z===1?0:X-1:$+Z;return J[G]}function j8(Q){return f6($0(Q).body,1)||Q}function V8(Q){return f6($0(Q).body,-1)||Q}function a0(Q,Z){let J=Z||Q.currentTarget,X=Q.relatedTarget;return!X||!s(J,X)}function g6(Q){H1(Q,L1()).forEach((J)=>{J.dataset.tabindex=J.getAttribute("tabindex")||"",J.setAttribute("tabindex","-1")})}function BQ(Q){Q.querySelectorAll("[data-tabindex]").forEach((J)=>{let X=J.dataset.tabindex;if(delete J.dataset.tabindex,X)J.setAttribute("tabindex",X);else J.removeAttribute("tabindex")})}import*as n0 from"react";function m6(){let Q=new Map;return{emit(Z,J){Q.get(Z)?.forEach((X)=>X(J))},on(Z,J){if(!Q.has(Z))Q.set(Z,new Set);Q.get(Z).add(J)},off(Z,J){Q.get(Z)?.delete(J)}}}import{jsx as Xq}from"react/jsx-runtime";var u6=n0.createContext(null);u6.displayName="FloatingNodeContext";var p6=n0.createContext(null);p6.displayName="FloatingTreeContext";var F8=()=>n0.useContext(u6)?.id||null,M8=(Q)=>{let Z=n0.useContext(p6);return Q??Z};function o0(Q){return`data-base-ui-${Q}`}import*as Z0 from"react";var N8={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1};var A8=null,Wq=globalThis.requestAnimationFrame;class c6{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=(Q)=>{this.isScheduled=!1;let Z=this.callbacks,J=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,J>0)for(let X=0;X<Z.length;X+=1)Z[X]?.(Q)};request(Q){let Z=this.nextId;this.nextId+=1,this.callbacks.push(Q),this.callbacksCount+=1;let J=!1;if(!this.isScheduled||J)requestAnimationFrame(this.tick),this.isScheduled=!0;return Z}cancel(Q){let Z=Q-this.startId;if(Z<0||Z>=this.callbacks.length)return;this.callbacks[Z]=null,this.callbacksCount-=1}}var x8=new c6;class x0{static create(){return new x0}static request(Q){return x8.request(Q)}static cancel(Q){return x8.cancel(Q)}currentId=A8;request(Q){this.cancel(),this.currentId=x8.request(()=>{this.currentId=A8,Q()})}cancel=()=>{if(this.currentId!==A8)x8.cancel(this.currentId),this.currentId=A8};disposeEffect=()=>{return this.cancel}}function _1(){let Q=W0(x0.create).current;return W8(Q.disposeEffect),Q}function R1(Q){return Q?.ownerDocument||document}import*as w8 from"react";import{jsx as bZ}from"react/jsx-runtime";var t0=w8.forwardRef(function(Z,J){let[X,q]=w8.useState();return p(()=>{if(x6)q("button")},[]),bZ("span",{...Z,ref:J,style:N8,"aria-hidden":X?void 0:!0,...{tabIndex:0,role:X},"data-base-ui-focus-guard":""})});t0.displayName="FocusGuard";var d6=0;function O8(Q,Z={}){let{preventScroll:J=!1,cancelPrevious:X=!0,sync:q=!1}=Z;if(X)cancelAnimationFrame(d6);let $=()=>Q?.focus({preventScroll:J});if(q)$();else d6=requestAnimationFrame($)}var j1={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function i6(Q){if(Q==="inert")return j1.inert;if(Q==="aria-hidden")return j1["aria-hidden"];return j1.none}var D8=new WeakSet,T8={},HQ=0;var l6=(Q)=>Q&&(Q.host||l6(Q.parentNode)),vZ=(Q,Z)=>Z.map((J)=>{if(Q.contains(J))return J;let X=l6(J);if(Q.contains(X))return X;return null}).filter((J)=>J!=null);function fZ(Q,Z,J,X){let $=X?"inert":J?"aria-hidden":null,G=vZ(Z,Q),W=new Set,K=new Set(G),Y=[];if(!T8["data-base-ui-inert"])T8["data-base-ui-inert"]=new WeakMap;let U=T8["data-base-ui-inert"];G.forEach(H),z(Z),W.clear();function H(B){if(!B||W.has(B))return;if(W.add(B),B.parentNode)H(B.parentNode)}function z(B){if(!B||K.has(B))return;[].forEach.call(B.children,(L)=>{if(U1(L)==="script")return;if(W.has(L))z(L);else{let j=$?L.getAttribute($):null,M=j!==null&&j!=="false",w=i6($),A=(w.get(L)||0)+1,x=(U.get(L)||0)+1;if(w.set(L,A),U.set(L,x),Y.push(L),A===1&&M)D8.add(L);if(x===1)L.setAttribute("data-base-ui-inert","");if(!M&&$)L.setAttribute($,$==="inert"?"":"true")}})}return HQ+=1,()=>{if(Y.forEach((B)=>{let L=i6($),M=(L.get(B)||0)-1,w=(U.get(B)||0)-1;if(L.set(B,M),U.set(B,w),!M){if(!D8.has(B)&&$)B.removeAttribute($);D8.delete(B)}if(!w)B.removeAttribute("data-base-ui-inert")}),HQ-=1,!HQ)j1.inert=new WeakMap,j1["aria-hidden"]=new WeakMap,j1.none=new WeakMap,D8=new WeakSet,T8={}}}function r6(Q,Z=!1,J=!1){let X=$0(Q[0]).body;return fZ(Q.concat(Array.from(X.querySelectorAll("[aria-live]"))),X,Z,J)}import*as t from"react";import*as _Q from"react-dom";import{jsx as LQ,jsxs as s6}from"react/jsx-runtime";var jQ=t.createContext(null);jQ.displayName="PortalContext";var VQ=()=>t.useContext(jQ),gZ=o0("portal");function a6(Q={}){let{ref:Z,container:J,componentProps:X=J0,elementProps:q,elementState:$}=Q,G=R0(),K=VQ()?.portalNode,[Y,U]=t.useState(null),[H,z]=t.useState(null),B=t.useRef(null);p(()=>{if(J===null){if(B.current)B.current=null,z(null),U(null);return}if(G==null)return;let M=(J&&($8(J)?J:J.current))??K??document.body;if(M==null){if(B.current)B.current=null,z(null),U(null);return}if(B.current!==M)B.current=M,z(null),U(M)},[J,K,G]);let L=q0("div",X,{ref:[Z,z],state:$,props:[{id:G,[gZ]:""},q]});return{portalNode:H,portalSubtree:Y&&L?_Q.createPortal(L,Y):null}}var k8=t.forwardRef(function(Z,J){let{children:X,container:q,className:$,render:G,renderGuards:W,...K}=Z,{portalNode:Y,portalSubtree:U}=a6({container:q,ref:J,componentProps:Z,elementProps:K}),H=t.useRef(null),z=t.useRef(null),B=t.useRef(null),L=t.useRef(null),[j,M]=t.useState(null),w=j?.modal,A=j?.open,x=typeof W==="boolean"?W:!!j&&!j.modal&&j.open&&!!Y;t.useEffect(()=>{if(!Y||w)return;function O(I){if(Y&&a0(I))(I.type==="focusin"?BQ:g6)(Y)}return Y.addEventListener("focusin",O,!0),Y.addEventListener("focusout",O,!0),()=>{Y.removeEventListener("focusin",O,!0),Y.removeEventListener("focusout",O,!0)}},[Y,w]),t.useEffect(()=>{if(!Y||A)return;BQ(Y)},[A,Y]);let N=t.useMemo(()=>({beforeOutsideRef:H,afterOutsideRef:z,beforeInsideRef:B,afterInsideRef:L,portalNode:Y,setFocusManagerState:M}),[Y]);return s6(t.Fragment,{children:[U,s6(jQ.Provider,{value:N,children:[x&&Y&&LQ(t0,{"data-type":"outside",ref:H,onFocus:(O)=>{if(a0(O,Y))B.current?.focus();else{let I=j?j.domReference:null;V8(I)?.focus()}}}),x&&Y&&LQ("span",{"aria-owns":Y.id,style:q6}),Y&&_Q.createPortal(X,Y),x&&Y&&LQ(t0,{"data-type":"outside",ref:z,onFocus:(O)=>{if(a0(O,Y))L.current?.focus();else{let I=j?j.domReference:null;if(j8(I)?.focus(),j?.closeOnFocusOut)j?.onOpenChange(!1,Q0(r.focusOut,O.nativeEvent))}}})]})]})});k8.displayName="FloatingPortal";function y0(Q){if(Q==null)return Q;return"current"in Q?Q.current:Q}import{jsx as n6,jsxs as mZ}from"react/jsx-runtime";function uZ(Q,Z){let J=V0(Q.target);if(Q instanceof J.KeyboardEvent)return"keyboard";if(Q instanceof J.FocusEvent)return Z||"keyboard";if("pointerType"in Q)return Q.pointerType||"keyboard";if("touches"in Q)return"touch";if(Q instanceof J.MouseEvent)return Z||(Q.detail===0?"keyboard":"mouse");return""}var o6=20,u0=[];function MQ(){u0=u0.filter((Q)=>Q.isConnected)}function pZ(Q){if(MQ(),Q&&U1(Q)!=="body"){if(u0.push(Q),u0.length>o6)u0=u0.slice(-o6)}}function FQ(){return MQ(),u0[u0.length-1]}function cZ(Q){if(!Q)return null;let Z=L1();if(zQ(Q,Z))return Q;return H1(Q,Z)[0]||Q}function dZ(Q){if(!Q||!Q.isConnected)return!1;if(typeof Q.checkVisibility==="function")return Q.checkVisibility();return S1(Q).display!=="none"}function t6(Q,Z){if(!Z.current.includes("floating")&&!Q.getAttribute("role")?.includes("dialog"))return;let J=L1(),q=v6(Q,J).filter((G)=>{let W=G.getAttribute("data-tabindex")||"";return zQ(G,J)||G.hasAttribute("data-tabindex")&&!W.startsWith("-")}),$=Q.getAttribute("tabindex");if(Z.current.includes("floating")||q.length===0){if($!=="0")Q.setAttribute("tabindex","0")}else if($!=="-1"||Q.hasAttribute("data-tabindex")&&Q.getAttribute("data-tabindex")!=="-1")Q.setAttribute("tabindex","-1"),Q.setAttribute("data-tabindex","-1")}function NQ(Q){let{context:Z,children:J,disabled:X=!1,order:q=["content"],initialFocus:$=!0,returnFocus:G=!0,restoreFocus:W=!1,modal:K=!0,closeOnFocusOut:Y=!0,openInteractionType:U="",getInsideElements:H=()=>[],nextFocusableElement:z,previousFocusableElement:B,beforeContentFocusGuardRef:L,externalTree:j}=Q,M="rootStore"in Z?Z.rootStore:Z,w=M.useState("open"),A=M.useState("domReferenceElement"),x=M.useState("floatingElement"),{events:N,dataRef:O}=M.context,I=R(()=>O.current.floatingContext?.nodeId),D=R(H),C=$===!1,c=GQ(A)&&C,d=s0(q),a=s0($),G0=s0(G),D0=s0(U),Y0=M8(j),f=VQ(),K0=Z0.useRef(null),i0=Z0.useRef(null),e=Z0.useRef(!1),H0=Z0.useRef(!1),T0=Z0.useRef(!1),l0=Z0.useRef(-1),k0=Z0.useRef(""),L0=Z0.useRef(""),X1=v0(),_=v0(),b=_1(),S=f!=null,F=E1(x),E=R((k=F)=>{return k?H1(k,L1()):[]}),l=R((k)=>{let P=E(k);return d.current.map(()=>P).filter(Boolean).flat()});Z0.useEffect(()=>{if(X)return;if(!K)return;function k(n){if(n.key==="Tab"){if(s(F,g0($0(F)))&&E().length===0&&!c)T6(n)}}let P=$0(F);return P.addEventListener("keydown",k),()=>{P.removeEventListener("keydown",k)}},[X,A,F,K,d,c,E,l]),Z0.useEffect(()=>{if(X)return;if(!x)return;function k(P){let n=B0(P),o=E().indexOf(n);if(o!==-1)l0.current=o}return x.addEventListener("focusin",k),()=>{x.removeEventListener("focusin",k)}},[X,x,E]),Z0.useEffect(()=>{if(X||!w)return;let k=$0(F);function P(){T0.current=!1}function n(o){let T=B0(o),g=s(x,T)||s(A,T)||s(f?.portalNode,T);T0.current=!g,L0.current=o.pointerType||"keyboard"}function i(){L0.current="keyboard"}return k.addEventListener("pointerdown",n,!0),k.addEventListener("pointerup",P,!0),k.addEventListener("pointercancel",P,!0),k.addEventListener("keydown",i,!0),()=>{k.removeEventListener("pointerdown",n,!0),k.removeEventListener("pointerup",P,!0),k.removeEventListener("pointercancel",P,!0),k.removeEventListener("keydown",i,!0)}},[X,x,A,F,w,f]),Z0.useEffect(()=>{if(X)return;if(!Y)return;function k(){H0.current=!0,_.start(0,()=>{H0.current=!1})}function P(T){let{relatedTarget:g,currentTarget:I0}=T,_0=B0(T);queueMicrotask(()=>{let q1=I(),s1=M.context.triggerElements,p8=!(s(A,g)||s(x,g)||s(g,x)||s(f?.portalNode,g)||g!=null&&s1.hasElement(g)||s1.hasMatchingElement((N0)=>s(N0,g))||g?.hasAttribute(o0("focus-guard"))||Y0&&(m0(Y0.nodesRef.current,q1).find((N0)=>s(N0.context?.elements.floating,g)||s(N0.context?.elements.domReference,g))||YQ(Y0.nodesRef.current,q1).find((N0)=>[N0.context?.elements.floating,E1(N0.context?.elements.floating)].includes(g)||N0.context?.elements.domReference===g)));if(I0===A&&F)t6(F,d);if(W&&I0!==A&&!dZ(_0)&&g0($0(F))===$0(F).body){if(F0(F)){if(F.focus(),W==="popup"){b.request(()=>{F.focus()});return}}let N0=l0.current,x1=E(),a1=x1[N0]||x1[x1.length-1]||F;if(F0(a1))a1.focus()}if(O.current.insideReactTree){O.current.insideReactTree=!1;return}if((c?!0:!K)&&g&&p8&&!H0.current&&(c||g!==FQ()))e.current=!0,M.setOpen(!1,Q0(r.focusOut,T))})}function n(){if(T0.current)return;O.current.insideReactTree=!0,X1.start(0,()=>{O.current.insideReactTree=!1})}let i=F0(A)?A:null,o=[];if(!x&&!i)return;if(i)i.addEventListener("focusout",P),i.addEventListener("pointerdown",k),o.push(()=>{i.removeEventListener("focusout",P),i.removeEventListener("pointerdown",k)});if(x){if(x.addEventListener("focusout",P),f)x.addEventListener("focusout",n,!0),o.push(()=>{x.removeEventListener("focusout",n,!0)});o.push(()=>{x.removeEventListener("focusout",P)})}return()=>{o.forEach((T)=>{T()})}},[X,A,x,F,K,Y0,f,M,Y,W,E,c,I,d,O,X1,_,b]);let V=Z0.useRef(null),v=Z0.useRef(null),y=$1(V,L,f?.beforeInsideRef),z0=$1(v,f?.afterInsideRef);Z0.useEffect(()=>{if(X||!x||!w)return;let k=Array.from(f?.portalNode?.querySelectorAll(`[${o0("portal")}]`)||[]),n=(Y0?YQ(Y0.nodesRef.current,I()):[]).find((T)=>GQ(T.context?.elements.domReference||null))?.context?.elements.domReference,i=[x,n,...k,...D(),K0.current,i0.current,V.current,v.current,f?.beforeOutsideRef.current,f?.afterOutsideRef.current,y0(B),y0(z),c?A:null].filter((T)=>T!=null),o=r6(i,K||c);return()=>{o()}},[w,X,A,x,K,d,f,c,Y0,I,D,z,B]),p(()=>{if(!w||X||!F0(F))return;let k=$0(F),P=g0(k);queueMicrotask(()=>{let n=l(F),i=a.current,o=typeof i==="function"?i(D0.current||""):i;if(o===void 0||o===!1)return;let T;if(o===!0||o===null)T=n[0]||F;else T=y0(o);if(T=T||n[0]||F,s(F,P))return;O8(T,{preventScroll:T===F})})},[X,w,F,C,l,a,D0]),p(()=>{if(X||!F)return;let k=$0(F),P=g0(k);pZ(P);function n(T){if(!T.open)k0.current=uZ(T.nativeEvent,L0.current);if(T.reason===r.triggerHover&&T.nativeEvent.type==="mouseleave")e.current=!0;if(T.reason!==r.outsidePress)return;if(T.nested)e.current=!1;else if(I6(T.nativeEvent)||S6(T.nativeEvent))e.current=!1;else{let g=!1;if(document.createElement("div").focus({get preventScroll(){return g=!0,!1}}),g)e.current=!1;else e.current=!0}}N.on("openchange",n);let i=k.createElement("span");if(i.setAttribute("tabindex","-1"),i.setAttribute("aria-hidden","true"),Object.assign(i.style,N8),S&&A)A.insertAdjacentElement("afterend",i);function o(){let T=G0.current,g=typeof T==="function"?T(k0.current):T;if(g===void 0||g===!1)return null;if(g===null)g=!0;if(typeof g==="boolean"){let _0=A||FQ();return _0&&_0.isConnected?_0:i}let I0=A||FQ()||i;return y0(g)||I0}return()=>{N.off("openchange",n);let T=g0(k),g=s(x,T)||Y0&&m0(Y0.nodesRef.current,I(),!1).some((_0)=>s(_0.context?.elements.floating,T)),I0=o();queueMicrotask(()=>{let _0=cZ(I0),q1=typeof G0.current!=="boolean";if(G0.current&&!e.current&&F0(_0)&&(!q1&&_0!==T&&T!==k.body?g:!0))_0.focus({preventScroll:!0});i.remove()})}},[X,x,F,G0,O,N,Y0,S,A,I]),Z0.useEffect(()=>{queueMicrotask(()=>{e.current=!1})},[X]),Z0.useEffect(()=>{if(X||!w)return;function k(n){if(B0(n)?.closest(`[${Q8}]`))H0.current=!0}let P=$0(F);return P.addEventListener("pointerdown",k,!0),()=>{P.removeEventListener("pointerdown",k,!0)}},[X,w,F]),p(()=>{if(X)return;if(!f)return;return f.setFocusManagerState({modal:K,closeOnFocusOut:Y,open:w,onOpenChange:M.setOpen,domReference:A}),()=>{f.setFocusManagerState(null)}},[X,f,K,w,M,Y,A]),p(()=>{if(X||!F)return;return t6(F,d),()=>{queueMicrotask(MQ)}},[X,F,d]);let m=!X&&(K?!c:!0)&&(S||K);return mZ(Z0.Fragment,{children:[m&&n6(t0,{"data-type":"inside",ref:y,onFocus:(k)=>{if(K){let P=l();O8(P[P.length-1])}else if(f?.portalNode)if(e.current=!1,a0(k,f.portalNode))j8(A)?.focus();else y0(B??f.beforeOutsideRef)?.focus()}}),J,m&&n6(t0,{"data-type":"inside",ref:z0,onFocus:(k)=>{if(K)O8(l()[0]);else if(f?.portalNode){if(Y)e.current=!0;if(a0(k,f.portalNode))V8(A)?.focus();else y0(z??f.afterOutsideRef)?.focus()}}})]})}import*as b1 from"react";function AQ(Q,Z={}){let J="rootStore"in Q?Q.rootStore:Q,X=J.context.dataRef,{enabled:q=!0,event:$="click",toggle:G=!0,ignoreMouse:W=!1,stickIfOpen:K=!0,touchOpenDelay:Y=0}=Z,U=b1.useRef(void 0),H=_1(),z=v0(),B=b1.useMemo(()=>({onPointerDown(L){U.current=L.pointerType},onMouseDown(L){let j=U.current,M=L.nativeEvent,w=J.select("open");if(L.button!==0||$==="click"||KQ(j,!0)&&W)return;let A=X.current.openEvent,x=A?.type,N=J.select("domReferenceElement")!==L.currentTarget,O=w&&N||!(w&&G&&(A&&K?x==="click"||x==="mousedown":!0));if($Q(M.target)){let D=Q0(r.triggerPress,M,M.target);if(O&&j==="touch"&&Y>0)z.start(Y,()=>{J.setOpen(!0,D)});else J.setOpen(O,D);return}let I=L.currentTarget;H.request(()=>{let D=Q0(r.triggerPress,M,I);if(O&&j==="touch"&&Y>0)z.start(Y,()=>{J.setOpen(!0,D)});else J.setOpen(O,D)})},onClick(L){if($==="mousedown-only")return;let j=U.current;if($==="mousedown"&&j){U.current=void 0;return}if(KQ(j,!0)&&W)return;let M=J.select("open"),w=X.current.openEvent,A=J.select("domReferenceElement")!==L.currentTarget,x=M&&A||!(M&&G&&(w&&K?B8(w):!0)),N=Q0(r.triggerPress,L.nativeEvent,L.currentTarget);if(x&&j==="touch"&&Y>0)z.start(Y,()=>{J.setOpen(!0,N)});else J.setOpen(x,N)},onKeyDown(){U.current=void 0}}),[X,$,W,J,K,G,H,z,Y]);return b1.useMemo(()=>q?{reference:B}:J0,[q,B])}import*as w0 from"react";import*as I8 from"react";import{useLayoutEffect as F$}from"react";import*as iZ from"react-dom";var lZ={intentional:"onClick",sloppy:"onPointerDown"};function rZ(Q){return{escapeKey:typeof Q==="boolean"?Q:Q?.escapeKey??!1,outsidePress:typeof Q==="boolean"?Q:Q?.outsidePress??!0}}function xQ(Q,Z={}){let J="rootStore"in Q?Q.rootStore:Q,X=J.useState("open"),q=J.useState("floatingElement"),$=J.useState("referenceElement"),G=J.useState("domReferenceElement"),{onOpenChange:W,dataRef:K}=J.context,{enabled:Y=!0,escapeKey:U=!0,outsidePress:H=!0,outsidePressEvent:z="sloppy",referencePress:B=!1,referencePressEvent:L="sloppy",ancestorScroll:j=!1,bubbles:M,externalTree:w}=Z,A=M8(w),x=R(typeof H==="function"?H:()=>!1),N=typeof H==="function"?x:H,O=w0.useRef(!1),{escapeKey:I,outsidePress:D}=rZ(M),C=w0.useRef(null),c=v0(),d=v0(),a=R(()=>{d.clear(),K.current.insideReactTree=!1}),G0=w0.useRef(!1),D0=w0.useRef(""),Y0=R((V)=>{D0.current=V.pointerType}),f=R(()=>{let V=D0.current,v=V==="pen"||!V?"mouse":V,y=typeof z==="function"?z():z;if(typeof y==="string")return y;return y[v]}),K0=R((V)=>{if(!X||!Y||!U||V.key!=="Escape")return;if(G0.current)return;let v=K.current.floatingContext?.nodeId,y=A?m0(A.nodesRef.current,v):[];if(!I){if(y.length>0){let k=!0;if(y.forEach((P)=>{if(P.context?.open&&!P.context.dataRef.current.__escapeKeyBubbles)k=!1}),!k)return}}let z0=k6(V)?V.nativeEvent:V,m=Q0(r.escapeKey,z0);if(J.setOpen(!1,m),!I&&!m.isPropagationAllowed)V.stopPropagation()}),i0=R((V)=>{let v=f();return v==="intentional"&&V.type!=="click"||v==="sloppy"&&V.type==="click"}),e=R(()=>{K.current.insideReactTree=!0,d.start(0,a)}),H0=R((V,v=!1)=>{if(i0(V)){a();return}if(K.current.insideReactTree){a();return}if(f()==="intentional"&&v)return;if(typeof N==="function"&&!N(V))return;let y=B0(V),z0=`[${o0("inert")}]`,m=$0(J.select("floatingElement")).querySelectorAll(z0),k=J.context.triggerElements;if(y&&(k.hasElement(y)||k.hasMatchingElement((T)=>s(T,y))))return;let P=S0(y)?y:null;while(P&&!I1(P)){let T=a8(P);if(I1(T)||!S0(T))break;P=T}if(m.length&&S0(y)&&!D6(y)&&!s(y,J.select("floatingElement"))&&Array.from(m).every((T)=>!s(P,T)))return;if(F0(y)&&!("touches"in V)){let T=I1(y),g=S1(y),I0=/auto|scroll/,_0=T||I0.test(g.overflowX),q1=T||I0.test(g.overflowY),s1=_0&&y.clientWidth>0&&y.scrollWidth>y.clientWidth,p8=q1&&y.clientHeight>0&&y.scrollHeight>y.clientHeight,N0=g.direction==="rtl",x1=p8&&(N0?V.offsetX<=y.offsetWidth-y.clientWidth:V.offsetX>y.clientWidth),a1=s1&&V.offsetY>y.clientHeight;if(x1||a1)return}let n=K.current.floatingContext?.nodeId,i=A&&m0(A.nodesRef.current,n).some((T)=>A0(V,T.context?.elements.floating));if(A0(V,J.select("floatingElement"))||A0(V,J.select("domReferenceElement"))||i)return;let o=A?m0(A.nodesRef.current,n):[];if(o.length>0){let T=!0;if(o.forEach((g)=>{if(g.context?.open&&!g.context.dataRef.current.__outsidePressBubbles)T=!1}),!T)return}J.setOpen(!1,Q0(r.outsidePress,V)),a()}),T0=R((V)=>{if(f()!=="sloppy"||V.pointerType==="touch"||!J.select("open")||!Y||A0(V,J.select("floatingElement"))||A0(V,J.select("domReferenceElement")))return;H0(V)}),l0=R((V)=>{if(f()!=="sloppy"||!J.select("open")||!Y||A0(V,J.select("floatingElement"))||A0(V,J.select("domReferenceElement")))return;let v=V.touches[0];if(v)C.current={startTime:Date.now(),startX:v.clientX,startY:v.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},c.start(1000,()=>{if(C.current)C.current.dismissOnTouchEnd=!1,C.current.dismissOnMouseDown=!1})}),k0=R((V)=>{let v=B0(V);function y(){l0(V),v?.removeEventListener(V.type,y)}v?.addEventListener(V.type,y)}),L0=R((V)=>{let v=O.current;if(O.current=!1,c.clear(),V.type==="mousedown"&&C.current&&!C.current.dismissOnMouseDown)return;let y=B0(V);function z0(){if(V.type==="pointerdown")T0(V);else H0(V,v);y?.removeEventListener(V.type,z0)}y?.addEventListener(V.type,z0)}),X1=R((V)=>{if(f()!=="sloppy"||!C.current||A0(V,J.select("floatingElement"))||A0(V,J.select("domReferenceElement")))return;let v=V.touches[0];if(!v)return;let y=Math.abs(v.clientX-C.current.startX),z0=Math.abs(v.clientY-C.current.startY),m=Math.sqrt(y*y+z0*z0);if(m>5)C.current.dismissOnTouchEnd=!0;if(m>10)H0(V),c.clear(),C.current=null}),_=R((V)=>{let v=B0(V);function y(){X1(V),v?.removeEventListener(V.type,y)}v?.addEventListener(V.type,y)}),b=R((V)=>{if(f()!=="sloppy"||!C.current||A0(V,J.select("floatingElement"))||A0(V,J.select("domReferenceElement")))return;if(C.current.dismissOnTouchEnd)H0(V);c.clear(),C.current=null}),S=R((V)=>{let v=B0(V);function y(){b(V),v?.removeEventListener(V.type,y)}v?.addEventListener(V.type,y)});w0.useEffect(()=>{if(!X||!Y)return;K.current.__escapeKeyBubbles=I,K.current.__outsidePressBubbles=D;let V=new b0;function v(P){J.setOpen(!1,Q0(r.none,P))}function y(){V.clear(),G0.current=!0}function z0(){V.start(Y6()?5:0,()=>{G0.current=!1})}let m=$0(q);if(m.addEventListener("pointerdown",Y0,!0),U)m.addEventListener("keydown",K0),m.addEventListener("compositionstart",y),m.addEventListener("compositionend",z0);if(N)m.addEventListener("click",L0,!0),m.addEventListener("pointerdown",L0,!0),m.addEventListener("touchstart",k0,!0),m.addEventListener("touchmove",_,!0),m.addEventListener("touchend",S,!0),m.addEventListener("mousedown",L0,!0);let k=[];if(j){if(S0(G))k=h0(G);if(S0(q))k=k.concat(h0(q));if(!S0($)&&$&&$.contextElement)k=k.concat(h0($.contextElement))}return k=k.filter((P)=>P!==m.defaultView?.visualViewport),k.forEach((P)=>{P.addEventListener("scroll",v,{passive:!0})}),()=>{if(m.removeEventListener("pointerdown",Y0,!0),U)m.removeEventListener("keydown",K0),m.removeEventListener("compositionstart",y),m.removeEventListener("compositionend",z0);if(N)m.removeEventListener("click",L0,!0),m.removeEventListener("pointerdown",L0,!0),m.removeEventListener("touchstart",k0,!0),m.removeEventListener("touchmove",_,!0),m.removeEventListener("touchend",S,!0),m.removeEventListener("mousedown",L0,!0);k.forEach((P)=>{P.removeEventListener("scroll",v)}),V.clear()}},[K,q,$,G,U,N,X,W,j,Y,I,D,K0,H0,L0,T0,k0,_,S,Y0,J]),w0.useEffect(a,[N,a]);let F=w0.useMemo(()=>({onKeyDown:K0,...B&&{[lZ[L]]:(V)=>{J.setOpen(!1,Q0(r.triggerPress,V.nativeEvent))},...L!=="intentional"&&{onClick(V){J.setOpen(!1,Q0(r.triggerPress,V.nativeEvent))}}}}),[K0,J,B,L]),E=R((V)=>{let v=B0(V.nativeEvent);if(!s(J.select("floatingElement"),v)||V.button!==0)return;O.current=!0}),l=w0.useMemo(()=>({onKeyDown:K0,onPointerDown:E,onMouseDown:E,onMouseUp:E,onClickCapture:e,onMouseDownCapture:e,onPointerDownCapture:e,onMouseUpCapture:e,onTouchEndCapture:e,onTouchMoveCapture:e}),[K0,E,e]);return w0.useMemo(()=>Y?{reference:F,floating:l,trigger:F}:{},[Y,F,l])}var sZ=(Q,Z,J)=>{if(Z.length===1&&Z[0]===J){let X=!1;try{let q={};if(Q(q)===q)X=!0}catch{}if(X){let q=void 0;try{throw Error()}catch($){({stack:q}=$)}console.warn(`The result function returned its own inputs without modification. e.g
5
+ \`createSelector([state => state.todos], todos => todos)\`
6
+ This could lead to inefficient memoization and unnecessary re-renders.
7
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:q})}}},aZ=(Q,Z,J)=>{let{memoize:X,memoizeOptions:q}=Z,{inputSelectorResults:$,inputSelectorResultsCopy:G}=Q,W=X(()=>({}),...q);if(W.apply(null,$)!==W.apply(null,G)){let Y=void 0;try{throw Error()}catch(U){({stack:Y}=U)}console.warn(`An input selector returned a different result when passed same arguments.
8
+ This means your output selector will likely run more frequently than intended.
9
+ Avoid returning a new reference inside your input selector, e.g.
10
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:J,firstInputs:$,secondInputs:G,stack:Y})}},nZ={inputStabilityCheck:"once",identityFunctionCheck:"once"};var y8=Symbol("NOT_FOUND");function oZ(Q,Z=`expected a function, instead received ${typeof Q}`){if(typeof Q!=="function")throw TypeError(Z)}function tZ(Q,Z=`expected an object, instead received ${typeof Q}`){if(typeof Q!=="object")throw TypeError(Z)}function eZ(Q,Z="expected all items to be functions, instead received the following types: "){if(!Q.every((J)=>typeof J==="function")){let J=Q.map((X)=>typeof X==="function"?`function ${X.name||"unnamed"}()`:typeof X).join(", ");throw TypeError(`${Z}[${J}]`)}}var e6=(Q)=>{return Array.isArray(Q)?Q:[Q]};function Q9(Q){let Z=Array.isArray(Q[0])?Q[0]:Q;return eZ(Z,"createSelector expects all input-selectors to be functions, but received the following types: "),Z}function Q5(Q,Z){let J=[],{length:X}=Q;for(let q=0;q<X;q++)J.push(Q[q].apply(null,Z));return J}var Z9=(Q,Z)=>{let{identityFunctionCheck:J,inputStabilityCheck:X}={...nZ,...Z};return{identityFunctionCheck:{shouldRun:J==="always"||J==="once"&&Q,run:sZ},inputStabilityCheck:{shouldRun:X==="always"||X==="once"&&Q,run:aZ}}},Z5=0,J9=null,X5=class{revision=Z5;_value;_lastValue;_isEqual=wQ;constructor(Q,Z=wQ){this._value=this._lastValue=Q,this._isEqual=Z}get value(){return J9?.add(this),this._value}set value(Q){if(this.value===Q)return;this._value=Q,this.revision=++Z5}};function wQ(Q,Z){return Q===Z}function OQ(Q){if(!(Q instanceof X5))console.warn("Not a valid cell! ",Q);return Q.value}function X9(Q,Z=wQ){return new X5(Q,Z)}var q9=(Q,Z)=>!1;function P8(){return X9(null,q9)}var q5=(Q)=>{let Z=Q.collectionTag;if(Z===null)Z=Q.collectionTag=P8();OQ(Z)};var P$=Symbol(),$5=0,$9=Object.getPrototypeOf({}),G9=class{constructor(Q){this.value=Q,this.value=Q,this.tag.value=Q}proxy=new Proxy(this,v1);tag=P8();tags={};children={};collectionTag=null;id=$5++},v1={get(Q,Z){function J(){let{value:q}=Q,$=Reflect.get(q,Z);if(typeof Z==="symbol")return $;if(Z in $9)return $;if(typeof $==="object"&&$!==null){let G=Q.children[Z];if(G===void 0)G=Q.children[Z]=W9($);if(G.tag)OQ(G.tag);return G.proxy}else{let G=Q.tags[Z];if(G===void 0)G=Q.tags[Z]=P8(),G.value=$;return OQ(G),$}}return J()},ownKeys(Q){return q5(Q),Reflect.ownKeys(Q.value)},getOwnPropertyDescriptor(Q,Z){return Reflect.getOwnPropertyDescriptor(Q.value,Z)},has(Q,Z){return Reflect.has(Q.value,Z)}},Y9=class{constructor(Q){this.value=Q,this.value=Q,this.tag.value=Q}proxy=new Proxy([this],K9);tag=P8();tags={};children={};collectionTag=null;id=$5++},K9={get([Q],Z){if(Z==="length")q5(Q);return v1.get(Q,Z)},ownKeys([Q]){return v1.ownKeys(Q)},getOwnPropertyDescriptor([Q],Z){return v1.getOwnPropertyDescriptor(Q,Z)},has([Q],Z){return v1.has(Q,Z)}};function W9(Q){if(Array.isArray(Q))return new Y9(Q);return new G9(Q)}function U9(Q){let Z;return{get(J){if(Z&&Q(Z.key,J))return Z.value;return y8},put(J,X){Z={key:J,value:X}},getEntries(){return Z?[Z]:[]},clear(){Z=void 0}}}function z9(Q,Z){let J=[];function X(W){let K=J.findIndex((Y)=>Z(W,Y.key));if(K>-1){let Y=J[K];if(K>0)J.splice(K,1),J.unshift(Y);return Y.value}return y8}function q(W,K){if(X(W)===y8){if(J.unshift({key:W,value:K}),J.length>Q)J.pop()}}function $(){return J}function G(){J=[]}return{get:X,put:q,getEntries:$,clear:G}}var B9=(Q,Z)=>Q===Z;function H9(Q){return function(J,X){if(J===null||X===null||J.length!==X.length)return!1;let{length:q}=J;for(let $=0;$<q;$++)if(!Q(J[$],X[$]))return!1;return!0}}function G5(Q,Z){let J=typeof Z==="object"?Z:{equalityCheck:Z},{equalityCheck:X=B9,maxSize:q=1,resultEqualityCheck:$}=J,G=H9(X),W=0,K=q<=1?U9(G):z9(q,G);function Y(){let U=K.get(arguments);if(U===y8){if(U=Q.apply(null,arguments),W++,$){let z=K.getEntries().find((B)=>$(B.value,U));if(z)U=z.value,W!==0&&W--}K.put(arguments,U)}return U}return Y.clearCache=()=>{K.clear(),Y.resetResultsCount()},Y.resultsCount=()=>W,Y.resetResultsCount=()=>{W=0},Y}var L9=class{constructor(Q){this.value=Q}deref(){return this.value}},_9=typeof WeakRef<"u"?WeakRef:L9,j9=0,J5=1;function S8(){return{s:j9,v:void 0,o:null,p:null}}function Y5(Q,Z={}){let J=S8(),{resultEqualityCheck:X}=Z,q,$=0;function G(){let W=J,{length:K}=arguments;for(let H=0,z=K;H<z;H++){let B=arguments[H];if(typeof B==="function"||typeof B==="object"&&B!==null){let L=W.o;if(L===null)W.o=L=new WeakMap;let j=L.get(B);if(j===void 0)W=S8(),L.set(B,W);else W=j}else{let L=W.p;if(L===null)W.p=L=new Map;let j=L.get(B);if(j===void 0)W=S8(),L.set(B,W);else W=j}}let Y=W,U;if(W.s===J5)U=W.v;else if(U=Q.apply(null,arguments),$++,X){let H=q?.deref?.()??q;if(H!=null&&X(H,U))U=H,$!==0&&$--;q=typeof U==="object"&&U!==null||typeof U==="function"?new _9(U):U}return Y.s=J5,Y.v=U,U}return G.clearCache=()=>{J=S8(),G.resetResultsCount()},G.resultsCount=()=>$,G.resetResultsCount=()=>{$=0},G}function DQ(Q,...Z){let J=typeof Q==="function"?{memoize:Q,memoizeOptions:Z}:Q,X=(...q)=>{let $=0,G=0,W,K={},Y=q.pop();if(typeof Y==="object")K=Y,Y=q.pop();oZ(Y,`createSelector expects an output function after the inputs, but received: [${typeof Y}]`);let U={...J,...K},{memoize:H,memoizeOptions:z=[],argsMemoize:B=Y5,argsMemoizeOptions:L=[],devModeChecks:j={}}=U,M=e6(z),w=e6(L),A=Q9(q),x=H(function(){return $++,Y.apply(null,arguments)},...M),N=!0,O=B(function(){G++;let D=Q5(A,arguments);W=x.apply(null,D);{let{identityFunctionCheck:C,inputStabilityCheck:c}=Z9(N,j);if(C.shouldRun)C.run(Y,D,W);if(c.shouldRun){let d=Q5(A,arguments);c.run({inputSelectorResults:D,inputSelectorResultsCopy:d},{memoize:H,memoizeOptions:M},arguments)}if(N)N=!1}return W},...w);return Object.assign(O,{resultFunc:Y,memoizedResultFunc:x,dependencies:A,dependencyRecomputations:()=>G,resetDependencyRecomputations:()=>{G=0},lastResult:()=>W,recomputations:()=>$,resetRecomputations:()=>{$=0},memoize:H,argsMemoize:B})};return Object.assign(X,{withTypes:()=>X}),X}var V9=DQ(Y5),F9=Object.assign((Q,Z=V9)=>{tZ(Q,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof Q}`);let J=Object.keys(Q),X=J.map(($)=>Q[$]);return Z(X,(...$)=>{return $.reduce((G,W,K)=>{return G[J[K]]=W,G},{})})},{withTypes:()=>F9});var f$=DQ({memoize:G5,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),u=(Q,Z,J,X,q,$,...G)=>{if(G.length>0)throw Error("Unsupported number of selectors");let W;if(Q&&Z&&J&&X&&q&&$)W=(K,Y,U,H)=>{let z=Q(K,Y,U,H),B=Z(K,Y,U,H),L=J(K,Y,U,H),j=X(K,Y,U,H),M=q(K,Y,U,H);return $(z,B,L,j,M,Y,U,H)};else if(Q&&Z&&J&&X&&q)W=(K,Y,U,H)=>{let z=Q(K,Y,U,H),B=Z(K,Y,U,H),L=J(K,Y,U,H),j=X(K,Y,U,H);return q(z,B,L,j,Y,U,H)};else if(Q&&Z&&J&&X)W=(K,Y,U,H)=>{let z=Q(K,Y,U,H),B=Z(K,Y,U,H),L=J(K,Y,U,H);return X(z,B,L,Y,U,H)};else if(Q&&Z&&J)W=(K,Y,U,H)=>{let z=Q(K,Y,U,H),B=Z(K,Y,U,H);return J(z,B,Y,U,H)};else if(Q&&Z)W=(K,Y,U,H)=>{let z=Q(K,Y,U,H);return Z(z,Y,U,H)};else if(Q)W=Q;else throw Error("Missing arguments");return W};var U5=cQ(TQ(),1),z5=cQ(K5(),1);import*as W5 from"react";var A9=G1(19),x9=A9?w9:O9;function B5(Q,Z,J,X,q){return x9(Q,Z,J,X,q)}function w9(Q,Z,J,X,q){let $=W5.useCallback(()=>Z(Q.getSnapshot(),J,X,q),[Q,Z,J,X,q]);return U5.useSyncExternalStore(Q.subscribe,$,$)}function O9(Q,Z,J,X,q){return z5.useSyncExternalStoreWithSelector(Q.subscribe,Q.getSnapshot,Q.getSnapshot,($)=>Z($,J,X,q))}class V1{constructor(Q){this.state=Q,this.listeners=new Set,this.updateTick=0}subscribe=(Q)=>{return this.listeners.add(Q),()=>{this.listeners.delete(Q)}};getSnapshot=()=>{return this.state};setState(Q){if(this.state===Q)return;this.state=Q,this.updateTick+=1;let Z=this.updateTick;for(let J of this.listeners){if(Z!==this.updateTick)return;J(Q)}}update(Q){for(let Z in Q)if(!Object.is(this.state[Z],Q[Z])){V1.prototype.setState.call(this,{...this.state,...Q});return}}set(Q,Z){if(!Object.is(this.state[Q],Z))V1.prototype.setState.call(this,{...this.state,[Q]:Z})}notifyAll(){let Q={...this.state};V1.prototype.setState.call(this,Q)}}import*as C0 from"react";class f1 extends V1{constructor(Q,Z={},J){super(Q);this.context=Z,this.selectors=J}controlledValues=new Map;useSyncedValue(Q,Z){C0.useDebugValue(Q),p(()=>{if(this.state[Q]!==Z)this.set(Q,Z)},[Q,Z])}useSyncedValueWithCleanup(Q,Z){p(()=>{if(this.state[Q]!==Z)this.set(Q,Z);return()=>{this.set(Q,void 0)}},[Q,Z])}useSyncedValues(Q){{C0.useDebugValue(Q,(q)=>Object.keys(q));let J=C0.useRef(Object.keys(Q)).current,X=Object.keys(Q);if(J.length!==X.length||J.some((q,$)=>q!==X[$]))console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}let Z=Object.values(Q);p(()=>{this.update(Q)},Z)}useControlledProp(Q,Z,J){C0.useDebugValue(Q);let X=Z!==void 0;{let q=this.controlledValues.get(Q);if(q!==void 0&&q!==X)console.error(`A component is changing the ${X?"":"un"}controlled state of ${Q.toString()} to be ${X?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}if(!this.controlledValues.has(Q)){if(this.controlledValues.set(Q,X),!X&&!Object.is(this.state[Q],J))super.setState({...this.state,[Q]:J})}p(()=>{if(X&&!Object.is(this.state[Q],Z))super.setState({...this.state,[Q]:Z})},[Q,Z,J,X])}set(Q,Z){if(this.controlledValues.get(Q)===!0)return;super.set(Q,Z)}update(Q){let Z={...Q};for(let J in Z){if(!Object.hasOwn(Z,J))continue;if(this.controlledValues.get(J)===!0){delete Z[J];continue}}super.update(Z)}setState(Q){let Z={...Q};for(let J in Z){if(!Object.hasOwn(Z,J))continue;if(this.controlledValues.get(J)===!0){delete Z[J];continue}}super.setState({...this.state,...Z})}select=(Q,Z,J,X)=>{let q=this.selectors[Q];return q(this.state,Z,J,X)};useState=(Q,Z,J,X)=>{C0.useDebugValue(Q);let q=this.selectors[Q];return B5(this,q,Z,J,X)};useContextCallback(Q,Z){C0.useDebugValue(Q);let J=R(Z??e1);this.context[Q]=J}useStateSetter(Q){let Z=C0.useRef(void 0);if(Z.current===void 0)Z.current=(J)=>{this.set(Q,J)};return Z.current}observe(Q,Z){let J;if(typeof Q==="function")J=Q;else J=this.selectors[Q];let X=J(this.state);return Z(X,X,this),this.subscribe((q)=>{let $=J(q);if(!Object.is(X,$)){let G=X;X=$,Z($,G,this)}})}}var D9={open:u((Q)=>Q.open),domReferenceElement:u((Q)=>Q.domReferenceElement),referenceElement:u((Q)=>Q.positionReference??Q.referenceElement),floatingElement:u((Q)=>Q.floatingElement),floatingId:u((Q)=>Q.floatingId)};class g1 extends f1{constructor(Q){let{nested:Z,noEmit:J,onOpenChange:X,triggerElements:q,...$}=Q;super({...$,positionReference:$.referenceElement,domReferenceElement:$.referenceElement},{onOpenChange:X,dataRef:{current:{}},events:m6(),nested:Z,noEmit:J,triggerElements:q},D9)}setOpen=(Q,Z)=>{if(!Q||!this.state.open||B8(Z.event))this.context.dataRef.current.openEvent=Q?Z.event:void 0;if(!this.context.noEmit){let J={open:Q,reason:Z.reason,nativeEvent:Z.event,nested:this.context.nested,triggerElement:Z.trigger};this.context.events.emit("openchange",J)}this.context.onOpenChange?.(Q,Z)}}import*as E8 from"react";import*as m1 from"react";function H5(Q,Z=!1,J=!1){let[X,q]=m1.useState(Q&&Z?"idle":void 0),[$,G]=m1.useState(Q);if(Q&&!$)G(!0),q("starting");if(!Q&&$&&X!=="ending"&&!J)q("ending");if(!Q&&!$&&X==="ending")q(void 0);return p(()=>{if(!Q&&$&&X!=="ending"&&J){let W=x0.request(()=>{q("ending")});return()=>{x0.cancel(W)}}return},[Q,$,X,J]),p(()=>{if(!Q||Z)return;let W=x0.request(()=>{q(void 0)});return()=>{x0.cancel(W)}},[Z,Q]),p(()=>{if(!Q||!Z)return;if(Q&&$&&X!=="idle")q("starting");let W=x0.request(()=>{q("idle")});return()=>{x0.cancel(W)}},[Z,Q,$,q,X]),m1.useMemo(()=>({mounted:$,setMounted:G,transitionStatus:X}),[$,X])}import*as _5 from"react";import*as kQ from"react-dom";function L5(Q,Z=!1,J=!0){let X=_1();return R((q,$=null)=>{X.cancel();let G=y0(Q);if(G==null)return;if(typeof G.getAnimations!=="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)q();else X.request(()=>{function W(){if(!G)return;Promise.all(G.getAnimations().map((K)=>K.finished)).then(()=>{if($!=null&&$.aborted)return;kQ.flushSync(q)}).catch(()=>{if(J){if($!=null&&$.aborted)return;kQ.flushSync(q)}else if(G.getAnimations().length>0&&G.getAnimations().some((K)=>K.pending||K.playState!=="finished"))W()})}if(Z)X.request(W);else W()})})}function C8(Q){let{enabled:Z=!0,open:J,ref:X,onComplete:q}=Q,$=s0(J),G=R(q),W=L5(X,J);_5.useEffect(()=>{if(!Z)return;W(()=>{if(J===$.current)G()})},[Z,J,G,W,$])}function T9(Q,Z){let J=E8.useRef(null);return E8.useCallback((X)=>{if(Q===void 0)return;if(J.current!==null)Z.context.triggerElements.delete(J.current),J.current=null;if(X!==null)J.current=Q,Z.context.triggerElements.add(Q,X)},[Z,Q])}function j5(Q,Z,J,X){let q=J.useState("isMountedByTrigger",Q),$=T9(Q,J),G=R((W)=>{if($(W),W!==null&&J.select("open")&&J.select("activeTriggerId")==null)J.update({activeTriggerId:Q,activeTriggerElement:W,...X})});return p(()=>{if(q)J.update({activeTriggerElement:Z.current,...X})},[q,J,Z,...Object.values(X)]),{registerTrigger:G,isMountedByThisTrigger:q}}function V5(Q){let Z=Q.useState("open");p(()=>{if(Z&&!Q.select("activeTriggerId")&&Q.context.triggerElements.size===1){let J=Q.context.triggerElements.entries().next();if(!J.done){let[X,q]=J.value;Q.update({activeTriggerId:X,activeTriggerElement:q})}}},[Z,Q])}function F5(Q,Z,J){let{mounted:X,setMounted:q,transitionStatus:$}=H5(Q);Z.useSyncedValues({mounted:X,transitionStatus:$});let G=R(()=>{q(!1),Z.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),J?.(),Z.context.onOpenChangeComplete?.(!1)}),W=Z.useState("preventUnmountingOnClose");return C8({enabled:!W,open:Q,ref:Z.context.popupRef,onComplete(){if(!Q)G()}}),{forceUnmount:G,transitionStatus:$}}class u1{constructor(){this.elements=new Set,this.idMap=new Map}add(Q,Z){let J=this.idMap.get(Q);if(J===Z)return;if(J!==void 0)this.elements.delete(J);if(this.elements.add(Z),this.idMap.set(Q,Z),this.elements.size!==this.idMap.size)throw Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}delete(Q){let Z=this.idMap.get(Q);if(Z)this.elements.delete(Z),this.idMap.delete(Q)}hasElement(Q){return this.elements.has(Q)}hasMatchingElement(Q){for(let Z of this.elements)if(Q(Z))return!0;return!1}getById(Q){return this.idMap.get(Q)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function M5(){return new g1({open:!1,floatingElement:null,referenceElement:null,triggerElements:new u1,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function N5(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:M5(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:J0,inactiveTriggerProps:J0,popupProps:J0}}var A5={open:u((Q)=>Q.open),mounted:u((Q)=>Q.mounted),transitionStatus:u((Q)=>Q.transitionStatus),floatingRootContext:u((Q)=>Q.floatingRootContext),preventUnmountingOnClose:u((Q)=>Q.preventUnmountingOnClose),payload:u((Q)=>Q.payload),activeTriggerId:u((Q)=>Q.activeTriggerId),activeTriggerElement:u((Q)=>Q.mounted?Q.activeTriggerElement:null),isTriggerActive:u((Q,Z)=>Z!==void 0&&Q.activeTriggerId===Z),isOpenedByTrigger:u((Q,Z)=>Z!==void 0&&Q.activeTriggerId===Z&&Q.open),isMountedByTrigger:u((Q,Z)=>Z!==void 0&&Q.activeTriggerId===Z&&Q.mounted),triggerProps:u((Q,Z)=>Z?Q.activeTriggerProps:Q.inactiveTriggerProps),popupProps:u((Q)=>Q.popupProps),popupElement:u((Q)=>Q.popupElement),positionerElement:u((Q)=>Q.positionerElement)};function IQ(Q){let{popupStore:Z,noEmit:J=!1,treatPopupAsFloatingElement:X=!1,onOpenChange:q}=Q,$=R0(),G=F8()!=null,W=Z.useState("open"),K=Z.useState("activeTriggerElement"),Y=Z.useState(X?"popupElement":"positionerElement"),U=Z.context.triggerElements,H=W0(()=>new g1({open:W,referenceElement:K,floatingElement:Y,triggerElements:U,onOpenChange:q,floatingId:$,nested:G,noEmit:J})).current;return p(()=>{let z={open:W,floatingId:$,referenceElement:K,floatingElement:Y};if(S0(K))z.domReferenceElement=K;H.update(z)},[W,$,K,Y,H]),H.context.onOpenChange=q,H.context.nested=G,H.context.noEmit=J,H}import*as e0 from"react";function p1(Q=[]){let Z=Q.map((Y)=>Y?.reference),J=Q.map((Y)=>Y?.floating),X=Q.map((Y)=>Y?.item),q=Q.map((Y)=>Y?.trigger),$=e0.useCallback((Y)=>h8(Y,Q,"reference"),Z),G=e0.useCallback((Y)=>h8(Y,Q,"floating"),J),W=e0.useCallback((Y)=>h8(Y,Q,"item"),X),K=e0.useCallback((Y)=>h8(Y,Q,"trigger"),q);return e0.useMemo(()=>({getReferenceProps:$,getFloatingProps:G,getItemProps:W,getTriggerProps:K}),[$,G,W,K])}function h8(Q,Z,J){let X=new Map,q=J==="item",$={};if(J==="floating")$.tabIndex=-1,$[C1]="";for(let G in Q){if(q&&Q){if(G===XQ||G===qQ)continue}$[G]=Q[G]}for(let G=0;G<Z.length;G+=1){let W,K=Z[G]?.[J];if(typeof K==="function")W=Q?K(Q):null;else W=K;if(!W)continue;x5($,W,q,X)}return x5($,Q,q,X),$}function x5(Q,Z,J,X){for(let q in Z){let $=Z[q];if(J&&(q===XQ||q===qQ))continue;if(!q.startsWith("on"))Q[q]=$;else{if(!X.has(q))X.set(q,[]);if(typeof $==="function")X.get(q)?.push($),Q[q]=(...G)=>{return X.get(q)?.map((W)=>W(...G)).find((W)=>W!==void 0)}}}}import*as p0 from"react";var k9=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function SQ(Q,Z={}){let J="rootStore"in Q?Q.rootStore:Q,X=J.useState("open"),q=J.useState("floatingId"),$=J.useState("domReferenceElement"),G=J.useState("floatingElement"),{enabled:W=!0,role:K="dialog"}=Z,Y=R0(),U=$?.id||Y,H=p0.useMemo(()=>E1(G)?.id||q,[G,q]),z=k9.get(K)??K,L=F8()!=null,j=p0.useMemo(()=>{if(z==="tooltip"||K==="label")return J0;return{"aria-haspopup":z==="alertdialog"?"dialog":z,"aria-expanded":"false",...z==="listbox"&&{role:"combobox"},...z==="menu"&&L&&{role:"menuitem"},...K==="select"&&{"aria-autocomplete":"none"},...K==="combobox"&&{"aria-autocomplete":"list"}}},[z,L,K]),M=p0.useMemo(()=>{if(z==="tooltip"||K==="label")return{[`aria-${K==="label"?"labelledby":"describedby"}`]:X?H:void 0};return{...j,"aria-expanded":X?"true":"false","aria-controls":X?H:void 0,...z==="menu"&&{id:U}}},[z,H,X,U,K,j]),w=p0.useMemo(()=>{let x={id:H,...z&&{role:z}};if(z==="tooltip"||K==="label")return x;return{...x,...z==="menu"&&{"aria-labelledby":U}}},[z,H,U,K]),A=p0.useCallback(({active:x,selected:N})=>{let O={role:"option",...x&&{id:`${H}-fui-option`}};switch(K){case"select":case"combobox":return{...O,"aria-selected":N};default:}return{}},[H,K]);return p0.useMemo(()=>W?{reference:M,floating:w,item:A,trigger:j}:{},[W,M,w,j,A])}var w5=function(Q){return Q.nestedDialogs="--nested-dialogs",Q}({});var O5=function(Q){return Q[Q.open=j0.open]="open",Q[Q.closed=j0.closed]="closed",Q[Q.startingStyle=j0.startingStyle]="startingStyle",Q[Q.endingStyle=j0.endingStyle]="endingStyle",Q.nested="data-nested",Q.nestedDialogOpen="data-nested-dialog-open",Q}({});import*as R8 from"react";var b8=R8.createContext(void 0);b8.displayName="DialogPortalContext";function v8(){let Q=R8.useContext(b8);if(Q===void 0)throw Error("Base UI: <Dialog.Portal> is missing.");return Q}var D5="ArrowUp",T5="ArrowDown",k5="ArrowLeft",I5="ArrowRight",S5="Home",y5="End",I9=new Set([k5,I5]);var S9=new Set([D5,T5]);var y9=new Set([...I9,...S9]),ZY=new Set([...y9,S5,y5]),P5=new Set([D5,T5,k5,I5,S5,y5]);import{jsx as P9}from"react/jsx-runtime";var C9={...W1,...K1,nestedDialogOpen(Q){return Q?{[O5.nestedDialogOpen]:""}:null}},yQ=f8.forwardRef(function(Z,J){let{className:X,finalFocus:q,initialFocus:$,render:G,...W}=Z,{store:K}=X0(),Y=K.useState("descriptionElementId"),U=K.useState("disablePointerDismissal"),H=K.useState("floatingRootContext"),z=K.useState("popupProps"),B=K.useState("modal"),L=K.useState("mounted"),j=K.useState("nested"),M=K.useState("nestedOpenDialogCount"),w=K.useState("open"),A=K.useState("openMethod"),x=K.useState("titleElementId"),N=K.useState("transitionStatus"),O=K.useState("role");v8(),C8({open:w,ref:K.context.popupRef,onComplete(){if(w)K.context.onOpenChangeComplete?.(!0)}});function I(a){if(a==="touch")return K.context.popupRef.current;return!0}let D=$===void 0?I:$,C=M>0,c=f8.useMemo(()=>({open:w,nested:j,transitionStatus:N,nestedDialogOpen:C}),[w,j,N,C]),d=q0("div",Z,{state:c,props:[z,{"aria-labelledby":x??void 0,"aria-describedby":Y??void 0,role:O,tabIndex:-1,hidden:!L,onKeyDown(a){if(P5.has(a.key))a.stopPropagation()},style:{[w5.nestedDialogs]:M}},W],ref:[J,K.context.popupRef,K.useStateSetter("popupElement")],stateAttributesMapping:C9});return P9(NQ,{context:H,openInteractionType:A,disabled:!L,closeOnFocusOut:!U,initialFocus:D,returnFocus:q,modal:B!==!1,restoreFocus:"popup",children:d})});yQ.displayName="DialogPopup";import*as R5 from"react";function C5(Q){if(G1(19))return Q;return Q?"true":void 0}import*as E5 from"react";import{jsx as E9}from"react/jsx-runtime";var PQ=E5.forwardRef(function(Z,J){let{cutout:X,...q}=Z,$;if(X){let G=X?.getBoundingClientRect();$=`polygon(
11
+ 0% 0%,
12
+ 100% 0%,
13
+ 100% 100%,
14
+ 0% 100%,
15
+ 0% 0%,
16
+ ${G.left}px ${G.top}px,
17
+ ${G.left}px ${G.bottom}px,
18
+ ${G.right}px ${G.bottom}px,
19
+ ${G.right}px ${G.top}px,
20
+ ${G.left}px ${G.top}px
21
+ )`}return E9("div",{ref:J,role:"presentation","data-base-ui-inert":"",...q,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:$}})});PQ.displayName="InternalBackdrop";import{jsx as h5,jsxs as h9}from"react/jsx-runtime";var CQ=R5.forwardRef(function(Z,J){let{keepMounted:X=!1,...q}=Z,{store:$}=X0(),G=$.useState("mounted"),W=$.useState("modal");if(!(G||X))return null;return h5(b8.Provider,{value:X,children:h9(k8,{ref:J,...q,children:[G&&W===!0&&h5(PQ,{ref:$.context.internalBackdropRef,inert:C5(!open)}),Z.children]})})});CQ.displayName="DialogPortal";import*as d5 from"react";import*as O0 from"react";var b5={},v5={},f5="";function R9(Q){if(typeof document>"u")return!1;let Z=R1(Q);return V0(Z).innerWidth-Z.documentElement.clientWidth>0}function b9(Q){let Z=R1(Q),J=Z.documentElement,X=Z.body,q=k1(J)?J:X,$=q.style.overflow;return q.style.overflow="hidden",()=>{q.style.overflow=$}}function v9(Q){let Z=R1(Q),J=Z.documentElement,X=Z.body,q=V0(J),$=0,G=0,W=x0.create(),K=typeof CSS<"u"&&CSS.supports?.("scrollbar-gutter","stable");if(N6&&(q.visualViewport?.scale??1)!==1)return()=>{};function Y(){let z=q.getComputedStyle(J),B=q.getComputedStyle(X),M=(z.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";$=J.scrollTop,G=J.scrollLeft,b5={scrollbarGutter:J.style.scrollbarGutter,overflowY:J.style.overflowY,overflowX:J.style.overflowX},f5=J.style.scrollBehavior,v5={position:X.style.position,height:X.style.height,width:X.style.width,boxSizing:X.style.boxSizing,overflowY:X.style.overflowY,overflowX:X.style.overflowX,scrollBehavior:X.style.scrollBehavior};let w=J.scrollHeight>J.clientHeight,A=J.scrollWidth>J.clientWidth,x=z.overflowY==="scroll"||B.overflowY==="scroll",N=z.overflowX==="scroll"||B.overflowX==="scroll",O=Math.max(0,q.innerWidth-J.clientWidth),I=Math.max(0,q.innerHeight-J.clientHeight),D=parseFloat(B.marginTop)+parseFloat(B.marginBottom),C=parseFloat(B.marginLeft)+parseFloat(B.marginRight),c=k1(J)?J:X;if(K){J.style.scrollbarGutter=M,c.style.overflowY="hidden",c.style.overflowX="hidden";return}if(Object.assign(J.style,{scrollbarGutter:M,overflowY:"hidden",overflowX:"hidden"}),w||x)J.style.overflowY="scroll";if(A||N)J.style.overflowX="scroll";Object.assign(X.style,{position:"relative",height:D||I?`calc(100dvh - ${D+I}px)`:"100dvh",width:C||O?`calc(100vw - ${C+O}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),X.scrollTop=$,X.scrollLeft=G,J.setAttribute("data-base-ui-scroll-locked",""),J.style.scrollBehavior="unset"}function U(){if(Object.assign(J.style,b5),Object.assign(X.style,v5),!K)J.scrollTop=$,J.scrollLeft=G,J.removeAttribute("data-base-ui-scroll-locked"),J.style.scrollBehavior=f5}function H(){U(),W.request(Y)}return Y(),q.addEventListener("resize",H),()=>{if(W.cancel(),U(),typeof q.removeEventListener==="function")q.removeEventListener("resize",H)}}class g5{lockCount=0;restore=null;timeoutLock=b0.create();timeoutUnlock=b0.create();acquire(Q){if(this.lockCount+=1,this.lockCount===1&&this.restore===null)this.timeoutLock.start(0,()=>this.lock(Q));return this.release}release=()=>{if(this.lockCount-=1,this.lockCount===0&&this.restore)this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{if(this.lockCount===0&&this.restore)this.restore?.(),this.restore=null};lock(Q){if(this.lockCount===0||this.restore!==null)return;let J=R1(Q).documentElement,X=V0(J).getComputedStyle(J).overflowY;if(X==="hidden"||X==="clip"){this.restore=e1;return}let q=A6||!R9(Q);this.restore=q?b9(Q):v9(Q)}}var f9=new g5;function m5(Q=!0,Z=null){p(()=>{if(!Q)return;return f9.acquire(Z)},[Q,Z])}import*as F1 from"react";import*as c1 from"react";function u5(Q){let Z=c1.useRef(""),J=c1.useCallback((q)=>{if(q.defaultPrevented)return;Z.current=q.pointerType,Q(q,q.pointerType)},[Q]);return{onClick:c1.useCallback((q)=>{if(q.detail===0){Q(q,"keyboard");return}if("pointerType"in q)Q(q,q.pointerType);Q(q,Z.current),Z.current=""},[Q]),onPointerDown:J}}function p5(Q){let[Z,J]=F1.useState(null),X=R((W,K)=>{if(!Q)J(K)}),q=F1.useCallback(()=>{J(null)},[]),{onClick:$,onPointerDown:G}=u5(X);return F1.useMemo(()=>({openMethod:Z,reset:q,triggerProps:{onClick:$,onPointerDown:G}}),[Z,q,$,G])}function c5(Q){let{store:Z,parentContext:J,actionsRef:X}=Q,q=Z.useState("open"),$=Z.useState("disablePointerDismissal"),G=Z.useState("modal"),W=Z.useState("popupElement"),{openMethod:K,triggerProps:Y,reset:U}=p5(q);V5(Z);let{forceUnmount:H}=F5(q,Z,()=>{U()}),z=R((d)=>{let a=Q0(d);return a.preventUnmountOnClose=()=>{Z.set("preventUnmountingOnClose",!0)},a}),B=O0.useCallback(()=>{Z.setOpen(!1,z(r.imperativeAction))},[Z,z]);O0.useImperativeHandle(X,()=>({unmount:H,close:B}),[H,B]);let L=IQ({popupStore:Z,onOpenChange:Z.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[j,M]=O0.useState(0),w=j===0,A=SQ(L),x=xQ(L,{outsidePressEvent(){if(Z.context.internalBackdropRef.current||Z.context.backdropRef.current)return"intentional";return{mouse:G==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(d){if("button"in d&&d.button!==0)return!1;if("touches"in d&&d.touches.length!==1)return!1;let a=B0(d);if(w&&!$){let G0=a;if(G)return Z.context.internalBackdropRef.current||Z.context.backdropRef.current?Z.context.internalBackdropRef.current===G0||Z.context.backdropRef.current===G0||s(G0,W)&&!G0?.hasAttribute("data-base-ui-portal"):!0;return!0}return!1},escapeKey:w});m5(q&&G===!0,W);let{getReferenceProps:N,getFloatingProps:O,getTriggerProps:I}=p1([A,x]);Z.useContextCallback("onNestedDialogOpen",(d)=>{M(d+1)}),Z.useContextCallback("onNestedDialogClose",()=>{M(0)}),O0.useEffect(()=>{if(J?.onNestedDialogOpen&&q)J.onNestedDialogOpen(j);if(J?.onNestedDialogClose&&!q)J.onNestedDialogClose();return()=>{if(J?.onNestedDialogClose&&q)J.onNestedDialogClose()}},[q,J,j]);let D=O0.useMemo(()=>N(Y),[N,Y]),C=O0.useMemo(()=>I(Y),[I,Y]),c=O0.useMemo(()=>O(),[O]);Z.useSyncedValues({openMethod:K,activeTriggerProps:D,inactiveTriggerProps:C,popupProps:c,floatingRootContext:L,nestedOpenDialogCount:j})}import*as g8 from"react";var g9={...A5,modal:u((Q)=>Q.modal),nested:u((Q)=>Q.nested),nestedOpenDialogCount:u((Q)=>Q.nestedOpenDialogCount),disablePointerDismissal:u((Q)=>Q.disablePointerDismissal),openMethod:u((Q)=>Q.openMethod),descriptionElementId:u((Q)=>Q.descriptionElementId),titleElementId:u((Q)=>Q.titleElementId),viewportElement:u((Q)=>Q.viewportElement),role:u((Q)=>Q.role)};class d1 extends f1{constructor(Q){super(m9(Q),{popupRef:g8.createRef(),backdropRef:g8.createRef(),internalBackdropRef:g8.createRef(),triggerElements:new u1,onOpenChange:void 0,onOpenChangeComplete:void 0},g9)}setOpen=(Q,Z)=>{if(Z.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!Q&&Z.trigger==null&&this.state.activeTriggerId!=null)Z.trigger=this.state.activeTriggerElement??void 0;if(this.context.onOpenChange?.(Q,Z),Z.isCanceled)return;let J={open:Q,nativeEvent:Z.event,reason:Z.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",J);let X={open:Q},q=Z.trigger?.id??null;if(q||Q)X.activeTriggerId=q,X.activeTriggerElement=Z.trigger??null;this.update(X)}}function m9(Q={}){return{...N5(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...Q}}import{jsx as u9}from"react/jsx-runtime";function i5(Q){let{children:Z,open:J,defaultOpen:X=!1,onOpenChange:q,onOpenChangeComplete:$,disablePointerDismissal:G=!1,modal:W=!0,actionsRef:K,handle:Y,triggerId:U,defaultTriggerId:H=null}=Q,z=X0(!0),B=Boolean(z),L=W0(()=>{return Y?.store??new d1({open:J??X,activeTriggerId:U!==void 0?U:H,modal:W,disablePointerDismissal:G,nested:B})}).current;L.useControlledProp("open",J,X),L.useControlledProp("activeTriggerId",U,H),L.useSyncedValues({disablePointerDismissal:G,nested:B,modal:W}),L.useContextCallback("onOpenChange",q),L.useContextCallback("onOpenChangeComplete",$);let j=L.useState("payload");c5({store:L,actionsRef:K,parentContext:z?.store.context,onOpenChange:q,triggerIdProp:U});let M=d5.useMemo(()=>({store:L}),[L]);return u9(o1.Provider,{value:M,children:typeof Z==="function"?Z({payload:j}):Z})}import*as m8 from"react";var EQ=function(Q){return Q[Q.open=j0.open]="open",Q[Q.closed=j0.closed]="closed",Q[Q.startingStyle=j0.startingStyle]="startingStyle",Q[Q.endingStyle=j0.endingStyle]="endingStyle",Q.nested="data-nested",Q.nestedDialogOpen="data-nested-dialog-open",Q}({});var p9={...W1,...K1,nested(Q){return Q?{[EQ.nested]:""}:null},nestedDialogOpen(Q){return Q?{[EQ.nestedDialogOpen]:""}:null}},hQ=m8.forwardRef(function(Z,J){let{className:X,render:q,children:$,...G}=Z,W=v8(),{store:K}=X0(),Y=K.useState("open"),U=K.useState("nested"),H=K.useState("transitionStatus"),z=K.useState("nestedOpenDialogCount"),B=K.useState("mounted"),L=z>0,j=m8.useMemo(()=>({open:Y,nested:U,transitionStatus:H,nestedDialogOpen:L}),[Y,U,H,L]);return q0("div",Z,{enabled:W||B,state:j,ref:[J,K.useStateSetter("viewportElement")],stateAttributesMapping:p9,props:[{role:"presentation",hidden:!B,children:$},G]})});hQ.displayName="DialogViewport";import*as l5 from"react";var RQ=l5.forwardRef(function(Z,J){let{render:X,className:q,id:$,...G}=Z,{store:W}=X0(),K=z1($);return W.useSyncedValueWithCleanup("titleElementId",K),q0("h2",Z,{ref:J,props:[{id:K},G]})});RQ.displayName="DialogTitle";import*as M1 from"react";var bQ=M1.forwardRef(function(Z,J){let{render:X,className:q,disabled:$=!1,nativeButton:G=!0,id:W,payload:K,handle:Y,...U}=Z,H=X0(!0),z=Y?.store??H?.store;if(!z)throw Error("Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.");let B=z1(W),L=z.useState("floatingRootContext"),j=z.useState("isOpenedByTrigger",B),M=M1.useRef(null),{registerTrigger:w,isMountedByThisTrigger:A}=j5(B,M,z,{payload:K}),{getButtonProps:x,buttonRef:N}=y1({disabled:$,native:G}),O=AQ(L,{enabled:L!=null}),I=p1([O]),D=M1.useMemo(()=>({disabled:$,open:j}),[$,j]),C=z.useState("triggerProps",A);return q0("button",Z,{state:D,ref:[N,J,w,M],props:[I.getReferenceProps(),C,{[Q8]:"",id:B},U,x],stateAttributesMapping:G6})});bQ.displayName="DialogTrigger";class u8{constructor(Q){this.store=Q??new d1}open(Q){let Z=Q?this.store.context.triggerElements.getById(Q):void 0;if(Q&&!Z)console.warn(`Base UI: DialogHandle.open: No trigger found with id "${Q}". The dialog will open, but the trigger will not be associated with the dialog.`);this.store.setOpen(!0,Q0(r.imperativeAction,void 0,Z))}openWithPayload(Q){this.store.set("payload",Q),this.store.setOpen(!0,Q0(r.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,Q0(r.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}function r5(){return new u8}function E0(Q){return q0(Q.defaultTagName??"div",Q,Q)}import*as h from"react";var s5=1,c9=0.9,d9=0.8,i9=0.17,vQ=0.1,fQ=0.999,l9=0.9999;var r9=0.99,s9=/[\\\/_+.#"@\[\(\{&]/,a9=/[\\\/_+.#"@\[\(\{&]/g,n9=/[\s-]/,n5=/[\s-]/g;function gQ(Q,Z,J,X,q,$,G){if($===Z.length){if(q===Q.length)return s5;return r9}var W=`${q},${$}`;let K=G[W];if(K!==void 0)return K;var Y=X.charAt($),U=J.indexOf(Y,q),H=0,z,B,L,j;while(U>=0){if(z=gQ(Q,Z,J,X,U+1,$+1,G),z>H){if(U===q)z*=s5;else if(s9.test(Q.charAt(U-1))){if(z*=d9,L=Q.slice(q,U-1).match(a9),L&&q>0)z*=Math.pow(fQ,L.length)}else if(n9.test(Q.charAt(U-1))){if(z*=c9,j=Q.slice(q,U-1).match(n5),j&&q>0)z*=Math.pow(fQ,j.length)}else if(z*=i9,q>0)z*=Math.pow(fQ,U-q);if(Q.charAt(U)!==Z.charAt($))z*=l9}if(z<vQ&&J.charAt(U-1)===X.charAt($+1)||X.charAt($+1)===X.charAt($)&&J.charAt(U-1)!==X.charAt($)){if(B=gQ(Q,Z,J,X,U+1,$+2,G),B*vQ>z)z=B*vQ}if(z>H)H=z;U=J.indexOf(Y,U+1)}return G[W]=H,H}function a5(Q){return Q.toLowerCase().replace(n5," ")}function o5(Q,Z,J=[]){let X=J.length>0?`${Q+" "+J.join(" ")}`:Q;return gQ(X,Z,a5(X),a5(Z),0,0,{})}import*as i1 from"react";var o9=globalThis?.document?i1.useLayoutEffect:()=>{};var t9=i1[" useId ".trim().toString()]||(()=>{return}),e9=0;function Z1(Q){let[Z,J]=i1.useState(t9());return o9(()=>{if(!Q)J((X)=>X??String(e9++))},[Q]),Q||(Z?`radix-${Z}`:"")}import*as QJ from"react";function ZJ(Q,Z){if(typeof Q==="function")Q(Z);else if(Q!==null&&Q!==void 0)Q.current=Z}function t5(...Q){return(Z)=>Q.forEach((J)=>ZJ(J,Z))}import{jsxDEV as U0,Fragment as Y7}from"react/jsx-dev-runtime";var l1='[cmdk-group=""]',mQ='[cmdk-group-items=""]',JJ='[cmdk-group-heading=""]',Q7='[cmdk-item=""]',e5=`${Q7}:not([aria-disabled="true"])`,uQ="cmdk-item-select",N1="data-value",XJ=(Q,Z,J)=>o5(Q,Z,J??[]),Z7=h.createContext(null),r1=()=>{let Q=h.useContext(Z7);if(!Q)throw Error("Command components must be wrapped in <Command>.");return Q},J7=h.createContext(null),pQ=()=>{let Q=h.useContext(J7);if(!Q)throw Error("Command store is missing.");return Q},X7=h.createContext(null),q7=h.forwardRef((Q,Z)=>{let J=A1(()=>({search:"",value:Q.value??Q.defaultValue??"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),X=A1(()=>new Set),q=A1(()=>new Map),$=A1(()=>new Map),G=A1(()=>new Set),W=$7(Q),{label:K,children:Y,render:U,value:H,onValueChange:z,filter:B,shouldFilter:L,loop:j,disablePointerSelection:M=!1,vimBindings:w=!0,...A}=Q,x=Z1(),N=Z1(),O=Z1(),I=h.useRef(null),D=LJ();J1(()=>{if(H!==void 0){let _=H.trim();J.current.value=_,C.emit()}},[H]),J1(()=>{D(6,Y0)},[]);let C=h.useMemo(()=>{return{subscribe:(_)=>{return G.current.add(_),()=>G.current.delete(_)},snapshot:()=>{return J.current},setState:(_,b,S)=>{if(Object.is(J.current[_],b))return;if(J.current[_]=b,_==="search")D0(),a(),D(1,G0);else if(_==="value"){if(document?.activeElement?.hasAttribute("cmdk-input")||document?.activeElement?.hasAttribute("cmdk-root")){let F=document.getElementById(O);if(F)F.focus();else document.getElementById(x)?.focus()}if(D(7,()=>{J.current.selectedItemId=f()?.id,C.emit()}),!S)D(5,Y0);if(W.current?.value!==void 0){let F=b??"";W.current.onValueChange?.(F);return}}C.emit()},emit:()=>{G.current.forEach((_)=>_())}}},[]),c=h.useMemo(()=>({value:(_,b,S)=>{if(b!==$.current.get(_)?.value)$.current.set(_,{value:b,keywords:S}),J.current.filtered.items.set(_,d(b,S)),D(2,()=>{a(),C.emit()})},item:(_,b)=>{if(X.current.add(_),b){let S=q.current.get(b);if(S)S.add(_);else q.current.set(b,new Set([_]))}return D(3,()=>{if(D0(),a(),!J.current.value)G0();C.emit()}),()=>{$.current.delete(_),X.current.delete(_),J.current.filtered.items.delete(_);let S=f();D(4,()=>{if(D0(),S?.getAttribute("id")===_)G0();C.emit()})}},group:(_)=>{if(!q.current.has(_))q.current.set(_,new Set);return()=>{$.current.delete(_),q.current.delete(_)}},filter:()=>W.current.shouldFilter!==!1,label:K||Q["aria-label"]||"",getDisablePointerSelection:()=>{return W.current.disablePointerSelection??!1},listId:x,inputId:O,labelId:N,listInnerRef:I}),[]);function d(_,b){let S=W.current?.filter??XJ;return _?S(_,J.current.search,b):0}function a(){if(!J.current.search||W.current.shouldFilter===!1)return;let _=J.current.filtered.items,b=[];J.current.filtered.groups.forEach((F)=>{let E=q.current.get(F);if(!E)return;let l=0;E.forEach((V)=>{let v=_.get(V)??0;l=Math.max(v,l)}),b.push([F,l])});let S=I.current;if(!S)return;K0().sort((F,E)=>{let l=F.getAttribute("id")??"",V=E.getAttribute("id")??"";return(_.get(V)??0)-(_.get(l)??0)}).forEach((F)=>{let E=F.closest(mQ);if(E){let l=F.parentElement===E?F:F.closest(`${mQ} > *`);if(l)E.appendChild(l)}else{let l=F.parentElement===S?F:F.closest(`${mQ} > *`);if(l)S.appendChild(l)}}),b.sort((F,E)=>E[1]-F[1]).forEach((F)=>{let E=I.current?.querySelector(`${l1}[${N1}="${encodeURIComponent(F[0])}"]`),l=E?.parentElement;if(E&&l)l.appendChild(E)})}function G0(){let b=K0().find((S)=>S.getAttribute("aria-disabled")!=="true")?.getAttribute(N1);C.setState("value",b??"")}function D0(){if(!J.current.search||W.current.shouldFilter===!1){J.current.filtered.count=X.current.size;return}J.current.filtered.groups=new Set;let _=0;for(let b of X.current){let S=$.current.get(b)?.value??"",F=$.current.get(b)?.keywords??[],E=d(S,F);if(J.current.filtered.items.set(b,E),E>0)_++}for(let[b,S]of q.current)for(let F of S)if((J.current.filtered.items.get(F)??0)>0){J.current.filtered.groups.add(b);break}J.current.filtered.count=_}function Y0(){let _=f();if(_){if(_.parentElement?.firstChild===_)_.closest(l1)?.querySelector(JJ)?.scrollIntoView({block:"nearest"});_.scrollIntoView({block:"nearest"})}}function f(){let _=I.current?.querySelector(`${Q7}[aria-selected="true"]`);return _ instanceof HTMLElement?_:null}function K0(){let _=I.current?.querySelectorAll(e5);if(!_)return[];return Array.from(_).filter((b)=>b instanceof HTMLElement)}function i0(_){let S=K0()[_];if(!S)return;let F=S.getAttribute(N1);if(F!=null)C.setState("value",F)}function e(_){let b=f(),S=K0(),F=S.findIndex((V)=>V===b),E=S[F+_];if(W.current?.loop)E=F+_<0?S[S.length-1]:F+_===S.length?S[0]:S[F+_];if(!E)return;let l=E.getAttribute(N1);if(l!=null)C.setState("value",l)}function H0(_){let S=f()?.closest(l1),F=null;while(S&&!F){S=_>0?BJ(S,l1):HJ(S,l1);let E=S?.querySelector(e5);F=E instanceof HTMLElement?E:null}if(F){let E=F.getAttribute(N1);if(E!=null)C.setState("value",E)}else e(_)}let T0=()=>i0(K0().length-1),l0=(_)=>{if(_.preventDefault(),_.metaKey)T0();else if(_.altKey)H0(1);else e(1)},k0=(_)=>{if(_.preventDefault(),_.metaKey)i0(0);else if(_.altKey)H0(-1);else e(-1)},L0=(_)=>{let b=_,S=_.nativeEvent.isComposing||_.keyCode===229;if(b.baseUIHandlerPrevented||_.defaultPrevented||S)return;switch(_.key){case"n":case"j":{if(w&&_.ctrlKey)l0(_);break}case"ArrowDown":{l0(_);break}case"p":case"k":{if(w&&_.ctrlKey)k0(_);break}case"ArrowUp":{k0(_);break}case"Home":{_.preventDefault(),i0(0);break}case"End":{_.preventDefault(),T0();break}case"Enter":{_.preventDefault();let F=f();if(F){let E=new Event(uQ);F.dispatchEvent(E)}}}},X1=U0(Y7,{children:[U0("label",{"cmdk-label":"",htmlFor:c.inputId,id:c.labelId,style:_J,children:K},void 0,!1,void 0,this),U0(J7.Provider,{value:C,children:U0(Z7.Provider,{value:c,children:Y},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return E0({defaultTagName:"div",render:U,ref:Z,props:d0({tabIndex:-1,"cmdk-root":"",onKeyDown:L0,children:X1},A)})}),qJ=h.forwardRef((Q,Z)=>{let J=Z1(),X=h.useRef(null),q=h.useContext(X7),$=r1(),G=$7(Q),W=G.current?.forceMount??q?.forceMount;J1(()=>{if(!W)return $.item(J,q?.id)},[W]);let K=G7(J,X,[Q.value,Q.children,X],Q.keywords),Y=pQ(),U=c0((D)=>D.value&&D.value===K.current),H=c0((D)=>W?!0:$.filter()===!1?!0:!D.search?!0:(D.filtered.items.get(J)??0)>0);h.useEffect(()=>{let D=X.current;if(!D||Q.disabled)return;return D.addEventListener(uQ,z),()=>D.removeEventListener(uQ,z)},[H,Q.onSelect,Q.disabled]);function z(){B(),G.current.onSelect?.(K.current)}function B(){Y.setState("value",K.current,!0)}let L=(D)=>{if(D.baseUIHandlerPrevented||D.defaultPrevented)return;B()},j=(D)=>{if(D.baseUIHandlerPrevented||D.defaultPrevented)return;z()},{disabled:M,value:w,onSelect:A,forceMount:x,keywords:N,render:O,...I}=Q;return E0({defaultTagName:"div",render:O,ref:[X,Z],enabled:H,props:d0({id:J,"cmdk-item":"",role:"option","aria-disabled":Boolean(M),"aria-selected":Boolean(U),"data-disabled":Boolean(M),"data-selected":Boolean(U),onPointerMove:M||$.getDisablePointerSelection()?void 0:L,onClick:M?void 0:j},I)})}),$J=h.forwardRef((Q,Z)=>{let{heading:J,children:X,forceMount:q,render:$,...G}=Q,W=Z1(),K=h.useRef(null),Y=h.useRef(null),U=Z1(),H=r1(),z=c0((j)=>q?!0:H.filter()===!1?!0:!j.search?!0:j.filtered.groups.has(W));J1(()=>{return H.group(W)},[]),G7(W,K,[Q.value,Q.heading,Y]);let B=h.useMemo(()=>({id:W,forceMount:q}),[q]),L=U0(Y7,{children:[J&&U0("div",{ref:Y,"cmdk-group-heading":"","aria-hidden":!0,id:U,children:J},void 0,!1,void 0,this),U0("div",{"cmdk-group-items":"",role:"group","aria-labelledby":J?U:void 0,children:U0(X7.Provider,{value:B,children:X},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return E0({defaultTagName:"div",render:$,ref:[K,Z],props:d0({"cmdk-group":"",role:"presentation",hidden:z?void 0:!0,children:L},G)})}),GJ=h.forwardRef((Q,Z)=>{let{alwaysRender:J,render:X,...q}=Q,$=c0((G)=>!G.search);return E0({defaultTagName:"div",render:X,ref:Z,enabled:J||$,props:d0({"cmdk-separator":"",role:"separator"},q)})}),YJ=h.forwardRef((Q,Z)=>{let{onValueChange:J,render:X,...q}=Q,$=Q.value!=null,G=pQ(),W=c0((U)=>U.search),K=c0((U)=>U.selectedItemId),Y=r1();return h.useEffect(()=>{if(Q.value!=null)G.setState("search",Q.value)},[Q.value]),E0({defaultTagName:"input",render:X,ref:Z,props:d0({"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":Y.listId,"aria-labelledby":Y.labelId,"aria-activedescendant":K,id:Y.inputId,type:"text",value:$?Q.value:W,onChange:(U)=>{if(U.baseUIHandlerPrevented||U.defaultPrevented)return;if(!$)G.setState("search",U.target.value);J?.(U.target.value)}},q)})}),KJ=h.forwardRef((Q,Z)=>{let{children:J,label:X="Suggestions",render:q,...$}=Q,G=h.useRef(null),W=h.useRef(null),K=c0((H)=>H.selectedItemId),Y=r1();h.useEffect(()=>{if(W.current&&G.current){let H=W.current,z=G.current,B=null,L=new ResizeObserver(()=>{B=requestAnimationFrame(()=>{let j=H.offsetHeight;z.style.setProperty("--cmdk-list-height",j.toFixed(1)+"px")})});return L.observe(H),()=>{if(B!=null)cancelAnimationFrame(B);L.unobserve(H)}}},[]);let U=U0("div",{ref:t5(W,Y.listInnerRef),"cmdk-list-sizer":"",children:J},void 0,!1,void 0,this);return E0({defaultTagName:"div",render:q,ref:[G,Z],props:d0({"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":K,"aria-label":X,id:Y.listId,children:U},$)})}),WJ=h.forwardRef((Q,Z)=>{let{open:J,onOpenChange:X,overlayClassName:q,contentClassName:$,container:G,...W}=Q,K=(Y)=>{X?.(Y)};return U0(Q1.Root,{open:J,onOpenChange:K,children:U0(Q1.Portal,{container:G,children:[U0(Q1.Backdrop,{"cmdk-overlay":"",className:q},void 0,!1,void 0,this),U0(Q1.Popup,{"aria-label":Q.label,"cmdk-dialog":"",className:$,children:U0(q7,{ref:Z,...W},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}),UJ=h.forwardRef((Q,Z)=>{let{render:J,...X}=Q,q=c0(($)=>$.filtered.count===0);return E0({defaultTagName:"div",render:J,ref:Z,enabled:q,props:d0({"cmdk-empty":"",role:"presentation"},X)})}),zJ=h.forwardRef((Q,Z)=>{let{progress:J,children:X,label:q="Loading...",render:$,...G}=Q;return E0({defaultTagName:"div",render:$,ref:Z,props:d0({"cmdk-loading":"",role:"progressbar","aria-valuenow":J,"aria-valuemin":0,"aria-valuemax":100,"aria-label":q,children:U0("div",{"aria-hidden":!0,children:X},void 0,!1,void 0,this)},G)})}),n4=Object.assign(q7,{List:KJ,Item:qJ,Input:YJ,Group:$J,Separator:GJ,Dialog:WJ,Empty:UJ,Loading:zJ});function d0(Q,Z,J,X,q){return Y1(Q,Z,J,X,q)}function BJ(Q,Z){let J=Q.nextElementSibling;while(J){if(J.matches(Z))return J;J=J.nextElementSibling}}function HJ(Q,Z){let J=Q.previousElementSibling;while(J){if(J.matches(Z))return J;J=J.previousElementSibling}}function $7(Q){let Z=h.useRef(Q);return J1(()=>{Z.current=Q}),Z}var J1=typeof window>"u"?h.useEffect:h.useLayoutEffect;function A1(Q){let Z=h.useRef(void 0);if(Z.current===void 0)Z.current=Q();return Z}function c0(Q){let Z=pQ(),J=()=>Q(Z.snapshot());return h.useSyncExternalStore(Z.subscribe,J,J)}function G7(Q,Z,J,X){let q=h.useRef(""),$=r1();return J1(()=>{let W=(()=>{for(let Y of J){if(typeof Y==="string")return Y.trim();if(Y&&typeof Y==="object"&&"current"in Y){if(Y.current)return Y.current.textContent?.trim();return q.current}}})()??q.current,K=(X??[]).map((Y)=>Y.trim());$.value(Q,W,K),Z.current?.setAttribute(N1,W),q.current=W}),q}var LJ=()=>{let[Q,Z]=h.useState(),J=A1(()=>new Map);return J1(()=>{J.current.forEach((X)=>X()),J.current=new Map},[Q]),(X,q)=>{J.current.set(X,q),Z({})}},_J={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{c0 as useCommandState,XJ as defaultFilter,GJ as CommandSeparator,q7 as CommandRoot,zJ as CommandLoading,KJ as CommandList,qJ as CommandItem,YJ as CommandInput,$J as CommandGroup,UJ as CommandEmpty,WJ as CommandDialog,n4 as Command};
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "ui-cmdk",
3
+ "version": "0.0.2",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "scripts": {
18
+ "build": "bun run build.ts",
19
+ "prepublishOnly": "rm -rf dist && bun run build"
20
+ },
21
+ "devDependencies": {
22
+ "@types/bun": "latest",
23
+ "@types/react": "^19.2.7",
24
+ "@types/react-dom": "^19.2.3",
25
+ "bun-plugin-dts": "^0.3.0",
26
+ "react": "^19.2.3",
27
+ "react-dom": "^19.2.3"
28
+ },
29
+ "peerDependencies": {
30
+ "react": "^19.2.3",
31
+ "react-dom": "^19.2.3",
32
+ "typescript": "^5"
33
+ },
34
+ "dependencies": {
35
+ "@base-ui/react": "^1.0.0"
36
+ }
37
+ }