hyperframes 0.8.192 → 0.8.194

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 (189) hide show
  1. package/dist/{add-TZU2UW7A.js → add-47UAIWY4.js} +12 -12
  2. package/dist/{animatedGifPrep-NLAXC3VV.js → animatedGifPrep-TFSQZWK6.js} +8 -7
  3. package/dist/api.js +18 -17
  4. package/dist/{asset-JAJXA6LB.js → asset-AU7PZHXA.js} +2 -2
  5. package/dist/{assetCataloger-4WTX3J4I.js → assetCataloger-HC5N6WPT.js} +8 -7
  6. package/dist/{audio-XLWC7JKS.js → audio-7AWMZWBM.js} +14 -13
  7. package/dist/{auth-5K6X3NPJ.js → auth-GXH3QNDJ.js} +1 -1
  8. package/dist/{autoUpdate-RNV7SKGB.js → autoUpdate-GVGP5O2I.js} +3 -3
  9. package/dist/{backgroundChecks-QXLVZVGX.js → backgroundChecks-IUJM2Q35.js} +3 -3
  10. package/dist/backgroundChecksWorker.js +3 -3
  11. package/dist/{batchRender-THKSPDZR.js → batchRender-3XS2Y2Y4.js} +4 -4
  12. package/dist/{beats-K7CGCFVL.js → beats-U64B4S7Z.js} +9 -9
  13. package/dist/{benchmark-PHRDIXNL.js → benchmark-2YUPAI76.js} +9 -9
  14. package/dist/{browser-GN6R5ZSK.js → browser-DBFH7KXM.js} +5 -5
  15. package/dist/{bundleWithLocalizedFonts-C325UNR4.js → bundleWithLocalizedFonts-XWL7KSQJ.js} +2 -2
  16. package/dist/{capture-BZ7APOGQ.js → capture-E4VW75NM.js} +2 -2
  17. package/dist/{capture-6UBQFHZQ.js → capture-YWH7BPBI.js} +13 -12
  18. package/dist/{captureCompositionFrame-VORSCTWC.js → captureCompositionFrame-IG6S2OHG.js} +13 -12
  19. package/dist/{catalog-PHU2RUZ3.js → catalog-LZIZLZ34.js} +12 -12
  20. package/dist/{catch-up-HCNRM46J.js → catch-up-ZVNPIACY.js} +4 -4
  21. package/dist/{check-TJ5ZLB4I.js → check-EKEOD4UM.js} +38 -37
  22. package/dist/{checkBrowser-DWP7ZXJ7.js → checkBrowser-MYH6HPHH.js} +33 -32
  23. package/dist/{chunk-XF77MK3J.js → chunk-2AJU7PZ6.js} +1 -1
  24. package/dist/chunk-2D5WP2NI.js +3901 -0
  25. package/dist/{chunk-FBVUAH7N.js → chunk-2OYYNKJ4.js} +1 -1
  26. package/dist/{chunk-R2U2G4OS.js → chunk-37IHQVNQ.js} +1 -1
  27. package/dist/{chunk-IMSI7IFW.js → chunk-3OSBSUN3.js} +18 -18
  28. package/dist/{chunk-RHYOWDI6.js → chunk-3S3CXF4W.js} +2 -2
  29. package/dist/{chunk-YMQQXPD5.js → chunk-452UK7E7.js} +5 -12
  30. package/dist/{chunk-L2YGSAOL.js → chunk-4FVNEXSV.js} +3 -3
  31. package/dist/{chunk-7UZC4N62.js → chunk-4GMDL4N5.js} +1 -1
  32. package/dist/{chunk-YWRQHRDY.js → chunk-4PIPQPCW.js} +7 -7
  33. package/dist/{chunk-J2ASTCU6.js → chunk-4VSV56F2.js} +2 -2
  34. package/dist/{chunk-NXMYHJAL.js → chunk-4VYPICIA.js} +29 -1
  35. package/dist/{chunk-QX4TB4NH.js → chunk-52YJKWV3.js} +379 -127
  36. package/dist/{chunk-GANST5K3.js → chunk-54PZ2EQZ.js} +1 -1
  37. package/dist/{chunk-5IPKQHOL.js → chunk-B3GG3HJB.js} +1 -1
  38. package/dist/{chunk-2MCXIY4B.js → chunk-B7RJV74O.js} +28 -11
  39. package/dist/{chunk-VOM2HLUI.js → chunk-BK5YCT54.js} +3 -3
  40. package/dist/{chunk-RWGASWT7.js → chunk-BL4U6U52.js} +1 -0
  41. package/dist/{chunk-T6O5OLN2.js → chunk-BYADARIC.js} +2 -2
  42. package/dist/{chunk-VNPADTDD.js → chunk-CEUBYYVJ.js} +2 -2
  43. package/dist/{chunk-JCDYDF54.js → chunk-CEZH4AQT.js} +12 -2
  44. package/dist/{chunk-BY6OQ6XP.js → chunk-CZNSLFYD.js} +3 -1
  45. package/dist/{chunk-SBBQFPCJ.js → chunk-DT3JESJ6.js} +1 -1
  46. package/dist/{chunk-3CXIX6XS.js → chunk-DVQDBWQG.js} +4 -4
  47. package/dist/{chunk-K2AKVYNR.js → chunk-EB3XXHNO.js} +2 -2
  48. package/dist/{chunk-3FV5BVWS.js → chunk-EY7GKVPS.js} +2 -2
  49. package/dist/{chunk-W24SZ5FL.js → chunk-F2ASNL2K.js} +6 -9
  50. package/dist/{chunk-ODBYZIOH.js → chunk-F3B7CE3Q.js} +14 -14
  51. package/dist/{chunk-E3P3LJG6.js → chunk-FLREUEHW.js} +28 -11
  52. package/dist/{chunk-6XVKMBUA.js → chunk-FUA22HO4.js} +1 -1
  53. package/dist/{chunk-AEXVVABM.js → chunk-GAFEU6AB.js} +13 -10
  54. package/dist/{chunk-DIKAPMMF.js → chunk-GQVTTWZF.js} +144 -39
  55. package/dist/{chunk-7LLRMYP6.js → chunk-HCLBM2LQ.js} +2 -2
  56. package/dist/{chunk-AMZJFCOX.js → chunk-HG5ECUOR.js} +5 -5
  57. package/dist/{chunk-KZOZN4PI.js → chunk-HPGQPRHY.js} +3 -3
  58. package/dist/{chunk-BPKLUHFT.js → chunk-HQD7ODQB.js} +5 -5
  59. package/dist/{chunk-SK7TR7BL.js → chunk-JU4T4VAA.js} +4 -4
  60. package/dist/{chunk-MGBUWPXX.js → chunk-JVTWX5G3.js} +33 -8
  61. package/dist/{chunk-2J3NA3OB.js → chunk-JXTPNUSO.js} +83 -51
  62. package/dist/{chunk-2VXY3PEF.js → chunk-K2VXPQKC.js} +107 -94
  63. package/dist/chunk-K4MJX7SR.js +17 -0
  64. package/dist/{chunk-XX2PA4L3.js → chunk-KDEV5RIE.js} +7 -3
  65. package/dist/{chunk-MVIJTXN5.js → chunk-LMIDZIW2.js} +12 -12
  66. package/dist/{chunk-6WNLQI63.js → chunk-LOGKDQ3G.js} +3 -3
  67. package/dist/{chunk-IW5G323T.js → chunk-LTGTN2TH.js} +8 -9
  68. package/dist/{chunk-MEE4NTPZ.js → chunk-LZ4WPR3B.js} +2 -2
  69. package/dist/{chunk-32NB4VMH.js → chunk-M2VXARYK.js} +3 -2
  70. package/dist/{chunk-7RSY7SZN.js → chunk-MCFPMUMT.js} +2 -2
  71. package/dist/{chunk-BEOK6F26.js → chunk-MGSNFWGR.js} +2 -2
  72. package/dist/{chunk-ZEMDV6W2.js → chunk-MO6RTNYD.js} +1 -1
  73. package/dist/{chunk-7JJMT6LN.js → chunk-N33FO44R.js} +1 -1
  74. package/dist/{chunk-A4OI5ZNX.js → chunk-N3M3IU6S.js} +1 -1
  75. package/dist/{chunk-CXRZBWSH.js → chunk-NVVIFW3C.js} +10 -10
  76. package/dist/{chunk-E5V6WEMK.js → chunk-O2ILONGK.js} +10 -10
  77. package/dist/{chunk-4HCJOFMB.js → chunk-OJNNKHAZ.js} +94 -22
  78. package/dist/{chunk-QWLES6YV.js → chunk-PEHST4UY.js} +3 -3
  79. package/dist/{chunk-BV6YE455.js → chunk-POFJH2IS.js} +1 -1
  80. package/dist/{chunk-AR46ND2Q.js → chunk-PXK3ICU6.js} +1 -1
  81. package/dist/{chunk-LOKCBZYF.js → chunk-Q4HKC3O7.js} +3 -3
  82. package/dist/{chunk-J2BSUF6X.js → chunk-QJQTWTM7.js} +8 -3
  83. package/dist/{chunk-QFPBRZJD.js → chunk-ROEW726S.js} +1 -1
  84. package/dist/{chunk-OQL4AJ4X.js → chunk-RUPGFW5B.js} +6 -6
  85. package/dist/{chunk-5TRFLZ5Z.js → chunk-RZWJJCI7.js} +2 -2
  86. package/dist/{chunk-2HP5GIQ3.js → chunk-SNECH6QA.js} +1 -1
  87. package/dist/{chunk-REUL2KH2.js → chunk-ST35C4K6.js} +1 -1
  88. package/dist/{chunk-4E75LHAL.js → chunk-ST4SHO3S.js} +1 -1
  89. package/dist/{chunk-ULTKB5FC.js → chunk-TDYKVJTU.js} +548 -429
  90. package/dist/{chunk-WOKVXK4J.js → chunk-VHIBBDEI.js} +1 -1
  91. package/dist/{chunk-EKGGSAWR.js → chunk-VPON6DF2.js} +5 -5
  92. package/dist/{chunk-VRAXIQ6I.js → chunk-XYGULBFV.js} +2 -2
  93. package/dist/{chunk-PFRG5P32.js → chunk-Y3BT27Y7.js} +1 -1
  94. package/dist/{clean-2RNCTDBT.js → clean-NS2SDRK7.js} +21 -20
  95. package/dist/cli.js +54 -54
  96. package/dist/{cloud-NFIKESNZ.js → cloud-K4XQPWTY.js} +4 -4
  97. package/dist/{cloudrun-7224BCX3.js → cloudrun-BKOKXTXV.js} +6 -6
  98. package/dist/{compare-HL44MXVX.js → compare-ZAV773OL.js} +31 -30
  99. package/dist/{compiler-WF5QTXV7.js → compiler-CWHFCE3H.js} +5 -5
  100. package/dist/{component-ZBZXSJBR.js → component-OXA2ZWX3.js} +3 -3
  101. package/dist/{compositions-76P7LDDX.js → compositions-NKRVWCPE.js} +12 -11
  102. package/dist/{contactSheet-43ISAESM.js → contactSheet-5APX35L3.js} +1 -1
  103. package/dist/{delete-4YZBYOHJ.js → delete-HZ2LBCLC.js} +2 -2
  104. package/dist/{deploy-UGUUGYLF.js → deploy-FNDTZFF7.js} +1 -1
  105. package/dist/{deterministicFonts-RO2TCMLZ.js → deterministicFonts-RADD3BSX.js} +2 -2
  106. package/dist/{dist-5KKCRFPT.js → dist-2YTN2UGY.js} +3 -3
  107. package/dist/{dist-QQ26RUDV.js → dist-7OCZHNLY.js} +1 -1
  108. package/dist/{doctor-GGVUK4NB.js → doctor-6QWJGO5P.js} +14 -13
  109. package/dist/{events-V2VU4J3B.js → events-HTHOBIUN.js} +3 -3
  110. package/dist/{events-OXPTHVDB.js → events-MBKHVGXX.js} +2 -2
  111. package/dist/{feedback-HFZ5SCUK.js → feedback-X5QWTLEX.js} +8 -8
  112. package/dist/{ffmpeg-3VHY7GO3.js → ffmpeg-7GESJCCT.js} +9 -8
  113. package/dist/{figma-7SEZTLBJ.js → figma-SXOHFVJI.js} +3 -3
  114. package/dist/fontLocalizeCli.js +11 -10
  115. package/dist/{get-Y2S2PXCM.js → get-T2HI5FCK.js} +2 -2
  116. package/dist/{gpuPolicy-UHPOWRV5.js → gpuPolicy-5FABKW5G.js} +8 -7
  117. package/dist/{grade-compare-4VTXSQM5.js → grade-compare-JATGHA6Q.js} +37 -35
  118. package/dist/{gsapParser-UP3PNPC2.js → gsapParser-IEUSLYDJ.js} +11 -11
  119. package/dist/{gsapParserAcorn-OOTY2MVN.js → gsapParserAcorn-LZJKCFQI.js} +1 -1
  120. package/dist/{help-HXNOACHI.js → help-G6CIKCGS.js} +1 -1
  121. package/dist/{history-XDJUI4LC.js → history-CSJUHYTD.js} +9 -8
  122. package/dist/hyperframe.manifest.json +1 -1
  123. package/dist/hyperframe.runtime.iife.js +71 -65
  124. package/dist/hyperframes-player.global.js +3 -3
  125. package/dist/hyperframes-slideshow.global.js +1 -1
  126. package/dist/{info-KYRI3EZV.js → info-MTTUMW2C.js} +8 -8
  127. package/dist/{init-IL7EWMT5.js → init-LJYNI5EK.js} +30 -29
  128. package/dist/{inspect-TBNH23UC.js → inspect-HGDM2VJE.js} +31 -30
  129. package/dist/{installer-O2YMFSI4.js → installer-3XHURUDG.js} +5 -5
  130. package/dist/{keyframes-4GF62KAJ.js → keyframes-MSU7N53X.js} +59 -33
  131. package/dist/{lambda-JFL6M4XZ.js → lambda-2I2TIUSD.js} +8 -8
  132. package/dist/{layout-7MAEFR65.js → layout-KWOXZMN7.js} +31 -30
  133. package/dist/{lint-4AYHKYAM.js → lint-N53TLHFG.js} +7 -7
  134. package/dist/{lintProject-52SLJPRC.js → lintProject-EOUZA4EG.js} +1 -1
  135. package/dist/{list-3DP3D3MW.js → list-SHYPQC7U.js} +2 -2
  136. package/dist/{login-T54WQYRQ.js → login-TEB6PA3Y.js} +4 -4
  137. package/dist/{manager-MZIJY73J.js → manager-COSJVRAE.js} +2 -2
  138. package/dist/{manager-QROK2IH3.js → manager-PLRSZH5G.js} +10 -9
  139. package/dist/{media-treatment-4CXF7MSG.js → media-treatment-XTUKMIGE.js} +15 -14
  140. package/dist/{models-IS3I6JKU.js → models-4WKAPP2L.js} +14 -13
  141. package/dist/{motionShot-DVYJZOTQ.js → motionShot-PTKB4ILH.js} +17 -16
  142. package/dist/{normalize-audio-4527JIK4.js → normalize-audio-3NG326I2.js} +6 -6
  143. package/dist/{open-5JE46SAX.js → open-6S2LMF7R.js} +12 -12
  144. package/dist/{parakeetRunner-7JIJGJJ7.js → parakeetRunner-OEI35DVO.js} +15 -14
  145. package/dist/{pipeline-YEN3WFD2.js → pipeline-543FUKH4.js} +10 -9
  146. package/dist/{play-WFX67I7M.js → play-ETEGHP3B.js} +21 -21
  147. package/dist/{preflight-D377HVUZ.js → preflight-Y5IYUF2T.js} +11 -10
  148. package/dist/{present-XTSEKAC7.js → present-ZRSLMJ6J.js} +17 -17
  149. package/dist/{preview-5XH7EK6O.js → preview-CEJ3SVTY.js} +100 -65
  150. package/dist/{producer-TFFYF4ZM.js → producer-JFVFIV26.js} +1 -1
  151. package/dist/{projectConfig-6YUJHMCL.js → projectConfig-7EK3BS72.js} +7 -7
  152. package/dist/{publication-JK33Y55E.js → publication-Y54GYFMV.js} +3 -3
  153. package/dist/{publish-JHDGXWXU.js → publish-S3UJTPCV.js} +10 -10
  154. package/dist/{remove-background-P44MYAPJ.js → remove-background-YTATNQSI.js} +11 -10
  155. package/dist/{render-RBINWWP5.js → render-IIPXMSBO.js} +35 -34
  156. package/dist/{render-RJ3I4E3A.js → render-RN3W6YL4.js} +17 -16
  157. package/dist/{render-HJ34EGMN.js → render-WNIG4B3J.js} +6 -6
  158. package/dist/{render-batch-3D6XQYUC.js → render-batch-OYS3UQDB.js} +6 -6
  159. package/dist/renderSetupWorker.js +42 -4
  160. package/dist/{resolver-HCLTFZUW.js → resolver-OVCXVEDX.js} +5 -5
  161. package/dist/{sherpa-IPOUJM6Q.js → sherpa-NCSFD7S3.js} +14 -13
  162. package/dist/skills/hyperframes/references/format.md +1 -0
  163. package/dist/skills/media-use/scripts/lib/duck.mjs +18 -2
  164. package/dist/skills/media-use/scripts/lib/duck.test.mjs +79 -0
  165. package/dist/{skills-P67QEERC.js → skills-IUV3K3X7.js} +5 -5
  166. package/dist/{skillsUpdateCheck-IFMLRVIF.js → skillsUpdateCheck-NACBXMWW.js} +3 -3
  167. package/dist/{snapshot-4YM4NNWJ.js → snapshot-7S5USJ2I.js} +52 -46
  168. package/dist/{src-DCD3YMXX.js → src-CAR6PHI4.js} +10 -9
  169. package/dist/{src-SSV66L3F.js → src-HITT6NWG.js} +19 -6
  170. package/dist/{staticProjectServer-C7PPGLEQ.js → staticProjectServer-QR6VZBPT.js} +18 -18
  171. package/dist/studio/assets/{hyperframes-player-ChN3cOr0.js → hyperframes-player-DLOUZUct.js} +1 -1
  172. package/dist/studio/assets/{index-CHu83hHM.js → index-CAQ7OcNJ.js} +163 -163
  173. package/dist/studio/assets/{index-BYbFcRR0.js → index-D9kA6JUX.js} +1 -1
  174. package/dist/studio/index.html +1 -1
  175. package/dist/{studio-api-6YZ7PIQR.js → studio-api-HVNOJILH.js} +13 -11
  176. package/dist/{studioServer-EWHSE4GC.js → studioServer-3BG5FRJL.js} +53 -52
  177. package/dist/{telemetry-GGLBHZRZ.js → telemetry-PET2GFQG.js} +3 -3
  178. package/dist/{timeline-NKHQJXJ2.js → timeline-PVIC2Z5K.js} +20 -19
  179. package/dist/{tokens-FWNNDJ6R.js → tokens-4N46PWSF.js} +2 -2
  180. package/dist/{transcribe-TRPKXZ7L.js → transcribe-2DVBS7MH.js} +19 -18
  181. package/dist/{transcribe-VD2TMMC2.js → transcribe-IDC7JTM4.js} +13 -12
  182. package/dist/{updateCheck-CUPS6LU3.js → updateCheck-QRDVXU7I.js} +2 -2
  183. package/dist/{upgrade-23XO6MEX.js → upgrade-5CNE3TBH.js} +2 -2
  184. package/dist/{urlDownloader-YOAOONCK.js → urlDownloader-P2I25DFC.js} +7 -6
  185. package/dist/{validate-BWIW24G5.js → validate-CLR5PEOV.js} +25 -24
  186. package/dist/{video-XRXJS4GC.js → video-3CKZZBOB.js} +8 -7
  187. package/dist/warmCheck.js +38 -37
  188. package/package.json +1 -1
  189. package/dist/chunk-B2XLXD7V.js +0 -3897
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  runCancellableProcess,
9
9
  runRenderSetupWorker
