@remotion/promo-pages 4.0.462 → 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 +1218 -946
  2. package/dist/design.js +1142 -878
  3. package/dist/experts/experts-data.js +5 -16
  4. package/dist/experts.js +1034 -770
  5. package/dist/homepage/Pricing.js +1146 -882
  6. package/dist/prompts/PromptsGallery.js +1138 -874
  7. package/dist/prompts/PromptsShow.js +1212 -948
  8. package/dist/prompts/PromptsSubmit.js +1214 -950
  9. package/dist/team.js +1134 -870
  10. package/dist/template-modal-content.js +1144 -880
  11. package/dist/templates.js +1134 -870
  12. package/package.json +13 -13
  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 -19
  44. package/dist/components/experts/experts-data.js +0 -391
  45. package/dist/components/experts/experts-icons.d.ts +0 -8
  46. package/dist/components/experts/experts-icons.js +0 -42
  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/design.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);
@@ -5743,8 +5732,21 @@ import * as React6 from "react";
5743
5732
  import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
5744
5733
  import { useContext as useContext8, useMemo as useMemo7 } from "react";
5745
5734
  import { jsx as jsx72 } from "react/jsx-runtime";
5746
- import { useEffect as useEffect4, useMemo as useMemo12, useState as useState4 } from "react";
5747
- import { useContext as useContext11 } from "react";
5735
+ import {
5736
+ forwardRef as forwardRef4,
5737
+ useCallback as useCallback6,
5738
+ useEffect as useEffect5,
5739
+ useMemo as useMemo16,
5740
+ useState as useState6
5741
+ } from "react";
5742
+ import {
5743
+ forwardRef as forwardRef3,
5744
+ useContext as useContext17,
5745
+ useEffect as useEffect3,
5746
+ useMemo as useMemo14,
5747
+ useState as useState5
5748
+ } from "react";
5749
+ import { useContext as useContext14, useMemo as useMemo11 } from "react";
5748
5750
  import { createContext as createContext12 } from "react";
5749
5751
  import { useContext as useContext10, useMemo as useMemo9 } from "react";
5750
5752
  import {
@@ -5755,41 +5757,34 @@ import {
5755
5757
  useState as useState2
5756
5758
  } from "react";
5757
5759
  import { jsx as jsx82 } from "react/jsx-runtime";
5758
- import { useEffect as useEffect3, useMemo as useMemo10, useRef as useRef4 } from "react";
5759
- import { useContext as useContext12, useRef as useRef6 } from "react";
5760
- import { createContext as createContext14 } from "react";
5761
- import React10, { useCallback as useCallback5, useMemo as useMemo11, useRef as useRef5, useState as useState3 } from "react";
5760
+ import { useContext as useContext11 } from "react";
5761
+ import { useContext as useContext13 } from "react";
5762
+ import { useContext as useContext12, useMemo as useMemo10 } from "react";
5762
5763
  import { jsx as jsx92 } from "react/jsx-runtime";
5764
+ import { createContext as createContext14 } from "react";
5765
+ import React11, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
5763
5766
  import { jsx as jsx102 } from "react/jsx-runtime";
5764
- import {
5765
- forwardRef as forwardRef3,
5766
- useContext as useContext17,
5767
- useEffect as useEffect5,
5768
- useMemo as useMemo16,
5769
- useState as useState6
5770
- } from "react";
5771
- import { useContext as useContext15, useMemo as useMemo14 } from "react";
5772
- import { useContext as useContext14 } from "react";
5773
- import { useContext as useContext13, useMemo as useMemo13 } from "react";
5774
- import { jsx as jsx112 } from "react/jsx-runtime";
5767
+ import React12, { forwardRef as forwardRef2, useState as useState4, useContext as useContext16, useMemo as useMemo13 } from "react";
5768
+ import { useContext as useContext15, useRef as useRef5 } from "react";
5775
5769
  import { createContext as createContext15 } from "react";
5776
- import React13, { forwardRef as forwardRef2, useState as useState5, useContext as useContext16, useMemo as useMemo15 } from "react";
5770
+ import { jsx as jsx112 } from "react/jsx-runtime";
5771
+ import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef6 } from "react";
5777
5772
  import { jsx as jsx12 } from "react/jsx-runtime";
5778
5773
  import {
5779
- forwardRef as forwardRef4,
5774
+ forwardRef as forwardRef5,
5780
5775
  useEffect as useEffect6,
5781
5776
  useImperativeHandle as useImperativeHandle2,
5782
5777
  useLayoutEffect as useLayoutEffect2,
5783
5778
  useRef as useRef8,
5784
5779
  useState as useState7
5785
5780
  } from "react";
5786
- import React15, { useCallback as useCallback6, useImperativeHandle, useRef as useRef7 } from "react";
5781
+ import React15, { useCallback as useCallback7, useImperativeHandle, useRef as useRef7 } from "react";
5787
5782
  import { jsx as jsx13 } from "react/jsx-runtime";
5788
5783
  import { jsx as jsx14 } from "react/jsx-runtime";
