hyperframes 0.8.181 → 0.8.183

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 (215) hide show
  1. package/bin/hyperframes.mjs +3 -1
  2. package/dist/{add-AWQ2EGBU.js → add-HW3ZGR36.js} +22 -22
  3. package/dist/{animatedGifPrep-SENXJ7TN.js → animatedGifPrep-EPLN37ZN.js} +13 -13
  4. package/dist/api.js +28 -28
  5. package/dist/{asset-XBH3MN3Y.js → asset-TOASKL3Z.js} +3 -3
  6. package/dist/{assetCataloger-KH4X2CRO.js → assetCataloger-PZN5HYG2.js} +15 -13
  7. package/dist/{audio-Q7I473UN.js → audio-F5OIQVJO.js} +29 -29
  8. package/dist/{auth-I7CBTEUS.js → auth-YVQLRS3T.js} +4 -4
  9. package/dist/{autoUpdate-KY5TLSN7.js → autoUpdate-EG4ZFW4D.js} +2 -2
  10. package/dist/{backgroundChecks-4Q3VVK5W.js → backgroundChecks-WINNQVR2.js} +3 -3
  11. package/dist/backgroundChecksWorker.js +3 -3
  12. package/dist/{batchRender-3AYDQRBI.js → batchRender-PASZTMEE.js} +7 -7
  13. package/dist/{beats-P4LENNVT.js → beats-KGIOEBLW.js} +12 -12
  14. package/dist/{benchmark-AXOAECN3.js → benchmark-ZNY2L7HN.js} +24 -24
  15. package/dist/{browser-XZKB5HGJ.js → browser-REAO7RU4.js} +20 -20
  16. package/dist/{bundleWithLocalizedFonts-2WCR57IN.js → bundleWithLocalizedFonts-OAYLYC4W.js} +2 -2
  17. package/dist/{capture-NWARHRHR.js → capture-IK6GWQDD.js} +8 -5
  18. package/dist/{capture-4RN4APDF.js → capture-WOSF276U.js} +49 -41
  19. package/dist/{captureCompositionFrame-QOF5BRF4.js → captureCompositionFrame-DDZNKYRE.js} +21 -20
  20. package/dist/{captureTimeout-K2JNVVCI.js → captureTimeout-RIMG6IYH.js} +1 -1
  21. package/dist/{catalog-CRPOPVD5.js → catalog-AKTXS7OJ.js} +42 -42
  22. package/dist/{catch-up-MHWGUQ42.js → catch-up-O3VZMPVE.js} +15 -15
  23. package/dist/check-6E46NIWI.js +116 -0
  24. package/dist/checkBrowser-UNZHQFNH.js +117 -0
  25. package/dist/{chunk-Y2RXRPL2.js → chunk-3BA2GP4H.js} +5 -5
  26. package/dist/{chunk-N5SXQCJL.js → chunk-3OLIGYWN.js} +3 -3
  27. package/dist/{chunk-OR5WCFWZ.js → chunk-3Q47QC46.js} +2 -2
  28. package/dist/{chunk-EOADENKV.js → chunk-4FQKS7BJ.js} +16 -14
  29. package/dist/{chunk-HODBPO4A.js → chunk-4UFJWRHG.js} +461 -275
  30. package/dist/{chunk-537IYAEE.js → chunk-4UMPIPCQ.js} +9 -1
  31. package/dist/{chunk-OJTDUF4W.js → chunk-5MBLWFLM.js} +1 -1
  32. package/dist/{chunk-UVEQLDKB.js → chunk-5OGDBU4G.js} +3 -2
  33. package/dist/{chunk-L3YOGIPG.js → chunk-66LREXGS.js} +1 -1
  34. package/dist/{chunk-YPBIAONI.js → chunk-73LTCCZI.js} +218 -150
  35. package/dist/{chunk-GZVP4TWN.js → chunk-7JAD4MEW.js} +1 -1
  36. package/dist/{chunk-NAMGMP3R.js → chunk-7KVVNF7B.js} +1 -1
  37. package/dist/{chunk-GK2FIKIQ.js → chunk-ADDHW2FS.js} +214 -37
  38. package/dist/{chunk-WUQUR33W.js → chunk-AKFADCMS.js} +1 -1
  39. package/dist/{chunk-VAJIPSN6.js → chunk-ANR6WOC3.js} +1 -1
  40. package/dist/{chunk-4USWWI2Y.js → chunk-ATMDOUNN.js} +2 -2
  41. package/dist/{chunk-XSRUVMXK.js → chunk-B2SZZFWW.js} +4 -4
  42. package/dist/{chunk-TO6JNTML.js → chunk-BP4VNTZL.js} +13 -8
  43. package/dist/{chunk-DJJ7SK4F.js → chunk-CAHTO62O.js} +8 -8
  44. package/dist/{chunk-GNE57O7U.js → chunk-CGK4XZ2J.js} +1 -1
  45. package/dist/{chunk-O5AE7HOP.js → chunk-CJYAJ3QM.js} +37 -33
  46. package/dist/{chunk-5JMZLQT6.js → chunk-COTLNID2.js} +16 -16
  47. package/dist/{chunk-E24HSMZV.js → chunk-CYBXXSC4.js} +65 -14
  48. package/dist/{chunk-NZZYJOMJ.js → chunk-CZUAX3BV.js} +6 -5
  49. package/dist/{chunk-K26FR4SM.js → chunk-DEORFAWP.js} +12 -12
  50. package/dist/{chunk-GV5R5B7Q.js → chunk-DGECWPTL.js} +1 -1
  51. package/dist/{chunk-BRHI7EIA.js → chunk-DKPNNYBZ.js} +4 -0
  52. package/dist/{chunk-5E5EYPZO.js → chunk-DLC2FICN.js} +7 -7
  53. package/dist/{chunk-D3ZWBHZP.js → chunk-DYAPHNV6.js} +3 -2
  54. package/dist/{chunk-RGHQID2E.js → chunk-EHSBBBR2.js} +5 -3
  55. package/dist/{chunk-IWTRHPTP.js → chunk-EVAQPW6O.js} +8 -8
  56. package/dist/{chunk-S3RYRF3W.js → chunk-F6WHPHLF.js} +1 -1
  57. package/dist/chunk-FG4BBFZI.js +122 -0
  58. package/dist/{chunk-WITHUCCB.js → chunk-GAGMLVCV.js} +2 -2
  59. package/dist/chunk-GMNHAOMJ.js +3805 -0
  60. package/dist/{chunk-KIO3R4QN.js → chunk-GPE3WWTO.js} +16 -6
  61. package/dist/{chunk-IL3GTCQY.js → chunk-GTE5WZAM.js} +72 -140
  62. package/dist/{chunk-55IG255C.js → chunk-HLBODNGW.js} +1 -1
  63. package/dist/{chunk-KMAAOHLO.js → chunk-HRPWRZGF.js} +1 -1
  64. package/dist/{chunk-UPFUC4DB.js → chunk-HTIUNMTP.js} +1 -1
  65. package/dist/{chunk-WUUCEFL5.js → chunk-IC2WYONA.js} +5 -5
  66. package/dist/{chunk-DUN63LHY.js → chunk-ITSLKUQM.js} +2 -2
  67. package/dist/{chunk-YJDB4FLT.js → chunk-JQYJXUJW.js} +1 -1
  68. package/dist/{chunk-PBN6GBJE.js → chunk-JVBRJMOP.js} +14 -1
  69. package/dist/{chunk-XH262OWN.js → chunk-K2Z5DZBS.js} +1 -1
  70. package/dist/{chunk-RHWJKSGH.js → chunk-KANNRHY7.js} +1 -1
  71. package/dist/{chunk-AOWDVB2T.js → chunk-KRFAX5JK.js} +1 -1
  72. package/dist/{chunk-UIDZRCBG.js → chunk-LBWRQ4XA.js} +1 -1
  73. package/dist/{chunk-T7UHTUUE.js → chunk-MIZDJVPZ.js} +9 -9
  74. package/dist/{chunk-32GKETR7.js → chunk-MMQ52NIZ.js} +74 -0
  75. package/dist/chunk-MOEGCMKI.js +180 -0
  76. package/dist/{chunk-E6RPWJVC.js → chunk-NAUKCKCJ.js} +5 -1
  77. package/dist/{chunk-JBCU6NR5.js → chunk-NZ3BE2QE.js} +56 -55
  78. package/dist/{chunk-JMFJI26U.js → chunk-O7N3A7PE.js} +2 -2
  79. package/dist/{chunk-3PULCIY5.js → chunk-OH56PXFH.js} +5 -5
  80. package/dist/{chunk-H4YZZ2VQ.js → chunk-PFD25NAC.js} +1 -1
  81. package/dist/{check-DJCUOUDI.js → chunk-Q6UYKWBG.js} +198 -142
  82. package/dist/{chunk-3DKN5WKL.js → chunk-QH3T4WI2.js} +77 -6
  83. package/dist/{chunk-Y5GY6Y7A.js → chunk-QX4GGPMY.js} +2 -2
  84. package/dist/{chunk-B6JLCPT3.js → chunk-R6OV4J4K.js} +6 -6
  85. package/dist/{chunk-XEWHUPFS.js → chunk-RZXUQR42.js} +2 -2
  86. package/dist/{chunk-YMS6CJCD.js → chunk-SAQYJLI6.js} +1 -1
  87. package/dist/{chunk-OJDXABUF.js → chunk-TJB4GAV6.js} +2 -2
  88. package/dist/{checkBrowser-VES2NF3K.js → chunk-TOHA5NAU.js} +187 -114
  89. package/dist/{chunk-RXQHSGAQ.js → chunk-TXGZZKDF.js} +2 -2
  90. package/dist/{chunk-3XDOGSRD.js → chunk-U5YVWG5W.js} +3 -3
  91. package/dist/{chunk-ICMXC3MI.js → chunk-U6RXZNZE.js} +31 -18
  92. package/dist/{chunk-PF7OWVTL.js → chunk-UNOSCGBG.js} +2 -2
  93. package/dist/{chunk-X7CCSMRR.js → chunk-VAK7A2N6.js} +16 -16
  94. package/dist/{chunk-OFY6JTZC.js → chunk-VDJO4DJ7.js} +2 -2
  95. package/dist/{chunk-LBQFLUIY.js → chunk-VFBAKPRC.js} +9 -49
  96. package/dist/{chunk-ZUOSILUE.js → chunk-VH5KESLX.js} +1 -1
  97. package/dist/{chunk-22QHO26F.js → chunk-W64L7IFS.js} +1 -1
  98. package/dist/{chunk-4IEH6EAC.js → chunk-WT4PYV2J.js} +4 -6
  99. package/dist/{chunk-XFCLWWL3.js → chunk-X3IA5RYH.js} +2 -2
  100. package/dist/{chunk-UZOZ2W2E.js → chunk-XAQDR5Y5.js} +2 -2
  101. package/dist/{chunk-6I7V6Q7F.js → chunk-XJHKJXT4.js} +103 -20
  102. package/dist/{chunk-V2UNZ7QP.js → chunk-XOVHO3TT.js} +25 -14
  103. package/dist/{chunk-65WIUIHL.js → chunk-XR5BSEUF.js} +7 -15
  104. package/dist/{chunk-IZM562YJ.js → chunk-Z4R35NJS.js} +4 -4
  105. package/dist/{chunk-4OT3FWVV.js → chunk-ZFO3A3QL.js} +2 -2
  106. package/dist/{clean-GJNDVVDI.js → clean-WNEIVBF3.js} +40 -40
  107. package/dist/cli.js +68 -64
  108. package/dist/{cloud-JCWNMKXC.js → cloud-6GSSDCJL.js} +4 -4
  109. package/dist/{cloudrun-2BKGY53X.js → cloudrun-4NEJRE4T.js} +8 -8
  110. package/dist/commands/layout-audit.browser.js +15 -4
  111. package/dist/commands/motion-signature.browser.js +52 -0
  112. package/dist/{compare-XWM7FAYM.js → compare-2JWQ5ABA.js} +50 -47
  113. package/dist/{compiler-U3W6CJW7.js → compiler-27KQD7KW.js} +6 -6
  114. package/dist/{component-CBRAE325.js → component-HCRET3MH.js} +4 -4
  115. package/dist/{compositions-EZYJEHQ3.js → compositions-HTSQ6SUJ.js} +28 -29
  116. package/dist/{contactSheet-27SRU7A4.js → contactSheet-CAGMKI3E.js} +3 -1
  117. package/dist/{delete-JWWMOITI.js → delete-GHQ5UYM7.js} +9 -9
  118. package/dist/{deploy-UGOV76OH.js → deploy-I3Z3NAVA.js} +11 -11
  119. package/dist/{destroy-QBLMYDBF.js → destroy-4B5HW5FH.js} +5 -5
  120. package/dist/{deterministicFonts-L7YEEFGI.js → deterministicFonts-JFLSSKRB.js} +2 -2
  121. package/dist/{dist-2FMTAVGL.js → dist-SENYPQGW.js} +4 -4
  122. package/dist/{dist-VO7OXOFK.js → dist-WRDLWRMS.js} +5 -5
  123. package/dist/{docs-MPOM3PHH.js → docs-UEWLIP6D.js} +1 -1
  124. package/dist/{doctor-XSKSZRR7.js → doctor-UGFVQZHI.js} +27 -27
  125. package/dist/{events-AIZODZMP.js → events-BLJGWMNP.js} +9 -9
  126. package/dist/{events-RGS4MAH4.js → events-YS4OVX3I.js} +6 -6
  127. package/dist/{feedback-GE3VDZOH.js → feedback-AZ3SJ5HF.js} +35 -35
  128. package/dist/{ffmpeg-SCXZTR6X.js → ffmpeg-2AECXG7V.js} +15 -15
  129. package/dist/{figma-3R4XST4Y.js → figma-DRYIJQHV.js} +3 -3
  130. package/dist/fontLocalizeCli.js +23 -23
  131. package/dist/{get-4FKJP6IM.js → get-DDEAOFPB.js} +9 -9
  132. package/dist/{gpuPolicy-4NNXESM7.js → gpuPolicy-UDJT2MQK.js} +13 -13
  133. package/dist/{grade-compare-FAYVPXUR.js → grade-compare-LJKK5NSY.js} +55 -50
  134. package/dist/{help-C3UQMYXK.js → help-TQBGYOID.js} +1 -1
  135. package/dist/{history-LDGQ2IZJ.js → history-5TOOCF2Y.js} +15 -15
  136. package/dist/hyperframe.manifest.json +1 -1
  137. package/dist/hyperframe.runtime.iife.js +17 -17
  138. package/dist/hyperframes-player.global.js +8 -3
  139. package/dist/{info-KMXFLD3Q.js → info-ENI5MP4W.js} +20 -20
  140. package/dist/{init-D7GYHSX5.js → init-JXPXWV3G.js} +68 -68
  141. package/dist/{inspect-CUKWHCGS.js → inspect-WZNYQ5AB.js} +45 -44
  142. package/dist/{installer-EPRSH6QI.js → installer-3SGRBLJW.js} +7 -7
  143. package/dist/{keyframes-XCUPHBW3.js → keyframes-HEOC4CT4.js} +16 -16
  144. package/dist/{lambda-IMORFJHN.js → lambda-2VHQ4AL2.js} +15 -15
  145. package/dist/{layout-JD2IOBMS.js → layout-7WEUNO6T.js} +45 -44
  146. package/dist/{lint-FHLER36Y.js → lint-5YMAF3L7.js} +23 -23
  147. package/dist/{lintProject-ARKJXDQF.js → lintProject-C2ONSH2U.js} +4 -4
  148. package/dist/{list-MGCFG5MA.js → list-BIE3X7CO.js} +10 -10
  149. package/dist/{login-QX6M4UTR.js → login-YDIGJWCG.js} +7 -7
  150. package/dist/{logout-DKJANASY.js → logout-DDC4QLVK.js} +3 -3
  151. package/dist/{manager-IETAVBZS.js → manager-D2UV6RDQ.js} +16 -16
  152. package/dist/{manager-V2QCCPOJ.js → manager-UHWEKPXC.js} +8 -3
  153. package/dist/{media-treatment-MDAQRITV.js → media-treatment-FSKHPMWA.js} +33 -33
  154. package/dist/{media-use-4XXGABIL.js → media-use-JBN57JE3.js} +1 -1
  155. package/dist/{models-NZAOSI5A.js → models-COEK6LXG.js} +24 -24
  156. package/dist/{motionShot-6ZDUM2K4.js → motionShot-HYZ2ZGJQ.js} +28 -26
  157. package/dist/{normalize-audio-7PRYX6QM.js → normalize-audio-UXR6WQ7Q.js} +12 -12
  158. package/dist/{open-I254NY5J.js → open-OFT2GIDG.js} +24 -24
  159. package/dist/{parakeetRunner-TL3TOGUS.js → parakeetRunner-4NZ3QXS3.js} +25 -25
  160. package/dist/{pipeline-YPERVOQM.js → pipeline-ZKE54JMG.js} +18 -18
  161. package/dist/{play-MYI7BYKS.js → play-2VG77FT6.js} +39 -38
  162. package/dist/{policies-5NTZOHJA.js → policies-XXNGXWHV.js} +1 -1
  163. package/dist/{preflight-HRCSZ52D.js → preflight-QTWDIM5C.js} +18 -18
  164. package/dist/{present-WYXQDV4Q.js → present-OONXQLJG.js} +33 -33
  165. package/dist/{preview-535HTWQO.js → preview-6RZJFU76.js} +49 -49
  166. package/dist/{producer-C76CRJ5O.js → producer-6YM3UH3B.js} +1 -1
  167. package/dist/{progress-I37JB7R4.js → progress-NHJIHAAG.js} +2 -2
  168. package/dist/{projectConfig-5QCNTGQT.js → projectConfig-YMW4P2X6.js} +9 -9
  169. package/dist/{publication-2QT7VVE2.js → publication-SEINUAPZ.js} +5 -5
  170. package/dist/{publish-53EBL7OO.js → publish-KZBTBWFO.js} +27 -27
  171. package/dist/{refresh-MGCVWX56.js → refresh-RXTOPRBB.js} +3 -3
  172. package/dist/{remove-background-OBYHMPD4.js → remove-background-BIQNMIR7.js} +31 -31
  173. package/dist/{render-5BXTEEG7.js → render-65K3K6SD.js} +31 -31
  174. package/dist/{render-3MELF6Y3.js → render-FIH37HJA.js} +101 -96
  175. package/dist/{render-75CRB3BW.js → render-LW76HOMJ.js} +8 -8
  176. package/dist/{render-batch-CEVWUYBP.js → render-batch-POLEEYD4.js} +8 -8
  177. package/dist/renderSetupWorker.js +12 -9
  178. package/dist/{resolver-4ICE2AT6.js → resolver-O2SED3XB.js} +7 -7
  179. package/dist/{screenshotCapture-HXEZ3TNJ.js → screenshotCapture-UBY6TT75.js} +33 -6
  180. package/dist/{sherpa-L4UACXT3.js → sherpa-HTFFFTVQ.js} +24 -24
  181. package/dist/{sites-3ZBYB5X4.js → sites-MAVH57MO.js} +2 -2
  182. package/dist/skills/hyperframes/references/review-loop.md +1 -1
  183. package/dist/{skills-DXTQPCAO.js → skills-J6MBGS5O.js} +17 -17
  184. package/dist/{skillsUpdateCheck-ULXRGLDU.js → skillsUpdateCheck-ZAXNLBF3.js} +3 -3
  185. package/dist/{snapshot-PWFHQU5E.js → snapshot-TL7TTFS6.js} +72 -71
  186. package/dist/{src-RDSWHMJS.js → src-EL6HGIS4.js} +33 -26
  187. package/dist/{src-S7NVL5VF.js → src-Z5H5N5T4.js} +19 -19
  188. package/dist/{state-KAXGHF77.js → state-ORRPOLMQ.js} +2 -2
  189. package/dist/{staticProjectServer-GYPUQGI7.js → staticProjectServer-EO7X7RAY.js} +20 -20
  190. package/dist/{status-BV7QAUQD.js → status-CM7IQTU2.js} +6 -6
  191. package/dist/studio/assets/{hyperframes-player-DcD3NXpX.js → hyperframes-player-hz_VqxBZ.js} +7 -2
  192. package/dist/studio/assets/{index-BIDKYk0h.js → index-CV_ojgp5.js} +1 -1
  193. package/dist/studio/assets/{index-CFrZAwKo.js → index-S1ceEagc.js} +4 -4
  194. package/dist/studio/index.html +1 -1
  195. package/dist/{studio-api-IXGX5ZFI.js → studio-api-CUZDC5B3.js} +17 -17
  196. package/dist/{studioServer-LA5Z7RSS.js → studioServer-EZPRV43Y.js} +90 -84
  197. package/dist/{telemetry-STEMAMAX.js → telemetry-LFUVHARP.js} +10 -10
  198. package/dist/{telemetry-CQYHCCPL.js → telemetry-QG5AANZ4.js} +1 -1
  199. package/dist/{timeline-KLD24EN6.js → timeline-GSH743JE.js} +41 -41
  200. package/dist/{tokens-ICLORAA4.js → tokens-3ZMPSH7B.js} +3 -3
  201. package/dist/{transcribe-A6IKK7VS.js → transcribe-4SHNDPWW.js} +47 -47
  202. package/dist/{transcribe-CTHZLRXF.js → transcribe-TV7JBZQS.js} +19 -19
  203. package/dist/{tts-EDK3QS7M.js → tts-A2WILYGN.js} +6 -6
  204. package/dist/{updateCheck-FHCAAAXA.js → updateCheck-W7FTFOQF.js} +2 -2
  205. package/dist/{upgrade-7EV4F2R7.js → upgrade-7YYYNAPF.js} +3 -3
  206. package/dist/{urlDownloader-MIMGVASJ.js → urlDownloader-PQSUS2CP.js} +12 -12
  207. package/dist/{validate-LZF46W3V.js → validate-GCHAEVXM.js} +39 -38
  208. package/dist/{video-ZC47NFOL.js → video-KGN7NJS5.js} +16 -14
  209. package/dist/warmCheck.js +227 -0
  210. package/dist/warmCheckClient.js +139 -0
  211. package/package.json +4 -2
  212. package/dist/chunk-BAZ5LCR3.js +0 -3805
  213. package/dist/hyperframe-runtime.js +0 -1125
  214. package/dist/{chunk-B4VT6YU2.js → chunk-QGOYNPQT.js} +3 -3
  215. package/dist/{synthesize-I2C24XJ5.js → synthesize-PKTB5ATG.js} +1 -1
