@osmo.inc/cli 0.1.18 → 0.1.19

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 (943) hide show
  1. package/DEPLOY.md +62 -16
  2. package/README.md +31 -15
  3. package/SETUP.md +19 -7
  4. package/THIRD_PARTY_NOTICES.md +5 -16
  5. package/bin/osmo.mjs +12 -0
  6. package/dist/osmo.js +2500 -8905
  7. package/package.json +13 -26
  8. package/release.json +49 -84
  9. package/third-party/inventory.json +0 -3601
  10. package/node_modules/@esbuild/darwin-arm64/README.md +0 -3
  11. package/node_modules/@esbuild/darwin-arm64/bin/esbuild +0 -0
  12. package/node_modules/@esbuild/darwin-arm64/package.json +0 -20
  13. package/node_modules/esbuild/LICENSE.md +0 -21
  14. package/node_modules/esbuild/README.md +0 -3
  15. package/node_modules/esbuild/bin/esbuild +0 -223
  16. package/node_modules/esbuild/install.js +0 -289
  17. package/node_modules/esbuild/lib/main.d.ts +0 -716
  18. package/node_modules/esbuild/lib/main.js +0 -2532
  19. package/node_modules/esbuild/package.json +0 -49
  20. package/node_modules/typescript/LICENSE.txt +0 -55
  21. package/node_modules/typescript/ThirdPartyNoticeText.txt +0 -193
  22. package/node_modules/typescript/lib/lib.d.ts +0 -22
  23. package/node_modules/typescript/lib/lib.decorators.d.ts +0 -384
  24. package/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
  25. package/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
  26. package/node_modules/typescript/lib/lib.dom.d.ts +0 -39429
  27. package/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -571
  28. package/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
  29. package/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
  30. package/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
  31. package/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
  32. package/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -605
  33. package/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
  34. package/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
  35. package/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
  36. package/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
  37. package/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
  38. package/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
  39. package/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
  40. package/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
  41. package/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
  42. package/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -21
  43. package/node_modules/typescript/lib/lib.es2017.d.ts +0 -26
  44. package/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
  45. package/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
  46. package/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
  47. package/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
  48. package/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
  49. package/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
  50. package/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
  51. package/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
  52. package/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
  53. package/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
  54. package/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
  55. package/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
  56. package/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
  57. package/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
  58. package/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
  59. package/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
  60. package/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
  61. package/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
  62. package/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
  63. package/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
  64. package/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
  65. package/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -765
  66. package/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
  67. package/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
  68. package/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
  69. package/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
  70. package/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
  71. package/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
  72. package/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -99
  73. package/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -44
  74. package/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
  75. package/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
  76. package/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
  77. package/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
  78. package/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
  79. package/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
  80. package/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -78
  81. package/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
  82. package/node_modules/typescript/lib/lib.es2022.d.ts +0 -25
  83. package/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -75
  84. package/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
  85. package/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -145
  86. package/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
  87. package/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
  88. package/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
  89. package/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
  90. package/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
  91. package/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
  92. package/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
  93. package/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
  94. package/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -65
  95. package/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -29
  96. package/node_modules/typescript/lib/lib.es2024.d.ts +0 -26
  97. package/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -24
  98. package/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -29
  99. package/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -35
  100. package/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -25
  101. package/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -68
  102. package/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -29
  103. package/node_modules/typescript/lib/lib.es5.d.ts +0 -4601
  104. package/node_modules/typescript/lib/lib.es6.d.ts +0 -23
  105. package/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
  106. package/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -96
  107. package/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
  108. package/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
  109. package/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
  110. package/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -24
  111. package/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -445
  112. package/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
  113. package/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
  114. package/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
  115. package/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -34
  116. package/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -25
  117. package/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
  118. package/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
  119. package/node_modules/typescript/lib/lib.webworker.d.ts +0 -13150
  120. package/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
  121. package/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -340
  122. package/node_modules/typescript/lib/typescript.js +0 -382
  123. package/node_modules/typescript/package.json +0 -57
  124. package/runtime/apps/native/tools/compile.mjs +0 -217
  125. package/runtime/packages/scene/scripts/validate-strict.mjs +0 -246
  126. package/runtime/packages/scene/src/clip.d.mts +0 -14
  127. package/runtime/packages/scene/src/clip.mjs +0 -15
  128. package/runtime/packages/scene/src/color-value.d.mts +0 -5
  129. package/runtime/packages/scene/src/color-value.mjs +0 -19
  130. package/runtime/packages/scene/src/color.ts +0 -1
  131. package/runtime/packages/scene/src/effects.ts +0 -213
  132. package/runtime/packages/scene/src/elements.ts +0 -491
  133. package/runtime/packages/scene/src/evaluate.ts +0 -919
  134. package/runtime/packages/scene/src/index.ts +0 -69
  135. package/runtime/packages/scene/src/jsx-runtime.ts +0 -73
  136. package/runtime/packages/scene/src/knob-schema.ts +0 -115
  137. package/runtime/packages/scene/src/knobs.ts +0 -118
  138. package/runtime/packages/scene/src/mask.d.mts +0 -6
  139. package/runtime/packages/scene/src/mask.mjs +0 -17
  140. package/runtime/packages/scene/src/metadata.d.mts +0 -23
  141. package/runtime/packages/scene/src/metadata.mjs +0 -44
  142. package/runtime/packages/scene/src/motion-sampling.d.mts +0 -2
  143. package/runtime/packages/scene/src/motion-sampling.mjs +0 -50
  144. package/runtime/packages/scene/src/motion.ts +0 -121
  145. package/runtime/packages/scene/src/shader.ts +0 -57
  146. package/src/resource-examples/example-image/landscape.svg +0 -7
  147. package/src/resource-examples/example-image/resource.json +0 -8
  148. package/src/resource-examples/example-model/gem.glb +0 -0
  149. package/src/resource-examples/example-model/preview.svg +0 -1
  150. package/src/resource-examples/example-model/resource.json +0 -7
  151. package/src/resource-examples/example-scene/resource.json +0 -1
  152. package/src/resource-examples/example-scene/scene.tsx +0 -8
  153. package/src/resource-examples/example-shader/effect.wgsl +0 -7
  154. package/src/resource-examples/example-shader/preview.svg +0 -1
  155. package/src/resource-examples/example-shader/resource.json +0 -27
  156. package/src/resource-examples/example-shader/tint.wgsl +0 -7
  157. package/src/resource-examples/example-video/ambient.mp4 +0 -0
  158. package/src/resource-examples/example-video/resource.json +0 -9
  159. package/src/starter/scene.tsx +0 -20
  160. package/studio/index.html +0 -2
  161. package/studio/public/check-circle-filled.svg +0 -3
  162. package/studio/public/comment-cursor/active-outer.svg +0 -3
  163. package/studio/public/comment-cursor/default.svg +0 -6
  164. package/studio/public/osmo-studio-logo.svg +0 -12
  165. package/studio/public/pencil-simple.svg +0 -5
  166. package/studio/src/active-outer-TVYUEURE.svg +0 -3
  167. package/studio/src/app.css +0 -4
  168. package/studio/src/app.js +0 -714
  169. package/studio/src/default-6CTRH4V5.svg +0 -6
  170. package/studio/src/engine_bg.wasm +0 -0
  171. package/studio/src/inter-cyrillic-ext-wght-normal-IYF56FF6.woff2 +0 -0
  172. package/studio/src/inter-cyrillic-wght-normal-JEOLYBOO.woff2 +0 -0
  173. package/studio/src/inter-greek-ext-wght-normal-EOVOK2B5.woff2 +0 -0
  174. package/studio/src/inter-greek-wght-normal-IRE366VL.woff2 +0 -0
  175. package/studio/src/inter-latin-ext-wght-normal-HA22NDSG.woff2 +0 -0
  176. package/studio/src/inter-latin-wght-normal-NRMW37G5.woff2 +0 -0
  177. package/studio/src/inter-vietnamese-wght-normal-CE5GGD3W.woff2 +0 -0
  178. package/studio/src/osmo-studio-logo-D5R2V77B.svg +0 -12
  179. package/third-party/cargo/adler2@2.0.1/Cargo.toml +0 -91
  180. package/third-party/cargo/adler2@2.0.1/LICENSE-0BSD +0 -12
  181. package/third-party/cargo/adler2@2.0.1/LICENSE-APACHE +0 -201
  182. package/third-party/cargo/adler2@2.0.1/LICENSE-MIT +0 -23
  183. package/third-party/cargo/allocator-api2@0.2.21/Cargo.toml +0 -48
  184. package/third-party/cargo/allocator-api2@0.2.21/LICENSE-APACHE +0 -176
  185. package/third-party/cargo/allocator-api2@0.2.21/LICENSE-MIT +0 -23
  186. package/third-party/cargo/arrayref@0.3.9/Cargo.toml +0 -23
  187. package/third-party/cargo/arrayref@0.3.9/LICENSE +0 -26
  188. package/third-party/cargo/arrayvec@0.7.8/Cargo.toml +0 -112
  189. package/third-party/cargo/arrayvec@0.7.8/LICENSE-APACHE +0 -201
  190. package/third-party/cargo/arrayvec@0.7.8/LICENSE-MIT +0 -25
  191. package/third-party/cargo/ascii@1.1.0/Cargo.toml +0 -41
  192. package/third-party/cargo/ascii@1.1.0/LICENSE-APACHE +0 -201
  193. package/third-party/cargo/ascii@1.1.0/LICENSE-MIT +0 -22
  194. package/third-party/cargo/ash@0.38.0+1.3.281/Cargo.toml +0 -66
  195. package/third-party/cargo/ash@0.38.0+1.3.281/LICENSE-APACHE +0 -67
  196. package/third-party/cargo/ash@0.38.0+1.3.281/LICENSE-MIT +0 -25
  197. package/third-party/cargo/autocfg@1.5.1/Cargo.toml +0 -75
  198. package/third-party/cargo/autocfg@1.5.1/LICENSE-APACHE +0 -201
  199. package/third-party/cargo/autocfg@1.5.1/LICENSE-MIT +0 -25
  200. package/third-party/cargo/base64@0.13.1/Cargo.toml +0 -53
  201. package/third-party/cargo/base64@0.13.1/LICENSE-APACHE +0 -201
  202. package/third-party/cargo/base64@0.13.1/LICENSE-MIT +0 -21
  203. package/third-party/cargo/base64@0.22.1/Cargo.toml +0 -85
  204. package/third-party/cargo/base64@0.22.1/LICENSE-APACHE +0 -201
  205. package/third-party/cargo/base64@0.22.1/LICENSE-MIT +0 -21
  206. package/third-party/cargo/bit-set@0.10.0/Cargo.toml +0 -108
  207. package/third-party/cargo/bit-set@0.10.0/LICENSE-APACHE +0 -201
  208. package/third-party/cargo/bit-set@0.10.0/LICENSE-MIT +0 -25
  209. package/third-party/cargo/bit-vec@0.9.1/Cargo.toml +0 -94
  210. package/third-party/cargo/bit-vec@0.9.1/LICENSE-APACHE +0 -201
  211. package/third-party/cargo/bit-vec@0.9.1/LICENSE-MIT +0 -25
  212. package/third-party/cargo/bitflags@2.13.0/Cargo.toml +0 -120
  213. package/third-party/cargo/bitflags@2.13.0/LICENSE-APACHE +0 -201
  214. package/third-party/cargo/bitflags@2.13.0/LICENSE-MIT +0 -25
  215. package/third-party/cargo/block2@0.6.2/Cargo.toml +0 -115
  216. package/third-party/cargo/block2@0.6.2/MIT-terms.txt +0 -22
  217. package/third-party/cargo/block2@0.6.2/madsmtm-objc2-b4167b582b2f-LICENSE.md +0 -34
  218. package/third-party/cargo/bumpalo@3.20.3/Cargo.toml +0 -99
  219. package/third-party/cargo/bumpalo@3.20.3/LICENSE-APACHE +0 -201
  220. package/third-party/cargo/bumpalo@3.20.3/LICENSE-MIT +0 -25
  221. package/third-party/cargo/bytemuck@1.25.1/Cargo.toml +0 -153
  222. package/third-party/cargo/bytemuck@1.25.1/LICENSE-APACHE +0 -61
  223. package/third-party/cargo/bytemuck@1.25.1/LICENSE-MIT +0 -9
  224. package/third-party/cargo/bytemuck@1.25.1/LICENSE-ZLIB +0 -11
  225. package/third-party/cargo/bytemuck_derive@1.11.0/Cargo.toml +0 -60
  226. package/third-party/cargo/bytemuck_derive@1.11.0/LICENSE-APACHE +0 -61
  227. package/third-party/cargo/bytemuck_derive@1.11.0/LICENSE-MIT +0 -9
  228. package/third-party/cargo/bytemuck_derive@1.11.0/LICENSE-ZLIB +0 -11
  229. package/third-party/cargo/byteorder-lite@0.1.0/Cargo.toml +0 -57
  230. package/third-party/cargo/byteorder-lite@0.1.0/LICENSE-MIT +0 -21
  231. package/third-party/cargo/byteorder-lite@0.1.0/UNLICENSE +0 -24
  232. package/third-party/cargo/byteorder@1.5.0/COPYING +0 -3
  233. package/third-party/cargo/byteorder@1.5.0/Cargo.toml +0 -54
  234. package/third-party/cargo/byteorder@1.5.0/LICENSE-MIT +0 -21
  235. package/third-party/cargo/byteorder@1.5.0/UNLICENSE +0 -24
  236. package/third-party/cargo/cfg-if@1.0.4/Cargo.toml +0 -47
  237. package/third-party/cargo/cfg-if@1.0.4/LICENSE-APACHE +0 -201
  238. package/third-party/cargo/cfg-if@1.0.4/LICENSE-MIT +0 -25
  239. package/third-party/cargo/cfg_aliases@0.2.1/Cargo.toml +0 -43
  240. package/third-party/cargo/cfg_aliases@0.2.1/LICENSE +0 -9
  241. package/third-party/cargo/chunked_transfer@1.5.0/Cargo.toml +0 -27
  242. package/third-party/cargo/chunked_transfer@1.5.0/LICENSE-APACHE +0 -201
  243. package/third-party/cargo/chunked_transfer@1.5.0/LICENSE-MIT +0 -22
  244. package/third-party/cargo/codespan-reporting@0.13.1/Cargo.toml +0 -115
  245. package/third-party/cargo/codespan-reporting@0.13.1/LICENSE +0 -201
  246. package/third-party/cargo/color_quant@1.1.0/Cargo.toml +0 -20
  247. package/third-party/cargo/color_quant@1.1.0/LICENSE +0 -21
  248. package/third-party/cargo/console_error_panic_hook@0.1.7/Cargo.toml +0 -27
  249. package/third-party/cargo/console_error_panic_hook@0.1.7/LICENSE-APACHE +0 -201
  250. package/third-party/cargo/console_error_panic_hook@0.1.7/LICENSE-MIT +0 -25
  251. package/third-party/cargo/core_maths@0.1.1/Cargo.toml +0 -37
  252. package/third-party/cargo/core_maths@0.1.1/LICENSE +0 -21
  253. package/third-party/cargo/cosmic-text@0.19.0/Cargo.toml +0 -214
  254. package/third-party/cargo/cosmic-text@0.19.0/LICENSE-APACHE +0 -201
  255. package/third-party/cargo/cosmic-text@0.19.0/LICENSE-MIT +0 -21
  256. package/third-party/cargo/crc32fast@1.5.0/Cargo.toml +0 -68
  257. package/third-party/cargo/crc32fast@1.5.0/LICENSE-APACHE +0 -202
  258. package/third-party/cargo/crc32fast@1.5.0/LICENSE-MIT +0 -21
  259. package/third-party/cargo/data-url@0.3.2/Cargo.toml +0 -63
  260. package/third-party/cargo/data-url@0.3.2/LICENSE-APACHE +0 -201
  261. package/third-party/cargo/data-url@0.3.2/LICENSE-MIT +0 -25
  262. package/third-party/cargo/dispatch2@0.3.1/Cargo.toml +0 -122
  263. package/third-party/cargo/dispatch2@0.3.1/MIT-terms.txt +0 -22
  264. package/third-party/cargo/dispatch2@0.3.1/madsmtm-objc2-8852b424193c-LICENSE.md +0 -34
  265. package/third-party/cargo/dlib@0.5.3/Cargo.toml +0 -43
  266. package/third-party/cargo/dlib@0.5.3/LICENSE.txt +0 -19
  267. package/third-party/cargo/document-features@0.2.12/Cargo.toml +0 -51
  268. package/third-party/cargo/document-features@0.2.12/LICENSE-APACHE +0 -73
  269. package/third-party/cargo/document-features@0.2.12/LICENSE-MIT +0 -19
  270. package/third-party/cargo/equivalent@1.0.2/Cargo.toml +0 -37
  271. package/third-party/cargo/equivalent@1.0.2/LICENSE-APACHE +0 -201
  272. package/third-party/cargo/equivalent@1.0.2/LICENSE-MIT +0 -25
  273. package/third-party/cargo/errno@0.3.14/Cargo.toml +0 -67
  274. package/third-party/cargo/errno@0.3.14/LICENSE-APACHE +0 -201
  275. package/third-party/cargo/errno@0.3.14/LICENSE-MIT +0 -25
  276. package/third-party/cargo/etagere@0.3.0/Cargo.toml +0 -57
  277. package/third-party/cargo/etagere@0.3.0/LICENSE-APACHE +0 -13
  278. package/third-party/cargo/etagere@0.3.0/LICENSE-MIT +0 -20
  279. package/third-party/cargo/euclid@0.22.14/COPYRIGHT +0 -5
  280. package/third-party/cargo/euclid@0.22.14/Cargo.toml +0 -66
  281. package/third-party/cargo/euclid@0.22.14/LICENSE-APACHE +0 -201
  282. package/third-party/cargo/euclid@0.22.14/LICENSE-MIT +0 -25
  283. package/third-party/cargo/fastrand@2.5.0/Cargo.toml +0 -89
  284. package/third-party/cargo/fastrand@2.5.0/LICENSE-APACHE +0 -201
  285. package/third-party/cargo/fastrand@2.5.0/LICENSE-MIT +0 -23
  286. package/third-party/cargo/fdeflate@0.3.7/Cargo.toml +0 -55
  287. package/third-party/cargo/fdeflate@0.3.7/LICENSE-APACHE +0 -177
  288. package/third-party/cargo/fdeflate@0.3.7/LICENSE-MIT +0 -25
  289. package/third-party/cargo/flate2@1.1.9/Cargo.toml +0 -274
  290. package/third-party/cargo/flate2@1.1.9/LICENSE-APACHE +0 -201
  291. package/third-party/cargo/flate2@1.1.9/LICENSE-MIT +0 -25
  292. package/third-party/cargo/float-cmp@0.9.0/Cargo.toml +0 -39
  293. package/third-party/cargo/float-cmp@0.9.0/LICENSE +0 -19
  294. package/third-party/cargo/float_next_after@1.0.0/Cargo.toml +0 -43
  295. package/third-party/cargo/float_next_after@1.0.0/LICENSE +0 -23
  296. package/third-party/cargo/foldhash@0.2.0/Cargo.toml +0 -80
  297. package/third-party/cargo/foldhash@0.2.0/LICENSE +0 -19
  298. package/third-party/cargo/font-types@0.11.3/Cargo.toml +0 -55
  299. package/third-party/cargo/font-types@0.11.3/LICENSE-APACHE +0 -67
  300. package/third-party/cargo/font-types@0.11.3/LICENSE-MIT +0 -25
  301. package/third-party/cargo/fontdb@0.23.0/Cargo.toml +0 -83
  302. package/third-party/cargo/fontdb@0.23.0/LICENSE +0 -21
  303. package/third-party/cargo/futures-core@0.3.32/Cargo.toml +0 -66
  304. package/third-party/cargo/futures-core@0.3.32/LICENSE-APACHE +0 -202
  305. package/third-party/cargo/futures-core@0.3.32/LICENSE-MIT +0 -26
  306. package/third-party/cargo/futures-task@0.3.32/Cargo.toml +0 -58
  307. package/third-party/cargo/futures-task@0.3.32/LICENSE-APACHE +0 -202
  308. package/third-party/cargo/futures-task@0.3.32/LICENSE-MIT +0 -26
  309. package/third-party/cargo/futures-util@0.3.32/Cargo.toml +0 -181
  310. package/third-party/cargo/futures-util@0.3.32/LICENSE-APACHE +0 -202
  311. package/third-party/cargo/futures-util@0.3.32/LICENSE-MIT +0 -26
  312. package/third-party/cargo/getrandom@0.4.3/Cargo.toml +0 -165
  313. package/third-party/cargo/getrandom@0.4.3/LICENSE-APACHE +0 -201
  314. package/third-party/cargo/getrandom@0.4.3/LICENSE-MIT +0 -26
  315. package/third-party/cargo/gif@0.14.2/Cargo.toml +0 -84
  316. package/third-party/cargo/gif@0.14.2/LICENSE-APACHE +0 -201
  317. package/third-party/cargo/gif@0.14.2/LICENSE-MIT +0 -21
  318. package/third-party/cargo/glam@0.33.2/Cargo.toml +0 -354
  319. package/third-party/cargo/glam@0.33.2/LICENSE-APACHE +0 -201
  320. package/third-party/cargo/glam@0.33.2/LICENSE-MIT +0 -23
  321. package/third-party/cargo/glow@0.17.0/Cargo.toml +0 -122
  322. package/third-party/cargo/glow@0.17.0/LICENSE-APACHE +0 -201
  323. package/third-party/cargo/glow@0.17.0/LICENSE-MIT +0 -23
  324. package/third-party/cargo/glow@0.17.0/LICENSE-ZLIB +0 -15
  325. package/third-party/cargo/gltf-derive@1.4.1/Cargo.toml +0 -34
  326. package/third-party/cargo/gltf-derive@1.4.1/LICENSE-APACHE +0 -202
  327. package/third-party/cargo/gltf-derive@1.4.1/LICENSE-MIT +0 -26
  328. package/third-party/cargo/gltf-json@1.4.1/Cargo.toml +0 -50
  329. package/third-party/cargo/gltf-json@1.4.1/LICENSE-APACHE +0 -202
  330. package/third-party/cargo/gltf-json@1.4.1/LICENSE-MIT +0 -26
  331. package/third-party/cargo/gltf@1.4.1/Cargo.toml +0 -122
  332. package/third-party/cargo/gltf@1.4.1/LICENSE-APACHE +0 -202
  333. package/third-party/cargo/gltf@1.4.1/LICENSE-MIT +0 -26
  334. package/third-party/cargo/glyphon@0.12.0/Cargo.toml +0 -35
  335. package/third-party/cargo/glyphon@0.12.0/LICENSE-APACHE +0 -201
  336. package/third-party/cargo/glyphon@0.12.0/LICENSE-MIT +0 -23
  337. package/third-party/cargo/glyphon@0.12.0/LICENSE-ZLIB +0 -15
  338. package/third-party/cargo/gpu-allocator@0.28.0/Cargo.toml +0 -180
  339. package/third-party/cargo/gpu-allocator@0.28.0/LICENSE-APACHE +0 -201
  340. package/third-party/cargo/gpu-allocator@0.28.0/LICENSE-MIT +0 -7
  341. package/third-party/cargo/grid@1.0.1/Cargo.toml +0 -77
  342. package/third-party/cargo/grid@1.0.1/LICENSE +0 -21
  343. package/third-party/cargo/half@2.7.1/Cargo.toml +0 -137
  344. package/third-party/cargo/half@2.7.1/LICENSE-APACHE +0 -176
  345. package/third-party/cargo/half@2.7.1/LICENSE-MIT +0 -19
  346. package/third-party/cargo/harfrust@0.5.2/Cargo.toml +0 -115
  347. package/third-party/cargo/harfrust@0.5.2/harfbuzz-harfrust-efdae3142ab7-LICENSE +0 -22
  348. package/third-party/cargo/hashbrown@0.16.1/Cargo.toml +0 -180
  349. package/third-party/cargo/hashbrown@0.16.1/LICENSE-APACHE +0 -201
  350. package/third-party/cargo/hashbrown@0.16.1/LICENSE-MIT +0 -25
  351. package/third-party/cargo/hashbrown@0.17.1/Cargo.toml +0 -201
  352. package/third-party/cargo/hashbrown@0.17.1/LICENSE-APACHE +0 -201
  353. package/third-party/cargo/hashbrown@0.17.1/LICENSE-MIT +0 -25
  354. package/third-party/cargo/httpdate@1.0.3/Cargo.toml +0 -35
  355. package/third-party/cargo/httpdate@1.0.3/LICENSE-APACHE +0 -201
  356. package/third-party/cargo/httpdate@1.0.3/LICENSE-MIT +0 -19
  357. package/third-party/cargo/image-webp@0.2.4/Cargo.toml +0 -63
  358. package/third-party/cargo/image-webp@0.2.4/LICENSE-APACHE +0 -177
  359. package/third-party/cargo/image-webp@0.2.4/LICENSE-MIT +0 -25
  360. package/third-party/cargo/image@0.25.10/Cargo.toml +0 -248
  361. package/third-party/cargo/image@0.25.10/LICENSE-APACHE +0 -177
  362. package/third-party/cargo/image@0.25.10/LICENSE-MIT +0 -25
  363. package/third-party/cargo/imagesize@0.14.0/Cargo.toml +0 -104
  364. package/third-party/cargo/imagesize@0.14.0/LICENSE +0 -21
  365. package/third-party/cargo/indexmap@2.14.0/Cargo.toml +0 -167
  366. package/third-party/cargo/indexmap@2.14.0/LICENSE-APACHE +0 -201
  367. package/third-party/cargo/indexmap@2.14.0/LICENSE-MIT +0 -25
  368. package/third-party/cargo/inflections@1.1.1/Cargo.toml +0 -21
  369. package/third-party/cargo/inflections@1.1.1/LICENSE +0 -20
  370. package/third-party/cargo/itoa@1.0.18/Cargo.toml +0 -66
  371. package/third-party/cargo/itoa@1.0.18/LICENSE-APACHE +0 -176
  372. package/third-party/cargo/itoa@1.0.18/LICENSE-MIT +0 -23
  373. package/third-party/cargo/js-sys@0.3.103/Cargo.toml +0 -98
  374. package/third-party/cargo/js-sys@0.3.103/LICENSE-APACHE +0 -201
  375. package/third-party/cargo/js-sys@0.3.103/LICENSE-MIT +0 -25
  376. package/third-party/cargo/khronos-egl@6.0.0/Cargo.toml +0 -82
  377. package/third-party/cargo/khronos-egl@6.0.0/LICENSE-APACHE +0 -201
  378. package/third-party/cargo/khronos-egl@6.0.0/LICENSE-MIT +0 -23
  379. package/third-party/cargo/kurbo@0.13.1/Cargo.toml +0 -230
  380. package/third-party/cargo/kurbo@0.13.1/LICENSE-APACHE +0 -202
  381. package/third-party/cargo/kurbo@0.13.1/LICENSE-MIT +0 -25
  382. package/third-party/cargo/lazy_static@1.5.0/Cargo.toml +0 -46
  383. package/third-party/cargo/lazy_static@1.5.0/LICENSE-APACHE +0 -201
  384. package/third-party/cargo/lazy_static@1.5.0/LICENSE-MIT +0 -25
  385. package/third-party/cargo/libc@0.2.186/Cargo.toml +0 -229
  386. package/third-party/cargo/libc@0.2.186/LICENSE-APACHE +0 -176
  387. package/third-party/cargo/libc@0.2.186/LICENSE-MIT +0 -25
  388. package/third-party/cargo/libloading@0.8.9/Cargo.toml +0 -90
  389. package/third-party/cargo/libloading@0.8.9/LICENSE +0 -12
  390. package/third-party/cargo/libm@0.2.16/Cargo.toml +0 -61
  391. package/third-party/cargo/libm@0.2.16/LICENSE.txt +0 -258
  392. package/third-party/cargo/linebender_resource_handle@0.1.1/Cargo.toml +0 -107
  393. package/third-party/cargo/linebender_resource_handle@0.1.1/LICENSE-APACHE +0 -176
  394. package/third-party/cargo/linebender_resource_handle@0.1.1/LICENSE-MIT +0 -19
  395. package/third-party/cargo/litrs@1.0.0/Cargo.toml +0 -63
  396. package/third-party/cargo/litrs@1.0.0/LICENSE-APACHE +0 -176
  397. package/third-party/cargo/litrs@1.0.0/LICENSE-MIT +0 -25
  398. package/third-party/cargo/lock_api@0.4.14/Cargo.toml +0 -68
  399. package/third-party/cargo/lock_api@0.4.14/LICENSE-APACHE +0 -201
  400. package/third-party/cargo/lock_api@0.4.14/LICENSE-MIT +0 -25
  401. package/third-party/cargo/log@0.4.33/Cargo.toml +0 -152
  402. package/third-party/cargo/log@0.4.33/LICENSE-APACHE +0 -201
  403. package/third-party/cargo/log@0.4.33/LICENSE-MIT +0 -25
  404. package/third-party/cargo/lru@0.16.4/Cargo.toml +0 -47
  405. package/third-party/cargo/lru@0.16.4/LICENSE +0 -21
  406. package/third-party/cargo/lyon_geom@1.0.19/Cargo.toml +0 -69
  407. package/third-party/cargo/lyon_geom@1.0.19/nical-lyon-56219c95c658-LICENSE-APACHE +0 -13
  408. package/third-party/cargo/lyon_geom@1.0.19/nical-lyon-56219c95c658-LICENSE-MIT +0 -20
  409. package/third-party/cargo/lyon_path@1.0.19/Cargo.toml +0 -58
  410. package/third-party/cargo/lyon_path@1.0.19/nical-lyon-56219c95c658-LICENSE-APACHE +0 -13
  411. package/third-party/cargo/lyon_path@1.0.19/nical-lyon-56219c95c658-LICENSE-MIT +0 -20
  412. package/third-party/cargo/lyon_tessellation@1.0.20/Cargo.toml +0 -71
  413. package/third-party/cargo/lyon_tessellation@1.0.20/nical-lyon-7fa75ea8eea3-LICENSE-APACHE +0 -13
  414. package/third-party/cargo/lyon_tessellation@1.0.20/nical-lyon-7fa75ea8eea3-LICENSE-MIT +0 -20
  415. package/third-party/cargo/memchr@2.8.3/COPYING +0 -3
  416. package/third-party/cargo/memchr@2.8.3/Cargo.toml +0 -89
  417. package/third-party/cargo/memchr@2.8.3/LICENSE-MIT +0 -21
  418. package/third-party/cargo/memchr@2.8.3/UNLICENSE +0 -24
  419. package/third-party/cargo/memmap2@0.9.11/Cargo.toml +0 -59
  420. package/third-party/cargo/memmap2@0.9.11/LICENSE-APACHE +0 -201
  421. package/third-party/cargo/memmap2@0.9.11/LICENSE-MIT +0 -26
  422. package/third-party/cargo/miniz_oxide@0.8.9/Cargo.toml +0 -91
  423. package/third-party/cargo/miniz_oxide@0.8.9/LICENSE +0 -25
  424. package/third-party/cargo/miniz_oxide@0.8.9/LICENSE-APACHE.md +0 -177
  425. package/third-party/cargo/miniz_oxide@0.8.9/LICENSE-MIT.md +0 -24
  426. package/third-party/cargo/miniz_oxide@0.8.9/LICENSE-ZLIB.md +0 -14
  427. package/third-party/cargo/moxcms@0.8.1/Cargo.toml +0 -113
  428. package/third-party/cargo/moxcms@0.8.1/LICENSE-APACHE.md +0 -201
  429. package/third-party/cargo/moxcms@0.8.1/LICENSE.md +0 -26
  430. package/third-party/cargo/naga-types@30.0.0/Cargo.toml +0 -94
  431. package/third-party/cargo/naga-types@30.0.0/LICENSE.APACHE +0 -176
  432. package/third-party/cargo/naga-types@30.0.0/LICENSE.MIT +0 -21
  433. package/third-party/cargo/naga@30.0.0/Cargo.toml +0 -246
  434. package/third-party/cargo/naga@30.0.0/LICENSE.APACHE +0 -176
  435. package/third-party/cargo/naga@30.0.0/LICENSE.MIT +0 -21
  436. package/third-party/cargo/num-traits@0.2.19/Cargo.toml +0 -54
  437. package/third-party/cargo/num-traits@0.2.19/LICENSE-APACHE +0 -201
  438. package/third-party/cargo/num-traits@0.2.19/LICENSE-MIT +0 -25
  439. package/third-party/cargo/objc2-core-foundation@0.3.2/Cargo.toml +0 -221
  440. package/third-party/cargo/objc2-core-foundation@0.3.2/MIT-terms.txt +0 -22
  441. package/third-party/cargo/objc2-core-foundation@0.3.2/madsmtm-objc2-7b1abfd750a2-LICENSE.md +0 -34
  442. package/third-party/cargo/objc2-core-graphics@0.3.2/Cargo.toml +0 -331
  443. package/third-party/cargo/objc2-core-graphics@0.3.2/MIT-terms.txt +0 -22
  444. package/third-party/cargo/objc2-core-graphics@0.3.2/madsmtm-objc2-7b1abfd750a2-LICENSE.md +0 -34
  445. package/third-party/cargo/objc2-encode@4.1.0/Cargo.toml +0 -81
  446. package/third-party/cargo/objc2-encode@4.1.0/MIT-terms.txt +0 -22
  447. package/third-party/cargo/objc2-encode@4.1.0/madsmtm-objc2-8d214f547736-LICENSE.md +0 -34
  448. package/third-party/cargo/objc2-foundation@0.3.2/Cargo.toml +0 -529
  449. package/third-party/cargo/objc2-foundation@0.3.2/MIT-terms.txt +0 -22
  450. package/third-party/cargo/objc2-foundation@0.3.2/madsmtm-objc2-7b1abfd750a2-LICENSE.md +0 -34
  451. package/third-party/cargo/objc2-io-surface@0.3.2/Cargo.toml +0 -139
  452. package/third-party/cargo/objc2-io-surface@0.3.2/MIT-terms.txt +0 -22
  453. package/third-party/cargo/objc2-io-surface@0.3.2/madsmtm-objc2-7b1abfd750a2-LICENSE.md +0 -34
  454. package/third-party/cargo/objc2-metal@0.3.2/Cargo.toml +0 -601
  455. package/third-party/cargo/objc2-metal@0.3.2/MIT-terms.txt +0 -22
  456. package/third-party/cargo/objc2-metal@0.3.2/madsmtm-objc2-7b1abfd750a2-LICENSE.md +0 -34
  457. package/third-party/cargo/objc2-quartz-core@0.3.2/Cargo.toml +0 -302
  458. package/third-party/cargo/objc2-quartz-core@0.3.2/MIT-terms.txt +0 -22
  459. package/third-party/cargo/objc2-quartz-core@0.3.2/madsmtm-objc2-7b1abfd750a2-LICENSE.md +0 -34
  460. package/third-party/cargo/objc2@0.6.4/Cargo.toml +0 -232
  461. package/third-party/cargo/objc2@0.6.4/MIT-terms.txt +0 -22
  462. package/third-party/cargo/objc2@0.6.4/madsmtm-objc2-8852b424193c-LICENSE.md +0 -34
  463. package/third-party/cargo/once_cell@1.21.4/Cargo.toml +0 -119
  464. package/third-party/cargo/once_cell@1.21.4/LICENSE-APACHE +0 -201
  465. package/third-party/cargo/once_cell@1.21.4/LICENSE-MIT +0 -23
  466. package/third-party/cargo/ordered-float@5.3.0/Cargo.toml +0 -162
  467. package/third-party/cargo/ordered-float@5.3.0/LICENSE-MIT +0 -25
  468. package/third-party/cargo/parking_lot@0.12.5/Cargo.toml +0 -87
  469. package/third-party/cargo/parking_lot@0.12.5/LICENSE-APACHE +0 -201
  470. package/third-party/cargo/parking_lot@0.12.5/LICENSE-MIT +0 -25
  471. package/third-party/cargo/parking_lot_core@0.9.12/Cargo.toml +0 -72
  472. package/third-party/cargo/parking_lot_core@0.9.12/LICENSE-APACHE +0 -201
  473. package/third-party/cargo/parking_lot_core@0.9.12/LICENSE-MIT +0 -25
  474. package/third-party/cargo/pico-args@0.5.0/Cargo.toml +0 -32
  475. package/third-party/cargo/pico-args@0.5.0/LICENSE +0 -20
  476. package/third-party/cargo/pin-project-lite@0.2.17/Cargo.toml +0 -198
  477. package/third-party/cargo/pin-project-lite@0.2.17/LICENSE-APACHE +0 -177
  478. package/third-party/cargo/pin-project-lite@0.2.17/LICENSE-MIT +0 -23
  479. package/third-party/cargo/pkg-config@0.3.33/Cargo.toml +0 -43
  480. package/third-party/cargo/pkg-config@0.3.33/LICENSE-APACHE +0 -201
  481. package/third-party/cargo/pkg-config@0.3.33/LICENSE-MIT +0 -25
  482. package/third-party/cargo/png@0.18.1/Cargo.toml +0 -130
  483. package/third-party/cargo/png@0.18.1/LICENSE-APACHE +0 -201
  484. package/third-party/cargo/png@0.18.1/LICENSE-MIT +0 -25
  485. package/third-party/cargo/pollster@0.4.0/Cargo.toml +0 -53
  486. package/third-party/cargo/pollster@0.4.0/LICENSE-APACHE +0 -201
  487. package/third-party/cargo/pollster@0.4.0/LICENSE-MIT +0 -25
  488. package/third-party/cargo/polycool@0.4.0/Cargo.toml +0 -83
  489. package/third-party/cargo/polycool@0.4.0/LICENSE-APACHE +0 -202
  490. package/third-party/cargo/polycool@0.4.0/LICENSE-MIT +0 -25
  491. package/third-party/cargo/pp-rs@0.2.1/Cargo.toml +0 -23
  492. package/third-party/cargo/pp-rs@0.2.1/LICENSE +0 -29
  493. package/third-party/cargo/presser@0.3.1/Cargo.toml +0 -58
  494. package/third-party/cargo/presser@0.3.1/LICENSE-APACHE +0 -201
  495. package/third-party/cargo/presser@0.3.1/LICENSE-MIT +0 -25
  496. package/third-party/cargo/proc-macro2@1.0.106/Cargo.toml +0 -105
  497. package/third-party/cargo/proc-macro2@1.0.106/LICENSE-APACHE +0 -176
  498. package/third-party/cargo/proc-macro2@1.0.106/LICENSE-MIT +0 -23
  499. package/third-party/cargo/profiling@1.0.18/Cargo.toml +0 -96
  500. package/third-party/cargo/profiling@1.0.18/aclysma-profiling-8271551172eb-LICENSE-APACHE +0 -201
  501. package/third-party/cargo/profiling@1.0.18/aclysma-profiling-8271551172eb-LICENSE-MIT +0 -21
  502. package/third-party/cargo/pxfm@0.1.30/Cargo.toml +0 -53
  503. package/third-party/cargo/pxfm@0.1.30/LICENSE-APACHE.md +0 -201
  504. package/third-party/cargo/pxfm@0.1.30/LICENSE.md +0 -26
  505. package/third-party/cargo/quick-error@2.0.1/Cargo.toml +0 -24
  506. package/third-party/cargo/quick-error@2.0.1/LICENSE-APACHE +0 -202
  507. package/third-party/cargo/quick-error@2.0.1/LICENSE-MIT +0 -19
  508. package/third-party/cargo/quote@1.0.46/Cargo.toml +0 -70
  509. package/third-party/cargo/quote@1.0.46/LICENSE-APACHE +0 -176
  510. package/third-party/cargo/quote@1.0.46/LICENSE-MIT +0 -23
  511. package/third-party/cargo/rangemap@1.7.1/Cargo.toml +0 -91
  512. package/third-party/cargo/rangemap@1.7.1/LICENSE-APACHE +0 -191
  513. package/third-party/cargo/rangemap@1.7.1/LICENSE-MIT +0 -7
  514. package/third-party/cargo/raw-window-handle@0.6.2/Cargo.toml +0 -56
  515. package/third-party/cargo/raw-window-handle@0.6.2/LICENSE-APACHE.md +0 -177
  516. package/third-party/cargo/raw-window-handle@0.6.2/LICENSE-MIT.md +0 -21
  517. package/third-party/cargo/raw-window-handle@0.6.2/LICENSE-ZLIB.md +0 -11
  518. package/third-party/cargo/raw-window-metal@1.1.0/Cargo.toml +0 -111
  519. package/third-party/cargo/raw-window-metal@1.1.0/LICENSE-APACHE +0 -202
  520. package/third-party/cargo/raw-window-metal@1.1.0/LICENSE-MIT +0 -17
  521. package/third-party/cargo/read-fonts@0.37.0/Cargo.toml +0 -95
  522. package/third-party/cargo/read-fonts@0.37.0/LICENSE-APACHE +0 -67
  523. package/third-party/cargo/read-fonts@0.37.0/LICENSE-MIT +0 -25
  524. package/third-party/cargo/read-fonts@0.39.2/Cargo.toml +0 -96
  525. package/third-party/cargo/read-fonts@0.39.2/LICENSE-APACHE +0 -67
  526. package/third-party/cargo/read-fonts@0.39.2/LICENSE-MIT +0 -25
  527. package/third-party/cargo/renderdoc-sys@1.1.0/Cargo.toml +0 -39
  528. package/third-party/cargo/renderdoc-sys@1.1.0/LICENSE-APACHE +0 -201
  529. package/third-party/cargo/renderdoc-sys@1.1.0/LICENSE-MIT +0 -25
  530. package/third-party/cargo/resvg@0.47.0/Cargo.toml +0 -112
  531. package/third-party/cargo/resvg@0.47.0/LICENSE-APACHE +0 -176
  532. package/third-party/cargo/resvg@0.47.0/LICENSE-MIT +0 -25
  533. package/third-party/cargo/rgb@0.8.53/Cargo.toml +0 -110
  534. package/third-party/cargo/rgb@0.8.53/LICENSE +0 -21
  535. package/third-party/cargo/roxmltree@0.21.1/Cargo.toml +0 -75
  536. package/third-party/cargo/roxmltree@0.21.1/LICENSE-APACHE +0 -201
  537. package/third-party/cargo/roxmltree@0.21.1/LICENSE-MIT +0 -21
  538. package/third-party/cargo/rustc-hash@1.1.0/Cargo.toml +0 -25
  539. package/third-party/cargo/rustc-hash@1.1.0/LICENSE-APACHE +0 -201
  540. package/third-party/cargo/rustc-hash@1.1.0/LICENSE-MIT +0 -23
  541. package/third-party/cargo/rustc-hash@2.1.3/Cargo.toml +0 -50
  542. package/third-party/cargo/rustc-hash@2.1.3/LICENSE-APACHE +0 -176
  543. package/third-party/cargo/rustc-hash@2.1.3/LICENSE-MIT +0 -23
  544. package/third-party/cargo/rustix@1.1.4/COPYRIGHT +0 -29
  545. package/third-party/cargo/rustix@1.1.4/Cargo.toml +0 -292
  546. package/third-party/cargo/rustix@1.1.4/LICENSE-APACHE +0 -201
  547. package/third-party/cargo/rustix@1.1.4/LICENSE-Apache-2.0_WITH_LLVM-exception +0 -220
  548. package/third-party/cargo/rustix@1.1.4/LICENSE-MIT +0 -23
  549. package/third-party/cargo/rustversion@1.0.23/Cargo.toml +0 -69
  550. package/third-party/cargo/rustversion@1.0.23/LICENSE-APACHE +0 -176
  551. package/third-party/cargo/rustversion@1.0.23/LICENSE-MIT +0 -23
  552. package/third-party/cargo/rustybuzz@0.20.1/Cargo.toml +0 -110
  553. package/third-party/cargo/rustybuzz@0.20.1/LICENSE +0 -22
  554. package/third-party/cargo/scopeguard@1.2.0/Cargo.toml +0 -43
  555. package/third-party/cargo/scopeguard@1.2.0/LICENSE-APACHE +0 -201
  556. package/third-party/cargo/scopeguard@1.2.0/LICENSE-MIT +0 -25
  557. package/third-party/cargo/self_cell@1.2.2/Cargo.toml +0 -33
  558. package/third-party/cargo/self_cell@1.2.2/LICENSE-APACHE +0 -201
  559. package/third-party/cargo/self_cell@1.2.2/LICENSE-GPLv2 +0 -339
  560. package/third-party/cargo/self_cell@1.3.0/Cargo.toml +0 -33
  561. package/third-party/cargo/self_cell@1.3.0/LICENSE-APACHE +0 -201
  562. package/third-party/cargo/self_cell@1.3.0/LICENSE-GPLv2 +0 -339
  563. package/third-party/cargo/serde@1.0.228/Cargo.toml +0 -84
  564. package/third-party/cargo/serde@1.0.228/LICENSE-APACHE +0 -176
  565. package/third-party/cargo/serde@1.0.228/LICENSE-MIT +0 -23
  566. package/third-party/cargo/serde_core@1.0.228/Cargo.toml +0 -87
  567. package/third-party/cargo/serde_core@1.0.228/LICENSE-APACHE +0 -176
  568. package/third-party/cargo/serde_core@1.0.228/LICENSE-MIT +0 -23
  569. package/third-party/cargo/serde_derive@1.0.228/Cargo.toml +0 -87
  570. package/third-party/cargo/serde_derive@1.0.228/LICENSE-APACHE +0 -176
  571. package/third-party/cargo/serde_derive@1.0.228/LICENSE-MIT +0 -23
  572. package/third-party/cargo/serde_json@1.0.150/Cargo.toml +0 -162
  573. package/third-party/cargo/serde_json@1.0.150/LICENSE-APACHE +0 -176
  574. package/third-party/cargo/serde_json@1.0.150/LICENSE-MIT +0 -23
  575. package/third-party/cargo/simd-adler32@0.3.10/Cargo.toml +0 -68
  576. package/third-party/cargo/simd-adler32@0.3.10/LICENSE.md +0 -21
  577. package/third-party/cargo/simplecss@0.2.2/Cargo.toml +0 -146
  578. package/third-party/cargo/simplecss@0.2.2/LICENSE-APACHE +0 -201
  579. package/third-party/cargo/simplecss@0.2.2/LICENSE-MIT +0 -21
  580. package/third-party/cargo/siphasher@1.0.3/COPYING +0 -7
  581. package/third-party/cargo/siphasher@1.0.3/Cargo.toml +0 -64
  582. package/third-party/cargo/skrifa@0.40.0/Cargo.toml +0 -86
  583. package/third-party/cargo/skrifa@0.40.0/LICENSE-APACHE +0 -67
  584. package/third-party/cargo/skrifa@0.40.0/LICENSE-MIT +0 -25
  585. package/third-party/cargo/skrifa@0.42.1/Cargo.toml +0 -86
  586. package/third-party/cargo/skrifa@0.42.1/LICENSE-APACHE +0 -67
  587. package/third-party/cargo/skrifa@0.42.1/LICENSE-MIT +0 -25
  588. package/third-party/cargo/slab@0.4.12/Cargo.toml +0 -67
  589. package/third-party/cargo/slab@0.4.12/LICENSE +0 -25
  590. package/third-party/cargo/slotmap@1.1.1/Cargo.toml +0 -83
  591. package/third-party/cargo/slotmap@1.1.1/LICENSE +0 -19
  592. package/third-party/cargo/smallvec@1.15.2/Cargo.toml +0 -103
  593. package/third-party/cargo/smallvec@1.15.2/LICENSE-APACHE +0 -201
  594. package/third-party/cargo/smallvec@1.15.2/LICENSE-MIT +0 -25
  595. package/third-party/cargo/smol_str@0.3.6/Cargo.toml +0 -155
  596. package/third-party/cargo/smol_str@0.3.6/LICENSE-APACHE +0 -201
  597. package/third-party/cargo/smol_str@0.3.6/LICENSE-MIT +0 -23
  598. package/third-party/cargo/spirv@0.4.0+sdk-1.4.341.0/Cargo.toml +0 -56
  599. package/third-party/cargo/spirv@0.4.0+sdk-1.4.341.0/gfx-rs-rspirv-8afc3d0ac8e1-LICENSE +0 -202
  600. package/third-party/cargo/static_assertions@1.1.0/Cargo.toml +0 -39
  601. package/third-party/cargo/static_assertions@1.1.0/LICENSE-APACHE +0 -202
  602. package/third-party/cargo/static_assertions@1.1.0/LICENSE-MIT +0 -21
  603. package/third-party/cargo/strict-num@0.1.1/Cargo.toml +0 -35
  604. package/third-party/cargo/strict-num@0.1.1/LICENSE +0 -19
  605. package/third-party/cargo/svgtypes@0.16.1/Cargo.toml +0 -57
  606. package/third-party/cargo/svgtypes@0.16.1/LICENSE-APACHE +0 -201
  607. package/third-party/cargo/svgtypes@0.16.1/LICENSE-MIT +0 -20
  608. package/third-party/cargo/swash@0.2.9/Cargo.toml +0 -93
  609. package/third-party/cargo/swash@0.2.9/LICENSE-APACHE +0 -201
  610. package/third-party/cargo/swash@0.2.9/LICENSE-MIT +0 -25
  611. package/third-party/cargo/syn@2.0.118/Cargo.toml +0 -272
  612. package/third-party/cargo/syn@2.0.118/LICENSE-APACHE +0 -176
  613. package/third-party/cargo/syn@2.0.118/LICENSE-MIT +0 -23
  614. package/third-party/cargo/sys-locale@0.3.2/Cargo.toml +0 -73
  615. package/third-party/cargo/sys-locale@0.3.2/LICENSE-APACHE +0 -201
  616. package/third-party/cargo/sys-locale@0.3.2/LICENSE-MIT +0 -21
  617. package/third-party/cargo/taffy@0.12.1/Cargo.toml +0 -171
  618. package/third-party/cargo/taffy@0.12.1/DioxusLabs-taffy-1c9e37a0a1cf-LICENSE.md +0 -25
  619. package/third-party/cargo/tempfile@3.27.0/Cargo.toml +0 -105
  620. package/third-party/cargo/tempfile@3.27.0/LICENSE-APACHE +0 -201
  621. package/third-party/cargo/tempfile@3.27.0/LICENSE-MIT +0 -25
  622. package/third-party/cargo/termcolor@1.4.1/COPYING +0 -3
  623. package/third-party/cargo/termcolor@1.4.1/Cargo.toml +0 -40
  624. package/third-party/cargo/termcolor@1.4.1/LICENSE-MIT +0 -21
  625. package/third-party/cargo/termcolor@1.4.1/UNLICENSE +0 -24
  626. package/third-party/cargo/thiserror-impl@2.0.18/Cargo.toml +0 -52
  627. package/third-party/cargo/thiserror-impl@2.0.18/LICENSE-APACHE +0 -176
  628. package/third-party/cargo/thiserror-impl@2.0.18/LICENSE-MIT +0 -23
  629. package/third-party/cargo/thiserror@2.0.18/Cargo.toml +0 -119
  630. package/third-party/cargo/thiserror@2.0.18/LICENSE-APACHE +0 -176
  631. package/third-party/cargo/thiserror@2.0.18/LICENSE-MIT +0 -23
  632. package/third-party/cargo/tiny-skia-path@0.12.0/Cargo.toml +0 -58
  633. package/third-party/cargo/tiny-skia-path@0.12.0/LICENSE +0 -30
  634. package/third-party/cargo/tiny-skia@0.12.0/Cargo.toml +0 -116
  635. package/third-party/cargo/tiny-skia@0.12.0/LICENSE +0 -30
  636. package/third-party/cargo/tiny_http@0.12.0/Cargo.toml +0 -82
  637. package/third-party/cargo/tiny_http@0.12.0/LICENSE-APACHE +0 -201
  638. package/third-party/cargo/tiny_http@0.12.0/LICENSE-MIT +0 -25
  639. package/third-party/cargo/tinyvec@1.12.0/Cargo.toml +0 -184
  640. package/third-party/cargo/tinyvec@1.12.0/LICENSE-APACHE.md +0 -202
  641. package/third-party/cargo/tinyvec@1.12.0/LICENSE-MIT.md +0 -5
  642. package/third-party/cargo/tinyvec@1.12.0/LICENSE-ZLIB.md +0 -11
  643. package/third-party/cargo/tinyvec_macros@0.1.1/Cargo.toml +0 -19
  644. package/third-party/cargo/tinyvec_macros@0.1.1/LICENSE-APACHE.md +0 -202
  645. package/third-party/cargo/tinyvec_macros@0.1.1/LICENSE-MIT.md +0 -21
  646. package/third-party/cargo/tinyvec_macros@0.1.1/LICENSE-ZLIB.md +0 -20
  647. package/third-party/cargo/ttf-parser@0.25.1/Cargo.toml +0 -101
  648. package/third-party/cargo/ttf-parser@0.25.1/LICENSE-APACHE +0 -201
  649. package/third-party/cargo/ttf-parser@0.25.1/LICENSE-MIT +0 -20
  650. package/third-party/cargo/unicode-bidi-mirroring@0.4.0/Cargo.toml +0 -22
  651. package/third-party/cargo/unicode-bidi-mirroring@0.4.0/LICENSE-APACHE +0 -201
  652. package/third-party/cargo/unicode-bidi-mirroring@0.4.0/LICENSE-MIT +0 -21
  653. package/third-party/cargo/unicode-bidi@0.3.18/COPYRIGHT +0 -8
  654. package/third-party/cargo/unicode-bidi@0.3.18/Cargo.toml +0 -90
  655. package/third-party/cargo/unicode-bidi@0.3.18/LICENSE-APACHE +0 -201
  656. package/third-party/cargo/unicode-bidi@0.3.18/LICENSE-MIT +0 -25
  657. package/third-party/cargo/unicode-ccc@0.4.0/Cargo.toml +0 -22
  658. package/third-party/cargo/unicode-ccc@0.4.0/LICENSE-APACHE +0 -201
  659. package/third-party/cargo/unicode-ccc@0.4.0/LICENSE-MIT +0 -21
  660. package/third-party/cargo/unicode-ident@1.0.24/Cargo.toml +0 -84
  661. package/third-party/cargo/unicode-ident@1.0.24/LICENSE-APACHE +0 -176
  662. package/third-party/cargo/unicode-ident@1.0.24/LICENSE-MIT +0 -23
  663. package/third-party/cargo/unicode-ident@1.0.24/LICENSE-UNICODE +0 -39
  664. package/third-party/cargo/unicode-linebreak@0.1.5/Cargo.toml +0 -32
  665. package/third-party/cargo/unicode-linebreak@0.1.5/LICENSE +0 -201
  666. package/third-party/cargo/unicode-properties@0.1.4/COPYRIGHT +0 -7
  667. package/third-party/cargo/unicode-properties@0.1.4/Cargo.toml +0 -65
  668. package/third-party/cargo/unicode-properties@0.1.4/LICENSE-APACHE +0 -201
  669. package/third-party/cargo/unicode-properties@0.1.4/LICENSE-MIT +0 -25
  670. package/third-party/cargo/unicode-script@0.5.8/Cargo.toml +0 -63
  671. package/third-party/cargo/unicode-script@0.5.8/LICENSE-APACHE +0 -201
  672. package/third-party/cargo/unicode-script@0.5.8/LICENSE-MIT +0 -27
  673. package/third-party/cargo/unicode-segmentation@1.13.3/COPYRIGHT +0 -7
  674. package/third-party/cargo/unicode-segmentation@1.13.3/Cargo.toml +0 -91
  675. package/third-party/cargo/unicode-segmentation@1.13.3/LICENSE-APACHE +0 -201
  676. package/third-party/cargo/unicode-segmentation@1.13.3/LICENSE-MIT +0 -25
  677. package/third-party/cargo/unicode-vo@0.1.0/Cargo.toml +0 -22
  678. package/third-party/cargo/unicode-vo@0.1.0/LICENSE-APACHE +0 -201
  679. package/third-party/cargo/unicode-vo@0.1.0/LICENSE-MIT +0 -21
  680. package/third-party/cargo/unicode-width@0.2.2/COPYRIGHT +0 -7
  681. package/third-party/cargo/unicode-width@0.2.2/Cargo.toml +0 -77
  682. package/third-party/cargo/unicode-width@0.2.2/LICENSE-APACHE +0 -201
  683. package/third-party/cargo/unicode-width@0.2.2/LICENSE-MIT +0 -25
  684. package/third-party/cargo/unicode-xid@0.2.6/COPYRIGHT +0 -7
  685. package/third-party/cargo/unicode-xid@0.2.6/Cargo.toml +0 -65
  686. package/third-party/cargo/unicode-xid@0.2.6/LICENSE-APACHE +0 -201
  687. package/third-party/cargo/unicode-xid@0.2.6/LICENSE-MIT +0 -25
  688. package/third-party/cargo/urlencoding@2.1.3/Cargo.toml +0 -41
  689. package/third-party/cargo/urlencoding@2.1.3/LICENSE +0 -20
  690. package/third-party/cargo/usvg@0.47.0/Cargo.toml +0 -138
  691. package/third-party/cargo/usvg@0.47.0/LICENSE-APACHE +0 -176
  692. package/third-party/cargo/usvg@0.47.0/LICENSE-MIT +0 -25
  693. package/third-party/cargo/version_check@0.9.5/Cargo.toml +0 -38
  694. package/third-party/cargo/version_check@0.9.5/LICENSE-APACHE +0 -201
  695. package/third-party/cargo/version_check@0.9.5/LICENSE-MIT +0 -19
  696. package/third-party/cargo/wasm-bindgen-futures@0.4.76/Cargo.toml +0 -88
  697. package/third-party/cargo/wasm-bindgen-futures@0.4.76/LICENSE-APACHE +0 -201
  698. package/third-party/cargo/wasm-bindgen-futures@0.4.76/LICENSE-MIT +0 -25
  699. package/third-party/cargo/wasm-bindgen-macro-support@0.2.126/Cargo.toml +0 -83
  700. package/third-party/cargo/wasm-bindgen-macro-support@0.2.126/LICENSE-APACHE +0 -201
  701. package/third-party/cargo/wasm-bindgen-macro-support@0.2.126/LICENSE-MIT +0 -25
  702. package/third-party/cargo/wasm-bindgen-macro@0.2.126/Cargo.toml +0 -73
  703. package/third-party/cargo/wasm-bindgen-macro@0.2.126/LICENSE-APACHE +0 -201
  704. package/third-party/cargo/wasm-bindgen-macro@0.2.126/LICENSE-MIT +0 -25
  705. package/third-party/cargo/wasm-bindgen-shared@0.2.126/Cargo.toml +0 -66
  706. package/third-party/cargo/wasm-bindgen-shared@0.2.126/LICENSE-APACHE +0 -201
  707. package/third-party/cargo/wasm-bindgen-shared@0.2.126/LICENSE-MIT +0 -25
  708. package/third-party/cargo/wasm-bindgen@0.2.126/Cargo.toml +0 -122
  709. package/third-party/cargo/wasm-bindgen@0.2.126/LICENSE-APACHE +0 -201
  710. package/third-party/cargo/wasm-bindgen@0.2.126/LICENSE-MIT +0 -25
  711. package/third-party/cargo/wayland-sys@0.31.11/Cargo.toml +0 -81
  712. package/third-party/cargo/wayland-sys@0.31.11/LICENSE.txt +0 -19
  713. package/third-party/cargo/web-sys@0.3.103/Cargo.toml +0 -2823
  714. package/third-party/cargo/web-sys@0.3.103/LICENSE-APACHE +0 -201
  715. package/third-party/cargo/web-sys@0.3.103/LICENSE-MIT +0 -25
  716. package/third-party/cargo/weezl@0.1.12/Cargo.toml +0 -120
  717. package/third-party/cargo/weezl@0.1.12/LICENSE-APACHE +0 -201
  718. package/third-party/cargo/weezl@0.1.12/LICENSE-MIT +0 -22
  719. package/third-party/cargo/wgpu-core-deps-apple@30.0.0/Cargo.toml +0 -53
  720. package/third-party/cargo/wgpu-core-deps-apple@30.0.0/LICENSE.APACHE +0 -176
  721. package/third-party/cargo/wgpu-core-deps-apple@30.0.0/LICENSE.MIT +0 -21
  722. package/third-party/cargo/wgpu-core@30.0.0/Cargo.toml +0 -237
  723. package/third-party/cargo/wgpu-core@30.0.0/LICENSE.APACHE +0 -176
  724. package/third-party/cargo/wgpu-core@30.0.0/LICENSE.MIT +0 -21
  725. package/third-party/cargo/wgpu-hal@30.0.0/Cargo.toml +0 -541
  726. package/third-party/cargo/wgpu-hal@30.0.0/LICENSE.APACHE +0 -176
  727. package/third-party/cargo/wgpu-hal@30.0.0/LICENSE.MIT +0 -21
  728. package/third-party/cargo/wgpu-naga-bridge@30.0.0/Cargo.toml +0 -46
  729. package/third-party/cargo/wgpu-naga-bridge@30.0.0/LICENSE.APACHE +0 -176
  730. package/third-party/cargo/wgpu-naga-bridge@30.0.0/LICENSE.MIT +0 -21
  731. package/third-party/cargo/wgpu-types@30.0.0/Cargo.toml +0 -161
  732. package/third-party/cargo/wgpu-types@30.0.0/LICENSE.APACHE +0 -176
  733. package/third-party/cargo/wgpu-types@30.0.0/LICENSE.MIT +0 -21
  734. package/third-party/cargo/wgpu@30.0.0/Cargo.toml +0 -278
  735. package/third-party/cargo/wgpu@30.0.0/LICENSE.APACHE +0 -176
  736. package/third-party/cargo/wgpu@30.0.0/LICENSE.MIT +0 -21
  737. package/third-party/cargo/xmlwriter@0.1.0/Cargo.toml +0 -23
  738. package/third-party/cargo/xmlwriter@0.1.0/LICENSE +0 -21
  739. package/third-party/cargo/yazi@0.2.1/Cargo.toml +0 -45
  740. package/third-party/cargo/yazi@0.2.1/LICENSE-APACHE +0 -201
  741. package/third-party/cargo/yazi@0.2.1/LICENSE-MIT +0 -19
  742. package/third-party/cargo/zeno@0.3.3/Cargo.toml +0 -65
  743. package/third-party/cargo/zeno@0.3.3/LICENSE-APACHE +0 -201
  744. package/third-party/cargo/zeno@0.3.3/LICENSE-MIT +0 -25
  745. package/third-party/cargo/zerocopy-derive@0.8.54/Cargo.toml +0 -209
  746. package/third-party/cargo/zerocopy-derive@0.8.54/LICENSE-APACHE +0 -202
  747. package/third-party/cargo/zerocopy-derive@0.8.54/LICENSE-BSD +0 -24
  748. package/third-party/cargo/zerocopy-derive@0.8.54/LICENSE-MIT +0 -26
  749. package/third-party/cargo/zerocopy@0.8.54/Cargo.toml +0 -419
  750. package/third-party/cargo/zerocopy@0.8.54/LICENSE-APACHE +0 -202
  751. package/third-party/cargo/zerocopy@0.8.54/LICENSE-BSD +0 -24
  752. package/third-party/cargo/zerocopy@0.8.54/LICENSE-MIT +0 -26
  753. package/third-party/cargo/zmij@1.0.23/Cargo.toml +0 -90
  754. package/third-party/cargo/zmij@1.0.23/LICENSE-MIT +0 -23
  755. package/third-party/cargo/zune-core@0.5.1/Cargo.toml +0 -47
  756. package/third-party/cargo/zune-core@0.5.1/LICENSE-APACHE +0 -201
  757. package/third-party/cargo/zune-core@0.5.1/LICENSE-MIT +0 -21
  758. package/third-party/cargo/zune-core@0.5.1/LICENSE-ZLIB +0 -19
  759. package/third-party/cargo/zune-jpeg@0.5.15/Cargo.toml +0 -67
  760. package/third-party/cargo/zune-jpeg@0.5.15/LICENSE-APACHE +0 -201
  761. package/third-party/cargo/zune-jpeg@0.5.15/LICENSE-MIT +0 -21
  762. package/third-party/cargo/zune-jpeg@0.5.15/LICENSE-ZLIB +0 -19
  763. package/third-party/npm/@esbuild__darwin-arm64@0.27.4/esbuild-0.27.4-LICENSE.md +0 -21
  764. package/third-party/npm/@esbuild__darwin-arm64@0.27.4/go-LICENSE +0 -27
  765. package/third-party/npm/@esbuild__darwin-arm64@0.27.4/golang-x-sys-c0bba94af5f8-LICENSE +0 -27
  766. package/third-party/npm/@esbuild__darwin-arm64@0.27.4/package.json +0 -20
  767. package/third-party/npm/@floating-ui__core@1.7.5/LICENSE +0 -20
  768. package/third-party/npm/@floating-ui__core@1.7.5/package.json +0 -63
  769. package/third-party/npm/@floating-ui__dom@1.7.6/LICENSE +0 -20
  770. package/third-party/npm/@floating-ui__dom@1.7.6/package.json +0 -71
  771. package/third-party/npm/@floating-ui__react-dom@2.1.8/LICENSE +0 -20
  772. package/third-party/npm/@floating-ui__react-dom@2.1.8/package.json +0 -76
  773. package/third-party/npm/@floating-ui__utils@0.2.11/LICENSE +0 -20
  774. package/third-party/npm/@floating-ui__utils@0.2.11/package.json +0 -70
  775. package/third-party/npm/@radix-ui__primitive@1.1.7/LICENSE +0 -21
  776. package/third-party/npm/@radix-ui__primitive@1.1.7/package.json +0 -79
  777. package/third-party/npm/@radix-ui__react-arrow@1.1.15/LICENSE +0 -21
  778. package/third-party/npm/@radix-ui__react-arrow@1.1.15/package.json +0 -68
  779. package/third-party/npm/@radix-ui__react-collection@1.1.15/LICENSE +0 -21
  780. package/third-party/npm/@radix-ui__react-collection@1.1.15/package.json +0 -71
  781. package/third-party/npm/@radix-ui__react-compose-refs@1.1.5/LICENSE +0 -21
  782. package/third-party/npm/@radix-ui__react-compose-refs@1.1.5/package.json +0 -60
  783. package/third-party/npm/@radix-ui__react-context-menu@2.3.7/LICENSE +0 -21
  784. package/third-party/npm/@radix-ui__react-context-menu@2.3.7/package.json +0 -73
  785. package/third-party/npm/@radix-ui__react-context@1.2.2/LICENSE +0 -21
  786. package/third-party/npm/@radix-ui__react-context@1.2.2/package.json +0 -60
  787. package/third-party/npm/@radix-ui__react-direction@1.1.4/LICENSE +0 -21
  788. package/third-party/npm/@radix-ui__react-direction@1.1.4/package.json +0 -60
  789. package/third-party/npm/@radix-ui__react-dismissable-layer@1.1.19/LICENSE +0 -21
  790. package/third-party/npm/@radix-ui__react-dismissable-layer@1.1.19/package.json +0 -74
  791. package/third-party/npm/@radix-ui__react-focus-guards@1.1.6/LICENSE +0 -21
  792. package/third-party/npm/@radix-ui__react-focus-guards@1.1.6/package.json +0 -60
  793. package/third-party/npm/@radix-ui__react-focus-scope@1.1.16/LICENSE +0 -21
  794. package/third-party/npm/@radix-ui__react-focus-scope@1.1.16/package.json +0 -71
  795. package/third-party/npm/@radix-ui__react-id@1.1.4/LICENSE +0 -21
  796. package/third-party/npm/@radix-ui__react-id@1.1.4/package.json +0 -63
  797. package/third-party/npm/@radix-ui__react-menu@2.1.24/LICENSE +0 -21
  798. package/third-party/npm/@radix-ui__react-menu@2.1.24/package.json +0 -86
  799. package/third-party/npm/@radix-ui__react-popper@1.3.7/LICENSE +0 -21
  800. package/third-party/npm/@radix-ui__react-popper@1.3.7/package.json +0 -78
  801. package/third-party/npm/@radix-ui__react-portal@1.1.17/LICENSE +0 -21
  802. package/third-party/npm/@radix-ui__react-portal@1.1.17/package.json +0 -69
  803. package/third-party/npm/@radix-ui__react-presence@1.1.10/LICENSE +0 -21
  804. package/third-party/npm/@radix-ui__react-presence@1.1.10/package.json +0 -68
  805. package/third-party/npm/@radix-ui__react-primitive@2.1.10/LICENSE +0 -21
  806. package/third-party/npm/@radix-ui__react-primitive@2.1.10/package.json +0 -68
  807. package/third-party/npm/@radix-ui__react-roving-focus@1.1.19/LICENSE +0 -21
  808. package/third-party/npm/@radix-ui__react-roving-focus@1.1.19/package.json +0 -78
  809. package/third-party/npm/@radix-ui__react-slot@1.3.3/LICENSE +0 -21
  810. package/third-party/npm/@radix-ui__react-slot@1.3.3/package.json +0 -63
  811. package/third-party/npm/@radix-ui__react-use-callback-ref@1.1.4/LICENSE +0 -21
  812. package/third-party/npm/@radix-ui__react-use-callback-ref@1.1.4/package.json +0 -60
  813. package/third-party/npm/@radix-ui__react-use-controllable-state@1.2.6/LICENSE +0 -21
  814. package/third-party/npm/@radix-ui__react-use-controllable-state@1.2.6/package.json +0 -65
  815. package/third-party/npm/@radix-ui__react-use-effect-event@0.0.5/LICENSE +0 -21
  816. package/third-party/npm/@radix-ui__react-use-effect-event@0.0.5/package.json +0 -65
  817. package/third-party/npm/@radix-ui__react-use-is-hydrated@0.1.3/LICENSE +0 -21
  818. package/third-party/npm/@radix-ui__react-use-is-hydrated@0.1.3/package.json +0 -61
  819. package/third-party/npm/@radix-ui__react-use-layout-effect@1.1.4/LICENSE +0 -21
  820. package/third-party/npm/@radix-ui__react-use-layout-effect@1.1.4/package.json +0 -60
  821. package/third-party/npm/@radix-ui__react-use-size@1.1.4/LICENSE +0 -21
  822. package/third-party/npm/@radix-ui__react-use-size@1.1.4/package.json +0 -63
  823. package/third-party/npm/aria-hidden@1.2.6/LICENSE +0 -21
  824. package/third-party/npm/aria-hidden@1.2.6/package.json +0 -71
  825. package/third-party/npm/detect-node-es@1.1.0/LICENSE +0 -21
  826. package/third-party/npm/detect-node-es@1.1.0/package.json +0 -29
  827. package/third-party/npm/esbuild@0.27.4/LICENSE.md +0 -21
  828. package/third-party/npm/esbuild@0.27.4/package.json +0 -49
  829. package/third-party/npm/get-nonce@1.0.1/LICENSE +0 -21
  830. package/third-party/npm/get-nonce@1.0.1/package.json +0 -68
  831. package/third-party/npm/mediabunny@1.52.2/LICENSE +0 -373
  832. package/third-party/npm/mediabunny@1.52.2/package.json +0 -136
  833. package/third-party/npm/mediabunny@1.52.2/source/LICENSE +0 -373
  834. package/third-party/npm/mediabunny@1.52.2/source/package.json +0 -136
  835. package/third-party/npm/mediabunny@1.52.2/source/src/adts/adts-demuxer.ts +0 -400
  836. package/third-party/npm/mediabunny@1.52.2/source/src/adts/adts-muxer.ts +0 -124
  837. package/third-party/npm/mediabunny@1.52.2/source/src/adts/adts-reader.ts +0 -85
  838. package/third-party/npm/mediabunny@1.52.2/source/src/aes.ts +0 -307
  839. package/third-party/npm/mediabunny@1.52.2/source/src/codec-data.ts +0 -3178
  840. package/third-party/npm/mediabunny@1.52.2/source/src/codec.ts +0 -1154
  841. package/third-party/npm/mediabunny@1.52.2/source/src/conversion.ts +0 -2042
  842. package/third-party/npm/mediabunny@1.52.2/source/src/custom-coder.ts +0 -212
  843. package/third-party/npm/mediabunny@1.52.2/source/src/decode.ts +0 -263
  844. package/third-party/npm/mediabunny@1.52.2/source/src/demuxer.ts +0 -43
  845. package/third-party/npm/mediabunny@1.52.2/source/src/encode.ts +0 -1412
  846. package/third-party/npm/mediabunny@1.52.2/source/src/flac/flac-demuxer.ts +0 -813
  847. package/third-party/npm/mediabunny@1.52.2/source/src/flac/flac-misc.ts +0 -165
  848. package/third-party/npm/mediabunny@1.52.2/source/src/flac/flac-muxer.ts +0 -350
  849. package/third-party/npm/mediabunny@1.52.2/source/src/hls/hls-demuxer.ts +0 -995
  850. package/third-party/npm/mediabunny@1.52.2/source/src/hls/hls-misc.ts +0 -81
  851. package/third-party/npm/mediabunny@1.52.2/source/src/hls/hls-muxer.ts +0 -1529
  852. package/third-party/npm/mediabunny@1.52.2/source/src/hls/hls-segmented-input.ts +0 -772
  853. package/third-party/npm/mediabunny@1.52.2/source/src/id3.ts +0 -972
  854. package/third-party/npm/mediabunny@1.52.2/source/src/index.ts +0 -319
  855. package/third-party/npm/mediabunny@1.52.2/source/src/input-format.ts +0 -819
  856. package/third-party/npm/mediabunny@1.52.2/source/src/input-track.ts +0 -1141
  857. package/third-party/npm/mediabunny@1.52.2/source/src/input.ts +0 -571
  858. package/third-party/npm/mediabunny@1.52.2/source/src/isobmff/isobmff-boxes.ts +0 -1911
  859. package/third-party/npm/mediabunny@1.52.2/source/src/isobmff/isobmff-demuxer.ts +0 -3953
  860. package/third-party/npm/mediabunny@1.52.2/source/src/isobmff/isobmff-misc.ts +0 -90
  861. package/third-party/npm/mediabunny@1.52.2/source/src/isobmff/isobmff-muxer.ts +0 -1595
  862. package/third-party/npm/mediabunny@1.52.2/source/src/isobmff/isobmff-reader.ts +0 -91
  863. package/third-party/npm/mediabunny@1.52.2/source/src/logging.ts +0 -120
  864. package/third-party/npm/mediabunny@1.52.2/source/src/matroska/ebml.ts +0 -770
  865. package/third-party/npm/mediabunny@1.52.2/source/src/matroska/matroska-demuxer.ts +0 -2598
  866. package/third-party/npm/mediabunny@1.52.2/source/src/matroska/matroska-misc.ts +0 -29
  867. package/third-party/npm/mediabunny@1.52.2/source/src/matroska/matroska-muxer.ts +0 -1360
  868. package/third-party/npm/mediabunny@1.52.2/source/src/media-sink.ts +0 -2589
  869. package/third-party/npm/mediabunny@1.52.2/source/src/media-source.ts +0 -3041
  870. package/third-party/npm/mediabunny@1.52.2/source/src/metadata.ts +0 -335
  871. package/third-party/npm/mediabunny@1.52.2/source/src/misc.ts +0 -1336
  872. package/third-party/npm/mediabunny@1.52.2/source/src/mp3/mp3-demuxer.ts +0 -469
  873. package/third-party/npm/mediabunny@1.52.2/source/src/mp3/mp3-muxer.ts +0 -169
  874. package/third-party/npm/mediabunny@1.52.2/source/src/mp3/mp3-reader.ts +0 -61
  875. package/third-party/npm/mediabunny@1.52.2/source/src/mp3/mp3-writer.ts +0 -121
  876. package/third-party/npm/mediabunny@1.52.2/source/src/mpeg-ts/mpeg-ts-demuxer.ts +0 -2519
  877. package/third-party/npm/mediabunny@1.52.2/source/src/mpeg-ts/mpeg-ts-misc.ts +0 -32
  878. package/third-party/npm/mediabunny@1.52.2/source/src/mpeg-ts/mpeg-ts-muxer.ts +0 -842
  879. package/third-party/npm/mediabunny@1.52.2/source/src/muxer.ts +0 -80
  880. package/third-party/npm/mediabunny@1.52.2/source/src/node.ts +0 -11
  881. package/third-party/npm/mediabunny@1.52.2/source/src/ogg/ogg-demuxer.ts +0 -1087
  882. package/third-party/npm/mediabunny@1.52.2/source/src/ogg/ogg-misc.ts +0 -116
  883. package/third-party/npm/mediabunny@1.52.2/source/src/ogg/ogg-muxer.ts +0 -527
  884. package/third-party/npm/mediabunny@1.52.2/source/src/ogg/ogg-reader.ts +0 -93
  885. package/third-party/npm/mediabunny@1.52.2/source/src/output-format.ts +0 -1425
  886. package/third-party/npm/mediabunny@1.52.2/source/src/output.ts +0 -940
  887. package/third-party/npm/mediabunny@1.52.2/source/src/packet.ts +0 -287
  888. package/third-party/npm/mediabunny@1.52.2/source/src/pcm.ts +0 -112
  889. package/third-party/npm/mediabunny@1.52.2/source/src/reader.ts +0 -391
  890. package/third-party/npm/mediabunny@1.52.2/source/src/resample.ts +0 -287
  891. package/third-party/npm/mediabunny@1.52.2/source/src/sample.ts +0 -3231
  892. package/third-party/npm/mediabunny@1.52.2/source/src/segmented-input.ts +0 -575
  893. package/third-party/npm/mediabunny@1.52.2/source/src/source.ts +0 -2588
  894. package/third-party/npm/mediabunny@1.52.2/source/src/subtitles.ts +0 -131
  895. package/third-party/npm/mediabunny@1.52.2/source/src/target.ts +0 -871
  896. package/third-party/npm/mediabunny@1.52.2/source/src/tsconfig.json +0 -16
  897. package/third-party/npm/mediabunny@1.52.2/source/src/wave/riff-writer.ts +0 -36
  898. package/third-party/npm/mediabunny@1.52.2/source/src/wave/wave-demuxer.ts +0 -583
  899. package/third-party/npm/mediabunny@1.52.2/source/src/wave/wave-muxer.ts +0 -375
  900. package/third-party/npm/mediabunny@1.52.2/source/src/writer.ts +0 -128
  901. package/third-party/npm/react-dom@19.3.0/LICENSE +0 -21
  902. package/third-party/npm/react-dom@19.3.0/package.json +0 -117
  903. package/third-party/npm/react-remove-scroll-bar@2.3.8/package.json +0 -85
  904. package/third-party/npm/react-remove-scroll-bar@2.3.8/react-remove-scroll-bar-LICENSE +0 -21
  905. package/third-party/npm/react-remove-scroll@2.7.2/LICENSE +0 -21
  906. package/third-party/npm/react-remove-scroll@2.7.2/package.json +0 -98
  907. package/third-party/npm/react-style-singleton@2.2.3/LICENSE +0 -21
  908. package/third-party/npm/react-style-singleton@2.2.3/package.json +0 -90
  909. package/third-party/npm/react@19.3.0/LICENSE +0 -21
  910. package/third-party/npm/react@19.3.0/package.json +0 -51
  911. package/third-party/npm/scheduler@0.28.0/LICENSE +0 -21
  912. package/third-party/npm/scheduler@0.28.0/package.json +0 -27
  913. package/third-party/npm/tslib@2.8.1/LICENSE.txt +0 -12
  914. package/third-party/npm/tslib@2.8.1/package.json +0 -47
  915. package/third-party/npm/typescript@5.9.3/LICENSE.txt +0 -55
  916. package/third-party/npm/typescript@5.9.3/ThirdPartyNoticeText.txt +0 -193
  917. package/third-party/npm/typescript@5.9.3/package.json +0 -120
  918. package/third-party/npm/use-callback-ref@1.3.3/LICENSE +0 -21
  919. package/third-party/npm/use-callback-ref@1.3.3/package.json +0 -85
  920. package/third-party/npm/use-sidecar@1.1.3/LICENSE +0 -21
  921. package/third-party/npm/use-sidecar@1.1.3/package.json +0 -93
  922. package/third-party/packages/render-engine/assets/OFL.txt +0 -93
  923. package/third-party/packages/studio/public/fonts/OFL.txt +0 -93
  924. package/third-party/packages/studio/vendor/osmo-icons/LICENSE +0 -21
  925. package/third-party/packages/studio/vendor/shadcn/LICENSE +0 -21
  926. package/third-party/repository-notices.md +0 -41
  927. package/third-party/rust-standard-library/COPYRIGHT-library.html +0 -5556
  928. package/third-party/rust-standard-library/licenses/Apache-2.0.txt +0 -73
  929. package/third-party/rust-standard-library/licenses/BSD-2-Clause.txt +0 -9
  930. package/third-party/rust-standard-library/licenses/CC-BY-SA-4.0.txt +0 -427
  931. package/third-party/rust-standard-library/licenses/GCC-exception-3.1.txt +0 -30
  932. package/third-party/rust-standard-library/licenses/GPL-2.0-only.txt +0 -133
  933. package/third-party/rust-standard-library/licenses/GPL-3.0-or-later.txt +0 -202
  934. package/third-party/rust-standard-library/licenses/ISC.txt +0 -7
  935. package/third-party/rust-standard-library/licenses/LLVM-exception.txt +0 -15
  936. package/third-party/rust-standard-library/licenses/MIT.txt +0 -9
  937. package/third-party/rust-standard-library/licenses/NCSA.txt +0 -29
  938. package/third-party/rust-standard-library/licenses/OFL-1.1.txt +0 -43
  939. package/third-party/rust-standard-library/licenses/Unicode-3.0.txt +0 -39
  940. package/third-party/rust-standard-library/version.txt +0 -1
  941. package/vendor/osmo-lite +0 -0
  942. package/vendor/osmo-scene-0.1.0.tgz +0 -0
  943. package/vendor/platform.json +0 -1
