hyperframes 0.8.176 → 0.8.178

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/bin/hyperframes.mjs +3 -0
  2. package/dist/{add-YZGUHLDP.js → add-C4GN5ZDP.js} +12 -12
  3. package/dist/{animatedGifPrep-6SPYXSHE.js → animatedGifPrep-S6XXOOXK.js} +7 -7
  4. package/dist/api.d.ts +2 -0
  5. package/dist/api.js +15 -15
  6. package/dist/{asset-YPC34MTV.js → asset-WTZ44Q7G.js} +2 -2
  7. package/dist/{assetCataloger-5GGNQC3Y.js → assetCataloger-MSAMR77T.js} +7 -7
  8. package/dist/{audio-33JHU37L.js → audio-ZSWOKO3D.js} +14 -14
  9. package/dist/{auth-UUIHOS2D.js → auth-EUSWPXME.js} +1 -1
  10. package/dist/{autoUpdate-F747BE3R.js → autoUpdate-WWXRJ2W7.js} +2 -2
  11. package/dist/{backgroundChecks-3YLO2CSC.js → backgroundChecks-B2IJHAP6.js} +3 -3
  12. package/dist/backgroundChecksWorker.js +3 -3
  13. package/dist/{batchRender-KXXTVNPB.js → batchRender-OOQYGH5A.js} +4 -4
  14. package/dist/{beats-DQDV2ZFS.js → beats-OJT75KQY.js} +5 -5
  15. package/dist/{benchmark-ZPPZEIHZ.js → benchmark-EZTB4ITW.js} +9 -9
  16. package/dist/{browser-ZFLEP3E6.js → browser-DNHBS5C7.js} +9 -8
  17. package/dist/{bundleWithLocalizedFonts-PMRGOQWD.js → bundleWithLocalizedFonts-GJAML42J.js} +2 -2
  18. package/dist/{capture-6XCCIPT4.js → capture-YRS6SZ6B.js} +11 -11
  19. package/dist/{capture-5OW6VNXU.js → capture-ZBGAJYVH.js} +2 -2
  20. package/dist/captureCompositionFrame-Z33NWUED.js +88 -0
  21. package/dist/{catalog-3A6KKCWF.js → catalog-YF23PXV2.js} +25 -17
  22. package/dist/{catch-up-KPGCLN4C.js → catch-up-YZZDUDRQ.js} +5 -5
  23. package/dist/{check-I3XLXS77.js → check-NVGQ5PMF.js} +60 -49
  24. package/dist/{checkBrowser-KX7LNAFA.js → checkBrowser-JX22QQDH.js} +79 -59
  25. package/dist/{chunk-42T7OP4O.js → chunk-32GKQ73S.js} +1 -1
  26. package/dist/{chunk-3Q4Y33FT.js → chunk-3EJYUZHW.js} +20 -18
  27. package/dist/{chunk-L6XT6GSV.js → chunk-52L2L46Q.js} +1 -1
  28. package/dist/chunk-537IYAEE.js +80 -0
  29. package/dist/{chunk-USEUH5VV.js → chunk-5PK3RLSB.js} +2 -2
  30. package/dist/{chunk-GVIH4ZQY.js → chunk-5RS2FIZU.js} +1 -1
  31. package/dist/{chunk-VER46LXI.js → chunk-62OXHKLS.js} +2 -2
  32. package/dist/{chunk-T76PLPD6.js → chunk-634HSJ3J.js} +2 -1
  33. package/dist/{chunk-HVMHVW5G.js → chunk-74Z2T3YM.js} +1 -1
  34. package/dist/{chunk-5TGVURKQ.js → chunk-7IAVKLNC.js} +1 -1
  35. package/dist/{chunk-L3LJVYXS.js → chunk-A2BB2XQU.js} +2 -2
  36. package/dist/{chunk-DQY6WTF7.js → chunk-A3RUVTGB.js} +1 -1
  37. package/dist/{chunk-OYEDHVSI.js → chunk-AFKVI7FJ.js} +1 -1
  38. package/dist/{chunk-VEQ7DKPG.js → chunk-AHS5QYKF.js} +1 -1
  39. package/dist/{chunk-FFDC5OWV.js → chunk-ALVXFXUG.js} +5 -3
  40. package/dist/{chunk-OMUKSCWE.js → chunk-AR5MS234.js} +13 -13
  41. package/dist/{chunk-R2TVJ4DW.js → chunk-AYEWZYYC.js} +1 -1
  42. package/dist/{chunk-TNDNFZOK.js → chunk-BGKZ37BC.js} +2 -2
  43. package/dist/{chunk-LY2GLSOS.js → chunk-BJJ3QF7T.js} +1 -1
  44. package/dist/{chunk-5EA4C6RA.js → chunk-BNGRVR3Y.js} +6 -6
  45. package/dist/{chunk-EEVCXPUA.js → chunk-C4FH67KI.js} +2 -2
  46. package/dist/{chunk-MG66UO4N.js → chunk-CJRGV2JW.js} +1 -1
  47. package/dist/{chunk-7LU4ZHYV.js → chunk-DKGZR7QA.js} +1 -1
  48. package/dist/{chunk-XRKMITSS.js → chunk-E24HSMZV.js} +12 -51
  49. package/dist/{chunk-44XBAKKT.js → chunk-EBKIF46T.js} +2 -2
  50. package/dist/{chunk-RBOVQRMR.js → chunk-EINNFZAW.js} +7 -13
  51. package/dist/{chunk-EOOEC32M.js → chunk-EVMY7IPL.js} +22 -0
  52. package/dist/{chunk-PL4WM5XE.js → chunk-FIAQ4J45.js} +2 -2
  53. package/dist/{chunk-J53AJK3Q.js → chunk-FTWOVWHR.js} +2 -2
  54. package/dist/{chunk-X6ZRZWPZ.js → chunk-G3M4BIFN.js} +1 -1
  55. package/dist/{chunk-VDUTZXIJ.js → chunk-HFUMZZ4T.js} +5 -5
  56. package/dist/{chunk-MDTMWUJI.js → chunk-HNMRB77F.js} +1 -1
  57. package/dist/{chunk-GMJ3ILLW.js → chunk-ICMXC3MI.js} +7 -24
  58. package/dist/{chunk-LZT3NUTE.js → chunk-IE6O2VXV.js} +1 -1
  59. package/dist/{chunk-HTC3VGU3.js → chunk-J4GE3BCG.js} +29 -10
  60. package/dist/{chunk-X4PK5ZXP.js → chunk-LO4DHZLH.js} +3 -3
  61. package/dist/{chunk-NGRNAF5X.js → chunk-N66NVE65.js} +1 -1
  62. package/dist/{chunk-7XX4QGQV.js → chunk-N6S6V2DY.js} +52 -16
  63. package/dist/{chunk-LEILKM2N.js → chunk-O7PFPCQF.js} +193 -65
  64. package/dist/{chunk-KUOUUG33.js → chunk-ORM7SJ7K.js} +85 -43
  65. package/dist/chunk-PLNQW2C6.js +3805 -0
  66. package/dist/{chunk-JNL3RMDG.js → chunk-PU33GPG4.js} +1 -1
  67. package/dist/{chunk-W47D3KOB.js → chunk-RHWJKSGH.js} +1 -1
  68. package/dist/{chunk-B7DJQFAC.js → chunk-RTABHL2G.js} +3 -3
  69. package/dist/{chunk-K535ASAM.js → chunk-TINAVSGR.js} +1 -1
  70. package/dist/{chunk-C6TPGUWD.js → chunk-TTVHYD5R.js} +2 -2
  71. package/dist/{chunk-GOOB64LO.js → chunk-U2AIXPAQ.js} +2 -2
  72. package/dist/{chunk-BVXZYFAL.js → chunk-UIXHQ4QG.js} +7 -7
  73. package/dist/{chunk-QWCXGTOH.js → chunk-UOHQV6AV.js} +24 -12
  74. package/dist/{chunk-SURF34CK.js → chunk-UQEBSY5U.js} +1 -1
  75. package/dist/{chunk-5ZSLJXQX.js → chunk-UWPUEI5U.js} +2 -2
  76. package/dist/{chunk-BTCHRQNV.js → chunk-V6WIQWUB.js} +3 -3
  77. package/dist/{chunk-OUMYTLPP.js → chunk-VCDWVVDV.js} +11 -7
  78. package/dist/{chunk-YWSXFFO3.js → chunk-VU4JLRNH.js} +156 -76
  79. package/dist/{chunk-MLRCTTSD.js → chunk-XBZOYP4D.js} +96 -11
  80. package/dist/{chunk-X6HYBA4A.js → chunk-XSQWXUK2.js} +1 -1
  81. package/dist/{chunk-SSE6NWZI.js → chunk-Y6JLEN3P.js} +14 -14
  82. package/dist/{chunk-KRKSY2AE.js → chunk-YAPJOCSH.js} +1 -1
  83. package/dist/{chunk-NWEER3QY.js → chunk-YH7VQAKX.js} +2 -2
  84. package/dist/{chunk-DZMWNCHM.js → chunk-ZAJO3YCQ.js} +2 -2
  85. package/dist/{chunk-T6NA6TR3.js → chunk-ZAO7FTQM.js} +2 -2
  86. package/dist/{clean-6REGQY3I.js → clean-ODNP4ELD.js} +23 -23
  87. package/dist/cli.js +53 -53
  88. package/dist/{cloud-RAQZPMNP.js → cloud-2DACBBEP.js} +4 -4
  89. package/dist/{cloudrun-P35BPQCO.js → cloudrun-QSVGI2TT.js} +5 -5
  90. package/dist/commands/contrast-audit.browser.js +166 -22
  91. package/dist/{compare-XYFSHHMQ.js → compare-HMMGOM4F.js} +34 -34
  92. package/dist/{compiler-5TFPJPQQ.js → compiler-CQ6OKYT5.js} +2 -2
  93. package/dist/{component-CRAO6Q2E.js → component-C6OLXSIK.js} +3 -3
  94. package/dist/{compositions-4SHILZZX.js → compositions-MOGZ4ASK.js} +11 -11
  95. package/dist/{delete-ZS4AHMTY.js → delete-MDAYHORQ.js} +2 -2
  96. package/dist/{dist-U2HCECNB.js → dist-MHJYD5IZ.js} +6 -4
  97. package/dist/{doctor-OL4FYABY.js → doctor-VEKKYMQT.js} +12 -12
  98. package/dist/{events-Z3XZCRFZ.js → events-CSKJXRJU.js} +4 -4
  99. package/dist/{events-LIJBGTTX.js → events-SKMTX6HF.js} +2 -2
  100. package/dist/{feedback-OE6SB2VE.js → feedback-64AKUFHZ.js} +7 -7
  101. package/dist/{ffmpeg-CSJLJAQ3.js → ffmpeg-64E4VH6W.js} +7 -7
  102. package/dist/{figma-DMUCMO67.js → figma-YEY76ZPG.js} +3 -3
  103. package/dist/fontLocalizeCli.js +10 -10
  104. package/dist/{get-NQOQVUI5.js → get-YJS76PGZ.js} +2 -2
  105. package/dist/{gpuPolicy-C6JWEX7F.js → gpuPolicy-IGZOHHMX.js} +7 -7
  106. package/dist/{grade-compare-HLTHHQGH.js → grade-compare-35UEA52Z.js} +35 -35
  107. package/dist/{help-ZAXWHAYF.js → help-I5TCDUVH.js} +1 -1
  108. package/dist/{history-CMY7ZEEW.js → history-7BKIWSP2.js} +11 -11
  109. package/dist/hyperframe-runtime.js +57 -55
  110. package/dist/hyperframe.manifest.json +1 -1
  111. package/dist/hyperframe.runtime.iife.js +57 -55
  112. package/dist/hyperframes-player.global.js +1 -1
  113. package/dist/{info-STR7EYI3.js → info-UEPOM2LV.js} +8 -8
  114. package/dist/{init-YSMKK5VG.js → init-HIB66K2S.js} +27 -27
  115. package/dist/{inspect-QV6DC6GO.js → inspect-634XIKDS.js} +33 -33
  116. package/dist/{installer-NY5E5HCO.js → installer-ADKWK4I4.js} +5 -5
  117. package/dist/{keyframes-HN3DW5FG.js → keyframes-7BJX3EVE.js} +7 -7
  118. package/dist/{lambda-PG3JKNWS.js → lambda-Q4TRSMHZ.js} +8 -8
  119. package/dist/{layout-O4QAR2XY.js → layout-6DUVSHEB.js} +33 -33
  120. package/dist/{lint-AY55R4UR.js → lint-UPFD4JQZ.js} +7 -7
  121. package/dist/{list-TH2KCVNN.js → list-M6OMQXJX.js} +2 -2
  122. package/dist/{login-TRCMRV4B.js → login-QH6JDXDP.js} +4 -4
  123. package/dist/{manager-2J4XGDZ3.js → manager-B4MSVFMK.js} +12 -10
  124. package/dist/{manager-HEUPD2YB.js → manager-V2QCCPOJ.js} +4 -3
  125. package/dist/{media-treatment-ET5QQSWP.js → media-treatment-SHFTIG4K.js} +14 -14
  126. package/dist/{models-RFUUSCG6.js → models-USEFHJFY.js} +11 -11
  127. package/dist/{motionShot-2ET565ZV.js → motionShot-HRM6NMT4.js} +15 -15
  128. package/dist/{normalize-audio-LUOJSD3W.js → normalize-audio-EP3HPQZB.js} +9 -9
  129. package/dist/{open-MVEOYQRQ.js → open-HXZEXQ4X.js} +12 -12
  130. package/dist/{parakeetRunner-3TG7EHWA.js → parakeetRunner-D5RSHQB2.js} +12 -12
  131. package/dist/{pipeline-JWGTH2BJ.js → pipeline-BDG52SPL.js} +8 -8
  132. package/dist/{play-I3WJPYXK.js → play-LSRQ6R66.js} +24 -24
  133. package/dist/{preflight-4WTT4D5X.js → preflight-GBPRLIM6.js} +9 -9
  134. package/dist/{present-DUZBKUYH.js → present-2VKAE63Q.js} +19 -19
  135. package/dist/{preview-7J5TBTRP.js → preview-MWH5CHTN.js} +18 -18
  136. package/dist/{producer-UZZQX6IJ.js → producer-W24FRIN7.js} +1 -1
  137. package/dist/{projectConfig-HDALEM6S.js → projectConfig-NQQDEDAK.js} +7 -7
  138. package/dist/{publication-NX4VC7UU.js → publication-7DW4IJPC.js} +3 -3
  139. package/dist/{publish-AZRRQUXM.js → publish-FJKJ74IF.js} +10 -10
  140. package/dist/{remove-background-OX5WZTXY.js → remove-background-JBOJAUIM.js} +9 -9
  141. package/dist/{render-HGT3EGIK.js → render-5TTZDI5N.js} +7 -14
  142. package/dist/{render-IYTGM6DE.js → render-BROS2AIU.js} +9 -9
  143. package/dist/{render-JUS2ROIN.js → render-JCYFNDWT.js} +42 -42
  144. package/dist/{render-batch-MUCDZ2WF.js → render-batch-FW56ZFGW.js} +8 -17
  145. package/dist/renderSetupWorker.js +2 -2
  146. package/dist/{resolver-FLQ42X2Y.js → resolver-UW6NYBJA.js} +5 -5
  147. package/dist/{sherpa-PRI3JLUP.js → sherpa-GWYCXYEP.js} +11 -11
  148. package/dist/skills/media-use/references/operations.md +3 -1
  149. package/dist/{skills-CZ6VW5SZ.js → skills-YNM5SIHQ.js} +6 -6
  150. package/dist/{skillsUpdateCheck-K4UKUAOC.js → skillsUpdateCheck-FNC6VALY.js} +3 -3
  151. package/dist/{snapshot-MPE4GIMJ.js → snapshot-6EMEL4O3.js} +44 -44
  152. package/dist/{src-SGPA7DM7.js → src-VUIKXEFU.js} +9 -9
  153. package/dist/{src-JGPFLYBL.js → src-XRFOS5LP.js} +6 -6
  154. package/dist/{staticProjectServer-DG4VZO4G.js → staticProjectServer-COEAKTGH.js} +17 -17
  155. package/dist/studio/assets/{hyperframes-player-DBHpVw8L.js → hyperframes-player-Dfw61RJK.js} +1 -1
  156. package/dist/studio/assets/{index-BkDF4Z-5.js → index-Bi6yVTq9.js} +118 -117
  157. package/dist/studio/assets/{index-DHRXpmtI.js → index-eTRj5rY2.js} +1 -1
  158. package/dist/studio/index.html +1 -1
  159. package/dist/{studio-api-RGNBVLLL.js → studio-api-455XWQPD.js} +12 -12
  160. package/dist/{studioServer-FWACRD3Y.js → studioServer-ZP2LJT7H.js} +57 -72
  161. package/dist/{telemetry-CHJA5JFQ.js → telemetry-HJQ7IO6R.js} +4 -4
  162. package/dist/{timeline-TZDMQBSM.js → timeline-CYW3YKMX.js} +23 -23
  163. package/dist/{tokens-B5KI7FBA.js → tokens-VOARLAAH.js} +2 -2
  164. package/dist/{transcribe-M7NO6XBP.js → transcribe-F6UOG57Z.js} +12 -12
  165. package/dist/{transcribe-VHUDXZET.js → transcribe-FJGNOR6R.js} +17 -16
  166. package/dist/{updateCheck-NMD6AFFG.js → updateCheck-IOLCO3XV.js} +2 -2
  167. package/dist/{upgrade-WGFMGJ5O.js → upgrade-BVW67SB7.js} +2 -2
  168. package/dist/{urlDownloader-FZ5ISJES.js → urlDownloader-QF7EBQC2.js} +6 -6
  169. package/dist/{validate-NM3GLUWX.js → validate-3NHIT4VT.js} +25 -25
  170. package/dist/{video-7CDAIWYC.js → video-2KGC3RIQ.js} +7 -7
  171. package/package.json +1 -2
  172. package/dist/chunk-EEXE43II.js +0 -3805
  173. package/dist/chunk-TWWSYAKJ.js +0 -24
  174. package/dist/{deploy-NKWMPAMH.js → deploy-3TTQZGTF.js} +4 -4
  175. package/dist/{destroy-UKP522AE.js → destroy-BEL232I5.js} +3 -3
