@easyv/biz-components 0.0.20 → 0.0.21

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 (579) hide show
  1. package/dist/_virtual/___vite-browser-external.es.js +4 -4
  2. package/dist/_virtual/__vite-browser-external.es.js +2 -2
  3. package/dist/_virtual/__vite-browser-external.es.js.map +1 -1
  4. package/dist/_virtual/_commonjs-dynamic-modules.es.js +3 -3
  5. package/dist/_virtual/_commonjsHelpers.es.js +25 -20
  6. package/dist/_virtual/_commonjsHelpers.es.js.map +1 -1
  7. package/dist/_virtual/aes.es.js +2 -2
  8. package/dist/_virtual/blowfish.es.js +2 -2
  9. package/dist/_virtual/cipher-core.es.js +2 -2
  10. package/dist/_virtual/core.es.js +2 -2
  11. package/dist/_virtual/enc-base64.es.js +2 -2
  12. package/dist/_virtual/enc-base64url.es.js +2 -2
  13. package/dist/_virtual/enc-utf16.es.js +2 -2
  14. package/dist/_virtual/evpkdf.es.js +2 -2
  15. package/dist/_virtual/format-hex.es.js +2 -2
  16. package/dist/_virtual/hmac.es.js +2 -2
  17. package/dist/_virtual/index.es.js +2 -2
  18. package/dist/_virtual/index.es2.js +2 -2
  19. package/dist/_virtual/index.es3.js +2 -2
  20. package/dist/_virtual/index.es4.js +2 -2
  21. package/dist/_virtual/index.es5.js +2 -2
  22. package/dist/_virtual/index.es6.js +2 -2
  23. package/dist/_virtual/index.es7.js +2 -2
  24. package/dist/_virtual/jsx-runtime.es.js +2 -2
  25. package/dist/_virtual/lib-typedarrays.es.js +2 -2
  26. package/dist/_virtual/md5.es.js +2 -2
  27. package/dist/_virtual/mode-cfb.es.js +2 -2
  28. package/dist/_virtual/mode-ctr-gladman.es.js +2 -2
  29. package/dist/_virtual/mode-ctr.es.js +2 -2
  30. package/dist/_virtual/mode-ecb.es.js +2 -2
  31. package/dist/_virtual/mode-ofb.es.js +2 -2
  32. package/dist/_virtual/pad-ansix923.es.js +2 -2
  33. package/dist/_virtual/pad-iso10126.es.js +2 -2
  34. package/dist/_virtual/pad-iso97971.es.js +2 -2
  35. package/dist/_virtual/pad-nopadding.es.js +2 -2
  36. package/dist/_virtual/pad-zeropadding.es.js +2 -2
  37. package/dist/_virtual/pbkdf2.es.js +2 -2
  38. package/dist/_virtual/rabbit-legacy.es.js +2 -2
  39. package/dist/_virtual/rabbit.es.js +2 -2
  40. package/dist/_virtual/rc4.es.js +2 -2
  41. package/dist/_virtual/react-is.development.es.js +2 -2
  42. package/dist/_virtual/react-is.production.min.es.js +2 -2
  43. package/dist/_virtual/react-jsx-runtime.development.es.js +2 -2
  44. package/dist/_virtual/react-jsx-runtime.production.min.es.js +2 -2
  45. package/dist/_virtual/ripemd160.es.js +2 -2
  46. package/dist/_virtual/sha1.es.js +2 -2
  47. package/dist/_virtual/sha224.es.js +2 -2
  48. package/dist/_virtual/sha256.es.js +2 -2
  49. package/dist/_virtual/sha3.es.js +2 -2
  50. package/dist/_virtual/sha384.es.js +2 -2
  51. package/dist/_virtual/sha512.es.js +2 -2
  52. package/dist/_virtual/tripledes.es.js +2 -2
  53. package/dist/_virtual/utilities.es.js +2 -2
  54. package/dist/_virtual/x64-core.es.js +2 -2
  55. package/dist/components/AiMessageRender/AiMessageRender.es.js +62 -46
  56. package/dist/components/AiMessageRender/AiMessageRender.es.js.map +1 -1
  57. package/dist/components/AiMessageRender/index.less.es.js +2 -191
  58. package/dist/components/AiMessageRender/index.less.es.js.map +1 -1
  59. package/dist/components/ScrollController/ScrollController.es.js +57 -34
  60. package/dist/components/ScrollController/ScrollController.es.js.map +1 -1
  61. package/dist/components/ShadowDom/ShadowDom.es.js +28 -20
  62. package/dist/components/ShadowDom/ShadowDom.es.js.map +1 -1
  63. package/dist/components/VoiceAnimation/VoiceAnimation.es.js +22 -15
  64. package/dist/components/VoiceAnimation/VoiceAnimation.es.js.map +1 -1
  65. package/dist/hooks/useDivAutoScroll.es.js +47 -24
  66. package/dist/hooks/useDivAutoScroll.es.js.map +1 -1
  67. package/dist/hooks/useXunFeiSteamVoiceManager.es.js +12 -10
  68. package/dist/hooks/useXunFeiSteamVoiceManager.es.js.map +1 -1
  69. package/dist/index.es.js +19 -19
  70. package/dist/node_modules/.pnpm/@easyv_react-icons@6.3.0/node_modules/@easyv/react-icons/dist/index.esm.es.js +5117 -1099
  71. package/dist/node_modules/.pnpm/@easyv_react-icons@6.3.0/node_modules/@easyv/react-icons/dist/index.esm.es.js.map +1 -1
  72. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/deserialize.es.js +54 -48
  73. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/deserialize.es.js.map +1 -1
  74. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/index.es.js +8 -8
  75. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/index.es.js.map +1 -1
  76. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/serialize.es.js +103 -74
  77. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/serialize.es.js.map +1 -1
  78. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/types.es.js +20 -11
  79. package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/types.es.js.map +1 -1
  80. package/dist/node_modules/.pnpm/bail@2.0.2/node_modules/bail/index.es.js +5 -4
  81. package/dist/node_modules/.pnpm/bail@2.0.2/node_modules/bail/index.es.js.map +1 -1
  82. package/dist/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.es.js +12 -8
  83. package/dist/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.es.js.map +1 -1
  84. package/dist/node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.es.js +37 -27
  85. package/dist/node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.es.js.map +1 -1
  86. package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js +49 -28
  87. package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js.map +1 -1
  88. package/dist/node_modules/.pnpm/co-web-worker@1.0.1/node_modules/co-web-worker/index.es.js +11 -11
  89. package/dist/node_modules/.pnpm/co-web-worker@1.0.1/node_modules/co-web-worker/index.es.js.map +1 -1
  90. package/dist/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.es.js +6 -5
  91. package/dist/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.es.js.map +1 -1
  92. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.es.js +145 -53
  93. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.es.js.map +1 -1
  94. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.es.js +125 -60
  95. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.es.js.map +1 -1
  96. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.es.js +244 -140
  97. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.es.js.map +1 -1
  98. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.es.js +232 -127
  99. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.es.js.map +1 -1
  100. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.es.js +74 -43
  101. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.es.js.map +1 -1
  102. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.es.js +80 -45
  103. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.es.js.map +1 -1
  104. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.es.js +58 -36
  105. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.es.js.map +1 -1
  106. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.es.js +55 -29
  107. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.es.js.map +1 -1
  108. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.es.js +32 -21
  109. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.es.js.map +1 -1
  110. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.es.js +56 -29
  111. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.es.js.map +1 -1
  112. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.es.js +48 -46
  113. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.es.js.map +1 -1
  114. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.es.js +44 -23
  115. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.es.js.map +1 -1
  116. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.es.js +158 -47
  117. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.es.js.map +1 -1
  118. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.es.js +49 -29
  119. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.es.js.map +1 -1
  120. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.es.js +72 -33
  121. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.es.js.map +1 -1
  122. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.es.js +39 -23
  123. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.es.js.map +1 -1
  124. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.es.js +30 -22
  125. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.es.js.map +1 -1
  126. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.es.js +37 -21
  127. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.es.js.map +1 -1
  128. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.es.js +31 -20
  129. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.es.js.map +1 -1
  130. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.es.js +27 -20
  131. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.es.js.map +1 -1
  132. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.es.js +26 -18
  133. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.es.js.map +1 -1
  134. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.es.js +20 -14
  135. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.es.js.map +1 -1
  136. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.es.js +31 -21
  137. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.es.js.map +1 -1
  138. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.es.js +61 -32
  139. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.es.js.map +1 -1
  140. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.es.js +119 -59
  141. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.es.js.map +1 -1
  142. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.es.js +122 -61
  143. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.es.js.map +1 -1
  144. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.es.js +67 -40
  145. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.es.js.map +1 -1
  146. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.es.js +135 -49
  147. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.es.js.map +1 -1
  148. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.es.js +75 -30
  149. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.es.js.map +1 -1
  150. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.es.js +32 -19
  151. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.es.js.map +1 -1
  152. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.es.js +107 -40
  153. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.es.js.map +1 -1
  154. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.es.js +167 -77
  155. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.es.js.map +1 -1
  156. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.es.js +42 -28
  157. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.es.js.map +1 -1
  158. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.es.js +268 -129
  159. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.es.js.map +1 -1
  160. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.es.js +122 -63
  161. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.es.js.map +1 -1
  162. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.es.js +52 -27
  163. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.es.js.map +1 -1
  164. package/dist/node_modules/.pnpm/decode-named-character-reference@1.1.0/node_modules/decode-named-character-reference/index.dom.es.js +12 -9
  165. package/dist/node_modules/.pnpm/decode-named-character-reference@1.1.0/node_modules/decode-named-character-reference/index.dom.es.js.map +1 -1
  166. package/dist/node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.es.js +4 -4
  167. package/dist/node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.es.js.map +1 -1
  168. package/dist/node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.es.js +5 -4
  169. package/dist/node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.es.js.map +1 -1
  170. package/dist/node_modules/.pnpm/estree-util-is-identifier-name@3.0.0/node_modules/estree-util-is-identifier-name/lib/index.es.js +8 -4
  171. package/dist/node_modules/.pnpm/estree-util-is-identifier-name@3.0.0/node_modules/estree-util-is-identifier-name/lib/index.es.js.map +1 -1
  172. package/dist/node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.es.js +86 -36
  173. package/dist/node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.es.js.map +1 -1
  174. package/dist/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +314 -226
  175. package/dist/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.es.js.map +1 -1
  176. package/dist/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.es.js +6 -6
  177. package/dist/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.es.js.map +1 -1
  178. package/dist/node_modules/.pnpm/html-url-attributes@3.0.1/node_modules/html-url-attributes/lib/index.es.js +2 -2
  179. package/dist/node_modules/.pnpm/html-url-attributes@3.0.1/node_modules/html-url-attributes/lib/index.es.js.map +1 -1
  180. package/dist/node_modules/.pnpm/inline-style-parser@0.2.4/node_modules/inline-style-parser/index.es.js +115 -67
  181. package/dist/node_modules/.pnpm/inline-style-parser@0.2.4/node_modules/inline-style-parser/index.es.js.map +1 -1
  182. package/dist/node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.es.js +7 -6
  183. package/dist/node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.es.js.map +1 -1
  184. package/dist/node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.es.js +21 -8
  185. package/dist/node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.es.js.map +1 -1
  186. package/dist/node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.es.js +124 -57
  187. package/dist/node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.es.js.map +1 -1
  188. package/dist/node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.es.js +93 -54
  189. package/dist/node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.es.js.map +1 -1
  190. package/dist/node_modules/.pnpm/mdast-util-from-markdown@2.0.2/node_modules/mdast-util-from-markdown/lib/index.es.js +509 -371
  191. package/dist/node_modules/.pnpm/mdast-util-from-markdown@2.0.2/node_modules/mdast-util-from-markdown/lib/index.es.js.map +1 -1
  192. package/dist/node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.es.js +107 -81
  193. package/dist/node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.es.js.map +1 -1
  194. package/dist/node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.es.js +85 -63
  195. package/dist/node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.es.js.map +1 -1
  196. package/dist/node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.es.js +26 -22
  197. package/dist/node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.es.js.map +1 -1
  198. package/dist/node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.es.js +104 -82
  199. package/dist/node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.es.js.map +1 -1
  200. package/dist/node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.es.js +57 -38
  201. package/dist/node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.es.js.map +1 -1
  202. package/dist/node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.es.js +19 -19
  203. package/dist/node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.es.js.map +1 -1
  204. package/dist/node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.es.js +4 -4
  205. package/dist/node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.es.js.map +1 -1
  206. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/footer.es.js +94 -69
  207. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/footer.es.js.map +1 -1
  208. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/blockquote.es.js +6 -5
  209. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/blockquote.es.js.map +1 -1
  210. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/break.es.js +5 -5
  211. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/break.es.js.map +1 -1
  212. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/code.es.js +18 -9
  213. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/code.es.js.map +1 -1
  214. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/delete.es.js +6 -5
  215. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/delete.es.js.map +1 -1
  216. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/emphasis.es.js +6 -5
  217. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/emphasis.es.js.map +1 -1
  218. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.es.js +28 -15
  219. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.es.js.map +1 -1
  220. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/heading.es.js +7 -6
  221. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/heading.es.js.map +1 -1
  222. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/html.es.js +7 -5
  223. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/html.es.js.map +1 -1
  224. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image-reference.es.js +16 -11
  225. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image-reference.es.js.map +1 -1
  226. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image.es.js +13 -7
  227. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/image.es.js.map +1 -1
  228. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/index.es.js +54 -53
  229. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/index.es.js.map +1 -1
  230. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/inline-code.es.js +8 -7
  231. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/inline-code.es.js.map +1 -1
  232. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link-reference.es.js +18 -13
  233. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link-reference.es.js.map +1 -1
  234. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link.es.js +12 -9
  235. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/link.es.js.map +1 -1
  236. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list-item.es.js +53 -31
  237. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list-item.es.js.map +1 -1
  238. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list.es.js +18 -13
  239. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/list.es.js.map +1 -1
  240. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/paragraph.es.js +6 -5
  241. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/paragraph.es.js.map +1 -1
  242. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/root.es.js +5 -4
  243. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/root.es.js.map +1 -1
  244. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/strong.es.js +6 -5
  245. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/strong.es.js.map +1 -1
  246. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-cell.es.js +6 -5
  247. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-cell.es.js.map +1 -1
  248. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-row.es.js +27 -13
  249. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table-row.es.js.map +1 -1
  250. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table.es.js +23 -16
  251. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/table.es.js.map +1 -1
  252. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/text.es.js +6 -5
  253. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/text.es.js.map +1 -1
  254. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.es.js +5 -4
  255. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.es.js.map +1 -1
  256. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/index.es.js +12 -7
  257. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/index.es.js.map +1 -1
  258. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/revert.es.js +26 -10
  259. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/revert.es.js.map +1 -1
  260. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/state.es.js +123 -79
  261. package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/state.es.js.map +1 -1
  262. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/blockquote.es.js +13 -10
  263. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/blockquote.es.js.map +1 -1
  264. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/break.es.js +10 -10
  265. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/break.es.js.map +1 -1
  266. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/code.es.js +44 -32
  267. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/code.es.js.map +1 -1
  268. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/definition.es.js +53 -29
  269. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/definition.es.js.map +1 -1
  270. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/emphasis.es.js +37 -26
  271. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/emphasis.es.js.map +1 -1
  272. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/heading.es.js +35 -24
  273. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/heading.es.js.map +1 -1
  274. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/html.es.js +5 -5
  275. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/html.es.js.map +1 -1
  276. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image-reference.es.js +31 -18
  277. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image-reference.es.js.map +1 -1
  278. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image.es.js +54 -28
  279. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image.es.js.map +1 -1
  280. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/index.es.js +41 -41
  281. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/index.es.js.map +1 -1
  282. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/inline-code.es.js +25 -15
  283. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/inline-code.es.js.map +1 -1
  284. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link-reference.es.js +31 -18
  285. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link-reference.es.js.map +1 -1
  286. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link.es.js +74 -41
  287. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link.es.js.map +1 -1
  288. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list-item.es.js +27 -17
  289. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list-item.es.js.map +1 -1
  290. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list.es.js +34 -24
  291. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list.es.js.map +1 -1
  292. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/paragraph.es.js +8 -4
  293. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/paragraph.es.js.map +1 -1
  294. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/root.es.js +8 -6
  295. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/root.es.js.map +1 -1
  296. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/strong.es.js +37 -26
  297. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/strong.es.js.map +1 -1
  298. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/text.es.js +3 -3
  299. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/text.es.js.map +1 -1
  300. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.es.js +6 -6
  301. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.es.js.map +1 -1
  302. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.es.js +7 -6
  303. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.es.js.map +1 -1
  304. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.es.js +15 -11
  305. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.es.js.map +1 -1
  306. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet.es.js +7 -6
  307. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet.es.js.map +1 -1
  308. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.es.js +7 -6
  309. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.es.js.map +1 -1
  310. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-fence.es.js +7 -6
  311. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-fence.es.js.map +1 -1
  312. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.es.js +7 -6
  313. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.es.js.map +1 -1
  314. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-quote.es.js +7 -6
  315. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-quote.es.js.map +1 -1
  316. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.es.js +7 -6
  317. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.es.js.map +1 -1
  318. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule.es.js +7 -6
  319. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule.es.js.map +1 -1
  320. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-strong.es.js +7 -6
  321. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-strong.es.js.map +1 -1
  322. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.es.js +3 -3
  323. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.es.js.map +1 -1
  324. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-info.es.js +36 -29
  325. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-info.es.js.map +1 -1
  326. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.es.js +8 -6
  327. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.es.js.map +1 -1
  328. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.es.js +15 -10
  329. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.es.js.map +1 -1
  330. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.es.js +14 -12
  331. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.es.js.map +1 -1
  332. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.es.js +17 -11
  333. package/dist/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.es.js.map +1 -1
  334. package/dist/node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.es.js +31 -22
  335. package/dist/node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.es.js.map +1 -1
  336. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.es.js +109 -57
  337. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.es.js.map +1 -1
  338. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.es.js +88 -28
  339. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.es.js.map +1 -1
  340. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.es.js +12 -12
  341. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.es.js.map +1 -1
  342. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.es.js +47 -28
  343. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.es.js.map +1 -1
  344. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.es.js +21 -10
  345. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.es.js.map +1 -1
  346. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.es.js +58 -20
  347. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.es.js.map +1 -1
  348. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.es.js +162 -70
  349. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.es.js.map +1 -1
  350. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.es.js +54 -30
  351. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.es.js.map +1 -1
  352. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.es.js +101 -30
  353. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.es.js.map +1 -1
  354. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/content.es.js +61 -36
  355. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/content.es.js.map +1 -1
  356. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.es.js +66 -52
  357. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.es.js.map +1 -1
  358. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/hard-break-escape.es.js +16 -10
  359. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/hard-break-escape.es.js.map +1 -1
  360. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.es.js +83 -34
  361. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.es.js.map +1 -1
  362. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.es.js +344 -105
  363. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.es.js.map +1 -1
  364. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.es.js +275 -68
  365. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.es.js.map +1 -1
  366. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.es.js +191 -108
  367. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.es.js.map +1 -1
  368. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-image.es.js +25 -14
  369. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-image.es.js.map +1 -1
  370. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-link.es.js +17 -12
  371. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-link.es.js.map +1 -1
  372. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.es.js +11 -8
  373. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.es.js.map +1 -1
  374. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.es.js +110 -65
  375. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.es.js.map +1 -1
  376. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.es.js +75 -37
  377. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.es.js.map +1 -1
  378. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.es.js +33 -16
  379. package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.es.js.map +1 -1
  380. package/dist/node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.es.js +295 -144
  381. package/dist/node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.es.js.map +1 -1
  382. package/dist/node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/lib/syntax.es.js +216 -129
  383. package/dist/node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/lib/syntax.es.js.map +1 -1
  384. package/dist/node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.es.js +76 -45
  385. package/dist/node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.es.js.map +1 -1
  386. package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/edit-map.es.js +37 -28
  387. package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/edit-map.es.js.map +1 -1
  388. package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/infer.es.js +22 -17
  389. package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/infer.es.js.map +1 -1
  390. package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/syntax.es.js +350 -104
  391. package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/syntax.es.js.map +1 -1
  392. package/dist/node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.es.js +59 -27
  393. package/dist/node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.es.js.map +1 -1
  394. package/dist/node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.es.js +14 -14
  395. package/dist/node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.es.js.map +1 -1
  396. package/dist/node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.es.js +83 -20
  397. package/dist/node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.es.js.map +1 -1
  398. package/dist/node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.es.js +51 -16
  399. package/dist/node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.es.js.map +1 -1
  400. package/dist/node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.es.js +19 -10
  401. package/dist/node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.es.js.map +1 -1
  402. package/dist/node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.es.js +56 -17
  403. package/dist/node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.es.js.map +1 -1
  404. package/dist/node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.es.js +18 -8
  405. package/dist/node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.es.js.map +1 -1
  406. package/dist/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.es.js +32 -27
  407. package/dist/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.es.js.map +1 -1
  408. package/dist/node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.es.js +32 -12
  409. package/dist/node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.es.js.map +1 -1
  410. package/dist/node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.es.js +7 -5
  411. package/dist/node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.es.js.map +1 -1
  412. package/dist/node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.es.js +32 -27
  413. package/dist/node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.es.js.map +1 -1
  414. package/dist/node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.es.js +14 -11
  415. package/dist/node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.es.js.map +1 -1
  416. package/dist/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.es.js +16 -13
  417. package/dist/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.es.js.map +1 -1
  418. package/dist/node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.es.js +5 -4
  419. package/dist/node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.es.js.map +1 -1
  420. package/dist/node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.es.js +3 -3
  421. package/dist/node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.es.js.map +1 -1
  422. package/dist/node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.es.js +11 -8
  423. package/dist/node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.es.js.map +1 -1
  424. package/dist/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-sanitize-uri/index.es.js +37 -19
  425. package/dist/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-sanitize-uri/index.es.js.map +1 -1
  426. package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.es.js +149 -47
  427. package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.es.js.map +1 -1
  428. package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.es.js +61 -42
  429. package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.es.js.map +1 -1
  430. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.es.js +88 -80
  431. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.es.js.map +1 -1
  432. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.es.js +247 -150
  433. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.es.js.map +1 -1
  434. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.es.js +39 -23
  435. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.es.js.map +1 -1
  436. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.es.js +151 -91
  437. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.es.js.map +1 -1
  438. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/flow.es.js +29 -20
  439. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/flow.es.js.map +1 -1
  440. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/text.es.js +116 -69
  441. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/text.es.js.map +1 -1
  442. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.es.js +26 -24
  443. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.es.js.map +1 -1
  444. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/postprocess.es.js +6 -6
  445. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/postprocess.es.js.map +1 -1
  446. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/preprocess.es.js +63 -22
  447. package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/preprocess.es.js.map +1 -1
  448. package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.es.js +62 -38
  449. package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.es.js.map +1 -1
  450. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.es.js +49 -35
  451. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.es.js.map +1 -1
  452. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.es.js +49 -43
  453. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.es.js.map +1 -1
  454. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.es.js +363 -241
  455. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.es.js.map +1 -1
  456. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.es.js +14 -12
  457. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.es.js.map +1 -1
  458. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.es.js +9 -7
  459. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.es.js.map +1 -1
  460. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.es.js +8 -4
  461. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.es.js.map +1 -1
  462. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/index.es.js +11 -10
  463. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/index.es.js.map +1 -1
  464. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/aria.es.js +39 -39
  465. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/aria.es.js.map +1 -1
  466. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/find.es.js +31 -24
  467. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/find.es.js.map +1 -1
  468. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/hast-to-react.es.js +2 -2
  469. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/hast-to-react.es.js.map +1 -1
  470. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/html.es.js +94 -94
  471. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/html.es.js.map +1 -1
  472. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/normalize.es.js +3 -3
  473. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/normalize.es.js.map +1 -1
  474. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/svg.es.js +77 -77
  475. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/svg.es.js.map +1 -1
  476. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-insensitive-transform.es.js +4 -4
  477. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-insensitive-transform.es.js.map +1 -1
  478. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-sensitive-transform.es.js +3 -3
  479. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-sensitive-transform.es.js.map +1 -1
  480. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/create.es.js +20 -14
  481. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/create.es.js.map +1 -1
  482. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/defined-info.es.js +20 -15
  483. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/defined-info.es.js.map +1 -1
  484. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/info.es.js +17 -16
  485. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/info.es.js.map +1 -1
  486. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/merge.es.js +10 -7
  487. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/merge.es.js.map +1 -1
  488. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/schema.es.js +11 -7
  489. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/schema.es.js.map +1 -1
  490. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/types.es.js +17 -11
  491. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/types.es.js.map +1 -1
  492. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xlink.es.js +5 -5
  493. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xlink.es.js.map +1 -1
  494. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xml.es.js +5 -5
  495. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xml.es.js.map +1 -1
  496. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xmlns.es.js +5 -5
  497. package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xmlns.es.js.map +1 -1
  498. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.es.js +152 -82
  499. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.es.js.map +1 -1
  500. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.es.js +86 -58
  501. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.es.js.map +1 -1
  502. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.es.js +14 -7
  503. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.es.js.map +1 -1
  504. package/dist/node_modules/.pnpm/react-markdown@10.1.0_@types_react@18.2.0_react@18.2.0/node_modules/react-markdown/lib/index.es.js +102 -55
  505. package/dist/node_modules/.pnpm/react-markdown@10.1.0_@types_react@18.2.0_react@18.2.0/node_modules/react-markdown/lib/index.es.js.map +1 -1
  506. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.es.js +825 -539
  507. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.es.js.map +1 -1
  508. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.es.js +20 -15
  509. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.es.js.map +1 -1
  510. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js +10 -6
  511. package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js.map +1 -1
  512. package/dist/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.es.js +15 -8
  513. package/dist/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.es.js.map +1 -1
  514. package/dist/node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.es.js +11 -11
  515. package/dist/node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.es.js.map +1 -1
  516. package/dist/node_modules/.pnpm/remark-rehype@11.1.2/node_modules/remark-rehype/lib/index.es.js +14 -11
  517. package/dist/node_modules/.pnpm/remark-rehype@11.1.2/node_modules/remark-rehype/lib/index.es.js.map +1 -1
  518. package/dist/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.es.js +3 -3
  519. package/dist/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.es.js.map +1 -1
  520. package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/index.es.js +23 -15
  521. package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/index.es.js.map +1 -1
  522. package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/utilities.es.js +33 -13
  523. package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/utilities.es.js.map +1 -1
  524. package/dist/node_modules/.pnpm/style-to-object@1.0.8/node_modules/style-to-object/cjs/index.es.js +27 -18
  525. package/dist/node_modules/.pnpm/style-to-object@1.0.8/node_modules/style-to-object/cjs/index.es.js.map +1 -1
  526. package/dist/node_modules/.pnpm/trim-lines@3.0.1/node_modules/trim-lines/index.es.js +35 -22
  527. package/dist/node_modules/.pnpm/trim-lines@3.0.1/node_modules/trim-lines/index.es.js.map +1 -1
  528. package/dist/node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.es.js +68 -42
  529. package/dist/node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.es.js.map +1 -1
  530. package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.es.js +13 -8
  531. package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.es.js.map +1 -1
  532. package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js +246 -139
  533. package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js.map +1 -1
  534. package/dist/node_modules/.pnpm/unist-util-is@6.0.0/node_modules/unist-util-is/lib/index.es.js +59 -50
  535. package/dist/node_modules/.pnpm/unist-util-is@6.0.0/node_modules/unist-util-is/lib/index.es.js.map +1 -1
  536. package/dist/node_modules/.pnpm/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.es.js +20 -16
  537. package/dist/node_modules/.pnpm/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.es.js.map +1 -1
  538. package/dist/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.es.js +21 -9
  539. package/dist/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.es.js.map +1 -1
  540. package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/color.es.js +3 -3
  541. package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/color.es.js.map +1 -1
  542. package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.es.js +65 -38
  543. package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.es.js.map +1 -1
  544. package/dist/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/lib/index.es.js +24 -12
  545. package/dist/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/lib/index.es.js.map +1 -1
  546. package/dist/node_modules/.pnpm/vfile-message@4.0.2/node_modules/vfile-message/lib/index.es.js +77 -30
  547. package/dist/node_modules/.pnpm/vfile-message@4.0.2/node_modules/vfile-message/lib/index.es.js.map +1 -1
  548. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.es.js +116 -60
  549. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.es.js.map +1 -1
  550. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.browser.es.js +181 -79
  551. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.browser.es.js.map +1 -1
  552. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.browser.es.js +3 -3
  553. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.browser.es.js.map +1 -1
  554. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.browser.es.js +32 -27
  555. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.browser.es.js.map +1 -1
  556. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.es.js +6 -4
  557. package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.es.js.map +1 -1
  558. package/dist/utils/funASR/funASRManager.es.js +109 -68
  559. package/dist/utils/funASR/funASRManager.es.js.map +1 -1
  560. package/dist/utils/funASR/pcm.es.js +51 -36
  561. package/dist/utils/funASR/pcm.es.js.map +1 -1
  562. package/dist/utils/funASR/recorder.es.js +1048 -542
  563. package/dist/utils/funASR/recorder.es.js.map +1 -1
  564. package/dist/utils/funASR/wav.es.js +46 -20
  565. package/dist/utils/funASR/wav.es.js.map +1 -1
  566. package/dist/utils/funASR/wsConnecter.es.js +79 -44
  567. package/dist/utils/funASR/wsConnecter.es.js.map +1 -1
  568. package/dist/utils/xunFeiVoice/RecorderManager/RecorderManager.es.js +126 -78
  569. package/dist/utils/xunFeiVoice/RecorderManager/RecorderManager.es.js.map +1 -1
  570. package/dist/utils/xunFeiVoice/RecorderManager/processorSource/processor.worker.es.js +2 -207
  571. package/dist/utils/xunFeiVoice/RecorderManager/processorSource/processor.worker.es.js.map +1 -1
  572. package/dist/utils/xunFeiVoice/RecorderManager/processorSource/processor.worklet.es.js +2 -2
  573. package/dist/utils/xunFeiVoice/RecorderManager/processorSource/processor.worklet.es.js.map +1 -1
  574. package/dist/utils/xunFeiVoice/XFStreamVoiceManager.d.ts +4 -0
  575. package/dist/utils/xunFeiVoice/XFStreamVoiceManager.es.js +207 -131
  576. package/dist/utils/xunFeiVoice/XFStreamVoiceManager.es.js.map +1 -1
  577. package/dist/utils/xunFeiVoice/utils.es.js +9 -7
  578. package/dist/utils/xunFeiVoice/utils.es.js.map +1 -1
  579. package/package.json +1 -1
