supadeck 0.0.6 → 0.0.7

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.
Files changed (57) hide show
  1. package/dist/cli/index.js +30532 -88
  2. package/dist/index.js +2808 -11
  3. package/dist/metafile-esm.json +1 -0
  4. package/dist/runtime/main.js +2868 -21
  5. package/dist/runtime/themes/default/index.js +312 -15
  6. package/dist/runtime/themes/sunset/index.js +2737 -10
  7. package/dist/runtime/vite-config.js +30206 -198
  8. package/package.json +16 -11
  9. package/dist/cli/export.js +0 -35
  10. package/dist/cli/serve.js +0 -12
  11. package/dist/cli/templates.js +0 -69
  12. package/dist/cli/workspace.js +0 -26
  13. package/dist/content/parse-deck.js +0 -136
  14. package/dist/content/rehype-shiki-code-blocks.js +0 -139
  15. package/dist/content/remark-unwrap-jsx-paragraphs.js +0 -63
  16. package/dist/export/pdf.js +0 -40
  17. package/dist/runtime/App.js +0 -45
  18. package/dist/runtime/components/Callout.js +0 -13
  19. package/dist/runtime/components/Center.js +0 -4
  20. package/dist/runtime/components/Columns.js +0 -4
  21. package/dist/runtime/components/Disclosure.js +0 -5
  22. package/dist/runtime/components/Frame.js +0 -4
  23. package/dist/runtime/components/index.js +0 -4
  24. package/dist/runtime/default-components.js +0 -59
  25. package/dist/runtime/hooks/slides.js +0 -45
  26. package/dist/runtime/layout/DeckSlide.js +0 -6
  27. package/dist/runtime/layout/SlideFrame.js +0 -6
  28. package/dist/runtime/mdx-components.d.ts +0 -2
  29. package/dist/runtime/mdx-components.js +0 -17
  30. package/dist/runtime/primitives/DeckChrome.js +0 -6
  31. package/dist/runtime/primitives/DeckNavigation.js +0 -4
  32. package/dist/runtime/primitives/DeckProgress.js +0 -5
  33. package/dist/runtime/primitives/DeckTitle.js +0 -4
  34. package/dist/runtime/public-components.d.ts +0 -22
  35. package/dist/runtime/public-components.js +0 -24
  36. package/dist/runtime/styles/base.css +0 -201
  37. package/dist/runtime/tailwind-hmr.js +0 -67
  38. package/dist/runtime/tailwind-sources.js +0 -42
  39. package/dist/runtime/theme-components.d.ts +0 -3
  40. package/dist/runtime/theme-components.js +0 -18
  41. package/dist/runtime/theme-resolution.js +0 -62
  42. package/dist/runtime/theme-types.js +0 -1
  43. package/dist/runtime/themes/base/DefaultDeck.js +0 -10
  44. package/dist/runtime/themes/default/DefaultDeck.d.ts +0 -2
  45. package/dist/runtime/themes/default/DefaultDeck.js +0 -11
  46. package/dist/runtime/themes/default/DefaultThemeDeck.js +0 -22
  47. package/dist/runtime/themes/default/components.js +0 -100
  48. package/dist/runtime/themes/default.css +0 -10
  49. package/dist/runtime/themes/sunset.css +0 -10
  50. package/dist/runtime/themes/supabase/SupabaseDeck.d.ts +0 -2
  51. package/dist/runtime/themes/supabase/SupabaseDeck.js +0 -23
  52. package/dist/runtime/themes/supabase/components.d.ts +0 -65
  53. package/dist/runtime/themes/supabase/components.js +0 -80
  54. package/dist/runtime/themes/supabase/index.d.ts +0 -4
  55. package/dist/runtime/themes/supabase/index.js +0 -17
  56. package/dist/runtime/themes/supabase/theme.css +0 -523
  57. package/dist/runtime/utils/use-current-slide.js +0 -19