10
- } from "./chunk-RWGASWT7.js";
10
+ } from "./chunk-BL4U6U52.js";
11
11
  import {
12
12
  getFreeDiskMb
13
13
  } from "./chunk-T6AGUTZJ.js";
@@ -35,9 +35,81 @@ import {
35
35
  writeFileSync
36
36
  } from "fs";
37
37
  import { homedir } from "os";
38
- import { debuglog } from "util";
39
38
  import { basename, dirname as dirname2, join, relative } from "path";
40
39
 
40
+ // src/browser/installProtocol.ts
41
+ var PROGRESS_PREFIX = "HYPERFRAMES_BROWSER_INSTALL_PROGRESS:";
42
+ var LOG_PREFIX = "HYPERFRAMES_BROWSER_INSTALL_LOG:";
43
+ function installProgressLine(downloaded, total) {
44
+ return `${PROGRESS_PREFIX}${JSON.stringify([downloaded, total])}
45
+ `;
46
+ }
47
+ function installLogLine(text) {
48
+ return `${LOG_PREFIX}${JSON.stringify(text)}
49
+ `;
50
+ }
51
+ function parseInstallLine(line) {
52
+ try {
53
+ if (line.startsWith(PROGRESS_PREFIX)) {
54
+ const [downloaded, total] = JSON.parse(line.slice(PROGRESS_PREFIX.length));
55
+ return { kind: "progress", downloaded, total };
56
+ }
57
+ if (line.startsWith(LOG_PREFIX)) {
58
+ return { kind: "log", text: JSON.parse(line.slice(LOG_PREFIX.length)) };
59
+ }
60
+ } catch {
61
+ }
62
+ return null;
63
+ }
64
+
65
+ // src/browser/installInChild.ts
66
+ var CHILD_STARTUP_MS = 15e3;
67
+ var BrowserDownloadStalledError = class extends Error {
68
+ };
69
+ function lineReader(onLine) {
70
+ let pending = "";
71
+ return (chunk) => {
72
+ const lines = (pending + chunk).split("\n");
73
+ pending = lines.pop() ?? "";
74
+ for (const line of lines) onLine(line);
75
+ };
76
+ }
77
+ async function installInChild(input, hooks) {
78
+ const abort = new AbortController();
79
+ let timer;
80
+ const arm = (waitMs) => {
81
+ clearTimeout(timer);
82
+ timer = setTimeout(
83
+ () => abort.abort(
84
+ new BrowserDownloadStalledError(
85
+ `The Chrome download from ${hooks.host} stalled: no data for ${hooks.stallMs / 1e3}s.`
86
+ )
87
+ ),
88
+ waitMs
89
+ );
90
+ timer.unref();
91
+ };
92
+ const onStdout = lineReader((line) => {
93
+ const event = parseInstallLine(line);
94
+ if (event?.kind === "log") hooks.onLog(event.text);
95
+ if (event?.kind !== "progress") return;
96
+ if (event.total > 0) hooks.onProgress?.(event.downloaded, event.total);
97
+ if (event.total > 0 && event.downloaded >= event.total) clearTimeout(timer);
98
+ else arm(hooks.stallMs);
99
+ });
100
+ arm(CHILD_STARTUP_MS + hooks.stallMs);
101
+ try {
102
+ return await runRenderSetupWorker("browser-install", input, {
103
+ signal: abort.signal,
104
+ detached: false,
105
+ maxBufferBytes: 4 * 1024 * 1024,
106
+ onStdout
107
+ });
108
+ } finally {
109
+ clearTimeout(timer);
110
+ }
111
+ }
112
+
41
113
  // src/browser/unzipArchive.ts
