hyperframes 0.8.153 → 0.8.155

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 (133) hide show
  1. package/dist/{add-D7GZM6ZS.js → add-QHRTHQDD.js} +8 -7
  2. package/dist/{animatedGifPrep-IBLDIJXC.js → animatedGifPrep-KYVKRWHT.js} +3 -2
  3. package/dist/api.js +12 -11
  4. package/dist/{asset-ACZRQU2Z.js → asset-LBQA2IUJ.js} +2 -2
  5. package/dist/{auth-LFWML3XJ.js → auth-3MMX5MLV.js} +2 -2
  6. package/dist/{autoUpdate-7IUGQXOV.js → autoUpdate-6EMWLUKO.js} +2 -2
  7. package/dist/{backgroundChecks-XI364BNX.js → backgroundChecks-3VL65XVE.js} +3 -3
  8. package/dist/backgroundChecksWorker.js +3 -3
  9. package/dist/{beats-FZGQ3HLR.js → beats-NOHE5FA5.js} +10 -9
  10. package/dist/{benchmark-3YEKSYMP.js → benchmark-7EFNYNYH.js} +9 -8
  11. package/dist/{browser-R5PKLYZD.js → browser-IZ2DJGGN.js} +6 -5
  12. package/dist/{bundleWithLocalizedFonts-QX5HV7LC.js → bundleWithLocalizedFonts-YVGLQ72Z.js} +1 -1
  13. package/dist/{capture-R7QSBEPW.js → capture-HHK4GA4X.js} +2 -2
  14. package/dist/{capture-MTHXUEC2.js → capture-YJEM42PR.js} +5 -4
  15. package/dist/{catalog-K2TRGCXO.js → catalog-GXGFKOX7.js} +8 -7
  16. package/dist/{catch-up-WCSN4K4A.js → catch-up-L6E26OPV.js} +7 -6
  17. package/dist/{check-N4EFKWC3.js → check-HSTEN7PX.js} +24 -22
  18. package/dist/{checkBrowser-73SOMDG3.js → checkBrowser-547BWZG6.js} +22 -20
  19. package/dist/{chunk-BD3XH4A7.js → chunk-2Q2KQRG7.js} +1 -1
  20. package/dist/{chunk-WUUOFMHU.js → chunk-45FUWHHV.js} +2 -2
  21. package/dist/{chunk-4OVLWS2K.js → chunk-4OMHV7P2.js} +2 -2
  22. package/dist/{chunk-WNCGJFTZ.js → chunk-4U66LIUS.js} +3 -3
  23. package/dist/{chunk-YI6OBVWQ.js → chunk-5GZLD7OW.js} +1 -1
  24. package/dist/{chunk-R6WCSVCE.js → chunk-6ENZIL42.js} +1 -1
  25. package/dist/{chunk-7FYFEXD2.js → chunk-6PIGOKTE.js} +23 -19
  26. package/dist/{chunk-OSASJLU4.js → chunk-6UMBAJRU.js} +1 -1
  27. package/dist/chunk-7KDQAD2W.js +81 -0
  28. package/dist/{chunk-T2Y2WC5I.js → chunk-AF6Y56VA.js} +2 -2
  29. package/dist/{chunk-SUVIGBHS.js → chunk-AVGGHUVK.js} +6 -6
  30. package/dist/{chunk-GXPD7J53.js → chunk-B4WWDPNF.js} +27 -14
  31. package/dist/{chunk-JQ57FAYN.js → chunk-BADLIO5R.js} +1 -1
  32. package/dist/{chunk-OIONMNWN.js → chunk-BEM57QP3.js} +4 -4
  33. package/dist/{chunk-AA67UBB2.js → chunk-BSMBAP7O.js} +5 -5
  34. package/dist/{chunk-DAKXCEE3.js → chunk-D5VMPDTH.js} +2 -2
  35. package/dist/{chunk-ZQMYD22O.js → chunk-DM2D67MP.js} +2 -2
  36. package/dist/{chunk-5ZGSN5YK.js → chunk-ECFNYTEM.js} +1 -1
  37. package/dist/{chunk-JBUIS5DN.js → chunk-GC36GZHM.js} +1 -1
  38. package/dist/{chunk-FZC4UM4G.js → chunk-GD5MYXEK.js} +1 -1
  39. package/dist/{chunk-7NKLNOHW.js → chunk-GQ73YXKD.js} +1 -1
  40. package/dist/{chunk-CBMZYOWC.js → chunk-HAKVKAUQ.js} +2 -2
  41. package/dist/{chunk-5DD45SJZ.js → chunk-HXU4DWOZ.js} +1 -1
  42. package/dist/{chunk-4MLYMDQ4.js → chunk-KEGTYA7V.js} +3 -3
  43. package/dist/chunk-KLIKCX6Q.js +63 -0
  44. package/dist/{chunk-AUK5QCRH.js → chunk-KS4JPMVV.js} +2 -2
  45. package/dist/{chunk-UNOALNYO.js → chunk-M2IEAI7L.js} +7 -7
  46. package/dist/{chunk-3DMR7RF6.js → chunk-O5S54BVW.js} +2 -2
  47. package/dist/{chunk-KFBEMIMD.js → chunk-P5CMYIC6.js} +1 -1
  48. package/dist/{chunk-5OKZRXLT.js → chunk-PCBCTD7M.js} +2 -2
  49. package/dist/{chunk-RCWSM7IQ.js → chunk-PCXEFXRK.js} +1 -1
  50. package/dist/{chunk-TCJM3KF2.js → chunk-PFERJHKB.js} +1 -1
  51. package/dist/{chunk-5FS4HCHN.js → chunk-PSDTKP6K.js} +7 -1
  52. package/dist/{chunk-2X3UJ4Q3.js → chunk-Q3BS3MN5.js} +2 -2
  53. package/dist/{chunk-XBSPQ52S.js → chunk-QWQ6GQTI.js} +5 -5
  54. package/dist/{chunk-J5LEAKUA.js → chunk-RB6RHOSF.js} +3 -3
  55. package/dist/{chunk-TQUTAWUR.js → chunk-RSNBNSKZ.js} +2 -2
  56. package/dist/{chunk-QBFHVMOI.js → chunk-RTI536FR.js} +8 -8
  57. package/dist/{chunk-YG2Y55KF.js → chunk-SQHWDFTV.js} +1 -1
  58. package/dist/{chunk-Z6CSYA7U.js → chunk-TA5AUF2J.js} +1 -1
  59. package/dist/{chunk-2F6LWCSF.js → chunk-TLC4GYT5.js} +38 -26
  60. package/dist/{chunk-4IRCZWND.js → chunk-UNO7QJAV.js} +5 -5
  61. package/dist/chunk-XT6MXC7A.js +6 -0
  62. package/dist/{clean-TLMZ6GVY.js → clean-J3IRHNY5.js} +13 -11
  63. package/dist/cli.js +49 -49
  64. package/dist/{cloud-XFIRM6YE.js → cloud-TMV666ML.js} +4 -4
  65. package/dist/{compare-OKSXYO3L.js → compare-UXT7YJAD.js} +16 -14
  66. package/dist/{component-3II4YXAD.js → component-OEWAQBRI.js} +3 -3
  67. package/dist/{compositions-RL75WQS6.js → compositions-J5UAUORI.js} +9 -8
  68. package/dist/{delete-4FM24SJ2.js → delete-RIWTBVNH.js} +2 -2
  69. package/dist/{doctor-Q5WYRIVP.js → doctor-L4LKY2ZO.js} +9 -8
  70. package/dist/{events-CPZTSXAX.js → events-7O35RPKC.js} +5 -4
  71. package/dist/{events-J5VJAKGT.js → events-CRYKZ3VN.js} +6 -5
  72. package/dist/{feedback-U64DIKAF.js → feedback-WL5ILVT2.js} +7 -6
  73. package/dist/{ffmpeg-MJFMBBSF.js → ffmpeg-2ROTISBL.js} +3 -2
  74. package/dist/{figma-GUHWRHJO.js → figma-Y36QOXGR.js} +3 -3
  75. package/dist/fontLocalizeCli.js +6 -4
  76. package/dist/{get-XDQJPF7G.js → get-BKAU2UKN.js} +2 -2
  77. package/dist/{gpuPolicy-7SIPG5BM.js → gpuPolicy-5AGAE6DM.js} +3 -2
  78. package/dist/{grade-compare-WWW2F3NY.js → grade-compare-6F5QLGGK.js} +17 -15
  79. package/dist/{help-3UJYI7LC.js → help-VMH6Q3TP.js} +1 -1
  80. package/dist/{history-VQSM5L6N.js → history-WJI7NN5U.js} +10 -9
  81. package/dist/hyperframes-player.global.js +1 -1
  82. package/dist/{info-NMDUH7N5.js → info-ZPGZJKYK.js} +8 -7
  83. package/dist/{init-D753VPPZ.js → init-FH3HAGUA.js} +21 -20
  84. package/dist/{inspect-KEE27DQN.js → inspect-MIO35XDA.js} +18 -16
  85. package/dist/{keyframes-EP44YDZW.js → keyframes-HL66NSCA.js} +9 -8
  86. package/dist/{layout-LATG5CZV.js → layout-HLA3MBNJ.js} +18 -16
  87. package/dist/{lint-TQDQFJKW.js → lint-BL4JKGPG.js} +9 -8
  88. package/dist/{list-O44ENRGS.js → list-34AMRBCS.js} +2 -2
  89. package/dist/{login-EKFN5PZP.js → login-EL5DFM34.js} +4 -4
  90. package/dist/{manager-X44GKUEL.js → manager-JNJE54OQ.js} +4 -3
  91. package/dist/{media-treatment-LPT4GYAE.js → media-treatment-UWR4OOHW.js} +9 -8
  92. package/dist/{models-CRYHY4KH.js → models-2E6AGL43.js} +7 -6
  93. package/dist/{motionShot-BS3DB666.js → motionShot-JBH6JWB4.js} +7 -6
  94. package/dist/{normalize-audio-7X445LLJ.js → normalize-audio-ZZ3O7VDF.js} +7 -6
  95. package/dist/{open-JA7FN5F5.js → open-QN7XTS6J.js} +7 -6
  96. package/dist/{parakeetRunner-AFUTDANA.js → parakeetRunner-NUZTNYYF.js} +9 -8
  97. package/dist/{pipeline-3TQHAQOJ.js → pipeline-RUEI6IIO.js} +5 -4
  98. package/dist/{play-UUJAXFCJ.js → play-2Y6KCFV3.js} +12 -10
  99. package/dist/{preflight-JYOX64YP.js → preflight-JS4P5HFR.js} +5 -4
  100. package/dist/{present-EBP6YMCJ.js → present-J2UUEQWF.js} +12 -10
  101. package/dist/{preview-PVJDLZDU.js → preview-BSUSKQBL.js} +11 -10
  102. package/dist/{producer-HE23BPEU.js → producer-6QJ5624B.js} +1 -1
  103. package/dist/{remove-background-P5M42CA5.js → remove-background-SQUYEUJN.js} +6 -5
  104. package/dist/{render-BJMONGDL.js → render-GNHKF76H.js} +8 -7
  105. package/dist/{render-YSD2SRBL.js → render-U7RMOU2K.js} +16 -15
  106. package/dist/{sherpa-RWHRDO53.js → sherpa-CHOSLER6.js} +8 -7
  107. package/dist/{skills-KC6IGXDU.js → skills-2WUDLVDT.js} +8 -7
  108. package/dist/{skillsUpdateCheck-7C4TD7EL.js → skillsUpdateCheck-7N4CXFNJ.js} +3 -3
  109. package/dist/{snapshot-SNZL5GPC.js → snapshot-E5IT54QQ.js} +21 -19
  110. package/dist/{src-YMUDUVXQ.js → src-APLD7CAF.js} +2 -1
  111. package/dist/{src-KKS6QEHB.js → src-CP75EYSP.js} +5 -3
  112. package/dist/{staticProjectServer-XOCIQ3FV.js → staticProjectServer-VO5U75UA.js} +5 -4
  113. package/dist/{status-NBRMGL7D.js → status-RGHSK3DJ.js} +3 -2
  114. package/dist/studio/assets/{hyperframes-player-Cn6V2ZaK.js → hyperframes-player-BvAidsoQ.js} +1 -1
  115. package/dist/studio/assets/{index-CEGNvZnK.js → index-CbWWPYt-.js} +1 -1
  116. package/dist/studio/assets/{index-CaaXbGyk.js → index-Jt_3ZX4p.js} +1 -1
  117. package/dist/studio/assets/{index-Cwpnr4DV.js → index-z1M2RwXX.js} +4 -4
  118. package/dist/studio/index.html +1 -1
  119. package/dist/{studio-api-NUNUZQ5I.js → studio-api-7JCPNJA7.js} +3 -2
  120. package/dist/{studioServer-FBY3YWZH.js → studioServer-A67X3ZLJ.js} +30 -24
  121. package/dist/{system-OXRG57F2.js → system-VRXC6S4A.js} +3 -2
  122. package/dist/{telemetry-KNSTX3E2.js → telemetry-22DNA5QE.js} +6 -5
  123. package/dist/{timeline-6I5LGPP6.js → timeline-K3BXXFQG.js} +12 -10
  124. package/dist/{tokens-MY4GOQ53.js → tokens-MWRAQMQU.js} +2 -2
  125. package/dist/{transcribe-ISCPZLQZ.js → transcribe-C7J56BLL.js} +14 -13
  126. package/dist/{transcribe-56WECC4Y.js → transcribe-O5B3HUFK.js} +7 -6
  127. package/dist/{updateCheck-FAG4T4AV.js → updateCheck-EPJ7WDFT.js} +2 -2
  128. package/dist/{upgrade-5QCPW55B.js → upgrade-M5XD6ZPM.js} +2 -2
  129. package/dist/{urlDownloader-FGSJGUM7.js → urlDownloader-IEP2DY4N.js} +2 -1
  130. package/dist/{validate-WC3FUSUF.js → validate-JAF2KIJI.js} +16 -14
  131. package/dist/{video-DOFSWSSR.js → video-TX6DGLND.js} +3 -2
  132. package/package.json +1 -1
  133. package/dist/chunk-AMKC3AXA.js +0 -25
