@nodaro/shared 3.26.0 → 3.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1019,7 +1019,7 @@ var VIDEO_MODELS = {
1019
1019
  defaultDuration: 5,
1020
1020
  pricing: [{ identifier: "minimax", credits: 143, note: "5s, 1080p" }]
1021
1021
  },
1022
- // MiniMax Hailuo 3 (KIE "minimax-h3") — t2v / i2v (first and/or last frame) /
1022
+ // MiniMax H3 (KIE "minimax-h3") — t2v / i2v (first and/or last frame) /
1023
1023
  // reference-to-video (9 images / 3 videos ≤15s total / 3 audios ≤15s total;
1024
1024
  // audio refs require an image or video ref alongside). Two-rate resolution
1025
1025
  // lever (768P added 2026-08-03): 2K (KIE default) at 36.5 KIE cr/s, 768P at
@@ -1037,7 +1037,7 @@ var VIDEO_MODELS = {
1037
1037
  family: "MiniMax",
1038
1038
  label: "minimax-h3",
1039
1039
  series: "Hailuo",
1040
- description: "MiniMax Hailuo 3 \u2014 premium multimodal tier: first/last frame + image/video/audio references, native audio, 2K (default) or 768P output, 4-15s per-second pricing.",
1040
+ description: "MiniMax H3 \u2014 premium multimodal tier: first/last frame + image/video/audio references, native audio, 2K (default) or 768P output, 4-15s per-second pricing.",
1041
1041
  useCases: ["premium", "narrative"],
1042
1042
  features: ["end-frame", "audio", "reference-image", "video-reference"],
1043
1043
  aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
@@ -2922,7 +2922,35 @@ function sameOptionValue(a, b) {
2922
2922
  const fb = Number(nb);
2923
2923
  return Number.isFinite(fa) && Number.isFinite(fb) && fa === fb;
2924
2924
  }
2925
- function normalizeModelInput(modelId, input) {
2925
+ function isAutoAspectToken(value) {
2926
+ return typeof value === "string" && value.trim().toLowerCase() === "auto";
2927
+ }
2928
+ function usableSize(size) {
2929
+ return size !== void 0 && Number.isFinite(size.width) && size.width > 0 && Number.isFinite(size.height) && size.height > 0;
2930
+ }
2931
+ var ASPECT_TIE_EPSILON = 1e-9;
2932
+ function nearestCatalogAspectRatio(sourceWidth, sourceHeight, ratios) {
2933
+ if (!usableSize({ width: sourceWidth, height: sourceHeight })) return void 0;
2934
+ const target = Math.log(sourceWidth / sourceHeight);
2935
+ let best;
2936
+ let bestDist = Infinity;
2937
+ for (const ratio of ratios) {
2938
+ const [rw, rh] = ratio.split(":").map(Number);
2939
+ if (!rw || !rh || rw < 0 || rh < 0) continue;
2940
+ const dist = Math.abs(Math.log(rw / rh) - target);
2941
+ if (dist < bestDist - ASPECT_TIE_EPSILON) {
2942
+ bestDist = dist;
2943
+ best = ratio;
2944
+ }
2945
+ }
2946
+ return best;
2947
+ }
2948
+ function autoAspectNeedsSourceImage(modelId, aspectRatio) {
2949
+ if (!modelId || !isAutoAspectToken(aspectRatio)) return false;
2950
+ const ratios = MODEL_CATALOG[modelId]?.aspectRatios;
2951
+ return ratios !== void 0 && ratios.length > 0 && !ratios.some(isAutoAspectToken);
2952
+ }
2953
+ function normalizeModelInput(modelId, input, context = {}) {
2926
2954
  const m = MODEL_CATALOG[modelId];
2927
2955
  const adjustments = [];
2928
2956
  if (!m) return { ...input, adjustments };
@@ -2950,7 +2978,19 @@ function normalizeModelInput(modelId, input) {
2950
2978
  });
2951
2979
  return next;
2952
2980
  };
2953
- out.aspectRatio = snap("aspectRatio", input.aspectRatio, m.aspectRatios);
2981
+ const sourceRatio = autoAspectNeedsSourceImage(modelId, input.aspectRatio) && usableSize(context.sourceImage) ? nearestCatalogAspectRatio(context.sourceImage.width, context.sourceImage.height, m.aspectRatios ?? []) : void 0;
2982
+ if (sourceRatio !== void 0 && input.aspectRatio !== void 0) {
2983
+ const { width, height } = context.sourceImage;
2984
+ adjustments.push({
2985
+ field: "aspectRatio",
2986
+ from: input.aspectRatio,
2987
+ to: sourceRatio,
2988
+ reason: `${m.label} has no "auto" aspect ratio \u2014 using "${sourceRatio}", the supported ratio closest to the source image's shape (${width}x${height}).`
2989
+ });
2990
+ out.aspectRatio = sourceRatio;
2991
+ } else {
2992
+ out.aspectRatio = snap("aspectRatio", input.aspectRatio, m.aspectRatios);
2993
+ }
2954
2994
  out.resolution = snap(
2955
2995
  "resolution",
2956
2996
  input.resolution,
@@ -5516,15 +5556,26 @@ function buildCreditModelIdentifier(provider, quality, resolution, renderingSpee
5516
5556
  }
5517
5557
  return provider;
5518
5558
  }
5559
+ function normalizedImageGenModelId(opts) {
5560
+ const provider = typeof opts.provider === "string" && opts.provider.length > 0 ? opts.provider : "nano-banana";
5561
+ return opts.swapToI2i && opts.refCount > 0 ? T2I_TO_I2I_VARIANT[provider] ?? provider : provider;
5562
+ }
5563
+ function imageGenAutoAspectNeedsSourceImage(opts) {
5564
+ const asks = (refCount) => autoAspectNeedsSourceImage(normalizedImageGenModelId({ provider: opts.provider, refCount, swapToI2i: true }), opts.aspectRatio);
5565
+ return opts.refCount === void 0 ? asks(0) || asks(1) : asks(opts.refCount);
5566
+ }
5519
5567
  function resolveNormalizedImageGen(opts) {
5520
5568
  const str7 = (v) => typeof v === "string" && v.length > 0 ? v : void 0;
5521
- const provider = str7(opts.provider) ?? "nano-banana";
5522
- const modelId = opts.swapToI2i && opts.refCount > 0 ? T2I_TO_I2I_VARIANT[provider] ?? provider : provider;
5523
- const n = normalizeModelInput(modelId, {
5524
- aspectRatio: str7(opts.aspectRatio),
5525
- resolution: str7(opts.resolution),
5526
- quality: str7(opts.quality)
5527
- });
5569
+ const modelId = normalizedImageGenModelId(opts);
5570
+ const n = normalizeModelInput(
5571
+ modelId,
5572
+ {
5573
+ aspectRatio: str7(opts.aspectRatio),
5574
+ resolution: str7(opts.resolution),
5575
+ quality: str7(opts.quality)
5576
+ },
5577
+ { sourceImage: opts.sourceImage }
5578
+ );
5528
5579
  return {
5529
5580
  identifier: buildCreditModelIdentifier(
5530
5581
  modelId,
@@ -6316,7 +6367,11 @@ var FAN_IN_TARGETS = {
6316
6367
  deduplicate: "*",
6317
6368
  "merge-lists": "*",
6318
6369
  "sort-list": "*",
6319
- selector: "*"
6370
+ selector: "*",
6371
+ // Speaker Frames on a clip pack (P3-24 (a), decided 2026-10-06): ONE run over
6372
+ // the union of the clips' spans — the pack's EDLs fold onto its `edl` wire
6373
+ // instead of running one detection job (and one minimum charge) per clip.
6374
+ "speaker-frames": ["edl"]
6320
6375
  };
6321
6376
  function isFanInNodeType(nodeType) {
6322
6377
  return typeof nodeType === "string" && Object.prototype.hasOwnProperty.call(FAN_IN_TARGETS, nodeType);
@@ -6352,8 +6407,9 @@ function canonicalizeOverrideKeys(nodeType, overrides) {
6352
6407
  }
6353
6408
 
6354
6409
  // src/render-nodes.ts
6410
+ var RENDER_JSON_HANDLE = "json";
6355
6411
  var outputSettingMedium = (data) => data.output === "audio" ? "audio" : "video";
6356
- var descriptor = (d) => Object.freeze({ ...d });
6412
+ var descriptor = (d) => Object.freeze({ ...d, transcriptOutput: Object.freeze({ ...d.transcriptOutput }) });
6357
6413
  var RENDER_NODE_TYPES = Object.freeze({
6358
6414
  "apply-edl": descriptor({
6359
6415
  mediumOf: outputSettingMedium,
@@ -6361,18 +6417,22 @@ var RENDER_NODE_TYPES = Object.freeze({
6361
6417
  clockMapFrom: "input",
6362
6418
  ownerOnlyListing: true,
6363
6419
  latestBatch: true,
6364
- jsonKind: "transcript"
6420
+ jsonKind: "transcript",
6421
+ transcriptOutput: { handle: RENDER_JSON_HANDLE, dataField: "generatedJson" }
6365
6422
  }),
6366
6423
  // Speaker View (C3.2): video only; its `json` is the EDL as it drew it (the
6367
6424
  // turns split, the layouts written), so a player maps the output clock
6368
- // through THAT, and Add Captions never takes it for a Transcript.
6425
+ // through THAT, and Add Captions never takes it for a Transcript. The wired
6426
+ // transcript, remapped through that same drawn edit, comes out on its own
6427
+ // `transcript` pip (decided 2026-10-08) — what a caption step reads.
6369
6428
  "speaker-view": descriptor({
6370
6429
  mediumOf: () => "video",
6371
6430
  creditId: (quality) => speakerViewCreditId(quality),
6372
6431
  clockMapFrom: "output-json",
6373
6432
  ownerOnlyListing: true,
6374
6433
  latestBatch: true,
6375
- jsonKind: "edl"
6434
+ jsonKind: "edl",
6435
+ transcriptOutput: { handle: "transcript", dataField: "generatedTranscript" }
6376
6436
  })
6377
6437
  });
6378
6438
  var RENDER_NODE_TYPE_IDS = Object.freeze(Object.keys(RENDER_NODE_TYPES));
@@ -6388,6 +6448,21 @@ function rendersLatestBatch(type) {
6388
6448
  function rendersTranscriptJson(type) {
6389
6449
  return renderNodeOf(type)?.jsonKind === "transcript";
6390
6450
  }
6451
+ function renderTranscriptOutputOf(type) {
6452
+ return renderNodeOf(type)?.transcriptOutput;
6453
+ }
6454
+ function isRenderDataHandle(type, handle) {
6455
+ const d = renderNodeOf(type);
6456
+ if (!d || typeof handle !== "string") return false;
6457
+ return handle === RENDER_JSON_HANDLE || handle === d.transcriptOutput.handle;
6458
+ }
6459
+ function renderSavedJsonOutputs(type) {
6460
+ const d = renderNodeOf(type);
6461
+ if (!d) return [];
6462
+ const json = { outputKey: RENDER_JSON_HANDLE, dataField: "generatedJson" };
6463
+ const t2 = d.transcriptOutput;
6464
+ return t2.handle === RENDER_JSON_HANDLE ? [json] : [json, { outputKey: t2.handle, dataField: t2.dataField }];
6465
+ }
6391
6466
  var OWNER_ONLY_LISTING_RENDER_TYPES = Object.freeze(
6392
6467
  RENDER_NODE_TYPE_IDS.filter((t2) => RENDER_NODE_TYPES[t2].ownerOnlyListing)
6393
6468
  );
@@ -7186,7 +7261,8 @@ var LLM_MODELS = [
7186
7261
  {
7187
7262
  id: "claude-haiku-4.5",
7188
7263
  displayName: "Claude Haiku 4.5",
7189
- desc: "Fast economy, good reasoning",
7264
+ // Demoted 2026-10-10 when claude-haiku-5.5 registered.
7265
+ desc: "Previous Haiku, fast economy",
7190
7266
  tier: "economy",
7191
7267
  kieFormat: "messages",
7192
7268
  kieSlugOrModel: "claude-haiku-4-5",
@@ -7199,6 +7275,49 @@ var LLM_MODELS = [
7199
7275
  // KIE served it plain and with a tool on its streaming wire that day.
7200
7276
  preferKie: true
7201
7277
  },
7278
+ {
7279
+ id: "claude-haiku-5.5",
7280
+ displayName: "Claude Haiku 5.5",
7281
+ desc: "Latest Haiku, fast and low-cost with reasoning",
7282
+ tier: "economy",
7283
+ kieFormat: "messages",
7284
+ // KIE plain id on the Claude-native messages dialect
7285
+ // (docs.kie.ai/market/claude/claude-haiku-5-5.md). Live-probed 2026-10-10
7286
+ // on the streaming wire: plain, system prompt, base64 image, a forced tool
7287
+ // and an auto + strict tool (both came back as a real tool_use block), and
7288
+ // `max_tokens: 32768` were all served.
7289
+ kieSlugOrModel: "claude-haiku-5-5",
7290
+ vendor: "anthropic",
7291
+ structuredOutputMode: "anthropic-tool",
7292
+ // NO `supportsForcedToolChoice: false`, unlike Sonnet 5.5 / Opus 5.5: this
7293
+ // model ACCEPTS a forced tool_choice (probed on Anthropic's API 2026-10-10).
7294
+ // A forced call skips thinking (same usage with and without an effort), and
7295
+ // an effort-bearing structured call is already sent the auto choice.
7296
+ //
7297
+ // A thinking block is valid only while everything before it is unchanged
7298
+ // (vendor docs: the same history check the other 5.5 models run).
7299
+ conversationBoundThinking: true,
7300
+ supportsImages: true,
7301
+ maxOutputTokens: 16384,
7302
+ directFallbackModel: "claude-haiku-5-5",
7303
+ // The first Haiku with effort levels. The vendor default is `medium`, where
7304
+ // most of the family defaults to `high`.
7305
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
7306
+ // KIE ignores effort on this slug too — measured 2026-10-10 on a
7307
+ // reasoning-heavy prompt: none / low / max / KIE's own `thinkingFlag` gave
7308
+ // 2,076 / 1,886 / 2,223 / 1,927 output tokens and no thinking block, while
7309
+ // Anthropic's API gave 2,059 at low and 28,097 at max. An effort call runs
7310
+ // direct and bills as Advanced.
7311
+ effortRequiresDirect: true,
7312
+ // Anthropic 400s a non-default sampling value ("`temperature` is deprecated
7313
+ // for this model", probed 2026-10-10); KIE's proxy accepted temperature: 0.2.
7314
+ supportsTemperature: false,
7315
+ preferKie: true,
7316
+ // Adaptive thinking runs when no thinking param is sent (vendor default),
7317
+ // on BOTH lanes: a no-effort KIE call spent ~2,000 output tokens on a
7318
+ // ~350-token answer and returned no thinking block.
7319
+ thinkingDefaultOn: true
7320
+ },
7202
7321
  {
7203
7322
  id: "claude-sonnet-4.6",
7204
7323
  displayName: "Claude Sonnet 4.6",
@@ -7696,7 +7815,10 @@ var LLM_MODELS = [
7696
7815
  // KIE ignores Claude effort (measured 2026-10-08): an effort call runs direct and bills as Advanced.
7697
7816
  effortRequiresDirect: true,
7698
7817
  supportsTemperature: false,
7699
- preferKie: true
7818
+ preferKie: true,
7819
+ // Thinking is always on (vendor docs: `disabled` is not supported), so it
7820
+ // shares the output cap on every call.
7821
+ thinkingDefaultOn: true
7700
7822
  },
7701
7823
  // ── Moonshot / DeepSeek ───────────────────────────────────────────────────
7702
7824
  // Both on KIE's THIRD responses family path, openai/v1/responses (llm-client
@@ -7808,6 +7930,19 @@ var LLM_FEATURE_DEFAULTS = {
7808
7930
  "content-recipe": "gemini-3.6-flash",
7809
7931
  "content-ideas": "gemini-3.6-flash"
7810
7932
  };
7933
+ var LLM_FEATURE_DEFAULT_EFFORTS = {
7934
+ // Decided 2026-10-09 from the picker bake-off v2: Opus 5.5 at `high` read
7935
+ // 4/4 portraits with the most attributes per image, ~9 s a read. Its effort
7936
+ // only takes effect on Anthropic's own API (`effortRequiresDirect`), so the
7937
+ // default analysis runs direct — and bills as such (`llmServesDirect`).
7938
+ "describe-to-picker": "high"
7939
+ };
7940
+ function defaultReasoningEffort(feature, modelId) {
7941
+ const effort = LLM_FEATURE_DEFAULT_EFFORTS[feature];
7942
+ if (!effort) return void 0;
7943
+ if (!modelId) return effort;
7944
+ return getLlmModel(modelId)?.id === LLM_FEATURE_DEFAULTS[feature] ? effort : void 0;
7945
+ }
7811
7946
  var LLM_MODALITY_CAPS = {
7812
7947
  "gemini-3-flash": { image: true, video: true, audio: true },
7813
7948
  "gemini-3.6-flash": { image: true, video: true, audio: true },
@@ -7828,6 +7963,7 @@ var LLM_MODALITY_CAPS = {
7828
7963
  "gemini-3.8-flash": { image: true, video: false, audio: false },
7829
7964
  "gemini-3.1-pro": { image: true, video: true, audio: true },
7830
7965
  "claude-haiku-4.5": { image: true, video: false, audio: false },
7966
+ "claude-haiku-5.5": { image: true, video: false, audio: false },
7831
7967
  "claude-sonnet-4.6": { image: true, video: false, audio: false },
7832
7968
  "claude-opus-4.7": { image: true, video: false, audio: false },
7833
7969
  "gpt-5.2": { image: true, video: false, audio: false },
@@ -9622,7 +9758,7 @@ var NON_PROMPT_TEXT_LANES = {
9622
9758
  negative: "*",
9623
9759
  "system-prompt": "*",
9624
9760
  script: ["ai-avatar"],
9625
- transcript: ["add-captions", "apply-edl", "edit-plan", "camera-switch", "speaker-view"],
9761
+ transcript: ["add-captions", "apply-edl", "edit-plan", "camera-switch", "speaker-view", "speaker-frames"],
9626
9762
  edl: ["apply-edl", "camera-switch", "speaker-view"],
9627
9763
  silence: ["edit-plan"],
9628
9764
  offsets: ["edit-plan"],
@@ -11241,6 +11377,9 @@ var JSON_OUTPUT_KINDS = Object.freeze({
11241
11377
  transcribe: { primary: "json", pips: { json: "transcript" } },
11242
11378
  // Camera Switch: the switched edit and the renamed (still a Transcript) transcript.
11243
11379
  "camera-switch": { primary: "edl", pips: { edl: "edl", transcript: "transcript" } },
11380
+ // Speaker Frames: the stored track file's descriptor (P3-22) — neither a
11381
+ // Transcript nor an EDL, read by Speaker View's `tracks` input (P3.9).
11382
+ "speaker-frames": { primary: "tracks", pips: { tracks: "other" } },
11244
11383
  // Text to Dialogue: the Transcript built from the model's own word timings (its default read is the audio).
11245
11384
  "text-to-dialogue": { pips: { json: "transcript" } },
11246
11385
  // ── JSON that is neither a Transcript nor an EDL (decided 2026-10-08) ──
@@ -11268,7 +11407,6 @@ var JSON_OUTPUT_KINDS = Object.freeze({
11268
11407
  // Describe to Picker: the picker values read off an image.
11269
11408
  "describe-to-picker": { primary: "picker-json", pips: { "picker-json": "other" } }
11270
11409
  });
11271
- var RENDER_JSON_PIP = "json";
11272
11410
  var JSON_INPUT_KINDS = Object.freeze({
11273
11411
  transcript: "transcript",
11274
11412
  edl: "edl"
@@ -11277,7 +11415,11 @@ var own = (table, key) => Object.hasOwn(table, key) ? table[key] : void 0;
11277
11415
  function declaredJsonOutput(nodeType, sourceHandle, renders = RENDER_NODE_TYPES) {
11278
11416
  if (typeof nodeType !== "string") return void 0;
11279
11417
  const render = own(renders, nodeType);
11280
- if (render) return (sourceHandle ?? RENDER_JSON_PIP) === RENDER_JSON_PIP ? render.jsonKind : void 0;
11418
+ if (render) {
11419
+ const pip2 = sourceHandle ?? RENDER_JSON_HANDLE;
11420
+ if (pip2 === RENDER_JSON_HANDLE) return render.jsonKind;
11421
+ return pip2 === render.transcriptOutput.handle ? "transcript" : void 0;
11422
+ }
11281
11423
  const outputs = own(JSON_OUTPUT_KINDS, nodeType);
11282
11424
  if (!outputs) return void 0;
11283
11425
  const pip = sourceHandle ?? outputs.primary;
@@ -12360,6 +12502,114 @@ var SOCIAL_READ_PERIODS = ["window", "day"];
12360
12502
  var COMPETITOR_READ_ROLES = ["own", "about", "all"];
12361
12503
  var SOCIAL_READ_DAY_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
12362
12504
 
12505
+ // src/entity-node-fields.ts
12506
+ var ENTITY_NODE_KINDS = ["character", "object", "creature", "location"];
12507
+ var ENTITY_DB_ID_FIELD = {
12508
+ character: "characterDbId",
12509
+ object: "objectDbId",
12510
+ creature: "creatureDbId",
12511
+ location: "locationDbId"
12512
+ };
12513
+ var ENTITY_NAME_FIELD = {
12514
+ character: "characterName",
12515
+ object: "objectName",
12516
+ creature: "creatureName",
12517
+ location: "locationName"
12518
+ };
12519
+ var ENTITY_TABLE = {
12520
+ character: "characters",
12521
+ object: "objects",
12522
+ creature: "creatures",
12523
+ location: "locations"
12524
+ };
12525
+ var ENTITY_BUCKET_FIELDS = {
12526
+ character: [
12527
+ ["expressions", "expressions"],
12528
+ ["poses", "poses"],
12529
+ ["motions", "motions"],
12530
+ ["angles", "angles"],
12531
+ ["body_angles", "bodyAngles"],
12532
+ ["lighting_variations", "lightingVariations"],
12533
+ ["outfit_variations", "outfitVariations"],
12534
+ ["detail_closeups", "detailCloseups"],
12535
+ ["sheets", "sheets"]
12536
+ ],
12537
+ object: [
12538
+ ["angles", "angles"],
12539
+ ["materials", "materials"],
12540
+ ["variations", "variations"],
12541
+ ["motion_clips", "motionClips"],
12542
+ ["detail_closeups", "detailCloseups"],
12543
+ ["sheets", "sheets"]
12544
+ ],
12545
+ creature: [
12546
+ ["angles", "angles"],
12547
+ ["poses", "poses"],
12548
+ ["variations", "variations"],
12549
+ ["motion_clips", "motionClips"],
12550
+ ["detail_closeups", "detailCloseups"],
12551
+ ["sheets", "sheets"]
12552
+ ],
12553
+ location: [
12554
+ ["time_of_day", "timeOfDay"],
12555
+ ["weather", "weather"],
12556
+ ["angles", "angles"],
12557
+ ["lighting", "lighting"],
12558
+ ["seasons", "seasons"],
12559
+ ["atmosphere_motions", "atmosphereMotions"],
12560
+ ["detail_closeups", "detailCloseups"],
12561
+ ["sheets", "sheets"]
12562
+ ]
12563
+ };
12564
+ var ENTITY_SCALAR_FIELDS = [
12565
+ ["name", "__name"],
12566
+ // routed to the kind's own name field by the caller
12567
+ ["description", "description"],
12568
+ ["canonical_description", "canonicalDescription"],
12569
+ ["source_image_url", "sourceImageUrl"]
12570
+ ];
12571
+ var ENTITY_KIND_SCALAR_FIELDS = {
12572
+ character: [],
12573
+ object: [["style_lock", "styleLock"]],
12574
+ creature: [["style_lock", "styleLock"]],
12575
+ location: [["style_lock", "styleLock"]]
12576
+ };
12577
+ function entityHydrationColumns(kind) {
12578
+ return [
12579
+ "id",
12580
+ ...entityScalarFields(kind).map(([column]) => column),
12581
+ ...ENTITY_BUCKET_FIELDS[kind].map(([column]) => column)
12582
+ ];
12583
+ }
12584
+ function entityScalarFields(kind) {
12585
+ return [...ENTITY_SCALAR_FIELDS, ...ENTITY_KIND_SCALAR_FIELDS[kind]];
12586
+ }
12587
+
12588
+ // src/lone-media-url.ts
12589
+ var IMAGE_FILE_RE = /\.(png|jpe?g|gif|webp)$/i;
12590
+ var VIDEO_FILE_RE = /\.(mp4|mov|webm|m4v)$/i;
12591
+ function loneMediaUrlKind(value) {
12592
+ const s = value.trim();
12593
+ if (s.length === 0 || /[\s,]/.test(s) || !/^https?:\/\//i.test(s)) return null;
12594
+ let pathname;
12595
+ try {
12596
+ pathname = new URL(s).pathname;
12597
+ } catch {
12598
+ return null;
12599
+ }
12600
+ if (IMAGE_FILE_RE.test(pathname)) return "image";
12601
+ if (VIDEO_FILE_RE.test(pathname)) return "video";
12602
+ return null;
12603
+ }
12604
+ var MESSAGE_TRIGGER_TYPES = /* @__PURE__ */ new Set(["telegram-trigger", "telegram-account-trigger"]);
12605
+ function isLoneMediaLinkSource(nodeType) {
12606
+ if (!nodeType) return false;
12607
+ if (IMAGE_PRODUCER_TYPES.has(nodeType) || VIDEO_PRODUCER_TYPES.has(nodeType) || AUDIO_PRODUCER_TYPES.has(nodeType)) return false;
12608
+ if (DYNAMIC_PRODUCER_TYPES.has(nodeType) || MESSAGE_TRIGGER_TYPES.has(nodeType)) return false;
12609
+ if (ENTITY_NODE_KINDS.includes(nodeType) || nodeType === "face") return false;
12610
+ return true;
12611
+ }
12612
+
12363
12613
  // src/collections.ts
12364
12614
  var COLLECTION_NAME_MAX = 80;
12365
12615
  var COLLECTION_DESCRIPTION_MAX = 500;
@@ -12387,6 +12637,11 @@ var COLLECTION_TIER_CAPS = {
12387
12637
  function collectionCapsForTier(tier) {
12388
12638
  return tier ? COLLECTION_TIER_CAPS[tier] : void 0;
12389
12639
  }
12640
+ var COLLECTION_USAGES = ["all", "unused", "used"];
12641
+ var COLLECTION_RECORD_STATUSES = ["active", "trash"];
12642
+ var COLLECTION_BULK_MAX = 100;
12643
+ var COLLECTION_BULK_ACTIONS = ["trash", "restore", "delete"];
12644
+ var COLLECTION_RECORDS_OFFSET_MAX = 1e6;
12390
12645
  var COLLECTION_DIGEST_SEPARATOR = "\n\n---\n\n";
12391
12646
  var COLLECTION_READ_WINDOW_HOURS_MAX = 720;
12392
12647
  var COLLECTION_READ_LIMIT_MAX = 200;
@@ -12546,8 +12801,14 @@ function mediaFromItem(item) {
12546
12801
  for (const key of IMAGE_KEYS) if (isHttpUrl(item[key]) && !push({ type: "image", url: item[key] })) break;
12547
12802
  for (const key of VIDEO_KEYS) if (isHttpUrl(item[key]) && !push({ type: "video", url: item[key] })) break;
12548
12803
  for (const key of AUDIO_KEYS) if (isHttpUrl(item[key]) && !push({ type: "audio", url: item[key] })) break;
12804
+ if (isHttpUrl(item.mediaUrl)) push({ type: mediaKindOf(item.mediaKind, item.mediaUrl), url: item.mediaUrl });
12549
12805
  return out;
12550
12806
  }
12807
+ function mediaKindOf(kind, url) {
12808
+ if (kind === "photo" || kind === "image") return "image";
12809
+ if (kind === "video" || kind === "audio") return kind;
12810
+ return loneMediaUrlKind(url) ?? "link";
12811
+ }
12551
12812
  function ingestRecordFromJson(item) {
12552
12813
  if (!isRecord2(item)) {
12553
12814
  const text2 = typeof item === "string" ? item : item === void 0 || item === null ? "" : JSON.stringify(item);
@@ -14250,7 +14511,6 @@ function transcribeWordTimestampsRefusal(provider) {
14250
14511
  }
14251
14512
  var TRANSCRIBE_JSON_OUT = "json";
14252
14513
  var TRANSCRIPT_IN = "transcript";
14253
- var RENDER_JSON_OUT = "json";
14254
14514
  function findWordlessTranscriptFeeds(nodes, edges) {
14255
14515
  const byId = new Map(nodes.map((n) => [n.id, n]));
14256
14516
  const isSkipped = (n) => !n || n.data?.skipped === true;
@@ -14275,9 +14535,12 @@ function findWordlessTranscriptFeeds(nodes, edges) {
14275
14535
  provider,
14276
14536
  message: `Captions need word timings, but ${refusal}.`
14277
14537
  });
14278
- } else if (rendersTranscriptJson(target.type) && !seen.has(target.id)) {
14279
- seen.add(target.id);
14280
- frontier.push({ id: target.id, outHandle: RENDER_JSON_OUT });
14538
+ } else if (!seen.has(target.id)) {
14539
+ const remapped = renderTranscriptOutputOf(target.type);
14540
+ if (remapped) {
14541
+ seen.add(target.id);
14542
+ frontier.push({ id: target.id, outHandle: remapped.handle });
14543
+ }
14281
14544
  }
14282
14545
  }
14283
14546
  }
@@ -14466,6 +14729,9 @@ var EXECUTION_DATA_KEYS = /* @__PURE__ */ new Set([
14466
14729
  "__pickedTotal",
14467
14730
  "__restTotal",
14468
14731
  "generatedJson",
14732
+ // A render's remapped transcript on its own pip (Speaker View's
14733
+ // `transcript`, RENDER_NODE_TYPES transcriptOutput) — run-result data.
14734
+ "generatedTranscript",
14469
14735
  // Edit Plan: a person's review of the plan (`EditedEdl`, edit-plan-review.ts),
14470
14736
  // kept beside `generatedJson` and fingerprinted against it. Run-result data
14471
14737
  // (TA14, decided 2026-10-04): out of undo, presets, templates and exports,
@@ -15593,14 +15859,19 @@ var PIPELINE_PINNABLE_VIDEO_MODELS = [
15593
15859
  "bytedance-pro"
15594
15860
  ];
15595
15861
  var PIPELINE_PINNABLE_SCRIPT_LLMS = [
15596
- "claude-haiku-4-5",
15862
+ "claude-haiku-5-5",
15597
15863
  "claude-sonnet-4-6",
15598
15864
  "claude-opus-4-7",
15599
15865
  "claude-opus-5"
15600
15866
  ];
15867
+ var PIPELINE_LEGACY_PINNED_SCRIPT_LLMS = ["claude-haiku-4-5"];
15868
+ var PIPELINE_ACCEPTED_SCRIPT_LLMS = [
15869
+ ...PIPELINE_PINNABLE_SCRIPT_LLMS,
15870
+ ...PIPELINE_LEGACY_PINNED_SCRIPT_LLMS
15871
+ ];
15601
15872
  var ImageModelEnum = zod.z.enum(PIPELINE_ACCEPTED_IMAGE_MODELS);
15602
15873
  var VideoModelEnum = zod.z.enum(PIPELINE_PINNABLE_VIDEO_MODELS);
15603
- var ScriptLlmEnum = zod.z.enum(PIPELINE_PINNABLE_SCRIPT_LLMS);
15874
+ var ScriptLlmEnum = zod.z.enum(PIPELINE_ACCEPTED_SCRIPT_LLMS);
15604
15875
  var StageModelsSchema = zod.z.object({
15605
15876
  characters_image: ImageModelEnum.optional(),
15606
15877
  locations_image: ImageModelEnum.optional(),
@@ -17201,114 +17472,6 @@ function clipNotesFrom(meta, single) {
17201
17472
  }));
17202
17473
  }
17203
17474
 
17204
- // src/entity-node-fields.ts
17205
- var ENTITY_NODE_KINDS = ["character", "object", "creature", "location"];
17206
- var ENTITY_DB_ID_FIELD = {
17207
- character: "characterDbId",
17208
- object: "objectDbId",
17209
- creature: "creatureDbId",
17210
- location: "locationDbId"
17211
- };
17212
- var ENTITY_NAME_FIELD = {
17213
- character: "characterName",
17214
- object: "objectName",
17215
- creature: "creatureName",
17216
- location: "locationName"
17217
- };
17218
- var ENTITY_TABLE = {
17219
- character: "characters",
17220
- object: "objects",
17221
- creature: "creatures",
17222
- location: "locations"
17223
- };
17224
- var ENTITY_BUCKET_FIELDS = {
17225
- character: [
17226
- ["expressions", "expressions"],
17227
- ["poses", "poses"],
17228
- ["motions", "motions"],
17229
- ["angles", "angles"],
17230
- ["body_angles", "bodyAngles"],
17231
- ["lighting_variations", "lightingVariations"],
17232
- ["outfit_variations", "outfitVariations"],
17233
- ["detail_closeups", "detailCloseups"],
17234
- ["sheets", "sheets"]
17235
- ],
17236
- object: [
17237
- ["angles", "angles"],
17238
- ["materials", "materials"],
17239
- ["variations", "variations"],
17240
- ["motion_clips", "motionClips"],
17241
- ["detail_closeups", "detailCloseups"],
17242
- ["sheets", "sheets"]
17243
- ],
17244
- creature: [
17245
- ["angles", "angles"],
17246
- ["poses", "poses"],
17247
- ["variations", "variations"],
17248
- ["motion_clips", "motionClips"],
17249
- ["detail_closeups", "detailCloseups"],
17250
- ["sheets", "sheets"]
17251
- ],
17252
- location: [
17253
- ["time_of_day", "timeOfDay"],
17254
- ["weather", "weather"],
17255
- ["angles", "angles"],
17256
- ["lighting", "lighting"],
17257
- ["seasons", "seasons"],
17258
- ["atmosphere_motions", "atmosphereMotions"],
17259
- ["detail_closeups", "detailCloseups"],
17260
- ["sheets", "sheets"]
17261
- ]
17262
- };
17263
- var ENTITY_SCALAR_FIELDS = [
17264
- ["name", "__name"],
17265
- // routed to the kind's own name field by the caller
17266
- ["description", "description"],
17267
- ["canonical_description", "canonicalDescription"],
17268
- ["source_image_url", "sourceImageUrl"]
17269
- ];
17270
- var ENTITY_KIND_SCALAR_FIELDS = {
17271
- character: [],
17272
- object: [["style_lock", "styleLock"]],
17273
- creature: [["style_lock", "styleLock"]],
17274
- location: [["style_lock", "styleLock"]]
17275
- };
17276
- function entityHydrationColumns(kind) {
17277
- return [
17278
- "id",
17279
- ...entityScalarFields(kind).map(([column]) => column),
17280
- ...ENTITY_BUCKET_FIELDS[kind].map(([column]) => column)
17281
- ];
17282
- }
17283
- function entityScalarFields(kind) {
17284
- return [...ENTITY_SCALAR_FIELDS, ...ENTITY_KIND_SCALAR_FIELDS[kind]];
17285
- }
17286
-
17287
- // src/lone-media-url.ts
17288
- var IMAGE_FILE_RE = /\.(png|jpe?g|gif|webp)$/i;
17289
- var VIDEO_FILE_RE = /\.(mp4|mov|webm|m4v)$/i;
17290
- function loneMediaUrlKind(value) {
17291
- const s = value.trim();
17292
- if (s.length === 0 || /[\s,]/.test(s) || !/^https?:\/\//i.test(s)) return null;
17293
- let pathname;
17294
- try {
17295
- pathname = new URL(s).pathname;
17296
- } catch {
17297
- return null;
17298
- }
17299
- if (IMAGE_FILE_RE.test(pathname)) return "image";
17300
- if (VIDEO_FILE_RE.test(pathname)) return "video";
17301
- return null;
17302
- }
17303
- var MESSAGE_TRIGGER_TYPES = /* @__PURE__ */ new Set(["telegram-trigger", "telegram-account-trigger"]);
17304
- function isLoneMediaLinkSource(nodeType) {
17305
- if (!nodeType) return false;
17306
- if (IMAGE_PRODUCER_TYPES.has(nodeType) || VIDEO_PRODUCER_TYPES.has(nodeType) || AUDIO_PRODUCER_TYPES.has(nodeType)) return false;
17307
- if (DYNAMIC_PRODUCER_TYPES.has(nodeType) || MESSAGE_TRIGGER_TYPES.has(nodeType)) return false;
17308
- if (ENTITY_NODE_KINDS.includes(nodeType) || nodeType === "face") return false;
17309
- return true;
17310
- }
17311
-
17312
17475
  // src/suno-track-sources.ts
17313
17476
  var SUNO_TRACK_SOURCE_TYPES = /* @__PURE__ */ new Set([
17314
17477
  "suno-generate",
@@ -17427,6 +17590,15 @@ var MODEL_PARAM_NODE_TYPES = /* @__PURE__ */ new Set([
17427
17590
  "modify-image",
17428
17591
  "edit-image"
17429
17592
  ]);
17593
+ var SOURCE_IMAGE_NODE_TYPES = /* @__PURE__ */ new Set([
17594
+ "image-to-image",
17595
+ "modify-image",
17596
+ "edit-image"
17597
+ ]);
17598
+ var AUTO_ASPECT_AT_RUN_NODE_TYPES = /* @__PURE__ */ new Set([
17599
+ ...SOURCE_IMAGE_NODE_TYPES,
17600
+ "generate-image"
17601
+ ]);
17430
17602
  function normalizeNodeModelParams(nodes) {
17431
17603
  const adjustments = [];
17432
17604
  const out = nodes.map((node) => {
@@ -17439,12 +17611,14 @@ function normalizeNodeModelParams(nodes) {
17439
17611
  if (multi.length > 1) return node;
17440
17612
  const provider = typeof d.provider === "string" ? d.provider : typeof multi[0] === "string" ? multi[0] : void 0;
17441
17613
  if (!provider) return node;
17614
+ const deferAuto = AUTO_ASPECT_AT_RUN_NODE_TYPES.has(type) && (type === "generate-image" ? imageGenAutoAspectNeedsSourceImage({ provider, aspectRatio: d.aspectRatio }) : autoAspectNeedsSourceImage(provider, d.aspectRatio));
17442
17615
  const normalized = normalizeModelInput(provider, {
17443
- aspectRatio: typeof d.aspectRatio === "string" ? d.aspectRatio : void 0,
17616
+ aspectRatio: !deferAuto && typeof d.aspectRatio === "string" ? d.aspectRatio : void 0,
17444
17617
  resolution: typeof d.resolution === "string" ? d.resolution : void 0,
17445
17618
  quality: typeof d.quality === "string" ? d.quality : void 0
17446
17619
  });
17447
- if (normalized.adjustments.length === 0) return node;
17620
+ const respell = deferAuto && d.aspectRatio !== "auto";
17621
+ if (normalized.adjustments.length === 0 && !respell) return node;
17448
17622
  const nodeId = typeof node.id === "string" ? node.id : "(unknown node)";
17449
17623
  for (const adj of normalized.adjustments) {
17450
17624
  adjustments.push({ ...adj, nodeId, provider });
@@ -17453,7 +17627,7 @@ function normalizeNodeModelParams(nodes) {
17453
17627
  ...node,
17454
17628
  data: {
17455
17629
  ...d,
17456
- aspectRatio: normalized.aspectRatio,
17630
+ aspectRatio: deferAuto ? "auto" : normalized.aspectRatio,
17457
17631
  resolution: normalized.resolution,
17458
17632
  quality: normalized.quality
17459
17633
  }
@@ -22524,6 +22698,8 @@ function speakerPresentationWarnings(edl) {
22524
22698
  var EDL_VERSION = 1;
22525
22699
  var EDL_SOURCE_ROLES = ["master-audio", "camera", "wide", "screen"];
22526
22700
  var KNOWN_SOURCE_ROLES = new Set(EDL_SOURCE_ROLES);
22701
+ var FOLLOW_MOTIONS = ["static", "glide"];
22702
+ var KNOWN_FOLLOW_MOTIONS = new Set(FOLLOW_MOTIONS);
22527
22703
  function transcriptDurationSec(transcript) {
22528
22704
  if (!transcript || typeof transcript !== "object") return void 0;
22529
22705
  const t2 = transcript;
@@ -22650,6 +22826,7 @@ function validateEdl(edl) {
22650
22826
  }
22651
22827
  if (slot.weight !== void 0 && !inRange(slot.weight)) issues.push(`${at}: slot.weight=${slot.weight} out of 0..1`);
22652
22828
  if (slot.region) issues.push(...regionIssues(slot.region, `${at} slot "${slot.source}"`));
22829
+ if (slot.follow) issues.push(...followIssues(slot.follow, slot.source, `${at} slot "${slot.source}"`));
22653
22830
  }
22654
22831
  });
22655
22832
  for (const d of edl.dropped ?? []) {
@@ -22704,6 +22881,11 @@ function outputMsToMasterMs(edl, outputMs) {
22704
22881
  function remapTranscriptThroughEdl(edl, transcript) {
22705
22882
  const off = offsetFor(edl, transcript.sourceId);
22706
22883
  const starts = segmentOutputStarts(edl);
22884
+ const touches = (j) => {
22885
+ const a = edl.segments[j];
22886
+ const b = edl.segments[j + 1];
22887
+ return b.inMs === a.outMs && starts[j + 1] === starts[j] + Math.max(0, a.outMs - a.inMs);
22888
+ };
22707
22889
  const mapWord = (w) => {
22708
22890
  const startMaster = w.startMs + off;
22709
22891
  const endMaster = w.endMs + off;
@@ -22720,8 +22902,11 @@ function remapTranscriptThroughEdl(edl, transcript) {
22720
22902
  for (let i = 0; i < edl.segments.length; i++) {
22721
22903
  const seg = edl.segments[i];
22722
22904
  const lo = Math.max(startMaster, seg.inMs);
22723
- const hi = Math.min(endMaster, seg.outMs);
22905
+ let hi = Math.min(endMaster, seg.outMs);
22724
22906
  if (lo < hi) {
22907
+ for (let j = i; hi < endMaster && j + 1 < edl.segments.length && touches(j); j++) {
22908
+ hi = Math.min(endMaster, edl.segments[j + 1].outMs);
22909
+ }
22725
22910
  return {
22726
22911
  ...w,
22727
22912
  startMs: Math.round(starts[i] + (lo - seg.inMs)),
@@ -22835,6 +23020,24 @@ function normalizeEdl(input) {
22835
23020
  ...meta ? { meta } : {}
22836
23021
  };
22837
23022
  }
23023
+ function followIssues(follow, slotSource, at) {
23024
+ const f = follow;
23025
+ const issues = [];
23026
+ if (f.sourceId !== slotSource) issues.push(`${at}: follow.sourceId ${JSON.stringify(f.sourceId)} is not the slot's source "${slotSource}"`);
23027
+ if (typeof f.trackId !== "string" || !f.trackId.trim()) issues.push(`${at}: follow.trackId is empty`);
23028
+ if (typeof f.motion !== "string" || !KNOWN_FOLLOW_MOTIONS.has(f.motion)) {
23029
+ issues.push(`${at}: follow.motion ${JSON.stringify(f.motion)} is not one of ${FOLLOW_MOTIONS.join(", ")}`);
23030
+ }
23031
+ return issues;
23032
+ }
23033
+ function normalizeFollow(input) {
23034
+ if (!input || typeof input !== "object") return void 0;
23035
+ const o = input;
23036
+ const sourceId = str3(o.sourceId);
23037
+ const trackId = str3(o.trackId);
23038
+ if (!sourceId || !trackId || typeof o.motion !== "string" || !KNOWN_FOLLOW_MOTIONS.has(o.motion)) return void 0;
23039
+ return { sourceId, trackId, motion: o.motion };
23040
+ }
22838
23041
  function normalizeLayout(input, dropTransition = false) {
22839
23042
  if (!input || typeof input !== "object") return void 0;
22840
23043
  const o = input;
@@ -22844,11 +23047,13 @@ function normalizeLayout(input, dropTransition = false) {
22844
23047
  const source = str3(s.source);
22845
23048
  if (!source) return null;
22846
23049
  const region = normalizeRegion(s.region);
23050
+ const follow = normalizeFollow(s.follow);
22847
23051
  return {
22848
23052
  source,
22849
23053
  ...region ? { region } : {},
22850
23054
  ...str3(s.speaker) ? { speaker: str3(s.speaker) } : {},
22851
- ...s.weight !== void 0 ? { weight: clamp012(num(s.weight)) } : {}
23055
+ ...s.weight !== void 0 ? { weight: clamp012(num(s.weight)) } : {},
23056
+ ...follow ? { follow } : {}
22852
23057
  };
22853
23058
  }).filter((x) => x !== null) : void 0;
22854
23059
  const emphasis = o.emphasis && typeof o.emphasis === "object" ? { style: str3(o.emphasis.style) ?? "none", durationMs: Math.round(num(o.emphasis.durationMs)) } : void 0;
@@ -22860,34 +23065,57 @@ function normalizeLayout(input, dropTransition = false) {
22860
23065
  ...transition ? { transition } : {}
22861
23066
  };
22862
23067
  }
23068
+ function timeMs(v) {
23069
+ const n = typeof v === "number" ? v : typeof v === "string" && v.trim() !== "" ? Number(v) : Number.NaN;
23070
+ return Number.isFinite(n) && n >= 0 ? Math.round(n) : void 0;
23071
+ }
23072
+ function spanMs(o) {
23073
+ const startMs = timeMs(o.startMs ?? o.start);
23074
+ const endMs = timeMs(o.endMs ?? o.end);
23075
+ if (startMs === void 0 || endMs === void 0 || endMs < startMs) return void 0;
23076
+ return { startMs, endMs };
23077
+ }
22863
23078
  function normalizeTranscript(input) {
22864
23079
  const o = input && typeof input === "object" ? input : {};
22865
- const words = Array.isArray(o.words) ? o.words.map((raw) => {
22866
- const w = raw ?? {};
22867
- const startMs = Math.round(num(w.startMs));
22868
- return {
22869
- text: str3(w.text) ?? "",
22870
- startMs,
22871
- // Never inverted: an endMs < startMs (garbage upstream) would be
22872
- // silently dropped at remap; clamp it to a non-negative width.
22873
- endMs: Math.max(startMs, Math.round(num(w.endMs))),
22874
- ...str3(w.speaker) ? { speaker: str3(w.speaker) } : {},
22875
- ...typeof w.confidence === "number" ? { confidence: w.confidence } : {}
22876
- };
22877
- }) : [];
22878
- const segments = Array.isArray(o.segments) ? o.segments.map((raw) => {
22879
- const s = raw ?? {};
22880
- const startMs = Math.round(num(s.startMs));
22881
- return { startMs, endMs: Math.max(startMs, Math.round(num(s.endMs))), text: str3(s.text) ?? "", ...str3(s.speaker) ? { speaker: str3(s.speaker) } : {} };
23080
+ const words = [];
23081
+ if (Array.isArray(o.words)) {
23082
+ for (const raw of o.words) {
23083
+ if (!raw || typeof raw !== "object") continue;
23084
+ const w = raw;
23085
+ const span = spanMs(w);
23086
+ if (!span) continue;
23087
+ words.push({
23088
+ text: str3(w.text) ?? "",
23089
+ ...span,
23090
+ ...str3(w.speaker) ? { speaker: str3(w.speaker) } : {},
23091
+ ...typeof w.confidence === "number" ? { confidence: w.confidence } : {}
23092
+ });
23093
+ }
23094
+ words.sort((a, b) => a.startMs - b.startMs);
23095
+ }
23096
+ const segments = Array.isArray(o.segments) ? o.segments.flatMap((raw) => {
23097
+ if (!raw || typeof raw !== "object") return [];
23098
+ const s = raw;
23099
+ const span = spanMs(s);
23100
+ return span ? [{ ...span, text: str3(s.text) ?? "", ...str3(s.speaker) ? { speaker: str3(s.speaker) } : {} }] : [];
22882
23101
  }) : void 0;
23102
+ const speakerNames = speakerNamesOf(o.speakerNames);
22883
23103
  return {
22884
23104
  version: EDL_VERSION,
22885
23105
  ...str3(o.sourceId) ? { sourceId: str3(o.sourceId) } : {},
22886
23106
  ...str3(o.language) ? { language: str3(o.language) } : {},
22887
23107
  words,
22888
- ...segments ? { segments } : {}
23108
+ ...segments ? { segments } : {},
23109
+ ...speakerNames ? { speakerNames } : {}
22889
23110
  };
22890
23111
  }
23112
+ function speakerNamesOf(v) {
23113
+ if (!v || typeof v !== "object" || Array.isArray(v)) return void 0;
23114
+ const entries = Object.entries(v).filter(
23115
+ (e) => e[0].length > 0 && typeof e[1] === "string" && e[1].length > 0
23116
+ );
23117
+ return entries.length > 0 ? Object.fromEntries(entries) : void 0;
23118
+ }
22891
23119
 
22892
23120
  // src/speaker-tracks.ts
22893
23121
  var SPEAKER_TRACKS_VERSION = 1;
@@ -23255,12 +23483,11 @@ var parseMaybe = (raw) => {
23255
23483
  }
23256
23484
  };
23257
23485
  function transcriptSpeakerLabels(transcript) {
23258
- const words = parseMaybe(transcript)?.words;
23259
- if (!Array.isArray(words)) return [];
23486
+ const parsed = parseMaybe(transcript);
23487
+ if (!parsed || typeof parsed !== "object") return [];
23260
23488
  const seen = /* @__PURE__ */ new Set();
23261
- for (const w of words) {
23262
- const s = w?.speaker;
23263
- if (typeof s === "string" && s && !seen.has(s)) seen.add(s);
23489
+ for (const w of normalizeTranscript(parsed).words) {
23490
+ if (w.speaker && !seen.has(w.speaker)) seen.add(w.speaker);
23264
23491
  }
23265
23492
  return [...seen];
23266
23493
  }
@@ -24176,6 +24403,7 @@ exports.AUDIO_FX_PRESET_SET = AUDIO_FX_PRESET_SET;
24176
24403
  exports.AUDIO_FX_REVERB_PRESETS = AUDIO_FX_REVERB_PRESETS;
24177
24404
  exports.AUDIO_PRODUCER_TYPES = AUDIO_PRODUCER_TYPES;
24178
24405
  exports.AUDIO_SYNC_MIN_CONFIDENCE = AUDIO_SYNC_MIN_CONFIDENCE;
24406
+ exports.AUTO_ASPECT_AT_RUN_NODE_TYPES = AUTO_ASPECT_AT_RUN_NODE_TYPES;
24179
24407
  exports.AUTO_DOWNLOAD_MAX_SEC = AUTO_DOWNLOAD_MAX_SEC;
24180
24408
  exports.AddBRollResultSchema = AddBRollResultSchema;
24181
24409
  exports.AnchorSceneStyleResultSchema = AnchorSceneStyleResultSchema;
@@ -24234,6 +24462,8 @@ exports.CINEMATIC_RESERVE_IDS = CINEMATIC_RESERVE_IDS;
24234
24462
  exports.COLLABORATOR_ROLES = COLLABORATOR_ROLES;
24235
24463
  exports.COLLECTIONS_PAGE_DEFAULT = COLLECTIONS_PAGE_DEFAULT;
24236
24464
  exports.COLLECTIONS_PAGE_MAX = COLLECTIONS_PAGE_MAX;
24465
+ exports.COLLECTION_BULK_ACTIONS = COLLECTION_BULK_ACTIONS;
24466
+ exports.COLLECTION_BULK_MAX = COLLECTION_BULK_MAX;
24237
24467
  exports.COLLECTION_DEDUPE_KEY_MAX = COLLECTION_DEDUPE_KEY_MAX;
24238
24468
  exports.COLLECTION_DESCRIPTION_MAX = COLLECTION_DESCRIPTION_MAX;
24239
24469
  exports.COLLECTION_DIGEST_SEPARATOR = COLLECTION_DIGEST_SEPARATOR;
@@ -24244,13 +24474,16 @@ exports.COLLECTION_MEDIA_TYPES = COLLECTION_MEDIA_TYPES;
24244
24474
  exports.COLLECTION_NAME_MAX = COLLECTION_NAME_MAX;
24245
24475
  exports.COLLECTION_READ_LIMIT_MAX = COLLECTION_READ_LIMIT_MAX;
24246
24476
  exports.COLLECTION_READ_WINDOW_HOURS_MAX = COLLECTION_READ_WINDOW_HOURS_MAX;
24477
+ exports.COLLECTION_RECORDS_OFFSET_MAX = COLLECTION_RECORDS_OFFSET_MAX;
24247
24478
  exports.COLLECTION_RECORD_FIELDS_BYTES_MAX = COLLECTION_RECORD_FIELDS_BYTES_MAX;
24248
24479
  exports.COLLECTION_RECORD_FIELDS_MAX = COLLECTION_RECORD_FIELDS_MAX;
24249
24480
  exports.COLLECTION_RECORD_MEDIA_MAX = COLLECTION_RECORD_MEDIA_MAX;
24481
+ exports.COLLECTION_RECORD_STATUSES = COLLECTION_RECORD_STATUSES;
24250
24482
  exports.COLLECTION_RECORD_TEXT_MAX = COLLECTION_RECORD_TEXT_MAX;
24251
24483
  exports.COLLECTION_RECORD_TITLE_MAX = COLLECTION_RECORD_TITLE_MAX;
24252
24484
  exports.COLLECTION_RECORD_URL_MAX = COLLECTION_RECORD_URL_MAX;
24253
24485
  exports.COLLECTION_TIER_CAPS = COLLECTION_TIER_CAPS;
24486
+ exports.COLLECTION_USAGES = COLLECTION_USAGES;
24254
24487
  exports.COLLECT_IN_HANDLE = COLLECT_IN_HANDLE;
24255
24488
  exports.COMBINE_TRANSITIONS = COMBINE_TRANSITIONS;
24256
24489
  exports.COMBINE_TRANSITION_GROUP_LABELS = COMBINE_TRANSITION_GROUP_LABELS;
@@ -24470,6 +24703,7 @@ exports.LIP_SYNC_MAX_AUDIO_SECONDS = LIP_SYNC_MAX_AUDIO_SECONDS;
24470
24703
  exports.LIP_SYNC_PROVIDERS = LIP_SYNC_PROVIDERS;
24471
24704
  exports.LLM_CREDIT_RUNGS = LLM_CREDIT_RUNGS;
24472
24705
  exports.LLM_FEATURE_DEFAULTS = LLM_FEATURE_DEFAULTS;
24706
+ exports.LLM_FEATURE_DEFAULT_EFFORTS = LLM_FEATURE_DEFAULT_EFFORTS;
24473
24707
  exports.LLM_MODALITY_CAPS = LLM_MODALITY_CAPS;
24474
24708
  exports.LLM_MODELS = LLM_MODELS;
24475
24709
  exports.LLM_MODEL_IDS = LLM_MODEL_IDS;
@@ -24596,10 +24830,12 @@ exports.PAYG_RETENTION_DAYS = PAYG_RETENTION_DAYS;
24596
24830
  exports.PER_FORMAT_DURATION_BOUNDS = PER_FORMAT_DURATION_BOUNDS;
24597
24831
  exports.PICKER_TO_COMBINE_TRANSITION = PICKER_TO_COMBINE_TRANSITION;
24598
24832
  exports.PIPELINE_ACCEPTED_IMAGE_MODELS = PIPELINE_ACCEPTED_IMAGE_MODELS;
24833
+ exports.PIPELINE_ACCEPTED_SCRIPT_LLMS = PIPELINE_ACCEPTED_SCRIPT_LLMS;
24599
24834
  exports.PIPELINE_ACTIVATION_MODES = PIPELINE_ACTIVATION_MODES;
24600
24835
  exports.PIPELINE_FORMATS = PIPELINE_FORMATS;
24601
24836
  exports.PIPELINE_HARD_TIMEOUT_MS = PIPELINE_HARD_TIMEOUT_MS;
24602
24837
  exports.PIPELINE_LEGACY_PINNED_IMAGE_MODELS = PIPELINE_LEGACY_PINNED_IMAGE_MODELS;
24838
+ exports.PIPELINE_LEGACY_PINNED_SCRIPT_LLMS = PIPELINE_LEGACY_PINNED_SCRIPT_LLMS;
24603
24839
  exports.PIPELINE_MODEL_STAGES = PIPELINE_MODEL_STAGES;
24604
24840
  exports.PIPELINE_MODES = PIPELINE_MODES;
24605
24841
  exports.PIPELINE_OUTPUT_RESOLUTIONS = PIPELINE_OUTPUT_RESOLUTIONS;
@@ -24673,6 +24909,7 @@ exports.RENDERING_SPEED_SUPPORT = RENDERING_SPEED_SUPPORT;
24673
24909
  exports.RENDER_FINAL_CODES = RENDER_FINAL_CODES;
24674
24910
  exports.RENDER_FINAL_NODE_NOT_FOUND = RENDER_FINAL_NODE_NOT_FOUND;
24675
24911
  exports.RENDER_FINAL_NOT_A_RENDER = RENDER_FINAL_NOT_A_RENDER;
24912
+ exports.RENDER_JSON_HANDLE = RENDER_JSON_HANDLE;
24676
24913
  exports.RENDER_NODE_TYPES = RENDER_NODE_TYPES;
24677
24914
  exports.RENDER_NODE_TYPE_IDS = RENDER_NODE_TYPE_IDS;
24678
24915
  exports.RENDER_VIDEO_CREDIT_ID = RENDER_VIDEO_CREDIT_ID;
@@ -24805,6 +25042,7 @@ exports.SOCIAL_SEARCH_PLATFORM_MODES = SOCIAL_SEARCH_PLATFORM_MODES;
24805
25042
  exports.SOCIAL_SEARCH_SORTS = SOCIAL_SEARCH_SORTS;
24806
25043
  exports.SOCIAL_SEARCH_VIDEO_KINDS = SOCIAL_SEARCH_VIDEO_KINDS;
24807
25044
  exports.SOCIAL_VIDEO_HOSTS = SOCIAL_VIDEO_HOSTS;
25045
+ exports.SOURCE_IMAGE_NODE_TYPES = SOURCE_IMAGE_NODE_TYPES;
24808
25046
  exports.SPEAKER_EMPHASIS_STYLES = SPEAKER_EMPHASIS_STYLES;
24809
25047
  exports.SPEAKER_LAYOUTS = SPEAKER_LAYOUTS;
24810
25048
  exports.SPEAKER_LAYOUT_IDS = SPEAKER_LAYOUT_IDS;
@@ -25050,6 +25288,7 @@ exports.aspectRatioToNumber = aspectRatioToNumber;
25050
25288
  exports.assembleNarratedVideoCredits = assembleNarratedVideoCredits;
25051
25289
  exports.assembleVideoOverlayRequest = assembleVideoOverlayRequest;
25052
25290
  exports.assertCanvasExecutionAllowed = assertCanvasExecutionAllowed;
25291
+ exports.autoAspectNeedsSourceImage = autoAspectNeedsSourceImage;
25053
25292
  exports.autoStrokeWidth = autoStrokeWidth;
25054
25293
  exports.availableReasoningEfforts = availableReasoningEfforts;
25055
25294
  exports.bucketSecondsFromAuditCreditId = bucketSecondsFromAuditCreditId;
@@ -25152,6 +25391,7 @@ exports.decodeProviderItem = decodeProviderItem;
25152
25391
  exports.defaultCarriedFraction = defaultCarriedFraction;
25153
25392
  exports.defaultEdgeOutputMode = defaultEdgeOutputMode;
25154
25393
  exports.defaultImageModel = defaultImageModel;
25394
+ exports.defaultReasoningEffort = defaultReasoningEffort;
25155
25395
  exports.defaultResolutionFor = defaultResolutionFor;
25156
25396
  exports.defaultRoleForSource = defaultRoleForSource;
25157
25397
  exports.defaultSpeakerMap = defaultSpeakerMap;
@@ -25306,6 +25546,7 @@ exports.hexToRgbaArray = hexToRgbaArray;
25306
25546
  exports.holdsPreviewRender = holdsPreviewRender;
25307
25547
  exports.hostnameMatchesAllowlist = hostnameMatchesAllowlist;
25308
25548
  exports.humanizeSlotSid = humanizeSlotSid;
25549
+ exports.imageGenAutoAspectNeedsSourceImage = imageGenAutoAspectNeedsSourceImage;
25309
25550
  exports.imageMentionSlug = imageMentionSlug;
25310
25551
  exports.imageMentionSlugForRef = imageMentionSlugForRef;
25311
25552
  exports.imageModelDrawsRatio = imageModelDrawsRatio;
@@ -25323,6 +25564,7 @@ exports.instagramScrapeMode = instagramScrapeMode;
25323
25564
  exports.instagramScrapeSources = instagramScrapeSources;
25324
25565
  exports.instagramScrapeTier = instagramScrapeTier;
25325
25566
  exports.isAggregateableType = isAggregateableType;
25567
+ exports.isAutoAspectToken = isAutoAspectToken;
25326
25568
  exports.isAutoVideoDuration = isAutoVideoDuration;
25327
25569
  exports.isCharacterAspectRatio = isCharacterAspectRatio;
25328
25570
  exports.isCollectInEdge = isCollectInEdge;
@@ -25367,6 +25609,7 @@ exports.isPro3DRenderJobOutput = isPro3DRenderJobOutput;
25367
25609
  exports.isPro3DRenderQuote = isPro3DRenderQuote;
25368
25610
  exports.isPro3DRenderRenderOnly = isPro3DRenderRenderOnly;
25369
25611
  exports.isProjectedTriggerNodeType = isProjectedTriggerNodeType;
25612
+ exports.isRenderDataHandle = isRenderDataHandle;
25370
25613
  exports.isRenderNodeType = isRenderNodeType;
25371
25614
  exports.isRtlText = isRtlText;
25372
25615
  exports.isScene3DAuthoringEngine = isScene3DAuthoringEngine;
@@ -25456,6 +25699,7 @@ exports.modelToNodeTarget = modelToNodeTarget;
25456
25699
  exports.modelsForInputMode = modelsForInputMode;
25457
25700
  exports.modelsWithFeature = modelsWithFeature;
25458
25701
  exports.motionGraphicsFeature = motionGraphicsFeature;
25702
+ exports.nearestCatalogAspectRatio = nearestCatalogAspectRatio;
25459
25703
  exports.newScene3DRevisionId = newScene3DRevisionId;
25460
25704
  exports.nextScheduleRuns = nextScheduleRuns;
25461
25705
  exports.nodeFeedsAnything = nodeFeedsAnything;
@@ -25483,6 +25727,7 @@ exports.normalizeTtsNeighbourText = normalizeTtsNeighbourText;
25483
25727
  exports.normalizeVideoOverlayNodes = normalizeVideoOverlayNodes;
25484
25728
  exports.normalizeVideoRequestParams = normalizeVideoRequestParams;
25485
25729
  exports.normalizeWan3Resolution = normalizeWan3Resolution;
25730
+ exports.normalizedImageGenModelId = normalizedImageGenModelId;
25486
25731
  exports.orderedLlmModels = orderedLlmModels;
25487
25732
  exports.outputMsToMasterMs = outputMsToMasterMs;
25488
25733
  exports.overlayFontById = overlayFontById;
@@ -25569,8 +25814,10 @@ exports.renderPlanValue = renderPlanValue;
25569
25814
  exports.renderReadBasis = renderReadBasis;
25570
25815
  exports.renderResultStamp = renderResultStamp;
25571
25816
  exports.renderRunQuality = renderRunQuality;
25817
+ exports.renderSavedJsonOutputs = renderSavedJsonOutputs;
25572
25818
  exports.renderSentRowStamps = renderSentRowStamps;
25573
25819
  exports.renderSettingsBasis = renderSettingsBasis;
25820
+ exports.renderTranscriptOutputOf = renderTranscriptOutputOf;
25574
25821
  exports.renderVideoCreditId = renderVideoCreditId;
25575
25822
  exports.renderedSourceHandle = renderedSourceHandle;
25576
25823
  exports.rendersAsPreview = rendersAsPreview;