/**
本代码为RecordApp在uni-app下使用的适配代码，为压缩版（功能和源码版一致）
GitHub、详细文档、许可及服务协议: https://github.com/xiangyuecn/Recorder/tree/master/app-support-sample/demo_UniApp

【授权】
在uni-app中编译到App平台时仅供测试用（App平台包括：Android App、iOS App），不可用于正式发布或商用，正式发布或商用需先联系作者获取到商用授权许可

在uni-app中编译到其他平台时无此授权限制，比如：H5、小程序，均为免费授权

获取商用授权方式：到DCloud插件市场购买授权 https://ext.dcloud.net.cn/plugin?name=Recorder-NativePlugin-Android （会赠送Android版原生插件）；购买后可联系客服，同时提供订单信息，客服拉你进入VIP支持QQ群，入群后在群文件中可下载此js文件最新源码

客服联系方式：QQ 1251654593 ，或者直接联系作者QQ 753610399 （回复可能没有客服及时）。
**/

/***
录音 RecordApp: uni-app支持文件，支持 H5、App vue、App nvue、微信小程序
GitHub、详细文档、许可及服务协议: https://github.com/xiangyuecn/Recorder/tree/master/app-support-sample/demo_UniApp

DCloud插件地址：https://ext.dcloud.net.cn/plugin?name=Recorder-UniCore
App配套原生插件：https://ext.dcloud.net.cn/plugin?name=Recorder-NativePlugin

全局配置参数：
	RecordApp.UniAppUseLicense:"" App中使用的授权许可，获得授权后请赋值为"我已获得UniAppID=***的商用授权"（***为你项目的uni-app应用标识），设置了UniNativeUtsPlugin时默认为已授权；如果未授权，将会在App打开后第一次调用`RecordApp.RequestPermission`请求录音权限时，弹出“未获得商用授权时，App上仅供测试”提示框。
	
	RecordApp.UniNativeUtsPlugin:null App中启用原生录音插件或uts插件，由App提供原生录音，将原生插件或uts插件赋值给这个变量即可开启支持；使用原生录音插件只需赋值为{nativePlugin:true}即可（提供nativePluginName可指定插件名字，默认为Recorder-NativePlugin），使用uts插件只需import插件后赋值即可（uts插件还未开发，目前不可集成）；如果未提供任何插件，App中将使用H5录音（在renderjs中提供H5录音）。
	
	RecordApp.UniWithoutAppRenderjs:false 不要使用或没有renderjs时，应当设为true，此时App中RecordApp完全运行在逻辑层，比如nvue页面，此时音频编码之类的操作全部在逻辑层，需要提供UniNativeUtsPlugin配置由原生插件进行录音，可视化绘制依旧可以在renderjs中进行。默认为false，RecordApp将在renderjs中进行实际的工作，然后将处理好的数据传回逻辑层，数据比较大时传输会比较慢。

不同平台环境下使用说明：
	【H5】 引入RecordApp和本js，按RecordApp的文档使用即可，和普通网页开发没有区别

	【微信小程序】 引入RecordApp和本js，同时引入RecordApp中的app-miniProgram-wx-support.js即可，录音操作和H5完全相同，其他可视化扩展等使用请参考RecordApp中的小程序说明
	
	【App vue】 引入RecordApp和本js，并创建一个<script module="xxx" lang="renderjs">，在renderjs中也引入RecordApp和本js，录音操作和H5大部分相同，部分回调需要多编写一个renderjs的处理代码，比如onProcess_renderjs，具体的请参考RecordApp文档中的app-support-sample/demo_UniApp文档
	
	【App nvue】 引入RecordApp和本js，配置RecordApp.UniWithoutAppRenderjs=true 和提供RecordApp.UniNativeUtsPlugin，录音操作和H5完全相同，但不支持可视化扩展
***/
!function(e){var t="object"==typeof window&&!!window.document,n=t?window:Object,i="https://github.com/xiangyuecn/Recorder/tree/master/app-support-sample/demo_UniApp";if(n.RecordApp){var r=n.Recorder,a=r.i18n;!function(b,S,e,C,y){"use strict";var h=S.RecordApp,W=h.CLog,B=function(){};h.UniSupportLM="2024-06-25 00:37";var P="app-uni-support.js",j=!1,I=!1,V=!1,M=!1,N=!1;(function(){/* #ifdef APP */if(y){j=!0;var e=navigator.userAgent.replace(/[_\d]/g," ");I=!/\bandroid\b/i.test(e)&&/\bios\b|\biphone\b/i.test(e)}else"object"==typeof plus&&("Android"==plus.os.name?j=!0:"iOS"==plus.os.name&&(I=j=!0)),(V=j)||W("App !plus",1)/* #endif */})(),j||((function(){/* #ifdef H5 */M=!0/* #endif */})(),(function(){/* #ifdef MP-WEIXIN */N=!0/* #endif */})());h.UniIsApp=function(){return j?I?2:1:0};var E=h.UniBtoa=function(e){if("object"==typeof uni&&uni.arrayBufferToBase64)return uni.arrayBufferToBase64(e);for(var t=new Uint8Array(e),n="",i=0,r=t.length;i<r;i++)n+=String.fromCharCode(t[i]);return btoa(n)},T=h.UniAtob=function(e){if("object"==typeof uni&&uni.base64ToArrayBuffer)return uni.base64ToArrayBuffer(e);for(var t=atob(e),n=new Uint8Array(t.length),i=0,r=t.length;i<r;i++)n[i]=t.charCodeAt(i);return n.buffer};h.UniB64Enc=function(e){if("object"==typeof uni&&uni.arrayBufferToBase64){var t=h.UniStr2Buf(e);return uni.arrayBufferToBase64(t)}return btoa(unescape(encodeURIComponent(e)))},h.UniB64Dec=function(e){if("object"==typeof uni&&uni.base64ToArrayBuffer){var t=uni.base64ToArrayBuffer(e);return h.UniBuf2Str(t)}return decodeURIComponent(escape(atob(e)))},h.UniStr2Buf=function(e){for(var t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length),i=0,r=t.length;i<r;i++)n[i]=t.charCodeAt(i);return n.buffer},h.UniBuf2Str=function(e){for(var t=new Uint8Array(e),n="",i=0,r=t.length;i<r;i++)n+=String.fromCharCode(t[i]);return decodeURIComponent(escape(n))};var O=h.UniJsSource={IsSource:!1,pcm_sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=Math.abs(e[n]);return t}};(function(initMemory){!function(){var f=w;!function(e,t){for(var n=w,r=i();;)try{if(768932===parseInt(n(331))/1*(parseInt(n(543))/2)+-parseInt(n(644))/3+parseInt(n(462))/4*(-parseInt(n(327))/5)+-parseInt(n(668))/6+-parseInt(n(507))/7+parseInt(n(469))/8+parseInt(n(422))/9)break;r.push(r.shift())}catch(e){r.push(r.shift())}}();var o={Support:function(e){var t=w;return N?(h[t(512)][t(385)]||W(C(t(657),0,t(599)),1),void e(!1)):M?void e(!1):j?void(!y||h[t(681)]?e(!0):e(!1)):(W(C(t(632)),3),void e(!1))},CanProcess:function(){return!0}};h[f(406)](y?f(629):f(319),o),j&&(W[f(483)]=y?f(564):f(475)),h[f(472)]||(h[f(472)]={id:0,pageShow:{}});var d=function(){return j&&!y&&!h[f(437)]};h[f(391)]=function(e){var t=f,n=h[t(472)][t(600)]={};if(N&&h[t(703)]&&h[t(703)](),d()){n[t(667)]=p(e);var r=h[t(525)];if(r){for(var i=getCurrentPages(),a=!0,o=0,c=i[t(650)];o<c;o++)if(i[o][t(390)].id==r){a=!1;break}a&&(h[t(610)]=null,h[t(525)]=null,h[t(551)]=null)}}},h[f(562)]=function(e){var t=f;if(d()){h[t(649)]=!0,h[t(372)]=1,setTimeout(function(){h[t(372)]=0});var n=e[t(523)];if(n&&n[t(591)]&&n[t(591)][t(407)]){var r=e[t(333)]||e.$&&e.$[t(384)],i=c(e);i&&r?(r==h[t(610)]&&i==h[t(525)]||W(C(t(478))+t(540)+i+t(465)+r),h[t(610)]=r,h[t(525)]!=i&&(h[t(525)]=i,h[t(551)]=n[t(591)][t(407)]())):W(C(t(699))+t(654),1)}else W(C(t(361)),1)}},h[f(299)]=function(e){var t=f;if(j&&y){if(e[t(398)])var n=window[t(706)],r=e[t(333)]||e[t(398)][t(368)][t(387)],i=e[t(398)][t(373)];if(i)if(i[t(329)]=e,n&&r){var a=t(673)+n+t(465)+r;h[t(710)]=a,i[t(490)](t(481),a),h[t(472)][a]?W(C(t(454))+t(359)+a,3):(h[t(472)][a]=1,W(C(t(545))+t(558)+a))}else W(C(t(546))+t(654),1);else W(C(t(400)),1)}};var p=function(e,t,n){var r=f;if(e){if(e[r(535)])return e[r(535)];var i=c(e),a=e[r(333)]||e.$&&e.$[r(384)]}if(t)if(n||A(),r(428)==t)i=h[r(351)],a=h[r(514)];else i=h[r(525)],a=h[r(610)];return i&&a?r(673)+i+r(465)+a:""},v=function(e){var t=f;return t(355)===e||t(428)===e?{Rec_WvCid:p(null,e)}:{Rec_WvCid:e||"?"}},c=function(e){var t=f,n=e[t(523)];return(n=n&&n[t(390)])&&n.id||0},A=function(e){var t=f;if(!h[t(551)])return C(t(459));var n=p(null,1,1),r=h[t(472)][t(600)][t(667)];if(e){if(!h[t(351)])return C(t(528));if(p(null,t(428),1)!=n)return C(t(491))}return r&&r!=n&&W(C(t(653),0,r,n),3),""};function i(){var e=initMemory;return(i=function(){return e})()}h[f(529)]=function(e,i,a){var s=f,t="";t||V||(t=C(s(430)));var o=!t&&function(e,t){var n=s;if(e&&e[n(535)])var r=/^wv_(\d+)_/[n(683)](e[n(535)]),i=r&&r[1];else{var a=e&&e[n(523)],o=a&&a[n(591)];i=(a=a&&a[n(390)])&&a.id}if(i){if(i==h[n(525)])return h[n(551)];if(o)return o[n(407)]();var c=plus[n(587)][n(343)](i);if(c)return c}return t?(A(),h[n(551)]):null}(e,null==e);if(t||o||(t=C(s(null==e?513:589))),t)return t+=C(s(317)),W(t+s(596)+i[s(434)](0,200),1),t;var n=h[s(472)][s(600)];if(n[s(688)]||(n[s(688)]=1,r()),a){var c=("a"+Math[s(418)]())[s(421)](".",""),u=0,l=function(){var e=s;if(0!=u&&u>=a[e(711)])o[e(712)](e(581)+c+e(419)+c+e(648)+i+e(474));else{var t=h[e(340)](l),n=u;u+=524288;var r=a[e(524)](n,u);o[e(712)](e(565)+c+e(518)+c+e(553)+a[e(711)]+e(503)+E(r)+e(590)+t+e(432))}};l()}else o[s(712)](s(315)+i+s(470))},h[f(678)]=function(e,t,n){var r=f,i="";r(301)==typeof t&&(i=t[r(300)]||"",t=t[r(378)]||"");var a="";a||V||(a=C(r(570)));var o=!a&&p(e,null==e);if(a||o||(a=C(r(null==e?555:427))),a)return a+=C(r(639)),W(a+r(596)+t[r(434)](0,200),1),a;h[r(529)](e,r(392)+i+r(538)+JSON[r(572)](C(r(696)))+r(389)+o+r(426)+JSON[r(572)](C(r(617)))+r(663)+JSON[r(572)](C(r(609)))+r(638)+t+r(298),n)},h[f(438)]=function(d,v,f,A){return new Promise(function(n,r){var i=w,a=(v=v||{})[i(682)]||"",o=-1==v[i(674)],t="",c=setTimeout(function(){var e=i;s(),c=0;var t=new Error(C(e(o?425:520),0,a));t[e(399)]=1,r(t)},o?2e3:v[i(674)]||5e3),s=function(){var e=h[i(472)];delete e[u],delete e[t]};o&&(t=h[i(340)](function(){clearTimeout(c)}));var e=function(e){var t=i;if(s(),c)return clearTimeout(c),c=0,e[t(452)]?n({value:e[t(626)],bigBytes:h[t(379)](e[t(452)])}):e[t(635)]?n(e[t(626)]):void r(new Error(a+e[t(531)]))},u=h[i(340)](e),l=i(345)+u+i(415)+u+i(489)+R+i(457)+u+i(380)+(o?i(677)+R+i(457)+t+i(652):"")+i(622)+JSON[i(572)](C(i(655)))+i(362)+JSON[i(572)](C(i(670),0,i(477)+P+'"'))+i(310);v[i(410)]?l+=f:l={preCode:l+=i(325),jsCode:f};var p=h[v[i(410)]?i(529):i(678)](d,l,A);p&&e({errMsg:p})})};var R=f(695),r=function(){var i=f;if(V&&i(542)!=typeof UniServiceJSBridge){var e=h[i(304)];if(e){var t="";try{t=uni[i(309)](R)}catch(e){}if(e==t)return;W(C(i(577)),3)}e="r"+Math[i(418)]();try{uni[i(672)](R,e)}catch(e){}h[i(304)]=e,UniServiceJSBridge[i(413)](R),UniServiceJSBridge[i(621)](R,function(e){var t=i,n=e[t(411)]||"";if(t(584)!=n)if(t(690)!=n)if(-1==n[t(435)](t(713)))-1==n[t(435)](t(403))?W(C(t(480))+JSON[t(572)](e),1):h[t(580)](e);else{var r=h[t(472)][n];r&&r(e)}else F(e);else k(e)})}};function w(e,t){var n=i();return(w=function(e,t){return n[e-=296]})(e,t)}h[f(340)]=function(t){var e=f,n=h[e(472)],r=++n.id,i=e(713)+r;return n[i]=function(e){delete n[i],t(e)},i},h[f(509)]=function(e){UniViewJSBridge[f(349)](R,e)},h[f(700)]=function(r,i,e){var a=f;if(y&&j){var o=h[a(710)];if(o){var c=h[a(472)],s=0,u=++c.id;c[a(403)+u]=function(e){s=e,t()};var l=0,t=function(){var e=a;if(0!=l&&l>=r[e(711)])return delete c[e(403)+u],void i(s);var t=l;l+=524288;var n=r[e(524)](t,l);h[e(509)]({action:e(t?640:306),wvCid:o,wvID:u,mainID:s,b64:E(n)})};t()}else e(C(a(675)))}else e(C(a(715)))},h[f(580)]=function(e){var t=f,n=e[t(485)],r=h[t(472)],i=t(403);t(306)==e[t(411)]&&(n=++r.id,r[i+n]={memory:new Uint8Array(2097152),mOffset:0});var a=r[i+n];if(a){var o=new Uint8Array(T(e[t(563)])),c=o[t(650)];if(a[t(628)]+c>a[t(687)][t(650)]){var s=new Uint8Array(a[t(687)][t(650)]+Math[t(659)](2097152,c));s[t(334)](a[t(687)][t(536)](0,a[t(628)])),a[t(687)]=s}a[t(687)][t(334)](o,a[t(628)]),a[t(628)]+=c,h[t(529)](v(e[t(619)]),t(352)+i+e[t(350)]+t(685)+n+t(574))}else W(C(t(631)),3)},h[f(379)]=function(e){var t=f;if(!V)return null;var n=h[t(472)],r=n[t(403)+e];return delete n[t(403)+e],r?r[t(687)][t(559)][t(524)](0,r[t(628)]):null},h[f(680)]=function(n,i,a,r){var o=f;a=a||B,r=r||B;var c=function(e){var t=w;r(C(t(606),0,n)+(e[t(679)]||e[t(531)]))};if(N){var e=wx[o(431)][o(607)]+"/"+n;wx[o(383)]()[o(357)]({filePath:e,encoding:o(447),data:i,success:function(){a(e)},fail:c})}else V?plus.io[o(686)](plus.io[o(533)],function(e){var t=o;e[t(402)][t(521)](n,{create:!0},function(n){var r=t;n[r(467)](function(e){var t=r;e[t(595)]=function(){a(n[t(676)])},e[t(605)]=c;try{e[t(561)](E(i))}catch(e){c(e)}},c)},c)},c):r(C(o(461)))};var a=function(e){var t=f;if(_(),V){var n=C(t(443),0,b),r=h[t(377)];r&&(!e&&h[t(537)]||(h[t(537)]=1,r[t(328)]?W(C(t(456))+n):W(C(t(424))+n))),h[t(437)]?r?!e&&h[t(366)]||(h[t(366)]=1,W(C(t(615))+n)):W(C(t(448))+n,1):h[t(649)]&&(h[t(551)]?!e&&h[t(371)]||(h[t(371)]=1,W(C(t(388))+n)):W(C(t(708))+n,1))}};h[f(492)]=function(e,t,n,i){var r=f,a=[];if(N){var o=function(n){var r=w;n>=t[r(650)]?i[r(548)](e,a):e[r(370)]()[r(473)](t[n])[r(450)]({node:!0})[r(683)](function(e){var t=r;a[t(571)](e[0][t(578)]),o(n+1)})};o(0)}else if(M){for(var c=0,s=t[r(650)];c<s;c++){var u=t[c],l=e[r(373)][r(517)](u+r(516)),p=l[0],d=l[1];p?(d&&(d[r(576)](r(530))||(p=l[1],d=l[0]),d[r(416)][r(592)](d)),p[r(367)][r(597)]=r(567),(d=document[r(614)](r(460)))[r(490)](r(530),"1"),d[r(367)][r(324)]=d[r(367)][r(585)]=r(575),p[r(416)][r(608)](d)):W(C(r(602),0,u),1),a[r(571)](d)}i[r(548)](e,a)}else{if(V){var v=[];for(c=0,s=t[r(650)];c<s;c++)v[r(571)](r(643)+t[c]+r(500)+(c+1)+r(358));return v[r(571)](n),void h[r(678)](e,v[r(458)]("\n"))}W(C(r(515)),1)}};var m=function(){var r=f;U(r(305),{},null,null,function(e){var t=r,n=e[t(411)];t(627)==n?(i||W("["+a+t(330)+e[t(495)]),i=1,e[t(705)]?W("["+a+"]["+e[t(682)]+"]"+e[t(679)],1):W("["+a+"]["+e[t(682)]+"]"+e[t(679)])):t(320)==n?h[t(414)](e[t(646)],e[t(506)]):t(336)==n||W(C(t(313),0,a)+t(694)+n,3)});var e=h[r(377)],i=0,a=e&&e[r(328)]?l:r(296);e&&(h[r(395)]=1)},s=f(522),u=f(566)+s,l=s,_=h[f(651)]=function(){var e=f,t=h[e(377)],n="";if(!t||!j)return"";if(y&&(n=C(e(568))),!n&&t[e(328)]){if(!h[e(641)]){for(var r=0,i=l=t[e(499)]||l,a=0;!r&&a<2;a++){try{r=uni[e(689)](i)}catch(e){}if(r||i!=s)break;W(C(e(519),0,s,i=s+"-"+(I?e(662):e(302))))}if(h[e(641)]=r)W(C(e(569),0,i));else{i=l==s?u:l;n=C(e(611),0,i)}}}else n||t[e(511)]||(n=C(e(532)));return n&&(h[e(377)]=null,W(n,1)),h[e(311)]=n},U=function(e,t,n,r,i){var a=f;_();var o=h[a(377)];if(o){var c={action:e,args:t||{}};i||(i=function(e){var t=a;t(404)==e[t(436)]?n&&n(e[t(626)],e):r&&r(e[t(679)])}),o[a(328)]?h[a(641)][a(511)](c,i):o[a(511)](c,i)}else{var s=h[a(311)]||C(a(534));r&&r(s)}};h[f(420)]=function(r,i){return new Promise(function(t,n){var e=w;if(!V)return n(new Error(C(e(353))));h[e(395)]||m(),U(r,i,function(e){t(e)},function(e){n(new Error(e))})})},o[f(547)]=function(e,t){a(),e()},o[f(647)]=function(){return e(f(647))},o[f(463)]=function(){return e(f(463))};var e=function(e){var t=f;if(!d())return!1;var n=D[t(704)];if(n){var r=A(1);r?W(r,1):h[t(529)](v(n[t(338)]),t(526)+e+"()")}else W(C(t(586),0,e),3)};o[f(582)]=function(e,t,n){var c=f,r=D[c(704)];D[c(704)]=null,r&&d()&&h[c(529)](v(r[c(338)]),c(397)),!d()||h[c(372)]?(h[c(351)]=h[c(525)],h[c(514)]=h[c(610)],a(!0),function(r){var i=c;if(!V)return r();var e=h[i(466)]=h[i(466)]||{},n=function(e,t,n){W(C(i(527),0,P)+e,t||0),n||r()},t=h[i(377)];if(t||e[i(502)])return e[i(502)]=e[i(502)]||(t[i(328)]?2:1),2==e[i(502)]?n(C(i(348))):n(C(i(636)));var a=i(656)+(e[i(588)]=e[i(588)]||uni[i(445)]()[i(588)]||"0")+i(453);if(h[i(556)]){if(h[i(556)]==a)return n(a);W(C(i(316),0,a),3)}var o=function(e){var t=i;n(t(630)+P+t(557)+a+t(709)+u+t(623)+b+" ",3,e)};if(e[i(332)])return o();o(1),e[i(332)]=1,uni[i(326)]({title:i(382),content:"文件"+P+i(429),showCancel:!1,confirmText:i(347),complete:function(){r()}})}(function(){g(e,t,n)})):n(C(c(344)))};var g=function(i,a,o){var c=f;if(y)return h[c(681)]?void a():void o(C(c(339)));var e=function(r){var i=c;if(I){W(C(i(634)));var a=function(){var e=i;if(h[e(308)])r();else{var t=plus[e(645)][e(613)](e(412))[e(394)](),n=t[e(446)]();1970168948==n?t[e(624)](a):1735552628==n?(W(C(e(363))),r()):(W(C(e(471))+e(488)+n,1),o(C(e(594)),!0)),plus[e(645)][e(442)](t)}};a()}else W(C(i(364))),plus[i(476)][i(541)]([i(376)],function(e){var t=i;0<e[t(408)][t(650)]?(W(C(t(482))+JSON[t(572)](e)),r()):(W(C(t(439)),1,e),o(C(t(620)),!0))},function(e){var t=i;W(C(t(455))+e[t(679)],1,e),o(C(t(669))+e[t(679)])})},t=function(e){var t=c;m(),U(t(446),{},e,o)};if(h[c(437)])e(function(){t(a)});else{var s=v(c(428)),n=function(e){var n=c,t=A(1),r=C(n(579));t?o(r+t):h[n(438)](s,{tag:r,timeout:2e3,useEval:!0},n(374))[n(714)](function(){e()})[n(440)](function(e){var t=n;o(e[t(399)]?r+C(t(698)):e[t(679)])})},r=function(e){var n=c;if(h[n(501)](i)){var t=n(633),r=h[t]||{};h[n(438)](s,{timeout:-1},n(601)+!!e+n(603)+t+"="+JSON[n(572)](r)+n(494))[n(714)](function(e){var t=n;e.ok?a():o(e[t(531)],e[t(312)])})[n(440)](function(e){o(e[n(679)])})}else o(n(341))};h[c(377)]?n(function(){e(function(){t(function(){r(!0)})})}):n(function(){e(function(){r()})})}};o[f(625)]=function(t,o,n,c){var s=f,e=D[s(704)];if(D[s(704)]=null,e&&d()&&h[s(529)](v(e[s(338)]),s(397)),!d()||h[s(372)]){D[s(335)]=o;var u=S(o);if(u[s(334)][s(692)]=!0,u[s(642)]=s(356),D[s(658)]=!1,D[s(704)]=u,h[s(318)]=u,y)return h[s(681)]?void n():void c(C(s(307)));var r=function(t){var n=s,e=JSON[n(550)](JSON[n(572)](l));e[n(322)]=e[n(322)]||48e3,e[n(441)]=e[n(506)],e[n(506)]=e[n(322)];var r=(e[n(303)]||{})[n(486)],i=e[n(393)];r&&null==i&&(i=1,e[n(393)]=!0),I||null!=e[n(693)]||(e[n(693)]=i?7:h[n(660)]||"0"),W(n(497)+JSON[n(572)](e)),m(),U(n(661),e,function(){var e=n;h[e(593)]=setInterval(function(){U(e(381),{},function(){})},5e3),t()},c)};clearInterval(h[s(593)]);var l={};for(var i in o)/_renderjs$/[s(671)](i)||(l[i]=o[i]);if(l=JSON[s(550)](JSON[s(572)](l)),h[s(437)])r(n);else{u[s(334)][s(451)]=s(554);var a=function(e,t){var n=s,r=A(1);if(r)c(C(n(664))+r);else{u[n(338)]=p(null,n(428)),D[n(658)]=t;var i=[n(498)+JSON[n(572)](l)+";"],a=n(487);i[n(571)](n(493)+(o[n(423)]||0)+n(616)+(o[n(539)]||0)+n(508)+(o[n(433)]||0)+n(342)+a+n(684)+a+n(549)),(o[n(637)]||o[n(323)])&&i[n(571)](n(396)+(o[n(323)]||0)+n(583)),i[n(571)](n(479)),h[n(438)](v(u[n(338)]),{timeout:-1},i[n(458)]("\n"))[n(714)](function(){e()})[n(440)](function(e){c(e[n(679)])})}};h[s(377)]?a(function(){var e=s;h[e(501)](t)?r(n):c(e(341))},!0):a(n)}}else c(C(s(468)))},o[f(321)]=function(e){return!!d()&&""},o[f(386)]=function(e){var t=f;if(!d())for(var n in e)/_renderjs$/[t(671)](n)&&delete e[n]};var k=function(e){var t=f,n=D[t(704)];n&&(n[t(334)][t(506)]=e[t(604)],n[t(334)][t(405)]=e[t(665)]);for(var r=e[t(337)],i=0,a=r[t(650)];i<a;i++)D(r[i],e[t(506)])},F=function(e){var t=f,n=D[t(704)];if(n){var r=new Uint8Array(T(e[t(314)]));n[t(334)][t(637)]&&n[t(334)][t(637)](r)}else W(C(t(409)),3)},D=function(e,t){var n=f,r=D[n(704)];if(r){if(r[n(449)]||r[n(691)]({envName:o[n(573)],canProcess:o[n(360)]()},t),r[n(449)]=1,e instanceof Int16Array)var i=new Int16Array(e);else i=new Int16Array(T(e));var a=O[n(496)](i);r[n(504)](i,a)}else W(C(n(701)),3)};h[f(414)]=function(e,t){var n=f;if(D[n(658)]){var r=D[n(704)];return r?void h[n(529)](v(r[n(338)]),n(618)+e+'",'+t+")"):void W(C(n(444)),3)}D(e,t)},o[f(707)]=function(n,i,r){var a=f,o=function(e){var t=w;h[t(501)](n)&&(D[t(704)]=null,c&&s&&d()&&h[t(529)](v(c[t(338)]),t(397))),r(e)},c=D[a(704)],s=!0,u=i?"":h[a(560)](),e=function(){var e=a;if(h[e(501)](n))if(D[e(704)]=null,c){if(W(e(505)+c[e(612)]+e(369)+c[e(365)]+e(552)+JSON[e(572)](D[e(335)])),!i)return l(),void o(u);c[e(417)](function(e,t,n){l(),i(e,t,n)},function(e){l(),o(e)})}else o(C(e(464))+(u?" ("+u+")":""));else o(e(341))},l=function(){var e=a;if(h[e(501)](n))for(var t in D[e(704)]=null,c[e(334)])D[e(335)][t]=c[e(334)][t]};if(y)return h[a(681)]?void e():void o(C(a(354)));var t=function(e){U(a(666),{},e,o)};if(clearInterval(h[a(593)]),h[a(437)])t(e);else{var p=function(e){var r=a;if(c){var t=A(1);if(t)o(C(r(297))+t);else{var n=r(697)+(i&&D[r(335)][r(544)]||0)+r(484)+!i+r(702);h[r(438)](v(c[r(338)]),{timeout:-1},n)[r(714)](function(e){var t=r;s=!1,c[t(334)][t(451)]=D[t(335)][t(451)],c[t(334)][t(506)]=e[t(604)],c[t(334)][t(405)]=e[t(665)],l();var n=h[t(379)](e[t(346)]);n?i(n,e[t(375)],e[t(598)]):o(C(t(401)))})[r(440)](function(e){s=!1,o(e[r(679)])})}}else o(C(r(510))+(u?" ("+u+")":""))};h[a(377)]?t(function(){var e=a;h[e(501)](n)?p():o(e(341))}):p()}}}();})(["gomD::不应该出现的renderjs发回的文件数据丢失","root","bigBytes_","success","bitRate","RegisterPlatform","$getAppWebview","granted","MTdp::未开始录音，但收到renderjs回传的onRecEncodeChunk","useEval","action","AVAudioSession","unsubscribe","UniNativeRecordReceivePCM",'", isOk:true, value:val, dataID:dataID});\n\t\t\t\t},CallFail)\n\t\t\t}else{\n\t\t\t\tRecordApp.UniWebViewSendToMain({action:"',"parentNode","stop","random",".memory.buffer; delete window.","UniNativeUtsPluginCallAsync","replace","30456630qKivwz","onProcess_renderjs","nnM6::当前录音由uts插件提供支持","KQhJ::{1}连接renderjs超时",'",vm=RecordApp.__uniWvCallVm;\n\t\tif(!vm || RecordApp.__uniWvCallWvCid!=wvCid){\n\t\t\tif(!RecordApp.__UniData[wvCid]){\n\t\t\t\tvar err=',"6Iql::未找到此页面renderjs所在的WebView Cid","@req","在uni-app中编译到App平台时仅供测试用，不可用于正式发布或商用，正式发布或商用需先获得授权许可（编译到其他平台时无此授权限制，比如：H5、小程序，均为免费授权）。本对话框仅在第一次请求录音权限时会弹出一次，如何去除本弹框、如何获取商用授权、更多信息请看控制台日志","TfJX::当前不是App逻辑层","env",'"});\n\t\t})()',"start_renderjs","substr","indexOf","status","UniWithoutAppRenderjs","UniWebViewCallAsync","Ruxl::plus.android请求录音权限：无权限","catch","nativeSampleRateRecSet","deleteObject","1f2V:: | RecordApp的uni-app支持文档和示例：{1} ","byzO::未开始录音，但收到UniNativeUtsPlugin PCM数据","getSystemInfoSync","recordPermission","binary","fqhr::当前已配置RecordApp.UniWithoutAppRenderjs，必须提供原生录音插件或uts插件才能录音，请参考RecordApp.UniNativeUtsPlugin配置","_appStart","fields","type","dataID","的商用授权","mzKj::RecordApp.UniRenderjsRegister 重复注册当前页面renderjs模块，一个组件内只允许一个renderjs模块进行注册","0JQw::plus.android请求录音权限出错：","XSYY::当前录音由原生录音插件提供支持",'",{action:"',"join","AGd7::需要先调用RecordApp.UniWebViewActivate方法","canvas","kxOd::当前环境未支持保存本地文件","4dwGRBH","Resume","YP4V::未开始录音","_cid_","__FabE","createWriter","XCMU::需先调用RecordApp.UniWebViewActivate，然后才可以调用Start","4507352xCbJhO","\n})()","iKhe::plus.ios请求录音权限，状态值: ","__UniData","select","\n\t\t\t})()","RecApp Main","android",'"@/uni_modules/Recorder-UniCore/',"WpKg::RecordApp.UniWebViewActivate 已切换当前页面或组件的renderjs所在的WebView","RecordApp.Start(set,function(){\n\t\t\tstartFn&&startFn.call(This);\n\t\t\tCallSuccess();\n\t\t},function(errMsg){\n\t\t\tCallFail(errMsg);\n\t\t});","ZHwv::[MainReceive]从renderjs发回未知数据：","rec_wv_cid_key","Bgls::已获得Android原生录音权限：","Tag",";\n\t\t\tvar clear=","mainID","echoCancellation","buffers,power,duration,sampleRate,newIdx","denied ",'", isOk:true, value:val});\n\t\t\t}\n\t\t};\n\t\tvar CallFail=function(err){\n\t\t\tUniViewJSBridge.publishHandler("',"setAttribute","VsdN::需重新调用RecordApp.RequestPermission方法","UniFindCanvas","var procFn=",";\n\t\t\tRecordApp.RequestPermission(function(){\n\t\t\t\tCallSuccess({ok:1});\n\t\t\t},function(errMsg,isUserNotAllow){\n\t\t\t\tCallSuccess({errMsg:errMsg,isUserNotAllow:isUserNotAllow});\n\t\t\t});\n\t\t","info","pcm_sum","Native Start Set:","var set=","nativePluginName",'";\n\t\t\t\tvar els=this.$ownerInstance.$el.querySelectorAll(cls+" canvas"),el=els[0],el2=els[1];\n\t\t\t\tif(!el){\n\t\t\t\t\tRecordApp.CLog(Recorder.i18n.$T("dzX0::未找到Canvas：{1}，请确保此DOM已挂载（可尝试用$nextTick等待DOM更新）",0,cls),1);\n\t\t\t\t}else{\n\t\t\t\t\tif(el2){\n\t\t\t\t\t\tif(!el2.getAttribute("el2")){ el=els[1]; el2=els[0] }\n\t\t\t\t\t\tel2.parentNode.removeChild(el2);\n\t\t\t\t\t}\n\t\t\t\t\tel.style.display="none";\n\t\t\t\t\tel2=document.createElement("canvas");\n\t\t\t\t\tel2.setAttribute("el2","1"); el2.style.width=el2.style.height="100%";\n\t\t\t\t\tel.parentNode.appendChild(el2);\n\t\t\t\t}\n\t\t\t\tvar canvas',"__Sync","uts",'),mOffset:0};\n\t\t\tvar buf=new Uint8Array(RecordApp.UniAtob("',"envIn","rec encode: pcm:","sampleRate","9474451jtnwOk",";\n\t\tvar startFn=","UniWebViewSendToMain","pP4O::未开始录音","request","Platforms","peIm::当前还未调用过RecordApp.UniWebViewActivate","__uniAppReqComponentId","yI24::RecordApp.UniFindCanvas未适配当前环境"," canvas","querySelectorAll","=window.","kSjQ::当前App未打包进双端原生插件[{1}]，尝试加载单端[{2}]","RDcZ::{1}处理超时","getFile","Recorder-NativePlugin","$root","slice","__uniAppWebViewId","RecordApp.","FabE::【在App内使用{1}的授权许可】","7ot0::需先调用RecordApp.RequestPermission方法","UniWebViewEval","el2","errMsg","TGMm::提供的RecordApp.UniNativeUtsPlugin值不是RecordApp的uts原生录音插件","PUBLIC_DOWNLOADS","H753::未配置RecordApp.UniNativeUtsPlugin原生录音插件","Rec_WvCid","subarray","__nnM6","\n\t\tif(!window.RecordApp){\n\t\t\tvar err=","onProcessBefore_renderjs"," WvCid=wv_","requestPermissions","undefined","6WZaKTc","stop_renderjs","7kJS::RecordApp.UniRenderjsRegister 已注册当前页面renderjs模块","Uc9E::RecordApp.UniRenderjsRegister 发生不应该出现的错误（可能需要升级插件代码）：","Install","apply",');\n\t\t\tvar newBuffers=[],recSet=RecordApp.__Rec.set;\n\t\t\tfor(var i=newIdx;i<buffers.length;i++)newBuffers.push(RecordApp.UniBtoa(buffers[i].buffer));//@@Fast\n\t\t\tRecordApp.UniWebViewSendToMain({action:"recProcess",recSet_sr:recSet.sampleRate,recSet_bit:recSet.bitRate,sampleRate:sampleRate,newBuffers:newBuffers});\n\t\t\treturn procFn&&procFn.apply(This,arguments);\n\t\t};',"parse","__uniAppWebView"," set:","||{memory:new Uint8Array(","unknown","mSbR::当前还未调用过RecordApp.UniWebViewActivate","UniAppUseLicense","在uni-app中编译到App平台时仅供测试用（App平台包括：Android App、iOS App），不可用于正式发布或商用，正式发布或商用需先获取到商用授权许可（编译到其他平台时无此授权限制，比如：H5、小程序，均为免费授权）。未获得授权时，在App打开后第一次调用RecordApp.RequestPermission请求录音权限时，会先弹出商用授权提示框；获取到授权许可后，请在调用RequestPermission前设置 RecordApp.UniAppUseLicense='"," WvCid=","buffer","__StopOnlyClearMsg","writeAsBinary","UniWebViewActivate","b64","RecApp Renderjs","(function(){\n\t\t\tvar cur=window.","https://ext.dcloud.net.cn/plugin?name=","none","l6sY::renderjs中不支持设置RecordApp.UniNativeUtsPlugin","Xh1W::已加载原生录音插件[{1}]","lU1W::当前不是App逻辑层","push","stringify","Key",");\n\t})()","100%","getAttribute","vEgr::不应该出现的MainReceiveBind重复绑定","node","ksoA::无法调用RequestPermission：","__UniMainReceiveBigBytes","(function(){\n\t\t\t\tvar BigBytes=window.","RequestPermission",';\n\t\t\tset.takeoffEncodeChunk=function(bytes){\n\t\t\t\tRecordApp.UniWebViewSendToMain({action:"recEncodeChunk",bytes:RecordApp.UniBtoa(bytes.buffer)});\n\t\t\t\ttakeFn&&takeFn.apply(This,arguments);\n\t\t\t};',"recProcess","height","0FGq::未开始录音，不可以调用{1}","webview","appId","qDo1::未找到此页面renderjs所在的WebView",'"));\n\t\t\tcur.memory.set(buf,cur.mOffset);\n\t\t\tcur.mOffset+=buf.byteLength;\n\t\t\tRecordApp.UniWebViewSendToMain({action:"',"$scope","removeChild","_X3Ij_alive","0caE::用户拒绝了录音权限","onwrite","   jsCode=","display","mime","import 'recorder-core/src/app-support/app-miniProgram-wx-support.js'","pageShow","\n\t\t\tRecordApp.UniAppUseNative=","k7im::未找到Canvas：{1}，请确保此DOM已挂载（可尝试用$nextTick等待DOM更新）",";\r\n\t\t\tRecordApp.Current=null; //需先重置，不然native变化后install不一致\n\t\t\tRecordApp.","recSet_sr","onerror","UqfI::保存文件{1}失败：","USER_DATA_PATH","appendChild","URyD::没有找到组件的renderjs模块","__uniAppComponentId","SCW9::配置了RecordApp.UniNativeUtsPlugin，但当前App未打包进原生录音插件[{1}]","recSize","importClass","createElement","xYRb::当前RecordApp运行在逻辑层中（性能会略低一些，可视化等插件不可用）",";\r\n\t\tvar procBefore=","Bcgi::renderjs中的mounted内需要调用RecordApp.UniRenderjsRegister",'RecordApp.UniNativeRecordReceivePCM("',"wvCid","l7WP::用户拒绝了录音权限","subscribe","\n\t\tif(!window.RecordApp){\n\t\t\treturn CallFail(","-Android （会赠送Android版原生插件）；购买后可联系客服，同时提供订单信息，客服拉你进入VIP支持QQ群，入群后在群文件中可下载此js文件最新源码；客服联系方式：QQ 1251654593 ，或者直接联系作者QQ 753610399 （回复可能没有客服及时）。详细请参考文档: ","requestRecordPermission","Start","value","onLog","mOffset","UniApp-Renderjs","当前未获得授权许可。文件","CjMb::无效的BigBytes回传数据","4ATo::Recorder-UniCore目前只支持：H5、APP(Android iOS)、MP-WEIXIN，其他平台环境需要自行编写适配文件实现接入","RequestPermission_H5OpenSet","Y3rC::正在调用plus.ios@AVAudioSession请求iOS原生录音权限","isOk","e71S::已购买uts插件，获得授权许可","takeoffEncodeChunk",'+" WvCid="+wvCid;\n\t\t\t\tRecordApp.CLog(err,1); CallErr(err); return;\n\t\t\t};\n\t\t\tRecordApp.__uniWvCallVm=vm;\n\t\t\tRecordApp.__uniWvCallWvCid=wvCid;\n\t\t}; (function(){ var This=this;\n\t\t\t',"TtoS::，不可以调用RecordApp.UniWebViewVueCall","bigBytes_chunk","__uniNP","dataType",'\n\t\t\t\tvar cls="',"571482wQyKWQ","ios","pcmDataBase64","Pause",";\n\t\t\t\t","__hasWvActivate","length","UniCheckNativeUtsPluginConfig",'"});\n\t\t',"SWsy::检测到有其他页面或组件调用了RecordApp.UniPageOnShow（WvCid={1}），但未调用过RecordApp.UniWebViewActivate（当前WvCid={2}），部分功能会继续使用之前Activate的WebView和组件，请确保这是符合你的业务逻辑，不是因为忘记了调用UniWebViewActivate","!id || !cid","TSmQ::需要在页面中提供一个renderjs，在里面import导入RecordApp、录音格式编码器、可视化插件等","我已获得UniAppID=","RXs7::微信小程序中需要：{1}","nativeToRjs","max","Default_Android_AudioSource","recordStart","iOS",';\n\t\t\t\tRecordApp.CLog(err,1); CallErr(err); return;\n\t\t\t};\n\t\t\tvar el=document.querySelector("[rec_wv_cid_key=\'"+wvCid+"\']");\n\t\t\tvm=el&&el.__rModule;\n\t\t\tif(!vm){\n\t\t\t\tvar err=',"Bjx9::无法调用Start：","recSet_bit","recordStop","sWvCid","9040848akAeQy","Mvl7::调用plus的权限请求出错：","AN0e::需在renderjs中import {1}","test","setStorageSync","wv_","timeout","kE91::renderjs中的mounted内需要调用RecordApp.UniRenderjsRegister才能调用RecordApp.UniWebViewSendBigBytesToMain","fullPath",'\n\t\t\tUniViewJSBridge.publishHandler("',"UniWebViewVueCall","message","UniSaveLocalFile","UniAppUseNative","tag","exec","){\r\n\t\t\tprocBefore&&procBefore.call(This,",'"];\n\t\tif(fn)fn(',"requestFileSystem","memory","mrBind","requireNativePlugin","recEncodeChunk","envStart","disableEnvInFix","android_audioSource","action=","RecordApp__uniAppMainReceive","U1Be::renderjs中未import导入RecordApp","(function(){\n\t\t\tvar stopFn=","KnF0::无法连接到renderjs","ipB3::RecordApp.UniWebViewActivate 发生不应该出现的错误（可能需要升级插件代码）：","UniWebViewSendBigBytesToMain","BjGP::未开始录音，但收到Uni Native PCM数据",';\n\t\t\tvar errFn=function(errMsg){\n\t\t\t\tCallFail(errMsg);\n\t\t\t};\n\t\t\tRecordApp.Stop(clear?null:function(arrBuf,duration,mime){\n\t\t\t\tstopFn&&stopFn.apply(This,arguments);\n\t\t\t\tvar recSet=RecordApp.__Rec.set,t1=Date.now();\n\t\t\t\tRecordApp.CLog("开始传输"+arrBuf.byteLength+"字节的数据回逻辑层，可能会比较慢，推荐使用takeoffEncodeChunk实时获取音频文件数据可避免Stop时产生超大数据回传");\n\t\t\t\tRecordApp.UniWebViewSendBigBytesToMain(arrBuf,function(dataId){//数据可能很大\n\t\t\t\t\tRecordApp.CLog("完成传输"+arrBuf.byteLength+"字节的数据回逻辑层，耗时"+(Date.now()-t1)+"ms");\n\t\t\t\t\tCallSuccess({recSet_sr:recSet.sampleRate,recSet_bit:recSet.bitRate,dataId:dataId,duration:duration,mime:mime});\n\t\t\t\t},errFn);\n\t\t\t},errFn);\n\t\t})()',"MiniProgramWx_onShow","rec","isError","__WebVieW_Id__","Stop","S3eF::未找到当前页面renderjs所在的WebView，如果确实没有renderjs，请设置RecordApp.UniWithoutAppRenderjs=true","' ，就不会弹提示框了；或者购买了配套的原生录音插件，设置RecordApp.UniNativeUtsPlugin参数后，也不会弹提示框。【获取授权方式】到DCloud插件市场购买授权: ","__UniWvCid","byteLength","evalJS","mainCb_","then","MujG::只允许在renderjs中调用RecordApp.UniWebViewSendBigBytesToMain","RecorderUtsPlugin","H6cq::无法调用Stop：","\n\t\t}).call(vm);\n\t})()","UniRenderjsRegister","preCode","object","Android","audioTrackSet","__uniAppMainReceiveBind","jsCall","bigBytes_start","rSLO::不应当出现的非H5录音Start","DisableIOSPlusReqPermission","getStorageSync",");\n\t\t};\n\t","__uniNupErr","isUserNotAllow","dl4f::{1}回传了未知内容，","bytes","(function(){\n","aPoj::UniAppUseLicense填写无效，如果已获取到了商用授权，请填写：{1}，否则请使用空字符串","igw2::，不可以调用RecordApp.UniWebViewEval","__Rec","UniApp-Main","onRecord","Start_Check","nativeSampleRateTarget","takeoffEncodeChunk_renderjs","width","CallErr=function(err){ CallFail(err) };","showModal","2325380puQBFU","nativePlugin","__rModule"," Info]","112438gHdwyE","show","_$id","set","param","noop","newBuffers","__wvCid","Jk72::不应当出现的非H5权限请求","UniMainCallBack","Incorrect sync status",";\n\t\tset.onProcess=function(","getWebviewById","PkQ2::需先调用RecordApp.UniWebViewActivate，然后才可以调用RequestPermission",'\n\t\tvar CallSuccess=function(val,buf){\n\t\t\tif(buf){\n\t\t\t\tRecordApp.UniWebViewSendBigBytesToMain(buf,function(dataID){\n\t\t\t\t\tRecordApp.UniWebViewSendToMain({action:"',"dataId","我知道啦","w37G::已购买原生录音插件，获得授权许可","publishHandler","wvID","__uniAppReqWebViewId",'(function(){\n\t\tvar fn=RecordApp.__UniData["',"MrBx::需在App逻辑层中调用原生插件功能","TPhg::不应当出现的非H5录音Stop","@act","arraybuffer","writeFile","=el2;\n\t\t\t"," wvCid=","CanProcess","GwCz::RecordApp.UniWebViewActivate 需要传入当前页面或组件的this对象作为参数",');\n\t\t};\n\t\tif(!RecordApp.Platforms["UniApp-Renderjs"]){\n\t\t\treturn CallFail(',"j15C::已获得iOS原生录音权限","7Noe::正在调用plus.android.requestPermissions请求Android原生录音权限","srcSampleRate","__xYRb","style","$vm"," srcSR:","createSelectorQuery","__0hyi","__callWvActivate","$el","CallSuccess(1)","duration","android.permission.RECORD_AUDIO","UniNativeUtsPlugin","jsCode","UniMainTakeBigBytes",'",errMsg:err});\n\t\t};',"recordAlive","未获得商用授权时，App上仅供测试哈","getFileSystemManager","uid","miniProgram-wx","AllStart_Clean","ownerId","0hyi::当前RecordApp运行在renderjs所在的WebView中（逻辑层中只能做有限的实时处理，可视化等插件均需要在renderjs中进行调用）",';\n\t\t\twindow["console"].error(err); CallErr(err); return;\n\t\t};\n\t\tvar wvCid="',"$page","UniPageOnShow","(function(){\n\t\tvar CallErr=function(){};\n\t\t","appNativePlugin_AEC_Enable","sharedInstance","__uniNbjc","var takeFn=","RecordApp.Stop()","$ownerInstance","isTimeout","4jKV::RecordApp.UniRenderjsRegister 需在renderjs中调用并且传入当前模块的this"])}(i,r,0,a.$T,t)}else console.error("需要先引入RecordApp，请按下面代码引入：\n1. 项目根目录 npm install recorder-core\n2. 页面中按顺序import\nimport Recorder from 'recorder-core'\nimport RecordApp from 'recorder-core/src/app-support/app.js'\nimport 你需要的音频格式编码器、可视化插件\n参考文档："+i)}();