hyperframes 0.8.205 → 0.8.207

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 (221) hide show
  1. package/bin/hyperframes.mjs +1 -0
  2. package/dist/{add-BA4AU262.js → add-LXFWHBE3.js} +19 -18
  3. package/dist/{agentPromptGenerator-KYO5MKTW.js → agentPromptGenerator-D2E62ZP5.js} +1 -1
  4. package/dist/{animatedGifPrep-UNUCFGLQ.js → animatedGifPrep-VBPJZKFT.js} +21 -15
  5. package/dist/api.js +31 -31
  6. package/dist/{appHistory-QVCSAOI4.js → appHistory-HIBH6XZW.js} +3 -1
  7. package/dist/{asset-KCDVTNC3.js → asset-JX4RW3GO.js} +2 -2
  8. package/dist/{assetCataloger-5FCVQ3N6.js → assetCataloger-JKKOPBCF.js} +15 -14
  9. package/dist/{audio-KDBPEHRS.js → audio-OXQ3L6DW.js} +24 -24
  10. package/dist/{auth-IMPBZZXJ.js → auth-JAL7P7ZA.js} +1 -1
  11. package/dist/{autoUpdate-YE2RKCAG.js → autoUpdate-MRI2AICE.js} +2 -2
  12. package/dist/{backgroundChecks-OWY2UFSR.js → backgroundChecks-ORR46PBY.js} +3 -3
  13. package/dist/backgroundChecksWorker.js +3 -3
  14. package/dist/{batchRender-AN4HWKET.js → batchRender-IFZYPGIW.js} +9 -9
  15. package/dist/{beats-VTQJ4JH6.js → beats-UDLOEW6U.js} +21 -21
  16. package/dist/{benchmark-PBEWHJ5K.js → benchmark-VTVDNKSO.js} +14 -14
  17. package/dist/{browser-E7ANEHNU.js → browser-QJC4BL2Y.js} +6 -6
  18. package/dist/{bundleWithLocalizedFonts-I3BWMRSP.js → bundleWithLocalizedFonts-Z2JTBNDS.js} +2 -2
  19. package/dist/{capture-MP7R72WU.js → capture-2P4JERSX.js} +14 -3
  20. package/dist/{capture-XODFC4S4.js → capture-GLM2ACPM.js} +81 -41
  21. package/dist/{captureCompositionFrame-2OYGVDI3.js → captureCompositionFrame-A2A5MGQB.js} +19 -19
  22. package/dist/{captureFile-LYOJOUIE.js → captureFile-RPUEOZO6.js} +1 -1
  23. package/dist/{catalog-ORVCCEQR.js → catalog-5ZLVUQVJ.js} +25 -24
  24. package/dist/{catch-up-SYAQOXTT.js → catch-up-FRMVYJHZ.js} +5 -5
  25. package/dist/{check-6SQR6SSA.js → check-WVY7SM7C.js} +50 -48
  26. package/dist/checkAudio-PLEQY3SZ.js +201 -0
  27. package/dist/{checkBrowser-HOTD3CDE.js → checkBrowser-XSZUA2DQ.js} +42 -41
  28. package/dist/{chunk-JFNB4CMI.js → chunk-526VSRZ4.js} +20 -8
  29. package/dist/{chunk-DQBY7FRR.js → chunk-543U46OR.js} +4 -1
  30. package/dist/{chunk-CUGADCIV.js → chunk-5KBMYSF2.js} +54 -15
  31. package/dist/{chunk-2ST4WAFY.js → chunk-5PCALX6G.js} +13 -1
  32. package/dist/{chunk-TZ7MTRVJ.js → chunk-5PYRU5DT.js} +13 -13
  33. package/dist/{chunk-AYH5ANVS.js → chunk-5YHQBCWH.js} +52 -3
  34. package/dist/{chunk-KBZSMKKD.js → chunk-63DP5CB2.js} +29 -3
  35. package/dist/{chunk-GLBEBBS2.js → chunk-6IYIS2U7.js} +2 -2
  36. package/dist/{chunk-GSTFETKE.js → chunk-6KCFVLO6.js} +5 -5
  37. package/dist/{chunk-EXRHI43B.js → chunk-6KOHY5EP.js} +10 -9
  38. package/dist/{chunk-CU76YDPX.js → chunk-6Z7XDUUJ.js} +1 -1
  39. package/dist/{chunk-XNAIYEKD.js → chunk-7PJ3AJB2.js} +1 -1
  40. package/dist/{chunk-6GAYBX5C.js → chunk-7RWUY3BJ.js} +64 -62
  41. package/dist/{chunk-3CISA3OS.js → chunk-AF3L5JJX.js} +1 -1
  42. package/dist/chunk-BDJIQZN2.js +4830 -0
  43. package/dist/{chunk-75WNFDRU.js → chunk-C53ZNJDZ.js} +4 -4
  44. package/dist/{chunk-GBQCTZON.js → chunk-CVZO6TFE.js} +13 -43
  45. package/dist/{chunk-RQDVTUVD.js → chunk-DJQZ7DEH.js} +15 -15
  46. package/dist/{chunk-KAIQPYCM.js → chunk-DML6BD4K.js} +2 -2
  47. package/dist/{chunk-BTYT3RT3.js → chunk-EG3B2VWK.js} +2 -2
  48. package/dist/{chunk-OB7QARSN.js → chunk-EGRIVMCQ.js} +1 -1
  49. package/dist/{chunk-V4K4BSCM.js → chunk-EHFZEKQM.js} +57 -5
  50. package/dist/{chunk-H4MSJ2NZ.js → chunk-FEO7YW7V.js} +8 -8
  51. package/dist/{chunk-FNBEYIZH.js → chunk-FVAI7AHF.js} +13 -12
  52. package/dist/{chunk-PLGGKTCB.js → chunk-GXUONASF.js} +13 -20
  53. package/dist/{chunk-L6N2TLXR.js → chunk-H3LQ5X6Q.js} +84 -79
  54. package/dist/{chunk-MVXOY5RC.js → chunk-HA3V4XAF.js} +6 -6
  55. package/dist/{chunk-WB55EQNJ.js → chunk-HM7SUIQD.js} +38 -9
  56. package/dist/{chunk-G445Y3YG.js → chunk-HVOTYAS4.js} +15 -7
  57. package/dist/{chunk-IKYXXIMP.js → chunk-I2TDHVFV.js} +3 -3
  58. package/dist/{chunk-3N4T6I3O.js → chunk-I3TYUQLB.js} +1 -1
  59. package/dist/{chunk-AECL3B23.js → chunk-IBZHSU2J.js} +1 -1
  60. package/dist/{chunk-2FEOM3ZT.js → chunk-ID766OZB.js} +12 -12
  61. package/dist/{chunk-4UIEQIF4.js → chunk-IK4JY2LI.js} +2 -2
  62. package/dist/{chunk-C4LV6L4Q.js → chunk-IW5P4KK7.js} +3 -3
  63. package/dist/{chunk-N7VQD4WB.js → chunk-IYZT62UR.js} +1 -1
  64. package/dist/chunk-JKE24AG7.js +62 -0
  65. package/dist/chunk-JLCAHJUO.js +91 -0
  66. package/dist/{chunk-EUFBE5BW.js → chunk-JLGVBK5M.js} +1 -1
  67. package/dist/{chunk-6NC4KBS2.js → chunk-JQ32262N.js} +1 -1
  68. package/dist/{chunk-J2E3VVOS.js → chunk-KDHHPJOG.js} +4 -4
  69. package/dist/{chunk-A42PDANH.js → chunk-LCCYYTEK.js} +1 -1
  70. package/dist/{chunk-T2UR3T4L.js → chunk-LK6KPVX2.js} +263 -74
  71. package/dist/{chunk-RWOWD3PW.js → chunk-LPI7HX4G.js} +2 -2
  72. package/dist/{chunk-UR6BAPOD.js → chunk-LXP6XWJL.js} +2 -2
  73. package/dist/{chunk-4RPCYGZG.js → chunk-MAUGXKSI.js} +4 -4
  74. package/dist/{chunk-AII6P2TC.js → chunk-MMJAHBH2.js} +1 -1
  75. package/dist/{chunk-LFGJWOVA.js → chunk-MNNK7RV5.js} +11 -8
  76. package/dist/{chunk-26OI2B2X.js → chunk-MSHL6CF2.js} +1 -1
  77. package/dist/{chunk-SVVAUJPL.js → chunk-NHA4NRBE.js} +136 -25
  78. package/dist/{chunk-5F6B6KMK.js → chunk-NHL5CMO2.js} +18 -3
  79. package/dist/{chunk-NF6KI46X.js → chunk-NJNC2DQV.js} +31 -28
  80. package/dist/{chunk-I7IXUCKL.js → chunk-NSC5A4IR.js} +1 -1
  81. package/dist/{chunk-MRF4AMKD.js → chunk-NWGXTUYS.js} +32 -10
  82. package/dist/{chunk-57I5KNTL.js → chunk-PL36HK3U.js} +3 -3
  83. package/dist/{chunk-TOEIJ4WF.js → chunk-PUIG6DHT.js} +5 -5
  84. package/dist/{chunk-BA7MQJXG.js → chunk-QE4WRS3N.js} +3 -3
  85. package/dist/{chunk-7V7OUKTU.js → chunk-QTWXVOZI.js} +1 -1
  86. package/dist/{chunk-V2XXV2EH.js → chunk-QZ2JQ6O4.js} +6 -6
  87. package/dist/{chunk-BHOGXIBO.js → chunk-RPZNQV6D.js} +58 -826
  88. package/dist/{chunk-2BGOB2QK.js → chunk-SE2MXV2N.js} +136 -25
  89. package/dist/{chunk-HADQPG7O.js → chunk-SXOD5J7T.js} +2 -2
  90. package/dist/{chunk-32R2AFZ3.js → chunk-T4JGFCXU.js} +3 -3
  91. package/dist/chunk-TQBQYO4L.js +55 -0
  92. package/dist/{chunk-ZSUWGNIT.js → chunk-TSTONNOD.js} +2 -2
  93. package/dist/chunk-TSYRN646.js +84 -0
  94. package/dist/{chunk-BZ727KLT.js → chunk-U32PA6DI.js} +1 -1
  95. package/dist/{chunk-5PVPGWMH.js → chunk-UAT2UMTP.js} +1 -1
  96. package/dist/{chunk-TGS33LDU.js → chunk-UKM3JYNB.js} +5 -71
  97. package/dist/{chunk-UEOGIZ3Q.js → chunk-UUOIH4RW.js} +3 -3
  98. package/dist/{chunk-MASFRPCB.js → chunk-UYPWH7PH.js} +10 -10
  99. package/dist/{chunk-LSQM3NBR.js → chunk-VAVDAOUA.js} +1 -1
  100. package/dist/chunk-VBPNCOD7.js +355 -0
  101. package/dist/{chunk-HQ3CFNHL.js → chunk-VH4PNYOS.js} +1 -1
  102. package/dist/{chunk-IXXVS2Z4.js → chunk-VQB7G5BM.js} +1 -1
  103. package/dist/{chunk-FLREUEHW.js → chunk-W4DMQZL5.js} +1 -1
  104. package/dist/{chunk-RXATE6FZ.js → chunk-WC4MTXGN.js} +22 -0
  105. package/dist/{chunk-F2ASNL2K.js → chunk-WL263XM2.js} +1 -1
  106. package/dist/{chunk-ZB6SCA4J.js → chunk-XAGBSYIQ.js} +9 -2
  107. package/dist/{chunk-LQUMMPGK.js → chunk-XKW4Z7BU.js} +1 -1
  108. package/dist/chunk-XMRA7CQG.js +22 -0
  109. package/dist/{chunk-6YYFNGCS.js → chunk-XULJBZ7K.js} +7 -4
  110. package/dist/chunk-YJK6HOL5.js +29 -0
  111. package/dist/{chunk-KVNXEAVT.js → chunk-ZCJ5EGLU.js} +30 -10
  112. package/dist/{chunk-ERUINDRT.js → chunk-ZF3R2IPC.js} +184 -183
  113. package/dist/{chunk-AECSY5LT.js → chunk-ZYGIDXAK.js} +569 -378
  114. package/dist/{clean-BW7NHQS5.js → clean-TL3IPJDN.js} +28 -28
  115. package/dist/cli.js +55 -55
  116. package/dist/{cloud-TZVXTWZO.js → cloud-EYMRPJNY.js} +4 -4
  117. package/dist/{cloudrun-KRIETALO.js → cloudrun-TOJ36NLX.js} +11 -11
  118. package/dist/commands/layout-audit.browser.js +3 -15
  119. package/dist/{compare-WYWHJ4CR.js → compare-MP5EOW4D.js} +40 -40
  120. package/dist/{compiler-ANIPXLJ7.js → compiler-NOPVLJ2S.js} +15 -15
  121. package/dist/{component-CY7DCX56.js → component-ASACDCZK.js} +3 -3
  122. package/dist/{compositions-5YEB24E3.js → compositions-WKNZJY34.js} +19 -19
  123. package/dist/{contactSheet-5APX35L3.js → contactSheet-YOBPATEM.js} +2 -2
  124. package/dist/{delete-6642PDON.js → delete-DQTFHP3G.js} +2 -2
  125. package/dist/{deploy-NZP6TZLS.js → deploy-HHCFOUFM.js} +4 -4
  126. package/dist/{deterministicFonts-HQYCUUAL.js → deterministicFonts-LKAGUNE5.js} +3 -3
  127. package/dist/{dist-V2BGP46S.js → dist-L4Z4ZEYW.js} +7 -4
  128. package/dist/{dist-DGFC75NC.js → dist-NQEYA4ZX.js} +44 -36
  129. package/dist/docs/rendering.md +3 -0
  130. package/dist/{doctor-ZW4A2FS3.js → doctor-JDM65CP7.js} +20 -20
  131. package/dist/{events-NJU4VFDA.js → events-MBRNA3UF.js} +3 -3
  132. package/dist/{events-XRCHY2F6.js → events-RKRHRLJD.js} +2 -2
  133. package/dist/{feedback-NQLSZMES.js → feedback-LZWIWV5J.js} +17 -17
  134. package/dist/{ffmpeg-RYDQLG3G.js → ffmpeg-4PZKSIGE.js} +15 -15
  135. package/dist/{figma-TJAMP2CI.js → figma-QFNYUT3F.js} +3 -3
  136. package/dist/fontLocalizeCli.js +20 -18
  137. package/dist/{get-RRZ3O26X.js → get-2B5ENJOH.js} +2 -2
  138. package/dist/{gpuPolicy-4WLHUUS3.js → gpuPolicy-E5FB2GFR.js} +13 -13
  139. package/dist/{grade-compare-P7PE3NAA.js → grade-compare-4GUAPJHE.js} +40 -40
  140. package/dist/{gsapParser-IEUSLYDJ.js → gsapParser-3H7ON3DO.js} +1 -1
  141. package/dist/{gsapParserAcorn-LZJKCFQI.js → gsapParserAcorn-5YD4N6HQ.js} +2 -2
  142. package/dist/hangReport.js +47 -0
  143. package/dist/heifImagePrep-C2RYIEER.js +53 -0
  144. package/dist/{help-6RELRVIW.js → help-XGDAXV67.js} +1 -1
  145. package/dist/{history-GIIDYND3.js → history-WNFF6HGU.js} +108 -60
  146. package/dist/hyperframe.manifest.json +1 -1
  147. package/dist/hyperframe.runtime.iife.js +75 -68
  148. package/dist/hyperframes-player.global.js +3 -3
  149. package/dist/hyperframes-slideshow.global.js +16 -16
  150. package/dist/{info-LBUA2DXE.js → info-BR2LKGJD.js} +16 -16
  151. package/dist/{init-QUPXBONY.js → init-P6UWPUY3.js} +59 -58
  152. package/dist/{inspect-CL42DJZ4.js → inspect-MSRPF7ZO.js} +40 -39
  153. package/dist/inspection.js +4 -4
  154. package/dist/{installer-VR7XDLR3.js → installer-MPUQS3ZX.js} +10 -10
  155. package/dist/{keyframes-LELLROMA.js → keyframes-J6K66QTO.js} +11 -11
  156. package/dist/{lambda-I6KFXWOO.js → lambda-LJ2OSWFJ.js} +32 -13
  157. package/dist/{layout-NR6SNRZE.js → layout-CDY65XGA.js} +40 -39
  158. package/dist/{lint-DYEMSEQR.js → lint-CAUNBGPX.js} +13 -10
  159. package/dist/{lintProject-EA4NPL2X.js → lintProject-ZTSX3AWT.js} +7 -4
  160. package/dist/{list-RDURYO5U.js → list-33BYQNRZ.js} +2 -2
  161. package/dist/{login-VKLET5OL.js → login-5QMRKOHK.js} +4 -4
  162. package/dist/{manager-IYT3THJN.js → manager-3JOHHPVR.js} +17 -17
  163. package/dist/{manager-7TSUZKXU.js → manager-RMYSZ3KI.js} +7 -3
  164. package/dist/{media-treatment-I4AFEQZ3.js → media-treatment-4WP22CFN.js} +23 -23
  165. package/dist/{models-LLPVGC2E.js → models-HPWCHAZX.js} +28 -28
  166. package/dist/{motionShot-6A6HH6IK.js → motionShot-I7GDIROQ.js} +23 -23
  167. package/dist/{normalize-audio-KVQJBYLT.js → normalize-audio-VTMXPSC7.js} +14 -14
  168. package/dist/{open-J4ZT4X3C.js → open-SAO7OQTT.js} +19 -19
  169. package/dist/{parakeetRunner-FLUCIDIZ.js → parakeetRunner-ZYPBIA73.js} +25 -25
  170. package/dist/{pipeline-RRVLGALQ.js → pipeline-VNBMR6QU.js} +16 -16
  171. package/dist/{play-QGJSXUVM.js → play-7VI6A7KN.js} +42 -32
  172. package/dist/{preflight-SP2ZERBE.js → preflight-VWV7L45J.js} +17 -17
  173. package/dist/{present-UR4YBHMX.js → present-CSJGYOFF.js} +37 -27
  174. package/dist/{preview-6ENCRU4C.js → preview-B246ZTVO.js} +60 -45
  175. package/dist/{producer-OMHZRY6A.js → producer-WJLFDVQJ.js} +1 -1
  176. package/dist/{projectConfig-NGS7GJ47.js → projectConfig-OMR46ZWQ.js} +14 -13
  177. package/dist/{publication-6NYQA22Y.js → publication-AA7NNYET.js} +8 -8
  178. package/dist/{publish-E6RE5VHB.js → publish-TJ4QVVSP.js} +18 -17
  179. package/dist/{remove-background-66PQRA7R.js → remove-background-LQ2V7W7N.js} +20 -20
  180. package/dist/{render-ZLRJUFMX.js → render-AWEEPG3F.js} +39 -37
  181. package/dist/{render-SBAZWXPO.js → render-E5QJG74D.js} +14 -11
  182. package/dist/{render-IMSGS6BD.js → render-JLTNZ36U.js} +83 -51
  183. package/dist/{render-batch-MO7LYZSP.js → render-batch-U4T4VSCM.js} +14 -11
  184. package/dist/renderSetupWorker.js +11 -8
  185. package/dist/{resolver-QMBVTAKT.js → resolver-GXCTUKPV.js} +10 -10
  186. package/dist/{screenshotCapture-I5EDCITF.js → screenshotCapture-X6OKIXCB.js} +1 -1
  187. package/dist/{sherpa-JZRDL3OE.js → sherpa-4VZWVHWZ.js} +24 -24
  188. package/dist/skills/hyperframes-cli/references/init-and-scaffold.md +1 -0
  189. package/dist/skills/hyperframes-cli/references/lambda.md +3 -0
  190. package/dist/skills/hyperframes-cli/references/preview-render.md +3 -0
  191. package/dist/{skills-YBTEWFYS.js → skills-WUKR7SUE.js} +8 -8
  192. package/dist/{skillsUpdateCheck-Z4HTDZJN.js → skillsUpdateCheck-YXRBY3JC.js} +3 -3
  193. package/dist/{snapshot-5F5UV6H5.js → snapshot-Q7S2FTNG.js} +143 -77
  194. package/dist/{src-WWXYV2TS.js → src-CLAALR5W.js} +26 -19
  195. package/dist/{src-UTW3F2PM.js → src-ZOXUSGAP.js} +24 -12
  196. package/dist/{staticProjectServer-UHZ63C5O.js → staticProjectServer-DQ7PIDPA.js} +26 -26
  197. package/dist/studio/assets/hyperframes-player-Cm5aBiKq.js +478 -0
  198. package/dist/studio/assets/{index-dy6GQJn4.js → index-BF9YeBnC.js} +142 -142
  199. package/dist/studio/assets/{index-C8hp9Y7c.js → index-BrqAmMRt.js} +1 -1
  200. package/dist/studio/index.html +1 -1
  201. package/dist/{studio-api-BHZ3PHL2.js → studio-api-NUE227JM.js} +18 -18
  202. package/dist/{studioSelectionClient-IUUPKUHZ.js → studioSelectionClient-D6VMGTKQ.js} +1 -1
  203. package/dist/{studioServer-AFUXWRB5.js → studioServer-HVOKP4VI.js} +81 -70
  204. package/dist/{synthesize-PKTB5ATG.js → synthesize-QZHRXGRY.js} +30 -8
  205. package/dist/{telemetry-UYKOT4OJ.js → telemetry-2Y5JXLDB.js} +3 -3
  206. package/dist/{timeline-K5NLEMH4.js → timeline-WOQGXFRV.js} +28 -28
  207. package/dist/{tokens-FCOSWE2O.js → tokens-T3OHTWUC.js} +2 -2
  208. package/dist/{transcribe-SIFMTW5W.js → transcribe-4U74P5TG.js} +22 -22
  209. package/dist/{transcribe-K2QTXDQR.js → transcribe-JZ3BO546.js} +32 -32
  210. package/dist/{tts-5I2AJNLM.js → tts-AY4JO5NQ.js} +2 -2
  211. package/dist/{updateCheck-JZ6TBZVE.js → updateCheck-6EUAGAM4.js} +2 -2
  212. package/dist/{upgrade-TUPAJXQQ.js → upgrade-55K6F4MP.js} +2 -2
  213. package/dist/upstreamProxy-W5FWAT5Z.js +17 -0
  214. package/dist/{urlDownloader-L4775QID.js → urlDownloader-47JMOLNN.js} +12 -12
  215. package/dist/{validate-4HVVMEBV.js → validate-QBJ3SBS4.js} +32 -32
  216. package/dist/{video-4OGPF3IE.js → video-3ZAUNAR3.js} +17 -15
  217. package/dist/warmCheck.js +50 -48
  218. package/package.json +2 -1
  219. package/dist/chunk-4YYJOFKS.js +0 -28
  220. package/dist/chunk-ZUQZP6QD.js +0 -3986
  221. package/dist/studio/assets/hyperframes-player-DzdSmJdB.js +0 -478