@@ -1,1595 +0,0 @@
1
- /*!
2
- * Copyright (c) 2026-present, Vanilagy and contributors
3
- *
4
- * This Source Code Form is subject to the terms of the Mozilla Public
5
- * License, v. 2.0. If a copy of the MPL was not distributed with this
6
- * file, You can obtain one at https://mozilla.org/MPL/2.0/.
7
- */
8
-
9
- import {
10
- Box,
11
- free,
12
- ftyp,
13
- IsobmffBoxWriter,
14
- mdat,
15
- mfra,
16
- moof,
17
- moov,
18
- sidx,
19
- styp,
20
- vtta,
21
- vttc,
22
- vtte,
23
- } from './isobmff-boxes';
24
- import { Muxer } from '../muxer';
25
- import { Output, OutputAudioTrack, OutputSubtitleTrack, OutputTrack, OutputVideoTrack, TrackType } from '../output';
26
- import { Writer } from '../writer';
27
- import { BufferTarget } from '../target';
28
- import { assert, computeRationalApproximation, last, promiseWithResolvers, Rational, simplifyRational } from '../misc';
29
- import { IsobmffOutputFormatOptions, IsobmffOutputFormat, MovOutputFormat, CmafOutputFormat } from '../output-format';
30
- import { inlineTimestampRegex, SubtitleConfig, SubtitleCue, SubtitleMetadata } from '../subtitles';
31
- import { aacChannelMap, aacFrequencyTable, buildAacAudioSpecificConfig } from '../../shared/aac-misc';
32
- import {
33
- parsePcmCodec,
34
- PCM_AUDIO_CODECS,
35
- PcmAudioCodec,
36
- SubtitleCodec,
37
- validateAudioChunkMetadata,
38
- validateSubtitleMetadata,
39
- validateVideoChunkMetadata,
40
- } from '../codec';
41
- import { MAX_ADTS_FRAME_HEADER_SIZE, MIN_ADTS_FRAME_HEADER_SIZE, readAdtsFrameHeader } from '../adts/adts-reader';
42
- import { FileSlice } from '../reader';
43
- import { EncodedPacket, PacketType } from '../packet';
44
- import {
45
- concatNalUnitsInLengthPrefixed,
46
- extractAvcDecoderConfigurationRecord,
47
- extractHevcDecoderConfigurationRecord,
48
- iterateNalUnitsInAnnexB,
49
- serializeAvcDecoderConfigurationRecord,
50
- serializeHevcDecoderConfigurationRecord,
51
- } from '../codec-data';
52
- import { buildIsobmffMimeType } from './isobmff-misc';
53
- import { MAX_BOX_HEADER_SIZE, MIN_BOX_HEADER_SIZE } from './isobmff-reader';
54
-
55
- export const GLOBAL_TIMESCALE = 57600; // LCM of a bunch of common frame rates (24, 25, 30, 60, 144, ...)
56
- const TIMESTAMP_OFFSET = 2_082_844_800; // Seconds between Jan 1 1904 and Jan 1 1970
57
-
58
- export type Sample = {
59
- timestamp: number;
60
- decodeTimestamp: number;
61
- duration: number;
62
- data: Uint8Array | null;
63
- size: number;
64
- type: PacketType;
65
- timescaleUnitsToNextSample: number;
66
- };
67
-
68
- type Chunk = {
69
- /** The lowest presentation timestamp in this chunk */
70
- startTimestamp: number;
71
- samples: Sample[];
72
- offset: number | null;
73
- // In the case of a fragmented file, this indicates the position of the moof box pointing to the data in this chunk
74
- moofOffset: number | null;
75
- };
76
-
77
- export type IsobmffTrackData = {
78
- muxer: IsobmffMuxer;
79
- timescale: number;
80
- samples: Sample[];
81
- sampleQueue: Sample[]; // For fragmented files
82
- timestampProcessingQueue: Sample[];
83
-
84
- timeToSampleTable: { sampleCount: number; sampleDelta: number }[];
85
- compositionTimeOffsetTable: { sampleCount: number; sampleCompositionTimeOffset: number }[];
86
- lastTimescaleUnits: number | null;
87
- lastSample: Sample | null;
88
- startTimestampOffset: number | null;
89
-
90
- finalizedChunks: Chunk[];
91
- currentChunk: Chunk | null;
92
- compactlyCodedChunkTable: {
93
- firstChunk: number;
94
- samplesPerChunk: number;
95
- }[];
96
- closed: boolean;
97
- } & ({
98
- track: OutputVideoTrack;
99
- type: 'video';
100
- info: {
101
- width: number;
102
- height: number;
103
- pixelAspectRatio: Rational;
104
- decoderConfig: VideoDecoderConfig;
105
- /**
106
- * The "Annex B transformation" involves converting the raw packet data from Annex B to
107
- * "MP4" (length-prefixed) format.
108
- * https://stackoverflow.com/questions/24884827
109
- */
110
- requiresAnnexBTransformation: boolean;
111
- hasAlphaChannel: boolean;
112
- };
113
- } | {
114
- track: OutputAudioTrack;
115
- type: 'audio';
116
- info: {
117
- numberOfChannels: number;
118
- sampleRate: number;
119
- decoderConfig: AudioDecoderConfig;
120
- /**
121
- * The "PCM transformation" is making every sample in the sample table be exactly one PCM audio sample long.
122
- * Some players expect this for PCM audio.
123
- */
124
- requiresPcmTransformation: boolean;
125
- expectedNextPcmPacketTimestamp: number | null;
126
- /**
127
- * The "ADTS stripping" involves removing the ADTS header from each AAC packet. SOBMFF stores raw AAC data, not
128
- * ADTS-wrapped data.
129
- */
130
- requiresAdtsStripping: boolean;
131
- firstPacket: EncodedPacket;
132
- };
133
- } | {
134
- track: OutputSubtitleTrack;
135
- type: 'subtitle';
136
- info: {
137
- config: SubtitleConfig;
138
- };
139
- lastCueEndTimestamp: number;
140
- cueQueue: SubtitleCue[];
141
- nextSourceId: number;
142
- cueToSourceId: WeakMap<SubtitleCue, number>;
143
- });
144
-
145
- export type IsobmffVideoTrackData = IsobmffTrackData & { type: 'video' };
146
- export type IsobmffAudioTrackData = IsobmffTrackData & { type: 'audio' };
147
- export type IsobmffSubtitleTrackData = IsobmffTrackData & { type: 'subtitle' };
148
-
149
- export type IsobmffMetadata = {
150
- name?: string;
151
- };
152
-
153
- export const getTrackMetadata = (trackData: IsobmffTrackData) => {
154
- const metadata: IsobmffMetadata = {};
155
- const track = trackData.track as OutputTrack;
156
-
157
- if (track.metadata.name !== undefined) {
158
- metadata.name = track.metadata.name;
159
- }
160
-
161
- return metadata;
162
- };
163
-
164
- export const intoTimescale = (timeInSeconds: number, timescale: number, round = true) => {
165
- const value = timeInSeconds * timescale;
166
- return round ? Math.round(value) : value;
167
- };
168
-
169
- export class IsobmffMuxer extends Muxer {
170
- format: IsobmffOutputFormat;
171
- private writer: Writer | null = null;
172
- private boxWriter: IsobmffBoxWriter | null = null;
173
- private initWriter: Writer | null = null;
174
- private initBoxWriter: IsobmffBoxWriter | null = null;
175
- private fastStart!: NonNullable<IsobmffOutputFormatOptions['fastStart']>;
176
- isFragmented!: boolean;
177
-
178
- isQuickTime: boolean;
179
- isCmaf: boolean;
180
-
181
- private auxTarget = new BufferTarget();
182
- private auxWriter = new Writer(this.auxTarget, false);
183
- private auxBoxWriter = new IsobmffBoxWriter(this.auxWriter);
184
-
185
- private mdat: Box | null = null;
186
- private ftypSize: number | null = null;
187
-
188
- trackDatas: IsobmffTrackData[] = [];
189
- private allTracksKnown = promiseWithResolvers();
190
-
191
- creationTime = Math.floor(Date.now() / 1000) + TIMESTAMP_OFFSET;
192
- private finalizedChunks: Chunk[] = [];
193
-
194
- private nextFragmentNumber = 1;
195
- // Only relevant for fragmented files, to make sure new fragments start with the highest timestamp seen so far
196
- private maxWrittenTimestamp = -Infinity;
197
- minWrittenTimestamp = Infinity;
198
- maxWrittenEndTimestamp = -Infinity;
199
- private minimumFragmentDuration: number;
200
- private segmentHeaderSize: number | null = null;
201
-
202
- constructor(output: Output, format: IsobmffOutputFormat) {
203
- super(output);
204
-
205
- this.format = format;
206
- this.isQuickTime = format instanceof MovOutputFormat;
207
- this.isCmaf = format instanceof CmafOutputFormat;
208
- this.minimumFragmentDuration = format._options.minimumFragmentDuration
209
- ?? (format instanceof CmafOutputFormat ? Infinity : 1);
210
-
211
- this.auxWriter.start();
212
- }
213
-
214
- async start() {
215
- const release = await this.mutex.acquire();
216
-
217
- if (!this.isCmaf) {
218
- this.writer = await this.output._getRootWriter(target => (
219
- this.format._options.fastStart !== undefined
220
- ? this.format._options.fastStart === 'fragmented'
221
- : target instanceof BufferTarget // Since if this is the case we'll use 'in-memory'
222
- ));
223
- this.boxWriter = new IsobmffBoxWriter(this.writer);
224
-
225
- // If the fastStart option isn't defined, enable in-memory fast start if the target is an ArrayBuffer, as
226
- // the memory usage remains identical
227
- this.fastStart = this.format._options.fastStart
228
- ?? (this.writer.target instanceof BufferTarget ? 'in-memory' : false);
229
- this.isFragmented = this.fastStart === 'fragmented';
230
- } else {
231
- this.fastStart = 'fragmented';
232
- this.isFragmented = true;
233
- }
234
-
235
- if (this.isCmaf) {
236
- if (!this.output._hasInitTarget()) {
237
- throw new Error(
238
- `CMAF outputs require the initTarget field in OutputOptions to be set; the init segment`
239
- + ` will be written to it.`,
240
- );
241
- }
242
-
243
- // Set up the init writer to which we'll write the init segment
244
- const initTarget = await this.output._getInitTarget();
245
- const initWriter = new Writer(initTarget, true);
246
- initWriter.start();
247
-
248
- this.initWriter = initWriter;
249
- this.initBoxWriter = new IsobmffBoxWriter(initWriter);
250
- }
251
-
252
- const holdsAvc = this.output.tracks.some(x => x.isVideoTrack() && x.source._codec === 'avc');
253
-
254
- // Write the header
255
- {
256
- const boxWriter = this.initBoxWriter ?? this.boxWriter;
257
- assert(boxWriter);
258
-
259
- if (this.format._options.onFtyp) {
260
- boxWriter.writer.startTrackingWrites();
261
- }
262
-
263
- boxWriter.writeBox(ftyp({
264
- isQuickTime: this.isQuickTime,
265
- holdsAvc: holdsAvc,
266
- fragmented: this.isFragmented,
267
- cmaf: this.isCmaf,
268
- }));
269
-
270
- if (this.format._options.onFtyp) {
271
- const { data, start } = boxWriter.writer.stopTrackingWrites();
272
- this.format._options.onFtyp(data, start);
273
- }
274
-
275
- this.ftypSize = boxWriter.writer.getPos();
276
-
277
- if (this.isCmaf) {
278
- await this.initWriter!.flush();
279
- }
280
- }
281
-
282
- if (this.fastStart === 'in-memory') {
283
- // We're write at finalization
284
- } else if (this.fastStart === 'reserve') {
285
- // Validate that all tracks have set maximumPacketCount
286
- for (const track of this.output.tracks) {
287
- if (track.metadata.maximumPacketCount === undefined) {
288
- throw new Error(
289
- 'All tracks must specify maximumPacketCount in their metadata when using'
290
- + ' fastStart: \'reserve\'.',
291
- );
292
- }
293
- }
294
-
295
- // We'll start writing once we know all tracks
296
- } else if (this.isFragmented) {
297
- // We write the moov box once we write out the first fragment to make sure we get the decoder configs
298
- } else {
299
- assert(this.writer);
300
- assert(this.boxWriter);
301
-
302
- if (this.format._options.onMdat) {
303
- this.writer.startTrackingWrites();
304
- }
305
-
306
- this.mdat = mdat(true); // Reserve large size by default, can refine this when finalizing.
307
- this.boxWriter.writeBox(this.mdat);
308
- }
309
-
310
- await this.writer?.flush();
311
-
312
- release();
313
- }
314
-
315
- private allTracksAreKnown() {
316
- for (const track of this.output.tracks) {
317
- if (!track.source._closed && !this.trackDatas.some(x => x.track === track)) {
318
- return false; // We haven't seen a sample from this open track yet
319
- }
320
- }
321
-
322
- return true;
323
- }
324
-
325
- async getMimeType() {
326
- await this.allTracksKnown.promise;
327
-
328
- const codecStrings = this.trackDatas.map((trackData) => {
329
- if (trackData.type === 'video') {
330
- return trackData.info.decoderConfig.codec;
331
- } else if (trackData.type === 'audio') {
332
- return trackData.info.decoderConfig.codec;
333
- } else {
334
- const map: Record<SubtitleCodec, string> = {
335
- webvtt: 'wvtt',
336
- };
337
- return map[trackData.track.source._codec];
338
- }
339
- });
340
-
341
- return buildIsobmffMimeType({
342
- isQuickTime: this.isQuickTime,
343
- hasVideo: this.trackDatas.some(x => x.type === 'video'),
344
- hasAudio: this.trackDatas.some(x => x.type === 'audio'),
345
- codecStrings,
346
- });
347
- }
348
-
349
- private getVideoTrackData(track: OutputVideoTrack, packet: EncodedPacket, meta?: EncodedVideoChunkMetadata) {
350
- const existingTrackData = this.trackDatas.find(x => x.track === track);
351
- if (existingTrackData) {
352
- return existingTrackData as IsobmffVideoTrackData;
353
- }
354
-
355
- validateVideoChunkMetadata(meta);
356
-
357
- assert(meta);
358
- assert(meta.decoderConfig);
359
-
360
- const decoderConfig = { ...meta.decoderConfig };
361
- assert(decoderConfig.codedWidth !== undefined);
362
- assert(decoderConfig.codedHeight !== undefined);
363
-
364
- let requiresAnnexBTransformation = false;
365
-
366
- if (track.source._codec === 'avc' && !decoderConfig.description) {
367
- // ISOBMFF can only hold AVC in the AVCC format, not in Annex B, but the missing description indicates
368
- // Annex B. This means we'll need to do some converterino.
369
-
370
- const decoderConfigurationRecord = extractAvcDecoderConfigurationRecord(packet.data);
371
- if (!decoderConfigurationRecord) {
372
- throw new Error(
373
- 'Couldn\'t extract an AVCDecoderConfigurationRecord from the AVC packet. Make sure the packets are'
374
- + ' in Annex B format (as specified in ITU-T-REC-H.264) when not providing a description, or'
375
- + ' provide a description (must be an AVCDecoderConfigurationRecord as specified in ISO 14496-15)'
376
- + ' and ensure the packets are in AVCC format.',
377
- );
378
- }
379
-
380
- decoderConfig.description = serializeAvcDecoderConfigurationRecord(decoderConfigurationRecord);
381
- requiresAnnexBTransformation = true;
382
- } else if (track.source._codec === 'hevc' && !decoderConfig.description) {
383
- // ISOBMFF can only hold HEVC in the HEVC format, not in Annex B, but the missing description indicates
384
- // Annex B. This means we'll need to do some converterino.
385
-
386
- const decoderConfigurationRecord = extractHevcDecoderConfigurationRecord(packet.data);
387
- if (!decoderConfigurationRecord) {
388
- throw new Error(
389
- 'Couldn\'t extract an HEVCDecoderConfigurationRecord from the HEVC packet. Make sure the packets'
390
- + ' are in Annex B format (as specified in ITU-T-REC-H.265) when not providing a description, or'
391
- + ' provide a description (must be an HEVCDecoderConfigurationRecord as specified in ISO 14496-15)'
392
- + ' and ensure the packets are in HEVC format.',
393
- );
394
- }
395
-
396
- decoderConfig.description = serializeHevcDecoderConfigurationRecord(decoderConfigurationRecord);
397
- requiresAnnexBTransformation = true;
398
- }
399
-
400
- // The frame rate set by the user may not be an integer. Since timescale is an integer, we'll approximate the
401
- // frame time (inverse of frame rate) with a rational number, then use that approximation's denominator
402
- // as the timescale.
403
- const timescale = computeRationalApproximation(
404
- 1 / (track.metadata.frameRate ?? GLOBAL_TIMESCALE),
405
- 1e6,
406
- ).den;
407
-
408
- const displayAspectWidth = decoderConfig.displayAspectWidth;
409
- const displayAspectHeight = decoderConfig.displayAspectHeight;
410
- const pixelAspectRatio = displayAspectWidth === undefined || displayAspectHeight === undefined
411
- ? { num: 1, den: 1 }
412
- : simplifyRational({
413
- num: displayAspectWidth * decoderConfig.codedHeight,
414
- den: displayAspectHeight * decoderConfig.codedWidth,
415
- });
416
-
417
- // Kicks for ProRes 4444.
418
- const hasAlphaChannel = decoderConfig.codec === 'ap4h' || decoderConfig.codec === 'ap4x';
419
-
420
- const newTrackData: IsobmffVideoTrackData = {
421
- muxer: this,
422
- track,
423
- type: 'video',
424
- info: {
425
- width: decoderConfig.codedWidth,
426
- height: decoderConfig.codedHeight,
427
- pixelAspectRatio,
428
- decoderConfig: decoderConfig,
429
- requiresAnnexBTransformation,
430
- hasAlphaChannel,
431
- },
432
- timescale,
433
- samples: [],
434
- sampleQueue: [],
435
- timestampProcessingQueue: [],
436
- timeToSampleTable: [],
437
- compositionTimeOffsetTable: [],
438
- lastTimescaleUnits: null,
439
- lastSample: null,
440
- startTimestampOffset: null,
441
- finalizedChunks: [],
442
- currentChunk: null,
443
- compactlyCodedChunkTable: [],
444
- closed: false,
445
- };
446
-
447
- this.trackDatas.push(newTrackData);
448
- this.trackDatas.sort((a, b) => a.track.id - b.track.id);
449
-
450
- if (this.allTracksAreKnown()) {
451
- this.allTracksKnown.resolve();
452
- }
453
-
454
- return newTrackData;
455
- }
456
-
457
- private getAudioTrackData(track: OutputAudioTrack, packet: EncodedPacket, meta?: EncodedAudioChunkMetadata) {
458
- const existingTrackData = this.trackDatas.find(x => x.track === track);
459
- if (existingTrackData) {
460
- return existingTrackData as IsobmffAudioTrackData;
461
- }
462
-
463
- validateAudioChunkMetadata(meta);
464
-
465
- assert(meta);
466
- assert(meta.decoderConfig);
467
-
468
- const decoderConfig = { ...meta.decoderConfig };
469
- let requiresAdtsStripping = false;
470
-
471
- if (track.source._codec === 'aac' && !decoderConfig.description) {
472
- // ISOBMFF can only hold AAC in raw format, not ADTS, but the missing description indicates ADTS.
473
- // Parse the first packet to extract the AudioSpecificConfig.
474
- const adtsFrame = readAdtsFrameHeader(FileSlice.tempFromBytes(packet.data));
475
- if (!adtsFrame) {
476
- throw new Error(
477
- 'Couldn\'t parse ADTS header from the AAC packet. Make sure the packets are in ADTS format'
478
- + ' (as specified in ISO 13818-7) when not providing a description, or provide a description'
479
- + ' (must be an AudioSpecificConfig as specified in ISO 14496-3) and ensure the packets'
480
- + ' are raw AAC data.',
481
- );
482
- }
483
-
484
- const sampleRate = aacFrequencyTable[adtsFrame.samplingFrequencyIndex];
485
- const numberOfChannels = aacChannelMap[adtsFrame.channelConfiguration];
486
-
487
- if (sampleRate === undefined || numberOfChannels === undefined) {
488
- throw new Error('Invalid ADTS frame header.');
489
- }
490
-
491
- decoderConfig.description = buildAacAudioSpecificConfig({
492
- objectType: adtsFrame.objectType,
493
- sampleRate,
494
- numberOfChannels,
495
- });
496
- requiresAdtsStripping = true;
497
- }
498
-
499
- const newTrackData: IsobmffAudioTrackData = {
500
- muxer: this,
501
- track,
502
- type: 'audio',
503
- info: {
504
- numberOfChannels: meta.decoderConfig.numberOfChannels,
505
- sampleRate: meta.decoderConfig.sampleRate,
506
- decoderConfig,
507
- requiresPcmTransformation:
508
- !this.isFragmented
509
- && (PCM_AUDIO_CODECS as readonly string[]).includes(track.source._codec),
510
- expectedNextPcmPacketTimestamp: null,
511
- requiresAdtsStripping,
512
- firstPacket: packet,
513
- },
514
- timescale: decoderConfig.sampleRate,
515
- samples: [],
516
- sampleQueue: [],
517
- timestampProcessingQueue: [],
518
- timeToSampleTable: [],
519
- compositionTimeOffsetTable: [],
520
- lastTimescaleUnits: null,
521
- lastSample: null,
522
- startTimestampOffset: null,
523
- finalizedChunks: [],
524
- currentChunk: null,
525
- compactlyCodedChunkTable: [],
526
- closed: false,
527
- };
528
-
529
- this.trackDatas.push(newTrackData);
530
- this.trackDatas.sort((a, b) => a.track.id - b.track.id);
531
-
532
- if (this.allTracksAreKnown()) {
533
- this.allTracksKnown.resolve();
534
- }
535
-
536
- return newTrackData;
537
- }
538
-
539
- private getSubtitleTrackData(track: OutputSubtitleTrack, meta?: SubtitleMetadata) {
540
- const existingTrackData = this.trackDatas.find(x => x.track === track);
541
- if (existingTrackData) {
542
- return existingTrackData as IsobmffSubtitleTrackData;
543
- }
544
-
545
- validateSubtitleMetadata(meta);
546
-
547
- assert(meta);
548
- assert(meta.config);
549
-
550
- const newTrackData: IsobmffSubtitleTrackData = {
551
- muxer: this,
552
- track,
553
- type: 'subtitle',
554
- info: {
555
- config: meta.config,
556
- },
557
- timescale: 1000, // Reasonable
558
- samples: [],
559
- sampleQueue: [],
560
- timestampProcessingQueue: [],
561
- timeToSampleTable: [],
562
- compositionTimeOffsetTable: [],
563
- lastTimescaleUnits: null,
564
- lastSample: null,
565
- startTimestampOffset: null,
566
- finalizedChunks: [],
567
- currentChunk: null,
568
- compactlyCodedChunkTable: [],
569
- closed: false,
570
-
571
- lastCueEndTimestamp: 0,
572
- cueQueue: [],
573
- nextSourceId: 0,
574
- cueToSourceId: new WeakMap(),
575
- };
576
-
577
- this.trackDatas.push(newTrackData);
578
- this.trackDatas.sort((a, b) => a.track.id - b.track.id);
579
-
580
- if (this.allTracksAreKnown()) {
581
- this.allTracksKnown.resolve();
582
- }
583
-
584
- return newTrackData;
585
- }
586
-
587
- async addEncodedVideoPacket(track: OutputVideoTrack, packet: EncodedPacket, meta?: EncodedVideoChunkMetadata) {
588
- const release = await this.mutex.acquire();
589
-
590
- try {
591
- const trackData = this.getVideoTrackData(track, packet, meta);
592
-
593
- let packetData = packet.data;
594
- if (trackData.info.requiresAnnexBTransformation) {
595
- const nalUnits = [...iterateNalUnitsInAnnexB(packetData)]
596
- .map(loc => packetData.subarray(loc.offset, loc.offset + loc.length));
597
- if (nalUnits.length === 0) {
598
- // It's not valid Annex B data
599
- throw new Error(
600
- 'Failed to transform packet data. Make sure all packets are provided in Annex B format, as'
601
- + ' specified in ITU-T-REC-H.264 and ITU-T-REC-H.265.',
602
- );
603
- }
604
-
605
- // We don't strip things like SPS or PPS NALUs here, mainly because they can also appear in the middle
606
- // of a stream and potentially modify the parameters of it. So, let's just leave them in to be sure.
607
- packetData = concatNalUnitsInLengthPrefixed(nalUnits, 4);
608
- }
609
-
610
- this.validateTimestamp(
611
- trackData.track,
612
- packet.timestamp,
613
- packet.type === 'key',
614
- );
615
- const internalSample = this.createSampleForTrack(
616
- trackData,
617
- packetData,
618
- packet.timestamp,
619
- packet.duration,
620
- packet.type,
621
- );
622
-
623
- await this.registerSample(trackData, internalSample);
624
- } finally {
625
- release();
626
- }
627
- }
628
-
629
- async addEncodedAudioPacket(track: OutputAudioTrack, packet: EncodedPacket, meta?: EncodedAudioChunkMetadata) {
630
- const release = await this.mutex.acquire();
631
-
632
- try {
633
- const trackData = this.getAudioTrackData(track, packet, meta);
634
-
635
- let packetData = packet.data;
636
- if (trackData.info.requiresAdtsStripping) {
637
- const adtsFrame = readAdtsFrameHeader(FileSlice.tempFromBytes(packetData));
638
- if (!adtsFrame) {
639
- throw new Error('Expected ADTS frame, didn\'t get one.');
640
- }
641
-
642
- const headerLength = adtsFrame.crcCheck === null
643
- ? MIN_ADTS_FRAME_HEADER_SIZE
644
- : MAX_ADTS_FRAME_HEADER_SIZE;
645
- packetData = packetData.subarray(headerLength);
646
- }
647
-
648
- this.validateTimestamp(
649
- trackData.track,
650
- packet.timestamp,
651
- packet.type === 'key',
652
- );
653
-
654
- let timestamp = packet.timestamp;
655
- let duration = packet.duration;
656
-
657
- if (trackData.info.requiresPcmTransformation) {
658
- // Packets may have only approximate timestamp/duration information, but for our PCM logic, we need it
659
- // to be precise. So here, we refine the values.
660
-
661
- const pcmInfo = parsePcmCodec(
662
- trackData.info.decoderConfig.codec as PcmAudioCodec,
663
- );
664
- const frameSize = pcmInfo.sampleSize * trackData.info.numberOfChannels;
665
-
666
- // Compute the precise duration
667
- duration = packetData.byteLength / frameSize / trackData.info.sampleRate;
668
-
669
- if (trackData.info.expectedNextPcmPacketTimestamp !== null) {
670
- const diff = timestamp - trackData.info.expectedNextPcmPacketTimestamp;
671
- if (diff < 0.01) {
672
- timestamp = trackData.info.expectedNextPcmPacketTimestamp;
673
- } else {
674
- const paddedDuration = await this.padWithSilence(
675
- trackData,
676
- trackData.info.expectedNextPcmPacketTimestamp,
677
- diff,
678
- );
679
- timestamp = trackData.info.expectedNextPcmPacketTimestamp + paddedDuration;
680
- }
681
- }
682
-
683
- trackData.info.expectedNextPcmPacketTimestamp = timestamp + duration;
684
- }
685
-
686
- const internalSample = this.createSampleForTrack(
687
- trackData,
688
- packetData,
689
- timestamp,
690
- duration,
691
- packet.type,
692
- );
693
-
694
- await this.registerSample(trackData, internalSample);
695
- } finally {
696
- release();
697
- }
698
- }
699
-
700
- private async padWithSilence(trackData: IsobmffAudioTrackData, timestamp: number, duration: number) {
701
- const deltaInTimescale = intoTimescale(duration, trackData.timescale);
702
- duration = deltaInTimescale / trackData.timescale;
703
-
704
- if (deltaInTimescale > 0) {
705
- const { sampleSize, silentValue } = parsePcmCodec(
706
- trackData.info.decoderConfig.codec as PcmAudioCodec,
707
- );
708
- const samplesNeeded = deltaInTimescale * trackData.info.numberOfChannels;
709
- const data = new Uint8Array(sampleSize * samplesNeeded).fill(silentValue);
710
-
711
- const paddingSample = this.createSampleForTrack(
712
- trackData,
713
- new Uint8Array(data.buffer),
714
- timestamp,
715
- duration,
716
- 'key',
717
- );
718
- await this.registerSample(trackData, paddingSample);
719
- }
720
-
721
- return duration;
722
- }
723
-
724
- async addSubtitleCue(track: OutputSubtitleTrack, cue: SubtitleCue, meta?: SubtitleMetadata) {
725
- const release = await this.mutex.acquire();
726
-
727
- try {
728
- const trackData = this.getSubtitleTrackData(track, meta);
729
-
730
- this.validateTimestamp(trackData.track, cue.timestamp, true);
731
-
732
- if (track.source._codec === 'webvtt') {
733
- trackData.cueQueue.push(cue);
734
- await this.processWebVTTCues(trackData, cue.timestamp);
735
- } else {
736
- // TODO
737
- }
738
- } finally {
739
- release();
740
- }
741
- }
742
-
743
- private async processWebVTTCues(trackData: IsobmffSubtitleTrackData, until: number) {
744
- // WebVTT cues need to undergo special processing as empty sections need to be padded out with samples, and
745
- // overlapping samples require special logic. The algorithm produces the format specified in ISO 14496-30.
746
-
747
- while (trackData.cueQueue.length > 0) {
748
- const timestamps = new Set<number>([]);
749
- for (const cue of trackData.cueQueue) {
750
- assert(cue.timestamp <= until);
751
- assert(trackData.lastCueEndTimestamp <= cue.timestamp + cue.duration);
752
-
753
- timestamps.add(Math.max(cue.timestamp, trackData.lastCueEndTimestamp)); // Start timestamp
754
- timestamps.add(cue.timestamp + cue.duration); // End timestamp
755
- }
756
-
757
- const sortedTimestamps = [...timestamps].sort((a, b) => a - b);
758
-
759
- // These are the timestamps of the next sample we'll create:
760
- const sampleStart = sortedTimestamps[0]!;
761
- const sampleEnd = sortedTimestamps[1] ?? sampleStart;
762
-
763
- if (until < sampleEnd) {
764
- break;
765
- }
766
-
767
- // We may need to pad out empty space with an vtte box
768
- if (trackData.lastCueEndTimestamp < sampleStart) {
769
- this.auxWriter.seek(0);
770
- const box = vtte();
771
- this.auxBoxWriter.writeBox(box);
772
-
773
- const body = this.auxTarget._getSlice(0, this.auxWriter.getPos());
774
- const sample = this.createSampleForTrack(
775
- trackData,
776
- body,
777
- trackData.lastCueEndTimestamp,
778
- sampleStart - trackData.lastCueEndTimestamp,
779
- 'key',
780
- );
781
-
782
- await this.registerSample(trackData, sample);
783
- trackData.lastCueEndTimestamp = sampleStart;
784
- }
785
-
786
- this.auxWriter.seek(0);
787
-
788
- for (let i = 0; i < trackData.cueQueue.length; i++) {
789
- const cue = trackData.cueQueue[i]!;
790
-
791
- if (cue.timestamp >= sampleEnd) {
792
- break;
793
- }
794
-
795
- inlineTimestampRegex.lastIndex = 0;
796
- const containsTimestamp = inlineTimestampRegex.test(cue.text);
797
-
798
- const endTimestamp = cue.timestamp + cue.duration;
799
- let sourceId = trackData.cueToSourceId.get(cue);
800
- if (sourceId === undefined && sampleEnd < endTimestamp) {
801
- // We know this cue will appear in more than one sample, therefore we need to mark it with a
802
- // unique ID
803
- sourceId = trackData.nextSourceId++;
804
- trackData.cueToSourceId.set(cue, sourceId);
805
- }
806
-
807
- if (cue.notes) {
808
- // Any notes/comments are included in a special vtta box
809
- const box = vtta(cue.notes);
810
- this.auxBoxWriter.writeBox(box);
811
- }
812
-
813
- const box = vttc(
814
- cue.text,
815
- containsTimestamp ? sampleStart : null,
816
- cue.identifier ?? null,
817
- cue.settings ?? null,
818
- sourceId ?? null,
819
- );
820
- this.auxBoxWriter.writeBox(box);
821
-
822
- if (endTimestamp === sampleEnd) {
823
- // The cue won't appear in any future sample, so we're done with it
824
- trackData.cueQueue.splice(i--, 1);
825
- }
826
- }
827
-
828
- const body = this.auxTarget._getSlice(0, this.auxWriter.getPos());
829
- const sample = this.createSampleForTrack(trackData, body, sampleStart, sampleEnd - sampleStart, 'key');
830
-
831
- await this.registerSample(trackData, sample);
832
- trackData.lastCueEndTimestamp = sampleEnd;
833
- }
834
- }
835
-
836
- private createSampleForTrack(
837
- trackData: IsobmffTrackData,
838
- data: Uint8Array,
839
- timestamp: number,
840
- duration: number,
841
- type: PacketType,
842
- ) {
843
- const sample: Sample = {
844
- timestamp,
845
- decodeTimestamp: timestamp, // This may be refined later
846
- duration,
847
- data,
848
- size: data.byteLength,
849
- type,
850
- timescaleUnitsToNextSample: intoTimescale(duration, trackData.timescale), // Will be refined
851
- };
852
-
853
- return sample;
854
- }
855
-
856
- private processTimestamps(trackData: IsobmffTrackData, nextSample?: Sample) {
857
- if (trackData.timestampProcessingQueue.length === 0) {
858
- return;
859
- }
860
-
861
- if (trackData.type === 'audio' && trackData.info.requiresPcmTransformation) {
862
- if (!this.isFragmented) {
863
- // The first timestamp is the lowest
864
- trackData.startTimestampOffset ??= trackData.timestampProcessingQueue[0]!.timestamp;
865
- }
866
-
867
- let totalDuration = 0;
868
-
869
- // Compute the total duration in the track timescale (which is equal to the amount of PCM audio samples)
870
- // and simply say that's how many new samples there are.
871
-
872
- for (let i = 0; i < trackData.timestampProcessingQueue.length; i++) {
873
- const sample = trackData.timestampProcessingQueue[i]!;
874
- const duration = intoTimescale(sample.duration, trackData.timescale);
875
- totalDuration += duration;
876
- }
877
-
878
- if (trackData.timeToSampleTable.length === 0) {
879
- trackData.timeToSampleTable.push({
880
- sampleCount: totalDuration,
881
- sampleDelta: 1,
882
- });
883
- } else {
884
- const lastEntry = last(trackData.timeToSampleTable)!;
885
- lastEntry.sampleCount += totalDuration;
886
- }
887
-
888
- trackData.timestampProcessingQueue.length = 0;
889
- return;
890
- }
891
-
892
- const sortedTimestamps = trackData.timestampProcessingQueue.map(x => x.timestamp).sort((a, b) => a - b);
893
-
894
- if (!this.isFragmented) {
895
- trackData.startTimestampOffset ??= sortedTimestamps[0]!;
896
- }
897
-
898
- for (let i = 0; i < trackData.timestampProcessingQueue.length; i++) {
899
- const sample = trackData.timestampProcessingQueue[i]!;
900
-
901
- // Since the user only supplies presentation time, but these may be out of order, we reverse-engineer from
902
- // that a sensible decode timestamp. The notion of a decode timestamp doesn't really make sense
903
- // (presentation timestamp & decode order are all you need), but it is a concept in ISOBMFF so we need to
904
- // model it.
905
- sample.decodeTimestamp = sortedTimestamps[i]!;
906
-
907
- const sampleCompositionTimeOffset
908
- = intoTimescale(sample.timestamp - sample.decodeTimestamp, trackData.timescale);
909
- const durationInTimescale = intoTimescale(sample.duration, trackData.timescale);
910
-
911
- if (trackData.lastTimescaleUnits !== null) {
912
- assert(trackData.lastSample);
913
-
914
- const timescaleUnits = intoTimescale(sample.decodeTimestamp, trackData.timescale, false);
915
- const delta = Math.round(timescaleUnits - trackData.lastTimescaleUnits);
916
- assert(delta >= 0);
917
-
918
- trackData.lastTimescaleUnits += delta;
919
- trackData.lastSample.timescaleUnitsToNextSample = delta;
920
-
921
- if (!this.isFragmented) {
922
- let lastTableEntry = last(trackData.timeToSampleTable);
923
- assert(lastTableEntry);
924
-
925
- if (lastTableEntry.sampleCount === 1) {
926
- lastTableEntry.sampleDelta = delta;
927
-
928
- const entryBefore = trackData.timeToSampleTable[trackData.timeToSampleTable.length - 2];
929
- if (entryBefore && entryBefore.sampleDelta === delta) {
930
- // If the delta is the same as the previous one, merge the two entries
931
- entryBefore.sampleCount++;
932
- trackData.timeToSampleTable.pop();
933
- lastTableEntry = entryBefore;
934
- }
935
- } else if (lastTableEntry.sampleDelta !== delta) {
936
- // The delta has changed, so we need a new entry to reach the current sample
937
- lastTableEntry.sampleCount--;
938
- trackData.timeToSampleTable.push(lastTableEntry = {
939
- sampleCount: 1,
940
- sampleDelta: delta,
941
- });
942
- }
943
-
944
- if (lastTableEntry.sampleDelta === durationInTimescale) {
945
- // The sample's duration matches the delta, so we can increment the count
946
- lastTableEntry.sampleCount++;
947
- } else {
948
- // Add a new entry in order to maintain the last sample's true duration
949
- trackData.timeToSampleTable.push({
950
- sampleCount: 1,
951
- sampleDelta: durationInTimescale,
952
- });
953
- }
954
-
955
- const lastCompositionTimeOffsetTableEntry = last(trackData.compositionTimeOffsetTable);
956
- assert(lastCompositionTimeOffsetTableEntry);
957
-
958
- if (
959
- lastCompositionTimeOffsetTableEntry.sampleCompositionTimeOffset === sampleCompositionTimeOffset
960
- ) {
961
- // Simply increment the count
962
- lastCompositionTimeOffsetTableEntry.sampleCount++;
963
- } else {
964
- // The composition time offset has changed, so create a new entry with the new composition time
965
- // offset
966
- trackData.compositionTimeOffsetTable.push({
967
- sampleCount: 1,
968
- sampleCompositionTimeOffset: sampleCompositionTimeOffset,
969
- });
970
- }
971
- }
972
- } else {
973
- // Decode timestamp of the first sample
974
- trackData.lastTimescaleUnits = intoTimescale(sample.decodeTimestamp, trackData.timescale, false);
975
-
976
- if (!this.isFragmented) {
977
- trackData.timeToSampleTable.push({
978
- sampleCount: 1,
979
- sampleDelta: durationInTimescale,
980
- });
981
- trackData.compositionTimeOffsetTable.push({
982
- sampleCount: 1,
983
- sampleCompositionTimeOffset: sampleCompositionTimeOffset,
984
- });
985
- }
986
- }
987
-
988
- trackData.lastSample = sample;
989
- }
990
-
991
- trackData.timestampProcessingQueue.length = 0;
992
-
993
- assert(trackData.lastSample);
994
- assert(trackData.lastTimescaleUnits !== null);
995
-
996
- if (nextSample !== undefined && trackData.lastSample.timescaleUnitsToNextSample === 0) {
997
- assert(nextSample.type === 'key');
998
-
999
- // Given the next sample, we can make a guess about the duration of the last sample. This avoids having
1000
- // the last sample's duration in each fragment be "0" for fragmented files. The guess we make here is
1001
- // actually correct most of the time, since typically, no delta frame with a lower timestamp follows the key
1002
- // frame (although it can happen).
1003
- const timescaleUnits = intoTimescale(nextSample.timestamp, trackData.timescale, false);
1004
- const delta = Math.round(timescaleUnits - trackData.lastTimescaleUnits);
1005
- trackData.lastSample.timescaleUnitsToNextSample = delta;
1006
- }
1007
- }
1008
-
1009
- private async registerSample(trackData: IsobmffTrackData, sample: Sample) {
1010
- if (sample.type === 'key') {
1011
- this.processTimestamps(trackData, sample);
1012
- }
1013
- trackData.timestampProcessingQueue.push(sample);
1014
-
1015
- if (this.isFragmented) {
1016
- trackData.sampleQueue.push(sample);
1017
- await this.interleaveSamples();
1018
- } else if (this.fastStart === 'reserve') {
1019
- await this.registerSampleFastStartReserve(trackData, sample);
1020
- } else {
1021
- await this.addSampleToTrack(trackData, sample);
1022
- }
1023
- }
1024
-
1025
- private async addSampleToTrack(trackData: IsobmffTrackData, sample: Sample) {
1026
- if (!this.isFragmented) {
1027
- trackData.samples.push(sample);
1028
-
1029
- if (this.fastStart === 'reserve') {
1030
- const maximumPacketCount = trackData.track.metadata.maximumPacketCount;
1031
- assert(maximumPacketCount !== undefined);
1032
-
1033
- if (trackData.samples.length > maximumPacketCount) {
1034
- throw new Error(
1035
- `Track #${trackData.track.id} has already reached the maximum packet count`
1036
- + ` (${maximumPacketCount}). Either add less packets or increase the maximum packet count.`,
1037
- );
1038
- }
1039
- }
1040
- }
1041
-
1042
- let beginNewChunk = false;
1043
- if (!trackData.currentChunk) {
1044
- beginNewChunk = true;
1045
- } else {
1046
- // Timestamp don't need to be monotonic (think B-frames), so we may need to update the start timestamp of
1047
- // the chunk
1048
- trackData.currentChunk.startTimestamp = Math.min(
1049
- trackData.currentChunk.startTimestamp,
1050
- sample.timestamp,
1051
- );
1052
-
1053
- const currentChunkDuration = sample.timestamp - trackData.currentChunk.startTimestamp;
1054
-
1055
- if (this.isFragmented) {
1056
- // We can only finalize this fragment (and begin a new one) if we know that each track will be able to
1057
- // start the new one with a key frame.
1058
- const keyFrameQueuedEverywhere = this.trackDatas.every((otherTrackData) => {
1059
- if (trackData === otherTrackData) {
1060
- return sample.type === 'key';
1061
- }
1062
-
1063
- const firstQueuedSample = otherTrackData.sampleQueue[0];
1064
- if (firstQueuedSample) {
1065
- return firstQueuedSample.type === 'key';
1066
- }
1067
-
1068
- return otherTrackData.closed;
1069
- });
1070
-
1071
- if (
1072
- currentChunkDuration >= this.minimumFragmentDuration
1073
- && keyFrameQueuedEverywhere
1074
- && sample.timestamp > this.maxWrittenTimestamp
1075
- ) {
1076
- beginNewChunk = true;
1077
- await this.finalizeFragment();
1078
- }
1079
- } else {
1080
- beginNewChunk = currentChunkDuration >= 0.5; // Chunk is long enough, we need a new one
1081
- }
1082
- }
1083
-
1084
- if (beginNewChunk) {
1085
- if (trackData.currentChunk) {
1086
- await this.finalizeCurrentChunk(trackData);
1087
- }
1088
-
1089
- trackData.currentChunk = {
1090
- startTimestamp: sample.timestamp,
1091
- samples: [],
1092
- offset: null,
1093
- moofOffset: null,
1094
- };
1095
- }
1096
-
1097
- assert(trackData.currentChunk);
1098
- trackData.currentChunk.samples.push(sample);
1099
-
1100
- if (this.isFragmented) {
1101
- this.maxWrittenTimestamp = Math.max(this.maxWrittenTimestamp, sample.timestamp);
1102
- this.maxWrittenEndTimestamp = Math.max(this.maxWrittenEndTimestamp, sample.timestamp + sample.duration);
1103
- this.minWrittenTimestamp = Math.min(this.minWrittenTimestamp, sample.timestamp);
1104
- }
1105
- }
1106
-
1107
- private async finalizeCurrentChunk(trackData: IsobmffTrackData) {
1108
- assert(!this.isFragmented);
1109
- assert(this.writer);
1110
-
1111
- if (!trackData.currentChunk) return;
1112
-
1113
- trackData.finalizedChunks.push(trackData.currentChunk);
1114
- this.finalizedChunks.push(trackData.currentChunk);
1115
-
1116
- let sampleCount = trackData.currentChunk.samples.length;
1117
- if (trackData.type === 'audio' && trackData.info.requiresPcmTransformation) {
1118
- sampleCount = trackData.currentChunk.samples
1119
- .reduce((acc, sample) => acc + intoTimescale(sample.duration, trackData.timescale), 0);
1120
- }
1121
-
1122
- if (
1123
- trackData.compactlyCodedChunkTable.length === 0
1124
- || last(trackData.compactlyCodedChunkTable)!.samplesPerChunk !== sampleCount
1125
- ) {
1126
- trackData.compactlyCodedChunkTable.push({
1127
- firstChunk: trackData.finalizedChunks.length, // 1-indexed
1128
- samplesPerChunk: sampleCount,
1129
- });
1130
- }
1131
-
1132
- if (this.fastStart === 'in-memory') {
1133
- trackData.currentChunk.offset = 0; // We'll compute the proper offset when finalizing
1134
- return;
1135
- }
1136
-
1137
- // Write out the data
1138
- trackData.currentChunk.offset = this.writer.getPos();
1139
- for (const sample of trackData.currentChunk.samples) {
1140
- assert(sample.data);
1141
- this.writer.write(sample.data);
1142
- sample.data = null; // Can be GC'd
1143
- }
1144
-
1145
- await this.writer.flush();
1146
- }
1147
-
1148
- private async interleaveSamples(isFinalCall = false) {
1149
- assert(this.isFragmented);
1150
-
1151
- if (!isFinalCall && !this.allTracksAreKnown()) {
1152
- return; // We can't interleave yet as we don't yet know how many tracks we'll truly have
1153
- }
1154
-
1155
- outer:
1156
- while (true) {
1157
- let trackWithMinTimestamp: IsobmffTrackData | null = null;
1158
- let minTimestamp = Infinity;
1159
-
1160
- for (const trackData of this.trackDatas) {
1161
- if (!isFinalCall && trackData.sampleQueue.length === 0 && !trackData.closed) {
1162
- break outer;
1163
- }
1164
-
1165
- if (trackData.sampleQueue.length > 0 && trackData.sampleQueue[0]!.timestamp < minTimestamp) {
1166
- trackWithMinTimestamp = trackData;
1167
- minTimestamp = trackData.sampleQueue[0]!.timestamp;
1168
- }
1169
- }
1170
-
1171
- if (!trackWithMinTimestamp) {
1172
- break;
1173
- }
1174
-
1175
- const sample = trackWithMinTimestamp.sampleQueue.shift()!;
1176
- await this.addSampleToTrack(trackWithMinTimestamp, sample);
1177
- }
1178
- }
1179
-
1180
- private async finalizeFragment(flushWriter = !this.isCmaf) {
1181
- assert(this.isFragmented);
1182
-
1183
- const fragmentNumber = this.nextFragmentNumber++;
1184
-
1185
- if (fragmentNumber === 1) {
1186
- const boxWriter = this.initBoxWriter ?? this.boxWriter;
1187
- assert(boxWriter);
1188
-
1189
- if (this.format._options.onMoov) {
1190
- boxWriter.writer.startTrackingWrites();
1191
- }
1192
-
1193
- this.ensureOneEnabledTrack();
1194
-
1195
- // Write the moov box now that we have all decoder configs
1196
- const movieBox = moov(this);
1197
- boxWriter.writeBox(movieBox);
1198
-
1199
- if (this.format._options.onMoov) {
1200
- const { data, start } = boxWriter.writer.stopTrackingWrites();
1201
- this.format._options.onMoov(data, start);
1202
- }
1203
-
1204
- if (this.isCmaf) {
1205
- assert(this.initWriter);
1206
- await this.initWriter.flush();
1207
- await this.initWriter.finalize(); // Init segment is done
1208
-
1209
- // Only now, init the main writer; this way the init writer is fully done before the main writer is
1210
- // even acquired
1211
- this.writer = await this.output._getRootWriter(true);
1212
- this.boxWriter = new IsobmffBoxWriter(this.writer);
1213
-
1214
- const stypSize = this.boxWriter.measureBox(styp());
1215
- const sidxSize = this.boxWriter.measureBox(sidx(this, 0));
1216
- this.segmentHeaderSize = stypSize + sidxSize;
1217
-
1218
- this.writer.seek(this.segmentHeaderSize); // Make room for the header to be written later
1219
- }
1220
- }
1221
-
1222
- assert(this.writer);
1223
- assert(this.boxWriter);
1224
-
1225
- // Not all tracks need to be present in every fragment
1226
- const tracksInFragment = this.trackDatas.filter(x => x.currentChunk);
1227
-
1228
- // Create an initial moof box and measure it; we need this to know where the following mdat box will begin
1229
- const moofBox = moof(fragmentNumber, tracksInFragment);
1230
- const moofOffset = this.writer.getPos();
1231
- const mdatStartPos = moofOffset + this.boxWriter.measureBox(moofBox);
1232
-
1233
- let currentPos = mdatStartPos + MIN_BOX_HEADER_SIZE;
1234
- let fragmentStartTimestamp = Infinity;
1235
- for (const trackData of tracksInFragment) {
1236
- trackData.currentChunk!.offset = currentPos;
1237
- trackData.currentChunk!.moofOffset = moofOffset;
1238
-
1239
- for (const sample of trackData.currentChunk!.samples) {
1240
- currentPos += sample.size;
1241
- }
1242
-
1243
- fragmentStartTimestamp = Math.min(fragmentStartTimestamp, trackData.currentChunk!.startTimestamp);
1244
- }
1245
-
1246
- const mdatSize = currentPos - mdatStartPos;
1247
- const needsLargeMdatSize = mdatSize >= 2 ** 32;
1248
-
1249
- if (needsLargeMdatSize) {
1250
- // Shift all offsets by 8. Previously, all chunks were shifted assuming the large box size, but due to what
1251
- // I suspect is a bug in WebKit, it failed in Safari (when livestreaming with MSE, not for static playback).
1252
- for (const trackData of tracksInFragment) {
1253
- trackData.currentChunk!.offset! += MAX_BOX_HEADER_SIZE - MIN_BOX_HEADER_SIZE;
1254
- }
1255
- }
1256
-
1257
- if (this.format._options.onMoof) {
1258
- this.writer.startTrackingWrites();
1259
- }
1260
-
1261
- const newMoofBox = moof(fragmentNumber, tracksInFragment);
1262
- this.boxWriter.writeBox(newMoofBox);
1263
-
1264
- if (this.format._options.onMoof) {
1265
- const { data, start } = this.writer.stopTrackingWrites();
1266
- this.format._options.onMoof(data, start, fragmentStartTimestamp);
1267
- }
1268
-
1269
- assert(this.writer.getPos() === mdatStartPos);
1270
-
1271
- if (this.format._options.onMdat) {
1272
- this.writer.startTrackingWrites();
1273
- }
1274
-
1275
- const mdatBox = mdat(needsLargeMdatSize);
1276
- mdatBox.size = mdatSize;
1277
- this.boxWriter.writeBox(mdatBox);
1278
-
1279
- this.writer.seek(mdatStartPos + (needsLargeMdatSize ? MAX_BOX_HEADER_SIZE : MIN_BOX_HEADER_SIZE));
1280
-
1281
- // Write sample data
1282
- for (const trackData of tracksInFragment) {
1283
- for (const sample of trackData.currentChunk!.samples) {
1284
- this.writer.write(sample.data!);
1285
- sample.data = null; // Can be GC'd
1286
- }
1287
- }
1288
-
1289
- if (this.format._options.onMdat) {
1290
- const { data, start } = this.writer.stopTrackingWrites();
1291
- this.format._options.onMdat(data, start);
1292
- }
1293
-
1294
- for (const trackData of tracksInFragment) {
1295
- trackData.finalizedChunks.push(trackData.currentChunk!);
1296
- this.finalizedChunks.push(trackData.currentChunk!);
1297
- trackData.currentChunk = null;
1298
- }
1299
-
1300
- if (flushWriter) {
1301
- await this.writer.flush();
1302
- }
1303
- }
1304
-
1305
- private async registerSampleFastStartReserve(trackData: IsobmffTrackData, sample: Sample) {
1306
- assert(this.writer);
1307
- assert(this.boxWriter);
1308
-
1309
- if (this.allTracksAreKnown()) {
1310
- if (!this.mdat) {
1311
- this.ensureOneEnabledTrack();
1312
-
1313
- // We finally know all tracks, let's reserve space for the moov box
1314
- const moovBox = moov(this);
1315
- const moovSize = this.boxWriter.measureBox(moovBox);
1316
-
1317
- const reservedSize = moovSize
1318
- + this.computeSampleTableSizeUpperBound()
1319
- + 4096; // Just a little extra headroom
1320
-
1321
- assert(this.ftypSize !== null);
1322
- this.writer.seek(this.ftypSize + reservedSize);
1323
-
1324
- if (this.format._options.onMdat) {
1325
- this.writer.startTrackingWrites();
1326
- }
1327
-
1328
- this.mdat = mdat(true);
1329
- this.boxWriter.writeBox(this.mdat);
1330
-
1331
- // Now write everything that was queued
1332
- for (const trackData of this.trackDatas) {
1333
- for (const sample of trackData.sampleQueue) {
1334
- await this.addSampleToTrack(trackData, sample);
1335
- }
1336
- trackData.sampleQueue.length = 0;
1337
- }
1338
- }
1339
-
1340
- await this.addSampleToTrack(trackData, sample);
1341
- } else {
1342
- // Queue it for when we know all tracks
1343
- trackData.sampleQueue.push(sample);
1344
- }
1345
- }
1346
-
1347
- private computeSampleTableSizeUpperBound() {
1348
- assert(this.fastStart === 'reserve');
1349
-
1350
- let upperBound = 0;
1351
-
1352
- for (const trackData of this.trackDatas) {
1353
- const n = trackData.track.metadata.maximumPacketCount;
1354
- assert(n !== undefined); // We validated this earlier
1355
-
1356
- // Given the max allowed packet count, compute the space they'll take up in the Sample Table Box, assuming
1357
- // the worst case for each individual box:
1358
-
1359
- // stts box - since it is compactly coded, the maximum length of this table will be 2/3n
1360
- upperBound += (4 + 4) * Math.ceil(2 / 3 * n);
1361
- // stss box - 1 entry per sample
1362
- upperBound += 4 * n;
1363
- // ctts box - since it is compactly coded, the maximum length of this table will be 2/3n
1364
- upperBound += (4 + 4) * Math.ceil(2 / 3 * n);
1365
- // stsc box - since it is compactly coded, the maximum length of this table will be 2/3n
1366
- upperBound += (4 + 4 + 4) * Math.ceil(2 / 3 * n);
1367
- // stsz box - 1 entry per sample
1368
- upperBound += 4 * n;
1369
- // co64 box - we assume 1 sample per chunk and 64-bit chunk offsets (co64 instead of stco)
1370
- upperBound += 8 * n;
1371
- }
1372
-
1373
- return upperBound;
1374
- }
1375
-
1376
- // eslint-disable-next-line @typescript-eslint/no-misused-promises
1377
- override async onTrackClose(track: OutputTrack) {
1378
- const release = await this.mutex.acquire();
1379
-
1380
- const trackData = this.trackDatas.find(x => x.track === track);
1381
- if (trackData) {
1382
- trackData.closed = true;
1383
-
1384
- if (trackData.type === 'subtitle' && track.source._codec === 'webvtt') {
1385
- await this.processWebVTTCues(trackData, Infinity);
1386
- }
1387
-
1388
- this.processTimestamps(trackData);
1389
- }
1390
-
1391
- if (this.allTracksAreKnown()) {
1392
- this.allTracksKnown.resolve();
1393
- }
1394
-
1395
- if (this.isFragmented) {
1396
- // Since a track is now closed, we may be able to write out chunks that were previously waiting
1397
- await this.interleaveSamples();
1398
- }
1399
-
1400
- release();
1401
- }
1402
-
1403
- ensureOneEnabledTrack() {
1404
- // If no track of a given type is enabled, force the first one to be enabled. Otherwise the video won't play in
1405
- // players like QuickTime.
1406
- // https://github.com/Vanilagy/mediabunny/pull/391
1407
- for (const type of ['video', 'audio', 'subtitle'] as TrackType[]) {
1408
- const tracks = this.trackDatas.filter(t => t.type === type);
1409
- if (tracks.length === 0) {
1410
- continue;
1411
- }
1412
-
1413
- const hasEnabled = tracks.some(t => t.track.metadata.disposition?.default !== false);
1414
- if (!hasEnabled) {
1415
- const firstTrack = tracks[0]!;
1416
-
1417
- firstTrack.track.metadata.disposition = {
1418
- ...firstTrack.track.metadata.disposition,
1419
- default: true,
1420
- };
1421
- }
1422
- }
1423
- }
1424
-
1425
- /** Finalizes the file, making it ready for use. Must be called after all video and audio chunks have been added. */
1426
- async finalize() {
1427
- const release = await this.mutex.acquire();
1428
-
1429
- this.allTracksKnown.resolve();
1430
- this.ensureOneEnabledTrack();
1431
-
1432
- for (const trackData of this.trackDatas) {
1433
- trackData.closed = true;
1434
-
1435
- if (trackData.type === 'subtitle' && trackData.track.source._codec === 'webvtt') {
1436
- await this.processWebVTTCues(trackData, Infinity);
1437
- }
1438
-
1439
- this.processTimestamps(trackData);
1440
- }
1441
-
1442
- if (this.isFragmented) {
1443
- await this.interleaveSamples(true);
1444
- await this.finalizeFragment(false); // Don't flush the last fragment as we will flush it with the mfra box
1445
- } else {
1446
- for (const trackData of this.trackDatas) {
1447
- await this.finalizeCurrentChunk(trackData);
1448
-
1449
- // Must hold because we will have processed at least one sample
1450
- assert(trackData.startTimestampOffset !== null);
1451
-
1452
- // Shift all of the samples by the start offset. We'll then write out an edit list that will shift them
1453
- // back to their proper spot in the composition.
1454
- for (let i = 0; i < trackData.samples.length; i++) {
1455
- const sample = trackData.samples[i]!;
1456
- sample.timestamp -= trackData.startTimestampOffset;
1457
- sample.decodeTimestamp -= trackData.startTimestampOffset;
1458
- }
1459
- }
1460
- }
1461
-
1462
- assert(this.writer);
1463
- assert(this.boxWriter);
1464
-
1465
- if (this.fastStart === 'in-memory') {
1466
- this.mdat = mdat(false);
1467
- let mdatSize: number;
1468
-
1469
- // We know how many chunks there are, but computing the chunk positions requires an iterative approach:
1470
- // In order to know where the first chunk should go, we first need to know the size of the moov box. But we
1471
- // cannot write a proper moov box without first knowing all chunk positions. So, we generate a tentative
1472
- // moov box with placeholder values (0) for the chunk offsets to be able to compute its size. If it then
1473
- // turns out that appending all chunks exceeds 4 GiB, we need to repeat this process, now with the co64 box
1474
- // being used in the moov box instead, which will make it larger. After that, we definitely know the final
1475
- // size of the moov box and can compute the proper chunk positions.
1476
-
1477
- for (let i = 0; i < 2; i++) {
1478
- const movieBox = moov(this);
1479
- const movieBoxSize = this.boxWriter.measureBox(movieBox);
1480
- mdatSize = this.boxWriter.measureBox(this.mdat);
1481
- let currentChunkPos = this.writer.getPos() + movieBoxSize + mdatSize;
1482
-
1483
- for (const chunk of this.finalizedChunks) {
1484
- chunk.offset = currentChunkPos;
1485
- for (const { data } of chunk.samples) {
1486
- assert(data);
1487
- currentChunkPos += data.byteLength;
1488
- mdatSize += data.byteLength;
1489
- }
1490
- }
1491
-
1492
- if (currentChunkPos < 2 ** 32) break;
1493
- if (mdatSize >= 2 ** 32) this.mdat.largeSize = true;
1494
- }
1495
-
1496
- if (this.format._options.onMoov) {
1497
- this.writer.startTrackingWrites();
1498
- }
1499
-
1500
- const movieBox = moov(this);
1501
- this.boxWriter.writeBox(movieBox);
1502
-
1503
- if (this.format._options.onMoov) {
1504
- const { data, start } = this.writer.stopTrackingWrites();
1505
- this.format._options.onMoov(data, start);
1506
- }
1507
-
1508
- if (this.format._options.onMdat) {
1509
- this.writer.startTrackingWrites();
1510
- }
1511
-
1512
- this.mdat.size = mdatSize!;
1513
- this.boxWriter.writeBox(this.mdat);
1514
-
1515
- for (const chunk of this.finalizedChunks) {
1516
- for (const sample of chunk.samples) {
1517
- assert(sample.data);
1518
- this.writer.write(sample.data);
1519
- sample.data = null;
1520
- }
1521
- }
1522
-
1523
- if (this.format._options.onMdat) {
1524
- const { data, start } = this.writer.stopTrackingWrites();
1525
- this.format._options.onMdat(data, start);
1526
- }
1527
- } else if (this.isFragmented) {
1528
- if (this.isCmaf) {
1529
- const contentSize = this.segmentHeaderSize !== null
1530
- ? this.writer.getPos() - this.segmentHeaderSize
1531
- : 0;
1532
-
1533
- this.writer.seek(0);
1534
-
1535
- // Write styp and sidx to the start; we recently made space for these
1536
- this.boxWriter.writeBox(styp());
1537
- this.boxWriter.writeBox(sidx(this, contentSize));
1538
- } else {
1539
- // Append the mfra box to the end of the file for better random access
1540
- const startPos = this.writer.getPos();
1541
- const mfraBox = mfra(this.trackDatas);
1542
- this.boxWriter.writeBox(mfraBox);
1543
-
1544
- // Patch the 'size' field of the mfro box at the end of the mfra box now that we know its actual size
1545
- const mfraBoxSize = this.writer.getPos() - startPos;
1546
- this.writer.seek(this.writer.getPos() - 4);
1547
- this.boxWriter.writeU32(mfraBoxSize);
1548
- }
1549
- } else {
1550
- assert(this.mdat);
1551
-
1552
- const mdatPos = this.boxWriter.offsets.get(this.mdat);
1553
- assert(mdatPos !== undefined);
1554
- const mdatSize = this.writer.getPos() - mdatPos;
1555
- this.mdat.size = mdatSize;
1556
- this.mdat.largeSize = mdatSize >= 2 ** 32; // Only use the large size if we need it
1557
- this.boxWriter.patchBox(this.mdat);
1558
-
1559
- if (this.format._options.onMdat) {
1560
- const { data, start } = this.writer.stopTrackingWrites();
1561
- this.format._options.onMdat(data, start);
1562
- }
1563
-
1564
- const movieBox = moov(this);
1565
-
1566
- if (this.fastStart === 'reserve') {
1567
- assert(this.ftypSize !== null);
1568
- this.writer.seek(this.ftypSize);
1569
-
1570
- if (this.format._options.onMoov) {
1571
- this.writer.startTrackingWrites();
1572
- }
1573
-
1574
- this.boxWriter.writeBox(movieBox);
1575
-
1576
- // Fill the remaining space with a free box. If there are less than 8 bytes left, sucks I guess
1577
- const remainingSpace = this.boxWriter.offsets.get(this.mdat)! - this.writer.getPos();
1578
- this.boxWriter.writeBox(free(remainingSpace));
1579
- } else {
1580
- if (this.format._options.onMoov) {
1581
- this.writer.startTrackingWrites();
1582
- }
1583
-
1584
- this.boxWriter.writeBox(movieBox);
1585
- }
1586
-
1587
- if (this.format._options.onMoov) {
1588
- const { data, start } = this.writer.stopTrackingWrites();
1589
- this.format._options.onMoov(data, start);
1590
- }
1591
- }
1592
-
1593
- release();
1594
- }
1595
- }