@@ -10,10 +10,10 @@ import {
10
10
  MAX_WINDOW_IDLE_MS,
11
11
  openProjectHistory,
12
12
  readProjectHistory
13
- } from "./chunk-7FYFEXD2.js";
13
+ } from "./chunk-6PIGOKTE.js";
14
14
  import {
15
15
  resolveProject
16
- } from "./chunk-JQ57FAYN.js";
16
+ } from "./chunk-BADLIO5R.js";
17
17
  import {
18
18
  findPreviewServerForProject,
19
19
  studioApiUrl
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
 
8
8
  // src/utils/producer.ts
9
9
  async function loadProducer() {
10
- return await import("./src-KKS6QEHB.js");
10
+ return await import("./src-CP75EYSP.js");
11
11
  }
12
12
 
13
13
  export {
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  VERSION
9
- } from "./chunk-2X3UJ4Q3.js";
9
+ } from "./chunk-Q3BS3MN5.js";
10
10
 
11
11
  // src/registry/compatibility.ts
12
12
  import { compareVersions } from "compare-versions";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  updateNoticesSuppressed
9
- } from "./chunk-YI6OBVWQ.js";
9
+ } from "./chunk-5GZLD7OW.js";
10
10
  import {
11
11
  hostAnswers
12
12
  } from "./chunk-K4WIOZFP.js";
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getMimeType,
9
9
  injectMediaCodecMapIntoHtml