@@ -29,7 +29,7 @@ import {
29
29
  renderFrameIdForRenderId,
30
30
  resolveAuthoredTimingWindow,
31
31
  toFps
32
- } from "./chunk-VEQ7DKPG.js";
32
+ } from "./chunk-AHS5QYKF.js";
33
33
  import {
34
34
  AUDIO_GROUP_RENDER_ID_ATTR,
35
35
  COLOR_GRADING_SOURCE_HIDDEN_ATTR,
@@ -58,18 +58,22 @@ import {
58
58
  shiftRateLane,
59
59
  sourceTimeAt,
60
60
  timeAtSourceTime
61
- } from "./chunk-EEXE43II.js";
61
+ } from "./chunk-PLNQW2C6.js";
62
62
  import {
63
63
  clampAudioGain,
64
64
  isAudibleVideoElement
65
65
  } from "./chunk-UJKQWGFF.js";
66
66
  import {
67
- redactTelemetryString
68
- } from "./chunk-T76PLPD6.js";
67
+ redactTelemetryString,
68
+ redactUrlQueryStrings
69
+ } from "./chunk-634HSJ3J.js";
69
70
  import {
70
71
  chromeMajorCeiling,
71
- exceedsChromeCeiling
72
- } from "./chunk-TWWSYAKJ.js";
72
+ compareBrowserVersionsDescending,
73
+ exceedsChromeCeiling,
74
+ isManagedChromeDir,
75
+ pickSharedShell
76
+ } from "./chunk-537IYAEE.js";
73
77
  import {
74
78
  isWithinProjectRoot,
75
79
  resolveProjectRelativeSrc
@@ -948,26 +952,6 @@ async function readWebGlInfo(browser) {
948
952
  };
949
953
  });