@@ -0,0 +1,355 @@
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
+ import {
8
+ normalizeRelPath,
9
+ resolveLocalImageSourcePath,
10
+ splitUrlSuffix
11
+ } from "./chunk-XULJBZ7K.js";
12
+ import {
13
+ renameWithRetry,
14
+ runFfmpeg,
15
+ runFfprobe
16
+ } from "./chunk-LK6KPVX2.js";
17
+ import {
18
+ parseHTML
19
+ } from "./chunk-GWTIFRF5.js";
20
+
21
+ // ../producer/src/services/heifImagePrep.ts
22
+ import { createHash } from "crypto";
23
+ import {
24
+ closeSync,
25
+ copyFileSync,
26
+ mkdirSync,
27
+ openSync,
28
+ readFileSync,
29
+ readSync,
30
+ rmSync,
31
+ statSync,
32
+ writeFileSync
33
+ } from "fs";
34
+ import { dirname, join, resolve } from "path";
35
+
36
+ // ../producer/src/services/heifRotation.ts
37
+ function* boxes(buf, start, end) {
38
+ let at = start;
39
+ while (at + 8 <= end) {
40
+ let size = buf.readUInt32BE(at);
41
+ let header = 8;
42
+ if (size === 1 && at + 16 <= end) {
43
+ size = Number(buf.readBigUInt64BE(at + 8));
44
+ header = 16;
45
+ } else if (size === 0) {
46
+ size = end - at;
47
+ }
48
+ if (size < header || at + size > end) return;
49
+ yield { type: buf.toString("latin1", at + 4, at + 8), start: at + header, end: at + size };
50
+ at += size;
51
+ }
52
+ }
53
+ function child(buf, parent, type, skip = 0) {
54
+ return [...boxes(buf, parent.start + skip, parent.end)].filter((box) => box.type === type);
55
+ }
56
+ function readHeifPrimaryRotation(buf) {
57
+ try {
58
+ const root = { type: "", start: 0, end: buf.length };
59
+ const meta = child(buf, root, "meta")[0];
60
+ const pitm = meta && child(buf, meta, "pitm", 4)[0];
61
+ const iprp = meta && child(buf, meta, "iprp", 4)[0];
62
+ const ipco = iprp && child(buf, iprp, "ipco")[0];
63
+ if (!pitm || !ipco || !iprp) return 0;
64
+ const primaryId = buf[pitm.start] === 0 ? buf.readUInt16BE(pitm.start + 4) : buf.readUInt32BE(pitm.start + 4);
65
+ const props = [...boxes(buf, ipco.start, ipco.end)];
66
+ for (const ipma of child(buf, iprp, "ipma")) {
67
+ const version = buf[ipma.start];
68
+ const wide = (buf[ipma.start + 3] & 1) === 1;
69
+ let at = ipma.start + 8;
70
+ for (let n = buf.readUInt32BE(ipma.start + 4); n > 0 && at < ipma.end; n--) {
71
+ const id = version < 1 ? buf.readUInt16BE(at) : buf.readUInt32BE(at);
72
+ at += version < 1 ? 2 : 4;
73
+ const count = buf[at++];
74
+ for (let i = 0; i < count; i++) {
75
+ const index = wide ? buf.readUInt16BE(at) & 32767 : buf[at] & 127;
76
+ at += wide ? 2 : 1;
77
+ const prop = props[index - 1];
78
+ if (id === primaryId && prop?.type === "irot")
79
+ return (buf[prop.start] & 3) * 90;
80
+ }
81
+ }
82
+ }
83
+ } catch {
84
+ }
85
+ return 0;
86
+ }
87
+
88
+ // ../producer/src/utils/semaphore.ts
89
+ var Semaphore = class {
90
+ constructor(maxConcurrent) {
91
+ this.maxConcurrent = maxConcurrent;
92
+ }
93
+ maxConcurrent;
94
+ queue = [];
95
+ active = 0;
96
+ async acquire() {
97
+ if (this.active < this.maxConcurrent) {
98
+ this.active++;
99
+ return () => this.release();
100
+ }
101
+ return new Promise((resolve2) => {
102
+ this.queue.push(() => {
103
+ this.active++;
104
+ resolve2(() => this.release());
105
+ });
106
+ });
107
+ }
108
+ release() {
109
+ this.active--;
110
+ const next = this.queue.shift();
111
+ if (next) next();
112
+ }
113
+ /** Current number of active slots. */
114
+ get activeCount() {
115
+ return this.active;
116
+ }
117
+ /** Number of waiters in the queue. */
118
+ get waitingCount() {
119
+ return this.queue.length;
120
+ }
121
+ };
122
+
123
+ // ../producer/src/utils/mediaProbeConcurrency.ts
124
+ var MEDIA_PROBE_CONCURRENCY = 4;
125
+ var sharedMediaProbeSemaphore = new Semaphore(MEDIA_PROBE_CONCURRENCY);
126
+ async function withMediaProbeSlot(operation) {
127
+ const release = await sharedMediaProbeSemaphore.acquire();
128
+ try {
129
+ return await operation();
130
+ } finally {
131
+ release();
132
+ }
133
+ }
134
+
135
+ // ../producer/src/services/heifImagePrep.ts
136
+ var PREPARED_HEIF_SUBDIR = "_heif_images";
137
+ var CACHE_SCHEMA = "hfheif-v1";
138
+ var DEFAULT_TIMEOUT_MS = 12e4;
139
+ var HEIF_IMAGE_CONVERSION_FAILED = "HEIF_IMAGE_CONVERSION_FAILED";
140
+ var HEIF_TOOL_UNAVAILABLE = "HEIF_TOOL_UNAVAILABLE";
141
+ var HEIF_BRANDS = /* @__PURE__ */ new Set(["heic", "heix", "hevc", "hevx", "heim", "heis", "mif1", "msf1"]);
142
+ var AVIF_BRANDS = /* @__PURE__ */ new Set(["avif", "avis"]);
143
+ var DATA_URL_RE = /^data:image\/(?:heic|heif)(?:-sequence)?;base64,(.*)$/is;
144
+ var HeifImageConversionError = class extends Error {
145
+ code = HEIF_IMAGE_CONVERSION_FAILED;
146
+ owner = "user";
147
+ retryable = false;
148
+ constructor(label, reason) {
149
+ super(
150
+ `Could not convert HEIC/HEIF image ${label} to JPEG: ${reason}. Re-export the photo as JPEG or PNG and update its src.`
151
+ );
152
+ this.name = "HeifImageConversionError";
153
+ }
154
+ };
155
+ var HeifToolUnavailableError = class extends Error {
156
+ code = HEIF_TOOL_UNAVAILABLE;
157
+ owner = "system";
158
+ retryable = false;
159
+ constructor(label, reason) {
160
+ super(
161
+ `Could not convert HEIC/HEIF image ${label}: ${reason}. Converting HEIC needs ffmpeg and ffprobe 7.0 or newer with the hevc decoder.`
162
+ );
163
+ this.name = "HeifToolUnavailableError";
164
+ }
165
+ };
166
+ var TOOL_FAILURE_RE = /(?:ffmpeg|ffprobe) not found|ENOENT|Option not found|Unrecognized option|Unknown decoder|Decoder \S+ not found/i;
167
+ function isHeifBytes(head) {
168
+ const bytes = Buffer.from(head.buffer, head.byteOffset, head.byteLength);
169
+ if (bytes.length < 16 || bytes.toString("ascii", 4, 8) !== "ftyp") return false;
170
+ const boxEnd = Math.min(bytes.readUInt32BE(0), bytes.length);
171
+ if (boxEnd < 16) return false;
172
+ const brands = [bytes.toString("ascii", 8, 12)];
173
+ for (let offset = 16; offset + 4 <= boxEnd; offset += 4) {
174
+ brands.push(bytes.toString("ascii", offset, offset + 4));
175
+ }
176
+ return !brands.some((b) => AVIF_BRANDS.has(b)) && brands.some((b) => HEIF_BRANDS.has(b));
177
+ }
178
+ function readHead(path) {
179
+ let fd;
180
+ try {
181
+ fd = openSync(path, "r");
182
+ const buf = Buffer.alloc(4096);
183
+ return buf.subarray(0, readSync(fd, buf, 0, buf.length, 0));
184
+ } catch {
185
+ return null;
186
+ } finally {
187
+ if (fd !== void 0) closeSync(fd);
188
+ }
189
+ }
190
+ async function probeJson(path, withGroups) {
191
+ const stdout = await runFfprobe(
192
+ path,
193
+ withGroups ? ["-show_stream_groups", "-show_streams", "-of", "json"] : ["-show_streams", "-of", "json"]
194
+ );
195
+ return JSON.parse(stdout);
196
+ }
197
+ var ROTATION_FILTER = {
198
+ 0: "",
199
+ 90: "transpose=2",
200
+ 180: "hflip,vflip",
201
+ 270: "transpose=1"
202
+ };
203
+ function primaryGrid(probed) {
204
+ const groups = probed.stream_groups ?? [];
205
+ return (groups.find((g) => g.disposition?.default === 1) ?? groups[0])?.components?.[0];
206
+ }
207
+ async function convertHeifToJpeg(request) {
208
+ const probed = await probeJson(request.inputPath, true);
209
+ const grid = primaryGrid(probed);
210
+ const rotation = readHeifPrimaryRotation(readFileSync(request.inputPath));
211
+ const filters = [];
212
+ let inputs = [];
213
+ let size = probed.streams?.[0];
214
+ if (grid?.subcomponents?.length) {
215
+ size = grid;
216
+ const layout = grid.subcomponents.map(
217
+ (t) => `${t.tile_horizontal_offset}_${t.tile_vertical_offset}`
218
+ );
219
+ inputs = grid.subcomponents.map((t) => `[0:${t.stream_index}]`);
220
+ filters.push(
221
+ `${inputs.join("")}xstack=inputs=${inputs.length}:layout=${layout.join("|")}`,
222
+ `crop=${grid.width}:${grid.height}:${grid.horizontal_offset ?? 0}:${grid.vertical_offset ?? 0}`
223
+ );
224
+ }
225
+ if (!size?.width || !size.height) throw new Error("no declared image size");
226
+ if (rotation && grid) filters.push(ROTATION_FILTER[rotation]);
227
+ const mapArgs = filters.length > 0 ? ["-filter_complex", `${filters.join(",")}[v]`, "-map", "[v]"] : [];
228
+ const result = await runFfmpeg(
229
+ [
230
+ "-hide_banner",
231
+ "-loglevel",
232
+ "error",
233
+ "-i",
234
+ request.inputPath,
235
+ ...mapArgs,
236
+ "-frames:v",
237
+ "1",
238
+ "-q:v",
239
+ "2",
240
+ "-f",
241
+ "mjpeg",
242
+ "-y",
243
+ request.outputPath
244
+ ],
245
+ { timeout: request.timeoutMs ?? DEFAULT_TIMEOUT_MS }
246
+ );
247
+ if (!result.success) {
248
+ throw result.error ?? new Error(`ffmpeg exited ${result.exitCode}: ${result.stderr.slice(-300)}`);
249
+ }
250
+ const out = (await probeJson(request.outputPath, false)).streams?.[0];
251
+ const same = out?.width === size.width && out.height === size.height;
252
+ const swapped = out?.width === size.height && out.height === size.width;
253
+ if (!same && !swapped) {
254
+ throw new Error(
255
+ `wrong size: decoded ${out?.width}x${out?.height}, file declares ${size.width}x${size.height}`
256
+ );
257
+ }
258
+ }
259
+ function resolveImageSource(src, options) {
260
+ const data = DATA_URL_RE.exec(src);
261
+ if (data) {
262
+ const bytes = Buffer.from(data[1], "base64");
263
+ return isHeifBytes(bytes.subarray(0, 4096)) ? { path: null, bytes, label: '"inline image"' } : null;
264
+ }
265
+ const path = resolveLocalImageSourcePath(src, options);
266
+ const head = path ? readHead(path) : null;
267
+ if (!path || !head || !isHeifBytes(head)) return null;
268
+ return { path, bytes: readFileSync(path), label: `"${splitUrlSuffix(src).basePath}"` };
269
+ }
270
+ function isUsableFile(path) {
271
+ try {
272
+ return statSync(path).size > 0;
273
+ } catch {
274
+ return false;
275
+ }
276
+ }
277
+ async function ensurePreparedJpeg(source, cachePath, outputPath, options) {
278
+ mkdirSync(dirname(cachePath), { recursive: true });
279
+ mkdirSync(dirname(outputPath), { recursive: true });
280
+ if (!isUsableFile(cachePath)) {
281
+ const tmpPath = `${cachePath}.tmp-${process.pid}-${Date.now()}`;
282
+ const inlinePath = `${tmpPath}.heic`;
283
+ const inputPath = source.path ?? inlinePath;
284
+ try {
285
+ if (!source.path) writeFileSync(inlinePath, source.bytes);
286
+ await (options.transcode ?? convertHeifToJpeg)({
287
+ inputPath,
288
+ outputPath: tmpPath,
289
+ timeoutMs: options.timeoutMs
290
+ });
291
+ if (!isUsableFile(tmpPath)) throw new Error("conversion produced an empty file");
292
+ renameWithRetry(tmpPath, cachePath);
293
+ } catch (error) {
294
+ const reason = error instanceof Error ? error.message : String(error);
295
+ throw TOOL_FAILURE_RE.test(reason) ? new HeifToolUnavailableError(source.label, reason) : new HeifImageConversionError(source.label, reason);
296
+ } finally {
297
+ rmSync(tmpPath, { force: true });
298
+ rmSync(inlinePath, { force: true });
299
+ }
300
+ }
301
+ if (resolve(outputPath) !== resolve(cachePath) && !isUsableFile(outputPath)) {
302
+ copyFileSync(cachePath, outputPath);
303
+ }
304
+ }
305
+ async function prepareHeifImageInputs(html, options) {
306
+ const outputDir = options.outputDir ?? join(options.downloadDir, PREPARED_HEIF_SUBDIR);
307
+ const outputSrcPrefix = normalizeRelPath(options.outputSrcPrefix ?? PREPARED_HEIF_SUBDIR);
308
+ const cacheDir = options.cacheDir ?? outputDir;
309
+ const preparedAssets = /* @__PURE__ */ new Map();
310
+ const preparedImages = [];
311
+ if (!/<img\b/i.test(html)) return { html, preparedAssets, preparedImages };
312
+ const { document } = parseHTML(html);
313
+ const found = [];
314
+ for (const img of Array.from(document.querySelectorAll("img[src]"))) {
315
+ const src = (img.getAttribute("src") || "").trim();
316
+ const source = src ? resolveImageSource(src, options) : null;
317
+ if (!source) continue;
318
+ const hash = createHash("sha256").update(CACHE_SCHEMA).update("\0").update(source.bytes).digest("hex");
319
+ found.push({ img, src, source, filename: `${CACHE_SCHEMA}-${hash.slice(0, 24)}.jpg` });
320
+ }
321
+ if (found.length === 0) return { html, preparedAssets, preparedImages };
322
+ const unique = new Map(found.map((item) => [item.filename, item.source]));
323
+ const failed = /* @__PURE__ */ new Set();
324
+ await Promise.all(
325
+ [...unique].map(
326
+ ([filename, source]) => withMediaProbeSlot(
327
+ () => ensurePreparedJpeg(source, join(cacheDir, filename), join(outputDir, filename), options)
328
+ ).catch((error) => {
329
+ if (!options.onFailure) throw error;
330
+ failed.add(filename);
331
+ options.onFailure(error);
332
+ })
333
+ )
334
+ );
335
+ for (const { img, src, filename } of found) {
336
+ if (failed.has(filename)) continue;
337
+ const outputSrc = `${outputSrcPrefix}/${filename}`;
338
+ img.setAttribute("src", outputSrc);
339
+ preparedAssets.set(outputSrc, join(outputDir, filename));
340
+ preparedImages.push({ sourceSrc: src, outputSrc, outputPath: join(outputDir, filename) });
341
+ }
342
+ return { html: document.toString(), preparedAssets, preparedImages };
343
+ }
344
+
345
+ export {
346
+ Semaphore,
347
+ withMediaProbeSlot,
348
+ HEIF_IMAGE_CONVERSION_FAILED,
349
+ HeifImageConversionError,
350
+ HeifToolUnavailableError,
351
+ isHeifBytes,
352
+ primaryGrid,
353
+ convertHeifToJpeg,
354
+ prepareHeifImageInputs
355
+ };
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  updateCheckDisabled
9
- } from "./chunk-OB7QARSN.js";
9
+ } from "./chunk-EGRIVMCQ.js";
10
10
  import {
11
11
  hostAnswers
12
12
  } from "./chunk-K4WIOZFP.js";
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  readMediaOffsetSeconds
9
- } from "./chunk-2BGOB2QK.js";
9
+ } from "./chunk-SE2MXV2N.js";
10
10
 
