hyperframes 0.8.181 → 0.8.184

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 (218) hide show
  1. package/bin/hyperframes.mjs +3 -1
  2. package/dist/{add-AWQ2EGBU.js → add-5ZTD3MUZ.js} +22 -22
  3. package/dist/{animatedGifPrep-SENXJ7TN.js → animatedGifPrep-AGASIWVA.js} +14 -13
  4. package/dist/api.js +29 -28
  5. package/dist/{asset-XBH3MN3Y.js → asset-LSTEMPIB.js} +3 -3
  6. package/dist/{assetCataloger-KH4X2CRO.js → assetCataloger-BKBMNL3A.js} +16 -13
  7. package/dist/{audio-Q7I473UN.js → audio-KGK44XE4.js} +31 -30
  8. package/dist/{auth-I7CBTEUS.js → auth-MJWKYK77.js} +4 -4
  9. package/dist/{autoUpdate-KY5TLSN7.js → autoUpdate-2GGDKYR2.js} +2 -2
  10. package/dist/{backgroundChecks-4Q3VVK5W.js → backgroundChecks-7GRX5VQY.js} +3 -3
  11. package/dist/backgroundChecksWorker.js +3 -3
  12. package/dist/{batchRender-3AYDQRBI.js → batchRender-BCV2LELR.js} +7 -7
  13. package/dist/{beats-P4LENNVT.js → beats-7BCFRBAL.js} +12 -12
  14. package/dist/{benchmark-AXOAECN3.js → benchmark-2R6CN5MQ.js} +24 -24
  15. package/dist/{browser-XZKB5HGJ.js → browser-6AFGOI7G.js} +20 -20
  16. package/dist/{bundleWithLocalizedFonts-2WCR57IN.js → bundleWithLocalizedFonts-2EGPA5ZO.js} +2 -2
  17. package/dist/{capture-NWARHRHR.js → capture-HA2UHLIU.js} +8 -5
  18. package/dist/{capture-4RN4APDF.js → capture-HOIAW6MO.js} +50 -41
  19. package/dist/{captureCompositionFrame-QOF5BRF4.js → captureCompositionFrame-4236FVWJ.js} +22 -20
  20. package/dist/{captureTimeout-K2JNVVCI.js → captureTimeout-RIMG6IYH.js} +1 -1
  21. package/dist/{catalog-CRPOPVD5.js → catalog-A6CZAWW4.js} +42 -42
  22. package/dist/{catch-up-MHWGUQ42.js → catch-up-TNA4DJOA.js} +15 -15
  23. package/dist/check-5E5U2EQZ.js +117 -0
  24. package/dist/checkBrowser-FNINXBMZ.js +118 -0
  25. package/dist/{chunk-OJTDUF4W.js → chunk-2PVE4WS2.js} +1 -1
  26. package/dist/{checkBrowser-VES2NF3K.js → chunk-2ULXZ4PG.js} +187 -114
  27. package/dist/{chunk-WITHUCCB.js → chunk-2XA7KXQO.js} +2 -2
  28. package/dist/{chunk-HODBPO4A.js → chunk-3MDJIWOV.js} +626 -328
  29. package/dist/{chunk-JBCU6NR5.js → chunk-3QVMJ7GX.js} +56 -55
  30. package/dist/{chunk-OR5WCFWZ.js → chunk-3TXNNBI2.js} +2 -2
  31. package/dist/{chunk-IZM562YJ.js → chunk-4KKKBEP3.js} +4 -4
  32. package/dist/{chunk-XEWHUPFS.js → chunk-4N4P3ZWL.js} +2 -2
  33. package/dist/{chunk-537IYAEE.js → chunk-4UMPIPCQ.js} +9 -1
  34. package/dist/{chunk-J4L5TPLS.js → chunk-5UDRPPN2.js} +48 -6
  35. package/dist/{chunk-L3YOGIPG.js → chunk-66LREXGS.js} +1 -1
  36. package/dist/{chunk-6I7V6Q7F.js → chunk-74JMKLVU.js} +103 -20
  37. package/dist/{chunk-3PULCIY5.js → chunk-7HJALUIO.js} +5 -5
  38. package/dist/{chunk-GZVP4TWN.js → chunk-7JAD4MEW.js} +1 -1
  39. package/dist/{chunk-NAMGMP3R.js → chunk-7KVVNF7B.js} +1 -1
  40. package/dist/{chunk-TO6JNTML.js → chunk-7MB2ZAQF.js} +13 -8
  41. package/dist/{chunk-55IG255C.js → chunk-7NRI7HYX.js} +1 -1
  42. package/dist/{chunk-VAJIPSN6.js → chunk-ABZYYUUH.js} +1 -1
  43. package/dist/{chunk-GK2FIKIQ.js → chunk-ADDHW2FS.js} +214 -37
  44. package/dist/{chunk-ZUOSILUE.js → chunk-BCHSTE7U.js} +1 -1
  45. package/dist/{chunk-AOWDVB2T.js → chunk-CXABAXB3.js} +1 -1
  46. package/dist/{chunk-E24HSMZV.js → chunk-CYBXXSC4.js} +65 -14
  47. package/dist/{chunk-NZZYJOMJ.js → chunk-CZUAX3BV.js} +6 -5
  48. package/dist/{chunk-GV5R5B7Q.js → chunk-DGECWPTL.js} +1 -1
  49. package/dist/{chunk-BRHI7EIA.js → chunk-DKPNNYBZ.js} +4 -0
  50. package/dist/{chunk-UIDZRCBG.js → chunk-DWUGKEHR.js} +1 -1
  51. package/dist/{chunk-D3ZWBHZP.js → chunk-DYAPHNV6.js} +3 -2
  52. package/dist/{chunk-T7UHTUUE.js → chunk-E32ZQ2WO.js} +9 -9
  53. package/dist/{chunk-RGHQID2E.js → chunk-EHSBBBR2.js} +5 -3
  54. package/dist/{chunk-DJJ7SK4F.js → chunk-EM7C7H7S.js} +8 -8
  55. package/dist/{chunk-XSRUVMXK.js → chunk-ES426XRJ.js} +4 -4
  56. package/dist/chunk-FG4BBFZI.js +122 -0
  57. package/dist/{chunk-JMFJI26U.js → chunk-FGJEUV4S.js} +2 -2
  58. package/dist/{check-DJCUOUDI.js → chunk-GDEV42FA.js} +198 -142
  59. package/dist/{chunk-RXQHSGAQ.js → chunk-HR23IKLZ.js} +2 -2
  60. package/dist/{chunk-KMAAOHLO.js → chunk-HRPWRZGF.js} +1 -1
  61. package/dist/{chunk-UPFUC4DB.js → chunk-HTIUNMTP.js} +1 -1
  62. package/dist/{chunk-V2UNZ7QP.js → chunk-ICJEAFPD.js} +25 -14
  63. package/dist/{chunk-EOADENKV.js → chunk-IWTNTUPQ.js} +16 -14
  64. package/dist/chunk-IZCW2NKT.js +29 -0
  65. package/dist/{chunk-XFCLWWL3.js → chunk-J36JVBLR.js} +11 -4
  66. package/dist/{chunk-LBQFLUIY.js → chunk-J3QM7AHP.js} +9 -49
  67. package/dist/{chunk-DUN63LHY.js → chunk-JB6ARMQS.js} +2 -2
  68. package/dist/{chunk-5E5EYPZO.js → chunk-JIUTXKWA.js} +7 -7
  69. package/dist/{chunk-YJDB4FLT.js → chunk-JQYJXUJW.js} +1 -1
  70. package/dist/{chunk-PBN6GBJE.js → chunk-JVBRJMOP.js} +14 -1
  71. package/dist/{chunk-RHWJKSGH.js → chunk-KANNRHY7.js} +1 -1
  72. package/dist/{chunk-IL3GTCQY.js → chunk-KN46TGHV.js} +72 -140
  73. package/dist/{chunk-OFY6JTZC.js → chunk-LLC4CS6I.js} +2 -2
  74. package/dist/{chunk-OJDXABUF.js → chunk-LRGYPXHF.js} +2 -2
  75. package/dist/{chunk-GNE57O7U.js → chunk-MFAETWIF.js} +1 -1
  76. package/dist/{chunk-32GKETR7.js → chunk-MMQ52NIZ.js} +74 -0
  77. package/dist/chunk-MOEGCMKI.js +180 -0
  78. package/dist/{chunk-E6RPWJVC.js → chunk-NAUKCKCJ.js} +5 -1
  79. package/dist/{chunk-B4VT6YU2.js → chunk-OLZENUPI.js} +50 -7
  80. package/dist/{chunk-H4YZZ2VQ.js → chunk-PFD25NAC.js} +1 -1
  81. package/dist/{chunk-XH262OWN.js → chunk-PFYWVUHA.js} +1 -1
  82. package/dist/{chunk-S3RYRF3W.js → chunk-PSKEKWVU.js} +1 -1
  83. package/dist/{chunk-N5SXQCJL.js → chunk-Q33P4EAC.js} +3 -3
  84. package/dist/{chunk-3DKN5WKL.js → chunk-QH3T4WI2.js} +77 -6
  85. package/dist/{chunk-O5AE7HOP.js → chunk-QL2PNIXC.js} +37 -33
  86. package/dist/{chunk-WUUCEFL5.js → chunk-R2BFTECP.js} +5 -5
  87. package/dist/chunk-R2SQBPMH.js +3805 -0
  88. package/dist/{chunk-YPBIAONI.js → chunk-RGXVEYHI.js} +230 -162
  89. package/dist/{chunk-YMS6CJCD.js → chunk-SAX7HQ5E.js} +1 -1
  90. package/dist/{chunk-KIO3R4QN.js → chunk-SN7KI5JA.js} +27 -14
  91. package/dist/{chunk-4USWWI2Y.js → chunk-TE427YID.js} +2 -2
  92. package/dist/{chunk-ICMXC3MI.js → chunk-U6RXZNZE.js} +31 -18
  93. package/dist/{chunk-X7CCSMRR.js → chunk-UJKUB2LH.js} +16 -16
  94. package/dist/{chunk-K26FR4SM.js → chunk-UKOTVJFV.js} +12 -12
  95. package/dist/{chunk-4OT3FWVV.js → chunk-UNNXFKVG.js} +2 -2
  96. package/dist/{chunk-PF7OWVTL.js → chunk-VDM3FEDP.js} +2 -2
  97. package/dist/{chunk-Y5GY6Y7A.js → chunk-VNVQGDPC.js} +2 -2
  98. package/dist/{chunk-22QHO26F.js → chunk-W64L7IFS.js} +1 -1
  99. package/dist/{chunk-Y2RXRPL2.js → chunk-WHPN2TIT.js} +5 -5
  100. package/dist/{chunk-65WIUIHL.js → chunk-WTFUDNW2.js} +7 -15
  101. package/dist/{chunk-3XDOGSRD.js → chunk-X3CG5YQA.js} +3 -3
  102. package/dist/{chunk-UZOZ2W2E.js → chunk-XGHHVYC7.js} +96 -34
  103. package/dist/{chunk-4IEH6EAC.js → chunk-YALM6XN4.js} +203 -58
  104. package/dist/{chunk-B6JLCPT3.js → chunk-YOZPQCSR.js} +6 -6
  105. package/dist/{chunk-5JMZLQT6.js → chunk-YWHCXIMD.js} +16 -16
  106. package/dist/{chunk-UVEQLDKB.js → chunk-YWNJTZGN.js} +3 -2
  107. package/dist/{chunk-WUQUR33W.js → chunk-ZOCHDXDG.js} +1 -1
  108. package/dist/{chunk-IWTRHPTP.js → chunk-ZRHO6YMM.js} +8 -8
  109. package/dist/{clean-GJNDVVDI.js → clean-HGASSMWI.js} +41 -40
  110. package/dist/cli.js +68 -64
  111. package/dist/{cloud-JCWNMKXC.js → cloud-JPDVNXHN.js} +4 -4
  112. package/dist/{cloudrun-2BKGY53X.js → cloudrun-AMMGSDRP.js} +8 -8
  113. package/dist/commands/layout-audit.browser.js +15 -4
  114. package/dist/commands/motion-signature.browser.js +52 -0
  115. package/dist/{compare-XWM7FAYM.js → compare-LHHVHUN3.js} +51 -47
  116. package/dist/{compiler-U3W6CJW7.js → compiler-Q3N6QXMT.js} +6 -6
  117. package/dist/{component-CBRAE325.js → component-D72J32Q7.js} +4 -4
  118. package/dist/{compositions-EZYJEHQ3.js → compositions-UQRJ5ROG.js} +29 -29
  119. package/dist/{contactSheet-27SRU7A4.js → contactSheet-CAGMKI3E.js} +3 -1
  120. package/dist/{delete-JWWMOITI.js → delete-P42VIDDA.js} +9 -9
  121. package/dist/{deploy-UGOV76OH.js → deploy-WZTH57O4.js} +11 -11
  122. package/dist/{destroy-QBLMYDBF.js → destroy-4B5HW5FH.js} +5 -5
  123. package/dist/{deterministicFonts-L7YEEFGI.js → deterministicFonts-VQ5UBMXY.js} +2 -2
  124. package/dist/{dist-VO7OXOFK.js → dist-DYS24AMA.js} +5 -5
  125. package/dist/{dist-2FMTAVGL.js → dist-SENYPQGW.js} +4 -4
  126. package/dist/{docs-MPOM3PHH.js → docs-UEWLIP6D.js} +1 -1
  127. package/dist/{doctor-XSKSZRR7.js → doctor-KEJIG2SK.js} +28 -27
  128. package/dist/{events-RGS4MAH4.js → events-CYKSNR7N.js} +6 -6
  129. package/dist/{events-AIZODZMP.js → events-UZXFQPMT.js} +9 -9
  130. package/dist/{feedback-GE3VDZOH.js → feedback-LXNQF7CA.js} +35 -35
  131. package/dist/{ffmpeg-SCXZTR6X.js → ffmpeg-BYHON577.js} +16 -15
  132. package/dist/{figma-3R4XST4Y.js → figma-EIQ35PS6.js} +3 -3
  133. package/dist/fontLocalizeCli.js +24 -23
  134. package/dist/{get-4FKJP6IM.js → get-CC2YL7QO.js} +9 -9
  135. package/dist/{gpuPolicy-4NNXESM7.js → gpuPolicy-VFSACUQV.js} +14 -13
  136. package/dist/{grade-compare-FAYVPXUR.js → grade-compare-TUQL7IV2.js} +56 -50
  137. package/dist/{help-C3UQMYXK.js → help-ROROO5K6.js} +1 -1
  138. package/dist/{history-LDGQ2IZJ.js → history-PNELYLXX.js} +15 -15
  139. package/dist/hyperframe.manifest.json +1 -1
  140. package/dist/hyperframe.runtime.iife.js +59 -59
  141. package/dist/hyperframes-player.global.js +8 -3
  142. package/dist/{info-KMXFLD3Q.js → info-4FZTH6AS.js} +20 -20
  143. package/dist/{init-D7GYHSX5.js → init-I43GHHVP.js} +69 -68
  144. package/dist/{inspect-CUKWHCGS.js → inspect-IT4TYIZ3.js} +46 -44
  145. package/dist/{installer-EPRSH6QI.js → installer-CWOJVK5K.js} +7 -7
  146. package/dist/{keyframes-XCUPHBW3.js → keyframes-3FBOGVD4.js} +16 -16
  147. package/dist/{lambda-IMORFJHN.js → lambda-H3V32I7M.js} +15 -15
  148. package/dist/{layout-JD2IOBMS.js → layout-BZ5LYJ5C.js} +46 -44
  149. package/dist/{lint-FHLER36Y.js → lint-ZTNSGP2S.js} +23 -23
  150. package/dist/{lintProject-ARKJXDQF.js → lintProject-C2ONSH2U.js} +4 -4
  151. package/dist/{list-MGCFG5MA.js → list-XM4GWJYY.js} +10 -10
  152. package/dist/{login-QX6M4UTR.js → login-H6HYKMWX.js} +7 -7
  153. package/dist/{logout-DKJANASY.js → logout-DDC4QLVK.js} +3 -3
  154. package/dist/{manager-IETAVBZS.js → manager-TWVDSJXO.js} +17 -16
  155. package/dist/{manager-V2QCCPOJ.js → manager-UHWEKPXC.js} +8 -3
  156. package/dist/{media-treatment-MDAQRITV.js → media-treatment-N7MY5NXB.js} +34 -33
  157. package/dist/{media-use-4XXGABIL.js → media-use-JBN57JE3.js} +1 -1
  158. package/dist/{models-NZAOSI5A.js → models-WEMIMYBD.js} +25 -24
  159. package/dist/{motionShot-6ZDUM2K4.js → motionShot-RHICTVPU.js} +29 -26
  160. package/dist/{normalize-audio-7PRYX6QM.js → normalize-audio-ZFUZCJE3.js} +12 -12
  161. package/dist/{open-I254NY5J.js → open-IBJ4FL3G.js} +24 -24
  162. package/dist/{parakeetRunner-TL3TOGUS.js → parakeetRunner-XXO4WSLR.js} +26 -25
  163. package/dist/{pipeline-YPERVOQM.js → pipeline-6ML3LUVK.js} +19 -18
  164. package/dist/{play-MYI7BYKS.js → play-RV4NAVF5.js} +40 -38
  165. package/dist/{policies-5NTZOHJA.js → policies-XXNGXWHV.js} +1 -1
  166. package/dist/{preflight-HRCSZ52D.js → preflight-R3DEFMLA.js} +19 -18
  167. package/dist/{present-WYXQDV4Q.js → present-5TBJGE6B.js} +34 -33
  168. package/dist/{preview-535HTWQO.js → preview-FLKZ5CXJ.js} +56 -55
  169. package/dist/{producer-C76CRJ5O.js → producer-7XYSPVKH.js} +1 -1
  170. package/dist/{progress-I37JB7R4.js → progress-NHJIHAAG.js} +2 -2
  171. package/dist/{projectConfig-5QCNTGQT.js → projectConfig-TBU2VWZX.js} +9 -9
  172. package/dist/{publication-2QT7VVE2.js → publication-CWWUJYJ5.js} +5 -5
  173. package/dist/{publish-53EBL7OO.js → publish-FSNE4FEB.js} +28 -27
  174. package/dist/{refresh-MGCVWX56.js → refresh-RXTOPRBB.js} +3 -3
  175. package/dist/{remove-background-OBYHMPD4.js → remove-background-MDFWRWCT.js} +32 -31
  176. package/dist/render-DBGQZAZT.js +1516 -0
  177. package/dist/{render-3MELF6Y3.js → render-F4JQ553X.js} +102 -96
  178. package/dist/{render-75CRB3BW.js → render-LWZKXCLY.js} +8 -8
  179. package/dist/{render-batch-CEVWUYBP.js → render-batch-PU7NMLIJ.js} +8 -8
  180. package/dist/renderSetupWorker.js +12 -9
  181. package/dist/{resolver-4ICE2AT6.js → resolver-RUBGFXPC.js} +7 -7
  182. package/dist/{screenshotCapture-HXEZ3TNJ.js → screenshotCapture-UBY6TT75.js} +33 -6
  183. package/dist/{sherpa-L4UACXT3.js → sherpa-X2TBNO6P.js} +25 -24
  184. package/dist/{sites-3ZBYB5X4.js → sites-MAVH57MO.js} +2 -2
  185. package/dist/skills/hyperframes/references/review-loop.md +1 -1
  186. package/dist/{skills-DXTQPCAO.js → skills-WHKMWO2D.js} +17 -17
  187. package/dist/{skillsUpdateCheck-ULXRGLDU.js → skillsUpdateCheck-XQGZGJJG.js} +3 -3
  188. package/dist/{snapshot-PWFHQU5E.js → snapshot-M4NUUSNU.js} +73 -71
  189. package/dist/{src-RDSWHMJS.js → src-4UYM2K3S.js} +34 -26
  190. package/dist/{src-S7NVL5VF.js → src-6MSC62U2.js} +23 -19
  191. package/dist/{state-KAXGHF77.js → state-ORRPOLMQ.js} +2 -2
  192. package/dist/{staticProjectServer-GYPUQGI7.js → staticProjectServer-ERDTFP45.js} +21 -20
  193. package/dist/{status-BV7QAUQD.js → status-CM7IQTU2.js} +6 -6
  194. package/dist/studio/assets/{hyperframes-player-DcD3NXpX.js → hyperframes-player-DEncBxR7.js} +7 -2
  195. package/dist/studio/assets/{index-CFrZAwKo.js → index-BABXr78Q.js} +4 -4
  196. package/dist/studio/assets/{index-BIDKYk0h.js → index-Cc22mgvY.js} +1 -1
  197. package/dist/studio/index.html +1 -1
  198. package/dist/{studio-api-IXGX5ZFI.js → studio-api-SAKD3VKC.js} +18 -17
  199. package/dist/{studioServer-LA5Z7RSS.js → studioServer-IRI7EVOM.js} +91 -84
  200. package/dist/{telemetry-STEMAMAX.js → telemetry-F4XADVAF.js} +10 -10
  201. package/dist/{telemetry-CQYHCCPL.js → telemetry-QG5AANZ4.js} +1 -1
  202. package/dist/{timeline-KLD24EN6.js → timeline-5I444RRE.js} +42 -41
  203. package/dist/{tokens-ICLORAA4.js → tokens-LRRYM35A.js} +3 -3
  204. package/dist/{transcribe-A6IKK7VS.js → transcribe-44XDFNVU.js} +48 -47
  205. package/dist/{transcribe-CTHZLRXF.js → transcribe-WHYHWAB2.js} +20 -19
  206. package/dist/{tts-EDK3QS7M.js → tts-A2WILYGN.js} +6 -6
  207. package/dist/{updateCheck-FHCAAAXA.js → updateCheck-7CPH3CAZ.js} +2 -2
  208. package/dist/{upgrade-7EV4F2R7.js → upgrade-WW4GQ2RI.js} +3 -3
  209. package/dist/{urlDownloader-MIMGVASJ.js → urlDownloader-OHLLP45A.js} +13 -12
  210. package/dist/{validate-LZF46W3V.js → validate-VNCDH2LW.js} +40 -38
  211. package/dist/{video-ZC47NFOL.js → video-5OHTLL2D.js} +17 -14
  212. package/dist/warmCheck.js +228 -0
  213. package/dist/warmCheckClient.js +139 -0
  214. package/package.json +4 -2
  215. package/dist/chunk-BAZ5LCR3.js +0 -3805
  216. package/dist/hyperframe-runtime.js +0 -1125
  217. package/dist/render-5BXTEEG7.js +0 -719
  218. package/dist/{synthesize-I2C24XJ5.js → synthesize-PKTB5ATG.js} +1 -1