950
954
  }
951
- function compareBrowserVersionsDescending(left, right) {
952
- const parse = (value) => {
953
- const version = value.slice(value.indexOf("-") + 1);
954
- const segments = [];
955
- for (const segment of version.split(".")) {
956
- const parsed = Number.parseInt(segment, 10);
957
- if (!Number.isFinite(parsed)) break;
958
- segments.push(parsed);
959
- }
960
- return segments;
961
- };
962
- const leftSegments = parse(left);
963
- const rightSegments = parse(right);
964
- const length = Math.max(leftSegments.length, rightSegments.length);
965
- for (let index = 0; index < length; index += 1) {
966
- const difference = (rightSegments[index] ?? 0) - (leftSegments[index] ?? 0);
967
- if (difference !== 0) return difference;
968
- }
969
- return 0;
970
- }
971
955
  var CACHED_HEADLESS_SHELL_EXECUTABLES = {
972
956
  "darwin/arm64": ["chrome-headless-shell-mac-arm64", "chrome-headless-shell"],
973
957
  "darwin/x64": ["chrome-headless-shell-mac-x64", "chrome-headless-shell"],
@@ -1002,6 +986,29 @@ function findCachedHeadlessShell(baseDir) {
1002
986
  }
1003
987
  return void 0;
1004
988
  }