11
11
  // ../core/dist/mediaLink.js
12
12
  var MEDIA_LINK_ATTR = "data-link";
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  ancestor,
9
9
  simple
10
- } from "./chunk-RXATE6FZ.js";
10
+ } from "./chunk-WC4MTXGN.js";
11
11
 
12
12
  // ../parsers/dist/gsapParserAcorn.js
13
13
  import * as acorn2 from "acorn";
@@ -58,6 +58,27 @@ function full(node, callback, baseVisitor, state, override) {
58
58
  }
59
59
  })(node, state, override);
60
60
  }
61
+ function fullAncestor(node, callback, baseVisitor, state) {
62
+ if (!baseVisitor) {
63
+ baseVisitor = base;
64
+ }
65
+ var ancestors = [], last;
66
+ (function c(node2, st, override) {
67
+ var type = override || node2.type;
68
+ var isNew = node2 !== ancestors[ancestors.length - 1];
69
+ if (isNew) {
70
+ ancestors.push(node2);
71
+ }
72
+ visitNode(baseVisitor, type, node2, st, c);
73
+ if (last !== node2) {
74
+ callback(node2, st || ancestors, ancestors, type);
75
+ last = node2;
76
+ }
77
+ if (isNew) {
78
+ ancestors.pop();
79
+ }
80
+ })(node, state);
81
+ }
61
82
  function make(funcs, baseVisitor) {
62
83
  var visitor = Object.create(baseVisitor || base);
63
84
  for (var type in funcs) {
@@ -381,5 +402,6 @@ export {
381
402
  ancestor,
382
403
  recursive,
383
404
  full,
405
+ fullAncestor,
384
406
  base
385
407
  };
@@ -6,7 +6,7 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  writeCaptureFileSync
9
- } from "./chunk-MRF4AMKD.js";
9
+ } from "./chunk-NWGXTUYS.js";
10
10
  import {
11
11
  loadSharp
12
12
  } from "./chunk-EXAX37XR.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-K2FLNJVB.js";
