yiyi-audio-recorder
Version:
js audio recorder plugin
11 lines • 180 kB
JavaScript
/*!
*
* 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,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Recorder=t():e.Recorder=t()}(this,(function(){return 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}return 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=16)}([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}},i={arraycopy:function(e,t,a,s,n){for(var r=t+n;t<r;)a[s++]=e[t++]},out:{}};i.out.println=function(e){console.log(e)},i.out.printf=function(){console.log.apply(console,arguments)};var _={};function o(e){this.ordinal=e}_.SQRT2=1.4142135623730951,_.FAST_LOG10=function(e){return Math.log10(e)},_.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:i,VbrMode:f,Float:l,ShortBlock:o,Util:_,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,i=(s.Float,s.ShortBlock,s.Util,s.Arrays,s.new_array_n),_=(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(21),t=a(22),s=a(2),h=c.FFTOFFSET,u=c.MPG_MD_MS_LR,p=null;this.psy=null;var b=null,m=null,d=null;this.setModules=function(e,t,a,s){p=e,this.psy=t,b=t,m=s,d=a};var v=new e;this.lame_encode_mp3_frame=function(e,a,g,S,w,M){var A,R=i([2,2]);R[0][0]=new t,R[0][1]=new t,R[1][0]=new t,R[1][1]=new t;var y,B=i([2,2]);B[0][0]=new t,B[0][1]=new t,B[1][0]=new t,B[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]],L=[[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,i,o=_(2014),l=_(2014);for(n.lame_encode_frame_init=1,r=0,i=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][i],2==n.channels_out&&(l[r]=t[1][i]),++i);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 H=[null,null],N=0,D=l(2);for(x=0;x<P.mode_gr;x++){for(T=0;T<P.channels_out;T++)H[T]=k[T],N=576+576*x-c.FFTOFFSET;if(0!=(e.VBR==r.vbr_mtrh||e.VBR==r.vbr_mt?b.L3psycho_anal_vbr(e,H,N,x,R,B,O[x],L[x],I[x],D):b.L3psycho_anal_ns(e,H,N,x,R,B,O[x],L[x],I[x],D)))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 X=P.l3_side.tt[x][T];X.block_type=D[T],X.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,L[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 C=0,F=0;for(x=0;x<P.mode_gr;x++)for(T=0;T<P.channels_out;T++)C+=L[x][T],F+=O[x][T];if(C<=1*F){var q=P.l3_side.tt[0],Y=P.l3_side.tt[P.mode_gr-1];q[0].block_type==q[1].block_type&&Y[0].block_type==Y[1].block_type&&(P.mode_ext=c.MPG_MD_MS_LR)}}if(P.mode_ext==u?(y=B,E=L):(y=R,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==u&&(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,U;for(j=0;j<18;j++)P.nsPsy.pefirbuf[j]=P.nsPsy.pefirbuf[j+1];for(U=0,x=0;x<P.mode_gr;x++)for(T=0;T<P.channels_out;T++)U+=E[x][T];for(P.nsPsy.pefirbuf[18]=U,U=P.nsPsy.pefirbuf[9],j=0;j<9;j++)U+=(P.nsPsy.pefirbuf[j]+P.nsPsy.pefirbuf[18-j])*c.fircoef[j];for(U=3350*P.mode_gr*P.channels_out/U,x=0;x<P.mode_gr;x++)for(T=0;T<P.channels_out;T++)E[x][T]*=U}if(P.iteration_loop.iteration_loop(e,E,V,y),p.format_bitstream(e),A=p.copy_buffer(P,S,w,M,1),e.bWriteVbrTag&&m.addVbrFrame(e),e.analysis&&null!=P.pinfo){for(T=0;T<P.channels_out;T++){var z;for(z=0;z<h;z++)P.pinfo.pcmdata[T][z]=P.pinfo.pcmdata[T][z+e.framesize];for(z=h;z<1600;z++)P.pinfo.pcmdata[T][z]=k[T][z-h]}d.set_frame_pinfo(e,y)}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),A}}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,i=s.new_float,_=s.new_float_n,o=s.new_int,l=s.new_int_n,f=(s.assert,a(24)),c=a(11),h=a(25),u=a(26),p=a(10),b=a(1),m=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=_([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=i(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(m.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=_([2,2,18,b.SBLIMIT]),this.amp_filter=i(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=i(b.CBANDS),this.minval_s=i(b.CBANDS),this.nb_1=_([4,b.CBANDS]),this.nb_2=_([4,b.CBANDS]),this.nb_s1=_([4,b.CBANDS]),this.nb_s2=_([4,b.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=i(4),this.loudness_sq=_([2,2]),this.loudness_sq_save=i(2),this.mld_l=i(b.SBMAX_l),this.mld_s=i(b.SBMAX_s),this.bm_l=o(b.SBMAX_l),this.bo_l=o(b.SBMAX_l),this.bm_s=o(b.SBMAX_s),this.bo_s=o(b.SBMAX_s),this.npart_l=0,this.npart_s=0,this.s3ind=l([b.CBANDS,2]),this.s3ind_s=l([b.CBANDS,2]),this.numlines_s=o(b.CBANDS),this.numlines_l=o(b.CBANDS),this.rnumlines_l=i(b.CBANDS),this.mld_cb_l=i(b.CBANDS),this.mld_cb_s=i(b.CBANDS),this.numlines_s_num1=0,this.numlines_l_num1=0,this.pe=i(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 h,this.VBR_seek_table=new u,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 p;for(t=0;t<this.thm.length;t++)this.thm[t]=new p;for(t=0;t<this.header.length;t++)this.header[t]=new e}d.MFSIZE=3456+b.ENCDELAY-b.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,i=(s.Float,s.ShortBlock),_=(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(19),h=a(23),u=a(3),p=a(27),b=a(28),m=a(29),d=a(7),v=a(8),g=a(1);e.exports=function e(){var t,s,S,w,M,A=a(2),R=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 y,B,E,T=new c;function x(){this.mask_adjust=0,this.mask_adjust_short=0,this.bo_l_weight=_(g.SBMAX_l),this.bo_s_weight=_(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 L(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 H(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=R.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(u.MFSIZE>=t),t}function D(e,t,a,s,n,r){var i=R.enc.lame_encode_mp3_frame(e,t,a,s,n,r);return e.frameNum++,i}function X(){this.n_in=0,this.n_out=0}function C(){this.num_used=0}function F(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,i,o,l){var c,h,p=e.internal_flags,b=0,m=e.out_samplerate/function e(t,a){return 0!=a?e(a,t%a):t}(e.out_samplerate,e.in_samplerate);m>u.BPC&&(m=u.BPC);var d=Math.abs(p.resample_ratio-Math.floor(.5+p.resample_ratio))<1e-4?1:0,v=1/p.resample_ratio;v>1&&(v=1);var g=31;0==g%2&&--g;var S=(g+=d)+1;if(0==p.fill_buffer_resample_init){for(p.inbuf_old[0]=_(S),p.inbuf_old[1]=_(S),c=0;c<=2*m;++c)p.blackfilt[c]=_(S);for(p.itime[0]=0,p.itime[1]=0,b=0;b<=2*m;b++){var w=0,M=(b-m)/(2*m);for(c=0;c<=g;c++)w+=p.blackfilt[b][c]=F(c-M,v,g);for(c=0;c<=g;c++)p.blackfilt[b][c]/=w}p.fill_buffer_resample_init=1}var A=p.inbuf_old[l];for(h=0;h<s;h++){var R,y;if(R=h*p.resample_ratio,g+(b=0|Math.floor(R-p.itime[l]))-g/2>=i)break;M=R-p.itime[l]-(b+g%2*.5);f(Math.abs(M)<=.501),y=0|Math.floor(2*M*m+m+.5);var B=0;for(c=0;c<=g;++c){var E=0|c+b-g/2;f(E<i),f(E+S>=0),B+=(E<0?A[S+E]:n[r+E])*p.blackfilt[y][c]}t[a+h]=B}if(o.num_used=Math.min(i,g+b-g/2),p.itime[l]+=o.num_used-h*p.resample_ratio,o.num_used>=S)for(c=0;c<S;c++)A[c]=n[r+o.num_used+c-S];else{var T=S-o.num_used;for(c=0;c<T;++c)A[c]=A[c+o.num_used];for(b=0;c<S;++c,++b)A[c]=n[r+b];f(b==o.num_used)}return h}function Y(e,t,a,s,n,r){var i=e.internal_flags;if(i.resample_ratio<.9999||i.resample_ratio>1.0001)for(var _=0;_<i.channels_out;_++){var o=new C;r.n_out=q(e,t[_],i.mf_size,e.framesize,a[_],s,n,o,_),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][i.mf_size+l]=a[0][s+l],2==i.channels_out&&(t[1][i.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=i,y=_,o,B=l,E=f,this.enc.setModules(s,T,w,y)},this.lame_init=function(){var e=new h;return 0!=function(e){var t;return e.class_id=4294479419,t=e.internal_flags=new u,e.mode=A.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 i=0;i<16;i++)if(Math.max(e,t[i+1])!=e){r=t[i+1],n=i+1,s=t[i],a=i;break}return r-e>e-s?a:n},this.lame_init_params=function(e){var a,_,l,h=e.internal_flags;if(h.Class_ID=0,null==h.ATH&&(h.ATH=new p),null==h.PSY&&(h.PSY=new x),null==h.rgdata&&(h.rgdata=new b),h.channels_in=e.num_channels,1==h.channels_in&&(e.mode=A.MONO),h.channels_out=e.mode==A.MONO?1:2,h.mode_ext=g.MPG_MD_MS_LR,e.mode==A.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*h.channels_out/(1e3*e.compression_ratio),h.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 u=16e3;switch(e.VBR){case r.vbr_off:H(R=new k,e.brate),u=R.lowerlimit;break;case r.vbr_abr:var R;H(R=new k,e.VBR_mean_bitrate_kbps),u=R.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],D=P[e.VBR_q+1],X=e.VBR_q_frac;u=linear_int(N,D,X)}else u=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],D=P[e.VBR_q+1],X=e.VBR_q_frac;u=linear_int(N,D,X)}else u=19500}e.mode!=A.MONO||e.VBR!=r.vbr_off&&e.VBR!=r.vbr_abr||(u*=1.5),e.lowpassfreq=0|u}if(0==e.out_samplerate&&(2*e.lowpassfreq>e.in_samplerate&&(e.lowpassfreq=e.in_samplerate/2),e.out_samplerate=(a=0|e.lowpassfreq,_=e.in_samplerate,l=44100,_>=48e3?l=48e3:_>=44100?l=44100:_>=32e3?l=32e3:_>=24e3?l=24e3:_>=22050?l=22050:_>=16e3?l=16e3:_>=12e3?l=12e3:_>=11025?l=11025:_>=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),_<l?_>44100?48e3:_>32e3?44100:_>24e3?32e3:_>22050?24e3:_>16e3?22050:_>12e3?16e3:_>11025?12e3:_>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*h.channels_out/(1e3*e.brate)),e.VBR==r.vbr_abr&&(e.compression_ratio=16*e.out_samplerate*h.channels_out/(1e3*e.VBR_mean_bitrate_kbps)),e.bWriteVbrTag||(e.findReplayGain=!1,e.decode_on_the_fly=!1,h.findPeakSample=!1),h.findReplayGain=e.findReplayGain,h.decode_on_the_fly=e.decode_on_the_fly,h.decode_on_the_fly&&(h.findPeakSample=!0),h.findReplayGain&&t.InitGainAnalysis(h.rgdata,e.out_samplerate)==GainAnalysis.INIT_GAIN_ANALYSIS_ERROR)return e.internal_flags=null,-6;switch(h.decode_on_the_fly&&!e.decode_only&&(null!=h.hip&&E.hip_decode_exit(h.hip),h.hip=E.hip_decode_init()),h.mode_gr=e.out_samplerate<=24e3?1:2,e.framesize=576*h.mode_gr,e.encoder_delay=g.ENCDELAY,h.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*h.channels_out/(1e3*e.VBR_mean_bitrate_kbps);break;default:e.compression_ratio=16*e.out_samplerate*h.channels_out/(1e3*e.brate)}if(e.mode==A.NOT_SET&&(e.mode=A.JOINT_STEREO),e.highpassfreq>0?(h.highpass1=2*e.highpassfreq,e.highpasswidth>=0?h.highpass2=2*(e.highpassfreq+e.highpasswidth):h.highpass2=2*e.highpassfreq,h.highpass1/=e.out_samplerate,h.highpass2/=e.out_samplerate):(h.highpass1=0,h.highpass2=0),e.lowpassfreq>0?(h.lowpass2=2*e.lowpassfreq,e.lowpasswidth>=0?(h.lowpass1=2*(e.lowpassfreq-e.lowpasswidth),h.lowpass1<0&&(h.lowpass1=0)):h.lowpass1=2*e.lowpassfreq,h.lowpass1/=e.out_samplerate,h.lowpass2/=e.out_samplerate):(h.lowpass1=0,h.lowpass2=0),function(e){var t=e.internal_flags,a=32,s=-1;if(t.lowpass1>0){for(var r=999,i=0;i<=31;i++){(f=i/31)>=t.lowpass2&&(a=Math.min(a,i)),t.lowpass1<f&&f<t.lowpass2&&(r=Math.min(r,i))}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 _=-1;for(i=0;i<=31;i++){(f=i/31)<=t.highpass1&&(s=Math.max(s,i)),t.highpass1<f&&f<t.highpass2&&(_=Math.max(_,i))}t.highpass1=s/31,t.highpass2=-1==_?(s+.75)/31:(_+.75)/31}for(i=0;i<32;i++){var o,l,f=i/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[i]=o*l}}(e),h.samplerate_index=V(e.out_samplerate,e),h.samplerate_index<0)return e.internal_flags=null,-1;if(e.VBR==r.vbr_off){if(e.free_format)h.bitrate_index=0;else if(e.brate=O(e.brate,e.version,e.out_samplerate),h.bitrate_index=L(e.brate,e.version,e.out_samplerate),h.bitrate_index<=0)return e.internal_flags=null,-1}else h.bitrate_index=1;e.analysis&&(e.bWriteVbrTag=!1),null!=h.pinfo&&(e.bWriteVbrTag=!1),s.init_bit_stream_w(h);for(var C,F=h.samplerate_index+3*e.version+6*(e.out_samplerate<16e3?1:0),q=0;q<g.SBMAX_l+1;q++)h.scalefac_band.l[q]=w.sfBandIndex[F].l[q];for(q=0;q<g.PSFB21+1;q++){var Y=(h.scalefac_band.l[22]-h.scalefac_band.l[21])/g.PSFB21,j=h.scalefac_band.l[21]+q*Y;h.scalefac_band.psfb21[q]=j}h.scalefac_band.psfb21[g.PSFB21]=576;for(q=0;q<g.SBMAX_s+1;q++)h.scalefac_band.s[q]=w.sfBandIndex[F].s[q];for(q=0;q<g.PSFB12+1;q++){Y=(h.scalefac_band.s[13]-h.scalefac_band.s[12])/g.PSFB12,j=h.scalefac_band.s[12]+q*Y;h.scalefac_band.psfb12[q]=j}for(h.scalefac_band.psfb12[g.PSFB12]=192,1==e.version?h.sideinfo_len=1==h.channels_out?21:36:h.sideinfo_len=1==h.channels_out?13:21,e.error_protection&&(h.sideinfo_len+=2),function(e){var t=e.internal_flags;e.frameNum=0,e.write_id3tag_automatic&&B.id3tag_write_v2(e),t.bitrate_stereoMode_Hist=o([16,5]),t.bitrate_blockType_Hist=o([16,6]),t.PeakSample=0,e.bWriteVbrTag&&y.InitVbrTag(e)}(e),h.Class_ID=4294479419,C=0;C<19;C++)h.nsPsy.pefirbuf[C]=700*h.mode_gr*h.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),h.PSY.mask_adjust=e.maskingadjust,h.PSY.mask_adjust_short=e.maskingadjust_short,e.experimentalY?h.sfb21_extra=!1:h.sfb21_extra=e.out_samplerate>44e3,h.iteration_loop=new VBRNewIterationLoop(M);break;case r.vbr_rh:S.apply_preset(e,500-10*e.VBR_q,0),h.PSY.mask_adjust=e.maskingadjust,h.PSY.mask_adjust_short=e.maskingadjust_short,e.experimentalY?h.sfb21_extra=!1:h.sfb21_extra=e.out_samplerate>44e3,e.quality>6&&(e.quality=6),e.quality<0&&(e.quality=LAME_DEFAULT_QUALITY),h.iteration_loop=new VBROldIterationLoop(M);break;default:var U;h.sfb21_extra=!1,e.quality<0&&(e.quality=LAME_DEFAULT_QUALITY),(U=e.VBR)==r.vbr_off&&(e.VBR_mean_bitrate_kbps=e.brate),S.apply_preset(e,e.VBR_mean_bitrate_kbps,0),e.VBR=U,h.PSY.mask_adjust=e.maskingadjust,h.PSY.mask_adjust_short=e.maskingadjust_short,U==r.vbr_off?h.iteration_loop=new m(M):h.iteration_loop=new ABRIterationLoop(M)}if(f(e.scale>=0),e.VBR!=r.vbr_off){if(h.VBR_min_bitrate=1,h.VBR_max_bitrate=14,e.out_samplerate<16e3&&(h.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),h.VBR_min_bitrate=L(e.VBR_min_bitrate_kbps,e.version,e.out_samplerate),h.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),h.VBR_max_bitrate=L(e.VBR_max_bitrate_kbps,e.version,e.out_samplerate),h.VBR_max_bitrate<0))return-1;e.VBR_min_bitrate_kbps=v.bitrate_table[e.version][h.VBR_min_bitrate],e.VBR_max_bitrate_kbps=v.bitrate_table[e.version][h.VBR_max_bitrate],e.VBR_mean_bitrate_kbps=Math.min(v.bitrate_table[e.version][h.VBR_max_bitrate],e.VBR_mean_bitrate_kbps),e.VBR_mean_bitrate_kbps=Math.max(v.bitrate_table[e.version][h.VBR_min_bitrate],e.VBR_mean_bitrate_kbps)}return e.tune&&(h.PSY.mask_adjust+=e.tune_value_a,h.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?h.ATH.useAdjust=3:h.ATH.useAdjust=e.athaa_type,h.ATH.aaSensitivityP=Math.pow(10,e.athaa_sensitivity/-10),null==e.short_blocks&&(e.short_blocks=i.short_block_allowed),e.short_blocks!=i.short_block_allowed||e.mode!=A.JOINT_STEREO&&e.mode!=A.STEREO||(e.short_blocks=i.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),h.slot_lag=h.frac_SpF=0,e.VBR==r.vbr_off&&(h.slot_lag=h.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]),h=0,u=f.mf_samples_to_encode-g.POSTDELAY,p=N(e);if(f.mf_samples_to_encode<1)return 0;for(r=0,e.in_samplerate!=e.out_samplerate&&(u+=16*e.out_samplerate/e.in_samplerate),(_=e.framesize-u%e.framesize)<576&&(_+=e.framesize),e.encoder_padding=_,o=(u+_)/e.framesize;o>0&&h>=0;){var b=p-f.mf_size,m=e.frameNum;b*=e.in_samplerate,(b/=e.out_samplerate)>1152&&(b=1152),b<1&&(b=1),i=n-r,0==n&&(i=0),a+=h=this.lame_encode_buffer(e,c[0],c[1],b,t,a,i),r+=h,o-=m!=e.frameNum?1:0}if(f.mf_samples_to_encode=0,h<0)return h;if(i=n-r,0==n&&(i=0),s.flush_bitstream(e),(h=s.copy_buffer(f,t,a,i,1))<0)return h;if(a+=h,i=n-(r+=h),0==n&&(i=0),e.write_id3tag_automatic){if(B.id3tag_write_v1(e),(h=s.copy_buffer(f,t,a,i,0))<0)return h;r+=h}return r},this.lame_encode_buffer=function(e,a,n,r,i,o,l){var c=e.internal_flags,h=[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=_(t),e.in_buffer_1=_(t),e.in_buffer_nsamples=t)}(c,r),h[0]=c.in_buffer_0,h[1]=c.in_buffer_1;for(var p=0;p<r;p++)h[0][p]=a[p],c.channels_in>1&&(h[1][p]=n[p]);return function(e,a,n,r,i,_,o){var l,c,h,p,b,m=e.internal_flags,v=0,S=[null,null],w=[null,null];if(4294479419!=m.Class_ID)return-3;if(0==r)return 0;if((b=s.copy_buffer(m,i,_,o,0))<0)return b;if(_+=b,v+=b,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==m.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==m.channels_out)for(c=0;c<r;++c)w[0][c]=.5*(w[0][c]+w[1][c]),w[1][c]=0;p=N(e),S[0]=m.mfbuf[0],S[1]=m.mfbuf[1];var M=0;for(;r>0;){var A,R,y=[null,null];y[0]=w[0],y[1]=w[1];var B=new X;if(Y(e,S,y,M,r,B),A=B.n_in,R=B.n_out,m.findReplayGain&&!m.decode_on_the_fly&&t.AnalyzeSamples(m.rgdata,S[0],m.mf_size,S[1],m.mf_size,R,m.channels_out)==GainAnalysis.GAIN_ANALYSIS_ERROR)return-6;if(r-=A,M+=A,m.channels_out,m.mf_size+=R,f(m.mf_size<=u.MFSIZE),m.mf_samples_to_encode<1&&(m.mf_samples_to_encode=g.ENCDELAY+g.POSTDELAY),m.mf_samples_to_encode+=R,m.mf_size>=p){var E=o-v;if(0==o&&(E=0),(l=D(e,S[0],S[1],i,_,E))<0)return l;for(_+=l,v+=l,m.mf_size-=e.framesize,m.mf_samples_to_encode-=e.framesize,h=0;h<m.channels_out;h++)for(c=0;c<m.mf_size;c++)S[h][c]=S[h][c+e.framesize]}}return f(0==r),v}(e,h[0],h[1],r,i,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),i=(s.new_int_n,s.assert,a(4));e.exports=function(){this.xr=n(576),this.l3_enc=r(576),this.scalefac=r(i.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(i.SFBMAX),this.window=r(i.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),i=(s.new_array_n,s.new_byte),_=(s.new_double,s.new_float,s.new_float_n),o=s.new_int,l=(s.new_int_n,s.assert),f=a(14),c=a(8),h=a(1),u=a(3);function p(){var e=a(5),t=this,s=null,p=null,b=null,m=null;this.setModules=function(e,t,a,n){s=e,p=t,b=a,m=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&u.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 A(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 R(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=b.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 y(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 B(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,i=t.big_values;for(l(t.count1table_select<2),a=(t.count1-t.big_values)/4;a>0;--a){var _,o=0,f=0;0!=(_=t.l3_enc[r+0])&&(f+=8,t.xr[i+0]<0&&o++,l(_<=1)),0!=(_=t.l3_enc[r+1])&&(f+=4,o*=2,t.xr[i+1]<0&&o++,l(_<=1)),0!=(_=t.l3_enc[r+2])&&(f+=2,o*=2,t.xr[i+2]<0&&o++,l(_<=1)),0!=(_=t.l3_enc[r+3])&&(f++,o*=2,t.xr[i+3]<0&&o++,l(_<=1)),r+=4,i+=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],i=0;if(l(t<32),0==t)return i;for(var _=a;_<s;_+=2){var o=0,f=0,h=r.xlen,u=r.xlen,p=0,b=n.l3_enc[_],m=n.l3_enc[_+1];if(0!=b&&(n.xr[_]<0&&p++,o--),t>15){if(b>14){var d=b-15;l(d<=r.linmax),p|=d<<1,f=h,b=15}if(m>14){var v=m-15;l(v<=r.linmax),p<<=h,p|=v,f+=h,m=15}u=16}0!=m&&(p<<=1,n.xr[_+1]<0&&p++,o--),l((b|m)<16),b=b*u+m,f-=o,o+=r.hlen[b],l(o<=32),l(f<=32),M(e,r.table[b],o),M(e,p,f),i+=o+f}return i}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 i=t.region0_count+1;return l(0<=i),l(i<e.scalefac_band.l.length),n=e.scalefac_band.l[i],i+=t.region1_count+1,l(0<=i),l(i<e.scalefac_band.l.length),n>a&&(n=a),(r=e.scalefac_band.l[i])>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==(_=l.h_ptr-1)&&(_=u.MAX_HEADER_BUF-1),s=l.header[_].write_timing-v,a.total=s,s>=0&&(r=1+_-o,_<o&&(r=1+_-o+u.MAX_HEADER_BUF),s-=8*r*l.sideinfo_len),s+=i=t.getframebits(e),a.total+=i,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=B(255&t[2],a),a=B(255&t[3],a);for(var s=6;s<e.sideinfo_len;s++)a=B(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=u.MAX_HEADER_BUF-1),t=n.l3_side,!((a=I(e,new P))<0)){if(R(e,a),l(n.header[r].write_timing+this.getframebits(e)==v),n.ResvSize=0,t.main_data_begin=0,n.findReplayGain){var i=s.GetTitleGain(n.rgdata);l(NEQ(i,GainAnalysis.GAIN_NOT_ENOUGH_SAMPLES)),n.RadioGain=0|Math.floor(10*i+.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(A(0,t,8),s=0;s<u.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);R(e,t.resvDrain_pre),function(e,t){var a,s,i,_=e.internal_flags;if(a=_.l3_side,_.header[_.h_ptr].ptr=0,r.fill(_.header[_.h_ptr].buf,0,_.sideinfo_len,0),e.out_samplerate<16e3?y(_,4094,12):y(_,4095,12),y(_,e.version,1),y(_,1,2),y(_,e.error_protection?0:1,1),y(_,_.bitrate_index,4),y(_,_.samplerate_index,2),y(_,_.padding,1),y(_,e.extension,1),y(_,e.mode.ordinal(),2),y(_,_.mode_ext,2),y(_,e.copyright,1),y(_,e.original,1),y(_,e.emphasis,2),e.error_protection&&y(_,0,16),1==e.version){for(l(a.main_data_begin>=0),y(_,a.main_data_begin,9),2==_.channels_out?y(_,a.private_bits,3):y(_,a.private_bits,5),i=0;i<_.channels_out;i++){var o;for(o=0;o<4;o++)y(_,a.scfsi[i][o],1)}for(s=0;s<2;s++)for(i=0;i<_.channels_out;i++){y(_,(f=a.tt[s][i]).part2_3_length+f.part2_length,12),y(_,f.big_values/2,9),y(_,f.global_gain,8),y(_,f.scalefac_compress,4),f.block_type!=h.NORM_TYPE?(y(_,1,1),y(_,f.block_type,2),y(_,f.mixed_block_flag,1),14==f.table_select[0]&&(f.table_select[0]=16),y(_,f.table_select[0],5),14==f.table_select[1]&&(f.table_select[1]=16),y(_,f.table_select[1],5),y(_,f.subblock_gain[0],3),y(_,f.subblock_gain[1],3),y(_,f.subblock_gain[2],3)):(y(_,0,1),14==f.table_select[0]&&(f.table_select[0]=16),y(_,f.table_select[0],5),14==f.table_select[1]&&(f.table_select[1]=16),y(_,f.table_select[1],5),14==f.table_select[2]&&(f.table_select[2]=16),y(_,f.table_select[2],5),l(0<=f.region0_count&&f.region0_count<16),l(0<=f.region1_count&&f.region1_count<8),y(_,f.region0_count,4),y(_,f.region1_count,3)),y(_,f.preflag,1),y(_,f.scalefac_scale,1),y(_,f.count1table_select,1)}}else for(l(a.main_data_begin>=0),y(_,a.main_data_begin,8),y(_,a.private_bits,_.channels_out),s=0,i=0;i<_.channels_out;i++){var f;y(_,(f=a.tt[s][i]).part2_3_length+f.part2_length,12),y(_,f.big_values/2,9),y(_,f.global_gain,8),y(_,f.scalefac_compress,9),f.block_type!=h.NORM_TYPE?(y(_,1,1),y(_,f.block_type,2),y(_,f.mixed_block_flag,1),14==f.table_select[0]&&(f.table_select[0]=16),y(_,f.table_select[0],5),14==f.table_select[1]&&(f.table_select[1]=16),y(_,f.table_select[1],5),y(_,f.subblock_gain[0],3),y(_,f.subblock_gain[1],3),y(_,f.subblock_gain[2],3)):(y(_,0,1),14==f.table_select[0]&&(f.table_select[0]=16),y(_,f.table_select[0],5),14==f.table_select[1]&&(f.table_select[1]=16),y(_,f.table_select[1],5),14==f.table_select[2]&&(f.table_select[2]=16),y(_,f.table_select[2],5),l(0<=f.region0_count&&f.region0_count<16),l(0<=f.region1_count&&f.region1_count<8),y(_,f.region0_count,4),y(_,f.region1_count,3)),y(_,f.scalefac_scale,1),y(_,f.count1table_select,1)}e.error_protection&&CRC_writeheader(_,_.header[_.h_ptr].buf);var c=_.h_ptr;l(_.header[c].ptr==8*_.sideinfo_len),_.h_ptr=c+1&u.MAX_HEADER_BUF-1,_.header[_.h_ptr].write_timing=_.header[c].write_timing+t,_.h_ptr==_.w_ptr&&n.err.println("Error: MAX_HEADER_BUF too small in bitstream.c \n")}(e,s);var i=8*a.sideinfo_len;if(i+=function(e){var t,a,s,n,r=0,i=e.internal_flags,_=i.l3_side;if(1==e.version)for(t=0;t<2;t++)for(a=0;a<i.channels_out;a++){var o=_.tt[t][a],c=f.slen1_tab[o.scalefac_compress],u=f.slen2_tab[o.scalefac_compress];for(n=0,s=0;s<o.sfbdivide;s++)-1!=o.scalefac[s]&&(M(i,o.scalefac[s],c),n+=c);for(;s<o.sfbmax;s++)-1!=o.scalefac[s]&&(M(i,o.scalefac[s],u),n+=u);l(n==o.part2_length),o.block_type==h.SHORT_TYPE?n+=x(i,o):n+=k(i,o),n+=E(i,o),l(n==o.part2_3_length+o.part2_length),r+=n}else for(t=0,a=0;a<i.channels_out;a++){o=_.tt[t][a];var p,b,m=0;if(l(null!=o.sfb_partition_table),n=0,s=0,b=0,o.block_type==h.SHORT_TYPE){for(;b<4;b++){var d=o.sfb_partition_table[b]/3,v=o.slen[b];for(p=0;p<d;p++,s++)M(i,Math.max(o.scalefac[3*s+0],0),v),M(i,Math.max(o.scalefac[3*s+1],0),v),M(i,Math.max(o.scalefac[3*s+2],0),v),m+=3*v}n+=x(i,o)}else{for(;b<4;b++){d=o.sfb_partition_table[b],v=o.slen[b];for(p=0;p<d;p++,s++)M(i,Math.max(o.scalefac[s],0),v),m+=v}n+=k(i,o)}n+=E(i,o),l(n==o.part2_3_length),l(m==o.part2_length),r+=m+n}return r}(e),R(e,t.resvDrain_post),i+=t.resvDrain_post,t.main_data_begin+=(s-i)/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,i-t.resvDrain_post-8*a.sideinfo_len,i,i%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 _;for(_=0;_<u.MAX_HEADER_BUF;++_)a.header[_].write_timing-=v;v=0}return 0},this.copy_buffer=function(e,t,a,r,i){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!=i){var c=o(1);if(c[0]=e.nMusicCRC,m.updateMusicCRC(c,t,a,f),e.nMusicCRC=c[0],f>0&&(e.VBR_seek_table.nBytesWritten+=f),e.decode_on_the_fly)for(var h,u=_([2,1152]),b=f,v=-1;0!=v;)if(v=p.hip_decode1_unclipped(e.hip,t,a,b,u[0],u[1]),b=0,-1==v&&(v=0),v>0){if(l(v<=1152),e.findPeakSample){for(h=0;h<v;h++)u[0][h]>e.PeakSample?e.PeakSample=u[0][h]:-u[0][h]>e.PeakSample&&(e.PeakSample=-u[0][h]);if(e.channels_out>1)for(h=0;h<v;h++)u[1][h]>e.PeakSample?e.PeakSample=u[1][h]:-u[1][h]>e.PeakSample&&(e.PeakSample=-u[1][h])}if(e.findReplayGain&&s.AnalyzeSamples(e.rgdata,u[0],0,u[1],0,v,e.channels_out)==GainAnalysis.GAIN_ANALYSIS_ERROR)return-6}}return f},this.init_bit_stream_w=function(t){d=i(e.LAME_MAXMP3BUFFER),t.h_ptr=t.w_ptr=0,t.header[t.h_ptr].write_timing=0,g=-1,S=0,v=0}}p.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)},p.NEQ=function(e,t){return!p.EQ(e,t)},e.exports=p},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