@@ -1,184 +1,260 @@
1
- var m = Object.defineProperty;
2
- var p = (i, e, t) => e in i ? m(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var o = (i, e, t) => p(i, typeof e != "symbol" ? e + "" : e, t);
4
- import c from "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.es.js";
5
- import { toBase64 as S } from "./utils.es.js";
6
- import { RecorderManager as w } from "./RecorderManager/RecorderManager.es.js";
7
- let d = 0;
8
- const T = "93b73e33", y = "ZGJhMzQ5ZTJlMDgyYmE1ZTFlZDlmYjg0", R = "fe43de7a071e3a32ec03c6f09fe7bedf";
9
- function x() {
10
- const i = "wss://iat-api.xfyun.cn/v2/iat", e = "iat-api.xfyun.cn", t = R, r = y, s = (/* @__PURE__ */ new Date()).toUTCString(), n = "hmac-sha256", a = "host date request-line", h = `host: ${e}
11
- date: ${s}
12
- GET /v2/iat HTTP/1.1`, l = c.HmacSHA256(h, r), u = c.enc.Base64.stringify(l), g = `api_key="${t}", algorithm="${n}", headers="${a}", signature="${u}"`, f = window.btoa(g);
13
- return `${i}?authorization=${f}&date=${s}&host=${e}`;
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import CryptoJS from "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.es.js";
5
+ import { toBase64 } from "./utils.es.js";
6
+ import { RecorderManager } from "./RecorderManager/RecorderManager.es.js";
7
+ let startCount = 0;
8
+ const APPID = "93b73e33";
9
+ const API_SECRET = "ZGJhMzQ5ZTJlMDgyYmE1ZTFlZDlmYjg0";
10
+ const API_KEY = "fe43de7a071e3a32ec03c6f09fe7bedf";
11
+ function getWebSocketUrl() {
12
+ const url = "wss://iat-api.xfyun.cn/v2/iat";
13
+ const host = "iat-api.xfyun.cn";
14
+ const apiKey = API_KEY;
15
+ const apiSecret = API_SECRET;
16
+ const date = (/* @__PURE__ */ new Date()).toUTCString();
17
+ const algorithm = "hmac-sha256";
18
+ const headers = "host date request-line";
19
+ const signatureOrigin = `host: ${host}
20
+ date: ${date}
21
+ GET /v2/iat HTTP/1.1`;
22
+ const signatureSha = CryptoJS.HmacSHA256(signatureOrigin, apiSecret);
23
+ const signature = CryptoJS.enc.Base64.stringify(signatureSha);
24
+ const authorizationOrigin = `api_key="${apiKey}", algorithm="${algorithm}", headers="${headers}", signature="${signature}"`;
25
+ const authorization = window.btoa(authorizationOrigin);
26
+ return `${url}?authorization=${authorization}&date=${date}&host=${host}`;
14
27
  }
15
- class D {
16
- constructor(e) {
17
- o(this, "wsInstance", null);
18
- o(this, "recorder", null);
19
- o(this, "isDestroy", !1);
20
- o(this, "resultText", "");
21
- o(this, "resultTextTemp", "");
22
- o(this, "continueRecord", !1);
23
- o(this, "startTimeStamp", 0);
24
- o(this, "recordStatus", "stop");
25
- o(this, "readyToSend", !1);
26
- this.config = e, this.initializeRecorder();
28
+ class XFStreamVoiceManager {
29
+ constructor(config) {
30
+ __publicField(this, "wsInstance", null);
31
+ __publicField(this, "recorder", null);
32
+ __publicField(this, "isDestroy", false);
33
+ __publicField(this, "resultText", "");
34
+ __publicField(this, "resultTextTemp", "");
35
+ __publicField(this, "continueRecord", false);
36
+ __publicField(this, "startTimeStamp", 0);
37
+ __publicField(this, "recordStatus", "stop");
38
+ __publicField(this, "readyToSend", false);
39
+ this.config = config;
40
+ this.initializeRecorder();
27
41
  }
28
- renderResult(e) {
29
- const t = JSON.parse(e);
30
- if (t.data && t.data.result) {
31
- const r = t.data.result;
32
- let s = "";
33
- const n = r.ws;
34
- for (let a = 0; a < n.length; a++)
35
- s = s + n[a].cw[0].w;
36
- r.pgs ? (r.pgs === "apd" && (this.resultText = this.resultTextTemp), this.resultTextTemp = this.resultText + s) : this.resultText = this.resultText + s;
42
+ renderResult(resultData) {
43
+ const jsonData = JSON.parse(resultData);
44
+ if (jsonData.data && jsonData.data.result) {
45
+ const data = jsonData.data.result;
46
+ let str = "";
47
+ const ws = data.ws;
48
+ for (let i = 0; i < ws.length; i++) {
49
+ str = str + ws[i].cw[0].w;
50
+ }
51
+ if (data.pgs) {
52
+ if (data.pgs === "apd") {
53
+ this.resultText = this.resultTextTemp;
54
+ }
55
+ this.resultTextTemp = this.resultText + str;
56
+ } else {
57
+ this.resultText = this.resultText + str;
58
+ }
37
59
  }
38
- if (t.code === 0 && t.data.status === 2) {
60
+ if (jsonData.code === 0 && jsonData.data.status === 2) {
39
61
  this.config.onMessage({
40
62
  message: this.resultText,
41
- isLatest: !0,
63
+ isLatest: true,
42
64
  tempMessage: this.resultTextTemp
43
- }), this.closeWs();
65
+ });
66
+ this.closeWs();
44
67
  return;
45
68
  }
46
- t.code === 0 && t.data.status === 1 && this.config.onMessage({
47
- message: this.resultText,
48
- isLatest: !1,
49
- tempMessage: this.resultTextTemp
50
- }), t.code !== 0 && (this.closeWs(), this.config.onError({ type: "message", message: e }));
69
+ if (jsonData.code === 0 && jsonData.data.status === 1) {
70
+ this.config.onMessage({
71
+ message: this.resultText,
72
+ isLatest: false,
73
+ tempMessage: this.resultTextTemp
74
+ });
75
+ }
76
+ if (jsonData.code !== 0) {
77
+ this.closeWs();
78
+ this.config.onError({ type: "message", message: resultData });
79
+ }
51
80
  }
52
- setConfig(e) {
53
- var t;
81
+ setConfig(newConfig) {
82
+ var _a;
54
83
  this.config = {
55
84
  ...this.config,
56
- ...e
57
- }, (t = this.recorder) == null || t.close(), this.initializeRecorder();
85
+ ...newConfig
86
+ };
87
+ (_a = this.recorder) == null ? void 0 : _a.close();
88
+ this.initializeRecorder();
58
89
  }
59
- sendMessage(e) {
60
- var t;
61
- ((t = this.wsInstance) == null ? void 0 : t.readyState) === WebSocket.OPEN && this.readyToSend && this.wsInstance.send(e);
90
+ sendMessage(message) {
91
+ var _a;
92
+ if (((_a = this.wsInstance) == null ? void 0 : _a.readyState) === WebSocket.OPEN && this.readyToSend) {
93
+ this.wsInstance.send(message);
94
+ }
62
95
  }
63
96
  async recordConfigSend() {
64
- var e;
65
- if (!this.isDestroy) {
66
- if (this.recordStatus === "stop") {
67
- this.closeWs();
68
- return;
69
- }
70
- try {
71
- await ((e = this.recorder) == null ? void 0 : e.start({
72
- sampleRate: 16e3,
73
- frameSize: 1280
74
- }));
75
- const t = {
76
- common: {
77
- app_id: T
78
- },
79
- business: {
80
- language: "zh_cn",
81
- domain: "iat",
82
- accent: "mandarin",
83
- vad_eos: 5e3,
84
- dwa: "wpgs"
85
- },
86
- data: {
87
- status: 0,
88
- format: "audio/L16;rate=16000",
89
- encoding: "raw"
90
- }
91
- };
92
- this.readyToSend = !0, this.sendMessage(JSON.stringify(t));
93
- } catch (t) {
94
- console.error("record error:", t), this.config.onError({ type: "record", message: "录音失败, 请检查权限!" });
95
- }
97
+ var _a;
98
+ if (this.isDestroy) {
99
+ return;
100
+ }
101
+ if (this.recordStatus === "stop") {
102
+ this.closeWs();
103
+ return;
104
+ }
105
+ try {
106
+ await ((_a = this.recorder) == null ? void 0 : _a.start({
107
+ sampleRate: 16e3,
108
+ frameSize: 1280
109
+ }));
110
+ const params = {
111
+ common: {
112
+ app_id: this.config.xunFeiAppId || APPID
113
+ },
114
+ business: {
115
+ language: "zh_cn",
116
+ domain: "iat",
117
+ accent: "mandarin",
118
+ vad_eos: 5e3,
119
+ dwa: "wpgs"
120
+ },
121
+ data: {
122
+ status: 0,
123
+ format: "audio/L16;rate=16000",
124
+ encoding: "raw"
125
+ }
126
+ };
127
+ this.readyToSend = true;
128
+ this.sendMessage(JSON.stringify(params));
129
+ } catch (error) {
130
+ console.error("record error:", error);
131
+ this.config.onError({ type: "record", message: "录音失败, 请检查权限!" });
96
132
  }
97
133
  }
98
134
  startNewSocket() {
99
- var t, r;
135
+ var _a, _b;
100
136
  console.log(
101
137
  "%c ❤️ love ==== start new socket:",
102
138
  "color: red; font-size: 16px;",
103
- d,
104
- (/* @__PURE__ */ new Date()).toUTCString()
105
- ), d++;
106
- const e = ((r = (t = this.config).getWebSocketUrl) == null ? void 0 : r.call(t)) || x();
107
- if ("WebSocket" in window)
108
- this.wsInstance = new WebSocket(e);
109
- else {
139
+ startCount,
140
+ (/* @__PURE__ */ new Date()).toLocaleString()
141
+ );
142
+ startCount++;
143
+ const websocketUrl = ((_b = (_a = this.config).getWebSocketUrl) == null ? void 0 : _b.call(_a)) || getWebSocketUrl();
144
+ if ("WebSocket" in window) {
145
+ this.wsInstance = new WebSocket(websocketUrl);
146
+ } else {
110
147
  this.config.onError({ type: "socketConnect", message: "浏览器不支持 WebSocket" });
111
148
  return;
112
149
  }
113
- this.wsInstance.onmessage = (s) => {
114
- this.renderResult(s.data);
115
- }, this.wsInstance.onerror = (s) => {
116
- console.error("socket error:", s);
117
- }, this.wsInstance.onclose = async () => {
118
- var s;
119
- this.config.onWsClose(), this.continueRecord && (this.readyToSend = !1, await ((s = this.recorder) == null ? void 0 : s.close()), this.startRecord());
120
- }, this.wsInstance.onopen = () => {
150
+ this.wsInstance.onmessage = (e) => {
151
+ this.renderResult(e.data);
152
+ };
153
+ this.wsInstance.onerror = (e) => {
154
+ console.error("socket error:", e);
155
+ };
156
+ this.wsInstance.onclose = async () => {
157
+ var _a2;
158
+ this.config.onWsClose();
159
+ if (this.continueRecord) {
160
+ this.readyToSend = false;
161
+ await ((_a2 = this.recorder) == null ? void 0 : _a2.close());
162
+ this.startRecord();
163
+ }
164
+ };
165
+ this.wsInstance.onopen = () => {
121
166
  this.recordConfigSend();
122
167
  };
123
168
  }
124
- onFrameRecorded({ isLastFrame: e, frameBuffer: t }) {
125
- this.isDestroy || this.wsInstance && (this.wsInstance.readyState === this.wsInstance.OPEN && this.sendMessage(
126
- JSON.stringify({
127
- data: {
128
- status: e ? 2 : 1,
129
- format: "audio/L16;rate=16000",
130
- encoding: "raw",
131
- audio: S(t)
132
- }
133
- })
134
- ), e && (this.readyToSend = !1));
169
+ onFrameRecorded({ isLastFrame, frameBuffer }) {
170
+ if (this.isDestroy) {
171
+ return;
172
+ }
173
+ if (!this.wsInstance) {
174
+ return;
175
+ }
176
+ if (this.wsInstance.readyState === this.wsInstance.OPEN) {
177
+ this.sendMessage(
178
+ JSON.stringify({
179
+ data: {
180
+ status: isLastFrame ? 2 : 1,
181
+ format: "audio/L16;rate=16000",
182
+ encoding: "raw",
183
+ audio: toBase64(frameBuffer)
184
+ }
185
+ })
186
+ );
187
+ }
188
+ if (isLastFrame) {
189
+ this.readyToSend = false;
190
+ }
135
191
  }
136
192
  initializeRecorder() {
137
- this.recorder = new w(), this.recorder.onFrameRecorded = (e) => {
138
- this.onFrameRecorded(e);
139
- }, this.recorder.onLastFrame = (e) => {
140
- var t, r;
141
- (r = (t = this.config).onLastFrame) == null || r.call(t, e);
142
- }, this.recorder.onStop = () => {
143
- var e, t;
144
- (t = (e = this.config).onRecordStop) == null || t.call(e);
145
- }, this.recorder.onStart = () => {
146
- var e, t;
147
- (t = (e = this.config).onRecordStart) == null || t.call(e);
193
+ this.recorder = new RecorderManager();
194
+ this.recorder.onFrameRecorded = (data) => {
195
+ this.onFrameRecorded(data);
196
+ };
197
+ this.recorder.onLastFrame = (data) => {
198
+ var _a, _b;
199
+ (_b = (_a = this.config).onLastFrame) == null ? void 0 : _b.call(_a, data);
200
+ };
201
+ this.recorder.onStop = () => {
202
+ var _a, _b;
203
+ (_b = (_a = this.config).onRecordStop) == null ? void 0 : _b.call(_a);
204
+ };
205
+ this.recorder.onStart = () => {
206
+ var _a, _b;
207
+ (_b = (_a = this.config).onRecordStart) == null ? void 0 : _b.call(_a);
148
208
  };
149
209
  }
150
210
  startRecord() {
151
- this.isDestroy || (this.recordStatus = "start", this.startTimeStamp = Date.now(), this.resultText = "", this.resultTextTemp = "", this.startNewSocket());
211
+ if (this.isDestroy) {
212
+ return;
213
+ }
214
+ this.recordStatus = "start";
215
+ this.startTimeStamp = Date.now();
216
+ this.resultText = "";
217
+ this.resultTextTemp = "";
218
+ this.startNewSocket();
152
219
  }
153
220
  async stopRecord() {
154
- var e, t;
155
- this.recordStatus = "stop", console.log("stop record ====", Date.now() - this.startTimeStamp, (e = this.recorder) == null ? void 0 : e.status), (t = this.recorder) == null || t.stop(), setTimeout(() => {
221
+ var _a, _b;
222
+ this.recordStatus = "stop";
223
+ console.log("stop record ====", Date.now() - this.startTimeStamp, (_a = this.recorder) == null ? void 0 : _a.status);
224
+ (_b = this.recorder) == null ? void 0 : _b.stop();
225
+ setTimeout(() => {
156
226
  this.closeWs();
157
227
  }, 3e3);
158
228
  }
159
229
  closeWs() {
160
- var e, t;
161
- if (((e = this.wsInstance) == null ? void 0 : e.readyState) !== WebSocket.CLOSED)
230
+ var _a, _b;
231
+ if (((_a = this.wsInstance) == null ? void 0 : _a.readyState) !== WebSocket.CLOSED) {
162
232
  try {
163
- (t = this.wsInstance) == null || t.close();
233
+ (_b = this.wsInstance) == null ? void 0 : _b.close();
164
234
  } catch {
165
235
  }
236
+ }
166
237
  }
167
238
  /** 开启持续监听 */
168
239
  startContinueRecord() {
169
- this.continueRecord = !0, this.startRecord();
240
+ this.continueRecord = true;
241
+ this.startRecord();
170
242
  }
171
243
  stopContinueRecord() {
172
- this.continueRecord = !1, this.stopRecord();
244
+ this.continueRecord = false;
245
+ this.stopRecord();
173
246
  }
174
247
  destroy() {
175
- this.isDestroy = !0, setTimeout(() => {
176
- var e, t;
177
- this.closeWs(), (e = this.recorder) == null || e.stop(), (t = this.recorder) == null || t.destroy();
248
+ this.isDestroy = true;
249
+ setTimeout(() => {
250
+ var _a, _b;
251
+ this.closeWs();
252
+ (_a = this.recorder) == null ? void 0 : _a.stop();
253
+ (_b = this.recorder) == null ? void 0 : _b.destroy();
178
254
  }, 100);
179
255
  }
180
256
  }
181
257
  export {
182
- D as XFStreamVoiceManager
258
+ XFStreamVoiceManager
183
259
  };
184
260
  //# sourceMappingURL=XFStreamVoiceManager.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"XFStreamVoiceManager.es.js","sources":["../../../src/utils/xunFeiVoice/XFStreamVoiceManager.ts"],"sourcesContent":["import CryptoJS from 'crypto-js';\nimport { RecorderManager } from './RecorderManager';\nimport type { OnMessageInfo, RecordFrameInfo } from './types';\nimport { toBase64 } from './utils';\n\ntype errorType = 'socketConnect' | 'message' | 'record';\nlet startCount = 0;\n\nexport interface XFStreamVoiceManagerConfig {\n onError: (errInfo: { type: errorType; message: string }) => void;\n /** ws 收到消息的回调\n * @param info.message 消息内容\n * @param info.isLatest 是否是最后一条消息。 isLatest 为 true 时, message 为完整的语音识别结果。\n */\n onMessage: (info: OnMessageInfo) => void;\n /** webSocket 关闭的回调。\n * 每次录音都会新建一个 webSocket 连接。录音结束后关闭 webSocket\n */\n onWsClose: () => void;\n /**\n * 录音开始的回调\n */\n onRecordStart?: () => void;\n /**\n * 录音开始的回调\n */\n onRecordStop?: () => void;\n /**\n * 录音最后一帧的回调。\n * @param totalData 所有的录音数据, ArrayBuffer[]。\n */\n onLastFrame?: (totalData: ArrayBuffer[]) => void;\n /**\n * 获取链接讯飞语音识别地址的 url\n * @returns websocket url。详情查看讯飞文档里的鉴权方法:https://www.xfyun.cn/doc/asr/voicedictation/API.html#%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E6%B5%81%E7%A8%8B\n */\n getWebSocketUrl?: () => string;\n}\n\n/** 现在前端mock,后续移到接口下发 */\nconst APPID = '93b73e33';\nconst API_SECRET = 'ZGJhMzQ5ZTJlMDgyYmE1ZTFlZDlmYjg0';\nconst API_KEY = 'fe43de7a071e3a32ec03c6f09fe7bedf';\n/**\n * 获取websocket url\n * 该接口需要后端提供,这里为了方便前端处理\n */\nfunction getWebSocketUrl() {\n // 请求地址根据语种不同变化\n const url = 'wss://iat-api.xfyun.cn/v2/iat';\n const host = 'iat-api.xfyun.cn';\n const apiKey = API_KEY;\n const apiSecret = API_SECRET;\n const date = new Date().toUTCString();\n const algorithm = 'hmac-sha256';\n const headers = 'host date request-line';\n const signatureOrigin = `host: ${host}\\ndate: ${date}\\nGET /v2/iat HTTP/1.1`;\n const signatureSha = CryptoJS.HmacSHA256(signatureOrigin, apiSecret);\n const signature = CryptoJS.enc.Base64.stringify(signatureSha);\n const authorizationOrigin = `api_key=\"${apiKey}\", algorithm=\"${algorithm}\", headers=\"${headers}\", signature=\"${signature}\"`;\n const authorization = window.btoa(authorizationOrigin);\n return `${url}?authorization=${authorization}&date=${date}&host=${host}`;\n}\n\n/**\n * 讯飞流式语音识别\n * 大致流程:\n * 1. recorder start 后开始接受录音,通过 recorder.onFrameRecorded 把数据透出给上层。数据中 isLastFrame 表示是否最后一次数据, frameBuffer 表示真实数据。\n * 2. 上层拿到录音数据后,通过 ws 发送给讯飞。如果 isLastFrame 为 true 时,给讯飞的数据中 status 为 2。如果 isLastFrame 为 false 时,给讯飞的数据中 status 为 1。\n * 3. ws 返回的数据,通过 renderResult 处理。数据中 status 为 2 表示本次录音数据识别结束了,这时候需要关闭 ws,避免消耗资源。且这两个情况服务端会主动断开连接(整个会话时长最多持续60s,或者超过10s未发送数据)。\n * 讯飞流式语音文档:https://www.xfyun.cn/doc/asr/voicedictation/API.html#%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E6%B5%81%E7%A8%8B\n * 4. 断开链接后会关闭 recorder ,重置录音等数据,方便下次使用。\n * 备注:使用时,建议在收到 onWsClose 事件后,才让前端恢复到可以再次输入录音的状态\n */\nexport class XFStreamVoiceManager {\n wsInstance: WebSocket | null = null;\n recorder: RecorderManager | null = null;\n isDestroy = false;\n resultText = '';\n resultTextTemp = '';\n continueRecord = false;\n startTimeStamp = 0;\n recordStatus: 'start' | 'stop' = 'stop';\n readyToSend = false;\n\n constructor(public config: XFStreamVoiceManagerConfig) {\n this.initializeRecorder();\n }\n renderResult(resultData: string) {\n // 识别结束\n const jsonData = JSON.parse(resultData);\n if (jsonData.data && jsonData.data.result) {\n const data = jsonData.data.result;\n let str = '';\n const ws = data.ws;\n for (let i = 0; i < ws.length; i++) {\n str = str + ws[i].cw[0].w;\n }\n // 开启 wpgs 会有此字段(前提:在控制台开通动态修正功能)\n // 取值为 \"apd\"时表示该片结果是追加到前面的最终结果;取值为\"rpl\" 时表示替换前面的部分结果,替换范围为rg字段\n if (data.pgs) {\n if (data.pgs === 'apd') {\n // 将resultTextTemp同步给resultText\n this.resultText = this.resultTextTemp;\n }\n // 将结果存储在resultTextTemp中\n this.resultTextTemp = this.resultText + str;\n } else {\n this.resultText = this.resultText + str;\n }\n }\n /**\n * 识别结果是否结束标识:\n * 0:识别的第一块结果。\n * 1:识别中间结果。\n * 2:识别最后一块结果\n */\n if (jsonData.code === 0 && jsonData.data.status === 2) {\n this.config.onMessage({\n message: this.resultText,\n isLatest: true,\n tempMessage: this.resultTextTemp,\n });\n this.closeWs();\n return;\n }\n if (jsonData.code === 0 && jsonData.data.status === 1) {\n this.config.onMessage({\n message: this.resultText,\n isLatest: false,\n tempMessage: this.resultTextTemp,\n });\n }\n // code 不为0时表示出错\n if (jsonData.code !== 0) {\n this.closeWs();\n this.config.onError({ type: 'message', message: resultData });\n }\n }\n\n setConfig(newConfig: XFStreamVoiceManagerConfig) {\n this.config = {\n ...this.config,\n ...newConfig,\n };\n this.recorder?.close();\n this.initializeRecorder();\n }\n sendMessage(message: string) {\n if (this.wsInstance?.readyState === WebSocket.OPEN && this.readyToSend) {\n this.wsInstance.send(message);\n }\n }\n\n async recordConfigSend() {\n if (this.isDestroy) {\n return;\n }\n if (this.recordStatus === 'stop') {\n this.closeWs();\n return;\n }\n try {\n // 开始录音\n await this.recorder?.start({\n sampleRate: 16000,\n frameSize: 1280,\n });\n const params = {\n common: {\n app_id: APPID,\n },\n business: {\n language: 'zh_cn',\n domain: 'iat',\n accent: 'mandarin',\n vad_eos: 5000,\n dwa: 'wpgs',\n },\n data: {\n status: 0,\n format: 'audio/L16;rate=16000',\n encoding: 'raw',\n },\n };\n this.readyToSend = true;\n this.sendMessage(JSON.stringify(params));\n } catch (error) {\n console.error('record error:', error);\n this.config.onError({ type: 'record', message: '录音失败, 请检查权限!' });\n }\n }\n\n startNewSocket() {\n console.log(\n '%c ❤️ love ==== start new socket:',\n 'color: red; font-size: 16px;',\n startCount,\n new Date().toUTCString(),\n );\n startCount++;\n const websocketUrl = this.config.getWebSocketUrl?.() || getWebSocketUrl();\n if ('WebSocket' in window) {\n this.wsInstance = new WebSocket(websocketUrl);\n } else {\n this.config.onError({ type: 'socketConnect', message: '浏览器不支持 WebSocket' });\n return;\n }\n this.wsInstance.onmessage = (e) => {\n // 处理返回数据\n this.renderResult(e.data);\n };\n this.wsInstance.onerror = (e) => {\n console.error('socket error:', e);\n };\n this.wsInstance.onclose = async () => {\n this.config.onWsClose();\n if (this.continueRecord) {\n this.readyToSend = false;\n await this.recorder?.close();\n this.startRecord();\n }\n };\n this.wsInstance.onopen = () => {\n this.recordConfigSend();\n };\n }\n\n onFrameRecorded({ isLastFrame, frameBuffer }: RecordFrameInfo) {\n if (this.isDestroy) {\n return;\n }\n if (!this.wsInstance) {\n return;\n }\n if (this.wsInstance.readyState === this.wsInstance.OPEN) {\n this.sendMessage(\n JSON.stringify({\n data: {\n status: isLastFrame ? 2 : 1,\n format: 'audio/L16;rate=16000',\n encoding: 'raw',\n audio: toBase64(frameBuffer),\n },\n }),\n );\n }\n if (isLastFrame) {\n this.readyToSend = false;\n }\n }\n\n initializeRecorder() {\n this.recorder = new RecorderManager();\n this.recorder.onFrameRecorded = (data: RecordFrameInfo) => {\n this.onFrameRecorded(data);\n };\n this.recorder.onLastFrame = (data: ArrayBuffer[]) => {\n this.config.onLastFrame?.(data);\n };\n this.recorder.onStop = () => {\n this.config.onRecordStop?.();\n };\n this.recorder.onStart = () => {\n this.config.onRecordStart?.();\n };\n }\n\n startRecord() {\n if (this.isDestroy) {\n return;\n }\n this.recordStatus = 'start';\n this.startTimeStamp = Date.now();\n this.resultText = '';\n this.resultTextTemp = '';\n this.startNewSocket();\n }\n\n async stopRecord() {\n this.recordStatus = 'stop';\n console.log('stop record ====', Date.now() - this.startTimeStamp, this.recorder?.status);\n this.recorder?.stop();\n // 如果 recorder 还没有初始化完成就关闭了,那么需要手动关闭 ws,否则在收到最后一帧消息时关闭ws\n // if (this.recorder?.status !== 'initialized') {\n // this.closeWs();\n // }\n // 这里为了防止 ws 没有返回结束的数据,导致 ws 一直没关,所以加个定时器,5s 后手动关闭\n setTimeout(() => {\n this.closeWs();\n }, 3000);\n }\n\n closeWs() {\n if (this.wsInstance?.readyState !== WebSocket.CLOSED) {\n try {\n this.wsInstance?.close();\n } catch {\n // 有的浏览器在 ws 为 connecting 的时候 close 会报错,这里忽略掉\n }\n }\n }\n /** 开启持续监听 */\n startContinueRecord() {\n this.continueRecord = true;\n this.startRecord();\n }\n\n stopContinueRecord() {\n this.continueRecord = false;\n this.stopRecord();\n }\n\n destroy() {\n this.isDestroy = true;\n setTimeout(() => {\n this.closeWs();\n this.recorder?.stop();\n this.recorder?.destroy();\n }, 100);\n }\n}\n"],"names":["startCount","APPID","API_SECRET","API_KEY","getWebSocketUrl","url","host","apiKey","apiSecret","date","algorithm","headers","signatureOrigin","signatureSha","CryptoJS","signature","authorizationOrigin","authorization","XFStreamVoiceManager","config","__publicField","resultData","jsonData","data","str","ws","i","newConfig","_a","message","params","error","websocketUrl","_b","e","isLastFrame","frameBuffer","toBase64","RecorderManager"],"mappings":";;;;;;AAMA,IAAIA,IAAa;AAkCjB,MAAMC,IAAQ,YACRC,IAAa,oCACbC,IAAU;AAKhB,SAASC,IAAkB;AAEzB,QAAMC,IAAM,iCACNC,IAAO,oBACPC,IAASJ,GACTK,IAAYN,GACZO,KAAO,oBAAI,KAAK,GAAE,YAAY,GAC9BC,IAAY,eACZC,IAAU,0BACVC,IAAkB,SAASN,CAAI;AAAA,QAAWG,CAAI;AAAA,uBAC9CI,IAAeC,EAAS,WAAWF,GAAiBJ,CAAS,GAC7DO,IAAYD,EAAS,IAAI,OAAO,UAAUD,CAAY,GACtDG,IAAsB,YAAYT,CAAM,iBAAiBG,CAAS,eAAeC,CAAO,iBAAiBI,CAAS,KAClHE,IAAgB,OAAO,KAAKD,CAAmB;AACrD,SAAO,GAAGX,CAAG,kBAAkBY,CAAa,SAASR,CAAI,SAASH,CAAI;AACxE;AAYO,MAAMY,EAAqB;AAAA,EAWhC,YAAmBC,GAAoC;AAVvD,IAAAC,EAAA,oBAA+B;AAC/B,IAAAA,EAAA,kBAAmC;AACnC,IAAAA,EAAA,mBAAY;AACZ,IAAAA,EAAA,oBAAa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AL;AAAA,IACF;AAAA,EAAA;AAAA,EAGF,cAAc;AACZ,IAAI,KAAK,cAGT,KAAK,eAAe,SACf,KAAA,iBAAiB,KAAK,IAAI,GAC/B,KAAK,aAAa,IAClB,KAAK,iBAAiB,IACtB,KAAK,eAAe;AAAA,EAAA;AAAA,EAGtB,MAAM,aAAa;;AACjB,SAAK,eAAe,QACZ,QAAA,IAAI,qBAAqB,KAAK,IAAA,IAAQ,KAAK,iBAAgBA,IAAA,KAAK,aAAL,gBAAAA,EAAe,MAAM,IACxFK,IAAA,KAAK,aAAL,QAAAA,EAAe,QAMf,WAAW,MAAM;AACf,WAAK,QAAQ;AAAA,OACZ,GAAI;AAAA,EAAA;AAAA,EAGT,UAAU;;AACR,UAAIL,IAAA,KAAK,eAAL,gBAAAA,EAAiB,gBAAe,UAAU;AACxC,UAAA;AACF,SAAAK,IAAA,KAAK,eAAL,QAAAA,EAAiB;AAAA,MAAM,QACjB;AAAA,MAAA;AAAA,EAGV;AAAA;AAAA,EAGF,sBAAsB;AACpB,SAAK,iBAAiB,IACtB,KAAK,YAAY;AAAA,EAAA;AAAA,EAGnB,qBAAqB;AACnB,SAAK,iBAAiB,IACtB,KAAK,WAAW;AAAA,EAAA;AAAA,EAGlB,UAAU;AACR,SAAK,YAAY,IACjB,WAAW,MAAM;;AACf,WAAK,QAAQ,IACbL,IAAA,KAAK,aAAL,QAAAA,EAAe,SACfK,IAAA,KAAK,aAAL,QAAAA,EAAe;AAAA,OACd,GAAG;AAAA,EAAA;AAEV;"}
1
+ {"version":3,"file":"XFStreamVoiceManager.es.js","sources":["../../../src/utils/xunFeiVoice/XFStreamVoiceManager.ts"],"sourcesContent":["import CryptoJS from 'crypto-js';\nimport { RecorderManager } from './RecorderManager';\nimport type { OnMessageInfo, RecordFrameInfo } from './types';\nimport { toBase64 } from './utils';\n\ntype errorType = 'socketConnect' | 'message' | 'record';\nlet startCount = 0;\n\nexport interface XFStreamVoiceManagerConfig {\n onError: (errInfo: { type: errorType; message: string }) => void;\n /** ws 收到消息的回调\n * @param info.message 消息内容\n * @param info.isLatest 是否是最后一条消息。 isLatest 为 true 时, message 为完整的语音识别结果。\n */\n onMessage: (info: OnMessageInfo) => void;\n /** webSocket 关闭的回调。\n * 每次录音都会新建一个 webSocket 连接。录音结束后关闭 webSocket\n */\n onWsClose: () => void;\n /**\n * 录音开始的回调\n */\n onRecordStart?: () => void;\n /**\n * 录音开始的回调\n */\n onRecordStop?: () => void;\n /**\n * 录音最后一帧的回调。\n * @param totalData 所有的录音数据, ArrayBuffer[]。\n */\n onLastFrame?: (totalData: ArrayBuffer[]) => void;\n /**\n * 获取链接讯飞语音识别地址的 url\n * @returns websocket url。详情查看讯飞文档里的鉴权方法:https://www.xfyun.cn/doc/asr/voicedictation/API.html#%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E6%B5%81%E7%A8%8B\n */\n getWebSocketUrl?: () => string;\n /**\n * 讯飞语音的 appid\n */\n xunFeiAppId: string;\n}\n\n/** 现在前端mock,后续移到接口下发 */\nconst APPID = '93b73e33';\nconst API_SECRET = 'ZGJhMzQ5ZTJlMDgyYmE1ZTFlZDlmYjg0';\nconst API_KEY = 'fe43de7a071e3a32ec03c6f09fe7bedf';\n/**\n * 获取websocket url\n * 该接口需要后端提供,这里为了方便前端处理\n */\nfunction getWebSocketUrl() {\n // 请求地址根据语种不同变化\n const url = 'wss://iat-api.xfyun.cn/v2/iat';\n const host = 'iat-api.xfyun.cn';\n const apiKey = API_KEY;\n const apiSecret = API_SECRET;\n const date = new Date().toUTCString();\n const algorithm = 'hmac-sha256';\n const headers = 'host date request-line';\n const signatureOrigin = `host: ${host}\\ndate: ${date}\\nGET /v2/iat HTTP/1.1`;\n const signatureSha = CryptoJS.HmacSHA256(signatureOrigin, apiSecret);\n const signature = CryptoJS.enc.Base64.stringify(signatureSha);\n const authorizationOrigin = `api_key=\"${apiKey}\", algorithm=\"${algorithm}\", headers=\"${headers}\", signature=\"${signature}\"`;\n const authorization = window.btoa(authorizationOrigin);\n return `${url}?authorization=${authorization}&date=${date}&host=${host}`;\n}\n\n/**\n * 讯飞流式语音识别\n * 大致流程:\n * 1. recorder start 后开始接受录音,通过 recorder.onFrameRecorded 把数据透出给上层。数据中 isLastFrame 表示是否最后一次数据, frameBuffer 表示真实数据。\n * 2. 上层拿到录音数据后,通过 ws 发送给讯飞。如果 isLastFrame 为 true 时,给讯飞的数据中 status 为 2。如果 isLastFrame 为 false 时,给讯飞的数据中 status 为 1。\n * 3. ws 返回的数据,通过 renderResult 处理。数据中 status 为 2 表示本次录音数据识别结束了,这时候需要关闭 ws,避免消耗资源。且这两个情况服务端会主动断开连接(整个会话时长最多持续60s,或者超过10s未发送数据)。\n * 讯飞流式语音文档:https://www.xfyun.cn/doc/asr/voicedictation/API.html#%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E6%B5%81%E7%A8%8B\n * 4. 断开链接后会关闭 recorder ,重置录音等数据,方便下次使用。\n * 备注:使用时,建议在收到 onWsClose 事件后,才让前端恢复到可以再次输入录音的状态\n */\nexport class XFStreamVoiceManager {\n wsInstance: WebSocket | null = null;\n recorder: RecorderManager | null = null;\n isDestroy = false;\n resultText = '';\n resultTextTemp = '';\n continueRecord = false;\n startTimeStamp = 0;\n recordStatus: 'start' | 'stop' = 'stop';\n readyToSend = false;\n\n constructor(public config: XFStreamVoiceManagerConfig) {\n this.initializeRecorder();\n }\n renderResult(resultData: string) {\n // 识别结束\n const jsonData = JSON.parse(resultData);\n if (jsonData.data && jsonData.data.result) {\n const data = jsonData.data.result;\n let str = '';\n const ws = data.ws;\n for (let i = 0; i < ws.length; i++) {\n str = str + ws[i].cw[0].w;\n }\n // 开启 wpgs 会有此字段(前提:在控制台开通动态修正功能)\n // 取值为 \"apd\"时表示该片结果是追加到前面的最终结果;取值为\"rpl\" 时表示替换前面的部分结果,替换范围为rg字段\n if (data.pgs) {\n if (data.pgs === 'apd') {\n // 将resultTextTemp同步给resultText\n this.resultText = this.resultTextTemp;\n }\n // 将结果存储在resultTextTemp中\n this.resultTextTemp = this.resultText + str;\n } else {\n this.resultText = this.resultText + str;\n }\n }\n /**\n * 识别结果是否结束标识:\n * 0:识别的第一块结果。\n * 1:识别中间结果。\n * 2:识别最后一块结果\n */\n if (jsonData.code === 0 && jsonData.data.status === 2) {\n this.config.onMessage({\n message: this.resultText,\n isLatest: true,\n tempMessage: this.resultTextTemp,\n });\n this.closeWs();\n return;\n }\n if (jsonData.code === 0 && jsonData.data.status === 1) {\n this.config.onMessage({\n message: this.resultText,\n isLatest: false,\n tempMessage: this.resultTextTemp,\n });\n }\n // code 不为0时表示出错\n if (jsonData.code !== 0) {\n this.closeWs();\n this.config.onError({ type: 'message', message: resultData });\n }\n }\n\n setConfig(newConfig: XFStreamVoiceManagerConfig) {\n this.config = {\n ...this.config,\n ...newConfig,\n };\n this.recorder?.close();\n this.initializeRecorder();\n }\n sendMessage(message: string) {\n if (this.wsInstance?.readyState === WebSocket.OPEN && this.readyToSend) {\n this.wsInstance.send(message);\n }\n }\n\n async recordConfigSend() {\n if (this.isDestroy) {\n return;\n }\n if (this.recordStatus === 'stop') {\n this.closeWs();\n return;\n }\n try {\n // 开始录音\n await this.recorder?.start({\n sampleRate: 16000,\n frameSize: 1280,\n });\n const params = {\n common: {\n app_id: this.config.xunFeiAppId || APPID,\n },\n business: {\n language: 'zh_cn',\n domain: 'iat',\n accent: 'mandarin',\n vad_eos: 5000,\n dwa: 'wpgs',\n },\n data: {\n status: 0,\n format: 'audio/L16;rate=16000',\n encoding: 'raw',\n },\n };\n this.readyToSend = true;\n this.sendMessage(JSON.stringify(params));\n } catch (error) {\n console.error('record error:', error);\n this.config.onError({ type: 'record', message: '录音失败, 请检查权限!' });\n }\n }\n\n startNewSocket() {\n console.log(\n '%c ❤️ love ==== start new socket:',\n 'color: red; font-size: 16px;',\n startCount,\n new Date().toLocaleString(),\n );\n startCount++;\n const websocketUrl = this.config.getWebSocketUrl?.() || getWebSocketUrl();\n if ('WebSocket' in window) {\n this.wsInstance = new WebSocket(websocketUrl);\n } else {\n this.config.onError({ type: 'socketConnect', message: '浏览器不支持 WebSocket' });\n return;\n }\n this.wsInstance.onmessage = (e) => {\n // 处理返回数据\n this.renderResult(e.data);\n };\n this.wsInstance.onerror = (e) => {\n console.error('socket error:', e);\n };\n this.wsInstance.onclose = async () => {\n this.config.onWsClose();\n if (this.continueRecord) {\n this.readyToSend = false;\n await this.recorder?.close();\n this.startRecord();\n }\n };\n this.wsInstance.onopen = () => {\n this.recordConfigSend();\n };\n }\n\n onFrameRecorded({ isLastFrame, frameBuffer }: RecordFrameInfo) {\n if (this.isDestroy) {\n return;\n }\n if (!this.wsInstance) {\n return;\n }\n if (this.wsInstance.readyState === this.wsInstance.OPEN) {\n this.sendMessage(\n JSON.stringify({\n data: {\n status: isLastFrame ? 2 : 1,\n format: 'audio/L16;rate=16000',\n encoding: 'raw',\n audio: toBase64(frameBuffer),\n },\n }),\n );\n }\n if (isLastFrame) {\n this.readyToSend = false;\n }\n }\n\n initializeRecorder() {\n this.recorder = new RecorderManager();\n this.recorder.onFrameRecorded = (data: RecordFrameInfo) => {\n this.onFrameRecorded(data);\n };\n this.recorder.onLastFrame = (data: ArrayBuffer[]) => {\n this.config.onLastFrame?.(data);\n };\n this.recorder.onStop = () => {\n this.config.onRecordStop?.();\n };\n this.recorder.onStart = () => {\n this.config.onRecordStart?.();\n };\n }\n\n startRecord() {\n if (this.isDestroy) {\n return;\n }\n this.recordStatus = 'start';\n this.startTimeStamp = Date.now();\n this.resultText = '';\n this.resultTextTemp = '';\n this.startNewSocket();\n }\n\n async stopRecord() {\n this.recordStatus = 'stop';\n console.log('stop record ====', Date.now() - this.startTimeStamp, this.recorder?.status);\n this.recorder?.stop();\n // 如果 recorder 还没有初始化完成就关闭了,那么需要手动关闭 ws,否则在收到最后一帧消息时关闭ws\n // if (this.recorder?.status !== 'initialized') {\n // this.closeWs();\n // }\n // 这里为了防止 ws 没有返回结束的数据,导致 ws 一直没关,所以加个定时器,5s 后手动关闭\n setTimeout(() => {\n this.closeWs();\n }, 3000);\n }\n\n closeWs() {\n if (this.wsInstance?.readyState !== WebSocket.CLOSED) {\n try {\n this.wsInstance?.close();\n } catch {\n // 有的浏览器在 ws 为 connecting 的时候 close 会报错,这里忽略掉\n }\n }\n }\n /** 开启持续监听 */\n startContinueRecord() {\n this.continueRecord = true;\n this.startRecord();\n }\n\n stopContinueRecord() {\n this.continueRecord = false;\n this.stopRecord();\n }\n\n destroy() {\n this.isDestroy = true;\n setTimeout(() => {\n this.closeWs();\n this.recorder?.stop();\n this.recorder?.destroy();\n }, 100);\n }\n}\n"],"names":["_a"],"mappings":";;;;;;AAMA,IAAI,aAAa;AAsCjB,MAAM,QAAQ;AACd,MAAM,aAAa;AACnB,MAAM,UAAU;AAKhB,SAAS,kBAAkB;AAEzB,QAAM,MAAM;AACZ,QAAM,OAAO;AACb,QAAM,SAAS;AACf,QAAM,YAAY;AAClB,QAAM,QAAO,oBAAI,KAAK,GAAE,YAAY;AACpC,QAAM,YAAY;AAClB,QAAM,UAAU;AACV,QAAA,kBAAkB,SAAS,IAAI;AAAA,QAAW,IAAI;AAAA;AACpD,QAAM,eAAe,SAAS,WAAW,iBAAiB,SAAS;AACnE,QAAM,YAAY,SAAS,IAAI,OAAO,UAAU,YAAY;AACtD,QAAA,sBAAsB,YAAY,MAAM,iBAAiB,SAAS,eAAe,OAAO,iBAAiB,SAAS;AAClH,QAAA,gBAAgB,OAAO,KAAK,mBAAmB;AACrD,SAAO,GAAG,GAAG,kBAAkB,aAAa,SAAS,IAAI,SAAS,IAAI;AACxE;AAYO,MAAM,qBAAqB;AAAA,EAWhC,YAAmB,QAAoC;AAVvD,sCAA+B;AAC/B,oCAAmC;AACnC,qCAAY;AACZ,sCAAa;AACb,0CAAiB;AACjB,0CAAiB;AACjB,0CAAiB;AACjB,wCAAiC;AACjC,uCAAc;AAEK,SAAA,SAAA;AACjB,SAAK,mBAAmB;AAAA,EAAA;AAAA,EAE1B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AClB,SAAK,iBAAiB;AACtB,SAAK,eAAe;AAAA,EAAA;AAAA,EAGtB,MAAM,aAAa;;AACjB,SAAK,eAAe;AACZ,YAAA,IAAI,qBAAqB,KAAK,IAAA,IAAQ,KAAK,iBAAgB,UAAK,aAAL,mBAAe,MAAM;AACxF,eAAK,aAAL,mBAAe;AAMf,eAAW,MAAM;AACf,WAAK,QAAQ;AAAA,OACZ,GAAI;AAAA,EAAA;AAAA,EAGT,UAAU;;AACR,UAAI,UAAK,eAAL,mBAAiB,gBAAe,UAAU,QAAQ;AAChD,UAAA;AACF,mBAAK,eAAL,mBAAiB;AAAA,MAAM,QACjB;AAAA,MAAA;AAAA,IAER;AAAA,EACF;AAAA;AAAA,EAGF,sBAAsB;AACpB,SAAK,iBAAiB;AACtB,SAAK,YAAY;AAAA,EAAA;AAAA,EAGnB,qBAAqB;AACnB,SAAK,iBAAiB;AACtB,SAAK,WAAW;AAAA,EAAA;AAAA,EAGlB,UAAU;AACR,SAAK,YAAY;AACjB,eAAW,MAAM;;AACf,WAAK,QAAQ;AACb,iBAAK,aAAL,mBAAe;AACf,iBAAK,aAAL,mBAAe;AAAA,OACd,GAAG;AAAA,EAAA;AAEV;"}
@@ -1,11 +1,13 @@
1
- function i(o) {
2
- let n = "";
3
- const e = new Uint8Array(o), r = e.byteLength;
4
- for (let t = 0; t < r; t++)
5
- n += String.fromCharCode(e[t]);
6
- return window.btoa(n);
1
+ function toBase64(buffer) {
2
+ let binary = "";
3
+ const bytes = new Uint8Array(buffer);
4
+ const len = bytes.byteLength;
5
+ for (let i = 0; i < len; i++) {
6
+ binary += String.fromCharCode(bytes[i]);
7
+ }
8
+ return window.btoa(binary);
7
9
  }
8
10
  export {
9
- i as toBase64
11
+ toBase64
10
12
  };
11
13
  //# sourceMappingURL=utils.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.es.js","sources":["../../../src/utils/xunFeiVoice/utils.ts"],"sourcesContent":["export function toBase64(buffer: ArrayBuffer) {\n let binary = '';\n const bytes = new Uint8Array(buffer);\n const len = bytes.byteLength;\n for (let i = 0; i < len; i++) {\n binary += String.fromCharCode(bytes[i]);\n }\n return window.btoa(binary);\n}\n"],"names":["toBase64","buffer","binary","bytes","len","i"],"mappings":"AAAO,SAASA,EAASC,GAAqB;AAC5C,MAAIC,IAAS;AACP,QAAAC,IAAQ,IAAI,WAAWF,CAAM,GAC7BG,IAAMD,EAAM;AAClB,WAASE,IAAI,GAAGA,IAAID,GAAKC;AACvB,IAAAH,KAAU,OAAO,aAAaC,EAAME,CAAC,CAAC;AAEjC,SAAA,OAAO,KAAKH,CAAM;AAC3B;"}
1
+ {"version":3,"file":"utils.es.js","sources":["../../../src/utils/xunFeiVoice/utils.ts"],"sourcesContent":["export function toBase64(buffer: ArrayBuffer) {\n let binary = '';\n const bytes = new Uint8Array(buffer);\n const len = bytes.byteLength;\n for (let i = 0; i < len; i++) {\n binary += String.fromCharCode(bytes[i]);\n }\n return window.btoa(binary);\n}\n"],"names":[],"mappings":"AAAO,SAAS,SAAS,QAAqB;AAC5C,MAAI,SAAS;AACP,QAAA,QAAQ,IAAI,WAAW,MAAM;AACnC,QAAM,MAAM,MAAM;AAClB,WAAS,IAAI,GAAG,IAAI,KAAK,KAAK;AAC5B,cAAU,OAAO,aAAa,MAAM,CAAC,CAAC;AAAA,EAAA;AAEjC,SAAA,OAAO,KAAK,MAAM;AAC3B;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/biz-components",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "type": "module",
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",