@@ -37,7 +37,7 @@ import {
37
37
  stripEmbeddedRuntimeScripts,
38
38
  styleElementsFor,
39
39
  warnUnknownEnumValues
40
- } from "./chunk-BAZ5LCR3.js";
40
+ } from "./chunk-R2SQBPMH.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() {
@@ -693,21 +690,72 @@ function scopeCssToComposition(css, compositionId, scopeSelectorOverride, author
693
690
  if (!css || !trimmedCompositionId)
694
691
  return css;
695
692
  const scope = scopeSelectorOverride || `[data-composition-id="${escapeCssAttributeValue2(trimmedCompositionId)}"]`;
696
- let root;
693
+ const root = parseCss(css);
694
+ return root ? scopeParsedCss(root, scope, trimmedCompositionId, authoredRootId, options) : "";
695
+ }
696
+ function parseCss(css) {
697
697
  try {
698
- root = postcss.parse(css);
698
+ return postcss.parse(css);
699
699
  } catch {
700
- return "";
700
+ return null;
701
701
  }
702
+ }
703
+ function forEachScopedRule(root, visit) {
702
704
  root.walkRules((rule) => {
703
705
  if (isInsideGlobalAtRule(rule))
704
706
  return;
705
707
  if (isNestedInsideAnotherRule(rule))
706
708
  return;
707
- rule.selectors = rule.selectors.map((selector) => scopeSelector(selector, scope, trimmedCompositionId, authoredRootId, options?.compoundAuthoredRoot, options?.scopeRootSelectors));
709
+ visit(rule);
710
+ });
711
+ }
712
+ function scopeParsedCss(root, scope, compositionId, authoredRootId, options) {
713
+ forEachScopedRule(root, (rule) => {
714
+ rule.selectors = rule.selectors.map((selector) => scopeSelector(selector, scope, compositionId, authoredRootId, options?.compoundAuthoredRoot, options?.scopeRootSelectors));
708
715
  });
709
716
  return root.toResult({ map: false }).css;
710
717
  }