989
+ function findSharedHeadlessShell(baseDir) {
990
+ const executable = cachedHeadlessShellExecutable();
991
+ if (!executable || !existsSync(baseDir)) return void 0;
992
+ try {
993
+ return pickSharedShell(readdirSync(baseDir), (version) => {
994
+ const binary = join2(baseDir, version, ...executable);
995
+ return isNonEmptyFile(binary) ? binary : void 0;
996
+ });
997
+ } catch {
998
+ return void 0;
999
+ }
1000
+ }
1001
+ function findManagedHeadlessShell(baseDir) {
1002
+ const executable = cachedHeadlessShellExecutable();
1003
+ if (!executable || !existsSync(baseDir)) return void 0;
1004
+ try {
1005
+ const version = readdirSync(baseDir).find(isManagedChromeDir);
1006
+ const binary = version && join2(baseDir, version, ...executable);
1007
+ return binary && isNonEmptyFile(binary) ? binary : void 0;
1008
+ } catch {
1009
+ return void 0;
1010
+ }
1011
+ }
1005
1012
  function resolveHeadlessShellPath(config) {
1006
1013
  if (config?.chromePath) {
1007
1014
  return config.chromePath;
@@ -1024,10 +1031,9 @@ function resolveHeadlessShellPath(config) {
1024
1031
  }
1025
1032
  return envPath;
1026
1033
  }
1027
- const home = homedir();
1028
- return findCachedHeadlessShell(
1029
- join2(home, ".cache", "hyperframes", "chrome", "chrome-headless-shell")
1030
- ) ?? findCachedHeadlessShell(join2(home, ".cache", "puppeteer", "chrome-headless-shell"));
1034
+ const ours = join2(homedir(), ".cache", "hyperframes", "chrome", "chrome-headless-shell");
1035
+ const shared = join2(homedir(), ".cache", "puppeteer", "chrome-headless-shell");
1036
+ return findManagedHeadlessShell(ours) ?? findSharedHeadlessShell(shared) ?? findCachedHeadlessShell(ours);
1031
1037
  }
