@openclaw/matrix 2026.11.5-beta.4 → 2026.11.10-beta.1

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 (466) hide show
  1. package/dist/.setup/{account-config-CRsKoMqJ.mjs → account-config-CVM2a28p.mjs} +1 -2
  2. package/dist/.setup/{account-selection-UUPhMBmu.mjs → account-selection-Cow3TMFO.mjs} +5 -8
  3. package/dist/.setup/{approval-handler.runtime-Ca12_7Qa.mjs → approval-handler.runtime-D7KO6ds_.mjs} +8 -9
  4. package/dist/.setup/{approval-reactions-BazmsDbe.mjs → approval-reactions-Bz_8XB01.mjs} +2 -3
  5. package/dist/.setup/{backup-health-Dm_YMVFT.mjs → backup-health-BxH69np2.mjs} +1 -2
  6. package/dist/.setup/{channel-FfaEmyIU.mjs → channel-BJGiol_v.mjs} +30 -40
  7. package/dist/.setup/{channel.runtime-CkkHG8zy.mjs → channel.runtime-BrSYy4Qm.mjs} +10 -12
  8. package/dist/.setup/{channel.setup-B00zzOOL.mjs → channel.setup-DJdvsvAL.mjs} +9 -7
  9. package/dist/.setup/{cli-dz9hd2dR.mjs → cli-CjjggD1Y.mjs} +25 -34
  10. package/dist/.setup/{cli-metadata-CwUhA9CY.mjs → cli-metadata-nnz3uf_k.mjs} +3 -5
  11. package/dist/.setup/{client-D1bsidwU.mjs → client-DIeTvz6C.mjs} +21 -26
  12. package/dist/.setup/{client-bootstrap-CTT0VF6v.mjs → client-bootstrap-CvbnV_7R.mjs} +2 -3
  13. package/dist/.setup/{client-support-B_Mp4Qk9.mjs → client-support-CqXAOZp3.mjs} +2 -3
  14. package/dist/.setup/{client-CFPYqaYK.mjs → client-uAX074II.mjs} +4 -5
  15. package/dist/.setup/{config-paths-CnREYb1Y.mjs → config-paths-DBpHxDyc.mjs} +1 -2
  16. package/dist/.setup/{create-client-Ccf5wyS3.mjs → create-client-XL9SKJ2s.mjs} +8 -9
  17. package/dist/.setup/{credentials-kT20jk_u.mjs → credentials-CGgWuhFV.mjs} +5 -6
  18. package/dist/.setup/{credentials-read-CM6wXUjL.mjs → credentials-read-rPqEpuxv.mjs} +5 -6
  19. package/dist/.setup/{credentials-state-B3cuUFwZ.mjs → credentials-state-jxq29yQw.mjs} +1 -2
  20. package/dist/.setup/{crypto-node.runtime-6Aj_ltHQ.mjs → crypto-node.runtime-E_hqXGxm.mjs} +1 -2
  21. package/dist/.setup/{crypto-runtime-DZNytKX5.mjs → crypto-runtime-D96thr_g.mjs} +10 -15
  22. package/dist/.setup/{crypto-state-store-BZLlwkv_.mjs → crypto-state-store-CzAmeC_Z.mjs} +4 -4
  23. package/dist/.setup/{crypto-store-ownership-CiQ1l_O7.mjs → crypto-store-ownership-DPO9WcVz.mjs} +3 -4
  24. package/dist/.setup/{crypto-unsafe-state-doctor-Dh1dtuSz.mjs → crypto-unsafe-state-doctor-CkhtP1mQ.mjs} +7 -8
  25. package/dist/.setup/{deps-D-W_QQjz.mjs → deps-CVPT2Ros.mjs} +1 -2
  26. package/dist/.setup/{device-health-Ck2YpEVN.mjs → device-health-D7n-lPeb.mjs} +2 -3
  27. package/dist/.setup/{direct-management-Dp1giZ34.mjs → direct-management-D59C1WO-.mjs} +7 -11
  28. package/dist/.setup/{directory-live-ufzRheWx.mjs → directory-live-5RgaKKuc.mjs} +5 -6
  29. package/dist/.setup/{doctor-contract-BANpMUbP.mjs → doctor-contract-GiXgCj7k.mjs} +2 -3
  30. package/dist/.setup/{draft-stream-BPjjKSoI.mjs → draft-stream-CjEpElZ-.mjs} +3 -4
  31. package/dist/.setup/{encryption-guidance-Br3Lv9Hm.mjs → encryption-guidance-DfbEaKct.mjs} +3 -4
  32. package/dist/.setup/{env-vars-aEBngJPa.mjs → env-vars-Bh1iOXJ1.mjs} +1 -2
  33. package/dist/.setup/{errors-Bw4EHwKX.mjs → errors-CL3YJV8U.mjs} +1 -2
  34. package/dist/.setup/{event-helpers-CxNgMQqH.mjs → event-helpers-DDUjVVf7.mjs} +1 -2
  35. package/dist/.setup/{exec-approvals-BwEOyI1-.mjs → exec-approvals-DcQS_LNp.mjs} +6 -9
  36. package/dist/.setup/{file-sync-store-BpS12yaK.mjs → file-sync-store-CAhnwOPA.mjs} +6 -36
  37. package/dist/.setup/{http-client-B_ohXrBm.mjs → http-client-CqnKFKUH.mjs} +5 -8
  38. package/dist/.setup/{idb-persistence-BTOsltD9.mjs → idb-persistence-DeGUs--C.mjs} +6 -7
  39. package/dist/.setup/{idb-persistence-lock-Bh3ZLIsE.mjs → idb-persistence-lock-CH2K6d_3.mjs} +1 -2
  40. package/dist/.setup/{joined-room-encryption-C0gHa2DG.mjs → joined-room-encryption-9sJK1kM-.mjs} +2 -3
  41. package/dist/.setup/{logger-CuAzdD8Q.mjs → logger-B9TwnY6C.mjs} +2 -3
  42. package/dist/.setup/{logging-CoaEyRtA.mjs → logging-Bnsn7s4r.mjs} +3 -4
  43. package/dist/.setup/{messages-DpJ9naJa.mjs → messages-CmlRhlPp.mjs} +9 -14
  44. package/dist/.setup/{monitor-vpzawYrB.mjs → monitor-DG8yTCh9.mjs} +98 -137
  45. package/dist/.setup/{onboarding-BK-V2ZLT.mjs → onboarding-CY_oesMI.mjs} +10 -11
  46. package/dist/.setup/{outbound-DydCDuvM.mjs → outbound-BY9kS8Kt.mjs} +5 -6
  47. package/dist/.setup/{profile-update-RLsY-gu6.mjs → profile-update-BRugBHSm.mjs} +13 -10
  48. package/dist/.setup/{reaction-events-lcgVF3M5.mjs → reaction-events-B1DQTt9d.mjs} +8 -9
  49. package/dist/.setup/{resolve-targets-DYW8ULZS.mjs → resolve-targets-CUBvJ37V.mjs} +4 -5
  50. package/dist/.setup/{retired-state-JGUEBE72.mjs → retired-state-BsxdpJNk.mjs} +3 -41
  51. package/dist/.setup/{room-info-Dhc4efkA.mjs → room-info-CJVhaCvB.mjs} +6 -8
  52. package/dist/.setup/{runtime-1kn1P6io.mjs → runtime-Ck8TjD7L.mjs} +1 -2
  53. package/dist/.setup/{runtime-doctor-migrations-hxP-CXX7.mjs → runtime-doctor-migrations-CSvRANPN.mjs} +5 -10
  54. package/dist/.setup/{runtime-setter-api-i2MOXoT3.mjs → runtime-setter-api-CpwhcBQK.mjs} +1 -1
  55. package/dist/.setup/{sdk-DPXiQ3jr.mjs → sdk-CRJQM2N0.mjs} +33 -47
  56. package/dist/.setup/{secret-contract-DxyzKSzf.mjs → secret-contract-AKnr45nw.mjs} +2 -3
  57. package/dist/.setup/{secret-contract-api-Dukgvike.mjs → secret-contract-api-DMSwMIxd.mjs} +1 -1
  58. package/dist/.setup/{send-HHAbKARg.mjs → send-QWCT3NT9.mjs} +58 -44
  59. package/dist/.setup/{send-currentness-DGxiiBn9.mjs → send-currentness-D1x6YP9O.mjs} +2 -4
  60. package/dist/.setup/{setup-bootstrap-DaT2j28V.mjs → setup-bootstrap-DrBapwjQ.mjs} +4 -5
  61. package/dist/.setup/{setup-core-DcqQbLZv.mjs → setup-core-B4sVj_9e.mjs} +13 -20
  62. package/dist/.setup/setup-plugin-api-t9yhI-Tq.mjs +2 -0
  63. package/dist/.setup/sqlite-state-D6Zpz1q1.mjs +36 -0
  64. package/dist/.setup/{startup-verification-UkaoSldm.mjs → startup-verification-DfOuAruK.mjs} +5 -5
  65. package/dist/.setup/{state-layout-walk-BQMgMykU.mjs → state-layout-walk-BqCZTHpp.mjs} +2 -3
  66. package/dist/.setup/{storage-C3N6YZIn.mjs → storage-CCarF_gm.mjs} +9 -10
  67. package/dist/.setup/{storage-paths-B51JM-pC.mjs → storage-paths-e_Vq6cvw.mjs} +1 -2
  68. package/dist/.setup/{subagent-hooks-CfGAysJi.mjs → subagent-hooks-BdbuojSv.mjs} +2 -3
  69. package/dist/.setup/{sync-cache-state-BKVaKRzQ.mjs → sync-cache-state-BMvqW4Ii.mjs} +5 -5
  70. package/dist/.setup/{sync-state-CWbp0QSY.mjs → sync-state-Cu1nagBV.mjs} +1 -2
  71. package/dist/.setup/{target-ids-HhcaKX1n.mjs → target-ids-DltG_ZHJ.mjs} +1 -2
  72. package/dist/.setup/{task-runner-DY3aKiQa.mjs → task-runner-CYyGHdNW.mjs} +1 -2
  73. package/dist/.setup/{thread-binding-api-BvuaKpd0.mjs → thread-binding-api-OtSciHmZ.mjs} +2 -3
  74. package/dist/.setup/{thread-bindings-891JsKXF.mjs → thread-bindings-jNXWItIL.mjs} +54 -23
  75. package/dist/.setup/{thread-bindings-shared-QmZOfX9Q.mjs → thread-bindings-shared-DEAGGuDA.mjs} +6 -3
  76. package/dist/.setup/{tool-actions-8mXdq9OV.mjs → tool-actions-4sdtsvN2.mjs} +25 -25
  77. package/dist/.setup/{url-validation-By_2hsXr.mjs → url-validation-DesoKUns.mjs} +1 -2
  78. package/dist/.setup/{verification-CcZIVL8P.mjs → verification-DQu-OS0V.mjs} +4 -5
  79. package/dist/.source-module-urls/1cd4d4ff8d44e1c8b830932b44d7cf8a7f3350e09e169910e1d7a85e131b7bea.json +1 -1
  80. package/dist/api.js +8 -8
  81. package/dist/auth-presence.js +2 -3
  82. package/dist/channel-plugin-api.js +1 -1
  83. package/dist/cli-metadata.js +1 -1
  84. package/dist/contract-api.js +2 -2
  85. package/dist/doctor-contract-api.js +14 -16
  86. package/dist/helper-api.js +3 -3
  87. package/dist/index.js +3 -4
  88. package/dist/plugin-entry.handlers.runtime.js +3 -4
  89. package/dist/runtime-api.js +7 -8
  90. package/dist/runtime-setter-api.js +1 -1
  91. package/dist/secret-contract-api.js +1 -1
  92. package/dist/session-binding-contract-api.js +2 -2
  93. package/dist/setup-entry.js +4 -5
  94. package/dist/setup-plugin-api.js +1 -1
  95. package/dist/subagent-hooks-api.js +2 -3
  96. package/dist/thread-binding-api.js +1 -1
  97. package/dist/thread-bindings-runtime.js +1 -1
  98. package/node_modules/@openclaw/fs-safe/CHANGELOG.md +45 -1
  99. package/node_modules/@openclaw/fs-safe/README.md +4 -0
  100. package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +2 -2
  101. package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +2 -2
  102. package/node_modules/@openclaw/fs-safe/dist/advanced.js +2 -2
  103. package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
  104. package/node_modules/@openclaw/fs-safe/dist/atomic-io.d.ts +1 -0
  105. package/node_modules/@openclaw/fs-safe/dist/atomic-io.js +6 -0
  106. package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +1 -0
  107. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +5 -0
  108. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +13 -0
  109. package/node_modules/@openclaw/fs-safe/dist/directory-mode-options.d.ts +3 -0
  110. package/node_modules/@openclaw/fs-safe/dist/directory-mode-options.js +6 -0
  111. package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +1 -1
  112. package/node_modules/@openclaw/fs-safe/dist/errors.js +1 -0
  113. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.d.ts +0 -1
  114. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +1 -11
  115. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +3 -3
  116. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +2 -3
  117. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +3 -3
  118. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +30 -4
  119. package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +1 -1
  120. package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +7 -1
  121. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +1 -1
  122. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +30 -4
  123. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +1 -1
  124. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +2 -0
  125. package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +2 -1
  126. package/node_modules/@openclaw/fs-safe/dist/file-store.js +5 -0
  127. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +2 -0
  128. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +9 -0
  129. package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +2 -1
  130. package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +4 -1
  131. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +1 -1
  132. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +1 -1
  133. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +19 -13
  134. package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +2 -0
  135. package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +27 -5
  136. package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +1 -0
  137. package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +84 -7
  138. package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +0 -11
  139. package/node_modules/@openclaw/fs-safe/dist/prepare-directory-mode.d.ts +9 -0
  140. package/node_modules/@openclaw/fs-safe/dist/prepare-directory-mode.js +61 -0
  141. package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +2 -1
  142. package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +2 -0
  143. package/node_modules/@openclaw/fs-safe/dist/realpath.js +16 -0
  144. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +2 -1
  145. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +8 -6
  146. package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +2 -1
  147. package/node_modules/@openclaw/fs-safe/dist/replace-file.js +20 -13
  148. package/node_modules/@openclaw/fs-safe/dist/root-context.js +4 -1
  149. package/node_modules/@openclaw/fs-safe/dist/root-create-native.d.ts +1 -1
  150. package/node_modules/@openclaw/fs-safe/dist/root-create-native.js +18 -9
  151. package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +2 -0
  152. package/node_modules/@openclaw/fs-safe/dist/root-errors.js +9 -0
  153. package/node_modules/@openclaw/fs-safe/dist/root-impl.js +4 -1
  154. package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.d.ts +1 -1
  155. package/node_modules/@openclaw/fs-safe/dist/root-mkdir-native.js +35 -16
  156. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +6 -2
  157. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +32 -20
  158. package/node_modules/@openclaw/fs-safe/dist/root-path.js +32 -26
  159. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +4 -1
  160. package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +2 -1
  161. package/node_modules/@openclaw/fs-safe/dist/secret-file.js +2 -0
  162. package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +2 -1
  163. package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +5 -4
  164. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +3 -2
  165. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +8 -9
  166. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.js +3 -1
  167. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +2 -1
  168. package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +2 -1
  169. package/node_modules/@openclaw/fs-safe/dist/types.d.ts +1 -0
  170. package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +12 -3
  171. package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.exe +0 -0
  172. package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +0 -1
  173. package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +10 -12
  174. package/node_modules/@openclaw/fs-safe/docs/advanced.md +3 -3
  175. package/node_modules/@openclaw/fs-safe/docs/atomic.md +16 -3
  176. package/node_modules/@openclaw/fs-safe/docs/compiler-qualification.md +1 -1
  177. package/node_modules/@openclaw/fs-safe/docs/contributing.md +27 -18
  178. package/node_modules/@openclaw/fs-safe/docs/errors.md +3 -1
  179. package/node_modules/@openclaw/fs-safe/docs/file-store.md +14 -2
  180. package/node_modules/@openclaw/fs-safe/docs/in-place-write.md +31 -0
  181. package/node_modules/@openclaw/fs-safe/docs/install.md +1 -1
  182. package/node_modules/@openclaw/fs-safe/docs/json-store.md +6 -1
  183. package/node_modules/@openclaw/fs-safe/docs/json.md +5 -1
  184. package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +14 -4
  185. package/node_modules/@openclaw/fs-safe/docs/public-api.md +4 -2
  186. package/node_modules/@openclaw/fs-safe/docs/secret-file.md +5 -1
  187. package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +4 -0
  188. package/node_modules/@openclaw/fs-safe/docs/temp.md +9 -1
  189. package/node_modules/@openclaw/fs-safe/docs/types.md +5 -1
  190. package/node_modules/@openclaw/fs-safe/package.json +12 -12
  191. package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
  192. package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
  193. package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
  194. package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
  195. package/node_modules/@openclaw/fs-safe-freebsd-arm64/fs-safe-native.node +0 -0
  196. package/node_modules/@openclaw/fs-safe-freebsd-arm64/package.json +1 -1
  197. package/node_modules/@openclaw/fs-safe-freebsd-x64/fs-safe-native.node +0 -0
  198. package/node_modules/@openclaw/fs-safe-freebsd-x64/package.json +1 -1
  199. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
  200. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
  201. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
  202. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
  203. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
  204. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
  205. package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
  206. package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
  207. package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/fs-safe-native.node +0 -0
  208. package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/package.json +1 -1
  209. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
  210. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
  211. package/node_modules/@tokenizer/inflate/README.md +57 -17
  212. package/node_modules/@tokenizer/inflate/lib/ZipHandler.d.ts +12 -1
  213. package/node_modules/@tokenizer/inflate/lib/ZipHandler.js +127 -57
  214. package/node_modules/@tokenizer/inflate/lib/ZipLimitError.d.ts +18 -4
  215. package/node_modules/@tokenizer/inflate/lib/ZipLimitError.js +1 -1
  216. package/node_modules/@tokenizer/inflate/lib/index.d.ts +1 -1
  217. package/node_modules/@tokenizer/inflate/node_modules/strtok3/LICENSE.txt +21 -0
  218. package/node_modules/@tokenizer/inflate/node_modules/strtok3/README.md +736 -0
  219. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbortSignal.d.ts +2 -0
  220. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbortSignal.js +7 -0
  221. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbstractTokenizer.d.ts +117 -0
  222. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/AbstractTokenizer.js +204 -0
  223. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BlobTokenizer.d.ts +29 -0
  224. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BlobTokenizer.js +57 -0
  225. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferSizeError.d.ts +19 -0
  226. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferSizeError.js +27 -0
  227. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferTokenizer.d.ts +29 -0
  228. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/BufferTokenizer.js +51 -0
  229. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/FileTokenizer.d.ts +47 -0
  230. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/FileTokenizer.js +83 -0
  231. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/NotRegularFileError.d.ts +5 -0
  232. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/NotRegularFileError.js +8 -0
  233. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts +34 -0
  234. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/ReadStreamTokenizer.js +140 -0
  235. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerBoundaryError.d.ts +7 -0
  236. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerBoundaryError.js +10 -0
  237. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerView.d.ts +9 -0
  238. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/TokenizerView.js +184 -0
  239. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/core.d.ts +44 -0
  240. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/core.js +56 -0
  241. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/index.d.ts +17 -0
  242. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/index.js +46 -0
  243. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/isRandomAccessTokenizer.d.ts +6 -0
  244. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/isRandomAccessTokenizer.js +10 -0
  245. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/AbstractStreamReader.d.ts +54 -0
  246. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/AbstractStreamReader.js +73 -0
  247. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Deferred.d.ts +6 -0
  248. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Deferred.js +10 -0
  249. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Errors.d.ts +10 -0
  250. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/Errors.js +16 -0
  251. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/StreamReader.d.ts +34 -0
  252. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/StreamReader.js +125 -0
  253. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamByobReader.d.ts +14 -0
  254. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamByobReader.js +29 -0
  255. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +19 -0
  256. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +67 -0
  257. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +24 -0
  258. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReader.js +13 -0
  259. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReaderFactory.d.ts +5 -0
  260. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +19 -0
  261. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/index.d.ts +6 -0
  262. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/stream/index.js +5 -0
  263. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/types.d.ts +163 -0
  264. package/node_modules/@tokenizer/inflate/node_modules/strtok3/lib/types.js +1 -0
  265. package/node_modules/@tokenizer/inflate/node_modules/strtok3/package.json +97 -0
  266. package/node_modules/@tokenizer/inflate/package.json +5 -5
  267. package/node_modules/fake-indexeddb/README.md +7 -7
  268. package/node_modules/fake-indexeddb/build/cjs/lib/Index.js +47 -22
  269. package/node_modules/fake-indexeddb/build/cjs/lib/ObjectStore.js +4 -2
  270. package/node_modules/fake-indexeddb/build/cjs/lib/RecordStore.js +14 -9
  271. package/node_modules/fake-indexeddb/build/esm/lib/Index.js +47 -22
  272. package/node_modules/fake-indexeddb/build/esm/lib/ObjectStore.js +4 -2
  273. package/node_modules/fake-indexeddb/build/esm/lib/RecordStore.js +14 -9
  274. package/node_modules/fake-indexeddb/package.json +1 -1
  275. package/node_modules/file-type/node_modules/strtok3/README.md +154 -9
  276. package/node_modules/file-type/node_modules/strtok3/lib/AbstractTokenizer.d.ts +3 -0
  277. package/node_modules/file-type/node_modules/strtok3/lib/AbstractTokenizer.js +12 -4
  278. package/node_modules/file-type/node_modules/strtok3/lib/BlobTokenizer.js +1 -0
  279. package/node_modules/file-type/node_modules/strtok3/lib/BufferTokenizer.js +2 -1
  280. package/node_modules/file-type/node_modules/strtok3/lib/FileTokenizer.d.ts +1 -1
  281. package/node_modules/file-type/node_modules/strtok3/lib/FileTokenizer.js +3 -3
  282. package/node_modules/file-type/node_modules/strtok3/lib/ReadStreamTokenizer.js +17 -2
  283. package/node_modules/file-type/node_modules/strtok3/lib/TokenizerBoundaryError.d.ts +7 -0
  284. package/node_modules/file-type/node_modules/strtok3/lib/TokenizerBoundaryError.js +10 -0
  285. package/node_modules/file-type/node_modules/strtok3/lib/TokenizerView.d.ts +9 -0
  286. package/node_modules/file-type/node_modules/strtok3/lib/TokenizerView.js +184 -0
  287. package/node_modules/file-type/node_modules/strtok3/lib/core.d.ts +4 -1
  288. package/node_modules/file-type/node_modules/strtok3/lib/core.js +5 -18
  289. package/node_modules/file-type/node_modules/strtok3/lib/index.js +28 -5
  290. package/node_modules/file-type/node_modules/strtok3/lib/isRandomAccessTokenizer.d.ts +6 -0
  291. package/node_modules/file-type/node_modules/strtok3/lib/isRandomAccessTokenizer.js +10 -0
  292. package/node_modules/file-type/node_modules/strtok3/lib/stream/StreamReader.d.ts +4 -0
  293. package/node_modules/file-type/node_modules/strtok3/lib/stream/StreamReader.js +29 -8
  294. package/node_modules/file-type/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +12 -2
  295. package/node_modules/file-type/node_modules/strtok3/lib/types.d.ts +19 -2
  296. package/node_modules/file-type/node_modules/strtok3/package.json +10 -8
  297. package/node_modules/file-type/package.json +3 -3
  298. package/node_modules/file-type/source/detectors/ebml.js +31 -16
  299. package/node_modules/file-type/source/detectors/zip.js +21 -203
  300. package/node_modules/matrix-js-sdk/CHANGELOG.md +28 -0
  301. package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.d.ts +30 -25
  302. package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.d.ts.map +1 -1
  303. package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js +91 -100
  304. package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js.map +1 -1
  305. package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.d.ts +6 -4
  306. package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.d.ts.map +1 -1
  307. package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.js.map +1 -1
  308. package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.d.ts +2 -15
  309. package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.d.ts.map +1 -1
  310. package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.js.map +1 -1
  311. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts +36 -7
  312. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts.map +1 -1
  313. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js +29 -2
  314. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js.map +1 -1
  315. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts +12 -51
  316. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
  317. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js +10 -66
  318. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
  319. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts +5 -10
  320. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts.map +1 -1
  321. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js +25 -44
  322. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js.map +1 -1
  323. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.d.ts +8 -8
  324. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.d.ts.map +1 -1
  325. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js +30 -22
  326. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js.map +1 -1
  327. package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js +7 -8
  328. package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js.map +1 -1
  329. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.d.ts +8 -13
  330. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.d.ts.map +1 -1
  331. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js +2 -11
  332. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js.map +1 -1
  333. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.d.ts +6 -2
  334. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.d.ts.map +1 -1
  335. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js +3 -0
  336. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js.map +1 -1
  337. package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts +5 -0
  338. package/node_modules/matrix-js-sdk/lib/matrixrtc/types.d.ts.map +1 -1
  339. package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js +5 -0
  340. package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js.map +1 -1
  341. package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.d.ts +9 -2
  342. package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.d.ts.map +1 -1
  343. package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js +8 -5
  344. package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js.map +1 -1
  345. package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts +17 -2
  346. package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts.map +1 -1
  347. package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js +88 -47
  348. package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js.map +1 -1
  349. package/node_modules/matrix-js-sdk/lib/models/room.d.ts +1 -1
  350. package/node_modules/matrix-js-sdk/lib/models/room.d.ts.map +1 -1
  351. package/node_modules/matrix-js-sdk/lib/models/room.js +8 -2
  352. package/node_modules/matrix-js-sdk/lib/models/room.js.map +1 -1
  353. package/node_modules/matrix-js-sdk/lib/models/thread.d.ts.map +1 -1
  354. package/node_modules/matrix-js-sdk/lib/models/thread.js +23 -2
  355. package/node_modules/matrix-js-sdk/lib/models/thread.js.map +1 -1
  356. package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.d.ts +3 -3
  357. package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.d.ts.map +1 -1
  358. package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.js.map +1 -1
  359. package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.d.ts +95 -0
  360. package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.d.ts.map +1 -0
  361. package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.js +3 -0
  362. package/node_modules/matrix-js-sdk/lib/rendezvous/SignInWithQRFlow.js.map +1 -0
  363. package/node_modules/matrix-js-sdk/lib/rendezvous/index.d.ts +1 -0
  364. package/node_modules/matrix-js-sdk/lib/rendezvous/index.d.ts.map +1 -1
  365. package/node_modules/matrix-js-sdk/lib/rendezvous/index.js.map +1 -1
  366. package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js +5 -1
  367. package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js.map +1 -1
  368. package/node_modules/matrix-js-sdk/package.json +3 -3
  369. package/node_modules/matrix-js-sdk/src/matrixrtc/CallMembership.ts +85 -95
  370. package/node_modules/matrix-js-sdk/src/matrixrtc/EncryptionManager.ts +6 -4
  371. package/node_modules/matrix-js-sdk/src/matrixrtc/IMembershipManager.ts +2 -15
  372. package/node_modules/matrix-js-sdk/src/matrixrtc/LivekitTransport.ts +58 -9
  373. package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSession.ts +21 -80
  374. package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManager.ts +23 -40
  375. package/node_modules/matrix-js-sdk/src/matrixrtc/RTCEncryptionManager.ts +51 -39
  376. package/node_modules/matrix-js-sdk/src/matrixrtc/ToDeviceKeyTransport.ts +7 -7
  377. package/node_modules/matrix-js-sdk/src/matrixrtc/membershipData/rtc.ts +9 -23
  378. package/node_modules/matrix-js-sdk/src/matrixrtc/membershipData/session.ts +14 -2
  379. package/node_modules/matrix-js-sdk/src/matrixrtc/types.ts +6 -0
  380. package/node_modules/matrix-js-sdk/src/models/event-timeline-set.ts +19 -4
  381. package/node_modules/matrix-js-sdk/src/models/room-sticky-events.ts +92 -58
  382. package/node_modules/matrix-js-sdk/src/models/room.ts +8 -2
  383. package/node_modules/matrix-js-sdk/src/models/thread.ts +25 -3
  384. package/node_modules/matrix-js-sdk/src/rendezvous/MSC4108SignInWithQR.ts +3 -3
  385. package/node_modules/matrix-js-sdk/src/rendezvous/SignInWithQRFlow.ts +117 -0
  386. package/node_modules/matrix-js-sdk/src/rendezvous/index.ts +1 -0
  387. package/node_modules/matrix-js-sdk/src/rust-crypto/index.ts +5 -1
  388. package/node_modules/music-metadata/README.md +62 -67
  389. package/node_modules/music-metadata/lib/ParserFactory.js +3 -1
  390. package/node_modules/music-metadata/lib/aiff/AiffParser.d.ts +2 -0
  391. package/node_modules/music-metadata/lib/aiff/AiffParser.js +42 -3
  392. package/node_modules/music-metadata/lib/aiff/AiffToken.d.ts +1 -0
  393. package/node_modules/music-metadata/lib/aiff/AiffToken.js +1 -0
  394. package/node_modules/music-metadata/lib/apev2/APEv2Parser.js +11 -1
  395. package/node_modules/music-metadata/lib/asf/AsfObject.d.ts +2 -2
  396. package/node_modules/music-metadata/lib/asf/AsfObject.js +81 -111
  397. package/node_modules/music-metadata/lib/asf/AsfParser.js +5 -3
  398. package/node_modules/music-metadata/lib/asf/AsfTagMapper.js +27 -3
  399. package/node_modules/music-metadata/lib/asf/AsfUtil.d.ts +1 -1
  400. package/node_modules/music-metadata/lib/caf/CafParser.js +13 -2
  401. package/node_modules/music-metadata/lib/caf/CafToken.d.ts +2 -2
  402. package/node_modules/music-metadata/lib/caf/CafToken.js +9 -2
  403. package/node_modules/music-metadata/lib/common/Allocation.d.ts +6 -0
  404. package/node_modules/music-metadata/lib/common/Allocation.js +18 -0
  405. package/node_modules/music-metadata/lib/common/GenericTagMapper.js +1 -1
  406. package/node_modules/music-metadata/lib/common/MetadataCollector.d.ts +2 -0
  407. package/node_modules/music-metadata/lib/common/MetadataCollector.js +21 -4
  408. package/node_modules/music-metadata/lib/common/Util.d.ts +4 -0
  409. package/node_modules/music-metadata/lib/common/Util.js +34 -1
  410. package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.d.ts +4 -1
  411. package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.js +32 -36
  412. package/node_modules/music-metadata/lib/ebml/EbmlIterator.js +6 -2
  413. package/node_modules/music-metadata/lib/flac/FlacParser.js +2 -1
  414. package/node_modules/music-metadata/lib/id3v2/FrameParser.d.ts +7 -3
  415. package/node_modules/music-metadata/lib/id3v2/FrameParser.js +91 -46
  416. package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.js +6 -0
  417. package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.d.ts +5 -0
  418. package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.js +6 -4
  419. package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.d.ts +2 -1
  420. package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.js +57 -15
  421. package/node_modules/music-metadata/lib/lrc/LyricsParser.d.ts +18 -2
  422. package/node_modules/music-metadata/lib/lrc/LyricsParser.js +14 -3
  423. package/node_modules/music-metadata/lib/mp4/Atom.d.ts +3 -3
  424. package/node_modules/music-metadata/lib/mp4/Atom.js +14 -7
  425. package/node_modules/music-metadata/lib/mp4/AtomToken.d.ts +25 -25
  426. package/node_modules/music-metadata/lib/mp4/AtomToken.js +136 -119
  427. package/node_modules/music-metadata/lib/mp4/MP4Parser.d.ts +16 -2
  428. package/node_modules/music-metadata/lib/mp4/MP4Parser.js +370 -132
  429. package/node_modules/music-metadata/lib/mp4/MP4TagMapper.js +30 -0
  430. package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.js +19 -8
  431. package/node_modules/music-metadata/lib/ogg/OggParser.js +6 -2
  432. package/node_modules/music-metadata/lib/ogg/OggToken.d.ts +2 -2
  433. package/node_modules/music-metadata/lib/ogg/OggToken.js +3 -9
  434. package/node_modules/music-metadata/lib/ogg/flac/FlacStream.d.ts +9 -11
  435. package/node_modules/music-metadata/lib/ogg/flac/FlacStream.js +111 -27
  436. package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +6 -0
  437. package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.js +6 -0
  438. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.d.ts +2 -2
  439. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.js +8 -4
  440. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.d.ts +1 -0
  441. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.js +23 -3
  442. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.d.ts +4 -0
  443. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.js +15 -2
  444. package/node_modules/music-metadata/lib/riff/RiffInfoTagMap.js +1 -0
  445. package/node_modules/music-metadata/lib/type.d.ts +23 -6
  446. package/node_modules/music-metadata/lib/wav/BwfChunk.d.ts +12 -2
  447. package/node_modules/music-metadata/lib/wav/BwfChunk.js +39 -11
  448. package/node_modules/music-metadata/lib/wav/WaveParser.js +13 -2
  449. package/node_modules/music-metadata/package.json +2 -1
  450. package/node_modules/typebox/build/format/date_time.d.mts +2 -1
  451. package/node_modules/typebox/build/format/date_time.mjs +12 -3
  452. package/node_modules/typebox/package.json +1 -1
  453. package/package.json +9 -9
  454. package/dist/.setup/setup-plugin-api-Cg4TelGZ.mjs +0 -2
  455. package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/auto.js +0 -54
  456. package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/binarySearchTree.js +0 -413
  457. package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/fakeIndexedDB.js +0 -1018
  458. package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/forceCloseDatabase.js +0 -99
  459. package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/getAll.js +0 -707
  460. package/node_modules/fake-indexeddb/build/cjs/test/fakeIndexedDB/memoryLeaks.js +0 -42
  461. package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/auto.js +0 -52
  462. package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/binarySearchTree.js +0 -409
  463. package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/fakeIndexedDB.js +0 -1014
  464. package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/forceCloseDatabase.js +0 -95
  465. package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/getAll.js +0 -703
  466. package/node_modules/fake-indexeddb/build/esm/test/fakeIndexedDB/memoryLeaks.js +0 -38