718
+ var PLACEHOLDER_ID = "hf-scope-placeholder";
719
+ var PLACEHOLDER_SCOPE = `[data-composition-id="${PLACEHOLDER_ID}"]`;
720
+ var PLAIN_ID = /^[\w.:-]+$/;
721
+ var PLAIN_SCOPE = /^\[data-composition-id="([\w.:-]+)"\]$/;
722
+ function createCompositionCssScoper() {
723
+ const templates = /* @__PURE__ */ new Map();
724
+ return (css, compositionId, scopeSelectorOverride, authoredRootId, options) => {
725
+ const trimmedId = compositionId.trim();
726
+ const scope = scopeSelectorOverride ?? "";
727
+ const scopeId = PLAIN_SCOPE.exec(scope)?.[1];
728
+ if (!scopeId || scopeId === trimmedId || !PLAIN_ID.test(trimmedId) || trimmedId === PLACEHOLDER_ID)
729
+ return scopeCssToComposition(css, compositionId, scopeSelectorOverride, authoredRootId, options);
730
+ const key = JSON.stringify([
731
+ trimmedId,
732
+ authoredRootId ?? null,
733
+ Boolean(options?.compoundAuthoredRoot),
734
+ Boolean(options?.scopeRootSelectors),
735
+ css
736
+ ]);
737
+ let template = templates.get(key);
738
+ if (template === void 0) {
739
+ template = scopeTemplate(css, trimmedId, authoredRootId, options);
740
+ templates.set(key, template);
741
+ }
742
+ return template === null ? scopeCssToComposition(css, compositionId, scopeSelectorOverride, authoredRootId, options) : template.split(PLACEHOLDER_SCOPE).join(scope);
743
+ };
744
+ }
745
+ function scopeTemplate(css, compositionId, authoredRootId, options) {
746
+ if (css.includes(PLACEHOLDER_SCOPE))
747
+ return null;
748
+ if (!css)
749
+ return css;
750
+ const root = parseCss(css);
751
+ if (!root)
752
+ return "";
753
+ let rawSelector = false;
754
+ forEachScopedRule(root, (rule) => {
755
+ rawSelector ||= Boolean(rule.raws.selector);
756
+ });
757
+ return rawSelector ? null : scopeParsedCss(root, PLACEHOLDER_SCOPE, compositionId, authoredRootId, options);
758
+ }
711
759
  function isFontFaceAtRule(node) {
712
760
  return node.type === "atrule" && node.name.toLowerCase() === "font-face";
713
761
  }
