@remotion/promo-pages 4.0.490 → 4.0.492

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.
@@ -33,9 +33,9 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
33
33
  });
34
34
 
35
35
  // ../design/dist/esm/index.mjs
36
- import * as React23 from "react";
36
+ import * as React24 from "react";
37
37
  import * as React3 from "react";
38
- import { Fragment as Fragment2, jsx as jsx43 } from "react/jsx-runtime";
38
+ import { Fragment as Fragment22, jsx as jsx43 } from "react/jsx-runtime";
39
39
  import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
40
40
 
41
41
  // ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
@@ -1378,7 +1378,7 @@ var getDefaultConfig = () => {
1378
1378
  var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
1379
1379
 
1380
1380
  // ../design/dist/esm/index.mjs
1381
- import React32, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
1381
+ import React33, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
1382
1382
 
1383
1383
  // ../paths/dist/esm/index.mjs
1384
1384
  var cutLInstruction = ({
@@ -4171,6 +4171,7 @@ import * as React6 from "react";
4171
4171
  import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
4172
4172
  import { useContext as useContext8, useMemo as useMemo7 } from "react";
4173
4173
  import { jsx as jsx7 } from "react/jsx-runtime";
4174
+ import React9 from "react";
4174
4175
  import {
4175
4176
  forwardRef as forwardRef3,
4176
4177
  useCallback as useCallback6,
@@ -4196,11 +4197,11 @@ import { useContext as useContext13 } from "react";
4196
4197
  import { useContext as useContext12, useMemo as useMemo10 } from "react";
4197
4198
  import { jsx as jsx9 } from "react/jsx-runtime";
4198
4199
  import { createContext as createContext14 } from "react";
4199
- import React11, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
4200
+ import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
4200
4201
  import { jsx as jsx10 } from "react/jsx-runtime";
4201
- import React12, { createContext as createContext15 } from "react";
4202
+ import React13, { createContext as createContext15 } from "react";
4202
4203
  import { jsx as jsx11 } from "react/jsx-runtime";
4203
- import React13, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
4204
+ import React14, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
4204
4205
  import { useContext as useContext15, useRef as useRef5 } from "react";
4205
4206
  import { createContext as createContext16 } from "react";
4206
4207
  import { jsx as jsx12 } from "react/jsx-runtime";
@@ -4212,7 +4213,7 @@ import {
4212
4213
  useRef as useRef9,
4213
4214
  useState as useState6
4214
4215
  } from "react";
4215
- import React15, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
4216
+ import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
4216
4217
  import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
4217
4218
  import { jsx as jsx13 } from "react/jsx-runtime";
4218
4219
  import { jsx as jsx14 } from "react/jsx-runtime";
@@ -4228,7 +4229,7 @@ import {
4228
4229
  } from "react";
4229
4230
  import { jsx as jsx15 } from "react/jsx-runtime";
4230
4231
  import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
4231
- import React16, { createContext as createContext18, useMemo as useMemo18 } from "react";
4232
+ import React17, { createContext as createContext18, useMemo as useMemo18 } from "react";
4232
4233
  import { jsx as jsx16 } from "react/jsx-runtime";
4233
4234
  import { useContext as useContext19 } from "react";
4234
4235
  import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
@@ -4236,7 +4237,7 @@ import { jsx as jsx17 } from "react/jsx-runtime";
4236
4237
  import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
4237
4238
  import { jsx as jsx18 } from "react/jsx-runtime";
4238
4239
  import { useCallback as useCallback13 } from "react";
4239
- import React22, {
4240
+ import React23, {
4240
4241
  forwardRef as forwardRef5,
4241
4242
  useContext as useContext28,
4242
4243
  useEffect as useEffect14,
@@ -4246,7 +4247,7 @@ import React22, {
4246
4247
  useState as useState14
4247
4248
  } from "react";
4248
4249
  import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
4249
- import React19, {
4250
+ import React20, {
4250
4251
  createContext as createContext21,
4251
4252
  createRef as createRef2,
4252
4253
  useCallback as useCallback9,
@@ -4270,7 +4271,7 @@ import {
4270
4271
  } from "react";
4271
4272
  import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
4272
4273
  import { useContext as useContext25, useMemo as useMemo24 } from "react";
4273
- import React20, {
4274
+ import React21, {
4274
4275
  useCallback as useCallback10,
4275
4276
  useContext as useContext24,
4276
4277
  useEffect as useEffect9,
@@ -4280,7 +4281,7 @@ import React20, {
4280
4281
  useState as useState12
4281
4282
  } from "react";
4282
4283
  import { jsx as jsx20 } from "react/jsx-runtime";
4283
- import React21 from "react";
4284
+ import React22 from "react";
4284
4285
  import { useEffect as useEffect10, useState as useState13 } from "react";
4285
4286
  import { useEffect as useEffect11, useRef as useRef17 } from "react";
4286
4287
  import { useEffect as useEffect13 } from "react";
@@ -4338,10 +4339,10 @@ import {
4338
4339
  useState as useState18
4339
4340
  } from "react";
4340
4341
  import { jsx as jsx28 } from "react/jsx-runtime";
4341
- import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
4342
+ import React30, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
4342
4343
  import { jsx as jsx29 } from "react/jsx-runtime";
4343
4344
  import { createRef as createRef3 } from "react";
4344
- import React30 from "react";
4345
+ import React31 from "react";
4345
4346
  import {
4346
4347
  useCallback as useCallback21,
4347
4348
  useImperativeHandle as useImperativeHandle8,
@@ -4350,14 +4351,14 @@ import {
4350
4351
  useState as useState19
4351
4352
  } from "react";
4352
4353
  import { jsx as jsx30 } from "react/jsx-runtime";
4353
- import React31 from "react";
4354
+ import React32 from "react";
4354
4355
  import { useMemo as useMemo34 } from "react";
4355
4356
  import { createContext as createContext24, useContext as useContext34, useMemo as useMemo33 } from "react";
4356
4357
  import { jsx as jsx31 } from "react/jsx-runtime";
4357
4358
  import { jsx as jsx32 } from "react/jsx-runtime";
4358
- import React33 from "react";
4359
- import React34, { createContext as createContext25 } from "react";
4360
- import React35, { useContext as useContext35 } from "react";
4359
+ import React34 from "react";
4360
+ import React35, { createContext as createContext25 } from "react";
4361
+ import React36, { useContext as useContext35 } from "react";
4361
4362
  import { useCallback as useCallback24 } from "react";
4362
4363
  import {
4363
4364
  useCallback as useCallback22,
@@ -4368,7 +4369,7 @@ import {
4368
4369
  useState as useState20
4369
4370
  } from "react";
4370
4371
  import { jsx as jsx33 } from "react/jsx-runtime";
4371
- import React37, {
4372
+ import React38, {
4372
4373
  forwardRef as forwardRef13,
4373
4374
  useCallback as useCallback23,
4374
4375
  useContext as useContext37,
@@ -4381,16 +4382,15 @@ import React37, {
4381
4382
  import { useEffect as useEffect18 } from "react";
4382
4383
  import { jsx as jsx34 } from "react/jsx-runtime";
4383
4384
  import { jsx as jsx35 } from "react/jsx-runtime";
4384
- import React39, { useMemo as useMemo37 } from "react";
4385
+ import React40, { useMemo as useMemo37 } from "react";
4385
4386
  import { jsx as jsx36 } from "react/jsx-runtime";
4386
- import {
4387
- Children,
4387
+ import React42, {
4388
4388
  forwardRef as forwardRef14,
4389
4389
  useMemo as useMemo38
4390
4390
  } from "react";
4391
- import React40 from "react";
4392
- import { jsx as jsx37 } from "react/jsx-runtime";
4393
- import React42 from "react";
4391
+ import React41 from "react";
4392
+ import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
4393
+ import React43 from "react";
4394
4394
  import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
4395
4395
  import {
4396
4396
  forwardRef as forwardRef15,
@@ -5468,6 +5468,7 @@ var InnerComposition = ({
5468
5468
  }
5469
5469
  const { folderName, parentName } = useContext9(FolderContext);
5470
5470
  const stack = compProps.stack ?? null;
5471
+ const componentFromProps = "component" in compProps ? compProps.component : null;
5471
5472
  useEffect2(() => {
5472
5473
  if (!id) {
5473
5474
  throw new Error("No id for composition passed.");
@@ -5485,6 +5486,7 @@ var InnerComposition = ({
5485
5486
  defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
5486
5487
  nonce: nonce.get(),
5487
5488
  parentFolderName: parentName,
5489
+ componentFromProps,
5488
5490
  schema: schema ?? null,
5489
5491
  calculateMetadata: compProps.calculateMetadata ?? null,
5490
5492
  stack
@@ -5503,6 +5505,7 @@ var InnerComposition = ({
5503
5505
  width,
5504
5506
  nonce,
5505
5507
  parentName,
5508
+ componentFromProps,
5506
5509
  schema,
5507
5510
  compProps.calculateMetadata,
5508
5511
  stack,
@@ -5561,11 +5564,30 @@ var Composition = (props) => {
5561
5564
  });
5562
5565
  };
5563
5566
  var componentsToAddStacksTo = [];
5567
+ var sequenceComponent = null;
5564
5568
  var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
5565
5569
  var addSequenceStackTraces = (component) => {
5566
5570
  componentsToAddStacksTo.push(component);
5567
5571
  };
5568
- var VERSION = "4.0.490";
5572
+ var setSequenceComponent = (component) => {
5573
+ sequenceComponent = component;
5574
+ };
5575
+ var getSequenceComponent = () => sequenceComponent;
5576
+ var getSingleChildComponent = (children) => {
5577
+ const mountedChildren = React9.Children.toArray(children);
5578
+ if (mountedChildren.length !== 1) {
5579
+ return null;
5580
+ }
5581
+ const child = mountedChildren[0];
5582
+ if (!React9.isValidElement(child)) {
5583
+ return null;
5584
+ }
5585
+ if (typeof child.type !== "function" && typeof child.type !== "object") {
5586
+ return null;
5587
+ }
5588
+ return child.type;
5589
+ };
5590
+ var VERSION = "4.0.492";
5569
5591
  var checkMultipleRemotionVersions = () => {
5570
5592
  if (typeof globalThis === "undefined") {
5571
5593
  return;
@@ -6165,7 +6187,7 @@ var sequenceSchemaDefaultLayoutNone = {
6165
6187
  var PremountContext = createContext14({
6166
6188
  premountFramesRemaining: 0
6167
6189
  });
6168
- var SequenceManager = React11.createContext({
6190
+ var SequenceManager = React12.createContext({
6169
6191
  registerSequence: () => {
6170
6192
  throw new Error("SequenceManagerContext not initialized");
6171
6193
  },
@@ -6174,19 +6196,19 @@ var SequenceManager = React11.createContext({
6174
6196
  },
6175
6197
  sequences: []
6176
6198
  });
6177
- var SequenceManagerRefContext = React11.createContext({
6199
+ var SequenceManagerRefContext = React12.createContext({
6178
6200
  current: []
6179
6201
  });
6180
6202
  var makeSequencePropsSubscriptionKey = (key) => {
6181
- return `${key.nodePath.join(".")}.${key.sequenceKeys.join(".")}.${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
6203
+ return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
6182
6204
  };
6183
- var VisualModePropStatusesContext = React11.createContext({
6205
+ var VisualModePropStatusesContext = React12.createContext({
6184
6206
  propStatuses: {}
6185
6207
  });
6186
- var VisualModePropStatusesRefContext = React11.createContext({
6208
+ var VisualModePropStatusesRefContext = React12.createContext({
6187
6209
  current: {}
6188
6210
  });
6189
- var VisualModeDragOverridesContext = React11.createContext({
6211
+ var VisualModeDragOverridesContext = React12.createContext({
6190
6212
  getDragOverrides: () => {
6191
6213
  throw new Error("VisualModeDragOverridesContext not initialized");
6192
6214
  },
@@ -6194,7 +6216,7 @@ var VisualModeDragOverridesContext = React11.createContext({
6194
6216
  throw new Error("VisualModeDragOverridesContext not initialized");
6195
6217
  }
6196
6218
  });
6197
- var VisualModeSettersContext = React11.createContext({
6219
+ var VisualModeSettersContext = React12.createContext({
6198
6220
  setDragOverrides: () => {
6199
6221
  throw new Error("VisualModeSettersContext not initialized");
6200
6222
  },
@@ -6358,7 +6380,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
6358
6380
  });
6359
6381
  };
6360
6382
  var useRequireToBeInsideSeries = () => {
6361
- const isInsideSeries = React12.useContext(IsInsideSeriesContext);
6383
+ const isInsideSeries = React13.useContext(IsInsideSeriesContext);
6362
6384
  if (!isInsideSeries) {
6363
6385
  throw new Error("This component must be inside a <Series /> component.");
6364
6386
  }
@@ -8427,6 +8449,9 @@ var computeEffectiveSchemaValuesDotNotation = ({
8427
8449
  shouldResortToDefaultValueIfUndefined: false
8428
8450
  });
8429
8451
  }
8452
+ if (field?.type === "asset" && typeof value === "string" && value.startsWith(FILE_TOKEN)) {
8453
+ value = `${window.remotion_staticBase}/${value.slice(FILE_TOKEN.length)}`;
8454
+ }
8430
8455
  if (value === undefined) {
8431
8456
  propsToDelete.add(key);
8432
8457
  }
@@ -8525,7 +8550,7 @@ var withInteractivitySchema = ({
8525
8550
  const Wrapped = forwardRef2((props, ref) => {
8526
8551
  const env = useRemotionEnvironment();
8527
8552
  if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
8528
- return React13.createElement(Component, {
8553
+ return React14.createElement(Component, {
8529
8554
  ...props,
8530
8555
  controls: null,
8531
8556
  ref
@@ -8536,7 +8561,7 @@ var withInteractivitySchema = ({
8536
8561
  const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
8537
8562
  const frame = useCurrentFrame();
8538
8563
  if (props.controls) {
8539
- return React13.createElement(Component, {
8564
+ return React14.createElement(Component, {
8540
8565
  ...props,
8541
8566
  ref
8542
8567
  });
@@ -8594,7 +8619,7 @@ var withInteractivitySchema = ({
8594
8619
  schemaKeys: activeKeys,
8595
8620
  propsToDelete
8596
8621
  });
8597
- return React13.createElement(Component, {
8622
+ return React14.createElement(Component, {
8598
8623
  ...mergedProps,
8599
8624
  controls,
8600
8625
  ref
@@ -8620,6 +8645,7 @@ var RegularSequenceRefForwardingFunction = ({
8620
8645
  _remotionInternalLoopDisplay: loopDisplay,
8621
8646
  _remotionInternalStack: stack,
8622
8647
  _remotionInternalDocumentationLink: documentationLink,
8648
+ _remotionInternalSingleChildComponent: singleChildComponent,
8623
8649
  _remotionInternalPremountDisplay: premountDisplay,
8624
8650
  _remotionInternalPostmountDisplay: postmountDisplay,
8625
8651
  _remotionInternalIsMedia: isMedia,
@@ -8766,7 +8792,8 @@ var RegularSequenceRefForwardingFunction = ({
8766
8792
  getStack: () => stackRef.current,
8767
8793
  refForOutline: refForOutline ?? null,
8768
8794
  isInsideSeries,
8769
- frozenFrame: registeredFrozenFrame
8795
+ frozenFrame: registeredFrozenFrame,
8796
+ singleChildComponent: singleChildComponent ?? null
8770
8797
  });
8771
8798
  } else {
8772
8799
  registerSequence({
@@ -8791,11 +8818,13 @@ var RegularSequenceRefForwardingFunction = ({
8791
8818
  src: isMedia.data.src,
8792
8819
  getStack: () => stackRef.current,
8793
8820
  startMediaFrom: startMediaFrom ?? isMedia.data.startMediaFrom,
8821
+ mediaFrameAtSequenceZero,
8794
8822
  volume: isMedia.data.volumes,
8795
8823
  refForOutline: refForOutline ?? null,
8796
8824
  isInsideSeries,
8797
8825
  frozenFrame: registeredFrozenFrame,
8798
- frozenMediaFrame
8826
+ frozenMediaFrame,
8827
+ singleChildComponent: singleChildComponent ?? null
8799
8828
  });
8800
8829
  }
8801
8830
  return () => {
@@ -8822,7 +8851,8 @@ var RegularSequenceRefForwardingFunction = ({
8822
8851
  effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
8823
8852
  refForOutline: refForOutline ?? null,
8824
8853
  isInsideSeries,
8825
- frozenFrame: registeredFrozenFrame
8854
+ frozenFrame: registeredFrozenFrame,
8855
+ singleChildComponent: singleChildComponent ?? null
8826
8856
  });
8827
8857
  return () => {
8828
8858
  unregisterSequence(id);
@@ -8854,7 +8884,9 @@ var RegularSequenceRefForwardingFunction = ({
8854
8884
  isInsideSeries,
8855
8885
  registeredFrozenFrame,
8856
8886
  startMediaFrom,
8857
- frozenMediaFrame
8887
+ mediaFrameAtSequenceZero,
8888
+ frozenMediaFrame,
8889
+ singleChildComponent
8858
8890
  ]);
8859
8891
  const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
8860
8892
  const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
@@ -9356,7 +9388,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
9356
9388
  ...props
9357
9389
  });
9358
9390
  };
9359
- var Canvas = React15.forwardRef(CanvasRefForwardingFunction);
9391
+ var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
9360
9392
  var CACHE_SIZE = 5;
9361
9393
  var getActualTime = ({
9362
9394
  loopBehavior,
@@ -9517,6 +9549,12 @@ var resolveAnimatedImageSource = (src) => {
9517
9549
  return new URL(src, window.origin).href;
9518
9550
  };
9519
9551
  var animatedImageSchema = {
9552
+ src: {
9553
+ type: "asset",
9554
+ default: undefined,
9555
+ description: "Source",
9556
+ keyframable: false
9557
+ },
9520
9558
  ...baseSchema,
9521
9559
  playbackRate: {
9522
9560
  type: "number",
@@ -9934,7 +9972,7 @@ var calculateMediaDuration = ({
9934
9972
  };
9935
9973
  var LoopContext = createContext18(null);
9936
9974
  var useLoop = () => {
9937
- return React16.useContext(LoopContext);
9975
+ return React17.useContext(LoopContext);
9938
9976
  };
9939
9977
  var Loop = ({
9940
9978
  durationInFrames,
@@ -10785,7 +10823,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10785
10823
  };
10786
10824
  });
10787
10825
  }, [audioContext, numberOfAudioTags]);
10788
- const effectToUse = React19.useInsertionEffect ?? React19.useLayoutEffect;
10826
+ const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
10789
10827
  effectToUse(() => {
10790
10828
  return () => {
10791
10829
  requestAnimationFrame(() => {
@@ -10804,7 +10842,9 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10804
10842
  return;
10805
10843
  }
10806
10844
  if (data === undefined) {
10807
- current.src = EMPTY_AUDIO;
10845
+ if (current.src !== EMPTY_AUDIO) {
10846
+ current.src = EMPTY_AUDIO;
10847
+ }
10808
10848
  return;
10809
10849
  }
10810
10850
  if (!data) {
@@ -10873,7 +10913,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10873
10913
  if (prevA.id === id) {
10874
10914
  const isTheSame = compareProps(aud, prevA.props) && prevA.premounting === premounting && prevA.postmounting === postmounting;
10875
10915
  if (isTheSame) {
10876
- return prevA;
10916
+ return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
10877
10917
  }
10878
10918
  changed = true;
10879
10919
  return {
@@ -10885,7 +10925,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10885
10925
  audioMounted
10886
10926
  };
10887
10927
  }
10888
- return prevA;
10928
+ return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
10889
10929
  });
10890
10930
  if (changed) {
10891
10931
  rerenderAudios();
@@ -10924,16 +10964,19 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10924
10964
  unregisterAudio,
10925
10965
  updateAudio
10926
10966
  ]);
10967
+ const sharedAudioTagElements = useMemo21(() => {
10968
+ return refs.map(({ id, ref }) => {
10969
+ return /* @__PURE__ */ jsx19("audio", {
10970
+ ref,
10971
+ preload: "metadata",
10972
+ src: EMPTY_AUDIO
10973
+ }, id);
10974
+ });
10975
+ }, [refs]);
10927
10976
  return /* @__PURE__ */ jsxs2(SharedAudioTagsContext.Provider, {
10928
10977
  value: audioTagsValue,
10929
10978
  children: [
10930
- refs.map(({ id, ref }) => {
10931
- return /* @__PURE__ */ jsx19("audio", {
10932
- ref,
10933
- preload: "metadata",
10934
- src: EMPTY_AUDIO
10935
- }, id);
10936
- }),
10979
+ sharedAudioTagElements,
10937
10980
  children
10938
10981
  ]
10939
10982
  });
@@ -10950,7 +10993,7 @@ var useSharedAudio = ({
10950
10993
  if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
10951
10994
  return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
10952
10995
  }
10953
- const el = React19.createRef();
10996
+ const el = React20.createRef();
10954
10997
  const mediaElementSourceNode = audioCtx?.audioContext ? makeSharedElementSourceNode({
10955
10998
  audioContext: audioCtx.audioContext,
10956
10999
  ref: el
@@ -10969,7 +11012,7 @@ var useSharedAudio = ({
10969
11012
  }
10970
11013
  };
10971
11014
  });
10972
- const effectToUse = React19.useInsertionEffect ?? React19.useLayoutEffect;
11015
+ const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
10973
11016
  if (typeof document !== "undefined") {
10974
11017
  effectToUse(() => {
10975
11018
  if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
@@ -11394,6 +11437,7 @@ var useMediaInTimeline = ({
11394
11437
  showInTimeline: true,
11395
11438
  nonce: nonce.get(),
11396
11439
  startMediaFrom: 0 - startsAt,
11440
+ mediaFrameAtSequenceZero: null,
11397
11441
  doesVolumeChange,
11398
11442
  loopDisplay,
11399
11443
  playbackRate,
@@ -11520,7 +11564,7 @@ var useBufferManager = (logLevel, mountTime) => {
11520
11564
  return { addBlock, listenForBuffering, listenForResume, buffering };
11521
11565
  }, [addBlock, buffering, listenForBuffering, listenForResume]);
11522
11566
  };
11523
- var BufferingContextReact = React20.createContext(null);
11567
+ var BufferingContextReact = React21.createContext(null);
11524
11568
  var BufferingProvider = ({ children }) => {
11525
11569
  const { logLevel, mountTime } = useContext24(LogLevelContext);
11526
11570
  const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
@@ -11733,7 +11777,7 @@ var getMediaSyncAction = (input) => {
11733
11777
  return { type: "none" };
11734
11778
  };
11735
11779
  var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
11736
- const lastUpdate = React21.useRef({
11780
+ const lastUpdate = React22.useRef({
11737
11781
  time: mediaRef.current?.currentTime ?? 0,
11738
11782
  lastUpdate: performance.now()
11739
11783
  });
@@ -12486,7 +12530,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
12486
12530
  volume: userPreferredVolume,
12487
12531
  shouldUseWebAudioApi: useWebAudioApi ?? false
12488
12532
  });
12489
- const effectToUse = React22.useInsertionEffect ?? React22.useLayoutEffect;
12533
+ const effectToUse = React23.useInsertionEffect ?? React23.useLayoutEffect;
12490
12534
  effectToUse(() => {
12491
12535
  return () => {
12492
12536
  requestAnimationFrame(() => {
@@ -13027,16 +13071,16 @@ var isMissingPaintRecordError = (error2) => {
13027
13071
  return error2 instanceof DOMException && error2.name === "InvalidStateError";
13028
13072
  };
13029
13073
  var missingPaintRecordMessage = "HtmlInCanvas: Expected the element to be inside the viewport during rendering, but Chrome had no cached paint record for it.";
13030
- var resizeOffscreenCanvas = ({
13031
- offscreen,
13074
+ var resizePaintTarget = ({
13075
+ target,
13032
13076
  width,
13033
13077
  height
13034
13078
  }) => {
13035
- if (offscreen.width !== width) {
13036
- offscreen.width = width;
13079
+ if (target.width !== width) {
13080
+ target.width = width;
13037
13081
  }
13038
- if (offscreen.height !== height) {
13039
- offscreen.height = height;
13082
+ if (target.height !== height) {
13083
+ target.height = height;
13040
13084
  }
13041
13085
  };
13042
13086
  var defaultOnPaint = ({
@@ -13052,7 +13096,7 @@ var defaultOnPaint = ({
13052
13096
  const transform = ctx.drawElementImage(elementImage, 0, 0);
13053
13097
  element.style.transform = transform.toString();
13054
13098
  };
13055
- var HtmlInCanvasAncestorContext = createContext23(false);
13099
+ var HtmlInCanvasAncestorContext = createContext23(null);
13056
13100
  var HtmlInCanvasContent = forwardRef9(({
13057
13101
  width,
13058
13102
  height,
@@ -13064,20 +13108,22 @@ var HtmlInCanvasContent = forwardRef9(({
13064
13108
  controls,
13065
13109
  style
13066
13110
  }, ref) => {
13067
- const isInsideAncestorHtmlInCanvas = useContext31(HtmlInCanvasAncestorContext);
13111
+ const ancestor = useContext31(HtmlInCanvasAncestorContext);
13068
13112
  assertHtmlInCanvasDimensions(width, height);
13069
13113
  const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
13070
13114
  const canvasWidth = Math.ceil(width * resolvedPixelDensity);
13071
13115
  const canvasHeight = Math.ceil(height * resolvedPixelDensity);
13072
13116
  const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
13073
- const { isRendering } = useRemotionEnvironment();
13117
+ const { isClientSideRendering, isRendering } = useRemotionEnvironment();
13118
+ const canRetryMissingPaintRecord = !isRendering || isClientSideRendering;
13119
+ const usesDirectLayoutCanvas = onPaint === undefined && onInit === undefined;
13074
13120
  if (!isHtmlInCanvasSupported()) {
13075
13121
  cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
13076
13122
  }
13077
13123
  const canvas2dRef = useRef22(null);
13078
- const offscreenRef = useRef22(null);
13124
+ const paintTargetRef = useRef22(null);
13079
13125
  const divRef = useRef22(null);
13080
- const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
13126
+ const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}-${usesDirectLayoutCanvas ? "direct" : "offscreen"}`;
13081
13127
  const setLayoutCanvasRef = useCallback16((node) => {
13082
13128
  canvas2dRef.current = node;
13083
13129
  if (typeof ref === "function") {
@@ -13100,17 +13146,19 @@ var HtmlInCanvasContent = forwardRef9(({
13100
13146
  const initializedRef = useRef22(false);
13101
13147
  const onInitCleanupRef = useRef22(null);
13102
13148
  const unmountedRef = useRef22(false);
13149
+ const ancestorRef = useRef22(ancestor);
13150
+ ancestorRef.current = ancestor;
13103
13151
  const onPaintCb = useCallback16(async () => {
13104
13152
  const element = divRef.current;
13105
13153
  if (!element) {
13106
13154
  throw new Error("Canvas or scene element not found");
13107
13155
  }
13108
- const offscreen = offscreenRef.current;
13109
- if (!offscreen) {
13110
- throw new Error("HtmlInCanvas: offscreen canvas not ready (transferControlToOffscreen failed or canvas is remounting)");
13156
+ const paintTarget = paintTargetRef.current;
13157
+ if (!paintTarget) {
13158
+ throw new Error("HtmlInCanvas: paint target is not ready because the canvas is remounting");
13111
13159
  }
13112
- resizeOffscreenCanvas({
13113
- offscreen,
13160
+ resizePaintTarget({
13161
+ target: paintTarget,
13114
13162
  width: canvasWidth,
13115
13163
  height: canvasHeight
13116
13164
  });
@@ -13121,22 +13169,30 @@ var HtmlInCanvasContent = forwardRef9(({
13121
13169
  }
13122
13170
  const handle = delayRender("onPaint");
13123
13171
  if (!initializedRef.current) {
13124
- let initImage = null;
13125
- try {
13126
- initImage = placeholderCanvas.captureElementImage(element);
13127
- } catch (error2) {
13128
- if (isMissingPaintRecordError(error2) && !isRendering) {} else if (isMissingPaintRecordError(error2)) {
13129
- throw new Error(missingPaintRecordMessage);
13130
- } else {
13172
+ const currentOnInit = onInitRef.current;
13173
+ if (!currentOnInit) {
13174
+ initializedRef.current = true;
13175
+ } else {
13176
+ let initImage;
13177
+ try {
13178
+ initImage = placeholderCanvas.captureElementImage(element);
13179
+ } catch (error2) {
13180
+ if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
13181
+ continueRender2(handle);
13182
+ return;
13183
+ }
13184
+ if (isMissingPaintRecordError(error2)) {
13185
+ throw new Error(missingPaintRecordMessage);
13186
+ }
13131
13187
  throw error2;
13132
13188
  }
13133
- }
13134
- if (initImage) {
13135
13189
  initializedRef.current = true;
13136
- const currentOnInit = onInitRef.current;
13137
- if (currentOnInit) {
13190
+ try {
13191
+ if (paintTarget instanceof HTMLCanvasElement) {
13192
+ throw new Error("HtmlInCanvas: onInit requires an OffscreenCanvas paint target");
13193
+ }
13138
13194
  const cleanup = await currentOnInit({
13139
- canvas: offscreen,
13195
+ canvas: paintTarget,
13140
13196
  element,
13141
13197
  elementImage: initImage,
13142
13198
  pixelDensity: resolvedPixelDensity
@@ -13149,15 +13205,16 @@ var HtmlInCanvasContent = forwardRef9(({
13149
13205
  } else {
13150
13206
  onInitCleanupRef.current = cleanup;
13151
13207
  }
13208
+ } finally {
13209
+ initImage.close();
13152
13210
  }
13153
13211
  }
13154
13212
  }
13155
- const handler = onPaintRef.current ?? defaultOnPaint;
13156
13213
  let elImage;
13157
13214
  try {
13158
13215
  elImage = placeholderCanvas.captureElementImage(element);
13159
13216
  } catch (error2) {
13160
- if (isMissingPaintRecordError(error2) && !isRendering) {
13217
+ if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
13161
13218
  continueRender2(handle);
13162
13219
  return;
13163
13220
  }
@@ -13166,20 +13223,41 @@ var HtmlInCanvasContent = forwardRef9(({
13166
13223
  }
13167
13224
  throw error2;
13168
13225
  }
13169
- await handler({
13170
- canvas: offscreen,
13171
- element,
13172
- elementImage: elImage,
13173
- pixelDensity: resolvedPixelDensity
13174
- });
13175
- await runEffectChain({
13176
- state: chainState.get(canvasWidth, canvasHeight),
13177
- source: offscreen,
13178
- effects: effectsRef.current,
13179
- output: offscreen,
13180
- width: canvasWidth,
13181
- height: canvasHeight
13182
- });
13226
+ try {
13227
+ const currentOnPaint = onPaintRef.current;
13228
+ if (currentOnPaint) {
13229
+ if (paintTarget instanceof HTMLCanvasElement) {
13230
+ throw new Error("HtmlInCanvas: onPaint requires an OffscreenCanvas paint target");
13231
+ }
13232
+ const paintResult = currentOnPaint({
13233
+ canvas: paintTarget,
13234
+ element,
13235
+ elementImage: elImage,
13236
+ pixelDensity: resolvedPixelDensity
13237
+ });
13238
+ if (paintResult) {
13239
+ await paintResult;
13240
+ }
13241
+ } else {
13242
+ defaultOnPaint({
13243
+ canvas: paintTarget,
13244
+ element,
13245
+ elementImage: elImage,
13246
+ pixelDensity: resolvedPixelDensity
13247
+ });
13248
+ }
13249
+ await runEffectChain({
13250
+ state: chainState.get(canvasWidth, canvasHeight),
13251
+ source: paintTarget,
13252
+ effects: effectsRef.current,
13253
+ output: paintTarget,
13254
+ width: canvasWidth,
13255
+ height: canvasHeight
13256
+ });
13257
+ } finally {
13258
+ elImage.close();
13259
+ }
13260
+ ancestorRef.current?.requestParentPaint();
13183
13261
  continueRender2(handle);
13184
13262
  } catch (error2) {
13185
13263
  cancelRender2(error2);
@@ -13191,7 +13269,7 @@ var HtmlInCanvasContent = forwardRef9(({
13191
13269
  continueRender2,
13192
13270
  cancelRender2,
13193
13271
  resolvedPixelDensity,
13194
- isRendering
13272
+ canRetryMissingPaintRecord
13195
13273
  ]);
13196
13274
  useLayoutEffect9(() => {
13197
13275
  const placeholder = canvas2dRef.current;
@@ -13199,10 +13277,10 @@ var HtmlInCanvasContent = forwardRef9(({
13199
13277
  throw new Error("Canvas not found");
13200
13278
  }
13201
13279
  placeholder.layoutSubtree = true;
13202
- const offscreen = placeholder.transferControlToOffscreen();
13203
- offscreenRef.current = offscreen;
13204
- resizeOffscreenCanvas({
13205
- offscreen,
13280
+ const paintTarget = usesDirectLayoutCanvas ? placeholder : placeholder.transferControlToOffscreen();
13281
+ paintTargetRef.current = paintTarget;
13282
+ resizePaintTarget({
13283
+ target: paintTarget,
13206
13284
  width: canvasWidth,
13207
13285
  height: canvasHeight
13208
13286
  });
@@ -13211,13 +13289,19 @@ var HtmlInCanvasContent = forwardRef9(({
13211
13289
  placeholder.addEventListener("paint", onPaintCb);
13212
13290
  return () => {
13213
13291
  placeholder.removeEventListener("paint", onPaintCb);
13214
- offscreenRef.current = null;
13292
+ paintTargetRef.current = null;
13215
13293
  initializedRef.current = false;
13216
13294
  unmountedRef.current = true;
13217
13295
  onInitCleanupRef.current?.();
13218
13296
  onInitCleanupRef.current = null;
13219
13297
  };
13220
- }, [onPaintCb, cancelRender2, canvasWidth, canvasHeight]);
13298
+ }, [
13299
+ onPaintCb,
13300
+ cancelRender2,
13301
+ canvasWidth,
13302
+ canvasHeight,
13303
+ usesDirectLayoutCanvas
13304
+ ]);
13221
13305
  const onPaintChangedRef = useRef22(false);
13222
13306
  useLayoutEffect9(() => {
13223
13307
  if (!onPaintChangedRef.current) {
@@ -13256,11 +13340,15 @@ var HtmlInCanvasContent = forwardRef9(({
13256
13340
  ...style ?? {}
13257
13341
  };
13258
13342
  }, [height, style, width]);
13259
- if (isInsideAncestorHtmlInCanvas) {
13260
- throw new Error("<HtmlInCanvas> effects cannot be nested together. Chrome will only display the outer effect. Consider merging the effects into one if you can.");
13261
- }
13343
+ const ancestorValue = useMemo30(() => {
13344
+ return {
13345
+ requestParentPaint: () => {
13346
+ canvas2dRef.current?.requestPaint?.();
13347
+ }
13348
+ };
13349
+ }, []);
13262
13350
  return /* @__PURE__ */ jsx25(HtmlInCanvasAncestorContext.Provider, {
13263
- value: true,
13351
+ value: ancestorValue,
13264
13352
  children: /* @__PURE__ */ jsx25("canvas", {
13265
13353
  ref: setLayoutCanvasRef,
13266
13354
  width: canvasWidth,
@@ -13988,6 +14076,12 @@ var NativeImgInner = ({
13988
14076
  };
13989
14077
  var CanvasImageWithPrivateProps = CanvasImage;
13990
14078
  var imgSchema = {
14079
+ src: {
14080
+ type: "asset",
14081
+ default: undefined,
14082
+ description: "Source",
14083
+ keyframable: false
14084
+ },
13991
14085
  ...baseSchema,
13992
14086
  ...transformSchema
13993
14087
  };
@@ -14198,7 +14292,7 @@ var makeInteractiveElement = (tag, displayName) => {
14198
14292
  _remotionInternalStack: stack,
14199
14293
  _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
14200
14294
  outlineRef: refForOutline,
14201
- children: React29.createElement(tag, {
14295
+ children: React30.createElement(tag, {
14202
14296
  ...props2,
14203
14297
  ref: callbackRef
14204
14298
  })
@@ -14262,7 +14356,7 @@ var Interactive = {
14262
14356
  Text: makeInteractiveElement("text", "<Interactive.Text>"),
14263
14357
  Ul: makeInteractiveElement("ul", "<Interactive.Ul>")
14264
14358
  };
14265
- var compositionsRef = React30.createRef();
14359
+ var compositionsRef = React31.createRef();
14266
14360
  var CompositionManagerProvider = ({
14267
14361
  children,
14268
14362
  onlyRenderComposition,
@@ -14411,7 +14505,7 @@ var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
14411
14505
  var getPreviewDomElement = () => {
14412
14506
  return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
14413
14507
  };
14414
- var MaxMediaCacheSizeContext = React31.createContext(null);
14508
+ var MaxMediaCacheSizeContext = React32.createContext(null);
14415
14509
  var Root = null;
14416
14510
  var listeners = [];
14417
14511
  var getRoot = () => {
@@ -14684,7 +14778,7 @@ var resolveVideoConfigOrCatch = (params) => {
14684
14778
  };
14685
14779
  }
14686
14780
  };
14687
- var SequenceStackTracesUpdateContext = React33.createContext(() => {});
14781
+ var SequenceStackTracesUpdateContext = React34.createContext(() => {});
14688
14782
  var getEnvVariables = () => {
14689
14783
  if (getRemotionEnvironment().isRendering) {
14690
14784
  const param = window.remotion_envVariables;
@@ -14710,7 +14804,7 @@ var setupEnvVariables = () => {
14710
14804
  window.process.env[key] = env[key];
14711
14805
  });
14712
14806
  };
14713
- var CurrentScaleContext = React34.createContext(null);
14807
+ var CurrentScaleContext = React35.createContext(null);
14714
14808
  var PreviewSizeContext = createContext25({
14715
14809
  setSize: () => {
14716
14810
  return;
@@ -14734,7 +14828,7 @@ var calculateScale = ({
14734
14828
  }
14735
14829
  return Number(previewSize);
14736
14830
  };
14737
- var PixelDensityContext = React35.createContext(null);
14831
+ var PixelDensityContext = React36.createContext(null);
14738
14832
  var getOffthreadVideoSource = ({
14739
14833
  src,
14740
14834
  transparent,
@@ -15001,7 +15095,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
15001
15095
  ref: videoRef
15002
15096
  });
15003
15097
  }, [context.audioContext]);
15004
- const effectToUse = React37.useInsertionEffect ?? React37.useLayoutEffect;
15098
+ const effectToUse = React38.useInsertionEffect ?? React38.useLayoutEffect;
15005
15099
  effectToUse(() => {
15006
15100
  return () => {
15007
15101
  requestAnimationFrame(() => {
@@ -15377,20 +15471,20 @@ var OffthreadVideo = ({
15377
15471
  addSequenceStackTraces(OffthreadVideo);
15378
15472
  var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
15379
15473
  function useRemotionContexts() {
15380
- const compositionManagerCtx = React39.useContext(CompositionManager);
15381
- const timelineContext = React39.useContext(TimelineContext);
15382
- const setTimelineContext = React39.useContext(SetTimelineContext);
15383
- const sequenceContext = React39.useContext(SequenceContext);
15384
- const nonceContext = React39.useContext(NonceContext);
15385
- const canUseRemotionHooksContext = React39.useContext(CanUseRemotionHooks);
15386
- const preloadContext = React39.useContext(PreloadContext);
15387
- const resolveCompositionContext = React39.useContext(ResolveCompositionContext);
15388
- const renderAssetManagerContext = React39.useContext(RenderAssetManager);
15389
- const sequenceManagerContext = React39.useContext(SequenceManager);
15390
- const sequenceManagerRefContext = React39.useContext(SequenceManagerRefContext);
15391
- const visualModePropStatusesRefContext = React39.useContext(VisualModePropStatusesRefContext);
15392
- const bufferManagerContext = React39.useContext(BufferingContextReact);
15393
- const logLevelContext = React39.useContext(LogLevelContext);
15474
+ const compositionManagerCtx = React40.useContext(CompositionManager);
15475
+ const timelineContext = React40.useContext(TimelineContext);
15476
+ const setTimelineContext = React40.useContext(SetTimelineContext);
15477
+ const sequenceContext = React40.useContext(SequenceContext);
15478
+ const nonceContext = React40.useContext(NonceContext);
15479
+ const canUseRemotionHooksContext = React40.useContext(CanUseRemotionHooks);
15480
+ const preloadContext = React40.useContext(PreloadContext);
15481
+ const resolveCompositionContext = React40.useContext(ResolveCompositionContext);
15482
+ const renderAssetManagerContext = React40.useContext(RenderAssetManager);
15483
+ const sequenceManagerContext = React40.useContext(SequenceManager);
15484
+ const sequenceManagerRefContext = React40.useContext(SequenceManagerRefContext);
15485
+ const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
15486
+ const bufferManagerContext = React40.useContext(BufferingContextReact);
15487
+ const logLevelContext = React40.useContext(LogLevelContext);
15394
15488
  return useMemo37(() => ({
15395
15489
  compositionManagerCtx,
15396
15490
  timelineContext,
@@ -15564,6 +15658,8 @@ var Internals = {
15564
15658
  BufferingProvider,
15565
15659
  BufferingContextReact,
15566
15660
  getComponentsToAddStacksTo,
15661
+ getSequenceComponent,
15662
+ getSingleChildComponent,
15567
15663
  CurrentScaleContext,
15568
15664
  PixelDensityContext,
15569
15665
  PreviewSizeContext,
@@ -15621,75 +15717,139 @@ var Internals = {
15621
15717
  fromField
15622
15718
  };
15623
15719
  var flattenChildren = (children) => {
15624
- const childrenArray = React40.Children.toArray(children);
15720
+ const childrenArray = React41.Children.toArray(children);
15625
15721
  return childrenArray.reduce((flatChildren, child) => {
15626
- if (child.type === React40.Fragment) {
15722
+ if (child.type === React41.Fragment) {
15627
15723
  return flatChildren.concat(flattenChildren(child.props.children));
15628
15724
  }
15629
15725
  flatChildren.push(child);
15630
15726
  return flatChildren;
15631
15727
  }, []);
15632
15728
  };
15633
- var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
15729
+ var seriesSequenceSchema = {
15730
+ durationInFrames: Interactive.baseSchema.durationInFrames,
15731
+ name: Interactive.sequenceSchema.name,
15732
+ hidden: Interactive.sequenceSchema.hidden,
15733
+ showInTimeline: Interactive.sequenceSchema.showInTimeline,
15734
+ freeze: Interactive.baseSchema.freeze,
15735
+ layout: Interactive.sequenceSchema.layout
15736
+ };
15737
+ var SeriesSequenceInner = forwardRef14(({
15738
+ offset = 0,
15739
+ className = "",
15740
+ stack = null,
15741
+ _remotionInternalRender = null,
15742
+ ...props2
15743
+ }, ref) => {
15634
15744
  useRequireToBeInsideSeries();
15745
+ if (_remotionInternalRender) {
15746
+ return _remotionInternalRender({ ...props2, offset, className: className || undefined, stack }, ref);
15747
+ }
15635
15748
  return /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
15636
- children
15749
+ children: props2.children
15637
15750
  });
15638
- };
15639
- var SeriesSequence = forwardRef14(SeriesSequenceRefForwardingFunction);
15751
+ });
15752
+ var SeriesSequence = Interactive.withSchema({
15753
+ Component: SeriesSequenceInner,
15754
+ componentName: "<Series.Sequence>",
15755
+ componentIdentity: "dev.remotion.remotion.Series.Sequence",
15756
+ schema: seriesSequenceSchema,
15757
+ supportsEffects: false
15758
+ });
15640
15759
  var SequenceWithoutSchemaWithRef = SequenceWithoutSchema;
15760
+ var validateSeriesSequenceProps = ({
15761
+ durationInFrames,
15762
+ offset: offsetProp,
15763
+ index,
15764
+ childrenLength
15765
+ }) => {
15766
+ const debugInfo = `index = ${index}, duration = ${durationInFrames}`;
15767
+ if (index !== childrenLength - 1 || durationInFrames !== Infinity) {
15768
+ validateDurationInFrames(durationInFrames, {
15769
+ component: `of a <Series.Sequence /> component`,
15770
+ allowFloats: true
15771
+ });
15772
+ }
15773
+ const offset = offsetProp ?? 0;
15774
+ if (Number.isNaN(offset)) {
15775
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
15776
+ }
15777
+ if (!Number.isFinite(offset)) {
15778
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
15779
+ }
15780
+ if (offset % 1 !== 0) {
15781
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
15782
+ }
15783
+ return offset;
15784
+ };
15641
15785
  var SeriesInner = (props2) => {
15642
15786
  const childrenValue = useMemo38(() => {
15643
- let startFrame = 0;
15644
15787
  const flattenedChildren = flattenChildren(props2.children);
15645
- return Children.map(flattenedChildren, (child, i) => {
15788
+ const renderChildren = (i, startFrame) => {
15789
+ if (i === flattenedChildren.length) {
15790
+ return null;
15791
+ }
15792
+ const child = flattenedChildren[i];
15646
15793
  const castedChild = child;
15647
15794
  if (typeof castedChild === "string") {
15648
15795
  if (castedChild.trim() === "") {
15649
- return null;
15796
+ return renderChildren(i + 1, startFrame);
15650
15797
  }
15651
15798
  throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string "${castedChild}"`);
15652
15799
  }
15653
15800
  if (castedChild.type !== SeriesSequence) {
15654
15801
  throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
15655
15802
  }
15656
- const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
15657
- const durationInFramesProp = castedChild.props.durationInFrames;
15658
- const {
15659
- durationInFrames,
15660
- children: _children,
15661
- from,
15662
- name,
15663
- ...passedProps
15664
- } = castedChild.props;
15665
- if (i !== flattenedChildren.length - 1 || durationInFramesProp !== Infinity) {
15666
- validateDurationInFrames(durationInFramesProp, {
15667
- component: `of a <Series.Sequence /> component`,
15668
- allowFloats: true
15669
- });
15670
- }
15671
- const offset = castedChild.props.offset ?? 0;
15672
- if (Number.isNaN(offset)) {
15673
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
15674
- }
15675
- if (!Number.isFinite(offset)) {
15676
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
15677
- }
15678
- if (offset % 1 !== 0) {
15679
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
15680
- }
15681
- const currentStartFrame = startFrame + offset;
15682
- startFrame += durationInFramesProp + offset;
15683
- return /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
15684
- ref: castedChild.ref,
15685
- name: name || "<Series.Sequence>",
15686
- _remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
15687
- from: currentStartFrame,
15688
- durationInFrames: durationInFramesProp,
15689
- ...passedProps,
15690
- children: child
15803
+ const castedElement = castedChild;
15804
+ validateSeriesSequenceProps({
15805
+ durationInFrames: castedElement.props.durationInFrames,
15806
+ offset: castedElement.props.offset,
15807
+ index: i,
15808
+ childrenLength: flattenedChildren.length
15691
15809
  });
15692
- });
15810
+ return React42.cloneElement(castedElement, {
15811
+ _remotionInternalRender: (resolvedProps, ref) => {
15812
+ const durationInFramesProp = resolvedProps.durationInFrames;
15813
+ const {
15814
+ durationInFrames: _durationInFrames,
15815
+ children: sequenceChildren,
15816
+ offset: offsetProp,
15817
+ controls,
15818
+ stack,
15819
+ from: _from,
15820
+ name,
15821
+ ...passedProps
15822
+ } = resolvedProps;
15823
+ const offset = validateSeriesSequenceProps({
15824
+ durationInFrames: durationInFramesProp,
15825
+ offset: offsetProp,
15826
+ index: i,
15827
+ childrenLength: flattenedChildren.length
15828
+ });
15829
+ const currentStartFrame = startFrame + offset;
15830
+ const nextStartFrame = startFrame + durationInFramesProp + offset;
15831
+ return /* @__PURE__ */ jsxs3(Fragment, {
15832
+ children: [
15833
+ /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
15834
+ ref,
15835
+ name: name || "<Series.Sequence>",
15836
+ _remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
15837
+ _remotionInternalStack: stack ?? undefined,
15838
+ controls: controls ?? undefined,
15839
+ from: currentStartFrame,
15840
+ durationInFrames: durationInFramesProp,
15841
+ ...passedProps,
15842
+ children: /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
15843
+ children: sequenceChildren
15844
+ })
15845
+ }),
15846
+ renderChildren(i + 1, nextStartFrame)
15847
+ ]
15848
+ });
15849
+ }
15850
+ });
15851
+ };
15852
+ return renderChildren(0, 0);
15693
15853
  }, [props2.children]);
15694
15854
  return /* @__PURE__ */ jsx37(IsInsideSeriesContainer, {
15695
15855
  children: /* @__PURE__ */ jsx37(Sequence, {
@@ -15805,7 +15965,7 @@ var Still = (props2) => {
15805
15965
  durationInFrames: 1,
15806
15966
  fps: 1
15807
15967
  };
15808
- return React42.createElement(Composition, newProps);
15968
+ return React43.createElement(Composition, newProps);
15809
15969
  };
15810
15970
  addSequenceStackTraces(Still);
15811
15971
  var roundTo6Commas = (num) => {
@@ -16284,13 +16444,14 @@ var Config = new Proxy(proxyObj, {
16284
16444
  });
16285
16445
  Sequence.displayName = "Sequence";
16286
16446
  addSequenceStackTraces(Sequence);
16447
+ setSequenceComponent(Sequence);
16287
16448
  addSequenceStackTraces(Composition);
16288
16449
  addSequenceStackTraces(Folder);
16289
16450
 
16290
16451
  // ../shapes/dist/esm/index.mjs
16291
16452
  import React, { useCallback as useCallback26, useMemo as useMemo40, useRef as useRef29 } from "react";
16292
16453
  import { version } from "react-dom";
16293
- import { jsx as jsx40, jsxs as jsxs3 } from "react/jsx-runtime";
16454
+ import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
16294
16455
  import { jsx as jsx210 } from "react/jsx-runtime";
16295
16456
  import { jsx as jsx310 } from "react/jsx-runtime";
16296
16457
  import { jsx as jsx42 } from "react/jsx-runtime";
@@ -16492,7 +16653,7 @@ var RenderSvg = ({
16492
16653
  const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(effects);
16493
16654
  const videoConfig = Internals.useUnsafeVideoConfig();
16494
16655
  const reactSupportsTransformOrigin = doesReactSupportTransformOriginProperty(version);
16495
- const svg = /* @__PURE__ */ jsxs3("svg", {
16656
+ const svg = /* @__PURE__ */ jsxs4("svg", {
16496
16657
  ref: effects.length === 0 || !videoConfig ? setSvgRef : undefined,
16497
16658
  width,
16498
16659
  height,
@@ -16518,7 +16679,7 @@ var RenderSvg = ({
16518
16679
  }
16519
16680
  const prevX = prevInstruction.x;
16520
16681
  const prevY = prevInstruction.y;
16521
- return /* @__PURE__ */ jsxs3(React.Fragment, {
16682
+ return /* @__PURE__ */ jsxs4(React.Fragment, {
16522
16683
  children: [
16523
16684
  /* @__PURE__ */ jsx40("path", {
16524
16685
  d: `M ${prevX} ${prevY} ${i.cp1x} ${i.cp1y}`,
@@ -19200,7 +19361,7 @@ var extrudeAndTransformElement = (options) => {
19200
19361
 
19201
19362
  // ../design/dist/esm/index.mjs
19202
19363
  import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
19203
- import { jsx as jsx312, jsxs as jsxs5 } from "react/jsx-runtime";
19364
+ import { jsx as jsx312, jsxs as jsxs6 } from "react/jsx-runtime";
19204
19365
  import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef31 } from "react";
19205
19366
  import { jsx as jsx44 } from "react/jsx-runtime";
19206
19367
  import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
@@ -19213,12 +19374,12 @@ import React72 from "react";
19213
19374
  import { jsx as jsx103 } from "react/jsx-runtime";
19214
19375
  import { jsx as jsx113 } from "react/jsx-runtime";
19215
19376
  import { jsx as jsx123 } from "react/jsx-runtime";
19216
- import * as React36 from "react";
19377
+ import * as React362 from "react";
19217
19378
  import * as ReactDOM4 from "react-dom";
19218
- import React112 from "react";
19379
+ import React11 from "react";
19219
19380
  import * as React8 from "react";
19220
19381
  import { jsx as jsx132 } from "react/jsx-runtime";
19221
- import * as React9 from "react";
19382
+ import * as React92 from "react";
19222
19383
  import * as React10 from "react";
19223
19384
  import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
19224
19385
  import { jsx as jsx152 } from "react/jsx-runtime";
@@ -19228,15 +19389,15 @@ import * as React162 from "react";
19228
19389
  import * as React132 from "react";
19229
19390
  import * as ReactDOM from "react-dom";
19230
19391
  import { jsx as jsx172 } from "react/jsx-runtime";
19231
- import * as React14 from "react";
19232
- import * as React152 from "react";
19392
+ import * as React142 from "react";
19393
+ import * as React15 from "react";
19233
19394
  import { jsx as jsx182 } from "react/jsx-runtime";
19234
- import * as React17 from "react";
19395
+ import * as React172 from "react";
19235
19396
  import * as React18 from "react";
19236
19397
  import { jsx as jsx192 } from "react/jsx-runtime";
19237
19398
  import * as React202 from "react";
19238
- import * as React192 from "react";
19239
- import * as React24 from "react";
19399
+ import * as React19 from "react";
19400
+ import * as React242 from "react";
19240
19401
  import * as React212 from "react";
19241
19402
  import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
19242
19403
  import * as ReactDOM2 from "react-dom";
@@ -19254,30 +19415,30 @@ import { jsx as jsx232 } from "react/jsx-runtime";
19254
19415
  import * as React352 from "react";
19255
19416
  import * as React312 from "react";
19256
19417
  import { useState as useState112 } from "react";
19257
- import * as React292 from "react";
19418
+ import * as React29 from "react";
19258
19419
  import * as React302 from "react";
19259
19420
  import * as React342 from "react";
19260
19421
  import * as React332 from "react";
19261
19422
  import * as React322 from "react";
19262
- import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs4 } from "react/jsx-runtime";
19423
+ import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-runtime";
19263
19424
  import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
19264
19425
  import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
19265
- import * as React372 from "react";
19266
- import { jsx as jsx252, jsxs as jsxs52 } from "react/jsx-runtime";
19426
+ import * as React37 from "react";
19427
+ import { jsx as jsx252, jsxs as jsxs5 } from "react/jsx-runtime";
19267
19428
  import { jsx as jsx262 } from "react/jsx-runtime";
19268
19429
  import * as React49 from "react";
19269
- import * as React38 from "react";
19430
+ import * as React382 from "react";
19270
19431
  import { jsx as jsx272 } from "react/jsx-runtime";
19271
19432
  import * as React47 from "react";
19272
19433
  import React402 from "react";
19273
- import * as React392 from "react";
19274
- import { Fragment as Fragment22, jsx as jsx282 } from "react/jsx-runtime";
19434
+ import * as React39 from "react";
19435
+ import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
19275
19436
  import { jsx as jsx292 } from "react/jsx-runtime";
19276
19437
  import React210 from "react";
19277
19438
  import { jsx as jsx2102 } from "react/jsx-runtime";
19278
19439
  import * as React422 from "react";
19279
- import * as React41 from "react";
19280
- import * as React43 from "react";
19440
+ import * as React412 from "react";
19441
+ import * as React432 from "react";
19281
19442
  import * as ReactDOM5 from "react-dom";
19282
19443
  import { jsx as jsx302 } from "react/jsx-runtime";
19283
19444
  import * as React44 from "react";
@@ -19329,7 +19490,7 @@ function useComposedRefs(...refs) {
19329
19490
  return React3.useCallback(composeRefs(...refs), refs);
19330
19491
  }
19331
19492
  var REACT_LAZY_TYPE = Symbol.for("react.lazy");
19332
- var use = React23[" use ".trim().toString()];
19493
+ var use = React24[" use ".trim().toString()];
19333
19494
  function isPromiseLike(value) {
19334
19495
  return typeof value === "object" && value !== null && "then" in value;
19335
19496
  }
@@ -19338,25 +19499,25 @@ function isLazyComponent(element) {
19338
19499
  }
19339
19500
  function createSlot(ownerName) {
19340
19501
  const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
19341
- const Slot2 = React23.forwardRef((props, forwardedRef) => {
19502
+ const Slot2 = React24.forwardRef((props, forwardedRef) => {
19342
19503
  let { children, ...slotProps } = props;
19343
19504
  if (isLazyComponent(children) && typeof use === "function") {
19344
19505
  children = use(children._payload);
19345
19506
  }
19346
- const childrenArray = React23.Children.toArray(children);
19507
+ const childrenArray = React24.Children.toArray(children);
19347
19508
  const slottable = childrenArray.find(isSlottable);
19348
19509
  if (slottable) {
19349
19510
  const newElement = slottable.props.children;
19350
19511
  const newChildren = childrenArray.map((child) => {
19351
19512
  if (child === slottable) {
19352
- if (React23.Children.count(newElement) > 1)
19353
- return React23.Children.only(null);
19354
- return React23.isValidElement(newElement) ? newElement.props.children : null;
19513
+ if (React24.Children.count(newElement) > 1)
19514
+ return React24.Children.only(null);
19515
+ return React24.isValidElement(newElement) ? newElement.props.children : null;
19355
19516
  } else {
19356
19517
  return child;
19357
19518
  }
19358
19519
  });
19359
- return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children: React23.isValidElement(newElement) ? React23.cloneElement(newElement, undefined, newChildren) : null });
19520
+ return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children: React24.isValidElement(newElement) ? React24.cloneElement(newElement, undefined, newChildren) : null });
19360
19521
  }
19361
19522
  return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children });
19362
19523
  });
@@ -19365,20 +19526,20 @@ function createSlot(ownerName) {
19365
19526
  }
19366
19527
  var Slot = /* @__PURE__ */ createSlot("Slot");
19367
19528
  function createSlotClone(ownerName) {
19368
- const SlotClone = React23.forwardRef((props, forwardedRef) => {
19529
+ const SlotClone = React24.forwardRef((props, forwardedRef) => {
19369
19530
  let { children, ...slotProps } = props;
19370
19531
  if (isLazyComponent(children) && typeof use === "function") {
19371
19532
  children = use(children._payload);
19372
19533
  }
19373
- if (React23.isValidElement(children)) {
19534
+ if (React24.isValidElement(children)) {
19374
19535
  const childrenRef = getElementRef(children);
19375
19536
  const props2 = mergeProps(slotProps, children.props);
19376
- if (children.type !== React23.Fragment) {
19537
+ if (children.type !== React24.Fragment) {
19377
19538
  props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
19378
19539
  }
19379
- return React23.cloneElement(children, props2);
19540
+ return React24.cloneElement(children, props2);
19380
19541
  }
19381
- return React23.Children.count(children) > 1 ? React23.Children.only(null) : null;
19542
+ return React24.Children.count(children) > 1 ? React24.Children.only(null) : null;
19382
19543
  });
19383
19544
  SlotClone.displayName = `${ownerName}.SlotClone`;
19384
19545
  return SlotClone;
@@ -19386,7 +19547,7 @@ function createSlotClone(ownerName) {
19386
19547
  var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
19387
19548
  function createSlottable(ownerName) {
19388
19549
  const Slottable2 = ({ children }) => {
19389
- return /* @__PURE__ */ jsx43(Fragment2, { children });
19550
+ return /* @__PURE__ */ jsx43(Fragment22, { children });
19390
19551
  };
19391
19552
  Slottable2.displayName = `${ownerName}.Slottable`;
19392
19553
  Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
@@ -19394,7 +19555,7 @@ function createSlottable(ownerName) {
19394
19555
  }
19395
19556
  var Slottable = /* @__PURE__ */ createSlottable("Slottable");
19396
19557
  function isSlottable(child) {
19397
- return React23.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
19558
+ return React24.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
19398
19559
  }
19399
19560
  function mergeProps(slotProps, childProps) {
19400
19561
  const overrideProps = { ...childProps };
@@ -19451,7 +19612,7 @@ var getChildNodeFrom = (htmlElement) => {
19451
19612
  return childNode;
19452
19613
  };
19453
19614
  var useHoverTransforms = (ref, disabled) => {
19454
- const [state, setState] = React32.useState({
19615
+ const [state, setState] = React33.useState({
19455
19616
  progress: 0,
19456
19617
  isActive: false
19457
19618
  });
@@ -19463,7 +19624,7 @@ var useHoverTransforms = (ref, disabled) => {
19463
19624
  eventTarget.dispatchEvent(new Event("enabled"));
19464
19625
  }
19465
19626
  }, [disabled, eventTarget]);
19466
- React32.useEffect(() => {
19627
+ React33.useEffect(() => {
19467
19628
  const element = ref.current;
19468
19629
  if (!element)
19469
19630
  return;
@@ -19538,8 +19699,8 @@ var useHoverTransforms = (ref, disabled) => {
19538
19699
  return state;
19539
19700
  };
19540
19701
  var useClickTransforms = (ref) => {
19541
- const [hoverProgress, setHoverProgress] = React32.useState(0);
19542
- React32.useEffect(() => {
19702
+ const [hoverProgress, setHoverProgress] = React33.useState(0);
19703
+ React33.useEffect(() => {
19543
19704
  const element = getChildNodeFrom(ref.current);
19544
19705
  if (!element) {
19545
19706
  return;
@@ -19683,7 +19844,7 @@ var Outer = ({
19683
19844
  description: "rect",
19684
19845
  transformations: centerOriented
19685
19846
  });
19686
- return /* @__PURE__ */ jsxs5("div", {
19847
+ return /* @__PURE__ */ jsxs6("div", {
19687
19848
  className: "relative",
19688
19849
  style: { width, height },
19689
19850
  children: [
@@ -20115,7 +20276,7 @@ function composeRefs2(...refs) {
20115
20276
  return (node) => refs.forEach((ref) => setRef22(ref, node));
20116
20277
  }
20117
20278
  function useComposedRefs2(...refs) {
20118
- return React9.useCallback(composeRefs2(...refs), refs);
20279
+ return React92.useCallback(composeRefs2(...refs), refs);
20119
20280
  }
20120
20281
  var Slot2 = React10.forwardRef((props, forwardedRef) => {
20121
20282
  const { children, ...slotProps } = props;
@@ -20197,13 +20358,13 @@ function createCollection(name) {
20197
20358
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
20198
20359
  const CollectionProvider = (props) => {
20199
20360
  const { scope, children } = props;
20200
- const ref = React112.useRef(null);
20201
- const itemMap = React112.useRef(/* @__PURE__ */ new Map).current;
20361
+ const ref = React11.useRef(null);
20362
+ const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
20202
20363
  return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
20203
20364
  };
20204
20365
  CollectionProvider.displayName = PROVIDER_NAME;
20205
20366
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
20206
- const CollectionSlot = React112.forwardRef((props, forwardedRef) => {
20367
+ const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
20207
20368
  const { scope, children } = props;
20208
20369
  const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
20209
20370
  const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
@@ -20212,12 +20373,12 @@ function createCollection(name) {
20212
20373
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
20213
20374
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
20214
20375
  const ITEM_DATA_ATTR = "data-radix-collection-item";
20215
- const CollectionItemSlot = React112.forwardRef((props, forwardedRef) => {
20376
+ const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
20216
20377
  const { scope, children, ...itemData } = props;
20217
- const ref = React112.useRef(null);
20378
+ const ref = React11.useRef(null);
20218
20379
  const composedRefs = useComposedRefs2(forwardedRef, ref);
20219
20380
  const context = useCollectionContext(ITEM_SLOT_NAME, scope);
20220
- React112.useEffect(() => {
20381
+ React11.useEffect(() => {
20221
20382
  context.itemMap.set(ref, { ref, ...itemData });
20222
20383
  return () => void context.itemMap.delete(ref);
20223
20384
  });
@@ -20226,7 +20387,7 @@ function createCollection(name) {
20226
20387
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
20227
20388
  function useCollection(scope) {
20228
20389
  const context = useCollectionContext(name + "CollectionConsumer", scope);
20229
- const getItems = React112.useCallback(() => {
20390
+ const getItems = React11.useCallback(() => {
20230
20391
  const collectionNode = context.collectionRef.current;
20231
20392
  if (!collectionNode)
20232
20393
  return [];
@@ -20283,15 +20444,15 @@ function dispatchDiscreteCustomEvent(target, event) {
20283
20444
  ReactDOM.flushSync(() => target.dispatchEvent(event));
20284
20445
  }
20285
20446
  function useCallbackRef(callback) {
20286
- const callbackRef = React14.useRef(callback);
20287
- React14.useEffect(() => {
20447
+ const callbackRef = React142.useRef(callback);
20448
+ React142.useEffect(() => {
20288
20449
  callbackRef.current = callback;
20289
20450
  });
20290
- return React14.useMemo(() => (...args) => callbackRef.current?.(...args), []);
20451
+ return React142.useMemo(() => (...args) => callbackRef.current?.(...args), []);
20291
20452
  }
20292
20453
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
20293
20454
  const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
20294
- React152.useEffect(() => {
20455
+ React15.useEffect(() => {
20295
20456
  const handleKeyDown = (event) => {
20296
20457
  if (event.key === "Escape") {
20297
20458
  onEscapeKeyDown(event);
@@ -20498,7 +20659,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
20498
20659
  }
20499
20660
  var count = 0;
20500
20661
  function useFocusGuards() {
20501
- React17.useEffect(() => {
20662
+ React172.useEffect(() => {
20502
20663
  const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
20503
20664
  document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
20504
20665
  document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
@@ -20733,7 +20894,7 @@ function arrayRemove(array, item) {
20733
20894
  function removeLinks(items) {
20734
20895
  return items.filter((item) => item.tagName !== "A");
20735
20896
  }
20736
- var useLayoutEffect22 = Boolean(globalThis?.document) ? React192.useLayoutEffect : () => {};
20897
+ var useLayoutEffect22 = Boolean(globalThis?.document) ? React19.useLayoutEffect : () => {};
20737
20898
  var useReactId = React202["useId".toString()] || (() => {
20738
20899
  return;
20739
20900
  });
@@ -22585,17 +22746,17 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
22585
22746
  var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
22586
22747
  var Popper = (props) => {
22587
22748
  const { __scopePopper, children } = props;
22588
- const [anchor, setAnchor] = React24.useState(null);
22749
+ const [anchor, setAnchor] = React242.useState(null);
22589
22750
  return /* @__PURE__ */ jsx213(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
22590
22751
  };
22591
22752
  Popper.displayName = POPPER_NAME;
22592
22753
  var ANCHOR_NAME = "PopperAnchor";
22593
- var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
22754
+ var PopperAnchor = React242.forwardRef((props, forwardedRef) => {
22594
22755
  const { __scopePopper, virtualRef, ...anchorProps } = props;
22595
22756
  const context = usePopperContext(ANCHOR_NAME, __scopePopper);
22596
- const ref = React24.useRef(null);
22757
+ const ref = React242.useRef(null);
22597
22758
  const composedRefs = useComposedRefs2(forwardedRef, ref);
22598
- React24.useEffect(() => {
22759
+ React242.useEffect(() => {
22599
22760
  context.onAnchorChange(virtualRef?.current || ref.current);
22600
22761
  });
22601
22762
  return virtualRef ? null : /* @__PURE__ */ jsx213(Primitive.div, { ...anchorProps, ref: composedRefs });
@@ -22603,7 +22764,7 @@ var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
22603
22764
  PopperAnchor.displayName = ANCHOR_NAME;
22604
22765
  var CONTENT_NAME = "PopperContent";
22605
22766
  var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
22606
- var PopperContent = React24.forwardRef((props, forwardedRef) => {
22767
+ var PopperContent = React242.forwardRef((props, forwardedRef) => {
22607
22768
  const {
22608
22769
  __scopePopper,
22609
22770
  side = "bottom",
@@ -22621,9 +22782,9 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
22621
22782
  ...contentProps
22622
22783
  } = props;
22623
22784
  const context = usePopperContext(CONTENT_NAME, __scopePopper);
22624
- const [content, setContent] = React24.useState(null);
22785
+ const [content, setContent] = React242.useState(null);
22625
22786
  const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
22626
- const [arrow4, setArrow] = React24.useState(null);
22787
+ const [arrow4, setArrow] = React242.useState(null);
22627
22788
  const arrowSize = useSize(arrow4);
22628
22789
  const arrowWidth = arrowSize?.width ?? 0;
22629
22790
  const arrowHeight = arrowSize?.height ?? 0;
@@ -22683,7 +22844,7 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
22683
22844
  const arrowX = middlewareData.arrow?.x;
22684
22845
  const arrowY = middlewareData.arrow?.y;
22685
22846
  const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
22686
- const [contentZIndex, setContentZIndex] = React24.useState();
22847
+ const [contentZIndex, setContentZIndex] = React242.useState();
22687
22848
  useLayoutEffect22(() => {
22688
22849
  if (content)
22689
22850
  setContentZIndex(window.getComputedStyle(content).zIndex);
@@ -22734,7 +22895,7 @@ var OPPOSITE_SIDE = {
22734
22895
  bottom: "top",
22735
22896
  left: "right"
22736
22897
  };
22737
- var PopperArrow = React24.forwardRef(function PopperArrow2(props, forwardedRef) {
22898
+ var PopperArrow = React242.forwardRef(function PopperArrow2(props, forwardedRef) {
22738
22899
  const { __scopePopper, ...arrowProps } = props;
22739
22900
  const contentContext = useContentContext(ARROW_NAME, __scopePopper);
22740
22901
  const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
@@ -23077,7 +23238,7 @@ function useCallbackRef2(initialValue, callback) {
23077
23238
  ref.callback = callback;
23078
23239
  return ref.facade;
23079
23240
  }
23080
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React292.useLayoutEffect : React292.useEffect;
23241
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React29.useLayoutEffect : React29.useEffect;
23081
23242
  var currentValues = new WeakMap;
23082
23243
  function useMergeRefs(refs, defaultValue) {
23083
23244
  var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
@@ -23713,9 +23874,9 @@ var Select = (props) => {
23713
23874
  required
23714
23875
  } = props;
23715
23876
  const popperScope = usePopperScope(__scopeSelect);
23716
- const [trigger, setTrigger] = React36.useState(null);
23717
- const [valueNode, setValueNode] = React36.useState(null);
23718
- const [valueNodeHasChildren, setValueNodeHasChildren] = React36.useState(false);
23877
+ const [trigger, setTrigger] = React362.useState(null);
23878
+ const [valueNode, setValueNode] = React362.useState(null);
23879
+ const [valueNodeHasChildren, setValueNodeHasChildren] = React362.useState(false);
23719
23880
  const direction = useDirection(dir);
23720
23881
  const [open = false, setOpen] = useControllableState({
23721
23882
  prop: openProp,
@@ -23727,11 +23888,11 @@ var Select = (props) => {
23727
23888
  defaultProp: defaultValue,
23728
23889
  onChange: onValueChange
23729
23890
  });
23730
- const triggerPointerDownPosRef = React36.useRef(null);
23891
+ const triggerPointerDownPosRef = React362.useRef(null);
23731
23892
  const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
23732
- const [nativeOptionsSet, setNativeOptionsSet] = React36.useState(/* @__PURE__ */ new Set);
23893
+ const [nativeOptionsSet, setNativeOptionsSet] = React362.useState(/* @__PURE__ */ new Set);
23733
23894
  const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
23734
- return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs4(SelectProvider, {
23895
+ return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
23735
23896
  required,
23736
23897
  scope: __scopeSelect,
23737
23898
  trigger,
@@ -23751,10 +23912,10 @@ var Select = (props) => {
23751
23912
  children: [
23752
23913
  /* @__PURE__ */ jsx242(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx242(SelectNativeOptionsProvider, {
23753
23914
  scope: props.__scopeSelect,
23754
- onNativeOptionAdd: React36.useCallback((option) => {
23915
+ onNativeOptionAdd: React362.useCallback((option) => {
23755
23916
  setNativeOptionsSet((prev) => new Set(prev).add(option));
23756
23917
  }, []),
23757
- onNativeOptionRemove: React36.useCallback((option) => {
23918
+ onNativeOptionRemove: React362.useCallback((option) => {
23758
23919
  setNativeOptionsSet((prev) => {
23759
23920
  const optionsSet = new Set(prev);
23760
23921
  optionsSet.delete(option);
@@ -23763,7 +23924,7 @@ var Select = (props) => {
23763
23924
  }, []),
23764
23925
  children
23765
23926
  }) }),
23766
- isFormControl ? /* @__PURE__ */ jsxs4(BubbleSelect, {
23927
+ isFormControl ? /* @__PURE__ */ jsxs42(BubbleSelect, {
23767
23928
  "aria-hidden": true,
23768
23929
  required,
23769
23930
  tabIndex: -1,
@@ -23782,7 +23943,7 @@ var Select = (props) => {
23782
23943
  };
23783
23944
  Select.displayName = SELECT_NAME;
23784
23945
  var TRIGGER_NAME = "SelectTrigger";
23785
- var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
23946
+ var SelectTrigger = React362.forwardRef((props, forwardedRef) => {
23786
23947
  const { __scopeSelect, disabled = false, ...triggerProps } = props;
23787
23948
  const popperScope = usePopperScope(__scopeSelect);
23788
23949
  const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
@@ -23850,7 +24011,7 @@ var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
23850
24011
  });
23851
24012
  SelectTrigger.displayName = TRIGGER_NAME;
23852
24013
  var VALUE_NAME = "SelectValue";
23853
- var SelectValue = React36.forwardRef((props, forwardedRef) => {
24014
+ var SelectValue = React362.forwardRef((props, forwardedRef) => {
23854
24015
  const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
23855
24016
  const context = useSelectContext(VALUE_NAME, __scopeSelect);
23856
24017
  const { onValueNodeHasChildrenChange } = context;
@@ -23868,7 +24029,7 @@ var SelectValue = React36.forwardRef((props, forwardedRef) => {
23868
24029
  });
23869
24030
  SelectValue.displayName = VALUE_NAME;
23870
24031
  var ICON_NAME = "SelectIcon";
23871
- var SelectIcon = React36.forwardRef((props, forwardedRef) => {
24032
+ var SelectIcon = React362.forwardRef((props, forwardedRef) => {
23872
24033
  const { __scopeSelect, children, ...iconProps } = props;
23873
24034
  return /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
23874
24035
  });
@@ -23879,9 +24040,9 @@ var SelectPortal = (props) => {
23879
24040
  };
23880
24041
  SelectPortal.displayName = PORTAL_NAME2;
23881
24042
  var CONTENT_NAME2 = "SelectContent";
23882
- var SelectContent = React36.forwardRef((props, forwardedRef) => {
24043
+ var SelectContent = React362.forwardRef((props, forwardedRef) => {
23883
24044
  const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
23884
- const [fragment, setFragment] = React36.useState();
24045
+ const [fragment, setFragment] = React362.useState();
23885
24046
  useLayoutEffect22(() => {
23886
24047
  setFragment(new DocumentFragment);
23887
24048
  }, []);
@@ -23895,7 +24056,7 @@ SelectContent.displayName = CONTENT_NAME2;
23895
24056
  var CONTENT_MARGIN = 10;
23896
24057
  var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
23897
24058
  var CONTENT_IMPL_NAME = "SelectContentImpl";
23898
- var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
24059
+ var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
23899
24060
  const {
23900
24061
  __scopeSelect,
23901
24062
  position = "item-aligned",
@@ -23915,20 +24076,20 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
23915
24076
  ...contentProps
23916
24077
  } = props;
23917
24078
  const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
23918
- const [content, setContent] = React36.useState(null);
23919
- const [viewport, setViewport] = React36.useState(null);
24079
+ const [content, setContent] = React362.useState(null);
24080
+ const [viewport, setViewport] = React362.useState(null);
23920
24081
  const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
23921
- const [selectedItem, setSelectedItem] = React36.useState(null);
23922
- const [selectedItemText, setSelectedItemText] = React36.useState(null);
24082
+ const [selectedItem, setSelectedItem] = React362.useState(null);
24083
+ const [selectedItemText, setSelectedItemText] = React362.useState(null);
23923
24084
  const getItems = useCollection(__scopeSelect);
23924
- const [isPositioned, setIsPositioned] = React36.useState(false);
23925
- const firstValidItemFoundRef = React36.useRef(false);
23926
- React36.useEffect(() => {
24085
+ const [isPositioned, setIsPositioned] = React362.useState(false);
24086
+ const firstValidItemFoundRef = React362.useRef(false);
24087
+ React362.useEffect(() => {
23927
24088
  if (content)
23928
24089
  return hideOthers(content);
23929
24090
  }, [content]);
23930
24091
  useFocusGuards();
23931
- const focusFirst2 = React36.useCallback((candidates) => {
24092
+ const focusFirst2 = React362.useCallback((candidates) => {
23932
24093
  const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
23933
24094
  const [lastItem] = restItems.slice(-1);
23934
24095
  const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
@@ -23945,14 +24106,14 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
23945
24106
  return;
23946
24107
  }
23947
24108
  }, [getItems, viewport]);
23948
- const focusSelectedItem = React36.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
23949
- React36.useEffect(() => {
24109
+ const focusSelectedItem = React362.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
24110
+ React362.useEffect(() => {
23950
24111
  if (isPositioned) {
23951
24112
  focusSelectedItem();
23952
24113
  }
23953
24114
  }, [isPositioned, focusSelectedItem]);
23954
24115
  const { onOpenChange, triggerPointerDownPosRef } = context;
23955
- React36.useEffect(() => {
24116
+ React362.useEffect(() => {
23956
24117
  if (content) {
23957
24118
  let pointerMoveDelta = { x: 0, y: 0 };
23958
24119
  const handlePointerMove = (event) => {
@@ -23982,7 +24143,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
23982
24143
  };
23983
24144
  }
23984
24145
  }, [content, onOpenChange, triggerPointerDownPosRef]);
23985
- React36.useEffect(() => {
24146
+ React362.useEffect(() => {
23986
24147
  const close = () => onOpenChange(false);
23987
24148
  window.addEventListener("blur", close);
23988
24149
  window.addEventListener("resize", close);
@@ -23999,7 +24160,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
23999
24160
  setTimeout(() => nextItem.ref.current.focus());
24000
24161
  }
24001
24162
  });
24002
- const itemRefCallback = React36.useCallback((node, value, disabled) => {
24163
+ const itemRefCallback = React362.useCallback((node, value, disabled) => {
24003
24164
  const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
24004
24165
  const isSelectedItem = context.value !== undefined && context.value === value;
24005
24166
  if (isSelectedItem || isFirstValidItem) {
@@ -24008,8 +24169,8 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
24008
24169
  firstValidItemFoundRef.current = true;
24009
24170
  }
24010
24171
  }, [context.value]);
24011
- const handleItemLeave = React36.useCallback(() => content?.focus(), [content]);
24012
- const itemTextRefCallback = React36.useCallback((node, value, disabled) => {
24172
+ const handleItemLeave = React362.useCallback(() => content?.focus(), [content]);
24173
+ const itemTextRefCallback = React362.useCallback((node, value, disabled) => {
24013
24174
  const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
24014
24175
  const isSelectedItem = context.value !== undefined && context.value === value;
24015
24176
  if (isSelectedItem || isFirstValidItem) {
@@ -24104,18 +24265,18 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
24104
24265
  });
24105
24266
  SelectContentImpl.displayName = CONTENT_IMPL_NAME;
24106
24267
  var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
24107
- var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
24268
+ var SelectItemAlignedPosition = React362.forwardRef((props, forwardedRef) => {
24108
24269
  const { __scopeSelect, onPlaced, ...popperProps } = props;
24109
24270
  const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
24110
24271
  const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
24111
- const [contentWrapper, setContentWrapper] = React36.useState(null);
24112
- const [content, setContent] = React36.useState(null);
24272
+ const [contentWrapper, setContentWrapper] = React362.useState(null);
24273
+ const [content, setContent] = React362.useState(null);
24113
24274
  const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
24114
24275
  const getItems = useCollection(__scopeSelect);
24115
- const shouldExpandOnScrollRef = React36.useRef(false);
24116
- const shouldRepositionRef = React36.useRef(true);
24276
+ const shouldExpandOnScrollRef = React362.useRef(false);
24277
+ const shouldRepositionRef = React362.useRef(true);
24117
24278
  const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
24118
- const position = React36.useCallback(() => {
24279
+ const position = React362.useCallback(() => {
24119
24280
  if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
24120
24281
  const triggerRect = context.trigger.getBoundingClientRect();
24121
24282
  const contentRect = content.getBoundingClientRect();
@@ -24196,12 +24357,12 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
24196
24357
  onPlaced
24197
24358
  ]);
24198
24359
  useLayoutEffect22(() => position(), [position]);
24199
- const [contentZIndex, setContentZIndex] = React36.useState();
24360
+ const [contentZIndex, setContentZIndex] = React362.useState();
24200
24361
  useLayoutEffect22(() => {
24201
24362
  if (content)
24202
24363
  setContentZIndex(window.getComputedStyle(content).zIndex);
24203
24364
  }, [content]);
24204
- const handleScrollButtonChange = React36.useCallback((node) => {
24365
+ const handleScrollButtonChange = React362.useCallback((node) => {
24205
24366
  if (node && shouldRepositionRef.current === true) {
24206
24367
  position();
24207
24368
  focusSelectedItem?.();
@@ -24235,7 +24396,7 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
24235
24396
  });
24236
24397
  SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
24237
24398
  var POPPER_POSITION_NAME = "SelectPopperPosition";
24238
- var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
24399
+ var SelectPopperPosition = React362.forwardRef((props, forwardedRef) => {
24239
24400
  const {
24240
24401
  __scopeSelect,
24241
24402
  align = "start",
@@ -24265,13 +24426,13 @@ var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
24265
24426
  SelectPopperPosition.displayName = POPPER_POSITION_NAME;
24266
24427
  var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
24267
24428
  var VIEWPORT_NAME = "SelectViewport";
24268
- var SelectViewport = React36.forwardRef((props, forwardedRef) => {
24429
+ var SelectViewport = React362.forwardRef((props, forwardedRef) => {
24269
24430
  const { __scopeSelect, nonce, ...viewportProps } = props;
24270
24431
  const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
24271
24432
  const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
24272
24433
  const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
24273
- const prevScrollTopRef = React36.useRef(0);
24274
- return /* @__PURE__ */ jsxs4(Fragment8, { children: [
24434
+ const prevScrollTopRef = React362.useRef(0);
24435
+ return /* @__PURE__ */ jsxs42(Fragment8, { children: [
24275
24436
  /* @__PURE__ */ jsx242("style", {
24276
24437
  dangerouslySetInnerHTML: {
24277
24438
  __html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`
@@ -24319,14 +24480,14 @@ var SelectViewport = React36.forwardRef((props, forwardedRef) => {
24319
24480
  SelectViewport.displayName = VIEWPORT_NAME;
24320
24481
  var GROUP_NAME = "SelectGroup";
24321
24482
  var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
24322
- var SelectGroup = React36.forwardRef((props, forwardedRef) => {
24483
+ var SelectGroup = React362.forwardRef((props, forwardedRef) => {
24323
24484
  const { __scopeSelect, ...groupProps } = props;
24324
24485
  const groupId = useId();
24325
24486
  return /* @__PURE__ */ jsx242(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx242(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
24326
24487
  });
24327
24488
  SelectGroup.displayName = GROUP_NAME;
24328
24489
  var LABEL_NAME = "SelectLabel";
24329
- var SelectLabel = React36.forwardRef((props, forwardedRef) => {
24490
+ var SelectLabel = React362.forwardRef((props, forwardedRef) => {
24330
24491
  const { __scopeSelect, ...labelProps } = props;
24331
24492
  const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
24332
24493
  return /* @__PURE__ */ jsx242(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
@@ -24334,7 +24495,7 @@ var SelectLabel = React36.forwardRef((props, forwardedRef) => {
24334
24495
  SelectLabel.displayName = LABEL_NAME;
24335
24496
  var ITEM_NAME = "SelectItem";
24336
24497
  var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
24337
- var SelectItem = React36.forwardRef((props, forwardedRef) => {
24498
+ var SelectItem = React362.forwardRef((props, forwardedRef) => {
24338
24499
  const {
24339
24500
  __scopeSelect,
24340
24501
  value,
@@ -24345,8 +24506,8 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
24345
24506
  const context = useSelectContext(ITEM_NAME, __scopeSelect);
24346
24507
  const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
24347
24508
  const isSelected = context.value === value;
24348
- const [textValue, setTextValue] = React36.useState(textValueProp ?? "");
24349
- const [isFocused, setIsFocused] = React36.useState(false);
24509
+ const [textValue, setTextValue] = React362.useState(textValueProp ?? "");
24510
+ const [isFocused, setIsFocused] = React362.useState(false);
24350
24511
  const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
24351
24512
  const textId = useId();
24352
24513
  const handleSelect = () => {
@@ -24364,7 +24525,7 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
24364
24525
  disabled,
24365
24526
  textId,
24366
24527
  isSelected,
24367
- onItemTextChange: React36.useCallback((node) => {
24528
+ onItemTextChange: React362.useCallback((node) => {
24368
24529
  setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
24369
24530
  }, []),
24370
24531
  children: /* @__PURE__ */ jsx242(Collection.ItemSlot, {
@@ -24413,39 +24574,39 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
24413
24574
  });
24414
24575
  SelectItem.displayName = ITEM_NAME;
24415
24576
  var ITEM_TEXT_NAME = "SelectItemText";
24416
- var SelectItemText = React36.forwardRef((props, forwardedRef) => {
24577
+ var SelectItemText = React362.forwardRef((props, forwardedRef) => {
24417
24578
  const { __scopeSelect, className, style, ...itemTextProps } = props;
24418
24579
  const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
24419
24580
  const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
24420
24581
  const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
24421
24582
  const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
24422
- const [itemTextNode, setItemTextNode] = React36.useState(null);
24583
+ const [itemTextNode, setItemTextNode] = React362.useState(null);
24423
24584
  const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
24424
24585
  const textContent = itemTextNode?.textContent;
24425
- const nativeOption = React36.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
24586
+ const nativeOption = React362.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
24426
24587
  const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
24427
24588
  useLayoutEffect22(() => {
24428
24589
  onNativeOptionAdd(nativeOption);
24429
24590
  return () => onNativeOptionRemove(nativeOption);
24430
24591
  }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
24431
- return /* @__PURE__ */ jsxs4(Fragment8, { children: [
24592
+ return /* @__PURE__ */ jsxs42(Fragment8, { children: [
24432
24593
  /* @__PURE__ */ jsx242(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
24433
24594
  itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM4.createPortal(itemTextProps.children, context.valueNode) : null
24434
24595
  ] });
24435
24596
  });
24436
24597
  SelectItemText.displayName = ITEM_TEXT_NAME;
24437
24598
  var ITEM_INDICATOR_NAME = "SelectItemIndicator";
24438
- var SelectItemIndicator = React36.forwardRef((props, forwardedRef) => {
24599
+ var SelectItemIndicator = React362.forwardRef((props, forwardedRef) => {
24439
24600
  const { __scopeSelect, ...itemIndicatorProps } = props;
24440
24601
  const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
24441
24602
  return itemContext.isSelected ? /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
24442
24603
  });
24443
24604
  SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
24444
24605
  var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
24445
- var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
24606
+ var SelectScrollUpButton = React362.forwardRef((props, forwardedRef) => {
24446
24607
  const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
24447
24608
  const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
24448
- const [canScrollUp, setCanScrollUp] = React36.useState(false);
24609
+ const [canScrollUp, setCanScrollUp] = React362.useState(false);
24449
24610
  const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
24450
24611
  useLayoutEffect22(() => {
24451
24612
  if (contentContext.viewport && contentContext.isPositioned) {
@@ -24473,10 +24634,10 @@ var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
24473
24634
  });
24474
24635
  SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
24475
24636
  var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
24476
- var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
24637
+ var SelectScrollDownButton = React362.forwardRef((props, forwardedRef) => {
24477
24638
  const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
24478
24639
  const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
24479
- const [canScrollDown, setCanScrollDown] = React36.useState(false);
24640
+ const [canScrollDown, setCanScrollDown] = React362.useState(false);
24480
24641
  const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
24481
24642
  useLayoutEffect22(() => {
24482
24643
  if (contentContext.viewport && contentContext.isPositioned) {
@@ -24504,18 +24665,18 @@ var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
24504
24665
  }) : null;
24505
24666
  });
24506
24667
  SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
24507
- var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
24668
+ var SelectScrollButtonImpl = React362.forwardRef((props, forwardedRef) => {
24508
24669
  const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
24509
24670
  const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
24510
- const autoScrollTimerRef = React36.useRef(null);
24671
+ const autoScrollTimerRef = React362.useRef(null);
24511
24672
  const getItems = useCollection(__scopeSelect);
24512
- const clearAutoScrollTimer = React36.useCallback(() => {
24673
+ const clearAutoScrollTimer = React362.useCallback(() => {
24513
24674
  if (autoScrollTimerRef.current !== null) {
24514
24675
  window.clearInterval(autoScrollTimerRef.current);
24515
24676
  autoScrollTimerRef.current = null;
24516
24677
  }
24517
24678
  }, []);
24518
- React36.useEffect(() => {
24679
+ React362.useEffect(() => {
24519
24680
  return () => clearAutoScrollTimer();
24520
24681
  }, [clearAutoScrollTimer]);
24521
24682
  useLayoutEffect22(() => {
@@ -24544,13 +24705,13 @@ var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
24544
24705
  });
24545
24706
  });
24546
24707
  var SEPARATOR_NAME = "SelectSeparator";
24547
- var SelectSeparator = React36.forwardRef((props, forwardedRef) => {
24708
+ var SelectSeparator = React362.forwardRef((props, forwardedRef) => {
24548
24709
  const { __scopeSelect, ...separatorProps } = props;
24549
24710
  return /* @__PURE__ */ jsx242(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
24550
24711
  });
24551
24712
  SelectSeparator.displayName = SEPARATOR_NAME;
24552
24713
  var ARROW_NAME2 = "SelectArrow";
24553
- var SelectArrow = React36.forwardRef((props, forwardedRef) => {
24714
+ var SelectArrow = React362.forwardRef((props, forwardedRef) => {
24554
24715
  const { __scopeSelect, ...arrowProps } = props;
24555
24716
  const popperScope = usePopperScope(__scopeSelect);
24556
24717
  const context = useSelectContext(ARROW_NAME2, __scopeSelect);
@@ -24561,12 +24722,12 @@ SelectArrow.displayName = ARROW_NAME2;
24561
24722
  function shouldShowPlaceholder(value) {
24562
24723
  return value === "" || value === undefined;
24563
24724
  }
24564
- var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
24725
+ var BubbleSelect = React362.forwardRef((props, forwardedRef) => {
24565
24726
  const { value, ...selectProps } = props;
24566
- const ref = React36.useRef(null);
24727
+ const ref = React362.useRef(null);
24567
24728
  const composedRefs = useComposedRefs2(forwardedRef, ref);
24568
24729
  const prevValue = usePrevious(value);
24569
- React36.useEffect(() => {
24730
+ React362.useEffect(() => {
24570
24731
  const select = ref.current;
24571
24732
  const selectProto = window.HTMLSelectElement.prototype;
24572
24733
  const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
@@ -24582,9 +24743,9 @@ var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
24582
24743
  BubbleSelect.displayName = "BubbleSelect";
24583
24744
  function useTypeaheadSearch(onSearchChange) {
24584
24745
  const handleSearchChange = useCallbackRef(onSearchChange);
24585
- const searchRef = React36.useRef("");
24586
- const timerRef = React36.useRef(0);
24587
- const handleTypeaheadSearch = React36.useCallback((key) => {
24746
+ const searchRef = React362.useRef("");
24747
+ const timerRef = React362.useRef(0);
24748
+ const handleTypeaheadSearch = React362.useCallback((key) => {
24588
24749
  const search = searchRef.current + key;
24589
24750
  handleSearchChange(search);
24590
24751
  (function updateSearch(value) {
@@ -24594,11 +24755,11 @@ function useTypeaheadSearch(onSearchChange) {
24594
24755
  timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
24595
24756
  })(search);
24596
24757
  }, [handleSearchChange]);
24597
- const resetTypeahead = React36.useCallback(() => {
24758
+ const resetTypeahead = React362.useCallback(() => {
24598
24759
  searchRef.current = "";
24599
24760
  window.clearTimeout(timerRef.current);
24600
24761
  }, []);
24601
- React36.useEffect(() => {
24762
+ React362.useEffect(() => {
24602
24763
  return () => window.clearTimeout(timerRef.current);
24603
24764
  }, []);
24604
24765
  return [searchRef, handleTypeaheadSearch, resetTypeahead];
@@ -24687,7 +24848,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
24687
24848
  var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
24688
24849
  var Select2 = Root222;
24689
24850
  var SelectValue2 = Value;
24690
- var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs52(Trigger, {
24851
+ var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
24691
24852
  ref,
24692
24853
  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),
24693
24854
  ...props,
@@ -24702,7 +24863,7 @@ var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref
24702
24863
  ]
24703
24864
  }));
24704
24865
  SelectTrigger2.displayName = Trigger.displayName;
24705
- var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
24866
+ var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
24706
24867
  ref,
24707
24868
  className: cn("flex cursor-default items-center justify-center py-1", className),
24708
24869
  ...props,
@@ -24711,7 +24872,7 @@ var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) =
24711
24872
  })
24712
24873
  }));
24713
24874
  SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
24714
- var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
24875
+ var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
24715
24876
  ref,
24716
24877
  className: cn("flex cursor-default items-center justify-center py-1", className),
24717
24878
  ...props,
@@ -24720,8 +24881,8 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
24720
24881
  })
24721
24882
  }));
24722
24883
  SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
24723
- var SelectContent2 = React372.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
24724
- children: /* @__PURE__ */ jsxs52(Content2, {
24884
+ var SelectContent2 = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
24885
+ children: /* @__PURE__ */ jsxs5(Content2, {
24725
24886
  ref,
24726
24887
  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),
24727
24888
  position,
@@ -24737,13 +24898,13 @@ var SelectContent2 = React372.forwardRef(({ className, children, position = "pop
24737
24898
  })
24738
24899
  }));
24739
24900
  SelectContent2.displayName = Content2.displayName;
24740
- var SelectLabel2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
24901
+ var SelectLabel2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
24741
24902
  ref,
24742
24903
  className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
24743
24904
  ...props
24744
24905
  }));
24745
24906
  SelectLabel2.displayName = Label.displayName;
24746
- var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs52(Item, {
24907
+ var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
24747
24908
  ref,
24748
24909
  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),
24749
24910
  ...props,
@@ -24762,7 +24923,7 @@ var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) =
24762
24923
  ]
24763
24924
  }));
24764
24925
  SelectItem2.displayName = Item.displayName;
24765
- var SelectSeparator2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
24926
+ var SelectSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
24766
24927
  ref,
24767
24928
  className: cn("-mx-1 my-1 h-px bg-muted", className),
24768
24929
  ...props
@@ -24795,19 +24956,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
24795
24956
  function createContextScope2(scopeName, createContextScopeDeps = []) {
24796
24957
  let defaultContexts = [];
24797
24958
  function createContext32(rootComponentName, defaultContext) {
24798
- const BaseContext = React38.createContext(defaultContext);
24959
+ const BaseContext = React382.createContext(defaultContext);
24799
24960
  const index2 = defaultContexts.length;
24800
24961
  defaultContexts = [...defaultContexts, defaultContext];
24801
24962
  const Provider = (props) => {
24802
24963
  const { scope, children, ...context } = props;
24803
24964
  const Context = scope?.[scopeName]?.[index2] || BaseContext;
24804
- const value = React38.useMemo(() => context, Object.values(context));
24965
+ const value = React382.useMemo(() => context, Object.values(context));
24805
24966
  return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
24806
24967
  };
24807
24968
  Provider.displayName = rootComponentName + "Provider";
24808
24969
  function useContext222(consumerName, scope) {
24809
24970
  const Context = scope?.[scopeName]?.[index2] || BaseContext;
24810
- const context = React38.useContext(Context);
24971
+ const context = React382.useContext(Context);
24811
24972
  if (context)
24812
24973
  return context;
24813
24974
  if (defaultContext !== undefined)
@@ -24818,11 +24979,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
24818
24979
  }
24819
24980
  const createScope = () => {
24820
24981
  const scopeContexts = defaultContexts.map((defaultContext) => {
24821
- return React38.createContext(defaultContext);
24982
+ return React382.createContext(defaultContext);
24822
24983
  });
24823
24984
  return function useScope(scope) {
24824
24985
  const contexts = scope?.[scopeName] || scopeContexts;
24825
- return React38.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
24986
+ return React382.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
24826
24987
  };
24827
24988
  };
24828
24989
  createScope.scopeName = scopeName;
@@ -24843,7 +25004,7 @@ function composeContextScopes2(...scopes) {
24843
25004
  const currentScope = scopeProps[`__scope${scopeName}`];
24844
25005
  return { ...nextScopes2, ...currentScope };
24845
25006
  }, {});
24846
- return React38.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
25007
+ return React382.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
24847
25008
  };
24848
25009
  };
24849
25010
  createScope.scopeName = baseScope.scopeName;
@@ -24851,22 +25012,22 @@ function composeContextScopes2(...scopes) {
24851
25012
  }
24852
25013
  function createSlot2(ownerName) {
24853
25014
  const SlotClone2 = /* @__PURE__ */ createSlotClone2(ownerName);
24854
- const Slot22 = React392.forwardRef((props, forwardedRef) => {
25015
+ const Slot22 = React39.forwardRef((props, forwardedRef) => {
24855
25016
  const { children, ...slotProps } = props;
24856
- const childrenArray = React392.Children.toArray(children);
25017
+ const childrenArray = React39.Children.toArray(children);
24857
25018
  const slottable = childrenArray.find(isSlottable3);
24858
25019
  if (slottable) {
24859
25020
  const newElement = slottable.props.children;
24860
25021
  const newChildren = childrenArray.map((child) => {
24861
25022
  if (child === slottable) {
24862
- if (React392.Children.count(newElement) > 1)
24863
- return React392.Children.only(null);
24864
- return React392.isValidElement(newElement) ? newElement.props.children : null;
25023
+ if (React39.Children.count(newElement) > 1)
25024
+ return React39.Children.only(null);
25025
+ return React39.isValidElement(newElement) ? newElement.props.children : null;
24865
25026
  } else {
24866
25027
  return child;
24867
25028
  }
24868
25029
  });
24869
- return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React392.isValidElement(newElement) ? React392.cloneElement(newElement, undefined, newChildren) : null });
25030
+ return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, undefined, newChildren) : null });
24870
25031
  }
24871
25032
  return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children });
24872
25033
  });
@@ -24874,24 +25035,24 @@ function createSlot2(ownerName) {
24874
25035
  return Slot22;
24875
25036
  }
24876
25037
  function createSlotClone2(ownerName) {
24877
- const SlotClone2 = React392.forwardRef((props, forwardedRef) => {
25038
+ const SlotClone2 = React39.forwardRef((props, forwardedRef) => {
24878
25039
  const { children, ...slotProps } = props;
24879
- if (React392.isValidElement(children)) {
25040
+ if (React39.isValidElement(children)) {
24880
25041
  const childrenRef = getElementRef3(children);
24881
25042
  const props2 = mergeProps3(slotProps, children.props);
24882
- if (children.type !== React392.Fragment) {
25043
+ if (children.type !== React39.Fragment) {
24883
25044
  props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
24884
25045
  }
24885
- return React392.cloneElement(children, props2);
25046
+ return React39.cloneElement(children, props2);
24886
25047
  }
24887
- return React392.Children.count(children) > 1 ? React392.Children.only(null) : null;
25048
+ return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
24888
25049
  });
24889
25050
  SlotClone2.displayName = `${ownerName}.SlotClone`;
24890
25051
  return SlotClone2;
24891
25052
  }
24892
25053
  var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
24893
25054
  function isSlottable3(child) {
24894
- return React392.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
25055
+ return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
24895
25056
  }
24896
25057
  function mergeProps3(slotProps, childProps) {
24897
25058
  const overrideProps = { ...childProps };
@@ -25285,7 +25446,7 @@ function toSafeIndex(array, index2) {
25285
25446
  function toSafeInteger(number) {
25286
25447
  return number !== number || number === 0 ? 0 : Math.trunc(number);
25287
25448
  }
25288
- var useLayoutEffect222 = globalThis?.document ? React41.useLayoutEffect : () => {};
25449
+ var useLayoutEffect222 = globalThis?.document ? React412.useLayoutEffect : () => {};
25289
25450
  var useReactId2 = React422[" useId ".trim().toString()] || (() => {
25290
25451
  return;
25291
25452
  });
@@ -25319,7 +25480,7 @@ var NODES2 = [
25319
25480
  ];
25320
25481
  var Primitive2 = NODES2.reduce((primitive, node) => {
25321
25482
  const Slot3 = createSlot2(`Primitive.${node}`);
25322
- const Node2 = React43.forwardRef((props, forwardedRef) => {
25483
+ const Node2 = React432.forwardRef((props, forwardedRef) => {
25323
25484
  const { asChild, ...primitiveProps } = props;
25324
25485
  const Comp = asChild ? Slot3 : node;
25325
25486
  if (typeof window !== "undefined") {
@@ -25902,7 +26063,7 @@ var Triangle22 = (props) => {
25902
26063
  };
25903
26064
 
25904
26065
  // src/components/prompts/NewBackButton.tsx
25905
- import { jsx as jsx45, jsxs as jsxs6 } from "react/jsx-runtime";
26066
+ import { jsx as jsx45, jsxs as jsxs7 } from "react/jsx-runtime";
25906
26067
  var NewBackButton = ({ text, link }) => {
25907
26068
  return /* @__PURE__ */ jsx45("div", {
25908
26069
  className: "justify-center items-center font-medium mb-4 block text-text",
@@ -25913,7 +26074,7 @@ var NewBackButton = ({ text, link }) => {
25913
26074
  children: /* @__PURE__ */ jsx45(Button, {
25914
26075
  href: link,
25915
26076
  className: "px-8 rounded-full text-sm h-10",
25916
- children: /* @__PURE__ */ jsxs6("div", {
26077
+ children: /* @__PURE__ */ jsxs7("div", {
25917
26078
  className: "flex row items-center justify-start font-normal",
25918
26079
  children: [
25919
26080
  /* @__PURE__ */ jsx45("svg", {
@@ -25947,13 +26108,13 @@ var Page = ({ children, className, onDrop, onDragOver }) => {
25947
26108
  };
25948
26109
 
25949
26110
  // src/components/prompts/PromptsSubmit.tsx
25950
- import { jsx as jsx47, jsxs as jsxs7 } from "react/jsx-runtime";
26111
+ import { jsx as jsx47, jsxs as jsxs8 } from "react/jsx-runtime";
25951
26112
  var PromptsSubmitPage = () => {
25952
26113
  return /* @__PURE__ */ jsx47(Page, {
25953
26114
  className: "flex-col",
25954
26115
  children: /* @__PURE__ */ jsx47("div", {
25955
26116
  className: "m-auto max-w-[800px] w-full",
25956
- children: /* @__PURE__ */ jsxs7("div", {
26117
+ children: /* @__PURE__ */ jsxs8("div", {
25957
26118
  className: "mx-4 px-8 py-8 pt-8",
25958
26119
  children: [
25959
26120
  /* @__PURE__ */ jsx47(NewBackButton, {