@nodaro/shared 2.27.0 → 3.1.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.js CHANGED
@@ -3370,7 +3370,13 @@ var ASPECT_RATIO_DIMENSIONS = {
3370
3370
  "16:9": { width: 1920, height: 1080 },
3371
3371
  "9:16": { width: 1080, height: 1920 },
3372
3372
  "1:1": { width: 1080, height: 1080 },
3373
- "4:5": { width: 1080, height: 1350 }
3373
+ "4:5": { width: 1080, height: 1350 },
3374
+ // Ultra-wide. 1680x720 rather than a 1920-wide pair because the Scene3D v2
3375
+ // admission bounds require even integers on both axes and 1920/(21/9) is
3376
+ // odd; 1680x720 is the pair the scene contract names as supported. Additive:
3377
+ // every consumer here is a keyed lookup with a fallback, and a node only
3378
+ // reaches this entry if its own aspect enum offers 21:9 (today, Pro 3D).
3379
+ "21:9": { width: 1680, height: 720 }
3374
3380
  };
3375
3381
  var MOTION_TRANSFER_PROVIDERS = [
3376
3382
  "kling",
@@ -4136,7 +4142,11 @@ var COMPOSER_PLAN_MAP = {
4136
4142
  // validated `Scene3DPlan` revision on their `composition` handle, so
4137
4143
  // render-video routes either one to the `3d-scene` renderer unchanged.
4138
4144
  "generate-3d-scene": { planType: "3d-scene", planField: "scenePlan" },
4139
- "edit-3d-scene": { planType: "3d-scene", planField: "scenePlan" }
4145
+ "edit-3d-scene": { planType: "3d-scene", planField: "scenePlan" },
4146
+ // 3D Render Pro authors the SAME `scenePlan` revision (v2) alongside its
4147
+ // MP4, so the render-only re-run reads it through this map exactly as it
4148
+ // reads a Basic revision — no second plan lane, no second render path.
4149
+ "pro-3d-render": { planType: "3d-scene", planField: "scenePlan" }
4140
4150
  };
4141
4151
  var COMPOSER_PLAN_FIELDS = [
4142
4152
  ...new Set(Object.values(COMPOSER_PLAN_MAP).map((m) => m.planField))
@@ -5014,6 +5024,157 @@ function resolveTopazUpscale(input) {
5014
5024
  };
5015
5025
  }
5016
5026
 
5027
+ // src/producer-types.ts
5028
+ var VIDEO_PRODUCER_TYPES = /* @__PURE__ */ new Set([
5029
+ "image-to-video",
5030
+ "video-to-video",
5031
+ "switchx",
5032
+ // Beeble SwitchX relight/composite
5033
+ "text-to-video",
5034
+ // Unified video node — emits videoUrl identically to i2v/t2v (its payload-builder
5035
+ // case dispatches dynamically to "image-to-video" or "text-to-video" jobName based
5036
+ // on whether a start frame is wired). Without this, getPrimaryOutput would fall
5037
+ // through to the imageUrl/videoUrl/audioUrl/text default and downstream consumers
5038
+ // could silently misroute the output.
5039
+ "generate-video",
5040
+ // Generate Video Pro — Seedance-2-family multi-segment stitch variant of
5041
+ // generate-video (same "emits videoUrl" contract; a trimmed provider +
5042
+ // handle set). Must mirror generate-video here or its output can't connect
5043
+ // downstream (the recurring "cannot connect the outputs" bug class).
5044
+ "generate-video-pro",
5045
+ // Edit Video Pro — Seedance-2-family span-replace sibling of generate-
5046
+ // video-pro (same "emits videoUrl" contract; source video + prompt in,
5047
+ // ONE video out). Must mirror generate-video-pro here or its output can't
5048
+ // connect downstream (the recurring "cannot connect the outputs" bug class).
5049
+ "edit-video-pro",
5050
+ "upload-video",
5051
+ "youtube-video",
5052
+ "combine-videos",
5053
+ "lip-sync",
5054
+ "speech-to-video",
5055
+ "motion-transfer",
5056
+ "video-upscale",
5057
+ "extend-video",
5058
+ // face-swap output is video (writes generatedVideoUrl, per-result `url`).
5059
+ // Frontend execution-graph already includes it in VIDEO_SOURCE_TYPES; this
5060
+ // entry brings the shared set in line so canvas typed-handle validation
5061
+ // doesn't reject face-swap → video-consumer edges that the orchestrator
5062
+ // would happily route at runtime.
5063
+ "face-swap",
5064
+ "video-retake",
5065
+ // video-sfx: adds an SFX track to a video → emits a video URL. Belongs here so
5066
+ // canvas handle validation accepts video-sfx → video-consumer edges and the
5067
+ // backend routes its output as video (it was previously relying on a fallback).
5068
+ "video-sfx",
5069
+ "suno-music-video",
5070
+ "merge-video-audio",
5071
+ "add-captions",
5072
+ "resize-video",
5073
+ "social-media-format",
5074
+ "trim-video",
5075
+ "render-video",
5076
+ "speed-ramp",
5077
+ "loop-video",
5078
+ "fade-video",
5079
+ "transcode-video",
5080
+ "manual-edit",
5081
+ // Remove Audio: strips the audio track, emits a silent video.
5082
+ "remove-audio",
5083
+ // AI Avatar (HeyGen): avatar + voice/audio → video.
5084
+ "ai-avatar",
5085
+ // Cinematic Avatar (HeyGen cinematic_avatar): prompt + 1–3 avatar looks → video.
5086
+ "cinematic-avatar",
5087
+ // Assemble Narrated Video: fits N (clip, voice) blocks into one MP4 → video.
5088
+ "assemble-narrated-video",
5089
+ // Still to Video: one still image + one audio track → MP4 (local FFmpeg,
5090
+ // no provider). Emits generatedVideoUrl like every other ffmpeg video node.
5091
+ "still-to-video",
5092
+ // Slideshow: 2-100 stills + one optional audio track → MP4 (local FFmpeg,
5093
+ // no provider). Same contract; images arrive via the image-collage lane.
5094
+ "slideshow",
5095
+ // GIF to Video: animated GIF → H.264 MP4 (local FFmpeg, no provider).
5096
+ // Emits generatedVideoUrl so it connects to any downstream video consumer
5097
+ // (e.g. a Seedance video-reference input) by an ordinary edge.
5098
+ "gif-to-video",
5099
+ // 3D Render Pro: authors a scene AND exports it in one operation, settling
5100
+ // with the standard `videoUrl` field. It is a video producer as much as it
5101
+ // is a composition producer — omitting it here is the "cannot connect the
5102
+ // outputs" bug, and its `composition` handle is typed separately.
5103
+ "pro-3d-render"
5104
+ ]);
5105
+ var DYNAMIC_PRODUCER_TYPES = /* @__PURE__ */ new Set([
5106
+ "list",
5107
+ "sub-workflow",
5108
+ "adjust-volume",
5109
+ // Dual-mode: audio in → audio out; video in → video out (+ revoiced audio).
5110
+ // Listed here so canvas validators accept its output on BOTH audio and video
5111
+ // input handles (it also stays in AUDIO_PRODUCER_TYPES as its default).
5112
+ "voice-changer",
5113
+ // voice-changer-pro (renamed from voice-recast in #3581) is a behavioral
5114
+ // twin of voice-changer — identical dual-mode output. Must mirror it in
5115
+ // EVERY producer set or its outputs can't connect (was the "cannot connect
5116
+ // the outputs of voice-changer-pro" bug). Guarded by producer-types.test.ts.
5117
+ "voice-changer-pro",
5118
+ // Dubbing joined the dual-mode family with the full-surface upgrade:
5119
+ // audio in → dubbed audio; video in (or a video sourceUrl) → dubbed VIDEO
5120
+ // (+ audio sidecar). Same wiring contract as voice-changer; stays in
5121
+ // AUDIO_PRODUCER_TYPES as its default. Explicitly asserted in
5122
+ // producer-types.test.ts (the suite does not fail on omission).
5123
+ "dubbing",
5124
+ "reduce",
5125
+ // Dual-output time chunker (UI label "Split into Chunks"; type id stays
5126
+ // "split-media"): video in → video chunks, audio in → audio chunks — two
5127
+ // independent lanes on two output handles. Like voice-changer, the canvas
5128
+ // validator only sees the source NODE type, not which handle a wire leaves,
5129
+ // so it lives here to be accepted on BOTH audio and video input handles. The
5130
+ // backend routes the correct lane by sourceHandle in getPrimaryOutput
5131
+ // (output-extractor.ts); the frontend does so in extractNodeOutput.
5132
+ "split-media"
5133
+ ]);
5134
+ var AUDIO_PRODUCER_TYPES = /* @__PURE__ */ new Set([
5135
+ "text-to-speech",
5136
+ "text-to-audio",
5137
+ "generate-music",
5138
+ "upload-audio",
5139
+ "suno-generate",
5140
+ "suno-cover",
5141
+ "suno-extend",
5142
+ "suno-separate",
5143
+ "audio-separation",
5144
+ "suno-mashup",
5145
+ "suno-replace-section",
5146
+ "suno-add-instrumental",
5147
+ "suno-add-vocals",
5148
+ "suno-convert-wav",
5149
+ "suno-upload-extend",
5150
+ "trim-audio",
5151
+ "mix-audio",
5152
+ "combine-audio",
5153
+ "adjust-volume",
5154
+ "audio-fx",
5155
+ "reference-audio",
5156
+ "audio-isolation",
5157
+ "text-to-dialogue",
5158
+ "voice-changer",
5159
+ // Twin of voice-changer (see DYNAMIC_PRODUCER_TYPES note). Audio is its
5160
+ // default output mode; video mode is handled via DYNAMIC membership.
5161
+ "voice-changer-pro",
5162
+ "dubbing",
5163
+ "voice-remix",
5164
+ "voice-design",
5165
+ // Extract Audio: demuxes a video's audio track to a standalone MP3.
5166
+ "extract-audio"
5167
+ ]);
5168
+ var FAN_OUT_EACH_TYPES = /* @__PURE__ */ new Set([
5169
+ "list",
5170
+ "split-text",
5171
+ "filter-list",
5172
+ "deduplicate",
5173
+ "merge-lists",
5174
+ "sort-list",
5175
+ "selector"
5176
+ ]);
5177
+
5017
5178
  // src/presentation-utils.ts
5018
5179
  var INPUT_NODE_TYPES = /* @__PURE__ */ new Set([
5019
5180
  "text-prompt",
@@ -5191,7 +5352,7 @@ function getOutputNodes(nodes, edges, curatedOnly = true) {
5191
5352
  if (n.data.presentationOutput === true) return true;
5192
5353
  if (n.data.presentationVisible === true) {
5193
5354
  if (NON_OUTPUT_TYPES.has(n.type)) return false;
5194
- return !nodesWithOutgoing.has(n.id) || MEDIA_PRODUCING_TYPES.has(n.type);
5355
+ return !nodesWithOutgoing.has(n.id) || isMediaProducingType(n.type);
5195
5356
  }
5196
5357
  return false;
5197
5358
  }
@@ -5204,8 +5365,15 @@ function getOutputType(nodeType) {
5204
5365
  if (VIDEO_OUTPUT_TYPES.has(nodeType)) return "video";
5205
5366
  if (AUDIO_OUTPUT_TYPES.has(nodeType)) return "audio";
5206
5367
  if (TEXT_OUTPUT_TYPES.has(nodeType)) return "text";
5368
+ if (VIDEO_PRODUCER_TYPES.has(nodeType)) return "video";
5369
+ if (AUDIO_PRODUCER_TYPES.has(nodeType)) return "audio";
5207
5370
  return "data";
5208
5371
  }
5372
+ function isMediaProducingType(nodeType) {
5373
+ if (MEDIA_PRODUCING_TYPES.has(nodeType)) return true;
5374
+ const output = getOutputType(nodeType);
5375
+ return output === "image" || output === "video" || output === "audio";
5376
+ }
5209
5377
  function getNodeResult(nodeData) {
5210
5378
  const previewItems = nodeData.previewItems;
5211
5379
  if (previewItems && previewItems.length > 0) {
@@ -8774,6 +8942,7 @@ var NODE_MAPPABLE_FIELDS = {
8774
8942
  "3d-title": ["titlePrompt"],
8775
8943
  "generate-3d-scene": ["scenePrompt"],
8776
8944
  "edit-3d-scene": ["editPrompt"],
8945
+ "pro-3d-render": ["scenePrompt"],
8777
8946
  "motion-graphics": ["motionPrompt"],
8778
8947
  "generate-script": ["styleGuide"],
8779
8948
  "speech-to-video": ["prompt", "negativePrompt"],
@@ -12911,154 +13080,8 @@ function resolveAudioCrossfadeCurve(id) {
12911
13080
  return CURVES_BY_ID.get(id)?.ffmpeg ?? "tri";
12912
13081
  }
12913
13082
 
12914
- // src/producer-types.ts
12915
- var VIDEO_PRODUCER_TYPES = /* @__PURE__ */ new Set([
12916
- "image-to-video",
12917
- "video-to-video",
12918
- "switchx",
12919
- // Beeble SwitchX relight/composite
12920
- "text-to-video",
12921
- // Unified video node — emits videoUrl identically to i2v/t2v (its payload-builder
12922
- // case dispatches dynamically to "image-to-video" or "text-to-video" jobName based
12923
- // on whether a start frame is wired). Without this, getPrimaryOutput would fall
12924
- // through to the imageUrl/videoUrl/audioUrl/text default and downstream consumers
12925
- // could silently misroute the output.
12926
- "generate-video",
12927
- // Generate Video Pro — Seedance-2-family multi-segment stitch variant of
12928
- // generate-video (same "emits videoUrl" contract; a trimmed provider +
12929
- // handle set). Must mirror generate-video here or its output can't connect
12930
- // downstream (the recurring "cannot connect the outputs" bug class).
12931
- "generate-video-pro",
12932
- // Edit Video Pro — Seedance-2-family span-replace sibling of generate-
12933
- // video-pro (same "emits videoUrl" contract; source video + prompt in,
12934
- // ONE video out). Must mirror generate-video-pro here or its output can't
12935
- // connect downstream (the recurring "cannot connect the outputs" bug class).
12936
- "edit-video-pro",
12937
- "upload-video",
12938
- "youtube-video",
12939
- "combine-videos",
12940
- "lip-sync",
12941
- "speech-to-video",
12942
- "motion-transfer",
12943
- "video-upscale",
12944
- "extend-video",
12945
- // face-swap output is video (writes generatedVideoUrl, per-result `url`).
12946
- // Frontend execution-graph already includes it in VIDEO_SOURCE_TYPES; this
12947
- // entry brings the shared set in line so canvas typed-handle validation
12948
- // doesn't reject face-swap → video-consumer edges that the orchestrator
12949
- // would happily route at runtime.
12950
- "face-swap",
12951
- "video-retake",
12952
- // video-sfx: adds an SFX track to a video → emits a video URL. Belongs here so
12953
- // canvas handle validation accepts video-sfx → video-consumer edges and the
12954
- // backend routes its output as video (it was previously relying on a fallback).
12955
- "video-sfx",
12956
- "suno-music-video",
12957
- "merge-video-audio",
12958
- "add-captions",
12959
- "resize-video",
12960
- "social-media-format",
12961
- "trim-video",
12962
- "render-video",
12963
- "speed-ramp",
12964
- "loop-video",
12965
- "fade-video",
12966
- "transcode-video",
12967
- "manual-edit",
12968
- // Remove Audio: strips the audio track, emits a silent video.
12969
- "remove-audio",
12970
- // AI Avatar (HeyGen): avatar + voice/audio → video.
12971
- "ai-avatar",
12972
- // Cinematic Avatar (HeyGen cinematic_avatar): prompt + 1–3 avatar looks → video.
12973
- "cinematic-avatar",
12974
- // Assemble Narrated Video: fits N (clip, voice) blocks into one MP4 → video.
12975
- "assemble-narrated-video",
12976
- // Still to Video: one still image + one audio track → MP4 (local FFmpeg,
12977
- // no provider). Emits generatedVideoUrl like every other ffmpeg video node.
12978
- "still-to-video",
12979
- // Slideshow: 2-100 stills + one optional audio track → MP4 (local FFmpeg,
12980
- // no provider). Same contract; images arrive via the image-collage lane.
12981
- "slideshow",
12982
- // GIF to Video: animated GIF → H.264 MP4 (local FFmpeg, no provider).
12983
- // Emits generatedVideoUrl so it connects to any downstream video consumer
12984
- // (e.g. a Seedance video-reference input) by an ordinary edge.
12985
- "gif-to-video"
12986
- ]);
12987
- var DYNAMIC_PRODUCER_TYPES = /* @__PURE__ */ new Set([
12988
- "list",
12989
- "sub-workflow",
12990
- "adjust-volume",
12991
- // Dual-mode: audio in → audio out; video in → video out (+ revoiced audio).
12992
- // Listed here so canvas validators accept its output on BOTH audio and video
12993
- // input handles (it also stays in AUDIO_PRODUCER_TYPES as its default).
12994
- "voice-changer",
12995
- // voice-changer-pro (renamed from voice-recast in #3581) is a behavioral
12996
- // twin of voice-changer — identical dual-mode output. Must mirror it in
12997
- // EVERY producer set or its outputs can't connect (was the "cannot connect
12998
- // the outputs of voice-changer-pro" bug). Guarded by producer-types.test.ts.
12999
- "voice-changer-pro",
13000
- // Dubbing joined the dual-mode family with the full-surface upgrade:
13001
- // audio in → dubbed audio; video in (or a video sourceUrl) → dubbed VIDEO
13002
- // (+ audio sidecar). Same wiring contract as voice-changer; stays in
13003
- // AUDIO_PRODUCER_TYPES as its default. Explicitly asserted in
13004
- // producer-types.test.ts (the suite does not fail on omission).
13005
- "dubbing",
13006
- "reduce",
13007
- // Dual-output time chunker (UI label "Split into Chunks"; type id stays
13008
- // "split-media"): video in → video chunks, audio in → audio chunks — two
13009
- // independent lanes on two output handles. Like voice-changer, the canvas
13010
- // validator only sees the source NODE type, not which handle a wire leaves,
13011
- // so it lives here to be accepted on BOTH audio and video input handles. The
13012
- // backend routes the correct lane by sourceHandle in getPrimaryOutput
13013
- // (output-extractor.ts); the frontend does so in extractNodeOutput.
13014
- "split-media"
13015
- ]);
13016
- var AUDIO_PRODUCER_TYPES = /* @__PURE__ */ new Set([
13017
- "text-to-speech",
13018
- "text-to-audio",
13019
- "generate-music",
13020
- "upload-audio",
13021
- "suno-generate",
13022
- "suno-cover",
13023
- "suno-extend",
13024
- "suno-separate",
13025
- "audio-separation",
13026
- "suno-mashup",
13027
- "suno-replace-section",
13028
- "suno-add-instrumental",
13029
- "suno-add-vocals",
13030
- "suno-convert-wav",
13031
- "suno-upload-extend",
13032
- "trim-audio",
13033
- "mix-audio",
13034
- "combine-audio",
13035
- "adjust-volume",
13036
- "audio-fx",
13037
- "reference-audio",
13038
- "audio-isolation",
13039
- "text-to-dialogue",
13040
- "voice-changer",
13041
- // Twin of voice-changer (see DYNAMIC_PRODUCER_TYPES note). Audio is its
13042
- // default output mode; video mode is handled via DYNAMIC membership.
13043
- "voice-changer-pro",
13044
- "dubbing",
13045
- "voice-remix",
13046
- "voice-design",
13047
- // Extract Audio: demuxes a video's audio track to a standalone MP3.
13048
- "extract-audio"
13049
- ]);
13050
- var FAN_OUT_EACH_TYPES = /* @__PURE__ */ new Set([
13051
- "list",
13052
- "split-text",
13053
- "filter-list",
13054
- "deduplicate",
13055
- "merge-lists",
13056
- "sort-list",
13057
- "selector"
13058
- ]);
13059
-
13060
- // src/suno-track-sources.ts
13061
- var SUNO_TRACK_SOURCE_TYPES = /* @__PURE__ */ new Set([
13083
+ // src/suno-track-sources.ts
13084
+ var SUNO_TRACK_SOURCE_TYPES = /* @__PURE__ */ new Set([
13062
13085
  "suno-generate",
13063
13086
  "suno-cover",
13064
13087
  "suno-extend",
@@ -14863,7 +14886,7 @@ function checkKeyframeTrack(frames, durationInFrames, path, issues) {
14863
14886
  previous = kf.frame;
14864
14887
  });
14865
14888
  }
14866
- function scene3DPlanIssues(plan) {
14889
+ function scene3DPlanV1Issues(plan) {
14867
14890
  const issues = [];
14868
14891
  const seconds = plan.durationInFrames / plan.fps;
14869
14892
  if (seconds > SCENE3D_LIMITS.maxDurationSeconds) {
@@ -14951,7 +14974,7 @@ function scene3DPlanIssues(plan) {
14951
14974
  });
14952
14975
  return issues;
14953
14976
  }
14954
- var scene3DPlanSchema = z.object({
14977
+ var scene3DPlanV1ObjectSchema = z.object({
14955
14978
  planType: z.literal(SCENE3D_PLAN_TYPE),
14956
14979
  schemaVersion: z.literal(SCENE3D_SCHEMA_VERSION),
14957
14980
  revisionId: z.uuid(),
@@ -14965,11 +14988,14 @@ var scene3DPlanSchema = z.object({
14965
14988
  objects: z.array(scene3DObjectSchema).min(SCENE3D_LIMITS.minObjects).max(SCENE3D_LIMITS.maxObjects),
14966
14989
  lighting: scene3DLightingSchema,
14967
14990
  references: z.array(scene3DReferenceSchema).max(SCENE3D_LIMITS.maxReferences).optional()
14968
- }).strict().superRefine((plan, ctx) => {
14969
- for (const issue2 of scene3DPlanIssues(plan)) {
14991
+ }).strict();
14992
+ var scene3DPlanV1Schema = scene3DPlanV1ObjectSchema.superRefine((plan, ctx) => {
14993
+ for (const issue2 of scene3DPlanV1Issues(plan)) {
14970
14994
  ctx.addIssue({ code: "custom", path: issue2.path, message: issue2.message });
14971
14995
  }
14972
14996
  });
14997
+ var scene3DPlanSchema = scene3DPlanV1Schema;
14998
+ var scene3DPlanIssues = scene3DPlanV1Issues;
14973
14999
  function scene3DDeepEqual(a, b) {
14974
15000
  if (a === b) return true;
14975
15001
  if (typeof a !== typeof b) return false;
@@ -15000,8 +15026,8 @@ function newScene3DRevisionId() {
15000
15026
  const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
15001
15027
  return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
15002
15028
  }
15003
- function isScene3DPlan(value) {
15004
- return scene3DPlanSchema.safeParse(value).success;
15029
+ function isScene3DPlanV1(value) {
15030
+ return scene3DPlanV1Schema.safeParse(value).success;
15005
15031
  }
15006
15032
  var SCENE3D_PLAN_FIELD = "scenePlan";
15007
15033
  var SCENE3D_GENERATE_NODE_TYPE = "generate-3d-scene";
@@ -15070,7 +15096,7 @@ function firstIssueMessage(error) {
15070
15096
  return path ? `${path}: ${issue2.message}` : issue2.message;
15071
15097
  }
15072
15098
  function applyScene3DEditOperations(plan, operations, options = {}) {
15073
- const parsedPlan = scene3DPlanSchema.safeParse(plan);
15099
+ const parsedPlan = scene3DPlanV1Schema.safeParse(plan);
15074
15100
  if (!parsedPlan.success) {
15075
15101
  return { ok: false, code: "invalid_plan", message: `scenePlan is invalid \u2014 ${firstIssueMessage(parsedPlan.error)}` };
15076
15102
  }
@@ -15169,7 +15195,7 @@ function applyScene3DEditOperations(plan, operations, options = {}) {
15169
15195
  }
15170
15196
  next.parentRevisionId = source.revisionId;
15171
15197
  next.revisionId = options.revisionId ?? newScene3DRevisionId();
15172
- const validated = scene3DPlanSchema.safeParse(next);
15198
+ const validated = scene3DPlanV1Schema.safeParse(next);
15173
15199
  if (!validated.success) {
15174
15200
  return {
15175
15201
  ok: false,
@@ -15184,6 +15210,1274 @@ function applyScene3DEditOperations(plan, operations, options = {}) {
15184
15210
  changeSummary: summarizeScene3DOperations(ops)
15185
15211
  };
15186
15212
  }
15213
+ var SCENE3D_SCHEMA_VERSION_V2 = 2;
15214
+ var SCENE3D_SUPPORTED_SCHEMA_VERSIONS = [1, 2];
15215
+ var SCENE3D_V2_ENGINES = ["blender-cloud", "blender-local"];
15216
+ var SCENE3D_V2_LIMITS = {
15217
+ /** Both the seconds and the frame ceiling apply; neither waives the other. */
15218
+ maxDurationSeconds: 60,
15219
+ minDurationInFrames: 1,
15220
+ maxDurationInFrames: 3600,
15221
+ minFps: 15,
15222
+ maxFps: 60,
15223
+ defaultFps: 24,
15224
+ /** Even integers only — an odd axis breaks H.264 chroma subsampling. */
15225
+ minDimensionPx: 100,
15226
+ maxDimensionPx: 1920,
15227
+ minEntities: 1,
15228
+ /** SEMANTIC entities, not exported mesh nodes. */
15229
+ maxEntities: 100,
15230
+ /** Enforced during asset normalization, after decode — see
15231
+ * `scene3DV2NormalizationIssues` in `scene3d-v2-resources.ts`. */
15232
+ maxMeshNodes: 2e3,
15233
+ maxTriangles: 2e5,
15234
+ maxHierarchyDepth: 16,
15235
+ /** Decoded manifest JSON. Measured on the bytes, before `JSON.parse`. */
15236
+ maxManifestBytes: 512 * 1024,
15237
+ /** Decoded camera-track JSON. */
15238
+ maxCameraTrackBytes: 8 * 1024 * 1024,
15239
+ /** Total DECLARED bytes of the assets the renderer downloads. Compression
15240
+ * does not waive the decoded geometry limits above. */
15241
+ maxRendererAssetBytes: 64 * 1024 * 1024,
15242
+ /** A `blend-source` is a separately authorized download, never handed to the
15243
+ * browser renderer, and therefore not part of the renderer budget. */
15244
+ maxBlendSourceBytes: 512 * 1024 * 1024,
15245
+ maxAssets: 64,
15246
+ maxShots: 32,
15247
+ maxShotEntityIds: 16,
15248
+ /** v1's reference limit, unchanged until deliberately expanded. */
15249
+ maxReferences: SCENE3D_LIMITS.maxReferences,
15250
+ maxAnchorsPerEntity: 32,
15251
+ maxMaterialBindingsPerEntity: 16,
15252
+ maxOverrides: 200,
15253
+ minPosterDimensionPx: 16,
15254
+ maxPosterDimensionPx: 4096,
15255
+ maxIdLength: SCENE3D_LIMITS.maxIdLength,
15256
+ maxAssetIdLength: 128,
15257
+ maxNodeIdLength: 128,
15258
+ maxNameLength: SCENE3D_LIMITS.maxNameLength,
15259
+ maxLabelLength: SCENE3D_LIMITS.maxNameLength,
15260
+ maxMaterialNameLength: 120,
15261
+ maxVersionLength: 64,
15262
+ maxCoordinate: SCENE3D_LIMITS.maxCoordinate,
15263
+ minSize: SCENE3D_LIMITS.minSize,
15264
+ maxSize: SCENE3D_LIMITS.maxSize,
15265
+ maxIntensity: SCENE3D_LIMITS.maxIntensity
15266
+ };
15267
+ var SCENE3D_V2_OVERRIDE_OPERATION_VERSION = 1;
15268
+ var SCENE3D_GLB_EXTRAS_ENTITY_ID = "nodaroEntityId";
15269
+ var SCENE3D_GLB_EXTRAS_SUBPART_ID = "nodaroSubpartId";
15270
+ var SCENE3D_GLB_EXTRAS_MATERIAL_ROLE = "nodaroMaterialRole";
15271
+ var SCENE3D_GLB_EXTRAS_ALLOWLIST = [
15272
+ SCENE3D_GLB_EXTRAS_ENTITY_ID,
15273
+ SCENE3D_GLB_EXTRAS_SUBPART_ID,
15274
+ SCENE3D_GLB_EXTRAS_MATERIAL_ROLE
15275
+ ];
15276
+ var SCENE3D_ENTITY_ROLES = [
15277
+ "person",
15278
+ "vehicle",
15279
+ "prop",
15280
+ "environment",
15281
+ "other"
15282
+ ];
15283
+ var SCENE3D_V2_PRIMITIVES = [
15284
+ "box",
15285
+ "sphere",
15286
+ "cylinder",
15287
+ "cone",
15288
+ "plane",
15289
+ "capsule"
15290
+ ];
15291
+ var SCENE3D_ENTITY_CAPABILITIES = [
15292
+ "transform",
15293
+ "color",
15294
+ "visibility"
15295
+ ];
15296
+ var SCENE3D_DEFAULT_ENTITY_CAPABILITIES = SCENE3D_ENTITY_CAPABILITIES;
15297
+ var SCENE3D_ASSET_KINDS = [
15298
+ "glb",
15299
+ "camera-track-json",
15300
+ "poster",
15301
+ "validation-report",
15302
+ "blend-source"
15303
+ ];
15304
+ var SCENE3D_ASSET_ROLES = [
15305
+ "scene-geometry",
15306
+ "entity-geometry",
15307
+ "camera-track",
15308
+ "poster",
15309
+ "validation-report",
15310
+ "source"
15311
+ ];
15312
+ var SCENE3D_ASSET_ROLE_KINDS = {
15313
+ "scene-geometry": "glb",
15314
+ "entity-geometry": "glb",
15315
+ "camera-track": "camera-track-json",
15316
+ poster: "poster",
15317
+ "validation-report": "validation-report",
15318
+ source: "blend-source"
15319
+ };
15320
+ var SCENE3D_RENDERER_ASSET_KINDS = [
15321
+ "glb",
15322
+ "camera-track-json",
15323
+ "poster"
15324
+ ];
15325
+ var SCENE3D_PRIMITIVE_MATERIAL_ROLE = "identity";
15326
+ var SCENE3D_CLAY_LIGHTING_PRESETS = ["clay-studio-v1"];
15327
+ var scene3DAssetIdSchema = z.string().min(1).max(SCENE3D_V2_LIMITS.maxAssetIdLength).regex(/^[A-Za-z0-9][A-Za-z0-9_.:-]*$/, "assetId must be an opaque id (letters, digits, '_', '-', '.', ':')").refine((value) => !value.includes(".."), "assetId must not contain '..'");
15328
+ var scene3DNodeIdSchema = z.string().min(1).max(SCENE3D_V2_LIMITS.maxNodeIdLength).regex(/^[A-Za-z0-9][A-Za-z0-9_.:-]*$/, "node id must be an exporter-generated stable id");
15329
+ var scene3DSha256Schema = z.string().regex(/^[0-9a-f]{64}$/, "sha256 must be 64 lowercase hex characters");
15330
+ var scene3DVersionTokenSchema = z.string().min(1).max(SCENE3D_V2_LIMITS.maxVersionLength).regex(
15331
+ /^[A-Za-z0-9][A-Za-z0-9_.+-]*$/,
15332
+ "version must be a bounded token (letters, digits, '_', '-', '.', '+') \u2014 never a path or prose"
15333
+ );
15334
+ var scene3DEngineIdSchema = z.string().min(1).max(SCENE3D_V2_LIMITS.maxVersionLength).regex(/^[a-z0-9][a-z0-9-]*$/, "engine must be a lowercase slug such as blender-cloud");
15335
+ var scene3DAnchorNameSchema = scene3DIdSchema;
15336
+ var scene3DMaterialRoleSchema = scene3DIdSchema;
15337
+ var scene3DMaterialNameSchema = z.string().min(1).max(SCENE3D_V2_LIMITS.maxMaterialNameLength).regex(/^[^\u0000-\u001f\u007f]+$/, "material name must not contain control characters");
15338
+ var v2FrameSchema = z.number().int().min(0).max(SCENE3D_V2_LIMITS.maxDurationInFrames);
15339
+ var scene3DEntityCapabilitySchema = z.enum(["transform", "color", "visibility"]);
15340
+ var scene3DAnchorSchema = z.object({
15341
+ name: scene3DAnchorNameSchema,
15342
+ position: vec3Schema,
15343
+ rotation: rotationVec3Schema.optional()
15344
+ }).strict();
15345
+ var scene3DMaterialBindingSchema = z.object({
15346
+ role: scene3DMaterialRoleSchema,
15347
+ materialName: scene3DMaterialNameSchema,
15348
+ color: scene3DColorSchema.optional(),
15349
+ roughness: z.number().min(0).max(1).optional()
15350
+ }).strict();
15351
+ var scene3DAssetAnimationSchema = z.object({
15352
+ clipName: z.string().min(1).max(SCENE3D_V2_LIMITS.maxNameLength),
15353
+ startFrame: v2FrameSchema,
15354
+ endFrameExclusive: z.number().int().min(1).max(SCENE3D_V2_LIMITS.maxDurationInFrames),
15355
+ loop: z.boolean().optional()
15356
+ }).strict();
15357
+ var scene3DEntityVisualSchema = z.discriminatedUnion("kind", [
15358
+ z.object({ kind: z.literal("group") }).strict(),
15359
+ z.object({
15360
+ kind: z.literal("primitive"),
15361
+ primitive: z.enum(["box", "sphere", "cylinder", "cone", "plane", "capsule"]),
15362
+ dimensions: sizeVec3Schema,
15363
+ color: scene3DColorSchema
15364
+ }).strict(),
15365
+ z.object({
15366
+ kind: z.literal("asset"),
15367
+ assetId: scene3DAssetIdSchema,
15368
+ rootNodeId: scene3DNodeIdSchema,
15369
+ animation: scene3DAssetAnimationSchema.optional()
15370
+ }).strict()
15371
+ ]);
15372
+ var scene3DEntityV2Schema = z.object({
15373
+ id: scene3DIdSchema,
15374
+ name: z.string().min(1).max(SCENE3D_V2_LIMITS.maxNameLength),
15375
+ parentId: scene3DIdSchema.optional(),
15376
+ role: z.enum(["person", "vehicle", "prop", "environment", "other"]).optional(),
15377
+ position: vec3Schema.optional(),
15378
+ rotation: rotationVec3Schema.optional(),
15379
+ scale: scaleVec3Schema.optional(),
15380
+ identityColor: scene3DColorSchema.optional(),
15381
+ anchors: z.array(scene3DAnchorSchema).max(SCENE3D_V2_LIMITS.maxAnchorsPerEntity).optional(),
15382
+ capabilities: z.array(scene3DEntityCapabilitySchema).max(SCENE3D_ENTITY_CAPABILITIES.length).optional(),
15383
+ locks: z.array(scene3DEntityCapabilitySchema).max(SCENE3D_ENTITY_CAPABILITIES.length).optional(),
15384
+ materialBindings: z.array(scene3DMaterialBindingSchema).max(SCENE3D_V2_LIMITS.maxMaterialBindingsPerEntity).optional(),
15385
+ visual: scene3DEntityVisualSchema
15386
+ }).strict();
15387
+ var scene3DAssetRefSchema = z.object({
15388
+ assetId: scene3DAssetIdSchema,
15389
+ kind: z.enum(["glb", "camera-track-json", "poster", "validation-report", "blend-source"]),
15390
+ role: z.enum(["scene-geometry", "entity-geometry", "camera-track", "poster", "validation-report", "source"]),
15391
+ byteLength: z.number().int().min(1).max(SCENE3D_V2_LIMITS.maxBlendSourceBytes),
15392
+ sha256: scene3DSha256Schema,
15393
+ originRevisionId: z.uuid().optional()
15394
+ }).strict();
15395
+ var scene3DShotSchema = z.object({
15396
+ id: scene3DIdSchema,
15397
+ startFrame: v2FrameSchema,
15398
+ endFrameExclusive: z.number().int().min(1).max(SCENE3D_V2_LIMITS.maxDurationInFrames),
15399
+ label: z.string().min(1).max(SCENE3D_V2_LIMITS.maxLabelLength).optional(),
15400
+ subjectEntityIds: z.array(scene3DIdSchema).max(SCENE3D_V2_LIMITS.maxShotEntityIds).optional(),
15401
+ foregroundEntityIds: z.array(scene3DIdSchema).max(SCENE3D_V2_LIMITS.maxShotEntityIds).optional()
15402
+ }).strict();
15403
+ var scene3DClayLightingSchema = z.object({
15404
+ preset: z.enum(SCENE3D_CLAY_LIGHTING_PRESETS),
15405
+ ambientIntensity: z.number().min(0).max(SCENE3D_V2_LIMITS.maxIntensity),
15406
+ keyIntensity: z.number().min(0).max(SCENE3D_V2_LIMITS.maxIntensity),
15407
+ keyPosition: vec3Schema
15408
+ }).strict();
15409
+ var overrideProvenanceShape = {
15410
+ id: scene3DIdSchema,
15411
+ sourceRevisionId: z.uuid(),
15412
+ sourceContentHash: scene3DSha256Schema,
15413
+ operationVersion: z.number().int().min(1).max(255)
15414
+ };
15415
+ var scene3DOverrideSchema = z.discriminatedUnion("kind", [
15416
+ z.object({
15417
+ ...overrideProvenanceShape,
15418
+ kind: z.literal("entity-transform"),
15419
+ entityId: scene3DIdSchema,
15420
+ space: z.enum(["local", "world"]),
15421
+ position: vec3Schema.optional(),
15422
+ rotation: rotationVec3Schema.optional(),
15423
+ scale: scaleVec3Schema.optional()
15424
+ }).strict(),
15425
+ z.object({
15426
+ ...overrideProvenanceShape,
15427
+ kind: z.literal("entity-color"),
15428
+ entityId: scene3DIdSchema,
15429
+ materialRole: scene3DMaterialRoleSchema,
15430
+ color: scene3DColorSchema
15431
+ }).strict(),
15432
+ z.object({
15433
+ ...overrideProvenanceShape,
15434
+ kind: z.literal("entity-visibility"),
15435
+ entityId: scene3DIdSchema,
15436
+ visible: z.boolean()
15437
+ }).strict(),
15438
+ z.object({
15439
+ ...overrideProvenanceShape,
15440
+ kind: z.literal("camera-shot-offset"),
15441
+ shotId: scene3DIdSchema,
15442
+ positionOffset: vec3Schema.optional(),
15443
+ targetOffset: vec3Schema.optional()
15444
+ }).strict()
15445
+ ]);
15446
+ var scene3DProvenanceSchema = z.object({
15447
+ engine: scene3DEngineIdSchema,
15448
+ engineVersion: scene3DVersionTokenSchema,
15449
+ recipeVersion: scene3DVersionTokenSchema,
15450
+ compilerVersion: scene3DVersionTokenSchema,
15451
+ exporterVersion: scene3DVersionTokenSchema,
15452
+ rendererVersion: scene3DVersionTokenSchema,
15453
+ sourceRevisionId: z.uuid().optional(),
15454
+ sourceArtifactId: scene3DAssetIdSchema.optional(),
15455
+ contentHash: scene3DSha256Schema
15456
+ }).strict();
15457
+ function scene3DJsonByteLength(text) {
15458
+ return new TextEncoder().encode(text).length;
15459
+ }
15460
+ function scene3DZodIssues(error) {
15461
+ return error.issues.map((issue2) => ({ path: [...issue2.path], message: issue2.message }));
15462
+ }
15463
+ function entityCapabilities(entity) {
15464
+ return entity.capabilities ?? SCENE3D_DEFAULT_ENTITY_CAPABILITIES;
15465
+ }
15466
+ function scene3DEntityAcceptsOverlay(entity, capability2) {
15467
+ return entityCapabilities(entity).includes(capability2) && !(entity.locks ?? []).includes(capability2);
15468
+ }
15469
+ function checkEntities(plan, byId, issues) {
15470
+ const rootNodeOwners = /* @__PURE__ */ new Map();
15471
+ plan.objects.forEach((entity, index) => {
15472
+ const at = (...rest) => ["objects", index, ...rest];
15473
+ if (entity.visual.kind !== "asset") {
15474
+ for (const field of ["position", "rotation", "scale"]) {
15475
+ if (entity[field] === void 0) {
15476
+ issues.push({
15477
+ path: at(field),
15478
+ message: `entity "${entity.id}" is a ${entity.visual.kind} and must declare ${field}`
15479
+ });
15480
+ }
15481
+ }
15482
+ }
15483
+ if (entity.visual.kind === "asset") {
15484
+ const owner = rootNodeOwners.get(entity.visual.rootNodeId);
15485
+ if (owner !== void 0) {
15486
+ issues.push({
15487
+ path: at("visual", "rootNodeId"),
15488
+ message: `root node "${entity.visual.rootNodeId}" is already the root of entity "${owner}"`
15489
+ });
15490
+ } else {
15491
+ rootNodeOwners.set(entity.visual.rootNodeId, entity.id);
15492
+ }
15493
+ const animation = entity.visual.animation;
15494
+ if (animation) {
15495
+ if (animation.endFrameExclusive <= animation.startFrame) {
15496
+ issues.push({
15497
+ path: at("visual", "animation", "endFrameExclusive"),
15498
+ message: `entity "${entity.id}" animation ends at or before it starts`
15499
+ });
15500
+ }
15501
+ if (animation.endFrameExclusive > plan.durationInFrames) {
15502
+ issues.push({
15503
+ path: at("visual", "animation", "endFrameExclusive"),
15504
+ message: `entity "${entity.id}" animation runs past the scene (${plan.durationInFrames} frames)`
15505
+ });
15506
+ }
15507
+ }
15508
+ } else if (entity.materialBindings && entity.materialBindings.length > 0) {
15509
+ issues.push({
15510
+ path: at("materialBindings"),
15511
+ message: `entity "${entity.id}" is a ${entity.visual.kind}; material bindings name materials in an asset root`
15512
+ });
15513
+ }
15514
+ const roles = /* @__PURE__ */ new Set();
15515
+ (entity.materialBindings ?? []).forEach((binding, bindingIndex) => {
15516
+ if (roles.has(binding.role)) {
15517
+ issues.push({
15518
+ path: at("materialBindings", bindingIndex, "role"),
15519
+ message: `entity "${entity.id}" binds material role "${binding.role}" twice`
15520
+ });
15521
+ }
15522
+ roles.add(binding.role);
15523
+ });
15524
+ const anchorNames = /* @__PURE__ */ new Set();
15525
+ (entity.anchors ?? []).forEach((anchor, anchorIndex) => {
15526
+ if (anchorNames.has(anchor.name)) {
15527
+ issues.push({
15528
+ path: at("anchors", anchorIndex, "name"),
15529
+ message: `entity "${entity.id}" declares anchor "${anchor.name}" twice`
15530
+ });
15531
+ }
15532
+ anchorNames.add(anchor.name);
15533
+ });
15534
+ });
15535
+ plan.objects.forEach((entity, index) => {
15536
+ if (entity.parentId === void 0) return;
15537
+ if (entity.parentId === entity.id) {
15538
+ issues.push({ path: ["objects", index, "parentId"], message: `entity "${entity.id}" cannot parent itself` });
15539
+ return;
15540
+ }
15541
+ if (!byId.has(entity.parentId)) {
15542
+ issues.push({
15543
+ path: ["objects", index, "parentId"],
15544
+ message: `entity "${entity.id}" references unknown parent "${entity.parentId}"`
15545
+ });
15546
+ return;
15547
+ }
15548
+ const seen = /* @__PURE__ */ new Set([entity.id]);
15549
+ let cursor = byId.get(entity.parentId);
15550
+ let depth = 1;
15551
+ while (cursor) {
15552
+ if (seen.has(cursor.id)) {
15553
+ issues.push({ path: ["objects", index, "parentId"], message: `parent cycle through entity "${cursor.id}"` });
15554
+ break;
15555
+ }
15556
+ seen.add(cursor.id);
15557
+ depth += 1;
15558
+ if (depth > SCENE3D_V2_LIMITS.maxHierarchyDepth) {
15559
+ issues.push({
15560
+ path: ["objects", index, "parentId"],
15561
+ message: `hierarchy deeper than ${SCENE3D_V2_LIMITS.maxHierarchyDepth} levels`
15562
+ });
15563
+ break;
15564
+ }
15565
+ cursor = cursor.parentId === void 0 ? void 0 : byId.get(cursor.parentId);
15566
+ }
15567
+ });
15568
+ }
15569
+ function checkAssets(plan, assetsById, issues) {
15570
+ let rendererBytes = 0;
15571
+ let sourceCount = 0;
15572
+ plan.assets.forEach((asset, index) => {
15573
+ const at = (...rest) => ["assets", index, ...rest];
15574
+ const expectedKind = SCENE3D_ASSET_ROLE_KINDS[asset.role];
15575
+ if (asset.kind !== expectedKind) {
15576
+ issues.push({
15577
+ path: at("kind"),
15578
+ message: `asset "${asset.assetId}" has role "${asset.role}", which requires kind "${expectedKind}" (got "${asset.kind}")`
15579
+ });
15580
+ }
15581
+ if (asset.kind === "camera-track-json" && asset.byteLength > SCENE3D_V2_LIMITS.maxCameraTrackBytes) {
15582
+ issues.push({
15583
+ path: at("byteLength"),
15584
+ message: `camera track "${asset.assetId}" is ${asset.byteLength} bytes; the limit is ${SCENE3D_V2_LIMITS.maxCameraTrackBytes}`
15585
+ });
15586
+ }
15587
+ if (SCENE3D_RENDERER_ASSET_KINDS.includes(asset.kind)) {
15588
+ rendererBytes += asset.byteLength;
15589
+ if (asset.byteLength > SCENE3D_V2_LIMITS.maxRendererAssetBytes) {
15590
+ issues.push({
15591
+ path: at("byteLength"),
15592
+ message: `asset "${asset.assetId}" is ${asset.byteLength} bytes; a downloaded scene asset may not exceed ${SCENE3D_V2_LIMITS.maxRendererAssetBytes}`
15593
+ });
15594
+ }
15595
+ }
15596
+ if (asset.kind === "blend-source") {
15597
+ sourceCount += 1;
15598
+ if (sourceCount > 1) {
15599
+ issues.push({ path: at("kind"), message: "a revision may retain at most one blend-source asset" });
15600
+ }
15601
+ }
15602
+ });
15603
+ if (rendererBytes > SCENE3D_V2_LIMITS.maxRendererAssetBytes) {
15604
+ issues.push({
15605
+ path: ["assets"],
15606
+ message: `downloaded scene assets total ${rendererBytes} bytes; the limit is ${SCENE3D_V2_LIMITS.maxRendererAssetBytes}`
15607
+ });
15608
+ }
15609
+ const track = assetsById.get(plan.cameraTrackAssetId);
15610
+ if (!track) {
15611
+ issues.push({
15612
+ path: ["cameraTrackAssetId"],
15613
+ message: `cameraTrackAssetId "${plan.cameraTrackAssetId}" is not in assets`
15614
+ });
15615
+ } else if (track.kind !== "camera-track-json") {
15616
+ issues.push({
15617
+ path: ["cameraTrackAssetId"],
15618
+ message: `cameraTrackAssetId "${plan.cameraTrackAssetId}" is kind "${track.kind}"; a camera track must be camera-track-json`
15619
+ });
15620
+ }
15621
+ const referencedGlbs = /* @__PURE__ */ new Set();
15622
+ for (const entity of plan.objects) {
15623
+ if (entity.visual.kind === "asset") referencedGlbs.add(entity.visual.assetId);
15624
+ }
15625
+ plan.assets.forEach((asset, index) => {
15626
+ if (asset.kind === "glb" && !referencedGlbs.has(asset.assetId)) {
15627
+ issues.push({
15628
+ path: ["assets", index, "assetId"],
15629
+ message: `glb asset "${asset.assetId}" is not referenced by any entity`
15630
+ });
15631
+ }
15632
+ });
15633
+ plan.objects.forEach((entity, index) => {
15634
+ if (entity.visual.kind !== "asset") return;
15635
+ const asset = assetsById.get(entity.visual.assetId);
15636
+ if (!asset) {
15637
+ issues.push({
15638
+ path: ["objects", index, "visual", "assetId"],
15639
+ message: `entity "${entity.id}" references unknown asset "${entity.visual.assetId}"`
15640
+ });
15641
+ } else if (asset.kind !== "glb") {
15642
+ issues.push({
15643
+ path: ["objects", index, "visual", "assetId"],
15644
+ message: `entity "${entity.id}" references asset "${asset.assetId}" of kind "${asset.kind}"; geometry must be glb`
15645
+ });
15646
+ }
15647
+ });
15648
+ if (plan.provenance.sourceArtifactId !== void 0) {
15649
+ const source = assetsById.get(plan.provenance.sourceArtifactId);
15650
+ if (!source) {
15651
+ issues.push({
15652
+ path: ["provenance", "sourceArtifactId"],
15653
+ message: `sourceArtifactId "${plan.provenance.sourceArtifactId}" is not in assets`
15654
+ });
15655
+ } else if (source.kind !== "blend-source") {
15656
+ issues.push({
15657
+ path: ["provenance", "sourceArtifactId"],
15658
+ message: `sourceArtifactId "${source.assetId}" is kind "${source.kind}"; a retained source must be blend-source`
15659
+ });
15660
+ }
15661
+ }
15662
+ }
15663
+ function checkShots(plan, byId, issues) {
15664
+ const seenIds = /* @__PURE__ */ new Set();
15665
+ let expectedStart = 0;
15666
+ plan.shots.forEach((shot, index) => {
15667
+ const at = (...rest) => ["shots", index, ...rest];
15668
+ if (seenIds.has(shot.id)) {
15669
+ issues.push({ path: at("id"), message: `duplicate shot id "${shot.id}"` });
15670
+ }
15671
+ seenIds.add(shot.id);
15672
+ if (shot.endFrameExclusive <= shot.startFrame) {
15673
+ issues.push({
15674
+ path: at("endFrameExclusive"),
15675
+ message: `shot "${shot.id}" ends at or before it starts (${shot.startFrame}..${shot.endFrameExclusive})`
15676
+ });
15677
+ }
15678
+ if (shot.startFrame !== expectedStart) {
15679
+ issues.push({
15680
+ path: at("startFrame"),
15681
+ message: index === 0 ? `shots must start at frame 0 (got ${shot.startFrame})` : `shot "${shot.id}" starts at ${shot.startFrame}; the previous shot ends at ${expectedStart} \u2014 every frame belongs to exactly one shot`
15682
+ });
15683
+ }
15684
+ expectedStart = Math.max(expectedStart, shot.endFrameExclusive);
15685
+ for (const field of ["subjectEntityIds", "foregroundEntityIds"]) {
15686
+ (shot[field] ?? []).forEach((entityId, entityIndex) => {
15687
+ if (!byId.has(entityId)) {
15688
+ issues.push({
15689
+ path: at(field, entityIndex),
15690
+ message: `shot "${shot.id}" references unknown entity "${entityId}"`
15691
+ });
15692
+ }
15693
+ });
15694
+ }
15695
+ });
15696
+ const last = plan.shots[plan.shots.length - 1];
15697
+ if (last && last.endFrameExclusive !== plan.durationInFrames) {
15698
+ issues.push({
15699
+ path: ["shots", plan.shots.length - 1, "endFrameExclusive"],
15700
+ message: `shots end at frame ${last.endFrameExclusive}; the scene is ${plan.durationInFrames} frames and must be covered completely`
15701
+ });
15702
+ }
15703
+ }
15704
+ function checkOverrides(plan, byId, shotIds, issues) {
15705
+ const overrideIds = /* @__PURE__ */ new Set();
15706
+ const transformTargets = /* @__PURE__ */ new Set();
15707
+ const visibilityTargets = /* @__PURE__ */ new Set();
15708
+ const colorTargets = /* @__PURE__ */ new Set();
15709
+ const offsetTargets = /* @__PURE__ */ new Set();
15710
+ (plan.overrides ?? []).forEach((override, index) => {
15711
+ const at = (...rest) => ["overrides", index, ...rest];
15712
+ if (overrideIds.has(override.id)) {
15713
+ issues.push({ path: at("id"), message: `duplicate override id "${override.id}"` });
15714
+ }
15715
+ overrideIds.add(override.id);
15716
+ if (override.operationVersion > SCENE3D_V2_OVERRIDE_OPERATION_VERSION) {
15717
+ issues.push({
15718
+ path: at("operationVersion"),
15719
+ message: `override "${override.id}" uses operation version ${override.operationVersion}; this reader understands up to ${SCENE3D_V2_OVERRIDE_OPERATION_VERSION}`
15720
+ });
15721
+ }
15722
+ if (override.kind === "camera-shot-offset") {
15723
+ if (!shotIds.has(override.shotId)) {
15724
+ issues.push({ path: at("shotId"), message: `override "${override.id}" targets unknown shot "${override.shotId}"` });
15725
+ } else if (offsetTargets.has(override.shotId)) {
15726
+ issues.push({
15727
+ path: at("shotId"),
15728
+ message: `shot "${override.shotId}" already has a camera offset; one owner per channel`
15729
+ });
15730
+ }
15731
+ offsetTargets.add(override.shotId);
15732
+ if (override.positionOffset === void 0 && override.targetOffset === void 0) {
15733
+ issues.push({ path: at(), message: `override "${override.id}" offsets nothing` });
15734
+ }
15735
+ return;
15736
+ }
15737
+ const entity = byId.get(override.entityId);
15738
+ if (!entity) {
15739
+ issues.push({ path: at("entityId"), message: `override "${override.id}" targets unknown entity "${override.entityId}"` });
15740
+ return;
15741
+ }
15742
+ if (override.kind === "entity-transform") {
15743
+ if (transformTargets.has(override.entityId)) {
15744
+ issues.push({
15745
+ path: at("entityId"),
15746
+ message: `entity "${override.entityId}" already has a transform override; one owner per channel`
15747
+ });
15748
+ }
15749
+ transformTargets.add(override.entityId);
15750
+ if (!scene3DEntityAcceptsOverlay(entity, "transform")) {
15751
+ issues.push({
15752
+ path: at("entityId"),
15753
+ message: `entity "${override.entityId}" does not accept a transform overlay (locked or not advertised)`
15754
+ });
15755
+ }
15756
+ if (override.position === void 0 && override.rotation === void 0 && override.scale === void 0) {
15757
+ issues.push({ path: at(), message: `override "${override.id}" changes nothing` });
15758
+ }
15759
+ return;
15760
+ }
15761
+ if (override.kind === "entity-visibility") {
15762
+ if (visibilityTargets.has(override.entityId)) {
15763
+ issues.push({
15764
+ path: at("entityId"),
15765
+ message: `entity "${override.entityId}" already has a visibility override; one owner per channel`
15766
+ });
15767
+ }
15768
+ visibilityTargets.add(override.entityId);
15769
+ if (!scene3DEntityAcceptsOverlay(entity, "visibility")) {
15770
+ issues.push({
15771
+ path: at("entityId"),
15772
+ message: `entity "${override.entityId}" does not accept a visibility overlay (locked or not advertised)`
15773
+ });
15774
+ }
15775
+ return;
15776
+ }
15777
+ const key = `${override.entityId}\0${override.materialRole}`;
15778
+ if (colorTargets.has(key)) {
15779
+ issues.push({
15780
+ path: at("materialRole"),
15781
+ message: `entity "${override.entityId}" already recolours material role "${override.materialRole}"`
15782
+ });
15783
+ }
15784
+ colorTargets.add(key);
15785
+ if (!scene3DEntityAcceptsOverlay(entity, "color")) {
15786
+ issues.push({
15787
+ path: at("entityId"),
15788
+ message: `entity "${override.entityId}" does not accept a colour overlay (locked or not advertised)`
15789
+ });
15790
+ }
15791
+ if (entity.visual.kind === "group") {
15792
+ issues.push({
15793
+ path: at("materialRole"),
15794
+ message: `entity "${override.entityId}" is a group and has no geometry to recolour`
15795
+ });
15796
+ } else if (entity.visual.kind === "primitive") {
15797
+ if (override.materialRole !== SCENE3D_PRIMITIVE_MATERIAL_ROLE) {
15798
+ issues.push({
15799
+ path: at("materialRole"),
15800
+ message: `entity "${override.entityId}" is a primitive; its only material role is "${SCENE3D_PRIMITIVE_MATERIAL_ROLE}"`
15801
+ });
15802
+ }
15803
+ } else if (!(entity.materialBindings ?? []).some((binding) => binding.role === override.materialRole)) {
15804
+ issues.push({
15805
+ path: at("materialRole"),
15806
+ message: `entity "${override.entityId}" declares no material role "${override.materialRole}"; a binding may only name materials in that entity's asset root`
15807
+ });
15808
+ }
15809
+ });
15810
+ }
15811
+ function scene3DPlanV2Issues(plan) {
15812
+ const issues = [];
15813
+ const seconds = plan.durationInFrames / plan.fps;
15814
+ if (seconds > SCENE3D_V2_LIMITS.maxDurationSeconds) {
15815
+ issues.push({
15816
+ path: ["durationInFrames"],
15817
+ message: `scene is ${seconds.toFixed(2)}s; the limit is ${SCENE3D_V2_LIMITS.maxDurationSeconds}s`
15818
+ });
15819
+ }
15820
+ for (const axis of ["width", "height"]) {
15821
+ if (plan[axis] % 2 !== 0) {
15822
+ issues.push({ path: [axis], message: `${axis} must be an even number of pixels (got ${plan[axis]})` });
15823
+ }
15824
+ }
15825
+ const byId = /* @__PURE__ */ new Map();
15826
+ plan.objects.forEach((entity, index) => {
15827
+ if (byId.has(entity.id)) {
15828
+ issues.push({ path: ["objects", index, "id"], message: `duplicate entity id "${entity.id}"` });
15829
+ return;
15830
+ }
15831
+ byId.set(entity.id, entity);
15832
+ });
15833
+ const assetsById = /* @__PURE__ */ new Map();
15834
+ plan.assets.forEach((asset, index) => {
15835
+ if (assetsById.has(asset.assetId)) {
15836
+ issues.push({ path: ["assets", index, "assetId"], message: `duplicate asset id "${asset.assetId}"` });
15837
+ return;
15838
+ }
15839
+ assetsById.set(asset.assetId, asset);
15840
+ });
15841
+ checkEntities(plan, byId, issues);
15842
+ checkAssets(plan, assetsById, issues);
15843
+ checkShots(plan, byId, issues);
15844
+ checkOverrides(plan, byId, new Set(plan.shots.map((shot) => shot.id)), issues);
15845
+ const referenceIds = /* @__PURE__ */ new Set();
15846
+ (plan.references ?? []).forEach((reference, index) => {
15847
+ if (referenceIds.has(reference.id)) {
15848
+ issues.push({ path: ["references", index, "id"], message: `duplicate reference id "${reference.id}"` });
15849
+ }
15850
+ referenceIds.add(reference.id);
15851
+ if (reference.objectId !== void 0 && !byId.has(reference.objectId)) {
15852
+ issues.push({
15853
+ path: ["references", index, "objectId"],
15854
+ message: `reference "${reference.id}" points at unknown entity "${reference.objectId}"`
15855
+ });
15856
+ }
15857
+ if (reference.startSeconds !== void 0 && reference.endSeconds !== void 0 && reference.endSeconds <= reference.startSeconds) {
15858
+ issues.push({
15859
+ path: ["references", index, "endSeconds"],
15860
+ message: `reference "${reference.id}" ends at or before it starts`
15861
+ });
15862
+ }
15863
+ if (reference.kind === "image" && (reference.startSeconds !== void 0 || reference.endSeconds !== void 0)) {
15864
+ issues.push({
15865
+ path: ["references", index, "startSeconds"],
15866
+ message: `reference "${reference.id}" is an image; a time window applies to video only`
15867
+ });
15868
+ }
15869
+ });
15870
+ return issues;
15871
+ }
15872
+ var scene3DPlanV2ObjectSchema = z.object({
15873
+ planType: z.literal(SCENE3D_PLAN_TYPE),
15874
+ schemaVersion: z.literal(SCENE3D_SCHEMA_VERSION_V2),
15875
+ revisionId: z.uuid(),
15876
+ parentRevisionId: z.uuid().optional(),
15877
+ width: z.number().int().min(SCENE3D_V2_LIMITS.minDimensionPx).max(SCENE3D_V2_LIMITS.maxDimensionPx),
15878
+ height: z.number().int().min(SCENE3D_V2_LIMITS.minDimensionPx).max(SCENE3D_V2_LIMITS.maxDimensionPx),
15879
+ fps: z.number().int().min(SCENE3D_V2_LIMITS.minFps).max(SCENE3D_V2_LIMITS.maxFps),
15880
+ durationInFrames: z.number().int().min(SCENE3D_V2_LIMITS.minDurationInFrames).max(SCENE3D_V2_LIMITS.maxDurationInFrames),
15881
+ units: z.literal("meters"),
15882
+ upAxis: z.literal("Y"),
15883
+ handedness: z.literal("right"),
15884
+ objects: z.array(scene3DEntityV2Schema).min(SCENE3D_V2_LIMITS.minEntities).max(SCENE3D_V2_LIMITS.maxEntities),
15885
+ assets: z.array(scene3DAssetRefSchema).min(1).max(SCENE3D_V2_LIMITS.maxAssets),
15886
+ cameraTrackAssetId: scene3DAssetIdSchema,
15887
+ shots: z.array(scene3DShotSchema).min(1).max(SCENE3D_V2_LIMITS.maxShots),
15888
+ lighting: scene3DClayLightingSchema,
15889
+ backgroundColor: scene3DColorSchema,
15890
+ references: z.array(scene3DReferenceSchema).max(SCENE3D_V2_LIMITS.maxReferences).optional(),
15891
+ overrides: z.array(scene3DOverrideSchema).max(SCENE3D_V2_LIMITS.maxOverrides).optional(),
15892
+ provenance: scene3DProvenanceSchema
15893
+ }).strict();
15894
+ var scene3DPlanV2Schema = scene3DPlanV2ObjectSchema.superRefine((plan, ctx) => {
15895
+ for (const issue2 of scene3DPlanV2Issues(plan)) {
15896
+ ctx.addIssue({ code: "custom", path: issue2.path, message: issue2.message });
15897
+ }
15898
+ });
15899
+ var scene3DAnyPlanSchema = z.discriminatedUnion("schemaVersion", [scene3DPlanV1ObjectSchema, scene3DPlanV2ObjectSchema]).superRefine((plan, ctx) => {
15900
+ const issues = plan.schemaVersion === SCENE3D_SCHEMA_VERSION_V2 ? scene3DPlanV2Issues(plan) : scene3DPlanV1Issues(plan);
15901
+ for (const issue2 of issues) {
15902
+ ctx.addIssue({ code: "custom", path: issue2.path, message: issue2.message });
15903
+ }
15904
+ });
15905
+ var scene3DAcceptedSchemaVersionsSchema = z.array(z.union([z.literal(1), z.literal(2)])).min(1).max(SCENE3D_SUPPORTED_SCHEMA_VERSIONS.length);
15906
+ function isScene3DPlanV2(value) {
15907
+ return scene3DPlanV2Schema.safeParse(value).success;
15908
+ }
15909
+ function isScene3DPlan(value) {
15910
+ return scene3DAnyPlanSchema.safeParse(value).success;
15911
+ }
15912
+ function scene3DPlanSchemaVersion(value) {
15913
+ if (typeof value !== "object" || value === null) return null;
15914
+ const record = value;
15915
+ if (record.planType !== SCENE3D_PLAN_TYPE) return null;
15916
+ if (typeof record.schemaVersion !== "number" || !Number.isInteger(record.schemaVersion)) return null;
15917
+ return record.schemaVersion;
15918
+ }
15919
+ function isScene3DSchemaVersionSupported(version) {
15920
+ return SCENE3D_SUPPORTED_SCHEMA_VERSIONS.includes(version);
15921
+ }
15922
+ function isKnownScene3DEngine(engine) {
15923
+ return SCENE3D_V2_ENGINES.includes(engine);
15924
+ }
15925
+ function scene3DShotIndexForFrame(shots, frame) {
15926
+ for (let index = 0; index < shots.length; index++) {
15927
+ const shot = shots[index];
15928
+ if (frame >= shot.startFrame && frame < shot.endFrameExclusive) return index;
15929
+ }
15930
+ return -1;
15931
+ }
15932
+ function scene3DShotForFrame(shots, frame) {
15933
+ const index = scene3DShotIndexForFrame(shots, frame);
15934
+ return index === -1 ? void 0 : shots[index];
15935
+ }
15936
+
15937
+ // src/scene3d-v2-resources.ts
15938
+ function scene3DV2HierarchyDepth(entities) {
15939
+ const byId = new Map(entities.map((entity) => [entity.id, entity]));
15940
+ let deepest = 0;
15941
+ for (const entity of entities) {
15942
+ let depth = 1;
15943
+ let cursor = entity;
15944
+ const seen = /* @__PURE__ */ new Set([entity.id]);
15945
+ while (cursor.parentId !== void 0) {
15946
+ const parent = byId.get(cursor.parentId);
15947
+ if (!parent || seen.has(parent.id)) break;
15948
+ seen.add(parent.id);
15949
+ cursor = parent;
15950
+ depth += 1;
15951
+ }
15952
+ if (depth > deepest) deepest = depth;
15953
+ }
15954
+ return deepest;
15955
+ }
15956
+ function scene3DV2ResourceUsage(plan) {
15957
+ let rendererAssetBytes = 0;
15958
+ let cameraTrackBytes = 0;
15959
+ let blendSourceBytes = 0;
15960
+ for (const asset of plan.assets) {
15961
+ if (SCENE3D_RENDERER_ASSET_KINDS.includes(asset.kind)) rendererAssetBytes += asset.byteLength;
15962
+ if (asset.kind === "camera-track-json") cameraTrackBytes += asset.byteLength;
15963
+ if (asset.kind === "blend-source") blendSourceBytes += asset.byteLength;
15964
+ }
15965
+ return {
15966
+ entities: plan.objects.length,
15967
+ assets: plan.assets.length,
15968
+ shots: plan.shots.length,
15969
+ overrides: plan.overrides?.length ?? 0,
15970
+ references: plan.references?.length ?? 0,
15971
+ frames: plan.durationInFrames,
15972
+ durationSeconds: plan.durationInFrames / plan.fps,
15973
+ hierarchyDepth: scene3DV2HierarchyDepth(plan.objects),
15974
+ rendererAssetBytes,
15975
+ cameraTrackBytes,
15976
+ blendSourceBytes
15977
+ };
15978
+ }
15979
+ function scene3DV2AdmissionIssues(plan, manifestBytes) {
15980
+ const issues = [];
15981
+ const usage = scene3DV2ResourceUsage(plan);
15982
+ const limits = SCENE3D_V2_LIMITS;
15983
+ if (manifestBytes !== void 0 && manifestBytes > limits.maxManifestBytes) {
15984
+ issues.push({
15985
+ path: [],
15986
+ message: `manifest is ${manifestBytes} bytes; the limit is ${limits.maxManifestBytes}`
15987
+ });
15988
+ }
15989
+ if (usage.frames > limits.maxDurationInFrames) {
15990
+ issues.push({
15991
+ path: ["durationInFrames"],
15992
+ message: `scene is ${usage.frames} frames; the limit is ${limits.maxDurationInFrames}`
15993
+ });
15994
+ }
15995
+ if (usage.durationSeconds > limits.maxDurationSeconds) {
15996
+ issues.push({
15997
+ path: ["durationInFrames"],
15998
+ message: `scene is ${usage.durationSeconds.toFixed(2)}s; the limit is ${limits.maxDurationSeconds}s`
15999
+ });
16000
+ }
16001
+ if (usage.entities > limits.maxEntities) {
16002
+ issues.push({ path: ["objects"], message: `${usage.entities} entities; the limit is ${limits.maxEntities}` });
16003
+ }
16004
+ if (usage.shots > limits.maxShots) {
16005
+ issues.push({ path: ["shots"], message: `${usage.shots} shots; the limit is ${limits.maxShots}` });
16006
+ }
16007
+ if (usage.hierarchyDepth > limits.maxHierarchyDepth) {
16008
+ issues.push({
16009
+ path: ["objects"],
16010
+ message: `hierarchy is ${usage.hierarchyDepth} deep; the limit is ${limits.maxHierarchyDepth}`
16011
+ });
16012
+ }
16013
+ if (usage.rendererAssetBytes > limits.maxRendererAssetBytes) {
16014
+ issues.push({
16015
+ path: ["assets"],
16016
+ message: `downloaded scene assets total ${usage.rendererAssetBytes} bytes; the limit is ${limits.maxRendererAssetBytes}`
16017
+ });
16018
+ }
16019
+ if (usage.cameraTrackBytes > limits.maxCameraTrackBytes) {
16020
+ issues.push({
16021
+ path: ["assets"],
16022
+ message: `camera track data totals ${usage.cameraTrackBytes} bytes; the limit is ${limits.maxCameraTrackBytes}`
16023
+ });
16024
+ }
16025
+ return issues;
16026
+ }
16027
+ function scene3DV2NormalizationIssues(plan, stats) {
16028
+ const issues = [];
16029
+ const limits = SCENE3D_V2_LIMITS;
16030
+ const declared = new Map(plan.assets.map((asset) => [asset.assetId, asset]));
16031
+ let meshNodes = 0;
16032
+ let triangles = 0;
16033
+ let rendererBytes = 0;
16034
+ stats.forEach((stat, index) => {
16035
+ const at = (...rest) => [index, ...rest];
16036
+ const asset = declared.get(stat.assetId);
16037
+ if (!asset) {
16038
+ issues.push({ path: at("assetId"), message: `asset "${stat.assetId}" is not declared in the manifest` });
16039
+ return;
16040
+ }
16041
+ if (stat.kind !== asset.kind) {
16042
+ issues.push({
16043
+ path: at("kind"),
16044
+ message: `asset "${stat.assetId}" decoded as "${stat.kind}" but the manifest declares "${asset.kind}"`
16045
+ });
16046
+ }
16047
+ if (stat.byteLength !== asset.byteLength) {
16048
+ issues.push({
16049
+ path: at("byteLength"),
16050
+ message: `asset "${stat.assetId}" is ${stat.byteLength} bytes; the manifest declares ${asset.byteLength}`
16051
+ });
16052
+ }
16053
+ if (stat.sha256 !== void 0 && stat.sha256 !== asset.sha256) {
16054
+ issues.push({
16055
+ path: at("sha256"),
16056
+ message: `asset "${stat.assetId}" digest does not match the manifest`
16057
+ });
16058
+ }
16059
+ if (SCENE3D_RENDERER_ASSET_KINDS.includes(stat.kind)) rendererBytes += stat.byteLength;
16060
+ if (stat.kind === "camera-track-json" && stat.byteLength > limits.maxCameraTrackBytes) {
16061
+ issues.push({
16062
+ path: at("byteLength"),
16063
+ message: `camera track "${stat.assetId}" decoded to ${stat.byteLength} bytes; the limit is ${limits.maxCameraTrackBytes}`
16064
+ });
16065
+ }
16066
+ meshNodes += stat.meshNodes ?? 0;
16067
+ triangles += stat.triangles ?? 0;
16068
+ if (stat.maxNodeDepth !== void 0 && stat.maxNodeDepth > limits.maxHierarchyDepth) {
16069
+ issues.push({
16070
+ path: at("maxNodeDepth"),
16071
+ message: `asset "${stat.assetId}" nests ${stat.maxNodeDepth} levels; the limit is ${limits.maxHierarchyDepth}`
16072
+ });
16073
+ }
16074
+ for (const [field, value] of [
16075
+ ["imageWidth", stat.imageWidth],
16076
+ ["imageHeight", stat.imageHeight]
16077
+ ]) {
16078
+ if (value === void 0) continue;
16079
+ if (!Number.isInteger(value) || value < limits.minPosterDimensionPx || value > limits.maxPosterDimensionPx) {
16080
+ issues.push({
16081
+ path: at(field),
16082
+ message: `asset "${stat.assetId}" ${field} is ${value}; it must be an integer between ${limits.minPosterDimensionPx} and ${limits.maxPosterDimensionPx}`
16083
+ });
16084
+ }
16085
+ }
16086
+ });
16087
+ if (meshNodes > limits.maxMeshNodes) {
16088
+ issues.push({ path: [], message: `resolved assets contain ${meshNodes} mesh nodes; the limit is ${limits.maxMeshNodes}` });
16089
+ }
16090
+ if (triangles > limits.maxTriangles) {
16091
+ issues.push({ path: [], message: `resolved assets contain ${triangles} triangles; the limit is ${limits.maxTriangles}` });
16092
+ }
16093
+ if (rendererBytes > limits.maxRendererAssetBytes) {
16094
+ issues.push({
16095
+ path: [],
16096
+ message: `downloaded scene assets decoded to ${rendererBytes} bytes; the limit is ${limits.maxRendererAssetBytes}`
16097
+ });
16098
+ }
16099
+ return issues;
16100
+ }
16101
+ function parseScene3DPlanV2Json(text) {
16102
+ const bytes = scene3DJsonByteLength(text);
16103
+ if (bytes > SCENE3D_V2_LIMITS.maxManifestBytes) {
16104
+ return {
16105
+ ok: false,
16106
+ issues: [{ path: [], message: `manifest is ${bytes} bytes; the limit is ${SCENE3D_V2_LIMITS.maxManifestBytes}` }]
16107
+ };
16108
+ }
16109
+ let decoded;
16110
+ try {
16111
+ decoded = JSON.parse(text);
16112
+ } catch {
16113
+ return { ok: false, issues: [{ path: [], message: "manifest is not valid JSON" }] };
16114
+ }
16115
+ const parsed = scene3DPlanV2Schema.safeParse(decoded);
16116
+ if (!parsed.success) return { ok: false, issues: scene3DZodIssues(parsed.error) };
16117
+ return { ok: true, value: parsed.data };
16118
+ }
16119
+ var SCENE3D_V2_CONTENT_HASH_EXCLUDED = ["revisionId", "parentRevisionId"];
16120
+ function canonicalize(value) {
16121
+ if (value === null) return "null";
16122
+ if (typeof value === "number") {
16123
+ if (!Number.isFinite(value)) throw new Error("cannot canonicalize a non-finite number");
16124
+ return JSON.stringify(value === 0 ? 0 : value);
16125
+ }
16126
+ if (typeof value === "string" || typeof value === "boolean") return JSON.stringify(value);
16127
+ if (Array.isArray(value)) return `[${value.map((item) => canonicalize(item)).join(",")}]`;
16128
+ if (typeof value === "object") {
16129
+ const record = value;
16130
+ const parts = [];
16131
+ for (const key of Object.keys(record).sort()) {
16132
+ const entry = record[key];
16133
+ if (entry === void 0) continue;
16134
+ parts.push(`${JSON.stringify(key)}:${canonicalize(entry)}`);
16135
+ }
16136
+ return `{${parts.join(",")}}`;
16137
+ }
16138
+ throw new Error(`cannot canonicalize ${typeof value}`);
16139
+ }
16140
+ function canonicalScene3DPlanV2Json(plan) {
16141
+ const { revisionId: _revisionId, parentRevisionId: _parentRevisionId, provenance, ...rest } = plan;
16142
+ const { contentHash: _contentHash, ...provenanceRest } = provenance;
16143
+ return canonicalize({ ...rest, provenance: provenanceRest });
16144
+ }
16145
+ function toHex(buffer) {
16146
+ return Array.from(new Uint8Array(buffer), (byte) => byte.toString(16).padStart(2, "0")).join("");
16147
+ }
16148
+ async function computeScene3DPlanV2ContentHash(plan) {
16149
+ const subtle = globalThis.crypto?.subtle;
16150
+ if (!subtle) throw new Error("WebCrypto SubtleCrypto is required to hash a Scene3D revision");
16151
+ const bytes = new TextEncoder().encode(canonicalScene3DPlanV2Json(plan));
16152
+ return toHex(await subtle.digest("SHA-256", bytes));
16153
+ }
16154
+ async function verifyScene3DPlanV2ContentHash(plan) {
16155
+ return await computeScene3DPlanV2ContentHash(plan) === plan.provenance.contentHash;
16156
+ }
16157
+ var SCENE3D_CAMERA_TRACK_FORMAT = "scene3d-camera-track";
16158
+ var SCENE3D_CAMERA_TRACK_VERSION = 1;
16159
+ var SCENE3D_CAMERA_TRACK_LIMITS = {
16160
+ maxJsonBytes: SCENE3D_V2_LIMITS.maxCameraTrackBytes,
16161
+ maxFrameCount: SCENE3D_V2_LIMITS.maxDurationInFrames,
16162
+ minFps: SCENE3D_V2_LIMITS.minFps,
16163
+ maxFps: SCENE3D_V2_LIMITS.maxFps,
16164
+ /** A unit quaternion off by more than this is a bug, not float noise. */
16165
+ quaternionTolerance: 1e-4,
16166
+ /** Absolute tolerance on the projection entries that must be exactly zero
16167
+ * (or exactly ∓1) in a perspective matrix. */
16168
+ projectionEpsilon: 1e-6,
16169
+ /** Relative tolerance when comparing declared near/far against the values the
16170
+ * projection matrix implies. */
16171
+ nearFarRelativeTolerance: 1e-3,
16172
+ /** Relative tolerance on `m[0]/m[5]` vs the manifest's `height/width`. */
16173
+ aspectRelativeTolerance: 1e-3,
16174
+ minNear: 1e-4,
16175
+ maxFar: 1e7
16176
+ };
16177
+ var coordinate = z.number().min(-SCENE3D_LIMITS.maxCoordinate).max(SCENE3D_LIMITS.maxCoordinate);
16178
+ var positionSchema = z.tuple([coordinate, coordinate, coordinate]);
16179
+ var scene3DCameraSampleSchema = z.object({
16180
+ position: positionSchema,
16181
+ quaternion: z.tuple([z.number(), z.number(), z.number(), z.number()]),
16182
+ projectionMatrix: z.array(z.number()).length(16),
16183
+ near: z.number().min(SCENE3D_CAMERA_TRACK_LIMITS.minNear).max(SCENE3D_CAMERA_TRACK_LIMITS.maxFar),
16184
+ far: z.number().min(SCENE3D_CAMERA_TRACK_LIMITS.minNear).max(SCENE3D_CAMERA_TRACK_LIMITS.maxFar),
16185
+ target: positionSchema.optional(),
16186
+ focalLengthMm: z.number().min(SCENE3D_LIMITS.minFocalLengthMm).max(SCENE3D_LIMITS.maxFocalLengthMm).optional()
16187
+ }).strict();
16188
+ var scene3DCameraTrackObjectSchema = z.object({
16189
+ format: z.literal(SCENE3D_CAMERA_TRACK_FORMAT),
16190
+ version: z.literal(SCENE3D_CAMERA_TRACK_VERSION),
16191
+ frameStart: z.literal(0),
16192
+ frameCount: z.number().int().min(1).max(SCENE3D_CAMERA_TRACK_LIMITS.maxFrameCount),
16193
+ fps: z.number().int().min(SCENE3D_CAMERA_TRACK_LIMITS.minFps).max(SCENE3D_CAMERA_TRACK_LIMITS.maxFps),
16194
+ samples: z.array(scene3DCameraSampleSchema).min(1).max(SCENE3D_CAMERA_TRACK_LIMITS.maxFrameCount)
16195
+ }).strict();
16196
+ function scene3DProjectionIssues(matrix, near, far, path) {
16197
+ const issues = [];
16198
+ const eps = SCENE3D_CAMERA_TRACK_LIMITS.projectionEpsilon;
16199
+ if (matrix.length !== 16) {
16200
+ issues.push({ path, message: `projection matrix must have exactly 16 entries (got ${matrix.length})` });
16201
+ return issues;
16202
+ }
16203
+ if (matrix.some((value) => !Number.isFinite(value))) {
16204
+ issues.push({ path, message: "projection matrix contains a non-finite entry" });
16205
+ return issues;
16206
+ }
16207
+ if (Math.abs(matrix[11]) < eps && Math.abs(matrix[15] - 1) < eps) {
16208
+ issues.push({
16209
+ path,
16210
+ message: "projection matrix is orthographic; only perspective cameras are supported by this schema version"
16211
+ });
16212
+ return issues;
16213
+ }
16214
+ for (const index of [1, 2, 3, 4, 6, 7, 12, 13, 15]) {
16215
+ if (Math.abs(matrix[index]) > eps) {
16216
+ issues.push({ path: [...path, index], message: `projection matrix entry ${index} must be 0 (got ${matrix[index]})` });
16217
+ }
16218
+ }
16219
+ if (Math.abs(matrix[11] + 1) > eps) {
16220
+ issues.push({ path: [...path, 11], message: `projection matrix entry 11 must be -1 for a perspective camera (got ${matrix[11]})` });
16221
+ }
16222
+ if (!(matrix[0] > 0)) {
16223
+ issues.push({ path: [...path, 0], message: `projection matrix entry 0 must be positive (got ${matrix[0]})` });
16224
+ }
16225
+ if (!(matrix[5] > 0)) {
16226
+ issues.push({ path: [...path, 5], message: `projection matrix entry 5 must be positive (got ${matrix[5]})` });
16227
+ }
16228
+ if (!(matrix[10] < 0)) {
16229
+ issues.push({ path: [...path, 10], message: `projection matrix entry 10 must be negative (got ${matrix[10]})` });
16230
+ }
16231
+ if (!(matrix[14] < 0)) {
16232
+ issues.push({ path: [...path, 14], message: `projection matrix entry 14 must be negative (got ${matrix[14]})` });
16233
+ }
16234
+ if (issues.length > 0) return issues;
16235
+ if (!(near > 0) || !(far > near)) {
16236
+ issues.push({ path, message: `near/far must satisfy 0 < near < far (got near ${near}, far ${far})` });
16237
+ return issues;
16238
+ }
16239
+ const tolerance = SCENE3D_CAMERA_TRACK_LIMITS.nearFarRelativeTolerance;
16240
+ const impliedNear = matrix[14] / (matrix[10] - 1);
16241
+ if (Math.abs(impliedNear - near) > Math.abs(near) * tolerance) {
16242
+ issues.push({
16243
+ path,
16244
+ message: `projection matrix implies near ${impliedNear.toPrecision(6)}, but the sample declares ${near}`
16245
+ });
16246
+ }
16247
+ const farDenominator = matrix[10] + 1;
16248
+ if (Math.abs(farDenominator) < eps) {
16249
+ issues.push({
16250
+ path,
16251
+ message: `projection matrix implies an infinite far plane, but the sample declares ${far}`
16252
+ });
16253
+ } else {
16254
+ const impliedFar = matrix[14] / farDenominator;
16255
+ if (Math.abs(impliedFar - far) > Math.abs(far) * tolerance) {
16256
+ issues.push({
16257
+ path,
16258
+ message: `projection matrix implies far ${impliedFar.toPrecision(6)}, but the sample declares ${far}`
16259
+ });
16260
+ }
16261
+ }
16262
+ return issues;
16263
+ }
16264
+ function scene3DCameraTrackIssues(track) {
16265
+ const issues = [];
16266
+ if (track.samples.length !== track.frameCount) {
16267
+ issues.push({
16268
+ path: ["samples"],
16269
+ message: `track declares ${track.frameCount} frames but carries ${track.samples.length} samples; exactly one sample per frame is required`
16270
+ });
16271
+ }
16272
+ const quaternionTolerance = SCENE3D_CAMERA_TRACK_LIMITS.quaternionTolerance;
16273
+ track.samples.forEach((sample, index) => {
16274
+ const [x, y, z23, w] = sample.quaternion;
16275
+ const norm = Math.sqrt(x * x + y * y + z23 * z23 + w * w);
16276
+ if (Math.abs(norm - 1) > quaternionTolerance) {
16277
+ issues.push({
16278
+ path: ["samples", index, "quaternion"],
16279
+ message: `quaternion at frame ${index} has length ${norm.toPrecision(6)}; it must be normalized`
16280
+ });
16281
+ }
16282
+ if (!(sample.far > sample.near)) {
16283
+ issues.push({
16284
+ path: ["samples", index, "far"],
16285
+ message: `frame ${index}: far (${sample.far}) must be greater than near (${sample.near})`
16286
+ });
16287
+ }
16288
+ for (const issue2 of scene3DProjectionIssues(
16289
+ sample.projectionMatrix,
16290
+ sample.near,
16291
+ sample.far,
16292
+ ["samples", index, "projectionMatrix"]
16293
+ )) {
16294
+ issues.push(issue2);
16295
+ }
16296
+ });
16297
+ return issues;
16298
+ }
16299
+ var scene3DCameraTrackSchema = scene3DCameraTrackObjectSchema.superRefine((track, ctx) => {
16300
+ for (const issue2 of scene3DCameraTrackIssues(track)) {
16301
+ ctx.addIssue({ code: "custom", path: issue2.path, message: issue2.message });
16302
+ }
16303
+ });
16304
+ function isScene3DCameraTrack(value) {
16305
+ return scene3DCameraTrackSchema.safeParse(value).success;
16306
+ }
16307
+ function scene3DCameraTrackPlanIssues(track, plan) {
16308
+ const issues = [];
16309
+ if (track.fps !== plan.fps) {
16310
+ issues.push({
16311
+ path: ["fps"],
16312
+ message: `camera track is ${track.fps} fps but the scene is ${plan.fps} fps; changing fps requires an explicit resample and a new revision`
16313
+ });
16314
+ }
16315
+ if (track.frameCount !== plan.durationInFrames) {
16316
+ issues.push({
16317
+ path: ["frameCount"],
16318
+ message: `camera track covers ${track.frameCount} frames but the scene is ${plan.durationInFrames} frames`
16319
+ });
16320
+ }
16321
+ const expected = plan.height / plan.width;
16322
+ const tolerance = SCENE3D_CAMERA_TRACK_LIMITS.aspectRelativeTolerance;
16323
+ track.samples.forEach((sample, index) => {
16324
+ const m0 = sample.projectionMatrix[0];
16325
+ const m5 = sample.projectionMatrix[5];
16326
+ if (!Number.isFinite(m0) || !Number.isFinite(m5) || m5 === 0) return;
16327
+ const actual = m0 / m5;
16328
+ if (Math.abs(actual - expected) > expected * tolerance) {
16329
+ issues.push({
16330
+ path: ["samples", index, "projectionMatrix"],
16331
+ message: `frame ${index}: projection is baked for aspect ${(1 / actual).toPrecision(6)} but the scene renders ${plan.width}\xD7${plan.height}; reprojection requires a new revision`
16332
+ });
16333
+ }
16334
+ });
16335
+ return issues;
16336
+ }
16337
+ function scene3DSampleForFrame(track, frame) {
16338
+ if (!Number.isInteger(frame) || frame < 0 || frame >= track.frameCount) return void 0;
16339
+ return track.samples[frame];
16340
+ }
16341
+ function parseScene3DCameraTrackJson(text) {
16342
+ const bytes = scene3DJsonByteLength(text);
16343
+ if (bytes > SCENE3D_CAMERA_TRACK_LIMITS.maxJsonBytes) {
16344
+ return {
16345
+ ok: false,
16346
+ issues: [
16347
+ {
16348
+ path: [],
16349
+ message: `camera track is ${bytes} bytes; the limit is ${SCENE3D_CAMERA_TRACK_LIMITS.maxJsonBytes}`
16350
+ }
16351
+ ]
16352
+ };
16353
+ }
16354
+ let decoded;
16355
+ try {
16356
+ decoded = JSON.parse(text);
16357
+ } catch {
16358
+ return { ok: false, issues: [{ path: [], message: "camera track is not valid JSON" }] };
16359
+ }
16360
+ const parsed = scene3DCameraTrackSchema.safeParse(decoded);
16361
+ if (!parsed.success) {
16362
+ return { ok: false, issues: scene3DZodIssues(parsed.error) };
16363
+ }
16364
+ return { ok: true, value: parsed.data };
16365
+ }
16366
+ var PRO3D_RENDER_NODE_TYPE = "pro-3d-render";
16367
+ var PRO3D_RENDER_LABEL = "3D Render Pro";
16368
+ var PRO3D_RENDER_CREDIT_ID = "pro-3d-render";
16369
+ var PRO3D_RENDER_ENGINES = ["blender-cloud", "blender-local"];
16370
+ var PRO3D_RENDER_DEFAULT_ENGINE = "blender-cloud";
16371
+ var PRO3D_RENDER_QUALITY_PROFILES = ["standard"];
16372
+ var PRO3D_RENDER_DEFAULT_QUALITY = "standard";
16373
+ var PRO3D_RENDER_STYLES = ["clay"];
16374
+ var PRO3D_RENDER_DEFAULT_STYLE = "clay";
16375
+ var PRO3D_RENDER_MIN_REPAIR_PASSES = 0;
16376
+ var PRO3D_RENDER_MAX_REPAIR_PASSES = 2;
16377
+ var PRO3D_RENDER_DEFAULT_REPAIR_PASSES = 2;
16378
+ var PRO3D_RENDER_ASPECT_RATIOS = ["16:9", "9:16", "1:1", "4:5", "21:9"];
16379
+ var PRO3D_RENDER_PROMPT_MAX = 8e3;
16380
+ var PRO3D_RENDER_LIMITS = {
16381
+ promptMax: PRO3D_RENDER_PROMPT_MAX,
16382
+ editPromptMax: PRO3D_RENDER_PROMPT_MAX,
16383
+ minDurationSeconds: SCENE3D_LIMITS.minDurationSeconds,
16384
+ maxDurationSeconds: SCENE3D_LIMITS.maxDurationSeconds,
16385
+ minFps: SCENE3D_LIMITS.minFps,
16386
+ maxFps: SCENE3D_LIMITS.maxFps,
16387
+ maxReferences: SCENE3D_LIMITS.maxReferences,
16388
+ /** Opaque ids the caller echoes back (quote, export, connection). */
16389
+ maxIdLength: 200,
16390
+ /** `Idempotency-Key` bounds — the platform's floor, with a ceiling so an
16391
+ * unbounded header can never reach a lookup or a database column. */
16392
+ minIdempotencyKeyLength: 8,
16393
+ maxIdempotencyKeyLength: 255
16394
+ };
16395
+ var PRO3D_RENDER_SOURCE_KINDS = ["prompt", "scene", "local-export"];
16396
+ function isPro3DRenderRenderOnly(source) {
16397
+ return source.kind === "scene" && source.editPrompt === void 0;
16398
+ }
16399
+ function pro3DRenderProducedSchemaVersion(source) {
16400
+ return source.kind === "scene" ? null : 2;
16401
+ }
16402
+ var pro3DRenderQuoteSchema = z.object({
16403
+ quoteId: z.string().min(1),
16404
+ expiresAt: z.string().min(1),
16405
+ maxCredits: z.number(),
16406
+ breakdown: z.array(
16407
+ z.object({ code: z.string(), label: z.string(), credits: z.number() }).passthrough()
16408
+ ),
16409
+ pricingVersion: z.string(),
16410
+ capabilitiesVersion: z.string(),
16411
+ normalizedInputHash: z.string().min(1)
16412
+ }).passthrough();
16413
+ function isPro3DRenderQuote(value) {
16414
+ return pro3DRenderQuoteSchema.safeParse(value).success;
16415
+ }
16416
+ var pro3DRenderJobOutputSchema = z.object({
16417
+ videoUrl: z.string().min(1),
16418
+ scenePlan: scene3DAnyPlanSchema,
16419
+ sceneRevisionId: z.string().min(1),
16420
+ posterAssetId: z.string().min(1),
16421
+ sourceArtifactId: z.string().min(1).optional(),
16422
+ validation: z.object({
16423
+ status: z.literal("passed"),
16424
+ reportAssetId: z.string().min(1),
16425
+ warnings: z.array(
16426
+ z.object({
16427
+ code: z.string(),
16428
+ message: z.string(),
16429
+ shotId: z.string().optional()
16430
+ }).passthrough()
16431
+ )
16432
+ }).passthrough(),
16433
+ renderer: z.string().min(1),
16434
+ metadata: z.object({
16435
+ width: z.number().int().positive(),
16436
+ height: z.number().int().positive(),
16437
+ fps: z.number().positive(),
16438
+ frames: z.number().int().positive(),
16439
+ duration: z.number().positive()
16440
+ }).passthrough(),
16441
+ changeSummary: z.string().optional()
16442
+ }).passthrough();
16443
+ function isPro3DRenderJobOutput(value) {
16444
+ return pro3DRenderJobOutputSchema.safeParse(value).success;
16445
+ }
16446
+ var pro3DRenderCoreOutputSchema = z.object({
16447
+ videoUrl: z.string().min(1),
16448
+ scenePlan: scene3DAnyPlanSchema
16449
+ }).passthrough();
16450
+ function buildPro3DRenderSource(input) {
16451
+ if (input.sourceMode === "scene") {
16452
+ const revisionId = input.revisionId?.trim();
16453
+ const sourceJobId = input.sourceJobId?.trim();
16454
+ if (!revisionId) {
16455
+ return { ok: false, message: "no scene to render \u2014 wire a 3D scene in, or run this node once." };
16456
+ }
16457
+ const editPrompt = input.editPrompt?.trim();
16458
+ return {
16459
+ ok: true,
16460
+ source: { kind: "scene", revisionId, ...sourceJobId ? { sourceJobId } : {}, ...editPrompt ? { editPrompt } : {} }
16461
+ };
16462
+ }
16463
+ const prompt = input.prompt?.trim();
16464
+ if (!prompt) {
16465
+ return { ok: false, message: "no brief \u2014 describe the scene, or wire a prompt in." };
16466
+ }
16467
+ const references = input.references ?? [];
16468
+ return {
16469
+ ok: true,
16470
+ source: { kind: "prompt", prompt, ...references.length > 0 ? { references } : {} }
16471
+ };
16472
+ }
16473
+ function pro3DRenderTimingOverrides(input) {
16474
+ if (input.source.kind === "scene" && !input.overrideSourceTiming) return {};
16475
+ const out = {};
16476
+ if (typeof input.durationSeconds === "number") out.durationSeconds = input.durationSeconds;
16477
+ if (typeof input.fps === "number") out.fps = input.fps;
16478
+ if (typeof input.aspectRatio === "string") out.aspectRatio = input.aspectRatio;
16479
+ return out;
16480
+ }
15187
16481
 
15188
16482
  // src/studio-transient.ts
15189
16483
  var STUDIO_TRANSIENT_KEYS = [
@@ -15231,7 +16525,218 @@ function stripStudioTransientSettings(settings) {
15231
16525
  }
15232
16526
  return { ...settings, studio: kept };
15233
16527
  }
16528
+ var scene3DV2OverrideInputSchema = z.discriminatedUnion("kind", [
16529
+ z.object({
16530
+ kind: z.literal("entity-transform"),
16531
+ entityId: scene3DIdSchema,
16532
+ space: z.enum(["local", "world"]),
16533
+ position: vec3Schema.optional(),
16534
+ rotation: rotationVec3Schema.optional(),
16535
+ scale: scaleVec3Schema.optional()
16536
+ }).strict(),
16537
+ z.object({
16538
+ kind: z.literal("entity-color"),
16539
+ entityId: scene3DIdSchema,
16540
+ materialRole: scene3DMaterialRoleSchema,
16541
+ color: scene3DColorSchema
16542
+ }).strict(),
16543
+ z.object({ kind: z.literal("entity-visibility"), entityId: scene3DIdSchema, visible: z.boolean() }).strict(),
16544
+ z.object({
16545
+ kind: z.literal("camera-shot-offset"),
16546
+ shotId: scene3DIdSchema,
16547
+ positionOffset: vec3Schema.optional(),
16548
+ targetOffset: vec3Schema.optional()
16549
+ }).strict()
16550
+ ]);
16551
+ var scene3DV2EditOperationSchema = z.discriminatedUnion("op", [
16552
+ z.object({ op: z.literal("set-override"), override: scene3DV2OverrideInputSchema }).strict(),
16553
+ z.object({ op: z.literal("remove-override"), overrideId: scene3DIdSchema }).strict()
16554
+ ]);
16555
+ var scene3DV2EditOperationsSchema = z.array(scene3DV2EditOperationSchema).min(1).max(100);
16556
+ function channel(override) {
16557
+ switch (override.kind) {
16558
+ case "entity-transform":
16559
+ return `transform:${override.entityId}`;
16560
+ case "entity-color":
16561
+ return `color:${override.entityId}:${override.materialRole}`;
16562
+ case "entity-visibility":
16563
+ return `visibility:${override.entityId}`;
16564
+ case "camera-shot-offset":
16565
+ return `camera:${override.shotId}`;
16566
+ }
16567
+ }
16568
+ function capability(override) {
16569
+ switch (override.kind) {
16570
+ case "entity-transform":
16571
+ return "transform";
16572
+ case "entity-color":
16573
+ return "color";
16574
+ case "entity-visibility":
16575
+ return "visibility";
16576
+ case "camera-shot-offset":
16577
+ return null;
16578
+ }
16579
+ }
16580
+ function lockIssue(plan, override, externalLocks) {
16581
+ if (override.kind === "camera-shot-offset") return null;
16582
+ const target = plan.objects.find((o) => o.id === override.entityId);
16583
+ if (!target) return `Unknown entity: ${override.entityId}`;
16584
+ const cap = capability(override);
16585
+ if (target.capabilities && !target.capabilities.includes(cap)) return `Entity ${target.id} does not allow ${cap} edits`;
16586
+ if (externalLocks.has(target.id) || target.locks?.includes(cap)) return `Entity ${target.id} is locked for ${cap}`;
16587
+ if (cap !== "transform" && cap !== "visibility") return null;
16588
+ const byId = new Map(plan.objects.map((entity) => [entity.id, entity]));
16589
+ for (const entity of plan.objects) {
16590
+ if (!externalLocks.has(entity.id) && !entity.locks?.includes(cap)) continue;
16591
+ let parent = entity.parentId;
16592
+ while (parent) {
16593
+ if (parent === target.id) return `Changing ${target.id} would change locked descendant ${entity.id}`;
16594
+ parent = byId.get(parent)?.parentId;
16595
+ }
16596
+ }
16597
+ return null;
16598
+ }
16599
+ async function applyScene3DV2EditOperations(input, operations, options) {
16600
+ const parsed = scene3DPlanV2Schema.safeParse(input);
16601
+ if (!parsed.success) return { ok: false, code: "invalid_plan", message: parsed.error.issues[0]?.message ?? "Invalid scene" };
16602
+ const base = parsed.data;
16603
+ if (base.revisionId !== options.expectedRevisionId || options.expectedContentHash !== void 0 && base.provenance.contentHash !== options.expectedContentHash) {
16604
+ return { ok: false, code: "stale_revision", message: "The scene changed since this edit was prepared" };
16605
+ }
16606
+ if (!await verifyScene3DPlanV2ContentHash(base)) {
16607
+ return { ok: false, code: "invalid_plan", message: "The scene content does not match its digest" };
16608
+ }
16609
+ const ops = scene3DV2EditOperationsSchema.safeParse(operations);
16610
+ if (!ops.success) return { ok: false, code: "invalid_operations", message: ops.error.issues[0]?.message ?? "Invalid edit" };
16611
+ const revisionId = options.newRevisionId ?? newScene3DRevisionId();
16612
+ if (revisionId === base.revisionId) return { ok: false, code: "invalid_operations", message: "An edit requires a new revision identity" };
16613
+ const externalLocks = new Set(options.lockedObjectIds ?? []);
16614
+ for (const id of externalLocks) {
16615
+ if (!base.objects.some((entity) => entity.id === id)) return { ok: false, code: "invalid_operations", message: `Unknown locked entity: ${id}` };
16616
+ }
16617
+ let overrides = [...base.overrides ?? []];
16618
+ for (const [index, operation] of ops.data.entries()) {
16619
+ if (operation.op === "remove-override") {
16620
+ const existing = overrides.find((override) => override.id === operation.overrideId);
16621
+ if (!existing) return { ok: false, code: "invalid_operations", message: `Unknown override: ${operation.overrideId}` };
16622
+ const issue3 = lockIssue(base, existing, externalLocks);
16623
+ if (issue3) return { ok: false, code: "locked", message: issue3 };
16624
+ overrides = overrides.filter((override) => override.id !== existing.id);
16625
+ continue;
16626
+ }
16627
+ const issue2 = lockIssue(base, operation.override, externalLocks);
16628
+ if (issue2) return { ok: false, code: "locked", message: issue2 };
16629
+ const previous = overrides.find((override) => channel(override) === channel(operation.override));
16630
+ const compatible = previous && (previous.kind !== "entity-transform" || operation.override.kind === "entity-transform" && previous.space === operation.override.space);
16631
+ const next2 = {
16632
+ ...compatible ? previous : {},
16633
+ ...operation.override,
16634
+ id: `edit-${revisionId}-${index}`,
16635
+ sourceRevisionId: base.revisionId,
16636
+ sourceContentHash: base.provenance.contentHash,
16637
+ operationVersion: SCENE3D_V2_OVERRIDE_OPERATION_VERSION
16638
+ };
16639
+ const key = channel(next2);
16640
+ overrides = [...overrides.filter((override) => channel(override) !== key), next2];
16641
+ }
16642
+ const { sourceArtifactId: _sourceArtifactId, ...provenance } = base.provenance;
16643
+ const next = {
16644
+ ...base,
16645
+ revisionId,
16646
+ parentRevisionId: base.revisionId,
16647
+ // Geometry and cameras are reused; derived images, validation and native
16648
+ // exports describe the old revision until regenerated for these overlays.
16649
+ assets: base.assets.filter((asset) => asset.kind === "glb" || asset.kind === "camera-track-json").map((asset) => ({
16650
+ ...asset,
16651
+ originRevisionId: asset.originRevisionId ?? base.revisionId
16652
+ })),
16653
+ overrides,
16654
+ provenance: { ...provenance, sourceRevisionId: base.revisionId }
16655
+ };
16656
+ const validated = scene3DPlanV2Schema.safeParse(next);
16657
+ if (!validated.success) return { ok: false, code: "invalid_operations", message: validated.error.issues[0]?.message ?? "Invalid edited scene" };
16658
+ const plan = validated.data;
16659
+ const contentHash = await computeScene3DPlanV2ContentHash(plan);
16660
+ return { ok: true, plan: { ...plan, provenance: { ...plan.provenance, contentHash } }, changeSummary: `Applied ${ops.data.length} scene edit${ops.data.length === 1 ? "" : "s"}` };
16661
+ }
16662
+
16663
+ // src/scene3d-authoring-engine.ts
16664
+ var SCENE3D_BASIC_ENGINE = "basic";
16665
+ var SCENE3D_AUTHORING_ENGINES = [SCENE3D_BASIC_ENGINE, ...SCENE3D_V2_ENGINES];
16666
+ var SCENE3D_DEFAULT_ADVANCED_ENGINE = "blender-cloud";
16667
+ function isScene3DAuthoringEngine(value) {
16668
+ return typeof value === "string" && SCENE3D_AUTHORING_ENGINES.includes(value);
16669
+ }
16670
+ function advancedFields(engine) {
16671
+ return { engine, acceptedSceneSchemaVersions: [...SCENE3D_SUPPORTED_SCHEMA_VERSIONS] };
16672
+ }
16673
+ function serves(available, engine) {
16674
+ return available === void 0 || available.includes(engine);
16675
+ }
16676
+ function planAuthoringEngine(plan) {
16677
+ const provenance = plan?.provenance;
16678
+ const engine = provenance?.engine;
16679
+ return typeof engine === "string" && isKnownScene3DEngine(engine) ? engine : void 0;
16680
+ }
16681
+ function resolveScene3DAuthoringEngine(input) {
16682
+ const requested = typeof input.requested === "string" && input.requested.trim() !== "" ? input.requested.trim() : void 0;
16683
+ if (requested !== void 0 && !isScene3DAuthoringEngine(requested)) {
16684
+ return {
16685
+ ok: false,
16686
+ code: "unknown_engine",
16687
+ message: `"${requested}" is not a 3D authoring engine \u2014 choose Basic, or an advanced engine this install offers.`
16688
+ };
16689
+ }
16690
+ const version = input.plan === void 0 ? void 0 : scene3DPlanSchemaVersion(input.plan);
16691
+ if (version !== void 0 && version !== null && !SCENE3D_SUPPORTED_SCHEMA_VERSIONS.includes(version)) {
16692
+ return {
16693
+ ok: false,
16694
+ code: "unsupported_schema_version",
16695
+ message: `This scene uses schema version ${version}, which this version of Nodaro cannot edit.`
16696
+ };
16697
+ }
16698
+ const isV2 = version === SCENE3D_SCHEMA_VERSION_V2;
16699
+ if (isV2) {
16700
+ if (requested === SCENE3D_BASIC_ENGINE) {
16701
+ return {
16702
+ ok: false,
16703
+ code: "schema_requires_advanced",
16704
+ message: "This scene was authored by an advanced engine (schema v2) and cannot be edited on the Basic engine \u2014 switch this node's engine to the advanced one."
16705
+ };
16706
+ }
16707
+ if (requested !== void 0) {
16708
+ return serves(input.availableEngines, requested) ? { ok: true, lane: "advanced", engine: requested, fields: advancedFields(requested) } : unavailable(requested);
16709
+ }
16710
+ const preferred = [];
16711
+ const authored = planAuthoringEngine(input.plan);
16712
+ if (authored) preferred.push(authored);
16713
+ if (!preferred.includes(SCENE3D_DEFAULT_ADVANCED_ENGINE)) preferred.push(SCENE3D_DEFAULT_ADVANCED_ENGINE);
16714
+ const engine2 = preferred.find((candidate) => serves(input.availableEngines, candidate));
16715
+ if (!engine2) {
16716
+ return {
16717
+ ok: false,
16718
+ code: "advanced_unavailable",
16719
+ message: "This scene needs an advanced 3D engine to edit, and this install does not have one available."
16720
+ };
16721
+ }
16722
+ return { ok: true, lane: "advanced", engine: engine2, fields: advancedFields(engine2) };
16723
+ }
16724
+ if (requested === void 0 || requested === SCENE3D_BASIC_ENGINE) {
16725
+ return { ok: true, lane: "basic", engine: void 0, fields: {} };
16726
+ }
16727
+ const engine = requested;
16728
+ if (!serves(input.availableEngines, engine)) return unavailable(engine);
16729
+ return { ok: true, lane: "advanced", engine, fields: advancedFields(engine) };
16730
+ }
16731
+ function unavailable(engine) {
16732
+ return {
16733
+ ok: false,
16734
+ code: "engine_unavailable",
16735
+ message: `The "${engine}" 3D authoring engine is not available on this install.`
16736
+ };
16737
+ }
16738
+ var SCENE3D_BASIC_SCHEMA_VERSION = SCENE3D_SCHEMA_VERSION;
15234
16739
 
15235
- export { ACCESS_LEVELS, ACTIVE_SCENE_HELPERS, ADVANCED_MODE_UNAVAILABLE_REASON, 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, 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, AddBRollResultSchema, AnchorSceneStyleResultSchema, AssetRefSchema, AuditImagesResultSchema, AuditImagesShotEntrySchema, AuditPromptIssueSchema, AuditPromptResultSchema, AvatarPayloadError, BOARD_TO_ASSET_TYPE, BOARD_TO_COLUMN, BOARD_VARIANTS, BridgeToNextSceneInputSchema, BridgeToNextSceneResultSchema, 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, COMPOSER_PLAN_FIELDS, COMPOSER_PLAN_MAP, CONTENT_TYPES_BY_PLATFORM, CREATURE_ATTACH_COLUMNS, CREDIT_BASE_USD, CREDIT_ROUNDING_RESOLUTION, CastCoverageCriticVerdictSchema, CharacterImageCriticVerdictSchema, CharacterMetadataSchema, ChatTurnResponseSchema, CriticIssueSchema, DEFAULT_AUDIO_CROSSFADE_CURVE_ID, DEFAULT_CARRIED_FRACTION, DEFAULT_CHARACTER_ANGLE_COUNT, DEFAULT_CHARACTER_EXPRESSION_COUNT, DEFAULT_CHARACTER_FACET, DEFAULT_LABEL_BY_SOURCE, DEFAULT_LOCATION_USAGE_MODE, DEFAULT_PANEL_COUNT, DEFAULT_REF_IMAGE_MAX, DEFAULT_SECTIONS, DEFAULT_USAGE_MODE, DEFAULT_VIDEO_ANALYSIS_MODEL, DEFAULT_VIDEO_ANALYSIS_TIER, DEFAULT_VIDEO_CLIP_COST, DEFAULT_VIDEO_DURATION_SEC, DEFAULT_VIDEO_PROVIDER, DEFAULT_VOICE_CHANGER_MODEL, DEFAULT_VOICE_DESIGN_MODEL, DETAIL_VARIANTS, DURATION_PRICED_PROVIDERS, DYNAMIC_PRODUCER_TYPES, DetectionResultSchema, 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, EXTEND_VIDEO_PROVIDERS, EntityMetadataSchema, EntityRejectInputSchema, EntityStaleEventSchema, EntityStateChangeEventSchema, FACE_SWAP_PROVIDERS, FAL_LIP_SYNC_PROVIDERS, FAN_OUT_EACH_TYPES, FEATURED_ENTITIES, FILM_BASE_CREDITS, FLEXIBLE_INPUT_LIP_SYNC_PROVIDERS, FLUX2_RES_MP, FLUX_LORA_CHARACTER_MODEL_ID, 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_PROMPT_MAX, IMAGE_REF_TYPES, IMAGE_TO_VIDEO_PROVIDERS, INPUT_FIELD_MAP2 as INPUT_FIELD_MAP, INPUT_NODE_TYPES, INSTAGRAM_CAROUSEL_MAX_ITEMS, INSTAGRAM_CAROUSEL_MIN_ITEMS, ITER_CLONE_PATTERN, ImageCriticIssueSchema, ImageCriticResultSchema, ImageCriticVerdictSchema, ImprovePromptInputSchema, ImprovePromptResultSchema, KEYFRAME_CREDITS_PER_SHOT, KINETIC_CAPTION_STYLES, LANGUAGES, LEGACY_LOTTIE_HOST_REMAP, 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, LocationImageCriticVerdictSchema, LocationMetadataSchema, LocationsCoverageCriticIssueSchema, LocationsCoverageCriticVerdictSchema, 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, MINIMAX_H3_DEFAULT_RESOLUTION, MINIMAX_H3_PROVIDERS, MODELS_WITH_REFERENCE_IMAGE_SUPPORT, MODEL_CATALOG, MODEL_PARAM_NODE_TYPES, MODEL_RECOMMENDATIONS, MODIFY_IMAGE_PROVIDERS, MOTION_COLUMN, MOTION_TRANSFER_PROVIDERS, MUSIC_PROVIDERS, 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, NO_SPLIT_DELIMITER, 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_FIELD_MAP, OUTPUT_FORMATS, 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_SETTING_KEYS, PRICING_DEFAULT_DURATION_SEC, PRICING_DEFAULT_RESOLUTION, 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, 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, REPEATABLE_NODE_TYPES, REPEAT_PLACEHOLDER, REPLICATE_LIP_SYNC_PROVIDERS, RESERVED_TEMPLATE_VARS, SCENE3D_DEFAULT_DURATION_SECONDS, SCENE3D_DEFAULT_FPS, SCENE3D_EDIT_NODE_TYPE, SCENE3D_GENERATE_NODE_TYPE, SCENE3D_LIMITS, SCENE3D_PLAN_FIELD, SCENE3D_PLAN_TYPE, SCENE3D_PRIMITIVES, SCENE3D_SCHEMA_VERSION, SCENE_HELPER_NAMES, SCRAPER_ACTOR_LABELS, SCRAPER_CREDIT_COSTS, SCRAPER_OUTPUT_FIELDS, SCRIPT_PROVIDERS, 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, SEED_SUPPORT, SEPARATOR_DISPLAY, SEPARATOR_PRESETS, 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_POST_NODE_TYPES, STAGE_PATCH_SCHEMA, STATIC_CAPTION_STYLES, STRUCTURAL_SECTIONS, STRUCTURED_VISION_MODELS, STUDIO_SHOT_TRANSIENT_KEYS, STUDIO_TRANSIENT_KEYS, SUBMISSION_STATUSES, SUNO_ADD_TRACK_MODELS, SUNO_FIELD_HANDLE_FIELDS, SUNO_HARD_CEILING, SUNO_MODELS, SUNO_SELECT_OPERATIONS, SUNO_TEXT_MAX, SUNO_TITLE_MAX, SUNO_TRACK_SOURCE_TYPES, SUNO_VERSION_PRICED_OPERATIONS, SUPPORTED_FONT_NAMES, SURROUND_DIRECTIONS, SWITCHX_BLOCK_FRAMES, SWITCHX_FRAME_TIERS, SceneHelperNameSchema, SceneInputModeSchema, SceneMetadataSchema, SceneNodeDataSchema, SceneSpecSchema, ScriptCriticVerdictSchema, ShotSpecSchema, ShowrunnerPlanSchema, StageAwaitingSubGateEventSchema, StoryboardCohesionCriticVerdictSchema, StyleDirectivesSchema, SubGateNameSchema, T2I_TO_I2I_VARIANT, TASK_CHAINED_EDIT_PROVIDERS, TEXT_TO_AUDIO_PROVIDERS, TEXT_TO_VIDEO_PROVIDERS, TIER_MAX_PIPELINE_COST_CREDITS, TIER_PIPELINE_PARALLELISM, TILT_CARRIED_FRACTION, TOPAZ_DEFAULT_UPSCALE_FACTOR, TOPAZ_UPSCALE_FACTORS, TRANSCRIBE_PROVIDERS, TRANSIENT_RUNTIME_KEYS, TTS_PROVIDERS, 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_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_DURATION_TIERS, VIDEO_GEN_COLLAPSED_T2V_IDS, VIDEO_GEN_PROVIDERS, VIDEO_INPUT_LIP_SYNC_PROVIDERS, VIDEO_MODEL_CAPS, VIDEO_MODE_ALIASES, 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_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, WORKFLOW_VISIBILITIES, WORKSPACE_HEADER, WORKSPACE_HEADER_LOWER, WORKSPACE_ROLES, WorkspaceSettingsSchema, aggregateByType, aiAvatarReserveCreditId, analyzedSceneSchema, applyDefaultVideoSelection, applyHandleInputOverride, applyRange, applyRangeIndices, applyScene3DEditOperations, applySlots, applyVideoAudioToggle, applyVideoNegativePrompt, aspectRatioFromDims, aspectRatioOptionsByKind, aspectRatioToNumber, assembleNarratedVideoCredits, availableReasoningEfforts, bucketSecondsFromAuditCreditId, bucketSecondsFromCreditId, buildBoardPrompt, buildChildrenByParent, buildConditionVariables, buildCreditModelIdentifier, buildExpressionFromVisual, buildLipSyncCreditId, buildLlmCreditIdentifier, buildModelMenu, buildModelTree, buildMotionCreditModelIdentifier, buildNodePresetExport, buildPanelPrompt, buildProgressSegments, buildRangeLabel, buildScraperCreditId, buildVideoAnalysisCreditId, buildVideoAuditCreditId, buildVideoCreditModelIdentifier, calculateCombinedProgress, calculateMonetizationMarkup, calculateMonetizedCost, calculateProgress, canonicalVarName, characterBoardItems, characterBucketDisplayRank, characterMentionSlug, characterMentionableAssetArrays, characterSheetRefItems, characterVariantAssetArrays, checkRefVideoDurations, cinematicCreditId, clampCinematicDuration, clampSmartCutWindow, classifyRefToken, cleanOrphanedItems, clearImageCriticMetadata, clearVideoCriticMetadata, clipLookSchema, collectAncestorRefs, combineSameLabelRefs, computeAggregateLanes, countRefModalityEdges, creditRangesAll, creditsToUsd, decodeProviderItem, defaultCarriedFraction, defaultResolutionFor, defaultRoleForSource, defaultVideoAspectRatio, deriveLinkedFields, deriveLottieSlotFields, deriveSlotRefs, describeEdgeBehavior, describeMaskRegion, describeNodeAdjustments, describeSlotControl, dropUnknownBindings, dropUnknownSpeakers, durationsByMode, effectiveReasoningEffort, encodeProviderItem, ensureLocaleCatalogLoaded, entityHydrationColumns, entityMentionSlug, entityMentionSlugForRef, entityScalarFields, entitySlotSchema, entryMatchesQuery, estimateCombineVideosCredits, estimateFilmCredits, estimateLoopTrimAddonCredits, estimateLoopVideoCredits, estimateScriptDurationSec, estimateSheetCost, estimateTrimVideoCredits, evaluateCondition, evaluateConditionGroup, evaluateJsonExpression, evaluateJsonPath, expandExtraRefsToConnectedReferences, expandItemsWithRepeat, extractAllGeneratedResults, extractCharacterLoraFields, extractGeneratedJsonAsList, extractPresetData, extractReferencedLabels, extractVideoDurationFromNode, fieldKeyFromHandle, filterCloneNodes, findCharacterMentionTokens, findEntityMentionTokens, findImageMentionTokens, findLocationMentionTokens, findSeedance2AudioOverLimit, firstSightExtraRole, flattenItems, 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, getStrategy, getTargetField, getValidValues, getVehicle, getVehicleLabel, getVideoAudioCapability, getWeapon, getWeaponLabel, groupByFamily, groupHandleId, groupLlmModelsByVendor, hasContiguousSegmentDurations, hasFeature, hexToRgbaArray, humanizeSlotSid, imageMentionSlug, imageMentionSlugForRef, imageReferenceLimit, inferMusicVideo, isAggregateableType, isCharacterAspectRatio, isCollectInEdge, isDefaultSelectorConfig, isExpandedClone, isFlux2Model, isGeminiOmniProvider, isGvpSupportedProvider, isHandleInputWired, isKineticCaptionStyle, isLocationUsageMode, isMinimaxH3Provider, isObjectAspectRatio, isOversizedScene, isPaygRetentionActive, isPerSecondLipSyncProvider, isScene3DHttpUrl, isScene3DPlan, isScraperActor, isSeedance2Provider, isTiltDirection, isUsageMode, isVeoProvider, isVideoAnalysisMixedTier, isVideoAnalysisTier, isWan3Provider, jsonResultToList, knownEntitySlugsFromRefs, knownImageSlugsFromRefs, listBoardTemplates, listModels, listSlotSids, llmRouteDefaults, locationMentionSlug, locationReferencePhotoKindLabel, locationUsageModeLabel, mapAspectRatio, mapQuality, mapShotIntentToProviderDirectives, matchVariant, maxSegmentSecFor, maxSegmentsFor, mergeClipLook, mergeExposedSettings, migrateEdgeOutputMode, migrateToItems, minSegmentSecFor, modelIdsByKindMode, modelToNodeTarget, modelsForInputMode, modelsWithFeature, motionGraphicsFeature, newScene3DRevisionId, normalizeLottieLayers, normalizeMinimaxH3Resolution, normalizeModelInput, normalizeNodeModelParams, normalizePinterestUrl, normalizeRoleSlug, normalizeVideoRequestParams, normalizeWan3Resolution, orderedLlmModels, parseAttributedDialogue, parseCharacterMentionToken, parseEntityMentionToken, parseGroupHandle, parseHandleId, parseImageMentionToken, parseListExpression, parseLocationMentionToken, parseNodePresetExport, parseNodeRef, pickAiAvatarBucket, pickIds, pickLipSyncBucket, pickSwitchXFrameTier, pickVideoAnalysisBucket, planSheetGeneration, planSheetPanels, preferredInputModeForModel, presentTypes, presetApplyClearKeys, presetDataMatches, presetEntries, pricedVideoSelection, qualityOptionsByKind, readPromptAffixes, refHandleCategory, referenceModalityForHandle, referenceSheetCreditId, registerCatalogSidecars, registerSidecarLoaders, renderAnalyzedScene, resetCatalogSidecars, resolutionOptionsByKind, resolveAiAvatarCreditId, resolveAudioCrossfadeCurve, resolveCharacterAspectRatio, resolveCinematicCreditId, resolveConditionValue, resolveDefaultRole, resolveDescription, resolveDialogueVoices, resolveEffectiveSourceType, resolveEffectiveTier, resolveEntityAspect, resolveFieldMappings, resolveGvpAnchorWire, resolveImageGenCreditIdentifier, resolveIndex, resolveLabel, resolveListExpression, resolveLlmCreditId, resolveLocationFields, resolveLocationPresetCatalog, resolveLottieOverlaySrc, resolveNodeRefs, resolveNormalizedImageGen, resolveObjectAspectRatio, resolvePipelineModel, resolveRelativeWindowToken, resolveScraperCreditId, resolveSelectorRefs, resolveSeparator, resolveSheetSections, resolveSlideshowTransition, resolveSourceThroughConnectedList, resolveStoredTier, resolveSwitchXCreditId, resolveTopazUpscale, resolveVideoAnalysisModel, resolveVideoModeForInputs, resolveVideoProviderForMode, resolveXfadeName, rewriteSceneBindings, rewriteSlotTokens, rewriteSpeakerSlots, rgbaArrayToHex, roleToPhrase, rotationVec3Schema, runSelector, safetyRetryPolicy, sanitizeRole, scaleVec3Schema, scene3DCameraChangesSchema, scene3DCameraKeyframeSchema, scene3DCameraSchema, scene3DColorSchema, scene3DDeepEqual, scene3DEasingSchema, scene3DEditOperationSchema, scene3DEditOperationsSchema, scene3DIdSchema, scene3DLightingChangesSchema, scene3DLightingSchema, scene3DObjectChangesSchema, scene3DObjectKeyframeSchema, scene3DObjectSchema, scene3DPlanIssues, scene3DPlanSchema, scene3DPrimitiveSchema, scene3DReferenceSchema, scene3DUrlSchema, searchModelVariants, seedance2AudioLimitSec, segmentDurationsFor, selectByModulo, selectByNamedKey, selectByPredicate, selectListItems, selectLoraRoutingForMentions, selectRandom, setRegisteredPersonPackFields, settledWithLimit, sizeVec3Schema, slotVariationSchema, sortCharacterEntriesForDisplay, sortListItems, sourceRefKey, spliceDelimitedRows, splitByLoopDelimiter, splitGeneratedItems, spreadJsonArrayIfSingleton, stringifyPathResults, stripDerivedAnalysisFields, stripExportContent, stripStudioTransientSettings, stripTransientRuntimeData, summarizeScene3DOperations, sunoCreditType, supportedDefaultDimensions, supportsAdvancedMode, supportsEndAnchor, supportsExtendRender, toConnectedReference, toConnectedReferences, togglePick, tryParseJson, uiAspectRatioFill, uiDurationFill, uiResolutionFill, unresolvedRefTokens, unwrapUnresolvedTokens, usageModeDirective, usageModeIncludesName, usageModeLabel, usdToCredits, validateAiAvatarPayload, validateCinematicAvatarPayload, validateDurationForFormat, validateModeActivation, validateModelInput, validateNoNestedGroups, validateObjects, validateProviderForNodeType, validateSubWorkflowRoutes, variantJobId, vec3Schema, videoAnalysisCreditSegment, videoAnalysisNumWindows, videoAnalysisResultSchema, videoAuditCreditsForBucket, videoModelCanSpeakDialogue, videoModelSupportsAudio, videoNegativeSuffix, videoProviderFoldsLoneEndFrame, videoProviderRequiresImage, windowAnalysisSchema, zipMergeLists };
16740
+ export { ACCESS_LEVELS, ACTIVE_SCENE_HELPERS, ADVANCED_MODE_UNAVAILABLE_REASON, 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, 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, AddBRollResultSchema, AnchorSceneStyleResultSchema, AssetRefSchema, AuditImagesResultSchema, AuditImagesShotEntrySchema, AuditPromptIssueSchema, AuditPromptResultSchema, AvatarPayloadError, BOARD_TO_ASSET_TYPE, BOARD_TO_COLUMN, BOARD_VARIANTS, BridgeToNextSceneInputSchema, BridgeToNextSceneResultSchema, 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, COMPOSER_PLAN_FIELDS, COMPOSER_PLAN_MAP, CONTENT_TYPES_BY_PLATFORM, CREATURE_ATTACH_COLUMNS, CREDIT_BASE_USD, CREDIT_ROUNDING_RESOLUTION, CastCoverageCriticVerdictSchema, CharacterImageCriticVerdictSchema, CharacterMetadataSchema, ChatTurnResponseSchema, CriticIssueSchema, DEFAULT_AUDIO_CROSSFADE_CURVE_ID, DEFAULT_CARRIED_FRACTION, DEFAULT_CHARACTER_ANGLE_COUNT, DEFAULT_CHARACTER_EXPRESSION_COUNT, DEFAULT_CHARACTER_FACET, DEFAULT_LABEL_BY_SOURCE, DEFAULT_LOCATION_USAGE_MODE, DEFAULT_PANEL_COUNT, DEFAULT_REF_IMAGE_MAX, DEFAULT_SECTIONS, DEFAULT_USAGE_MODE, DEFAULT_VIDEO_ANALYSIS_MODEL, DEFAULT_VIDEO_ANALYSIS_TIER, DEFAULT_VIDEO_CLIP_COST, DEFAULT_VIDEO_DURATION_SEC, DEFAULT_VIDEO_PROVIDER, DEFAULT_VOICE_CHANGER_MODEL, DEFAULT_VOICE_DESIGN_MODEL, DETAIL_VARIANTS, DURATION_PRICED_PROVIDERS, DYNAMIC_PRODUCER_TYPES, DetectionResultSchema, 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, EXTEND_VIDEO_PROVIDERS, EntityMetadataSchema, EntityRejectInputSchema, EntityStaleEventSchema, EntityStateChangeEventSchema, FACE_SWAP_PROVIDERS, FAL_LIP_SYNC_PROVIDERS, FAN_OUT_EACH_TYPES, FEATURED_ENTITIES, FILM_BASE_CREDITS, FLEXIBLE_INPUT_LIP_SYNC_PROVIDERS, FLUX2_RES_MP, FLUX_LORA_CHARACTER_MODEL_ID, 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_PROMPT_MAX, IMAGE_REF_TYPES, IMAGE_TO_VIDEO_PROVIDERS, INPUT_FIELD_MAP2 as INPUT_FIELD_MAP, INPUT_NODE_TYPES, INSTAGRAM_CAROUSEL_MAX_ITEMS, INSTAGRAM_CAROUSEL_MIN_ITEMS, ITER_CLONE_PATTERN, ImageCriticIssueSchema, ImageCriticResultSchema, ImageCriticVerdictSchema, ImprovePromptInputSchema, ImprovePromptResultSchema, KEYFRAME_CREDITS_PER_SHOT, KINETIC_CAPTION_STYLES, LANGUAGES, LEGACY_LOTTIE_HOST_REMAP, 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, LocationImageCriticVerdictSchema, LocationMetadataSchema, LocationsCoverageCriticIssueSchema, LocationsCoverageCriticVerdictSchema, 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, MINIMAX_H3_DEFAULT_RESOLUTION, MINIMAX_H3_PROVIDERS, MODELS_WITH_REFERENCE_IMAGE_SUPPORT, MODEL_CATALOG, MODEL_PARAM_NODE_TYPES, MODEL_RECOMMENDATIONS, MODIFY_IMAGE_PROVIDERS, MOTION_COLUMN, MOTION_TRANSFER_PROVIDERS, MUSIC_PROVIDERS, 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, NO_SPLIT_DELIMITER, 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_FIELD_MAP, OUTPUT_FORMATS, 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_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, 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, 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, REPEATABLE_NODE_TYPES, REPEAT_PLACEHOLDER, REPLICATE_LIP_SYNC_PROVIDERS, RESERVED_TEMPLATE_VARS, SCENE3D_ASSET_KINDS, SCENE3D_ASSET_ROLES, SCENE3D_ASSET_ROLE_KINDS, 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_RENDERER_ASSET_KINDS, 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, SCRAPER_ACTOR_LABELS, SCRAPER_CREDIT_COSTS, SCRAPER_OUTPUT_FIELDS, SCRIPT_PROVIDERS, 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, SEED_SUPPORT, SEPARATOR_DISPLAY, SEPARATOR_PRESETS, 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_POST_NODE_TYPES, STAGE_PATCH_SCHEMA, STATIC_CAPTION_STYLES, STRUCTURAL_SECTIONS, STRUCTURED_VISION_MODELS, STUDIO_SHOT_TRANSIENT_KEYS, STUDIO_TRANSIENT_KEYS, SUBMISSION_STATUSES, SUNO_ADD_TRACK_MODELS, SUNO_FIELD_HANDLE_FIELDS, SUNO_HARD_CEILING, SUNO_MODELS, SUNO_SELECT_OPERATIONS, SUNO_TEXT_MAX, SUNO_TITLE_MAX, SUNO_TRACK_SOURCE_TYPES, SUNO_VERSION_PRICED_OPERATIONS, SUPPORTED_FONT_NAMES, SURROUND_DIRECTIONS, SWITCHX_BLOCK_FRAMES, SWITCHX_FRAME_TIERS, SceneHelperNameSchema, SceneInputModeSchema, SceneMetadataSchema, SceneNodeDataSchema, SceneSpecSchema, ScriptCriticVerdictSchema, ShotSpecSchema, ShowrunnerPlanSchema, StageAwaitingSubGateEventSchema, StoryboardCohesionCriticVerdictSchema, StyleDirectivesSchema, SubGateNameSchema, T2I_TO_I2I_VARIANT, TASK_CHAINED_EDIT_PROVIDERS, TEXT_TO_AUDIO_PROVIDERS, TEXT_TO_VIDEO_PROVIDERS, TIER_MAX_PIPELINE_COST_CREDITS, TIER_PIPELINE_PARALLELISM, TILT_CARRIED_FRACTION, TOPAZ_DEFAULT_UPSCALE_FACTOR, TOPAZ_UPSCALE_FACTORS, TRANSCRIBE_PROVIDERS, TRANSIENT_RUNTIME_KEYS, TTS_PROVIDERS, 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_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_DURATION_TIERS, VIDEO_GEN_COLLAPSED_T2V_IDS, VIDEO_GEN_PROVIDERS, VIDEO_INPUT_LIP_SYNC_PROVIDERS, VIDEO_MODEL_CAPS, VIDEO_MODE_ALIASES, 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_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, WORKFLOW_VISIBILITIES, WORKSPACE_HEADER, WORKSPACE_HEADER_LOWER, WORKSPACE_ROLES, WorkspaceSettingsSchema, aggregateByType, aiAvatarReserveCreditId, analyzedSceneSchema, applyDefaultVideoSelection, applyHandleInputOverride, applyRange, applyRangeIndices, applyScene3DEditOperations, applyScene3DV2EditOperations, applySlots, applyVideoAudioToggle, applyVideoNegativePrompt, aspectRatioFromDims, aspectRatioOptionsByKind, aspectRatioToNumber, assembleNarratedVideoCredits, availableReasoningEfforts, bucketSecondsFromAuditCreditId, bucketSecondsFromCreditId, buildBoardPrompt, buildChildrenByParent, buildConditionVariables, buildCreditModelIdentifier, buildExpressionFromVisual, buildLipSyncCreditId, buildLlmCreditIdentifier, buildModelMenu, buildModelTree, buildMotionCreditModelIdentifier, buildNodePresetExport, buildPanelPrompt, buildPro3DRenderSource, buildProgressSegments, buildRangeLabel, buildScraperCreditId, buildVideoAnalysisCreditId, buildVideoAuditCreditId, buildVideoCreditModelIdentifier, calculateCombinedProgress, calculateMonetizationMarkup, calculateMonetizedCost, calculateProgress, canonicalScene3DPlanV2Json, canonicalVarName, characterBoardItems, characterBucketDisplayRank, characterMentionSlug, characterMentionableAssetArrays, characterSheetRefItems, characterVariantAssetArrays, checkRefVideoDurations, cinematicCreditId, clampCinematicDuration, clampSmartCutWindow, classifyRefToken, cleanOrphanedItems, clearImageCriticMetadata, clearVideoCriticMetadata, clipLookSchema, collectAncestorRefs, combineSameLabelRefs, computeAggregateLanes, computeScene3DPlanV2ContentHash, countRefModalityEdges, creditRangesAll, creditsToUsd, decodeProviderItem, defaultCarriedFraction, defaultResolutionFor, defaultRoleForSource, defaultVideoAspectRatio, deriveLinkedFields, deriveLottieSlotFields, deriveSlotRefs, describeEdgeBehavior, describeMaskRegion, describeNodeAdjustments, describeSlotControl, dropUnknownBindings, dropUnknownSpeakers, durationsByMode, effectiveReasoningEffort, encodeProviderItem, ensureLocaleCatalogLoaded, entityHydrationColumns, entityMentionSlug, entityMentionSlugForRef, entityScalarFields, entitySlotSchema, entryMatchesQuery, estimateCombineVideosCredits, estimateFilmCredits, estimateLoopTrimAddonCredits, estimateLoopVideoCredits, estimateScriptDurationSec, estimateSheetCost, estimateTrimVideoCredits, evaluateCondition, evaluateConditionGroup, evaluateJsonExpression, evaluateJsonPath, expandExtraRefsToConnectedReferences, expandItemsWithRepeat, extractAllGeneratedResults, extractCharacterLoraFields, extractGeneratedJsonAsList, extractPresetData, extractReferencedLabels, extractVideoDurationFromNode, fieldKeyFromHandle, filterCloneNodes, findCharacterMentionTokens, findEntityMentionTokens, findImageMentionTokens, findLocationMentionTokens, findSeedance2AudioOverLimit, firstSightExtraRole, flattenItems, 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, getStrategy, getTargetField, getValidValues, getVehicle, getVehicleLabel, getVideoAudioCapability, getWeapon, getWeaponLabel, groupByFamily, groupHandleId, groupLlmModelsByVendor, hasContiguousSegmentDurations, hasFeature, hexToRgbaArray, humanizeSlotSid, imageMentionSlug, imageMentionSlugForRef, imageReferenceLimit, inferMusicVideo, isAggregateableType, isCharacterAspectRatio, isCollectInEdge, isDefaultSelectorConfig, isExpandedClone, isFlux2Model, isGeminiOmniProvider, isGvpSupportedProvider, isHandleInputWired, isKineticCaptionStyle, isKnownScene3DEngine, isLocationUsageMode, isMinimaxH3Provider, isObjectAspectRatio, isOversizedScene, isPaygRetentionActive, isPerSecondLipSyncProvider, isPro3DRenderJobOutput, isPro3DRenderQuote, isPro3DRenderRenderOnly, isScene3DAuthoringEngine, isScene3DCameraTrack, isScene3DHttpUrl, isScene3DPlan, isScene3DPlanV1, isScene3DPlanV2, isScene3DSchemaVersionSupported, isScraperActor, isSeedance2Provider, isTiltDirection, isUsageMode, isVeoProvider, isVideoAnalysisMixedTier, isVideoAnalysisTier, isWan3Provider, jsonResultToList, knownEntitySlugsFromRefs, knownImageSlugsFromRefs, listBoardTemplates, listModels, listSlotSids, llmRouteDefaults, locationMentionSlug, locationReferencePhotoKindLabel, locationUsageModeLabel, mapAspectRatio, mapQuality, mapShotIntentToProviderDirectives, matchVariant, maxSegmentSecFor, maxSegmentsFor, mergeClipLook, mergeExposedSettings, migrateEdgeOutputMode, migrateToItems, minSegmentSecFor, modelIdsByKindMode, modelToNodeTarget, modelsForInputMode, modelsWithFeature, motionGraphicsFeature, newScene3DRevisionId, normalizeLottieLayers, normalizeMinimaxH3Resolution, normalizeModelInput, normalizeNodeModelParams, normalizePinterestUrl, normalizeRoleSlug, normalizeVideoRequestParams, normalizeWan3Resolution, orderedLlmModels, parseAttributedDialogue, parseCharacterMentionToken, parseEntityMentionToken, parseGroupHandle, parseHandleId, parseImageMentionToken, parseListExpression, parseLocationMentionToken, parseNodePresetExport, parseNodeRef, parseScene3DCameraTrackJson, parseScene3DPlanV2Json, pickAiAvatarBucket, pickIds, pickLipSyncBucket, pickSwitchXFrameTier, pickVideoAnalysisBucket, planSheetGeneration, planSheetPanels, preferredInputModeForModel, presentTypes, presetApplyClearKeys, presetDataMatches, presetEntries, pricedVideoSelection, pro3DRenderCoreOutputSchema, pro3DRenderJobOutputSchema, pro3DRenderProducedSchemaVersion, pro3DRenderQuoteSchema, pro3DRenderTimingOverrides, qualityOptionsByKind, readPromptAffixes, refHandleCategory, referenceModalityForHandle, referenceSheetCreditId, registerCatalogSidecars, registerSidecarLoaders, renderAnalyzedScene, resetCatalogSidecars, resolutionOptionsByKind, resolveAiAvatarCreditId, resolveAudioCrossfadeCurve, resolveCharacterAspectRatio, resolveCinematicCreditId, resolveConditionValue, resolveDefaultRole, resolveDescription, resolveDialogueVoices, resolveEffectiveSourceType, resolveEffectiveTier, resolveEntityAspect, resolveFieldMappings, resolveGvpAnchorWire, resolveImageGenCreditIdentifier, resolveIndex, resolveLabel, resolveListExpression, resolveLlmCreditId, resolveLocationFields, resolveLocationPresetCatalog, resolveLottieOverlaySrc, resolveNodeRefs, resolveNormalizedImageGen, resolveObjectAspectRatio, resolvePipelineModel, resolveRelativeWindowToken, resolveScene3DAuthoringEngine, resolveScraperCreditId, resolveSelectorRefs, resolveSeparator, resolveSheetSections, resolveSlideshowTransition, resolveSourceThroughConnectedList, resolveStoredTier, resolveSwitchXCreditId, resolveTopazUpscale, resolveVideoAnalysisModel, resolveVideoModeForInputs, resolveVideoProviderForMode, resolveXfadeName, rewriteSceneBindings, rewriteSlotTokens, rewriteSpeakerSlots, rgbaArrayToHex, roleToPhrase, rotationVec3Schema, 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, scene3DJsonByteLength, scene3DLightingChangesSchema, scene3DLightingSchema, scene3DMaterialBindingSchema, scene3DMaterialNameSchema, scene3DMaterialRoleSchema, scene3DNodeIdSchema, scene3DObjectChangesSchema, scene3DObjectKeyframeSchema, scene3DObjectSchema, scene3DOverrideSchema, scene3DPlanIssues, scene3DPlanSchema, scene3DPlanSchemaVersion, scene3DPlanV1Issues, scene3DPlanV1ObjectSchema, scene3DPlanV1Schema, scene3DPlanV2Issues, scene3DPlanV2ObjectSchema, scene3DPlanV2Schema, scene3DPrimitiveSchema, scene3DProjectionIssues, scene3DProvenanceSchema, scene3DReferenceSchema, scene3DSampleForFrame, scene3DSha256Schema, scene3DShotForFrame, scene3DShotIndexForFrame, scene3DShotSchema, scene3DUrlSchema, scene3DV2AdmissionIssues, scene3DV2EditOperationSchema, scene3DV2EditOperationsSchema, scene3DV2HierarchyDepth, scene3DV2NormalizationIssues, scene3DV2OverrideInputSchema, scene3DV2ResourceUsage, scene3DVersionTokenSchema, scene3DZodIssues, searchModelVariants, seedance2AudioLimitSec, segmentDurationsFor, selectByModulo, selectByNamedKey, selectByPredicate, selectListItems, selectLoraRoutingForMentions, selectRandom, setRegisteredPersonPackFields, settledWithLimit, sizeVec3Schema, slotVariationSchema, sortCharacterEntriesForDisplay, sortListItems, sourceRefKey, spliceDelimitedRows, splitByLoopDelimiter, splitGeneratedItems, spreadJsonArrayIfSingleton, stringifyPathResults, stripDerivedAnalysisFields, stripExportContent, stripStudioTransientSettings, stripTransientRuntimeData, summarizeScene3DOperations, sunoCreditType, supportedDefaultDimensions, supportsAdvancedMode, supportsEndAnchor, supportsExtendRender, toConnectedReference, toConnectedReferences, togglePick, tryParseJson, uiAspectRatioFill, uiDurationFill, uiResolutionFill, unresolvedRefTokens, unwrapUnresolvedTokens, usageModeDirective, usageModeIncludesName, usageModeLabel, usdToCredits, validateAiAvatarPayload, validateCinematicAvatarPayload, validateDurationForFormat, validateModeActivation, validateModelInput, validateNoNestedGroups, validateObjects, validateProviderForNodeType, validateSubWorkflowRoutes, variantJobId, vec3Schema, verifyScene3DPlanV2ContentHash, videoAnalysisCreditSegment, videoAnalysisNumWindows, videoAnalysisResultSchema, videoAuditCreditsForBucket, videoModelCanSpeakDialogue, videoModelSupportsAudio, videoNegativeSuffix, videoProviderFoldsLoneEndFrame, videoProviderRequiresImage, windowAnalysisSchema, zipMergeLists };
15236
16741
  //# sourceMappingURL=index.js.map
15237
16742
  //# sourceMappingURL=index.js.map