@openclaw/whatsapp 2026.9.6 → 2026.9.8

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 (354) hide show
  1. package/assets/icon.png +0 -0
  2. package/dist/.setup/{accounts-D_NGDjCx.mjs → accounts-CtRPAQCL.mjs} +3 -9
  3. package/dist/.setup/{action-runtime-DZZFamfl.mjs → action-runtime-DeVk5V7r.mjs} +2 -2
  4. package/dist/.setup/{approval-handler.runtime-C0hzmMSj.mjs → approval-handler.runtime-CjqMlPOX.mjs} +6 -26
  5. package/dist/.setup/{approval-reactions-BnXw-UZI.mjs → approval-reactions-DiOFvb1s.mjs} +8 -14
  6. package/dist/.setup/{auth-store-Dh8a3cba.mjs → auth-store-BBonwKks.mjs} +9 -33
  7. package/dist/.setup/{channel-Bg_fS2iF.mjs → channel-CJFE0kD_.mjs} +82 -154
  8. package/dist/.setup/{channel-react-action-1iBiEnq7.mjs → channel-react-action-2r_hjLZV.mjs} +4 -8
  9. package/dist/.setup/{channel.runtime-rurG-kbr.mjs → channel.runtime-C94goLw9.mjs} +4 -4
  10. package/dist/.setup/{channel.setup-C8P5q8uD.mjs → channel.setup-CfN1UfdY.mjs} +1 -1
  11. package/dist/.setup/{connection-controller-C60mU7j7.mjs → connection-controller-CHo1oRJA.mjs} +13 -63
  12. package/dist/.setup/{creds-files-Drg3usj1.mjs → creds-files-CDATZWWM.mjs} +5 -11
  13. package/dist/.setup/{directory-config-BHPoBklt.mjs → directory-config-DUiJ5d8I.mjs} +13 -14
  14. package/dist/.setup/doctor-iMwg0Vhr.mjs +222 -0
  15. package/dist/.setup/group-config-path-DZr3ucUO.mjs +40 -0
  16. package/dist/.setup/{group-session-key-D22hYMdE.mjs → group-session-key-2-mja4OF.mjs} +3 -9
  17. package/dist/.setup/{login-2dmd1TfE.mjs → login-BFlvSh9h.mjs} +9 -11
  18. package/dist/.setup/{login-qr-CgKtO_ef.mjs → login-qr-Ayb8i25J.mjs} +29 -77
  19. package/dist/.setup/{monitor-By82ehLA.mjs → monitor-CGpV2VNN.mjs} +376 -504
  20. package/dist/.setup/{question-reactions-D3Zq9Gbn.mjs → question-reactions-CPyyi5AY.mjs} +2 -2
  21. package/dist/.setup/rolldown-runtime-BBjsoOtd.mjs +27 -0
  22. package/dist/.setup/{send-C6jDmcL9.mjs → send-BGdvf5cC.mjs} +31 -80
  23. package/dist/.setup/{send-api-B4DOt2RJ.mjs → send-api-H4AkQJjT.mjs} +45 -109
  24. package/dist/.setup/{session-errors-JuazczrA.mjs → session-errors-B8UcAnZN.mjs} +1 -4
  25. package/dist/.setup/{session.runtime-DcJuO42v.mjs → session.runtime-st1konFI.mjs} +1 -1
  26. package/dist/.setup/{setup-finalize-pGqWOiFX.mjs → setup-finalize-DmPX4EaW.mjs} +32 -70
  27. package/dist/.setup/setup-plugin-api-vJlxKzca.mjs +3 -0
  28. package/dist/.setup/{setup-surface-B9CYwDPZ.mjs → setup-surface-43fj197P.mjs} +3 -3
  29. package/dist/.setup/{shared-DVgQ8kRG.mjs → shared-DgOG5Iqr.mjs} +26 -37
  30. package/dist/.setup/{socket-close-CCVSFufF.mjs → socket-close-CT__V2fz.mjs} +80 -92
  31. package/dist/.setup/{targets-runtime-RBjx3pg_.mjs → targets-runtime-DmiqXIXO.mjs} +2 -7
  32. package/dist/action-runtime-api.js +1 -1
  33. package/dist/action-runtime.runtime.js +1 -1
  34. package/dist/agent-tools-api.js +5 -12
  35. package/dist/api.js +10 -10
  36. package/dist/auth-presence.js +1 -1
  37. package/dist/channel-plugin-api.js +1 -1
  38. package/dist/contract-api.js +2 -2
  39. package/dist/directory-contract-api.js +1 -1
  40. package/dist/doctor-contract-api.js +9 -10
  41. package/dist/light-runtime-api.js +2 -2
  42. package/dist/login-qr-runtime.js +1 -1
  43. package/dist/runtime-api.js +9 -9
  44. package/dist/setup-entry.js +1 -1
  45. package/dist/setup-plugin-api.js +1 -1
  46. package/node_modules/audio-decode/LICENSE +9 -10
  47. package/node_modules/audio-decode/README.md +16 -0
  48. package/node_modules/audio-decode/audio-decode.d.ts +2 -14
  49. package/node_modules/audio-decode/audio-decode.js +4 -92
  50. package/node_modules/audio-decode/meta.js +1 -0
  51. package/node_modules/audio-decode/node_modules/{audio-buffer → @audio/decode}/LICENSE +1 -1
  52. package/node_modules/audio-decode/node_modules/@audio/decode/audio-decode.d.ts +52 -0
  53. package/node_modules/audio-decode/node_modules/@audio/decode/audio-decode.js +242 -0
  54. package/node_modules/audio-decode/node_modules/@audio/decode/meta.js +14 -0
  55. package/node_modules/audio-decode/node_modules/@audio/decode/package.json +114 -0
  56. package/node_modules/audio-decode/node_modules/@audio/decode/readme.md +191 -0
  57. package/node_modules/audio-decode/node_modules/@audio/decode/stream.d.ts +12 -0
  58. package/node_modules/audio-decode/node_modules/@audio/decode/stream.js +1 -0
  59. package/node_modules/audio-decode/node_modules/@audio/decode/test.html +52 -0
  60. package/node_modules/audio-decode/node_modules/@audio/decode-aac/LICENSE +9 -0
  61. package/node_modules/audio-decode/node_modules/@audio/decode-aac/README.md +80 -0
  62. package/node_modules/audio-decode/node_modules/@audio/decode-aac/alac.js +326 -0
  63. package/node_modules/audio-decode/node_modules/@audio/decode-aac/audio.d.ts +15 -0
  64. package/node_modules/audio-decode/node_modules/@audio/decode-aac/audio.js +10 -0
  65. package/node_modules/audio-decode/node_modules/@audio/decode-aac/decode-aac.d.ts +24 -0
  66. package/node_modules/audio-decode/node_modules/@audio/decode-aac/decode-aac.js +452 -0
  67. package/node_modules/audio-decode/node_modules/@audio/decode-aac/meta.js +81 -0
  68. package/node_modules/audio-decode/node_modules/@audio/decode-aac/package.json +63 -0
  69. package/node_modules/audio-decode/node_modules/@audio/decode-aac/src/aac.wasm.js +0 -0
  70. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/LICENSE +12 -0
  71. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/LICENSE.liba52 +340 -0
  72. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/README.md +41 -0
  73. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/audio.d.ts +15 -0
  74. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/audio.js +9 -0
  75. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/decode-ac3.d.ts +20 -0
  76. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/decode-ac3.js +131 -0
  77. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/package.json +64 -0
  78. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/src/ac3.wasm.js +0 -0
  79. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/LICENSE +21 -0
  80. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/README.md +46 -0
  81. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/audio.d.ts +15 -0
  82. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/audio.js +10 -0
  83. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/decode-aiff.d.ts +16 -0
  84. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/decode-aiff.js +583 -0
  85. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/package.json +52 -0
  86. package/node_modules/audio-decode/node_modules/@audio/decode-amr/LICENSE +191 -0
  87. package/node_modules/audio-decode/node_modules/@audio/decode-amr/README.md +65 -0
  88. package/node_modules/audio-decode/node_modules/@audio/decode-amr/audio.d.ts +15 -0
  89. package/node_modules/audio-decode/node_modules/@audio/decode-amr/audio.js +10 -0
  90. package/node_modules/audio-decode/node_modules/@audio/decode-amr/decode-amr.d.ts +16 -0
  91. package/node_modules/audio-decode/node_modules/@audio/decode-amr/decode-amr.js +150 -0
  92. package/node_modules/audio-decode/node_modules/@audio/decode-amr/package.json +58 -0
  93. package/node_modules/audio-decode/node_modules/@audio/decode-amr/src/amr.wasm.js +0 -0
  94. package/node_modules/audio-decode/node_modules/@audio/decode-avi/LICENSE +21 -0
  95. package/node_modules/audio-decode/node_modules/@audio/decode-avi/README.md +53 -0
  96. package/node_modules/audio-decode/node_modules/@audio/decode-avi/audio.d.ts +15 -0
  97. package/node_modules/audio-decode/node_modules/@audio/decode-avi/audio.js +9 -0
  98. package/node_modules/audio-decode/node_modules/@audio/decode-avi/decode-avi.d.ts +21 -0
  99. package/node_modules/audio-decode/node_modules/@audio/decode-avi/decode-avi.js +241 -0
  100. package/node_modules/audio-decode/node_modules/@audio/decode-avi/package.json +66 -0
  101. package/node_modules/audio-decode/node_modules/@audio/decode-caf/LICENSE +21 -0
  102. package/node_modules/audio-decode/node_modules/@audio/decode-caf/README.md +48 -0
  103. package/node_modules/audio-decode/node_modules/@audio/decode-caf/audio.d.ts +15 -0
  104. package/node_modules/audio-decode/node_modules/@audio/decode-caf/audio.js +10 -0
  105. package/node_modules/audio-decode/node_modules/@audio/decode-caf/decode-caf.d.ts +16 -0
  106. package/node_modules/audio-decode/node_modules/@audio/decode-caf/decode-caf.js +238 -0
  107. package/node_modules/audio-decode/node_modules/@audio/decode-caf/package.json +53 -0
  108. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/LICENSE +21 -0
  109. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/README.md +73 -0
  110. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/audio.d.ts +21 -0
  111. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/audio.js +15 -0
  112. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/decode-dsd.d.ts +29 -0
  113. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/decode-dsd.js +423 -0
  114. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/meta.js +40 -0
  115. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/package.json +64 -0
  116. package/node_modules/audio-decode/node_modules/@audio/decode-dts/LICENSE +12 -0
  117. package/node_modules/audio-decode/node_modules/@audio/decode-dts/LICENSE.libdca +339 -0
  118. package/node_modules/audio-decode/node_modules/@audio/decode-dts/README.md +41 -0
  119. package/node_modules/audio-decode/node_modules/@audio/decode-dts/audio.d.ts +15 -0
  120. package/node_modules/audio-decode/node_modules/@audio/decode-dts/audio.js +9 -0
  121. package/node_modules/audio-decode/node_modules/@audio/decode-dts/decode-dts.d.ts +20 -0
  122. package/node_modules/audio-decode/node_modules/@audio/decode-dts/decode-dts.js +139 -0
  123. package/node_modules/audio-decode/node_modules/@audio/decode-dts/package.json +64 -0
  124. package/node_modules/audio-decode/node_modules/@audio/decode-dts/src/dts.wasm.js +0 -0
  125. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/LICENSE +12 -0
  126. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/LICENSE.ffmpeg +502 -0
  127. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/README.md +45 -0
  128. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/audio.d.ts +15 -0
  129. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/audio.js +9 -0
  130. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/decode-eac3.d.ts +20 -0
  131. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/decode-eac3.js +124 -0
  132. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/package.json +68 -0
  133. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/src/eac3.wasm.js +0 -0
  134. package/node_modules/audio-decode/node_modules/@audio/decode-flac/LICENSE +25 -0
  135. package/node_modules/audio-decode/node_modules/@audio/decode-flac/README.md +23 -0
  136. package/node_modules/audio-decode/node_modules/@audio/decode-flac/audio.d.ts +15 -0
  137. package/node_modules/audio-decode/node_modules/@audio/decode-flac/audio.js +10 -0
  138. package/node_modules/audio-decode/node_modules/@audio/decode-flac/decode-flac.d.ts +18 -0
  139. package/node_modules/audio-decode/node_modules/@audio/decode-flac/decode-flac.js +3172 -0
  140. package/node_modules/audio-decode/node_modules/@audio/decode-flac/meta.js +115 -0
  141. package/node_modules/audio-decode/node_modules/@audio/decode-flac/package.json +60 -0
  142. package/node_modules/audio-decode/node_modules/@audio/decode-mod/LICENSE +23 -0
  143. package/node_modules/audio-decode/node_modules/@audio/decode-mod/LICENSE.libopenmpt +25 -0
  144. package/node_modules/audio-decode/node_modules/@audio/decode-mod/README.md +86 -0
  145. package/node_modules/audio-decode/node_modules/@audio/decode-mod/audio.d.ts +20 -0
  146. package/node_modules/audio-decode/node_modules/@audio/decode-mod/audio.js +12 -0
  147. package/node_modules/audio-decode/node_modules/@audio/decode-mod/decode-mod.d.ts +58 -0
  148. package/node_modules/audio-decode/node_modules/@audio/decode-mod/decode-mod.js +148 -0
  149. package/node_modules/audio-decode/node_modules/@audio/decode-mod/package.json +68 -0
  150. package/node_modules/audio-decode/node_modules/@audio/decode-mod/src/mod.wasm.js +0 -0
  151. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/LICENSE +25 -0
  152. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/README.md +20 -0
  153. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/audio.d.ts +15 -0
  154. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/audio.js +10 -0
  155. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/decode-mp3.d.ts +16 -0
  156. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/decode-mp3.js +793 -0
  157. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/meta.js +143 -0
  158. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/package.json +60 -0
  159. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/LICENSE +21 -0
  160. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/README.md +58 -0
  161. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/audio.d.ts +15 -0
  162. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/audio.js +9 -0
  163. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/decode-mp4.d.ts +21 -0
  164. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/decode-mp4.js +455 -0
  165. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/package.json +74 -0
  166. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/LICENSE +31 -0
  167. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/LICENSE.libmpcdec +31 -0
  168. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/README.md +60 -0
  169. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/audio.d.ts +15 -0
  170. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/audio.js +9 -0
  171. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/decode-mpc.d.ts +20 -0
  172. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/decode-mpc.js +158 -0
  173. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/package.json +64 -0
  174. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/src/mpc.wasm.js +0 -0
  175. package/node_modules/audio-decode/node_modules/@audio/decode-opus/LICENSE +25 -0
  176. package/node_modules/audio-decode/node_modules/@audio/decode-opus/LICENSE.libopus +44 -0
  177. package/node_modules/audio-decode/node_modules/@audio/decode-opus/README.md +32 -0
  178. package/node_modules/audio-decode/node_modules/@audio/decode-opus/audio.d.ts +15 -0
  179. package/node_modules/audio-decode/node_modules/@audio/decode-opus/audio.js +10 -0
  180. package/node_modules/audio-decode/node_modules/@audio/decode-opus/core.d.ts +33 -0
  181. package/node_modules/audio-decode/node_modules/@audio/decode-opus/core.js +147 -0
  182. package/node_modules/audio-decode/node_modules/@audio/decode-opus/decode-opus.d.ts +18 -0
  183. package/node_modules/audio-decode/node_modules/@audio/decode-opus/decode-opus.js +1 -0
  184. package/node_modules/audio-decode/node_modules/@audio/decode-opus/meta.js +103 -0
  185. package/node_modules/audio-decode/node_modules/@audio/decode-opus/package.json +68 -0
  186. package/node_modules/audio-decode/node_modules/@audio/decode-opus/src/decode-opus.js +2 -0
  187. package/node_modules/audio-decode/node_modules/@audio/decode-opus/src/opus.wasm.js +0 -0
  188. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/LICENSE +25 -0
  189. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/README.md +19 -0
  190. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/audio.d.ts +15 -0
  191. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/audio.js +10 -0
  192. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/decode-qoa.d.ts +16 -0
  193. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/decode-qoa.js +275 -0
  194. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/package.json +56 -0
  195. package/node_modules/audio-decode/node_modules/@audio/decode-tta/LICENSE +21 -0
  196. package/node_modules/audio-decode/node_modules/@audio/decode-tta/LICENSE.ttadec +39 -0
  197. package/node_modules/audio-decode/node_modules/@audio/decode-tta/README.md +58 -0
  198. package/node_modules/audio-decode/node_modules/@audio/decode-tta/audio.d.ts +15 -0
  199. package/node_modules/audio-decode/node_modules/@audio/decode-tta/audio.js +9 -0
  200. package/node_modules/audio-decode/node_modules/@audio/decode-tta/decode-tta.d.ts +17 -0
  201. package/node_modules/audio-decode/node_modules/@audio/decode-tta/decode-tta.js +302 -0
  202. package/node_modules/audio-decode/node_modules/@audio/decode-tta/package.json +58 -0
  203. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/LICENSE +25 -0
  204. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/README.md +33 -0
  205. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/audio.d.ts +15 -0
  206. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/audio.js +10 -0
  207. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/decode-vorbis.d.ts +18 -0
  208. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/decode-vorbis.js +2984 -0
  209. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/meta.js +102 -0
  210. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/package.json +60 -0
  211. package/node_modules/audio-decode/node_modules/@audio/decode-wav/LICENSE +21 -0
  212. package/node_modules/audio-decode/node_modules/@audio/decode-wav/README.md +23 -0
  213. package/node_modules/audio-decode/node_modules/@audio/decode-wav/audio.d.ts +15 -0
  214. package/node_modules/audio-decode/node_modules/@audio/decode-wav/audio.js +10 -0
  215. package/node_modules/audio-decode/node_modules/@audio/decode-wav/decode-wav.d.ts +8 -0
  216. package/node_modules/audio-decode/node_modules/@audio/decode-wav/decode-wav.js +256 -0
  217. package/node_modules/audio-decode/node_modules/@audio/decode-wav/meta.js +114 -0
  218. package/node_modules/audio-decode/node_modules/@audio/decode-wav/package.json +52 -0
  219. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/LICENSE +29 -0
  220. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/LICENSE.wavpack +25 -0
  221. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/README.md +41 -0
  222. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/audio.d.ts +15 -0
  223. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/audio.js +9 -0
  224. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/decode-wavpack.d.ts +18 -0
  225. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/decode-wavpack.js +140 -0
  226. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/package.json +62 -0
  227. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/src/wavpack.wasm.js +0 -0
  228. package/node_modules/audio-decode/node_modules/@audio/decode-webm/LICENSE +21 -0
  229. package/node_modules/audio-decode/node_modules/@audio/decode-webm/LICENSE.libopus +44 -0
  230. package/node_modules/audio-decode/node_modules/@audio/decode-webm/README.md +59 -0
  231. package/node_modules/audio-decode/node_modules/@audio/decode-webm/audio.d.ts +15 -0
  232. package/node_modules/audio-decode/node_modules/@audio/decode-webm/audio.js +10 -0
  233. package/node_modules/audio-decode/node_modules/@audio/decode-webm/decode-webm.d.ts +18 -0
  234. package/node_modules/audio-decode/node_modules/@audio/decode-webm/decode-webm.js +141 -0
  235. package/node_modules/audio-decode/node_modules/@audio/decode-webm/package.json +76 -0
  236. package/node_modules/audio-decode/node_modules/@audio/decode-webm/src/opus.wasm.js +0 -0
  237. package/node_modules/audio-decode/node_modules/@audio/decode-wma/LICENSE +12 -0
  238. package/node_modules/audio-decode/node_modules/@audio/decode-wma/README.md +74 -0
  239. package/node_modules/audio-decode/node_modules/@audio/decode-wma/audio.d.ts +15 -0
  240. package/node_modules/audio-decode/node_modules/@audio/decode-wma/audio.js +10 -0
  241. package/node_modules/audio-decode/node_modules/@audio/decode-wma/decode-wma.d.ts +33 -0
  242. package/node_modules/audio-decode/node_modules/@audio/decode-wma/decode-wma.js +516 -0
  243. package/node_modules/audio-decode/node_modules/@audio/decode-wma/package.json +57 -0
  244. package/node_modules/audio-decode/node_modules/@audio/decode-wma/src/wma.wasm.js +0 -0
  245. package/node_modules/audio-decode/package.json +37 -39
  246. package/node_modules/audio-decode/stream.d.ts +2 -0
  247. package/node_modules/audio-decode/stream.js +2 -0
  248. package/node_modules/baileys/lib/Utils/messages-media.js +1 -1
  249. package/node_modules/baileys/node_modules/file-type/package.json +1 -1
  250. package/node_modules/baileys/node_modules/file-type/readme.md +2 -0
  251. package/node_modules/baileys/node_modules/file-type/source/detectors/zip.js +9 -4
  252. package/node_modules/baileys/package.json +1 -1
  253. package/node_modules/typebox/build/compile/code.mjs +1 -2
  254. package/node_modules/typebox/build/compile/validator.mjs +5 -1
  255. package/node_modules/typebox/build/format/iri.mjs +16 -9
  256. package/node_modules/typebox/build/guard/emit.mjs +2 -2
  257. package/node_modules/typebox/build/guard/guard.d.mts +7 -5
  258. package/node_modules/typebox/build/guard/guard.mjs +14 -9
  259. package/node_modules/typebox/build/guard/index.mjs +6 -0
  260. package/node_modules/typebox/build/guard/unicode/unicode.d.mts +6 -0
  261. package/node_modules/typebox/build/guard/unicode/unicode.mjs +35 -0
  262. package/node_modules/typebox/build/guard/{string.mjs → unicode/unicode_segment.mjs} +16 -19
  263. package/node_modules/typebox/build/schema/build.mjs +2 -3
  264. package/node_modules/typebox/build/schema/engine/_pathing.d.mts +1 -0
  265. package/node_modules/typebox/build/schema/engine/_pathing.mjs +11 -0
  266. package/node_modules/typebox/build/schema/engine/_refine.mjs +13 -5
  267. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +2 -1
  268. package/node_modules/typebox/build/schema/engine/dependencies.mjs +2 -1
  269. package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +2 -1
  270. package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +1 -1
  271. package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +2 -2
  272. package/node_modules/typebox/build/schema/engine/format.mjs +9 -2
  273. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +3 -2
  274. package/node_modules/typebox/build/schema/engine/properties.mjs +3 -2
  275. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -1
  276. package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +1 -1
  277. package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +2 -2
  278. package/node_modules/typebox/build/schema/engine/ref.d.mts +1 -1
  279. package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
  280. package/node_modules/typebox/build/schema/engine/schema.mjs +24 -24
  281. package/node_modules/typebox/build/schema/parse.mjs +3 -0
  282. package/node_modules/typebox/build/schema/pointer/pointer.d.mts +1 -6
  283. package/node_modules/typebox/build/schema/pointer/pointer.mjs +47 -64
  284. package/node_modules/typebox/build/system/settings/internal.d.mts +2 -0
  285. package/node_modules/typebox/build/system/settings/internal.mjs +20 -0
  286. package/node_modules/typebox/build/system/settings/settings.d.mts +11 -0
  287. package/node_modules/typebox/build/system/settings/settings.mjs +14 -0
  288. package/node_modules/typebox/build/type/extends/inference.d.mts +1 -1
  289. package/node_modules/typebox/build/type/extends/inference.mjs +15 -2
  290. package/node_modules/typebox/build/type/extends/tuple.d.mts +2 -1
  291. package/node_modules/typebox/build/type/extends/tuple.mjs +21 -1
  292. package/node_modules/typebox/build/value/parse/parse.mjs +10 -4
  293. package/node_modules/typebox/package.json +1 -1
  294. package/node_modules/typebox/readme.md +3 -1
  295. package/package.json +6 -6
  296. package/dist/.setup/doctor-BPb-SjdE.mjs +0 -65
  297. package/dist/.setup/group-config-path-BGyzT9Lg.mjs +0 -54
  298. package/dist/.setup/normalize-DdsROMMa.mjs +0 -2
  299. package/dist/.setup/rolldown-runtime-D7D4PA-g.mjs +0 -13
  300. package/dist/.setup/runtime-group-policy-DeSRFXEV.mjs +0 -11
  301. package/dist/.setup/setup-plugin-api-2wUapweU.mjs +0 -3
  302. package/dist/.setup/text-runtime-CHl0iPYe.mjs +0 -4
  303. package/node_modules/audio-decode/.eslintrc.json +0 -43
  304. package/node_modules/audio-decode/.github/workflows/test.js.yml +0 -31
  305. package/node_modules/audio-decode/.travis.yml +0 -13
  306. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/README.md +0 -293
  307. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js +0 -11646
  308. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js.map +0 -1
  309. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/index.js +0 -8
  310. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/package.json +0 -58
  311. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/EmscriptenWasm.js +0 -0
  312. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/OpusMLDecoder.js +0 -253
  313. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/OpusMLDecoderWebWorker.js +0 -17
  314. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/types.d.ts +0 -77
  315. package/node_modules/audio-decode/node_modules/audio-buffer/.eslintrc.json +0 -44
  316. package/node_modules/audio-decode/node_modules/audio-buffer/.github/workflows/node.js.yml +0 -31
  317. package/node_modules/audio-decode/node_modules/audio-buffer/.travis.yml +0 -7
  318. package/node_modules/audio-decode/node_modules/audio-buffer/index.js +0 -76
  319. package/node_modules/audio-decode/node_modules/audio-buffer/package.json +0 -37
  320. package/node_modules/audio-decode/node_modules/audio-buffer/readme.md +0 -56
  321. package/node_modules/audio-decode/node_modules/node-wav/README.md +0 -35
  322. package/node_modules/audio-decode/node_modules/node-wav/file.wav +0 -0
  323. package/node_modules/audio-decode/node_modules/node-wav/index.js +0 -291
  324. package/node_modules/audio-decode/node_modules/node-wav/package.json +0 -29
  325. package/node_modules/audio-decode/node_modules/node-wav/tests/file1.wav +0 -0
  326. package/node_modules/audio-decode/node_modules/node-wav/tests/test.js +0 -66
  327. package/node_modules/audio-decode/node_modules/node-wav/x.js +0 -12
  328. package/node_modules/audio-decode/node_modules/node-wav/x.json +0 -86702
  329. package/node_modules/audio-decode/node_modules/node-wav/x.js~ +0 -13
  330. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/README.md +0 -320
  331. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js +0 -232
  332. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js.map +0 -1
  333. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js +0 -0
  334. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js.map +0 -1
  335. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/index.js +0 -8
  336. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/package.json +0 -74
  337. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/src/OggOpusDecoder.js +0 -226
  338. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/src/OggOpusDecoderWebWorker.js +0 -17
  339. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/types.d.ts +0 -37
  340. package/node_modules/audio-decode/node_modules/opus-decoder/README.md +0 -265
  341. package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js +0 -232
  342. package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js.map +0 -1
  343. package/node_modules/audio-decode/node_modules/opus-decoder/index.js +0 -8
  344. package/node_modules/audio-decode/node_modules/opus-decoder/package.json +0 -56
  345. package/node_modules/audio-decode/node_modules/opus-decoder/src/EmscriptenWasm.js +0 -0
  346. package/node_modules/audio-decode/node_modules/opus-decoder/src/OpusDecoder.js +0 -239
  347. package/node_modules/audio-decode/node_modules/opus-decoder/src/OpusDecoderWebWorker.js +0 -17
  348. package/node_modules/audio-decode/node_modules/opus-decoder/types.d.ts +0 -74
  349. package/node_modules/audio-decode/readme.md +0 -49
  350. package/node_modules/audio-decode/tea.yaml +0 -6
  351. package/node_modules/audio-decode/test-case.js +0 -11
  352. package/node_modules/audio-decode/test.html +0 -15
  353. package/node_modules/audio-decode/test.js +0 -107
  354. /package/node_modules/typebox/build/guard/{string.d.mts → unicode/unicode_segment.d.mts} +0 -0