42
114
  import { mkdir } from "fs/promises";
43
115
  import { dirname } from "path";
@@ -486,10 +558,33 @@ Point hyperframes at an already-installed Chrome/Chromium instead:
486
558
  Then re-run your command. Any Chrome build works for the screenshot capture path; install a real chrome-headless-shell later if you need the perf-optimized BeginFrame path. Alternatively, run inside the hyperframes Docker image which ships a compatible headless-shell.`;
487
559
  return new Error(message, { cause: cause instanceof Error ? cause : void 0 });
488
560
  }
489
- async function downloadBrowser(options) {
490
- if (isLinuxArm()) {
491
- return ensureLinuxArmBrowser(options);
561
+ var DOWNLOAD_STALL_MS = 6e4;
562
+ var DOWNLOAD_ATTEMPTS = 3;
563
+ async function retryOnStall(run, clear) {
564
+ for (let attempt = 1; ; attempt++) {
565
+ try {
566
+ return await run();
567
+ } catch (err) {
568
+ if (!(err instanceof BrowserDownloadStalledError) || attempt >= DOWNLOAD_ATTEMPTS) throw err;
569
+ console.warn(`[hyperframes] ${err.message} Retrying (${attempt}/${DOWNLOAD_ATTEMPTS - 1}).`);
570
+ clear();
571
+ }
492
572
  }
573
+ }
574
+ function downloadHostOf(browsers, platform, buildId, baseUrl) {
575
+ try {
576
+ const url = browsers.getDownloadUrl(
577
+ browsers.Browser.CHROMEHEADLESSSHELL,
578
+ platform,
579
+ buildId,
580
+ baseUrl
581
+ );
582
+ return new URL(url).host;
583
+ } catch {
584
+ return "the Chrome download host";
585
+ }
586
+ }
587
+ function assertRoomToDownload() {
493
588
  removeInstallLeftovers();
494
589
  const freeMb = getFreeDiskMb(CACHE_ROOT_DIR);
495
590
  if (freeMb !== null && freeMb < ARCHIVE_PLUS_UNPACKED_SHELL_MB) {
@@ -497,55 +592,63 @@ async function downloadBrowser(options) {
497
592
  `Low disk space: Chrome Headless Shell needs about ${ARCHIVE_PLUS_UNPACKED_SHELL_MB} MB to download, ${freeMb} MB free at ${CACHE_ROOT_DIR}. Free disk space, then retry.`
498
593
  );
499
594
  }
500
- const { Browser, Cache, detectBrowserPlatform, install } = await loadPuppeteerBrowsers();
501
- const platform = detectBrowserPlatform();
502
- if (!platform) {
503
- throw new Error(`Unsupported platform: ${process.platform} ${process.arch}`);
504
- }
505
- const stagingDir = join(CACHE_ROOT_DIR, `${STAGING_PREFIX}${randomUUID()}`);
506
- const clearStaging = () => rmSync(stagingDir, { recursive: true, force: true });
507
- let unzipLog = [];
595
+ }
596
+ function stagedInstaller(browsers, platform, stagingDir, options, unzipLog) {
508
597
  const buildId = managedChromeVersion();
509
- const runInstall = async () => {
510
- unzipLog = [];
511
- const installOptions = {
598
+ const hooks = {
599
+ stallMs: options?.downloadStallMs ?? DOWNLOAD_STALL_MS,
600
+ host: downloadHostOf(browsers, platform, buildId, options?.downloadBaseUrl),
601
+ onProgress: options?.onProgress,
602
+ onLog: (line) => unzipLog.lines.push(line)
603
+ };
604
+ return async () => {
605
+ unzipLog.lines = [];
606
+ const input = {
512
607
  cacheDir: stagingDir,
513
- browser: Browser.CHROMEHEADLESSSHELL,
608
+ browser: browsers.Browser.CHROMEHEADLESSSHELL,
514
609
  buildId,
515
610
  platform,
516
- downloadProgressCallback: options?.onProgress,
517
- logger: (prefix) => {
518
- const debug = debuglog(prefix);
519
- const isUnzip = prefix === "puppeteer:browsers:fileUtil";
520
- if (!isUnzip && !debug.enabled) return void 0;
521
- return (...args) => {
522
- const line = args.join(" ");
523
- if (isUnzip) unzipLog.push(line);
524
- if (debug.enabled) debug(line);
525
- };
526
- }
611
+ baseUrl: options?.downloadBaseUrl
527
612
  };
528
613
  const unzipMayAskOnInput = process.platform !== "win32";
529
614
  if (unzipMayAskOnInput) {
530
- const archive = await install({ ...installOptions, unpack: false });
531
- const into = new Cache(stagingDir).installationDir(installOptions.browser, platform, buildId);
615
+ const archive = await installInChild({ ...input, unpack: false }, hooks);
616
+ const into = new browsers.Cache(stagingDir).installationDir(input.browser, platform, buildId);
532
617
  await unzipArchive(archive, into);
533
618
  }
534
- return install(installOptions);
619
+ return installInChild(input, hooks);
535
620
  };
621
+ }
622
+ async function downloadBrowser(options) {
623
+ if (isLinuxArm()) {
624
+ return ensureLinuxArmBrowser(options);
625
+ }
626
+ assertRoomToDownload();
627
+ const browsers = await loadPuppeteerBrowsers();
628
+ const platform = browsers.detectBrowserPlatform();
629
+ if (!platform) {
630
+ throw new Error(`Unsupported platform: ${process.platform} ${process.arch}`);
631
+ }
632
+ const stagingDir = join(CACHE_ROOT_DIR, `${STAGING_PREFIX}${randomUUID()}`);
633
+ const clearStaging = () => rmSync(stagingDir, { recursive: true, force: true });
634
+ const unzipLog = { lines: [] };
635
+ const runInstall = stagedInstaller(browsers, platform, stagingDir, options, unzipLog);
536
636
  try {
537
- const staged = await installWithCorruptArchiveRecovery(
538
- runInstall,
539
- clearStaging,
540
- (err) => console.warn(
541
- `[hyperframes] Downloaded browser archive was corrupt (${normalizeErrorMessage(err)}); re-downloading.`
542
- )
637
+ const staged = await retryOnStall(
638
+ () => installWithCorruptArchiveRecovery(
639
+ runInstall,
640
+ clearStaging,
641
+ (err) => console.warn(
642
+ `[hyperframes] Downloaded browser archive was corrupt (${normalizeErrorMessage(err)}); re-downloading.`
643
+ )
644
+ ),
645
+ clearStaging
543
646
  );
544
647
  assertExecutableUnpacked(stagingDir, staged.executablePath);
545
- unzipLog = [];
648
+ unzipLog.lines = [];
546
649
  return { executablePath: moveStagedInstallIntoCache(stagingDir, staged), source: "download" };
547
650
  } catch (err) {
548
- throw wrapDownloadFailureWithBrowserPathHint(err, unzipLog);
651
+ throw wrapDownloadFailureWithBrowserPathHint(err, unzipLog.lines);
549
652
  } finally {
550
653
  clearStaging();
551
654
  }
@@ -622,6 +725,8 @@ function isLinuxArm() {
622
725
  }
623
726
 
624
727
  export {
728
+ installProgressLine,
729
+ installLogLine,
625
730
  CACHE_DIR,
626
731
  withInstallLock,
627
732
  releaseOwnedBrowserInstallLock,
@@ -6,14 +6,14 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveProject
9
- } from "./chunk-4E75LHAL.js";
9
+ } from "./chunk-ST4SHO3S.js";
10
10
  import {
11
11
  DEFAULT_HISTORY_ROOT,
12
12
  HistoryBusyError,
13
13
  MAX_WINDOW_IDLE_MS,
14
14
  openProjectHistory,
15
15
  readProjectHistory
16
- } from "./chunk-4HCJOFMB.js";
16
+ } from "./chunk-OJNNKHAZ.js";
17
17
  import {
18
18
  findPreviewServerForProject,
19
19
  studioApiUrl
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-5ETJX6WM.js";
17
17
  import {
18
18
  runEnvironmentChecks
19
- } from "./chunk-KZOZN4PI.js";
19
+ } from "./chunk-HPGQPRHY.js";
20
20
  import {
21
21
  OPTIONAL_PACKAGES,
22
22
  installedOptionalPackageVersion
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-ZTZA4UWZ.js";
30
30
  import {
31
31
  resolveExtractCacheDir
32
- } from "./chunk-QX4TB4NH.js";
32
+ } from "./chunk-52YJKWV3.js";
33
33
  import {
34
34
  getAvailableMemoryMb,
35
35
  getFreeDiskMb,
@@ -39,14 +39,14 @@ import {
39
39
  import {
40
40
  getUpdateMeta,
41
41
  withMeta
42
- } from "./chunk-2HP5GIQ3.js";
42
+ } from "./chunk-SNECH6QA.js";
43
43
  import {
44
44
  CONFIG_PATH,
45
45
  withFileLock
46
46
  } from "./chunk-6NLPPKBO.js";
47
47
  import {
48
48
  VERSION
49
- } from "./chunk-3FV5BVWS.js";
49
+ } from "./chunk-EY7GKVPS.js";
50
50
  import {
51
51
  normalizeErrorMessage
52
52
  } from "./chunk-T2EUWCJE.js";
@@ -232,7 +232,7 @@ function checkEnvironment() {
232
232
  return { ok: true, detail: parts.join(" \xB7 ") };
233
233
  }
234
234
  async function checkWhisper() {
235
- const { findWhisper, getInstallInstructions } = await import("./manager-QROK2IH3.js");
235
+ const { findWhisper, getInstallInstructions } = await import("./manager-PLRSZH5G.js");
236
236
  const result = findWhisper();
237
237
  if (result) {
238
238
  return { ok: true, detail: result.executablePath };
@@ -11,14 +11,14 @@ import {
11
11
  distroLabel,
12
12
  getFFmpegInstallHint,
13
13
  parseLddMissingLibs
14
- } from "./chunk-VRAXIQ6I.js";
14
+ } from "./chunk-XYGULBFV.js";
15
15
  import {
16
16
  ensureBrowser,
17
17
  findBrowser
18
- } from "./chunk-DIKAPMMF.js";
18
+ } from "./chunk-GQVTTWZF.js";
19
19
  import {
20
20
  runCancellableProcess
21
- } from "./chunk-RWGASWT7.js";
21
+ } from "./chunk-BL4U6U52.js";
22
22
  import {
23
23
  getFreeDiskMb
24
24
  } from "./chunk-T6AGUTZJ.js";
@@ -6,26 +6,26 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  parakeetRunner
9
- } from "./chunk-7JJMT6LN.js";
9
+ } from "./chunk-N33FO44R.js";
10
10
  import {
11
11
  DecodeCancelled,
12
12
  prepareSherpaWav,
13
13
  sherpaUnsupportedReason,
14
14
  transcribeWithSherpa
15
- } from "./chunk-VOM2HLUI.js";
15
+ } from "./chunk-BK5YCT54.js";
16
16
  import {
17
17
  initialModelForLanguage,
18
18
  transcribe
19
- } from "./chunk-LOKCBZYF.js";
19
+ } from "./chunk-Q4HKC3O7.js";
20
20
  import {
21
21
  createRenderCancellationScope,
22
22
  stoppedByCancelSignal
23
- } from "./chunk-J2ASTCU6.js";
23
+ } from "./chunk-4VSV56F2.js";
24
24
  import {
25
25
  DEFAULT_MODEL,
26
26
  findWhisper,
27
27
  isWhisperUnavailable
28
- } from "./chunk-PFRG5P32.js";
28
+ } from "./chunk-Y3BT27Y7.js";
29
29
  import {
30
30
  formatSrt,
31
31
  formatVtt,
@@ -11,20 +11,20 @@ import {
11
11
  isAllowedHtmlAttribute,
12
12
  isSafeAttributeValue,
13
13
  sanitizeRichTextChildren
14
- } from "./chunk-MGBUWPXX.js";
14
+ } from "./chunk-JVTWX5G3.js";
15
15
  import {
16
16
  EXCLUDED_TAGS,
17
17
  ensureHfIds,
18
18
  mintHfId,
19
19
  walkCompositionDescendants
20
- } from "./chunk-AEXVVABM.js";
20
+ } from "./chunk-GAFEU6AB.js";
21
21
  import {
22
22
  decodedUrlPath,
23
23
  removeElementWithGsapCascade
24
- } from "./chunk-2MCXIY4B.js";
24
+ } from "./chunk-B7RJV74O.js";
25
25
  import {
26
26
  require_dist
27
- } from "./chunk-2VXY3PEF.js";
27
+ } from "./chunk-K2VXPQKC.js";
28
28
  import {
29
29
  readClipTiming,
30
30
  writeClipTiming
@@ -9,7 +9,7 @@ import {
9
9
  parseStrictFiniteTimingNumber,
10
10
  resolveNaturalMediaTimelineDuration,
11
11
  resolveTimedImageDurationSeconds
12
- } from "./chunk-B2XLXD7V.js";
12
+ } from "./chunk-2D5WP2NI.js";
13
13
  import {
14
14
  CANVAS_DIMENSIONS,
15
15
  isCompositionElement,
@@ -17,7 +17,7 @@ import {
17
17
  isTextElement,
18
18
  keyframesToGsapAnimations,
19
19
  serializeGsapAnimations
20
- } from "./chunk-2MCXIY4B.js";
20
+ } from "./chunk-B7RJV74O.js";
21
21
  import {
22
22
  COMPOSITION_ATTRIBUTES,
23
23
  MEDIA_START_BASIS_ATTR,
@@ -152,12 +152,27 @@ function getStageStyles(resolution = "portrait") {
152
152
 
153
153
  // ../core/dist/gsapCdn.js
154
154
  var GSAP_CDN_VERSION = "3.15.0";
155
- function gsapCdnDist(gsapVersion) {
155
+ var GSAP_CDN_BASE_URL = "https://cdn.jsdelivr.net/npm";
156
+ var GSAP_BASE_URL_META = "hyperframes-gsap-base-url";
157
+ function normalizeGsapBaseUrl(baseUrl) {
158
+ const value = baseUrl?.trim();
159
+ if (!value)
160
+ return GSAP_CDN_BASE_URL;
161
+ if (!/^https?:\/\//i.test(value) || !URL.canParse(value) || /[?#]/.test(value)) {
162
+ throw new Error("GSAP base URL must be an absolute HTTP(S) URL without a query or fragment");
163
+ }
164
+ const url = new URL(value);
165
+ if (url.username || url.password) {
166
+ throw new Error("GSAP base URL must not contain credentials");
167
+ }
168
+ return url.href.replace(/\/+$/, "");
169
+ }
170
+ function gsapCdnDist(gsapVersion, baseUrl) {
156
171
  const version = gsapVersion && /^\d+(\.\d+)*$/.test(gsapVersion) ? gsapVersion : GSAP_CDN_VERSION;
157
- return `https://cdn.jsdelivr.net/npm/gsap@${version}/dist/`;
172
+ return `${normalizeGsapBaseUrl(baseUrl)}/gsap@${version}/dist/`;
158
173
  }