@@ -1,4 +1,6 @@
1
+ import { defaultMaxMetadataEntries } from '../common/Allocation.js';
1
2
  // ASF Objects
3
+ import { createTokenizerView, EndOfStreamError, TokenizerBoundaryError } from 'strtok3';
2
4
  import * as Token from 'token-types';
3
5
  import { AttachedPictureType } from '../id3v2/ID3v2Token.js';
4
6
  import { makeUnexpectedFileContentError } from '../ParseError.js';
@@ -6,6 +8,39 @@ import AsfGuid from './AsfGuid.js';
6
8
  import { getParserForAttr, parseUnicodeAttr } from './AsfUtil.js';
7
9
  export class AsfContentParseError extends makeUnexpectedFileContentError('ASF') {
8
10
  }
11
+ /** Synchronous reads restricted to one declared ASF object payload. */
12
+ class ByteCursor {
13
+ context;
14
+ data;
15
+ position = 0;
16
+ constructor(buf, off, length, context) {
17
+ this.context = context;
18
+ if (off < 0 || length < 0 || length > buf.length - off) {
19
+ throw new AsfContentParseError(`Truncated ${context}`);
20
+ }
21
+ this.data = buf.subarray(off, off + length);
22
+ }
23
+ get remaining() {
24
+ return this.data.length - this.position;
25
+ }
26
+ require(length, message = `Truncated ${this.context}`) {
27
+ if (length > this.remaining) {
28
+ throw new AsfContentParseError(message);
29
+ }
30
+ }
31
+ read(token) {
32
+ this.require(token.len);
33
+ const value = token.get(this.data, this.position);
34
+ this.position += token.len;
35
+ return value;
36
+ }
37
+ bytes(length, message) {
38
+ this.require(length, message);
39
+ const start = this.position;
40
+ this.position += length;
41
+ return this.data.subarray(start, this.position);
42
+ }
43
+ }
9
44
  /**
10
45
  * Data Type: Specifies the type of information being stored. The following values are recognized.
11
46
  */