10
10
  import {
11
11
  trackCommandFailure
12
- } from "./chunk-I7IXUCKL.js";
12
+ } from "./chunk-NSC5A4IR.js";
13
13
  import {
14
14
  failCommand
15
15
  } from "./chunk-JVBRJMOP.js";
@@ -41,7 +41,14 @@ function resolveProjectOrThrow(dirArg, options = {}) {
41
41
  const dir = resolve(dirArg ?? ".");
42
42
  const name = basename(dir);
43
43
  const indexPath = resolve(dir, "index.html");
44
- if (!existsSync(dir) || !statSync(dir).isDirectory()) {
44
+ if (existsSync(dir) && !statSync(dir).isDirectory()) {
45
+ throw new InvalidProjectError(
46
+ "Not a directory: " + dir,
47
+ basename(dir) + " is a file; this command takes the project folder.",
48
+ "Pass the folder that holds index.html: " + projectHolding(dir)
49
+ );
50
+ }
51
+ if (!existsSync(dir)) {
45
52
  throw new InvalidProjectError("Not a directory: " + dir);
46
53
  }
47
54
  if (options.requireIndex !== false && !existsSync(indexPath)) {
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-GMECXFAN.js";
28
28
  import {
29
29
  ITEM_TYPE_DIRS
30
- } from "./chunk-6GAYBX5C.js";
30
+ } from "./chunk-7RWUY3BJ.js";
31
31
  import {
32
32
  realProjectRoot
33
33
  } from "./chunk-OFQWTKPW.js";
@@ -0,0 +1,22 @@
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
+ import {
8
+ createFileAtomically
9
+ } from "./chunk-EOVYQ3IG.js";
10
+
11
+ // src/utils/writeNewFile.ts
12
+ function writeNewFileSync(filePath, content) {
13
+ try {
14
+ createFileAtomically(filePath, content);
15
+ } catch (err) {
16
+ if (!(err instanceof Error && "code" in err && err.code === "EEXIST")) throw err;
17
+ }
18
+ }
19
+
20
+ export {
21
+ writeNewFileSync
22
+ };
@@ -9,10 +9,10 @@ import {
9
9
  isHttpUrl,
10
10
  renameWithRetry,
11
11
  runFfmpeg
12
- } from "./chunk-T2UR3T4L.js";
12
+ } from "./chunk-LK6KPVX2.js";
13
13
  import {
14
14
  parseAnimatedGifMetadata
15
- } from "./chunk-6GAYBX5C.js";
15
+ } from "./chunk-7RWUY3BJ.js";
16
16
  import {
17
17
  parseHTML
18
18
  } from "./chunk-GWTIFRF5.js";