@@ -8,14 +8,14 @@ import {
8
8
  DEFAULT_REGISTRY_URL,
9
9
  fetchItemFile,
10
10
  validRegistryItem
11
- } from "./chunk-TO6JNTML.js";
11
+ } from "./chunk-BP4VNTZL.js";
12
12
  import {
13
13
  publishRegistryFile,
14
14
  registryTargetPath
15
15
  } from "./chunk-GMECXFAN.js";
16
16
  import {
17
17
  validateVariables
18
- } from "./chunk-LBQFLUIY.js";
18
+ } from "./chunk-VFBAKPRC.js";
19
19
  import {
20
20
  realProjectRoot
21
21
  } from "./chunk-OFQWTKPW.js";
@@ -9,7 +9,7 @@ import {
9
9
  parseStrictFiniteTimingNumber,
10
10
  resolveNaturalMediaTimelineDuration,
11
11
  resolveTimedImageDurationSeconds
12
- } from "./chunk-BAZ5LCR3.js";
12
+ } from "./chunk-GMNHAOMJ.js";
13
13
  import {
14
14
  CANVAS_DIMENSIONS,
15
15
  isCompositionElement,
@@ -20,12 +20,14 @@ import {
20
20
  } from "./chunk-YMS5FOMC.js";
21
21
  import {
22
22
  COMPOSITION_ATTRIBUTES,
23
+ MEDIA_START_BASIS_ATTR,
24
+ compositionOriginSeconds,
25
+ hostInPointSeconds,
26
+ isRootGlobalMediaStart,
23
27
  parseStartExpression,
28
+ resolveMediaStartSeconds,
24
29
  sameInstant
25
- } from "./chunk-32GKETR7.js";
26
- import {
27
- readMediaOffsetSeconds
28
- } from "./chunk-BSQ7XANM.js";
30
+ } from "./chunk-MMQ52NIZ.js";
29
31
  import {
30
32
  parseHTML
31
33
  } from "./chunk-SDYDNHEE.js";