package/dist/index.js CHANGED
@@ -1,11 +1,2808 @@
1
- export { createDefaultComponents, mergeComponents } from './runtime/default-components.js';
2
- export { useCurrentSlide } from './runtime/hooks/slides.js';
3
- export { SlideFrame } from './runtime/layout/SlideFrame.js';
4
- export { DeckSlide } from './runtime/layout/DeckSlide.js';
5
- export { DeckChrome } from './runtime/primitives/DeckChrome.js';
6
- export { DeckNavigation } from './runtime/primitives/DeckNavigation.js';
7
- export { DeckProgress } from './runtime/primitives/DeckProgress.js';
8
- export { DeckTitle } from './runtime/primitives/DeckTitle.js';
9
- export { DefaultDeck } from './runtime/themes/base/DefaultDeck.js';
10
- export { clamp, getHashIndex, parseAspectRatio } from './runtime/utils/use-current-slide.js';
11
- export { Callout, Columns, Disclosure, Frame } from './runtime/components/index.js';
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ // src/runtime/components/Callout.tsx
8
+ import { jsx } from "react/jsx-runtime";
9
+ function toneClasses(tone) {
10
+ if (tone === "accent") {
11
+ return "border-[color:var(--color-accent)] bg-[color:var(--color-accent)]/10";
12
+ }
13
+ if (tone === "danger") {
14
+ return "border-red-500/50 bg-red-500/10";
15
+ }
16
+ return "border-[color:var(--color-border)] bg-white/60 dark:bg-white/5";
17
+ }
18
+ function Callout({ children, tone = "default" }) {
19
+ return /* @__PURE__ */ jsx(
20
+ "div",
21
+ {
22
+ className: `rounded-[var(--radius-lg)] border px-6 py-5 text-xl shadow-lg shadow-black/5 backdrop-blur ${toneClasses(
23
+ tone
24
+ )}`,
25
+ children
26
+ }
27
+ );
28
+ }
29
+
30
+ // src/runtime/components/Columns.tsx
31
+ import { jsxs } from "react/jsx-runtime";
32
+ function Columns({ left, right }) {
33
+ return /* @__PURE__ */ jsxs("div", { className: "grid gap-6 md:grid-cols-2", children: [
34
+ left,
35
+ right
36
+ ] });
37
+ }
38
+
39
+ // node_modules/@base-ui/react/esm/accordion/index.parts.js
40
+ var index_parts_exports = {};
41
+ __export(index_parts_exports, {
42
+ Header: () => AccordionHeader,
43
+ Item: () => AccordionItem,
44
+ Panel: () => AccordionPanel,
45
+ Root: () => AccordionRoot,
46
+ Trigger: () => AccordionTrigger
47
+ });
48
+
49
+ // node_modules/@base-ui/react/esm/accordion/root/AccordionRoot.js
50
+ import * as React12 from "react";
51
+
52
+ // node_modules/@base-ui/utils/esm/useControlled.js
53
+ import * as React from "react";
54
+ function useControlled({
55
+ controlled,
56
+ default: defaultProp,
57
+ name,
58
+ state = "value"
59
+ }) {
60
+ const {
61
+ current: isControlled
62
+ } = React.useRef(controlled !== void 0);
63
+ const [valueState, setValue] = React.useState(defaultProp);
64
+ const value = isControlled ? controlled : valueState;
65
+ if (true) {
66
+ React.useEffect(() => {
67
+ if (isControlled !== (controlled !== void 0)) {
68
+ console.error([`Base UI: A component is changing the ${isControlled ? "" : "un"}controlled ${state} state of ${name} to be ${isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${name} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join("\n"));
69
+ }
70
+ }, [state, name, controlled]);
71
+ const {
72
+ current: defaultValue
73
+ } = React.useRef(defaultProp);
74
+ React.useEffect(() => {
75
+ if (!isControlled && JSON.stringify(defaultValue) !== JSON.stringify(defaultProp)) {
76
+ console.error([`Base UI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. To suppress this warning opt to use a controlled ${name}.`].join("\n"));
77
+ }
78
+ }, [JSON.stringify(defaultProp)]);
79
+ }
80
+ const setValueIfUncontrolled = React.useCallback((newValue) => {
81
+ if (!isControlled) {
82
+ setValue(newValue);
83
+ }
84
+ }, []);
85
+ return [value, setValueIfUncontrolled];
86
+ }
87
+
88
+ // node_modules/@base-ui/utils/esm/useStableCallback.js
89
+ import * as React3 from "react";
90
+
91
+ // node_modules/@base-ui/utils/esm/useRefWithInit.js
92
+ import * as React2 from "react";
93
+ var UNINITIALIZED = {};
94
+ function useRefWithInit(init, initArg) {
95
+ const ref = React2.useRef(UNINITIALIZED);
96
+ if (ref.current === UNINITIALIZED) {
97
+ ref.current = init(initArg);
98
+ }
99
+ return ref;
100
+ }
101
+
102
+ // node_modules/@base-ui/utils/esm/useStableCallback.js
103
+ var useInsertionEffect = React3[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0, -3)];
104
+ var useSafeInsertionEffect = (
105
+ // React 17 doesn't have useInsertionEffect.
106
+ useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late.
107
+ useInsertionEffect !== React3.useLayoutEffect ? useInsertionEffect : (fn) => fn()
108
+ );
109
+ function useStableCallback(callback) {
110
+ const stable = useRefWithInit(createStableCallback).current;
111
+ stable.next = callback;
112
+ useSafeInsertionEffect(stable.effect);
113
+ return stable.trampoline;
114
+ }
115
+ function createStableCallback() {
116
+ const stable = {
117
+ next: void 0,
118
+ callback: assertNotCalled,
119
+ trampoline: (...args) => stable.callback?.(...args),
120
+ effect: () => {
121
+ stable.callback = stable.next;
122
+ }
123
+ };
124
+ return stable;
125
+ }
126
+ function assertNotCalled() {
127
+ if (true) {
128
+ throw (
129
+ /* minify-error-disabled */
130
+ new Error("Base UI: Cannot call an event handler while rendering.")
131
+ );
132
+ }
133
+ }
134
+
135
+ // node_modules/@base-ui/utils/esm/useIsoLayoutEffect.js
136
+ import * as React4 from "react";
137
+ var noop = () => {
138
+ };
139
+ var useIsoLayoutEffect = typeof document !== "undefined" ? React4.useLayoutEffect : noop;
140
+
141
+ // node_modules/@base-ui/utils/esm/warn.js
142
+ var set;
143
+ if (true) {
144
+ set = /* @__PURE__ */ new Set();
145
+ }
146
+ function warn(...messages) {
147
+ if (true) {
148
+ const messageKey = messages.join(" ");
149
+ if (!set.has(messageKey)) {
150
+ set.add(messageKey);
151
+ console.warn(`Base UI: ${messageKey}`);
152
+ }
153
+ }
154
+ }
155
+
156
+ // node_modules/@base-ui/react/esm/composite/list/CompositeList.js
157
+ import * as React6 from "react";
158
+
159
+ // node_modules/@base-ui/react/esm/composite/list/CompositeListContext.js
160
+ import * as React5 from "react";
161
+ var CompositeListContext = /* @__PURE__ */ React5.createContext({
162
+ register: () => {
163
+ },
164
+ unregister: () => {
165
+ },
166
+ subscribeMapChange: () => {
167
+ return () => {
168
+ };
169
+ },
170
+ elementsRef: {
171
+ current: []
172
+ },
173
+ nextIndexRef: {
174
+ current: 0
175
+ }
176
+ });
177
+ if (true) CompositeListContext.displayName = "CompositeListContext";
178
+ function useCompositeListContext() {
179
+ return React5.useContext(CompositeListContext);
180
+ }
181
+
182
+ // node_modules/@base-ui/react/esm/composite/list/CompositeList.js
183
+ import { jsx as _jsx } from "react/jsx-runtime";
184
+ function CompositeList(props) {
185
+ const {
186
+ children,
187
+ elementsRef,
188
+ labelsRef,
189
+ onMapChange: onMapChangeProp
190
+ } = props;
191
+ const onMapChange = useStableCallback(onMapChangeProp);
192
+ const nextIndexRef = React6.useRef(0);
193
+ const listeners = useRefWithInit(createListeners).current;
194
+ const map = useRefWithInit(createMap).current;
195
+ const [mapTick, setMapTick] = React6.useState(0);
196
+ const lastTickRef = React6.useRef(mapTick);
197
+ const register = useStableCallback((node, metadata) => {
198
+ map.set(node, metadata ?? null);
199
+ lastTickRef.current += 1;
200
+ setMapTick(lastTickRef.current);
201
+ });
202
+ const unregister = useStableCallback((node) => {
203
+ map.delete(node);
204
+ lastTickRef.current += 1;
205
+ setMapTick(lastTickRef.current);
206
+ });
207
+ const sortedMap = React6.useMemo(() => {
208
+ disableEslintWarning(mapTick);
209
+ const newMap = /* @__PURE__ */ new Map();
210
+ const sortedNodes = Array.from(map.keys()).filter((node) => node.isConnected).sort(sortByDocumentPosition);
211
+ sortedNodes.forEach((node, index) => {
212
+ const metadata = map.get(node) ?? {};
213
+ newMap.set(node, {
214
+ ...metadata,
215
+ index
216
+ });
217
+ });
218
+ return newMap;
219
+ }, [map, mapTick]);
220
+ useIsoLayoutEffect(() => {
221
+ if (typeof MutationObserver !== "function" || sortedMap.size === 0) {
222
+ return void 0;
223
+ }
224
+ const mutationObserver = new MutationObserver((entries) => {
225
+ const diff = /* @__PURE__ */ new Set();
226
+ const updateDiff = (node) => diff.has(node) ? diff.delete(node) : diff.add(node);
227
+ entries.forEach((entry) => {
228
+ entry.removedNodes.forEach(updateDiff);
229
+ entry.addedNodes.forEach(updateDiff);
230
+ });
231
+ if (diff.size === 0) {
232
+ lastTickRef.current += 1;
233
+ setMapTick(lastTickRef.current);
234
+ }
235
+ });
236
+ sortedMap.forEach((_, node) => {
237
+ if (node.parentElement) {
238
+ mutationObserver.observe(node.parentElement, {
239
+ childList: true
240
+ });
241
+ }
242
+ });
243
+ return () => {
244
+ mutationObserver.disconnect();
245
+ };
246
+ }, [sortedMap]);
247
+ useIsoLayoutEffect(() => {
248
+ const shouldUpdateLengths = lastTickRef.current === mapTick;
249
+ if (shouldUpdateLengths) {
250
+ if (elementsRef.current.length !== sortedMap.size) {
251
+ elementsRef.current.length = sortedMap.size;
252
+ }
253
+ if (labelsRef && labelsRef.current.length !== sortedMap.size) {
254
+ labelsRef.current.length = sortedMap.size;
255
+ }
256
+ nextIndexRef.current = sortedMap.size;
257
+ }
258
+ onMapChange(sortedMap);
259
+ }, [onMapChange, sortedMap, elementsRef, labelsRef, mapTick]);
260
+ useIsoLayoutEffect(() => {
261
+ return () => {
262
+ elementsRef.current = [];
263
+ };
264
+ }, [elementsRef]);
265
+ useIsoLayoutEffect(() => {
266
+ return () => {
267
+ if (labelsRef) {
268
+ labelsRef.current = [];
269
+ }
270
+ };
271
+ }, [labelsRef]);
272
+ const subscribeMapChange = useStableCallback((fn) => {
273
+ listeners.add(fn);
274
+ return () => {
275
+ listeners.delete(fn);
276
+ };
277
+ });
278
+ useIsoLayoutEffect(() => {
279
+ listeners.forEach((l) => l(sortedMap));
280
+ }, [listeners, sortedMap]);
281
+ const contextValue = React6.useMemo(() => ({
282
+ register,
283
+ unregister,
284
+ subscribeMapChange,
285
+ elementsRef,
286
+ labelsRef,
287
+ nextIndexRef
288
+ }), [register, unregister, subscribeMapChange, elementsRef, labelsRef, nextIndexRef]);
289
+ return /* @__PURE__ */ _jsx(CompositeListContext.Provider, {
290
+ value: contextValue,
291
+ children
292
+ });
293
+ }
294
+ function createMap() {
295
+ return /* @__PURE__ */ new Map();
296
+ }
297
+ function createListeners() {
298
+ return /* @__PURE__ */ new Set();
299
+ }
300
+ function sortByDocumentPosition(a, b) {
301
+ const position = a.compareDocumentPosition(b);
302
+ if (position & Node.DOCUMENT_POSITION_FOLLOWING || position & Node.DOCUMENT_POSITION_CONTAINED_BY) {
303
+ return -1;
304
+ }
305
+ if (position & Node.DOCUMENT_POSITION_PRECEDING || position & Node.DOCUMENT_POSITION_CONTAINS) {
306
+ return 1;
307
+ }
308
+ return 0;
309
+ }
310
+ function disableEslintWarning(_) {
311
+ }
312
+
313
+ // node_modules/@base-ui/react/esm/direction-provider/DirectionContext.js
314
+ import * as React7 from "react";
315
+ var DirectionContext = /* @__PURE__ */ React7.createContext(void 0);
316
+ if (true) DirectionContext.displayName = "DirectionContext";
317
+ function useDirection() {
318
+ const context = React7.useContext(DirectionContext);
319
+ return context?.direction ?? "ltr";
320
+ }
321
+
322
+ // node_modules/@base-ui/react/esm/accordion/root/AccordionRootContext.js
323
+ import * as React8 from "react";
324
+ var AccordionRootContext = /* @__PURE__ */ React8.createContext(void 0);
325
+ if (true) AccordionRootContext.displayName = "AccordionRootContext";
326
+ function useAccordionRootContext() {
327
+ const context = React8.useContext(AccordionRootContext);
328
+ if (context === void 0) {
329
+ throw new Error(true ? "Base UI: AccordionRootContext is missing. Accordion parts must be placed within <Accordion.Root>." : formatErrorMessage_default(10));
330
+ }
331
+ return context;
332
+ }
333
+
334
+ // node_modules/@base-ui/react/esm/utils/useRenderElement.js
335
+ import * as React11 from "react";
336
+
337
+ // node_modules/@base-ui/utils/esm/useMergedRefs.js
338
+ function useMergedRefs(a, b, c, d) {
339
+ const forkRef = useRefWithInit(createForkRef).current;
340
+ if (didChange(forkRef, a, b, c, d)) {
341
+ update(forkRef, [a, b, c, d]);
342
+ }
343
+ return forkRef.callback;
344
+ }
345
+ function useMergedRefsN(refs) {
346
+ const forkRef = useRefWithInit(createForkRef).current;
347
+ if (didChangeN(forkRef, refs)) {
348
+ update(forkRef, refs);
349
+ }
350
+ return forkRef.callback;
351
+ }
352
+ function createForkRef() {
353
+ return {
354
+ callback: null,
355
+ cleanup: null,
356
+ refs: []
357
+ };
358
+ }
359
+ function didChange(forkRef, a, b, c, d) {
360
+ return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
361
+ }
362
+ function didChangeN(forkRef, newRefs) {
363
+ return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
364
+ }
365
+ function update(forkRef, refs) {
366
+ forkRef.refs = refs;
367
+ if (refs.every((ref) => ref == null)) {
368
+ forkRef.callback = null;
369
+ return;
370
+ }
371
+ forkRef.callback = (instance) => {
372
+ if (forkRef.cleanup) {
373
+ forkRef.cleanup();
374
+ forkRef.cleanup = null;
375
+ }
376
+ if (instance != null) {
377
+ const cleanupCallbacks = Array(refs.length).fill(null);
378
+ for (let i = 0; i < refs.length; i += 1) {
379
+ const ref = refs[i];
380
+ if (ref == null) {
381
+ continue;
382
+ }
383
+ switch (typeof ref) {
384
+ case "function": {
385
+ const refCleanup = ref(instance);
386
+ if (typeof refCleanup === "function") {
387
+ cleanupCallbacks[i] = refCleanup;
388
+ }
389
+ break;
390
+ }
391
+ case "object": {
392
+ ref.current = instance;
393
+ break;
394
+ }
395
+ default:
396
+ }
397
+ }
398
+ forkRef.cleanup = () => {
399
+ for (let i = 0; i < refs.length; i += 1) {
400
+ const ref = refs[i];
401
+ if (ref == null) {
402
+ continue;
403
+ }
404
+ switch (typeof ref) {
405
+ case "function": {
406
+ const cleanupCallback = cleanupCallbacks[i];
407
+ if (typeof cleanupCallback === "function") {
408
+ cleanupCallback();
409
+ } else {
410
+ ref(null);
411
+ }
412
+ break;
413
+ }
414
+ case "object": {
415
+ ref.current = null;
416
+ break;
417
+ }
418
+ default:
419
+ }
420
+ }
421
+ };
422
+ }
423
+ };
424
+ }
425
+
426
+ // node_modules/@base-ui/utils/esm/getReactElementRef.js
427
+ import * as React10 from "react";
428
+
429
+ // node_modules/@base-ui/utils/esm/reactVersion.js
430
+ import * as React9 from "react";
431
+ var majorVersion = parseInt(React9.version, 10);
432
+ function isReactVersionAtLeast(reactVersionToCheck) {
433
+ return majorVersion >= reactVersionToCheck;
434
+ }
435
+
436
+ // node_modules/@base-ui/utils/esm/getReactElementRef.js
437
+ function getReactElementRef(element) {
438
+ if (!/* @__PURE__ */ React10.isValidElement(element)) {
439
+ return null;
440
+ }
441
+ const reactElement = element;
442
+ const propsWithRef = reactElement.props;
443
+ return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
444
+ }
445
+
446
+ // node_modules/@base-ui/utils/esm/mergeObjects.js
447
+ function mergeObjects(a, b) {
448
+ if (a && !b) {
449
+ return a;
450
+ }
451
+ if (!a && b) {
452
+ return b;
453
+ }
454
+ if (a || b) {
455
+ return {
456
+ ...a,
457
+ ...b
458
+ };
459
+ }
460
+ return void 0;
461
+ }
462
+
463
+ // node_modules/@base-ui/react/esm/utils/getStateAttributesProps.js
464
+ function getStateAttributesProps(state, customMapping) {
465
+ const props = {};
466
+ for (const key in state) {
467
+ const value = state[key];
468
+ if (customMapping?.hasOwnProperty(key)) {
469
+ const customProps = customMapping[key](value);
470
+ if (customProps != null) {
471
+ Object.assign(props, customProps);
472
+ }
473
+ continue;
474
+ }
475
+ if (value === true) {
476
+ props[`data-${key.toLowerCase()}`] = "";
477
+ } else if (value) {
478
+ props[`data-${key.toLowerCase()}`] = value.toString();
479
+ }
480
+ }
481
+ return props;
482
+ }
483
+
484
+ // node_modules/@base-ui/react/esm/utils/resolveClassName.js
485
+ function resolveClassName(className, state) {
486
+ return typeof className === "function" ? className(state) : className;
487
+ }
488
+
489
+ // node_modules/@base-ui/react/esm/utils/resolveStyle.js
490
+ function resolveStyle(style, state) {
491
+ return typeof style === "function" ? style(state) : style;
492
+ }
493
+
494
+ // node_modules/@base-ui/react/esm/merge-props/mergeProps.js
495
+ var EMPTY_PROPS = {};
496
+ function mergeProps(a, b, c, d, e) {
497
+ let merged = {
498
+ ...resolvePropsGetter(a, EMPTY_PROPS)
499
+ };
500
+ if (b) {
501
+ merged = mergeOne(merged, b);
502
+ }
503
+ if (c) {
504
+ merged = mergeOne(merged, c);
505
+ }
506
+ if (d) {
507
+ merged = mergeOne(merged, d);
508
+ }
509
+ if (e) {
510
+ merged = mergeOne(merged, e);
511
+ }
512
+ return merged;
513
+ }
514
+ function mergePropsN(props) {
515
+ if (props.length === 0) {
516
+ return EMPTY_PROPS;
517
+ }
518
+ if (props.length === 1) {
519
+ return resolvePropsGetter(props[0], EMPTY_PROPS);
520
+ }
521
+ let merged = {
522
+ ...resolvePropsGetter(props[0], EMPTY_PROPS)
523
+ };
524
+ for (let i = 1; i < props.length; i += 1) {
525
+ merged = mergeOne(merged, props[i]);
526
+ }
527
+ return merged;
528
+ }
529
+ function mergeOne(merged, inputProps) {
530
+ if (isPropsGetter(inputProps)) {
531
+ return inputProps(merged);
532
+ }
533
+ return mutablyMergeInto(merged, inputProps);
534
+ }
535
+ function mutablyMergeInto(mergedProps, externalProps) {
536
+ if (!externalProps) {
537
+ return mergedProps;
538
+ }
539
+ for (const propName in externalProps) {
540
+ const externalPropValue = externalProps[propName];
541
+ switch (propName) {
542
+ case "style": {
543
+ mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
544
+ break;
545
+ }
546
+ case "className": {
547
+ mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
548
+ break;
549
+ }
550
+ default: {
551
+ if (isEventHandler(propName, externalPropValue)) {
552
+ mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
553
+ } else {
554
+ mergedProps[propName] = externalPropValue;
555
+ }
556
+ }
557
+ }
558
+ }
559
+ return mergedProps;
560
+ }
561
+ function isEventHandler(key, value) {
562
+ const code0 = key.charCodeAt(0);
563
+ const code1 = key.charCodeAt(1);
564
+ const code2 = key.charCodeAt(2);
565
+ return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
566
+ }
567
+ function isPropsGetter(inputProps) {
568
+ return typeof inputProps === "function";
569
+ }
570
+ function resolvePropsGetter(inputProps, previousProps) {
571
+ if (isPropsGetter(inputProps)) {
572
+ return inputProps(previousProps);
573
+ }
574
+ return inputProps ?? EMPTY_PROPS;
575
+ }
576
+ function mergeEventHandlers(ourHandler, theirHandler) {
577
+ if (!theirHandler) {
578
+ return ourHandler;
579
+ }
580
+ if (!ourHandler) {
581
+ return theirHandler;
582
+ }
583
+ return (event) => {
584
+ if (isSyntheticEvent(event)) {
585
+ const baseUIEvent = event;
586
+ makeEventPreventable(baseUIEvent);
587
+ const result2 = theirHandler(baseUIEvent);
588
+ if (!baseUIEvent.baseUIHandlerPrevented) {
589
+ ourHandler?.(baseUIEvent);
590
+ }
591
+ return result2;
592
+ }
593
+ const result = theirHandler(event);
594
+ ourHandler?.(event);
595
+ return result;
596
+ };
597
+ }
598
+ function makeEventPreventable(event) {
599
+ event.preventBaseUIHandler = () => {
600
+ event.baseUIHandlerPrevented = true;
601
+ };
602
+ return event;
603
+ }
604
+ function mergeClassNames(ourClassName, theirClassName) {
605
+ if (theirClassName) {
606
+ if (ourClassName) {
607
+ return theirClassName + " " + ourClassName;
608
+ }
609
+ return theirClassName;
610
+ }
611
+ return ourClassName;
612
+ }
613
+ function isSyntheticEvent(event) {
614
+ return event != null && typeof event === "object" && "nativeEvent" in event;
615
+ }
616
+
617
+ // node_modules/@base-ui/utils/esm/empty.js
618
+ var EMPTY_ARRAY = Object.freeze([]);
619
+ var EMPTY_OBJECT = Object.freeze({});
620
+
621
+ // node_modules/@base-ui/react/esm/utils/constants.js
622
+ var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore";
623
+ var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore";
624
+ var BASE_UI_SWIPE_IGNORE_SELECTOR = `[${BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;
625
+ var LEGACY_SWIPE_IGNORE_SELECTOR = `[${LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;
626
+
627
+ // node_modules/@base-ui/react/esm/utils/useRenderElement.js
628
+ import { createElement as _createElement } from "react";
629
+ function useRenderElement(element, componentProps, params = {}) {
630
+ const renderProp = componentProps.render;
631
+ const outProps = useRenderElementProps(componentProps, params);
632
+ if (params.enabled === false) {
633
+ return null;
634
+ }
635
+ const state = params.state ?? EMPTY_OBJECT;
636
+ return evaluateRenderProp(element, renderProp, outProps, state);
637
+ }
638
+ function useRenderElementProps(componentProps, params = {}) {
639
+ const {
640
+ className: classNameProp,
641
+ style: styleProp,
642
+ render: renderProp
643
+ } = componentProps;
644
+ const {
645
+ state = EMPTY_OBJECT,
646
+ ref,
647
+ props,
648
+ stateAttributesMapping,
649
+ enabled = true
650
+ } = params;
651
+ const className = enabled ? resolveClassName(classNameProp, state) : void 0;
652
+ const style = enabled ? resolveStyle(styleProp, state) : void 0;
653
+ const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
654
+ const outProps = enabled ? mergeObjects(stateProps, Array.isArray(props) ? mergePropsN(props) : props) ?? EMPTY_OBJECT : EMPTY_OBJECT;
655
+ if (typeof document !== "undefined") {
656
+ if (!enabled) {
657
+ useMergedRefs(null, null);
658
+ } else if (Array.isArray(ref)) {
659
+ outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
660
+ } else {
661
+ outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
662
+ }
663
+ }
664
+ if (!enabled) {
665
+ return EMPTY_OBJECT;
666
+ }
667
+ if (className !== void 0) {
668
+ outProps.className = mergeClassNames(outProps.className, className);
669
+ }
670
+ if (style !== void 0) {
671
+ outProps.style = mergeObjects(outProps.style, style);
672
+ }
673
+ return outProps;
674
+ }
675
+ var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
676
+ function evaluateRenderProp(element, render, props, state) {
677
+ if (render) {
678
+ if (typeof render === "function") {
679
+ if (true) {
680
+ warnIfRenderPropLooksLikeComponent(render);
681
+ }
682
+ return render(props, state);
683
+ }
684
+ const mergedProps = mergeProps(props, render.props);
685
+ mergedProps.ref = props.ref;
686
+ let newElement = render;
687
+ if (newElement?.$$typeof === REACT_LAZY_TYPE) {
688
+ const children = React11.Children.toArray(render);
689
+ newElement = children[0];
690
+ }
691
+ if (true) {
692
+ if (!/* @__PURE__ */ React11.isValidElement(newElement)) {
693
+ throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join("\n"));
694
+ }
695
+ }
696
+ return /* @__PURE__ */ React11.cloneElement(newElement, mergedProps);
697
+ }
698
+ if (element) {
699
+ if (typeof element === "string") {
700
+ return renderTag(element, props);
701
+ }
702
+ }
703
+ throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
704
+ }
705
+ function warnIfRenderPropLooksLikeComponent(renderFn) {
706
+ const functionName = renderFn.name;
707
+ if (functionName.length === 0) {
708
+ return;
709
+ }
710
+ const firstCharacterCode = functionName.charCodeAt(0);
711
+ if (firstCharacterCode < 65 || firstCharacterCode > 90) {
712
+ return;
713
+ }
714
+ warn(`The \`render\` prop received a function named \`${functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
715
+ }
716
+ function renderTag(Tag, props) {
717
+ if (Tag === "button") {
718
+ return /* @__PURE__ */ _createElement("button", {
719
+ type: "button",
720
+ ...props,
721
+ key: props.key
722
+ });
723
+ }
724
+ if (Tag === "img") {
725
+ return /* @__PURE__ */ _createElement("img", {
726
+ alt: "",
727
+ ...props,
728
+ key: props.key
729
+ });
730
+ }
731
+ return /* @__PURE__ */ React11.createElement(Tag, props);
732
+ }
733
+
734
+ // node_modules/@base-ui/react/esm/utils/reason-parts.js
735
+ var reason_parts_exports = {};
736
+ __export(reason_parts_exports, {
737
+ cancelOpen: () => cancelOpen,
738
+ chipRemovePress: () => chipRemovePress,
739
+ clearPress: () => clearPress,
740
+ closePress: () => closePress,
741
+ closeWatcher: () => closeWatcher,
742
+ decrementPress: () => decrementPress,
743
+ disabled: () => disabled,
744
+ drag: () => drag,
745
+ escapeKey: () => escapeKey,
746
+ focusOut: () => focusOut,
747
+ imperativeAction: () => imperativeAction,
748
+ incrementPress: () => incrementPress,
749
+ inputBlur: () => inputBlur,
750
+ inputChange: () => inputChange,
751
+ inputClear: () => inputClear,
752
+ inputPaste: () => inputPaste,
753
+ inputPress: () => inputPress,
754
+ itemPress: () => itemPress,
755
+ keyboard: () => keyboard,
756
+ linkPress: () => linkPress,
757
+ listNavigation: () => listNavigation,
758
+ none: () => none,
759
+ outsidePress: () => outsidePress,
760
+ pointer: () => pointer,
761
+ scrub: () => scrub,
762
+ siblingOpen: () => siblingOpen,
763
+ swipe: () => swipe,
764
+ trackPress: () => trackPress,
765
+ triggerFocus: () => triggerFocus,
766
+ triggerHover: () => triggerHover,
767
+ triggerPress: () => triggerPress,
768
+ wheel: () => wheel,
769
+ windowResize: () => windowResize
770
+ });
771
+ var none = "none";
772
+ var triggerPress = "trigger-press";
773
+ var triggerHover = "trigger-hover";
774
+ var triggerFocus = "trigger-focus";
775
+ var outsidePress = "outside-press";
776
+ var itemPress = "item-press";
777
+ var closePress = "close-press";
778
+ var linkPress = "link-press";
779
+ var clearPress = "clear-press";
780
+ var chipRemovePress = "chip-remove-press";
781
+ var trackPress = "track-press";
782
+ var incrementPress = "increment-press";
783
+ var decrementPress = "decrement-press";
784
+ var inputChange = "input-change";
785
+ var inputClear = "input-clear";
786
+ var inputBlur = "input-blur";
787
+ var inputPaste = "input-paste";
788
+ var inputPress = "input-press";
789
+ var focusOut = "focus-out";
790
+ var escapeKey = "escape-key";
791
+ var closeWatcher = "close-watcher";
792
+ var listNavigation = "list-navigation";
793
+ var keyboard = "keyboard";
794
+ var pointer = "pointer";
795
+ var drag = "drag";
796
+ var wheel = "wheel";
797
+ var scrub = "scrub";
798
+ var cancelOpen = "cancel-open";
799
+ var siblingOpen = "sibling-open";
800
+ var disabled = "disabled";
801
+ var imperativeAction = "imperative-action";
802
+ var swipe = "swipe";
803
+ var windowResize = "window-resize";
804
+
805
+ // node_modules/@base-ui/react/esm/utils/createBaseUIEventDetails.js
806
+ function createChangeEventDetails(reason, event, trigger, customProperties) {
807
+ let canceled = false;
808
+ let allowPropagation = false;
809
+ const custom = customProperties ?? EMPTY_OBJECT;
810
+ const details = {
811
+ reason,
812
+ event: event ?? new Event("base-ui"),
813
+ cancel() {
814
+ canceled = true;
815
+ },
816
+ allowPropagation() {
817
+ allowPropagation = true;
818
+ },
819
+ get isCanceled() {
820
+ return canceled;
821
+ },
822
+ get isPropagationAllowed() {
823
+ return allowPropagation;
824
+ },
825
+ trigger,
826
+ ...custom
827
+ };
828
+ return details;
829
+ }
830
+
831
+ // node_modules/@base-ui/react/esm/accordion/root/AccordionRoot.js
832
+ import { jsx as _jsx2 } from "react/jsx-runtime";
833
+ var rootStateAttributesMapping = {
834
+ value: () => null
835
+ };
836
+ var AccordionRoot = /* @__PURE__ */ React12.forwardRef(function AccordionRoot2(componentProps, forwardedRef) {
837
+ const {
838
+ render,
839
+ className,
840
+ disabled: disabled2 = false,
841
+ hiddenUntilFound: hiddenUntilFoundProp,
842
+ keepMounted: keepMountedProp,
843
+ loopFocus = true,
844
+ onValueChange: onValueChangeProp,
845
+ multiple = false,
846
+ orientation = "vertical",
847
+ value: valueProp,
848
+ defaultValue: defaultValueProp,
849
+ ...elementProps
850
+ } = componentProps;
851
+ const direction = useDirection();
852
+ if (true) {
853
+ useIsoLayoutEffect(() => {
854
+ if (hiddenUntilFoundProp && keepMountedProp === false) {
855
+ warn("The `keepMounted={false}` prop on a Accordion.Root will be ignored when using `hiddenUntilFound` since it requires Panels to remain mounted when closed.");
856
+ }
857
+ }, [hiddenUntilFoundProp, keepMountedProp]);
858
+ }
859
+ const defaultValue = React12.useMemo(() => {
860
+ if (valueProp === void 0) {
861
+ return defaultValueProp ?? [];
862
+ }
863
+ return void 0;
864
+ }, [valueProp, defaultValueProp]);
865
+ const onValueChange = useStableCallback(onValueChangeProp);
866
+ const accordionItemRefs = React12.useRef([]);
867
+ const [value, setValue] = useControlled({
868
+ controlled: valueProp,
869
+ default: defaultValue,
870
+ name: "Accordion",
871
+ state: "value"
872
+ });
873
+ const handleValueChange = useStableCallback((newValue, nextOpen) => {
874
+ const details = createChangeEventDetails(reason_parts_exports.none);
875
+ if (!multiple) {
876
+ const nextValue = value[0] === newValue ? [] : [newValue];
877
+ onValueChange(nextValue, details);
878
+ if (details.isCanceled) {
879
+ return;
880
+ }
881
+ setValue(nextValue);
882
+ } else if (nextOpen) {
883
+ const nextOpenValues = value.slice();
884
+ nextOpenValues.push(newValue);
885
+ onValueChange(nextOpenValues, details);
886
+ if (details.isCanceled) {
887
+ return;
888
+ }
889
+ setValue(nextOpenValues);
890
+ } else {
891
+ const nextOpenValues = value.filter((v) => v !== newValue);
892
+ onValueChange(nextOpenValues, details);
893
+ if (details.isCanceled) {
894
+ return;
895
+ }
896
+ setValue(nextOpenValues);
897
+ }
898
+ });
899
+ const state = React12.useMemo(() => ({
900
+ value,
901
+ disabled: disabled2,
902
+ orientation
903
+ }), [value, disabled2, orientation]);
904
+ const contextValue = React12.useMemo(() => ({
905
+ accordionItemRefs,
906
+ direction,
907
+ disabled: disabled2,
908
+ handleValueChange,
909
+ hiddenUntilFound: hiddenUntilFoundProp ?? false,
910
+ keepMounted: keepMountedProp ?? false,
911
+ loopFocus,
912
+ orientation,
913
+ state,
914
+ value
915
+ }), [direction, disabled2, handleValueChange, hiddenUntilFoundProp, keepMountedProp, loopFocus, orientation, state, value]);
916
+ const element = useRenderElement("div", componentProps, {
917
+ state,
918
+ ref: forwardedRef,
919
+ props: [{
920
+ dir: direction,
921
+ role: "region"
922
+ }, elementProps],
923
+ stateAttributesMapping: rootStateAttributesMapping
924
+ });
925
+ return /* @__PURE__ */ _jsx2(AccordionRootContext.Provider, {
926
+ value: contextValue,
927
+ children: /* @__PURE__ */ _jsx2(CompositeList, {
928
+ elementsRef: accordionItemRefs,
929
+ children: element
930
+ })
931
+ });
932
+ });
933
+ if (true) AccordionRoot.displayName = "AccordionRoot";
934
+
935
+ // node_modules/@base-ui/react/esm/accordion/item/AccordionItem.js
936
+ import * as React21 from "react";
937
+
938
+ // node_modules/@base-ui/utils/esm/useId.js
939
+ import * as React14 from "react";
940
+
941
+ // node_modules/@base-ui/utils/esm/safeReact.js
942
+ import * as React13 from "react";
943
+ var SafeReact = {
944
+ ...React13
945
+ };
946
+
947
+ // node_modules/@base-ui/utils/esm/useId.js
948
+ var globalId = 0;
949
+ function useGlobalId(idOverride, prefix = "mui") {
950
+ const [defaultId, setDefaultId] = React14.useState(idOverride);
951
+ const id = idOverride || defaultId;
952
+ React14.useEffect(() => {
953
+ if (defaultId == null) {
954
+ globalId += 1;
955
+ setDefaultId(`${prefix}-${globalId}`);
956
+ }
957
+ }, [defaultId, prefix]);
958
+ return id;
959
+ }
960
+ var maybeReactUseId = SafeReact.useId;
961
+ function useId(idOverride, prefix) {
962
+ if (maybeReactUseId !== void 0) {
963
+ const reactId = maybeReactUseId();
964
+ return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);
965
+ }
966
+ return useGlobalId(idOverride, prefix);
967
+ }
968
+
969
+ // node_modules/@base-ui/react/esm/utils/useBaseUiId.js
970
+ function useBaseUiId(idOverride) {
971
+ return useId(idOverride, "base-ui");
972
+ }
973
+
974
+ // node_modules/@base-ui/react/esm/collapsible/root/useCollapsibleRoot.js
975
+ import * as React17 from "react";
976
+
977
+ // node_modules/@base-ui/react/esm/utils/useAnimationsFinished.js
978
+ import * as ReactDOM from "react-dom";
979
+
980
+ // node_modules/@base-ui/utils/esm/useOnMount.js
981
+ import * as React15 from "react";
982
+ var EMPTY = [];
983
+ function useOnMount(fn) {
984
+ React15.useEffect(fn, EMPTY);
985
+ }
986
+
987
+ // node_modules/@base-ui/utils/esm/useAnimationFrame.js
988
+ var EMPTY2 = null;
989
+ var LAST_RAF = globalThis.requestAnimationFrame;
990
+ var Scheduler = class {
991
+ /* This implementation uses an array as a backing data-structure for frame callbacks.
992
+ * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
993
+ * never calls the native `cancelAnimationFrame` if there are no frames left. This can
994
+ * be much more efficient if there is a call pattern that alterns as
995
+ * "request-cancel-request-cancel-…".
996
+ * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation
997
+ * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */
998
+ callbacks = [];
999
+ callbacksCount = 0;
1000
+ nextId = 1;
1001
+ startId = 1;
1002
+ isScheduled = false;
1003
+ tick = (timestamp) => {
1004
+ this.isScheduled = false;
1005
+ const currentCallbacks = this.callbacks;
1006
+ const currentCallbacksCount = this.callbacksCount;
1007
+ this.callbacks = [];
1008
+ this.callbacksCount = 0;
1009
+ this.startId = this.nextId;
1010
+ if (currentCallbacksCount > 0) {
1011
+ for (let i = 0; i < currentCallbacks.length; i += 1) {
1012
+ currentCallbacks[i]?.(timestamp);
1013
+ }
1014
+ }
1015
+ };
1016
+ request(fn) {
1017
+ const id = this.nextId;
1018
+ this.nextId += 1;
1019
+ this.callbacks.push(fn);
1020
+ this.callbacksCount += 1;
1021
+ const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);
1022
+ if (!this.isScheduled || didRAFChange) {
1023
+ requestAnimationFrame(this.tick);
1024
+ this.isScheduled = true;
1025
+ }
1026
+ return id;
1027
+ }
1028
+ cancel(id) {
1029
+ const index = id - this.startId;
1030
+ if (index < 0 || index >= this.callbacks.length) {
1031
+ return;
1032
+ }
1033
+ this.callbacks[index] = null;
1034
+ this.callbacksCount -= 1;
1035
+ }
1036
+ };
1037
+ var scheduler = new Scheduler();
1038
+ var AnimationFrame = class _AnimationFrame {
1039
+ static create() {
1040
+ return new _AnimationFrame();
1041
+ }
1042
+ static request(fn) {
1043
+ return scheduler.request(fn);
1044
+ }
1045
+ static cancel(id) {
1046
+ return scheduler.cancel(id);
1047
+ }
1048
+ currentId = EMPTY2;
1049
+ /**
1050
+ * Executes `fn` after `delay`, clearing any previously scheduled call.
1051
+ */
1052
+ request(fn) {
1053
+ this.cancel();
1054
+ this.currentId = scheduler.request(() => {
1055
+ this.currentId = EMPTY2;
1056
+ fn();
1057
+ });
1058
+ }
1059
+ cancel = () => {
1060
+ if (this.currentId !== EMPTY2) {
1061
+ scheduler.cancel(this.currentId);
1062
+ this.currentId = EMPTY2;
1063
+ }
1064
+ };
1065
+ disposeEffect = () => {
1066
+ return this.cancel;
1067
+ };
1068
+ };
1069
+ function useAnimationFrame() {
1070
+ const timeout = useRefWithInit(AnimationFrame.create).current;
1071
+ useOnMount(timeout.disposeEffect);
1072
+ return timeout;
1073
+ }
1074
+
1075
+ // node_modules/@base-ui/react/esm/utils/resolveRef.js
1076
+ function resolveRef(maybeRef) {
1077
+ if (maybeRef == null) {
1078
+ return maybeRef;
1079
+ }
1080
+ return "current" in maybeRef ? maybeRef.current : maybeRef;
1081
+ }
1082
+
1083
+ // node_modules/@base-ui/react/esm/utils/stateAttributesMapping.js
1084
+ var TransitionStatusDataAttributes = /* @__PURE__ */ (function(TransitionStatusDataAttributes2) {
1085
+ TransitionStatusDataAttributes2["startingStyle"] = "data-starting-style";
1086
+ TransitionStatusDataAttributes2["endingStyle"] = "data-ending-style";
1087
+ return TransitionStatusDataAttributes2;
1088
+ })({});
1089
+ var STARTING_HOOK = {
1090
+ [TransitionStatusDataAttributes.startingStyle]: ""
1091
+ };
1092
+ var ENDING_HOOK = {
1093
+ [TransitionStatusDataAttributes.endingStyle]: ""
1094
+ };
1095
+ var transitionStatusMapping = {
1096
+ transitionStatus(value) {
1097
+ if (value === "starting") {
1098
+ return STARTING_HOOK;
1099
+ }
1100
+ if (value === "ending") {
1101
+ return ENDING_HOOK;
1102
+ }
1103
+ return null;
1104
+ }
1105
+ };
1106
+
1107
+ // node_modules/@base-ui/react/esm/utils/useAnimationsFinished.js
1108
+ function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, treatAbortedAsFinished = true) {
1109
+ const frame = useAnimationFrame();
1110
+ return useStableCallback((fnToExecute, signal = null) => {
1111
+ frame.cancel();
1112
+ function done() {
1113
+ ReactDOM.flushSync(fnToExecute);
1114
+ }
1115
+ const element = resolveRef(elementOrRef);
1116
+ if (element == null) {
1117
+ return;
1118
+ }
1119
+ const resolvedElement = element;
1120
+ if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
1121
+ fnToExecute();
1122
+ } else {
1123
+ let execWaitForStartingStyleRemoved2 = function() {
1124
+ const startingStyleAttribute = TransitionStatusDataAttributes.startingStyle;
1125
+ if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1126
+ frame.request(exec2);
1127
+ return;
1128
+ }
1129
+ const attributeObserver = new MutationObserver(() => {
1130
+ if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1131
+ attributeObserver.disconnect();
1132
+ exec2();
1133
+ }
1134
+ });
1135
+ attributeObserver.observe(resolvedElement, {
1136
+ attributes: true,
1137
+ attributeFilter: [startingStyleAttribute]
1138
+ });
1139
+ signal?.addEventListener("abort", () => attributeObserver.disconnect(), {
1140
+ once: true
1141
+ });
1142
+ }, exec2 = function() {
1143
+ Promise.all(resolvedElement.getAnimations().map((anim) => anim.finished)).then(() => {
1144
+ if (signal?.aborted) {
1145
+ return;
1146
+ }
1147
+ done();
1148
+ }).catch(() => {
1149
+ const currentAnimations = resolvedElement.getAnimations();
1150
+ if (treatAbortedAsFinished) {
1151
+ if (signal?.aborted) {
1152
+ return;
1153
+ }
1154
+ done();
1155
+ } else if (currentAnimations.length > 0 && currentAnimations.some((anim) => anim.pending || anim.playState !== "finished")) {
1156
+ exec2();
1157
+ }
1158
+ });
1159
+ };
1160
+ var execWaitForStartingStyleRemoved = execWaitForStartingStyleRemoved2, exec = exec2;
1161
+ if (waitForStartingStyleRemoved) {
1162
+ execWaitForStartingStyleRemoved2();
1163
+ return;
1164
+ }
1165
+ frame.request(exec2);
1166
+ }
1167
+ });
1168
+ }
1169
+
1170
+ // node_modules/@base-ui/react/esm/utils/useTransitionStatus.js
1171
+ import * as React16 from "react";
1172
+ function useTransitionStatus(open, enableIdleState = false, deferEndingState = false) {
1173
+ const [transitionStatus, setTransitionStatus] = React16.useState(open && enableIdleState ? "idle" : void 0);
1174
+ const [mounted, setMounted] = React16.useState(open);
1175
+ if (open && !mounted) {
1176
+ setMounted(true);
1177
+ setTransitionStatus("starting");
1178
+ }
1179
+ if (!open && mounted && transitionStatus !== "ending" && !deferEndingState) {
1180
+ setTransitionStatus("ending");
1181
+ }
1182
+ if (!open && !mounted && transitionStatus === "ending") {
1183
+ setTransitionStatus(void 0);
1184
+ }
1185
+ useIsoLayoutEffect(() => {
1186
+ if (!open && mounted && transitionStatus !== "ending" && deferEndingState) {
1187
+ const frame = AnimationFrame.request(() => {
1188
+ setTransitionStatus("ending");
1189
+ });
1190
+ return () => {
1191
+ AnimationFrame.cancel(frame);
1192
+ };
1193
+ }
1194
+ return void 0;
1195
+ }, [open, mounted, transitionStatus, deferEndingState]);
1196
+ useIsoLayoutEffect(() => {
1197
+ if (!open || enableIdleState) {
1198
+ return void 0;
1199
+ }
1200
+ const frame = AnimationFrame.request(() => {
1201
+ setTransitionStatus(void 0);
1202
+ });
1203
+ return () => {
1204
+ AnimationFrame.cancel(frame);
1205
+ };
1206
+ }, [enableIdleState, open]);
1207
+ useIsoLayoutEffect(() => {
1208
+ if (!open || !enableIdleState) {
1209
+ return void 0;
1210
+ }
1211
+ if (open && mounted && transitionStatus !== "idle") {
1212
+ setTransitionStatus("starting");
1213
+ }
1214
+ const frame = AnimationFrame.request(() => {
1215
+ setTransitionStatus("idle");
1216
+ });
1217
+ return () => {
1218
+ AnimationFrame.cancel(frame);
1219
+ };
1220
+ }, [enableIdleState, open, mounted, setTransitionStatus, transitionStatus]);
1221
+ return React16.useMemo(() => ({
1222
+ mounted,
1223
+ setMounted,
1224
+ transitionStatus
1225
+ }), [mounted, transitionStatus]);
1226
+ }
1227
+
1228
+ // node_modules/@base-ui/react/esm/collapsible/root/useCollapsibleRoot.js
1229
+ function useCollapsibleRoot(parameters) {
1230
+ const {
1231
+ open: openParam,
1232
+ defaultOpen,
1233
+ onOpenChange,
1234
+ disabled: disabled2
1235
+ } = parameters;
1236
+ const isControlled = openParam !== void 0;
1237
+ const [open, setOpen] = useControlled({
1238
+ controlled: openParam,
1239
+ default: defaultOpen,
1240
+ name: "Collapsible",
1241
+ state: "open"
1242
+ });
1243
+ const {
1244
+ mounted,
1245
+ setMounted,
1246
+ transitionStatus
1247
+ } = useTransitionStatus(open, true, true);
1248
+ const [visible, setVisible] = React17.useState(open);
1249
+ const [{
1250
+ height,
1251
+ width
1252
+ }, setDimensions] = React17.useState({
1253
+ height: void 0,
1254
+ width: void 0
1255
+ });
1256
+ const defaultPanelId = useBaseUiId();
1257
+ const [panelIdState, setPanelIdState] = React17.useState();
1258
+ const panelId = panelIdState ?? defaultPanelId;
1259
+ const [hiddenUntilFound, setHiddenUntilFound] = React17.useState(false);
1260
+ const [keepMounted, setKeepMounted] = React17.useState(false);
1261
+ const abortControllerRef = React17.useRef(null);
1262
+ const animationTypeRef = React17.useRef(null);
1263
+ const transitionDimensionRef = React17.useRef(null);
1264
+ const panelRef = React17.useRef(null);
1265
+ const runOnceAnimationsFinish = useAnimationsFinished(panelRef, false);
1266
+ const handleTrigger = useStableCallback((event) => {
1267
+ const nextOpen = !open;
1268
+ const eventDetails = createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent);
1269
+ onOpenChange(nextOpen, eventDetails);
1270
+ if (eventDetails.isCanceled) {
1271
+ return;
1272
+ }
1273
+ const panel = panelRef.current;
1274
+ if (animationTypeRef.current === "css-animation" && panel != null) {
1275
+ panel.style.removeProperty("animation-name");
1276
+ }
1277
+ if (!hiddenUntilFound && !keepMounted) {
1278
+ if (animationTypeRef.current != null && animationTypeRef.current !== "css-animation") {
1279
+ if (!mounted && nextOpen) {
1280
+ setMounted(true);
1281
+ }
1282
+ }
1283
+ if (animationTypeRef.current === "css-animation") {
1284
+ if (!visible && nextOpen) {
1285
+ setVisible(true);
1286
+ }
1287
+ if (!mounted && nextOpen) {
1288
+ setMounted(true);
1289
+ }
1290
+ }
1291
+ }
1292
+ setOpen(nextOpen);
1293
+ if (animationTypeRef.current === "none" && mounted && !nextOpen) {
1294
+ setMounted(false);
1295
+ }
1296
+ });
1297
+ useIsoLayoutEffect(() => {
1298
+ if (isControlled && animationTypeRef.current === "none" && !keepMounted && !open) {
1299
+ setMounted(false);
1300
+ }
1301
+ }, [isControlled, keepMounted, open, openParam, setMounted]);
1302
+ return React17.useMemo(() => ({
1303
+ abortControllerRef,
1304
+ animationTypeRef,
1305
+ disabled: disabled2,
1306
+ handleTrigger,
1307
+ height,
1308
+ mounted,
1309
+ open,
1310
+ panelId,
1311
+ panelRef,
1312
+ runOnceAnimationsFinish,
1313
+ setDimensions,
1314
+ setHiddenUntilFound,
1315
+ setKeepMounted,
1316
+ setMounted,
1317
+ setOpen,
1318
+ setPanelIdState,
1319
+ setVisible,
1320
+ transitionDimensionRef,
1321
+ transitionStatus,
1322
+ visible,
1323
+ width
1324
+ }), [abortControllerRef, animationTypeRef, disabled2, handleTrigger, height, mounted, open, panelId, panelRef, runOnceAnimationsFinish, setDimensions, setHiddenUntilFound, setKeepMounted, setMounted, setOpen, setVisible, transitionDimensionRef, transitionStatus, visible, width]);
1325
+ }
1326
+
1327
+ // node_modules/@base-ui/react/esm/collapsible/root/CollapsibleRootContext.js
1328
+ import * as React18 from "react";
1329
+ var CollapsibleRootContext = /* @__PURE__ */ React18.createContext(void 0);
1330
+ if (true) CollapsibleRootContext.displayName = "CollapsibleRootContext";
1331
+ function useCollapsibleRootContext() {
1332
+ const context = React18.useContext(CollapsibleRootContext);
1333
+ if (context === void 0) {
1334
+ throw new Error(true ? "Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>." : formatErrorMessage_default(15));
1335
+ }
1336
+ return context;
1337
+ }
1338
+
1339
+ // node_modules/@base-ui/react/esm/composite/list/useCompositeListItem.js
1340
+ import * as React19 from "react";
1341
+ var IndexGuessBehavior = /* @__PURE__ */ (function(IndexGuessBehavior2) {
1342
+ IndexGuessBehavior2[IndexGuessBehavior2["None"] = 0] = "None";
1343
+ IndexGuessBehavior2[IndexGuessBehavior2["GuessFromOrder"] = 1] = "GuessFromOrder";
1344
+ return IndexGuessBehavior2;
1345
+ })({});
1346
+ function useCompositeListItem(params = {}) {
1347
+ const {
1348
+ label,
1349
+ metadata,
1350
+ textRef,
1351
+ indexGuessBehavior,
1352
+ index: externalIndex
1353
+ } = params;
1354
+ const {
1355
+ register,
1356
+ unregister,
1357
+ subscribeMapChange,
1358
+ elementsRef,
1359
+ labelsRef,
1360
+ nextIndexRef
1361
+ } = useCompositeListContext();
1362
+ const indexRef = React19.useRef(-1);
1363
+ const [index, setIndex] = React19.useState(externalIndex ?? (indexGuessBehavior === IndexGuessBehavior.GuessFromOrder ? () => {
1364
+ if (indexRef.current === -1) {
1365
+ const newIndex = nextIndexRef.current;
1366
+ nextIndexRef.current += 1;
1367
+ indexRef.current = newIndex;
1368
+ }
1369
+ return indexRef.current;
1370
+ } : -1));
1371
+ const componentRef = React19.useRef(null);
1372
+ const ref = React19.useCallback((node) => {
1373
+ componentRef.current = node;
1374
+ if (index !== -1 && node !== null) {
1375
+ elementsRef.current[index] = node;
1376
+ if (labelsRef) {
1377
+ const isLabelDefined = label !== void 0;
1378
+ labelsRef.current[index] = isLabelDefined ? label : textRef?.current?.textContent ?? node.textContent;
1379
+ }
1380
+ }
1381
+ }, [index, elementsRef, labelsRef, label, textRef]);
1382
+ useIsoLayoutEffect(() => {
1383
+ if (externalIndex != null) {
1384
+ return void 0;
1385
+ }
1386
+ const node = componentRef.current;
1387
+ if (node) {
1388
+ register(node, metadata);
1389
+ return () => {
1390
+ unregister(node);
1391
+ };
1392
+ }
1393
+ return void 0;
1394
+ }, [externalIndex, register, unregister, metadata]);
1395
+ useIsoLayoutEffect(() => {
1396
+ if (externalIndex != null) {
1397
+ return void 0;
1398
+ }
1399
+ return subscribeMapChange((map) => {
1400
+ const i = componentRef.current ? map.get(componentRef.current)?.index : null;
1401
+ if (i != null) {
1402
+ setIndex(i);
1403
+ }
1404
+ });
1405
+ }, [externalIndex, subscribeMapChange, setIndex]);
1406
+ return React19.useMemo(() => ({
1407
+ ref,
1408
+ index
1409
+ }), [index, ref]);
1410
+ }
1411
+
1412
+ // node_modules/@base-ui/react/esm/accordion/item/AccordionItemContext.js
1413
+ import * as React20 from "react";
1414
+ var AccordionItemContext = /* @__PURE__ */ React20.createContext(void 0);
1415
+ if (true) AccordionItemContext.displayName = "AccordionItemContext";
1416
+ function useAccordionItemContext() {
1417
+ const context = React20.useContext(AccordionItemContext);
1418
+ if (context === void 0) {
1419
+ throw new Error(true ? "Base UI: AccordionItemContext is missing. Accordion parts must be placed within <Accordion.Item>." : formatErrorMessage_default(9));
1420
+ }
1421
+ return context;
1422
+ }
1423
+
1424
+ // node_modules/@base-ui/react/esm/collapsible/panel/CollapsiblePanelDataAttributes.js
1425
+ var CollapsiblePanelDataAttributes = (function(CollapsiblePanelDataAttributes2) {
1426
+ CollapsiblePanelDataAttributes2["open"] = "data-open";
1427
+ CollapsiblePanelDataAttributes2["closed"] = "data-closed";
1428
+ CollapsiblePanelDataAttributes2[CollapsiblePanelDataAttributes2["startingStyle"] = TransitionStatusDataAttributes.startingStyle] = "startingStyle";
1429
+ CollapsiblePanelDataAttributes2[CollapsiblePanelDataAttributes2["endingStyle"] = TransitionStatusDataAttributes.endingStyle] = "endingStyle";
1430
+ return CollapsiblePanelDataAttributes2;
1431
+ })({});
1432
+
1433
+ // node_modules/@base-ui/react/esm/collapsible/trigger/CollapsibleTriggerDataAttributes.js
1434
+ var CollapsibleTriggerDataAttributes = /* @__PURE__ */ (function(CollapsibleTriggerDataAttributes2) {
1435
+ CollapsibleTriggerDataAttributes2["panelOpen"] = "data-panel-open";
1436
+ return CollapsibleTriggerDataAttributes2;
1437
+ })({});
1438
+
1439
+ // node_modules/@base-ui/react/esm/utils/collapsibleOpenStateMapping.js
1440
+ var PANEL_OPEN_HOOK = {
1441
+ [CollapsiblePanelDataAttributes.open]: ""
1442
+ };
1443
+ var PANEL_CLOSED_HOOK = {
1444
+ [CollapsiblePanelDataAttributes.closed]: ""
1445
+ };
1446
+ var triggerOpenStateMapping = {
1447
+ open(value) {
1448
+ if (value) {
1449
+ return {
1450
+ [CollapsibleTriggerDataAttributes.panelOpen]: ""
1451
+ };
1452
+ }
1453
+ return null;
1454
+ }
1455
+ };
1456
+ var collapsibleOpenStateMapping = {
1457
+ open(value) {
1458
+ if (value) {
1459
+ return PANEL_OPEN_HOOK;
1460
+ }
1461
+ return PANEL_CLOSED_HOOK;
1462
+ }
1463
+ };
1464
+
1465
+ // node_modules/@base-ui/react/esm/accordion/item/AccordionItemDataAttributes.js
1466
+ var AccordionItemDataAttributes = /* @__PURE__ */ (function(AccordionItemDataAttributes2) {
1467
+ AccordionItemDataAttributes2["index"] = "data-index";
1468
+ AccordionItemDataAttributes2["disabled"] = "data-disabled";
1469
+ AccordionItemDataAttributes2["open"] = "data-open";
1470
+ return AccordionItemDataAttributes2;
1471
+ })({});
1472
+
1473
+ // node_modules/@base-ui/react/esm/accordion/item/stateAttributesMapping.js
1474
+ var accordionStateAttributesMapping = {
1475
+ ...collapsibleOpenStateMapping,
1476
+ index: (value) => {
1477
+ return Number.isInteger(value) ? {
1478
+ [AccordionItemDataAttributes.index]: String(value)
1479
+ } : null;
1480
+ },
1481
+ ...transitionStatusMapping,
1482
+ value: () => null
1483
+ };
1484
+
1485
+ // node_modules/@base-ui/react/esm/accordion/item/AccordionItem.js
1486
+ import { jsx as _jsx3 } from "react/jsx-runtime";
1487
+ var AccordionItem = /* @__PURE__ */ React21.forwardRef(function AccordionItem2(componentProps, forwardedRef) {
1488
+ const {
1489
+ className,
1490
+ disabled: disabledProp = false,
1491
+ onOpenChange: onOpenChangeProp,
1492
+ render,
1493
+ value: valueProp,
1494
+ ...elementProps
1495
+ } = componentProps;
1496
+ const {
1497
+ ref: listItemRef,
1498
+ index
1499
+ } = useCompositeListItem();
1500
+ const mergedRef = useMergedRefs(forwardedRef, listItemRef);
1501
+ const {
1502
+ disabled: contextDisabled,
1503
+ handleValueChange,
1504
+ state: rootState,
1505
+ value: openValues
1506
+ } = useAccordionRootContext();
1507
+ const fallbackValue = useBaseUiId();
1508
+ const value = valueProp ?? fallbackValue;
1509
+ const disabled2 = disabledProp || contextDisabled;
1510
+ const isOpen = React21.useMemo(() => {
1511
+ if (!openValues) {
1512
+ return false;
1513
+ }
1514
+ for (let i = 0; i < openValues.length; i += 1) {
1515
+ if (openValues[i] === value) {
1516
+ return true;
1517
+ }
1518
+ }
1519
+ return false;
1520
+ }, [openValues, value]);
1521
+ const onOpenChange = useStableCallback((nextOpen, eventDetails) => {
1522
+ onOpenChangeProp?.(nextOpen, eventDetails);
1523
+ if (eventDetails.isCanceled) {
1524
+ return;
1525
+ }
1526
+ handleValueChange(value, nextOpen);
1527
+ });
1528
+ const collapsible = useCollapsibleRoot({
1529
+ open: isOpen,
1530
+ onOpenChange,
1531
+ disabled: disabled2
1532
+ });
1533
+ const collapsibleState = React21.useMemo(() => ({
1534
+ open: collapsible.open,
1535
+ disabled: collapsible.disabled,
1536
+ hidden: !collapsible.mounted,
1537
+ transitionStatus: collapsible.transitionStatus
1538
+ }), [collapsible.open, collapsible.disabled, collapsible.mounted, collapsible.transitionStatus]);
1539
+ const collapsibleContext = React21.useMemo(() => ({
1540
+ ...collapsible,
1541
+ onOpenChange,
1542
+ state: collapsibleState
1543
+ }), [collapsible, collapsibleState, onOpenChange]);
1544
+ const state = React21.useMemo(() => ({
1545
+ ...rootState,
1546
+ index,
1547
+ disabled: disabled2,
1548
+ open: isOpen
1549
+ }), [disabled2, index, isOpen, rootState]);
1550
+ const [triggerId, setTriggerId] = React21.useState(useBaseUiId());
1551
+ const accordionItemContext = React21.useMemo(() => ({
1552
+ open: isOpen,
1553
+ state,
1554
+ setTriggerId,
1555
+ triggerId
1556
+ }), [isOpen, state, setTriggerId, triggerId]);
1557
+ const element = useRenderElement("div", componentProps, {
1558
+ state,
1559
+ ref: mergedRef,
1560
+ props: elementProps,
1561
+ stateAttributesMapping: accordionStateAttributesMapping
1562
+ });
1563
+ return /* @__PURE__ */ _jsx3(CollapsibleRootContext.Provider, {
1564
+ value: collapsibleContext,
1565
+ children: /* @__PURE__ */ _jsx3(AccordionItemContext.Provider, {
1566
+ value: accordionItemContext,
1567
+ children: element
1568
+ })
1569
+ });
1570
+ });
1571
+ if (true) AccordionItem.displayName = "AccordionItem";
1572
+
1573
+ // node_modules/@base-ui/react/esm/accordion/header/AccordionHeader.js
1574
+ import * as React22 from "react";
1575
+ var AccordionHeader = /* @__PURE__ */ React22.forwardRef(function AccordionHeader2(componentProps, forwardedRef) {
1576
+ const {
1577
+ render,
1578
+ className,
1579
+ ...elementProps
1580
+ } = componentProps;
1581
+ const {
1582
+ state
1583
+ } = useAccordionItemContext();
1584
+ const element = useRenderElement("h3", componentProps, {
1585
+ state,
1586
+ ref: forwardedRef,
1587
+ props: elementProps,
1588
+ stateAttributesMapping: accordionStateAttributesMapping
1589
+ });
1590
+ return element;
1591
+ });
1592
+ if (true) AccordionHeader.displayName = "AccordionHeader";
1593
+
1594
+ // node_modules/@base-ui/react/esm/accordion/trigger/AccordionTrigger.js
1595
+ import * as React26 from "react";
1596
+
1597
+ // node_modules/@base-ui/utils/esm/isElementDisabled.js
1598
+ function isElementDisabled(element) {
1599
+ return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
1600
+ }
1601
+
1602
+ // node_modules/@base-ui/react/esm/use-button/useButton.js
1603
+ import * as React25 from "react";
1604
+
1605
+ // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1606
+ function hasWindow() {
1607
+ return typeof window !== "undefined";
1608
+ }
1609
+ function getWindow(node) {
1610
+ var _node$ownerDocument;
1611
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1612
+ }
1613
+ function isHTMLElement(value) {
1614
+ if (!hasWindow()) {
1615
+ return false;
1616
+ }
1617
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1618
+ }
1619
+
1620
+ // node_modules/@base-ui/utils/esm/error.js
1621
+ var set2;
1622
+ if (true) {
1623
+ set2 = /* @__PURE__ */ new Set();
1624
+ }
1625
+ function error(...messages) {
1626
+ if (true) {
1627
+ const messageKey = messages.join(" ");
1628
+ if (!set2.has(messageKey)) {
1629
+ set2.add(messageKey);
1630
+ console.error(`Base UI: ${messageKey}`);
1631
+ }
1632
+ }
1633
+ }
1634
+
1635
+ // node_modules/@base-ui/react/esm/composite/root/CompositeRootContext.js
1636
+ import * as React23 from "react";
1637
+ var CompositeRootContext = /* @__PURE__ */ React23.createContext(void 0);
1638
+ if (true) CompositeRootContext.displayName = "CompositeRootContext";
1639
+ function useCompositeRootContext(optional = false) {
1640
+ const context = React23.useContext(CompositeRootContext);
1641
+ if (context === void 0 && !optional) {
1642
+ throw new Error(true ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : formatErrorMessage_default(16));
1643
+ }
1644
+ return context;
1645
+ }
1646
+
1647
+ // node_modules/@base-ui/react/esm/utils/useFocusableWhenDisabled.js
1648
+ import * as React24 from "react";
1649
+ function useFocusableWhenDisabled(parameters) {
1650
+ const {
1651
+ focusableWhenDisabled,
1652
+ disabled: disabled2,
1653
+ composite = false,
1654
+ tabIndex: tabIndexProp = 0,
1655
+ isNativeButton
1656
+ } = parameters;
1657
+ const isFocusableComposite = composite && focusableWhenDisabled !== false;
1658
+ const isNonFocusableComposite = composite && focusableWhenDisabled === false;
1659
+ const props = React24.useMemo(() => {
1660
+ const additionalProps = {
1661
+ // allow Tabbing away from focusableWhenDisabled elements
1662
+ onKeyDown(event) {
1663
+ if (disabled2 && focusableWhenDisabled && event.key !== "Tab") {
1664
+ event.preventDefault();
1665
+ }
1666
+ }
1667
+ };
1668
+ if (!composite) {
1669
+ additionalProps.tabIndex = tabIndexProp;
1670
+ if (!isNativeButton && disabled2) {
1671
+ additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;
1672
+ }
1673
+ }
1674
+ if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled2) {
1675
+ additionalProps["aria-disabled"] = disabled2;
1676
+ }
1677
+ if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {
1678
+ additionalProps.disabled = disabled2;
1679
+ }
1680
+ return additionalProps;
1681
+ }, [composite, disabled2, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);
1682
+ return {
1683
+ props
1684
+ };
1685
+ }
1686
+
1687
+ // node_modules/@base-ui/react/esm/use-button/useButton.js
1688
+ function useButton(parameters = {}) {
1689
+ const {
1690
+ disabled: disabled2 = false,
1691
+ focusableWhenDisabled,
1692
+ tabIndex = 0,
1693
+ native: isNativeButton = true,
1694
+ composite: compositeProp
1695
+ } = parameters;
1696
+ const elementRef = React25.useRef(null);
1697
+ const compositeRootContext = useCompositeRootContext(true);
1698
+ const isCompositeItem = compositeProp ?? compositeRootContext !== void 0;
1699
+ const {
1700
+ props: focusableWhenDisabledProps
1701
+ } = useFocusableWhenDisabled({
1702
+ focusableWhenDisabled,
1703
+ disabled: disabled2,
1704
+ composite: isCompositeItem,
1705
+ tabIndex,
1706
+ isNativeButton
1707
+ });
1708
+ if (true) {
1709
+ React25.useEffect(() => {
1710
+ if (!elementRef.current) {
1711
+ return;
1712
+ }
1713
+ const isButtonTag = isButtonElement(elementRef.current);
1714
+ if (isNativeButton) {
1715
+ if (!isButtonTag) {
1716
+ const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
1717
+ const message = "A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the `render` prop, or set `nativeButton` to `false`.";
1718
+ error(`${message}${ownerStackMessage}`);
1719
+ }
1720
+ } else if (isButtonTag) {
1721
+ const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
1722
+ const message = "A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set `nativeButton` to `true`.";
1723
+ error(`${message}${ownerStackMessage}`);
1724
+ }
1725
+ }, [isNativeButton]);
1726
+ }
1727
+ const updateDisabled = React25.useCallback(() => {
1728
+ const element = elementRef.current;
1729
+ if (!isButtonElement(element)) {
1730
+ return;
1731
+ }
1732
+ if (isCompositeItem && disabled2 && focusableWhenDisabledProps.disabled === void 0 && element.disabled) {
1733
+ element.disabled = false;
1734
+ }
1735
+ }, [disabled2, focusableWhenDisabledProps.disabled, isCompositeItem]);
1736
+ useIsoLayoutEffect(updateDisabled, [updateDisabled]);
1737
+ const getButtonProps = React25.useCallback((externalProps = {}) => {
1738
+ const {
1739
+ onClick: externalOnClick,
1740
+ onMouseDown: externalOnMouseDown,
1741
+ onKeyUp: externalOnKeyUp,
1742
+ onKeyDown: externalOnKeyDown,
1743
+ onPointerDown: externalOnPointerDown,
1744
+ ...otherExternalProps
1745
+ } = externalProps;
1746
+ const type = isNativeButton ? "button" : void 0;
1747
+ return mergeProps({
1748
+ type,
1749
+ onClick(event) {
1750
+ if (disabled2) {
1751
+ event.preventDefault();
1752
+ return;
1753
+ }
1754
+ externalOnClick?.(event);
1755
+ },
1756
+ onMouseDown(event) {
1757
+ if (!disabled2) {
1758
+ externalOnMouseDown?.(event);
1759
+ }
1760
+ },
1761
+ onKeyDown(event) {
1762
+ if (disabled2) {
1763
+ return;
1764
+ }
1765
+ makeEventPreventable(event);
1766
+ externalOnKeyDown?.(event);
1767
+ if (event.baseUIHandlerPrevented) {
1768
+ return;
1769
+ }
1770
+ const isCurrentTarget = event.target === event.currentTarget;
1771
+ const currentTarget = event.currentTarget;
1772
+ const isButton = isButtonElement(currentTarget);
1773
+ const isLink = !isNativeButton && isValidLinkElement(currentTarget);
1774
+ const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink);
1775
+ const isEnterKey = event.key === "Enter";
1776
+ const isSpaceKey = event.key === " ";
1777
+ const role = currentTarget.getAttribute("role");
1778
+ const isTextNavigationRole = role?.startsWith("menuitem") || role === "option" || role === "gridcell";
1779
+ if (isCurrentTarget && isCompositeItem && isSpaceKey) {
1780
+ if (event.defaultPrevented && isTextNavigationRole) {
1781
+ return;
1782
+ }
1783
+ event.preventDefault();
1784
+ if (isLink || isNativeButton && isButton) {
1785
+ currentTarget.click();
1786
+ event.preventBaseUIHandler();
1787
+ } else if (shouldClick) {
1788
+ externalOnClick?.(event);
1789
+ event.preventBaseUIHandler();
1790
+ }
1791
+ return;
1792
+ }
1793
+ if (shouldClick) {
1794
+ if (!isNativeButton && (isSpaceKey || isEnterKey)) {
1795
+ event.preventDefault();
1796
+ }
1797
+ if (!isNativeButton && isEnterKey) {
1798
+ externalOnClick?.(event);
1799
+ }
1800
+ }
1801
+ },
1802
+ onKeyUp(event) {
1803
+ if (disabled2) {
1804
+ return;
1805
+ }
1806
+ makeEventPreventable(event);
1807
+ externalOnKeyUp?.(event);
1808
+ if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === " ") {
1809
+ event.preventDefault();
1810
+ return;
1811
+ }
1812
+ if (event.baseUIHandlerPrevented) {
1813
+ return;
1814
+ }
1815
+ if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && event.key === " ") {
1816
+ externalOnClick?.(event);
1817
+ }
1818
+ },
1819
+ onPointerDown(event) {
1820
+ if (disabled2) {
1821
+ event.preventDefault();
1822
+ return;
1823
+ }
1824
+ externalOnPointerDown?.(event);
1825
+ }
1826
+ }, !isNativeButton ? {
1827
+ role: "button"
1828
+ } : void 0, focusableWhenDisabledProps, otherExternalProps);
1829
+ }, [disabled2, focusableWhenDisabledProps, isCompositeItem, isNativeButton]);
1830
+ const buttonRef = useStableCallback((element) => {
1831
+ elementRef.current = element;
1832
+ updateDisabled();
1833
+ });
1834
+ return {
1835
+ getButtonProps,
1836
+ buttonRef
1837
+ };
1838
+ }
1839
+ function isButtonElement(elem) {
1840
+ return isHTMLElement(elem) && elem.tagName === "BUTTON";
1841
+ }
1842
+ function isValidLinkElement(elem) {
1843
+ return Boolean(elem?.tagName === "A" && elem?.href);
1844
+ }
1845
+
1846
+ // node_modules/@base-ui/react/esm/floating-ui-react/utils/event.js
1847
+ function stopEvent(event) {
1848
+ event.preventDefault();
1849
+ event.stopPropagation();
1850
+ }
1851
+
1852
+ // node_modules/@base-ui/react/esm/composite/composite.js
1853
+ var ARROW_UP = "ArrowUp";
1854
+ var ARROW_DOWN = "ArrowDown";
1855
+ var ARROW_LEFT = "ArrowLeft";
1856
+ var ARROW_RIGHT = "ArrowRight";
1857
+ var HOME = "Home";
1858
+ var END = "End";
1859
+ var HORIZONTAL_KEYS = /* @__PURE__ */ new Set([ARROW_LEFT, ARROW_RIGHT]);
1860
+ var VERTICAL_KEYS = /* @__PURE__ */ new Set([ARROW_UP, ARROW_DOWN]);
1861
+ var ARROW_KEYS = /* @__PURE__ */ new Set([...HORIZONTAL_KEYS, ...VERTICAL_KEYS]);
1862
+ var ALL_KEYS = /* @__PURE__ */ new Set([...ARROW_KEYS, HOME, END]);
1863
+
1864
+ // node_modules/@base-ui/react/esm/accordion/trigger/AccordionTrigger.js
1865
+ var SUPPORTED_KEYS = /* @__PURE__ */ new Set([ARROW_DOWN, ARROW_UP, ARROW_RIGHT, ARROW_LEFT, HOME, END]);
1866
+ function getActiveTriggers(accordionItemRefs) {
1867
+ const {
1868
+ current: accordionItemElements
1869
+ } = accordionItemRefs;
1870
+ const output = [];
1871
+ for (let i = 0; i < accordionItemElements.length; i += 1) {
1872
+ const section = accordionItemElements[i];
1873
+ if (!isElementDisabled(section)) {
1874
+ const trigger = section?.querySelector('[type="button"], [role="button"]');
1875
+ if (trigger && !isElementDisabled(trigger)) {
1876
+ output.push(trigger);
1877
+ }
1878
+ }
1879
+ }
1880
+ return output;
1881
+ }
1882
+ var AccordionTrigger = /* @__PURE__ */ React26.forwardRef(function AccordionTrigger2(componentProps, forwardedRef) {
1883
+ const {
1884
+ disabled: disabledProp,
1885
+ className,
1886
+ id: idProp,
1887
+ render,
1888
+ nativeButton = true,
1889
+ ...elementProps
1890
+ } = componentProps;
1891
+ const {
1892
+ panelId,
1893
+ open,
1894
+ handleTrigger,
1895
+ disabled: contextDisabled
1896
+ } = useCollapsibleRootContext();
1897
+ const disabled2 = disabledProp ?? contextDisabled;
1898
+ const {
1899
+ getButtonProps,
1900
+ buttonRef
1901
+ } = useButton({
1902
+ disabled: disabled2,
1903
+ focusableWhenDisabled: true,
1904
+ native: nativeButton,
1905
+ composite: true
1906
+ });
1907
+ const {
1908
+ accordionItemRefs,
1909
+ direction,
1910
+ loopFocus,
1911
+ orientation
1912
+ } = useAccordionRootContext();
1913
+ const isRtl = direction === "rtl";
1914
+ const isHorizontal = orientation === "horizontal";
1915
+ const {
1916
+ state,
1917
+ setTriggerId,
1918
+ triggerId: id
1919
+ } = useAccordionItemContext();
1920
+ useIsoLayoutEffect(() => {
1921
+ if (idProp) {
1922
+ setTriggerId(idProp);
1923
+ }
1924
+ return () => {
1925
+ setTriggerId(void 0);
1926
+ };
1927
+ }, [idProp, setTriggerId]);
1928
+ const props = React26.useMemo(() => ({
1929
+ "aria-controls": open ? panelId : void 0,
1930
+ "aria-expanded": open,
1931
+ id,
1932
+ tabIndex: 0,
1933
+ onClick: handleTrigger,
1934
+ onKeyDown(event) {
1935
+ if (!SUPPORTED_KEYS.has(event.key)) {
1936
+ return;
1937
+ }
1938
+ stopEvent(event);
1939
+ const triggers = getActiveTriggers(accordionItemRefs);
1940
+ const numOfEnabledTriggers = triggers.length;
1941
+ const lastIndex = numOfEnabledTriggers - 1;
1942
+ let nextIndex = -1;
1943
+ const thisIndex = triggers.indexOf(event.target);
1944
+ function toNext() {
1945
+ if (loopFocus) {
1946
+ nextIndex = thisIndex + 1 > lastIndex ? 0 : thisIndex + 1;
1947
+ } else {
1948
+ nextIndex = Math.min(thisIndex + 1, lastIndex);
1949
+ }
1950
+ }
1951
+ function toPrev() {
1952
+ if (loopFocus) {
1953
+ nextIndex = thisIndex === 0 ? lastIndex : thisIndex - 1;
1954
+ } else {
1955
+ nextIndex = thisIndex - 1;
1956
+ }
1957
+ }
1958
+ switch (event.key) {
1959
+ case ARROW_DOWN:
1960
+ if (!isHorizontal) {
1961
+ toNext();
1962
+ }
1963
+ break;
1964
+ case ARROW_UP:
1965
+ if (!isHorizontal) {
1966
+ toPrev();
1967
+ }
1968
+ break;
1969
+ case ARROW_RIGHT:
1970
+ if (isHorizontal) {
1971
+ if (isRtl) {
1972
+ toPrev();
1973
+ } else {
1974
+ toNext();
1975
+ }
1976
+ }
1977
+ break;
1978
+ case ARROW_LEFT:
1979
+ if (isHorizontal) {
1980
+ if (isRtl) {
1981
+ toNext();
1982
+ } else {
1983
+ toPrev();
1984
+ }
1985
+ }
1986
+ break;
1987
+ case "Home":
1988
+ nextIndex = 0;
1989
+ break;
1990
+ case "End":
1991
+ nextIndex = lastIndex;
1992
+ break;
1993
+ default:
1994
+ break;
1995
+ }
1996
+ if (nextIndex > -1) {
1997
+ triggers[nextIndex].focus();
1998
+ }
1999
+ }
2000
+ }), [accordionItemRefs, handleTrigger, id, isHorizontal, isRtl, loopFocus, open, panelId]);
2001
+ const element = useRenderElement("button", componentProps, {
2002
+ state,
2003
+ ref: [forwardedRef, buttonRef],
2004
+ props: [props, elementProps, getButtonProps],
2005
+ stateAttributesMapping: triggerOpenStateMapping
2006
+ });
2007
+ return element;
2008
+ });
2009
+ if (true) AccordionTrigger.displayName = "AccordionTrigger";
2010
+
2011
+ // node_modules/@base-ui/react/esm/accordion/panel/AccordionPanel.js
2012
+ import * as React29 from "react";
2013
+
2014
+ // node_modules/@base-ui/react/esm/collapsible/panel/useCollapsiblePanel.js
2015
+ import * as React27 from "react";
2016
+
2017
+ // node_modules/@base-ui/react/esm/accordion/root/AccordionRootDataAttributes.js
2018
+ var AccordionRootDataAttributes = /* @__PURE__ */ (function(AccordionRootDataAttributes2) {
2019
+ AccordionRootDataAttributes2["disabled"] = "data-disabled";
2020
+ AccordionRootDataAttributes2["orientation"] = "data-orientation";
2021
+ return AccordionRootDataAttributes2;
2022
+ })({});
2023
+
2024
+ // node_modules/@base-ui/react/esm/collapsible/panel/useCollapsiblePanel.js
2025
+ function useCollapsiblePanel(parameters) {
2026
+ const {
2027
+ abortControllerRef,
2028
+ animationTypeRef,
2029
+ externalRef,
2030
+ height,
2031
+ hiddenUntilFound,
2032
+ keepMounted,
2033
+ id: idParam,
2034
+ mounted,
2035
+ onOpenChange,
2036
+ open,
2037
+ panelRef,
2038
+ runOnceAnimationsFinish,
2039
+ setDimensions,
2040
+ setMounted,
2041
+ setOpen,
2042
+ setVisible,
2043
+ transitionDimensionRef,
2044
+ visible,
2045
+ width
2046
+ } = parameters;
2047
+ const isBeforeMatchRef = React27.useRef(false);
2048
+ const latestAnimationNameRef = React27.useRef(null);
2049
+ const shouldCancelInitialOpenAnimationRef = React27.useRef(open);
2050
+ const shouldCancelInitialOpenTransitionRef = React27.useRef(open);
2051
+ const endingStyleFrame = useAnimationFrame();
2052
+ const hidden = React27.useMemo(() => {
2053
+ if (animationTypeRef.current === "css-animation") {
2054
+ return !visible;
2055
+ }
2056
+ return !open && !mounted;
2057
+ }, [open, mounted, visible, animationTypeRef]);
2058
+ const handlePanelRef = useStableCallback((element) => {
2059
+ if (!element) {
2060
+ return void 0;
2061
+ }
2062
+ if (animationTypeRef.current == null || transitionDimensionRef.current == null) {
2063
+ const panelStyles = getComputedStyle(element);
2064
+ const hasAnimation = panelStyles.animationName !== "none" && panelStyles.animationName !== "";
2065
+ const hasTransition = panelStyles.transitionDuration !== "0s" && panelStyles.transitionDuration !== "";
2066
+ if (hasAnimation && hasTransition) {
2067
+ if (true) {
2068
+ warn("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.", "Only one of either animation type should be used.");
2069
+ }
2070
+ } else if (panelStyles.animationName === "none" && panelStyles.transitionDuration !== "0s") {
2071
+ animationTypeRef.current = "css-transition";
2072
+ } else if (panelStyles.animationName !== "none" && panelStyles.transitionDuration === "0s") {
2073
+ animationTypeRef.current = "css-animation";
2074
+ } else {
2075
+ animationTypeRef.current = "none";
2076
+ }
2077
+ if (element.getAttribute(AccordionRootDataAttributes.orientation) === "horizontal" || panelStyles.transitionProperty.indexOf("width") > -1) {
2078
+ transitionDimensionRef.current = "width";
2079
+ } else {
2080
+ transitionDimensionRef.current = "height";
2081
+ }
2082
+ }
2083
+ if (animationTypeRef.current !== "css-transition") {
2084
+ return void 0;
2085
+ }
2086
+ if (height === void 0 || width === void 0) {
2087
+ setDimensions({
2088
+ height: element.scrollHeight,
2089
+ width: element.scrollWidth
2090
+ });
2091
+ if (shouldCancelInitialOpenTransitionRef.current) {
2092
+ element.style.setProperty("transition-duration", "0s");
2093
+ }
2094
+ }
2095
+ let frame = -1;
2096
+ let nextFrame = -1;
2097
+ frame = AnimationFrame.request(() => {
2098
+ shouldCancelInitialOpenTransitionRef.current = false;
2099
+ nextFrame = AnimationFrame.request(() => {
2100
+ setTimeout(() => {
2101
+ element.style.removeProperty("transition-duration");
2102
+ });
2103
+ });
2104
+ });
2105
+ return () => {
2106
+ AnimationFrame.cancel(frame);
2107
+ AnimationFrame.cancel(nextFrame);
2108
+ };
2109
+ });
2110
+ const mergedPanelRef = useMergedRefs(externalRef, panelRef, handlePanelRef);
2111
+ useIsoLayoutEffect(() => {
2112
+ if (animationTypeRef.current !== "css-transition") {
2113
+ return void 0;
2114
+ }
2115
+ const panel = panelRef.current;
2116
+ if (!panel) {
2117
+ return void 0;
2118
+ }
2119
+ let resizeFrame = -1;
2120
+ if (abortControllerRef.current != null) {
2121
+ abortControllerRef.current.abort();
2122
+ abortControllerRef.current = null;
2123
+ }
2124
+ if (open) {
2125
+ const originalLayoutStyles = {
2126
+ "justify-content": panel.style.justifyContent,
2127
+ "align-items": panel.style.alignItems,
2128
+ "align-content": panel.style.alignContent,
2129
+ "justify-items": panel.style.justifyItems
2130
+ };
2131
+ Object.keys(originalLayoutStyles).forEach((key) => {
2132
+ panel.style.setProperty(key, "initial", "important");
2133
+ });
2134
+ if (!shouldCancelInitialOpenTransitionRef.current && !keepMounted) {
2135
+ panel.setAttribute(CollapsiblePanelDataAttributes.startingStyle, "");
2136
+ }
2137
+ setDimensions({
2138
+ height: panel.scrollHeight,
2139
+ width: panel.scrollWidth
2140
+ });
2141
+ resizeFrame = AnimationFrame.request(() => {
2142
+ Object.entries(originalLayoutStyles).forEach(([key, value]) => {
2143
+ if (value === "") {
2144
+ panel.style.removeProperty(key);
2145
+ } else {
2146
+ panel.style.setProperty(key, value);
2147
+ }
2148
+ });
2149
+ });
2150
+ } else {
2151
+ if (panel.scrollHeight === 0 && panel.scrollWidth === 0) {
2152
+ return void 0;
2153
+ }
2154
+ setDimensions({
2155
+ height: panel.scrollHeight,
2156
+ width: panel.scrollWidth
2157
+ });
2158
+ const abortController = new AbortController();
2159
+ abortControllerRef.current = abortController;
2160
+ const signal = abortController.signal;
2161
+ let attributeObserver = null;
2162
+ const endingStyleAttribute = CollapsiblePanelDataAttributes.endingStyle;
2163
+ attributeObserver = new MutationObserver((mutationList) => {
2164
+ const hasEndingStyle = mutationList.some((mutation) => mutation.type === "attributes" && mutation.attributeName === endingStyleAttribute);
2165
+ if (hasEndingStyle) {
2166
+ attributeObserver?.disconnect();
2167
+ attributeObserver = null;
2168
+ runOnceAnimationsFinish(() => {
2169
+ setDimensions({
2170
+ height: 0,
2171
+ width: 0
2172
+ });
2173
+ panel.style.removeProperty("content-visibility");
2174
+ setMounted(false);
2175
+ if (abortControllerRef.current === abortController) {
2176
+ abortControllerRef.current = null;
2177
+ }
2178
+ }, signal);
2179
+ }
2180
+ });
2181
+ attributeObserver.observe(panel, {
2182
+ attributes: true,
2183
+ attributeFilter: [endingStyleAttribute]
2184
+ });
2185
+ return () => {
2186
+ attributeObserver?.disconnect();
2187
+ endingStyleFrame.cancel();
2188
+ if (abortControllerRef.current === abortController) {
2189
+ abortController.abort();
2190
+ abortControllerRef.current = null;
2191
+ }
2192
+ };
2193
+ }
2194
+ return () => {
2195
+ AnimationFrame.cancel(resizeFrame);
2196
+ };
2197
+ }, [abortControllerRef, animationTypeRef, endingStyleFrame, hiddenUntilFound, keepMounted, mounted, open, panelRef, runOnceAnimationsFinish, setDimensions, setMounted]);
2198
+ useIsoLayoutEffect(() => {
2199
+ if (animationTypeRef.current !== "css-animation") {
2200
+ return;
2201
+ }
2202
+ const panel = panelRef.current;
2203
+ if (!panel) {
2204
+ return;
2205
+ }
2206
+ latestAnimationNameRef.current = panel.style.animationName || latestAnimationNameRef.current;
2207
+ panel.style.setProperty("animation-name", "none");
2208
+ setDimensions({
2209
+ height: panel.scrollHeight,
2210
+ width: panel.scrollWidth
2211
+ });
2212
+ if (!shouldCancelInitialOpenAnimationRef.current && !isBeforeMatchRef.current) {
2213
+ panel.style.removeProperty("animation-name");
2214
+ }
2215
+ if (open) {
2216
+ if (abortControllerRef.current != null) {
2217
+ abortControllerRef.current.abort();
2218
+ abortControllerRef.current = null;
2219
+ }
2220
+ setMounted(true);
2221
+ setVisible(true);
2222
+ } else {
2223
+ abortControllerRef.current = new AbortController();
2224
+ runOnceAnimationsFinish(() => {
2225
+ setMounted(false);
2226
+ setVisible(false);
2227
+ abortControllerRef.current = null;
2228
+ }, abortControllerRef.current.signal);
2229
+ }
2230
+ }, [abortControllerRef, animationTypeRef, open, panelRef, runOnceAnimationsFinish, setDimensions, setMounted, setVisible, visible]);
2231
+ useOnMount(() => {
2232
+ const frame = AnimationFrame.request(() => {
2233
+ shouldCancelInitialOpenAnimationRef.current = false;
2234
+ });
2235
+ return () => AnimationFrame.cancel(frame);
2236
+ });
2237
+ useIsoLayoutEffect(() => {
2238
+ if (!hiddenUntilFound) {
2239
+ return void 0;
2240
+ }
2241
+ const panel = panelRef.current;
2242
+ if (!panel) {
2243
+ return void 0;
2244
+ }
2245
+ let frame = -1;
2246
+ let nextFrame = -1;
2247
+ if (open && isBeforeMatchRef.current) {
2248
+ panel.style.transitionDuration = "0s";
2249
+ setDimensions({
2250
+ height: panel.scrollHeight,
2251
+ width: panel.scrollWidth
2252
+ });
2253
+ frame = AnimationFrame.request(() => {
2254
+ isBeforeMatchRef.current = false;
2255
+ nextFrame = AnimationFrame.request(() => {
2256
+ setTimeout(() => {
2257
+ panel.style.removeProperty("transition-duration");
2258
+ });
2259
+ });
2260
+ });
2261
+ }
2262
+ return () => {
2263
+ AnimationFrame.cancel(frame);
2264
+ AnimationFrame.cancel(nextFrame);
2265
+ };
2266
+ }, [hiddenUntilFound, open, panelRef, setDimensions]);
2267
+ useIsoLayoutEffect(() => {
2268
+ const panel = panelRef.current;
2269
+ if (panel && hiddenUntilFound && hidden) {
2270
+ panel.setAttribute("hidden", "until-found");
2271
+ if (animationTypeRef.current === "css-transition") {
2272
+ panel.setAttribute(CollapsiblePanelDataAttributes.startingStyle, "");
2273
+ }
2274
+ }
2275
+ }, [hiddenUntilFound, hidden, animationTypeRef, panelRef]);
2276
+ React27.useEffect(function registerBeforeMatchListener() {
2277
+ const panel = panelRef.current;
2278
+ if (!panel) {
2279
+ return void 0;
2280
+ }
2281
+ function handleBeforeMatch(event) {
2282
+ isBeforeMatchRef.current = true;
2283
+ setOpen(true);
2284
+ onOpenChange(true, createChangeEventDetails(reason_parts_exports.none, event));
2285
+ }
2286
+ panel.addEventListener("beforematch", handleBeforeMatch);
2287
+ return () => {
2288
+ panel.removeEventListener("beforematch", handleBeforeMatch);
2289
+ };
2290
+ }, [onOpenChange, panelRef, setOpen]);
2291
+ return React27.useMemo(() => ({
2292
+ props: {
2293
+ hidden,
2294
+ id: idParam,
2295
+ ref: mergedPanelRef
2296
+ }
2297
+ }), [hidden, idParam, mergedPanelRef]);
2298
+ }
2299
+
2300
+ // node_modules/@base-ui/react/esm/accordion/panel/AccordionPanelCssVars.js
2301
+ var AccordionPanelCssVars = /* @__PURE__ */ (function(AccordionPanelCssVars2) {
2302
+ AccordionPanelCssVars2["accordionPanelHeight"] = "--accordion-panel-height";
2303
+ AccordionPanelCssVars2["accordionPanelWidth"] = "--accordion-panel-width";
2304
+ return AccordionPanelCssVars2;
2305
+ })({});
2306
+
2307
+ // node_modules/@base-ui/react/esm/utils/useOpenChangeComplete.js
2308
+ import * as React28 from "react";
2309
+ function useOpenChangeComplete(parameters) {
2310
+ const {
2311
+ enabled = true,
2312
+ open,
2313
+ ref,
2314
+ onComplete: onCompleteParam
2315
+ } = parameters;
2316
+ const onComplete = useStableCallback(onCompleteParam);
2317
+ const runOnceAnimationsFinish = useAnimationsFinished(ref, open, false);
2318
+ React28.useEffect(() => {
2319
+ if (!enabled) {
2320
+ return void 0;
2321
+ }
2322
+ const abortController = new AbortController();
2323
+ runOnceAnimationsFinish(onComplete, abortController.signal);
2324
+ return () => {
2325
+ abortController.abort();
2326
+ };
2327
+ }, [enabled, open, onComplete, runOnceAnimationsFinish]);
2328
+ }
2329
+
2330
+ // node_modules/@base-ui/react/esm/accordion/panel/AccordionPanel.js
2331
+ var AccordionPanel = /* @__PURE__ */ React29.forwardRef(function AccordionPanel2(componentProps, forwardedRef) {
2332
+ const {
2333
+ className,
2334
+ hiddenUntilFound: hiddenUntilFoundProp,
2335
+ keepMounted: keepMountedProp,
2336
+ id: idProp,
2337
+ render,
2338
+ ...elementProps
2339
+ } = componentProps;
2340
+ const {
2341
+ hiddenUntilFound: contextHiddenUntilFound,
2342
+ keepMounted: contextKeepMounted
2343
+ } = useAccordionRootContext();
2344
+ const {
2345
+ abortControllerRef,
2346
+ animationTypeRef,
2347
+ height,
2348
+ mounted,
2349
+ onOpenChange,
2350
+ open,
2351
+ panelId,
2352
+ panelRef,
2353
+ runOnceAnimationsFinish,
2354
+ setDimensions,
2355
+ setHiddenUntilFound,
2356
+ setKeepMounted,
2357
+ setMounted,
2358
+ setOpen,
2359
+ setVisible,
2360
+ transitionDimensionRef,
2361
+ visible,
2362
+ width,
2363
+ setPanelIdState,
2364
+ transitionStatus
2365
+ } = useCollapsibleRootContext();
2366
+ const hiddenUntilFound = hiddenUntilFoundProp ?? contextHiddenUntilFound;
2367
+ const keepMounted = keepMountedProp ?? contextKeepMounted;
2368
+ if (true) {
2369
+ useIsoLayoutEffect(() => {
2370
+ if (keepMountedProp === false && hiddenUntilFound) {
2371
+ warn("The `keepMounted={false}` prop on a Accordion.Panel will be ignored when using `contextHiddenUntilFound` on the Panel or the Root since it requires the panel to remain mounted when closed.");
2372
+ }
2373
+ }, [hiddenUntilFound, keepMountedProp]);
2374
+ }
2375
+ useIsoLayoutEffect(() => {
2376
+ if (idProp) {
2377
+ setPanelIdState(idProp);
2378
+ return () => {
2379
+ setPanelIdState(void 0);
2380
+ };
2381
+ }
2382
+ return void 0;
2383
+ }, [idProp, setPanelIdState]);
2384
+ useIsoLayoutEffect(() => {
2385
+ setHiddenUntilFound(hiddenUntilFound);
2386
+ }, [setHiddenUntilFound, hiddenUntilFound]);
2387
+ useIsoLayoutEffect(() => {
2388
+ setKeepMounted(keepMounted);
2389
+ }, [setKeepMounted, keepMounted]);
2390
+ useOpenChangeComplete({
2391
+ open: open && transitionStatus === "idle",
2392
+ ref: panelRef,
2393
+ onComplete() {
2394
+ if (!open) {
2395
+ return;
2396
+ }
2397
+ setDimensions({
2398
+ width: void 0,
2399
+ height: void 0
2400
+ });
2401
+ }
2402
+ });
2403
+ const {
2404
+ props
2405
+ } = useCollapsiblePanel({
2406
+ abortControllerRef,
2407
+ animationTypeRef,
2408
+ externalRef: forwardedRef,
2409
+ height,
2410
+ hiddenUntilFound,
2411
+ id: idProp ?? panelId,
2412
+ keepMounted,
2413
+ mounted,
2414
+ onOpenChange,
2415
+ open,
2416
+ panelRef,
2417
+ runOnceAnimationsFinish,
2418
+ setDimensions,
2419
+ setMounted,
2420
+ setOpen,
2421
+ setVisible,
2422
+ transitionDimensionRef,
2423
+ visible,
2424
+ width
2425
+ });
2426
+ const {
2427
+ state,
2428
+ triggerId
2429
+ } = useAccordionItemContext();
2430
+ const panelState = React29.useMemo(() => ({
2431
+ ...state,
2432
+ transitionStatus
2433
+ }), [state, transitionStatus]);
2434
+ const element = useRenderElement("div", componentProps, {
2435
+ state: panelState,
2436
+ ref: [forwardedRef, panelRef],
2437
+ props: [props, {
2438
+ "aria-labelledby": triggerId,
2439
+ role: "region",
2440
+ style: {
2441
+ [AccordionPanelCssVars.accordionPanelHeight]: height === void 0 ? "auto" : `${height}px`,
2442
+ [AccordionPanelCssVars.accordionPanelWidth]: width === void 0 ? "auto" : `${width}px`
2443
+ }
2444
+ }, elementProps],
2445
+ stateAttributesMapping: accordionStateAttributesMapping
2446
+ });
2447
+ const shouldRender = keepMounted || hiddenUntilFound || !keepMounted && mounted;
2448
+ if (!shouldRender) {
2449
+ return null;
2450
+ }
2451
+ return element;
2452
+ });
2453
+ if (true) AccordionPanel.displayName = "AccordionPanel";
2454
+
2455
+ // src/runtime/components/Disclosure.tsx
2456
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
2457
+ function Disclosure({ title, children }) {
2458
+ return /* @__PURE__ */ jsx2(index_parts_exports.Root, { className: "rounded-[var(--radius-lg)] border border-[color:var(--color-border)] bg-white/70 dark:bg-white/5", children: /* @__PURE__ */ jsxs2(index_parts_exports.Item, { value: "item-1", children: [
2459
+ /* @__PURE__ */ jsx2(index_parts_exports.Header, { children: /* @__PURE__ */ jsxs2(index_parts_exports.Trigger, { className: "flex w-full items-center justify-between px-5 py-4 text-left text-xl font-semibold", children: [
2460
+ /* @__PURE__ */ jsx2("span", { children: title }),
2461
+ /* @__PURE__ */ jsx2("span", { "aria-hidden": "true", children: "+" })
2462
+ ] }) }),
2463
+ /* @__PURE__ */ jsx2(index_parts_exports.Panel, { className: "px-5 pb-5 text-lg text-[color:var(--color-foreground)]/80", children })
2464
+ ] }) });
2465
+ }
2466
+
2467
+ // src/runtime/components/Frame.tsx
2468
+ import { jsx as jsx3 } from "react/jsx-runtime";
2469
+ function Frame({ children }) {
2470
+ return /* @__PURE__ */ jsx3("div", { className: "rounded-[var(--radius-xl)] border border-[color:var(--color-border)] bg-white/70 p-8 shadow-xl shadow-black/10 dark:bg-white/5", children });
2471
+ }
2472
+
2473
+ // src/runtime/components/Center.tsx
2474
+ import { jsx as jsx4 } from "react/jsx-runtime";
2475
+ function Center({
2476
+ children,
2477
+ className
2478
+ }) {
2479
+ return /* @__PURE__ */ jsx4(
2480
+ "div",
2481
+ {
2482
+ className: `flex gap-4 flex-col items-center justify-center *:text-center ${className}`,
2483
+ children
2484
+ }
2485
+ );
2486
+ }
2487
+
2488
+ // src/runtime/default-components.tsx
2489
+ import { jsx as jsx5 } from "react/jsx-runtime";
2490
+ function cx(...values) {
2491
+ return values.filter(Boolean).join(" ");
2492
+ }
2493
+ function toClassName(value) {
2494
+ if (typeof value === "string") {
2495
+ return value;
2496
+ }
2497
+ if (Array.isArray(value)) {
2498
+ const className = value.flatMap(
2499
+ (entry) => typeof entry === "string" ? entry.split(/\s+/) : []
2500
+ ).filter(Boolean).join(" ");
2501
+ return className || void 0;
2502
+ }
2503
+ return void 0;
2504
+ }
2505
+ function isBlockCode(className, props) {
2506
+ const normalizedClassName = toClassName(className) ?? "";
2507
+ return "data-code-block" in props || normalizedClassName.includes("language-") || normalizedClassName.includes("deck-code-content");
2508
+ }
2509
+ function createDefaultComponents() {
2510
+ return {
2511
+ h1: (props) => /* @__PURE__ */ jsx5(
2512
+ "h1",
2513
+ {
2514
+ className: "text-6xl font-semibold tracking-tight text-balance",
2515
+ ...props
2516
+ }
2517
+ ),
2518
+ h2: (props) => /* @__PURE__ */ jsx5(
2519
+ "h2",
2520
+ {
2521
+ className: "text-4xl font-semibold tracking-tight text-balance",
2522
+ ...props
2523
+ }
2524
+ ),
2525
+ h3: (props) => /* @__PURE__ */ jsx5("h3", { className: "text-2xl font-semibold tracking-tight", ...props }),
2526
+ p: (props) => /* @__PURE__ */ jsx5(
2527
+ "p",
2528
+ {
2529
+ className: "text-2xl leading-relaxed text-[color:var(--color-foreground)]/90",
2530
+ ...props
2531
+ }
2532
+ ),
2533
+ a: (props) => /* @__PURE__ */ jsx5(
2534
+ "a",
2535
+ {
2536
+ className: "text-[color:var(--color-accent)] underline decoration-2 underline-offset-4",
2537
+ ...props
2538
+ }
2539
+ ),
2540
+ ul: (props) => /* @__PURE__ */ jsx5("ul", { className: "list-disc space-y-3 pl-8 text-2xl", ...props }),
2541
+ ol: (props) => /* @__PURE__ */ jsx5("ol", { className: "list-decimal space-y-3 pl-8 text-2xl", ...props }),
2542
+ li: (props) => /* @__PURE__ */ jsx5("li", { className: "pl-2", ...props }),
2543
+ code: ({ className, ...props }) => /* @__PURE__ */ jsx5(
2544
+ "code",
2545
+ {
2546
+ className: isBlockCode(className, props) ? toClassName(className) : cx(
2547
+ "rounded-md bg-black/10 px-2 py-1 font-mono text-[0.9em] dark:bg-white/10",
2548
+ toClassName(className)
2549
+ ),
2550
+ ...props
2551
+ }
2552
+ ),
2553
+ pre: ({ className, ...props }) => /* @__PURE__ */ jsx5(
2554
+ "pre",
2555
+ {
2556
+ className: cx(
2557
+ "overflow-x-auto rounded-[var(--radius-lg)] border border-[color:var(--color-border)] bg-[color:var(--color-code-bg)] p-6 text-lg",
2558
+ toClassName(className)
2559
+ ),
2560
+ ...props
2561
+ }
2562
+ ),
2563
+ table: ({ className, ...props }) => /* @__PURE__ */ jsx5("div", { className: "deck-table-wrap", children: /* @__PURE__ */ jsx5("table", { className: cx("deck-table", className), ...props }) }),
2564
+ thead: ({ className, ...props }) => /* @__PURE__ */ jsx5("thead", { className: cx("deck-thead", className), ...props }),
2565
+ tbody: ({ className, ...props }) => /* @__PURE__ */ jsx5("tbody", { className: cx("deck-tbody", className), ...props }),
2566
+ tr: ({ className, ...props }) => /* @__PURE__ */ jsx5("tr", { className: cx("deck-tr", className), ...props }),
2567
+ th: ({ className, ...props }) => /* @__PURE__ */ jsx5("th", { className: cx("deck-th", className), ...props }),
2568
+ td: ({ className, ...props }) => /* @__PURE__ */ jsx5("td", { className: cx("deck-td", className), ...props }),
2569
+ blockquote: (props) => /* @__PURE__ */ jsx5(
2570
+ "blockquote",
2571
+ {
2572
+ className: "border-l-4 border-[color:var(--color-accent)] pl-6 text-2xl italic",
2573
+ ...props
2574
+ }
2575
+ ),
2576
+ Callout,
2577
+ Columns,
2578
+ Disclosure,
2579
+ Frame,
2580
+ Center
2581
+ };
2582
+ }
2583
+ function mergeComponents(theme) {
2584
+ return {
2585
+ ...createDefaultComponents(),
2586
+ ...theme?.components ?? {}
2587
+ };
2588
+ }
2589
+
2590
+ // src/runtime/hooks/slides.ts
2591
+ import { useEffect as useEffect7, useState as useState8 } from "react";
2592
+
2593
+ // src/runtime/utils/use-current-slide.ts
2594
+ function parseAspectRatio(input) {
2595
+ const value = String(input ?? "16:9");
2596
+ const parts = value.split(":").map((part) => Number(part.trim()));
2597
+ if (parts.length !== 2 || parts.some((part) => !Number.isFinite(part) || part <= 0)) {
2598
+ return "16 / 9";
2599
+ }
2600
+ return `${parts[0]} / ${parts[1]}`;
2601
+ }
2602
+ function clamp(value, min, max) {
2603
+ return Math.min(max, Math.max(min, value));
2604
+ }
2605
+ function getHashIndex(total) {
2606
+ const raw = Number(window.location.hash.replace("#", ""));
2607
+ if (!Number.isFinite(raw) || raw < 1) {
2608
+ return 0;
2609
+ }
2610
+ return clamp(raw - 1, 0, Math.max(total - 1, 0));
2611
+ }
2612
+
2613
+ // src/runtime/hooks/slides.ts
2614
+ function useCurrentSlide(total) {
2615
+ const [index, setIndex] = useState8(() => getHashIndex(total));
2616
+ useEffect7(() => {
2617
+ const onHashChange = () => setIndex(getHashIndex(total));
2618
+ window.addEventListener("hashchange", onHashChange);
2619
+ return () => window.removeEventListener("hashchange", onHashChange);
2620
+ }, [total]);
2621
+ useEffect7(() => {
2622
+ const nextHash = `#${index + 1}`;
2623
+ if (window.location.hash !== nextHash) {
2624
+ history.replaceState(
2625
+ null,
2626
+ "",
2627
+ `${window.location.pathname}${window.location.search}${nextHash}`
2628
+ );
2629
+ }
2630
+ }, [index]);
2631
+ useEffect7(() => {
2632
+ const onKeyDown = (event) => {
2633
+ if (event.metaKey || event.ctrlKey || event.altKey) {
2634
+ return;
2635
+ }
2636
+ if (["ArrowRight", "ArrowDown", "PageDown", " "].includes(event.key)) {
2637
+ event.preventDefault();
2638
+ setIndex((current) => clamp(current + 1, 0, total - 1));
2639
+ }
2640
+ if (["ArrowLeft", "ArrowUp", "PageUp"].includes(event.key)) {
2641
+ event.preventDefault();
2642
+ setIndex((current) => clamp(current - 1, 0, total - 1));
2643
+ }
2644
+ if (event.key === "Home") {
2645
+ event.preventDefault();
2646
+ setIndex(0);
2647
+ }
2648
+ if (event.key === "End") {
2649
+ event.preventDefault();
2650
+ setIndex(total - 1);
2651
+ }
2652
+ };
2653
+ window.addEventListener("keydown", onKeyDown);
2654
+ return () => window.removeEventListener("keydown", onKeyDown);
2655
+ }, [total]);
2656
+ useEffect7(() => {
2657
+ setIndex((current) => clamp(current, 0, Math.max(total - 1, 0)));
2658
+ }, [total]);
2659
+ return [index, setIndex];
2660
+ }
2661
+
2662
+ // src/runtime/layout/SlideFrame.tsx
2663
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
2664
+ function SlideFrame({
2665
+ children,
2666
+ config,
2667
+ index,
2668
+ total,
2669
+ printMode
2670
+ }) {
2671
+ const ratio = parseAspectRatio(config.aspectRatio);
2672
+ return /* @__PURE__ */ jsx6(
2673
+ "section",
2674
+ {
2675
+ className: `slide-frame ${printMode ? "slide-frame-print" : ""}`,
2676
+ style: { "--slide-aspect-ratio": ratio },
2677
+ "data-transition": config.transition,
2678
+ children: /* @__PURE__ */ jsxs3("div", { className: "slide-surface", children: [
2679
+ /* @__PURE__ */ jsx6("div", { className: "slide-content", children }),
2680
+ config.showSlideNumbers ? /* @__PURE__ */ jsx6("div", { className: "slide-footer", children: /* @__PURE__ */ jsxs3("span", { children: [
2681
+ index + 1,
2682
+ " / ",
2683
+ total
2684
+ ] }) }) : null
2685
+ ] })
2686
+ }
2687
+ );
2688
+ }
2689
+
2690
+ // src/runtime/layout/DeckSlide.tsx
2691
+ import { jsx as jsx7 } from "react/jsx-runtime";
2692
+ function DeckSlide({
2693
+ slide,
2694
+ config,
2695
+ total,
2696
+ index,
2697
+ printMode,
2698
+ components
2699
+ }) {
2700
+ const Slide = slide.Component;
2701
+ return /* @__PURE__ */ jsx7(
2702
+ SlideFrame,
2703
+ {
2704
+ config,
2705
+ index,
2706
+ total,
2707
+ printMode,
2708
+ children: /* @__PURE__ */ jsx7(Slide, { components })
2709
+ }
2710
+ );
2711
+ }
2712
+
2713
+ // src/runtime/primitives/DeckProgress.tsx
2714
+ import { jsx as jsx8 } from "react/jsx-runtime";
2715
+ function DeckProgress({ currentIndex, total }) {
2716
+ const width = total > 0 ? `${(currentIndex + 1) / total * 100}%` : "0%";
2717
+ return /* @__PURE__ */ jsx8("div", { className: "deck-progress", children: /* @__PURE__ */ jsx8("div", { className: "deck-progress-bar", style: { width } }) });
2718
+ }
2719
+
2720
+ // src/runtime/primitives/DeckTitle.tsx
2721
+ import { jsx as jsx9 } from "react/jsx-runtime";
2722
+ function DeckTitle({ title }) {
2723
+ return /* @__PURE__ */ jsx9("div", { className: "deck-title", children: title });
2724
+ }
2725
+
2726
+ // src/runtime/primitives/DeckChrome.tsx
2727
+ import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
2728
+ function DeckChrome({ title, currentIndex, total }) {
2729
+ return /* @__PURE__ */ jsxs4("div", { className: "deck-chrome", children: [
2730
+ /* @__PURE__ */ jsx10(DeckTitle, { title }),
2731
+ /* @__PURE__ */ jsx10(DeckProgress, { currentIndex, total })
2732
+ ] });
2733
+ }
2734
+
2735
+ // src/runtime/primitives/DeckNavigation.tsx
2736
+ import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
2737
+ function DeckNavigation({ onPrevious, onNext }) {
2738
+ return /* @__PURE__ */ jsxs5("div", { className: "deck-nav", children: [
2739
+ /* @__PURE__ */ jsx11("button", { className: "deck-button", type: "button", onClick: onPrevious, children: "Prev" }),
2740
+ /* @__PURE__ */ jsx11("button", { className: "deck-button", type: "button", onClick: onNext, children: "Next" })
2741
+ ] });
2742
+ }
2743
+
2744
+ // src/runtime/themes/base/DefaultDeck.tsx
2745
+ import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
2746
+ function DefaultDeck({
2747
+ config,
2748
+ slides,
2749
+ currentIndex,
2750
+ setCurrentIndex,
2751
+ printMode,
2752
+ components,
2753
+ helpers
2754
+ }) {
2755
+ if (printMode) {
2756
+ return /* @__PURE__ */ jsx12("main", { className: "print-deck", children: slides.map((slide, slideIndex) => /* @__PURE__ */ jsx12(
2757
+ DeckSlide,
2758
+ {
2759
+ slide,
2760
+ config,
2761
+ total: slides.length,
2762
+ index: slideIndex,
2763
+ printMode: true,
2764
+ components
2765
+ },
2766
+ slideIndex
2767
+ )) });
2768
+ }
2769
+ return /* @__PURE__ */ jsxs6("main", { className: "app-shell", children: [
2770
+ /* @__PURE__ */ jsx12(DeckChrome, { title: config.title, currentIndex, total: slides.length }),
2771
+ /* @__PURE__ */ jsx12("div", { className: "deck-stage", children: /* @__PURE__ */ jsx12(
2772
+ DeckSlide,
2773
+ {
2774
+ slide: slides[currentIndex],
2775
+ config,
2776
+ total: slides.length,
2777
+ index: currentIndex,
2778
+ components
2779
+ }
2780
+ ) }),
2781
+ /* @__PURE__ */ jsx12(
2782
+ DeckNavigation,
2783
+ {
2784
+ onPrevious: () => setCurrentIndex((value) => helpers.clamp(value - 1, 0, slides.length - 1)),
2785
+ onNext: () => setCurrentIndex((value) => helpers.clamp(value + 1, 0, slides.length - 1))
2786
+ }
2787
+ )
2788
+ ] });
2789
+ }
2790
+ export {
2791
+ Callout,
2792
+ Columns,
2793
+ DeckChrome,
2794
+ DeckNavigation,
2795
+ DeckProgress,
2796
+ DeckSlide,
2797
+ DeckTitle,
2798
+ DefaultDeck,
2799
+ Disclosure,
2800
+ Frame,
2801
+ SlideFrame,
2802
+ clamp,
2803
+ createDefaultComponents,
2804
+ getHashIndex,
2805
+ mergeComponents,
2806
+ parseAspectRatio,
2807
+ useCurrentSlide
2808
+ };