@@ -72,7 +72,7 @@ function readLoopOverride(el) {
72
72
  }
73
73
  return null;
74
74
  }
75
- function resolveGifSourcePath(src, options) {
75
+ function resolveLocalImageSourcePath(src, options) {
76
76
  const trimmed = src.trim();
77
77
  if (!trimmed || trimmed.startsWith("data:")) return null;
78
78
  const { basePath } = splitUrlSuffix(trimmed);
@@ -295,7 +295,7 @@ async function prepareAnimatedGifInputs(html, options) {
295
295
  const img = images[i];
296
296
  const src = (img.getAttribute("src") || "").trim();
297
297
  if (!hasGifExtension(src)) continue;
298
- const sourcePath = resolveGifSourcePath(src, options);
298
+ const sourcePath = resolveLocalImageSourcePath(src, options);
299
299
  if (!sourcePath) continue;
300
300
  const bytes = readFileSync(sourcePath);
301
301
  const metadata = parseAnimatedGifMetadata(bytes);
@@ -346,6 +346,9 @@ async function prepareAnimatedGifInputs(html, options) {
346
346
  export {
347
347
  EncoderInterruptedError,
348
348
  encoderFailureError,
349
+ splitUrlSuffix,
350
+ normalizeRelPath,
351
+ resolveLocalImageSourcePath,
349
352
  buildAnimatedGifTranscodeArgs,
350
353
  prepareAnimatedGifInputs
351
354
  };
@@ -0,0 +1,29 @@
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
+ import {
8
+ loadProducer
9
+ } from "./chunk-U32PA6DI.js";
10
+ import {
11
+ resolveProjectRelativeSrc
12
+ } from "./chunk-PBNWRWKA.js";
13
+
14
+ // src/utils/projectMedia.ts
15
+ async function collectProjectMedia(projectDir) {
16
+ const { bundleToSingleHtml } = await import("./compiler-NOPVLJ2S.js");
17
+ const html = await bundleToSingleHtml(projectDir);
18
+ const producer = await loadProducer();
19
+ if (!producer.collectRenderMedia) throw new Error("Render media collector unavailable");
20
+ return { ...producer.collectRenderMedia(html), html };
21
+ }
22
+ function mediaPath(src, projectDir) {
23
+ return /^https?:\/\//i.test(src) ? src : resolveProjectRelativeSrc(src, projectDir, projectDir);
24
+ }
25
+
26
+ export {
27
+ collectProjectMedia,
28
+ mediaPath
29
+ };
@@ -4,6 +4,10 @@ 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
+ TIMING_TOLERANCE_SECONDS,
9
+ resolveCompositionDuration
10
+ } from "./chunk-CZGHFATT.js";
7
11
  import {
8
12
  findFfBinary
9
13
  } from "./chunk-VAS6HQX3.js";
@@ -19,10 +23,6 @@ import {
19
23
  resolveLocalAssetCandidates,
20
24
  resolveProjectRelativeSrc
21
25
  } from "./chunk-PBNWRWKA.js";
22
- import {
23
- TIMING_TOLERANCE_SECONDS,
24
- resolveCompositionDuration
25
- } from "./chunk-CZGHFATT.js";
26
26
  import {
27
27
  COLOR_GRADING_SOURCE_TAGS,
28
28
  COMPOSITION_ATTRIBUTES,
@@ -48,7 +48,10 @@ import {
48
48
  rewriteAssetPath,
49
49
  spansOverlap,
50
50
  validateColorGradingContract
51
- } from "./chunk-2BGOB2QK.js";
51
+ } from "./chunk-SE2MXV2N.js";
52
+ import {
53
+ encodeUrlPath
54
+ } from "./chunk-NHA4NRBE.js";
52
55
  import {
53
56
  parseHTML
54
57
  } from "./chunk-GWTIFRF5.js";
@@ -64,7 +67,7 @@ import {
64
67
  base,
65
68
  recursive,
66
69
  simple
67
- } from "./chunk-RXATE6FZ.js";
70
+ } from "./chunk-WC4MTXGN.js";
68
71
  import {
69
72
  __commonJS,
70
73
  __require,
@@ -7994,11 +7997,11 @@ function deriveDurationFromClips(tags, rootTag) {
7994
7997
  return resolveCompositionDuration({ authoredDurationSeconds: null, clipEndsSeconds: clipEnds });
7995
7998
  }
7996
7999
  async function loadParseGsapScript() {
7997
- const mod = await import("./gsapParserAcorn-LZJKCFQI.js");
8000
+ const mod = await import("./gsapParserAcorn-5YD4N6HQ.js");
7998
8001
  return mod.parseGsapScriptAcorn;
7999
8002
  }
8000
8003
  async function loadGsapScriptMotionPathFirstUseIndex() {
8001
- const mod = await import("./gsapParserAcorn-LZJKCFQI.js");
8004
+ const mod = await import("./gsapParserAcorn-5YD4N6HQ.js");
8002
8005
  return mod.gsapScriptMotionPathFirstUseIndex;
8003
8006
  }
8004
8007
  var SCENE_BOUNDARY_EPSILON_SECONDS = 0.05;
@@ -11334,10 +11337,18 @@ function lintProjectAudioFiles(projectDir, htmlSources) {
11334
11337
  }
11335
11338
  return findings;
11336
11339
  }
11340
+ function urlSafeSrcOf(projectDir, rootRelative) {
11341
+ if (!/[?#]/.test(rootRelative)) return null;
11342
+ const literal = resolve(projectDir, rootRelative.replace(/^\//, ""));
11343
+ if (!existsSync2(literal)) return null;
11344
+ return encodeUrlPath(rootRelative);
11345
+ }
11346
+ var urlSafeHint = (safe) => `The file exists, but a "#" or "?" in a src ends the file name there. Write the src as "${safe}".`;
11337
11347
  function lintAudioSrcNotFound(projectDir, htmlSources) {
11338
11348
  const findings = [];
11339
11349
  const audioSrcRe = mediaSrcTagRe("audio");
11340
11350
  const missingByFile = /* @__PURE__ */ new Map();
11351
+ const urlSafe = /* @__PURE__ */ new Map();
11341
11352
  for (const { html, compSrcPath } of htmlSources) {
11342
11353
  const scannable = maskNonScannableRanges(html);
11343
11354
  let match;
@@ -11347,6 +11358,8 @@ function lintAudioSrcNotFound(projectDir, htmlSources) {
11347
11358
  if (isUnresolvedAssetPlaceholder(src)) continue;
11348
11359
  const rootRelative = compSrcPath ? rewriteAssetPath(compSrcPath, src, (path) => existsSync2(join3(projectDir, path))) : src;
11349
11360
  if (!existsSync2(resolveProjectRelativeSrc(rootRelative, projectDir))) {
11361
+ const safe = urlSafeSrcOf(projectDir, rootRelative);
11362
+ if (safe) urlSafe.set(src, safe);
11350
11363
  const file = sourceFile(projectDir, compSrcPath);
11351
11364
  missingByFile.set(file, (missingByFile.get(file) ?? /* @__PURE__ */ new Set()).add(src));
11352
11365
  }
@@ -11359,7 +11372,7 @@ function lintAudioSrcNotFound(projectDir, htmlSources) {
11359
11372
  severity: "error",
11360
11373
  file,
11361
11374
  message: `<audio> element references file(s) not found in the project: ${unique.join(", ")}. The rendered video will be silent.`,
11362
- fixHint: unique.length === 1 ? `Add the file "${unique[0]}" to the project directory, or update the src attribute to point to an existing file.` : `Add the missing files to the project directory, or update the src attributes to point to existing files.`
11375
+ fixHint: unique.length === 1 && urlSafe.has(unique[0]) ? urlSafeHint(urlSafe.get(unique[0])) : unique.length === 1 ? `Add the file "${unique[0]}" to the project directory, or update the src attribute to point to an existing file.` : `Add the missing files to the project directory, or update the src attributes to point to existing files.`
11363
11376
  });
11364
11377
  }
11365
11378
  return findings;
@@ -11368,6 +11381,7 @@ function lintMissingLocalAsset(projectDir, htmlSources) {
11368
11381
  const findings = [];
11369
11382
  const localAssetSrcRe = mediaSrcTagRe("video|img|source");
11370
11383
  const missingByTag = /* @__PURE__ */ new Map();
11384
+ const urlSafe = /* @__PURE__ */ new Map();
11371
11385
  for (const { html, compSrcPath } of htmlSources) {
11372
11386
  const scannable = maskNonScannableRanges(html);
11373
11387
  const re = new RegExp(localAssetSrcRe.source, localAssetSrcRe.flags);
@@ -11382,6 +11396,12 @@ function lintMissingLocalAsset(projectDir, htmlSources) {
11382
11396
  const rootRelative = compSrcPath ? rewriteAssetPath(compSrcPath, src, (path) => existsSync2(join3(projectDir, path))) : src;
11383
11397
  const resolvedAsset = resolveExistingLocalAsset(projectDir, rootRelative);
11384
11398
  if (resolvedAsset) continue;
11399
+ const rawRoot = rawSrc.trim();
11400
+ const safe = urlSafeSrcOf(
11401
+ projectDir,
11402
+ compSrcPath ? rewriteAssetPath(compSrcPath, rawRoot, (path) => existsSync2(join3(projectDir, path))) : rawRoot
11403
+ );
11404
+ if (safe) urlSafe.set(src, safe);
11385
11405
  const resolvedKey = resolve(projectDir, rootRelative);
11386
11406
  const file = sourceFile(projectDir, compSrcPath);
11387
11407
  const bucketKey = `${file}\0${tagName}`;
@@ -11400,7 +11420,7 @@ function lintMissingLocalAsset(projectDir, htmlSources) {
11400
11420
  severity: "error",
11401
11421
  file,
11402
11422
  message: `<${tagName}> element references local file(s) not found in the project: ${unique.join(", ")}. The renderer will silently skip these and produce a video with missing visuals.`,
11403
- fixHint: unique.length === 1 ? `Add "${unique[0]}" to the project directory, or update the src attribute to point to an existing file. Common cause: captured asset filenames are unreliable (heygen-logo.svg often contains Google, nvidia-logo.svg may contain Autodesk, etc.). Open the contact sheets and verify the file actually exists at this path before referencing it.` : "Add the missing files to the project directory, or update the src attributes to point to existing files. Captured asset filenames are unreliable. Verify against capture/contact-sheets/ and capture/extracted/asset-descriptions.md."
11423
+ fixHint: unique.length === 1 && urlSafe.has(unique[0]) ? urlSafeHint(urlSafe.get(unique[0])) : unique.length === 1 ? `Add "${unique[0]}" to the project directory, or update the src attribute to point to an existing file. Common cause: captured asset filenames are unreliable (heygen-logo.svg often contains Google, nvidia-logo.svg may contain Autodesk, etc.). Open the contact sheets and verify the file actually exists at this path before referencing it.` : "Add the missing files to the project directory, or update the src attributes to point to existing files. Captured asset filenames are unreliable. Verify against capture/contact-sheets/ and capture/extracted/asset-descriptions.md."
11404
11424
  });
11405
11425
  }
11406
11426
  return findings;