@remotion/promo-pages 4.0.373 → 4.0.374

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.
@@ -25,7 +25,7 @@ import { createContext as createContext2, useContext } from "react";
25
25
  import { jsx as jsx10 } from "react/jsx-runtime";
26
26
  import {
27
27
  forwardRef as forwardRef2,
28
- useContext as useContext12,
28
+ useContext as useContext13,
29
29
  useEffect as useEffect3,
30
30
  useMemo as useMemo10,
31
31
  useState as useState6
@@ -36,7 +36,7 @@ import { createContext as createContext3 } from "react";
36
36
  import React3, { useCallback, useMemo as useMemo22, useState } from "react";
37
37
  import { jsx as jsx32 } from "react/jsx-runtime";
38
38
  import {
39
- createContext as createContext9,
39
+ createContext as createContext10,
40
40
  useLayoutEffect,
41
41
  useMemo as useMemo7,
42
42
  useRef as useRef2,
@@ -66,14 +66,16 @@ import React5, {
66
66
  import { jsx as jsx42 } from "react/jsx-runtime";
67
67
  import { createContext as createContext6, useContext as useContext3, useEffect, useRef, useState as useState3 } from "react";
68
68
  import { jsx as jsx52 } from "react/jsx-runtime";
69
- import { createContext as createContext8, useCallback as useCallback4, useContext as useContext7 } from "react";
69
+ import { createContext as createContext9, useCallback as useCallback4, useContext as useContext8 } from "react";
70
+ import { createContext as createContext8 } from "react";
71
+ import * as React6 from "react";
70
72
  import { jsx as jsx62 } from "react/jsx-runtime";
71
- import { useContext as useContext9 } from "react";
72
- import { createContext as createContext10 } from "react";
73
- import { jsx as jsx72 } from "react/jsx-runtime";
74
- import { useContext as useContext8, useMemo as useMemo8 } from "react";
75
- import { useContext as useContext11, useMemo as useMemo9 } from "react";
76
73
  import { useContext as useContext10 } from "react";
74
+ import { createContext as createContext11 } from "react";
75
+ import { jsx as jsx72 } from "react/jsx-runtime";
76
+ import { useContext as useContext9, useMemo as useMemo8 } from "react";
77
+ import { useContext as useContext12, useMemo as useMemo9 } from "react";
78
+ import { useContext as useContext11 } from "react";
77
79
  import { jsx as jsx82 } from "react/jsx-runtime";
78
80
  import { jsx as jsx92 } from "react/jsx-runtime";
79
81
  import {
@@ -84,12 +86,12 @@ import {
84
86
  useRef as useRef4,
85
87
  useState as useState7
86
88
  } from "react";
87
- import React10, { useCallback as useCallback5, useImperativeHandle as useImperativeHandle3, useRef as useRef3 } from "react";
89
+ import React11, { useCallback as useCallback5, useImperativeHandle as useImperativeHandle3, useRef as useRef3 } from "react";
88
90
  import { jsx as jsx102 } from "react/jsx-runtime";
89
91
  import { jsx as jsx11 } from "react/jsx-runtime";
90
- import { useContext as useContext13, useEffect as useEffect5, useState as useState9 } from "react";
92
+ import { useContext as useContext14, useEffect as useEffect5, useState as useState9 } from "react";
91
93
  import {
92
- createContext as createContext11,
94
+ createContext as createContext12,
93
95
  useCallback as useCallback6,
94
96
  useLayoutEffect as useLayoutEffect3,
95
97
  useMemo as useMemo11,
@@ -97,12 +99,12 @@ import {
97
99
  } from "react";
98
100
  import { jsx as jsx12 } from "react/jsx-runtime";
99
101
  import { forwardRef as forwardRef6, useCallback as useCallback11, useContext as useContext27 } from "react";
100
- import React11, { createContext as createContext12, useMemo as useMemo12 } from "react";
102
+ import React12, { createContext as createContext13, useMemo as useMemo12 } from "react";
101
103
  import { jsx as jsx13 } from "react/jsx-runtime";
102
- import { useContext as useContext14 } from "react";
103
- import { createContext as createContext13, useEffect as useEffect6, useState as useState10 } from "react";
104
+ import { useContext as useContext15 } from "react";
105
+ import { createContext as createContext14, useEffect as useEffect6, useState as useState10 } from "react";
104
106
  import { jsx as jsx14 } from "react/jsx-runtime";
105
- import { createContext as createContext14, useMemo as useMemo13, useReducer } from "react";
107
+ import { createContext as createContext15, useMemo as useMemo13, useReducer } from "react";
106
108
  import { jsx as jsx15 } from "react/jsx-runtime";
107
109
  import {
108
110
  forwardRef as forwardRef4,
@@ -113,8 +115,6 @@ import {
113
115
  useRef as useRef12,
114
116
  useState as useState15
115
117
  } from "react";
116
- import { createContext as createContext15 } from "react";
117
- import * as React14 from "react";
118
118
  import { useContext as useContext17, useLayoutEffect as useLayoutEffect4, useRef as useRef7 } from "react";
119
119
  import React15, {
120
120
  createContext as createContext16,
@@ -328,7 +328,7 @@ function validateFps(fps, location, isGif) {
328
328
  throw new TypeError(`The FPS for a GIF cannot be higher than 50. Use the --every-nth-frame option to lower the FPS: https://remotion.dev/docs/render-as-gif`);
329
329
  }
330
330
  }
331
- function cancelRender(err) {
331
+ function cancelRenderInternal(scope, err) {
332
332
  let error;
333
333
  if (isErrorLike(err)) {
334
334
  error = err;
@@ -340,9 +340,14 @@ function cancelRender(err) {
340
340
  } else {
341
341
  error = Error("Rendering was cancelled");
342
342
  }
343
- window.remotion_cancelledError = error.stack;
343
+ if (scope) {
344
+ scope.remotion_cancelledError = error.stack;
345
+ }
344
346
  throw error;
345
347
  }
348
+ function cancelRender(err) {
349
+ return cancelRenderInternal(typeof window !== "undefined" ? window : undefined, err);
350
+ }
346
351
  function interpolateFunction(input, inputRange, outputRange, options) {
347
352
  const { extrapolateLeft, extrapolateRight, easing } = options;
348
353
  let result = input;
@@ -748,7 +753,7 @@ var __defProp2, __export2 = (target, all) => {
748
753
  });
749
754
  }, useIsPlayer = () => {
750
755
  return useContext(IsPlayerContext);
751
- }, VERSION = "4.0.373", checkMultipleRemotionVersions = () => {
756
+ }, VERSION = "4.0.374", checkMultipleRemotionVersions = () => {
752
757
  if (typeof globalThis === "undefined") {
753
758
  return;
754
759
  }
@@ -1634,8 +1639,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
1634
1639
  }
1635
1640
  }, error = (options, ...args) => {
1636
1641
  return console.error(...transformArgs({ args, logLevel: "error", tag: options.tag }));
1637
- }, Log, handles, DELAY_RENDER_CALLSTACK_TOKEN = "The delayRender was called:", DELAY_RENDER_RETRIES_LEFT = "Retries left: ", DELAY_RENDER_RETRY_TOKEN = "- Rendering the frame will be retried.", DELAY_RENDER_CLEAR_TOKEN = "handle was cleared after", defaultTimeout = 30000, delayRenderInternal = (scope, environment, label, options) => {
1638
- if (typeof label !== "string" && typeof label !== "undefined") {
1642
+ }, Log, handles, DELAY_RENDER_CALLSTACK_TOKEN = "The delayRender was called:", DELAY_RENDER_RETRIES_LEFT = "Retries left: ", DELAY_RENDER_RETRY_TOKEN = "- Rendering the frame will be retried.", DELAY_RENDER_CLEAR_TOKEN = "handle was cleared after", defaultTimeout = 30000, delayRenderInternal = ({
1643
+ scope,
1644
+ environment,
1645
+ label,
1646
+ options
1647
+ }) => {
1648
+ if (typeof label !== "string" && label !== null) {
1639
1649
  throw new Error("The label parameter of delayRender() must be a string or undefined, got: " + JSON.stringify(label));
1640
1650
  }
1641
1651
  const handle = Math.random();
@@ -1658,7 +1668,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
1658
1668
  DELAY_RENDER_CALLSTACK_TOKEN,
1659
1669
  called
1660
1670
  ].filter(truthy2).join(" ");
1661
- cancelRender(Error(message));
1671
+ cancelRenderInternal(scope, Error(message));
1662
1672
  }, timeoutToUse)
1663
1673
  };
1664
1674
  }
@@ -1667,7 +1677,12 @@ Check that all your Remotion packages are on the same version. If your dependenc
1667
1677
  scope.remotion_renderReady = false;
1668
1678
  }
1669
1679
  return handle;
1670
- }, continueRenderInternal = (scope, handle, environment) => {
1680
+ }, continueRenderInternal = ({
1681
+ scope,
1682
+ handle,
1683
+ environment,
1684
+ logLevel
1685
+ }) => {
1671
1686
  if (typeof handle === "undefined") {
1672
1687
  throw new TypeError("The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.");
1673
1688
  }
@@ -1687,7 +1702,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
1687
1702
  DELAY_RENDER_CLEAR_TOKEN,
1688
1703
  `${Date.now() - startTime}ms`
1689
1704
  ].filter(truthy2).join(" ");
1690
- Log.verbose({ logLevel: window.remotion_logLevel, tag: "delayRender()" }, message);
1705
+ Log.verbose({ logLevel, tag: "delayRender()" }, message);
1691
1706
  delete scope.remotion_delayRenderTimeouts[handle];
1692
1707
  }
1693
1708
  return false;
@@ -1697,16 +1712,42 @@ Check that all your Remotion packages are on the same version. If your dependenc
1697
1712
  if (handles.length === 0 && typeof scope !== "undefined") {
1698
1713
  scope.remotion_renderReady = true;
1699
1714
  }
1715
+ }, LogLevelContext, useLogLevel = () => {
1716
+ const { logLevel } = React6.useContext(LogLevelContext);
1717
+ if (logLevel === null) {
1718
+ throw new Error("useLogLevel must be used within a LogLevelProvider");
1719
+ }
1720
+ return logLevel;
1721
+ }, useMountTime = () => {
1722
+ const { mountTime } = React6.useContext(LogLevelContext);
1723
+ if (mountTime === null) {
1724
+ throw new Error("useMountTime must be used within a LogLevelProvider");
1725
+ }
1726
+ return mountTime;
1700
1727
  }, DelayRenderContextType, useDelayRender = () => {
1701
1728
  const environment = useRemotionEnvironment();
1702
- const scope = useContext7(DelayRenderContextType);
1729
+ const scope = useContext8(DelayRenderContextType);
1730
+ const logLevel = useLogLevel();
1703
1731
  const delayRender2 = useCallback4((label, options) => {
1704
- return delayRenderInternal(scope ?? (typeof window !== "undefined" ? window : undefined), environment, label, options);
1732
+ return delayRenderInternal({
1733
+ scope: scope ?? (typeof window !== "undefined" ? window : undefined),
1734
+ environment,
1735
+ label: label ?? null,
1736
+ options: options ?? {}
1737
+ });
1705
1738
  }, [environment, scope]);
1706
1739
  const continueRender2 = useCallback4((handle) => {
1707
- continueRenderInternal(scope ?? (typeof window !== "undefined" ? window : undefined), handle, environment);
1708
- }, [environment, scope]);
1709
- return { delayRender: delayRender2, continueRender: continueRender2 };
1740
+ continueRenderInternal({
1741
+ scope: scope ?? (typeof window !== "undefined" ? window : undefined),
1742
+ handle,
1743
+ environment,
1744
+ logLevel
1745
+ });
1746
+ }, [environment, logLevel, scope]);
1747
+ const cancelRender2 = useCallback4((err) => {
1748
+ return cancelRenderInternal(scope ?? (typeof window !== "undefined" ? window : undefined), err);
1749
+ }, [scope]);
1750
+ return { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 };
1710
1751
  }, SetTimelineContext, TimelineContext, TimelineContextProvider = ({ children, frameState }) => {
1711
1752
  const [playing, setPlaying] = useState5(false);
1712
1753
  const imperativePlaying = useRef2(false);
@@ -1772,7 +1813,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
1772
1813
  children
1773
1814
  });
1774
1815
  }, useUnsafeVideoConfig = () => {
1775
- const context = useContext8(SequenceContext);
1816
+ const context = useContext9(SequenceContext);
1776
1817
  const ctxWidth = context?.width ?? null;
1777
1818
  const ctxHeight = context?.height ?? null;
1778
1819
  const ctxDuration = context?.durationInFrames ?? null;
@@ -1812,7 +1853,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
1812
1853
  }, [ctxDuration, ctxHeight, ctxWidth, video]);