10
- } from "./chunk-5FS4HCHN.js";
10
+ } from "./chunk-PSDTKP6K.js";
11
11
  import {
12
12
  PROXY_VARIANT_CONFIG,
13
13
  ProxyCapacityError,
@@ -8,10 +8,10 @@ import {
8
8
  flush,
9
9
  shouldTrack,
10
10
  trackEvent
11
- } from "./chunk-AUK5QCRH.js";
11
+ } from "./chunk-KS4JPMVV.js";
12
12
  import {
13
13
  getPowerState
14
- } from "./chunk-XBSPQ52S.js";
14
+ } from "./chunk-QWQ6GQTI.js";
15
15
  import {
16
16
  CliRuntimeError
17
17
  } from "./chunk-PBN6GBJE.js";
@@ -10,7 +10,7 @@ import {
10
10
  isDevice,
11
11
  isQuality,
12
12
  render
13
- } from "./chunk-WNCGJFTZ.js";
13
+ } from "./chunk-4U66LIUS.js";
14
14
 
15
15
  // src/api/removeBackground.ts
16
16
  import { resolve } from "path";
@@ -5,8 +5,8 @@ var require = __hf_createRequire(import.meta.url);
5
5
  var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
- detectWSL
9
- } from "./chunk-AMKC3AXA.js";
8
+ detectWsl
9
+ } from "./chunk-7KDQAD2W.js";
10
10
  import {
11
11
  runCancellableProcess
12
12
  } from "./chunk-54DMWFQZ.js";
@@ -125,7 +125,7 @@ function parseOsRelease(contents) {
125
125
  return out;
126
126
  }
