UNPKG

yiyi-audio-recorder

Version:
10 lines 169 kB
/*! * * yiyi-audio-recorder - js audio recorder plugin * * @version v1.0.7 * @homepage https://github.com/1710797241/yiyi-js/tree/1.0.0/packages/audio-recorder * @author yiyi * @license MIT * */!function(e){var t={};function a(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,s){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(a.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(s,n,function(t){return e[t]}.bind(null,n));return s},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=15)}([function(e,t){function a(e){return new Int16Array(e)}function s(e){return new Int32Array(e)}function n(e){return new Float32Array(e)}var r={fill:function(e,t,a,s){if(2==arguments.length)for(var n=0;n<e.length;n++)e[n]=arguments[1];else for(n=t;n<a;n++)e[n]=s}},_={arraycopy:function(e,t,a,s,n){for(var r=t+n;t<r;)a[s++]=e[t++]},out:{}};_.out.println=function(e){console.log(e)},_.out.printf=function(){console.log.apply(console,arguments)};var i={};function o(e){this.ordinal=e}i.SQRT2=1.4142135623730951,i.FAST_LOG10=function(e){return Math.log10(e)},i.FAST_LOG10_X=function(e,t){return Math.log10(e)*t},o.short_block_allowed=new o(0),o.short_block_coupled=new o(1),o.short_block_dispensed=new o(2),o.short_block_forced=new o(3);var l={};function f(e){this.ordinal=e}l.MAX_VALUE=34028235e31,f.vbr_off=new f(0),f.vbr_mt=new f(1),f.vbr_rh=new f(2),f.vbr_abr=new f(3),f.vbr_mtrh=new f(4),f.vbr_default=f.vbr_mtrh;e.exports={System:_,VbrMode:f,Float:l,ShortBlock:o,Util:i,Arrays:r,new_array_n:function e(t){if(1==t.length)return new Array(t[0]);var a=t[0];t=t.slice(1);for(var s=[],n=0;n<a;n++)s.push(e(t));return s},new_byte:function(e){return new Int8Array(e)},new_double:function(e){return new Float64Array(e)},new_float:n,new_float_n:function e(t){if(1==t.length)return n(t[0]);var a=t[0];t=t.slice(1);for(var s=[],r=0;r<a;r++)s.push(e(t));return s},new_int:s,new_int_n:function e(t){if(1==t.length)return s(t[0]);var a=t[0];t=t.slice(1);for(var n=[],r=0;r<a;r++)n.push(e(t));return n},new_short:a,new_short_n:function e(t){if(1==t.length)return a(t[0]);var s=t[0];t=t.slice(1);for(var n=[],r=0;r<s;r++)n.push(e(t));return n},assert:function(e){}}},function(e,t,a){var s=a(0),n=s.System,r=s.VbrMode,_=(s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n),i=(s.new_byte,s.new_double,s.new_float),o=s.new_float_n,l=s.new_int,f=(s.new_int_n,s.assert);function c(){var e=a(20),t=a(21),s=a(2),u=c.FFTOFFSET,h=c.MPG_MD_MS_LR,b=null;this.psy=null;var m=null,p=null,d=null;this.setModules=function(e,t,a,s){b=e,this.psy=t,m=t,p=s,d=a};var v=new e;this.lame_encode_mp3_frame=function(e,a,g,S,w,M){var R,A=_([2,2]);A[0][0]=new t,A[0][1]=new t,A[1][0]=new t,A[1][1]=new t;var B,y=_([2,2]);y[0][0]=new t,y[0][1]=new t,y[1][0]=new t,y[1][1]=new t;var E,T,x,k=[null,null],P=e.internal_flags,I=o([2,4]),V=[.5,.5],O=[[0,0],[0,0]],H=[[0,0],[0,0]];if(k[0]=a,k[1]=g,0==P.lame_encode_frame_init&&function(e,t){var a,s,n=e.internal_flags;if(0==n.lame_encode_frame_init){var r,_,o=i(2014),l=i(2014);for(n.lame_encode_frame_init=1,r=0,_=0;r<286+576*(1+n.mode_gr);++r)r<576*n.mode_gr?(o[r]=0,2==n.channels_out&&(l[r]=0)):(o[r]=t[0][_],2==n.channels_out&&(l[r]=t[1][_]),++_);for(s=0;s<n.mode_gr;s++)for(a=0;a<n.channels_out;a++)n.l3_side.tt[s][a].block_type=c.SHORT_TYPE;v.mdct_sub48(n,o,l),f(576>=c.FFTOFFSET),f(n.mf_size>=c.BLKSIZE+e.framesize-c.FFTOFFSET),f(n.mf_size>=512+e.framesize-32)}}(e,k),P.padding=0,(P.slot_lag-=P.frac_SpF)<0&&(P.slot_lag+=e.out_samplerate,P.padding=1),0!=P.psymodel){var L=[null,null],N=0,X=l(2);for(x=0;x<P.mode_gr;x++){for(T=0;T<P.channels_out;T++)L[T]=k[T],N=576+576*x-c.FFTOFFSET;if(0!=(e.VBR==r.vbr_mtrh||e.VBR==r.vbr_mt?m.L3psycho_anal_vbr(e,L,N,x,A,y,O[x],H[x],I[x],X):m.L3psycho_anal_ns(e,L,N,x,A,y,O[x],H[x],I[x],X)))return-4;for(e.mode==s.JOINT_STEREO&&(V[x]=I[x][2]+I[x][3],V[x]>0&&(V[x]=I[x][3]/V[x])),T=0;T<P.channels_out;T++){var D=P.l3_side.tt[x][T];D.block_type=X[T],D.mixed_block_flag=0}}}else for(x=0;x<P.mode_gr;x++)for(T=0;T<P.channels_out;T++)P.l3_side.tt[x][T].block_type=c.NORM_TYPE,P.l3_side.tt[x][T].mixed_block_flag=0,H[x][T]=O[x][T]=700;if(function(e){var t,a;if(0!=e.ATH.useAdjust)if(a=e.loudness_sq[0][0],t=e.loudness_sq[1][0],2==e.channels_out?(a+=e.loudness_sq[0][1],t+=e.loudness_sq[1][1]):(a+=a,t+=t),2==e.mode_gr&&(a=Math.max(a,t)),a*=.5,(a*=e.ATH.aaSensitivityP)>.03125)e.ATH.adjust>=1?e.ATH.adjust=1:e.ATH.adjust<e.ATH.adjustLimit&&(e.ATH.adjust=e.ATH.adjustLimit),e.ATH.adjustLimit=1;else{var s=31.98*a+625e-6;e.ATH.adjust>=s?(e.ATH.adjust*=.075*s+.925,e.ATH.adjust<s&&(e.ATH.adjust=s)):e.ATH.adjustLimit>=s?e.ATH.adjust=s:e.ATH.adjust<e.ATH.adjustLimit&&(e.ATH.adjust=e.ATH.adjustLimit),e.ATH.adjustLimit=s}else e.ATH.adjust=1}(P),v.mdct_sub48(P,k[0],k[1]),P.mode_ext=c.MPG_MD_LR_LR,e.force_ms)P.mode_ext=c.MPG_MD_MS_LR;else if(e.mode==s.JOINT_STEREO){var F=0,Y=0;for(x=0;x<P.mode_gr;x++)for(T=0;T<P.channels_out;T++)F+=H[x][T],Y+=O[x][T];if(F<=1*Y){var q=P.l3_side.tt[0],C=P.l3_side.tt[P.mode_gr-1];q[0].block_type==q[1].block_type&&C[0].block_type==C[1].block_type&&(P.mode_ext=c.MPG_MD_MS_LR)}}if(P.mode_ext==h?(B=y,E=H):(B=A,E=O),e.analysis&&null!=P.pinfo)for(x=0;x<P.mode_gr;x++)for(T=0;T<P.channels_out;T++)P.pinfo.ms_ratio[x]=P.ms_ratio[x],P.pinfo.ms_ener_ratio[x]=V[x],P.pinfo.blocktype[x][T]=P.l3_side.tt[x][T].block_type,P.pinfo.pe[x][T]=E[x][T],n.arraycopy(P.l3_side.tt[x][T].xr,0,P.pinfo.xr[x][T],0,576),P.mode_ext==h&&(P.pinfo.ers[x][T]=P.pinfo.ers[x][T+2],n.arraycopy(P.pinfo.energy[x][T+2],0,P.pinfo.energy[x][T],0,P.pinfo.energy[x][T].length));if(e.VBR==r.vbr_off||e.VBR==r.vbr_abr){var j,G;for(j=0;j<18;j++)P.nsPsy.pefirbuf[j]=P.nsPsy.pefirbuf[j+1];for(G=0,x=0;x<P.mode_gr;x++)for(T=0;T<P.channels_out;T++)G+=E[x][T];for(P.nsPsy.pefirbuf[18]=G,G=P.nsPsy.pefirbuf[9],j=0;j<9;j++)G+=(P.nsPsy.pefirbuf[j]+P.nsPsy.pefirbuf[18-j])*c.fircoef[j];for(G=3350*P.mode_gr*P.channels_out/G,x=0;x<P.mode_gr;x++)for(T=0;T<P.channels_out;T++)E[x][T]*=G}if(P.iteration_loop.iteration_loop(e,E,V,B),b.format_bitstream(e),R=b.copy_buffer(P,S,w,M,1),e.bWriteVbrTag&&p.addVbrFrame(e),e.analysis&&null!=P.pinfo){for(T=0;T<P.channels_out;T++){var U;for(U=0;U<u;U++)P.pinfo.pcmdata[T][U]=P.pinfo.pcmdata[T][U+e.framesize];for(U=u;U<1600;U++)P.pinfo.pcmdata[T][U]=k[T][U-u]}d.set_frame_pinfo(e,B)}return function(e){var t,a;for(f(0<=e.bitrate_index&&e.bitrate_index<16),f(0<=e.mode_ext&&e.mode_ext<4),e.bitrate_stereoMode_Hist[e.bitrate_index][4]++,e.bitrate_stereoMode_Hist[15][4]++,2==e.channels_out&&(e.bitrate_stereoMode_Hist[e.bitrate_index][e.mode_ext]++,e.bitrate_stereoMode_Hist[15][e.mode_ext]++),t=0;t<e.mode_gr;++t)for(a=0;a<e.channels_out;++a){var s=0|e.l3_side.tt[t][a].block_type;0!=e.l3_side.tt[t][a].mixed_block_flag&&(s=4),e.bitrate_blockType_Hist[e.bitrate_index][s]++,e.bitrate_blockType_Hist[e.bitrate_index][5]++,e.bitrate_blockType_Hist[15][s]++,e.bitrate_blockType_Hist[15][5]++}}(P),R}}c.ENCDELAY=576,c.POSTDELAY=1152,c.MDCTDELAY=48,c.FFTOFFSET=224+c.MDCTDELAY,c.DECDELAY=528,c.SBLIMIT=32,c.CBANDS=64,c.SBPSY_l=21,c.SBPSY_s=12,c.SBMAX_l=22,c.SBMAX_s=13,c.PSFB21=6,c.PSFB12=6,c.BLKSIZE=1024,c.HBLKSIZE=c.BLKSIZE/2+1,c.BLKSIZE_s=256,c.HBLKSIZE_s=c.BLKSIZE_s/2+1,c.NORM_TYPE=0,c.START_TYPE=1,c.SHORT_TYPE=2,c.STOP_TYPE=3,c.MPG_MD_LR_LR=0,c.MPG_MD_LR_I=1,c.MPG_MD_MS_LR=2,c.MPG_MD_MS_I=3,c.fircoef=[-.1039435,-.1892065,5*-.0432472,-.155915,3898045e-23,.0467745*5,.50455,.756825,.187098*5],e.exports=c},function(e,t){function a(e){var t=e;this.ordinal=function(){return t}}a.STEREO=new a(0),a.JOINT_STEREO=new a(1),a.DUAL_CHANNEL=new a(2),a.MONO=new a(3),a.NOT_SET=new a(4),e.exports=a},function(e,t,a){var s=a(0),n=(s.System,s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n,s.new_byte),r=s.new_double,_=s.new_float,i=s.new_float_n,o=s.new_int,l=s.new_int_n,f=(s.assert,a(23)),c=a(10),u=a(24),h=a(25),b=a(9),m=a(1),p=a(4);function d(){function e(){this.write_timing=0,this.ptr=0,this.buf=n(40)}this.Class_ID=0,this.lame_encode_frame_init=0,this.iteration_init_init=0,this.fill_buffer_resample_init=0,this.mfbuf=i([2,d.MFSIZE]),this.mode_gr=0,this.channels_in=0,this.channels_out=0,this.resample_ratio=0,this.mf_samples_to_encode=0,this.mf_size=0,this.VBR_min_bitrate=0,this.VBR_max_bitrate=0,this.bitrate_index=0,this.samplerate_index=0,this.mode_ext=0,this.lowpass1=0,this.lowpass2=0,this.highpass1=0,this.highpass2=0,this.noise_shaping=0,this.noise_shaping_amp=0,this.substep_shaping=0,this.psymodel=0,this.noise_shaping_stop=0,this.subblock_gain=0,this.use_best_huffman=0,this.full_outer_loop=0,this.l3_side=new f,this.ms_ratio=_(2),this.padding=0,this.frac_SpF=0,this.slot_lag=0,this.tag_spec=null,this.nMusicCRC=0,this.OldValue=o(2),this.CurrentStep=o(2),this.masking_lower=0,this.bv_scf=o(576),this.pseudohalf=o(p.SFBMAX),this.sfb21_extra=!1,this.inbuf_old=new Array(2),this.blackfilt=new Array(2*d.BPC+1),this.itime=r(2),this.sideinfo_len=0,this.sb_sample=i([2,2,18,m.SBLIMIT]),this.amp_filter=_(32),this.header=new Array(d.MAX_HEADER_BUF),this.h_ptr=0,this.w_ptr=0,this.ancillary_flag=0,this.ResvSize=0,this.ResvMax=0,this.scalefac_band=new c,this.minval_l=_(m.CBANDS),this.minval_s=_(m.CBANDS),this.nb_1=i([4,m.CBANDS]),this.nb_2=i([4,m.CBANDS]),this.nb_s1=i([4,m.CBANDS]),this.nb_s2=i([4,m.CBANDS]),this.s3_ss=null,this.s3_ll=null,this.decay=0,this.thm=new Array(4),this.en=new Array(4),this.tot_ener=_(4),this.loudness_sq=i([2,2]),this.loudness_sq_save=_(2),this.mld_l=_(m.SBMAX_l),this.mld_s=_(m.SBMAX_s),this.bm_l=o(m.SBMAX_l),this.bo_l=o(m.SBMAX_l),this.bm_s=o(m.SBMAX_s),this.bo_s=o(m.SBMAX_s),this.npart_l=0,this.npart_s=0,this.s3ind=l([m.CBANDS,2]),this.s3ind_s=l([m.CBANDS,2]),this.numlines_s=o(m.CBANDS),this.numlines_l=o(m.CBANDS),this.rnumlines_l=_(m.CBANDS),this.mld_cb_l=_(m.CBANDS),this.mld_cb_s=_(m.CBANDS),this.numlines_s_num1=0,this.numlines_l_num1=0,this.pe=_(4),this.ms_ratio_s_old=0,this.ms_ratio_l_old=0,this.ms_ener_ratio_old=0,this.blocktype_old=o(2),this.nsPsy=new u,this.VBR_seek_table=new h,this.ATH=null,this.PSY=null,this.nogap_total=0,this.nogap_current=0,this.decode_on_the_fly=!0,this.findReplayGain=!0,this.findPeakSample=!0,this.PeakSample=0,this.RadioGain=0,this.AudiophileGain=0,this.rgdata=null,this.noclipGainChange=0,this.noclipScale=0,this.bitrate_stereoMode_Hist=l([16,5]),this.bitrate_blockType_Hist=l([16,6]),this.pinfo=null,this.hip=null,this.in_buffer_nsamples=0,this.in_buffer_0=null,this.in_buffer_1=null,this.iteration_loop=null;for(var t=0;t<this.en.length;t++)this.en[t]=new b;for(t=0;t<this.thm.length;t++)this.thm[t]=new b;for(t=0;t<this.header.length;t++)this.header[t]=new e}d.MFSIZE=3456+m.ENCDELAY-m.MDCTDELAY,d.MAX_HEADER_BUF=256,d.MAX_BITS_PER_CHANNEL=4095,d.MAX_BITS_PER_GRANULE=7680,d.BPC=320,e.exports=d},function(e,t,a){var s=a(1),n={};n.SFBMAX=3*s.SBMAX_s,e.exports=n},function(e,t,a){var s=a(0),n=s.System,r=s.VbrMode,_=(s.Float,s.ShortBlock),i=(s.Util,s.Arrays,s.new_array_n,s.new_byte,s.new_double,s.new_float),o=(s.new_float_n,s.new_int,s.new_int_n),l=s.new_short_n,f=s.assert,c=a(18),u=a(22),h=a(3),b=a(26),m=a(27),p=a(28),d=a(7),v=a(8),g=a(1);e.exports=function e(){var t,s,S,w,M,R=a(2),A=this;e.V9=410,e.V8=420,e.V7=430,e.V6=440,e.V5=450,e.V4=460,e.V3=470,e.V2=480,e.V1=490,e.V0=500,e.R3MIX=1e3,e.STANDARD=1001,e.EXTREME=1002,e.INSANE=1003,e.STANDARD_FAST=1004,e.EXTREME_FAST=1005,e.MEDIUM=1006,e.MEDIUM_FAST=1007,e.LAME_MAXMP3BUFFER=147456;var B,y,E,T=new c;function x(){this.mask_adjust=0,this.mask_adjust_short=0,this.bo_l_weight=i(g.SBMAX_l),this.bo_s_weight=i(g.SBMAX_s)}function k(){this.lowerlimit=0}function P(e,t){this.lowpass=t}function I(e){return e>1?0:e<=0?1:Math.cos(Math.PI/2*e)}function V(e,t){switch(e){case 44100:return t.version=1,0;case 48e3:return t.version=1,1;case 32e3:return t.version=1,2;case 22050:return t.version=0,0;case 24e3:return t.version=0,1;case 16e3:return t.version=0,2;case 11025:return t.version=0,0;case 12e3:return t.version=0,1;case 8e3:return t.version=0,2;default:return t.version=0,-1}}function O(e,t,a){a<16e3&&(t=2);for(var s=v.bitrate_table[t][1],n=2;n<=14;n++)v.bitrate_table[t][n]>0&&Math.abs(v.bitrate_table[t][n]-e)<Math.abs(s-e)&&(s=v.bitrate_table[t][n]);return s}function H(e,t,a){a<16e3&&(t=2);for(var s=0;s<=14;s++)if(v.bitrate_table[t][s]>0&&v.bitrate_table[t][s]==e)return s;return-1}function L(e,t){var a=[new P(8,2e3),new P(16,3700),new P(24,3900),new P(32,5500),new P(40,7e3),new P(48,7500),new P(56,1e4),new P(64,11e3),new P(80,13500),new P(96,15100),new P(112,15600),new P(128,17e3),new P(160,17500),new P(192,18600),new P(224,19400),new P(256,19700),new P(320,20500)],s=A.nearestBitrateFullIndex(t);e.lowerlimit=a[s].lowpass}function N(e){var t=g.BLKSIZE+e.framesize-g.FFTOFFSET;return t=Math.max(t,512+e.framesize-32),f(h.MFSIZE>=t),t}function X(e,t,a,s,n,r){var _=A.enc.lame_encode_mp3_frame(e,t,a,s,n,r);return e.frameNum++,_}function D(){this.n_in=0,this.n_out=0}function F(){this.num_used=0}function Y(e,t,a){var s=Math.PI*t;(e/=a)<0&&(e=0),e>1&&(e=1);var n=e-.5,r=.42-.5*Math.cos(2*e*Math.PI)+.08*Math.cos(4*e*Math.PI);return Math.abs(n)<1e-9?s/Math.PI:r*Math.sin(a*s*n)/(Math.PI*a*n)}function q(e,t,a,s,n,r,_,o,l){var c,u,b=e.internal_flags,m=0,p=e.out_samplerate/function e(t,a){return 0!=a?e(a,t%a):t}(e.out_samplerate,e.in_samplerate);p>h.BPC&&(p=h.BPC);var d=Math.abs(b.resample_ratio-Math.floor(.5+b.resample_ratio))<1e-4?1:0,v=1/b.resample_ratio;v>1&&(v=1);var g=31;0==g%2&&--g;var S=(g+=d)+1;if(0==b.fill_buffer_resample_init){for(b.inbuf_old[0]=i(S),b.inbuf_old[1]=i(S),c=0;c<=2*p;++c)b.blackfilt[c]=i(S);for(b.itime[0]=0,b.itime[1]=0,m=0;m<=2*p;m++){var w=0,M=(m-p)/(2*p);for(c=0;c<=g;c++)w+=b.blackfilt[m][c]=Y(c-M,v,g);for(c=0;c<=g;c++)b.blackfilt[m][c]/=w}b.fill_buffer_resample_init=1}var R=b.inbuf_old[l];for(u=0;u<s;u++){var A,B;if(A=u*b.resample_ratio,g+(m=0|Math.floor(A-b.itime[l]))-g/2>=_)break;M=A-b.itime[l]-(m+g%2*.5);f(Math.abs(M)<=.501),B=0|Math.floor(2*M*p+p+.5);var y=0;for(c=0;c<=g;++c){var E=0|c+m-g/2;f(E<_),f(E+S>=0),y+=(E<0?R[S+E]:n[r+E])*b.blackfilt[B][c]}t[a+u]=y}if(o.num_used=Math.min(_,g+m-g/2),b.itime[l]+=o.num_used-u*b.resample_ratio,o.num_used>=S)for(c=0;c<S;c++)R[c]=n[r+o.num_used+c-S];else{var T=S-o.num_used;for(c=0;c<T;++c)R[c]=R[c+o.num_used];for(m=0;c<S;++c,++m)R[c]=n[r+m];f(m==o.num_used)}return u}function C(e,t,a,s,n,r){var _=e.internal_flags;if(_.resample_ratio<.9999||_.resample_ratio>1.0001)for(var i=0;i<_.channels_out;i++){var o=new F;r.n_out=q(e,t[i],_.mf_size,e.framesize,a[i],s,n,o,i),r.n_in=o.num_used}else{r.n_out=Math.min(e.framesize,n),r.n_in=r.n_out;for(var l=0;l<r.n_out;++l)t[0][_.mf_size+l]=a[0][s+l],2==_.channels_out&&(t[1][_.mf_size+l]=a[1][s+l])}}this.enc=new g,this.setModules=function(e,a,n,r,_,i,o,l,f){t=e,s=a,S=n,w=r,M=_,B=i,o,y=l,E=f,this.enc.setModules(s,T,w,B)},this.lame_init=function(){var e=new u;return 0!=function(e){var t;return e.class_id=4294479419,t=e.internal_flags=new h,e.mode=R.NOT_SET,e.original=1,e.in_samplerate=44100,e.num_channels=2,e.num_samples=-1,e.bWriteVbrTag=!0,e.quality=-1,e.short_blocks=null,t.subblock_gain=-1,e.lowpassfreq=0,e.highpassfreq=0,e.lowpasswidth=-1,e.highpasswidth=-1,e.VBR=r.vbr_off,e.VBR_q=4,e.ATHcurve=-1,e.VBR_mean_bitrate_kbps=128,e.VBR_min_bitrate_kbps=0,e.VBR_max_bitrate_kbps=0,e.VBR_hard_min=0,t.VBR_min_bitrate=1,t.VBR_max_bitrate=13,e.quant_comp=-1,e.quant_comp_short=-1,e.msfix=-1,t.resample_ratio=1,t.OldValue[0]=180,t.OldValue[1]=180,t.CurrentStep[0]=4,t.CurrentStep[1]=4,t.masking_lower=1,t.nsPsy.attackthre=-1,t.nsPsy.attackthre_s=-1,e.scale=-1,e.athaa_type=-1,e.ATHtype=-1,e.athaa_loudapprox=-1,e.athaa_sensitivity=0,e.useTemporal=null,e.interChRatio=-1,t.mf_samples_to_encode=g.ENCDELAY+g.POSTDELAY,e.encoder_padding=0,t.mf_size=g.ENCDELAY-g.MDCTDELAY,e.findReplayGain=!1,e.decode_on_the_fly=!1,t.decode_on_the_fly=!1,t.findReplayGain=!1,t.findPeakSample=!1,t.RadioGain=0,t.AudiophileGain=0,t.noclipGainChange=0,t.noclipScale=-1,e.preset=0,e.write_id3tag_automatic=!0,0}(e)?null:(e.lame_allocated_gfp=1,e)},this.nearestBitrateFullIndex=function(e){var t=[8,16,24,32,40,48,56,64,80,96,112,128,160,192,224,256,320],a=0,s=0,n=0,r=0;r=t[16],n=16,s=t[16],a=16;for(var _=0;_<16;_++)if(Math.max(e,t[_+1])!=e){r=t[_+1],n=_+1,s=t[_],a=_;break}return r-e>e-s?a:n},this.lame_init_params=function(e){var a,i,l,u=e.internal_flags;if(u.Class_ID=0,null==u.ATH&&(u.ATH=new b),null==u.PSY&&(u.PSY=new x),null==u.rgdata&&(u.rgdata=new m),u.channels_in=e.num_channels,1==u.channels_in&&(e.mode=R.MONO),u.channels_out=e.mode==R.MONO?1:2,u.mode_ext=g.MPG_MD_MS_LR,e.mode==R.MONO&&(e.force_ms=!1),e.VBR==r.vbr_off&&128!=e.VBR_mean_bitrate_kbps&&0==e.brate&&(e.brate=e.VBR_mean_bitrate_kbps),e.VBR==r.vbr_off||e.VBR==r.vbr_mtrh||e.VBR==r.vbr_mt||(e.free_format=!1),e.VBR==r.vbr_off&&0==e.brate&&d.EQ(e.compression_ratio,0)&&(e.compression_ratio=11.025),e.VBR==r.vbr_off&&e.compression_ratio>0&&(0==e.out_samplerate&&(e.out_samplerate=map2MP3Frequency(int(.97*e.in_samplerate))),e.brate=0|16*e.out_samplerate*u.channels_out/(1e3*e.compression_ratio),u.samplerate_index=V(e.out_samplerate,e),e.free_format||(e.brate=O(e.brate,e.version,e.out_samplerate))),0!=e.out_samplerate&&(e.out_samplerate<16e3?(e.VBR_mean_bitrate_kbps=Math.max(e.VBR_mean_bitrate_kbps,8),e.VBR_mean_bitrate_kbps=Math.min(e.VBR_mean_bitrate_kbps,64)):e.out_samplerate<32e3?(e.VBR_mean_bitrate_kbps=Math.max(e.VBR_mean_bitrate_kbps,8),e.VBR_mean_bitrate_kbps=Math.min(e.VBR_mean_bitrate_kbps,160)):(e.VBR_mean_bitrate_kbps=Math.max(e.VBR_mean_bitrate_kbps,32),e.VBR_mean_bitrate_kbps=Math.min(e.VBR_mean_bitrate_kbps,320))),0==e.lowpassfreq){var h=16e3;switch(e.VBR){case r.vbr_off:L(A=new k,e.brate),h=A.lowerlimit;break;case r.vbr_abr:var A;L(A=new k,e.VBR_mean_bitrate_kbps),h=A.lowerlimit;break;case r.vbr_rh:var P=[19500,19e3,18600,18e3,17500,16e3,15600,14900,12500,1e4,3950];if(0<=e.VBR_q&&e.VBR_q<=9){var N=P[e.VBR_q],X=P[e.VBR_q+1],D=e.VBR_q_frac;h=linear_int(N,X,D)}else h=19500;break;default:P=[19500,19e3,18500,18e3,17500,16500,15500,14500,12500,9500,3950];if(0<=e.VBR_q&&e.VBR_q<=9){N=P[e.VBR_q],X=P[e.VBR_q+1],D=e.VBR_q_frac;h=linear_int(N,X,D)}else h=19500}e.mode!=R.MONO||e.VBR!=r.vbr_off&&e.VBR!=r.vbr_abr||(h*=1.5),e.lowpassfreq=0|h}if(0==e.out_samplerate&&(2*e.lowpassfreq>e.in_samplerate&&(e.lowpassfreq=e.in_samplerate/2),e.out_samplerate=(a=0|e.lowpassfreq,i=e.in_samplerate,l=44100,i>=48e3?l=48e3:i>=44100?l=44100:i>=32e3?l=32e3:i>=24e3?l=24e3:i>=22050?l=22050:i>=16e3?l=16e3:i>=12e3?l=12e3:i>=11025?l=11025:i>=8e3&&(l=8e3),-1==a?l:(a<=15960&&(l=44100),a<=15250&&(l=32e3),a<=11220&&(l=24e3),a<=9970&&(l=22050),a<=7230&&(l=16e3),a<=5420&&(l=12e3),a<=4510&&(l=11025),a<=3970&&(l=8e3),i<l?i>44100?48e3:i>32e3?44100:i>24e3?32e3:i>22050?24e3:i>16e3?22050:i>12e3?16e3:i>11025?12e3:i>8e3?11025:8e3:l))),e.lowpassfreq=Math.min(20500,e.lowpassfreq),e.lowpassfreq=Math.min(e.out_samplerate/2,e.lowpassfreq),e.VBR==r.vbr_off&&(e.compression_ratio=16*e.out_samplerate*u.channels_out/(1e3*e.brate)),e.VBR==r.vbr_abr&&(e.compression_ratio=16*e.out_samplerate*u.channels_out/(1e3*e.VBR_mean_bitrate_kbps)),e.bWriteVbrTag||(e.findReplayGain=!1,e.decode_on_the_fly=!1,u.findPeakSample=!1),u.findReplayGain=e.findReplayGain,u.decode_on_the_fly=e.decode_on_the_fly,u.decode_on_the_fly&&(u.findPeakSample=!0),u.findReplayGain&&t.InitGainAnalysis(u.rgdata,e.out_samplerate)==GainAnalysis.INIT_GAIN_ANALYSIS_ERROR)return e.internal_flags=null,-6;switch(u.decode_on_the_fly&&!e.decode_only&&(null!=u.hip&&E.hip_decode_exit(u.hip),u.hip=E.hip_decode_init()),u.mode_gr=e.out_samplerate<=24e3?1:2,e.framesize=576*u.mode_gr,e.encoder_delay=g.ENCDELAY,u.resample_ratio=e.in_samplerate/e.out_samplerate,e.VBR){case r.vbr_mt:case r.vbr_rh:case r.vbr_mtrh:e.compression_ratio=[5.7,6.5,7.3,8.2,10,11.9,13,14,15,16.5][e.VBR_q];break;case r.vbr_abr:e.compression_ratio=16*e.out_samplerate*u.channels_out/(1e3*e.VBR_mean_bitrate_kbps);break;default:e.compression_ratio=16*e.out_samplerate*u.channels_out/(1e3*e.brate)}if(e.mode==R.NOT_SET&&(e.mode=R.JOINT_STEREO),e.highpassfreq>0?(u.highpass1=2*e.highpassfreq,e.highpasswidth>=0?u.highpass2=2*(e.highpassfreq+e.highpasswidth):u.highpass2=2*e.highpassfreq,u.highpass1/=e.out_samplerate,u.highpass2/=e.out_samplerate):(u.highpass1=0,u.highpass2=0),e.lowpassfreq>0?(u.lowpass2=2*e.lowpassfreq,e.lowpasswidth>=0?(u.lowpass1=2*(e.lowpassfreq-e.lowpasswidth),u.lowpass1<0&&(u.lowpass1=0)):u.lowpass1=2*e.lowpassfreq,u.lowpass1/=e.out_samplerate,u.lowpass2/=e.out_samplerate):(u.lowpass1=0,u.lowpass2=0),function(e){var t=e.internal_flags,a=32,s=-1;if(t.lowpass1>0){for(var r=999,_=0;_<=31;_++){(f=_/31)>=t.lowpass2&&(a=Math.min(a,_)),t.lowpass1<f&&f<t.lowpass2&&(r=Math.min(r,_))}t.lowpass1=999==r?(a-.75)/31:(r-.75)/31,t.lowpass2=a/31}if(t.highpass2>0&&t.highpass2<.75/31*.9&&(t.highpass1=0,t.highpass2=0,n.err.println("Warning: highpass filter disabled. highpass frequency too small\n")),t.highpass2>0){var i=-1;for(_=0;_<=31;_++){(f=_/31)<=t.highpass1&&(s=Math.max(s,_)),t.highpass1<f&&f<t.highpass2&&(i=Math.max(i,_))}t.highpass1=s/31,t.highpass2=-1==i?(s+.75)/31:(i+.75)/31}for(_=0;_<32;_++){var o,l,f=_/31;o=t.highpass2>t.highpass1?I((t.highpass2-f)/(t.highpass2-t.highpass1+1e-20)):1,l=t.lowpass2>t.lowpass1?I((f-t.lowpass1)/(t.lowpass2-t.lowpass1+1e-20)):1,t.amp_filter[_]=o*l}}(e),u.samplerate_index=V(e.out_samplerate,e),u.samplerate_index<0)return e.internal_flags=null,-1;if(e.VBR==r.vbr_off){if(e.free_format)u.bitrate_index=0;else if(e.brate=O(e.brate,e.version,e.out_samplerate),u.bitrate_index=H(e.brate,e.version,e.out_samplerate),u.bitrate_index<=0)return e.internal_flags=null,-1}else u.bitrate_index=1;e.analysis&&(e.bWriteVbrTag=!1),null!=u.pinfo&&(e.bWriteVbrTag=!1),s.init_bit_stream_w(u);for(var F,Y=u.samplerate_index+3*e.version+6*(e.out_samplerate<16e3?1:0),q=0;q<g.SBMAX_l+1;q++)u.scalefac_band.l[q]=w.sfBandIndex[Y].l[q];for(q=0;q<g.PSFB21+1;q++){var C=(u.scalefac_band.l[22]-u.scalefac_band.l[21])/g.PSFB21,j=u.scalefac_band.l[21]+q*C;u.scalefac_band.psfb21[q]=j}u.scalefac_band.psfb21[g.PSFB21]=576;for(q=0;q<g.SBMAX_s+1;q++)u.scalefac_band.s[q]=w.sfBandIndex[Y].s[q];for(q=0;q<g.PSFB12+1;q++){C=(u.scalefac_band.s[13]-u.scalefac_band.s[12])/g.PSFB12,j=u.scalefac_band.s[12]+q*C;u.scalefac_band.psfb12[q]=j}for(u.scalefac_band.psfb12[g.PSFB12]=192,1==e.version?u.sideinfo_len=1==u.channels_out?21:36:u.sideinfo_len=1==u.channels_out?13:21,e.error_protection&&(u.sideinfo_len+=2),function(e){var t=e.internal_flags;e.frameNum=0,e.write_id3tag_automatic&&y.id3tag_write_v2(e),t.bitrate_stereoMode_Hist=o([16,5]),t.bitrate_blockType_Hist=o([16,6]),t.PeakSample=0,e.bWriteVbrTag&&B.InitVbrTag(e)}(e),u.Class_ID=4294479419,F=0;F<19;F++)u.nsPsy.pefirbuf[F]=700*u.mode_gr*u.channels_out;switch(-1==e.ATHtype&&(e.ATHtype=4),f(e.VBR_q<=9),f(e.VBR_q>=0),e.VBR){case r.vbr_mt:e.VBR=r.vbr_mtrh;case r.vbr_mtrh:null==e.useTemporal&&(e.useTemporal=!1),S.apply_preset(e,500-10*e.VBR_q,0),e.quality<0&&(e.quality=LAME_DEFAULT_QUALITY),e.quality<5&&(e.quality=0),e.quality>5&&(e.quality=5),u.PSY.mask_adjust=e.maskingadjust,u.PSY.mask_adjust_short=e.maskingadjust_short,e.experimentalY?u.sfb21_extra=!1:u.sfb21_extra=e.out_samplerate>44e3,u.iteration_loop=new VBRNewIterationLoop(M);break;case r.vbr_rh:S.apply_preset(e,500-10*e.VBR_q,0),u.PSY.mask_adjust=e.maskingadjust,u.PSY.mask_adjust_short=e.maskingadjust_short,e.experimentalY?u.sfb21_extra=!1:u.sfb21_extra=e.out_samplerate>44e3,e.quality>6&&(e.quality=6),e.quality<0&&(e.quality=LAME_DEFAULT_QUALITY),u.iteration_loop=new VBROldIterationLoop(M);break;default:var G;u.sfb21_extra=!1,e.quality<0&&(e.quality=LAME_DEFAULT_QUALITY),(G=e.VBR)==r.vbr_off&&(e.VBR_mean_bitrate_kbps=e.brate),S.apply_preset(e,e.VBR_mean_bitrate_kbps,0),e.VBR=G,u.PSY.mask_adjust=e.maskingadjust,u.PSY.mask_adjust_short=e.maskingadjust_short,G==r.vbr_off?u.iteration_loop=new p(M):u.iteration_loop=new ABRIterationLoop(M)}if(f(e.scale>=0),e.VBR!=r.vbr_off){if(u.VBR_min_bitrate=1,u.VBR_max_bitrate=14,e.out_samplerate<16e3&&(u.VBR_max_bitrate=8),0!=e.VBR_min_bitrate_kbps&&(e.VBR_min_bitrate_kbps=O(e.VBR_min_bitrate_kbps,e.version,e.out_samplerate),u.VBR_min_bitrate=H(e.VBR_min_bitrate_kbps,e.version,e.out_samplerate),u.VBR_min_bitrate<0))return-1;if(0!=e.VBR_max_bitrate_kbps&&(e.VBR_max_bitrate_kbps=O(e.VBR_max_bitrate_kbps,e.version,e.out_samplerate),u.VBR_max_bitrate=H(e.VBR_max_bitrate_kbps,e.version,e.out_samplerate),u.VBR_max_bitrate<0))return-1;e.VBR_min_bitrate_kbps=v.bitrate_table[e.version][u.VBR_min_bitrate],e.VBR_max_bitrate_kbps=v.bitrate_table[e.version][u.VBR_max_bitrate],e.VBR_mean_bitrate_kbps=Math.min(v.bitrate_table[e.version][u.VBR_max_bitrate],e.VBR_mean_bitrate_kbps),e.VBR_mean_bitrate_kbps=Math.max(v.bitrate_table[e.version][u.VBR_min_bitrate],e.VBR_mean_bitrate_kbps)}return e.tune&&(u.PSY.mask_adjust+=e.tune_value_a,u.PSY.mask_adjust_short+=e.tune_value_a),function(e){var t=e.internal_flags;switch(e.quality){default:case 9:t.psymodel=0,t.noise_shaping=0,t.noise_shaping_amp=0,t.noise_shaping_stop=0,t.use_best_huffman=0,t.full_outer_loop=0;break;case 8:e.quality=7;case 7:t.psymodel=1,t.noise_shaping=0,t.noise_shaping_amp=0,t.noise_shaping_stop=0,t.use_best_huffman=0,t.full_outer_loop=0;break;case 6:case 5:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),t.noise_shaping_amp=0,t.noise_shaping_stop=0,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=0,t.full_outer_loop=0;break;case 4:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),t.noise_shaping_amp=0,t.noise_shaping_stop=0,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=1,t.full_outer_loop=0;break;case 3:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),t.noise_shaping_amp=1,t.noise_shaping_stop=1,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=1,t.full_outer_loop=0;break;case 2:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),0==t.substep_shaping&&(t.substep_shaping=2),t.noise_shaping_amp=1,t.noise_shaping_stop=1,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=1,t.full_outer_loop=0;break;case 1:case 0:t.psymodel=1,0==t.noise_shaping&&(t.noise_shaping=1),0==t.substep_shaping&&(t.substep_shaping=2),t.noise_shaping_amp=2,t.noise_shaping_stop=1,-1==t.subblock_gain&&(t.subblock_gain=1),t.use_best_huffman=1,t.full_outer_loop=0}}(e),f(e.scale>=0),e.athaa_type<0?u.ATH.useAdjust=3:u.ATH.useAdjust=e.athaa_type,u.ATH.aaSensitivityP=Math.pow(10,e.athaa_sensitivity/-10),null==e.short_blocks&&(e.short_blocks=_.short_block_allowed),e.short_blocks!=_.short_block_allowed||e.mode!=R.JOINT_STEREO&&e.mode!=R.STEREO||(e.short_blocks=_.short_block_coupled),e.quant_comp<0&&(e.quant_comp=1),e.quant_comp_short<0&&(e.quant_comp_short=0),e.msfix<0&&(e.msfix=0),e.exp_nspsytune=1|e.exp_nspsytune,e.internal_flags.nsPsy.attackthre<0&&(e.internal_flags.nsPsy.attackthre=c.NSATTACKTHRE),e.internal_flags.nsPsy.attackthre_s<0&&(e.internal_flags.nsPsy.attackthre_s=c.NSATTACKTHRE_S),f(e.scale>=0),e.scale<0&&(e.scale=1),e.ATHtype<0&&(e.ATHtype=4),e.ATHcurve<0&&(e.ATHcurve=4),e.athaa_loudapprox<0&&(e.athaa_loudapprox=2),e.interChRatio<0&&(e.interChRatio=0),null==e.useTemporal&&(e.useTemporal=!0),u.slot_lag=u.frac_SpF=0,e.VBR==r.vbr_off&&(u.slot_lag=u.frac_SpF=72e3*(e.version+1)*e.brate%e.out_samplerate|0),w.iteration_init(e),T.psymodel_init(e),f(e.scale>=0),0},this.lame_encode_flush=function(e,t,a,n){var r,_,i,o,f=e.internal_flags,c=l([2,1152]),u=0,h=f.mf_samples_to_encode-g.POSTDELAY,b=N(e);if(f.mf_samples_to_encode<1)return 0;for(r=0,e.in_samplerate!=e.out_samplerate&&(h+=16*e.out_samplerate/e.in_samplerate),(i=e.framesize-h%e.framesize)<576&&(i+=e.framesize),e.encoder_padding=i,o=(h+i)/e.framesize;o>0&&u>=0;){var m=b-f.mf_size,p=e.frameNum;m*=e.in_samplerate,(m/=e.out_samplerate)>1152&&(m=1152),m<1&&(m=1),_=n-r,0==n&&(_=0),a+=u=this.lame_encode_buffer(e,c[0],c[1],m,t,a,_),r+=u,o-=p!=e.frameNum?1:0}if(f.mf_samples_to_encode=0,u<0)return u;if(_=n-r,0==n&&(_=0),s.flush_bitstream(e),(u=s.copy_buffer(f,t,a,_,1))<0)return u;if(a+=u,_=n-(r+=u),0==n&&(_=0),e.write_id3tag_automatic){if(y.id3tag_write_v1(e),(u=s.copy_buffer(f,t,a,_,0))<0)return u;r+=u}return r},this.lame_encode_buffer=function(e,a,n,r,_,o,l){var c=e.internal_flags,u=[null,null];if(4294479419!=c.Class_ID)return-3;if(0==r)return 0;!function(e,t){(null==e.in_buffer_0||e.in_buffer_nsamples<t)&&(e.in_buffer_0=i(t),e.in_buffer_1=i(t),e.in_buffer_nsamples=t)}(c,r),u[0]=c.in_buffer_0,u[1]=c.in_buffer_1;for(var b=0;b<r;b++)u[0][b]=a[b],c.channels_in>1&&(u[1][b]=n[b]);return function(e,a,n,r,_,i,o){var l,c,u,b,m,p=e.internal_flags,v=0,S=[null,null],w=[null,null];if(4294479419!=p.Class_ID)return-3;if(0==r)return 0;if((m=s.copy_buffer(p,_,i,o,0))<0)return m;if(i+=m,v+=m,w[0]=a,w[1]=n,d.NEQ(e.scale,0)&&d.NEQ(e.scale,1))for(c=0;c<r;++c)w[0][c]*=e.scale,2==p.channels_out&&(w[1][c]*=e.scale);if(d.NEQ(e.scale_left,0)&&d.NEQ(e.scale_left,1))for(c=0;c<r;++c)w[0][c]*=e.scale_left;if(d.NEQ(e.scale_right,0)&&d.NEQ(e.scale_right,1))for(c=0;c<r;++c)w[1][c]*=e.scale_right;if(2==e.num_channels&&1==p.channels_out)for(c=0;c<r;++c)w[0][c]=.5*(w[0][c]+w[1][c]),w[1][c]=0;b=N(e),S[0]=p.mfbuf[0],S[1]=p.mfbuf[1];var M=0;for(;r>0;){var R,A,B=[null,null];B[0]=w[0],B[1]=w[1];var y=new D;if(C(e,S,B,M,r,y),R=y.n_in,A=y.n_out,p.findReplayGain&&!p.decode_on_the_fly&&t.AnalyzeSamples(p.rgdata,S[0],p.mf_size,S[1],p.mf_size,A,p.channels_out)==GainAnalysis.GAIN_ANALYSIS_ERROR)return-6;if(r-=R,M+=R,p.channels_out,p.mf_size+=A,f(p.mf_size<=h.MFSIZE),p.mf_samples_to_encode<1&&(p.mf_samples_to_encode=g.ENCDELAY+g.POSTDELAY),p.mf_samples_to_encode+=A,p.mf_size>=b){var E=o-v;if(0==o&&(E=0),(l=X(e,S[0],S[1],_,i,E))<0)return l;for(i+=l,v+=l,p.mf_size-=e.framesize,p.mf_samples_to_encode-=e.framesize,u=0;u<p.channels_out;u++)for(c=0;c<p.mf_size;c++)S[u][c]=S[u][c+e.framesize]}}return f(0==r),v}(e,u[0],u[1],r,_,o,l)}}},function(e,t,a){var s=a(0),n=(s.System,s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n,s.new_byte,s.new_double,s.new_float),r=(s.new_float_n,s.new_int),_=(s.new_int_n,s.assert,a(4));e.exports=function(){this.xr=n(576),this.l3_enc=r(576),this.scalefac=r(_.SFBMAX),this.xrpow_max=0,this.part2_3_length=0,this.big_values=0,this.count1=0,this.global_gain=0,this.scalefac_compress=0,this.block_type=0,this.mixed_block_flag=0,this.table_select=r(3),this.subblock_gain=r(4),this.region0_count=0,this.region1_count=0,this.preflag=0,this.scalefac_scale=0,this.count1table_select=0,this.part2_length=0,this.sfb_lmax=0,this.sfb_smin=0,this.psy_lmax=0,this.sfbmax=0,this.psymax=0,this.sfbdivide=0,this.width=r(_.SFBMAX),this.window=r(_.SFBMAX),this.count1bits=0,this.sfb_partition_table=null,this.slen=r(4),this.max_nonzero_coeff=0;var e=this;function t(e){return new Int32Array(e)}this.assign=function(a){var s;e.xr=(s=a.xr,new Float32Array(s)),e.l3_enc=t(a.l3_enc),e.scalefac=t(a.scalefac),e.xrpow_max=a.xrpow_max,e.part2_3_length=a.part2_3_length,e.big_values=a.big_values,e.count1=a.count1,e.global_gain=a.global_gain,e.scalefac_compress=a.scalefac_compress,e.block_type=a.block_type,e.mixed_block_flag=a.mixed_block_flag,e.table_select=t(a.table_select),e.subblock_gain=t(a.subblock_gain),e.region0_count=a.region0_count,e.region1_count=a.region1_count,e.preflag=a.preflag,e.scalefac_scale=a.scalefac_scale,e.count1table_select=a.count1table_select,e.part2_length=a.part2_length,e.sfb_lmax=a.sfb_lmax,e.sfb_smin=a.sfb_smin,e.psy_lmax=a.psy_lmax,e.sfbmax=a.sfbmax,e.psymax=a.psymax,e.sfbdivide=a.sfbdivide,e.width=t(a.width),e.window=t(a.window),e.count1bits=a.count1bits,e.sfb_partition_table=a.sfb_partition_table.slice(0),e.slen=t(a.slen),e.max_nonzero_coeff=a.max_nonzero_coeff}}},function(e,t,a){var s=a(0),n=s.System,r=(s.VbrMode,s.Float,s.ShortBlock,s.Util,s.Arrays),_=(s.new_array_n,s.new_byte),i=(s.new_double,s.new_float,s.new_float_n),o=s.new_int,l=(s.new_int_n,s.assert),f=a(13),c=a(8),u=a(1),h=a(3);function b(){var e=a(5),t=this,s=null,b=null,m=null,p=null;this.setModules=function(e,t,a,n){s=e,b=t,m=a,p=n};var d=null,v=0,g=0,S=0;function w(e){n.arraycopy(e.header[e.w_ptr].buf,0,d,g,e.sideinfo_len),g+=e.sideinfo_len,v+=8*e.sideinfo_len,e.w_ptr=e.w_ptr+1&h.MAX_HEADER_BUF-1}function M(t,a,s){for(l(s<30);s>0;){var n;0==S&&(S=8,g++,l(g<e.LAME_MAXMP3BUFFER),l(t.header[t.w_ptr].write_timing>=v),t.header[t.w_ptr].write_timing==v&&w(t),d[g]=0),n=Math.min(s,S),S-=n,l((s-=n)<32),l(S<32),d[g]|=a>>s<<S,v+=n}}function R(t,a,s){for(l(s<30);s>0;){var n;0==S&&(S=8,g++,l(g<e.LAME_MAXMP3BUFFER),d[g]=0),n=Math.min(s,S),S-=n,l((s-=n)<32),l(S<32),d[g]|=a>>s<<S,v+=n}}function A(e,t){var a,s=e.internal_flags;if(l(t>=0),t>=8&&(M(s,76,8),t-=8),t>=8&&(M(s,65,8),t-=8),t>=8&&(M(s,77,8),t-=8),t>=8&&(M(s,69,8),t-=8),t>=32){var n=m.getLameShortVersion();if(t>=32)for(a=0;a<n.length&&t>=8;++a)t-=8,M(s,n.charAt(a),8)}for(;t>=1;t-=1)M(s,s.ancillary_flag,1),s.ancillary_flag^=e.disable_reservoir?0:1;l(0==t)}function B(e,t,a){for(var s=e.header[e.h_ptr].ptr;a>0;){var n=Math.min(a,8-(7&s));l((a-=n)<32),e.header[e.h_ptr].buf[s>>3]|=t>>a<<8-(7&s)-n,s+=n}e.header[e.h_ptr].ptr=s}function y(e,t){e<<=8;for(var a=0;a<8;a++)0!=(65536&((t<<=1)^(e<<=1)))&&(t^=32773);return t}function E(e,t){var a,s=c.ht[t.count1table_select+32],n=0,r=t.big_values,_=t.big_values;for(l(t.count1table_select<2),a=(t.count1-t.big_values)/4;a>0;--a){var i,o=0,f=0;0!=(i=t.l3_enc[r+0])&&(f+=8,t.xr[_+0]<0&&o++,l(i<=1)),0!=(i=t.l3_enc[r+1])&&(f+=4,o*=2,t.xr[_+1]<0&&o++,l(i<=1)),0!=(i=t.l3_enc[r+2])&&(f+=2,o*=2,t.xr[_+2]<0&&o++,l(i<=1)),0!=(i=t.l3_enc[r+3])&&(f++,o*=2,t.xr[_+3]<0&&o++,l(i<=1)),r+=4,_+=4,M(e,o+s.table[f],s.hlen[f]),n+=s.hlen[f]}return n}function T(e,t,a,s,n){var r=c.ht[t],_=0;if(l(t<32),0==t)return _;for(var i=a;i<s;i+=2){var o=0,f=0,u=r.xlen,h=r.xlen,b=0,m=n.l3_enc[i],p=n.l3_enc[i+1];if(0!=m&&(n.xr[i]<0&&b++,o--),t>15){if(m>14){var d=m-15;l(d<=r.linmax),b|=d<<1,f=u,m=15}if(p>14){var v=p-15;l(v<=r.linmax),b<<=u,b|=v,f+=u,p=15}h=16}0!=p&&(b<<=1,n.xr[i+1]<0&&b++,o--),l((m|p)<16),m=m*h+p,f-=o,o+=r.hlen[m],l(o<=32),l(f<=32),M(e,r.table[m],o),M(e,b,f),_+=o+f}return _}function x(e,t){var a=3*e.scalefac_band.s[3];a>t.big_values&&(a=t.big_values);var s=T(e,t.table_select[0],0,a,t);return s+=T(e,t.table_select[1],a,t.big_values,t)}function k(e,t){var a,s,n,r;a=t.big_values,l(0<=a&&a<=576);var _=t.region0_count+1;return l(0<=_),l(_<e.scalefac_band.l.length),n=e.scalefac_band.l[_],_+=t.region1_count+1,l(0<=_),l(_<e.scalefac_band.l.length),n>a&&(n=a),(r=e.scalefac_band.l[_])>a&&(r=a),s=T(e,t.table_select[0],0,n,t),s+=T(e,t.table_select[1],n,r,t),s+=T(e,t.table_select[2],r,a,t)}function P(){this.total=0}function I(e,a){var s,r,_,i,o,l=e.internal_flags;return o=l.w_ptr,-1==(i=l.h_ptr-1)&&(i=h.MAX_HEADER_BUF-1),s=l.header[i].write_timing-v,a.total=s,s>=0&&(r=1+i-o,i<o&&(r=1+i-o+h.MAX_HEADER_BUF),s-=8*r*l.sideinfo_len),s+=_=t.getframebits(e),a.total+=_,a.total%8!=0?a.total=1+a.total/8:a.total=a.total/8,a.total+=g+1,s<0&&n.err.println("strange error flushing buffer ... \n"),s}this.getframebits=function(e){var t,a=e.internal_flags;return t=0!=a.bitrate_index?c.bitrate_table[e.version][a.bitrate_index]:e.brate,l(8<=t&&t<=640),8*(0|72e3*(e.version+1)*t/e.out_samplerate+a.padding)},this.CRC_writeheader=function(e,t){var a=65535;a=y(255&t[2],a),a=y(255&t[3],a);for(var s=6;s<e.sideinfo_len;s++)a=y(255&t[s],a);t[4]=byte(a>>8),t[5]=byte(255&a)},this.flush_bitstream=function(e){var t,a,n=e.internal_flags,r=n.h_ptr-1;if(-1==r&&(r=h.MAX_HEADER_BUF-1),t=n.l3_side,!((a=I(e,new P))<0)){if(A(e,a),l(n.header[r].write_timing+this.getframebits(e)==v),n.ResvSize=0,t.main_data_begin=0,n.findReplayGain){var _=s.GetTitleGain(n.rgdata);l(NEQ(_,GainAnalysis.GAIN_NOT_ENOUGH_SAMPLES)),n.RadioGain=0|Math.floor(10*_+.5)}n.findPeakSample&&(n.noclipGainChange=0|Math.ceil(20*Math.log10(n.PeakSample/32767)*10),n.noclipGainChange>0&&(EQ(e.scale,1)||EQ(e.scale,0))?n.noclipScale=Math.floor(32767/n.PeakSample*100)/100:n.noclipScale=-1)}},this.add_dummy_byte=function(e,t,a){for(var s,n=e.internal_flags;a-- >0;)for(R(0,t,8),s=0;s<h.MAX_HEADER_BUF;++s)n.header[s].write_timing+=8},this.format_bitstream=function(e){var t,a=e.internal_flags;t=a.l3_side;var s=this.getframebits(e);A(e,t.resvDrain_pre),function(e,t){var a,s,_,i=e.internal_flags;if(a=i.l3_side,i.header[i.h_ptr].ptr=0,r.fill(i.header[i.h_ptr].buf,0,i.sideinfo_len,0),e.out_samplerate<16e3?B(i,4094,12):B(i,4095,12),B(i,e.version,1),B(i,1,2),B(i,e.error_protection?0:1,1),B(i,i.bitrate_index,4),B(i,i.samplerate_index,2),B(i,i.padding,1),B(i,e.extension,1),B(i,e.mode.ordinal(),2),B(i,i.mode_ext,2),B(i,e.copyright,1),B(i,e.original,1),B(i,e.emphasis,2),e.error_protection&&B(i,0,16),1==e.version){for(l(a.main_data_begin>=0),B(i,a.main_data_begin,9),2==i.channels_out?B(i,a.private_bits,3):B(i,a.private_bits,5),_=0;_<i.channels_out;_++){var o;for(o=0;o<4;o++)B(i,a.scfsi[_][o],1)}for(s=0;s<2;s++)for(_=0;_<i.channels_out;_++){B(i,(f=a.tt[s][_]).part2_3_length+f.part2_length,12),B(i,f.big_values/2,9),B(i,f.global_gain,8),B(i,f.scalefac_compress,4),f.block_type!=u.NORM_TYPE?(B(i,1,1),B(i,f.block_type,2),B(i,f.mixed_block_flag,1),14==f.table_select[0]&&(f.table_select[0]=16),B(i,f.table_select[0],5),14==f.table_select[1]&&(f.table_select[1]=16),B(i,f.table_select[1],5),B(i,f.subblock_gain[0],3),B(i,f.subblock_gain[1],3),B(i,f.subblock_gain[2],3)):(B(i,0,1),14==f.table_select[0]&&(f.table_select[0]=16),B(i,f.table_select[0],5),14==f.table_select[1]&&(f.table_select[1]=16),B(i,f.table_select[1],5),14==f.table_select[2]&&(f.table_select[2]=16),B(i,f.table_select[2],5),l(0<=f.region0_count&&f.region0_count<16),l(0<=f.region1_count&&f.region1_count<8),B(i,f.region0_count,4),B(i,f.region1_count,3)),B(i,f.preflag,1),B(i,f.scalefac_scale,1),B(i,f.count1table_select,1)}}else for(l(a.main_data_begin>=0),B(i,a.main_data_begin,8),B(i,a.private_bits,i.channels_out),s=0,_=0;_<i.channels_out;_++){var f;B(i,(f=a.tt[s][_]).part2_3_length+f.part2_length,12),B(i,f.big_values/2,9),B(i,f.global_gain,8),B(i,f.scalefac_compress,9),f.block_type!=u.NORM_TYPE?(B(i,1,1),B(i,f.block_type,2),B(i,f.mixed_block_flag,1),14==f.table_select[0]&&(f.table_select[0]=16),B(i,f.table_select[0],5),14==f.table_select[1]&&(f.table_select[1]=16),B(i,f.table_select[1],5),B(i,f.subblock_gain[0],3),B(i,f.subblock_gain[1],3),B(i,f.subblock_gain[2],3)):(B(i,0,1),14==f.table_select[0]&&(f.table_select[0]=16),B(i,f.table_select[0],5),14==f.table_select[1]&&(f.table_select[1]=16),B(i,f.table_select[1],5),14==f.table_select[2]&&(f.table_select[2]=16),B(i,f.table_select[2],5),l(0<=f.region0_count&&f.region0_count<16),l(0<=f.region1_count&&f.region1_count<8),B(i,f.region0_count,4),B(i,f.region1_count,3)),B(i,f.scalefac_scale,1),B(i,f.count1table_select,1)}e.error_protection&&CRC_writeheader(i,i.header[i.h_ptr].buf);var c=i.h_ptr;l(i.header[c].ptr==8*i.sideinfo_len),i.h_ptr=c+1&h.MAX_HEADER_BUF-1,i.header[i.h_ptr].write_timing=i.header[c].write_timing+t,i.h_ptr==i.w_ptr&&n.err.println("Error: MAX_HEADER_BUF too small in bitstream.c \n")}(e,s);var _=8*a.sideinfo_len;if(_+=function(e){var t,a,s,n,r=0,_=e.internal_flags,i=_.l3_side;if(1==e.version)for(t=0;t<2;t++)for(a=0;a<_.channels_out;a++){var o=i.tt[t][a],c=f.slen1_tab[o.scalefac_compress],h=f.slen2_tab[o.scalefac_compress];for(n=0,s=0;s<o.sfbdivide;s++)-1!=o.scalefac[s]&&(M(_,o.scalefac[s],c),n+=c);for(;s<o.sfbmax;s++)-1!=o.scalefac[s]&&(M(_,o.scalefac[s],h),n+=h);l(n==o.part2_length),o.block_type==u.SHORT_TYPE?n+=x(_,o):n+=k(_,o),n+=E(_,o),l(n==o.part2_3_length+o.part2_length),r+=n}else for(t=0,a=0;a<_.channels_out;a++){o=i.tt[t][a];var b,m,p=0;if(l(null!=o.sfb_partition_table),n=0,s=0,m=0,o.block_type==u.SHORT_TYPE){for(;m<4;m++){var d=o.sfb_partition_table[m]/3,v=o.slen[m];for(b=0;b<d;b++,s++)M(_,Math.max(o.scalefac[3*s+0],0),v),M(_,Math.max(o.scalefac[3*s+1],0),v),M(_,Math.max(o.scalefac[3*s+2],0),v),p+=3*v}n+=x(_,o)}else{for(;m<4;m++){d=o.sfb_partition_table[m],v=o.slen[m];for(b=0;b<d;b++,s++)M(_,Math.max(o.scalefac[s],0),v),p+=v}n+=k(_,o)}n+=E(_,o),l(n==o.part2_3_length),l(p==o.part2_length),r+=p+n}return r}(e),A(e,t.resvDrain_post),_+=t.resvDrain_post,t.main_data_begin+=(s-_)/8,I(e,new P)!=a.ResvSize&&n.err.println("Internal buffer inconsistency. flushbits <> ResvSize"),8*t.main_data_begin!=a.ResvSize&&(n.err.printf("bit reservoir error: \nl3_side.main_data_begin: %d \nResvoir size: %d \nresv drain (post) %d \nresv drain (pre) %d \nheader and sideinfo: %d \ndata bits: %d \ntotal bits: %d (remainder: %d) \nbitsperframe: %d \n",8*t.main_data_begin,a.ResvSize,t.resvDrain_post,t.resvDrain_pre,8*a.sideinfo_len,_-t.resvDrain_post-8*a.sideinfo_len,_,_%8,s),n.err.println("This is a fatal error. It has several possible causes:"),n.err.println("90%% LAME compiled with buggy version of gcc using advanced optimizations"),n.err.println(" 9%% Your system is overclocked"),n.err.println(" 1%% bug in LAME encoding library"),a.ResvSize=8*t.main_data_begin),l(v%8==0),v>1e9){var i;for(i=0;i<h.MAX_HEADER_BUF;++i)a.header[i].write_timing-=v;v=0}return 0},this.copy_buffer=function(e,t,a,r,_){var f=g+1;if(f<=0)return 0;if(0!=r&&f>r)return-1;if(n.arraycopy(d,0,t,a,f),g=-1,S=0,0!=_){var c=o(1);if(c[0]=e.nMusicCRC,p.updateMusicCRC(c,t,a,f),e.nMusicCRC=c[0],f>0&&(e.VBR_seek_table.nBytesWritten+=f),e.decode_on_the_fly)for(var u,h=i([2,1152]),m=f,v=-1;0!=v;)if(v=b.hip_decode1_unclipped(e.hip,t,a,m,h[0],h[1]),m=0,-1==v&&(v=0),v>0){if(l(v<=1152),e.findPeakSample){for(u=0;u<v;u++)h[0][u]>e.PeakSample?e.PeakSample=h[0][u]:-h[0][u]>e.PeakSample&&(e.PeakSample=-h[0][u]);if(e.channels_out>1)for(u=0;u<v;u++)h[1][u]>e.PeakSample?e.PeakSample=h[1][u]:-h[1][u]>e.PeakSample&&(e.PeakSample=-h[1][u])}if(e.findReplayGain&&s.AnalyzeSamples(e.rgdata,h[0],0,h[1],0,v,e.channels_out)==GainAnalysis.GAIN_ANALYSIS_ERROR)return-6}}return f},this.init_bit_stream_w=function(t){d=_(e.LAME_MAXMP3BUFFER),t.h_ptr=t.w_ptr=0,t.header[t.h_ptr].write_timing=0,g=-1,S=0,v=0}}b.EQ=function(e,t){return Math.abs(e)>Math.abs(t)?Math.abs(e-t)<=1e-6*Math.abs(e):Math.abs(e-t)<=1e-6*Math.abs(t)},b.NEQ=function(e,t){return!b.EQ(e,t)},e.exports=b},function(e,t){function a(e,t,a,s){this.xlen=e,this.linmax=t,this.table=a,this.hlen=s}var s={t1HB:[1,1,1,0],t2HB:[1,2,1,3,1,1,3,2,0],t3HB:[3,2,1,1,1,1,3,2,0],t5HB:[1,2,6,5,3,1,4,4,7,5,7,1,6,1,1,0],t6HB:[7,3,5,1,6,2,3,2,5,4,4,1,3,3,2,0],t7HB:[1,2,10,19,16,10,3,3,7,10,5,3,11,4,13,17,8,4,12,11,18,15,11,2,7,6,9,14,3,1,6,4,5,3,2,0],t8HB:[3,4,6,18,12,5,5,1,2,16,9,3,7,3,5,14,7,3,19,17,15,13,10,4,13,5,8,11,5,1,12,4,4,1,1,0],t9HB:[7,5,9,14,15,7,6,4,5,5,6,7,7,6,8,8,8,5,15,6,9,10,5,1,11,7,9,6,4,1,14,4,6,2,6,0],t10HB:[1,2,10,23,35,30,12,17,3,3,8,12,18,21,12,7,11,9,15,21,32,40,19,6,14,13,22,34,46,23,18,7,20,19,33,47,27,22,9,3,31,22,41,26,21,20,5,3,14,13,10,11,16,6,5,1,9,8,7,8,4,4,2,0],t11HB:[3,4,10,24,34,33,21,15,5,3,4,10,32,17,11,10,11,7,13,18,30,31,20,5,25,11,19,59,27,18,12,5,35,33,31,58,30,16,7,5,28,26,32,19,17,15,8,14,14,12,9,13,14,9,4,1,11,4,6,6,6,3,2,0],t12HB:[9,6,16,33,41,39,38,26,7,5,6,9,23,16,26,11,17,7,11,14,21,30,10,7,17,10,15,12,18,28,14,5,32,13,22,19,18,16,9,5,40,17,31,29,17,13,4,2,27,12,11,15,10,7,4,1,27,12,8,12,6,3,1,0],t13HB:[1,5,14,21,34,51,46,71,42,52,68,52,67,44,43,19,3,4,12,19,31,26,44,33,31,24,32,24,31,35,22,14,15,13,23,36,59,49,77,65,29,40,30,40,27,33,42,16,22,20,37,61,56,79,73,64,43,76,56,37,26,31,25,14,35,16,60,57,97,75,114,91,54,73,55,41,48,53,23,24,58,27,50,96,76,70,93,84,77,58,79,29,74,49,41,17,47,45,78,74,115,94,90,79,69,83,71,50,59,38,36,15,72,34,56,95,92,85,91,90,86,73,77,65,51,44,43,42,43,20,30,44,55,78,72,87,78,61,46,54,37,30,20,16,53,25,41,37,44,59,54,81,66,76,57,54,37,18,39,11,35,33,31,57,42,82,72,80,47,58,55,21,22,26,38,22,53,25,23,38,70,60,51,36,55,26,34,23,27,14,9,7,34,32,28,39,49,75,30,52,48,40,52,28,18,17,9,5,45,21,34,64,56,50,49,45,31,19,12,15,10,7,6,3,48,23,20,39,36,35,53,21,16,23,13,10,6,1,4,2,16,15,17,27,25,20,29,11,17,12,16,8,1,1,0,1],t15HB:[7,12,18,53,47,76,124,108,89,123,108,119,107,81,122,63,13,5,16,27,46,36,61,51,42,70,52,83,65,41,59,36,19,17,15,24,41,34,59,48,40,64,50,78,62,80,56,33,29,28,25,43,39,63,55,93,76,59,93,72,54,75,50,29,52,22,42,40,67,57,95,79,72,57,89,69,49,66,46,27,77,37,35,66,58,52,91,74,62,48,79,63,90,62,40,38,125,32,60,56,50,92,78,65,55,87,71,51,73,51,70,30,109,53,49,94,88,75,66,122,91,73,56,42,64,44,21,25,90,43,41,77,73,63,56,92,77,66,47,67,48,53,36,20,71,34,67,60,58,49,88,76,67,106,71,54,38,39,23,15,109,53,51,47,90,82,58,57,48,72,57,41,23,27,62,9,86,42,40,37,70,64,52,43,70,55,42,25,29,18,11,11,118,68,30,55,50,46,74,65,49,39,24,16,22,13,14,7,91,44,39,38,34,63,52,45,31,52,28,19,14,8,9,3,123,60,58,53,47,43,32,22,37,24,17,12,15,10,2,1,71,37,34,30,28,20,17,26,21,16,10,6,8,6,2,0],t16HB:[1,5,14,44,74,63,110,93,172,149,138,242,225,195,376,17,3,4,12,20,35,62,53,47,83,75,68,119,201,107,207,9,15,13,23,38,67,58,103,90,161,72,127,117,110,209,206,16,45,21,39,69,64,114,99,87,158,140,252,212,199,387,365,26,75,36,68,65,115,101,179,164,155,264,246,226,395,382,362,9,66,30,59,56,102,185,173,265,142,253,232,400,388,378,445,16,111,54,52,100,184,178,160,133,257,244,228,217,385,366,715,10,98,48,91,88,165,157,148,261,248,407,397,372,380,889,884,8,85,84,81,159,156,143,260,249,427,401,392,383,727,713,708,7,154,76,73,141,131,256,245,426,406,394,384,735,359,710,352,11,139,129,67,125,247,233,229,219,393,743,737,720,885,882,439,4,243,120,118,115,227,223,396,746,742,736,721,712,706,223,436,6,202,224,222,218,216,389,386,381,364,888,443,707,440,437,1728,4,747,211,210,208,370,379,734,723,714,1735,883,877,876,3459,865,2,377,369,102,187,726,722,358,711,709,866,1734,871,3458,870,434,0,12,10,7,11,10,17,11,9,13,12,10,7,5,3,1,3],t24HB:[15,13,46,80,146,262,248,434,426,669,653,649,621,517,1032,88,14,12,21,38,71,130,122,216,209,198,327,345,319,297,279,42,47,22,41,74,68,128,120,221,207,194,182,340,315,295,541,18,81,39,75,70,134,125,116,220,204,190,178,325,311,293,271,16,147,72,69,135,127,118,112,210,200,188,352,323,306,285,540,14,263,66,129,126,119,114,214,202,192,180,341,317,301,281,262,12,249,123,121,117,113,215,206,195,185,347,330,308,291,272,520,10,435,115,111,109,211,203,196,187,353,332,313,298,283,531,381,17,427,212,208,205,201,193,186,177,169,320,303,286,268,514,377,16,335,199,197,191,189,181,174,333,321,305,289,275,521,379,371,11,668,184,183,179,175,344,331,314,304,290,277,530,383,373,366,10,652,346,171,168,164,318,309,299,287,276,263,513,375,368,362,6,648,322,316,312,307,302,292,284,269,261,512,376,370,364,359,4,620,300,296,294,288,282,273,266,515,380,374,369,365,361,357,2,1033,280,278,274,267,264,259,382,378,372,367,363,360,358,356,0,43,20,19,17,15,13,11,9,7,6,4,7,5,3,1,3],t32HB:[1,10,8,20,12,20,16,32,14,12,24,0,28,16,24,16],t33HB:[15,28,26,48,22,40,36,64,14,24,20,32,12,16,8,0],t1l:[1,4,3,5],t2l:[1,4,7,4,5,7,6,7,8],t3l:[2,3,7,4,4,7,6,7,8],t5l:[1,4,7,8,4,5,8,9,7,8,9,10,8,8,9,10],t6l:[3,4,6,8,4,4,6,7,5,6,7,8,7,7,8,9],t7l:[1,4,7,9,9,10,4,6,8,9,9,10,7,7,9,10,10,11,8,9,10,11,11,11,8,9,10,11,11,12,9,10,11,12,12,12],t8l:[2,4,7,9,9,10,4,4,6,10,10,10,7,6,8,10,10,11,9,10,10,11,11,12,9,9,10,11,12,12,10,10,11,11,13,13],t9l:[3,4,6,7,9,10,4,5,6,7,8,10,5,6,7,8,9,10,7,7,8,9,9,10,8,8,9,9,10,11,9,9,10,10,11,11],t10l:[1,4,7,9,10,10,10,11,4,6,8,9,10,11,10,10,7,8,9,10,11,12,11,11,8,9,10,11,12,12,11,12,9,10,11,12,12,12,12,12,10,11,12,12,13,13,12,13,9,10,11,12,12,12,13,13,10,10,11,12,12,13,13,13],t11l:[2,4,6,8,9,10,9,10,4,5,6,8,10,10,9,10,6,7,8,9,10,11,10,10,8,8,9,11,10,12,10,11,9,10,10,11,11,12,11,12,9,10,11,12,12,13,12,13,9,9,9,10,11,12,12,12,9,9,10,11,12,12,12,12],t12l:[4,4,6,8,9,10,10,10,4,5,6,7,9,9,10,10,6,6,7,8,9,10,9,10,7,7,8,8,9,10,10,10,8,8,9,9,10,10,10,11,9,9,10,10,10,11,10,11,9,9,9,10,10,11,11,12,10,10,10,11,11,11,11,12],t13l:[1,5,7,8,9,10,10,11,10,11,12,12,13,13,14,14,4,6,8,9,10,10,11,11,11,11,12,12,13,14,14,14,7,8,9,10,11,11,12,12,11,12,12,13,13,14,15,15,8,9,10,11,11,12,12,12,12,13,13,13,13,14,15,15,9,9,11,11,12,12,13,13,12,13,13,14,14,15,15,16,10,10,11,12,12,12,13,13,13,13,14,13,15,15,16,16,10,11,12,12,13,13,13,13,13,14,14,14,15,15,16,16,11,11,12,13,13,13,14,14,14,14,15,15,15,16,18,18,10,10,11,12,12,13,13,14,14,14,14,15,15,16,17,17,11,11,12,12,13,13,13,15,14,15,15,16,16,16,18,17,11,12,12,13,13,14,14,15,14,15,16,15,16,17,18,19,12,12,12,13,14,14,14,14,15,15,15,16,17,17,17,18,12,13,13,14,14,15,14,15,16,16,17,17,17,18,18,18,13,13,14,15,15,15,16,16,16,16,16,17,18,17,18,18,14,14,14,15,15,15,17,16,16,19,17,17,17,19,18,18,13,14,15,16,16,16,17,16,17,17,18,18,21,20,21,18],t15l:[3,5,6,8,8,9,10,10,10,11,11,12,12,12,13,14,5,5,7,8,9,9,10,10,10,11,11,12,12,12,13,13,6,7,7,8,9,9,10,10,10,11,11,12,12,13,13,13,7,8,8,9,9,10,10,11,11,11,12,12,12,13,13,13,8,8,9,9,10,10,11,11,11,11,12,12,12,13,13,13,9,9,9,10,10,10,11,11,11,11,12,12,13,13,13,14,10,9,10,10,10,11,11,11,11,12,12,12,13,13,14,14,10,10,10,11,11,11,11,12,12,12,12,12,13,13,13,14,10,10,10,11,11,11,11,12,12,12,12,13,13,14,14,14,10,10,11,11,11,11,12,12,12,13,13,13,13,14,14,14,11,11,11,11,12,12,12,12,12,13,13,13,13,14,15,14,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,15,12,12,11,12,12,12,13,13,13,13,13,13,14,14,15,15,12,12,12,12,12,13,13,13,13,14,14,14,14,14,15,15,13,13,13,13,13,13,13,13,14,14,14,14,15,15,14,15,13,13,13,13,13,13,13,14,14,14,14,14,15,15,15,15],t16_5l:[1,5,7,9,10,10,11,11,12,12,12,13,13,13,14,11,4,6,8,9,10,11,11,11,12,12,12,13,14,13,14,11,7,8,9,10,11,11,12,12,13,12,13,13,13,14,14,12,9,9,10,11,11,12,12,12,13,13,14,14,14,15,15,13,10,10,11,11,12,12,13,13,13,14,14,14,15,15,15,12,10,10,11,11,12,13,13,14,13,14,14,15,15,15,16,13,11,11,11,12,13,13,13,13,14,14,14,14,15,15,16,13,11,11,12,12,13,13,13,14,14,15,15,15,15,17,17,13,11,12,12,13,13,13,14,14,15,15,15,15,16,16,16,13,12,12,12,13,13,14,14,15,15,15,15,16,15,16,15,14,12,13,12,13,14,14,14,14,15,16,16,16,17,17,16,13,13,