@remotion/studio 4.0.451 → 4.0.452

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.
@@ -2734,13 +2734,13 @@ var enableHotMiddleware = () => {
2734
2734
  };
2735
2735
 
2736
2736
  // src/Studio.tsx
2737
- import { useLayoutEffect as useLayoutEffect6 } from "react";
2737
+ import { useLayoutEffect as useLayoutEffect5 } from "react";
2738
2738
  import { createPortal } from "react-dom";
2739
2739
  import { Internals as Internals70 } from "remotion";
2740
2740
 
2741
2741
  // src/components/Editor.tsx
2742
2742
  import { PlayerInternals as PlayerInternals19 } from "@remotion/player";
2743
- import React189, { useCallback as useCallback150, useMemo as useMemo151, useState as useState100 } from "react";
2743
+ import React189, { useCallback as useCallback150, useMemo as useMemo151, useState as useState99 } from "react";
2744
2744
  import { Internals as Internals65 } from "remotion";
2745
2745
 
2746
2746
  // src/helpers/noop.ts
@@ -2754,7 +2754,7 @@ var canvasRef = createRef2();
2754
2754
  var drawRef = createRef2();
2755
2755
 
2756
2756
  // src/state/timeline-zoom.tsx
2757
- import { createContext as createContext5, useCallback as useCallback13, useMemo as useMemo12, useState as useState11 } from "react";
2757
+ import { createContext as createContext5, useCallback as useCallback13, useMemo as useMemo12, useState as useState10 } from "react";
2758
2758
 
2759
2759
  // src/components/Timeline/imperative-state.ts
2760
2760
  var currentFrame = 0;
@@ -2850,10 +2850,10 @@ var timelineVerticalScroll = React20.createRef();
2850
2850
  // src/components/Timeline/TimelineSlider.tsx
2851
2851
  import {
2852
2852
  createRef as createRef3,
2853
- useContext as useContext4,
2853
+ useContext as useContext3,
2854
2854
  useEffect as useEffect11,
2855
2855
  useImperativeHandle as useImperativeHandle2,
2856
- useLayoutEffect as useLayoutEffect2,
2856
+ useLayoutEffect,
2857
2857
  useRef as useRef5
2858
2858
  } from "react";
2859
2859
  import { Internals as Internals3, useVideoConfig } from "remotion";
@@ -2888,7 +2888,7 @@ var TimelineSliderHandle = () => {
2888
2888
 
2889
2889
  // src/components/Timeline/TimelineWidthProvider.tsx
2890
2890
  import { PlayerInternals as PlayerInternals2 } from "@remotion/player";
2891
- import { createContext as createContext4, useContext as useContext3, useLayoutEffect, useState as useState10 } from "react";
2891
+ import { createContext as createContext4 } from "react";
2892
2892
  import { jsx as jsx28 } from "react/jsx-runtime";
2893
2893
  var TimelineWidthContext = createContext4(null);
2894
2894
  var TimelineWidthProvider = ({ children }) => {
@@ -2896,19 +2896,8 @@ var TimelineWidthProvider = ({ children }) => {
2896
2896
  triggerOnWindowResize: false,
2897
2897
  shouldApplyCssTransforms: true
2898
2898
  });
2899
- const { zoom: zoomMap } = useContext3(TimelineZoomCtx);
2900
- const [widthOverride, setWidthOverride] = useState10(null);
2901
- const observedWidth = size2?.width ?? null;
2902
- useLayoutEffect(() => {
2903
- const actual = sliderAreaRef.current?.clientWidth ?? null;
2904
- if (actual !== null && actual !== observedWidth) {
2905
- setWidthOverride(actual);
2906
- } else {
2907
- setWidthOverride(null);
2908
- }
2909
- }, [observedWidth, zoomMap]);
2910
2899
  return /* @__PURE__ */ jsx28(TimelineWidthContext.Provider, {
2911
- value: widthOverride ?? observedWidth,
2900
+ value: size2?.width ?? null,
2912
2901
  children
2913
2902
  });
2914
2903
  };