@@ -1199,8 +1201,8 @@ function parsePreviewProxyBox(raw) {
1199
1201
  }
1200
1202
 
1201
1203
  // ../core/dist/inline-scripts/hyperframesRuntime.engine.js
1202
- import { buildSync } from "esbuild";
1203
1204
  import { existsSync } from "fs";
1205
+ import { createRequire } from "module";
1204
1206
  import { dirname, resolve } from "path";
1205
1207
  import { fileURLToPath } from "url";
1206
1208
  function applyDefaultParityMode(script, enabled) {
@@ -1213,6 +1215,7 @@ function buildHyperframesRuntimeScript(options = {}) {
1213
1215
  const entryPath = resolve(dirname(fileURLToPath(import.meta.url)), "../runtime/entry.ts");
1214
1216
  if (!existsSync(entryPath))
1215
1217
  return null;
1218
+ const { buildSync } = createRequire(import.meta.url)("esbuild");
1216
1219
  const result = buildSync({
1217
1220
  entryPoints: [entryPath],
1218
1221
  bundle: true,
@@ -4421,42 +4424,6 @@ function readTimelineDurationSeconds(timeline) {
4421
4424
  }
4422
4425
  }
4423
4426
 
4424
- // ../core/dist/mediaTiming.js
4425
- var MEDIA_START_BASIS_ATTR = "data-hf-media-start-basis";
4426
- function readMediaStartBasis(value) {
4427
- return value?.trim().toLowerCase() === "global" ? "global" : "local";
4428
- }
4429
- function resolveAbsoluteMediaStartSeconds(input) {
4430
- return readMediaStartBasis(input.basis) === "global" ? input.authoredStart : input.hostStart + input.authoredStart;
4431
- }
4432
- function resolveMediaStartSeconds(input) {
4433
- if (!hasLiteralNestedStart(input))
4434
- return input.ordinaryStart();
4435
- return resolveAbsoluteMediaStartSeconds({
4436
- authoredStart: input.authoredStart,
4437
- hostStart: input.hostStart,
4438
- basis: input.basis
4439
- });
4440
- }
4441
- function isRootGlobalMediaStart(input) {
4442
- return hasLiteralNestedStart(input) && readMediaStartBasis(input.basis) === "global";
4443
- }
4444
- function hasLiteralNestedStart(input) {
4445
- return !input.hasAutoStart && input.authoredStart != null && input.hostStart !== 0;
4446
- }
4447
- function hostInPointSeconds(host) {
4448
- return readMediaOffsetSeconds((name) => host.getAttribute(name));
4449
- }
4450
- function compositionOriginSeconds(hostStart, host) {
4451
- return hostStart - hostInPointSeconds(host);
4452
- }
4453
- function cutToHostSlots(span, hosts) {
4454
- return hosts.reduce((kept, host) => {
4455
- const start = Math.max(kept.start, host.start);
4456
- return { start, end: Math.max(start, Math.min(kept.end, host.end)) };
4457
- }, span);
4458
- }
4459
-
4460
4427
  // ../core/dist/runtime/startResolver.js
4461
4428
  function createRuntimeStartTimeResolver(params) {
4462
4429
  const timelineRegistry = params.timelineRegistry ?? {};
@@ -5595,13 +5562,6 @@ export {
5595
5562
  createGSAPFrameAdapter,
5596
5563
  fitTextFontSize,
5597
5564
  formatRenderOutputTimestamp,
5598
- MEDIA_START_BASIS_ATTR,
5599
- readMediaStartBasis,
5600
- resolveAbsoluteMediaStartSeconds,
5601
- resolveMediaStartSeconds,
5602
- hostInPointSeconds,
5603
- compositionOriginSeconds,
5604
- cutToHostSlots,
5605
5565
  createRuntimeStartTimeResolver,
5606
5566
  byStart,
5607
5567
  hasClipStarted,
@@ -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-S7NVL5VF.js");
10
+ return await import("./src-Z5H5N5T4.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
  runRenderSetupWorker
9
- } from "./chunk-D3ZWBHZP.js";
9
+ } from "./chunk-DYAPHNV6.js";
10
10
  import {
11
11
  terminateProcessTree
12
12
  } from "./chunk-KGPLIH7B.js";
@@ -37,7 +37,7 @@ import {
37
37
  stripEmbeddedRuntimeScripts,
38
38
  styleElementsFor,
39
39
  warnUnknownEnumValues
40
- } from "./chunk-BAZ5LCR3.js";
40
+ } from "./chunk-GMNHAOMJ.js";
41
41
  import {
42
42
  cssVariableName
43
43
  } from "./chunk-VC76R6W2.js";
@@ -47,11 +47,11 @@ import {
47
47
  } from "./chunk-OFQWTKPW.js";
48
48
  import {
49
49
  lintHyperframeHtml
50
- } from "./chunk-GK2FIKIQ.js";
50
+ } from "./chunk-ADDHW2FS.js";
51
51
  import {
52
52
  checkSubCompositionUsability,
53
53
  resolveSubCompositionContent
54
- } from "./chunk-32GKETR7.js";
54
+ } from "./chunk-MMQ52NIZ.js";
55
55
  import {
56
56
  CSS_URL_RE,
57
57
  decodeCssEscapes,
@@ -340,9 +340,6 @@ function extractStandaloneEntryFromIndex(indexHtml, entryFile, entryHtml) {
340
340
  return document.toString();
341
341
  }
342
342
 
343
- // ../core/dist/compiler/htmlBundler.js
344
- import { transform } from "esbuild";
345
-
346
343
  // ../core/dist/generated/svg-selector-aliases-inline.js
347
344
  var SVG_SELECTOR_ALIASES_IIFE = '"use strict";(()=>{function I(e){return e?/[\\w-]/.test(e)||e.charCodeAt(0)>=128:!1}function _(e){return e===" "||e===" "||e===`\n`||e==="\\r"||e==="\\f"}var j=/^[0-9a-fA-F]{1,6}/;function G(e){let n=e>=55296&&e<=57343;return e===0||e>1114111||n?65533:e}function $(e,n){return e[n]==="\\r"&&e[n+1]===`\n`?n+2:_(e[n])?n+1:n}function R(e,n){let t=e[n+1];if(t===void 0||/[\\n\\r\\f]/.test(t))return null;let i=j.exec(e.slice(n+1,n+7));if(!i)return{value:t,end:n+2};let o=G(Number.parseInt(i[0],16));return{value:String.fromCodePoint(o),end:$(e,n+1+i[0].length)}}function H(e,n){let t=o=>I(o)&&!/[0-9-]/.test(o),i=o=>e[o]==="\\\\"&&R(e,o)!==null;return e[n]==="-"?e[n+1]==="-"||t(e[n+1])||i(n+1):t(e[n])||i(n)}function y(e,n){let t=n;for(;e.startsWith("/*",t);){let i=e.indexOf("*/",t+2);t=i<0?e.length:i+2}return t}function A(e,n){let t=y(e,n);for(;_(e[t]);)t=y(e,t+1);return t}function h(e,n){if(!H(e,n))return null;let t=n,i="";for(;t<e.length;){let o=e[t];if(o==="\\\\"){let a=R(e,t);if(!a)break;i+=a.value,t=a.end;continue}if(!I(o))break;i+=o,t+=1}return t===n?null:{value:i,end:t}}var C=45;function T(e){return e>=48&&e<=57}function z(e){return e>=128||e===C||e===95||T(e)||e>=65&&e<=90||e>=97&&e<=122}function J(e,n){let t=e.charCodeAt(n);return t>=1&&t<=31||t===127?!0:T(t)?n===0||n===1&&e.charCodeAt(0)===C:!1}function k(e){let n="";for(let t=0;t<e.length;t+=1){let i=e.charCodeAt(t),o=e[t];i===0?n+="\\uFFFD":J(e,t)?n+=`\\\\${i.toString(16)} `:t===0&&e.length===1&&i===C?n+=`\\\\${o}`:z(i)?n+=o:n+=`\\\\${o}`}return n}var W=/\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|\\\\(?:[0-9a-fA-F]{1,6}(?:\\r\\n|[ \\t\\r\\n\\f])?|[\\s\\S])|"(?:[^"\\\\]|\\\\[\\s\\S])*"|\'(?:[^\'\\\\]|\\\\[\\s\\S])*\'|\\[(?:\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|\\\\[\\s\\S]|"(?:[^"\\\\]|\\\\[\\s\\S])*"|\'(?:[^\'\\\\]|\\\\[\\s\\S])*\'|[^\\]"\'\\\\/]|\\/(?!\\*))*\\]/g;function Q(e){let n=new Array(e.length).fill(!0);for(let t of e.matchAll(W)){let i=t.index;n.fill(!1,i,i+t[0].length)}return n}function q(e,n,t){if(n.length===0||!e.includes("#"))return e;let i=new Set(n),o=Q(e),a="",u=0;for(;u<e.length;){let d=o[u]&&e[u]==="#"?h(e,u+1):null;d&&i.has(d.value)?(a+=t(d.value),u=d.end):(a+=e[u],u+=1)}return a}function X(e){let n="";for(let t=0;t<e.length;t+=1){if(e[t]==="\\\\"){let i=e[t+1];if(i!==void 0&&/[\\n\\r\\f]/.test(i)){t=$(e,t+1)-1;continue}let o=R(e,t);if(o){n+=o.value,t=o.end-1;continue}}n+=e[t]}return n}function N(e){return Array.from(e,n=>{let t=n.charCodeAt(0);return t===0?"\\uFFFD":t<32||t===127?`\\\\${t.toString(16)} `:n===\'"\'||n==="\\\\"?`\\\\${n}`:n}).join("")}function Y(e,n){return e?{kind:"any"}:n===void 0?{kind:"none"}:{kind:"named",prefix:n}}function Z(e,n){return e[n]==="|"&&e[n+1]!=="="}function B(e,n){let t=e[n]==="*",i=t?{value:"*",end:n+1}:h(e,n),o=y(e,i?.end??n);if(!Z(e,o))return t?null:i?{token:i,namespace:{kind:"none"}}:null;let a=h(e,y(e,o+1));return a?{token:a,namespace:Y(t,i?.value)}:null}function K(e){if(e[0]!=="[")return null;let n=A(e,1),t=B(e,n);if(!t)return null;let{token:i,namespace:o}=t;return{name:i.value,rawName:e.slice(n,i.end),namespace:o,end:i.end}}function ee(e,n){let t=/^(?:"((?:\\\\[\\s\\S]|[^"\\\\])*)"|\'((?:\\\\[\\s\\S]|[^\'\\\\])*)\')/.exec(e.slice(n));return t?{value:X(t[1]??t[2]),end:n+t[0].length}:h(e,n)}function ne(e,n){let t=A(e,n),i=h(e,t);if(i){if(!/^[is]$/i.test(i.value))return null;t=A(e,i.end)}return e[t]!=="]"||t!==e.length-1?null:{flag:i?.value}}function F(e){let n=K(e);if(!n)return null;let t=A(e,n.end),o=["=","~=","|=","^=","$=","*="].find(d=>e.startsWith(d,t));if(!o)return null;let a=ee(e,A(e,t+o.length));if(!a)return null;let u=ne(e,a.end);return u?{name:n.name,rawName:n.rawName,namespace:n.namespace,operator:o,value:a.value,flag:u.flag}:null}function E(e,n){return e.replace(W,t=>t.startsWith("[")?n(t):t)}var re="data-hf-svg-reference-aliases";function O(e,n,t,i){let o={"=":(s,r)=>s===r,"~=":(s,r)=>s.split(/[ \\t\\r\\n\\f]+/).includes(r),"|=":(s,r)=>s===r||s.startsWith(r+"-"),"^=":(s,r)=>s.startsWith(r),"$=":(s,r)=>s.endsWith(r),"*=":(s,r)=>s.includes(r)},a=(s,r,l)=>!r&&l!=="="&&l!=="|="?!1:o[l](s,r),u=s=>s.replace(/[A-Z]/g,r=>r.toLowerCase()),d=s=>{let r=F(s);if(!r)return s;let{name:l,rawName:g,namespace:m,operator:b,value:D,flag:w}=r;if(m.kind==="named"!=(i!==void 0))return s;let x=w?.toLowerCase()==="i"?u:S=>S,L=u(l),P=t.filter(S=>{let V=m.kind==="none"?S.name:S.localName,U=m.kind==="named"?i.get(m.prefix):null;return(m.kind==="any"||S.namespaceURI===U)&&u(V)===L}),v=new Set([s]);for(let S of P)a(x(S.before),x(D),b)&&v.add(`[${g}="${N(S.after)}"${w?` ${w}`:""}]`);return v.size===1?s:`:is(${[...v].join(", ")})`};if(i)return E(e,d);let p=new Map(n.map(({id:s,replacement:r})=>[s,r])),f=new Map;for(let s of t){if(s.name!=="id"||s.before===s.after||p.has(s.before))continue;let r=f.get(s.before);r||(r=new Set([`#${k(s.before)}`]),f.set(s.before,r)),r.add(`#${k(s.after)}`)}for(let[s,r]of f)p.set(s,`:is(${[...r].join(", ")})`);let c=q(e,[...p.keys()],s=>p.get(s));return E(c,d)}function se(e,n,t=!0){let i=[],a=(t?[...e.querySelectorAll(`[${n}]`)]:[]).map(d=>d.getAttribute(n)),u=e.getAttribute?.(n);u&&a.unshift(u);for(let d of a){let p;try{p=JSON.parse(d)}catch{continue}if(!Array.isArray(p))continue;let f=p;for(let c of f){if(!ie(c))continue;let{name:s,localName:r,namespaceURI:l,before:g,after:m}=c;i.push({name:s,localName:r,namespaceURI:l,before:g,after:m})}}return i}function ie(e){if(!e||typeof e!="object")return!1;let{name:n,localName:t,namespaceURI:i,before:o,after:a}=e;return typeof n=="string"&&typeof t=="string"&&(i===null||typeof i=="string")&&typeof o=="string"&&typeof a=="string"}function oe(e){let n=[],t=[],i=!1,o,a=new WeakMap,u=(f,c)=>{for(let s of f){if("selectorText"in s){let r=s,l=a.get(r),g=r.selectorText,m=l?.applied===g?l.authored:g,b=O(m,[],t,c);b!==g&&(r.selectorText=b),b===m?a.delete(r):a.set(r,{authored:m,applied:r.selectorText})}"cssRules"in s&&u(s.cssRules,c)}},d=()=>{if(t.length)for(let f of e.document.styleSheets){let c;try{c=f.cssRules}catch{continue}let s=new Map;for(let r of c){if(!("namespaceURI"in r))continue;let{prefix:l,namespaceURI:g}=r;l&&s.set(l,g||null)}s.size&&u(c,s)}},p={rewrite:(f,c=[])=>{if(typeof f!="string"||!f.includes("#")&&!f.includes("["))return f;let s=O(f,c.length?[...c,...n]:n,t);if(s!==f){if(!o){let r=e.document.createElement("div");o=r.matches.bind(r)}o(f)}return s},refresh(){t=se(e.document,re).filter(r=>r.before!==r.after);let f=new Set(t.filter(r=>r.name==="id").map(r=>r.before)),c=new Set;n=[];for(let r of e.document.querySelectorAll("[data-hf-authored-id][id]")){let l=r.getAttribute("data-hf-authored-id");if(!l||l===r.id||c.has(l)||f.has(l))continue;c.add(l);let g=N(l);n.push({id:l,replacement:`:is(#${k(l)}, [data-hf-authored-id="${g}"])`})}if(d(),i||!n.length&&!t.length)return;let s=e.Element.prototype;s.querySelector=new Proxy(s.querySelector,{apply(r,l,g){return Reflect.apply(r,l,[p.rewrite(g[0])])}}),s.querySelectorAll=new Proxy(s.querySelectorAll,{apply(r,l,g){return Reflect.apply(r,l,[p.rewrite(g[0])])}}),i=!0}};e.__hfSvgSelectorAliases=p,p.refresh()}function M(){let e=window;e.__hfSvgSelectorAliases||oe(e)}M();})();\n';
348
345
  function getSvgSelectorAliasesScript() {
@@ -2715,6 +2712,7 @@ function parsesAsScript(source) {
2715
2712
  async function stripJsCommentsParserSafe(source, provenance) {
2716
2713
  if (!source)
2717
2714
  return source;
2715
+ const { transform } = await import("esbuild");
2718
2716
  try {
2719
2717
  const result = await transform(source, {
2720
2718
  loader: "js",
@@ -12,13 +12,13 @@ import {
12
12
  forceRefreshCredentials,
13
13
  resolveCloudAuthHeaders,
14
14
  resolveCloudBaseUrl
15
- } from "./chunk-KMAAOHLO.js";
15
+ } from "./chunk-HRPWRZGF.js";
16
16
  import {
17
17
  errorBox
18
18
  } from "./chunk-K2FLNJVB.js";
19
19
  import {
20
20
  failCommand
21
- } from "./chunk-PBN6GBJE.js";
21
+ } from "./chunk-JVBRJMOP.js";
22
22
 
23
23
  // src/cloud/poll.ts
24
24
  var DEFAULT_POLL_INTERVAL_MS = 2e3;
@@ -6,14 +6,14 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  refreshIfNeeded
9
- } from "./chunk-KMAAOHLO.js";
9
+ } from "./chunk-HRPWRZGF.js";
10
10
  import {
11
11
  buildAuthHeaders,
12
12
  envCredentialVar,
13
13
  isAuthError,
14
14
  isTokenExpired,
15
15
  tryResolveCredential
16
- } from "./chunk-NAMGMP3R.js";
16
+ } from "./chunk-7KVVNF7B.js";
17
17
  import {
18
18
  CSS_URL_RE,
19
19
  isNonRelativeUrl,
@@ -8,13 +8,16 @@ import {
8
8
  ensureCaptureDirSync,
9
9
  writeCaptureFileSync
10
10
  } from "./chunk-MRF4AMKD.js";
11
+ import {
12
+ loadSharp
13
+ } from "./chunk-QH3T4WI2.js";
11
14
  import {
12
15
  createCaptureDownloadBudget,
13
16
  readBoundedResponse
14
17
  } from "./chunk-AWDFDFI3.js";
15
18
  import {
16
19
  isBlockedNetworkHost
17
- } from "./chunk-YPBIAONI.js";
20
+ } from "./chunk-73LTCCZI.js";
18
21
  import {
19
22
  DOMParser,
20
23
  parseHTML
@@ -24,10 +27,14 @@ import {
24
27
  var CAPTURE_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36";
25
28
 
26
29
  // src/capture/publicNetwork.ts
27
- import { lookup } from "dns/promises";
30
+ import { execFile } from "child_process";
31
+ import { promises as dns } from "dns";
32
+ import { readFile } from "fs/promises";
28
33
  import { isIP } from "net";
29
34
  import { request as httpRequest } from "http";
30
35
  import { request as httpsRequest } from "https";
36
+ var DNS_TIMEOUT_MS = 1e4;
37
+ var CARES_TIMEOUT_MS = 5e3;
31
38
  function ipv4Number(address) {
32
39
  return address.split(".").reduce((value, octet) => value * 256 + Number(octet), 0);
33
40
  }
@@ -64,25 +71,98 @@ async function resolvePublicAddress(hostname) {
64
71
  if (!host.includes(".") || !/^[a-z0-9.-]+$/.test(host) || /(?:^|\.)(?:localhost|local|internal|home|lan|test|invalid|example)$/.test(host) || host.split(".").some((label) => !label || label.startsWith("-") || label.endsWith("-"))) {
65
72
  throw new Error("Capture requires a public hostname");
66
73
  }
74
+ const answers = await resolveIPv4(host);
75
+ const first = answers[0];
76
+ if (!first || !answers.every(isPublicIPv4)) {
77
+ throw new Error("Capture DNS returned a non-public address");
78
+ }
79
+ return first;
80
+ }
81
+ async function resolveIPv4(host) {
82
+ const fromHostsFile = (await hostsFileAnswers()).get(host);
83
+ if (fromHostsFile) return fromHostsFile;
84
+ const deadline = Date.now() + DNS_TIMEOUT_MS;
85
+ const fromSystem = systemAnswers.get(host);
86
+ if (fromSystem) return beforeDeadline(fromSystem, deadline);
87
+ return resolveWithCares(host).catch(
88
+ () => beforeDeadline(systemLookupInKillableChild(host, deadline - Date.now()), deadline)
89
+ );
90
+ }
91
+ var hostsFile;
92
+ function hostsFileAnswers() {
93
+ const path = process.platform === "win32" ? `${process.env.SystemRoot ?? "C:\\Windows"}\\System32\\drivers\\etc\\hosts` : "/etc/hosts";
94
+ hostsFile ??= readFile(path, "utf8").then(parseHostsFile, () => /* @__PURE__ */ new Map());
95
+ return hostsFile;
96
+ }
97
+ function parseHostsFile(text) {
98
+ const answers = /* @__PURE__ */ new Map();
99
+ for (const line of text.split(/\r?\n/)) {
100
+ const [address, ...names] = line.replace(/#.*/, "").trim().split(/\s+/);
101
+ if (!address || isIP(address) !== 4) continue;
102
+ for (const name of names) {
103
+ const key = name.toLowerCase().replace(/\.$/, "");
104
+ answers.set(key, [...answers.get(key) ?? [], address]);
105
+ }
106
+ }
107
+ return answers;
108
+ }
109
+ function beforeDeadline(work, deadline) {
67
110
  let timer;
111
+ const late = new Promise((_resolve, reject) => {
112
+ timer = setTimeout(
113
+ () => reject(new Error("Capture DNS timed out")),
114
+ Math.max(0, deadline - Date.now())
115
+ );
116
+ });
117
+ return Promise.race([work, late]).finally(() => clearTimeout(timer));
118
+ }
119
+ async function resolveWithCares(host) {
120
+ const cancellableResolver = new dns.Resolver();
121
+ const timer = setTimeout(() => cancellableResolver.cancel(), CARES_TIMEOUT_MS);
68
122
  try {
69
- const answers = await Promise.race([
70
- lookup(host, { all: true, family: 4, verbatim: true }),
71
- new Promise((_resolve, reject) => {
72
- timer = setTimeout(() => reject(new Error("Capture DNS timed out")), 1e4);
73
- timer.unref();
74
- })
75
- ]);
76
- if (!answers[0] || answers.some((answer) => answer.family !== 4 || !isPublicIPv4(answer.address))) {
77
- throw new Error("Capture DNS returned a non-public address");
78
- }
79
- const first = answers[0];
80
- if (!first) throw new Error("Capture DNS returned no address");
81
- return first.address;
123
+ return await cancellableResolver.resolve4(host);
82
124
  } finally {
83
125
  clearTimeout(timer);
84
126
  }
85
127
  }
128
+ var systemAnswers = /* @__PURE__ */ new Map();
129
+ var SYSTEM_LOOKUP = `require("node:dns").lookup(process.argv[1], { all: true, family: 4 }, (error, answers) =>
130
+ error ? process.stderr.write(String(error.code)) : process.stdout.write(JSON.stringify(answers.map((a) => a.address))))`;
131
+ var liveLookups = /* @__PURE__ */ new Set();
132
+ function systemLookupInKillableChild(host, timeoutMs) {
133
+ if (!process.listeners("exit").includes(killLiveLookups)) process.on("exit", killLiveLookups);
134
+ const answers = new Promise((resolve, reject) => {
135
+ const child = execFile(
136
+ process.execPath,
137
+ ["-e", SYSTEM_LOOKUP, host],
138
+ {
139
+ timeout: Math.max(1, timeoutMs),
140
+ killSignal: "SIGKILL",
141
+ windowsHide: true,
142
+ env: { ...process.env, NODE_OPTIONS: "" }
143
+ },
144
+ (error, stdout, stderr) => {
145
+ if (error?.killed) reject(new Error("Capture DNS timed out"));
146
+ else if (!stdout) reject(new Error(`Capture DNS failed: ${stderr || error?.message}`));
147
+ else {
148
+ try {
149
+ resolve(JSON.parse(stdout));
150
+ } catch (parseError) {
151
+ reject(parseError);
152
+ }
153
+ }
154
+ }
155
+ );
156
+ liveLookups.add(child);
157
+ child.once("exit", () => liveLookups.delete(child));
158
+ });
159
+ systemAnswers.set(host, answers);
160
+ answers.catch(() => systemAnswers.delete(host));
161
+ return answers;
162
+ }
163
+ function killLiveLookups() {
164
+ for (const child of liveLookups) child.kill("SIGKILL");
165
+ }
86
166
  async function publicRequest(url, init = {}) {
87
167
  const target = new URL(url);
88
168
  if (!["http:", "https:"].includes(target.protocol) || target.username || target.password) {
@@ -245,7 +325,6 @@ function rankIconCandidates(candidates) {
245
325
  }
246
326
 
247
327
  // src/capture/iconClassifier.ts
248
- import sharp from "sharp";
249
328
  var NON_PAINTING = /* @__PURE__ */ new Set(["defs", "clippath", "mask", "style", "title", "desc", "metadata"]);
250
329
  var PAINTING = /* @__PURE__ */ new Set(["rect", "circle", "ellipse", "path", "polygon", "image", "use"]);
251
330
  function firstPaintedElement(root) {
@@ -317,6 +396,7 @@ var SAMPLE_EDGE = 32;
317
396
  async function classifyRasterIcon(buffer) {
318
397
  let data;
319
398
  let channels;
399
+ const sharp = await loadSharp("website capture");
320
400
  try {
321
401
  const raw = await sharp(buffer).resize(SAMPLE_EDGE, SAMPLE_EDGE, { fit: "fill" }).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
322
402
  data = raw.data;
@@ -399,7 +479,6 @@ function captureFontFilename(url, extension, used = /* @__PURE__ */ new Set()) {
399
479
  }
400
480
 
401
481
  // src/capture/captureImageValidation.ts
402
- import sharp2 from "sharp";
403
482
  import { parse, walk } from "css-tree";
404
483
  var SVG_ELEMENTS = new Set(
405
484
  "svg g defs title desc metadata path rect circle ellipse line polyline polygon text tspan textPath use symbol image clipPath mask pattern marker linearGradient radialGradient stop filter feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence style".toLowerCase().split(" ")
@@ -475,8 +554,9 @@ function validIconEntry(size, offset, directoryEnd, length) {
475
554
  async function validIconImage(bytes) {
476
555
  const png = bytes.subarray(0, 8).equals(Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]));
477
556
  if (!png) return validIconBitmap(bytes);
557
+ const sharp = await loadSharp("website capture");
478
558
  try {
479
- await sharp2(bytes, { limitInputPixels: 65536 }).resize(1, 1).raw().toBuffer();
559
+ await sharp(bytes, { limitInputPixels: 65536 }).resize(1, 1).raw().toBuffer();
480
560
  return true;
481
561
  } catch {
482
562
  return false;
@@ -500,10 +580,11 @@ function validIconDimensions(width, height) {
500
580
  }
501
581
  async function captureImageExtension(bytes) {
502
582
  if (await validIco(bytes)) return ".ico";
583
+ const sharp = await loadSharp("website capture");
503
584
  try {
504
585
  const embedded = /* @__PURE__ */ new Set();
505
586
  if (/^\s*</.test(bytes.toString("utf8", 0, 256)) && !passiveSvg(bytes, embedded)) return null;
506
- const image = sharp2(bytes, { limitInputPixels: 4e7 });
587
+ const image = sharp(bytes, { limitInputPixels: 4e7 });
507
588
  const metadata = await image.metadata();
508
589
  if (metadata.format === "svg") {
509
590
  if (!passiveSvg(bytes, embedded) || !await validEmbeddedImages(embedded)) return null;
@@ -527,6 +608,7 @@ async function captureImageExtension(bytes) {
527
608
  }
528
609
  }
529
610
  async function validEmbeddedImages(references) {
611
+ const sharp = await loadSharp("website capture");
530
612
  let remainingBytes = 10 * 1024 * 1024;
531
613
  let remainingPixels = 4e7;
532
614
  for (const reference of references) {
@@ -537,7 +619,7 @@ async function validEmbeddedImages(references) {
537
619
  const bytes = Buffer.from(encoded, "base64");
538
620
  remainingBytes -= bytes.length;
539
621
  if (remainingBytes < 0) return false;
540
- const image = sharp2(bytes, { limitInputPixels: remainingPixels });
622
+ const image = sharp(bytes, { limitInputPixels: remainingPixels });
541
623
  const metadata = await image.metadata();
542
624
  if (metadata.format !== type || !metadata.width || !metadata.height) return false;
543
625
  const pixels = metadata.width * metadata.height * (metadata.pages ?? 1);
@@ -693,6 +775,7 @@ async function downloadDeclaredIcons(faviconLinks, outputDir, drops, options) {
693
775
  return { assets, manifest };
694
776
  }
695
777
  async function downloadAssets(tokens, outputDir, catalogedAssets, faviconLinks, options = {}) {
778
+ await loadSharp("website capture");
696
779
  options = { ...options, byteBudget: options.byteBudget ?? createCaptureDownloadBudget() };
697
780
  const assetsDir = join(outputDir, "assets");
698
781
  ensureCaptureDirSync(outputDir, assetsDir);
@@ -8,29 +8,31 @@ import {
8
8
  resolveCompositionViewportFromHtml
9
9
  } from "./chunk-FH7WODJH.js";
10
10
  import {
11
- gotoWhenSent,
12
11
  launchManagedBrowser,
13
12
  resolveManagedGpuMode,
14
13
  rethrowAfterBrowserCleanup
15
- } from "./chunk-IL3GTCQY.js";
14
+ } from "./chunk-GTE5WZAM.js";
15
+ import {
16
+ gotoWhenSent
17
+ } from "./chunk-MOEGCMKI.js";
16
18
  import {
17
19
  pageNavigationTimeoutMs,
18
20
  windowsChromeCrashRemediation
19
- } from "./chunk-XSRUVMXK.js";
21
+ } from "./chunk-B2SZZFWW.js";
20
22
  import {
21
23
  oneProcessOverPipe
22
- } from "./chunk-BRHI7EIA.js";
24
+ } from "./chunk-DKPNNYBZ.js";
23
25
  import {
24
26
  resolveLocalBrowserGpuMode,
25
27
  resolveLocalWebGpu
26
- } from "./chunk-4OT3FWVV.js";
28
+ } from "./chunk-ZFO3A3QL.js";
27
29
  import {
28
30
  c
29
31
  } from "./chunk-ZTZA4UWZ.js";
30
32
  import {
31
33
  assertWebGpuAdapterAvailable,
32
34
  compositionRequiresWebGpu
33
- } from "./chunk-YPBIAONI.js";
35
+ } from "./chunk-73LTCCZI.js";
34
36
  import {
35
37
  normalizeErrorMessage
36
38
  } from "./chunk-KNU5COPB.js";
@@ -135,15 +137,24 @@ async function waitForCompositionSettle(page, options) {
135
137
  }).catch(() => {
136
138
  console.warn(` ${c.warn("\u26A0")} Shader transitions did not finish pre-rendering`);
137
139
  });
138
- await waitForLateSubresources(page);
140
+ await waitForLateSubresources(page, options.lateSubresourceTimeoutMs ?? CAPTURE_SETTLE_MS);
141
+ const { resolveConfig, waitForImagesReady } = await import("./src-EL6HGIS4.js");
142
+ const imageTimeoutMs = resolveConfig().playerReadyTimeout;
143
+ await waitForImagesReady(
144
+ page,
145
+ imageTimeoutMs,
146
+ (sources) => console.warn(
147
+ ` ${c.warn("\u26A0")} Some images did not load within ${imageTimeoutMs}ms: ${sources}. They may show blank.`
148
+ )
149
+ );
139
150
  return runtimeReady;
140
151
  }
141
- async function waitForLateSubresources(page) {
152
+ async function waitForLateSubresources(page, timeoutMs) {
142
153
  let cap;
143
- const deadline = Date.now() + CAPTURE_SETTLE_MS;
154
+ const deadline = Date.now() + timeoutMs;
144
155
  const ready = (async () => {
145
156
  await page.waitForFunction(() => document.readyState === "complete", {
146
- timeout: CAPTURE_SETTLE_MS
157
+ timeout: timeoutMs
147
158
  });
148
159
  await page.waitForNetworkIdle({
149
160
  idleTime: NETWORK_IDLE_MS,
@@ -159,7 +170,7 @@ async function waitForLateSubresources(page) {
159
170
  await Promise.race([
160
171
  ready,
161
172
  new Promise((resolveCap) => {
162
- cap = setTimeout(resolveCap, CAPTURE_SETTLE_MS);
173
+ cap = setTimeout(resolveCap, timeoutMs);
163
174
  })
164
175
  ]);
165
176
  } catch {
@@ -176,7 +187,7 @@ async function installPageFunctionGuard(page) {
176
187
  async function openSettledCompositionPage(html, url, options) {
177
188
  const viewport = resolveCompositionViewportFromHtml(html);
178
189
  const requiresWebGpu = compositionRequiresWebGpu(html);
179
- const answer = (await import("./staticProjectServer-GYPUQGI7.js")).inProcessAnswer(url);
190
+ const answer = (await import("./staticProjectServer-EO7X7RAY.js")).inProcessAnswer(url);
180
191
  const noListen = answer !== void 0;
181
192
  let chromeBrowser;
182
193
  try {
@@ -200,10 +211,10 @@ async function openSettledCompositionPage(html, url, options) {
200
211
  }
201
212
  async function launchCompositionBrowser(html, noListen, options) {
202
213
  const viewport = resolveCompositionViewportFromHtml(html);
203
- const { ensureBrowser, findSystemBrowser } = await import("./manager-V2QCCPOJ.js");
214
+ const { ensureBrowser, findSystemBrowser } = await import("./manager-UHWEKPXC.js");
204
215
  const browser = await ensureBrowser({ signal: options.signal });
205
216
  const puppeteer = await import("puppeteer-core");
206
- const { buildChromeArgs } = await import("./src-RDSWHMJS.js");
217
+ const { buildChromeArgs } = await import("./src-EL6HGIS4.js");
207
218
  const requestedGpuMode = options.browserGpuMode ?? resolveCliChromeGpuMode();
208
219
  const requiresWebGpu = compositionRequiresWebGpu(html);
209
220
  let softwareWebGpu = false;
@@ -5,8 +5,9 @@ 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
- loadOptionalPackage
9
- } from "./chunk-3DKN5WKL.js";
8
+ loadOptionalPackage,
9
+ loadSharp
10
+ } from "./chunk-QH3T4WI2.js";
10
11
  import {
11
12
  downloadFile
12
13
  } from "./chunk-WQ6ZXHFQ.js";
@@ -14,13 +15,13 @@ import {
14
15
  findFFmpeg,
15
16
  findFFprobe,
16
17
  getFFmpegInstallHint
17
- } from "./chunk-3PULCIY5.js";
18
+ } from "./chunk-OH56PXFH.js";
18
19
  import {
19
20
  DEFAULT_VP9_CPU_USED,
20
21
  SDR_RGB_TO_BT709_FILTER,
21
22
  SDR_RGB_TO_TAGGED_BT709_FILTER,
22
23
  renderProvenanceArgs
23
- } from "./chunk-YPBIAONI.js";
24
+ } from "./chunk-73LTCCZI.js";
24
25
 
25
26
  // src/background-removal/pipeline.ts
26
27
  import { spawn } from "child_process";
@@ -100,17 +101,8 @@ var INPUT_SIZE = 320;
100
101
  var INPUT_PLANE = INPUT_SIZE * INPUT_SIZE;
101
102
  var MEAN = [0.485, 0.456, 0.406];
102
103
  var STD = [0.229, 0.224, 0.225];
103
- async function loadNative(name, load) {
104
- try {
105
- return await load();
106
- } catch (err) {
107
- throw new Error(
108
- `remove-background needs the optional native module '${name}', which isn't available (${err.message}). Install it with \`npm i ${name}\`, or reinstall hyperframes with optional dependencies enabled.`
109
- );
110
- }
111
- }
112
104
  async function createSession(options = {}) {
113
- const sharp = (await loadNative("sharp", () => import("sharp"))).default;
105
+ const sharp = await loadSharp("remove-background");
114
106
  const ort = await loadOptionalPackage(
115
107
  "onnxruntime-node",
116
108
  "background removal"
@@ -270,7 +262,7 @@ function inferInputKind(inputPath) {
270
262
  }
271
263
  async function probeMedia(inputPath) {
272
264
  const isImage = inferInputKind(inputPath) === "image";
273
- const engine = await import("./src-RDSWHMJS.js");
265
+ const engine = await import("./src-EL6HGIS4.js");
274
266
  const meta = await engine.extractMediaMetadata(inputPath);
275
267
  if (isImage) {
276
268
  return { width: meta.width, height: meta.height, fps: 0, frameCount: 1 };
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getMimeType,
9
9
  injectMediaCodecMapIntoHtml
10
- } from "./chunk-JBCU6NR5.js";
10
+ } from "./chunk-NZ3BE2QE.js";
11
11
  import {
12
12
  PROXY_VARIANT_CONFIG,
13
13
  ProxyCapacityError,
@@ -18,10 +18,10 @@ import {
18
18
  recordProxyRequest,
19
19
  resolveProxy,
20
20
  resolveProxyVariantRequest
21
- } from "./chunk-KIO3R4QN.js";
21
+ } from "./chunk-GPE3WWTO.js";
22
22
  import {
23
23
  resolveAutoProxy
24
- } from "./chunk-XH262OWN.js";
24
+ } from "./chunk-K2Z5DZBS.js";
25
25
  import {
26
26
  decodeWellFormedEscapes
27
27
  } from "./chunk-BSQ7XANM.js";
@@ -183,7 +183,7 @@ async function serveStaticProjectHtml(projectDir, html, bindErrorMessage = "Fail
183
183
  const server = createServer((req, res) => {
184
184
  const url = req.url ?? "/";
185
185
  if (url === "/" || url === "/index.html") {
186
- res.writeHead(200, { "Content-Type": "text/html" });
186
+ res.writeHead(200, { "Content-Type": getMimeType("index.html") });
187
187
  res.end(servedHtml);
188
188
  return;
189
189
  }
@@ -7,7 +7,7 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  resolveConfig,
9
9
  usesSoftwareWebGpu
10
- } from "./chunk-YPBIAONI.js";
10
+ } from "./chunk-73LTCCZI.js";
11
11
 
12
12
  // src/browser/gpuPolicy.ts
13
13
  function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCER_BROWSER_GPU_MODE) {
@@ -17,7 +17,7 @@ function resolveLocalBrowserGpuMode(browserGpuArg, envMode = process.env.PRODUCE
17
17
  return "auto";
18
18
  }
19
19
  async function resolveCaptureBrowserGpuMode(requestedMode, chromePath, probeLifecycle) {
20
- const { resolveBrowserGpuMode } = await import("./src-RDSWHMJS.js");
20
+ const { resolveBrowserGpuMode } = await import("./src-EL6HGIS4.js");
21
21
  return resolveBrowserGpuMode(requestedMode, { chromePath, probeLifecycle });
22
22
  }
23
23
  function resolveLocalWebGpu(browserGpuMode, requiresWebGpu) {