@nodaro/shared 3.21.0 → 3.24.0
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/index.cjs +2291 -195
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1929 -75
- package/dist/index.d.ts +1929 -75
- package/dist/index.js +2123 -196
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/add-captions-plan.test.ts +33 -0
- package/src/__tests__/caption-plan-parse.test.ts +23 -0
- package/src/__tests__/caption-segment-schema.test.ts +30 -0
- package/src/__tests__/collections.test.ts +253 -0
- package/src/__tests__/dialogue-capabilities.test.ts +157 -0
- package/src/__tests__/edit-plan-review.test.ts +70 -0
- package/src/__tests__/edl-clocks.test.ts +97 -0
- package/src/__tests__/edl.test.ts +34 -0
- package/src/__tests__/execution-outcome.test.ts +44 -0
- package/src/__tests__/fan-out-meta.test.ts +23 -0
- package/src/__tests__/fan-out-rows.test.ts +36 -0
- package/src/__tests__/fan-out-url-item.test.ts +44 -0
- package/src/__tests__/fixtures/speaker-tracks.fixtures.json +622 -0
- package/src/__tests__/input-field-extra-keys.test.ts +34 -0
- package/src/__tests__/list-consumers-fan-in.test.ts +40 -0
- package/src/__tests__/model-tree.test.ts +7 -0
- package/src/__tests__/node-pass-through.test.ts +23 -0
- package/src/__tests__/node-runtime-keys.test.ts +1 -0
- package/src/__tests__/picker-restrictions.test.ts +36 -0
- package/src/__tests__/preview-gate.test.ts +305 -0
- package/src/__tests__/render-basis.test.ts +176 -0
- package/src/__tests__/render-nodes.test.ts +73 -0
- package/src/__tests__/render-output.test.ts +392 -0
- package/src/__tests__/run-continuation.test.ts +32 -0
- package/src/__tests__/speaker-tracks.test.ts +474 -0
- package/src/__tests__/speech-pricing.test.ts +69 -0
- package/src/__tests__/telegram-channel.test.ts +91 -0
- package/src/__tests__/tts-capabilities.test.ts +81 -4
- package/src/__tests__/tts-neighbour-text.test.ts +19 -0
- package/src/__tests__/ugc-call-body.test.ts +38 -0
- package/src/__tests__/ugc-run-state.test.ts +68 -0
- package/src/__tests__/video-character-refs.test.ts +213 -0
- package/src/__tests__/video-overlay-layer-plan.test.ts +94 -0
- package/src/add-captions-plan.ts +50 -0
- package/src/caption-plan.ts +45 -0
- package/src/caption-segment-schema.ts +82 -0
- package/src/collections.ts +482 -0
- package/src/competitors.ts +77 -0
- package/src/credit-estimators/index.ts +9 -0
- package/src/credit-estimators/speech.ts +51 -0
- package/src/dialogue-capabilities.ts +48 -0
- package/src/edit-plan-contract.ts +20 -9
- package/src/edit-plan-review.ts +40 -1
- package/src/edl.ts +27 -1
- package/src/execution-outcome.ts +41 -0
- package/src/fan-out-meta.ts +23 -0
- package/src/fan-out-rows.ts +74 -5
- package/src/gemini-omni-voices.ts +59 -0
- package/src/handle-aliases.ts +298 -0
- package/src/i18n/camera-motions.pt-BR.ts +14 -14
- package/src/i18n/transitions.pt-BR.ts +13 -13
- package/src/index.ts +180 -1
- package/src/model-catalog.ts +122 -13
- package/src/model-constants.ts +24 -4
- package/src/model-tree.ts +5 -1
- package/src/node-execution-state.ts +13 -0
- package/src/node-mappable-fields.ts +7 -1
- package/src/node-pass-through.ts +37 -0
- package/src/node-runtime-keys.ts +14 -0
- package/src/picker-restrictions.ts +49 -0
- package/src/presentation-types.ts +26 -2
- package/src/presentation-utils.ts +25 -7
- package/src/preview-gate.ts +279 -0
- package/src/producer-types.ts +58 -0
- package/src/render-final.ts +20 -0
- package/src/render-nodes.ts +92 -0
- package/src/render-output.ts +565 -0
- package/src/run-continuation.ts +39 -0
- package/src/speaker-tracks.ts +638 -0
- package/src/telegram-channel.ts +140 -0
- package/src/transcribe-preflight.ts +8 -4
- package/src/tts-capabilities.ts +19 -5
- package/src/tts-neighbour-text.ts +46 -0
- package/src/ugc-call-body.ts +86 -0
- package/src/ugc-run-state.ts +64 -0
- package/src/video-character-refs.ts +233 -0
- package/src/video-overlay.ts +78 -21
package/dist/index.js
CHANGED
|
@@ -51,6 +51,7 @@ function isAutoVideoDuration(duration) {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
// src/model-catalog.ts
|
|
54
|
+
var SPEECH_UNIT_PRICE_NOTE = "per started 100 characters, at least 8 units \u2014 where length pricing is on";
|
|
54
55
|
var MODEL_RECOMMENDATIONS = [
|
|
55
56
|
// image
|
|
56
57
|
{ intent: "best for typography / logos / text-heavy", modelIds: ["nano-banana-pro", "gpt-image-2"], note: "Nano Banana Pro for diagrams / complex text; GPT Image 2 for logos and short copy." },
|
|
@@ -2286,6 +2287,7 @@ var TTS_LANGS_V3 = [
|
|
|
2286
2287
|
"sw"
|
|
2287
2288
|
];
|
|
2288
2289
|
var TTS_LEVERS_V2 = ["stability", "similarity", "style", "speed", "speakerBoost"];
|
|
2290
|
+
var DIALOGUE_V4_MAX_CHARS = 5e3;
|
|
2289
2291
|
var AUDIO_MODELS = {
|
|
2290
2292
|
// ── ElevenLabs TTS ──
|
|
2291
2293
|
"elevenlabs-v3": {
|
|
@@ -2298,12 +2300,19 @@ var AUDIO_MODELS = {
|
|
|
2298
2300
|
description: "Expressive ElevenLabs TTS \u2014 supports [audio tags] for emotion / pacing. Direct API.",
|
|
2299
2301
|
useCases: ["tts", "voice-over", "narration", "expressive"],
|
|
2300
2302
|
features: ["audio-tags", "voice-cloning"],
|
|
2301
|
-
pricing: [
|
|
2303
|
+
pricing: [
|
|
2304
|
+
{ identifier: "elevenlabs-v3", credits: 30 },
|
|
2305
|
+
{ identifier: "elevenlabs-v3:per-100-chars", credits: 4, note: SPEECH_UNIT_PRICE_NOTE }
|
|
2306
|
+
],
|
|
2302
2307
|
tts: {
|
|
2303
2308
|
audioTags: true,
|
|
2304
2309
|
ssmlBreaks: false,
|
|
2305
2310
|
levers: ["stability"],
|
|
2306
2311
|
languageCode: true,
|
|
2312
|
+
timestamps: true,
|
|
2313
|
+
// measured 2026-10-06: /with-timestamps answers 200 at the same character cost
|
|
2314
|
+
// Rejects previous_text / next_text with a 400 (probed 2026-10-04).
|
|
2315
|
+
stitching: false,
|
|
2307
2316
|
maxChars: 5e3,
|
|
2308
2317
|
// official cap (probed: 5,200 chars accepted; keep the clamp)
|
|
2309
2318
|
languages: TTS_LANGS_V3
|
|
@@ -2319,7 +2328,10 @@ var AUDIO_MODELS = {
|
|
|
2319
2328
|
description: "Newest ElevenLabs TTS \u2014 [audio tags], stability and similarity control, up to 10,000 characters per request. Direct API.",
|
|
2320
2329
|
useCases: ["tts", "voice-over", "narration", "expressive", "long-form"],
|
|
2321
2330
|
features: ["audio-tags", "voice-cloning"],
|
|
2322
|
-
pricing: [
|
|
2331
|
+
pricing: [
|
|
2332
|
+
{ identifier: "elevenlabs-v4", credits: 30 },
|
|
2333
|
+
{ identifier: "elevenlabs-v4:per-100-chars", credits: 4, note: SPEECH_UNIT_PRICE_NOTE }
|
|
2334
|
+
],
|
|
2323
2335
|
// The default speech model (DEFAULT_TTS_PROVIDER) carries the star.
|
|
2324
2336
|
featured: true,
|
|
2325
2337
|
tts: {
|
|
@@ -2327,6 +2339,10 @@ var AUDIO_MODELS = {
|
|
|
2327
2339
|
ssmlBreaks: false,
|
|
2328
2340
|
levers: ["stability", "similarity"],
|
|
2329
2341
|
languageCode: true,
|
|
2342
|
+
timestamps: true,
|
|
2343
|
+
// measured 2026-10-06: /with-timestamps answers 200 at the same character cost
|
|
2344
|
+
// Accepts previous_text / next_text (probed 2026-10-04).
|
|
2345
|
+
stitching: true,
|
|
2330
2346
|
maxChars: 1e4,
|
|
2331
2347
|
// The curated picker, the same 46 as v3. The model itself lists 85
|
|
2332
2348
|
// (it adds e.g. Cantonese, Maltese, Mongolian, Burmese, Uzbek); widening
|
|
@@ -2343,12 +2359,21 @@ var AUDIO_MODELS = {
|
|
|
2343
2359
|
series: "ElevenLabs",
|
|
2344
2360
|
description: "Fast, cheap ElevenLabs TTS via the direct ElevenLabs API. Good for narration.",
|
|
2345
2361
|
useCases: ["tts", "narration", "fast"],
|
|
2346
|
-
|
|
2362
|
+
// The flat row carries no note (a "per 1K chars" note once described a
|
|
2363
|
+
// scaling that never existed; the minimum under length pricing is 8 units, 16).
|
|
2364
|
+
pricing: [
|
|
2365
|
+
{ identifier: "elevenlabs-turbo", credits: 15 },
|
|
2366
|
+
{ identifier: "elevenlabs-turbo:per-100-chars", credits: 2, note: SPEECH_UNIT_PRICE_NOTE }
|
|
2367
|
+
],
|
|
2347
2368
|
tts: {
|
|
2348
2369
|
audioTags: false,
|
|
2349
2370
|
ssmlBreaks: true,
|
|
2350
2371
|
levers: TTS_LEVERS_V2,
|
|
2351
2372
|
languageCode: true,
|
|
2373
|
+
timestamps: true,
|
|
2374
|
+
// measured 2026-10-06: /with-timestamps answers 200 at the same character cost
|
|
2375
|
+
// Measured 2026-10-06: the direct API accepts previous_text / next_text on this model (200).
|
|
2376
|
+
stitching: true,
|
|
2352
2377
|
maxChars: 4e4,
|
|
2353
2378
|
// == eleven_flash_v2_5 (functionally equivalent)
|
|
2354
2379
|
languages: TTS_LANGS_FLASH_V25
|
|
@@ -2363,13 +2388,21 @@ var AUDIO_MODELS = {
|
|
|
2363
2388
|
series: "ElevenLabs",
|
|
2364
2389
|
description: "Multi-language ElevenLabs TTS via the direct ElevenLabs API.",
|
|
2365
2390
|
useCases: ["tts", "multilingual"],
|
|
2366
|
-
|
|
2391
|
+
// The flat row carries no note (the old "per 1K chars" described a scaling that never existed).
|
|
2392
|
+
pricing: [
|
|
2393
|
+
{ identifier: "elevenlabs-multilingual", credits: 30 },
|
|
2394
|
+
{ identifier: "elevenlabs-multilingual:per-100-chars", credits: 4, note: SPEECH_UNIT_PRICE_NOTE }
|
|
2395
|
+
],
|
|
2367
2396
|
tts: {
|
|
2368
2397
|
audioTags: false,
|
|
2369
2398
|
ssmlBreaks: true,
|
|
2370
2399
|
levers: TTS_LEVERS_V2,
|
|
2371
2400
|
// The API reference: "This parameter is not supported for multilingual_v2 models."
|
|
2372
2401
|
languageCode: false,
|
|
2402
|
+
timestamps: true,
|
|
2403
|
+
// measured 2026-10-06: /with-timestamps answers 200 at the same character cost
|
|
2404
|
+
// Measured 2026-10-06: the direct API accepts previous_text / next_text on this model (200).
|
|
2405
|
+
stitching: true,
|
|
2373
2406
|
maxChars: 1e4,
|
|
2374
2407
|
languages: TTS_LANGS_MULTILINGUAL_V2
|
|
2375
2408
|
}
|
|
@@ -2387,18 +2420,61 @@ var AUDIO_MODELS = {
|
|
|
2387
2420
|
description: "Multi-speaker dialogue via the direct ElevenLabs API \u2014 give it a script, it voices each role (any voice: premade, library, or cloned).",
|
|
2388
2421
|
useCases: ["tts", "dialogue", "multi-speaker"],
|
|
2389
2422
|
features: ["audio-tags", "voice-cloning"],
|
|
2390
|
-
|
|
2423
|
+
// Flat per request, whatever the length (decided 2026-10-06: the old
|
|
2424
|
+
// "per 1K chars" note described a scaling that never existed).
|
|
2425
|
+
pricing: [
|
|
2426
|
+
{ identifier: "elevenlabs-dialogue", credits: 25 },
|
|
2427
|
+
{ identifier: "elevenlabs-dialogue:per-100-chars", credits: 4, note: SPEECH_UNIT_PRICE_NOTE }
|
|
2428
|
+
],
|
|
2391
2429
|
tts: {
|
|
2392
2430
|
audioTags: true,
|
|
2393
2431
|
ssmlBreaks: false,
|
|
2394
2432
|
levers: ["stability"],
|
|
2433
|
+
// The dialogue route has offered exactly these three since it shipped
|
|
2434
|
+
// (routes/text-to-dialogue.ts). Kept as the platform's v3 dialogue contract.
|
|
2435
|
+
stabilitySteps: [0, 0.5, 1],
|
|
2395
2436
|
languageCode: true,
|
|
2437
|
+
timestamps: true,
|
|
2438
|
+
// measured 2026-10-06: /with-timestamps answers 200 at the same character cost
|
|
2439
|
+
// The dialogue funnel does not read this field (its own lane; phase 2 declares
|
|
2440
|
+
// the v4 dialogue model's value). v3 underneath.
|
|
2441
|
+
stitching: false,
|
|
2396
2442
|
// Total across lines. The documented 2,000 is a recommendation, not a
|
|
2397
2443
|
// limit (2,500 and 5,000 both probed 200); capped like v3, the model underneath.
|
|
2398
2444
|
maxChars: 5e3,
|
|
2399
2445
|
languages: TTS_LANGS_V3
|
|
2400
2446
|
}
|
|
2401
2447
|
},
|
|
2448
|
+
"elevenlabs-dialogue-v4": {
|
|
2449
|
+
id: "elevenlabs-dialogue-v4",
|
|
2450
|
+
kind: "audio",
|
|
2451
|
+
// Its own mode, never "tts" — the same reason as v3 dialogue above.
|
|
2452
|
+
modes: ["dialogue"],
|
|
2453
|
+
family: "ElevenLabs",
|
|
2454
|
+
label: "ElevenLabs Dialogue v4",
|
|
2455
|
+
series: "ElevenLabs",
|
|
2456
|
+
description: "Multi-speaker dialogue on ElevenLabs v4 \u2014 [audio tags], stability and similarity control. Direct API.",
|
|
2457
|
+
useCases: ["tts", "dialogue", "multi-speaker"],
|
|
2458
|
+
features: ["audio-tags", "voice-cloning"],
|
|
2459
|
+
// Flat per request, the same as v3 dialogue (decided 2026-10-06).
|
|
2460
|
+
pricing: [
|
|
2461
|
+
{ identifier: "elevenlabs-dialogue-v4", credits: 25 },
|
|
2462
|
+
{ identifier: "elevenlabs-dialogue-v4:per-100-chars", credits: 4, note: SPEECH_UNIT_PRICE_NOTE }
|
|
2463
|
+
],
|
|
2464
|
+
tts: {
|
|
2465
|
+
audioTags: true,
|
|
2466
|
+
ssmlBreaks: false,
|
|
2467
|
+
levers: ["stability", "similarity"],
|
|
2468
|
+
languageCode: true,
|
|
2469
|
+
timestamps: true,
|
|
2470
|
+
// measured 2026-10-06: /with-timestamps answers 200 at the same character cost
|
|
2471
|
+
// Dialogue models never stitch neighbour text (the funnel does not read this).
|
|
2472
|
+
stitching: false,
|
|
2473
|
+
maxChars: DIALOGUE_V4_MAX_CHARS,
|
|
2474
|
+
// The curated picker, v3's 46 (v4 lists 85; widening is its own change).
|
|
2475
|
+
languages: TTS_LANGS_V3
|
|
2476
|
+
}
|
|
2477
|
+
},
|
|
2402
2478
|
// ── ElevenLabs voice utilities ──
|
|
2403
2479
|
// (voice cloning was retired platform-wide on 2026-09-15 — no catalog entry,
|
|
2404
2480
|
// no price, no MCP tool; existing clones still resolve as TTS voice ids.)
|
|
@@ -3746,6 +3822,8 @@ var TTS_PROVIDERS = [
|
|
|
3746
3822
|
"elevenlabs-multilingual",
|
|
3747
3823
|
"elevenlabs"
|
|
3748
3824
|
];
|
|
3825
|
+
var DIALOGUE_PROVIDERS = ["elevenlabs-dialogue", "elevenlabs-dialogue-v4"];
|
|
3826
|
+
var DEFAULT_DIALOGUE_PROVIDER = "elevenlabs-dialogue";
|
|
3749
3827
|
var DEFAULT_TTS_PROVIDER = "elevenlabs-v4";
|
|
3750
3828
|
var TEXT_TO_AUDIO_PROVIDERS = [
|
|
3751
3829
|
// Replicate disabled
|
|
@@ -4136,10 +4214,16 @@ var VIDEO_REF_LIMITS_BY_PROVIDER = {
|
|
|
4136
4214
|
"wan-3": { images: 10, videos: 5, audio: 5 },
|
|
4137
4215
|
"wan-3-prime": { images: 10, videos: 5, audio: 5 },
|
|
4138
4216
|
// Multi-image reference providers.
|
|
4139
|
-
|
|
4217
|
+
// `characters` = the dedicated identity input (KIE `character_ids`, max 3).
|
|
4218
|
+
// It is NOT an image-reference lane: it draws from the SAME 7-unit budget as
|
|
4219
|
+
// `images` (images + 2×videos + character units ≤ 7) — see
|
|
4220
|
+
// `video-character-refs.ts`, the one place that budget is computed.
|
|
4221
|
+
// `voices` = distinct audio personas per task (`audio_ids`, max 3). NOT part
|
|
4222
|
+
// of the 7-unit quota: audio ids are a separate input.
|
|
4223
|
+
"gemini-omni-video": { images: 7, videos: 1, characters: 3, voices: 3 },
|
|
4140
4224
|
// Gemini Omni Flash 1.1 — identical quota to the pro sibling
|
|
4141
4225
|
// (images + 2×videos + character_ids ≤ 7).
|
|
4142
|
-
"gemini-omni-flash": { images: 7, videos: 1 },
|
|
4226
|
+
"gemini-omni-flash": { images: 7, videos: 1, characters: 3, voices: 3 },
|
|
4143
4227
|
"kling-3-omni": { images: 7 },
|
|
4144
4228
|
// catalog/docs: "end frame + up to 7 reference images"
|
|
4145
4229
|
"grok-i2v": { images: 7 },
|
|
@@ -4320,7 +4404,9 @@ var VIDEO_AUDIO_CAPABILITY = {
|
|
|
4320
4404
|
// - NOT audio_driven either: "Uploading audio references is unsupported in
|
|
4321
4405
|
// the current version of the API", and "any audio in a video reference is
|
|
4322
4406
|
// ignored" — there is no reference-audio transport to be driven by, and
|
|
4323
|
-
// runGeminiOmni
|
|
4407
|
+
// runGeminiOmni sends `audio_ids` ONLY for a
|
|
4408
|
+
// character's pinned voice persona (a preset voice, never a recording), which
|
|
4409
|
+
// is not a reference-audio transport and leaves the mode `ambient`.
|
|
4324
4410
|
// Audio is priced into the per-tier rate, so NOT cost-affecting.
|
|
4325
4411
|
"gemini-omni-video": { mode: "ambient", alwaysOn: true },
|
|
4326
4412
|
"gemini-omni-flash": { mode: "ambient", alwaysOn: true }
|
|
@@ -4922,6 +5008,134 @@ function getFeaturedEntities(type) {
|
|
|
4922
5008
|
return FEATURED_ENTITIES[type] ?? [];
|
|
4923
5009
|
}
|
|
4924
5010
|
|
|
5011
|
+
// src/video-character-refs.ts
|
|
5012
|
+
var VIDEO_CHARACTER_REFS_WIRE_MAX = Math.max(
|
|
5013
|
+
0,
|
|
5014
|
+
...Object.values(VIDEO_REF_LIMITS_BY_PROVIDER).map((l) => l?.characters ?? 0)
|
|
5015
|
+
);
|
|
5016
|
+
var VIDEO_CHARACTER_DESCRIPTION_MAX = 2e3;
|
|
5017
|
+
var VIDEO_CHARACTER_NAME_MAX = 100;
|
|
5018
|
+
var VIDEO_CHARACTER_VOICE_DESCRIPTION_MAX = 2e3;
|
|
5019
|
+
var VIDEO_CHARACTER_VOICE_EXAMPLE_MAX = 120;
|
|
5020
|
+
function videoCharacterRefCap(provider) {
|
|
5021
|
+
return provider ? VIDEO_REF_LIMITS_BY_PROVIDER[provider]?.characters ?? 0 : 0;
|
|
5022
|
+
}
|
|
5023
|
+
function videoCharacterVoiceCap(provider) {
|
|
5024
|
+
return provider ? VIDEO_REF_LIMITS_BY_PROVIDER[provider]?.voices ?? 0 : 0;
|
|
5025
|
+
}
|
|
5026
|
+
function videoCharacterVoiceKey(ref) {
|
|
5027
|
+
const voice = ref.voice;
|
|
5028
|
+
if (!voice) return null;
|
|
5029
|
+
return JSON.stringify([voice.preset, voice.description?.trim() ?? "", voice.exampleLine?.trim() ?? "", ref.name?.trim() ?? ""]);
|
|
5030
|
+
}
|
|
5031
|
+
function videoCharacterDistinctVoices(characterReferences) {
|
|
5032
|
+
const keys = /* @__PURE__ */ new Set();
|
|
5033
|
+
for (const c of characterReferences ?? []) {
|
|
5034
|
+
const key = videoCharacterVoiceKey(c);
|
|
5035
|
+
if (key) keys.add(key);
|
|
5036
|
+
}
|
|
5037
|
+
return keys.size;
|
|
5038
|
+
}
|
|
5039
|
+
function videoCharacterRefProviders() {
|
|
5040
|
+
return Object.entries(VIDEO_REF_LIMITS_BY_PROVIDER).filter(([, l]) => (l?.characters ?? 0) > 0).map(([id]) => id);
|
|
5041
|
+
}
|
|
5042
|
+
function videoCharacterRefUnits(characterReferences) {
|
|
5043
|
+
let units = 0;
|
|
5044
|
+
for (const c of characterReferences ?? []) units += c.bodyImageUrl ? 2 : 1;
|
|
5045
|
+
return units;
|
|
5046
|
+
}
|
|
5047
|
+
function videoCharacterVoiceProblem(args) {
|
|
5048
|
+
const distinct = videoCharacterDistinctVoices(args.characterReferences);
|
|
5049
|
+
if (distinct === 0) return null;
|
|
5050
|
+
const cap = args.cap ?? videoCharacterVoiceCap(args.provider);
|
|
5051
|
+
if (cap === 0) {
|
|
5052
|
+
return {
|
|
5053
|
+
code: "character_voice_unsupported",
|
|
5054
|
+
message: `A character voice is not supported by ${args.provider ?? "the selected model"}. Drop the voice, or pick a model that takes characterReferences.`
|
|
5055
|
+
};
|
|
5056
|
+
}
|
|
5057
|
+
if (distinct > cap) {
|
|
5058
|
+
return {
|
|
5059
|
+
code: "character_voices_over_limit",
|
|
5060
|
+
message: `${args.provider} accepts at most ${cap} distinct character voices per video; got ${distinct}. Give some characters the same voice, or drop some.`
|
|
5061
|
+
};
|
|
5062
|
+
}
|
|
5063
|
+
return null;
|
|
5064
|
+
}
|
|
5065
|
+
function videoCharacterRefProblem(args) {
|
|
5066
|
+
const { provider, characterReferences } = args;
|
|
5067
|
+
if (!characterReferences || characterReferences.length === 0) return null;
|
|
5068
|
+
const cap = videoCharacterRefCap(provider);
|
|
5069
|
+
if (cap === 0) {
|
|
5070
|
+
return {
|
|
5071
|
+
code: "character_references_unsupported",
|
|
5072
|
+
message: `characterReferences is not supported by ${provider ?? "the selected model"}. Models that take them: ${videoCharacterRefProviders().join(", ")}. Otherwise send the portrait as a reference image instead.`
|
|
5073
|
+
};
|
|
5074
|
+
}
|
|
5075
|
+
if (characterReferences.length > cap) {
|
|
5076
|
+
return {
|
|
5077
|
+
code: "character_references_over_limit",
|
|
5078
|
+
message: `${provider} accepts at most ${cap} character references; got ${characterReferences.length}.`
|
|
5079
|
+
};
|
|
5080
|
+
}
|
|
5081
|
+
if (args.hasStartFrame) {
|
|
5082
|
+
return {
|
|
5083
|
+
code: "character_references_with_start_frame",
|
|
5084
|
+
message: `${provider} does not yet support combining characterReferences with a start frame (imageUrl) \u2014 the frame and the characters would compete for the same input slots without a defined role. Drop the start frame (the character's portrait carries the face), or drop characterReferences.`
|
|
5085
|
+
};
|
|
5086
|
+
}
|
|
5087
|
+
if (args.hasEndFrame) {
|
|
5088
|
+
return {
|
|
5089
|
+
code: "character_references_with_end_frame",
|
|
5090
|
+
message: `${provider} does not use an end frame (endFrameUrl) together with characterReferences. Drop the end frame, or drop characterReferences.`
|
|
5091
|
+
};
|
|
5092
|
+
}
|
|
5093
|
+
const budget = VIDEO_REF_LIMITS_BY_PROVIDER[provider]?.images ?? 7;
|
|
5094
|
+
const used = args.imageCount + args.videoCount * 2 + videoCharacterRefUnits(characterReferences);
|
|
5095
|
+
if (used > budget) {
|
|
5096
|
+
return {
|
|
5097
|
+
code: "character_references_quota",
|
|
5098
|
+
message: `${provider} takes at most ${budget} input units: reference images count 1, each reference video 2, each character 1 (2 with a body image). This request uses ${used}. Remove some reference images or characters.`
|
|
5099
|
+
};
|
|
5100
|
+
}
|
|
5101
|
+
return videoCharacterVoiceProblem({ provider, characterReferences });
|
|
5102
|
+
}
|
|
5103
|
+
|
|
5104
|
+
// src/gemini-omni-voices.ts
|
|
5105
|
+
var GEMINI_OMNI_VOICE_PRESETS = [
|
|
5106
|
+
{ id: "achernar", gender: "female", style: "soft", pitch: "high" },
|
|
5107
|
+
{ id: "achird", gender: "male", style: "friendly", pitch: "mid" },
|
|
5108
|
+
{ id: "algenib", gender: "male", style: "raspy", pitch: "low" },
|
|
5109
|
+
{ id: "algieba", gender: "male", style: "easygoing", pitch: "mid-low" },
|
|
5110
|
+
{ id: "alnilam", gender: "male", style: "steady", pitch: "mid-low" },
|
|
5111
|
+
{ id: "aoede", gender: "female", style: "brisk", pitch: "mid" },
|
|
5112
|
+
{ id: "autonoe", gender: "female", style: "bright", pitch: "mid" },
|
|
5113
|
+
{ id: "callirrhoe", gender: "female", style: "easygoing", pitch: "mid" },
|
|
5114
|
+
{ id: "charon", gender: "male", style: "intellectual", pitch: "low" },
|
|
5115
|
+
{ id: "despina", gender: "female", style: "smooth", pitch: "mid" },
|
|
5116
|
+
{ id: "enceladus", gender: "male", style: "breathy", pitch: "low" },
|
|
5117
|
+
{ id: "erinome", gender: "female", style: "clear", pitch: "mid" },
|
|
5118
|
+
{ id: "fenrir", gender: "male", style: "lively", pitch: "younger" },
|
|
5119
|
+
{ id: "gacrux", gender: "female", style: "mature", pitch: "mid" },
|
|
5120
|
+
{ id: "iapetus", gender: "male", style: "clear", pitch: "mid-low" },
|
|
5121
|
+
{ id: "kore", gender: "female", style: "capable", pitch: "mid" },
|
|
5122
|
+
{ id: "laomedeia", gender: "female", style: "cheerful", pitch: "mid-high" },
|
|
5123
|
+
{ id: "leda", gender: "female", style: "young", pitch: "mid-high" },
|
|
5124
|
+
{ id: "orus", gender: "male", style: "steady", pitch: "mid-low" },
|
|
5125
|
+
{ id: "puck", gender: "male", style: "cheerful", pitch: "mid" },
|
|
5126
|
+
{ id: "pulcherrima", gender: "genderless", style: "forward", pitch: "mid-high" },
|
|
5127
|
+
{ id: "rasalgethi", gender: "male", style: "intellectual", pitch: "mid" },
|
|
5128
|
+
{ id: "sadachbia", gender: "male", style: "vivid", pitch: "low" },
|
|
5129
|
+
{ id: "sadaltager", gender: "male", style: "knowledgeable", pitch: "mid" },
|
|
5130
|
+
{ id: "schedar", gender: "male", style: "smooth", pitch: "mid-low" },
|
|
5131
|
+
{ id: "sulafat", gender: "female", style: "warm", pitch: "mid" },
|
|
5132
|
+
{ id: "umbriel", gender: "male", style: "smooth", pitch: "low" },
|
|
5133
|
+
{ id: "vindemiatrix", gender: "female", style: "gentle", pitch: "mid" },
|
|
5134
|
+
{ id: "zephyr", gender: "female", style: "bright", pitch: "mid-high" },
|
|
5135
|
+
{ id: "zubenelgenubi", gender: "male", style: "casual", pitch: "mid-low" }
|
|
5136
|
+
];
|
|
5137
|
+
var GEMINI_OMNI_VOICE_PRESET_IDS = GEMINI_OMNI_VOICE_PRESETS.map((v) => v.id);
|
|
5138
|
+
|
|
4925
5139
|
// src/inpaint-region.ts
|
|
4926
5140
|
function band(center) {
|
|
4927
5141
|
if (center < 1 / 3) return "low";
|
|
@@ -4931,10 +5145,10 @@ function band(center) {
|
|
|
4931
5145
|
var VERT = { low: "upper", mid: "middle", high: "lower" };
|
|
4932
5146
|
var HORZ = { low: "left", mid: "center", high: "right" };
|
|
4933
5147
|
function describeMaskRegion(box, image) {
|
|
4934
|
-
const
|
|
5148
|
+
const clamp014 = (n) => Math.max(0, Math.min(1, n));
|
|
4935
5149
|
const round2 = (n) => Math.round(n * 100) / 100;
|
|
4936
|
-
const nx =
|
|
4937
|
-
const ny =
|
|
5150
|
+
const nx = clamp014(box.x / image.width);
|
|
5151
|
+
const ny = clamp014(box.y / image.height);
|
|
4938
5152
|
const normBbox = {
|
|
4939
5153
|
x: round2(nx),
|
|
4940
5154
|
y: round2(ny),
|
|
@@ -5147,20 +5361,20 @@ function buildCreditModelIdentifier(provider, quality, resolution, renderingSpee
|
|
|
5147
5361
|
return provider;
|
|
5148
5362
|
}
|
|
5149
5363
|
function resolveNormalizedImageGen(opts) {
|
|
5150
|
-
const
|
|
5151
|
-
const provider =
|
|
5364
|
+
const str7 = (v) => typeof v === "string" && v.length > 0 ? v : void 0;
|
|
5365
|
+
const provider = str7(opts.provider) ?? "nano-banana";
|
|
5152
5366
|
const modelId = opts.swapToI2i && opts.refCount > 0 ? T2I_TO_I2I_VARIANT[provider] ?? provider : provider;
|
|
5153
5367
|
const n = normalizeModelInput(modelId, {
|
|
5154
|
-
aspectRatio:
|
|
5155
|
-
resolution:
|
|
5156
|
-
quality:
|
|
5368
|
+
aspectRatio: str7(opts.aspectRatio),
|
|
5369
|
+
resolution: str7(opts.resolution),
|
|
5370
|
+
quality: str7(opts.quality)
|
|
5157
5371
|
});
|
|
5158
5372
|
return {
|
|
5159
5373
|
identifier: buildCreditModelIdentifier(
|
|
5160
5374
|
modelId,
|
|
5161
5375
|
n.quality,
|
|
5162
5376
|
n.resolution,
|
|
5163
|
-
|
|
5377
|
+
str7(opts.renderingSpeed),
|
|
5164
5378
|
void 0,
|
|
5165
5379
|
opts.refCount
|
|
5166
5380
|
),
|
|
@@ -5541,6 +5755,58 @@ function ltxRetakeDurationSec(raw) {
|
|
|
5541
5755
|
return Math.max(LTX_RETAKE_MIN_DURATION_SEC, n);
|
|
5542
5756
|
}
|
|
5543
5757
|
|
|
5758
|
+
// src/tts-capabilities.ts
|
|
5759
|
+
var TTS_PROVIDER_ALIASES = {
|
|
5760
|
+
elevenlabs: "elevenlabs-turbo"
|
|
5761
|
+
};
|
|
5762
|
+
var TTS_FALLBACK_PROVIDER = "elevenlabs-turbo";
|
|
5763
|
+
function canonicalTtsProvider(provider) {
|
|
5764
|
+
return typeof provider === "string" && Object.hasOwn(TTS_PROVIDER_ALIASES, provider) ? TTS_PROVIDER_ALIASES[provider] : provider;
|
|
5765
|
+
}
|
|
5766
|
+
function findTtsCapabilities(provider) {
|
|
5767
|
+
if (typeof provider !== "string" || !provider) return void 0;
|
|
5768
|
+
const id = canonicalTtsProvider(provider);
|
|
5769
|
+
if (!Object.hasOwn(MODEL_CATALOG, id)) return void 0;
|
|
5770
|
+
const entry = MODEL_CATALOG[id];
|
|
5771
|
+
return entry.modes.includes("tts") ? entry.tts : void 0;
|
|
5772
|
+
}
|
|
5773
|
+
function getTtsCapabilities(provider) {
|
|
5774
|
+
return findTtsCapabilities(provider) ?? MODEL_CATALOG[TTS_FALLBACK_PROVIDER].tts;
|
|
5775
|
+
}
|
|
5776
|
+
function ttsSupportsAudioTags(provider) {
|
|
5777
|
+
return getTtsCapabilities(provider).audioTags;
|
|
5778
|
+
}
|
|
5779
|
+
function ttsSupportsSsmlBreaks(provider) {
|
|
5780
|
+
return getTtsCapabilities(provider).ssmlBreaks;
|
|
5781
|
+
}
|
|
5782
|
+
function ttsSupportsStitching(provider) {
|
|
5783
|
+
return getTtsCapabilities(provider).stitching;
|
|
5784
|
+
}
|
|
5785
|
+
function ttsHasLever(provider, lever) {
|
|
5786
|
+
return getTtsCapabilities(provider).levers.includes(lever);
|
|
5787
|
+
}
|
|
5788
|
+
function ttsSupportsTimestamps(provider) {
|
|
5789
|
+
return getTtsCapabilities(provider).timestamps;
|
|
5790
|
+
}
|
|
5791
|
+
function ttsLanguageCodes(provider) {
|
|
5792
|
+
return getTtsCapabilities(provider).languages;
|
|
5793
|
+
}
|
|
5794
|
+
|
|
5795
|
+
// src/credit-estimators/speech.ts
|
|
5796
|
+
var SPEECH_PRICE_UNIT_CHARS = 100;
|
|
5797
|
+
var SPEECH_FLOOR_UNITS = 8;
|
|
5798
|
+
var SPEECH_UNIT_CREDIT_SUFFIX = ":per-100-chars";
|
|
5799
|
+
function speechUnitCreditId(modelId) {
|
|
5800
|
+
return `${canonicalTtsProvider(modelId)}${SPEECH_UNIT_CREDIT_SUFFIX}`;
|
|
5801
|
+
}
|
|
5802
|
+
function speechPriceUnits(chars) {
|
|
5803
|
+
const started = Number.isFinite(chars) && chars > 0 ? Math.ceil(chars / SPEECH_PRICE_UNIT_CHARS) : 0;
|
|
5804
|
+
return Math.max(SPEECH_FLOOR_UNITS, started);
|
|
5805
|
+
}
|
|
5806
|
+
function speechCredits(chars, perUnitCredits) {
|
|
5807
|
+
return speechPriceUnits(chars) * perUnitCredits;
|
|
5808
|
+
}
|
|
5809
|
+
|
|
5544
5810
|
// src/video-duration.ts
|
|
5545
5811
|
function extractVideoDurationFromNode(data) {
|
|
5546
5812
|
if (!data) return void 0;
|
|
@@ -5789,6 +6055,42 @@ var AUDIO_PRODUCER_TYPES = /* @__PURE__ */ new Set([
|
|
|
5789
6055
|
// Extract Audio: demuxes a video's audio track to a standalone MP3.
|
|
5790
6056
|
"extract-audio"
|
|
5791
6057
|
]);
|
|
6058
|
+
var IMAGE_PRODUCER_TYPES = /* @__PURE__ */ new Set([
|
|
6059
|
+
"upload-image",
|
|
6060
|
+
"generate-image",
|
|
6061
|
+
"edit-image",
|
|
6062
|
+
"image-to-image",
|
|
6063
|
+
"modify-image",
|
|
6064
|
+
"upscale-image",
|
|
6065
|
+
"remove-background",
|
|
6066
|
+
// extract-frame produces a single still image extracted from a video source.
|
|
6067
|
+
"extract-frame",
|
|
6068
|
+
// generate-mask emits the source image AND a mask PNG; its `image` source
|
|
6069
|
+
// pip is the passthrough (the same image as the input).
|
|
6070
|
+
"generate-mask",
|
|
6071
|
+
// paint-mask emits the hand-painted mask PNG (a plain image at runtime).
|
|
6072
|
+
// Membership is what makes mask targets accept it — mask is an advisory
|
|
6073
|
+
// color, not a gated type.
|
|
6074
|
+
"paint-mask",
|
|
6075
|
+
// reference-sheet's `sheet` is one composited image and `panels` carries
|
|
6076
|
+
// clean reference images; both resolve to image URLs at runtime.
|
|
6077
|
+
"reference-sheet",
|
|
6078
|
+
// reference-board's `image` pip emits a real generated board image.
|
|
6079
|
+
"reference-board",
|
|
6080
|
+
// image-collage composites N images → ONE image.
|
|
6081
|
+
"image-collage",
|
|
6082
|
+
// image-overlay places layers on a base → ONE image.
|
|
6083
|
+
"image-overlay",
|
|
6084
|
+
// 3D Render Pro's `stills` handle carries one PNG per shot of the exported
|
|
6085
|
+
// composition (spread into referenceImageUrls like reference-sheet
|
|
6086
|
+
// `panels`). A validator sees only the source NODE type, so this also makes
|
|
6087
|
+
// its `video` pip droppable on an image input — the handle-blind trade
|
|
6088
|
+
// reference-sheet and split-media already make; the input resolvers route
|
|
6089
|
+
// by handle, so only `stills` becomes an image at runtime. Deliberately NOT
|
|
6090
|
+
// in IMAGE_SOURCE_TYPES on either engine: that set types the node's PRIMARY
|
|
6091
|
+
// asset, and 3D Render Pro's is the MP4.
|
|
6092
|
+
"pro-3d-render"
|
|
6093
|
+
]);
|
|
5792
6094
|
var FAN_OUT_EACH_TYPES = /* @__PURE__ */ new Set([
|
|
5793
6095
|
"list",
|
|
5794
6096
|
"split-text",
|
|
@@ -5816,6 +6118,7 @@ var FAN_OUT_EACH_HANDLES = {
|
|
|
5816
6118
|
// (decided 2026-10-04).
|
|
5817
6119
|
"camera-switch": { each: ["edl"], primary: "edl" }
|
|
5818
6120
|
};
|
|
6121
|
+
var FAN_OUT_ALL_OR_NOTHING_TYPES = /* @__PURE__ */ new Set(["ugc-clip"]);
|
|
5819
6122
|
var OWN_LIST_NODE_TYPES = /* @__PURE__ */ new Set(["extract-field", "json-process"]);
|
|
5820
6123
|
function ownsItsList(nodeType) {
|
|
5821
6124
|
return typeof nodeType === "string" && OWN_LIST_NODE_TYPES.has(nodeType);
|
|
@@ -5840,7 +6143,19 @@ var FAN_IN_TARGETS = {
|
|
|
5840
6143
|
// Telegram Reply — one message per run, whatever is wired into its text
|
|
5841
6144
|
// input: a list (or a writer that ran once per item) arrives as one
|
|
5842
6145
|
// message, never as a burst of sends to the owner's chat.
|
|
5843
|
-
"telegram-account-send": ["in"]
|
|
6146
|
+
"telegram-account-send": ["in"],
|
|
6147
|
+
// The list operators — they READ the whole list wired into them (their
|
|
6148
|
+
// executors collect every upstream item themselves) and emit a list. Run
|
|
6149
|
+
// once per item by an "each" wire (a Split Text, a List, a node that ran per
|
|
6150
|
+
// item), every iteration saw the same whole list and answered with its
|
|
6151
|
+
// first match: a Filter List fed 11 stories handed 11 copies of story one
|
|
6152
|
+
// downstream, and every paid stage after it ran 11 times on it
|
|
6153
|
+
// (2026-10-06). A list operator is never fanned out, on any wire.
|
|
6154
|
+
"filter-list": "*",
|
|
6155
|
+
deduplicate: "*",
|
|
6156
|
+
"merge-lists": "*",
|
|
6157
|
+
"sort-list": "*",
|
|
6158
|
+
selector: "*"
|
|
5844
6159
|
};
|
|
5845
6160
|
function isFanInNodeType(nodeType) {
|
|
5846
6161
|
return typeof nodeType === "string" && Object.prototype.hasOwnProperty.call(FAN_IN_TARGETS, nodeType);
|
|
@@ -5875,6 +6190,36 @@ function canonicalizeOverrideKeys(nodeType, overrides) {
|
|
|
5875
6190
|
return out ?? overrides;
|
|
5876
6191
|
}
|
|
5877
6192
|
|
|
6193
|
+
// src/render-nodes.ts
|
|
6194
|
+
var outputSettingMedium = (data) => data.output === "audio" ? "audio" : "video";
|
|
6195
|
+
var descriptor = (d) => Object.freeze({ ...d });
|
|
6196
|
+
var RENDER_NODE_TYPES = Object.freeze({
|
|
6197
|
+
"apply-edl": descriptor({
|
|
6198
|
+
mediumOf: outputSettingMedium,
|
|
6199
|
+
creditId: (quality) => applyEdlCreditId(quality),
|
|
6200
|
+
clockMapFrom: "input",
|
|
6201
|
+
ownerOnlyListing: true,
|
|
6202
|
+
latestBatch: true,
|
|
6203
|
+
jsonKind: "transcript"
|
|
6204
|
+
})
|
|
6205
|
+
});
|
|
6206
|
+
var RENDER_NODE_TYPE_IDS = Object.freeze(Object.keys(RENDER_NODE_TYPES));
|
|
6207
|
+
function renderNodeOf(type) {
|
|
6208
|
+
return typeof type === "string" && Object.hasOwn(RENDER_NODE_TYPES, type) ? RENDER_NODE_TYPES[type] : void 0;
|
|
6209
|
+
}
|
|
6210
|
+
function isRenderNodeType(type) {
|
|
6211
|
+
return renderNodeOf(type) !== void 0;
|
|
6212
|
+
}
|
|
6213
|
+
function rendersLatestBatch(type) {
|
|
6214
|
+
return renderNodeOf(type)?.latestBatch === true;
|
|
6215
|
+
}
|
|
6216
|
+
function rendersTranscriptJson(type) {
|
|
6217
|
+
return renderNodeOf(type)?.jsonKind === "transcript";
|
|
6218
|
+
}
|
|
6219
|
+
var OWNER_ONLY_LISTING_RENDER_TYPES = Object.freeze(
|
|
6220
|
+
RENDER_NODE_TYPE_IDS.filter((t2) => RENDER_NODE_TYPES[t2].ownerOnlyListing)
|
|
6221
|
+
);
|
|
6222
|
+
|
|
5878
6223
|
// src/presentation-utils.ts
|
|
5879
6224
|
var INPUT_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
5880
6225
|
"text-prompt",
|
|
@@ -6004,13 +6349,14 @@ var VIDEO_OUTPUT_TYPES = /* @__PURE__ */ new Set([
|
|
|
6004
6349
|
"video-upscale",
|
|
6005
6350
|
"add-captions",
|
|
6006
6351
|
"social-media-format",
|
|
6007
|
-
//
|
|
6008
|
-
// time (DYNAMIC_PRODUCER_TYPES), so getOutputType would answer
|
|
6009
|
-
// published app would render the cut as a JSON blob. Declaring
|
|
6010
|
-
// the voice-changer/dubbing precedent does for their
|
|
6011
|
-
// the classifier answer "video" (the common case; an
|
|
6012
|
-
// plays in a video element). Asserted in
|
|
6013
|
-
|
|
6352
|
+
// A render (Apply EDL) renders an EDL into video OR audio. Its medium is
|
|
6353
|
+
// decided at run time (DYNAMIC_PRODUCER_TYPES), so getOutputType would answer
|
|
6354
|
+
// "data" and a published app would render the cut as a JSON blob. Declaring
|
|
6355
|
+
// every render here — as the voice-changer/dubbing precedent does for their
|
|
6356
|
+
// default medium — makes the classifier answer "video" (the common case; an
|
|
6357
|
+
// audio-only cut still plays in a video element). Asserted in
|
|
6358
|
+
// producer-types.test.ts.
|
|
6359
|
+
...RENDER_NODE_TYPE_IDS
|
|
6014
6360
|
]);
|
|
6015
6361
|
var AUDIO_OUTPUT_TYPES = /* @__PURE__ */ new Set([
|
|
6016
6362
|
"text-to-speech",
|
|
@@ -6166,8 +6512,16 @@ var INPUT_FIELD_MAP = {
|
|
|
6166
6512
|
"music-mood": { key: "emotion", type: "select" },
|
|
6167
6513
|
"instrumentation": { key: "production", type: "select" },
|
|
6168
6514
|
"voice-character": { key: "timbre", type: "select" },
|
|
6169
|
-
"voice-delivery": { key: "archetype", type: "select" }
|
|
6515
|
+
"voice-delivery": { key: "archetype", type: "select" },
|
|
6516
|
+
// --- UGC (Cloud) ---
|
|
6517
|
+
"ugc-creator": { key: "source", type: "select" }
|
|
6518
|
+
};
|
|
6519
|
+
var INPUT_FIELD_EXTRA_KEYS = {
|
|
6520
|
+
"ugc-creator": [{ key: "gender", type: "select" }, { key: "photoUrl", type: "image-url" }]
|
|
6170
6521
|
};
|
|
6522
|
+
function getInputFieldExtraKeys(nodeType) {
|
|
6523
|
+
return Object.hasOwn(INPUT_FIELD_EXTRA_KEYS, nodeType) ? INPUT_FIELD_EXTRA_KEYS[nodeType] : [];
|
|
6524
|
+
}
|
|
6171
6525
|
function getInputFieldSchema(nodeType) {
|
|
6172
6526
|
return INPUT_FIELD_MAP[nodeType];
|
|
6173
6527
|
}
|
|
@@ -6222,6 +6576,32 @@ function cleanOrphanedItems(items, nodeIds) {
|
|
|
6222
6576
|
});
|
|
6223
6577
|
}
|
|
6224
6578
|
|
|
6579
|
+
// src/picker-restrictions.ts
|
|
6580
|
+
var valuesOf = (v) => (Array.isArray(v) ? v : [v]).filter((x) => x !== void 0 && x !== null && x !== "").map(String);
|
|
6581
|
+
function findRestrictedPickerValue(input) {
|
|
6582
|
+
if (!input.cardMeta || !input.inputValues) return null;
|
|
6583
|
+
for (const node of input.nodes) {
|
|
6584
|
+
const meta = input.cardMeta[node.id];
|
|
6585
|
+
const submitted = input.inputValues[node.id];
|
|
6586
|
+
if (!meta || !submitted) continue;
|
|
6587
|
+
const rules = [];
|
|
6588
|
+
const rep = node.type ? INPUT_FIELD_MAP[node.type]?.key : void 0;
|
|
6589
|
+
if (rep && meta.pickerAllowedValues && meta.pickerAllowedValues.length > 0) rules.push([rep, meta.pickerAllowedValues]);
|
|
6590
|
+
for (const [field, allowed] of Object.entries(meta.pickerAllowedValuesByField ?? {})) {
|
|
6591
|
+
if (allowed.length > 0) rules.push([field, allowed]);
|
|
6592
|
+
}
|
|
6593
|
+
for (const [field, allowed] of rules) {
|
|
6594
|
+
for (const [key, raw] of Object.entries(submitted)) {
|
|
6595
|
+
if (canonicalExposedFieldKey(node.type, key) !== field) continue;
|
|
6596
|
+
for (const value of valuesOf(raw)) {
|
|
6597
|
+
if (!allowed.includes(value)) return `Invalid value for ${field}: ${value}. Allowed: ${allowed.join(", ")}`;
|
|
6598
|
+
}
|
|
6599
|
+
}
|
|
6600
|
+
}
|
|
6601
|
+
}
|
|
6602
|
+
return null;
|
|
6603
|
+
}
|
|
6604
|
+
|
|
6225
6605
|
// src/clone-utils.ts
|
|
6226
6606
|
var ITER_CLONE_PATTERN = /_iter_\d+$/;
|
|
6227
6607
|
function isExpandedClone(node) {
|
|
@@ -6281,14 +6661,14 @@ function isCollectInEdge(e) {
|
|
|
6281
6661
|
return (e.targetHandle ?? COLLECT_IN_HANDLE) === COLLECT_IN_HANDLE;
|
|
6282
6662
|
}
|
|
6283
6663
|
function computeAggregateLanes(nodeId, wiredTypes, buckets, edges) {
|
|
6284
|
-
const
|
|
6285
|
-
for (const t2 of presentTypes(buckets))
|
|
6664
|
+
const present2 = new Set(wiredTypes);
|
|
6665
|
+
for (const t2 of presentTypes(buckets)) present2.add(t2);
|
|
6286
6666
|
for (const e of edges) {
|
|
6287
6667
|
if (e.source !== nodeId) continue;
|
|
6288
6668
|
const lane = parseGroupHandle(e.sourceHandle);
|
|
6289
|
-
if (lane)
|
|
6669
|
+
if (lane) present2.add(lane);
|
|
6290
6670
|
}
|
|
6291
|
-
return AGGREGATEABLE_TYPES.filter((t2) =>
|
|
6671
|
+
return AGGREGATEABLE_TYPES.filter((t2) => present2.has(t2));
|
|
6292
6672
|
}
|
|
6293
6673
|
|
|
6294
6674
|
// src/llm-models.ts
|
|
@@ -7570,9 +7950,9 @@ function evalNode(node, input, ctx) {
|
|
|
7570
7950
|
return input;
|
|
7571
7951
|
}
|
|
7572
7952
|
if (typeof input === "object" && input !== null) {
|
|
7573
|
-
const
|
|
7574
|
-
ctx.objectSourcedArrays.add(
|
|
7575
|
-
return
|
|
7953
|
+
const arr2 = [input];
|
|
7954
|
+
ctx.objectSourcedArrays.add(arr2);
|
|
7955
|
+
return arr2;
|
|
7576
7956
|
}
|
|
7577
7957
|
throw new Error(`Cannot iterate over ${typeof input}`);
|
|
7578
7958
|
}
|
|
@@ -7704,10 +8084,10 @@ function evalNode(node, input, ctx) {
|
|
|
7704
8084
|
}
|
|
7705
8085
|
}
|
|
7706
8086
|
}
|
|
7707
|
-
function markExpanded(
|
|
7708
|
-
ctx.expandedArrays.add(
|
|
7709
|
-
if (objectSourced) ctx.objectSourcedArrays.add(
|
|
7710
|
-
return
|
|
8087
|
+
function markExpanded(arr2, objectSourced, ctx) {
|
|
8088
|
+
ctx.expandedArrays.add(arr2);
|
|
8089
|
+
if (objectSourced) ctx.objectSourcedArrays.add(arr2);
|
|
8090
|
+
return arr2;
|
|
7711
8091
|
}
|
|
7712
8092
|
function isExpandedArray(node, val, ctx) {
|
|
7713
8093
|
if (!Array.isArray(val)) return false;
|
|
@@ -7825,8 +8205,8 @@ function combineSameLabelRefs(candidates) {
|
|
|
7825
8205
|
for (const c of candidates) {
|
|
7826
8206
|
if (c.category < 0) continue;
|
|
7827
8207
|
const key = canonicalVarName(c.label);
|
|
7828
|
-
const
|
|
7829
|
-
if (
|
|
8208
|
+
const arr2 = byLabel.get(key);
|
|
8209
|
+
if (arr2) arr2.push(c);
|
|
7830
8210
|
else byLabel.set(key, [c]);
|
|
7831
8211
|
}
|
|
7832
8212
|
const combined = /* @__PURE__ */ new Map();
|
|
@@ -8633,6 +9013,8 @@ var NON_PROMPT_TEXT_LANES = {
|
|
|
8633
9013
|
silence: ["edit-plan"],
|
|
8634
9014
|
offsets: ["edit-plan"],
|
|
8635
9015
|
qrText: ["image-overlay"],
|
|
9016
|
+
layerPlan: ["video-overlay"],
|
|
9017
|
+
captionPlan: ["add-captions"],
|
|
8636
9018
|
transition: ["slideshow"],
|
|
8637
9019
|
// Content Recipe's `link` carries the post's address (inputs.sourceLink), not
|
|
8638
9020
|
// the material it analyzes — a list of links fanned through it must not be
|
|
@@ -8655,6 +9037,16 @@ function compactWithRows(aligned) {
|
|
|
8655
9037
|
});
|
|
8656
9038
|
return { items, rowIndices };
|
|
8657
9039
|
}
|
|
9040
|
+
function pickHeldRow(rows, edge, iterating) {
|
|
9041
|
+
if (rows.length === 0) return { kind: "unaffected" };
|
|
9042
|
+
const mode = edge?.outputMode ?? "each";
|
|
9043
|
+
const held = (row) => isBlank(row) ? { kind: "none" } : { kind: "value", value: row };
|
|
9044
|
+
if (mode === "item") return held(rows[resolveIndex(edge?.itemIndex ?? "1", rows.length)]);
|
|
9045
|
+
if (mode.startsWith("item:")) return held(rows[parseInt(mode.slice(5), 10)]);
|
|
9046
|
+
if (mode !== "each" || iterating || isDefaultSelectorConfig(edge)) return { kind: "unaffected" };
|
|
9047
|
+
const kept = compactWithRows(selectListItems([...rows], edge)).items;
|
|
9048
|
+
return kept.length > 0 ? { kind: "value", value: kept[0] } : { kind: "none" };
|
|
9049
|
+
}
|
|
8658
9050
|
function liveRowColumn(rows, colIndex) {
|
|
8659
9051
|
return rows.filter((row) => row.some((cell) => !isBlank(cell))).map((row) => typeof row[colIndex] === "string" ? row[colIndex].trim() : "");
|
|
8660
9052
|
}
|
|
@@ -8663,7 +9055,7 @@ function resolveListFanOut(candidates, nodeType) {
|
|
|
8663
9055
|
const held = (c) => compactWithRows(c.aligned).items.length;
|
|
8664
9056
|
const primary = candidates.reduce((best, c) => held(c) > held(best) ? c : best);
|
|
8665
9057
|
const space = candidates.filter((c) => c.aligned.length === primary.aligned.length);
|
|
8666
|
-
const feedsPrompt = (c) => fanOutTextFeedsPrompt(nodeType, c.targetHandle) && isTextList(c.aligned);
|
|
9058
|
+
const feedsPrompt = (c) => fanOutTextFeedsPrompt(nodeType, c.targetHandle) && isTextList(c.aligned, nodeType, c.targetHandle);
|
|
8667
9059
|
const driver = feedsPrompt(primary) ? primary : space.find(feedsPrompt) ?? primary;
|
|
8668
9060
|
const rowIndices = [];
|
|
8669
9061
|
for (let row = 0; row < primary.aligned.length; row++) {
|
|
@@ -8676,11 +9068,21 @@ function resolveListFanOut(candidates, nodeType) {
|
|
|
8676
9068
|
};
|
|
8677
9069
|
}
|
|
8678
9070
|
function isFanOutUrlItem(item) {
|
|
8679
|
-
|
|
9071
|
+
const s = item.trim();
|
|
9072
|
+
if (s.length === 0 || /\s/.test(s) || s.startsWith("{") || s.startsWith("[")) return false;
|
|
9073
|
+
return s.startsWith("http") || /\.(png|jpg|jpeg|webp|gif|mp4|mov|webm|mp3|wav|ogg)(\?|$)/i.test(s);
|
|
9074
|
+
}
|
|
9075
|
+
var URL_ITEM_IS_TEXT_LANES = {
|
|
9076
|
+
"collection-write": ["in"]
|
|
9077
|
+
};
|
|
9078
|
+
function fanOutUrlItemIsText(nodeType, targetHandle) {
|
|
9079
|
+
const lanes = URL_ITEM_IS_TEXT_LANES[nodeType ?? ""];
|
|
9080
|
+
return lanes !== void 0 && lanes.includes(targetHandle ?? "");
|
|
8680
9081
|
}
|
|
8681
|
-
function isTextList(aligned) {
|
|
9082
|
+
function isTextList(aligned, nodeType, targetHandle) {
|
|
8682
9083
|
const first = aligned.find((v) => !isBlank(v));
|
|
8683
|
-
|
|
9084
|
+
if (first === void 0) return false;
|
|
9085
|
+
return !isFanOutUrlItem(first) || fanOutUrlItemIsText(nodeType, targetHandle);
|
|
8684
9086
|
}
|
|
8685
9087
|
function planFanOut(fanOut, nodeType, nodeData) {
|
|
8686
9088
|
const items = expandItemsWithRepeat(fanOut?.items, nodeType, nodeData);
|
|
@@ -9961,7 +10363,13 @@ var NODE_MAPPABLE_FIELDS = {
|
|
|
9961
10363
|
"edit-video-pro": ["prompt"],
|
|
9962
10364
|
"video-analysis": ["analysisFocus", "youtubeUrl"],
|
|
9963
10365
|
"video-to-video": ["prompt"],
|
|
9964
|
-
|
|
10366
|
+
// + the two neighbour-text fields (continuity across clips): a wired Text node can feed
|
|
10367
|
+
// what is spoken before / after this clip, and {} injection works in them as in directText.
|
|
10368
|
+
"text-to-speech": ["directText", "previousText", "nextText"],
|
|
10369
|
+
// Save to Collection: the record's own fields, each mappable from an upstream
|
|
10370
|
+
// node or a {Ref}; the link field is `link` (node-data keys ending in url are
|
|
10371
|
+
// locked by the Copilot's deny-list).
|
|
10372
|
+
"collection-write": ["title", "text", "link", "dedupeKey"],
|
|
9965
10373
|
"lip-sync": ["prompt"],
|
|
9966
10374
|
"generate-music": ["prompt", "lyrics", "genre", "mood"],
|
|
9967
10375
|
"text-to-audio": ["prompt"],
|
|
@@ -10183,6 +10591,136 @@ function nodeFeedsAnything(nodes, edges, nodeId) {
|
|
|
10183
10591
|
return (buildFeedMaps(nodes, edges).children.get(nodeId) ?? []).length > 0;
|
|
10184
10592
|
}
|
|
10185
10593
|
|
|
10594
|
+
// src/preview-gate.ts
|
|
10595
|
+
var PREVIEW_RENDER_NODE_TYPES = new Set(RENDER_NODE_TYPE_IDS);
|
|
10596
|
+
var PREVIEW_REVIEW_REQUIRED = "preview_review_required";
|
|
10597
|
+
var PREVIEW_RENDER_NESTED = "preview_render_nested";
|
|
10598
|
+
var NO_SAVED_RENDER_STAMPS = {
|
|
10599
|
+
output: () => void 0,
|
|
10600
|
+
batch: () => void 0
|
|
10601
|
+
};
|
|
10602
|
+
var SAVED_RENDER_STAMPS = NO_SAVED_RENDER_STAMPS;
|
|
10603
|
+
var dataOf = (n) => n.data && typeof n.data === "object" ? n.data : {};
|
|
10604
|
+
var isPreviewStamp = (stamp) => stamp?.quality === "proxy";
|
|
10605
|
+
function rendersAsPreview(node) {
|
|
10606
|
+
return PREVIEW_RENDER_NODE_TYPES.has(node.type ?? "") && dataOf(node).quality === "proxy";
|
|
10607
|
+
}
|
|
10608
|
+
var TELEPORT_TYPES = /* @__PURE__ */ new Set(["teleport-send", "teleport-receive"]);
|
|
10609
|
+
var isTeleport = (n) => TELEPORT_TYPES.has(n?.type ?? "");
|
|
10610
|
+
var outputModeOf = (edge) => {
|
|
10611
|
+
const mode = edge.data && typeof edge.data === "object" ? edge.data.outputMode : void 0;
|
|
10612
|
+
return typeof mode === "string" ? mode : void 0;
|
|
10613
|
+
};
|
|
10614
|
+
function readsEach(render, consumerEdge, renderHandle) {
|
|
10615
|
+
return (outputModeOf(consumerEdge) ?? defaultEdgeOutputMode(render.type, renderHandle)) === "each";
|
|
10616
|
+
}
|
|
10617
|
+
function savedPreviewConsumers(render, children, nodeById, edges, reader) {
|
|
10618
|
+
const data = dataOf(render);
|
|
10619
|
+
const scalarIsPreview = isPreviewStamp(reader.output(data));
|
|
10620
|
+
const batch = reader.batch(data);
|
|
10621
|
+
const eachIsPreview = batch ? batch.some(isPreviewStamp) : scalarIsPreview;
|
|
10622
|
+
const out = /* @__PURE__ */ new Set();
|
|
10623
|
+
const visited = /* @__PURE__ */ new Set([render.id]);
|
|
10624
|
+
const walk3 = (from, renderHandle, isRender) => {
|
|
10625
|
+
const wires = edges.filter((e) => e.source === from);
|
|
10626
|
+
for (const child of children.get(from) ?? []) {
|
|
10627
|
+
const wiresToChild = wires.filter((e) => e.target === child);
|
|
10628
|
+
if (isTeleport(nodeById.get(child))) {
|
|
10629
|
+
if (visited.has(child)) continue;
|
|
10630
|
+
visited.add(child);
|
|
10631
|
+
if (isRender && wiresToChild.length > 0) for (const w of wiresToChild) walk3(child, w.sourceHandle, false);
|
|
10632
|
+
else walk3(child, renderHandle, false);
|
|
10633
|
+
continue;
|
|
10634
|
+
}
|
|
10635
|
+
const preview = wiresToChild.length === 0 ? scalarIsPreview : wiresToChild.some(
|
|
10636
|
+
(e) => readsEach(render, e, isRender ? e.sourceHandle : renderHandle) ? eachIsPreview : scalarIsPreview
|
|
10637
|
+
);
|
|
10638
|
+
if (preview) out.add(child);
|
|
10639
|
+
}
|
|
10640
|
+
};
|
|
10641
|
+
walk3(render.id, void 0, true);
|
|
10642
|
+
return [...out];
|
|
10643
|
+
}
|
|
10644
|
+
function previewStops(nodes, edges, run = {}) {
|
|
10645
|
+
const nodeById = new Map(nodes.map((n) => [n.id, n]));
|
|
10646
|
+
const executes = run.executes ?? ((id) => {
|
|
10647
|
+
const n = nodeById.get(id);
|
|
10648
|
+
return !!n && dataOf(n).skipped !== true;
|
|
10649
|
+
});
|
|
10650
|
+
const reader = run.savedRenders ?? SAVED_RENDER_STAMPS;
|
|
10651
|
+
const { children } = buildFeedMaps(nodes, edges);
|
|
10652
|
+
const previewRenderIds = [];
|
|
10653
|
+
const savedPreviewRenderIds = [];
|
|
10654
|
+
const seeds = [];
|
|
10655
|
+
for (const n of nodes) {
|
|
10656
|
+
if (!PREVIEW_RENDER_NODE_TYPES.has(n.type ?? "")) continue;
|
|
10657
|
+
const kids = children.get(n.id) ?? [];
|
|
10658
|
+
if (executes(n.id)) {
|
|
10659
|
+
if (!rendersAsPreview(n)) continue;
|
|
10660
|
+
previewRenderIds.push(n.id);
|
|
10661
|
+
seeds.push(...kids);
|
|
10662
|
+
} else {
|
|
10663
|
+
const consumers = savedPreviewConsumers(n, children, nodeById, edges, reader);
|
|
10664
|
+
if (consumers.length === 0) continue;
|
|
10665
|
+
savedPreviewRenderIds.push(n.id);
|
|
10666
|
+
seeds.push(...consumers);
|
|
10667
|
+
}
|
|
10668
|
+
}
|
|
10669
|
+
const gated = /* @__PURE__ */ new Set();
|
|
10670
|
+
const queue = [...seeds];
|
|
10671
|
+
while (queue.length > 0) {
|
|
10672
|
+
const id = queue.shift();
|
|
10673
|
+
if (gated.has(id)) continue;
|
|
10674
|
+
gated.add(id);
|
|
10675
|
+
for (const next of children.get(id) ?? []) if (!gated.has(next)) queue.push(next);
|
|
10676
|
+
}
|
|
10677
|
+
return { previewRenderIds, savedPreviewRenderIds, gatedNodeIds: gated };
|
|
10678
|
+
}
|
|
10679
|
+
function previewGatedNodeIds(nodes, edges, run) {
|
|
10680
|
+
return new Set(previewStops(nodes, edges, run).gatedNodeIds);
|
|
10681
|
+
}
|
|
10682
|
+
function holdsPreviewRender(nodes, edges, run) {
|
|
10683
|
+
const stops = previewStops(nodes, edges, run);
|
|
10684
|
+
return stops.previewRenderIds.length > 0 || stops.savedPreviewRenderIds.length > 0;
|
|
10685
|
+
}
|
|
10686
|
+
var RUN_OVERRIDE_CLEARED_FIELDS = [
|
|
10687
|
+
"generatedResults",
|
|
10688
|
+
"activeResultIndex",
|
|
10689
|
+
"generatedImageUrl",
|
|
10690
|
+
"generatedVideoUrl",
|
|
10691
|
+
"generatedAudioUrl",
|
|
10692
|
+
"generatedText"
|
|
10693
|
+
];
|
|
10694
|
+
function withRunOverrides(nodes, overrides) {
|
|
10695
|
+
if (!overrides) return [...nodes];
|
|
10696
|
+
return nodes.map((n) => {
|
|
10697
|
+
const fields = overrides[n.id];
|
|
10698
|
+
if (!fields) return n;
|
|
10699
|
+
const merged = mergeNodeInputOverrides(n.type ?? void 0, { ...dataOf(n) }, { ...fields });
|
|
10700
|
+
for (const key of RUN_OVERRIDE_CLEARED_FIELDS) delete merged[key];
|
|
10701
|
+
return { ...n, data: merged };
|
|
10702
|
+
});
|
|
10703
|
+
}
|
|
10704
|
+
|
|
10705
|
+
// src/run-continuation.ts
|
|
10706
|
+
var CONTINUATION_NOT_FOUND = "continuation_not_found";
|
|
10707
|
+
var CONTINUATION_WORKFLOW_MISMATCH = "continuation_workflow_mismatch";
|
|
10708
|
+
var CONTINUATION_VERSION_MISMATCH = "continuation_version_mismatch";
|
|
10709
|
+
var CONTINUATION_NOT_COMPLETED = "continuation_not_completed";
|
|
10710
|
+
var CONTINUATION_SUBSET_REQUIRED = "continuation_subset_required";
|
|
10711
|
+
var RUN_CONTINUATION_CODES = [
|
|
10712
|
+
CONTINUATION_NOT_FOUND,
|
|
10713
|
+
CONTINUATION_WORKFLOW_MISMATCH,
|
|
10714
|
+
CONTINUATION_VERSION_MISMATCH,
|
|
10715
|
+
CONTINUATION_NOT_COMPLETED,
|
|
10716
|
+
CONTINUATION_SUBSET_REQUIRED
|
|
10717
|
+
];
|
|
10718
|
+
|
|
10719
|
+
// src/render-final.ts
|
|
10720
|
+
var RENDER_FINAL_NODE_NOT_FOUND = "render_final_node_not_found";
|
|
10721
|
+
var RENDER_FINAL_NOT_A_RENDER = "render_final_not_a_render";
|
|
10722
|
+
var RENDER_FINAL_CODES = [RENDER_FINAL_NODE_NOT_FOUND, RENDER_FINAL_NOT_A_RENDER];
|
|
10723
|
+
|
|
10186
10724
|
// src/schedule-rules.ts
|
|
10187
10725
|
var SCHEDULE_RULE_KINDS = ["minutes", "hours", "days", "weeks", "months", "cron"];
|
|
10188
10726
|
var SCHEDULE_EVERY_LIMITS = {
|
|
@@ -10378,8 +10916,8 @@ function matchesCronField(field, value, min, max) {
|
|
|
10378
10916
|
if (start === null || end === null) return false;
|
|
10379
10917
|
return value >= start && value <= end;
|
|
10380
10918
|
}
|
|
10381
|
-
const
|
|
10382
|
-
return !Number.isNaN(
|
|
10919
|
+
const num3 = parseInt(field, 10);
|
|
10920
|
+
return !Number.isNaN(num3) && num3 === value;
|
|
10383
10921
|
}
|
|
10384
10922
|
function parseRange(range) {
|
|
10385
10923
|
const parts = range.split("-");
|
|
@@ -11088,6 +11626,225 @@ function normalizeSavedPostTags(tags) {
|
|
|
11088
11626
|
return Array.from(new Set(clean2)).slice(0, SAVED_POST_MAX_TAGS);
|
|
11089
11627
|
}
|
|
11090
11628
|
|
|
11629
|
+
// src/collections.ts
|
|
11630
|
+
var COLLECTION_NAME_MAX = 80;
|
|
11631
|
+
var COLLECTION_DESCRIPTION_MAX = 500;
|
|
11632
|
+
var COLLECTION_RECORD_TITLE_MAX = 500;
|
|
11633
|
+
var COLLECTION_RECORD_TEXT_MAX = 2e4;
|
|
11634
|
+
var COLLECTION_RECORD_URL_MAX = 2e3;
|
|
11635
|
+
var COLLECTION_RECORD_MEDIA_MAX = 20;
|
|
11636
|
+
var COLLECTION_RECORD_FIELDS_MAX = 50;
|
|
11637
|
+
var COLLECTION_RECORD_FIELDS_BYTES_MAX = 16 * 1024;
|
|
11638
|
+
var COLLECTION_DEDUPE_KEY_MAX = 300;
|
|
11639
|
+
var COLLECTION_IDEMPOTENCY_KEY_MAX = 200;
|
|
11640
|
+
var COLLECTIONS_PAGE_MAX = 100;
|
|
11641
|
+
var COLLECTIONS_PAGE_DEFAULT = 50;
|
|
11642
|
+
var COLLECTION_HEADLINE_MAX = 120;
|
|
11643
|
+
var COLLECTION_MEDIA_TYPES = ["image", "video", "audio", "link"];
|
|
11644
|
+
var COLLECTION_TIER_CAPS = {
|
|
11645
|
+
free: { collections: 3, records: 500 },
|
|
11646
|
+
payg: { collections: 10, records: 5e3 },
|
|
11647
|
+
basic: { collections: 10, records: 5e3 },
|
|
11648
|
+
standard: { collections: 30, records: 2e4 },
|
|
11649
|
+
pro: { collections: 100, records: 1e5 },
|
|
11650
|
+
business: { collections: 300, records: 25e4 },
|
|
11651
|
+
enterprise: { collections: 300, records: 25e4 }
|
|
11652
|
+
};
|
|
11653
|
+
function collectionCapsForTier(tier) {
|
|
11654
|
+
return tier ? COLLECTION_TIER_CAPS[tier] : void 0;
|
|
11655
|
+
}
|
|
11656
|
+
var COLLECTION_DIGEST_SEPARATOR = "\n\n---\n\n";
|
|
11657
|
+
var COLLECTION_READ_WINDOW_HOURS_MAX = 720;
|
|
11658
|
+
var COLLECTION_READ_LIMIT_MAX = 200;
|
|
11659
|
+
function collectionReadSince(amount, unit, now = Date.now()) {
|
|
11660
|
+
const hours = Math.min(COLLECTION_READ_WINDOW_HOURS_MAX, Math.max(1, Math.floor(Number.isFinite(amount) ? amount : 24)) * (unit === "days" ? 24 : 1));
|
|
11661
|
+
return new Date(now - hours * 36e5).toISOString();
|
|
11662
|
+
}
|
|
11663
|
+
var isRecord2 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
11664
|
+
var str2 = (v) => typeof v === "string" && v.trim().length > 0 ? v : void 0;
|
|
11665
|
+
var isScalar = (v) => typeof v === "string" || typeof v === "number" && Number.isFinite(v) || typeof v === "boolean";
|
|
11666
|
+
function isCollectionUrl(v) {
|
|
11667
|
+
return typeof v === "string" && /^https?:\/\/\S+$/i.test(v) && v.length <= COLLECTION_RECORD_URL_MAX;
|
|
11668
|
+
}
|
|
11669
|
+
var isHttpUrl = isCollectionUrl;
|
|
11670
|
+
function clampChars(text, max) {
|
|
11671
|
+
if (text.length <= max) return text;
|
|
11672
|
+
const points2 = Array.from(text);
|
|
11673
|
+
return points2.length <= max ? text : points2.slice(0, max).join("");
|
|
11674
|
+
}
|
|
11675
|
+
function fitCollectionField(key, value) {
|
|
11676
|
+
switch (key) {
|
|
11677
|
+
case "title":
|
|
11678
|
+
return clampChars(value, COLLECTION_RECORD_TITLE_MAX);
|
|
11679
|
+
case "text":
|
|
11680
|
+
return clampChars(value, COLLECTION_RECORD_TEXT_MAX);
|
|
11681
|
+
case "dedupeKey":
|
|
11682
|
+
return clampChars(value, COLLECTION_DEDUPE_KEY_MAX);
|
|
11683
|
+
case "link":
|
|
11684
|
+
return value.length <= COLLECTION_RECORD_URL_MAX ? value : void 0;
|
|
11685
|
+
}
|
|
11686
|
+
}
|
|
11687
|
+
function normalizeDedupeKey(raw) {
|
|
11688
|
+
if (typeof raw === "number" && Number.isFinite(raw)) raw = String(raw);
|
|
11689
|
+
if (typeof raw !== "string") return null;
|
|
11690
|
+
const compact = raw.trim().replace(/\s+/g, " ");
|
|
11691
|
+
const key = clampChars(looksLikeLink(compact) ? canonicalUrl(compact) : compact.toLowerCase(), COLLECTION_DEDUPE_KEY_MAX).trim();
|
|
11692
|
+
return key.length > 0 ? key : null;
|
|
11693
|
+
}
|
|
11694
|
+
var looksLikeLink = (s) => isCollectionUrl(s);
|
|
11695
|
+
var COLLECTION_EVICT_MAX_PER_WRITE = 100;
|
|
11696
|
+
function canonicalUrl(url) {
|
|
11697
|
+
try {
|
|
11698
|
+
return new URL(url).href;
|
|
11699
|
+
} catch {
|
|
11700
|
+
return url;
|
|
11701
|
+
}
|
|
11702
|
+
}
|
|
11703
|
+
function isCollectionMedia(v) {
|
|
11704
|
+
return isRecord2(v) && COLLECTION_MEDIA_TYPES.includes(v.type) && isHttpUrl(v.url) && (v.posterUrl === void 0 || v.posterUrl === null || isHttpUrl(v.posterUrl));
|
|
11705
|
+
}
|
|
11706
|
+
function normalizeCollectionMedia(value) {
|
|
11707
|
+
if (!Array.isArray(value)) return [];
|
|
11708
|
+
const seen = /* @__PURE__ */ new Set();
|
|
11709
|
+
const out = [];
|
|
11710
|
+
for (const item of value) {
|
|
11711
|
+
if (out.length >= COLLECTION_RECORD_MEDIA_MAX) break;
|
|
11712
|
+
if (!isCollectionMedia(item) || seen.has(item.url)) continue;
|
|
11713
|
+
seen.add(item.url);
|
|
11714
|
+
out.push({ type: item.type, url: item.url, ...item.posterUrl ? { posterUrl: item.posterUrl } : {} });
|
|
11715
|
+
}
|
|
11716
|
+
return out;
|
|
11717
|
+
}
|
|
11718
|
+
function normalizeCollectionFields(value) {
|
|
11719
|
+
if (!isRecord2(value)) return {};
|
|
11720
|
+
const out = {};
|
|
11721
|
+
let bytes = 2;
|
|
11722
|
+
let count = 0;
|
|
11723
|
+
for (const [key, v] of Object.entries(value)) {
|
|
11724
|
+
if (count >= COLLECTION_RECORD_FIELDS_MAX) break;
|
|
11725
|
+
if (!isScalar(v) || key.length === 0 || key.length > 100) continue;
|
|
11726
|
+
const entry = JSON.stringify(key) + ":" + JSON.stringify(v) + ",";
|
|
11727
|
+
if (bytes + entry.length > COLLECTION_RECORD_FIELDS_BYTES_MAX) break;
|
|
11728
|
+
out[key] = v;
|
|
11729
|
+
bytes += entry.length;
|
|
11730
|
+
count += 1;
|
|
11731
|
+
}
|
|
11732
|
+
return out;
|
|
11733
|
+
}
|
|
11734
|
+
function collectionRecordHeadline(record) {
|
|
11735
|
+
const title = (typeof record.title === "string" ? record.title : "").trim();
|
|
11736
|
+
if (title) return clampChars(title, COLLECTION_HEADLINE_MAX);
|
|
11737
|
+
const line = (typeof record.text === "string" ? record.text : "").split(/\r?\n/).map((l) => l.trim()).find((l) => l.length > 0);
|
|
11738
|
+
if (line) return line.length > COLLECTION_HEADLINE_MAX ? `${clampChars(line, COLLECTION_HEADLINE_MAX - 1)}\u2026` : line;
|
|
11739
|
+
return typeof record.url === "string" ? record.url : "";
|
|
11740
|
+
}
|
|
11741
|
+
function collectionRecordsDigest(records, format = "headlines") {
|
|
11742
|
+
const rows = records.filter((r) => typeof r === "object" && r !== null);
|
|
11743
|
+
const str7 = (v) => typeof v === "string" ? v : "";
|
|
11744
|
+
if (format === "full") {
|
|
11745
|
+
return rows.map((r) => {
|
|
11746
|
+
const head = collectionRecordHeadline(r);
|
|
11747
|
+
const body = str7(r.text).trim();
|
|
11748
|
+
const lines = [head ? `### ${head}` : "", body && body !== head ? body : "", str7(r.url)].filter((l) => l.length > 0);
|
|
11749
|
+
return lines.join("\n");
|
|
11750
|
+
}).filter((block) => block.length > 0).join(COLLECTION_DIGEST_SEPARATOR);
|
|
11751
|
+
}
|
|
11752
|
+
return rows.map((r) => {
|
|
11753
|
+
const parts = [collectionRecordHeadline(r)];
|
|
11754
|
+
const created = str7(r.createdAt);
|
|
11755
|
+
if (created) parts.push(created.slice(0, 10));
|
|
11756
|
+
const url = str7(r.url);
|
|
11757
|
+
if (url && url !== parts[0]) parts.push(url);
|
|
11758
|
+
return `- ${parts.filter((p) => p.length > 0).join(" \xB7 ")}`;
|
|
11759
|
+
}).join("\n");
|
|
11760
|
+
}
|
|
11761
|
+
var TITLE_KEYS = ["title", "headline", "name", "subject"];
|
|
11762
|
+
var TEXT_KEYS = ["text", "body", "caption", "description", "content", "summary", "dek"];
|
|
11763
|
+
var URL_KEYS = ["url", "postUrl", "link", "href", "permalink"];
|
|
11764
|
+
var DEDUPE_KEYS = ["slug", "postId", "externalId", "id"];
|
|
11765
|
+
var isDedupeValue = (key, v) => key === "id" ? typeof v === "string" && v.trim().length > 0 && !/^\d+$/.test(v.trim()) : typeof v === "string" && v.trim().length > 0 || typeof v === "number" && Number.isFinite(v);
|
|
11766
|
+
var IMAGE_KEYS = ["imageUrl", "thumbnailUrl", "image", "thumbnail"];
|
|
11767
|
+
var VIDEO_KEYS = ["videoUrl", "video"];
|
|
11768
|
+
var AUDIO_KEYS = ["audioUrl", "audio"];
|
|
11769
|
+
var MEDIA_SHAPED_KEYS = /* @__PURE__ */ new Set(["media", ...IMAGE_KEYS, ...VIDEO_KEYS, ...AUDIO_KEYS]);
|
|
11770
|
+
function firstString(item, keys) {
|
|
11771
|
+
for (const key of keys) {
|
|
11772
|
+
const v = str2(item[key]);
|
|
11773
|
+
if (v !== void 0) return v;
|
|
11774
|
+
}
|
|
11775
|
+
return void 0;
|
|
11776
|
+
}
|
|
11777
|
+
function firstUrl(item, keys) {
|
|
11778
|
+
for (const key of keys) {
|
|
11779
|
+
const v = item[key];
|
|
11780
|
+
if (typeof v === "string" && isHttpUrl(v.trim())) return v.trim();
|
|
11781
|
+
}
|
|
11782
|
+
return null;
|
|
11783
|
+
}
|
|
11784
|
+
function mediaFromItem(item) {
|
|
11785
|
+
const seen = /* @__PURE__ */ new Set();
|
|
11786
|
+
const out = [];
|
|
11787
|
+
const push = (m) => {
|
|
11788
|
+
if (out.length >= COLLECTION_RECORD_MEDIA_MAX) return false;
|
|
11789
|
+
if (!seen.has(m.url)) {
|
|
11790
|
+
seen.add(m.url);
|
|
11791
|
+
out.push(m);
|
|
11792
|
+
}
|
|
11793
|
+
return true;
|
|
11794
|
+
};
|
|
11795
|
+
if (Array.isArray(item.media)) {
|
|
11796
|
+
for (const entry of item.media) {
|
|
11797
|
+
if (out.length >= COLLECTION_RECORD_MEDIA_MAX) break;
|
|
11798
|
+
if (!isRecord2(entry)) continue;
|
|
11799
|
+
const type = entry.type === "photo" ? "image" : entry.type;
|
|
11800
|
+
const poster = isHttpUrl(entry.posterUrl) ? entry.posterUrl : void 0;
|
|
11801
|
+
if (type === "video" && !isHttpUrl(entry.url) && poster) {
|
|
11802
|
+
push({ type: "image", url: poster });
|
|
11803
|
+
continue;
|
|
11804
|
+
}
|
|
11805
|
+
if (isCollectionMedia({ ...entry, type })) push({ type, url: entry.url, ...poster ? { posterUrl: poster } : {} });
|
|
11806
|
+
}
|
|
11807
|
+
} else if (isRecord2(item.media)) {
|
|
11808
|
+
const m = item.media;
|
|
11809
|
+
if (isHttpUrl(m.videoUrl)) push({ type: "video", url: m.videoUrl, ...isHttpUrl(m.thumbnailUrl) ? { posterUrl: m.thumbnailUrl } : {} });
|
|
11810
|
+
else if (isHttpUrl(m.thumbnailUrl)) push({ type: "image", url: m.thumbnailUrl });
|
|
11811
|
+
}
|
|
11812
|
+
for (const key of IMAGE_KEYS) if (isHttpUrl(item[key]) && !push({ type: "image", url: item[key] })) break;
|
|
11813
|
+
for (const key of VIDEO_KEYS) if (isHttpUrl(item[key]) && !push({ type: "video", url: item[key] })) break;
|
|
11814
|
+
for (const key of AUDIO_KEYS) if (isHttpUrl(item[key]) && !push({ type: "audio", url: item[key] })) break;
|
|
11815
|
+
return out;
|
|
11816
|
+
}
|
|
11817
|
+
function ingestRecordFromJson(item) {
|
|
11818
|
+
if (!isRecord2(item)) {
|
|
11819
|
+
const text2 = typeof item === "string" ? item : item === void 0 || item === null ? "" : JSON.stringify(item);
|
|
11820
|
+
return { title: "", text: clampChars(text2, COLLECTION_RECORD_TEXT_MAX), url: null, media: [], fields: {}, dedupeKey: null };
|
|
11821
|
+
}
|
|
11822
|
+
const title = clampChars((firstString(item, TITLE_KEYS) ?? "").trim(), COLLECTION_RECORD_TITLE_MAX);
|
|
11823
|
+
const text = clampChars(firstString(item, TEXT_KEYS) ?? "", COLLECTION_RECORD_TEXT_MAX);
|
|
11824
|
+
const url = firstUrl(item, URL_KEYS);
|
|
11825
|
+
const media = mediaFromItem(item);
|
|
11826
|
+
const taken = /* @__PURE__ */ new Set([...TITLE_KEYS, ...TEXT_KEYS, ...URL_KEYS, ...MEDIA_SHAPED_KEYS]);
|
|
11827
|
+
const fields = {};
|
|
11828
|
+
let kept = 0;
|
|
11829
|
+
for (const [key, v] of Object.entries(item)) {
|
|
11830
|
+
if (kept >= COLLECTION_RECORD_FIELDS_MAX) break;
|
|
11831
|
+
if (taken.has(key)) continue;
|
|
11832
|
+
if (isScalar(v)) fields[key] = v;
|
|
11833
|
+
else if (isRecord2(v) && typeof v.name === "string" && v.name.trim()) fields[key] = v.name;
|
|
11834
|
+
else continue;
|
|
11835
|
+
kept += 1;
|
|
11836
|
+
}
|
|
11837
|
+
const dedupeSource = url ?? DEDUPE_KEYS.filter((k) => isDedupeValue(k, item[k])).map((k) => item[k])[0];
|
|
11838
|
+
return {
|
|
11839
|
+
title,
|
|
11840
|
+
text,
|
|
11841
|
+
url,
|
|
11842
|
+
media,
|
|
11843
|
+
fields: normalizeCollectionFields(fields),
|
|
11844
|
+
dedupeKey: normalizeDedupeKey(dedupeSource)
|
|
11845
|
+
};
|
|
11846
|
+
}
|
|
11847
|
+
|
|
11091
11848
|
// src/competitors.ts
|
|
11092
11849
|
var COMPETITOR_ACCOUNT_KEYS = ["tiktok", "instagram", "youtube", "x", "linkedin", "meta_ads"];
|
|
11093
11850
|
var COMPETITOR_ABOUT_PLATFORMS = ["tiktok", "instagram", "youtube", "x", "reddit", "linkedin"];
|
|
@@ -12444,35 +13201,49 @@ function togglePick(current, id, maxSelected) {
|
|
|
12444
13201
|
return [...current.slice(1), id];
|
|
12445
13202
|
}
|
|
12446
13203
|
|
|
12447
|
-
// src/tts-
|
|
12448
|
-
var
|
|
12449
|
-
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
|
|
12453
|
-
return typeof provider === "string" && Object.hasOwn(TTS_PROVIDER_ALIASES, provider) ? TTS_PROVIDER_ALIASES[provider] : provider;
|
|
13204
|
+
// src/tts-neighbour-text.ts
|
|
13205
|
+
var TTS_NEIGHBOUR_TEXT_MAX_CHARS = 1e3;
|
|
13206
|
+
function usableText(value) {
|
|
13207
|
+
if (typeof value !== "string") return void 0;
|
|
13208
|
+
const trimmed2 = value.trim();
|
|
13209
|
+
return trimmed2 ? trimmed2 : void 0;
|
|
12454
13210
|
}
|
|
12455
|
-
function
|
|
13211
|
+
function normalizeTtsNeighbourText(options) {
|
|
13212
|
+
const out = {};
|
|
13213
|
+
const previous = usableText(options?.previousText);
|
|
13214
|
+
if (previous !== void 0) {
|
|
13215
|
+
out.previousText = previous.length > TTS_NEIGHBOUR_TEXT_MAX_CHARS ? previous.slice(-TTS_NEIGHBOUR_TEXT_MAX_CHARS) : previous;
|
|
13216
|
+
}
|
|
13217
|
+
const next = usableText(options?.nextText);
|
|
13218
|
+
if (next !== void 0) {
|
|
13219
|
+
out.nextText = next.length > TTS_NEIGHBOUR_TEXT_MAX_CHARS ? next.slice(0, TTS_NEIGHBOUR_TEXT_MAX_CHARS) : next;
|
|
13220
|
+
}
|
|
13221
|
+
return out;
|
|
13222
|
+
}
|
|
13223
|
+
|
|
13224
|
+
// src/dialogue-capabilities.ts
|
|
13225
|
+
function findDialogueCapabilities(provider) {
|
|
12456
13226
|
if (typeof provider !== "string" || !provider) return void 0;
|
|
12457
|
-
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
return entry.modes.includes("tts") ? entry.tts : void 0;
|
|
13227
|
+
if (!Object.hasOwn(MODEL_CATALOG, provider)) return void 0;
|
|
13228
|
+
const entry = MODEL_CATALOG[provider];
|
|
13229
|
+
return entry.modes.includes("dialogue") ? entry.tts : void 0;
|
|
12461
13230
|
}
|
|
12462
|
-
function
|
|
12463
|
-
return
|
|
13231
|
+
function dialogueProviderOf(provider) {
|
|
13232
|
+
return findDialogueCapabilities(provider) ? provider : DEFAULT_DIALOGUE_PROVIDER;
|
|
12464
13233
|
}
|
|
12465
|
-
function
|
|
12466
|
-
return
|
|
13234
|
+
function getDialogueCapabilities(provider) {
|
|
13235
|
+
return MODEL_CATALOG[dialogueProviderOf(provider)].tts;
|
|
12467
13236
|
}
|
|
12468
|
-
function
|
|
12469
|
-
return
|
|
13237
|
+
function dialogueHasLever(provider, lever) {
|
|
13238
|
+
return getDialogueCapabilities(provider).levers.includes(lever);
|
|
12470
13239
|
}
|
|
12471
|
-
function
|
|
12472
|
-
return
|
|
13240
|
+
function dialogueSupportsTimestamps(provider) {
|
|
13241
|
+
return getDialogueCapabilities(provider).timestamps;
|
|
12473
13242
|
}
|
|
12474
|
-
function
|
|
12475
|
-
|
|
13243
|
+
function dialogueStabilityAccepted(provider, value) {
|
|
13244
|
+
if (!Number.isFinite(value) || value < 0 || value > 1) return false;
|
|
13245
|
+
const steps = getDialogueCapabilities(provider).stabilitySteps;
|
|
13246
|
+
return steps ? steps.includes(value) : true;
|
|
12476
13247
|
}
|
|
12477
13248
|
|
|
12478
13249
|
// src/safety-retry-policy.ts
|
|
@@ -12580,42 +13351,199 @@ function resolveCaptionLevers(style, look, explicit, fontSize) {
|
|
|
12580
13351
|
return resolveCaptionLook(effective, explicit, fontSize);
|
|
12581
13352
|
}
|
|
12582
13353
|
|
|
12583
|
-
// src/
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
13354
|
+
// src/caption-plan.ts
|
|
13355
|
+
var nonNegative = (v) => typeof v === "number" && Number.isFinite(v) && v >= 0;
|
|
13356
|
+
function parseCaptionPlan(raw) {
|
|
13357
|
+
let value = raw;
|
|
13358
|
+
if (typeof raw === "string") {
|
|
13359
|
+
try {
|
|
13360
|
+
value = JSON.parse(raw);
|
|
13361
|
+
} catch {
|
|
13362
|
+
return { error: "Caption plan: not valid JSON." };
|
|
13363
|
+
}
|
|
13364
|
+
}
|
|
13365
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return { error: "Caption plan: not an object." };
|
|
13366
|
+
const o = value;
|
|
13367
|
+
if (o.v !== 1) return { error: "Caption plan: v must be 1." };
|
|
13368
|
+
if (typeof o.hookText !== "string") return { error: "Caption plan: hookText must be text." };
|
|
13369
|
+
for (const f of ["hookEndMs", "bodyEndMs"]) {
|
|
13370
|
+
if (!nonNegative(o[f])) return { error: `Caption plan: ${f} must be a non-negative number.` };
|
|
13371
|
+
}
|
|
13372
|
+
if (o.videoDurationMs !== void 0 && !nonNegative(o.videoDurationMs)) {
|
|
13373
|
+
return { error: "Caption plan: videoDurationMs must be a non-negative number." };
|
|
13374
|
+
}
|
|
13375
|
+
if (o.language !== void 0 && typeof o.language !== "string") return { error: "Caption plan: language must be text." };
|
|
13376
|
+
if (!Array.isArray(o.captions)) return { error: "Caption plan: captions must be a list." };
|
|
13377
|
+
const captions = [];
|
|
13378
|
+
for (let i = 0; i < o.captions.length; i++) {
|
|
13379
|
+
const c = o.captions[i];
|
|
13380
|
+
if (!c || typeof c !== "object" || typeof c.text !== "string" || !nonNegative(c.startMs) || !nonNegative(c.endMs)) {
|
|
13381
|
+
return { error: `Caption plan: captions[${i}] needs text, startMs and endMs.` };
|
|
13382
|
+
}
|
|
13383
|
+
if (c.endMs < c.startMs) return { error: `Caption plan: captions[${i}] ends before it starts.` };
|
|
13384
|
+
captions.push({ text: c.text, startMs: c.startMs, endMs: c.endMs });
|
|
13385
|
+
}
|
|
13386
|
+
return {
|
|
13387
|
+
plan: {
|
|
13388
|
+
v: 1,
|
|
13389
|
+
hookText: o.hookText,
|
|
13390
|
+
hookEndMs: o.hookEndMs,
|
|
13391
|
+
bodyEndMs: o.bodyEndMs,
|
|
13392
|
+
captions,
|
|
13393
|
+
...o.videoDurationMs !== void 0 ? { videoDurationMs: o.videoDurationMs } : {},
|
|
13394
|
+
...o.language !== void 0 ? { language: o.language } : {}
|
|
13395
|
+
}
|
|
13396
|
+
};
|
|
12588
13397
|
}
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
var
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
|
|
12603
|
-
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
|
|
13398
|
+
|
|
13399
|
+
// src/supported-fonts.ts
|
|
13400
|
+
var SUPPORTED_FONT_NAMES = [
|
|
13401
|
+
"Inter",
|
|
13402
|
+
"Roboto",
|
|
13403
|
+
"Open Sans",
|
|
13404
|
+
"Montserrat",
|
|
13405
|
+
"Poppins",
|
|
13406
|
+
"Raleway",
|
|
13407
|
+
"Nunito",
|
|
13408
|
+
"Lato",
|
|
13409
|
+
"Playfair Display",
|
|
13410
|
+
"Merriweather",
|
|
13411
|
+
"Lora",
|
|
13412
|
+
"EB Garamond",
|
|
13413
|
+
"Bebas Neue",
|
|
13414
|
+
"Oswald",
|
|
13415
|
+
"Anton",
|
|
13416
|
+
"Dancing Script",
|
|
13417
|
+
"Pacifico",
|
|
13418
|
+
"Caveat",
|
|
13419
|
+
"Roboto Mono",
|
|
13420
|
+
"Fira Code",
|
|
13421
|
+
"Rubik",
|
|
13422
|
+
"Heebo",
|
|
13423
|
+
"Cairo",
|
|
13424
|
+
"Tajawal"
|
|
13425
|
+
];
|
|
13426
|
+
|
|
13427
|
+
// src/caption-segment-schema.ts
|
|
13428
|
+
var captionFontWeightSchema = z.number().int().min(100).max(900).multipleOf(100);
|
|
13429
|
+
var nonBlankCaptionText = z.string().min(1).refine((t2) => /\S/.test(t2), { message: "text must contain a non-whitespace character" });
|
|
13430
|
+
var captionInputSchema = z.object({
|
|
13431
|
+
text: z.string(),
|
|
13432
|
+
// startMs/endMs are the visibility window and drive the highlight; timestampMs
|
|
13433
|
+
// is the word timestamp used by tiktok-words token timing; confidence is
|
|
13434
|
+
// metadata, ignored by rendering. timestampMs/confidence default to null.
|
|
13435
|
+
startMs: z.number().min(0),
|
|
13436
|
+
endMs: z.number().min(0),
|
|
13437
|
+
timestampMs: z.number().min(0).nullable().default(null),
|
|
13438
|
+
confidence: z.number().min(0).max(1).nullable().default(null)
|
|
13439
|
+
});
|
|
13440
|
+
var captionSegmentInputSchema = z.object({
|
|
13441
|
+
startMs: z.number().min(0),
|
|
13442
|
+
endMs: z.number().min(0),
|
|
13443
|
+
style: z.enum(ALL_CAPTION_STYLES).optional(),
|
|
13444
|
+
position: z.enum(["bottom", "top", "center"]).optional(),
|
|
13445
|
+
fontSize: z.number().min(12).max(200).optional(),
|
|
13446
|
+
color: z.string().optional(),
|
|
13447
|
+
backgroundColor: z.string().optional(),
|
|
13448
|
+
// A named look preset (outline/clean); explicit levers below override it.
|
|
13449
|
+
look: z.enum(CAPTION_LOOK_IDS).optional(),
|
|
13450
|
+
fontFamily: z.enum(SUPPORTED_FONT_NAMES).optional(),
|
|
13451
|
+
fontWeight: captionFontWeightSchema.optional(),
|
|
13452
|
+
strokeColor: z.string().optional(),
|
|
13453
|
+
strokeWidth: z.number().min(0).max(40).optional(),
|
|
13454
|
+
highlightColor: z.string().optional(),
|
|
13455
|
+
uppercase: z.boolean().optional(),
|
|
13456
|
+
positionY: z.number().min(0).max(100).optional(),
|
|
13457
|
+
animate: z.boolean().optional(),
|
|
13458
|
+
maxWordsPerLine: z.number().int().min(CAPTION_MAX_WORDS_PER_LINE_MIN).max(CAPTION_MAX_WORDS_PER_LINE_MAX).optional(),
|
|
13459
|
+
text: nonBlankCaptionText.optional(),
|
|
13460
|
+
captions: z.array(captionInputSchema).optional()
|
|
13461
|
+
}).refine((s) => s.endMs > s.startMs, { message: "segment endMs must be greater than startMs" });
|
|
13462
|
+
var CAPTION_SEGMENT_SCHEMA_KEYS = Object.keys(captionSegmentInputSchema.shape);
|
|
13463
|
+
function findSegmentOverlap(segments) {
|
|
13464
|
+
const sorted = [...segments].sort((a, b) => a.startMs - b.startMs);
|
|
13465
|
+
for (let i = 1; i < sorted.length; i++) {
|
|
13466
|
+
if (sorted[i].startMs < sorted[i - 1].endMs) {
|
|
13467
|
+
return `segments overlap: [${sorted[i - 1].startMs}, ${sorted[i - 1].endMs}) and [${sorted[i].startMs}, ${sorted[i].endMs})`;
|
|
13468
|
+
}
|
|
13469
|
+
}
|
|
13470
|
+
return null;
|
|
13471
|
+
}
|
|
13472
|
+
|
|
13473
|
+
// src/add-captions-plan.ts
|
|
13474
|
+
function captionPlanBodyLevers(nodeData, leverKeys) {
|
|
13475
|
+
const levers = {};
|
|
13476
|
+
for (const k of leverKeys) {
|
|
13477
|
+
const v = nodeData[k];
|
|
13478
|
+
if (v !== void 0 && v !== null) levers[k] = v;
|
|
13479
|
+
}
|
|
13480
|
+
return Object.keys(levers).length > 0 ? levers : void 0;
|
|
13481
|
+
}
|
|
13482
|
+
function styleCaptionPlan(raw, nodeData, styler) {
|
|
13483
|
+
const parsed = parseCaptionPlan(raw);
|
|
13484
|
+
if ("error" in parsed) return { error: parsed.error };
|
|
13485
|
+
const bodyLevers = captionPlanBodyLevers(nodeData, styler.leverKeys);
|
|
13486
|
+
const { segments } = styler.segmentsFor(parsed.plan, bodyLevers ? { bodyLevers } : void 0);
|
|
13487
|
+
for (let i = 0; i < segments.length; i++) {
|
|
13488
|
+
const r = captionSegmentInputSchema.safeParse(segments[i]);
|
|
13489
|
+
if (!r.success) return { error: `Caption plan: segment ${i + 1}: ${r.error.issues[0]?.message ?? "invalid"}.` };
|
|
13490
|
+
}
|
|
13491
|
+
const overlap = findSegmentOverlap(segments);
|
|
13492
|
+
if (overlap) return { error: `Caption plan: ${overlap}.` };
|
|
13493
|
+
return { segments };
|
|
13494
|
+
}
|
|
13495
|
+
|
|
13496
|
+
// src/node-pass-through.ts
|
|
13497
|
+
var present = (u) => typeof u === "string" && u.length > 0;
|
|
13498
|
+
function combineVideosPassThrough(videoUrls) {
|
|
13499
|
+
const urls = videoUrls.filter(present);
|
|
13500
|
+
return urls.length === 1 ? { videoUrl: urls[0], warning: "single_input" } : null;
|
|
13501
|
+
}
|
|
13502
|
+
function videoOverlayPassThrough(input) {
|
|
13503
|
+
if (!input.planWired || input.layerCount > 0 || !present(input.videoUrl)) return null;
|
|
13504
|
+
return { videoUrl: input.videoUrl, warning: "no_layers" };
|
|
13505
|
+
}
|
|
13506
|
+
function captionPlanPassThrough(input) {
|
|
13507
|
+
if (!input.planWired || input.segmentCount > 0 || !present(input.videoUrl)) return null;
|
|
13508
|
+
return { videoUrl: input.videoUrl, warning: "no_captions" };
|
|
13509
|
+
}
|
|
13510
|
+
|
|
13511
|
+
// src/transcribe-preflight.ts
|
|
13512
|
+
function transcribeWordTimestampsRefusal(provider) {
|
|
13513
|
+
const lane = provider || DEFAULT_TRANSCRIBE_NODE_PROVIDER;
|
|
13514
|
+
if (transcribeLaneSupportsWordTimestamps(lane)) return null;
|
|
13515
|
+
return `the "${lane}" engine does not return word timings \u2014 pick ${transcribeProvidersWithWordTimestamps().join(" or ")}`;
|
|
13516
|
+
}
|
|
13517
|
+
var TRANSCRIBE_JSON_OUT = "json";
|
|
13518
|
+
var TRANSCRIPT_IN = "transcript";
|
|
13519
|
+
var RENDER_JSON_OUT = "json";
|
|
13520
|
+
function findWordlessTranscriptFeeds(nodes, edges) {
|
|
13521
|
+
const byId = new Map(nodes.map((n) => [n.id, n]));
|
|
13522
|
+
const isSkipped = (n) => !n || n.data?.skipped === true;
|
|
13523
|
+
const out = [];
|
|
13524
|
+
for (const node of nodes) {
|
|
13525
|
+
if (node.type !== "transcribe" || isSkipped(node)) continue;
|
|
13526
|
+
const provider = typeof node.data?.provider === "string" && node.data.provider || DEFAULT_TRANSCRIBE_NODE_PROVIDER;
|
|
13527
|
+
const refusal = transcribeWordTimestampsRefusal(provider);
|
|
13528
|
+
if (!refusal) continue;
|
|
13529
|
+
const seen = /* @__PURE__ */ new Set();
|
|
13530
|
+
const frontier = [{ id: node.id, outHandle: TRANSCRIBE_JSON_OUT }];
|
|
13531
|
+
while (frontier.length > 0) {
|
|
13532
|
+
const { id, outHandle } = frontier.pop();
|
|
13533
|
+
for (const e of edges) {
|
|
13534
|
+
if (e.source !== id || (e.sourceHandle ?? null) !== outHandle || e.targetHandle !== TRANSCRIPT_IN) continue;
|
|
13535
|
+
const target = byId.get(e.target);
|
|
13536
|
+
if (isSkipped(target)) continue;
|
|
13537
|
+
if (target.type === "add-captions") {
|
|
12610
13538
|
out.push({
|
|
12611
13539
|
transcribeNodeId: node.id,
|
|
12612
13540
|
consumerNodeId: target.id,
|
|
12613
13541
|
provider,
|
|
12614
13542
|
message: `Captions need word timings, but ${refusal}.`
|
|
12615
13543
|
});
|
|
12616
|
-
} else if (target.type
|
|
13544
|
+
} else if (rendersTranscriptJson(target.type) && !seen.has(target.id)) {
|
|
12617
13545
|
seen.add(target.id);
|
|
12618
|
-
frontier.push({ id: target.id, outHandle:
|
|
13546
|
+
frontier.push({ id: target.id, outHandle: RENDER_JSON_OUT });
|
|
12619
13547
|
}
|
|
12620
13548
|
}
|
|
12621
13549
|
}
|
|
@@ -12780,9 +13708,16 @@ var EXECUTION_DATA_KEYS = /* @__PURE__ */ new Set([
|
|
|
12780
13708
|
// Row-aligned twin of __listResults (Extract Field, List output) — read only
|
|
12781
13709
|
// by the fan-out so two lists cut from one array pair by row.
|
|
12782
13710
|
"__alignedListResults",
|
|
13711
|
+
// A render's fan-out row stamps, row-aligned with __listResults: each row's
|
|
13712
|
+
// take identity, and the clip every row was sent for (a failed row too).
|
|
13713
|
+
"__listResultStamps",
|
|
12783
13714
|
// List fan-out window flag (abandon-guard exemption). Set/cleared by
|
|
12784
13715
|
// executeNodeForList — purely execution-related, never user-edited.
|
|
12785
13716
|
"__listRunning",
|
|
13717
|
+
// Why the last server run skipped this node (`empty_input`): a chip on the
|
|
13718
|
+
// card for the run that just ended, never a saved result — also in
|
|
13719
|
+
// TRANSIENT_RUNTIME_KEYS below.
|
|
13720
|
+
"__runSkipReason",
|
|
12786
13721
|
// One token per paid run still out on this node that no executor mark
|
|
12787
13722
|
// covers (the editor's `withRunInFlight`, around each paid call outside the
|
|
12788
13723
|
// executors). Purely execution-related, never user-edited; also in
|
|
@@ -12849,6 +13784,12 @@ var EXECUTION_DATA_KEYS = /* @__PURE__ */ new Set([
|
|
|
12849
13784
|
"searchResults",
|
|
12850
13785
|
"pickedIds",
|
|
12851
13786
|
"searchWarnings",
|
|
13787
|
+
// Save to Collection: how the last run ended for this node (inserted /
|
|
13788
|
+
// duplicate / replayed) and how many old records the cap evicted. RESULTS of
|
|
13789
|
+
// a run — Clear results wipes them, and a template, a preset or a run-only
|
|
13790
|
+
// patch never carries them as configuration.
|
|
13791
|
+
"lastOutcome",
|
|
13792
|
+
"lastEvicted",
|
|
12852
13793
|
// When the editor's "Clear results" last emptied this node (ISO time). Not a
|
|
12853
13794
|
// result and not config: bookkeeping that tells the load-time recovery lanes
|
|
12854
13795
|
// "this node is empty ON PURPOSE" — without it, every reload reads an empty
|
|
@@ -12878,6 +13819,7 @@ var TRANSIENT_RUNTIME_KEYS = /* @__PURE__ */ new Set([
|
|
|
12878
13819
|
"__listTotal",
|
|
12879
13820
|
"__listCompleted",
|
|
12880
13821
|
"__listRunning",
|
|
13822
|
+
"__runSkipReason",
|
|
12881
13823
|
// A paid run still out, held by the editor tab that started it. Never
|
|
12882
13824
|
// saved, so a reload, which has no such run, starts without one.
|
|
12883
13825
|
"__runsInFlight",
|
|
@@ -15500,6 +16442,24 @@ function resolveAudioCrossfadeCurve(id) {
|
|
|
15500
16442
|
return CURVES_BY_ID.get(id)?.ffmpeg ?? "tri";
|
|
15501
16443
|
}
|
|
15502
16444
|
|
|
16445
|
+
// src/fan-out-meta.ts
|
|
16446
|
+
function fanOutItemMeta(output) {
|
|
16447
|
+
const w = output?.clipWarnings;
|
|
16448
|
+
const d = output?.durationSec;
|
|
16449
|
+
return {
|
|
16450
|
+
warnings: Array.isArray(w) ? w.filter((x) => typeof x === "string") : [],
|
|
16451
|
+
durationSec: typeof d === "number" && Number.isFinite(d) && d > 0 ? d : null
|
|
16452
|
+
};
|
|
16453
|
+
}
|
|
16454
|
+
function clipNotesFrom(meta, single) {
|
|
16455
|
+
const rows = meta && meta.length > 0 ? meta : single ? [single] : [];
|
|
16456
|
+
return rows.map((m, i) => ({
|
|
16457
|
+
clip: i + 1,
|
|
16458
|
+
warnings: m?.warnings ?? [],
|
|
16459
|
+
...typeof m?.durationSec === "number" ? { durationSec: m.durationSec } : {}
|
|
16460
|
+
}));
|
|
16461
|
+
}
|
|
16462
|
+
|
|
15503
16463
|
// src/suno-track-sources.ts
|
|
15504
16464
|
var SUNO_TRACK_SOURCE_TYPES = /* @__PURE__ */ new Set([
|
|
15505
16465
|
"suno-generate",
|
|
@@ -15616,6 +16576,20 @@ function nodeStateMayCarryOutput(status) {
|
|
|
15616
16576
|
return status !== void 0 && OUTPUT_BEARING_NODE_STATUSES.has(status);
|
|
15617
16577
|
}
|
|
15618
16578
|
|
|
16579
|
+
// src/execution-outcome.ts
|
|
16580
|
+
var EMPTY_INPUT = "empty_input";
|
|
16581
|
+
function countEmptyInputSkips(nodeStates) {
|
|
16582
|
+
let count = 0;
|
|
16583
|
+
for (const state of Object.values(nodeStates ?? {})) {
|
|
16584
|
+
if (state && state.status === "skipped" && state.skipReason === EMPTY_INPUT) count += 1;
|
|
16585
|
+
}
|
|
16586
|
+
return count;
|
|
16587
|
+
}
|
|
16588
|
+
function executionOutcome(status, nodeStates) {
|
|
16589
|
+
if (status !== "completed") return void 0;
|
|
16590
|
+
return countEmptyInputSkips(nodeStates) > 0 ? "nothing_new" : "succeeded";
|
|
16591
|
+
}
|
|
16592
|
+
|
|
15619
16593
|
// src/normalize-node-params.ts
|
|
15620
16594
|
var MODEL_PARAM_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
15621
16595
|
"generate-image",
|
|
@@ -16340,6 +17314,10 @@ var ENUM_TARGETS = [
|
|
|
16340
17314
|
[LIP_SYNC_PROVIDERS, "lip-sync"],
|
|
16341
17315
|
[FACE_SWAP_PROVIDERS, "face-swap"],
|
|
16342
17316
|
[TTS_PROVIDERS, "text-to-speech"],
|
|
17317
|
+
// A dialogue model's id is the node's `provider`: without this row the Models
|
|
17318
|
+
// tab would create a BARE dialogue node, which runs as the default (v3) whatever
|
|
17319
|
+
// the user picked.
|
|
17320
|
+
[DIALOGUE_PROVIDERS, "text-to-dialogue"],
|
|
16343
17321
|
[TEXT_TO_AUDIO_PROVIDERS, "text-to-audio"],
|
|
16344
17322
|
[TRANSCRIBE_PROVIDERS, "transcribe"],
|
|
16345
17323
|
[MUSIC_PROVIDERS, "suno-generate"]
|
|
@@ -16463,34 +17441,6 @@ var AUDIO_FX_REVERB_PRESETS = /* @__PURE__ */ new Set([
|
|
|
16463
17441
|
"outdoor"
|
|
16464
17442
|
]);
|
|
16465
17443
|
|
|
16466
|
-
// src/supported-fonts.ts
|
|
16467
|
-
var SUPPORTED_FONT_NAMES = [
|
|
16468
|
-
"Inter",
|
|
16469
|
-
"Roboto",
|
|
16470
|
-
"Open Sans",
|
|
16471
|
-
"Montserrat",
|
|
16472
|
-
"Poppins",
|
|
16473
|
-
"Raleway",
|
|
16474
|
-
"Nunito",
|
|
16475
|
-
"Lato",
|
|
16476
|
-
"Playfair Display",
|
|
16477
|
-
"Merriweather",
|
|
16478
|
-
"Lora",
|
|
16479
|
-
"EB Garamond",
|
|
16480
|
-
"Bebas Neue",
|
|
16481
|
-
"Oswald",
|
|
16482
|
-
"Anton",
|
|
16483
|
-
"Dancing Script",
|
|
16484
|
-
"Pacifico",
|
|
16485
|
-
"Caveat",
|
|
16486
|
-
"Roboto Mono",
|
|
16487
|
-
"Fira Code",
|
|
16488
|
-
"Rubik",
|
|
16489
|
-
"Heebo",
|
|
16490
|
-
"Cairo",
|
|
16491
|
-
"Tajawal"
|
|
16492
|
-
];
|
|
16493
|
-
|
|
16494
17444
|
// src/image-overlay-shapes.ts
|
|
16495
17445
|
var OVERLAY_SHAPES = [
|
|
16496
17446
|
"rect",
|
|
@@ -16709,7 +17659,8 @@ var VIDEO_OVERLAY_ERROR_CODES = [
|
|
|
16709
17659
|
"time_out_of_range",
|
|
16710
17660
|
"end_before_start",
|
|
16711
17661
|
"fit_without_aspect",
|
|
16712
|
-
"field_out_of_bounds"
|
|
17662
|
+
"field_out_of_bounds",
|
|
17663
|
+
"invalid_layer_plan"
|
|
16713
17664
|
];
|
|
16714
17665
|
var badge = (anchor, sx, sy) => ({
|
|
16715
17666
|
anchor,
|
|
@@ -16779,13 +17730,13 @@ function sameShallow(a, b) {
|
|
|
16779
17730
|
function expandVideoOverlayLayer(raw) {
|
|
16780
17731
|
const obj = asLayer(raw);
|
|
16781
17732
|
const layer = obj ? clean(obj) : {};
|
|
16782
|
-
const
|
|
17733
|
+
const present2 = VIDEO_OVERLAY_BOX_FIELDS.filter((f) => layer[f] !== void 0);
|
|
16783
17734
|
let out;
|
|
16784
17735
|
if (isVideoOverlayPresetId(layer.preset)) {
|
|
16785
17736
|
const box = videoOverlayPresetBox(layer.preset, layer.corner);
|
|
16786
17737
|
out = { ...box, ...layer };
|
|
16787
|
-
if (
|
|
16788
|
-
} else if (
|
|
17738
|
+
if (present2.some((f) => layer[f] !== box[f])) delete out.preset;
|
|
17739
|
+
} else if (present2.length === 0) {
|
|
16789
17740
|
out = { ...DEFAULT_VIDEO_OVERLAY_LAYER, ...videoOverlayPresetBox("corner-badge", layer.corner), ...layer };
|
|
16790
17741
|
} else if (layer.anchor === void 0 || layer.width === void 0) {
|
|
16791
17742
|
return raw;
|
|
@@ -16861,11 +17812,12 @@ function normalizeVideoOverlayNodes(nodes, edges) {
|
|
|
16861
17812
|
});
|
|
16862
17813
|
return changed ? out : nodes;
|
|
16863
17814
|
}
|
|
17815
|
+
var PLAN_LAYER_Z_BASE = 1e3;
|
|
16864
17816
|
var isSlot = (v) => typeof v === "number" && Number.isInteger(v) && v >= 1;
|
|
16865
17817
|
var isIndex = (v) => typeof v === "number" && Number.isInteger(v) && v >= 0;
|
|
16866
17818
|
function videoOverlayRenderOrder(layers) {
|
|
16867
17819
|
return layers.map((l, i) => {
|
|
16868
|
-
const own = isSlot(l?.slot) ? l.slot - 1 : isIndex(l?.index) ? l.index : i;
|
|
17820
|
+
const own = isSlot(l?.planLayer) ? l.planLayer - 1 - PLAN_LAYER_Z_BASE : isSlot(l?.slot) ? l.slot - 1 : isIndex(l?.index) ? l.index : i;
|
|
16869
17821
|
return { i, z: typeof l?.zIndex === "number" && Number.isFinite(l.zIndex) ? l.zIndex : own };
|
|
16870
17822
|
}).sort((a, b) => a.z - b.z || a.i - b.i).map((e) => e.i);
|
|
16871
17823
|
}
|
|
@@ -16941,6 +17893,7 @@ function hasDrawableVideoOverlayBox(layer) {
|
|
|
16941
17893
|
return outOfBounds(l) === null;
|
|
16942
17894
|
}
|
|
16943
17895
|
function validateVideoOverlayRequest(body) {
|
|
17896
|
+
if (body.planError) return { ok: false, code: "invalid_layer_plan", params: {} };
|
|
16944
17897
|
const layers = Array.isArray(body.layers) ? body.layers : [];
|
|
16945
17898
|
if (layers.length === 0) return { ok: false, code: "no_layers", params: {} };
|
|
16946
17899
|
if (layers.length > VIDEO_OVERLAY_MAX_LAYERS) {
|
|
@@ -16953,6 +17906,7 @@ function validateVideoOverlayRequest(body) {
|
|
|
16953
17906
|
code,
|
|
16954
17907
|
layer: i,
|
|
16955
17908
|
...typeof l.slot === "number" ? { slot: l.slot } : {},
|
|
17909
|
+
...typeof l.planLayer === "number" ? { planLayer: l.planLayer } : {},
|
|
16956
17910
|
params
|
|
16957
17911
|
});
|
|
16958
17912
|
const boxFields = VIDEO_OVERLAY_BOX_FIELDS.filter((f) => l[f] !== void 0 && l[f] !== null);
|
|
@@ -16979,16 +17933,33 @@ var MESSAGES = {
|
|
|
16979
17933
|
time_out_of_range: (p) => `${p.field} must be between 0 and ${p.max} s`,
|
|
16980
17934
|
end_before_start: (p) => `end (${p.end} s) must be after start (${p.start} s)`,
|
|
16981
17935
|
fit_without_aspect: () => "baseFit and backgroundColor need an outputAspect",
|
|
16982
|
-
field_out_of_bounds: (p) => `${p.field} is out of range (allowed: ${p.allowed})
|
|
17936
|
+
field_out_of_bounds: (p) => `${p.field} is out of range (allowed: ${p.allowed})`,
|
|
17937
|
+
invalid_layer_plan: () => "the layer plan must be a list of layers"
|
|
16983
17938
|
};
|
|
17939
|
+
var PLAN_LAYER_WITHOUT_IMAGE = "no image \u2014 set imageUrl on this layer in the plan.";
|
|
16984
17940
|
function videoOverlayLayerLabel(ref) {
|
|
17941
|
+
if (typeof ref.planLayer === "number") return `Plan layer ${ref.planLayer}`;
|
|
16985
17942
|
return typeof ref.slot === "number" ? `Layer ${ref.slot}` : typeof ref.layer === "number" ? `layers[${ref.layer}]` : "";
|
|
16986
17943
|
}
|
|
16987
17944
|
function formatVideoOverlayError(issue2) {
|
|
16988
17945
|
const label = videoOverlayLayerLabel(issue2);
|
|
16989
|
-
const text = MESSAGES[issue2.code](issue2.params);
|
|
17946
|
+
const text = issue2.code === "layer_without_image" && typeof issue2.planLayer === "number" ? PLAN_LAYER_WITHOUT_IMAGE : MESSAGES[issue2.code](issue2.params);
|
|
16990
17947
|
return label ? `${label}: ${text}` : text;
|
|
16991
17948
|
}
|
|
17949
|
+
function parseVideoOverlayLayerPlan(raw) {
|
|
17950
|
+
let value = raw;
|
|
17951
|
+
if (typeof raw === "string") {
|
|
17952
|
+
try {
|
|
17953
|
+
value = JSON.parse(raw);
|
|
17954
|
+
} catch {
|
|
17955
|
+
return { error: "invalid_layer_plan" };
|
|
17956
|
+
}
|
|
17957
|
+
}
|
|
17958
|
+
if (!Array.isArray(value) || !value.every((l) => l !== null && typeof l === "object" && !Array.isArray(l))) {
|
|
17959
|
+
return { error: "invalid_layer_plan" };
|
|
17960
|
+
}
|
|
17961
|
+
return { layers: value };
|
|
17962
|
+
}
|
|
16992
17963
|
function assembleVideoOverlayRequest(input) {
|
|
16993
17964
|
const stored = Array.isArray(input.data.layers) ? input.data.layers : [];
|
|
16994
17965
|
const wired = input.wiredImageUrls.slice(0, VIDEO_OVERLAY_HANDLE_IDS.length);
|
|
@@ -17005,13 +17976,19 @@ function assembleVideoOverlayRequest(input) {
|
|
|
17005
17976
|
const outputAspect = isVideoOverlayOutputAspect(input.data.outputAspect) ? input.data.outputAspect : void 0;
|
|
17006
17977
|
const baseFit = isFit(input.data.baseFit) ? input.data.baseFit : void 0;
|
|
17007
17978
|
const backgroundColor = typeof input.data.backgroundColor === "string" && HEX6.test(input.data.backgroundColor) ? input.data.backgroundColor : void 0;
|
|
17008
|
-
|
|
17009
|
-
videoUrl: input.videoUrl,
|
|
17010
|
-
layers,
|
|
17979
|
+
const rest = {
|
|
17011
17980
|
...outputAspect ? { outputAspect } : {},
|
|
17012
17981
|
...baseFit ? { baseFit } : {},
|
|
17013
17982
|
...backgroundColor ? { backgroundColor } : {}
|
|
17014
17983
|
};
|
|
17984
|
+
if (input.planLayers === void 0) return { videoUrl: input.videoUrl, layers, ...rest };
|
|
17985
|
+
const plan = parseVideoOverlayLayerPlan(input.planLayers);
|
|
17986
|
+
if ("error" in plan) return { videoUrl: input.videoUrl, layers, ...rest, planError: plan.error };
|
|
17987
|
+
const planned = expandVideoOverlayPresets(plan.layers).map((l, i) => {
|
|
17988
|
+
const { slot: _slot, ...own } = l;
|
|
17989
|
+
return { ...own, planLayer: i + 1 };
|
|
17990
|
+
});
|
|
17991
|
+
return { videoUrl: input.videoUrl, layers: [...planned, ...layers], ...rest };
|
|
17015
17992
|
}
|
|
17016
17993
|
function videoOverlaySlotSources(layers, wiredImageUrls) {
|
|
17017
17994
|
const stored = Array.isArray(layers) ? layers : [];
|
|
@@ -17039,16 +18016,19 @@ var VIDEO_OVERLAY_MAX_COMPOSITION_KEY_LENGTH = 65536;
|
|
|
17039
18016
|
function videoOverlayCompositionKey(c) {
|
|
17040
18017
|
const sources = c.sources.map((s) => typeof s === "string" && s.length > 0 ? s : null);
|
|
17041
18018
|
while (sources.length > 0 && sources[sources.length - 1] === null) sources.pop();
|
|
17042
|
-
|
|
17043
|
-
|
|
17044
|
-
|
|
17045
|
-
|
|
17046
|
-
|
|
17047
|
-
|
|
17048
|
-
|
|
17049
|
-
|
|
17050
|
-
|
|
17051
|
-
|
|
18019
|
+
const parts = [
|
|
18020
|
+
c.baseUrl || null,
|
|
18021
|
+
sources,
|
|
18022
|
+
Array.isArray(c.data.layers) ? c.data.layers : [],
|
|
18023
|
+
c.data.outputAspect ?? null,
|
|
18024
|
+
c.data.baseFit ?? null,
|
|
18025
|
+
c.data.backgroundColor ?? null
|
|
18026
|
+
];
|
|
18027
|
+
if (c.planLayers !== void 0) {
|
|
18028
|
+
const plan = parseVideoOverlayLayerPlan(c.planLayers);
|
|
18029
|
+
parts.push("error" in plan ? "invalid" : plan.layers);
|
|
18030
|
+
}
|
|
18031
|
+
return JSON.stringify(canonicalValue(parts));
|
|
17052
18032
|
}
|
|
17053
18033
|
|
|
17054
18034
|
// src/entity-image-handle.ts
|
|
@@ -19475,8 +20455,8 @@ function scene3DCameraTrackIssues(track) {
|
|
|
19475
20455
|
}
|
|
19476
20456
|
const quaternionTolerance = SCENE3D_CAMERA_TRACK_LIMITS.quaternionTolerance;
|
|
19477
20457
|
track.samples.forEach((sample, index) => {
|
|
19478
|
-
const [x, y,
|
|
19479
|
-
const norm = Math.sqrt(x * x + y * y +
|
|
20458
|
+
const [x, y, z26, w] = sample.quaternion;
|
|
20459
|
+
const norm = Math.sqrt(x * x + y * y + z26 * z26 + w * w);
|
|
19480
20460
|
if (Math.abs(norm - 1) > quaternionTolerance) {
|
|
19481
20461
|
issues.push({
|
|
19482
20462
|
path: ["samples", index, "quaternion"],
|
|
@@ -19889,7 +20869,7 @@ var STUDIO_KEYFRAME_TRANSIENT_KEYS = ["pendingImages"];
|
|
|
19889
20869
|
var STUDIO_KEYFRAME_REVIEW_KEYS = ["rejections"];
|
|
19890
20870
|
var STUDIO_KEYFRAME_ACCEPTANCE_PRIVATE_KEYS = ["waivedReason"];
|
|
19891
20871
|
var STUDIO_KEYFRAME_PRIVATE_KEYS = [...STUDIO_KEYFRAME_TRANSIENT_KEYS, ...STUDIO_KEYFRAME_REVIEW_KEYS];
|
|
19892
|
-
function
|
|
20872
|
+
function isRecord3(value) {
|
|
19893
20873
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
19894
20874
|
}
|
|
19895
20875
|
function withoutKeys(source, drop) {
|
|
@@ -19916,9 +20896,9 @@ function stripPrevizRunState(value) {
|
|
|
19916
20896
|
if (!Array.isArray(value)) return value;
|
|
19917
20897
|
let changed = false;
|
|
19918
20898
|
const out = value.map((entry) => {
|
|
19919
|
-
if (!
|
|
20899
|
+
if (!isRecord3(entry)) return entry;
|
|
19920
20900
|
const previz = entry.previsualization;
|
|
19921
|
-
if (!
|
|
20901
|
+
if (!isRecord3(previz) || !STUDIO_PREVIZ_RUN_STATE_KEYS.some((key) => key in previz)) return entry;
|
|
19922
20902
|
changed = true;
|
|
19923
20903
|
return { ...entry, previsualization: withoutKeys(previz, STUDIO_PREVIZ_RUN_STATE_KEYS) };
|
|
19924
20904
|
});
|
|
@@ -19942,8 +20922,8 @@ function stripStudioTakeVoiceRecords(nodes) {
|
|
|
19942
20922
|
if (!Array.isArray(nodes)) return nodes;
|
|
19943
20923
|
let changed = false;
|
|
19944
20924
|
const out = nodes.map((node) => {
|
|
19945
|
-
const data =
|
|
19946
|
-
if (!
|
|
20925
|
+
const data = isRecord3(node) ? node.data : void 0;
|
|
20926
|
+
if (!isRecord3(data)) return node;
|
|
19947
20927
|
const results = stripRows(data.generatedResults, STUDIO_TAKE_PRIVATE_KEYS);
|
|
19948
20928
|
const unitResults = stripRows(data.sequenceUnitResults, STUDIO_SEQUENCE_UNIT_MANIFEST_KEYS);
|
|
19949
20929
|
const running = STUDIO_KEYFRAME_NODE_TRANSIENT_KEYS.some((key) => key in data);
|
|
@@ -19960,7 +20940,7 @@ function stripRows(value, drop) {
|
|
|
19960
20940
|
if (!Array.isArray(value)) return value;
|
|
19961
20941
|
let changed = false;
|
|
19962
20942
|
const out = value.map((row) => {
|
|
19963
|
-
if (!
|
|
20943
|
+
if (!isRecord3(row) || !drop.some((key) => key in row)) return row;
|
|
19964
20944
|
changed = true;
|
|
19965
20945
|
return withoutKeys(row, drop);
|
|
19966
20946
|
});
|
|
@@ -19971,7 +20951,7 @@ function stripLinkedOwnerState(studio) {
|
|
|
19971
20951
|
const keyframes = stripKeyframes(studio.keyframes);
|
|
19972
20952
|
const preferences = STUDIO_SEQUENCE_POLICY_KEYS.filter((key) => {
|
|
19973
20953
|
const value = studio[key];
|
|
19974
|
-
return
|
|
20954
|
+
return isRecord3(value) && Object.keys(value).length > 0;
|
|
19975
20955
|
});
|
|
19976
20956
|
if (!STUDIO_SEQUENCE_PLANNING_KEYS.some((key) => key in studio) && takes === studio.sequenceTakes && keyframes === studio.keyframes && preferences.length === 0) return studio;
|
|
19977
20957
|
const kept = withoutKeys(studio, STUDIO_SEQUENCE_PLANNING_KEYS);
|
|
@@ -19984,10 +20964,10 @@ function stripTakeUnitReviews(value) {
|
|
|
19984
20964
|
if (!Array.isArray(value)) return value;
|
|
19985
20965
|
let changed = false;
|
|
19986
20966
|
const out = value.map((take) => {
|
|
19987
|
-
if (!
|
|
20967
|
+
if (!isRecord3(take) || !Array.isArray(take.units)) return take;
|
|
19988
20968
|
let touched = false;
|
|
19989
20969
|
const units = take.units.map((unit) => {
|
|
19990
|
-
if (!
|
|
20970
|
+
if (!isRecord3(unit) || !STUDIO_SEQUENCE_UNIT_REVIEW_KEYS.some((key) => key in unit)) return unit;
|
|
19991
20971
|
touched = true;
|
|
19992
20972
|
return withoutKeys(unit, STUDIO_SEQUENCE_UNIT_REVIEW_KEYS);
|
|
19993
20973
|
});
|
|
@@ -20001,7 +20981,7 @@ function stripKeyframes(value) {
|
|
|
20001
20981
|
if (!Array.isArray(value)) return value;
|
|
20002
20982
|
let changed = false;
|
|
20003
20983
|
const out = value.map((frame) => {
|
|
20004
|
-
if (!
|
|
20984
|
+
if (!isRecord3(frame)) return frame;
|
|
20005
20985
|
const kept = keyframeForReader(frame, STUDIO_KEYFRAME_REVIEW_KEYS);
|
|
20006
20986
|
if (kept !== frame) changed = true;
|
|
20007
20987
|
return kept;
|
|
@@ -20010,7 +20990,7 @@ function stripKeyframes(value) {
|
|
|
20010
20990
|
}
|
|
20011
20991
|
function keyframeForReader(frame, drop) {
|
|
20012
20992
|
const acceptance = frame.acceptance;
|
|
20013
|
-
const waived =
|
|
20993
|
+
const waived = isRecord3(acceptance) && STUDIO_KEYFRAME_ACCEPTANCE_PRIVATE_KEYS.some((key) => key in acceptance);
|
|
20014
20994
|
if (!waived && !drop.some((key) => key in frame)) return frame;
|
|
20015
20995
|
const kept = withoutKeys(frame, drop);
|
|
20016
20996
|
if (waived) kept.acceptance = withoutKeys(acceptance, STUDIO_KEYFRAME_ACCEPTANCE_PRIVATE_KEYS);
|
|
@@ -20019,7 +20999,7 @@ function keyframeForReader(frame, drop) {
|
|
|
20019
20999
|
function stripStudioDraftSettings(settings) {
|
|
20020
21000
|
if (!settings || typeof settings !== "object") return settings;
|
|
20021
21001
|
const studio = settings.studio;
|
|
20022
|
-
if (!
|
|
21002
|
+
if (!isRecord3(studio)) return settings;
|
|
20023
21003
|
const shots = stripShots(studio.shots, STUDIO_SHOT_PRIVATE_KEYS);
|
|
20024
21004
|
const trash = stripBin(studio.trash);
|
|
20025
21005
|
const planned = stripLinkedOwnerState(studio);
|
|
@@ -20034,11 +21014,11 @@ function stripBin(trash) {
|
|
|
20034
21014
|
let changed = false;
|
|
20035
21015
|
const out = [];
|
|
20036
21016
|
for (const entry of trash) {
|
|
20037
|
-
if (
|
|
21017
|
+
if (isRecord3(entry) && entry.kind === "slot") {
|
|
20038
21018
|
changed = true;
|
|
20039
21019
|
continue;
|
|
20040
21020
|
}
|
|
20041
|
-
const kept = !
|
|
21021
|
+
const kept = !isRecord3(entry) ? entry : entry.kind === "shot" ? binSceneForReader(entry) : entry.kind === "keyframe" ? binKeyframeForReader(entry) : binTakeForReader(entry);
|
|
20042
21022
|
if (kept !== entry) changed = true;
|
|
20043
21023
|
out.push(kept);
|
|
20044
21024
|
}
|
|
@@ -20046,7 +21026,7 @@ function stripBin(trash) {
|
|
|
20046
21026
|
}
|
|
20047
21027
|
function binSceneForReader(entry) {
|
|
20048
21028
|
const graph = entry.graph;
|
|
20049
|
-
if (!
|
|
21029
|
+
if (!isRecord3(graph)) return entry;
|
|
20050
21030
|
const nodes = stripStudioTakeVoiceRecords(graph.nodes);
|
|
20051
21031
|
const settings = stripStudioDraftSettings(graph.settings);
|
|
20052
21032
|
if (nodes === graph.nodes && settings === graph.settings) return entry;
|
|
@@ -20054,12 +21034,12 @@ function binSceneForReader(entry) {
|
|
|
20054
21034
|
}
|
|
20055
21035
|
function binTakeForReader(entry) {
|
|
20056
21036
|
const result = entry.result;
|
|
20057
|
-
if (!
|
|
21037
|
+
if (!isRecord3(result) || !STUDIO_TAKE_PRIVATE_KEYS.some((key) => key in result)) return entry;
|
|
20058
21038
|
return { ...entry, result: withoutKeys(result, STUDIO_TAKE_PRIVATE_KEYS) };
|
|
20059
21039
|
}
|
|
20060
21040
|
function binKeyframeForReader(entry) {
|
|
20061
21041
|
const keyframe = entry.keyframe;
|
|
20062
|
-
if (!
|
|
21042
|
+
if (!isRecord3(keyframe)) return entry;
|
|
20063
21043
|
const kept = keyframeForReader(keyframe, STUDIO_KEYFRAME_PRIVATE_KEYS);
|
|
20064
21044
|
return kept === keyframe ? entry : { ...entry, keyframe: kept };
|
|
20065
21045
|
}
|
|
@@ -20828,6 +21808,9 @@ function edlDurationMs(edl) {
|
|
|
20828
21808
|
const last = edl.segments[edl.segments.length - 1];
|
|
20829
21809
|
return Math.max(0, Math.round(starts[starts.length - 1] + Math.max(0, last.outMs - last.inMs)));
|
|
20830
21810
|
}
|
|
21811
|
+
function edlSegmentOutputStarts(edl) {
|
|
21812
|
+
return segmentOutputStarts(edl);
|
|
21813
|
+
}
|
|
20831
21814
|
function segmentOutputStarts(edl) {
|
|
20832
21815
|
const starts = [];
|
|
20833
21816
|
let cursor = 0;
|
|
@@ -20958,6 +21941,16 @@ function remapMsThroughEdl(edl, sourceMs, sourceId) {
|
|
|
20958
21941
|
}
|
|
20959
21942
|
return null;
|
|
20960
21943
|
}
|
|
21944
|
+
function outputMsToMasterMs(edl, outputMs) {
|
|
21945
|
+
if (!Number.isFinite(outputMs) || outputMs < 0) return null;
|
|
21946
|
+
const starts = segmentOutputStarts(edl);
|
|
21947
|
+
for (let i = edl.segments.length - 1; i >= 0; i--) {
|
|
21948
|
+
const seg = edl.segments[i];
|
|
21949
|
+
const dur = Math.max(0, seg.outMs - seg.inMs);
|
|
21950
|
+
if (outputMs >= starts[i] && outputMs < starts[i] + dur) return Math.round(seg.inMs + (outputMs - starts[i]));
|
|
21951
|
+
}
|
|
21952
|
+
return null;
|
|
21953
|
+
}
|
|
20961
21954
|
function remapTranscriptThroughEdl(edl, transcript) {
|
|
20962
21955
|
const off = offsetFor(edl, transcript.sourceId);
|
|
20963
21956
|
const starts = segmentOutputStarts(edl);
|
|
@@ -21030,7 +22023,7 @@ function speakerTurns(transcript, opts) {
|
|
|
21030
22023
|
}
|
|
21031
22024
|
var num = (v, fallback = 0) => typeof v === "number" && Number.isFinite(v) ? v : fallback;
|
|
21032
22025
|
var clamp012 = (v) => Math.min(1, Math.max(0, v));
|
|
21033
|
-
var
|
|
22026
|
+
var str3 = (v) => typeof v === "string" ? v : void 0;
|
|
21034
22027
|
function normalizeRegion(r) {
|
|
21035
22028
|
if (!r || typeof r !== "object") return void 0;
|
|
21036
22029
|
const o = r;
|
|
@@ -21047,11 +22040,11 @@ function normalizeEdl(input) {
|
|
|
21047
22040
|
const sources = Array.isArray(o.sources) ? o.sources.map((raw, i) => {
|
|
21048
22041
|
const s = raw ?? {};
|
|
21049
22042
|
const src = {
|
|
21050
|
-
id:
|
|
21051
|
-
url:
|
|
22043
|
+
id: str3(s.id) ?? `src-${i}`,
|
|
22044
|
+
url: str3(s.url) ?? "",
|
|
21052
22045
|
kind: s.kind === "audio" ? "audio" : "video",
|
|
21053
22046
|
...s.offsetMs !== void 0 ? { offsetMs: Math.round(num(s.offsetMs)) } : {},
|
|
21054
|
-
...
|
|
22047
|
+
...str3(s.role) ? { role: s.role } : {},
|
|
21055
22048
|
...Array.isArray(s.speakers) ? { speakers: s.speakers.filter((x) => typeof x === "string") } : {},
|
|
21056
22049
|
...normalizeRegion(s.region) ? { region: normalizeRegion(s.region) } : {}
|
|
21057
22050
|
};
|
|
@@ -21064,12 +22057,12 @@ function normalizeEdl(input) {
|
|
|
21064
22057
|
const t2 = isFirst ? void 0 : s.transition;
|
|
21065
22058
|
const layout = normalizeLayout(s.layout, isFirst);
|
|
21066
22059
|
const seg = {
|
|
21067
|
-
id:
|
|
22060
|
+
id: str3(s.id) ?? `seg-${i}`,
|
|
21068
22061
|
inMs: Math.round(num(s.inMs)),
|
|
21069
22062
|
outMs: Math.round(num(s.outMs)),
|
|
21070
|
-
...
|
|
21071
|
-
...
|
|
21072
|
-
...
|
|
22063
|
+
...str3(s.video) ? { video: str3(s.video) } : {},
|
|
22064
|
+
...str3(s.audio) ? { audio: str3(s.audio) } : {},
|
|
22065
|
+
...str3(s.speaker) ? { speaker: str3(s.speaker) } : {},
|
|
21073
22066
|
...t2 && (t2.type === "cut" || t2.type === "crossfade") ? { transition: { type: t2.type, durationMs: t2.type === "cut" ? 0 : Math.round(num(t2.durationMs)) } } : {},
|
|
21074
22067
|
...region ? { region } : {},
|
|
21075
22068
|
...layout ? { layout } : {},
|
|
@@ -21079,7 +22072,7 @@ function normalizeEdl(input) {
|
|
|
21079
22072
|
}) : [];
|
|
21080
22073
|
const dropped = Array.isArray(o.dropped) ? o.dropped.map((raw) => {
|
|
21081
22074
|
const d = raw ?? {};
|
|
21082
|
-
return { inMs: Math.round(num(d.inMs)), outMs: Math.round(num(d.outMs)), reason:
|
|
22075
|
+
return { inMs: Math.round(num(d.inMs)), outMs: Math.round(num(d.outMs)), reason: str3(d.reason) ?? "manual" };
|
|
21083
22076
|
}) : void 0;
|
|
21084
22077
|
const meta = o.meta && typeof o.meta === "object" ? o.meta : void 0;
|
|
21085
22078
|
return {
|
|
@@ -21088,28 +22081,28 @@ function normalizeEdl(input) {
|
|
|
21088
22081
|
sources,
|
|
21089
22082
|
segments,
|
|
21090
22083
|
...dropped ? { dropped } : {},
|
|
21091
|
-
...o.derivedFrom && typeof o.derivedFrom === "object" ? { derivedFrom: { edlId:
|
|
22084
|
+
...o.derivedFrom && typeof o.derivedFrom === "object" ? { derivedFrom: { edlId: str3(o.derivedFrom.edlId) ?? "", clock: "output" } } : {},
|
|
21092
22085
|
...meta ? { meta } : {}
|
|
21093
22086
|
};
|
|
21094
22087
|
}
|
|
21095
22088
|
function normalizeLayout(input, dropTransition = false) {
|
|
21096
22089
|
if (!input || typeof input !== "object") return void 0;
|
|
21097
22090
|
const o = input;
|
|
21098
|
-
const mode =
|
|
22091
|
+
const mode = str3(o.mode) || "single";
|
|
21099
22092
|
const slots = Array.isArray(o.slots) ? o.slots.map((raw) => {
|
|
21100
22093
|
const s = raw ?? {};
|
|
21101
|
-
const source =
|
|
22094
|
+
const source = str3(s.source);
|
|
21102
22095
|
if (!source) return null;
|
|
21103
22096
|
const region = normalizeRegion(s.region);
|
|
21104
22097
|
return {
|
|
21105
22098
|
source,
|
|
21106
22099
|
...region ? { region } : {},
|
|
21107
|
-
...
|
|
22100
|
+
...str3(s.speaker) ? { speaker: str3(s.speaker) } : {},
|
|
21108
22101
|
...s.weight !== void 0 ? { weight: clamp012(num(s.weight)) } : {}
|
|
21109
22102
|
};
|
|
21110
22103
|
}).filter((x) => x !== null) : void 0;
|
|
21111
|
-
const emphasis = o.emphasis && typeof o.emphasis === "object" ? { style:
|
|
21112
|
-
const transition = !dropTransition && o.transition && typeof o.transition === "object" ? { type:
|
|
22104
|
+
const emphasis = o.emphasis && typeof o.emphasis === "object" ? { style: str3(o.emphasis.style) ?? "none", durationMs: Math.round(num(o.emphasis.durationMs)) } : void 0;
|
|
22105
|
+
const transition = !dropTransition && o.transition && typeof o.transition === "object" ? { type: str3(o.transition.type) ?? "cut", durationMs: Math.round(num(o.transition.durationMs)) } : void 0;
|
|
21113
22106
|
return {
|
|
21114
22107
|
mode,
|
|
21115
22108
|
...slots ? { slots } : {},
|
|
@@ -21123,29 +22116,372 @@ function normalizeTranscript(input) {
|
|
|
21123
22116
|
const w = raw ?? {};
|
|
21124
22117
|
const startMs = Math.round(num(w.startMs));
|
|
21125
22118
|
return {
|
|
21126
|
-
text:
|
|
22119
|
+
text: str3(w.text) ?? "",
|
|
21127
22120
|
startMs,
|
|
21128
22121
|
// Never inverted: an endMs < startMs (garbage upstream) would be
|
|
21129
22122
|
// silently dropped at remap; clamp it to a non-negative width.
|
|
21130
22123
|
endMs: Math.max(startMs, Math.round(num(w.endMs))),
|
|
21131
|
-
...
|
|
22124
|
+
...str3(w.speaker) ? { speaker: str3(w.speaker) } : {},
|
|
21132
22125
|
...typeof w.confidence === "number" ? { confidence: w.confidence } : {}
|
|
21133
22126
|
};
|
|
21134
22127
|
}) : [];
|
|
21135
22128
|
const segments = Array.isArray(o.segments) ? o.segments.map((raw) => {
|
|
21136
22129
|
const s = raw ?? {};
|
|
21137
22130
|
const startMs = Math.round(num(s.startMs));
|
|
21138
|
-
return { startMs, endMs: Math.max(startMs, Math.round(num(s.endMs))), text:
|
|
22131
|
+
return { startMs, endMs: Math.max(startMs, Math.round(num(s.endMs))), text: str3(s.text) ?? "", ...str3(s.speaker) ? { speaker: str3(s.speaker) } : {} };
|
|
21139
22132
|
}) : void 0;
|
|
21140
22133
|
return {
|
|
21141
22134
|
version: EDL_VERSION,
|
|
21142
|
-
...
|
|
21143
|
-
...
|
|
22135
|
+
...str3(o.sourceId) ? { sourceId: str3(o.sourceId) } : {},
|
|
22136
|
+
...str3(o.language) ? { language: str3(o.language) } : {},
|
|
21144
22137
|
words,
|
|
21145
22138
|
...segments ? { segments } : {}
|
|
21146
22139
|
};
|
|
21147
22140
|
}
|
|
21148
22141
|
|
|
22142
|
+
// src/speaker-tracks.ts
|
|
22143
|
+
var SPEAKER_TRACKS_VERSION = 1;
|
|
22144
|
+
var SPEAKER_TRACK_ATTRIBUTION_METHODS = ["source-map", "region", "mouth-motion", "manual"];
|
|
22145
|
+
var KNOWN_METHODS = new Set(SPEAKER_TRACK_ATTRIBUTION_METHODS);
|
|
22146
|
+
var SPEAKER_TRACKS_MAX_BOXES_PER_SOURCE = 1e5;
|
|
22147
|
+
var SPEAKER_TRACKS_MAX_BYTES = 64 * 1024 * 1024;
|
|
22148
|
+
var isObj = (v) => !!v && typeof v === "object" && !Array.isArray(v);
|
|
22149
|
+
var isNum = (v) => typeof v === "number" && Number.isFinite(v);
|
|
22150
|
+
var num2 = (v, fallback = 0) => isNum(v) ? v : fallback;
|
|
22151
|
+
var str4 = (v) => typeof v === "string" ? v : void 0;
|
|
22152
|
+
var clamp013 = (v) => Math.min(1, Math.max(0, v));
|
|
22153
|
+
var arr = (v) => Array.isArray(v) ? v : [];
|
|
22154
|
+
var int2 = (v) => {
|
|
22155
|
+
const r = Math.round(v);
|
|
22156
|
+
return r === 0 ? 0 : r;
|
|
22157
|
+
};
|
|
22158
|
+
function cropAxis(p, s) {
|
|
22159
|
+
if (!(s > 0)) return void 0;
|
|
22160
|
+
if (p >= 0 && p + s <= 1) return [p, s];
|
|
22161
|
+
const lo = clamp013(p);
|
|
22162
|
+
const hi = clamp013(p + s);
|
|
22163
|
+
return hi > lo ? [lo, hi - lo] : void 0;
|
|
22164
|
+
}
|
|
22165
|
+
function normalizeBox(raw) {
|
|
22166
|
+
if (!isObj(raw)) return void 0;
|
|
22167
|
+
if (![raw.ms, raw.x, raw.y, raw.w, raw.h].every(isNum)) return void 0;
|
|
22168
|
+
const xs = cropAxis(raw.x, raw.w);
|
|
22169
|
+
const ys = cropAxis(raw.y, raw.h);
|
|
22170
|
+
if (!xs || !ys) return void 0;
|
|
22171
|
+
const [x, w] = xs;
|
|
22172
|
+
const [y, h] = ys;
|
|
22173
|
+
return { ms: int2(raw.ms), x, y, w, h, ...isNum(raw.score) ? { score: clamp013(raw.score) } : {} };
|
|
22174
|
+
}
|
|
22175
|
+
function normalizeSpans(raw) {
|
|
22176
|
+
if (!Array.isArray(raw)) return [];
|
|
22177
|
+
const spans = raw.filter(isObj).filter((s) => isNum(s.startMs) && isNum(s.endMs)).map((s) => ({ startMs: int2(s.startMs), endMs: int2(s.endMs) })).filter((s) => s.endMs > s.startMs).sort((a, b) => a.startMs - b.startMs || a.endMs - b.endMs);
|
|
22178
|
+
const merged = [];
|
|
22179
|
+
for (const s of spans) {
|
|
22180
|
+
const last = merged[merged.length - 1];
|
|
22181
|
+
if (last && s.startMs <= last.endMs) merged[merged.length - 1] = { startMs: last.startMs, endMs: Math.max(last.endMs, s.endMs) };
|
|
22182
|
+
else merged.push(s);
|
|
22183
|
+
}
|
|
22184
|
+
return merged;
|
|
22185
|
+
}
|
|
22186
|
+
function normalizeCuts(raw) {
|
|
22187
|
+
if (!Array.isArray(raw)) return [];
|
|
22188
|
+
const sorted = raw.filter(isNum).map(int2).sort((a, b) => a - b);
|
|
22189
|
+
return sorted.filter((c, i) => i === 0 || c !== sorted[i - 1]);
|
|
22190
|
+
}
|
|
22191
|
+
function normalizeAttribution(raw) {
|
|
22192
|
+
if (!isObj(raw)) return void 0;
|
|
22193
|
+
const method = str4(raw.method);
|
|
22194
|
+
if (!method) return void 0;
|
|
22195
|
+
const rawSpeaker = str4(raw.rawSpeaker);
|
|
22196
|
+
return { method, confidence: clamp013(num2(raw.confidence)), ...rawSpeaker ? { rawSpeaker } : {} };
|
|
22197
|
+
}
|
|
22198
|
+
function normalizeHeader(raw, fallbackId) {
|
|
22199
|
+
const speaker = str4(raw.speaker);
|
|
22200
|
+
const attribution = normalizeAttribution(raw.attribution);
|
|
22201
|
+
return {
|
|
22202
|
+
id: str4(raw.id) || fallbackId,
|
|
22203
|
+
...speaker ? { speaker } : {},
|
|
22204
|
+
...attribution ? { attribution } : {}
|
|
22205
|
+
};
|
|
22206
|
+
}
|
|
22207
|
+
function normalizeSetFields(o) {
|
|
22208
|
+
const detector = isObj(o.detector) ? o.detector : {};
|
|
22209
|
+
const detectorVersion = str4(detector.version);
|
|
22210
|
+
return {
|
|
22211
|
+
// Only an ABSENT version defaults to 1. Any present value — another
|
|
22212
|
+
// number, "2", null — is kept as is so validate refuses it rather than
|
|
22213
|
+
// reading a newer (or broken) body as this one.
|
|
22214
|
+
version: o.version === void 0 ? SPEAKER_TRACKS_VERSION : o.version,
|
|
22215
|
+
sampleFps: num2(o.sampleFps),
|
|
22216
|
+
detector: { id: str4(detector.id) ?? "", ...detectorVersion ? { version: detectorVersion } : {} }
|
|
22217
|
+
};
|
|
22218
|
+
}
|
|
22219
|
+
function normalizeSources(raw, track) {
|
|
22220
|
+
if (!Array.isArray(raw)) return [];
|
|
22221
|
+
return raw.map((r) => {
|
|
22222
|
+
const s = isObj(r) ? r : {};
|
|
22223
|
+
const sourceId = str4(s.sourceId) ?? "";
|
|
22224
|
+
const frame = isObj(s.frame) ? s.frame : {};
|
|
22225
|
+
const cuts = normalizeCuts(s.cuts);
|
|
22226
|
+
const tracks = Array.isArray(s.tracks) ? s.tracks.map((t2, k) => track(isObj(t2) ? t2 : {}, `${sourceId}/t${k + 1}`)) : [];
|
|
22227
|
+
return {
|
|
22228
|
+
sourceId,
|
|
22229
|
+
// A clock other than "source" cannot be repaired: boxes on another clock
|
|
22230
|
+
// would land offsetMs away from their frame. Keep it for validate to refuse.
|
|
22231
|
+
clock: typeof s.clock === "string" ? s.clock : "source",
|
|
22232
|
+
frame: { w: int2(num2(frame.w)), h: int2(num2(frame.h)) },
|
|
22233
|
+
sampledSpans: normalizeSpans(s.sampledSpans),
|
|
22234
|
+
tracks,
|
|
22235
|
+
...cuts.length > 0 ? { cuts } : {}
|
|
22236
|
+
};
|
|
22237
|
+
});
|
|
22238
|
+
}
|
|
22239
|
+
function normalizeSpeakerTracks(input) {
|
|
22240
|
+
const o = isObj(input) ? input : {};
|
|
22241
|
+
return {
|
|
22242
|
+
...normalizeSetFields(o),
|
|
22243
|
+
sources: normalizeSources(o.sources, (t2, fallbackId) => {
|
|
22244
|
+
const boxes = Array.isArray(t2.boxes) ? t2.boxes.map(normalizeBox).filter((b) => b !== void 0) : [];
|
|
22245
|
+
return { ...normalizeHeader(t2, fallbackId), boxes: [...boxes].sort((a, b) => a.ms - b.ms) };
|
|
22246
|
+
})
|
|
22247
|
+
};
|
|
22248
|
+
}
|
|
22249
|
+
function normalizeSpeakerTrackSetDescriptor(input) {
|
|
22250
|
+
const o = isObj(input) ? input : {};
|
|
22251
|
+
return {
|
|
22252
|
+
...normalizeSetFields(o),
|
|
22253
|
+
sources: normalizeSources(o.sources, (t2, fallbackId) => ({
|
|
22254
|
+
...normalizeHeader(t2, fallbackId),
|
|
22255
|
+
boxCount: Math.max(0, int2(num2(t2.boxCount)))
|
|
22256
|
+
})),
|
|
22257
|
+
url: str4(o.url) ?? "",
|
|
22258
|
+
sha256: str4(o.sha256) ?? "",
|
|
22259
|
+
bytes: int2(num2(o.bytes))
|
|
22260
|
+
};
|
|
22261
|
+
}
|
|
22262
|
+
function describeSpeakerTracks(set, artifact) {
|
|
22263
|
+
return {
|
|
22264
|
+
version: set.version,
|
|
22265
|
+
sampleFps: set.sampleFps,
|
|
22266
|
+
detector: { ...set.detector },
|
|
22267
|
+
sources: set.sources.map((s) => ({
|
|
22268
|
+
sourceId: s.sourceId,
|
|
22269
|
+
clock: s.clock,
|
|
22270
|
+
frame: { ...s.frame },
|
|
22271
|
+
sampledSpans: s.sampledSpans.map((sp) => ({ ...sp })),
|
|
22272
|
+
tracks: s.tracks.map((t2) => ({
|
|
22273
|
+
id: t2.id,
|
|
22274
|
+
...t2.speaker !== void 0 ? { speaker: t2.speaker } : {},
|
|
22275
|
+
...t2.attribution ? { attribution: { ...t2.attribution } } : {},
|
|
22276
|
+
boxCount: t2.boxes.length
|
|
22277
|
+
})),
|
|
22278
|
+
...s.cuts && s.cuts.length > 0 ? { cuts: [...s.cuts] } : {}
|
|
22279
|
+
})),
|
|
22280
|
+
url: artifact.url,
|
|
22281
|
+
sha256: artifact.sha256,
|
|
22282
|
+
bytes: artifact.bytes
|
|
22283
|
+
};
|
|
22284
|
+
}
|
|
22285
|
+
function edlSpeakerSpace(edl) {
|
|
22286
|
+
const out = /* @__PURE__ */ new Set();
|
|
22287
|
+
const add = (v) => {
|
|
22288
|
+
if (typeof v === "string" && v) out.add(v);
|
|
22289
|
+
};
|
|
22290
|
+
for (const e of edlList(edl)) {
|
|
22291
|
+
for (const s of Array.isArray(e.sources) ? e.sources : []) {
|
|
22292
|
+
for (const sp of Array.isArray(s?.speakers) ? s.speakers : []) add(sp);
|
|
22293
|
+
}
|
|
22294
|
+
for (const seg of Array.isArray(e.segments) ? e.segments : []) {
|
|
22295
|
+
add(seg?.speaker);
|
|
22296
|
+
for (const slot of Array.isArray(seg?.layout?.slots) ? seg.layout.slots : []) add(slot?.speaker);
|
|
22297
|
+
}
|
|
22298
|
+
}
|
|
22299
|
+
return [...out].sort();
|
|
22300
|
+
}
|
|
22301
|
+
function edlList(edl) {
|
|
22302
|
+
if (!edl) return [];
|
|
22303
|
+
const all = Array.isArray(edl) ? edl : [edl];
|
|
22304
|
+
return all.filter((e) => isObj(e));
|
|
22305
|
+
}
|
|
22306
|
+
var SHA256_HEX = /^[0-9a-f]{64}$/;
|
|
22307
|
+
function validateCommon(set, opts, perTrack) {
|
|
22308
|
+
const f = { issues: [], warnings: [] };
|
|
22309
|
+
const { issues, warnings } = f;
|
|
22310
|
+
const sources = arr(set.sources);
|
|
22311
|
+
const maxBoxes = opts.maxBoxesPerSource ?? SPEAKER_TRACKS_MAX_BOXES_PER_SOURCE;
|
|
22312
|
+
if (set.version !== SPEAKER_TRACKS_VERSION) issues.push(`version must be ${SPEAKER_TRACKS_VERSION}`);
|
|
22313
|
+
if (!(isNum(set.sampleFps) && set.sampleFps > 0)) issues.push("sampleFps must be a finite number > 0");
|
|
22314
|
+
const edls = edlList(opts.edl);
|
|
22315
|
+
const edlSources = /* @__PURE__ */ new Map();
|
|
22316
|
+
for (const e of edls) {
|
|
22317
|
+
for (const s of Array.isArray(e.sources) ? e.sources : []) {
|
|
22318
|
+
if (s && typeof s.id === "string" && !edlSources.has(s.id)) edlSources.set(s.id, s);
|
|
22319
|
+
}
|
|
22320
|
+
}
|
|
22321
|
+
const sourceIds = /* @__PURE__ */ new Set();
|
|
22322
|
+
const trackIds = /* @__PURE__ */ new Set();
|
|
22323
|
+
sources.forEach((s, i) => {
|
|
22324
|
+
const sid = s.sourceId;
|
|
22325
|
+
const at = `source "${sid}"`;
|
|
22326
|
+
if (!sid) issues.push(`source[${i}]: sourceId is empty`);
|
|
22327
|
+
else if (sourceIds.has(sid)) issues.push(`duplicate source id "${sid}"`);
|
|
22328
|
+
sourceIds.add(sid);
|
|
22329
|
+
if (sid && edls.length > 0) {
|
|
22330
|
+
const es = edlSources.get(sid);
|
|
22331
|
+
if (!es) issues.push(`${at}: not a source of the EDL`);
|
|
22332
|
+
else if (es.kind !== "video") issues.push(`${at}: the EDL source is kind:"${es.kind}", tracks need a video source`);
|
|
22333
|
+
}
|
|
22334
|
+
if (s.clock !== "source") issues.push(`${at}: clock must be "source"`);
|
|
22335
|
+
if (!(isObj(s.frame) && isNum(s.frame.w) && isNum(s.frame.h) && s.frame.w > 0 && s.frame.h > 0)) {
|
|
22336
|
+
issues.push(`${at}: frame w/h must be positive`);
|
|
22337
|
+
}
|
|
22338
|
+
const spans = arr(s.sampledSpans);
|
|
22339
|
+
spans.forEach((sp, j) => {
|
|
22340
|
+
const startMs = sp?.startMs;
|
|
22341
|
+
const endMs = sp?.endMs;
|
|
22342
|
+
if (!(isNum(startMs) && isNum(endMs) && endMs > startMs)) {
|
|
22343
|
+
issues.push(`${at}: sampledSpans[${j}] [${startMs},${endMs}) is not positive`);
|
|
22344
|
+
return;
|
|
22345
|
+
}
|
|
22346
|
+
if (!(Number.isInteger(startMs) && Number.isInteger(endMs))) issues.push(`${at}: sampledSpans[${j}] [${startMs},${endMs}) is not integer ms`);
|
|
22347
|
+
if (startMs < 0) issues.push(`${at}: sampledSpans[${j}] starts before 0`);
|
|
22348
|
+
const prevEnd = spans[j - 1]?.endMs;
|
|
22349
|
+
if (j > 0 && isNum(prevEnd) && startMs < prevEnd) {
|
|
22350
|
+
issues.push(`${at}: sampledSpans must be sorted and non-overlapping (span ${j})`);
|
|
22351
|
+
}
|
|
22352
|
+
});
|
|
22353
|
+
const cuts = s.cuts;
|
|
22354
|
+
if (cuts !== void 0) {
|
|
22355
|
+
const okCuts = Array.isArray(cuts) && cuts.every((c, k) => Number.isInteger(c) && c >= 0 && (k === 0 || c > cuts[k - 1]));
|
|
22356
|
+
if (!okCuts) issues.push(`${at}: cuts must be ascending non-negative ms`);
|
|
22357
|
+
}
|
|
22358
|
+
let boxes = 0;
|
|
22359
|
+
const tracks = arr(s.tracks);
|
|
22360
|
+
tracks.forEach((t2, k) => {
|
|
22361
|
+
if (!t2?.id) issues.push(`${at} track[${k}]: id is empty`);
|
|
22362
|
+
else if (trackIds.has(t2.id)) issues.push(`duplicate track id "${t2.id}"`);
|
|
22363
|
+
if (t2?.id) trackIds.add(t2.id);
|
|
22364
|
+
const a = t2?.attribution;
|
|
22365
|
+
if (a) {
|
|
22366
|
+
if (!(isNum(a.confidence) && a.confidence >= 0 && a.confidence <= 1)) {
|
|
22367
|
+
issues.push(`track "${t2.id}": attribution.confidence=${a.confidence} out of 0..1`);
|
|
22368
|
+
}
|
|
22369
|
+
if (!KNOWN_METHODS.has(a.method)) {
|
|
22370
|
+
warnings.push(`track "${t2.id}": unknown attribution method "${a.method}" (known: ${SPEAKER_TRACK_ATTRIBUTION_METHODS.join(", ")})`);
|
|
22371
|
+
}
|
|
22372
|
+
}
|
|
22373
|
+
boxes += perTrack(t2, s, f);
|
|
22374
|
+
});
|
|
22375
|
+
if (boxes > maxBoxes) issues.push(`${at}: ${boxes} boxes is over the cap of ${maxBoxes}`);
|
|
22376
|
+
});
|
|
22377
|
+
if (edls.length > 0) {
|
|
22378
|
+
const space = edlSpeakerSpace(edls);
|
|
22379
|
+
const attributed = sources.flatMap((s) => Array.isArray(s.tracks) ? s.tracks : []).filter((t2) => !!t2?.speaker);
|
|
22380
|
+
if (space.length > 0 && attributed.length > 0) {
|
|
22381
|
+
const inSpace = new Set(space);
|
|
22382
|
+
const matches = (t2) => inSpace.has(t2.speaker) || !!t2.attribution?.rawSpeaker && inSpace.has(t2.attribution.rawSpeaker);
|
|
22383
|
+
if (!attributed.some(matches)) {
|
|
22384
|
+
const labels = [...new Set(attributed.map((t2) => t2.speaker))].sort();
|
|
22385
|
+
issues.push(
|
|
22386
|
+
`no tracked speaker is in the edit's speaker set: the tracks are labelled ${labels.map((l) => `"${l}"`).join(", ")} and the edit uses ${space.map((l) => `"${l}"`).join(", ")} \u2014 wire Speaker Frames to the same transcript as Camera Switch`
|
|
22387
|
+
);
|
|
22388
|
+
} else {
|
|
22389
|
+
for (const t2 of attributed) {
|
|
22390
|
+
if (!matches(t2)) warnings.push(`track "${t2.id}": speaker "${t2.speaker}" is not in the edit's speaker set`);
|
|
22391
|
+
}
|
|
22392
|
+
}
|
|
22393
|
+
}
|
|
22394
|
+
}
|
|
22395
|
+
return f;
|
|
22396
|
+
}
|
|
22397
|
+
var BOX_FINDINGS_PER_RULE = 5;
|
|
22398
|
+
var MAX_LISTED_FINDINGS = 100;
|
|
22399
|
+
function boxIssues(b, at) {
|
|
22400
|
+
const out = [];
|
|
22401
|
+
for (const k of ["x", "y", "w", "h"]) {
|
|
22402
|
+
const v = b?.[k];
|
|
22403
|
+
if (!isNum(v) || v < 0 || v > 1) out.push([`with ${k} out of 0..1`, `${at}: ${k}=${v} out of 0..1`]);
|
|
22404
|
+
}
|
|
22405
|
+
if (out.length > 0) return out;
|
|
22406
|
+
if (b.w <= 0 || b.h <= 0) out.push(["with a non-positive w/h", `${at}: non-positive w/h`]);
|
|
22407
|
+
if (b.x + b.w > 1 + 1e-9) out.push(["extending past the right edge", `${at}: extends past the right edge (x+w>1)`]);
|
|
22408
|
+
if (b.y + b.h > 1 + 1e-9) out.push(["extending past the bottom edge", `${at}: extends past the bottom edge (y+h>1)`]);
|
|
22409
|
+
if (b.score !== void 0 && !(isNum(b.score) && b.score >= 0 && b.score <= 1)) out.push(["with a score out of 0..1", `${at}: score=${b.score} out of 0..1`]);
|
|
22410
|
+
return out;
|
|
22411
|
+
}
|
|
22412
|
+
function capListed(list, noun) {
|
|
22413
|
+
if (list.length <= MAX_LISTED_FINDINGS) return [...list];
|
|
22414
|
+
return [...list.slice(0, MAX_LISTED_FINDINGS), `${list.length - MAX_LISTED_FINDINGS} more ${noun} not listed`];
|
|
22415
|
+
}
|
|
22416
|
+
function inSpans(spans, ms) {
|
|
22417
|
+
let lo = 0;
|
|
22418
|
+
let hi = spans.length - 1;
|
|
22419
|
+
while (lo <= hi) {
|
|
22420
|
+
const mid = lo + hi >> 1;
|
|
22421
|
+
const sp = spans[mid];
|
|
22422
|
+
if (ms < sp.startMs) hi = mid - 1;
|
|
22423
|
+
else if (ms >= sp.endMs) lo = mid + 1;
|
|
22424
|
+
else return true;
|
|
22425
|
+
}
|
|
22426
|
+
return false;
|
|
22427
|
+
}
|
|
22428
|
+
function validateSpeakerTracks(set, opts = {}) {
|
|
22429
|
+
const safe = isObj(set) ? set : {};
|
|
22430
|
+
const f = validateCommon(safe, opts, (t2, source, { issues }) => {
|
|
22431
|
+
const boxes = Array.isArray(t2?.boxes) ? t2.boxes : [];
|
|
22432
|
+
const spans = Array.isArray(source.sampledSpans) ? source.sampledSpans : [];
|
|
22433
|
+
let first = Infinity;
|
|
22434
|
+
let last = -Infinity;
|
|
22435
|
+
const seen = /* @__PURE__ */ new Map();
|
|
22436
|
+
const report = ([rule, message]) => {
|
|
22437
|
+
const n = (seen.get(rule) ?? 0) + 1;
|
|
22438
|
+
seen.set(rule, n);
|
|
22439
|
+
if (n <= BOX_FINDINGS_PER_RULE) issues.push(message);
|
|
22440
|
+
};
|
|
22441
|
+
const outside = `outside every sampled span of source "${source.sourceId}"`;
|
|
22442
|
+
boxes.forEach((b, j) => {
|
|
22443
|
+
const at = `track "${t2.id}" box[${j}]`;
|
|
22444
|
+
boxIssues(b, at).forEach(report);
|
|
22445
|
+
if (!isNum(b?.ms)) {
|
|
22446
|
+
report(["whose ms is not a number", `${at}: ms is not a number`]);
|
|
22447
|
+
return;
|
|
22448
|
+
}
|
|
22449
|
+
if (!Number.isInteger(b.ms)) report(["whose ms is not an integer", `${at}: ms ${b.ms} is not an integer`]);
|
|
22450
|
+
const prev = boxes[j - 1]?.ms;
|
|
22451
|
+
if (j > 0 && isNum(prev) && !(b.ms > prev)) report(["not after the previous box", `${at}: ms ${b.ms} is not after the previous box (${prev})`]);
|
|
22452
|
+
if (!inSpans(spans, b.ms)) report([outside, `${at}: ms ${b.ms} is ${outside}`]);
|
|
22453
|
+
first = Math.min(first, b.ms);
|
|
22454
|
+
last = Math.max(last, b.ms);
|
|
22455
|
+
});
|
|
22456
|
+
for (const [rule, n] of seen) {
|
|
22457
|
+
if (n > BOX_FINDINGS_PER_RULE) issues.push(`track "${t2.id}": ${n - BOX_FINDINGS_PER_RULE} more boxes ${rule}`);
|
|
22458
|
+
}
|
|
22459
|
+
const cut = (Array.isArray(source.cuts) ? source.cuts : []).find((c) => first < c && c <= last);
|
|
22460
|
+
if (cut !== void 0) issues.push(`track "${t2.id}": spans the cut at ${cut} ms (boxes ${first}..${last})`);
|
|
22461
|
+
return boxes.length;
|
|
22462
|
+
});
|
|
22463
|
+
const maxBytes = opts.maxBytes ?? SPEAKER_TRACKS_MAX_BYTES;
|
|
22464
|
+
const bytes = opts.serializedBytes ?? new TextEncoder().encode(JSON.stringify(safe)).length;
|
|
22465
|
+
if (bytes > maxBytes) f.issues.push(`the track set is ${bytes} bytes, over the cap of ${maxBytes}`);
|
|
22466
|
+
return { ok: f.issues.length === 0, issues: capListed(f.issues, "issues"), warnings: capListed(f.warnings, "warnings") };
|
|
22467
|
+
}
|
|
22468
|
+
function validateSpeakerTrackSetDescriptor(d, opts = {}) {
|
|
22469
|
+
const safe = isObj(d) ? d : {};
|
|
22470
|
+
const f = validateCommon(safe, opts, (t2, _source, { issues }) => {
|
|
22471
|
+
if (!(Number.isInteger(t2?.boxCount) && t2.boxCount >= 0)) {
|
|
22472
|
+
issues.push(`track "${t2?.id}": boxCount must be a non-negative integer`);
|
|
22473
|
+
return 0;
|
|
22474
|
+
}
|
|
22475
|
+
return t2.boxCount;
|
|
22476
|
+
});
|
|
22477
|
+
if (!(typeof safe.url === "string" && safe.url.trim())) f.issues.push("url is empty");
|
|
22478
|
+
if (!(typeof safe.sha256 === "string" && SHA256_HEX.test(safe.sha256))) f.issues.push("sha256 must be 64 lowercase hex characters");
|
|
22479
|
+
const maxBytes = opts.maxBytes ?? SPEAKER_TRACKS_MAX_BYTES;
|
|
22480
|
+
if (!(Number.isInteger(safe.bytes) && safe.bytes > 0)) f.issues.push("bytes must be a positive integer");
|
|
22481
|
+
else if (safe.bytes > maxBytes) f.issues.push(`the track set is ${safe.bytes} bytes, over the cap of ${maxBytes}`);
|
|
22482
|
+
return { ok: f.issues.length === 0, issues: capListed(f.issues, "issues"), warnings: capListed(f.warnings, "warnings") };
|
|
22483
|
+
}
|
|
22484
|
+
|
|
21149
22485
|
// src/camera-switch-contract.ts
|
|
21150
22486
|
var CAMERA_SWITCH_DEFAULTS = Object.freeze({
|
|
21151
22487
|
/** The shortest shot; a shorter turn (an interjection) holds the shot. */
|
|
@@ -21210,10 +22546,10 @@ function cameraSwitchEdlProblem(edl) {
|
|
|
21210
22546
|
if (Array.isArray(v.clips)) return "camera-switch: `edl` is a clip set \u2014 pass one clip's EDL (a clip set fans out one run per clip on the canvas).";
|
|
21211
22547
|
if (!Array.isArray(v.sources) || !Array.isArray(v.segments)) return "camera-switch: `edl` needs `sources` and `segments`.";
|
|
21212
22548
|
if (v.segments.length === 0) return "camera-switch: `edl` has no segments.";
|
|
21213
|
-
const
|
|
22549
|
+
const num3 = (x) => typeof x === "number" && Number.isFinite(x) ? x : void 0;
|
|
21214
22550
|
for (const [i, row] of v.segments.entries()) {
|
|
21215
22551
|
const seg = row;
|
|
21216
|
-
const inMs =
|
|
22552
|
+
const inMs = num3(seg?.inMs), outMs = num3(seg?.outMs);
|
|
21217
22553
|
if (inMs === void 0 || outMs === void 0 || !(outMs > inMs)) return `camera-switch: segment ${i} needs a numeric inMs < outMs.`;
|
|
21218
22554
|
}
|
|
21219
22555
|
if (v.clock === "output") return "camera-switch: the edit must be on the master clock (an edit-plan EDL), not a rendered output's.";
|
|
@@ -21246,7 +22582,7 @@ function cameraSwitchSettingsPayload(data, edl, transcript) {
|
|
|
21246
22582
|
}
|
|
21247
22583
|
|
|
21248
22584
|
// src/edit-plan-contract.ts
|
|
21249
|
-
var EDIT_PLAN_MODES = ["tighten", "clips", "chapters"];
|
|
22585
|
+
var EDIT_PLAN_MODES = ["tighten", "clips", "chapters", "trailer"];
|
|
21250
22586
|
var EDIT_PLAN_TIERS = ["economy", "standard", "premium"];
|
|
21251
22587
|
var EDIT_PLAN_BUCKET_MINUTES = [15, 30, 60, 90, 120, 180];
|
|
21252
22588
|
var EDIT_PLAN_MAX_MINUTES = 180;
|
|
@@ -21268,7 +22604,10 @@ function buildEditPlanCreditId(mode, tier, durationSec) {
|
|
|
21268
22604
|
return `edit-plan:${mode}:${tier}:${editPlanBucketMinutes(durationSec)}m`;
|
|
21269
22605
|
}
|
|
21270
22606
|
function asEditPlanMode(v) {
|
|
21271
|
-
return v
|
|
22607
|
+
return parseEditPlanMode(v) ?? "tighten";
|
|
22608
|
+
}
|
|
22609
|
+
function parseEditPlanMode(v) {
|
|
22610
|
+
return typeof v === "string" && EDIT_PLAN_MODES.includes(v) ? v : void 0;
|
|
21272
22611
|
}
|
|
21273
22612
|
function asEditPlanTier(v) {
|
|
21274
22613
|
return v === "economy" || v === "premium" ? v : "standard";
|
|
@@ -21343,18 +22682,24 @@ function fnv1a64(text) {
|
|
|
21343
22682
|
}
|
|
21344
22683
|
return hi.toString(16).padStart(8, "0") + lo.toString(16).padStart(8, "0");
|
|
21345
22684
|
}
|
|
22685
|
+
var basisByPlan = /* @__PURE__ */ new WeakMap();
|
|
21346
22686
|
function editPlanBasis(plan) {
|
|
21347
|
-
return fnv1a64(canonicalJson(plan) ?? "");
|
|
22687
|
+
if (typeof plan !== "object" || plan === null) return fnv1a64(canonicalJson(plan) ?? "");
|
|
22688
|
+
const cached = basisByPlan.get(plan);
|
|
22689
|
+
if (cached !== void 0) return cached;
|
|
22690
|
+
const basis = fnv1a64(canonicalJson(plan) ?? "");
|
|
22691
|
+
basisByPlan.set(plan, basis);
|
|
22692
|
+
return basis;
|
|
21348
22693
|
}
|
|
21349
|
-
var
|
|
22694
|
+
var isRecord4 = (v) => !!v && typeof v === "object" && !Array.isArray(v);
|
|
21350
22695
|
function planShape(plan) {
|
|
21351
22696
|
if (Array.isArray(plan)) return "clips";
|
|
21352
|
-
if (
|
|
22697
|
+
if (isRecord4(plan) && Array.isArray(plan.segments)) return "edl";
|
|
21353
22698
|
return "other";
|
|
21354
22699
|
}
|
|
21355
22700
|
function checkEnvelope(edited, plan) {
|
|
21356
22701
|
if (edited === void 0 || edited === null) return { status: "none" };
|
|
21357
|
-
if (!
|
|
22702
|
+
if (!isRecord4(edited)) return { status: "invalid", issue: "editedEdl must be an object" };
|
|
21358
22703
|
if (edited.v !== EDITED_EDL_VERSION) return { status: "invalid", issue: `editedEdl.v must be ${EDITED_EDL_VERSION}` };
|
|
21359
22704
|
if (typeof edited.basis !== "string" || edited.basis.length === 0) {
|
|
21360
22705
|
return { status: "invalid", issue: "editedEdl.basis must be a non-empty string" };
|
|
@@ -21369,7 +22714,7 @@ function checkEnvelope(edited, plan) {
|
|
|
21369
22714
|
if (edited.kind === "edl") {
|
|
21370
22715
|
if (shape !== "edl") return { status: "invalid", issue: `an "edl" edit needs a Tighten plan (one EDL); this plan is ${describeShape(shape)}` };
|
|
21371
22716
|
const edl = edited.edl;
|
|
21372
|
-
if (!
|
|
22717
|
+
if (!isRecord4(edl) || !Array.isArray(edl.segments) || !Array.isArray(edl.dropped)) {
|
|
21373
22718
|
return { status: "invalid", issue: "editedEdl.edl must hold a segments array and a dropped array" };
|
|
21374
22719
|
}
|
|
21375
22720
|
} else if (edited.kind === "clips") {
|
|
@@ -21381,7 +22726,7 @@ function checkEnvelope(edited, plan) {
|
|
|
21381
22726
|
return { status: "invalid", issue: `editedEdl.clips holds ${clips.length} decisions; the plan has ${planned} clips` };
|
|
21382
22727
|
}
|
|
21383
22728
|
const bad = clips.findIndex(
|
|
21384
|
-
(c) => !
|
|
22729
|
+
(c) => !isRecord4(c) || typeof c.keep !== "boolean" || c.hook !== void 0 && typeof c.hook !== "string"
|
|
21385
22730
|
);
|
|
21386
22731
|
if (bad >= 0) return { status: "invalid", issue: `editedEdl.clips[${bad}] must be {keep: boolean, hook?: string}` };
|
|
21387
22732
|
}
|
|
@@ -21406,8 +22751,8 @@ function withHook(clip, hook) {
|
|
|
21406
22751
|
return clip;
|
|
21407
22752
|
}
|
|
21408
22753
|
}
|
|
21409
|
-
if (!
|
|
21410
|
-
const meta =
|
|
22754
|
+
if (!isRecord4(value)) return clip;
|
|
22755
|
+
const meta = isRecord4(value.meta) ? value.meta : {};
|
|
21411
22756
|
return { ...value, meta: { ...meta, hook } };
|
|
21412
22757
|
}
|
|
21413
22758
|
function resolveEditPlanOutput(plan, editedEdl) {
|
|
@@ -21434,6 +22779,11 @@ function editPlanSavedOutput(data) {
|
|
|
21434
22779
|
const { status: _status, ...output } = resolveEditPlanOutput(plan, data.editedEdl);
|
|
21435
22780
|
return output;
|
|
21436
22781
|
}
|
|
22782
|
+
function editPlanResultPatch(plan, editedEdl) {
|
|
22783
|
+
const basis = isRecord4(editedEdl) ? editedEdl.basis : void 0;
|
|
22784
|
+
const madeOnThisPlan = typeof basis === "string" && basis.length > 0 && basis === editPlanBasis(plan);
|
|
22785
|
+
return madeOnThisPlan ? { generatedJson: plan } : { generatedJson: plan, editedEdl: void 0 };
|
|
22786
|
+
}
|
|
21437
22787
|
function validateEditedEdl(editedEdl, plan) {
|
|
21438
22788
|
const check = checkEnvelope(editedEdl, plan);
|
|
21439
22789
|
if (check.status === "none") return { ok: false, issues: ["there is no edit"], warnings: [] };
|
|
@@ -21443,6 +22793,583 @@ function validateEditedEdl(editedEdl, plan) {
|
|
|
21443
22793
|
return validateEdl(resolved);
|
|
21444
22794
|
}
|
|
21445
22795
|
|
|
21446
|
-
export { ACCESS_LEVELS, ACTION_CARD_KINDS, ACTIVE_SCENE_HELPERS, ADVANCED_MODE_UNAVAILABLE_REASON, ADVICE_FAMILIES, AGGREGATEABLE_TYPES, AGGREGATE_LANE_SOURCE_TYPES, AI_AVATAR_DURATION_BUCKETS, AI_AVATAR_MAX_AUDIO_SEC, AI_AVATAR_MAX_DURATION_SEC, AI_AVATAR_RESERVE_IDS, AI_WRITER_PROVIDERS, ALA_CARTE_BOARDS, ALL_CAPTION_STYLES, ANIMALS, ANIMAL_SUBCATEGORY_LABELS, ANIMAL_SUBCATEGORY_ORDER, ANIMATE_SUB_GATES, ASPECT_RATIO_DIMENSIONS, AUDIO_ADDON_PROVIDERS, AUDIO_CROSSFADE_CURVES, AUDIO_CROSSFADE_CURVE_IDS, AUDIO_FX_PRESETS, AUDIO_FX_PRESET_LABELS, AUDIO_FX_PRESET_SET, AUDIO_FX_REVERB_PRESETS, AUDIO_PRODUCER_TYPES, AUDIO_SYNC_MIN_CONFIDENCE, AddBRollResultSchema, AnchorSceneStyleResultSchema, AnimateSubGateSchema, AssetRefSchema, AuditImagesResultSchema, AuditImagesShotEntrySchema, AuditPromptIssueSchema, AuditPromptResultSchema, AvatarPayloadError, BOARD_TO_ASSET_TYPE, BOARD_TO_COLUMN, BOARD_VARIANTS, BRAND_LESSON_KINDS, BridgeToNextSceneInputSchema, BridgeToNextSceneResultSchema, CAMERA_SWITCH_BOUNDS, CAMERA_SWITCH_CREDIT_ID, CAMERA_SWITCH_DEFAULTS, CAMERA_SWITCH_NAME_MAX, CAPTION_LEVER_BOUNDS, CAPTION_LOOKS, CAPTION_LOOK_IDS, CAPTION_MAX_WORDS_PER_LINE_MAX, CAPTION_MAX_WORDS_PER_LINE_MIN, CARD_OUTCOME_STATES, CATEGORY_DURATION_DEFAULTS, CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_ASSET_TYPES, CHARACTER_ASSET_VARIANTS, CHARACTER_ATTACH_COLUMNS, CHARACTER_FACETS, CHARACTER_FACET_IDS, CHARACTER_LORA_TRAINING_JOB_TYPE, CHARACTER_MOTION_PROVIDERS, CHARACTER_PICKER_DISPLAY_ORDER, CHARACTER_REFERENCE_PHOTO_KINDS, CHARACTER_STYLES, CHARACTER_VARIANT_ASSET_BUCKETS, CHAT_ENABLED_STAGES, CHAT_STAGES, CHAT_TURN_CAPS, CHAT_WIRED_STAGES, CINEMATIC_DEFAULT_DURATION_SEC, CINEMATIC_DEFAULT_RESOLUTION, CINEMATIC_MAX_DURATION_SEC, CINEMATIC_MAX_LOOKS, CINEMATIC_MAX_REFERENCE_IMAGES, CINEMATIC_MAX_REFERENCE_VIDEOS, CINEMATIC_MIN_DURATION_SEC, CINEMATIC_MIN_LOOKS, CINEMATIC_PROMPT_MAX, CINEMATIC_RESERVE_IDS, COLLABORATOR_ROLES, COLLECT_IN_HANDLE, COMBINE_TRANSITIONS, COMBINE_TRANSITION_GROUP_LABELS, COMBINE_TRANSITION_GROUP_ORDER, COMBINE_TRANSITION_IDS, COMPETITORS_MAX, COMPETITOR_ABOUT_PLATFORMS, COMPETITOR_ACCOUNT_KEYS, COMPETITOR_DEFAULT_ABOUT_PLATFORMS, COMPETITOR_SCAN_CREDIT_COSTS, COMPETITOR_SCAN_MAX_SEARCHES, COMPETITOR_SCAN_NODE_TYPE, COMPETITOR_SCHEDULES, COMPOSER_PLAN_FIELDS, COMPOSER_PLAN_MAP, CONTENT_IDEAS_BRAND_MAX, CONTENT_IDEAS_DEFAULT_COUNT, CONTENT_IDEAS_LANGUAGE_MAX, CONTENT_IDEAS_MAX_COUNT, CONTENT_IDEAS_MAX_RECIPE_INPUTS, CONTENT_IDEAS_PER_CHARGE, CONTENT_RECIPE_IDEAS_CREDIT_IDS, CONTENT_RECIPE_SOURCE_MAX, CONTENT_TYPES_BY_PLATFORM, CREATURE_ATTACH_COLUMNS, CREDIT_BASE_USD, CREDIT_ROUNDING_RESOLUTION, CastCoverageCriticVerdictSchema, CharacterImageCriticVerdictSchema, CharacterMetadataSchema, ChatTurnResponseSchema, CriticIssueSchema, DEFAULT_AUDIO_CROSSFADE_CURVE_ID, DEFAULT_CAPTION_LOOK, DEFAULT_CARRIED_FRACTION, DEFAULT_CHARACTER_ANGLE_COUNT, DEFAULT_CHARACTER_EXPRESSION_COUNT, DEFAULT_CHARACTER_FACET, DEFAULT_FRAME_DELIVERY, DEFAULT_FRAME_FIT, DEFAULT_LABEL_BY_SOURCE, DEFAULT_LOCATION_USAGE_MODE, DEFAULT_MUSIC_PROVIDER, DEFAULT_OVERLAY_QR, DEFAULT_OVERLAY_SHAPE, DEFAULT_OVERLAY_TEXT, DEFAULT_PANEL_COUNT, DEFAULT_REF_IMAGE_MAX, DEFAULT_SECTIONS, DEFAULT_SUBTITLE_LOOK, DEFAULT_SUNO_MODEL, DEFAULT_TEMPLATE_CATEGORY, DEFAULT_TEXT_TO_AUDIO_PROVIDER, DEFAULT_TRANSCRIBE_NODE_PROVIDER, DEFAULT_TRANSCRIBE_PROVIDER, DEFAULT_TTS_PROVIDER, DEFAULT_USAGE_MODE, DEFAULT_VIDEO_ANALYSIS_MODEL, DEFAULT_VIDEO_ANALYSIS_TIER, DEFAULT_VIDEO_CLIP_COST, DEFAULT_VIDEO_DURATION_SEC, DEFAULT_VIDEO_OVERLAY_LAYER, DEFAULT_VIDEO_PROVIDER, DEFAULT_VOICE_CHANGER_MODEL, DEFAULT_VOICE_DESIGN_MODEL, DETAIL_VARIANTS, DURATION_PRICED_PROVIDERS, DYNAMIC_PRODUCER_TYPES, DetectionResultSchema, EDITED_EDL_VERSION, EDIT_PLAN_BASE_CREDIT_ID, EDIT_PLAN_BUCKET_MINUTES, EDIT_PLAN_DEFAULT_CLIP_COUNT, EDIT_PLAN_MAX_CLIP_COUNT, EDIT_PLAN_MAX_MINUTES, EDIT_PLAN_MODES, EDIT_PLAN_TIERS, EDL_FULL_FRAME, EDL_SOURCE_ROLES, EDL_TARGET_ASPECTS, EDL_VERSION, EFFORT_TIER_BUMP, EMOTIONAL_BEAT, ENTITY_ASPECT_DEFAULTS, ENTITY_BUCKET_FIELDS, ENTITY_DB_ID_FIELD, ENTITY_IMAGE_HANDLE_TYPES, ENTITY_KIND_SCALAR_FIELDS, ENTITY_NAME_FIELD, ENTITY_NODE_KINDS, ENTITY_SCALAR_FIELDS, ENTITY_SECTIONS, ENTITY_STATUSES, ENTITY_TABLE, ENTITY_TOOL_RETRY_CAP, ENTITY_TYPES, EXECUTION_DATA_KEYS, EXECUTION_GRAPH_COMPOSED_PARAMETER_TYPES, EXTEND_VIDEO_PROVIDERS, EntityMetadataSchema, EntityRejectInputSchema, EntityStaleEventSchema, EntityStateChangeEventSchema, FACE_SWAP_PROVIDERS, FAL_LIP_SYNC_PROVIDERS, FAN_IN_TARGETS, FAN_OUT_EACH_HANDLES, FAN_OUT_EACH_TYPES, FEATURED_ENTITIES, FILM_BASE_CREDITS, FLEXIBLE_INPUT_LIP_SYNC_PROVIDERS, FLUX2_RES_MP, FLUX_LORA_CHARACTER_MODEL_ID, FRAME_DELIVERIES, FRAME_DELIVERY_BY_PROVIDER, FRAME_FITS, FRAME_FIT_STRETCH_TOLERANCE, FRAME_MODE_ADAPTIVE_ONLY_ASPECT, FRAME_TARGET_HANDLES, FREECUT_EXPORT_COMPLETE, FREECUT_EXPORT_PROGRESS, FREECUT_READY, FREECUT_REQUEST_IMPORT, FURNITURE, FURNITURE_SUBCATEGORY_LABELS, FURNITURE_SUBCATEGORY_ORDER, FixContinuityInputSchema, FixContinuityResultSchema, GEMINI_OMNI_PROVIDERS, GENERATE_TEXT_DELIMITER, GLOBAL_MAX_DURATION_SECONDS, GRANTED_ACCESS, GROUP_HANDLE_PREFIX, GUIDANCE_SCALE_SUPPORT, GVP_ANCHOR_CHOICES, GVP_DEFAULT_PROVIDER, GVP_END_FRAME_PROVIDERS, GVP_EXTEND_PROVIDERS, GVP_SUPPORTED_PROVIDERS, GenerateMotionInputSchema, GenerateMotionResultSchema, HANDLE_PORT_SEPARATOR, HELPERS_SHIPPED_IN_1B3, HIGH_QUALITY_PROVIDERS, HINT_EXEMPT_PARAMETER_TYPES, I2I_MASK_SUPPORT, I2I_STRENGTH_SUPPORT, IDEOGRAM_PROVIDERS, IMAGE_ASPECT_RATIO_VALUES, IMAGE_CRITIC_LEAF_MODES, IMAGE_CRITIC_MAX_RETRIES, IMAGE_CRITIC_METADATA_KEYS, IMAGE_CRITIC_MIN_ADHERENCE_SCORE, IMAGE_CRITIC_MODES, IMAGE_CRITIC_UNRESOLVABLE, IMAGE_EDIT_PROVIDERS, IMAGE_GEN_PROVIDERS, IMAGE_I2I_PROVIDERS, IMAGE_MASK_MODE, IMAGE_OVERLAY_BASE_CREDITS, IMAGE_OVERLAY_VARIANT_CREDITS, IMAGE_PROMPT_MAX, IMAGE_REF_TYPES, IMAGE_TO_VIDEO_PROVIDERS, INPUT_FIELD_MAP2 as INPUT_FIELD_MAP, INPUT_NODE_TYPES, INSTAGRAM_ANALYSIS_CREDIT_ID, INSTAGRAM_CAROUSEL_MAX_ITEMS, INSTAGRAM_CAROUSEL_MIN_ITEMS, INSTAGRAM_HOSTS, INSTAGRAM_SCRAPE_CREDIT_COSTS, INSTAGRAM_SCRAPE_DEFAULT_COUNT, INSTAGRAM_SCRAPE_FALLBACK_CREDIT_ID, INSTAGRAM_SCRAPE_MAX_COUNT, INSTAGRAM_SCRAPE_MAX_SOURCES, INSTAGRAM_SCRAPE_MAX_TARGET_LENGTH, INSTAGRAM_SCRAPE_MODES, INSTAGRAM_SCRAPE_NODE_TYPE, INSTAGRAM_SCRAPE_PERIODS, INSTAGRAM_SCRAPE_TIERS, ITER_CLONE_PATTERN, ImageCriticIssueSchema, ImageCriticResultSchema, ImageCriticVerdictSchema, ImprovePromptInputSchema, ImprovePromptResultSchema, KEYFRAME_CREDITS_PER_SHOT, KINETIC_CAPTION_STYLES, KINETIC_ONLY_CAPTION_LEVER_KEYS, LANGUAGES, LEGACY_EXPOSED_FIELD_KEYS, LEGACY_LOTTIE_HOST_REMAP, LEGACY_TEMPLATE_CATEGORIES, LIP_SYNC_DURATION_BUCKETS, LIP_SYNC_MAX_AUDIO_SECONDS, LIP_SYNC_PROVIDERS, LLM_FEATURE_DEFAULTS, LLM_MODALITY_CAPS, LLM_MODELS, LLM_MODEL_IDS, LLM_REASONING_EFFORTS, LLM_ROUTE_DEFAULTS, LLM_TEXT_INPUT_MAX, LLM_VENDOR_LABELS, LLM_VENDOR_ORDER, LOCATION_ASSET_TYPES, LOCATION_ASSET_VARIANTS, LOCATION_ATMOSPHERE_PROVIDERS, LOCATION_ATTACH_COLUMNS, LOCATION_BUCKET_TO_CATALOG_ID, LOCATION_PRESET_TO_CATALOG, LOCATION_REFERENCE_PHOTO_KINDS, LOCATION_REFERENCE_PHOTO_KIND_LABELS, LOCATION_USAGE_MODES, LOTTIE_OVERLAY_CATALOG, LOTTIE_SLOT_FIELD_PREFIX, LTX_EXTEND_DURATION, LTX_EXTEND_PER_SECOND_CREDIT_ID, LTX_RETAKE_MIN_DURATION_SEC, LTX_RETAKE_PER_SECOND_CREDIT_ID, LocationImageCriticVerdictSchema, LocationMetadataSchema, LocationsCoverageCriticIssueSchema, LocationsCoverageCriticVerdictSchema, MATCH_CUT_BREAK_GATE, MAX_CUSTOM_ENTRIES_PER_BOARD, MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER, MAX_LOCATION_VARIANTS, MAX_NEGATIVE_PROMPT_CHARS_BY_PROVIDER, MAX_PANELS_PER_SHEET, MAX_TTS_CHARS_BY_PROVIDER, MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER, MEMBER_STATUSES, META_ADS_ADVERTISER_MAX_RESULTS, META_ADS_ANALYSIS_CREDITS_PER_AD, META_ADS_ANALYSIS_CREDIT_ID, META_ADS_ANALYSIS_FOCUS_MAX, META_ADS_ANALYSIS_TIERS, META_ADS_FORMATS, META_ADS_NODE_MODES, META_ADS_PLATFORMS, META_ADS_SCRAPE_COUNT_OPTIONS, META_ADS_SCRAPE_CREDIT_COSTS, META_ADS_SCRAPE_DEFAULT_COUNT, META_ADS_SCRAPE_DEFAULT_COUNTRY, META_ADS_SCRAPE_FALLBACK_CREDIT_ID, META_ADS_SCRAPE_MAX_COUNT, META_ADS_SCRAPE_MAX_QUERY_LENGTH, META_ADS_SCRAPE_MAX_SOURCES, META_ADS_SCRAPE_MODES, META_ADS_SCRAPE_NODE_TYPE, META_ADS_SCRAPE_PERIODS, META_ADS_SCRAPE_STATUSES, META_ADS_SCRAPE_TIERS, MINIMAX_H3_DEFAULT_RESOLUTION, MINIMAX_H3_PROVIDERS, MODELS_WITH_REFERENCE_IMAGE_SUPPORT, MODEL_CATALOG, MODEL_KINDS, MODEL_PARAM_NODE_TYPES, MODEL_RECOMMENDATIONS, MODIFY_IMAGE_PROVIDERS, MOTION_COLUMN, MOTION_TRANSFER_PROVIDERS, MUSIC_CREDIT_ID, MUSIC_PROVIDERS, MUSIC_PROVIDER_LABELS, MatchCutVerdictSchema, NATIVE_ADAPTIVE_ASPECT, NATIVE_NEGATIVE_PROMPT_MODELS, NATIVE_NEGATIVE_VIDEO_PROVIDERS, NEGATIVE_PROMPT_MAX, NODARO_IMPORT_FILES, NODARO_LOAD_TIMELINE, NODARO_LOAD_VIDEO, NODARO_RESET_PROJECT, NODE_DEFAULT_TYPES, NODE_MAPPABLE_FIELDS, NODE_PRESET_EXPORT_KIND, NODE_REF_PATTERN, NON_EN_LOCALE_IDS, NON_PROMPT_TEXT_LANES, NO_SPLIT_DELIMITER, OAUTH_SCOPES, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ASSET_VARIANTS, OBJECT_ATTACH_COLUMNS, OBJECT_MOTION_PROVIDERS, OBJECT_PICKER_NODE_TYPES, ORG_ERROR_CODES, ORG_KINDS, ORG_ROLES, ORG_STATUSES, OUTPUT_BEARING_NODE_STATUSES, OUTPUT_FIELD_MAP, OUTPUT_FORMATS, OVERLAY_ANCHORS, OVERLAY_FONTS, OVERLAY_FONT_IDS, OVERLAY_IMAGE_MASKS, OVERLAY_LAYER_KINDS, OVERLAY_MAX_VARIANTS, OVERLAY_PLATFORMS, OVERLAY_PLATFORM_IDS, OVERLAY_SHAPES, OVERLAY_TEXT_ALIGNS, OVERLAY_VARIANT_HANDLE_PREFIX, OWN_LIST_NODE_TYPES, ObjectMetadataSchema, OptimizeForModelInputSchema, OptimizeForModelResultSchema, OrgSettingsSchema, PARAMETER_NODE_TYPES, PASSTHROUGH_TYPES, PAYG_RETENTION_DAYS, PER_FORMAT_DURATION_BOUNDS, PICKER_TO_COMBINE_TRANSITION, PIPELINE_ACTIVATION_MODES, PIPELINE_FORMATS, PIPELINE_HARD_TIMEOUT_MS, PIPELINE_MODEL_STAGES, PIPELINE_MODES, PIPELINE_OUTPUT_RESOLUTIONS, PIPELINE_PINNABLE_IMAGE_MODELS, PIPELINE_PINNABLE_SCRIPT_LLMS, PIPELINE_PINNABLE_VIDEO_MODELS, PIPELINE_STAGE_NAMES, PIPELINE_STAGE_TIMEOUT_MS, PIPELINE_TYPES, PLACEHOLDER_CHARACTER_NAME, PLATFORM_LABELS, PLATFORM_SPECS, PRESET_APPLY_CLEAR_KEYS, PRESET_EXCLUDED_KEYS, PRESET_LABELS, PRESET_LEVER_GROUPS, PRESET_SETTING_KEYS, PRICING_DEFAULT_DURATION_SEC, PRICING_DEFAULT_RESOLUTION, PRO3D_RENDER_ASPECT_RATIOS, PRO3D_RENDER_CREDIT_ID, PRO3D_RENDER_DEFAULT_ENGINE, PRO3D_RENDER_DEFAULT_QUALITY, PRO3D_RENDER_DEFAULT_REPAIR_PASSES, PRO3D_RENDER_DEFAULT_STYLE, PRO3D_RENDER_ENGINES, PRO3D_RENDER_LABEL, PRO3D_RENDER_LIMITS, PRO3D_RENDER_MAX_REPAIR_PASSES, PRO3D_RENDER_MIN_REPAIR_PASSES, PRO3D_RENDER_NODE_TYPE, PRO3D_RENDER_PROMPT_MAX, PRO3D_RENDER_QUALITY_PROFILES, PRO3D_RENDER_SOURCE_KINDS, PRO3D_RENDER_STYLES, PROJECTED_TRIGGER_NODE_TYPES, PROMPT_HARD_CEILING, PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY, PROVIDER_DIRECTIVE_DEFAULTS, PROVIDER_PLACEHOLDER_PREFIX, PipelineCompletedEventSchema, PipelineConfigSchema, PipelineDriftSummarySchema, PipelineEditorDecisionsReadyEventSchema, PipelineForkedEventSchema, PipelineInputSchema, PipelineMusicReadyEventSchema, PipelineStageNameSchema, PipelineStageStatusSchema, PipelineStateSchema, PipelineStatusSchema, PresetSettingsSchema, QA_CHECK_PROVIDERS, REASONING_OUTPUT_FLOOR, RECAST_SEGMENT_PACKS, REDUCE_STRATEGIES, REDUCE_STRATEGY_IDS, REFERENCE_BOARD_PROVIDERS, REFERENCE_BOARD_TEMPLATES, REFERENCE_HANDLE_MAP, REFERENCE_ROLE_PRESETS, REF_HANDLE_CATEGORY, REF_IMAGE_MAX_LIMITS, REF_TOKEN_NAMESPACE_PREFIXES, RENDERING_SPEED_SUPPORT, RENDER_VIDEO_CREDIT_ID, REPEATABLE_NODE_TYPES, REPEAT_PLACEHOLDER, REPLICATE_LIP_SYNC_PROVIDERS, RESERVED_TEMPLATE_VARS, SAVED_POSTS_LOOKUP_MAX, SAVED_POSTS_PAGE_MAX, SAVED_POST_MAX_TAGS, SAVED_POST_NOTE_MAX, SAVED_POST_SOURCES, SAVED_POST_TAG_MAX, SCENE3D_ASSERTION_RESTORED_CODE, SCENE3D_ASSET_KINDS, SCENE3D_ASSET_ROLES, SCENE3D_ASSET_ROLE_KINDS, SCENE3D_AUTHORING_ASSUMPTION_CODE, SCENE3D_AUTHORING_ENGINES, SCENE3D_BASIC_ENGINE, SCENE3D_BASIC_SCHEMA_VERSION, SCENE3D_CAMERA_TRACK_FORMAT, SCENE3D_CAMERA_TRACK_LIMITS, SCENE3D_CAMERA_TRACK_VERSION, SCENE3D_CLAY_LIGHTING_PRESETS, SCENE3D_DEFAULT_ADVANCED_ENGINE, SCENE3D_DEFAULT_DURATION_SECONDS, SCENE3D_DEFAULT_ENTITY_CAPABILITIES, SCENE3D_DEFAULT_FPS, SCENE3D_EDIT_NODE_TYPE, SCENE3D_ENTITY_CAPABILITIES, SCENE3D_ENTITY_ROLES, SCENE3D_GENERATE_NODE_TYPE, SCENE3D_GLB_EXTRAS_ALLOWLIST, SCENE3D_GLB_EXTRAS_ENTITY_ID, SCENE3D_GLB_EXTRAS_MATERIAL_ROLE, SCENE3D_GLB_EXTRAS_SUBPART_ID, SCENE3D_LIMITS, SCENE3D_PLAN_FIELD, SCENE3D_PLAN_TYPE, SCENE3D_PRIMITIVES, SCENE3D_PRIMITIVE_MATERIAL_ROLE, SCENE3D_REMEDY_AUTO_APPLIED_CODE, SCENE3D_RENDERER_ASSET_KINDS, SCENE3D_RENDER_BASE_MAX_PX, SCENE3D_RENDER_TIERS, SCENE3D_RENDER_TIER_MULTIPLIERS, SCENE3D_RENDER_XLARGE_MIN_AREA_PX, SCENE3D_REVIEW_REFUSED_CODE, SCENE3D_REVIEW_UNAVAILABLE_CODE, SCENE3D_REVIEW_UNAVAILABLE_REASONS, SCENE3D_SCHEMA_VERSION, SCENE3D_SCHEMA_VERSION_V2, SCENE3D_SUPPORTED_SCHEMA_VERSIONS, SCENE3D_V2_CONTENT_HASH_EXCLUDED, SCENE3D_V2_ENGINES, SCENE3D_V2_LIMITS, SCENE3D_V2_OVERRIDE_OPERATION_VERSION, SCENE3D_V2_PRIMITIVES, SCENE_HELPER_NAMES, SCHEDULE_EVERY_LIMITS, SCHEDULE_RULE_KINDS, SCHEDULE_TRIGGER_NODE_TYPE, SCRAPER_ACTOR_LABELS, SCRAPER_CREDIT_COSTS, SCRAPER_OUTPUT_FIELDS, SCRIPT_PROVIDERS, SCRIPT_SCENE_COUNT_DEFAULT, SCRIPT_SCENE_COUNT_RANGE, SCRIPT_STYLE_GUIDE_MAX_LENGTH, SCRIPT_TARGET_DURATION_DEFAULT, SCRIPT_TARGET_DURATION_RANGE, SCRIPT_TONE_MAX_LENGTH, SEASONS, SECTION_BOARD, SECTION_KINDS, SEEDANCE_2_5_REF_LIMITS, SEEDANCE_2_CONTINUATION_REF_SEC, SEEDANCE_2_EXTEND_STITCH, SEEDANCE_2_PROVIDERS, SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER, SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC, SEEDANCE_2_REF_LIMITS, SEEDANCE_LIP_SYNC_PROVIDERS, SEEDANCE_VIDEO_EDIT_PROVIDERS, SEEDANCE_VIDEO_EDIT_SHAPE, SEED_SUPPORT, SEPARATOR_DISPLAY, SEPARATOR_PRESETS, SETTINGS_HINT_SOURCES, SETTINGS_INPUT_CONSUMERS, SETTINGS_INPUT_HANDLE, SETTINGS_SOURCE_FIELDS, SETTINGS_SOURCE_TYPES, SHEET_ASPECTS, SHEET_BACKGROUNDS, SHEET_PRESETS, SHEET_SKINS, SHEET_TYPES, SHORT_FILM_ANGLE_COUNT, SHORT_FILM_EXPRESSION_COUNT, SHORT_FILM_VARIANT_THRESHOLD_SEC, SLOT_TOKEN_RE, SMART_CUT_WINDOW_DEFAULT, SMART_CUT_WINDOW_MAX, SMART_CUT_WINDOW_MIN, SOCIAL_PLATFORMS, SOCIAL_POST_NODE_TYPES, SOCIAL_POST_VIDEO_LINK_MARGIN_MS, SOCIAL_SEARCH_COUNTS, SOCIAL_SEARCH_CREDITS_PER_PAGE, SOCIAL_SEARCH_CREDIT_COSTS, SOCIAL_SEARCH_DEFAULT_PICK_TOP, SOCIAL_SEARCH_MAX_QUERY_LENGTH, SOCIAL_SEARCH_MODES, SOCIAL_SEARCH_NODE_TYPE, SOCIAL_SEARCH_PAGED_MODES, SOCIAL_SEARCH_PERIODS, SOCIAL_SEARCH_PLATFORM_MODES, SOCIAL_SEARCH_SORTS, SOCIAL_SEARCH_VIDEO_KINDS, SOCIAL_VIDEO_HOSTS, SPEAKER_EMPHASIS_STYLES, SPEAKER_LAYOUTS, SPEAKER_LAYOUT_IDS, SPEAKER_SWITCHES, SPEAKER_SWITCH_IDS, STAGE_PATCH_SCHEMA, STATIC_CAPTION_STYLES, STRUCTURAL_SECTIONS, STRUCTURED_VISION_MODELS, STUDIO_DEPENDENT_FRAMES_CAPABILITY, STUDIO_KEYFRAME_ACCEPTANCE_PRIVATE_KEYS, STUDIO_KEYFRAME_NODE_TRANSIENT_KEYS, STUDIO_KEYFRAME_REVIEW_KEYS, STUDIO_KEYFRAME_TRANSIENT_KEYS, STUDIO_PREVIZ_RUN_STATE_KEYS, STUDIO_SEQUENCE_PLANNING_KEYS, STUDIO_SEQUENCE_POLICY_KEYS, STUDIO_SEQUENCE_UNIT_MANIFEST_KEYS, STUDIO_SEQUENCE_UNIT_REVIEW_KEYS, STUDIO_SHOT_DRAFT_KEYS, STUDIO_SHOT_TRANSIENT_KEYS, STUDIO_TAKE_SEQUENCE_KEYS, STUDIO_TAKE_VOICE_KEYS, STUDIO_TRANSIENT_KEYS, SUBMISSION_STATUSES, SUNO_ACTIVE_MODELS, SUNO_ADD_TRACK_MODELS, SUNO_DURATION_MODELS, SUNO_FIELD_HANDLE_FIELDS, SUNO_HARD_CEILING, SUNO_LEGACY_MODELS, SUNO_MODELS, SUNO_SELECT_OPERATIONS, SUNO_TEXT_MAX, SUNO_TITLE_MAX, SUNO_TRACK_SOURCE_TYPES, SUNO_VERSION_CREDIT_KEYS, SUNO_VERSION_PRICED_OPERATIONS, SUPPORTED_FONT_NAMES, SURROUND_DIRECTIONS, SWITCHX_BLOCK_FRAMES, SWITCHX_FRAME_TIERS, SceneHelperNameSchema, SceneInputModeSchema, SceneMetadataSchema, SceneNodeDataSchema, SceneSpecSchema, ScriptCriticVerdictSchema, SequenceExecutionRequiredError, ShotSpecSchema, ShowrunnerPlanSchema, StageAwaitingSubGateEventSchema, StoryboardCohesionCriticVerdictSchema, StyleDirectivesSchema, SubGateNameSchema, T2I_TO_I2I_VARIANT, TASK_CHAINED_EDIT_PROVIDERS, TELEGRAM_ACCOUNT_SEND_NODE_TYPE, TELEGRAM_ACCOUNT_TRIGGER_MESSAGE_FIELDS, TELEGRAM_ACCOUNT_TRIGGER_MESSAGE_HANDLE, TELEGRAM_ACCOUNT_TRIGGER_NODE_TYPE, TELEGRAM_ACCOUNT_TRIGGER_OUTPUT_HANDLES, TELEGRAM_ACCOUNT_TRIGGER_POST_FIELDS, TELEGRAM_SEND_AS, TELEGRAM_SEND_DESTINATIONS, TELEGRAM_TRIGGER_NODE_TYPE, TEMPLATE_CATEGORIES, TEXT_TO_AUDIO_PRICING, TEXT_TO_AUDIO_PROVIDERS, TEXT_TO_AUDIO_SFX_CREDIT_IDS, TEXT_TO_VIDEO_PROVIDERS, TIER_MAX_PIPELINE_COST_CREDITS, TIER_PIPELINE_PARALLELISM, TILT_CARRIED_FRACTION, TOPAZ_DEFAULT_UPSCALE_FACTOR, TOPAZ_UPSCALE_FACTORS, TRANSCRIBE_LANES, TRANSCRIBE_PROVIDERS, TRANSCRIBE_PROVIDER_CAPABILITIES, TRANSIENT_RUNTIME_KEYS, TTS_FALLBACK_PROVIDER, TTS_PROVIDERS, TTS_PROVIDER_ALIASES, TTS_TEXT_MAX, TWO_K_RESOLUTION_PROVIDERS, TransitionTypeSchema, UPSCALE_IMAGE_PROVIDERS, USAGE_GROUP_BYS, USAGE_MODES, VARIABLES_HANDLE_ID, VARIABLE_PRICING_MODELS, VEHICLES, VEHICLE_SUBCATEGORY_LABELS, VEHICLE_SUBCATEGORY_ORDER, VEO_PROVIDERS, VIDEO_ANALYSIS_AUDIO_MODES, VIDEO_ANALYSIS_BUCKET_CREDITS, VIDEO_ANALYSIS_BUCKET_GRACE_SEC, VIDEO_ANALYSIS_CLIP_TRANSITIONS_IN, VIDEO_ANALYSIS_DEFAULT_VARIATION, VIDEO_ANALYSIS_DURATION_BUCKETS, VIDEO_ANALYSIS_DURATION_TOLERANCE_SEC, VIDEO_ANALYSIS_ENTITY_SOURCES, VIDEO_ANALYSIS_FACELESS_ANGLES, VIDEO_ANALYSIS_LEGACY_MODELS, VIDEO_ANALYSIS_LLM_MODELS, VIDEO_ANALYSIS_MAX_DURATION_SEC, VIDEO_ANALYSIS_MAX_SCENE_SEC, VIDEO_ANALYSIS_MAX_VARIATIONS, VIDEO_ANALYSIS_MIXED_TIERS, VIDEO_ANALYSIS_SHOT_ANGLES, VIDEO_ANALYSIS_SPEED_EFFECTS, VIDEO_ANALYSIS_STORY_JUMPS, VIDEO_ANALYSIS_TEXT_KINDS, VIDEO_ANALYSIS_TIERS, VIDEO_ANALYSIS_TIER_LABELS, VIDEO_ANALYSIS_TIER_ORDER, VIDEO_ANALYSIS_TIMES_OF_DAY, VIDEO_ANALYSIS_TRANSITIONS, VIDEO_ANALYSIS_VARIATION_SLUGS, VIDEO_ANALYSIS_VISUAL_EFFECTS, VIDEO_ANALYSIS_WINDOW, VIDEO_AUDIO_CAPABILITY, VIDEO_AUDIT_BUCKET_CREDITS, VIDEO_CLIP_CREDITS, VIDEO_CRITIC_CREDITS_PER_SHOT, VIDEO_CRITIC_FRAME_MODES, VIDEO_CRITIC_MAX_RETRIES, VIDEO_CRITIC_METADATA_KEYS, VIDEO_CRITIC_MIN_ADHERENCE_SCORE, VIDEO_CRITIC_RESERVED_CREDITS_PER_SHOT, VIDEO_DURATION_AUTO, VIDEO_DURATION_TIERS, VIDEO_GEN_COLLAPSED_T2V_IDS, VIDEO_GEN_PROVIDERS, VIDEO_INPUT_LIP_SYNC_PROVIDERS, VIDEO_LINK_TOLERANT_CONSUMER_TYPES, VIDEO_MODEL_CAPS, VIDEO_MODE_ALIASES, VIDEO_ONLY_PARAMETER_NODE_TYPES, VIDEO_OUTPUT_CANVAS, VIDEO_OVERLAY_ANIMATION_MIN_SCALE, VIDEO_OVERLAY_ANIMATION_SEC, VIDEO_OVERLAY_BADGE_INSET, VIDEO_OVERLAY_BADGE_WIDTH, VIDEO_OVERLAY_BOUNDS, VIDEO_OVERLAY_BOX_FIELDS, VIDEO_OVERLAY_CORNERS, VIDEO_OVERLAY_DEFAULT_BACKGROUND, VIDEO_OVERLAY_ERROR_CODES, VIDEO_OVERLAY_FITS, VIDEO_OVERLAY_HANDLE_IDS, VIDEO_OVERLAY_LAYER_PLAN_HANDLE, VIDEO_OVERLAY_MAX_COMPOSITION_KEY_LENGTH, VIDEO_OVERLAY_MAX_LAYERS, VIDEO_OVERLAY_MAX_TIME_SEC, VIDEO_OVERLAY_MAX_TOTAL_LAYER_BYTES, VIDEO_OVERLAY_OUTPUT_ASPECTS, VIDEO_OVERLAY_PRESETS, VIDEO_OVERLAY_PRESET_IDS, VIDEO_OVERLAY_WARNING_CODES, VIDEO_PRODUCER_TYPES, VIDEO_PROMPT_MAX, VIDEO_PROVIDERS_REQUIRING_IMAGE, VIDEO_PROVIDERS_WITHOUT_DISPATCH, VIDEO_REF_LIMITS_BY_PROVIDER, VIDEO_REF_VIDEO_DURATION_LIMITS, VIDEO_SFX_PRICING, VIDEO_TO_VIDEO_NODE_PROVIDERS, VIDEO_TO_VIDEO_PROVIDERS, VIDEO_UPSCALE_PROVIDERS, VIDEO_UTIL_PRICING, VIDEO_VARIABLE_PRICING, VOICE_CHANGER_MODELS, VOICE_CHANGER_MODEL_IDS, VOICE_DESIGN_MODELS, ValidateMatchCutInputSchema, ValidateMatchCutResultSchema, VideoCriticVerdictSchema, VoiceMatchSchema, WAN_3_DEFAULT_RESOLUTION, WAN_3_PROVIDERS, WARDROBE_VARIANTS, WEAPONS, WEAPON_SUBCATEGORY_LABELS, WEAPON_SUBCATEGORY_ORDER, WEBHOOK_TRIGGER_NODE_TYPE, WORKFLOW_VISIBILITIES, WORKSPACE_HEADER, WORKSPACE_HEADER_LOWER, WORKSPACE_ROLES, WorkspaceSettingsSchema, YOUTUBE_HOSTS, adCreativeAnalysisFrom, adviceFamilyOf, aggregateByType, aiAvatarReserveCreditId, alignedFieldList, analyzedSceneSchema, applyAudioSyncOffsets, applyDefaultVideoSelection, applyEdlCreditId, applyHandleInputOverride, applyRange, applyRangeIndices, applyScene3DEditOperations, applyScene3DV2EditOperations, applySettingsInput, applySlots, applyVideoAudioToggle, applyVideoNegativePrompt, applyVideoOverlayPreset, asEditPlanMode, asEditPlanTier, aspectRatioFromDims, aspectRatioOptionsByKind, aspectRatioToNumber, assembleNarratedVideoCredits, assembleVideoOverlayRequest, assertCanvasExecutionAllowed, autoStrokeWidth, availableReasoningEfforts, bucketSecondsFromAuditCreditId, bucketSecondsFromCreditId, buildBoardPrompt, buildChildrenByParent, buildConditionVariables, buildCreditModelIdentifier, buildEditPlanCreditId, buildExpressionFromVisual, buildFeedMaps, buildInstagramScrapeCreditId, buildLipSyncCreditId, buildLlmCreditIdentifier, buildMetaAdsScrapeCreditId, buildModelMenu, buildModelTree, buildMotionCreditModelIdentifier, buildNodePresetExport, buildPanelPrompt, buildPro3DRenderSource, buildProgressSegments, buildRangeLabel, buildScraperCreditId, buildVideoAnalysisCreditId, buildVideoAuditCreditId, buildVideoCreditModelIdentifier, calculateCombinedProgress, calculateMonetizationMarkup, calculateMonetizedCost, calculateProgress, cameraSwitchCameras, cameraSwitchEdlProblem, cameraSwitchSettingsPayload, canonicalExposedFieldKey, canonicalScene3DPlanV2Json, canonicalTtsProvider, canonicalVarName, canonicalizeOverrideKeys, captionRoutesToRemotion, centreCropToAspect, characterBoardItems, characterBucketDisplayRank, characterMentionSlug, characterMentionableAssetArrays, characterSheetRefItems, characterVariantAssetArrays, checkRefVideoDurations, cinematicCreditId, clampCameraSwitchSetting, clampCinematicDuration, clampContentIdeasCount, clampEditPlanClipCount, clampInstagramFeaturedIndex, clampMetaAdsFeaturedIndex, clampSmartCutWindow, classifyCreativeFormat, classifyRefToken, cleanOrphanedItems, cleanSpeakerNames, clearImageCriticMetadata, clearVideoCriticMetadata, clearWiredVideoOverlayImageUrls, clipLookSchema, collectAncestorRefs, combineSameLabelRefs, compactWithRows, competitorScanCreditId, competitorScanCredits, competitorScanSearches, computeAggregateLanes, computeFrameFitPlan, computeScene3DPlanV2ContentHash, connectedSettingsSources, contentIdeasCreditFeature, contentIdeasCreditId, contentRecipeCreditId, countRefModalityEdges, creditRangesAll, creditsToUsd, decodeProviderItem, defaultCarriedFraction, defaultEdgeOutputMode, defaultResolutionFor, defaultRoleForSource, defaultSpeakerMap, defaultVideoAspectRatio, deriveLinkedFields, deriveLottieSlotFields, deriveSlotRefs, describeAudioSyncOffsetIssue, describeEdgeBehavior, describeMaskRegion, describeNodeAdjustments, describeSlotControl, detectVideoLinkPlatform, dropUnknownBindings, dropUnknownSpeakers, durationsByMode, editPlanBasis, editPlanBucketMinutes, editPlanSavedOutput, editPlanSourceDurationSec, editPlanTranscriptOrigin, edlDurationMs, effectiveContentModel, effectiveReasoningEffort, encodeProviderItem, ensureLocaleCatalogLoaded, entityHydrationColumns, entityMentionSlug, entityMentionSlugForRef, entityScalarFields, entitySlotSchema, entryMatchesQuery, estimateCombineVideosCredits, estimateFilmCredits, estimateLoopTrimAddonCredits, estimateLoopVideoCredits, estimateScriptDurationSec, estimateSheetCost, estimateTrimVideoCredits, evaluateCondition, evaluateConditionGroup, evaluateJsonExpression, evaluateJsonPath, expandExtraRefsToConnectedReferences, expandItemsWithRepeat, expandVideoOverlayLayer, expandVideoOverlayPresets, extractAllGeneratedResults, extractCharacterLoraFields, extractGeneratedJsonAsList, extractPresetData, extractReferencedLabels, extractVideoDurationFromNode, fanOutTextFeedsPrompt, featuredInstagramOutputs, featuredMetaAdOutputs, fieldKeyFromHandle, filterCloneNodes, findCharacterMentionTokens, findEntityMentionTokens, findImageMentionTokens, findLocationMentionTokens, findSeedance2AudioOverLimit, findWordlessTranscriptFeeds, firstSightExtraRole, fitAspectRatioToModel, flattenItems, formatVideoOverlayError, getAnimal, getAnimalLabel, getAnimalPromptHint, getAnimalTerm, getAspectRatioOptions, getAudioCrossfadeCurve, getCharacterFacet, getCombineTransition, getCreditRange, getDurationsForModel, getEffectiveRepeatCount, getFeaturedEntities, getFurniture, getFurnitureLabel, getInputFieldSchema, getInputNodes, getItemSortId, getLipSyncMaxAudioSeconds, getLlmModalityCaps, getLlmModel, getLlmTier, getLocaleDirection, getMaxImagePromptChars, getMaxNegativePromptChars, getMaxSunoPromptChars, getMaxSunoStyleChars, getMaxTtsChars, getMaxVideoPromptChars, getModel, getNodeLabel, getNodeResult, getOutputNodes, getOutputType, getParameterValue, getQualityOptions, getResolutionOptions, getRouteReachableNodeIds, getSpeakerLayout, getSpeakerSwitch, getStrategy, getTargetField, getTtsCapabilities, getValidValues, getVehicle, getVehicleLabel, getVideoAudioCapability, getWeapon, getWeaponLabel, groupByFamily, groupByKindAndFamily, groupHandleId, groupLlmModelsByVendor, hasContiguousSegmentDurations, hasDrawableVideoOverlayBox, hasFeature, hasUrlParserHazard, hexToRgbaArray, hostnameMatchesAllowlist, humanizeSlotSid, imageMentionSlug, imageMentionSlugForRef, imageOverlayBillableVariants, imageOverlayCredits, imageReferenceLimit, inferMusicVideo, instagramAnalysisCreditId, instagramAnalysisTierFrom, instagramPostLink, instagramRequestedCount, instagramScrapeCreditIdFromNode, instagramScrapeMode, instagramScrapeSources, instagramScrapeTier, isAggregateableType, isAutoVideoDuration, isCharacterAspectRatio, isCollectInEdge, isCompetitorAboutPlatform, isCronExpression, isDefaultSelectorConfig, isEdlTargetAspect, isExpandedClone, isFacebookPageUrl, isFanInEdge, isFanInNodeType, isFanOutUrlItem, isFlux2Model, isGeminiOmniProvider, isGvpSupportedProvider, isHandleInputWired, isInstagramScrapeCount, isInstagramScrapeMode, isKineticCaptionStyle, isKnownScene3DEngine, isKnownSpeakerEmphasisStyle, isLegacySunoModel, isLocationUsageMode, isMeasurableCard, isMetaAdsFormat, isMetaAdsPlatform, isMetaAdsScrapeCount, isMetaAdsScrapeMode, isMetaCdnImageUrl, isMinimaxH3Provider, isObjectAspectRatio, isOversizedScene, isPaygRetentionActive, isPerSecondLipSyncProvider, isPro3DRenderJobOutput, isPro3DRenderQuote, isPro3DRenderRenderOnly, isProjectedTriggerNodeType, isRtlText, isScene3DAuthoringEngine, isScene3DCameraTrack, isScene3DHttpUrl, isScene3DPlan, isScene3DPlanV1, isScene3DPlanV2, isScene3DReviewUnavailableReason, isScene3DSchemaVersionSupported, isScraperActor, isSeedance2Provider, isSeedanceVideoEditProvider, isSettingsHintEdge, isSettingsHintSource, isSettingsSourceType, isSocialPost, isSocialSearchPickFrozen, isSocialVideoUrl, isTelegramAccountTriggerNamedHandle, isTemplateCategory, isTiltDirection, isUsageMode, isValidTimezone, isVeoProvider, isVideoAnalysisMixedTier, isVideoAnalysisTier, isVideoOverlayCorner, isVideoOverlayOutputAspect, isVideoOverlayPresetId, isWan3Provider, jsonResultToList, knownEntitySlugsFromRefs, knownImageSlugsFromRefs, legacyScheduleToRules, listBoardTemplates, listModels, listResultsServeHandle, listSlotSids, liveRowColumn, llmRouteDefaults, localMinuteKey, localTimeIn, locationMentionSlug, locationReferencePhotoKindLabel, locationUsageModeLabel, ltxExtendDurationSec, ltxRetakeDurationSec, mapAspectRatio, mapQuality, mapShotIntentToProviderDirectives, matchVariant, matchesCron, matchesCronField, maxSegmentSecFor, maxSegmentsFor, maxVideoDurationSec, measuredCanvasCombinations, mergeClipLook, mergeEdlSourceOffsets, mergeExposedSettings, mergeNodeInputOverrides, metaAdsAdvertisersFrom, metaAdsAnalysisCreditId, metaAdsAnalysisTier, metaAdsAnalysisTierFrom, metaAdsNodeMode, metaAdsScrapeCreditIdFromNode, metaAdsScrapeSources, metaAdsScrapeTier, metaAdsScrapeWireSources, migrateEdgeOutputMode, migrateToItems, minSegmentSecFor, minimalRatioDimensions, modelIdsByKindMode, modelToNodeTarget, modelsForInputMode, modelsWithFeature, motionGraphicsFeature, newScene3DRevisionId, nextScheduleRuns, nodeFeedsAnything, nodeStateMayCarryOutput, normalizeCaptionNumericLevers, normalizeEdl, normalizeLottieLayers, normalizeMinimaxH3Resolution, normalizeModelInput, normalizeNodeModelParams, normalizePinterestUrl, normalizeRoleSlug, normalizeSavedPostTags, normalizeScheduleRule, normalizeScheduleRules, normalizeTemplateCategory, normalizeTranscript, normalizeVideoOverlayNodes, normalizeVideoRequestParams, normalizeWan3Resolution, orderedLlmModels, overlayFontById, overlayImageEffectsSchema, overlayPlatformById, overlayQrStyleSchema, overlayShapeElement, overlayShapeStyleSchema, overlayStrokeSchema, overlayTextStyleSchema, overlayVariantHandle, overlayVariantIdFromHandle, ownsItsList, parseAspectToken, parseAttributedDialogue, parseCharacterMentionToken, parseEntityMentionToken, parseGroupHandle, parseHandleId, parseImageMentionToken, parseListExpression, parseLocationMentionToken, parseNodePresetExport, parseNodeRef, parseScene3DCameraTrackJson, parseScene3DPlanV2Json, parseSpeakerEmphasisStyle, pickAiAvatarBucket, pickIds, pickLipSyncBucket, pickSocialPosts, pickSwitchXFrameTier, pickVideoAnalysisBucket, planFanOut, planSheetGeneration, planSheetPanels, preferredInputModeForModel, presentTypes, presetApplyClearKeys, presetDataMatches, presetEntries, presetLeverClearKeys, previewHorizonMs, pricedOutputDurationSec, pricedVideoSelection, pro3DRenderCoreOutputSchema, pro3DRenderFrameUnit, pro3DRenderJobOutputSchema, pro3DRenderProducedSchemaVersion, pro3DRenderQuoteSchema, pro3DRenderReviewVerdictSchema, pro3DRenderShotStillSchema, pro3DRenderShotStills, pro3DRenderTimingOverrides, qualityOptionsByKind, readPromptAffixes, readScriptSettings, reasoningOutputFloor, refHandleCategory, referenceModalityForHandle, referenceSheetCreditId, registerCatalogSidecars, registerSidecarLoaders, remapMsThroughEdl, remapTranscriptThroughEdl, renderAnalyzedScene, renderVideoCreditId, requiresSequenceExecution, resetCatalogSidecars, resolutionOptionsByKind, resolveAiAvatarCreditId, resolveAudioCrossfadeCurve, resolveCaptionLevers, resolveCaptionLook, resolveCharacterAspectRatio, resolveCinematicCreditId, resolveConditionValue, resolveDefaultRole, resolveDescription, resolveDialogueVoices, resolveEditPlanOutput, resolveEditPlanSources, resolveEdlSegmentSlots, resolveEffectiveSourceType, resolveEffectiveTier, resolveEntityAspect, resolveFieldMappings, resolveFrameDelivery, resolveFrameFitAspect, resolveGvpAnchorWire, resolveImageGenCreditIdentifier, resolveIndex, resolveInstagramScrapeCreditId, resolveLabel, resolveListExpression, resolveListFanOut, resolveLlmCreditId, resolveLocationFields, resolveLocationPresetCatalog, resolveLottieOverlaySrc, resolveMetaAdsScrapeCreditId, resolveMusicProvider, resolveNodeRefs, resolveNormalizedImageGen, resolveObjectAspectRatio, resolveOutputCanvas, resolvePipelineModel, resolveRelativeWindowToken, resolveScene3DAuthoringEngine, resolveScraperCreditId, resolveSelectorRefs, resolveSeparator, resolveSheetSections, resolveSlideshowTransition, resolveSourceThroughConnectedList, resolveStoredTier, resolveSwitchXCreditId, resolveTemplateCategory, resolveTopazUpscale, resolveVideoAnalysisModel, resolveVideoLinkOutput, resolveVideoModeForInputs, resolveVideoOverlayGeometry, resolveVideoProviderForMode, resolveWiredSettings, resolveXfadeName, rewriteSceneBindings, rewriteSlotTokens, rewriteSpeakerSlots, rgbaArrayToHex, roleToPhrase, rotationVec3Schema, ruleMatches, runSelector, safetyRetryPolicy, sanitizeRole, scaleVec3Schema, scene3DAcceptedSchemaVersionsSchema, scene3DAnchorNameSchema, scene3DAnchorSchema, scene3DAnyPlanSchema, scene3DAssetAnimationSchema, scene3DAssetIdSchema, scene3DAssetRefSchema, scene3DCameraChangesSchema, scene3DCameraKeyframeSchema, scene3DCameraSampleSchema, scene3DCameraSchema, scene3DCameraTrackIssues, scene3DCameraTrackObjectSchema, scene3DCameraTrackPlanIssues, scene3DCameraTrackSchema, scene3DClayLightingSchema, scene3DColorSchema, scene3DDeepEqual, scene3DEasingSchema, scene3DEditOperationSchema, scene3DEditOperationsSchema, scene3DEngineIdSchema, scene3DEntityAcceptsOverlay, scene3DEntityCapabilitySchema, scene3DEntityV2Schema, scene3DEntityVisualSchema, scene3DIdSchema, scene3DInputAssetSchema, scene3DInputAssetsForEngine, scene3DInputAssetsSchema, scene3DJsonByteLength, scene3DLightingChangesSchema, scene3DLightingSchema, scene3DMaterialBindingSchema, scene3DMaterialNameSchema, scene3DMaterialRoleSchema, scene3DNodeIdSchema, scene3DNodeNameSchema, scene3DObjectChangesSchema, scene3DObjectKeyframeSchema, scene3DObjectSchema, scene3DOverrideSchema, scene3DPlanIssues, scene3DPlanSchema, scene3DPlanSchemaVersion, scene3DPlanV1Issues, scene3DPlanV1ObjectSchema, scene3DPlanV1Schema, scene3DPlanV2Issues, scene3DPlanV2ObjectSchema, scene3DPlanV2Schema, scene3DPrimitiveSchema, scene3DProjectionIssues, scene3DProvenanceSchema, scene3DReferenceSchema, scene3DRenderTier, scene3DRenderTierCredits, scene3DReviewNote, scene3DReviewVerdictOf, scene3DSampleForFrame, scene3DSha256Schema, scene3DShotForFrame, scene3DShotIndexForFrame, scene3DShotSchema, scene3DUrlSchema, scene3DV2AdmissionIssues, scene3DV2EditOperationSchema, scene3DV2EditOperationsSchema, scene3DV2HierarchyDepth, scene3DV2NormalizationIssues, scene3DV2OverrideInputSchema, scene3DV2ResourceUsage, scene3DVersionTokenSchema, scene3DZodIssues, scheduleMatchesAt, scheduleOccurrences, searchModelVariants, seedance2AudioLimitSec, seedanceVideoEditCreditId, segmentDurationsFor, selectByModulo, selectByNamedKey, selectByPredicate, selectListItems, selectLoraRoutingForMentions, selectRandom, setRegisteredPersonPackFields, settingsInputAccepts, settingsInputFields, settingsProviderModels, settingsSourceForField, settingsSourceForType, settledWithLimit, signedLinkExpiresAt, sizeVec3Schema, slotVariationSchema, snapToModelDuration, socialPostDigestLine, socialPostsDigest, socialPostsFrom, socialPostsLongestVideoSec, socialSearchCount, socialSearchCountry, socialSearchCreditId, socialSearchCreditIdFromNode, socialSearchEffectiveCount, socialSearchMaxCount, socialSearchMode, socialSearchPages, socialSearchPickTop, socialSearchPlatform, socialSearchPostLink, socialSearchPostVideo, socialSearchRegion, socialSearchRequestFromNode, sortCharacterEntriesForDisplay, sortListItems, sourceRefKey, speakerLayoutAllows, speakerPresentationWarnings, speakerSwitchOverlaps, speakerTurns, speedRampCreditId, spliceDelimitedRows, splitByLoopDelimiter, splitGeneratedItems, splitInstagramTargets, splitMetaAdsAdvertiserNames, splitMetaAdsPageUrls, spreadJsonArrayIfSingleton, stringifyPathResults, stripDerivedAnalysisFields, stripExportContent, stripStudioDraftSettings, stripStudioDraftWorkflow, stripStudioTakeVoiceRecords, stripStudioTransientSettings, stripTransientRuntimeData, stripUnownedRefs, summarizeScene3DOperations, sunoCreditType, sunoModelHonoursDuration, supportedDefaultDimensions, supportsAdvancedMode, supportsAutoVideoDuration, supportsEndAnchor, supportsExtendRender, telegramAccountListeningSignature, telegramAccountTriggerOutputs, telegramSendAsOf, telegramSendDestinationOf, templateCategoryStoredValues, textToAudioBilledSeconds, textToAudioCreditId, timezoneOffsetMinutes, toConnectedReference, toConnectedReferences, toCustomVideoOverlayLayer, togglePick, transcribeLaneSupportsWordTimestamps, transcribeProvidersWithWordTimestamps, transcribeWordTimestampsRefusal, transcriptDurationSec, transcriptSpeakerLabels, tryParseJson, ttsHasLever, ttsLanguageCodes, ttsSupportsAudioTags, ttsSupportsSsmlBreaks, uiAspectRatioFill, uiDurationFill, uiResolutionFill, unresolvedRefTokens, unwrapEditPlanOutput, unwrapUnresolvedTokens, usageModeDirective, usageModeIncludesName, usageModeLabel, usdToCredits, validateAiAvatarPayload, validateCinematicAvatarPayload, validateDurationForFormat, validateEditedEdl, validateEdl, validateEdlClipSet, validateModeActivation, validateModelInput, validateNoNestedGroups, validateObjects, validateProviderForNodeType, validateSubWorkflowRoutes, validateVideoOverlayRequest, variantJobId, vec3Schema, verifyScene3DPlanV2ContentHash, videoAnalysisCreditSegment, videoAnalysisNumWindows, videoAnalysisResultSchema, videoAuditCreditsForBucket, videoLinkDownloadedFile, videoLinkNeedsDownload, videoLinkPageUrl, videoModelCanSpeakDialogue, videoModelSupportsAudio, videoNegativeSuffix, videoOverlayCanvas, videoOverlayCompositionKey, videoOverlayLayerLabel, videoOverlayPresetBox, videoOverlayRenderOrder, videoOverlaySlotOfHandle, videoOverlaySlotSources, videoProviderFoldsLoneEndFrame, videoProviderRequiresImage, videoSfxCreditId, windowAnalysisSchema, withWiredSettings, zipMergeLists };
|
|
22796
|
+
// src/render-output.ts
|
|
22797
|
+
var MEDIUM_FIELD = {
|
|
22798
|
+
video: "generatedVideoUrl",
|
|
22799
|
+
audio: "generatedAudioUrl"
|
|
22800
|
+
};
|
|
22801
|
+
var str5 = (v) => typeof v === "string" && v.length > 0 ? v : void 0;
|
|
22802
|
+
var BASIS = /^[0-9a-f]{16}$/;
|
|
22803
|
+
var basisOf = (v) => typeof v === "string" && BASIS.test(v) ? v : void 0;
|
|
22804
|
+
function renderResultStamp(output) {
|
|
22805
|
+
const o = output && typeof output === "object" ? output : {};
|
|
22806
|
+
const quality = o.quality === "proxy" || o.quality === "final" ? o.quality : void 0;
|
|
22807
|
+
const clipKey = str5(o.clipKey);
|
|
22808
|
+
const planBasis = basisOf(o.planBasis);
|
|
22809
|
+
const renderBasis = basisOf(o.renderBasis);
|
|
22810
|
+
return {
|
|
22811
|
+
...quality ? { quality } : {},
|
|
22812
|
+
...clipKey ? { clipKey } : {},
|
|
22813
|
+
...planBasis ? { planBasis } : {},
|
|
22814
|
+
...renderBasis ? { renderBasis } : {}
|
|
22815
|
+
};
|
|
22816
|
+
}
|
|
22817
|
+
function mediumOf(data) {
|
|
22818
|
+
return data.output === "audio" ? "audio" : "video";
|
|
22819
|
+
}
|
|
22820
|
+
function resultsOf(data) {
|
|
22821
|
+
return Array.isArray(data.generatedResults) ? data.generatedResults : [];
|
|
22822
|
+
}
|
|
22823
|
+
function itemOf(url, medium, entry) {
|
|
22824
|
+
const jobId = str5(entry?.jobId);
|
|
22825
|
+
const thumbnailUrl = str5(entry?.thumbnailUrl);
|
|
22826
|
+
return {
|
|
22827
|
+
url,
|
|
22828
|
+
medium,
|
|
22829
|
+
...jobId ? { jobId } : {},
|
|
22830
|
+
...thumbnailUrl ? { thumbnailUrl } : {},
|
|
22831
|
+
...entry ? renderResultStamp(entry) : {}
|
|
22832
|
+
};
|
|
22833
|
+
}
|
|
22834
|
+
function savedRenderOutput(data) {
|
|
22835
|
+
const medium = mediumOf(data);
|
|
22836
|
+
const results = resultsOf(data);
|
|
22837
|
+
const index = typeof data.activeResultIndex === "number" ? data.activeResultIndex : 0;
|
|
22838
|
+
const selected = results[index] ?? results[0];
|
|
22839
|
+
const selectedUrl = str5(selected?.url);
|
|
22840
|
+
if (selectedUrl) return itemOf(selectedUrl, medium, selected);
|
|
22841
|
+
const own = str5(data[MEDIUM_FIELD[medium]]);
|
|
22842
|
+
if (own) return { url: own, medium };
|
|
22843
|
+
const other = medium === "video" ? "audio" : "video";
|
|
22844
|
+
const otherUrl = str5(data[MEDIUM_FIELD[other]]);
|
|
22845
|
+
return otherUrl ? { url: otherUrl, medium: other } : void 0;
|
|
22846
|
+
}
|
|
22847
|
+
function savedRenderBatch(data) {
|
|
22848
|
+
const batch = data.__listResults;
|
|
22849
|
+
if (!Array.isArray(batch) || batch.length === 0) return void 0;
|
|
22850
|
+
const medium = mediumOf(data);
|
|
22851
|
+
const byUrl = /* @__PURE__ */ new Map();
|
|
22852
|
+
for (const entry of resultsOf(data)) {
|
|
22853
|
+
const url = str5(entry.url);
|
|
22854
|
+
if (url && !byUrl.has(url)) byUrl.set(url, entry);
|
|
22855
|
+
}
|
|
22856
|
+
return batch.map((row) => {
|
|
22857
|
+
const url = str5(row);
|
|
22858
|
+
return url ? itemOf(url, medium, byUrl.get(url)) : null;
|
|
22859
|
+
});
|
|
22860
|
+
}
|
|
22861
|
+
function savedRenderBatchUrls(data) {
|
|
22862
|
+
const batch = savedRenderBatch(data);
|
|
22863
|
+
return batch ? batch.map((item) => item?.url ?? "") : void 0;
|
|
22864
|
+
}
|
|
22865
|
+
function edlSpanKey(edl) {
|
|
22866
|
+
if (!edl || typeof edl !== "object" || Array.isArray(edl)) return void 0;
|
|
22867
|
+
let segments;
|
|
22868
|
+
try {
|
|
22869
|
+
segments = normalizeEdl(edl).segments;
|
|
22870
|
+
} catch {
|
|
22871
|
+
return void 0;
|
|
22872
|
+
}
|
|
22873
|
+
if (segments.length === 0) return void 0;
|
|
22874
|
+
let min = Infinity;
|
|
22875
|
+
let max = -Infinity;
|
|
22876
|
+
for (const s of segments) {
|
|
22877
|
+
if (s.inMs < min) min = s.inMs;
|
|
22878
|
+
if (s.outMs > max) max = s.outMs;
|
|
22879
|
+
}
|
|
22880
|
+
return Number.isFinite(min) && Number.isFinite(max) ? `${min}-${max}` : void 0;
|
|
22881
|
+
}
|
|
22882
|
+
function planClipKeyAt(plan, row) {
|
|
22883
|
+
if (!Array.isArray(plan)) return void 0;
|
|
22884
|
+
let clip = plan[row];
|
|
22885
|
+
if (typeof clip === "string") {
|
|
22886
|
+
if (!clip.trim()) return void 0;
|
|
22887
|
+
try {
|
|
22888
|
+
clip = JSON.parse(clip);
|
|
22889
|
+
} catch {
|
|
22890
|
+
return void 0;
|
|
22891
|
+
}
|
|
22892
|
+
}
|
|
22893
|
+
return edlSpanKey(clip);
|
|
22894
|
+
}
|
|
22895
|
+
var TELEPORT_TYPES2 = /* @__PURE__ */ new Set(["teleport-send", "teleport-receive"]);
|
|
22896
|
+
var EDL_PASS_THROUGH_TYPES = /* @__PURE__ */ new Set(["camera-switch"]);
|
|
22897
|
+
function outputModeOf2(data) {
|
|
22898
|
+
const mode = data && typeof data === "object" ? data.outputMode : void 0;
|
|
22899
|
+
return typeof mode === "string" ? mode : void 0;
|
|
22900
|
+
}
|
|
22901
|
+
function renderPlanPath(renderId, nodes, edges) {
|
|
22902
|
+
const byId = new Map(nodes.map((n) => [n.id, n]));
|
|
22903
|
+
const lastEdlInto = (id) => edges.filter((e) => e.target === id && e.targetHandle === "edl").at(-1);
|
|
22904
|
+
const teleportInput = (id) => edges.find((e) => e.target === id);
|
|
22905
|
+
const visited = /* @__PURE__ */ new Set();
|
|
22906
|
+
const hops = [];
|
|
22907
|
+
let consumer = lastEdlInto(renderId);
|
|
22908
|
+
let edge = consumer;
|
|
22909
|
+
while (edge && consumer) {
|
|
22910
|
+
const node = byId.get(edge.source);
|
|
22911
|
+
if (!node || visited.has(node.id)) return void 0;
|
|
22912
|
+
visited.add(node.id);
|
|
22913
|
+
if (TELEPORT_TYPES2.has(node.type ?? "")) {
|
|
22914
|
+
edge = teleportInput(node.id);
|
|
22915
|
+
continue;
|
|
22916
|
+
}
|
|
22917
|
+
const mode = outputModeOf2(consumer.data) ?? defaultEdgeOutputMode(node.type, edge.sourceHandle);
|
|
22918
|
+
hops.unshift({ edge: consumer, each: mode === "each", ...node.type ? { source: node.type } : {} });
|
|
22919
|
+
if (node.type === "edit-plan") return { planId: node.id, hops };
|
|
22920
|
+
if (!EDL_PASS_THROUGH_TYPES.has(node.type ?? "")) return void 0;
|
|
22921
|
+
consumer = lastEdlInto(node.id);
|
|
22922
|
+
edge = consumer;
|
|
22923
|
+
}
|
|
22924
|
+
return void 0;
|
|
22925
|
+
}
|
|
22926
|
+
function passThroughRan(path, ranIds) {
|
|
22927
|
+
return path.hops.slice(0, -1).every((hop) => ranIds.has(hop.edge.target));
|
|
22928
|
+
}
|
|
22929
|
+
function renderPlanNodeId(renderId, nodes, edges) {
|
|
22930
|
+
return renderPlanPath(renderId, nodes, edges)?.planId;
|
|
22931
|
+
}
|
|
22932
|
+
var isHole = (clip) => clip == null || typeof clip === "string" && !clip.trim();
|
|
22933
|
+
var keptClips = (clips) => clips.filter((clip) => !isHole(clip));
|
|
22934
|
+
function singlePick(clips, hop) {
|
|
22935
|
+
const data = hop.edge.data;
|
|
22936
|
+
const mode = outputModeOf2(hop.edge.data);
|
|
22937
|
+
if (mode === "item") {
|
|
22938
|
+
const expr = typeof data?.itemIndex === "string" ? data.itemIndex : "1";
|
|
22939
|
+
return [clips[resolveIndex(expr, clips.length)] ?? clips[0]];
|
|
22940
|
+
}
|
|
22941
|
+
if (mode?.startsWith("item:")) return [clips[parseInt(mode.slice(5), 10)] ?? clips[0]];
|
|
22942
|
+
if (mode === "all") return selectListItems(clips, data);
|
|
22943
|
+
if (hop.source === "edit-plan") return keptClips(clips).slice(0, 1);
|
|
22944
|
+
return clips.length === 1 ? clips : [];
|
|
22945
|
+
}
|
|
22946
|
+
function renderPlanValue(plan, row, hops = []) {
|
|
22947
|
+
if (!Array.isArray(plan)) return plan === null || typeof plan !== "object" ? void 0 : plan;
|
|
22948
|
+
let clips = plan;
|
|
22949
|
+
for (const [i, hop] of hops.entries()) {
|
|
22950
|
+
if (clips.length === 0) return void 0;
|
|
22951
|
+
if (hop.each) {
|
|
22952
|
+
clips = selectListItems(clips, hop.edge.data);
|
|
22953
|
+
if (i < hops.length - 1) clips = keptClips(clips);
|
|
22954
|
+
} else {
|
|
22955
|
+
clips = singlePick(clips, hop);
|
|
22956
|
+
if (clips.length !== 1) return void 0;
|
|
22957
|
+
}
|
|
22958
|
+
}
|
|
22959
|
+
if (clips.length === 0) return void 0;
|
|
22960
|
+
const rowed = row !== void 0 && (hops.at(-1)?.each ?? true);
|
|
22961
|
+
if (rowed) {
|
|
22962
|
+
const clip = clips[row % clips.length];
|
|
22963
|
+
return isHole(clip) ? void 0 : clip;
|
|
22964
|
+
}
|
|
22965
|
+
const kept = keptClips(clips);
|
|
22966
|
+
return kept.length === 1 ? kept[0] : void 0;
|
|
22967
|
+
}
|
|
22968
|
+
function renderClipKey(plan, row, hops = []) {
|
|
22969
|
+
if (!Array.isArray(plan)) return void 0;
|
|
22970
|
+
const clip = renderPlanValue(plan, row, hops);
|
|
22971
|
+
return clip === void 0 ? void 0 : planClipKeyAt([clip], 0);
|
|
22972
|
+
}
|
|
22973
|
+
function renderPlanClipKey(renderId, nodes, edges, planClips, row) {
|
|
22974
|
+
const path = renderPlanPath(renderId, nodes, edges);
|
|
22975
|
+
const planNode = path ? nodes.find((n) => n.id === path.planId) : void 0;
|
|
22976
|
+
if (!path || !planNode) return void 0;
|
|
22977
|
+
return renderClipKey(planClips(planNode), row, path.hops);
|
|
22978
|
+
}
|
|
22979
|
+
function renderPlanRowClipKeys(renderId, nodes, edges, planClips, rows, ranIds) {
|
|
22980
|
+
const path = renderPlanPath(renderId, nodes, edges);
|
|
22981
|
+
const planNode = path ? nodes.find((n) => n.id === path.planId) : void 0;
|
|
22982
|
+
if (!path || !planNode || !passThroughRan(path, ranIds)) return rows.map(() => void 0);
|
|
22983
|
+
const plan = planClips(planNode);
|
|
22984
|
+
return rows.map((row) => renderClipKey(plan, row, path.hops));
|
|
22985
|
+
}
|
|
22986
|
+
function renderRunQuality(data) {
|
|
22987
|
+
return data?.quality === "proxy" ? "proxy" : "final";
|
|
22988
|
+
}
|
|
22989
|
+
function renderSentRowStamps(quality, clipKeys) {
|
|
22990
|
+
return clipKeys.map((clipKey) => ({ quality, ...clipKey ? { clipKey } : {} }));
|
|
22991
|
+
}
|
|
22992
|
+
var readBasisByValue = /* @__PURE__ */ new WeakMap();
|
|
22993
|
+
var isPlainObject2 = (v) => !!v && typeof v === "object" && !Array.isArray(v);
|
|
22994
|
+
function renderReadBasis(value) {
|
|
22995
|
+
let v = value;
|
|
22996
|
+
if (typeof v === "string") {
|
|
22997
|
+
if (!v.trim()) return void 0;
|
|
22998
|
+
try {
|
|
22999
|
+
v = JSON.parse(v);
|
|
23000
|
+
} catch {
|
|
23001
|
+
return void 0;
|
|
23002
|
+
}
|
|
23003
|
+
}
|
|
23004
|
+
if (!isPlainObject2(v)) return void 0;
|
|
23005
|
+
const cached = readBasisByValue.get(v);
|
|
23006
|
+
if (cached !== void 0) return cached;
|
|
23007
|
+
const { meta: _meta, ...rest } = v;
|
|
23008
|
+
const basis = editPlanBasis(rest);
|
|
23009
|
+
readBasisByValue.set(v, basis);
|
|
23010
|
+
return basis;
|
|
23011
|
+
}
|
|
23012
|
+
function renderSettingsBasis(settings, sources = []) {
|
|
23013
|
+
const raw = settings.crossfadeMs;
|
|
23014
|
+
const crossfadeMs = typeof raw === "number" && Number.isFinite(raw) ? Math.max(0, Math.round(raw)) : 0;
|
|
23015
|
+
return editPlanBasis({
|
|
23016
|
+
crossfadeMs,
|
|
23017
|
+
output: settings.output === "audio" ? "audio" : "video",
|
|
23018
|
+
sources: sources.map((url) => typeof url === "string" ? url : "")
|
|
23019
|
+
});
|
|
23020
|
+
}
|
|
23021
|
+
function renderPlanBasis(renderId, nodes, edges, planOutput, row, ranIds) {
|
|
23022
|
+
const path = renderPlanPath(renderId, nodes, edges);
|
|
23023
|
+
const planNode = path ? nodes.find((n) => n.id === path.planId) : void 0;
|
|
23024
|
+
if (!path || !planNode) return void 0;
|
|
23025
|
+
if (!passThroughRan(path, ranIds)) return void 0;
|
|
23026
|
+
return renderReadBasis(renderPlanValue(planOutput(planNode), row, path.hops));
|
|
23027
|
+
}
|
|
23028
|
+
|
|
23029
|
+
// src/handle-aliases.ts
|
|
23030
|
+
var LEGACY_SOURCE_HANDLE_ALIASES = {
|
|
23031
|
+
// Batch 1
|
|
23032
|
+
"generate-music": { "audio-out": "audio" },
|
|
23033
|
+
// Batch 2 — Suno output id normalization
|
|
23034
|
+
"suno-add-instrumental": { "audio-out": "audio" },
|
|
23035
|
+
"suno-add-vocals": { "audio-out": "audio" },
|
|
23036
|
+
"suno-convert-wav": { "audio-out": "audio" },
|
|
23037
|
+
"suno-mashup": { "audio-out": "audio" },
|
|
23038
|
+
"suno-replace-section": { "audio-out": "audio" },
|
|
23039
|
+
"suno-upload-extend": { "audio-out": "audio" },
|
|
23040
|
+
"suno-music-video": { "video-out": "video" },
|
|
23041
|
+
"suno-style-boost": { "text-out": "text" },
|
|
23042
|
+
"suno-separate": { "vocal-out": "vocals", "instrumental-out": "instrumental" },
|
|
23043
|
+
// Batch 4 — Processing output id normalization (non-ffmpeg ones only)
|
|
23044
|
+
"split-text": { out: "text" },
|
|
23045
|
+
// split-media produces dual-typed outputs; map each leg of the legacy
|
|
23046
|
+
// `*-out` pair to the new single-word form.
|
|
23047
|
+
"split-media": { "audio-out": "audio", "video-out": "video" },
|
|
23048
|
+
// Phase 20 — Image-producer output id normalization. Pre-migration these
|
|
23049
|
+
// nodes shipped a single generic `out` source handle; after the typed-handle
|
|
23050
|
+
// migration their source pip is the canonical type name.
|
|
23051
|
+
"edit-image": { out: "image" },
|
|
23052
|
+
"modify-image": { out: "image" },
|
|
23053
|
+
"image-to-image": { out: "image" },
|
|
23054
|
+
"upscale-image": { out: "image" },
|
|
23055
|
+
"remove-background": { out: "image" },
|
|
23056
|
+
"face-swap": { out: "video" },
|
|
23057
|
+
// Phase 21 — Video-producer output id normalization.
|
|
23058
|
+
"motion-transfer": { out: "video" },
|
|
23059
|
+
// Phase 22 — Upload/source-node output id normalization.
|
|
23060
|
+
"reference-audio": { "audio-out": "audio" },
|
|
23061
|
+
// Phase 24c — Compositing-stragglers output id normalization.
|
|
23062
|
+
"speed-ramp": { "video-out": "video" },
|
|
23063
|
+
"fade-video": { "video-out": "video" },
|
|
23064
|
+
"transcode-video": { "video-out": "video" },
|
|
23065
|
+
"manual-edit": { "video-out": "video" },
|
|
23066
|
+
"social-media-format": { "media-out": "media", "text-out": "text" },
|
|
23067
|
+
// Telegram Channel Feed: the pip was `out` until it took the platform's
|
|
23068
|
+
// text id (`text`), which its definition and docs always named.
|
|
23069
|
+
"telegram-channel-feed": { out: "text" },
|
|
23070
|
+
// Telegram Trigger: the docs once named six outputs; the component renders
|
|
23071
|
+
// one, `out`, and media rides it by kind on both engines.
|
|
23072
|
+
"telegram-trigger": { text: "out", imageUrl: "out", videoUrl: "out", audioUrl: "out" },
|
|
23073
|
+
// #1877 — the definitions now declare the pips these components render. The
|
|
23074
|
+
// id they used to declare (what MCP clients and the docs were told) moves
|
|
23075
|
+
// onto the pip that draws, so an edge written with it still connects.
|
|
23076
|
+
"add-captions": { video: "video-out" },
|
|
23077
|
+
"adjust-volume": { audio: "audio-out" },
|
|
23078
|
+
"audio-fx": { audio: "audio-out" },
|
|
23079
|
+
"combine-audio": { audio: "audio-out" },
|
|
23080
|
+
"loop-video": { video: "video-out" },
|
|
23081
|
+
"merge-video-audio": { video: "video-out" },
|
|
23082
|
+
"mix-audio": { audio: "audio-out" },
|
|
23083
|
+
"resize-video": { video: "video-out" },
|
|
23084
|
+
"trim-video": { video: "video-out" },
|
|
23085
|
+
"save-to-storage": { asset: "out" }
|
|
23086
|
+
// (audio-separation's old `audio` is NOT aliased: it could mean any of the
|
|
23087
|
+
// seven stems, and a stem is never guessed.)
|
|
23088
|
+
};
|
|
23089
|
+
var LEGACY_TARGET_HANDLE_ALIASES = {
|
|
23090
|
+
// Batch 1
|
|
23091
|
+
"text-to-speech": { in: "prompt" },
|
|
23092
|
+
"text-to-audio": { in: "prompt" },
|
|
23093
|
+
"generate-music": { in: "prompt" },
|
|
23094
|
+
"audio-isolation": { in: "audio" },
|
|
23095
|
+
"text-to-dialogue": { in: "prompt" },
|
|
23096
|
+
"voice-changer": { in: "audio" },
|
|
23097
|
+
dubbing: { in: "audio" },
|
|
23098
|
+
// voice-remix / voice-design keep the legacy `audio-style` target id intact
|
|
23099
|
+
// — that name is hard-coded in the runtime hint composers. Only `in` moves.
|
|
23100
|
+
"voice-remix": { in: "audio" },
|
|
23101
|
+
"voice-design": { in: "prompt" },
|
|
23102
|
+
"forced-alignment": { in: "audio" },
|
|
23103
|
+
// Batch 2 — Suno target id normalization
|
|
23104
|
+
"suno-generate": { in: "prompt" },
|
|
23105
|
+
"suno-lyrics": { in: "prompt" },
|
|
23106
|
+
"suno-style-boost": { text: "prompt" },
|
|
23107
|
+
// Batch 3 — Script & Text target id normalization
|
|
23108
|
+
"generate-script": { in: "prompt" },
|
|
23109
|
+
transcribe: { in: "audio" },
|
|
23110
|
+
// Batch 4 — Processing target id normalization (non-ffmpeg only)
|
|
23111
|
+
"combine-text": { in: "text" },
|
|
23112
|
+
"split-text": { in: "text" },
|
|
23113
|
+
"split-media": { "video-in": "video", "audio-in": "audio" },
|
|
23114
|
+
// Phase 20 — Image-producer target id normalization.
|
|
23115
|
+
"face-swap": { in: "video" },
|
|
23116
|
+
// Phase 21 — Video-producer target id normalization.
|
|
23117
|
+
"video-to-video": { in: "video" },
|
|
23118
|
+
"video-upscale": { in: "video" },
|
|
23119
|
+
"extend-video": { in: "video" },
|
|
23120
|
+
"motion-transfer": { in: "video" },
|
|
23121
|
+
"lip-sync": { videoIn: "video" },
|
|
23122
|
+
// Phase 24c — Compositing-stragglers target id normalization.
|
|
23123
|
+
"after-effects": { in: "video" },
|
|
23124
|
+
"motion-graphics": { in: "video" },
|
|
23125
|
+
"lottie-overlay": { in: "video" },
|
|
23126
|
+
// video-composer renders ONE target pip, `in` ("Media"). An earlier table
|
|
23127
|
+
// sent saved edges to a `video` pip the node never had; this heals those.
|
|
23128
|
+
"video-composer": { video: "in" },
|
|
23129
|
+
"render-video": { in: "composition" },
|
|
23130
|
+
"speed-ramp": { in: "video" },
|
|
23131
|
+
"fade-video": { in: "video" },
|
|
23132
|
+
"transcode-video": { in: "video" },
|
|
23133
|
+
// (manual-edit keeps `in` as a multi-asset target.)
|
|
23134
|
+
"social-media-format": { "media-in": "media", "text-in": "text" }
|
|
23135
|
+
};
|
|
23136
|
+
var DYNAMIC_HANDLE_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
23137
|
+
"list",
|
|
23138
|
+
"loop",
|
|
23139
|
+
"group",
|
|
23140
|
+
"collect",
|
|
23141
|
+
"router",
|
|
23142
|
+
"component",
|
|
23143
|
+
"sub-workflow",
|
|
23144
|
+
"sub-workflow-input",
|
|
23145
|
+
"sub-workflow-output",
|
|
23146
|
+
"selector",
|
|
23147
|
+
// Payload parameters become handles.
|
|
23148
|
+
"webhook-trigger",
|
|
23149
|
+
// One `variant:<id>` handle per layer.
|
|
23150
|
+
"image-overlay"
|
|
23151
|
+
]);
|
|
23152
|
+
function canonicalSourceHandle(nodeType, handle) {
|
|
23153
|
+
return nodeType && LEGACY_SOURCE_HANDLE_ALIASES[nodeType]?.[handle] || handle;
|
|
23154
|
+
}
|
|
23155
|
+
function canonicalTargetHandle(nodeType, handle) {
|
|
23156
|
+
return nodeType && LEGACY_TARGET_HANDLE_ALIASES[nodeType]?.[handle] || handle;
|
|
23157
|
+
}
|
|
23158
|
+
var SUNO_IN_CLASSIFIER_TARGETS = /* @__PURE__ */ new Set([
|
|
23159
|
+
"suno-cover",
|
|
23160
|
+
"suno-extend",
|
|
23161
|
+
"suno-replace-section",
|
|
23162
|
+
"suno-upload-extend"
|
|
23163
|
+
]);
|
|
23164
|
+
var SUNO_VOICE_CAPABLE_TARGETS = /* @__PURE__ */ new Set(["suno-generate", "suno-cover", "suno-extend"]);
|
|
23165
|
+
var IMAGE_SOURCE_TYPES_FOR_CLASSIFIER = /* @__PURE__ */ new Set([
|
|
23166
|
+
"generate-image",
|
|
23167
|
+
"upload-image",
|
|
23168
|
+
"edit-image",
|
|
23169
|
+
"image-to-image",
|
|
23170
|
+
"modify-image",
|
|
23171
|
+
"upscale-image",
|
|
23172
|
+
"remove-background",
|
|
23173
|
+
"generate-mask",
|
|
23174
|
+
"scene"
|
|
23175
|
+
]);
|
|
23176
|
+
var IDENTITY_TYPES_FOR_CLASSIFIER = /* @__PURE__ */ new Set([
|
|
23177
|
+
"character",
|
|
23178
|
+
"face",
|
|
23179
|
+
"object",
|
|
23180
|
+
"creature",
|
|
23181
|
+
"location"
|
|
23182
|
+
]);
|
|
23183
|
+
var VIDEO_SOURCE_TYPES_FOR_CLASSIFIER = VIDEO_PRODUCER_TYPES;
|
|
23184
|
+
var AUDIO_SOURCE_TYPES_FOR_CLASSIFIER = /* @__PURE__ */ new Set([...AUDIO_PRODUCER_TYPES, "youtube-video"]);
|
|
23185
|
+
var DUAL_MODE_REVOICE_TARGETS = /* @__PURE__ */ new Set(["voice-changer", "voice-changer-pro", "dubbing"]);
|
|
23186
|
+
function classifyLegacyTargetHandle(targetType, handle, sourceType, sentHandle = handle) {
|
|
23187
|
+
if (!targetType) return handle;
|
|
23188
|
+
const source = sourceType ?? "";
|
|
23189
|
+
if (source === "suno-voice" && SUNO_VOICE_CAPABLE_TARGETS.has(targetType) && (handle === "in" || handle === "prompt" || handle == null)) {
|
|
23190
|
+
return "voice";
|
|
23191
|
+
}
|
|
23192
|
+
if (SUNO_IN_CLASSIFIER_TARGETS.has(targetType) && (handle === "in" || handle == null)) {
|
|
23193
|
+
return AUDIO_SOURCE_TYPES_FOR_CLASSIFIER.has(source) ? "audio" : "prompt";
|
|
23194
|
+
}
|
|
23195
|
+
if (targetType === "motion-transfer" && handle === "video") {
|
|
23196
|
+
if (IDENTITY_TYPES_FOR_CLASSIFIER.has(source)) return "assets";
|
|
23197
|
+
if (IMAGE_SOURCE_TYPES_FOR_CLASSIFIER.has(source)) return "image";
|
|
23198
|
+
if (!VIDEO_SOURCE_TYPES_FOR_CLASSIFIER.has(source)) return "prompt";
|
|
23199
|
+
return handle;
|
|
23200
|
+
}
|
|
23201
|
+
if ((targetType === "video-to-video" || targetType === "extend-video") && handle === "video" && !VIDEO_SOURCE_TYPES_FOR_CLASSIFIER.has(source)) {
|
|
23202
|
+
return "prompt";
|
|
23203
|
+
}
|
|
23204
|
+
if (DUAL_MODE_REVOICE_TARGETS.has(targetType) && (sentHandle === "in" || sentHandle == null)) {
|
|
23205
|
+
return VIDEO_SOURCE_TYPES_FOR_CLASSIFIER.has(source) ? "video" : "audio";
|
|
23206
|
+
}
|
|
23207
|
+
return handle;
|
|
23208
|
+
}
|
|
23209
|
+
var RENDERED_OUTPUT_HANDLES = {};
|
|
23210
|
+
function renderedSourceHandle(nodeType, handle, declaredOutputs) {
|
|
23211
|
+
if (!nodeType || !handle) return null;
|
|
23212
|
+
const rendered = RENDERED_OUTPUT_HANDLES[nodeType];
|
|
23213
|
+
if (!rendered || rendered.includes(handle) || !declaredOutputs?.includes(handle)) return null;
|
|
23214
|
+
if (rendered.includes(`${handle}-out`)) return `${handle}-out`;
|
|
23215
|
+
return rendered.length === 1 ? rendered[0] : null;
|
|
23216
|
+
}
|
|
23217
|
+
|
|
23218
|
+
// src/telegram-channel.ts
|
|
23219
|
+
var TELEGRAM_FEED_LIMIT_MAX = 30;
|
|
23220
|
+
var TELEGRAM_FEED_PEEK_MAX = 20;
|
|
23221
|
+
var TELEGRAM_FEED_PAGE_SIZE = 20;
|
|
23222
|
+
var TELEGRAM_FEED_DEFAULT_LIMIT = 5;
|
|
23223
|
+
var TELEGRAM_FEED_DIGEST_SEPARATOR = "\n\n---\n\n";
|
|
23224
|
+
function telegramFeedDigest(posts) {
|
|
23225
|
+
return posts.map((p) => p.text).filter((t2) => typeof t2 === "string" && t2.trim().length > 0).join(TELEGRAM_FEED_DIGEST_SEPARATOR);
|
|
23226
|
+
}
|
|
23227
|
+
var isRecord5 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
23228
|
+
var str6 = (v) => typeof v === "string" ? v : void 0;
|
|
23229
|
+
function telegramPostsFrom(value) {
|
|
23230
|
+
if (!Array.isArray(value)) return [];
|
|
23231
|
+
const out = [];
|
|
23232
|
+
for (const item of value) {
|
|
23233
|
+
if (!isRecord5(item) || typeof item.id !== "number" || !Number.isFinite(item.id) || typeof item.text !== "string") continue;
|
|
23234
|
+
const media = Array.isArray(item.media) ? item.media.filter((m) => isRecord5(m) && (m.type === "photo" || m.type === "video")) : [];
|
|
23235
|
+
const forwarded = isRecord5(item.forwardedFrom) && typeof item.forwardedFrom.name === "string" ? { name: item.forwardedFrom.name, ...str6(item.forwardedFrom.url) ? { url: item.forwardedFrom.url } : {} } : void 0;
|
|
23236
|
+
const channel2 = str6(item.channel) ?? "";
|
|
23237
|
+
out.push({
|
|
23238
|
+
id: item.id,
|
|
23239
|
+
channel: channel2,
|
|
23240
|
+
postUrl: str6(item.postUrl) ?? str6(item.url) ?? (channel2 ? `https://t.me/${channel2}/${item.id}` : ""),
|
|
23241
|
+
text: item.text,
|
|
23242
|
+
...str6(item.date) ? { date: item.date } : {},
|
|
23243
|
+
...forwarded ? { forwardedFrom: forwarded } : {},
|
|
23244
|
+
media,
|
|
23245
|
+
...str6(item.imageUrl) ? { imageUrl: item.imageUrl } : {},
|
|
23246
|
+
...str6(item.views) ? { views: item.views } : {}
|
|
23247
|
+
});
|
|
23248
|
+
}
|
|
23249
|
+
return out;
|
|
23250
|
+
}
|
|
23251
|
+
function planFeedEmission(posts, since, limit, pageMaxId) {
|
|
23252
|
+
const cap = Math.max(1, Math.min(TELEGRAM_FEED_LIMIT_MAX, Math.floor(Number.isFinite(limit) ? limit : TELEGRAM_FEED_DEFAULT_LIMIT) || 1));
|
|
23253
|
+
const byId = /* @__PURE__ */ new Map();
|
|
23254
|
+
for (const post of posts) byId.set(post.id, post);
|
|
23255
|
+
const sorted = [...byId.values()].sort((a, b) => a.id - b.id);
|
|
23256
|
+
if (since === void 0) {
|
|
23257
|
+
const emitted2 = sorted.slice(-cap);
|
|
23258
|
+
return { emitted: emitted2, latestId: sorted.length > 0 ? sorted[sorted.length - 1].id : void 0 };
|
|
23259
|
+
}
|
|
23260
|
+
const fresh = sorted.filter((p) => p.id > since);
|
|
23261
|
+
const emitted = fresh.slice(0, cap);
|
|
23262
|
+
if (emitted.length > 0) return { emitted, latestId: emitted[emitted.length - 1].id };
|
|
23263
|
+
const pastUnreadable = pageMaxId !== void 0 && Number.isFinite(pageMaxId) && pageMaxId > since;
|
|
23264
|
+
return { emitted, latestId: pastUnreadable ? pageMaxId : since };
|
|
23265
|
+
}
|
|
23266
|
+
|
|
23267
|
+
// src/ugc-run-state.ts
|
|
23268
|
+
var UGC_NODE_TYPES = /* @__PURE__ */ new Set(["ugc-creator", "ugc-script", "ugc-clips", "ugc-clip", "ugc-cards"]);
|
|
23269
|
+
var UGC_NODE_RUN_STATE_KEYS = {
|
|
23270
|
+
"ugc-creator": ["result", "keepResult", "ugcOutputs"],
|
|
23271
|
+
"ugc-script": ["result", "keepResult", "ugcOutputs"],
|
|
23272
|
+
"ugc-clips": ["result", "quote", "__listResults", "ugcOutputs"],
|
|
23273
|
+
"ugc-clip": ["warnings", "rerender", "__listResults", "__listResultMeta", "clipWarnings", "durationSec", "ugcOutputs"],
|
|
23274
|
+
"ugc-cards": ["result", "ugcOutputs"]
|
|
23275
|
+
};
|
|
23276
|
+
var UGC_OVERRIDABLE_FIELDS = {
|
|
23277
|
+
"ugc-creator": ["source", "gender", "photoUrl"],
|
|
23278
|
+
"ugc-script": ["targetDurationSec"],
|
|
23279
|
+
"ugc-clips": [],
|
|
23280
|
+
"ugc-clip": [],
|
|
23281
|
+
"ugc-cards": []
|
|
23282
|
+
};
|
|
23283
|
+
var KEEP_RESULT_TYPES = /* @__PURE__ */ new Set(["ugc-creator", "ugc-script"]);
|
|
23284
|
+
function stripUgcRunState(nodes) {
|
|
23285
|
+
return nodes.map((node) => {
|
|
23286
|
+
const type = typeof node.type === "string" ? node.type : "";
|
|
23287
|
+
if (!UGC_NODE_TYPES.has(type) || !node.data || typeof node.data !== "object") return node;
|
|
23288
|
+
const data = { ...node.data };
|
|
23289
|
+
for (const key of UGC_NODE_RUN_STATE_KEYS[type] ?? []) delete data[key];
|
|
23290
|
+
if (KEEP_RESULT_TYPES.has(type)) data.keepResult = false;
|
|
23291
|
+
return { ...node, data };
|
|
23292
|
+
});
|
|
23293
|
+
}
|
|
23294
|
+
function findUgcLockedFields(nodes, inputOverrides) {
|
|
23295
|
+
if (!nodes || !inputOverrides) return [];
|
|
23296
|
+
const found = [];
|
|
23297
|
+
for (const node of nodes) {
|
|
23298
|
+
const type = node?.type;
|
|
23299
|
+
if (typeof type !== "string" || !UGC_NODE_TYPES.has(type)) continue;
|
|
23300
|
+
const allowed = UGC_OVERRIDABLE_FIELDS[type] ?? [];
|
|
23301
|
+
const fields = inputOverrides[node.id];
|
|
23302
|
+
if (!fields || typeof fields !== "object") continue;
|
|
23303
|
+
for (const field of Object.keys(fields)) {
|
|
23304
|
+
if (!allowed.includes(field)) found.push({ nodeId: String(node.id), nodeType: type, field });
|
|
23305
|
+
}
|
|
23306
|
+
}
|
|
23307
|
+
return found;
|
|
23308
|
+
}
|
|
23309
|
+
|
|
23310
|
+
// src/ugc-call-body.ts
|
|
23311
|
+
var pick = (a, from, to) => a[from] !== void 0 && a[from] !== null ? { [to]: a[from] } : {};
|
|
23312
|
+
function llmFields(a) {
|
|
23313
|
+
return {
|
|
23314
|
+
...pick(a, "llmModel", "llmModel"),
|
|
23315
|
+
...pick(a, "reasoning_effort", "reasoningEffort"),
|
|
23316
|
+
...a.advanced_mode === true ? { advancedMode: true } : {},
|
|
23317
|
+
...pick(a, "temperature", "temperature"),
|
|
23318
|
+
...pick(a, "max_tokens", "maxTokens")
|
|
23319
|
+
};
|
|
23320
|
+
}
|
|
23321
|
+
function ugcCallToRouteBody(call, opts = {}) {
|
|
23322
|
+
const args = { ...call.args };
|
|
23323
|
+
if (call.imageArg) {
|
|
23324
|
+
if (!opts.image) return { error: `${call.tool} needs the previous step's image` };
|
|
23325
|
+
args[call.imageArg] = opts.image;
|
|
23326
|
+
}
|
|
23327
|
+
switch (call.tool) {
|
|
23328
|
+
case "generate_image":
|
|
23329
|
+
return {
|
|
23330
|
+
path: "/v1/generate-image",
|
|
23331
|
+
body: {
|
|
23332
|
+
...pick(args, "prompt", "prompt"),
|
|
23333
|
+
...pick(args, "model", "provider"),
|
|
23334
|
+
...pick(args, "aspect_ratio", "aspectRatio"),
|
|
23335
|
+
...pick(args, "resolution", "resolution"),
|
|
23336
|
+
...pick(args, "quality", "quality"),
|
|
23337
|
+
...pick(args, "negative_prompt", "negativePrompt")
|
|
23338
|
+
}
|
|
23339
|
+
};
|
|
23340
|
+
case "image_to_image":
|
|
23341
|
+
return {
|
|
23342
|
+
path: "/v1/image-to-image",
|
|
23343
|
+
body: {
|
|
23344
|
+
...pick(args, "image_url", "imageUrl"),
|
|
23345
|
+
...pick(args, "prompt", "prompt"),
|
|
23346
|
+
...pick(args, "model", "provider"),
|
|
23347
|
+
...pick(args, "resolution", "resolution"),
|
|
23348
|
+
...pick(args, "quality", "quality"),
|
|
23349
|
+
...pick(args, "strength", "strength"),
|
|
23350
|
+
...pick(args, "aspect_ratio", "aspectRatio"),
|
|
23351
|
+
...pick(args, "negative_prompt", "negativePrompt"),
|
|
23352
|
+
...pick(args, "seed", "seed")
|
|
23353
|
+
}
|
|
23354
|
+
};
|
|
23355
|
+
case "image_to_text": {
|
|
23356
|
+
const image = opts.image ?? (typeof args.image_url === "string" ? args.image_url : void 0);
|
|
23357
|
+
if (!image) return { error: "image_to_text needs an image" };
|
|
23358
|
+
return {
|
|
23359
|
+
path: "/v1/image-to-text/describe",
|
|
23360
|
+
body: {
|
|
23361
|
+
imageUrl: image,
|
|
23362
|
+
...pick(args, "detail_level", "detailLevel"),
|
|
23363
|
+
...pick(args, "custom_prompt", "customPrompt"),
|
|
23364
|
+
...llmFields(args)
|
|
23365
|
+
}
|
|
23366
|
+
};
|
|
23367
|
+
}
|
|
23368
|
+
default:
|
|
23369
|
+
return void 0;
|
|
23370
|
+
}
|
|
23371
|
+
}
|
|
23372
|
+
|
|
23373
|
+
export { ACCESS_LEVELS, ACTION_CARD_KINDS, ACTIVE_SCENE_HELPERS, ADVANCED_MODE_UNAVAILABLE_REASON, ADVICE_FAMILIES, AGGREGATEABLE_TYPES, AGGREGATE_LANE_SOURCE_TYPES, AI_AVATAR_DURATION_BUCKETS, AI_AVATAR_MAX_AUDIO_SEC, AI_AVATAR_MAX_DURATION_SEC, AI_AVATAR_RESERVE_IDS, AI_WRITER_PROVIDERS, ALA_CARTE_BOARDS, ALL_CAPTION_STYLES, ANIMALS, ANIMAL_SUBCATEGORY_LABELS, ANIMAL_SUBCATEGORY_ORDER, ANIMATE_SUB_GATES, ASPECT_RATIO_DIMENSIONS, AUDIO_ADDON_PROVIDERS, AUDIO_CROSSFADE_CURVES, AUDIO_CROSSFADE_CURVE_IDS, AUDIO_FX_PRESETS, AUDIO_FX_PRESET_LABELS, AUDIO_FX_PRESET_SET, AUDIO_FX_REVERB_PRESETS, AUDIO_PRODUCER_TYPES, AUDIO_SYNC_MIN_CONFIDENCE, AddBRollResultSchema, AnchorSceneStyleResultSchema, AnimateSubGateSchema, AssetRefSchema, AuditImagesResultSchema, AuditImagesShotEntrySchema, AuditPromptIssueSchema, AuditPromptResultSchema, AvatarPayloadError, BOARD_TO_ASSET_TYPE, BOARD_TO_COLUMN, BOARD_VARIANTS, BRAND_LESSON_KINDS, BridgeToNextSceneInputSchema, BridgeToNextSceneResultSchema, CAMERA_SWITCH_BOUNDS, CAMERA_SWITCH_CREDIT_ID, CAMERA_SWITCH_DEFAULTS, CAMERA_SWITCH_NAME_MAX, CAPTION_LEVER_BOUNDS, CAPTION_LOOKS, CAPTION_LOOK_IDS, CAPTION_MAX_WORDS_PER_LINE_MAX, CAPTION_MAX_WORDS_PER_LINE_MIN, CAPTION_SEGMENT_SCHEMA_KEYS, CARD_OUTCOME_STATES, CATEGORY_DURATION_DEFAULTS, CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_ASSET_TYPES, CHARACTER_ASSET_VARIANTS, CHARACTER_ATTACH_COLUMNS, CHARACTER_FACETS, CHARACTER_FACET_IDS, CHARACTER_LORA_TRAINING_JOB_TYPE, CHARACTER_MOTION_PROVIDERS, CHARACTER_PICKER_DISPLAY_ORDER, CHARACTER_REFERENCE_PHOTO_KINDS, CHARACTER_STYLES, CHARACTER_VARIANT_ASSET_BUCKETS, CHAT_ENABLED_STAGES, CHAT_STAGES, CHAT_TURN_CAPS, CHAT_WIRED_STAGES, CINEMATIC_DEFAULT_DURATION_SEC, CINEMATIC_DEFAULT_RESOLUTION, CINEMATIC_MAX_DURATION_SEC, CINEMATIC_MAX_LOOKS, CINEMATIC_MAX_REFERENCE_IMAGES, CINEMATIC_MAX_REFERENCE_VIDEOS, CINEMATIC_MIN_DURATION_SEC, CINEMATIC_MIN_LOOKS, CINEMATIC_PROMPT_MAX, CINEMATIC_RESERVE_IDS, COLLABORATOR_ROLES, COLLECTIONS_PAGE_DEFAULT, COLLECTIONS_PAGE_MAX, COLLECTION_DEDUPE_KEY_MAX, COLLECTION_DESCRIPTION_MAX, COLLECTION_DIGEST_SEPARATOR, COLLECTION_EVICT_MAX_PER_WRITE, COLLECTION_HEADLINE_MAX, COLLECTION_IDEMPOTENCY_KEY_MAX, COLLECTION_MEDIA_TYPES, COLLECTION_NAME_MAX, COLLECTION_READ_LIMIT_MAX, COLLECTION_READ_WINDOW_HOURS_MAX, COLLECTION_RECORD_FIELDS_BYTES_MAX, COLLECTION_RECORD_FIELDS_MAX, COLLECTION_RECORD_MEDIA_MAX, COLLECTION_RECORD_TEXT_MAX, COLLECTION_RECORD_TITLE_MAX, COLLECTION_RECORD_URL_MAX, COLLECTION_TIER_CAPS, COLLECT_IN_HANDLE, COMBINE_TRANSITIONS, COMBINE_TRANSITION_GROUP_LABELS, COMBINE_TRANSITION_GROUP_ORDER, COMBINE_TRANSITION_IDS, COMPETITORS_MAX, COMPETITOR_ABOUT_PLATFORMS, COMPETITOR_ACCOUNT_KEYS, COMPETITOR_DEFAULT_ABOUT_PLATFORMS, COMPETITOR_SCAN_CREDIT_COSTS, COMPETITOR_SCAN_MAX_SEARCHES, COMPETITOR_SCAN_NODE_TYPE, COMPETITOR_SCHEDULES, COMPOSER_PLAN_FIELDS, COMPOSER_PLAN_MAP, CONTENT_IDEAS_BRAND_MAX, CONTENT_IDEAS_DEFAULT_COUNT, CONTENT_IDEAS_LANGUAGE_MAX, CONTENT_IDEAS_MAX_COUNT, CONTENT_IDEAS_MAX_RECIPE_INPUTS, CONTENT_IDEAS_PER_CHARGE, CONTENT_RECIPE_IDEAS_CREDIT_IDS, CONTENT_RECIPE_SOURCE_MAX, CONTENT_TYPES_BY_PLATFORM, CONTINUATION_NOT_COMPLETED, CONTINUATION_NOT_FOUND, CONTINUATION_SUBSET_REQUIRED, CONTINUATION_VERSION_MISMATCH, CONTINUATION_WORKFLOW_MISMATCH, CREATURE_ATTACH_COLUMNS, CREDIT_BASE_USD, CREDIT_ROUNDING_RESOLUTION, CastCoverageCriticVerdictSchema, CharacterImageCriticVerdictSchema, CharacterMetadataSchema, ChatTurnResponseSchema, CriticIssueSchema, DEFAULT_AUDIO_CROSSFADE_CURVE_ID, DEFAULT_CAPTION_LOOK, DEFAULT_CARRIED_FRACTION, DEFAULT_CHARACTER_ANGLE_COUNT, DEFAULT_CHARACTER_EXPRESSION_COUNT, DEFAULT_CHARACTER_FACET, DEFAULT_DIALOGUE_PROVIDER, DEFAULT_FRAME_DELIVERY, DEFAULT_FRAME_FIT, DEFAULT_LABEL_BY_SOURCE, DEFAULT_LOCATION_USAGE_MODE, DEFAULT_MUSIC_PROVIDER, DEFAULT_OVERLAY_QR, DEFAULT_OVERLAY_SHAPE, DEFAULT_OVERLAY_TEXT, DEFAULT_PANEL_COUNT, DEFAULT_REF_IMAGE_MAX, DEFAULT_SECTIONS, DEFAULT_SUBTITLE_LOOK, DEFAULT_SUNO_MODEL, DEFAULT_TEMPLATE_CATEGORY, DEFAULT_TEXT_TO_AUDIO_PROVIDER, DEFAULT_TRANSCRIBE_NODE_PROVIDER, DEFAULT_TRANSCRIBE_PROVIDER, DEFAULT_TTS_PROVIDER, DEFAULT_USAGE_MODE, DEFAULT_VIDEO_ANALYSIS_MODEL, DEFAULT_VIDEO_ANALYSIS_TIER, DEFAULT_VIDEO_CLIP_COST, DEFAULT_VIDEO_DURATION_SEC, DEFAULT_VIDEO_OVERLAY_LAYER, DEFAULT_VIDEO_PROVIDER, DEFAULT_VOICE_CHANGER_MODEL, DEFAULT_VOICE_DESIGN_MODEL, DETAIL_VARIANTS, DIALOGUE_PROVIDERS, DURATION_PRICED_PROVIDERS, DYNAMIC_HANDLE_NODE_TYPES, DYNAMIC_PRODUCER_TYPES, DetectionResultSchema, EDITED_EDL_VERSION, EDIT_PLAN_BASE_CREDIT_ID, EDIT_PLAN_BUCKET_MINUTES, EDIT_PLAN_DEFAULT_CLIP_COUNT, EDIT_PLAN_MAX_CLIP_COUNT, EDIT_PLAN_MAX_MINUTES, EDIT_PLAN_MODES, EDIT_PLAN_TIERS, EDL_FULL_FRAME, EDL_SOURCE_ROLES, EDL_TARGET_ASPECTS, EDL_VERSION, EFFORT_TIER_BUMP, EMOTIONAL_BEAT, ENTITY_ASPECT_DEFAULTS, ENTITY_BUCKET_FIELDS, ENTITY_DB_ID_FIELD, ENTITY_IMAGE_HANDLE_TYPES, ENTITY_KIND_SCALAR_FIELDS, ENTITY_NAME_FIELD, ENTITY_NODE_KINDS, ENTITY_SCALAR_FIELDS, ENTITY_SECTIONS, ENTITY_STATUSES, ENTITY_TABLE, ENTITY_TOOL_RETRY_CAP, ENTITY_TYPES, EXECUTION_DATA_KEYS, EXECUTION_GRAPH_COMPOSED_PARAMETER_TYPES, EXTEND_VIDEO_PROVIDERS, EntityMetadataSchema, EntityRejectInputSchema, EntityStaleEventSchema, EntityStateChangeEventSchema, FACE_SWAP_PROVIDERS, FAL_LIP_SYNC_PROVIDERS, FAN_IN_TARGETS, FAN_OUT_ALL_OR_NOTHING_TYPES, FAN_OUT_EACH_HANDLES, FAN_OUT_EACH_TYPES, FEATURED_ENTITIES, FILM_BASE_CREDITS, FLEXIBLE_INPUT_LIP_SYNC_PROVIDERS, FLUX2_RES_MP, FLUX_LORA_CHARACTER_MODEL_ID, FRAME_DELIVERIES, FRAME_DELIVERY_BY_PROVIDER, FRAME_FITS, FRAME_FIT_STRETCH_TOLERANCE, FRAME_MODE_ADAPTIVE_ONLY_ASPECT, FRAME_TARGET_HANDLES, FREECUT_EXPORT_COMPLETE, FREECUT_EXPORT_PROGRESS, FREECUT_READY, FREECUT_REQUEST_IMPORT, FURNITURE, FURNITURE_SUBCATEGORY_LABELS, FURNITURE_SUBCATEGORY_ORDER, FixContinuityInputSchema, FixContinuityResultSchema, GEMINI_OMNI_PROVIDERS, GEMINI_OMNI_VOICE_PRESETS, GEMINI_OMNI_VOICE_PRESET_IDS, GENERATE_TEXT_DELIMITER, GLOBAL_MAX_DURATION_SECONDS, GRANTED_ACCESS, GROUP_HANDLE_PREFIX, GUIDANCE_SCALE_SUPPORT, GVP_ANCHOR_CHOICES, GVP_DEFAULT_PROVIDER, GVP_END_FRAME_PROVIDERS, GVP_EXTEND_PROVIDERS, GVP_SUPPORTED_PROVIDERS, GenerateMotionInputSchema, GenerateMotionResultSchema, HANDLE_PORT_SEPARATOR, HELPERS_SHIPPED_IN_1B3, HIGH_QUALITY_PROVIDERS, HINT_EXEMPT_PARAMETER_TYPES, I2I_MASK_SUPPORT, I2I_STRENGTH_SUPPORT, IDEOGRAM_PROVIDERS, IMAGE_ASPECT_RATIO_VALUES, IMAGE_CRITIC_LEAF_MODES, IMAGE_CRITIC_MAX_RETRIES, IMAGE_CRITIC_METADATA_KEYS, IMAGE_CRITIC_MIN_ADHERENCE_SCORE, IMAGE_CRITIC_MODES, IMAGE_CRITIC_UNRESOLVABLE, IMAGE_EDIT_PROVIDERS, IMAGE_GEN_PROVIDERS, IMAGE_I2I_PROVIDERS, IMAGE_MASK_MODE, IMAGE_OVERLAY_BASE_CREDITS, IMAGE_OVERLAY_VARIANT_CREDITS, IMAGE_PRODUCER_TYPES, IMAGE_PROMPT_MAX, IMAGE_REF_TYPES, IMAGE_TO_VIDEO_PROVIDERS, INPUT_FIELD_EXTRA_KEYS, INPUT_FIELD_MAP2 as INPUT_FIELD_MAP, INPUT_NODE_TYPES, INSTAGRAM_ANALYSIS_CREDIT_ID, INSTAGRAM_CAROUSEL_MAX_ITEMS, INSTAGRAM_CAROUSEL_MIN_ITEMS, INSTAGRAM_HOSTS, INSTAGRAM_SCRAPE_CREDIT_COSTS, INSTAGRAM_SCRAPE_DEFAULT_COUNT, INSTAGRAM_SCRAPE_FALLBACK_CREDIT_ID, INSTAGRAM_SCRAPE_MAX_COUNT, INSTAGRAM_SCRAPE_MAX_SOURCES, INSTAGRAM_SCRAPE_MAX_TARGET_LENGTH, INSTAGRAM_SCRAPE_MODES, INSTAGRAM_SCRAPE_NODE_TYPE, INSTAGRAM_SCRAPE_PERIODS, INSTAGRAM_SCRAPE_TIERS, ITER_CLONE_PATTERN, ImageCriticIssueSchema, ImageCriticResultSchema, ImageCriticVerdictSchema, ImprovePromptInputSchema, ImprovePromptResultSchema, KEYFRAME_CREDITS_PER_SHOT, KINETIC_CAPTION_STYLES, KINETIC_ONLY_CAPTION_LEVER_KEYS, LANGUAGES, LEGACY_EXPOSED_FIELD_KEYS, LEGACY_LOTTIE_HOST_REMAP, LEGACY_SOURCE_HANDLE_ALIASES, LEGACY_TARGET_HANDLE_ALIASES, LEGACY_TEMPLATE_CATEGORIES, LIP_SYNC_DURATION_BUCKETS, LIP_SYNC_MAX_AUDIO_SECONDS, LIP_SYNC_PROVIDERS, LLM_FEATURE_DEFAULTS, LLM_MODALITY_CAPS, LLM_MODELS, LLM_MODEL_IDS, LLM_REASONING_EFFORTS, LLM_ROUTE_DEFAULTS, LLM_TEXT_INPUT_MAX, LLM_VENDOR_LABELS, LLM_VENDOR_ORDER, LOCATION_ASSET_TYPES, LOCATION_ASSET_VARIANTS, LOCATION_ATMOSPHERE_PROVIDERS, LOCATION_ATTACH_COLUMNS, LOCATION_BUCKET_TO_CATALOG_ID, LOCATION_PRESET_TO_CATALOG, LOCATION_REFERENCE_PHOTO_KINDS, LOCATION_REFERENCE_PHOTO_KIND_LABELS, LOCATION_USAGE_MODES, LOTTIE_OVERLAY_CATALOG, LOTTIE_SLOT_FIELD_PREFIX, LTX_EXTEND_DURATION, LTX_EXTEND_PER_SECOND_CREDIT_ID, LTX_RETAKE_MIN_DURATION_SEC, LTX_RETAKE_PER_SECOND_CREDIT_ID, LocationImageCriticVerdictSchema, LocationMetadataSchema, LocationsCoverageCriticIssueSchema, LocationsCoverageCriticVerdictSchema, MATCH_CUT_BREAK_GATE, MAX_CUSTOM_ENTRIES_PER_BOARD, MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER, MAX_LOCATION_VARIANTS, MAX_NEGATIVE_PROMPT_CHARS_BY_PROVIDER, MAX_PANELS_PER_SHEET, MAX_TTS_CHARS_BY_PROVIDER, MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER, MEMBER_STATUSES, META_ADS_ADVERTISER_MAX_RESULTS, META_ADS_ANALYSIS_CREDITS_PER_AD, META_ADS_ANALYSIS_CREDIT_ID, META_ADS_ANALYSIS_FOCUS_MAX, META_ADS_ANALYSIS_TIERS, META_ADS_FORMATS, META_ADS_NODE_MODES, META_ADS_PLATFORMS, META_ADS_SCRAPE_COUNT_OPTIONS, META_ADS_SCRAPE_CREDIT_COSTS, META_ADS_SCRAPE_DEFAULT_COUNT, META_ADS_SCRAPE_DEFAULT_COUNTRY, META_ADS_SCRAPE_FALLBACK_CREDIT_ID, META_ADS_SCRAPE_MAX_COUNT, META_ADS_SCRAPE_MAX_QUERY_LENGTH, META_ADS_SCRAPE_MAX_SOURCES, META_ADS_SCRAPE_MODES, META_ADS_SCRAPE_NODE_TYPE, META_ADS_SCRAPE_PERIODS, META_ADS_SCRAPE_STATUSES, META_ADS_SCRAPE_TIERS, MINIMAX_H3_DEFAULT_RESOLUTION, MINIMAX_H3_PROVIDERS, MODELS_WITH_REFERENCE_IMAGE_SUPPORT, MODEL_CATALOG, MODEL_KINDS, MODEL_PARAM_NODE_TYPES, MODEL_RECOMMENDATIONS, MODIFY_IMAGE_PROVIDERS, MOTION_COLUMN, MOTION_TRANSFER_PROVIDERS, MUSIC_CREDIT_ID, MUSIC_PROVIDERS, MUSIC_PROVIDER_LABELS, MatchCutVerdictSchema, NATIVE_ADAPTIVE_ASPECT, NATIVE_NEGATIVE_PROMPT_MODELS, NATIVE_NEGATIVE_VIDEO_PROVIDERS, NEGATIVE_PROMPT_MAX, NODARO_IMPORT_FILES, NODARO_LOAD_TIMELINE, NODARO_LOAD_VIDEO, NODARO_RESET_PROJECT, NODE_DEFAULT_TYPES, NODE_MAPPABLE_FIELDS, NODE_PRESET_EXPORT_KIND, NODE_REF_PATTERN, NON_EN_LOCALE_IDS, NON_PROMPT_TEXT_LANES, NO_SAVED_RENDER_STAMPS, NO_SPLIT_DELIMITER, OAUTH_SCOPES, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ASSET_VARIANTS, OBJECT_ATTACH_COLUMNS, OBJECT_MOTION_PROVIDERS, OBJECT_PICKER_NODE_TYPES, ORG_ERROR_CODES, ORG_KINDS, ORG_ROLES, ORG_STATUSES, OUTPUT_BEARING_NODE_STATUSES, OUTPUT_FIELD_MAP, OUTPUT_FORMATS, OVERLAY_ANCHORS, OVERLAY_FONTS, OVERLAY_FONT_IDS, OVERLAY_IMAGE_MASKS, OVERLAY_LAYER_KINDS, OVERLAY_MAX_VARIANTS, OVERLAY_PLATFORMS, OVERLAY_PLATFORM_IDS, OVERLAY_SHAPES, OVERLAY_TEXT_ALIGNS, OVERLAY_VARIANT_HANDLE_PREFIX, OWNER_ONLY_LISTING_RENDER_TYPES, OWN_LIST_NODE_TYPES, ObjectMetadataSchema, OptimizeForModelInputSchema, OptimizeForModelResultSchema, OrgSettingsSchema, PARAMETER_NODE_TYPES, PASSTHROUGH_TYPES, PAYG_RETENTION_DAYS, PER_FORMAT_DURATION_BOUNDS, PICKER_TO_COMBINE_TRANSITION, PIPELINE_ACTIVATION_MODES, PIPELINE_FORMATS, PIPELINE_HARD_TIMEOUT_MS, PIPELINE_MODEL_STAGES, PIPELINE_MODES, PIPELINE_OUTPUT_RESOLUTIONS, PIPELINE_PINNABLE_IMAGE_MODELS, PIPELINE_PINNABLE_SCRIPT_LLMS, PIPELINE_PINNABLE_VIDEO_MODELS, PIPELINE_STAGE_NAMES, PIPELINE_STAGE_TIMEOUT_MS, PIPELINE_TYPES, PLACEHOLDER_CHARACTER_NAME, PLATFORM_LABELS, PLATFORM_SPECS, PRESET_APPLY_CLEAR_KEYS, PRESET_EXCLUDED_KEYS, PRESET_LABELS, PRESET_LEVER_GROUPS, PRESET_SETTING_KEYS, PREVIEW_RENDER_NESTED, PREVIEW_RENDER_NODE_TYPES, PREVIEW_REVIEW_REQUIRED, PRICING_DEFAULT_DURATION_SEC, PRICING_DEFAULT_RESOLUTION, PRO3D_RENDER_ASPECT_RATIOS, PRO3D_RENDER_CREDIT_ID, PRO3D_RENDER_DEFAULT_ENGINE, PRO3D_RENDER_DEFAULT_QUALITY, PRO3D_RENDER_DEFAULT_REPAIR_PASSES, PRO3D_RENDER_DEFAULT_STYLE, PRO3D_RENDER_ENGINES, PRO3D_RENDER_LABEL, PRO3D_RENDER_LIMITS, PRO3D_RENDER_MAX_REPAIR_PASSES, PRO3D_RENDER_MIN_REPAIR_PASSES, PRO3D_RENDER_NODE_TYPE, PRO3D_RENDER_PROMPT_MAX, PRO3D_RENDER_QUALITY_PROFILES, PRO3D_RENDER_SOURCE_KINDS, PRO3D_RENDER_STYLES, PROJECTED_TRIGGER_NODE_TYPES, PROMPT_HARD_CEILING, PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY, PROVIDER_DIRECTIVE_DEFAULTS, PROVIDER_PLACEHOLDER_PREFIX, PipelineCompletedEventSchema, PipelineConfigSchema, PipelineDriftSummarySchema, PipelineEditorDecisionsReadyEventSchema, PipelineForkedEventSchema, PipelineInputSchema, PipelineMusicReadyEventSchema, PipelineStageNameSchema, PipelineStageStatusSchema, PipelineStateSchema, PipelineStatusSchema, PresetSettingsSchema, QA_CHECK_PROVIDERS, REASONING_OUTPUT_FLOOR, RECAST_SEGMENT_PACKS, REDUCE_STRATEGIES, REDUCE_STRATEGY_IDS, REFERENCE_BOARD_PROVIDERS, REFERENCE_BOARD_TEMPLATES, REFERENCE_HANDLE_MAP, REFERENCE_ROLE_PRESETS, REF_HANDLE_CATEGORY, REF_IMAGE_MAX_LIMITS, REF_TOKEN_NAMESPACE_PREFIXES, RENDERED_OUTPUT_HANDLES, RENDERING_SPEED_SUPPORT, RENDER_FINAL_CODES, RENDER_FINAL_NODE_NOT_FOUND, RENDER_FINAL_NOT_A_RENDER, RENDER_NODE_TYPES, RENDER_NODE_TYPE_IDS, RENDER_VIDEO_CREDIT_ID, REPEATABLE_NODE_TYPES, REPEAT_PLACEHOLDER, REPLICATE_LIP_SYNC_PROVIDERS, RESERVED_TEMPLATE_VARS, RUN_CONTINUATION_CODES, RUN_OVERRIDE_CLEARED_FIELDS, SAVED_POSTS_LOOKUP_MAX, SAVED_POSTS_PAGE_MAX, SAVED_POST_MAX_TAGS, SAVED_POST_NOTE_MAX, SAVED_POST_SOURCES, SAVED_POST_TAG_MAX, SAVED_RENDER_STAMPS, SCENE3D_ASSERTION_RESTORED_CODE, SCENE3D_ASSET_KINDS, SCENE3D_ASSET_ROLES, SCENE3D_ASSET_ROLE_KINDS, SCENE3D_AUTHORING_ASSUMPTION_CODE, SCENE3D_AUTHORING_ENGINES, SCENE3D_BASIC_ENGINE, SCENE3D_BASIC_SCHEMA_VERSION, SCENE3D_CAMERA_TRACK_FORMAT, SCENE3D_CAMERA_TRACK_LIMITS, SCENE3D_CAMERA_TRACK_VERSION, SCENE3D_CLAY_LIGHTING_PRESETS, SCENE3D_DEFAULT_ADVANCED_ENGINE, SCENE3D_DEFAULT_DURATION_SECONDS, SCENE3D_DEFAULT_ENTITY_CAPABILITIES, SCENE3D_DEFAULT_FPS, SCENE3D_EDIT_NODE_TYPE, SCENE3D_ENTITY_CAPABILITIES, SCENE3D_ENTITY_ROLES, SCENE3D_GENERATE_NODE_TYPE, SCENE3D_GLB_EXTRAS_ALLOWLIST, SCENE3D_GLB_EXTRAS_ENTITY_ID, SCENE3D_GLB_EXTRAS_MATERIAL_ROLE, SCENE3D_GLB_EXTRAS_SUBPART_ID, SCENE3D_LIMITS, SCENE3D_PLAN_FIELD, SCENE3D_PLAN_TYPE, SCENE3D_PRIMITIVES, SCENE3D_PRIMITIVE_MATERIAL_ROLE, SCENE3D_REMEDY_AUTO_APPLIED_CODE, SCENE3D_RENDERER_ASSET_KINDS, SCENE3D_RENDER_BASE_MAX_PX, SCENE3D_RENDER_TIERS, SCENE3D_RENDER_TIER_MULTIPLIERS, SCENE3D_RENDER_XLARGE_MIN_AREA_PX, SCENE3D_REVIEW_REFUSED_CODE, SCENE3D_REVIEW_UNAVAILABLE_CODE, SCENE3D_REVIEW_UNAVAILABLE_REASONS, SCENE3D_SCHEMA_VERSION, SCENE3D_SCHEMA_VERSION_V2, SCENE3D_SUPPORTED_SCHEMA_VERSIONS, SCENE3D_V2_CONTENT_HASH_EXCLUDED, SCENE3D_V2_ENGINES, SCENE3D_V2_LIMITS, SCENE3D_V2_OVERRIDE_OPERATION_VERSION, SCENE3D_V2_PRIMITIVES, SCENE_HELPER_NAMES, SCHEDULE_EVERY_LIMITS, SCHEDULE_RULE_KINDS, SCHEDULE_TRIGGER_NODE_TYPE, SCRAPER_ACTOR_LABELS, SCRAPER_CREDIT_COSTS, SCRAPER_OUTPUT_FIELDS, SCRIPT_PROVIDERS, SCRIPT_SCENE_COUNT_DEFAULT, SCRIPT_SCENE_COUNT_RANGE, SCRIPT_STYLE_GUIDE_MAX_LENGTH, SCRIPT_TARGET_DURATION_DEFAULT, SCRIPT_TARGET_DURATION_RANGE, SCRIPT_TONE_MAX_LENGTH, SEASONS, SECTION_BOARD, SECTION_KINDS, SEEDANCE_2_5_REF_LIMITS, SEEDANCE_2_CONTINUATION_REF_SEC, SEEDANCE_2_EXTEND_STITCH, SEEDANCE_2_PROVIDERS, SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER, SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC, SEEDANCE_2_REF_LIMITS, SEEDANCE_LIP_SYNC_PROVIDERS, SEEDANCE_VIDEO_EDIT_PROVIDERS, SEEDANCE_VIDEO_EDIT_SHAPE, SEED_SUPPORT, SEPARATOR_DISPLAY, SEPARATOR_PRESETS, SETTINGS_HINT_SOURCES, SETTINGS_INPUT_CONSUMERS, SETTINGS_INPUT_HANDLE, SETTINGS_SOURCE_FIELDS, SETTINGS_SOURCE_TYPES, SHEET_ASPECTS, SHEET_BACKGROUNDS, SHEET_PRESETS, SHEET_SKINS, SHEET_TYPES, SHORT_FILM_ANGLE_COUNT, SHORT_FILM_EXPRESSION_COUNT, SHORT_FILM_VARIANT_THRESHOLD_SEC, SLOT_TOKEN_RE, SMART_CUT_WINDOW_DEFAULT, SMART_CUT_WINDOW_MAX, SMART_CUT_WINDOW_MIN, SOCIAL_PLATFORMS, SOCIAL_POST_NODE_TYPES, SOCIAL_POST_VIDEO_LINK_MARGIN_MS, SOCIAL_SEARCH_COUNTS, SOCIAL_SEARCH_CREDITS_PER_PAGE, SOCIAL_SEARCH_CREDIT_COSTS, SOCIAL_SEARCH_DEFAULT_PICK_TOP, SOCIAL_SEARCH_MAX_QUERY_LENGTH, SOCIAL_SEARCH_MODES, SOCIAL_SEARCH_NODE_TYPE, SOCIAL_SEARCH_PAGED_MODES, SOCIAL_SEARCH_PERIODS, SOCIAL_SEARCH_PLATFORM_MODES, SOCIAL_SEARCH_SORTS, SOCIAL_SEARCH_VIDEO_KINDS, SOCIAL_VIDEO_HOSTS, SPEAKER_EMPHASIS_STYLES, SPEAKER_LAYOUTS, SPEAKER_LAYOUT_IDS, SPEAKER_SWITCHES, SPEAKER_SWITCH_IDS, SPEAKER_TRACKS_MAX_BOXES_PER_SOURCE, SPEAKER_TRACKS_MAX_BYTES, SPEAKER_TRACKS_VERSION, SPEAKER_TRACK_ATTRIBUTION_METHODS, SPEECH_FLOOR_UNITS, SPEECH_PRICE_UNIT_CHARS, SPEECH_UNIT_CREDIT_SUFFIX, SPEECH_UNIT_PRICE_NOTE, STAGE_PATCH_SCHEMA, STATIC_CAPTION_STYLES, STRUCTURAL_SECTIONS, STRUCTURED_VISION_MODELS, STUDIO_DEPENDENT_FRAMES_CAPABILITY, STUDIO_KEYFRAME_ACCEPTANCE_PRIVATE_KEYS, STUDIO_KEYFRAME_NODE_TRANSIENT_KEYS, STUDIO_KEYFRAME_REVIEW_KEYS, STUDIO_KEYFRAME_TRANSIENT_KEYS, STUDIO_PREVIZ_RUN_STATE_KEYS, STUDIO_SEQUENCE_PLANNING_KEYS, STUDIO_SEQUENCE_POLICY_KEYS, STUDIO_SEQUENCE_UNIT_MANIFEST_KEYS, STUDIO_SEQUENCE_UNIT_REVIEW_KEYS, STUDIO_SHOT_DRAFT_KEYS, STUDIO_SHOT_TRANSIENT_KEYS, STUDIO_TAKE_SEQUENCE_KEYS, STUDIO_TAKE_VOICE_KEYS, STUDIO_TRANSIENT_KEYS, SUBMISSION_STATUSES, SUNO_ACTIVE_MODELS, SUNO_ADD_TRACK_MODELS, SUNO_DURATION_MODELS, SUNO_FIELD_HANDLE_FIELDS, SUNO_HARD_CEILING, SUNO_LEGACY_MODELS, SUNO_MODELS, SUNO_SELECT_OPERATIONS, SUNO_TEXT_MAX, SUNO_TITLE_MAX, SUNO_TRACK_SOURCE_TYPES, SUNO_VERSION_CREDIT_KEYS, SUNO_VERSION_PRICED_OPERATIONS, SUPPORTED_FONT_NAMES, SURROUND_DIRECTIONS, SWITCHX_BLOCK_FRAMES, SWITCHX_FRAME_TIERS, SceneHelperNameSchema, SceneInputModeSchema, SceneMetadataSchema, SceneNodeDataSchema, SceneSpecSchema, ScriptCriticVerdictSchema, SequenceExecutionRequiredError, ShotSpecSchema, ShowrunnerPlanSchema, StageAwaitingSubGateEventSchema, StoryboardCohesionCriticVerdictSchema, StyleDirectivesSchema, SubGateNameSchema, T2I_TO_I2I_VARIANT, TASK_CHAINED_EDIT_PROVIDERS, TELEGRAM_ACCOUNT_SEND_NODE_TYPE, TELEGRAM_ACCOUNT_TRIGGER_MESSAGE_FIELDS, TELEGRAM_ACCOUNT_TRIGGER_MESSAGE_HANDLE, TELEGRAM_ACCOUNT_TRIGGER_NODE_TYPE, TELEGRAM_ACCOUNT_TRIGGER_OUTPUT_HANDLES, TELEGRAM_ACCOUNT_TRIGGER_POST_FIELDS, TELEGRAM_FEED_DEFAULT_LIMIT, TELEGRAM_FEED_DIGEST_SEPARATOR, TELEGRAM_FEED_LIMIT_MAX, TELEGRAM_FEED_PAGE_SIZE, TELEGRAM_FEED_PEEK_MAX, TELEGRAM_SEND_AS, TELEGRAM_SEND_DESTINATIONS, TELEGRAM_TRIGGER_NODE_TYPE, TEMPLATE_CATEGORIES, TEXT_TO_AUDIO_PRICING, TEXT_TO_AUDIO_PROVIDERS, TEXT_TO_AUDIO_SFX_CREDIT_IDS, TEXT_TO_VIDEO_PROVIDERS, TIER_MAX_PIPELINE_COST_CREDITS, TIER_PIPELINE_PARALLELISM, TILT_CARRIED_FRACTION, TOPAZ_DEFAULT_UPSCALE_FACTOR, TOPAZ_UPSCALE_FACTORS, TRANSCRIBE_LANES, TRANSCRIBE_PROVIDERS, TRANSCRIBE_PROVIDER_CAPABILITIES, TRANSIENT_RUNTIME_KEYS, TTS_FALLBACK_PROVIDER, TTS_NEIGHBOUR_TEXT_MAX_CHARS, TTS_PROVIDERS, TTS_PROVIDER_ALIASES, TTS_TEXT_MAX, TWO_K_RESOLUTION_PROVIDERS, TransitionTypeSchema, UGC_NODE_RUN_STATE_KEYS, UGC_NODE_TYPES, UGC_OVERRIDABLE_FIELDS, UPSCALE_IMAGE_PROVIDERS, USAGE_GROUP_BYS, USAGE_MODES, VARIABLES_HANDLE_ID, VARIABLE_PRICING_MODELS, VEHICLES, VEHICLE_SUBCATEGORY_LABELS, VEHICLE_SUBCATEGORY_ORDER, VEO_PROVIDERS, VIDEO_ANALYSIS_AUDIO_MODES, VIDEO_ANALYSIS_BUCKET_CREDITS, VIDEO_ANALYSIS_BUCKET_GRACE_SEC, VIDEO_ANALYSIS_CLIP_TRANSITIONS_IN, VIDEO_ANALYSIS_DEFAULT_VARIATION, VIDEO_ANALYSIS_DURATION_BUCKETS, VIDEO_ANALYSIS_DURATION_TOLERANCE_SEC, VIDEO_ANALYSIS_ENTITY_SOURCES, VIDEO_ANALYSIS_FACELESS_ANGLES, VIDEO_ANALYSIS_LEGACY_MODELS, VIDEO_ANALYSIS_LLM_MODELS, VIDEO_ANALYSIS_MAX_DURATION_SEC, VIDEO_ANALYSIS_MAX_SCENE_SEC, VIDEO_ANALYSIS_MAX_VARIATIONS, VIDEO_ANALYSIS_MIXED_TIERS, VIDEO_ANALYSIS_SHOT_ANGLES, VIDEO_ANALYSIS_SPEED_EFFECTS, VIDEO_ANALYSIS_STORY_JUMPS, VIDEO_ANALYSIS_TEXT_KINDS, VIDEO_ANALYSIS_TIERS, VIDEO_ANALYSIS_TIER_LABELS, VIDEO_ANALYSIS_TIER_ORDER, VIDEO_ANALYSIS_TIMES_OF_DAY, VIDEO_ANALYSIS_TRANSITIONS, VIDEO_ANALYSIS_VARIATION_SLUGS, VIDEO_ANALYSIS_VISUAL_EFFECTS, VIDEO_ANALYSIS_WINDOW, VIDEO_AUDIO_CAPABILITY, VIDEO_AUDIT_BUCKET_CREDITS, VIDEO_CHARACTER_DESCRIPTION_MAX, VIDEO_CHARACTER_NAME_MAX, VIDEO_CHARACTER_REFS_WIRE_MAX, VIDEO_CHARACTER_VOICE_DESCRIPTION_MAX, VIDEO_CHARACTER_VOICE_EXAMPLE_MAX, VIDEO_CLIP_CREDITS, VIDEO_CRITIC_CREDITS_PER_SHOT, VIDEO_CRITIC_FRAME_MODES, VIDEO_CRITIC_MAX_RETRIES, VIDEO_CRITIC_METADATA_KEYS, VIDEO_CRITIC_MIN_ADHERENCE_SCORE, VIDEO_CRITIC_RESERVED_CREDITS_PER_SHOT, VIDEO_DURATION_AUTO, VIDEO_DURATION_TIERS, VIDEO_GEN_COLLAPSED_T2V_IDS, VIDEO_GEN_PROVIDERS, VIDEO_INPUT_LIP_SYNC_PROVIDERS, VIDEO_LINK_TOLERANT_CONSUMER_TYPES, VIDEO_MODEL_CAPS, VIDEO_MODE_ALIASES, VIDEO_ONLY_PARAMETER_NODE_TYPES, VIDEO_OUTPUT_CANVAS, VIDEO_OVERLAY_ANIMATION_MIN_SCALE, VIDEO_OVERLAY_ANIMATION_SEC, VIDEO_OVERLAY_BADGE_INSET, VIDEO_OVERLAY_BADGE_WIDTH, VIDEO_OVERLAY_BOUNDS, VIDEO_OVERLAY_BOX_FIELDS, VIDEO_OVERLAY_CORNERS, VIDEO_OVERLAY_DEFAULT_BACKGROUND, VIDEO_OVERLAY_ERROR_CODES, VIDEO_OVERLAY_FITS, VIDEO_OVERLAY_HANDLE_IDS, VIDEO_OVERLAY_LAYER_PLAN_HANDLE, VIDEO_OVERLAY_MAX_COMPOSITION_KEY_LENGTH, VIDEO_OVERLAY_MAX_LAYERS, VIDEO_OVERLAY_MAX_TIME_SEC, VIDEO_OVERLAY_MAX_TOTAL_LAYER_BYTES, VIDEO_OVERLAY_OUTPUT_ASPECTS, VIDEO_OVERLAY_PRESETS, VIDEO_OVERLAY_PRESET_IDS, VIDEO_OVERLAY_WARNING_CODES, VIDEO_PRODUCER_TYPES, VIDEO_PROMPT_MAX, VIDEO_PROVIDERS_REQUIRING_IMAGE, VIDEO_PROVIDERS_WITHOUT_DISPATCH, VIDEO_REF_LIMITS_BY_PROVIDER, VIDEO_REF_VIDEO_DURATION_LIMITS, VIDEO_SFX_PRICING, VIDEO_TO_VIDEO_NODE_PROVIDERS, VIDEO_TO_VIDEO_PROVIDERS, VIDEO_UPSCALE_PROVIDERS, VIDEO_UTIL_PRICING, VIDEO_VARIABLE_PRICING, VOICE_CHANGER_MODELS, VOICE_CHANGER_MODEL_IDS, VOICE_DESIGN_MODELS, ValidateMatchCutInputSchema, ValidateMatchCutResultSchema, VideoCriticVerdictSchema, VoiceMatchSchema, WAN_3_DEFAULT_RESOLUTION, WAN_3_PROVIDERS, WARDROBE_VARIANTS, WEAPONS, WEAPON_SUBCATEGORY_LABELS, WEAPON_SUBCATEGORY_ORDER, WEBHOOK_TRIGGER_NODE_TYPE, WORKFLOW_VISIBILITIES, WORKSPACE_HEADER, WORKSPACE_HEADER_LOWER, WORKSPACE_ROLES, WorkspaceSettingsSchema, YOUTUBE_HOSTS, adCreativeAnalysisFrom, adviceFamilyOf, aggregateByType, aiAvatarReserveCreditId, alignedFieldList, analyzedSceneSchema, applyAudioSyncOffsets, applyDefaultVideoSelection, applyEdlCreditId, applyHandleInputOverride, applyRange, applyRangeIndices, applyScene3DEditOperations, applyScene3DV2EditOperations, applySettingsInput, applySlots, applyVideoAudioToggle, applyVideoNegativePrompt, applyVideoOverlayPreset, asEditPlanMode, asEditPlanTier, aspectRatioFromDims, aspectRatioOptionsByKind, aspectRatioToNumber, assembleNarratedVideoCredits, assembleVideoOverlayRequest, assertCanvasExecutionAllowed, autoStrokeWidth, availableReasoningEfforts, bucketSecondsFromAuditCreditId, bucketSecondsFromCreditId, buildBoardPrompt, buildChildrenByParent, buildConditionVariables, buildCreditModelIdentifier, buildEditPlanCreditId, buildExpressionFromVisual, buildFeedMaps, buildInstagramScrapeCreditId, buildLipSyncCreditId, buildLlmCreditIdentifier, buildMetaAdsScrapeCreditId, buildModelMenu, buildModelTree, buildMotionCreditModelIdentifier, buildNodePresetExport, buildPanelPrompt, buildPro3DRenderSource, buildProgressSegments, buildRangeLabel, buildScraperCreditId, buildVideoAnalysisCreditId, buildVideoAuditCreditId, buildVideoCreditModelIdentifier, calculateCombinedProgress, calculateMonetizationMarkup, calculateMonetizedCost, calculateProgress, cameraSwitchCameras, cameraSwitchEdlProblem, cameraSwitchSettingsPayload, canonicalExposedFieldKey, canonicalScene3DPlanV2Json, canonicalSourceHandle, canonicalTargetHandle, canonicalTtsProvider, canonicalVarName, canonicalizeOverrideKeys, captionFontWeightSchema, captionInputSchema, captionPlanBodyLevers, captionPlanPassThrough, captionRoutesToRemotion, captionSegmentInputSchema, centreCropToAspect, characterBoardItems, characterBucketDisplayRank, characterMentionSlug, characterMentionableAssetArrays, characterSheetRefItems, characterVariantAssetArrays, checkRefVideoDurations, cinematicCreditId, clampCameraSwitchSetting, clampChars, clampCinematicDuration, clampContentIdeasCount, clampEditPlanClipCount, clampInstagramFeaturedIndex, clampMetaAdsFeaturedIndex, clampSmartCutWindow, classifyCreativeFormat, classifyLegacyTargetHandle, classifyRefToken, cleanOrphanedItems, cleanSpeakerNames, clearImageCriticMetadata, clearVideoCriticMetadata, clearWiredVideoOverlayImageUrls, clipLookSchema, clipNotesFrom, collectAncestorRefs, collectionCapsForTier, collectionReadSince, collectionRecordHeadline, collectionRecordsDigest, combineSameLabelRefs, combineVideosPassThrough, compactWithRows, competitorScanCreditId, competitorScanCredits, competitorScanSearches, computeAggregateLanes, computeFrameFitPlan, computeScene3DPlanV2ContentHash, connectedSettingsSources, contentIdeasCreditFeature, contentIdeasCreditId, contentRecipeCreditId, countEmptyInputSkips, countRefModalityEdges, creditRangesAll, creditsToUsd, decodeProviderItem, defaultCarriedFraction, defaultEdgeOutputMode, defaultResolutionFor, defaultRoleForSource, defaultSpeakerMap, defaultVideoAspectRatio, deriveLinkedFields, deriveLottieSlotFields, deriveSlotRefs, describeAudioSyncOffsetIssue, describeEdgeBehavior, describeMaskRegion, describeNodeAdjustments, describeSlotControl, describeSpeakerTracks, detectVideoLinkPlatform, dialogueHasLever, dialogueProviderOf, dialogueStabilityAccepted, dialogueSupportsTimestamps, dropUnknownBindings, dropUnknownSpeakers, durationsByMode, editPlanBasis, editPlanBucketMinutes, editPlanResultPatch, editPlanSavedOutput, editPlanSourceDurationSec, editPlanTranscriptOrigin, edlDurationMs, edlSegmentOutputStarts, edlSpanKey, edlSpeakerSpace, effectiveContentModel, effectiveReasoningEffort, encodeProviderItem, ensureLocaleCatalogLoaded, entityHydrationColumns, entityMentionSlug, entityMentionSlugForRef, entityScalarFields, entitySlotSchema, entryMatchesQuery, estimateCombineVideosCredits, estimateFilmCredits, estimateLoopTrimAddonCredits, estimateLoopVideoCredits, estimateScriptDurationSec, estimateSheetCost, estimateTrimVideoCredits, evaluateCondition, evaluateConditionGroup, evaluateJsonExpression, evaluateJsonPath, executionOutcome, expandExtraRefsToConnectedReferences, expandItemsWithRepeat, expandVideoOverlayLayer, expandVideoOverlayPresets, extractAllGeneratedResults, extractCharacterLoraFields, extractGeneratedJsonAsList, extractPresetData, extractReferencedLabels, extractVideoDurationFromNode, fanOutItemMeta, fanOutTextFeedsPrompt, fanOutUrlItemIsText, featuredInstagramOutputs, featuredMetaAdOutputs, fieldKeyFromHandle, filterCloneNodes, findCharacterMentionTokens, findDialogueCapabilities, findEntityMentionTokens, findImageMentionTokens, findLocationMentionTokens, findRestrictedPickerValue, findSeedance2AudioOverLimit, findSegmentOverlap, findUgcLockedFields, findWordlessTranscriptFeeds, firstSightExtraRole, fitAspectRatioToModel, fitCollectionField, flattenItems, formatVideoOverlayError, getAnimal, getAnimalLabel, getAnimalPromptHint, getAnimalTerm, getAspectRatioOptions, getAudioCrossfadeCurve, getCharacterFacet, getCombineTransition, getCreditRange, getDialogueCapabilities, getDurationsForModel, getEffectiveRepeatCount, getFeaturedEntities, getFurniture, getFurnitureLabel, getInputFieldExtraKeys, getInputFieldSchema, getInputNodes, getItemSortId, getLipSyncMaxAudioSeconds, getLlmModalityCaps, getLlmModel, getLlmTier, getLocaleDirection, getMaxImagePromptChars, getMaxNegativePromptChars, getMaxSunoPromptChars, getMaxSunoStyleChars, getMaxTtsChars, getMaxVideoPromptChars, getModel, getNodeLabel, getNodeResult, getOutputNodes, getOutputType, getParameterValue, getQualityOptions, getResolutionOptions, getRouteReachableNodeIds, getSpeakerLayout, getSpeakerSwitch, getStrategy, getTargetField, getTtsCapabilities, getValidValues, getVehicle, getVehicleLabel, getVideoAudioCapability, getWeapon, getWeaponLabel, groupByFamily, groupByKindAndFamily, groupHandleId, groupLlmModelsByVendor, hasContiguousSegmentDurations, hasDrawableVideoOverlayBox, hasFeature, hasUrlParserHazard, hexToRgbaArray, holdsPreviewRender, hostnameMatchesAllowlist, humanizeSlotSid, imageMentionSlug, imageMentionSlugForRef, imageOverlayBillableVariants, imageOverlayCredits, imageReferenceLimit, inferMusicVideo, ingestRecordFromJson, instagramAnalysisCreditId, instagramAnalysisTierFrom, instagramPostLink, instagramRequestedCount, instagramScrapeCreditIdFromNode, instagramScrapeMode, instagramScrapeSources, instagramScrapeTier, isAggregateableType, isAutoVideoDuration, isCharacterAspectRatio, isCollectInEdge, isCollectionMedia, isCollectionUrl, isCompetitorAboutPlatform, isCronExpression, isDefaultSelectorConfig, isEdlTargetAspect, isExpandedClone, isFacebookPageUrl, isFanInEdge, isFanInNodeType, isFanOutUrlItem, isFlux2Model, isGeminiOmniProvider, isGvpSupportedProvider, isHandleInputWired, isInstagramScrapeCount, isInstagramScrapeMode, isKineticCaptionStyle, isKnownScene3DEngine, isKnownSpeakerEmphasisStyle, isLegacySunoModel, isLocationUsageMode, isMeasurableCard, isMetaAdsFormat, isMetaAdsPlatform, isMetaAdsScrapeCount, isMetaAdsScrapeMode, isMetaCdnImageUrl, isMinimaxH3Provider, isObjectAspectRatio, isOversizedScene, isPaygRetentionActive, isPerSecondLipSyncProvider, isPro3DRenderJobOutput, isPro3DRenderQuote, isPro3DRenderRenderOnly, isProjectedTriggerNodeType, isRenderNodeType, isRtlText, isScene3DAuthoringEngine, isScene3DCameraTrack, isScene3DHttpUrl, isScene3DPlan, isScene3DPlanV1, isScene3DPlanV2, isScene3DReviewUnavailableReason, isScene3DSchemaVersionSupported, isScraperActor, isSeedance2Provider, isSeedanceVideoEditProvider, isSettingsHintEdge, isSettingsHintSource, isSettingsSourceType, isSocialPost, isSocialSearchPickFrozen, isSocialVideoUrl, isTelegramAccountTriggerNamedHandle, isTemplateCategory, isTiltDirection, isUsageMode, isValidTimezone, isVeoProvider, isVideoAnalysisMixedTier, isVideoAnalysisTier, isVideoOverlayCorner, isVideoOverlayOutputAspect, isVideoOverlayPresetId, isWan3Provider, jsonResultToList, knownEntitySlugsFromRefs, knownImageSlugsFromRefs, legacyScheduleToRules, listBoardTemplates, listModels, listResultsServeHandle, listSlotSids, liveRowColumn, llmRouteDefaults, localMinuteKey, localTimeIn, locationMentionSlug, locationReferencePhotoKindLabel, locationUsageModeLabel, ltxExtendDurationSec, ltxRetakeDurationSec, mapAspectRatio, mapQuality, mapShotIntentToProviderDirectives, matchVariant, matchesCron, matchesCronField, maxSegmentSecFor, maxSegmentsFor, maxVideoDurationSec, measuredCanvasCombinations, mergeClipLook, mergeEdlSourceOffsets, mergeExposedSettings, mergeNodeInputOverrides, metaAdsAdvertisersFrom, metaAdsAnalysisCreditId, metaAdsAnalysisTier, metaAdsAnalysisTierFrom, metaAdsNodeMode, metaAdsScrapeCreditIdFromNode, metaAdsScrapeSources, metaAdsScrapeTier, metaAdsScrapeWireSources, migrateEdgeOutputMode, migrateToItems, minSegmentSecFor, minimalRatioDimensions, modelIdsByKindMode, modelToNodeTarget, modelsForInputMode, modelsWithFeature, motionGraphicsFeature, newScene3DRevisionId, nextScheduleRuns, nodeFeedsAnything, nodeStateMayCarryOutput, nonBlankCaptionText, normalizeCaptionNumericLevers, normalizeCollectionFields, normalizeCollectionMedia, normalizeDedupeKey, normalizeEdl, normalizeLottieLayers, normalizeMinimaxH3Resolution, normalizeModelInput, normalizeNodeModelParams, normalizePinterestUrl, normalizeRoleSlug, normalizeSavedPostTags, normalizeScheduleRule, normalizeScheduleRules, normalizeSpeakerTrackSetDescriptor, normalizeSpeakerTracks, normalizeTemplateCategory, normalizeTranscript, normalizeTtsNeighbourText, normalizeVideoOverlayNodes, normalizeVideoRequestParams, normalizeWan3Resolution, orderedLlmModels, outputMsToMasterMs, overlayFontById, overlayImageEffectsSchema, overlayPlatformById, overlayQrStyleSchema, overlayShapeElement, overlayShapeStyleSchema, overlayStrokeSchema, overlayTextStyleSchema, overlayVariantHandle, overlayVariantIdFromHandle, ownsItsList, parseAspectToken, parseAttributedDialogue, parseCaptionPlan, parseCharacterMentionToken, parseEditPlanMode, parseEntityMentionToken, parseGroupHandle, parseHandleId, parseImageMentionToken, parseListExpression, parseLocationMentionToken, parseNodePresetExport, parseNodeRef, parseScene3DCameraTrackJson, parseScene3DPlanV2Json, parseSpeakerEmphasisStyle, parseVideoOverlayLayerPlan, pickAiAvatarBucket, pickHeldRow, pickIds, pickLipSyncBucket, pickSocialPosts, pickSwitchXFrameTier, pickVideoAnalysisBucket, planClipKeyAt, planFanOut, planFeedEmission, planSheetGeneration, planSheetPanels, preferredInputModeForModel, presentTypes, presetApplyClearKeys, presetDataMatches, presetEntries, presetLeverClearKeys, previewGatedNodeIds, previewHorizonMs, previewStops, pricedOutputDurationSec, pricedVideoSelection, pro3DRenderCoreOutputSchema, pro3DRenderFrameUnit, pro3DRenderJobOutputSchema, pro3DRenderProducedSchemaVersion, pro3DRenderQuoteSchema, pro3DRenderReviewVerdictSchema, pro3DRenderShotStillSchema, pro3DRenderShotStills, pro3DRenderTimingOverrides, qualityOptionsByKind, readPromptAffixes, readScriptSettings, reasoningOutputFloor, refHandleCategory, referenceModalityForHandle, referenceSheetCreditId, registerCatalogSidecars, registerSidecarLoaders, remapMsThroughEdl, remapTranscriptThroughEdl, renderAnalyzedScene, renderClipKey, renderNodeOf, renderPlanBasis, renderPlanClipKey, renderPlanNodeId, renderPlanPath, renderPlanRowClipKeys, renderPlanValue, renderReadBasis, renderResultStamp, renderRunQuality, renderSentRowStamps, renderSettingsBasis, renderVideoCreditId, renderedSourceHandle, rendersAsPreview, rendersLatestBatch, rendersTranscriptJson, requiresSequenceExecution, resetCatalogSidecars, resolutionOptionsByKind, resolveAiAvatarCreditId, resolveAudioCrossfadeCurve, resolveCaptionLevers, resolveCaptionLook, resolveCharacterAspectRatio, resolveCinematicCreditId, resolveConditionValue, resolveDefaultRole, resolveDescription, resolveDialogueVoices, resolveEditPlanOutput, resolveEditPlanSources, resolveEdlSegmentSlots, resolveEffectiveSourceType, resolveEffectiveTier, resolveEntityAspect, resolveFieldMappings, resolveFrameDelivery, resolveFrameFitAspect, resolveGvpAnchorWire, resolveImageGenCreditIdentifier, resolveIndex, resolveInstagramScrapeCreditId, resolveLabel, resolveListExpression, resolveListFanOut, resolveLlmCreditId, resolveLocationFields, resolveLocationPresetCatalog, resolveLottieOverlaySrc, resolveMetaAdsScrapeCreditId, resolveMusicProvider, resolveNodeRefs, resolveNormalizedImageGen, resolveObjectAspectRatio, resolveOutputCanvas, resolvePipelineModel, resolveRelativeWindowToken, resolveScene3DAuthoringEngine, resolveScraperCreditId, resolveSelectorRefs, resolveSeparator, resolveSheetSections, resolveSlideshowTransition, resolveSourceThroughConnectedList, resolveStoredTier, resolveSwitchXCreditId, resolveTemplateCategory, resolveTopazUpscale, resolveVideoAnalysisModel, resolveVideoLinkOutput, resolveVideoModeForInputs, resolveVideoOverlayGeometry, resolveVideoProviderForMode, resolveWiredSettings, resolveXfadeName, rewriteSceneBindings, rewriteSlotTokens, rewriteSpeakerSlots, rgbaArrayToHex, roleToPhrase, rotationVec3Schema, ruleMatches, runSelector, safetyRetryPolicy, sanitizeRole, savedRenderBatch, savedRenderBatchUrls, savedRenderOutput, scaleVec3Schema, scene3DAcceptedSchemaVersionsSchema, scene3DAnchorNameSchema, scene3DAnchorSchema, scene3DAnyPlanSchema, scene3DAssetAnimationSchema, scene3DAssetIdSchema, scene3DAssetRefSchema, scene3DCameraChangesSchema, scene3DCameraKeyframeSchema, scene3DCameraSampleSchema, scene3DCameraSchema, scene3DCameraTrackIssues, scene3DCameraTrackObjectSchema, scene3DCameraTrackPlanIssues, scene3DCameraTrackSchema, scene3DClayLightingSchema, scene3DColorSchema, scene3DDeepEqual, scene3DEasingSchema, scene3DEditOperationSchema, scene3DEditOperationsSchema, scene3DEngineIdSchema, scene3DEntityAcceptsOverlay, scene3DEntityCapabilitySchema, scene3DEntityV2Schema, scene3DEntityVisualSchema, scene3DIdSchema, scene3DInputAssetSchema, scene3DInputAssetsForEngine, scene3DInputAssetsSchema, scene3DJsonByteLength, scene3DLightingChangesSchema, scene3DLightingSchema, scene3DMaterialBindingSchema, scene3DMaterialNameSchema, scene3DMaterialRoleSchema, scene3DNodeIdSchema, scene3DNodeNameSchema, scene3DObjectChangesSchema, scene3DObjectKeyframeSchema, scene3DObjectSchema, scene3DOverrideSchema, scene3DPlanIssues, scene3DPlanSchema, scene3DPlanSchemaVersion, scene3DPlanV1Issues, scene3DPlanV1ObjectSchema, scene3DPlanV1Schema, scene3DPlanV2Issues, scene3DPlanV2ObjectSchema, scene3DPlanV2Schema, scene3DPrimitiveSchema, scene3DProjectionIssues, scene3DProvenanceSchema, scene3DReferenceSchema, scene3DRenderTier, scene3DRenderTierCredits, scene3DReviewNote, scene3DReviewVerdictOf, scene3DSampleForFrame, scene3DSha256Schema, scene3DShotForFrame, scene3DShotIndexForFrame, scene3DShotSchema, scene3DUrlSchema, scene3DV2AdmissionIssues, scene3DV2EditOperationSchema, scene3DV2EditOperationsSchema, scene3DV2HierarchyDepth, scene3DV2NormalizationIssues, scene3DV2OverrideInputSchema, scene3DV2ResourceUsage, scene3DVersionTokenSchema, scene3DZodIssues, scheduleMatchesAt, scheduleOccurrences, searchModelVariants, seedance2AudioLimitSec, seedanceVideoEditCreditId, segmentDurationsFor, selectByModulo, selectByNamedKey, selectByPredicate, selectListItems, selectLoraRoutingForMentions, selectRandom, setRegisteredPersonPackFields, settingsInputAccepts, settingsInputFields, settingsProviderModels, settingsSourceForField, settingsSourceForType, settledWithLimit, signedLinkExpiresAt, sizeVec3Schema, slotVariationSchema, snapToModelDuration, socialPostDigestLine, socialPostsDigest, socialPostsFrom, socialPostsLongestVideoSec, socialSearchCount, socialSearchCountry, socialSearchCreditId, socialSearchCreditIdFromNode, socialSearchEffectiveCount, socialSearchMaxCount, socialSearchMode, socialSearchPages, socialSearchPickTop, socialSearchPlatform, socialSearchPostLink, socialSearchPostVideo, socialSearchRegion, socialSearchRequestFromNode, sortCharacterEntriesForDisplay, sortListItems, sourceRefKey, speakerLayoutAllows, speakerPresentationWarnings, speakerSwitchOverlaps, speakerTurns, speechCredits, speechPriceUnits, speechUnitCreditId, speedRampCreditId, spliceDelimitedRows, splitByLoopDelimiter, splitGeneratedItems, splitInstagramTargets, splitMetaAdsAdvertiserNames, splitMetaAdsPageUrls, spreadJsonArrayIfSingleton, stringifyPathResults, stripDerivedAnalysisFields, stripExportContent, stripStudioDraftSettings, stripStudioDraftWorkflow, stripStudioTakeVoiceRecords, stripStudioTransientSettings, stripTransientRuntimeData, stripUgcRunState, stripUnownedRefs, styleCaptionPlan, summarizeScene3DOperations, sunoCreditType, sunoModelHonoursDuration, supportedDefaultDimensions, supportsAdvancedMode, supportsAutoVideoDuration, supportsEndAnchor, supportsExtendRender, telegramAccountListeningSignature, telegramAccountTriggerOutputs, telegramFeedDigest, telegramPostsFrom, telegramSendAsOf, telegramSendDestinationOf, templateCategoryStoredValues, textToAudioBilledSeconds, textToAudioCreditId, timezoneOffsetMinutes, toConnectedReference, toConnectedReferences, toCustomVideoOverlayLayer, togglePick, transcribeLaneSupportsWordTimestamps, transcribeProvidersWithWordTimestamps, transcribeWordTimestampsRefusal, transcriptDurationSec, transcriptSpeakerLabels, tryParseJson, ttsHasLever, ttsLanguageCodes, ttsSupportsAudioTags, ttsSupportsSsmlBreaks, ttsSupportsStitching, ttsSupportsTimestamps, ugcCallToRouteBody, uiAspectRatioFill, uiDurationFill, uiResolutionFill, unresolvedRefTokens, unwrapEditPlanOutput, unwrapUnresolvedTokens, usageModeDirective, usageModeIncludesName, usageModeLabel, usdToCredits, validateAiAvatarPayload, validateCinematicAvatarPayload, validateDurationForFormat, validateEditedEdl, validateEdl, validateEdlClipSet, validateModeActivation, validateModelInput, validateNoNestedGroups, validateObjects, validateProviderForNodeType, validateSpeakerTrackSetDescriptor, validateSpeakerTracks, validateSubWorkflowRoutes, validateVideoOverlayRequest, variantJobId, vec3Schema, verifyScene3DPlanV2ContentHash, videoAnalysisCreditSegment, videoAnalysisNumWindows, videoAnalysisResultSchema, videoAuditCreditsForBucket, videoCharacterDistinctVoices, videoCharacterRefCap, videoCharacterRefProblem, videoCharacterRefProviders, videoCharacterRefUnits, videoCharacterVoiceCap, videoCharacterVoiceKey, videoCharacterVoiceProblem, videoLinkDownloadedFile, videoLinkNeedsDownload, videoLinkPageUrl, videoModelCanSpeakDialogue, videoModelSupportsAudio, videoNegativeSuffix, videoOverlayCanvas, videoOverlayCompositionKey, videoOverlayLayerLabel, videoOverlayPassThrough, videoOverlayPresetBox, videoOverlayRenderOrder, videoOverlaySlotOfHandle, videoOverlaySlotSources, videoProviderFoldsLoneEndFrame, videoProviderRequiresImage, videoSfxCreditId, windowAnalysisSchema, withRunOverrides, withWiredSettings, zipMergeLists };
|
|
21447
23374
|
//# sourceMappingURL=index.js.map
|
|
21448
23375
|
//# sourceMappingURL=index.js.map
|