@remotion/promo-pages 4.0.461 → 4.0.463

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 (279) hide show
  1. package/dist/Homepage.js +1496 -953
  2. package/dist/design.js +1837 -1416
  3. package/dist/experts/experts-data.js +5 -16
  4. package/dist/experts.js +1624 -1203
  5. package/dist/homepage/Pricing.js +1865 -1444
  6. package/dist/prompts/PromptsGallery.js +1709 -1288
  7. package/dist/prompts/PromptsShow.js +1379 -958
  8. package/dist/prompts/PromptsSubmit.js +1381 -960
  9. package/dist/team.js +1705 -1284
  10. package/dist/template-modal-content.js +1715 -1294
  11. package/dist/templates.js +1706 -1284
  12. package/package.json +17 -17
  13. package/dist/cn.d.ts +0 -2
  14. package/dist/cn.js +0 -5
  15. package/dist/components/3DEngine/ButtonDemo.d.ts +0 -2
  16. package/dist/components/3DEngine/ButtonDemo.js +0 -43
  17. package/dist/components/3DEngine/Faces.d.ts +0 -5
  18. package/dist/components/3DEngine/Faces.js +0 -7
  19. package/dist/components/3DEngine/Outer.d.ts +0 -8
  20. package/dist/components/3DEngine/Outer.js +0 -56
  21. package/dist/components/3DEngine/Switch.d.ts +0 -4
  22. package/dist/components/3DEngine/Switch.js +0 -4
  23. package/dist/components/3DEngine/get-child-node-from.d.ts +0 -1
  24. package/dist/components/3DEngine/get-child-node-from.js +0 -14
  25. package/dist/components/3DEngine/hover-transforms.d.ts +0 -9
  26. package/dist/components/3DEngine/hover-transforms.js +0 -177
  27. package/dist/components/BackButton.d.ts +0 -6
  28. package/dist/components/BackButton.js +0 -9
  29. package/dist/components/CommandCopyButton.d.ts +0 -5
  30. package/dist/components/CommandCopyButton.js +0 -4
  31. package/dist/components/Homepage.d.ts +0 -6
  32. package/dist/components/Homepage.js +0 -20
  33. package/dist/components/ManageTeamMembers.d.ts +0 -2
  34. package/dist/components/ManageTeamMembers.js +0 -42
  35. package/dist/components/Spinner.d.ts +0 -3
  36. package/dist/components/Spinner.js +0 -4
  37. package/dist/components/TeamPicture.d.ts +0 -1
  38. package/dist/components/TeamPicture.js +0 -4
  39. package/dist/components/design.d.ts +0 -1
  40. package/dist/components/design.js +0 -33
  41. package/dist/components/experts/ExpertsPage.d.ts +0 -11
  42. package/dist/components/experts/ExpertsPage.js +0 -50
  43. package/dist/components/experts/experts-data.d.ts +0 -15
  44. package/dist/components/experts/experts-data.js +0 -289
  45. package/dist/components/experts/experts-icons.d.ts +0 -7
  46. package/dist/components/experts/experts-icons.js +0 -36
  47. package/dist/components/experts.d.ts +0 -3
  48. package/dist/components/experts.js +0 -2
  49. package/dist/components/homepage/BackgroundAnimation.d.ts +0 -2
  50. package/dist/components/homepage/BackgroundAnimation.js +0 -66
  51. package/dist/components/homepage/ChooseTemplate.d.ts +0 -2
  52. package/dist/components/homepage/ChooseTemplate.js +0 -25
  53. package/dist/components/homepage/CommunityStats.d.ts +0 -3
  54. package/dist/components/homepage/CommunityStats.js +0 -6
  55. package/dist/components/homepage/CommunityStatsItems.d.ts +0 -7
  56. package/dist/components/homepage/CommunityStatsItems.js +0 -58
  57. package/dist/components/homepage/Demo/Card.d.ts +0 -15
  58. package/dist/components/homepage/Demo/Card.js +0 -174
  59. package/dist/components/homepage/Demo/Cards.d.ts +0 -15
  60. package/dist/components/homepage/Demo/Cards.js +0 -57
  61. package/dist/components/homepage/Demo/Comp.d.ts +0 -38
  62. package/dist/components/homepage/Demo/Comp.js +0 -72
  63. package/dist/components/homepage/Demo/CurrentCountry.d.ts +0 -9
  64. package/dist/components/homepage/Demo/CurrentCountry.js +0 -48
  65. package/dist/components/homepage/Demo/DemoError.d.ts +0 -2
  66. package/dist/components/homepage/Demo/DemoError.js +0 -10
  67. package/dist/components/homepage/Demo/DemoErrorIcon.d.ts +0 -2
  68. package/dist/components/homepage/Demo/DemoErrorIcon.js +0 -16
  69. package/dist/components/homepage/Demo/DemoRender.d.ts +0 -33
  70. package/dist/components/homepage/Demo/DemoRender.js +0 -107
  71. package/dist/components/homepage/Demo/DigitWheel.d.ts +0 -9
  72. package/dist/components/homepage/Demo/DigitWheel.js +0 -94
  73. package/dist/components/homepage/Demo/DisplayedEmoji.d.ts +0 -5
  74. package/dist/components/homepage/Demo/DisplayedEmoji.js +0 -59
  75. package/dist/components/homepage/Demo/DoneCheckmark.d.ts +0 -2
  76. package/dist/components/homepage/Demo/DoneCheckmark.js +0 -20
  77. package/dist/components/homepage/Demo/DownloadNudge.d.ts +0 -2
  78. package/dist/components/homepage/Demo/DownloadNudge.js +0 -27
  79. package/dist/components/homepage/Demo/DragAndDropNudge.d.ts +0 -3
  80. package/dist/components/homepage/Demo/DragAndDropNudge.js +0 -26
  81. package/dist/components/homepage/Demo/EmojiCard.d.ts +0 -10
  82. package/dist/components/homepage/Demo/EmojiCard.js +0 -120
  83. package/dist/components/homepage/Demo/Minus.d.ts +0 -5
  84. package/dist/components/homepage/Demo/Minus.js +0 -11
  85. package/dist/components/homepage/Demo/PlayPauseButton.d.ts +0 -5
  86. package/dist/components/homepage/Demo/PlayPauseButton.js +0 -47
  87. package/dist/components/homepage/Demo/PlayerControls.d.ts +0 -8
  88. package/dist/components/homepage/Demo/PlayerControls.js +0 -15
  89. package/dist/components/homepage/Demo/PlayerSeekBar.d.ts +0 -11
  90. package/dist/components/homepage/Demo/PlayerSeekBar.js +0 -216
  91. package/dist/components/homepage/Demo/PlayerVolume.d.ts +0 -5
  92. package/dist/components/homepage/Demo/PlayerVolume.js +0 -53
  93. package/dist/components/homepage/Demo/Progress.d.ts +0 -4
  94. package/dist/components/homepage/Demo/Progress.js +0 -14
  95. package/dist/components/homepage/Demo/Spinner.d.ts +0 -5
  96. package/dist/components/homepage/Demo/Spinner.js +0 -37
  97. package/dist/components/homepage/Demo/Switcher.d.ts +0 -6
  98. package/dist/components/homepage/Demo/Switcher.js +0 -25
  99. package/dist/components/homepage/Demo/Temperature.d.ts +0 -6
  100. package/dist/components/homepage/Demo/Temperature.js +0 -21
  101. package/dist/components/homepage/Demo/TemperatureNumber.d.ts +0 -5
  102. package/dist/components/homepage/Demo/TemperatureNumber.js +0 -36
  103. package/dist/components/homepage/Demo/ThemeNudge.d.ts +0 -3
  104. package/dist/components/homepage/Demo/ThemeNudge.js +0 -35
  105. package/dist/components/homepage/Demo/TimeDisplay.d.ts +0 -6
  106. package/dist/components/homepage/Demo/TimeDisplay.js +0 -27
  107. package/dist/components/homepage/Demo/TrendingRepos.d.ts +0 -6
  108. package/dist/components/homepage/Demo/TrendingRepos.js +0 -65
  109. package/dist/components/homepage/Demo/icons.d.ts +0 -10
  110. package/dist/components/homepage/Demo/icons.js +0 -22
  111. package/dist/components/homepage/Demo/index.d.ts +0 -2
  112. package/dist/components/homepage/Demo/index.js +0 -95
  113. package/dist/components/homepage/Demo/math.d.ts +0 -10
  114. package/dist/components/homepage/Demo/math.js +0 -29
  115. package/dist/components/homepage/Demo/types.d.ts +0 -6
  116. package/dist/components/homepage/Demo/types.js +0 -0
  117. package/dist/components/homepage/EditorStarterSection.d.ts +0 -3
  118. package/dist/components/homepage/EditorStarterSection.js +0 -8
  119. package/dist/components/homepage/EvaluateRemotion.d.ts +0 -3
  120. package/dist/components/homepage/EvaluateRemotion.js +0 -21
  121. package/dist/components/homepage/FreePricing.d.ts +0 -4
  122. package/dist/components/homepage/FreePricing.js +0 -133
  123. package/dist/components/homepage/GetStartedStrip.d.ts +0 -2
  124. package/dist/components/homepage/GetStartedStrip.js +0 -14
  125. package/dist/components/homepage/GitHubButton.d.ts +0 -2
  126. package/dist/components/homepage/GitHubButton.js +0 -7
  127. package/dist/components/homepage/IconForTemplate.d.ts +0 -6
  128. package/dist/components/homepage/IconForTemplate.js +0 -105
  129. package/dist/components/homepage/IfYouKnowReact.d.ts +0 -3
  130. package/dist/components/homepage/IfYouKnowReact.js +0 -23
  131. package/dist/components/homepage/MoreTemplatesButton.d.ts +0 -2
  132. package/dist/components/homepage/MoreTemplatesButton.js +0 -11
  133. package/dist/components/homepage/MuxVideo.d.ts +0 -7
  134. package/dist/components/homepage/MuxVideo.js +0 -45
  135. package/dist/components/homepage/NewsletterButton.d.ts +0 -2
  136. package/dist/components/homepage/NewsletterButton.js +0 -38
  137. package/dist/components/homepage/ParameterizeAndEdit.d.ts +0 -2
  138. package/dist/components/homepage/ParameterizeAndEdit.js +0 -22
  139. package/dist/components/homepage/Pricing.d.ts +0 -2
  140. package/dist/components/homepage/Pricing.js +0 -15
  141. package/dist/components/homepage/PricingBulletPoint.d.ts +0 -6
  142. package/dist/components/homepage/PricingBulletPoint.js +0 -19
  143. package/dist/components/homepage/RealMp4Videos.d.ts +0 -2
  144. package/dist/components/homepage/RealMp4Videos.js +0 -41
  145. package/dist/components/homepage/Spacer.d.ts +0 -2
  146. package/dist/components/homepage/Spacer.js +0 -4
  147. package/dist/components/homepage/TemplateIcon.d.ts +0 -5
  148. package/dist/components/homepage/TemplateIcon.js +0 -24
  149. package/dist/components/homepage/TextInput.d.ts +0 -7
  150. package/dist/components/homepage/TextInput.js +0 -34
  151. package/dist/components/homepage/TrustedByBanner.d.ts +0 -2
  152. package/dist/components/homepage/TrustedByBanner.js +0 -27
  153. package/dist/components/homepage/VideoApps.d.ts +0 -4
  154. package/dist/components/homepage/VideoApps.js +0 -72
  155. package/dist/components/homepage/VideoAppsShowcase.d.ts +0 -3
  156. package/dist/components/homepage/VideoAppsShowcase.js +0 -139
  157. package/dist/components/homepage/VideoAppsTitle.d.ts +0 -4
  158. package/dist/components/homepage/VideoAppsTitle.js +0 -4
  159. package/dist/components/homepage/VideoPlayerWithControls.d.ts +0 -20
  160. package/dist/components/homepage/VideoPlayerWithControls.js +0 -105
  161. package/dist/components/homepage/WriteInReact.d.ts +0 -2
  162. package/dist/components/homepage/WriteInReact.js +0 -10
  163. package/dist/components/homepage/YouAreHere.d.ts +0 -2
  164. package/dist/components/homepage/YouAreHere.js +0 -23
  165. package/dist/components/homepage/layout/Button.d.ts +0 -22
  166. package/dist/components/homepage/layout/Button.js +0 -30
  167. package/dist/components/homepage/layout/colors.d.ts +0 -13
  168. package/dist/components/homepage/layout/colors.js +0 -14
  169. package/dist/components/homepage/layout/use-color-mode.d.ts +0 -21
  170. package/dist/components/homepage/layout/use-color-mode.js +0 -22
  171. package/dist/components/homepage/layout/use-el-size.d.ts +0 -5
  172. package/dist/components/homepage/layout/use-el-size.js +0 -40
  173. package/dist/components/homepage/layout/use-mobile-layout.d.ts +0 -1
  174. package/dist/components/homepage/layout/use-mobile-layout.js +0 -6
  175. package/dist/components/icons/blank.d.ts +0 -3
  176. package/dist/components/icons/blank.js +0 -4
  177. package/dist/components/icons/brain.d.ts +0 -2
  178. package/dist/components/icons/brain.js +0 -4
  179. package/dist/components/icons/clone.d.ts +0 -2
  180. package/dist/components/icons/clone.js +0 -2
  181. package/dist/components/icons/code-hike.d.ts +0 -3
  182. package/dist/components/icons/code-hike.js +0 -4
  183. package/dist/components/icons/cubes.d.ts +0 -3
  184. package/dist/components/icons/cubes.js +0 -4
  185. package/dist/components/icons/editor.d.ts +0 -3
  186. package/dist/components/icons/editor.js +0 -4
  187. package/dist/components/icons/electron.d.ts +0 -4
  188. package/dist/components/icons/electron.js +0 -4
  189. package/dist/components/icons/js.d.ts +0 -3
  190. package/dist/components/icons/js.js +0 -4
  191. package/dist/components/icons/music.d.ts +0 -2
  192. package/dist/components/icons/music.js +0 -4
  193. package/dist/components/icons/next.d.ts +0 -4
  194. package/dist/components/icons/next.js +0 -4
  195. package/dist/components/icons/overlay.d.ts +0 -3
  196. package/dist/components/icons/overlay.js +0 -4
  197. package/dist/components/icons/prompt-to-video.d.ts +0 -2
  198. package/dist/components/icons/prompt-to-video.js +0 -4
  199. package/dist/components/icons/recorder.d.ts +0 -3
  200. package/dist/components/icons/recorder.js +0 -4
  201. package/dist/components/icons/remix.d.ts +0 -3
  202. package/dist/components/icons/remix.js +0 -4
  203. package/dist/components/icons/render-server.d.ts +0 -3
  204. package/dist/components/icons/render-server.js +0 -4
  205. package/dist/components/icons/skia.d.ts +0 -3
  206. package/dist/components/icons/skia.js +0 -4
  207. package/dist/components/icons/stargazer.d.ts +0 -3
  208. package/dist/components/icons/stargazer.js +0 -4
  209. package/dist/components/icons/still.d.ts +0 -3
  210. package/dist/components/icons/still.js +0 -4
  211. package/dist/components/icons/tailwind.d.ts +0 -3
  212. package/dist/components/icons/tailwind.js +0 -4
  213. package/dist/components/icons/tiktok.d.ts +0 -3
  214. package/dist/components/icons/tiktok.js +0 -4
  215. package/dist/components/icons/timeline.d.ts +0 -3
  216. package/dist/components/icons/timeline.js +0 -4
  217. package/dist/components/icons/ts.d.ts +0 -3
  218. package/dist/components/icons/ts.js +0 -4
  219. package/dist/components/icons/undo.d.ts +0 -3
  220. package/dist/components/icons/undo.js +0 -2
  221. package/dist/components/icons/vercel.d.ts +0 -4
  222. package/dist/components/icons/vercel.js +0 -4
  223. package/dist/components/icons/waveform.d.ts +0 -3
  224. package/dist/components/icons/waveform.js +0 -4
  225. package/dist/components/prompts/CardLikeButton.d.ts +0 -5
  226. package/dist/components/prompts/CardLikeButton.js +0 -49
  227. package/dist/components/prompts/ClipboardIcon.d.ts +0 -5
  228. package/dist/components/prompts/ClipboardIcon.js +0 -4
  229. package/dist/components/prompts/CopyPromptButton.d.ts +0 -4
  230. package/dist/components/prompts/CopyPromptButton.js +0 -13
  231. package/dist/components/prompts/LikeButton.d.ts +0 -5
  232. package/dist/components/prompts/LikeButton.js +0 -49
  233. package/dist/components/prompts/MuxPlayer.d.ts +0 -8
  234. package/dist/components/prompts/MuxPlayer.js +0 -21
  235. package/dist/components/prompts/NewBackButton.d.ts +0 -5
  236. package/dist/components/prompts/NewBackButton.js +0 -8
  237. package/dist/components/prompts/Page.d.ts +0 -8
  238. package/dist/components/prompts/Page.js +0 -7
  239. package/dist/components/prompts/PromptsGallery.d.ts +0 -7
  240. package/dist/components/prompts/PromptsGallery.js +0 -60
  241. package/dist/components/prompts/PromptsShow.d.ts +0 -5
  242. package/dist/components/prompts/PromptsShow.js +0 -17
  243. package/dist/components/prompts/PromptsSubmit.d.ts +0 -2
  244. package/dist/components/prompts/PromptsSubmit.js +0 -173
  245. package/dist/components/prompts/config.d.ts +0 -1
  246. package/dist/components/prompts/config.js +0 -1
  247. package/dist/components/prompts/prompt-helpers.d.ts +0 -8
  248. package/dist/components/prompts/prompt-helpers.js +0 -76
  249. package/dist/components/prompts/prompt-types.d.ts +0 -14
  250. package/dist/components/prompts/prompt-types.js +0 -0
  251. package/dist/components/prompts/use-heart-animation.d.ts +0 -5
  252. package/dist/components/prompts/use-heart-animation.js +0 -29
  253. package/dist/components/team/TeamCards.d.ts +0 -6
  254. package/dist/components/team/TeamCards.js +0 -19
  255. package/dist/components/team/TitleTeamCards.d.ts +0 -2
  256. package/dist/components/team/TitleTeamCards.js +0 -6
  257. package/dist/components/team/TrustSection.d.ts +0 -2
  258. package/dist/components/team/TrustSection.js +0 -59
  259. package/dist/components/team.d.ts +0 -3
  260. package/dist/components/team.js +0 -15
  261. package/dist/components/template-modal-content.d.ts +0 -5
  262. package/dist/components/template-modal-content.js +0 -73
  263. package/dist/components/templates.d.ts +0 -2
  264. package/dist/components/templates.js +0 -27
  265. package/dist/helpers/mobile-layout.d.ts +0 -1
  266. package/dist/helpers/mobile-layout.js +0 -6
  267. package/dist/helpers/use-el-size.d.ts +0 -5
  268. package/dist/helpers/use-el-size.js +0 -40
  269. package/dist/main.d.ts +0 -1
  270. package/dist/main.js +0 -6
  271. package/dist/prompts/PromptsShow.css +0 -2578
  272. package/dist/prompts-show.d.ts +0 -1
  273. package/dist/prompts-show.js +0 -20
  274. package/dist/prompts-submit.d.ts +0 -1
  275. package/dist/prompts-submit.js +0 -6
  276. package/dist/prompts.d.ts +0 -1
  277. package/dist/prompts.js +0 -6
  278. package/dist/team.d.ts +0 -1
  279. package/dist/template-modal-content.css +0 -35
package/dist/Homepage.js CHANGED
@@ -1,26 +1,15 @@
1
- var __create = Object.create;
2
- var __getProtoOf = Object.getPrototypeOf;
3
1
  var __defProp = Object.defineProperty;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __toESM = (mod, isNodeMode, target) => {
7
- target = mod != null ? __create(__getProtoOf(mod)) : {};
8
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
9
- for (let key of __getOwnPropNames(mod))
10
- if (!__hasOwnProp.call(to, key))
11
- __defProp(to, key, {
12
- get: () => mod[key],
13
- enumerable: true
14
- });
15
- return to;
16
- };
2
+ var __returnValue = (v) => v;
3
+ function __exportSetter(name, newValue) {
4
+ this[name] = __returnValue.bind(null, newValue);
5
+ }
17
6
  var __export = (target, all) => {
18
7
  for (var name in all)
19
8
  __defProp(target, name, {
20
9
  get: all[name],
21
10
  enumerable: true,
22
11
  configurable: true,
23
- set: (newValue) => all[name] = () => newValue
12
+ set: __exportSetter.bind(all, name)
24
13
  });
25
14
  };
26
15
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
@@ -941,8 +930,21 @@ import * as React6 from "react";
941
930
  import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
942
931
  import { useContext as useContext8, useMemo as useMemo7 } from "react";
943
932
  import { jsx as jsx7 } from "react/jsx-runtime";
944
- import { useEffect as useEffect4, useMemo as useMemo11, useState as useState3 } from "react";
945
- import { useContext as useContext11 } from "react";
933
+ import {
934
+ forwardRef as forwardRef4,
935
+ useCallback as useCallback6,
936
+ useEffect as useEffect5,
937
+ useMemo as useMemo16,
938
+ useState as useState6
939
+ } from "react";
940
+ import {
941
+ forwardRef as forwardRef3,
942
+ useContext as useContext17,
943
+ useEffect as useEffect3,
944
+ useMemo as useMemo14,
945
+ useState as useState5
946
+ } from "react";
947
+ import { useContext as useContext14, useMemo as useMemo11 } from "react";
946
948
  import { createContext as createContext12 } from "react";
947
949
  import { useContext as useContext10, useMemo as useMemo9 } from "react";
948
950
  import {
@@ -953,52 +955,45 @@ import {
953
955
  useState as useState2
954
956
  } from "react";
955
957
  import { jsx as jsx8 } from "react/jsx-runtime";
956
- import { useEffect as useEffect3, useMemo as useMemo10, useRef as useRef4 } from "react";
957
- import { useRef as useRef5 } from "react";
958
- import { jsx as jsx9 } from "react/jsx-runtime";
959
- import {
960
- forwardRef as forwardRef3,
961
- useContext as useContext16,
962
- useEffect as useEffect5,
963
- useMemo as useMemo16,
964
- useState as useState6
965
- } from "react";
966
- import { useContext as useContext14, useMemo as useMemo13 } from "react";
958
+ import { useContext as useContext11 } from "react";
967
959
  import { useContext as useContext13 } from "react";
968
- import { useContext as useContext12, useMemo as useMemo12 } from "react";
969
- import { jsx as jsx10 } from "react/jsx-runtime";
960
+ import { useContext as useContext12, useMemo as useMemo10 } from "react";
961
+ import { jsx as jsx9 } from "react/jsx-runtime";
970
962
  import { createContext as createContext14 } from "react";
971
- import React12, { useCallback as useCallback5, useMemo as useMemo14, useRef as useRef6, useState as useState4 } from "react";
972
- import { jsx as jsx11 } from "react/jsx-runtime";
973
- import React13, { forwardRef as forwardRef2, useState as useState5, useContext as useContext15, useMemo as useMemo15 } from "react";
963
+ import React11, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
964
+ import { jsx as jsx10 } from "react/jsx-runtime";
965
+ import React12, { forwardRef as forwardRef2, useState as useState4, useContext as useContext16, useMemo as useMemo13 } from "react";
966
+ import { useContext as useContext15, useRef as useRef5 } from "react";
974
967
  import { createContext as createContext15 } from "react";
968
+ import { jsx as jsx11 } from "react/jsx-runtime";
969
+ import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef6 } from "react";
975
970
  import { jsx as jsx12 } from "react/jsx-runtime";
976
971
  import {
977
- forwardRef as forwardRef4,
972
+ forwardRef as forwardRef5,
978
973
  useEffect as useEffect6,
979
974
  useImperativeHandle as useImperativeHandle2,
980
975
  useLayoutEffect as useLayoutEffect2,
981
976
  useRef as useRef8,
982
977
  useState as useState7
983
978
  } from "react";
984
- import React15, { useCallback as useCallback6, useImperativeHandle, useRef as useRef7 } from "react";
979
+ import React15, { useCallback as useCallback7, useImperativeHandle, useRef as useRef7 } from "react";
985
980
  import { jsx as jsx13 } from "react/jsx-runtime";
986
981
  import { jsx as jsx14 } from "react/jsx-runtime";
987
982
  import {
988
983
  createContext as createContext16,
989
- forwardRef as forwardRef5,
990
- useCallback as useCallback7,
991
- useContext as useContext17,
984
+ forwardRef as forwardRef6,
985
+ useCallback as useCallback8,
986
+ useContext as useContext18,
992
987
  useLayoutEffect as useLayoutEffect3,
993
988
  useMemo as useMemo17,
994
989
  useRef as useRef9,
995
990
  useState as useState8
996
991
  } from "react";
997
992
  import { jsx as jsx15 } from "react/jsx-runtime";