127
127
  function detectLinuxDistro() {
128
- const isWsl = detectWSL();
128
+ const isWsl = detectWsl();
129
129
  try {
130
130
  const contents = readFileSync("/etc/os-release", "utf-8");
131
131
  const parsed = parseOsRelease(contents);
@@ -0,0 +1,63 @@
1
+ import { createRequire as __hf_createRequire } from "node:module";
2
+ import { fileURLToPath as __hf_fileURLToPath } from "node:url";
3
+ import { dirname as __hf_dirname } from "node:path";
4
+ var require = __hf_createRequire(import.meta.url);
5
+ var __filename = __hf_fileURLToPath(import.meta.url);
6
+ var __dirname = __hf_dirname(__filename);
7
+
8
+ // ../studio-server/dist/chunk-GR4TX52A.js
9
+ var CRF_MAX_BY_FORMAT = { mp4: 51, webm: 63 };
10
+ var VIDEO_BITRATE = /^\d+(\.\d+)?[kKmMgG]?$/;
11
+ var VIDEO_FRAME_FORMATS = ["auto", "jpg", "png"];
12
+ var HDR_MODES = ["auto", "force-hdr", "force-sdr"];
13
+ var isSet = (value) => value !== void 0 && value !== null;
14
+ function oneOf(value, allowed) {
15
+ return typeof value === "string" && allowed.includes(value);
16
+ }
17
+ function parseCrf(crf, format, max) {
18
+ if (typeof crf !== "number" || !Number.isInteger(crf) || crf < 0 || crf > max) {
19
+ return { ok: false, error: `crf must be an integer from 0 to ${max} for ${format}` };
20
+ }
21
+ return { ok: true, options: { crf } };
22
+ }
23
+ function parseVideoBitrate(videoBitrate) {
24
+ if (typeof videoBitrate !== "string" || !VIDEO_BITRATE.test(videoBitrate)) {
25
+ return { ok: false, error: 'videoBitrate must look like "10M", "2500k" or "8000000"' };
26
+ }
27
+ return { ok: true, options: { videoBitrate } };
28
+ }
29
+ function parseRateControl(body, format) {
30
+ const max = CRF_MAX_BY_FORMAT[format];
31
+ if (max === void 0) return { ok: true, options: {} };
32
+ if (isSet(body.crf) && isSet(body.videoBitrate)) {
33
+ return { ok: false, error: "use either crf or videoBitrate, not both" };
34
+ }
35
+ if (isSet(body.crf)) return parseCrf(body.crf, format, max);
36
+ if (isSet(body.videoBitrate)) return parseVideoBitrate(body.videoBitrate);
37
+ return { ok: true, options: {} };
38
+ }
39
+ function parseEncoderOptions(body, format) {
40
+ const rate = parseRateControl(body, format);
41
+ if (!rate.ok) return rate;
42
+ const options = { ...rate.options };
43
+ if (isSet(body.videoFrameFormat)) {
44
+ if (!oneOf(body.videoFrameFormat, VIDEO_FRAME_FORMATS)) {
45
+ return {
46
+ ok: false,
47
+ error: `videoFrameFormat must be one of ${VIDEO_FRAME_FORMATS.join(", ")}`
48
+ };
49
+ }
50
+ options.videoFrameFormat = body.videoFrameFormat;
51
+ }
52
+ if (isSet(body.hdrMode)) {
53
+ if (!oneOf(body.hdrMode, HDR_MODES)) {
54
+ return { ok: false, error: `hdrMode must be one of ${HDR_MODES.join(", ")}` };
55
+ }
56
+ options.hdrMode = body.hdrMode;
57
+ }
58
+ return { ok: true, options };
59
+ }
60
+
61
+ export {
62
+ parseEncoderOptions
63
+ };
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-VWG7OQKU.js";
10
10
  import {
11
11
  getSystemMeta
12
- } from "./chunk-XBSPQ52S.js";
12
+ } from "./chunk-QWQ6GQTI.js";
13
13
  import {
14
14
  getInvocationId
15
15
  } from "./chunk-54HJ63Q2.js";
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-XUXGIA7H.js";
30
30
  import {
31
31
  VERSION
32
- } from "./chunk-2X3UJ4Q3.js";
32
+ } from "./chunk-Q3BS3MN5.js";
33
33
  import {
34
34
  CANARIES,
35
35
  canaryEnvVar,
@@ -6,24 +6,24 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  serveStaticProjectHtml
9
- } from "./chunk-7NKLNOHW.js";
9
+ } from "./chunk-GQ73YXKD.js";
10
10
  import {
11
11
  AUDIT_SEEK_OPTIONS,
12
12
  installPageFunctionGuard,
13
13
  seekCompositionTimeline,
14
14
  waitForCompositionFonts,
15
15
  waitForRuntimeReady
16
- } from "./chunk-OIONMNWN.js";
16
+ } from "./chunk-BEM57QP3.js";
17
17
  import {
18
18
  launchManagedBrowser,
19
19
  resolveManagedGpuMode
20
- } from "./chunk-KFBEMIMD.js";
20
+ } from "./chunk-P5CMYIC6.js";
21
21
  import {
22
22
  resolveDiagnosticNavigationTimeoutMs
23
23
  } from "./chunk-TXWPPBIW.js";
24
24
  import {
25
25
  resolveProject
26
- } from "./chunk-JQ57FAYN.js";
26
+ } from "./chunk-BADLIO5R.js";
27
27
  import {
28
28
  defineCommand
29
29
  } from "./chunk-S3S4TGEH.js";
@@ -37,7 +37,7 @@ import {
37
37
  import {
38
38
  printDeprecationNotice,
39
39
  withMeta
40
- } from "./chunk-YI6OBVWQ.js";
40
+ } from "./chunk-5GZLD7OW.js";
41
41
  import {
42
42
  normalizeErrorMessage
43
43
  } from "./chunk-KNU5COPB.js";
@@ -729,13 +729,13 @@ async function alignViewportToComposition(page, url) {
729
729
  async function runLayoutAudit(projectDir, opts) {
730
730
  const { ensureBrowser } = await import("./manager-ZLJD3EAY.js");
731
731
  const puppeteer = await import("puppeteer-core");
732
- const { buildChromeArgs } = await import("./src-YMUDUVXQ.js");
732
+ const { buildChromeArgs } = await import("./src-APLD7CAF.js");
733
733
  const {
734
734
  assertWebGpuAdapterAvailable,
735
735
  compositionRequiresWebGpu,
736
736
  resolveLocalBrowserGpuMode,
737
737
  resolveLocalWebGpu
738
- } = await import("./gpuPolicy-7SIPG5BM.js");
738
+ } = await import("./gpuPolicy-5AGAE6DM.js");
739
739
  const html = await bundleProjectHtml(projectDir);
740
740
  const server = await serveStaticProjectHtml(
741
741
  projectDir,
@@ -6,10 +6,10 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  withOwner
9
- } from "./chunk-ZQMYD22O.js";
9
+ } from "./chunk-DM2D67MP.js";
10
10
  import {
11
11
  beginArtifactCapture
12
- } from "./chunk-7FYFEXD2.js";
12
+ } from "./chunk-6PIGOKTE.js";
13
13
 