@@ -0,0 +1,115 @@
1
+ /**
2
+ * FLAC metadata parser — Vorbis comments, pictures, cue sheets.
3
+ * @module @audio/decode-flac/meta
4
+ */
5
+
6
+ const TD_U8 = new TextDecoder('utf-8'), TD_L1 = new TextDecoder('iso-8859-1')
7
+
8
+ function str(bytes, enc = 'utf-8') {
9
+ let end = bytes.length
10
+ while (end > 0 && bytes[end - 1] === 0) end--
11
+ return (enc === 'iso-8859-1' ? TD_L1 : TD_U8).decode(bytes.subarray(0, end))
12
+ }
13
+
14
+ // ── Constants ───────────────────────────────────────────────────────────
15
+
16
+ const STREAMINFO = 0, PADDING = 1, VORBIS_COMMENT = 4, CUESHEET = 5, PICTURE = 6
17
+
18
+ export const VORBIS_MAP = {
19
+ TITLE: 'title', ARTIST: 'artist', ALBUM: 'album', ALBUMARTIST: 'albumartist',
20
+ COMPOSER: 'composer', GENRE: 'genre', DATE: 'year', TRACKNUMBER: 'track',
21
+ DISCNUMBER: 'disc', BPM: 'bpm', KEY: 'key', COMMENT: 'comment', DESCRIPTION: 'comment',
22
+ COPYRIGHT: 'copyright', ISRC: 'isrc', PUBLISHER: 'publisher', ENCODER: 'software',
23
+ LYRICS: 'lyrics'
24
+ }
25
+
26
+ // ── Binary helpers ──────────────────────────────────────────────────────
27
+
28
+ function u32be(b, o) { return (b[o] * 0x1000000) + (b[o + 1] << 16) + (b[o + 2] << 8) + b[o + 3] }
29
+ function u32le(b, o) { return b[o] | (b[o + 1] << 8) | (b[o + 2] << 16) | (b[o + 3] * 0x1000000) }
30
+ function u24be(b, o) { return (b[o] << 16) | (b[o + 1] << 8) | b[o + 2] }
31
+ function fourcc(b, o) { return String.fromCharCode(b[o], b[o + 1], b[o + 2], b[o + 3]) }
32
+
33
+ // ── Block parsers ───────────────────────────────────────────────────────
34
+
35
+ function parseVorbisComment(b) {
36
+ let off = 0
37
+ let vendorLen = u32le(b, off); off += 4
38
+ off += vendorLen
39
+ let n = u32le(b, off); off += 4
40
+ let out = {}
41
+ for (let i = 0; i < n; i++) {
42
+ let len = u32le(b, off); off += 4
43
+ let s = str(b.subarray(off, off + len), 'utf-8')
44
+ off += len
45
+ let eq = s.indexOf('=')
46
+ if (eq < 0) continue
47
+ let key = s.slice(0, eq).toUpperCase(), val = s.slice(eq + 1)
48
+ let norm = VORBIS_MAP[key]
49
+ if (norm) out[norm] = val
50
+ }
51
+ return out
52
+ }
53
+
54
+ function parseFlacPicture(b) {
55
+ let off = 0
56
+ let type = u32be(b, off); off += 4
57
+ let mimeLen = u32be(b, off); off += 4
58
+ let mime = str(b.subarray(off, off + mimeLen), 'iso-8859-1'); off += mimeLen
59
+ let descLen = u32be(b, off); off += 4
60
+ let desc = str(b.subarray(off, off + descLen), 'utf-8'); off += descLen
61
+ off += 16 // width, height, depth, colors
62
+ let dataLen = u32be(b, off); off += 4
63
+ let data = b.slice(off, off + dataLen)
64
+ return { mime, type, description: desc, data }
65
+ }
66
+
67
+ function parseCueSheet(b) {
68
+ let markers = [], regions = []
69
+ let off = 395 // media catalog (128) + leadin (8) + flags (1) + reserved (258)
70
+ if (b.length < off + 1) return { markers, regions }
71
+ let numTracks = b[off]; off += 1
72
+ for (let t = 0; t < numTracks; t++) {
73
+ if (off + 36 > b.length) break
74
+ let trackOffLow = u32be(b, off + 4), trackOffHigh = u32be(b, off)
75
+ let trackOffset = trackOffHigh * 0x100000000 + trackOffLow
76
+ let trackNum = b[off + 8]
77
+ let nIdx = b[off + 35]
78
+ off += 36
79
+ if (nIdx > 0 && trackNum < 170) markers.push({ sample: trackOffset, label: `Track ${trackNum}` })
80
+ off += nIdx * 12
81
+ }
82
+ return { markers, regions }
83
+ }
84
+
85
+ /** Parse FLAC metadata blocks. Returns {meta, sampleRate, markers, regions} or null. */
86
+ export function parseMeta(bytes) {
87
+ if (!bytes?.length || bytes.length < 4 || fourcc(bytes, 0) !== 'fLaC') return null
88
+ let meta = {}, raw = { blocks: [] }, pictures = []
89
+ let sampleRate = 0, markers = [], regions = []
90
+ let off = 4
91
+ while (off + 4 <= bytes.length) {
92
+ let hdr = bytes[off]
93
+ let last = !!(hdr & 0x80), type = hdr & 0x7f
94
+ let size = u24be(bytes, off + 1)
95
+ let body = bytes.subarray(off + 4, off + 4 + size)
96
+ if (type !== STREAMINFO && type !== PADDING) raw.blocks.push({ type, body })
97
+ if (type === STREAMINFO && body.length >= 18) {
98
+ sampleRate = (body[10] << 12) | (body[11] << 4) | (body[12] >> 4)
99
+ } else if (type === VORBIS_COMMENT) {
100
+ Object.assign(meta, parseVorbisComment(body))
101
+ } else if (type === PICTURE) {
102
+ let p = parseFlacPicture(body)
103
+ if (p) pictures.push(p)
104
+ } else if (type === CUESHEET) {
105
+ let c = parseCueSheet(body)
106
+ markers.push(...c.markers); regions.push(...c.regions)
107
+ }
108
+ off += 4 + size
109
+ if (last) break
110
+ }
111
+
112
+ meta.raw = raw
113
+ meta.pictures = pictures
114
+ return { meta, sampleRate, markers, regions }
115
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@audio/decode-flac",
3
+ "version": "1.3.3",
4
+ "description": "Decode FLAC audio with libFLAC WASM",
5
+ "type": "module",
6
+ "main": "decode-flac.js",
7
+ "types": "decode-flac.d.ts",
8
+ "exports": {
9
+ ".": "./decode-flac.js",
10
+ "./meta": "./meta.js",
11
+ "./audio": {
12
+ "types": "./audio.d.ts",
13
+ "default": "./audio.js"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "decode-flac.js",
19
+ "decode-flac.d.ts",
20
+ "meta.js",
21
+ "LICENSE",
22
+ "audio.js",
23
+ "audio.d.ts"
24
+ ],
25
+ "scripts": {
26
+ "build": "bash build.sh",
27
+ "prepack": "npm run build",
28
+ "test": "node test.js"
29
+ },
30
+ "keywords": [
31
+ "flac",
32
+ "audio",
33
+ "decode",
34
+ "decoder",
35
+ "wasm",
36
+ "lossless"
37
+ ],
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ "license": "MIT",
42
+ "author": "audiojs",
43
+ "homepage": "https://github.com/audiojs/decode/tree/master/packages/decode-flac#readme",
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/audiojs/decode.git",
47
+ "directory": "packages/decode-flac"
48
+ },
49
+ "bugs": "https://github.com/audiojs/decode/issues",
50
+ "dependencies": {
51
+ "@wasm-audio-decoders/flac": "~0.2.10",
52
+ "codec-parser": "~2.5.0"
53
+ },
54
+ "engines": {
55
+ "node": ">=18"
56
+ },
57
+ "audio": "./audio.js",
58
+ "sideEffects": false,
59
+ "funding": "https://github.com/sponsors/audiojs"
60
+ }
@@ -0,0 +1,23 @@
1
+ Copyright (c) 2026, audiojs
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions are met:
5
+ * Redistributions of source code must retain the above copyright
6
+ notice, this list of conditions and the following disclaimer.
7
+ * Redistributions in binary form must reproduce the above copyright
8
+ notice, this list of conditions and the following disclaimer in the
9
+ documentation and/or other materials provided with the distribution.
10
+ * Neither the name of audiojs nor the names of its contributors may be
11
+ used to endorse or promote products derived from this software
12
+ without specific prior written permission.
13
+
14
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
18
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,25 @@
1
+ Copyright (c) 2004-2026, OpenMPT Project Developers and Contributors
2
+ Copyright (c) 1997-2003, Olivier Lapicque
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+ * Redistributions of source code must retain the above copyright
8
+ notice, this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright
10
+ notice, this list of conditions and the following disclaimer in the
11
+ documentation and/or other materials provided with the distribution.
12
+ * Neither the name of the OpenMPT project nor the
13
+ names of its contributors may be used to endorse or promote products
14
+ derived from this software without specific prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,86 @@
1
+ # @audio/decode-mod
2
+
3
+ Decode tracker modules — MOD, XM, S3M, IT, MPTM, and everything else [libopenmpt](https://lib.openmpt.org/libopenmpt/) reads — to PCM float samples.<br>
4
+ [libopenmpt](https://github.com/OpenMPT/openmpt) compiled to a single-file WASM ES module — no side files, loads from any CDN, Node, workers and AudioWorklets.
5
+
6
+ [![npm install @audio/decode-mod](https://nodei.co/npm/@audio/decode-mod.png?mini=true)](https://npmjs.org/package/@audio/decode-mod/)
7
+
8
+ ```js
9
+ import decode, { decoder, info } from '@audio/decode-mod'
10
+
11
+ let { channelData, sampleRate } = await decode(modBytes)
12
+
13
+ let meta = await info(modBytes)
14
+ // { title, artist, type, typeLong, tracker, message, duration, channels, patterns, orders, instruments, samples }
15
+ ```
16
+
17
+ A tracker module is a small program (samples + patterns + a playback sequence), not raw
18
+ audio — libopenmpt is the mixer that renders it. Render params follow libopenmpt's public
19
+ C API (`libopenmpt/libopenmpt.h`): `openmpt_module_create_from_memory2`,
20
+ `openmpt_module_read_float_{mono,stereo,quad}`, `openmpt_module_set_render_param`. A
21
+ module is a whole file, not a stream — there's no meaningful partial parse of a truncated
22
+ MOD/XM/S3M/IT, so `decode()` always needs the complete file. `repeat_count` is fixed at 0
23
+ (play once); `duration` is a render-length cap for songs that loop or whose estimated
24
+ length is impractically long.
25
+
26
+ ```js
27
+ let { channelData } = await decode(bytes, {
28
+ sampleRate: 44100,
29
+ channels: 1, // mono / stereo / quad (L,R,RL,RR)
30
+ duration: 30, // seconds — cap for endless/looping songs
31
+ interpolation: 2, // 0 internal default, 1 hold, 2 linear, 4 cubic, 8 windowed sinc
32
+ stereoSeparation: 150, // percent, [0,200]
33
+ gain: -6, // dB
34
+ })
35
+ ```
36
+
37
+ | Param | Default | |
38
+ |---|---|---|
39
+ | `sampleRate` | `48000` | Output sample rate, Hz |
40
+ | `channels` | `2` | `1` mono, `2` stereo, `4` quad (L,R,RL,RR) |
41
+ | `duration` | libopenmpt's estimate, capped at 600s | Seconds to render; hard cap for endless/looping songs |
42
+ | `interpolation` | `8` | `OPENMPT_MODULE_RENDER_INTERPOLATIONFILTER_LENGTH` — 0 internal default, 1 zero-order hold, 2 linear, 4 cubic, 8 windowed sinc (8 taps) |
43
+ | `stereoSeparation` | `100` | Percent, `[0,200]` |
44
+ | `gain` | — | Master gain, dB |
45
+
46
+ ## API
47
+
48
+ ### `decode(src: Uint8Array | ArrayBuffer, opts?): Promise<AudioData>`
49
+
50
+ Render a complete module.
51
+
52
+ ### `info(src: Uint8Array | ArrayBuffer): Promise<ModuleInfo>`
53
+
54
+ Read title/artist/format/duration/channel-and-pattern counts without rendering audio.
55
+
56
+ ### `decoder(opts?): Promise<ModDecoder>`
57
+
58
+ `{ decode(chunk), flush(), free() }`. `decode(chunk)` expects (and renders) a complete
59
+ file in one call — a module can't be parsed from a partial buffer. `flush()` returns
60
+ empty (nothing carries over); `free()` is a no-op (no WASM state outlives a single
61
+ `decode()` call). Matches [@audio/decode-qoa](../decode-qoa)'s whole-file shape.
62
+
63
+ ### `AudioData`
64
+
65
+ ```ts
66
+ { channelData: Float32Array[], sampleRate: number }
67
+ ```
68
+
69
+ ## Notes
70
+
71
+ - MO3 (a separately-compressed OpenMPT container) is not supported: it needs either an
72
+ external `unmo3` or the bundled minimp3/stb_vorbis/miniz fallback decoders, none of
73
+ which ship here (see `build.sh`) to keep the WASM small.
74
+ - No volume-ramping/click suppression beyond libopenmpt's own mixer — that's libopenmpt's
75
+ job, not this package's.
76
+ - Format reference: [ProTracker MOD](https://www.aes.id.au/modformat.html), [FastTracker II XM](https://github.com/milkytracker/MilkyTracker/blob/master/resources/reference/xm-form.txt), [Scream Tracker 3 S3M](https://www.romhacking.net/documents/[177]S3M%20Format.txt), [Impulse Tracker IT](https://github.com/schismtracker/schismtracker/wiki/ITTECH.TXT); libopenmpt's own [C API docs](https://lib.openmpt.org/doc/).
77
+
78
+ **Use when:** playing back tracker-format chiptunes/game music in the browser, or converting a `.mod`/`.xm`/`.s3m`/`.it` library to PCM/WAV in bulk.
79
+
80
+ ---
81
+
82
+ Part of [@audio/decode](https://github.com/audiojs/decode) — the decode family umbrella.
83
+
84
+ ## License
85
+
86
+ [ॐ](https://github.com/krishnized/license/) · [BSD-3-Clause](./LICENSE), same as the bundled [libopenmpt](./LICENSE.libopenmpt).
@@ -0,0 +1,20 @@
1
+ // Generated from the audio.js manifest (params metadata is the source of truth).
2
+ // Regenerate: node tools/dts.js in @audio/compile. Do not edit by hand.
3
+
4
+ /** Automatable number — scalar, `t => value` fn, or breakpoint curve {t, v} */
5
+ type Auto = number | ((t: number) => number) | { t: number[], v: number[] }
6
+ /** Per-block param values as delivered by hosts (numbers arrive as 1-length Float32Array) */
7
+ type Live = Record<string, Float32Array | string | boolean>
8
+ type Ctx = { sampleRate: number, maxBlockSize: number, maxChannels: number, currentTime: number, duration?: number, events?: readonly any[], emit?: (name: string, ...args: any[]) => void, [k: string]: unknown }
9
+ type Process = (inputs: Float32Array[][], outputs: Float32Array[][], params: Live) => void
10
+
11
+ type AudioData = { channelData: Float32Array[], sampleRate: number }
12
+
13
+ /** Codec plugin 'mod' — extends audio()'s openable formats / save() targets */
14
+ export declare const mod: { codec: 'mod', decode(bytes: Uint8Array): AudioData | Promise<AudioData> }
15
+ /** Codec plugin 'xm' — extends audio()'s openable formats / save() targets */
16
+ export declare const xm: { codec: 'xm', decode(bytes: Uint8Array): AudioData | Promise<AudioData> }
17
+ /** Codec plugin 's3m' — extends audio()'s openable formats / save() targets */
18
+ export declare const s3m: { codec: 's3m', decode(bytes: Uint8Array): AudioData | Promise<AudioData> }
19
+ /** Codec plugin 'it' — extends audio()'s openable formats / save() targets */
20
+ export declare const it: { codec: 'it', decode(bytes: Uint8Array): AudioData | Promise<AudioData> }
@@ -0,0 +1,12 @@
1
+ // audio.js manifest — codec atoms, decode half: whole-buffer bytes → { channelData,
2
+ // sampleRate }. One libopenmpt decoder serves four format names (MPTM shares the IT
3
+ // loader). Format detection is magic-byte (audio-type) — no test() needed here.
4
+
5
+ import decodeFn from './decode-mod.js'
6
+
7
+ const decode = (bytes) => decodeFn(bytes)
8
+
9
+ export const mod = { codec: 'mod', decode }
10
+ export const xm = { codec: 'xm', decode }
11
+ export const s3m = { codec: 's3m', decode }
12
+ export const it = { codec: 'it', decode }
@@ -0,0 +1,58 @@
1
+ export interface AudioData {
2
+ channelData: Float32Array[];
3
+ sampleRate: number;
4
+ }
5
+
6
+ export interface DecodeOpts {
7
+ /** @default 48000 */
8
+ sampleRate?: number;
9
+ /** mono / stereo / quad (L,R,RL,RR). @default 2 */
10
+ channels?: 1 | 2 | 4;
11
+ /** Seconds to render. @default libopenmpt's own duration estimate, capped at 600s */
12
+ duration?: number;
13
+ /** OPENMPT_MODULE_RENDER_INTERPOLATIONFILTER_LENGTH: 0 internal default, 1 zero-order hold, 2 linear, 4 cubic, 8 windowed sinc (8 taps). @default 8 */
14
+ interpolation?: 0 | 1 | 2 | 4 | 8;
15
+ /** Percent, [0,200]. @default 100 */
16
+ stereoSeparation?: number;
17
+ /** Master gain in dB. */
18
+ gain?: number;
19
+ }
20
+
21
+ export interface ModuleInfo {
22
+ title: string;
23
+ artist: string;
24
+ /** Format extension, e.g. "it" */
25
+ type: string;
26
+ /** Format name, e.g. "Impulse Tracker" */
27
+ typeLong: string;
28
+ /** Tracker the file was (most likely) saved with */
29
+ tracker: string;
30
+ /** Song message, or instrument/sample name listing when the format has no message */
31
+ message: string;
32
+ /** libopenmpt's duration estimate in seconds (openmpt_module_get_duration_seconds) */
33
+ duration: number;
34
+ /** Pattern channel count — independent of the rendered output channel count */
35
+ channels: number;
36
+ patterns: number;
37
+ orders: number;
38
+ instruments: number;
39
+ samples: number;
40
+ }
41
+
42
+ interface ModDecoder {
43
+ /** Renders a complete module file. Partial buffers are not supported — a module isn't a stream. */
44
+ decode(data: Uint8Array | ArrayBuffer): Promise<AudioData>;
45
+ /** No-op: decode() already returns the full render. */
46
+ flush(): AudioData;
47
+ /** No-op: no WASM state outlives a single decode() call. */
48
+ free(): void;
49
+ }
50
+
51
+ /** Decode a complete tracker module (MOD, XM, S3M, IT, MPTM, …) to PCM. */
52
+ export default function decode(src: ArrayBuffer | Uint8Array, opts?: DecodeOpts): Promise<AudioData>;
53
+
54
+ /** Read module metadata (title, duration, channel/pattern/order counts…) without rendering audio. */
55
+ export function info(src: ArrayBuffer | Uint8Array): Promise<ModuleInfo>;
56
+
57
+ /** Initialize WASM and create a whole-file decoder. */
58
+ export function decoder(opts?: DecodeOpts): Promise<ModDecoder>;
@@ -0,0 +1,148 @@
1
+ /**
2
+ * Tracker module renderer — libopenmpt (MOD, XM, S3M, IT, MPTM, and everything else
3
+ * libopenmpt reads: 669, AMF, AMS, C67, DBM, DIGI, DMF, DSM, DTM, FAR, FMT, FTM, GDM,
4
+ * ICE, IMF, ITP, J2B, MDL, MED, MO3*, MT2, MTM, MUS, OKT, PLM, PSM, PT36, PTM, PUMA,
5
+ * RTM, SFX, STM, STP, SYMMOD, ULT, UMX, WOW — see openmpt_get_supported_extensions())
6
+ * compiled to a single-file WASM ES module. A module is a whole file, not a stream:
7
+ * there is no meaningful partial parse of a truncated MOD/XM/S3M/IT, so decode() always
8
+ * needs the complete file — see decoder() below.
9
+ *
10
+ * *MO3 needs either an external unmo3 or the bundled minimp3/stb_vorbis/miniz fallback
11
+ * decoders; none of those ship here (see build.sh), so MO3 files fail to load cleanly.
12
+ *
13
+ * let { channelData, sampleRate } = await decode(modBytes)
14
+ * let meta = await info(modBytes) // title, duration, channel/pattern/order counts…
15
+ */
16
+ import createMod from './src/mod.wasm.js'
17
+
18
+ const EMPTY = Object.freeze({ channelData: [], sampleRate: 0 })
19
+ const BLOCK = 4096 // frames rendered per libopenmpt call
20
+ const MAX_DURATION_S = 600 // default cap for endless/looping songs when opts.duration is omitted
21
+
22
+ // OPENMPT_MODULE_RENDER_* — libopenmpt/libopenmpt.h
23
+ const RENDER_MASTERGAIN_MILLIBEL = 1
24
+ const RENDER_STEREOSEPARATION_PERCENT = 2
25
+ const RENDER_INTERPOLATIONFILTER_LENGTH = 3
26
+
27
+ let modP
28
+ function getMod() {
29
+ if (modP) return modP
30
+ let p = createMod()
31
+ modP = p
32
+ return p.catch(e => { modP = null; throw e })
33
+ }
34
+
35
+ function toBytes(src) { return src instanceof Uint8Array ? src : new Uint8Array(src) }
36
+
37
+ /** Load a module, throw libopenmpt's own error text on failure. Caller must destroy(). */
38
+ function open(m, bytes) {
39
+ let ptr = m._malloc(bytes.length)
40
+ m.HEAPU8.set(bytes, ptr)
41
+ let mod = m._audio_mod_create(ptr, bytes.length)
42
+ m._free(ptr)
43
+ if (!mod) throw Error('MOD: ' + m.UTF8ToString(m._audio_mod_last_error()))
44
+ return mod
45
+ }
46
+
47
+ function metaStr(m, mod, key) {
48
+ let len = m.lengthBytesUTF8(key) + 1, kp = m._malloc(len)
49
+ m.stringToUTF8(key, kp, len)
50
+ let rp = m._audio_mod_get_metadata(mod, kp)
51
+ m._free(kp)
52
+ let s = m.UTF8ToString(rp)
53
+ m._audio_mod_free_string(rp)
54
+ return s
55
+ }
56
+
57
+ /**
58
+ * Render a complete module to PCM.
59
+ * @param {Uint8Array|ArrayBuffer} src
60
+ * @param {object} [opts]
61
+ * @param {number} [opts.sampleRate=48000]
62
+ * @param {1|2|4} [opts.channels=2] mono / stereo / quad (L,R,RL,RR)
63
+ * @param {number} [opts.duration] seconds to render; default is libopenmpt's own duration
64
+ * estimate (openmpt_module_get_duration_seconds), capped at 600 s for endless/looping songs
65
+ * @param {0|1|2|4|8} [opts.interpolation=8] OPENMPT_MODULE_RENDER_INTERPOLATIONFILTER_LENGTH —
66
+ * 0 internal default, 1 zero-order hold, 2 linear, 4 cubic, 8 windowed sinc (8 taps)
67
+ * @param {number} [opts.stereoSeparation=100] percent, [0,200]
68
+ * @param {number} [opts.gain] dB, applied as master gain
69
+ * @returns {Promise<{channelData: Float32Array[], sampleRate: number}>}
70
+ */
71
+ export default async function decode(src, opts) {
72
+ let m = await getMod()
73
+ return render(m, toBytes(src), opts)
74
+ }
75
+
76
+ function render(m, bytes, opts = {}) {
77
+ let { sampleRate = 48000, channels = 2, duration, interpolation = 8, stereoSeparation = 100, gain } = opts
78
+ if (channels !== 1 && channels !== 2 && channels !== 4) throw Error('MOD: channels must be 1, 2 or 4')
79
+ let mod = open(m, bytes)
80
+ try {
81
+ m._audio_mod_set_repeat_count(mod, 0)
82
+ m._audio_mod_set_render_param(mod, RENDER_INTERPOLATIONFILTER_LENGTH, interpolation)
83
+ m._audio_mod_set_render_param(mod, RENDER_STEREOSEPARATION_PERCENT, stereoSeparation)
84
+ if (gain != null) m._audio_mod_set_render_param(mod, RENDER_MASTERGAIN_MILLIBEL, Math.round(gain * 100))
85
+
86
+ let capS = duration != null ? duration : Math.min(m._audio_mod_get_duration_seconds(mod), MAX_DURATION_S)
87
+ let maxFrames = Math.ceil(capS * sampleRate)
88
+ let bufs = Array.from({ length: channels }, () => m._malloc(BLOCK * 4))
89
+ try {
90
+ let parts = [], frames = 0
91
+ while (frames < maxFrames) {
92
+ let want = Math.min(BLOCK, maxFrames - frames)
93
+ let n = channels === 1 ? m._audio_mod_read_mono(mod, sampleRate, want, bufs[0])
94
+ : channels === 2 ? m._audio_mod_read_stereo(mod, sampleRate, want, bufs[0], bufs[1])
95
+ : m._audio_mod_read_quad(mod, sampleRate, want, bufs[0], bufs[1], bufs[2], bufs[3])
96
+ if (!n) break // song end (repeat count exhausted)
97
+ parts.push(bufs.map(p => m.HEAPF32.slice(p >> 2, (p >> 2) + n)))
98
+ frames += n
99
+ }
100
+ if (!frames) return EMPTY
101
+ let channelData = Array.from({ length: channels }, (_, c) => {
102
+ let o = new Float32Array(frames), off = 0
103
+ for (let p of parts) { o.set(p[c], off); off += p[c].length }
104
+ return o
105
+ })
106
+ return { channelData, sampleRate }
107
+ } finally { for (let p of bufs) m._free(p) }
108
+ } finally { m._audio_mod_destroy(mod) }
109
+ }
110
+
111
+ /**
112
+ * Read module metadata without rendering audio.
113
+ * @param {Uint8Array|ArrayBuffer} src
114
+ */
115
+ export async function info(src) {
116
+ let m = await getMod()
117
+ let mod = open(m, toBytes(src))
118
+ try {
119
+ return {
120
+ title: metaStr(m, mod, 'title'),
121
+ artist: metaStr(m, mod, 'artist'),
122
+ type: metaStr(m, mod, 'type'),
123
+ typeLong: metaStr(m, mod, 'type_long'),
124
+ tracker: metaStr(m, mod, 'tracker'),
125
+ message: metaStr(m, mod, 'message'),
126
+ duration: m._audio_mod_get_duration_seconds(mod),
127
+ channels: m._audio_mod_get_num_channels(mod),
128
+ patterns: m._audio_mod_get_num_patterns(mod),
129
+ orders: m._audio_mod_get_num_orders(mod),
130
+ instruments: m._audio_mod_get_num_instruments(mod),
131
+ samples: m._audio_mod_get_num_samples(mod),
132
+ }
133
+ } finally { m._audio_mod_destroy(mod) }
134
+ }
135
+
136
+ /**
137
+ * Whole-file decoder. A module can't be parsed from a partial buffer, so decode(chunk)
138
+ * expects (and returns) the complete rendered file in one call; flush() has nothing left
139
+ * to do. free() is a no-op — no WASM state outlives a single decode() call.
140
+ */
141
+ export async function decoder(opts) {
142
+ let m = await getMod()
143
+ return {
144
+ decode: (chunk) => chunk && chunk.byteLength ? render(m, toBytes(chunk), opts) : EMPTY,
145
+ flush: () => EMPTY,
146
+ free: () => {},
147
+ }
148
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@audio/decode-mod",
3
+ "version": "1.0.0",
4
+ "description": "Decode tracker modules — MOD, XM, S3M, IT, MPTM and more — with libopenmpt WASM",
5
+ "type": "module",
6
+ "main": "decode-mod.js",
7
+ "types": "decode-mod.d.ts",
8
+ "exports": {
9
+ ".": "./decode-mod.js",
10
+ "./audio": {
11
+ "types": "./audio.d.ts",
12
+ "default": "./audio.js"
13
+ },
14
+ "./package.json": "./package.json"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "scripts": {
20
+ "build": "bash build.sh",
21
+ "prepack": "npm run build",
22
+ "test": "node test.js"
23
+ },
24
+ "files": [
25
+ "decode-mod.js",
26
+ "decode-mod.d.ts",
27
+ "src/mod.wasm.js",
28
+ "audio.js",
29
+ "audio.d.ts",
30
+ "LICENSE",
31
+ "LICENSE.libopenmpt"
32
+ ],
33
+ "devDependencies": {
34
+ "tst": "^9.4.0"
35
+ },
36
+ "engines": {
37
+ "node": ">=18"
38
+ },
39
+ "keywords": [
40
+ "mod",
41
+ "xm",
42
+ "s3m",
43
+ "it",
44
+ "mptm",
45
+ "tracker",
46
+ "protracker",
47
+ "fasttracker",
48
+ "impulse-tracker",
49
+ "chiptune",
50
+ "audio",
51
+ "decode",
52
+ "decoder",
53
+ "wasm",
54
+ "libopenmpt"
55
+ ],
56
+ "license": "BSD-3-Clause",
57
+ "author": "audiojs",
58
+ "homepage": "https://github.com/audiojs/decode/tree/main/packages/decode-mod",
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "git+https://github.com/audiojs/decode.git",
62
+ "directory": "packages/decode-mod"
63
+ },
64
+ "bugs": "https://github.com/audiojs/decode/issues",
65
+ "audio": "./audio.js",
66
+ "sideEffects": false,
67
+ "funding": "https://github.com/sponsors/audiojs"
68
+ }
@@ -0,0 +1,25 @@
1
+ This work is offered to Krishna (https://github.com/krishnized/license).
2
+
3
+ ---
4
+
5
+ The MIT License (MIT)
6
+
7
+ Copyright (c) 2025 audiojs
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
23
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
25
+ OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,20 @@
1
+ # @audio/decode-mp3
2
+
3
+ Decode MP3 audio with [mpg123-decoder](https://github.com/eshaz/wasm-audio-decoders/tree/main/src/mpg123-decoder).
4
+
5
+ ```js
6
+ import decode, { decoder } from '@audio/decode-mp3'
7
+
8
+ let { channelData, sampleRate } = await decode(mp3Bytes)
9
+
10
+ let dec = await decoder() // initialize WASM
11
+ let a = dec.decode(chunk1)
12
+ let b = dec.decode(chunk2)
13
+ dec.free()
14
+ ```
15
+
16
+ `decoder()` is asynchronous. Its `decode()` method is synchronous.
17
+
18
+ ## License
19
+
20
+ [ॐ](https://github.com/krishnized/license/) · [MIT](./LICENSE)