@@ -1593,6 +1641,7 @@ function ensureExternalLinkTag(doc, link) {
1593
1641
  if (!hasSameLink(doc, el))
1594
1642
  doc.head.appendChild(el);
1595
1643
  }
1644
+ var isDocument = (node) => node.nodeType === 9;
1596
1645
  function defaultBuildScopeSelector(compId) {
1597
1646
  const escaped = compId.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
1598
1647
  return `[data-composition-id="${escaped}"]`;
@@ -1610,6 +1659,22 @@ function inlineSubCompositions(document, hosts, options) {
1610
1659
  const externalLinks = [];
1611
1660
  const variablesByComp = {};
1612
1661
  const svgIdScopes = [];
1662
+ const parsed = /* @__PURE__ */ new Map();
1663
+ const parseOnce = (html) => {
1664
+ let doc = parsed.get(html);
1665
+ if (!doc) {
1666
+ doc = parseHtml(html);
1667
+ parsed.set(html, doc);
1668
+ }
1669
+ return doc;
1670
+ };
1671
+ const parseCopy = (html) => {
1672
+ const copy = parseOnce(html).cloneNode(true);
1673
+ return isDocument(copy) ? copy : parseHtml(html);
1674
+ };
1675
+ const usability = /* @__PURE__ */ new Map();
1676
+ const sheetsWithAssetUrls = /* @__PURE__ */ new Map();
1677
+ const scopeCssToComposition2 = createCompositionCssScoper();
1613
1678
  const sceneHosts = /* @__PURE__ */ new Map();
1614
1679
  const queue = hosts.map((element) => ({
1615
1680
  element,
@@ -1622,7 +1687,12 @@ function inlineSubCompositions(document, hosts, options) {
1622
1687
  if (!src)
1623
1688
  continue;
1624
1689
  const compHtml = resolveHtml(src);
1625
- const validity = checkSubCompositionUsability(compHtml, parseHtml);
1690
+ let validity = compHtml == null ? void 0 : usability.get(compHtml);
1691
+ if (!validity) {
1692
+ validity = checkSubCompositionUsability(compHtml, parseOnce);
1693
+ if (compHtml != null)
1694
+ usability.set(compHtml, validity);
1695
+ }
1626
1696
  if (!validity.ok) {
1627
1697
  onMissingComposition?.(src, validity.detail);
1628
1698
  continue;
@@ -1631,7 +1701,7 @@ function inlineSubCompositions(document, hosts, options) {
1631
1701
  onMissingComposition?.(src);
1632
1702
  continue;
1633
1703
  }
1634
- const compDoc = parseHtml(compHtml);
1704
+ const compDoc = parseCopy(compHtml);
1635
1705
  let compId;
1636
1706
  let runtimeCompId;
1637
1707
  if (hostIdentityMap) {
@@ -1647,7 +1717,7 @@ function inlineSubCompositions(document, hosts, options) {
1647
1717
  onMissingComposition?.(src);
1648
1718
  continue;
1649
1719
  }
1650
- const contentDoc = parseHtml(contentHtml);
1720
+ const contentDoc = parseCopy(contentHtml);
1651
1721
  if (!contentDoc.documentElement) {
1652
1722
  onMissingComposition?.(src);
1653
1723
  continue;
@@ -1691,8 +1761,13 @@ function inlineSubCompositions(document, hosts, options) {
1691
1761
  }
1692
1762
  const resolveSubAssetPath = (raw) => rewriteAssetPath(src, (raw || "").trim(), assetExists);
1693
1763
  const scopeSubStyle = (raw) => {
1694
- const css = rewriteCssAssetUrls(raw, src, assetExists);
1695
- return scopeCompId ? scopeCssToComposition(css, scopeCompId, runtimeScope || void 0, authoredRootId, {
1764
+ const sheetKey = JSON.stringify([src, raw]);
1765
+ let css = sheetsWithAssetUrls.get(sheetKey);
1766
+ if (css === void 0) {
1767
+ css = rewriteCssAssetUrls(raw, src, assetExists);
1768
+ sheetsWithAssetUrls.set(sheetKey, css);
1769
+ }
1770
+ return scopeCompId ? scopeCssToComposition2(css, scopeCompId, runtimeScope || void 0, authoredRootId, {
1696
1771
  compoundAuthoredRoot: compoundAuthoredRoot === true,
1697
1772
  scopeRootSelectors: true
1698
1773
  }) : css;
@@ -2349,31 +2424,45 @@ function warnAssetTooLargeToInline(assetPath, byteLength) {
2349
2424
  const mb = (byteLength / (1024 * 1024)).toFixed(1);
2350
2425
  console.warn(`[HyperFrames] Not inlining "${assetPath}" (${mb} MB exceeds the ${MAX_INLINE_ASSET_BYTES / (1024 * 1024)} MB inline limit). The bundle may not be self-contained.`);
2351
2426
  }
2352
- function maybeInlineRelativeAssetUrl(urlValue, projectDir, inlineAssets) {
2353
- if (!inlineAssets)
2354
- return null;
2355
- if (!urlValue || !isRelativeUrl(urlValue))
2356
- return null;
2357
- const { basePath, suffix } = splitUrlSuffix(urlValue.trim());
2358
- if (!basePath)
2359
- return null;
2360
- const filePath = resolveWithinProject(projectDir, decodeWellFormedEscapes(basePath));
2361
- if (!filePath)
2362
- return null;
2363
- const ext = filePath.toLowerCase().match(/\.[^.]+$/)?.[0] ?? "";
2364
- const mimeType = INLINE_MIME[ext];
2365
- if (!mimeType)
2366
- return null;
2367
- const byteLength = safeStatSize(filePath);
2368
- if (byteLength !== null && byteLength > MAX_INLINE_ASSET_BYTES) {
2369
- warnAssetTooLargeToInline(basePath, byteLength);
2370
- return null;
2371
- }
2372
- const content = safeReadFileBuffer(filePath);
2373
- if (content == null)
2374
- return null;
2375
- const dataUrl = `data:${mimeType};base64,${content.toString("base64")}`;
2376
- return appendSuffixToUrl(dataUrl, suffix);
2427
+ function createAssetInliner(resolveProjectPath, inlineAssets) {
2428
+ const assets = /* @__PURE__ */ new Map();
2429
+ const readAsset = (filePath, mimeType) => {
2430
+ const byteLength = safeStatSize(filePath);
2431
+ if (byteLength !== null && byteLength > MAX_INLINE_ASSET_BYTES)
2432
+ return { tooLarge: byteLength };
2433
+ const content = safeReadFileBuffer(filePath);
2434
+ return {
2435
+ dataUrl: content === null ? null : `data:${mimeType};base64,${content.toString("base64")}`
2436
+ };
2437
+ };
2438
+ return (urlValue) => {
2439
+ if (!inlineAssets)
2440
+ return null;
2441
+ if (!urlValue || !isRelativeUrl(urlValue))
2442
+ return null;
2443
+ const { basePath, suffix } = splitUrlSuffix(urlValue.trim());
2444
+ if (!basePath)
2445
+ return null;
2446
+ const filePath = resolveProjectPath(decodeWellFormedEscapes(basePath));
2447
+ if (!filePath)
2448
+ return null;
2449
+ const ext = filePath.toLowerCase().match(/\.[^.]+$/)?.[0] ?? "";
2450
+ const mimeType = INLINE_MIME[ext];
2451
+ if (!mimeType)
2452
+ return null;
2453
+ let asset = assets.get(filePath);
2454
+ if (asset === void 0) {
2455
+ asset = readAsset(filePath, mimeType);
2456
+ assets.set(filePath, asset);
2457
+ } else if ("dataUrl" in asset) {
2458
+ noteRead(filePath);
2459
+ }
2460
+ if ("tooLarge" in asset) {
2461
+ warnAssetTooLargeToInline(basePath, asset.tooLarge);
2462
+ return null;
2463
+ }
2464
+ return asset.dataUrl === null ? null : appendSuffixToUrl(asset.dataUrl, suffix);
2465
+ };
2377
2466
  }
2378
2467
  function isExternalSvgFragmentUse(el, attr, urlValue) {
2379
2468
  if (el.tagName.toLowerCase() !== "use")
@@ -2394,7 +2483,7 @@ function warnColorGradingLutNotInlined(lutSrc) {
2394
2483
  return;
2395
2484
  console.warn(`[HyperFrames] Could not inline color grading LUT "${trimmed}". The rendered bundle may not be self-contained.`);
2396
2485
  }
2397
- function rewriteColorGradingLutWithInlinedAssets(value, projectDir) {
2486
+ function rewriteColorGradingLutWithInlinedAssets(value, inlineAsset) {
2398
2487
  if (!value.trim().startsWith("{"))
2399
2488
  return value;
2400
2489
  let parsed;
@@ -2407,7 +2496,7 @@ function rewriteColorGradingLutWithInlinedAssets(value, projectDir) {
2407
2496
  return value;
2408
2497
  const lut = Reflect.get(parsed, "lut");
2409
2498
  if (typeof lut === "string") {
2410
- const inlined2 = maybeInlineRelativeAssetUrl(lut, projectDir, true);
2499
+ const inlined2 = inlineAsset(lut);
2411
2500
  if (!inlined2) {
2412
2501
  warnColorGradingLutNotInlined(lut);
2413
2502
  return value;
@@ -2420,7 +2509,7 @@ function rewriteColorGradingLutWithInlinedAssets(value, projectDir) {
2420
2509
  const lutSrc = Reflect.get(lut, "src");
2421
2510
  if (typeof lutSrc !== "string")
2422
2511
  return value;
2423
- const inlined = maybeInlineRelativeAssetUrl(lutSrc, projectDir, true);
2512
+ const inlined = inlineAsset(lutSrc);
2424
2513
  if (!inlined) {
2425
2514
  warnColorGradingLutNotInlined(lutSrc);
2426
2515
  return value;
@@ -2428,7 +2517,7 @@ function rewriteColorGradingLutWithInlinedAssets(value, projectDir) {
2428
2517
  Reflect.set(lut, "src", inlined);
2429
2518
  return JSON.stringify(parsed);
2430
2519
  }
2431
- function rewriteSrcsetWithInlinedAssets(srcsetValue, projectDir, inlineAssets) {
2520
+ function rewriteSrcsetWithInlinedAssets(srcsetValue, inlineAsset) {
2432
2521
  if (!srcsetValue)
2433
2522
  return srcsetValue;
2434
2523
  return srcsetValue.split(",").map((rawCandidate) => {
@@ -2438,17 +2527,17 @@ function rewriteSrcsetWithInlinedAssets(srcsetValue, projectDir, inlineAssets) {
2438
2527
  const parts = candidate.split(/\s+/);
2439
2528
  if (parts.length === 0)
2440
2529
  return candidate;
2441
- const maybeInlined = maybeInlineRelativeAssetUrl(parts[0] ?? "", projectDir, inlineAssets);
2530
+ const maybeInlined = inlineAsset(parts[0] ?? "");
2442
2531
  if (maybeInlined)
2443
2532
  parts[0] = maybeInlined;
2444
2533
  return parts.join(" ");
2445
2534
  }).join(", ");
2446
2535
  }
2447
- function rewriteCssUrlsWithInlinedAssets(cssText, projectDir, inlineAssets) {
2536
+ function rewriteCssUrlsWithInlinedAssets(cssText, inlineAsset) {
2448
2537
  if (!cssText)
2449
2538
  return cssText;
2450
2539
  return cssText.replace(/\burl\(\s*(["']?)([^)"']+)\1\s*\)/g, (_full, quote, rawUrl) => {
2451
- const maybeInlined = maybeInlineRelativeAssetUrl((rawUrl || "").trim(), projectDir, inlineAssets);
2540
+ const maybeInlined = inlineAsset((rawUrl || "").trim());
2452
2541
  if (!maybeInlined)
2453
2542
  return _full;
2454
2543
  return `url(${quote || ""}${maybeInlined}${quote || ""})`;
@@ -2715,6 +2804,7 @@ function parsesAsScript(source) {
2715
2804
  async function stripJsCommentsParserSafe(source, provenance) {
2716
2805
  if (!source)
2717
2806
  return source;
2807
+ const { transform } = await import("esbuild");
2718
2808
  try {
2719
2809
  const result = await transform(source, {
2720
2810
  loader: "js",
@@ -2790,7 +2880,17 @@ function hoistCompositionScripts(container, opts) {
2790
2880
  }
2791
2881
  function bundleToSingleHtml(projectDir, options) {
2792
2882
  const bundle = () => bundleProject(projectDir, options);
2793
- return options?.onRead ? bundleReads.run(options.onRead, bundle) : bundle();
2883
+ const onRead = options?.onRead;
2884
+ if (!onRead)
2885
+ return bundle();
2886
+ const noted = /* @__PURE__ */ new Set();
2887
+ const noteOnce = (filePath) => {
2888
+ if (noted.has(filePath))
2889
+ return;
2890
+ noted.add(filePath);
2891
+ onRead(filePath);
2892
+ };
2893
+ return bundleReads.run(noteOnce, bundle);
2794
2894
  }
2795
2895
  function readMountedSceneShell(projectDir, entryFile, entryHtml) {
2796
2896
  if (!isTemplateEntry(entryHtml))
@@ -2808,9 +2908,28 @@ async function bundleProject(projectDir, options) {
2808
2908
  const entryHtml = readFileSync(indexPath, "utf-8");
2809
2909
  const mountedShell = readMountedSceneShell(projectDir, entryFile, entryHtml);
2810
2910
  const sourceDir = mountedShell ? projectDir : dirname(indexPath);
2911
+ const safePaths = /* @__PURE__ */ new Map();
2912
+ const isSafeProjectPath = (resolved) => {
2913
+ let safe = safePaths.get(resolved);
2914
+ if (safe === void 0) {
2915
+ safe = isSafePath(projectDir, resolved);
2916
+ safePaths.set(resolved, safe);
2917
+ }
2918
+ return safe;
2919
+ };
2920
+ const entryPaths = /* @__PURE__ */ new Map();
2811
2921
  const resolveEntryPath = (relativePath) => {
2812
- const resolved = resolve2(sourceDir, relativePath);
2813
- return isSafePath(projectDir, resolved) ? resolved : null;
2922
+ let entry = entryPaths.get(relativePath);
2923
+ if (entry === void 0) {
2924
+ const resolved = resolve2(sourceDir, relativePath);
2925
+ entry = isSafeProjectPath(resolved) ? resolved : null;
2926
+ entryPaths.set(relativePath, entry);
2927
+ }
2928
+ return entry;
2929
+ };
2930
+ const resolveProjectPath = (relativePath) => {
2931
+ const resolved = resolve2(projectDir, relativePath);
2932
+ return isSafeProjectPath(resolved) ? resolved : null;
2814
2933
  };
2815
2934
  const resolveEntryUrl = (url) => resolveEntryPath(decodedUrlPath(url));
2816
2935
  const readSource = options?.stampHfIds ? ensureHfIds : (html) => html;
@@ -2861,13 +2980,23 @@ async function bundleProject(projectDir, options) {
2861
2980
  const trackedCompositionHosts = getBundledTrackedCompositionHosts(document);
2862
2981
  const hostIdentityByElement = assignBundledRuntimeCompositionIds(trackedCompositionHosts);
2863
2982
  const subCompositionHosts = trackedCompositionHosts.filter((host) => host.hasAttribute("data-composition-src"));
2983
+ const sceneSources = /* @__PURE__ */ new Map();
2864
2984
  const subCompResult = inlineSubCompositions(document, subCompositionHosts, {
2865
2985
  resolveHtml: (srcPath) => {
2866
2986
  if (!isRelativeUrl(srcPath))
2867
2987
  return null;
2868
2988
  const compPath = resolveEntryPath(srcPath);
2869
- const html = compPath ? safeReadFile(compPath) : null;
2870
- return html === null ? null : readSource(html);
2989
+ if (!compPath)
2990
+ return null;
2991
+ let source = sceneSources.get(compPath);
2992
+ if (source === void 0) {
2993
+ const html = safeReadFile(compPath);
2994
+ source = html === null ? null : readSource(html);
2995
+ sceneSources.set(compPath, source);
2996
+ } else {
2997
+ noteRead(compPath);
2998
+ }
2999
+ return source;
2871
3000
  },
2872
3001
  parseHtml: parseHTMLContent,
2873
3002
  hostIdentityMap: hostIdentityByElement,
@@ -3080,6 +3209,7 @@ async function bundleProject(projectDir, options) {
3080
3209
  deferScriptsUntilFonts(document, (el) => el.hasAttribute(RUNTIME_BOOTSTRAP_ATTR));
3081
3210
  injectTextRenderingRule(document);
3082
3211
  const inlineAssets = options?.inlineAssets !== false;
3212
+ const inlineAsset = createAssetInliner(resolveProjectPath, inlineAssets);
3083
3213
  for (const el of [...document.querySelectorAll("[src], [href], [poster], [xlink\\:href]")]) {
3084
3214
  for (const attr of ["src", "href", "poster", "xlink:href"]) {
3085
3215
  const value = el.getAttribute(attr);
@@ -3087,7 +3217,7 @@ async function bundleProject(projectDir, options) {
3087
3217
  continue;
3088
3218
  if (isExternalSvgFragmentUse(el, attr, value))
3089
3219
  continue;
3090
- const inlined = maybeInlineRelativeAssetUrl(value, projectDir, inlineAssets);
3220
+ const inlined = inlineAsset(value);
3091
3221
  if (inlined)
3092
3222
  el.setAttribute(attr, inlined);
3093
3223
  }
@@ -3095,7 +3225,7 @@ async function bundleProject(projectDir, options) {
3095
3225
  for (const el of [...document.querySelectorAll("[srcset]")]) {
3096
3226
  const srcset = el.getAttribute("srcset");
3097
3227
  if (srcset)
3098
- el.setAttribute("srcset", rewriteSrcsetWithInlinedAssets(srcset, projectDir, inlineAssets));
3228
+ el.setAttribute("srcset", rewriteSrcsetWithInlinedAssets(srcset, inlineAsset));
3099
3229
  }
3100
3230
  const liveStyles = [...document.querySelectorAll("style")].filter(isAlwaysAppliedStyle);
3101
3231
  const liveCss = liveStyles.map((el) => el.textContent || "");
@@ -3110,16 +3240,16 @@ async function bundleProject(projectDir, options) {
3110
3240
  document.head.prepend(holder);
3111
3241
  }
3112
3242
  for (const styleEl of document.querySelectorAll("style")) {
3113
- styleEl.textContent = rewriteCssUrlsWithInlinedAssets(styleEl.textContent || "", projectDir, inlineAssets);
3243
+ styleEl.textContent = rewriteCssUrlsWithInlinedAssets(styleEl.textContent || "", inlineAsset);
3114
3244
  }
3115
3245
  for (const el of [...document.querySelectorAll("[style]")]) {
3116
- el.setAttribute("style", rewriteCssUrlsWithInlinedAssets(el.getAttribute("style") || "", projectDir, inlineAssets));
3246
+ el.setAttribute("style", rewriteCssUrlsWithInlinedAssets(el.getAttribute("style") || "", inlineAsset));
3117
3247
  }
3118
3248
  if (inlineAssets && options?.inlineColorGradingLuts !== false) {
3119
3249
  for (const el of [...document.querySelectorAll(`[${HF_COLOR_GRADING_ATTR}]`)]) {
3120
3250
  const value = el.getAttribute(HF_COLOR_GRADING_ATTR);
3121
3251
  if (value) {
3122
- el.setAttribute(HF_COLOR_GRADING_ATTR, rewriteColorGradingLutWithInlinedAssets(value, projectDir));
3252
+ el.setAttribute(HF_COLOR_GRADING_ATTR, rewriteColorGradingLutWithInlinedAssets(value, inlineAsset));
3123
3253
  }
3124
3254
  }
3125
3255
  }
@@ -3159,7 +3289,22 @@ function emitRootCompositionVariableStyles(document, variablesByComp = {}, overr
3159
3289
  }
3160
3290
  function authoredDefinesPredicate(document) {
3161
3291
  const authoredCss = [...document.querySelectorAll("style:not([data-hf-composition-variables])")].map((s) => s.textContent || "").join("\n");
3162
- return (id) => new RegExp(`${cssVariableName(id)}\\s*:`).test(authoredCss);
3292
+ const defined = namesBeforeAColon(authoredCss);
3293
+ return (id) => defined.has(cssVariableName(id));
3294
+ }
3295
+ function namesBeforeAColon(css) {
3296
+ const names = /* @__PURE__ */ new Set();
3297
+ const word = /[\w-]+/g;
3298
+ const colonNext = /\s*:/y;
3299
+ for (let match = word.exec(css); match; match = word.exec(css)) {
3300
+ colonNext.lastIndex = word.lastIndex;
3301
+ if (!colonNext.test(css))
3302
+ continue;
3303
+ const text = match[0];
3304
+ for (let at = text.indexOf("--"); at !== -1; at = text.indexOf("--", at + 1))
3305
+ names.add(text.slice(at));
3306
+ }
3307
+ return names;
3163
3308
  }
3164
3309
  function makeVariableLayer(authoredDefines, overrides) {
3165
3310
  return (declared, hostValues) => {
@@ -7,16 +7,16 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  parseFeedbackRating,
9
9
  trackRenderFeedback
10
- } from "./chunk-5E5EYPZO.js";
10
+ } from "./chunk-JIUTXKWA.js";
11
11
  import {
12
12
  shouldTrack
13
- } from "./chunk-K26FR4SM.js";
14
- import {
15
- detectAgentRuntime
16
- } from "./chunk-T6AGUTZJ.js";
13
+ } from "./chunk-UKOTVJFV.js";
17
14
  import {
18
15
  c
19
16
  } from "./chunk-ZTZA4UWZ.js";
17
+ import {
18
+ detectAgentRuntime
19
+ } from "./chunk-T6AGUTZJ.js";
20
20
  import {
21
21
  readConfig,
22
22
  writeConfig
@@ -84,7 +84,7 @@ async function getDoctorSummary() {
84
84
  try {
85
85
  const [{ getSystemMeta }, { findFFmpeg }] = await Promise.all([
86
86
  import("./system-7F3UEHQT.js"),
87
- import("./ffmpeg-SCXZTR6X.js")
87
+ import("./ffmpeg-BYHON577.js")
88
88
  ]);
89
89
  const sys = getSystemMeta();
90
90
  const parts = [
@@ -16,37 +16,37 @@ import {
16
16
  } from "./chunk-5ETJX6WM.js";
17
17
  import {
18
18
  runEnvironmentChecks
19
- } from "./chunk-T7UHTUUE.js";
19
+ } from "./chunk-E32ZQ2WO.js";
20
20
  import {
21
- getAvailableMemoryMb,
22
- getFreeDiskMb,
23
- getShmSizeMb,
24
- getSystemMeta
25
- } from "./chunk-T6AGUTZJ.js";
21
+ OPTIONAL_PACKAGES,
22
+ installedOptionalPackageVersion
23
+ } from "./chunk-QH3T4WI2.js";
26
24
  import {
27
25
  defineCommand
28
26
  } from "./chunk-S3S4TGEH.js";
29
27
  import {
30
28
  c
31
29
  } from "./chunk-ZTZA4UWZ.js";
30
+ import {
31
+ resolveExtractCacheDir
32
+ } from "./chunk-RGXVEYHI.js";
33
+ import {
34
+ getAvailableMemoryMb,
35
+ getFreeDiskMb,
36
+ getShmSizeMb,
37
+ getSystemMeta
38
+ } from "./chunk-T6AGUTZJ.js";
32
39
  import {
33
40
  getUpdateMeta,
34
41
  withMeta
35
- } from "./chunk-VAJIPSN6.js";
42
+ } from "./chunk-ABZYYUUH.js";
36
43
  import {
37
44
  CONFIG_PATH,
38
45
  withFileLock
39
46
  } from "./chunk-XUXGIA7H.js";
40
47
  import {
41
48
  VERSION
42
- } from "./chunk-XEWHUPFS.js";
43
- import {
44
- OPTIONAL_PACKAGES,
45
- installedOptionalPackageVersion
46
- } from "./chunk-3DKN5WKL.js";
47
- import {
48
- resolveExtractCacheDir
49
- } from "./chunk-YPBIAONI.js";
49
+ } from "./chunk-4N4P3ZWL.js";
50
50
  import {
51
51
  normalizeErrorMessage
52
52
  } from "./chunk-KNU5COPB.js";
@@ -232,7 +232,7 @@ function checkEnvironment() {
232
232
  return { ok: true, detail: parts.join(" \xB7 ") };
233
233
  }
234
234
  async function checkWhisper() {
235
- const { findWhisper, getInstallInstructions } = await import("./manager-IETAVBZS.js");
235
+ const { findWhisper, getInstallInstructions } = await import("./manager-TWVDSJXO.js");
236
236
  const result = findWhisper();
237
237
  if (result) {
238
238
  return { ok: true, detail: result.executablePath };
@@ -6,10 +6,10 @@ var __filename = __hf_fileURLToPath(import.meta.url);
6
6
  var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  getMimeType
9
- } from "./chunk-JBCU6NR5.js";
9
+ } from "./chunk-3QVMJ7GX.js";
10
10
  import {
11
11
  injectTagsAtHeadStart
12
- } from "./chunk-BAZ5LCR3.js";
12
+ } from "./chunk-R2SQBPMH.js";
13
13
 
14
14
  // src/utils/compositionServer.ts
15
15
  import { createHash } from "crypto";
@@ -23,6 +23,7 @@ function helperDir() {
23
23
  function resolveRuntimePath() {
24
24
  const d = helperDir();
25
25
  const candidates = [
26
+ resolve(d, "hyperframe.runtime.iife.js"),
26
27
  resolve(d, "hyperframe-runtime.js"),
27
28
  resolve(d, "..", "hyperframe-runtime.js"),
28
29
  // Monorepo dev: src/<dir>/ → src/ → cli/ → packages/ then into core/dist/
@@ -11,7 +11,7 @@ import {
11
11
  DEFAULT_REGISTRY_URL,
12
12
  fetchItemManifest,
13
13
  fetchRegistryManifest
14
- } from "./chunk-TO6JNTML.js";
14
+ } from "./chunk-7MB2ZAQF.js";
15
15
 
16
16
  // src/registry/resolver.ts
17
17
  function defaultWarn(message) {
@@ -7,28 +7,28 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  relinkSplitHalves
9
9
  } from "./chunk-6JR2XUEE.js";
10
+ import {
11
+ isAllowedHtmlAttribute,
12
+ isSafeAttributeValue,
13
+ sanitizeRichTextChildren
14
+ } from "./chunk-J3QM7AHP.js";
10
15
  import {
11
16
  EXCLUDED_TAGS,
12
17
  ensureHfIds,
13
18
  mintHfId,
14
19
  walkCompositionDescendants
15
- } from "./chunk-4IEH6EAC.js";
16
- import {
17
- isAllowedHtmlAttribute,
18
- isSafeAttributeValue,
19
- sanitizeRichTextChildren
20
- } from "./chunk-LBQFLUIY.js";
20
+ } from "./chunk-YALM6XN4.js";
21
21
  import {
22
22
  decodedUrlPath,
23
23
  removeElementWithGsapCascade
24
24
  } from "./chunk-YMS5FOMC.js";
25
25
  import {
26
26
  require_dist
27
- } from "./chunk-GK2FIKIQ.js";
27
+ } from "./chunk-ADDHW2FS.js";
28
28
  import {
29
29
  readClipTiming,
30
30
  writeClipTiming
31
- } from "./chunk-32GKETR7.js";
31
+ } from "./chunk-MMQ52NIZ.js";
32
32
  import {
33
33
  readMediaOffsetSeconds,
34
34
  readPlaybackRate