@remotion/promo-pages 4.0.443 → 4.0.445

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/Homepage.js +448 -329
  2. package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/Homepage.js +54 -101
  3. package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/design.js +2 -2
  4. package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/experts.js +2 -2
  5. package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/homepage/Pricing.js +2 -2
  6. package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsGallery.js +2 -2
  7. package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsShow.js +2 -2
  8. package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/prompts/PromptsSubmit.js +2 -2
  9. package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/template-modal-content.js +2 -2
  10. package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/templates.js +3 -4
  11. package/dist/components/experts/experts-data.js +13 -0
  12. package/dist/components/homepage/CommunityStatsItems.js +4 -4
  13. package/dist/components/homepage/GitHubButton.js +1 -1
  14. package/dist/components/homepage/RealMp4Videos.js +1 -1
  15. package/dist/components/prompts/PromptsGallery.js +1 -1
  16. package/dist/components/prompts/PromptsSubmit.js +2 -2
  17. package/dist/components/team/TitleTeamCards.js +1 -1
  18. package/dist/components/team.js +2 -1
  19. package/dist/design.js +364 -280
  20. package/dist/experts/experts-data.js +27 -0
  21. package/dist/experts.js +274 -163
  22. package/dist/homepage/Pricing.js +358 -274
  23. package/dist/prompts/PromptsGallery.js +360 -276
  24. package/dist/prompts/PromptsShow.js +374 -290
  25. package/dist/prompts/PromptsSubmit.js +376 -292
  26. package/dist/team.js +356 -272
  27. package/dist/template-modal-content.js +363 -279
  28. package/dist/templates.js +356 -272
  29. package/package.json +13 -13
  30. package/public/img/freelancers/hai.jpg +0 -0
package/dist/Homepage.js CHANGED
@@ -733,6 +733,33 @@ var experts = [
733
733
  "I specialize in building complex Remotion applications integrated with AI services like Gemini (for video analysis and highlights) and Deepgram (for automated captions). I also focus on high-performance canvas interactions using Fabric.js and cost-effective AI workflows."
734
734
  ]
735
735
  })
736
+ },
737
+ {
738
+ slug: "hai-nguyen",
739
+ name: "Hai Nguyen",
740
+ image: "/img/freelancers/hai.jpg",
741
+ website: "https://haingt.dev",
742
+ x: "haingt_dev",
743
+ github: "haingt-dev",
744
+ linkedin: "in/haingt-dev/",
745
+ email: "hai@haingt.dev",
746
+ videocall: null,
747
+ since: new Date("2026-04-02").getTime(),
748
+ description: /* @__PURE__ */ jsxs("div", {
749
+ children: [
750
+ "Built a full",
751
+ " ",
752
+ /* @__PURE__ */ jsx("a", {
753
+ target: "_blank",
754
+ href: "https://github.com/haingt-dev/Bookie/tree/master/projects/ai-book-video",
755
+ children: "AI video production pipeline"
756
+ }),
757
+ " ",
758
+ "using Remotion 4.0 — orchestrating self-hosted TTS (viXTTS), Gemini API image generation, SRT-driven subtitle timing, and Ken Burns motion presets. The pipeline produces complete book-to-video content in about an hour (1-person operation) with editorial design overlays, cross-dissolve transitions, and audio spectrum visualization. GPU-accelerated rendering on Linux.",
759
+ /* @__PURE__ */ jsx("br", {}),
760
+ "Available for AI-powered video pipelines, multi-API media orchestration, and Remotion integrations with existing backend infrastructure."
761
+ ]
762
+ })
736
763
  }
737
764
  ];
738
765
  // src/components/experts/ExpertsPage.tsx
@@ -740,28 +767,30 @@ import { useMemo as useMemo36 } from "react";
740
767
 
741
768
  // ../core/dist/esm/index.mjs
742
769
  import { createContext } from "react";
743
- import { Suspense, useContext as useContext9, useEffect as useEffect2 } from "react";
770
+ import { Suspense, useCallback as useCallback4, useContext as useContext9, useEffect as useEffect2 } from "react";
744
771
  import { createPortal } from "react-dom";
745
772
  import { createContext as createContext2 } from "react";
746
773
  import { jsx as jsx2 } from "react/jsx-runtime";
747
774
  import { createContext as createContext3 } from "react";
748
- import { createContext as createContext5, useContext as useContext2, useEffect, useMemo as useMemo2 } from "react";
749
- import { createContext as createContext4, useCallback, useContext, useMemo, useRef } from "react";
775
+ import React2 from "react";
776
+ import { createContext as createContext4 } from "react";
777
+ import { createContext as createContext6, useContext as useContext2, useEffect, useMemo as useMemo2 } from "react";
778
+ import { createContext as createContext5, useCallback, useContext, useMemo, useRef } from "react";
750
779
  import { jsx as jsx22 } from "react/jsx-runtime";
751
- import { createContext as createContext6, useContext as useContext3 } from "react";
780
+ import { createContext as createContext7, useContext as useContext3 } from "react";
752
781
  import { jsx as jsx3 } from "react/jsx-runtime";
753
782
  import { forwardRef, useMemo as useMemo3 } from "react";
754
783
  import { jsx as jsx4 } from "react/jsx-runtime";
755
784
  import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
756
- import { createContext as createContext8, createRef, useContext as useContext5, useMemo as useMemo5 } from "react";
757
- import React3, { createContext as createContext7, useCallback as useCallback2, useMemo as useMemo4 } from "react";
785
+ import { createContext as createContext9, createRef, useContext as useContext5, useMemo as useMemo5 } from "react";
786
+ import React4, { createContext as createContext8, useCallback as useCallback2, useMemo as useMemo4 } from "react";
758
787
  import { jsx as jsx6 } from "react/jsx-runtime";
759
788
  import { useContext as useContext4, useState } from "react";
760
- import React4 from "react";
761
- import { createContext as createContext10, useCallback as useCallback3, useContext as useContext7 } from "react";
762
- import { createContext as createContext9 } from "react";
763
- import * as React5 from "react";
764
- import React6, { useMemo as useMemo6, useRef as useRef2 } from "react";
789
+ import React5 from "react";
790
+ import { createContext as createContext11, useCallback as useCallback3, useContext as useContext7 } from "react";
791
+ import { createContext as createContext10 } from "react";
792
+ import * as React6 from "react";
793
+ import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
765
794
  import { useContext as useContext8, useMemo as useMemo7 } from "react";
766
795
  import { jsx as jsx7 } from "react/jsx-runtime";