159
- function motionPathPluginUrl(gsapVersion) {
160
- return `${gsapCdnDist(gsapVersion)}MotionPathPlugin.min.js`;
174
+ function motionPathPluginUrl(gsapVersion, baseUrl) {
175
+ return `${gsapCdnDist(gsapVersion, baseUrl)}MotionPathPlugin.min.js`;
161
176
  }
162
177
 
163
178
  // ../core/dist/templates/constants.js
@@ -4444,7 +4459,15 @@ function createRuntimeStartTimeResolver(params) {
4444
4459
  const startCache = /* @__PURE__ */ new WeakMap();
4445
4460
  const durationCache = /* @__PURE__ */ new WeakMap();
4446
4461
  const visiting = /* @__PURE__ */ new Set();
4447
- const findReferenceTarget = (refId) => {
4462
+ const compositionScopeOf = (element) => (element.hasAttribute("data-composition-id") ? element.parentElement : element)?.closest("[data-composition-id]") ?? null;
4463
+ const findReferenceTarget = (refId, from) => {
4464
+ const scope = compositionScopeOf(from);
4465
+ if (scope) {
4466
+ for (const candidate of scope.querySelectorAll(`[id="${refId}"]`)) {
4467
+ if (compositionScopeOf(candidate) === scope)
4468
+ return candidate;
4469
+ }
4470
+ }
4448
4471
  const byId = doc.getElementById(refId);
4449
4472
  if (byId)
4450
4473
  return byId;
@@ -4496,7 +4519,7 @@ function createRuntimeStartTimeResolver(params) {
4496
4519
  if (expression.kind === "absolute") {
4497
4520
  return resolveHostOffsetForElement(element, fallback) + Math.max(0, expression.value);
4498
4521
  }
4499
- const target = findReferenceTarget(expression.refId);
4522
+ const target = findReferenceTarget(expression.refId, element);
4500
4523
  if (!target)
4501
4524
  return fallback;
4502
4525
  const targetStart = resolveStartForElementInternal(target, 0);
@@ -5530,6 +5553,8 @@ export {
5530
5553
  isDistributedFps,
5531
5554
  generateBaseHtml,
5532
5555
  getStageStyles,
5556
+ GSAP_BASE_URL_META,
5557
+ normalizeGsapBaseUrl,
5533
5558
  gsapCdnDist,
5534
5559
  motionPathPluginUrl,
5535
5560
  GSAP_CDN,