@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.
@@ -36,9 +36,9 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
36
36
  import { useMemo as useMemo52 } from "react";
37
37
 
38
38
  // ../design/dist/esm/index.mjs
39
- import * as React23 from "react";
39
+ import * as React24 from "react";
40
40
  import * as React3 from "react";
41
- import { Fragment as Fragment2, jsx as jsx43 } from "react/jsx-runtime";
41
+ import { Fragment as Fragment22, jsx as jsx43 } from "react/jsx-runtime";
42
42
  import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
43
43
 
44
44
  // ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
@@ -1381,7 +1381,7 @@ var getDefaultConfig = () => {
1381
1381
  var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
1382
1382
 
1383
1383
  // ../design/dist/esm/index.mjs
1384
- import React32, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
1384
+ import React33, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
1385
1385
 
1386
1386
  // ../paths/dist/esm/index.mjs
1387
1387
  var cutLInstruction = ({
@@ -4174,6 +4174,7 @@ import * as React6 from "react";
4174
4174
  import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
4175
4175
  import { useContext as useContext8, useMemo as useMemo7 } from "react";
4176
4176
  import { jsx as jsx7 } from "react/jsx-runtime";
4177
+ import React9 from "react";
4177
4178
  import {
4178
4179
  forwardRef as forwardRef3,
4179
4180
  useCallback as useCallback6,
@@ -4199,11 +4200,11 @@ import { useContext as useContext13 } from "react";
4199
4200
  import { useContext as useContext12, useMemo as useMemo10 } from "react";
4200
4201
  import { jsx as jsx9 } from "react/jsx-runtime";
4201
4202
  import { createContext as createContext14 } from "react";
4202
- import React11, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
4203
+ import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
4203
4204
  import { jsx as jsx10 } from "react/jsx-runtime";
4204
- import React12, { createContext as createContext15 } from "react";
4205
+ import React13, { createContext as createContext15 } from "react";
4205
4206
  import { jsx as jsx11 } from "react/jsx-runtime";
4206
- import React13, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
4207
+ import React14, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
4207
4208
  import { useContext as useContext15, useRef as useRef5 } from "react";
4208
4209
  import { createContext as createContext16 } from "react";
4209
4210
  import { jsx as jsx12 } from "react/jsx-runtime";
@@ -4215,7 +4216,7 @@ import {
4215
4216
  useRef as useRef9,
4216
4217
  useState as useState6
4217
4218
  } from "react";
4218
- import React15, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
4219
+ import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
4219
4220
  import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
4220
4221
  import { jsx as jsx13 } from "react/jsx-runtime";
4221
4222
  import { jsx as jsx14 } from "react/jsx-runtime";
@@ -4231,7 +4232,7 @@ import {
4231
4232
  } from "react";
4232
4233
  import { jsx as jsx15 } from "react/jsx-runtime";
4233
4234
  import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
4234
- import React16, { createContext as createContext18, useMemo as useMemo18 } from "react";
4235
+ import React17, { createContext as createContext18, useMemo as useMemo18 } from "react";
4235
4236
  import { jsx as jsx16 } from "react/jsx-runtime";
4236
4237
  import { useContext as useContext19 } from "react";
4237
4238
  import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
@@ -4239,7 +4240,7 @@ import { jsx as jsx17 } from "react/jsx-runtime";
4239
4240
  import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
4240
4241
  import { jsx as jsx18 } from "react/jsx-runtime";
4241
4242
  import { useCallback as useCallback13 } from "react";
4242
- import React22, {
4243
+ import React23, {
4243
4244
  forwardRef as forwardRef5,
4244
4245
  useContext as useContext28,
4245
4246
  useEffect as useEffect14,
@@ -4249,7 +4250,7 @@ import React22, {
4249
4250
  useState as useState14
4250
4251
  } from "react";
4251
4252
  import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
4252
- import React19, {
4253
+ import React20, {
4253
4254
  createContext as createContext21,
4254
4255
  createRef as createRef2,
4255
4256
  useCallback as useCallback9,
@@ -4273,7 +4274,7 @@ import {
4273
4274
  } from "react";
4274
4275
  import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
4275
4276
  import { useContext as useContext25, useMemo as useMemo24 } from "react";
4276
- import React20, {
4277
+ import React21, {
4277
4278
  useCallback as useCallback10,
4278
4279
  useContext as useContext24,
4279
4280
  useEffect as useEffect9,
@@ -4283,7 +4284,7 @@ import React20, {
4283
4284
  useState as useState12
4284
4285
  } from "react";
4285
4286
  import { jsx as jsx20 } from "react/jsx-runtime";
4286
- import React21 from "react";
4287
+ import React22 from "react";
4287
4288
  import { useEffect as useEffect10, useState as useState13 } from "react";
4288
4289
  import { useEffect as useEffect11, useRef as useRef17 } from "react";
4289
4290
  import { useEffect as useEffect13 } from "react";
@@ -4341,10 +4342,10 @@ import {
4341
4342
  useState as useState18
4342
4343
  } from "react";
4343
4344
  import { jsx as jsx28 } from "react/jsx-runtime";
4344
- import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
4345
+ import React30, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
4345
4346
  import { jsx as jsx29 } from "react/jsx-runtime";
4346
4347
  import { createRef as createRef3 } from "react";
4347
- import React30 from "react";
4348
+ import React31 from "react";
4348
4349
  import {
4349
4350
  useCallback as useCallback21,
4350
4351
  useImperativeHandle as useImperativeHandle8,
@@ -4353,14 +4354,14 @@ import {
4353
4354
  useState as useState19
4354
4355
  } from "react";
4355
4356
  import { jsx as jsx30 } from "react/jsx-runtime";
4356
- import React31 from "react";
4357
+ import React32 from "react";
4357
4358
  import { useMemo as useMemo34 } from "react";
4358
4359
  import { createContext as createContext24, useContext as useContext34, useMemo as useMemo33 } from "react";
4359
4360
  import { jsx as jsx31 } from "react/jsx-runtime";
4360
4361
  import { jsx as jsx32 } from "react/jsx-runtime";
4361
- import React33 from "react";
4362
- import React34, { createContext as createContext25 } from "react";
4363
- import React35, { useContext as useContext35 } from "react";
4362
+ import React34 from "react";
4363
+ import React35, { createContext as createContext25 } from "react";
4364
+ import React36, { useContext as useContext35 } from "react";
4364
4365
  import { useCallback as useCallback24 } from "react";
4365
4366
  import {
4366
4367
  useCallback as useCallback22,
@@ -4371,7 +4372,7 @@ import {
4371
4372
  useState as useState20
4372
4373
  } from "react";
4373
4374
  import { jsx as jsx33 } from "react/jsx-runtime";
4374
- import React37, {
4375
+ import React38, {
4375
4376
  forwardRef as forwardRef13,
4376
4377
  useCallback as useCallback23,
4377
4378
  useContext as useContext37,
@@ -4384,16 +4385,15 @@ import React37, {
4384
4385
  import { useEffect as useEffect18 } from "react";
4385
4386
  import { jsx as jsx34 } from "react/jsx-runtime";
4386
4387
  import { jsx as jsx35 } from "react/jsx-runtime";
4387
- import React39, { useMemo as useMemo37 } from "react";
4388
+ import React40, { useMemo as useMemo37 } from "react";
4388
4389
  import { jsx as jsx36 } from "react/jsx-runtime";
4389
- import {
4390
- Children,
4390
+ import React42, {
4391
4391
  forwardRef as forwardRef14,
4392
4392
  useMemo as useMemo38
4393
4393
  } from "react";
4394
- import React40 from "react";
4395
- import { jsx as jsx37 } from "react/jsx-runtime";
4396
- import React42 from "react";
4394
+ import React41 from "react";
4395
+ import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
4396
+ import React43 from "react";
4397
4397
  import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
4398
4398
  import {
4399
4399
  forwardRef as forwardRef15,
@@ -5471,6 +5471,7 @@ var InnerComposition = ({
5471
5471
  }
5472
5472
  const { folderName, parentName } = useContext9(FolderContext);
5473
5473
  const stack = compProps.stack ?? null;
5474
+ const componentFromProps = "component" in compProps ? compProps.component : null;
5474
5475
  useEffect2(() => {
5475
5476
  if (!id) {
5476
5477
  throw new Error("No id for composition passed.");
@@ -5488,6 +5489,7 @@ var InnerComposition = ({
5488
5489
  defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
5489
5490
  nonce: nonce.get(),
5490
5491
  parentFolderName: parentName,
5492
+ componentFromProps,
5491
5493
  schema: schema ?? null,
5492
5494
  calculateMetadata: compProps.calculateMetadata ?? null,
5493
5495
  stack
@@ -5506,6 +5508,7 @@ var InnerComposition = ({
5506
5508
  width,
5507
5509
  nonce,
5508
5510
  parentName,
5511
+ componentFromProps,
5509
5512
  schema,
5510
5513
  compProps.calculateMetadata,
5511
5514
  stack,
@@ -5564,11 +5567,30 @@ var Composition = (props) => {
5564
5567
  });
5565
5568
  };
5566
5569
  var componentsToAddStacksTo = [];
5570
+ var sequenceComponent = null;
5567
5571
  var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
5568
5572
  var addSequenceStackTraces = (component) => {
5569
5573
  componentsToAddStacksTo.push(component);
5570
5574
  };
5571
- var VERSION = "4.0.490";
5575
+ var setSequenceComponent = (component) => {
5576
+ sequenceComponent = component;
5577
+ };
5578
+ var getSequenceComponent = () => sequenceComponent;
5579
+ var getSingleChildComponent = (children) => {
5580
+ const mountedChildren = React9.Children.toArray(children);
5581
+ if (mountedChildren.length !== 1) {
5582
+ return null;
5583
+ }
5584
+ const child = mountedChildren[0];
5585
+ if (!React9.isValidElement(child)) {
5586
+ return null;
5587
+ }
5588
+ if (typeof child.type !== "function" && typeof child.type !== "object") {
5589
+ return null;
5590
+ }
5591
+ return child.type;
5592
+ };
5593
+ var VERSION = "4.0.492";
5572
5594
  var checkMultipleRemotionVersions = () => {
5573
5595
  if (typeof globalThis === "undefined") {
5574
5596
  return;
@@ -6168,7 +6190,7 @@ var sequenceSchemaDefaultLayoutNone = {
6168
6190
  var PremountContext = createContext14({
6169
6191
  premountFramesRemaining: 0
6170
6192
  });
6171
- var SequenceManager = React11.createContext({
6193
+ var SequenceManager = React12.createContext({
6172
6194
  registerSequence: () => {
6173
6195
  throw new Error("SequenceManagerContext not initialized");
6174
6196
  },
@@ -6177,19 +6199,19 @@ var SequenceManager = React11.createContext({
6177
6199
  },
6178
6200
  sequences: []
6179
6201
  });
6180
- var SequenceManagerRefContext = React11.createContext({
6202
+ var SequenceManagerRefContext = React12.createContext({
6181
6203
  current: []
6182
6204
  });
6183
6205
  var makeSequencePropsSubscriptionKey = (key) => {
6184
- return `${key.nodePath.join(".")}.${key.sequenceKeys.join(".")}.${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
6206
+ return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
6185
6207
  };
6186
- var VisualModePropStatusesContext = React11.createContext({
6208
+ var VisualModePropStatusesContext = React12.createContext({
6187
6209
  propStatuses: {}
6188
6210
  });
6189
- var VisualModePropStatusesRefContext = React11.createContext({
6211
+ var VisualModePropStatusesRefContext = React12.createContext({
6190
6212
  current: {}
6191
6213
  });
6192
- var VisualModeDragOverridesContext = React11.createContext({
6214
+ var VisualModeDragOverridesContext = React12.createContext({
6193
6215
  getDragOverrides: () => {
6194
6216
  throw new Error("VisualModeDragOverridesContext not initialized");
6195
6217
  },
@@ -6197,7 +6219,7 @@ var VisualModeDragOverridesContext = React11.createContext({
6197
6219
  throw new Error("VisualModeDragOverridesContext not initialized");
6198
6220
  }
6199
6221
  });
6200
- var VisualModeSettersContext = React11.createContext({
6222
+ var VisualModeSettersContext = React12.createContext({
6201
6223
  setDragOverrides: () => {
6202
6224
  throw new Error("VisualModeSettersContext not initialized");
6203
6225
  },
@@ -6361,7 +6383,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
6361
6383
  });
6362
6384
  };
6363
6385
  var useRequireToBeInsideSeries = () => {
6364
- const isInsideSeries = React12.useContext(IsInsideSeriesContext);
6386
+ const isInsideSeries = React13.useContext(IsInsideSeriesContext);
6365
6387
  if (!isInsideSeries) {
6366
6388
  throw new Error("This component must be inside a <Series /> component.");
6367
6389
  }
@@ -8430,6 +8452,9 @@ var computeEffectiveSchemaValuesDotNotation = ({
8430
8452
  shouldResortToDefaultValueIfUndefined: false
8431
8453
  });
8432
8454
  }
8455
+ if (field?.type === "asset" && typeof value === "string" && value.startsWith(FILE_TOKEN)) {
8456
+ value = `${window.remotion_staticBase}/${value.slice(FILE_TOKEN.length)}`;
8457
+ }
8433
8458
  if (value === undefined) {
8434
8459
  propsToDelete.add(key);
8435
8460
  }
@@ -8528,7 +8553,7 @@ var withInteractivitySchema = ({
8528
8553
  const Wrapped = forwardRef2((props, ref) => {
8529
8554
  const env = useRemotionEnvironment();
8530
8555
  if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
8531
- return React13.createElement(Component, {
8556
+ return React14.createElement(Component, {
8532
8557
  ...props,
8533
8558
  controls: null,
8534
8559
  ref
@@ -8539,7 +8564,7 @@ var withInteractivitySchema = ({
8539
8564
  const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
8540
8565
  const frame = useCurrentFrame();
8541
8566
  if (props.controls) {
8542
- return React13.createElement(Component, {
8567
+ return React14.createElement(Component, {
8543
8568
  ...props,
8544
8569
  ref
8545
8570
  });
@@ -8597,7 +8622,7 @@ var withInteractivitySchema = ({
8597
8622
  schemaKeys: activeKeys,
8598
8623
  propsToDelete
8599
8624
  });
8600
- return React13.createElement(Component, {
8625
+ return React14.createElement(Component, {
8601
8626
  ...mergedProps,
8602
8627
  controls,
8603
8628
  ref
@@ -8623,6 +8648,7 @@ var RegularSequenceRefForwardingFunction = ({
8623
8648
  _remotionInternalLoopDisplay: loopDisplay,
8624
8649
  _remotionInternalStack: stack,
8625
8650
  _remotionInternalDocumentationLink: documentationLink,
8651
+ _remotionInternalSingleChildComponent: singleChildComponent,
8626
8652
  _remotionInternalPremountDisplay: premountDisplay,
8627
8653
  _remotionInternalPostmountDisplay: postmountDisplay,
8628
8654
  _remotionInternalIsMedia: isMedia,
@@ -8769,7 +8795,8 @@ var RegularSequenceRefForwardingFunction = ({
8769
8795
  getStack: () => stackRef.current,
8770
8796
  refForOutline: refForOutline ?? null,
8771
8797
  isInsideSeries,
8772
- frozenFrame: registeredFrozenFrame
8798
+ frozenFrame: registeredFrozenFrame,
8799
+ singleChildComponent: singleChildComponent ?? null
8773
8800
  });
8774
8801
  } else {
8775
8802
  registerSequence({
@@ -8794,11 +8821,13 @@ var RegularSequenceRefForwardingFunction = ({
8794
8821
  src: isMedia.data.src,
8795
8822
  getStack: () => stackRef.current,
8796
8823
  startMediaFrom: startMediaFrom ?? isMedia.data.startMediaFrom,
8824
+ mediaFrameAtSequenceZero,
8797
8825
  volume: isMedia.data.volumes,
8798
8826
  refForOutline: refForOutline ?? null,
8799
8827
  isInsideSeries,
8800
8828
  frozenFrame: registeredFrozenFrame,
8801
- frozenMediaFrame
8829
+ frozenMediaFrame,
8830
+ singleChildComponent: singleChildComponent ?? null
8802
8831
  });
8803
8832
  }
8804
8833
  return () => {
@@ -8825,7 +8854,8 @@ var RegularSequenceRefForwardingFunction = ({
8825
8854
  effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
8826
8855
  refForOutline: refForOutline ?? null,
8827
8856
  isInsideSeries,
8828
- frozenFrame: registeredFrozenFrame
8857
+ frozenFrame: registeredFrozenFrame,
8858
+ singleChildComponent: singleChildComponent ?? null
8829
8859
  });
8830
8860
  return () => {
8831
8861
  unregisterSequence(id);
@@ -8857,7 +8887,9 @@ var RegularSequenceRefForwardingFunction = ({
8857
8887
  isInsideSeries,
8858
8888
  registeredFrozenFrame,
8859
8889
  startMediaFrom,
8860
- frozenMediaFrame
8890
+ mediaFrameAtSequenceZero,
8891
+ frozenMediaFrame,
8892
+ singleChildComponent
8861
8893
  ]);
8862
8894
  const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
8863
8895
  const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
@@ -9359,7 +9391,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
9359
9391
  ...props
9360
9392
  });
9361
9393
  };
9362
- var Canvas = React15.forwardRef(CanvasRefForwardingFunction);
9394
+ var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
9363
9395
  var CACHE_SIZE = 5;
9364
9396
  var getActualTime = ({
9365
9397
  loopBehavior,
@@ -9520,6 +9552,12 @@ var resolveAnimatedImageSource = (src) => {
9520
9552
  return new URL(src, window.origin).href;
9521
9553
  };
9522
9554
  var animatedImageSchema = {
9555
+ src: {
9556
+ type: "asset",
9557
+ default: undefined,
9558
+ description: "Source",
9559
+ keyframable: false
9560
+ },
9523
9561
  ...baseSchema,
9524
9562
  playbackRate: {
9525
9563
  type: "number",
@@ -9937,7 +9975,7 @@ var calculateMediaDuration = ({
9937
9975
  };
9938
9976
  var LoopContext = createContext18(null);
9939
9977
  var useLoop = () => {
9940
- return React16.useContext(LoopContext);
9978
+ return React17.useContext(LoopContext);
9941
9979
  };
9942
9980
  var Loop = ({
9943
9981
  durationInFrames,
@@ -10788,7 +10826,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10788
10826
  };
10789
10827
  });
10790
10828
  }, [audioContext, numberOfAudioTags]);
10791
- const effectToUse = React19.useInsertionEffect ?? React19.useLayoutEffect;
10829
+ const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
10792
10830
  effectToUse(() => {
10793
10831
  return () => {
10794
10832
  requestAnimationFrame(() => {
@@ -10807,7 +10845,9 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10807
10845
  return;
10808
10846
  }
10809
10847
  if (data === undefined) {
10810
- current.src = EMPTY_AUDIO;
10848
+ if (current.src !== EMPTY_AUDIO) {
10849
+ current.src = EMPTY_AUDIO;
10850
+ }
10811
10851
  return;
10812
10852
  }
10813
10853
  if (!data) {
@@ -10876,7 +10916,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10876
10916
  if (prevA.id === id) {
10877
10917
  const isTheSame = compareProps(aud, prevA.props) && prevA.premounting === premounting && prevA.postmounting === postmounting;
10878
10918
  if (isTheSame) {
10879
- return prevA;
10919
+ return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
10880
10920
  }
10881
10921
  changed = true;
10882
10922
  return {
@@ -10888,7 +10928,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10888
10928
  audioMounted
10889
10929
  };
10890
10930
  }
10891
- return prevA;
10931
+ return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
10892
10932
  });
10893
10933
  if (changed) {
10894
10934
  rerenderAudios();
@@ -10927,16 +10967,19 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10927
10967
  unregisterAudio,
10928
10968
  updateAudio
10929
10969
  ]);
10970
+ const sharedAudioTagElements = useMemo21(() => {
10971
+ return refs.map(({ id, ref }) => {
10972
+ return /* @__PURE__ */ jsx19("audio", {
10973
+ ref,
10974
+ preload: "metadata",
10975
+ src: EMPTY_AUDIO
10976
+ }, id);
10977
+ });
10978
+ }, [refs]);
10930
10979
  return /* @__PURE__ */ jsxs2(SharedAudioTagsContext.Provider, {
10931
10980
  value: audioTagsValue,
10932
10981
  children: [
10933
- refs.map(({ id, ref }) => {
10934
- return /* @__PURE__ */ jsx19("audio", {
10935
- ref,
10936
- preload: "metadata",
10937
- src: EMPTY_AUDIO
10938
- }, id);
10939
- }),
10982
+ sharedAudioTagElements,
10940
10983
  children
10941
10984
  ]
10942
10985
  });
@@ -10953,7 +10996,7 @@ var useSharedAudio = ({
10953
10996
  if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
10954
10997
  return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
10955
10998
  }
10956
- const el = React19.createRef();
10999
+ const el = React20.createRef();
10957
11000
  const mediaElementSourceNode = audioCtx?.audioContext ? makeSharedElementSourceNode({
10958
11001
  audioContext: audioCtx.audioContext,
10959
11002
  ref: el
@@ -10972,7 +11015,7 @@ var useSharedAudio = ({
10972
11015
  }
10973
11016
  };
10974
11017
  });
10975
- const effectToUse = React19.useInsertionEffect ?? React19.useLayoutEffect;
11018
+ const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
10976
11019
  if (typeof document !== "undefined") {
10977
11020
  effectToUse(() => {
10978
11021
  if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
@@ -11397,6 +11440,7 @@ var useMediaInTimeline = ({
11397
11440
  showInTimeline: true,
11398
11441
  nonce: nonce.get(),
11399
11442
  startMediaFrom: 0 - startsAt,
11443
+ mediaFrameAtSequenceZero: null,
11400
11444
  doesVolumeChange,
11401
11445
  loopDisplay,
11402
11446
  playbackRate,
@@ -11523,7 +11567,7 @@ var useBufferManager = (logLevel, mountTime) => {
11523
11567
  return { addBlock, listenForBuffering, listenForResume, buffering };
11524
11568
  }, [addBlock, buffering, listenForBuffering, listenForResume]);
11525
11569
  };
11526
- var BufferingContextReact = React20.createContext(null);
11570
+ var BufferingContextReact = React21.createContext(null);
11527
11571
  var BufferingProvider = ({ children }) => {
11528
11572
  const { logLevel, mountTime } = useContext24(LogLevelContext);
11529
11573
  const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
@@ -11736,7 +11780,7 @@ var getMediaSyncAction = (input) => {
11736
11780
  return { type: "none" };
11737
11781
  };
11738
11782
  var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
11739
- const lastUpdate = React21.useRef({
11783
+ const lastUpdate = React22.useRef({
11740
11784
  time: mediaRef.current?.currentTime ?? 0,
11741
11785
  lastUpdate: performance.now()
11742
11786
  });
@@ -12489,7 +12533,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
12489
12533
  volume: userPreferredVolume,
12490
12534
  shouldUseWebAudioApi: useWebAudioApi ?? false
12491
12535
  });
12492
- const effectToUse = React22.useInsertionEffect ?? React22.useLayoutEffect;
12536
+ const effectToUse = React23.useInsertionEffect ?? React23.useLayoutEffect;
12493
12537
  effectToUse(() => {
12494
12538
  return () => {
12495
12539
  requestAnimationFrame(() => {
@@ -13030,16 +13074,16 @@ var isMissingPaintRecordError = (error2) => {
13030
13074
  return error2 instanceof DOMException && error2.name === "InvalidStateError";
13031
13075
  };
13032
13076
  var missingPaintRecordMessage = "HtmlInCanvas: Expected the element to be inside the viewport during rendering, but Chrome had no cached paint record for it.";
13033
- var resizeOffscreenCanvas = ({
13034
- offscreen,
13077
+ var resizePaintTarget = ({
13078
+ target,
13035
13079
  width,
13036
13080
  height
13037
13081
  }) => {
13038
- if (offscreen.width !== width) {
13039
- offscreen.width = width;
13082
+ if (target.width !== width) {
13083
+ target.width = width;
13040
13084
  }
13041
- if (offscreen.height !== height) {
13042
- offscreen.height = height;
13085
+ if (target.height !== height) {
13086
+ target.height = height;
13043
13087
  }
13044
13088
  };
13045
13089
  var defaultOnPaint = ({
@@ -13055,7 +13099,7 @@ var defaultOnPaint = ({
13055
13099
  const transform = ctx.drawElementImage(elementImage, 0, 0);
13056
13100
  element.style.transform = transform.toString();
13057
13101
  };
13058
- var HtmlInCanvasAncestorContext = createContext23(false);
13102
+ var HtmlInCanvasAncestorContext = createContext23(null);
13059
13103
  var HtmlInCanvasContent = forwardRef9(({
13060
13104
  width,
13061
13105
  height,
@@ -13067,20 +13111,22 @@ var HtmlInCanvasContent = forwardRef9(({
13067
13111
  controls,
13068
13112
  style
13069
13113
  }, ref) => {
13070
- const isInsideAncestorHtmlInCanvas = useContext31(HtmlInCanvasAncestorContext);
13114
+ const ancestor = useContext31(HtmlInCanvasAncestorContext);
13071
13115
  assertHtmlInCanvasDimensions(width, height);
13072
13116
  const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
13073
13117
  const canvasWidth = Math.ceil(width * resolvedPixelDensity);
13074
13118
  const canvasHeight = Math.ceil(height * resolvedPixelDensity);
13075
13119
  const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
13076
- const { isRendering } = useRemotionEnvironment();
13120
+ const { isClientSideRendering, isRendering } = useRemotionEnvironment();
13121
+ const canRetryMissingPaintRecord = !isRendering || isClientSideRendering;
13122
+ const usesDirectLayoutCanvas = onPaint === undefined && onInit === undefined;
13077
13123
  if (!isHtmlInCanvasSupported()) {
13078
13124
  cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
13079
13125
  }
13080
13126
  const canvas2dRef = useRef22(null);
13081
- const offscreenRef = useRef22(null);
13127
+ const paintTargetRef = useRef22(null);
13082
13128
  const divRef = useRef22(null);
13083
- const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
13129
+ const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}-${usesDirectLayoutCanvas ? "direct" : "offscreen"}`;
13084
13130
  const setLayoutCanvasRef = useCallback16((node) => {
13085
13131
  canvas2dRef.current = node;
13086
13132
  if (typeof ref === "function") {
@@ -13103,17 +13149,19 @@ var HtmlInCanvasContent = forwardRef9(({
13103
13149
  const initializedRef = useRef22(false);
13104
13150
  const onInitCleanupRef = useRef22(null);
13105
13151
  const unmountedRef = useRef22(false);
13152
+ const ancestorRef = useRef22(ancestor);
13153
+ ancestorRef.current = ancestor;
13106
13154
  const onPaintCb = useCallback16(async () => {
13107
13155
  const element = divRef.current;
13108
13156
  if (!element) {
13109
13157
  throw new Error("Canvas or scene element not found");
13110
13158
  }
13111
- const offscreen = offscreenRef.current;
13112
- if (!offscreen) {
13113
- throw new Error("HtmlInCanvas: offscreen canvas not ready (transferControlToOffscreen failed or canvas is remounting)");
13159
+ const paintTarget = paintTargetRef.current;
13160
+ if (!paintTarget) {
13161
+ throw new Error("HtmlInCanvas: paint target is not ready because the canvas is remounting");
13114
13162
  }
13115
- resizeOffscreenCanvas({
13116
- offscreen,
13163
+ resizePaintTarget({
13164
+ target: paintTarget,
13117
13165
  width: canvasWidth,
13118
13166
  height: canvasHeight
13119
13167
  });
@@ -13124,22 +13172,30 @@ var HtmlInCanvasContent = forwardRef9(({
13124
13172
  }
13125
13173
  const handle = delayRender("onPaint");
13126
13174
  if (!initializedRef.current) {
13127
- let initImage = null;
13128
- try {
13129
- initImage = placeholderCanvas.captureElementImage(element);
13130
- } catch (error2) {
13131
- if (isMissingPaintRecordError(error2) && !isRendering) {} else if (isMissingPaintRecordError(error2)) {
13132
- throw new Error(missingPaintRecordMessage);
13133
- } else {
13175
+ const currentOnInit = onInitRef.current;
13176
+ if (!currentOnInit) {
13177
+ initializedRef.current = true;
13178
+ } else {
13179
+ let initImage;
13180
+ try {
13181
+ initImage = placeholderCanvas.captureElementImage(element);
13182
+ } catch (error2) {
13183
+ if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
13184
+ continueRender2(handle);
13185
+ return;
13186
+ }
13187
+ if (isMissingPaintRecordError(error2)) {
13188
+ throw new Error(missingPaintRecordMessage);
13189
+ }
13134
13190
  throw error2;
13135
13191
  }
13136
- }
13137
- if (initImage) {
13138
13192
  initializedRef.current = true;
13139
- const currentOnInit = onInitRef.current;
13140
- if (currentOnInit) {
13193
+ try {
13194
+ if (paintTarget instanceof HTMLCanvasElement) {
13195
+ throw new Error("HtmlInCanvas: onInit requires an OffscreenCanvas paint target");
13196
+ }
13141
13197
  const cleanup = await currentOnInit({
13142
- canvas: offscreen,
13198
+ canvas: paintTarget,
13143
13199
  element,
13144
13200
  elementImage: initImage,
13145
13201
  pixelDensity: resolvedPixelDensity
@@ -13152,15 +13208,16 @@ var HtmlInCanvasContent = forwardRef9(({
13152
13208
  } else {
13153
13209
  onInitCleanupRef.current = cleanup;
13154
13210
  }
13211
+ } finally {
13212
+ initImage.close();
13155
13213
  }
13156
13214
  }
13157
13215
  }
13158
- const handler = onPaintRef.current ?? defaultOnPaint;
13159
13216
  let elImage;
13160
13217
  try {
13161
13218
  elImage = placeholderCanvas.captureElementImage(element);
13162
13219
  } catch (error2) {
13163
- if (isMissingPaintRecordError(error2) && !isRendering) {
13220
+ if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
13164
13221
  continueRender2(handle);
13165
13222
  return;
13166
13223
  }
@@ -13169,20 +13226,41 @@ var HtmlInCanvasContent = forwardRef9(({
13169
13226
  }
13170
13227
  throw error2;
13171
13228
  }
13172
- await handler({
13173
- canvas: offscreen,
13174
- element,
13175
- elementImage: elImage,
13176
- pixelDensity: resolvedPixelDensity
13177
- });
13178
- await runEffectChain({
13179
- state: chainState.get(canvasWidth, canvasHeight),
13180
- source: offscreen,
13181
- effects: effectsRef.current,
13182
- output: offscreen,
13183
- width: canvasWidth,
13184
- height: canvasHeight
13185
- });
13229
+ try {
13230
+ const currentOnPaint = onPaintRef.current;
13231
+ if (currentOnPaint) {
13232
+ if (paintTarget instanceof HTMLCanvasElement) {
13233
+ throw new Error("HtmlInCanvas: onPaint requires an OffscreenCanvas paint target");
13234
+ }
13235
+ const paintResult = currentOnPaint({
13236
+ canvas: paintTarget,
13237
+ element,
13238
+ elementImage: elImage,
13239
+ pixelDensity: resolvedPixelDensity
13240
+ });
13241
+ if (paintResult) {
13242
+ await paintResult;
13243
+ }
13244
+ } else {
13245
+ defaultOnPaint({
13246
+ canvas: paintTarget,
13247
+ element,
13248
+ elementImage: elImage,
13249
+ pixelDensity: resolvedPixelDensity
13250
+ });
13251
+ }
13252
+ await runEffectChain({
13253
+ state: chainState.get(canvasWidth, canvasHeight),
13254
+ source: paintTarget,
13255
+ effects: effectsRef.current,
13256
+ output: paintTarget,
13257
+ width: canvasWidth,
13258
+ height: canvasHeight
13259
+ });
13260
+ } finally {
13261
+ elImage.close();
13262
+ }
13263
+ ancestorRef.current?.requestParentPaint();
13186
13264
  continueRender2(handle);
13187
13265
  } catch (error2) {
13188
13266
  cancelRender2(error2);
@@ -13194,7 +13272,7 @@ var HtmlInCanvasContent = forwardRef9(({
13194
13272
  continueRender2,
13195
13273
  cancelRender2,
13196
13274
  resolvedPixelDensity,
13197
- isRendering
13275
+ canRetryMissingPaintRecord
13198
13276
  ]);
13199
13277
  useLayoutEffect9(() => {
13200
13278
  const placeholder = canvas2dRef.current;
@@ -13202,10 +13280,10 @@ var HtmlInCanvasContent = forwardRef9(({
13202
13280
  throw new Error("Canvas not found");
13203
13281
  }
13204
13282
  placeholder.layoutSubtree = true;
13205
- const offscreen = placeholder.transferControlToOffscreen();
13206
- offscreenRef.current = offscreen;
13207
- resizeOffscreenCanvas({
13208
- offscreen,
13283
+ const paintTarget = usesDirectLayoutCanvas ? placeholder : placeholder.transferControlToOffscreen();
13284
+ paintTargetRef.current = paintTarget;
13285
+ resizePaintTarget({
13286
+ target: paintTarget,
13209
13287
  width: canvasWidth,
13210
13288
  height: canvasHeight
13211
13289
  });
@@ -13214,13 +13292,19 @@ var HtmlInCanvasContent = forwardRef9(({
13214
13292
  placeholder.addEventListener("paint", onPaintCb);
13215
13293
  return () => {
13216
13294
  placeholder.removeEventListener("paint", onPaintCb);
13217
- offscreenRef.current = null;
13295
+ paintTargetRef.current = null;
13218
13296
  initializedRef.current = false;
13219
13297
  unmountedRef.current = true;
13220
13298
  onInitCleanupRef.current?.();
13221
13299
  onInitCleanupRef.current = null;
13222
13300
  };
13223
- }, [onPaintCb, cancelRender2, canvasWidth, canvasHeight]);
13301
+ }, [
13302
+ onPaintCb,
13303
+ cancelRender2,
13304
+ canvasWidth,
13305
+ canvasHeight,
13306
+ usesDirectLayoutCanvas
13307
+ ]);
13224
13308
  const onPaintChangedRef = useRef22(false);
13225
13309
  useLayoutEffect9(() => {
13226
13310
  if (!onPaintChangedRef.current) {
@@ -13259,11 +13343,15 @@ var HtmlInCanvasContent = forwardRef9(({
13259
13343
  ...style ?? {}
13260
13344
  };
13261
13345
  }, [height, style, width]);
13262
- if (isInsideAncestorHtmlInCanvas) {
13263
- 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.");
13264
- }
13346
+ const ancestorValue = useMemo30(() => {
13347
+ return {
13348
+ requestParentPaint: () => {
13349
+ canvas2dRef.current?.requestPaint?.();
13350
+ }
13351
+ };
13352
+ }, []);
13265
13353
  return /* @__PURE__ */ jsx25(HtmlInCanvasAncestorContext.Provider, {
13266
- value: true,
13354
+ value: ancestorValue,
13267
13355
  children: /* @__PURE__ */ jsx25("canvas", {
13268
13356
  ref: setLayoutCanvasRef,
13269
13357
  width: canvasWidth,
@@ -13991,6 +14079,12 @@ var NativeImgInner = ({
13991
14079
  };
13992
14080
  var CanvasImageWithPrivateProps = CanvasImage;
13993
14081
  var imgSchema = {
14082
+ src: {
14083
+ type: "asset",
14084
+ default: undefined,
14085
+ description: "Source",
14086
+ keyframable: false
14087
+ },
13994
14088
  ...baseSchema,
13995
14089
  ...transformSchema
13996
14090
  };
@@ -14201,7 +14295,7 @@ var makeInteractiveElement = (tag, displayName) => {
14201
14295
  _remotionInternalStack: stack,
14202
14296
  _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
14203
14297
  outlineRef: refForOutline,
14204
- children: React29.createElement(tag, {
14298
+ children: React30.createElement(tag, {
14205
14299
  ...props2,
14206
14300
  ref: callbackRef
14207
14301
  })
@@ -14265,7 +14359,7 @@ var Interactive = {
14265
14359
  Text: makeInteractiveElement("text", "<Interactive.Text>"),
14266
14360
  Ul: makeInteractiveElement("ul", "<Interactive.Ul>")
14267
14361
  };
14268
- var compositionsRef = React30.createRef();
14362
+ var compositionsRef = React31.createRef();
14269
14363
  var CompositionManagerProvider = ({
14270
14364
  children,
14271
14365
  onlyRenderComposition,
@@ -14414,7 +14508,7 @@ var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
14414
14508
  var getPreviewDomElement = () => {
14415
14509
  return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
14416
14510
  };
14417
- var MaxMediaCacheSizeContext = React31.createContext(null);
14511
+ var MaxMediaCacheSizeContext = React32.createContext(null);
14418
14512
  var Root = null;
14419
14513
  var listeners = [];
14420
14514
  var getRoot = () => {
@@ -14687,7 +14781,7 @@ var resolveVideoConfigOrCatch = (params) => {
14687
14781
  };
14688
14782
  }
14689
14783
  };
14690
- var SequenceStackTracesUpdateContext = React33.createContext(() => {});
14784
+ var SequenceStackTracesUpdateContext = React34.createContext(() => {});
14691
14785
  var getEnvVariables = () => {
14692
14786
  if (getRemotionEnvironment().isRendering) {
14693
14787
  const param = window.remotion_envVariables;
@@ -14713,7 +14807,7 @@ var setupEnvVariables = () => {
14713
14807
  window.process.env[key] = env[key];
14714
14808
  });
14715
14809
  };
14716
- var CurrentScaleContext = React34.createContext(null);
14810
+ var CurrentScaleContext = React35.createContext(null);
14717
14811
  var PreviewSizeContext = createContext25({
14718
14812
  setSize: () => {
14719
14813
  return;
@@ -14737,7 +14831,7 @@ var calculateScale = ({
14737
14831
  }
14738
14832
  return Number(previewSize);
14739
14833
  };
14740
- var PixelDensityContext = React35.createContext(null);
14834
+ var PixelDensityContext = React36.createContext(null);
14741
14835
  var getOffthreadVideoSource = ({
14742
14836
  src,
14743
14837
  transparent,
@@ -15004,7 +15098,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
15004
15098
  ref: videoRef
15005
15099
  });
15006
15100
  }, [context.audioContext]);
15007
- const effectToUse = React37.useInsertionEffect ?? React37.useLayoutEffect;
15101
+ const effectToUse = React38.useInsertionEffect ?? React38.useLayoutEffect;
15008
15102
  effectToUse(() => {
15009
15103
  return () => {
15010
15104
  requestAnimationFrame(() => {
@@ -15380,20 +15474,20 @@ var OffthreadVideo = ({
15380
15474
  addSequenceStackTraces(OffthreadVideo);
15381
15475
  var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
15382
15476
  function useRemotionContexts() {
15383
- const compositionManagerCtx = React39.useContext(CompositionManager);
15384
- const timelineContext = React39.useContext(TimelineContext);
15385
- const setTimelineContext = React39.useContext(SetTimelineContext);
15386
- const sequenceContext = React39.useContext(SequenceContext);
15387
- const nonceContext = React39.useContext(NonceContext);
15388
- const canUseRemotionHooksContext = React39.useContext(CanUseRemotionHooks);
15389
- const preloadContext = React39.useContext(PreloadContext);
15390
- const resolveCompositionContext = React39.useContext(ResolveCompositionContext);
15391
- const renderAssetManagerContext = React39.useContext(RenderAssetManager);
15392
- const sequenceManagerContext = React39.useContext(SequenceManager);
15393
- const sequenceManagerRefContext = React39.useContext(SequenceManagerRefContext);
15394
- const visualModePropStatusesRefContext = React39.useContext(VisualModePropStatusesRefContext);
15395
- const bufferManagerContext = React39.useContext(BufferingContextReact);
15396
- const logLevelContext = React39.useContext(LogLevelContext);
15477
+ const compositionManagerCtx = React40.useContext(CompositionManager);
15478
+ const timelineContext = React40.useContext(TimelineContext);
15479
+ const setTimelineContext = React40.useContext(SetTimelineContext);
15480
+ const sequenceContext = React40.useContext(SequenceContext);
15481
+ const nonceContext = React40.useContext(NonceContext);
15482
+ const canUseRemotionHooksContext = React40.useContext(CanUseRemotionHooks);
15483
+ const preloadContext = React40.useContext(PreloadContext);
15484
+ const resolveCompositionContext = React40.useContext(ResolveCompositionContext);
15485
+ const renderAssetManagerContext = React40.useContext(RenderAssetManager);
15486
+ const sequenceManagerContext = React40.useContext(SequenceManager);
15487
+ const sequenceManagerRefContext = React40.useContext(SequenceManagerRefContext);
15488
+ const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
15489
+ const bufferManagerContext = React40.useContext(BufferingContextReact);
15490
+ const logLevelContext = React40.useContext(LogLevelContext);
15397
15491
  return useMemo37(() => ({
15398
15492
  compositionManagerCtx,
15399
15493
  timelineContext,
@@ -15567,6 +15661,8 @@ var Internals = {
15567
15661
  BufferingProvider,
15568
15662
  BufferingContextReact,
15569
15663
  getComponentsToAddStacksTo,
15664
+ getSequenceComponent,
15665
+ getSingleChildComponent,
15570
15666
  CurrentScaleContext,
15571
15667
  PixelDensityContext,
15572
15668
  PreviewSizeContext,
@@ -15624,75 +15720,139 @@ var Internals = {
15624
15720
  fromField
15625
15721
  };
15626
15722
  var flattenChildren = (children) => {
15627
- const childrenArray = React40.Children.toArray(children);
15723
+ const childrenArray = React41.Children.toArray(children);
15628
15724
  return childrenArray.reduce((flatChildren, child) => {
15629
- if (child.type === React40.Fragment) {
15725
+ if (child.type === React41.Fragment) {
15630
15726
  return flatChildren.concat(flattenChildren(child.props.children));
15631
15727
  }
15632
15728
  flatChildren.push(child);
15633
15729
  return flatChildren;
15634
15730
  }, []);
15635
15731
  };
15636
- var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
15732
+ var seriesSequenceSchema = {
15733
+ durationInFrames: Interactive.baseSchema.durationInFrames,
15734
+ name: Interactive.sequenceSchema.name,
15735
+ hidden: Interactive.sequenceSchema.hidden,
15736
+ showInTimeline: Interactive.sequenceSchema.showInTimeline,
15737
+ freeze: Interactive.baseSchema.freeze,
15738
+ layout: Interactive.sequenceSchema.layout
15739
+ };
15740
+ var SeriesSequenceInner = forwardRef14(({
15741
+ offset = 0,
15742
+ className = "",
15743
+ stack = null,
15744
+ _remotionInternalRender = null,
15745
+ ...props2
15746
+ }, ref) => {
15637
15747
  useRequireToBeInsideSeries();
15748
+ if (_remotionInternalRender) {
15749
+ return _remotionInternalRender({ ...props2, offset, className: className || undefined, stack }, ref);
15750
+ }
15638
15751
  return /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
15639
- children
15752
+ children: props2.children
15640
15753
  });
15641
- };
15642
- var SeriesSequence = forwardRef14(SeriesSequenceRefForwardingFunction);
15754
+ });
15755
+ var SeriesSequence = Interactive.withSchema({
15756
+ Component: SeriesSequenceInner,
15757
+ componentName: "<Series.Sequence>",
15758
+ componentIdentity: "dev.remotion.remotion.Series.Sequence",
15759
+ schema: seriesSequenceSchema,
15760
+ supportsEffects: false
15761
+ });
15643
15762
  var SequenceWithoutSchemaWithRef = SequenceWithoutSchema;
15763
+ var validateSeriesSequenceProps = ({
15764
+ durationInFrames,
15765
+ offset: offsetProp,
15766
+ index,
15767
+ childrenLength
15768
+ }) => {
15769
+ const debugInfo = `index = ${index}, duration = ${durationInFrames}`;
15770
+ if (index !== childrenLength - 1 || durationInFrames !== Infinity) {
15771
+ validateDurationInFrames(durationInFrames, {
15772
+ component: `of a <Series.Sequence /> component`,
15773
+ allowFloats: true
15774
+ });
15775
+ }
15776
+ const offset = offsetProp ?? 0;
15777
+ if (Number.isNaN(offset)) {
15778
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
15779
+ }
15780
+ if (!Number.isFinite(offset)) {
15781
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
15782
+ }
15783
+ if (offset % 1 !== 0) {
15784
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
15785
+ }
15786
+ return offset;
15787
+ };
15644
15788
  var SeriesInner = (props2) => {
15645
15789
  const childrenValue = useMemo38(() => {
15646
- let startFrame = 0;
15647
15790
  const flattenedChildren = flattenChildren(props2.children);
15648
- return Children.map(flattenedChildren, (child, i) => {
15791
+ const renderChildren = (i, startFrame) => {
15792
+ if (i === flattenedChildren.length) {
15793
+ return null;
15794
+ }
15795
+ const child = flattenedChildren[i];
15649
15796
  const castedChild = child;
15650
15797
  if (typeof castedChild === "string") {
15651
15798
  if (castedChild.trim() === "") {
15652
- return null;
15799
+ return renderChildren(i + 1, startFrame);
15653
15800
  }
15654
15801
  throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string "${castedChild}"`);
15655
15802
  }
15656
15803
  if (castedChild.type !== SeriesSequence) {
15657
15804
  throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
15658
15805
  }
15659
- const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
15660
- const durationInFramesProp = castedChild.props.durationInFrames;
15661
- const {
15662
- durationInFrames,
15663
- children: _children,
15664
- from,
15665
- name,
15666
- ...passedProps
15667
- } = castedChild.props;
15668
- if (i !== flattenedChildren.length - 1 || durationInFramesProp !== Infinity) {
15669
- validateDurationInFrames(durationInFramesProp, {
15670
- component: `of a <Series.Sequence /> component`,
15671
- allowFloats: true
15672
- });
15673
- }
15674
- const offset = castedChild.props.offset ?? 0;
15675
- if (Number.isNaN(offset)) {
15676
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
15677
- }
15678
- if (!Number.isFinite(offset)) {
15679
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
15680
- }
15681
- if (offset % 1 !== 0) {
15682
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
15683
- }
15684
- const currentStartFrame = startFrame + offset;
15685
- startFrame += durationInFramesProp + offset;
15686
- return /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
15687
- ref: castedChild.ref,
15688
- name: name || "<Series.Sequence>",
15689
- _remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
15690
- from: currentStartFrame,
15691
- durationInFrames: durationInFramesProp,
15692
- ...passedProps,
15693
- children: child
15806
+ const castedElement = castedChild;
15807
+ validateSeriesSequenceProps({
15808
+ durationInFrames: castedElement.props.durationInFrames,
15809
+ offset: castedElement.props.offset,
15810
+ index: i,
15811
+ childrenLength: flattenedChildren.length
15694
15812
  });
15695
- });
15813
+ return React42.cloneElement(castedElement, {
15814
+ _remotionInternalRender: (resolvedProps, ref) => {
15815
+ const durationInFramesProp = resolvedProps.durationInFrames;
15816
+ const {
15817
+ durationInFrames: _durationInFrames,
15818
+ children: sequenceChildren,
15819
+ offset: offsetProp,
15820
+ controls,
15821
+ stack,
15822
+ from: _from,
15823
+ name,
15824
+ ...passedProps
15825
+ } = resolvedProps;
15826
+ const offset = validateSeriesSequenceProps({
15827
+ durationInFrames: durationInFramesProp,
15828
+ offset: offsetProp,
15829
+ index: i,
15830
+ childrenLength: flattenedChildren.length
15831
+ });
15832
+ const currentStartFrame = startFrame + offset;
15833
+ const nextStartFrame = startFrame + durationInFramesProp + offset;
15834
+ return /* @__PURE__ */ jsxs3(Fragment, {
15835
+ children: [
15836
+ /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
15837
+ ref,
15838
+ name: name || "<Series.Sequence>",
15839
+ _remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
15840
+ _remotionInternalStack: stack ?? undefined,
15841
+ controls: controls ?? undefined,
15842
+ from: currentStartFrame,
15843
+ durationInFrames: durationInFramesProp,
15844
+ ...passedProps,
15845
+ children: /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
15846
+ children: sequenceChildren
15847
+ })
15848
+ }),
15849
+ renderChildren(i + 1, nextStartFrame)
15850
+ ]
15851
+ });
15852
+ }
15853
+ });
15854
+ };
15855
+ return renderChildren(0, 0);
15696
15856
  }, [props2.children]);
15697
15857
  return /* @__PURE__ */ jsx37(IsInsideSeriesContainer, {
15698
15858
  children: /* @__PURE__ */ jsx37(Sequence, {
@@ -15808,7 +15968,7 @@ var Still = (props2) => {
15808
15968
  durationInFrames: 1,
15809
15969
  fps: 1
15810
15970
  };
15811
- return React42.createElement(Composition, newProps);
15971
+ return React43.createElement(Composition, newProps);
15812
15972
  };
15813
15973
  addSequenceStackTraces(Still);
15814
15974
  var roundTo6Commas = (num) => {
@@ -16287,13 +16447,14 @@ var Config = new Proxy(proxyObj, {
16287
16447
  });
16288
16448
  Sequence.displayName = "Sequence";
16289
16449
  addSequenceStackTraces(Sequence);
16450
+ setSequenceComponent(Sequence);
16290
16451
  addSequenceStackTraces(Composition);
16291
16452
  addSequenceStackTraces(Folder);
16292
16453
 
16293
16454
  // ../shapes/dist/esm/index.mjs
16294
16455
  import React, { useCallback as useCallback26, useMemo as useMemo40, useRef as useRef29 } from "react";
16295
16456
  import { version } from "react-dom";
16296
- import { jsx as jsx40, jsxs as jsxs3 } from "react/jsx-runtime";
16457
+ import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
16297
16458
  import { jsx as jsx210 } from "react/jsx-runtime";
16298
16459
  import { jsx as jsx310 } from "react/jsx-runtime";
16299
16460
  import { jsx as jsx42 } from "react/jsx-runtime";
@@ -16495,7 +16656,7 @@ var RenderSvg = ({
16495
16656
  const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(effects);
16496
16657
  const videoConfig = Internals.useUnsafeVideoConfig();
16497
16658
  const reactSupportsTransformOrigin = doesReactSupportTransformOriginProperty(version);
16498
- const svg = /* @__PURE__ */ jsxs3("svg", {
16659
+ const svg = /* @__PURE__ */ jsxs4("svg", {
16499
16660
  ref: effects.length === 0 || !videoConfig ? setSvgRef : undefined,
16500
16661
  width,
16501
16662
  height,
@@ -16521,7 +16682,7 @@ var RenderSvg = ({
16521
16682
  }
16522
16683
  const prevX = prevInstruction.x;
16523
16684
  const prevY = prevInstruction.y;
16524
- return /* @__PURE__ */ jsxs3(React.Fragment, {
16685
+ return /* @__PURE__ */ jsxs4(React.Fragment, {
16525
16686
  children: [
16526
16687
  /* @__PURE__ */ jsx40("path", {
16527
16688
  d: `M ${prevX} ${prevY} ${i.cp1x} ${i.cp1y}`,
@@ -19203,7 +19364,7 @@ var extrudeAndTransformElement = (options) => {
19203
19364
 
19204
19365
  // ../design/dist/esm/index.mjs
19205
19366
  import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
19206
- import { jsx as jsx312, jsxs as jsxs5 } from "react/jsx-runtime";
19367
+ import { jsx as jsx312, jsxs as jsxs6 } from "react/jsx-runtime";
19207
19368
  import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef31 } from "react";
19208
19369
  import { jsx as jsx44 } from "react/jsx-runtime";
19209
19370
  import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
@@ -19216,12 +19377,12 @@ import React72 from "react";
19216
19377
  import { jsx as jsx103 } from "react/jsx-runtime";
19217
19378
  import { jsx as jsx113 } from "react/jsx-runtime";
19218
19379
  import { jsx as jsx123 } from "react/jsx-runtime";
19219
- import * as React36 from "react";
19380
+ import * as React362 from "react";
19220
19381
  import * as ReactDOM4 from "react-dom";
19221
- import React112 from "react";
19382
+ import React11 from "react";
19222
19383
  import * as React8 from "react";
19223
19384
  import { jsx as jsx132 } from "react/jsx-runtime";
19224
- import * as React9 from "react";
19385
+ import * as React92 from "react";
19225
19386
  import * as React10 from "react";
19226
19387
  import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
19227
19388
  import { jsx as jsx152 } from "react/jsx-runtime";
@@ -19231,15 +19392,15 @@ import * as React162 from "react";
19231
19392
  import * as React132 from "react";
19232
19393
  import * as ReactDOM from "react-dom";
19233
19394
  import { jsx as jsx172 } from "react/jsx-runtime";
19234
- import * as React14 from "react";
19235
- import * as React152 from "react";
19395
+ import * as React142 from "react";
19396
+ import * as React15 from "react";
19236
19397
  import { jsx as jsx182 } from "react/jsx-runtime";
19237
- import * as React17 from "react";
19398
+ import * as React172 from "react";
19238
19399
  import * as React18 from "react";
19239
19400
  import { jsx as jsx192 } from "react/jsx-runtime";
19240
19401
  import * as React202 from "react";
19241
- import * as React192 from "react";
19242
- import * as React24 from "react";
19402
+ import * as React19 from "react";
19403
+ import * as React242 from "react";
19243
19404
  import * as React212 from "react";
19244
19405
  import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
19245
19406
  import * as ReactDOM2 from "react-dom";
@@ -19257,30 +19418,30 @@ import { jsx as jsx232 } from "react/jsx-runtime";
19257
19418
  import * as React352 from "react";
19258
19419
  import * as React312 from "react";
19259
19420
  import { useState as useState112 } from "react";
19260
- import * as React292 from "react";
19421
+ import * as React29 from "react";
19261
19422
  import * as React302 from "react";
19262
19423
  import * as React342 from "react";
19263
19424
  import * as React332 from "react";
19264
19425
  import * as React322 from "react";
19265
- import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs4 } from "react/jsx-runtime";
19426
+ import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-runtime";
19266
19427
  import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
19267
19428
  import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
19268
- import * as React372 from "react";
19269
- import { jsx as jsx252, jsxs as jsxs52 } from "react/jsx-runtime";
19429
+ import * as React37 from "react";
19430
+ import { jsx as jsx252, jsxs as jsxs5 } from "react/jsx-runtime";
19270
19431
  import { jsx as jsx262 } from "react/jsx-runtime";
19271
19432
  import * as React49 from "react";
19272
- import * as React38 from "react";
19433
+ import * as React382 from "react";
19273
19434
  import { jsx as jsx272 } from "react/jsx-runtime";
19274
19435
  import * as React47 from "react";
19275
19436
  import React402 from "react";
19276
- import * as React392 from "react";
19277
- import { Fragment as Fragment22, jsx as jsx282 } from "react/jsx-runtime";
19437
+ import * as React39 from "react";
19438
+ import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
19278
19439
  import { jsx as jsx292 } from "react/jsx-runtime";
19279
19440
  import React210 from "react";
19280
19441
  import { jsx as jsx2102 } from "react/jsx-runtime";
19281
19442
  import * as React422 from "react";
19282
- import * as React41 from "react";
19283
- import * as React43 from "react";
19443
+ import * as React412 from "react";
19444
+ import * as React432 from "react";
19284
19445
  import * as ReactDOM5 from "react-dom";
19285
19446
  import { jsx as jsx302 } from "react/jsx-runtime";
19286
19447
  import * as React44 from "react";
@@ -19332,7 +19493,7 @@ function useComposedRefs(...refs) {
19332
19493
  return React3.useCallback(composeRefs(...refs), refs);
19333
19494
  }
19334
19495
  var REACT_LAZY_TYPE = Symbol.for("react.lazy");
19335
- var use = React23[" use ".trim().toString()];
19496
+ var use = React24[" use ".trim().toString()];
19336
19497
  function isPromiseLike(value) {
19337
19498
  return typeof value === "object" && value !== null && "then" in value;
19338
19499
  }
@@ -19341,25 +19502,25 @@ function isLazyComponent(element) {
19341
19502
  }
19342
19503
  function createSlot(ownerName) {
19343
19504
  const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
19344
- const Slot2 = React23.forwardRef((props, forwardedRef) => {
19505
+ const Slot2 = React24.forwardRef((props, forwardedRef) => {
19345
19506
  let { children, ...slotProps } = props;
19346
19507
  if (isLazyComponent(children) && typeof use === "function") {
19347
19508
  children = use(children._payload);
19348
19509
  }
19349
- const childrenArray = React23.Children.toArray(children);
19510
+ const childrenArray = React24.Children.toArray(children);
19350
19511
  const slottable = childrenArray.find(isSlottable);
19351
19512
  if (slottable) {
19352
19513
  const newElement = slottable.props.children;
19353
19514
  const newChildren = childrenArray.map((child) => {
19354
19515
  if (child === slottable) {
19355
- if (React23.Children.count(newElement) > 1)
19356
- return React23.Children.only(null);
19357
- return React23.isValidElement(newElement) ? newElement.props.children : null;
19516
+ if (React24.Children.count(newElement) > 1)
19517
+ return React24.Children.only(null);
19518
+ return React24.isValidElement(newElement) ? newElement.props.children : null;
19358
19519
  } else {
19359
19520
  return child;
19360
19521
  }
19361
19522
  });
19362
- return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children: React23.isValidElement(newElement) ? React23.cloneElement(newElement, undefined, newChildren) : null });
19523
+ return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children: React24.isValidElement(newElement) ? React24.cloneElement(newElement, undefined, newChildren) : null });
19363
19524
  }
19364
19525
  return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children });
19365
19526
  });
@@ -19368,20 +19529,20 @@ function createSlot(ownerName) {
19368
19529
  }
19369
19530
  var Slot = /* @__PURE__ */ createSlot("Slot");
19370
19531
  function createSlotClone(ownerName) {
19371
- const SlotClone = React23.forwardRef((props, forwardedRef) => {
19532
+ const SlotClone = React24.forwardRef((props, forwardedRef) => {
19372
19533
  let { children, ...slotProps } = props;
19373
19534
  if (isLazyComponent(children) && typeof use === "function") {
19374
19535
  children = use(children._payload);
19375
19536
  }
19376
- if (React23.isValidElement(children)) {
19537
+ if (React24.isValidElement(children)) {
19377
19538
  const childrenRef = getElementRef(children);
19378
19539
  const props2 = mergeProps(slotProps, children.props);
19379
- if (children.type !== React23.Fragment) {
19540
+ if (children.type !== React24.Fragment) {
19380
19541
  props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
19381
19542
  }
19382
- return React23.cloneElement(children, props2);
19543
+ return React24.cloneElement(children, props2);
19383
19544
  }
19384
- return React23.Children.count(children) > 1 ? React23.Children.only(null) : null;
19545
+ return React24.Children.count(children) > 1 ? React24.Children.only(null) : null;
19385
19546
  });
19386
19547
  SlotClone.displayName = `${ownerName}.SlotClone`;
19387
19548
  return SlotClone;
@@ -19389,7 +19550,7 @@ function createSlotClone(ownerName) {
19389
19550
  var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
19390
19551
  function createSlottable(ownerName) {
19391
19552
  const Slottable2 = ({ children }) => {
19392
- return /* @__PURE__ */ jsx43(Fragment2, { children });
19553
+ return /* @__PURE__ */ jsx43(Fragment22, { children });
19393
19554
  };
19394
19555
  Slottable2.displayName = `${ownerName}.Slottable`;
19395
19556
  Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
@@ -19397,7 +19558,7 @@ function createSlottable(ownerName) {
19397
19558
  }
19398
19559
  var Slottable = /* @__PURE__ */ createSlottable("Slottable");
19399
19560
  function isSlottable(child) {
19400
- return React23.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
19561
+ return React24.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
19401
19562
  }
19402
19563
  function mergeProps(slotProps, childProps) {
19403
19564
  const overrideProps = { ...childProps };
@@ -19454,7 +19615,7 @@ var getChildNodeFrom = (htmlElement) => {
19454
19615
  return childNode;
19455
19616
  };
19456
19617
  var useHoverTransforms = (ref, disabled) => {
19457
- const [state, setState] = React32.useState({
19618
+ const [state, setState] = React33.useState({
19458
19619
  progress: 0,
19459
19620
  isActive: false
19460
19621
  });
@@ -19466,7 +19627,7 @@ var useHoverTransforms = (ref, disabled) => {
19466
19627
  eventTarget.dispatchEvent(new Event("enabled"));
19467
19628
  }
19468
19629
  }, [disabled, eventTarget]);
19469
- React32.useEffect(() => {
19630
+ React33.useEffect(() => {
19470
19631
  const element = ref.current;
19471
19632
  if (!element)
19472
19633
  return;
@@ -19541,8 +19702,8 @@ var useHoverTransforms = (ref, disabled) => {
19541
19702
  return state;
19542
19703
  };
19543
19704
  var useClickTransforms = (ref) => {
19544
- const [hoverProgress, setHoverProgress] = React32.useState(0);
19545
- React32.useEffect(() => {
19705
+ const [hoverProgress, setHoverProgress] = React33.useState(0);
19706
+ React33.useEffect(() => {
19546
19707
  const element = getChildNodeFrom(ref.current);
19547
19708
  if (!element) {
19548
19709
  return;
@@ -19686,7 +19847,7 @@ var Outer = ({
19686
19847
  description: "rect",
19687
19848
  transformations: centerOriented
19688
19849
  });
19689
- return /* @__PURE__ */ jsxs5("div", {
19850
+ return /* @__PURE__ */ jsxs6("div", {
19690
19851
  className: "relative",
19691
19852
  style: { width, height },
19692
19853
  children: [
@@ -20118,7 +20279,7 @@ function composeRefs2(...refs) {
20118
20279
  return (node) => refs.forEach((ref) => setRef22(ref, node));
20119
20280
  }
20120
20281
  function useComposedRefs2(...refs) {
20121
- return React9.useCallback(composeRefs2(...refs), refs);
20282
+ return React92.useCallback(composeRefs2(...refs), refs);
20122
20283
  }
20123
20284
  var Slot2 = React10.forwardRef((props, forwardedRef) => {
20124
20285
  const { children, ...slotProps } = props;
@@ -20200,13 +20361,13 @@ function createCollection(name) {
20200
20361
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
20201
20362
  const CollectionProvider = (props) => {
20202
20363
  const { scope, children } = props;
20203
- const ref = React112.useRef(null);
20204
- const itemMap = React112.useRef(/* @__PURE__ */ new Map).current;
20364
+ const ref = React11.useRef(null);
20365
+ const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
20205
20366
  return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
20206
20367
  };
20207
20368
  CollectionProvider.displayName = PROVIDER_NAME;
20208
20369
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
20209
- const CollectionSlot = React112.forwardRef((props, forwardedRef) => {
20370
+ const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
20210
20371
  const { scope, children } = props;
20211
20372
  const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
20212
20373
  const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
@@ -20215,12 +20376,12 @@ function createCollection(name) {
20215
20376
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
20216
20377
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
20217
20378
  const ITEM_DATA_ATTR = "data-radix-collection-item";
20218
- const CollectionItemSlot = React112.forwardRef((props, forwardedRef) => {
20379
+ const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
20219
20380
  const { scope, children, ...itemData } = props;
20220
- const ref = React112.useRef(null);
20381
+ const ref = React11.useRef(null);
20221
20382
  const composedRefs = useComposedRefs2(forwardedRef, ref);
20222
20383
  const context = useCollectionContext(ITEM_SLOT_NAME, scope);
20223
- React112.useEffect(() => {
20384
+ React11.useEffect(() => {
20224
20385
  context.itemMap.set(ref, { ref, ...itemData });
20225
20386
  return () => void context.itemMap.delete(ref);
20226
20387
  });
@@ -20229,7 +20390,7 @@ function createCollection(name) {
20229
20390
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
20230
20391
  function useCollection(scope) {
20231
20392
  const context = useCollectionContext(name + "CollectionConsumer", scope);
20232
- const getItems = React112.useCallback(() => {
20393
+ const getItems = React11.useCallback(() => {
20233
20394
  const collectionNode = context.collectionRef.current;
20234
20395
  if (!collectionNode)
20235
20396
  return [];
@@ -20286,15 +20447,15 @@ function dispatchDiscreteCustomEvent(target, event) {
20286
20447
  ReactDOM.flushSync(() => target.dispatchEvent(event));
20287
20448
  }
20288
20449
  function useCallbackRef(callback) {
20289
- const callbackRef = React14.useRef(callback);
20290
- React14.useEffect(() => {
20450
+ const callbackRef = React142.useRef(callback);
20451
+ React142.useEffect(() => {
20291
20452
  callbackRef.current = callback;
20292
20453
  });
20293
- return React14.useMemo(() => (...args) => callbackRef.current?.(...args), []);
20454
+ return React142.useMemo(() => (...args) => callbackRef.current?.(...args), []);
20294
20455
  }
20295
20456
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
20296
20457
  const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
20297
- React152.useEffect(() => {
20458
+ React15.useEffect(() => {
20298
20459
  const handleKeyDown = (event) => {
20299
20460
  if (event.key === "Escape") {
20300
20461
  onEscapeKeyDown(event);
@@ -20501,7 +20662,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
20501
20662
  }
20502
20663
  var count = 0;
20503
20664
  function useFocusGuards() {
20504
- React17.useEffect(() => {
20665
+ React172.useEffect(() => {
20505
20666
  const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
20506
20667
  document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
20507
20668
  document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
@@ -20736,7 +20897,7 @@ function arrayRemove(array, item) {
20736
20897
  function removeLinks(items) {
20737
20898
  return items.filter((item) => item.tagName !== "A");
20738
20899
  }
20739
- var useLayoutEffect22 = Boolean(globalThis?.document) ? React192.useLayoutEffect : () => {};
20900
+ var useLayoutEffect22 = Boolean(globalThis?.document) ? React19.useLayoutEffect : () => {};
20740
20901
  var useReactId = React202["useId".toString()] || (() => {
20741
20902
  return;
20742
20903
  });
@@ -22588,17 +22749,17 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
22588
22749
  var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
22589
22750
  var Popper = (props) => {
22590
22751
  const { __scopePopper, children } = props;
22591
- const [anchor, setAnchor] = React24.useState(null);
22752
+ const [anchor, setAnchor] = React242.useState(null);
22592
22753
  return /* @__PURE__ */ jsx213(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
22593
22754
  };
22594
22755
  Popper.displayName = POPPER_NAME;
22595
22756
  var ANCHOR_NAME = "PopperAnchor";
22596
- var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
22757
+ var PopperAnchor = React242.forwardRef((props, forwardedRef) => {
22597
22758
  const { __scopePopper, virtualRef, ...anchorProps } = props;
22598
22759
  const context = usePopperContext(ANCHOR_NAME, __scopePopper);
22599
- const ref = React24.useRef(null);
22760
+ const ref = React242.useRef(null);
22600
22761
  const composedRefs = useComposedRefs2(forwardedRef, ref);
22601
- React24.useEffect(() => {
22762
+ React242.useEffect(() => {
22602
22763
  context.onAnchorChange(virtualRef?.current || ref.current);
22603
22764
  });
22604
22765
  return virtualRef ? null : /* @__PURE__ */ jsx213(Primitive.div, { ...anchorProps, ref: composedRefs });
@@ -22606,7 +22767,7 @@ var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
22606
22767
  PopperAnchor.displayName = ANCHOR_NAME;
22607
22768
  var CONTENT_NAME = "PopperContent";
22608
22769
  var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
22609
- var PopperContent = React24.forwardRef((props, forwardedRef) => {
22770
+ var PopperContent = React242.forwardRef((props, forwardedRef) => {
22610
22771
  const {
22611
22772
  __scopePopper,
22612
22773
  side = "bottom",
@@ -22624,9 +22785,9 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
22624
22785
  ...contentProps
22625
22786
  } = props;
22626
22787
  const context = usePopperContext(CONTENT_NAME, __scopePopper);
22627
- const [content, setContent] = React24.useState(null);
22788
+ const [content, setContent] = React242.useState(null);
22628
22789
  const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
22629
- const [arrow4, setArrow] = React24.useState(null);
22790
+ const [arrow4, setArrow] = React242.useState(null);
22630
22791
  const arrowSize = useSize(arrow4);
22631
22792
  const arrowWidth = arrowSize?.width ?? 0;
22632
22793
  const arrowHeight = arrowSize?.height ?? 0;
@@ -22686,7 +22847,7 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
22686
22847
  const arrowX = middlewareData.arrow?.x;
22687
22848
  const arrowY = middlewareData.arrow?.y;
22688
22849
  const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
22689
- const [contentZIndex, setContentZIndex] = React24.useState();
22850
+ const [contentZIndex, setContentZIndex] = React242.useState();
22690
22851
  useLayoutEffect22(() => {
22691
22852
  if (content)
22692
22853
  setContentZIndex(window.getComputedStyle(content).zIndex);
@@ -22737,7 +22898,7 @@ var OPPOSITE_SIDE = {
22737
22898
  bottom: "top",
22738
22899
  left: "right"
22739
22900
  };
22740
- var PopperArrow = React24.forwardRef(function PopperArrow2(props, forwardedRef) {
22901
+ var PopperArrow = React242.forwardRef(function PopperArrow2(props, forwardedRef) {
22741
22902
  const { __scopePopper, ...arrowProps } = props;
22742
22903
  const contentContext = useContentContext(ARROW_NAME, __scopePopper);
22743
22904
  const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
@@ -23080,7 +23241,7 @@ function useCallbackRef2(initialValue, callback) {
23080
23241
  ref.callback = callback;
23081
23242
  return ref.facade;
23082
23243
  }
23083
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React292.useLayoutEffect : React292.useEffect;
23244
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React29.useLayoutEffect : React29.useEffect;
23084
23245
  var currentValues = new WeakMap;
23085
23246
  function useMergeRefs(refs, defaultValue) {
23086
23247
  var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
@@ -23716,9 +23877,9 @@ var Select = (props) => {
23716
23877
  required
23717
23878
  } = props;
23718
23879
  const popperScope = usePopperScope(__scopeSelect);
23719
- const [trigger, setTrigger] = React36.useState(null);
23720
- const [valueNode, setValueNode] = React36.useState(null);
23721
- const [valueNodeHasChildren, setValueNodeHasChildren] = React36.useState(false);
23880
+ const [trigger, setTrigger] = React362.useState(null);
23881
+ const [valueNode, setValueNode] = React362.useState(null);
23882
+ const [valueNodeHasChildren, setValueNodeHasChildren] = React362.useState(false);
23722
23883
  const direction = useDirection(dir);
23723
23884
  const [open = false, setOpen] = useControllableState({
23724
23885
  prop: openProp,
@@ -23730,11 +23891,11 @@ var Select = (props) => {
23730
23891
  defaultProp: defaultValue,
23731
23892
  onChange: onValueChange
23732
23893
  });
23733
- const triggerPointerDownPosRef = React36.useRef(null);
23894
+ const triggerPointerDownPosRef = React362.useRef(null);
23734
23895
  const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
23735
- const [nativeOptionsSet, setNativeOptionsSet] = React36.useState(/* @__PURE__ */ new Set);
23896
+ const [nativeOptionsSet, setNativeOptionsSet] = React362.useState(/* @__PURE__ */ new Set);
23736
23897
  const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
23737
- return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs4(SelectProvider, {
23898
+ return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
23738
23899
  required,
23739
23900
  scope: __scopeSelect,
23740
23901
  trigger,
@@ -23754,10 +23915,10 @@ var Select = (props) => {
23754
23915
  children: [
23755
23916
  /* @__PURE__ */ jsx242(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx242(SelectNativeOptionsProvider, {
23756
23917
  scope: props.__scopeSelect,
23757
- onNativeOptionAdd: React36.useCallback((option) => {
23918
+ onNativeOptionAdd: React362.useCallback((option) => {
23758
23919
  setNativeOptionsSet((prev) => new Set(prev).add(option));
23759
23920
  }, []),
23760
- onNativeOptionRemove: React36.useCallback((option) => {
23921
+ onNativeOptionRemove: React362.useCallback((option) => {
23761
23922
  setNativeOptionsSet((prev) => {
23762
23923
  const optionsSet = new Set(prev);
23763
23924
  optionsSet.delete(option);
@@ -23766,7 +23927,7 @@ var Select = (props) => {
23766
23927
  }, []),
23767
23928
  children
23768
23929
  }) }),
23769
- isFormControl ? /* @__PURE__ */ jsxs4(BubbleSelect, {
23930
+ isFormControl ? /* @__PURE__ */ jsxs42(BubbleSelect, {
23770
23931
  "aria-hidden": true,
23771
23932
  required,
23772
23933
  tabIndex: -1,
@@ -23785,7 +23946,7 @@ var Select = (props) => {
23785
23946
  };
23786
23947
  Select.displayName = SELECT_NAME;
23787
23948
  var TRIGGER_NAME = "SelectTrigger";
23788
- var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
23949
+ var SelectTrigger = React362.forwardRef((props, forwardedRef) => {
23789
23950
  const { __scopeSelect, disabled = false, ...triggerProps } = props;
23790
23951
  const popperScope = usePopperScope(__scopeSelect);
23791
23952
  const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
@@ -23853,7 +24014,7 @@ var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
23853
24014
  });
23854
24015
  SelectTrigger.displayName = TRIGGER_NAME;
23855
24016
  var VALUE_NAME = "SelectValue";
23856
- var SelectValue = React36.forwardRef((props, forwardedRef) => {
24017
+ var SelectValue = React362.forwardRef((props, forwardedRef) => {
23857
24018
  const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
23858
24019
  const context = useSelectContext(VALUE_NAME, __scopeSelect);
23859
24020
  const { onValueNodeHasChildrenChange } = context;
@@ -23871,7 +24032,7 @@ var SelectValue = React36.forwardRef((props, forwardedRef) => {
23871
24032
  });
23872
24033
  SelectValue.displayName = VALUE_NAME;
23873
24034
  var ICON_NAME = "SelectIcon";
23874
- var SelectIcon = React36.forwardRef((props, forwardedRef) => {
24035
+ var SelectIcon = React362.forwardRef((props, forwardedRef) => {
23875
24036
  const { __scopeSelect, children, ...iconProps } = props;
23876
24037
  return /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
23877
24038
  });
@@ -23882,9 +24043,9 @@ var SelectPortal = (props) => {
23882
24043
  };
23883
24044
  SelectPortal.displayName = PORTAL_NAME2;
23884
24045
  var CONTENT_NAME2 = "SelectContent";
23885
- var SelectContent = React36.forwardRef((props, forwardedRef) => {
24046
+ var SelectContent = React362.forwardRef((props, forwardedRef) => {
23886
24047
  const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
23887
- const [fragment, setFragment] = React36.useState();
24048
+ const [fragment, setFragment] = React362.useState();
23888
24049
  useLayoutEffect22(() => {
23889
24050
  setFragment(new DocumentFragment);
23890
24051
  }, []);
@@ -23898,7 +24059,7 @@ SelectContent.displayName = CONTENT_NAME2;
23898
24059
  var CONTENT_MARGIN = 10;
23899
24060
  var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
23900
24061
  var CONTENT_IMPL_NAME = "SelectContentImpl";
23901
- var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
24062
+ var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
23902
24063
  const {
23903
24064
  __scopeSelect,
23904
24065
  position = "item-aligned",
@@ -23918,20 +24079,20 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
23918
24079
  ...contentProps
23919
24080
  } = props;
23920
24081
  const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
23921
- const [content, setContent] = React36.useState(null);
23922
- const [viewport, setViewport] = React36.useState(null);
24082
+ const [content, setContent] = React362.useState(null);
24083
+ const [viewport, setViewport] = React362.useState(null);
23923
24084
  const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
23924
- const [selectedItem, setSelectedItem] = React36.useState(null);
23925
- const [selectedItemText, setSelectedItemText] = React36.useState(null);
24085
+ const [selectedItem, setSelectedItem] = React362.useState(null);
24086
+ const [selectedItemText, setSelectedItemText] = React362.useState(null);
23926
24087
  const getItems = useCollection(__scopeSelect);
23927
- const [isPositioned, setIsPositioned] = React36.useState(false);
23928
- const firstValidItemFoundRef = React36.useRef(false);
23929
- React36.useEffect(() => {
24088
+ const [isPositioned, setIsPositioned] = React362.useState(false);
24089
+ const firstValidItemFoundRef = React362.useRef(false);
24090
+ React362.useEffect(() => {
23930
24091
  if (content)
23931
24092
  return hideOthers(content);
23932
24093
  }, [content]);
23933
24094
  useFocusGuards();
23934
- const focusFirst2 = React36.useCallback((candidates) => {
24095
+ const focusFirst2 = React362.useCallback((candidates) => {
23935
24096
  const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
23936
24097
  const [lastItem] = restItems.slice(-1);
23937
24098
  const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
@@ -23948,14 +24109,14 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
23948
24109
  return;
23949
24110
  }
23950
24111
  }, [getItems, viewport]);
23951
- const focusSelectedItem = React36.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
23952
- React36.useEffect(() => {
24112
+ const focusSelectedItem = React362.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
24113
+ React362.useEffect(() => {
23953
24114
  if (isPositioned) {
23954
24115
  focusSelectedItem();
23955
24116
  }
23956
24117
  }, [isPositioned, focusSelectedItem]);
23957
24118
  const { onOpenChange, triggerPointerDownPosRef } = context;
23958
- React36.useEffect(() => {
24119
+ React362.useEffect(() => {
23959
24120
  if (content) {
23960
24121
  let pointerMoveDelta = { x: 0, y: 0 };
23961
24122
  const handlePointerMove = (event) => {
@@ -23985,7 +24146,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
23985
24146
  };
23986
24147
  }
23987
24148
  }, [content, onOpenChange, triggerPointerDownPosRef]);
23988
- React36.useEffect(() => {
24149
+ React362.useEffect(() => {
23989
24150
  const close = () => onOpenChange(false);
23990
24151
  window.addEventListener("blur", close);
23991
24152
  window.addEventListener("resize", close);
@@ -24002,7 +24163,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
24002
24163
  setTimeout(() => nextItem.ref.current.focus());
24003
24164
  }
24004
24165
  });
24005
- const itemRefCallback = React36.useCallback((node, value, disabled) => {
24166
+ const itemRefCallback = React362.useCallback((node, value, disabled) => {
24006
24167
  const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
24007
24168
  const isSelectedItem = context.value !== undefined && context.value === value;
24008
24169
  if (isSelectedItem || isFirstValidItem) {
@@ -24011,8 +24172,8 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
24011
24172
  firstValidItemFoundRef.current = true;
24012
24173
  }
24013
24174
  }, [context.value]);
24014
- const handleItemLeave = React36.useCallback(() => content?.focus(), [content]);
24015
- const itemTextRefCallback = React36.useCallback((node, value, disabled) => {
24175
+ const handleItemLeave = React362.useCallback(() => content?.focus(), [content]);
24176
+ const itemTextRefCallback = React362.useCallback((node, value, disabled) => {
24016
24177
  const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
24017
24178
  const isSelectedItem = context.value !== undefined && context.value === value;
24018
24179
  if (isSelectedItem || isFirstValidItem) {
@@ -24107,18 +24268,18 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
24107
24268
  });
24108
24269
  SelectContentImpl.displayName = CONTENT_IMPL_NAME;
24109
24270
  var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
24110
- var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
24271
+ var SelectItemAlignedPosition = React362.forwardRef((props, forwardedRef) => {
24111
24272
  const { __scopeSelect, onPlaced, ...popperProps } = props;
24112
24273
  const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
24113
24274
  const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
24114
- const [contentWrapper, setContentWrapper] = React36.useState(null);
24115
- const [content, setContent] = React36.useState(null);
24275
+ const [contentWrapper, setContentWrapper] = React362.useState(null);
24276
+ const [content, setContent] = React362.useState(null);
24116
24277
  const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
24117
24278
  const getItems = useCollection(__scopeSelect);
24118
- const shouldExpandOnScrollRef = React36.useRef(false);
24119
- const shouldRepositionRef = React36.useRef(true);
24279
+ const shouldExpandOnScrollRef = React362.useRef(false);
24280
+ const shouldRepositionRef = React362.useRef(true);
24120
24281
  const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
24121
- const position = React36.useCallback(() => {
24282
+ const position = React362.useCallback(() => {
24122
24283
  if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
24123
24284
  const triggerRect = context.trigger.getBoundingClientRect();
24124
24285
  const contentRect = content.getBoundingClientRect();
@@ -24199,12 +24360,12 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
24199
24360
  onPlaced
24200
24361
  ]);
24201
24362
  useLayoutEffect22(() => position(), [position]);
24202
- const [contentZIndex, setContentZIndex] = React36.useState();
24363
+ const [contentZIndex, setContentZIndex] = React362.useState();
24203
24364
  useLayoutEffect22(() => {
24204
24365
  if (content)
24205
24366
  setContentZIndex(window.getComputedStyle(content).zIndex);
24206
24367
  }, [content]);
24207
- const handleScrollButtonChange = React36.useCallback((node) => {
24368
+ const handleScrollButtonChange = React362.useCallback((node) => {
24208
24369
  if (node && shouldRepositionRef.current === true) {
24209
24370
  position();
24210
24371
  focusSelectedItem?.();
@@ -24238,7 +24399,7 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
24238
24399
  });
24239
24400
  SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
24240
24401
  var POPPER_POSITION_NAME = "SelectPopperPosition";
24241
- var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
24402
+ var SelectPopperPosition = React362.forwardRef((props, forwardedRef) => {
24242
24403
  const {
24243
24404
  __scopeSelect,
24244
24405
  align = "start",
@@ -24268,13 +24429,13 @@ var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
24268
24429
  SelectPopperPosition.displayName = POPPER_POSITION_NAME;
24269
24430
  var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
24270
24431
  var VIEWPORT_NAME = "SelectViewport";
24271
- var SelectViewport = React36.forwardRef((props, forwardedRef) => {
24432
+ var SelectViewport = React362.forwardRef((props, forwardedRef) => {
24272
24433
  const { __scopeSelect, nonce, ...viewportProps } = props;
24273
24434
  const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
24274
24435
  const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
24275
24436
  const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
24276
- const prevScrollTopRef = React36.useRef(0);
24277
- return /* @__PURE__ */ jsxs4(Fragment8, { children: [
24437
+ const prevScrollTopRef = React362.useRef(0);
24438
+ return /* @__PURE__ */ jsxs42(Fragment8, { children: [
24278
24439
  /* @__PURE__ */ jsx242("style", {
24279
24440
  dangerouslySetInnerHTML: {
24280
24441
  __html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`
@@ -24322,14 +24483,14 @@ var SelectViewport = React36.forwardRef((props, forwardedRef) => {
24322
24483
  SelectViewport.displayName = VIEWPORT_NAME;
24323
24484
  var GROUP_NAME = "SelectGroup";
24324
24485
  var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
24325
- var SelectGroup = React36.forwardRef((props, forwardedRef) => {
24486
+ var SelectGroup = React362.forwardRef((props, forwardedRef) => {
24326
24487
  const { __scopeSelect, ...groupProps } = props;
24327
24488
  const groupId = useId();
24328
24489
  return /* @__PURE__ */ jsx242(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx242(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
24329
24490
  });
24330
24491
  SelectGroup.displayName = GROUP_NAME;
24331
24492
  var LABEL_NAME = "SelectLabel";
24332
- var SelectLabel = React36.forwardRef((props, forwardedRef) => {
24493
+ var SelectLabel = React362.forwardRef((props, forwardedRef) => {
24333
24494
  const { __scopeSelect, ...labelProps } = props;
24334
24495
  const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
24335
24496
  return /* @__PURE__ */ jsx242(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
@@ -24337,7 +24498,7 @@ var SelectLabel = React36.forwardRef((props, forwardedRef) => {
24337
24498
  SelectLabel.displayName = LABEL_NAME;
24338
24499
  var ITEM_NAME = "SelectItem";
24339
24500
  var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
24340
- var SelectItem = React36.forwardRef((props, forwardedRef) => {
24501
+ var SelectItem = React362.forwardRef((props, forwardedRef) => {
24341
24502
  const {
24342
24503
  __scopeSelect,
24343
24504
  value,
@@ -24348,8 +24509,8 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
24348
24509
  const context = useSelectContext(ITEM_NAME, __scopeSelect);
24349
24510
  const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
24350
24511
  const isSelected = context.value === value;
24351
- const [textValue, setTextValue] = React36.useState(textValueProp ?? "");
24352
- const [isFocused, setIsFocused] = React36.useState(false);
24512
+ const [textValue, setTextValue] = React362.useState(textValueProp ?? "");
24513
+ const [isFocused, setIsFocused] = React362.useState(false);
24353
24514
  const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
24354
24515
  const textId = useId();
24355
24516
  const handleSelect = () => {
@@ -24367,7 +24528,7 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
24367
24528
  disabled,
24368
24529
  textId,
24369
24530
  isSelected,
24370
- onItemTextChange: React36.useCallback((node) => {
24531
+ onItemTextChange: React362.useCallback((node) => {
24371
24532
  setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
24372
24533
  }, []),
24373
24534
  children: /* @__PURE__ */ jsx242(Collection.ItemSlot, {
@@ -24416,39 +24577,39 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
24416
24577
  });
24417
24578
  SelectItem.displayName = ITEM_NAME;
24418
24579
  var ITEM_TEXT_NAME = "SelectItemText";
24419
- var SelectItemText = React36.forwardRef((props, forwardedRef) => {
24580
+ var SelectItemText = React362.forwardRef((props, forwardedRef) => {
24420
24581
  const { __scopeSelect, className, style, ...itemTextProps } = props;
24421
24582
  const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
24422
24583
  const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
24423
24584
  const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
24424
24585
  const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
24425
- const [itemTextNode, setItemTextNode] = React36.useState(null);
24586
+ const [itemTextNode, setItemTextNode] = React362.useState(null);
24426
24587
  const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
24427
24588
  const textContent = itemTextNode?.textContent;
24428
- const nativeOption = React36.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
24589
+ const nativeOption = React362.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
24429
24590
  const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
24430
24591
  useLayoutEffect22(() => {
24431
24592
  onNativeOptionAdd(nativeOption);
24432
24593
  return () => onNativeOptionRemove(nativeOption);
24433
24594
  }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
24434
- return /* @__PURE__ */ jsxs4(Fragment8, { children: [
24595
+ return /* @__PURE__ */ jsxs42(Fragment8, { children: [
24435
24596
  /* @__PURE__ */ jsx242(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
24436
24597
  itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM4.createPortal(itemTextProps.children, context.valueNode) : null
24437
24598
  ] });
24438
24599
  });
24439
24600
  SelectItemText.displayName = ITEM_TEXT_NAME;
24440
24601
  var ITEM_INDICATOR_NAME = "SelectItemIndicator";
24441
- var SelectItemIndicator = React36.forwardRef((props, forwardedRef) => {
24602
+ var SelectItemIndicator = React362.forwardRef((props, forwardedRef) => {
24442
24603
  const { __scopeSelect, ...itemIndicatorProps } = props;
24443
24604
  const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
24444
24605
  return itemContext.isSelected ? /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
24445
24606
  });
24446
24607
  SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
24447
24608
  var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
24448
- var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
24609
+ var SelectScrollUpButton = React362.forwardRef((props, forwardedRef) => {
24449
24610
  const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
24450
24611
  const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
24451
- const [canScrollUp, setCanScrollUp] = React36.useState(false);
24612
+ const [canScrollUp, setCanScrollUp] = React362.useState(false);
24452
24613
  const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
24453
24614
  useLayoutEffect22(() => {
24454
24615
  if (contentContext.viewport && contentContext.isPositioned) {
@@ -24476,10 +24637,10 @@ var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
24476
24637
  });
24477
24638
  SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
24478
24639
  var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
24479
- var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
24640
+ var SelectScrollDownButton = React362.forwardRef((props, forwardedRef) => {
24480
24641
  const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
24481
24642
  const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
24482
- const [canScrollDown, setCanScrollDown] = React36.useState(false);
24643
+ const [canScrollDown, setCanScrollDown] = React362.useState(false);
24483
24644
  const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
24484
24645
  useLayoutEffect22(() => {
24485
24646
  if (contentContext.viewport && contentContext.isPositioned) {
@@ -24507,18 +24668,18 @@ var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
24507
24668
  }) : null;
24508
24669
  });
24509
24670
  SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
24510
- var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
24671
+ var SelectScrollButtonImpl = React362.forwardRef((props, forwardedRef) => {
24511
24672
  const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
24512
24673
  const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
24513
- const autoScrollTimerRef = React36.useRef(null);
24674
+ const autoScrollTimerRef = React362.useRef(null);
24514
24675
  const getItems = useCollection(__scopeSelect);
24515
- const clearAutoScrollTimer = React36.useCallback(() => {
24676
+ const clearAutoScrollTimer = React362.useCallback(() => {
24516
24677
  if (autoScrollTimerRef.current !== null) {
24517
24678
  window.clearInterval(autoScrollTimerRef.current);
24518
24679
  autoScrollTimerRef.current = null;
24519
24680
  }
24520
24681
  }, []);
24521
- React36.useEffect(() => {
24682
+ React362.useEffect(() => {
24522
24683
  return () => clearAutoScrollTimer();
24523
24684
  }, [clearAutoScrollTimer]);
24524
24685
  useLayoutEffect22(() => {
@@ -24547,13 +24708,13 @@ var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
24547
24708
  });
24548
24709
  });
24549
24710
  var SEPARATOR_NAME = "SelectSeparator";
24550
- var SelectSeparator = React36.forwardRef((props, forwardedRef) => {
24711
+ var SelectSeparator = React362.forwardRef((props, forwardedRef) => {
24551
24712
  const { __scopeSelect, ...separatorProps } = props;
24552
24713
  return /* @__PURE__ */ jsx242(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
24553
24714
  });
24554
24715
  SelectSeparator.displayName = SEPARATOR_NAME;
24555
24716
  var ARROW_NAME2 = "SelectArrow";
24556
- var SelectArrow = React36.forwardRef((props, forwardedRef) => {
24717
+ var SelectArrow = React362.forwardRef((props, forwardedRef) => {
24557
24718
  const { __scopeSelect, ...arrowProps } = props;
24558
24719
  const popperScope = usePopperScope(__scopeSelect);
24559
24720
  const context = useSelectContext(ARROW_NAME2, __scopeSelect);
@@ -24564,12 +24725,12 @@ SelectArrow.displayName = ARROW_NAME2;
24564
24725
  function shouldShowPlaceholder(value) {
24565
24726
  return value === "" || value === undefined;
24566
24727
  }
24567
- var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
24728
+ var BubbleSelect = React362.forwardRef((props, forwardedRef) => {
24568
24729
  const { value, ...selectProps } = props;
24569
- const ref = React36.useRef(null);
24730
+ const ref = React362.useRef(null);
24570
24731
  const composedRefs = useComposedRefs2(forwardedRef, ref);
24571
24732
  const prevValue = usePrevious(value);
24572
- React36.useEffect(() => {
24733
+ React362.useEffect(() => {
24573
24734
  const select = ref.current;
24574
24735
  const selectProto = window.HTMLSelectElement.prototype;
24575
24736
  const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
@@ -24585,9 +24746,9 @@ var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
24585
24746
  BubbleSelect.displayName = "BubbleSelect";
24586
24747
  function useTypeaheadSearch(onSearchChange) {
24587
24748
  const handleSearchChange = useCallbackRef(onSearchChange);
24588
- const searchRef = React36.useRef("");
24589
- const timerRef = React36.useRef(0);
24590
- const handleTypeaheadSearch = React36.useCallback((key) => {
24749
+ const searchRef = React362.useRef("");
24750
+ const timerRef = React362.useRef(0);
24751
+ const handleTypeaheadSearch = React362.useCallback((key) => {
24591
24752
  const search = searchRef.current + key;
24592
24753
  handleSearchChange(search);
24593
24754
  (function updateSearch(value) {
@@ -24597,11 +24758,11 @@ function useTypeaheadSearch(onSearchChange) {
24597
24758
  timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
24598
24759
  })(search);
24599
24760
  }, [handleSearchChange]);
24600
- const resetTypeahead = React36.useCallback(() => {
24761
+ const resetTypeahead = React362.useCallback(() => {
24601
24762
  searchRef.current = "";
24602
24763
  window.clearTimeout(timerRef.current);
24603
24764
  }, []);
24604
- React36.useEffect(() => {
24765
+ React362.useEffect(() => {
24605
24766
  return () => window.clearTimeout(timerRef.current);
24606
24767
  }, []);
24607
24768
  return [searchRef, handleTypeaheadSearch, resetTypeahead];
@@ -24690,7 +24851,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
24690
24851
  var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
24691
24852
  var Select2 = Root222;
24692
24853
  var SelectValue2 = Value;
24693
- var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs52(Trigger, {
24854
+ var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
24694
24855
  ref,
24695
24856
  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),
24696
24857
  ...props,
@@ -24705,7 +24866,7 @@ var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref
24705
24866
  ]
24706
24867
  }));
24707
24868
  SelectTrigger2.displayName = Trigger.displayName;
24708
- var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
24869
+ var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
24709
24870
  ref,
24710
24871
  className: cn("flex cursor-default items-center justify-center py-1", className),
24711
24872
  ...props,
@@ -24714,7 +24875,7 @@ var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) =
24714
24875
  })
24715
24876
  }));
24716
24877
  SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
24717
- var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
24878
+ var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
24718
24879
  ref,
24719
24880
  className: cn("flex cursor-default items-center justify-center py-1", className),
24720
24881
  ...props,
@@ -24723,8 +24884,8 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
24723
24884
  })
24724
24885
  }));
24725
24886
  SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
24726
- var SelectContent2 = React372.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
24727
- children: /* @__PURE__ */ jsxs52(Content2, {
24887
+ var SelectContent2 = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
24888
+ children: /* @__PURE__ */ jsxs5(Content2, {
24728
24889
  ref,
24729
24890
  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),
24730
24891
  position,
@@ -24740,13 +24901,13 @@ var SelectContent2 = React372.forwardRef(({ className, children, position = "pop
24740
24901
  })
24741
24902
  }));
24742
24903
  SelectContent2.displayName = Content2.displayName;
24743
- var SelectLabel2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
24904
+ var SelectLabel2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
24744
24905
  ref,
24745
24906
  className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
24746
24907
  ...props
24747
24908
  }));
24748
24909
  SelectLabel2.displayName = Label.displayName;
24749
- var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs52(Item, {
24910
+ var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
24750
24911
  ref,
24751
24912
  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),
24752
24913
  ...props,
@@ -24765,7 +24926,7 @@ var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) =
24765
24926
  ]
24766
24927
  }));
24767
24928
  SelectItem2.displayName = Item.displayName;
24768
- var SelectSeparator2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
24929
+ var SelectSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
24769
24930
  ref,
24770
24931
  className: cn("-mx-1 my-1 h-px bg-muted", className),
24771
24932
  ...props
@@ -24798,19 +24959,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
24798
24959
  function createContextScope2(scopeName, createContextScopeDeps = []) {
24799
24960
  let defaultContexts = [];
24800
24961
  function createContext32(rootComponentName, defaultContext) {
24801
- const BaseContext = React38.createContext(defaultContext);
24962
+ const BaseContext = React382.createContext(defaultContext);
24802
24963
  const index2 = defaultContexts.length;
24803
24964
  defaultContexts = [...defaultContexts, defaultContext];
24804
24965
  const Provider = (props) => {
24805
24966
  const { scope, children, ...context } = props;
24806
24967
  const Context = scope?.[scopeName]?.[index2] || BaseContext;
24807
- const value = React38.useMemo(() => context, Object.values(context));
24968
+ const value = React382.useMemo(() => context, Object.values(context));
24808
24969
  return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
24809
24970
  };
24810
24971
  Provider.displayName = rootComponentName + "Provider";
24811
24972
  function useContext222(consumerName, scope) {
24812
24973
  const Context = scope?.[scopeName]?.[index2] || BaseContext;
24813
- const context = React38.useContext(Context);
24974
+ const context = React382.useContext(Context);
24814
24975
  if (context)
24815
24976
  return context;
24816
24977
  if (defaultContext !== undefined)
@@ -24821,11 +24982,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
24821
24982
  }
24822
24983
  const createScope = () => {
24823
24984
  const scopeContexts = defaultContexts.map((defaultContext) => {
24824
- return React38.createContext(defaultContext);
24985
+ return React382.createContext(defaultContext);
24825
24986
  });
24826
24987
  return function useScope(scope) {
24827
24988
  const contexts = scope?.[scopeName] || scopeContexts;
24828
- return React38.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
24989
+ return React382.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
24829
24990
  };
24830
24991
  };
24831
24992
  createScope.scopeName = scopeName;
@@ -24846,7 +25007,7 @@ function composeContextScopes2(...scopes) {
24846
25007
  const currentScope = scopeProps[`__scope${scopeName}`];
24847
25008
  return { ...nextScopes2, ...currentScope };
24848
25009
  }, {});
24849
- return React38.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
25010
+ return React382.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
24850
25011
  };
24851
25012
  };
24852
25013
  createScope.scopeName = baseScope.scopeName;
@@ -24854,22 +25015,22 @@ function composeContextScopes2(...scopes) {
24854
25015
  }
24855
25016
  function createSlot2(ownerName) {
24856
25017
  const SlotClone2 = /* @__PURE__ */ createSlotClone2(ownerName);
24857
- const Slot22 = React392.forwardRef((props, forwardedRef) => {
25018
+ const Slot22 = React39.forwardRef((props, forwardedRef) => {
24858
25019
  const { children, ...slotProps } = props;
24859
- const childrenArray = React392.Children.toArray(children);
25020
+ const childrenArray = React39.Children.toArray(children);
24860
25021
  const slottable = childrenArray.find(isSlottable3);
24861
25022
  if (slottable) {
24862
25023
  const newElement = slottable.props.children;
24863
25024
  const newChildren = childrenArray.map((child) => {
24864
25025
  if (child === slottable) {
24865
- if (React392.Children.count(newElement) > 1)
24866
- return React392.Children.only(null);
24867
- return React392.isValidElement(newElement) ? newElement.props.children : null;
25026
+ if (React39.Children.count(newElement) > 1)
25027
+ return React39.Children.only(null);
25028
+ return React39.isValidElement(newElement) ? newElement.props.children : null;
24868
25029
  } else {
24869
25030
  return child;
24870
25031
  }
24871
25032
  });
24872
- return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React392.isValidElement(newElement) ? React392.cloneElement(newElement, undefined, newChildren) : null });
25033
+ return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, undefined, newChildren) : null });
24873
25034
  }
24874
25035
  return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children });
24875
25036
  });
@@ -24877,24 +25038,24 @@ function createSlot2(ownerName) {
24877
25038
  return Slot22;
24878
25039
  }
24879
25040
  function createSlotClone2(ownerName) {
24880
- const SlotClone2 = React392.forwardRef((props, forwardedRef) => {
25041
+ const SlotClone2 = React39.forwardRef((props, forwardedRef) => {
24881
25042
  const { children, ...slotProps } = props;
24882
- if (React392.isValidElement(children)) {
25043
+ if (React39.isValidElement(children)) {
24883
25044
  const childrenRef = getElementRef3(children);
24884
25045
  const props2 = mergeProps3(slotProps, children.props);
24885
- if (children.type !== React392.Fragment) {
25046
+ if (children.type !== React39.Fragment) {
24886
25047
  props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
24887
25048
  }
24888
- return React392.cloneElement(children, props2);
25049
+ return React39.cloneElement(children, props2);
24889
25050
  }
24890
- return React392.Children.count(children) > 1 ? React392.Children.only(null) : null;
25051
+ return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
24891
25052
  });
24892
25053
  SlotClone2.displayName = `${ownerName}.SlotClone`;
24893
25054
  return SlotClone2;
24894
25055
  }
24895
25056
  var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
24896
25057
  function isSlottable3(child) {
24897
- return React392.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
25058
+ return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
24898
25059
  }
24899
25060
  function mergeProps3(slotProps, childProps) {
24900
25061
  const overrideProps = { ...childProps };
@@ -25288,7 +25449,7 @@ function toSafeIndex(array, index2) {
25288
25449
  function toSafeInteger(number) {
25289
25450
  return number !== number || number === 0 ? 0 : Math.trunc(number);
25290
25451
  }
25291
- var useLayoutEffect222 = globalThis?.document ? React41.useLayoutEffect : () => {};
25452
+ var useLayoutEffect222 = globalThis?.document ? React412.useLayoutEffect : () => {};
25292
25453
  var useReactId2 = React422[" useId ".trim().toString()] || (() => {
25293
25454
  return;
25294
25455
  });
@@ -25322,7 +25483,7 @@ var NODES2 = [
25322
25483
  ];
25323
25484
  var Primitive2 = NODES2.reduce((primitive, node) => {
25324
25485
  const Slot3 = createSlot2(`Primitive.${node}`);
25325
- const Node2 = React43.forwardRef((props, forwardedRef) => {
25486
+ const Node2 = React432.forwardRef((props, forwardedRef) => {
25326
25487
  const { asChild, ...primitiveProps } = props;
25327
25488
  const Comp = asChild ? Slot3 : node;
25328
25489
  if (typeof window !== "undefined") {
@@ -27224,7 +27385,7 @@ function cn2(...inputs) {
27224
27385
  }
27225
27386
 
27226
27387
  // src/components/homepage/PricingBulletPoint.tsx
27227
- import { jsx as jsx45, jsxs as jsxs6 } from "react/jsx-runtime";
27388
+ import { jsx as jsx45, jsxs as jsxs7 } from "react/jsx-runtime";
27228
27389
  var container3 = {
27229
27390
  display: "flex",
27230
27391
  flexDirection: "row",
@@ -27238,7 +27399,7 @@ var greyCircle = {
27238
27399
  backgroundColor: "var(--footer-border)"
27239
27400
  };
27240
27401
  var PricingBulletPoint = ({ text, checked, children }) => {
27241
- const checkmarkSVG = /* @__PURE__ */ jsxs6("svg", {
27402
+ const checkmarkSVG = /* @__PURE__ */ jsxs7("svg", {
27242
27403
  width: "20",
27243
27404
  height: "20",
27244
27405
  viewBox: "0 0 20 20",
@@ -27260,13 +27421,13 @@ var PricingBulletPoint = ({ text, checked, children }) => {
27260
27421
  })
27261
27422
  ]
27262
27423
  });
27263
- return /* @__PURE__ */ jsxs6("div", {
27424
+ return /* @__PURE__ */ jsxs7("div", {
27264
27425
  style: container3,
27265
27426
  children: [
27266
27427
  checked ? checkmarkSVG : /* @__PURE__ */ jsx45("div", {
27267
27428
  style: greyCircle
27268
27429
  }),
27269
- /* @__PURE__ */ jsxs6("div", {
27430
+ /* @__PURE__ */ jsxs7("div", {
27270
27431
  className: "fontbrand text-lg\t",
27271
27432
  children: [
27272
27433
  text,
@@ -27278,7 +27439,7 @@ var PricingBulletPoint = ({ text, checked, children }) => {
27278
27439
  };
27279
27440
 
27280
27441
  // src/components/homepage/FreePricing.tsx
27281
- import { jsx as jsx46, jsxs as jsxs7, Fragment as Fragment9 } from "react/jsx-runtime";
27442
+ import { jsx as jsx46, jsxs as jsxs8, Fragment as Fragment9 } from "react/jsx-runtime";
27282
27443
  var Container = ({
27283
27444
  children
27284
27445
  }) => {
@@ -27322,7 +27483,7 @@ var icon = {
27322
27483
  };
27323
27484
  var PricingSlider = ({ value, onChange, min: min2, max: max2, step = 1, "aria-label": ariaLabel }) => {
27324
27485
  const percentage = (value - min2) / (max2 - min2) * 100;
27325
- return /* @__PURE__ */ jsxs7(Fragment9, {
27486
+ return /* @__PURE__ */ jsxs8(Fragment9, {
27326
27487
  children: [
27327
27488
  /* @__PURE__ */ jsx46("style", {
27328
27489
  children: `
@@ -27379,7 +27540,7 @@ var textUnitWrapper = {
27379
27540
  flexDirection: "column"
27380
27541
  };
27381
27542
  var FreePricing = () => {
27382
- return /* @__PURE__ */ jsxs7(Container, {
27543
+ return /* @__PURE__ */ jsxs8(Container, {
27383
27544
  children: [
27384
27545
  /* @__PURE__ */ jsx46(Audience, {
27385
27546
  children: "For individuals and companies of up to 3 people"
@@ -27410,7 +27571,7 @@ var FreePricing = () => {
27410
27571
  ...textUnitWrapper,
27411
27572
  alignItems: "flex-end"
27412
27573
  },
27413
- children: /* @__PURE__ */ jsxs7("a", {
27574
+ children: /* @__PURE__ */ jsxs8("a", {
27414
27575
  target: "_blank",
27415
27576
  href: "https://www.remotion.dev/docs",
27416
27577
  className: "font-brand text-brand flex flex-row items-center gap-1 no-underline",
@@ -27434,7 +27595,7 @@ var FreePricing = () => {
27434
27595
  });
27435
27596
  };
27436
27597
  var EnterpriseLicense = () => {
27437
- return /* @__PURE__ */ jsxs7(Container, {
27598
+ return /* @__PURE__ */ jsxs8(Container, {
27438
27599
  children: [
27439
27600
  /* @__PURE__ */ jsx46(Audience, {
27440
27601
  children: "For advanced needs"
@@ -27467,7 +27628,7 @@ var EnterpriseLicense = () => {
27467
27628
  checked: true
27468
27629
  }),
27469
27630
  /* @__PURE__ */ jsx46(PricingBulletPoint, {
27470
- text: /* @__PURE__ */ jsxs7("span", {
27631
+ text: /* @__PURE__ */ jsxs8("span", {
27471
27632
  children: [
27472
27633
  /* @__PURE__ */ jsx46("a", {
27473
27634
  href: "https://www.remotion.dev/editor-starter",
@@ -27485,7 +27646,7 @@ var EnterpriseLicense = () => {
27485
27646
  }),
27486
27647
  /* @__PURE__ */ jsx46("div", {
27487
27648
  className: "flex flex-row justify-end",
27488
- children: /* @__PURE__ */ jsxs7("div", {
27649
+ children: /* @__PURE__ */ jsxs8("div", {
27489
27650
  style: {
27490
27651
  ...textUnitWrapper,
27491
27652
  alignItems: "flex-end"
@@ -27512,7 +27673,7 @@ var EnterpriseLicense = () => {
27512
27673
  var SEAT_PRICE = 25;
27513
27674
  var RENDER_UNIT_PRICE = 10;
27514
27675
  var SectionCheckbox = ({ checked, onChange, title, subtitle, children }) => {
27515
- return /* @__PURE__ */ jsxs7("div", {
27676
+ return /* @__PURE__ */ jsxs8("div", {
27516
27677
  className: "flex flex-row gap-3 cursor-pointer select-none items-center",
27517
27678
  onClick: () => onChange(!checked),
27518
27679
  children: [
@@ -27521,10 +27682,10 @@ var SectionCheckbox = ({ checked, onChange, title, subtitle, children }) => {
27521
27682
  onToggle: () => onChange(!checked),
27522
27683
  "aria-label": title
27523
27684
  }),
27524
- /* @__PURE__ */ jsxs7("div", {
27685
+ /* @__PURE__ */ jsxs8("div", {
27525
27686
  className: "flex flex-col",
27526
27687
  children: [
27527
- /* @__PURE__ */ jsxs7("div", {
27688
+ /* @__PURE__ */ jsxs8("div", {
27528
27689
  className: "fontbrand font-bold text-lg flex flex-row items-center gap-1",
27529
27690
  children: [
27530
27691
  title,
@@ -27574,7 +27735,7 @@ var CompanyPricing = () => {
27574
27735
  }, [formatPrice, totalPrice]);
27575
27736
  const showMinimumMessage = automatorsSelected && creatorsPrice + automatorsPrice < 100;
27576
27737
  const showEnterpriseMessage = totalPrice >= 500;
27577
- return /* @__PURE__ */ jsxs7(Container, {
27738
+ return /* @__PURE__ */ jsxs8(Container, {
27578
27739
  children: [
27579
27740
  /* @__PURE__ */ jsx46(Audience, {
27580
27741
  children: "For collaborations and companies of 4+ people"
@@ -27617,14 +27778,14 @@ var CompanyPricing = () => {
27617
27778
  transition: automatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
27618
27779
  },
27619
27780
  inert: !automatorsSelected,
27620
- children: /* @__PURE__ */ jsxs7("div", {
27781
+ children: /* @__PURE__ */ jsxs8("div", {
27621
27782
  className: "overflow-hidden",
27622
27783
  children: [
27623
27784
  /* @__PURE__ */ jsx46("p", {
27624
27785
  className: "text-sm text-muted fontbrand pt-3 pb-1",
27625
27786
  children: "Intended for companies launching applications and systems; such as video editors, prompt-to-video apps, embedding the Remotion Player, or any other automated video creation. A $100/mo Minimum Spend applies. Developers working on automation projects do not require a Seat."
27626
27787
  }),
27627
- /* @__PURE__ */ jsxs7("div", {
27788
+ /* @__PURE__ */ jsxs8("div", {
27628
27789
  className: "flex flex-row items-center gap-3 sm:gap-4 w-full pt-3 pb-1",
27629
27790
  children: [
27630
27791
  /* @__PURE__ */ jsx46("div", {
@@ -27638,14 +27799,14 @@ var CompanyPricing = () => {
27638
27799
  "aria-label": "Number of renders"
27639
27800
  })
27640
27801
  }),
27641
- /* @__PURE__ */ jsxs7("div", {
27802
+ /* @__PURE__ */ jsxs8("div", {
27642
27803
  className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-right tabular-nums",
27643
27804
  children: [
27644
27805
  new Intl.NumberFormat("en-US").format(cloudRenders),
27645
27806
  " Renders"
27646
27807
  ]
27647
27808
  }),
27648
- /* @__PURE__ */ jsxs7("div", {
27809
+ /* @__PURE__ */ jsxs8("div", {
27649
27810
  className: "fontbrand font-bold min-w-[60px] text-right shrink-0 whitespace-nowrap tabular-nums",
27650
27811
  children: [
27651
27812
  "$",
@@ -27674,14 +27835,14 @@ var CompanyPricing = () => {
27674
27835
  transition: creatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
27675
27836
  },
27676
27837
  inert: !creatorsSelected,
27677
- children: /* @__PURE__ */ jsxs7("div", {
27838
+ children: /* @__PURE__ */ jsxs8("div", {
27678
27839
  className: "overflow-hidden",
27679
27840
  children: [
27680
27841
  /* @__PURE__ */ jsx46("p", {
27681
27842
  className: "text-sm text-muted fontbrand pt-3 pb-1",
27682
27843
  children: "Intended for low volume video creations through coding and prompting, and building motion design systems in a local environment. Get 1 Seat per user."
27683
27844
  }),
27684
- /* @__PURE__ */ jsxs7("div", {
27845
+ /* @__PURE__ */ jsxs8("div", {
27685
27846
  className: "flex flex-row items-center gap-3 sm:gap-4 w-full pt-3 pb-1",
27686
27847
  children: [
27687
27848
  /* @__PURE__ */ jsx46("div", {
@@ -27694,7 +27855,7 @@ var CompanyPricing = () => {
27694
27855
  "aria-label": "Number of seats"
27695
27856
  })
27696
27857
  }),
27697
- /* @__PURE__ */ jsxs7("div", {
27858
+ /* @__PURE__ */ jsxs8("div", {
27698
27859
  className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-center tabular-nums",
27699
27860
  children: [
27700
27861
  devSeatCount,
@@ -27702,7 +27863,7 @@ var CompanyPricing = () => {
27702
27863
  devSeatCount === 1 ? "Seat" : "Seats"
27703
27864
  ]
27704
27865
  }),
27705
- /* @__PURE__ */ jsxs7("div", {
27866
+ /* @__PURE__ */ jsxs8("div", {
27706
27867
  className: "fontbrand font-bold min-w-[60px] text-right shrink-0 whitespace-nowrap tabular-nums",
27707
27868
  children: [
27708
27869
  "$",
@@ -27719,14 +27880,14 @@ var CompanyPricing = () => {
27719
27880
  /* @__PURE__ */ jsx46("div", {
27720
27881
  style: { height: 14 }
27721
27882
  }),
27722
- /* @__PURE__ */ jsxs7("div", {
27883
+ /* @__PURE__ */ jsxs8("div", {
27723
27884
  className: "flex flex-row items-baseline justify-end gap-2",
27724
27885
  children: [
27725
27886
  /* @__PURE__ */ jsx46("div", {
27726
27887
  className: "fontbrand text-muted text-sm",
27727
27888
  children: "Total"
27728
27889
  }),
27729
- /* @__PURE__ */ jsxs7(PriceTag, {
27890
+ /* @__PURE__ */ jsxs8(PriceTag, {
27730
27891
  children: [
27731
27892
  totalPriceString,
27732
27893
  "/month"
@@ -27734,7 +27895,7 @@ var CompanyPricing = () => {
27734
27895
  })
27735
27896
  ]
27736
27897
  }),
27737
- /* @__PURE__ */ jsxs7("div", {
27898
+ /* @__PURE__ */ jsxs8("div", {
27738
27899
  className: "flex flex-col items-end",
27739
27900
  children: [
27740
27901
  /* @__PURE__ */ jsx46(BottomInfo, {
@@ -27742,7 +27903,7 @@ var CompanyPricing = () => {
27742
27903
  className: "opacity-0 data-[visible=true]:opacity-100 transition-opacity mt-1",
27743
27904
  children: "The minimum is $100 per month for Remotion for Automators"
27744
27905
  }),
27745
- /* @__PURE__ */ jsxs7(BottomInfo, {
27906
+ /* @__PURE__ */ jsxs8(BottomInfo, {
27746
27907
  "data-visible": showEnterpriseMessage,
27747
27908
  className: "opacity-0 data-[visible=true]:opacity-100 transition-opacity mt-1",
27748
27909
  children: [
@@ -27768,7 +27929,7 @@ var CompanyPricing = () => {
27768
27929
  ...textUnitWrapper,
27769
27930
  alignItems: "flex-end"
27770
27931
  },
27771
- children: /* @__PURE__ */ jsxs7("a", {
27932
+ children: /* @__PURE__ */ jsxs8("a", {
27772
27933
  href: "https://remotion.pro/dashboard",
27773
27934
  className: "font-brand text-brand flex flex-row items-center gap-1 no-underline",
27774
27935
  children: [
@@ -27792,12 +27953,12 @@ var CompanyPricing = () => {
27792
27953
  };
27793
27954
 
27794
27955
  // src/components/homepage/Pricing.tsx
27795
- import { jsx as jsx47, jsxs as jsxs8 } from "react/jsx-runtime";
27956
+ import { jsx as jsx47, jsxs as jsxs9 } from "react/jsx-runtime";
27796
27957
  var Pricing = ({
27797
27958
  faqHref = "/docs/license/faq",
27798
27959
  faqLabel = "License FAQ",
27799
27960
  licenseHref = "https://github.com/remotion-dev/remotion/blob/main/LICENSE.md",
27800
- termsHref = "https://www.remotion.pro/terms"
27961
+ termsHref = "/docs/license/terms"
27801
27962
  }) => {
27802
27963
  const faqLinkTarget = useMemo52(() => {
27803
27964
  return faqHref.startsWith("http") ? "_blank" : undefined;
@@ -27808,7 +27969,7 @@ var Pricing = ({
27808
27969
  const termsLinkTarget = useMemo52(() => {
27809
27970
  return termsHref.startsWith("http") ? "_blank" : undefined;
27810
27971
  }, [termsHref]);
27811
- return /* @__PURE__ */ jsxs8("div", {
27972
+ return /* @__PURE__ */ jsxs9("div", {
27812
27973
  style: {
27813
27974
  display: "flex",
27814
27975
  flexDirection: "column",
@@ -27824,7 +27985,7 @@ var Pricing = ({
27824
27985
  justifyContent: "center",
27825
27986
  display: "flex"
27826
27987
  },
27827
- children: /* @__PURE__ */ jsxs8("div", {
27988
+ children: /* @__PURE__ */ jsxs9("div", {
27828
27989
  style: {
27829
27990
  fontFamily: "GTPlanar"
27830
27991
  },