@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.
- package/dist/_virtual/___vite-browser-external.es.js +4 -4
- package/dist/_virtual/__vite-browser-external.es.js +2 -2
- package/dist/_virtual/__vite-browser-external.es.js.map +1 -1
- package/dist/_virtual/_commonjs-dynamic-modules.es.js +3 -3
- package/dist/_virtual/_commonjsHelpers.es.js +25 -20
- package/dist/_virtual/_commonjsHelpers.es.js.map +1 -1
- package/dist/_virtual/aes.es.js +2 -2
- package/dist/_virtual/blowfish.es.js +2 -2
- package/dist/_virtual/cipher-core.es.js +2 -2
- package/dist/_virtual/core.es.js +2 -2
- package/dist/_virtual/enc-base64.es.js +2 -2
- package/dist/_virtual/enc-base64url.es.js +2 -2
- package/dist/_virtual/enc-utf16.es.js +2 -2
- package/dist/_virtual/evpkdf.es.js +2 -2
- package/dist/_virtual/format-hex.es.js +2 -2
- package/dist/_virtual/hmac.es.js +2 -2
- package/dist/_virtual/index.es.js +2 -2
- package/dist/_virtual/index.es2.js +2 -2
- package/dist/_virtual/index.es3.js +2 -2
- package/dist/_virtual/index.es4.js +2 -2
- package/dist/_virtual/index.es5.js +2 -2
- package/dist/_virtual/index.es6.js +2 -2
- package/dist/_virtual/index.es7.js +2 -2
- package/dist/_virtual/jsx-runtime.es.js +2 -2
- package/dist/_virtual/lib-typedarrays.es.js +2 -2
- package/dist/_virtual/md5.es.js +2 -2
- package/dist/_virtual/mode-cfb.es.js +2 -2
- package/dist/_virtual/mode-ctr-gladman.es.js +2 -2
- package/dist/_virtual/mode-ctr.es.js +2 -2
- package/dist/_virtual/mode-ecb.es.js +2 -2
- package/dist/_virtual/mode-ofb.es.js +2 -2
- package/dist/_virtual/pad-ansix923.es.js +2 -2
- package/dist/_virtual/pad-iso10126.es.js +2 -2
- package/dist/_virtual/pad-iso97971.es.js +2 -2
- package/dist/_virtual/pad-nopadding.es.js +2 -2
- package/dist/_virtual/pad-zeropadding.es.js +2 -2
- package/dist/_virtual/pbkdf2.es.js +2 -2
- package/dist/_virtual/rabbit-legacy.es.js +2 -2
- package/dist/_virtual/rabbit.es.js +2 -2
- package/dist/_virtual/rc4.es.js +2 -2
- package/dist/_virtual/react-is.development.es.js +2 -2
- package/dist/_virtual/react-is.production.min.es.js +2 -2
- package/dist/_virtual/react-jsx-runtime.development.es.js +2 -2
- package/dist/_virtual/react-jsx-runtime.production.min.es.js +2 -2
- package/dist/_virtual/ripemd160.es.js +2 -2
- package/dist/_virtual/sha1.es.js +2 -2
- package/dist/_virtual/sha224.es.js +2 -2
- package/dist/_virtual/sha256.es.js +2 -2
- package/dist/_virtual/sha3.es.js +2 -2
- package/dist/_virtual/sha384.es.js +2 -2
- package/dist/_virtual/sha512.es.js +2 -2
- package/dist/_virtual/tripledes.es.js +2 -2
- package/dist/_virtual/utilities.es.js +2 -2
- package/dist/_virtual/x64-core.es.js +2 -2
- package/dist/components/AiMessageRender/AiMessageRender.es.js +62 -46
- package/dist/components/AiMessageRender/AiMessageRender.es.js.map +1 -1
- package/dist/components/AiMessageRender/index.less.es.js +2 -191
- package/dist/components/AiMessageRender/index.less.es.js.map +1 -1
- package/dist/components/ScrollController/ScrollController.es.js +57 -34
- package/dist/components/ScrollController/ScrollController.es.js.map +1 -1
- package/dist/components/ShadowDom/ShadowDom.es.js +28 -20
- package/dist/components/ShadowDom/ShadowDom.es.js.map +1 -1
- package/dist/components/VoiceAnimation/VoiceAnimation.es.js +22 -15
- package/dist/components/VoiceAnimation/VoiceAnimation.es.js.map +1 -1
- package/dist/hooks/useDivAutoScroll.es.js +47 -24
- package/dist/hooks/useDivAutoScroll.es.js.map +1 -1
- package/dist/hooks/useXunFeiSteamVoiceManager.es.js +12 -10
- package/dist/hooks/useXunFeiSteamVoiceManager.es.js.map +1 -1
- package/dist/index.es.js +19 -19
- package/dist/node_modules/.pnpm/@easyv_react-icons@6.3.0/node_modules/@easyv/react-icons/dist/index.esm.es.js +5117 -1099
- package/dist/node_modules/.pnpm/@easyv_react-icons@6.3.0/node_modules/@easyv/react-icons/dist/index.esm.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/deserialize.es.js +54 -48
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/deserialize.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/index.es.js +8 -8
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/serialize.es.js +103 -74
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/serialize.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/types.es.js +20 -11
- package/dist/node_modules/.pnpm/@ungap_structured-clone@1.3.0/node_modules/@ungap/structured-clone/esm/types.es.js.map +1 -1
- package/dist/node_modules/.pnpm/bail@2.0.2/node_modules/bail/index.es.js +5 -4
- package/dist/node_modules/.pnpm/bail@2.0.2/node_modules/bail/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.es.js +12 -8
- package/dist/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.es.js +37 -27
- package/dist/node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js +49 -28
- package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/co-web-worker@1.0.1/node_modules/co-web-worker/index.es.js +11 -11
- package/dist/node_modules/.pnpm/co-web-worker@1.0.1/node_modules/co-web-worker/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.es.js +6 -5
- package/dist/node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.es.js +145 -53
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.es.js +125 -60
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.es.js +244 -140
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.es.js +232 -127
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.es.js +74 -43
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.es.js +80 -45
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.es.js +58 -36
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.es.js +55 -29
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.es.js +32 -21
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.es.js +56 -29
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.es.js +48 -46
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.es.js +44 -23
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.es.js +158 -47
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.es.js +49 -29
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.es.js +72 -33
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.es.js +39 -23
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.es.js +30 -22
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.es.js +37 -21
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.es.js +31 -20
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.es.js +27 -20
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.es.js +26 -18
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.es.js +20 -14
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.es.js +31 -21
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.es.js +61 -32
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.es.js +119 -59
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.es.js +122 -61
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.es.js +67 -40
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.es.js +135 -49
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.es.js +75 -30
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.es.js +32 -19
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.es.js +107 -40
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.es.js +167 -77
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.es.js +42 -28
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.es.js +268 -129
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.es.js +122 -63
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.es.js.map +1 -1
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.es.js +52 -27
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.es.js.map +1 -1
- package/dist/node_modules/.pnpm/decode-named-character-reference@1.1.0/node_modules/decode-named-character-reference/index.dom.es.js +12 -9
- 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
- package/dist/node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.es.js +4 -4
- package/dist/node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.es.js.map +1 -1
- package/dist/node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.es.js +5 -4
- package/dist/node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.es.js.map +1 -1
- 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
- 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
- package/dist/node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.es.js +86 -36
- package/dist/node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.es.js.map +1 -1
- 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
- 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
- package/dist/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.es.js +6 -6
- package/dist/node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/html-url-attributes@3.0.1/node_modules/html-url-attributes/lib/index.es.js +2 -2
- package/dist/node_modules/.pnpm/html-url-attributes@3.0.1/node_modules/html-url-attributes/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/inline-style-parser@0.2.4/node_modules/inline-style-parser/index.es.js +115 -67
- package/dist/node_modules/.pnpm/inline-style-parser@0.2.4/node_modules/inline-style-parser/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.es.js +7 -6
- package/dist/node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.es.js +21 -8
- package/dist/node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.es.js +124 -57
- package/dist/node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.es.js.map +1 -1
- 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
- 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
- package/dist/node_modules/.pnpm/mdast-util-from-markdown@2.0.2/node_modules/mdast-util-from-markdown/lib/index.es.js +509 -371
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.es.js +85 -63
- 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
- package/dist/node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.es.js +26 -22
- 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
- package/dist/node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.es.js +104 -82
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.es.js +19 -19
- package/dist/node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.es.js +4 -4
- package/dist/node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/footer.es.js +94 -69
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/index.es.js +12 -7
- 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
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/revert.es.js +26 -10
- 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
- package/dist/node_modules/.pnpm/mdast-util-to-hast@13.2.0/node_modules/mdast-util-to-hast/lib/state.es.js +123 -79
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.es.js +31 -22
- 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
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.es.js +109 -57
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.es.js +88 -28
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.es.js +12 -12
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.es.js +47 -28
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.es.js +21 -10
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.es.js +58 -20
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.es.js +162 -70
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.es.js +54 -30
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.es.js +101 -30
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/content.es.js +61 -36
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/content.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.es.js +66 -52
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/hard-break-escape.es.js +16 -10
- 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
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.es.js +83 -34
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.es.js +344 -105
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.es.js +275 -68
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.es.js +191 -108
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-image.es.js +25 -14
- 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
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-link.es.js +17 -12
- 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
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.es.js +11 -8
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.es.js +110 -65
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.es.js +75 -37
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.es.js +33 -16
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.es.js.map +1 -1
- 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
- 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
- package/dist/node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/lib/syntax.es.js +216 -129
- 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
- package/dist/node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.es.js +76 -45
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/infer.es.js +22 -17
- 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
- package/dist/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/syntax.es.js +350 -104
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.es.js +14 -14
- package/dist/node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.es.js +83 -20
- package/dist/node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.es.js +51 -16
- package/dist/node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.es.js +19 -10
- package/dist/node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.es.js +56 -17
- package/dist/node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.es.js +18 -8
- package/dist/node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.es.js +32 -27
- package/dist/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.es.js +32 -12
- package/dist/node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.es.js +7 -5
- package/dist/node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.es.js +32 -27
- package/dist/node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.es.js.map +1 -1
- 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
- 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
- package/dist/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.es.js +16 -13
- package/dist/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.es.js.map +1 -1
- 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
- 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
- package/dist/node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.es.js +3 -3
- package/dist/node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.es.js +11 -8
- package/dist/node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-sanitize-uri/index.es.js +37 -19
- package/dist/node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-sanitize-uri/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.es.js +149 -47
- package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.es.js +61 -42
- package/dist/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.es.js +88 -80
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.es.js +247 -150
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.es.js +39 -23
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.es.js +151 -91
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/flow.es.js +29 -20
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/flow.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/text.es.js +116 -69
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/text.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.es.js +26 -24
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/postprocess.es.js +6 -6
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/postprocess.es.js.map +1 -1
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/preprocess.es.js +63 -22
- package/dist/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/preprocess.es.js.map +1 -1
- package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.es.js +62 -38
- package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.es.js +49 -35
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.es.js.map +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.es.js +49 -43
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.es.js.map +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.es.js +363 -241
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.es.js.map +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.es.js +14 -12
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.es.js +9 -7
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.es.js.map +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.es.js +8 -4
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/index.es.js +11 -10
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/aria.es.js +39 -39
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/aria.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/find.es.js +31 -24
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/find.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/hast-to-react.es.js +2 -2
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/hast-to-react.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/html.es.js +94 -94
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/html.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/normalize.es.js +3 -3
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/normalize.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/svg.es.js +77 -77
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/svg.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-insensitive-transform.es.js +4 -4
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-insensitive-transform.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-sensitive-transform.es.js +3 -3
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/case-sensitive-transform.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/create.es.js +20 -14
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/create.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/defined-info.es.js +20 -15
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/defined-info.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/info.es.js +17 -16
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/info.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/merge.es.js +10 -7
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/merge.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/schema.es.js +11 -7
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/schema.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/types.es.js +17 -11
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/util/types.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xlink.es.js +5 -5
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xlink.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xml.es.js +5 -5
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xml.es.js.map +1 -1
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xmlns.es.js +5 -5
- package/dist/node_modules/.pnpm/property-information@7.0.0/node_modules/property-information/lib/xmlns.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.es.js +152 -82
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.es.js +86 -58
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.es.js +14 -7
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.es.js.map +1 -1
- 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
- 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
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.es.js +825 -539
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.development.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.es.js +20 -15
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.es.js.map +1 -1
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js +10 -6
- package/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.es.js.map +1 -1
- package/dist/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.es.js +15 -8
- package/dist/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.es.js +11 -11
- package/dist/node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/remark-rehype@11.1.2/node_modules/remark-rehype/lib/index.es.js +14 -11
- package/dist/node_modules/.pnpm/remark-rehype@11.1.2/node_modules/remark-rehype/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.es.js +3 -3
- package/dist/node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/index.es.js +23 -15
- package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/utilities.es.js +33 -13
- package/dist/node_modules/.pnpm/style-to-js@1.1.16/node_modules/style-to-js/cjs/utilities.es.js.map +1 -1
- package/dist/node_modules/.pnpm/style-to-object@1.0.8/node_modules/style-to-object/cjs/index.es.js +27 -18
- package/dist/node_modules/.pnpm/style-to-object@1.0.8/node_modules/style-to-object/cjs/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/trim-lines@3.0.1/node_modules/trim-lines/index.es.js +35 -22
- package/dist/node_modules/.pnpm/trim-lines@3.0.1/node_modules/trim-lines/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.es.js +68 -42
- package/dist/node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.es.js +13 -8
- package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.es.js.map +1 -1
- package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js +246 -139
- package/dist/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/unist-util-is@6.0.0/node_modules/unist-util-is/lib/index.es.js +59 -50
- package/dist/node_modules/.pnpm/unist-util-is@6.0.0/node_modules/unist-util-is/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.es.js +20 -16
- package/dist/node_modules/.pnpm/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.es.js +21 -9
- 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
- package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/color.es.js +3 -3
- 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
- package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.es.js +65 -38
- 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
- package/dist/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/lib/index.es.js +24 -12
- package/dist/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/vfile-message@4.0.2/node_modules/vfile-message/lib/index.es.js +77 -30
- package/dist/node_modules/.pnpm/vfile-message@4.0.2/node_modules/vfile-message/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.es.js +116 -60
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.es.js.map +1 -1
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.browser.es.js +181 -79
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.browser.es.js.map +1 -1
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.browser.es.js +3 -3
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.browser.es.js.map +1 -1
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.browser.es.js +32 -27
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.browser.es.js.map +1 -1
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.es.js +6 -4
- package/dist/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.es.js.map +1 -1
- package/dist/utils/funASR/funASRManager.es.js +109 -68
- package/dist/utils/funASR/funASRManager.es.js.map +1 -1
- package/dist/utils/funASR/pcm.es.js +51 -36
- package/dist/utils/funASR/pcm.es.js.map +1 -1
- package/dist/utils/funASR/recorder.es.js +1048 -542
- package/dist/utils/funASR/recorder.es.js.map +1 -1
- package/dist/utils/funASR/wav.es.js +46 -20
- package/dist/utils/funASR/wav.es.js.map +1 -1
- package/dist/utils/funASR/wsConnecter.es.js +79 -44
- package/dist/utils/funASR/wsConnecter.es.js.map +1 -1
- package/dist/utils/xunFeiVoice/RecorderManager/RecorderManager.es.js +126 -78
- package/dist/utils/xunFeiVoice/RecorderManager/RecorderManager.es.js.map +1 -1
- package/dist/utils/xunFeiVoice/RecorderManager/processorSource/processor.worker.es.js +2 -207
- package/dist/utils/xunFeiVoice/RecorderManager/processorSource/processor.worker.es.js.map +1 -1
- package/dist/utils/xunFeiVoice/RecorderManager/processorSource/processor.worklet.es.js +2 -2
- package/dist/utils/xunFeiVoice/RecorderManager/processorSource/processor.worklet.es.js.map +1 -1
- package/dist/utils/xunFeiVoice/XFStreamVoiceManager.d.ts +4 -0
- package/dist/utils/xunFeiVoice/XFStreamVoiceManager.es.js +207 -131
- package/dist/utils/xunFeiVoice/XFStreamVoiceManager.es.js.map +1 -1
- package/dist/utils/xunFeiVoice/utils.es.js +9 -7
- package/dist/utils/xunFeiVoice/utils.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,257 +1,466 @@
|
|
|
1
|
-
var
|
|
1
|
+
var NOOP = function() {
|
|
2
2
|
};
|
|
3
|
-
const
|
|
4
|
-
return new
|
|
3
|
+
const Recorder = function(set) {
|
|
4
|
+
return new initFn(set);
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
Recorder.LM = "2023-02-01 18:05";
|
|
7
|
+
var RecTxt = "Recorder";
|
|
8
|
+
var getUserMediaTxt = "getUserMedia";
|
|
9
|
+
var srcSampleRateTxt = "srcSampleRate";
|
|
10
|
+
var sampleRateTxt = "sampleRate";
|
|
11
|
+
var CatchTxt = "catch";
|
|
12
|
+
Recorder.IsOpen = function() {
|
|
13
|
+
var stream = Recorder.Stream;
|
|
14
|
+
if (stream) {
|
|
15
|
+
var tracks = stream.getTracks && stream.getTracks() || stream.audioTracks || [];
|
|
16
|
+
var track = tracks[0];
|
|
17
|
+
if (track) {
|
|
18
|
+
var state = track.readyState;
|
|
19
|
+
return state == "live" || state == track.LIVE;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
18
23
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
Recorder.BufferSize = 4096;
|
|
25
|
+
Recorder.Destroy = function() {
|
|
26
|
+
CLog(RecTxt + " Destroy");
|
|
27
|
+
Disconnect();
|
|
28
|
+
for (var k in DestroyList) {
|
|
29
|
+
DestroyList[k]();
|
|
30
|
+
}
|
|
24
31
|
};
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
var DestroyList = {};
|
|
33
|
+
Recorder.BindDestroy = function(key, call) {
|
|
34
|
+
DestroyList[key] = call;
|
|
28
35
|
};
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
|
|
36
|
+
Recorder.Support = function() {
|
|
37
|
+
var scope = navigator.mediaDevices || {};
|
|
38
|
+
if (!scope[getUserMediaTxt]) {
|
|
39
|
+
scope = navigator;
|
|
40
|
+
scope[getUserMediaTxt] || (scope[getUserMediaTxt] = scope.webkitGetUserMedia || scope.mozGetUserMedia || scope.msGetUserMedia);
|
|
41
|
+
}
|
|
42
|
+
if (!scope[getUserMediaTxt]) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
Recorder.Scope = scope;
|
|
46
|
+
if (!Recorder.GetContext()) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
return true;
|
|
32
50
|
};
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
51
|
+
Recorder.GetContext = function() {
|
|
52
|
+
var AC = window.AudioContext;
|
|
53
|
+
if (!AC) {
|
|
54
|
+
AC = window.webkitAudioContext;
|
|
55
|
+
}
|
|
56
|
+
if (!AC) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
if (!Recorder.Ctx || Recorder.Ctx.state == "closed") {
|
|
60
|
+
Recorder.Ctx = new AC();
|
|
61
|
+
Recorder.BindDestroy("Ctx", function() {
|
|
62
|
+
var ctx = Recorder.Ctx;
|
|
63
|
+
if (ctx && ctx.close) {
|
|
64
|
+
ctx.close();
|
|
65
|
+
Recorder.Ctx = 0;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return Recorder.Ctx;
|
|
39
70
|
};
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
71
|
+
var ConnectEnableWebM = "ConnectEnableWebM";
|
|
72
|
+
Recorder[ConnectEnableWebM] = true;
|
|
73
|
+
var ConnectEnableWorklet = "ConnectEnableWorklet";
|
|
74
|
+
Recorder[ConnectEnableWorklet] = false;
|
|
75
|
+
var Connect = function(streamStore, isUserMedia) {
|
|
76
|
+
var bufferSize = streamStore.BufferSize || Recorder.BufferSize;
|
|
77
|
+
var ctx = Recorder.Ctx, stream = streamStore.Stream;
|
|
78
|
+
var mediaConn = function(node) {
|
|
79
|
+
var media = stream._m = ctx.createMediaStreamSource(stream);
|
|
80
|
+
var ctxDest = ctx.destination, cmsdTxt = "createMediaStreamDestination";
|
|
81
|
+
if (ctx[cmsdTxt]) {
|
|
82
|
+
ctxDest = ctx[cmsdTxt]();
|
|
83
|
+
}
|
|
84
|
+
media.connect(node);
|
|
85
|
+
node.connect(ctxDest);
|
|
86
|
+
};
|
|
87
|
+
var isWebM, isWorklet, badInt, webMTips = "";
|
|
88
|
+
var calls = stream._call;
|
|
89
|
+
var onReceive = function(float32Arr) {
|
|
90
|
+
for (var k0 in calls) {
|
|
91
|
+
var size = float32Arr.length;
|
|
92
|
+
var pcm = new Int16Array(size);
|
|
93
|
+
var sum = 0;
|
|
94
|
+
for (var j = 0; j < size; j++) {
|
|
95
|
+
var s = Math.max(-1, Math.min(1, float32Arr[j]));
|
|
96
|
+
s = s < 0 ? s * 32768 : s * 32767;
|
|
97
|
+
pcm[j] = s;
|
|
98
|
+
sum += Math.abs(s);
|
|
99
|
+
}
|
|
100
|
+
for (var k in calls) {
|
|
101
|
+
calls[k](pcm, sum);
|
|
102
|
+
}
|
|
56
103
|
return;
|
|
57
104
|
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
105
|
+
};
|
|
106
|
+
var scriptProcessor = "ScriptProcessor";
|
|
107
|
+
var audioWorklet = "audioWorklet";
|
|
108
|
+
var recAudioWorklet = RecTxt + " " + audioWorklet;
|
|
109
|
+
var RecProc = "RecProc";
|
|
110
|
+
var MediaRecorderTxt = "MediaRecorder";
|
|
111
|
+
var MRWebMPCM = MediaRecorderTxt + ".WebM.PCM";
|
|
112
|
+
var oldFn = ctx.createScriptProcessor || ctx.createJavaScriptNode;
|
|
113
|
+
var oldIsBest = "。由于" + audioWorklet + "内部1秒375次回调,在移动端可能会有性能问题导致回调丢失录音变短,PC端无影响,暂不建议开启" + audioWorklet + "。";
|
|
114
|
+
var oldScript = function() {
|
|
115
|
+
isWorklet = stream.isWorklet = false;
|
|
116
|
+
_Disconn_n(stream);
|
|
117
|
+
CLog(
|
|
118
|
+
"Connect采用老的" + scriptProcessor + "," + (Recorder[ConnectEnableWorklet] ? "但已" : "可") + "设置" + RecTxt + "." + ConnectEnableWorklet + "=true尝试启用" + audioWorklet + webMTips + oldIsBest,
|
|
61
119
|
3
|
|
62
120
|
);
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
121
|
+
var process = stream._p = oldFn.call(ctx, bufferSize, 1, 1);
|
|
122
|
+
mediaConn(process);
|
|
123
|
+
var _DsetTxt = "_D220626", _Dset = Recorder[_DsetTxt];
|
|
124
|
+
if (_Dset) CLog("Use " + RecTxt + "." + _DsetTxt, 3);
|
|
125
|
+
process.onaudioprocess = function(e) {
|
|
126
|
+
var arr = e.inputBuffer.getChannelData(0);
|
|
127
|
+
if (_Dset) {
|
|
128
|
+
arr = new Float32Array(arr);
|
|
129
|
+
setTimeout(function() {
|
|
130
|
+
onReceive(arr);
|
|
131
|
+
});
|
|
132
|
+
} else {
|
|
133
|
+
onReceive(arr);
|
|
134
|
+
}
|
|
71
135
|
};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
136
|
+
};
|
|
137
|
+
var connWorklet = function() {
|
|
138
|
+
isWebM = stream.isWebM = false;
|
|
139
|
+
_Disconn_r(stream);
|
|
140
|
+
isWorklet = stream.isWorklet = !oldFn || Recorder[ConnectEnableWorklet];
|
|
141
|
+
var AwNode = window.AudioWorkletNode;
|
|
142
|
+
if (!(isWorklet && ctx[audioWorklet] && AwNode)) {
|
|
143
|
+
oldScript();
|
|
77
144
|
return;
|
|
78
145
|
}
|
|
79
|
-
var
|
|
80
|
-
var
|
|
81
|
-
return
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (U) {
|
|
95
|
-
this.port.postMessage({ val: E.slice(0, U) });
|
|
96
|
-
var J = E.subarray(U, B);
|
|
97
|
-
E = new Float32Array(H * 2), E.set(J), B = J.length, A.buffer = E;
|
|
146
|
+
var clazzUrl = function() {
|
|
147
|
+
var xf = function(f) {
|
|
148
|
+
return f.toString().replace(/^function|DEL_/g, "").replace(/\$RA/g, recAudioWorklet);
|
|
149
|
+
};
|
|
150
|
+
var clazz = "class " + RecProc + " extends AudioWorkletProcessor{";
|
|
151
|
+
clazz += "constructor " + xf(function(option) {
|
|
152
|
+
DEL_super(option);
|
|
153
|
+
var This = this, bufferSize2 = option.processorOptions.bufferSize;
|
|
154
|
+
This.bufferSize = bufferSize2;
|
|
155
|
+
This.buffer = new Float32Array(bufferSize2 * 2);
|
|
156
|
+
This.pos = 0;
|
|
157
|
+
This.port.onmessage = function(e) {
|
|
158
|
+
if (e.data.kill) {
|
|
159
|
+
This.kill = true;
|
|
160
|
+
console.log("$RA kill call");
|
|
98
161
|
}
|
|
99
|
-
|
|
162
|
+
};
|
|
163
|
+
console.log("$RA .ctor call", option);
|
|
164
|
+
});
|
|
165
|
+
clazz += "process " + xf(function(input, b, c) {
|
|
166
|
+
var This = this, bufferSize2 = This.bufferSize;
|
|
167
|
+
var buffer = This.buffer, pos = This.pos;
|
|
168
|
+
input = (input[0] || [])[0] || [];
|
|
169
|
+
if (input.length) {
|
|
170
|
+
buffer.set(input, pos);
|
|
171
|
+
pos += input.length;
|
|
172
|
+
var len = ~~(pos / bufferSize2) * bufferSize2;
|
|
173
|
+
if (len) {
|
|
174
|
+
this.port.postMessage({ val: buffer.slice(0, len) });
|
|
175
|
+
var more = buffer.subarray(len, pos);
|
|
176
|
+
buffer = new Float32Array(bufferSize2 * 2);
|
|
177
|
+
buffer.set(more);
|
|
178
|
+
pos = more.length;
|
|
179
|
+
This.buffer = buffer;
|
|
180
|
+
}
|
|
181
|
+
This.pos = pos;
|
|
100
182
|
}
|
|
101
|
-
return !
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
return
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
);
|
|
183
|
+
return !This.kill;
|
|
184
|
+
});
|
|
185
|
+
clazz += '}try{registerProcessor("' + RecProc + '", ' + RecProc + ')}catch(e){console.error("' + recAudioWorklet + '注册失败",e)}';
|
|
186
|
+
return "data:text/javascript;base64," + btoa(unescape(encodeURIComponent(clazz)));
|
|
187
|
+
};
|
|
188
|
+
var awNext = function() {
|
|
189
|
+
return isWorklet && stream._na;
|
|
190
|
+
};
|
|
191
|
+
var nodeAlive = stream._na = function() {
|
|
192
|
+
if (badInt !== "") {
|
|
193
|
+
clearTimeout(badInt);
|
|
194
|
+
badInt = setTimeout(function() {
|
|
195
|
+
badInt = 0;
|
|
196
|
+
if (awNext()) {
|
|
197
|
+
CLog(audioWorklet + "未返回任何音频,恢复使用" + scriptProcessor, 3);
|
|
198
|
+
oldFn && oldScript();
|
|
199
|
+
}
|
|
200
|
+
}, 500);
|
|
120
201
|
}
|
|
121
202
|
};
|
|
122
|
-
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
203
|
+
var createNode = function() {
|
|
204
|
+
if (!awNext()) return;
|
|
205
|
+
var node = stream._n = new AwNode(ctx, RecProc, {
|
|
206
|
+
processorOptions: { bufferSize }
|
|
207
|
+
});
|
|
208
|
+
mediaConn(node);
|
|
209
|
+
node.port.onmessage = function(e) {
|
|
210
|
+
if (badInt) {
|
|
211
|
+
clearTimeout(badInt);
|
|
212
|
+
badInt = "";
|
|
127
213
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
214
|
+
if (awNext()) {
|
|
215
|
+
onReceive(e.data.val);
|
|
216
|
+
} else if (!isWorklet) {
|
|
217
|
+
CLog(audioWorklet + "多余回调", 3);
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
CLog(
|
|
221
|
+
"Connect采用" + audioWorklet + ",设置" + RecTxt + "." + ConnectEnableWorklet + "=false可恢复老式" + scriptProcessor + webMTips + oldIsBest,
|
|
222
|
+
3
|
|
223
|
+
);
|
|
224
|
+
};
|
|
225
|
+
ctx.resume()[calls && "finally"](function() {
|
|
226
|
+
if (!awNext()) return;
|
|
227
|
+
if (ctx[RecProc]) {
|
|
228
|
+
createNode();
|
|
229
|
+
return;
|
|
134
230
|
}
|
|
231
|
+
var url = clazzUrl();
|
|
232
|
+
ctx[audioWorklet].addModule(url).then(function(e) {
|
|
233
|
+
if (!awNext()) return;
|
|
234
|
+
ctx[RecProc] = 1;
|
|
235
|
+
createNode();
|
|
236
|
+
if (badInt) {
|
|
237
|
+
nodeAlive();
|
|
238
|
+
}
|
|
239
|
+
})[CatchTxt](function(e) {
|
|
240
|
+
CLog(audioWorklet + ".addModule失败", 1, e);
|
|
241
|
+
awNext() && oldScript();
|
|
242
|
+
});
|
|
135
243
|
});
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
var
|
|
140
|
-
|
|
141
|
-
|
|
244
|
+
};
|
|
245
|
+
var connWebM = function() {
|
|
246
|
+
var MR = window[MediaRecorderTxt];
|
|
247
|
+
var onData = "ondataavailable";
|
|
248
|
+
var webmType = "audio/webm; codecs=pcm";
|
|
249
|
+
isWebM = stream.isWebM = Recorder[ConnectEnableWebM];
|
|
250
|
+
var supportMR = MR && onData in MR.prototype && MR.isTypeSupported(webmType);
|
|
251
|
+
webMTips = supportMR ? "" : "(此浏览器不支持" + MRWebMPCM + ")";
|
|
252
|
+
if (!isUserMedia || !isWebM || !supportMR) {
|
|
253
|
+
connWorklet();
|
|
142
254
|
return;
|
|
143
255
|
}
|
|
144
|
-
var
|
|
145
|
-
return
|
|
256
|
+
var mrNext = function() {
|
|
257
|
+
return isWebM && stream._ra;
|
|
146
258
|
};
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
259
|
+
stream._ra = function() {
|
|
260
|
+
if (badInt !== "") {
|
|
261
|
+
clearTimeout(badInt);
|
|
262
|
+
badInt = setTimeout(function() {
|
|
263
|
+
if (mrNext()) {
|
|
264
|
+
CLog(MediaRecorderTxt + "未返回任何音频,降级使用" + audioWorklet, 3);
|
|
265
|
+
connWorklet();
|
|
266
|
+
}
|
|
267
|
+
}, 500);
|
|
268
|
+
}
|
|
151
269
|
};
|
|
152
|
-
var
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
270
|
+
var mrSet = Object.assign({ mimeType: webmType }, Recorder.ConnectWebMOptions);
|
|
271
|
+
var mr = stream._r = new MR(stream, mrSet);
|
|
272
|
+
var webmData = stream._rd = { sampleRate: ctx[sampleRateTxt] };
|
|
273
|
+
mr[onData] = function(e) {
|
|
274
|
+
var reader = new FileReader();
|
|
275
|
+
reader.onloadend = function() {
|
|
276
|
+
if (mrNext()) {
|
|
277
|
+
var f32arr = WebM_Extract(new Uint8Array(reader.result), webmData);
|
|
278
|
+
if (!f32arr) return;
|
|
279
|
+
if (f32arr == -1) {
|
|
280
|
+
connWorklet();
|
|
161
281
|
return;
|
|
162
282
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
283
|
+
if (badInt) {
|
|
284
|
+
clearTimeout(badInt);
|
|
285
|
+
badInt = "";
|
|
286
|
+
}
|
|
287
|
+
onReceive(f32arr);
|
|
288
|
+
} else if (!isWebM) {
|
|
289
|
+
CLog(MediaRecorderTxt + "多余回调", 3);
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
reader.readAsArrayBuffer(e.data);
|
|
293
|
+
};
|
|
294
|
+
mr.start(~~(bufferSize / 48));
|
|
295
|
+
CLog(
|
|
296
|
+
"Connect采用" + MRWebMPCM + ",设置" + RecTxt + "." + ConnectEnableWebM + "=false可恢复使用" + audioWorklet + "或老式" + scriptProcessor
|
|
168
297
|
);
|
|
169
298
|
};
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
299
|
+
connWebM();
|
|
300
|
+
};
|
|
301
|
+
var ConnAlive = function(stream) {
|
|
302
|
+
if (stream._na) stream._na();
|
|
303
|
+
if (stream._ra) stream._ra();
|
|
304
|
+
};
|
|
305
|
+
var _Disconn_n = function(stream) {
|
|
306
|
+
stream._na = null;
|
|
307
|
+
if (stream._n) {
|
|
308
|
+
stream._n.port.postMessage({ kill: true });
|
|
309
|
+
stream._n.disconnect();
|
|
310
|
+
stream._n = null;
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
var _Disconn_r = function(stream) {
|
|
314
|
+
stream._ra = null;
|
|
315
|
+
if (stream._r) {
|
|
316
|
+
stream._r.stop();
|
|
317
|
+
stream._r = null;
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
var Disconnect = function(streamStore) {
|
|
321
|
+
streamStore = streamStore || Recorder;
|
|
322
|
+
var isGlobal = streamStore == Recorder;
|
|
323
|
+
var stream = streamStore.Stream;
|
|
324
|
+
if (stream) {
|
|
325
|
+
if (stream._m) {
|
|
326
|
+
stream._m.disconnect();
|
|
327
|
+
stream._m = null;
|
|
328
|
+
}
|
|
329
|
+
if (stream._p) {
|
|
330
|
+
stream._p.disconnect();
|
|
331
|
+
stream._p.onaudioprocess = stream._p = null;
|
|
332
|
+
}
|
|
333
|
+
_Disconn_n(stream);
|
|
334
|
+
_Disconn_r(stream);
|
|
335
|
+
if (isGlobal) {
|
|
336
|
+
var tracks = stream.getTracks && stream.getTracks() || stream.audioTracks || [];
|
|
337
|
+
for (var i = 0; i < tracks.length; i++) {
|
|
338
|
+
var track = tracks[i];
|
|
339
|
+
track.stop && track.stop();
|
|
340
|
+
}
|
|
341
|
+
stream.stop && stream.stop();
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
streamStore.Stream = 0;
|
|
188
345
|
};
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
var
|
|
192
|
-
|
|
193
|
-
var
|
|
194
|
-
|
|
195
|
-
var
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
for (; i <
|
|
205
|
-
|
|
206
|
-
|
|
346
|
+
Recorder.SampleData = function(pcmDatas, pcmSampleRate, newSampleRate, prevChunkInfo, option) {
|
|
347
|
+
prevChunkInfo || (prevChunkInfo = {});
|
|
348
|
+
var index = prevChunkInfo.index || 0;
|
|
349
|
+
var offset = prevChunkInfo.offset || 0;
|
|
350
|
+
var frameNext = prevChunkInfo.frameNext || [];
|
|
351
|
+
option || (option = {});
|
|
352
|
+
var frameSize = option.frameSize || 1;
|
|
353
|
+
if (option.frameType) {
|
|
354
|
+
frameSize = option.frameType == "mp3" ? 1152 : 1;
|
|
355
|
+
}
|
|
356
|
+
var nLen = pcmDatas.length;
|
|
357
|
+
if (index > nLen + 1) {
|
|
358
|
+
CLog("SampleData似乎传入了未重置chunk " + index + ">" + nLen, 3);
|
|
359
|
+
}
|
|
360
|
+
var size = 0;
|
|
361
|
+
for (var i = index; i < nLen; i++) {
|
|
362
|
+
size += pcmDatas[i].length;
|
|
363
|
+
}
|
|
364
|
+
size = Math.max(0, size - Math.floor(offset));
|
|
365
|
+
var step = pcmSampleRate / newSampleRate;
|
|
366
|
+
if (step > 1) {
|
|
367
|
+
size = Math.floor(size / step);
|
|
368
|
+
} else {
|
|
369
|
+
step = 1;
|
|
370
|
+
newSampleRate = pcmSampleRate;
|
|
371
|
+
}
|
|
372
|
+
size += frameNext.length;
|
|
373
|
+
var res = new Int16Array(size);
|
|
374
|
+
var idx = 0;
|
|
375
|
+
for (var i = 0; i < frameNext.length; i++) {
|
|
376
|
+
res[idx] = frameNext[i];
|
|
377
|
+
idx++;
|
|
378
|
+
}
|
|
379
|
+
for (; index < nLen; index++) {
|
|
380
|
+
var o = pcmDatas[index];
|
|
381
|
+
var i = offset, il = o.length;
|
|
382
|
+
while (i < il) {
|
|
383
|
+
var before = Math.floor(i);
|
|
384
|
+
var after = Math.ceil(i);
|
|
385
|
+
var atPoint = i - before;
|
|
386
|
+
var beforeVal = o[before];
|
|
387
|
+
var afterVal = after < il ? o[after] : (
|
|
207
388
|
//后个点越界了,查找下一个数组
|
|
208
|
-
(
|
|
389
|
+
(pcmDatas[index + 1] || [beforeVal])[0] || 0
|
|
209
390
|
);
|
|
210
|
-
|
|
391
|
+
res[idx] = beforeVal + (afterVal - beforeVal) * atPoint;
|
|
392
|
+
idx++;
|
|
393
|
+
i += step;
|
|
211
394
|
}
|
|
212
|
-
|
|
395
|
+
offset = i - il;
|
|
213
396
|
}
|
|
214
|
-
|
|
215
|
-
var
|
|
216
|
-
if (
|
|
217
|
-
var
|
|
218
|
-
|
|
397
|
+
frameNext = null;
|
|
398
|
+
var frameNextSize = res.length % frameSize;
|
|
399
|
+
if (frameNextSize > 0) {
|
|
400
|
+
var u8Pos = (res.length - frameNextSize) * 2;
|
|
401
|
+
frameNext = new Int16Array(res.buffer.slice(u8Pos));
|
|
402
|
+
res = new Int16Array(res.buffer.slice(0, u8Pos));
|
|
219
403
|
}
|
|
220
404
|
return {
|
|
221
|
-
index
|
|
222
|
-
offset
|
|
223
|
-
frameNext
|
|
224
|
-
sampleRate:
|
|
225
|
-
data:
|
|
405
|
+
index,
|
|
406
|
+
offset,
|
|
407
|
+
frameNext,
|
|
408
|
+
sampleRate: newSampleRate,
|
|
409
|
+
data: res
|
|
226
410
|
};
|
|
227
411
|
};
|
|
228
|
-
|
|
229
|
-
var
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
412
|
+
Recorder.PowerLevel = function(pcmAbsSum, pcmLength) {
|
|
413
|
+
var power = pcmAbsSum / pcmLength || 0;
|
|
414
|
+
var level;
|
|
415
|
+
if (power < 1251) {
|
|
416
|
+
level = Math.round(power / 1250 * 10);
|
|
417
|
+
} else {
|
|
418
|
+
level = Math.round(
|
|
419
|
+
Math.min(100, Math.max(0, (1 + Math.log(power / 1e4) / Math.log(10)) * 100))
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
return level;
|
|
233
423
|
};
|
|
234
|
-
|
|
235
|
-
var
|
|
236
|
-
|
|
424
|
+
Recorder.PowerDBFS = function(maxSample) {
|
|
425
|
+
var val = Math.max(0.1, maxSample || 0), Pref = 32767;
|
|
426
|
+
val = Math.min(val, Pref);
|
|
427
|
+
val = 20 * Math.log(val / Pref) / Math.log(10);
|
|
428
|
+
return Math.max(-100, Math.round(val));
|
|
237
429
|
};
|
|
238
|
-
|
|
239
|
-
var
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
430
|
+
Recorder.CLog = function(msg, err) {
|
|
431
|
+
var now = /* @__PURE__ */ new Date();
|
|
432
|
+
var t = ("0" + now.getMinutes()).substr(-2) + ":" + ("0" + now.getSeconds()).substr(-2) + "." + ("00" + now.getMilliseconds()).substr(-3);
|
|
433
|
+
var recID = this && this.envIn && this.envCheck && this.id;
|
|
434
|
+
var arr = ["[" + t + " " + RecTxt + (recID ? ":" + recID : "") + "]" + msg];
|
|
435
|
+
var a = arguments, console2 = window.console || {};
|
|
436
|
+
var i = 2, fn = console2.log;
|
|
437
|
+
if (typeof err == "number") {
|
|
438
|
+
fn = err == 1 ? console2.error : err == 3 ? console2.warn : fn;
|
|
439
|
+
} else {
|
|
440
|
+
i = 1;
|
|
441
|
+
}
|
|
442
|
+
for (; i < a.length; i++) {
|
|
443
|
+
arr.push(a[i]);
|
|
444
|
+
}
|
|
445
|
+
if (IsLoser) {
|
|
446
|
+
fn && fn("[IsLoser]" + arr[0], arr.length > 1 ? arr : "");
|
|
447
|
+
} else {
|
|
448
|
+
fn.apply(console2, arr);
|
|
449
|
+
}
|
|
243
450
|
};
|
|
244
|
-
var
|
|
245
|
-
|
|
246
|
-
}
|
|
451
|
+
var CLog = function() {
|
|
452
|
+
Recorder.CLog.apply(this, arguments);
|
|
453
|
+
};
|
|
454
|
+
var IsLoser = true;
|
|
247
455
|
try {
|
|
248
|
-
|
|
249
|
-
} catch {
|
|
456
|
+
IsLoser = !console.log.apply;
|
|
457
|
+
} catch (e) {
|
|
250
458
|
}
|
|
251
|
-
var
|
|
252
|
-
function
|
|
253
|
-
this.id = ++
|
|
254
|
-
|
|
459
|
+
var ID = 0;
|
|
460
|
+
function initFn(set) {
|
|
461
|
+
this.id = ++ID;
|
|
462
|
+
Traffic();
|
|
463
|
+
var o = {
|
|
255
464
|
type: "mp3",
|
|
256
465
|
//输出类型:mp3,wav,wav输出文件尺寸超大不推荐使用,但mp3编码支持会导致js文件超大,如果不需支持mp3可以使js文件大幅减小
|
|
257
466
|
bitRate: 16,
|
|
@@ -260,7 +469,7 @@ function fe(e) {
|
|
|
260
469
|
//采样率,wav格式大小=sampleRate*时间;mp3此项对低比特率有影响,高比特率几乎无影响。
|
|
261
470
|
//wav任意值,mp3取值范围:48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000
|
|
262
471
|
//采样率参考https://www.cnblogs.com/devin87/p/mp3-recorder.html
|
|
263
|
-
onProcess:
|
|
472
|
+
onProcess: NOOP
|
|
264
473
|
//fn(buffers,powerLevel,bufferDuration,bufferSampleRate,newBufferIdx,asyncEnd) buffers=[[Int16,...],...]:缓冲的PCM数据,为从开始录音到现在的所有pcm片段;powerLevel:当前缓冲的音量级别0-100,bufferDuration:已缓冲时长,bufferSampleRate:缓冲使用的采样率(当type支持边录边转码(Worker)时,此采样率和设置的采样率相同,否则不一定相同);newBufferIdx:本次回调新增的buffer起始索引;asyncEnd:fn() 如果onProcess是异步的(返回值为true时),处理完成时需要调用此回调,如果不是异步的请忽略此参数,此方法回调时必须是真异步(不能真异步时需用setTimeout包裹)。onProcess返回值:如果返回true代表开启异步模式,在某些大量运算的场合异步是必须的,必须在异步处理完成时调用asyncEnd(不能真异步时需用setTimeout包裹),在onProcess执行后新增的buffer会全部替换成空数组,因此本回调开头应立即将newBufferIdx到本次回调结尾位置的buffer全部保存到另外一个数组内,处理完成后写回buffers中本次回调的结尾位置。
|
|
265
474
|
//*******高级设置******
|
|
266
475
|
//,sourceStream:MediaStream Object
|
|
@@ -278,250 +487,450 @@ function fe(e) {
|
|
|
278
487
|
//目前只有mp3格式实现了实时编码,在支持实时处理的环境中将会实时的将编码出来的mp3片段通过此方法回调,所有的chunkBytes拼接到一起即为完整的mp3,此种拼接的结果比mock方法实时生成的音质更加,因为天然避免了首尾的静默
|
|
279
488
|
//目前除mp3外其他格式不可以提供此回调,提供了将在open时直接走fail逻辑
|
|
280
489
|
};
|
|
281
|
-
for (var
|
|
282
|
-
|
|
283
|
-
|
|
490
|
+
for (var k in set) {
|
|
491
|
+
o[k] = set[k];
|
|
492
|
+
}
|
|
493
|
+
this.set = o;
|
|
494
|
+
this._S = 9;
|
|
495
|
+
this.Sync = { O: 9, C: 9 };
|
|
284
496
|
}
|
|
285
|
-
|
|
497
|
+
Recorder.Sync = {
|
|
286
498
|
/*open*/
|
|
287
499
|
O: 9,
|
|
288
500
|
/*close*/
|
|
289
501
|
C: 9
|
|
290
502
|
};
|
|
291
|
-
|
|
292
|
-
CLog
|
|
503
|
+
Recorder.prototype = initFn.prototype = {
|
|
504
|
+
CLog,
|
|
293
505
|
//流相关的数据存储在哪个对象里面;如果提供了sourceStream,数据直接存储在当前对象中,否则存储在全局
|
|
294
506
|
_streamStore: function() {
|
|
295
|
-
|
|
507
|
+
if (this.set.sourceStream) {
|
|
508
|
+
return this;
|
|
509
|
+
} else {
|
|
510
|
+
return Recorder;
|
|
511
|
+
}
|
|
296
512
|
},
|
|
297
513
|
//打开录音资源True(),False(msg,isUserNotAllow),需要调用close。注意:此方法是异步的;一般使用时打开,用完立即关闭;可重复调用,可用来测试是否能录音
|
|
298
|
-
open: function(
|
|
299
|
-
var
|
|
300
|
-
|
|
301
|
-
var
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
514
|
+
open: function(True, False) {
|
|
515
|
+
var This = this, streamStore = This._streamStore();
|
|
516
|
+
True = True || NOOP;
|
|
517
|
+
var failCall = function(errMsg, isUserNotAllow) {
|
|
518
|
+
isUserNotAllow = !!isUserNotAllow;
|
|
519
|
+
This.CLog("录音open失败:" + errMsg + ",isUserNotAllow:" + isUserNotAllow, 1);
|
|
520
|
+
False && False(errMsg, isUserNotAllow);
|
|
521
|
+
};
|
|
522
|
+
var ok = function() {
|
|
523
|
+
This.CLog("open ok id:" + This.id);
|
|
524
|
+
True();
|
|
525
|
+
This._SO = 0;
|
|
526
|
+
};
|
|
527
|
+
var Lock = streamStore.Sync;
|
|
528
|
+
var lockOpen = ++Lock.O, lockClose = Lock.C;
|
|
529
|
+
This._O = This._O_ = lockOpen;
|
|
530
|
+
This._SO = This._S;
|
|
531
|
+
var lockFail = function() {
|
|
532
|
+
if (lockClose != Lock.C || !This._O) {
|
|
533
|
+
var err = "open被取消";
|
|
534
|
+
if (lockOpen == Lock.O) {
|
|
535
|
+
This.close();
|
|
536
|
+
} else {
|
|
537
|
+
err = "open被中断";
|
|
538
|
+
}
|
|
539
|
+
failCall(err);
|
|
540
|
+
return true;
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
var checkMsg = This.envCheck({ envName: "H5", canProcess: true });
|
|
544
|
+
if (checkMsg) {
|
|
545
|
+
failCall("不能录音:" + checkMsg);
|
|
315
546
|
return;
|
|
316
547
|
}
|
|
317
|
-
if (
|
|
318
|
-
if (!
|
|
319
|
-
|
|
548
|
+
if (This.set.sourceStream) {
|
|
549
|
+
if (!Recorder.GetContext()) {
|
|
550
|
+
failCall("不支持此浏览器从流中获取录音");
|
|
320
551
|
return;
|
|
321
552
|
}
|
|
322
|
-
|
|
553
|
+
Disconnect(streamStore);
|
|
554
|
+
This.Stream = This.set.sourceStream;
|
|
555
|
+
This.Stream._call = {};
|
|
323
556
|
try {
|
|
324
|
-
|
|
325
|
-
} catch (
|
|
326
|
-
|
|
557
|
+
Connect(streamStore);
|
|
558
|
+
} catch (e) {
|
|
559
|
+
failCall("从流中打开录音失败:" + e.message);
|
|
327
560
|
return;
|
|
328
561
|
}
|
|
329
|
-
|
|
562
|
+
ok();
|
|
330
563
|
return;
|
|
331
564
|
}
|
|
332
|
-
var
|
|
565
|
+
var codeFail = function(code, msg) {
|
|
333
566
|
try {
|
|
334
567
|
window.top.a;
|
|
335
|
-
} catch {
|
|
336
|
-
|
|
568
|
+
} catch (e) {
|
|
569
|
+
failCall('无权录音(跨域,请尝试给iframe添加麦克风访问策略,如allow="camera;microphone")');
|
|
337
570
|
return;
|
|
338
571
|
}
|
|
339
|
-
/Permission|Allow/i.test(
|
|
572
|
+
if (/Permission|Allow/i.test(code)) {
|
|
573
|
+
failCall("用户拒绝了录音权限", true);
|
|
574
|
+
} else if (window.isSecureContext === false) {
|
|
575
|
+
failCall("浏览器禁止不安全页面录音,可开启https解决");
|
|
576
|
+
} else if (/Found/i.test(code)) {
|
|
577
|
+
failCall(msg + ",无可用麦克风");
|
|
578
|
+
} else {
|
|
579
|
+
failCall(msg);
|
|
580
|
+
}
|
|
340
581
|
};
|
|
341
|
-
if (
|
|
342
|
-
|
|
582
|
+
if (Recorder.IsOpen()) {
|
|
583
|
+
ok();
|
|
343
584
|
return;
|
|
344
585
|
}
|
|
345
|
-
if (!
|
|
346
|
-
|
|
586
|
+
if (!Recorder.Support()) {
|
|
587
|
+
codeFail("", "此浏览器不支持录音");
|
|
347
588
|
return;
|
|
348
589
|
}
|
|
349
|
-
var
|
|
590
|
+
var f1 = function(stream) {
|
|
350
591
|
setTimeout(function() {
|
|
351
|
-
|
|
352
|
-
var
|
|
353
|
-
|
|
592
|
+
stream._call = {};
|
|
593
|
+
var oldStream = Recorder.Stream;
|
|
594
|
+
if (oldStream) {
|
|
595
|
+
Disconnect();
|
|
596
|
+
stream._call = oldStream._call;
|
|
597
|
+
}
|
|
598
|
+
Recorder.Stream = stream;
|
|
599
|
+
if (lockFail()) return;
|
|
600
|
+
if (Recorder.IsOpen()) {
|
|
601
|
+
if (oldStream) This.CLog("发现同时多次调用open", 1);
|
|
602
|
+
Connect(streamStore, 1);
|
|
603
|
+
ok();
|
|
604
|
+
} else {
|
|
605
|
+
failCall("录音功能无效:无音频流");
|
|
606
|
+
}
|
|
354
607
|
}, 100);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
608
|
+
};
|
|
609
|
+
var f2 = function(e) {
|
|
610
|
+
var code = e.name || e.message || e.code + ":" + e;
|
|
611
|
+
This.CLog("请求录音权限错误", 1, e);
|
|
612
|
+
codeFail(code, "无法录音:" + code);
|
|
613
|
+
};
|
|
614
|
+
var trackSet = {
|
|
615
|
+
noiseSuppression: false,
|
|
360
616
|
//默认禁用降噪,原声录制,免得移动端表现怪异(包括系统播放声音变小)
|
|
361
|
-
echoCancellation:
|
|
617
|
+
echoCancellation: false
|
|
362
618
|
//回声消除
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
|
|
619
|
+
};
|
|
620
|
+
var trackSet2 = This.set.audioTrackSet;
|
|
621
|
+
for (var k in trackSet2) trackSet[k] = trackSet2[k];
|
|
622
|
+
trackSet.sampleRate = Recorder.Ctx.sampleRate;
|
|
366
623
|
try {
|
|
367
|
-
var
|
|
368
|
-
} catch (
|
|
369
|
-
|
|
624
|
+
var pro = Recorder.Scope[getUserMediaTxt]({ audio: trackSet }, f1, f2);
|
|
625
|
+
} catch (e) {
|
|
626
|
+
This.CLog(getUserMediaTxt, 3, e);
|
|
627
|
+
pro = Recorder.Scope[getUserMediaTxt]({ audio: true }, f1, f2);
|
|
628
|
+
}
|
|
629
|
+
if (pro && pro.then) {
|
|
630
|
+
pro.then(f1)[CatchTxt](f2);
|
|
370
631
|
}
|
|
371
|
-
S && S.then && S.then(c)[ee](u);
|
|
372
632
|
},
|
|
373
633
|
//关闭释放录音资源
|
|
374
|
-
close: function(
|
|
375
|
-
|
|
376
|
-
var
|
|
377
|
-
|
|
378
|
-
var
|
|
379
|
-
|
|
380
|
-
|
|
634
|
+
close: function(call) {
|
|
635
|
+
call = call || NOOP;
|
|
636
|
+
var This = this, streamStore = This._streamStore();
|
|
637
|
+
This._stop();
|
|
638
|
+
var Lock = streamStore.Sync;
|
|
639
|
+
This._O = 0;
|
|
640
|
+
if (This._O_ != Lock.O) {
|
|
641
|
+
This.CLog("close被忽略(因为同时open了多个rec,只有最后一个会真正close)", 3);
|
|
642
|
+
call();
|
|
381
643
|
return;
|
|
382
644
|
}
|
|
383
|
-
|
|
645
|
+
Lock.C++;
|
|
646
|
+
Disconnect(streamStore);
|
|
647
|
+
This.CLog("close");
|
|
648
|
+
call();
|
|
384
649
|
},
|
|
385
650
|
/*模拟一段录音数据,后面可以调用stop进行编码,需提供pcm数据[1,2,3...],pcm的采样率*/
|
|
386
|
-
mock: function(
|
|
387
|
-
var
|
|
388
|
-
|
|
651
|
+
mock: function(pcmData, pcmSampleRate) {
|
|
652
|
+
var This = this;
|
|
653
|
+
This._stop();
|
|
654
|
+
This.isMock = 1;
|
|
655
|
+
This.mockEnvInfo = null;
|
|
656
|
+
This.buffers = [pcmData];
|
|
657
|
+
This.recSize = pcmData.length;
|
|
658
|
+
This[srcSampleRateTxt] = pcmSampleRate;
|
|
659
|
+
return This;
|
|
389
660
|
},
|
|
390
|
-
envCheck: function(
|
|
391
|
-
var
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
661
|
+
envCheck: function(envInfo) {
|
|
662
|
+
var errMsg, This = this, set = This.set;
|
|
663
|
+
var tag = "CPU_BE";
|
|
664
|
+
if (!errMsg && !Recorder[tag] && window.Int8Array && !new Int8Array(new Int32Array([1]).buffer)[0]) {
|
|
665
|
+
Traffic(tag);
|
|
666
|
+
errMsg = "不支持" + tag + "架构";
|
|
395
667
|
}
|
|
396
|
-
|
|
668
|
+
if (!errMsg) {
|
|
669
|
+
var type = set.type;
|
|
670
|
+
if (This[type + "_envCheck"]) {
|
|
671
|
+
errMsg = This[type + "_envCheck"](envInfo, set);
|
|
672
|
+
} else {
|
|
673
|
+
if (set.takeoffEncodeChunk) {
|
|
674
|
+
errMsg = type + "类型" + (This[type] ? "" : "(未加载编码器)") + "不支持设置takeoffEncodeChunk";
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
return errMsg || "";
|
|
397
679
|
},
|
|
398
|
-
envStart: function(
|
|
399
|
-
var
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
680
|
+
envStart: function(mockEnvInfo, sampleRate) {
|
|
681
|
+
var This = this, set = This.set;
|
|
682
|
+
This.isMock = mockEnvInfo ? 1 : 0;
|
|
683
|
+
This.mockEnvInfo = mockEnvInfo;
|
|
684
|
+
This.buffers = [];
|
|
685
|
+
This.recSize = 0;
|
|
686
|
+
This.envInLast = 0;
|
|
687
|
+
This.envInFirst = 0;
|
|
688
|
+
This.envInFix = 0;
|
|
689
|
+
This.envInFixTs = [];
|
|
690
|
+
var setSr = set[sampleRateTxt];
|
|
691
|
+
if (setSr > sampleRate) {
|
|
692
|
+
set[sampleRateTxt] = sampleRate;
|
|
693
|
+
} else {
|
|
694
|
+
setSr = 0;
|
|
695
|
+
}
|
|
696
|
+
This[srcSampleRateTxt] = sampleRate;
|
|
697
|
+
This.CLog(
|
|
698
|
+
srcSampleRateTxt + ": " + sampleRate + " set." + sampleRateTxt + ": " + set[sampleRateTxt] + (setSr ? " 忽略" + setSr : ""),
|
|
699
|
+
setSr ? 3 : 0
|
|
700
|
+
);
|
|
701
|
+
This.engineCtx = 0;
|
|
702
|
+
if (This[set.type + "_start"]) {
|
|
703
|
+
var engineCtx = This.engineCtx = This[set.type + "_start"](set);
|
|
704
|
+
if (engineCtx) {
|
|
705
|
+
engineCtx.pcmDatas = [];
|
|
706
|
+
engineCtx.pcmSize = 0;
|
|
707
|
+
}
|
|
408
708
|
}
|
|
409
709
|
},
|
|
410
710
|
envResume: function() {
|
|
411
711
|
this.envInFixTs = [];
|
|
412
712
|
},
|
|
413
|
-
envIn: function(
|
|
414
|
-
var
|
|
415
|
-
|
|
416
|
-
var
|
|
417
|
-
|
|
418
|
-
var
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
713
|
+
envIn: function(pcm, sum) {
|
|
714
|
+
var This = this, set = This.set, engineCtx = This.engineCtx;
|
|
715
|
+
var bufferSampleRate = This[srcSampleRateTxt];
|
|
716
|
+
var size = pcm.length;
|
|
717
|
+
var powerLevel = Recorder.PowerLevel(sum, size);
|
|
718
|
+
var buffers = This.buffers;
|
|
719
|
+
var bufferFirstIdx = buffers.length;
|
|
720
|
+
buffers.push(pcm);
|
|
721
|
+
var buffersThis = buffers;
|
|
722
|
+
var bufferFirstIdxThis = bufferFirstIdx;
|
|
723
|
+
var now = Date.now();
|
|
724
|
+
var pcmTime = Math.round(size / bufferSampleRate * 1e3);
|
|
725
|
+
This.envInLast = now;
|
|
726
|
+
if (This.buffers.length == 1) {
|
|
727
|
+
This.envInFirst = now - pcmTime;
|
|
728
|
+
}
|
|
729
|
+
var envInFixTs = This.envInFixTs;
|
|
730
|
+
envInFixTs.splice(0, 0, { t: now, d: pcmTime });
|
|
731
|
+
var tsInStart = now, tsPcm = 0;
|
|
732
|
+
for (var i = 0; i < envInFixTs.length; i++) {
|
|
733
|
+
var o = envInFixTs[i];
|
|
734
|
+
if (now - o.t > 3e3) {
|
|
735
|
+
envInFixTs.length = i;
|
|
424
736
|
break;
|
|
425
737
|
}
|
|
426
|
-
|
|
738
|
+
tsInStart = o.t;
|
|
739
|
+
tsPcm += o.d;
|
|
427
740
|
}
|
|
428
|
-
var
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
741
|
+
var tsInPrev = envInFixTs[1];
|
|
742
|
+
var tsIn = now - tsInStart;
|
|
743
|
+
var lost = tsIn - tsPcm;
|
|
744
|
+
if (lost > tsIn / 3 && (tsInPrev && tsIn > 1e3 || envInFixTs.length >= 6)) {
|
|
745
|
+
var addTime = now - tsInPrev.t - pcmTime;
|
|
746
|
+
if (addTime > pcmTime / 5) {
|
|
747
|
+
var fixOpen = !set.disableEnvInFix;
|
|
748
|
+
This.CLog("[" + now + "]" + (fixOpen ? "" : "未") + "补偿" + addTime + "ms", 3);
|
|
749
|
+
This.envInFix += addTime;
|
|
750
|
+
if (fixOpen) {
|
|
751
|
+
var addPcm = new Int16Array(addTime * bufferSampleRate / 1e3);
|
|
752
|
+
size += addPcm.length;
|
|
753
|
+
buffers.push(addPcm);
|
|
436
754
|
}
|
|
437
755
|
}
|
|
438
756
|
}
|
|
439
|
-
var
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
757
|
+
var sizeOld = This.recSize, addSize = size;
|
|
758
|
+
var bufferSize = sizeOld + addSize;
|
|
759
|
+
This.recSize = bufferSize;
|
|
760
|
+
if (engineCtx) {
|
|
761
|
+
var chunkInfo = Recorder.SampleData(
|
|
762
|
+
buffers,
|
|
763
|
+
bufferSampleRate,
|
|
764
|
+
set[sampleRateTxt],
|
|
765
|
+
engineCtx.chunkInfo
|
|
446
766
|
);
|
|
447
|
-
|
|
767
|
+
engineCtx.chunkInfo = chunkInfo;
|
|
768
|
+
sizeOld = engineCtx.pcmSize;
|
|
769
|
+
addSize = chunkInfo.data.length;
|
|
770
|
+
bufferSize = sizeOld + addSize;
|
|
771
|
+
engineCtx.pcmSize = bufferSize;
|
|
772
|
+
buffers = engineCtx.pcmDatas;
|
|
773
|
+
bufferFirstIdx = buffers.length;
|
|
774
|
+
buffers.push(chunkInfo.data);
|
|
775
|
+
bufferSampleRate = chunkInfo[sampleRateTxt];
|
|
448
776
|
}
|
|
449
|
-
var
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
777
|
+
var duration = Math.round(bufferSize / bufferSampleRate * 1e3);
|
|
778
|
+
var bufferNextIdx = buffers.length;
|
|
779
|
+
var bufferNextIdxThis = buffersThis.length;
|
|
780
|
+
var asyncEnd = function() {
|
|
781
|
+
var num = asyncBegin ? 0 : -addSize;
|
|
782
|
+
var hasClear2 = buffers[0] == null;
|
|
783
|
+
for (var i2 = bufferFirstIdx; i2 < bufferNextIdx; i2++) {
|
|
784
|
+
var buffer = buffers[i2];
|
|
785
|
+
if (buffer == null) {
|
|
786
|
+
hasClear2 = 1;
|
|
787
|
+
} else {
|
|
788
|
+
num += buffer.length;
|
|
789
|
+
if (engineCtx && buffer.length) {
|
|
790
|
+
This[set.type + "_encode"](engineCtx, buffer);
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
if (hasClear2 && engineCtx) {
|
|
795
|
+
var i2 = bufferFirstIdxThis;
|
|
796
|
+
if (buffersThis[0]) {
|
|
797
|
+
i2 = 0;
|
|
798
|
+
}
|
|
799
|
+
for (; i2 < bufferNextIdxThis; i2++) {
|
|
800
|
+
buffersThis[i2] = null;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
if (hasClear2) {
|
|
804
|
+
num = asyncBegin ? addSize : 0;
|
|
805
|
+
buffers[0] = null;
|
|
453
806
|
}
|
|
454
|
-
if (
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
807
|
+
if (engineCtx) {
|
|
808
|
+
engineCtx.pcmSize += num;
|
|
809
|
+
} else {
|
|
810
|
+
This.recSize += num;
|
|
458
811
|
}
|
|
459
|
-
|
|
460
|
-
|
|
812
|
+
};
|
|
813
|
+
var asyncBegin = 0, procTxt = "rec.set.onProcess";
|
|
461
814
|
try {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
815
|
+
asyncBegin = set.onProcess(
|
|
816
|
+
buffers,
|
|
817
|
+
powerLevel,
|
|
818
|
+
duration,
|
|
819
|
+
bufferSampleRate,
|
|
820
|
+
bufferFirstIdx,
|
|
821
|
+
asyncEnd
|
|
469
822
|
);
|
|
470
|
-
} catch (
|
|
471
|
-
console.error(
|
|
472
|
-
}
|
|
473
|
-
var
|
|
474
|
-
if (
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
823
|
+
} catch (e) {
|
|
824
|
+
console.error(procTxt + "回调出错是不允许的,需保证不会抛异常", e);
|
|
825
|
+
}
|
|
826
|
+
var slowT = Date.now() - now;
|
|
827
|
+
if (slowT > 10 && This.envInFirst - now > 1e3) {
|
|
828
|
+
This.CLog(procTxt + "低性能,耗时" + slowT + "ms", 3);
|
|
829
|
+
}
|
|
830
|
+
if (asyncBegin === true) {
|
|
831
|
+
var hasClear = 0;
|
|
832
|
+
for (var i = bufferFirstIdx; i < bufferNextIdx; i++) {
|
|
833
|
+
if (buffers[i] == null) {
|
|
834
|
+
hasClear = 1;
|
|
835
|
+
} else {
|
|
836
|
+
buffers[i] = new Int16Array(0);
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
if (hasClear) {
|
|
840
|
+
This.CLog("未进入异步前不能清除buffers", 3);
|
|
841
|
+
} else {
|
|
842
|
+
if (engineCtx) {
|
|
843
|
+
engineCtx.pcmSize -= addSize;
|
|
844
|
+
} else {
|
|
845
|
+
This.recSize -= addSize;
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
} else {
|
|
849
|
+
asyncEnd();
|
|
850
|
+
}
|
|
480
851
|
},
|
|
481
852
|
//开始录音,需先调用open;只要open成功时,调用此方法是安全的,如果未open强行调用导致的内部错误将不会有任何提示,stop时自然能得到错误
|
|
482
853
|
start: function() {
|
|
483
|
-
var
|
|
484
|
-
|
|
485
|
-
|
|
854
|
+
var This = this, ctx = Recorder.Ctx;
|
|
855
|
+
var isOpen = 1;
|
|
856
|
+
if (This.set.sourceStream) {
|
|
857
|
+
if (!This.Stream) {
|
|
858
|
+
isOpen = 0;
|
|
859
|
+
}
|
|
860
|
+
} else if (!Recorder.IsOpen()) {
|
|
861
|
+
isOpen = 0;
|
|
862
|
+
}
|
|
863
|
+
if (!isOpen) {
|
|
864
|
+
This.CLog("未open", 1);
|
|
486
865
|
return;
|
|
487
866
|
}
|
|
488
|
-
|
|
489
|
-
|
|
867
|
+
This.CLog("开始录音");
|
|
868
|
+
This._stop();
|
|
869
|
+
This.state = 3;
|
|
870
|
+
This.envStart(null, ctx[sampleRateTxt]);
|
|
871
|
+
if (This._SO && This._SO + 1 != This._S) {
|
|
872
|
+
This.CLog("start被中断", 3);
|
|
490
873
|
return;
|
|
491
874
|
}
|
|
492
|
-
|
|
493
|
-
var
|
|
494
|
-
|
|
875
|
+
This._SO = 0;
|
|
876
|
+
var end = function() {
|
|
877
|
+
if (This.state == 3) {
|
|
878
|
+
This.state = 1;
|
|
879
|
+
This.resume();
|
|
880
|
+
}
|
|
495
881
|
};
|
|
496
|
-
if (
|
|
497
|
-
var
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
882
|
+
if (ctx.state == "suspended") {
|
|
883
|
+
var tag = "AudioContext resume: ";
|
|
884
|
+
This.CLog(tag + "wait...");
|
|
885
|
+
ctx.resume().then(function() {
|
|
886
|
+
This.CLog(tag + ctx.state);
|
|
887
|
+
end();
|
|
888
|
+
})[CatchTxt](function(e) {
|
|
889
|
+
This.CLog(tag + ctx.state + " 可能无法录音:" + e.message, 1, e);
|
|
890
|
+
end();
|
|
502
891
|
});
|
|
503
|
-
} else
|
|
504
|
-
|
|
892
|
+
} else {
|
|
893
|
+
end();
|
|
894
|
+
}
|
|
505
895
|
},
|
|
506
896
|
/*暂停录音*/
|
|
507
897
|
pause: function() {
|
|
508
|
-
var
|
|
509
|
-
|
|
898
|
+
var This = this;
|
|
899
|
+
if (This.state) {
|
|
900
|
+
This.state = 2;
|
|
901
|
+
This.CLog("pause");
|
|
902
|
+
delete This._streamStore().Stream._call[This.id];
|
|
903
|
+
}
|
|
510
904
|
},
|
|
511
905
|
/*恢复录音*/
|
|
512
906
|
resume: function() {
|
|
513
|
-
var
|
|
514
|
-
if (
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
907
|
+
var This = this;
|
|
908
|
+
if (This.state) {
|
|
909
|
+
This.state = 1;
|
|
910
|
+
This.CLog("resume");
|
|
911
|
+
This.envResume();
|
|
912
|
+
var stream = This._streamStore().Stream;
|
|
913
|
+
stream._call[This.id] = function(pcm, sum) {
|
|
914
|
+
if (This.state == 1) {
|
|
915
|
+
This.envIn(pcm, sum);
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
ConnAlive(stream);
|
|
520
919
|
}
|
|
521
920
|
},
|
|
522
|
-
_stop: function(
|
|
523
|
-
var
|
|
524
|
-
|
|
921
|
+
_stop: function(keepEngine) {
|
|
922
|
+
var This = this, set = This.set;
|
|
923
|
+
if (!This.isMock) {
|
|
924
|
+
This._S++;
|
|
925
|
+
}
|
|
926
|
+
if (This.state) {
|
|
927
|
+
This.pause();
|
|
928
|
+
This.state = 0;
|
|
929
|
+
}
|
|
930
|
+
if (!keepEngine && This[set.type + "_stop"]) {
|
|
931
|
+
This[set.type + "_stop"](This.engineCtx);
|
|
932
|
+
This.engineCtx = 0;
|
|
933
|
+
}
|
|
525
934
|
},
|
|
526
935
|
/*
|
|
527
936
|
结束录音并返回录音数据blob对象
|
|
@@ -531,213 +940,310 @@ o.prototype = fe.prototype = {
|
|
|
531
940
|
False(msg)
|
|
532
941
|
autoClose:false 可选,是否自动调用close,默认为false
|
|
533
942
|
*/
|
|
534
|
-
stop: function(
|
|
535
|
-
var
|
|
536
|
-
|
|
537
|
-
|
|
943
|
+
stop: function(True, False, autoClose) {
|
|
944
|
+
var This = this, set = This.set, t1;
|
|
945
|
+
var envInMS = This.envInLast - This.envInFirst, envInLen = envInMS && This.buffers.length;
|
|
946
|
+
This.CLog(
|
|
947
|
+
"stop 和start时差" + (envInMS ? envInMS + "ms 补偿" + This.envInFix + "ms envIn:" + envInLen + " fps:" + (envInLen / envInMS * 1e3).toFixed(1) : "-")
|
|
538
948
|
);
|
|
539
|
-
var
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
949
|
+
var end = function() {
|
|
950
|
+
This._stop();
|
|
951
|
+
if (autoClose) {
|
|
952
|
+
This.close();
|
|
953
|
+
}
|
|
954
|
+
};
|
|
955
|
+
var err = function(msg) {
|
|
956
|
+
This.CLog("结束录音失败:" + msg, 1);
|
|
957
|
+
False && False(msg);
|
|
958
|
+
end();
|
|
959
|
+
};
|
|
960
|
+
var ok = function(blob, duration2) {
|
|
961
|
+
This.CLog(
|
|
962
|
+
"结束录音 编码花" + (Date.now() - t1) + "ms 音频时长" + duration2 + "ms 文件大小" + blob.size + "b"
|
|
963
|
+
);
|
|
964
|
+
if (set.takeoffEncodeChunk) {
|
|
965
|
+
This.CLog("启用takeoffEncodeChunk后stop返回的blob长度为0不提供音频数据", 3);
|
|
966
|
+
} else if (blob.size < Math.max(100, duration2 / 2)) {
|
|
967
|
+
err("生成的" + set.type + "无效");
|
|
550
968
|
return;
|
|
551
969
|
}
|
|
552
|
-
|
|
970
|
+
True && True(blob, duration2);
|
|
971
|
+
end();
|
|
553
972
|
};
|
|
554
|
-
if (!
|
|
555
|
-
var
|
|
556
|
-
if (!
|
|
973
|
+
if (!This.isMock) {
|
|
974
|
+
var isCtxWait = This.state == 3;
|
|
975
|
+
if (!This.state || isCtxWait) {
|
|
557
976
|
console.log(
|
|
558
|
-
"未开始录音" + (
|
|
977
|
+
"未开始录音" + (isCtxWait ? ",开始录音前无用户交互导致AudioContext未运行" : "")
|
|
559
978
|
);
|
|
560
979
|
return;
|
|
561
980
|
}
|
|
562
|
-
|
|
981
|
+
This._stop(true);
|
|
563
982
|
}
|
|
564
|
-
var
|
|
565
|
-
if (!
|
|
566
|
-
|
|
983
|
+
var size = This.recSize;
|
|
984
|
+
if (!size) {
|
|
985
|
+
err("未采集到录音");
|
|
567
986
|
return;
|
|
568
987
|
}
|
|
569
|
-
if (!
|
|
570
|
-
|
|
988
|
+
if (!This.buffers[0]) {
|
|
989
|
+
err("音频buffers被释放");
|
|
571
990
|
return;
|
|
572
991
|
}
|
|
573
|
-
if (!
|
|
574
|
-
|
|
992
|
+
if (!This[set.type]) {
|
|
993
|
+
err("未加载" + set.type + "编码器");
|
|
575
994
|
return;
|
|
576
995
|
}
|
|
577
|
-
if (
|
|
578
|
-
var
|
|
579
|
-
if (
|
|
580
|
-
|
|
996
|
+
if (This.isMock) {
|
|
997
|
+
var checkMsg = This.envCheck(This.mockEnvInfo || { envName: "mock", canProcess: false });
|
|
998
|
+
if (checkMsg) {
|
|
999
|
+
err("录音错误:" + checkMsg);
|
|
581
1000
|
return;
|
|
582
1001
|
}
|
|
583
1002
|
}
|
|
584
|
-
var
|
|
585
|
-
if (
|
|
586
|
-
var
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
1003
|
+
var engineCtx = This.engineCtx;
|
|
1004
|
+
if (This[set.type + "_complete"] && engineCtx) {
|
|
1005
|
+
var duration = Math.round(engineCtx.pcmSize / set[sampleRateTxt] * 1e3);
|
|
1006
|
+
t1 = Date.now();
|
|
1007
|
+
This[set.type + "_complete"](
|
|
1008
|
+
engineCtx,
|
|
1009
|
+
function(blob) {
|
|
1010
|
+
ok(blob, duration);
|
|
591
1011
|
},
|
|
592
|
-
|
|
1012
|
+
err
|
|
593
1013
|
);
|
|
594
1014
|
return;
|
|
595
1015
|
}
|
|
596
|
-
|
|
597
|
-
var
|
|
598
|
-
|
|
599
|
-
var
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
1016
|
+
t1 = Date.now();
|
|
1017
|
+
var chunk = Recorder.SampleData(This.buffers, This[srcSampleRateTxt], set[sampleRateTxt]);
|
|
1018
|
+
set[sampleRateTxt] = chunk[sampleRateTxt];
|
|
1019
|
+
var res = chunk.data;
|
|
1020
|
+
var duration = Math.round(res.length / set[sampleRateTxt] * 1e3);
|
|
1021
|
+
This.CLog("采样" + size + "->" + res.length + " 花:" + (Date.now() - t1) + "ms");
|
|
1022
|
+
setTimeout(function() {
|
|
1023
|
+
t1 = Date.now();
|
|
1024
|
+
This[set.type](
|
|
1025
|
+
res,
|
|
1026
|
+
function(blob) {
|
|
1027
|
+
ok(blob, duration);
|
|
605
1028
|
},
|
|
606
|
-
function(
|
|
607
|
-
|
|
1029
|
+
function(msg) {
|
|
1030
|
+
err(msg);
|
|
608
1031
|
}
|
|
609
1032
|
);
|
|
610
1033
|
});
|
|
611
1034
|
}
|
|
612
1035
|
};
|
|
613
|
-
var
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
1036
|
+
var WebM_Extract = function(inBytes, scope) {
|
|
1037
|
+
if (!scope.pos) {
|
|
1038
|
+
scope.pos = [0];
|
|
1039
|
+
scope.tracks = {};
|
|
1040
|
+
scope.bytes = [];
|
|
1041
|
+
}
|
|
1042
|
+
var tracks = scope.tracks, position = [scope.pos[0]];
|
|
1043
|
+
var endPos = function() {
|
|
1044
|
+
scope.pos[0] = position[0];
|
|
1045
|
+
};
|
|
1046
|
+
var sBL = scope.bytes.length;
|
|
1047
|
+
var bytes = new Uint8Array(sBL + inBytes.length);
|
|
1048
|
+
bytes.set(scope.bytes);
|
|
1049
|
+
bytes.set(inBytes, sBL);
|
|
1050
|
+
scope.bytes = bytes;
|
|
1051
|
+
if (!scope._ht) {
|
|
1052
|
+
readMatroskaVInt(bytes, position);
|
|
1053
|
+
readMatroskaBlock(bytes, position);
|
|
1054
|
+
if (!BytesEq(readMatroskaVInt(bytes, position), [24, 83, 128, 103])) {
|
|
620
1055
|
return;
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
1056
|
+
}
|
|
1057
|
+
readMatroskaVInt(bytes, position);
|
|
1058
|
+
while (position[0] < bytes.length) {
|
|
1059
|
+
var eid0 = readMatroskaVInt(bytes, position);
|
|
1060
|
+
var bytes0 = readMatroskaBlock(bytes, position);
|
|
1061
|
+
var pos0 = [0], audioIdx = 0;
|
|
1062
|
+
if (!bytes0) return;
|
|
1063
|
+
if (BytesEq(eid0, [22, 84, 174, 107])) {
|
|
1064
|
+
while (pos0[0] < bytes0.length) {
|
|
1065
|
+
var eid1 = readMatroskaVInt(bytes0, pos0);
|
|
1066
|
+
var bytes1 = readMatroskaBlock(bytes0, pos0);
|
|
1067
|
+
var pos1 = [0], track = { channels: 0, sampleRate: 0 };
|
|
1068
|
+
if (BytesEq(eid1, [174])) {
|
|
1069
|
+
while (pos1[0] < bytes1.length) {
|
|
1070
|
+
var eid2 = readMatroskaVInt(bytes1, pos1);
|
|
1071
|
+
var bytes2 = readMatroskaBlock(bytes1, pos1);
|
|
1072
|
+
var pos2 = [0];
|
|
1073
|
+
if (BytesEq(eid2, [215])) {
|
|
1074
|
+
var val = BytesInt(bytes2);
|
|
1075
|
+
track.number = val;
|
|
1076
|
+
tracks[val] = track;
|
|
1077
|
+
} else if (BytesEq(eid2, [131])) {
|
|
1078
|
+
var val = BytesInt(bytes2);
|
|
1079
|
+
if (val == 1) track.type = "video";
|
|
1080
|
+
else if (val == 2) {
|
|
1081
|
+
track.type = "audio";
|
|
1082
|
+
if (!audioIdx) scope.track0 = track;
|
|
1083
|
+
track.idx = audioIdx++;
|
|
1084
|
+
} else track.type = "Type-" + val;
|
|
1085
|
+
} else if (BytesEq(eid2, [134])) {
|
|
1086
|
+
var str = "";
|
|
1087
|
+
for (var i = 0; i < bytes2.length; i++) {
|
|
1088
|
+
str += String.fromCharCode(bytes2[i]);
|
|
1089
|
+
}
|
|
1090
|
+
track.codec = str;
|
|
1091
|
+
} else if (BytesEq(eid2, [225])) {
|
|
1092
|
+
while (pos2[0] < bytes2.length) {
|
|
1093
|
+
var eid3 = readMatroskaVInt(bytes2, pos2);
|
|
1094
|
+
var bytes3 = readMatroskaBlock(bytes2, pos2);
|
|
1095
|
+
if (BytesEq(eid3, [181])) {
|
|
1096
|
+
var val = 0, arr = new Uint8Array(bytes3.reverse()).buffer;
|
|
1097
|
+
if (bytes3.length == 4) val = new Float32Array(arr)[0];
|
|
1098
|
+
else if (bytes3.length == 8) val = new Float64Array(arr)[0];
|
|
1099
|
+
else CLog("WebM Track !Float", 1, bytes3);
|
|
1100
|
+
track[sampleRateTxt] = Math.round(val);
|
|
1101
|
+
} else if (BytesEq(eid3, [98, 100])) track.bitDepth = BytesInt(bytes3);
|
|
1102
|
+
else if (BytesEq(eid3, [159])) track.channels = BytesInt(bytes3);
|
|
647
1103
|
}
|
|
1104
|
+
}
|
|
648
1105
|
}
|
|
1106
|
+
}
|
|
649
1107
|
}
|
|
650
|
-
|
|
1108
|
+
scope._ht = 1;
|
|
1109
|
+
CLog("WebM Tracks", tracks);
|
|
1110
|
+
endPos();
|
|
651
1111
|
break;
|
|
652
1112
|
}
|
|
653
1113
|
}
|
|
654
1114
|
}
|
|
655
|
-
var
|
|
656
|
-
if (
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
1115
|
+
var track0 = scope.track0;
|
|
1116
|
+
if (!track0) return;
|
|
1117
|
+
if (track0.bitDepth == 16 && /FLOAT/i.test(track0.codec)) {
|
|
1118
|
+
track0.bitDepth = 32;
|
|
1119
|
+
CLog("WebM 16改32位", 3);
|
|
1120
|
+
}
|
|
1121
|
+
if (track0[sampleRateTxt] != scope[sampleRateTxt] || track0.bitDepth != 32 || track0.channels < 1 || !/(\b|_)PCM\b/i.test(track0.codec)) {
|
|
1122
|
+
scope.bytes = [];
|
|
1123
|
+
if (!scope.bad) CLog("WebM Track非预期", 3, scope);
|
|
1124
|
+
scope.bad = 1;
|
|
1125
|
+
return -1;
|
|
1126
|
+
}
|
|
1127
|
+
var datas = [], dataLen = 0;
|
|
1128
|
+
while (position[0] < bytes.length) {
|
|
1129
|
+
var eid1 = readMatroskaVInt(bytes, position);
|
|
1130
|
+
var bytes1 = readMatroskaBlock(bytes, position);
|
|
1131
|
+
if (!bytes1) break;
|
|
1132
|
+
if (BytesEq(eid1, [163])) {
|
|
1133
|
+
var trackNo = bytes1[0] & 15;
|
|
1134
|
+
var track = tracks[trackNo];
|
|
1135
|
+
if (!track) {
|
|
1136
|
+
CLog("WebM !Track" + trackNo, 1, tracks);
|
|
1137
|
+
} else if (track.idx === 0) {
|
|
1138
|
+
var u8arr = new Uint8Array(bytes1.length - 4);
|
|
1139
|
+
for (var i = 4; i < bytes1.length; i++) {
|
|
1140
|
+
u8arr[i - 4] = bytes1[i];
|
|
670
1141
|
}
|
|
1142
|
+
datas.push(u8arr);
|
|
1143
|
+
dataLen += u8arr.length;
|
|
671
1144
|
}
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
if (k) {
|
|
675
|
-
var y = new Uint8Array(s.length - t.pos[0]);
|
|
676
|
-
y.set(s.subarray(t.pos[0])), t.bytes = y, t.pos[0] = 0;
|
|
677
|
-
for (var w = new Uint8Array(k), m = 0, L = 0; m < C.length; m++)
|
|
678
|
-
w.set(C[m], L), L += C[m].length;
|
|
679
|
-
var x = new Float32Array(w.buffer);
|
|
680
|
-
if (T.channels > 1) {
|
|
681
|
-
for (var O = [], m = 0; m < x.length; )
|
|
682
|
-
O.push(x[m]), m += T.channels;
|
|
683
|
-
x = new Float32Array(O);
|
|
684
|
-
}
|
|
685
|
-
return x;
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
}, W = function(e, t) {
|
|
689
|
-
if (!e || e.length != t.length) return !1;
|
|
690
|
-
if (e.length == 1) return e[0] == t[0];
|
|
691
|
-
for (var r = 0; r < e.length; r++)
|
|
692
|
-
if (e[r] != t[r]) return !1;
|
|
693
|
-
return !0;
|
|
694
|
-
}, X = function(e) {
|
|
695
|
-
for (var t = "", r = 0; r < e.length; r++) {
|
|
696
|
-
var n = e[r];
|
|
697
|
-
t += (n < 16 ? "0" : "") + n.toString(16);
|
|
698
|
-
}
|
|
699
|
-
return parseInt(t, 16) || 0;
|
|
700
|
-
}, N = function(e, t, r) {
|
|
701
|
-
var n = t[0];
|
|
702
|
-
if (!(n >= e.length)) {
|
|
703
|
-
var a = e[n], i = ("0000000" + a.toString(2)).substr(-8), s = /^(0*1)(\d*)$/.exec(i);
|
|
704
|
-
if (s) {
|
|
705
|
-
var p = s[1].length, v = [];
|
|
706
|
-
if (!(n + p > e.length)) {
|
|
707
|
-
for (var l = 0; l < p; l++)
|
|
708
|
-
v[l] = e[n], n++;
|
|
709
|
-
return r && (v[0] = parseInt(s[2] || "0", 2)), t[0] = n, v;
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
}, V = function(e, t) {
|
|
714
|
-
var r = N(e, t, 1);
|
|
715
|
-
if (r) {
|
|
716
|
-
var n = X(r), a = t[0], i = [];
|
|
717
|
-
if (n < 2147483647) {
|
|
718
|
-
if (a + n > e.length) return;
|
|
719
|
-
for (var s = 0; s < n; s++)
|
|
720
|
-
i[s] = e[a], a++;
|
|
721
|
-
}
|
|
722
|
-
return t[0] = a, i;
|
|
1145
|
+
}
|
|
1146
|
+
endPos();
|
|
723
1147
|
}
|
|
1148
|
+
if (dataLen) {
|
|
1149
|
+
var more = new Uint8Array(bytes.length - scope.pos[0]);
|
|
1150
|
+
more.set(bytes.subarray(scope.pos[0]));
|
|
1151
|
+
scope.bytes = more;
|
|
1152
|
+
scope.pos[0] = 0;
|
|
1153
|
+
var u8arr = new Uint8Array(dataLen);
|
|
1154
|
+
for (var i = 0, i2 = 0; i < datas.length; i++) {
|
|
1155
|
+
u8arr.set(datas[i], i2);
|
|
1156
|
+
i2 += datas[i].length;
|
|
1157
|
+
}
|
|
1158
|
+
var arr = new Float32Array(u8arr.buffer);
|
|
1159
|
+
if (track0.channels > 1) {
|
|
1160
|
+
var arr2 = [];
|
|
1161
|
+
for (var i = 0; i < arr.length; ) {
|
|
1162
|
+
arr2.push(arr[i]);
|
|
1163
|
+
i += track0.channels;
|
|
1164
|
+
}
|
|
1165
|
+
arr = new Float32Array(arr2);
|
|
1166
|
+
}
|
|
1167
|
+
return arr;
|
|
1168
|
+
}
|
|
1169
|
+
};
|
|
1170
|
+
var BytesEq = function(bytes1, bytes2) {
|
|
1171
|
+
if (!bytes1 || bytes1.length != bytes2.length) return false;
|
|
1172
|
+
if (bytes1.length == 1) return bytes1[0] == bytes2[0];
|
|
1173
|
+
for (var i = 0; i < bytes1.length; i++) {
|
|
1174
|
+
if (bytes1[i] != bytes2[i]) return false;
|
|
1175
|
+
}
|
|
1176
|
+
return true;
|
|
1177
|
+
};
|
|
1178
|
+
var BytesInt = function(bytes) {
|
|
1179
|
+
var s = "";
|
|
1180
|
+
for (var i = 0; i < bytes.length; i++) {
|
|
1181
|
+
var n = bytes[i];
|
|
1182
|
+
s += (n < 16 ? "0" : "") + n.toString(16);
|
|
1183
|
+
}
|
|
1184
|
+
return parseInt(s, 16) || 0;
|
|
724
1185
|
};
|
|
725
|
-
|
|
726
|
-
var
|
|
727
|
-
|
|
728
|
-
var
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
1186
|
+
var readMatroskaVInt = function(arr, pos, trim) {
|
|
1187
|
+
var i = pos[0];
|
|
1188
|
+
if (i >= arr.length) return;
|
|
1189
|
+
var b0 = arr[i], b2 = ("0000000" + b0.toString(2)).substr(-8);
|
|
1190
|
+
var m = /^(0*1)(\d*)$/.exec(b2);
|
|
1191
|
+
if (!m) return;
|
|
1192
|
+
var len = m[1].length, val = [];
|
|
1193
|
+
if (i + len > arr.length) return;
|
|
1194
|
+
for (var i2 = 0; i2 < len; i2++) {
|
|
1195
|
+
val[i2] = arr[i];
|
|
1196
|
+
i++;
|
|
1197
|
+
}
|
|
1198
|
+
if (trim) val[0] = parseInt(m[2] || "0", 2);
|
|
1199
|
+
pos[0] = i;
|
|
1200
|
+
return val;
|
|
1201
|
+
};
|
|
1202
|
+
var readMatroskaBlock = function(arr, pos) {
|
|
1203
|
+
var lenVal = readMatroskaVInt(arr, pos, 1);
|
|
1204
|
+
if (!lenVal) return;
|
|
1205
|
+
var len = BytesInt(lenVal);
|
|
1206
|
+
var i = pos[0], val = [];
|
|
1207
|
+
if (len < 2147483647) {
|
|
1208
|
+
if (i + len > arr.length) return;
|
|
1209
|
+
for (var i2 = 0; i2 < len; i2++) {
|
|
1210
|
+
val[i2] = arr[i];
|
|
1211
|
+
i++;
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
pos[0] = i;
|
|
1215
|
+
return val;
|
|
1216
|
+
};
|
|
1217
|
+
Recorder.TrafficImgUrl = "//ia.51.la/go1?id=20469973&pvFlag=1";
|
|
1218
|
+
var Traffic = Recorder.Traffic = function(report) {
|
|
1219
|
+
report = report ? "/" + RecTxt + "/Report/" + report : "";
|
|
1220
|
+
var imgUrl = Recorder.TrafficImgUrl;
|
|
1221
|
+
if (imgUrl) {
|
|
1222
|
+
var data = Recorder.Traffic;
|
|
1223
|
+
var m = /^(https?:..[^\/#]*\/?)[^#]*/i.exec(location.href) || [];
|
|
1224
|
+
var host = m[1] || "http://file/";
|
|
1225
|
+
var idf = (m[0] || host) + report;
|
|
1226
|
+
if (imgUrl.indexOf("//") == 0) {
|
|
1227
|
+
if (/^https:/i.test(idf)) {
|
|
1228
|
+
imgUrl = "https:" + imgUrl;
|
|
1229
|
+
} else {
|
|
1230
|
+
imgUrl = "http:" + imgUrl;
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
if (report) {
|
|
1234
|
+
imgUrl = imgUrl + "&cu=" + encodeURIComponent(host + report);
|
|
1235
|
+
}
|
|
1236
|
+
if (!data[idf]) {
|
|
1237
|
+
data[idf] = 1;
|
|
1238
|
+
var img = new Image();
|
|
1239
|
+
img.src = imgUrl;
|
|
1240
|
+
CLog(
|
|
1241
|
+
"Traffic Analysis Image: " + (report || RecTxt + ".TrafficImgUrl=" + Recorder.TrafficImgUrl)
|
|
736
1242
|
);
|
|
737
1243
|
}
|
|
738
1244
|
}
|
|
739
1245
|
};
|
|
740
1246
|
export {
|
|
741
|
-
|
|
1247
|
+
Recorder
|
|
742
1248
|
};
|
|
743
1249
|
//# sourceMappingURL=recorder.es.js.map
|