1813
1854
  }, useVideoConfig = () => {
1814
1855
  const videoConfig = useUnsafeVideoConfig();
1815
- const context = useContext9(CanUseRemotionHooks);
1856
+ const context = useContext10(CanUseRemotionHooks);
1816
1857
  const isPlayer = useIsPlayer();
1817
1858
  if (!videoConfig) {
1818
1859
  if (typeof window !== "undefined" && window.remotion_isPlayer || isPlayer) {
@@ -1829,7 +1870,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
1829
1870
  }
1830
1871
  return videoConfig;
1831
1872
  }, useCurrentFrame = () => {
1832
- const canUseRemotionHooks = useContext10(CanUseRemotionHooks);
1873
+ const canUseRemotionHooks = useContext11(CanUseRemotionHooks);
1833
1874
  const env = useRemotionEnvironment();
1834
1875
  if (!canUseRemotionHooks) {
1835
1876
  if (env.isPlayer) {
@@ -1838,7 +1879,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
1838
1879
  throw new Error(`useCurrentFrame() can only be called inside a component that was registered as a composition. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions`);
1839
1880
  }
1840
1881
  const frame = useTimelinePosition();
1841
- const context = useContext10(SequenceContext);
1882
+ const context = useContext11(SequenceContext);
1842
1883
  const contextOffset = context ? context.cumulatedFrom + context.relativeFrom : 0;
1843
1884
  return frame - contextOffset;
1844
1885
  }, Freeze = ({
@@ -1868,8 +1909,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
1868
1909
  return active(frame);
1869
1910
  }
1870
1911
  }, [active, frame]);
1871
- const timelineContext = useContext11(TimelineContext);
1872
- const sequenceContext = useContext11(SequenceContext);
1912
+ const timelineContext = useContext12(TimelineContext);
1913
+ const sequenceContext = useContext12(SequenceContext);
1873
1914
  const relativeFrom = sequenceContext?.relativeFrom ?? 0;
1874
1915
  const timelineValue = useMemo9(() => {
1875
1916
  if (!isActive) {
@@ -1922,8 +1963,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
1922
1963
  }, ref) => {
1923
1964
  const { layout = "absolute-fill" } = other;
1924
1965
  const [id] = useState6(() => String(Math.random()));
1925
- const parentSequence = useContext12(SequenceContext);
1926
- const { rootId } = useContext12(TimelineContext);
1966
+ const parentSequence = useContext13(SequenceContext);
1967
+ const { rootId } = useContext13(TimelineContext);
1927
1968
  const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
1928
1969
  const nonce = useNonce();
1929
1970
  if (layout !== "absolute-fill" && layout !== "none") {
@@ -1948,8 +1989,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
1948
1989
  const videoConfig = useVideoConfig();
1949
1990
  const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
1950
1991
  const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
1951
- const { registerSequence, unregisterSequence } = useContext12(SequenceManager);
1952
- const { hidden } = useContext12(SequenceVisibilityToggleContext);
1992
+ const { registerSequence, unregisterSequence } = useContext13(SequenceManager);
1993
+ const { hidden } = useContext13(SequenceVisibilityToggleContext);
1953
1994
  const premounting = useMemo10(() => {
1954
1995
  return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
1955
1996
  }, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
@@ -2413,7 +2454,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
2413
2454
  children
2414
2455
  });
2415
2456
  }, ArtifactThumbnail, Artifact = ({ filename, content, downloadBehavior }) => {
2416
- const { registerRenderAsset, unregisterRenderAsset } = useContext13(RenderAssetManager);
2457
+ const { registerRenderAsset, unregisterRenderAsset } = useContext14(RenderAssetManager);
2417
2458
  const env = useRemotionEnvironment();
2418
2459
  const frame = useCurrentFrame();
2419
2460
  const [id] = useState9(() => {
@@ -2491,7 +2532,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
2491
2532
  const actualDuration = duration / playbackRate;
2492
2533
  return Math.floor(actualDuration);
2493
2534
  }, LoopContext, useLoop = () => {
2494
- return React11.useContext(LoopContext);
2535
+ return React12.useContext(LoopContext);
2495
2536
  }, Loop = ({ durationInFrames, times = Infinity, children, name, ...props }) => {
2496
2537
  const currentFrame = useCurrentFrame();
2497
2538
  const { durationInFrames: compDuration } = useVideoConfig();
@@ -2579,7 +2620,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
2579
2620
  }
2580
2621
  return src.slice(0, hashIndex);
2581
2622
  }, usePreload = (src) => {
2582
- const preloads2 = useContext14(PreloadContext);
2623
+ const preloads2 = useContext15(PreloadContext);
2583
2624
  const hashFragmentIndex = removeAndGetHashFragment(src);
2584
2625
  const withoutHashFragment = getSrcWithoutHash(src);
2585
2626
  if (!preloads2[withoutHashFragment]) {
@@ -2875,18 +2916,6 @@ Check that all your Remotion packages are on the same version. If your dependenc
2875
2916
  return "anonymous";
2876
2917
  }
2877
2918
  return;
2878
- }, LogLevelContext, useLogLevel = () => {
2879
- const { logLevel } = React14.useContext(LogLevelContext);
2880
- if (logLevel === null) {
2881
- throw new Error("useLogLevel must be used within a LogLevelProvider");
2882
- }
2883
- return logLevel;
2884
- }, useMountTime = () => {
2885
- const { mountTime } = React14.useContext(LogLevelContext);
2886
- if (mountTime === null) {
2887
- throw new Error("useMountTime must be used within a LogLevelProvider");
2888
- }
2889
- return mountTime;
2890
2919
  }, playAndHandleNotAllowedError = ({
2891
2920
  mediaRef,
2892
2921
  mediaType,
@@ -6823,8 +6852,12 @@ var init_esm = __esm(() => {
6823
6852
  window.remotion_delayRenderTimeouts = {};
6824
6853
  }
6825
6854
  }
6826
- DelayRenderContextType = createContext8(null);
6827
- SetTimelineContext = createContext9({
6855
+ LogLevelContext = createContext8({
6856
+ logLevel: "info",
6857
+ mountTime: 0
6858
+ });
6859
+ DelayRenderContextType = createContext9(null);
6860
+ SetTimelineContext = createContext10({
6828
6861
  setFrame: () => {
6829
6862
  throw new Error("default");
6830
6863
  },
@@ -6832,7 +6865,7 @@ var init_esm = __esm(() => {
6832
6865
  throw new Error("default");
6833
6866
  }
6834
6867
  });
6835
- TimelineContext = createContext9({
6868
+ TimelineContext = createContext10({
6836
6869
  frame: {},
6837
6870
  playing: false,
6838
6871
  playbackRate: 1,
@@ -6845,11 +6878,11 @@ var init_esm = __esm(() => {
6845
6878
  },
6846
6879
  audioAndVideoTags: { current: [] }
6847
6880
  });
6848
- CanUseRemotionHooks = createContext10(false);
6881
+ CanUseRemotionHooks = createContext11(false);
6849
6882
  RegularSequence = forwardRef2(RegularSequenceRefForwardingFunction);
6850
6883
  PremountedPostmountedSequence = forwardRef2(PremountedPostmountedSequenceRefForwardingFunction);
6851
6884
  Sequence = forwardRef2(SequenceRefForwardingFunction);
6852
- Canvas = React10.forwardRef(CanvasRefForwardingFunction);
6885
+ Canvas = React11.forwardRef(CanvasRefForwardingFunction);
6853
6886
  AnimatedImage = forwardRef3(({
6854
6887
  src,
6855
6888
  width,
@@ -6957,7 +6990,7 @@ var init_esm = __esm(() => {
6957
6990
  ...props
6958
6991
  });
6959
6992
  });
6960
- RenderAssetManager = createContext11({
6993
+ RenderAssetManager = createContext12({
6961
6994
  registerRenderAsset: () => {
6962
6995
  return;
6963
6996
  },
@@ -6968,21 +7001,17 @@ var init_esm = __esm(() => {
6968
7001
  });
6969
7002
  ArtifactThumbnail = Symbol("Thumbnail");
6970
7003
  Artifact.Thumbnail = ArtifactThumbnail;
6971
- LoopContext = createContext12(null);
7004
+ LoopContext = createContext13(null);
6972
7005
  Loop.useLoop = useLoop;
6973
- PreloadContext = createContext13({});
7006
+ PreloadContext = createContext14({});
6974
7007
  preloads = {};
6975
7008
  updaters = [];
6976
- DurationsContext = createContext14({
7009
+ DurationsContext = createContext15({
6977
7010
  durations: {},
6978
7011
  setDurations: () => {
6979
7012
  throw new Error("context missing");
6980
7013
  }
6981
7014
  });
6982
- LogLevelContext = createContext15({
6983
- logLevel: "info",
6984
- mountTime: 0
6985
- });
6986
7015
  SharedAudioContext = createContext16(null);
6987
7016
  didWarn = {};
6988
7017
  BufferingContextReact = React16.createContext(null);
@@ -7201,7 +7230,7 @@ var init_esm = __esm(() => {
7201
7230
  });
7202
7231
 
7203
7232
  // ../design/dist/esm/index.mjs
7204
- import { useCallback as useCallback18, useRef as useRef18, useState as useState22 } from "react";
7233
+ import { useCallback as useCallback18, useRef as useRef22, useState as useState22 } from "react";
7205
7234
 
7206
7235
  // ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
7207
7236
  function r(e) {
@@ -8542,7 +8571,7 @@ var getDefaultConfig = () => {
8542
8571
  var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
8543
8572
 
8544
8573
  // ../design/dist/esm/index.mjs
8545
- import React6, { useEffect as useEffect23, useMemo as useMemo33, useState as useState21 } from "react";
8574
+ import React7, { useEffect as useEffect23, useMemo as useMemo33, useState as useState21 } from "react";
8546
8575
 
8547
8576
  // ../paths/dist/esm/index.mjs
8548
8577
  var cutLInstruction = ({
@@ -12683,65 +12712,69 @@ var extrudeAndTransformElement = (options) => {
12683
12712
  init_esm();
12684
12713
  import { jsx as jsx37, Fragment } from "react/jsx-runtime";
12685
12714
  import { jsx as jsx210, jsxs as jsxs3 } from "react/jsx-runtime";
12715
+ import { useEffect as useEffect24, useMemo as useMemo210, useRef as useRef18 } from "react";
12686
12716
  import { jsx as jsx38 } from "react/jsx-runtime";
12687
- import React34 from "react";
12688
- import { jsx as jsx43 } from "react/jsx-runtime";
12717
+ import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
12718
+ import React42 from "react";
12689
12719
  import { jsx as jsx53 } from "react/jsx-runtime";
12690
- import { jsx as jsx63, jsxs as jsxs23 } from "react/jsx-runtime";
12691
- import { jsx as jsx73 } from "react/jsx-runtime";
12692
- import * as React322 from "react";
12693
- import * as ReactDOM4 from "react-dom";
12694
- import React7 from "react";
12695
- import * as React42 from "react";
12720
+ import { jsx as jsx63 } from "react/jsx-runtime";
12721
+ import { jsx as jsx73, jsxs as jsxs32 } from "react/jsx-runtime";
12722
+ import React52 from "react";
12696
12723
  import { jsx as jsx83 } from "react/jsx-runtime";
12697
- import * as React52 from "react";
12724
+ import { jsx as jsx93 } from "react/jsx-runtime";
12725
+ import * as React34 from "react";
12726
+ import * as ReactDOM4 from "react-dom";
12727
+ import React9 from "react";
12698
12728
  import * as React62 from "react";
12699
- import { Fragment as Fragment2, jsx as jsx93 } from "react/jsx-runtime";
12700
12729
  import { jsx as jsx103 } from "react/jsx-runtime";
12730
+ import * as React72 from "react";
12701
12731
  import * as React8 from "react";
12702
- import { jsx as jsx112 } from "react/jsx-runtime";
12703
- import * as React12 from "react";
12704
- import * as React9 from "react";
12705
- import * as ReactDOM from "react-dom";
12732
+ import { Fragment as Fragment2, jsx as jsx112 } from "react/jsx-runtime";
12706
12733
  import { jsx as jsx122 } from "react/jsx-runtime";
12707
- import * as React102 from "react";
12708
- import * as React112 from "react";
12734
+ import * as React10 from "react";
12709
12735
  import { jsx as jsx132 } from "react/jsx-runtime";
12710
- import * as React13 from "react";
12711
- import * as React142 from "react";
12736
+ import * as React14 from "react";
12737
+ import * as React112 from "react";
12738
+ import * as ReactDOM from "react-dom";
12712
12739
  import { jsx as jsx142 } from "react/jsx-runtime";
12713
- import * as React162 from "react";
12740
+ import * as React122 from "react";
12741
+ import * as React13 from "react";
12742
+ import { jsx as jsx152 } from "react/jsx-runtime";
12714
12743
  import * as React152 from "react";
12715
- import * as React20 from "react";
12716
- import * as React172 from "react";
12717
- import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect72 } from "react";
12718
- import * as ReactDOM2 from "react-dom";
12744
+ import * as React162 from "react";
12745
+ import { jsx as jsx162 } from "react/jsx-runtime";
12719
12746
  import * as React18 from "react";
12720
- import { jsx as jsx152 } from "react/jsx-runtime";
12747
+ import * as React172 from "react";
12748
+ import * as React22 from "react";
12721
12749
  import * as React19 from "react";
12722
- import { jsx as jsx162 } from "react/jsx-runtime";
12723
- import * as React212 from "react";
12724
- import ReactDOM3 from "react-dom";
12750
+ import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
12751
+ import * as ReactDOM2 from "react-dom";
12752
+ import * as React20 from "react";
12725
12753
  import { jsx as jsx172 } from "react/jsx-runtime";
12726
- import * as React22 from "react";
12754
+ import * as React212 from "react";
12755
+ import { jsx as jsx182 } from "react/jsx-runtime";
12727
12756
  import * as React23 from "react";
12757
+ import ReactDOM3 from "react-dom";
12758
+ import { jsx as jsx192 } from "react/jsx-runtime";
12728
12759
  import * as React24 from "react";
12729
- import { jsx as jsx182 } from "react/jsx-runtime";
12730
- import * as React312 from "react";
12731
- import * as React272 from "react";
12732
- import { useState as useState112 } from "react";
12733
12760
  import * as React252 from "react";
12734
12761
  import * as React26 from "react";
12735
- import * as React30 from "react";
12762
+ import { jsx as jsx202 } from "react/jsx-runtime";
12763
+ import * as React332 from "react";
12736
12764
  import * as React29 from "react";
12765
+ import { useState as useState112 } from "react";
12766
+ import * as React272 from "react";
12737
12767
  import * as React28 from "react";
12738
- import { Fragment as Fragment52, jsx as jsx192, jsxs as jsxs32 } from "react/jsx-runtime";
12768
+ import * as React322 from "react";
12769
+ import * as React312 from "react";
12770
+ import * as React30 from "react";
12771
+ import { Fragment as Fragment52, jsx as jsx212, jsxs as jsxs4 } from "react/jsx-runtime";
12739
12772
  import { forwardRef as forwardRef132, createElement as createElement7 } from "react";
12740
12773
  import { forwardRef as forwardRef122, createElement as createElement6 } from "react";
12741
- import * as React332 from "react";
12742
- import { jsx as jsx202, jsxs as jsxs4 } from "react/jsx-runtime";
12743
- import { jsx as jsx212 } from "react/jsx-runtime";
12744
- import { jsx as jsx223 } from "react/jsx-runtime";
12774
+ import * as React352 from "react";
12775
+ import { jsx as jsx223, jsxs as jsxs5 } from "react/jsx-runtime";
12776
+ import { jsx as jsx232 } from "react/jsx-runtime";
12777
+ import { jsx as jsx242 } from "react/jsx-runtime";
12745
12778
  function cn(...inputs) {
12746
12779
  return twMerge(clsx(inputs));
12747
12780
  }
@@ -12760,7 +12793,7 @@ var getChildNodeFrom = (htmlElement) => {
12760
12793
  return childNode;
12761
12794
  };
12762
12795
  var useHoverTransforms = (ref, disabled) => {
12763
- const [state, setState] = React6.useState({
12796
+ const [state, setState] = React7.useState({
12764
12797
  progress: 0,
12765
12798
  isActive: false
12766
12799
  });
@@ -12772,7 +12805,7 @@ var useHoverTransforms = (ref, disabled) => {
12772
12805
  eventTarget.dispatchEvent(new Event("enabled"));
12773
12806
  }
12774
12807
  }, [disabled, eventTarget]);
12775
- React6.useEffect(() => {
12808
+ React7.useEffect(() => {
12776
12809
  const element = ref.current;
12777
12810
  if (!element)
12778
12811
  return;
@@ -12847,8 +12880,8 @@ var useHoverTransforms = (ref, disabled) => {
12847
12880
  return state;
12848
12881
  };
12849
12882
  var useClickTransforms = (ref) => {
12850
- const [hoverProgress, setHoverProgress] = React6.useState(0);
12851
- React6.useEffect(() => {
12883
+ const [hoverProgress, setHoverProgress] = React7.useState(0);
12884
+ React7.useEffect(() => {
12852
12885
  const element = getChildNodeFrom(ref.current);
12853
12886
  if (!element) {
12854
12887
  return;
@@ -13021,10 +13054,56 @@ var Outer = ({
13021
13054
  ]
13022
13055
  });
13023
13056
  };
13024
- var Button = ({ children, className, disabled, depth, ...buttonProps }) => {
13057
+ var viewBox = 100;
13058
+ var lines = 8;
13059
+ var translated2 = "M 44 0 L 50 0 a 6 6 0 0 1 6 6 L 56 26 a 6 6 0 0 1 -6 6 L 50 32 a 6 6 0 0 1 -6 -6 L 44 6 a 6 6 0 0 1 6 -6 Z";
13060
+ var Spinner = ({ size, duration }) => {
13061
+ const style = useMemo210(() => {
13062
+ return {
13063
+ width: size,
13064
+ height: size
13065
+ };
13066
+ }, [size]);
13067
+ const pathsRef = useRef18([]);
13068
+ useEffect24(() => {
13069
+ const animate = () => {
13070
+ const now = performance.now();
13071
+ for (let index = 0;index < lines; index++) {
13072
+ const path = pathsRef.current[index];
13073
+ if (!path)
13074
+ continue;
13075
+ const progress = (now / 1000 - index * (duration / lines)) % duration / duration;
13076
+ const opacity = 1 - 0.85 * progress;
13077
+ path.style.opacity = opacity.toString();
13078
+ }
13079
+ requestAnimationFrame(animate);
13080
+ };
13081
+ const id = requestAnimationFrame(animate);
13082
+ return () => {
13083
+ cancelAnimationFrame(id);
13084
+ };
13085
+ }, [duration]);
13086
+ return /* @__PURE__ */ jsx38("svg", {
13087
+ style,
13088
+ viewBox: `0 0 ${viewBox} ${viewBox}`,
13089
+ children: new Array(lines).fill(true).map((_, index) => {
13090
+ return /* @__PURE__ */ jsx38("path", {
13091
+ ref: (el) => pathsRef.current[index] = el,
13092
+ style: {
13093
+ rotate: `${index * Math.PI * 2 / lines}rad`,
13094
+ transformOrigin: "center center",
13095
+ opacity: 1
13096
+ },
13097
+ d: translated2,
13098
+ fill: "currentColor"
13099
+ }, index);
13100
+ })
13101
+ });
13102
+ };
13103
+ var Button = ({ children, className, disabled, depth, loading, ...buttonProps }) => {
13025
13104
  const [dimensions, setDimensions] = useState22(null);
13026
- const ref = useRef18(null);
13027
- const { isActive, progress } = useHoverTransforms(ref, Boolean(disabled));
13105
+ const ref = useRef22(null);
13106
+ const { isActive, progress } = useHoverTransforms(ref, Boolean(disabled || loading));
13028
13107
  const onPointerEnter = useCallback18((e) => {
13029
13108
  if (e.pointerType !== "mouse") {
13030
13109
  return;
@@ -13059,18 +13138,30 @@ var Button = ({ children, className, disabled, depth, ...buttonProps }) => {
13059
13138
  };
13060
13139
  });
13061
13140
  }, []);
13062
- const content = /* @__PURE__ */ jsx38("button", {
13141
+ const content = /* @__PURE__ */ jsxs23("button", {
13063
13142
  type: "button",
13064
- disabled,
13065
- className: cn("text-text", "flex", "justify-center", "bg-button-bg", "items-center", "font-brand", "border-solid", "text-[1em]", "rounded-lg", "border-black", "border-2", "border-b-4", "cursor-pointer", "px-4", "h-12", "flex", "flex-row", "items-center", "disabled:cursor-default", "disabled:border-gray-500", "disabled:text-gray-500", className),
13143
+ disabled: disabled || loading,
13144
+ className: cn("text-text", "flex", "justify-center", "bg-button-bg", "items-center", "font-brand", "border-solid", "text-[1em]", "rounded-lg", "border-black", "border-2", "border-b-4", "cursor-pointer", "px-4", "h-12", "flex", "flex-row", "items-center", "disabled:cursor-default", "disabled:opacity-50", "relative", "overflow-hidden", className),
13066
13145
  ...buttonProps,
13067
- children
13146
+ children: [
13147
+ /* @__PURE__ */ jsx43("div", {
13148
+ className: cn(loading && "invisible"),
13149
+ children
13150
+ }),
13151
+ loading ? /* @__PURE__ */ jsx43("div", {
13152
+ className: cn("absolute w-full h-full flex inset-0 items-center justify-center text-inherit bg-inherit"),
13153
+ children: /* @__PURE__ */ jsx43(Spinner, {
13154
+ size: 20,
13155
+ duration: 1
13156
+ })
13157
+ }) : null
13158
+ ]
13068
13159
  });
13069
- return /* @__PURE__ */ jsx38("div", {
13160
+ return /* @__PURE__ */ jsx43("div", {
13070
13161
  ref,
13071
13162
  className: "contents",
13072
13163
  onPointerEnter,
13073
- children: dimensions && (isActive || progress > 0) ? /* @__PURE__ */ jsx38(Outer, {
13164
+ children: dimensions && (isActive || progress > 0) ? /* @__PURE__ */ jsx43(Outer, {
13074
13165
  parentRef: ref,
13075
13166
  width: dimensions.width,
13076
13167
  height: dimensions.height,
@@ -13081,8 +13172,8 @@ var Button = ({ children, className, disabled, depth, ...buttonProps }) => {
13081
13172
  }) : content
13082
13173
  });
13083
13174
  };
13084
- var Card = React34.forwardRef(({ children, className, ...rest }, ref) => {
13085
- return /* @__PURE__ */ jsx43("div", {
13175
+ var Card = React42.forwardRef(({ children, className, ...rest }, ref) => {
13176
+ return /* @__PURE__ */ jsx53("div", {
13086
13177
  ref,
13087
13178
  className: cn("rounded-lg border-2 border-black bg-card-bg text-text border-b-4", className),
13088
13179
  ...rest,
@@ -13092,18 +13183,18 @@ var Card = React34.forwardRef(({ children, className, ...rest }, ref) => {
13092
13183
  Card.displayName = "Card";
13093
13184
  var d = "M143.056 81.4934C147.25 77.2994 147.25 70.4506 143.056 66.2566C138.862 62.0627 132.013 62.0627 127.819 66.2566L86.1875 107.888L69.1809 90.8816C64.9869 86.6877 58.1381 86.6877 53.9441 90.8816C49.7502 95.0756 49.7502 101.924 53.9441 106.118L78.5691 130.743C82.7631 134.937 89.6119 134.937 93.8059 130.743L143.056 81.4934Z";
13094
13185
  var CheckIcon = (props) => {
13095
- return /* @__PURE__ */ jsx53("svg", {
13186
+ return /* @__PURE__ */ jsx63("svg", {
13096
13187
  ...props,
13097
13188
  viewBox: "50.79867500000001 63.11117499999997 95.40282500000015 70.77732499999999",
13098
13189
  fill: "none",
13099
13190
  xmlns: "http://www.w3.org/2000/svg",
13100
- children: /* @__PURE__ */ jsx53("path", {
13191
+ children: /* @__PURE__ */ jsx63("path", {
13101
13192
  d,
13102
13193
  fill: "currentcolor"
13103
13194
  })
13104
13195
  });
13105
13196
  };
13106
- var Triangle = ({ rotated: rotated2 }) => /* @__PURE__ */ jsx63("svg", {
13197
+ var Triangle = ({ rotated: rotated2 }) => /* @__PURE__ */ jsx73("svg", {
13107
13198
  width: "12px",
13108
13199
  height: "7px",
13109
13200
  viewBox: "0 0 12 7",
@@ -13111,7 +13202,7 @@ var Triangle = ({ rotated: rotated2 }) => /* @__PURE__ */ jsx63("svg", {
13111
13202
  style: {
13112
13203
  transform: rotated2 ? "rotate(180deg)" : "rotate(0deg)"
13113
13204
  },
13114
- children: /* @__PURE__ */ jsx63("path", {
13205
+ children: /* @__PURE__ */ jsx73("path", {
13115
13206
  className: "fill-text",
13116
13207
  d: "M7.17096 0.475588C6.73198 0.0764969 6.01906 0.0764969 5.58007 0.475588L1.08483 4.56228C0.761737 4.85601 0.666915 5.29341 0.84251 5.67654C1.01811 6.05966 1.42549 6.3087 1.88203 6.3087H10.8725C11.3255 6.3087 11.7364 6.05966 11.912 5.67654C12.0876 5.29341 11.9893 4.85601 11.6697 4.56228L7.17448 0.475588H7.17096Z"
13117
13208
  })
@@ -13146,11 +13237,11 @@ var Counter = ({
13146
13237
  const increment = () => {
13147
13238
  setCount(count + step);
13148
13239
  };
13149
- return /* @__PURE__ */ jsxs23(Card, {
13240
+ return /* @__PURE__ */ jsxs32(Card, {
13150
13241
  style: container2,
13151
13242
  className: cn("w-[140px] flex flex-row overflow-hidden"),
13152
13243
  children: [
13153
- /* @__PURE__ */ jsx63("input", {
13244
+ /* @__PURE__ */ jsx73("input", {
13154
13245
  className: "fontbrand text-2xl font-medium min-w-[80px] border-0 text-end outline-0 text-text overflow-hidden flex-1 px-0 py-0 pr-2 w-full h-full tabular-nums",
13155
13246
  type: "number",
13156
13247
  onClick: (e) => e.currentTarget.select(),
@@ -13170,28 +13261,28 @@ var Counter = ({
13170
13261
  }
13171
13262
  }
13172
13263
  }),
13173
- /* @__PURE__ */ jsxs23("div", {
13264
+ /* @__PURE__ */ jsxs32("div", {
13174
13265
  className: "flex flex-col h-full",
13175
13266
  children: [
13176
- /* @__PURE__ */ jsx63("button", {
13267
+ /* @__PURE__ */ jsx73("button", {
13177
13268
  type: "button",
13178
13269
  className: "border-0 flex-1 p-0 pt-[5px] bg-transparent",
13179
13270
  style: {
13180
13271
  ...buttonContainer
13181
13272
  },
13182
13273
  onClick: increment,
13183
- children: /* @__PURE__ */ jsx63(Triangle, {
13274
+ children: /* @__PURE__ */ jsx73(Triangle, {
13184
13275
  rotated: false
13185
13276
  })
13186
13277
  }),
13187
- /* @__PURE__ */ jsx63("button", {
13278
+ /* @__PURE__ */ jsx73("button", {
13188
13279
  type: "button",
13189
13280
  className: "border-0 flex-1 p-0 bg-transparent pb-[5px] pl-[1px]",
13190
13281
  style: {
13191
13282
  ...buttonContainer
13192
13283
  },
13193
13284
  onClick: decrement,
13194
- children: /* @__PURE__ */ jsx63(Triangle, {
13285
+ children: /* @__PURE__ */ jsx73(Triangle, {
13195
13286
  rotated: true
13196
13287
  })
13197
13288
  })
@@ -13200,12 +13291,20 @@ var Counter = ({
13200
13291
  ]
13201
13292
  });
13202
13293
  };
13294
+ var Input = React52.forwardRef(({ className, ...props }, ref) => {
13295
+ return /* @__PURE__ */ jsx83("input", {
13296
+ ref,
13297
+ className: cn("w-full dark:bg-[#121212] rounded-lg border-2 border-b-4 border-black outline-none h-14 px-3 fontbrand text-lg box-border", className),
13298
+ ...props
13299
+ });
13300
+ });
13301
+ Input.displayName = "Input";
13203
13302
  var PlanePaperIcon = (props) => {
13204
- return /* @__PURE__ */ jsx73("svg", {
13303
+ return /* @__PURE__ */ jsx93("svg", {
13205
13304
  xmlns: "http://www.w3.org/2000/svg",
13206
13305
  ...props,
13207
13306
  viewBox: "0 0 576 512",
13208
- children: /* @__PURE__ */ jsx73("path", {
13307
+ children: /* @__PURE__ */ jsx93("path", {
13209
13308
  fill: "currentcolor",
13210
13309
  d: "M169.9 280L94.9 448.6 461.2 280 169.9 280zm291.3-48L94.9 63.4 169.9 232 461.2 232zM34.8 465.6L128 256 34.8 46.4C33 42.2 32 37.6 32 33 32 14.8 46.7 0 64.8 0 69.5 0 74.2 1 78.5 3L554.2 222c13.3 6.1 21.8 19.4 21.8 34s-8.5 27.9-21.8 34L78.5 509c-4.3 2-9 3-13.7 3-18.1 0-32.8-14.8-32.8-33 0-4.6 1-9.2 2.8-13.4z"
13211
13310
  })
@@ -13225,18 +13324,18 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
13225
13324
  function createContextScope(scopeName, createContextScopeDeps = []) {
13226
13325
  let defaultContexts = [];
13227
13326
  function createContext32(rootComponentName, defaultContext) {
13228
- const BaseContext = React42.createContext(defaultContext);
13327
+ const BaseContext = React62.createContext(defaultContext);
13229
13328
  const index = defaultContexts.length;
13230
13329
  defaultContexts = [...defaultContexts, defaultContext];
13231
13330
  function Provider(props) {
13232
13331
  const { scope, children, ...context } = props;
13233
13332
  const Context = scope?.[scopeName][index] || BaseContext;
13234
- const value = React42.useMemo(() => context, Object.values(context));
13235
- return /* @__PURE__ */ jsx83(Context.Provider, { value, children });
13333
+ const value = React62.useMemo(() => context, Object.values(context));
13334
+ return /* @__PURE__ */ jsx103(Context.Provider, { value, children });
13236
13335
  }
13237
13336
  function useContext210(consumerName, scope) {
13238
13337
  const Context = scope?.[scopeName][index] || BaseContext;
13239
- const context = React42.useContext(Context);
13338
+ const context = React62.useContext(Context);
13240
13339
  if (context)
13241
13340
  return context;
13242
13341
  if (defaultContext !== undefined)
@@ -13248,11 +13347,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
13248
13347
  }
13249
13348
  const createScope = () => {
13250
13349
  const scopeContexts = defaultContexts.map((defaultContext) => {
13251
- return React42.createContext(defaultContext);
13350
+ return React62.createContext(defaultContext);
13252
13351
  });
13253
13352
  return function useScope(scope) {
13254
13353
  const contexts = scope?.[scopeName] || scopeContexts;
13255
- return React42.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
13354
+ return React62.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
13256
13355
  };
13257
13356
  };
13258
13357
  createScope.scopeName = scopeName;
@@ -13273,7 +13372,7 @@ function composeContextScopes(...scopes) {
13273
13372
  const currentScope = scopeProps[`__scope${scopeName}`];
13274
13373
  return { ...nextScopes2, ...currentScope };
13275
13374
  }, {});
13276
- return React42.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
13375
+ return React62.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
13277
13376
  };
13278
13377
  };
13279
13378
  createScope.scopeName = baseScope.scopeName;
@@ -13290,45 +13389,45 @@ function composeRefs(...refs) {
13290
13389
  return (node) => refs.forEach((ref) => setRef(ref, node));
13291
13390
  }
13292
13391
  function useComposedRefs(...refs) {
13293
- return React52.useCallback(composeRefs(...refs), refs);
13392
+ return React72.useCallback(composeRefs(...refs), refs);
13294
13393
  }
13295
- var Slot = React62.forwardRef((props, forwardedRef) => {
13394
+ var Slot = React8.forwardRef((props, forwardedRef) => {
13296
13395
  const { children, ...slotProps } = props;
13297
- const childrenArray = React62.Children.toArray(children);
13396
+ const childrenArray = React8.Children.toArray(children);
13298
13397
  const slottable = childrenArray.find(isSlottable);
13299
13398
  if (slottable) {
13300
13399
  const newElement = slottable.props.children;
13301
13400
  const newChildren = childrenArray.map((child) => {
13302
13401
  if (child === slottable) {
13303
- if (React62.Children.count(newElement) > 1)
13304
- return React62.Children.only(null);
13305
- return React62.isValidElement(newElement) ? newElement.props.children : null;
13402
+ if (React8.Children.count(newElement) > 1)
13403
+ return React8.Children.only(null);
13404
+ return React8.isValidElement(newElement) ? newElement.props.children : null;
13306
13405
  } else {
13307
13406
  return child;
13308
13407
  }
13309
13408
  });
13310
- return /* @__PURE__ */ jsx93(SlotClone, { ...slotProps, ref: forwardedRef, children: React62.isValidElement(newElement) ? React62.cloneElement(newElement, undefined, newChildren) : null });
13409
+ return /* @__PURE__ */ jsx112(SlotClone, { ...slotProps, ref: forwardedRef, children: React8.isValidElement(newElement) ? React8.cloneElement(newElement, undefined, newChildren) : null });
13311
13410
  }
13312
- return /* @__PURE__ */ jsx93(SlotClone, { ...slotProps, ref: forwardedRef, children });
13411
+ return /* @__PURE__ */ jsx112(SlotClone, { ...slotProps, ref: forwardedRef, children });
13313
13412
  });
13314
13413
  Slot.displayName = "Slot";
13315
- var SlotClone = React62.forwardRef((props, forwardedRef) => {
13414
+ var SlotClone = React8.forwardRef((props, forwardedRef) => {
13316
13415
  const { children, ...slotProps } = props;
13317
- if (React62.isValidElement(children)) {
13416
+ if (React8.isValidElement(children)) {
13318
13417
  const childrenRef = getElementRef(children);
13319
- return React62.cloneElement(children, {
13418
+ return React8.cloneElement(children, {
13320
13419
  ...mergeProps(slotProps, children.props),
13321
13420
  ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
13322
13421
  });
13323
13422
  }
13324
- return React62.Children.count(children) > 1 ? React62.Children.only(null) : null;
13423
+ return React8.Children.count(children) > 1 ? React8.Children.only(null) : null;
13325
13424
  });
13326
13425
  SlotClone.displayName = "SlotClone";
13327
13426
  var Slottable = ({ children }) => {
13328
- return /* @__PURE__ */ jsx93(Fragment2, { children });
13427
+ return /* @__PURE__ */ jsx112(Fragment2, { children });
13329
13428
  };
13330
13429
  function isSlottable(child) {
13331
- return React62.isValidElement(child) && child.type === Slottable;
13430
+ return React8.isValidElement(child) && child.type === Slottable;
13332
13431
  }
13333
13432
  function mergeProps(slotProps, childProps) {
13334
13433
  const overrideProps = { ...childProps };
@@ -13372,36 +13471,36 @@ function createCollection(name) {
13372
13471
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
13373
13472
  const CollectionProvider = (props) => {
13374
13473
  const { scope, children } = props;
13375
- const ref = React7.useRef(null);
13376
- const itemMap = React7.useRef(/* @__PURE__ */ new Map).current;
13377
- return /* @__PURE__ */ jsx103(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
13474
+ const ref = React9.useRef(null);
13475
+ const itemMap = React9.useRef(/* @__PURE__ */ new Map).current;
13476
+ return /* @__PURE__ */ jsx122(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
13378
13477
  };
13379
13478
  CollectionProvider.displayName = PROVIDER_NAME;
13380
13479
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
13381
- const CollectionSlot = React7.forwardRef((props, forwardedRef) => {
13480
+ const CollectionSlot = React9.forwardRef((props, forwardedRef) => {
13382
13481
  const { scope, children } = props;
13383
13482
  const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
13384
13483
  const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
13385
- return /* @__PURE__ */ jsx103(Slot, { ref: composedRefs, children });
13484
+ return /* @__PURE__ */ jsx122(Slot, { ref: composedRefs, children });
13386
13485
  });
13387
13486
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
13388
13487
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
13389
13488
  const ITEM_DATA_ATTR = "data-radix-collection-item";
13390
- const CollectionItemSlot = React7.forwardRef((props, forwardedRef) => {
13489
+ const CollectionItemSlot = React9.forwardRef((props, forwardedRef) => {
13391
13490
  const { scope, children, ...itemData } = props;
13392
- const ref = React7.useRef(null);
13491
+ const ref = React9.useRef(null);
13393
13492
  const composedRefs = useComposedRefs(forwardedRef, ref);
13394
13493
  const context = useCollectionContext(ITEM_SLOT_NAME, scope);
13395
- React7.useEffect(() => {
13494
+ React9.useEffect(() => {
13396
13495
  context.itemMap.set(ref, { ref, ...itemData });
13397
13496
  return () => void context.itemMap.delete(ref);
13398
13497
  });
13399
- return /* @__PURE__ */ jsx103(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
13498
+ return /* @__PURE__ */ jsx122(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
13400
13499
  });
13401
13500
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
13402
13501
  function useCollection(scope) {
13403
13502
  const context = useCollectionContext(name + "CollectionConsumer", scope);
13404
- const getItems = React7.useCallback(() => {
13503
+ const getItems = React9.useCallback(() => {
13405
13504
  const collectionNode = context.collectionRef.current;
13406
13505
  if (!collectionNode)
13407
13506
  return [];
@@ -13418,9 +13517,9 @@ function createCollection(name) {
13418
13517
  createCollectionScope
13419
13518
  ];
13420
13519
  }
13421
- var DirectionContext = React8.createContext(undefined);
13520
+ var DirectionContext = React10.createContext(undefined);
13422
13521
  function useDirection(localDir) {
13423
- const globalDir = React8.useContext(DirectionContext);
13522
+ const globalDir = React10.useContext(DirectionContext);
13424
13523
  return localDir || globalDir || "ltr";
13425
13524
  }
13426
13525
  var NODES = [
@@ -13442,13 +13541,13 @@ var NODES = [
13442
13541
  "ul"
13443
13542
  ];
13444
13543
  var Primitive = NODES.reduce((primitive, node) => {
13445
- const Node2 = React9.forwardRef((props, forwardedRef) => {
13544
+ const Node2 = React112.forwardRef((props, forwardedRef) => {
13446
13545
  const { asChild, ...primitiveProps } = props;
13447
13546
  const Comp = asChild ? Slot : node;
13448
13547
  if (typeof window !== "undefined") {
13449
13548
  window[Symbol.for("radix-ui")] = true;
13450
13549
  }
13451
- return /* @__PURE__ */ jsx122(Comp, { ...primitiveProps, ref: forwardedRef });
13550
+ return /* @__PURE__ */ jsx142(Comp, { ...primitiveProps, ref: forwardedRef });
13452
13551
  });
13453
13552
  Node2.displayName = `Primitive.${node}`;
13454
13553
  return { ...primitive, [node]: Node2 };
@@ -13458,15 +13557,15 @@ function dispatchDiscreteCustomEvent(target, event) {
13458
13557
  ReactDOM.flushSync(() => target.dispatchEvent(event));
13459
13558
  }
13460
13559
  function useCallbackRef(callback) {
13461
- const callbackRef = React102.useRef(callback);
13462
- React102.useEffect(() => {
13560
+ const callbackRef = React122.useRef(callback);
13561
+ React122.useEffect(() => {
13463
13562
  callbackRef.current = callback;
13464
13563
  });
13465
- return React102.useMemo(() => (...args) => callbackRef.current?.(...args), []);
13564
+ return React122.useMemo(() => (...args) => callbackRef.current?.(...args), []);
13466
13565
  }
13467
13566
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
13468
13567
  const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
13469
- React112.useEffect(() => {
13568
+ React13.useEffect(() => {
13470
13569
  const handleKeyDown = (event) => {
13471
13570
  if (event.key === "Escape") {
13472
13571
  onEscapeKeyDown(event);
@@ -13481,12 +13580,12 @@ var CONTEXT_UPDATE = "dismissableLayer.update";
13481
13580
  var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
13482
13581
  var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
13483
13582
  var originalBodyPointerEvents;
13484
- var DismissableLayerContext = React12.createContext({
13583
+ var DismissableLayerContext = React14.createContext({
13485
13584
  layers: /* @__PURE__ */ new Set,
13486
13585
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set,
13487
13586
  branches: /* @__PURE__ */ new Set
13488
13587
  });
13489
- var DismissableLayer = React12.forwardRef((props, forwardedRef) => {
13588
+ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
13490
13589
  const {
13491
13590
  disableOutsidePointerEvents = false,
13492
13591
  onEscapeKeyDown,
@@ -13496,10 +13595,10 @@ var DismissableLayer = React12.forwardRef((props, forwardedRef) => {
13496
13595
  onDismiss,
13497
13596
  ...layerProps
13498
13597
  } = props;
13499
- const context = React12.useContext(DismissableLayerContext);
13500
- const [node, setNode] = React12.useState(null);
13598
+ const context = React14.useContext(DismissableLayerContext);
13599
+ const [node, setNode] = React14.useState(null);
13501
13600
  const ownerDocument = node?.ownerDocument ?? globalThis?.document;
13502
- const [, force] = React12.useState({});
13601
+ const [, force] = React14.useState({});
13503
13602
  const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
13504
13603
  const layers = Array.from(context.layers);
13505
13604
  const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
@@ -13537,7 +13636,7 @@ var DismissableLayer = React12.forwardRef((props, forwardedRef) => {
13537
13636
  onDismiss();
13538
13637
  }
13539
13638
  }, ownerDocument);
13540
- React12.useEffect(() => {
13639
+ React14.useEffect(() => {
13541
13640
  if (!node)
13542
13641
  return;
13543
13642
  if (disableOutsidePointerEvents) {
@@ -13555,7 +13654,7 @@ var DismissableLayer = React12.forwardRef((props, forwardedRef) => {
13555
13654
  }
13556
13655
  };
13557
13656
  }, [node, ownerDocument, disableOutsidePointerEvents, context]);
13558
- React12.useEffect(() => {
13657
+ React14.useEffect(() => {
13559
13658
  return () => {
13560
13659
  if (!node)
13561
13660
  return;
@@ -13564,12 +13663,12 @@ var DismissableLayer = React12.forwardRef((props, forwardedRef) => {
13564
13663
  dispatchUpdate();
13565
13664
  };
13566
13665
  }, [node, context]);
13567
- React12.useEffect(() => {
13666
+ React14.useEffect(() => {
13568
13667
  const handleUpdate = () => force({});
13569
13668
  document.addEventListener(CONTEXT_UPDATE, handleUpdate);
13570
13669
  return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
13571
13670
  }, []);
13572
- return /* @__PURE__ */ jsx132(Primitive.div, {
13671
+ return /* @__PURE__ */ jsx152(Primitive.div, {
13573
13672
  ...layerProps,
13574
13673
  ref: composedRefs,
13575
13674
  style: {
@@ -13583,11 +13682,11 @@ var DismissableLayer = React12.forwardRef((props, forwardedRef) => {
13583
13682
  });
13584
13683
  DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
13585
13684
  var BRANCH_NAME = "DismissableLayerBranch";
13586
- var DismissableLayerBranch = React12.forwardRef((props, forwardedRef) => {
13587
- const context = React12.useContext(DismissableLayerContext);
13588
- const ref = React12.useRef(null);
13685
+ var DismissableLayerBranch = React14.forwardRef((props, forwardedRef) => {
13686
+ const context = React14.useContext(DismissableLayerContext);
13687
+ const ref = React14.useRef(null);
13589
13688
  const composedRefs = useComposedRefs(forwardedRef, ref);
13590
- React12.useEffect(() => {
13689
+ React14.useEffect(() => {
13591
13690
  const node = ref.current;
13592
13691
  if (node) {
13593
13692
  context.branches.add(node);
@@ -13596,14 +13695,14 @@ var DismissableLayerBranch = React12.forwardRef((props, forwardedRef) => {
13596
13695
  };
13597
13696
  }
13598
13697
  }, [context.branches]);
13599
- return /* @__PURE__ */ jsx132(Primitive.div, { ...props, ref: composedRefs });
13698
+ return /* @__PURE__ */ jsx152(Primitive.div, { ...props, ref: composedRefs });
13600
13699
  });
13601
13700
  DismissableLayerBranch.displayName = BRANCH_NAME;
13602
13701
  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
13603
13702
  const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
13604
- const isPointerInsideReactTreeRef = React12.useRef(false);
13605
- const handleClickRef = React12.useRef(() => {});
13606
- React12.useEffect(() => {
13703
+ const isPointerInsideReactTreeRef = React14.useRef(false);
13704
+ const handleClickRef = React14.useRef(() => {});
13705
+ React14.useEffect(() => {
13607
13706
  const handlePointerDown = (event) => {
13608
13707
  if (event.target && !isPointerInsideReactTreeRef.current) {
13609
13708
  let handleAndDispatchPointerDownOutsideEvent2 = function() {
@@ -13638,8 +13737,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
13638
13737
  }
13639
13738
  function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
13640
13739
  const handleFocusOutside = useCallbackRef(onFocusOutside);
13641
- const isFocusInsideReactTreeRef = React12.useRef(false);
13642
- React12.useEffect(() => {
13740
+ const isFocusInsideReactTreeRef = React14.useRef(false);
13741
+ React14.useEffect(() => {
13643
13742
  const handleFocus = (event) => {
13644
13743
  if (event.target && !isFocusInsideReactTreeRef.current) {
13645
13744
  const eventDetail = { originalEvent: event };
@@ -13673,7 +13772,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
13673
13772
  }
13674
13773
  var count = 0;
13675
13774
  function useFocusGuards() {
13676
- React13.useEffect(() => {
13775
+ React152.useEffect(() => {
13677
13776
  const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
13678
13777
  document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
13679
13778
  document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
@@ -13697,7 +13796,7 @@ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
13697
13796
  var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
13698
13797
  var EVENT_OPTIONS = { bubbles: false, cancelable: true };
13699
13798
  var FOCUS_SCOPE_NAME = "FocusScope";
13700
- var FocusScope = React142.forwardRef((props, forwardedRef) => {
13799
+ var FocusScope = React162.forwardRef((props, forwardedRef) => {
13701
13800
  const {
13702
13801
  loop = false,
13703
13802
  trapped = false,
@@ -13705,12 +13804,12 @@ var FocusScope = React142.forwardRef((props, forwardedRef) => {
13705
13804
  onUnmountAutoFocus: onUnmountAutoFocusProp,
13706
13805
  ...scopeProps
13707
13806
  } = props;
13708
- const [container22, setContainer] = React142.useState(null);
13807
+ const [container22, setContainer] = React162.useState(null);
13709
13808
  const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
13710
13809
  const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
13711
- const lastFocusedElementRef = React142.useRef(null);
13810
+ const lastFocusedElementRef = React162.useRef(null);
13712
13811
  const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
13713
- const focusScope = React142.useRef({
13812
+ const focusScope = React162.useRef({
13714
13813
  paused: false,
13715
13814
  pause() {
13716
13815
  this.paused = true;
@@ -13719,7 +13818,7 @@ var FocusScope = React142.forwardRef((props, forwardedRef) => {
13719
13818
  this.paused = false;
13720
13819
  }
13721
13820
  }).current;
13722
- React142.useEffect(() => {
13821
+ React162.useEffect(() => {
13723
13822
  if (trapped) {
13724
13823
  let handleFocusIn2 = function(event) {
13725
13824
  if (focusScope.paused || !container22)
@@ -13761,7 +13860,7 @@ var FocusScope = React142.forwardRef((props, forwardedRef) => {
13761
13860
  };
13762
13861
  }
13763
13862
  }, [trapped, container22, focusScope.paused]);
13764
- React142.useEffect(() => {
13863
+ React162.useEffect(() => {
13765
13864
  if (container22) {
13766
13865
  focusScopesStack.add(focusScope);
13767
13866
  const previouslyFocusedElement = document.activeElement;
@@ -13792,7 +13891,7 @@ var FocusScope = React142.forwardRef((props, forwardedRef) => {
13792
13891
  };
13793
13892
  }
13794
13893
  }, [container22, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
13795
- const handleKeyDown = React142.useCallback((event) => {
13894
+ const handleKeyDown = React162.useCallback((event) => {
13796
13895
  if (!loop && !trapped)
13797
13896
  return;
13798
13897
  if (focusScope.paused)
@@ -13819,7 +13918,7 @@ var FocusScope = React142.forwardRef((props, forwardedRef) => {
13819
13918
  }
13820
13919
  }
13821
13920
  }, [loop, trapped, focusScope.paused]);
13822
- return /* @__PURE__ */ jsx142(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
13921
+ return /* @__PURE__ */ jsx162(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
13823
13922
  });
13824
13923
  FocusScope.displayName = FOCUS_SCOPE_NAME;
13825
13924
  function focusFirst(candidates, { select = false } = {}) {
@@ -13908,13 +14007,13 @@ function arrayRemove(array, item) {
13908
14007
  function removeLinks(items) {
13909
14008
  return items.filter((item) => item.tagName !== "A");
13910
14009
  }
13911
- var useLayoutEffect22 = Boolean(globalThis?.document) ? React152.useLayoutEffect : () => {};
13912
- var useReactId = React162["useId".toString()] || (() => {
14010
+ var useLayoutEffect22 = Boolean(globalThis?.document) ? React172.useLayoutEffect : () => {};
14011
+ var useReactId = React18["useId".toString()] || (() => {
13913
14012
  return;
13914
14013
  });
13915
14014
  var count2 = 0;
13916
14015
  function useId(deterministicId) {
13917
- const [id, setId] = React162.useState(useReactId());
14016
+ const [id, setId] = React18.useState(useReactId());
13918
14017
  useLayoutEffect22(() => {
13919
14018
  if (!deterministicId)
13920
14019
  setId((reactId) => reactId ?? String(count2++));
@@ -15432,7 +15531,7 @@ var computePosition2 = (reference, floating, options) => {
15432
15531
  platform: platformWithCache
15433
15532
  });
15434
15533
  };
15435
- var index = typeof document !== "undefined" ? useLayoutEffect32 : useEffect72;
15534
+ var index = typeof document !== "undefined" ? useLayoutEffect32 : useEffect82;
15436
15535
  function deepEqual(a, b) {
15437
15536
  if (a === b) {
15438
15537
  return true;
@@ -15493,7 +15592,7 @@ function roundByDPR(element, value) {
15493
15592
  return Math.round(value * dpr) / dpr;
15494
15593
  }
15495
15594
  function useLatestRef(value) {
15496
- const ref = React172.useRef(value);
15595
+ const ref = React19.useRef(value);
15497
15596
  index(() => {
15498
15597
  ref.current = value;
15499
15598
  });
@@ -15516,7 +15615,7 @@ function useFloating(options) {
15516
15615
  whileElementsMounted,
15517
15616
  open
15518
15617
  } = options;
15519
- const [data, setData] = React172.useState({
15618
+ const [data, setData] = React19.useState({
15520
15619
  x: 0,
15521
15620
  y: 0,
15522
15621
  strategy,
@@ -15524,19 +15623,19 @@ function useFloating(options) {
15524
15623
  middlewareData: {},
15525
15624
  isPositioned: false
15526
15625
  });
15527
- const [latestMiddleware, setLatestMiddleware] = React172.useState(middleware);
15626
+ const [latestMiddleware, setLatestMiddleware] = React19.useState(middleware);
15528
15627
  if (!deepEqual(latestMiddleware, middleware)) {
15529
15628
  setLatestMiddleware(middleware);
15530
15629
  }
15531
- const [_reference, _setReference] = React172.useState(null);
15532
- const [_floating, _setFloating] = React172.useState(null);
15533
- const setReference = React172.useCallback((node) => {
15630
+ const [_reference, _setReference] = React19.useState(null);
15631
+ const [_floating, _setFloating] = React19.useState(null);
15632
+ const setReference = React19.useCallback((node) => {
15534
15633
  if (node !== referenceRef.current) {
15535
15634
  referenceRef.current = node;
15536
15635
  _setReference(node);
15537
15636
  }
15538
15637
  }, []);
15539
- const setFloating = React172.useCallback((node) => {
15638
+ const setFloating = React19.useCallback((node) => {
15540
15639
  if (node !== floatingRef.current) {
15541
15640
  floatingRef.current = node;
15542
15641
  _setFloating(node);
@@ -15544,13 +15643,13 @@ function useFloating(options) {
15544
15643
  }, []);
15545
15644
  const referenceEl = externalReference || _reference;
15546
15645
  const floatingEl = externalFloating || _floating;
15547
- const referenceRef = React172.useRef(null);
15548
- const floatingRef = React172.useRef(null);
15549
- const dataRef = React172.useRef(data);
15646
+ const referenceRef = React19.useRef(null);
15647
+ const floatingRef = React19.useRef(null);
15648
+ const dataRef = React19.useRef(data);
15550
15649
  const hasWhileElementsMounted = whileElementsMounted != null;
15551
15650
  const whileElementsMountedRef = useLatestRef(whileElementsMounted);
15552
15651
  const platformRef = useLatestRef(platform2);
15553
- const update = React172.useCallback(() => {
15652
+ const update = React19.useCallback(() => {
15554
15653
  if (!referenceRef.current || !floatingRef.current) {
15555
15654
  return;
15556
15655
  }
@@ -15584,7 +15683,7 @@ function useFloating(options) {
15584
15683
  }));
15585
15684
  }
15586
15685
  }, [open]);
15587
- const isMountedRef = React172.useRef(false);
15686
+ const isMountedRef = React19.useRef(false);
15588
15687
  index(() => {
15589
15688
  isMountedRef.current = true;
15590
15689
  return () => {
@@ -15603,17 +15702,17 @@ function useFloating(options) {
15603
15702
  update();
15604
15703
  }
15605
15704
  }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
15606
- const refs = React172.useMemo(() => ({
15705
+ const refs = React19.useMemo(() => ({
15607
15706
  reference: referenceRef,
15608
15707
  floating: floatingRef,
15609
15708
  setReference,
15610
15709
  setFloating
15611
15710
  }), [setReference, setFloating]);
15612
- const elements = React172.useMemo(() => ({
15711
+ const elements = React19.useMemo(() => ({
15613
15712
  reference: referenceEl,
15614
15713
  floating: floatingEl
15615
15714
  }), [referenceEl, floatingEl]);
15616
- const floatingStyles = React172.useMemo(() => {
15715
+ const floatingStyles = React19.useMemo(() => {
15617
15716
  const initialStyles = {
15618
15717
  position: strategy,
15619
15718
  left: 0,
@@ -15639,7 +15738,7 @@ function useFloating(options) {
15639
15738
  top: y
15640
15739
  };
15641
15740
  }, [strategy, transform, elements.floating, data.x, data.y]);
15642
- return React172.useMemo(() => ({
15741
+ return React19.useMemo(() => ({
15643
15742
  ...data,
15644
15743
  update,
15645
15744
  refs,
@@ -15707,22 +15806,22 @@ var arrow3 = (options, deps) => ({
15707
15806
  options: [options, deps]
15708
15807
  });
15709
15808
  var NAME = "Arrow";
15710
- var Arrow = React18.forwardRef((props, forwardedRef) => {
15809
+ var Arrow = React20.forwardRef((props, forwardedRef) => {
15711
15810
  const { children, width = 10, height = 5, ...arrowProps } = props;
15712
- return /* @__PURE__ */ jsx152(Primitive.svg, {
15811
+ return /* @__PURE__ */ jsx172(Primitive.svg, {
15713
15812
  ...arrowProps,
15714
15813
  ref: forwardedRef,
15715
15814
  width,
15716
15815
  height,
15717
15816
  viewBox: "0 0 30 10",
15718
15817
  preserveAspectRatio: "none",
15719
- children: props.asChild ? children : /* @__PURE__ */ jsx152("polygon", { points: "0,0 30,0 15,10" })
15818
+ children: props.asChild ? children : /* @__PURE__ */ jsx172("polygon", { points: "0,0 30,0 15,10" })
15720
15819
  });
15721
15820
  });
15722
15821
  Arrow.displayName = NAME;
15723
15822
  var Root2 = Arrow;
15724
15823
  function useSize(element) {
15725
- const [size4, setSize] = React19.useState(undefined);
15824
+ const [size4, setSize] = React212.useState(undefined);
15726
15825
  useLayoutEffect22(() => {
15727
15826
  if (element) {
15728
15827
  setSize({ width: element.offsetWidth, height: element.offsetHeight });
@@ -15760,25 +15859,25 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
15760
15859
  var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
15761
15860
  var Popper = (props) => {
15762
15861
  const { __scopePopper, children } = props;
15763
- const [anchor, setAnchor] = React20.useState(null);
15764
- return /* @__PURE__ */ jsx162(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
15862
+ const [anchor, setAnchor] = React22.useState(null);
15863
+ return /* @__PURE__ */ jsx182(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
15765
15864
  };
15766
15865
  Popper.displayName = POPPER_NAME;
15767
15866
  var ANCHOR_NAME = "PopperAnchor";
15768
- var PopperAnchor = React20.forwardRef((props, forwardedRef) => {
15867
+ var PopperAnchor = React22.forwardRef((props, forwardedRef) => {
15769
15868
  const { __scopePopper, virtualRef, ...anchorProps } = props;
15770
15869
  const context = usePopperContext(ANCHOR_NAME, __scopePopper);
15771
- const ref = React20.useRef(null);
15870
+ const ref = React22.useRef(null);
15772
15871
  const composedRefs = useComposedRefs(forwardedRef, ref);
15773
- React20.useEffect(() => {
15872
+ React22.useEffect(() => {
15774
15873
  context.onAnchorChange(virtualRef?.current || ref.current);
15775
15874
  });
15776
- return virtualRef ? null : /* @__PURE__ */ jsx162(Primitive.div, { ...anchorProps, ref: composedRefs });
15875
+ return virtualRef ? null : /* @__PURE__ */ jsx182(Primitive.div, { ...anchorProps, ref: composedRefs });
15777
15876
  });
15778
15877
  PopperAnchor.displayName = ANCHOR_NAME;
15779
15878
  var CONTENT_NAME = "PopperContent";
15780
15879
  var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
15781
- var PopperContent = React20.forwardRef((props, forwardedRef) => {
15880
+ var PopperContent = React22.forwardRef((props, forwardedRef) => {
15782
15881
  const {
15783
15882
  __scopePopper,
15784
15883
  side = "bottom",
@@ -15796,9 +15895,9 @@ var PopperContent = React20.forwardRef((props, forwardedRef) => {
15796
15895
  ...contentProps
15797
15896
  } = props;
15798
15897
  const context = usePopperContext(CONTENT_NAME, __scopePopper);
15799
- const [content, setContent] = React20.useState(null);
15898
+ const [content, setContent] = React22.useState(null);
15800
15899
  const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
15801
- const [arrow4, setArrow] = React20.useState(null);
15900
+ const [arrow4, setArrow] = React22.useState(null);
15802
15901
  const arrowSize = useSize(arrow4);
15803
15902
  const arrowWidth = arrowSize?.width ?? 0;
15804
15903
  const arrowHeight = arrowSize?.height ?? 0;
@@ -15858,12 +15957,12 @@ var PopperContent = React20.forwardRef((props, forwardedRef) => {
15858
15957
  const arrowX = middlewareData.arrow?.x;
15859
15958
  const arrowY = middlewareData.arrow?.y;
15860
15959
  const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
15861
- const [contentZIndex, setContentZIndex] = React20.useState();
15960
+ const [contentZIndex, setContentZIndex] = React22.useState();
15862
15961
  useLayoutEffect22(() => {
15863
15962
  if (content)
15864
15963
  setContentZIndex(window.getComputedStyle(content).zIndex);
15865
15964
  }, [content]);
15866
- return /* @__PURE__ */ jsx162("div", {
15965
+ return /* @__PURE__ */ jsx182("div", {
15867
15966
  ref: refs.setFloating,
15868
15967
  "data-radix-popper-content-wrapper": "",
15869
15968
  style: {
@@ -15881,14 +15980,14 @@ var PopperContent = React20.forwardRef((props, forwardedRef) => {
15881
15980
  }
15882
15981
  },
15883
15982
  dir: props.dir,
15884
- children: /* @__PURE__ */ jsx162(PopperContentProvider, {
15983
+ children: /* @__PURE__ */ jsx182(PopperContentProvider, {
15885
15984
  scope: __scopePopper,
15886
15985
  placedSide,
15887
15986
  onArrowChange: setArrow,
15888
15987
  arrowX,
15889
15988
  arrowY,
15890
15989
  shouldHideArrow: cannotCenterArrow,
15891
- children: /* @__PURE__ */ jsx162(Primitive.div, {
15990
+ children: /* @__PURE__ */ jsx182(Primitive.div, {
15892
15991
  "data-side": placedSide,
15893
15992
  "data-align": placedAlign,
15894
15993
  ...contentProps,
@@ -15909,11 +16008,11 @@ var OPPOSITE_SIDE = {
15909
16008
  bottom: "top",
15910
16009
  left: "right"
15911
16010
  };
15912
- var PopperArrow = React20.forwardRef(function PopperArrow2(props, forwardedRef) {
16011
+ var PopperArrow = React22.forwardRef(function PopperArrow2(props, forwardedRef) {
15913
16012
  const { __scopePopper, ...arrowProps } = props;
15914
16013
  const contentContext = useContentContext(ARROW_NAME, __scopePopper);
15915
16014
  const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
15916
- return /* @__PURE__ */ jsx162("span", {
16015
+ return /* @__PURE__ */ jsx182("span", {
15917
16016
  ref: contentContext.onArrowChange,
15918
16017
  style: {
15919
16018
  position: "absolute",
@@ -15934,7 +16033,7 @@ var PopperArrow = React20.forwardRef(function PopperArrow2(props, forwardedRef)
15934
16033
  }[contentContext.placedSide],
15935
16034
  visibility: contentContext.shouldHideArrow ? "hidden" : undefined
15936
16035
  },
15937
- children: /* @__PURE__ */ jsx162(Root2, {
16036
+ children: /* @__PURE__ */ jsx182(Root2, {
15938
16037
  ...arrowProps,
15939
16038
  ref: forwardedRef,
15940
16039
  style: {
@@ -15988,12 +16087,12 @@ var Anchor = PopperAnchor;
15988
16087
  var Content = PopperContent;
15989
16088
  var Arrow2 = PopperArrow;
15990
16089
  var PORTAL_NAME = "Portal";
15991
- var Portal = React212.forwardRef((props, forwardedRef) => {
16090
+ var Portal = React23.forwardRef((props, forwardedRef) => {
15992
16091
  const { container: containerProp, ...portalProps } = props;
15993
- const [mounted, setMounted] = React212.useState(false);
16092
+ const [mounted, setMounted] = React23.useState(false);
15994
16093
  useLayoutEffect22(() => setMounted(true), []);
15995
16094
  const container22 = containerProp || mounted && globalThis?.document?.body;
15996
- return container22 ? ReactDOM3.createPortal(/* @__PURE__ */ jsx172(Primitive.div, { ...portalProps, ref: forwardedRef }), container22) : null;
16095
+ return container22 ? ReactDOM3.createPortal(/* @__PURE__ */ jsx192(Primitive.div, { ...portalProps, ref: forwardedRef }), container22) : null;
15997
16096
  });
15998
16097
  Portal.displayName = PORTAL_NAME;
15999
16098
  function useControllableState({
@@ -16005,7 +16104,7 @@ function useControllableState({
16005
16104
  const isControlled = prop !== undefined;
16006
16105
  const value = isControlled ? prop : uncontrolledProp;
16007
16106
  const handleChange = useCallbackRef(onChange);
16008
- const setValue = React22.useCallback((nextValue) => {
16107
+ const setValue = React24.useCallback((nextValue) => {
16009
16108
  if (isControlled) {
16010
16109
  const setter = nextValue;
16011
16110
  const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
@@ -16021,11 +16120,11 @@ function useUncontrolledState({
16021
16120
  defaultProp,
16022
16121
  onChange
16023
16122
  }) {
16024
- const uncontrolledState = React22.useState(defaultProp);
16123
+ const uncontrolledState = React24.useState(defaultProp);
16025
16124
  const [value] = uncontrolledState;
16026
- const prevValueRef = React22.useRef(value);
16125
+ const prevValueRef = React24.useRef(value);
16027
16126
  const handleChange = useCallbackRef(onChange);
16028
- React22.useEffect(() => {
16127
+ React24.useEffect(() => {
16029
16128
  if (prevValueRef.current !== value) {
16030
16129
  handleChange(value);
16031
16130
  prevValueRef.current = value;
@@ -16034,8 +16133,8 @@ function useUncontrolledState({
16034
16133
  return uncontrolledState;
16035
16134
  }
16036
16135
  function usePrevious(value) {
16037
- const ref = React23.useRef({ value, previous: value });
16038
- return React23.useMemo(() => {
16136
+ const ref = React252.useRef({ value, previous: value });
16137
+ return React252.useMemo(() => {
16039
16138
  if (ref.current.value !== value) {
16040
16139
  ref.current.previous = ref.current.value;
16041
16140
  ref.current.value = value;
@@ -16044,8 +16143,8 @@ function usePrevious(value) {
16044
16143
  }, [value]);
16045
16144
  }
16046
16145
  var NAME2 = "VisuallyHidden";
16047
- var VisuallyHidden = React24.forwardRef((props, forwardedRef) => {
16048
- return /* @__PURE__ */ jsx182(Primitive.span, {
16146
+ var VisuallyHidden = React26.forwardRef((props, forwardedRef) => {
16147
+ return /* @__PURE__ */ jsx202(Primitive.span, {
16049
16148
  ...props,
16050
16149
  ref: forwardedRef,
16051
16150
  style: {
@@ -16252,7 +16351,7 @@ function useCallbackRef2(initialValue, callback) {
16252
16351
  ref.callback = callback;
16253
16352
  return ref.facade;
16254
16353
  }
16255
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React252.useLayoutEffect : React252.useEffect;
16354
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React272.useLayoutEffect : React272.useEffect;
16256
16355
  var currentValues = new WeakMap;
16257
16356
  function useMergeRefs(refs, defaultValue) {
16258
16357
  var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
@@ -16374,7 +16473,7 @@ var SideCar = function(_a) {
16374
16473
  if (!Target) {
16375
16474
  throw new Error("Sidecar medium not found");
16376
16475
  }
16377
- return React26.createElement(Target, __assign({}, rest));
16476
+ return React28.createElement(Target, __assign({}, rest));
16378
16477
  };
16379
16478
  SideCar.isSideCarExport = true;
16380
16479
  function exportSidecar(medium, exported) {
@@ -16385,9 +16484,9 @@ var effectCar = createSidecarMedium();
16385
16484
  var nothing = function() {
16386
16485
  return;
16387
16486
  };
16388
- var RemoveScroll = React272.forwardRef(function(props, parentRef) {
16389
- var ref = React272.useRef(null);
16390
- var _a = React272.useState({
16487
+ var RemoveScroll = React29.forwardRef(function(props, parentRef) {
16488
+ var ref = React29.useRef(null);
16489
+ var _a = React29.useState({
16391
16490
  onScrollCapture: nothing,
16392
16491
  onWheelCapture: nothing,
16393
16492
  onTouchMoveCapture: nothing
@@ -16396,7 +16495,7 @@ var RemoveScroll = React272.forwardRef(function(props, parentRef) {
16396
16495
  var SideCar2 = sideCar;
16397
16496
  var containerRef = useMergeRefs([ref, parentRef]);
16398
16497
  var containerProps = __assign(__assign({}, rest), callbacks);
16399
- return React272.createElement(React272.Fragment, null, enabled && React272.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }), forwardProps ? React272.cloneElement(React272.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React272.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children));
16498
+ return React29.createElement(React29.Fragment, null, enabled && React29.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }), forwardProps ? React29.cloneElement(React29.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React29.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children));
16400
16499
  });
16401
16500
  RemoveScroll.defaultProps = {
16402
16501
  enabled: true,
@@ -16464,7 +16563,7 @@ var stylesheetSingleton = function() {
16464
16563
  var styleHookSingleton = function() {
16465
16564
  var sheet = stylesheetSingleton();
16466
16565
  return function(styles, isDynamic) {
16467
- React28.useEffect(function() {
16566
+ React30.useEffect(function() {
16468
16567
  sheet.add(styles);
16469
16568
  return function() {
16470
16569
  sheet.remove();
@@ -16569,7 +16668,7 @@ var getCurrentUseCounter = function() {
16569
16668
  return isFinite(counter) ? counter : 0;
16570
16669
  };
16571
16670
  var useLockAttribute = function() {
16572
- React29.useEffect(function() {
16671
+ React312.useEffect(function() {
16573
16672
  document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
16574
16673
  return function() {
16575
16674
  var newCounter = getCurrentUseCounter() - 1;
@@ -16584,10 +16683,10 @@ var useLockAttribute = function() {
16584
16683
  var RemoveScrollBar = function(_a) {
16585
16684
  var { noRelative, noImportant, gapMode: _b } = _a, gapMode = _b === undefined ? "margin" : _b;
16586
16685
  useLockAttribute();
16587
- var gap = React29.useMemo(function() {
16686
+ var gap = React312.useMemo(function() {
16588
16687
  return getGapWidth(gapMode);
16589
16688
  }, [gapMode]);
16590
- return React29.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
16689
+ return React312.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
16591
16690
  };
16592
16691
  var passiveSupported = false;
16593
16692
  if (typeof window !== "undefined") {
@@ -16714,16 +16813,16 @@ var generateStyle = function(id) {
16714
16813
  var idCounter = 0;
16715
16814
  var lockStack = [];
16716
16815
  function RemoveScrollSideCar(props) {
16717
- var shouldPreventQueue = React30.useRef([]);
16718
- var touchStartRef = React30.useRef([0, 0]);
16719
- var activeAxis = React30.useRef();
16720
- var id = React30.useState(idCounter++)[0];
16721
- var Style2 = React30.useState(styleSingleton)[0];
16722
- var lastProps = React30.useRef(props);
16723
- React30.useEffect(function() {
16816
+ var shouldPreventQueue = React322.useRef([]);
16817
+ var touchStartRef = React322.useRef([0, 0]);
16818
+ var activeAxis = React322.useRef();
16819
+ var id = React322.useState(idCounter++)[0];
16820
+ var Style2 = React322.useState(styleSingleton)[0];
16821
+ var lastProps = React322.useRef(props);
16822
+ React322.useEffect(function() {
16724
16823
  lastProps.current = props;
16725
16824
  }, [props]);
16726
- React30.useEffect(function() {
16825
+ React322.useEffect(function() {
16727
16826
  if (props.inert) {
16728
16827
  document.body.classList.add("block-interactivity-".concat(id));
16729
16828
  var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
@@ -16739,7 +16838,7 @@ function RemoveScrollSideCar(props) {
16739
16838
  }
16740
16839
  return;
16741
16840
  }, [props.inert, props.lockRef.current, props.shards]);
16742
- var shouldCancelEvent = React30.useCallback(function(event, parent) {
16841
+ var shouldCancelEvent = React322.useCallback(function(event, parent) {
16743
16842
  if ("touches" in event && event.touches.length === 2) {
16744
16843
  return !lastProps.current.allowPinchZoom;
16745
16844
  }
@@ -16775,7 +16874,7 @@ function RemoveScrollSideCar(props) {
16775
16874
  var cancelingAxis = activeAxis.current || currentAxis;
16776
16875
  return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
16777
16876
  }, []);
16778
- var shouldPrevent = React30.useCallback(function(_event) {
16877
+ var shouldPrevent = React322.useCallback(function(_event) {
16779
16878
  var event = _event;
16780
16879
  if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
16781
16880
  return;
@@ -16802,7 +16901,7 @@ function RemoveScrollSideCar(props) {
16802
16901
  }
16803
16902
  }
16804
16903
  }, []);
16805
- var shouldCancel = React30.useCallback(function(name, delta, target, should) {
16904
+ var shouldCancel = React322.useCallback(function(name, delta, target, should) {
16806
16905
  var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
16807
16906
  shouldPreventQueue.current.push(event);
16808
16907
  setTimeout(function() {
@@ -16811,17 +16910,17 @@ function RemoveScrollSideCar(props) {
16811
16910
  });
16812
16911
  }, 1);
16813
16912
  }, []);
16814
- var scrollTouchStart = React30.useCallback(function(event) {
16913
+ var scrollTouchStart = React322.useCallback(function(event) {
16815
16914
  touchStartRef.current = getTouchXY(event);
16816
16915
  activeAxis.current = undefined;
16817
16916
  }, []);
16818
- var scrollWheel = React30.useCallback(function(event) {
16917
+ var scrollWheel = React322.useCallback(function(event) {
16819
16918
  shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
16820
16919
  }, []);
16821
- var scrollTouchMove = React30.useCallback(function(event) {
16920
+ var scrollTouchMove = React322.useCallback(function(event) {
16822
16921
  shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
16823
16922
  }, []);
16824
- React30.useEffect(function() {
16923
+ React322.useEffect(function() {
16825
16924
  lockStack.push(Style2);
16826
16925
  props.setCallbacks({
16827
16926
  onScrollCapture: scrollWheel,
@@ -16841,7 +16940,7 @@ function RemoveScrollSideCar(props) {
16841
16940
  };
16842
16941
  }, []);
16843
16942
  var { removeScrollBar, inert } = props;
16844
- return React30.createElement(React30.Fragment, null, inert ? React30.createElement(Style2, { styles: generateStyle(id) }) : null, removeScrollBar ? React30.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null);
16943
+ return React322.createElement(React322.Fragment, null, inert ? React322.createElement(Style2, { styles: generateStyle(id) }) : null, removeScrollBar ? React322.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null);
16845
16944
  }
16846
16945
  function getOutermostShadowParent(node) {
16847
16946
  var shadowParent = null;
@@ -16855,8 +16954,8 @@ function getOutermostShadowParent(node) {
16855
16954
  return shadowParent;
16856
16955
  }
16857
16956
  var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
16858
- var ReactRemoveScroll = React312.forwardRef(function(props, ref) {
16859
- return React312.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
16957
+ var ReactRemoveScroll = React332.forwardRef(function(props, ref) {
16958
+ return React332.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
16860
16959
  });
16861
16960
  ReactRemoveScroll.classNames = RemoveScroll.classNames;
16862
16961
  var Combination_default = ReactRemoveScroll;
@@ -16888,9 +16987,9 @@ var Select = (props) => {
16888
16987
  required
16889
16988
  } = props;
16890
16989
  const popperScope = usePopperScope(__scopeSelect);
16891
- const [trigger, setTrigger] = React322.useState(null);
16892
- const [valueNode, setValueNode] = React322.useState(null);
16893
- const [valueNodeHasChildren, setValueNodeHasChildren] = React322.useState(false);
16990
+ const [trigger, setTrigger] = React34.useState(null);
16991
+ const [valueNode, setValueNode] = React34.useState(null);
16992
+ const [valueNodeHasChildren, setValueNodeHasChildren] = React34.useState(false);
16894
16993
  const direction = useDirection(dir);
16895
16994
  const [open = false, setOpen] = useControllableState({
16896
16995
  prop: openProp,
@@ -16902,11 +17001,11 @@ var Select = (props) => {
16902
17001
  defaultProp: defaultValue,
16903
17002
  onChange: onValueChange
16904
17003
  });
16905
- const triggerPointerDownPosRef = React322.useRef(null);
17004
+ const triggerPointerDownPosRef = React34.useRef(null);
16906
17005
  const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
16907
- const [nativeOptionsSet, setNativeOptionsSet] = React322.useState(/* @__PURE__ */ new Set);
17006
+ const [nativeOptionsSet, setNativeOptionsSet] = React34.useState(/* @__PURE__ */ new Set);
16908
17007
  const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
16909
- return /* @__PURE__ */ jsx192(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs32(SelectProvider, {
17008
+ return /* @__PURE__ */ jsx212(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs4(SelectProvider, {
16910
17009
  required,
16911
17010
  scope: __scopeSelect,
16912
17011
  trigger,
@@ -16924,12 +17023,12 @@ var Select = (props) => {
16924
17023
  triggerPointerDownPosRef,
16925
17024
  disabled,
16926
17025
  children: [
16927
- /* @__PURE__ */ jsx192(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx192(SelectNativeOptionsProvider, {
17026
+ /* @__PURE__ */ jsx212(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx212(SelectNativeOptionsProvider, {
16928
17027
  scope: props.__scopeSelect,
16929
- onNativeOptionAdd: React322.useCallback((option) => {
17028
+ onNativeOptionAdd: React34.useCallback((option) => {
16930
17029
  setNativeOptionsSet((prev) => new Set(prev).add(option));
16931
17030
  }, []),
16932
- onNativeOptionRemove: React322.useCallback((option) => {
17031
+ onNativeOptionRemove: React34.useCallback((option) => {
16933
17032
  setNativeOptionsSet((prev) => {
16934
17033
  const optionsSet = new Set(prev);
16935
17034
  optionsSet.delete(option);
@@ -16938,7 +17037,7 @@ var Select = (props) => {
16938
17037
  }, []),
16939
17038
  children
16940
17039
  }) }),
16941
- isFormControl ? /* @__PURE__ */ jsxs32(BubbleSelect, {
17040
+ isFormControl ? /* @__PURE__ */ jsxs4(BubbleSelect, {
16942
17041
  "aria-hidden": true,
16943
17042
  required,
16944
17043
  tabIndex: -1,
@@ -16948,7 +17047,7 @@ var Select = (props) => {
16948
17047
  onChange: (event) => setValue(event.target.value),
16949
17048
  disabled,
16950
17049
  children: [
16951
- value === undefined ? /* @__PURE__ */ jsx192("option", { value: "" }) : null,
17050
+ value === undefined ? /* @__PURE__ */ jsx212("option", { value: "" }) : null,
16952
17051
  Array.from(nativeOptionsSet)
16953
17052
  ]
16954
17053
  }, nativeSelectKey) : null
@@ -16957,7 +17056,7 @@ var Select = (props) => {
16957
17056
  };
16958
17057
  Select.displayName = SELECT_NAME;
16959
17058
  var TRIGGER_NAME = "SelectTrigger";
16960
- var SelectTrigger = React322.forwardRef((props, forwardedRef) => {
17059
+ var SelectTrigger = React34.forwardRef((props, forwardedRef) => {
16961
17060
  const { __scopeSelect, disabled = false, ...triggerProps } = props;
16962
17061
  const popperScope = usePopperScope(__scopeSelect);
16963
17062
  const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
@@ -16978,7 +17077,7 @@ var SelectTrigger = React322.forwardRef((props, forwardedRef) => {
16978
17077
  resetTypeahead();
16979
17078
  }
16980
17079
  };
16981
- return /* @__PURE__ */ jsx192(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx192(Primitive.button, {
17080
+ return /* @__PURE__ */ jsx212(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx212(Primitive.button, {
16982
17081
  type: "button",
16983
17082
  role: "combobox",
16984
17083
  "aria-controls": context.contentId,
@@ -17025,7 +17124,7 @@ var SelectTrigger = React322.forwardRef((props, forwardedRef) => {
17025
17124
  });
17026
17125
  SelectTrigger.displayName = TRIGGER_NAME;
17027
17126
  var VALUE_NAME = "SelectValue";
17028
- var SelectValue = React322.forwardRef((props, forwardedRef) => {
17127
+ var SelectValue = React34.forwardRef((props, forwardedRef) => {
17029
17128
  const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
17030
17129
  const context = useSelectContext(VALUE_NAME, __scopeSelect);
17031
17130
  const { onValueNodeHasChildrenChange } = context;
@@ -17034,43 +17133,43 @@ var SelectValue = React322.forwardRef((props, forwardedRef) => {
17034
17133
  useLayoutEffect22(() => {
17035
17134
  onValueNodeHasChildrenChange(hasChildren);
17036
17135
  }, [onValueNodeHasChildrenChange, hasChildren]);
17037
- return /* @__PURE__ */ jsx192(Primitive.span, {
17136
+ return /* @__PURE__ */ jsx212(Primitive.span, {
17038
17137
  ...valueProps,
17039
17138
  ref: composedRefs,
17040
17139
  style: { pointerEvents: "none" },
17041
- children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ jsx192(Fragment52, { children: placeholder }) : children
17140
+ children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ jsx212(Fragment52, { children: placeholder }) : children
17042
17141
  });
17043
17142
  });
17044
17143
  SelectValue.displayName = VALUE_NAME;
17045
17144
  var ICON_NAME = "SelectIcon";
17046
- var SelectIcon = React322.forwardRef((props, forwardedRef) => {
17145
+ var SelectIcon = React34.forwardRef((props, forwardedRef) => {
17047
17146
  const { __scopeSelect, children, ...iconProps } = props;
17048
- return /* @__PURE__ */ jsx192(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
17147
+ return /* @__PURE__ */ jsx212(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
17049
17148
  });
17050
17149
  SelectIcon.displayName = ICON_NAME;
17051
17150
  var PORTAL_NAME2 = "SelectPortal";
17052
17151
  var SelectPortal = (props) => {
17053
- return /* @__PURE__ */ jsx192(Portal, { asChild: true, ...props });
17152
+ return /* @__PURE__ */ jsx212(Portal, { asChild: true, ...props });
17054
17153
  };
17055
17154
  SelectPortal.displayName = PORTAL_NAME2;
17056
17155
  var CONTENT_NAME2 = "SelectContent";
17057
- var SelectContent = React322.forwardRef((props, forwardedRef) => {
17156
+ var SelectContent = React34.forwardRef((props, forwardedRef) => {
17058
17157
  const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
17059
- const [fragment, setFragment] = React322.useState();
17158
+ const [fragment, setFragment] = React34.useState();
17060
17159
  useLayoutEffect22(() => {
17061
17160
  setFragment(new DocumentFragment);
17062
17161
  }, []);
17063
17162
  if (!context.open) {
17064
17163
  const frag = fragment;
17065
- return frag ? ReactDOM4.createPortal(/* @__PURE__ */ jsx192(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx192(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx192("div", { children: props.children }) }) }), frag) : null;
17164
+ return frag ? ReactDOM4.createPortal(/* @__PURE__ */ jsx212(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx212(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx212("div", { children: props.children }) }) }), frag) : null;
17066
17165
  }
17067
- return /* @__PURE__ */ jsx192(SelectContentImpl, { ...props, ref: forwardedRef });
17166
+ return /* @__PURE__ */ jsx212(SelectContentImpl, { ...props, ref: forwardedRef });
17068
17167
  });
17069
17168
  SelectContent.displayName = CONTENT_NAME2;
17070
17169
  var CONTENT_MARGIN = 10;
17071
17170
  var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
17072
17171
  var CONTENT_IMPL_NAME = "SelectContentImpl";
17073
- var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
17172
+ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
17074
17173
  const {
17075
17174
  __scopeSelect,
17076
17175
  position = "item-aligned",
@@ -17090,20 +17189,20 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
17090
17189
  ...contentProps
17091
17190
  } = props;
17092
17191
  const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
17093
- const [content, setContent] = React322.useState(null);
17094
- const [viewport, setViewport] = React322.useState(null);
17192
+ const [content, setContent] = React34.useState(null);
17193
+ const [viewport, setViewport] = React34.useState(null);
17095
17194
  const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
17096
- const [selectedItem, setSelectedItem] = React322.useState(null);
17097
- const [selectedItemText, setSelectedItemText] = React322.useState(null);
17195
+ const [selectedItem, setSelectedItem] = React34.useState(null);
17196
+ const [selectedItemText, setSelectedItemText] = React34.useState(null);
17098
17197
  const getItems = useCollection(__scopeSelect);
17099
- const [isPositioned, setIsPositioned] = React322.useState(false);
17100
- const firstValidItemFoundRef = React322.useRef(false);
17101
- React322.useEffect(() => {
17198
+ const [isPositioned, setIsPositioned] = React34.useState(false);
17199
+ const firstValidItemFoundRef = React34.useRef(false);
17200
+ React34.useEffect(() => {
17102
17201
  if (content)
17103
17202
  return hideOthers(content);
17104
17203
  }, [content]);
17105
17204
  useFocusGuards();
17106
- const focusFirst2 = React322.useCallback((candidates) => {
17205
+ const focusFirst2 = React34.useCallback((candidates) => {
17107
17206
  const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
17108
17207
  const [lastItem] = restItems.slice(-1);
17109
17208
  const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
@@ -17120,14 +17219,14 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
17120
17219
  return;
17121
17220
  }
17122
17221
  }, [getItems, viewport]);
17123
- const focusSelectedItem = React322.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
17124
- React322.useEffect(() => {
17222
+ const focusSelectedItem = React34.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
17223
+ React34.useEffect(() => {
17125
17224
  if (isPositioned) {
17126
17225
  focusSelectedItem();
17127
17226
  }
17128
17227
  }, [isPositioned, focusSelectedItem]);
17129
17228
  const { onOpenChange, triggerPointerDownPosRef } = context;
17130
- React322.useEffect(() => {
17229
+ React34.useEffect(() => {
17131
17230
  if (content) {
17132
17231
  let pointerMoveDelta = { x: 0, y: 0 };
17133
17232
  const handlePointerMove = (event) => {
@@ -17157,7 +17256,7 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
17157
17256
  };
17158
17257
  }
17159
17258
  }, [content, onOpenChange, triggerPointerDownPosRef]);
17160
- React322.useEffect(() => {
17259
+ React34.useEffect(() => {
17161
17260
  const close = () => onOpenChange(false);
17162
17261
  window.addEventListener("blur", close);
17163
17262
  window.addEventListener("resize", close);
@@ -17174,7 +17273,7 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
17174
17273
  setTimeout(() => nextItem.ref.current.focus());
17175
17274
  }
17176
17275
  });
17177
- const itemRefCallback = React322.useCallback((node, value, disabled) => {
17276
+ const itemRefCallback = React34.useCallback((node, value, disabled) => {
17178
17277
  const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
17179
17278
  const isSelectedItem = context.value !== undefined && context.value === value;
17180
17279
  if (isSelectedItem || isFirstValidItem) {
@@ -17183,8 +17282,8 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
17183
17282
  firstValidItemFoundRef.current = true;
17184
17283
  }
17185
17284
  }, [context.value]);
17186
- const handleItemLeave = React322.useCallback(() => content?.focus(), [content]);
17187
- const itemTextRefCallback = React322.useCallback((node, value, disabled) => {
17285
+ const handleItemLeave = React34.useCallback(() => content?.focus(), [content]);
17286
+ const itemTextRefCallback = React34.useCallback((node, value, disabled) => {
17188
17287
  const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
17189
17288
  const isSelectedItem = context.value !== undefined && context.value === value;
17190
17289
  if (isSelectedItem || isFirstValidItem) {
@@ -17204,7 +17303,7 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
17204
17303
  hideWhenDetached,
17205
17304
  avoidCollisions
17206
17305
  } : {};
17207
- return /* @__PURE__ */ jsx192(SelectContentProvider, {
17306
+ return /* @__PURE__ */ jsx212(SelectContentProvider, {
17208
17307
  scope: __scopeSelect,
17209
17308
  content,
17210
17309
  viewport,
@@ -17218,7 +17317,7 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
17218
17317
  position,
17219
17318
  isPositioned,
17220
17319
  searchRef,
17221
- children: /* @__PURE__ */ jsx192(Combination_default, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx192(FocusScope, {
17320
+ children: /* @__PURE__ */ jsx212(Combination_default, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx212(FocusScope, {
17222
17321
  asChild: true,
17223
17322
  trapped: context.open,
17224
17323
  onMountAutoFocus: (event) => {
@@ -17228,14 +17327,14 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
17228
17327
  context.trigger?.focus({ preventScroll: true });
17229
17328
  event.preventDefault();
17230
17329
  }),
17231
- children: /* @__PURE__ */ jsx192(DismissableLayer, {
17330
+ children: /* @__PURE__ */ jsx212(DismissableLayer, {
17232
17331
  asChild: true,
17233
17332
  disableOutsidePointerEvents: true,
17234
17333
  onEscapeKeyDown,
17235
17334
  onPointerDownOutside,
17236
17335
  onFocusOutside: (event) => event.preventDefault(),
17237
17336
  onDismiss: () => context.onOpenChange(false),
17238
- children: /* @__PURE__ */ jsx192(SelectPosition, {
17337
+ children: /* @__PURE__ */ jsx212(SelectPosition, {
17239
17338
  role: "listbox",
17240
17339
  id: context.contentId,
17241
17340
  "data-state": context.open ? "open" : "closed",
@@ -17279,18 +17378,18 @@ var SelectContentImpl = React322.forwardRef((props, forwardedRef) => {
17279
17378
  });
17280
17379
  SelectContentImpl.displayName = CONTENT_IMPL_NAME;
17281
17380
  var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
17282
- var SelectItemAlignedPosition = React322.forwardRef((props, forwardedRef) => {
17381
+ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
17283
17382
  const { __scopeSelect, onPlaced, ...popperProps } = props;
17284
17383
  const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
17285
17384
  const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
17286
- const [contentWrapper, setContentWrapper] = React322.useState(null);
17287
- const [content, setContent] = React322.useState(null);
17385
+ const [contentWrapper, setContentWrapper] = React34.useState(null);
17386
+ const [content, setContent] = React34.useState(null);
17288
17387
  const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
17289
17388
  const getItems = useCollection(__scopeSelect);
17290
- const shouldExpandOnScrollRef = React322.useRef(false);
17291
- const shouldRepositionRef = React322.useRef(true);
17389
+ const shouldExpandOnScrollRef = React34.useRef(false);
17390
+ const shouldRepositionRef = React34.useRef(true);
17292
17391
  const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
17293
- const position = React322.useCallback(() => {
17392
+ const position = React34.useCallback(() => {
17294
17393
  if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
17295
17394
  const triggerRect = context.trigger.getBoundingClientRect();
17296
17395
  const contentRect = content.getBoundingClientRect();
@@ -17371,24 +17470,24 @@ var SelectItemAlignedPosition = React322.forwardRef((props, forwardedRef) => {
17371
17470
  onPlaced
17372
17471
  ]);
17373
17472
  useLayoutEffect22(() => position(), [position]);
17374
- const [contentZIndex, setContentZIndex] = React322.useState();
17473
+ const [contentZIndex, setContentZIndex] = React34.useState();
17375
17474
  useLayoutEffect22(() => {
17376
17475
  if (content)
17377
17476
  setContentZIndex(window.getComputedStyle(content).zIndex);
17378
17477
  }, [content]);
17379
- const handleScrollButtonChange = React322.useCallback((node) => {
17478
+ const handleScrollButtonChange = React34.useCallback((node) => {
17380
17479
  if (node && shouldRepositionRef.current === true) {
17381
17480
  position();
17382
17481
  focusSelectedItem?.();
17383
17482
  shouldRepositionRef.current = false;
17384
17483
  }
17385
17484
  }, [position, focusSelectedItem]);
17386
- return /* @__PURE__ */ jsx192(SelectViewportProvider, {
17485
+ return /* @__PURE__ */ jsx212(SelectViewportProvider, {
17387
17486
  scope: __scopeSelect,
17388
17487
  contentWrapper,
17389
17488
  shouldExpandOnScrollRef,
17390
17489
  onScrollButtonChange: handleScrollButtonChange,
17391
- children: /* @__PURE__ */ jsx192("div", {
17490
+ children: /* @__PURE__ */ jsx212("div", {
17392
17491
  ref: setContentWrapper,
17393
17492
  style: {
17394
17493
  display: "flex",
@@ -17396,7 +17495,7 @@ var SelectItemAlignedPosition = React322.forwardRef((props, forwardedRef) => {
17396
17495
  position: "fixed",
17397
17496
  zIndex: contentZIndex
17398
17497
  },
17399
- children: /* @__PURE__ */ jsx192(Primitive.div, {
17498
+ children: /* @__PURE__ */ jsx212(Primitive.div, {
17400
17499
  ...popperProps,
17401
17500
  ref: composedRefs,
17402
17501
  style: {
@@ -17410,7 +17509,7 @@ var SelectItemAlignedPosition = React322.forwardRef((props, forwardedRef) => {
17410
17509
  });
17411
17510
  SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
17412
17511
  var POPPER_POSITION_NAME = "SelectPopperPosition";
17413
- var SelectPopperPosition = React322.forwardRef((props, forwardedRef) => {
17512
+ var SelectPopperPosition = React34.forwardRef((props, forwardedRef) => {
17414
17513
  const {
17415
17514
  __scopeSelect,
17416
17515
  align = "start",
@@ -17418,7 +17517,7 @@ var SelectPopperPosition = React322.forwardRef((props, forwardedRef) => {
17418
17517
  ...popperProps
17419
17518
  } = props;
17420
17519
  const popperScope = usePopperScope(__scopeSelect);
17421
- return /* @__PURE__ */ jsx192(Content, {
17520
+ return /* @__PURE__ */ jsx212(Content, {
17422
17521
  ...popperScope,
17423
17522
  ...popperProps,
17424
17523
  ref: forwardedRef,
@@ -17440,20 +17539,20 @@ var SelectPopperPosition = React322.forwardRef((props, forwardedRef) => {
17440
17539
  SelectPopperPosition.displayName = POPPER_POSITION_NAME;
17441
17540
  var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
17442
17541
  var VIEWPORT_NAME = "SelectViewport";
17443
- var SelectViewport = React322.forwardRef((props, forwardedRef) => {
17542
+ var SelectViewport = React34.forwardRef((props, forwardedRef) => {
17444
17543
  const { __scopeSelect, nonce, ...viewportProps } = props;
17445
17544
  const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
17446
17545
  const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
17447
17546
  const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
17448
- const prevScrollTopRef = React322.useRef(0);
17449
- return /* @__PURE__ */ jsxs32(Fragment52, { children: [
17450
- /* @__PURE__ */ jsx192("style", {
17547
+ const prevScrollTopRef = React34.useRef(0);
17548
+ return /* @__PURE__ */ jsxs4(Fragment52, { children: [
17549
+ /* @__PURE__ */ jsx212("style", {
17451
17550
  dangerouslySetInnerHTML: {
17452
17551
  __html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`
17453
17552
  },
17454
17553
  nonce
17455
17554
  }),
17456
- /* @__PURE__ */ jsx192(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx192(Primitive.div, {
17555
+ /* @__PURE__ */ jsx212(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx212(Primitive.div, {
17457
17556
  "data-radix-select-viewport": "",
17458
17557
  role: "presentation",
17459
17558
  ...viewportProps,
@@ -17494,22 +17593,22 @@ var SelectViewport = React322.forwardRef((props, forwardedRef) => {
17494
17593
  SelectViewport.displayName = VIEWPORT_NAME;
17495
17594
  var GROUP_NAME = "SelectGroup";
17496
17595
  var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
17497
- var SelectGroup = React322.forwardRef((props, forwardedRef) => {
17596
+ var SelectGroup = React34.forwardRef((props, forwardedRef) => {
17498
17597
  const { __scopeSelect, ...groupProps } = props;
17499
17598
  const groupId = useId();
17500
- return /* @__PURE__ */ jsx192(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx192(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
17599
+ return /* @__PURE__ */ jsx212(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx212(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
17501
17600
  });
17502
17601
  SelectGroup.displayName = GROUP_NAME;
17503
17602
  var LABEL_NAME = "SelectLabel";
17504
- var SelectLabel = React322.forwardRef((props, forwardedRef) => {
17603
+ var SelectLabel = React34.forwardRef((props, forwardedRef) => {
17505
17604
  const { __scopeSelect, ...labelProps } = props;
17506
17605
  const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
17507
- return /* @__PURE__ */ jsx192(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
17606
+ return /* @__PURE__ */ jsx212(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
17508
17607
  });
17509
17608
  SelectLabel.displayName = LABEL_NAME;
17510
17609
  var ITEM_NAME = "SelectItem";
17511
17610
  var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
17512
- var SelectItem = React322.forwardRef((props, forwardedRef) => {
17611
+ var SelectItem = React34.forwardRef((props, forwardedRef) => {
17513
17612
  const {
17514
17613
  __scopeSelect,
17515
17614
  value,
@@ -17520,8 +17619,8 @@ var SelectItem = React322.forwardRef((props, forwardedRef) => {
17520
17619
  const context = useSelectContext(ITEM_NAME, __scopeSelect);
17521
17620
  const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
17522
17621
  const isSelected = context.value === value;
17523
- const [textValue, setTextValue] = React322.useState(textValueProp ?? "");
17524
- const [isFocused, setIsFocused] = React322.useState(false);
17622
+ const [textValue, setTextValue] = React34.useState(textValueProp ?? "");
17623
+ const [isFocused, setIsFocused] = React34.useState(false);
17525
17624
  const composedRefs = useComposedRefs(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
17526
17625
  const textId = useId();
17527
17626
  const handleSelect = () => {
@@ -17533,21 +17632,21 @@ var SelectItem = React322.forwardRef((props, forwardedRef) => {
17533
17632
  if (value === "") {
17534
17633
  throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
17535
17634
  }
17536
- return /* @__PURE__ */ jsx192(SelectItemContextProvider, {
17635
+ return /* @__PURE__ */ jsx212(SelectItemContextProvider, {
17537
17636
  scope: __scopeSelect,
17538
17637
  value,
17539
17638
  disabled,
17540
17639
  textId,
17541
17640
  isSelected,
17542
- onItemTextChange: React322.useCallback((node) => {
17641
+ onItemTextChange: React34.useCallback((node) => {
17543
17642
  setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
17544
17643
  }, []),
17545
- children: /* @__PURE__ */ jsx192(Collection.ItemSlot, {
17644
+ children: /* @__PURE__ */ jsx212(Collection.ItemSlot, {
17546
17645
  scope: __scopeSelect,
17547
17646
  value,
17548
17647
  disabled,
17549
17648
  textValue,
17550
- children: /* @__PURE__ */ jsx192(Primitive.div, {
17649
+ children: /* @__PURE__ */ jsx212(Primitive.div, {
17551
17650
  role: "option",
17552
17651
  "aria-labelledby": textId,
17553
17652
  "data-highlighted": isFocused ? "" : undefined,
@@ -17588,39 +17687,39 @@ var SelectItem = React322.forwardRef((props, forwardedRef) => {
17588
17687
  });
17589
17688
  SelectItem.displayName = ITEM_NAME;
17590
17689
  var ITEM_TEXT_NAME = "SelectItemText";
17591
- var SelectItemText = React322.forwardRef((props, forwardedRef) => {
17690
+ var SelectItemText = React34.forwardRef((props, forwardedRef) => {
17592
17691
  const { __scopeSelect, className, style, ...itemTextProps } = props;
17593
17692
  const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
17594
17693
  const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
17595
17694
  const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
17596
17695
  const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
17597
- const [itemTextNode, setItemTextNode] = React322.useState(null);
17696
+ const [itemTextNode, setItemTextNode] = React34.useState(null);
17598
17697
  const composedRefs = useComposedRefs(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
17599
17698
  const textContent = itemTextNode?.textContent;
17600
- const nativeOption = React322.useMemo(() => /* @__PURE__ */ jsx192("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
17699
+ const nativeOption = React34.useMemo(() => /* @__PURE__ */ jsx212("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
17601
17700
  const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
17602
17701
  useLayoutEffect22(() => {
17603
17702
  onNativeOptionAdd(nativeOption);
17604
17703
  return () => onNativeOptionRemove(nativeOption);
17605
17704
  }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
17606
- return /* @__PURE__ */ jsxs32(Fragment52, { children: [
17607
- /* @__PURE__ */ jsx192(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
17705
+ return /* @__PURE__ */ jsxs4(Fragment52, { children: [
17706
+ /* @__PURE__ */ jsx212(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
17608
17707
  itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM4.createPortal(itemTextProps.children, context.valueNode) : null
17609
17708
  ] });
17610
17709
  });
17611
17710
  SelectItemText.displayName = ITEM_TEXT_NAME;
17612
17711
  var ITEM_INDICATOR_NAME = "SelectItemIndicator";
17613
- var SelectItemIndicator = React322.forwardRef((props, forwardedRef) => {
17712
+ var SelectItemIndicator = React34.forwardRef((props, forwardedRef) => {
17614
17713
  const { __scopeSelect, ...itemIndicatorProps } = props;
17615
17714
  const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
17616
- return itemContext.isSelected ? /* @__PURE__ */ jsx192(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
17715
+ return itemContext.isSelected ? /* @__PURE__ */ jsx212(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
17617
17716
  });
17618
17717
  SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
17619
17718
  var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
17620
- var SelectScrollUpButton = React322.forwardRef((props, forwardedRef) => {
17719
+ var SelectScrollUpButton = React34.forwardRef((props, forwardedRef) => {
17621
17720
  const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
17622
17721
  const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
17623
- const [canScrollUp, setCanScrollUp] = React322.useState(false);
17722
+ const [canScrollUp, setCanScrollUp] = React34.useState(false);
17624
17723
  const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
17625
17724
  useLayoutEffect22(() => {
17626
17725
  if (contentContext.viewport && contentContext.isPositioned) {
@@ -17635,7 +17734,7 @@ var SelectScrollUpButton = React322.forwardRef((props, forwardedRef) => {
17635
17734
  return () => viewport.removeEventListener("scroll", handleScroll22);
17636
17735
  }
17637
17736
  }, [contentContext.viewport, contentContext.isPositioned]);
17638
- return canScrollUp ? /* @__PURE__ */ jsx192(SelectScrollButtonImpl, {
17737
+ return canScrollUp ? /* @__PURE__ */ jsx212(SelectScrollButtonImpl, {
17639
17738
  ...props,
17640
17739
  ref: composedRefs,
17641
17740
  onAutoScroll: () => {
@@ -17648,10 +17747,10 @@ var SelectScrollUpButton = React322.forwardRef((props, forwardedRef) => {
17648
17747
  });
17649
17748
  SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
17650
17749
  var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
17651
- var SelectScrollDownButton = React322.forwardRef((props, forwardedRef) => {
17750
+ var SelectScrollDownButton = React34.forwardRef((props, forwardedRef) => {
17652
17751
  const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
17653
17752
  const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
17654
- const [canScrollDown, setCanScrollDown] = React322.useState(false);
17753
+ const [canScrollDown, setCanScrollDown] = React34.useState(false);
17655
17754
  const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
17656
17755
  useLayoutEffect22(() => {
17657
17756
  if (contentContext.viewport && contentContext.isPositioned) {
@@ -17667,7 +17766,7 @@ var SelectScrollDownButton = React322.forwardRef((props, forwardedRef) => {
17667
17766
  return () => viewport.removeEventListener("scroll", handleScroll22);
17668
17767
  }
17669
17768
  }, [contentContext.viewport, contentContext.isPositioned]);
17670
- return canScrollDown ? /* @__PURE__ */ jsx192(SelectScrollButtonImpl, {
17769
+ return canScrollDown ? /* @__PURE__ */ jsx212(SelectScrollButtonImpl, {
17671
17770
  ...props,
17672
17771
  ref: composedRefs,
17673
17772
  onAutoScroll: () => {
@@ -17679,25 +17778,25 @@ var SelectScrollDownButton = React322.forwardRef((props, forwardedRef) => {
17679
17778
  }) : null;
17680
17779
  });
17681
17780
  SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
17682
- var SelectScrollButtonImpl = React322.forwardRef((props, forwardedRef) => {
17781
+ var SelectScrollButtonImpl = React34.forwardRef((props, forwardedRef) => {
17683
17782
  const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
17684
17783
  const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
17685
- const autoScrollTimerRef = React322.useRef(null);
17784
+ const autoScrollTimerRef = React34.useRef(null);
17686
17785
  const getItems = useCollection(__scopeSelect);
17687
- const clearAutoScrollTimer = React322.useCallback(() => {
17786
+ const clearAutoScrollTimer = React34.useCallback(() => {
17688
17787
  if (autoScrollTimerRef.current !== null) {
17689
17788
  window.clearInterval(autoScrollTimerRef.current);
17690
17789
  autoScrollTimerRef.current = null;
17691
17790
  }
17692
17791
  }, []);
17693
- React322.useEffect(() => {
17792
+ React34.useEffect(() => {
17694
17793
  return () => clearAutoScrollTimer();
17695
17794
  }, [clearAutoScrollTimer]);
17696
17795
  useLayoutEffect22(() => {
17697
17796
  const activeItem = getItems().find((item) => item.ref.current === document.activeElement);
17698
17797
  activeItem?.ref.current?.scrollIntoView({ block: "nearest" });
17699
17798
  }, [getItems]);
17700
- return /* @__PURE__ */ jsx192(Primitive.div, {
17799
+ return /* @__PURE__ */ jsx212(Primitive.div, {
17701
17800
  "aria-hidden": true,
17702
17801
  ...scrollIndicatorProps,
17703
17802
  ref: forwardedRef,
@@ -17719,29 +17818,29 @@ var SelectScrollButtonImpl = React322.forwardRef((props, forwardedRef) => {
17719
17818
  });
17720
17819
  });
17721
17820
  var SEPARATOR_NAME = "SelectSeparator";
17722
- var SelectSeparator = React322.forwardRef((props, forwardedRef) => {
17821
+ var SelectSeparator = React34.forwardRef((props, forwardedRef) => {
17723
17822
  const { __scopeSelect, ...separatorProps } = props;
17724
- return /* @__PURE__ */ jsx192(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
17823
+ return /* @__PURE__ */ jsx212(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
17725
17824
  });
17726
17825
  SelectSeparator.displayName = SEPARATOR_NAME;
17727
17826
  var ARROW_NAME2 = "SelectArrow";
17728
- var SelectArrow = React322.forwardRef((props, forwardedRef) => {
17827
+ var SelectArrow = React34.forwardRef((props, forwardedRef) => {
17729
17828
  const { __scopeSelect, ...arrowProps } = props;
17730
17829
  const popperScope = usePopperScope(__scopeSelect);
17731
17830
  const context = useSelectContext(ARROW_NAME2, __scopeSelect);
17732
17831
  const contentContext = useSelectContentContext(ARROW_NAME2, __scopeSelect);
17733
- return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx192(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
17832
+ return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx212(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
17734
17833
  });
17735
17834
  SelectArrow.displayName = ARROW_NAME2;
17736
17835
  function shouldShowPlaceholder(value) {
17737
17836
  return value === "" || value === undefined;
17738
17837
  }
17739
- var BubbleSelect = React322.forwardRef((props, forwardedRef) => {
17838
+ var BubbleSelect = React34.forwardRef((props, forwardedRef) => {
17740
17839
  const { value, ...selectProps } = props;
17741
- const ref = React322.useRef(null);
17840
+ const ref = React34.useRef(null);
17742
17841
  const composedRefs = useComposedRefs(forwardedRef, ref);
17743
17842
  const prevValue = usePrevious(value);
17744
- React322.useEffect(() => {
17843
+ React34.useEffect(() => {
17745
17844
  const select = ref.current;
17746
17845
  const selectProto = window.HTMLSelectElement.prototype;
17747
17846
  const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
@@ -17752,14 +17851,14 @@ var BubbleSelect = React322.forwardRef((props, forwardedRef) => {
17752
17851
  select.dispatchEvent(event);
17753
17852
  }
17754
17853
  }, [prevValue, value]);
17755
- return /* @__PURE__ */ jsx192(VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsx192("select", { ...selectProps, ref: composedRefs, defaultValue: value }) });
17854
+ return /* @__PURE__ */ jsx212(VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsx212("select", { ...selectProps, ref: composedRefs, defaultValue: value }) });
17756
17855
  });
17757
17856
  BubbleSelect.displayName = "BubbleSelect";
17758
17857
  function useTypeaheadSearch(onSearchChange) {
17759
17858
  const handleSearchChange = useCallbackRef(onSearchChange);
17760
- const searchRef = React322.useRef("");
17761
- const timerRef = React322.useRef(0);
17762
- const handleTypeaheadSearch = React322.useCallback((key) => {
17859
+ const searchRef = React34.useRef("");
17860
+ const timerRef = React34.useRef(0);
17861
+ const handleTypeaheadSearch = React34.useCallback((key) => {
17763
17862
  const search = searchRef.current + key;
17764
17863
  handleSearchChange(search);
17765
17864
  (function updateSearch(value) {
@@ -17769,11 +17868,11 @@ function useTypeaheadSearch(onSearchChange) {
17769
17868
  timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
17770
17869
  })(search);
17771
17870
  }, [handleSearchChange]);
17772
- const resetTypeahead = React322.useCallback(() => {
17871
+ const resetTypeahead = React34.useCallback(() => {
17773
17872
  searchRef.current = "";
17774
17873
  window.clearTimeout(timerRef.current);
17775
17874
  }, []);
17776
- React322.useEffect(() => {
17875
+ React34.useEffect(() => {
17777
17876
  return () => window.clearTimeout(timerRef.current);
17778
17877
  }, []);
17779
17878
  return [searchRef, handleTypeaheadSearch, resetTypeahead];
@@ -17862,104 +17961,104 @@ var ChevronDown = createLucideIcon("ChevronDown", [
17862
17961
  var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
17863
17962
  var Select2 = Root222;
17864
17963
  var SelectValue2 = Value;
17865
- var SelectTrigger2 = React332.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs4(Trigger, {
17964
+ var SelectTrigger2 = React352.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
17866
17965
  ref,
17867
17966
  className: cn("flex h-10 w-full items-center justify-between rounded-md border-black border-2 border-b-4 bg-card-bg px-3 py-5 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 font-brand", className),
17868
17967
  ...props,
17869
17968
  children: [
17870
17969
  children,
17871
- /* @__PURE__ */ jsx202(Icon, {
17970
+ /* @__PURE__ */ jsx223(Icon, {
17872
17971
  asChild: true,
17873
- children: /* @__PURE__ */ jsx202(ChevronDown, {
17972
+ children: /* @__PURE__ */ jsx223(ChevronDown, {
17874
17973
  className: "h-4 w-4 opacity-50"
17875
17974
  })
17876
17975
  })
17877
17976
  ]
17878
17977
  }));
17879
17978
  SelectTrigger2.displayName = Trigger.displayName;
17880
- var SelectScrollUpButton2 = React332.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx202(ScrollUpButton, {
17979
+ var SelectScrollUpButton2 = React352.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(ScrollUpButton, {
17881
17980
  ref,
17882
17981
  className: cn("flex cursor-default items-center justify-center py-1", className),
17883
17982
  ...props,
17884
- children: /* @__PURE__ */ jsx202(ChevronUp, {
17983
+ children: /* @__PURE__ */ jsx223(ChevronUp, {
17885
17984
  className: "h-4 w-4"
17886
17985
  })
17887
17986
  }));
17888
17987
  SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
17889
- var SelectScrollDownButton2 = React332.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx202(ScrollDownButton, {
17988
+ var SelectScrollDownButton2 = React352.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(ScrollDownButton, {
17890
17989
  ref,
17891
17990
  className: cn("flex cursor-default items-center justify-center py-1", className),
17892
17991
  ...props,
17893
- children: /* @__PURE__ */ jsx202(ChevronDown, {
17992
+ children: /* @__PURE__ */ jsx223(ChevronDown, {
17894
17993
  className: "h-4 w-4"
17895
17994
  })
17896
17995
  }));
17897
17996
  SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
17898
- var SelectContent2 = React332.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx202(Portal2, {
17899
- children: /* @__PURE__ */ jsxs4(Content2, {
17997
+ var SelectContent2 = React352.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx223(Portal2, {
17998
+ children: /* @__PURE__ */ jsxs5(Content2, {
17900
17999
  ref,
17901
18000
  className: cn(" border-2 border-black relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md font-brand bg-card-bg text-text shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
17902
18001
  position,
17903
18002
  ...props,
17904
18003
  children: [
17905
- /* @__PURE__ */ jsx202(SelectScrollUpButton2, {}),
17906
- /* @__PURE__ */ jsx202(Viewport, {
18004
+ /* @__PURE__ */ jsx223(SelectScrollUpButton2, {}),
18005
+ /* @__PURE__ */ jsx223(Viewport, {
17907
18006
  className: cn("p-1", position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),
17908
18007
  children
17909
18008
  }),
17910
- /* @__PURE__ */ jsx202(SelectScrollDownButton2, {})
18009
+ /* @__PURE__ */ jsx223(SelectScrollDownButton2, {})
17911
18010
  ]
17912
18011
  })
17913
18012
  }));
17914
18013
  SelectContent2.displayName = Content2.displayName;
17915
- var SelectLabel2 = React332.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx202(Label, {
18014
+ var SelectLabel2 = React352.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(Label, {
17916
18015
  ref,
17917
18016
  className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
17918
18017
  ...props
17919
18018
  }));
17920
18019
  SelectLabel2.displayName = Label.displayName;
17921
- var SelectItem2 = React332.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs4(Item, {
18020
+ var SelectItem2 = React352.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
17922
18021
  ref,
17923
18022
  className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-slate-200 dark:focus:bg-white/10 data-disabled:pointer-events-none data-disabled:opacity-50 font-brand", className),
17924
18023
  ...props,
17925
18024
  children: [
17926
- /* @__PURE__ */ jsx202("span", {
18025
+ /* @__PURE__ */ jsx223("span", {
17927
18026
  className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
17928
- children: /* @__PURE__ */ jsx202(ItemIndicator, {
17929
- children: /* @__PURE__ */ jsx202(Check, {
18027
+ children: /* @__PURE__ */ jsx223(ItemIndicator, {
18028
+ children: /* @__PURE__ */ jsx223(Check, {
17930
18029
  className: "h-4 w-4"
17931
18030
  })
17932
18031
  })
17933
18032
  }),
17934
- /* @__PURE__ */ jsx202(ItemText, {
18033
+ /* @__PURE__ */ jsx223(ItemText, {
17935
18034
  children
17936
18035
  })
17937
18036
  ]
17938
18037
  }));
17939
18038
  SelectItem2.displayName = Item.displayName;
17940
- var SelectSeparator2 = React332.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx202(Separator, {
18039
+ var SelectSeparator2 = React352.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(Separator, {
17941
18040
  ref,
17942
18041
  className: cn("-mx-1 my-1 h-px bg-muted", className),
17943
18042
  ...props
17944
18043
  }));
17945
18044
  SelectSeparator2.displayName = Separator.displayName;
17946
18045
  var Switch = ({ active, onToggle }) => {
17947
- return /* @__PURE__ */ jsx212("div", {
18046
+ return /* @__PURE__ */ jsx232("div", {
17948
18047
  "data-active": active,
17949
18048
  className: "h-8 transition-all rounded-full w-14 border-2 border-b-4 bg-gray-200 p-[2px] cursor-pointer data-[active=true]:bg-brand border-black relative",
17950
18049
  onClick: onToggle,
17951
- children: /* @__PURE__ */ jsx212("div", {
18050
+ children: /* @__PURE__ */ jsx232("div", {
17952
18051
  "data-active": active,
17953
18052
  className: "h-4 w-4 box-content left-[4px] top-[3px] transition-all rounded-full bg-white border-2 border-black absolute data-[active=true]:left-[calc(100%-24px)]"
17954
18053
  })
17955
18054
  });
17956
18055
  };
17957
18056
  var Triangle2 = (props) => {
17958
- return /* @__PURE__ */ jsx223("svg", {
18057
+ return /* @__PURE__ */ jsx242("svg", {
17959
18058
  viewBox: "0 0 127 131",
17960
18059
  fill: "none",
17961
18060
  ...props,
17962
- children: /* @__PURE__ */ jsx223("path", {
18061
+ children: /* @__PURE__ */ jsx242("path", {
17963
18062
  d: "M28.5644 0.011261C25.8196 0.159241 23.6077 0.591782 21.3786 1.43413C20.2669 1.84959 18.4446 2.75455 17.4418 3.38062C13.2472 5.993 10.0496 9.9201 8.38209 14.4903C8.04973 15.3953 7.15007 18.2809 6.5713 20.2672C2.71476 33.5453 0.525761 48.0643 0.0558711 63.4312C-0.0186237 65.8785 -0.0186237 71.7066 0.0558711 74.1141C0.371041 84.3018 1.35093 93.4992 3.12735 102.879C3.84937 106.675 5.00691 111.774 5.67736 114.091C7.04692 118.798 9.84334 122.805 13.8202 125.741C16.4848 127.711 19.5105 129.031 22.8627 129.68C24.4787 129.993 26.6104 130.135 28.1805 130.033C30.3523 129.89 34.6616 129.316 38.1628 128.695C53.9442 125.901 68.5223 120.898 81.7422 113.738C90.1143 109.202 97.2715 104.29 104.177 98.3312C111.059 92.4007 116.927 86.0206 122.09 78.8608C123.287 77.2045 123.889 76.237 124.491 75.019C126.038 71.8773 126.766 68.7527 126.76 65.2582C126.76 62.0027 126.141 59.1114 124.806 56.1518C124.164 54.7233 123.551 53.6988 122.176 51.7523C117.11 44.5868 111.489 38.3433 104.635 32.2762C94.011 22.8739 81.3927 15.1619 67.3017 9.45339C64.2474 8.21835 61.239 7.13128 57.6174 5.95315C49.9502 3.46598 40.4607 1.30891 32.4324 0.233231C31.1718 0.0624847 29.4584 -0.0342712 28.5644 0.011261Z",
17964
18063
  fill: "currentcolor"
17965
18064
  })
@@ -17968,7 +18067,7 @@ var Triangle2 = (props) => {
17968
18067
 
17969
18068
  // src/components/design.tsx
17970
18069
  import { useCallback as useCallback26, useState as useState34 } from "react";
17971
- import { jsx as jsx39, jsxs as jsxs5 } from "react/jsx-runtime";
18070
+ import { jsx as jsx39, jsxs as jsxs6 } from "react/jsx-runtime";
17972
18071
  var Explainer = ({ children }) => {
17973
18072
  return /* @__PURE__ */ jsx39("div", {
17974
18073
  children: /* @__PURE__ */ jsx39("div", {
@@ -17981,15 +18080,22 @@ var DesignPage = () => {
17981
18080
  const [count3, setCount] = useState34(10);
17982
18081
  const [active, setActive] = useState34(false);
17983
18082
  const [submitButtonActive, setSubmitButtonActive] = useState34(true);
18083
+ const [submitButtonPrimaryActive, setSubmitButtonPrimaryActive] = useState34(true);
17984
18084
  const onClick = useCallback26(() => {
17985
18085
  setSubmitButtonActive(false);
17986
18086
  setTimeout(() => {
17987
18087
  setSubmitButtonActive(true);
17988
18088
  }, 1000);
17989
18089
  }, []);
18090
+ const onClickPrimary = useCallback26(() => {
18091
+ setSubmitButtonPrimaryActive(false);
18092
+ setTimeout(() => {
18093
+ setSubmitButtonPrimaryActive(true);
18094
+ }, 1000);
18095
+ }, []);
17990
18096
  return /* @__PURE__ */ jsx39("div", {
17991
18097
  className: "bg-[var(--background)] relative",
17992
- children: /* @__PURE__ */ jsxs5("div", {
18098
+ children: /* @__PURE__ */ jsxs6("div", {
17993
18099
  className: "max-w-[800px] mx-auto pt-10 pb-10 px-4",
17994
18100
  children: [
17995
18101
  /* @__PURE__ */ jsx39("h1", {
@@ -18017,7 +18123,7 @@ var DesignPage = () => {
18017
18123
  /* @__PURE__ */ jsx39(Explainer, {
18018
18124
  children: "Disabled"
18019
18125
  }),
18020
- /* @__PURE__ */ jsxs5(Button, {
18126
+ /* @__PURE__ */ jsxs6(Button, {
18021
18127
  disabled: true,
18022
18128
  children: [
18023
18129
  "Don't",
@@ -18038,10 +18144,39 @@ var DesignPage = () => {
18038
18144
  }),
18039
18145
  /* @__PURE__ */ jsx39(Button, {
18040
18146
  onClick,
18041
- disabled: !submitButtonActive,
18147
+ loading: !submitButtonActive,
18042
18148
  children: "Submit"
18043
18149
  }),
18044
18150
  /* @__PURE__ */ jsx39("br", {}),
18151
+ /* @__PURE__ */ jsx39(Explainer, {
18152
+ children: "Click to disable (primary)"
18153
+ }),
18154
+ /* @__PURE__ */ jsx39(Button, {
18155
+ onClick: onClickPrimary,
18156
+ className: "bg-brand text-white",
18157
+ loading: !submitButtonPrimaryActive,
18158
+ children: "Submit"
18159
+ }),
18160
+ /* @__PURE__ */ jsx39("br", {}),
18161
+ /* @__PURE__ */ jsx39(Explainer, {
18162
+ children: "Loading state"
18163
+ }),
18164
+ /* @__PURE__ */ jsx39(Button, {
18165
+ onClick,
18166
+ loading: true,
18167
+ children: "Loading"
18168
+ }),
18169
+ /* @__PURE__ */ jsx39("br", {}),
18170
+ /* @__PURE__ */ jsx39(Explainer, {
18171
+ children: "Loading state (primary)"
18172
+ }),
18173
+ /* @__PURE__ */ jsx39(Button, {
18174
+ onClick,
18175
+ className: "bg-brand text-white",
18176
+ loading: true,
18177
+ children: "Loading"
18178
+ }),
18179
+ /* @__PURE__ */ jsx39("br", {}),
18045
18180
  /* @__PURE__ */ jsx39(Explainer, {
18046
18181
  children: "Rounded"
18047
18182
  }),
@@ -18103,7 +18238,7 @@ var DesignPage = () => {
18103
18238
  className: "text-brand",
18104
18239
  children: "<Card />"
18105
18240
  }),
18106
- /* @__PURE__ */ jsxs5(Card, {
18241
+ /* @__PURE__ */ jsxs6(Card, {
18107
18242
  className: "px-4 py-4",
18108
18243
  children: [
18109
18244
  /* @__PURE__ */ jsx39("h3", {
@@ -18121,7 +18256,7 @@ var DesignPage = () => {
18121
18256
  className: "text-brand",
18122
18257
  children: "<Select />"
18123
18258
  }),
18124
- /* @__PURE__ */ jsxs5(Select2, {
18259
+ /* @__PURE__ */ jsxs6(Select2, {
18125
18260
  defaultValue: "option1",
18126
18261
  children: [
18127
18262
  /* @__PURE__ */ jsx39(SelectTrigger2, {
@@ -18130,7 +18265,7 @@ var DesignPage = () => {
18130
18265
  placeholder: "Select an option"
18131
18266
  })
18132
18267
  }),
18133
- /* @__PURE__ */ jsxs5(SelectContent2, {
18268
+ /* @__PURE__ */ jsxs6(SelectContent2, {
18134
18269
  children: [
18135
18270
  /* @__PURE__ */ jsx39(SelectItem2, {
18136
18271
  value: "option1",
@@ -18147,6 +18282,42 @@ var DesignPage = () => {
18147
18282
  ]
18148
18283
  })
18149
18284
  ]
18285
+ }),
18286
+ /* @__PURE__ */ jsx39("br", {}),
18287
+ /* @__PURE__ */ jsx39("h2", {
18288
+ className: "text-brand",
18289
+ children: "<Input />"
18290
+ }),
18291
+ /* @__PURE__ */ jsx39(Input, {
18292
+ placeholder: "Enter your email"
18293
+ }),
18294
+ /* @__PURE__ */ jsx39("br", {}),
18295
+ /* @__PURE__ */ jsx39("br", {}),
18296
+ /* @__PURE__ */ jsx39("br", {}),
18297
+ /* @__PURE__ */ jsx39("h1", {
18298
+ children: "Example form set"
18299
+ }),
18300
+ /* @__PURE__ */ jsx39("br", {}),
18301
+ /* @__PURE__ */ jsx39("h2", {
18302
+ children: "Change email"
18303
+ }),
18304
+ /* @__PURE__ */ jsx39("p", {
18305
+ className: "font-brand",
18306
+ children: "A email will be sent to the new email address. You will need to click on the link in the email to confirm the change."
18307
+ }),
18308
+ /* @__PURE__ */ jsx39(Input, {
18309
+ placeholder: "Enter your email",
18310
+ className: "w-full block"
18311
+ }),
18312
+ /* @__PURE__ */ jsx39("div", {
18313
+ className: "h-2"
18314
+ }),
18315
+ /* @__PURE__ */ jsx39("div", {
18316
+ className: "flex flex-row justify-end",
18317
+ children: /* @__PURE__ */ jsx39(Button, {
18318
+ className: "bg-brand text-white",
18319
+ children: "Change"
18320
+ })
18150
18321
  })
18151
18322
  ]
18152
18323
  })