998
- import { useContext as useContext18, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
993
+ import { useContext as useContext19, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
999
994
  import {
1000
995
  createContext as createContext17,
1001
- useCallback as useCallback8,
996
+ useCallback as useCallback9,
1002
997
  useImperativeHandle as useImperativeHandle3,
1003
998
  useLayoutEffect as useLayoutEffect4,
1004
999
  useMemo as useMemo18,
@@ -1006,29 +1001,29 @@ import {
1006
1001
  useState as useState9
1007
1002
  } from "react";
1008
1003
  import { jsx as jsx16 } from "react/jsx-runtime";
1009
- import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as useContext30 } from "react";
1004
+ import { forwardRef as forwardRef9, useCallback as useCallback14, useContext as useContext31 } from "react";
1010
1005
  import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
1011
1006
  import { jsx as jsx17 } from "react/jsx-runtime";
1012
- import { useContext as useContext19 } from "react";
1007
+ import { useContext as useContext20 } from "react";
1013
1008
  import { createContext as createContext19, useEffect as useEffect7, useState as useState11 } from "react";
1014
1009
  import { jsx as jsx18 } from "react/jsx-runtime";
1015
1010
  import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
1016
1011
  import { jsx as jsx19 } from "react/jsx-runtime";
1017
1012
  import React23, {
1018
- forwardRef as forwardRef6,
1019
- useContext as useContext28,
1013
+ forwardRef as forwardRef7,
1014
+ useContext as useContext29,
1020
1015
  useEffect as useEffect14,
1021
1016
  useImperativeHandle as useImperativeHandle4,
1022
1017
  useMemo as useMemo28,
1023
1018
  useRef as useRef18,
1024
1019
  useState as useState16
1025
1020
  } from "react";
1026
- import { useContext as useContext21, useLayoutEffect as useLayoutEffect6, useRef as useRef13 } from "react";
1021
+ import { useContext as useContext22, useLayoutEffect as useLayoutEffect6, useRef as useRef13 } from "react";
1027
1022
  import React20, {
1028
1023
  createContext as createContext21,
1029
1024
  createRef as createRef2,
1030
- useCallback as useCallback9,
1031
- useContext as useContext20,
1025
+ useCallback as useCallback10,
1026
+ useContext as useContext21,
1032
1027
  useMemo as useMemo22,
1033
1028
  useRef as useRef11,
1034
1029
  useState as useState12
@@ -1036,20 +1031,20 @@ import React20, {
1036
1031
  import { useMemo as useMemo21 } from "react";
1037
1032
  import { jsx as jsx20, jsxs as jsxs22 } from "react/jsx-runtime";
1038
1033
  import { useRef as useRef12 } from "react";
1039
- import { useContext as useContext23, useEffect as useEffect8, useMemo as useMemo23, useState as useState13 } from "react";
1040
- import { useContext as useContext22 } from "react";
1034
+ import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo23, useState as useState13 } from "react";
1035
+ import { useContext as useContext23 } from "react";
1041
1036
  import {
1042
- useCallback as useCallback12,
1043
- useContext as useContext26,
1037
+ useCallback as useCallback13,
1038
+ useContext as useContext27,
1044
1039
  useEffect as useEffect12,
1045
1040
  useLayoutEffect as useLayoutEffect8,
1046
1041
  useRef as useRef17
1047
1042
  } from "react";
1048
- import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef15 } from "react";
1049
- import { useContext as useContext25, useMemo as useMemo25 } from "react";
1043
+ import { useCallback as useCallback12, useMemo as useMemo26, useRef as useRef15 } from "react";
1044
+ import { useContext as useContext26, useMemo as useMemo25 } from "react";
1050
1045
  import React21, {
1051
- useCallback as useCallback10,
1052
- useContext as useContext24,
1046
+ useCallback as useCallback11,
1047
+ useContext as useContext25,
1053
1048
  useEffect as useEffect9,
1054
1049
  useLayoutEffect as useLayoutEffect7,
1055
1050
  useMemo as useMemo24,
@@ -1061,11 +1056,11 @@ import React22 from "react";
1061
1056
  import { useEffect as useEffect10, useState as useState15 } from "react";
1062
1057
  import { useEffect as useEffect11, useRef as useRef16 } from "react";
1063
1058
  import { useEffect as useEffect13 } from "react";
1064
- import { createContext as createContext22, useContext as useContext27, useMemo as useMemo27 } from "react";
1059
+ import { createContext as createContext22, useContext as useContext28, useMemo as useMemo27 } from "react";
1065
1060
  import { jsx as jsx222 } from "react/jsx-runtime";
1066
1061
  import {
1067
- forwardRef as forwardRef7,
1068
- useContext as useContext29,
1062
+ forwardRef as forwardRef8,
1063
+ useContext as useContext30,
1069
1064
  useEffect as useEffect15,
1070
1065
  useImperativeHandle as useImperativeHandle5,
1071
1066
  useLayoutEffect as useLayoutEffect9,
@@ -1074,11 +1069,11 @@ import {
1074
1069
  } from "react";
1075
1070
  import { jsx as jsx23 } from "react/jsx-runtime";
1076
1071
  import { jsx as jsx24 } from "react/jsx-runtime";
1077
- import { forwardRef as forwardRef9, useCallback as useCallback14, useState as useState17 } from "react";
1072
+ import { forwardRef as forwardRef10, useCallback as useCallback15, useState as useState17 } from "react";
1078
1073
  import { jsx as jsx25 } from "react/jsx-runtime";
1079
1074
  import {
1080
- useCallback as useCallback15,
1081
- useContext as useContext31,
1075
+ useCallback as useCallback16,
1076
+ useContext as useContext32,
1082
1077
  useImperativeHandle as useImperativeHandle6,
1083
1078
  useLayoutEffect as useLayoutEffect10,
1084
1079
  useRef as useRef20,
@@ -1088,7 +1083,7 @@ import { jsx as jsx26 } from "react/jsx-runtime";
1088
1083
  import { createRef as createRef3 } from "react";
1089
1084
  import React28 from "react";
1090
1085
  import {
1091
- useCallback as useCallback16,
1086
+ useCallback as useCallback17,
1092
1087
  useImperativeHandle as useImperativeHandle7,
1093
1088
  useMemo as useMemo30,
1094
1089
  useRef as useRef21,
@@ -1097,15 +1092,15 @@ import {
1097
1092
  import { jsx as jsx27 } from "react/jsx-runtime";
1098
1093
  import React29 from "react";
1099
1094
  import { useMemo as useMemo32 } from "react";
1100
- import { createContext as createContext23, useContext as useContext32, useMemo as useMemo31 } from "react";
1095
+ import { createContext as createContext23, useContext as useContext33, useMemo as useMemo31 } from "react";
1101
1096
  import { jsx as jsx28 } from "react/jsx-runtime";
1102
1097
  import { jsx as jsx29 } from "react/jsx-runtime";
1103
1098
  import React31 from "react";
1104
1099
  import React32, { createContext as createContext24 } from "react";
1105
- import { useCallback as useCallback18 } from "react";
1100
+ import { useCallback as useCallback19 } from "react";
1106
1101
  import {
1107
- useCallback as useCallback17,
1108
- useContext as useContext33,
1102
+ useCallback as useCallback18,
1103
+ useContext as useContext34,
1109
1104
  useEffect as useEffect16,
1110
1105
  useLayoutEffect as useLayoutEffect11,
1111
1106
  useMemo as useMemo33,
@@ -1113,8 +1108,8 @@ import {
1113
1108
  } from "react";
1114
1109
  import { jsx as jsx30 } from "react/jsx-runtime";
1115
1110
  import React34, {
1116
- forwardRef as forwardRef10,
1117
- useContext as useContext34,
1111
+ forwardRef as forwardRef11,
1112
+ useContext as useContext35,
1118
1113
  useEffect as useEffect18,
1119
1114
  useImperativeHandle as useImperativeHandle8,
1120
1115
  useMemo as useMemo34,
@@ -1126,16 +1121,16 @@ import { jsx as jsx31 } from "react/jsx-runtime";
1126
1121
  import { jsx as jsx32 } from "react/jsx-runtime";
1127
1122
  import React36, { useMemo as useMemo35 } from "react";
1128
1123
  import { jsx as jsx33 } from "react/jsx-runtime";
1129
- import { Children, forwardRef as forwardRef11, useMemo as useMemo36 } from "react";
1124
+ import { Children, forwardRef as forwardRef12, useMemo as useMemo36 } from "react";
1130
1125
  import React37 from "react";
1131
1126
  import React38, { createContext as createContext25 } from "react";
1132
1127
  import { jsx as jsx34 } from "react/jsx-runtime";
1133
1128
  import { jsx as jsx35 } from "react/jsx-runtime";
1134
1129
  import React40 from "react";
1135
- import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as useContext36 } from "react";
1130
+ import { forwardRef as forwardRef14, useCallback as useCallback20, useContext as useContext37 } from "react";
1136
1131
  import {
1137
- forwardRef as forwardRef12,
1138
- useContext as useContext35,
1132
+ forwardRef as forwardRef13,
1133
+ useContext as useContext36,
1139
1134
  useEffect as useEffect19,
1140
1135
  useImperativeHandle as useImperativeHandle9,
1141
1136
  useLayoutEffect as useLayoutEffect12,
@@ -1145,13 +1140,17 @@ import {
1145
1140
  import { jsx as jsx36 } from "react/jsx-runtime";
1146
1141
  import { jsx as jsx37 } from "react/jsx-runtime";
1147
1142
  var __defProp2 = Object.defineProperty;
1143
+ var __returnValue2 = (v) => v;
1144
+ function __exportSetter2(name, newValue) {
1145
+ this[name] = __returnValue2.bind(null, newValue);
1146
+ }
1148
1147
  var __export2 = (target, all) => {
1149
1148
  for (var name in all)
1150
1149
  __defProp2(target, name, {
1151
1150
  get: all[name],
1152
1151
  enumerable: true,
1153
1152
  configurable: true,
1154
- set: (newValue) => all[name] = () => newValue
1153
+ set: __exportSetter2.bind(all, name)
1155
1154
  });
1156
1155
  };
1157
1156
  if (typeof createContext !== "function") {
@@ -2211,6 +2210,81 @@ var Composition = (props) => {
2211
2210
  ...props
2212
2211
  });
2213
2212
  };
2213
+ var componentsToAddStacksTo = [];
2214
+ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
2215
+ var addSequenceStackTraces = (component) => {
2216
+ componentsToAddStacksTo.push(component);
2217
+ };
2218
+ var sequenceStyleSchema = {
2219
+ "style.translate": {
2220
+ type: "translate",
2221
+ step: 1,
2222
+ default: "0px 0px",
2223
+ description: "Offset"
2224
+ },
2225
+ "style.scale": {
2226
+ type: "number",
2227
+ min: 0.05,
2228
+ max: 100,
2229
+ step: 0.01,
2230
+ default: 1,
2231
+ description: "Scale"
2232
+ },
2233
+ "style.rotate": {
2234
+ type: "rotation",
2235
+ step: 1,
2236
+ default: "0deg",
2237
+ description: "Rotation"
2238
+ },
2239
+ "style.opacity": {
2240
+ type: "number",
2241
+ min: 0,
2242
+ max: 1,
2243
+ step: 0.01,
2244
+ default: 1,
2245
+ description: "Opacity"
2246
+ },
2247
+ premountFor: {
2248
+ type: "number",
2249
+ default: 0,
2250
+ description: "Premount For",
2251
+ min: 0,
2252
+ step: 1
2253
+ },
2254
+ postmountFor: {
2255
+ type: "hidden"
2256
+ },
2257
+ styleWhilePremounted: {
2258
+ type: "hidden"
2259
+ },
2260
+ styleWhilePostmounted: {
2261
+ type: "hidden"
2262
+ }
2263
+ };
2264
+ var hiddenField = {
2265
+ type: "boolean",
2266
+ default: false,
2267
+ description: "Hidden"
2268
+ };
2269
+ var sequenceSchema = {
2270
+ hidden: hiddenField,
2271
+ layout: {
2272
+ type: "enum",
2273
+ default: "absolute-fill",
2274
+ description: "Layout",
2275
+ variants: {
2276
+ "absolute-fill": sequenceStyleSchema,
2277
+ none: {}
2278
+ }
2279
+ }
2280
+ };
2281
+ var sequenceSchemaDefaultLayoutNone = {
2282
+ ...sequenceSchema,
2283
+ layout: {
2284
+ ...sequenceSchema.layout,
2285
+ default: "none"
2286
+ }
2287
+ };
2214
2288
  var SequenceContext = createContext12(null);
2215
2289
  var exports_timeline_position_state = {};
2216
2290
  __export2(exports_timeline_position_state, {
@@ -2416,314 +2490,13 @@ var useCurrentFrame = () => {
2416
2490
  const contextOffset = context ? context.cumulatedFrom + context.relativeFrom : 0;
2417
2491
  return frame - contextOffset;
2418
2492
  };
2419
- var flattenEffects = (effects) => {
2420
- const out = [];
2421
- for (const item of effects) {
2422
- if (Array.isArray(item)) {
2423
- for (const inner of item) {
2424
- out.push(inner);
2425
- }
2426
- } else {
2427
- out.push(item);
2428
- }
2429
- }
2430
- return out;
2431
- };
2432
- var groupByBackend = (effects) => {
2433
- const runs = [];
2434
- let current = [];
2435
- let currentBackend = null;
2436
- for (const eff of effects) {
2437
- const { backend } = eff.definition;
2438
- if (currentBackend === null || backend === currentBackend) {
2439
- current.push(eff);
2440
- currentBackend = backend;
2441
- } else {
2442
- runs.push({ backend: currentBackend, effects: current });
2443
- current = [eff];
2444
- currentBackend = backend;
2445
- }
2446
- }
2447
- if (currentBackend !== null && current.length > 0) {
2448
- runs.push({ backend: currentBackend, effects: current });
2449
- }
2450
- return runs;
2451
- };
2452
-
2453
- class CanvasPool {
2454
- width;
2455
- height;
2456
- pairs = new Map;
2457
- lostContexts = new Set;
2458
- constructor(width, height) {
2459
- this.width = width;
2460
- this.height = height;
2461
- }
2462
- getPair(backend) {
2463
- const existing = this.pairs.get(backend);
2464
- if (existing) {
2465
- return existing;
2466
- }
2467
- const pair = [
2468
- this.allocateCanvas(backend),
2469
- this.allocateCanvas(backend)
2470
- ];
2471
- this.pairs.set(backend, pair);
2472
- return pair;
2473
- }
2474
- assertContextNotLost(canvas) {
2475
- if (this.lostContexts.has(canvas)) {
2476
- throw new Error("WebGL context was lost during canvas effect rendering. " + "This typically happens in headless or memory-constrained environments (e.g. Remotion Lambda). " + "Try reducing concurrency or increasing the Lambda function memory.");
2477
- }
2478
- }
2479
- allocateCanvas(backend) {
2480
- const canvas = document.createElement("canvas");
2481
- canvas.width = this.width;
2482
- canvas.height = this.height;
2483
- switch (backend) {
2484
- case "2d": {
2485
- const ctx = canvas.getContext("2d", {
2486
- colorSpace: "srgb"
2487
- });
2488
- if (!ctx) {
2489
- throw new Error("Failed to acquire 2D context for canvas effect");
2490
- }
2491
- return canvas;
2492
- }
2493
- case "webgl2": {
2494
- const ctx = canvas.getContext("webgl2", {
2495
- premultipliedAlpha: true,
2496
- alpha: true,
2497
- preserveDrawingBuffer: true
2498
- });
2499
- if (!ctx) {
2500
- throw new Error("Failed to acquire WebGL2 context for canvas effect");
2501
- }
2502
- canvas.addEventListener("webglcontextlost", (e) => {
2503
- e.preventDefault();
2504
- this.lostContexts.add(canvas);
2505
- });
2506
- canvas.addEventListener("webglcontextrestored", () => {
2507
- this.lostContexts.delete(canvas);
2508
- });
2509
- ctx.pixelStorei(ctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
2510
- return canvas;
2511
- }
2512
- case "webgpu": {
2513
- if (typeof navigator === "undefined" || !("gpu" in navigator)) {
2514
- throw new Error("WebGPU is not available in this environment for canvas effect");
2515
- }
2516
- return canvas;
2517
- }
2518
- default: {
2519
- const exhaustive = backend;
2520
- throw new Error(`Unknown effect backend: ${exhaustive}`);
2521
- }
2522
- }
2523
- }
2524
- }
2525
- var devicePromise = null;
2526
- var getGpuDevice = () => {
2527
- if (devicePromise) {
2528
- return devicePromise;
2529
- }
2530
- devicePromise = (async () => {
2531
- if (typeof navigator === "undefined" || !("gpu" in navigator)) {
2532
- throw new Error("WebGPU is not available in this environment");
2533
- }
2534
- const { gpu } = navigator;
2535
- const adapter = await gpu.requestAdapter();
2536
- if (!adapter) {
2537
- throw new Error("No WebGPU adapter available");
2538
- }
2539
- return adapter.requestDevice();
2540
- })();
2541
- return devicePromise;
2542
- };
2543
- var createEffectChainState = (width, height) => ({
2544
- pool: new CanvasPool(width, height),
2545
- setupCache: new WeakMap,
2546
- cleanupRegistry: [],
2547
- currentRunId: 0
2548
- });
2549
- var cleanupEffectChainState = (state) => {
2550
- state.currentRunId++;
2551
- for (const entry of state.cleanupRegistry) {
2552
- entry.definition.cleanup(entry.state);
2553
- }
2554
- };
2555
- var ensureSetup = (state, def, target) => {
2556
- const widened = def;
2557
- if (state.setupCache.has(widened)) {
2558
- return state.setupCache.get(widened);
2559
- }
2560
- const setupState = def.setup(target);
2561
- state.setupCache.set(widened, setupState);
2562
- state.cleanupRegistry.push({ definition: widened, state: setupState });
2563
- return setupState;
2564
- };
2565
- var runEffectChain = async ({
2566
- state,
2567
- source,
2568
- effects,
2569
- output,
2570
- frame,
2571
- width,
2572
- height
2573
- }) => {
2574
- const runId = ++state.currentRunId;
2575
- const isCancelled = () => state.currentRunId !== runId;
2576
- const runs = groupByBackend(effects);
2577
- let currentImage = source;
2578
- let lastTarget = null;
2579
- if (runs.length === 0) {
2580
- if (source === output) {
2581
- return true;
2582
- }
2583
- const ctx = output.getContext("2d");
2584
- if (!ctx) {
2585
- throw new Error("Failed to acquire 2D context for output canvas");
2586
- }
2587
- ctx.clearRect(0, 0, width, height);
2588
- ctx.drawImage(currentImage, 0, 0, width, height);
2589
- return true;
2590
- }
2591
- let needsGpuDevice = false;
2592
- for (const run of runs) {
2593
- if (run.backend === "webgpu") {
2594
- needsGpuDevice = true;
2595
- break;
2596
- }
2597
- }
2598
- const gpuDevice = needsGpuDevice ? await getGpuDevice() : null;
2599
- if (isCancelled()) {
2600
- return false;
2601
- }
2602
- for (let runIndex = 0;runIndex < runs.length; runIndex++) {
2603
- const run = runs[runIndex];
2604
- const [a, b] = state.pool.getPair(run.backend);
2605
- let dst = a;
2606
- for (const eff of run.effects) {
2607
- const def = eff.definition;
2608
- const setupState = ensureSetup(state, def, dst);
2609
- def.apply({
2610
- source: currentImage,
2611
- target: dst,
2612
- state: setupState,
2613
- params: eff.params,
2614
- frame,
2615
- width,
2616
- height,
2617
- gpuDevice
2618
- });
2619
- if (run.backend === "webgl2") {
2620
- state.pool.assertContextNotLost(dst);
2621
- }
2622
- currentImage = dst;
2623
- dst = dst === a ? b : a;
2624
- }
2625
- lastTarget = currentImage ?? lastTarget;
2626
- const nextRun = runs[runIndex + 1];
2627
- if (nextRun && nextRun.backend !== run.backend && lastTarget) {
2628
- const bitmap = await createImageBitmap(lastTarget);
2629
- if (isCancelled()) {
2630
- bitmap.close();
2631
- return false;
2632
- }
2633
- currentImage = bitmap;
2634
- }
2635
- }
2636
- if (!lastTarget) {
2637
- return true;
2638
- }
2639
- const outCtx = output.getContext("2d");
2640
- if (!outCtx) {
2641
- throw new Error("Failed to acquire 2D context for output canvas");
2642
- }
2643
- outCtx.clearRect(0, 0, width, height);
2644
- outCtx.drawImage(lastTarget, 0, 0, width, height);
2645
- return true;
2646
- };
2647
- var useEffectChainState = () => {
2648
- const chainStateRef = useRef4(null);
2649
- const sizeRef = useRef4(null);
2650
- useEffect3(() => {
2651
- return () => {
2652
- if (chainStateRef.current) {
2653
- cleanupEffectChainState(chainStateRef.current);
2654
- }
2655
- };
2656
- }, []);
2657
- return useMemo10(() => ({
2658
- get: (width, height) => {
2659
- if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
2660
- if (chainStateRef.current) {
2661
- cleanupEffectChainState(chainStateRef.current);
2662
- }
2663
- chainStateRef.current = createEffectChainState(width, height);
2664
- sizeRef.current = { width, height };
2665
- }
2666
- return chainStateRef.current;
2667
- }
2668
- }), []);
2669
- };
2670
- var useMemoizedEffects = (effects) => {
2671
- const previousRef = useRef5(null);
2672
- const previous = previousRef.current;
2673
- const isSame = previous !== null && previous.length === effects.length && previous.every((p, i) => p.definition === effects[i].definition && p.effectKey === effects[i].effectKey);
2674
- if (isSame) {
2675
- return previous;
2676
- }
2677
- const next = effects.map((e) => ({
2678
- definition: e.definition,
2679
- stack: e.stack,
2680
- effectKey: e.effectKey,
2681
- params: e.params,
2682
- memoized: true
2683
- }));
2684
- previousRef.current = next;
2685
- return next;
2686
- };
2687
- var componentsToAddStacksTo = [];
2688
- var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
2689
- var addSequenceStackTraces = (component) => {
2690
- componentsToAddStacksTo.push(component);
2691
- };
2692
- var VERSION = "4.0.461";
2693
- var checkMultipleRemotionVersions = () => {
2694
- if (typeof globalThis === "undefined") {
2695
- return;
2696
- }
2697
- const set = () => {
2698
- globalThis.remotion_imported = VERSION;
2699
- if (typeof window !== "undefined") {
2700
- window.remotion_imported = VERSION;
2701
- }
2702
- };
2703
- const alreadyImported = globalThis.remotion_imported || typeof window !== "undefined" && window.remotion_imported;
2704
- if (alreadyImported) {
2705
- if (alreadyImported === VERSION) {
2706
- return;
2707
- }
2708
- if (typeof alreadyImported === "string" && alreadyImported.includes("webcodecs")) {
2709
- set();
2710
- return;
2711
- }
2712
- throw new TypeError(`\uD83D\uDEA8 Multiple versions of Remotion detected: ${[
2713
- VERSION,
2714
- typeof alreadyImported === "string" ? alreadyImported : "an older version"
2715
- ].filter(truthy).join(" and ")}. This will cause things to break in an unexpected way.
2716
- Check that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`);
2717
- }
2718
- set();
2719
- };
2720
2493
  var useUnsafeVideoConfig = () => {
2721
2494
  const context = useContext12(SequenceContext);
2722
2495
  const ctxWidth = context?.width ?? null;
2723
2496
  const ctxHeight = context?.height ?? null;
2724
2497
  const ctxDuration = context?.durationInFrames ?? null;
2725
2498
  const video = useVideo();
2726
- return useMemo12(() => {
2499
+ return useMemo10(() => {
2727
2500
  if (!video) {
2728
2501
  return null;
2729
2502
  }
@@ -2797,7 +2570,7 @@ var Freeze = ({
2797
2570
  if (!Number.isFinite(frameToFreeze)) {
2798
2571
  throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${frameToFreeze}.`);
2799
2572
  }
2800
- const isActive = useMemo13(() => {
2573
+ const isActive = useMemo11(() => {
2801
2574
  if (typeof active === "boolean") {
2802
2575
  return active;
2803
2576
  }
@@ -2808,7 +2581,7 @@ var Freeze = ({
2808
2581
  const timelineContext = useTimelineContext();
2809
2582
  const sequenceContext = useContext14(SequenceContext);
2810
2583
  const relativeFrom = sequenceContext?.relativeFrom ?? 0;
2811
- const timelineValue = useMemo13(() => {
2584
+ const timelineValue = useMemo11(() => {
2812
2585
  if (!isActive) {
2813
2586
  return timelineContext;
2814
2587
  }
@@ -2823,7 +2596,7 @@ var Freeze = ({
2823
2596
  }
2824
2597
  };
2825
2598
  }, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);
2826
- const newSequenceContext = useMemo13(() => {
2599
+ const newSequenceContext = useMemo11(() => {
2827
2600
  if (!sequenceContext) {
2828
2601
  return null;
2829
2602
  }
@@ -2835,9 +2608,9 @@ var Freeze = ({
2835
2608
  cumulatedFrom: 0
2836
2609
  };
2837
2610
  }, [sequenceContext, isActive]);
2838
- return /* @__PURE__ */ jsx10(TimelineContext.Provider, {
2611
+ return /* @__PURE__ */ jsx9(TimelineContext.Provider, {
2839
2612
  value: timelineValue,
2840
- children: /* @__PURE__ */ jsx10(SequenceContext.Provider, {
2613
+ children: /* @__PURE__ */ jsx9(SequenceContext.Provider, {
2841
2614
  value: newSequenceContext,
2842
2615
  children
2843
2616
  })
@@ -2846,74 +2619,7 @@ var Freeze = ({
2846
2619
  var PremountContext = createContext14({
2847
2620
  premountFramesRemaining: 0
2848
2621
  });
2849
- var sequenceStyleSchema = {
2850
- "style.translate": {
2851
- type: "translate",
2852
- step: 1,
2853
- default: "0px 0px",
2854
- description: "Offset"
2855
- },
2856
- "style.scale": {
2857
- type: "number",
2858
- min: 0.05,
2859
- max: 100,
2860
- step: 0.01,
2861
- default: 1,
2862
- description: "Scale"
2863
- },
2864
- "style.rotate": {
2865
- type: "rotation",
2866
- step: 1,
2867
- default: "0deg",
2868
- description: "Rotation"
2869
- },
2870
- "style.opacity": {
2871
- type: "number",
2872
- min: 0,
2873
- max: 1,
2874
- step: 0.01,
2875
- default: 1,
2876
- description: "Opacity"
2877
- },
2878
- premountFor: {
2879
- type: "number",
2880
- default: 0,
2881
- description: "Premount For",
2882
- min: 0,
2883
- step: 1
2884
- },
2885
- postmountFor: {
2886
- type: "hidden"
2887
- },
2888
- styleWhilePremounted: {
2889
- type: "hidden"
2890
- },
2891
- styleWhilePostmounted: {
2892
- type: "hidden"
2893
- }
2894
- };
2895
- var sequenceSchema = {
2896
- layout: {
2897
- type: "enum",
2898
- default: "absolute-fill",
2899
- description: "Layout",
2900
- variants: {
2901
- "absolute-fill": sequenceStyleSchema,
2902
- none: {}
2903
- }
2904
- }
2905
- };
2906
- var sequenceSchemaDefaultLayoutNone = {
2907
- ...sequenceSchema,
2908
- layout: {
2909
- ...sequenceSchema.layout,
2910
- default: "none"
2911
- }
2912
- };
2913
- var nodePathToString = (nodePath) => {
2914
- return nodePath.join(".");
2915
- };
2916
- var SequenceManager = React12.createContext({
2622
+ var SequenceManager = React11.createContext({
2917
2623
  registerSequence: () => {
2918
2624
  throw new Error("SequenceManagerContext not initialized");
2919
2625
  },
@@ -2922,62 +2628,57 @@ var SequenceManager = React12.createContext({
2922
2628
  },
2923
2629
  sequences: []
2924
2630
  });
2925
- var SequenceVisibilityToggleContext = React12.createContext({
2926
- hidden: {},
2927
- setHidden: () => {
2928
- throw new Error("SequenceVisibilityToggle not initialized");
2929
- }
2930
- });
2931
- var getCodeValuesCtx = (codeValues, nodePath) => {
2932
- const status = codeValues[nodePathToString(nodePath)];
2933
- if (!status) {
2934
- return;
2935
- }
2936
- if (!status.canUpdate) {
2937
- return;
2938
- }
2939
- return status.props;
2631
+ var makeSequencePropsSubscriptionKey = (key) => {
2632
+ return `${key.nodePath.join(".")}.${key.sequenceKeys.join(".")}.${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
2940
2633
  };
2941
- var VisualModeCodeValuesContext = React12.createContext({
2942
- getCodeValues: () => {
2943
- throw new Error("VisualModeCodeValuesContext not initialized");
2944
- }
2634
+ var VisualModeCodeValuesContext = React11.createContext({
2635
+ codeValues: {}
2945
2636
  });
2946
- var VisualModeDragOverridesContext = React12.createContext({
2637
+ var VisualModeDragOverridesContext = React11.createContext({
2947
2638
  getDragOverrides: () => {
2948
2639
  throw new Error("VisualModeDragOverridesContext not initialized");
2640
+ },
2641
+ getEffectDragOverrides: () => {
2642
+ throw new Error("VisualModeDragOverridesContext not initialized");
2949
2643
  }
2950
2644
  });
2951
- var VisualModeSettersContext = React12.createContext({
2645
+ var VisualModeSettersContext = React11.createContext({
2952
2646
  setDragOverrides: () => {
2953
2647
  throw new Error("VisualModeSettersContext not initialized");
2954
2648
  },
2955
2649
  clearDragOverrides: () => {
2956
2650
  throw new Error("VisualModeSettersContext not initialized");
2957
2651
  },
2652
+ setEffectDragOverrides: () => {
2653
+ throw new Error("VisualModeSettersContext not initialized");
2654
+ },
2655
+ clearEffectDragOverrides: () => {
2656
+ throw new Error("VisualModeSettersContext not initialized");
2657
+ },
2958
2658
  setCodeValues: () => {
2959
2659
  throw new Error("VisualModeSettersContext not initialized");
2960
2660
  }
2961
2661
  });
2662
+ var effectDragOverridesKey = (nodePath, effectIndex) => `${makeSequencePropsSubscriptionKey(nodePath)}.effects.${effectIndex}`;
2962
2663
  var SequenceManagerProvider = ({ children }) => {
2963
- const [sequences, setSequences] = useState4([]);
2964
- const [hidden, setHidden] = useState4({});
2965
- const [dragOverrides, setControlOverrides] = useState4({});
2966
- const controlOverridesRef = useRef6(dragOverrides);
2664
+ const [sequences, setSequences] = useState3([]);
2665
+ const [dragOverrides, setControlOverrides] = useState3({});
2666
+ const controlOverridesRef = useRef4(dragOverrides);
2967
2667
  controlOverridesRef.current = dragOverrides;
2968
- const [codeValues, setCodeValuesMapState] = useState4({});
2668
+ const [effectDragOverridesState, setEffectDragOverridesState] = useState3({});
2669
+ const [codeValues, setCodeValuesMapState] = useState3({});
2969
2670
  const setDragOverrides = useCallback5((nodePath, key, value) => {
2970
2671
  setControlOverrides((prev) => ({
2971
2672
  ...prev,
2972
- [nodePathToString(nodePath)]: {
2973
- ...prev[nodePathToString(nodePath)],
2673
+ [makeSequencePropsSubscriptionKey(nodePath)]: {
2674
+ ...prev[makeSequencePropsSubscriptionKey(nodePath)],
2974
2675
  [key]: value
2975
2676
  }
2976
2677
  }));
2977
2678
  }, []);
2978
2679
  const clearDragOverrides = useCallback5((nodePath) => {
2979
2680
  setControlOverrides((prev) => {
2980
- const key = nodePathToString(nodePath);
2681
+ const key = makeSequencePropsSubscriptionKey(nodePath);
2981
2682
  if (!prev[key]) {
2982
2683
  return prev;
2983
2684
  }
@@ -2986,9 +2687,32 @@ var SequenceManagerProvider = ({ children }) => {
2986
2687
  return next;
2987
2688
  });
2988
2689
  }, []);
2690
+ const setEffectDragOverrides = useCallback5((nodePath, effectIndex, key, value) => {
2691
+ setEffectDragOverridesState((prev) => {
2692
+ const mapKey = effectDragOverridesKey(nodePath, effectIndex);
2693
+ return {
2694
+ ...prev,
2695
+ [mapKey]: {
2696
+ ...prev[mapKey],
2697
+ [key]: value
2698
+ }
2699
+ };
2700
+ });
2701
+ }, []);
2702
+ const clearEffectDragOverrides = useCallback5((nodePath, effectIndex) => {
2703
+ setEffectDragOverridesState((prev) => {
2704
+ const mapKey = effectDragOverridesKey(nodePath, effectIndex);
2705
+ if (!prev[mapKey]) {
2706
+ return prev;
2707
+ }
2708
+ const next = { ...prev };
2709
+ delete next[mapKey];
2710
+ return next;
2711
+ });
2712
+ }, []);
2989
2713
  const setCodeValues = useCallback5((nodePath, values) => {
2990
2714
  setCodeValuesMapState((prev) => {
2991
- const key = nodePathToString(nodePath);
2715
+ const key = makeSequencePropsSubscriptionKey(nodePath);
2992
2716
  const prevKey = prev[key];
2993
2717
  const newKey = values(prevKey);
2994
2718
  if (prevKey === newKey) {
@@ -3005,54 +2729,54 @@ var SequenceManagerProvider = ({ children }) => {
3005
2729
  const unregisterSequence = useCallback5((seq) => {
3006
2730
  setSequences((seqs) => seqs.filter((s) => s.id !== seq));
3007
2731
  }, []);
3008
- const sequenceContext = useMemo14(() => {
2732
+ const sequenceContext = useMemo12(() => {
3009
2733
  return {
3010
2734
  registerSequence,
3011
2735
  sequences,
3012
2736
  unregisterSequence
3013
2737
  };
3014
2738
  }, [registerSequence, sequences, unregisterSequence]);
3015
- const hiddenContext = useMemo14(() => {
3016
- return {
3017
- hidden,
3018
- setHidden
3019
- };
3020
- }, [hidden]);
3021
2739
  const getDragOverrides = useCallback5((nodePath) => {
3022
- return dragOverrides[nodePathToString(nodePath)] ?? {};
2740
+ return dragOverrides[makeSequencePropsSubscriptionKey(nodePath)] ?? {};
3023
2741
  }, [dragOverrides]);
3024
- const getCodeValues = useCallback5((nodePath) => {
3025
- return getCodeValuesCtx(codeValues, nodePath);
3026
- }, [codeValues]);
3027
- const codeValuesContext = useMemo14(() => {
2742
+ const getEffectDragOverrides = useCallback5((nodePath, effectIndex) => {
2743
+ return effectDragOverridesState[effectDragOverridesKey(nodePath, effectIndex)] ?? {};
2744
+ }, [effectDragOverridesState]);
2745
+ const codeValuesContext = useMemo12(() => {
3028
2746
  return {
3029
- getCodeValues
2747
+ codeValues
3030
2748
  };
3031
- }, [getCodeValues]);
3032
- const dragOverridesContext = useMemo14(() => {
2749
+ }, [codeValues]);
2750
+ const dragOverridesContext = useMemo12(() => {
3033
2751
  return {
3034
- getDragOverrides
2752
+ getDragOverrides,
2753
+ getEffectDragOverrides
3035
2754
  };
3036
- }, [getDragOverrides]);
3037
- const settersContext = useMemo14(() => {
2755
+ }, [getDragOverrides, getEffectDragOverrides]);
2756
+ const settersContext = useMemo12(() => {
3038
2757
  return {
3039
2758
  setDragOverrides,
3040
2759
  clearDragOverrides,
2760
+ setEffectDragOverrides,
2761
+ clearEffectDragOverrides,
3041
2762
  setCodeValues
3042
2763
  };
3043
- }, [setDragOverrides, clearDragOverrides, setCodeValues]);
3044
- return /* @__PURE__ */ jsx11(SequenceManager.Provider, {
2764
+ }, [
2765
+ setDragOverrides,
2766
+ clearDragOverrides,
2767
+ setEffectDragOverrides,
2768
+ clearEffectDragOverrides,
2769
+ setCodeValues
2770
+ ]);
2771
+ return /* @__PURE__ */ jsx10(SequenceManager.Provider, {
3045
2772
  value: sequenceContext,
3046
- children: /* @__PURE__ */ jsx11(SequenceVisibilityToggleContext.Provider, {
3047
- value: hiddenContext,
3048
- children: /* @__PURE__ */ jsx11(VisualModeCodeValuesContext.Provider, {
3049
- value: codeValuesContext,
3050
- children: /* @__PURE__ */ jsx11(VisualModeDragOverridesContext.Provider, {
3051
- value: dragOverridesContext,
3052
- children: /* @__PURE__ */ jsx11(VisualModeSettersContext.Provider, {
3053
- value: settersContext,
3054
- children
3055
- })
2773
+ children: /* @__PURE__ */ jsx10(VisualModeCodeValuesContext.Provider, {
2774
+ value: codeValuesContext,
2775
+ children: /* @__PURE__ */ jsx10(VisualModeDragOverridesContext.Provider, {
2776
+ value: dragOverridesContext,
2777
+ children: /* @__PURE__ */ jsx10(VisualModeSettersContext.Provider, {
2778
+ value: settersContext,
2779
+ children
3056
2780
  })
3057
2781
  })
3058
2782
  })
@@ -3090,6 +2814,144 @@ var deleteNestedKey = (obj, keysToRemove) => {
3090
2814
  }
3091
2815
  return obj;
3092
2816
  };
2817
+ var OverrideIdsToNodePathsGettersContext = createContext15({
2818
+ overrideIdToNodePathMappings: {}
2819
+ });
2820
+ var OverrideIdsToNodePathsSettersContext = createContext15({
2821
+ setOverrideIdToNodePath: () => {
2822
+ throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
2823
+ }
2824
+ });
2825
+ var mergeOverrides = ({
2826
+ descriptor,
2827
+ codeOverrides,
2828
+ dragOverrides
2829
+ }) => {
2830
+ if (!codeOverrides && !dragOverrides) {
2831
+ return { params: descriptor.params, effectKey: descriptor.effectKey };
2832
+ }
2833
+ const merged = {
2834
+ ...descriptor.params
2835
+ };
2836
+ if (codeOverrides) {
2837
+ for (const [key, value] of Object.entries(codeOverrides)) {
2838
+ if (value !== undefined) {
2839
+ merged[key] = value;
2840
+ }
2841
+ }
2842
+ }
2843
+ if (dragOverrides) {
2844
+ for (const [key, value] of Object.entries(dragOverrides)) {
2845
+ merged[key] = value;
2846
+ }
2847
+ }
2848
+ return {
2849
+ params: merged,
2850
+ effectKey: descriptor.definition.calculateKey(merged)
2851
+ };
2852
+ };
2853
+ var extractCodeOverrides = (propStatus) => {
2854
+ if (!propStatus) {
2855
+ return null;
2856
+ }
2857
+ const out = {};
2858
+ let hasAny = false;
2859
+ for (const [key, status] of Object.entries(propStatus)) {
2860
+ if (status.canUpdate) {
2861
+ out[key] = status.codeValue;
2862
+ hasAny = true;
2863
+ }
2864
+ }
2865
+ return hasAny ? out : null;
2866
+ };
2867
+ var useMemoizedEffectDefinitions = (effects) => {
2868
+ const previousRef = useRef5(null);
2869
+ const definitions = effects.map((descriptor) => descriptor.definition);
2870
+ const previous = previousRef.current;
2871
+ const isSame = previous !== null && previous.length === definitions.length && previous.every((def, i) => def === definitions[i]);
2872
+ if (isSame) {
2873
+ return previous;
2874
+ }
2875
+ previousRef.current = definitions;
2876
+ return definitions;
2877
+ };
2878
+ var getEffectCodeValuesCtx = ({
2879
+ codeValues,
2880
+ nodePath,
2881
+ effectIndex
2882
+ }) => {
2883
+ const status = codeValues[makeSequencePropsSubscriptionKey(nodePath)];
2884
+ if (!status) {
2885
+ return { type: "cannot-update-sequence", reason: "not-found" };
2886
+ }
2887
+ if (!status.canUpdate) {
2888
+ return { type: "cannot-update-sequence", reason: status.reason };
2889
+ }
2890
+ const effect = status.effects.find((e) => e.effectIndex === effectIndex);
2891
+ if (!effect) {
2892
+ return { type: "cannot-update-effect", reason: "not-found" };
2893
+ }
2894
+ if (!effect.canUpdate) {
2895
+ return { type: "cannot-update-effect", reason: effect.reason };
2896
+ }
2897
+ return { type: "can-update-effect", props: effect.props };
2898
+ };
2899
+ var getCodeValuesCtx = (codeValues, nodePath) => {
2900
+ const status = codeValues[makeSequencePropsSubscriptionKey(nodePath)];
2901
+ if (!status) {
2902
+ return;
2903
+ }
2904
+ if (!status.canUpdate) {
2905
+ return;
2906
+ }
2907
+ return status.props;
2908
+ };
2909
+ var useMemoizedEffects = ({
2910
+ effects,
2911
+ overrideId
2912
+ }) => {
2913
+ const previousRef = useRef5(null);
2914
+ const { codeValues } = useContext15(VisualModeCodeValuesContext);
2915
+ const { getEffectDragOverrides } = useContext15(VisualModeDragOverridesContext);
2916
+ const { overrideIdToNodePathMappings } = useContext15(OverrideIdsToNodePathsGettersContext);
2917
+ const previous = previousRef.current;
2918
+ const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
2919
+ const resolved = effects.map((descriptor, index) => {
2920
+ if (nodePath === null) {
2921
+ return {
2922
+ descriptor,
2923
+ params: descriptor.params,
2924
+ effectKey: descriptor.effectKey
2925
+ };
2926
+ }
2927
+ const effectStatus = getEffectCodeValuesCtx({
2928
+ codeValues,
2929
+ nodePath,
2930
+ effectIndex: index
2931
+ });
2932
+ const codeOverrides = effectStatus.type === "can-update-effect" ? extractCodeOverrides(effectStatus.props) : null;
2933
+ const dragOverridesMap = getEffectDragOverrides(nodePath, index);
2934
+ const dragOverrides = Object.keys(dragOverridesMap).length === 0 ? null : dragOverridesMap;
2935
+ const { params, effectKey } = mergeOverrides({
2936
+ descriptor,
2937
+ codeOverrides,
2938
+ dragOverrides
2939
+ });
2940
+ return { descriptor, params, effectKey };
2941
+ });
2942
+ const isSame = previous !== null && previous.length === resolved.length && previous.every((p, i) => p.definition === resolved[i].descriptor.definition && p.effectKey === resolved[i].effectKey);
2943
+ if (isSame) {
2944
+ return previous;
2945
+ }
2946
+ const next = resolved.map(({ descriptor, params, effectKey }) => ({
2947
+ definition: descriptor.definition,
2948
+ effectKey,
2949
+ params,
2950
+ memoized: true
2951
+ }));
2952
+ previousRef.current = next;
2953
+ return next;
2954
+ };
3093
2955
  var flattenActiveSchema = (schema, resolve) => {
3094
2956
  const out = {};
3095
2957
  for (const key of Object.keys(schema)) {
@@ -3131,14 +2993,6 @@ var getFlatSchemaWithAllKeys = (schema) => {
3131
2993
  }
3132
2994
  return out;
3133
2995
  };
3134
- var OverrideIdsToNodePathsGettersContext = createContext15({
3135
- overrideIdToNodePathMappings: {}
3136
- });
3137
- var OverrideIdsToNodePathsSettersContext = createContext15({
3138
- setOverrideIdToNodePath: () => {
3139
- throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
3140
- }
3141
- });
3142
2996
  var findPropsToDelete = ({
3143
2997
  schema,
3144
2998
  key,
@@ -3171,7 +3025,6 @@ var findPropsToDelete = ({
3171
3025
  };
3172
3026
  var getEffectiveVisualModeValue = ({
3173
3027
  codeValue,
3174
- runtimeValue,
3175
3028
  dragOverrideValue,
3176
3029
  defaultValue,
3177
3030
  shouldResortToDefaultValueIfUndefined = false
@@ -3179,12 +3032,6 @@ var getEffectiveVisualModeValue = ({
3179
3032
  if (dragOverrideValue !== undefined) {
3180
3033
  return dragOverrideValue;
3181
3034
  }
3182
- if (!codeValue) {
3183
- return runtimeValue;
3184
- }
3185
- if (!codeValue.canUpdate) {
3186
- return runtimeValue;
3187
- }
3188
3035
  if (codeValue.codeValue === undefined && shouldResortToDefaultValueIfUndefined) {
3189
3036
  return defaultValue;
3190
3037
  }
@@ -3221,9 +3068,8 @@ var computeEffectiveSchemaValuesDotNotation = ({
3221
3068
  if (field?.type === "hidden") {
3222
3069
  continue;
3223
3070
  }
3224
- const value = getEffectiveVisualModeValue({
3071
+ const value = codeValueStatus === null || codeValueStatus.canUpdate === false ? currentValue[key] : getEffectiveVisualModeValue({
3225
3072
  codeValue: codeValueStatus,
3226
- runtimeValue: currentValue[key],
3227
3073
  dragOverrideValue: overrideValues[key],
3228
3074
  defaultValue: field?.default,
3229
3075
  shouldResortToDefaultValueIfUndefined: false
@@ -3303,22 +3149,22 @@ var wrapInSchema = (Component, schema) => {
3303
3149
  const Wrapped = forwardRef2((props, ref) => {
3304
3150
  const env = useRemotionEnvironment();
3305
3151
  if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
3306
- return React13.createElement(Component, {
3152
+ return React12.createElement(Component, {
3307
3153
  ...props,
3308
3154
  _experimentalControls: null,
3309
3155
  ref
3310
3156
  });
3311
3157
  }
3312
- const { getCodeValues } = useContext15(VisualModeCodeValuesContext);
3313
- const { getDragOverrides } = useContext15(VisualModeDragOverridesContext);
3314
- const nodePathMapping = useContext15(OverrideIdsToNodePathsGettersContext);
3158
+ const { codeValues } = useContext16(VisualModeCodeValuesContext);
3159
+ const { getDragOverrides } = useContext16(VisualModeDragOverridesContext);
3160
+ const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
3315
3161
  if (props._experimentalControls) {
3316
- return React13.createElement(Component, {
3162
+ return React12.createElement(Component, {
3317
3163
  ...props,
3318
3164
  ref
3319
3165
  });
3320
3166
  }
3321
- const [overrideId] = useState5(() => {
3167
+ const [overrideId] = useState4(() => {
3322
3168
  const { stack } = props;
3323
3169
  if (!stack) {
3324
3170
  return String(Math.random());
@@ -3333,26 +3179,26 @@ var wrapInSchema = (Component, schema) => {
3333
3179
  });
3334
3180
  const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
3335
3181
  const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
3336
- const currentRuntimeValueDotNotation = useMemo15(() => readValuesFromProps(props, flatKeys), runtimeValues);
3337
- const controls = useMemo15(() => {
3182
+ const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
3183
+ const controls = useMemo13(() => {
3338
3184
  return {
3339
3185
  schema,
3340
3186
  currentRuntimeValueDotNotation,
3341
3187
  overrideId
3342
3188
  };
3343
3189
  }, [currentRuntimeValueDotNotation, overrideId]);
3344
- const { merged: valuesDotNotation, propsToDelete } = useMemo15(() => {
3190
+ const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
3345
3191
  return computeEffectiveSchemaValuesDotNotation({
3346
3192
  schema,
3347
3193
  currentValue: currentRuntimeValueDotNotation,
3348
3194
  overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
3349
- propStatus: nodePath === null ? undefined : getCodeValues(nodePath)
3195
+ propStatus: nodePath === null ? undefined : getCodeValuesCtx(codeValues, nodePath)
3350
3196
  });
3351
3197
  }, [
3352
3198
  currentRuntimeValueDotNotation,
3353
3199
  getDragOverrides,
3354
3200
  nodePath,
3355
- getCodeValues
3201
+ codeValues
3356
3202
  ]);
3357
3203
  const activeKeys = selectActiveKeys(schema, valuesDotNotation);
3358
3204
  const mergedProps = mergeValues({
@@ -3361,7 +3207,7 @@ var wrapInSchema = (Component, schema) => {
3361
3207
  schemaKeys: activeKeys,
3362
3208
  propsToDelete
3363
3209
  });
3364
- return React13.createElement(Component, {
3210
+ return React12.createElement(Component, {
3365
3211
  ...mergedProps,
3366
3212
  _experimentalControls: controls,
3367
3213
  ref
@@ -3378,6 +3224,7 @@ var RegularSequenceRefForwardingFunction = ({
3378
3224
  height,
3379
3225
  width,
3380
3226
  showInTimeline = true,
3227
+ hidden = false,
3381
3228
  _experimentalControls: controls,
3382
3229
  _experimentalEffects,
3383
3230
  _remotionInternalLoopDisplay: loopDisplay,
@@ -3388,8 +3235,8 @@ var RegularSequenceRefForwardingFunction = ({
3388
3235
  ...other
3389
3236
  }, ref) => {
3390
3237
  const { layout = "absolute-fill" } = other;
3391
- const [id] = useState6(() => String(Math.random()));
3392
- const parentSequence = useContext16(SequenceContext);
3238
+ const [id] = useState5(() => String(Math.random()));
3239
+ const parentSequence = useContext17(SequenceContext);
3393
3240
  const { rootId } = useTimelineContext();
3394
3241
  const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
3395
3242
  const nonce = useNonce();
@@ -3415,15 +3262,14 @@ var RegularSequenceRefForwardingFunction = ({
3415
3262
  const videoConfig = useVideoConfig();
3416
3263
  const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
3417
3264
  const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
3418
- const { registerSequence, unregisterSequence } = useContext16(SequenceManager);
3419
- const { hidden } = useContext16(SequenceVisibilityToggleContext);
3420
- const premounting = useMemo16(() => {
3265
+ const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
3266
+ const premounting = useMemo14(() => {
3421
3267
  return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
3422
3268
  }, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
3423
- const postmounting = useMemo16(() => {
3269
+ const postmounting = useMemo14(() => {
3424
3270
  return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
3425
3271
  }, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
3426
- const contextValue = useMemo16(() => {
3272
+ const contextValue = useMemo14(() => {
3427
3273
  return {
3428
3274
  cumulatedFrom,
3429
3275
  relativeFrom: from,
@@ -3450,12 +3296,13 @@ var RegularSequenceRefForwardingFunction = ({
3450
3296
  premountDisplay,
3451
3297
  postmountDisplay
3452
3298
  ]);
3453
- const timelineClipName = useMemo16(() => {
3299
+ const timelineClipName = useMemo14(() => {
3454
3300
  return name ?? "";
3455
3301
  }, [name]);
3456
3302
  const env = useRemotionEnvironment();
3457
3303
  const inheritedStack = other?.stack ?? null;
3458
- useEffect5(() => {
3304
+ const [stackDoesntChange] = useState5(() => stack ?? inheritedStack);
3305
+ useEffect3(() => {
3459
3306
  if (!env.isStudio) {
3460
3307
  return;
3461
3308
  }
@@ -3478,7 +3325,7 @@ var RegularSequenceRefForwardingFunction = ({
3478
3325
  rootId,
3479
3326
  showInTimeline,
3480
3327
  src: isMedia.data.src,
3481
- stack: stack ?? inheritedStack,
3328
+ stack: stackDoesntChange,
3482
3329
  startMediaFrom: isMedia.data.startMediaFrom,
3483
3330
  volume: isMedia.data.volumes
3484
3331
  });
@@ -3497,7 +3344,7 @@ var RegularSequenceRefForwardingFunction = ({
3497
3344
  showInTimeline,
3498
3345
  nonce: nonce.get(),
3499
3346
  loopDisplay,
3500
- stack: stack ?? inheritedStack,
3347
+ stack: stackDoesntChange,
3501
3348
  premountDisplay: premountDisplay ?? null,
3502
3349
  postmountDisplay: postmountDisplay ?? null,
3503
3350
  controls: controls ?? null,
@@ -3520,11 +3367,10 @@ var RegularSequenceRefForwardingFunction = ({
3520
3367
  showInTimeline,
3521
3368
  nonce,
3522
3369
  loopDisplay,
3523
- stack,
3370
+ stackDoesntChange,
3524
3371
  premountDisplay,
3525
3372
  postmountDisplay,
3526
3373
  env.isStudio,
3527
- inheritedStack,
3528
3374
  controls,
3529
3375
  _experimentalEffects,
3530
3376
  isMedia
@@ -3532,7 +3378,7 @@ var RegularSequenceRefForwardingFunction = ({
3532
3378
  const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
3533
3379
  const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
3534
3380
  const styleIfThere = other.layout === "none" ? undefined : other.style;
3535
- const defaultStyle = useMemo16(() => {
3381
+ const defaultStyle = useMemo14(() => {
3536
3382
  return {
3537
3383
  flexDirection: undefined,
3538
3384
  ...width ? { width } : {},
@@ -3543,13 +3389,12 @@ var RegularSequenceRefForwardingFunction = ({
3543
3389
  if (ref !== null && layout === "none") {
3544
3390
  throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');
3545
3391
  }
3546
- const isSequenceHidden = hidden[id] ?? false;
3547
- if (isSequenceHidden) {
3392
+ if (hidden) {
3548
3393
  return null;
3549
3394
  }
3550
- return /* @__PURE__ */ jsx12(SequenceContext.Provider, {
3395
+ return /* @__PURE__ */ jsx11(SequenceContext.Provider, {
3551
3396
  value: contextValue,
3552
- children: content === null ? null : other.layout === "none" ? content : /* @__PURE__ */ jsx12(AbsoluteFill, {
3397
+ children: content === null ? null : other.layout === "none" ? content : /* @__PURE__ */ jsx11(AbsoluteFill, {
3553
3398
  ref,
3554
3399
  style: defaultStyle,
3555
3400
  className: other.className,
@@ -3559,7 +3404,7 @@ var RegularSequenceRefForwardingFunction = ({
3559
3404
  };
3560
3405
  var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
3561
3406
  var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
3562
- const parentPremountContext = useContext16(PremountContext);
3407
+ const parentPremountContext = useContext17(PremountContext);
3563
3408
  const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
3564
3409
  if (props.layout === "none") {
3565
3410
  throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
@@ -3579,7 +3424,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
3579
3424
  const postmountingActive = frame > endThreshold && frame <= endThreshold + postmountFor;
3580
3425
  const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
3581
3426
  const isFreezingActive = premountingActive || postmountingActive;
3582
- const style = useMemo16(() => {
3427
+ const style = useMemo14(() => {
3583
3428
  return {
3584
3429
  ...passedStyle,
3585
3430
  opacity: premountingActive || postmountingActive ? 0 : 1,
@@ -3594,10 +3439,10 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
3594
3439
  styleWhilePremounted,
3595
3440
  styleWhilePostmounted
3596
3441
  ]);
3597
- return /* @__PURE__ */ jsx12(Freeze, {
3442
+ return /* @__PURE__ */ jsx11(Freeze, {
3598
3443
  frame: freezeFrame,
3599
3444
  active: isFreezingActive,
3600
- children: /* @__PURE__ */ jsx12(SequenceInner, {
3445
+ children: /* @__PURE__ */ jsx11(SequenceInner, {
3601
3446
  ref,
3602
3447
  from,
3603
3448
  durationInFrames,
@@ -3617,20 +3462,437 @@ var SequenceRefForwardingFunction = (props, ref) => {
3617
3462
  if (props.layout !== "none" && !env.isRendering) {
3618
3463
  const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? props.premountFor ?? fps : props.premountFor;
3619
3464
  if (effectivePremountFor || props.postmountFor) {
3620
- return /* @__PURE__ */ jsx12(PremountedPostmountedSequence, {
3465
+ return /* @__PURE__ */ jsx11(PremountedPostmountedSequence, {
3621
3466
  ref,
3622
3467
  ...props,
3623
3468
  premountFor: effectivePremountFor
3624
3469
  });
3625
3470
  }
3626
3471
  }
3627
- return /* @__PURE__ */ jsx12(RegularSequence, {
3472
+ return /* @__PURE__ */ jsx11(RegularSequence, {
3628
3473
  ...props,
3629
3474
  ref
3630
3475
  });
3631
3476
  };
3632
3477
  var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
3633
3478
  var Sequence = wrapInSchema(SequenceInner, sequenceSchema);
3479
+
3480
+ class CanvasPool {
3481
+ width;
3482
+ height;
3483
+ pairs = new Map;
3484
+ lostContexts = new Set;
3485
+ constructor(width, height) {
3486
+ this.width = width;
3487
+ this.height = height;
3488
+ }
3489
+ getPair(backend) {
3490
+ const existing = this.pairs.get(backend);
3491
+ if (existing) {
3492
+ return existing;
3493
+ }
3494
+ const pair = [
3495
+ this.allocateCanvas(backend),
3496
+ this.allocateCanvas(backend)
3497
+ ];
3498
+ this.pairs.set(backend, pair);
3499
+ return pair;
3500
+ }
3501
+ assertContextNotLost(canvas) {
3502
+ if (this.lostContexts.has(canvas)) {
3503
+ throw new Error("WebGL context was lost during canvas effect rendering. " + "This typically happens in headless or memory-constrained environments (e.g. Remotion Lambda). " + "Try reducing concurrency or increasing the Lambda function memory.");
3504
+ }
3505
+ }
3506
+ allocateCanvas(backend) {
3507
+ const canvas = document.createElement("canvas");
3508
+ canvas.width = this.width;
3509
+ canvas.height = this.height;
3510
+ switch (backend) {
3511
+ case "2d": {
3512
+ const ctx = canvas.getContext("2d", {
3513
+ colorSpace: "srgb"
3514
+ });
3515
+ if (!ctx) {
3516
+ throw new Error("Failed to acquire 2D context for canvas effect");
3517
+ }
3518
+ return canvas;
3519
+ }
3520
+ case "webgl2": {
3521
+ const ctx = canvas.getContext("webgl2", {
3522
+ premultipliedAlpha: true,
3523
+ alpha: true,
3524
+ preserveDrawingBuffer: true
3525
+ });
3526
+ if (!ctx) {
3527
+ throw new Error("Failed to acquire WebGL2 context for canvas effect");
3528
+ }
3529
+ canvas.addEventListener("webglcontextlost", (e) => {
3530
+ e.preventDefault();
3531
+ this.lostContexts.add(canvas);
3532
+ });
3533
+ canvas.addEventListener("webglcontextrestored", () => {
3534
+ this.lostContexts.delete(canvas);
3535
+ });
3536
+ ctx.pixelStorei(ctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
3537
+ return canvas;
3538
+ }
3539
+ case "webgpu": {
3540
+ if (typeof navigator === "undefined" || !("gpu" in navigator)) {
3541
+ throw new Error("WebGPU is not available in this environment for canvas effect");
3542
+ }
3543
+ return canvas;
3544
+ }
3545
+ default: {
3546
+ const exhaustive = backend;
3547
+ throw new Error(`Unknown effect backend: ${exhaustive}`);
3548
+ }
3549
+ }
3550
+ }
3551
+ }
3552
+ var groupByBackend = (effects) => {
3553
+ const runs = [];
3554
+ let current = [];
3555
+ let currentBackend = null;
3556
+ for (const eff of effects) {
3557
+ const { backend } = eff.definition;
3558
+ if (currentBackend === null || backend === currentBackend) {
3559
+ current.push(eff);
3560
+ currentBackend = backend;
3561
+ } else {
3562
+ runs.push({ backend: currentBackend, effects: current });
3563
+ current = [eff];
3564
+ currentBackend = backend;
3565
+ }
3566
+ }
3567
+ if (currentBackend !== null && current.length > 0) {
3568
+ runs.push({ backend: currentBackend, effects: current });
3569
+ }
3570
+ return runs;
3571
+ };
3572
+ var devicePromise = null;
3573
+ var getGpuDevice = () => {
3574
+ if (devicePromise) {
3575
+ return devicePromise;
3576
+ }
3577
+ devicePromise = (async () => {
3578
+ if (typeof navigator === "undefined" || !("gpu" in navigator)) {
3579
+ throw new Error("WebGPU is not available in this environment");
3580
+ }
3581
+ const { gpu } = navigator;
3582
+ const adapter = await gpu.requestAdapter();
3583
+ if (!adapter) {
3584
+ throw new Error("No WebGPU adapter available");
3585
+ }
3586
+ return adapter.requestDevice();
3587
+ })();
3588
+ return devicePromise;
3589
+ };
3590
+ var createEffectChainState = (width, height) => ({
3591
+ pool: new CanvasPool(width, height),
3592
+ setupCache: new WeakMap,
3593
+ cleanupRegistry: [],
3594
+ currentRunId: 0
3595
+ });
3596
+ var cleanupEffectChainState = (state) => {
3597
+ state.currentRunId++;
3598
+ for (const entry of state.cleanupRegistry) {
3599
+ entry.definition.cleanup(entry.state);
3600
+ }
3601
+ };
3602
+ var ensureSetup = (state, def, target) => {
3603
+ const widened = def;
3604
+ if (state.setupCache.has(widened)) {
3605
+ return state.setupCache.get(widened);
3606
+ }
3607
+ const setupState = def.setup(target);
3608
+ state.setupCache.set(widened, setupState);
3609
+ state.cleanupRegistry.push({ definition: widened, state: setupState });
3610
+ return setupState;
3611
+ };
3612
+ var runEffectChain = async ({
3613
+ state,
3614
+ source,
3615
+ effects,
3616
+ output,
3617
+ width,
3618
+ height
3619
+ }) => {
3620
+ const runId = ++state.currentRunId;
3621
+ const isCancelled = () => state.currentRunId !== runId;
3622
+ const enabledEffects = effects.filter((e) => !e.params.disabled);
3623
+ const runs = groupByBackend(enabledEffects);
3624
+ let currentImage = source;
3625
+ let lastTarget = null;
3626
+ if (runs.length === 0) {
3627
+ if (source === output) {
3628
+ return true;
3629
+ }
3630
+ const ctx = output.getContext("2d");
3631
+ if (!ctx) {
3632
+ throw new Error("Failed to acquire 2D context for output canvas");
3633
+ }
3634
+ ctx.clearRect(0, 0, width, height);
3635
+ ctx.drawImage(currentImage, 0, 0, width, height);
3636
+ return true;
3637
+ }
3638
+ let needsGpuDevice = false;
3639
+ for (const run of runs) {
3640
+ if (run.backend === "webgpu") {
3641
+ needsGpuDevice = true;
3642
+ break;
3643
+ }
3644
+ }
3645
+ const gpuDevice = needsGpuDevice ? await getGpuDevice() : null;
3646
+ if (isCancelled()) {
3647
+ return false;
3648
+ }
3649
+ for (let runIndex = 0;runIndex < runs.length; runIndex++) {
3650
+ const run = runs[runIndex];
3651
+ const [a, b] = state.pool.getPair(run.backend);
3652
+ let dst = a;
3653
+ for (const eff of run.effects) {
3654
+ const def = eff.definition;
3655
+ const setupState = ensureSetup(state, def, dst);
3656
+ def.apply({
3657
+ source: currentImage,
3658
+ target: dst,
3659
+ state: setupState,
3660
+ params: eff.params,
3661
+ width,
3662
+ height,
3663
+ gpuDevice
3664
+ });
3665
+ if (run.backend === "webgl2") {
3666
+ state.pool.assertContextNotLost(dst);
3667
+ }
3668
+ currentImage = dst;
3669
+ dst = dst === a ? b : a;
3670
+ }
3671
+ lastTarget = currentImage ?? lastTarget;
3672
+ const nextRun = runs[runIndex + 1];
3673
+ if (nextRun && nextRun.backend !== run.backend && lastTarget) {
3674
+ const bitmap = await createImageBitmap(lastTarget);
3675
+ if (isCancelled()) {
3676
+ bitmap.close();
3677
+ return false;
3678
+ }
3679
+ currentImage = bitmap;
3680
+ }
3681
+ }
3682
+ if (!lastTarget) {
3683
+ return true;
3684
+ }
3685
+ const outCtx = output.getContext("2d");
3686
+ if (!outCtx) {
3687
+ throw new Error("Failed to acquire 2D context for output canvas");
3688
+ }
3689
+ outCtx.clearRect(0, 0, width, height);
3690
+ outCtx.drawImage(lastTarget, 0, 0, width, height);
3691
+ return true;
3692
+ };
3693
+ var useEffectChainState = () => {
3694
+ const chainStateRef = useRef6(null);
3695
+ const sizeRef = useRef6(null);
3696
+ useEffect4(() => {
3697
+ return () => {
3698
+ if (chainStateRef.current) {
3699
+ cleanupEffectChainState(chainStateRef.current);
3700
+ }
3701
+ };
3702
+ }, []);
3703
+ return useMemo15(() => ({
3704
+ get: (width, height) => {
3705
+ if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
3706
+ if (chainStateRef.current) {
3707
+ cleanupEffectChainState(chainStateRef.current);
3708
+ }
3709
+ chainStateRef.current = createEffectChainState(width, height);
3710
+ sizeRef.current = { width, height };
3711
+ }
3712
+ return chainStateRef.current;
3713
+ }
3714
+ }), []);
3715
+ };
3716
+ var solidSchema = {
3717
+ color: {
3718
+ type: "color",
3719
+ default: "#ffffff",
3720
+ description: "Color"
3721
+ },
3722
+ width: {
3723
+ type: "number",
3724
+ min: 1,
3725
+ step: 1,
3726
+ default: 1920,
3727
+ description: "Width"
3728
+ },
3729
+ height: {
3730
+ type: "number",
3731
+ min: 1,
3732
+ step: 1,
3733
+ default: 1080,
3734
+ description: "Height"
3735
+ },
3736
+ ...sequenceStyleSchema
3737
+ };
3738
+ var SolidInner = ({
3739
+ color,
3740
+ width,
3741
+ height,
3742
+ _experimentalEffects: experimentalEffects = [],
3743
+ className,
3744
+ style,
3745
+ overrideId,
3746
+ ref
3747
+ }) => {
3748
+ const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
3749
+ const [outputCanvas, setOutputCanvas] = useState6(null);
3750
+ const memoizedEffects = useMemoizedEffects({
3751
+ effects: experimentalEffects,
3752
+ overrideId: overrideId ?? null
3753
+ });
3754
+ const sourceCanvas = useMemo16(() => {
3755
+ if (typeof document === "undefined") {
3756
+ return null;
3757
+ }
3758
+ const canvas = document.createElement("canvas");
3759
+ canvas.width = 1;
3760
+ canvas.height = 1;
3761
+ return canvas;
3762
+ }, []);
3763
+ const chainState = useEffectChainState();
3764
+ const canvasRef = useCallback6((canvas) => {
3765
+ setOutputCanvas(canvas);
3766
+ if (typeof ref === "function") {
3767
+ ref(canvas);
3768
+ } else if (ref) {
3769
+ ref.current = canvas;
3770
+ }
3771
+ }, [ref]);
3772
+ useEffect5(() => {
3773
+ if (!outputCanvas || !sourceCanvas) {
3774
+ return;
3775
+ }
3776
+ const handle = delayRender2("Solid effect chain");
3777
+ if (!chainState) {
3778
+ continueRender2(handle);
3779
+ return () => {
3780
+ continueRender2(handle);
3781
+ };
3782
+ }
3783
+ const ctx = sourceCanvas.getContext("2d", { colorSpace: "srgb" });
3784
+ if (!ctx) {
3785
+ cancelRender2(new Error("Failed to acquire 2D context for <Solid> source"));
3786
+ return;
3787
+ }
3788
+ ctx.fillStyle = color;
3789
+ ctx.fillRect(0, 0, 1, 1);
3790
+ runEffectChain({
3791
+ state: chainState.get(width, height),
3792
+ source: sourceCanvas,
3793
+ effects: memoizedEffects,
3794
+ output: outputCanvas,
3795
+ width,
3796
+ height
3797
+ }).then((completed) => {
3798
+ if (completed) {
3799
+ continueRender2(handle);
3800
+ }
3801
+ }).catch((err) => {
3802
+ cancelRender2(err);
3803
+ });
3804
+ return () => {
3805
+ continueRender2(handle);
3806
+ };
3807
+ }, [
3808
+ color,
3809
+ outputCanvas,
3810
+ sourceCanvas,
3811
+ chainState,
3812
+ width,
3813
+ height,
3814
+ delayRender2,
3815
+ continueRender2,
3816
+ cancelRender2,
3817
+ memoizedEffects
3818
+ ]);
3819
+ return /* @__PURE__ */ jsx12("canvas", {
3820
+ ref: canvasRef,
3821
+ width,
3822
+ height,
3823
+ className,
3824
+ style
3825
+ });
3826
+ };
3827
+ var SolidOuter = forwardRef4(({
3828
+ _experimentalEffects = [],
3829
+ _experimentalControls: controls,
3830
+ color,
3831
+ height,
3832
+ width,
3833
+ className,
3834
+ durationInFrames,
3835
+ style,
3836
+ name,
3837
+ from,
3838
+ hidden,
3839
+ showInTimeline,
3840
+ ...props
3841
+ }, ref) => {
3842
+ const memoizedEffectDefinitions = useMemoizedEffectDefinitions(_experimentalEffects);
3843
+ return /* @__PURE__ */ jsx12(Sequence, {
3844
+ layout: "none",
3845
+ from,
3846
+ hidden,
3847
+ showInTimeline,
3848
+ _experimentalControls: controls,
3849
+ _experimentalEffects: memoizedEffectDefinitions,
3850
+ durationInFrames,
3851
+ name: name ?? "<Solid>",
3852
+ ...props,
3853
+ children: /* @__PURE__ */ jsx12(SolidInner, {
3854
+ ref,
3855
+ overrideId: controls?.overrideId ?? null,
3856
+ color,
3857
+ height,
3858
+ width,
3859
+ className,
3860
+ style,
3861
+ _experimentalEffects
3862
+ })
3863
+ });
3864
+ });
3865
+ var Solid = wrapInSchema(SolidOuter, solidSchema);
3866
+ Solid.displayName = "Solid";
3867
+ addSequenceStackTraces(Solid);
3868
+ var VERSION = "4.0.463";
3869
+ var checkMultipleRemotionVersions = () => {
3870
+ if (typeof globalThis === "undefined") {
3871
+ return;
3872
+ }
3873
+ const set = () => {
3874
+ globalThis.remotion_imported = VERSION;
3875
+ if (typeof window !== "undefined") {
3876
+ window.remotion_imported = VERSION;
3877
+ }
3878
+ };
3879
+ const alreadyImported = globalThis.remotion_imported || typeof window !== "undefined" && window.remotion_imported;
3880
+ if (alreadyImported) {
3881
+ if (alreadyImported === VERSION) {
3882
+ return;
3883
+ }
3884
+ if (typeof alreadyImported === "string" && alreadyImported.includes("webcodecs")) {
3885
+ set();
3886
+ return;
3887
+ }
3888
+ throw new TypeError(`\uD83D\uDEA8 Multiple versions of Remotion detected: ${[
3889
+ VERSION,
3890
+ typeof alreadyImported === "string" ? alreadyImported : "an older version"
3891
+ ].filter(truthy).join(" and ")}. This will cause things to break in an unexpected way.
3892
+ Check that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`);
3893
+ }
3894
+ set();
3895
+ };
3634
3896
  var calcArgs = (fit, frameSize, canvasSize) => {
3635
3897
  switch (fit) {
3636
3898
  case "fill": {
@@ -3681,7 +3943,7 @@ var calcArgs = (fit, frameSize, canvasSize) => {
3681
3943
  };
3682
3944
  var CanvasRefForwardingFunction = ({ width, height, fit, className, style }, ref) => {
3683
3945
  const canvasRef = useRef7(null);
3684
- const draw = useCallback6((imageData) => {
3946
+ const draw = useCallback7((imageData) => {
3685
3947
  const canvas = canvasRef.current;
3686
3948
  const canvasWidth = width ?? imageData.displayWidth;
3687
3949
  const canvasHeight = height ?? imageData.displayHeight;
@@ -3873,7 +4135,19 @@ var resolveAnimatedImageSource = (src) => {
3873
4135
  }
3874
4136
  return new URL(src, window.origin).href;
3875
4137
  };
3876
- var AnimatedImage = forwardRef4(({
4138
+ var animatedImageSchema = {
4139
+ playbackRate: {
4140
+ type: "number",
4141
+ min: 0,
4142
+ max: 10,
4143
+ step: 0.1,
4144
+ default: 1,
4145
+ description: "Playback Rate"
4146
+ },
4147
+ ...sequenceStyleSchema,
4148
+ hidden: hiddenField
4149
+ };
4150
+ var AnimatedImageContent = forwardRef5(({
3877
4151
  src,
3878
4152
  width,
3879
4153
  height,
@@ -3980,6 +4254,52 @@ var AnimatedImage = forwardRef4(({
3980
4254
  ...props
3981
4255
  });
3982
4256
  });
4257
+ AnimatedImageContent.displayName = "AnimatedImageContent";
4258
+ var AnimatedImageInner = ({
4259
+ src,
4260
+ width,
4261
+ height,
4262
+ onError,
4263
+ fit,
4264
+ playbackRate,
4265
+ loopBehavior,
4266
+ id,
4267
+ className,
4268
+ style,
4269
+ durationInFrames,
4270
+ _experimentalControls: controls,
4271
+ ref,
4272
+ ...sequenceProps
4273
+ }) => {
4274
+ const { durationInFrames: videoDuration } = useVideoConfig();
4275
+ const resolvedDuration = durationInFrames ?? videoDuration;
4276
+ const animatedImageProps = {
4277
+ src,
4278
+ width,
4279
+ height,
4280
+ onError,
4281
+ fit,
4282
+ playbackRate,
4283
+ loopBehavior,
4284
+ id,
4285
+ className,
4286
+ style
4287
+ };
4288
+ return /* @__PURE__ */ jsx14(Sequence, {
4289
+ layout: "none",
4290
+ durationInFrames: resolvedDuration,
4291
+ name: "<AnimatedImage>",
4292
+ _experimentalControls: controls,
4293
+ ...sequenceProps,
4294
+ children: /* @__PURE__ */ jsx14(AnimatedImageContent, {
4295
+ ...animatedImageProps,
4296
+ ref
4297
+ })
4298
+ });
4299
+ };
4300
+ var AnimatedImage = wrapInSchema(AnimatedImageInner, animatedImageSchema);
4301
+ AnimatedImage.displayName = "AnimatedImage";
4302
+ addSequenceStackTraces(AnimatedImage);
3983
4303
  var cachedSupport = null;
3984
4304
  var isHtmlInCanvasSupported = () => {
3985
4305
  if (cachedSupport !== null) {
@@ -3993,6 +4313,7 @@ var isHtmlInCanvasSupported = () => {
3993
4313
  cachedSupport = typeof ctx?.drawElementImage === "function" && typeof canvas.requestPaint === "function" && typeof canvas.captureElementImage === "function";
3994
4314
  return cachedSupport;
3995
4315
  };
4316
+ var HTML_IN_CANVAS_UNSUPPORTED_MESSAGE = "HTML in Canvas is not supported. Two common causes: Chrome is older than version 148 (update Chrome), or the HTML-in-Canvas flag is disabled at chrome://flags/#canvas-draw-element (enable it and restart Chrome).";
3996
4317
  function assertHtmlInCanvasDimensions(width, height) {
3997
4318
  if (typeof width !== "number" || typeof height !== "number") {
3998
4319
  throw new Error(`HtmlInCanvas: \`width\` and \`height\` must be numbers. Received width=${String(width)}, height=${String(height)}.`);
@@ -4018,30 +4339,16 @@ var defaultOnPaint = ({
4018
4339
  element.style.transform = transform.toString();
4019
4340
  };
4020
4341
  var HtmlInCanvasAncestorContext = createContext16(false);
4021
- var HtmlInCanvasInner = forwardRef5(({
4022
- width,
4023
- height,
4024
- _experimentalEffects: effects = [],
4025
- children,
4026
- onPaint,
4027
- onInit,
4028
- _experimentalControls: controls,
4029
- style,
4030
- durationInFrames,
4031
- ...sequenceProps
4032
- }, ref) => {
4033
- const isInsideAncestorHtmlInCanvas = useContext17(HtmlInCanvasAncestorContext);
4342
+ var HtmlInCanvasContent = forwardRef6(({ width, height, effects, children, onPaint, onInit, controls, style }, ref) => {
4343
+ const isInsideAncestorHtmlInCanvas = useContext18(HtmlInCanvasAncestorContext);
4034
4344
  assertHtmlInCanvasDimensions(width, height);
4035
4345
  const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
4036
4346
  if (!isHtmlInCanvasSupported()) {
4037
- cancelRender2(new Error("HTML in Canvas is not supported. Open this page in Chrome Canary with chrome://flags/#canvas-draw-element enabled."));
4347
+ cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
4038
4348
  }
4039
- const { durationInFrames: videoDuration } = useVideoConfig();
4040
- const resolvedDuration = durationInFrames ?? videoDuration;
4041
- const frame = useCurrentFrame();
4042
4349
  const canvas2dRef = useRef9(null);
4043
4350
  const divRef = useRef9(null);
4044
- const setLayoutCanvasRef = useCallback7((node) => {
4351
+ const setLayoutCanvasRef = useCallback8((node) => {
4045
4352
  canvas2dRef.current = node;
4046
4353
  if (typeof ref === "function") {
4047
4354
  ref(node);
@@ -4051,11 +4358,12 @@ var HtmlInCanvasInner = forwardRef5(({
4051
4358
  }, [ref]);
4052
4359
  const [offscreenCanvas] = useState8(() => new OffscreenCanvas(1, 1));
4053
4360
  const chainState = useEffectChainState();
4054
- const memoizedEffects = useMemoizedEffects(flattenEffects(effects));
4361
+ const memoizedEffects = useMemoizedEffects({
4362
+ effects,
4363
+ overrideId: controls?.overrideId ?? null
4364
+ });
4055
4365
  const effectsRef = useRef9(memoizedEffects);
4056
4366
  effectsRef.current = memoizedEffects;
4057
- const frameRef = useRef9(frame);
4058
- frameRef.current = frame;
4059
4367
  const onPaintRef = useRef9(onPaint);
4060
4368
  onPaintRef.current = onPaint;
4061
4369
  const onInitRef = useRef9(onInit);
@@ -4063,7 +4371,7 @@ var HtmlInCanvasInner = forwardRef5(({
4063
4371
  const initializedRef = useRef9(false);
4064
4372
  const onInitCleanupRef = useRef9(null);
4065
4373
  const unmountedRef = useRef9(false);
4066
- const onPaintCb = useCallback7(async () => {
4374
+ const onPaintCb = useCallback8(async () => {
4067
4375
  const element = divRef.current;
4068
4376
  if (!element) {
4069
4377
  throw new Error("Canvas or scene element not found");
@@ -4112,7 +4420,6 @@ var HtmlInCanvasInner = forwardRef5(({
4112
4420
  source: offscreenCanvas,
4113
4421
  effects: effectsRef.current,
4114
4422
  output: canvas2dRef.current,
4115
- frame: frameRef.current,
4116
4423
  width,
4117
4424
  height
4118
4425
  });
@@ -4176,31 +4483,64 @@ var HtmlInCanvasInner = forwardRef5(({
4176
4483
  if (isInsideAncestorHtmlInCanvas) {
4177
4484
  throw new Error("<HtmlInCanvas> effects cannot be nested together. Chrome will only display the outer effect. Consider merging the effects into one if you can.");
4178
4485
  }
4486
+ return /* @__PURE__ */ jsx15(HtmlInCanvasAncestorContext.Provider, {
4487
+ value: true,
4488
+ children: /* @__PURE__ */ jsx15("canvas", {
4489
+ ref: setLayoutCanvasRef,
4490
+ width,
4491
+ height,
4492
+ style,
4493
+ children: /* @__PURE__ */ jsx15("div", {
4494
+ ref: divRef,
4495
+ style: innerStyle,
4496
+ children
4497
+ })
4498
+ })
4499
+ });
4500
+ });
4501
+ HtmlInCanvasContent.displayName = "HtmlInCanvasContent";
4502
+ var HtmlInCanvasInner = forwardRef6(({
4503
+ width,
4504
+ height,
4505
+ _experimentalEffects: effects = [],
4506
+ children,
4507
+ onPaint,
4508
+ onInit,
4509
+ _experimentalControls: controls,
4510
+ style,
4511
+ durationInFrames,
4512
+ name,
4513
+ ...sequenceProps
4514
+ }, ref) => {
4515
+ const { durationInFrames: videoDuration } = useVideoConfig();
4516
+ const resolvedDuration = durationInFrames ?? videoDuration;
4517
+ const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
4179
4518
  return /* @__PURE__ */ jsx15(Sequence, {
4180
4519
  durationInFrames: resolvedDuration,
4181
- name: "<HtmlInCanvas>",
4520
+ name: name ?? "<HtmlInCanvas>",
4182
4521
  _experimentalControls: controls,
4183
- _experimentalEffects: memoizedEffects,
4522
+ _experimentalEffects: memoizedEffectDefinitions,
4184
4523
  layout: "none",
4185
4524
  ...sequenceProps,
4186
- children: /* @__PURE__ */ jsx15(HtmlInCanvasAncestorContext.Provider, {
4187
- value: true,
4188
- children: /* @__PURE__ */ jsx15("canvas", {
4189
- ref: setLayoutCanvasRef,
4190
- width,
4191
- height,
4192
- style,
4193
- children: /* @__PURE__ */ jsx15("div", {
4194
- ref: divRef,
4195
- style: innerStyle,
4196
- children
4197
- })
4198
- })
4525
+ children: /* @__PURE__ */ jsx15(HtmlInCanvasContent, {
4526
+ ref,
4527
+ width,
4528
+ height,
4529
+ effects,
4530
+ onPaint,
4531
+ onInit,
4532
+ controls,
4533
+ style,
4534
+ children
4199
4535
  })
4200
4536
  });
4201
4537
  });
4202
4538
  HtmlInCanvasInner.displayName = "HtmlInCanvas";
4203
- var HtmlInCanvasWrapped = wrapInSchema(HtmlInCanvasInner, sequenceStyleSchema);
4539
+ var htmlInCanvasSchema = {
4540
+ ...sequenceStyleSchema,
4541
+ hidden: hiddenField
4542
+ };
4543
+ var HtmlInCanvasWrapped = wrapInSchema(HtmlInCanvasInner, htmlInCanvasSchema);
4204
4544
  var HtmlInCanvas = Object.assign(HtmlInCanvasWrapped, {
4205
4545
  isSupported: isHtmlInCanvasSupported
4206
4546
  });
@@ -4247,7 +4587,7 @@ var RenderAssetManager = createContext17({
4247
4587
  var RenderAssetManagerProvider = ({ children, collectAssets }) => {
4248
4588
  const [renderAssets, setRenderAssets] = useState9([]);
4249
4589
  const renderAssetsRef = useRef10([]);
4250
- const registerRenderAsset = useCallback8((renderAsset) => {
4590
+ const registerRenderAsset = useCallback9((renderAsset) => {
4251
4591
  validateRenderAsset(renderAsset);
4252
4592
  renderAssetsRef.current = [...renderAssetsRef.current, renderAsset];
4253
4593
  setRenderAssets(renderAssetsRef.current);
@@ -4264,7 +4604,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
4264
4604
  };
4265
4605
  }, []);
4266
4606
  }
4267
- const unregisterRenderAsset = useCallback8((id) => {
4607
+ const unregisterRenderAsset = useCallback9((id) => {
4268
4608
  renderAssetsRef.current = renderAssetsRef.current.filter((a) => a.id !== id);
4269
4609
  setRenderAssets(renderAssetsRef.current);
4270
4610
  }, []);
@@ -4292,7 +4632,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
4292
4632
  };
4293
4633
  var ArtifactThumbnail = Symbol("Thumbnail");
4294
4634
  var Artifact = ({ filename, content, downloadBehavior }) => {
4295
- const { registerRenderAsset, unregisterRenderAsset } = useContext18(RenderAssetManager);
4635
+ const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
4296
4636
  const env = useRemotionEnvironment();
4297
4637
  const frame = useCurrentFrame();
4298
4638
  const [id] = useState10(() => {
@@ -4482,7 +4822,7 @@ var getSrcWithoutHash = (src) => {
4482
4822
  return src.slice(0, hashIndex);
4483
4823
  };
4484
4824
  var usePreload = (src) => {
4485
- const preloads2 = useContext19(PreloadContext);
4825
+ const preloads2 = useContext20(PreloadContext);
4486
4826
  const hashFragmentIndex = removeAndGetHashFragment(src);
4487
4827
  const withoutHashFragment = getSrcWithoutHash(src);
4488
4828
  if (!preloads2[withoutHashFragment]) {
@@ -4664,6 +5004,9 @@ var validateMediaProps = (props, component) => {
4664
5004
  if (typeof props.playbackRate === "number" && (isNaN(props.playbackRate) || !Number.isFinite(props.playbackRate) || props.playbackRate <= 0)) {
4665
5005
  throw new TypeError(`You have passed a playbackRate of ${props.playbackRate} to your <${component} /> component. Playback rate must be a real number above 0.`);
4666
5006
  }
5007
+ if (typeof props.preservePitch !== "boolean" && typeof props.preservePitch !== "undefined") {
5008
+ throw new TypeError(`'preservePitch' must be a boolean or undefined but got '${typeof props.preservePitch}' instead`);
5009
+ }
4667
5010
  };
4668
5011
  var validateStartFromProps = (startFrom, endAt) => {
4669
5012
  if (typeof startFrom !== "undefined") {
@@ -5009,7 +5352,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
5009
5352
  }, []);
5010
5353
  const prevEndTimes = useRef11({ scheduledEndTime: null, mediaEndTime: null });
5011
5354
  const nodesToResume = useRef11(new Map);
5012
- const unscheduleAudioNode = useCallback9((node) => {
5355
+ const unscheduleAudioNode = useCallback10((node) => {
5013
5356
  nodesToResume.current.delete(node);
5014
5357
  }, []);
5015
5358
  const scheduleAudioNode = useMemo22(() => {
@@ -5057,7 +5400,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
5057
5400
  };
5058
5401
  };
5059
5402
  }, [ctxAndGain, logLevel]);
5060
- const resume = useCallback9(() => {
5403
+ const resume = useCallback10(() => {
5061
5404
  if (!ctxAndGain) {
5062
5405
  return Promise.resolve();
5063
5406
  }
@@ -5084,10 +5427,10 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
5084
5427
  });
5085
5428
  return resumePromise.catch(() => {});
5086
5429
  }, [ctxAndGain, logLevel]);
5087
- const getIsResumingAudioContext = useCallback9(() => {
5430
+ const getIsResumingAudioContext = useCallback10(() => {
5088
5431
  return isResuming.current;
5089
5432
  }, []);
5090
- const suspend = useCallback9(() => {
5433
+ const suspend = useCallback10(() => {
5091
5434
  if (!ctxAndGain) {
5092
5435
  return;
5093
5436
  }
@@ -5133,7 +5476,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
5133
5476
  const logLevel = useLogLevel();
5134
5477
  const mountTime = useMountTime();
5135
5478
  const env = useRemotionEnvironment();
5136
- const audioCtx = useContext20(SharedAudioContext);
5479
+ const audioCtx = useContext21(SharedAudioContext);
5137
5480
  const audioContext = audioCtx?.audioContext ?? null;
5138
5481
  const resume = audioCtx?.resume;
5139
5482
  const refs = useMemo22(() => {
@@ -5160,7 +5503,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
5160
5503
  };
5161
5504
  }, [refs]);
5162
5505
  const takenAudios = useRef11(new Array(numberOfAudioTags).fill(false));
5163
- const rerenderAudios = useCallback9(() => {
5506
+ const rerenderAudios = useCallback10(() => {
5164
5507
  refs.forEach(({ ref, id }) => {
5165
5508
  const data = audios.current?.find((a) => a.id === id);
5166
5509
  const { current } = ref;
@@ -5181,7 +5524,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
5181
5524
  });
5182
5525
  });
5183
5526
  }, [refs]);
5184
- const registerAudio = useCallback9((options) => {
5527
+ const registerAudio = useCallback10((options) => {
5185
5528
  const { aud, audioId, premounting, postmounting } = options;
5186
5529
  const found = audios.current?.find((a) => a.audioId === audioId);
5187
5530
  if (found) {
@@ -5210,7 +5553,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
5210
5553
  rerenderAudios();
5211
5554
  return newElem;
5212
5555
  }, [numberOfAudioTags, refs, rerenderAudios]);
5213
- const unregisterAudio = useCallback9((id) => {
5556
+ const unregisterAudio = useCallback10((id) => {
5214
5557
  const cloned = [...takenAudios.current];
5215
5558
  const index = refs.findIndex((r) => r.id === id);
5216
5559
  if (index === -1) {
@@ -5221,7 +5564,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
5221
5564
  audios.current = audios.current?.filter((a) => a.id !== id);
5222
5565
  rerenderAudios();
5223
5566
  }, [refs, rerenderAudios]);
5224
- const updateAudio = useCallback9(({
5567
+ const updateAudio = useCallback10(({
5225
5568
  aud,
5226
5569
  audioId,
5227
5570
  id,
@@ -5255,7 +5598,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
5255
5598
  rerenderAudios();
5256
5599
  }
5257
5600
  }, [rerenderAudios]);
5258
- const playAllAudios = useCallback9(() => {
5601
+ const playAllAudios = useCallback10(() => {
5259
5602
  refs.forEach((ref) => {
5260
5603
  const audio = audios.current.find((a) => a.el === ref.ref);
5261
5604
  if (audio?.premounting) {
@@ -5308,8 +5651,8 @@ var useSharedAudio = ({
5308
5651
  premounting,
5309
5652
  postmounting
5310
5653
  }) => {
5311
- const audioCtx = useContext20(SharedAudioContext);
5312
- const tagsCtx = useContext20(SharedAudioTagsContext);
5654
+ const audioCtx = useContext21(SharedAudioContext);
5655
+ const tagsCtx = useContext21(SharedAudioTagsContext);
5313
5656
  const [elem] = useState12(() => {
5314
5657
  if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
5315
5658
  return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
@@ -5488,7 +5831,7 @@ var useVolume = ({
5488
5831
  const audioStuffRef = useRef13(null);
5489
5832
  const currentVolumeRef = useRef13(volume);
5490
5833
  currentVolumeRef.current = volume;
5491
- const sharedAudioContext = useContext21(SharedAudioContext);
5834
+ const sharedAudioContext = useContext22(SharedAudioContext);
5492
5835
  if (!sharedAudioContext) {
5493
5836
  throw new Error("useAmplification must be used within a SharedAudioContext");
5494
5837
  }
@@ -5553,7 +5896,7 @@ var useVolume = ({
5553
5896
  return audioStuffRef;
5554
5897
  };
5555
5898
  var useMediaStartsAt = () => {
5556
- const parentSequence = useContext22(SequenceContext);
5899
+ const parentSequence = useContext23(SequenceContext);
5557
5900
  const startsAt = Math.min(0, parentSequence?.relativeFrom ?? 0);
5558
5901
  return startsAt;
5559
5902
  };
@@ -5642,7 +5985,7 @@ var useBasicMediaInTimeline = ({
5642
5985
  if (!src) {
5643
5986
  throw new Error("No src passed");
5644
5987
  }
5645
- const parentSequence = useContext23(SequenceContext);
5988
+ const parentSequence = useContext24(SequenceContext);
5646
5989
  const [initialVolume] = useState13(() => volume);
5647
5990
  const duration = getTimelineDuration({
5648
5991
  compositionDurationInFrames: sequenceDurationInFrames,
@@ -5709,8 +6052,8 @@ var useImageInTimeline = ({
5709
6052
  loopDisplay,
5710
6053
  controls
5711
6054
  }) => {
5712
- const parentSequence = useContext23(SequenceContext);
5713
- const { registerSequence, unregisterSequence } = useContext23(SequenceManager);
6055
+ const parentSequence = useContext24(SequenceContext);
6056
+ const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
5714
6057
  const { durationInFrames } = useVideoConfig();
5715
6058
  const mediaStartsAt = useMediaStartsAt();
5716
6059
  const { duration, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
@@ -5791,9 +6134,9 @@ var useMediaInTimeline = ({
5791
6134
  postmountDisplay,
5792
6135
  loopDisplay
5793
6136
  }) => {
5794
- const parentSequence = useContext23(SequenceContext);
6137
+ const parentSequence = useContext24(SequenceContext);
5795
6138
  const startsAt = useMediaStartsAt();
5796
- const { registerSequence, unregisterSequence } = useContext23(SequenceManager);
6139
+ const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
5797
6140
  const { durationInFrames } = useVideoConfig();
5798
6141
  const mediaStartsAt = useMediaStartsAt();
5799
6142
  const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
@@ -5875,7 +6218,7 @@ var useBufferManager = (logLevel, mountTime) => {
5875
6218
  const env = useRemotionEnvironment();
5876
6219
  const rendering = env.isRendering;
5877
6220
  const buffering = useRef14(false);
5878
- const addBlock = useCallback10((block) => {
6221
+ const addBlock = useCallback11((block) => {
5879
6222
  if (rendering) {
5880
6223
  return {
5881
6224
  unblock: () => {
@@ -5901,7 +6244,7 @@ var useBufferManager = (logLevel, mountTime) => {
5901
6244
  }
5902
6245
  };
5903
6246
  }, [rendering]);
5904
- const listenForBuffering = useCallback10((callback) => {
6247
+ const listenForBuffering = useCallback11((callback) => {
5905
6248
  setOnBufferingCallbacks((c) => [...c, callback]);
5906
6249
  return {
5907
6250
  remove: () => {
@@ -5909,7 +6252,7 @@ var useBufferManager = (logLevel, mountTime) => {
5909
6252
  }
5910
6253
  };
5911
6254
  }, []);
5912
- const listenForResume = useCallback10((callback) => {
6255
+ const listenForResume = useCallback11((callback) => {
5913
6256
  setOnResumeCallbacks((c) => [...c, callback]);
5914
6257
  return {
5915
6258
  remove: () => {
@@ -5953,7 +6296,7 @@ var useBufferManager = (logLevel, mountTime) => {
5953
6296
  };
5954
6297
  var BufferingContextReact = React21.createContext(null);
5955
6298
  var BufferingProvider = ({ children }) => {
5956
- const { logLevel, mountTime } = useContext24(LogLevelContext);
6299
+ const { logLevel, mountTime } = useContext25(LogLevelContext);
5957
6300
  const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
5958
6301
  return /* @__PURE__ */ jsx21(BufferingContextReact.Provider, {
5959
6302
  value: bufferManager,
@@ -5983,7 +6326,7 @@ var useIsPlayerBuffering = (bufferManager) => {
5983
6326
  return isBuffering;
5984
6327
  };
5985
6328
  var useBufferState = () => {
5986
- const buffer = useContext25(BufferingContextReact);
6329
+ const buffer = useContext26(BufferingContextReact);
5987
6330
  const logLevel = useLogLevel();
5988
6331
  const addBlock = buffer ? buffer.addBlock : null;
5989
6332
  return useMemo25(() => ({
@@ -6023,7 +6366,7 @@ var useBufferUntilFirstFrame = ({
6023
6366
  }) => {
6024
6367
  const bufferingRef = useRef15(false);
6025
6368
  const { delayPlayback } = useBufferState();
6026
- const bufferUntilFirstFrame = useCallback11((requestedTime) => {
6369
+ const bufferUntilFirstFrame = useCallback12((requestedTime) => {
6027
6370
  if (mediaType !== "video") {
6028
6371
  return;
6029
6372
  }
@@ -6394,6 +6737,23 @@ function checkInfiniteRange(name, arr) {
6394
6737
  }
6395
6738
  }
6396
6739
  }
6740
+ function assertValidInterpolateEasingOption(easing, inputRangeLength) {
6741
+ if (easing === undefined) {
6742
+ return;
6743
+ }
6744
+ if (typeof easing === "function") {
6745
+ return;
6746
+ }
6747
+ const expectedLength = inputRangeLength - 1;
6748
+ if (easing.length !== expectedLength) {
6749
+ throw new Error(`When easing is an array, it must have one entry per segment between keyframes (length inputRange.length - 1 = ${expectedLength}), but got length ${easing.length}`);
6750
+ }
6751
+ for (let i = 0;i < easing.length; i++) {
6752
+ if (typeof easing[i] !== "function") {
6753
+ throw new Error(`easing[${i}] must be a function`);
6754
+ }
6755
+ }
6756
+ }
6397
6757
  function interpolate(input, inputRange, outputRange, options) {
6398
6758
  if (typeof input === "undefined") {
6399
6759
  throw new Error("input can not be undefined");
@@ -6410,7 +6770,18 @@ function interpolate(input, inputRange, outputRange, options) {
6410
6770
  checkInfiniteRange("inputRange", inputRange);
6411
6771
  checkInfiniteRange("outputRange", outputRange);
6412
6772
  checkValidInputRange(inputRange);
6413
- const easing = options?.easing ?? ((num) => num);
6773
+ assertValidInterpolateEasingOption(options?.easing, inputRange.length);
6774
+ const easingOption = options?.easing;
6775
+ const defaultEasing = (num) => num;
6776
+ const resolveEasingForSegment = (segmentIndex) => {
6777
+ if (easingOption === undefined) {
6778
+ return defaultEasing;
6779
+ }
6780
+ if (typeof easingOption === "function") {
6781
+ return easingOption;
6782
+ }
6783
+ return easingOption[segmentIndex];
6784
+ };
6414
6785
  let extrapolateLeft = "extend";
6415
6786
  if (options?.extrapolateLeft !== undefined) {
6416
6787
  extrapolateLeft = options.extrapolateLeft;
@@ -6424,7 +6795,7 @@ function interpolate(input, inputRange, outputRange, options) {
6424
6795
  }
6425
6796
  const range = findRange(input, inputRange);
6426
6797
  return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
6427
- easing,
6798
+ easing: resolveEasingForSegment(range),
6428
6799
  extrapolateLeft,
6429
6800
  extrapolateRight
6430
6801
  });
@@ -6489,6 +6860,7 @@ var useMediaPlayback = ({
6489
6860
  src,
6490
6861
  mediaType,
6491
6862
  playbackRate: localPlaybackRate,
6863
+ preservePitch = true,
6492
6864
  onlyWarnForMediaSeekingError,
6493
6865
  acceptableTimeshift,
6494
6866
  pauseWhenBuffering,
@@ -6500,7 +6872,7 @@ var useMediaPlayback = ({
6500
6872
  const frame = useCurrentFrame();
6501
6873
  const absoluteFrame = useTimelinePosition();
6502
6874
  const [playing] = usePlayingState();
6503
- const buffering = useContext26(BufferingContextReact);
6875
+ const buffering = useContext27(BufferingContextReact);
6504
6876
  const { fps } = useVideoConfig();
6505
6877
  const mediaStartsAt = useMediaStartsAt();
6506
6878
  const lastSeekDueToShift = useRef17(null);
@@ -6511,7 +6883,7 @@ var useMediaPlayback = ({
6511
6883
  throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
6512
6884
  }
6513
6885
  const isVariableFpsVideoMap = useRef17({});
6514
- const onVariableFpsVideoDetected = useCallback12(() => {
6886
+ const onVariableFpsVideoDetected = useCallback13(() => {
6515
6887
  if (!src) {
6516
6888
  return;
6517
6889
  }
@@ -6606,7 +6978,10 @@ var useMediaPlayback = ({
6606
6978
  if (mediaRef.current && mediaRef.current.playbackRate !== playbackRateToSet) {
6607
6979
  mediaRef.current.playbackRate = playbackRateToSet;
6608
6980
  }
6609
- }, [mediaRef, playbackRate]);
6981
+ if (mediaRef.current && mediaRef.current.preservesPitch !== preservePitch) {
6982
+ mediaRef.current.preservesPitch = preservePitch;
6983
+ }
6984
+ }, [mediaRef, playbackRate, preservePitch]);
6610
6985
  useEffect12(() => {
6611
6986
  const tagName = mediaType === "audio" ? "<Html5Audio>" : "<Html5Video>";
6612
6987
  if (!mediaRef.current) {
@@ -6788,15 +7163,15 @@ var SetMediaVolumeContext = createContext22({
6788
7163
  }
6789
7164
  });
6790
7165
  var useMediaVolumeState = () => {
6791
- const { mediaVolume } = useContext27(MediaVolumeContext);
6792
- const { setMediaVolume } = useContext27(SetMediaVolumeContext);
7166
+ const { mediaVolume } = useContext28(MediaVolumeContext);
7167
+ const { setMediaVolume } = useContext28(SetMediaVolumeContext);
6793
7168
  return useMemo27(() => {
6794
7169
  return [mediaVolume, setMediaVolume];
6795
7170
  }, [mediaVolume, setMediaVolume]);
6796
7171
  };
6797
7172
  var useMediaMutedState = () => {
6798
- const { mediaMuted } = useContext27(MediaVolumeContext);
6799
- const { setMediaMuted } = useContext27(SetMediaVolumeContext);
7173
+ const { mediaMuted } = useContext28(MediaVolumeContext);
7174
+ const { setMediaMuted } = useContext28(SetMediaVolumeContext);
6800
7175
  return useMemo27(() => {
6801
7176
  return [mediaMuted, setMediaMuted];
6802
7177
  }, [mediaMuted, setMediaMuted]);
@@ -6816,6 +7191,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
6816
7191
  volume,
6817
7192
  muted,
6818
7193
  playbackRate,
7194
+ preservePitch,
6819
7195
  shouldPreMountAudioTags,
6820
7196
  src,
6821
7197
  onDuration,
@@ -6846,14 +7222,12 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
6846
7222
  const [mediaVolume] = useMediaVolumeState();
6847
7223
  const [mediaMuted] = useMediaMutedState();
6848
7224
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
6849
- const { hidden } = useContext28(SequenceVisibilityToggleContext);
6850
7225
  if (!src) {
6851
7226
  throw new TypeError("No 'src' was passed to <Html5Audio>.");
6852
7227
  }
6853
7228
  const preloadedSrc = usePreload(src);
6854
- const sequenceContext = useContext28(SequenceContext);
7229
+ const sequenceContext = useContext29(SequenceContext);
6855
7230
  const [timelineId] = useState16(() => String(Math.random()));
6856
- const isSequenceHidden = hidden[timelineId] ?? false;
6857
7231
  const userPreferredVolume = evaluateVolume({
6858
7232
  frame: volumePropFrame,
6859
7233
  volume,
@@ -6867,7 +7241,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
6867
7241
  });
6868
7242
  const propsToPass = useMemo28(() => {
6869
7243
  return {
6870
- muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
7244
+ muted: muted || mediaMuted || userPreferredVolume <= 0,
6871
7245
  src: preloadedSrc,
6872
7246
  loop: _remotionInternalNativeLoopPassed,
6873
7247
  crossOrigin: crossOriginValue,
@@ -6875,7 +7249,6 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
6875
7249
  };
6876
7250
  }, [
6877
7251
  _remotionInternalNativeLoopPassed,
6878
- isSequenceHidden,
6879
7252
  mediaMuted,
6880
7253
  muted,
6881
7254
  nativeProps,
@@ -6920,6 +7293,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
6920
7293
  src,
6921
7294
  mediaType: "audio",
6922
7295
  playbackRate: playbackRate ?? 1,
7296
+ preservePitch,
6923
7297
  onlyWarnForMediaSeekingError: false,
6924
7298
  acceptableTimeshift: acceptableTimeShiftInSeconds ?? null,
6925
7299
  isPremounting: Boolean(sequenceContext?.premounting),
@@ -6982,7 +7356,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
6982
7356
  ...propsToPass
6983
7357
  });
6984
7358
  };
6985
- var AudioForPreview = forwardRef6(AudioForDevelopmentForwardRefFunction);
7359
+ var AudioForPreview = forwardRef7(AudioForDevelopmentForwardRefFunction);
6986
7360
  var AudioForRenderingRefForwardingFunction = (props, ref) => {
6987
7361
  const audioRef = useRef19(null);
6988
7362
  const {
@@ -7001,13 +7375,14 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
7001
7375
  loopVolumeCurveBehavior,
7002
7376
  pauseWhenBuffering,
7003
7377
  audioStreamIndex,
7378
+ preservePitch: _preservePitch,
7004
7379
  ...nativeProps
7005
7380
  } = props;
7006
7381
  const absoluteFrame = useTimelinePosition();
7007
7382
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
7008
7383
  const frame = useCurrentFrame();
7009
- const sequenceContext = useContext29(SequenceContext);
7010
- const { registerRenderAsset, unregisterRenderAsset } = useContext29(RenderAssetManager);
7384
+ const sequenceContext = useContext30(SequenceContext);
7385
+ const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
7011
7386
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
7012
7387
  const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
7013
7388
  props.src,
@@ -7114,9 +7489,9 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
7114
7489
  onError: onNativeError
7115
7490
  });
7116
7491
  };
7117
- var AudioForRendering = forwardRef7(AudioForRenderingRefForwardingFunction);
7492
+ var AudioForRendering = forwardRef8(AudioForRenderingRefForwardingFunction);
7118
7493
  var AudioRefForwardingFunction = (props, ref) => {
7119
- const audioTagsContext = useContext30(SharedAudioTagsContext);
7494
+ const audioTagsContext = useContext31(SharedAudioTagsContext);
7120
7495
  const {
7121
7496
  startFrom,
7122
7497
  endAt,
@@ -7135,12 +7510,12 @@ var AudioRefForwardingFunction = (props, ref) => {
7135
7510
  if (environment.isClientSideRendering) {
7136
7511
  throw new Error("<Html5Audio> is not supported in @remotion/web-renderer. Use <Audio> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
7137
7512
  }
7138
- const { durations, setDurations } = useContext30(DurationsContext);
7513
+ const { durations, setDurations } = useContext31(DurationsContext);
7139
7514
  if (typeof props.src !== "string") {
7140
7515
  throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
7141
7516
  }
7142
7517
  const preloadedSrc = usePreload(props.src);
7143
- const onError = useCallback13((e) => {
7518
+ const onError = useCallback14((e) => {
7144
7519
  console.log(e.currentTarget.error);
7145
7520
  const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;
7146
7521
  if (loop) {
@@ -7154,7 +7529,7 @@ var AudioRefForwardingFunction = (props, ref) => {
7154
7529
  console.warn(errMessage);
7155
7530
  }
7156
7531
  }, [loop, onRemotionError, preloadedSrc]);
7157
- const onDuration = useCallback13((src, durationInSeconds) => {
7532
+ const onDuration = useCallback14((src, durationInSeconds) => {
7158
7533
  setDurations({ type: "got-duration", durationInSeconds, src });
7159
7534
  }, [setDurations]);
7160
7535
  const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];
@@ -7204,7 +7579,11 @@ var AudioRefForwardingFunction = (props, ref) => {
7204
7579
  })
7205
7580
  });
7206
7581
  }
7207
- validateMediaProps({ playbackRate: props.playbackRate, volume: props.volume }, "Html5Audio");
7582
+ validateMediaProps({
7583
+ playbackRate: props.playbackRate,
7584
+ preservePitch: props.preservePitch,
7585
+ volume: props.volume
7586
+ }, "Html5Audio");
7208
7587
  if (environment.isRendering) {
7209
7588
  return /* @__PURE__ */ jsx24(AudioForRendering, {
7210
7589
  onDuration,
@@ -7227,7 +7606,7 @@ var AudioRefForwardingFunction = (props, ref) => {
7227
7606
  showInTimeline: showInTimeline ?? true
7228
7607
  });
7229
7608
  };
7230
- var Html5Audio = forwardRef8(AudioRefForwardingFunction);
7609
+ var Html5Audio = forwardRef9(AudioRefForwardingFunction);
7231
7610
  addSequenceStackTraces(Html5Audio);
7232
7611
  var Audio = Html5Audio;
7233
7612
  var kSplineTableSize = 11;
@@ -7244,11 +7623,11 @@ var IFrameRefForwarding = ({
7244
7623
  retries: delayRenderRetries ?? undefined,
7245
7624
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
7246
7625
  }));
7247
- const didLoad = useCallback14((e) => {
7626
+ const didLoad = useCallback15((e) => {
7248
7627
  continueRender2(handle);
7249
7628
  onLoad?.(e);
7250
7629
  }, [handle, onLoad, continueRender2]);
7251
- const didGetError = useCallback14((e) => {
7630
+ const didGetError = useCallback15((e) => {
7252
7631
  continueRender2(handle);
7253
7632
  if (onError) {
7254
7633
  onError(e);
@@ -7264,7 +7643,7 @@ var IFrameRefForwarding = ({
7264
7643
  onLoad: didLoad
7265
7644
  });
7266
7645
  };
7267
- var IFrame = forwardRef9(IFrameRefForwarding);
7646
+ var IFrame = forwardRef10(IFrameRefForwarding);
7268
7647
  function exponentialBackoff(errorCount) {
7269
7648
  return 1000 * 2 ** (errorCount - 1);
7270
7649
  }
@@ -7274,7 +7653,7 @@ function truncateSrcForLabel(src) {
7274
7653
  }
7275
7654
  return src;
7276
7655
  }
7277
- var ImgInner = ({
7656
+ var ImgContent = ({
7278
7657
  onError,
7279
7658
  maxRetries = 2,
7280
7659
  src,
@@ -7283,21 +7662,13 @@ var ImgInner = ({
7283
7662
  delayRenderTimeoutInMilliseconds,
7284
7663
  onImageFrame,
7285
7664
  crossOrigin,
7286
- showInTimeline,
7287
- name,
7288
- stack,
7289
7665
  ref,
7290
- _experimentalControls: controls,
7291
7666
  ...props2
7292
7667
  }) => {
7293
7668
  const imageRef = useRef20(null);
7294
7669
  const errors = useRef20({});
7295
7670
  const { delayPlayback } = useBufferState();
7296
- const sequenceContext = useContext31(SequenceContext);
7297
- const [timelineId] = useState18(() => String(Math.random()));
7298
- if (!src) {
7299
- throw new Error('No "src" prop was passed to <Img>.');
7300
- }
7671
+ const sequenceContext = useContext32(SequenceContext);
7301
7672
  const _propsValid = true;
7302
7673
  if (!_propsValid) {
7303
7674
  throw new Error("typecheck error");
@@ -7305,19 +7676,8 @@ var ImgInner = ({
7305
7676
  useImperativeHandle6(ref, () => {
7306
7677
  return imageRef.current;
7307
7678
  }, []);
7308
- useImageInTimeline({
7309
- src,
7310
- displayName: name ?? null,
7311
- id: timelineId,
7312
- stack: stack ?? null,
7313
- showInTimeline: showInTimeline ?? true,
7314
- premountDisplay: sequenceContext?.premountDisplay ?? null,
7315
- postmountDisplay: sequenceContext?.postmountDisplay ?? null,
7316
- loopDisplay: undefined,
7317
- controls: controls ?? null
7318
- });
7319
7679
  const actualSrc = usePreload(src);
7320
- const retryIn = useCallback15((timeout) => {
7680
+ const retryIn = useCallback16((timeout) => {
7321
7681
  if (!imageRef.current) {
7322
7682
  return;
7323
7683
  }
@@ -7335,7 +7695,7 @@ var ImgInner = ({
7335
7695
  }, timeout);
7336
7696
  }, []);
7337
7697
  const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
7338
- const didGetError = useCallback15((e) => {
7698
+ const didGetError = useCallback16((e) => {
7339
7699
  if (!errors.current) {
7340
7700
  return;
7341
7701
  }
@@ -7437,7 +7797,44 @@ var ImgInner = ({
7437
7797
  decoding: "sync"
7438
7798
  });
7439
7799
  };
7440
- var Img = wrapInSchema(ImgInner, sequenceStyleSchema);
7800
+ var ImgInner = ({
7801
+ hidden,
7802
+ name,
7803
+ stack,
7804
+ showInTimeline,
7805
+ src,
7806
+ _experimentalControls: controls,
7807
+ ...props2
7808
+ }) => {
7809
+ const sequenceContext = useContext32(SequenceContext);
7810
+ const [timelineId] = useState18(() => String(Math.random()));
7811
+ if (!src) {
7812
+ throw new Error('No "src" prop was passed to <Img>.');
7813
+ }
7814
+ useImageInTimeline({
7815
+ src,
7816
+ displayName: name ?? null,
7817
+ id: timelineId,
7818
+ stack: stack ?? null,
7819
+ showInTimeline: showInTimeline ?? true,
7820
+ premountDisplay: sequenceContext?.premountDisplay ?? null,
7821
+ postmountDisplay: sequenceContext?.postmountDisplay ?? null,
7822
+ loopDisplay: undefined,
7823
+ controls: controls ?? null
7824
+ });
7825
+ if (hidden) {
7826
+ return null;
7827
+ }
7828
+ return /* @__PURE__ */ jsx26(ImgContent, {
7829
+ src,
7830
+ ...props2
7831
+ });
7832
+ };
7833
+ var imgSchema = {
7834
+ ...sequenceStyleSchema,
7835
+ hidden: hiddenField
7836
+ };
7837
+ var Img = wrapInSchema(ImgInner, imgSchema);
7441
7838
  addSequenceStackTraces(Img);
7442
7839
  var compositionsRef = React28.createRef();
7443
7840
  var CompositionManagerProvider = ({
@@ -7451,14 +7848,14 @@ var CompositionManagerProvider = ({
7451
7848
  const [canvasContent, setCanvasContent] = useState19(initialCanvasContent);
7452
7849
  const [compositions, setCompositions] = useState19(initialCompositions);
7453
7850
  const currentcompositionsRef = useRef21(compositions);
7454
- const updateCompositions = useCallback16((updateComps) => {
7851
+ const updateCompositions = useCallback17((updateComps) => {
7455
7852
  setCompositions((comps) => {
7456
7853
  const updated = updateComps(comps);
7457
7854
  currentcompositionsRef.current = updated;
7458
7855
  return updated;
7459
7856
  });
7460
7857
  }, []);
7461
- const registerComposition = useCallback16((comp) => {
7858
+ const registerComposition = useCallback17((comp) => {
7462
7859
  updateCompositions((comps) => {
7463
7860
  if (comps.find((c2) => c2.id === comp.id)) {
7464
7861
  throw new Error(`Multiple composition with id ${comp.id} are registered.`);
@@ -7466,12 +7863,12 @@ var CompositionManagerProvider = ({
7466
7863
  return [...comps, comp];
7467
7864
  });
7468
7865
  }, [updateCompositions]);
7469
- const unregisterComposition = useCallback16((id) => {
7866
+ const unregisterComposition = useCallback17((id) => {
7470
7867
  setCompositions((comps) => {
7471
7868
  return comps.filter((c2) => c2.id !== id);
7472
7869
  });
7473
7870
  }, []);
7474
- const registerFolder = useCallback16((name, parent, nonce) => {
7871
+ const registerFolder = useCallback17((name, parent, nonce) => {
7475
7872
  setFolders((prevFolders) => {
7476
7873
  return [
7477
7874
  ...prevFolders,
@@ -7483,7 +7880,7 @@ var CompositionManagerProvider = ({
7483
7880
  ];
7484
7881
  });
7485
7882
  }, []);
7486
- const unregisterFolder = useCallback16((name, parent) => {
7883
+ const unregisterFolder = useCallback17((name, parent) => {
7487
7884
  setFolders((prevFolders) => {
7488
7885
  return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
7489
7886
  });
@@ -7583,16 +7980,31 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
7583
7980
  }
7584
7981
  `;
7585
7982
  };
7586
- var defineEffect = (definition) => definition;
7587
- var createDescriptor = (definition, params) => {
7588
- const widened = definition;
7589
- return {
7983
+ var disabledEffectField = {
7984
+ type: "boolean",
7985
+ default: false,
7986
+ description: "Disabled"
7987
+ };
7988
+ var createEffect = (definition) => {
7989
+ const userCalculateKey = definition.calculateKey;
7990
+ const widened = {
7991
+ ...definition,
7992
+ calculateKey: (params) => {
7993
+ const disabled = params.disabled ?? false;
7994
+ return `${userCalculateKey(params)}-disabled-${disabled}`;
7995
+ },
7996
+ schema: {
7997
+ disabled: disabledEffectField,
7998
+ ...definition.schema
7999
+ }
8000
+ };
8001
+ const factory = (params = {}) => ({
7590
8002
  definition: widened,
7591
8003
  params,
7592
- stack: new Error().stack,
7593
8004
  effectKey: widened.calculateKey(params),
7594
8005
  memoized: false
7595
- };
8006
+ });
8007
+ return factory;
7596
8008
  };
7597
8009
  var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
7598
8010
  var getPreviewDomElement = () => {
@@ -7618,7 +8030,7 @@ var waitForRoot = (fn) => {
7618
8030
  };
7619
8031
  var MediaEnabledContext = createContext23(null);
7620
8032
  var useVideoEnabled = () => {
7621
- const context = useContext32(MediaEnabledContext);
8033
+ const context = useContext33(MediaEnabledContext);
7622
8034
  if (!context) {
7623
8035
  return window.remotion_videoEnabled;
7624
8036
  }
@@ -7628,7 +8040,7 @@ var useVideoEnabled = () => {
7628
8040
  return context.videoEnabled;
7629
8041
  };
7630
8042
  var useAudioEnabled = () => {
7631
- const context = useContext32(MediaEnabledContext);
8043
+ const context = useContext33(MediaEnabledContext);
7632
8044
  if (!context) {
7633
8045
  return window.remotion_audioEnabled;
7634
8046
  }
@@ -7944,15 +8356,16 @@ var OffthreadVideoForRendering = ({
7944
8356
  onVideoFrame,
7945
8357
  crossOrigin,
7946
8358
  audioStreamIndex,
8359
+ preservePitch: _preservePitch,
7947
8360
  ...props2
7948
8361
  }) => {
7949
8362
  const absoluteFrame = useTimelinePosition();
7950
8363
  const frame = useCurrentFrame();
7951
8364
  const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
7952
8365
  const videoConfig = useUnsafeVideoConfig();
7953
- const sequenceContext = useContext33(SequenceContext);
8366
+ const sequenceContext = useContext34(SequenceContext);
7954
8367
  const mediaStartsAt = useMediaStartsAt();
7955
- const { registerRenderAsset, unregisterRenderAsset } = useContext33(RenderAssetManager);
8368
+ const { registerRenderAsset, unregisterRenderAsset } = useContext34(RenderAssetManager);
7956
8369
  if (!src) {
7957
8370
  throw new TypeError("No `src` was passed to <OffthreadVideo>.");
7958
8371
  }
@@ -8099,7 +8512,7 @@ var OffthreadVideoForRendering = ({
8099
8512
  continueRender2,
8100
8513
  delayRender2
8101
8514
  ]);
8102
- const onErr = useCallback17(() => {
8515
+ const onErr = useCallback18(() => {
8103
8516
  if (onError) {
8104
8517
  onError?.(new Error("Failed to load image with src " + imageSrc));
8105
8518
  } else {
@@ -8109,7 +8522,7 @@ var OffthreadVideoForRendering = ({
8109
8522
  const className = useMemo33(() => {
8110
8523
  return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
8111
8524
  }, [props2.className]);
8112
- const onImageFrame = useCallback17((img) => {
8525
+ const onImageFrame = useCallback18((img) => {
8113
8526
  if (onVideoFrame) {
8114
8527
  onVideoFrame(img);
8115
8528
  }
@@ -8164,7 +8577,7 @@ class MediaPlaybackError extends Error {
8164
8577
  }
8165
8578
  }
8166
8579
  var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8167
- const context = useContext34(SharedAudioContext);
8580
+ const context = useContext35(SharedAudioContext);
8168
8581
  if (!context) {
8169
8582
  throw new Error("SharedAudioContext not found");
8170
8583
  }
@@ -8190,6 +8603,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8190
8603
  volume,
8191
8604
  muted,
8192
8605
  playbackRate,
8606
+ preservePitch,
8193
8607
  onlyWarnForMediaSeekingError,
8194
8608
  src,
8195
8609
  onDuration,
@@ -8220,12 +8634,10 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8220
8634
  }
8221
8635
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
8222
8636
  const { fps, durationInFrames } = useVideoConfig();
8223
- const parentSequence = useContext34(SequenceContext);
8224
- const { hidden } = useContext34(SequenceVisibilityToggleContext);
8637
+ const parentSequence = useContext35(SequenceContext);
8225
8638
  const logLevel = useLogLevel();
8226
8639
  const mountTime = useMountTime();
8227
8640
  const [timelineId] = useState21(() => String(Math.random()));
8228
- const isSequenceHidden = hidden[timelineId] ?? false;
8229
8641
  if (typeof acceptableTimeShift !== "undefined") {
8230
8642
  throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
8231
8643
  }
@@ -8256,6 +8668,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8256
8668
  src,
8257
8669
  mediaType: "video",
8258
8670
  playbackRate: props2.playbackRate ?? 1,
8671
+ preservePitch,
8259
8672
  onlyWarnForMediaSeekingError,
8260
8673
  acceptableTimeshift: acceptableTimeShiftInSeconds ?? null,
8261
8674
  isPremounting: Boolean(parentSequence?.premounting),
@@ -8369,10 +8782,9 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8369
8782
  }, []);
8370
8783
  const actualStyle = useMemo34(() => {
8371
8784
  return {
8372
- ...style,
8373
- opacity: isSequenceHidden ? 0 : style?.opacity ?? 1
8785
+ ...style
8374
8786
  };
8375
- }, [isSequenceHidden, style]);
8787
+ }, [style]);
8376
8788
  const crossOriginValue = getCrossOriginValue({
8377
8789
  crossOrigin,
8378
8790
  requestsVideoFrame: Boolean(onVideoFrame),
@@ -8380,7 +8792,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8380
8792
  });
8381
8793
  return /* @__PURE__ */ jsx31("video", {
8382
8794
  ref: videoRef,
8383
- muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
8795
+ muted: muted || mediaMuted || userPreferredVolume <= 0,
8384
8796
  playsInline: true,
8385
8797
  src: actualSrc,
8386
8798
  loop: _remotionInternalNativeLoopPassed,
@@ -8390,7 +8802,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8390
8802
  ...nativeProps
8391
8803
  });
8392
8804
  };
8393
- var VideoForPreview = forwardRef10(VideoForDevelopmentRefForwardingFunction);
8805
+ var VideoForPreview = forwardRef11(VideoForDevelopmentRefForwardingFunction);
8394
8806
  var InnerOffthreadVideo = (props2) => {
8395
8807
  const {
8396
8808
  startFrom,
@@ -8407,7 +8819,7 @@ var InnerOffthreadVideo = (props2) => {
8407
8819
  if (environment.isClientSideRendering) {
8408
8820
  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");
8409
8821
  }
8410
- const onDuration = useCallback18(() => {
8822
+ const onDuration = useCallback19(() => {
8411
8823
  return;
8412
8824
  }, []);
8413
8825
  if (typeof props2.src !== "string") {
@@ -8495,6 +8907,7 @@ var OffthreadVideo = ({
8495
8907
  onVideoFrame,
8496
8908
  pauseWhenBuffering,
8497
8909
  playbackRate,
8910
+ preservePitch,
8498
8911
  showInTimeline,
8499
8912
  style,
8500
8913
  toneFrequency,
@@ -8530,6 +8943,7 @@ var OffthreadVideo = ({
8530
8943
  onVideoFrame,
8531
8944
  pauseWhenBuffering: pauseWhenBuffering ?? true,
8532
8945
  playbackRate: playbackRate ?? 1,
8946
+ preservePitch,
8533
8947
  toneFrequency: toneFrequency ?? 1,
8534
8948
  showInTimeline: showInTimeline ?? true,
8535
8949
  src,
@@ -8650,7 +9064,6 @@ var Internals = {
8650
9064
  VisualModeSettersContext,
8651
9065
  SequenceManager,
8652
9066
  SequenceStackTracesUpdateContext,
8653
- SequenceVisibilityToggleContext,
8654
9067
  wrapInSchema,
8655
9068
  sequenceSchema,
8656
9069
  sequenceStyleSchema,
@@ -8746,13 +9159,16 @@ var Internals = {
8746
9159
  useEffectChainState,
8747
9160
  runEffectChain,
8748
9161
  useMemoizedEffects,
8749
- defineEffect,
8750
- createDescriptor,
9162
+ useMemoizedEffectDefinitions,
9163
+ createEffect,
8751
9164
  computeEffectiveSchemaValuesDotNotation,
8752
9165
  OverrideIdsToNodePathsGettersContext,
8753
9166
  OverrideIdsToNodePathsSettersContext,
8754
9167
  findPropsToDelete,
8755
- flattenEffects
9168
+ makeSequencePropsSubscriptionKey,
9169
+ getCodeValuesCtx,
9170
+ getEffectCodeValuesCtx,
9171
+ hiddenField
8756
9172
  };
8757
9173
  var NUMBER = "[-+]?\\d*\\.?\\d+";
8758
9174
  var PERCENTAGE = NUMBER + "%";
@@ -8815,7 +9231,7 @@ var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
8815
9231
  children
8816
9232
  });
8817
9233
  };
8818
- var SeriesSequence = forwardRef11(SeriesSequenceRefForwardingFunction);
9234
+ var SeriesSequence = forwardRef12(SeriesSequenceRefForwardingFunction);
8819
9235
  var SeriesInner = (props2) => {
8820
9236
  const childrenValue = useMemo36(() => {
8821
9237
  let startFrame = 0;
@@ -9340,6 +9756,7 @@ var VideoForRenderingForwardFunction = ({
9340
9756
  loopVolumeCurveBehavior,
9341
9757
  audioStreamIndex,
9342
9758
  onVideoFrame,
9759
+ preservePitch: _preservePitch,
9343
9760
  ...props2
9344
9761
  }, ref) => {
9345
9762
  const absoluteFrame = useTimelinePosition();
@@ -9347,13 +9764,13 @@ var VideoForRenderingForwardFunction = ({
9347
9764
  const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
9348
9765
  const videoConfig = useUnsafeVideoConfig();
9349
9766
  const videoRef = useRef23(null);
9350
- const sequenceContext = useContext35(SequenceContext);
9767
+ const sequenceContext = useContext36(SequenceContext);
9351
9768
  const mediaStartsAt = useMediaStartsAt();
9352
9769
  const environment = useRemotionEnvironment();
9353
9770
  const logLevel = useLogLevel();
9354
9771
  const mountTime = useMountTime();
9355
9772
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
9356
- const { registerRenderAsset, unregisterRenderAsset } = useContext35(RenderAssetManager);
9773
+ const { registerRenderAsset, unregisterRenderAsset } = useContext36(RenderAssetManager);
9357
9774
  const id = useMemo37(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
9358
9775
  props2.src,
9359
9776
  sequenceContext?.cumulatedFrom,
@@ -9542,7 +9959,7 @@ var VideoForRenderingForwardFunction = ({
9542
9959
  ...props2
9543
9960
  });
9544
9961
  };
9545
- var VideoForRendering = forwardRef12(VideoForRenderingForwardFunction);
9962
+ var VideoForRendering = forwardRef13(VideoForRenderingForwardFunction);
9546
9963
  var VideoForwardingFunction = (props2, ref) => {
9547
9964
  const {
9548
9965
  startFrom,
@@ -9563,7 +9980,7 @@ var VideoForwardingFunction = (props2, ref) => {
9563
9980
  if (environment.isClientSideRendering) {
9564
9981
  throw new Error("<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
9565
9982
  }
9566
- const { durations, setDurations } = useContext36(DurationsContext);
9983
+ const { durations, setDurations } = useContext37(DurationsContext);
9567
9984
  if (typeof ref === "string") {
9568
9985
  throw new Error("string refs are not supported");
9569
9986
  }
@@ -9571,10 +9988,10 @@ var VideoForwardingFunction = (props2, ref) => {
9571
9988
  throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
9572
9989
  }
9573
9990
  const preloadedSrc = usePreload(props2.src);
9574
- const onDuration = useCallback19((src, durationInSeconds) => {
9991
+ const onDuration = useCallback20((src, durationInSeconds) => {
9575
9992
  setDurations({ type: "got-duration", durationInSeconds, src });
9576
9993
  }, [setDurations]);
9577
- const onVideoFrame = useCallback19(() => {}, []);
9994
+ const onVideoFrame = useCallback20(() => {}, []);
9578
9995
  const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
9579
9996
  validateMediaTrimProps({ startFrom, endAt, trimBefore, trimAfter });
9580
9997
  const { trimBeforeValue, trimAfterValue } = resolveTrimProps({
@@ -9626,7 +10043,11 @@ var VideoForwardingFunction = (props2, ref) => {
9626
10043
  })
9627
10044
  });
9628
10045
  }
9629
- validateMediaProps({ playbackRate: props2.playbackRate, volume: props2.volume }, "Html5Video");
10046
+ validateMediaProps({
10047
+ playbackRate: props2.playbackRate,
10048
+ preservePitch: props2.preservePitch,
10049
+ volume: props2.volume
10050
+ }, "Html5Video");
9630
10051
  if (environment.isRendering) {
9631
10052
  return /* @__PURE__ */ jsx37(VideoForRendering, {
9632
10053
  onDuration,
@@ -9648,7 +10069,7 @@ var VideoForwardingFunction = (props2, ref) => {
9648
10069
  onAutoPlayError: onAutoPlayError ?? undefined
9649
10070
  });
9650
10071
  };
9651
- var Html5Video = forwardRef13(VideoForwardingFunction);
10072
+ var Html5Video = forwardRef14(VideoForwardingFunction);
9652
10073
  addSequenceStackTraces(Html5Video);
9653
10074
  checkMultipleRemotionVersions();
9654
10075
  var proxyObj = {};
@@ -15810,7 +16231,7 @@ import { jsx as jsx112 } from "react/jsx-runtime";
15810
16231
  import { jsx as jsx122 } from "react/jsx-runtime";
15811
16232
  import * as React362 from "react";
15812
16233
  import * as ReactDOM4 from "react-dom";
15813
- import React11 from "react";
16234
+ import React112 from "react";
15814
16235
  import * as React82 from "react";
15815
16236
  import { jsx as jsx132 } from "react/jsx-runtime";
15816
16237
  import * as React9 from "react";
@@ -15820,7 +16241,7 @@ import { jsx as jsx152 } from "react/jsx-runtime";
15820
16241
  import * as React122 from "react";
15821
16242
  import { jsx as jsx162 } from "react/jsx-runtime";
15822
16243
  import * as React16 from "react";
15823
- import * as React132 from "react";
16244
+ import * as React13 from "react";
15824
16245
  import * as ReactDOM from "react-dom";
15825
16246
  import { jsx as jsx172 } from "react/jsx-runtime";
15826
16247
  import * as React14 from "react";
@@ -15848,8 +16269,8 @@ import * as React282 from "react";
15848
16269
  import { jsx as jsx232 } from "react/jsx-runtime";
15849
16270
  import * as React35 from "react";
15850
16271
  import * as React312 from "react";
15851
- import { useState as useState112 } from "react";
15852
16272
  import * as React292 from "react";
16273
+ import { useState as useState112 } from "react";
15853
16274
  import * as React30 from "react";
15854
16275
  import * as React342 from "react";
15855
16276
  import * as React332 from "react";
@@ -16792,13 +17213,13 @@ function createCollection(name) {
16792
17213
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
16793
17214
  const CollectionProvider = (props) => {
16794
17215
  const { scope, children } = props;
16795
- const ref = React11.useRef(null);
16796
- const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
17216
+ const ref = React112.useRef(null);
17217
+ const itemMap = React112.useRef(/* @__PURE__ */ new Map).current;
16797
17218
  return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
16798
17219
  };
16799
17220
  CollectionProvider.displayName = PROVIDER_NAME;
16800
17221
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
16801
- const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
17222
+ const CollectionSlot = React112.forwardRef((props, forwardedRef) => {
16802
17223
  const { scope, children } = props;
16803
17224
  const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
16804
17225
  const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
@@ -16807,12 +17228,12 @@ function createCollection(name) {
16807
17228
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
16808
17229
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
16809
17230
  const ITEM_DATA_ATTR = "data-radix-collection-item";
16810
- const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
17231
+ const CollectionItemSlot = React112.forwardRef((props, forwardedRef) => {
16811
17232
  const { scope, children, ...itemData } = props;
16812
- const ref = React11.useRef(null);
17233
+ const ref = React112.useRef(null);
16813
17234
  const composedRefs = useComposedRefs2(forwardedRef, ref);
16814
17235
  const context = useCollectionContext(ITEM_SLOT_NAME, scope);
16815
- React11.useEffect(() => {
17236
+ React112.useEffect(() => {
16816
17237
  context.itemMap.set(ref, { ref, ...itemData });
16817
17238
  return () => void context.itemMap.delete(ref);
16818
17239
  });
@@ -16821,7 +17242,7 @@ function createCollection(name) {
16821
17242
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
16822
17243
  function useCollection(scope) {
16823
17244
  const context = useCollectionContext(name + "CollectionConsumer", scope);
16824
- const getItems = React11.useCallback(() => {
17245
+ const getItems = React112.useCallback(() => {
16825
17246
  const collectionNode = context.collectionRef.current;
16826
17247
  if (!collectionNode)
16827
17248
  return [];
@@ -16862,7 +17283,7 @@ var NODES = [
16862
17283
  "ul"
16863
17284
  ];
16864
17285
  var Primitive = NODES.reduce((primitive, node) => {
16865
- const Node2 = React132.forwardRef((props, forwardedRef) => {
17286
+ const Node2 = React13.forwardRef((props, forwardedRef) => {
16866
17287
  const { asChild, ...primitiveProps } = props;
16867
17288
  const Comp = asChild ? Slot2 : node;
16868
17289
  if (typeof window !== "undefined") {
@@ -19604,7 +20025,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
19604
20025
  return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
19605
20026
  };
19606
20027
  var __assign = function() {
19607
- __assign = Object.assign || function __assign(t) {
20028
+ __assign = Object.assign || function __assign2(t) {
19608
20029
  for (var s, i = 1, n = arguments.length;i < n; i++) {
19609
20030
  s = arguments[i];
19610
20031
  for (var p in s)
@@ -21391,17 +21812,17 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
21391
21812
  let defaultContexts = [];
21392
21813
  function createContext32(rootComponentName, defaultContext) {
21393
21814
  const BaseContext = React382.createContext(defaultContext);
21394
- const index2 = defaultContexts.length;
21815
+ const index3 = defaultContexts.length;
21395
21816
  defaultContexts = [...defaultContexts, defaultContext];
21396
21817
  const Provider = (props) => {
21397
21818
  const { scope, children, ...context } = props;
21398
- const Context = scope?.[scopeName]?.[index2] || BaseContext;
21819
+ const Context = scope?.[scopeName]?.[index3] || BaseContext;
21399
21820
  const value = React382.useMemo(() => context, Object.values(context));
21400
21821
  return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
21401
21822
  };
21402
21823
  Provider.displayName = rootComponentName + "Provider";
21403
21824
  function useContext222(consumerName, scope) {
21404
- const Context = scope?.[scopeName]?.[index2] || BaseContext;
21825
+ const Context = scope?.[scopeName]?.[index3] || BaseContext;
21405
21826
  const context = React382.useContext(Context);
21406
21827
  if (context)
21407
21828
  return context;
@@ -21598,10 +22019,10 @@ var OrderedDict = class _OrderedDict extends Map {
21598
22019
  super.set(key, value);
21599
22020
  return this;
21600
22021
  }
21601
- insert(index2, key, value) {
22022
+ insert(index3, key, value) {
21602
22023
  const has = this.has(key);
21603
22024
  const length2 = this.#keys.length;
21604
- const relativeIndex = toSafeInteger(index2);
22025
+ const relativeIndex = toSafeInteger(index3);
21605
22026
  let actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
21606
22027
  const safeIndex = actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
21607
22028
  if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {
@@ -21639,39 +22060,39 @@ var OrderedDict = class _OrderedDict extends Map {
21639
22060
  }
21640
22061
  return this;
21641
22062
  }
21642
- with(index2, key, value) {
22063
+ with(index3, key, value) {
21643
22064
  const copy = new _OrderedDict(this);
21644
- copy.insert(index2, key, value);
22065
+ copy.insert(index3, key, value);
21645
22066
  return copy;
21646
22067
  }
21647
22068
  before(key) {
21648
- const index2 = this.#keys.indexOf(key) - 1;
21649
- if (index2 < 0) {
22069
+ const index3 = this.#keys.indexOf(key) - 1;
22070
+ if (index3 < 0) {
21650
22071
  return;
21651
22072
  }
21652
- return this.entryAt(index2);
22073
+ return this.entryAt(index3);
21653
22074
  }
21654
22075
  setBefore(key, newKey, value) {
21655
- const index2 = this.#keys.indexOf(key);
21656
- if (index2 === -1) {
22076
+ const index3 = this.#keys.indexOf(key);
22077
+ if (index3 === -1) {
21657
22078
  return this;
21658
22079
  }
21659
- return this.insert(index2, newKey, value);
22080
+ return this.insert(index3, newKey, value);
21660
22081
  }
21661
22082
  after(key) {
21662
- let index2 = this.#keys.indexOf(key);
21663
- index2 = index2 === -1 || index2 === this.size - 1 ? -1 : index2 + 1;
21664
- if (index2 === -1) {
22083
+ let index3 = this.#keys.indexOf(key);
22084
+ index3 = index3 === -1 || index3 === this.size - 1 ? -1 : index3 + 1;
22085
+ if (index3 === -1) {
21665
22086
  return;
21666
22087
  }
21667
- return this.entryAt(index2);
22088
+ return this.entryAt(index3);
21668
22089
  }
21669
22090
  setAfter(key, newKey, value) {
21670
- const index2 = this.#keys.indexOf(key);
21671
- if (index2 === -1) {
22091
+ const index3 = this.#keys.indexOf(key);
22092
+ if (index3 === -1) {
21672
22093
  return this;
21673
22094
  }
21674
- return this.insert(index2 + 1, newKey, value);
22095
+ return this.insert(index3 + 1, newKey, value);
21675
22096
  }
21676
22097
  first() {
21677
22098
  return this.entryAt(0);
@@ -21690,21 +22111,21 @@ var OrderedDict = class _OrderedDict extends Map {
21690
22111
  }
21691
22112
  return deleted;
21692
22113
  }
21693
- deleteAt(index2) {
21694
- const key = this.keyAt(index2);
22114
+ deleteAt(index3) {
22115
+ const key = this.keyAt(index3);
21695
22116
  if (key !== undefined) {
21696
22117
  return this.delete(key);
21697
22118
  }
21698
22119
  return false;
21699
22120
  }
21700
- at(index2) {
21701
- const key = at(this.#keys, index2);
22121
+ at(index3) {
22122
+ const key = at(this.#keys, index3);
21702
22123
  if (key !== undefined) {
21703
22124
  return this.get(key);
21704
22125
  }
21705
22126
  }
21706
- entryAt(index2) {
21707
- const key = at(this.#keys, index2);
22127
+ entryAt(index3) {
22128
+ const key = at(this.#keys, index3);
21708
22129
  if (key !== undefined) {
21709
22130
  return [key, this.get(key)];
21710
22131
  }
@@ -21712,15 +22133,15 @@ var OrderedDict = class _OrderedDict extends Map {
21712
22133
  indexOf(key) {
21713
22134
  return this.#keys.indexOf(key);
21714
22135
  }
21715
- keyAt(index2) {
21716
- return at(this.#keys, index2);
22136
+ keyAt(index3) {
22137
+ return at(this.#keys, index3);
21717
22138
  }
21718
22139
  from(key, offset4) {
21719
- const index2 = this.indexOf(key);
21720
- if (index2 === -1) {
22140
+ const index3 = this.indexOf(key);
22141
+ if (index3 === -1) {
21721
22142
  return;
21722
22143
  }
21723
- let dest = index2 + offset4;
22144
+ let dest = index3 + offset4;
21724
22145
  if (dest < 0)
21725
22146
  dest = 0;
21726
22147
  if (dest >= this.size)
@@ -21728,11 +22149,11 @@ var OrderedDict = class _OrderedDict extends Map {
21728
22149
  return this.at(dest);
21729
22150
  }
21730
22151
  keyFrom(key, offset4) {
21731
- const index2 = this.indexOf(key);
21732
- if (index2 === -1) {
22152
+ const index3 = this.indexOf(key);
22153
+ if (index3 === -1) {
21733
22154
  return;
21734
22155
  }
21735
- let dest = index2 + offset4;
22156
+ let dest = index3 + offset4;
21736
22157
  if (dest < 0)
21737
22158
  dest = 0;
21738
22159
  if (dest >= this.size)
@@ -21740,68 +22161,68 @@ var OrderedDict = class _OrderedDict extends Map {
21740
22161
  return this.keyAt(dest);
21741
22162
  }
21742
22163
  find(predicate, thisArg) {
21743
- let index2 = 0;
22164
+ let index3 = 0;
21744
22165
  for (const entry of this) {
21745
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
22166
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
21746
22167
  return entry;
21747
22168
  }
21748
- index2++;
22169
+ index3++;
21749
22170
  }
21750
22171
  return;
21751
22172
  }
21752
22173
  findIndex(predicate, thisArg) {
21753
- let index2 = 0;
22174
+ let index3 = 0;
21754
22175
  for (const entry of this) {
21755
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
21756
- return index2;
22176
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
22177
+ return index3;
21757
22178
  }
21758
- index2++;
22179
+ index3++;
21759
22180
  }
21760
22181
  return -1;
21761
22182
  }
21762
22183
  filter(predicate, thisArg) {
21763
22184
  const entries = [];
21764
- let index2 = 0;
22185
+ let index3 = 0;
21765
22186
  for (const entry of this) {
21766
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
22187
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
21767
22188
  entries.push(entry);
21768
22189
  }
21769
- index2++;
22190
+ index3++;
21770
22191
  }
21771
22192
  return new _OrderedDict(entries);
21772
22193
  }
21773
22194
  map(callbackfn, thisArg) {
21774
22195
  const entries = [];
21775
- let index2 = 0;
22196
+ let index3 = 0;
21776
22197
  for (const entry of this) {
21777
- entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index2, this])]);
21778
- index2++;
22198
+ entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index3, this])]);
22199
+ index3++;
21779
22200
  }
21780
22201
  return new _OrderedDict(entries);
21781
22202
  }
21782
22203
  reduce(...args) {
21783
22204
  const [callbackfn, initialValue] = args;
21784
- let index2 = 0;
22205
+ let index3 = 0;
21785
22206
  let accumulator = initialValue ?? this.at(0);
21786
22207
  for (const entry of this) {
21787
- if (index2 === 0 && args.length === 1) {
22208
+ if (index3 === 0 && args.length === 1) {
21788
22209
  accumulator = entry;
21789
22210
  } else {
21790
- accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index2, this]);
22211
+ accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
21791
22212
  }
21792
- index2++;
22213
+ index3++;
21793
22214
  }
21794
22215
  return accumulator;
21795
22216
  }
21796
22217
  reduceRight(...args) {
21797
22218
  const [callbackfn, initialValue] = args;
21798
22219
  let accumulator = initialValue ?? this.at(-1);
21799
- for (let index2 = this.size - 1;index2 >= 0; index2--) {
21800
- const entry = this.at(index2);
21801
- if (index2 === this.size - 1 && args.length === 1) {
22220
+ for (let index3 = this.size - 1;index3 >= 0; index3--) {
22221
+ const entry = this.at(index3);
22222
+ if (index3 === this.size - 1 && args.length === 1) {
21802
22223
  accumulator = entry;
21803
22224
  } else {
21804
- accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index2, this]);
22225
+ accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
21805
22226
  }
21806
22227
  }
21807
22228
  return accumulator;
@@ -21812,8 +22233,8 @@ var OrderedDict = class _OrderedDict extends Map {
21812
22233
  }
21813
22234
  toReversed() {
21814
22235
  const reversed = new _OrderedDict;
21815
- for (let index2 = this.size - 1;index2 >= 0; index2--) {
21816
- const key = this.keyAt(index2);
22236
+ for (let index3 = this.size - 1;index3 >= 0; index3--) {
22237
+ const key = this.keyAt(index3);
21817
22238
  const element = this.get(key);
21818
22239
  reversed.set(key, element);
21819
22240
  }
@@ -21836,44 +22257,44 @@ var OrderedDict = class _OrderedDict extends Map {
21836
22257
  if (end !== undefined && end > 0) {
21837
22258
  stop = end - 1;
21838
22259
  }
21839
- for (let index2 = start;index2 <= stop; index2++) {
21840
- const key = this.keyAt(index2);
22260
+ for (let index3 = start;index3 <= stop; index3++) {
22261
+ const key = this.keyAt(index3);
21841
22262
  const element = this.get(key);
21842
22263
  result.set(key, element);
21843
22264
  }
21844
22265
  return result;
21845
22266
  }
21846
22267
  every(predicate, thisArg) {
21847
- let index2 = 0;
22268
+ let index3 = 0;
21848
22269
  for (const entry of this) {
21849
- if (!Reflect.apply(predicate, thisArg, [entry, index2, this])) {
22270
+ if (!Reflect.apply(predicate, thisArg, [entry, index3, this])) {
21850
22271
  return false;
21851
22272
  }
21852
- index2++;
22273
+ index3++;
21853
22274
  }
21854
22275
  return true;
21855
22276
  }
21856
22277
  some(predicate, thisArg) {
21857
- let index2 = 0;
22278
+ let index3 = 0;
21858
22279
  for (const entry of this) {
21859
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
22280
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
21860
22281
  return true;
21861
22282
  }
21862
- index2++;
22283
+ index3++;
21863
22284
  }
21864
22285
  return false;
21865
22286
  }
21866
22287
  };
21867
- function at(array, index2) {
22288
+ function at(array, index3) {
21868
22289
  if ("at" in Array.prototype) {
21869
- return Array.prototype.at.call(array, index2);
22290
+ return Array.prototype.at.call(array, index3);
21870
22291
  }
21871
- const actualIndex = toSafeIndex(array, index2);
22292
+ const actualIndex = toSafeIndex(array, index3);
21872
22293
  return actualIndex === -1 ? undefined : array[actualIndex];
21873
22294
  }
21874
- function toSafeIndex(array, index2) {
22295
+ function toSafeIndex(array, index3) {
21875
22296
  const length2 = array.length;
21876
- const relativeIndex = toSafeInteger(index2);
22297
+ const relativeIndex = toSafeInteger(index3);
21877
22298
  const actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
21878
22299
  return actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
21879
22300
  }
@@ -21925,7 +22346,7 @@ var Primitive2 = NODES2.reduce((primitive, node) => {
21925
22346
  Node2.displayName = `Primitive.${node}`;
21926
22347
  return { ...primitive, [node]: Node2 };
21927
22348
  }, {});
21928
- function useCallbackRef3(callback) {
22349
+ function useCallbackRef4(callback) {
21929
22350
  const callbackRef = React44.useRef(callback);
21930
22351
  React44.useEffect(() => {
21931
22352
  callbackRef.current = callback;
@@ -22029,7 +22450,7 @@ var RovingFocusGroupImpl = React47.forwardRef((props, forwardedRef) => {
22029
22450
  caller: GROUP_NAME2
22030
22451
  });
22031
22452
  const [isTabbingBackOut, setIsTabbingBackOut] = React47.useState(false);
22032
- const handleEntryFocus = useCallbackRef3(onEntryFocus);
22453
+ const handleEntryFocus = useCallbackRef4(onEntryFocus);
22033
22454
  const getItems = useCollection2(__scopeRovingFocusGroup);
22034
22455
  const isClickFocusRef = React47.useRef(false);
22035
22456
  const [focusableItemsCount, setFocusableItemsCount] = React47.useState(0);
@@ -22182,7 +22603,7 @@ function focusFirst2(candidates, preventScroll = false) {
22182
22603
  }
22183
22604
  }
22184
22605
  function wrapArray2(array, startIndex) {
22185
- return array.map((_, index2) => array[(startIndex + index2) % array.length]);
22606
+ return array.map((_, index3) => array[(startIndex + index3) % array.length]);
22186
22607
  }
22187
22608
  var Root3 = RovingFocusGroup;
22188
22609
  var Item2 = RovingFocusGroupItem;
@@ -22497,7 +22918,7 @@ var Triangle2 = (props) => {
22497
22918
  };
22498
22919
 
22499
22920
  // src/components/homepage/FreePricing.tsx
22500
- import React53, { useCallback as useCallback33, useMemo as useMemo50 } from "react";
22921
+ import React53, { useCallback as useCallback32, useMemo as useMemo50 } from "react";
22501
22922
 
22502
22923
  // ../../node_modules/.bun/tailwind-merge@2.5.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs
22503
22924
  var CLASS_PART_SEPARATOR2 = "-";
@@ -24144,7 +24565,7 @@ var CompanyPricing = () => {
24144
24565
  const [automatorsSelected, setAutomatorsSelected] = React53.useState(true);
24145
24566
  const [devSeatCount, setDevSeatCount] = React53.useState(3);
24146
24567
  const [cloudRenders, setCloudRenders] = React53.useState(1e4);
24147
- const formatPrice = useCallback33((price) => {
24568
+ const formatPrice = useCallback32((price) => {
24148
24569
  const formatter = new Intl.NumberFormat("en-US", {
24149
24570
  style: "currency",
24150
24571
  currency: "USD",
@@ -24198,23 +24619,23 @@ var CompanyPricing = () => {
24198
24619
  style: { height: 30 }
24199
24620
  }),
24200
24621
  /* @__PURE__ */ jsx47(SectionCheckbox, {
24201
- checked: creatorsSelected,
24202
- onChange: setCreatorsSelected,
24203
- title: "Remotion for Creators",
24204
- subtitle: "Create videos for yourself - $25/mo per seat"
24622
+ checked: automatorsSelected,
24623
+ onChange: setAutomatorsSelected,
24624
+ title: "Remotion for Automators",
24625
+ subtitle: "Build video creation tools - $0.01 per render, $100/mo minimum"
24205
24626
  }),
24206
24627
  /* @__PURE__ */ jsx47("div", {
24207
- className: cn2("grid ease-out", creatorsSelected ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"),
24628
+ className: cn2("grid ease-out", automatorsSelected ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"),
24208
24629
  style: {
24209
- transition: creatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
24630
+ transition: automatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
24210
24631
  },
24211
- inert: !creatorsSelected,
24632
+ inert: !automatorsSelected,
24212
24633
  children: /* @__PURE__ */ jsxs8("div", {
24213
24634
  className: "overflow-hidden",
24214
24635
  children: [
24215
24636
  /* @__PURE__ */ jsx47("p", {
24216
24637
  className: "text-sm text-muted fontbrand pt-3 pb-1",
24217
- children: "Intended for low volume video creations through coding and prompting, and building motion design systems in a local environment. Get 1 Seat per user."
24638
+ children: "Intended for companies launching applications and systems; such as video editors, prompt-to-video apps, embedding the Remotion Player, or any other automated video creation. A $100/mo Minimum Spend applies. Developers working on automation projects do not require a Seat."
24218
24639
  }),
24219
24640
  /* @__PURE__ */ jsxs8("div", {
24220
24641
  className: "flex flex-row items-center gap-3 sm:gap-4 w-full pt-3 pb-1",
@@ -24222,19 +24643,19 @@ var CompanyPricing = () => {
24222
24643
  /* @__PURE__ */ jsx47("div", {
24223
24644
  className: "flex-1 min-w-0",
24224
24645
  children: /* @__PURE__ */ jsx47(PricingSlider, {
24225
- value: devSeatCount,
24226
- onChange: setDevSeatCount,
24227
- min: 1,
24228
- max: 50,
24229
- "aria-label": "Number of seats"
24646
+ value: cloudRenders,
24647
+ onChange: setCloudRenders,
24648
+ min: 1000,
24649
+ max: 1e5,
24650
+ step: 1000,
24651
+ "aria-label": "Number of renders"
24230
24652
  })
24231
24653
  }),
24232
24654
  /* @__PURE__ */ jsxs8("div", {
24233
- className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-center tabular-nums",
24655
+ className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-right tabular-nums",
24234
24656
  children: [
24235
- devSeatCount,
24236
- " ",
24237
- devSeatCount === 1 ? "Seat" : "Seats"
24657
+ new Intl.NumberFormat("en-US").format(cloudRenders),
24658
+ " Renders"
24238
24659
  ]
24239
24660
  }),
24240
24661
  /* @__PURE__ */ jsxs8("div", {
@@ -24243,7 +24664,7 @@ var CompanyPricing = () => {
24243
24664
  "$",
24244
24665
  new Intl.NumberFormat("en-US", {
24245
24666
  maximumFractionDigits: 0
24246
- }).format(SEAT_PRICE * devSeatCount)
24667
+ }).format(Math.ceil(cloudRenders / 1000) * RENDER_UNIT_PRICE)
24247
24668
  ]
24248
24669
  })
24249
24670
  ]
@@ -24255,23 +24676,23 @@ var CompanyPricing = () => {
24255
24676
  className: "h-6"
24256
24677
  }),
24257
24678
  /* @__PURE__ */ jsx47(SectionCheckbox, {
24258
- checked: automatorsSelected,
24259
- onChange: setAutomatorsSelected,
24260
- title: "Remotion for Automators",
24261
- subtitle: "Build video creation tools - $0.01 per render, $100/mo minimum"
24679
+ checked: creatorsSelected,
24680
+ onChange: setCreatorsSelected,
24681
+ title: "Remotion for Creators",
24682
+ subtitle: "Create videos for yourself - $25/mo per seat"
24262
24683
  }),
24263
24684
  /* @__PURE__ */ jsx47("div", {
24264
- className: cn2("grid ease-out", automatorsSelected ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"),
24685
+ className: cn2("grid ease-out", creatorsSelected ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"),
24265
24686
  style: {
24266
- transition: automatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
24687
+ transition: creatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
24267
24688
  },
24268
- inert: !automatorsSelected,
24689
+ inert: !creatorsSelected,
24269
24690
  children: /* @__PURE__ */ jsxs8("div", {
24270
24691
  className: "overflow-hidden",
24271
24692
  children: [
24272
24693
  /* @__PURE__ */ jsx47("p", {
24273
24694
  className: "text-sm text-muted fontbrand pt-3 pb-1",
24274
- children: "Intended for companies launching SaaS applications; such as video editors and prompt-to-video apps, and automated high-volume video creation. A $100/mo Minimum Spend applies. Developers working on automation projects do not require a Seat."
24695
+ children: "Intended for low volume video creations through coding and prompting, and building motion design systems in a local environment. Get 1 Seat per user."
24275
24696
  }),
24276
24697
  /* @__PURE__ */ jsxs8("div", {
24277
24698
  className: "flex flex-row items-center gap-3 sm:gap-4 w-full pt-3 pb-1",
@@ -24279,19 +24700,19 @@ var CompanyPricing = () => {
24279
24700
  /* @__PURE__ */ jsx47("div", {
24280
24701
  className: "flex-1 min-w-0",
24281
24702
  children: /* @__PURE__ */ jsx47(PricingSlider, {
24282
- value: cloudRenders,
24283
- onChange: setCloudRenders,
24284
- min: 1000,
24285
- max: 1e5,
24286
- step: 1000,
24287
- "aria-label": "Number of renders"
24703
+ value: devSeatCount,
24704
+ onChange: setDevSeatCount,
24705
+ min: 1,
24706
+ max: 50,
24707
+ "aria-label": "Number of seats"
24288
24708
  })
24289
24709
  }),
24290
24710
  /* @__PURE__ */ jsxs8("div", {
24291
- className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-right tabular-nums",
24711
+ className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-center tabular-nums",
24292
24712
  children: [
24293
- new Intl.NumberFormat("en-US").format(cloudRenders),
24294
- " Renders"
24713
+ devSeatCount,
24714
+ " ",
24715
+ devSeatCount === 1 ? "Seat" : "Seats"
24295
24716
  ]
24296
24717
  }),
24297
24718
  /* @__PURE__ */ jsxs8("div", {
@@ -24300,7 +24721,7 @@ var CompanyPricing = () => {
24300
24721
  "$",
24301
24722
  new Intl.NumberFormat("en-US", {
24302
24723
  maximumFractionDigits: 0
24303
- }).format(Math.ceil(cloudRenders / 1000) * RENDER_UNIT_PRICE)
24724
+ }).format(SEAT_PRICE * devSeatCount)
24304
24725
  ]
24305
24726
  })
24306
24727
  ]
@@ -24674,7 +25095,7 @@ var GitHubStars = () => {
24674
25095
  width: "45px"
24675
25096
  }),
24676
25097
  /* @__PURE__ */ jsx50(StatItemContent, {
24677
- content: "46k",
25098
+ content: "47k",
24678
25099
  width: "80px",
24679
25100
  fontSize: "2.5rem",
24680
25101
  fontWeight: "bold"
@@ -24863,19 +25284,20 @@ var CommunityStats = () => /* @__PURE__ */ jsxs12("div", {
24863
25284
  var CommunityStats_default = CommunityStats;
24864
25285
 
24865
25286
  // ../player/dist/esm/index.mjs
25287
+ import { createContext as createContext32 } from "react";
24866
25288
  import { jsx as jsx56, jsxs as jsxs13 } from "react/jsx-runtime";
24867
25289
  import { jsx as jsx214, jsxs as jsxs24, Fragment as Fragment11 } from "react/jsx-runtime";
24868
25290
  import React56 from "react";
24869
25291
  import { useContext as useContext210, useEffect as useEffect42, useState as useState40 } from "react";
24870
- import { useContext as useContext43, useLayoutEffect as useLayoutEffect17 } from "react";
25292
+ import { useContext as useContext44, useLayoutEffect as useLayoutEffect17 } from "react";
24871
25293
  import { jsx as jsx313 } from "react/jsx-runtime";
24872
25294
  import { useEffect as useEffect24, useState as useState24 } from "react";
24873
25295
  import { useLayoutEffect as useLayoutEffect23 } from "react";
24874
- import { useContext as useContext44, useEffect as useEffect52, useRef as useRef42 } from "react";
25296
+ import { useContext as useContext45, useEffect as useEffect52, useRef as useRef42 } from "react";
24875
25297
  import { useEffect as useEffect310, useRef as useRef26 } from "react";
24876
- import { useCallback as useCallback34, useContext as useContext38, useMemo as useMemo51, useRef as useRef43, useState as useState310 } from "react";
25298
+ import { useCallback as useCallback33, useContext as useContext39, useMemo as useMemo51, useRef as useRef43, useState as useState310 } from "react";
24877
25299
  import { useEffect as useEffect43, useRef as useRef310 } from "react";
24878
- import { useCallback as useCallback24, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
25300
+ import { useCallback as useCallback210, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
24879
25301
  import {
24880
25302
  forwardRef as forwardRef210,
24881
25303
  useEffect as useEffect132,
@@ -24887,7 +25309,7 @@ import {
24887
25309
  } from "react";
24888
25310
  import React102, {
24889
25311
  Suspense as Suspense2,
24890
- forwardRef as forwardRef33,
25312
+ forwardRef as forwardRef34,
24891
25313
  useCallback as useCallback102,
24892
25314
  useContext as useContext52,
24893
25315
  useEffect as useEffect122,
@@ -24903,7 +25325,7 @@ import { jsx as jsx55 } from "react/jsx-runtime";
24903
25325
  import { useCallback as useCallback72, useEffect as useEffect112, useMemo as useMemo92, useRef as useRef82, useState as useState102 } from "react";
24904
25326
  import { jsx as jsx64 } from "react/jsx-runtime";
24905
25327
  import { useCallback as useCallback42, useMemo as useMemo410, useRef as useRef52, useState as useState62 } from "react";
24906
- import React54, { useCallback as useCallback35, useMemo as useMemo39, useState as useState52 } from "react";
25328
+ import React54, { useCallback as useCallback34, useMemo as useMemo39, useState as useState52 } from "react";
24907
25329
  import { jsx as jsx74, jsxs as jsxs33 } from "react/jsx-runtime";
24908
25330
  import { jsx as jsx84, jsxs as jsxs43 } from "react/jsx-runtime";
24909
25331
  import { useCallback as useCallback52, useEffect as useEffect92, useMemo as useMemo52, useState as useState82 } from "react";
@@ -24986,6 +25408,23 @@ function checkInfiniteRange2(name, arr) {
24986
25408
  }
24987
25409
  }
24988
25410
  }
25411
+ function assertValidInterpolateEasingOption2(easing, inputRangeLength) {
25412
+ if (easing === undefined) {
25413
+ return;
25414
+ }
25415
+ if (typeof easing === "function") {
25416
+ return;
25417
+ }
25418
+ const expectedLength = inputRangeLength - 1;
25419
+ if (easing.length !== expectedLength) {
25420
+ throw new Error(`When easing is an array, it must have one entry per segment between keyframes (length inputRange.length - 1 = ${expectedLength}), but got length ${easing.length}`);
25421
+ }
25422
+ for (let i = 0;i < easing.length; i++) {
25423
+ if (typeof easing[i] !== "function") {
25424
+ throw new Error(`easing[${i}] must be a function`);
25425
+ }
25426
+ }
25427
+ }
24989
25428
  function interpolate3(input, inputRange, outputRange, options2) {
24990
25429
  if (typeof input === "undefined") {
24991
25430
  throw new Error("input can not be undefined");
@@ -25002,7 +25441,18 @@ function interpolate3(input, inputRange, outputRange, options2) {
25002
25441
  checkInfiniteRange2("inputRange", inputRange);
25003
25442
  checkInfiniteRange2("outputRange", outputRange);
25004
25443
  checkValidInputRange2(inputRange);
25005
- const easing = options2?.easing ?? ((num) => num);
25444
+ assertValidInterpolateEasingOption2(options2?.easing, inputRange.length);
25445
+ const easingOption = options2?.easing;
25446
+ const defaultEasing = (num) => num;
25447
+ const resolveEasingForSegment = (segmentIndex) => {
25448
+ if (easingOption === undefined) {
25449
+ return defaultEasing;
25450
+ }
25451
+ if (typeof easingOption === "function") {
25452
+ return easingOption;
25453
+ }
25454
+ return easingOption[segmentIndex];
25455
+ };
25006
25456
  let extrapolateLeft = "extend";
25007
25457
  if (options2?.extrapolateLeft !== undefined) {
25008
25458
  extrapolateLeft = options2.extrapolateLeft;
@@ -25016,7 +25466,7 @@ function interpolate3(input, inputRange, outputRange, options2) {
25016
25466
  }
25017
25467
  const range = findRange2(input, inputRange);
25018
25468
  return interpolateFunction2(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
25019
- easing,
25469
+ easing: resolveEasingForSegment(range),
25020
25470
  extrapolateLeft,
25021
25471
  extrapolateRight
25022
25472
  });
@@ -25570,6 +26020,76 @@ var proResProfileOptions = [
25570
26020
  "light",
25571
26021
  "proxy"
25572
26022
  ];
26023
+ var sequenceStyleSchema2 = {
26024
+ "style.translate": {
26025
+ type: "translate",
26026
+ step: 1,
26027
+ default: "0px 0px",
26028
+ description: "Offset"
26029
+ },
26030
+ "style.scale": {
26031
+ type: "number",
26032
+ min: 0.05,
26033
+ max: 100,
26034
+ step: 0.01,
26035
+ default: 1,
26036
+ description: "Scale"
26037
+ },
26038
+ "style.rotate": {
26039
+ type: "rotation",
26040
+ step: 1,
26041
+ default: "0deg",
26042
+ description: "Rotation"
26043
+ },
26044
+ "style.opacity": {
26045
+ type: "number",
26046
+ min: 0,
26047
+ max: 1,
26048
+ step: 0.01,
26049
+ default: 1,
26050
+ description: "Opacity"
26051
+ },
26052
+ premountFor: {
26053
+ type: "number",
26054
+ default: 0,
26055
+ description: "Premount For",
26056
+ min: 0,
26057
+ step: 1
26058
+ },
26059
+ postmountFor: {
26060
+ type: "hidden"
26061
+ },
26062
+ styleWhilePremounted: {
26063
+ type: "hidden"
26064
+ },
26065
+ styleWhilePostmounted: {
26066
+ type: "hidden"
26067
+ }
26068
+ };
26069
+ var hiddenField2 = {
26070
+ type: "boolean",
26071
+ default: false,
26072
+ description: "Hidden"
26073
+ };
26074
+ var sequenceSchema2 = {
26075
+ hidden: hiddenField2,
26076
+ layout: {
26077
+ type: "enum",
26078
+ default: "absolute-fill",
26079
+ description: "Layout",
26080
+ variants: {
26081
+ "absolute-fill": sequenceStyleSchema2,
26082
+ none: {}
26083
+ }
26084
+ }
26085
+ };
26086
+ var sequenceSchemaDefaultLayoutNone2 = {
26087
+ ...sequenceSchema2,
26088
+ layout: {
26089
+ ...sequenceSchema2.layout,
26090
+ default: "none"
26091
+ }
26092
+ };
25573
26093
  var ENABLE_V5_BREAKING_CHANGES2 = false;
25574
26094
  var validateFrame2 = ({
25575
26095
  allowFloats,
@@ -25733,7 +26253,8 @@ var NoReactInternals = {
25733
26253
  FILE_TOKEN: FILE_TOKEN2,
25734
26254
  validateCodec: validateCodec2,
25735
26255
  proResProfileOptions,
25736
- findPropsToDelete: findPropsToDelete2
26256
+ findPropsToDelete: findPropsToDelete2,
26257
+ sequenceSchema: sequenceSchema2
25737
26258
  };
25738
26259
 
25739
26260
  // ../player/dist/esm/index.mjs
@@ -25746,8 +26267,8 @@ import {
25746
26267
  useRef as useRef132,
25747
26268
  useState as useState142
25748
26269
  } from "react";
25749
- import React133, {
25750
- forwardRef as forwardRef34,
26270
+ import React132, {
26271
+ forwardRef as forwardRef35,
25751
26272
  Suspense as Suspense22,
25752
26273
  useCallback as useCallback122,
25753
26274
  useImperativeHandle as useImperativeHandle32,
@@ -25758,6 +26279,21 @@ import { useContext as useContext62, useMemo as useMemo152 } from "react";
25758
26279
  import { jsx as jsx153 } from "react/jsx-runtime";
25759
26280
  import { jsx as jsx163 } from "react/jsx-runtime";
25760
26281
  "use client";
26282
+ if (typeof createContext32 !== "function") {
26283
+ const err = [
26284
+ 'Remotion requires React.createContext, but it is "undefined".',
26285
+ 'If you are in a React Server Component, turn it into a client component by adding "use client" at the top of the file.',
26286
+ "",
26287
+ "Before:",
26288
+ ' import {Player} from "@remotion/player";',
26289
+ "",
26290
+ "After:",
26291
+ ' "use client";',
26292
+ ' import {Player} from "@remotion/player";'
26293
+ ];
26294
+ throw new Error(err.join(`
26295
+ `));
26296
+ }
25761
26297
  var ICON_SIZE2 = 25;
25762
26298
  var fullscreenIconSize = 16;
25763
26299
  var PlayIcon = () => {
@@ -26190,7 +26726,7 @@ class ThumbnailEmitter {
26190
26726
  };
26191
26727
  }
26192
26728
  var useBufferStateEmitter = (emitter) => {
26193
- const bufferManager = useContext43(Internals.BufferingContextReact);
26729
+ const bufferManager = useContext44(Internals.BufferingContextReact);
26194
26730
  if (!bufferManager) {
26195
26731
  throw new Error("BufferingContextReact not found");
26196
26732
  }
@@ -26273,33 +26809,33 @@ var usePlayer = () => {
26273
26809
  const playStart = useRef43(frame);
26274
26810
  const setFrame = Internals.Timeline.useTimelineSetFrame();
26275
26811
  const setTimelinePosition = Internals.Timeline.useTimelineSetFrame();
26276
- const audioContext = useContext38(Internals.SharedAudioContext);
26277
- const audioTagsContext = useContext38(Internals.SharedAudioTagsContext);
26812
+ const audioContext = useContext39(Internals.SharedAudioContext);
26813
+ const audioTagsContext = useContext39(Internals.SharedAudioTagsContext);
26278
26814
  const { audioAndVideoTags } = Internals.useTimelineContext();
26279
26815
  const frameRef = useRef43(frame);
26280
26816
  frameRef.current = frame;
26281
26817
  const video = Internals.useVideo();
26282
26818
  const config = Internals.useUnsafeVideoConfig();
26283
- const emitter = useContext38(PlayerEventEmitterContext);
26819
+ const emitter = useContext39(PlayerEventEmitterContext);
26284
26820
  const lastFrame = (config?.durationInFrames ?? 1) - 1;
26285
26821
  const isLastFrame = frame === lastFrame;
26286
26822
  const isFirstFrame = frame === 0;
26287
26823
  if (!emitter) {
26288
26824
  throw new TypeError("Expected Player event emitter context");
26289
26825
  }
26290
- const bufferingContext = useContext38(Internals.BufferingContextReact);
26826
+ const bufferingContext = useContext39(Internals.BufferingContextReact);
26291
26827
  if (!bufferingContext) {
26292
26828
  throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");
26293
26829
  }
26294
26830
  const { buffering } = bufferingContext;
26295
- const seek2 = useCallback34((newFrame) => {
26831
+ const seek2 = useCallback33((newFrame) => {
26296
26832
  if (video?.id) {
26297
26833
  setTimelinePosition((c) => ({ ...c, [video.id]: newFrame }));
26298
26834
  }
26299
26835
  frameRef.current = newFrame;
26300
26836
  emitter.dispatchSeek(newFrame);
26301
26837
  }, [emitter, setTimelinePosition, video?.id]);
26302
- const play = useCallback34((e) => {
26838
+ const play = useCallback33((e) => {
26303
26839
  if (imperativePlaying.current) {
26304
26840
  return;
26305
26841
  }
@@ -26326,7 +26862,7 @@ var usePlayer = () => {
26326
26862
  seek2,
26327
26863
  audioAndVideoTags
26328
26864
  ]);
26329
- const pause = useCallback34(() => {
26865
+ const pause = useCallback33(() => {
26330
26866
  if (imperativePlaying.current) {
26331
26867
  imperativePlaying.current = false;
26332
26868
  setPlaying(false);
@@ -26334,7 +26870,7 @@ var usePlayer = () => {
26334
26870
  audioContext?.suspend();
26335
26871
  }
26336
26872
  }, [emitter, imperativePlaying, setPlaying, audioContext]);
26337
- const pauseAndReturnToPlayStart = useCallback34(() => {
26873
+ const pauseAndReturnToPlayStart = useCallback33(() => {
26338
26874
  if (imperativePlaying.current) {
26339
26875
  imperativePlaying.current = false;
26340
26876
  frameRef.current = playStart.current;
@@ -26349,7 +26885,7 @@ var usePlayer = () => {
26349
26885
  }
26350
26886
  }, [config, emitter, imperativePlaying, setPlaying, setTimelinePosition]);
26351
26887
  const videoId = video?.id;
26352
- const frameBack = useCallback34((frames) => {
26888
+ const frameBack = useCallback33((frames) => {
26353
26889
  if (!videoId) {
26354
26890
  return null;
26355
26891
  }
@@ -26368,7 +26904,7 @@ var usePlayer = () => {
26368
26904
  };
26369
26905
  });
26370
26906
  }, [imperativePlaying, setFrame, videoId]);
26371
- const frameForward = useCallback34((frames) => {
26907
+ const frameForward = useCallback33((frames) => {
26372
26908
  if (!videoId) {
26373
26909
  return null;
26374
26910
  }
@@ -26387,20 +26923,20 @@ var usePlayer = () => {
26387
26923
  };
26388
26924
  });
26389
26925
  }, [videoId, imperativePlaying, lastFrame, setFrame]);
26390
- const toggle = useCallback34((e) => {
26926
+ const toggle = useCallback33((e) => {
26391
26927
  if (imperativePlaying.current) {
26392
26928
  pause();
26393
26929
  } else {
26394
26930
  play(e);
26395
26931
  }
26396
26932
  }, [imperativePlaying, pause, play]);
26397
- const isPlaying = useCallback34(() => {
26933
+ const isPlaying = useCallback33(() => {
26398
26934
  return imperativePlaying.current;
26399
26935
  }, [imperativePlaying]);
26400
- const getCurrentFrame = useCallback34(() => {
26936
+ const getCurrentFrame = useCallback33(() => {
26401
26937
  return frameRef.current;
26402
26938
  }, [frameRef]);
26403
- const isBuffering = useCallback34(() => {
26939
+ const isBuffering = useCallback33(() => {
26404
26940
  return buffering.current;
26405
26941
  }, [buffering]);
26406
26942
  const returnValue = useMemo51(() => {
@@ -26635,11 +27171,11 @@ var usePlayback = ({
26635
27171
  const frame = Internals.Timeline.useTimelinePosition();
26636
27172
  const { playing, pause, emitter, isPlaying } = usePlayer();
26637
27173
  const setFrame = Internals.Timeline.useTimelineSetFrame();
26638
- const sharedAudioContext = useContext44(Internals.SharedAudioContext);
27174
+ const sharedAudioContext = useContext45(Internals.SharedAudioContext);
26639
27175
  const logLevel = Internals.useLogLevel();
26640
27176
  const isBackgroundedRef = useIsBackgrounded();
26641
27177
  const lastTimeUpdateTimestamp = useRef42(0);
26642
- const context = useContext44(Internals.BufferingContextReact);
27178
+ const context = useContext45(Internals.BufferingContextReact);
26643
27179
  if (!context) {
26644
27180
  throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");
26645
27181
  }
@@ -26905,7 +27441,7 @@ var useElementSize = (ref, options2) => {
26905
27441
  });
26906
27442
  });
26907
27443
  }, [options2.shouldApplyCssTransforms]);
26908
- const updateSize = useCallback24(() => {
27444
+ const updateSize = useCallback210(() => {
26909
27445
  if (!ref.current) {
26910
27446
  return;
26911
27447
  }
@@ -27126,7 +27662,7 @@ var DefaultVolumeSlider = ({
27126
27662
  }, [isVertical]);
27127
27663
  const randomId = typeof React54.useId === "undefined" ? "volume-slider" : React54.useId();
27128
27664
  const [randomClass] = useState52(() => `__remotion-volume-slider-${random(randomId)}`.replace(".", ""));
27129
- const onVolumeChange = useCallback35((e) => {
27665
+ const onVolumeChange = useCallback34((e) => {
27130
27666
  setVolume(parseFloat(e.target.value));
27131
27667
  }, [setVolume]);
27132
27668
  const inputStyle = useMemo39(() => {
@@ -28564,7 +29100,7 @@ var PlayerUI = ({
28564
29100
  })
28565
29101
  });
28566
29102
  };
28567
- var PlayerUI_default = forwardRef33(PlayerUI);
29103
+ var PlayerUI_default = forwardRef34(PlayerUI);
28568
29104
  var DEFAULT_VOLUME_PERSISTENCE_KEY = "remotion.volumePreference";
28569
29105
  var persistVolume = (volume, logLevel, volumePersistenceKey) => {
28570
29106
  if (typeof window === "undefined") {
@@ -29091,7 +29627,7 @@ var useThumbnail = () => {
29091
29627
  }, [emitter]);
29092
29628
  return returnValue;
29093
29629
  };
29094
- var reactVersion2 = React133.version.split(".")[0];
29630
+ var reactVersion2 = React132.version.split(".")[0];
29095
29631
  if (reactVersion2 === "0") {
29096
29632
  throw new Error(`Version ${reactVersion2} of "react" is not supported by Remotion`);
29097
29633
  }
@@ -29210,7 +29746,7 @@ var ThumbnailUI = ({
29210
29746
  })
29211
29747
  });
29212
29748
  };
29213
- var ThumbnailUI_default = forwardRef34(ThumbnailUI);
29749
+ var ThumbnailUI_default = forwardRef35(ThumbnailUI);
29214
29750
  var ThumbnailFn = ({
29215
29751
  frameToDisplay,
29216
29752
  style: style2,
@@ -29304,7 +29840,7 @@ var Thumbnail = forward2(ThumbnailFn);
29304
29840
 
29305
29841
  // src/components/homepage/Demo/index.tsx
29306
29842
  import {
29307
- useCallback as useCallback49,
29843
+ useCallback as useCallback48,
29308
29844
  useEffect as useEffect58,
29309
29845
  useMemo as useMemo64,
29310
29846
  useRef as useRef53,
@@ -29363,7 +29899,7 @@ function _isNativeReflectConstruct() {
29363
29899
  try {
29364
29900
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
29365
29901
  } catch (t2) {}
29366
- return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
29902
+ return (_isNativeReflectConstruct = function _isNativeReflectConstruct2() {
29367
29903
  return !!t;
29368
29904
  })();
29369
29905
  }
@@ -29381,7 +29917,7 @@ function _construct(t, e, r2) {
29381
29917
  // ../../node_modules/.bun/@babel+runtime@7.27.1/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
29382
29918
  function _wrapNativeSuper(t) {
29383
29919
  var r2 = typeof Map == "function" ? new Map : undefined;
29384
- return _wrapNativeSuper = function _wrapNativeSuper(t2) {
29920
+ return _wrapNativeSuper = function _wrapNativeSuper2(t2) {
29385
29921
  if (t2 === null || !_isNativeFunction(t2))
29386
29922
  return t2;
29387
29923
  if (typeof t2 != "function")
@@ -30057,7 +30593,7 @@ var UNDERLAY_RED = curriedTransparentize$1(0.9, RED);
30057
30593
  var BLUE_TEXT = curriedDarken$1(0.3, "#42e9f5");
30058
30594
 
30059
30595
  // src/components/homepage/layout/use-color-mode.tsx
30060
- import React57, { useContext as useContext45, useMemo as useMemo53 } from "react";
30596
+ import React57, { useContext as useContext46, useMemo as useMemo53 } from "react";
30061
30597
  import { jsx as jsx57 } from "react/jsx-runtime";
30062
30598
  var Context = React57.createContext(undefined);
30063
30599
  var ColorModeProvider = ({
@@ -30074,7 +30610,7 @@ var ColorModeProvider = ({
30074
30610
  });
30075
30611
  };
30076
30612
  function useColorMode() {
30077
- const context = useContext45(Context);
30613
+ const context = useContext46(Context);
30078
30614
  if (context === null || context === undefined) {
30079
30615
  throw new Error("ColorModeProvider");
30080
30616
  }
@@ -30088,9 +30624,9 @@ import { useContext as useContext212, useEffect as useEffect44, useMemo as useMe
30088
30624
  import { ALL_FORMATS, Input as Input2, UrlSource } from "mediabunny";
30089
30625
  import { AudioBufferSink, InputDisposedError } from "mediabunny";
30090
30626
  import { CanvasSink } from "mediabunny";
30091
- import { useContext as useContext47, useLayoutEffect as useLayoutEffect18 } from "react";
30627
+ import { useContext as useContext48, useLayoutEffect as useLayoutEffect18 } from "react";
30092
30628
  import { jsx as jsx58 } from "react/jsx-runtime";
30093
- import { useContext as useContext310, useLayoutEffect as useLayoutEffect24, useMemo as useMemo213, useState as useState210 } from "react";
30629
+ import { useContext as useContext311, useLayoutEffect as useLayoutEffect24, useMemo as useMemo213, useState as useState210 } from "react";
30094
30630
  import React211 from "react";
30095
30631
  import {
30096
30632
  ALL_FORMATS as ALL_FORMATS2,
@@ -30106,7 +30642,7 @@ import { jsx as jsx216 } from "react/jsx-runtime";
30106
30642
  import { jsx as jsx315 } from "react/jsx-runtime";
30107
30643
  import { useMemo as useMemo63, useState as useState63 } from "react";
30108
30644
  import {
30109
- useContext as useContext46,
30645
+ useContext as useContext47,
30110
30646
  useEffect as useEffect210,
30111
30647
  useLayoutEffect as useLayoutEffect34,
30112
30648
  useMemo as useMemo412,
@@ -31180,8 +31716,7 @@ var videoIteratorManager = async ({
31180
31716
  getStartTime,
31181
31717
  getIsLooping,
31182
31718
  getEffects,
31183
- getEffectChainState,
31184
- getCurrentFrame
31719
+ getEffectChainState
31185
31720
  }) => {
31186
31721
  let videoIteratorsCreated = 0;
31187
31722
  let videoFrameIterator = null;
@@ -31211,7 +31746,6 @@ var videoIteratorManager = async ({
31211
31746
  source: frame.canvas,
31212
31747
  effects,
31213
31748
  output: canvas,
31214
- frame: getCurrentFrame(),
31215
31749
  width: canvas.width,
31216
31750
  height: canvas.height
31217
31751
  });
@@ -31324,7 +31858,6 @@ class MediaPlayer {
31324
31858
  onVideoFrameCallback = null;
31325
31859
  getEffects;
31326
31860
  getEffectChainState;
31327
- getCurrentFrame;
31328
31861
  initializationPromise = null;
31329
31862
  bufferState;
31330
31863
  isPremounting;
@@ -31353,8 +31886,7 @@ class MediaPlayer {
31353
31886
  credentials,
31354
31887
  tagType,
31355
31888
  getEffects,
31356
- getEffectChainState,
31357
- getCurrentFrame
31889
+ getEffectChainState
31358
31890
  }) {
31359
31891
  this.canvas = canvas ?? null;
31360
31892
  this.src = src;
@@ -31385,7 +31917,6 @@ class MediaPlayer {
31385
31917
  this.tagType = tagType;
31386
31918
  this.getEffects = getEffects;
31387
31919
  this.getEffectChainState = getEffectChainState;
31388
- this.getCurrentFrame = getCurrentFrame;
31389
31920
  if (canvas) {
31390
31921
  const context = canvas.getContext("2d", {
31391
31922
  alpha: true,
@@ -31495,8 +32026,7 @@ class MediaPlayer {
31495
32026
  getStartTime: () => this.getStartTime(),
31496
32027
  getIsLooping: () => this.loop,
31497
32028
  getEffects: this.getEffects,
31498
- getEffectChainState: this.getEffectChainState,
31499
- getCurrentFrame: this.getCurrentFrame
32029
+ getEffectChainState: this.getEffectChainState
31500
32030
  });
31501
32031
  }
31502
32032
  const startTime = this.getTrimmedTime(startTimeUnresolved);
@@ -31873,7 +32403,7 @@ var useCommonEffects = ({
31873
32403
  logLevel,
31874
32404
  label: label3
31875
32405
  }) => {
31876
- const sharedAudioContext = useContext47(Internals.SharedAudioContext);
32406
+ const sharedAudioContext = useContext48(Internals.SharedAudioContext);
31877
32407
  useLayoutEffect18(() => {
31878
32408
  const mediaPlayer = mediaPlayerRef.current;
31879
32409
  if (!mediaPlayer)
@@ -32143,8 +32673,7 @@ var AudioForPreviewAssertedShowing = ({
32143
32673
  credentials,
32144
32674
  tagType: "audio",
32145
32675
  getEffects: () => [],
32146
- getEffectChainState: () => null,
32147
- getCurrentFrame: () => 0
32676
+ getEffectChainState: () => null
32148
32677
  });
32149
32678
  mediaPlayerRef.current = player;
32150
32679
  player.initialize(currentTimeRef.current, initialMuted.current).then((result) => {
@@ -34149,7 +34678,7 @@ var AudioForRendering2 = ({
34149
34678
  const frame = useCurrentFrame();
34150
34679
  const absoluteFrame = Internals.useTimelinePosition();
34151
34680
  const videoConfig = Internals.useUnsafeVideoConfig();
34152
- const { registerRenderAsset, unregisterRenderAsset } = useContext310(Internals.RenderAssetManager);
34681
+ const { registerRenderAsset, unregisterRenderAsset } = useContext311(Internals.RenderAssetManager);
34153
34682
  const startsAt = Internals.useMediaStartsAt();
34154
34683
  const environment = useRemotionEnvironment();
34155
34684
  if (!videoConfig) {
@@ -34161,7 +34690,7 @@ var AudioForRendering2 = ({
34161
34690
  const { fps } = videoConfig;
34162
34691
  const { delayRender: delayRender2, continueRender } = useDelayRender();
34163
34692
  const [replaceWithHtml5Audio, setReplaceWithHtml5Audio] = useState210(false);
34164
- const sequenceContext = useContext310(Internals.SequenceContext);
34693
+ const sequenceContext = useContext311(Internals.SequenceContext);
34165
34694
  const id = useMemo213(() => `media-audio-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
34166
34695
  src,
34167
34696
  sequenceContext?.cumulatedFrom,
@@ -34320,6 +34849,7 @@ var AudioForRendering2 = ({
34320
34849
  onError: fallbackHtml5AudioProps?.onError,
34321
34850
  toneFrequency,
34322
34851
  acceptableTimeShiftInSeconds: fallbackHtml5AudioProps?.acceptableTimeShiftInSeconds,
34852
+ preservePitch: fallbackHtml5AudioProps?.preservePitch ?? true,
34323
34853
  name,
34324
34854
  showInTimeline
34325
34855
  });
@@ -34343,7 +34873,8 @@ var audioSchema = {
34343
34873
  default: 1,
34344
34874
  description: "Playback Rate"
34345
34875
  },
34346
- loop: { type: "boolean", default: false, description: "Loop" }
34876
+ loop: { type: "boolean", default: false, description: "Loop" },
34877
+ hidden: Internals.hiddenField
34347
34878
  };
34348
34879
  var AudioInner = (props) => {
34349
34880
  const {
@@ -34353,6 +34884,7 @@ var AudioInner = (props) => {
34353
34884
  _experimentalControls: controls,
34354
34885
  from,
34355
34886
  durationInFrames,
34887
+ hidden,
34356
34888
  ...otherProps
34357
34889
  } = props;
34358
34890
  const environment = useRemotionEnvironment();
@@ -34412,6 +34944,7 @@ var AudioInner = (props) => {
34412
34944
  _experimentalControls: controls,
34413
34945
  _remotionInternalLoopDisplay: loopDisplay,
34414
34946
  showInTimeline: showInTimeline ?? true,
34947
+ hidden,
34415
34948
  children: environment.isRendering ? /* @__PURE__ */ jsx315(AudioForRendering2, {
34416
34949
  ...otherProps
34417
34950
  }) : /* @__PURE__ */ jsx315(AudioForPreview2, {
@@ -34514,7 +35047,7 @@ var VideoForPreviewAssertedShowing = ({
34514
35047
  const [shouldFallbackToNativeVideo, setShouldFallbackToNativeVideo] = useState43(false);
34515
35048
  const [playing] = Timeline2.usePlayingState();
34516
35049
  const { playbackRate: globalPlaybackRate } = Internals.usePlaybackRate();
34517
- const sharedAudioContext = useContext46(SharedAudioContext22);
35050
+ const sharedAudioContext = useContext47(SharedAudioContext22);
34518
35051
  const buffer = useBufferState();
34519
35052
  const [mediaMuted] = useMediaMutedState22();
34520
35053
  const [mediaVolume] = useMediaVolumeState22();
@@ -34533,9 +35066,7 @@ var VideoForPreviewAssertedShowing = ({
34533
35066
  experimentalEffectsRef.current = _experimentalEffects;
34534
35067
  const effectChainStateRef = useRef210(effectChainState);
34535
35068
  effectChainStateRef.current = effectChainState;
34536
- const frameRef = useRef210(frame);
34537
- frameRef.current = frame;
34538
- const parentSequence = useContext46(SequenceContext22);
35069
+ const parentSequence = useContext47(SequenceContext22);
34539
35070
  const isPremounting = Boolean(parentSequence?.premounting);
34540
35071
  const isPostmounting = Boolean(parentSequence?.postmounting);
34541
35072
  const sequenceOffset = ((parentSequence?.cumulatedFrom ?? 0) + (parentSequence?.relativeFrom ?? 0)) / videoConfig.fps;
@@ -34543,7 +35074,7 @@ var VideoForPreviewAssertedShowing = ({
34543
35074
  const currentTimeRef = useRef210(currentTime);
34544
35075
  currentTimeRef.current = currentTime;
34545
35076
  const preloadedSrc = usePreload22(src);
34546
- const buffering = useContext46(Internals.BufferingContextReact);
35077
+ const buffering = useContext47(Internals.BufferingContextReact);
34547
35078
  if (!buffering) {
34548
35079
  throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
34549
35080
  }
@@ -34640,8 +35171,7 @@ var VideoForPreviewAssertedShowing = ({
34640
35171
  credentials,
34641
35172
  tagType: "video",
34642
35173
  getEffects: () => experimentalEffectsRef.current,
34643
- getEffectChainState: (width, height) => effectChainStateRef.current?.get(width, height),
34644
- getCurrentFrame: () => frameRef.current
35174
+ getEffectChainState: (width, height) => effectChainStateRef.current?.get(width, height)
34645
35175
  });
34646
35176
  mediaPlayerRef.current = player;
34647
35177
  player.initialize(currentTimeRef.current, initialMuted.current).then((result) => {
@@ -35105,6 +35635,7 @@ var VideoForRendering2 = ({
35105
35635
  trimAfter: trimAfterValue,
35106
35636
  trimBefore: trimBeforeValue,
35107
35637
  useWebAudioApi: fallbackOffthreadVideoProps?.useWebAudioApi ?? false,
35638
+ preservePitch: fallbackOffthreadVideoProps?.preservePitch ?? true,
35108
35639
  startFrom: undefined,
35109
35640
  endAt: undefined,
35110
35641
  stack,
@@ -35155,6 +35686,11 @@ var videoSchema = {
35155
35686
  default: 1,
35156
35687
  description: "Playback Rate"
35157
35688
  },
35689
+ hidden: {
35690
+ type: "boolean",
35691
+ default: false,
35692
+ description: "Hidden"
35693
+ },
35158
35694
  loop: { type: "boolean", default: false, description: "Loop" },
35159
35695
  ...Internals.sequenceStyleSchema
35160
35696
  };
@@ -35293,7 +35829,8 @@ var VideoInner = ({
35293
35829
  _experimentalInitiallyDrawCachedFrame,
35294
35830
  _experimentalEffects,
35295
35831
  durationInFrames,
35296
- from
35832
+ from,
35833
+ hidden
35297
35834
  }) => {
35298
35835
  const fallbackLogLevel = Internals.useLogLevel();
35299
35836
  const [mediaVolume] = Internals.useMediaVolumeState();
@@ -35335,7 +35872,11 @@ var VideoInner = ({
35335
35872
  type: "video",
35336
35873
  data: basicInfo
35337
35874
  }), [basicInfo]);
35338
- const memoizedEffects = Internals.useMemoizedEffects(Internals.flattenEffects(_experimentalEffects ?? []));
35875
+ const memoizedEffects = Internals.useMemoizedEffects({
35876
+ effects: _experimentalEffects ?? [],
35877
+ overrideId: controls?.overrideId ?? null
35878
+ });
35879
+ const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(_experimentalEffects ?? []);
35339
35880
  if (sequenceDurationInFrames === 0) {
35340
35881
  return null;
35341
35882
  }
@@ -35348,8 +35889,9 @@ var VideoInner = ({
35348
35889
  name: name ?? "<Video>",
35349
35890
  _experimentalControls: controls,
35350
35891
  _remotionInternalLoopDisplay: loopDisplay,
35351
- _experimentalEffects: memoizedEffects,
35892
+ _experimentalEffects: memoizedEffectDefinitions,
35352
35893
  showInTimeline: showInTimeline ?? true,
35894
+ hidden,
35353
35895
  children: /* @__PURE__ */ jsx65(InnerVideo, {
35354
35896
  audioStreamIndex: audioStreamIndex ?? 0,
35355
35897
  className: className2,
@@ -35387,19 +35929,19 @@ var Video = Internals.wrapInSchema(VideoInner, videoSchema);
35387
35929
  Internals.addSequenceStackTraces(Video);
35388
35930
 
35389
35931
  // src/components/homepage/Demo/Comp.tsx
35390
- import { useCallback as useCallback41, useEffect as useEffect50, useMemo as useMemo58, useState as useState48 } from "react";
35932
+ import { useCallback as useCallback40, useEffect as useEffect50, useMemo as useMemo58, useState as useState48 } from "react";
35391
35933
 
35392
35934
  // src/components/homepage/Demo/Cards.tsx
35393
35935
  import {
35394
35936
  createRef as createRef4,
35395
- useCallback as useCallback40,
35937
+ useCallback as useCallback39,
35396
35938
  useEffect as useEffect49,
35397
35939
  useRef as useRef49,
35398
35940
  useState as useState47
35399
35941
  } from "react";
35400
35942
 
35401
35943
  // src/components/homepage/Demo/Card.tsx
35402
- import { useCallback as useCallback38, useRef as useRef46 } from "react";
35944
+ import { useCallback as useCallback37, useRef as useRef46 } from "react";
35403
35945
 
35404
35946
  // src/components/homepage/Demo/math.ts
35405
35947
  var paddingAndMargin = 20;
@@ -35433,10 +35975,10 @@ var getIndexFromPosition = (clientX, clientY) => {
35433
35975
  };
35434
35976
 
35435
35977
  // src/components/homepage/Demo/Switcher.tsx
35436
- import { useCallback as useCallback36 } from "react";
35978
+ import { useCallback as useCallback35 } from "react";
35437
35979
  import { jsx as jsx60, jsxs as jsxs14 } from "react/jsx-runtime";
35438
35980
  var Switcher = ({ type, theme, onTap }) => {
35439
- const onPointerDown = useCallback36((e) => {
35981
+ const onPointerDown = useCallback35((e) => {
35440
35982
  e.stopPropagation();
35441
35983
  onTap();
35442
35984
  }, [onTap]);
@@ -35499,7 +36041,7 @@ var Card2 = ({
35499
36041
  const refToUse = refsToUse[index2];
35500
36042
  const stopPrevious = useRef46([]);
35501
36043
  let newIndices = [...indices];
35502
- const applyPositions = useCallback38((except) => {
36044
+ const applyPositions = useCallback37((except) => {
35503
36045
  let stopped = false;
35504
36046
  stopPrevious.current.forEach((s) => {
35505
36047
  s();
@@ -35572,7 +36114,7 @@ var Card2 = ({
35572
36114
  update();
35573
36115
  });
35574
36116
  }, [newIndices, onUpdate, positions, refsToUse, shouldBePositions]);
35575
- const onPointerDown = useCallback38((e) => {
36117
+ const onPointerDown = useCallback37((e) => {
35576
36118
  e.currentTarget.setPointerCapture(e.pointerId);
35577
36119
  const cardLeft = refToUse.current.offsetLeft;
35578
36120
  const cardTop = refToUse.current.offsetTop;
@@ -35633,7 +36175,7 @@ var Card2 = ({
35633
36175
  }, { once: true });
35634
36176
  refToUse.current.addEventListener("pointermove", onMove);
35635
36177
  }, [applyPositions, index2, positions, refToUse, shouldBePositions]);
35636
- const onPointerUp = useCallback38((e) => {
36178
+ const onPointerUp = useCallback37((e) => {
35637
36179
  e.currentTarget.releasePointerCapture(e.pointerId);
35638
36180
  }, []);
35639
36181
  const { x, y } = getPositionForIndex(index2);
@@ -35759,8 +36301,8 @@ var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
35759
36301
 
35760
36302
  // src/components/homepage/Demo/EmojiCard.tsx
35761
36303
  import {
35762
- forwardRef as forwardRef35,
35763
- useCallback as useCallback39,
36304
+ forwardRef as forwardRef36,
36305
+ useCallback as useCallback38,
35764
36306
  useEffect as useEffect48,
35765
36307
  useImperativeHandle as useImperativeHandle12,
35766
36308
  useRef as useRef48
@@ -36044,7 +36586,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
36044
36586
  const ref2 = useRef48(null);
36045
36587
  const ref3 = useRef48(null);
36046
36588
  const transforms = useRef48([-100, 0, 100]);
36047
- const onLeft = useCallback39(() => {
36589
+ const onLeft = useCallback38(() => {
36048
36590
  if (!ref1.current || !ref2.current || !ref3.current) {
36049
36591
  return;
36050
36592
  }
@@ -36055,7 +36597,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
36055
36597
  transforms: transforms.current
36056
36598
  });
36057
36599
  }, []);
36058
- const onRight = useCallback39(() => {
36600
+ const onRight = useCallback38(() => {
36059
36601
  if (!ref1.current || !ref2.current || !ref3.current) {
36060
36602
  return;
36061
36603
  }
@@ -36156,7 +36698,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
36156
36698
  ]
36157
36699
  });
36158
36700
  };
36159
- var EmojiCard = forwardRef35(EmojiCardRefFn);
36701
+ var EmojiCard = forwardRef36(EmojiCardRefFn);
36160
36702
 
36161
36703
  // src/components/homepage/Demo/Minus.tsx
36162
36704
  import { jsx as jsx75 } from "react/jsx-runtime";
@@ -36515,11 +37057,11 @@ var Cards = ({
36515
37057
  };
36516
37058
  }, [onToggle]);
36517
37059
  const ref = useRef49(null);
36518
- const onLeft = useCallback40(() => {
37060
+ const onLeft = useCallback39(() => {
36519
37061
  ref.current?.onRight();
36520
37062
  onRightPress();
36521
37063
  }, [onRightPress]);
36522
- const onRight = useCallback40(() => {
37064
+ const onRight = useCallback39(() => {
36523
37065
  ref.current?.onLeft();
36524
37066
  onLeftPress();
36525
37067
  }, [onLeftPress]);
@@ -36589,7 +37131,7 @@ var HomepageVideoComp = ({
36589
37131
  onClickRight
36590
37132
  }) => {
36591
37133
  const [rerenders, setRerenders] = useState48(0);
36592
- const onUpdate = useCallback41((newIndices) => {
37134
+ const onUpdate = useCallback40((newIndices) => {
36593
37135
  setRerenders(rerenders + 1);
36594
37136
  updateCardOrder(newIndices);
36595
37137
  }, [rerenders, updateCardOrder]);
@@ -36687,7 +37229,7 @@ import {
36687
37229
  import { BufferTarget, StreamTarget } from "mediabunny";
36688
37230
 
36689
37231
  // ../core/dist/esm/version.mjs
36690
- var VERSION2 = "4.0.461";
37232
+ var VERSION2 = "4.0.463";
36691
37233
 
36692
37234
  // ../web-renderer/dist/esm/index.mjs
36693
37235
  import { AudioSample, VideoSample } from "mediabunny";
@@ -41316,7 +41858,7 @@ var renderMediaOnWeb = (options2) => {
41316
41858
  };
41317
41859
 
41318
41860
  // src/components/homepage/Demo/DemoRender.tsx
41319
- import React68, { useCallback as useCallback43 } from "react";
41861
+ import React68, { useCallback as useCallback41 } from "react";
41320
41862
  import { z } from "zod";
41321
41863
 
41322
41864
  // src/components/homepage/Demo/DemoErrorIcon.tsx
@@ -41517,7 +42059,7 @@ var RenderButton = ({ renderData, onError, playerRef }) => {
41517
42059
  const [state, setState] = React68.useState({
41518
42060
  type: "idle"
41519
42061
  });
41520
- const triggerRender = useCallback43(async () => {
42062
+ const triggerRender = useCallback41(async () => {
41521
42063
  if (renderData === null) {
41522
42064
  return;
41523
42065
  }
@@ -41692,10 +42234,10 @@ var DragAndDropNudge = () => {
41692
42234
  };
41693
42235
 
41694
42236
  // src/components/homepage/Demo/PlayerSeekBar.tsx
41695
- import { useCallback as useCallback46, useEffect as useEffect53, useMemo as useMemo61, useRef as useRef50, useState as useState51 } from "react";
42237
+ import { useCallback as useCallback45, useEffect as useEffect53, useMemo as useMemo61, useRef as useRef50, useState as useState51 } from "react";
41696
42238
 
41697
42239
  // src/components/homepage/layout/use-el-size.ts
41698
- import { useCallback as useCallback45, useEffect as useEffect51, useMemo as useMemo60, useState as useState50 } from "react";
42240
+ import { useCallback as useCallback43, useEffect as useEffect51, useMemo as useMemo60, useState as useState50 } from "react";
41699
42241
  var useElementSize2 = (ref) => {
41700
42242
  const [size4, setSize] = useState50(null);
41701
42243
  const observer = useMemo60(() => {
@@ -41709,7 +42251,7 @@ var useElementSize2 = (ref) => {
41709
42251
  });
41710
42252
  });
41711
42253
  }, []);
41712
- const updateSize = useCallback45(() => {
42254
+ const updateSize = useCallback43(() => {
41713
42255
  if (ref === null) {
41714
42256
  return;
41715
42257
  }
@@ -41861,7 +42403,7 @@ var PlayerSeekBar2 = ({
41861
42403
  dragging: false
41862
42404
  });
41863
42405
  const width2 = size4?.width ?? 0;
41864
- const onPointerDown = useCallback46((e) => {
42406
+ const onPointerDown = useCallback45((e) => {
41865
42407
  if (e.button !== 0) {
41866
42408
  return;
41867
42409
  }
@@ -41875,7 +42417,7 @@ var PlayerSeekBar2 = ({
41875
42417
  });
41876
42418
  onSeekStart();
41877
42419
  }, [durationInFrames, width2, playerRef, playing, onSeekStart]);
41878
- const onPointerMove = useCallback46((e) => {
42420
+ const onPointerMove = useCallback45((e) => {
41879
42421
  if (!size4) {
41880
42422
  throw new Error("Player has no size");
41881
42423
  }
@@ -41886,7 +42428,7 @@ var PlayerSeekBar2 = ({
41886
42428
  const _frame = getFrameFromX2(e.clientX - posLeft, durationInFrames, size4.width);
41887
42429
  playerRef.current.seekTo(_frame);
41888
42430
  }, [dragging.dragging, durationInFrames, playerRef, size4]);
41889
- const onPointerUp = useCallback46(() => {
42431
+ const onPointerUp = useCallback45(() => {
41890
42432
  setDragging({
41891
42433
  dragging: false
41892
42434
  });
@@ -41970,7 +42512,7 @@ var PlayerSeekBar2 = ({
41970
42512
  };
41971
42513
 
41972
42514
  // src/components/homepage/Demo/PlayerVolume.tsx
41973
- import { useCallback as useCallback47, useEffect as useEffect55, useRef as useRef51, useState as useState54 } from "react";
42515
+ import { useCallback as useCallback46, useEffect as useEffect55, useRef as useRef51, useState as useState54 } from "react";
41974
42516
 
41975
42517
  // src/components/homepage/Demo/icons.tsx
41976
42518
  import { jsx as jsx101 } from "react/jsx-runtime";
@@ -42051,7 +42593,7 @@ var PlayerVolume = ({ playerRef }) => {
42051
42593
  document.body.style.userSelect = "auto";
42052
42594
  }
42053
42595
  }, [isHovered]);
42054
- const onClick = useCallback47(() => {
42596
+ const onClick = useCallback46(() => {
42055
42597
  if (timerRef.current !== null) {
42056
42598
  clearTimeout(timerRef.current);
42057
42599
  timerRef.current = null;
@@ -42089,7 +42631,7 @@ var PlayerVolume = ({ playerRef }) => {
42089
42631
  };
42090
42632
 
42091
42633
  // src/components/homepage/Demo/PlayPauseButton.tsx
42092
- import React71, { useCallback as useCallback48, useEffect as useEffect56 } from "react";
42634
+ import React71, { useCallback as useCallback47, useEffect as useEffect56 } from "react";
42093
42635
  import { jsx as jsx107 } from "react/jsx-runtime";
42094
42636
  var playerButtonStyle2 = {
42095
42637
  appearance: "none",
@@ -42125,7 +42667,7 @@ var PlayPauseButton = ({ playerRef }) => {
42125
42667
  current.removeEventListener("pause", onPause);
42126
42668
  };
42127
42669
  }, [playerRef]);
42128
- const onToggle = useCallback48(() => {
42670
+ const onToggle = useCallback47(() => {
42129
42671
  playerRef.current?.toggle();
42130
42672
  }, [playerRef]);
42131
42673
  const playPauseIconStyle = {
@@ -42345,7 +42887,7 @@ var Demo = () => {
42345
42887
  playerRef.removeEventListener("fullscreenchange", onFullscreenChange);
42346
42888
  };
42347
42889
  }, [data2]);
42348
- const updateCardOrder = useCallback49((newCardOrder) => {
42890
+ const updateCardOrder = useCallback48((newCardOrder) => {
42349
42891
  setCardOrder(newCardOrder);
42350
42892
  }, []);
42351
42893
  const props = useMemo64(() => {
@@ -42367,7 +42909,7 @@ var Demo = () => {
42367
42909
  emojiIndex
42368
42910
  };
42369
42911
  }, [cardOrder, emojiIndex, colorMode, data2, updateCardOrder]);
42370
- const onError = useCallback49(() => {
42912
+ const onError = useCallback48(() => {
42371
42913
  setError(true);
42372
42914
  }, []);
42373
42915
  return /* @__PURE__ */ jsxs38("div", {
@@ -42477,12 +43019,12 @@ var ClearButton = (props) => {
42477
43019
 
42478
43020
  // src/components/homepage/MuxVideo.tsx
42479
43021
  import Hls2 from "hls.js";
42480
- import { forwardRef as forwardRef38, useEffect as useEffect60, useImperativeHandle as useImperativeHandle14, useRef as useRef56 } from "react";
43022
+ import { forwardRef as forwardRef39, useEffect as useEffect60, useImperativeHandle as useImperativeHandle14, useRef as useRef56 } from "react";
42481
43023
 
42482
43024
  // src/components/homepage/VideoPlayerWithControls.tsx
42483
43025
  import Hls from "hls.js";
42484
43026
  import"plyr/dist/plyr.css";
42485
- import { forwardRef as forwardRef37, useCallback as useCallback50, useEffect as useEffect59, useRef as useRef55, useState as useState57 } from "react";
43027
+ import { forwardRef as forwardRef38, useCallback as useCallback49, useEffect as useEffect59, useRef as useRef55, useState as useState57 } from "react";
42486
43028
  import { jsx as jsx116 } from "react/jsx-runtime";
42487
43029
  var useCombinedRefs = function(...refs) {
42488
43030
  const targetRef = useRef55(null);
@@ -42499,13 +43041,13 @@ var useCombinedRefs = function(...refs) {
42499
43041
  }, [refs]);
42500
43042
  return targetRef;
42501
43043
  };
42502
- var VideoPlayerWithControls = forwardRef37(({ playbackId, poster, currentTime, onLoaded, onError, onSize, autoPlay }, ref) => {
43044
+ var VideoPlayerWithControls = forwardRef38(({ playbackId, poster, currentTime, onLoaded, onError, onSize, autoPlay }, ref) => {
42503
43045
  const videoRef = useRef55(null);
42504
43046
  const metaRef = useCombinedRefs(ref, videoRef);
42505
43047
  const playerRef = useRef55(null);
42506
43048
  const [playerInitTime] = useState57(Date.now());
42507
- const videoError = useCallback50((event) => onError(event), [onError]);
42508
- const onImageLoad = useCallback50((event) => {
43049
+ const videoError = useCallback49((event) => onError(event), [onError]);
43050
+ const onImageLoad = useCallback49((event) => {
42509
43051
  const [w, h] = [event.target.width, event.target.height];
42510
43052
  if (w && h) {
42511
43053
  onSize({ width: w, height: h });
@@ -42615,7 +43157,7 @@ var MuxVideoForward = ({ muxId, ...props }, ref) => {
42615
43157
  ...props
42616
43158
  });
42617
43159
  };
42618
- var MuxVideo = forwardRef38(MuxVideoForward);
43160
+ var MuxVideo = forwardRef39(MuxVideoForward);
42619
43161
 
42620
43162
  // src/components/homepage/EditorStarterSection.tsx
42621
43163
  import { jsx as jsx118, jsxs as jsxs39 } from "react/jsx-runtime";
@@ -42879,13 +43421,13 @@ var IfYouKnowReact = () => {
42879
43421
  };
42880
43422
 
42881
43423
  // src/components/homepage/NewsletterButton.tsx
42882
- import { useCallback as useCallback51, useState as useState60 } from "react";
43424
+ import { useCallback as useCallback50, useState as useState60 } from "react";
42883
43425
  import { jsx as jsx121, jsxs as jsxs44 } from "react/jsx-runtime";
42884
43426
  var NewsletterButton = () => {
42885
43427
  const [email, setEmail] = useState60("");
42886
43428
  const [submitting, setSubmitting] = useState60(false);
42887
43429
  const [subscribed, setSubscribed] = useState60(false);
42888
- const handleSubmit = useCallback51(async (e) => {
43430
+ const handleSubmit = useCallback50(async (e) => {
42889
43431
  try {
42890
43432
  setSubmitting(true);
42891
43433
  e.preventDefault();
@@ -43669,6 +44211,7 @@ var listOfRemotionPackages = [
43669
44211
  "@remotion/serverless",
43670
44212
  "@remotion/serverless-client",
43671
44213
  "@remotion/skills",
44214
+ "@remotion/skills-evals",
43672
44215
  "@remotion/studio-server",
43673
44216
  "@remotion/studio-shared",
43674
44217
  "@remotion/studio",
@@ -44951,7 +45494,7 @@ var GithubButton = () => {
44951
45494
  " ",
44952
45495
  /* @__PURE__ */ jsx164("div", {
44953
45496
  className: "text-xs inline-block ml-2 leading-none mt-[3px] self-center",
44954
- children: "46k"
45497
+ children: "47k"
44955
45498
  })
44956
45499
  ]
44957
45500
  });