767
796
  import {
@@ -772,10 +801,10 @@ import {
772
801
  useState as useState4
773
802
  } from "react";
774
803
  import { useContext as useContext14, useMemo as useMemo11 } from "react";
775
- import { createContext as createContext11 } from "react";
804
+ import { createContext as createContext12 } from "react";
776
805
  import { useContext as useContext10, useMemo as useMemo9 } from "react";
777
806
  import {
778
- createContext as createContext12,
807
+ createContext as createContext13,
779
808
  useLayoutEffect,
780
809
  useMemo as useMemo8,
781
810
  useRef as useRef3,
@@ -786,8 +815,8 @@ import { useContext as useContext11 } from "react";
786
815
  import { useContext as useContext13 } from "react";
787
816
  import { useContext as useContext12, useMemo as useMemo10 } from "react";
788
817
  import { jsx as jsx9 } from "react/jsx-runtime";
789
- import { createContext as createContext13 } from "react";
790
- import React10, { useCallback as useCallback4, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
818
+ import { createContext as createContext14 } from "react";
819
+ import React11, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
791
820
  import { jsx as jsx10 } from "react/jsx-runtime";
792
821
  import { jsx as jsx11 } from "react/jsx-runtime";
793
822
  import {
@@ -798,13 +827,13 @@ import {
798
827
  useRef as useRef6,
799
828
  useState as useState5
800
829
  } from "react";
801
- import React12, { useCallback as useCallback5, useImperativeHandle, useRef as useRef5 } from "react";
830
+ import React13, { useCallback as useCallback6, useImperativeHandle, useRef as useRef5 } from "react";
802
831
  import { jsx as jsx12 } from "react/jsx-runtime";
803
832
  import { jsx as jsx13 } from "react/jsx-runtime";
804
833
  import { useContext as useContext16, useLayoutEffect as useLayoutEffect4, useState as useState7 } from "react";
805
834
  import {
806
- createContext as createContext14,
807
- useCallback as useCallback6,
835
+ createContext as createContext15,
836
+ useCallback as useCallback7,
808
837
  useImperativeHandle as useImperativeHandle3,
809
838
  useLayoutEffect as useLayoutEffect3,
810
839
  useMemo as useMemo14,
@@ -812,15 +841,15 @@ import {
812
841
  useState as useState6
813
842
  } from "react";
814
843
  import { jsx as jsx14 } from "react/jsx-runtime";
815
- import { forwardRef as forwardRef6, useCallback as useCallback11, useContext as useContext28 } from "react";
816
- import React13, { createContext as createContext15, useMemo as useMemo15 } from "react";
844
+ import { forwardRef as forwardRef6, useCallback as useCallback12, useContext as useContext28 } from "react";
845
+ import React14, { createContext as createContext16, useMemo as useMemo15 } from "react";
817
846
  import { jsx as jsx15 } from "react/jsx-runtime";
818
847
  import { useContext as useContext17 } from "react";
819
- import { createContext as createContext16, useEffect as useEffect5, useState as useState8 } from "react";
848
+ import { createContext as createContext17, useEffect as useEffect5, useState as useState8 } from "react";
820
849
  import { jsx as jsx16 } from "react/jsx-runtime";
821
- import { createContext as createContext17, useMemo as useMemo16, useReducer } from "react";
850
+ import { createContext as createContext18, useMemo as useMemo16, useReducer } from "react";
822
851
  import { jsx as jsx17 } from "react/jsx-runtime";
823
- import React19, {
852
+ import React20, {
824
853
  forwardRef as forwardRef4,
825
854
  useContext as useContext26,
826
855
  useEffect as useEffect12,
@@ -830,10 +859,10 @@ import React19, {
830
859
  useState as useState13
831
860
  } from "react";
832
861
  import { useContext as useContext19, useLayoutEffect as useLayoutEffect5, useRef as useRef10 } from "react";
833
- import React16, {
834
- createContext as createContext18,
862
+ import React17, {
863
+ createContext as createContext19,
835
864
  createRef as createRef2,
836
- useCallback as useCallback7,
865
+ useCallback as useCallback8,
837
866
  useContext as useContext18,
838
867
  useMemo as useMemo18,
839
868
  useRef as useRef8,
@@ -845,16 +874,16 @@ import { useRef as useRef9 } from "react";
845
874
  import { useContext as useContext21, useEffect as useEffect6, useMemo as useMemo19, useState as useState10 } from "react";
846
875
  import { useContext as useContext20 } from "react";
847
876
  import {
848
- useCallback as useCallback10,
877
+ useCallback as useCallback11,
849
878
  useContext as useContext24,
850
879
  useEffect as useEffect10,
851
880
  useLayoutEffect as useLayoutEffect7,
852
881
  useRef as useRef14
853
882
  } from "react";
854
- import { useCallback as useCallback9, useMemo as useMemo22, useRef as useRef12 } from "react";
883
+ import { useCallback as useCallback10, useMemo as useMemo22, useRef as useRef12 } from "react";
855
884
  import { useContext as useContext23, useMemo as useMemo21 } from "react";
856
- import React17, {
857
- useCallback as useCallback8,
885
+ import React18, {
886
+ useCallback as useCallback9,
858
887
  useContext as useContext22,
859
888
  useEffect as useEffect7,
860
889
  useLayoutEffect as useLayoutEffect6,
@@ -863,11 +892,11 @@ import React17, {
863
892
  useState as useState11
864
893
  } from "react";
865
894
  import { jsx as jsx19 } from "react/jsx-runtime";
866
- import React18 from "react";
895
+ import React19 from "react";
867
896
  import { useEffect as useEffect8, useState as useState12 } from "react";
868
897
  import { useEffect as useEffect9, useRef as useRef13 } from "react";
869
898
  import { useEffect as useEffect11 } from "react";
870
- import { createContext as createContext19, useContext as useContext25, useMemo as useMemo23 } from "react";
899
+ import { createContext as createContext20, useContext as useContext25, useMemo as useMemo23 } from "react";
871
900
  import { jsx as jsx20 } from "react/jsx-runtime";
872
901
  import {
873
902
  forwardRef as forwardRef5,
@@ -880,40 +909,40 @@ import {
880
909
  } from "react";
881
910
  import { jsx as jsx21 } from "react/jsx-runtime";
882
911
  import { jsx as jsx222 } from "react/jsx-runtime";
883
- import { forwardRef as forwardRef7, useCallback as useCallback12, useState as useState14 } from "react";
912
+ import { forwardRef as forwardRef7, useCallback as useCallback13, useState as useState14 } from "react";
884
913
  import { jsx as jsx23 } from "react/jsx-runtime";
885
914
  import {
886
- useCallback as useCallback13,
915
+ useCallback as useCallback14,
887
916
  useContext as useContext30,
888
917
  useImperativeHandle as useImperativeHandle6,
889
918
  useLayoutEffect as useLayoutEffect9,
890
919
  useRef as useRef17,
891
920
  useState as useState16
892
921
  } from "react";
893
- import React23, { forwardRef as forwardRef8, useMemo as useMemo27 } from "react";
922
+ import React24, { forwardRef as forwardRef8, useMemo as useMemo27 } from "react";
894
923
  import { useContext as useContext29, useMemo as useMemo26, useState as useState15 } from "react";
895
924
  import { jsx as jsx24 } from "react/jsx-runtime";
896
925
  import { createRef as createRef3 } from "react";
897
- import React25 from "react";
926
+ import React26 from "react";
898
927
  import {
899
- useCallback as useCallback14,
928
+ useCallback as useCallback15,
900
929
  useImperativeHandle as useImperativeHandle7,
901
930
  useMemo as useMemo28,
902
931
  useRef as useRef18,
903
932
  useState as useState17
904
933
  } from "react";
905
934
  import { jsx as jsx25 } from "react/jsx-runtime";
906
- import React26 from "react";
935
+ import React27 from "react";
907
936
  import { useMemo as useMemo30 } from "react";
908
- import { createContext as createContext20, useContext as useContext31, useMemo as useMemo29 } from "react";
937
+ import { createContext as createContext21, useContext as useContext31, useMemo as useMemo29 } from "react";
909
938
  import { jsx as jsx26 } from "react/jsx-runtime";
910
939
  import { jsx as jsx27 } from "react/jsx-runtime";
911
- import React28 from "react";
912
- import React29, { createContext as createContext21 } from "react";
940
+ import React29 from "react";
941
+ import React30, { createContext as createContext22 } from "react";
913
942
  import { useContext as useContext32 } from "react";
914
- import { useCallback as useCallback16 } from "react";
943
+ import { useCallback as useCallback17 } from "react";
915
944
  import {
916
- useCallback as useCallback15,
945
+ useCallback as useCallback16,
917
946
  useContext as useContext33,
918
947
  useEffect as useEffect14,
919
948
  useLayoutEffect as useLayoutEffect10,
@@ -921,7 +950,7 @@ import {
921
950
  useState as useState18
922
951
  } from "react";
923
952
  import { jsx as jsx28 } from "react/jsx-runtime";
924
- import React31, {
953
+ import React32, {
925
954
  forwardRef as forwardRef9,
926
955
  useContext as useContext34,
927
956
  useEffect as useEffect16,
@@ -933,15 +962,15 @@ import React31, {
933
962
  import { useEffect as useEffect15 } from "react";
934
963
  import { jsx as jsx29 } from "react/jsx-runtime";
935
964
  import { jsx as jsx30 } from "react/jsx-runtime";
936
- import React33, { useMemo as useMemo33 } from "react";
965
+ import React34, { useMemo as useMemo33 } from "react";
937
966
  import { jsx as jsx31 } from "react/jsx-runtime";
938
967
  import { Children, forwardRef as forwardRef10, useMemo as useMemo34 } from "react";
939
- import React34 from "react";
940
- import React35, { createContext as createContext22 } from "react";
968
+ import React35 from "react";
969
+ import React36, { createContext as createContext23 } from "react";
941
970
  import { jsx as jsx32 } from "react/jsx-runtime";
942
971
  import { jsx as jsx33 } from "react/jsx-runtime";
943
- import React37 from "react";
944
- import { forwardRef as forwardRef12, useCallback as useCallback17, useContext as useContext36 } from "react";
972
+ import React38 from "react";
973
+ import { forwardRef as forwardRef12, useCallback as useCallback18, useContext as useContext36 } from "react";
945
974
  import {
946
975
  forwardRef as forwardRef11,
947
976
  useContext as useContext35,
@@ -985,13 +1014,38 @@ var CanUseRemotionHooksProvider = ({ children }) => {
985
1014
  children
986
1015
  });
987
1016
  };
988
- var CompositionManager = createContext3({
1017
+ var CompositionRenderErrorContext = createContext3({
1018
+ setError: () => {},
1019
+ clearError: () => {}
1020
+ });
1021
+
1022
+ class CompositionErrorBoundary extends React2.Component {
1023
+ state = { hasError: false };
1024
+ static getDerivedStateFromError() {
1025
+ return { hasError: true };
1026
+ }
1027
+ componentDidCatch(error) {
1028
+ this.props.onError(error);
1029
+ }
1030
+ componentDidUpdate(_prevProps) {
1031
+ if (!this.state.hasError) {
1032
+ this.props.onClear();
1033
+ }
1034
+ }
1035
+ render() {
1036
+ if (this.state.hasError) {
1037
+ return null;
1038
+ }
1039
+ return this.props.children;
1040
+ }
1041
+ }
1042
+ var CompositionManager = createContext4({
989
1043
  compositions: [],
990
1044
  folders: [],
991
1045
  currentCompositionMetadata: null,
992
1046
  canvasContent: null
993
1047
  });
994
- var CompositionSetters = createContext3({
1048
+ var CompositionSetters = createContext4({
995
1049
  registerComposition: () => {
996
1050
  return;
997
1051
  },
@@ -1009,7 +1063,7 @@ var CompositionSetters = createContext3({
1009
1063
  },
1010
1064
  onlyRenderComposition: null
1011
1065
  });
1012
- var NonceContext = createContext4({
1066
+ var NonceContext = createContext5({
1013
1067
  getNonce: () => 0
1014
1068
  });
1015
1069
  var fastRefreshNonce = 0;
@@ -1048,7 +1102,7 @@ function truthy(value) {
1048
1102
  }
1049
1103
  var getRegex = () => /^([a-zA-Z0-9-\u4E00-\u9FFF])+$/g;
1050
1104
  var invalidFolderNameErrorMessage = `Folder name must match ${String(getRegex())}`;
1051
- var FolderContext = createContext5({
1105
+ var FolderContext = createContext6({
1052
1106
  folderName: null,
1053
1107
  parentName: null
1054
1108
  });
@@ -1132,7 +1186,7 @@ var serializeThenDeserializeInStudio = (props) => {
1132
1186
  }
1133
1187
  return props;
1134
1188
  };
1135
- var IsPlayerContext = createContext6(false);
1189
+ var IsPlayerContext = createContext7(false);
1136
1190
  var IsPlayerContextProvider = ({
1137
1191
  children
1138
1192
  }) => {
@@ -1371,15 +1425,15 @@ var getInputProps = () => {
1371
1425
  const parsed = deserializeJSONWithSpecialTypes(param);
1372
1426
  return parsed;
1373
1427
  };
1374
- var EditorPropsContext = createContext7({
1428
+ var EditorPropsContext = createContext8({
1375
1429
  props: {},
1376
1430
  updateProps: () => {
1377
1431
  throw new Error("Not implemented");
1378
1432
  }
1379
1433
  });
1380
- var timeValueRef = React3.createRef();
1434
+ var timeValueRef = React4.createRef();
1381
1435
  var EditorPropsProvider = ({ children }) => {
1382
- const [props, setProps] = React3.useState({});
1436
+ const [props, setProps] = React4.useState({});
1383
1437
  const updateProps = useCallback2(({
1384
1438
  defaultProps,
1385
1439
  id,
@@ -1400,7 +1454,7 @@ var EditorPropsProvider = ({ children }) => {
1400
1454
  children
1401
1455
  });
1402
1456
  };
1403
- var RemotionEnvironmentContext = React4.createContext(null);
1457
+ var RemotionEnvironmentContext = React5.createContext(null);
1404
1458
  var useRemotionEnvironment = () => {
1405
1459
  const context = useContext4(RemotionEnvironmentContext);
1406
1460
  const [env] = useState(() => getRemotionEnvironment());
@@ -1458,7 +1512,7 @@ function validateFps(fps, location, isGif) {
1458
1512
  throw new TypeError(`The FPS for a GIF cannot be higher than 50. Use the --every-nth-frame option to lower the FPS: https://remotion.dev/docs/render-as-gif`);
1459
1513
  }
1460
1514
  }
1461
- var ResolveCompositionContext = createContext8(null);
1515
+ var ResolveCompositionContext = createContext9(null);
1462
1516
  var resolveCompositionsRef = createRef();
1463
1517
  var needsResolution = (composition) => {
1464
1518
  return Boolean(composition.calculateMetadata);
@@ -1720,25 +1774,25 @@ var continueRenderInternal = ({
1720
1774
  scope.remotion_renderReady = true;
1721
1775
  }
1722
1776
  };
1723
- var LogLevelContext = createContext9({
1777
+ var LogLevelContext = createContext10({
1724
1778
  logLevel: "info",
1725
1779
  mountTime: 0
1726
1780
  });
1727
1781
  var useLogLevel = () => {
1728
- const { logLevel } = React5.useContext(LogLevelContext);
1782
+ const { logLevel } = React6.useContext(LogLevelContext);
1729
1783
  if (logLevel === null) {
1730
1784
  throw new Error("useLogLevel must be used within a LogLevelProvider");
1731
1785
  }
1732
1786
  return logLevel;
1733
1787
  };
1734
1788
  var useMountTime = () => {
1735
- const { mountTime } = React5.useContext(LogLevelContext);
1789
+ const { mountTime } = React6.useContext(LogLevelContext);
1736
1790
  if (mountTime === null) {
1737
1791
  throw new Error("useMountTime must be used within a LogLevelProvider");
1738
1792
  }
1739
1793
  return mountTime;
1740
1794
  };
1741
- var DelayRenderContextType = createContext10(null);
1795
+ var DelayRenderContextType = createContext11(null);
1742
1796
  var useDelayRender = () => {
1743
1797
  const environment = useRemotionEnvironment();
1744
1798
  const scope = useContext7(DelayRenderContextType) ?? (typeof window !== "undefined" ? window : undefined);
@@ -1789,7 +1843,7 @@ var useLazyComponent = ({
1789
1843
  }
1790
1844
  const Wrapper = (props) => {
1791
1845
  const Comp = componentRef.current;
1792
- return React6.createElement(Comp, props);
1846
+ return React7.createElement(Comp, props);
1793
1847
  };
1794
1848
  return Wrapper;
1795
1849
  }
@@ -1797,7 +1851,7 @@ var useLazyComponent = ({
1797
1851
  if (typeof compProps.lazyComponent === "undefined") {
1798
1852
  throw new Error(`A value of \`undefined\` was passed to the \`lazyComponent\` prop. Check the value you are passing to the <${componentName}/> component.`);
1799
1853
  }
1800
- return React6.lazy(compProps.lazyComponent);
1854
+ return React7.lazy(compProps.lazyComponent);
1801
1855
  }
1802
1856
  throw new Error("You must pass either 'component' or 'lazyComponent'");
1803
1857
  }, [compProps.lazyComponent]);
@@ -1933,16 +1987,27 @@ var InnerComposition = ({
1933
1987
  unregisterComposition
1934
1988
  ]);
1935
1989
  const resolved = useResolvedVideoConfig(id);
1990
+ const { setError, clearError } = useContext9(CompositionRenderErrorContext);
1991
+ const onError = useCallback4((error2) => {
1992
+ setError(error2);
1993
+ }, [setError]);
1994
+ const onClear = useCallback4(() => {
1995
+ clearError();
1996
+ }, [clearError]);
1936
1997
  if (environment.isStudio && video && video.component === lazy && video.id === id) {
1937
1998
  const Comp = lazy;
1938
1999
  if (resolved === null || resolved.type !== "success" && resolved.type !== "success-and-refreshing") {
1939
2000
  return null;
1940
2001
  }
1941
2002
  return createPortal(/* @__PURE__ */ jsx7(CanUseRemotionHooksProvider, {
1942
- children: /* @__PURE__ */ jsx7(Suspense, {
1943
- fallback: /* @__PURE__ */ jsx7(Loading, {}),
1944
- children: /* @__PURE__ */ jsx7(Comp, {
1945
- ...resolved.result.props ?? {}
2003
+ children: /* @__PURE__ */ jsx7(CompositionErrorBoundary, {
2004
+ onError,
2005
+ onClear,
2006
+ children: /* @__PURE__ */ jsx7(Suspense, {
2007
+ fallback: /* @__PURE__ */ jsx7(Loading, {}),
2008
+ children: /* @__PURE__ */ jsx7(Comp, {
2009
+ ...resolved.result.props ?? {}
2010
+ })
1946
2011
  })
1947
2012
  })
1948
2013
  }), portalNode());
@@ -1977,7 +2042,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
1977
2042
  var addSequenceStackTraces = (component) => {
1978
2043
  componentsToAddStacksTo.push(component);
1979
2044
  };
1980
- var VERSION = "4.0.443";
2045
+ var VERSION = "4.0.445";
1981
2046
  var checkMultipleRemotionVersions = () => {
1982
2047
  if (typeof globalThis === "undefined") {
1983
2048
  return;
@@ -2005,7 +2070,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
2005
2070
  }
2006
2071
  set();
2007
2072
  };
2008
- var SequenceContext = createContext11(null);
2073
+ var SequenceContext = createContext12(null);
2009
2074
  var exports_timeline_position_state = {};
2010
2075
  __export2(exports_timeline_position_state, {
2011
2076
  useTimelineSetFrame: () => useTimelineSetFrame,
@@ -2049,7 +2114,7 @@ var random = (seed, dummy) => {
2049
2114
  }
2050
2115
  throw new Error("random() argument must be a number or a string");
2051
2116
  };
2052
- var SetTimelineContext = createContext12({
2117
+ var SetTimelineContext = createContext13({
2053
2118
  setFrame: () => {
2054
2119
  throw new Error("default");
2055
2120
  },
@@ -2057,8 +2122,8 @@ var SetTimelineContext = createContext12({
2057
2122
  throw new Error("default");
2058
2123
  }
2059
2124
  });
2060
- var TimelineContext = createContext12(null);
2061
- var AbsoluteTimeContext = createContext12(null);
2125
+ var TimelineContext = createContext13(null);
2126
+ var AbsoluteTimeContext = createContext13(null);
2062
2127
  var TimelineContextProvider = ({ children, frameState }) => {
2063
2128
  const [playing, setPlaying] = useState2(false);
2064
2129
  const imperativePlaying = useRef3(false);
@@ -2318,11 +2383,11 @@ var Freeze = ({
2318
2383
  })
2319
2384
  });
2320
2385
  };
2321
- var PremountContext = createContext13({
2386
+ var PremountContext = createContext14({
2322
2387
  premountFramesRemaining: 0,
2323
2388
  playing: false
2324
2389
  });
2325
- var SequenceManager = React10.createContext({
2390
+ var SequenceManager = React11.createContext({
2326
2391
  registerSequence: () => {
2327
2392
  throw new Error("SequenceManagerContext not initialized");
2328
2393
  },
@@ -2331,13 +2396,13 @@ var SequenceManager = React10.createContext({
2331
2396
  },
2332
2397
  sequences: []
2333
2398
  });
2334
- var SequenceVisibilityToggleContext = React10.createContext({
2399
+ var SequenceVisibilityToggleContext = React11.createContext({
2335
2400
  hidden: {},
2336
2401
  setHidden: () => {
2337
2402
  throw new Error("SequenceVisibilityToggle not initialized");
2338
2403
  }
2339
2404
  });
2340
- var VisualModeOverridesContext = React10.createContext({
2405
+ var VisualModeOverridesContext = React11.createContext({
2341
2406
  dragOverrides: {},
2342
2407
  setDragOverrides: () => {
2343
2408
  throw new Error("VisualModeOverridesContext not initialized");
@@ -2358,7 +2423,7 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
2358
2423
  const controlOverridesRef = useRef4(dragOverrides);
2359
2424
  controlOverridesRef.current = dragOverrides;
2360
2425
  const [codeValues, setCodeValuesMapState] = useState3({});
2361
- const setDragOverrides = useCallback4((sequenceId, key, value) => {
2426
+ const setDragOverrides = useCallback5((sequenceId, key, value) => {
2362
2427
  setControlOverrides((prev) => ({
2363
2428
  ...prev,
2364
2429
  [sequenceId]: {
@@ -2367,7 +2432,7 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
2367
2432
  }
2368
2433
  }));
2369
2434
  }, []);
2370
- const clearDragOverrides = useCallback4((sequenceId) => {
2435
+ const clearDragOverrides = useCallback5((sequenceId) => {
2371
2436
  setControlOverrides((prev) => {
2372
2437
  if (!prev[sequenceId]) {
2373
2438
  return prev;
@@ -2377,7 +2442,7 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
2377
2442
  return next;
2378
2443
  });
2379
2444
  }, []);
2380
- const setCodeValues = useCallback4((sequenceId, values) => {
2445
+ const setCodeValues = useCallback5((sequenceId, values) => {
2381
2446
  setCodeValuesMapState((prev) => {
2382
2447
  if (prev[sequenceId] === values) {
2383
2448
  return prev;
@@ -2393,12 +2458,12 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
2393
2458
  return { ...prev, [sequenceId]: values };
2394
2459
  });
2395
2460
  }, []);
2396
- const registerSequence = useCallback4((seq) => {
2461
+ const registerSequence = useCallback5((seq) => {
2397
2462
  setSequences((seqs) => {
2398
2463
  return [...seqs, seq];
2399
2464
  });
2400
2465
  }, []);
2401
- const unregisterSequence = useCallback4((seq) => {
2466
+ const unregisterSequence = useCallback5((seq) => {
2402
2467
  setSequences((seqs) => seqs.filter((s) => s.id !== seq));
2403
2468
  }, []);
2404
2469
  const sequenceContext = useMemo12(() => {
@@ -2732,7 +2797,7 @@ var calcArgs = (fit, frameSize, canvasSize) => {
2732
2797
  };
2733
2798
  var CanvasRefForwardingFunction = ({ width, height, fit, className, style }, ref) => {
2734
2799
  const canvasRef = useRef5(null);
2735
- const draw = useCallback5((imageData) => {
2800
+ const draw = useCallback6((imageData) => {
2736
2801
  const canvas = canvasRef.current;
2737
2802
  const canvasWidth = width ?? imageData.displayWidth;
2738
2803
  const canvasHeight = height ?? imageData.displayHeight;
@@ -2777,7 +2842,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style }, ref
2777
2842
  style
2778
2843
  });
2779
2844
  };
2780
- var Canvas = React12.forwardRef(CanvasRefForwardingFunction);
2845
+ var Canvas = React13.forwardRef(CanvasRefForwardingFunction);
2781
2846
  var CACHE_SIZE = 5;
2782
2847
  var getActualTime = ({
2783
2848
  loopBehavior,
@@ -3060,7 +3125,7 @@ var validateRenderAsset = (artifact) => {
3060
3125
  }
3061
3126
  validateContent(artifact.content);
3062
3127
  };
3063
- var RenderAssetManager = createContext14({
3128
+ var RenderAssetManager = createContext15({
3064
3129
  registerRenderAsset: () => {
3065
3130
  return;
3066
3131
  },
@@ -3072,7 +3137,7 @@ var RenderAssetManager = createContext14({
3072
3137
  var RenderAssetManagerProvider = ({ children, collectAssets }) => {
3073
3138
  const [renderAssets, setRenderAssets] = useState6([]);
3074
3139
  const renderAssetsRef = useRef7([]);
3075
- const registerRenderAsset = useCallback6((renderAsset) => {
3140
+ const registerRenderAsset = useCallback7((renderAsset) => {
3076
3141
  validateRenderAsset(renderAsset);
3077
3142
  renderAssetsRef.current = [...renderAssetsRef.current, renderAsset];
3078
3143
  setRenderAssets(renderAssetsRef.current);
@@ -3089,7 +3154,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
3089
3154
  };
3090
3155
  }, []);
3091
3156
  }
3092
- const unregisterRenderAsset = useCallback6((id) => {
3157
+ const unregisterRenderAsset = useCallback7((id) => {
3093
3158
  renderAssetsRef.current = renderAssetsRef.current.filter((a) => a.id !== id);
3094
3159
  setRenderAssets(renderAssetsRef.current);
3095
3160
  }, []);
@@ -3198,9 +3263,9 @@ var calculateMediaDuration = ({
3198
3263
  const actualDuration = duration / playbackRate;
3199
3264
  return Math.floor(actualDuration);
3200
3265
  };
3201
- var LoopContext = createContext15(null);
3266
+ var LoopContext = createContext16(null);
3202
3267
  var useLoop = () => {
3203
- return React13.useContext(LoopContext);
3268
+ return React14.useContext(LoopContext);
3204
3269
  };
3205
3270
  var Loop = ({ durationInFrames, times = Infinity, children, name, ...props }) => {
3206
3271
  const currentFrame = useCurrentFrame();
@@ -3261,7 +3326,7 @@ var playbackLogging = ({
3261
3326
  const tags = [mountTime ? Date.now() - mountTime + "ms " : null, tag].filter(Boolean).join(" ");
3262
3327
  Log.trace({ logLevel, tag: null }, `[${tags}]`, message);
3263
3328
  };
3264
- var PreloadContext = createContext16({});
3329
+ var PreloadContext = createContext17({});
3265
3330
  var preloads = {};
3266
3331
  var updaters = [];
3267
3332
  var setPreloads = (updater) => {
@@ -3582,7 +3647,7 @@ var durationReducer = (state, action) => {
3582
3647
  return state;
3583
3648
  }
3584
3649
  };
3585
- var DurationsContext = createContext17({
3650
+ var DurationsContext = createContext18({
3586
3651
  durations: {},
3587
3652
  setDurations: () => {
3588
3653
  throw new Error("context missing");
@@ -3768,7 +3833,7 @@ var didPropChange = (key, newProp, prevProp) => {
3768
3833
  }
3769
3834
  return true;
3770
3835
  };
3771
- var SharedAudioContext = createContext18(null);
3836
+ var SharedAudioContext = createContext19(null);
3772
3837
  var SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHint, audioEnabled }) => {
3773
3838
  const audios = useRef8([]);
3774
3839
  const [initialNumberOfAudioTags] = useState9(numberOfAudioTags);
@@ -3851,7 +3916,7 @@ var SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHin
3851
3916
  };
3852
3917
  });
3853
3918
  }, [audioContext, numberOfAudioTags]);
3854
- const effectToUse = React16.useInsertionEffect ?? React16.useLayoutEffect;
3919
+ const effectToUse = React17.useInsertionEffect ?? React17.useLayoutEffect;
3855
3920
  effectToUse(() => {
3856
3921
  return () => {
3857
3922
  requestAnimationFrame(() => {
@@ -3862,7 +3927,7 @@ var SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHin
3862
3927
  };
3863
3928
  }, [refs]);
3864
3929
  const takenAudios = useRef8(new Array(numberOfAudioTags).fill(false));
3865
- const rerenderAudios = useCallback7(() => {
3930
+ const rerenderAudios = useCallback8(() => {
3866
3931
  refs.forEach(({ ref, id }) => {
3867
3932
  const data = audios.current?.find((a) => a.id === id);
3868
3933
  const { current } = ref;
@@ -3883,7 +3948,7 @@ var SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHin
3883
3948
  });
3884
3949
  });
3885
3950
  }, [refs]);
3886
- const registerAudio = useCallback7((options) => {
3951
+ const registerAudio = useCallback8((options) => {
3887
3952
  const { aud, audioId, premounting, postmounting } = options;
3888
3953
  const found = audios.current?.find((a) => a.audioId === audioId);
3889
3954
  if (found) {
@@ -3912,7 +3977,7 @@ var SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHin
3912
3977
  rerenderAudios();
3913
3978
  return newElem;
3914
3979
  }, [numberOfAudioTags, refs, rerenderAudios]);
3915
- const unregisterAudio = useCallback7((id) => {
3980
+ const unregisterAudio = useCallback8((id) => {
3916
3981
  const cloned = [...takenAudios.current];
3917
3982
  const index = refs.findIndex((r) => r.id === id);
3918
3983
  if (index === -1) {
@@ -3923,7 +3988,7 @@ var SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHin
3923
3988
  audios.current = audios.current?.filter((a) => a.id !== id);
3924
3989
  rerenderAudios();
3925
3990
  }, [refs, rerenderAudios]);
3926
- const updateAudio = useCallback7(({
3991
+ const updateAudio = useCallback8(({
3927
3992
  aud,
3928
3993
  audioId,
3929
3994
  id,
@@ -3959,7 +4024,7 @@ var SharedAudioContextProvider = ({ children, numberOfAudioTags, audioLatencyHin
3959
4024
  }, [rerenderAudios]);
3960
4025
  const mountTime = useMountTime();
3961
4026
  const env = useRemotionEnvironment();
3962
- const playAllAudios = useCallback7(() => {
4027
+ const playAllAudios = useCallback8(() => {
3963
4028
  refs.forEach((ref) => {
3964
4029
  const audio = audios.current.find((a) => a.el === ref.ref);
3965
4030
  if (audio?.premounting) {
@@ -4023,7 +4088,7 @@ var useSharedAudio = ({
4023
4088
  if (ctx && ctx.numberOfAudioTags > 0) {
4024
4089
  return ctx.registerAudio({ aud, audioId, premounting, postmounting });
4025
4090
  }
4026
- const el = React16.createRef();
4091
+ const el = React17.createRef();
4027
4092
  const mediaElementSourceNode = ctx?.audioContext ? makeSharedElementSourceNode({
4028
4093
  audioContext: ctx.audioContext,
4029
4094
  ref: el
@@ -4042,7 +4107,7 @@ var useSharedAudio = ({
4042
4107
  }
4043
4108
  };
4044
4109
  });
4045
- const effectToUse = React16.useInsertionEffect ?? React16.useLayoutEffect;
4110
+ const effectToUse = React17.useInsertionEffect ?? React17.useLayoutEffect;
4046
4111
  if (typeof document !== "undefined") {
4047
4112
  effectToUse(() => {
4048
4113
  if (ctx && ctx.numberOfAudioTags > 0) {
@@ -4266,6 +4331,24 @@ var getAssetDisplayName = (filename) => {
4266
4331
  const splitted = filename.split("/").map((s) => s.split("\\")).flat(1);
4267
4332
  return splitted[splitted.length - 1];
4268
4333
  };
4334
+ var getTimelineDuration = ({
4335
+ compositionDurationInFrames,
4336
+ playbackRate,
4337
+ trimBefore,
4338
+ trimAfter,
4339
+ parentSequenceDurationInFrames
4340
+ }) => {
4341
+ const mediaDuration = calculateMediaDuration({
4342
+ mediaDurationInFrames: compositionDurationInFrames * playbackRate + (trimBefore ?? 0),
4343
+ playbackRate,
4344
+ trimBefore,
4345
+ trimAfter
4346
+ });
4347
+ if (parentSequenceDurationInFrames !== null) {
4348
+ return Math.floor(Math.min(parentSequenceDurationInFrames * playbackRate, mediaDuration));
4349
+ }
4350
+ return mediaDuration;
4351
+ };
4269
4352
  var evaluateVolume = ({
4270
4353
  frame,
4271
4354
  volume,
@@ -4314,13 +4397,13 @@ var useBasicMediaInTimeline = ({
4314
4397
  const parentSequence = useContext21(SequenceContext);
4315
4398
  const videoConfig = useVideoConfig();
4316
4399
  const [initialVolume] = useState10(() => volume);
4317
- const mediaDuration = calculateMediaDuration({
4318
- mediaDurationInFrames: videoConfig.durationInFrames + (trimBefore ?? 0),
4400
+ const duration = getTimelineDuration({
4401
+ compositionDurationInFrames: videoConfig.durationInFrames,
4319
4402
  playbackRate,
4320
4403
  trimBefore,
4321
- trimAfter
4404
+ trimAfter,
4405
+ parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null
4322
4406
  });
4323
- const duration = parentSequence ? Math.min(parentSequence.durationInFrames, mediaDuration) : mediaDuration;
4324
4407
  const volumes = useMemo19(() => {
4325
4408
  if (typeof volume === "number") {
4326
4409
  return volume;
@@ -4523,7 +4606,7 @@ var useBufferManager = (logLevel, mountTime) => {
4523
4606
  const env = useRemotionEnvironment();
4524
4607
  const rendering = env.isRendering;
4525
4608
  const buffering = useRef11(false);
4526
- const addBlock = useCallback8((block) => {
4609
+ const addBlock = useCallback9((block) => {
4527
4610
  if (rendering) {
4528
4611
  return {
4529
4612
  unblock: () => {
@@ -4544,7 +4627,7 @@ var useBufferManager = (logLevel, mountTime) => {
4544
4627
  }
4545
4628
  };
4546
4629
  }, [rendering]);
4547
- const listenForBuffering = useCallback8((callback) => {
4630
+ const listenForBuffering = useCallback9((callback) => {
4548
4631
  setOnBufferingCallbacks((c) => [...c, callback]);
4549
4632
  return {
4550
4633
  remove: () => {
@@ -4552,7 +4635,7 @@ var useBufferManager = (logLevel, mountTime) => {
4552
4635
  }
4553
4636
  };
4554
4637
  }, []);
4555
- const listenForResume = useCallback8((callback) => {
4638
+ const listenForResume = useCallback9((callback) => {
4556
4639
  setOnResumeCallbacks((c) => [...c, callback]);
4557
4640
  return {
4558
4641
  remove: () => {
@@ -4594,7 +4677,7 @@ var useBufferManager = (logLevel, mountTime) => {
4594
4677
  return { addBlock, listenForBuffering, listenForResume, buffering };
4595
4678
  }, [addBlock, buffering, listenForBuffering, listenForResume]);
4596
4679
  };
4597
- var BufferingContextReact = React17.createContext(null);
4680
+ var BufferingContextReact = React18.createContext(null);
4598
4681
  var BufferingProvider = ({ children }) => {
4599
4682
  const { logLevel, mountTime } = useContext22(LogLevelContext);
4600
4683
  const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
@@ -4654,7 +4737,7 @@ var useBufferUntilFirstFrame = ({
4654
4737
  }) => {
4655
4738
  const bufferingRef = useRef12(false);
4656
4739
  const { delayPlayback } = useBufferState();
4657
- const bufferUntilFirstFrame = useCallback9((requestedTime) => {
4740
+ const bufferUntilFirstFrame = useCallback10((requestedTime) => {
4658
4741
  if (mediaType !== "video") {
4659
4742
  return;
4660
4743
  }
@@ -4733,7 +4816,7 @@ var useBufferUntilFirstFrame = ({
4733
4816
  }, [bufferUntilFirstFrame]);
4734
4817
  };
4735
4818
  var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
4736
- const lastUpdate = React18.useRef({
4819
+ const lastUpdate = React19.useRef({
4737
4820
  time: mediaRef.current?.currentTime ?? 0,
4738
4821
  lastUpdate: performance.now()
4739
4822
  });
@@ -5142,7 +5225,7 @@ var useMediaPlayback = ({
5142
5225
  throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
5143
5226
  }
5144
5227
  const isVariableFpsVideoMap = useRef14({});
5145
- const onVariableFpsVideoDetected = useCallback10(() => {
5228
+ const onVariableFpsVideoDetected = useCallback11(() => {
5146
5229
  if (!src) {
5147
5230
  return;
5148
5231
  }
@@ -5406,11 +5489,11 @@ var useMediaTag = ({
5406
5489
  env.isPlayer
5407
5490
  ]);
5408
5491
  };
5409
- var MediaVolumeContext = createContext19({
5492
+ var MediaVolumeContext = createContext20({
5410
5493
  mediaMuted: false,
5411
5494
  mediaVolume: 1
5412
5495
  });
5413
- var SetMediaVolumeContext = createContext19({
5496
+ var SetMediaVolumeContext = createContext20({
5414
5497
  setMediaMuted: () => {
5415
5498
  throw new Error("default");
5416
5499
  },
@@ -5573,7 +5656,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
5573
5656
  volume: userPreferredVolume,
5574
5657
  shouldUseWebAudioApi: useWebAudioApi ?? false
5575
5658
  });
5576
- const effectToUse = React19.useInsertionEffect ?? React19.useLayoutEffect;
5659
+ const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
5577
5660
  effectToUse(() => {
5578
5661
  return () => {
5579
5662
  requestAnimationFrame(() => {
@@ -5771,7 +5854,7 @@ var AudioRefForwardingFunction = (props, ref) => {
5771
5854
  throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
5772
5855
  }
5773
5856
  const preloadedSrc = usePreload(props.src);
5774
- const onError = useCallback11((e) => {
5857
+ const onError = useCallback12((e) => {
5775
5858
  console.log(e.currentTarget.error);
5776
5859
  const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;
5777
5860
  if (loop) {
@@ -5785,7 +5868,7 @@ var AudioRefForwardingFunction = (props, ref) => {
5785
5868
  console.warn(errMessage);
5786
5869
  }
5787
5870
  }, [loop, onRemotionError, preloadedSrc]);
5788
- const onDuration = useCallback11((src, durationInSeconds) => {
5871
+ const onDuration = useCallback12((src, durationInSeconds) => {
5789
5872
  setDurations({ type: "got-duration", durationInSeconds, src });
5790
5873
  }, [setDurations]);
5791
5874
  const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];
@@ -5875,11 +5958,11 @@ var IFrameRefForwarding = ({
5875
5958
  retries: delayRenderRetries ?? undefined,
5876
5959
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
5877
5960
  }));
5878
- const didLoad = useCallback12((e) => {
5961
+ const didLoad = useCallback13((e) => {
5879
5962
  continueRender2(handle);
5880
5963
  onLoad?.(e);
5881
5964
  }, [handle, onLoad, continueRender2]);
5882
- const didGetError = useCallback12((e) => {
5965
+ const didGetError = useCallback13((e) => {
5883
5966
  continueRender2(handle);
5884
5967
  if (onError) {
5885
5968
  onError(e);
@@ -6024,7 +6107,7 @@ var wrapInSchema = (Component, schema) => {
6024
6107
  const Wrapped = forwardRef8((props2, ref) => {
6025
6108
  const env = useRemotionEnvironment();
6026
6109
  if (!env.isStudio || env.isReadOnlyStudio || env.isRendering || !process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) {
6027
- return React23.createElement(Component, {
6110
+ return React24.createElement(Component, {
6028
6111
  ...props2,
6029
6112
  controls: null,
6030
6113
  ref
@@ -6039,7 +6122,7 @@ var wrapInSchema = (Component, schema) => {
6039
6122
  }, schemaKeys.map((key) => getNestedValue(props2, key)));
6040
6123
  const { controls, values } = useSchema(schema, schemaInput);
6041
6124
  const mergedProps = mergeValues(props2, values, schemaKeys);
6042
- return React23.createElement(Component, {
6125
+ return React24.createElement(Component, {
6043
6126
  ...mergedProps,
6044
6127
  controls,
6045
6128
  ref
@@ -6124,7 +6207,7 @@ var ImgInner = ({
6124
6207
  controls: controls ?? null
6125
6208
  });
6126
6209
  const actualSrc = usePreload(src);
6127
- const retryIn = useCallback13((timeout) => {
6210
+ const retryIn = useCallback14((timeout) => {
6128
6211
  if (!imageRef.current) {
6129
6212
  return;
6130
6213
  }
@@ -6142,7 +6225,7 @@ var ImgInner = ({
6142
6225
  }, timeout);
6143
6226
  }, []);
6144
6227
  const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
6145
- const didGetError = useCallback13((e) => {
6228
+ const didGetError = useCallback14((e) => {
6146
6229
  if (!errors.current) {
6147
6230
  return;
6148
6231
  }
@@ -6246,7 +6329,7 @@ var ImgInner = ({
6246
6329
  };
6247
6330
  var Img = wrapInSchema(ImgInner, imgSchema);
6248
6331
  addSequenceStackTraces(Img);
6249
- var compositionsRef = React25.createRef();
6332
+ var compositionsRef = React26.createRef();
6250
6333
  var CompositionManagerProvider = ({
6251
6334
  children,
6252
6335
  onlyRenderComposition,
@@ -6258,14 +6341,14 @@ var CompositionManagerProvider = ({
6258
6341
  const [canvasContent, setCanvasContent] = useState17(initialCanvasContent);
6259
6342
  const [compositions, setCompositions] = useState17(initialCompositions);
6260
6343
  const currentcompositionsRef = useRef18(compositions);
6261
- const updateCompositions = useCallback14((updateComps) => {
6344
+ const updateCompositions = useCallback15((updateComps) => {
6262
6345
  setCompositions((comps) => {
6263
6346
  const updated = updateComps(comps);
6264
6347
  currentcompositionsRef.current = updated;
6265
6348
  return updated;
6266
6349
  });
6267
6350
  }, []);
6268
- const registerComposition = useCallback14((comp) => {
6351
+ const registerComposition = useCallback15((comp) => {
6269
6352
  updateCompositions((comps) => {
6270
6353
  if (comps.find((c2) => c2.id === comp.id)) {
6271
6354
  throw new Error(`Multiple composition with id ${comp.id} are registered.`);
@@ -6273,12 +6356,12 @@ var CompositionManagerProvider = ({
6273
6356
  return [...comps, comp];
6274
6357
  });
6275
6358
  }, [updateCompositions]);
6276
- const unregisterComposition = useCallback14((id) => {
6359
+ const unregisterComposition = useCallback15((id) => {
6277
6360
  setCompositions((comps) => {
6278
6361
  return comps.filter((c2) => c2.id !== id);
6279
6362
  });
6280
6363
  }, []);
6281
- const registerFolder = useCallback14((name, parent, nonce) => {
6364
+ const registerFolder = useCallback15((name, parent, nonce) => {
6282
6365
  setFolders((prevFolders) => {
6283
6366
  return [
6284
6367
  ...prevFolders,
@@ -6290,7 +6373,7 @@ var CompositionManagerProvider = ({
6290
6373
  ];
6291
6374
  });
6292
6375
  }, []);
6293
- const unregisterFolder = useCallback14((name, parent) => {
6376
+ const unregisterFolder = useCallback15((name, parent) => {
6294
6377
  setFolders((prevFolders) => {
6295
6378
  return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
6296
6379
  });
@@ -6394,7 +6477,7 @@ var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
6394
6477
  var getPreviewDomElement = () => {
6395
6478
  return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
6396
6479
  };
6397
- var MaxMediaCacheSizeContext = React26.createContext(null);
6480
+ var MaxMediaCacheSizeContext = React27.createContext(null);
6398
6481
  var Root = null;
6399
6482
  var listeners = [];
6400
6483
  var getRoot = () => {
@@ -6412,7 +6495,7 @@ var waitForRoot = (fn) => {
6412
6495
  listeners = listeners.filter((l) => l !== fn);
6413
6496
  };
6414
6497
  };
6415
- var MediaEnabledContext = createContext20(null);
6498
+ var MediaEnabledContext = createContext21(null);
6416
6499
  var useVideoEnabled = () => {
6417
6500
  const context = useContext31(MediaEnabledContext);
6418
6501
  if (!context) {
@@ -6659,7 +6742,7 @@ var resolveVideoConfigOrCatch = (params) => {
6659
6742
  };
6660
6743
  }
6661
6744
  };
6662
- var SequenceStackTracesUpdateContext = React28.createContext(() => {});
6745
+ var SequenceStackTracesUpdateContext = React29.createContext(() => {});
6663
6746
  var getEnvVariables = () => {
6664
6747
  if (getRemotionEnvironment().isRendering) {
6665
6748
  const param = window.remotion_envVariables;
@@ -6685,8 +6768,8 @@ var setupEnvVariables = () => {
6685
6768
  window.process.env[key] = env[key];
6686
6769
  });
6687
6770
  };
6688
- var CurrentScaleContext = React29.createContext(null);
6689
- var PreviewSizeContext = createContext21({
6771
+ var CurrentScaleContext = React30.createContext(null);
6772
+ var PreviewSizeContext = createContext22({
6690
6773
  setSize: () => {
6691
6774
  return;
6692
6775
  },
@@ -6897,7 +6980,7 @@ var OffthreadVideoForRendering = ({
6897
6980
  continueRender2,
6898
6981
  delayRender2
6899
6982
  ]);
6900
- const onErr = useCallback15(() => {
6983
+ const onErr = useCallback16(() => {
6901
6984
  if (onError) {
6902
6985
  onError?.(new Error("Failed to load image with src " + imageSrc));
6903
6986
  } else {
@@ -6907,7 +6990,7 @@ var OffthreadVideoForRendering = ({
6907
6990
  const className = useMemo31(() => {
6908
6991
  return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
6909
6992
  }, [props2.className]);
6910
- const onImageFrame = useCallback15((img) => {
6993
+ const onImageFrame = useCallback16((img) => {
6911
6994
  if (onVideoFrame) {
6912
6995
  onVideoFrame(img);
6913
6996
  }
@@ -6952,6 +7035,15 @@ var useEmitVideoFrame = ({
6952
7035
  };
6953
7036
  }, [onVideoFrame, ref]);
6954
7037
  };
7038
+
7039
+ class MediaPlaybackError extends Error {
7040
+ src;
7041
+ constructor({ message, src }) {
7042
+ super(message);
7043
+ this.name = "MediaPlaybackError";
7044
+ this.src = src;
7045
+ }
7046
+ }
6955
7047
  var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
6956
7048
  const context = useContext34(SharedAudioContext);
6957
7049
  if (!context) {
@@ -6967,7 +7059,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
6967
7059
  ref: videoRef
6968
7060
  });
6969
7061
  }, [context.audioContext]);
6970
- const effectToUse = React31.useInsertionEffect ?? React31.useLayoutEffect;
7062
+ const effectToUse = React32.useInsertionEffect ?? React32.useLayoutEffect;
6971
7063
  effectToUse(() => {
6972
7064
  return () => {
6973
7065
  requestAnimationFrame(() => {
@@ -7094,18 +7186,30 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
7094
7186
  if (current.error) {
7095
7187
  console.error("Error occurred in video", current?.error);
7096
7188
  if (onError) {
7097
- const err = new Error(`Code ${current.error.code}: ${current.error.message}`);
7189
+ const err = new MediaPlaybackError({
7190
+ message: `Code ${current.error.code}: ${current.error.message}`,
7191
+ src
7192
+ });
7098
7193
  onError(err);
7099
7194
  return;
7100
7195
  }
7101
- throw new Error(`The browser threw an error while playing the video ${src}: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`);
7196
+ throw new MediaPlaybackError({
7197
+ message: `The browser threw an error while playing the video ${src}: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`,
7198
+ src
7199
+ });
7102
7200
  } else {
7103
7201
  if (onError) {
7104
- const err = new Error(`The browser threw an error while playing the video ${src}`);
7202
+ const err = new MediaPlaybackError({
7203
+ message: `The browser threw an error while playing the video ${src}`,
7204
+ src
7205
+ });
7105
7206
  onError(err);
7106
7207
  return;
7107
7208
  }
7108
- throw new Error("The browser threw an error while playing the video");
7209
+ throw new MediaPlaybackError({
7210
+ message: "The browser threw an error while playing the video",
7211
+ src
7212
+ });
7109
7213
  }
7110
7214
  };
7111
7215
  current.addEventListener("error", errorHandler, { once: true });
@@ -7184,7 +7288,7 @@ var InnerOffthreadVideo = (props2) => {
7184
7288
  if (environment.isClientSideRendering) {
7185
7289
  throw new Error("<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
7186
7290
  }
7187
- const onDuration = useCallback16(() => {
7291
+ const onDuration = useCallback17(() => {
7188
7292
  return;
7189
7293
  }, []);
7190
7294
  if (typeof props2.src !== "string") {
@@ -7326,18 +7430,18 @@ var OffthreadVideo = ({
7326
7430
  addSequenceStackTraces(OffthreadVideo);
7327
7431
  var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
7328
7432
  function useRemotionContexts() {
7329
- const compositionManagerCtx = React33.useContext(CompositionManager);
7330
- const timelineContext = React33.useContext(TimelineContext);
7331
- const setTimelineContext = React33.useContext(SetTimelineContext);
7332
- const sequenceContext = React33.useContext(SequenceContext);
7333
- const nonceContext = React33.useContext(NonceContext);
7334
- const canUseRemotionHooksContext = React33.useContext(CanUseRemotionHooks);
7335
- const preloadContext = React33.useContext(PreloadContext);
7336
- const resolveCompositionContext = React33.useContext(ResolveCompositionContext);
7337
- const renderAssetManagerContext = React33.useContext(RenderAssetManager);
7338
- const sequenceManagerContext = React33.useContext(SequenceManager);
7339
- const bufferManagerContext = React33.useContext(BufferingContextReact);
7340
- const logLevelContext = React33.useContext(LogLevelContext);
7433
+ const compositionManagerCtx = React34.useContext(CompositionManager);
7434
+ const timelineContext = React34.useContext(TimelineContext);
7435
+ const setTimelineContext = React34.useContext(SetTimelineContext);
7436
+ const sequenceContext = React34.useContext(SequenceContext);
7437
+ const nonceContext = React34.useContext(NonceContext);
7438
+ const canUseRemotionHooksContext = React34.useContext(CanUseRemotionHooks);
7439
+ const preloadContext = React34.useContext(PreloadContext);
7440
+ const resolveCompositionContext = React34.useContext(ResolveCompositionContext);
7441
+ const renderAssetManagerContext = React34.useContext(RenderAssetManager);
7442
+ const sequenceManagerContext = React34.useContext(SequenceManager);
7443
+ const bufferManagerContext = React34.useContext(BufferingContextReact);
7444
+ const logLevelContext = React34.useContext(LogLevelContext);
7341
7445
  return useMemo33(() => ({
7342
7446
  compositionManagerCtx,
7343
7447
  timelineContext,
@@ -7510,7 +7614,8 @@ var Internals = {
7510
7614
  TimelineContext,
7511
7615
  AbsoluteTimeContext,
7512
7616
  RenderAssetManagerProvider,
7513
- getEffectiveVisualModeValue
7617
+ getEffectiveVisualModeValue,
7618
+ CompositionRenderErrorContext
7514
7619
  };
7515
7620
  var NUMBER = "[-+]?\\d*\\.?\\d+";
7516
7621
  var PERCENTAGE = NUMBER + "%";
@@ -7539,16 +7644,16 @@ var validateFrame = ({
7539
7644
  }
7540
7645
  };
7541
7646
  var flattenChildren = (children) => {
7542
- const childrenArray = React34.Children.toArray(children);
7647
+ const childrenArray = React35.Children.toArray(children);
7543
7648
  return childrenArray.reduce((flatChildren, child) => {
7544
- if (child.type === React34.Fragment) {
7649
+ if (child.type === React35.Fragment) {
7545
7650
  return flatChildren.concat(flattenChildren(child.props.children));
7546
7651
  }
7547
7652
  flatChildren.push(child);
7548
7653
  return flatChildren;
7549
7654
  }, []);
7550
7655
  };
7551
- var IsInsideSeriesContext = createContext22(false);
7656
+ var IsInsideSeriesContext = createContext23(false);
7552
7657
  var IsInsideSeriesContainer = ({ children }) => {
7553
7658
  return /* @__PURE__ */ jsx32(IsInsideSeriesContext.Provider, {
7554
7659
  value: true,
@@ -7562,7 +7667,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
7562
7667
  });
7563
7668
  };
7564
7669
  var useRequireToBeInsideSeries = () => {
7565
- const isInsideSeries = React35.useContext(IsInsideSeriesContext);
7670
+ const isInsideSeries = React36.useContext(IsInsideSeriesContext);
7566
7671
  if (!isInsideSeries) {
7567
7672
  throw new Error("This component must be inside a <Series /> component.");
7568
7673
  }
@@ -8226,9 +8331,15 @@ var VideoForRenderingForwardFunction = ({
8226
8331
  if (onError) {
8227
8332
  return;
8228
8333
  }
8229
- throw new Error(`The browser threw an error while playing the video ${props2.src}: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`);
8334
+ throw new MediaPlaybackError({
8335
+ message: `The browser threw an error while playing the video ${props2.src}: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`,
8336
+ src: props2.src
8337
+ });
8230
8338
  } else {
8231
- throw new Error("The browser threw an error");
8339
+ throw new MediaPlaybackError({
8340
+ message: "The browser threw an error",
8341
+ src: props2.src
8342
+ });
8232
8343
  }
8233
8344
  };
8234
8345
  current.addEventListener("error", errorHandler, { once: true });
@@ -8324,10 +8435,10 @@ var VideoForwardingFunction = (props2, ref) => {
8324
8435
  throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
8325
8436
  }
8326
8437
  const preloadedSrc = usePreload(props2.src);
8327
- const onDuration = useCallback17((src, durationInSeconds) => {
8438
+ const onDuration = useCallback18((src, durationInSeconds) => {
8328
8439
  setDurations({ type: "got-duration", durationInSeconds, src });
8329
8440
  }, [setDurations]);
8330
- const onVideoFrame = useCallback17(() => {}, []);
8441
+ const onVideoFrame = useCallback18(() => {}, []);
8331
8442
  const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
8332
8443
  validateMediaTrimProps({ startFrom, endAt, trimBefore, trimAfter });
8333
8444
  const { trimBeforeValue, trimAfterValue } = resolveTrimProps({
@@ -8842,7 +8953,7 @@ var ExpertsPageContent = ({ Link }) => {
8842
8953
  });
8843
8954
  };
8844
8955
  // ../design/dist/esm/index.mjs
8845
- import { useCallback as useCallback18, useRef as useRef22, useState as useState22 } from "react";
8956
+ import { useCallback as useCallback19, useRef as useRef22, useState as useState22 } from "react";
8846
8957
 
8847
8958
  // ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
8848
8959
  function r(e) {
@@ -10184,7 +10295,7 @@ var getDefaultConfig = () => {
10184
10295
  var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
10185
10296
 
10186
10297
  // ../design/dist/esm/index.mjs
10187
- import React7, { useEffect as useEffect18, useMemo as useMemo39, useState as useState20 } from "react";
10298
+ import React8, { useEffect as useEffect18, useMemo as useMemo39, useState as useState20 } from "react";
10188
10299
 
10189
10300
  // ../paths/dist/esm/index.mjs
10190
10301
  var cutLInstruction = ({
@@ -12950,7 +13061,7 @@ var PathInternals = {
12950
13061
  };
12951
13062
 
12952
13063
  // ../shapes/dist/esm/index.mjs
12953
- import React2, { useMemo as useMemo38 } from "react";
13064
+ import React3, { useMemo as useMemo38 } from "react";
12954
13065
  import { version } from "react-dom";
12955
13066
  import { jsx as jsx40, jsxs as jsxs5 } from "react/jsx-runtime";
12956
13067
  import { jsx as jsx210 } from "react/jsx-runtime";
@@ -13019,7 +13130,7 @@ var RenderSvg = ({
13019
13130
  }
13020
13131
  const prevX = prevInstruction.x;
13021
13132
  const prevY = prevInstruction.y;
13022
- return /* @__PURE__ */ jsxs5(React2.Fragment, {
13133
+ return /* @__PURE__ */ jsxs5(React3.Fragment, {
13023
13134
  children: [
13024
13135
  /* @__PURE__ */ jsx40("path", {
13025
13136
  d: `M ${prevX} ${prevY} ${i.cp1x} ${i.cp1y}`,
@@ -14542,20 +14653,20 @@ import React9 from "react";
14542
14653
  import * as React62 from "react";
14543
14654
  import { jsx as jsx122 } from "react/jsx-runtime";
14544
14655
  import * as React72 from "react";
14545
- import * as React8 from "react";
14656
+ import * as React82 from "react";
14546
14657
  import { Fragment as Fragment3, jsx as jsx132 } from "react/jsx-runtime";
14547
14658
  import { jsx as jsx142 } from "react/jsx-runtime";
14548
- import * as React102 from "react";
14659
+ import * as React10 from "react";
14549
14660
  import { jsx as jsx152 } from "react/jsx-runtime";
14550
- import * as React14 from "react";
14551
- import * as React11 from "react";
14661
+ import * as React142 from "react";
14662
+ import * as React112 from "react";
14552
14663
  import * as ReactDOM from "react-dom";
14553
14664
  import { jsx as jsx162 } from "react/jsx-runtime";
14554
- import * as React122 from "react";
14665
+ import * as React12 from "react";
14555
14666
  import * as React132 from "react";
14556
14667
  import { jsx as jsx172 } from "react/jsx-runtime";
14557
14668
  import * as React15 from "react";
14558
- import * as React162 from "react";
14669
+ import * as React16 from "react";
14559
14670
  import { jsx as jsx182 } from "react/jsx-runtime";
14560
14671
  import * as React182 from "react";
14561
14672
  import * as React172 from "react";
@@ -14563,25 +14674,25 @@ import * as React22 from "react";
14563
14674
  import * as React192 from "react";
14564
14675
  import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
14565
14676
  import * as ReactDOM2 from "react-dom";
14566
- import * as React20 from "react";
14677
+ import * as React202 from "react";
14567
14678
  import { jsx as jsx192 } from "react/jsx-runtime";
14568
14679
  import * as React21 from "react";
14569
14680
  import { jsx as jsx202 } from "react/jsx-runtime";
14570
- import * as React232 from "react";
14681
+ import * as React23 from "react";
14571
14682
  import ReactDOM3 from "react-dom";
14572
14683
  import { jsx as jsx213 } from "react/jsx-runtime";
14573
- import * as React24 from "react";
14574
- import * as React252 from "react";
14684
+ import * as React242 from "react";
14685
+ import * as React25 from "react";
14575
14686
  import * as React262 from "react";
14576
14687
  import { jsx as jsx223 } from "react/jsx-runtime";
14577
- import * as React332 from "react";
14688
+ import * as React33 from "react";
14578
14689
  import * as React292 from "react";
14579
14690
  import { useState as useState112 } from "react";
14580
- import * as React27 from "react";
14581
- import * as React282 from "react";
14582
- import * as React32 from "react";
14583
- import * as React312 from "react";
14584
- import * as React30 from "react";
14691
+ import * as React272 from "react";
14692
+ import * as React28 from "react";
14693
+ import * as React322 from "react";
14694
+ import * as React31 from "react";
14695
+ import * as React302 from "react";
14585
14696
  import { Fragment as Fragment62, jsx as jsx232, jsxs as jsxs42 } from "react/jsx-runtime";
14586
14697
  import { forwardRef as forwardRef132, createElement as createElement7 } from "react";
14587
14698
  import { forwardRef as forwardRef122, createElement as createElement6 } from "react";
@@ -14589,12 +14700,12 @@ import * as React352 from "react";
14589
14700
  import { jsx as jsx242, jsxs as jsxs52 } from "react/jsx-runtime";
14590
14701
  import { jsx as jsx252 } from "react/jsx-runtime";
14591
14702
  import * as React48 from "react";
14592
- import * as React36 from "react";
14703
+ import * as React362 from "react";
14593
14704
  import { jsx as jsx262 } from "react/jsx-runtime";
14594
14705
  import * as React46 from "react";
14595
14706
  import React39 from "react";
14596
- import * as React372 from "react";
14597
- import * as React38 from "react";
14707
+ import * as React37 from "react";
14708
+ import * as React382 from "react";
14598
14709
  import { Fragment as Fragment222, jsx as jsx272 } from "react/jsx-runtime";
14599
14710
  import { jsx as jsx282 } from "react/jsx-runtime";
14600
14711
  import React210 from "react";
@@ -14636,7 +14747,7 @@ var getChildNodeFrom = (htmlElement) => {
14636
14747
  return childNode;
14637
14748
  };
14638
14749
  var useHoverTransforms = (ref, disabled) => {
14639
- const [state, setState] = React7.useState({
14750
+ const [state, setState] = React8.useState({
14640
14751
  progress: 0,
14641
14752
  isActive: false
14642
14753
  });
@@ -14648,7 +14759,7 @@ var useHoverTransforms = (ref, disabled) => {
14648
14759
  eventTarget.dispatchEvent(new Event("enabled"));
14649
14760
  }
14650
14761
  }, [disabled, eventTarget]);
14651
- React7.useEffect(() => {
14762
+ React8.useEffect(() => {
14652
14763
  const element = ref.current;
14653
14764
  if (!element)
14654
14765
  return;
@@ -14723,8 +14834,8 @@ var useHoverTransforms = (ref, disabled) => {
14723
14834
  return state;
14724
14835
  };
14725
14836
  var useClickTransforms = (ref) => {
14726
- const [hoverProgress, setHoverProgress] = React7.useState(0);
14727
- React7.useEffect(() => {
14837
+ const [hoverProgress, setHoverProgress] = React8.useState(0);
14838
+ React8.useEffect(() => {
14728
14839
  const element = getChildNodeFrom(ref.current);
14729
14840
  if (!element) {
14730
14841
  return;
@@ -14955,7 +15066,7 @@ var Button = ({
14955
15066
  const [dimensions, setDimensions] = useState22(null);
14956
15067
  const ref = useRef22(null);
14957
15068
  const { isActive, progress } = useHoverTransforms(ref, Boolean(disabled || loading));
14958
- const onPointerEnter = useCallback18((e) => {
15069
+ const onPointerEnter = useCallback19((e) => {
14959
15070
  if (e.pointerType !== "mouse") {
14960
15071
  return;
14961
15072
  }
@@ -15278,43 +15389,43 @@ function composeRefs(...refs) {
15278
15389
  function useComposedRefs(...refs) {
15279
15390
  return React72.useCallback(composeRefs(...refs), refs);
15280
15391
  }
15281
- var Slot = React8.forwardRef((props, forwardedRef) => {
15392
+ var Slot = React82.forwardRef((props, forwardedRef) => {
15282
15393
  const { children, ...slotProps } = props;
15283
- const childrenArray = React8.Children.toArray(children);
15394
+ const childrenArray = React82.Children.toArray(children);
15284
15395
  const slottable = childrenArray.find(isSlottable);
15285
15396
  if (slottable) {
15286
15397
  const newElement = slottable.props.children;
15287
15398
  const newChildren = childrenArray.map((child) => {
15288
15399
  if (child === slottable) {
15289
- if (React8.Children.count(newElement) > 1)
15290
- return React8.Children.only(null);
15291
- return React8.isValidElement(newElement) ? newElement.props.children : null;
15400
+ if (React82.Children.count(newElement) > 1)
15401
+ return React82.Children.only(null);
15402
+ return React82.isValidElement(newElement) ? newElement.props.children : null;
15292
15403
  } else {
15293
15404
  return child;
15294
15405
  }
15295
15406
  });
15296
- return /* @__PURE__ */ jsx132(SlotClone, { ...slotProps, ref: forwardedRef, children: React8.isValidElement(newElement) ? React8.cloneElement(newElement, undefined, newChildren) : null });
15407
+ return /* @__PURE__ */ jsx132(SlotClone, { ...slotProps, ref: forwardedRef, children: React82.isValidElement(newElement) ? React82.cloneElement(newElement, undefined, newChildren) : null });
15297
15408
  }
15298
15409
  return /* @__PURE__ */ jsx132(SlotClone, { ...slotProps, ref: forwardedRef, children });
15299
15410
  });
15300
15411
  Slot.displayName = "Slot";
15301
- var SlotClone = React8.forwardRef((props, forwardedRef) => {
15412
+ var SlotClone = React82.forwardRef((props, forwardedRef) => {
15302
15413
  const { children, ...slotProps } = props;
15303
- if (React8.isValidElement(children)) {
15414
+ if (React82.isValidElement(children)) {
15304
15415
  const childrenRef = getElementRef(children);
15305
- return React8.cloneElement(children, {
15416
+ return React82.cloneElement(children, {
15306
15417
  ...mergeProps(slotProps, children.props),
15307
15418
  ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
15308
15419
  });
15309
15420
  }
15310
- return React8.Children.count(children) > 1 ? React8.Children.only(null) : null;
15421
+ return React82.Children.count(children) > 1 ? React82.Children.only(null) : null;
15311
15422
  });
15312
15423
  SlotClone.displayName = "SlotClone";
15313
15424
  var Slottable = ({ children }) => {
15314
15425
  return /* @__PURE__ */ jsx132(Fragment3, { children });
15315
15426
  };
15316
15427
  function isSlottable(child) {
15317
- return React8.isValidElement(child) && child.type === Slottable;
15428
+ return React82.isValidElement(child) && child.type === Slottable;
15318
15429
  }
15319
15430
  function mergeProps(slotProps, childProps) {
15320
15431
  const overrideProps = { ...childProps };
@@ -15404,9 +15515,9 @@ function createCollection(name) {
15404
15515
  createCollectionScope
15405
15516
  ];
15406
15517
  }
15407
- var DirectionContext = React102.createContext(undefined);
15518
+ var DirectionContext = React10.createContext(undefined);
15408
15519
  function useDirection(localDir) {
15409
- const globalDir = React102.useContext(DirectionContext);
15520
+ const globalDir = React10.useContext(DirectionContext);
15410
15521
  return localDir || globalDir || "ltr";
15411
15522
  }
15412
15523
  var NODES = [
@@ -15428,7 +15539,7 @@ var NODES = [
15428
15539
  "ul"
15429
15540
  ];
15430
15541
  var Primitive = NODES.reduce((primitive, node) => {
15431
- const Node2 = React11.forwardRef((props, forwardedRef) => {
15542
+ const Node2 = React112.forwardRef((props, forwardedRef) => {
15432
15543
  const { asChild, ...primitiveProps } = props;
15433
15544
  const Comp = asChild ? Slot : node;
15434
15545
  if (typeof window !== "undefined") {
@@ -15444,11 +15555,11 @@ function dispatchDiscreteCustomEvent(target, event) {
15444
15555
  ReactDOM.flushSync(() => target.dispatchEvent(event));
15445
15556
  }
15446
15557
  function useCallbackRef(callback) {
15447
- const callbackRef = React122.useRef(callback);
15448
- React122.useEffect(() => {
15558
+ const callbackRef = React12.useRef(callback);
15559
+ React12.useEffect(() => {
15449
15560
  callbackRef.current = callback;
15450
15561
  });
15451
- return React122.useMemo(() => (...args) => callbackRef.current?.(...args), []);
15562
+ return React12.useMemo(() => (...args) => callbackRef.current?.(...args), []);
15452
15563
  }
15453
15564
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
15454
15565
  const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
@@ -15467,12 +15578,12 @@ var CONTEXT_UPDATE = "dismissableLayer.update";
15467
15578
  var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
15468
15579
  var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
15469
15580
  var originalBodyPointerEvents;
15470
- var DismissableLayerContext = React14.createContext({
15581
+ var DismissableLayerContext = React142.createContext({
15471
15582
  layers: /* @__PURE__ */ new Set,
15472
15583
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set,
15473
15584
  branches: /* @__PURE__ */ new Set
15474
15585
  });
15475
- var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
15586
+ var DismissableLayer = React142.forwardRef((props, forwardedRef) => {
15476
15587
  const {
15477
15588
  disableOutsidePointerEvents = false,
15478
15589
  onEscapeKeyDown,
@@ -15482,10 +15593,10 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
15482
15593
  onDismiss,
15483
15594
  ...layerProps
15484
15595
  } = props;
15485
- const context = React14.useContext(DismissableLayerContext);
15486
- const [node, setNode] = React14.useState(null);
15596
+ const context = React142.useContext(DismissableLayerContext);
15597
+ const [node, setNode] = React142.useState(null);
15487
15598
  const ownerDocument = node?.ownerDocument ?? globalThis?.document;
15488
- const [, force] = React14.useState({});
15599
+ const [, force] = React142.useState({});
15489
15600
  const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
15490
15601
  const layers = Array.from(context.layers);
15491
15602
  const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
@@ -15523,7 +15634,7 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
15523
15634
  onDismiss();
15524
15635
  }
15525
15636
  }, ownerDocument);
15526
- React14.useEffect(() => {
15637
+ React142.useEffect(() => {
15527
15638
  if (!node)
15528
15639
  return;
15529
15640
  if (disableOutsidePointerEvents) {
@@ -15541,7 +15652,7 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
15541
15652
  }
15542
15653
  };
15543
15654
  }, [node, ownerDocument, disableOutsidePointerEvents, context]);
15544
- React14.useEffect(() => {
15655
+ React142.useEffect(() => {
15545
15656
  return () => {
15546
15657
  if (!node)
15547
15658
  return;
@@ -15550,7 +15661,7 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
15550
15661
  dispatchUpdate();
15551
15662
  };
15552
15663
  }, [node, context]);
15553
- React14.useEffect(() => {
15664
+ React142.useEffect(() => {
15554
15665
  const handleUpdate = () => force({});
15555
15666
  document.addEventListener(CONTEXT_UPDATE, handleUpdate);
15556
15667
  return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
@@ -15569,11 +15680,11 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
15569
15680
  });
15570
15681
  DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
15571
15682
  var BRANCH_NAME = "DismissableLayerBranch";
15572
- var DismissableLayerBranch = React14.forwardRef((props, forwardedRef) => {
15573
- const context = React14.useContext(DismissableLayerContext);
15574
- const ref = React14.useRef(null);
15683
+ var DismissableLayerBranch = React142.forwardRef((props, forwardedRef) => {
15684
+ const context = React142.useContext(DismissableLayerContext);
15685
+ const ref = React142.useRef(null);
15575
15686
  const composedRefs = useComposedRefs(forwardedRef, ref);
15576
- React14.useEffect(() => {
15687
+ React142.useEffect(() => {
15577
15688
  const node = ref.current;
15578
15689
  if (node) {
15579
15690
  context.branches.add(node);
@@ -15587,9 +15698,9 @@ var DismissableLayerBranch = React14.forwardRef((props, forwardedRef) => {
15587
15698
  DismissableLayerBranch.displayName = BRANCH_NAME;
15588
15699
  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
15589
15700
  const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
15590
- const isPointerInsideReactTreeRef = React14.useRef(false);
15591
- const handleClickRef = React14.useRef(() => {});
15592
- React14.useEffect(() => {
15701
+ const isPointerInsideReactTreeRef = React142.useRef(false);
15702
+ const handleClickRef = React142.useRef(() => {});
15703
+ React142.useEffect(() => {
15593
15704
  const handlePointerDown = (event) => {
15594
15705
  if (event.target && !isPointerInsideReactTreeRef.current) {
15595
15706
  let handleAndDispatchPointerDownOutsideEvent2 = function() {
@@ -15624,8 +15735,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
15624
15735
  }
15625
15736
  function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
15626
15737
  const handleFocusOutside = useCallbackRef(onFocusOutside);
15627
- const isFocusInsideReactTreeRef = React14.useRef(false);
15628
- React14.useEffect(() => {
15738
+ const isFocusInsideReactTreeRef = React142.useRef(false);
15739
+ React142.useEffect(() => {
15629
15740
  const handleFocus = (event) => {
15630
15741
  if (event.target && !isFocusInsideReactTreeRef.current) {
15631
15742
  const eventDetail = { originalEvent: event };
@@ -15683,7 +15794,7 @@ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
15683
15794
  var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
15684
15795
  var EVENT_OPTIONS = { bubbles: false, cancelable: true };
15685
15796
  var FOCUS_SCOPE_NAME = "FocusScope";
15686
- var FocusScope = React162.forwardRef((props, forwardedRef) => {
15797
+ var FocusScope = React16.forwardRef((props, forwardedRef) => {
15687
15798
  const {
15688
15799
  loop = false,
15689
15800
  trapped = false,
@@ -15691,12 +15802,12 @@ var FocusScope = React162.forwardRef((props, forwardedRef) => {
15691
15802
  onUnmountAutoFocus: onUnmountAutoFocusProp,
15692
15803
  ...scopeProps
15693
15804
  } = props;
15694
- const [container22, setContainer] = React162.useState(null);
15805
+ const [container22, setContainer] = React16.useState(null);
15695
15806
  const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
15696
15807
  const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
15697
- const lastFocusedElementRef = React162.useRef(null);
15808
+ const lastFocusedElementRef = React16.useRef(null);
15698
15809
  const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
15699
- const focusScope = React162.useRef({
15810
+ const focusScope = React16.useRef({
15700
15811
  paused: false,
15701
15812
  pause() {
15702
15813
  this.paused = true;
@@ -15705,7 +15816,7 @@ var FocusScope = React162.forwardRef((props, forwardedRef) => {
15705
15816
  this.paused = false;
15706
15817
  }
15707
15818
  }).current;
15708
- React162.useEffect(() => {
15819
+ React16.useEffect(() => {
15709
15820
  if (trapped) {
15710
15821
  let handleFocusIn2 = function(event) {
15711
15822
  if (focusScope.paused || !container22)
@@ -15747,7 +15858,7 @@ var FocusScope = React162.forwardRef((props, forwardedRef) => {
15747
15858
  };
15748
15859
  }
15749
15860
  }, [trapped, container22, focusScope.paused]);
15750
- React162.useEffect(() => {
15861
+ React16.useEffect(() => {
15751
15862
  if (container22) {
15752
15863
  focusScopesStack.add(focusScope);
15753
15864
  const previouslyFocusedElement = document.activeElement;
@@ -15778,7 +15889,7 @@ var FocusScope = React162.forwardRef((props, forwardedRef) => {
15778
15889
  };
15779
15890
  }
15780
15891
  }, [container22, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
15781
- const handleKeyDown = React162.useCallback((event) => {
15892
+ const handleKeyDown = React16.useCallback((event) => {
15782
15893
  if (!loop && !trapped)
15783
15894
  return;
15784
15895
  if (focusScope.paused)
@@ -17693,7 +17804,7 @@ var arrow3 = (options, deps) => ({
17693
17804
  options: [options, deps]
17694
17805
  });
17695
17806
  var NAME = "Arrow";
17696
- var Arrow = React20.forwardRef((props, forwardedRef) => {
17807
+ var Arrow = React202.forwardRef((props, forwardedRef) => {
17697
17808
  const { children, width = 10, height = 5, ...arrowProps } = props;
17698
17809
  return /* @__PURE__ */ jsx192(Primitive.svg, {
17699
17810
  ...arrowProps,
@@ -17974,9 +18085,9 @@ var Anchor = PopperAnchor;
17974
18085
  var Content = PopperContent;
17975
18086
  var Arrow2 = PopperArrow;
17976
18087
  var PORTAL_NAME = "Portal";
17977
- var Portal = React232.forwardRef((props, forwardedRef) => {
18088
+ var Portal = React23.forwardRef((props, forwardedRef) => {
17978
18089
  const { container: containerProp, ...portalProps } = props;
17979
- const [mounted, setMounted] = React232.useState(false);
18090
+ const [mounted, setMounted] = React23.useState(false);
17980
18091
  useLayoutEffect22(() => setMounted(true), []);
17981
18092
  const container22 = containerProp || mounted && globalThis?.document?.body;
17982
18093
  return container22 ? ReactDOM3.createPortal(/* @__PURE__ */ jsx213(Primitive.div, { ...portalProps, ref: forwardedRef }), container22) : null;
@@ -17991,7 +18102,7 @@ function useControllableState({
17991
18102
  const isControlled = prop !== undefined;
17992
18103
  const value = isControlled ? prop : uncontrolledProp;
17993
18104
  const handleChange = useCallbackRef(onChange);
17994
- const setValue = React24.useCallback((nextValue) => {
18105
+ const setValue = React242.useCallback((nextValue) => {
17995
18106
  if (isControlled) {
17996
18107
  const setter = nextValue;
17997
18108
  const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
@@ -18007,11 +18118,11 @@ function useUncontrolledState({
18007
18118
  defaultProp,
18008
18119
  onChange
18009
18120
  }) {
18010
- const uncontrolledState = React24.useState(defaultProp);
18121
+ const uncontrolledState = React242.useState(defaultProp);
18011
18122
  const [value] = uncontrolledState;
18012
- const prevValueRef = React24.useRef(value);
18123
+ const prevValueRef = React242.useRef(value);
18013
18124
  const handleChange = useCallbackRef(onChange);
18014
- React24.useEffect(() => {
18125
+ React242.useEffect(() => {
18015
18126
  if (prevValueRef.current !== value) {
18016
18127
  handleChange(value);
18017
18128
  prevValueRef.current = value;
@@ -18020,8 +18131,8 @@ function useUncontrolledState({
18020
18131
  return uncontrolledState;
18021
18132
  }
18022
18133
  function usePrevious(value) {
18023
- const ref = React252.useRef({ value, previous: value });
18024
- return React252.useMemo(() => {
18134
+ const ref = React25.useRef({ value, previous: value });
18135
+ return React25.useMemo(() => {
18025
18136
  if (ref.current.value !== value) {
18026
18137
  ref.current.previous = ref.current.value;
18027
18138
  ref.current.value = value;
@@ -18238,7 +18349,7 @@ function useCallbackRef2(initialValue, callback) {
18238
18349
  ref.callback = callback;
18239
18350
  return ref.facade;
18240
18351
  }
18241
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React27.useLayoutEffect : React27.useEffect;
18352
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React272.useLayoutEffect : React272.useEffect;
18242
18353
  var currentValues = new WeakMap;
18243
18354
  function useMergeRefs(refs, defaultValue) {
18244
18355
  var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
@@ -18360,7 +18471,7 @@ var SideCar = function(_a) {
18360
18471
  if (!Target) {
18361
18472
  throw new Error("Sidecar medium not found");
18362
18473
  }
18363
- return React282.createElement(Target, __assign({}, rest));
18474
+ return React28.createElement(Target, __assign({}, rest));
18364
18475
  };
18365
18476
  SideCar.isSideCarExport = true;
18366
18477
  function exportSidecar(medium, exported) {
@@ -18450,7 +18561,7 @@ var stylesheetSingleton = function() {
18450
18561
  var styleHookSingleton = function() {
18451
18562
  var sheet = stylesheetSingleton();
18452
18563
  return function(styles, isDynamic) {
18453
- React30.useEffect(function() {
18564
+ React302.useEffect(function() {
18454
18565
  sheet.add(styles);
18455
18566
  return function() {
18456
18567
  sheet.remove();
@@ -18555,7 +18666,7 @@ var getCurrentUseCounter = function() {
18555
18666
  return isFinite(counter) ? counter : 0;
18556
18667
  };
18557
18668
  var useLockAttribute = function() {
18558
- React312.useEffect(function() {
18669
+ React31.useEffect(function() {
18559
18670
  document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
18560
18671
  return function() {
18561
18672
  var newCounter = getCurrentUseCounter() - 1;
@@ -18570,10 +18681,10 @@ var useLockAttribute = function() {
18570
18681
  var RemoveScrollBar = function(_a) {
18571
18682
  var { noRelative, noImportant, gapMode: _b } = _a, gapMode = _b === undefined ? "margin" : _b;
18572
18683
  useLockAttribute();
18573
- var gap = React312.useMemo(function() {
18684
+ var gap = React31.useMemo(function() {
18574
18685
  return getGapWidth(gapMode);
18575
18686
  }, [gapMode]);
18576
- return React312.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
18687
+ return React31.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
18577
18688
  };
18578
18689
  var passiveSupported = false;
18579
18690
  if (typeof window !== "undefined") {
@@ -18700,16 +18811,16 @@ var generateStyle = function(id) {
18700
18811
  var idCounter = 0;
18701
18812
  var lockStack = [];
18702
18813
  function RemoveScrollSideCar(props) {
18703
- var shouldPreventQueue = React32.useRef([]);
18704
- var touchStartRef = React32.useRef([0, 0]);
18705
- var activeAxis = React32.useRef();
18706
- var id = React32.useState(idCounter++)[0];
18707
- var Style2 = React32.useState(styleSingleton)[0];
18708
- var lastProps = React32.useRef(props);
18709
- React32.useEffect(function() {
18814
+ var shouldPreventQueue = React322.useRef([]);
18815
+ var touchStartRef = React322.useRef([0, 0]);
18816
+ var activeAxis = React322.useRef();
18817
+ var id = React322.useState(idCounter++)[0];
18818
+ var Style2 = React322.useState(styleSingleton)[0];
18819
+ var lastProps = React322.useRef(props);
18820
+ React322.useEffect(function() {
18710
18821
  lastProps.current = props;
18711
18822
  }, [props]);
18712
- React32.useEffect(function() {
18823
+ React322.useEffect(function() {
18713
18824
  if (props.inert) {
18714
18825
  document.body.classList.add("block-interactivity-".concat(id));
18715
18826
  var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
@@ -18725,7 +18836,7 @@ function RemoveScrollSideCar(props) {
18725
18836
  }
18726
18837
  return;
18727
18838
  }, [props.inert, props.lockRef.current, props.shards]);
18728
- var shouldCancelEvent = React32.useCallback(function(event, parent) {
18839
+ var shouldCancelEvent = React322.useCallback(function(event, parent) {
18729
18840
  if ("touches" in event && event.touches.length === 2) {
18730
18841
  return !lastProps.current.allowPinchZoom;
18731
18842
  }
@@ -18761,7 +18872,7 @@ function RemoveScrollSideCar(props) {
18761
18872
  var cancelingAxis = activeAxis.current || currentAxis;
18762
18873
  return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
18763
18874
  }, []);
18764
- var shouldPrevent = React32.useCallback(function(_event) {
18875
+ var shouldPrevent = React322.useCallback(function(_event) {
18765
18876
  var event = _event;
18766
18877
  if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
18767
18878
  return;
@@ -18788,7 +18899,7 @@ function RemoveScrollSideCar(props) {
18788
18899
  }
18789
18900
  }
18790
18901
  }, []);
18791
- var shouldCancel = React32.useCallback(function(name, delta, target, should) {
18902
+ var shouldCancel = React322.useCallback(function(name, delta, target, should) {
18792
18903
  var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
18793
18904
  shouldPreventQueue.current.push(event);
18794
18905
  setTimeout(function() {
@@ -18797,17 +18908,17 @@ function RemoveScrollSideCar(props) {
18797
18908
  });
18798
18909
  }, 1);
18799
18910
  }, []);
18800
- var scrollTouchStart = React32.useCallback(function(event) {
18911
+ var scrollTouchStart = React322.useCallback(function(event) {
18801
18912
  touchStartRef.current = getTouchXY(event);
18802
18913
  activeAxis.current = undefined;
18803
18914
  }, []);
18804
- var scrollWheel = React32.useCallback(function(event) {
18915
+ var scrollWheel = React322.useCallback(function(event) {
18805
18916
  shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
18806
18917
  }, []);
18807
- var scrollTouchMove = React32.useCallback(function(event) {
18918
+ var scrollTouchMove = React322.useCallback(function(event) {
18808
18919
  shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
18809
18920
  }, []);
18810
- React32.useEffect(function() {
18921
+ React322.useEffect(function() {
18811
18922
  lockStack.push(Style2);
18812
18923
  props.setCallbacks({
18813
18924
  onScrollCapture: scrollWheel,
@@ -18827,7 +18938,7 @@ function RemoveScrollSideCar(props) {
18827
18938
  };
18828
18939
  }, []);
18829
18940
  var { removeScrollBar, inert } = props;
18830
- return React32.createElement(React32.Fragment, null, inert ? React32.createElement(Style2, { styles: generateStyle(id) }) : null, removeScrollBar ? React32.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null);
18941
+ return React322.createElement(React322.Fragment, null, inert ? React322.createElement(Style2, { styles: generateStyle(id) }) : null, removeScrollBar ? React322.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null);
18831
18942
  }
18832
18943
  function getOutermostShadowParent(node) {
18833
18944
  var shadowParent = null;
@@ -18841,8 +18952,8 @@ function getOutermostShadowParent(node) {
18841
18952
  return shadowParent;
18842
18953
  }
18843
18954
  var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
18844
- var ReactRemoveScroll = React332.forwardRef(function(props, ref) {
18845
- return React332.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
18955
+ var ReactRemoveScroll = React33.forwardRef(function(props, ref) {
18956
+ return React33.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
18846
18957
  });
18847
18958
  ReactRemoveScroll.classNames = RemoveScroll.classNames;
18848
18959
  var Combination_default = ReactRemoveScroll;
@@ -19952,19 +20063,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
19952
20063
  function createContextScope2(scopeName, createContextScopeDeps = []) {
19953
20064
  let defaultContexts = [];
19954
20065
  function createContext32(rootComponentName, defaultContext) {
19955
- const BaseContext = React36.createContext(defaultContext);
20066
+ const BaseContext = React362.createContext(defaultContext);
19956
20067
  const index2 = defaultContexts.length;
19957
20068
  defaultContexts = [...defaultContexts, defaultContext];
19958
20069
  const Provider = (props) => {
19959
20070
  const { scope, children, ...context } = props;
19960
20071
  const Context = scope?.[scopeName]?.[index2] || BaseContext;
19961
- const value = React36.useMemo(() => context, Object.values(context));
20072
+ const value = React362.useMemo(() => context, Object.values(context));
19962
20073
  return /* @__PURE__ */ jsx262(Context.Provider, { value, children });
19963
20074
  };
19964
20075
  Provider.displayName = rootComponentName + "Provider";
19965
20076
  function useContext222(consumerName, scope) {
19966
20077
  const Context = scope?.[scopeName]?.[index2] || BaseContext;
19967
- const context = React36.useContext(Context);
20078
+ const context = React362.useContext(Context);
19968
20079
  if (context)
19969
20080
  return context;
19970
20081
  if (defaultContext !== undefined)
@@ -19975,11 +20086,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
19975
20086
  }
19976
20087
  const createScope = () => {
19977
20088
  const scopeContexts = defaultContexts.map((defaultContext) => {
19978
- return React36.createContext(defaultContext);
20089
+ return React362.createContext(defaultContext);
19979
20090
  });
19980
20091
  return function useScope(scope) {
19981
20092
  const contexts = scope?.[scopeName] || scopeContexts;
19982
- return React36.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
20093
+ return React362.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
19983
20094
  };
19984
20095
  };
19985
20096
  createScope.scopeName = scopeName;
@@ -20000,7 +20111,7 @@ function composeContextScopes2(...scopes) {
20000
20111
  const currentScope = scopeProps[`__scope${scopeName}`];
20001
20112
  return { ...nextScopes2, ...currentScope };
20002
20113
  }, {});
20003
- return React36.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
20114
+ return React362.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
20004
20115
  };
20005
20116
  };
20006
20117
  createScope.scopeName = baseScope.scopeName;
@@ -20038,26 +20149,26 @@ function composeRefs2(...refs) {
20038
20149
  };
20039
20150
  }
20040
20151
  function useComposedRefs2(...refs) {
20041
- return React372.useCallback(composeRefs2(...refs), refs);
20152
+ return React37.useCallback(composeRefs2(...refs), refs);
20042
20153
  }
20043
20154
  function createSlot(ownerName) {
20044
20155
  const SlotClone2 = /* @__PURE__ */ createSlotClone(ownerName);
20045
- const Slot2 = React38.forwardRef((props, forwardedRef) => {
20156
+ const Slot2 = React382.forwardRef((props, forwardedRef) => {
20046
20157
  const { children, ...slotProps } = props;
20047
- const childrenArray = React38.Children.toArray(children);
20158
+ const childrenArray = React382.Children.toArray(children);
20048
20159
  const slottable = childrenArray.find(isSlottable2);
20049
20160
  if (slottable) {
20050
20161
  const newElement = slottable.props.children;
20051
20162
  const newChildren = childrenArray.map((child) => {
20052
20163
  if (child === slottable) {
20053
- if (React38.Children.count(newElement) > 1)
20054
- return React38.Children.only(null);
20055
- return React38.isValidElement(newElement) ? newElement.props.children : null;
20164
+ if (React382.Children.count(newElement) > 1)
20165
+ return React382.Children.only(null);
20166
+ return React382.isValidElement(newElement) ? newElement.props.children : null;
20056
20167
  } else {
20057
20168
  return child;
20058
20169
  }
20059
20170
  });
20060
- return /* @__PURE__ */ jsx272(SlotClone2, { ...slotProps, ref: forwardedRef, children: React38.isValidElement(newElement) ? React38.cloneElement(newElement, undefined, newChildren) : null });
20171
+ return /* @__PURE__ */ jsx272(SlotClone2, { ...slotProps, ref: forwardedRef, children: React382.isValidElement(newElement) ? React382.cloneElement(newElement, undefined, newChildren) : null });
20061
20172
  }
20062
20173
  return /* @__PURE__ */ jsx272(SlotClone2, { ...slotProps, ref: forwardedRef, children });
20063
20174
  });
@@ -20065,24 +20176,24 @@ function createSlot(ownerName) {
20065
20176
  return Slot2;
20066
20177
  }
20067
20178
  function createSlotClone(ownerName) {
20068
- const SlotClone2 = React38.forwardRef((props, forwardedRef) => {
20179
+ const SlotClone2 = React382.forwardRef((props, forwardedRef) => {
20069
20180
  const { children, ...slotProps } = props;
20070
- if (React38.isValidElement(children)) {
20181
+ if (React382.isValidElement(children)) {
20071
20182
  const childrenRef = getElementRef2(children);
20072
20183
  const props2 = mergeProps2(slotProps, children.props);
20073
- if (children.type !== React38.Fragment) {
20184
+ if (children.type !== React382.Fragment) {
20074
20185
  props2.ref = forwardedRef ? composeRefs2(forwardedRef, childrenRef) : childrenRef;
20075
20186
  }
20076
- return React38.cloneElement(children, props2);
20187
+ return React382.cloneElement(children, props2);
20077
20188
  }
20078
- return React38.Children.count(children) > 1 ? React38.Children.only(null) : null;
20189
+ return React382.Children.count(children) > 1 ? React382.Children.only(null) : null;
20079
20190
  });
20080
20191
  SlotClone2.displayName = `${ownerName}.SlotClone`;
20081
20192
  return SlotClone2;
20082
20193
  }
20083
20194
  var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
20084
20195
  function isSlottable2(child) {
20085
- return React38.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
20196
+ return React382.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
20086
20197
  }
20087
20198
  function mergeProps2(slotProps, childProps) {
20088
20199
  const overrideProps = { ...childProps };
@@ -21093,7 +21204,7 @@ var Triangle2 = (props) => {
21093
21204
  };
21094
21205
 
21095
21206
  // src/components/homepage/FreePricing.tsx
21096
- import React53, { useCallback as useCallback30, useMemo as useMemo48 } from "react";
21207
+ import React53, { useCallback as useCallback31, useMemo as useMemo48 } from "react";
21097
21208
 
21098
21209
  // ../../node_modules/.bun/tailwind-merge@2.5.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs
21099
21210
  var CLASS_PART_SEPARATOR2 = "-";
@@ -22765,7 +22876,7 @@ var CompanyPricing = () => {
22765
22876
  const [automatorsSelected, setAutomatorsSelected] = React53.useState(true);
22766
22877
  const [devSeatCount, setDevSeatCount] = React53.useState(3);
22767
22878
  const [cloudRenders, setCloudRenders] = React53.useState(1e4);
22768
- const formatPrice = useCallback30((price) => {
22879
+ const formatPrice = useCallback31((price) => {
22769
22880
  const formatter = new Intl.NumberFormat("en-US", {
22770
22881
  style: "currency",
22771
22882
  currency: "USD",
@@ -23496,13 +23607,13 @@ import React55 from "react";
23496
23607
  import { useContext as useContext210, useEffect as useEffect40, useState as useState40 } from "react";
23497
23608
  import { useContext as useContext43, useLayoutEffect as useLayoutEffect16 } from "react";
23498
23609
  import { jsx as jsx312 } from "react/jsx-runtime";
23499
- import { useCallback as useCallback31, useRef as useRef38 } from "react";
23610
+ import { useCallback as useCallback32, useRef as useRef38 } from "react";
23500
23611
  import { useEffect as useEffect24, useState as useState24 } from "react";
23501
23612
  import { useContext as useContext44, useEffect as useEffect52, useRef as useRef52 } from "react";
23502
23613
  import { useEffect as useEffect310, useRef as useRef39 } from "react";
23503
23614
  import { useCallback as useCallback210, useContext as useContext38, useMemo as useMemo49, useRef as useRef210, useState as useState310 } from "react";
23504
23615
  import { useEffect as useEffect42, useRef as useRef42 } from "react";
23505
- import { useCallback as useCallback32, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
23616
+ import { useCallback as useCallback33, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
23506
23617
  import {
23507
23618
  forwardRef as forwardRef210,
23508
23619
  useEffect as useEffect132,
@@ -23512,7 +23623,7 @@ import {
23512
23623
  useRef as useRef122,
23513
23624
  useState as useState132
23514
23625
  } from "react";
23515
- import React103, {
23626
+ import React102, {
23516
23627
  Suspense as Suspense2,
23517
23628
  forwardRef as forwardRef31,
23518
23629
  useCallback as useCallback112,
@@ -25390,7 +25501,7 @@ var useElementSize = (ref, options2) => {
25390
25501
  });
25391
25502
  });
25392
25503
  }, [options2.shouldApplyCssTransforms]);
25393
- const updateSize = useCallback32(() => {
25504
+ const updateSize = useCallback33(() => {
25394
25505
  if (!ref.current) {
25395
25506
  return;
25396
25507
  }
@@ -26567,7 +26678,7 @@ var useClickPreventionOnDoubleClick = (onClick, onDoubleClick, doubleClickToFull
26567
26678
  }, [doubleClickToFullscreen, handleDoubleClick, handlePointerDown, onClick]);
26568
26679
  return returnValue;
26569
26680
  };
26570
- var reactVersion = React103.version.split(".")[0];
26681
+ var reactVersion = React102.version.split(".")[0];
26571
26682
  if (reactVersion === "0") {
26572
26683
  throw new Error(`Version ${reactVersion} of "react" is not supported by Remotion`);
26573
26684
  }
@@ -27049,13 +27160,13 @@ var PlayerUI = ({
27049
27160
  });
27050
27161
  };
27051
27162
  var PlayerUI_default = forwardRef31(PlayerUI);
27052
- var DEFAULT_VOLUME_PERSISTANCE_KEY = "remotion.volumePreference";
27163
+ var DEFAULT_VOLUME_PERSISTENCE_KEY = "remotion.volumePreference";
27053
27164
  var persistVolume = (volume, logLevel, volumePersistenceKey) => {
27054
27165
  if (typeof window === "undefined") {
27055
27166
  return;
27056
27167
  }
27057
27168
  try {
27058
- window.localStorage.setItem(volumePersistenceKey ?? DEFAULT_VOLUME_PERSISTANCE_KEY, String(volume));
27169
+ window.localStorage.setItem(volumePersistenceKey ?? DEFAULT_VOLUME_PERSISTENCE_KEY, String(volume));
27059
27170
  } catch (e) {
27060
27171
  Internals.Log.error({ logLevel, tag: null }, "Could not persist volume", e);
27061
27172
  }
@@ -27065,7 +27176,7 @@ var getPreferredVolume = (volumePersistenceKey) => {
27065
27176
  return 1;
27066
27177
  }
27067
27178
  try {
27068
- const val = window.localStorage.getItem(volumePersistenceKey ?? DEFAULT_VOLUME_PERSISTANCE_KEY);
27179
+ const val = window.localStorage.getItem(volumePersistenceKey ?? DEFAULT_VOLUME_PERSISTENCE_KEY);
27069
27180
  return val ? Number(val) : 1;
27070
27181
  } catch {
27071
27182
  return 1;
@@ -27761,7 +27872,7 @@ var Thumbnail = forward2(ThumbnailFn);
27761
27872
 
27762
27873
  // src/components/homepage/Demo/index.tsx
27763
27874
  import {
27764
- useCallback as useCallback46,
27875
+ useCallback as useCallback47,
27765
27876
  useEffect as useEffect56,
27766
27877
  useMemo as useMemo61,
27767
27878
  useRef as useRef50,
@@ -33778,19 +33889,19 @@ var Video = Internals.wrapInSchema(VideoInner, videoSchema);
33778
33889
  Internals.addSequenceStackTraces(Video);
33779
33890
 
33780
33891
  // src/components/homepage/Demo/Comp.tsx
33781
- import { useCallback as useCallback38, useEffect as useEffect48, useMemo as useMemo57, useState as useState48 } from "react";
33892
+ import { useCallback as useCallback39, useEffect as useEffect48, useMemo as useMemo57, useState as useState48 } from "react";
33782
33893
 
33783
33894
  // src/components/homepage/Demo/Cards.tsx
33784
33895
  import {
33785
33896
  createRef as createRef4,
33786
- useCallback as useCallback37,
33897
+ useCallback as useCallback38,
33787
33898
  useEffect as useEffect47,
33788
33899
  useRef as useRef47,
33789
33900
  useState as useState47
33790
33901
  } from "react";
33791
33902
 
33792
33903
  // src/components/homepage/Demo/Card.tsx
33793
- import { useCallback as useCallback35, useRef as useRef43 } from "react";
33904
+ import { useCallback as useCallback36, useRef as useRef43 } from "react";
33794
33905
 
33795
33906
  // src/components/homepage/Demo/math.ts
33796
33907
  var paddingAndMargin = 20;
@@ -33824,10 +33935,10 @@ var getIndexFromPosition = (clientX, clientY) => {
33824
33935
  };
33825
33936
 
33826
33937
  // src/components/homepage/Demo/Switcher.tsx
33827
- import { useCallback as useCallback33 } from "react";
33938
+ import { useCallback as useCallback34 } from "react";
33828
33939
  import { jsx as jsx60, jsxs as jsxs15 } from "react/jsx-runtime";
33829
33940
  var Switcher = ({ type, theme, onTap }) => {
33830
- const onPointerDown = useCallback33((e) => {
33941
+ const onPointerDown = useCallback34((e) => {
33831
33942
  e.stopPropagation();
33832
33943
  onTap();
33833
33944
  }, [onTap]);
@@ -33890,7 +34001,7 @@ var Card2 = ({
33890
34001
  const refToUse = refsToUse[index2];
33891
34002
  const stopPrevious = useRef43([]);
33892
34003
  let newIndices = [...indices];
33893
- const applyPositions = useCallback35((except) => {
34004
+ const applyPositions = useCallback36((except) => {
33894
34005
  let stopped = false;
33895
34006
  stopPrevious.current.forEach((s) => {
33896
34007
  s();
@@ -33963,7 +34074,7 @@ var Card2 = ({
33963
34074
  update();
33964
34075
  });
33965
34076
  }, [newIndices, onUpdate, positions, refsToUse, shouldBePositions]);
33966
- const onPointerDown = useCallback35((e) => {
34077
+ const onPointerDown = useCallback36((e) => {
33967
34078
  e.currentTarget.setPointerCapture(e.pointerId);
33968
34079
  const cardLeft = refToUse.current.offsetLeft;
33969
34080
  const cardTop = refToUse.current.offsetTop;
@@ -34024,7 +34135,7 @@ var Card2 = ({
34024
34135
  }, { once: true });
34025
34136
  refToUse.current.addEventListener("pointermove", onMove);
34026
34137
  }, [applyPositions, index2, positions, refToUse, shouldBePositions]);
34027
- const onPointerUp = useCallback35((e) => {
34138
+ const onPointerUp = useCallback36((e) => {
34028
34139
  e.currentTarget.releasePointerCapture(e.pointerId);
34029
34140
  }, []);
34030
34141
  const { x, y } = getPositionForIndex(index2);
@@ -34151,7 +34262,7 @@ var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
34151
34262
  // src/components/homepage/Demo/EmojiCard.tsx
34152
34263
  import {
34153
34264
  forwardRef as forwardRef33,
34154
- useCallback as useCallback36,
34265
+ useCallback as useCallback37,
34155
34266
  useEffect as useEffect46,
34156
34267
  useImperativeHandle as useImperativeHandle12,
34157
34268
  useRef as useRef46
@@ -34435,7 +34546,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
34435
34546
  const ref2 = useRef46(null);
34436
34547
  const ref3 = useRef46(null);
34437
34548
  const transforms = useRef46([-100, 0, 100]);
34438
- const onLeft = useCallback36(() => {
34549
+ const onLeft = useCallback37(() => {
34439
34550
  if (!ref1.current || !ref2.current || !ref3.current) {
34440
34551
  return;
34441
34552
  }
@@ -34446,7 +34557,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
34446
34557
  transforms: transforms.current
34447
34558
  });
34448
34559
  }, []);
34449
- const onRight = useCallback36(() => {
34560
+ const onRight = useCallback37(() => {
34450
34561
  if (!ref1.current || !ref2.current || !ref3.current) {
34451
34562
  return;
34452
34563
  }
@@ -34906,11 +35017,11 @@ var Cards = ({
34906
35017
  };
34907
35018
  }, [onToggle]);
34908
35019
  const ref = useRef47(null);
34909
- const onLeft = useCallback37(() => {
35020
+ const onLeft = useCallback38(() => {
34910
35021
  ref.current?.onRight();
34911
35022
  onRightPress();
34912
35023
  }, [onRightPress]);
34913
- const onRight = useCallback37(() => {
35024
+ const onRight = useCallback38(() => {
34914
35025
  ref.current?.onLeft();
34915
35026
  onLeftPress();
34916
35027
  }, [onLeftPress]);
@@ -34980,7 +35091,7 @@ var HomepageVideoComp = ({
34980
35091
  onClickRight
34981
35092
  }) => {
34982
35093
  const [rerenders, setRerenders] = useState48(0);
34983
- const onUpdate = useCallback38((newIndices) => {
35094
+ const onUpdate = useCallback39((newIndices) => {
34984
35095
  setRerenders(rerenders + 1);
34985
35096
  updateCardOrder(newIndices);
34986
35097
  }, [rerenders, updateCardOrder]);
@@ -35078,7 +35189,7 @@ import {
35078
35189
  import { BufferTarget, StreamTarget } from "mediabunny";
35079
35190
 
35080
35191
  // ../core/dist/esm/version.mjs
35081
- var VERSION2 = "4.0.443";
35192
+ var VERSION2 = "4.0.445";
35082
35193
 
35083
35194
  // ../web-renderer/dist/esm/index.mjs
35084
35195
  import { AudioSample, VideoSample } from "mediabunny";
@@ -38855,6 +38966,14 @@ var internalRenderMediaOnWeb = async ({
38855
38966
  if (videoEnabled && codec && !format.getSupportedCodecs().includes(codecToMediabunnyCodec(codec))) {
38856
38967
  return Promise.reject(new Error(`Codec ${codec} is not supported for container ${container4}`));
38857
38968
  }
38969
+ if (transparent) {
38970
+ if (container4 !== "webm" && container4 !== "mkv") {
38971
+ return Promise.reject(new Error(`Transparent videos are only supported with the "webm" and "mkv" containers, but you specified "${container4}". Change the \`container\` option to "webm" or "mkv".`));
38972
+ }
38973
+ if (codec && codec !== "vp8" && codec !== "vp9") {
38974
+ return Promise.reject(new Error(`Transparent videos are only supported with the "vp8" and "vp9" codecs, but you specified "${codec}". Change the \`videoCodec\` option to "vp8" or "vp9", or remove it to use the default.`));
38975
+ }
38976
+ }
38858
38977
  const resolvedAudioBitrate = typeof audioBitrate === "number" ? audioBitrate : getQualityForWebRendererQuality(audioBitrate);
38859
38978
  let finalAudioCodec = null;
38860
38979
  if (!muted) {
@@ -39188,7 +39307,7 @@ var renderMediaOnWeb = (options2) => {
39188
39307
  };
39189
39308
 
39190
39309
  // src/components/homepage/Demo/DemoRender.tsx
39191
- import React69, { useCallback as useCallback39 } from "react";
39310
+ import React69, { useCallback as useCallback40 } from "react";
39192
39311
  import { z } from "zod";
39193
39312
 
39194
39313
  // src/components/homepage/Demo/DemoErrorIcon.tsx
@@ -39389,7 +39508,7 @@ var RenderButton = ({ renderData, onError, playerRef }) => {
39389
39508
  const [state, setState] = React69.useState({
39390
39509
  type: "idle"
39391
39510
  });
39392
- const triggerRender = useCallback39(async () => {
39511
+ const triggerRender = useCallback40(async () => {
39393
39512
  if (renderData === null) {
39394
39513
  return;
39395
39514
  }
@@ -39564,10 +39683,10 @@ var DragAndDropNudge = () => {
39564
39683
  };
39565
39684
 
39566
39685
  // src/components/homepage/Demo/PlayerSeekBar.tsx
39567
- import { useCallback as useCallback41, useEffect as useEffect50, useMemo as useMemo60, useRef as useRef48, useState as useState51 } from "react";
39686
+ import { useCallback as useCallback43, useEffect as useEffect50, useMemo as useMemo60, useRef as useRef48, useState as useState51 } from "react";
39568
39687
 
39569
39688
  // src/components/homepage/layout/use-el-size.ts
39570
- import { useCallback as useCallback40, useEffect as useEffect49, useMemo as useMemo59, useState as useState50 } from "react";
39689
+ import { useCallback as useCallback41, useEffect as useEffect49, useMemo as useMemo59, useState as useState50 } from "react";
39571
39690
  var useElementSize2 = (ref) => {
39572
39691
  const [size4, setSize] = useState50(null);
39573
39692
  const observer = useMemo59(() => {
@@ -39581,7 +39700,7 @@ var useElementSize2 = (ref) => {
39581
39700
  });
39582
39701
  });
39583
39702
  }, []);
39584
- const updateSize = useCallback40(() => {
39703
+ const updateSize = useCallback41(() => {
39585
39704
  if (ref === null) {
39586
39705
  return;
39587
39706
  }
@@ -39733,7 +39852,7 @@ var PlayerSeekBar2 = ({
39733
39852
  dragging: false
39734
39853
  });
39735
39854
  const width2 = size4?.width ?? 0;
39736
- const onPointerDown = useCallback41((e) => {
39855
+ const onPointerDown = useCallback43((e) => {
39737
39856
  if (e.button !== 0) {
39738
39857
  return;
39739
39858
  }
@@ -39747,7 +39866,7 @@ var PlayerSeekBar2 = ({
39747
39866
  });
39748
39867
  onSeekStart();
39749
39868
  }, [durationInFrames, width2, playerRef, playing, onSeekStart]);
39750
- const onPointerMove = useCallback41((e) => {
39869
+ const onPointerMove = useCallback43((e) => {
39751
39870
  if (!size4) {
39752
39871
  throw new Error("Player has no size");
39753
39872
  }
@@ -39758,7 +39877,7 @@ var PlayerSeekBar2 = ({
39758
39877
  const _frame = getFrameFromX2(e.clientX - posLeft, durationInFrames, size4.width);
39759
39878
  playerRef.current.seekTo(_frame);
39760
39879
  }, [dragging.dragging, durationInFrames, playerRef, size4]);
39761
- const onPointerUp = useCallback41(() => {
39880
+ const onPointerUp = useCallback43(() => {
39762
39881
  setDragging({
39763
39882
  dragging: false
39764
39883
  });
@@ -39842,7 +39961,7 @@ var PlayerSeekBar2 = ({
39842
39961
  };
39843
39962
 
39844
39963
  // src/components/homepage/Demo/PlayerVolume.tsx
39845
- import { useCallback as useCallback43, useEffect as useEffect51, useRef as useRef49, useState as useState54 } from "react";
39964
+ import { useCallback as useCallback45, useEffect as useEffect51, useRef as useRef49, useState as useState54 } from "react";
39846
39965
 
39847
39966
  // src/components/homepage/Demo/icons.tsx
39848
39967
  import { jsx as jsx101 } from "react/jsx-runtime";
@@ -39923,7 +40042,7 @@ var PlayerVolume = ({ playerRef }) => {
39923
40042
  document.body.style.userSelect = "auto";
39924
40043
  }
39925
40044
  }, [isHovered]);
39926
- const onClick = useCallback43(() => {
40045
+ const onClick = useCallback45(() => {
39927
40046
  if (timerRef.current !== null) {
39928
40047
  clearTimeout(timerRef.current);
39929
40048
  timerRef.current = null;
@@ -39961,7 +40080,7 @@ var PlayerVolume = ({ playerRef }) => {
39961
40080
  };
39962
40081
 
39963
40082
  // src/components/homepage/Demo/PlayPauseButton.tsx
39964
- import React73, { useCallback as useCallback45, useEffect as useEffect53 } from "react";
40083
+ import React73, { useCallback as useCallback46, useEffect as useEffect53 } from "react";
39965
40084
  import { jsx as jsx107 } from "react/jsx-runtime";
39966
40085
  var playerButtonStyle2 = {
39967
40086
  appearance: "none",
@@ -39997,7 +40116,7 @@ var PlayPauseButton = ({ playerRef }) => {
39997
40116
  current.removeEventListener("pause", onPause);
39998
40117
  };
39999
40118
  }, [playerRef]);
40000
- const onToggle = useCallback45(() => {
40119
+ const onToggle = useCallback46(() => {
40001
40120
  playerRef.current?.toggle();
40002
40121
  }, [playerRef]);
40003
40122
  const playPauseIconStyle = {
@@ -40217,7 +40336,7 @@ var Demo = () => {
40217
40336
  playerRef.removeEventListener("fullscreenchange", onFullscreenChange);
40218
40337
  };
40219
40338
  }, [data2]);
40220
- const updateCardOrder = useCallback46((newCardOrder) => {
40339
+ const updateCardOrder = useCallback47((newCardOrder) => {
40221
40340
  setCardOrder(newCardOrder);
40222
40341
  }, []);
40223
40342
  const props = useMemo61(() => {
@@ -40239,7 +40358,7 @@ var Demo = () => {
40239
40358
  emojiIndex
40240
40359
  };
40241
40360
  }, [cardOrder, emojiIndex, colorMode, data2, updateCardOrder]);
40242
- const onError = useCallback46(() => {
40361
+ const onError = useCallback47(() => {
40243
40362
  setError(true);
40244
40363
  }, []);
40245
40364
  return /* @__PURE__ */ jsxs39("div", {
@@ -40354,7 +40473,7 @@ import { forwardRef as forwardRef36, useEffect as useEffect58, useImperativeHand
40354
40473
  // src/components/homepage/VideoPlayerWithControls.tsx
40355
40474
  import Hls from "hls.js";
40356
40475
  import"plyr/dist/plyr.css";
40357
- import { forwardRef as forwardRef35, useCallback as useCallback47, useEffect as useEffect57, useRef as useRef51, useState as useState57 } from "react";
40476
+ import { forwardRef as forwardRef35, useCallback as useCallback48, useEffect as useEffect57, useRef as useRef51, useState as useState57 } from "react";
40358
40477
  import { jsx as jsx116 } from "react/jsx-runtime";
40359
40478
  var useCombinedRefs = function(...refs) {
40360
40479
  const targetRef = useRef51(null);
@@ -40376,8 +40495,8 @@ var VideoPlayerWithControls = forwardRef35(({ playbackId, poster, currentTime, o
40376
40495
  const metaRef = useCombinedRefs(ref, videoRef);
40377
40496
  const playerRef = useRef51(null);
40378
40497
  const [playerInitTime] = useState57(Date.now());
40379
- const videoError = useCallback47((event) => onError(event), [onError]);
40380
- const onImageLoad = useCallback47((event) => {
40498
+ const videoError = useCallback48((event) => onError(event), [onError]);
40499
+ const onImageLoad = useCallback48((event) => {
40381
40500
  const [w, h] = [event.target.width, event.target.height];
40382
40501
  if (w && h) {
40383
40502
  onSize({ width: w, height: h });
@@ -40751,13 +40870,13 @@ var IfYouKnowReact = () => {
40751
40870
  };
40752
40871
 
40753
40872
  // src/components/homepage/NewsletterButton.tsx
40754
- import { useCallback as useCallback48, useState as useState60 } from "react";
40873
+ import { useCallback as useCallback49, useState as useState60 } from "react";
40755
40874
  import { jsx as jsx121, jsxs as jsxs46 } from "react/jsx-runtime";
40756
40875
  var NewsletterButton = () => {
40757
40876
  const [email, setEmail] = useState60("");
40758
40877
  const [submitting, setSubmitting] = useState60(false);
40759
40878
  const [subscribed, setSubscribed] = useState60(false);
40760
- const handleSubmit = useCallback48(async (e) => {
40879
+ const handleSubmit = useCallback49(async (e) => {
40761
40880
  try {
40762
40881
  setSubmitting(true);
40763
40882
  e.preventDefault();