14
14
  // src/utils/artifactCapture.ts
15
15
  async function captureArtifactRevision(projectDir) {
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveCaptureBrowserGpuMode
9
- } from "./chunk-DAKXCEE3.js";
9
+ } from "./chunk-D5VMPDTH.js";
10
10
  import {
11
11
  requestCliExit
12
12
  } from "./chunk-PBN6GBJE.js";
@@ -21,10 +21,10 @@ import {
21
21
  emitWords,
22
22
  getPreparedWavDurationSeconds,
23
23
  prepareWav
24
- } from "./chunk-J5LEAKUA.js";
24
+ } from "./chunk-RB6RHOSF.js";
25
25
  import {
26
26
  stoppedByCancelSignal
27
- } from "./chunk-OSASJLU4.js";
27
+ } from "./chunk-6UMBAJRU.js";
28
28
  import {
29
29
  PARAKEET_MODEL_LABEL,
30
30
  SHERPA_ERROR_PREFIX,
@@ -8,7 +8,7 @@ import {
8
8
  DEFAULT_VP9_CPU_USED,
9
9
  isHttpUrl,
10
10
  runFfmpeg
11
- } from "./chunk-2F6LWCSF.js";
11
+ } from "./chunk-TLC4GYT5.js";
12
12
  import {
13
13
  parseAnimatedGifMetadata
14
14
  } from "./chunk-ZDEEHQ2Y.js";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getMimeType
9
- } from "./chunk-5FS4HCHN.js";
9
+ } from "./chunk-PSDTKP6K.js";
10
10
  import {
11
11
  injectTagsAtHeadStart
12
12
  } from "./chunk-GV7I3ZSQ.js";
@@ -43,7 +43,7 @@ import {
43
43
  resolveProjectAndSignature,
44
44
  resolveProjectSignature,
45
45
  settledFileTag
46
- } from "./chunk-7FYFEXD2.js";
46
+ } from "./chunk-6PIGOKTE.js";
47
47
  import {
48
48
  PROXY_PARAMS_VERSION,
49
49
  PROXY_PENDING_RETRY_AFTER_SECONDS,
@@ -81,6 +81,9 @@ import {
81
81
  findTimelineScript,
82
82
  parseGsapScriptAcorn
83
83
  } from "./chunk-5CS4T6C6.js";
84
+ import {
85
+ parseEncoderOptions
86
+ } from "./chunk-KLIKCX6Q.js";
84
87
  import {
85
88
  STUDIO_MANUAL_EDITS_PATH
86
89
  } from "./chunk-EOOEC32M.js";
@@ -7994,6 +7997,8 @@ function registerRenderRoutes(api, adapter) {
7994
7997
  }
7995
7998
  variables = body.variables;
7996
7999
  }
8000
+ const encoder = parseEncoderOptions(body, format);
8001
+ if (!encoder.ok) return c.json({ error: encoder.error }, 400);
7997
8002
  const now = /* @__PURE__ */ new Date();
7998
8003
  const jobId = `${project.id}_${formatRenderOutputTimestamp(now)}`;
7999
8004
  const rendersDir = adapter.rendersDir(project);
@@ -8010,6 +8015,7 @@ function registerRenderRoutes(api, adapter) {
8010
8015
  outputResolution,
8011
8016
  composition,
8012
8017
  variables,
8018
+ ...encoder.options,
8013
8019
  useGpu: body.gpu === true && format === "mp4",
8014
8020
  distinctId: typeof body.telemetryDistinctId === "string" ? body.telemetryDistinctId : void 0,
8015
8021
  telemetryOptOut: body.telemetryOptOut === true
@@ -6,8 +6,8 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
 
8
8
  // src/version.ts
9
- var VERSION = true ? "0.8.153" : "0.0.0-dev";
10
- var PRODUCER_VERSION = true ? "0.8.153" : "0.0.0-dev";
9
+ var VERSION = true ? "0.8.155" : "0.0.0-dev";
10
+ var PRODUCER_VERSION = true ? "0.8.155" : "0.0.0-dev";
11
11
 
12
12
  export {
13
13
  VERSION,
@@ -4,12 +4,12 @@ import { dirname as __hf_dirname } from "node:path";
4
4
  var require = __hf_createRequire(import.meta.url);
5
5
  var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
- import {
8
- detectWSL
9
- } from "./chunk-AMKC3AXA.js";
10
7
  import {
11
8
  getSystemTotalMb
12
9
  } from "./chunk-JYVGYKXG.js";
10
+ import {
11
+ detectWsl
12
+ } from "./chunk-7KDQAD2W.js";
13
13
 
14
14
  // src/telemetry/system.ts
15
15
  import { cpus, freemem, platform as platform2, release as release2 } from "os";
@@ -160,7 +160,7 @@ var VENDOR_RULES = [
160
160
  ];
161
161
  function detectSandboxRuntime() {
162
162
  if (platform() === "win32") return null;
163
- if (detectWSL()) return "wsl";
163
+ if (detectWsl()) return "wsl";
164
164
  if (isGVisor()) return "gvisor";
165
165
  if (isDocker()) return "docker";
166
166
  if (isFirecracker()) return "firecracker";
@@ -316,7 +316,7 @@ function getSystemMeta() {
316
316
  is_docker: detectDocker(),
317
317
  is_ci: detectCI(),
318
318
  ci_name: getCIName(),
319
- is_wsl: detectWSL(),
319
+ is_wsl: detectWsl(),
320
320
  is_tty: Boolean(process.stdout?.isTTY),
321
321
  sandbox_runtime: detectSandboxRuntime(),
322
322
  agent_runtime,
@@ -6,18 +6,18 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  stoppedByCancelSignal
9
- } from "./chunk-OSASJLU4.js";
9
+ } from "./chunk-6UMBAJRU.js";
10
10
  import {
11
11
  DEFAULT_MODEL,
12
12
  ensureModel,
13
13
  ensureWhisper,
14
14
  hasFFmpeg
15
- } from "./chunk-YG2Y55KF.js";
15
+ } from "./chunk-SQHWDFTV.js";
16
16
  import {
17
17
  findFFmpeg,
18
18
  findFFprobe,
19
19
  getFFmpegInstallHint
20
- } from "./chunk-4MLYMDQ4.js";
20
+ } from "./chunk-KEGTYA7V.js";
21
21
  import {
22
22
  findWavChunk
23
23
  } from "./chunk-UOFAE5RF.js";
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  RegistryCompatibilityError,
9
9
  gateRegistryItemsCompatibility