1032
1038
  function resolveFullChromePath() {
1033
1039
  const baseDir = join2(homedir(), ".cache", "puppeteer", "chrome");
@@ -7595,7 +7601,7 @@ function getCapturePerfSummary(session) {
7595
7601
  import {
7596
7602
  closeSync,
7597
7603
  copyFileSync,
7598
- existsSync as existsSync4,
7604
+ existsSync as existsSync5,
7599
7605
  ftruncateSync,
7600
7606
  mkdirSync as mkdirSync2,
7601
7607
  mkdtempSync,
@@ -7612,8 +7618,10 @@ import { join as join5, dirname as dirname2, extname } from "path";
7612
7618
  import { spawn } from "child_process";
7613
7619
 
7614
7620
  // ../engine/src/utils/managedChildProcess.ts
7621
+ import { StringDecoder } from "string_decoder";
7615
7622
  var DEFAULT_TERMINATION_GRACE_MS = 2e3;
7616
7623
  var DEFAULT_STDERR_MAX_BYTES = 64 * 1024;
7624
+ var RAW_STDERR_SLACK_FACTOR = 2;
7617
7625
  var ManagedChildProcess = class {
7618
7626
  constructor(child, options = {}) {
7619
7627
  this.child = child;
@@ -7638,7 +7646,9 @@ var ManagedChildProcess = class {
7638
7646
  outcomePromise;
7639
7647
  resolveOutcome;
7640
7648
  requestedReason = null;
7641
- stderrTail = Buffer.alloc(0);
7649
+ rawStderrTail = "";
7650
+ rawStderrTailCut = false;
7651
+ stderrDecoder = new StringDecoder("utf8");
7642
7652
  spawned = false;
7643
7653
  settled = false;
7644
7654
  deadlineTimer = null;
@@ -7661,13 +7671,18 @@ var ManagedChildProcess = class {
7661
7671
  }
7662
7672
  onStderr = (data) => {
7663
7673
  const chunk = Buffer.isBuffer(data) ? data : Buffer.from(data);
7664
- const maxBytes = this.options.stderrMaxBytes ?? DEFAULT_STDERR_MAX_BYTES;
7665
- this.stderrTail = Buffer.concat([this.stderrTail, chunk]);
7666
- if (this.stderrTail.byteLength > maxBytes) {
7667
- this.stderrTail = this.stderrTail.subarray(this.stderrTail.byteLength - maxBytes);
7668
- }
7674
+ const joined = this.rawStderrTail + this.stderrDecoder.write(chunk);
7675
+ this.rawStderrTail = lastBytes(joined, RAW_STDERR_SLACK_FACTOR * this.maxBytes);
7676
+ if (this.rawStderrTail !== joined) this.rawStderrTailCut = true;
7669
7677
  this.options.onStderr?.(chunk.toString());
7670
7678
  };
7679
+ get maxBytes() {
7680
+ return this.options.stderrMaxBytes ?? DEFAULT_STDERR_MAX_BYTES;
7681
+ }
7682
+ redactedStderrTail() {
7683
+ const raw = this.rawStderrTailCut ? withoutTokenSeveredByCut(this.rawStderrTail) : this.rawStderrTail;
7684
+ return lastBytes(redactUrlQueryStrings(raw), this.maxBytes);
7685
+ }
7671
7686
  onSpawn = () => {
7672
7687
  this.spawned = true;
7673
7688
  };
@@ -7676,7 +7691,7 @@ var ManagedChildProcess = class {
7676
7691
  reason: this.requestedReason ?? "exit",
7677
7692
  exitCode,
7678
7693
  signal,
7679
- stderr: this.stderrTail.toString(),
7694
+ stderr: this.redactedStderrTail(),
7680
7695
  durationMs: this.now() - this.startedAtMs
7681
7696
  });
7682
7697
  };
@@ -7686,7 +7701,7 @@ var ManagedChildProcess = class {
7686
7701
  reason: "spawn_error",
7687
7702
  exitCode: null,
7688
7703
  signal: null,
7689
- stderr: this.stderrTail.length > 0 ? this.stderrTail.toString() : error.message,
7704
+ stderr: this.rawStderrTail.length > 0 ? this.redactedStderrTail() : error.message,
7690
7705
  durationMs: this.now() - this.startedAtMs,
7691
7706
  error
7692
7707
  });
@@ -7749,6 +7764,13 @@ var ManagedChildProcess = class {
7749
7764
  this.escalationTimer = null;
7750
7765
  }
7751
7766
  };
7767
+ function lastBytes(text, maxBytes) {
7768
+ return Buffer.byteLength(text) > maxBytes ? Buffer.from(text).subarray(-maxBytes).toString() : text;
7769
+ }
7770
+ function withoutTokenSeveredByCut(text) {
7771
+ const firstSpace = text.search(/\s/);
7772
+ return firstSpace < 0 ? "" : text.slice(firstSpace);
7773
+ }
7752
7774
 
7753
7775
  // ../engine/src/utils/processTracker.ts
7754
7776
  var tracked = /* @__PURE__ */ new Set();
@@ -8149,8 +8171,42 @@ async function runFfmpeg(args, opts) {
8149
8171
  // ../engine/src/utils/ffprobe.ts
8150
8172
  import { spawn as spawn3 } from "child_process";
8151
8173
  import { createReadStream, readFileSync, statSync as statSync2 } from "fs";
8152
- import { StringDecoder } from "string_decoder";
8174
+ import { StringDecoder as StringDecoder2 } from "string_decoder";
8153
8175
  import { basename } from "path";
8176
+
8177
+ // ../engine/src/utils/urlInput.ts
8178
+ import { existsSync as existsSync4 } from "fs";
8179
+ var CA_BUNDLES = [
8180
+ "/etc/pki/tls/certs/ca-bundle.crt",
8181
+ "/etc/ssl/certs/ca-certificates.crt",
8182
+ "/etc/ssl/cert.pem"
8183
+ ];
8184
+ var RECONNECT_ARGS = ["-rw_timeout", "30000000", "-reconnect", "1", "-reconnect_delay_max", "2"];
8185
+ function urlInputArgs(input, {
8186
+ tool = "ffmpeg",
8187
+ caBundles = CA_BUNDLES
8188
+ } = {}) {
8189
+ if (!/^https:\/\//i.test(input)) return [];
8190
+ const caFile = caBundles.find((path) => existsSync4(path));
8191
+ if (!caFile) {
8192
+ throw new Error(
8193
+ `[FFmpeg] cannot verify TLS for an https input: no CA bundle at ${caBundles.join(", ")}`
8194
+ );
8195
+ }
8196
+ const networkRetry = tool === "ffmpeg" ? ["-reconnect_on_network_error", "1"] : [];
8197
+ return ["-tls_verify", "1", "-ca_file", caFile, ...RECONNECT_ARGS, ...networkRetry];
8198
+ }
8199
+ function redactUrlQueriesInError(error) {
8200
+ if (!(error instanceof Error)) return error;
8201
+ const fields = error;
8202
+ for (const key of ["message", "stack", ...Object.keys(error)]) {
8203
+ if (typeof fields[key] === "string") fields[key] = redactUrlQueryStrings(fields[key]);
8204
+ }
8205
+ if (error.cause !== error) redactUrlQueriesInError(error.cause);
8206
+ return error;
8207
+ }
8208
+
8209
+ // ../engine/src/utils/ffprobe.ts
8154
8210
  var FFPROBE_STDERR_MAX_BYTES = 8 * 1024;
8155
8211
  var FFPROBE_STDOUT_MAX_CHARS = 8e6;
8156
8212
  var FFPROBE_ERROR_MAX_CHARS = 4 * 1024;
@@ -8182,7 +8238,15 @@ async function runFfprobe(filePath, argsWithoutInput, signal, stdoutOptions) {
8182
8238
  throw new Error('[FFmpeg] Refusing to probe "-": stdin is not a supported input path.');
8183
8239
  }
8184
8240
  const command = getFfprobeBinary();
8185
- const proc = spawn3(command, ["-v", "error", ...argsWithoutInput, "--", filePath], {
8241
+ const args = [
8242
+ "-v",
8243
+ "error",
8244
+ ...urlInputArgs(filePath, { tool: "ffprobe" }),
8245
+ ...argsWithoutInput,
8246
+ "--",
8247
+ filePath
8248
+ ];
8249
+ const proc = spawn3(command, args, {
8186
8250
  // Nothing is ever written to the child's stdin; leaving it as a pipe is
8187
8251
  // what lets a stdin-reading invocation block indefinitely.
8188
8252
  stdio: ["ignore", "pipe", "pipe"],
@@ -8190,7 +8254,7 @@ async function runFfprobe(filePath, argsWithoutInput, signal, stdoutOptions) {
8190
8254
  windowsHide: true
8191
8255
  });
8192
8256
  trackChildProcess(proc);
8193
- const decoder = new StringDecoder("utf8");
8257
+ const decoder = new StringDecoder2("utf8");
8194
8258
  let stdout = "";
8195
8259
  let stdoutTruncated = false;
8196
8260
  const stdoutMaxChars = stdoutOptions?.maxChars ?? FFPROBE_STDOUT_MAX_CHARS;
@@ -8552,7 +8616,8 @@ async function extractMediaMetadata(filePath) {
8552
8616
  const colorTransfer = videoStream.color_transfer || "";
8553
8617
  const colorPrimaries = videoStream.color_primaries || "";
8554
8618
  const colorSpaceVal = videoStream.color_space || "";
8555
- const cicp = colorTransfer && colorPrimaries && colorSpaceVal ? null : stillImage()?.colorSpace;
8619
+ const isPng = output !== null && isPngImageProbe(output);
8620
+ const cicp = !isPng || colorTransfer && colorPrimaries && colorSpaceVal ? null : stillImage()?.colorSpace;
8556
8621
  const merged = {
8557
8622
  colorTransfer: colorTransfer || cicp?.colorTransfer || "",
8558
8623
  colorPrimaries: colorPrimaries || cicp?.colorPrimaries || "",
@@ -9160,7 +9225,7 @@ var secondsReader = (onSeconds) => onSeconds && ffmpegStatsReader(({ seconds })
9160
9225
  async function encodeFramesFromDir(framesDir, framePattern, outputPath, options, signal, config, onFramesEncoded) {
9161
9226
  const startTime = Date.now();
9162
9227
  const outputDir = dirname2(outputPath);
9163
- if (!existsSync4(outputDir)) mkdirSync2(outputDir, { recursive: true });
9228
+ if (!existsSync5(outputDir)) mkdirSync2(outputDir, { recursive: true });
9164
9229
  const files = readdirSync2(framesDir).filter((f) => f.match(/\.(jpg|jpeg|png)$/i));
9165
9230
  const frameCount = files.length;
9166
9231
  if (frameCount === 0) {
@@ -9211,7 +9276,7 @@ async function encodeFramesFromDir(framesDir, framePattern, outputPath, options,
9211
9276
  failureReason: isExternalFfmpegInterruption(result) ? "external_interruption" : void 0
9212
9277
  };
9213
9278
  }
9214
- const fileSize = existsSync4(outputPath) ? statSync3(outputPath).size : 0;
9279
+ const fileSize = existsSync5(outputPath) ? statSync3(outputPath).size : 0;
9215
9280
  return {
9216
9281
  success: true,
9217
9282
  outputPath,
@@ -9345,7 +9410,7 @@ async function encodeFramesChunkedConcat(framesDir, framePattern, outputPath, op
9345
9410
  failureReason: concatResult.externalInterruption ? "external_interruption" : void 0
9346
9411
  };
9347
9412
  }
9348
- const fileSize = existsSync4(outputPath) ? statSync3(outputPath).size : 0;
9413
+ const fileSize = existsSync5(outputPath) ? statSync3(outputPath).size : 0;
9349
9414
  return {
9350
9415
  success: true,
9351
9416
  outputPath,
@@ -9356,7 +9421,7 @@ async function encodeFramesChunkedConcat(framesDir, framePattern, outputPath, op
9356
9421
  }
9357
9422
  async function muxVideoWithAudio(videoPath, audioPath, outputPath, signal, config, fps, onSecondsWritten) {
9358
9423
  const outputDir = dirname2(outputPath);
9359
- if (!existsSync4(outputDir)) mkdirSync2(outputDir, { recursive: true });
9424
+ if (!existsSync5(outputDir)) mkdirSync2(outputDir, { recursive: true });
9360
9425
  const isWebm = outputPath.endsWith(".webm");
9361
9426
  const isMov = outputPath.endsWith(".mov");
9362
9427
  const shouldCopyAudio = isWebm ? false : await shouldCopyAacSidecar(audioPath, config);
@@ -9430,7 +9495,7 @@ async function packageHls(videoPath, audioPath, outputDir, options) {
9430
9495
  if (outputDir.includes("%")) {
9431
9496
  throw new Error(`[chunkEncoder] packageHls outputDir must not contain "%": ${outputDir}`);
9432
9497
  }
9433
- if (!existsSync4(outputDir)) mkdirSync2(outputDir, { recursive: true });
9498
+ if (!existsSync5(outputDir)) mkdirSync2(outputDir, { recursive: true });
9434
9499
  const hasAudio = audioPath !== null;
9435
9500
  const args = hasAudio ? ["-i", videoPath, "-i", audioPath, "-map", "0:v:0", "-map", "1:a:0"] : ["-i", videoPath, "-map", "0:v:0"];
9436
9501
  args.push(
@@ -9577,7 +9642,7 @@ function quantizationTableError(buffer, start, end) {
9577
9642
  // ../engine/src/services/streamingEncoder.ts
9578
9643
  import { spawn as spawn4 } from "child_process";
9579
9644
  import { once } from "events";
9580
- import { existsSync as existsSync5, mkdirSync as mkdirSync3, statSync as statSync4 } from "fs";
9645
+ import { existsSync as existsSync6, mkdirSync as mkdirSync3, statSync as statSync4 } from "fs";
9581
9646
  import { dirname as dirname3 } from "path";
9582
9647
  function createFrameReorderBuffer(startFrame, endFrame) {
9583
9648
  let cursor = startFrame;
@@ -9814,7 +9879,7 @@ function buildStreamingArgs(options, outputPath, gpuEncoder = null) {
9814
9879
  }
9815
9880
  async function spawnStreamingEncoder(outputPath, options, signal, config) {
9816
9881
  const outputDir = dirname3(outputPath);
9817
- if (!existsSync5(outputDir)) mkdirSync3(outputDir, { recursive: true });
9882
+ if (!existsSync6(outputDir)) mkdirSync3(outputDir, { recursive: true });
9818
9883
  let gpuEncoder = null;
9819
9884
  if (options.useGpu) {
9820
9885
  gpuEncoder = await getCachedGpuEncoder();
@@ -9945,7 +10010,7 @@ FFmpeg stopped after ${streamingTimeout} ms without consuming a frame.` : "";
9945
10010
  }) ? "external_interruption" : void 0
9946
10011
  };
9947
10012
  }
9948
- const fileSize = existsSync5(outputPath) ? statSync4(outputPath).size : 0;
10013
+ const fileSize = existsSync6(outputPath) ? statSync4(outputPath).size : 0;
9949
10014
  return { success: true, durationMs, fileSize };
9950
10015
  },
9951
10016
  getExitStatus: () => exitStatus,
@@ -10046,7 +10111,7 @@ function isMemberGroupHidden(groupsById, el) {
10046
10111
  }
10047
10112
 
10048
10113
  // ../engine/src/services/videoFrameExtractor.ts
10049
- import { copyFileSync as copyFileSync2, existsSync as existsSync8, linkSync as linkSync2, mkdirSync as mkdirSync6, rmSync as rmSync4 } from "fs";
10114
+ import { copyFileSync as copyFileSync2, existsSync as existsSync9, linkSync as linkSync2, mkdirSync as mkdirSync6, rmSync as rmSync4 } from "fs";
10050
10115
  import { join as join10 } from "path";
10051
10116
  import { cpus } from "os";
10052
10117
 
@@ -10192,7 +10257,7 @@ import {
10192
10257
  closeSync as closeSync2,
10193
10258
  createReadStream as createReadStream2,
10194
10259
  createWriteStream,
10195
- existsSync as existsSync6,
10260
+ existsSync as existsSync7,
10196
10261
  fsyncSync,
10197
10262
  linkSync,
10198
10263
  mkdtempSync as mkdtempSync3,
@@ -11144,7 +11209,7 @@ async function downloadToTemp(url, destDir, timeoutMs = 3e5, signal, onTransient
11144
11209
  if (inFlight) {
11145
11210
  return inFlight;
11146
11211
  }
11147
- if (!existsSync6(destDir)) {
11212
+ if (!existsSync7(destDir)) {
11148
11213
  mkdirSync4(destDir, { recursive: true });
11149
11214
  }
11150
11215
  const filename = getFilenameFromUrl(url, validationScope);
@@ -11221,7 +11286,7 @@ function unwrapTemplate(html) {
11221
11286
  import { createHash as createHash2, randomUUID as randomUUID3 } from "crypto";
11222
11287
  import {
11223
11288
  createReadStream as createReadStream3,
11224
- existsSync as existsSync7,
11289
+ existsSync as existsSync8,
11225
11290
  lstatSync as lstatSync2,
11226
11291
  mkdirSync as mkdirSync5,
11227
11292
  readdirSync as readdirSync5,
@@ -11333,7 +11398,7 @@ function hasFrameFiles(dir) {
11333
11398
  function lookupCacheEntry(rootDir, input) {
11334
11399
  const keyHash = computeCacheKey(input);
11335
11400
  const dir = join9(rootDir, cacheEntryDirName(keyHash));
11336
- const complete = existsSync7(join9(dir, COMPLETE_SENTINEL)) && hasFrameFiles(dir);
11401
+ const complete = existsSync8(join9(dir, COMPLETE_SENTINEL)) && hasFrameFiles(dir);
11337
11402
  return { entry: { dir, keyHash }, hit: complete };
11338
11403
  }
11339
11404
  function partialCacheEntryDir(entry) {
@@ -11344,7 +11409,7 @@ function isTargetExistsRenameError(err) {
11344
11409
  return code === "EEXIST" || code === "ENOTEMPTY" || code === "EPERM";
11345
11410
  }
11346
11411
  function adoptPublishedWinner(entry, partialDir) {
11347
- if (!existsSync7(join9(entry.dir, COMPLETE_SENTINEL))) return null;
11412
+ if (!existsSync8(join9(entry.dir, COMPLETE_SENTINEL))) return null;
11348
11413
  removeDir(partialDir);
11349
11414
  return { dir: entry.dir, published: true };
11350
11415
  }
@@ -11889,7 +11954,9 @@ function parseImageElements(html) {
11889
11954
  return images;
11890
11955
  }
11891
11956
  async function readFirstFrameColour(videoPath, signal) {
11892
- const result = await runFfmpeg(firstFrameColourArgs(videoPath), { signal });
11957
+ const result = await runFfmpeg([...urlInputArgs(videoPath), ...firstFrameColourArgs(videoPath)], {
11958
+ signal
11959
+ });
11893
11960
  return parseFirstFrameColour(result.stderr);
11894
11961
  }
11895
11962
  var CHROME_BT601_UNTAGGED_CODECS = /* @__PURE__ */ new Set(["vp9", "av1"]);
@@ -11975,14 +12042,21 @@ async function runSegmentedExtraction(job) {
11975
12042
  }
11976
12043
  return ran[ran.length - 1];
11977
12044
  }
11978
- async function extractVideoFramesRange(videoPath, videoId, startTime, duration, options, signal, config, outputDirOverride) {
12045
+ async function extractVideoFramesRange(...args) {
12046
+ try {
12047
+ return await extractVideoFramesRangeUnredacted(...args);
12048
+ } catch (error) {
12049
+ throw redactUrlQueriesInError(error);
12050
+ }
12051
+ }
12052
+ async function extractVideoFramesRangeUnredacted(videoPath, videoId, startTime, duration, options, signal, config, outputDirOverride) {
11979
12053
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
11980
12054
  const { outputDir, quality = 95 } = options;
11981
12055
  const normalizedFps = toFps(options.fps);
11982
12056
  const fps = fpsToNumber(normalizedFps);
11983
12057
  const ffmpegFps = fpsToFfmpegArg(normalizedFps);
11984
12058
  const videoOutputDir = outputDirOverride ?? join10(outputDir, videoId);
11985
- if (!existsSync8(videoOutputDir)) mkdirSync6(videoOutputDir, { recursive: true });
12059
+ if (!existsSync9(videoOutputDir)) mkdirSync6(videoOutputDir, { recursive: true });
11986
12060
  let metadata;
11987
12061
  try {
11988
12062
  metadata = await extractMediaMetadata(videoPath);
@@ -12017,7 +12091,7 @@ async function extractVideoFramesRange(videoPath, videoId, startTime, duration,
12017
12091
  if (options.frameRanges && (!sampleAtOutputFps || metadata.isVFR)) {
12018
12092
  throw new Error("frameRanges extraction needs a constant-frame-rate source");
12019
12093
  }
12020
- const args = [];
12094
+ const args = urlInputArgs(videoPath);
12021
12095
  if (decodeWithVideoToolbox) {
12022
12096
  args.push("-hwaccel", "videotoolbox");
12023
12097
  }
@@ -12537,6 +12611,11 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
12537
12611
  if (!isHttpUrl(videoPath)) {
12538
12612
  videoPath = resolveProjectRelativeSrc(video.src, baseDir, compiledDir);
12539
12613
  }
12614
+ const remoteUrl = options.urlByAbsentLocalPath?.get(videoPath);
12615
+ if (remoteUrl) {
12616
+ resolvedVideos.push({ video, videoPath: remoteUrl });
12617
+ continue;
12618
+ }
12540
12619
  if (isHttpUrl(videoPath)) {
12541
12620
  const downloadDir = join10(options.outputDir, DOWNLOAD_SUBDIR);
12542
12621
  mkdirSync6(downloadDir, { recursive: true });
@@ -12549,7 +12628,7 @@ async function extractAllVideoFrames(videos, baseDir, options, signal, config, c
12549
12628
  { onTelemetry: writeUrlDownloadTelemetry }
12550
12629
  );
12551
12630
  }
12552
- if (!existsSync8(videoPath)) {
12631
+ if (!existsSync9(videoPath)) {
12553
12632
  if (!warnedSrcs.has(video.src)) {
12554
12633
  warnedSrcs.add(video.src);
12555
12634
  process.stderr.write(
@@ -13264,7 +13343,7 @@ var FrameLookupTable = class {
13264
13343
  cleanup() {
13265
13344
  for (const video of this.videos.values()) {
13266
13345
  if (video.extracted.ownedByLookup) continue;
13267
- if (existsSync8(video.extracted.outputDir)) {
13346
+ if (existsSync9(video.extracted.outputDir)) {
13268
13347
  rmSync4(video.extracted.outputDir, { recursive: true, force: true });
13269
13348
  }
13270
13349
  }
@@ -13717,7 +13796,7 @@ async function queryElementStacking(page, nativeHdrIds) {
13717
13796
  }
13718
13797
 
13719
13798
  // ../engine/src/services/audioMixer.ts
13720
- import { closeSync as closeSync4, existsSync as existsSync10, mkdirSync as mkdirSync7, mkdtempSync as mkdtempSync7, openSync as openSync4, rmSync as rmSync8, writeFileSync as writeFileSync7 } from "fs";
13799
+ import { closeSync as closeSync4, existsSync as existsSync11, mkdirSync as mkdirSync7, mkdtempSync as mkdtempSync7, openSync as openSync4, rmSync as rmSync8, writeFileSync as writeFileSync7 } from "fs";
13721
13800
  import { join as join14, dirname as dirname7, isAbsolute, relative } from "path";
13722
13801
 
13723
13802
  // ../engine/src/utils/notMediaPayload.ts
@@ -14381,7 +14460,7 @@ function chainTailSeconds(chain, automation) {
14381
14460
  // ../engine/src/services/audioFxRender.ts
14382
14461
  import {
14383
14462
  closeSync as closeSync3,
14384
- existsSync as existsSync9,
14463
+ existsSync as existsSync10,
14385
14464
  mkdtempSync as mkdtempSync6,
14386
14465
  openSync as openSync3,
14387
14466
  readFileSync as readFileSync7,
@@ -14688,7 +14767,7 @@ async function renderInSegments(openPage, inputWav, header, chain, outputWav, op
14688
14767
  }
14689
14768
  async function applyAudioFxChain(inputWav, chain, outputWav, options) {
14690
14769
  if (enabledAudioFxNodes(chain).length === 0) return { path: inputWav, envelopeBaked: false };
14691
- if (!existsSync9(inputWav)) {
14770
+ if (!existsSync10(inputWav)) {
14692
14771
  throw new AudioFxRenderError(`Audio FX input is missing: ${inputWav}`);
14693
14772
  }
14694
14773
  const limits = { ...DEFAULT_STREAMING_LIMITS, ...options.streaming };
@@ -15201,7 +15280,7 @@ function parseAudioElements(html) {
15201
15280
  async function extractAudioSegment(srcPath, outputPath, stage, mediaStart, duration, playbackRate = 1, signal, config) {
15202
15281
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
15203
15282
  const outputDir = dirname7(outputPath);
15204
- if (!existsSync10(outputDir)) mkdirSync7(outputDir, { recursive: true });
15283
+ if (!existsSync11(outputDir)) mkdirSync7(outputDir, { recursive: true });
15205
15284
  const normalizedPlaybackRate = normalizeRateSpec(playbackRate);
15206
15285
  const sourceDuration = sourceTimeAt(normalizedPlaybackRate, duration);
15207
15286
  const metadata = await extractAudioMetadata(srcPath).catch(() => null);
@@ -15247,7 +15326,7 @@ async function extractAudioSegment(srcPath, outputPath, stage, mediaStart, durat
15247
15326
  async function generateSilence(outputPath, duration, signal, config) {
15248
15327
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
15249
15328
  const outputDir = dirname7(outputPath);
15250
- if (!existsSync10(outputDir)) mkdirSync7(outputDir, { recursive: true });
15329
+ if (!existsSync11(outputDir)) mkdirSync7(outputDir, { recursive: true });
15251
15330
  const args = [
15252
15331
  "-f",
15253
15332
  "lavfi",
@@ -15301,7 +15380,7 @@ async function mixAudioTracks(tracks, outputPath, totalDuration, signal, config,
15301
15380
  };
15302
15381
  }
15303
15382
  const outputDir = dirname7(outputPath);
15304
- if (!existsSync10(outputDir)) mkdirSync7(outputDir, { recursive: true });
15383
+ if (!existsSync11(outputDir)) mkdirSync7(outputDir, { recursive: true });
15305
15384
  const buildFilterComplex = (ignoreAutomation, useNormalize2) => {
15306
15385
  const filterParts = [];
15307
15386
  tracks.forEach((track, i) => {
@@ -15407,7 +15486,7 @@ function groupNormalizeOptionUnsupported(stderr) {
15407
15486
  async function mixGroupMembers(memberTracks, outputPath, totalDuration, signal, config) {
15408
15487
  const ffmpegProcessTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
15409
15488
  const outputDir = dirname7(outputPath);
15410
- if (!existsSync10(outputDir)) mkdirSync7(outputDir, { recursive: true });
15489
+ if (!existsSync11(outputDir)) mkdirSync7(outputDir, { recursive: true });
15411
15490
  const buildInputFilters = (ignoreKeyframes) => memberTracks.map((track, i) => {
15412
15491
  const volumeFilter = buildVolumeExpression(track, ignoreKeyframes);
15413
15492
  return buildTrackInputFilter(track, i, volumeFilter, totalDuration);
@@ -15521,7 +15600,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
15521
15600
  const failures = [];
15522
15601
  const groupTracks = /* @__PURE__ */ new Map();
15523
15602
  const groupMeta = /* @__PURE__ */ new Map();
15524
- if (!existsSync10(workDir)) mkdirSync7(workDir, { recursive: true });
15603
+ if (!existsSync11(workDir)) mkdirSync7(workDir, { recursive: true });
15525
15604
  const internalController = new AbortController();
15526
15605
  const effectiveSignal = internalController.signal;
15527
15606
  if (signal) {
@@ -15545,6 +15624,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
15545
15624
  let srcPath = element.src;
15546
15625
  if (!isHttpUrl(srcPath)) {
15547
15626
  srcPath = resolveProjectRelativeSrc(element.src, baseDir, compiledDir);
15627
+ srcPath = config?.urlByAbsentLocalPath?.get(srcPath) ?? srcPath;
15548
15628
  }
15549
15629
  if (isHttpUrl(srcPath)) {
15550
15630
  try {
@@ -15563,7 +15643,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
15563
15643
  return;
15564
15644
  }
15565
15645
  }
15566
- if (!existsSync10(srcPath)) {
15646
+ if (!existsSync11(srcPath)) {
15567
15647
  failures.push({
15568
15648
  stage: "source",
15569
15649
  reason: "source_not_found",
@@ -15907,7 +15987,7 @@ async function processCompositionAudio(elements, baseDir, workDir, outputPath, t
15907
15987
 
15908
15988
  // ../engine/src/services/parallelCoordinator.ts
15909
15989
  import { cpus as cpus2, freemem } from "os";
15910
- import { existsSync as existsSync11, mkdirSync as mkdirSync8, readdirSync as readdirSync6 } from "fs";
15990
+ import { existsSync as existsSync12, mkdirSync as mkdirSync8, readdirSync as readdirSync6 } from "fs";
15911
15991
  import { copyFile, readFile as readFile2, rename } from "fs/promises";
15912
15992
  import { join as join16 } from "path";
15913
15993
  import { getHeapStatistics } from "v8";
@@ -16370,7 +16450,7 @@ async function verifyDiskDrawElementSamples(session, task, streaming) {
16370
16450
  async function executeWorkerTask(task, serverUrl, captureOptions, createBeforeCaptureHook, signal, onFrameCaptured, onFrameBuffer, config, parallel, onFailure, onWorkerPhase) {
16371
16451
  const startTime = Date.now();
16372
16452
  let framesCaptured = 0;
16373
- if (!existsSync11(task.outputDir)) mkdirSync8(task.outputDir, { recursive: true });
16453
+ if (!existsSync12(task.outputDir)) mkdirSync8(task.outputDir, { recursive: true });
16374
16454
  let session = null;
16375
16455
  let perf;
16376
16456
  const needsSeparateBrowsers = shouldDisableBrowserPoolForParallelWorker({ parallel });
@@ -16589,11 +16669,11 @@ async function executeParallelCapture(serverUrl, workDir, tasks, captureOptions,
16589
16669
  return results;
16590
16670
  }
16591
16671
  async function mergeWorkerFrames(workDir, tasks, outputDir) {
16592
- if (!existsSync11(outputDir)) mkdirSync8(outputDir, { recursive: true });
16672
+ if (!existsSync12(outputDir)) mkdirSync8(outputDir, { recursive: true });
16593
16673
  let totalFrames = 0;
16594
16674
  const sortedTasks = [...tasks].sort((a, b) => a.startFrame - b.startFrame);
16595
16675
  for (const task of sortedTasks) {
16596
- if (!existsSync11(task.outputDir)) {
16676
+ if (!existsSync12(task.outputDir)) {
16597
16677
  continue;
16598
16678
  }
16599
16679
  const files = readdirSync6(task.outputDir).filter((f) => f.startsWith("frame_") && (f.endsWith(".jpg") || f.endsWith(".png"))).sort();