@@ -217,42 +252,6 @@ const CodecListObjectHeader = {
217
252
  };
218
253
  }
219
254
  };
220
- class BoundedReader {
221
- tokenizer;
222
- remaining;
223
- constructor(tokenizer, size) {
224
- this.tokenizer = tokenizer;
225
- this.remaining = size;
226
- }
227
- async readToken(token) {
228
- this.ensureAvailable(token.len);
229
- const value = await this.tokenizer.readToken(token);
230
- this.remaining -= token.len;
231
- return value;
232
- }
233
- async readNumber(token) {
234
- return this.readToken(token);
235
- }
236
- async readBuffer(length) {
237
- this.ensureAvailable(length);
238
- const buffer = new Uint8Array(length);
239
- await this.tokenizer.readBuffer(buffer);
240
- this.remaining -= length;
241
- return buffer;
242
- }
243
- async ignoreRemaining() {
244
- const ignored = await this.tokenizer.ignore(this.remaining);
245
- if (ignored !== this.remaining) {
246
- throw new AsfContentParseError(`Unexpected end of ASF Codec List Object; missing ${this.remaining - ignored} bytes`);
247
- }
248
- this.remaining = 0;
249
- }
250
- ensureAvailable(length) {
251
- if (length > this.remaining) {
252
- throw new AsfContentParseError(`ASF Codec List field size ${length} exceeds remaining object payload size ${this.remaining}`);
253
- }
254
- }
255
- }
256
255
  async function readString(reader) {
257
256
  const length = await reader.readNumber(Token.UINT16_LE);
258
257
  return (await reader.readToken(new Token.StringType(length * 2, 'utf-16le'))).replace('\0', '');
@@ -261,19 +260,33 @@ async function readString(reader) {
261
260
  * 3.5: Read the Codec-List-Object, which provides user-friendly information about the codecs and formats used to encode the content found in the ASF file.
262
261
  * Ref: http://drang.s4.xrea.com/program/tips/id3tag/wmp/03_asf_top_level_header_object.html#3_5
263
262
  */
264
- export async function readCodecEntries(tokenizer, payloadSize) {
265
- const reader = new BoundedReader(tokenizer, payloadSize);
266
- const codecHeader = await reader.readToken(CodecListObjectHeader);
263
+ export async function readCodecEntries(tokenizer, payloadSize, maxEntries = defaultMaxMetadataEntries) {
264
+ const reader = createTokenizerView(tokenizer, payloadSize);
267
265
  const entries = [];
268
- for (let i = 0; i < codecHeader.entryCount; ++i) {
269
- entries.push(await readCodecEntry(reader));
266
+ try {
267
+ const codecHeader = await reader.readToken(CodecListObjectHeader);
268
+ if (codecHeader.entryCount > maxEntries) {
269
+ throw new AsfContentParseError(`ASF Codec List entry count ${codecHeader.entryCount} exceeds entry limit ${maxEntries}`);
270
+ }
271
+ for (let i = 0; i < codecHeader.entryCount; ++i) {
272
+ entries.push(await readCodecEntry(reader));
273
+ }
274
+ await reader.consumeRemainder();
275
+ }
276
+ catch (error) {
277
+ if (error instanceof EndOfStreamError || error instanceof TokenizerBoundaryError) {
278
+ throw new AsfContentParseError(`Unexpected end of ASF Codec List Object: ${error.message}`);
279
+ }
280
+ throw error;
281
+ }
282
+ finally {
283
+ await reader.close();
270
284
  }
271
- await reader.ignoreRemaining();
272
285
  return entries;
273
286
  }
274
287
  async function readInformation(reader) {
275
288
  const length = await reader.readNumber(Token.UINT16_LE);
276
- return reader.readBuffer(length);
289
+ return reader.readToken(new Token.Uint8ArrayType(length));
277
290
  }
278
291
  /**
279
292
  * Read Codec-Entries
@@ -299,22 +312,14 @@ export class ContentDescriptionObjectState extends State {
299
312
  static guid = AsfGuid.ContentDescriptionObject;
300
313
  static contentDescTags = ['Title', 'Author', 'Copyright', 'Description', 'Rating'];
301
314
  get(buf, off) {
302
- if (this.len < 10 || off < 0 || this.len > buf.length - off) {
303
- throw new AsfContentParseError('Truncated Content Description Object');
304
- }
315
+ const cursor = new ByteCursor(buf, off, this.len, 'Content Description Object');
316
+ const lengths = cursor.bytes(10, 'Truncated Content Description Object');
305
317
  const tags = [];
306
- const data = buf.subarray(off, off + this.len);
307
- const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
308
- let pos = 10;
309
318
  for (const [i, tagName] of ContentDescriptionObjectState.contentDescTags.entries()) {
310
- const length = view.getUint16(i * 2, true);
311
- if (length > data.length - pos) {
312
- throw new AsfContentParseError(`${tagName} length ${length} exceeds Content Description payload`);
313
- }
319
+ const length = Token.UINT16_LE.get(lengths, i * 2);
320
+ const value = cursor.bytes(length, `${tagName} length ${length} exceeds Content Description payload`);
314
321
  if (length > 0) {
315
- const end = pos + length;
316
- tags.push({ id: tagName, value: parseUnicodeAttr(data.subarray(pos, end)) });
317
- pos = end;
322
+ tags.push({ id: tagName, value: parseUnicodeAttr(value) });
318
323
  }
319
324
  }
320
325
  return tags;
@@ -327,37 +332,20 @@ export class ContentDescriptionObjectState extends State {
327
332
  export class ExtendedContentDescriptionObjectState extends State {
328
333
  static guid = AsfGuid.ExtendedContentDescriptionObject;
329
334
  get(buf, off) {
330
- if (this.len < 2 || off < 0 || this.len > buf.length - off) {
331
- throw new AsfContentParseError('Truncated Extended Content Description Object');
332
- }
335
+ const cursor = new ByteCursor(buf, off, this.len, 'Extended Content Description Object');
333
336
  const tags = [];
334
- const payload = buf.subarray(off, off + this.len);
335
- const view = new DataView(payload.buffer, payload.byteOffset, payload.byteLength);
336
- const attrCount = view.getUint16(0, true);
337
- if (attrCount > (payload.length - 2) / 6) {
337
+ const attrCount = cursor.read(Token.UINT16_LE);
338
+ if (attrCount > cursor.remaining / 6) {
338
339
  throw new AsfContentParseError('Extended Content Description count exceeds payload');
339
340
  }
340
- let pos = 2;
341
341
  for (let i = 0; i < attrCount; i += 1) {
342
- if (payload.length - pos < 6) {
343
- throw new AsfContentParseError('Truncated Extended Content Description record');
344
- }
345
- const nameLen = view.getUint16(pos, true);
346
- pos += 2;
347
- if (nameLen > payload.length - pos - 4) {
348
- throw new AsfContentParseError('Extended Content Description name exceeds payload');
349
- }
350
- const name = parseUnicodeAttr(payload.subarray(pos, pos + nameLen));
351
- pos += nameLen;
352
- const valueType = view.getUint16(pos, true);
353
- pos += 2;
354
- const valueLen = view.getUint16(pos, true);
355
- pos += 2;
356
- if (valueLen > payload.length - pos) {
357
- throw new AsfContentParseError('Extended Content Description value exceeds payload');
358
- }
359
- const value = payload.subarray(pos, pos + valueLen);
360
- pos += valueLen;
342
+ cursor.require(6, 'Truncated Extended Content Description record');
343
+ const nameLen = cursor.read(Token.UINT16_LE);
344
+ cursor.require(nameLen + 4, 'Extended Content Description name exceeds payload');
345
+ const name = parseUnicodeAttr(cursor.bytes(nameLen, 'Extended Content Description name exceeds payload'));
346
+ const valueType = cursor.read(Token.UINT16_LE);
347
+ const valueLen = cursor.read(Token.UINT16_LE);
348
+ const value = cursor.bytes(valueLen, 'Extended Content Description value exceeds payload');
361
349
  this.postProcessTag(tags, name, valueType, value);
362
350
  }
363
351
  return tags;
@@ -441,38 +429,20 @@ export class ExtendedStreamPropertiesObjectState extends State {
441
429
  export class MetadataObjectState extends State {
442
430
  static guid = AsfGuid.MetadataObject;
443
431
  get(uint8Array, off) {
444
- if (this.len < 2 || off < 0 || this.len > uint8Array.length - off) {
445
- throw new AsfContentParseError('Truncated Metadata Object');
446
- }
432
+ const cursor = new ByteCursor(uint8Array, off, this.len, 'Metadata Object');
447
433
  const tags = [];
448
- const payload = uint8Array.subarray(off, off + this.len);
449
- const view = new DataView(payload.buffer, payload.byteOffset, payload.byteLength);
450
- const descriptionRecordsCount = view.getUint16(0, true);
451
- if (descriptionRecordsCount > (payload.length - 2) / 12) {
434
+ const descriptionRecordsCount = cursor.read(Token.UINT16_LE);
435
+ if (descriptionRecordsCount > cursor.remaining / 12) {
452
436
  throw new AsfContentParseError('Metadata record count exceeds payload');
453
437
  }
454
- let pos = 2;
455
438
  for (let i = 0; i < descriptionRecordsCount; i += 1) {
456
- if (payload.length - pos < 12) {
457
- throw new AsfContentParseError('Truncated Metadata record header');
458
- }
459
- pos += 4;
460
- const nameLen = view.getUint16(pos, true);
461
- pos += 2;
462
- const dataType = view.getUint16(pos, true);
463
- pos += 2;
464
- const dataLen = view.getUint32(pos, true);
465
- pos += 4;
466
- if (nameLen > payload.length - pos) {
467
- throw new AsfContentParseError('Metadata name exceeds payload');
468
- }
469
- const name = parseUnicodeAttr(payload.subarray(pos, pos + nameLen));
470
- pos += nameLen;
471
- if (dataLen > payload.length - pos) {
472
- throw new AsfContentParseError('Metadata value exceeds payload');
473
- }
474
- const data = payload.subarray(pos, pos + dataLen);
475
- pos += dataLen;
439
+ cursor.require(12, 'Truncated Metadata record header');
440
+ cursor.read(Token.UINT32_LE); // Reserved and stream number
441
+ const nameLen = cursor.read(Token.UINT16_LE);
442
+ const dataType = cursor.read(Token.UINT16_LE);
443
+ const dataLen = cursor.read(Token.UINT32_LE);
444
+ const name = parseUnicodeAttr(cursor.bytes(nameLen, 'Metadata name exceeds payload'));
445
+ const data = cursor.bytes(dataLen, 'Metadata value exceeds payload');
476
446
  this.postProcessTag(tags, name, dataType, data);
477
447
  }
478
448
  return tags;
@@ -1,7 +1,7 @@
1
1
  import initDebug from 'debug';
2
2
  import { EndOfStreamError } from 'strtok3';
3
3
  import * as Token from 'token-types';
4
- import { validateAllocation } from '../common/Allocation.js';
4
+ import { getMaxMetadataEntries, validateAllocation } from '../common/Allocation.js';
5
5
  import { BasicParser } from '../common/BasicParser.js';
6
6
  import { TrackType } from '../type.js';
7
7
  import AsfGuid from './AsfGuid.js';
@@ -157,13 +157,15 @@ export class AsfParser extends BasicParser {
157
157
  this.validateAllocationSize(payloadSize, 'Codec List Object');
158
158
  let codecs;
159
159
  try {
160
- codecs = await AsfObject.readCodecEntries(this.tokenizer, payloadSize);
160
+ codecs = await AsfObject.readCodecEntries(this.tokenizer, payloadSize, getMaxMetadataEntries(this.options));
161
161
  }
162
162
  catch (error) {
163
163
  const message = error instanceof Error ? error.message : String(error);
164
164
  throw new AsfContentParseError(`Invalid ASF Codec List Object: ${message}`);
165
165
  }
166
- this.codecs.push(...codecs);
166
+ for (const codec of codecs) {
167
+ this.codecs.push(codec);
168
+ }
167
169
  const audioCodecs = codecs
168
170
  .filter(codec => codec.type.audioCodec)
169
171
  .map(codec => codec.codecName)
@@ -1,4 +1,5 @@
1
1
  import { CommonTagMapper } from '../common/GenericTagMapper.js';
2
+ import { toRatio } from '../common/Util.js';
2
3
  /**
3
4
  * ASF Metadata tag mappings.
4
5
  * See http://msdn.microsoft.com/en-us/library/ms867702.aspx
@@ -13,6 +14,7 @@ const asfTagMap = {
13
14
  'WM/OriginalReleaseYear': 'originalyear',
14
15
  Description: 'comment',
15
16
  'WM/TrackNumber': 'track',
17
+ TotalTracks: 'totaltracks',
16
18
  'WM/PartOfSet': 'disk',
17
19
  'WM/Genre': 'genre',
18
20
  'WM/Composer': 'composer',
@@ -33,7 +35,14 @@ const asfTagMap = {
33
35
  'WM/ContentGroupDescription': 'grouping',
34
36
  'WM/SubTitle': 'subtitle',
35
37
  'WM/SetSubTitle': 'discsubtitle',
36
- // 'WM/PartOfSet': 'totaldiscs',
38
+ REPLAYGAIN_TRACK_GAIN: 'replaygain_track_gain',
39
+ REPLAYGAIN_TRACK_PEAK: 'replaygain_track_peak',
40
+ REPLAYGAIN_ALBUM_GAIN: 'replaygain_album_gain',
41
+ REPLAYGAIN_ALBUM_PEAK: 'replaygain_album_peak',
42
+ replaygain_track_gain: 'replaygain_track_gain',
43
+ replaygain_track_peak: 'replaygain_track_peak',
44
+ replaygain_album_gain: 'replaygain_album_gain',
45
+ replaygain_album_peak: 'replaygain_album_peak',
37
46
  'WM/IsCompilation': 'compilation',
38
47
  'WM/SharedUserRating': 'rating',
39
48
  POPULARIMETER: 'rating',
@@ -83,10 +92,25 @@ export class AsfTagMapper extends CommonTagMapper {
83
92
  super(['asf'], asfTagMap);
84
93
  }
85
94
  postMap(tag, warnings) {
95
+ if (this.getCommonName(tag.id)?.startsWith('replaygain_')) {
96
+ const value = typeof tag.value === 'string'
97
+ ? tag.value.trim().match(/^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)\s*(dB)?$/i)
98
+ : null;
99
+ const normalized = value ? `${value[1]}${value[2] ? ' dB' : ''}` : undefined;
100
+ const ratio = normalized ? toRatio(normalized) : undefined;
101
+ // A silent peak of zero is valid (its dB value is -Infinity).
102
+ if (!ratio || !Number.isFinite(ratio.ratio) || Number.isNaN(ratio.dB)) {
103
+ warnings.addWarning(`Invalid ASF ReplayGain value for ${tag.id}`);
104
+ tag.id = ''; // Keep invalid values native without mapping them to common metadata.
105
+ }
106
+ else {
107
+ tag.value = normalized;
108
+ }
109
+ }
86
110
  switch (tag.id) {
87
111
  case 'POPULARIMETER': {
88
112
  // popm-style attribute, written by e.g. foobar2000; value is "email|rating|counter"
89
- const [email, rating] = tag.value.split('|');
113
+ const [email, rating] = tag.value.split('|', 2);
90
114
  const value = Number(rating);
91
115
  const valid = /^\d+$/.test(rating) && Number.isInteger(value) && value >= 0 && value <= 255;
92
116
  if (!valid) {
@@ -99,7 +123,7 @@ export class AsfTagMapper extends CommonTagMapper {
99
123
  break;
100
124
  }
101
125
  case 'WM/SharedUserRating': {
102
- const keys = tag.id.split(':');
126
+ const keys = tag.id.split(':', 2);
103
127
  tag.value = AsfTagMapper.toRating(tag.value);
104
128
  tag.id = keys[0];
105
129
  break;
@@ -1,4 +1,4 @@
1
1
  import type { DataType } from './AsfObject.js';
2
2
  export type AttributeParser = (buf: Uint8Array) => boolean | string | number | bigint | Uint8Array;
3
- export declare function getParserForAttr(i: DataType): AttributeParser;
3
+ export declare function getParserForAttr(i: DataType): AttributeParser | undefined;
4
4
  export declare function parseUnicodeAttr(uint8Array: Uint8Array): string;
@@ -1,6 +1,7 @@
1
1
  import initDebug from 'debug';
2
2
  import * as strtok3 from 'strtok3';
3
3
  import * as Token from 'token-types';
4
+ import { getMaxMetadataEntries } from '../common/Allocation.js';
4
5
  import { BasicParser } from '../common/BasicParser.js';
5
6
  import * as CafToken from './CafToken.js';
6
7
  import { CafContentError } from './CafToken.js';
@@ -157,7 +158,17 @@ export class CafParser extends BasicParser {
157
158
  throw new CafContentError(`Information chunk size ${chunkSize} is too small to hold mNumEntries`);
158
159
  }
159
160
  const body = await this.readChunkBody(chunkSize, 'Information');
160
- for (const { key, value } of CafToken.parseInfoEntries(body)) {
161
+ const entries = CafToken.parseInfoEntries(body, getMaxMetadataEntries(this.options));
162
+ for (const { key, value } of entries) {
163
+ if (['artist', 'composer', 'lyricist', 'genre'].includes(key)) {
164
+ let count = 1;
165
+ for (let offset = value.indexOf(','); offset >= 0; offset = value.indexOf(',', offset + 1)) {
166
+ ++count;
167
+ }
168
+ if (count > getMaxMetadataEntries(this.options)) {
169
+ throw new CafContentError(`Comma-separated value count ${count} exceeds entry limit ${getMaxMetadataEntries(this.options)}`);
170
+ }
171
+ }
161
172
  debug(`info key=${key}`);
162
173
  await this.metadata.addTag('CAF', key, value);
163
174
  }
@@ -174,7 +185,7 @@ export class CafParser extends BasicParser {
174
185
  throw new CafContentError(`Channel Layout chunk declares ${header.numberChannelDescriptions} description(s) which exceed its size of ${chunkSize}`);
175
186
  }
176
187
  const descriptions = descriptionLen > 0
177
- ? CafToken.parseChannelDescriptions(await this.readChunkBody(descriptionLen, 'Channel Layout'), header.numberChannelDescriptions)
188
+ ? CafToken.parseChannelDescriptions(await this.readChunkBody(descriptionLen, 'Channel Layout'), header.numberChannelDescriptions, getMaxMetadataEntries(this.options))
178
189
  : [];
179
190
  await this.addChannelLayout(header, descriptions);
180
191
  await this.tokenizer.ignore(chunkSize - bodyLen);
@@ -65,11 +65,11 @@ export interface IChannelDescription {
65
65
  }
66
66
  export declare const channelDescriptionLen = 20;
67
67
  /** Each CAFChannelDescription has a UInt32 label, UInt32 flags and three Float32 coordinates */
68
- export declare function parseChannelDescriptions(body: Uint8Array, count: number): IChannelDescription[];
68
+ export declare function parseChannelDescriptions(body: Uint8Array, count: number, maxEntries?: number): IChannelDescription[];
69
69
  export interface IInfoEntry {
70
70
  key: string;
71
71
  value: string;
72
72
  }
73
73
  /** Reads the NUL terminated UTF-8 pairs, the declared entry count is authoritative */
74
- export declare function parseInfoEntries(body: Uint8Array): IInfoEntry[];
74
+ export declare function parseInfoEntries(body: Uint8Array, maxEntries?: number): IInfoEntry[];
75
75
  export {};
@@ -1,5 +1,6 @@
1
1
  import { textDecode } from '@borewit/text-codec';
2
2
  import * as Token from 'token-types';
3
+ import { defaultMaxMetadataEntries } from '../common/Allocation.js';
3
4
  import { makeUnexpectedFileContentError } from '../ParseError.js';
4
5
  export class CafContentError extends makeUnexpectedFileContentError('CAF') {
5
6
  }
@@ -94,10 +95,13 @@ export const ChannelLayoutHeader = {
94
95
  };
95
96
  export const channelDescriptionLen = 20;
96
97
  /** Each CAFChannelDescription has a UInt32 label, UInt32 flags and three Float32 coordinates */
97
- export function parseChannelDescriptions(body, count) {
98
+ export function parseChannelDescriptions(body, count, maxEntries = defaultMaxMetadataEntries) {
98
99
  if (count * channelDescriptionLen > body.length) {
99
100
  throw new CafContentError(`Channel Layout chunk declares ${count} description(s) for ${body.length} byte(s)`);
100
101
  }
102
+ if (count > maxEntries) {
103
+ throw new CafContentError(`Channel Layout description count ${count} exceeds entry limit ${maxEntries}`);
104
+ }
101
105
  const descriptions = [];
102
106
  for (let i = 0; i < count; ++i) {
103
107
  const off = i * channelDescriptionLen;
@@ -114,7 +118,7 @@ export function parseChannelDescriptions(body, count) {
114
118
  return descriptions;
115
119
  }
116
120
  /** Reads the NUL terminated UTF-8 pairs, the declared entry count is authoritative */
117
- export function parseInfoEntries(body) {
121
+ export function parseInfoEntries(body, maxEntries = defaultMaxMetadataEntries) {
118
122
  const readString = (from) => {
119
123
  const end = body.indexOf(0, from);
120
124
  if (end < 0) {
@@ -123,6 +127,9 @@ export function parseInfoEntries(body) {
123
127
  return { value: textDecode(body.subarray(from, end), 'utf8'), next: end + 1 };
124
128
  };
125
129
  const numEntries = Token.UINT32_BE.get(body, 0);
130
+ if (numEntries > maxEntries) {
131
+ throw new CafContentError(`Information entry count ${numEntries} exceeds entry limit ${maxEntries}`);
132
+ }
126
133
  const entries = [];
127
134
  let offset = 4;
128
135
  for (let i = 0; i < numEntries; ++i) {
@@ -1,8 +1,14 @@
1
1
  import type { IGetToken } from '@tokenizer/token';
2
2
  import { type IFileInfo, type ITokenizer, type ITokenizerOptions } from 'strtok3';
3
3
  import type { IOptions } from '../type.js';
4
+ export declare const defaultMaxMetadataEntries = 100000;
5
+ export declare const defaultMaxChapterCount = 1000;
4
6
  type ErrorFactory = (message: string) => Error;
5
7
  export declare function getMaxMemoryAllocation(options: IOptions): number;
8
+ /** Limit entries in an individual decoded list or table, independently of byte-buffer limits. */
9
+ export declare function getMaxMetadataEntries(options: IOptions): number;
10
+ /** Maximum chapters returned by supported chapter parsers. */
11
+ export declare function getMaxChapterCount(options: IOptions): number;
6
12
  /** Configure the tokenizer safety net once, using the same limit as parser-owned buffers. */
7
13
  export declare function getTokenizerOptions(options: IOptions, fileInfo?: IFileInfo): ITokenizerOptions;
8
14
  /** Check untrusted lengths before allocating, including accumulated stream payloads. */
@@ -1,6 +1,8 @@
1
1
  import { EndOfStreamError, isRandomAccessTokenizer } from 'strtok3';
2
2
  import { UnexpectedFileContentError } from '../ParseError.js';
3
3
  const defaultMaxMemoryAllocation = 64 * 1024 * 1024;
4
+ export const defaultMaxMetadataEntries = 100_000;
5
+ export const defaultMaxChapterCount = 1_000;
4
6
  const readChunkSize = 64 * 1024;
5
7
  const allocationError = message => new UnexpectedFileContentError('metadata', message);
6
8
  export function getMaxMemoryAllocation(options) {
@@ -10,6 +12,22 @@ export function getMaxMemoryAllocation(options) {
10
12
  }
11
13
  return limit;
12
14
  }
15
+ /** Limit entries in an individual decoded list or table, independently of byte-buffer limits. */
16
+ export function getMaxMetadataEntries(options) {
17
+ const limit = options.maxMetadataEntries ?? defaultMaxMetadataEntries;
18
+ if (!Number.isSafeInteger(limit) || limit <= 0) {
19
+ throw new RangeError('maxMetadataEntries must be a positive safe integer');
20
+ }
21
+ return limit;
22
+ }
23
+ /** Maximum chapters returned by supported chapter parsers. */
24
+ export function getMaxChapterCount(options) {
25
+ const limit = options.maxChapterCount ?? defaultMaxChapterCount;
26
+ if (!Number.isSafeInteger(limit) || limit <= 0) {
27
+ throw new RangeError('maxChapterCount must be a positive safe integer');
28
+ }
29
+ return limit;
30
+ }
13
31
  /** Configure the tokenizer safety net once, using the same limit as parser-owned buffers. */
14
32
  export function getTokenizerOptions(options, fileInfo) {
15
33
  return { maxBufferSize: getMaxMemoryAllocation(options), fileInfo };
@@ -8,7 +8,7 @@ export class CommonTagMapper {
8
8
  // converts 1/10 to no : 1, of : 10
9
9
  // or 1 to no : 1, of : 0
10
10
  static normalizeTrack(origVal) {
11
- const split = origVal.toString().split('/');
11
+ const split = origVal.toString().split('/', 2);
12
12
  return {
13
13
  no: Number.parseInt(split[0], 10) || null,
14
14
  of: Number.parseInt(split[1], 10) || null
@@ -24,6 +24,8 @@ export interface INativeMetadataCollector extends IWarningCollector {
24
24
  setFormat<K extends keyof IFormat>(key: K, value: IFormat[K]): void;
25
25
  registerTagType(tagType: TagType): void;
26
26
  addTag(tagType: TagType, tagId: string, value: AnyTagValue): Promise<void>;
27
+ /** Map a derived common value without adding a synthetic native tag. */
28
+ postMap(tagType: TagType, tag: IGenericTag): Promise<void>;
27
29
  addStreamInfo(streamInfo: ITrackInfo): void;
28
30
  setAudioOnly(): void;
29
31
  }
@@ -2,7 +2,7 @@ import initDebug from 'debug';
2
2
  import { fileTypeFromBuffer } from 'file-type';
3
3
  import { parseLyrics } from '../lrc/LyricsParser.js';
4
4
  import { TrackTypeValueToKeyMap } from '../type.js';
5
- import { getMaxMemoryAllocation } from './Allocation.js';
5
+ import { getMaxMemoryAllocation, getMaxMetadataEntries } from './Allocation.js';
6
6
  import { CombinedTagMapper } from './CombinedTagMapper.js';
7
7
  import { CommonTagMapper } from './GenericTagMapper.js';
8
8
  import { isSingleton, isUnique } from './GenericTagTypes.js';
@@ -175,10 +175,10 @@ export class MetadataCollector {
175
175
  tag.value = toRatio(tag.value);
176
176
  break;
177
177
  case 'replaygain_track_minmax':
178
- tag.value = tag.value.split(',').map(v => Number.parseInt(v, 10));
178
+ tag.value = tag.value.split(',', 2).map(v => Number.parseInt(v, 10));
179
179
  break;
180
180
  case 'replaygain_undo': {
181
- const minMix = tag.value.split(',').map(v => Number.parseInt(v, 10));
181
+ const minMix = tag.value.split(',', 2).map(v => Number.parseInt(v, 10));
182
182
  tag.value = {
183
183
  leftChannel: minMix[0],
184
184
  rightChannel: minMix[1]
@@ -209,7 +209,7 @@ export class MetadataCollector {
209
209
  break;
210
210
  case 'lyrics':
211
211
  if (typeof tag.value === 'string') {
212
- tag.value = parseLyrics(tag.value);
212
+ tag.value = parseLyrics(tag.value, getMaxMetadataEntries(this.opts ?? {}));
213
213
  }
214
214
  break;
215
215
  default:
@@ -290,6 +290,23 @@ export class MetadataCollector {
290
290
  * Convert native tag to common tags
291
291
  */
292
292
  async toCommon(tagType, tagId, value) {
293
+ // Expand involved-person roles for mapping without adding synthetic native tags.
294
+ if (((tagType === 'ID3v2.2' && tagId === 'IPL') ||
295
+ (tagType === 'ID3v2.3' && tagId === 'IPLS') ||
296
+ (tagType === 'ID3v2.4' && tagId === 'TIPL')) &&
297
+ value !== null &&
298
+ typeof value === 'object') {
299
+ for (const [role, people] of Object.entries(value)) {
300
+ if (Array.isArray(people)) {
301
+ for (const person of people) {
302
+ if (typeof person === 'string' && person.length > 0) {
303
+ await this.toCommon(tagType, `${tagId}:${role}`, person);
304
+ }
305
+ }
306
+ }
307
+ }
308
+ return;
309
+ }
293
310
  const tag = { id: tagId, value };
294
311
  const genericTag = this.tagMapper.mapTag(tagType, tag, this);
295
312
  if (genericTag) {
@@ -9,6 +9,10 @@ export declare function getBit(buf: Uint8Array, off: number, bit: number): boole
9
9
  */
10
10
  export declare function findZero(uint8Array: Uint8Array, encoding?: StringEncoding): number;
11
11
  export declare function trimRightNull(x: string): string;
12
+ /** Split text, validating the value count before allocation. By default, omit empty segments except for empty results. */
13
+ export declare function splitText(text: string, separator: string, context: string, validateCount: (count: number, context: string) => void, { keepEmpty }?: {
14
+ keepEmpty?: boolean;
15
+ }): string[];
12
16
  /**
13
17
  * Decode string
14
18
  */
@@ -33,6 +33,39 @@ export function trimRightNull(x) {
33
33
  const pos0 = x.indexOf('\0');
34
34
  return pos0 === -1 ? x : x.substring(0, pos0);
35
35
  }
36
+ /** Split text, validating the value count before allocation. By default, omit empty segments except for empty results. */
37
+ export function splitText(text, separator, context, validateCount, { keepEmpty = false } = {}) {
38
+ if (separator.length === 0) {
39
+ throw new RangeError('Text separator must not be empty');
40
+ }
41
+ let count = 0;
42
+ let start = 0;
43
+ for (let end = text.indexOf(separator); end >= 0; end = text.indexOf(separator, start)) {
44
+ if (keepEmpty || end > start) {
45
+ ++count;
46
+ }
47
+ start = end + separator.length;
48
+ }
49
+ if (keepEmpty || start < text.length) {
50
+ ++count;
51
+ }
52
+ validateCount(Math.max(count, 1), context);
53
+ const values = [];
54
+ start = 0;
55
+ for (let end = text.indexOf(separator); end >= 0; end = text.indexOf(separator, start)) {
56
+ if (keepEmpty || end > start) {
57
+ values.push(text.slice(start, end));
58
+ }
59
+ start = end + separator.length;
60
+ }
61
+ if (keepEmpty || start < text.length) {
62
+ values.push(text.slice(start));
63
+ }
64
+ else if (values.length === 0) {
65
+ values.push('');
66
+ }
67
+ return values;
68
+ }
36
69
  function swapBytes(uint8Array) {
37
70
  const l = uint8Array.length;
38
71
  if ((l & 1) !== 0) {
@@ -133,7 +166,7 @@ export function dbToRatio(dB) {
133
166
  * @param value string holding a ratio like '0.034' or '-7.54 dB'
134
167
  */
135
168
  export function toRatio(value) {
136
- const ps = value.split(' ').map(p => p.trim().toLowerCase());
169
+ const ps = value.split(' ', 2).map(p => p.trim().toLowerCase());
137
170
  if (ps.length >= 1) {
138
171
  const v = Number.parseFloat(ps[0]);
139
172
  return ps.length === 2 && ps[1] === 'db'
@@ -1,3 +1,4 @@
1
+ import { type IGetToken } from 'strtok3';
1
2
  import { BasicParser } from '../common/BasicParser.js';
2
3
  declare const DsdiffContentParseError_base: {
3
4
  new (message: string): {
@@ -21,11 +22,13 @@ export declare class DsdiffContentParseError extends DsdiffContentParseError_bas
21
22
  * - http://www.sonicstudio.com/pdf/dsd/DSDIFF_1.5_Spec.pdf
22
23
  */
23
24
  export declare class DsdiffParser extends BasicParser {
25
+ private input;
26
+ protected readToken<T>(token: IGetToken<T>): Promise<T>;
24
27
  parse(): Promise<void>;
25
28
  private validateChunkSize;
26
29
  private requireChunkSize;
27
30
  private ignoreBytes;
28
- private readFmt8Chunks;
31
+ private readChunks;
29
32
  private readData;
30
33
  private handleSoundPropertyChunks;
31
34
  private handleChannelChunks;