@remotion/promo-pages 4.0.484 → 4.0.486
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.
- package/dist/Homepage.js +498 -291
- package/dist/components/homepage/CommunityStatsItems.js +2 -2
- package/dist/components/homepage/GetStartedStrip.js +1 -1
- package/dist/components/homepage/GitHubButton.js +1 -1
- package/dist/components/homepage/Pricing.d.ts +3 -1
- package/dist/components/homepage/Pricing.js +6 -2
- package/dist/components/prompts/PromptsGallery.js +1 -1
- package/dist/components/prompts/PromptsSubmit.js +3 -169
- package/dist/design.js +203 -138
- package/dist/experts.js +110 -45
- package/dist/homepage/Pricing.js +212 -141
- package/dist/prompts/PromptsGallery.js +207 -142
- package/dist/prompts/PromptsShow.js +205 -140
- package/dist/prompts/PromptsSubmit.js +203 -138
- package/dist/team.js +203 -138
- package/dist/template-modal-content.js +212 -147
- package/dist/templates.js +203 -138
- package/package.json +17 -17
package/dist/Homepage.js
CHANGED
|
@@ -1091,8 +1091,8 @@ import {
|
|
|
1091
1091
|
forwardRef as forwardRef10,
|
|
1092
1092
|
useCallback as useCallback17,
|
|
1093
1093
|
useContext as useContext32,
|
|
1094
|
-
useEffect as useEffect17,
|
|
1095
1094
|
useImperativeHandle as useImperativeHandle7,
|
|
1095
|
+
useLayoutEffect as useLayoutEffect10,
|
|
1096
1096
|
useMemo as useMemo31,
|
|
1097
1097
|
useRef as useRef23,
|
|
1098
1098
|
useState as useState16
|
|
@@ -1100,7 +1100,7 @@ import {
|
|
|
1100
1100
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1101
1101
|
import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
|
|
1102
1102
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1103
|
-
import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as
|
|
1103
|
+
import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
|
|
1104
1104
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1105
1105
|
import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
1106
1106
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -1126,8 +1126,8 @@ import { useCallback as useCallback24 } from "react";
|
|
|
1126
1126
|
import {
|
|
1127
1127
|
useCallback as useCallback22,
|
|
1128
1128
|
useContext as useContext36,
|
|
1129
|
-
useEffect as
|
|
1130
|
-
useLayoutEffect as
|
|
1129
|
+
useEffect as useEffect17,
|
|
1130
|
+
useLayoutEffect as useLayoutEffect12,
|
|
1131
1131
|
useMemo as useMemo35,
|
|
1132
1132
|
useState as useState19
|
|
1133
1133
|
} from "react";
|
|
@@ -1136,13 +1136,13 @@ import React37, {
|
|
|
1136
1136
|
forwardRef as forwardRef13,
|
|
1137
1137
|
useCallback as useCallback23,
|
|
1138
1138
|
useContext as useContext37,
|
|
1139
|
-
useEffect as
|
|
1139
|
+
useEffect as useEffect19,
|
|
1140
1140
|
useImperativeHandle as useImperativeHandle9,
|
|
1141
1141
|
useMemo as useMemo36,
|
|
1142
1142
|
useRef as useRef27,
|
|
1143
1143
|
useState as useState20
|
|
1144
1144
|
} from "react";
|
|
1145
|
-
import { useEffect as
|
|
1145
|
+
import { useEffect as useEffect18 } from "react";
|
|
1146
1146
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1147
1147
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1148
1148
|
import React39, { useMemo as useMemo37 } from "react";
|
|
@@ -1159,9 +1159,9 @@ import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as
|
|
|
1159
1159
|
import {
|
|
1160
1160
|
forwardRef as forwardRef15,
|
|
1161
1161
|
useContext as useContext38,
|
|
1162
|
-
useEffect as
|
|
1162
|
+
useEffect as useEffect20,
|
|
1163
1163
|
useImperativeHandle as useImperativeHandle10,
|
|
1164
|
-
useLayoutEffect as
|
|
1164
|
+
useLayoutEffect as useLayoutEffect13,
|
|
1165
1165
|
useMemo as useMemo39,
|
|
1166
1166
|
useRef as useRef28
|
|
1167
1167
|
} from "react";
|
|
@@ -2335,7 +2335,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
2335
2335
|
var addSequenceStackTraces = (component) => {
|
|
2336
2336
|
componentsToAddStacksTo.push(component);
|
|
2337
2337
|
};
|
|
2338
|
-
var VERSION = "4.0.
|
|
2338
|
+
var VERSION = "4.0.486";
|
|
2339
2339
|
var checkMultipleRemotionVersions = () => {
|
|
2340
2340
|
if (typeof globalThis === "undefined") {
|
|
2341
2341
|
return;
|
|
@@ -2741,6 +2741,12 @@ var textSchema = {
|
|
|
2741
2741
|
default: undefined,
|
|
2742
2742
|
description: "Color"
|
|
2743
2743
|
},
|
|
2744
|
+
"style.fontFamily": {
|
|
2745
|
+
type: "font-family",
|
|
2746
|
+
default: undefined,
|
|
2747
|
+
description: "Font family",
|
|
2748
|
+
keyframable: false
|
|
2749
|
+
},
|
|
2744
2750
|
"style.fontSize": {
|
|
2745
2751
|
type: "number",
|
|
2746
2752
|
default: undefined,
|
|
@@ -2806,6 +2812,14 @@ var textSchema = {
|
|
|
2806
2812
|
hiddenFromList: false
|
|
2807
2813
|
}
|
|
2808
2814
|
};
|
|
2815
|
+
var textContentSchema = {
|
|
2816
|
+
children: {
|
|
2817
|
+
type: "text-content",
|
|
2818
|
+
default: "",
|
|
2819
|
+
description: "Text",
|
|
2820
|
+
keyframable: false
|
|
2821
|
+
}
|
|
2822
|
+
};
|
|
2809
2823
|
var premountSchema = {
|
|
2810
2824
|
premountFor: {
|
|
2811
2825
|
type: "number",
|
|
@@ -5173,10 +5187,21 @@ var getNestedValue = (obj, key) => {
|
|
|
5173
5187
|
}
|
|
5174
5188
|
return current;
|
|
5175
5189
|
};
|
|
5176
|
-
var
|
|
5190
|
+
var getRuntimeValueForSchemaKey = ({
|
|
5191
|
+
flatSchema,
|
|
5192
|
+
key,
|
|
5193
|
+
props
|
|
5194
|
+
}) => {
|
|
5195
|
+
const value = getNestedValue(props, key);
|
|
5196
|
+
if (flatSchema[key]?.type === "text-content" && typeof value !== "string") {
|
|
5197
|
+
return;
|
|
5198
|
+
}
|
|
5199
|
+
return value;
|
|
5200
|
+
};
|
|
5201
|
+
var readValuesFromProps = (props, keys, flatSchema) => {
|
|
5177
5202
|
const out = {};
|
|
5178
5203
|
for (const key of keys) {
|
|
5179
|
-
out[key] = getNestedValue(props, key);
|
|
5204
|
+
out[key] = flatSchema ? getRuntimeValueForSchemaKey({ flatSchema, key, props }) : getNestedValue(props, key);
|
|
5180
5205
|
}
|
|
5181
5206
|
return out;
|
|
5182
5207
|
};
|
|
@@ -5184,6 +5209,7 @@ var selectActiveKeys = (schema, values) => {
|
|
|
5184
5209
|
return Object.keys(flattenActiveSchema(schema, (key) => values[key]));
|
|
5185
5210
|
};
|
|
5186
5211
|
var mergeValues = ({
|
|
5212
|
+
flatSchema,
|
|
5187
5213
|
props,
|
|
5188
5214
|
valuesDotNotation,
|
|
5189
5215
|
schemaKeys,
|
|
@@ -5192,6 +5218,9 @@ var mergeValues = ({
|
|
|
5192
5218
|
const merged = { ...props };
|
|
5193
5219
|
for (const key of schemaKeys) {
|
|
5194
5220
|
const value = valuesDotNotation[key];
|
|
5221
|
+
if (flatSchema[key]?.type === "text-content" && value === undefined) {
|
|
5222
|
+
continue;
|
|
5223
|
+
}
|
|
5195
5224
|
const parts = key.split(".");
|
|
5196
5225
|
if (parts.length === 1) {
|
|
5197
5226
|
merged[key] = value;
|
|
@@ -5209,7 +5238,8 @@ var mergeValues = ({
|
|
|
5209
5238
|
}
|
|
5210
5239
|
current[parts[parts.length - 1]] = value;
|
|
5211
5240
|
}
|
|
5212
|
-
|
|
5241
|
+
const propsToDeleteWithoutTextContent = new Set([...propsToDelete].filter((key) => !(flatSchema[key]?.type === "text-content" && valuesDotNotation[key] === undefined)));
|
|
5242
|
+
deleteNestedKey(merged, propsToDeleteWithoutTextContent);
|
|
5213
5243
|
return merged;
|
|
5214
5244
|
};
|
|
5215
5245
|
var stackToOverrideMap = {};
|
|
@@ -5256,8 +5286,12 @@ var withInteractivitySchema = ({
|
|
|
5256
5286
|
return newOverrideId;
|
|
5257
5287
|
});
|
|
5258
5288
|
const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
|
|
5259
|
-
const runtimeValues = flatKeys.map((
|
|
5260
|
-
|
|
5289
|
+
const runtimeValues = flatKeys.map((key) => getRuntimeValueForSchemaKey({
|
|
5290
|
+
flatSchema,
|
|
5291
|
+
key,
|
|
5292
|
+
props
|
|
5293
|
+
}));
|
|
5294
|
+
const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
|
|
5261
5295
|
const controls = useMemo13(() => {
|
|
5262
5296
|
return {
|
|
5263
5297
|
schema: schemaWithSequenceName,
|
|
@@ -5285,6 +5319,7 @@ var withInteractivitySchema = ({
|
|
|
5285
5319
|
]);
|
|
5286
5320
|
const activeKeys = selectActiveKeys(schemaWithSequenceName, valuesDotNotation);
|
|
5287
5321
|
const mergedProps = mergeValues({
|
|
5322
|
+
flatSchema,
|
|
5288
5323
|
props,
|
|
5289
5324
|
valuesDotNotation,
|
|
5290
5325
|
schemaKeys: activeKeys,
|
|
@@ -7908,7 +7943,7 @@ var getTimelineDuration = ({
|
|
|
7908
7943
|
trimAfter
|
|
7909
7944
|
});
|
|
7910
7945
|
if (parentSequenceDurationInFrames !== null) {
|
|
7911
|
-
const cappedDuration = Math.min(parentSequenceDurationInFrames
|
|
7946
|
+
const cappedDuration = Math.min(parentSequenceDurationInFrames, mediaDuration);
|
|
7912
7947
|
return Number(cappedDuration.toFixed(10));
|
|
7913
7948
|
}
|
|
7914
7949
|
return mediaDuration;
|
|
@@ -10042,6 +10077,18 @@ var loadImage = ({
|
|
|
10042
10077
|
function exponentialBackoff(errorCount) {
|
|
10043
10078
|
return 1000 * 2 ** (errorCount - 1);
|
|
10044
10079
|
}
|
|
10080
|
+
var waitForNextFrame = ({
|
|
10081
|
+
onFrame
|
|
10082
|
+
}) => {
|
|
10083
|
+
if (typeof requestAnimationFrame === "undefined") {
|
|
10084
|
+
onFrame();
|
|
10085
|
+
return () => {
|
|
10086
|
+
return;
|
|
10087
|
+
};
|
|
10088
|
+
}
|
|
10089
|
+
const frame = requestAnimationFrame(onFrame);
|
|
10090
|
+
return () => cancelAnimationFrame(frame);
|
|
10091
|
+
};
|
|
10045
10092
|
var CanvasImageContent = forwardRef10(({
|
|
10046
10093
|
src,
|
|
10047
10094
|
width,
|
|
@@ -10071,6 +10118,17 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10071
10118
|
overrideId: controls?.overrideId ?? null
|
|
10072
10119
|
});
|
|
10073
10120
|
const sequenceContext = useContext32(SequenceContext);
|
|
10121
|
+
const pendingLoadDelayRef = useRef23(null);
|
|
10122
|
+
const continuePendingLoadDelay = useCallback17(() => {
|
|
10123
|
+
const pending = pendingLoadDelayRef.current;
|
|
10124
|
+
if (!pending || pending.continued) {
|
|
10125
|
+
return;
|
|
10126
|
+
}
|
|
10127
|
+
pending.continued = true;
|
|
10128
|
+
pending.unblock();
|
|
10129
|
+
continueRender2(pending.handle);
|
|
10130
|
+
pendingLoadDelayRef.current = null;
|
|
10131
|
+
}, [continueRender2]);
|
|
10074
10132
|
const sourceCanvas = useMemo31(() => {
|
|
10075
10133
|
if (typeof document === "undefined") {
|
|
10076
10134
|
return null;
|
|
@@ -10088,7 +10146,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10088
10146
|
ref.current = canvas;
|
|
10089
10147
|
}
|
|
10090
10148
|
}, [ref, refForOutline]);
|
|
10091
|
-
|
|
10149
|
+
useLayoutEffect10(() => {
|
|
10092
10150
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
10093
10151
|
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
10094
10152
|
const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
|
|
@@ -10100,17 +10158,13 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10100
10158
|
};
|
|
10101
10159
|
const controller = new AbortController;
|
|
10102
10160
|
let cancelled = false;
|
|
10103
|
-
let continued = false;
|
|
10104
10161
|
let errorCount = 0;
|
|
10105
10162
|
let timeoutId = null;
|
|
10106
10163
|
setLoadedImage(null);
|
|
10107
|
-
|
|
10108
|
-
|
|
10109
|
-
|
|
10110
|
-
|
|
10111
|
-
continued = true;
|
|
10112
|
-
unblock();
|
|
10113
|
-
continueRender2(handle);
|
|
10164
|
+
pendingLoadDelayRef.current = {
|
|
10165
|
+
handle,
|
|
10166
|
+
unblock,
|
|
10167
|
+
continued: false
|
|
10114
10168
|
};
|
|
10115
10169
|
const attemptLoad = () => {
|
|
10116
10170
|
loadImage({ src: actualSrc, signal: controller.signal }).then((image) => {
|
|
@@ -10118,13 +10172,9 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10118
10172
|
return;
|
|
10119
10173
|
}
|
|
10120
10174
|
setLoadedImage(image);
|
|
10121
|
-
}).then(() => {
|
|
10122
|
-
if (!cancelled) {
|
|
10123
|
-
continueRenderOnce();
|
|
10124
|
-
}
|
|
10125
10175
|
}).catch((err) => {
|
|
10126
10176
|
if (err.name === "AbortError") {
|
|
10127
|
-
|
|
10177
|
+
continuePendingLoadDelay();
|
|
10128
10178
|
return;
|
|
10129
10179
|
}
|
|
10130
10180
|
errorCount++;
|
|
@@ -10138,7 +10188,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10138
10188
|
}, backoff);
|
|
10139
10189
|
} else if (onError) {
|
|
10140
10190
|
onError(err);
|
|
10141
|
-
|
|
10191
|
+
continuePendingLoadDelay();
|
|
10142
10192
|
} else {
|
|
10143
10193
|
cancelRender2(err);
|
|
10144
10194
|
}
|
|
@@ -10151,12 +10201,12 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10151
10201
|
clearTimeout(timeoutId);
|
|
10152
10202
|
}
|
|
10153
10203
|
controller.abort();
|
|
10154
|
-
|
|
10204
|
+
continuePendingLoadDelay();
|
|
10155
10205
|
};
|
|
10156
10206
|
}, [
|
|
10157
10207
|
actualSrc,
|
|
10158
10208
|
cancelRender2,
|
|
10159
|
-
|
|
10209
|
+
continuePendingLoadDelay,
|
|
10160
10210
|
delayPlayback,
|
|
10161
10211
|
delayRender2,
|
|
10162
10212
|
delayRenderRetries,
|
|
@@ -10167,13 +10217,16 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10167
10217
|
sequenceContext?.postmounting,
|
|
10168
10218
|
sequenceContext?.premounting
|
|
10169
10219
|
]);
|
|
10170
|
-
|
|
10220
|
+
useLayoutEffect10(() => {
|
|
10171
10221
|
if (!loadedImage || !outputCanvas || !sourceCanvas) {
|
|
10172
10222
|
return;
|
|
10173
10223
|
}
|
|
10174
10224
|
const handle = delayRender2(`Applying effects to <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`);
|
|
10175
10225
|
let cancelled = false;
|
|
10176
10226
|
let continued = false;
|
|
10227
|
+
let cancelWaitForNextFrame = () => {
|
|
10228
|
+
return;
|
|
10229
|
+
};
|
|
10177
10230
|
const continueRenderOnce = () => {
|
|
10178
10231
|
if (continued) {
|
|
10179
10232
|
return;
|
|
@@ -10208,7 +10261,15 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10208
10261
|
height: canvasHeight
|
|
10209
10262
|
}).then((completed) => {
|
|
10210
10263
|
if (completed && !cancelled) {
|
|
10211
|
-
|
|
10264
|
+
cancelWaitForNextFrame = waitForNextFrame({
|
|
10265
|
+
onFrame: () => {
|
|
10266
|
+
if (cancelled) {
|
|
10267
|
+
return;
|
|
10268
|
+
}
|
|
10269
|
+
continueRenderOnce();
|
|
10270
|
+
continuePendingLoadDelay();
|
|
10271
|
+
}
|
|
10272
|
+
});
|
|
10212
10273
|
}
|
|
10213
10274
|
}).catch((err) => {
|
|
10214
10275
|
if (cancelled) {
|
|
@@ -10217,12 +10278,14 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10217
10278
|
if (onError) {
|
|
10218
10279
|
onError(err);
|
|
10219
10280
|
continueRenderOnce();
|
|
10281
|
+
continuePendingLoadDelay();
|
|
10220
10282
|
} else {
|
|
10221
10283
|
cancelRender2(err);
|
|
10222
10284
|
}
|
|
10223
10285
|
});
|
|
10224
10286
|
return () => {
|
|
10225
10287
|
cancelled = true;
|
|
10288
|
+
cancelWaitForNextFrame();
|
|
10226
10289
|
continueRenderOnce();
|
|
10227
10290
|
};
|
|
10228
10291
|
}, [
|
|
@@ -10230,6 +10293,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10230
10293
|
cancelRender2,
|
|
10231
10294
|
chainState,
|
|
10232
10295
|
continueRender2,
|
|
10296
|
+
continuePendingLoadDelay,
|
|
10233
10297
|
delayRender2,
|
|
10234
10298
|
fit,
|
|
10235
10299
|
height,
|
|
@@ -10439,7 +10503,7 @@ var ImgContent = ({
|
|
|
10439
10503
|
if (typeof window !== "undefined") {
|
|
10440
10504
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
10441
10505
|
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
10442
|
-
|
|
10506
|
+
useLayoutEffect11(() => {
|
|
10443
10507
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
10444
10508
|
if (imageRef.current) {
|
|
10445
10509
|
imageRef.current.src = actualSrc;
|
|
@@ -10706,7 +10770,8 @@ addSequenceStackTraces(Img);
|
|
|
10706
10770
|
var interactiveElementSchema = {
|
|
10707
10771
|
...baseSchema,
|
|
10708
10772
|
...transformSchema,
|
|
10709
|
-
...textSchema
|
|
10773
|
+
...textSchema,
|
|
10774
|
+
...textContentSchema
|
|
10710
10775
|
};
|
|
10711
10776
|
var setRef = (ref, value) => {
|
|
10712
10777
|
if (typeof ref === "function") {
|
|
@@ -11334,7 +11399,7 @@ var OffthreadVideoForRendering = ({
|
|
|
11334
11399
|
mediaVolume: 1
|
|
11335
11400
|
});
|
|
11336
11401
|
warnAboutTooHighVolume(volume);
|
|
11337
|
-
|
|
11402
|
+
useEffect17(() => {
|
|
11338
11403
|
if (!src) {
|
|
11339
11404
|
throw new Error("No src passed");
|
|
11340
11405
|
}
|
|
@@ -11391,7 +11456,7 @@ var OffthreadVideoForRendering = ({
|
|
|
11391
11456
|
}, [toneMapped, currentTime, src, transparent]);
|
|
11392
11457
|
const [imageSrc, setImageSrc] = useState19(null);
|
|
11393
11458
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
11394
|
-
|
|
11459
|
+
useLayoutEffect12(() => {
|
|
11395
11460
|
if (!window.remotion_videoEnabled) {
|
|
11396
11461
|
return;
|
|
11397
11462
|
}
|
|
@@ -11495,7 +11560,7 @@ var useEmitVideoFrame = ({
|
|
|
11495
11560
|
ref,
|
|
11496
11561
|
onVideoFrame
|
|
11497
11562
|
}) => {
|
|
11498
|
-
|
|
11563
|
+
useEffect18(() => {
|
|
11499
11564
|
const { current } = ref;
|
|
11500
11565
|
if (!current) {
|
|
11501
11566
|
return;
|
|
@@ -11670,7 +11735,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11670
11735
|
tag: "video",
|
|
11671
11736
|
mountTime
|
|
11672
11737
|
}));
|
|
11673
|
-
|
|
11738
|
+
useEffect19(() => {
|
|
11674
11739
|
const { current } = videoRef;
|
|
11675
11740
|
if (!current) {
|
|
11676
11741
|
return;
|
|
@@ -11713,7 +11778,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11713
11778
|
const currentOnDurationCallback = useRef27(onDuration);
|
|
11714
11779
|
currentOnDurationCallback.current = onDuration;
|
|
11715
11780
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
11716
|
-
|
|
11781
|
+
useEffect19(() => {
|
|
11717
11782
|
const { current } = videoRef;
|
|
11718
11783
|
if (!current) {
|
|
11719
11784
|
return;
|
|
@@ -11730,7 +11795,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11730
11795
|
current.removeEventListener("loadedmetadata", onLoadedMetadata);
|
|
11731
11796
|
};
|
|
11732
11797
|
}, [src]);
|
|
11733
|
-
|
|
11798
|
+
useEffect19(() => {
|
|
11734
11799
|
const { current } = videoRef;
|
|
11735
11800
|
if (!current) {
|
|
11736
11801
|
return;
|
|
@@ -12511,7 +12576,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
12511
12576
|
mediaVolume: 1
|
|
12512
12577
|
});
|
|
12513
12578
|
warnAboutTooHighVolume(volume);
|
|
12514
|
-
|
|
12579
|
+
useEffect20(() => {
|
|
12515
12580
|
if (!props2.src) {
|
|
12516
12581
|
throw new Error("No src passed");
|
|
12517
12582
|
}
|
|
@@ -12555,7 +12620,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
12555
12620
|
return videoRef.current;
|
|
12556
12621
|
}, []);
|
|
12557
12622
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
12558
|
-
|
|
12623
|
+
useEffect20(() => {
|
|
12559
12624
|
if (!window.remotion_videoEnabled) {
|
|
12560
12625
|
return;
|
|
12561
12626
|
}
|
|
@@ -12645,7 +12710,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
12645
12710
|
]);
|
|
12646
12711
|
const { src } = props2;
|
|
12647
12712
|
if (environment.isRendering) {
|
|
12648
|
-
|
|
12713
|
+
useLayoutEffect13(() => {
|
|
12649
12714
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
12650
12715
|
return;
|
|
12651
12716
|
}
|
|
@@ -13259,6 +13324,9 @@ var ExpertsPageContent = ({ Link }) => {
|
|
|
13259
13324
|
})
|
|
13260
13325
|
});
|
|
13261
13326
|
};
|
|
13327
|
+
// src/components/homepage/Pricing.tsx
|
|
13328
|
+
import { useMemo as useMemo53 } from "react";
|
|
13329
|
+
|
|
13262
13330
|
// ../design/dist/esm/index.mjs
|
|
13263
13331
|
import * as React23 from "react";
|
|
13264
13332
|
import * as React8 from "react";
|
|
@@ -14605,7 +14673,7 @@ var getDefaultConfig = () => {
|
|
|
14605
14673
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
14606
14674
|
|
|
14607
14675
|
// ../design/dist/esm/index.mjs
|
|
14608
|
-
import React32, { useEffect as
|
|
14676
|
+
import React32, { useEffect as useEffect21, useMemo as useMemo43, useState as useState21 } from "react";
|
|
14609
14677
|
|
|
14610
14678
|
// ../paths/dist/esm/index.mjs
|
|
14611
14679
|
var cutLInstruction = ({
|
|
@@ -16711,6 +16779,94 @@ var getBoundingBox = (d) => {
|
|
|
16711
16779
|
const unarced = removeATSHVQInstructions(normalizeInstructions(parsed));
|
|
16712
16780
|
return getBoundingBoxFromInstructions(unarced);
|
|
16713
16781
|
};
|
|
16782
|
+
var translateSegments = (segments, x, y) => {
|
|
16783
|
+
return segments.map((segment) => {
|
|
16784
|
+
if (segment.type === "a" || segment.type === "c" || segment.type === "v" || segment.type === "s" || segment.type === "h" || segment.type === "l" || segment.type === "m" || segment.type === "q" || segment.type === "t") {
|
|
16785
|
+
return segment;
|
|
16786
|
+
}
|
|
16787
|
+
if (segment.type === "V") {
|
|
16788
|
+
return {
|
|
16789
|
+
type: "V",
|
|
16790
|
+
y: segment.y + y
|
|
16791
|
+
};
|
|
16792
|
+
}
|
|
16793
|
+
if (segment.type === "H") {
|
|
16794
|
+
return {
|
|
16795
|
+
type: "H",
|
|
16796
|
+
x: segment.x + x
|
|
16797
|
+
};
|
|
16798
|
+
}
|
|
16799
|
+
if (segment.type === "A") {
|
|
16800
|
+
return {
|
|
16801
|
+
type: "A",
|
|
16802
|
+
rx: segment.rx,
|
|
16803
|
+
ry: segment.ry,
|
|
16804
|
+
largeArcFlag: segment.largeArcFlag,
|
|
16805
|
+
sweepFlag: segment.sweepFlag,
|
|
16806
|
+
xAxisRotation: segment.xAxisRotation,
|
|
16807
|
+
x: segment.x + x,
|
|
16808
|
+
y: segment.y + y
|
|
16809
|
+
};
|
|
16810
|
+
}
|
|
16811
|
+
if (segment.type === "Z") {
|
|
16812
|
+
return segment;
|
|
16813
|
+
}
|
|
16814
|
+
if (segment.type === "C") {
|
|
16815
|
+
return {
|
|
16816
|
+
type: "C",
|
|
16817
|
+
cp1x: segment.cp1x + x,
|
|
16818
|
+
cp1y: segment.cp1y + y,
|
|
16819
|
+
cp2x: segment.cp2x + x,
|
|
16820
|
+
cp2y: segment.cp2y + y,
|
|
16821
|
+
x: segment.x + x,
|
|
16822
|
+
y: segment.y + y
|
|
16823
|
+
};
|
|
16824
|
+
}
|
|
16825
|
+
if (segment.type === "Q") {
|
|
16826
|
+
return {
|
|
16827
|
+
type: "Q",
|
|
16828
|
+
cpx: segment.cpx + x,
|
|
16829
|
+
cpy: segment.cpy + y,
|
|
16830
|
+
x: segment.x + x,
|
|
16831
|
+
y: segment.y + y
|
|
16832
|
+
};
|
|
16833
|
+
}
|
|
16834
|
+
if (segment.type === "S") {
|
|
16835
|
+
return {
|
|
16836
|
+
type: "S",
|
|
16837
|
+
cpx: segment.cpx + x,
|
|
16838
|
+
cpy: segment.cpy + y,
|
|
16839
|
+
x: segment.x + x,
|
|
16840
|
+
y: segment.y + y
|
|
16841
|
+
};
|
|
16842
|
+
}
|
|
16843
|
+
if (segment.type === "T") {
|
|
16844
|
+
return {
|
|
16845
|
+
type: "T",
|
|
16846
|
+
x: segment.x + x,
|
|
16847
|
+
y: segment.y + y
|
|
16848
|
+
};
|
|
16849
|
+
}
|
|
16850
|
+
if (segment.type === "L") {
|
|
16851
|
+
return {
|
|
16852
|
+
type: "L",
|
|
16853
|
+
x: segment.x + x,
|
|
16854
|
+
y: segment.y + y
|
|
16855
|
+
};
|
|
16856
|
+
}
|
|
16857
|
+
if (segment.type === "M") {
|
|
16858
|
+
return {
|
|
16859
|
+
type: "M",
|
|
16860
|
+
x: segment.x + x,
|
|
16861
|
+
y: segment.y + y
|
|
16862
|
+
};
|
|
16863
|
+
}
|
|
16864
|
+
throw new Error(`Unknown segment type: ${segment.type}`);
|
|
16865
|
+
});
|
|
16866
|
+
};
|
|
16867
|
+
var translatePath = (path, x, y) => {
|
|
16868
|
+
return serializeInstructions(translateSegments(parsePath(path), x, y));
|
|
16869
|
+
};
|
|
16714
16870
|
var mod = (x, m) => {
|
|
16715
16871
|
return (x % m + m) % m;
|
|
16716
16872
|
};
|
|
@@ -17272,94 +17428,6 @@ var getLength = (path) => {
|
|
|
17272
17428
|
const constructucted = construct(path);
|
|
17273
17429
|
return constructucted.totalLength;
|
|
17274
17430
|
};
|
|
17275
|
-
var translateSegments = (segments, x, y) => {
|
|
17276
|
-
return segments.map((segment) => {
|
|
17277
|
-
if (segment.type === "a" || segment.type === "c" || segment.type === "v" || segment.type === "s" || segment.type === "h" || segment.type === "l" || segment.type === "m" || segment.type === "q" || segment.type === "t") {
|
|
17278
|
-
return segment;
|
|
17279
|
-
}
|
|
17280
|
-
if (segment.type === "V") {
|
|
17281
|
-
return {
|
|
17282
|
-
type: "V",
|
|
17283
|
-
y: segment.y + y
|
|
17284
|
-
};
|
|
17285
|
-
}
|
|
17286
|
-
if (segment.type === "H") {
|
|
17287
|
-
return {
|
|
17288
|
-
type: "H",
|
|
17289
|
-
x: segment.x + x
|
|
17290
|
-
};
|
|
17291
|
-
}
|
|
17292
|
-
if (segment.type === "A") {
|
|
17293
|
-
return {
|
|
17294
|
-
type: "A",
|
|
17295
|
-
rx: segment.rx,
|
|
17296
|
-
ry: segment.ry,
|
|
17297
|
-
largeArcFlag: segment.largeArcFlag,
|
|
17298
|
-
sweepFlag: segment.sweepFlag,
|
|
17299
|
-
xAxisRotation: segment.xAxisRotation,
|
|
17300
|
-
x: segment.x + x,
|
|
17301
|
-
y: segment.y + y
|
|
17302
|
-
};
|
|
17303
|
-
}
|
|
17304
|
-
if (segment.type === "Z") {
|
|
17305
|
-
return segment;
|
|
17306
|
-
}
|
|
17307
|
-
if (segment.type === "C") {
|
|
17308
|
-
return {
|
|
17309
|
-
type: "C",
|
|
17310
|
-
cp1x: segment.cp1x + x,
|
|
17311
|
-
cp1y: segment.cp1y + y,
|
|
17312
|
-
cp2x: segment.cp2x + x,
|
|
17313
|
-
cp2y: segment.cp2y + y,
|
|
17314
|
-
x: segment.x + x,
|
|
17315
|
-
y: segment.y + y
|
|
17316
|
-
};
|
|
17317
|
-
}
|
|
17318
|
-
if (segment.type === "Q") {
|
|
17319
|
-
return {
|
|
17320
|
-
type: "Q",
|
|
17321
|
-
cpx: segment.cpx + x,
|
|
17322
|
-
cpy: segment.cpy + y,
|
|
17323
|
-
x: segment.x + x,
|
|
17324
|
-
y: segment.y + y
|
|
17325
|
-
};
|
|
17326
|
-
}
|
|
17327
|
-
if (segment.type === "S") {
|
|
17328
|
-
return {
|
|
17329
|
-
type: "S",
|
|
17330
|
-
cpx: segment.cpx + x,
|
|
17331
|
-
cpy: segment.cpy + y,
|
|
17332
|
-
x: segment.x + x,
|
|
17333
|
-
y: segment.y + y
|
|
17334
|
-
};
|
|
17335
|
-
}
|
|
17336
|
-
if (segment.type === "T") {
|
|
17337
|
-
return {
|
|
17338
|
-
type: "T",
|
|
17339
|
-
x: segment.x + x,
|
|
17340
|
-
y: segment.y + y
|
|
17341
|
-
};
|
|
17342
|
-
}
|
|
17343
|
-
if (segment.type === "L") {
|
|
17344
|
-
return {
|
|
17345
|
-
type: "L",
|
|
17346
|
-
x: segment.x + x,
|
|
17347
|
-
y: segment.y + y
|
|
17348
|
-
};
|
|
17349
|
-
}
|
|
17350
|
-
if (segment.type === "M") {
|
|
17351
|
-
return {
|
|
17352
|
-
type: "M",
|
|
17353
|
-
x: segment.x + x,
|
|
17354
|
-
y: segment.y + y
|
|
17355
|
-
};
|
|
17356
|
-
}
|
|
17357
|
-
throw new Error(`Unknown segment type: ${segment.type}`);
|
|
17358
|
-
});
|
|
17359
|
-
};
|
|
17360
|
-
var translatePath = (path, x, y) => {
|
|
17361
|
-
return serializeInstructions(translateSegments(parsePath(path), x, y));
|
|
17362
|
-
};
|
|
17363
17431
|
var resetPath = (d) => {
|
|
17364
17432
|
const box = getBoundingBox(d);
|
|
17365
17433
|
return translatePath(d, -box.x1, -box.y1);
|
|
@@ -20295,7 +20363,7 @@ var extrudeAndTransformElement = (options) => {
|
|
|
20295
20363
|
// ../design/dist/esm/index.mjs
|
|
20296
20364
|
import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
20297
20365
|
import { jsx as jsx312, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
20298
|
-
import { useEffect as
|
|
20366
|
+
import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef31 } from "react";
|
|
20299
20367
|
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
20300
20368
|
import { jsx as jsx53, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
20301
20369
|
import React62 from "react";
|
|
@@ -20550,7 +20618,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
20550
20618
|
isActive: false
|
|
20551
20619
|
});
|
|
20552
20620
|
const eventTarget = useMemo43(() => new EventTarget, []);
|
|
20553
|
-
|
|
20621
|
+
useEffect21(() => {
|
|
20554
20622
|
if (disabled) {
|
|
20555
20623
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
20556
20624
|
} else {
|
|
@@ -20697,7 +20765,7 @@ var getAngle = (ref, coordinates) => {
|
|
|
20697
20765
|
var lastCoordinates = null;
|
|
20698
20766
|
var useMousePosition = (ref) => {
|
|
20699
20767
|
const [angle, setAngle] = useState21(getAngle(ref.current, lastCoordinates));
|
|
20700
|
-
|
|
20768
|
+
useEffect21(() => {
|
|
20701
20769
|
const element = ref.current;
|
|
20702
20770
|
if (!element) {
|
|
20703
20771
|
return;
|
|
@@ -20818,7 +20886,7 @@ var Spinner = ({ size, duration }) => {
|
|
|
20818
20886
|
};
|
|
20819
20887
|
}, [size]);
|
|
20820
20888
|
const pathsRef = useRef31([]);
|
|
20821
|
-
|
|
20889
|
+
useEffect22(() => {
|
|
20822
20890
|
const animate = () => {
|
|
20823
20891
|
const now = performance.now();
|
|
20824
20892
|
for (let index = 0;index < lines; index++) {
|
|
@@ -28884,7 +28952,10 @@ var CompanyPricing = () => {
|
|
|
28884
28952
|
|
|
28885
28953
|
// src/components/homepage/Pricing.tsx
|
|
28886
28954
|
import { jsx as jsx50, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
28887
|
-
var Pricing = () => {
|
|
28955
|
+
var Pricing = ({ faqHref = "/docs/pricing#faq" }) => {
|
|
28956
|
+
const faqLinkTarget = useMemo53(() => {
|
|
28957
|
+
return faqHref.startsWith("http") ? "_blank" : undefined;
|
|
28958
|
+
}, [faqHref]);
|
|
28888
28959
|
return /* @__PURE__ */ jsxs9("div", {
|
|
28889
28960
|
style: {
|
|
28890
28961
|
display: "flex",
|
|
@@ -28909,9 +28980,9 @@ var Pricing = () => {
|
|
|
28909
28980
|
"See our",
|
|
28910
28981
|
" ",
|
|
28911
28982
|
/* @__PURE__ */ jsx50("a", {
|
|
28912
|
-
target:
|
|
28983
|
+
target: faqLinkTarget,
|
|
28913
28984
|
className: "bluelink",
|
|
28914
|
-
href:
|
|
28985
|
+
href: faqHref,
|
|
28915
28986
|
children: "FAQ"
|
|
28916
28987
|
}),
|
|
28917
28988
|
" ",
|
|
@@ -29282,7 +29353,7 @@ var AutomationsSection = () => {
|
|
|
29282
29353
|
var AutomationsSection_default = AutomationsSection;
|
|
29283
29354
|
|
|
29284
29355
|
// src/components/homepage/BackgroundAnimation.tsx
|
|
29285
|
-
import { useEffect as
|
|
29356
|
+
import { useEffect as useEffect40 } from "react";
|
|
29286
29357
|
import { jsx as jsx56, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
29287
29358
|
"use client";
|
|
29288
29359
|
var rx = 0.2;
|
|
@@ -29308,7 +29379,7 @@ var BackgroundAnimation = () => {
|
|
|
29308
29379
|
}
|
|
29309
29380
|
}
|
|
29310
29381
|
`;
|
|
29311
|
-
|
|
29382
|
+
useEffect40(() => {
|
|
29312
29383
|
const _style = document.createElement("style");
|
|
29313
29384
|
_style.innerHTML = css;
|
|
29314
29385
|
document.head.appendChild(_style);
|
|
@@ -29449,7 +29520,7 @@ var PagesOfDocs = () => {
|
|
|
29449
29520
|
className: "flex-col",
|
|
29450
29521
|
children: [
|
|
29451
29522
|
/* @__PURE__ */ jsxs12("div", {
|
|
29452
|
-
style: { display: "flex", alignItems: "center" },
|
|
29523
|
+
style: { display: "flex", alignItems: "center", gap: 8 },
|
|
29453
29524
|
children: [
|
|
29454
29525
|
/* @__PURE__ */ jsx57(StatItemContent, {
|
|
29455
29526
|
content: /* @__PURE__ */ jsx57("svg", {
|
|
@@ -29463,12 +29534,11 @@ var PagesOfDocs = () => {
|
|
|
29463
29534
|
fill: "var(--text-color)"
|
|
29464
29535
|
})
|
|
29465
29536
|
}),
|
|
29466
|
-
width: "
|
|
29537
|
+
width: "32px"
|
|
29467
29538
|
}),
|
|
29468
29539
|
/* @__PURE__ */ jsx57(StatItemContent, {
|
|
29469
29540
|
content: "1000",
|
|
29470
|
-
width: "
|
|
29471
|
-
maxWidth: "100px",
|
|
29541
|
+
width: "112px",
|
|
29472
29542
|
fontSize: "2.5rem",
|
|
29473
29543
|
fontWeight: "bold"
|
|
29474
29544
|
})
|
|
@@ -29522,7 +29592,7 @@ var GitHubStars = () => {
|
|
|
29522
29592
|
width: "45px"
|
|
29523
29593
|
}),
|
|
29524
29594
|
/* @__PURE__ */ jsx57(StatItemContent, {
|
|
29525
|
-
content: "
|
|
29595
|
+
content: "52K",
|
|
29526
29596
|
width: "80px",
|
|
29527
29597
|
fontSize: "2.5rem",
|
|
29528
29598
|
fontWeight: "bold"
|
|
@@ -29700,16 +29770,16 @@ var CommunityStats_default = CommunityStats;
|
|
|
29700
29770
|
import { createContext as createContext32 } from "react";
|
|
29701
29771
|
import { jsx as jsx59, jsxs as jsxs14, Fragment as Fragment12 } from "react/jsx-runtime";
|
|
29702
29772
|
import { jsx as jsx214, jsxs as jsxs24, Fragment as Fragment23 } from "react/jsx-runtime";
|
|
29703
|
-
import
|
|
29704
|
-
import { useContext as useContext210, useEffect as
|
|
29705
|
-
import { useContext as useContext46, useLayoutEffect as
|
|
29773
|
+
import React57 from "react";
|
|
29774
|
+
import { useContext as useContext210, useEffect as useEffect41, useState as useState38 } from "react";
|
|
29775
|
+
import { useContext as useContext46, useLayoutEffect as useLayoutEffect18 } from "react";
|
|
29706
29776
|
import { jsx as jsx314 } from "react/jsx-runtime";
|
|
29707
29777
|
import { useEffect as useEffect210, useState as useState210 } from "react";
|
|
29708
29778
|
import { useLayoutEffect as useLayoutEffect23 } from "react";
|
|
29709
29779
|
import { useContext as useContext47, useEffect as useEffect52, useRef as useRef47 } from "react";
|
|
29710
29780
|
import { useEffect as useEffect310, useRef as useRef212 } from "react";
|
|
29711
|
-
import { useCallback as useCallback39, useContext as useContext310, useMemo as
|
|
29712
|
-
import { useEffect as
|
|
29781
|
+
import { useCallback as useCallback39, useContext as useContext310, useMemo as useMemo54, useRef as useRef48, useState as useState39 } from "react";
|
|
29782
|
+
import { useEffect as useEffect42, useRef as useRef310 } from "react";
|
|
29713
29783
|
import { useCallback as useCallback210, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
|
|
29714
29784
|
import {
|
|
29715
29785
|
forwardRef as forwardRef210,
|
|
@@ -29741,7 +29811,7 @@ import { useCallback as useCallback42, useMemo as useMemo410, useRef as useRef52
|
|
|
29741
29811
|
import React54, { useCallback as useCallback310, useMemo as useMemo310, useState as useState52 } from "react";
|
|
29742
29812
|
import { jsx as jsx74, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
29743
29813
|
import { jsx as jsx84, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
29744
|
-
import { useCallback as useCallback52, useEffect as useEffect92, useMemo as
|
|
29814
|
+
import { useCallback as useCallback52, useEffect as useEffect92, useMemo as useMemo55, useState as useState82 } from "react";
|
|
29745
29815
|
import { useEffect as useEffect83, useRef as useRef62, useState as useState72 } from "react";
|
|
29746
29816
|
import { jsx as jsx94, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
29747
29817
|
import { useCallback as useCallback62, useEffect as useEffect102, useMemo as useMemo62, useRef as useRef72, useState as useState92 } from "react";
|
|
@@ -31646,8 +31716,8 @@ var calculateOuter = ({
|
|
|
31646
31716
|
overflow: overflowVisible ? "visible" : "hidden"
|
|
31647
31717
|
};
|
|
31648
31718
|
};
|
|
31649
|
-
var PlayerEventEmitterContext =
|
|
31650
|
-
var ThumbnailEmitterContext =
|
|
31719
|
+
var PlayerEventEmitterContext = React57.createContext(undefined);
|
|
31720
|
+
var ThumbnailEmitterContext = React57.createContext(undefined);
|
|
31651
31721
|
|
|
31652
31722
|
class PlayerEmitter {
|
|
31653
31723
|
listeners = {
|
|
@@ -31765,7 +31835,7 @@ var useBufferStateEmitter = (emitter) => {
|
|
|
31765
31835
|
if (!bufferManager) {
|
|
31766
31836
|
throw new Error("BufferingContextReact not found");
|
|
31767
31837
|
}
|
|
31768
|
-
|
|
31838
|
+
useLayoutEffect18(() => {
|
|
31769
31839
|
const clear1 = bufferManager.listenForBuffering(() => {
|
|
31770
31840
|
bufferManager.buffering.current = true;
|
|
31771
31841
|
emitter.dispatchWaiting({});
|
|
@@ -31786,7 +31856,7 @@ var PlayerEmitterProvider = ({ children, currentPlaybackRate }) => {
|
|
|
31786
31856
|
if (!bufferManager) {
|
|
31787
31857
|
throw new Error("BufferingContextReact not found");
|
|
31788
31858
|
}
|
|
31789
|
-
|
|
31859
|
+
useEffect41(() => {
|
|
31790
31860
|
if (currentPlaybackRate) {
|
|
31791
31861
|
emitter.dispatchRateChange(currentPlaybackRate);
|
|
31792
31862
|
}
|
|
@@ -31975,7 +32045,7 @@ var usePlayer = () => {
|
|
|
31975
32045
|
const isBuffering = useCallback39(() => {
|
|
31976
32046
|
return buffering.current;
|
|
31977
32047
|
}, [buffering]);
|
|
31978
|
-
const returnValue =
|
|
32048
|
+
const returnValue = useMemo54(() => {
|
|
31979
32049
|
return {
|
|
31980
32050
|
frameBack,
|
|
31981
32051
|
frameForward,
|
|
@@ -32161,7 +32231,7 @@ var getIsBackgrounded = () => {
|
|
|
32161
32231
|
};
|
|
32162
32232
|
var useIsBackgrounded = () => {
|
|
32163
32233
|
const isBackgrounded = useRef310(getIsBackgrounded());
|
|
32164
|
-
|
|
32234
|
+
useEffect42(() => {
|
|
32165
32235
|
const onVisibilityChange = () => {
|
|
32166
32236
|
isBackgrounded.current = getIsBackgrounded();
|
|
32167
32237
|
};
|
|
@@ -32952,7 +33022,7 @@ var PlaybackrateOption = ({ rate, onSelect, selectedRate, keyboardSelectedRate }
|
|
|
32952
33022
|
setHovered(false);
|
|
32953
33023
|
}, []);
|
|
32954
33024
|
const isFocused = keyboardSelectedRate === rate;
|
|
32955
|
-
const actualStyle =
|
|
33025
|
+
const actualStyle = useMemo55(() => {
|
|
32956
33026
|
return {
|
|
32957
33027
|
...rateDiv,
|
|
32958
33028
|
backgroundColor: hovered || isFocused ? "#eee" : "transparent"
|
|
@@ -33019,7 +33089,7 @@ var PlaybackPopup = ({ setIsComponentVisible, playbackRates, canvasSize }) => {
|
|
|
33019
33089
|
setPlaybackRate(rate);
|
|
33020
33090
|
setIsComponentVisible(false);
|
|
33021
33091
|
}, [setIsComponentVisible, setPlaybackRate]);
|
|
33022
|
-
const playbackPopup =
|
|
33092
|
+
const playbackPopup = useMemo55(() => {
|
|
33023
33093
|
return {
|
|
33024
33094
|
position: "absolute",
|
|
33025
33095
|
right: 0,
|
|
@@ -34937,8 +35007,8 @@ var Thumbnail = forward2(ThumbnailFn);
|
|
|
34937
35007
|
// src/components/homepage/Demo/index.tsx
|
|
34938
35008
|
import {
|
|
34939
35009
|
useCallback as useCallback55,
|
|
34940
|
-
useEffect as
|
|
34941
|
-
useMemo as
|
|
35010
|
+
useEffect as useEffect57,
|
|
35011
|
+
useMemo as useMemo68,
|
|
34942
35012
|
useRef as useRef59,
|
|
34943
35013
|
useState as useState56
|
|
34944
35014
|
} from "react";
|
|
@@ -35689,15 +35759,15 @@ var UNDERLAY_RED = curriedTransparentize$1(0.9, RED);
|
|
|
35689
35759
|
var BLUE_TEXT = curriedDarken$1(0.3, "#42e9f5");
|
|
35690
35760
|
|
|
35691
35761
|
// src/components/homepage/layout/use-color-mode.tsx
|
|
35692
|
-
import
|
|
35762
|
+
import React58, { useContext as useContext48, useMemo as useMemo56 } from "react";
|
|
35693
35763
|
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
35694
|
-
var Context =
|
|
35764
|
+
var Context = React58.createContext(undefined);
|
|
35695
35765
|
var ColorModeProvider = ({
|
|
35696
35766
|
children,
|
|
35697
35767
|
colorMode,
|
|
35698
35768
|
setColorMode
|
|
35699
35769
|
}) => {
|
|
35700
|
-
const value =
|
|
35770
|
+
const value = useMemo56(() => {
|
|
35701
35771
|
return { colorMode, setColorMode };
|
|
35702
35772
|
}, [colorMode, setColorMode]);
|
|
35703
35773
|
return /* @__PURE__ */ jsx60(Context.Provider, {
|
|
@@ -35715,14 +35785,14 @@ function useColorMode() {
|
|
|
35715
35785
|
|
|
35716
35786
|
// ../media/dist/esm/index.mjs
|
|
35717
35787
|
import { useMemo as useMemo312, useState as useState311 } from "react";
|
|
35718
|
-
import { useContext as useContext212, useEffect as
|
|
35788
|
+
import { useContext as useContext212, useEffect as useEffect43, useMemo as useMemo58, useRef as useRef50, useState as useState40 } from "react";
|
|
35719
35789
|
import { ALL_FORMATS, Input as Input2, UrlSource } from "mediabunny";
|
|
35720
35790
|
import {
|
|
35721
35791
|
AudioBufferSink,
|
|
35722
35792
|
InputDisposedError
|
|
35723
35793
|
} from "mediabunny";
|
|
35724
35794
|
import { CanvasSink } from "mediabunny";
|
|
35725
|
-
import { useContext as useContext50, useLayoutEffect as
|
|
35795
|
+
import { useContext as useContext50, useLayoutEffect as useLayoutEffect19 } from "react";
|
|
35726
35796
|
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
35727
35797
|
import { useContext as useContext312, useLayoutEffect as useLayoutEffect24, useMemo as useMemo213, useState as useState212 } from "react";
|
|
35728
35798
|
import React211 from "react";
|
|
@@ -35752,7 +35822,7 @@ import { jsx as jsx412 } from "react/jsx-runtime";
|
|
|
35752
35822
|
import {
|
|
35753
35823
|
useContext as useContext53,
|
|
35754
35824
|
useLayoutEffect as useLayoutEffect43,
|
|
35755
|
-
useMemo as
|
|
35825
|
+
useMemo as useMemo57,
|
|
35756
35826
|
useRef as useRef312,
|
|
35757
35827
|
useState as useState53
|
|
35758
35828
|
} from "react";
|
|
@@ -35834,13 +35904,13 @@ var getTimeInSeconds = ({
|
|
|
35834
35904
|
if (mediaDurationInSeconds === null && loop && ifNoMediaDuration === "fail") {
|
|
35835
35905
|
throw new Error(`Could not determine duration of ${src}, but "loop" was set.`);
|
|
35836
35906
|
}
|
|
35837
|
-
const
|
|
35907
|
+
const loopDurationInFrames = loop ? Internals.calculateMediaDuration({
|
|
35838
35908
|
trimAfter,
|
|
35839
35909
|
mediaDurationInFrames: mediaDurationInSeconds ? mediaDurationInSeconds * fps : Infinity,
|
|
35840
35910
|
playbackRate: 1,
|
|
35841
35911
|
trimBefore
|
|
35842
|
-
})
|
|
35843
|
-
const timeInSeconds = unloopedTimeInSeconds * playbackRate %
|
|
35912
|
+
}) : Infinity;
|
|
35913
|
+
const timeInSeconds = loop ? unloopedTimeInSeconds * playbackRate * fps % loopDurationInFrames / fps : unloopedTimeInSeconds * playbackRate;
|
|
35844
35914
|
if ((trimAfter ?? null) !== null && !loop) {
|
|
35845
35915
|
const time = (trimAfter - (trimBefore ?? 0)) / fps;
|
|
35846
35916
|
if (timeInSeconds >= time) {
|
|
@@ -36736,6 +36806,43 @@ var roundTo4Digits = (timestamp) => {
|
|
|
36736
36806
|
return Math.round(timestamp * 1000) / 1000;
|
|
36737
36807
|
};
|
|
36738
36808
|
var BUFFER_SIZE = 3;
|
|
36809
|
+
var releaseCanvas = Symbol("releaseCanvas");
|
|
36810
|
+
var releaseStableFrame = (frame) => {
|
|
36811
|
+
frame?.[releaseCanvas]?.();
|
|
36812
|
+
};
|
|
36813
|
+
var makeStableFramePool = () => {
|
|
36814
|
+
const availableCanvases = [];
|
|
36815
|
+
const makeStableFrame = (frame) => {
|
|
36816
|
+
const { canvas } = frame;
|
|
36817
|
+
const stableCanvas = availableCanvases.pop() ?? new OffscreenCanvas(canvas.width, canvas.height);
|
|
36818
|
+
if (stableCanvas.width !== canvas.width) {
|
|
36819
|
+
stableCanvas.width = canvas.width;
|
|
36820
|
+
}
|
|
36821
|
+
if (stableCanvas.height !== canvas.height) {
|
|
36822
|
+
stableCanvas.height = canvas.height;
|
|
36823
|
+
}
|
|
36824
|
+
const context = stableCanvas.getContext("2d");
|
|
36825
|
+
if (!context) {
|
|
36826
|
+
throw new Error("Could not create canvas context");
|
|
36827
|
+
}
|
|
36828
|
+
context.drawImage(canvas, 0, 0);
|
|
36829
|
+
let released = false;
|
|
36830
|
+
const stableFrame = {
|
|
36831
|
+
canvas: stableCanvas,
|
|
36832
|
+
duration: frame.duration,
|
|
36833
|
+
timestamp: frame.timestamp,
|
|
36834
|
+
[releaseCanvas]: () => {
|
|
36835
|
+
if (released) {
|
|
36836
|
+
return;
|
|
36837
|
+
}
|
|
36838
|
+
released = true;
|
|
36839
|
+
availableCanvases.push(stableCanvas);
|
|
36840
|
+
}
|
|
36841
|
+
};
|
|
36842
|
+
return stableFrame;
|
|
36843
|
+
};
|
|
36844
|
+
return { makeStableFrame };
|
|
36845
|
+
};
|
|
36739
36846
|
var canvasesAheadOfTime = (videoSink, startTimestamp) => {
|
|
36740
36847
|
const iterator = videoSink.canvases(startTimestamp);
|
|
36741
36848
|
const buffer = [];
|
|
@@ -36743,8 +36850,9 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
|
|
|
36743
36850
|
let reachedEnd = false;
|
|
36744
36851
|
let closed = false;
|
|
36745
36852
|
let inFlight = null;
|
|
36746
|
-
const
|
|
36747
|
-
|
|
36853
|
+
const stableFramePool = makeStableFramePool();
|
|
36854
|
+
const takeFrame = (frame) => {
|
|
36855
|
+
return stableFramePool.makeStableFrame(frame);
|
|
36748
36856
|
};
|
|
36749
36857
|
const fillNext = () => {
|
|
36750
36858
|
if (chaining || reachedEnd || closed)
|
|
@@ -36755,17 +36863,18 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
|
|
|
36755
36863
|
const slot = { promise: iterator.next(), resolved: null };
|
|
36756
36864
|
buffer.push(slot);
|
|
36757
36865
|
inFlight = slot.promise.then((result) => {
|
|
36758
|
-
slot.resolved = result;
|
|
36759
36866
|
chaining = false;
|
|
36760
36867
|
inFlight = null;
|
|
36761
36868
|
if (result.done) {
|
|
36869
|
+
slot.resolved = result;
|
|
36762
36870
|
reachedEnd = true;
|
|
36763
36871
|
return;
|
|
36764
36872
|
}
|
|
36765
36873
|
if (closed) {
|
|
36766
|
-
|
|
36874
|
+
slot.resolved = { done: true, value: undefined };
|
|
36767
36875
|
return;
|
|
36768
36876
|
}
|
|
36877
|
+
slot.resolved = { ...result, value: takeFrame(result.value) };
|
|
36769
36878
|
fillNext();
|
|
36770
36879
|
}, () => {
|
|
36771
36880
|
chaining = false;
|
|
@@ -36793,7 +36902,7 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
|
|
|
36793
36902
|
return next2.resolved.done ? null : next2.resolved.value;
|
|
36794
36903
|
}
|
|
36795
36904
|
const result = await next2.promise;
|
|
36796
|
-
return result.done ? null : result.value;
|
|
36905
|
+
return result.done ? null : takeFrame(result.value);
|
|
36797
36906
|
}
|
|
36798
36907
|
};
|
|
36799
36908
|
}
|
|
@@ -36807,7 +36916,10 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
|
|
|
36807
36916
|
type: "pending",
|
|
36808
36917
|
wait: async () => {
|
|
36809
36918
|
const result = await slot.promise;
|
|
36810
|
-
|
|
36919
|
+
if (slot.resolved) {
|
|
36920
|
+
return slot.resolved.done ? null : slot.resolved.value;
|
|
36921
|
+
}
|
|
36922
|
+
return result.done ? null : takeFrame(result.value);
|
|
36811
36923
|
}
|
|
36812
36924
|
};
|
|
36813
36925
|
};
|
|
@@ -36815,7 +36927,7 @@ var canvasesAheadOfTime = (videoSink, startTimestamp) => {
|
|
|
36815
36927
|
closed = true;
|
|
36816
36928
|
for (const slot of buffer) {
|
|
36817
36929
|
if (slot.resolved && !slot.resolved.done) {
|
|
36818
|
-
|
|
36930
|
+
releaseStableFrame(slot.resolved.value);
|
|
36819
36931
|
}
|
|
36820
36932
|
}
|
|
36821
36933
|
buffer.length = 0;
|
|
@@ -36858,6 +36970,12 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36858
36970
|
const initialFrame = firstAwait && firstAwait.type === "ready" ? firstAwait.frame : await firstAwait.wait();
|
|
36859
36971
|
let lastReturnedFrame = initialFrame;
|
|
36860
36972
|
let peekedFrame = null;
|
|
36973
|
+
const setLastReturnedFrame = (frame) => {
|
|
36974
|
+
if (lastReturnedFrame !== frame) {
|
|
36975
|
+
releaseStableFrame(lastReturnedFrame);
|
|
36976
|
+
}
|
|
36977
|
+
lastReturnedFrame = frame;
|
|
36978
|
+
};
|
|
36861
36979
|
const peek = async () => {
|
|
36862
36980
|
if (peekedFrame) {
|
|
36863
36981
|
return peekedFrame;
|
|
@@ -36873,7 +36991,7 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36873
36991
|
const getNextOrNullIfNotAvailable = () => {
|
|
36874
36992
|
if (peekedFrame) {
|
|
36875
36993
|
const frame = peekedFrame;
|
|
36876
|
-
|
|
36994
|
+
setLastReturnedFrame(frame);
|
|
36877
36995
|
const retValue = {
|
|
36878
36996
|
type: "got-frame-or-end",
|
|
36879
36997
|
frame
|
|
@@ -36888,7 +37006,7 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36888
37006
|
waitPromise: async () => {
|
|
36889
37007
|
const res = await next.wait();
|
|
36890
37008
|
if (res) {
|
|
36891
|
-
|
|
37009
|
+
setLastReturnedFrame(res);
|
|
36892
37010
|
} else {
|
|
36893
37011
|
iteratorEnded = true;
|
|
36894
37012
|
}
|
|
@@ -36897,7 +37015,7 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36897
37015
|
};
|
|
36898
37016
|
}
|
|
36899
37017
|
if (next.frame) {
|
|
36900
|
-
|
|
37018
|
+
setLastReturnedFrame(next.frame);
|
|
36901
37019
|
} else {
|
|
36902
37020
|
iteratorEnded = true;
|
|
36903
37021
|
}
|
|
@@ -36908,15 +37026,21 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36908
37026
|
};
|
|
36909
37027
|
const destroy = () => {
|
|
36910
37028
|
destroyed = true;
|
|
37029
|
+
releaseStableFrame(lastReturnedFrame);
|
|
37030
|
+
if (peekedFrame !== lastReturnedFrame) {
|
|
37031
|
+
releaseStableFrame(peekedFrame);
|
|
37032
|
+
}
|
|
36911
37033
|
lastReturnedFrame = null;
|
|
37034
|
+
peekedFrame = null;
|
|
36912
37035
|
iterator.closeIterator().catch(() => {
|
|
36913
37036
|
return;
|
|
36914
37037
|
});
|
|
36915
37038
|
};
|
|
36916
37039
|
const tryToSatisfySeek = async (time) => {
|
|
37040
|
+
const timestamp = roundTo4Digits(time);
|
|
36917
37041
|
if (lastReturnedFrame) {
|
|
36918
37042
|
const frameTimestamp = roundTo4Digits(lastReturnedFrame.timestamp);
|
|
36919
|
-
if (
|
|
37043
|
+
if (timestamp < frameTimestamp) {
|
|
36920
37044
|
const lastFrameWasInitialFrame = lastReturnedFrame === initialFrame;
|
|
36921
37045
|
const firstFrameDoesSatisfy = lastFrameWasInitialFrame && roundTo4Digits(time) >= roundTo4Digits(timeToSeek);
|
|
36922
37046
|
if (firstFrameDoesSatisfy) {
|
|
@@ -36938,7 +37062,6 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36938
37062
|
}
|
|
36939
37063
|
}
|
|
36940
37064
|
const frameEndTimestamp = roundTo4Digits(lastReturnedFrame.timestamp + lastFrameDuration);
|
|
36941
|
-
const timestamp = roundTo4Digits(time);
|
|
36942
37065
|
if (frameTimestamp <= timestamp && frameEndTimestamp > timestamp) {
|
|
36943
37066
|
return {
|
|
36944
37067
|
type: "satisfied",
|
|
@@ -36982,7 +37105,6 @@ var createVideoIterator = async (timeToSeek, cache2) => {
|
|
|
36982
37105
|
}
|
|
36983
37106
|
const frameTimestamp = roundTo4Digits(frame.frame.timestamp);
|
|
36984
37107
|
const frameEndTimestamp = roundTo4Digits(frame.frame.timestamp + frame.frame.duration);
|
|
36985
|
-
const timestamp = roundTo4Digits(time);
|
|
36986
37108
|
if (frameTimestamp <= timestamp && frameEndTimestamp > timestamp) {
|
|
36987
37109
|
return {
|
|
36988
37110
|
type: "satisfied",
|
|
@@ -37036,7 +37158,7 @@ var videoIteratorManager = async ({
|
|
|
37036
37158
|
}
|
|
37037
37159
|
}
|
|
37038
37160
|
const canvasSink = new CanvasSink(videoTrack, {
|
|
37039
|
-
poolSize:
|
|
37161
|
+
poolSize: 3,
|
|
37040
37162
|
fit: "contain",
|
|
37041
37163
|
alpha: true
|
|
37042
37164
|
});
|
|
@@ -37727,7 +37849,7 @@ var useCommonEffects = ({
|
|
|
37727
37849
|
label: label3
|
|
37728
37850
|
}) => {
|
|
37729
37851
|
const sharedAudioContext = useContext50(Internals.SharedAudioContext);
|
|
37730
|
-
|
|
37852
|
+
useLayoutEffect19(() => {
|
|
37731
37853
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37732
37854
|
if (!mediaPlayer)
|
|
37733
37855
|
return;
|
|
@@ -37744,7 +37866,7 @@ var useCommonEffects = ({
|
|
|
37744
37866
|
frame,
|
|
37745
37867
|
mediaPlayerRef
|
|
37746
37868
|
]);
|
|
37747
|
-
|
|
37869
|
+
useLayoutEffect19(() => {
|
|
37748
37870
|
if (!sharedAudioContext)
|
|
37749
37871
|
return;
|
|
37750
37872
|
const { remove } = sharedAudioContext.audioSyncAnchorEmitter.subscribe((event) => {
|
|
@@ -37756,90 +37878,90 @@ var useCommonEffects = ({
|
|
|
37756
37878
|
remove();
|
|
37757
37879
|
};
|
|
37758
37880
|
}, [sharedAudioContext, mediaPlayerRef]);
|
|
37759
|
-
|
|
37881
|
+
useLayoutEffect19(() => {
|
|
37760
37882
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37761
37883
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37762
37884
|
return;
|
|
37763
37885
|
}
|
|
37764
37886
|
mediaPlayer.setTrimBefore(trimBefore, currentTimeRef.current);
|
|
37765
37887
|
}, [trimBefore, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37766
|
-
|
|
37888
|
+
useLayoutEffect19(() => {
|
|
37767
37889
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37768
37890
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37769
37891
|
return;
|
|
37770
37892
|
}
|
|
37771
37893
|
mediaPlayer.setTrimAfter(trimAfter, currentTimeRef.current);
|
|
37772
37894
|
}, [trimAfter, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37773
|
-
|
|
37895
|
+
useLayoutEffect19(() => {
|
|
37774
37896
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37775
37897
|
if (!mediaPlayer || !mediaPlayerReady)
|
|
37776
37898
|
return;
|
|
37777
37899
|
mediaPlayer.setMuted(effectiveMuted);
|
|
37778
37900
|
}, [effectiveMuted, mediaPlayerReady, mediaPlayerRef]);
|
|
37779
|
-
|
|
37901
|
+
useLayoutEffect19(() => {
|
|
37780
37902
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37781
37903
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37782
37904
|
return;
|
|
37783
37905
|
}
|
|
37784
37906
|
mediaPlayer.setVolume(userPreferredVolume);
|
|
37785
37907
|
}, [userPreferredVolume, mediaPlayerReady, mediaPlayerRef]);
|
|
37786
|
-
|
|
37908
|
+
useLayoutEffect19(() => {
|
|
37787
37909
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37788
37910
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37789
37911
|
return;
|
|
37790
37912
|
}
|
|
37791
37913
|
mediaPlayer.setPlaybackRate(playbackRate, currentTimeRef.current);
|
|
37792
37914
|
}, [playbackRate, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37793
|
-
|
|
37915
|
+
useLayoutEffect19(() => {
|
|
37794
37916
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37795
37917
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37796
37918
|
return;
|
|
37797
37919
|
}
|
|
37798
37920
|
mediaPlayer.setGlobalPlaybackRate(globalPlaybackRate, currentTimeRef.current);
|
|
37799
37921
|
}, [globalPlaybackRate, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37800
|
-
|
|
37922
|
+
useLayoutEffect19(() => {
|
|
37801
37923
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37802
37924
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37803
37925
|
return;
|
|
37804
37926
|
}
|
|
37805
37927
|
mediaPlayer.setLoop(loop, currentTimeRef.current);
|
|
37806
37928
|
}, [loop, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37807
|
-
|
|
37929
|
+
useLayoutEffect19(() => {
|
|
37808
37930
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37809
37931
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37810
37932
|
return;
|
|
37811
37933
|
}
|
|
37812
37934
|
mediaPlayer.setSequenceDurationInFrames(durationInFrames, currentTimeRef.current);
|
|
37813
37935
|
}, [durationInFrames, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37814
|
-
|
|
37936
|
+
useLayoutEffect19(() => {
|
|
37815
37937
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37816
37938
|
if (!mediaPlayer) {
|
|
37817
37939
|
return;
|
|
37818
37940
|
}
|
|
37819
37941
|
mediaPlayer.setIsPremounting(isPremounting);
|
|
37820
37942
|
}, [isPremounting, mediaPlayerReady, mediaPlayerRef]);
|
|
37821
|
-
|
|
37943
|
+
useLayoutEffect19(() => {
|
|
37822
37944
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37823
37945
|
if (!mediaPlayer) {
|
|
37824
37946
|
return;
|
|
37825
37947
|
}
|
|
37826
37948
|
mediaPlayer.setIsPostmounting(isPostmounting);
|
|
37827
37949
|
}, [isPostmounting, mediaPlayerReady, mediaPlayerRef]);
|
|
37828
|
-
|
|
37950
|
+
useLayoutEffect19(() => {
|
|
37829
37951
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37830
37952
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37831
37953
|
return;
|
|
37832
37954
|
}
|
|
37833
37955
|
mediaPlayer.setFps(fps, currentTimeRef.current);
|
|
37834
37956
|
}, [fps, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37835
|
-
|
|
37957
|
+
useLayoutEffect19(() => {
|
|
37836
37958
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37837
37959
|
if (!mediaPlayer || !mediaPlayerReady) {
|
|
37838
37960
|
return;
|
|
37839
37961
|
}
|
|
37840
37962
|
mediaPlayer.setSequenceOffset(sequenceOffset, currentTimeRef.current);
|
|
37841
37963
|
}, [sequenceOffset, mediaPlayerReady, mediaPlayerRef, currentTimeRef]);
|
|
37842
|
-
|
|
37964
|
+
useLayoutEffect19(() => {
|
|
37843
37965
|
const mediaPlayer = mediaPlayerRef.current;
|
|
37844
37966
|
if (!mediaPlayer || !mediaPlayerReady)
|
|
37845
37967
|
return;
|
|
@@ -37953,7 +38075,7 @@ var AudioForPreviewAssertedShowing = ({
|
|
|
37953
38075
|
logLevel,
|
|
37954
38076
|
label: "AudioForPreview"
|
|
37955
38077
|
});
|
|
37956
|
-
|
|
38078
|
+
useEffect43(() => {
|
|
37957
38079
|
if (!sharedAudioContext)
|
|
37958
38080
|
return;
|
|
37959
38081
|
if (!sharedAudioContext.audioContext)
|
|
@@ -38143,7 +38265,7 @@ var AudioForPreview2 = ({
|
|
|
38143
38265
|
const frame = useCurrentFrame();
|
|
38144
38266
|
const videoConfig = useVideoConfig();
|
|
38145
38267
|
const currentTime = frame / videoConfig.fps;
|
|
38146
|
-
const showShow =
|
|
38268
|
+
const showShow = useMemo58(() => {
|
|
38147
38269
|
return getTimeInSeconds({
|
|
38148
38270
|
unloopedTimeInSeconds: currentTime,
|
|
38149
38271
|
playbackRate,
|
|
@@ -40449,6 +40571,8 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
40449
40571
|
const effectChainState = useEffectChainState2();
|
|
40450
40572
|
const effectsRef = useRef213(effects);
|
|
40451
40573
|
effectsRef.current = effects;
|
|
40574
|
+
const onErrorRef = useRef213(onError);
|
|
40575
|
+
onErrorRef.current = onError;
|
|
40452
40576
|
const effectChainStateRef = useRef213(effectChainState);
|
|
40453
40577
|
effectChainStateRef.current = effectChainState;
|
|
40454
40578
|
const parentSequence = useContext49(SequenceContext22);
|
|
@@ -40553,7 +40677,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
40553
40677
|
}
|
|
40554
40678
|
const handleError = (error2, fallbackMessage) => {
|
|
40555
40679
|
const [action, errorToUse] = callOnErrorAndResolve({
|
|
40556
|
-
onError,
|
|
40680
|
+
onError: onErrorRef.current,
|
|
40557
40681
|
error: error2,
|
|
40558
40682
|
disallowFallback: disallowFallbackToOffthreadVideo,
|
|
40559
40683
|
isClientSideRendering: false,
|
|
@@ -40588,7 +40712,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
40588
40712
|
}
|
|
40589
40713
|
}).catch((error2) => {
|
|
40590
40714
|
const [action, errorToUse] = callOnErrorAndResolve({
|
|
40591
|
-
onError,
|
|
40715
|
+
onError: onErrorRef.current,
|
|
40592
40716
|
error: error2,
|
|
40593
40717
|
disallowFallback: disallowFallbackToOffthreadVideo,
|
|
40594
40718
|
isClientSideRendering: false,
|
|
@@ -40603,7 +40727,7 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
40603
40727
|
} catch (error2) {
|
|
40604
40728
|
const [action, errorToUse] = callOnErrorAndResolve({
|
|
40605
40729
|
error: error2,
|
|
40606
|
-
onError,
|
|
40730
|
+
onError: onErrorRef.current,
|
|
40607
40731
|
disallowFallback: disallowFallbackToOffthreadVideo,
|
|
40608
40732
|
isClientSideRendering: false,
|
|
40609
40733
|
clientSideError: error2
|
|
@@ -40634,7 +40758,6 @@ var VideoForPreviewAssertedShowing = ({
|
|
|
40634
40758
|
preloadedSrc,
|
|
40635
40759
|
sharedAudioContext,
|
|
40636
40760
|
videoConfig.fps,
|
|
40637
|
-
onError,
|
|
40638
40761
|
credentials,
|
|
40639
40762
|
initialRequestInit,
|
|
40640
40763
|
setMediaDurationInSeconds
|
|
@@ -40792,7 +40915,7 @@ var VideoForRendering2 = ({
|
|
|
40792
40915
|
const { registerRenderAsset, unregisterRenderAsset } = useContext53(Internals.RenderAssetManager);
|
|
40793
40916
|
const startsAt = Internals.useMediaStartsAt();
|
|
40794
40917
|
const sequenceContext = useContext53(Internals.SequenceContext);
|
|
40795
|
-
const id =
|
|
40918
|
+
const id = useMemo57(() => `media-video-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
40796
40919
|
src,
|
|
40797
40920
|
sequenceContext?.cumulatedFrom,
|
|
40798
40921
|
sequenceContext?.relativeFrom,
|
|
@@ -41005,10 +41128,10 @@ var VideoForRendering2 = ({
|
|
|
41005
41128
|
initialRequestInit
|
|
41006
41129
|
]);
|
|
41007
41130
|
warnAboutObjectFitInStyleOrClassName({ style: style2, className: className2, logLevel });
|
|
41008
|
-
const classNameValue =
|
|
41131
|
+
const classNameValue = useMemo57(() => {
|
|
41009
41132
|
return [Internals.OBJECTFIT_CONTAIN_CLASS_NAME, className2].filter(Internals.truthy).join(" ");
|
|
41010
41133
|
}, [className2]);
|
|
41011
|
-
const styleWithObjectFit =
|
|
41134
|
+
const styleWithObjectFit = useMemo57(() => {
|
|
41012
41135
|
return {
|
|
41013
41136
|
...style2,
|
|
41014
41137
|
objectFit: objectFitProp
|
|
@@ -41362,13 +41485,13 @@ var Video = Interactive.withSchema({
|
|
|
41362
41485
|
Internals.addSequenceStackTraces(Video);
|
|
41363
41486
|
|
|
41364
41487
|
// src/components/homepage/Demo/Comp.tsx
|
|
41365
|
-
import { useCallback as useCallback47, useEffect as
|
|
41488
|
+
import { useCallback as useCallback47, useEffect as useEffect49, useMemo as useMemo61, useState as useState48 } from "react";
|
|
41366
41489
|
|
|
41367
41490
|
// src/components/homepage/Demo/Cards.tsx
|
|
41368
41491
|
import {
|
|
41369
41492
|
createRef as createRef4,
|
|
41370
41493
|
useCallback as useCallback46,
|
|
41371
|
-
useEffect as
|
|
41494
|
+
useEffect as useEffect48,
|
|
41372
41495
|
useRef as useRef56,
|
|
41373
41496
|
useState as useState47
|
|
41374
41497
|
} from "react";
|
|
@@ -41736,14 +41859,14 @@ var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
|
|
|
41736
41859
|
import {
|
|
41737
41860
|
forwardRef as forwardRef38,
|
|
41738
41861
|
useCallback as useCallback45,
|
|
41739
|
-
useEffect as
|
|
41862
|
+
useEffect as useEffect47,
|
|
41740
41863
|
useImperativeHandle as useImperativeHandle13,
|
|
41741
41864
|
useRef as useRef55
|
|
41742
41865
|
} from "react";
|
|
41743
41866
|
|
|
41744
41867
|
// ../lottie/dist/esm/index.mjs
|
|
41745
41868
|
import lottie from "lottie-web";
|
|
41746
|
-
import { useEffect as
|
|
41869
|
+
import { useEffect as useEffect45, useRef as useRef53, useState as useState44 } from "react";
|
|
41747
41870
|
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
41748
41871
|
var getLottieMetadata = (animationData) => {
|
|
41749
41872
|
const width2 = animationData.w;
|
|
@@ -41819,14 +41942,14 @@ var Lottie = ({
|
|
|
41819
41942
|
onAnimationLoadedRef.current = onAnimationLoaded;
|
|
41820
41943
|
const { delayRender: delayRender2, continueRender } = useDelayRender();
|
|
41821
41944
|
const [handle] = useState44(() => delayRender2("Waiting for Lottie animation to load"));
|
|
41822
|
-
|
|
41945
|
+
useEffect45(() => {
|
|
41823
41946
|
return () => {
|
|
41824
41947
|
continueRender(handle);
|
|
41825
41948
|
};
|
|
41826
41949
|
}, [handle, continueRender]);
|
|
41827
41950
|
const frame = useCurrentFrame();
|
|
41828
41951
|
currentFrameRef.current = frame;
|
|
41829
|
-
|
|
41952
|
+
useEffect45(() => {
|
|
41830
41953
|
if (!containerRef.current) {
|
|
41831
41954
|
return;
|
|
41832
41955
|
}
|
|
@@ -41871,17 +41994,17 @@ var Lottie = ({
|
|
|
41871
41994
|
renderer,
|
|
41872
41995
|
continueRender
|
|
41873
41996
|
]);
|
|
41874
|
-
|
|
41997
|
+
useEffect45(() => {
|
|
41875
41998
|
if (animationRef.current && direction) {
|
|
41876
41999
|
animationRef.current.setDirection(direction === "backward" ? -1 : 1);
|
|
41877
42000
|
}
|
|
41878
42001
|
}, [direction]);
|
|
41879
|
-
|
|
42002
|
+
useEffect45(() => {
|
|
41880
42003
|
if (animationRef.current && playbackRate) {
|
|
41881
42004
|
animationRef.current.setSpeed(playbackRate);
|
|
41882
42005
|
}
|
|
41883
42006
|
}, [playbackRate]);
|
|
41884
|
-
|
|
42007
|
+
useEffect45(() => {
|
|
41885
42008
|
if (!animationRef.current) {
|
|
41886
42009
|
return;
|
|
41887
42010
|
}
|
|
@@ -41914,14 +42037,14 @@ var Lottie = ({
|
|
|
41914
42037
|
};
|
|
41915
42038
|
|
|
41916
42039
|
// src/components/homepage/Demo/DisplayedEmoji.tsx
|
|
41917
|
-
import { useEffect as
|
|
42040
|
+
import { useEffect as useEffect46, useMemo as useMemo59, useState as useState46 } from "react";
|
|
41918
42041
|
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
41919
42042
|
var DisplayedEmoji = ({ emoji }) => {
|
|
41920
42043
|
const [data, setData] = useState46(null);
|
|
41921
42044
|
const { durationInFrames, fps } = useVideoConfig();
|
|
41922
42045
|
const [browser, setBrowser] = useState46(typeof document !== "undefined");
|
|
41923
42046
|
const { delayRender: delayRender2, continueRender, cancelRender: cancelRender2 } = useDelayRender();
|
|
41924
|
-
const src =
|
|
42047
|
+
const src = useMemo59(() => {
|
|
41925
42048
|
if (emoji === "melting") {
|
|
41926
42049
|
return "https://fonts.gstatic.com/s/e/notoemoji/latest/1fae0/lottie.json";
|
|
41927
42050
|
}
|
|
@@ -41934,7 +42057,7 @@ var DisplayedEmoji = ({ emoji }) => {
|
|
|
41934
42057
|
throw new Error("Unknown emoji");
|
|
41935
42058
|
}, [emoji]);
|
|
41936
42059
|
const [handle] = useState46(() => delayRender2("Loading emojis!"));
|
|
41937
|
-
|
|
42060
|
+
useEffect46(() => {
|
|
41938
42061
|
fetch(src).then((res) => res.json()).then((json) => {
|
|
41939
42062
|
setData({
|
|
41940
42063
|
duration: getLottieMetadata(json)?.durationInSeconds,
|
|
@@ -41945,7 +42068,7 @@ var DisplayedEmoji = ({ emoji }) => {
|
|
|
41945
42068
|
cancelRender2(err);
|
|
41946
42069
|
});
|
|
41947
42070
|
}, [handle, src, continueRender, cancelRender2]);
|
|
41948
|
-
|
|
42071
|
+
useEffect46(() => {
|
|
41949
42072
|
if (typeof document !== "undefined") {
|
|
41950
42073
|
setBrowser(true);
|
|
41951
42074
|
}
|
|
@@ -42041,7 +42164,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
42041
42164
|
transforms: transforms.current
|
|
42042
42165
|
});
|
|
42043
42166
|
}, []);
|
|
42044
|
-
|
|
42167
|
+
useEffect47(() => {
|
|
42045
42168
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
42046
42169
|
return;
|
|
42047
42170
|
}
|
|
@@ -42058,7 +42181,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
42058
42181
|
onRight
|
|
42059
42182
|
};
|
|
42060
42183
|
}, [onLeft, onRight]);
|
|
42061
|
-
|
|
42184
|
+
useEffect47(() => {
|
|
42062
42185
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
42063
42186
|
return;
|
|
42064
42187
|
}
|
|
@@ -42348,7 +42471,7 @@ var Temperature = ({ theme, city, temperatureInCelsius }) => {
|
|
|
42348
42471
|
};
|
|
42349
42472
|
|
|
42350
42473
|
// src/components/homepage/Demo/TrendingRepos.tsx
|
|
42351
|
-
import { useMemo as
|
|
42474
|
+
import { useMemo as useMemo60 } from "react";
|
|
42352
42475
|
import { jsx as jsx81, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
42353
42476
|
var TrendingRepoItem = ({ repo, theme, number }) => {
|
|
42354
42477
|
const frame = useCurrentFrame();
|
|
@@ -42361,7 +42484,7 @@ var TrendingRepoItem = ({ repo, theme, number }) => {
|
|
|
42361
42484
|
},
|
|
42362
42485
|
delay: number * 10 + 20
|
|
42363
42486
|
});
|
|
42364
|
-
const item =
|
|
42487
|
+
const item = useMemo60(() => {
|
|
42365
42488
|
return {
|
|
42366
42489
|
lineHeight: 1.1,
|
|
42367
42490
|
fontFamily: "GTPlanar",
|
|
@@ -42473,7 +42596,7 @@ var Cards = ({
|
|
|
42473
42596
|
const positions = useRef56(getInitialPositions());
|
|
42474
42597
|
const shouldBePositions = useRef56(getInitialPositions());
|
|
42475
42598
|
const { isRendering } = useRemotionEnvironment();
|
|
42476
|
-
|
|
42599
|
+
useEffect48(() => {
|
|
42477
42600
|
const { current } = container4;
|
|
42478
42601
|
if (!current) {
|
|
42479
42602
|
return;
|
|
@@ -42568,7 +42691,7 @@ var HomepageVideoComp = ({
|
|
|
42568
42691
|
setRerenders(rerenders + 1);
|
|
42569
42692
|
updateCardOrder(newIndices);
|
|
42570
42693
|
}, [rerenders, updateCardOrder]);
|
|
42571
|
-
const emoji =
|
|
42694
|
+
const emoji = useMemo61(() => {
|
|
42572
42695
|
if ((emojiIndex + 1e4 * 3) % 3 === 1) {
|
|
42573
42696
|
return "melting";
|
|
42574
42697
|
}
|
|
@@ -42577,7 +42700,7 @@ var HomepageVideoComp = ({
|
|
|
42577
42700
|
}
|
|
42578
42701
|
return "partying-face";
|
|
42579
42702
|
}, [emojiIndex]);
|
|
42580
|
-
const audioSrc =
|
|
42703
|
+
const audioSrc = useMemo61(() => {
|
|
42581
42704
|
if (emoji === "fire") {
|
|
42582
42705
|
return fireAudio;
|
|
42583
42706
|
}
|
|
@@ -42586,7 +42709,7 @@ var HomepageVideoComp = ({
|
|
|
42586
42709
|
}
|
|
42587
42710
|
return sadAudio;
|
|
42588
42711
|
}, [emoji]);
|
|
42589
|
-
|
|
42712
|
+
useEffect49(() => {
|
|
42590
42713
|
const a2 = prefetch(fireAudio);
|
|
42591
42714
|
const b2 = prefetch(partyHornAudio);
|
|
42592
42715
|
const c2 = prefetch(sadAudio);
|
|
@@ -42662,7 +42785,7 @@ import {
|
|
|
42662
42785
|
import { BufferTarget, StreamTarget } from "mediabunny";
|
|
42663
42786
|
|
|
42664
42787
|
// ../core/dist/esm/version.mjs
|
|
42665
|
-
var VERSION2 = "4.0.
|
|
42788
|
+
var VERSION2 = "4.0.486";
|
|
42666
42789
|
|
|
42667
42790
|
// ../web-renderer/dist/esm/index.mjs
|
|
42668
42791
|
import { AudioSample, VideoSample } from "mediabunny";
|
|
@@ -46157,12 +46280,12 @@ var getPrecomposeRectForMask = (element) => {
|
|
|
46157
46280
|
};
|
|
46158
46281
|
var handleMask = ({
|
|
46159
46282
|
gradientInfo,
|
|
46160
|
-
|
|
46283
|
+
maskRect,
|
|
46161
46284
|
precomposeRect,
|
|
46162
46285
|
tempContext,
|
|
46163
46286
|
scale
|
|
46164
46287
|
}) => {
|
|
46165
|
-
const rectToFill = new DOMRect((
|
|
46288
|
+
const rectToFill = new DOMRect((maskRect.left - precomposeRect.left) * scale, (maskRect.top - precomposeRect.top) * scale, maskRect.width * scale, maskRect.height * scale);
|
|
46166
46289
|
const gradient = createCanvasGradient({
|
|
46167
46290
|
ctx: tempContext,
|
|
46168
46291
|
rect: rectToFill,
|
|
@@ -46283,7 +46406,7 @@ var processNode = async ({
|
|
|
46283
46406
|
if (precompositing.needsMaskImage) {
|
|
46284
46407
|
handleMask({
|
|
46285
46408
|
gradientInfo: precompositing.needsMaskImage,
|
|
46286
|
-
|
|
46409
|
+
maskRect: dimensions,
|
|
46287
46410
|
precomposeRect,
|
|
46288
46411
|
tempContext,
|
|
46289
46412
|
scale
|
|
@@ -46405,14 +46528,17 @@ var currentColorValues = new Set(["currentcolor", "currentColor"]);
|
|
|
46405
46528
|
var getDefaultTextDecorationThickness = (fontSizePx) => {
|
|
46406
46529
|
return Math.max(1, Number.isFinite(fontSizePx) ? fontSizePx / 16 : 1);
|
|
46407
46530
|
};
|
|
46531
|
+
var getTextDecorationStyle = (style2) => {
|
|
46532
|
+
if (style2 === "double" || style2 === "dotted" || style2 === "dashed" || style2 === "wavy") {
|
|
46533
|
+
return style2;
|
|
46534
|
+
}
|
|
46535
|
+
return "solid";
|
|
46536
|
+
};
|
|
46408
46537
|
var parseTextDecoration = ({
|
|
46409
46538
|
onlyBackgroundClipText,
|
|
46410
46539
|
style: style2
|
|
46411
46540
|
}) => {
|
|
46412
|
-
const textDecorationStyle = style2.getPropertyValue("text-decoration-style");
|
|
46413
|
-
if (textDecorationStyle && textDecorationStyle !== "solid") {
|
|
46414
|
-
return null;
|
|
46415
|
-
}
|
|
46541
|
+
const textDecorationStyle = getTextDecorationStyle(style2.getPropertyValue("text-decoration-style").trim());
|
|
46416
46542
|
const textDecorationLine = style2.getPropertyValue("text-decoration-line");
|
|
46417
46543
|
const lineParts = textDecorationLine.split(/\s+/);
|
|
46418
46544
|
const lines2 = textDecorationLines.filter((line) => lineParts.includes(line));
|
|
@@ -46429,7 +46555,8 @@ var parseTextDecoration = ({
|
|
|
46429
46555
|
return {
|
|
46430
46556
|
lines: lines2,
|
|
46431
46557
|
color: onlyBackgroundClipText || !textDecorationColor || currentColorValues.has(textDecorationColor) ? onlyBackgroundClipText ? "black" : style2.color : textDecorationColor,
|
|
46432
|
-
thickness
|
|
46558
|
+
thickness,
|
|
46559
|
+
style: textDecorationStyle
|
|
46433
46560
|
};
|
|
46434
46561
|
};
|
|
46435
46562
|
var getTextDecorations = ({
|
|
@@ -46476,6 +46603,54 @@ var getTextDecorationY = ({
|
|
|
46476
46603
|
}
|
|
46477
46604
|
return y - actualAscent * 0.35;
|
|
46478
46605
|
};
|
|
46606
|
+
var getTextDecorationLineDashPattern = (style2, thickness) => {
|
|
46607
|
+
if (style2 === "dashed") {
|
|
46608
|
+
return [thickness * 2, thickness];
|
|
46609
|
+
}
|
|
46610
|
+
if (style2 === "dotted") {
|
|
46611
|
+
return [thickness, thickness];
|
|
46612
|
+
}
|
|
46613
|
+
return [];
|
|
46614
|
+
};
|
|
46615
|
+
var drawWavyTextDecorationLine = ({
|
|
46616
|
+
contextToDraw,
|
|
46617
|
+
endX,
|
|
46618
|
+
lineY,
|
|
46619
|
+
startX,
|
|
46620
|
+
thickness
|
|
46621
|
+
}) => {
|
|
46622
|
+
const step = Math.max(2, thickness);
|
|
46623
|
+
const amplitude = step;
|
|
46624
|
+
const halfWavelength = step * 2;
|
|
46625
|
+
const wavelength = halfWavelength * 2;
|
|
46626
|
+
const phaseStartX = Math.floor(startX / wavelength) * wavelength;
|
|
46627
|
+
contextToDraw.save();
|
|
46628
|
+
contextToDraw.beginPath();
|
|
46629
|
+
contextToDraw.rect(startX, lineY - amplitude - thickness, endX - startX, (amplitude + thickness) * 2);
|
|
46630
|
+
contextToDraw.clip();
|
|
46631
|
+
contextToDraw.beginPath();
|
|
46632
|
+
contextToDraw.moveTo(phaseStartX, lineY);
|
|
46633
|
+
let x = phaseStartX;
|
|
46634
|
+
let direction = 1;
|
|
46635
|
+
while (x < endX) {
|
|
46636
|
+
contextToDraw.quadraticCurveTo(x + halfWavelength / 2, lineY + direction * amplitude * 2, x + halfWavelength, lineY);
|
|
46637
|
+
x += halfWavelength;
|
|
46638
|
+
direction = -direction;
|
|
46639
|
+
}
|
|
46640
|
+
contextToDraw.stroke();
|
|
46641
|
+
contextToDraw.restore();
|
|
46642
|
+
};
|
|
46643
|
+
var strokeTextDecorationLine = ({
|
|
46644
|
+
contextToDraw,
|
|
46645
|
+
endX,
|
|
46646
|
+
lineY,
|
|
46647
|
+
startX
|
|
46648
|
+
}) => {
|
|
46649
|
+
contextToDraw.beginPath();
|
|
46650
|
+
contextToDraw.moveTo(startX, lineY);
|
|
46651
|
+
contextToDraw.lineTo(endX, lineY);
|
|
46652
|
+
contextToDraw.stroke();
|
|
46653
|
+
};
|
|
46479
46654
|
var drawTextDecoration = ({
|
|
46480
46655
|
contextToDraw,
|
|
46481
46656
|
fontSizePx,
|
|
@@ -46506,10 +46681,42 @@ var drawTextDecoration = ({
|
|
|
46506
46681
|
thickness: textDecoration.thickness,
|
|
46507
46682
|
fontSizePx
|
|
46508
46683
|
});
|
|
46509
|
-
|
|
46510
|
-
|
|
46511
|
-
|
|
46512
|
-
|
|
46684
|
+
if (textDecoration.style === "wavy") {
|
|
46685
|
+
contextToDraw.setLineDash([]);
|
|
46686
|
+
drawWavyTextDecorationLine({
|
|
46687
|
+
contextToDraw,
|
|
46688
|
+
endX,
|
|
46689
|
+
lineY,
|
|
46690
|
+
startX,
|
|
46691
|
+
thickness: textDecoration.thickness
|
|
46692
|
+
});
|
|
46693
|
+
continue;
|
|
46694
|
+
}
|
|
46695
|
+
if (textDecoration.style === "double") {
|
|
46696
|
+
contextToDraw.setLineDash([]);
|
|
46697
|
+
strokeTextDecorationLine({
|
|
46698
|
+
contextToDraw,
|
|
46699
|
+
endX,
|
|
46700
|
+
lineY: lineY - textDecoration.thickness,
|
|
46701
|
+
startX
|
|
46702
|
+
});
|
|
46703
|
+
strokeTextDecorationLine({
|
|
46704
|
+
contextToDraw,
|
|
46705
|
+
endX,
|
|
46706
|
+
lineY: lineY + textDecoration.thickness,
|
|
46707
|
+
startX
|
|
46708
|
+
});
|
|
46709
|
+
contextToDraw.setLineDash([]);
|
|
46710
|
+
continue;
|
|
46711
|
+
}
|
|
46712
|
+
contextToDraw.setLineDash(getTextDecorationLineDashPattern(textDecoration.style, textDecoration.thickness));
|
|
46713
|
+
strokeTextDecorationLine({
|
|
46714
|
+
contextToDraw,
|
|
46715
|
+
endX,
|
|
46716
|
+
lineY,
|
|
46717
|
+
startX
|
|
46718
|
+
});
|
|
46719
|
+
contextToDraw.setLineDash([]);
|
|
46513
46720
|
}
|
|
46514
46721
|
}
|
|
46515
46722
|
contextToDraw.restore();
|
|
@@ -47431,7 +47638,7 @@ var renderMediaOnWeb = (options2) => {
|
|
|
47431
47638
|
};
|
|
47432
47639
|
|
|
47433
47640
|
// src/components/homepage/Demo/DemoRender.tsx
|
|
47434
|
-
import
|
|
47641
|
+
import React70, { useCallback as useCallback48 } from "react";
|
|
47435
47642
|
import { z } from "zod";
|
|
47436
47643
|
|
|
47437
47644
|
// src/components/homepage/Demo/DemoErrorIcon.tsx
|
|
@@ -47537,7 +47744,7 @@ var Progress = ({ progress }) => {
|
|
|
47537
47744
|
};
|
|
47538
47745
|
|
|
47539
47746
|
// src/components/homepage/Demo/Spinner.tsx
|
|
47540
|
-
import { useMemo as
|
|
47747
|
+
import { useMemo as useMemo64 } from "react";
|
|
47541
47748
|
import { jsx as jsx97, jsxs as jsxs30, Fragment as Fragment15 } from "react/jsx-runtime";
|
|
47542
47749
|
var viewBox2 = 100;
|
|
47543
47750
|
var lines2 = 8;
|
|
@@ -47545,7 +47752,7 @@ var className2 = "__remotion_spinner_line";
|
|
|
47545
47752
|
var remotionSpinnerAnimation = "__remotion_spinner_animation";
|
|
47546
47753
|
var translated3 = "M 44 0 L 50 0 a 6 6 0 0 1 6 6 L 56 26 a 6 6 0 0 1 -6 6 L 50 32 a 6 6 0 0 1 -6 -6 L 44 6 a 6 6 0 0 1 6 -6 Z";
|
|
47547
47754
|
var Spinner2 = ({ size: size4, duration }) => {
|
|
47548
|
-
const style2 =
|
|
47755
|
+
const style2 = useMemo64(() => {
|
|
47549
47756
|
return {
|
|
47550
47757
|
width: size4,
|
|
47551
47758
|
height: size4
|
|
@@ -47629,7 +47836,7 @@ var style2 = {
|
|
|
47629
47836
|
justifyContent: "center"
|
|
47630
47837
|
};
|
|
47631
47838
|
var RenderButton = ({ renderData, onError, playerRef }) => {
|
|
47632
|
-
const [state, setState] =
|
|
47839
|
+
const [state, setState] = React70.useState({
|
|
47633
47840
|
type: "idle"
|
|
47634
47841
|
});
|
|
47635
47842
|
const triggerRender = useCallback48(async () => {
|
|
@@ -47807,13 +48014,13 @@ var DragAndDropNudge = () => {
|
|
|
47807
48014
|
};
|
|
47808
48015
|
|
|
47809
48016
|
// src/components/homepage/Demo/PlayerSeekBar.tsx
|
|
47810
|
-
import { useCallback as useCallback50, useEffect as
|
|
48017
|
+
import { useCallback as useCallback50, useEffect as useEffect51, useMemo as useMemo67, useRef as useRef57, useState as useState51 } from "react";
|
|
47811
48018
|
|
|
47812
48019
|
// src/components/homepage/layout/use-el-size.ts
|
|
47813
|
-
import { useCallback as useCallback49, useEffect as
|
|
48020
|
+
import { useCallback as useCallback49, useEffect as useEffect50, useMemo as useMemo66, useState as useState50 } from "react";
|
|
47814
48021
|
var useElementSize2 = (ref) => {
|
|
47815
48022
|
const [size4, setSize] = useState50(null);
|
|
47816
|
-
const observer =
|
|
48023
|
+
const observer = useMemo66(() => {
|
|
47817
48024
|
if (typeof ResizeObserver === "undefined") {
|
|
47818
48025
|
return;
|
|
47819
48026
|
}
|
|
@@ -47834,7 +48041,7 @@ var useElementSize2 = (ref) => {
|
|
|
47834
48041
|
height: rect[0].height
|
|
47835
48042
|
});
|
|
47836
48043
|
}, [ref]);
|
|
47837
|
-
|
|
48044
|
+
useEffect50(() => {
|
|
47838
48045
|
updateSize();
|
|
47839
48046
|
if (!observer) {
|
|
47840
48047
|
return;
|
|
@@ -47890,7 +48097,7 @@ var findBodyInWhichDivIsLocated2 = (div) => {
|
|
|
47890
48097
|
};
|
|
47891
48098
|
var useHoverState2 = (ref, hideControlsWhenPointerDoesntMove) => {
|
|
47892
48099
|
const [hovered, setHovered] = useState51(false);
|
|
47893
|
-
|
|
48100
|
+
useEffect51(() => {
|
|
47894
48101
|
const { current } = ref;
|
|
47895
48102
|
if (!current) {
|
|
47896
48103
|
return;
|
|
@@ -47941,7 +48148,7 @@ var PlayerSeekBar2 = ({
|
|
|
47941
48148
|
const size4 = useElementSize2(containerRef.current);
|
|
47942
48149
|
const [playing, setPlaying] = useState51(false);
|
|
47943
48150
|
const [frame, setFrame] = useState51(0);
|
|
47944
|
-
|
|
48151
|
+
useEffect51(() => {
|
|
47945
48152
|
const { current } = playerRef;
|
|
47946
48153
|
if (!current) {
|
|
47947
48154
|
return;
|
|
@@ -47954,7 +48161,7 @@ var PlayerSeekBar2 = ({
|
|
|
47954
48161
|
current.removeEventListener("frameupdate", onFrameUpdate);
|
|
47955
48162
|
};
|
|
47956
48163
|
}, [playerRef]);
|
|
47957
|
-
|
|
48164
|
+
useEffect51(() => {
|
|
47958
48165
|
const { current } = playerRef;
|
|
47959
48166
|
if (!current) {
|
|
47960
48167
|
return;
|
|
@@ -48015,7 +48222,7 @@ var PlayerSeekBar2 = ({
|
|
|
48015
48222
|
}
|
|
48016
48223
|
onSeekEnd();
|
|
48017
48224
|
}, [dragging, onSeekEnd, playerRef]);
|
|
48018
|
-
|
|
48225
|
+
useEffect51(() => {
|
|
48019
48226
|
if (!dragging.dragging) {
|
|
48020
48227
|
return;
|
|
48021
48228
|
}
|
|
@@ -48027,7 +48234,7 @@ var PlayerSeekBar2 = ({
|
|
|
48027
48234
|
body.removeEventListener("pointerup", onPointerUp);
|
|
48028
48235
|
};
|
|
48029
48236
|
}, [dragging.dragging, onPointerMove, onPointerUp]);
|
|
48030
|
-
const knobStyle =
|
|
48237
|
+
const knobStyle = useMemo67(() => {
|
|
48031
48238
|
return {
|
|
48032
48239
|
height: KNOB_SIZE3,
|
|
48033
48240
|
width: KNOB_SIZE3,
|
|
@@ -48041,7 +48248,7 @@ var PlayerSeekBar2 = ({
|
|
|
48041
48248
|
transition: "opacity 0.s ease"
|
|
48042
48249
|
};
|
|
48043
48250
|
}, [barHovered, durationInFrames, frame, width2]);
|
|
48044
|
-
const fillStyle =
|
|
48251
|
+
const fillStyle = useMemo67(() => {
|
|
48045
48252
|
return {
|
|
48046
48253
|
height: BAR_HEIGHT3,
|
|
48047
48254
|
backgroundColor: "var(--ifm-font-color-base)",
|
|
@@ -48050,7 +48257,7 @@ var PlayerSeekBar2 = ({
|
|
|
48050
48257
|
borderRadius: BAR_HEIGHT3 / 2
|
|
48051
48258
|
};
|
|
48052
48259
|
}, [durationInFrames, frame, inFrame]);
|
|
48053
|
-
const active =
|
|
48260
|
+
const active = useMemo67(() => {
|
|
48054
48261
|
return {
|
|
48055
48262
|
height: BAR_HEIGHT3,
|
|
48056
48263
|
backgroundColor: "var(--ifm-font-color-base)",
|
|
@@ -48085,7 +48292,7 @@ var PlayerSeekBar2 = ({
|
|
|
48085
48292
|
};
|
|
48086
48293
|
|
|
48087
48294
|
// src/components/homepage/Demo/PlayerVolume.tsx
|
|
48088
|
-
import { useCallback as useCallback51, useEffect as
|
|
48295
|
+
import { useCallback as useCallback51, useEffect as useEffect53, useRef as useRef58, useState as useState54 } from "react";
|
|
48089
48296
|
|
|
48090
48297
|
// src/components/homepage/Demo/icons.tsx
|
|
48091
48298
|
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
@@ -48146,7 +48353,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
48146
48353
|
const [muted, setIsMuted] = useState54(() => playerRef.current?.isMuted() ?? true);
|
|
48147
48354
|
const [isHovered, setIsHovered] = useState54(false);
|
|
48148
48355
|
const timerRef = useRef58(null);
|
|
48149
|
-
|
|
48356
|
+
useEffect53(() => {
|
|
48150
48357
|
const { current } = playerRef;
|
|
48151
48358
|
if (!current) {
|
|
48152
48359
|
return;
|
|
@@ -48159,7 +48366,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
48159
48366
|
current.removeEventListener("mutechange", onMutedChange);
|
|
48160
48367
|
};
|
|
48161
48368
|
}, [playerRef]);
|
|
48162
|
-
|
|
48369
|
+
useEffect53(() => {
|
|
48163
48370
|
if (isHovered) {
|
|
48164
48371
|
document.body.style.userSelect = "none";
|
|
48165
48372
|
} else {
|
|
@@ -48204,7 +48411,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
48204
48411
|
};
|
|
48205
48412
|
|
|
48206
48413
|
// src/components/homepage/Demo/PlayPauseButton.tsx
|
|
48207
|
-
import
|
|
48414
|
+
import React75, { useCallback as useCallback53, useEffect as useEffect55 } from "react";
|
|
48208
48415
|
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
48209
48416
|
var playerButtonStyle2 = {
|
|
48210
48417
|
appearance: "none",
|
|
@@ -48221,8 +48428,8 @@ var playerButtonStyle2 = {
|
|
|
48221
48428
|
color: PALETTE.TEXT_COLOR
|
|
48222
48429
|
};
|
|
48223
48430
|
var PlayPauseButton = ({ playerRef }) => {
|
|
48224
|
-
const [playing, setPlaying] =
|
|
48225
|
-
|
|
48431
|
+
const [playing, setPlaying] = React75.useState(true);
|
|
48432
|
+
useEffect55(() => {
|
|
48226
48433
|
const { current } = playerRef;
|
|
48227
48434
|
if (!current) {
|
|
48228
48435
|
return;
|
|
@@ -48259,7 +48466,7 @@ var PlayPauseButton = ({ playerRef }) => {
|
|
|
48259
48466
|
};
|
|
48260
48467
|
|
|
48261
48468
|
// src/components/homepage/Demo/TimeDisplay.tsx
|
|
48262
|
-
import
|
|
48469
|
+
import React76, { useEffect as useEffect56 } from "react";
|
|
48263
48470
|
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
48264
48471
|
var formatTime2 = (timeInSeconds) => {
|
|
48265
48472
|
const minutes = Math.floor(timeInSeconds / 60);
|
|
@@ -48267,8 +48474,8 @@ var formatTime2 = (timeInSeconds) => {
|
|
|
48267
48474
|
return `${String(minutes)}:${String(seconds).padStart(2, "0")}`;
|
|
48268
48475
|
};
|
|
48269
48476
|
var TimeDisplay = ({ fps, playerRef }) => {
|
|
48270
|
-
const [time, setTime] =
|
|
48271
|
-
|
|
48477
|
+
const [time, setTime] = React76.useState(0);
|
|
48478
|
+
useEffect56(() => {
|
|
48272
48479
|
const { current } = playerRef;
|
|
48273
48480
|
if (!current) {
|
|
48274
48481
|
return;
|
|
@@ -48346,7 +48553,7 @@ var PlayerControls = ({ playerRef, durationInFrames, fps, children }) => {
|
|
|
48346
48553
|
};
|
|
48347
48554
|
|
|
48348
48555
|
// src/components/homepage/Demo/ThemeNudge.tsx
|
|
48349
|
-
import
|
|
48556
|
+
import React77 from "react";
|
|
48350
48557
|
import { jsx as jsx111, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
48351
48558
|
var origWidth3 = 37;
|
|
48352
48559
|
var scale3 = 0.4;
|
|
@@ -48369,7 +48576,7 @@ var Icon6 = () => {
|
|
|
48369
48576
|
};
|
|
48370
48577
|
var ThemeNudge = () => {
|
|
48371
48578
|
const { colorMode, setColorMode } = useColorMode();
|
|
48372
|
-
const toggleTheme =
|
|
48579
|
+
const toggleTheme = React77.useCallback((e) => {
|
|
48373
48580
|
e.preventDefault();
|
|
48374
48581
|
setColorMode(colorMode === "dark" ? "light" : "dark");
|
|
48375
48582
|
}, [colorMode, setColorMode]);
|
|
@@ -48440,7 +48647,7 @@ var Demo = () => {
|
|
|
48440
48647
|
const [cardOrder, setCardOrder] = useState56([0, 1, 2, 3]);
|
|
48441
48648
|
const [emojiIndex, setEmojiIndex] = useState56(0);
|
|
48442
48649
|
const [error2, setError] = useState56(false);
|
|
48443
|
-
|
|
48650
|
+
useEffect57(() => {
|
|
48444
48651
|
getDataAndProps().then((d2) => {
|
|
48445
48652
|
setData(d2);
|
|
48446
48653
|
}).catch((err) => {
|
|
@@ -48448,7 +48655,7 @@ var Demo = () => {
|
|
|
48448
48655
|
setError(true);
|
|
48449
48656
|
});
|
|
48450
48657
|
}, []);
|
|
48451
|
-
|
|
48658
|
+
useEffect57(() => {
|
|
48452
48659
|
const { current: playerRef } = ref;
|
|
48453
48660
|
if (!playerRef || !data2) {
|
|
48454
48661
|
return;
|
|
@@ -48464,7 +48671,7 @@ var Demo = () => {
|
|
|
48464
48671
|
const updateCardOrder = useCallback55((newCardOrder) => {
|
|
48465
48672
|
setCardOrder(newCardOrder);
|
|
48466
48673
|
}, []);
|
|
48467
|
-
const props =
|
|
48674
|
+
const props = useMemo68(() => {
|
|
48468
48675
|
return {
|
|
48469
48676
|
theme: colorMode,
|
|
48470
48677
|
onToggle: () => {
|
|
@@ -48551,7 +48758,7 @@ var Demo = () => {
|
|
|
48551
48758
|
};
|
|
48552
48759
|
|
|
48553
48760
|
// src/components/homepage/EvaluateRemotion.tsx
|
|
48554
|
-
import { useEffect as
|
|
48761
|
+
import { useEffect as useEffect58, useState as useState57 } from "react";
|
|
48555
48762
|
|
|
48556
48763
|
// src/components/homepage/layout/Button.tsx
|
|
48557
48764
|
import { jsx as jsx117 } from "react/jsx-runtime";
|
|
@@ -48596,7 +48803,7 @@ var BlueButton = (props) => {
|
|
|
48596
48803
|
import { jsx as jsx118, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
48597
48804
|
var EvaluateRemotionSection = () => {
|
|
48598
48805
|
const [dailyAvatars, setDailyAvatars] = useState57([]);
|
|
48599
|
-
|
|
48806
|
+
useEffect58(() => {
|
|
48600
48807
|
const avatars = experts.map((expert) => expert.image);
|
|
48601
48808
|
const selectedAvatars = [];
|
|
48602
48809
|
for (let i = 0;i < 3; i++) {
|
|
@@ -48693,7 +48900,7 @@ var EvaluateRemotionSection = () => {
|
|
|
48693
48900
|
var EvaluateRemotion_default = EvaluateRemotionSection;
|
|
48694
48901
|
|
|
48695
48902
|
// src/components/homepage/IfYouKnowReact.tsx
|
|
48696
|
-
import { useEffect as
|
|
48903
|
+
import { useEffect as useEffect59, useState as useState58 } from "react";
|
|
48697
48904
|
import { jsx as jsx119, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
48698
48905
|
var isWebkit = () => {
|
|
48699
48906
|
if (typeof window === "undefined") {
|
|
@@ -48709,7 +48916,7 @@ var icon3 = {
|
|
|
48709
48916
|
};
|
|
48710
48917
|
var IfYouKnowReact = () => {
|
|
48711
48918
|
const [vid, setVid] = useState58("/img/compose.webm");
|
|
48712
|
-
|
|
48919
|
+
useEffect59(() => {
|
|
48713
48920
|
if (isWebkit()) {
|
|
48714
48921
|
setVid("/img/compose.mp4");
|
|
48715
48922
|
}
|
|
@@ -48856,7 +49063,7 @@ var NewsletterButton = () => {
|
|
|
48856
49063
|
};
|
|
48857
49064
|
|
|
48858
49065
|
// src/components/homepage/ParameterizeAndEdit.tsx
|
|
48859
|
-
import { useEffect as
|
|
49066
|
+
import { useEffect as useEffect60, useRef as useRef60, useState as useState60 } from "react";
|
|
48860
49067
|
import { jsx as jsx121, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
48861
49068
|
var icon4 = {
|
|
48862
49069
|
height: 16,
|
|
@@ -48865,7 +49072,7 @@ var icon4 = {
|
|
|
48865
49072
|
var ParameterizeAndEdit = () => {
|
|
48866
49073
|
const ref = useRef60(null);
|
|
48867
49074
|
const [vid, setVid] = useState60("/img/editing-vp9-chrome.webm");
|
|
48868
|
-
|
|
49075
|
+
useEffect60(() => {
|
|
48869
49076
|
if (isWebkit()) {
|
|
48870
49077
|
setVid("/img/editing-safari.mp4");
|
|
48871
49078
|
}
|
|
@@ -48979,7 +49186,7 @@ var ParameterizeAndEdit = () => {
|
|
|
48979
49186
|
};
|
|
48980
49187
|
|
|
48981
49188
|
// src/components/homepage/RealMp4Videos.tsx
|
|
48982
|
-
import { useEffect as
|
|
49189
|
+
import { useEffect as useEffect61, useRef as useRef61, useState as useState61 } from "react";
|
|
48983
49190
|
import { jsx as jsx125, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
48984
49191
|
var icon5 = {
|
|
48985
49192
|
height: 16,
|
|
@@ -48989,12 +49196,12 @@ var RealMP4Videos = () => {
|
|
|
48989
49196
|
const ref = useRef61(null);
|
|
48990
49197
|
const videoRef = useRef61(null);
|
|
48991
49198
|
const [vid, setVid] = useState61("/img/render-progress.webm");
|
|
48992
|
-
|
|
49199
|
+
useEffect61(() => {
|
|
48993
49200
|
if (isWebkit()) {
|
|
48994
49201
|
setVid("/img/render-progress.mp4");
|
|
48995
49202
|
}
|
|
48996
49203
|
}, []);
|
|
48997
|
-
|
|
49204
|
+
useEffect61(() => {
|
|
48998
49205
|
const { current } = ref;
|
|
48999
49206
|
if (!current) {
|
|
49000
49207
|
return;
|
|
@@ -49244,16 +49451,16 @@ import { useRef as useRef66, useState as useState66 } from "react";
|
|
|
49244
49451
|
|
|
49245
49452
|
// src/components/homepage/MuxVideo.tsx
|
|
49246
49453
|
import Hls2 from "hls.js";
|
|
49247
|
-
import { forwardRef as forwardRef41, useEffect as
|
|
49454
|
+
import { forwardRef as forwardRef41, useEffect as useEffect65, useImperativeHandle as useImperativeHandle15, useRef as useRef65 } from "react";
|
|
49248
49455
|
|
|
49249
49456
|
// src/components/homepage/VideoPlayerWithControls.tsx
|
|
49250
49457
|
import Hls from "hls.js";
|
|
49251
49458
|
import"plyr/dist/plyr.css";
|
|
49252
|
-
import { forwardRef as forwardRef40, useCallback as useCallback57, useEffect as
|
|
49459
|
+
import { forwardRef as forwardRef40, useCallback as useCallback57, useEffect as useEffect63, useRef as useRef63, useState as useState64 } from "react";
|
|
49253
49460
|
import { jsx as jsx128 } from "react/jsx-runtime";
|
|
49254
49461
|
var useCombinedRefs = function(...refs) {
|
|
49255
49462
|
const targetRef = useRef63(null);
|
|
49256
|
-
|
|
49463
|
+
useEffect63(() => {
|
|
49257
49464
|
refs.forEach((ref) => {
|
|
49258
49465
|
if (!ref)
|
|
49259
49466
|
return;
|
|
@@ -49282,12 +49489,12 @@ var VideoPlayerWithControls = forwardRef40(({ playbackId, poster, currentTime, o
|
|
|
49282
49489
|
console.error("Error getting img dimensions", event);
|
|
49283
49490
|
}
|
|
49284
49491
|
}, [onLoaded, onSize]);
|
|
49285
|
-
|
|
49492
|
+
useEffect63(() => {
|
|
49286
49493
|
const img = new Image;
|
|
49287
49494
|
img.onload = (evt) => onImageLoad(evt);
|
|
49288
49495
|
img.src = poster;
|
|
49289
49496
|
}, [onImageLoad, poster]);
|
|
49290
|
-
|
|
49497
|
+
useEffect63(() => {
|
|
49291
49498
|
const video = videoRef.current;
|
|
49292
49499
|
const src = `https://stream.mux.com/${playbackId}.m3u8`;
|
|
49293
49500
|
let hls;
|
|
@@ -49330,7 +49537,7 @@ var VideoPlayerWithControls = forwardRef40(({ playbackId, poster, currentTime, o
|
|
|
49330
49537
|
}
|
|
49331
49538
|
};
|
|
49332
49539
|
}, [playbackId, playerInitTime, videoError, videoRef]);
|
|
49333
|
-
|
|
49540
|
+
useEffect63(() => {
|
|
49334
49541
|
const video = videoRef.current;
|
|
49335
49542
|
if (currentTime && video) {
|
|
49336
49543
|
video.currentTime = currentTime;
|
|
@@ -49357,7 +49564,7 @@ var MuxVideoForward = ({ muxId, ...props }, ref) => {
|
|
|
49357
49564
|
const videoRef = useRef65(null);
|
|
49358
49565
|
const vidUrl = getVideoToPlayUrl(muxId);
|
|
49359
49566
|
useImperativeHandle15(ref, () => videoRef.current, []);
|
|
49360
|
-
|
|
49567
|
+
useEffect65(() => {
|
|
49361
49568
|
let hls;
|
|
49362
49569
|
if (videoRef.current) {
|
|
49363
49570
|
const { current } = videoRef;
|
|
@@ -50988,7 +51195,7 @@ var GithubButton = () => {
|
|
|
50988
51195
|
" ",
|
|
50989
51196
|
/* @__PURE__ */ jsx167("div", {
|
|
50990
51197
|
className: "text-xs inline-block ml-2 leading-none mt-[3px] self-center",
|
|
50991
|
-
children: "
|
|
51198
|
+
children: "52k"
|
|
50992
51199
|
})
|
|
50993
51200
|
]
|
|
50994
51201
|
});
|