@openclaw/qqbot 2026.5.20 → 2026.5.24-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 (818) hide show
  1. package/node_modules/@eshaz/web-worker/LICENSE +201 -0
  2. package/node_modules/@eshaz/web-worker/README.md +134 -0
  3. package/node_modules/@eshaz/web-worker/browser.js +17 -0
  4. package/node_modules/@eshaz/web-worker/cjs/browser.js +16 -0
  5. package/node_modules/@eshaz/web-worker/cjs/node.js +219 -0
  6. package/node_modules/@eshaz/web-worker/index.d.ts +4 -0
  7. package/node_modules/@eshaz/web-worker/node.js +223 -0
  8. package/node_modules/@eshaz/web-worker/package.json +54 -0
  9. package/node_modules/@tencent-connect/qqbot-connector/README.md +138 -0
  10. package/node_modules/@tencent-connect/qqbot-connector/dist/cjs/index.d.ts +2 -0
  11. package/node_modules/@tencent-connect/qqbot-connector/dist/cjs/index.js +1 -0
  12. package/node_modules/@tencent-connect/qqbot-connector/dist/cjs/qqbot-session.d.ts +35 -0
  13. package/node_modules/@tencent-connect/qqbot-connector/dist/cjs/qqbot-session.js +1 -0
  14. package/node_modules/@tencent-connect/qqbot-connector/dist/cjs/qr-connect.d.ts +83 -0
  15. package/node_modules/@tencent-connect/qqbot-connector/dist/cjs/qr-connect.js +3 -0
  16. package/node_modules/@tencent-connect/qqbot-connector/dist/esm/index.d.ts +2 -0
  17. package/node_modules/@tencent-connect/qqbot-connector/dist/esm/index.js +1 -0
  18. package/node_modules/@tencent-connect/qqbot-connector/dist/esm/qqbot-session.d.ts +35 -0
  19. package/node_modules/@tencent-connect/qqbot-connector/dist/esm/qqbot-session.js +1 -0
  20. package/node_modules/@tencent-connect/qqbot-connector/dist/esm/qr-connect.d.ts +83 -0
  21. package/node_modules/@tencent-connect/qqbot-connector/dist/esm/qr-connect.js +3 -0
  22. package/node_modules/@tencent-connect/qqbot-connector/package.json +62 -0
  23. package/node_modules/@wasm-audio-decoders/common/index.js +5 -0
  24. package/node_modules/@wasm-audio-decoders/common/package.json +36 -0
  25. package/node_modules/@wasm-audio-decoders/common/src/WASMAudioDecoderCommon.js +231 -0
  26. package/node_modules/@wasm-audio-decoders/common/src/WASMAudioDecoderWorker.js +129 -0
  27. package/node_modules/@wasm-audio-decoders/common/src/puff/README +67 -0
  28. package/node_modules/@wasm-audio-decoders/common/src/puff/build_puff.js +31 -0
  29. package/node_modules/@wasm-audio-decoders/common/src/puff/puff.c +863 -0
  30. package/node_modules/@wasm-audio-decoders/common/src/puff/puff.h +35 -0
  31. package/node_modules/@wasm-audio-decoders/common/src/utilities.js +3 -0
  32. package/node_modules/@wasm-audio-decoders/common/types.d.ts +7 -0
  33. package/node_modules/mpg123-decoder/README.md +265 -0
  34. package/node_modules/mpg123-decoder/dist/mpg123-decoder.min.js +185 -0
  35. package/node_modules/mpg123-decoder/dist/mpg123-decoder.min.js.map +1 -0
  36. package/node_modules/mpg123-decoder/index.js +8 -0
  37. package/node_modules/mpg123-decoder/package.json +58 -0
  38. package/node_modules/mpg123-decoder/src/EmscriptenWasm.js +464 -0
  39. package/node_modules/mpg123-decoder/src/MPEGDecoder.js +200 -0
  40. package/node_modules/mpg123-decoder/src/MPEGDecoderWebWorker.js +21 -0
  41. package/node_modules/mpg123-decoder/types.d.ts +30 -0
  42. package/node_modules/qrcode-terminal/.travis.yml +3 -0
  43. package/node_modules/qrcode-terminal/LICENSE +222 -0
  44. package/node_modules/qrcode-terminal/README.md +82 -0
  45. package/node_modules/qrcode-terminal/bin/qrcode-terminal.js +101 -0
  46. package/node_modules/qrcode-terminal/example/basic.js +2 -0
  47. package/node_modules/qrcode-terminal/example/basic.png +0 -0
  48. package/node_modules/qrcode-terminal/example/callback.js +4 -0
  49. package/node_modules/qrcode-terminal/example/small-qrcode.js +6 -0
  50. package/node_modules/qrcode-terminal/lib/main.js +100 -0
  51. package/node_modules/qrcode-terminal/package.json +37 -0
  52. package/node_modules/qrcode-terminal/test/main.js +63 -0
  53. package/node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js +22 -0
  54. package/node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js +38 -0
  55. package/node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js +7 -0
  56. package/node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js +10 -0
  57. package/node_modules/qrcode-terminal/vendor/QRCode/QRMath.js +44 -0
  58. package/node_modules/qrcode-terminal/vendor/QRCode/QRMode.js +6 -0
  59. package/node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js +66 -0
  60. package/node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js +298 -0
  61. package/node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js +272 -0
  62. package/node_modules/qrcode-terminal/vendor/QRCode/index.js +462 -0
  63. package/node_modules/silk-wasm/LICENSE +21 -0
  64. package/node_modules/silk-wasm/README.md +85 -0
  65. package/node_modules/silk-wasm/lib/index.cjs +16 -0
  66. package/node_modules/silk-wasm/lib/index.d.ts +70 -0
  67. package/node_modules/silk-wasm/lib/index.mjs +16 -0
  68. package/node_modules/silk-wasm/lib/silk.wasm +0 -0
  69. package/node_modules/silk-wasm/lib/utils.d.ts +4 -0
  70. package/node_modules/silk-wasm/package.json +39 -0
  71. package/node_modules/simple-yenc/.github/FUNDING.yml +1 -0
  72. package/node_modules/simple-yenc/.prettierignore +1 -0
  73. package/node_modules/simple-yenc/LICENSE +7 -0
  74. package/node_modules/simple-yenc/README.md +163 -0
  75. package/node_modules/simple-yenc/dist/esm.js +1 -0
  76. package/node_modules/simple-yenc/dist/index.js +1 -0
  77. package/node_modules/simple-yenc/package.json +50 -0
  78. package/node_modules/simple-yenc/rollup.config.js +27 -0
  79. package/node_modules/simple-yenc/src/simple-yenc.js +302 -0
  80. package/node_modules/ws/LICENSE +20 -0
  81. package/node_modules/ws/README.md +548 -0
  82. package/node_modules/ws/browser.js +8 -0
  83. package/node_modules/ws/index.js +22 -0
  84. package/node_modules/ws/lib/buffer-util.js +131 -0
  85. package/node_modules/ws/lib/constants.js +19 -0
  86. package/node_modules/ws/lib/event-target.js +292 -0
  87. package/node_modules/ws/lib/extension.js +203 -0
  88. package/node_modules/ws/lib/limiter.js +55 -0
  89. package/node_modules/ws/lib/permessage-deflate.js +528 -0
  90. package/node_modules/ws/lib/receiver.js +706 -0
  91. package/node_modules/ws/lib/sender.js +607 -0
  92. package/node_modules/ws/lib/stream.js +161 -0
  93. package/node_modules/ws/lib/subprotocol.js +62 -0
  94. package/node_modules/ws/lib/validation.js +152 -0
  95. package/node_modules/ws/lib/websocket-server.js +554 -0
  96. package/node_modules/ws/lib/websocket.js +1393 -0
  97. package/node_modules/ws/package.json +70 -0
  98. package/node_modules/ws/wrapper.mjs +21 -0
  99. package/node_modules/zod/LICENSE +21 -0
  100. package/node_modules/zod/README.md +191 -0
  101. package/node_modules/zod/index.cjs +33 -0
  102. package/node_modules/zod/index.d.cts +4 -0
  103. package/node_modules/zod/index.d.ts +4 -0
  104. package/node_modules/zod/index.js +4 -0
  105. package/node_modules/zod/locales/index.cjs +17 -0
  106. package/node_modules/zod/locales/index.d.cts +1 -0
  107. package/node_modules/zod/locales/index.d.ts +1 -0
  108. package/node_modules/zod/locales/index.js +1 -0
  109. package/node_modules/zod/locales/package.json +7 -0
  110. package/node_modules/zod/mini/index.cjs +32 -0
  111. package/node_modules/zod/mini/index.d.cts +3 -0
  112. package/node_modules/zod/mini/index.d.ts +3 -0
  113. package/node_modules/zod/mini/index.js +3 -0
  114. package/node_modules/zod/mini/package.json +7 -0
  115. package/node_modules/zod/package.json +135 -0
  116. package/node_modules/zod/src/index.ts +4 -0
  117. package/node_modules/zod/src/locales/index.ts +1 -0
  118. package/node_modules/zod/src/mini/index.ts +3 -0
  119. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  120. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  121. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  122. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  123. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  124. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  125. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  126. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  127. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  128. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  129. package/node_modules/zod/src/v3/errors.ts +13 -0
  130. package/node_modules/zod/src/v3/external.ts +6 -0
  131. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  132. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  133. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  134. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  135. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  136. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  137. package/node_modules/zod/src/v3/index.ts +4 -0
  138. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  139. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  140. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  141. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  142. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  143. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  144. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  145. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  146. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  147. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  148. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  149. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  150. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  151. package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
  152. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  153. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  154. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  155. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  156. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  157. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  158. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  159. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  160. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  161. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  162. package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
  163. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  164. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  165. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  166. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  167. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  168. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  169. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  170. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  171. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  172. package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
  173. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  174. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  175. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  176. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  177. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  178. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  179. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  180. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  181. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  182. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  183. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  184. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  185. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  186. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  187. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  188. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  189. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  190. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  191. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  192. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  193. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  194. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  195. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  196. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  197. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  198. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  199. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  200. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  201. package/node_modules/zod/src/v3/types.ts +5138 -0
  202. package/node_modules/zod/src/v4/classic/checks.ts +32 -0
  203. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  204. package/node_modules/zod/src/v4/classic/compat.ts +70 -0
  205. package/node_modules/zod/src/v4/classic/errors.ts +82 -0
  206. package/node_modules/zod/src/v4/classic/external.ts +52 -0
  207. package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
  208. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  209. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  210. package/node_modules/zod/src/v4/classic/parse.ts +82 -0
  211. package/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
  212. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  213. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
  214. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  215. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
  216. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  217. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  218. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  219. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  220. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
  221. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
  222. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  223. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
  224. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
  225. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  226. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
  227. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  228. package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
  229. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  230. package/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
  231. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  232. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  233. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
  234. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
  235. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  236. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
  237. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  238. package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
  239. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
  240. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  241. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
  242. package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
  243. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  244. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
  245. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
  246. package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
  247. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
  248. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
  249. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
  250. package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
  251. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  252. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  253. package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
  254. package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
  255. package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
  256. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  257. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  258. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
  259. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  260. package/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
  261. package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
  262. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
  263. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
  264. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
  265. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
  266. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
  267. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
  268. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
  269. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  270. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  271. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  272. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  273. package/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
  274. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
  275. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
  276. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
  277. package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
  278. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
  279. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
  280. package/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
  281. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
  282. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
  283. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  284. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
  285. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
  286. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
  287. package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
  288. package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
  289. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  290. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  291. package/node_modules/zod/src/v4/core/api.ts +1823 -0
  292. package/node_modules/zod/src/v4/core/checks.ts +1293 -0
  293. package/node_modules/zod/src/v4/core/config.ts +15 -0
  294. package/node_modules/zod/src/v4/core/core.ts +153 -0
  295. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  296. package/node_modules/zod/src/v4/core/errors.ts +455 -0
  297. package/node_modules/zod/src/v4/core/index.ts +16 -0
  298. package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
  299. package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
  300. package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
  301. package/node_modules/zod/src/v4/core/parse.ts +195 -0
  302. package/node_modules/zod/src/v4/core/regexes.ts +190 -0
  303. package/node_modules/zod/src/v4/core/registries.ts +105 -0
  304. package/node_modules/zod/src/v4/core/schemas.ts +4730 -0
  305. package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
  306. package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
  307. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  308. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  309. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
  310. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  311. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
  312. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
  313. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
  314. package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
  315. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
  316. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  317. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  318. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
  319. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
  320. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  321. package/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
  322. package/node_modules/zod/src/v4/core/util.ts +983 -0
  323. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  324. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  325. package/node_modules/zod/src/v4/index.ts +4 -0
  326. package/node_modules/zod/src/v4/locales/ar.ts +115 -0
  327. package/node_modules/zod/src/v4/locales/az.ts +111 -0
  328. package/node_modules/zod/src/v4/locales/be.ts +176 -0
  329. package/node_modules/zod/src/v4/locales/bg.ts +128 -0
  330. package/node_modules/zod/src/v4/locales/ca.ts +116 -0
  331. package/node_modules/zod/src/v4/locales/cs.ts +118 -0
  332. package/node_modules/zod/src/v4/locales/da.ts +123 -0
  333. package/node_modules/zod/src/v4/locales/de.ts +116 -0
  334. package/node_modules/zod/src/v4/locales/el.ts +121 -0
  335. package/node_modules/zod/src/v4/locales/en.ts +123 -0
  336. package/node_modules/zod/src/v4/locales/eo.ts +118 -0
  337. package/node_modules/zod/src/v4/locales/es.ts +141 -0
  338. package/node_modules/zod/src/v4/locales/fa.ts +126 -0
  339. package/node_modules/zod/src/v4/locales/fi.ts +121 -0
  340. package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
  341. package/node_modules/zod/src/v4/locales/fr.ts +132 -0
  342. package/node_modules/zod/src/v4/locales/he.ts +246 -0
  343. package/node_modules/zod/src/v4/locales/hr.ts +131 -0
  344. package/node_modules/zod/src/v4/locales/hu.ts +117 -0
  345. package/node_modules/zod/src/v4/locales/hy.ts +164 -0
  346. package/node_modules/zod/src/v4/locales/id.ts +115 -0
  347. package/node_modules/zod/src/v4/locales/index.ts +52 -0
  348. package/node_modules/zod/src/v4/locales/is.ts +119 -0
  349. package/node_modules/zod/src/v4/locales/it.ts +116 -0
  350. package/node_modules/zod/src/v4/locales/ja.ts +114 -0
  351. package/node_modules/zod/src/v4/locales/ka.ts +123 -0
  352. package/node_modules/zod/src/v4/locales/kh.ts +7 -0
  353. package/node_modules/zod/src/v4/locales/km.ts +119 -0
  354. package/node_modules/zod/src/v4/locales/ko.ts +121 -0
  355. package/node_modules/zod/src/v4/locales/lt.ts +239 -0
  356. package/node_modules/zod/src/v4/locales/mk.ts +118 -0
  357. package/node_modules/zod/src/v4/locales/ms.ts +115 -0
  358. package/node_modules/zod/src/v4/locales/nl.ts +121 -0
  359. package/node_modules/zod/src/v4/locales/no.ts +116 -0
  360. package/node_modules/zod/src/v4/locales/ota.ts +117 -0
  361. package/node_modules/zod/src/v4/locales/pl.ts +118 -0
  362. package/node_modules/zod/src/v4/locales/ps.ts +126 -0
  363. package/node_modules/zod/src/v4/locales/pt.ts +116 -0
  364. package/node_modules/zod/src/v4/locales/ro.ts +129 -0
  365. package/node_modules/zod/src/v4/locales/ru.ts +176 -0
  366. package/node_modules/zod/src/v4/locales/sl.ts +118 -0
  367. package/node_modules/zod/src/v4/locales/sv.ts +119 -0
  368. package/node_modules/zod/src/v4/locales/ta.ts +118 -0
  369. package/node_modules/zod/src/v4/locales/th.ts +119 -0
  370. package/node_modules/zod/src/v4/locales/tr.ts +111 -0
  371. package/node_modules/zod/src/v4/locales/ua.ts +7 -0
  372. package/node_modules/zod/src/v4/locales/uk.ts +117 -0
  373. package/node_modules/zod/src/v4/locales/ur.ts +119 -0
  374. package/node_modules/zod/src/v4/locales/uz.ts +117 -0
  375. package/node_modules/zod/src/v4/locales/vi.ts +117 -0
  376. package/node_modules/zod/src/v4/locales/yo.ts +124 -0
  377. package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
  378. package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
  379. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  380. package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
  381. package/node_modules/zod/src/v4/mini/external.ts +41 -0
  382. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  383. package/node_modules/zod/src/v4/mini/iso.ts +66 -0
  384. package/node_modules/zod/src/v4/mini/parse.ts +14 -0
  385. package/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
  386. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
  387. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  388. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
  389. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  390. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
  391. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  392. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  393. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
  394. package/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
  395. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  396. package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
  397. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  398. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
  399. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
  400. package/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
  401. package/node_modules/zod/src/v4-mini/index.ts +3 -0
  402. package/node_modules/zod/v3/ZodError.cjs +138 -0
  403. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  404. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  405. package/node_modules/zod/v3/ZodError.js +133 -0
  406. package/node_modules/zod/v3/errors.cjs +17 -0
  407. package/node_modules/zod/v3/errors.d.cts +5 -0
  408. package/node_modules/zod/v3/errors.d.ts +5 -0
  409. package/node_modules/zod/v3/errors.js +9 -0
  410. package/node_modules/zod/v3/external.cjs +22 -0
  411. package/node_modules/zod/v3/external.d.cts +6 -0
  412. package/node_modules/zod/v3/external.d.ts +6 -0
  413. package/node_modules/zod/v3/external.js +6 -0
  414. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  415. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  416. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  417. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  418. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  419. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  420. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  421. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  422. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  423. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  424. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  425. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  426. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  427. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  428. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  429. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  430. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  431. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  432. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  433. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  434. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  435. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  436. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  437. package/node_modules/zod/v3/helpers/util.js +133 -0
  438. package/node_modules/zod/v3/index.cjs +33 -0
  439. package/node_modules/zod/v3/index.d.cts +4 -0
  440. package/node_modules/zod/v3/index.d.ts +4 -0
  441. package/node_modules/zod/v3/index.js +4 -0
  442. package/node_modules/zod/v3/locales/en.cjs +112 -0
  443. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  444. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  445. package/node_modules/zod/v3/locales/en.js +109 -0
  446. package/node_modules/zod/v3/package.json +7 -0
  447. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  448. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  449. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  450. package/node_modules/zod/v3/standard-schema.js +1 -0
  451. package/node_modules/zod/v3/types.cjs +3777 -0
  452. package/node_modules/zod/v3/types.d.cts +1034 -0
  453. package/node_modules/zod/v3/types.d.ts +1034 -0
  454. package/node_modules/zod/v3/types.js +3695 -0
  455. package/node_modules/zod/v4/classic/checks.cjs +33 -0
  456. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  457. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  458. package/node_modules/zod/v4/classic/checks.js +1 -0
  459. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  460. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  461. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  462. package/node_modules/zod/v4/classic/coerce.js +17 -0
  463. package/node_modules/zod/v4/classic/compat.cjs +61 -0
  464. package/node_modules/zod/v4/classic/compat.d.cts +50 -0
  465. package/node_modules/zod/v4/classic/compat.d.ts +50 -0
  466. package/node_modules/zod/v4/classic/compat.js +31 -0
  467. package/node_modules/zod/v4/classic/errors.cjs +74 -0
  468. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  469. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  470. package/node_modules/zod/v4/classic/errors.js +48 -0
  471. package/node_modules/zod/v4/classic/external.cjs +73 -0
  472. package/node_modules/zod/v4/classic/external.d.cts +16 -0
  473. package/node_modules/zod/v4/classic/external.d.ts +16 -0
  474. package/node_modules/zod/v4/classic/external.js +20 -0
  475. package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
  476. package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
  477. package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
  478. package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
  479. package/node_modules/zod/v4/classic/index.cjs +33 -0
  480. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  481. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  482. package/node_modules/zod/v4/classic/index.js +4 -0
  483. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  484. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  485. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  486. package/node_modules/zod/v4/classic/iso.js +30 -0
  487. package/node_modules/zod/v4/classic/package.json +7 -0
  488. package/node_modules/zod/v4/classic/parse.cjs +41 -0
  489. package/node_modules/zod/v4/classic/parse.d.cts +31 -0
  490. package/node_modules/zod/v4/classic/parse.d.ts +31 -0
  491. package/node_modules/zod/v4/classic/parse.js +15 -0
  492. package/node_modules/zod/v4/classic/schemas.cjs +1511 -0
  493. package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
  494. package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
  495. package/node_modules/zod/v4/classic/schemas.js +1395 -0
  496. package/node_modules/zod/v4/core/api.cjs +1227 -0
  497. package/node_modules/zod/v4/core/api.d.cts +325 -0
  498. package/node_modules/zod/v4/core/api.d.ts +325 -0
  499. package/node_modules/zod/v4/core/api.js +1087 -0
  500. package/node_modules/zod/v4/core/checks.cjs +601 -0
  501. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  502. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  503. package/node_modules/zod/v4/core/checks.js +575 -0
  504. package/node_modules/zod/v4/core/core.cjs +85 -0
  505. package/node_modules/zod/v4/core/core.d.cts +70 -0
  506. package/node_modules/zod/v4/core/core.d.ts +70 -0
  507. package/node_modules/zod/v4/core/core.js +78 -0
  508. package/node_modules/zod/v4/core/doc.cjs +39 -0
  509. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  510. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  511. package/node_modules/zod/v4/core/doc.js +35 -0
  512. package/node_modules/zod/v4/core/errors.cjs +216 -0
  513. package/node_modules/zod/v4/core/errors.d.cts +221 -0
  514. package/node_modules/zod/v4/core/errors.d.ts +221 -0
  515. package/node_modules/zod/v4/core/errors.js +185 -0
  516. package/node_modules/zod/v4/core/index.cjs +47 -0
  517. package/node_modules/zod/v4/core/index.d.cts +16 -0
  518. package/node_modules/zod/v4/core/index.d.ts +16 -0
  519. package/node_modules/zod/v4/core/index.js +16 -0
  520. package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
  521. package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
  522. package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
  523. package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
  524. package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
  525. package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
  526. package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
  527. package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
  528. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  529. package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
  530. package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
  531. package/node_modules/zod/v4/core/json-schema.js +1 -0
  532. package/node_modules/zod/v4/core/package.json +7 -0
  533. package/node_modules/zod/v4/core/parse.cjs +131 -0
  534. package/node_modules/zod/v4/core/parse.d.cts +49 -0
  535. package/node_modules/zod/v4/core/parse.d.ts +49 -0
  536. package/node_modules/zod/v4/core/parse.js +93 -0
  537. package/node_modules/zod/v4/core/regexes.cjs +172 -0
  538. package/node_modules/zod/v4/core/regexes.d.cts +85 -0
  539. package/node_modules/zod/v4/core/regexes.d.ts +85 -0
  540. package/node_modules/zod/v4/core/regexes.js +139 -0
  541. package/node_modules/zod/v4/core/registries.cjs +56 -0
  542. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  543. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  544. package/node_modules/zod/v4/core/registries.js +51 -0
  545. package/node_modules/zod/v4/core/schemas.cjs +2270 -0
  546. package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
  547. package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
  548. package/node_modules/zod/v4/core/schemas.js +2239 -0
  549. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  550. package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
  551. package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
  552. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  553. package/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
  554. package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
  555. package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
  556. package/node_modules/zod/v4/core/to-json-schema.js +448 -0
  557. package/node_modules/zod/v4/core/util.cjs +734 -0
  558. package/node_modules/zod/v4/core/util.d.cts +200 -0
  559. package/node_modules/zod/v4/core/util.d.ts +200 -0
  560. package/node_modules/zod/v4/core/util.js +674 -0
  561. package/node_modules/zod/v4/core/versions.cjs +8 -0
  562. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  563. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  564. package/node_modules/zod/v4/core/versions.js +5 -0
  565. package/node_modules/zod/v4/index.cjs +22 -0
  566. package/node_modules/zod/v4/index.d.cts +3 -0
  567. package/node_modules/zod/v4/index.d.ts +3 -0
  568. package/node_modules/zod/v4/index.js +3 -0
  569. package/node_modules/zod/v4/locales/ar.cjs +133 -0
  570. package/node_modules/zod/v4/locales/ar.d.cts +5 -0
  571. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  572. package/node_modules/zod/v4/locales/ar.js +106 -0
  573. package/node_modules/zod/v4/locales/az.cjs +132 -0
  574. package/node_modules/zod/v4/locales/az.d.cts +5 -0
  575. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  576. package/node_modules/zod/v4/locales/az.js +105 -0
  577. package/node_modules/zod/v4/locales/be.cjs +183 -0
  578. package/node_modules/zod/v4/locales/be.d.cts +5 -0
  579. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  580. package/node_modules/zod/v4/locales/be.js +156 -0
  581. package/node_modules/zod/v4/locales/bg.cjs +147 -0
  582. package/node_modules/zod/v4/locales/bg.d.cts +5 -0
  583. package/node_modules/zod/v4/locales/bg.d.ts +4 -0
  584. package/node_modules/zod/v4/locales/bg.js +120 -0
  585. package/node_modules/zod/v4/locales/ca.cjs +134 -0
  586. package/node_modules/zod/v4/locales/ca.d.cts +5 -0
  587. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  588. package/node_modules/zod/v4/locales/ca.js +107 -0
  589. package/node_modules/zod/v4/locales/cs.cjs +138 -0
  590. package/node_modules/zod/v4/locales/cs.d.cts +5 -0
  591. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  592. package/node_modules/zod/v4/locales/cs.js +111 -0
  593. package/node_modules/zod/v4/locales/da.cjs +142 -0
  594. package/node_modules/zod/v4/locales/da.d.cts +5 -0
  595. package/node_modules/zod/v4/locales/da.d.ts +4 -0
  596. package/node_modules/zod/v4/locales/da.js +115 -0
  597. package/node_modules/zod/v4/locales/de.cjs +135 -0
  598. package/node_modules/zod/v4/locales/de.d.cts +5 -0
  599. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  600. package/node_modules/zod/v4/locales/de.js +108 -0
  601. package/node_modules/zod/v4/locales/el.cjs +136 -0
  602. package/node_modules/zod/v4/locales/el.d.cts +5 -0
  603. package/node_modules/zod/v4/locales/el.d.ts +4 -0
  604. package/node_modules/zod/v4/locales/el.js +109 -0
  605. package/node_modules/zod/v4/locales/en.cjs +140 -0
  606. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  607. package/node_modules/zod/v4/locales/en.d.ts +4 -0
  608. package/node_modules/zod/v4/locales/en.js +113 -0
  609. package/node_modules/zod/v4/locales/eo.cjs +136 -0
  610. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  611. package/node_modules/zod/v4/locales/eo.d.ts +4 -0
  612. package/node_modules/zod/v4/locales/eo.js +109 -0
  613. package/node_modules/zod/v4/locales/es.cjs +159 -0
  614. package/node_modules/zod/v4/locales/es.d.cts +5 -0
  615. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  616. package/node_modules/zod/v4/locales/es.js +132 -0
  617. package/node_modules/zod/v4/locales/fa.cjs +141 -0
  618. package/node_modules/zod/v4/locales/fa.d.cts +5 -0
  619. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  620. package/node_modules/zod/v4/locales/fa.js +114 -0
  621. package/node_modules/zod/v4/locales/fi.cjs +139 -0
  622. package/node_modules/zod/v4/locales/fi.d.cts +5 -0
  623. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  624. package/node_modules/zod/v4/locales/fi.js +112 -0
  625. package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
  626. package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  627. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  628. package/node_modules/zod/v4/locales/fr-CA.js +107 -0
  629. package/node_modules/zod/v4/locales/fr.cjs +152 -0
  630. package/node_modules/zod/v4/locales/fr.d.cts +5 -0
  631. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  632. package/node_modules/zod/v4/locales/fr.js +125 -0
  633. package/node_modules/zod/v4/locales/he.cjs +241 -0
  634. package/node_modules/zod/v4/locales/he.d.cts +5 -0
  635. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  636. package/node_modules/zod/v4/locales/he.js +214 -0
  637. package/node_modules/zod/v4/locales/hr.cjs +149 -0
  638. package/node_modules/zod/v4/locales/hr.d.cts +5 -0
  639. package/node_modules/zod/v4/locales/hr.d.ts +4 -0
  640. package/node_modules/zod/v4/locales/hr.js +122 -0
  641. package/node_modules/zod/v4/locales/hu.cjs +135 -0
  642. package/node_modules/zod/v4/locales/hu.d.cts +5 -0
  643. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  644. package/node_modules/zod/v4/locales/hu.js +108 -0
  645. package/node_modules/zod/v4/locales/hy.cjs +174 -0
  646. package/node_modules/zod/v4/locales/hy.d.cts +5 -0
  647. package/node_modules/zod/v4/locales/hy.d.ts +4 -0
  648. package/node_modules/zod/v4/locales/hy.js +147 -0
  649. package/node_modules/zod/v4/locales/id.cjs +133 -0
  650. package/node_modules/zod/v4/locales/id.d.cts +5 -0
  651. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  652. package/node_modules/zod/v4/locales/id.js +106 -0
  653. package/node_modules/zod/v4/locales/index.cjs +111 -0
  654. package/node_modules/zod/v4/locales/index.d.cts +52 -0
  655. package/node_modules/zod/v4/locales/index.d.ts +52 -0
  656. package/node_modules/zod/v4/locales/index.js +52 -0
  657. package/node_modules/zod/v4/locales/is.cjs +136 -0
  658. package/node_modules/zod/v4/locales/is.d.cts +5 -0
  659. package/node_modules/zod/v4/locales/is.d.ts +4 -0
  660. package/node_modules/zod/v4/locales/is.js +109 -0
  661. package/node_modules/zod/v4/locales/it.cjs +135 -0
  662. package/node_modules/zod/v4/locales/it.d.cts +5 -0
  663. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  664. package/node_modules/zod/v4/locales/it.js +108 -0
  665. package/node_modules/zod/v4/locales/ja.cjs +134 -0
  666. package/node_modules/zod/v4/locales/ja.d.cts +5 -0
  667. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  668. package/node_modules/zod/v4/locales/ja.js +107 -0
  669. package/node_modules/zod/v4/locales/ka.cjs +139 -0
  670. package/node_modules/zod/v4/locales/ka.d.cts +5 -0
  671. package/node_modules/zod/v4/locales/ka.d.ts +4 -0
  672. package/node_modules/zod/v4/locales/ka.js +112 -0
  673. package/node_modules/zod/v4/locales/kh.cjs +12 -0
  674. package/node_modules/zod/v4/locales/kh.d.cts +5 -0
  675. package/node_modules/zod/v4/locales/kh.d.ts +5 -0
  676. package/node_modules/zod/v4/locales/kh.js +5 -0
  677. package/node_modules/zod/v4/locales/km.cjs +137 -0
  678. package/node_modules/zod/v4/locales/km.d.cts +5 -0
  679. package/node_modules/zod/v4/locales/km.d.ts +4 -0
  680. package/node_modules/zod/v4/locales/km.js +110 -0
  681. package/node_modules/zod/v4/locales/ko.cjs +138 -0
  682. package/node_modules/zod/v4/locales/ko.d.cts +5 -0
  683. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  684. package/node_modules/zod/v4/locales/ko.js +111 -0
  685. package/node_modules/zod/v4/locales/lt.cjs +230 -0
  686. package/node_modules/zod/v4/locales/lt.d.cts +5 -0
  687. package/node_modules/zod/v4/locales/lt.d.ts +4 -0
  688. package/node_modules/zod/v4/locales/lt.js +203 -0
  689. package/node_modules/zod/v4/locales/mk.cjs +136 -0
  690. package/node_modules/zod/v4/locales/mk.d.cts +5 -0
  691. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  692. package/node_modules/zod/v4/locales/mk.js +109 -0
  693. package/node_modules/zod/v4/locales/ms.cjs +134 -0
  694. package/node_modules/zod/v4/locales/ms.d.cts +5 -0
  695. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  696. package/node_modules/zod/v4/locales/ms.js +107 -0
  697. package/node_modules/zod/v4/locales/nl.cjs +137 -0
  698. package/node_modules/zod/v4/locales/nl.d.cts +5 -0
  699. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  700. package/node_modules/zod/v4/locales/nl.js +110 -0
  701. package/node_modules/zod/v4/locales/no.cjs +135 -0
  702. package/node_modules/zod/v4/locales/no.d.cts +5 -0
  703. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  704. package/node_modules/zod/v4/locales/no.js +108 -0
  705. package/node_modules/zod/v4/locales/ota.cjs +136 -0
  706. package/node_modules/zod/v4/locales/ota.d.cts +5 -0
  707. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  708. package/node_modules/zod/v4/locales/ota.js +109 -0
  709. package/node_modules/zod/v4/locales/package.json +7 -0
  710. package/node_modules/zod/v4/locales/pl.cjs +136 -0
  711. package/node_modules/zod/v4/locales/pl.d.cts +5 -0
  712. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  713. package/node_modules/zod/v4/locales/pl.js +109 -0
  714. package/node_modules/zod/v4/locales/ps.cjs +141 -0
  715. package/node_modules/zod/v4/locales/ps.d.cts +5 -0
  716. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  717. package/node_modules/zod/v4/locales/ps.js +114 -0
  718. package/node_modules/zod/v4/locales/pt.cjs +135 -0
  719. package/node_modules/zod/v4/locales/pt.d.cts +5 -0
  720. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  721. package/node_modules/zod/v4/locales/pt.js +108 -0
  722. package/node_modules/zod/v4/locales/ro.cjs +146 -0
  723. package/node_modules/zod/v4/locales/ro.d.cts +5 -0
  724. package/node_modules/zod/v4/locales/ro.d.ts +4 -0
  725. package/node_modules/zod/v4/locales/ro.js +119 -0
  726. package/node_modules/zod/v4/locales/ru.cjs +183 -0
  727. package/node_modules/zod/v4/locales/ru.d.cts +5 -0
  728. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  729. package/node_modules/zod/v4/locales/ru.js +156 -0
  730. package/node_modules/zod/v4/locales/sl.cjs +136 -0
  731. package/node_modules/zod/v4/locales/sl.d.cts +5 -0
  732. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  733. package/node_modules/zod/v4/locales/sl.js +109 -0
  734. package/node_modules/zod/v4/locales/sv.cjs +137 -0
  735. package/node_modules/zod/v4/locales/sv.d.cts +5 -0
  736. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  737. package/node_modules/zod/v4/locales/sv.js +110 -0
  738. package/node_modules/zod/v4/locales/ta.cjs +137 -0
  739. package/node_modules/zod/v4/locales/ta.d.cts +5 -0
  740. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  741. package/node_modules/zod/v4/locales/ta.js +110 -0
  742. package/node_modules/zod/v4/locales/th.cjs +137 -0
  743. package/node_modules/zod/v4/locales/th.d.cts +5 -0
  744. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  745. package/node_modules/zod/v4/locales/th.js +110 -0
  746. package/node_modules/zod/v4/locales/tr.cjs +132 -0
  747. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  748. package/node_modules/zod/v4/locales/tr.d.ts +4 -0
  749. package/node_modules/zod/v4/locales/tr.js +105 -0
  750. package/node_modules/zod/v4/locales/ua.cjs +12 -0
  751. package/node_modules/zod/v4/locales/ua.d.cts +5 -0
  752. package/node_modules/zod/v4/locales/ua.d.ts +5 -0
  753. package/node_modules/zod/v4/locales/ua.js +5 -0
  754. package/node_modules/zod/v4/locales/uk.cjs +135 -0
  755. package/node_modules/zod/v4/locales/uk.d.cts +5 -0
  756. package/node_modules/zod/v4/locales/uk.d.ts +4 -0
  757. package/node_modules/zod/v4/locales/uk.js +108 -0
  758. package/node_modules/zod/v4/locales/ur.cjs +137 -0
  759. package/node_modules/zod/v4/locales/ur.d.cts +5 -0
  760. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  761. package/node_modules/zod/v4/locales/ur.js +110 -0
  762. package/node_modules/zod/v4/locales/uz.cjs +137 -0
  763. package/node_modules/zod/v4/locales/uz.d.cts +5 -0
  764. package/node_modules/zod/v4/locales/uz.d.ts +4 -0
  765. package/node_modules/zod/v4/locales/uz.js +110 -0
  766. package/node_modules/zod/v4/locales/vi.cjs +135 -0
  767. package/node_modules/zod/v4/locales/vi.d.cts +5 -0
  768. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  769. package/node_modules/zod/v4/locales/vi.js +108 -0
  770. package/node_modules/zod/v4/locales/yo.cjs +134 -0
  771. package/node_modules/zod/v4/locales/yo.d.cts +5 -0
  772. package/node_modules/zod/v4/locales/yo.d.ts +4 -0
  773. package/node_modules/zod/v4/locales/yo.js +107 -0
  774. package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
  775. package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  776. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  777. package/node_modules/zod/v4/locales/zh-CN.js +109 -0
  778. package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
  779. package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  780. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  781. package/node_modules/zod/v4/locales/zh-TW.js +107 -0
  782. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  783. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  784. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  785. package/node_modules/zod/v4/mini/checks.js +1 -0
  786. package/node_modules/zod/v4/mini/coerce.cjs +52 -0
  787. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  788. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  789. package/node_modules/zod/v4/mini/coerce.js +22 -0
  790. package/node_modules/zod/v4/mini/external.cjs +63 -0
  791. package/node_modules/zod/v4/mini/external.d.cts +13 -0
  792. package/node_modules/zod/v4/mini/external.d.ts +13 -0
  793. package/node_modules/zod/v4/mini/external.js +14 -0
  794. package/node_modules/zod/v4/mini/index.cjs +32 -0
  795. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  796. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  797. package/node_modules/zod/v4/mini/index.js +3 -0
  798. package/node_modules/zod/v4/mini/iso.cjs +64 -0
  799. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  800. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  801. package/node_modules/zod/v4/mini/iso.js +34 -0
  802. package/node_modules/zod/v4/mini/package.json +7 -0
  803. package/node_modules/zod/v4/mini/parse.cjs +16 -0
  804. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  805. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  806. package/node_modules/zod/v4/mini/parse.js +1 -0
  807. package/node_modules/zod/v4/mini/schemas.cjs +1083 -0
  808. package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
  809. package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
  810. package/node_modules/zod/v4/mini/schemas.js +961 -0
  811. package/node_modules/zod/v4/package.json +7 -0
  812. package/node_modules/zod/v4-mini/index.cjs +32 -0
  813. package/node_modules/zod/v4-mini/index.d.cts +3 -0
  814. package/node_modules/zod/v4-mini/index.d.ts +3 -0
  815. package/node_modules/zod/v4-mini/index.js +3 -0
  816. package/node_modules/zod/v4-mini/package.json +7 -0
  817. package/npm-shrinkwrap.json +125 -0
  818. package/package.json +12 -9