10
- } from "./chunk-JBUIS5DN.js";
10
+ } from "./chunk-GC36GZHM.js";
11
11
  import {
12
12
  DEFAULT_PROJECT_CONFIG,
13
13
  createProjectConfig,
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-2XEBNYG5.js";
30
30
  import {
31
31
  trackRegistryItemAdded
32
- } from "./chunk-CBMZYOWC.js";
32
+ } from "./chunk-HAKVKAUQ.js";
33
33
  import {
34
34
  defineCommand
35
35
  } from "./chunk-S3S4TGEH.js";
@@ -9,17 +9,17 @@ import {
9
9
  resolveCliChromeGpuMode,
10
10
  seekCompositionTimeline,
11
11
  waitForRuntimeReady
12
- } from "./chunk-OIONMNWN.js";
12
+ } from "./chunk-BEM57QP3.js";
13
13
  import {
14
14
  resolveCompositionViewportFromHtml
15
15
  } from "./chunk-FH7WODJH.js";
16
16
  import {
17
17
  launchManagedBrowser,
18
18
  resolveManagedGpuMode
19
- } from "./chunk-KFBEMIMD.js";
19
+ } from "./chunk-P5CMYIC6.js";
20
20
  import {
21
21
  resolveProject
22
- } from "./chunk-JQ57FAYN.js";
22
+ } from "./chunk-BADLIO5R.js";
23
23
  import {
24
24
  defineCommand
25
25
  } from "./chunk-S3S4TGEH.js";
@@ -33,7 +33,7 @@ import {
33
33
  import {
34
34
  printDeprecationNotice,
35
35
  withMeta
36
- } from "./chunk-YI6OBVWQ.js";
36
+ } from "./chunk-5GZLD7OW.js";
37
37
  import {
38
38
  decodeWellFormedEscapes
39
39
  } from "./chunk-BSQ7XANM.js";