@@ -2930,7 +2919,7 @@ var line = {
2930
2919
  var redrawTimelineSliderFast = createRef3();
2931
2920
  var TimelineSlider = () => {
2932
2921
  const videoConfig = Internals3.useUnsafeVideoConfig();
2933
- const timelineWidth = useContext4(TimelineWidthContext);
2922
+ const timelineWidth = useContext3(TimelineWidthContext);
2934
2923
  if (videoConfig === null || timelineWidth === null) {
2935
2924
  return null;
2936
2925
  }
@@ -2940,14 +2929,14 @@ var Inner = () => {
2940
2929
  const videoConfig = useVideoConfig();
2941
2930
  const timelinePosition = Internals3.Timeline.useTimelinePosition();
2942
2931
  const ref = useRef5(null);
2943
- const timelineWidth = useContext4(TimelineWidthContext);
2944
- const { zoom: zoomMap } = useContext4(TimelineZoomCtx);
2945
- const { canvasContent } = useContext4(Internals3.CompositionManager);
2932
+ const timelineWidth = useContext3(TimelineWidthContext);
2933
+ const { zoom: zoomMap } = useContext3(TimelineZoomCtx);
2934
+ const { canvasContent } = useContext3(Internals3.CompositionManager);
2946
2935
  if (timelineWidth === null) {
2947
2936
  throw new Error("Unexpectedly did not have timeline width");
2948
2937
  }
2949
2938
  const zoomLevel = canvasContent?.type === "composition" ? zoomMap[canvasContent.compositionId] ?? TIMELINE_MIN_ZOOM : TIMELINE_MIN_ZOOM;
2950
- useLayoutEffect2(() => {
2939
+ useLayoutEffect(() => {
2951
2940
  const el = ref.current;
2952
2941
  const measuredWidth = sliderAreaRef.current?.clientWidth;
2953
2942
  if (!el || measuredWidth === undefined || measuredWidth === 0) {
@@ -3222,7 +3211,7 @@ var zoomAndPreserveCursor = ({
3222
3211
  };
3223
3212
 
3224
3213
  // src/components/ZoomPersistor.tsx
3225
- import { useContext as useContext5, useEffect as useEffect12 } from "react";
3214
+ import { useContext as useContext4, useEffect as useEffect12 } from "react";
3226
3215
  import { Internals as Internals4 } from "remotion";
3227
3216
 
3228
3217
  // src/components/load-canvas-content-from-url.ts
@@ -3264,8 +3253,8 @@ var getZoomFromLocalStorage = () => {
3264
3253
  };
3265
3254
  var ZoomPersistor = () => {
3266
3255
  const [playing] = Internals4.Timeline.usePlayingState();
3267
- const { zoom } = useContext5(TimelineZoomCtx);
3268
- const { canvasContent } = useContext5(Internals4.CompositionManager);
3256
+ const { zoom } = useContext4(TimelineZoomCtx);
3257
+ const { canvasContent } = useContext4(Internals4.CompositionManager);
3269
3258
  const urlState = deriveCanvasContentFromUrl();
3270
3259
  const isActive = urlState && urlState.type === "composition" && canvasContent && canvasContent.type === "composition" && urlState.compositionId === canvasContent.compositionId;
3271
3260
  useEffect12(() => {
@@ -3288,7 +3277,7 @@ var TimelineZoomCtx = createContext5({
3288
3277
  }
3289
3278
  });
3290
3279
  var TimelineZoomContext = ({ children }) => {
3291
- const [zoom, setZoomState] = useState11(() => getZoomFromLocalStorage());
3280
+ const [zoom, setZoomState] = useState10(() => getZoomFromLocalStorage());
3292
3281
  const setZoom = useCallback13((compositionId, callback, options) => {
3293
3282
  setZoomState((prevZoomMap) => {
3294
3283
  const newZoomWithFloatingPointErrors = Math.min(TIMELINE_MAX_ZOOM, Math.max(TIMELINE_MIN_ZOOM, callback(prevZoomMap[compositionId] ?? TIMELINE_MIN_ZOOM)));
@@ -3319,11 +3308,11 @@ var TimelineZoomContext = ({ children }) => {
3319
3308
  };
3320
3309
 
3321
3310
  // src/components/EditorContent.tsx
3322
- import { useContext as useContext81 } from "react";
3311
+ import { useContext as useContext80 } from "react";
3323
3312
  import { Internals as Internals58 } from "remotion";
3324
3313
 
3325
3314
  // src/helpers/is-current-selected-still.ts
3326
- import { useContext as useContext6 } from "react";
3315
+ import { useContext as useContext5 } from "react";
3327
3316
  import { Internals as Internals5 } from "remotion";
3328
3317
 
3329
3318
  // src/helpers/is-composition-still.ts
@@ -3344,7 +3333,7 @@ var useIsStill = () => {
3344
3333
  };
3345
3334
  var useIsVideoComposition = () => {
3346
3335
  const isStill = useIsStill();
3347
- const { canvasContent } = useContext6(Internals5.CompositionManager);
3336
+ const { canvasContent } = useContext5(Internals5.CompositionManager);
3348
3337
  if (canvasContent === null) {
3349
3338
  return false;
3350
3339
  }
@@ -3355,17 +3344,17 @@ var useIsVideoComposition = () => {
3355
3344
  };
3356
3345
 
3357
3346
  // src/components/InitialCompositionLoader.tsx
3358
- import { useCallback as useCallback33, useContext as useContext16, useEffect as useEffect23 } from "react";
3347
+ import { useCallback as useCallback33, useContext as useContext15, useEffect as useEffect23 } from "react";
3359
3348
  import { Internals as Internals14 } from "remotion";
3360
3349
 
3361
3350
  // src/helpers/mobile-layout.ts
3362
- import { useEffect as useEffect13, useRef as useRef6, useState as useState12 } from "react";
3351
+ import { useEffect as useEffect13, useRef as useRef6, useState as useState11 } from "react";
3363
3352
  var breakpoint = 900;
3364
3353
  function getIsMobile() {
3365
3354
  return window.innerWidth < breakpoint;
3366
3355
  }
3367
3356
  var useMobileLayout = () => {
3368
- const [isMobile, setIsMobile] = useState12(getIsMobile());
3357
+ const [isMobile, setIsMobile] = useState11(getIsMobile());
3369
3358
  const isMobileRef = useRef6(isMobile);
3370
3359
  useEffect13(() => {
3371
3360
  function handleResize() {
@@ -3383,7 +3372,7 @@ var useMobileLayout = () => {
3383
3372
  };
3384
3373
 
3385
3374
  // src/state/folders.tsx
3386
- import { createContext as createContext7, useMemo as useMemo13, useState as useState13 } from "react";
3375
+ import { createContext as createContext7, useMemo as useMemo13, useState as useState12 } from "react";
3387
3376
 
3388
3377
  // src/helpers/persist-open-folders.tsx
3389
3378
  import { createContext as createContext6 } from "react";
@@ -3423,8 +3412,8 @@ var FolderContext = createContext7({
3423
3412
  }
3424
3413
  });
3425
3414
  var FolderContextProvider = ({ children }) => {
3426
- const [compositionFoldersExpanded, setCompositionFoldersExpanded] = useState13(() => loadExpandedFolders("compositions"));
3427
- const [assetFoldersExpanded, setAssetFoldersExpanded] = useState13(() => loadExpandedFolders("assets"));
3415
+ const [compositionFoldersExpanded, setCompositionFoldersExpanded] = useState12(() => loadExpandedFolders("compositions"));
3416
+ const [assetFoldersExpanded, setAssetFoldersExpanded] = useState12(() => loadExpandedFolders("assets"));
3428
3417
  const value = useMemo13(() => {
3429
3418
  return {
3430
3419
  compositionFoldersExpanded,
@@ -3440,7 +3429,7 @@ var FolderContextProvider = ({ children }) => {
3440
3429
  };
3441
3430
 
3442
3431
  // src/state/sidebar.tsx
3443
- import { createContext as createContext8, useMemo as useMemo14, useState as useState14 } from "react";
3432
+ import { createContext as createContext8, useMemo as useMemo14, useState as useState13 } from "react";
3444
3433
  import { jsx as jsx32 } from "react/jsx-runtime";
3445
3434
  var storageKey = (sidebar) => {
3446
3435
  if (sidebar === "right") {
@@ -3483,7 +3472,7 @@ var SidebarContext = createContext8({
3483
3472
  });
3484
3473
  var SidebarContextProvider = ({ children }) => {
3485
3474
  const isMobileLayout = useMobileLayout();
3486
- const [sidebarCollapsedState, setSidebarCollapsedState] = useState14(() => ({
3475
+ const [sidebarCollapsedState, setSidebarCollapsedState] = useState13(() => ({
3487
3476
  left: getSavedCollapsedStateLeft(isMobileLayout),
3488
3477
  right: getSavedCollapsedStateRight(isMobileLayout)
3489
3478
  }));
@@ -3517,7 +3506,7 @@ var SidebarContextProvider = ({ children }) => {
3517
3506
  };
3518
3507
 
3519
3508
  // src/components/CompositionSelector.tsx
3520
- import { useCallback as useCallback26, useContext as useContext10, useMemo as useMemo26 } from "react";
3509
+ import { useCallback as useCallback26, useContext as useContext9, useMemo as useMemo26 } from "react";
3521
3510
  import { Internals as Internals9 } from "remotion";
3522
3511
 
3523
3512
  // src/helpers/create-folder-tree.ts
@@ -3713,11 +3702,11 @@ var ModalsContext = createContext9({
3713
3702
  // src/components/CompositionSelectorItem.tsx
3714
3703
  import {
3715
3704
  useCallback as useCallback25,
3716
- useContext as useContext9,
3717
- useLayoutEffect as useLayoutEffect3,
3705
+ useContext as useContext8,
3706
+ useLayoutEffect as useLayoutEffect2,
3718
3707
  useMemo as useMemo25,
3719
3708
  useRef as useRef13,
3720
- useState as useState22
3709
+ useState as useState21
3721
3710
  } from "react";
3722
3711
 
3723
3712
  // src/helpers/sidebar-scroll-into-view.ts
@@ -3863,7 +3852,7 @@ var FilmIcon = ({ color, ...props }) => {
3863
3852
  };
3864
3853
 
3865
3854
  // src/components/CompositionContextButton.tsx
3866
- import { useCallback as useCallback22, useContext as useContext7, useMemo as useMemo22 } from "react";
3855
+ import { useCallback as useCallback22, useContext as useContext6, useMemo as useMemo22 } from "react";
3867
3856
 
3868
3857
  // src/helpers/client-id.tsx
3869
3858
  import React28, { useCallback as useCallback16, useEffect as useEffect16, useMemo as useMemo16, useRef as useRef8 } from "react";
@@ -3874,7 +3863,7 @@ import {
3874
3863
  createRef as createRef4,
3875
3864
  useCallback as useCallback14,
3876
3865
  useImperativeHandle as useImperativeHandle3,
3877
- useState as useState15
3866
+ useState as useState14
3878
3867
  } from "react";
3879
3868
 
3880
3869
  // src/components/Notifications/Notification.tsx
@@ -3936,7 +3925,7 @@ var showNotification = (content, durationInMs) => {
3936
3925
  });
3937
3926
  };
3938
3927
  var NotificationCenter = () => {
3939
- const [notifications, setNotifications] = useState15([]);
3928
+ const [notifications, setNotifications] = useState14([]);
3940
3929
  const onRemove = useCallback14((id) => {
3941
3930
  setNotifications((not) => {
3942
3931
  return not.filter((n) => n.id !== id);
@@ -4008,7 +3997,7 @@ import React27, {
4008
3997
  useImperativeHandle as useImperativeHandle4,
4009
3998
  useMemo as useMemo15,
4010
3999
  useRef as useRef7,
4011
- useState as useState16
4000
+ useState as useState15
4012
4001
  } from "react";
4013
4002
 
4014
4003
  // src/components/RenderQueue/client-render-queue.ts
@@ -4078,9 +4067,9 @@ var RenderQueueContext = React27.createContext({
4078
4067
  });
4079
4068
  var renderJobsRef = createRef5();
4080
4069
  var RenderQueueContextProvider = ({ children }) => {
4081
- const [serverJobs, setServerJobs] = useState16(window.remotion_initialRenderQueue ?? []);
4082
- const [clientJobs, setClientJobs] = useState16(restorePersistedClientRenders);
4083
- const [currentlyProcessing, setCurrentlyProcessing] = useState16(null);
4070
+ const [serverJobs, setServerJobs] = useState15(window.remotion_initialRenderQueue ?? []);
4071
+ const [clientJobs, setClientJobs] = useState15(restorePersistedClientRenders);
4072
+ const [currentlyProcessing, setCurrentlyProcessing] = useState15(null);
4084
4073
  const processJobCallbackRef = useRef7(null);
4085
4074
  useEffect15(() => {
4086
4075
  if (currentlyProcessing) {
@@ -4365,11 +4354,11 @@ var EllipsisIcon = (props) => {
4365
4354
 
4366
4355
  // src/components/InlineDropdown.tsx
4367
4356
  import { PlayerInternals as PlayerInternals4 } from "@remotion/player";
4368
- import { useCallback as useCallback21, useMemo as useMemo21, useRef as useRef11, useState as useState20 } from "react";
4357
+ import { useCallback as useCallback21, useMemo as useMemo21, useRef as useRef11, useState as useState19 } from "react";
4369
4358
  import ReactDOM3 from "react-dom";
4370
4359
 
4371
4360
  // src/components/InlineAction.tsx
4372
- import { useCallback as useCallback17, useMemo as useMemo17, useState as useState17 } from "react";
4361
+ import { useCallback as useCallback17, useMemo as useMemo17, useState as useState16 } from "react";
4373
4362
  import { jsx as jsx41 } from "react/jsx-runtime";
4374
4363
  var InlineAction = ({
4375
4364
  renderAction,
@@ -4378,7 +4367,7 @@ var InlineAction = ({
4378
4367
  title: title2
4379
4368
  }) => {
4380
4369
  const { tabIndex } = useZIndex();
4381
- const [hovered, setHovered] = useState17(false);
4370
+ const [hovered, setHovered] = useState16(false);
4382
4371
  const onPointerEnter = useCallback17(() => {
4383
4372
  setHovered(true);
4384
4373
  }, []);
@@ -4424,7 +4413,7 @@ var getPortal = (i) => {
4424
4413
  };
4425
4414
 
4426
4415
  // src/components/NewComposition/MenuContent.tsx
4427
- import { useCallback as useCallback20, useEffect as useEffect18, useMemo as useMemo20, useRef as useRef10, useState as useState19 } from "react";
4416
+ import { useCallback as useCallback20, useEffect as useEffect18, useMemo as useMemo20, useRef as useRef10, useState as useState18 } from "react";
4428
4417
 
4429
4418
  // src/components/Menu/MenuDivider.tsx
4430
4419
  import { jsx as jsx42 } from "react/jsx-runtime";
@@ -4442,7 +4431,7 @@ var MenuDivider = () => {
4442
4431
 
4443
4432
  // src/components/Menu/MenuSubItem.tsx
4444
4433
  import { PlayerInternals as PlayerInternals3 } from "@remotion/player";
4445
- import { useCallback as useCallback19, useEffect as useEffect17, useMemo as useMemo19, useRef as useRef9, useState as useState18 } from "react";
4434
+ import { useCallback as useCallback19, useEffect as useEffect17, useMemo as useMemo19, useRef as useRef9, useState as useState17 } from "react";
4446
4435
  import ReactDOM2 from "react-dom";
4447
4436
 
4448
4437
  // src/icons/caret.tsx
@@ -4574,7 +4563,7 @@ var MenuSubItem = ({
4574
4563
  setSubMenuActivated,
4575
4564
  disabled
4576
4565
  }) => {
4577
- const [hovered, setHovered] = useState18(false);
4566
+ const [hovered, setHovered] = useState17(false);
4578
4567
  const ref = useRef9(null);
4579
4568
  const size2 = PlayerInternals3.useElementSize(ref, {
4580
4569
  triggerOnWindowResize: true,
@@ -4743,13 +4732,13 @@ var MenuContent = ({
4743
4732
  const keybindings = useKeybinding();
4744
4733
  const containerRef = useRef10(null);
4745
4734
  const isMobileLayout = useMobileLayout();
4746
- const [subMenuActivated, setSubMenuActivated] = useState19(false);
4735
+ const [subMenuActivated, setSubMenuActivated] = useState18(false);
4747
4736
  const typeaheadQueryRef = useRef10("");
4748
4737
  const typeaheadTimeoutRef = useRef10(null);
4749
4738
  if (values[0].type === "divider") {
4750
4739
  throw new Error("first value cant be divide");
4751
4740
  }
4752
- const [selectedItem, setSelectedItem] = useState19(typeof preselectIndex === "number" && preselectIndex >= 0 ? values[preselectIndex].id : null);
4741
+ const [selectedItem, setSelectedItem] = useState18(typeof preselectIndex === "number" && preselectIndex >= 0 ? values[preselectIndex].id : null);
4753
4742
  const onEscape = useCallback20(() => {
4754
4743
  onHide();
4755
4744
  }, [onHide]);
@@ -5047,7 +5036,7 @@ var InlineDropdown = ({
5047
5036
  ...props
5048
5037
  }) => {
5049
5038
  const ref = useRef11(null);
5050
- const [opened, setOpened] = useState20({ type: "not-open" });
5039
+ const [opened, setOpened] = useState19({ type: "not-open" });
5051
5040
  const { currentZIndex } = useZIndex();
5052
5041
  const size2 = PlayerInternals4.useElementSize(ref, {
5053
5042
  triggerOnWindowResize: true,
@@ -5149,7 +5138,7 @@ var CompositionContextButton = ({ visible, values }) => {
5149
5138
  }
5150
5139
  };
5151
5140
  }, []);
5152
- const connectionStatus = useContext7(StudioServerConnectionCtx).previewServerState.type;
5141
+ const connectionStatus = useContext6(StudioServerConnectionCtx).previewServerState.type;
5153
5142
  const renderAction = useCallback22((color) => {
5154
5143
  return /* @__PURE__ */ jsx48(EllipsisIcon, {
5155
5144
  fill: color,
@@ -5167,12 +5156,12 @@ var CompositionContextButton = ({ visible, values }) => {
5167
5156
 
5168
5157
  // src/components/ContextMenu.tsx
5169
5158
  import { PlayerInternals as PlayerInternals5 } from "@remotion/player";
5170
- import { useCallback as useCallback23, useEffect as useEffect19, useMemo as useMemo23, useRef as useRef12, useState as useState21 } from "react";
5159
+ import { useCallback as useCallback23, useEffect as useEffect19, useMemo as useMemo23, useRef as useRef12, useState as useState20 } from "react";
5171
5160
  import ReactDOM4 from "react-dom";
5172
5161
  import { jsx as jsx49, jsxs as jsxs21, Fragment as Fragment5 } from "react/jsx-runtime";
5173
5162
  var ContextMenu = ({ children, values }) => {
5174
5163
  const ref = useRef12(null);
5175
- const [opened, setOpened] = useState21({ type: "not-open" });
5164
+ const [opened, setOpened] = useState20({ type: "not-open" });
5176
5165
  const { currentZIndex } = useZIndex();
5177
5166
  const style3 = useMemo23(() => {
5178
5167
  return {};
@@ -5278,7 +5267,7 @@ var ContextMenu = ({ children, values }) => {
5278
5267
  };
5279
5268
 
5280
5269
  // src/components/SidebarRenderButton.tsx
5281
- import { useCallback as useCallback24, useContext as useContext8, useMemo as useMemo24 } from "react";
5270
+ import { useCallback as useCallback24, useContext as useContext7, useMemo as useMemo24 } from "react";
5282
5271
  import { Internals as Internals7 } from "remotion";
5283
5272
 
5284
5273
  // src/icons/render.tsx
@@ -5298,8 +5287,8 @@ var ThinRenderIcon = (props) => {
5298
5287
  // src/components/SidebarRenderButton.tsx
5299
5288
  import { jsx as jsx51 } from "react/jsx-runtime";
5300
5289
  var SidebarRenderButton = ({ composition, visible }) => {
5301
- const { setSelectedModal } = useContext8(ModalsContext);
5302
- const { setSidebarCollapsedState } = useContext8(SidebarContext);
5290
+ const { setSelectedModal } = useContext7(ModalsContext);
5291
+ const { setSidebarCollapsedState } = useContext7(SidebarContext);
5303
5292
  const isMobileLayout = useMobileLayout();
5304
5293
  const iconStyle = useMemo24(() => {
5305
5294
  return {
@@ -5308,8 +5297,8 @@ var SidebarRenderButton = ({ composition, visible }) => {
5308
5297
  }
5309
5298
  };
5310
5299
  }, []);
5311
- const connectionStatus = useContext8(StudioServerConnectionCtx).previewServerState.type;
5312
- const { props } = useContext8(Internals7.EditorPropsContext);
5300
+ const connectionStatus = useContext7(StudioServerConnectionCtx).previewServerState.type;
5301
+ const { props } = useContext7(Internals7.EditorPropsContext);
5313
5302
  const onClick = useCallback24((e) => {
5314
5303
  const defaults = window.remotion_renderDefaults;
5315
5304
  if (!defaults) {
@@ -5443,7 +5432,7 @@ var CompositionSelectorItem = ({
5443
5432
  }
5444
5433
  return false;
5445
5434
  }, [item, currentComposition]);
5446
- const [hovered, setHovered] = useState22(false);
5435
+ const [hovered, setHovered] = useState21(false);
5447
5436
  const onPointerEnter = useCallback25(() => {
5448
5437
  setHovered(true);
5449
5438
  }, []);
@@ -5452,7 +5441,7 @@ var CompositionSelectorItem = ({
5452
5441
  }, []);
5453
5442
  const compositionRowRef = useRef13(null);
5454
5443
  const compositionId = item.type === "composition" ? item.composition.id : null;
5455
- useLayoutEffect3(() => {
5444
+ useLayoutEffect2(() => {
5456
5445
  if (compositionId === null) {
5457
5446
  return;
5458
5447
  }
@@ -5489,7 +5478,7 @@ var CompositionSelectorItem = ({
5489
5478
  onClick(evt);
5490
5479
  }
5491
5480
  }, [onClick]);
5492
- const { setSelectedModal } = useContext9(ModalsContext);
5481
+ const { setSelectedModal } = useContext8(ModalsContext);
5493
5482
  const contextMenu = useMemo25(() => {
5494
5483
  if (item.type === "composition") {
5495
5484
  return [
@@ -5747,7 +5736,7 @@ var CurrentComposition = () => {
5747
5736
  // src/components/CompositionSelector.tsx
5748
5737
  import { jsx as jsx54, jsxs as jsxs24 } from "react/jsx-runtime";
5749
5738
  var useCompositionNavigation = () => {
5750
- const { compositions, canvasContent } = useContext10(Internals9.CompositionManager);
5739
+ const { compositions, canvasContent } = useContext9(Internals9.CompositionManager);
5751
5740
  const selectComposition = useSelectComposition();
5752
5741
  const navigateToNextComposition = useCallback26(() => {
5753
5742
  if (!canvasContent || canvasContent.type !== "composition" || compositions.length <= 1) {
@@ -5820,9 +5809,9 @@ var getKeysToExpand = (initialFolderName, parentFolderName, initial = []) => {
5820
5809
  return getKeysToExpand(name, parent, initial);
5821
5810
  };
5822
5811
  var CompositionSelector = () => {
5823
- const { compositions, canvasContent, folders } = useContext10(Internals9.CompositionManager);
5824
- const { foldersExpanded } = useContext10(ExpandedFoldersContext);
5825
- const { setSelectedModal } = useContext10(ModalsContext);
5812
+ const { compositions, canvasContent, folders } = useContext9(Internals9.CompositionManager);
5813
+ const { foldersExpanded } = useContext9(ExpandedFoldersContext);
5814
+ const { setSelectedModal } = useContext9(ModalsContext);
5826
5815
  const { tabIndex } = useZIndex();
5827
5816
  const selectComposition = useSelectComposition();
5828
5817
  const sortedCompositions = useMemo26(() => {
@@ -5892,10 +5881,10 @@ var CompositionSelector = () => {
5892
5881
  };
5893
5882
 
5894
5883
  // src/components/ExplorerPanel.tsx
5895
- import { createRef as createRef6, useCallback as useCallback32, useImperativeHandle as useImperativeHandle6, useState as useState29 } from "react";
5884
+ import { createRef as createRef6, useCallback as useCallback32, useImperativeHandle as useImperativeHandle6, useState as useState28 } from "react";
5896
5885
 
5897
5886
  // src/components/AssetSelector.tsx
5898
- import { useCallback as useCallback29, useContext as useContext14, useMemo as useMemo30, useState as useState26 } from "react";
5887
+ import { useCallback as useCallback29, useContext as useContext13, useMemo as useMemo30, useState as useState25 } from "react";
5899
5888
  import { Internals as Internals12 } from "remotion";
5900
5889
 
5901
5890
  // src/api/write-static-file.ts
@@ -5967,11 +5956,11 @@ var use_asset_drag_events_default = useAssetDragEvents;
5967
5956
  // src/components/AssetSelectorItem.tsx
5968
5957
  import React39, {
5969
5958
  useCallback as useCallback28,
5970
- useContext as useContext11,
5971
- useLayoutEffect as useLayoutEffect4,
5959
+ useContext as useContext10,
5960
+ useLayoutEffect as useLayoutEffect3,
5972
5961
  useMemo as useMemo28,
5973
5962
  useRef as useRef15,
5974
- useState as useState23
5963
+ useState as useState22
5975
5964
  } from "react";
5976
5965
  import { Internals as Internals10 } from "remotion";
5977
5966
  import { NoReactInternals as NoReactInternals3 } from "remotion/no-react";
@@ -6357,7 +6346,7 @@ var AssetFolderItem = ({
6357
6346
  setDropLocation,
6358
6347
  readOnlyStudio
6359
6348
  }) => {
6360
- const [hovered, setHovered] = useState23(false);
6349
+ const [hovered, setHovered] = useState22(false);
6361
6350
  const openFolderTimerRef = useRef15(null);
6362
6351
  const { isDropDiv, onDragEnter, onDragLeave } = use_asset_drag_events_default({
6363
6352
  name: item.name,
@@ -6486,13 +6475,13 @@ var AssetFolderTree = ({
6486
6475
  };
6487
6476
  var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }) => {
6488
6477
  const isMobileLayout = useMobileLayout();
6489
- const [hovered, setHovered] = useState23(false);
6490
- const { setSidebarCollapsedState } = useContext11(SidebarContext);
6478
+ const [hovered, setHovered] = useState22(false);
6479
+ const { setSidebarCollapsedState } = useContext10(SidebarContext);
6491
6480
  const onPointerEnter = useCallback28(() => {
6492
6481
  setHovered(true);
6493
6482
  }, []);
6494
- const { setCanvasContent } = useContext11(Internals10.CompositionSetters);
6495
- const { canvasContent } = useContext11(Internals10.CompositionManager);
6483
+ const { setCanvasContent } = useContext10(Internals10.CompositionSetters);
6484
+ const { canvasContent } = useContext10(Internals10.CompositionManager);
6496
6485
  const relativePath = useMemo28(() => {
6497
6486
  return parentFolder ? parentFolder + "/" + item.name : item.name;
6498
6487
  }, [parentFolder, item.name]);
@@ -6506,7 +6495,7 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
6506
6495
  setHovered(false);
6507
6496
  }, []);
6508
6497
  const rowRef = useRef15(null);
6509
- useLayoutEffect4(() => {
6498
+ useLayoutEffect3(() => {
6510
6499
  maybeScrollAssetSidebarRowIntoView({
6511
6500
  element: rowRef.current,
6512
6501
  assetPath: relativePath,
@@ -6623,11 +6612,11 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
6623
6612
  // src/components/CurrentAsset.tsx
6624
6613
  import { formatBytes } from "@remotion/studio-shared";
6625
6614
  import { ALL_FORMATS, Input, UrlSource } from "mediabunny";
6626
- import { useContext as useContext13, useEffect as useEffect22, useMemo as useMemo29, useState as useState25 } from "react";
6615
+ import { useContext as useContext12, useEffect as useEffect22, useMemo as useMemo29, useState as useState24 } from "react";
6627
6616
  import { Internals as Internals11, staticFile } from "remotion";
6628
6617
 
6629
6618
  // src/components/use-static-files.ts
6630
- import React40, { createContext as createContext10, useContext as useContext12, useEffect as useEffect21, useState as useState24 } from "react";
6619
+ import React40, { createContext as createContext10, useContext as useContext11, useEffect as useEffect21, useState as useState23 } from "react";
6631
6620
  import { useRemotionEnvironment } from "remotion";
6632
6621
 
6633
6622
  // src/api/get-static-files.ts
@@ -6685,7 +6674,7 @@ var watchPublicFolder = (callback) => {
6685
6674
  // src/components/use-static-files.ts
6686
6675
  var StaticFilesContext = createContext10([]);
6687
6676
  var StaticFilesProvider = ({ children }) => {
6688
- const [files, setFiles] = useState24(() => getStaticFiles());
6677
+ const [files, setFiles] = useState23(() => getStaticFiles());
6689
6678
  const env = useRemotionEnvironment();
6690
6679
  useEffect21(() => {
6691
6680
  if (!env.isStudio) {
@@ -6702,7 +6691,7 @@ var StaticFilesProvider = ({ children }) => {
6702
6691
  return React40.createElement(StaticFilesContext.Provider, { value: files }, children);
6703
6692
  };
6704
6693
  var useStaticFiles = () => {
6705
- return useContext12(StaticFilesContext);
6694
+ return useContext11(StaticFilesContext);
6706
6695
  };
6707
6696
 
6708
6697
  // src/components/CurrentAsset.tsx
@@ -6747,7 +6736,7 @@ var formatDuration = (seconds) => {
6747
6736
  return `${String(m).padStart(2, "0")}:${sFixed}`;
6748
6737
  };
6749
6738
  var CurrentAsset = () => {
6750
- const { canvasContent } = useContext13(Internals11.CompositionManager);
6739
+ const { canvasContent } = useContext12(Internals11.CompositionManager);
6751
6740
  const assetName = canvasContent?.type === "asset" ? canvasContent.asset : null;
6752
6741
  const staticFiles = useStaticFiles();
6753
6742
  const sizeInBytes = useMemo29(() => {
@@ -6757,7 +6746,7 @@ var CurrentAsset = () => {
6757
6746
  const file = staticFiles.find((f) => f.name === assetName);
6758
6747
  return file?.sizeInBytes ?? null;
6759
6748
  }, [assetName, staticFiles]);
6760
- const [mediaMetadata, setMediaMetadata] = useState25(null);
6749
+ const [mediaMetadata, setMediaMetadata] = useState24(null);
6761
6750
  useEffect22(() => {
6762
6751
  setMediaMetadata(null);
6763
6752
  if (!assetName) {
@@ -6851,10 +6840,10 @@ var baseList = {
6851
6840
  };
6852
6841
  var AssetSelector = ({ readOnlyStudio }) => {
6853
6842
  const { tabIndex } = useZIndex();
6854
- const { canvasContent } = useContext14(Internals12.CompositionManager);
6855
- const { assetFoldersExpanded, setAssetFoldersExpanded } = useContext14(FolderContext);
6856
- const [dropLocation, setDropLocation] = useState26(null);
6857
- const connectionStatus = useContext14(StudioServerConnectionCtx).previewServerState.type;
6843
+ const { canvasContent } = useContext13(Internals12.CompositionManager);
6844
+ const { assetFoldersExpanded, setAssetFoldersExpanded } = useContext13(FolderContext);
6845
+ const [dropLocation, setDropLocation] = useState25(null);
6846
+ const connectionStatus = useContext13(StudioServerConnectionCtx).previewServerState.type;
6858
6847
  const shouldAllowUpload = connectionStatus === "connected" && !readOnlyStudio;
6859
6848
  const showCurrentAsset = canvasContent?.type === "asset";
6860
6849
  const list = useMemo30(() => {
@@ -6977,16 +6966,16 @@ var AssetSelector = ({ readOnlyStudio }) => {
6977
6966
  // src/components/CompSelectorRef.tsx
6978
6967
  import {
6979
6968
  useCallback as useCallback30,
6980
- useContext as useContext15,
6969
+ useContext as useContext14,
6981
6970
  useImperativeHandle as useImperativeHandle5,
6982
6971
  useMemo as useMemo31,
6983
- useState as useState27
6972
+ useState as useState26
6984
6973
  } from "react";
6985
6974
  import { Internals as Internals13 } from "remotion";
6986
6975
  import { jsx as jsx60 } from "react/jsx-runtime";
6987
6976
  var CompSelectorRef = ({ children }) => {
6988
- const { compositions } = useContext15(Internals13.CompositionManager);
6989
- const [foldersExpanded, setFoldersExpanded] = useState27(loadExpandedFolders("compositions"));
6977
+ const { compositions } = useContext14(Internals13.CompositionManager);
6978
+ const [foldersExpanded, setFoldersExpanded] = useState26(loadExpandedFolders("compositions"));
6990
6979
  const selectComposition = useSelectComposition();
6991
6980
  const toggleFolder = useCallback30((folderName, parentName) => {
6992
6981
  setFoldersExpanded((p) => {
@@ -7059,7 +7048,7 @@ var CompSelectorRef = ({ children }) => {
7059
7048
  };
7060
7049
 
7061
7050
  // src/components/Tabs/index.tsx
7062
- import { useCallback as useCallback31, useMemo as useMemo32, useState as useState28 } from "react";
7051
+ import { useCallback as useCallback31, useMemo as useMemo32, useState as useState27 } from "react";
7063
7052
  import { jsx as jsx61 } from "react/jsx-runtime";
7064
7053
  var tabsContainer = {
7065
7054
  display: "flex",
@@ -7093,7 +7082,7 @@ var selectorButton = {
7093
7082
  WebkitUserSelect: "none"
7094
7083
  };
7095
7084
  var Tab = ({ children, onClick, style: style3, selected }) => {
7096
- const [hovered, setHovered] = useState28(false);
7085
+ const [hovered, setHovered] = useState27(false);
7097
7086
  const { tabIndex } = useZIndex();
7098
7087
  const onPointerEnter = useCallback31(() => {
7099
7088
  setHovered(true);
@@ -7146,7 +7135,7 @@ var persistSelectedOptionsSidebarPanel = (panel) => {
7146
7135
  };
7147
7136
  var explorerSidebarTabs = createRef6();
7148
7137
  var ExplorerPanel = ({ readOnlyStudio }) => {
7149
- const [panel, setPanel] = useState29(() => getSelectedPanel());
7138
+ const [panel, setPanel] = useState28(() => getSelectedPanel());
7150
7139
  const onCompositionsSelected = useCallback32(() => {
7151
7140
  setPanel("compositions");
7152
7141
  persistSelectedOptionsSidebarPanel("compositions");
@@ -7199,8 +7188,8 @@ var ExplorerPanel = ({ readOnlyStudio }) => {
7199
7188
 
7200
7189
  // src/components/InitialCompositionLoader.tsx
7201
7190
  var useSelectAsset = () => {
7202
- const { setCanvasContent } = useContext16(Internals14.CompositionSetters);
7203
- const { setAssetFoldersExpanded } = useContext16(FolderContext);
7191
+ const { setCanvasContent } = useContext15(Internals14.CompositionSetters);
7192
+ const { setAssetFoldersExpanded } = useContext15(FolderContext);
7204
7193
  return useCallback33((asset) => {
7205
7194
  setCanvasContent({ type: "asset", asset });
7206
7195
  explorerSidebarTabs.current?.selectAssetsPanel();
@@ -7220,10 +7209,10 @@ var useSelectAsset = () => {
7220
7209
  }, [setAssetFoldersExpanded, setCanvasContent]);
7221
7210
  };
7222
7211
  var useSelectComposition = () => {
7223
- const { setCompositionFoldersExpanded } = useContext16(FolderContext);
7224
- const { setCanvasContent } = useContext16(Internals14.CompositionSetters);
7212
+ const { setCompositionFoldersExpanded } = useContext15(FolderContext);
7213
+ const { setCanvasContent } = useContext15(Internals14.CompositionSetters);
7225
7214
  const isMobileLayout = useMobileLayout();
7226
- const { setSidebarCollapsedState } = useContext16(SidebarContext);
7215
+ const { setSidebarCollapsedState } = useContext15(SidebarContext);
7227
7216
  return useCallback33((c, push) => {
7228
7217
  if (push) {
7229
7218
  pushUrl(`/${c.id}`);
@@ -7254,8 +7243,8 @@ var useSelectComposition = () => {
7254
7243
  ]);
7255
7244
  };
7256
7245
  var InitialCompositionLoader = () => {
7257
- const { compositions, canvasContent } = useContext16(Internals14.CompositionManager);
7258
- const { setCanvasContent } = useContext16(Internals14.CompositionSetters);
7246
+ const { compositions, canvasContent } = useContext15(Internals14.CompositionManager);
7247
+ const { setCanvasContent } = useContext15(Internals14.CompositionSetters);
7259
7248
  const selectComposition = useSelectComposition();
7260
7249
  const selectAsset = useSelectAsset();
7261
7250
  const staticFiles = useStaticFiles();
@@ -7330,10 +7319,10 @@ var InitialCompositionLoader = () => {
7330
7319
  };
7331
7320
 
7332
7321
  // src/components/MenuToolbar.tsx
7333
- import { useCallback as useCallback100, useMemo as useMemo105, useState as useState71 } from "react";
7322
+ import { useCallback as useCallback100, useMemo as useMemo105, useState as useState70 } from "react";
7334
7323
 
7335
7324
  // src/helpers/use-menu-structure.tsx
7336
- import { useContext as useContext23, useMemo as useMemo42 } from "react";
7325
+ import { useContext as useContext22, useMemo as useMemo42 } from "react";
7337
7326
  import { Internals as Internals19 } from "remotion";
7338
7327
  import { NoReactInternals as NoReactInternals5 } from "remotion/no-react";
7339
7328
 
@@ -7356,7 +7345,7 @@ import {
7356
7345
  useEffect as useEffect24,
7357
7346
  useImperativeHandle as useImperativeHandle7,
7358
7347
  useRef as useRef16,
7359
- useState as useState30
7348
+ useState as useState29
7360
7349
  } from "react";
7361
7350
  import { AbsoluteFill as AbsoluteFill3 } from "remotion";
7362
7351
 
@@ -7403,7 +7392,7 @@ var ModalContainer = ({ children, onEscape, onOutsideClick, noZIndex }) => {
7403
7392
  };
7404
7393
 
7405
7394
  // src/components/ModalHeader.tsx
7406
- import { useCallback as useCallback34, useContext as useContext17 } from "react";
7395
+ import { useCallback as useCallback34, useContext as useContext16 } from "react";
7407
7396
 
7408
7397
  // src/components/NewComposition/CancelButton.tsx
7409
7398
  import { jsx as jsx64 } from "react/jsx-runtime";
@@ -7454,7 +7443,7 @@ var icon = {
7454
7443
  width: 20
7455
7444
  };
7456
7445
  var ModalHeader = ({ title: title4, onClose }) => {
7457
- const { setSelectedModal } = useContext17(ModalsContext);
7446
+ const { setSelectedModal } = useContext16(ModalsContext);
7458
7447
  const onPress = useCallback34(() => {
7459
7448
  setSelectedModal(null);
7460
7449
  }, [setSelectedModal]);
@@ -7485,7 +7474,7 @@ var container18 = {
7485
7474
  };
7486
7475
  var askAiModalRef = createRef7();
7487
7476
  var AskAiModal = () => {
7488
- const [state, setState] = useState30("never-opened");
7477
+ const [state, setState] = useState29("never-opened");
7489
7478
  const iframe = useRef16(null);
7490
7479
  useImperativeHandle7(askAiModalRef, () => ({
7491
7480
  toggle: () => {
@@ -7552,7 +7541,7 @@ var AskAiModal = () => {
7552
7541
  };
7553
7542
 
7554
7543
  // src/components/SizeSelector.tsx
7555
- import { useContext as useContext21, useMemo as useMemo39 } from "react";
7544
+ import { useContext as useContext20, useMemo as useMemo39 } from "react";
7556
7545
  import { Internals as Internals16 } from "remotion";
7557
7546
 
7558
7547
  // src/icons/Checkmark.tsx
@@ -7597,7 +7586,7 @@ var ControlButton = (props) => {
7597
7586
 
7598
7587
  // src/components/NewComposition/ComboBox.tsx
7599
7588
  import { PlayerInternals as PlayerInternals6 } from "@remotion/player";
7600
- import { useCallback as useCallback36, useEffect as useEffect25, useMemo as useMemo34, useRef as useRef17, useState as useState31 } from "react";
7589
+ import { useCallback as useCallback36, useEffect as useEffect25, useMemo as useMemo34, useRef as useRef17, useState as useState30 } from "react";
7601
7590
  import ReactDOM5 from "react-dom";
7602
7591
  import { jsx as jsx69, jsxs as jsxs31, Fragment as Fragment8 } from "react/jsx-runtime";
7603
7592
  var container19 = {
@@ -7616,8 +7605,8 @@ var label3 = {
7616
7605
  textAlign: "left"
7617
7606
  };
7618
7607
  var Combobox = ({ values, selectedId, style: customStyle, title: title4 }) => {
7619
- const [hovered, setIsHovered] = useState31(false);
7620
- const [opened, setOpened] = useState31(false);
7608
+ const [hovered, setIsHovered] = useState30(false);
7609
+ const [opened, setOpened] = useState30(false);
7621
7610
  const ref = useRef17(null);
7622
7611
  const { tabIndex, currentZIndex } = useZIndex();
7623
7612
  const size2 = PlayerInternals6.useElementSize(ref, {
@@ -7784,7 +7773,7 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title4 }) => {
7784
7773
 
7785
7774
  // src/components/Preview.tsx
7786
7775
  import { PlayerInternals as PlayerInternals7 } from "@remotion/player";
7787
- import { useContext as useContext20, useEffect as useEffect31, useMemo as useMemo38, useRef as useRef20 } from "react";
7776
+ import { useContext as useContext19, useEffect as useEffect31, useMemo as useMemo38, useRef as useRef20 } from "react";
7788
7777
  import { Internals as Internals15 } from "remotion";
7789
7778
 
7790
7779
  // src/helpers/checkerboard-background.ts
@@ -7829,7 +7818,7 @@ var CheckerboardContext = createContext11({
7829
7818
  });
7830
7819
 
7831
7820
  // src/components/RenderPreview.tsx
7832
- import { useContext as useContext18, useEffect as useEffect30, useState as useState36 } from "react";
7821
+ import { useContext as useContext17, useEffect as useEffect30, useState as useState35 } from "react";
7833
7822
 
7834
7823
  // src/helpers/get-asset-metadata.ts
7835
7824
  import { getVideoMetadata } from "@remotion/media-utils";
@@ -7916,7 +7905,7 @@ var getAssetMetadata = async (canvasContent, addTime) => {
7916
7905
  import { formatBytes as formatBytes2 } from "@remotion/studio-shared";
7917
7906
 
7918
7907
  // src/components/JSONViewer.tsx
7919
- import { useEffect as useEffect28, useState as useState34 } from "react";
7908
+ import { useEffect as useEffect28, useState as useState33 } from "react";
7920
7909
 
7921
7910
  // src/components/NewComposition/RemTextarea.tsx
7922
7911
  import {
@@ -7925,7 +7914,7 @@ import {
7925
7914
  useImperativeHandle as useImperativeHandle9,
7926
7915
  useMemo as useMemo36,
7927
7916
  useRef as useRef19,
7928
- useState as useState33
7917
+ useState as useState32
7929
7918
  } from "react";
7930
7919
 
7931
7920
  // src/components/NewComposition/RemInput.tsx
@@ -7935,7 +7924,7 @@ import {
7935
7924
  useImperativeHandle as useImperativeHandle8,
7936
7925
  useMemo as useMemo35,
7937
7926
  useRef as useRef18,
7938
- useState as useState32
7927
+ useState as useState31
7939
7928
  } from "react";
7940
7929
  import { jsx as jsx70 } from "react/jsx-runtime";
7941
7930
  var INPUT_HORIZONTAL_PADDING = 8;
@@ -7961,8 +7950,8 @@ var getInputBorderColor = ({
7961
7950
  isHovered
7962
7951
  }) => status === "warning" ? WARNING_COLOR : status === "error" ? FAIL_COLOR : isFocused ? SELECTED_BACKGROUND : isHovered ? INPUT_BORDER_COLOR_HOVERED : INPUT_BORDER_COLOR_UNHOVERED;
7963
7952
  var RemInputForwardRef = ({ status, rightAlign, ...props }, ref) => {
7964
- const [isFocused, setIsFocused] = useState32(false);
7965
- const [isHovered, setIsHovered] = useState32(false);
7953
+ const [isFocused, setIsFocused] = useState31(false);
7954
+ const [isHovered, setIsHovered] = useState31(false);
7966
7955
  const inputRef = useRef18(null);
7967
7956
  const { tabIndex } = useZIndex();
7968
7957
  const style5 = useMemo35(() => {
@@ -8019,8 +8008,8 @@ var inputBaseStyle2 = {
8019
8008
  overflowX: "hidden"
8020
8009
  };
8021
8010
  var RemTextareaFRFunction = ({ status, ...props }, ref) => {
8022
- const [isFocused, setIsFocused] = useState33(false);
8023
- const [isHovered, setIsHovered] = useState33(false);
8011
+ const [isFocused, setIsFocused] = useState32(false);
8012
+ const [isHovered, setIsHovered] = useState32(false);
8024
8013
  const inputRef = useRef19(null);
8025
8014
  const { tabIndex } = useZIndex();
8026
8015
  useImperativeHandle9(ref, () => {
@@ -8112,7 +8101,7 @@ var jsonStyle = {
8112
8101
  flex: 1
8113
8102
  };
8114
8103
  var JSONViewer = ({ src }) => {
8115
- const [json, setJson] = useState34(null);
8104
+ const [json, setJson] = useState33(null);
8116
8105
  useEffect28(() => {
8117
8106
  fetch(src).then((res) => res.json()).then((jsonRes) => {
8118
8107
  setJson(JSON.stringify(jsonRes, null, 2));
@@ -8129,7 +8118,7 @@ var JSONViewer = ({ src }) => {
8129
8118
  };
8130
8119
 
8131
8120
  // src/components/TextViewer.tsx
8132
- import { useEffect as useEffect29, useState as useState35 } from "react";
8121
+ import { useEffect as useEffect29, useState as useState34 } from "react";
8133
8122
  import { jsxs as jsxs32 } from "react/jsx-runtime";
8134
8123
  var textStyle = {
8135
8124
  margin: 14,
@@ -8139,7 +8128,7 @@ var textStyle = {
8139
8128
  whiteSpace: "pre-wrap"
8140
8129
  };
8141
8130
  var TextViewer = ({ src }) => {
8142
- const [txt, setTxt] = useState35("");
8131
+ const [txt, setTxt] = useState34("");
8143
8132
  useEffect29(() => {
8144
8133
  fetch(src).then(async (res) => {
8145
8134
  if (!res.ok || !res.body) {
@@ -8240,9 +8229,9 @@ var errMsgStyle = {
8240
8229
  };
8241
8230
  var RenderPreview = ({ path, assetMetadata, getBlob }) => {
8242
8231
  const fileType = getPreviewFileType(path);
8243
- const connectionStatus = useContext18(StudioServerConnectionCtx).previewServerState.type;
8244
- const [blobUrl, setBlobUrl] = useState36(null);
8245
- const [blobError, setBlobError] = useState36(null);
8232
+ const connectionStatus = useContext17(StudioServerConnectionCtx).previewServerState.type;
8233
+ const [blobUrl, setBlobUrl] = useState35(null);
8234
+ const [blobError, setBlobError] = useState35(null);
8246
8235
  useEffect30(() => {
8247
8236
  if (!getBlob) {
8248
8237
  setBlobUrl(null);
@@ -8358,7 +8347,7 @@ var Spinner = ({ size: size2, duration }) => {
8358
8347
  };
8359
8348
 
8360
8349
  // src/components/StaticFilePreview.tsx
8361
- import { useContext as useContext19 } from "react";
8350
+ import { useContext as useContext18 } from "react";
8362
8351
  import { staticFile as staticFile3 } from "remotion";
8363
8352
  import { jsx as jsx76, jsxs as jsxs36 } from "react/jsx-runtime";
8364
8353
  var msgStyle3 = {
@@ -8376,7 +8365,7 @@ var StaticFilePreview = ({ currentAsset, assetMetadata }) => {
8376
8365
  const fileType = getPreviewFileType(currentAsset);
8377
8366
  const staticFileSrc = staticFile3(currentAsset);
8378
8367
  const staticFiles = useStaticFiles();
8379
- const connectionStatus = useContext19(StudioServerConnectionCtx).previewServerState.type;
8368
+ const connectionStatus = useContext18(StudioServerConnectionCtx).previewServerState.type;
8380
8369
  const exists = staticFiles.find((file) => file.name === currentAsset);
8381
8370
  if (connectionStatus === "disconnected") {
8382
8371
  return /* @__PURE__ */ jsx76("div", {
@@ -8515,7 +8504,7 @@ var VideoPreview = ({
8515
8504
  });
8516
8505
  };
8517
8506
  var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, assetMetadata }) => {
8518
- const { size: previewSize } = useContext20(Internals15.PreviewSizeContext);
8507
+ const { size: previewSize } = useContext19(Internals15.PreviewSizeContext);
8519
8508
  const { centerX, centerY, yCorrection, xCorrection, scale } = useMemo38(() => {
8520
8509
  if (contentDimensions === "none") {
8521
8510
  return {
@@ -8594,7 +8583,7 @@ var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, a
8594
8583
  });
8595
8584
  };
8596
8585
  var PortalContainer = ({ scale, xCorrection, yCorrection, contentDimensions }) => {
8597
- const { checkerboard } = useContext20(CheckerboardContext);
8586
+ const { checkerboard } = useContext19(CheckerboardContext);
8598
8587
  const style5 = useMemo38(() => {
8599
8588
  return containerStyle({
8600
8589
  checkerboard,
@@ -8686,8 +8675,8 @@ var getUniqueSizes = (size2) => {
8686
8675
  };
8687
8676
  var zoomableFileTypes = ["video", "image"];
8688
8677
  var SizeSelector = () => {
8689
- const { size: size2, setSize } = useContext21(Internals16.PreviewSizeContext);
8690
- const { canvasContent } = useContext21(Internals16.CompositionManager);
8678
+ const { size: size2, setSize } = useContext20(Internals16.PreviewSizeContext);
8679
+ const { canvasContent } = useContext20(Internals16.CompositionManager);
8691
8680
  const style5 = useMemo39(() => {
8692
8681
  return {
8693
8682
  padding: CONTROL_BUTTON_PADDING
@@ -8785,7 +8774,7 @@ var TimelineOutPointer = (props) => {
8785
8774
  };
8786
8775
 
8787
8776
  // src/state/in-out.ts
8788
- import { createContext as createContext12, useContext as useContext22, useMemo as useMemo40 } from "react";
8777
+ import { createContext as createContext12, useContext as useContext21, useMemo as useMemo40 } from "react";
8789
8778
  import { Internals as Internals17 } from "remotion";
8790
8779
  var TimelineInOutContext = createContext12({});
8791
8780
  var SetTimelineInOutContext = createContext12({
@@ -8795,7 +8784,7 @@ var SetTimelineInOutContext = createContext12({
8795
8784
  });
8796
8785
  var useTimelineInOutFramePosition = () => {
8797
8786
  const videoConfig = Internals17.useUnsafeVideoConfig();
8798
- const state = useContext22(TimelineInOutContext);
8787
+ const state = useContext21(TimelineInOutContext);
8799
8788
  const id = videoConfig?.id;
8800
8789
  const durationInFrames = videoConfig?.durationInFrames;
8801
8790
  return useMemo40(() => {
@@ -8812,7 +8801,7 @@ var useTimelineInOutFramePosition = () => {
8812
8801
  }, [durationInFrames, id, state]);
8813
8802
  };
8814
8803
  var useTimelineSetInOutFramePosition = () => {
8815
- const { setInAndOutFrames } = useContext22(SetTimelineInOutContext);
8804
+ const { setInAndOutFrames } = useContext21(SetTimelineInOutContext);
8816
8805
  return { setInAndOutFrames };
8817
8806
  };
8818
8807
 
@@ -9356,18 +9345,18 @@ var getFileMenu = ({
9356
9345
  };
9357
9346
  };
9358
9347
  var useMenuStructure = (closeMenu, readOnlyStudio) => {
9359
- const { setSelectedModal } = useContext23(ModalsContext);
9360
- const { checkerboard, setCheckerboard } = useContext23(CheckerboardContext);
9361
- const { editorZoomGestures, setEditorZoomGestures } = useContext23(EditorZoomGesturesContext);
9362
- const { editorShowRulers, setEditorShowRulers } = useContext23(EditorShowRulersContext);
9363
- const { editorShowGuides, setEditorShowGuides } = useContext23(EditorShowGuidesContext);
9364
- const { size: size2, setSize } = useContext23(Internals19.PreviewSizeContext);
9365
- const { type } = useContext23(StudioServerConnectionCtx).previewServerState;
9348
+ const { setSelectedModal } = useContext22(ModalsContext);
9349
+ const { checkerboard, setCheckerboard } = useContext22(CheckerboardContext);
9350
+ const { editorZoomGestures, setEditorZoomGestures } = useContext22(EditorZoomGesturesContext);
9351
+ const { editorShowRulers, setEditorShowRulers } = useContext22(EditorShowRulersContext);
9352
+ const { editorShowGuides, setEditorShowGuides } = useContext22(EditorShowGuidesContext);
9353
+ const { size: size2, setSize } = useContext22(Internals19.PreviewSizeContext);
9354
+ const { type } = useContext22(StudioServerConnectionCtx).previewServerState;
9366
9355
  const {
9367
9356
  setSidebarCollapsedState,
9368
9357
  sidebarCollapsedStateLeft,
9369
9358
  sidebarCollapsedStateRight
9370
- } = useContext23(SidebarContext);
9359
+ } = useContext22(SidebarContext);
9371
9360
  const sizes = useMemo42(() => getUniqueSizes(size2), [size2]);
9372
9361
  const isFullscreenSupported = checkFullscreenSupport();
9373
9362
  const { remotion_packageManager } = window;
@@ -10114,7 +10103,7 @@ var makeSearchResults = (actions, setSelectedModal) => {
10114
10103
 
10115
10104
  // src/components/Menu/MenuItem.tsx
10116
10105
  import { PlayerInternals as PlayerInternals9 } from "@remotion/player";
10117
- import { useCallback as useCallback38, useMemo as useMemo43, useRef as useRef21, useState as useState37 } from "react";
10106
+ import { useCallback as useCallback38, useMemo as useMemo43, useRef as useRef21, useState as useState36 } from "react";
10118
10107
  import ReactDOM6 from "react-dom";
10119
10108
  import { jsx as jsx84, jsxs as jsxs39, Fragment as Fragment13 } from "react/jsx-runtime";
10120
10109
  var container21 = {
@@ -10140,7 +10129,7 @@ var MenuItem = ({
10140
10129
  onNextMenu,
10141
10130
  menu
10142
10131
  }) => {
10143
- const [hovered, setHovered] = useState37(false);
10132
+ const [hovered, setHovered] = useState36(false);
10144
10133
  const ref = useRef21(null);
10145
10134
  const size2 = PlayerInternals9.useElementSize(ref, {
10146
10135
  triggerOnWindowResize: true,
@@ -10245,18 +10234,18 @@ var MenuItem = ({
10245
10234
  // src/components/MenuBuildIndicator.tsx
10246
10235
  import {
10247
10236
  useCallback as useCallback40,
10248
- useContext as useContext26,
10237
+ useContext as useContext25,
10249
10238
  useEffect as useEffect34,
10250
10239
  useMemo as useMemo45,
10251
- useState as useState40
10240
+ useState as useState39
10252
10241
  } from "react";
10253
10242
 
10254
10243
  // src/components/MenuCompositionName.tsx
10255
- import { useCallback as useCallback39, useContext as useContext25, useMemo as useMemo44, useState as useState39 } from "react";
10244
+ import { useCallback as useCallback39, useContext as useContext24, useMemo as useMemo44, useState as useState38 } from "react";
10256
10245
  import { Internals as Internals21 } from "remotion";
10257
10246
 
10258
10247
  // src/components/Timeline/use-resolved-stack.ts
10259
- import { useContext as useContext24, useEffect as useEffect33, useState as useState38 } from "react";
10248
+ import { useContext as useContext23, useEffect as useEffect33, useState as useState37 } from "react";
10260
10249
  import { Internals as Internals20 } from "remotion";
10261
10250
 
10262
10251
  // src/components/Timeline/TimelineStack/get-stack.ts
@@ -10349,8 +10338,8 @@ var resolvedCache = new Map;
10349
10338
  var inFlight = new Set;
10350
10339
  var subscribers = new Map;
10351
10340
  var useResolvedStack = (stack2) => {
10352
- const updateResolvedStackTrace = useContext24(Internals20.SequenceStackTracesUpdateContext);
10353
- const [value, setValue] = useState38(() => {
10341
+ const updateResolvedStackTrace = useContext23(Internals20.SequenceStackTracesUpdateContext);
10342
+ const [value, setValue] = useState37(() => {
10354
10343
  if (!stack2) {
10355
10344
  return null;
10356
10345
  }
@@ -10415,10 +10404,10 @@ var slashStyle = {
10415
10404
  top: 1
10416
10405
  };
10417
10406
  var MenuCompositionName = () => {
10418
- const { canvasContent, compositions } = useContext25(Internals21.CompositionManager);
10419
- const connectionStatus = useContext25(StudioServerConnectionCtx).previewServerState.type;
10420
- const [opening, setOpening] = useState39(false);
10421
- const [hovered, setHovered] = useState39(false);
10407
+ const { canvasContent, compositions } = useContext24(Internals21.CompositionManager);
10408
+ const connectionStatus = useContext24(StudioServerConnectionCtx).previewServerState.type;
10409
+ const [opening, setOpening] = useState38(false);
10410
+ const [hovered, setHovered] = useState38(false);
10422
10411
  const composition = useMemo44(() => {
10423
10412
  if (canvasContent === null || canvasContent.type !== "composition") {
10424
10413
  return null;
@@ -10496,9 +10485,9 @@ var projectNameLinkHovered = {
10496
10485
  textDecoration: "underline"
10497
10486
  };
10498
10487
  var MenuBuildIndicator = () => {
10499
- const [isBuilding, setIsBuilding] = useState40(false);
10500
- const [projectNameHovered, setProjectNameHovered] = useState40(false);
10501
- const ctx = useContext26(StudioServerConnectionCtx).previewServerState;
10488
+ const [isBuilding, setIsBuilding] = useState39(false);
10489
+ const [projectNameHovered, setProjectNameHovered] = useState39(false);
10490
+ const ctx = useContext25(StudioServerConnectionCtx).previewServerState;
10502
10491
  const showEditorLink = window.remotion_editorName && ctx.type === "connected";
10503
10492
  const showGitLink = !showEditorLink && Boolean(window.remotion_gitSource);
10504
10493
  const handleProjectNameClick = useCallback40(async () => {
@@ -10576,16 +10565,16 @@ var MenuBuildIndicator = () => {
10576
10565
  };
10577
10566
 
10578
10567
  // src/components/SidebarCollapserControls.tsx
10579
- import { useCallback as useCallback97, useContext as useContext65, useEffect as useEffect63 } from "react";
10568
+ import { useCallback as useCallback97, useContext as useContext64, useEffect as useEffect63 } from "react";
10580
10569
 
10581
10570
  // src/components/TopPanel.tsx
10582
- import React125, { useCallback as useCallback96, useContext as useContext64, useEffect as useEffect62, useMemo as useMemo103 } from "react";
10571
+ import React125, { useCallback as useCallback96, useContext as useContext63, useEffect as useEffect62, useMemo as useMemo103 } from "react";
10583
10572
  import { Internals as Internals45 } from "remotion";
10584
10573
 
10585
10574
  // src/helpers/use-breakpoint.ts
10586
- import { useEffect as useEffect35, useRef as useRef22, useState as useState41 } from "react";
10575
+ import { useEffect as useEffect35, useRef as useRef22, useState as useState40 } from "react";
10587
10576
  function useBreakpoint(breakpoint2) {
10588
- const [compactUI, setCompactUI] = useState41(window.innerWidth < breakpoint2);
10577
+ const [compactUI, setCompactUI] = useState40(window.innerWidth < breakpoint2);
10589
10578
  const compactUIRef = useRef22(compactUI);
10590
10579
  useEffect35(() => {
10591
10580
  function handleResize() {
@@ -10603,21 +10592,21 @@ function useBreakpoint(breakpoint2) {
10603
10592
  }
10604
10593
 
10605
10594
  // src/components/CanvasIfSizeIsAvailable.tsx
10606
- import { useContext as useContext35, useMemo as useMemo53 } from "react";
10595
+ import { useContext as useContext34, useMemo as useMemo53 } from "react";
10607
10596
  import { Internals as Internals30 } from "remotion";
10608
10597
 
10609
10598
  // src/components/CanvasOrLoading.tsx
10610
- import { useContext as useContext34, useEffect as useEffect40 } from "react";
10599
+ import { useContext as useContext33, useEffect as useEffect40 } from "react";
10611
10600
  import { Internals as Internals29 } from "remotion";
10612
10601
 
10613
10602
  // src/components/Canvas.tsx
10614
10603
  import {
10615
10604
  useCallback as useCallback44,
10616
- useContext as useContext33,
10605
+ useContext as useContext32,
10617
10606
  useEffect as useEffect38,
10618
10607
  useMemo as useMemo52,
10619
10608
  useRef as useRef25,
10620
- useState as useState43
10609
+ useState as useState42
10621
10610
  } from "react";
10622
10611
  import { Internals as Internals27, watchStaticFile } from "remotion";
10623
10612
 
@@ -10752,19 +10741,19 @@ var applyZoomAroundFocalPoint = ({
10752
10741
  };
10753
10742
 
10754
10743
  // src/components/EditorGuides/index.tsx
10755
- import { useContext as useContext29, useMemo as useMemo49 } from "react";
10744
+ import { useContext as useContext28, useMemo as useMemo49 } from "react";
10756
10745
  import { Internals as Internals24 } from "remotion";
10757
10746
 
10758
10747
  // src/helpers/use-studio-canvas-dimensions.ts
10759
10748
  import { PlayerInternals as PlayerInternals10 } from "@remotion/player";
10760
- import { useContext as useContext27, useMemo as useMemo46 } from "react";
10749
+ import { useContext as useContext26, useMemo as useMemo46 } from "react";
10761
10750
  import { Internals as Internals23 } from "remotion";
10762
10751
  var useStudioCanvasDimensions = ({
10763
10752
  canvasSize,
10764
10753
  contentDimensions,
10765
10754
  assetMetadata
10766
10755
  }) => {
10767
- const { size: previewSize } = useContext27(Internals23.PreviewSizeContext);
10756
+ const { size: previewSize } = useContext26(Internals23.PreviewSizeContext);
10768
10757
  const { centerX, centerY, scale } = useMemo46(() => {
10769
10758
  if (contentDimensions === "none" || contentDimensions === null || assetMetadata && (assetMetadata.type === "not-found" || assetMetadata.type === "metadata-error") || !canvasSize) {
10770
10759
  return {
@@ -10810,7 +10799,7 @@ var useStudioCanvasDimensions = ({
10810
10799
  };
10811
10800
 
10812
10801
  // src/components/EditorGuides/Guide.tsx
10813
- import { memo, useCallback as useCallback41, useContext as useContext28, useMemo as useMemo48 } from "react";
10802
+ import { memo, useCallback as useCallback41, useContext as useContext27, useMemo as useMemo48 } from "react";
10814
10803
  import { NoReactInternals as NoReactInternals6 } from "remotion/no-react";
10815
10804
 
10816
10805
  // src/components/ForceSpecificCursor.tsx
@@ -10858,7 +10847,7 @@ var GuideComp = ({ guide, canvasDimensions, scale }) => {
10858
10847
  selectedGuideId,
10859
10848
  setHoveredGuideId,
10860
10849
  hoveredGuideId
10861
- } = useContext28(EditorShowGuidesContext);
10850
+ } = useContext27(EditorShowGuidesContext);
10862
10851
  const onPointerEnter = useCallback41(() => {
10863
10852
  setHoveredGuideId(() => guide.id);
10864
10853
  }, [guide.id, setHoveredGuideId]);
@@ -10950,11 +10939,11 @@ var EditorGuides = ({ canvasSize, contentDimensions, assetMetadata }) => {
10950
10939
  contentDimensions,
10951
10940
  assetMetadata
10952
10941
  });
10953
- const { canvasContent } = useContext29(Internals24.CompositionManager);
10942
+ const { canvasContent } = useContext28(Internals24.CompositionManager);
10954
10943
  if (canvasContent === null || canvasContent.type !== "composition") {
10955
10944
  throw new Error("Expected to be in a composition");
10956
10945
  }
10957
- const { guidesList } = useContext29(EditorShowGuidesContext);
10946
+ const { guidesList } = useContext28(EditorShowGuidesContext);
10958
10947
  const guidesForThisComposition = useMemo49(() => {
10959
10948
  return guidesList.filter((guide) => {
10960
10949
  return guide.compositionId === canvasContent.compositionId;
@@ -10975,7 +10964,7 @@ var EditorGuides_default = EditorGuides;
10975
10964
  // src/components/EditorRuler/index.tsx
10976
10965
  import {
10977
10966
  useCallback as useCallback43,
10978
- useContext as useContext31,
10967
+ useContext as useContext30,
10979
10968
  useEffect as useEffect37,
10980
10969
  useMemo as useMemo51,
10981
10970
  useRef as useRef24
@@ -11190,11 +11179,11 @@ var getRulerScaleRange = ({
11190
11179
  // src/components/EditorRuler/Ruler.tsx
11191
11180
  import {
11192
11181
  useCallback as useCallback42,
11193
- useContext as useContext30,
11182
+ useContext as useContext29,
11194
11183
  useEffect as useEffect36,
11195
11184
  useMemo as useMemo50,
11196
11185
  useRef as useRef23,
11197
- useState as useState42
11186
+ useState as useState41
11198
11187
  } from "react";
11199
11188
  import { Internals as Internals25 } from "remotion";
11200
11189
  import { jsx as jsx90 } from "react/jsx-runtime";
@@ -11220,12 +11209,12 @@ var Ruler = ({
11220
11209
  setSelectedGuideId,
11221
11210
  guidesList,
11222
11211
  setEditorShowGuides
11223
- } = useContext30(EditorShowGuidesContext);
11212
+ } = useContext29(EditorShowGuidesContext);
11224
11213
  const unsafeVideoConfig = Internals25.useUnsafeVideoConfig();
11225
11214
  if (!unsafeVideoConfig) {
11226
11215
  throw new Error("Video config not set");
11227
11216
  }
11228
- const [cursor, setCursor] = useState42(isVerticalRuler ? "ew-resize" : "ns-resize");
11217
+ const [cursor, setCursor] = useState41(isVerticalRuler ? "ew-resize" : "ns-resize");
11229
11218
  const selectedOrHoveredGuide = useMemo50(() => {
11230
11219
  return guidesList.find((guide) => guide.id === selectedGuideId) ?? guidesList.find((guide) => guide.id === hoveredGuideId) ?? null;
11231
11220
  }, [guidesList, hoveredGuideId, selectedGuideId]);
@@ -11345,7 +11334,7 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
11345
11334
  setGuidesList,
11346
11335
  selectedGuideId,
11347
11336
  setSelectedGuideId
11348
- } = useContext31(EditorShowGuidesContext);
11337
+ } = useContext30(EditorShowGuidesContext);
11349
11338
  const rulerMarkingGaps = useMemo51(() => {
11350
11339
  const minimumGap = MINIMUM_RULER_MARKING_GAP_PX;
11351
11340
  const predefinedGap = PREDEFINED_RULER_SCALE_GAPS.find((gap) => gap * scale > minimumGap);
@@ -11501,11 +11490,11 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
11501
11490
  };
11502
11491
 
11503
11492
  // src/components/EditorRuler/use-is-ruler-visible.ts
11504
- import { useContext as useContext32 } from "react";
11493
+ import { useContext as useContext31 } from "react";
11505
11494
  import { Internals as Internals26 } from "remotion";
11506
11495
  var useIsRulerVisible = () => {
11507
- const { canvasContent } = useContext32(Internals26.CompositionManager);
11508
- const { editorShowRulers } = useContext32(EditorShowRulersContext);
11496
+ const { canvasContent } = useContext31(Internals26.CompositionManager);
11497
+ const { editorShowRulers } = useContext31(EditorShowRulersContext);
11509
11498
  return editorShowRulers && canvasContent && canvasContent.type === "composition";
11510
11499
  };
11511
11500
 
@@ -11535,8 +11524,8 @@ var resetZoom = {
11535
11524
  };
11536
11525
  var ZOOM_PX_FACTOR = 0.003;
11537
11526
  var Canvas = ({ canvasContent, size: size2 }) => {
11538
- const { setSize, size: previewSize } = useContext33(Internals27.PreviewSizeContext);
11539
- const { editorZoomGestures } = useContext33(EditorZoomGesturesContext);
11527
+ const { setSize, size: previewSize } = useContext32(Internals27.PreviewSizeContext);
11528
+ const { editorZoomGestures } = useContext32(EditorZoomGesturesContext);
11540
11529
  const previewSnapshotRef = useRef25({
11541
11530
  previewSize,
11542
11531
  canvasSize: size2,
@@ -11548,8 +11537,8 @@ var Canvas = ({ canvasContent, size: size2 }) => {
11548
11537
  const keybindings = useKeybinding();
11549
11538
  const config = Internals27.useUnsafeVideoConfig();
11550
11539
  const areRulersVisible = useIsRulerVisible();
11551
- const { editorShowGuides } = useContext33(EditorShowGuidesContext);
11552
- const [assetResolution, setAssetResolution] = useState43(null);
11540
+ const { editorShowGuides } = useContext32(EditorShowGuidesContext);
11541
+ const [assetResolution, setAssetResolution] = useState42(null);
11553
11542
  const contentDimensions = useMemo52(() => {
11554
11543
  if ((canvasContent.type === "asset" || canvasContent.type === "output" || canvasContent.type === "output-blob") && assetResolution && assetResolution.type === "found") {
11555
11544
  return assetResolution.dimensions;
@@ -12047,9 +12036,9 @@ var container24 = {
12047
12036
  };
12048
12037
  var CanvasOrLoading = ({ size: size2 }) => {
12049
12038
  const resolved = Internals29.useResolvedVideoConfig(null);
12050
- const { setZoom } = useContext34(TimelineZoomCtx);
12051
- const { canvasContent } = useContext34(Internals29.CompositionManager);
12052
- const { error: renderError } = useContext34(RenderErrorContext);
12039
+ const { setZoom } = useContext33(TimelineZoomCtx);
12040
+ const { canvasContent } = useContext33(Internals29.CompositionManager);
12041
+ const { error: renderError } = useContext33(RenderErrorContext);
12053
12042
  useEffect40(() => {
12054
12043
  if (resolved?.type !== "success" && resolved?.type !== "success-and-refreshing") {
12055
12044
  return;
@@ -12147,7 +12136,7 @@ var ErrorLoading = ({ error, calculateMetadataContext }) => {
12147
12136
  import { jsx as jsx97 } from "react/jsx-runtime";
12148
12137
  var CanvasIfSizeIsAvailable = () => {
12149
12138
  const rulersAreVisible = useIsRulerVisible();
12150
- const context = useContext35(Internals30.CurrentScaleContext);
12139
+ const context = useContext34(Internals30.CurrentScaleContext);
12151
12140
  const sizeWithRulersApplied = useMemo53(() => {
12152
12141
  const size2 = context && context.type === "canvas-size" ? context.canvasSize : null;
12153
12142
  if (!rulersAreVisible) {
@@ -12171,7 +12160,7 @@ var CanvasIfSizeIsAvailable = () => {
12171
12160
  };
12172
12161
 
12173
12162
  // src/components/CurrentCompositionSideEffects.tsx
12174
- import { useCallback as useCallback45, useContext as useContext36, useEffect as useEffect41 } from "react";
12163
+ import { useCallback as useCallback45, useContext as useContext35, useEffect as useEffect41 } from "react";
12175
12164
  import { Internals as Internals31 } from "remotion";
12176
12165
 
12177
12166
  // src/helpers/document-title.ts
@@ -12226,8 +12215,8 @@ var getProgressInBrackets = (selectedCompositionId, jobs) => {
12226
12215
 
12227
12216
  // src/components/CurrentCompositionSideEffects.tsx
12228
12217
  var TitleUpdater = () => {
12229
- const renderQueue = useContext36(RenderQueueContext);
12230
- const { canvasContent } = useContext36(Internals31.CompositionManager);
12218
+ const renderQueue = useContext35(RenderQueueContext);
12219
+ const { canvasContent } = useContext35(Internals31.CompositionManager);
12231
12220
  const { jobs } = renderQueue;
12232
12221
  useEffect41(() => {
12233
12222
  if (!canvasContent) {
@@ -12256,7 +12245,7 @@ var TitleUpdater = () => {
12256
12245
  var CurrentCompositionKeybindings = ({ readOnlyStudio }) => {
12257
12246
  const keybindings = useKeybinding();
12258
12247
  const video = Internals31.useVideo();
12259
- const { type } = useContext36(StudioServerConnectionCtx).previewServerState;
12248
+ const { type } = useContext35(StudioServerConnectionCtx).previewServerState;
12260
12249
  const openRenderModal = useCallback45(() => {
12261
12250
  if (!video) {
12262
12251
  return;
@@ -12331,18 +12320,18 @@ function MobilePanel({
12331
12320
  // src/components/ObserveDefaultPropsContext.tsx
12332
12321
  import React65, {
12333
12322
  useCallback as useCallback46,
12334
- useContext as useContext37,
12323
+ useContext as useContext36,
12335
12324
  useEffect as useEffect42,
12336
12325
  useMemo as useMemo54,
12337
- useState as useState44
12326
+ useState as useState43
12338
12327
  } from "react";
12339
12328
  import { Internals as Internals32 } from "remotion";
12340
12329
  import { jsx as jsx99 } from "react/jsx-runtime";
12341
12330
  var ObserveDefaultPropsContext = React65.createContext(null);
12342
12331
  var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
12343
- const { previewServerState, subscribeToEvent } = useContext37(StudioServerConnectionCtx);
12344
- const { updateProps } = useContext37(Internals32.EditorPropsContext);
12345
- const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = useState44({});
12332
+ const { previewServerState, subscribeToEvent } = useContext36(StudioServerConnectionCtx);
12333
+ const { updateProps } = useContext36(Internals32.EditorPropsContext);
12334
+ const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = useState43({});
12346
12335
  const canSaveDefaultProps = useMemo54(() => {
12347
12336
  if (compositionId === null) {
12348
12337
  return null;
@@ -12416,10 +12405,10 @@ var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
12416
12405
  import {
12417
12406
  createRef as createRef10,
12418
12407
  useCallback as useCallback87,
12419
- useContext as useContext55,
12408
+ useContext as useContext54,
12420
12409
  useImperativeHandle as useImperativeHandle13,
12421
12410
  useMemo as useMemo97,
12422
- useState as useState62
12411
+ useState as useState61
12423
12412
  } from "react";
12424
12413
  import { Internals as Internals36 } from "remotion";
12425
12414
 
@@ -12432,7 +12421,7 @@ import {
12432
12421
  useImperativeHandle as useImperativeHandle11,
12433
12422
  useMemo as useMemo56,
12434
12423
  useRef as useRef26,
12435
- useState as useState46
12424
+ useState as useState45
12436
12425
  } from "react";
12437
12426
  import { useRemotionEnvironment as useRemotionEnvironment2 } from "remotion";
12438
12427
 
@@ -12454,10 +12443,10 @@ function getZodSchemaFromPrimitive(value, z) {
12454
12443
  // src/components/get-zod-if-possible.tsx
12455
12444
  import {
12456
12445
  createContext as createContext17,
12457
- useContext as useContext38,
12446
+ useContext as useContext37,
12458
12447
  useEffect as useEffect43,
12459
12448
  useMemo as useMemo55,
12460
- useState as useState45
12449
+ useState as useState44
12461
12450
  } from "react";
12462
12451
  import { jsx as jsx100 } from "react/jsx-runtime";
12463
12452
  async function getZodIfPossible() {
@@ -12485,18 +12474,18 @@ var getZTypesIfPossible = async () => {
12485
12474
  }
12486
12475
  };
12487
12476
  function useZodIfPossible() {
12488
- const context = useContext38(ZodContext);
12477
+ const context = useContext37(ZodContext);
12489
12478
  return context?.zod ?? null;
12490
12479
  }
12491
12480
  var useZodTypesIfPossible = () => {
12492
- const context = useContext38(ZodContext);
12481
+ const context = useContext37(ZodContext);
12493
12482
  return context?.zodTypes ?? null;
12494
12483
  };
12495
12484
  var ZodContext = createContext17(null);
12496
12485
  var ZodProvider = ({ children }) => {
12497
- const [zod, setZod] = useState45(null);
12498
- const [zodV3, setZodV3] = useState45(null);
12499
- const [zodTypes, setZodTypes] = useState45(null);
12486
+ const [zod, setZod] = useState44(null);
12487
+ const [zodV3, setZodV3] = useState44(null);
12488
+ const [zodTypes, setZodTypes] = useState44(null);
12500
12489
  useEffect43(() => {
12501
12490
  getZodIfPossible().then((z) => setZod(z));
12502
12491
  }, []);
@@ -12572,7 +12561,7 @@ var SetVisualControlsContext = createContext18({
12572
12561
  });
12573
12562
  var VisualControlsProvider = ({ children }) => {
12574
12563
  const imperativeHandles = useRef26({});
12575
- const [handles, setHandles] = useState46({});
12564
+ const [handles, setHandles] = useState45({});
12576
12565
  const state = useMemo56(() => {
12577
12566
  return {
12578
12567
  handles
@@ -12674,10 +12663,10 @@ var VisualControlsProvider = ({ children }) => {
12674
12663
  };
12675
12664
 
12676
12665
  // src/components/DefaultPropsEditor.tsx
12677
- import { useContext as useContext42 } from "react";
12666
+ import { useContext as useContext41 } from "react";
12678
12667
 
12679
12668
  // src/components/RenderModal/DataEditor.tsx
12680
- import React96, { useCallback as useCallback72, useContext as useContext41, useMemo as useMemo86, useState as useState57 } from "react";
12669
+ import React96, { useCallback as useCallback72, useContext as useContext40, useMemo as useMemo86, useState as useState56 } from "react";
12681
12670
  import { getInputProps } from "remotion";
12682
12671
  import { NoReactInternals as NoReactInternals10 } from "remotion/no-react";
12683
12672
 
@@ -12735,7 +12724,7 @@ var ValidationMessage = ({ message, align, type }) => {
12735
12724
  };
12736
12725
 
12737
12726
  // src/components/SegmentedControl.tsx
12738
- import { useCallback as useCallback48, useMemo as useMemo58, useState as useState47 } from "react";
12727
+ import { useCallback as useCallback48, useMemo as useMemo58, useState as useState46 } from "react";
12739
12728
  import { jsx as jsx103 } from "react/jsx-runtime";
12740
12729
  var container27 = {
12741
12730
  display: "flex",
@@ -12784,7 +12773,7 @@ var SegmentedControl = ({ items, needsWrapping }) => {
12784
12773
  });
12785
12774
  };
12786
12775
  var Item = ({ selected, onClick, children }) => {
12787
- const [hovered, setHovered] = useState47(false);
12776
+ const [hovered, setHovered] = useState46(false);
12788
12777
  const { tabIndex } = useZIndex();
12789
12778
  const onPointerEnter = useCallback48(() => {
12790
12779
  setHovered(true);
@@ -12879,7 +12868,7 @@ var getRenderModalWarnings = ({
12879
12868
 
12880
12869
  // src/components/RenderModal/RenderModalJSONPropsEditor.tsx
12881
12870
  import React71, { useCallback as useCallback49, useEffect as useEffect45, useMemo as useMemo60 } from "react";
12882
- import { useContext as useContext39 } from "react";
12871
+ import { useContext as useContext38 } from "react";
12883
12872
  import { NoReactInternals as NoReactInternals9 } from "remotion/no-react";
12884
12873
 
12885
12874
  // src/components/RenderModal/SchemaEditor/deep-equal.ts
@@ -13207,7 +13196,7 @@ var RenderModalJSONPropsEditor = ({
13207
13196
  if (serializedJSON === null) {
13208
13197
  throw new Error("expecting serializedJSON to be defined");
13209
13198
  }
13210
- const { subscribeToEvent } = useContext39(StudioServerConnectionCtx);
13199
+ const { subscribeToEvent } = useContext38(StudioServerConnectionCtx);
13211
13200
  const [localValue, setLocalValue] = React71.useState(() => {
13212
13201
  return parseJSON(serializedJSON.serializedString, schema);
13213
13202
  });
@@ -13681,12 +13670,12 @@ var createZodValues = (schema, zodRuntime, zodTypes) => {
13681
13670
  };
13682
13671
 
13683
13672
  // src/components/RenderModal/SchemaEditor/Fieldset.tsx
13684
- import { createContext as createContext19, useContext as useContext40, useMemo as useMemo61 } from "react";
13673
+ import { createContext as createContext19, useContext as useContext39, useMemo as useMemo61 } from "react";
13685
13674
  import { jsx as jsx107 } from "react/jsx-runtime";
13686
13675
  var SCHEMA_EDITOR_FIELDSET_PADDING = 10;
13687
13676
  var AlreadyPaddedRightContext = createContext19(false);
13688
13677
  var Fieldset = ({ children, shouldPad }) => {
13689
- const alreadyPadded = useContext40(AlreadyPaddedRightContext);
13678
+ const alreadyPadded = useContext39(AlreadyPaddedRightContext);
13690
13679
  const style8 = useMemo61(() => {
13691
13680
  if (shouldPad) {
13692
13681
  return {
@@ -13711,7 +13700,7 @@ var Fieldset = ({ children, shouldPad }) => {
13711
13700
  };
13712
13701
 
13713
13702
  // src/components/RenderModal/SchemaEditor/SchemaLabel.tsx
13714
- import { useCallback as useCallback51, useMemo as useMemo62, useState as useState48 } from "react";
13703
+ import { useCallback as useCallback51, useMemo as useMemo62, useState as useState47 } from "react";
13715
13704
 
13716
13705
  // src/components/RenderModal/InlineRemoveButton.tsx
13717
13706
  import { useCallback as useCallback50 } from "react";
@@ -13763,7 +13752,7 @@ var compactStyles = {
13763
13752
  flex: 1
13764
13753
  };
13765
13754
  var SchemaLabel = ({ jsonPath, onRemove, valid, suffix: suffix2, handleClick }) => {
13766
- const [clickableButtonHovered, setClickableButtonHovered] = useState48(false);
13755
+ const [clickableButtonHovered, setClickableButtonHovered] = useState47(false);
13767
13756
  const labelStyle4 = useMemo62(() => {
13768
13757
  return {
13769
13758
  fontFamily: "monospace",
@@ -13809,7 +13798,7 @@ var SchemaLabel = ({ jsonPath, onRemove, valid, suffix: suffix2, handleClick })
13809
13798
 
13810
13799
  // src/components/RenderModal/SchemaEditor/ZodObjectEditor.tsx
13811
13800
  import { useCallback as useCallback70 } from "react";
13812
- import React94, { useMemo as useMemo83, useState as useState56 } from "react";
13801
+ import React94, { useMemo as useMemo83, useState as useState55 } from "react";
13813
13802
 
13814
13803
  // src/components/RenderModal/layout.ts
13815
13804
  var optionRow = {
@@ -13855,7 +13844,7 @@ var fieldsetLabel = {
13855
13844
  };
13856
13845
 
13857
13846
  // src/components/RenderModal/SchemaEditor/SchemaSeparationLine.tsx
13858
- import { useCallback as useCallback52, useMemo as useMemo63, useState as useState49 } from "react";
13847
+ import { useCallback as useCallback52, useMemo as useMemo63, useState as useState48 } from "react";
13859
13848
 
13860
13849
  // src/icons/plus.tsx
13861
13850
  import { jsx as jsx110 } from "react/jsx-runtime";
@@ -13890,8 +13879,8 @@ var arraySeparationLine = {
13890
13879
  flexBasis: "100%"
13891
13880
  };
13892
13881
  var SchemaArrayItemSeparationLine = ({ onChange, index, schema, isLast, showAddButton }) => {
13893
- const [outerHovered, setOuterHovered] = useState49(false);
13894
- const [innerHovered, setInnerHovered] = useState49(false);
13882
+ const [outerHovered, setOuterHovered] = useState48(false);
13883
+ const [innerHovered, setInnerHovered] = useState48(false);
13895
13884
  const zodTypes = useZodTypesIfPossible();
13896
13885
  const z = useZodIfPossible();
13897
13886
  if (!z) {
@@ -14031,7 +14020,7 @@ var SchemaVerticalGuide = ({ isRoot, children }) => {
14031
14020
  };
14032
14021
 
14033
14022
  // src/components/RenderModal/SchemaEditor/ZodArrayEditor.tsx
14034
- import React79, { useCallback as useCallback55, useMemo as useMemo68, useState as useState51 } from "react";
14023
+ import React79, { useCallback as useCallback55, useMemo as useMemo68, useState as useState50 } from "react";
14035
14024
 
14036
14025
  // src/components/RenderModal/SchemaEditor/ZodArrayItemEditor.tsx
14037
14026
  import { useCallback as useCallback53, useMemo as useMemo65 } from "react";
@@ -14068,7 +14057,7 @@ var ZodArrayItemEditor = ({ elementSchema, onChange, jsonPath, index, value, may
14068
14057
 
14069
14058
  // src/components/RenderModal/InfoBubble.tsx
14070
14059
  import { PlayerInternals as PlayerInternals11 } from "@remotion/player";
14071
- import { useCallback as useCallback54, useEffect as useEffect46, useMemo as useMemo67, useRef as useRef27, useState as useState50 } from "react";
14060
+ import { useCallback as useCallback54, useEffect as useEffect46, useMemo as useMemo67, useRef as useRef27, useState as useState49 } from "react";
14072
14061
  import ReactDOM8 from "react-dom";
14073
14062
 
14074
14063
  // src/components/RenderModal/InfoTooltip.tsx
@@ -14151,8 +14140,8 @@ var container28 = {
14151
14140
  verticalAlign: "text-bottom"
14152
14141
  };
14153
14142
  var InfoBubble = ({ title: title4, children }) => {
14154
- const [hovered, setIsHovered] = useState50(false);
14155
- const [opened, setOpened] = useState50(false);
14143
+ const [hovered, setIsHovered] = useState49(false);
14144
+ const [opened, setOpened] = useState49(false);
14156
14145
  const ref2 = useRef27(null);
14157
14146
  const { tabIndex, currentZIndex } = useZIndex();
14158
14147
  const size2 = PlayerInternals11.useElementSize(ref2, {
@@ -14339,7 +14328,7 @@ var ZodArrayEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad }) =
14339
14328
  const onChange = useCallback55((updater, { shouldSave }) => {
14340
14329
  setValue(updater, { shouldSave });
14341
14330
  }, [setValue]);
14342
- const [expanded, setExpanded] = useState51(true);
14331
+ const [expanded, setExpanded] = useState50(true);
14343
14332
  const arrayElement = getArrayElement(schema);
14344
14333
  const suffix2 = useMemo68(() => {
14345
14334
  return expanded ? " [" : " [...] ";
@@ -14524,7 +14513,7 @@ var colorWithNewOpacity = (color, opacity, zodTypes) => {
14524
14513
  };
14525
14514
 
14526
14515
  // src/components/NewComposition/InputDragger.tsx
14527
- import React82, { useCallback as useCallback57, useEffect as useEffect48, useMemo as useMemo70, useRef as useRef29, useState as useState52 } from "react";
14516
+ import React82, { useCallback as useCallback57, useEffect as useEffect48, useMemo as useMemo70, useRef as useRef29, useState as useState51 } from "react";
14528
14517
  import { interpolate as interpolate2 } from "remotion";
14529
14518
  import { jsx as jsx120 } from "react/jsx-runtime";
14530
14519
  var isInt = (num) => {
@@ -14544,8 +14533,8 @@ var InputDraggerForwardRefFn = ({
14544
14533
  small,
14545
14534
  ...props
14546
14535
  }, ref2) => {
14547
- const [inputFallback, setInputFallback] = useState52(false);
14548
- const [dragging, setDragging] = useState52(false);
14536
+ const [inputFallback, setInputFallback] = useState51(false);
14537
+ const [dragging, setDragging] = useState51(false);
14549
14538
  const fallbackRef = useRef29(null);
14550
14539
  const pointerDownRef = useRef29(false);
14551
14540
  const style8 = useMemo70(() => {
@@ -14715,7 +14704,7 @@ import {
14715
14704
  useImperativeHandle as useImperativeHandle12,
14716
14705
  useMemo as useMemo71,
14717
14706
  useRef as useRef30,
14718
- useState as useState53
14707
+ useState as useState52
14719
14708
  } from "react";
14720
14709
  import { jsx as jsx121 } from "react/jsx-runtime";
14721
14710
  var inputBaseStyle3 = {
@@ -14724,8 +14713,8 @@ var inputBaseStyle3 = {
14724
14713
  borderWidth: 1
14725
14714
  };
14726
14715
  var RemInputTypeColorForwardRef = ({ status, ...props }, ref2) => {
14727
- const [isFocused, setIsFocused] = useState53(false);
14728
- const [isHovered, setIsHovered] = useState53(false);
14716
+ const [isFocused, setIsFocused] = useState52(false);
14717
+ const [isHovered, setIsHovered] = useState52(false);
14729
14718
  const inputRef = useRef30(null);
14730
14719
  const { tabIndex } = useZIndex();
14731
14720
  const style8 = useMemo71(() => {
@@ -15076,7 +15065,7 @@ var ZodEnumEditor = ({ schema, jsonPath, setValue, value, onRemove }) => {
15076
15065
  };
15077
15066
 
15078
15067
  // src/components/RenderModal/SchemaEditor/ZodMatrixEditor.tsx
15079
- import React88, { useMemo as useMemo76, useState as useState54 } from "react";
15068
+ import React88, { useMemo as useMemo76, useState as useState53 } from "react";
15080
15069
  import { useCallback as useCallback62 } from "react";
15081
15070
  import { jsx as jsx127, jsxs as jsxs64 } from "react/jsx-runtime";
15082
15071
  var rowStyle = {
@@ -15089,7 +15078,7 @@ var ZodMatrixEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad })
15089
15078
  setValue(updater, { shouldSave });
15090
15079
  }, [setValue]);
15091
15080
  const zodValidation = useMemo76(() => zodSafeParse(schema, value), [schema, value]);
15092
- const [expanded, setExpanded] = useState54(true);
15081
+ const [expanded, setExpanded] = useState53(true);
15093
15082
  const arrayElement = getArrayElement(schema);
15094
15083
  const suffix2 = useMemo76(() => {
15095
15084
  return expanded ? " [" : " [...] ";
@@ -15585,7 +15574,7 @@ var ZodTextareaEditor = ({ jsonPath, value, setValue, schema, onRemove, mayPad }
15585
15574
  };
15586
15575
 
15587
15576
  // src/components/RenderModal/SchemaEditor/ZodTupleEditor.tsx
15588
- import React93, { useCallback as useCallback69, useMemo as useMemo82, useState as useState55 } from "react";
15577
+ import React93, { useCallback as useCallback69, useMemo as useMemo82, useState as useState54 } from "react";
15589
15578
 
15590
15579
  // src/components/RenderModal/SchemaEditor/ZodTupleItemEditor.tsx
15591
15580
  import { useCallback as useCallback68, useMemo as useMemo81 } from "react";
@@ -15622,7 +15611,7 @@ var ZodTupleEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad }) =
15622
15611
  setValue(updater, { shouldSave });
15623
15612
  }, [setValue]);
15624
15613
  const zodValidation = useMemo82(() => zodSafeParse(schema, value), [schema, value]);
15625
- const [expanded, setExpanded] = useState55(true);
15614
+ const [expanded, setExpanded] = useState54(true);
15626
15615
  const tupleItems = getTupleItems(schema);
15627
15616
  const suffix2 = useMemo82(() => {
15628
15617
  return expanded ? " [" : " [...] ";
@@ -16011,7 +16000,7 @@ var ZodObjectEditor = ({
16011
16000
  mayPad,
16012
16001
  discriminatedUnionReplacement
16013
16002
  }) => {
16014
- const [expanded, setExpanded] = useState56(true);
16003
+ const [expanded, setExpanded] = useState55(true);
16015
16004
  const onChange = useCallback70((updater, { shouldSave }) => {
16016
16005
  setValue(updater, { shouldSave });
16017
16006
  }, [setValue]);
@@ -16320,8 +16309,8 @@ var DataEditor = ({
16320
16309
  propsEditType,
16321
16310
  canSaveDefaultProps
16322
16311
  }) => {
16323
- const [mode, setMode] = useState57("schema");
16324
- const [showWarning, setShowWarningWithoutPersistance] = useState57(() => getPersistedShowWarningState());
16312
+ const [mode, setMode] = useState56("schema");
16313
+ const [showWarning, setShowWarningWithoutPersistance] = useState56(() => getPersistedShowWarningState());
16325
16314
  const jsonEditorSetValue = useCallback72((newProps) => {
16326
16315
  setDefaultProps(typeof newProps === "function" ? newProps : () => newProps, { shouldSave: false });
16327
16316
  }, [setDefaultProps]);
@@ -16373,7 +16362,7 @@ var DataEditor = ({
16373
16362
  return val(prevVal);
16374
16363
  });
16375
16364
  }, []);
16376
- const { previewServerState } = useContext41(StudioServerConnectionCtx);
16365
+ const { previewServerState } = useContext40(StudioServerConnectionCtx);
16377
16366
  const modeItems = useMemo86(() => {
16378
16367
  return [
16379
16368
  {
@@ -16513,7 +16502,7 @@ var DefaultPropsEditor = ({
16513
16502
  setDefaultProps,
16514
16503
  propsEditType
16515
16504
  }) => {
16516
- const canSaveDefaultProps = useContext42(ObserveDefaultPropsContext);
16505
+ const canSaveDefaultProps = useContext41(ObserveDefaultPropsContext);
16517
16506
  if (canSaveDefaultProps === null) {
16518
16507
  throw new Error("ObserveDefaultPropsContext is not set");
16519
16508
  }
@@ -16726,16 +16715,16 @@ var SchemaResetButton = ({ onClick }) => {
16726
16715
  };
16727
16716
 
16728
16717
  // src/components/RenderQueue/index.tsx
16729
- import React108, { useContext as useContext51, useEffect as useEffect52, useMemo as useMemo94 } from "react";
16718
+ import React108, { useContext as useContext50, useEffect as useEffect52, useMemo as useMemo94 } from "react";
16730
16719
  import { Internals as Internals35 } from "remotion";
16731
16720
 
16732
16721
  // src/components/RenderQueue/RenderQueueItem.tsx
16733
16722
  import {
16734
16723
  useCallback as useCallback84,
16735
- useContext as useContext50,
16724
+ useContext as useContext49,
16736
16725
  useEffect as useEffect51,
16737
16726
  useMemo as useMemo93,
16738
- useState as useState58
16727
+ useState as useState57
16739
16728
  } from "react";
16740
16729
  import { Internals as Internals34 } from "remotion";
16741
16730
 
@@ -16836,7 +16825,7 @@ import { useCallback as useCallback76, useMemo as useMemo87 } from "react";
16836
16825
 
16837
16826
  // src/components/RenderQueue/ClientRenderQueueProcessor.tsx
16838
16827
  import { renderMediaOnWeb, renderStillOnWeb } from "@remotion/web-renderer";
16839
- import { useCallback as useCallback75, useContext as useContext43, useEffect as useEffect50 } from "react";
16828
+ import { useCallback as useCallback75, useContext as useContext42, useEffect as useEffect50 } from "react";
16840
16829
 
16841
16830
  // src/api/save-render-output.ts
16842
16831
  var throwIfNotOk = async (response) => {
@@ -16901,7 +16890,7 @@ var ClientRenderQueueProcessor = () => {
16901
16890
  markClientJobFailed,
16902
16891
  markClientJobCancelled,
16903
16892
  setProcessJobCallback
16904
- } = useContext43(RenderQueueContext);
16893
+ } = useContext42(RenderQueueContext);
16905
16894
  const processStillJob = useCallback75(async (job, signal) => {
16906
16895
  const compositionRef = getCompositionForJob2(job.id);
16907
16896
  if (!compositionRef) {
@@ -17092,13 +17081,13 @@ var RenderQueueDownloadItem = ({ job }) => {
17092
17081
  };
17093
17082
 
17094
17083
  // src/components/RenderQueue/RenderQueueError.tsx
17095
- import { useCallback as useCallback77, useContext as useContext44 } from "react";
17084
+ import { useCallback as useCallback77, useContext as useContext43 } from "react";
17096
17085
  import { jsx as jsx150 } from "react/jsx-runtime";
17097
17086
  var outputLocation = {
17098
17087
  ...renderQueueItemSubtitleStyle
17099
17088
  };
17100
17089
  var RenderQueueError = ({ job }) => {
17101
- const { setSelectedModal } = useContext44(ModalsContext);
17090
+ const { setSelectedModal } = useContext43(ModalsContext);
17102
17091
  const { tabIndex } = useZIndex();
17103
17092
  const onClick = useCallback77(() => {
17104
17093
  setSelectedModal({
@@ -17120,11 +17109,11 @@ var RenderQueueError = ({ job }) => {
17120
17109
  };
17121
17110
 
17122
17111
  // src/components/RenderQueue/RenderQueueItemCancelButton.tsx
17123
- import { useCallback as useCallback78, useContext as useContext45, useMemo as useMemo88 } from "react";
17112
+ import { useCallback as useCallback78, useContext as useContext44, useMemo as useMemo88 } from "react";
17124
17113
  import { jsx as jsx151 } from "react/jsx-runtime";
17125
17114
  var RenderQueueCancelButton = ({ job }) => {
17126
17115
  const isClientJob = isClientRenderJob(job);
17127
- const { cancelClientJob } = useContext45(RenderQueueContext);
17116
+ const { cancelClientJob } = useContext44(RenderQueueContext);
17128
17117
  const onClick = useCallback78((e) => {
17129
17118
  e.stopPropagation();
17130
17119
  if (isClientJob) {
@@ -17159,7 +17148,7 @@ var RenderQueueCancelButton = ({ job }) => {
17159
17148
  };
17160
17149
 
17161
17150
  // src/components/RenderQueue/RenderQueueItemStatus.tsx
17162
- import React101, { useCallback as useCallback79, useContext as useContext46 } from "react";
17151
+ import React101, { useCallback as useCallback79, useContext as useContext45 } from "react";
17163
17152
 
17164
17153
  // src/components/RenderQueue/CircularProgress.tsx
17165
17154
  import { jsx as jsx152 } from "react/jsx-runtime";
@@ -17204,7 +17193,7 @@ var invisibleStyle = {
17204
17193
  display: "flex"
17205
17194
  };
17206
17195
  var RenderQueueItemStatus = ({ job }) => {
17207
- const { setSelectedModal } = useContext46(ModalsContext);
17196
+ const { setSelectedModal } = useContext45(ModalsContext);
17208
17197
  const [hovered, setHovered] = React101.useState(false);
17209
17198
  const isClientJob = isClientRenderJob(job);
17210
17199
  const onPointerEnter = useCallback79(() => {
@@ -17356,7 +17345,7 @@ var RenderQueueOutputName = ({ job }) => {
17356
17345
  };
17357
17346
 
17358
17347
  // src/components/RenderQueue/RenderQueueProgressMessage.tsx
17359
- import { useCallback as useCallback81, useContext as useContext47 } from "react";
17348
+ import { useCallback as useCallback81, useContext as useContext46 } from "react";
17360
17349
 
17361
17350
  // src/components/RenderQueue/client-render-progress.ts
17362
17351
  var formatEtaString = (timeRemainingInMilliseconds) => {
@@ -17393,7 +17382,7 @@ var RenderQueueProgressMessage = ({ job }) => {
17393
17382
  if (job.status !== "running") {
17394
17383
  throw new Error("should not have rendered this component");
17395
17384
  }
17396
- const { setSelectedModal } = useContext47(ModalsContext);
17385
+ const { setSelectedModal } = useContext46(ModalsContext);
17397
17386
  const { tabIndex } = useZIndex();
17398
17387
  const isClientJob = isClientRenderJob(job);
17399
17388
  const onClick = useCallback81(() => {
@@ -17414,14 +17403,14 @@ var RenderQueueProgressMessage = ({ job }) => {
17414
17403
  };
17415
17404
 
17416
17405
  // src/components/RenderQueue/RenderQueueRemoveItem.tsx
17417
- import { useCallback as useCallback82, useContext as useContext48, useMemo as useMemo91 } from "react";
17406
+ import { useCallback as useCallback82, useContext as useContext47, useMemo as useMemo91 } from "react";
17418
17407
  import { Internals as Internals33 } from "remotion";
17419
17408
  import { jsx as jsx157 } from "react/jsx-runtime";
17420
17409
  var RenderQueueRemoveItem = ({ job }) => {
17421
17410
  const isClientJob = isClientRenderJob(job);
17422
- const { removeClientJob } = useContext48(RenderQueueContext);
17423
- const { canvasContent } = useContext48(Internals33.CompositionManager);
17424
- const { setCanvasContent } = useContext48(Internals33.CompositionSetters);
17411
+ const { removeClientJob } = useContext47(RenderQueueContext);
17412
+ const { canvasContent } = useContext47(Internals33.CompositionManager);
17413
+ const { setCanvasContent } = useContext47(Internals33.CompositionSetters);
17425
17414
  const onClick = useCallback82((e) => {
17426
17415
  e.stopPropagation();
17427
17416
  if (isClientJob) {
@@ -17463,7 +17452,7 @@ var RenderQueueRemoveItem = ({ job }) => {
17463
17452
  };
17464
17453
 
17465
17454
  // src/components/RenderQueue/RenderQueueRepeat.tsx
17466
- import { useCallback as useCallback83, useContext as useContext49, useMemo as useMemo92 } from "react";
17455
+ import { useCallback as useCallback83, useContext as useContext48, useMemo as useMemo92 } from "react";
17467
17456
 
17468
17457
  // src/helpers/retry-payload.ts
17469
17458
  import { NoReactInternals as NoReactInternals11 } from "remotion/no-react";
@@ -17667,9 +17656,9 @@ var makeClientRetryPayload = (job) => {
17667
17656
  // src/components/RenderQueue/RenderQueueRepeat.tsx
17668
17657
  import { jsx as jsx158 } from "react/jsx-runtime";
17669
17658
  var RenderQueueRepeatItem = ({ job }) => {
17670
- const { setSelectedModal } = useContext49(ModalsContext);
17659
+ const { setSelectedModal } = useContext48(ModalsContext);
17671
17660
  const isMobileLayout = useMobileLayout();
17672
- const { setSidebarCollapsedState } = useContext49(SidebarContext);
17661
+ const { setSidebarCollapsedState } = useContext48(SidebarContext);
17673
17662
  const isClientJob = isClientRenderJob(job);
17674
17663
  const onClick = useCallback83((e) => {
17675
17664
  e.stopPropagation();
@@ -17752,8 +17741,8 @@ var subtitle3 = {
17752
17741
  };
17753
17742
  var SELECTED_CLASSNAME = "__remotion_selected_classname";
17754
17743
  var RenderQueueItem = ({ job, selected }) => {
17755
- const [hovered, setHovered] = useState58(false);
17756
- const { setCanvasContent } = useContext50(Internals34.CompositionSetters);
17744
+ const [hovered, setHovered] = useState57(false);
17745
+ const { setCanvasContent } = useContext49(Internals34.CompositionSetters);
17757
17746
  const isClientJob = isClientRenderJob(job);
17758
17747
  const onPointerEnter = useCallback84(() => {
17759
17748
  setHovered(true);
@@ -17919,9 +17908,9 @@ var renderQueue = {
17919
17908
  overflowY: "auto"
17920
17909
  };
17921
17910
  var RenderQueue = () => {
17922
- const connectionStatus = useContext51(StudioServerConnectionCtx).previewServerState.type;
17923
- const { jobs } = useContext51(RenderQueueContext);
17924
- const { canvasContent } = useContext51(Internals35.CompositionManager);
17911
+ const connectionStatus = useContext50(StudioServerConnectionCtx).previewServerState.type;
17912
+ const { jobs } = useContext50(RenderQueueContext);
17913
+ const { canvasContent } = useContext50(Internals35.CompositionManager);
17925
17914
  const previousJobCount = React108.useRef(jobs.length);
17926
17915
  const jobCount = jobs.length;
17927
17916
  const divRef = React108.useRef(null);
@@ -18004,7 +17993,7 @@ var RenderQueue = () => {
18004
17993
  };
18005
17994
 
18006
17995
  // src/components/RendersTab.tsx
18007
- import { useContext as useContext52, useMemo as useMemo95 } from "react";
17996
+ import { useContext as useContext51, useMemo as useMemo95 } from "react";
18008
17997
  import { jsx as jsx162, jsxs as jsxs78, Fragment as Fragment21 } from "react/jsx-runtime";
18009
17998
  var row4 = {
18010
17999
  display: "flex",
@@ -18024,7 +18013,7 @@ var badge = {
18024
18013
  alignItems: "center"
18025
18014
  };
18026
18015
  var RendersTab = ({ selected, onClick }) => {
18027
- const { jobs } = useContext52(RenderQueueContext);
18016
+ const { jobs } = useContext51(RenderQueueContext);
18028
18017
  const failedJobs = jobs.filter((j) => j.status === "failed").length;
18029
18018
  const jobCount = jobs.length;
18030
18019
  const badgeStyle = useMemo95(() => {
@@ -18059,10 +18048,10 @@ var RendersTab = ({ selected, onClick }) => {
18059
18048
  };
18060
18049
 
18061
18050
  // src/components/VisualControls/VisualControlsContent.tsx
18062
- import React111, { useContext as useContext54 } from "react";
18051
+ import React111, { useContext as useContext53 } from "react";
18063
18052
 
18064
18053
  // src/components/VisualControls/VisualControlHandle.tsx
18065
- import { useCallback as useCallback86, useContext as useContext53, useEffect as useEffect54, useState as useState61 } from "react";
18054
+ import { useCallback as useCallback86, useContext as useContext52, useEffect as useEffect54, useState as useState60 } from "react";
18066
18055
  import { NoReactInternals as NoReactInternals12 } from "remotion/no-react";
18067
18056
 
18068
18057
  // src/fast-refresh-context.ts
@@ -18074,9 +18063,9 @@ var FastRefreshContext = createContext20({
18074
18063
  });
18075
18064
 
18076
18065
  // src/components/VisualControls/get-original-stack-trace.ts
18077
- import { useEffect as useEffect53, useState as useState59 } from "react";
18066
+ import { useEffect as useEffect53, useState as useState58 } from "react";
18078
18067
  var useOriginalFileName = (stack2) => {
18079
- const [originalFileName, setOriginalFileName] = useState59({ type: "loading" });
18068
+ const [originalFileName, setOriginalFileName] = useState58({ type: "loading" });
18080
18069
  useEffect53(() => {
18081
18070
  if (!stack2) {
18082
18071
  return;
@@ -18098,7 +18087,7 @@ var useOriginalFileName = (stack2) => {
18098
18087
  };
18099
18088
 
18100
18089
  // src/components/VisualControls/ClickableFileName.tsx
18101
- import { useCallback as useCallback85, useMemo as useMemo96, useState as useState60 } from "react";
18090
+ import { useCallback as useCallback85, useMemo as useMemo96, useState as useState59 } from "react";
18102
18091
 
18103
18092
  // src/components/Timeline/TimelineStack/source-attribution.ts
18104
18093
  var getOriginalSourceAttribution = (originalLocation) => {
@@ -18123,7 +18112,7 @@ var container33 = {
18123
18112
  var ClickableFileName = ({
18124
18113
  originalFileName
18125
18114
  }) => {
18126
- const [titleHovered, setTitleHovered] = useState60(false);
18115
+ const [titleHovered, setTitleHovered] = useState59(false);
18127
18116
  const hoverEffect = titleHovered && originalFileName.type === "loaded";
18128
18117
  const onTitlePointerEnter = useCallback85(() => {
18129
18118
  setTitleHovered(true);
@@ -18173,10 +18162,10 @@ var VisualControlHandle = ({ value, keyName }) => {
18173
18162
  throw new Error("expected zod");
18174
18163
  }
18175
18164
  const zodTypes = useZodTypesIfPossible();
18176
- const state = useContext53(VisualControlsContext);
18177
- const { updateValue } = useContext53(SetVisualControlsContext);
18178
- const { fastRefreshes, increaseManualRefreshes } = useContext53(FastRefreshContext);
18179
- const [_saving, setSaving] = useState61(false);
18165
+ const state = useContext52(VisualControlsContext);
18166
+ const { updateValue } = useContext52(SetVisualControlsContext);
18167
+ const { fastRefreshes, increaseManualRefreshes } = useContext52(FastRefreshContext);
18168
+ const [_saving, setSaving] = useState60(false);
18180
18169
  const currentValue = getVisualControlEditedValue({
18181
18170
  handles: state.handles,
18182
18171
  key: keyName
@@ -18265,7 +18254,7 @@ var container34 = {
18265
18254
  overflowY: "auto"
18266
18255
  };
18267
18256
  var VisualControlsContent = () => {
18268
- const { handles } = useContext54(VisualControlsContext);
18257
+ const { handles } = useContext53(VisualControlsContext);
18269
18258
  const entries = Object.entries(handles);
18270
18259
  return /* @__PURE__ */ jsx166("div", {
18271
18260
  style: container34,
@@ -18308,10 +18297,10 @@ var persistSelectedOptionsSidebarPanel2 = (panel2) => {
18308
18297
  };
18309
18298
  var optionsSidebarTabs = createRef10();
18310
18299
  var OptionsPanel = ({ readOnlyStudio }) => {
18311
- const { props, updateProps } = useContext55(Internals36.EditorPropsContext);
18300
+ const { props, updateProps } = useContext54(Internals36.EditorPropsContext);
18312
18301
  const renderingAvailable = !readOnlyStudio || SHOW_BROWSER_RENDERING;
18313
18302
  const isMobileLayout = useMobileLayout();
18314
- const visualControlsTabActivated = useContext55(VisualControlsTabActivatedContext);
18303
+ const visualControlsTabActivated = useContext54(VisualControlsTabActivatedContext);
18315
18304
  const container35 = useMemo97(() => ({
18316
18305
  height: "100%",
18317
18306
  width: "100%",
@@ -18320,7 +18309,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
18320
18309
  flexDirection: "column",
18321
18310
  flex: 1
18322
18311
  }), [isMobileLayout]);
18323
- const [panel2, setPanel] = useState62(() => getSelectedPanel2(renderingAvailable));
18312
+ const [panel2, setPanel] = useState61(() => getSelectedPanel2(renderingAvailable));
18324
18313
  const onPropsSelected = useCallback87(() => {
18325
18314
  setPanel("input-props");
18326
18315
  persistSelectedOptionsSidebarPanel2("input-props");
@@ -18341,7 +18330,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
18341
18330
  }
18342
18331
  };
18343
18332
  }, []);
18344
- const { compositions, canvasContent } = useContext55(Internals36.CompositionManager);
18333
+ const { compositions, canvasContent } = useContext54(Internals36.CompositionManager);
18345
18334
  const composition = useMemo97(() => {
18346
18335
  if (canvasContent === null || canvasContent.type !== "composition") {
18347
18336
  return null;
@@ -18478,7 +18467,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
18478
18467
  };
18479
18468
 
18480
18469
  // src/components/PreviewToolbar.tsx
18481
- import { useContext as useContext61, useEffect as useEffect60, useRef as useRef33, useState as useState66 } from "react";
18470
+ import { useContext as useContext60, useEffect as useEffect60, useRef as useRef33, useState as useState65 } from "react";
18482
18471
  import { Internals as Internals44 } from "remotion";
18483
18472
 
18484
18473
  // src/state/loop.ts
@@ -18492,7 +18481,7 @@ var loadLoopOption = () => {
18492
18481
  };
18493
18482
 
18494
18483
  // src/components/CheckboardToggle.tsx
18495
- import { useCallback as useCallback88, useContext as useContext56 } from "react";
18484
+ import { useCallback as useCallback88, useContext as useContext55 } from "react";
18496
18485
  import { NoReactInternals as NoReactInternals13 } from "remotion/no-react";
18497
18486
  import { jsx as jsx168 } from "react/jsx-runtime";
18498
18487
  var accessibilityLabel2 = [
@@ -18500,7 +18489,7 @@ var accessibilityLabel2 = [
18500
18489
  areKeyboardShortcutsDisabled() ? null : "(T)"
18501
18490
  ].filter(NoReactInternals13.truthy).join(" ");
18502
18491
  var CheckboardToggle = () => {
18503
- const { checkerboard, setCheckerboard } = useContext56(CheckerboardContext);
18492
+ const { checkerboard, setCheckerboard } = useContext55(CheckerboardContext);
18504
18493
  const onClick = useCallback88(() => {
18505
18494
  setCheckerboard((c) => {
18506
18495
  return !c;
@@ -18531,10 +18520,10 @@ var CheckboardToggle = () => {
18531
18520
  // src/components/FpsCounter.tsx
18532
18521
  import {
18533
18522
  useEffect as useEffect55,
18534
- useLayoutEffect as useLayoutEffect5,
18523
+ useLayoutEffect as useLayoutEffect4,
18535
18524
  useMemo as useMemo98,
18536
18525
  useRef as useRef31,
18537
- useState as useState63
18526
+ useState as useState62
18538
18527
  } from "react";
18539
18528
  import { Internals as Internals37 } from "remotion";
18540
18529
  import { jsxs as jsxs82 } from "react/jsx-runtime";
@@ -18552,17 +18541,17 @@ var FpsCounter = ({ playbackSpeed }) => {
18552
18541
  const videoConfig = Internals37.useUnsafeVideoConfig();
18553
18542
  const [playing] = Internals37.Timeline.usePlayingState();
18554
18543
  const frame2 = Internals37.Timeline.useTimelinePosition();
18555
- const [marker, rerender] = useState63({});
18556
- const [fps, setFps] = useState63(0);
18544
+ const [marker, rerender] = useState62({});
18545
+ const [fps, setFps] = useState62(0);
18557
18546
  const previousUpdates = useRef31([]);
18558
18547
  const fpsRef = useRef31(0);
18559
18548
  const playingRef = useRef31(playing);
18560
- useLayoutEffect5(() => {
18549
+ useLayoutEffect4(() => {
18561
18550
  fpsRef.current = 0;
18562
18551
  previousUpdates.current = [];
18563
18552
  playingRef.current = playing;
18564
18553
  }, [playing]);
18565
- useLayoutEffect5(() => {
18554
+ useLayoutEffect4(() => {
18566
18555
  if (playingRef.current === false)
18567
18556
  return;
18568
18557
  previousUpdates.current = pushWithMaxSize(previousUpdates.current, performance.now(), 15);
@@ -18612,7 +18601,7 @@ var FpsCounter = ({ playbackSpeed }) => {
18612
18601
  };
18613
18602
 
18614
18603
  // src/components/FullscreenToggle.tsx
18615
- import { useCallback as useCallback89, useContext as useContext57, useEffect as useEffect56 } from "react";
18604
+ import { useCallback as useCallback89, useContext as useContext56, useEffect as useEffect56 } from "react";
18616
18605
  import { Internals as Internals38 } from "remotion";
18617
18606
  import { NoReactInternals as NoReactInternals14 } from "remotion/no-react";
18618
18607
  import { jsx as jsx169 } from "react/jsx-runtime";
@@ -18622,7 +18611,7 @@ var accessibilityLabel3 = [
18622
18611
  ].filter(NoReactInternals14.truthy).join(" ");
18623
18612
  var FullScreenToggle = () => {
18624
18613
  const keybindings = useKeybinding();
18625
- const { setSize } = useContext57(Internals38.PreviewSizeContext);
18614
+ const { setSize } = useContext56(Internals38.PreviewSizeContext);
18626
18615
  const onClick = useCallback89(() => {
18627
18616
  drawRef.current?.requestFullscreen();
18628
18617
  if (document.fullscreenElement)
@@ -18856,7 +18845,7 @@ var PlaybackRatePersistor = () => {
18856
18845
  };
18857
18846
 
18858
18847
  // src/components/PlaybackRateSelector.tsx
18859
- import { useContext as useContext58, useMemo as useMemo99 } from "react";
18848
+ import { useContext as useContext57, useMemo as useMemo99 } from "react";
18860
18849
  import { Internals as Internals40 } from "remotion";
18861
18850
  import { jsx as jsx173 } from "react/jsx-runtime";
18862
18851
  var commonPlaybackRates = [
@@ -18878,7 +18867,7 @@ var getPlaybackRateLabel = (playbackRate) => {
18878
18867
  var accessibilityLabel5 = "Change the playback rate";
18879
18868
  var comboStyle2 = { width: 80 };
18880
18869
  var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
18881
- const { canvasContent } = useContext58(Internals40.CompositionManager);
18870
+ const { canvasContent } = useContext57(Internals40.CompositionManager);
18882
18871
  const isStill = useIsStill();
18883
18872
  const style9 = useMemo99(() => {
18884
18873
  return {
@@ -18928,7 +18917,7 @@ var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
18928
18917
 
18929
18918
  // src/components/PlayPause.tsx
18930
18919
  import { PlayerInternals as PlayerInternals13 } from "@remotion/player";
18931
- import { useCallback as useCallback93, useEffect as useEffect59, useState as useState64 } from "react";
18920
+ import { useCallback as useCallback93, useEffect as useEffect59, useState as useState63 } from "react";
18932
18921
  import { Internals as Internals41 } from "remotion";
18933
18922
 
18934
18923
  // src/icons/jump-to-start.tsx
@@ -19025,7 +19014,7 @@ var iconButton = {
19025
19014
  var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds }) => {
19026
19015
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
19027
19016
  const videoConfig = Internals41.useUnsafeVideoConfig();
19028
- const [showBufferIndicator, setShowBufferState] = useState64(false);
19017
+ const [showBufferIndicator, setShowBufferState] = useState63(false);
19029
19018
  const {
19030
19019
  playing,
19031
19020
  play,
@@ -19287,7 +19276,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds }) => {
19287
19276
 
19288
19277
  // src/components/RenderButton.tsx
19289
19278
  import { PlayerInternals as PlayerInternals14 } from "@remotion/player";
19290
- import { useCallback as useCallback94, useContext as useContext59, useMemo as useMemo100, useRef as useRef32, useState as useState65 } from "react";
19279
+ import { useCallback as useCallback94, useContext as useContext58, useMemo as useMemo100, useRef as useRef32, useState as useState64 } from "react";
19291
19280
  import ReactDOM9 from "react-dom";
19292
19281
  import { Internals as Internals42 } from "remotion";
19293
19282
  import { jsx as jsx180, jsxs as jsxs84, Fragment as Fragment24 } from "react/jsx-runtime";
@@ -19358,9 +19347,9 @@ var RenderButton = ({
19358
19347
  readOnlyStudio
19359
19348
  }) => {
19360
19349
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
19361
- const { setSelectedModal } = useContext59(ModalsContext);
19362
- const [preferredRenderType, setPreferredRenderType] = useState65(() => getInitialRenderType(readOnlyStudio));
19363
- const [dropdownOpened, setDropdownOpened] = useState65(false);
19350
+ const { setSelectedModal } = useContext58(ModalsContext);
19351
+ const [preferredRenderType, setPreferredRenderType] = useState64(() => getInitialRenderType(readOnlyStudio));
19352
+ const [dropdownOpened, setDropdownOpened] = useState64(false);
19364
19353
  const dropdownRef = useRef32(null);
19365
19354
  const containerRef = useRef32(null);
19366
19355
  const { currentZIndex } = useZIndex();
@@ -19397,7 +19386,7 @@ var RenderButton = ({
19397
19386
  return !o;
19398
19387
  });
19399
19388
  }, [refresh]);
19400
- const connectionStatus = useContext59(StudioServerConnectionCtx).previewServerState.type;
19389
+ const connectionStatus = useContext58(StudioServerConnectionCtx).previewServerState.type;
19401
19390
  const canServerRender = connectionStatus === "connected";
19402
19391
  const canRender = canServerRender || SHOW_BROWSER_RENDERING || readOnlyStudio;
19403
19392
  const renderType = useMemo100(() => {
@@ -19427,7 +19416,7 @@ var RenderButton = ({
19427
19416
  }, []);
19428
19417
  const video = Internals42.useVideo();
19429
19418
  const getCurrentFrame2 = PlayerInternals14.useFrameImperative();
19430
- const { props } = useContext59(Internals42.EditorPropsContext);
19419
+ const { props } = useContext58(Internals42.EditorPropsContext);
19431
19420
  const openServerRenderModal = useCallback94((copyCommandOnly) => {
19432
19421
  if (!video) {
19433
19422
  return null;
@@ -19750,7 +19739,7 @@ var RenderButton = ({
19750
19739
  };
19751
19740
 
19752
19741
  // src/components/Timeline/TimelineZoomControls.tsx
19753
- import { useCallback as useCallback95, useContext as useContext60 } from "react";
19742
+ import { useCallback as useCallback95, useContext as useContext59 } from "react";
19754
19743
  import { Internals as Internals43 } from "remotion";
19755
19744
 
19756
19745
  // src/icons/minus.tsx
@@ -19783,8 +19772,8 @@ var iconStyle4 = {
19783
19772
  width: 14
19784
19773
  };
19785
19774
  var TimelineZoomControls = () => {
19786
- const { canvasContent } = useContext60(Internals43.CompositionManager);
19787
- const { setZoom, zoom: zoomMap } = useContext60(TimelineZoomCtx);
19775
+ const { canvasContent } = useContext59(Internals43.CompositionManager);
19776
+ const { setZoom, zoom: zoomMap } = useContext59(TimelineZoomCtx);
19788
19777
  const { tabIndex } = useZIndex();
19789
19778
  const onMinusClicked = useCallback95(() => {
19790
19779
  if (canvasContent === null || canvasContent.type !== "composition") {
@@ -19912,15 +19901,15 @@ var padding2 = {
19912
19901
  };
19913
19902
  var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
19914
19903
  const { playbackRate, setPlaybackRate } = Internals44.useTimelineContext();
19915
- const { mediaMuted } = useContext61(Internals44.MediaVolumeContext);
19916
- const { setMediaMuted } = useContext61(Internals44.SetMediaVolumeContext);
19917
- const { canvasContent } = useContext61(Internals44.CompositionManager);
19904
+ const { mediaMuted } = useContext60(Internals44.MediaVolumeContext);
19905
+ const { setMediaMuted } = useContext60(Internals44.SetMediaVolumeContext);
19906
+ const { canvasContent } = useContext60(Internals44.CompositionManager);
19918
19907
  const isVideoComposition = useIsVideoComposition();
19919
19908
  const previewToolbarRef = useRef33(null);
19920
19909
  const leftScrollIndicatorRef = useRef33(null);
19921
19910
  const rightScrollIndicatorRef = useRef33(null);
19922
19911
  const isStill = useIsStill();
19923
- const [loop, setLoop] = useState66(loadLoopOption());
19912
+ const [loop, setLoop] = useState65(loadLoopOption());
19924
19913
  const isFullscreenSupported = checkFullscreenSupport();
19925
19914
  const isMobileLayout = useMobileLayout();
19926
19915
  useEffect60(() => {
@@ -20074,7 +20063,7 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
20074
20063
  };
20075
20064
 
20076
20065
  // src/components/Splitter/SplitterContainer.tsx
20077
- import { useMemo as useMemo101, useRef as useRef34, useState as useState67 } from "react";
20066
+ import { useMemo as useMemo101, useRef as useRef34, useState as useState66 } from "react";
20078
20067
 
20079
20068
  // src/state/timeline.ts
20080
20069
  var localStorageKey4 = (id) => `remotion.editor.timelineFlex.${id}`;
@@ -20128,7 +20117,7 @@ var containerColumn = {
20128
20117
  };
20129
20118
  var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex, id }) => {
20130
20119
  const [initialTimelineFlex, persistFlex] = useTimelineFlex(id);
20131
- const [flexValue, setFlexValue] = useState67(initialTimelineFlex ?? defaultFlex);
20120
+ const [flexValue, setFlexValue] = useState66(initialTimelineFlex ?? defaultFlex);
20132
20121
  const ref2 = useRef34(null);
20133
20122
  const isDragging = useRef34(false);
20134
20123
  const value = useMemo101(() => {
@@ -20165,11 +20154,11 @@ var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex,
20165
20154
  };
20166
20155
 
20167
20156
  // src/components/Splitter/SplitterElement.tsx
20168
- import { useContext as useContext62, useMemo as useMemo102 } from "react";
20157
+ import { useContext as useContext61, useMemo as useMemo102 } from "react";
20169
20158
  import { interpolateColors, random } from "remotion";
20170
20159
  import { jsx as jsx185, jsxs as jsxs87, Fragment as Fragment26 } from "react/jsx-runtime";
20171
20160
  var SplitterElement = ({ children, type, sticky }) => {
20172
- const context = useContext62(SplitterContext);
20161
+ const context = useContext61(SplitterContext);
20173
20162
  const style9 = useMemo102(() => {
20174
20163
  return {
20175
20164
  flex: (type === "flexer" ? context.flexValue : 1 - context.flexValue) * 1000,
@@ -20203,7 +20192,7 @@ var SplitterElement = ({ children, type, sticky }) => {
20203
20192
 
20204
20193
  // src/components/Splitter/SplitterHandle.tsx
20205
20194
  import { PlayerInternals as PlayerInternals15 } from "@remotion/player";
20206
- import { useContext as useContext63, useEffect as useEffect61, useRef as useRef35, useState as useState68 } from "react";
20195
+ import { useContext as useContext62, useEffect as useEffect61, useRef as useRef35, useState as useState67 } from "react";
20207
20196
  import { jsx as jsx186 } from "react/jsx-runtime";
20208
20197
  var SPLITTER_HANDLE_SIZE = 3;
20209
20198
  var containerRow2 = {
@@ -20213,11 +20202,11 @@ var containerColumn2 = {
20213
20202
  width: SPLITTER_HANDLE_SIZE
20214
20203
  };
20215
20204
  var SplitterHandle = ({ allowToCollapse, onCollapse }) => {
20216
- const context = useContext63(SplitterContext);
20205
+ const context = useContext62(SplitterContext);
20217
20206
  if (!context) {
20218
20207
  throw new Error("Cannot find splitter context");
20219
20208
  }
20220
- const [lastPointerUp, setLastPointerUp] = useState68(() => Date.now());
20209
+ const [lastPointerUp, setLastPointerUp] = useState67(() => Date.now());
20221
20210
  const ref2 = useRef35(null);
20222
20211
  useEffect61(() => {
20223
20212
  if (context.isDragging.current) {
@@ -20368,7 +20357,7 @@ var row5 = {
20368
20357
  minHeight: 0
20369
20358
  };
20370
20359
  var useResponsiveSidebarStatus = () => {
20371
- const { sidebarCollapsedStateLeft } = useContext64(SidebarContext);
20360
+ const { sidebarCollapsedStateLeft } = useContext63(SidebarContext);
20372
20361
  const responsiveLeftStatus = useBreakpoint(1200) ? "collapsed" : "expanded";
20373
20362
  const actualStateLeft = useMemo103(() => {
20374
20363
  if (sidebarCollapsedStateLeft === "collapsed") {
@@ -20382,9 +20371,9 @@ var useResponsiveSidebarStatus = () => {
20382
20371
  return actualStateLeft;
20383
20372
  };
20384
20373
  var TopPanelInner = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelayInMilliseconds }) => {
20385
- const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext64(SidebarContext);
20374
+ const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext63(SidebarContext);
20386
20375
  const rulersAreVisible = useIsRulerVisible();
20387
- const { canvasContent } = useContext64(Internals45.CompositionManager);
20376
+ const { canvasContent } = useContext63(Internals45.CompositionManager);
20388
20377
  const actualStateLeft = useResponsiveSidebarStatus();
20389
20378
  const actualStateRight = useMemo103(() => {
20390
20379
  if (sidebarCollapsedStateRight === "collapsed") {
@@ -20506,7 +20495,7 @@ var style9 = {
20506
20495
  position: "relative"
20507
20496
  };
20508
20497
  var SidebarCollapserControls = () => {
20509
- const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext65(SidebarContext);
20498
+ const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext64(SidebarContext);
20510
20499
  const keybindings = useKeybinding();
20511
20500
  const leftSidebarStatus = useResponsiveSidebarStatus();
20512
20501
  const leftIcon = useCallback97((color) => {
@@ -20644,10 +20633,10 @@ var SidebarCollapserControls = () => {
20644
20633
  // src/components/UndoRedoButtons.tsx
20645
20634
  import {
20646
20635
  useCallback as useCallback98,
20647
- useContext as useContext66,
20636
+ useContext as useContext65,
20648
20637
  useEffect as useEffect64,
20649
20638
  useRef as useRef36,
20650
- useState as useState69
20639
+ useState as useState68
20651
20640
  } from "react";
20652
20641
 
20653
20642
  // src/icons/redo.tsx
@@ -20683,9 +20672,9 @@ var iconStyle5 = {
20683
20672
  height: 16
20684
20673
  };
20685
20674
  var UndoRedoButtons = () => {
20686
- const [undoFile, setUndoFile] = useState69(null);
20687
- const [redoFile, setRedoFile] = useState69(null);
20688
- const { subscribeToEvent } = useContext66(StudioServerConnectionCtx);
20675
+ const [undoFile, setUndoFile] = useState68(null);
20676
+ const [redoFile, setRedoFile] = useState68(null);
20677
+ const { subscribeToEvent } = useContext65(StudioServerConnectionCtx);
20689
20678
  const keybindings = useKeybinding();
20690
20679
  const undoInFlight = useRef36(false);
20691
20680
  const redoInFlight = useRef36(false);
@@ -20790,10 +20779,10 @@ var UndoRedoButtons = () => {
20790
20779
  // src/components/UpdateCheck.tsx
20791
20780
  import {
20792
20781
  useCallback as useCallback99,
20793
- useContext as useContext67,
20782
+ useContext as useContext66,
20794
20783
  useEffect as useEffect65,
20795
20784
  useMemo as useMemo104,
20796
- useState as useState70
20785
+ useState as useState69
20797
20786
  } from "react";
20798
20787
  import { VERSION } from "remotion";
20799
20788
  import { jsx as jsx192 } from "react/jsx-runtime";
@@ -20809,10 +20798,10 @@ var buttonStyle3 = {
20809
20798
  justifyContent: "center"
20810
20799
  };
20811
20800
  var UpdateCheck = () => {
20812
- const [info, setInfo] = useState70(null);
20813
- const { setSelectedModal } = useContext67(ModalsContext);
20801
+ const [info, setInfo] = useState69(null);
20802
+ const { setSelectedModal } = useContext66(ModalsContext);
20814
20803
  const { tabIndex } = useZIndex();
20815
- const [knownBugs, setKnownBugs] = useState70(null);
20804
+ const [knownBugs, setKnownBugs] = useState69(null);
20816
20805
  const hasKnownBugs = useMemo104(() => {
20817
20806
  return knownBugs && knownBugs.length > 0;
20818
20807
  }, [knownBugs]);
@@ -20908,7 +20897,7 @@ var flex2 = {
20908
20897
  flex: 1
20909
20898
  };
20910
20899
  var MenuToolbar = ({ readOnlyStudio }) => {
20911
- const [selected, setSelected] = useState71(null);
20900
+ const [selected, setSelected] = useState70(null);
20912
20901
  const mobileLayout = useMobileLayout();
20913
20902
  const fixedWidthRight = useMemo105(() => {
20914
20903
  return {
@@ -21014,7 +21003,7 @@ var MenuToolbar = ({ readOnlyStudio }) => {
21014
21003
  };
21015
21004
 
21016
21005
  // src/components/Timeline/Timeline.tsx
21017
- import React152, { useContext as useContext80, useMemo as useMemo123 } from "react";
21006
+ import React152, { useContext as useContext79, useMemo as useMemo123 } from "react";
21018
21007
  import { Internals as Internals57 } from "remotion";
21019
21008
 
21020
21009
  // src/helpers/get-sequence-visible-range.ts
@@ -21165,7 +21154,7 @@ var calculateTimeline = ({
21165
21154
  };
21166
21155
 
21167
21156
  // src/components/ExpandedTracksProvider.tsx
21168
- import { createContext as createContext21, useCallback as useCallback101, useMemo as useMemo106, useState as useState72 } from "react";
21157
+ import { createContext as createContext21, useCallback as useCallback101, useMemo as useMemo106, useState as useState71 } from "react";
21169
21158
  import { jsx as jsx194 } from "react/jsx-runtime";
21170
21159
  var ExpandedTracksContext = createContext21({
21171
21160
  expandedTracks: {},
@@ -21174,7 +21163,7 @@ var ExpandedTracksContext = createContext21({
21174
21163
  }
21175
21164
  });
21176
21165
  var ExpandedTracksProvider = ({ children }) => {
21177
- const [expandedTracks, setExpandedTracks] = useState72({});
21166
+ const [expandedTracks, setExpandedTracks] = useState71({});
21178
21167
  const toggleTrack = useCallback101((id) => {
21179
21168
  setExpandedTracks((prev) => ({
21180
21169
  ...prev,
@@ -21231,16 +21220,16 @@ var MaxTimelineTracksReached = () => {
21231
21220
  import { PlayerInternals as PlayerInternals16 } from "@remotion/player";
21232
21221
  import {
21233
21222
  useCallback as useCallback102,
21234
- useContext as useContext70,
21223
+ useContext as useContext69,
21235
21224
  useEffect as useEffect66,
21236
21225
  useMemo as useMemo108,
21237
21226
  useRef as useRef37,
21238
- useState as useState73
21227
+ useState as useState72
21239
21228
  } from "react";
21240
21229
  import { Internals as Internals47, useVideoConfig as useVideoConfig4 } from "remotion";
21241
21230
 
21242
21231
  // src/components/Timeline/TimelineInOutPointer.tsx
21243
- import { createRef as createRef11, useContext as useContext68 } from "react";
21232
+ import { createRef as createRef11, useContext as useContext67 } from "react";
21244
21233
  import { Internals as Internals46 } from "remotion";
21245
21234
  import { jsx as jsx195, jsxs as jsxs93, Fragment as Fragment29 } from "react/jsx-runtime";
21246
21235
  var areaHighlight = {
@@ -21255,7 +21244,7 @@ var outMarkerAreaRef = createRef11();
21255
21244
  var TimelineInOutPointer = () => {
21256
21245
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
21257
21246
  const videoConfig = Internals46.useUnsafeVideoConfig();
21258
- const timelineWidth = useContext68(TimelineWidthContext);
21247
+ const timelineWidth = useContext67(TimelineWidthContext);
21259
21248
  if (!videoConfig || timelineWidth === null) {
21260
21249
  return null;
21261
21250
  }
@@ -21282,7 +21271,7 @@ var TimelineInOutPointer = () => {
21282
21271
  };
21283
21272
 
21284
21273
  // src/components/Timeline/TimelineInOutPointerHandle.tsx
21285
- import { createRef as createRef12, useContext as useContext69, useMemo as useMemo107 } from "react";
21274
+ import { createRef as createRef12, useContext as useContext68, useMemo as useMemo107 } from "react";
21286
21275
  import { useVideoConfig as useVideoConfig3 } from "remotion";
21287
21276
  import { jsx as jsx196 } from "react/jsx-runtime";
21288
21277
  var line3 = {
@@ -21315,7 +21304,7 @@ var TimelineInOutPointerHandle = ({
21315
21304
  type,
21316
21305
  atFrame
21317
21306
  }) => {
21318
- const timelineWidth = useContext69(TimelineWidthContext);
21307
+ const timelineWidth = useContext68(TimelineWidthContext);
21319
21308
  if (timelineWidth === null) {
21320
21309
  return null;
21321
21310
  }
@@ -21351,8 +21340,8 @@ var getClientXWithScroll = (x) => {
21351
21340
  };
21352
21341
  var TimelineDragHandler = () => {
21353
21342
  const video = Internals47.useUnsafeVideoConfig();
21354
- const { zoom: zoomMap } = useContext70(TimelineZoomCtx);
21355
- const { canvasContent } = useContext70(Internals47.CompositionManager);
21343
+ const { zoom: zoomMap } = useContext69(TimelineZoomCtx);
21344
+ const { canvasContent } = useContext69(Internals47.CompositionManager);
21356
21345
  const containerStyle2 = useMemo108(() => {
21357
21346
  if (!canvasContent || canvasContent.type !== "composition") {
21358
21347
  return {};
@@ -21380,10 +21369,10 @@ var Inner2 = () => {
21380
21369
  });
21381
21370
  const { isHighestContext } = useZIndex();
21382
21371
  const setFrame = Internals47.useTimelineSetFrame();
21383
- const [inOutDragging, setInOutDragging] = useState73({
21372
+ const [inOutDragging, setInOutDragging] = useState72({
21384
21373
  dragging: false
21385
21374
  });
21386
- const timelineWidth = useContext70(TimelineWidthContext);
21375
+ const timelineWidth = useContext69(TimelineWidthContext);
21387
21376
  const get = useCallback102((frame2) => {
21388
21377
  if (timelineWidth === null) {
21389
21378
  throw new Error("timeline width is not yet determined");
@@ -21394,7 +21383,7 @@ var Inner2 = () => {
21394
21383
  const left3 = size4?.left ?? 0;
21395
21384
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
21396
21385
  const { setInAndOutFrames } = useTimelineSetInOutFramePosition();
21397
- const [dragging, setDragging] = useState73({
21386
+ const [dragging, setDragging] = useState72({
21398
21387
  dragging: false
21399
21388
  });
21400
21389
  const { playing, play, pause, seek } = PlayerInternals16.usePlayer();
@@ -21777,14 +21766,14 @@ import { PlayerInternals as PlayerInternals18 } from "@remotion/player";
21777
21766
  import { useRef as useRef41 } from "react";
21778
21767
 
21779
21768
  // src/components/Timeline/TimelineListItem.tsx
21780
- import { useCallback as useCallback111, useContext as useContext74, useMemo as useMemo116 } from "react";
21769
+ import { useCallback as useCallback111, useContext as useContext73, useMemo as useMemo116 } from "react";
21781
21770
  import { Internals as Internals50 } from "remotion";
21782
21771
 
21783
21772
  // src/components/Timeline/TimelineExpandedSection.tsx
21784
21773
  import React139, { useMemo as useMemo113 } from "react";
21785
21774
 
21786
21775
  // src/components/Timeline/TimelineFieldRow.tsx
21787
- import { useCallback as useCallback107, useContext as useContext71, useMemo as useMemo112 } from "react";
21776
+ import { useCallback as useCallback107, useContext as useContext70, useMemo as useMemo112 } from "react";
21788
21777
  import { Internals as Internals48 } from "remotion";
21789
21778
 
21790
21779
  // src/components/Timeline/TimelineBooleanField.tsx
@@ -21813,7 +21802,7 @@ var TimelineBooleanField = ({ field, codeValue, effectiveValue, canUpdate, onSav
21813
21802
  };
21814
21803
 
21815
21804
  // src/components/Timeline/TimelineNumberField.tsx
21816
- import { useCallback as useCallback104, useMemo as useMemo109, useState as useState74 } from "react";
21805
+ import { useCallback as useCallback104, useMemo as useMemo109, useState as useState73 } from "react";
21817
21806
 
21818
21807
  // src/components/Timeline/timeline-field-utils.ts
21819
21808
  var getDecimalPlaces = (num) => {
@@ -21836,7 +21825,7 @@ var TimelineNumberField = ({
21836
21825
  onDragEnd,
21837
21826
  codeValue
21838
21827
  }) => {
21839
- const [dragValue, setDragValue] = useState74(null);
21828
+ const [dragValue, setDragValue] = useState73(null);
21840
21829
  const onValueChange = useCallback104((newVal) => {
21841
21830
  setDragValue(newVal);
21842
21831
  onDragValueChange(field.key, newVal);
@@ -21888,7 +21877,7 @@ var TimelineNumberField = ({
21888
21877
  };
21889
21878
 
21890
21879
  // src/components/Timeline/TimelineRotationField.tsx
21891
- import { useCallback as useCallback105, useMemo as useMemo110, useState as useState75 } from "react";
21880
+ import { useCallback as useCallback105, useMemo as useMemo110, useState as useState74 } from "react";
21892
21881
  import { jsx as jsx200 } from "react/jsx-runtime";
21893
21882
  var unitPattern = /^([+-]?(?:\d+\.?\d*|\.\d+))(deg|rad|turn|grad)$/;
21894
21883
  var unitToDegrees = {
@@ -21918,7 +21907,7 @@ var TimelineRotationField = ({
21918
21907
  onDragValueChange,
21919
21908
  onDragEnd
21920
21909
  }) => {
21921
- const [dragValue, setDragValue] = useState75(null);
21910
+ const [dragValue, setDragValue] = useState74(null);
21922
21911
  const degrees = useMemo110(() => parseCssRotationToDegrees(String(effectiveValue ?? "0deg")), [effectiveValue]);
21923
21912
  const onValueChange = useCallback105((newVal) => {
21924
21913
  setDragValue(newVal);
@@ -21976,7 +21965,7 @@ var TimelineRotationField = ({
21976
21965
  };
21977
21966
 
21978
21967
  // src/components/Timeline/TimelineTranslateField.tsx
21979
- import { useCallback as useCallback106, useMemo as useMemo111, useState as useState76 } from "react";
21968
+ import { useCallback as useCallback106, useMemo as useMemo111, useState as useState75 } from "react";
21980
21969
  import { jsx as jsx201, jsxs as jsxs95 } from "react/jsx-runtime";
21981
21970
  var leftDraggerStyle = {
21982
21971
  paddingLeft: 0
@@ -22005,8 +21994,8 @@ var TimelineTranslateField = ({
22005
21994
  onDragValueChange,
22006
21995
  onDragEnd
22007
21996
  }) => {
22008
- const [dragX, setDragX] = useState76(null);
22009
- const [dragY, setDragY] = useState76(null);
21997
+ const [dragX, setDragX] = useState75(null);
21998
+ const [dragY, setDragY] = useState75(null);
22010
21999
  const [codeX, codeY] = useMemo111(() => parseTranslate(String(effectiveValue ?? "0px 0px")), [effectiveValue]);
22011
22000
  const makeString = useCallback106((x, y) => `${x}px ${y}px`, []);
22012
22001
  const step = field.fieldSchema.type === "translate" ? field.fieldSchema.step ?? 1 : 1;
@@ -22280,7 +22269,7 @@ var TimelineFieldRow = ({
22280
22269
  clearDragOverrides,
22281
22270
  dragOverrides,
22282
22271
  codeValues: allPropStatuses
22283
- } = useContext71(Internals48.VisualModeOverridesContext);
22272
+ } = useContext70(Internals48.VisualModeOverridesContext);
22284
22273
  const propStatuses = allPropStatuses[overrideId] ?? null;
22285
22274
  const propStatus = propStatuses?.[field.key] ?? null;
22286
22275
  const dragOverrideValue = useMemo112(() => {
@@ -22293,7 +22282,7 @@ var TimelineFieldRow = ({
22293
22282
  defaultValue: field.fieldSchema.default,
22294
22283
  shouldResortToDefaultValueIfUndefined: true
22295
22284
  });
22296
- const { setCodeValues } = useContext71(Internals48.VisualModeOverridesContext);
22285
+ const { setCodeValues } = useContext70(Internals48.VisualModeOverridesContext);
22297
22286
  const onSave = useCallback107((key4, value) => {
22298
22287
  if (!propStatuses || !validatedLocation || !nodePath) {
22299
22288
  return Promise.reject(new Error("Cannot save"));
@@ -22507,7 +22496,7 @@ var TimelineLayerEye = ({ onInvoked, hidden, type }) => {
22507
22496
 
22508
22497
  // src/components/Timeline/TimelineStack/index.tsx
22509
22498
  import { SOURCE_MAP_ENDPOINT } from "@remotion/studio-shared";
22510
- import { useCallback as useCallback109, useContext as useContext72, useMemo as useMemo114, useState as useState77 } from "react";
22499
+ import { useCallback as useCallback109, useContext as useContext71, useMemo as useMemo114, useState as useState76 } from "react";
22511
22500
  import { SourceMapConsumer as SourceMapConsumer3 } from "source-map";
22512
22501
  import { jsx as jsx206, jsxs as jsxs98, Fragment as Fragment30 } from "react/jsx-runtime";
22513
22502
  var publicPath = window.remotion_publicPath === "/" ? "" : window.remotion_publicPath;
@@ -22516,11 +22505,11 @@ SourceMapConsumer3.initialize({
22516
22505
  "lib/mappings.wasm": withoutSlashInTheEnd + SOURCE_MAP_ENDPOINT
22517
22506
  });
22518
22507
  var TimelineStack = ({ isCompact, sequence, originalLocation }) => {
22519
- const [stackHovered, setStackHovered] = useState77(false);
22520
- const [titleHovered, setTitleHovered] = useState77(false);
22521
- const [opening, setOpening] = useState77(false);
22508
+ const [stackHovered, setStackHovered] = useState76(false);
22509
+ const [titleHovered, setTitleHovered] = useState76(false);
22510
+ const [opening, setOpening] = useState76(false);
22522
22511
  const selectAsset = useSelectAsset();
22523
- const connectionStatus = useContext72(StudioServerConnectionCtx).previewServerState.type;
22512
+ const connectionStatus = useContext71(StudioServerConnectionCtx).previewServerState.type;
22524
22513
  const assetPath = useMemo114(() => {
22525
22514
  if (sequence.type !== "video" && sequence.type !== "audio" && sequence.type !== "image") {
22526
22515
  return null;
@@ -22671,15 +22660,15 @@ var TimelineStack = ({ isCompact, sequence, originalLocation }) => {
22671
22660
  // src/components/Timeline/use-sequence-props-subscription.ts
22672
22661
  import {
22673
22662
  useCallback as useCallback110,
22674
- useContext as useContext73,
22663
+ useContext as useContext72,
22675
22664
  useEffect as useEffect67,
22676
22665
  useMemo as useMemo115,
22677
22666
  useRef as useRef38,
22678
- useState as useState78
22667
+ useState as useState77
22679
22668
  } from "react";
22680
22669
  import { Internals as Internals49 } from "remotion";
22681
22670
  var useSequencePropsSubscription = (sequence, originalLocation, visualModeEnabled) => {
22682
- const { setCodeValues } = useContext73(Internals49.VisualModeOverridesContext);
22671
+ const { setCodeValues } = useContext72(Internals49.VisualModeOverridesContext);
22683
22672
  const overrideId = sequence.controls?.overrideId ?? null;
22684
22673
  const setPropStatusesForSequence = useCallback110((statuses) => {
22685
22674
  if (!overrideId) {
@@ -22687,7 +22676,7 @@ var useSequencePropsSubscription = (sequence, originalLocation, visualModeEnable
22687
22676
  }
22688
22677
  setCodeValues(overrideId, statuses);
22689
22678
  }, [overrideId, setCodeValues]);
22690
- const { previewServerState: state, subscribeToEvent } = useContext73(StudioServerConnectionCtx);
22679
+ const { previewServerState: state, subscribeToEvent } = useContext72(StudioServerConnectionCtx);
22691
22680
  const clientId = state.type === "connected" ? state.clientId : undefined;
22692
22681
  const schemaFields = useMemo115(() => getSchemaFields(sequence.controls), [sequence.controls]);
22693
22682
  const schemaKeysString = useMemo115(() => schemaFields ? schemaFields.map((f) => f.key).join(",") : null, [schemaFields]);
@@ -22711,8 +22700,8 @@ var useSequencePropsSubscription = (sequence, originalLocation, visualModeEnable
22711
22700
  const currentLocationColumn = useRef38(locationColumn);
22712
22701
  currentLocationColumn.current = locationColumn;
22713
22702
  const nodePathRef = useRef38(null);
22714
- const [nodePath, setNodePath] = useState78(null);
22715
- const [jsxInMapCallback, setJsxInMapCallback] = useState78(false);
22703
+ const [nodePath, setNodePath] = useState77(null);
22704
+ const [jsxInMapCallback, setJsxInMapCallback] = useState77(false);
22716
22705
  const isMountedRef = useRef38(true);
22717
22706
  const setNodePathBoth = useCallback110((next) => {
22718
22707
  nodePathRef.current = next;
@@ -22853,12 +22842,12 @@ var arrowButton = {
22853
22842
  lineHeight: 1
22854
22843
  };
22855
22844
  var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
22856
- const { previewServerState } = useContext74(StudioServerConnectionCtx);
22845
+ const { previewServerState } = useContext73(StudioServerConnectionCtx);
22857
22846
  const visualModeEnvEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED);
22858
22847
  const previewConnected = previewServerState.type === "connected";
22859
22848
  const visualModeActive = visualModeEnvEnabled && previewConnected;
22860
- const { hidden, setHidden } = useContext74(Internals50.SequenceVisibilityToggleContext);
22861
- const { expandedTracks, toggleTrack } = useContext74(ExpandedTracksContext);
22849
+ const { hidden, setHidden } = useContext73(Internals50.SequenceVisibilityToggleContext);
22850
+ const { expandedTracks, toggleTrack } = useContext73(ExpandedTracksContext);
22862
22851
  const originalLocation = useResolvedStack(sequence.stack ?? null);
22863
22852
  const { nodePath, jsxInMapCallback } = useSequencePropsSubscription(sequence, originalLocation, visualModeActive);
22864
22853
  const validatedLocation = useMemo116(() => {
@@ -23061,7 +23050,7 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
23061
23050
  };
23062
23051
 
23063
23052
  // src/components/Timeline/TimelineTimeIndicators.tsx
23064
- import { useContext as useContext75, useEffect as useEffect69, useMemo as useMemo117, useRef as useRef40 } from "react";
23053
+ import { useContext as useContext74, useEffect as useEffect69, useMemo as useMemo117, useRef as useRef40 } from "react";
23065
23054
  import { Internals as Internals52 } from "remotion";
23066
23055
 
23067
23056
  // src/components/TimeValue.tsx
@@ -23216,7 +23205,7 @@ var TimelineTimePadding = () => {
23216
23205
  });
23217
23206
  };
23218
23207
  var TimelineTimeIndicators = () => {
23219
- const sliderTrack = useContext75(TimelineWidthContext);
23208
+ const sliderTrack = useContext74(TimelineWidthContext);
23220
23209
  const video = Internals52.useVideo();
23221
23210
  if (sliderTrack === null) {
23222
23211
  return null;
@@ -23339,15 +23328,15 @@ var TimelineList = ({ timeline }) => {
23339
23328
  };
23340
23329
 
23341
23330
  // src/components/Timeline/TimelinePinchZoom.tsx
23342
- import { useCallback as useCallback113, useContext as useContext76, useEffect as useEffect70, useRef as useRef42 } from "react";
23331
+ import { useCallback as useCallback113, useContext as useContext75, useEffect as useEffect70, useRef as useRef42 } from "react";
23343
23332
  import { Internals as Internals53 } from "remotion";
23344
23333
  var ZOOM_WHEEL_DELTA = 0.06;
23345
23334
  var TimelinePinchZoom = () => {
23346
23335
  const isVideoComposition = useIsVideoComposition();
23347
23336
  const videoConfig = Internals53.useUnsafeVideoConfig();
23348
- const { canvasContent } = useContext76(Internals53.CompositionManager);
23349
- const { zoom, setZoom } = useContext76(TimelineZoomCtx);
23350
- const { editorZoomGestures } = useContext76(EditorZoomGesturesContext);
23337
+ const { canvasContent } = useContext75(Internals53.CompositionManager);
23338
+ const { zoom, setZoom } = useContext75(TimelineZoomCtx);
23339
+ const { editorZoomGestures } = useContext75(EditorZoomGesturesContext);
23351
23340
  const zoomRef = useRef42(zoom);
23352
23341
  zoomRef.current = zoom;
23353
23342
  const pinchBaseZoomRef = useRef42(null);
@@ -23556,15 +23545,15 @@ var TimelinePinchZoom = () => {
23556
23545
  };
23557
23546
 
23558
23547
  // src/components/Timeline/TimelinePlayCursorSyncer.tsx
23559
- import { useContext as useContext77, useEffect as useEffect71 } from "react";
23548
+ import { useContext as useContext76, useEffect as useEffect71 } from "react";
23560
23549
  import { Internals as Internals54 } from "remotion";
23561
23550
  var lastTimelinePositionWhileScrolling = null;
23562
23551
  var TimelinePlayCursorSyncer = () => {
23563
23552
  const video = Internals54.useVideo();
23564
23553
  const timelineContext = Internals54.useTimelineContext();
23565
23554
  const timelinePosition = Internals54.Timeline.useTimelinePosition();
23566
- const { canvasContent } = useContext77(Internals54.CompositionManager);
23567
- const { zoom: zoomMap } = useContext77(TimelineZoomCtx);
23555
+ const { canvasContent } = useContext76(Internals54.CompositionManager);
23556
+ const { zoom: zoomMap } = useContext76(TimelineZoomCtx);
23568
23557
  const compositionId = canvasContent && canvasContent.type === "composition" ? canvasContent.compositionId : null;
23569
23558
  const zoom = compositionId ? zoomMap[compositionId] ?? TIMELINE_MIN_ZOOM : null;
23570
23559
  if (zoom && video) {
@@ -23650,10 +23639,10 @@ var TimelineScrollable = ({ children }) => {
23650
23639
  };
23651
23640
 
23652
23641
  // src/components/Timeline/TimelineTracks.tsx
23653
- import { useContext as useContext79, useMemo as useMemo122 } from "react";
23642
+ import { useContext as useContext78, useMemo as useMemo122 } from "react";
23654
23643
 
23655
23644
  // src/components/Timeline/TimelineSequence.tsx
23656
- import { useContext as useContext78, useMemo as useMemo121 } from "react";
23645
+ import { useContext as useContext77, useMemo as useMemo121 } from "react";
23657
23646
  import { Internals as Internals56, useCurrentFrame as useCurrentFrame2 } from "remotion";
23658
23647
 
23659
23648
  // src/helpers/get-timeline-sequence-layout.ts
@@ -23725,7 +23714,7 @@ var getTimelineSequenceLayout = ({
23725
23714
  // src/helpers/use-max-media-duration.ts
23726
23715
  import { getVideoMetadata as getVideoMetadata2 } from "@remotion/media-utils";
23727
23716
  import { ALL_FORMATS as ALL_FORMATS2, Input as Input2, InputDisposedError, UrlSource as UrlSource2 } from "mediabunny";
23728
- import { useEffect as useEffect72, useState as useState79 } from "react";
23717
+ import { useEffect as useEffect72, useState as useState78 } from "react";
23729
23718
  var cache = new Map;
23730
23719
  var getSrc = (s) => {
23731
23720
  if (s.type === "video") {
@@ -23738,7 +23727,7 @@ var getSrc = (s) => {
23738
23727
  };
23739
23728
  var useMaxMediaDuration = (s, fps) => {
23740
23729
  const src = getSrc(s);
23741
- const [maxMediaDuration, setMaxMediaDuration] = useState79(src ? cache.get(src) ?? null : Infinity);
23730
+ const [maxMediaDuration, setMaxMediaDuration] = useState78(src ? cache.get(src) ?? null : Infinity);
23742
23731
  useEffect72(() => {
23743
23732
  if (!src) {
23744
23733
  return;
@@ -23771,7 +23760,7 @@ var useMaxMediaDuration = (s, fps) => {
23771
23760
  };
23772
23761
 
23773
23762
  // src/components/AudioWaveform.tsx
23774
- import { useEffect as useEffect73, useMemo as useMemo119, useRef as useRef43, useState as useState80 } from "react";
23763
+ import { useEffect as useEffect73, useMemo as useMemo119, useRef as useRef43, useState as useState79 } from "react";
23775
23764
  import { Internals as Internals55 } from "remotion";
23776
23765
 
23777
23766
  // src/components/parse-color.ts
@@ -23867,7 +23856,7 @@ async function loadWaveformPeaks(url, signal) {
23867
23856
  const { sampleRate } = audioTrack;
23868
23857
  const durationInSeconds = await audioTrack.computeDuration();
23869
23858
  const totalPeaks = Math.ceil(durationInSeconds * TARGET_SAMPLE_RATE);
23870
- const samplesPerPeak = Math.floor(sampleRate / TARGET_SAMPLE_RATE);
23859
+ const samplesPerPeak = Math.max(1, Math.floor(sampleRate / TARGET_SAMPLE_RATE));
23871
23860
  const peaks = new Float32Array(totalPeaks);
23872
23861
  let peakIndex = 0;
23873
23862
  let peakMax = 0;
@@ -23884,11 +23873,21 @@ async function loadWaveformPeaks(url, signal) {
23884
23873
  });
23885
23874
  const floats = new Float32Array(bytesNeeded / 4);
23886
23875
  sample.copyTo(floats, { format: "f32", planeIndex: 0 });
23876
+ const channels = Math.max(1, sample.numberOfChannels);
23877
+ const frames = sample.numberOfFrames;
23887
23878
  sample.close();
23888
- for (let i = 0;i < floats.length; i++) {
23889
- const abs = Math.abs(floats[i]);
23890
- if (abs > peakMax)
23891
- peakMax = abs;
23879
+ for (let frame2 = 0;frame2 < frames; frame2++) {
23880
+ let framePeak = 0;
23881
+ for (let channel = 0;channel < channels; channel++) {
23882
+ const sampleIndex = frame2 * channels + channel;
23883
+ const abs = Math.abs(floats[sampleIndex] ?? 0);
23884
+ if (abs > framePeak) {
23885
+ framePeak = abs;
23886
+ }
23887
+ }
23888
+ if (framePeak > peakMax) {
23889
+ peakMax = framePeak;
23890
+ }
23892
23891
  sampleInPeak++;
23893
23892
  if (sampleInPeak >= samplesPerPeak) {
23894
23893
  if (peakIndex < totalPeaks) {
@@ -23944,8 +23943,8 @@ var AudioWaveform = ({
23944
23943
  doesVolumeChange,
23945
23944
  playbackRate
23946
23945
  }) => {
23947
- const [peaks, setPeaks] = useState80(null);
23948
- const [error, setError] = useState80(null);
23946
+ const [peaks, setPeaks] = useState79(null);
23947
+ const [error, setError] = useState79(null);
23949
23948
  const vidConf = Internals55.useUnsafeVideoConfig();
23950
23949
  if (vidConf === null) {
23951
23950
  throw new Error("Expected video config");
@@ -24225,7 +24224,7 @@ var TimelineSequenceFrame = ({ roundedFrame, premounted, postmounted }) => {
24225
24224
  };
24226
24225
 
24227
24226
  // src/components/Timeline/TimelineVideoInfo.tsx
24228
- import { useEffect as useEffect75, useMemo as useMemo120, useRef as useRef45, useState as useState81 } from "react";
24227
+ import { useEffect as useEffect75, useMemo as useMemo120, useRef as useRef45, useState as useState80 } from "react";
24229
24228
  import { useVideoConfig as useVideoConfig5 } from "remotion";
24230
24229
 
24231
24230
  // src/helpers/extract-frames.ts
@@ -24587,7 +24586,7 @@ var TimelineVideoInfo = ({
24587
24586
  }) => {
24588
24587
  const { fps } = useVideoConfig5();
24589
24588
  const ref2 = useRef45(null);
24590
- const [error, setError] = useState81(null);
24589
+ const [error, setError] = useState80(null);
24591
24590
  const aspectRatio = useRef45(getAspectRatioFromCache(src));
24592
24591
  useEffect75(() => {
24593
24592
  if (error) {
@@ -24758,7 +24757,7 @@ var AUDIO_GRADIENT = "linear-gradient(rgb(16 171 58), rgb(43 165 63) 60%)";
24758
24757
  var VIDEO_GRADIENT = "linear-gradient(to top, #8e44ad, #9b59b6)";
24759
24758
  var IMAGE_GRADIENT = "linear-gradient(to top, #2980b9, #3498db)";
24760
24759
  var TimelineSequence = ({ s }) => {
24761
- const windowWidth = useContext78(TimelineWidthContext);
24760
+ const windowWidth = useContext77(TimelineWidthContext);
24762
24761
  if (windowWidth === null) {
24763
24762
  return null;
24764
24763
  }
@@ -24902,8 +24901,8 @@ var getExpandedPlaceholderStyle = (controls) => ({
24902
24901
  height: getExpandedTrackHeight(controls) + TIMELINE_ITEM_BORDER_BOTTOM
24903
24902
  });
24904
24903
  var TimelineTracks = ({ timeline, hasBeenCut }) => {
24905
- const { expandedTracks } = useContext79(ExpandedTracksContext);
24906
- const { previewServerState } = useContext79(StudioServerConnectionCtx);
24904
+ const { expandedTracks } = useContext78(ExpandedTracksContext);
24905
+ const { previewServerState } = useContext78(StudioServerConnectionCtx);
24907
24906
  const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
24908
24907
  const timelineStyle = useMemo122(() => {
24909
24908
  return {
@@ -24961,9 +24960,9 @@ var noop3 = () => {
24961
24960
  return;
24962
24961
  };
24963
24962
  var TimelineInner = () => {
24964
- const { sequences } = useContext80(Internals57.SequenceManager);
24965
- const { expandedTracks } = useContext80(ExpandedTracksContext);
24966
- const { previewServerState } = useContext80(StudioServerConnectionCtx);
24963
+ const { sequences } = useContext79(Internals57.SequenceManager);
24964
+ const { expandedTracks } = useContext79(ExpandedTracksContext);
24965
+ const { previewServerState } = useContext79(StudioServerConnectionCtx);
24967
24966
  const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
24968
24967
  const videoConfig = Internals57.useUnsafeVideoConfig();
24969
24968
  const videoConfigIsNull = videoConfig === null;
@@ -25077,7 +25076,7 @@ var container46 = {
25077
25076
  };
25078
25077
  var EditorContent = ({ readOnlyStudio, children }) => {
25079
25078
  const isStill = useIsStill();
25080
- const { canvasContent } = useContext81(Internals58.CompositionManager);
25079
+ const { canvasContent } = useContext80(Internals58.CompositionManager);
25081
25080
  const showTimeline = canvasContent !== null && !isStill && canvasContent.type === "composition";
25082
25081
  return /* @__PURE__ */ jsxs109("div", {
25083
25082
  style: container46,
@@ -25114,11 +25113,11 @@ var EditorContent = ({ readOnlyStudio, children }) => {
25114
25113
  };
25115
25114
 
25116
25115
  // src/components/GlobalKeybindings.tsx
25117
- import { useContext as useContext82, useEffect as useEffect76 } from "react";
25116
+ import { useContext as useContext81, useEffect as useEffect76 } from "react";
25118
25117
  var GlobalKeybindings = () => {
25119
25118
  const keybindings = useKeybinding();
25120
- const { setSelectedModal } = useContext82(ModalsContext);
25121
- const { setCheckerboard } = useContext82(CheckerboardContext);
25119
+ const { setSelectedModal } = useContext81(ModalsContext);
25120
+ const { setCheckerboard } = useContext81(CheckerboardContext);
25122
25121
  const { navigateToNextComposition, navigateToPreviousComposition } = useCompositionNavigation();
25123
25122
  useEffect76(() => {
25124
25123
  const nKey = keybindings.registerKeybinding({
@@ -25222,7 +25221,7 @@ var GlobalKeybindings = () => {
25222
25221
  };
25223
25222
 
25224
25223
  // src/components/Modals.tsx
25225
- import { useContext as useContext96 } from "react";
25224
+ import { useContext as useContext95 } from "react";
25226
25225
 
25227
25226
  // src/components/InstallPackage.tsx
25228
25227
  import {
@@ -25231,7 +25230,7 @@ import {
25231
25230
  extraPackages,
25232
25231
  installableMap
25233
25232
  } from "@remotion/studio-shared";
25234
- import React156, { useCallback as useCallback115, useContext as useContext84, useEffect as useEffect77 } from "react";
25233
+ import React156, { useCallback as useCallback115, useContext as useContext83, useEffect as useEffect77 } from "react";
25235
25234
  import { VERSION as VERSION2 } from "remotion";
25236
25235
 
25237
25236
  // src/api/install-package.ts
@@ -25319,10 +25318,10 @@ var ModalFooterContainer = ({ children }) => {
25319
25318
  };
25320
25319
 
25321
25320
  // src/components/NewComposition/DismissableModal.tsx
25322
- import { useCallback as useCallback114, useContext as useContext83 } from "react";
25321
+ import { useCallback as useCallback114, useContext as useContext82 } from "react";
25323
25322
  import { jsx as jsx226 } from "react/jsx-runtime";
25324
25323
  var DismissableModal = ({ children }) => {
25325
- const { setSelectedModal } = useContext83(ModalsContext);
25324
+ const { setSelectedModal } = useContext82(ModalsContext);
25326
25325
  const onQuit = useCallback114(() => {
25327
25326
  setSelectedModal(null);
25328
25327
  }, [setSelectedModal]);
@@ -25346,7 +25345,7 @@ var text2 = {
25346
25345
  var InstallPackageModal = ({ packageManager }) => {
25347
25346
  const [state, setState] = React156.useState({ type: "idle" });
25348
25347
  const [map, setMap] = React156.useState({});
25349
- const { previewServerState: ctx } = useContext84(StudioServerConnectionCtx);
25348
+ const { previewServerState: ctx } = useContext83(StudioServerConnectionCtx);
25350
25349
  const selectedPackages = Object.keys(map).filter((pkg) => map[pkg]);
25351
25350
  const onClick = useCallback115(async () => {
25352
25351
  if (state.type === "done") {
@@ -25516,10 +25515,10 @@ var InstallPackageModal = ({ packageManager }) => {
25516
25515
  };
25517
25516
 
25518
25517
  // src/components/NewComposition/DeleteComposition.tsx
25519
- import { useCallback as useCallback117, useContext as useContext87, useMemo as useMemo126 } from "react";
25518
+ import { useCallback as useCallback117, useContext as useContext86, useMemo as useMemo126 } from "react";
25520
25519
 
25521
25520
  // src/components/RenderModal/ResolveCompositionBeforeModal.tsx
25522
- import React157, { useContext as useContext85, useEffect as useEffect78, useMemo as useMemo125 } from "react";
25521
+ import React157, { useContext as useContext84, useEffect as useEffect78, useMemo as useMemo125 } from "react";
25523
25522
  import { Internals as Internals59 } from "remotion";
25524
25523
  import { jsx as jsx228, jsxs as jsxs112 } from "react/jsx-runtime";
25525
25524
  var loaderContainer2 = {
@@ -25541,7 +25540,7 @@ var loaderLabel2 = {
25541
25540
  var ResolvedCompositionContext = React157.createContext(null);
25542
25541
  var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
25543
25542
  const resolved = Internals59.useResolvedVideoConfig(compositionId);
25544
- const unresolvedContext = useContext85(Internals59.CompositionManager);
25543
+ const unresolvedContext = useContext84(Internals59.CompositionManager);
25545
25544
  const unresolved = unresolvedContext.compositions.find((c) => compositionId === c.id);
25546
25545
  useEffect78(() => {
25547
25546
  const { current } = Internals59.resolveCompositionsRef;
@@ -25601,7 +25600,7 @@ var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
25601
25600
  };
25602
25601
 
25603
25602
  // src/components/NewComposition/CodemodFooter.tsx
25604
- import { useCallback as useCallback116, useContext as useContext86, useEffect as useEffect79, useState as useState82 } from "react";
25603
+ import { useCallback as useCallback116, useContext as useContext85, useEffect as useEffect79, useState as useState81 } from "react";
25605
25604
 
25606
25605
  // src/components/NewComposition/DiffPreview.tsx
25607
25606
  import { jsx as jsx229, jsxs as jsxs113 } from "react/jsx-runtime";
@@ -25661,12 +25660,12 @@ var CodemodFooter = ({
25661
25660
  submitLabel,
25662
25661
  onSuccess
25663
25662
  }) => {
25664
- const [submitting, setSubmitting] = useState82(false);
25665
- const { setSelectedModal } = useContext86(ModalsContext);
25666
- const [codemodStatus, setCanApplyCodemod] = useState82({
25663
+ const [submitting, setSubmitting] = useState81(false);
25664
+ const { setSelectedModal } = useContext85(ModalsContext);
25665
+ const [codemodStatus, setCanApplyCodemod] = useState81({
25667
25666
  type: "loading"
25668
25667
  });
25669
- const [projectInfo, setProjectInfo] = useState82(null);
25668
+ const [projectInfo, setProjectInfo] = useState81(null);
25670
25669
  useEffect79(() => {
25671
25670
  const controller = new AbortController;
25672
25671
  getProjectInfo(controller.signal).then((info) => {
@@ -25787,7 +25786,7 @@ var content3 = {
25787
25786
  minWidth: 500
25788
25787
  };
25789
25788
  var DeleteCompositionLoaded = ({ compositionId }) => {
25790
- const context = useContext87(ResolvedCompositionContext);
25789
+ const context = useContext86(ResolvedCompositionContext);
25791
25790
  if (!context) {
25792
25791
  throw new Error("Resolved composition context");
25793
25792
  }
@@ -25862,7 +25861,7 @@ var DeleteComposition = ({ compositionId }) => {
25862
25861
  };
25863
25862
 
25864
25863
  // src/components/NewComposition/DuplicateComposition.tsx
25865
- import { useCallback as useCallback119, useContext as useContext88, useMemo as useMemo127, useState as useState83 } from "react";
25864
+ import { useCallback as useCallback119, useContext as useContext87, useMemo as useMemo127, useState as useState82 } from "react";
25866
25865
  import { Internals as Internals61 } from "remotion";
25867
25866
 
25868
25867
  // src/helpers/validate-new-comp-data.ts
@@ -25968,19 +25967,19 @@ var comboBoxStyle = {
25968
25967
  width: 190
25969
25968
  };
25970
25969
  var DuplicateCompositionLoaded = ({ initialType }) => {
25971
- const context = useContext88(ResolvedCompositionContext);
25970
+ const context = useContext87(ResolvedCompositionContext);
25972
25971
  if (!context) {
25973
25972
  throw new Error("Resolved composition context");
25974
25973
  }
25975
25974
  const { resolved, unresolved } = context;
25976
- const [initialCompType] = useState83(initialType);
25975
+ const [initialCompType] = useState82(initialType);
25977
25976
  const hadDimensionsDefined = unresolved.width && unresolved.height;
25978
25977
  const hadFpsDefined = unresolved.fps !== undefined;
25979
25978
  const hadDurationDefined = unresolved.durationInFrames !== undefined;
25980
- const [selectedFrameRate, setFrameRate] = useState83(resolved.result.fps);
25981
- const { compositions } = useContext88(Internals61.CompositionManager);
25982
- const [type, setType] = useState83(initialCompType);
25983
- const [newId, setName] = useState83(() => {
25979
+ const [selectedFrameRate, setFrameRate] = useState82(resolved.result.fps);
25980
+ const { compositions } = useContext87(Internals61.CompositionManager);
25981
+ const [type, setType] = useState82(initialCompType);
25982
+ const [newId, setName] = useState82(() => {
25984
25983
  const numberAtEnd = resolved.result.id.match(/([0-9]+)$/)?.[0];
25985
25984
  let prefix = numberAtEnd ? Number(numberAtEnd) : 1;
25986
25985
  const initialName = resolved.result.id.replace(/([0-9]+)$/, "");
@@ -25995,11 +25994,11 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
25995
25994
  }
25996
25995
  return currentName;
25997
25996
  });
25998
- const [size4, setSize] = useState83(() => ({
25997
+ const [size4, setSize] = useState82(() => ({
25999
25998
  width: resolved.result.width,
26000
25999
  height: resolved.result.height
26001
26000
  }));
26002
- const [durationInFrames, setDurationInFrames] = useState83(resolved.result.durationInFrames);
26001
+ const [durationInFrames, setDurationInFrames] = useState82(resolved.result.durationInFrames);
26003
26002
  const onTypeChanged = useCallback119((newType) => {
26004
26003
  setType(newType);
26005
26004
  }, []);
@@ -26325,7 +26324,7 @@ var DuplicateComposition = ({ compositionId, compositionType }) => {
26325
26324
  };
26326
26325
 
26327
26326
  // src/components/NewComposition/RenameComposition.tsx
26328
- import { useCallback as useCallback120, useContext as useContext89, useMemo as useMemo128, useState as useState84 } from "react";
26327
+ import { useCallback as useCallback120, useContext as useContext88, useMemo as useMemo128, useState as useState83 } from "react";
26329
26328
  import { Internals as Internals62 } from "remotion";
26330
26329
  import { jsx as jsx234, jsxs as jsxs118, Fragment as Fragment35 } from "react/jsx-runtime";
26331
26330
  var content5 = {
@@ -26336,13 +26335,13 @@ var content5 = {
26336
26335
  minWidth: 500
26337
26336
  };
26338
26337
  var RenameCompositionLoaded = () => {
26339
- const context = useContext89(ResolvedCompositionContext);
26338
+ const context = useContext88(ResolvedCompositionContext);
26340
26339
  if (!context) {
26341
26340
  throw new Error("Resolved composition context");
26342
26341
  }
26343
26342
  const { resolved } = context;
26344
- const { compositions } = useContext89(Internals62.CompositionManager);
26345
- const [newId, setName] = useState84(() => {
26343
+ const { compositions } = useContext88(Internals62.CompositionManager);
26344
+ const [newId, setName] = useState83(() => {
26346
26345
  return resolved.result.id;
26347
26346
  });
26348
26347
  const onNameChange = useCallback120((e) => {
@@ -26436,7 +26435,7 @@ var RenameComposition = ({ compositionId }) => {
26436
26435
  };
26437
26436
 
26438
26437
  // src/components/OverrideInputProps.tsx
26439
- import { useCallback as useCallback121, useContext as useContext90, useMemo as useMemo129, useState as useState85 } from "react";
26438
+ import { useCallback as useCallback121, useContext as useContext89, useMemo as useMemo129, useState as useState84 } from "react";
26440
26439
  import { Internals as Internals63 } from "remotion";
26441
26440
  import { jsx as jsx235, jsxs as jsxs119 } from "react/jsx-runtime";
26442
26441
  var style11 = {
@@ -26472,14 +26471,14 @@ var isValidJSON = (value) => {
26472
26471
  }
26473
26472
  };
26474
26473
  var Inner5 = () => {
26475
- const [value, setValue] = useState85(() => {
26474
+ const [value, setValue] = useState84(() => {
26476
26475
  const override = Internals63.getInputPropsOverride();
26477
26476
  if (override) {
26478
26477
  return JSON.stringify(override, null, 2);
26479
26478
  }
26480
26479
  return null;
26481
26480
  });
26482
- const { setSelectedModal } = useContext90(ModalsContext);
26481
+ const { setSelectedModal } = useContext89(ModalsContext);
26483
26482
  const valid = useMemo129(() => {
26484
26483
  if (!value)
26485
26484
  return true;
@@ -26560,11 +26559,11 @@ var OverrideInputPropsModal = () => {
26560
26559
  // src/components/QuickSwitcher/QuickSwitcherContent.tsx
26561
26560
  import {
26562
26561
  useCallback as useCallback122,
26563
- useContext as useContext91,
26562
+ useContext as useContext90,
26564
26563
  useEffect as useEffect81,
26565
26564
  useMemo as useMemo131,
26566
26565
  useRef as useRef47,
26567
- useState as useState87
26566
+ useState as useState86
26568
26567
  } from "react";
26569
26568
  import { Internals as Internals64 } from "remotion";
26570
26569
 
@@ -27461,7 +27460,7 @@ var QuickSwitcherNoResults = ({ query, mode }) => {
27461
27460
  };
27462
27461
 
27463
27462
  // src/components/QuickSwitcher/QuickSwitcherResult.tsx
27464
- import { useEffect as useEffect80, useMemo as useMemo130, useRef as useRef46, useState as useState86 } from "react";
27463
+ import { useEffect as useEffect80, useMemo as useMemo130, useRef as useRef46, useState as useState85 } from "react";
27465
27464
  import { jsx as jsx239, jsxs as jsxs122, Fragment as Fragment37 } from "react/jsx-runtime";
27466
27465
  var container50 = {
27467
27466
  paddingLeft: 16,
@@ -27490,7 +27489,7 @@ var labelContainer = {
27490
27489
  paddingBottom: 5
27491
27490
  };
27492
27491
  var QuickSwitcherResult = ({ result, selected }) => {
27493
- const [hovered, setIsHovered] = useState86(false);
27492
+ const [hovered, setIsHovered] = useState85(false);
27494
27493
  const ref2 = useRef46(null);
27495
27494
  const keybindings = useKeybinding();
27496
27495
  useEffect80(() => {
@@ -27656,8 +27655,8 @@ var mapModeToQuery = (mode) => {
27656
27655
  throw new Error("no mode" + mode);
27657
27656
  };
27658
27657
  var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }) => {
27659
- const { compositions } = useContext91(Internals64.CompositionManager);
27660
- const [state, setState] = useState87(() => {
27658
+ const { compositions } = useContext90(Internals64.CompositionManager);
27659
+ const [state, setState] = useState86(() => {
27661
27660
  return {
27662
27661
  query: mapModeToQuery(initialMode),
27663
27662
  selectedIndex: 0
@@ -27675,8 +27674,8 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
27675
27674
  return;
27676
27675
  }, []);
27677
27676
  const actions = useMenuStructure(closeMenu, readOnlyStudio);
27678
- const [docResults, setDocResults] = useState87({ type: "initial" });
27679
- const { setSelectedModal } = useContext91(ModalsContext);
27677
+ const [docResults, setDocResults] = useState86({ type: "initial" });
27678
+ const { setSelectedModal } = useContext90(ModalsContext);
27680
27679
  const keybindings = useKeybinding();
27681
27680
  const mode = mapQueryToMode(state.query);
27682
27681
  const actualQuery = useMemo131(() => {
@@ -27941,7 +27940,7 @@ var QuickSwitcher = ({ initialMode, invocationTimestamp, readOnlyStudio }) => {
27941
27940
  var QuickSwitcher_default = QuickSwitcher;
27942
27941
 
27943
27942
  // src/components/RenderModal/RenderStatusModal.tsx
27944
- import { useCallback as useCallback124, useContext as useContext92 } from "react";
27943
+ import { useCallback as useCallback124, useContext as useContext91 } from "react";
27945
27944
 
27946
27945
  // src/components/RenderModal/ClientRenderProgress.tsx
27947
27946
  import { formatBytes as formatBytes3 } from "@remotion/studio-shared";
@@ -28331,8 +28330,8 @@ var buttonRow = {
28331
28330
  var RenderStatusModal = ({
28332
28331
  jobId
28333
28332
  }) => {
28334
- const { setSelectedModal } = useContext92(ModalsContext);
28335
- const { jobs, removeClientJob, cancelClientJob } = useContext92(RenderQueueContext);
28333
+ const { setSelectedModal } = useContext91(ModalsContext);
28334
+ const { jobs, removeClientJob, cancelClientJob } = useContext91(RenderQueueContext);
28336
28335
  const job = jobs.find((j) => j.id === jobId);
28337
28336
  if (!job) {
28338
28337
  throw new Error("job not found");
@@ -28441,12 +28440,12 @@ import { BrowserSafeApis as BrowserSafeApis11 } from "@remotion/renderer/client"
28441
28440
  import { getDefaultOutLocation } from "@remotion/studio-shared";
28442
28441
  import {
28443
28442
  useCallback as useCallback142,
28444
- useContext as useContext94,
28443
+ useContext as useContext93,
28445
28444
  useEffect as useEffect84,
28446
28445
  useMemo as useMemo143,
28447
28446
  useReducer as useReducer2,
28448
28447
  useRef as useRef49,
28449
- useState as useState93
28448
+ useState as useState92
28450
28449
  } from "react";
28451
28450
 
28452
28451
  // src/helpers/convert-env-variables.ts
@@ -28714,9 +28713,9 @@ var makeReadOnlyStudioRenderCommand = ({
28714
28713
  };
28715
28714
 
28716
28715
  // src/helpers/render-modal-sections.ts
28717
- import { useMemo as useMemo133, useState as useState88 } from "react";
28716
+ import { useMemo as useMemo133, useState as useState87 } from "react";
28718
28717
  var useRenderModalSections = (renderMode, codec) => {
28719
- const [selectedTab, setTab] = useState88("general");
28718
+ const [selectedTab, setTab] = useState87("general");
28720
28719
  const shownTabs = useMemo133(() => {
28721
28720
  if (renderMode === "audio") {
28722
28721
  return ["general", "data", "audio", "advanced"];
@@ -28809,7 +28808,7 @@ var GifIcon = (props) => /* @__PURE__ */ jsx250("svg", {
28809
28808
  });
28810
28809
 
28811
28810
  // src/components/Tabs/vertical.tsx
28812
- import { useCallback as useCallback125, useMemo as useMemo134, useState as useState89 } from "react";
28811
+ import { useCallback as useCallback125, useMemo as useMemo134, useState as useState88 } from "react";
28813
28812
  import { jsx as jsx251 } from "react/jsx-runtime";
28814
28813
  var selectorButton2 = {
28815
28814
  border: "none",
@@ -28825,7 +28824,7 @@ var selectorButton2 = {
28825
28824
  WebkitUserSelect: "none"
28826
28825
  };
28827
28826
  var VerticalTab = ({ children, onClick, style: style12, selected }) => {
28828
- const [hovered, setHovered] = useState89(false);
28827
+ const [hovered, setHovered] = useState88(false);
28829
28828
  const { tabIndex } = useZIndex();
28830
28829
  const onPointerEnter = useCallback125(() => {
28831
28830
  setHovered(true);
@@ -28855,7 +28854,7 @@ var VerticalTab = ({ children, onClick, style: style12, selected }) => {
28855
28854
 
28856
28855
  // src/components/RenderModal/CrfSetting.tsx
28857
28856
  import { BrowserSafeApis as BrowserSafeApis3 } from "@remotion/renderer/client";
28858
- import { useState as useState91 } from "react";
28857
+ import { useState as useState90 } from "react";
28859
28858
 
28860
28859
  // src/components/RenderModal/NumberSetting.tsx
28861
28860
  import { useCallback as useCallback127 } from "react";
@@ -28864,7 +28863,7 @@ import { useCallback as useCallback127 } from "react";
28864
28863
  import { BrowserSafeApis as BrowserSafeApis2 } from "@remotion/renderer/client";
28865
28864
 
28866
28865
  // src/components/RenderModal/CliCopyButton.tsx
28867
- import { useCallback as useCallback126, useEffect as useEffect82, useMemo as useMemo135, useState as useState90 } from "react";
28866
+ import { useCallback as useCallback126, useEffect as useEffect82, useMemo as useMemo135, useState as useState89 } from "react";
28868
28867
  import { jsx as jsx252 } from "react/jsx-runtime";
28869
28868
  var svgStyle = {
28870
28869
  width: 16,
@@ -28891,8 +28890,8 @@ var buttonStyle5 = {
28891
28890
  var CliCopyButton = ({
28892
28891
  valueToCopy
28893
28892
  }) => {
28894
- const [copied, setCopied] = useState90(false);
28895
- const [hovered, setHovered] = useState90(false);
28893
+ const [copied, setCopied] = useState89(false);
28894
+ const [hovered, setHovered] = useState89(false);
28896
28895
  const fillColor = useMemo135(() => {
28897
28896
  return hovered ? "white" : LIGHT_TEXT;
28898
28897
  }, [hovered]);
@@ -29180,7 +29179,7 @@ var getDefaultCrfState = () => {
29180
29179
  }, {});
29181
29180
  };
29182
29181
  var useCrfState = (codec) => {
29183
- const [state, setState] = useState91(() => getDefaultCrfState());
29182
+ const [state, setState] = useState90(() => getDefaultCrfState());
29184
29183
  const range = BrowserSafeApis3.getValidCrfRanges(codec);
29185
29184
  const setCrf = (updater) => {
29186
29185
  setState((q) => {
@@ -30452,10 +30451,10 @@ import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
30452
30451
  import { useCallback as useCallback134, useMemo as useMemo137 } from "react";
30453
30452
 
30454
30453
  // src/helpers/use-file-existence.ts
30455
- import { useContext as useContext93, useEffect as useEffect83, useRef as useRef48, useState as useState92 } from "react";
30454
+ import { useContext as useContext92, useEffect as useEffect83, useRef as useRef48, useState as useState91 } from "react";
30456
30455
  var useFileExistence = (outName) => {
30457
- const [exists, setExists] = useState92(false);
30458
- const { previewServerState: state, subscribeToEvent } = useContext93(StudioServerConnectionCtx);
30456
+ const [exists, setExists] = useState91(false);
30457
+ const { previewServerState: state, subscribeToEvent } = useContext92(StudioServerConnectionCtx);
30459
30458
  const clientId = state.type === "connected" ? state.clientId : undefined;
30460
30459
  const currentOutName = useRef48("");
30461
30460
  currentOutName.current = outName;
@@ -31884,8 +31883,8 @@ var RenderModal = ({
31884
31883
  initialChromeMode,
31885
31884
  renderDefaults
31886
31885
  }) => {
31887
- const { setSelectedModal } = useContext94(ModalsContext);
31888
- const context = useContext94(ResolvedCompositionContext);
31886
+ const { setSelectedModal } = useContext93(ModalsContext);
31887
+ const context = useContext93(ResolvedCompositionContext);
31889
31888
  if (!context) {
31890
31889
  throw new Error("Should not be able to render without resolving comp first");
31891
31890
  }
@@ -31894,7 +31893,7 @@ var RenderModal = ({
31894
31893
  unresolved: unresolvedComposition
31895
31894
  } = context;
31896
31895
  const isMounted = useRef49(true);
31897
- const [isVideo] = useState93(() => {
31896
+ const [isVideo] = useState92(() => {
31898
31897
  return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
31899
31898
  });
31900
31899
  const [
@@ -31905,7 +31904,7 @@ var RenderModal = ({
31905
31904
  initialVideoCodecForAudioTab,
31906
31905
  initialVideoCodecForVideoTab
31907
31906
  }
31908
- ] = useState93(() => {
31907
+ ] = useState92(() => {
31909
31908
  return getDefaultCodecs({
31910
31909
  defaultConfigurationVideoCodec,
31911
31910
  compositionDefaultVideoCodec: resolvedComposition.defaultCodec,
@@ -31914,16 +31913,16 @@ var RenderModal = ({
31914
31913
  });
31915
31914
  });
31916
31915
  const [state, dispatch] = useReducer2(reducer2, initialState2);
31917
- const [unclampedFrame, setFrame] = useState93(() => initialFrame);
31918
- const [stillImageFormat, setStillImageFormat] = useState93(() => initialStillImageFormat);
31919
- const [videoImageFormat, setVideoImageFormat] = useState93(() => initialVideoImageFormat ?? resolvedComposition.defaultVideoImageFormat ?? renderDefaults.videoImageFormat);
31920
- const [sequenceImageFormat, setSequenceImageFormat] = useState93(() => initialStillImageFormat === "jpeg" ? "jpeg" : "png");
31921
- const [concurrency, setConcurrency] = useState93(() => initialConcurrency);
31922
- const [videoCodecForVideoTab, setVideoCodecForVideoTab] = useState93(() => initialVideoCodecForVideoTab);
31923
- const [userSelectedAudioCodec, setUserSelectedAudioCodec] = useState93(() => initialAudioCodec);
31924
- const [separateAudioTo, setSeparateAudioTo] = useState93(null);
31925
- const [envVariables, setEnvVariables] = useState93(() => envVariablesObjectToArray(initialEnvVariables).filter(([key5]) => key5 !== "NODE_ENV"));
31926
- const [initialOutName] = useState93(() => {
31916
+ const [unclampedFrame, setFrame] = useState92(() => initialFrame);
31917
+ const [stillImageFormat, setStillImageFormat] = useState92(() => initialStillImageFormat);
31918
+ const [videoImageFormat, setVideoImageFormat] = useState92(() => initialVideoImageFormat ?? resolvedComposition.defaultVideoImageFormat ?? renderDefaults.videoImageFormat);
31919
+ const [sequenceImageFormat, setSequenceImageFormat] = useState92(() => initialStillImageFormat === "jpeg" ? "jpeg" : "png");
31920
+ const [concurrency, setConcurrency] = useState92(() => initialConcurrency);
31921
+ const [videoCodecForVideoTab, setVideoCodecForVideoTab] = useState92(() => initialVideoCodecForVideoTab);
31922
+ const [userSelectedAudioCodec, setUserSelectedAudioCodec] = useState92(() => initialAudioCodec);
31923
+ const [separateAudioTo, setSeparateAudioTo] = useState92(null);
31924
+ const [envVariables, setEnvVariables] = useState92(() => envVariablesObjectToArray(initialEnvVariables).filter(([key5]) => key5 !== "NODE_ENV"));
31925
+ const [initialOutName] = useState92(() => {
31927
31926
  return getDefaultOutLocation({
31928
31927
  compositionName: resolvedComposition.id,
31929
31928
  defaultExtension: initialRenderType === "still" ? initialStillImageFormat : isVideo ? BrowserSafeApis11.getFileExtensionFromCodec(initialVideoCodec, initialAudioCodec) : initialStillImageFormat,
@@ -31932,26 +31931,26 @@ var RenderModal = ({
31932
31931
  outputLocation: renderDefaults.outputLocation
31933
31932
  });
31934
31933
  });
31935
- const [videoCodecForAudioTab, setVideoCodecForAudioTab] = useState93(() => initialVideoCodecForAudioTab);
31936
- const [mutedState, setMuted] = useState93(() => initialMuted);
31937
- const [repro, setRepro] = useState93(() => initialRepro);
31938
- const [enforceAudioTrackState, setEnforceAudioTrackState] = useState93(() => initialEnforceAudioTrack);
31939
- const [forSeamlessAacConcatenation, setForSeamlessAacConcatenation] = useState93(() => initialForSeamlessAacConcatenation);
31940
- const [sampleRate, setSampleRate] = useState93(() => initialSampleRate);
31941
- const [renderMode, setRenderModeState] = useState93(initialRenderType);
31942
- const [jpegQuality, setJpegQuality] = useState93(() => initialJpegQuality);
31943
- const [scale, setScale] = useState93(() => initialScale);
31944
- const [logLevel, setLogLevel] = useState93(() => initialLogLevel);
31945
- const [disallowParallelEncoding, setDisallowParallelEncoding] = useState93(false);
31946
- const [disableWebSecurity, setDisableWebSecurity] = useState93(() => initialDisableWebSecurity);
31947
- const [headless, setHeadless] = useState93(() => initialHeadless);
31948
- const [beepOnFinish, setBeepOnFinish] = useState93(() => initialBeep);
31949
- const [ignoreCertificateErrors, setIgnoreCertificateErrors] = useState93(() => initialIgnoreCertificateErrors);
31950
- const [multiProcessOnLinux, setChromiumMultiProcessOnLinux] = useState93(() => initialMultiProcessOnLinux);
31951
- const [darkMode, setDarkMode] = useState93(() => initialDarkMode);
31952
- const [openGlOption, setOpenGlOption] = useState93(() => initialGl ?? "default");
31953
- const [colorSpace, setColorSpace] = useState93(() => initialColorSpace);
31954
- const [userAgent, setUserAgent] = useState93(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
31934
+ const [videoCodecForAudioTab, setVideoCodecForAudioTab] = useState92(() => initialVideoCodecForAudioTab);
31935
+ const [mutedState, setMuted] = useState92(() => initialMuted);
31936
+ const [repro, setRepro] = useState92(() => initialRepro);
31937
+ const [enforceAudioTrackState, setEnforceAudioTrackState] = useState92(() => initialEnforceAudioTrack);
31938
+ const [forSeamlessAacConcatenation, setForSeamlessAacConcatenation] = useState92(() => initialForSeamlessAacConcatenation);
31939
+ const [sampleRate, setSampleRate] = useState92(() => initialSampleRate);
31940
+ const [renderMode, setRenderModeState] = useState92(initialRenderType);
31941
+ const [jpegQuality, setJpegQuality] = useState92(() => initialJpegQuality);
31942
+ const [scale, setScale] = useState92(() => initialScale);
31943
+ const [logLevel, setLogLevel] = useState92(() => initialLogLevel);
31944
+ const [disallowParallelEncoding, setDisallowParallelEncoding] = useState92(false);
31945
+ const [disableWebSecurity, setDisableWebSecurity] = useState92(() => initialDisableWebSecurity);
31946
+ const [headless, setHeadless] = useState92(() => initialHeadless);
31947
+ const [beepOnFinish, setBeepOnFinish] = useState92(() => initialBeep);
31948
+ const [ignoreCertificateErrors, setIgnoreCertificateErrors] = useState92(() => initialIgnoreCertificateErrors);
31949
+ const [multiProcessOnLinux, setChromiumMultiProcessOnLinux] = useState92(() => initialMultiProcessOnLinux);
31950
+ const [darkMode, setDarkMode] = useState92(() => initialDarkMode);
31951
+ const [openGlOption, setOpenGlOption] = useState92(() => initialGl ?? "default");
31952
+ const [colorSpace, setColorSpace] = useState92(() => initialColorSpace);
31953
+ const [userAgent, setUserAgent] = useState92(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
31955
31954
  const chromiumOptions = useMemo143(() => {
31956
31955
  return {
31957
31956
  headless,
@@ -31971,29 +31970,29 @@ var RenderModal = ({
31971
31970
  multiProcessOnLinux,
31972
31971
  darkMode
31973
31972
  ]);
31974
- const [outName, setOutName] = useState93(() => initialOutName);
31975
- const [endFrameOrNull, setEndFrame] = useState93(() => outFrameMark ?? null);
31976
- const [startFrameOrNull, setStartFrame] = useState93(() => inFrameMark ?? null);
31977
- const [proResProfileSetting, setProResProfile] = useState93(() => initialProResProfile ?? resolvedComposition.defaultProResProfile ?? "hq");
31978
- const [x264PresetSetting, setx264Preset] = useState93(() => initialx264Preset);
31979
- const [hardwareAcceleration, setHardwareAcceleration] = useState93(() => initialHardwareAcceleration);
31980
- const [userPreferredPixelFormat, setPixelFormat] = useState93(() => initialPixelFormat ?? resolvedComposition.defaultPixelFormat ?? renderDefaults.pixelFormat);
31981
- const [preferredQualityControlType, setQualityControl] = useState93(() => initialVideoBitrate === null ? "crf" : "bitrate");
31973
+ const [outName, setOutName] = useState92(() => initialOutName);
31974
+ const [endFrameOrNull, setEndFrame] = useState92(() => outFrameMark ?? null);
31975
+ const [startFrameOrNull, setStartFrame] = useState92(() => inFrameMark ?? null);
31976
+ const [proResProfileSetting, setProResProfile] = useState92(() => initialProResProfile ?? resolvedComposition.defaultProResProfile ?? "hq");
31977
+ const [x264PresetSetting, setx264Preset] = useState92(() => initialx264Preset);
31978
+ const [hardwareAcceleration, setHardwareAcceleration] = useState92(() => initialHardwareAcceleration);
31979
+ const [userPreferredPixelFormat, setPixelFormat] = useState92(() => initialPixelFormat ?? resolvedComposition.defaultPixelFormat ?? renderDefaults.pixelFormat);
31980
+ const [preferredQualityControlType, setQualityControl] = useState92(() => initialVideoBitrate === null ? "crf" : "bitrate");
31982
31981
  const [
31983
31982
  shouldHaveCustomTargetAudioBitrate,
31984
31983
  setShouldHaveCustomTargetAudioBitrate
31985
- ] = useState93(() => initialAudioBitrate !== null);
31986
- const [customTargetAudioBitrate, setCustomTargetAudioBitrateValue] = useState93(() => initialAudioBitrate ?? "320K");
31987
- const [customTargetVideoBitrate, setCustomTargetVideoBitrateValue] = useState93(() => initialVideoBitrate ?? "1M");
31988
- const [encodingMaxRate, setEncodingMaxRate] = useState93(() => initialEncodingMaxRate ?? null);
31989
- const [encodingBufferSize, setEncodingBufferSize] = useState93(() => initialEncodingBufferSize ?? null);
31990
- const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = useState93(() => initialNumberOfGifLoops !== null);
31991
- const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = useState93(() => initialNumberOfGifLoops ?? 0);
31992
- const [delayRenderTimeout, setDelayRenderTimeout] = useState93(() => initialDelayRenderTimeout);
31993
- const [chromeMode, setChromeMode] = useState93(() => initialChromeMode);
31994
- const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState93(initialOffthreadVideoCacheSizeInBytes);
31995
- const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState93(initialMediaCacheSizeInBytes);
31996
- const [offthreadVideoThreads, setOffthreadVideoThreads] = useState93(() => initialOffthreadVideoThreads);
31984
+ ] = useState92(() => initialAudioBitrate !== null);
31985
+ const [customTargetAudioBitrate, setCustomTargetAudioBitrateValue] = useState92(() => initialAudioBitrate ?? "320K");
31986
+ const [customTargetVideoBitrate, setCustomTargetVideoBitrateValue] = useState92(() => initialVideoBitrate ?? "1M");
31987
+ const [encodingMaxRate, setEncodingMaxRate] = useState92(() => initialEncodingMaxRate ?? null);
31988
+ const [encodingBufferSize, setEncodingBufferSize] = useState92(() => initialEncodingBufferSize ?? null);
31989
+ const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = useState92(() => initialNumberOfGifLoops !== null);
31990
+ const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = useState92(() => initialNumberOfGifLoops ?? 0);
31991
+ const [delayRenderTimeout, setDelayRenderTimeout] = useState92(() => initialDelayRenderTimeout);
31992
+ const [chromeMode, setChromeMode] = useState92(() => initialChromeMode);
31993
+ const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState92(initialOffthreadVideoCacheSizeInBytes);
31994
+ const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState92(initialMediaCacheSizeInBytes);
31995
+ const [offthreadVideoThreads, setOffthreadVideoThreads] = useState92(() => initialOffthreadVideoThreads);
31997
31996
  const codec = useMemo143(() => {
31998
31997
  if (renderMode === "audio") {
31999
31998
  return videoCodecForAudioTab;
@@ -32080,11 +32079,11 @@ var RenderModal = ({
32080
32079
  }
32081
32080
  return null;
32082
32081
  }, [codec, x264PresetSetting, renderMode]);
32083
- const [inputProps, _setInputProps] = useState93(() => defaultProps);
32082
+ const [inputProps, _setInputProps] = useState92(() => defaultProps);
32084
32083
  const setInputProps = useCallback142((updater) => {
32085
32084
  _setInputProps(updater);
32086
32085
  }, []);
32087
- const [metadata] = useState93(() => defaultMetadata);
32086
+ const [metadata] = useState92(() => defaultMetadata);
32088
32087
  const endFrame = useMemo143(() => {
32089
32088
  if (endFrameOrNull === null) {
32090
32089
  return resolvedComposition.durationInFrames - 1;
@@ -32163,7 +32162,7 @@ var RenderModal = ({
32163
32162
  setStillImageFormat(format);
32164
32163
  setDefaultOutName({ type: "still", imageFormat: format });
32165
32164
  }, [setDefaultOutName]);
32166
- const { setSidebarCollapsedState } = useContext94(SidebarContext);
32165
+ const { setSidebarCollapsedState } = useContext93(SidebarContext);
32167
32166
  const onClickStill = useCallback142(() => {
32168
32167
  setSidebarCollapsedState({ left: null, right: "expanded" });
32169
32168
  persistSelectedOptionsSidebarPanel2("renders");
@@ -32217,7 +32216,7 @@ var RenderModal = ({
32217
32216
  offthreadVideoThreads,
32218
32217
  mediaCacheSizeInBytes
32219
32218
  ]);
32220
- const [everyNthFrameSetting, setEveryNthFrameSetting] = useState93(() => initialEveryNthFrame);
32219
+ const [everyNthFrameSetting, setEveryNthFrameSetting] = useState92(() => initialEveryNthFrame);
32221
32220
  const everyNthFrame = useMemo143(() => {
32222
32221
  if (codec === "gif") {
32223
32222
  return everyNthFrameSetting;
@@ -32671,7 +32670,7 @@ var RenderModal = ({
32671
32670
  videoBitrate,
32672
32671
  x264Preset
32673
32672
  ]);
32674
- const [commandCopiedAt, setCommandCopiedAt] = useState93(null);
32673
+ const [commandCopiedAt, setCommandCopiedAt] = useState92(null);
32675
32674
  const renderDisabled = readOnlyStudio ? false : !outnameValidation.valid || state.type === "load";
32676
32675
  const trigger = useCallback142(() => {
32677
32676
  if (readOnlyStudio) {
@@ -33027,7 +33026,7 @@ import {
33027
33026
  getDefaultVideoCodecForContainer,
33028
33027
  isAudioOnlyContainer
33029
33028
  } from "@remotion/web-renderer";
33030
- import { useCallback as useCallback146, useContext as useContext95, useMemo as useMemo148, useState as useState97 } from "react";
33029
+ import { useCallback as useCallback146, useContext as useContext94, useMemo as useMemo148, useState as useState96 } from "react";
33031
33030
 
33032
33031
  // src/icons/certificate.tsx
33033
33032
  import { jsx as jsx276 } from "react/jsx-runtime";
@@ -33046,10 +33045,10 @@ import {
33046
33045
  getEncodableAudioCodecs,
33047
33046
  getSupportedAudioCodecsForContainer
33048
33047
  } from "@remotion/web-renderer";
33049
- import { useEffect as useEffect85, useRef as useRef50, useState as useState94 } from "react";
33048
+ import { useEffect as useEffect85, useRef as useRef50, useState as useState93 } from "react";
33050
33049
  var useEncodableAudioCodecs = (container61) => {
33051
33050
  const cacheRef = useRef50({});
33052
- const [codecsByContainer, setCodecsByContainer] = useState94(() => {
33051
+ const [codecsByContainer, setCodecsByContainer] = useState93(() => {
33053
33052
  return {
33054
33053
  [container61]: getSupportedAudioCodecsForContainer(container61)
33055
33054
  };
@@ -33088,10 +33087,10 @@ import {
33088
33087
  getEncodableVideoCodecs,
33089
33088
  getSupportedVideoCodecsForContainer
33090
33089
  } from "@remotion/web-renderer";
33091
- import { useEffect as useEffect86, useRef as useRef51, useState as useState95 } from "react";
33090
+ import { useEffect as useEffect86, useRef as useRef51, useState as useState94 } from "react";
33092
33091
  var useEncodableVideoCodecs = (container61) => {
33093
33092
  const cacheRef = useRef51({});
33094
- const [codecsByContainer, setCodecsByContainer] = useState95(() => {
33093
+ const [codecsByContainer, setCodecsByContainer] = useState94(() => {
33095
33094
  return {
33096
33095
  [container61]: getSupportedVideoCodecsForContainer(container61)
33097
33096
  };
@@ -33784,7 +33783,7 @@ var WebRenderModalBasic = ({
33784
33783
  };
33785
33784
 
33786
33785
  // src/components/RenderModal/WebRenderModalLicense.tsx
33787
- import { useCallback as useCallback144, useEffect as useEffect87, useState as useState96 } from "react";
33786
+ import { useCallback as useCallback144, useEffect as useEffect87, useState as useState95 } from "react";
33788
33787
 
33789
33788
  // src/icons/check-circle-filled.tsx
33790
33789
  import { jsx as jsx282 } from "react/jsx-runtime";
@@ -34004,8 +34003,8 @@ var WebRenderModalLicense = ({
34004
34003
  setLicenseKey,
34005
34004
  initialPublicLicenseKey
34006
34005
  }) => {
34007
- const [licenseValidation, setLicenseValidation] = useState96({ valid: true, message: null, details: null });
34008
- const [isLoading, setIsLoading] = useState96(false);
34006
+ const [licenseValidation, setLicenseValidation] = useState95({ valid: true, message: null, details: null });
34007
+ const [isLoading, setIsLoading] = useState95(false);
34009
34008
  useEffect87(() => {
34010
34009
  if (licenseKey === null || licenseKey === "free-license") {
34011
34010
  return setLicenseValidation({
@@ -34372,10 +34371,10 @@ var WebRenderModal = ({
34372
34371
  initialMuted,
34373
34372
  initialAllowHtmlInCanvas
34374
34373
  }) => {
34375
- const context = useContext95(ResolvedCompositionContext);
34376
- const { setSelectedModal } = useContext95(ModalsContext);
34377
- const { setSidebarCollapsedState } = useContext95(SidebarContext);
34378
- const { addClientStillJob, addClientVideoJob } = useContext95(RenderQueueContext);
34374
+ const context = useContext94(ResolvedCompositionContext);
34375
+ const { setSelectedModal } = useContext94(ModalsContext);
34376
+ const { setSidebarCollapsedState } = useContext94(SidebarContext);
34377
+ const { addClientStillJob, addClientVideoJob } = useContext94(RenderQueueContext);
34379
34378
  if (!context) {
34380
34379
  throw new Error("Should not be able to render without resolving comp first");
34381
34380
  }
@@ -34383,34 +34382,34 @@ var WebRenderModal = ({
34383
34382
  resolved: { result: resolvedComposition },
34384
34383
  unresolved: unresolvedComposition
34385
34384
  } = context;
34386
- const [isVideo] = useState97(() => {
34385
+ const [isVideo] = useState96(() => {
34387
34386
  return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
34388
34387
  });
34389
- const [renderMode, setRenderMode] = useState97(initialContainer && isAudioOnlyContainer(initialContainer) ? "audio" : isVideo ? "video" : "still");
34390
- const [tab, setTab] = useState97("general");
34391
- const [imageFormat, setImageFormat] = useState97(() => initialStillImageFormat ?? "png");
34392
- const [frame2, setFrame] = useState97(() => initialFrame);
34393
- const [logLevel, setLogLevel] = useState97(() => initialLogLevel);
34394
- const [inputProps, _setInputProps] = useState97(() => defaultProps);
34388
+ const [renderMode, setRenderMode] = useState96(initialContainer && isAudioOnlyContainer(initialContainer) ? "audio" : isVideo ? "video" : "still");
34389
+ const [tab, setTab] = useState96("general");
34390
+ const [imageFormat, setImageFormat] = useState96(() => initialStillImageFormat ?? "png");
34391
+ const [frame2, setFrame] = useState96(() => initialFrame);
34392
+ const [logLevel, setLogLevel] = useState96(() => initialLogLevel);
34393
+ const [inputProps, _setInputProps] = useState96(() => defaultProps);
34395
34394
  const setInputProps = useCallback146((updater) => {
34396
34395
  _setInputProps(updater);
34397
34396
  }, []);
34398
- const [delayRenderTimeout, setDelayRenderTimeout] = useState97(initialDelayRenderTimeout ?? 30000);
34399
- const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState97(initialMediaCacheSizeInBytes);
34400
- const [codec, setCodec] = useState97(initialVideoCodec ?? "h264");
34401
- const [container62, setContainer] = useState97(initialContainer ?? "mp4");
34402
- const [audioCodec, setAudioCodec] = useState97(initialAudioCodec ?? "aac");
34403
- const [audioBitrate, setAudioBitrate] = useState97(initialAudioBitrate ?? "medium");
34404
- const [videoBitrate, setVideoBitrate] = useState97(initialVideoBitrate ?? "high");
34405
- const [hardwareAcceleration, setHardwareAcceleration] = useState97(initialHardwareAcceleration ?? "no-preference");
34406
- const [keyframeIntervalInSeconds, setKeyframeIntervalInSeconds] = useState97(initialKeyframeIntervalInSeconds ?? 5);
34407
- const [startFrame, setStartFrame] = useState97(() => inFrameMark);
34408
- const [endFrame, setEndFrame] = useState97(() => outFrameMark);
34409
- const [transparent, setTransparent] = useState97(initialTransparent ?? false);
34410
- const [muted, setMuted] = useState97(initialMuted ?? false);
34411
- const [scale, setScale] = useState97(initialScale ?? 1);
34412
- const [licenseKey, setLicenseKey] = useState97(initialLicenseKey);
34413
- const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState97(initialAllowHtmlInCanvas ?? false);
34397
+ const [delayRenderTimeout, setDelayRenderTimeout] = useState96(initialDelayRenderTimeout ?? 30000);
34398
+ const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState96(initialMediaCacheSizeInBytes);
34399
+ const [codec, setCodec] = useState96(initialVideoCodec ?? "h264");
34400
+ const [container62, setContainer] = useState96(initialContainer ?? "mp4");
34401
+ const [audioCodec, setAudioCodec] = useState96(initialAudioCodec ?? "aac");
34402
+ const [audioBitrate, setAudioBitrate] = useState96(initialAudioBitrate ?? "medium");
34403
+ const [videoBitrate, setVideoBitrate] = useState96(initialVideoBitrate ?? "high");
34404
+ const [hardwareAcceleration, setHardwareAcceleration] = useState96(initialHardwareAcceleration ?? "no-preference");
34405
+ const [keyframeIntervalInSeconds, setKeyframeIntervalInSeconds] = useState96(initialKeyframeIntervalInSeconds ?? 5);
34406
+ const [startFrame, setStartFrame] = useState96(() => inFrameMark);
34407
+ const [endFrame, setEndFrame] = useState96(() => outFrameMark);
34408
+ const [transparent, setTransparent] = useState96(initialTransparent ?? false);
34409
+ const [muted, setMuted] = useState96(initialMuted ?? false);
34410
+ const [scale, setScale] = useState96(initialScale ?? 1);
34411
+ const [licenseKey, setLicenseKey] = useState96(initialLicenseKey);
34412
+ const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState96(initialAllowHtmlInCanvas ?? false);
34414
34413
  const encodableAudioCodecs = useEncodableAudioCodecs(container62);
34415
34414
  const encodableVideoCodecs = useEncodableVideoCodecs(container62);
34416
34415
  const effectiveAudioCodec = useMemo148(() => {
@@ -34437,7 +34436,7 @@ var WebRenderModal = ({
34437
34436
  }
34438
34437
  return Math.max(0, Math.min(finalEndFrame, startFrame));
34439
34438
  }, [finalEndFrame, startFrame]);
34440
- const [initialOutNameState] = useState97(() => {
34439
+ const [initialOutNameState] = useState96(() => {
34441
34440
  if (initialDefaultOutName) {
34442
34441
  return initialDefaultOutName;
34443
34442
  }
@@ -34453,7 +34452,7 @@ var WebRenderModal = ({
34453
34452
  }
34454
34453
  return defaultOut;
34455
34454
  });
34456
- const [outName, setOutName] = useState97(() => initialOutNameState);
34455
+ const [outName, setOutName] = useState96(() => initialOutNameState);
34457
34456
  const updateOutNameExtension = useCallback146((extension) => {
34458
34457
  setOutName((prev) => getStringBeforeSuffix(prev) + "." + extension);
34459
34458
  }, []);
@@ -34893,7 +34892,7 @@ var WebRenderModalWithLoader = (props) => {
34893
34892
  import { useCallback as useCallback149, useMemo as useMemo150 } from "react";
34894
34893
 
34895
34894
  // src/components/CopyButton.tsx
34896
- import { useCallback as useCallback147, useEffect as useEffect88, useState as useState98 } from "react";
34895
+ import { useCallback as useCallback147, useEffect as useEffect88, useState as useState97 } from "react";
34897
34896
  import { jsx as jsx287, jsxs as jsxs153 } from "react/jsx-runtime";
34898
34897
  var iconStyle9 = {
34899
34898
  width: 16,
@@ -34923,7 +34922,7 @@ var labelStyle5 = {
34923
34922
  fontSize: 14
34924
34923
  };
34925
34924
  var CopyButton = ({ textToCopy, label: label13, labelWhenCopied }) => {
34926
- const [copied, setCopied] = useState98(false);
34925
+ const [copied, setCopied] = useState97(false);
34927
34926
  const onClick = useCallback147(() => {
34928
34927
  copyText(textToCopy).then(() => {
34929
34928
  setCopied(Date.now());
@@ -34956,7 +34955,7 @@ var CopyButton = ({ textToCopy, label: label13, labelWhenCopied }) => {
34956
34955
  };
34957
34956
 
34958
34957
  // src/components/UpdateModal/OpenIssueButton.tsx
34959
- import { useCallback as useCallback148, useMemo as useMemo149, useState as useState99 } from "react";
34958
+ import { useCallback as useCallback148, useMemo as useMemo149, useState as useState98 } from "react";
34960
34959
  import { jsx as jsx288 } from "react/jsx-runtime";
34961
34960
  var svgStyle2 = {
34962
34961
  width: "11px",
@@ -34971,7 +34970,7 @@ var buttonStyle7 = {
34971
34970
  alignItems: "center"
34972
34971
  };
34973
34972
  var OpenIssueButton = ({ link: link5 }) => {
34974
- const [hovered, setHovered] = useState99(false);
34973
+ const [hovered, setHovered] = useState98(false);
34975
34974
  const buttonTooltip = `Open GitHub issue in new Tab`;
34976
34975
  const handleClick = useCallback148(() => {
34977
34976
  window.open(link5, "_blank");
@@ -35172,8 +35171,8 @@ var UpdateModal = ({ info, knownBugs }) => {
35172
35171
  // src/components/Modals.tsx
35173
35172
  import { jsx as jsx291, jsxs as jsxs156, Fragment as Fragment53 } from "react/jsx-runtime";
35174
35173
  var Modals = ({ readOnlyStudio }) => {
35175
- const { selectedModal: modalContextType } = useContext96(ModalsContext);
35176
- const canRender = useContext96(StudioServerConnectionCtx).previewServerState.type === "connected";
35174
+ const { selectedModal: modalContextType } = useContext95(ModalsContext);
35175
+ const canRender = useContext95(StudioServerConnectionCtx).previewServerState.type === "connected";
35177
35176
  return /* @__PURE__ */ jsxs156(Fragment53, {
35178
35177
  children: [
35179
35178
  modalContextType && modalContextType.type === "duplicate-comp" && /* @__PURE__ */ jsx291(DuplicateComposition, {
@@ -35294,7 +35293,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
35294
35293
  const MemoRoot = useMemo151(() => {
35295
35294
  return React189.memo(Root);
35296
35295
  }, [Root]);
35297
- const [renderError, setRenderError] = useState100(null);
35296
+ const [renderError, setRenderError] = useState99(null);
35298
35297
  const clearError = useCallback150(() => {
35299
35298
  setRenderError(null);
35300
35299
  }, []);
@@ -35350,7 +35349,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
35350
35349
  import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
35351
35350
 
35352
35351
  // src/state/preview-size.tsx
35353
- import { useCallback as useCallback151, useContext as useContext97, useMemo as useMemo152, useState as useState101 } from "react";
35352
+ import { useCallback as useCallback151, useContext as useContext96, useMemo as useMemo152, useState as useState100 } from "react";
35354
35353
  import { Internals as Internals66 } from "remotion";
35355
35354
  import { jsx as jsx293 } from "react/jsx-runtime";
35356
35355
  var key5 = "remotion.previewSize";
@@ -35371,14 +35370,14 @@ var loadPreviewSizeOption = () => {
35371
35370
  return JSON.parse(item2);
35372
35371
  };
35373
35372
  var PreviewSizeProvider = ({ children }) => {
35374
- const [size4, setSizeState] = useState101(() => loadPreviewSizeOption());
35375
- const [translation, setTranslation] = useState101(() => {
35373
+ const [size4, setSizeState] = useState100(() => loadPreviewSizeOption());
35374
+ const [translation, setTranslation] = useState100(() => {
35376
35375
  return {
35377
35376
  x: 0,
35378
35377
  y: 0
35379
35378
  };
35380
35379
  });
35381
- const { editorZoomGestures } = useContext97(EditorZoomGesturesContext);
35380
+ const { editorZoomGestures } = useContext96(EditorZoomGesturesContext);
35382
35381
  const setSize = useCallback151((newValue) => {
35383
35382
  setSizeState((prevState) => {
35384
35383
  const newVal = newValue(prevState);
@@ -35407,10 +35406,10 @@ var PreviewSizeProvider = ({ children }) => {
35407
35406
  };
35408
35407
 
35409
35408
  // src/components/CheckerboardProvider.tsx
35410
- import { useCallback as useCallback152, useMemo as useMemo153, useState as useState102 } from "react";
35409
+ import { useCallback as useCallback152, useMemo as useMemo153, useState as useState101 } from "react";
35411
35410
  import { jsx as jsx294 } from "react/jsx-runtime";
35412
35411
  var CheckerboardProvider = ({ children }) => {
35413
- const [checkerboard, setCheckerboardState] = useState102(() => loadCheckerboardOption());
35412
+ const [checkerboard, setCheckerboardState] = useState101(() => loadCheckerboardOption());
35414
35413
  const setCheckerboard = useCallback152((newValue) => {
35415
35414
  setCheckerboardState((prevState) => {
35416
35415
  const newVal = newValue(prevState);
@@ -35431,12 +35430,12 @@ var CheckerboardProvider = ({ children }) => {
35431
35430
  };
35432
35431
 
35433
35432
  // src/components/MediaVolumeProvider.tsx
35434
- import { useMemo as useMemo154, useState as useState103 } from "react";
35433
+ import { useMemo as useMemo154, useState as useState102 } from "react";
35435
35434
  import { Internals as Internals67 } from "remotion";
35436
35435
  import { jsx as jsx295 } from "react/jsx-runtime";
35437
35436
  var MediaVolumeProvider = ({ children }) => {
35438
- const [mediaMuted, setMediaMuted] = useState103(() => loadMuteOption());
35439
- const [mediaVolume, setMediaVolume] = useState103(1);
35437
+ const [mediaMuted, setMediaMuted] = useState102(() => loadMuteOption());
35438
+ const [mediaVolume, setMediaVolume] = useState102(1);
35440
35439
  const mediaVolumeContextValue = useMemo154(() => {
35441
35440
  return {
35442
35441
  mediaMuted,
@@ -35459,10 +35458,10 @@ var MediaVolumeProvider = ({ children }) => {
35459
35458
  };
35460
35459
 
35461
35460
  // src/components/ModalsProvider.tsx
35462
- import { useMemo as useMemo155, useState as useState104 } from "react";
35461
+ import { useMemo as useMemo155, useState as useState103 } from "react";
35463
35462
  import { jsx as jsx296 } from "react/jsx-runtime";
35464
35463
  var ModalsProvider = ({ children }) => {
35465
- const [modalContextType, setModalContextType] = useState104(null);
35464
+ const [modalContextType, setModalContextType] = useState103(null);
35466
35465
  const modalsContext = useMemo155(() => {
35467
35466
  return {
35468
35467
  selectedModal: modalContextType,
@@ -35476,7 +35475,7 @@ var ModalsProvider = ({ children }) => {
35476
35475
  };
35477
35476
 
35478
35477
  // src/components/SetTimelineInOutProvider.tsx
35479
- import { useEffect as useEffect89, useMemo as useMemo156, useState as useState105 } from "react";
35478
+ import { useEffect as useEffect89, useMemo as useMemo156, useState as useState104 } from "react";
35480
35479
 
35481
35480
  // src/state/marks.ts
35482
35481
  var localStorageKey5 = () => `remotion.editor.marksv2`;
@@ -35494,7 +35493,7 @@ var loadMarks = () => {
35494
35493
  // src/components/SetTimelineInOutProvider.tsx
35495
35494
  import { jsx as jsx297 } from "react/jsx-runtime";
35496
35495
  var SetTimelineInOutProvider = ({ children }) => {
35497
- const [inAndOutFrames, setInAndOutFrames] = useState105(() => loadMarks());
35496
+ const [inAndOutFrames, setInAndOutFrames] = useState104(() => loadMarks());
35498
35497
  const setTimelineInOutContextValue = useMemo156(() => {
35499
35498
  return {
35500
35499
  setInAndOutFrames
@@ -35513,13 +35512,13 @@ var SetTimelineInOutProvider = ({ children }) => {
35513
35512
  };
35514
35513
 
35515
35514
  // src/components/ShowGuidesProvider.tsx
35516
- import { useCallback as useCallback153, useMemo as useMemo157, useRef as useRef52, useState as useState106 } from "react";
35515
+ import { useCallback as useCallback153, useMemo as useMemo157, useRef as useRef52, useState as useState105 } from "react";
35517
35516
  import { jsx as jsx298 } from "react/jsx-runtime";
35518
35517
  var ShowGuidesProvider = ({ children }) => {
35519
- const [guidesList, setGuidesList] = useState106(() => loadGuidesList());
35520
- const [selectedGuideId, setSelectedGuideId] = useState106(null);
35521
- const [hoveredGuideId, setHoveredGuideId] = useState106(null);
35522
- const [editorShowGuides, setEditorShowGuidesState] = useState106(() => loadEditorShowGuidesOption());
35518
+ const [guidesList, setGuidesList] = useState105(() => loadGuidesList());
35519
+ const [selectedGuideId, setSelectedGuideId] = useState105(null);
35520
+ const [hoveredGuideId, setHoveredGuideId] = useState105(null);
35521
+ const [editorShowGuides, setEditorShowGuidesState] = useState105(() => loadEditorShowGuidesOption());
35523
35522
  const shouldCreateGuideRef = useRef52(false);
35524
35523
  const shouldDeleteGuideRef = useRef52(false);
35525
35524
  const setEditorShowGuides = useCallback153((newValue) => {
@@ -35556,10 +35555,10 @@ var ShowGuidesProvider = ({ children }) => {
35556
35555
  };
35557
35556
 
35558
35557
  // src/components/ShowRulersProvider.tsx
35559
- import { useCallback as useCallback154, useMemo as useMemo158, useState as useState107 } from "react";
35558
+ import { useCallback as useCallback154, useMemo as useMemo158, useState as useState106 } from "react";
35560
35559
  import { jsx as jsx299 } from "react/jsx-runtime";
35561
35560
  var ShowRulersProvider = ({ children }) => {
35562
- const [editorShowRulers, setEditorShowRulersState] = useState107(() => loadEditorShowRulersOption());
35561
+ const [editorShowRulers, setEditorShowRulersState] = useState106(() => loadEditorShowRulersOption());
35563
35562
  const setEditorShowRulers = useCallback154((newValue) => {
35564
35563
  setEditorShowRulersState((prevState) => {
35565
35564
  const newVal = newValue(prevState);
@@ -35580,10 +35579,10 @@ var ShowRulersProvider = ({ children }) => {
35580
35579
  };
35581
35580
 
35582
35581
  // src/components/VisualControls/VisualControlsUndoSync.tsx
35583
- import { useContext as useContext98, useEffect as useEffect90 } from "react";
35582
+ import { useContext as useContext97, useEffect as useEffect90 } from "react";
35584
35583
  var VisualControlsUndoSync = () => {
35585
- const { subscribeToEvent } = useContext98(StudioServerConnectionCtx);
35586
- const { updateValue } = useContext98(SetVisualControlsContext);
35584
+ const { subscribeToEvent } = useContext97(StudioServerConnectionCtx);
35585
+ const { updateValue } = useContext97(SetVisualControlsContext);
35587
35586
  useEffect90(() => {
35588
35587
  const unsub = subscribeToEvent("visual-control-values-changed", (event) => {
35589
35588
  if (event.type !== "visual-control-values-changed") {
@@ -35599,10 +35598,10 @@ var VisualControlsUndoSync = () => {
35599
35598
  };
35600
35599
 
35601
35600
  // src/components/ZoomGesturesProvider.tsx
35602
- import { useCallback as useCallback155, useMemo as useMemo159, useState as useState108 } from "react";
35601
+ import { useCallback as useCallback155, useMemo as useMemo159, useState as useState107 } from "react";
35603
35602
  import { jsx as jsx300 } from "react/jsx-runtime";
35604
35603
  var ZoomGesturesProvider = ({ children }) => {
35605
- const [editorZoomGestures, setEditorZoomGesturesState] = useState108(() => loadEditorZoomGesturesOption());
35604
+ const [editorZoomGestures, setEditorZoomGesturesState] = useState107(() => loadEditorZoomGesturesOption());
35606
35605
  const setEditorZoomGestures = useCallback155((newValue) => {
35607
35606
  setEditorZoomGesturesState((prevState) => {
35608
35607
  const newVal = newValue(prevState);
@@ -35673,7 +35672,7 @@ var EditorContexts = ({ children, readOnlyStudio }) => {
35673
35672
  };
35674
35673
 
35675
35674
  // src/components/Notifications/ServerDisconnected.tsx
35676
- import { useContext as useContext99 } from "react";
35675
+ import { useContext as useContext98 } from "react";
35677
35676
  import { jsx as jsx302, jsxs as jsxs159 } from "react/jsx-runtime";
35678
35677
  var container64 = {
35679
35678
  position: "fixed",
@@ -35708,7 +35707,7 @@ window.addEventListener("beforeunload", () => {
35708
35707
  pageIsGoingToReload = true;
35709
35708
  });
35710
35709
  var ServerDisconnected = () => {
35711
- const { previewServerState: ctx } = useContext99(StudioServerConnectionCtx);
35710
+ const { previewServerState: ctx } = useContext98(StudioServerConnectionCtx);
35712
35711
  const fav = document.getElementById("__remotion_favicon");
35713
35712
  if (ctx.type !== "disconnected") {
35714
35713
  fav.setAttribute("href", "/favicon.ico");
@@ -35747,11 +35746,11 @@ var ServerDisconnected = () => {
35747
35746
  };
35748
35747
 
35749
35748
  // src/FastRefreshProvider.tsx
35750
- import { useCallback as useCallback156, useEffect as useEffect91, useMemo as useMemo160, useState as useState109 } from "react";
35749
+ import { useCallback as useCallback156, useEffect as useEffect91, useMemo as useMemo160, useState as useState108 } from "react";
35751
35750
  import { jsx as jsx303 } from "react/jsx-runtime";
35752
35751
  var FastRefreshProvider = ({ children }) => {
35753
- const [fastRefreshes, setFastRefreshes] = useState109(0);
35754
- const [manualRefreshes, setManualRefreshes] = useState109(0);
35752
+ const [fastRefreshes, setFastRefreshes] = useState108(0);
35753
+ const [manualRefreshes, setManualRefreshes] = useState108(0);
35755
35754
  const increaseManualRefreshes = useCallback156(() => {
35756
35755
  setManualRefreshes((i) => i + 1);
35757
35756
  }, []);
@@ -35938,29 +35937,29 @@ var injectCSS = () => {
35938
35937
  // src/ResolveCompositionConfigInStudio.tsx
35939
35938
  import {
35940
35939
  useCallback as useCallback157,
35941
- useContext as useContext100,
35940
+ useContext as useContext99,
35942
35941
  useEffect as useEffect92,
35943
35942
  useImperativeHandle as useImperativeHandle15,
35944
35943
  useMemo as useMemo161,
35945
- useState as useState110
35944
+ useState as useState109
35946
35945
  } from "react";
35947
35946
  import { getInputProps as getInputProps2, Internals as Internals69 } from "remotion";
35948
35947
  import { jsx as jsx304 } from "react/jsx-runtime";
35949
35948
  var ResolveCompositionConfigInStudio = ({ children }) => {
35950
- const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState110(null);
35951
- const { compositions, canvasContent, currentCompositionMetadata } = useContext100(Internals69.CompositionManager);
35952
- const { fastRefreshes, manualRefreshes } = useContext100(FastRefreshContext);
35949
+ const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState109(null);
35950
+ const { compositions, canvasContent, currentCompositionMetadata } = useContext99(Internals69.CompositionManager);
35951
+ const { fastRefreshes, manualRefreshes } = useContext99(FastRefreshContext);
35953
35952
  if (manualRefreshes) {}
35954
35953
  const selectedComposition = useMemo161(() => {
35955
35954
  return compositions.find((c) => canvasContent && canvasContent.type === "composition" && canvasContent.compositionId === c.id);
35956
35955
  }, [canvasContent, compositions]);
35957
35956
  const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
35958
- const { props: allEditorProps } = useContext100(Internals69.EditorPropsContext);
35957
+ const { props: allEditorProps } = useContext99(Internals69.EditorPropsContext);
35959
35958
  const env = Internals69.getRemotionEnvironment();
35960
35959
  const inputProps = useMemo161(() => {
35961
35960
  return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
35962
35961
  }, [env.isPlayer]);
35963
- const [resolvedConfigs, setResolvedConfigs] = useState110({});
35962
+ const [resolvedConfigs, setResolvedConfigs] = useState109({});
35964
35963
  const selectedEditorProps = useMemo161(() => {
35965
35964
  return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};
35966
35965
  }, [allEditorProps, selectedComposition]);
@@ -36217,7 +36216,7 @@ var StudioInner = ({ rootComponent, readOnly, visualModeEnabled }) => {
36217
36216
  videoEnabled: window.remotion_videoEnabled,
36218
36217
  logLevel: window.remotion_logLevel ?? "info",
36219
36218
  numberOfAudioTags: window.remotion_numberOfAudioTags,
36220
- audioLatencyHint: window.remotion_audioLatencyHint ?? "interactive",
36219
+ audioLatencyHint: window.remotion_audioLatencyHint ?? "playback",
36221
36220
  children: /* @__PURE__ */ jsx305(StaticFilesProvider, {
36222
36221
  children: /* @__PURE__ */ jsx305(ResolveCompositionConfigInStudio, {
36223
36222
  children: /* @__PURE__ */ jsxs160(EditorContexts, {
@@ -36236,7 +36235,7 @@ var StudioInner = ({ rootComponent, readOnly, visualModeEnabled }) => {
36236
36235
  });
36237
36236
  };
36238
36237
  var Studio = ({ rootComponent, readOnly, visualModeEnabled }) => {
36239
- useLayoutEffect6(() => {
36238
+ useLayoutEffect5(() => {
36240
36239
  injectCSS();
36241
36240
  }, []);
36242
36241
  return /* @__PURE__ */ jsx305(FastRefreshProvider, {