@@ -0,0 +1,462 @@
1
+ //---------------------------------------------------------------------
2
+ // QRCode for JavaScript
3
+ //
4
+ // Copyright (c) 2009 Kazuhiko Arase
5
+ //
6
+ // URL: http://www.d-project.com/
7
+ //
8
+ // Licensed under the MIT license:
9
+ // http://www.opensource.org/licenses/mit-license.php
10
+ //
11
+ // The word "QR Code" is registered trademark of
12
+ // DENSO WAVE INCORPORATED
13
+ // http://www.denso-wave.com/qrcode/faqpatent-e.html
14
+ //
15
+ //---------------------------------------------------------------------
16
+ // Modified to work in node for this project (and some refactoring)
17
+ //---------------------------------------------------------------------
18
+
19
+ var QR8bitByte = require('./QR8bitByte');
20
+ var QRUtil = require('./QRUtil');
21
+ var QRPolynomial = require('./QRPolynomial');
22
+ var QRRSBlock = require('./QRRSBlock');
23
+ var QRBitBuffer = require('./QRBitBuffer');
24
+
25
+ function QRCode(typeNumber, errorCorrectLevel) {
26
+ this.typeNumber = typeNumber;
27
+ this.errorCorrectLevel = errorCorrectLevel;
28
+ this.modules = null;
29
+ this.moduleCount = 0;
30
+ this.dataCache = null;
31
+ this.dataList = [];
32
+ }
33
+
34
+ QRCode.prototype = {
35
+
36
+ addData : function(data) {
37
+ var newData = new QR8bitByte(data);
38
+ this.dataList.push(newData);
39
+ this.dataCache = null;
40
+ },
41
+
42
+ isDark : function(row, col) {
43
+ if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {
44
+ throw new Error(row + "," + col);
45
+ }
46
+ return this.modules[row][col];
47
+ },
48
+
49
+ getModuleCount : function() {
50
+ return this.moduleCount;
51
+ },
52
+
53
+ make : function() {
54
+ // Calculate automatically typeNumber if provided is < 1
55
+ if (this.typeNumber < 1 ){
56
+ var typeNumber = 1;
57
+ for (typeNumber = 1; typeNumber < 40; typeNumber++) {
58
+ var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel);
59
+
60
+ var buffer = new QRBitBuffer();
61
+ var totalDataCount = 0;
62
+ for (var i = 0; i < rsBlocks.length; i++) {
63
+ totalDataCount += rsBlocks[i].dataCount;
64
+ }
65
+
66
+ for (var x = 0; x < this.dataList.length; x++) {
67
+ var data = this.dataList[x];
68
+ buffer.put(data.mode, 4);
69
+ buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber) );
70
+ data.write(buffer);
71
+ }
72
+ if (buffer.getLengthInBits() <= totalDataCount * 8)
73
+ break;
74
+ }
75
+ this.typeNumber = typeNumber;
76
+ }
77
+ this.makeImpl(false, this.getBestMaskPattern() );
78
+ },
79
+
80
+ makeImpl : function(test, maskPattern) {
81
+
82
+ this.moduleCount = this.typeNumber * 4 + 17;
83
+ this.modules = new Array(this.moduleCount);
84
+
85
+ for (var row = 0; row < this.moduleCount; row++) {
86
+
87
+ this.modules[row] = new Array(this.moduleCount);
88
+
89
+ for (var col = 0; col < this.moduleCount; col++) {
90
+ this.modules[row][col] = null;//(col + row) % 3;
91
+ }
92
+ }
93
+
94
+ this.setupPositionProbePattern(0, 0);
95
+ this.setupPositionProbePattern(this.moduleCount - 7, 0);
96
+ this.setupPositionProbePattern(0, this.moduleCount - 7);
97
+ this.setupPositionAdjustPattern();
98
+ this.setupTimingPattern();
99
+ this.setupTypeInfo(test, maskPattern);
100
+
101
+ if (this.typeNumber >= 7) {
102
+ this.setupTypeNumber(test);
103
+ }
104
+
105
+ if (this.dataCache === null) {
106
+ this.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);
107
+ }
108
+
109
+ this.mapData(this.dataCache, maskPattern);
110
+ },
111
+
112
+ setupPositionProbePattern : function(row, col) {
113
+
114
+ for (var r = -1; r <= 7; r++) {
115
+
116
+ if (row + r <= -1 || this.moduleCount <= row + r) continue;
117
+
118
+ for (var c = -1; c <= 7; c++) {
119
+
120
+ if (col + c <= -1 || this.moduleCount <= col + c) continue;
121
+
122
+ if ( (0 <= r && r <= 6 && (c === 0 || c === 6) ) ||
123
+ (0 <= c && c <= 6 && (r === 0 || r === 6) ) ||
124
+ (2 <= r && r <= 4 && 2 <= c && c <= 4) ) {
125
+ this.modules[row + r][col + c] = true;
126
+ } else {
127
+ this.modules[row + r][col + c] = false;
128
+ }
129
+ }
130
+ }
131
+ },
132
+
133
+ getBestMaskPattern : function() {
134
+
135
+ var minLostPoint = 0;
136
+ var pattern = 0;
137
+
138
+ for (var i = 0; i < 8; i++) {
139
+
140
+ this.makeImpl(true, i);
141
+
142
+ var lostPoint = QRUtil.getLostPoint(this);
143
+
144
+ if (i === 0 || minLostPoint > lostPoint) {
145
+ minLostPoint = lostPoint;
146
+ pattern = i;
147
+ }
148
+ }
149
+
150
+ return pattern;
151
+ },
152
+
153
+ createMovieClip : function(target_mc, instance_name, depth) {
154
+
155
+ var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);
156
+ var cs = 1;
157
+
158
+ this.make();
159
+
160
+ for (var row = 0; row < this.modules.length; row++) {
161
+
162
+ var y = row * cs;
163
+
164
+ for (var col = 0; col < this.modules[row].length; col++) {
165
+
166
+ var x = col * cs;
167
+ var dark = this.modules[row][col];
168
+
169
+ if (dark) {
170
+ qr_mc.beginFill(0, 100);
171
+ qr_mc.moveTo(x, y);
172
+ qr_mc.lineTo(x + cs, y);
173
+ qr_mc.lineTo(x + cs, y + cs);
174
+ qr_mc.lineTo(x, y + cs);
175
+ qr_mc.endFill();
176
+ }
177
+ }
178
+ }
179
+
180
+ return qr_mc;
181
+ },
182
+
183
+ setupTimingPattern : function() {
184
+
185
+ for (var r = 8; r < this.moduleCount - 8; r++) {
186
+ if (this.modules[r][6] !== null) {
187
+ continue;
188
+ }
189
+ this.modules[r][6] = (r % 2 === 0);
190
+ }
191
+
192
+ for (var c = 8; c < this.moduleCount - 8; c++) {
193
+ if (this.modules[6][c] !== null) {
194
+ continue;
195
+ }
196
+ this.modules[6][c] = (c % 2 === 0);
197
+ }
198
+ },
199
+
200
+ setupPositionAdjustPattern : function() {
201
+
202
+ var pos = QRUtil.getPatternPosition(this.typeNumber);
203
+
204
+ for (var i = 0; i < pos.length; i++) {
205
+
206
+ for (var j = 0; j < pos.length; j++) {
207
+
208
+ var row = pos[i];
209
+ var col = pos[j];
210
+
211
+ if (this.modules[row][col] !== null) {
212
+ continue;
213
+ }
214
+
215
+ for (var r = -2; r <= 2; r++) {
216
+
217
+ for (var c = -2; c <= 2; c++) {
218
+
219
+ if (Math.abs(r) === 2 ||
220
+ Math.abs(c) === 2 ||
221
+ (r === 0 && c === 0) ) {
222
+ this.modules[row + r][col + c] = true;
223
+ } else {
224
+ this.modules[row + r][col + c] = false;
225
+ }
226
+ }
227
+ }
228
+ }
229
+ }
230
+ },
231
+
232
+ setupTypeNumber : function(test) {
233
+
234
+ var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
235
+ var mod;
236
+
237
+ for (var i = 0; i < 18; i++) {
238
+ mod = (!test && ( (bits >> i) & 1) === 1);
239
+ this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
240
+ }
241
+
242
+ for (var x = 0; x < 18; x++) {
243
+ mod = (!test && ( (bits >> x) & 1) === 1);
244
+ this.modules[x % 3 + this.moduleCount - 8 - 3][Math.floor(x / 3)] = mod;
245
+ }
246
+ },
247
+
248
+ setupTypeInfo : function(test, maskPattern) {
249
+
250
+ var data = (this.errorCorrectLevel << 3) | maskPattern;
251
+ var bits = QRUtil.getBCHTypeInfo(data);
252
+ var mod;
253
+
254
+ // vertical
255
+ for (var v = 0; v < 15; v++) {
256
+
257
+ mod = (!test && ( (bits >> v) & 1) === 1);
258
+
259
+ if (v < 6) {
260
+ this.modules[v][8] = mod;
261
+ } else if (v < 8) {
262
+ this.modules[v + 1][8] = mod;
263
+ } else {
264
+ this.modules[this.moduleCount - 15 + v][8] = mod;
265
+ }
266
+ }
267
+
268
+ // horizontal
269
+ for (var h = 0; h < 15; h++) {
270
+
271
+ mod = (!test && ( (bits >> h) & 1) === 1);
272
+
273
+ if (h < 8) {
274
+ this.modules[8][this.moduleCount - h - 1] = mod;
275
+ } else if (h < 9) {
276
+ this.modules[8][15 - h - 1 + 1] = mod;
277
+ } else {
278
+ this.modules[8][15 - h - 1] = mod;
279
+ }
280
+ }
281
+
282
+ // fixed module
283
+ this.modules[this.moduleCount - 8][8] = (!test);
284
+
285
+ },
286
+
287
+ mapData : function(data, maskPattern) {
288
+
289
+ var inc = -1;
290
+ var row = this.moduleCount - 1;
291
+ var bitIndex = 7;
292
+ var byteIndex = 0;
293
+
294
+ for (var col = this.moduleCount - 1; col > 0; col -= 2) {
295
+
296
+ if (col === 6) col--;
297
+
298
+ while (true) {
299
+
300
+ for (var c = 0; c < 2; c++) {
301
+
302
+ if (this.modules[row][col - c] === null) {
303
+
304
+ var dark = false;
305
+
306
+ if (byteIndex < data.length) {
307
+ dark = ( ( (data[byteIndex] >>> bitIndex) & 1) === 1);
308
+ }
309
+
310
+ var mask = QRUtil.getMask(maskPattern, row, col - c);
311
+
312
+ if (mask) {
313
+ dark = !dark;
314
+ }
315
+
316
+ this.modules[row][col - c] = dark;
317
+ bitIndex--;
318
+
319
+ if (bitIndex === -1) {
320
+ byteIndex++;
321
+ bitIndex = 7;
322
+ }
323
+ }
324
+ }
325
+
326
+ row += inc;
327
+
328
+ if (row < 0 || this.moduleCount <= row) {
329
+ row -= inc;
330
+ inc = -inc;
331
+ break;
332
+ }
333
+ }
334
+ }
335
+
336
+ }
337
+
338
+ };
339
+
340
+ QRCode.PAD0 = 0xEC;
341
+ QRCode.PAD1 = 0x11;
342
+
343
+ QRCode.createData = function(typeNumber, errorCorrectLevel, dataList) {
344
+
345
+ var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);
346
+
347
+ var buffer = new QRBitBuffer();
348
+
349
+ for (var i = 0; i < dataList.length; i++) {
350
+ var data = dataList[i];
351
+ buffer.put(data.mode, 4);
352
+ buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber) );
353
+ data.write(buffer);
354
+ }
355
+
356
+ // calc num max data.
357
+ var totalDataCount = 0;
358
+ for (var x = 0; x < rsBlocks.length; x++) {
359
+ totalDataCount += rsBlocks[x].dataCount;
360
+ }
361
+
362
+ if (buffer.getLengthInBits() > totalDataCount * 8) {
363
+ throw new Error("code length overflow. (" +
364
+ buffer.getLengthInBits() +
365
+ ">" +
366
+ totalDataCount * 8 +
367
+ ")");
368
+ }
369
+
370
+ // end code
371
+ if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {
372
+ buffer.put(0, 4);
373
+ }
374
+
375
+ // padding
376
+ while (buffer.getLengthInBits() % 8 !== 0) {
377
+ buffer.putBit(false);
378
+ }
379
+
380
+ // padding
381
+ while (true) {
382
+
383
+ if (buffer.getLengthInBits() >= totalDataCount * 8) {
384
+ break;
385
+ }
386
+ buffer.put(QRCode.PAD0, 8);
387
+
388
+ if (buffer.getLengthInBits() >= totalDataCount * 8) {
389
+ break;
390
+ }
391
+ buffer.put(QRCode.PAD1, 8);
392
+ }
393
+
394
+ return QRCode.createBytes(buffer, rsBlocks);
395
+ };
396
+
397
+ QRCode.createBytes = function(buffer, rsBlocks) {
398
+
399
+ var offset = 0;
400
+
401
+ var maxDcCount = 0;
402
+ var maxEcCount = 0;
403
+
404
+ var dcdata = new Array(rsBlocks.length);
405
+ var ecdata = new Array(rsBlocks.length);
406
+
407
+ for (var r = 0; r < rsBlocks.length; r++) {
408
+
409
+ var dcCount = rsBlocks[r].dataCount;
410
+ var ecCount = rsBlocks[r].totalCount - dcCount;
411
+
412
+ maxDcCount = Math.max(maxDcCount, dcCount);
413
+ maxEcCount = Math.max(maxEcCount, ecCount);
414
+
415
+ dcdata[r] = new Array(dcCount);
416
+
417
+ for (var i = 0; i < dcdata[r].length; i++) {
418
+ dcdata[r][i] = 0xff & buffer.buffer[i + offset];
419
+ }
420
+ offset += dcCount;
421
+
422
+ var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
423
+ var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
424
+
425
+ var modPoly = rawPoly.mod(rsPoly);
426
+ ecdata[r] = new Array(rsPoly.getLength() - 1);
427
+ for (var x = 0; x < ecdata[r].length; x++) {
428
+ var modIndex = x + modPoly.getLength() - ecdata[r].length;
429
+ ecdata[r][x] = (modIndex >= 0)? modPoly.get(modIndex) : 0;
430
+ }
431
+
432
+ }
433
+
434
+ var totalCodeCount = 0;
435
+ for (var y = 0; y < rsBlocks.length; y++) {
436
+ totalCodeCount += rsBlocks[y].totalCount;
437
+ }
438
+
439
+ var data = new Array(totalCodeCount);
440
+ var index = 0;
441
+
442
+ for (var z = 0; z < maxDcCount; z++) {
443
+ for (var s = 0; s < rsBlocks.length; s++) {
444
+ if (z < dcdata[s].length) {
445
+ data[index++] = dcdata[s][z];
446
+ }
447
+ }
448
+ }
449
+
450
+ for (var xx = 0; xx < maxEcCount; xx++) {
451
+ for (var t = 0; t < rsBlocks.length; t++) {
452
+ if (xx < ecdata[t].length) {
453
+ data[index++] = ecdata[t][xx];
454
+ }
455
+ }
456
+ }
457
+
458
+ return data;
459
+
460
+ };
461
+
462
+ module.exports = QRCode;
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 idranme
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,85 @@
1
+ # silk-wasm
2
+
3
+ [![npm](https://img.shields.io/npm/v/silk-wasm?style=flat-square)](https://www.npmjs.com/package/silk-wasm)
4
+
5
+ QQ/微信语音编解码
6
+
7
+ ## API
8
+
9
+ ```ts
10
+ interface EncodeResult {
11
+ data: Uint8Array
12
+ duration: number
13
+ }
14
+
15
+ interface DecodeResult {
16
+ data: Uint8Array
17
+ duration: number
18
+ }
19
+
20
+ /**
21
+ * 编码为 SILK
22
+ * @param input WAV 或单声道 pcm_s16le 文件
23
+ * @param sampleRate `input` 的采样率,可为 8000/12000/16000/24000/32000/44100/48000,当 `input` 为 WAV 时可填入 0
24
+ * @returns SILK
25
+ */
26
+ function encode(input: ArrayBufferView | ArrayBuffer, sampleRate: number): Promise<EncodeResult>
27
+
28
+ /**
29
+ * 将 SILK 解码为 PCM
30
+ * @param input SILK 文件
31
+ * @param sampleRate `input` 的采样率
32
+ * @returns pcm_s16le
33
+ */
34
+ function decode(input: ArrayBufferView | ArrayBuffer, sampleRate: number): Promise<DecodeResult>
35
+
36
+ /**
37
+ * 获取 SILK 音频时长
38
+ * @param data SILK 文件
39
+ * @param frameMs SILK 的 frameMs,可为 20/40/60/80/100,默认为 20
40
+ * @returns 单位为毫秒的时长
41
+ */
42
+ function getDuration(data: ArrayBufferView | ArrayBuffer, frameMs?: number): number
43
+
44
+ /**
45
+ * 检测是否为 WAV 文件
46
+ * @param data 任意文件
47
+ */
48
+ function isWav(data: ArrayBufferView | ArrayBuffer): boolean
49
+
50
+ /**
51
+ * 获取 WAV 文件的信息
52
+ * @param data WAV 文件
53
+ * @returns metadata
54
+ */
55
+ function getWavFileInfo(data: ArrayBufferView | ArrayBuffer): WavFileInfo
56
+
57
+ /**
58
+ * 检测是否为 SILK 文件
59
+ * @param data 任意文件
60
+ */
61
+ function isSilk(data: ArrayBufferView | ArrayBuffer): boolean
62
+ ```
63
+
64
+ ## Example
65
+
66
+ ```ps1
67
+ ffmpeg -i canon.mp3 -ar 24000 -ac 1 -f s16le canon.pcm
68
+ ```
69
+
70
+ ```js
71
+ import { encode } from './lib/index.mjs' // use `silk-wasm` instead
72
+ import { readFile, writeFile } from 'fs/promises'
73
+
74
+ const pcm = await readFile('./testdata/canon.pcm')
75
+ const silk = await encode(pcm, 24000)
76
+ await writeFile('./test.silk', silk.data)
77
+ ```
78
+
79
+ ## Build wasm
80
+
81
+ ```
82
+ cd binding
83
+ emcmake cmake .
84
+ emmake ninja
85
+ ```
@@ -0,0 +1,16 @@
1
+ "use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var index_exports={};__export(index_exports,{decode:()=>decode,encode:()=>encode,getDuration:()=>getDuration,getWavFileInfo:()=>getWavFileInfo2,isSilk:()=>isSilk,isWav:()=>isWav});module.exports=__toCommonJS(index_exports);var import_meta_url=require("url").pathToFileURL(__filename).href;var Module=async function(moduleArg={}){var moduleRtn,g=moduleArg,aa,q,ba=new Promise((a,b)=>{aa=a,q=b}),ca=typeof window=="object",da=typeof WorkerGlobalScope<"u",t=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";if(t){let{createRequire:a}=await import("module");var require2=a(import_meta_url)}var u=(a,b)=>{throw b},ea=import_meta_url,v="",fa,w;if(t){var fs=require2("fs"),ha=require2("path");ea.startsWith("file:")&&(v=ha.dirname(require2("url").fileURLToPath(ea))+"/"),w=a=>(a=y(a)?new URL(a):a,fs.readFileSync(a)),fa=async a=>(a=y(a)?new URL(a):a,fs.readFileSync(a,void 0)),process.argv.slice(2),u=(a,b)=>{throw process.exitCode=a,b}}else if(ca||da){try{v=new URL(".",ea).href}catch{}da&&(w=a=>{var b=new XMLHttpRequest;return b.open("GET",a,!1),b.responseType="arraybuffer",b.send(null),new Uint8Array(b.response)}),fa=async a=>{if(y(a))return new Promise((d,c)=>{var e=new XMLHttpRequest;e.open("GET",a,!0),e.responseType="arraybuffer",e.onload=()=>{e.status==200||e.status==0&&e.response?d(e.response):c(e.status)},e.onerror=c,e.send(null)});var b=await fetch(a,{credentials:"same-origin"});if(b.ok)return b.arrayBuffer();throw Error(b.status+" : "+b.url)}}console.log.bind(console);var A=console.error.bind(console),C,D,E=!1,ia,ja,F,G,H,I,J,ka,la,ma,na,y=a=>a.startsWith("file://");function pa(){var a=D.buffer;ja=new Int8Array(a),G=new Int16Array(a),F=new Uint8Array(a),H=new Uint16Array(a),I=new Int32Array(a),J=new Uint32Array(a),ka=new Float32Array(a),na=new Float64Array(a),la=new BigInt64Array(a),ma=new BigUint64Array(a)}var K=0,L=null;function qa(a){throw g.onAbort?.(a),a="Aborted("+a+")",A(a),E=!0,a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info."),q(a),a}var ra;async function sa(a){if(!C)try{var b=await fa(a);return new Uint8Array(b)}catch{}if(a==ra&&C)a=new Uint8Array(C);else if(w)a=w(a);else throw"both async and sync fetching of the wasm failed";return a}async function ta(a,b){try{var d=await sa(a);return await WebAssembly.instantiate(d,b)}catch(c){A(`failed to asynchronously prepare wasm: ${c}`),qa(c)}}async function ua(a){var b=ra;if(!C&&typeof WebAssembly.instantiateStreaming=="function"&&!y(b)&&!t)try{var d=fetch(b,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(d,a)}catch(c){A(`wasm streaming compile failed: ${c}`),A("falling back to ArrayBuffer instantiation")}return ta(b,a)}class va{name="ExitStatus";constructor(a){this.message=`Program terminated with exit(${a})`,this.status=a}}var wa=a=>{for(;0<a.length;)a.shift()(g)},xa=[],ya=[],za=()=>{var a=g.preRun.shift();ya.push(a)},O=!0;class Aa{constructor(a){this.I=a-24}}var Ba=0,Ca=0,Da,P=a=>{for(var b="";F[a];)b+=Da[F[a++]];return b},Q={},R={},S={},T=g.BindingError=class extends Error{constructor(a){super(a),this.name="BindingError"}},Ea=a=>{throw new T(a)};function Fa(a,b,d={}){var c=b.name;if(!a)throw new T(`type "${c}" must have a positive integer typeid pointer`);if(R.hasOwnProperty(a)){if(d.K)return;throw new T(`Cannot register type '${c}' twice`)}R[a]=b,delete S[a],Q.hasOwnProperty(a)&&(b=Q[a],delete Q[a],b.forEach(e=>e()))}function U(a,b,d={}){return Fa(a,b,d)}var Ga=(a,b,d)=>{switch(b){case 1:return d?c=>ja[c]:c=>F[c];case 2:return d?c=>G[c>>1]:c=>H[c>>1];case 4:return d?c=>I[c>>2]:c=>J[c>>2];case 8:return d?c=>la[c>>3]:c=>ma[c>>3];default:throw new TypeError(`invalid integer width (${b}): ${a}`)}},Ha=[],V=[],Ia=a=>{9<a&&--V[a+1]===0&&(V[a]=void 0,Ha.push(a))},Ja=a=>{if(!a)throw new T(`Cannot use deleted val. handle = ${a}`);return V[a]},Ka=a=>{switch(a){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let b=Ha.pop()||V.length;return V[b]=a,V[b+1]=1,b}};function La(a){return this.fromWireType(J[a>>2])}var Ma={name:"emscripten::val",fromWireType:a=>{var b=Ja(a);return Ia(a),b},toWireType:(a,b)=>Ka(b),H:8,readValueFromPointer:La,G:null},Na=(a,b)=>{switch(b){case 4:return function(d){return this.fromWireType(ka[d>>2])};case 8:return function(d){return this.fromWireType(na[d>>3])};default:throw new TypeError(`invalid float width (${b}): ${a}`)}},Oa=a=>{for(;a.length;){var b=a.pop();a.pop()(b)}};function Pa(a){for(var b=1;b<a.length;++b)if(a[b]!==null&&a[b].G===void 0)return!0;return!1}var Sa=(a,b)=>{if(g[a].F===void 0){var d=g[a];g[a]=function(...c){if(!g[a].F.hasOwnProperty(c.length))throw new T(`Function '${b}' called with an invalid number of arguments (${c.length}) - expects one of (${g[a].F})!`);return g[a].F[c.length].apply(this,c)},g[a].F=[],g[a].F[d.J]=d}},Ta=(a,b,d)=>{if(g.hasOwnProperty(a)){if(d===void 0||g[a].F!==void 0&&g[a].F[d]!==void 0)throw new T(`Cannot register public name '${a}' twice`);if(Sa(a,a),g[a].F.hasOwnProperty(d))throw new T(`Cannot register multiple overloads of a function with the same number of arguments (${d})!`);g[a].F[d]=b}else g[a]=b,g[a].J=d},Ua=(a,b)=>{for(var d=[],c=0;c<a;c++)d.push(J[b+4*c>>2]);return d},Va=g.InternalError=class extends Error{constructor(a){super(a),this.name="InternalError"}},Wa=[],Xa,Ya=(a,b)=>{a=P(a);var d;if((d=Wa[b])||(Wa[b]=d=Xa.get(b)),typeof d!="function")throw new T(`unknown function pointer with signature ${a}: ${b}`);return d};class Za extends Error{}for(var ab=a=>{a=$a(a);var b=P(a);return W(a),b},bb=(a,b)=>{function d(f){e[f]||R[f]||(S[f]?S[f].forEach(d):(c.push(f),e[f]=!0))}var c=[],e={};throw b.forEach(d),new Za(`${a}: `+c.map(ab).join([", "]))},cb=(a,b)=>{function d(h){if(h=b(h),h.length!==c.length)throw new Va("Mismatched type converter count");for(var l=0;l<c.length;++l)U(c[l],h[l])}var c=[];c.forEach(h=>S[h]=a);var e=Array(a.length),f=[],m=0;a.forEach((h,l)=>{R.hasOwnProperty(h)?e[l]=R[h]:(f.push(h),Q.hasOwnProperty(h)||(Q[h]=[]),Q[h].push(()=>{e[l]=R[h],++m,m===f.length&&d(e)}))}),f.length===0&&d(e)},db=a=>{a=a.trim();let b=a.indexOf("(");return b===-1?a:a.slice(0,b)},eb=typeof TextDecoder<"u"?new TextDecoder:void 0,fb=(a=0,b=NaN)=>{var d=F,c=a+b;for(b=a;d[b]&&!(b>=c);)++b;if(16<b-a&&d.buffer&&eb)return eb.decode(d.subarray(a,b));for(c="";a<b;){var e=d[a++];if(e&128){var f=d[a++]&63;if((e&224)==192)c+=String.fromCharCode((e&31)<<6|f);else{var m=d[a++]&63;e=(e&240)==224?(e&15)<<12|f<<6|m:(e&7)<<18|f<<12|m<<6|d[a++]&63,65536>e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else c+=String.fromCharCode(e)}return c},gb=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,hb=(a,b)=>{for(var d=a>>1,c=d+b/2;!(d>=c)&&H[d];)++d;if(d<<=1,32<d-a&&gb)return gb.decode(F.subarray(a,d));for(d="",c=0;!(c>=b/2);++c){var e=G[a+2*c>>1];if(e==0)break;d+=String.fromCharCode(e)}return d},ib=(a,b,d)=>{if(d??=2147483647,2>d)return 0;d-=2;var c=b;d=d<2*a.length?d/2:a.length;for(var e=0;e<d;++e)G[b>>1]=a.charCodeAt(e),b+=2;return G[b>>1]=0,b-c},jb=a=>2*a.length,kb=(a,b)=>{for(var d=0,c="";!(d>=b/4);){var e=I[a+4*d>>2];if(e==0)break;++d,65536<=e?(e-=65536,c+=String.fromCharCode(55296|e>>10,56320|e&1023)):c+=String.fromCharCode(e)}return c},lb=(a,b,d)=>{if(d??=2147483647,4>d)return 0;var c=b;d=c+d-4;for(var e=0;e<a.length;++e){var f=a.charCodeAt(e);if(55296<=f&&57343>=f){var m=a.charCodeAt(++e);f=65536+((f&1023)<<10)|m&1023}if(I[b>>2]=f,b+=4,b+4>d)break}return I[b>>2]=0,b-c},mb=a=>{for(var b=0,d=0;d<a.length;++d){var c=a.charCodeAt(d);55296<=c&&57343>=c&&++d,b+=4}return b},nb=0,ob=[],pb=a=>{var b=ob.length;return ob.push(a),b},qb=(a,b)=>{var d=R[a];if(d===void 0)throw a=`${b} has unknown type ${ab(a)}`,new T(a);return d},rb=(a,b)=>{for(var d=Array(a),c=0;c<a;++c)d[c]=qb(J[b+4*c>>2],`parameter ${c}`);return d},sb=(a,b,d)=>{var c=[];return a=a.toWireType(c,d),c.length&&(J[b>>2]=Ka(c)),a},X={},tb=a=>{ia=a,O||0<nb||(g.onExit?.(a),E=!0),u(a,new va(a))},ub=a=>{if(!E)try{if(a(),!(O||0<nb))try{ia=a=ia,tb(a)}catch(b){b instanceof va||b=="unwind"||u(1,b)}}catch(b){b instanceof va||b=="unwind"||u(1,b)}},vb=Array(256),Y=0;256>Y;++Y)vb[Y]=String.fromCharCode(Y);Da=vb,V.push(0,1,void 0,1,null,1,!0,1,!1,1),g.count_emval_handles=()=>V.length/2-5-Ha.length,g.noExitRuntime&&(O=g.noExitRuntime),g.printErr&&(A=g.printErr),g.wasmBinary&&(C=g.wasmBinary);var Ab={u:(a,b,d)=>{var c=new Aa(a);throw J[c.I+16>>2]=0,J[c.I+4>>2]=b,J[c.I+8>>2]=d,Ba=a,Ca++,Ba},v:()=>qa(""),l:(a,b,d)=>{b=P(b),U(a,{name:b,fromWireType:c=>c,toWireType:function(c,e){if(typeof e!="bigint"&&typeof e!="number")throw e===null?e="null":(c=typeof e,e=c==="object"||c==="array"||c==="function"?e.toString():""+e),new TypeError(`Cannot convert "${e}" to ${this.name}`);return typeof e=="number"&&(e=BigInt(e)),e},H:8,readValueFromPointer:Ga(b,d,b.indexOf("u")==-1),G:null})},o:(a,b,d,c)=>{b=P(b),U(a,{name:b,fromWireType:function(e){return!!e},toWireType:function(e,f){return f?d:c},H:8,readValueFromPointer:function(e){return this.fromWireType(F[e])},G:null})},m:a=>U(a,Ma),k:(a,b,d)=>{b=P(b),U(a,{name:b,fromWireType:c=>c,toWireType:(c,e)=>e,H:8,readValueFromPointer:Na(b,d),G:null})},c:(a,b,d,c,e,f,m)=>{var h=Ua(b,d);a=P(a),a=db(a),e=Ya(c,e),Ta(a,function(){bb(`Cannot call ${a} due to unbound types`,h)},b-1),cb(h,l=>{var k=[l[0],null].concat(l.slice(1));l=a;var p=a,z=e,n=k.length;if(2>n)throw new T("argTypes array size mismatch! Must at least get return value and 'this' types!");var B=k[1]!==null&&!1,M=Pa(k),Qa=k[0].name!=="void";z=[p,Ea,z,f,Oa,k[0],k[1]];for(var x=0;x<n-2;++x)z.push(k[x+2]);if(!M)for(x=B?1:2;x<k.length;++x)k[x].G!==null&&z.push(k[x].G);M=Pa(k),x=k.length-2;var r=[],N=["fn"];for(B&&N.push("thisWired"),n=0;n<x;++n)r.push(`arg${n}`),N.push(`arg${n}Wired`);r=r.join(","),N=N.join(","),r=`return function (${r}) {
2
+ `,M&&(r+=`var destructors = [];
3
+ `);var Ra=M?"destructors":"null",oa="humanName throwBindingError invoker fn runDestructors retType classParam".split(" ");for(B&&(r+=`var thisWired = classParam['toWireType'](${Ra}, this);
4
+ `),n=0;n<x;++n)r+=`var arg${n}Wired = argType${n}['toWireType'](${Ra}, arg${n});
5
+ `,oa.push(`argType${n}`);if(r+=(Qa||m?"var rv = ":"")+`invoker(${N});
6
+ `,M)r+=`runDestructors(destructors);
7
+ `;else for(n=B?1:2;n<k.length;++n)B=n===1?"thisWired":"arg"+(n-2)+"Wired",k[n].G!==null&&(r+=`${B}_dtor(${B});
8
+ `,oa.push(`${B}_dtor`));Qa&&(r+=`var ret = retType['fromWireType'](rv);
9
+ return ret;
10
+ `);let[yb,zb]=[oa,r+`}
11
+ `];if(k=new Function(...yb,zb)(...z),p=Object.defineProperty(k,"name",{value:p}),k=b-1,!g.hasOwnProperty(l))throw new Va("Replacing nonexistent public symbol");return g[l].F!==void 0&&k!==void 0?g[l].F[k]=p:(g[l]=p,g[l].J=k),[]})},b:(a,b,d,c,e)=>{if(b=P(b),e===-1&&(e=4294967295),e=h=>h,c===0){var f=32-8*d;e=h=>h<<f>>>f}var m=b.includes("unsigned")?function(h,l){return l>>>0}:function(h,l){return l};U(a,{name:b,fromWireType:e,toWireType:m,H:8,readValueFromPointer:Ga(b,d,c!==0),G:null})},a:(a,b,d)=>{function c(f){return new e(ja.buffer,J[f+4>>2],J[f>>2])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][b];d=P(d),U(a,{name:d,fromWireType:c,H:8,readValueFromPointer:c},{K:!0})},n:(a,b)=>{b=P(b),U(a,{name:b,fromWireType:function(d){for(var c=J[d>>2],e=d+4,f,m=e,h=0;h<=c;++h){var l=e+h;(h==c||F[l]==0)&&(m=m?fb(m,l-m):"",f===void 0?f=m:(f+="\0",f+=m),m=l+1)}return W(d),f},toWireType:function(d,c){c instanceof ArrayBuffer&&(c=new Uint8Array(c));var e,f=typeof c=="string";if(!(f||ArrayBuffer.isView(c)&&c.BYTES_PER_ELEMENT==1))throw new T("Cannot pass non-string to std::string");var m;if(f)for(e=m=0;e<c.length;++e){var h=c.charCodeAt(e);127>=h?m++:2047>=h?m+=2:55296<=h&&57343>=h?(m+=4,++e):m+=3}else m=c.length;if(e=m,m=wb(4+e+1),h=m+4,J[m>>2]=e,f){if(f=h,h=e+1,e=F,0<h){h=f+h-1;for(var l=0;l<c.length;++l){var k=c.charCodeAt(l);if(55296<=k&&57343>=k){var p=c.charCodeAt(++l);k=65536+((k&1023)<<10)|p&1023}if(127>=k){if(f>=h)break;e[f++]=k}else{if(2047>=k){if(f+1>=h)break;e[f++]=192|k>>6}else{if(65535>=k){if(f+2>=h)break;e[f++]=224|k>>12}else{if(f+3>=h)break;e[f++]=240|k>>18,e[f++]=128|k>>12&63}e[f++]=128|k>>6&63}e[f++]=128|k&63}}e[f]=0}}else F.set(c,h);return d!==null&&d.push(W,m),m},H:8,readValueFromPointer:La,G(d){W(d)}})},e:(a,b,d)=>{if(d=P(d),b===2)var c=hb,e=ib,f=jb,m=h=>H[h>>1];else b===4&&(c=kb,e=lb,f=mb,m=h=>J[h>>2]);U(a,{name:d,fromWireType:h=>{for(var l=J[h>>2],k,p=h+4,z=0;z<=l;++z){var n=h+4+z*b;(z==l||m(n)==0)&&(p=c(p,n-p),k===void 0?k=p:(k+="\0",k+=p),p=n+b)}return W(h),k},toWireType:(h,l)=>{if(typeof l!="string")throw new T(`Cannot pass non-string to C++ string type ${d}`);var k=f(l),p=wb(4+k+b);return J[p>>2]=k/b,e(l,p+4,k+b),h!==null&&h.push(W,p),p},H:8,readValueFromPointer:La,G(h){W(h)}})},f:a=>{U(a,Ma)},p:(a,b)=>{b=P(b),U(a,{L:!0,name:b,H:0,fromWireType:()=>{},toWireType:()=>{}})},s:()=>{O=!1,nb=0},i:(a,b,d,c)=>(a=ob[a],b=Ja(b),a(null,b,d,c)),d:Ia,h:(a,b,d)=>{b=rb(a,b);var c=b.shift();a--;var e=`return function (obj, func, destructorsRef, args) {
12
+ `,f=0,m=[];d===0&&m.push("obj");for(var h=["retType"],l=[c],k=0;k<a;++k)m.push(`arg${k}`),h.push(`argType${k}`),l.push(b[k]),e+=` var arg${k} = argType${k}.readValueFromPointer(args${f?"+"+f:""});
13
+ `,f+=b[k].H;return e+=` var rv = ${d===1?"new func":"func.call"}(${m.join(", ")});
14
+ `,c.L||(h.push("emval_returnValue"),l.push(sb),e+=` return emval_returnValue(retType, destructorsRef, rv);
15
+ `),a=new Function(...h,e+`};
16
+ `)(...l),d=`methodCaller<(${b.map(p=>p.name).join(", ")}) => ${c.name}>`,pb(Object.defineProperty(a,"name",{value:d}))},q:a=>{9<a&&(V[a+1]+=1)},g:a=>{var b=Ja(a);Oa(b),Ia(a)},j:(a,b)=>(a=qb(a,"_emval_take_value"),a=a.readValueFromPointer(b),Ka(a)),t:(a,b)=>{if(X[a]&&(clearTimeout(X[a].id),delete X[a]),!b)return 0;var d=setTimeout(()=>{delete X[a],ub(()=>xb(a,performance.now()))},b);return X[a]={id:d,M:b},0},w:a=>{var b=F.length;if(a>>>=0,2147483648<a)return!1;for(var d=1;4>=d;d*=2){var c=b*(1+.2/d);c=Math.min(c,a+100663296);a:{c=(Math.min(2147483648,65536*Math.ceil(Math.max(a,c)/65536))-D.buffer.byteLength+65535)/65536|0;try{D.grow(c),pa();var e=1;break a}catch{}e=void 0}if(e)return!0}return!1},r:tb},Z=await async function(){function a(c){return Z=c.exports,D=Z.x,pa(),Xa=Z.D,K--,g.monitorRunDependencies?.(K),K==0&&L&&(c=L,L=null,c()),Z}K++,g.monitorRunDependencies?.(K);var b={a:Ab};if(g.instantiateWasm)return new Promise(c=>{g.instantiateWasm(b,(e,f)=>{c(a(e,f))})});ra??=g.locateFile?g.locateFile?g.locateFile("silk.wasm",v):v+"silk.wasm":new URL("silk.wasm",import_meta_url).href;try{var d=await ua(b);return a(d.instance)}catch(c){return q(c),Promise.reject(c)}}(),$a=Z.z,wb=Z.A,W=Z.B,xb=Z.C;function Bb(){function a(){if(g.calledRun=!0,!E){if(Z.y(),aa(g),g.onRuntimeInitialized?.(),g.postRun)for(typeof g.postRun=="function"&&(g.postRun=[g.postRun]);g.postRun.length;){var b=g.postRun.shift();xa.push(b)}wa(xa)}}if(0<K)L=Bb;else{if(g.preRun)for(typeof g.preRun=="function"&&(g.preRun=[g.preRun]);g.preRun.length;)za();wa(ya),0<K?L=Bb:g.setStatus?(g.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>g.setStatus(""),1),a()},1)):a()}}if(g.preInit)for(typeof g.preInit=="function"&&(g.preInit=[g.preInit]);0<g.preInit.length;)g.preInit.shift()();return Bb(),moduleRtn=ba,moduleRtn},silk_default=Module;function isWavFile(fileData){try{let chunks=unpackWavFileChunks(fileData),fmt=decodeFormatChunk(chunks.get("fmt")),data=chunks.get("data");return getWavFileType(fmt),verifyDataChunkLength(data,fmt),!0}catch{return!1}}var audioEncodingNames=["int","float"],wavFileTypeAudioEncodings=[0,0,0,1];function decodeWavFile(fileData){let chunks=unpackWavFileChunks(fileData),fmt=decodeFormatChunk(chunks.get("fmt")),data=chunks.get("data"),wavFileType=getWavFileType(fmt),audioEncoding=wavFileTypeAudioEncodings[wavFileType],wavFileTypeName=audioEncodingNames[audioEncoding]+fmt.bitsPerSample;return verifyDataChunkLength(data,fmt),{channelData:decodeDataChunk(data,fmt,wavFileType),sampleRate:fmt.sampleRate,numberOfChannels:fmt.numberOfChannels,audioEncoding,bitsPerSample:fmt.bitsPerSample,wavFileTypeName}}function unpackWavFileChunks(fileData){let dataView;fileData instanceof ArrayBuffer?dataView=new DataView(fileData):dataView=new DataView(fileData.buffer,fileData.byteOffset,fileData.byteLength);let fileLength=dataView.byteLength;if(fileLength<20)throw new Error("WAV file is too short.");if(getString(dataView,0,4)!="RIFF")throw new Error("Not a valid WAV file (no RIFF header).");let mainChunkLength=dataView.getUint32(4,!0);if(8+mainChunkLength!=fileLength)throw new Error(`Main chunk length of WAV file (${8+mainChunkLength}) does not match file size (${fileLength}).`);if(getString(dataView,8,4)!="WAVE")throw new Error("RIFF file is not a WAV file.");let chunks=new Map,fileOffset=12;for(;fileOffset<fileLength;){if(fileOffset+8>fileLength)throw new Error(`Incomplete chunk prefix in WAV file at offset ${fileOffset}.`);let chunkId=getString(dataView,fileOffset,4).trim(),chunkLength=dataView.getUint32(fileOffset+4,!0);if(fileOffset+8+chunkLength>fileLength)throw new Error(`Incomplete chunk data in WAV file at offset ${fileOffset}.`);let chunkData=new DataView(dataView.buffer,dataView.byteOffset+fileOffset+8,chunkLength);chunks.set(chunkId,chunkData);let padLength=chunkLength%2;fileOffset+=8+chunkLength+padLength}return chunks}function getString(dataView,offset,length){let a=new Uint8Array(dataView.buffer,dataView.byteOffset+offset,length);return String.fromCharCode.apply(null,a)}function getInt24(dataView,offset){let b0=dataView.getInt8(offset+2)*65536,b12=dataView.getUint16(offset,!0);return b0+b12}function decodeFormatChunk(dataView){if(!dataView)throw new Error("No format chunk found in WAV file.");if(dataView.byteLength<16)throw new Error("Format chunk of WAV file is too short.");let fmt={};return fmt.formatCode=dataView.getUint16(0,!0),fmt.numberOfChannels=dataView.getUint16(2,!0),fmt.sampleRate=dataView.getUint32(4,!0),fmt.bytesPerSec=dataView.getUint32(8,!0),fmt.bytesPerFrame=dataView.getUint16(12,!0),fmt.bitsPerSample=dataView.getUint16(14,!0),fmt}function getWavFileType(fmt){if(fmt.numberOfChannels<1||fmt.numberOfChannels>999)throw new Error("Invalid number of channels in WAV file.");let bytesPerSample=Math.ceil(fmt.bitsPerSample/8),expectedBytesPerFrame=fmt.numberOfChannels*bytesPerSample;if(fmt.formatCode==1&&fmt.bitsPerSample>=1&&fmt.bitsPerSample<=8&&fmt.bytesPerFrame==expectedBytesPerFrame)return 0;if(fmt.formatCode==1&&fmt.bitsPerSample>=9&&fmt.bitsPerSample<=16&&fmt.bytesPerFrame==expectedBytesPerFrame)return 1;if(fmt.formatCode==1&&fmt.bitsPerSample>=17&&fmt.bitsPerSample<=24&&fmt.bytesPerFrame==expectedBytesPerFrame)return 2;if(fmt.formatCode==3&&fmt.bitsPerSample==32&&fmt.bytesPerFrame==expectedBytesPerFrame)return 3;throw new Error(`Unsupported WAV file type, formatCode=${fmt.formatCode}, bitsPerSample=${fmt.bitsPerSample}, bytesPerFrame=${fmt.bytesPerFrame}, numberOfChannels=${fmt.numberOfChannels}.`)}function decodeDataChunk(data,fmt,wavFileType){switch(wavFileType){case 0:return decodeDataChunk_uint8(data,fmt);case 1:return decodeDataChunk_int16(data,fmt);case 2:return decodeDataChunk_int24(data,fmt);case 3:return decodeDataChunk_float32(data,fmt);default:throw new Error("No decoder.")}}function decodeDataChunk_int16(data,fmt){let channelData=allocateChannelDataArrays(data.byteLength,fmt),numberOfChannels=fmt.numberOfChannels,numberOfFrames=channelData[0].length,offs=0;for(let frameNo=0;frameNo<numberOfFrames;frameNo++)for(let channelNo=0;channelNo<numberOfChannels;channelNo++){let sampleValueFloat=data.getInt16(offs,!0)/32768;channelData[channelNo][frameNo]=sampleValueFloat,offs+=2}return channelData}function decodeDataChunk_uint8(data,fmt){let channelData=allocateChannelDataArrays(data.byteLength,fmt),numberOfChannels=fmt.numberOfChannels,numberOfFrames=channelData[0].length,offs=0;for(let frameNo=0;frameNo<numberOfFrames;frameNo++)for(let channelNo=0;channelNo<numberOfChannels;channelNo++){let sampleValueFloat=(data.getUint8(offs)-128)/128;channelData[channelNo][frameNo]=sampleValueFloat,offs+=1}return channelData}function decodeDataChunk_int24(data,fmt){let channelData=allocateChannelDataArrays(data.byteLength,fmt),numberOfChannels=fmt.numberOfChannels,numberOfFrames=channelData[0].length,offs=0;for(let frameNo=0;frameNo<numberOfFrames;frameNo++)for(let channelNo=0;channelNo<numberOfChannels;channelNo++){let sampleValueFloat=getInt24(data,offs)/8388608;channelData[channelNo][frameNo]=sampleValueFloat,offs+=3}return channelData}function decodeDataChunk_float32(data,fmt){let channelData=allocateChannelDataArrays(data.byteLength,fmt),numberOfChannels=fmt.numberOfChannels,numberOfFrames=channelData[0].length,offs=0;for(let frameNo=0;frameNo<numberOfFrames;frameNo++)for(let channelNo=0;channelNo<numberOfChannels;channelNo++){let sampleValueFloat=data.getFloat32(offs,!0);channelData[channelNo][frameNo]=sampleValueFloat,offs+=4}return channelData}function allocateChannelDataArrays(dataLength,fmt){let numberOfFrames=Math.floor(dataLength/fmt.bytesPerFrame),channelData=new Array(fmt.numberOfChannels);for(let channelNo=0;channelNo<fmt.numberOfChannels;channelNo++)channelData[channelNo]=new Float32Array(numberOfFrames);return channelData}function verifyDataChunkLength(data,fmt){if(!data)throw new Error("No data chunk found in WAV file.");if(data.byteLength%fmt.bytesPerFrame!=0)throw new Error("WAV file data chunk length is not a multiple of frame size.")}function getWavFileInfo(fileData){let chunks=unpackWavFileChunks(fileData),chunkInfo=getChunkInfo(chunks),fmt=decodeFormatChunk(chunks.get("fmt"));return{chunkInfo,fmt}}function getChunkInfo(chunks){let chunkInfo=[];for(let e of chunks){let ci={};ci.chunkId=e[0],ci.dataOffset=e[1].byteOffset,ci.dataLength=e[1].byteLength,chunkInfo.push(ci)}return chunkInfo.sort((e1,e2)=>e1.dataOffset-e2.dataOffset),chunkInfo}function ensureMonoPcm(channelData){let{length:numberOfChannels}=channelData;if(numberOfChannels===1)return channelData[0];let monoData=new Float32Array(channelData[0].length);for(let i=0;i<monoData.length;i++){let sum=0;for(let j=0;j<numberOfChannels;j++)sum+=channelData[j][i];monoData[i]=sum/numberOfChannels}return monoData}function ensureS16lePcm(input){let int16Array=new Int16Array(input.length);for(let offset=0;offset<input.length;offset++){let x=~~(input[offset]*32768);int16Array[offset]=x>32767?32767:x}return int16Array.buffer}function toUTF8String(input,start=0,end=input.byteLength){return new TextDecoder().decode(input.slice(start,end))}function binaryFromSource(source){return ArrayBuffer.isView(source)?source.buffer.slice(source.byteOffset,source.byteOffset+source.byteLength):source}async function encode(input,sampleRate){let instance=await silk_default(),buffer=binaryFromSource(input);if(!buffer?.byteLength)throw new Error("input data length is 0");if(isWavFile(input)){let{channelData,sampleRate:wavSampleRate}=decodeWavFile(input);sampleRate||=wavSampleRate,buffer=ensureS16lePcm(ensureMonoPcm(channelData))}let data=new Uint8Array,duration=instance.silk_encode(buffer,sampleRate,output=>{data=output.slice()});if(duration===0)throw new Error("silk encoding failure");return{data,duration}}async function decode(input,sampleRate){let instance=await silk_default(),buffer=binaryFromSource(input);if(!buffer?.byteLength)throw new Error("input data length is 0");let data=new Uint8Array,duration=instance.silk_decode(buffer,sampleRate,output=>{output.length>0&&(data=output.slice())});if(duration===0)throw new Error("silk decoding failure");return{data,duration}}function getDuration(data,frameMs=20){let buffer=binaryFromSource(data),view=new DataView(buffer),byteLength=view.byteLength,offset=view.getUint8(0)===2?10:9,blocks=0;for(;offset<byteLength;){let size=view.getUint16(offset,!0);blocks+=1,offset+=size+2}return blocks*frameMs}function isWav(data){return isWavFile(data)}function getWavFileInfo2(data){return getWavFileInfo(data)}function isSilk(data){let buffer=binaryFromSource(data);return buffer.byteLength<7?!1:toUTF8String(buffer,0,7).includes("#!SILK")}0&&(module.exports={decode,encode,getDuration,getWavFileInfo,isSilk,isWav});