5789
5784
  import {
5790
5785
  createContext as createContext16,
5791
- forwardRef as forwardRef5,
5792
- useCallback as useCallback7,
5786
+ forwardRef as forwardRef6,
5787
+ useCallback as useCallback8,
5793
5788
  useContext as useContext18,
5794
5789
  useLayoutEffect as useLayoutEffect3,
5795
5790
  useMemo as useMemo17,
@@ -5800,7 +5795,7 @@ import { jsx as jsx15 } from "react/jsx-runtime";
5800
5795
  import { useContext as useContext19, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
5801
5796
  import {
5802
5797
  createContext as createContext17,
5803
- useCallback as useCallback8,
5798
+ useCallback as useCallback9,
5804
5799
  useImperativeHandle as useImperativeHandle3,
5805
5800
  useLayoutEffect as useLayoutEffect4,
5806
5801
  useMemo as useMemo18,
@@ -5808,7 +5803,7 @@ import {
5808
5803
  useState as useState9
5809
5804
  } from "react";
5810
5805
  import { jsx as jsx16 } from "react/jsx-runtime";
5811
- import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as useContext31 } from "react";
5806
+ import { forwardRef as forwardRef9, useCallback as useCallback14, useContext as useContext31 } from "react";
5812
5807
  import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
5813
5808
  import { jsx as jsx17 } from "react/jsx-runtime";
5814
5809
  import { useContext as useContext20 } from "react";
@@ -5817,7 +5812,7 @@ import { jsx as jsx18 } from "react/jsx-runtime";
5817
5812
  import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
5818
5813
  import { jsx as jsx19 } from "react/jsx-runtime";
5819
5814
  import React23, {
5820
- forwardRef as forwardRef6,
5815
+ forwardRef as forwardRef7,
5821
5816
  useContext as useContext29,
5822
5817
  useEffect as useEffect14,
5823
5818
  useImperativeHandle as useImperativeHandle4,
@@ -5829,7 +5824,7 @@ import { useContext as useContext22, useLayoutEffect as useLayoutEffect6, useRef
5829
5824
  import React20, {
5830
5825
  createContext as createContext21,
5831
5826
  createRef as createRef2,
5832
- useCallback as useCallback9,
5827
+ useCallback as useCallback10,
5833
5828
  useContext as useContext21,
5834
5829
  useMemo as useMemo22,
5835
5830
  useRef as useRef11,
@@ -5841,16 +5836,16 @@ import { useRef as useRef12 } from "react";
5841
5836
  import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo23, useState as useState13 } from "react";
5842
5837
  import { useContext as useContext23 } from "react";
5843
5838
  import {
5844
- useCallback as useCallback12,
5839
+ useCallback as useCallback13,
5845
5840
  useContext as useContext27,
5846
5841
  useEffect as useEffect12,
5847
5842
  useLayoutEffect as useLayoutEffect8,
5848
5843
  useRef as useRef17
5849
5844
  } from "react";
5850
- import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef15 } from "react";
5845
+ import { useCallback as useCallback12, useMemo as useMemo26, useRef as useRef15 } from "react";
5851
5846
  import { useContext as useContext26, useMemo as useMemo25 } from "react";
5852
5847
  import React21, {
5853
- useCallback as useCallback10,
5848
+ useCallback as useCallback11,
5854
5849
  useContext as useContext25,
5855
5850
  useEffect as useEffect9,
5856
5851
  useLayoutEffect as useLayoutEffect7,
@@ -5866,7 +5861,7 @@ import { useEffect as useEffect13 } from "react";
5866
5861
  import { createContext as createContext22, useContext as useContext28, useMemo as useMemo27 } from "react";
5867
5862
  import { jsx as jsx222 } from "react/jsx-runtime";
5868
5863
  import {
5869
- forwardRef as forwardRef7,
5864
+ forwardRef as forwardRef8,
5870
5865
  useContext as useContext30,
5871
5866
  useEffect as useEffect15,
5872
5867
  useImperativeHandle as useImperativeHandle5,
@@ -5876,10 +5871,10 @@ import {
5876
5871
  } from "react";
5877
5872
  import { jsx as jsx23 } from "react/jsx-runtime";
5878
5873
  import { jsx as jsx24 } from "react/jsx-runtime";
5879
- import { forwardRef as forwardRef9, useCallback as useCallback14, useState as useState17 } from "react";
5874
+ import { forwardRef as forwardRef10, useCallback as useCallback15, useState as useState17 } from "react";
5880
5875
  import { jsx as jsx25 } from "react/jsx-runtime";
5881
5876
  import {
5882
- useCallback as useCallback15,
5877
+ useCallback as useCallback16,
5883
5878
  useContext as useContext32,
5884
5879
  useImperativeHandle as useImperativeHandle6,
5885
5880
  useLayoutEffect as useLayoutEffect10,
@@ -5890,7 +5885,7 @@ import { jsx as jsx26 } from "react/jsx-runtime";
5890
5885
  import { createRef as createRef3 } from "react";
5891
5886
  import React28 from "react";
5892
5887
  import {
5893
- useCallback as useCallback16,
5888
+ useCallback as useCallback17,
5894
5889
  useImperativeHandle as useImperativeHandle7,
5895
5890
  useMemo as useMemo30,
5896
5891
  useRef as useRef21,
@@ -5904,9 +5899,9 @@ import { jsx as jsx28 } from "react/jsx-runtime";
5904
5899
  import { jsx as jsx29 } from "react/jsx-runtime";
5905
5900
  import React31 from "react";
5906
5901
  import React32, { createContext as createContext24 } from "react";
5907
- import { useCallback as useCallback18 } from "react";
5902
+ import { useCallback as useCallback19 } from "react";
5908
5903
  import {
5909
- useCallback as useCallback17,
5904
+ useCallback as useCallback18,
5910
5905
  useContext as useContext34,
5911
5906
  useEffect as useEffect16,
5912
5907
  useLayoutEffect as useLayoutEffect11,
@@ -5915,7 +5910,7 @@ import {
5915
5910
  } from "react";
5916
5911
  import { jsx as jsx30 } from "react/jsx-runtime";
5917
5912
  import React34, {
5918
- forwardRef as forwardRef10,
5913
+ forwardRef as forwardRef11,
5919
5914
  useContext as useContext35,
5920
5915
  useEffect as useEffect18,
5921
5916
  useImperativeHandle as useImperativeHandle8,
@@ -5928,15 +5923,15 @@ import { jsx as jsx31 } from "react/jsx-runtime";
5928
5923
  import { jsx as jsx322 } from "react/jsx-runtime";
5929
5924
  import React36, { useMemo as useMemo35 } from "react";
5930
5925
  import { jsx as jsx33 } from "react/jsx-runtime";
5931
- import { Children, forwardRef as forwardRef11, useMemo as useMemo36 } from "react";
5926
+ import { Children, forwardRef as forwardRef12, useMemo as useMemo36 } from "react";
5932
5927
  import React37 from "react";
5933
5928
  import React38, { createContext as createContext25 } from "react";
5934
5929
  import { jsx as jsx34 } from "react/jsx-runtime";
5935
5930
  import { jsx as jsx35 } from "react/jsx-runtime";
5936
5931
  import React40 from "react";
5937
- import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as useContext37 } from "react";
5932
+ import { forwardRef as forwardRef14, useCallback as useCallback20, useContext as useContext37 } from "react";
5938
5933
  import {
5939
- forwardRef as forwardRef12,
5934
+ forwardRef as forwardRef13,
5940
5935
  useContext as useContext36,
5941
5936
  useEffect as useEffect19,
5942
5937
  useImperativeHandle as useImperativeHandle9,
@@ -5947,13 +5942,17 @@ import {
5947
5942
  import { jsx as jsx36 } from "react/jsx-runtime";
5948
5943
  import { jsx as jsx37 } from "react/jsx-runtime";
5949
5944
  var __defProp2 = Object.defineProperty;
5945
+ var __returnValue2 = (v) => v;
5946
+ function __exportSetter2(name, newValue) {
5947
+ this[name] = __returnValue2.bind(null, newValue);
5948
+ }
5950
5949
  var __export2 = (target, all) => {
5951
5950
  for (var name in all)
5952
5951
  __defProp2(target, name, {
5953
5952
  get: all[name],
5954
5953
  enumerable: true,
5955
5954
  configurable: true,
5956
- set: (newValue) => all[name] = () => newValue
5955
+ set: __exportSetter2.bind(all, name)
5957
5956
  });
5958
5957
  };
5959
5958
  if (typeof createContext !== "function") {
@@ -7013,6 +7012,81 @@ var Composition = (props) => {
7013
7012
  ...props
7014
7013
  });
7015
7014
  };
7015
+ var componentsToAddStacksTo = [];
7016
+ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
7017
+ var addSequenceStackTraces = (component) => {
7018
+ componentsToAddStacksTo.push(component);
7019
+ };
7020
+ var sequenceStyleSchema = {
7021
+ "style.translate": {
7022
+ type: "translate",
7023
+ step: 1,
7024
+ default: "0px 0px",
7025
+ description: "Offset"
7026
+ },
7027
+ "style.scale": {
7028
+ type: "number",
7029
+ min: 0.05,
7030
+ max: 100,
7031
+ step: 0.01,
7032
+ default: 1,
7033
+ description: "Scale"
7034
+ },
7035
+ "style.rotate": {
7036
+ type: "rotation",
7037
+ step: 1,
7038
+ default: "0deg",
7039
+ description: "Rotation"
7040
+ },
7041
+ "style.opacity": {
7042
+ type: "number",
7043
+ min: 0,
7044
+ max: 1,
7045
+ step: 0.01,
7046
+ default: 1,
7047
+ description: "Opacity"
7048
+ },
7049
+ premountFor: {
7050
+ type: "number",
7051
+ default: 0,
7052
+ description: "Premount For",
7053
+ min: 0,
7054
+ step: 1
7055
+ },
7056
+ postmountFor: {
7057
+ type: "hidden"
7058
+ },
7059
+ styleWhilePremounted: {
7060
+ type: "hidden"
7061
+ },
7062
+ styleWhilePostmounted: {
7063
+ type: "hidden"
7064
+ }
7065
+ };
7066
+ var hiddenField = {
7067
+ type: "boolean",
7068
+ default: false,
7069
+ description: "Hidden"
7070
+ };
7071
+ var sequenceSchema = {
7072
+ hidden: hiddenField,
7073
+ layout: {
7074
+ type: "enum",
7075
+ default: "absolute-fill",
7076
+ description: "Layout",
7077
+ variants: {
7078
+ "absolute-fill": sequenceStyleSchema,
7079
+ none: {}
7080
+ }
7081
+ }
7082
+ };
7083
+ var sequenceSchemaDefaultLayoutNone = {
7084
+ ...sequenceSchema,
7085
+ layout: {
7086
+ ...sequenceSchema.layout,
7087
+ default: "none"
7088
+ }
7089
+ };
7016
7090
  var SequenceContext = createContext12(null);
7017
7091
  var exports_timeline_position_state = {};
7018
7092
  __export2(exports_timeline_position_state, {
@@ -7218,253 +7292,136 @@ var useCurrentFrame = () => {
7218
7292
  const contextOffset = context ? context.cumulatedFrom + context.relativeFrom : 0;
7219
7293
  return frame - contextOffset;
7220
7294
  };
7221
-
7222
- class CanvasPool {
7223
- width;
7224
- height;
7225
- pairs = new Map;
7226
- lostContexts = new Set;
7227
- constructor(width, height) {
7228
- this.width = width;
7229
- this.height = height;
7230
- }
7231
- getPair(backend) {
7232
- const existing = this.pairs.get(backend);
7233
- if (existing) {
7234
- return existing;
7235
- }
7236
- const pair = [
7237
- this.allocateCanvas(backend),
7238
- this.allocateCanvas(backend)
7239
- ];
7240
- this.pairs.set(backend, pair);
7241
- return pair;
7242
- }
7243
- assertContextNotLost(canvas) {
7244
- if (this.lostContexts.has(canvas)) {
7245
- 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.");
7246
- }
7247
- }
7248
- allocateCanvas(backend) {
7249
- const canvas = document.createElement("canvas");
7250
- canvas.width = this.width;
7251
- canvas.height = this.height;
7252
- switch (backend) {
7253
- case "2d": {
7254
- const ctx = canvas.getContext("2d", {
7255
- colorSpace: "srgb"
7256
- });
7257
- if (!ctx) {
7258
- throw new Error("Failed to acquire 2D context for canvas effect");
7259
- }
7260
- return canvas;
7261
- }
7262
- case "webgl2": {
7263
- const ctx = canvas.getContext("webgl2", {
7264
- premultipliedAlpha: true,
7265
- alpha: true,
7266
- preserveDrawingBuffer: true
7267
- });
7268
- if (!ctx) {
7269
- throw new Error("Failed to acquire WebGL2 context for canvas effect");
7270
- }
7271
- canvas.addEventListener("webglcontextlost", (e) => {
7272
- e.preventDefault();
7273
- this.lostContexts.add(canvas);
7274
- });
7275
- canvas.addEventListener("webglcontextrestored", () => {
7276
- this.lostContexts.delete(canvas);
7277
- });
7278
- ctx.pixelStorei(ctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
7279
- return canvas;
7280
- }
7281
- case "webgpu": {
7282
- if (typeof navigator === "undefined" || !("gpu" in navigator)) {
7283
- throw new Error("WebGPU is not available in this environment for canvas effect");
7284
- }
7285
- return canvas;
7286
- }
7287
- default: {
7288
- const exhaustive = backend;
7289
- throw new Error(`Unknown effect backend: ${exhaustive}`);
7290
- }
7295
+ var useUnsafeVideoConfig = () => {
7296
+ const context = useContext12(SequenceContext);
7297
+ const ctxWidth = context?.width ?? null;
7298
+ const ctxHeight = context?.height ?? null;
7299
+ const ctxDuration = context?.durationInFrames ?? null;
7300
+ const video = useVideo();
7301
+ return useMemo10(() => {
7302
+ if (!video) {
7303
+ return null;
7291
7304
  }
7292
- }
7293
- }
7294
- var groupByBackend = (effects) => {
7295
- const runs = [];
7296
- let current = [];
7297
- let currentBackend = null;
7298
- for (const eff of effects) {
7299
- const { backend } = eff.definition;
7300
- if (currentBackend === null || backend === currentBackend) {
7301
- current.push(eff);
7302
- currentBackend = backend;
7303
- } else {
7304
- runs.push({ backend: currentBackend, effects: current });
7305
- current = [eff];
7306
- currentBackend = backend;
7305
+ const {
7306
+ id,
7307
+ durationInFrames,
7308
+ fps,
7309
+ height,
7310
+ width,
7311
+ defaultProps,
7312
+ props,
7313
+ defaultCodec,
7314
+ defaultOutName,
7315
+ defaultVideoImageFormat,
7316
+ defaultPixelFormat,
7317
+ defaultProResProfile,
7318
+ defaultSampleRate
7319
+ } = video;
7320
+ return {
7321
+ id,
7322
+ width: ctxWidth ?? width,
7323
+ height: ctxHeight ?? height,
7324
+ fps,
7325
+ durationInFrames: ctxDuration ?? durationInFrames,
7326
+ defaultProps,
7327
+ props,
7328
+ defaultCodec,
7329
+ defaultOutName,
7330
+ defaultVideoImageFormat,
7331
+ defaultPixelFormat,
7332
+ defaultProResProfile,
7333
+ defaultSampleRate
7334
+ };
7335
+ }, [ctxDuration, ctxHeight, ctxWidth, video]);
7336
+ };
7337
+ var useVideoConfig = () => {
7338
+ const videoConfig = useUnsafeVideoConfig();
7339
+ const context = useContext13(CanUseRemotionHooks);
7340
+ const isPlayer = useIsPlayer();
7341
+ if (!videoConfig) {
7342
+ if (typeof window !== "undefined" && window.remotion_isPlayer || isPlayer) {
7343
+ throw new Error([
7344
+ "No video config found. Likely reasons:",
7345
+ "- You are probably calling useVideoConfig() from outside the component passed to <Player />. See https://www.remotion.dev/docs/player/examples for how to set up the Player correctly.",
7346
+ "- You have multiple versions of Remotion installed which causes the React context to get lost."
7347
+ ].join("-"));
7307
7348
  }
7349
+ throw new Error("No video config found. You are probably calling useVideoConfig() from a component which has not been registered as a <Composition />. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions for more information.");
7308
7350
  }
7309
- if (currentBackend !== null && current.length > 0) {
7310
- runs.push({ backend: currentBackend, effects: current });
7351
+ if (!context) {
7352
+ throw new Error("Called useVideoConfig() outside a Remotion composition.");
7311
7353
  }
7312
- return runs;
7354
+ return videoConfig;
7313
7355
  };
7314
- var devicePromise = null;
7315
- var getGpuDevice = () => {
7316
- if (devicePromise) {
7317
- return devicePromise;
7356
+ var Freeze = ({
7357
+ frame: frameToFreeze,
7358
+ children,
7359
+ active = true
7360
+ }) => {
7361
+ const frame = useCurrentFrame();
7362
+ const videoConfig = useVideoConfig();
7363
+ if (typeof frameToFreeze === "undefined") {
7364
+ throw new Error(`The <Freeze /> component requires a 'frame' prop, but none was passed.`);
7318
7365
  }
7319
- devicePromise = (async () => {
7320
- if (typeof navigator === "undefined" || !("gpu" in navigator)) {
7321
- throw new Error("WebGPU is not available in this environment");
7322
- }
7323
- const { gpu } = navigator;
7324
- const adapter = await gpu.requestAdapter();
7325
- if (!adapter) {
7326
- throw new Error("No WebGPU adapter available");
7327
- }
7328
- return adapter.requestDevice();
7329
- })();
7330
- return devicePromise;
7331
- };
7332
- var createEffectChainState = (width, height) => ({
7333
- pool: new CanvasPool(width, height),
7334
- setupCache: new WeakMap,
7335
- cleanupRegistry: [],
7336
- currentRunId: 0
7337
- });
7338
- var cleanupEffectChainState = (state) => {
7339
- state.currentRunId++;
7340
- for (const entry of state.cleanupRegistry) {
7341
- entry.definition.cleanup(entry.state);
7366
+ if (typeof frameToFreeze !== "number") {
7367
+ throw new Error(`The 'frame' prop of <Freeze /> must be a number, but is of type ${typeof frameToFreeze}`);
7342
7368
  }
7343
- };
7344
- var ensureSetup = (state, def, target) => {
7345
- const widened = def;
7346
- if (state.setupCache.has(widened)) {
7347
- return state.setupCache.get(widened);
7369
+ if (Number.isNaN(frameToFreeze)) {
7370
+ throw new Error(`The 'frame' prop of <Freeze /> must be a real number, but it is NaN.`);
7348
7371
  }
7349
- const setupState = def.setup(target);
7350
- state.setupCache.set(widened, setupState);
7351
- state.cleanupRegistry.push({ definition: widened, state: setupState });
7352
- return setupState;
7353
- };
7354
- var runEffectChain = async ({
7355
- state,
7356
- source,
7357
- effects,
7358
- output,
7359
- frame,
7360
- width,
7361
- height
7362
- }) => {
7363
- const runId = ++state.currentRunId;
7364
- const isCancelled = () => state.currentRunId !== runId;
7365
- const runs = groupByBackend(effects);
7366
- let currentImage = source;
7367
- let lastTarget = null;
7368
- if (runs.length === 0) {
7369
- if (source === output) {
7370
- return true;
7371
- }
7372
- const ctx = output.getContext("2d");
7373
- if (!ctx) {
7374
- throw new Error("Failed to acquire 2D context for output canvas");
7375
- }
7376
- ctx.clearRect(0, 0, width, height);
7377
- ctx.drawImage(currentImage, 0, 0, width, height);
7378
- return true;
7372
+ if (!Number.isFinite(frameToFreeze)) {
7373
+ throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${frameToFreeze}.`);
7379
7374
  }
7380
- let needsGpuDevice = false;
7381
- for (const run of runs) {
7382
- if (run.backend === "webgpu") {
7383
- needsGpuDevice = true;
7384
- break;
7375
+ const isActive = useMemo11(() => {
7376
+ if (typeof active === "boolean") {
7377
+ return active;
7385
7378
  }
7386
- }
7387
- const gpuDevice = needsGpuDevice ? await getGpuDevice() : null;
7388
- if (isCancelled()) {
7389
- return false;
7390
- }
7391
- for (let runIndex = 0;runIndex < runs.length; runIndex++) {
7392
- const run = runs[runIndex];
7393
- const [a, b] = state.pool.getPair(run.backend);
7394
- let dst = a;
7395
- for (const eff of run.effects) {
7396
- const def = eff.definition;
7397
- const setupState = ensureSetup(state, def, dst);
7398
- def.apply({
7399
- source: currentImage,
7400
- target: dst,
7401
- state: setupState,
7402
- params: eff.params,
7403
- frame,
7404
- width,
7405
- height,
7406
- gpuDevice
7407
- });
7408
- if (run.backend === "webgl2") {
7409
- state.pool.assertContextNotLost(dst);
7410
- }
7411
- currentImage = dst;
7412
- dst = dst === a ? b : a;
7379
+ if (typeof active === "function") {
7380
+ return active(frame);
7413
7381
  }
7414
- lastTarget = currentImage ?? lastTarget;
7415
- const nextRun = runs[runIndex + 1];
7416
- if (nextRun && nextRun.backend !== run.backend && lastTarget) {
7417
- const bitmap = await createImageBitmap(lastTarget);
7418
- if (isCancelled()) {
7419
- bitmap.close();
7420
- return false;
7421
- }
7422
- currentImage = bitmap;
7382
+ }, [active, frame]);
7383
+ const timelineContext = useTimelineContext();
7384
+ const sequenceContext = useContext14(SequenceContext);
7385
+ const relativeFrom = sequenceContext?.relativeFrom ?? 0;
7386
+ const timelineValue = useMemo11(() => {
7387
+ if (!isActive) {
7388
+ return timelineContext;
7423
7389
  }
7424
- }
7425
- if (!lastTarget) {
7426
- return true;
7427
- }
7428
- const outCtx = output.getContext("2d");
7429
- if (!outCtx) {
7430
- throw new Error("Failed to acquire 2D context for output canvas");
7431
- }
7432
- outCtx.clearRect(0, 0, width, height);
7433
- outCtx.drawImage(lastTarget, 0, 0, width, height);
7434
- return true;
7435
- };
7436
- var useEffectChainState = () => {
7437
- const chainStateRef = useRef4(null);
7438
- const sizeRef = useRef4(null);
7439
- useEffect3(() => {
7440
- return () => {
7441
- if (chainStateRef.current) {
7442
- cleanupEffectChainState(chainStateRef.current);
7390
+ return {
7391
+ ...timelineContext,
7392
+ playing: false,
7393
+ imperativePlaying: {
7394
+ current: false
7395
+ },
7396
+ frame: {
7397
+ [videoConfig.id]: frameToFreeze + relativeFrom
7443
7398
  }
7444
7399
  };
7445
- }, []);
7446
- return useMemo10(() => ({
7447
- get: (width, height) => {
7448
- if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
7449
- if (chainStateRef.current) {
7450
- cleanupEffectChainState(chainStateRef.current);
7451
- }
7452
- chainStateRef.current = createEffectChainState(width, height);
7453
- sizeRef.current = { width, height };
7454
- }
7455
- return chainStateRef.current;
7400
+ }, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);
7401
+ const newSequenceContext = useMemo11(() => {
7402
+ if (!sequenceContext) {
7403
+ return null;
7456
7404
  }
7457
- }), []);
7405
+ if (!isActive) {
7406
+ return sequenceContext;
7407
+ }
7408
+ return {
7409
+ ...sequenceContext,
7410
+ cumulatedFrom: 0
7411
+ };
7412
+ }, [sequenceContext, isActive]);
7413
+ return /* @__PURE__ */ jsx92(TimelineContext.Provider, {
7414
+ value: timelineValue,
7415
+ children: /* @__PURE__ */ jsx92(SequenceContext.Provider, {
7416
+ value: newSequenceContext,
7417
+ children
7418
+ })
7419
+ });
7458
7420
  };
7459
- var OverrideIdsToNodePathsGettersContext = createContext14({
7460
- overrideIdToNodePathMappings: {}
7461
- });
7462
- var OverrideIdsToNodePathsSettersContext = createContext14({
7463
- setOverrideIdToNodePath: () => {
7464
- throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
7465
- }
7421
+ var PremountContext = createContext14({
7422
+ premountFramesRemaining: 0
7466
7423
  });
7467
- var SequenceManager = React10.createContext({
7424
+ var SequenceManager = React11.createContext({
7468
7425
  registerSequence: () => {
7469
7426
  throw new Error("SequenceManagerContext not initialized");
7470
7427
  },
@@ -7473,19 +7430,13 @@ var SequenceManager = React10.createContext({
7473
7430
  },
7474
7431
  sequences: []
7475
7432
  });
7476
- var SequenceVisibilityToggleContext = React10.createContext({
7477
- hidden: {},
7478
- setHidden: () => {
7479
- throw new Error("SequenceVisibilityToggle not initialized");
7480
- }
7481
- });
7482
7433
  var makeSequencePropsSubscriptionKey = (key) => {
7483
7434
  return `${key.nodePath.join(".")}.${key.sequenceKeys.join(".")}.${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
7484
7435
  };
7485
- var VisualModeCodeValuesContext = React10.createContext({
7436
+ var VisualModeCodeValuesContext = React11.createContext({
7486
7437
  codeValues: {}
7487
7438
  });
7488
- var VisualModeDragOverridesContext = React10.createContext({
7439
+ var VisualModeDragOverridesContext = React11.createContext({
7489
7440
  getDragOverrides: () => {
7490
7441
  throw new Error("VisualModeDragOverridesContext not initialized");
7491
7442
  },
@@ -7493,7 +7444,7 @@ var VisualModeDragOverridesContext = React10.createContext({
7493
7444
  throw new Error("VisualModeDragOverridesContext not initialized");
7494
7445
  }
7495
7446
  });
7496
- var VisualModeSettersContext = React10.createContext({
7447
+ var VisualModeSettersContext = React11.createContext({
7497
7448
  setDragOverrides: () => {
7498
7449
  throw new Error("VisualModeSettersContext not initialized");
7499
7450
  },
@@ -7513,9 +7464,8 @@ var VisualModeSettersContext = React10.createContext({
7513
7464
  var effectDragOverridesKey = (nodePath, effectIndex) => `${makeSequencePropsSubscriptionKey(nodePath)}.effects.${effectIndex}`;
7514
7465
  var SequenceManagerProvider = ({ children }) => {
7515
7466
  const [sequences, setSequences] = useState3([]);
7516
- const [hidden, setHidden] = useState3({});
7517
7467
  const [dragOverrides, setControlOverrides] = useState3({});
7518
- const controlOverridesRef = useRef5(dragOverrides);
7468
+ const controlOverridesRef = useRef4(dragOverrides);
7519
7469
  controlOverridesRef.current = dragOverrides;
7520
7470
  const [effectDragOverridesState, setEffectDragOverridesState] = useState3({});
7521
7471
  const [codeValues, setCodeValuesMapState] = useState3({});
@@ -7581,37 +7531,31 @@ var SequenceManagerProvider = ({ children }) => {
7581
7531
  const unregisterSequence = useCallback5((seq) => {
7582
7532
  setSequences((seqs) => seqs.filter((s) => s.id !== seq));
7583
7533
  }, []);
7584
- const sequenceContext = useMemo11(() => {
7534
+ const sequenceContext = useMemo12(() => {
7585
7535
  return {
7586
7536
  registerSequence,
7587
7537
  sequences,
7588
7538
  unregisterSequence
7589
7539
  };
7590
7540
  }, [registerSequence, sequences, unregisterSequence]);
7591
- const hiddenContext = useMemo11(() => {
7592
- return {
7593
- hidden,
7594
- setHidden
7595
- };
7596
- }, [hidden]);
7597
7541
  const getDragOverrides = useCallback5((nodePath) => {
7598
7542
  return dragOverrides[makeSequencePropsSubscriptionKey(nodePath)] ?? {};
7599
7543
  }, [dragOverrides]);
7600
7544
  const getEffectDragOverrides = useCallback5((nodePath, effectIndex) => {
7601
7545
  return effectDragOverridesState[effectDragOverridesKey(nodePath, effectIndex)] ?? {};
7602
7546
  }, [effectDragOverridesState]);
7603
- const codeValuesContext = useMemo11(() => {
7547
+ const codeValuesContext = useMemo12(() => {
7604
7548
  return {
7605
7549
  codeValues
7606
7550
  };
7607
7551
  }, [codeValues]);
7608
- const dragOverridesContext = useMemo11(() => {
7552
+ const dragOverridesContext = useMemo12(() => {
7609
7553
  return {
7610
7554
  getDragOverrides,
7611
7555
  getEffectDragOverrides
7612
7556
  };
7613
7557
  }, [getDragOverrides, getEffectDragOverrides]);
7614
- const settersContext = useMemo11(() => {
7558
+ const settersContext = useMemo12(() => {
7615
7559
  return {
7616
7560
  setDragOverrides,
7617
7561
  clearDragOverrides,
@@ -7626,23 +7570,60 @@ var SequenceManagerProvider = ({ children }) => {
7626
7570
  clearEffectDragOverrides,
7627
7571
  setCodeValues
7628
7572
  ]);
7629
- return /* @__PURE__ */ jsx92(SequenceManager.Provider, {
7573
+ return /* @__PURE__ */ jsx102(SequenceManager.Provider, {
7630
7574
  value: sequenceContext,
7631
- children: /* @__PURE__ */ jsx92(SequenceVisibilityToggleContext.Provider, {
7632
- value: hiddenContext,
7633
- children: /* @__PURE__ */ jsx92(VisualModeCodeValuesContext.Provider, {
7634
- value: codeValuesContext,
7635
- children: /* @__PURE__ */ jsx92(VisualModeDragOverridesContext.Provider, {
7636
- value: dragOverridesContext,
7637
- children: /* @__PURE__ */ jsx92(VisualModeSettersContext.Provider, {
7638
- value: settersContext,
7639
- children
7640
- })
7575
+ children: /* @__PURE__ */ jsx102(VisualModeCodeValuesContext.Provider, {
7576
+ value: codeValuesContext,
7577
+ children: /* @__PURE__ */ jsx102(VisualModeDragOverridesContext.Provider, {
7578
+ value: dragOverridesContext,
7579
+ children: /* @__PURE__ */ jsx102(VisualModeSettersContext.Provider, {
7580
+ value: settersContext,
7581
+ children
7641
7582
  })
7642
7583
  })
7643
7584
  })
7644
7585
  });
7645
7586
  };
7587
+ var ENABLE_V5_BREAKING_CHANGES = false;
7588
+ var deleteNestedKey = (obj, keysToRemove) => {
7589
+ for (const key of keysToRemove) {
7590
+ const parts = key.split(".");
7591
+ const parents = [obj];
7592
+ let current = obj;
7593
+ for (let i = 0;i < parts.length - 1; i++) {
7594
+ const part = parts[i];
7595
+ const next = current[part];
7596
+ if (next === undefined || next === null) {
7597
+ current = null;
7598
+ break;
7599
+ }
7600
+ current = next;
7601
+ parents.push(current);
7602
+ }
7603
+ if (current === null) {
7604
+ continue;
7605
+ }
7606
+ delete current[parts[parts.length - 1]];
7607
+ for (let i = parents.length - 1;i > 0; i--) {
7608
+ const parent = parents[i];
7609
+ if (Object.keys(parent).length === 0) {
7610
+ const parentKey = parts[i - 1];
7611
+ delete parents[i - 1][parentKey];
7612
+ } else {
7613
+ break;
7614
+ }
7615
+ }
7616
+ }
7617
+ return obj;
7618
+ };
7619
+ var OverrideIdsToNodePathsGettersContext = createContext15({
7620
+ overrideIdToNodePathMappings: {}
7621
+ });
7622
+ var OverrideIdsToNodePathsSettersContext = createContext15({
7623
+ setOverrideIdToNodePath: () => {
7624
+ throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
7625
+ }
7626
+ });
7646
7627
  var mergeOverrides = ({
7647
7628
  descriptor,
7648
7629
  codeOverrides,
@@ -7686,7 +7667,7 @@ var extractCodeOverrides = (propStatus) => {
7686
7667
  return hasAny ? out : null;
7687
7668
  };
7688
7669
  var useMemoizedEffectDefinitions = (effects) => {
7689
- const previousRef = useRef6(null);
7670
+ const previousRef = useRef5(null);
7690
7671
  const definitions = effects.map((descriptor) => descriptor.definition);
7691
7672
  const previous = previousRef.current;
7692
7673
  const isSame = previous !== null && previous.length === definitions.length && previous.every((def, i) => def === definitions[i]);
@@ -7731,10 +7712,10 @@ var useMemoizedEffects = ({
7731
7712
  effects,
7732
7713
  overrideId
7733
7714
  }) => {
7734
- const previousRef = useRef6(null);
7735
- const { codeValues } = useContext12(VisualModeCodeValuesContext);
7736
- const { getEffectDragOverrides } = useContext12(VisualModeDragOverridesContext);
7737
- const { overrideIdToNodePathMappings } = useContext12(OverrideIdsToNodePathsGettersContext);
7715
+ const previousRef = useRef5(null);
7716
+ const { codeValues } = useContext15(VisualModeCodeValuesContext);
7717
+ const { getEffectDragOverrides } = useContext15(VisualModeDragOverridesContext);
7718
+ const { overrideIdToNodePathMappings } = useContext15(OverrideIdsToNodePathsGettersContext);
7738
7719
  const previous = previousRef.current;
7739
7720
  const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
7740
7721
  const resolved = effects.map((descriptor, index) => {
@@ -7773,279 +7754,21 @@ var useMemoizedEffects = ({
7773
7754
  previousRef.current = next;
7774
7755
  return next;
7775
7756
  };
7776
- var componentsToAddStacksTo = [];
7777
- var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
7778
- var addSequenceStackTraces = (component) => {
7779
- componentsToAddStacksTo.push(component);
7780
- };
7781
- var VERSION = "4.0.462";
7782
- var checkMultipleRemotionVersions = () => {
7783
- if (typeof globalThis === "undefined") {
7784
- return;
7785
- }
7786
- const set = () => {
7787
- globalThis.remotion_imported = VERSION;
7788
- if (typeof window !== "undefined") {
7789
- window.remotion_imported = VERSION;
7790
- }
7791
- };
7792
- const alreadyImported = globalThis.remotion_imported || typeof window !== "undefined" && window.remotion_imported;
7793
- if (alreadyImported) {
7794
- if (alreadyImported === VERSION) {
7795
- return;
7796
- }
7797
- if (typeof alreadyImported === "string" && alreadyImported.includes("webcodecs")) {
7798
- set();
7799
- return;
7800
- }
7801
- throw new TypeError(`\uD83D\uDEA8 Multiple versions of Remotion detected: ${[
7802
- VERSION,
7803
- typeof alreadyImported === "string" ? alreadyImported : "an older version"
7804
- ].filter(truthy2).join(" and ")}. This will cause things to break in an unexpected way.
7805
- 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.`);
7806
- }
7807
- set();
7808
- };
7809
- var useUnsafeVideoConfig = () => {
7810
- const context = useContext13(SequenceContext);
7811
- const ctxWidth = context?.width ?? null;
7812
- const ctxHeight = context?.height ?? null;
7813
- const ctxDuration = context?.durationInFrames ?? null;
7814
- const video = useVideo();
7815
- return useMemo13(() => {
7816
- if (!video) {
7817
- return null;
7818
- }
7819
- const {
7820
- id,
7821
- durationInFrames,
7822
- fps,
7823
- height,
7824
- width,
7825
- defaultProps,
7826
- props,
7827
- defaultCodec,
7828
- defaultOutName,
7829
- defaultVideoImageFormat,
7830
- defaultPixelFormat,
7831
- defaultProResProfile,
7832
- defaultSampleRate
7833
- } = video;
7834
- return {
7835
- id,
7836
- width: ctxWidth ?? width,
7837
- height: ctxHeight ?? height,
7838
- fps,
7839
- durationInFrames: ctxDuration ?? durationInFrames,
7840
- defaultProps,
7841
- props,
7842
- defaultCodec,
7843
- defaultOutName,
7844
- defaultVideoImageFormat,
7845
- defaultPixelFormat,
7846
- defaultProResProfile,
7847
- defaultSampleRate
7848
- };
7849
- }, [ctxDuration, ctxHeight, ctxWidth, video]);
7850
- };
7851
- var useVideoConfig = () => {
7852
- const videoConfig = useUnsafeVideoConfig();
7853
- const context = useContext14(CanUseRemotionHooks);
7854
- const isPlayer = useIsPlayer();
7855
- if (!videoConfig) {
7856
- if (typeof window !== "undefined" && window.remotion_isPlayer || isPlayer) {
7857
- throw new Error([
7858
- "No video config found. Likely reasons:",
7859
- "- You are probably calling useVideoConfig() from outside the component passed to <Player />. See https://www.remotion.dev/docs/player/examples for how to set up the Player correctly.",
7860
- "- You have multiple versions of Remotion installed which causes the React context to get lost."
7861
- ].join("-"));
7862
- }
7863
- throw new Error("No video config found. You are probably calling useVideoConfig() from a component which has not been registered as a <Composition />. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions for more information.");
7864
- }
7865
- if (!context) {
7866
- throw new Error("Called useVideoConfig() outside a Remotion composition.");
7867
- }
7868
- return videoConfig;
7869
- };
7870
- var Freeze = ({
7871
- frame: frameToFreeze,
7872
- children,
7873
- active = true
7874
- }) => {
7875
- const frame = useCurrentFrame();
7876
- const videoConfig = useVideoConfig();
7877
- if (typeof frameToFreeze === "undefined") {
7878
- throw new Error(`The <Freeze /> component requires a 'frame' prop, but none was passed.`);
7879
- }
7880
- if (typeof frameToFreeze !== "number") {
7881
- throw new Error(`The 'frame' prop of <Freeze /> must be a number, but is of type ${typeof frameToFreeze}`);
7882
- }
7883
- if (Number.isNaN(frameToFreeze)) {
7884
- throw new Error(`The 'frame' prop of <Freeze /> must be a real number, but it is NaN.`);
7885
- }
7886
- if (!Number.isFinite(frameToFreeze)) {
7887
- throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${frameToFreeze}.`);
7888
- }
7889
- const isActive = useMemo14(() => {
7890
- if (typeof active === "boolean") {
7891
- return active;
7892
- }
7893
- if (typeof active === "function") {
7894
- return active(frame);
7895
- }
7896
- }, [active, frame]);
7897
- const timelineContext = useTimelineContext();
7898
- const sequenceContext = useContext15(SequenceContext);
7899
- const relativeFrom = sequenceContext?.relativeFrom ?? 0;
7900
- const timelineValue = useMemo14(() => {
7901
- if (!isActive) {
7902
- return timelineContext;
7903
- }
7904
- return {
7905
- ...timelineContext,
7906
- playing: false,
7907
- imperativePlaying: {
7908
- current: false
7909
- },
7910
- frame: {
7911
- [videoConfig.id]: frameToFreeze + relativeFrom
7912
- }
7913
- };
7914
- }, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);
7915
- const newSequenceContext = useMemo14(() => {
7916
- if (!sequenceContext) {
7917
- return null;
7918
- }
7919
- if (!isActive) {
7920
- return sequenceContext;
7921
- }
7922
- return {
7923
- ...sequenceContext,
7924
- cumulatedFrom: 0
7925
- };
7926
- }, [sequenceContext, isActive]);
7927
- return /* @__PURE__ */ jsx112(TimelineContext.Provider, {
7928
- value: timelineValue,
7929
- children: /* @__PURE__ */ jsx112(SequenceContext.Provider, {
7930
- value: newSequenceContext,
7931
- children
7932
- })
7933
- });
7934
- };
7935
- var PremountContext = createContext15({
7936
- premountFramesRemaining: 0
7937
- });
7938
- var sequenceStyleSchema = {
7939
- "style.translate": {
7940
- type: "translate",
7941
- step: 1,
7942
- default: "0px 0px",
7943
- description: "Offset"
7944
- },
7945
- "style.scale": {
7946
- type: "number",
7947
- min: 0.05,
7948
- max: 100,
7949
- step: 0.01,
7950
- default: 1,
7951
- description: "Scale"
7952
- },
7953
- "style.rotate": {
7954
- type: "rotation",
7955
- step: 1,
7956
- default: "0deg",
7957
- description: "Rotation"
7958
- },
7959
- "style.opacity": {
7960
- type: "number",
7961
- min: 0,
7962
- max: 1,
7963
- step: 0.01,
7964
- default: 1,
7965
- description: "Opacity"
7966
- },
7967
- premountFor: {
7968
- type: "number",
7969
- default: 0,
7970
- description: "Premount For",
7971
- min: 0,
7972
- step: 1
7973
- },
7974
- postmountFor: {
7975
- type: "hidden"
7976
- },
7977
- styleWhilePremounted: {
7978
- type: "hidden"
7979
- },
7980
- styleWhilePostmounted: {
7981
- type: "hidden"
7982
- }
7983
- };
7984
- var sequenceSchema = {
7985
- layout: {
7986
- type: "enum",
7987
- default: "absolute-fill",
7988
- description: "Layout",
7989
- variants: {
7990
- "absolute-fill": sequenceStyleSchema,
7991
- none: {}
7992
- }
7993
- }
7994
- };
7995
- var sequenceSchemaDefaultLayoutNone = {
7996
- ...sequenceSchema,
7997
- layout: {
7998
- ...sequenceSchema.layout,
7999
- default: "none"
8000
- }
8001
- };
8002
- var ENABLE_V5_BREAKING_CHANGES = false;
8003
- var deleteNestedKey = (obj, keysToRemove) => {
8004
- for (const key of keysToRemove) {
8005
- const parts = key.split(".");
8006
- const parents = [obj];
8007
- let current = obj;
8008
- for (let i = 0;i < parts.length - 1; i++) {
8009
- const part = parts[i];
8010
- const next = current[part];
8011
- if (next === undefined || next === null) {
8012
- current = null;
8013
- break;
8014
- }
8015
- current = next;
8016
- parents.push(current);
8017
- }
8018
- if (current === null) {
8019
- continue;
8020
- }
8021
- delete current[parts[parts.length - 1]];
8022
- for (let i = parents.length - 1;i > 0; i--) {
8023
- const parent = parents[i];
8024
- if (Object.keys(parent).length === 0) {
8025
- const parentKey = parts[i - 1];
8026
- delete parents[i - 1][parentKey];
8027
- } else {
8028
- break;
8029
- }
8030
- }
8031
- }
8032
- return obj;
8033
- };
8034
- var flattenActiveSchema = (schema, resolve) => {
8035
- const out = {};
8036
- for (const key of Object.keys(schema)) {
8037
- const field = schema[key];
8038
- if (field.type === "hidden") {
8039
- continue;
8040
- } else if (field.type === "enum") {
8041
- out[key] = field;
8042
- const current = resolve(key) ?? field.default;
8043
- const variant = field.variants[current];
8044
- if (variant) {
8045
- Object.assign(out, flattenActiveSchema(variant, resolve));
8046
- }
8047
- } else {
8048
- out[key] = field;
7757
+ var flattenActiveSchema = (schema, resolve) => {
7758
+ const out = {};
7759
+ for (const key of Object.keys(schema)) {
7760
+ const field = schema[key];
7761
+ if (field.type === "hidden") {
7762
+ continue;
7763
+ } else if (field.type === "enum") {
7764
+ out[key] = field;
7765
+ const current = resolve(key) ?? field.default;
7766
+ const variant = field.variants[current];
7767
+ if (variant) {
7768
+ Object.assign(out, flattenActiveSchema(variant, resolve));
7769
+ }
7770
+ } else {
7771
+ out[key] = field;
8049
7772
  }
8050
7773
  }
8051
7774
  return out;
@@ -8228,7 +7951,7 @@ var wrapInSchema = (Component, schema) => {
8228
7951
  const Wrapped = forwardRef2((props, ref) => {
8229
7952
  const env = useRemotionEnvironment();
8230
7953
  if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
8231
- return React13.createElement(Component, {
7954
+ return React12.createElement(Component, {
8232
7955
  ...props,
8233
7956
  _experimentalControls: null,
8234
7957
  ref
@@ -8238,12 +7961,12 @@ var wrapInSchema = (Component, schema) => {
8238
7961
  const { getDragOverrides } = useContext16(VisualModeDragOverridesContext);
8239
7962
  const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
8240
7963
  if (props._experimentalControls) {
8241
- return React13.createElement(Component, {
7964
+ return React12.createElement(Component, {
8242
7965
  ...props,
8243
7966
  ref
8244
7967
  });
8245
7968
  }
8246
- const [overrideId] = useState5(() => {
7969
+ const [overrideId] = useState4(() => {
8247
7970
  const { stack } = props;
8248
7971
  if (!stack) {
8249
7972
  return String(Math.random());
@@ -8258,15 +7981,15 @@ var wrapInSchema = (Component, schema) => {
8258
7981
  });
8259
7982
  const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
8260
7983
  const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
8261
- const currentRuntimeValueDotNotation = useMemo15(() => readValuesFromProps(props, flatKeys), runtimeValues);
8262
- const controls = useMemo15(() => {
7984
+ const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
7985
+ const controls = useMemo13(() => {
8263
7986
  return {
8264
7987
  schema,
8265
7988
  currentRuntimeValueDotNotation,
8266
7989
  overrideId
8267
7990
  };
8268
7991
  }, [currentRuntimeValueDotNotation, overrideId]);
8269
- const { merged: valuesDotNotation, propsToDelete } = useMemo15(() => {
7992
+ const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
8270
7993
  return computeEffectiveSchemaValuesDotNotation({
8271
7994
  schema,
8272
7995
  currentValue: currentRuntimeValueDotNotation,
@@ -8286,7 +8009,7 @@ var wrapInSchema = (Component, schema) => {
8286
8009
  schemaKeys: activeKeys,
8287
8010
  propsToDelete
8288
8011
  });
8289
- return React13.createElement(Component, {
8012
+ return React12.createElement(Component, {
8290
8013
  ...mergedProps,
8291
8014
  _experimentalControls: controls,
8292
8015
  ref
@@ -8303,6 +8026,7 @@ var RegularSequenceRefForwardingFunction = ({
8303
8026
  height,
8304
8027
  width,
8305
8028
  showInTimeline = true,
8029
+ hidden = false,
8306
8030
  _experimentalControls: controls,
8307
8031
  _experimentalEffects,
8308
8032
  _remotionInternalLoopDisplay: loopDisplay,
@@ -8313,7 +8037,7 @@ var RegularSequenceRefForwardingFunction = ({
8313
8037
  ...other
8314
8038
  }, ref) => {
8315
8039
  const { layout = "absolute-fill" } = other;
8316
- const [id] = useState6(() => String(Math.random()));
8040
+ const [id] = useState5(() => String(Math.random()));
8317
8041
  const parentSequence = useContext17(SequenceContext);
8318
8042
  const { rootId } = useTimelineContext();
8319
8043
  const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
@@ -8341,14 +8065,13 @@ var RegularSequenceRefForwardingFunction = ({
8341
8065
  const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
8342
8066
  const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
8343
8067
  const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
8344
- const { hidden } = useContext17(SequenceVisibilityToggleContext);
8345
- const premounting = useMemo16(() => {
8068
+ const premounting = useMemo14(() => {
8346
8069
  return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
8347
8070
  }, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
8348
- const postmounting = useMemo16(() => {
8071
+ const postmounting = useMemo14(() => {
8349
8072
  return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
8350
8073
  }, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
8351
- const contextValue = useMemo16(() => {
8074
+ const contextValue = useMemo14(() => {
8352
8075
  return {
8353
8076
  cumulatedFrom,
8354
8077
  relativeFrom: from,
@@ -8375,12 +8098,13 @@ var RegularSequenceRefForwardingFunction = ({
8375
8098
  premountDisplay,
8376
8099
  postmountDisplay
8377
8100
  ]);
8378
- const timelineClipName = useMemo16(() => {
8101
+ const timelineClipName = useMemo14(() => {
8379
8102
  return name ?? "";
8380
8103
  }, [name]);
8381
8104
  const env = useRemotionEnvironment();
8382
8105
  const inheritedStack = other?.stack ?? null;
8383
- useEffect5(() => {
8106
+ const [stackDoesntChange] = useState5(() => stack ?? inheritedStack);
8107
+ useEffect3(() => {
8384
8108
  if (!env.isStudio) {
8385
8109
  return;
8386
8110
  }
@@ -8403,7 +8127,7 @@ var RegularSequenceRefForwardingFunction = ({
8403
8127
  rootId,
8404
8128
  showInTimeline,
8405
8129
  src: isMedia.data.src,
8406
- stack: stack ?? inheritedStack,
8130
+ stack: stackDoesntChange,
8407
8131
  startMediaFrom: isMedia.data.startMediaFrom,
8408
8132
  volume: isMedia.data.volumes
8409
8133
  });
@@ -8422,7 +8146,7 @@ var RegularSequenceRefForwardingFunction = ({
8422
8146
  showInTimeline,
8423
8147
  nonce: nonce.get(),
8424
8148
  loopDisplay,
8425
- stack: stack ?? inheritedStack,
8149
+ stack: stackDoesntChange,
8426
8150
  premountDisplay: premountDisplay ?? null,
8427
8151
  postmountDisplay: postmountDisplay ?? null,
8428
8152
  controls: controls ?? null,
@@ -8445,11 +8169,10 @@ var RegularSequenceRefForwardingFunction = ({
8445
8169
  showInTimeline,
8446
8170
  nonce,
8447
8171
  loopDisplay,
8448
- stack,
8172
+ stackDoesntChange,
8449
8173
  premountDisplay,
8450
8174
  postmountDisplay,
8451
8175
  env.isStudio,
8452
- inheritedStack,
8453
8176
  controls,
8454
8177
  _experimentalEffects,
8455
8178
  isMedia
@@ -8457,7 +8180,7 @@ var RegularSequenceRefForwardingFunction = ({
8457
8180
  const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
8458
8181
  const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
8459
8182
  const styleIfThere = other.layout === "none" ? undefined : other.style;
8460
- const defaultStyle = useMemo16(() => {
8183
+ const defaultStyle = useMemo14(() => {
8461
8184
  return {
8462
8185
  flexDirection: undefined,
8463
8186
  ...width ? { width } : {},
@@ -8468,13 +8191,12 @@ var RegularSequenceRefForwardingFunction = ({
8468
8191
  if (ref !== null && layout === "none") {
8469
8192
  throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');
8470
8193
  }
8471
- const isSequenceHidden = hidden[id] ?? false;
8472
- if (isSequenceHidden) {
8194
+ if (hidden) {
8473
8195
  return null;
8474
8196
  }
8475
- return /* @__PURE__ */ jsx12(SequenceContext.Provider, {
8197
+ return /* @__PURE__ */ jsx112(SequenceContext.Provider, {
8476
8198
  value: contextValue,
8477
- children: content === null ? null : other.layout === "none" ? content : /* @__PURE__ */ jsx12(AbsoluteFill, {
8199
+ children: content === null ? null : other.layout === "none" ? content : /* @__PURE__ */ jsx112(AbsoluteFill, {
8478
8200
  ref,
8479
8201
  style: defaultStyle,
8480
8202
  className: other.className,
@@ -8504,7 +8226,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
8504
8226
  const postmountingActive = frame > endThreshold && frame <= endThreshold + postmountFor;
8505
8227
  const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
8506
8228
  const isFreezingActive = premountingActive || postmountingActive;
8507
- const style = useMemo16(() => {
8229
+ const style = useMemo14(() => {
8508
8230
  return {
8509
8231
  ...passedStyle,
8510
8232
  opacity: premountingActive || postmountingActive ? 0 : 1,
@@ -8513,49 +8235,466 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
8513
8235
  ...postmountingActive ? styleWhilePostmounted : {}
8514
8236
  };
8515
8237
  }, [
8516
- passedStyle,
8517
- premountingActive,
8518
- postmountingActive,
8519
- styleWhilePremounted,
8520
- styleWhilePostmounted
8238
+ passedStyle,
8239
+ premountingActive,
8240
+ postmountingActive,
8241
+ styleWhilePremounted,
8242
+ styleWhilePostmounted
8243
+ ]);
8244
+ return /* @__PURE__ */ jsx112(Freeze, {
8245
+ frame: freezeFrame,
8246
+ active: isFreezingActive,
8247
+ children: /* @__PURE__ */ jsx112(SequenceInner, {
8248
+ ref,
8249
+ from,
8250
+ durationInFrames,
8251
+ style,
8252
+ _remotionInternalPremountDisplay: premountFor,
8253
+ _remotionInternalPostmountDisplay: postmountFor,
8254
+ _remotionInternalIsPremounting: premountingActive,
8255
+ _remotionInternalIsPostmounting: postmountingActive,
8256
+ ...otherProps
8257
+ })
8258
+ });
8259
+ };
8260
+ var PremountedPostmountedSequence = forwardRef3(PremountedPostmountedSequenceRefForwardingFunction);
8261
+ var SequenceRefForwardingFunction = (props, ref) => {
8262
+ const env = useRemotionEnvironment();
8263
+ const { fps } = useVideoConfig();
8264
+ if (props.layout !== "none" && !env.isRendering) {
8265
+ const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? props.premountFor ?? fps : props.premountFor;
8266
+ if (effectivePremountFor || props.postmountFor) {
8267
+ return /* @__PURE__ */ jsx112(PremountedPostmountedSequence, {
8268
+ ref,
8269
+ ...props,
8270
+ premountFor: effectivePremountFor
8271
+ });
8272
+ }
8273
+ }
8274
+ return /* @__PURE__ */ jsx112(RegularSequence, {
8275
+ ...props,
8276
+ ref
8277
+ });
8278
+ };
8279
+ var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
8280
+ var Sequence = wrapInSchema(SequenceInner, sequenceSchema);
8281
+
8282
+ class CanvasPool {
8283
+ width;
8284
+ height;
8285
+ pairs = new Map;
8286
+ lostContexts = new Set;
8287
+ constructor(width, height) {
8288
+ this.width = width;
8289
+ this.height = height;
8290
+ }
8291
+ getPair(backend) {
8292
+ const existing = this.pairs.get(backend);
8293
+ if (existing) {
8294
+ return existing;
8295
+ }
8296
+ const pair = [
8297
+ this.allocateCanvas(backend),
8298
+ this.allocateCanvas(backend)
8299
+ ];
8300
+ this.pairs.set(backend, pair);
8301
+ return pair;
8302
+ }
8303
+ assertContextNotLost(canvas) {
8304
+ if (this.lostContexts.has(canvas)) {
8305
+ 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.");
8306
+ }
8307
+ }
8308
+ allocateCanvas(backend) {
8309
+ const canvas = document.createElement("canvas");
8310
+ canvas.width = this.width;
8311
+ canvas.height = this.height;
8312
+ switch (backend) {
8313
+ case "2d": {
8314
+ const ctx = canvas.getContext("2d", {
8315
+ colorSpace: "srgb"
8316
+ });
8317
+ if (!ctx) {
8318
+ throw new Error("Failed to acquire 2D context for canvas effect");
8319
+ }
8320
+ return canvas;
8321
+ }
8322
+ case "webgl2": {
8323
+ const ctx = canvas.getContext("webgl2", {
8324
+ premultipliedAlpha: true,
8325
+ alpha: true,
8326
+ preserveDrawingBuffer: true
8327
+ });
8328
+ if (!ctx) {
8329
+ throw new Error("Failed to acquire WebGL2 context for canvas effect");
8330
+ }
8331
+ canvas.addEventListener("webglcontextlost", (e) => {
8332
+ e.preventDefault();
8333
+ this.lostContexts.add(canvas);
8334
+ });
8335
+ canvas.addEventListener("webglcontextrestored", () => {
8336
+ this.lostContexts.delete(canvas);
8337
+ });
8338
+ ctx.pixelStorei(ctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
8339
+ return canvas;
8340
+ }
8341
+ case "webgpu": {
8342
+ if (typeof navigator === "undefined" || !("gpu" in navigator)) {
8343
+ throw new Error("WebGPU is not available in this environment for canvas effect");
8344
+ }
8345
+ return canvas;
8346
+ }
8347
+ default: {
8348
+ const exhaustive = backend;
8349
+ throw new Error(`Unknown effect backend: ${exhaustive}`);
8350
+ }
8351
+ }
8352
+ }
8353
+ }
8354
+ var groupByBackend = (effects) => {
8355
+ const runs = [];
8356
+ let current = [];
8357
+ let currentBackend = null;
8358
+ for (const eff of effects) {
8359
+ const { backend } = eff.definition;
8360
+ if (currentBackend === null || backend === currentBackend) {
8361
+ current.push(eff);
8362
+ currentBackend = backend;
8363
+ } else {
8364
+ runs.push({ backend: currentBackend, effects: current });
8365
+ current = [eff];
8366
+ currentBackend = backend;
8367
+ }
8368
+ }
8369
+ if (currentBackend !== null && current.length > 0) {
8370
+ runs.push({ backend: currentBackend, effects: current });
8371
+ }
8372
+ return runs;
8373
+ };
8374
+ var devicePromise = null;
8375
+ var getGpuDevice = () => {
8376
+ if (devicePromise) {
8377
+ return devicePromise;
8378
+ }
8379
+ devicePromise = (async () => {
8380
+ if (typeof navigator === "undefined" || !("gpu" in navigator)) {
8381
+ throw new Error("WebGPU is not available in this environment");
8382
+ }
8383
+ const { gpu } = navigator;
8384
+ const adapter = await gpu.requestAdapter();
8385
+ if (!adapter) {
8386
+ throw new Error("No WebGPU adapter available");
8387
+ }
8388
+ return adapter.requestDevice();
8389
+ })();
8390
+ return devicePromise;
8391
+ };
8392
+ var createEffectChainState = (width, height) => ({
8393
+ pool: new CanvasPool(width, height),
8394
+ setupCache: new WeakMap,
8395
+ cleanupRegistry: [],
8396
+ currentRunId: 0
8397
+ });
8398
+ var cleanupEffectChainState = (state) => {
8399
+ state.currentRunId++;
8400
+ for (const entry of state.cleanupRegistry) {
8401
+ entry.definition.cleanup(entry.state);
8402
+ }
8403
+ };
8404
+ var ensureSetup = (state, def, target) => {
8405
+ const widened = def;
8406
+ if (state.setupCache.has(widened)) {
8407
+ return state.setupCache.get(widened);
8408
+ }
8409
+ const setupState = def.setup(target);
8410
+ state.setupCache.set(widened, setupState);
8411
+ state.cleanupRegistry.push({ definition: widened, state: setupState });
8412
+ return setupState;
8413
+ };
8414
+ var runEffectChain = async ({
8415
+ state,
8416
+ source,
8417
+ effects,
8418
+ output,
8419
+ width,
8420
+ height
8421
+ }) => {
8422
+ const runId = ++state.currentRunId;
8423
+ const isCancelled = () => state.currentRunId !== runId;
8424
+ const enabledEffects = effects.filter((e) => !e.params.disabled);
8425
+ const runs = groupByBackend(enabledEffects);
8426
+ let currentImage = source;
8427
+ let lastTarget = null;
8428
+ if (runs.length === 0) {
8429
+ if (source === output) {
8430
+ return true;
8431
+ }
8432
+ const ctx = output.getContext("2d");
8433
+ if (!ctx) {
8434
+ throw new Error("Failed to acquire 2D context for output canvas");
8435
+ }
8436
+ ctx.clearRect(0, 0, width, height);
8437
+ ctx.drawImage(currentImage, 0, 0, width, height);
8438
+ return true;
8439
+ }
8440
+ let needsGpuDevice = false;
8441
+ for (const run of runs) {
8442
+ if (run.backend === "webgpu") {
8443
+ needsGpuDevice = true;
8444
+ break;
8445
+ }
8446
+ }
8447
+ const gpuDevice = needsGpuDevice ? await getGpuDevice() : null;
8448
+ if (isCancelled()) {
8449
+ return false;
8450
+ }
8451
+ for (let runIndex = 0;runIndex < runs.length; runIndex++) {
8452
+ const run = runs[runIndex];
8453
+ const [a, b] = state.pool.getPair(run.backend);
8454
+ let dst = a;
8455
+ for (const eff of run.effects) {
8456
+ const def = eff.definition;
8457
+ const setupState = ensureSetup(state, def, dst);
8458
+ def.apply({
8459
+ source: currentImage,
8460
+ target: dst,
8461
+ state: setupState,
8462
+ params: eff.params,
8463
+ width,
8464
+ height,
8465
+ gpuDevice
8466
+ });
8467
+ if (run.backend === "webgl2") {
8468
+ state.pool.assertContextNotLost(dst);
8469
+ }
8470
+ currentImage = dst;
8471
+ dst = dst === a ? b : a;
8472
+ }
8473
+ lastTarget = currentImage ?? lastTarget;
8474
+ const nextRun = runs[runIndex + 1];
8475
+ if (nextRun && nextRun.backend !== run.backend && lastTarget) {
8476
+ const bitmap = await createImageBitmap(lastTarget);
8477
+ if (isCancelled()) {
8478
+ bitmap.close();
8479
+ return false;
8480
+ }
8481
+ currentImage = bitmap;
8482
+ }
8483
+ }
8484
+ if (!lastTarget) {
8485
+ return true;
8486
+ }
8487
+ const outCtx = output.getContext("2d");
8488
+ if (!outCtx) {
8489
+ throw new Error("Failed to acquire 2D context for output canvas");
8490
+ }
8491
+ outCtx.clearRect(0, 0, width, height);
8492
+ outCtx.drawImage(lastTarget, 0, 0, width, height);
8493
+ return true;
8494
+ };
8495
+ var useEffectChainState = () => {
8496
+ const chainStateRef = useRef6(null);
8497
+ const sizeRef = useRef6(null);
8498
+ useEffect4(() => {
8499
+ return () => {
8500
+ if (chainStateRef.current) {
8501
+ cleanupEffectChainState(chainStateRef.current);
8502
+ }
8503
+ };
8504
+ }, []);
8505
+ return useMemo15(() => ({
8506
+ get: (width, height) => {
8507
+ if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
8508
+ if (chainStateRef.current) {
8509
+ cleanupEffectChainState(chainStateRef.current);
8510
+ }
8511
+ chainStateRef.current = createEffectChainState(width, height);
8512
+ sizeRef.current = { width, height };
8513
+ }
8514
+ return chainStateRef.current;
8515
+ }
8516
+ }), []);
8517
+ };
8518
+ var solidSchema = {
8519
+ color: {
8520
+ type: "color",
8521
+ default: "#ffffff",
8522
+ description: "Color"
8523
+ },
8524
+ width: {
8525
+ type: "number",
8526
+ min: 1,
8527
+ step: 1,
8528
+ default: 1920,
8529
+ description: "Width"
8530
+ },
8531
+ height: {
8532
+ type: "number",
8533
+ min: 1,
8534
+ step: 1,
8535
+ default: 1080,
8536
+ description: "Height"
8537
+ },
8538
+ ...sequenceStyleSchema
8539
+ };
8540
+ var SolidInner = ({
8541
+ color,
8542
+ width,
8543
+ height,
8544
+ _experimentalEffects: experimentalEffects = [],
8545
+ className,
8546
+ style,
8547
+ overrideId,
8548
+ ref
8549
+ }) => {
8550
+ const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
8551
+ const [outputCanvas, setOutputCanvas] = useState6(null);
8552
+ const memoizedEffects = useMemoizedEffects({
8553
+ effects: experimentalEffects,
8554
+ overrideId: overrideId ?? null
8555
+ });
8556
+ const sourceCanvas = useMemo16(() => {
8557
+ if (typeof document === "undefined") {
8558
+ return null;
8559
+ }
8560
+ const canvas = document.createElement("canvas");
8561
+ canvas.width = 1;
8562
+ canvas.height = 1;
8563
+ return canvas;
8564
+ }, []);
8565
+ const chainState = useEffectChainState();
8566
+ const canvasRef = useCallback6((canvas) => {
8567
+ setOutputCanvas(canvas);
8568
+ if (typeof ref === "function") {
8569
+ ref(canvas);
8570
+ } else if (ref) {
8571
+ ref.current = canvas;
8572
+ }
8573
+ }, [ref]);
8574
+ useEffect5(() => {
8575
+ if (!outputCanvas || !sourceCanvas) {
8576
+ return;
8577
+ }
8578
+ const handle = delayRender2("Solid effect chain");
8579
+ if (!chainState) {
8580
+ continueRender2(handle);
8581
+ return () => {
8582
+ continueRender2(handle);
8583
+ };
8584
+ }
8585
+ const ctx = sourceCanvas.getContext("2d", { colorSpace: "srgb" });
8586
+ if (!ctx) {
8587
+ cancelRender2(new Error("Failed to acquire 2D context for <Solid> source"));
8588
+ return;
8589
+ }
8590
+ ctx.fillStyle = color;
8591
+ ctx.fillRect(0, 0, 1, 1);
8592
+ runEffectChain({
8593
+ state: chainState.get(width, height),
8594
+ source: sourceCanvas,
8595
+ effects: memoizedEffects,
8596
+ output: outputCanvas,
8597
+ width,
8598
+ height
8599
+ }).then((completed) => {
8600
+ if (completed) {
8601
+ continueRender2(handle);
8602
+ }
8603
+ }).catch((err) => {
8604
+ cancelRender2(err);
8605
+ });
8606
+ return () => {
8607
+ continueRender2(handle);
8608
+ };
8609
+ }, [
8610
+ color,
8611
+ outputCanvas,
8612
+ sourceCanvas,
8613
+ chainState,
8614
+ width,
8615
+ height,
8616
+ delayRender2,
8617
+ continueRender2,
8618
+ cancelRender2,
8619
+ memoizedEffects
8521
8620
  ]);
8522
- return /* @__PURE__ */ jsx12(Freeze, {
8523
- frame: freezeFrame,
8524
- active: isFreezingActive,
8525
- children: /* @__PURE__ */ jsx12(SequenceInner, {
8621
+ return /* @__PURE__ */ jsx12("canvas", {
8622
+ ref: canvasRef,
8623
+ width,
8624
+ height,
8625
+ className,
8626
+ style
8627
+ });
8628
+ };
8629
+ var SolidOuter = forwardRef4(({
8630
+ _experimentalEffects = [],
8631
+ _experimentalControls: controls,
8632
+ color,
8633
+ height,
8634
+ width,
8635
+ className,
8636
+ durationInFrames,
8637
+ style,
8638
+ name,
8639
+ from,
8640
+ hidden,
8641
+ showInTimeline,
8642
+ ...props
8643
+ }, ref) => {
8644
+ const memoizedEffectDefinitions = useMemoizedEffectDefinitions(_experimentalEffects);
8645
+ return /* @__PURE__ */ jsx12(Sequence, {
8646
+ layout: "none",
8647
+ from,
8648
+ hidden,
8649
+ showInTimeline,
8650
+ _experimentalControls: controls,
8651
+ _experimentalEffects: memoizedEffectDefinitions,
8652
+ durationInFrames,
8653
+ name: name ?? "<Solid>",
8654
+ ...props,
8655
+ children: /* @__PURE__ */ jsx12(SolidInner, {
8526
8656
  ref,
8527
- from,
8528
- durationInFrames,
8657
+ overrideId: controls?.overrideId ?? null,
8658
+ color,
8659
+ height,
8660
+ width,
8661
+ className,
8529
8662
  style,
8530
- _remotionInternalPremountDisplay: premountFor,
8531
- _remotionInternalPostmountDisplay: postmountFor,
8532
- _remotionInternalIsPremounting: premountingActive,
8533
- _remotionInternalIsPostmounting: postmountingActive,
8534
- ...otherProps
8663
+ _experimentalEffects
8535
8664
  })
8536
8665
  });
8537
- };
8538
- var PremountedPostmountedSequence = forwardRef3(PremountedPostmountedSequenceRefForwardingFunction);
8539
- var SequenceRefForwardingFunction = (props, ref) => {
8540
- const env = useRemotionEnvironment();
8541
- const { fps } = useVideoConfig();
8542
- if (props.layout !== "none" && !env.isRendering) {
8543
- const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? props.premountFor ?? fps : props.premountFor;
8544
- if (effectivePremountFor || props.postmountFor) {
8545
- return /* @__PURE__ */ jsx12(PremountedPostmountedSequence, {
8546
- ref,
8547
- ...props,
8548
- premountFor: effectivePremountFor
8549
- });
8666
+ });
8667
+ var Solid = wrapInSchema(SolidOuter, solidSchema);
8668
+ Solid.displayName = "Solid";
8669
+ addSequenceStackTraces(Solid);
8670
+ var VERSION = "4.0.463";
8671
+ var checkMultipleRemotionVersions = () => {
8672
+ if (typeof globalThis === "undefined") {
8673
+ return;
8674
+ }
8675
+ const set = () => {
8676
+ globalThis.remotion_imported = VERSION;
8677
+ if (typeof window !== "undefined") {
8678
+ window.remotion_imported = VERSION;
8679
+ }
8680
+ };
8681
+ const alreadyImported = globalThis.remotion_imported || typeof window !== "undefined" && window.remotion_imported;
8682
+ if (alreadyImported) {
8683
+ if (alreadyImported === VERSION) {
8684
+ return;
8685
+ }
8686
+ if (typeof alreadyImported === "string" && alreadyImported.includes("webcodecs")) {
8687
+ set();
8688
+ return;
8550
8689
  }
8690
+ throw new TypeError(`\uD83D\uDEA8 Multiple versions of Remotion detected: ${[
8691
+ VERSION,
8692
+ typeof alreadyImported === "string" ? alreadyImported : "an older version"
8693
+ ].filter(truthy2).join(" and ")}. This will cause things to break in an unexpected way.
8694
+ 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.`);
8551
8695
  }
8552
- return /* @__PURE__ */ jsx12(RegularSequence, {
8553
- ...props,
8554
- ref
8555
- });
8696
+ set();
8556
8697
  };
8557
- var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
8558
- var Sequence = wrapInSchema(SequenceInner, sequenceSchema);
8559
8698
  var calcArgs = (fit, frameSize, canvasSize) => {
8560
8699
  switch (fit) {
8561
8700
  case "fill": {
@@ -8606,7 +8745,7 @@ var calcArgs = (fit, frameSize, canvasSize) => {
8606
8745
  };
8607
8746
  var CanvasRefForwardingFunction = ({ width, height, fit, className, style }, ref) => {
8608
8747
  const canvasRef = useRef7(null);
8609
- const draw = useCallback6((imageData) => {
8748
+ const draw = useCallback7((imageData) => {
8610
8749
  const canvas = canvasRef.current;
8611
8750
  const canvasWidth = width ?? imageData.displayWidth;
8612
8751
  const canvasHeight = height ?? imageData.displayHeight;
@@ -8798,7 +8937,19 @@ var resolveAnimatedImageSource = (src) => {
8798
8937
  }
8799
8938
  return new URL(src, window.origin).href;
8800
8939
  };
8801
- var AnimatedImage = forwardRef4(({
8940
+ var animatedImageSchema = {
8941
+ playbackRate: {
8942
+ type: "number",
8943
+ min: 0,
8944
+ max: 10,
8945
+ step: 0.1,
8946
+ default: 1,
8947
+ description: "Playback Rate"
8948
+ },
8949
+ ...sequenceStyleSchema,
8950
+ hidden: hiddenField
8951
+ };
8952
+ var AnimatedImageContent = forwardRef5(({
8802
8953
  src,
8803
8954
  width,
8804
8955
  height,
@@ -8905,6 +9056,52 @@ var AnimatedImage = forwardRef4(({
8905
9056
  ...props
8906
9057
  });
8907
9058
  });
9059
+ AnimatedImageContent.displayName = "AnimatedImageContent";
9060
+ var AnimatedImageInner = ({
9061
+ src,
9062
+ width,
9063
+ height,
9064
+ onError,
9065
+ fit,
9066
+ playbackRate,
9067
+ loopBehavior,
9068
+ id,
9069
+ className,
9070
+ style,
9071
+ durationInFrames,
9072
+ _experimentalControls: controls,
9073
+ ref,
9074
+ ...sequenceProps
9075
+ }) => {
9076
+ const { durationInFrames: videoDuration } = useVideoConfig();
9077
+ const resolvedDuration = durationInFrames ?? videoDuration;
9078
+ const animatedImageProps = {
9079
+ src,
9080
+ width,
9081
+ height,
9082
+ onError,
9083
+ fit,
9084
+ playbackRate,
9085
+ loopBehavior,
9086
+ id,
9087
+ className,
9088
+ style
9089
+ };
9090
+ return /* @__PURE__ */ jsx14(Sequence, {
9091
+ layout: "none",
9092
+ durationInFrames: resolvedDuration,
9093
+ name: "<AnimatedImage>",
9094
+ _experimentalControls: controls,
9095
+ ...sequenceProps,
9096
+ children: /* @__PURE__ */ jsx14(AnimatedImageContent, {
9097
+ ...animatedImageProps,
9098
+ ref
9099
+ })
9100
+ });
9101
+ };
9102
+ var AnimatedImage = wrapInSchema(AnimatedImageInner, animatedImageSchema);
9103
+ AnimatedImage.displayName = "AnimatedImage";
9104
+ addSequenceStackTraces(AnimatedImage);
8908
9105
  var cachedSupport = null;
8909
9106
  var isHtmlInCanvasSupported = () => {
8910
9107
  if (cachedSupport !== null) {
@@ -8944,30 +9141,16 @@ var defaultOnPaint = ({
8944
9141
  element.style.transform = transform.toString();
8945
9142
  };
8946
9143
  var HtmlInCanvasAncestorContext = createContext16(false);
8947
- var HtmlInCanvasInner = forwardRef5(({
8948
- width,
8949
- height,
8950
- _experimentalEffects: effects = [],
8951
- children,
8952
- onPaint,
8953
- onInit,
8954
- _experimentalControls: controls,
8955
- style,
8956
- durationInFrames,
8957
- ...sequenceProps
8958
- }, ref) => {
9144
+ var HtmlInCanvasContent = forwardRef6(({ width, height, effects, children, onPaint, onInit, controls, style }, ref) => {
8959
9145
  const isInsideAncestorHtmlInCanvas = useContext18(HtmlInCanvasAncestorContext);
8960
9146
  assertHtmlInCanvasDimensions(width, height);
8961
9147
  const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
8962
9148
  if (!isHtmlInCanvasSupported()) {
8963
9149
  cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
8964
9150
  }
8965
- const { durationInFrames: videoDuration } = useVideoConfig();
8966
- const resolvedDuration = durationInFrames ?? videoDuration;
8967
- const frame = useCurrentFrame();
8968
9151
  const canvas2dRef = useRef9(null);
8969
9152
  const divRef = useRef9(null);
8970
- const setLayoutCanvasRef = useCallback7((node) => {
9153
+ const setLayoutCanvasRef = useCallback8((node) => {
8971
9154
  canvas2dRef.current = node;
8972
9155
  if (typeof ref === "function") {
8973
9156
  ref(node);
@@ -8981,11 +9164,8 @@ var HtmlInCanvasInner = forwardRef5(({
8981
9164
  effects,
8982
9165
  overrideId: controls?.overrideId ?? null
8983
9166
  });
8984
- const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
8985
9167
  const effectsRef = useRef9(memoizedEffects);
8986
9168
  effectsRef.current = memoizedEffects;
8987
- const frameRef = useRef9(frame);
8988
- frameRef.current = frame;
8989
9169
  const onPaintRef = useRef9(onPaint);
8990
9170
  onPaintRef.current = onPaint;
8991
9171
  const onInitRef = useRef9(onInit);
@@ -8993,7 +9173,7 @@ var HtmlInCanvasInner = forwardRef5(({
8993
9173
  const initializedRef = useRef9(false);
8994
9174
  const onInitCleanupRef = useRef9(null);
8995
9175
  const unmountedRef = useRef9(false);
8996
- const onPaintCb = useCallback7(async () => {
9176
+ const onPaintCb = useCallback8(async () => {
8997
9177
  const element = divRef.current;
8998
9178
  if (!element) {
8999
9179
  throw new Error("Canvas or scene element not found");
@@ -9042,7 +9222,6 @@ var HtmlInCanvasInner = forwardRef5(({
9042
9222
  source: offscreenCanvas,
9043
9223
  effects: effectsRef.current,
9044
9224
  output: canvas2dRef.current,
9045
- frame: frameRef.current,
9046
9225
  width,
9047
9226
  height
9048
9227
  });
@@ -9106,31 +9285,64 @@ var HtmlInCanvasInner = forwardRef5(({
9106
9285
  if (isInsideAncestorHtmlInCanvas) {
9107
9286
  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.");
9108
9287
  }
9288
+ return /* @__PURE__ */ jsx15(HtmlInCanvasAncestorContext.Provider, {
9289
+ value: true,
9290
+ children: /* @__PURE__ */ jsx15("canvas", {
9291
+ ref: setLayoutCanvasRef,
9292
+ width,
9293
+ height,
9294
+ style,
9295
+ children: /* @__PURE__ */ jsx15("div", {
9296
+ ref: divRef,
9297
+ style: innerStyle,
9298
+ children
9299
+ })
9300
+ })
9301
+ });
9302
+ });
9303
+ HtmlInCanvasContent.displayName = "HtmlInCanvasContent";
9304
+ var HtmlInCanvasInner = forwardRef6(({
9305
+ width,
9306
+ height,
9307
+ _experimentalEffects: effects = [],
9308
+ children,
9309
+ onPaint,
9310
+ onInit,
9311
+ _experimentalControls: controls,
9312
+ style,
9313
+ durationInFrames,
9314
+ name,
9315
+ ...sequenceProps
9316
+ }, ref) => {
9317
+ const { durationInFrames: videoDuration } = useVideoConfig();
9318
+ const resolvedDuration = durationInFrames ?? videoDuration;
9319
+ const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
9109
9320
  return /* @__PURE__ */ jsx15(Sequence, {
9110
9321
  durationInFrames: resolvedDuration,
9111
- name: "<HtmlInCanvas>",
9322
+ name: name ?? "<HtmlInCanvas>",
9112
9323
  _experimentalControls: controls,
9113
9324
  _experimentalEffects: memoizedEffectDefinitions,
9114
9325
  layout: "none",
9115
9326
  ...sequenceProps,
9116
- children: /* @__PURE__ */ jsx15(HtmlInCanvasAncestorContext.Provider, {
9117
- value: true,
9118
- children: /* @__PURE__ */ jsx15("canvas", {
9119
- ref: setLayoutCanvasRef,
9120
- width,
9121
- height,
9122
- style,
9123
- children: /* @__PURE__ */ jsx15("div", {
9124
- ref: divRef,
9125
- style: innerStyle,
9126
- children
9127
- })
9128
- })
9327
+ children: /* @__PURE__ */ jsx15(HtmlInCanvasContent, {
9328
+ ref,
9329
+ width,
9330
+ height,
9331
+ effects,
9332
+ onPaint,
9333
+ onInit,
9334
+ controls,
9335
+ style,
9336
+ children
9129
9337
  })
9130
9338
  });
9131
9339
  });
9132
9340
  HtmlInCanvasInner.displayName = "HtmlInCanvas";
9133
- var HtmlInCanvasWrapped = wrapInSchema(HtmlInCanvasInner, sequenceStyleSchema);
9341
+ var htmlInCanvasSchema = {
9342
+ ...sequenceStyleSchema,
9343
+ hidden: hiddenField
9344
+ };
9345
+ var HtmlInCanvasWrapped = wrapInSchema(HtmlInCanvasInner, htmlInCanvasSchema);
9134
9346
  var HtmlInCanvas = Object.assign(HtmlInCanvasWrapped, {
9135
9347
  isSupported: isHtmlInCanvasSupported
9136
9348
  });
@@ -9177,7 +9389,7 @@ var RenderAssetManager = createContext17({
9177
9389
  var RenderAssetManagerProvider = ({ children, collectAssets }) => {
9178
9390
  const [renderAssets, setRenderAssets] = useState9([]);
9179
9391
  const renderAssetsRef = useRef10([]);
9180
- const registerRenderAsset = useCallback8((renderAsset) => {
9392
+ const registerRenderAsset = useCallback9((renderAsset) => {
9181
9393
  validateRenderAsset(renderAsset);
9182
9394
  renderAssetsRef.current = [...renderAssetsRef.current, renderAsset];
9183
9395
  setRenderAssets(renderAssetsRef.current);
@@ -9194,7 +9406,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
9194
9406
  };
9195
9407
  }, []);
9196
9408
  }
9197
- const unregisterRenderAsset = useCallback8((id) => {
9409
+ const unregisterRenderAsset = useCallback9((id) => {
9198
9410
  renderAssetsRef.current = renderAssetsRef.current.filter((a) => a.id !== id);
9199
9411
  setRenderAssets(renderAssetsRef.current);
9200
9412
  }, []);
@@ -9594,6 +9806,9 @@ var validateMediaProps = (props, component) => {
9594
9806
  if (typeof props.playbackRate === "number" && (isNaN(props.playbackRate) || !Number.isFinite(props.playbackRate) || props.playbackRate <= 0)) {
9595
9807
  throw new TypeError(`You have passed a playbackRate of ${props.playbackRate} to your <${component} /> component. Playback rate must be a real number above 0.`);
9596
9808
  }
9809
+ if (typeof props.preservePitch !== "boolean" && typeof props.preservePitch !== "undefined") {
9810
+ throw new TypeError(`'preservePitch' must be a boolean or undefined but got '${typeof props.preservePitch}' instead`);
9811
+ }
9597
9812
  };
9598
9813
  var validateStartFromProps = (startFrom, endAt) => {
9599
9814
  if (typeof startFrom !== "undefined") {
@@ -9939,7 +10154,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
9939
10154
  }, []);
9940
10155
  const prevEndTimes = useRef11({ scheduledEndTime: null, mediaEndTime: null });
9941
10156
  const nodesToResume = useRef11(new Map);
9942
- const unscheduleAudioNode = useCallback9((node) => {
10157
+ const unscheduleAudioNode = useCallback10((node) => {
9943
10158
  nodesToResume.current.delete(node);
9944
10159
  }, []);
9945
10160
  const scheduleAudioNode = useMemo22(() => {
@@ -9987,7 +10202,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
9987
10202
  };
9988
10203
  };
9989
10204
  }, [ctxAndGain, logLevel]);
9990
- const resume = useCallback9(() => {
10205
+ const resume = useCallback10(() => {
9991
10206
  if (!ctxAndGain) {
9992
10207
  return Promise.resolve();
9993
10208
  }
@@ -10014,10 +10229,10 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
10014
10229
  });
10015
10230
  return resumePromise.catch(() => {});
10016
10231
  }, [ctxAndGain, logLevel]);
10017
- const getIsResumingAudioContext = useCallback9(() => {
10232
+ const getIsResumingAudioContext = useCallback10(() => {
10018
10233
  return isResuming.current;
10019
10234
  }, []);
10020
- const suspend = useCallback9(() => {
10235
+ const suspend = useCallback10(() => {
10021
10236
  if (!ctxAndGain) {
10022
10237
  return;
10023
10238
  }
@@ -10090,7 +10305,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10090
10305
  };
10091
10306
  }, [refs]);
10092
10307
  const takenAudios = useRef11(new Array(numberOfAudioTags).fill(false));
10093
- const rerenderAudios = useCallback9(() => {
10308
+ const rerenderAudios = useCallback10(() => {
10094
10309
  refs.forEach(({ ref, id }) => {
10095
10310
  const data = audios.current?.find((a) => a.id === id);
10096
10311
  const { current } = ref;
@@ -10111,7 +10326,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10111
10326
  });
10112
10327
  });
10113
10328
  }, [refs]);
10114
- const registerAudio = useCallback9((options) => {
10329
+ const registerAudio = useCallback10((options) => {
10115
10330
  const { aud, audioId, premounting, postmounting } = options;
10116
10331
  const found = audios.current?.find((a) => a.audioId === audioId);
10117
10332
  if (found) {
@@ -10140,7 +10355,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10140
10355
  rerenderAudios();
10141
10356
  return newElem;
10142
10357
  }, [numberOfAudioTags, refs, rerenderAudios]);
10143
- const unregisterAudio = useCallback9((id) => {
10358
+ const unregisterAudio = useCallback10((id) => {
10144
10359
  const cloned = [...takenAudios.current];
10145
10360
  const index = refs.findIndex((r2) => r2.id === id);
10146
10361
  if (index === -1) {
@@ -10151,7 +10366,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10151
10366
  audios.current = audios.current?.filter((a) => a.id !== id);
10152
10367
  rerenderAudios();
10153
10368
  }, [refs, rerenderAudios]);
10154
- const updateAudio = useCallback9(({
10369
+ const updateAudio = useCallback10(({
10155
10370
  aud,
10156
10371
  audioId,
10157
10372
  id,
@@ -10185,7 +10400,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10185
10400
  rerenderAudios();
10186
10401
  }
10187
10402
  }, [rerenderAudios]);
10188
- const playAllAudios = useCallback9(() => {
10403
+ const playAllAudios = useCallback10(() => {
10189
10404
  refs.forEach((ref) => {
10190
10405
  const audio = audios.current.find((a) => a.el === ref.ref);
10191
10406
  if (audio?.premounting) {
@@ -10805,7 +11020,7 @@ var useBufferManager = (logLevel, mountTime) => {
10805
11020
  const env = useRemotionEnvironment();
10806
11021
  const rendering = env.isRendering;
10807
11022
  const buffering = useRef14(false);
10808
- const addBlock = useCallback10((block) => {
11023
+ const addBlock = useCallback11((block) => {
10809
11024
  if (rendering) {
10810
11025
  return {
10811
11026
  unblock: () => {
@@ -10831,7 +11046,7 @@ var useBufferManager = (logLevel, mountTime) => {
10831
11046
  }
10832
11047
  };
10833
11048
  }, [rendering]);
10834
- const listenForBuffering = useCallback10((callback) => {
11049
+ const listenForBuffering = useCallback11((callback) => {
10835
11050
  setOnBufferingCallbacks((c) => [...c, callback]);
10836
11051
  return {
10837
11052
  remove: () => {
@@ -10839,7 +11054,7 @@ var useBufferManager = (logLevel, mountTime) => {
10839
11054
  }
10840
11055
  };
10841
11056
  }, []);
10842
- const listenForResume = useCallback10((callback) => {
11057
+ const listenForResume = useCallback11((callback) => {
10843
11058
  setOnResumeCallbacks((c) => [...c, callback]);
10844
11059
  return {
10845
11060
  remove: () => {
@@ -10953,7 +11168,7 @@ var useBufferUntilFirstFrame = ({
10953
11168
  }) => {
10954
11169
  const bufferingRef = useRef15(false);
10955
11170
  const { delayPlayback } = useBufferState();
10956
- const bufferUntilFirstFrame = useCallback11((requestedTime) => {
11171
+ const bufferUntilFirstFrame = useCallback12((requestedTime) => {
10957
11172
  if (mediaType !== "video") {
10958
11173
  return;
10959
11174
  }
@@ -11447,6 +11662,7 @@ var useMediaPlayback = ({
11447
11662
  src,
11448
11663
  mediaType,
11449
11664
  playbackRate: localPlaybackRate,
11665
+ preservePitch = true,
11450
11666
  onlyWarnForMediaSeekingError,
11451
11667
  acceptableTimeshift,
11452
11668
  pauseWhenBuffering,
@@ -11469,7 +11685,7 @@ var useMediaPlayback = ({
11469
11685
  throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
11470
11686
  }
11471
11687
  const isVariableFpsVideoMap = useRef17({});
11472
- const onVariableFpsVideoDetected = useCallback12(() => {
11688
+ const onVariableFpsVideoDetected = useCallback13(() => {
11473
11689
  if (!src) {
11474
11690
  return;
11475
11691
  }
@@ -11564,7 +11780,10 @@ var useMediaPlayback = ({
11564
11780
  if (mediaRef.current && mediaRef.current.playbackRate !== playbackRateToSet) {
11565
11781
  mediaRef.current.playbackRate = playbackRateToSet;
11566
11782
  }
11567
- }, [mediaRef, playbackRate]);
11783
+ if (mediaRef.current && mediaRef.current.preservesPitch !== preservePitch) {
11784
+ mediaRef.current.preservesPitch = preservePitch;
11785
+ }
11786
+ }, [mediaRef, playbackRate, preservePitch]);
11568
11787
  useEffect12(() => {
11569
11788
  const tagName = mediaType === "audio" ? "<Html5Audio>" : "<Html5Video>";
11570
11789
  if (!mediaRef.current) {
@@ -11774,6 +11993,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
11774
11993
  volume,
11775
11994
  muted,
11776
11995
  playbackRate,
11996
+ preservePitch,
11777
11997
  shouldPreMountAudioTags,
11778
11998
  src,
11779
11999
  onDuration,
@@ -11804,14 +12024,12 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
11804
12024
  const [mediaVolume] = useMediaVolumeState();
11805
12025
  const [mediaMuted] = useMediaMutedState();
11806
12026
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
11807
- const { hidden } = useContext29(SequenceVisibilityToggleContext);
11808
12027
  if (!src) {
11809
12028
  throw new TypeError("No 'src' was passed to <Html5Audio>.");
11810
12029
  }
11811
12030
  const preloadedSrc = usePreload(src);
11812
12031
  const sequenceContext = useContext29(SequenceContext);
11813
12032
  const [timelineId] = useState16(() => String(Math.random()));
11814
- const isSequenceHidden = hidden[timelineId] ?? false;
11815
12033
  const userPreferredVolume = evaluateVolume({
11816
12034
  frame: volumePropFrame,
11817
12035
  volume,
@@ -11825,7 +12043,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
11825
12043
  });
11826
12044
  const propsToPass = useMemo28(() => {
11827
12045
  return {
11828
- muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
12046
+ muted: muted || mediaMuted || userPreferredVolume <= 0,
11829
12047
  src: preloadedSrc,
11830
12048
  loop: _remotionInternalNativeLoopPassed,
11831
12049
  crossOrigin: crossOriginValue,
@@ -11833,7 +12051,6 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
11833
12051
  };
11834
12052
  }, [
11835
12053
  _remotionInternalNativeLoopPassed,
11836
- isSequenceHidden,
11837
12054
  mediaMuted,
11838
12055
  muted,
11839
12056
  nativeProps,
@@ -11878,6 +12095,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
11878
12095
  src,
11879
12096
  mediaType: "audio",
11880
12097
  playbackRate: playbackRate ?? 1,
12098
+ preservePitch,
11881
12099
  onlyWarnForMediaSeekingError: false,
11882
12100
  acceptableTimeshift: acceptableTimeShiftInSeconds ?? null,
11883
12101
  isPremounting: Boolean(sequenceContext?.premounting),
@@ -11940,7 +12158,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
11940
12158
  ...propsToPass
11941
12159
  });
11942
12160
  };
11943
- var AudioForPreview = forwardRef6(AudioForDevelopmentForwardRefFunction);
12161
+ var AudioForPreview = forwardRef7(AudioForDevelopmentForwardRefFunction);
11944
12162
  var AudioForRenderingRefForwardingFunction = (props, ref) => {
11945
12163
  const audioRef = useRef19(null);
11946
12164
  const {
@@ -11959,6 +12177,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
11959
12177
  loopVolumeCurveBehavior,
11960
12178
  pauseWhenBuffering,
11961
12179
  audioStreamIndex,
12180
+ preservePitch: _preservePitch,
11962
12181
  ...nativeProps
11963
12182
  } = props;
11964
12183
  const absoluteFrame = useTimelinePosition();
@@ -12072,7 +12291,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
12072
12291
  onError: onNativeError
12073
12292
  });
12074
12293
  };
12075
- var AudioForRendering = forwardRef7(AudioForRenderingRefForwardingFunction);
12294
+ var AudioForRendering = forwardRef8(AudioForRenderingRefForwardingFunction);
12076
12295
  var AudioRefForwardingFunction = (props, ref) => {
12077
12296
  const audioTagsContext = useContext31(SharedAudioTagsContext);
12078
12297
  const {
@@ -12098,7 +12317,7 @@ var AudioRefForwardingFunction = (props, ref) => {
12098
12317
  throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
12099
12318
  }
12100
12319
  const preloadedSrc = usePreload(props.src);
12101
- const onError = useCallback13((e) => {
12320
+ const onError = useCallback14((e) => {
12102
12321
  console.log(e.currentTarget.error);
12103
12322
  const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;
12104
12323
  if (loop) {
@@ -12112,7 +12331,7 @@ var AudioRefForwardingFunction = (props, ref) => {
12112
12331
  console.warn(errMessage);
12113
12332
  }
12114
12333
  }, [loop, onRemotionError, preloadedSrc]);
12115
- const onDuration = useCallback13((src, durationInSeconds) => {
12334
+ const onDuration = useCallback14((src, durationInSeconds) => {
12116
12335
  setDurations({ type: "got-duration", durationInSeconds, src });
12117
12336
  }, [setDurations]);
12118
12337
  const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];
@@ -12162,7 +12381,11 @@ var AudioRefForwardingFunction = (props, ref) => {
12162
12381
  })
12163
12382
  });
12164
12383
  }
12165
- validateMediaProps({ playbackRate: props.playbackRate, volume: props.volume }, "Html5Audio");
12384
+ validateMediaProps({
12385
+ playbackRate: props.playbackRate,
12386
+ preservePitch: props.preservePitch,
12387
+ volume: props.volume
12388
+ }, "Html5Audio");
12166
12389
  if (environment.isRendering) {
12167
12390
  return /* @__PURE__ */ jsx24(AudioForRendering, {
12168
12391
  onDuration,
@@ -12185,7 +12408,7 @@ var AudioRefForwardingFunction = (props, ref) => {
12185
12408
  showInTimeline: showInTimeline ?? true
12186
12409
  });
12187
12410
  };
12188
- var Html5Audio = forwardRef8(AudioRefForwardingFunction);
12411
+ var Html5Audio = forwardRef9(AudioRefForwardingFunction);
12189
12412
  addSequenceStackTraces(Html5Audio);
12190
12413
  var Audio = Html5Audio;
12191
12414
  var kSplineTableSize = 11;
@@ -12202,11 +12425,11 @@ var IFrameRefForwarding = ({
12202
12425
  retries: delayRenderRetries ?? undefined,
12203
12426
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
12204
12427
  }));
12205
- const didLoad = useCallback14((e) => {
12428
+ const didLoad = useCallback15((e) => {
12206
12429
  continueRender2(handle);
12207
12430
  onLoad?.(e);
12208
12431
  }, [handle, onLoad, continueRender2]);
12209
- const didGetError = useCallback14((e) => {
12432
+ const didGetError = useCallback15((e) => {
12210
12433
  continueRender2(handle);
12211
12434
  if (onError) {
12212
12435
  onError(e);
@@ -12222,7 +12445,7 @@ var IFrameRefForwarding = ({
12222
12445
  onLoad: didLoad
12223
12446
  });
12224
12447
  };
12225
- var IFrame = forwardRef9(IFrameRefForwarding);
12448
+ var IFrame = forwardRef10(IFrameRefForwarding);
12226
12449
  function exponentialBackoff(errorCount) {
12227
12450
  return 1000 * 2 ** (errorCount - 1);
12228
12451
  }
@@ -12232,7 +12455,7 @@ function truncateSrcForLabel(src) {
12232
12455
  }
12233
12456
  return src;
12234
12457
  }
12235
- var ImgInner = ({
12458
+ var ImgContent = ({
12236
12459
  onError,
12237
12460
  maxRetries = 2,
12238
12461
  src,
@@ -12241,21 +12464,13 @@ var ImgInner = ({
12241
12464
  delayRenderTimeoutInMilliseconds,
12242
12465
  onImageFrame,
12243
12466
  crossOrigin,
12244
- showInTimeline,
12245
- name,
12246
- stack,
12247
12467
  ref,
12248
- _experimentalControls: controls,
12249
12468
  ...props2
12250
12469
  }) => {
12251
12470
  const imageRef = useRef20(null);
12252
12471
  const errors = useRef20({});
12253
12472
  const { delayPlayback } = useBufferState();
12254
12473
  const sequenceContext = useContext32(SequenceContext);
12255
- const [timelineId] = useState18(() => String(Math.random()));
12256
- if (!src) {
12257
- throw new Error('No "src" prop was passed to <Img>.');
12258
- }
12259
12474
  const _propsValid = true;
12260
12475
  if (!_propsValid) {
12261
12476
  throw new Error("typecheck error");
@@ -12263,19 +12478,8 @@ var ImgInner = ({
12263
12478
  useImperativeHandle6(ref, () => {
12264
12479
  return imageRef.current;
12265
12480
  }, []);
12266
- useImageInTimeline({
12267
- src,
12268
- displayName: name ?? null,
12269
- id: timelineId,
12270
- stack: stack ?? null,
12271
- showInTimeline: showInTimeline ?? true,
12272
- premountDisplay: sequenceContext?.premountDisplay ?? null,
12273
- postmountDisplay: sequenceContext?.postmountDisplay ?? null,
12274
- loopDisplay: undefined,
12275
- controls: controls ?? null
12276
- });
12277
12481
  const actualSrc = usePreload(src);
12278
- const retryIn = useCallback15((timeout) => {
12482
+ const retryIn = useCallback16((timeout) => {
12279
12483
  if (!imageRef.current) {
12280
12484
  return;
12281
12485
  }
@@ -12293,7 +12497,7 @@ var ImgInner = ({
12293
12497
  }, timeout);
12294
12498
  }, []);
12295
12499
  const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
12296
- const didGetError = useCallback15((e) => {
12500
+ const didGetError = useCallback16((e) => {
12297
12501
  if (!errors.current) {
12298
12502
  return;
12299
12503
  }
@@ -12395,7 +12599,44 @@ var ImgInner = ({
12395
12599
  decoding: "sync"
12396
12600
  });
12397
12601
  };
12398
- var Img = wrapInSchema(ImgInner, sequenceStyleSchema);
12602
+ var ImgInner = ({
12603
+ hidden,
12604
+ name,
12605
+ stack,
12606
+ showInTimeline,
12607
+ src,
12608
+ _experimentalControls: controls,
12609
+ ...props2
12610
+ }) => {
12611
+ const sequenceContext = useContext32(SequenceContext);
12612
+ const [timelineId] = useState18(() => String(Math.random()));
12613
+ if (!src) {
12614
+ throw new Error('No "src" prop was passed to <Img>.');
12615
+ }
12616
+ useImageInTimeline({
12617
+ src,
12618
+ displayName: name ?? null,
12619
+ id: timelineId,
12620
+ stack: stack ?? null,
12621
+ showInTimeline: showInTimeline ?? true,
12622
+ premountDisplay: sequenceContext?.premountDisplay ?? null,
12623
+ postmountDisplay: sequenceContext?.postmountDisplay ?? null,
12624
+ loopDisplay: undefined,
12625
+ controls: controls ?? null
12626
+ });
12627
+ if (hidden) {
12628
+ return null;
12629
+ }
12630
+ return /* @__PURE__ */ jsx26(ImgContent, {
12631
+ src,
12632
+ ...props2
12633
+ });
12634
+ };
12635
+ var imgSchema = {
12636
+ ...sequenceStyleSchema,
12637
+ hidden: hiddenField
12638
+ };
12639
+ var Img = wrapInSchema(ImgInner, imgSchema);
12399
12640
  addSequenceStackTraces(Img);
12400
12641
  var compositionsRef = React28.createRef();
12401
12642
  var CompositionManagerProvider = ({
@@ -12409,14 +12650,14 @@ var CompositionManagerProvider = ({
12409
12650
  const [canvasContent, setCanvasContent] = useState19(initialCanvasContent);
12410
12651
  const [compositions, setCompositions] = useState19(initialCompositions);
12411
12652
  const currentcompositionsRef = useRef21(compositions);
12412
- const updateCompositions = useCallback16((updateComps) => {
12653
+ const updateCompositions = useCallback17((updateComps) => {
12413
12654
  setCompositions((comps) => {
12414
12655
  const updated = updateComps(comps);
12415
12656
  currentcompositionsRef.current = updated;
12416
12657
  return updated;
12417
12658
  });
12418
12659
  }, []);
12419
- const registerComposition = useCallback16((comp) => {
12660
+ const registerComposition = useCallback17((comp) => {
12420
12661
  updateCompositions((comps) => {
12421
12662
  if (comps.find((c2) => c2.id === comp.id)) {
12422
12663
  throw new Error(`Multiple composition with id ${comp.id} are registered.`);
@@ -12424,12 +12665,12 @@ var CompositionManagerProvider = ({
12424
12665
  return [...comps, comp];
12425
12666
  });
12426
12667
  }, [updateCompositions]);
12427
- const unregisterComposition = useCallback16((id) => {
12668
+ const unregisterComposition = useCallback17((id) => {
12428
12669
  setCompositions((comps) => {
12429
12670
  return comps.filter((c2) => c2.id !== id);
12430
12671
  });
12431
12672
  }, []);
12432
- const registerFolder = useCallback16((name, parent, nonce) => {
12673
+ const registerFolder = useCallback17((name, parent, nonce) => {
12433
12674
  setFolders((prevFolders) => {
12434
12675
  return [
12435
12676
  ...prevFolders,
@@ -12441,7 +12682,7 @@ var CompositionManagerProvider = ({
12441
12682
  ];
12442
12683
  });
12443
12684
  }, []);
12444
- const unregisterFolder = useCallback16((name, parent) => {
12685
+ const unregisterFolder = useCallback17((name, parent) => {
12445
12686
  setFolders((prevFolders) => {
12446
12687
  return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
12447
12688
  });
@@ -12541,8 +12782,24 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
12541
12782
  }
12542
12783
  `;
12543
12784
  };
12785
+ var disabledEffectField = {
12786
+ type: "boolean",
12787
+ default: false,
12788
+ description: "Disabled"
12789
+ };
12544
12790
  var createEffect = (definition) => {
12545
- const widened = definition;
12791
+ const userCalculateKey = definition.calculateKey;
12792
+ const widened = {
12793
+ ...definition,
12794
+ calculateKey: (params) => {
12795
+ const disabled = params.disabled ?? false;
12796
+ return `${userCalculateKey(params)}-disabled-${disabled}`;
12797
+ },
12798
+ schema: {
12799
+ disabled: disabledEffectField,
12800
+ ...definition.schema
12801
+ }
12802
+ };
12546
12803
  const factory = (params = {}) => ({
12547
12804
  definition: widened,
12548
12805
  params,
@@ -12901,6 +13158,7 @@ var OffthreadVideoForRendering = ({
12901
13158
  onVideoFrame,
12902
13159
  crossOrigin,
12903
13160
  audioStreamIndex,
13161
+ preservePitch: _preservePitch,
12904
13162
  ...props2
12905
13163
  }) => {
12906
13164
  const absoluteFrame = useTimelinePosition();
@@ -13056,7 +13314,7 @@ var OffthreadVideoForRendering = ({
13056
13314
  continueRender2,
13057
13315
  delayRender2
13058
13316
  ]);
13059
- const onErr = useCallback17(() => {
13317
+ const onErr = useCallback18(() => {
13060
13318
  if (onError) {
13061
13319
  onError?.(new Error("Failed to load image with src " + imageSrc));
13062
13320
  } else {
@@ -13066,7 +13324,7 @@ var OffthreadVideoForRendering = ({
13066
13324
  const className = useMemo33(() => {
13067
13325
  return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy2).join(" ");
13068
13326
  }, [props2.className]);
13069
- const onImageFrame = useCallback17((img) => {
13327
+ const onImageFrame = useCallback18((img) => {
13070
13328
  if (onVideoFrame) {
13071
13329
  onVideoFrame(img);
13072
13330
  }
@@ -13147,6 +13405,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
13147
13405
  volume,
13148
13406
  muted,
13149
13407
  playbackRate,
13408
+ preservePitch,
13150
13409
  onlyWarnForMediaSeekingError,
13151
13410
  src,
13152
13411
  onDuration,
@@ -13178,11 +13437,9 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
13178
13437
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
13179
13438
  const { fps, durationInFrames } = useVideoConfig();
13180
13439
  const parentSequence = useContext35(SequenceContext);
13181
- const { hidden } = useContext35(SequenceVisibilityToggleContext);
13182
13440
  const logLevel = useLogLevel();
13183
13441
  const mountTime = useMountTime();
13184
13442
  const [timelineId] = useState21(() => String(Math.random()));
13185
- const isSequenceHidden = hidden[timelineId] ?? false;
13186
13443
  if (typeof acceptableTimeShift !== "undefined") {
13187
13444
  throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
13188
13445
  }
@@ -13213,6 +13470,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
13213
13470
  src,
13214
13471
  mediaType: "video",
13215
13472
  playbackRate: props2.playbackRate ?? 1,
13473
+ preservePitch,
13216
13474
  onlyWarnForMediaSeekingError,
13217
13475
  acceptableTimeshift: acceptableTimeShiftInSeconds ?? null,
13218
13476
  isPremounting: Boolean(parentSequence?.premounting),
@@ -13326,10 +13584,9 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
13326
13584
  }, []);
13327
13585
  const actualStyle = useMemo34(() => {
13328
13586
  return {
13329
- ...style,
13330
- opacity: isSequenceHidden ? 0 : style?.opacity ?? 1
13587
+ ...style
13331
13588
  };
13332
- }, [isSequenceHidden, style]);
13589
+ }, [style]);
13333
13590
  const crossOriginValue = getCrossOriginValue({
13334
13591
  crossOrigin,
13335
13592
  requestsVideoFrame: Boolean(onVideoFrame),
@@ -13337,7 +13594,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
13337
13594
  });
13338
13595
  return /* @__PURE__ */ jsx31("video", {
13339
13596
  ref: videoRef,
13340
- muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
13597
+ muted: muted || mediaMuted || userPreferredVolume <= 0,
13341
13598
  playsInline: true,
13342
13599
  src: actualSrc,
13343
13600
  loop: _remotionInternalNativeLoopPassed,
@@ -13347,7 +13604,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
13347
13604
  ...nativeProps
13348
13605
  });
13349
13606
  };
13350
- var VideoForPreview = forwardRef10(VideoForDevelopmentRefForwardingFunction);
13607
+ var VideoForPreview = forwardRef11(VideoForDevelopmentRefForwardingFunction);
13351
13608
  var InnerOffthreadVideo = (props2) => {
13352
13609
  const {
13353
13610
  startFrom,
@@ -13364,7 +13621,7 @@ var InnerOffthreadVideo = (props2) => {
13364
13621
  if (environment.isClientSideRendering) {
13365
13622
  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");
13366
13623
  }
13367
- const onDuration = useCallback18(() => {
13624
+ const onDuration = useCallback19(() => {
13368
13625
  return;
13369
13626
  }, []);
13370
13627
  if (typeof props2.src !== "string") {
@@ -13452,6 +13709,7 @@ var OffthreadVideo = ({
13452
13709
  onVideoFrame,
13453
13710
  pauseWhenBuffering,
13454
13711
  playbackRate,
13712
+ preservePitch,
13455
13713
  showInTimeline,
13456
13714
  style,
13457
13715
  toneFrequency,
@@ -13487,6 +13745,7 @@ var OffthreadVideo = ({
13487
13745
  onVideoFrame,
13488
13746
  pauseWhenBuffering: pauseWhenBuffering ?? true,
13489
13747
  playbackRate: playbackRate ?? 1,
13748
+ preservePitch,
13490
13749
  toneFrequency: toneFrequency ?? 1,
13491
13750
  showInTimeline: showInTimeline ?? true,
13492
13751
  src,
@@ -13607,7 +13866,6 @@ var Internals = {
13607
13866
  VisualModeSettersContext,
13608
13867
  SequenceManager,
13609
13868
  SequenceStackTracesUpdateContext,
13610
- SequenceVisibilityToggleContext,
13611
13869
  wrapInSchema,
13612
13870
  sequenceSchema,
13613
13871
  sequenceStyleSchema,
@@ -13711,7 +13969,8 @@ var Internals = {
13711
13969
  findPropsToDelete,
13712
13970
  makeSequencePropsSubscriptionKey,
13713
13971
  getCodeValuesCtx,
13714
- getEffectCodeValuesCtx
13972
+ getEffectCodeValuesCtx,
13973
+ hiddenField
13715
13974
  };
13716
13975
  var NUMBER = "[-+]?\\d*\\.?\\d+";
13717
13976
  var PERCENTAGE = NUMBER + "%";
@@ -13774,7 +14033,7 @@ var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
13774
14033
  children
13775
14034
  });
13776
14035
  };
13777
- var SeriesSequence = forwardRef11(SeriesSequenceRefForwardingFunction);
14036
+ var SeriesSequence = forwardRef12(SeriesSequenceRefForwardingFunction);
13778
14037
  var SeriesInner = (props2) => {
13779
14038
  const childrenValue = useMemo36(() => {
13780
14039
  let startFrame = 0;
@@ -14299,6 +14558,7 @@ var VideoForRenderingForwardFunction = ({
14299
14558
  loopVolumeCurveBehavior,
14300
14559
  audioStreamIndex,
14301
14560
  onVideoFrame,
14561
+ preservePitch: _preservePitch,
14302
14562
  ...props2
14303
14563
  }, ref) => {
14304
14564
  const absoluteFrame = useTimelinePosition();
@@ -14501,7 +14761,7 @@ var VideoForRenderingForwardFunction = ({
14501
14761
  ...props2
14502
14762
  });
14503
14763
  };
14504
- var VideoForRendering = forwardRef12(VideoForRenderingForwardFunction);
14764
+ var VideoForRendering = forwardRef13(VideoForRenderingForwardFunction);
14505
14765
  var VideoForwardingFunction = (props2, ref) => {
14506
14766
  const {
14507
14767
  startFrom,
@@ -14530,10 +14790,10 @@ var VideoForwardingFunction = (props2, ref) => {
14530
14790
  throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
14531
14791
  }
14532
14792
  const preloadedSrc = usePreload(props2.src);
14533
- const onDuration = useCallback19((src, durationInSeconds) => {
14793
+ const onDuration = useCallback20((src, durationInSeconds) => {
14534
14794
  setDurations({ type: "got-duration", durationInSeconds, src });
14535
14795
  }, [setDurations]);
14536
- const onVideoFrame = useCallback19(() => {}, []);
14796
+ const onVideoFrame = useCallback20(() => {}, []);
14537
14797
  const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
14538
14798
  validateMediaTrimProps({ startFrom, endAt, trimBefore, trimAfter });
14539
14799
  const { trimBeforeValue, trimAfterValue } = resolveTrimProps({
@@ -14585,7 +14845,11 @@ var VideoForwardingFunction = (props2, ref) => {
14585
14845
  })
14586
14846
  });
14587
14847
  }
14588
- validateMediaProps({ playbackRate: props2.playbackRate, volume: props2.volume }, "Html5Video");
14848
+ validateMediaProps({
14849
+ playbackRate: props2.playbackRate,
14850
+ preservePitch: props2.preservePitch,
14851
+ volume: props2.volume
14852
+ }, "Html5Video");
14589
14853
  if (environment.isRendering) {
14590
14854
  return /* @__PURE__ */ jsx37(VideoForRendering, {
14591
14855
  onDuration,
@@ -14607,7 +14871,7 @@ var VideoForwardingFunction = (props2, ref) => {
14607
14871
  onAutoPlayError: onAutoPlayError ?? undefined
14608
14872
  });
14609
14873
  };
14610
- var Html5Video = forwardRef13(VideoForwardingFunction);
14874
+ var Html5Video = forwardRef14(VideoForwardingFunction);
14611
14875
  addSequenceStackTraces(Html5Video);
14612
14876
  checkMultipleRemotionVersions();
14613
14877
  var proxyObj = {};
@@ -14651,17 +14915,17 @@ import { jsx as jsx113 } from "react/jsx-runtime";
14651
14915
  import { jsx as jsx122 } from "react/jsx-runtime";
14652
14916
  import * as React362 from "react";
14653
14917
  import * as ReactDOM4 from "react-dom";
14654
- import React11 from "react";
14918
+ import React112 from "react";
14655
14919
  import * as React8 from "react";
14656
14920
  import { jsx as jsx132 } from "react/jsx-runtime";
14657
14921
  import * as React9 from "react";
14658
- import * as React102 from "react";
14922
+ import * as React10 from "react";
14659
14923
  import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
14660
14924
  import { jsx as jsx152 } from "react/jsx-runtime";
14661
- import * as React12 from "react";
14925
+ import * as React122 from "react";
14662
14926
  import { jsx as jsx162 } from "react/jsx-runtime";
14663
14927
  import * as React16 from "react";
14664
- import * as React132 from "react";
14928
+ import * as React13 from "react";
14665
14929
  import * as ReactDOM from "react-dom";
14666
14930
  import { jsx as jsx172 } from "react/jsx-runtime";
14667
14931
  import * as React14 from "react";
@@ -14689,8 +14953,8 @@ import * as React282 from "react";
14689
14953
  import { jsx as jsx232 } from "react/jsx-runtime";
14690
14954
  import * as React35 from "react";
14691
14955
  import * as React312 from "react";
14692
- import { useState as useState112 } from "react";
14693
14956
  import * as React292 from "react";
14957
+ import { useState as useState112 } from "react";
14694
14958
  import * as React30 from "react";
14695
14959
  import * as React342 from "react";
14696
14960
  import * as React332 from "react";
@@ -15553,43 +15817,43 @@ function composeRefs2(...refs) {
15553
15817
  function useComposedRefs2(...refs) {
15554
15818
  return React9.useCallback(composeRefs2(...refs), refs);
15555
15819
  }
15556
- var Slot2 = React102.forwardRef((props, forwardedRef) => {
15820
+ var Slot2 = React10.forwardRef((props, forwardedRef) => {
15557
15821
  const { children, ...slotProps } = props;
15558
- const childrenArray = React102.Children.toArray(children);
15822
+ const childrenArray = React10.Children.toArray(children);
15559
15823
  const slottable = childrenArray.find(isSlottable2);
15560
15824
  if (slottable) {
15561
15825
  const newElement = slottable.props.children;
15562
15826
  const newChildren = childrenArray.map((child) => {
15563
15827
  if (child === slottable) {
15564
- if (React102.Children.count(newElement) > 1)
15565
- return React102.Children.only(null);
15566
- return React102.isValidElement(newElement) ? newElement.props.children : null;
15828
+ if (React10.Children.count(newElement) > 1)
15829
+ return React10.Children.only(null);
15830
+ return React10.isValidElement(newElement) ? newElement.props.children : null;
15567
15831
  } else {
15568
15832
  return child;
15569
15833
  }
15570
15834
  });
15571
- return /* @__PURE__ */ jsx142(SlotClone, { ...slotProps, ref: forwardedRef, children: React102.isValidElement(newElement) ? React102.cloneElement(newElement, undefined, newChildren) : null });
15835
+ return /* @__PURE__ */ jsx142(SlotClone, { ...slotProps, ref: forwardedRef, children: React10.isValidElement(newElement) ? React10.cloneElement(newElement, undefined, newChildren) : null });
15572
15836
  }
15573
15837
  return /* @__PURE__ */ jsx142(SlotClone, { ...slotProps, ref: forwardedRef, children });
15574
15838
  });
15575
15839
  Slot2.displayName = "Slot";
15576
- var SlotClone = React102.forwardRef((props, forwardedRef) => {
15840
+ var SlotClone = React10.forwardRef((props, forwardedRef) => {
15577
15841
  const { children, ...slotProps } = props;
15578
- if (React102.isValidElement(children)) {
15842
+ if (React10.isValidElement(children)) {
15579
15843
  const childrenRef = getElementRef2(children);
15580
- return React102.cloneElement(children, {
15844
+ return React10.cloneElement(children, {
15581
15845
  ...mergeProps2(slotProps, children.props),
15582
15846
  ref: forwardedRef ? composeRefs2(forwardedRef, childrenRef) : childrenRef
15583
15847
  });
15584
15848
  }
15585
- return React102.Children.count(children) > 1 ? React102.Children.only(null) : null;
15849
+ return React10.Children.count(children) > 1 ? React10.Children.only(null) : null;
15586
15850
  });
15587
15851
  SlotClone.displayName = "SlotClone";
15588
15852
  var Slottable2 = ({ children }) => {
15589
15853
  return /* @__PURE__ */ jsx142(Fragment5, { children });
15590
15854
  };
15591
15855
  function isSlottable2(child) {
15592
- return React102.isValidElement(child) && child.type === Slottable2;
15856
+ return React10.isValidElement(child) && child.type === Slottable2;
15593
15857
  }
15594
15858
  function mergeProps2(slotProps, childProps) {
15595
15859
  const overrideProps = { ...childProps };
@@ -15633,13 +15897,13 @@ function createCollection(name) {
15633
15897
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
15634
15898
  const CollectionProvider = (props) => {
15635
15899
  const { scope, children } = props;
15636
- const ref = React11.useRef(null);
15637
- const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
15900
+ const ref = React112.useRef(null);
15901
+ const itemMap = React112.useRef(/* @__PURE__ */ new Map).current;
15638
15902
  return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
15639
15903
  };
15640
15904
  CollectionProvider.displayName = PROVIDER_NAME;
15641
15905
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
15642
- const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
15906
+ const CollectionSlot = React112.forwardRef((props, forwardedRef) => {
15643
15907
  const { scope, children } = props;
15644
15908
  const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
15645
15909
  const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
@@ -15648,12 +15912,12 @@ function createCollection(name) {
15648
15912
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
15649
15913
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
15650
15914
  const ITEM_DATA_ATTR = "data-radix-collection-item";
15651
- const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
15915
+ const CollectionItemSlot = React112.forwardRef((props, forwardedRef) => {
15652
15916
  const { scope, children, ...itemData } = props;
15653
- const ref = React11.useRef(null);
15917
+ const ref = React112.useRef(null);
15654
15918
  const composedRefs = useComposedRefs2(forwardedRef, ref);
15655
15919
  const context = useCollectionContext(ITEM_SLOT_NAME, scope);
15656
- React11.useEffect(() => {
15920
+ React112.useEffect(() => {
15657
15921
  context.itemMap.set(ref, { ref, ...itemData });
15658
15922
  return () => void context.itemMap.delete(ref);
15659
15923
  });
@@ -15662,7 +15926,7 @@ function createCollection(name) {
15662
15926
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
15663
15927
  function useCollection(scope) {
15664
15928
  const context = useCollectionContext(name + "CollectionConsumer", scope);
15665
- const getItems = React11.useCallback(() => {
15929
+ const getItems = React112.useCallback(() => {
15666
15930
  const collectionNode = context.collectionRef.current;
15667
15931
  if (!collectionNode)
15668
15932
  return [];
@@ -15679,9 +15943,9 @@ function createCollection(name) {
15679
15943
  createCollectionScope
15680
15944
  ];
15681
15945
  }
15682
- var DirectionContext = React12.createContext(undefined);
15946
+ var DirectionContext = React122.createContext(undefined);
15683
15947
  function useDirection(localDir) {
15684
- const globalDir = React12.useContext(DirectionContext);
15948
+ const globalDir = React122.useContext(DirectionContext);
15685
15949
  return localDir || globalDir || "ltr";
15686
15950
  }
15687
15951
  var NODES = [
@@ -15703,7 +15967,7 @@ var NODES = [
15703
15967
  "ul"
15704
15968
  ];
15705
15969
  var Primitive = NODES.reduce((primitive, node) => {
15706
- const Node2 = React132.forwardRef((props, forwardedRef) => {
15970
+ const Node2 = React13.forwardRef((props, forwardedRef) => {
15707
15971
  const { asChild, ...primitiveProps } = props;
15708
15972
  const Comp = asChild ? Slot2 : node;
15709
15973
  if (typeof window !== "undefined") {
@@ -18445,7 +18709,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
18445
18709
  return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
18446
18710
  };
18447
18711
  var __assign = function() {
18448
- __assign = Object.assign || function __assign(t) {
18712
+ __assign = Object.assign || function __assign2(t) {
18449
18713
  for (var s, i = 1, n = arguments.length;i < n; i++) {
18450
18714
  s = arguments[i];
18451
18715
  for (var p in s)
@@ -20232,17 +20496,17 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
20232
20496
  let defaultContexts = [];
20233
20497
  function createContext32(rootComponentName, defaultContext) {
20234
20498
  const BaseContext = React382.createContext(defaultContext);
20235
- const index2 = defaultContexts.length;
20499
+ const index3 = defaultContexts.length;
20236
20500
  defaultContexts = [...defaultContexts, defaultContext];
20237
20501
  const Provider = (props) => {
20238
20502
  const { scope, children, ...context } = props;
20239
- const Context = scope?.[scopeName]?.[index2] || BaseContext;
20503
+ const Context = scope?.[scopeName]?.[index3] || BaseContext;
20240
20504
  const value = React382.useMemo(() => context, Object.values(context));
20241
20505
  return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
20242
20506
  };
20243
20507
  Provider.displayName = rootComponentName + "Provider";
20244
20508
  function useContext222(consumerName, scope) {
20245
- const Context = scope?.[scopeName]?.[index2] || BaseContext;
20509
+ const Context = scope?.[scopeName]?.[index3] || BaseContext;
20246
20510
  const context = React382.useContext(Context);
20247
20511
  if (context)
20248
20512
  return context;
@@ -20439,10 +20703,10 @@ var OrderedDict = class _OrderedDict extends Map {
20439
20703
  super.set(key, value);
20440
20704
  return this;
20441
20705
  }
20442
- insert(index2, key, value) {
20706
+ insert(index3, key, value) {
20443
20707
  const has = this.has(key);
20444
20708
  const length2 = this.#keys.length;
20445
- const relativeIndex = toSafeInteger(index2);
20709
+ const relativeIndex = toSafeInteger(index3);
20446
20710
  let actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
20447
20711
  const safeIndex = actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
20448
20712
  if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {
@@ -20480,39 +20744,39 @@ var OrderedDict = class _OrderedDict extends Map {
20480
20744
  }
20481
20745
  return this;
20482
20746
  }
20483
- with(index2, key, value) {
20747
+ with(index3, key, value) {
20484
20748
  const copy = new _OrderedDict(this);
20485
- copy.insert(index2, key, value);
20749
+ copy.insert(index3, key, value);
20486
20750
  return copy;
20487
20751
  }
20488
20752
  before(key) {
20489
- const index2 = this.#keys.indexOf(key) - 1;
20490
- if (index2 < 0) {
20753
+ const index3 = this.#keys.indexOf(key) - 1;
20754
+ if (index3 < 0) {
20491
20755
  return;
20492
20756
  }
20493
- return this.entryAt(index2);
20757
+ return this.entryAt(index3);
20494
20758
  }
20495
20759
  setBefore(key, newKey, value) {
20496
- const index2 = this.#keys.indexOf(key);
20497
- if (index2 === -1) {
20760
+ const index3 = this.#keys.indexOf(key);
20761
+ if (index3 === -1) {
20498
20762
  return this;
20499
20763
  }
20500
- return this.insert(index2, newKey, value);
20764
+ return this.insert(index3, newKey, value);
20501
20765
  }
20502
20766
  after(key) {
20503
- let index2 = this.#keys.indexOf(key);
20504
- index2 = index2 === -1 || index2 === this.size - 1 ? -1 : index2 + 1;
20505
- if (index2 === -1) {
20767
+ let index3 = this.#keys.indexOf(key);
20768
+ index3 = index3 === -1 || index3 === this.size - 1 ? -1 : index3 + 1;
20769
+ if (index3 === -1) {
20506
20770
  return;
20507
20771
  }
20508
- return this.entryAt(index2);
20772
+ return this.entryAt(index3);
20509
20773
  }
20510
20774
  setAfter(key, newKey, value) {
20511
- const index2 = this.#keys.indexOf(key);
20512
- if (index2 === -1) {
20775
+ const index3 = this.#keys.indexOf(key);
20776
+ if (index3 === -1) {
20513
20777
  return this;
20514
20778
  }
20515
- return this.insert(index2 + 1, newKey, value);
20779
+ return this.insert(index3 + 1, newKey, value);
20516
20780
  }
20517
20781
  first() {
20518
20782
  return this.entryAt(0);
@@ -20531,21 +20795,21 @@ var OrderedDict = class _OrderedDict extends Map {
20531
20795
  }
20532
20796
  return deleted;
20533
20797
  }
20534
- deleteAt(index2) {
20535
- const key = this.keyAt(index2);
20798
+ deleteAt(index3) {
20799
+ const key = this.keyAt(index3);
20536
20800
  if (key !== undefined) {
20537
20801
  return this.delete(key);
20538
20802
  }
20539
20803
  return false;
20540
20804
  }
20541
- at(index2) {
20542
- const key = at(this.#keys, index2);
20805
+ at(index3) {
20806
+ const key = at(this.#keys, index3);
20543
20807
  if (key !== undefined) {
20544
20808
  return this.get(key);
20545
20809
  }
20546
20810
  }
20547
- entryAt(index2) {
20548
- const key = at(this.#keys, index2);
20811
+ entryAt(index3) {
20812
+ const key = at(this.#keys, index3);
20549
20813
  if (key !== undefined) {
20550
20814
  return [key, this.get(key)];
20551
20815
  }
@@ -20553,15 +20817,15 @@ var OrderedDict = class _OrderedDict extends Map {
20553
20817
  indexOf(key) {
20554
20818
  return this.#keys.indexOf(key);
20555
20819
  }
20556
- keyAt(index2) {
20557
- return at(this.#keys, index2);
20820
+ keyAt(index3) {
20821
+ return at(this.#keys, index3);
20558
20822
  }
20559
20823
  from(key, offset4) {
20560
- const index2 = this.indexOf(key);
20561
- if (index2 === -1) {
20824
+ const index3 = this.indexOf(key);
20825
+ if (index3 === -1) {
20562
20826
  return;
20563
20827
  }
20564
- let dest = index2 + offset4;
20828
+ let dest = index3 + offset4;
20565
20829
  if (dest < 0)
20566
20830
  dest = 0;
20567
20831
  if (dest >= this.size)
@@ -20569,11 +20833,11 @@ var OrderedDict = class _OrderedDict extends Map {
20569
20833
  return this.at(dest);
20570
20834
  }
20571
20835
  keyFrom(key, offset4) {
20572
- const index2 = this.indexOf(key);
20573
- if (index2 === -1) {
20836
+ const index3 = this.indexOf(key);
20837
+ if (index3 === -1) {
20574
20838
  return;
20575
20839
  }
20576
- let dest = index2 + offset4;
20840
+ let dest = index3 + offset4;
20577
20841
  if (dest < 0)
20578
20842
  dest = 0;
20579
20843
  if (dest >= this.size)
@@ -20581,68 +20845,68 @@ var OrderedDict = class _OrderedDict extends Map {
20581
20845
  return this.keyAt(dest);
20582
20846
  }
20583
20847
  find(predicate, thisArg) {
20584
- let index2 = 0;
20848
+ let index3 = 0;
20585
20849
  for (const entry of this) {
20586
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
20850
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
20587
20851
  return entry;
20588
20852
  }
20589
- index2++;
20853
+ index3++;
20590
20854
  }
20591
20855
  return;
20592
20856
  }
20593
20857
  findIndex(predicate, thisArg) {
20594
- let index2 = 0;
20858
+ let index3 = 0;
20595
20859
  for (const entry of this) {
20596
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
20597
- return index2;
20860
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
20861
+ return index3;
20598
20862
  }
20599
- index2++;
20863
+ index3++;
20600
20864
  }
20601
20865
  return -1;
20602
20866
  }
20603
20867
  filter(predicate, thisArg) {
20604
20868
  const entries = [];
20605
- let index2 = 0;
20869
+ let index3 = 0;
20606
20870
  for (const entry of this) {
20607
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
20871
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
20608
20872
  entries.push(entry);
20609
20873
  }
20610
- index2++;
20874
+ index3++;
20611
20875
  }
20612
20876
  return new _OrderedDict(entries);
20613
20877
  }
20614
20878
  map(callbackfn, thisArg) {
20615
20879
  const entries = [];
20616
- let index2 = 0;
20880
+ let index3 = 0;
20617
20881
  for (const entry of this) {
20618
- entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index2, this])]);
20619
- index2++;
20882
+ entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index3, this])]);
20883
+ index3++;
20620
20884
  }
20621
20885
  return new _OrderedDict(entries);
20622
20886
  }
20623
20887
  reduce(...args) {
20624
20888
  const [callbackfn, initialValue] = args;
20625
- let index2 = 0;
20889
+ let index3 = 0;
20626
20890
  let accumulator = initialValue ?? this.at(0);
20627
20891
  for (const entry of this) {
20628
- if (index2 === 0 && args.length === 1) {
20892
+ if (index3 === 0 && args.length === 1) {
20629
20893
  accumulator = entry;
20630
20894
  } else {
20631
- accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index2, this]);
20895
+ accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
20632
20896
  }
20633
- index2++;
20897
+ index3++;
20634
20898
  }
20635
20899
  return accumulator;
20636
20900
  }
20637
20901
  reduceRight(...args) {
20638
20902
  const [callbackfn, initialValue] = args;
20639
20903
  let accumulator = initialValue ?? this.at(-1);
20640
- for (let index2 = this.size - 1;index2 >= 0; index2--) {
20641
- const entry = this.at(index2);
20642
- if (index2 === this.size - 1 && args.length === 1) {
20904
+ for (let index3 = this.size - 1;index3 >= 0; index3--) {
20905
+ const entry = this.at(index3);
20906
+ if (index3 === this.size - 1 && args.length === 1) {
20643
20907
  accumulator = entry;
20644
20908
  } else {
20645
- accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index2, this]);
20909
+ accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
20646
20910
  }
20647
20911
  }
20648
20912
  return accumulator;
@@ -20653,8 +20917,8 @@ var OrderedDict = class _OrderedDict extends Map {
20653
20917
  }
20654
20918
  toReversed() {
20655
20919
  const reversed = new _OrderedDict;
20656
- for (let index2 = this.size - 1;index2 >= 0; index2--) {
20657
- const key = this.keyAt(index2);
20920
+ for (let index3 = this.size - 1;index3 >= 0; index3--) {
20921
+ const key = this.keyAt(index3);
20658
20922
  const element = this.get(key);
20659
20923
  reversed.set(key, element);
20660
20924
  }
@@ -20677,44 +20941,44 @@ var OrderedDict = class _OrderedDict extends Map {
20677
20941
  if (end !== undefined && end > 0) {
20678
20942
  stop = end - 1;
20679
20943
  }
20680
- for (let index2 = start;index2 <= stop; index2++) {
20681
- const key = this.keyAt(index2);
20944
+ for (let index3 = start;index3 <= stop; index3++) {
20945
+ const key = this.keyAt(index3);
20682
20946
  const element = this.get(key);
20683
20947
  result.set(key, element);
20684
20948
  }
20685
20949
  return result;
20686
20950
  }
20687
20951
  every(predicate, thisArg) {
20688
- let index2 = 0;
20952
+ let index3 = 0;
20689
20953
  for (const entry of this) {
20690
- if (!Reflect.apply(predicate, thisArg, [entry, index2, this])) {
20954
+ if (!Reflect.apply(predicate, thisArg, [entry, index3, this])) {
20691
20955
  return false;
20692
20956
  }
20693
- index2++;
20957
+ index3++;
20694
20958
  }
20695
20959
  return true;
20696
20960
  }
20697
20961
  some(predicate, thisArg) {
20698
- let index2 = 0;
20962
+ let index3 = 0;
20699
20963
  for (const entry of this) {
20700
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
20964
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
20701
20965
  return true;
20702
20966
  }
20703
- index2++;
20967
+ index3++;
20704
20968
  }
20705
20969
  return false;
20706
20970
  }
20707
20971
  };
20708
- function at(array, index2) {
20972
+ function at(array, index3) {
20709
20973
  if ("at" in Array.prototype) {
20710
- return Array.prototype.at.call(array, index2);
20974
+ return Array.prototype.at.call(array, index3);
20711
20975
  }
20712
- const actualIndex = toSafeIndex(array, index2);
20976
+ const actualIndex = toSafeIndex(array, index3);
20713
20977
  return actualIndex === -1 ? undefined : array[actualIndex];
20714
20978
  }
20715
- function toSafeIndex(array, index2) {
20979
+ function toSafeIndex(array, index3) {
20716
20980
  const length2 = array.length;
20717
- const relativeIndex = toSafeInteger(index2);
20981
+ const relativeIndex = toSafeInteger(index3);
20718
20982
  const actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
20719
20983
  return actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
20720
20984
  }
@@ -20766,7 +21030,7 @@ var Primitive2 = NODES2.reduce((primitive, node) => {
20766
21030
  Node2.displayName = `Primitive.${node}`;
20767
21031
  return { ...primitive, [node]: Node2 };
20768
21032
  }, {});
20769
- function useCallbackRef3(callback) {
21033
+ function useCallbackRef4(callback) {
20770
21034
  const callbackRef = React44.useRef(callback);
20771
21035
  React44.useEffect(() => {
20772
21036
  callbackRef.current = callback;
@@ -20870,7 +21134,7 @@ var RovingFocusGroupImpl = React47.forwardRef((props, forwardedRef) => {
20870
21134
  caller: GROUP_NAME2
20871
21135
  });
20872
21136
  const [isTabbingBackOut, setIsTabbingBackOut] = React47.useState(false);
20873
- const handleEntryFocus = useCallbackRef3(onEntryFocus);
21137
+ const handleEntryFocus = useCallbackRef4(onEntryFocus);
20874
21138
  const getItems = useCollection2(__scopeRovingFocusGroup);
20875
21139
  const isClickFocusRef = React47.useRef(false);
20876
21140
  const [focusableItemsCount, setFocusableItemsCount] = React47.useState(0);
@@ -21023,7 +21287,7 @@ function focusFirst2(candidates, preventScroll = false) {
21023
21287
  }
21024
21288
  }
21025
21289
  function wrapArray2(array, startIndex) {
21026
- return array.map((_, index2) => array[(startIndex + index2) % array.length]);
21290
+ return array.map((_, index3) => array[(startIndex + index3) % array.length]);
21027
21291
  }
21028
21292
  var Root3 = RovingFocusGroup;
21029
21293
  var Item2 = RovingFocusGroupItem;
@@ -21338,10 +21602,10 @@ var Triangle2 = (props) => {
21338
21602
  };
21339
21603
 
21340
21604
  // src/components/design.tsx
21341
- import { useCallback as useCallback34, useState as useState41 } from "react";
21605
+ import { useCallback as useCallback33, useState as useState41 } from "react";
21342
21606
 
21343
21607
  // src/components/ManageTeamMembers.tsx
21344
- import React53, { useCallback as useCallback33, useState as useState40 } from "react";
21608
+ import React53, { useCallback as useCallback32, useState as useState40 } from "react";
21345
21609
  import { jsx as jsx40, jsxs as jsxs6, Fragment as Fragment9 } from "react/jsx-runtime";
21346
21610
  function generateId() {
21347
21611
  return Math.random().toString(36).substr(2, 9);
@@ -21387,7 +21651,7 @@ var Row = ({ value, onChange, onDelete, disableDelete }) => {
21387
21651
  var ManageTeamMembers = () => {
21388
21652
  const [members, setMembers] = useState40(initialMembers);
21389
21653
  const displayedMembers = [...members, { id: "NEW", name: "" }];
21390
- const updateMember = useCallback33((idx, value) => {
21654
+ const updateMember = useCallback32((idx, value) => {
21391
21655
  if (idx === members.length) {
21392
21656
  if (value.trim() !== "") {
21393
21657
  setMembers((prev) => [...prev, { id: generateId(), name: value }]);
@@ -21396,11 +21660,11 @@ var ManageTeamMembers = () => {
21396
21660
  setMembers((prev) => prev.map((m, i) => i === idx ? { ...m, name: value } : m));
21397
21661
  }
21398
21662
  }, [members.length]);
21399
- const deleteMember = useCallback33((idx) => {
21663
+ const deleteMember = useCallback32((idx) => {
21400
21664
  setMembers((prev) => prev.filter((_, i) => i !== idx));
21401
21665
  }, []);
21402
21666
  const [loading, setLoading] = useState40(false);
21403
- const save = useCallback33(() => {
21667
+ const save = useCallback32(() => {
21404
21668
  setLoading(true);
21405
21669
  setTimeout(() => {
21406
21670
  setLoading(false);
@@ -21459,20 +21723,20 @@ var DesignPage = () => {
21459
21723
  const [active, setActive] = useState41(false);
21460
21724
  const [submitButtonActive, setSubmitButtonActive] = useState41(true);
21461
21725
  const [submitButtonPrimaryActive, setSubmitButtonPrimaryActive] = useState41(true);
21462
- const onClick = useCallback34(() => {
21726
+ const onClick = useCallback33(() => {
21463
21727
  setSubmitButtonActive(false);
21464
21728
  setTimeout(() => {
21465
21729
  setSubmitButtonActive(true);
21466
21730
  }, 1000);
21467
21731
  }, []);
21468
- const onClickPrimary = useCallback34(() => {
21732
+ const onClickPrimary = useCallback33(() => {
21469
21733
  setSubmitButtonPrimaryActive(false);
21470
21734
  setTimeout(() => {
21471
21735
  setSubmitButtonPrimaryActive(true);
21472
21736
  }, 1000);
21473
21737
  }, []);
21474
21738
  const [saving, setSaving] = useState41(false);
21475
- const save = useCallback34(() => {
21739
+ const save = useCallback33(() => {
21476
21740
  setSaving(true);
21477
21741
  setTimeout(() => {
21478
21742
  setSaving(false);