@@ -228,7 +228,7 @@ function extractCompositionErrorsFromLint(lintResult) {
228
228
  async function localizeRemoteAssets(html) {
229
229
  let dir;
230
230
  try {
231
- const { loadProducer } = await import("./producer-HE23BPEU.js");
231
+ const { loadProducer } = await import("./producer-6QJ5624B.js");
232
232
  const { localizeRemoteMediaSources, localizeRemoteImageSources, localizeRemoteFontFaces } = await loadProducer();
233
233
  dir = mkdtempSync(join(tmpdir(), "hf-validate-assets-"));
234
234
  const assetDir = dir;
@@ -251,7 +251,7 @@ async function validateInBrowser(project, opts) {
251
251
  const projectDir = project.dir;
252
252
  const { bundleToSingleHtml } = await import("./compiler-WHUQZITN.js");
253
253
  const { ensureBrowser } = await import("./manager-ZLJD3EAY.js");
254
- const { serveStaticProjectHtml } = await import("./staticProjectServer-XOCIQ3FV.js");
254
+ const { serveStaticProjectHtml } = await import("./staticProjectServer-VO5U75UA.js");
255
255
  const { lintProject } = await import("./lintProject-XQWXJYSC.js");
256
256
  const lintResult = await lintProject(projectDir);
257
257
  const compositionErrors = extractCompositionErrorsFromLint(lintResult);
@@ -273,9 +273,9 @@ async function validateInBrowser(project, opts) {
273
273
  try {
274
274
  const browser = await ensureBrowser();
275
275
  const puppeteer = await import("puppeteer-core");
276
- const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-YMUDUVXQ.js");
276
+ const { buildChromeArgs, analyzeClipMediaFit } = await import("./src-APLD7CAF.js");
277
277
  const requestedGpuMode = resolveCliChromeGpuMode();
278
- const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-7SIPG5BM.js");
278
+ const { assertWebGpuAdapterAvailable, compositionRequiresWebGpu, resolveLocalWebGpu } = await import("./gpuPolicy-5AGAE6DM.js");
279
279
  const resolvedGpuMode = await resolveManagedGpuMode(requestedGpuMode, browser.executablePath);
280
280
  const requiresWebGpu = compositionRequiresWebGpu(html);
281
281
  const { gpuConfig, softwareWebGpu } = resolveLocalWebGpu(resolvedGpuMode, requiresWebGpu);
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-PO2SDVQA.js";
10
10
  import {
11
11
  findFFmpeg
12
- } from "./chunk-4MLYMDQ4.js";
12
+ } from "./chunk-KEGTYA7V.js";
13
13
  import {
14
14
  stoppableExecFile
15
15
  } from "./chunk-HU2SPFNG.js";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-AWDFDFI3.js";
15
15
  import {
16
16
  isBlockedNetworkHost
17
- } from "./chunk-2F6LWCSF.js";
17
+ } from "./chunk-TLC4GYT5.js";
18
18
  import {
19
19
  DOMParser,
20
20
  parseHTML
@@ -9,6 +9,9 @@ import {
9
9
  getSystemTotalMb,
10
10
  isLowMemorySystem
11
11
  } from "./chunk-JYVGYKXG.js";
12
+ import {
13
+ describeWslGpuAccess
14
+ } from "./chunk-7KDQAD2W.js";
12
15
  import {
13
16
  MEDIA_VISUAL_STYLE_PROPERTIES,
14
17
  RENDER_FRAME_ID_PREFIX,
@@ -558,7 +561,7 @@ function applyConcreteGpuScreenshotClamp(currentForceScreenshot, resolvedGpuMode
558
561
 
559
562
  // ../engine/src/utils/sdrCaptureColor.ts
560
563
  var SDR_RGB_TO_BT709_FILTER = "scale=out_color_matrix=bt709:out_range=tv:flags=neighbor";
561
- var SDR_CAPTURE_TO_BT709_FILTER = `scale=in_color_matrix=bt601:in_range=pc:flags=neighbor,format=gbrp,${SDR_RGB_TO_BT709_FILTER}`;
564
+ var SDR_CAPTURE_TO_BT709_FILTER = `scale=in_color_matrix=bt601:in_range=pc:flags=neighbor+accurate_rnd,format=gbrp,${SDR_RGB_TO_BT709_FILTER}`;
562
565
  var SDR_RGB_TO_TAGGED_BT709_FILTER = `${SDR_RGB_TO_BT709_FILTER},setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709:range=tv`;
563
566
 
564
567
  // ../parsers/dist/htmlAttributeSpans.js
@@ -1217,34 +1220,54 @@ async function probeAutoBrowserGpuMode(options) {
1217
1220
  });
1218
1221
  const resolved = resolveWebGlProbeMode(info);
1219
1222
  logResolvedBrowserGpuMode(resolved, describeWebGlProbe(info));
1220
- return resolved === "hardware" ? { mode: "hardware" } : { mode: "software", cause: "no-gpu" };
1223
+ if (resolved === "hardware") return { mode: "hardware" };
1224
+ return { mode: "software", cause: "no-gpu", ...wslAccess(options) };
1221
1225
  } catch (err) {
1222
1226
  logResolvedBrowserGpuMode("software", formatProbeFailure(err));
1223
- return { mode: "software", cause: "probe-error" };
1227
+ return { mode: "software", cause: "probe-error", ...wslAccess(options) };
1224
1228
  }
1225
1229
  }
1230
+ function wslAccess(options) {
1231
+ const lines = describeWslGpuAccess(options.wslHost);
1232
+ return lines ? { wslAccess: lines } : {};
1233
+ }
1226
1234
  function resolveBrowserGpuMode(mode, options = {}) {
1227
1235
  if (mode === "software") return Promise.resolve(mode);
1228
1236
  _autoBrowserGpuModeCache ??= probeAutoBrowserGpuMode(options);
1229
- if (mode === "auto") return _autoBrowserGpuModeCache.then((probed) => probed.mode);
1237
+ if (mode === "auto") {
1238
+ return _autoBrowserGpuModeCache.then((probed) => {
1239
+ if (probed.mode === "software" && probed.wslAccess && !_wslSoftwareNoteLogged) {
1240
+ _wslSoftwareNoteLogged = true;
1241
+ console.error(buildWslSoftwareNote(probed));
1242
+ }
1243
+ return probed.mode;
1244
+ });
1245
+ }
1230
1246
  return _autoBrowserGpuModeCache.then((probed) => {
1231
1247
  if (probed.mode === "software" && !_unverifiedHardwareGpuWarned) {
1232
1248
  _unverifiedHardwareGpuWarned = true;
1233
- console.warn(
1234
- buildUnverifiedHardwareGpuWarning(options.platform ?? process.platform, probed.cause)
1235
- );
1249
+ console.warn(buildUnverifiedHardwareGpuWarning(options.platform ?? process.platform, probed));
1236
1250
  }
1237
1251
  return "hardware";
1238
1252
  });
1239
1253
  }
1240
1254
  var _unverifiedHardwareGpuWarned = false;
1241
- function buildUnverifiedHardwareGpuWarning(platform, cause) {
1255
+ var _wslSoftwareNoteLogged = false;
1256
+ function buildWslSoftwareNote({ cause, wslAccess: wslAccess2 = [] }) {
1257
+ const check = cause === "probe-error" ? "the GPU check could not finish (see the probe line above)" : "the GPU check found no hardware GPU";
1258
+ return [
1259
+ `[hyperframes] WSL: ${check}, so this render uses software WebGL (SwiftShader) and runs at CPU speed.`,
1260
+ ...wslAccess2,
1261
+ " Pass --no-browser-gpu to skip the GPU check and render in software."
1262
+ ].join("\n");
1263
+ }
1264
+ function buildUnverifiedHardwareGpuWarning(platform, { cause, wslAccess: wslAccess2 }) {
1242
1265
  if (cause === "probe-error") {
1243
- return "[hyperframes] browserGpuMode=hardware was requested, but the GPU probe could not run, so hardware acceleration is UNVERIFIED. If Chrome falls back to software WebGL the capture will run at CPU speed. Honouring the explicit request anyway.\n This is a probe failure, not evidence of a missing GPU: see the `browserGpuMode probe \u2192 software (probe failed ...)` line above for the underlying error, which usually means Chrome could not launch (bad HYPERFRAMES_BROWSER_PATH, missing shared libraries, or a denied sandbox) rather than a GPU problem.\n Run `hyperframes doctor` to check the Chrome install.";
1266
+ return "[hyperframes] browserGpuMode=hardware was requested, but the GPU probe could not run, so hardware acceleration is UNVERIFIED. If Chrome falls back to software WebGL the capture will run at CPU speed. Honouring the explicit request anyway.\n This is a probe failure, not evidence of a missing GPU: see the `browserGpuMode probe \u2192 software (probe failed ...)` line above for the underlying error, which usually means Chrome could not launch (bad HYPERFRAMES_BROWSER_PATH, missing shared libraries, or a denied sandbox) rather than a GPU problem.\n Run `hyperframes doctor` to check the Chrome install." + (wslAccess2 ? ["", " Under WSL, a GPU path that is slow to start or unreachable can also cause it:"].concat(wslAccess2).join("\n") : "");
1244
1267
  }
1245
- const remediation = platform === "linux" ? "Inside Docker, the container needs GPU passthrough: `--gpus all` with the NVIDIA Container Toolkit installed, or `--device /dev/dri` for Mesa/AMD/Intel. The image also needs the matching userspace driver + libEGL. Verify with `hyperframes render --browser-gpu` and watch for this warning disappearing." : "Check that the host exposes a GPU to this process and that the graphics drivers are installed.";
1268
+ const remediation = wslAccess2?.join("\n") ?? (platform === "linux" ? " Inside Docker, the container needs GPU passthrough: `--gpus all` with the NVIDIA Container Toolkit installed, or `--device /dev/dri` for Mesa/AMD/Intel. The image also needs the matching userspace driver + libEGL. Verify with `hyperframes render --browser-gpu` and watch for this warning disappearing." : " Check that the host exposes a GPU to this process and that the graphics drivers are installed.");
1246
1269
  return `[hyperframes] browserGpuMode=hardware was requested, but the WebGL probe found no hardware GPU, so Chrome will silently fall back to software WebGL and the capture will run at CPU speed. Honouring the explicit request anyway.
1247
- ${remediation}
1270
+ ${remediation}
1248
1271
  Pass --no-browser-gpu to select deterministic SwiftShader instead of waiting on a hardware path that is not there.`;
1249
1272
  }
1250
1273
  function logResolvedBrowserGpuMode(resolved, reason) {
@@ -11447,7 +11470,7 @@ var SDR_TO_HDR_COLORSPACE_FILTER = "colorspace=all=bt2020:iall=bt709:range=tv";
11447
11470
  var HDR_TO_SDR_ZSCALE_TRANSFORM_KEY = "hdr2sdr-hable-srgb";
11448
11471
  var HDR_TO_SDR_VIDEOTOOLBOX_TRANSFORM_KEY = "hdr2sdr-videotoolbox-hdr";
11449
11472
  var SDR_CANVAS_PASSTHROUGH_FILTER = "setparams=color_primaries=bt709:color_trc=iec61966-2-1";
11450
- var SDR_JPEG_AS_BT601_FULL_RANGE_FILTER = "scale=flags=neighbor,format=gbrp,scale=out_color_matrix=bt601:out_range=pc:flags=neighbor,format=yuv420p";
11473
+ var SDR_JPEG_AS_BT601_FULL_RANGE_FILTER = "scale=flags=neighbor+accurate_rnd,format=gbrp,scale=out_color_matrix=bt601:out_range=pc:flags=neighbor,format=yuv420p";
11451
11474
  var warnedMissingZscale = false;
11452
11475
  async function toneMapsWithZscale() {
11453
11476
  return process.platform !== "darwin" || isFfmpegFilterAvailable("zscale");
@@ -15781,14 +15804,9 @@ function defaultSafeMaxWorkers() {
15781
15804
  }
15782
15805
  var MIN_FRAMES_PER_WORKER = 30;
15783
15806
  function shouldDisableBrowserPoolForParallelWorker({
15784
- parallel,
15785
- platform,
15786
- deviceScaleFactor,
15787
- headlessShellPath
15807
+ parallel
15788
15808
  }) {
15789
- return Boolean(
15790
- parallel && platform === "linux" && headlessShellPath && (deviceScaleFactor ?? 1) <= 1
15791
- );
15809
+ return Boolean(parallel);
15792
15810
  }
15793
15811
  function selectWorkerDiagnostics(lines, maxLines = MAX_WORKER_DIAGNOSTIC_LINES) {
15794
15812
  return lines.filter(
@@ -16134,13 +16152,7 @@ async function executeWorkerTask(task, serverUrl, captureOptions, createBeforeCa
16134
16152
  if (!existsSync11(task.outputDir)) mkdirSync8(task.outputDir, { recursive: true });
16135
16153
  let session = null;
16136
16154
  let perf;
16137
- const needsSeparateBrowsers = shouldDisableBrowserPoolForParallelWorker({
16138
- parallel,
16139
- platform: process.platform,
16140
- forceScreenshot: config?.forceScreenshot,
16141
- deviceScaleFactor: captureOptions.deviceScaleFactor,
16142
- headlessShellPath: resolveHeadlessShellPath(config)
16143
- });
16155
+ const needsSeparateBrowsers = shouldDisableBrowserPoolForParallelWorker({ parallel });
16144
16156
  const workerConfig = needsSeparateBrowsers ? { ...config, enableBrowserPool: false } : config;
16145
16157
  const phaseTimeoutMs = resolveParallelWorkerTimeoutMs(
16146
16158
  Boolean(parallel && onFrameBuffer && workerConfig?.useDrawElement)
@@ -7,13 +7,13 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  parseFeedbackRating,
9
9
  trackRenderFeedback
10
- } from "./chunk-CBMZYOWC.js";
10
+ } from "./chunk-HAKVKAUQ.js";
11
11
  import {
12
12
  shouldTrack
13
- } from "./chunk-AUK5QCRH.js";
13
+ } from "./chunk-KS4JPMVV.js";
14
14
  import {
15
15
  detectAgentRuntime
16
- } from "./chunk-XBSPQ52S.js";
16
+ } from "./chunk-QWQ6GQTI.js";
17
17
  import {
18
18
  c
19
19
  } from "./chunk-ZTZA4UWZ.js";
@@ -83,8 +83,8 @@ async function maybePromptRenderFeedback(opts) {
83
83
  async function getDoctorSummary() {
84
84
  try {
85
85
  const [{ getSystemMeta }, { findFFmpeg }] = await Promise.all([
86
- import("./system-OXRG57F2.js"),
87
- import("./ffmpeg-MJFMBBSF.js")
86
+ import("./system-VRXC6S4A.js"),
87
+ import("./ffmpeg-2ROTISBL.js")
88
88
  ]);
89
89
  const sys = getSystemMeta();
90
90
  const parts = [