Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
"use strict";/*Compiled using Cheerp (R) by Leaning Technologies Ltd*/var L=Math.imul;var M=Math.fround;var oSlot=0;var nullArray=[null];var nullObj={d:nullArray,o:0};function K(b){var a=null;a=b.a2;return +y(a,b,a);}function y(f,e,d){var c=-0.,b=-0.,a=-0.;if((f.i3&1)!==0){f.i3=0;b=+f.d2;}else{while(1){b=+k(e);b=b*2+ -1;c= +k(e)*2+ -1;a=b*b+c*c;if(a>1)continue;if(a===0)continue;break;}a=+Math.sqrt( +Math.log(a)* -2/a);f.d2=c*a;f.i3=1;b*=a;}return b* +d.d1+ +d.d0;}function k(a){var b=0;b=j(a)|0;return ((+((j(a)|0)>>>0))*4294967296+(+(b>>>0)))*M(5.42101086E-20);}function j(c){var b=null,e=0,d=0,a=0;a=c.i1|0;b=c.a0;e=(a+1>>>0)%624|0;d=b[e]|0;b[a]=-(d&1)& -1727483681^(b[(a+397>>>0)%624|0]|0)^(d&2147483646|b[a]& -2147483648)>>>1;a=b[c.i1|0]|0;a^=(a>>>11);c.i1=e;a^=(a<<7& -1658038656);a^=(a<<15& -272236544);return a>>>18^a|0;}function J(b){var a=null;w(b,x()|0);a=b.a2;a.d0=0;a.d1=1;a.i3=0;}function w(e,d){var c=null,b=0,a=0;c=e.a0;c[0]=d;a=1;b=d;while(1){b=(L(b>>>30^b,1812433253)|0)+a|0;c[a]=b;a=a+1|0;if((a|0)!==624)continue;break;}e.i1=0;}function x(){var d=0,c=null,e=null,b=0,a=0;d=v()|0;b=d+16& -16;c=new Uint8Array(b/1|0);e={i0:0,i1:0,a2:nullArray};e.a2=c;e.i0=b|1;e.i1=d;if((d|0)!==0){a=0;b=0;while(1){c[a]=z[0+b|0]|0;a=a+1|0;if(c!==c||(0+d|0)!==(0+a|0)){b=b+1|0;continue;}break;}}c[d]=0;o(e);return ~~( +Math.random()*4294967296)|0;}function o(l){var c=0,a=null,g=null,f=0,b=0,d=null,e=0;c=l.i1|0;b=c>>>0>12?12|0:c|0;a:{if((b|0)!==0){d=l.a2;b=(s(d,0,b)|0|0)!==0?1:0;if((c>>>0>12?1:0)^(c>>>0>11?1:0))if(!(b))break a;}else if((c>>>0>12?1:0)^(c>>>0>11?1:0))break a;d={i0:0,i1:0,a2:nullArray};b=c+44& -16;a=new Uint8Array(b/1|0);d.a2=a;d.i0=b|1;d.i1=28;a[0]=114;a[1]=97;a[2]=110;a[3]=100;a[4]=111;a[5]=109;a[6]=32;a[7]=100;a[8]=101;a[9]=118;a[10]=105;a[11]=99;a[12]=101;a[13]=32;a[14]=110;a[15]=111;a[16]=116;a[17]=32;a[18]=115;a[19]=117;a[20]=112;a[21]=112;a[22]=111;a[23]=114;a[24]=116;a[25]=101;a[26]=100;a[27]=32;a[28]=0;g=l.a2;b=(b|0)!==0?b-1|0:0|0;f=c+28|0;if(b-28>>>0<c>>>0)p(d,b,f-b|0,28,28,c,g,0);else if((c|0)!==0){e=28;b=0;while(1){a[e]=g[b]|0;e=e+1|0;if(a!==a||((0+28|0)+c|0)!==(0+e|0)){b=b+1|0;continue;}break;}d.i1=f;a[f]=0;}}}function p(F,E,D,C,B,A,l,m){var g=null,a=null,f=0,d=0,c=0,b=0,e=0;g=F.a2;if(E>>>0<2147483623){d=E<<1;c=D+E|0;d=(c>>>0<d>>>0?d|0:c|0)+16& -16;}else{d=-17;}a=new Uint8Array(d/1|0);if((B|0)!==0){b=0;c=0;while(1){a[b]=g[c]|0;b=b+1|0;if(a!==a||(0+B|0)!==(0+b|0)){c=c+1|0;continue;}break;}}if((A|0)!==0){b=B;c=0;while(1){a[b]=l[m+c|0]|0;b=b+1|0;if(a!==a||((0+B|0)+A|0)!==(0+b|0)){c=c+1|0;continue;}break;}}c=C-B|0;if((c|0)!==0){b=B+A|0;e=b;f=B;while(1){a[e]=g[f]|0;e=e+1|0;if(a!==a||((0+b|0)+c|0)!==(0+e|0)){f=f+1|0;continue;}break;}}F.a2=a;F.i0=d|1;d=A+C|0;F.i1=d;a[d]=0;}function s(g,h,f){var e=0,d=0,c=0,b=0,a=0;if((f|0)===0)return 0|0;d=0;e=0;a=f;while(1){c=g[h+d|0]|0;b=z[0+e|0]|0;if((c&255)===(b&255)){a=a-1|0;if((a|0)!==0){e=e+1|0;d=d+1|0;continue;}return 0|0;}break;}return (c&255)-(b&255)|0;}function v(){return 12|0;}var z=new Uint8Array([47,100,101,118,47,117,114,97,110,100,111,109,0]);function NormalDistribution(){this.a0=new Int32Array(624);this.i1=0;this.a2={d0:-0.,d1:-0.,d2:-0.,i3:0};;this.d=[this];if (arguments.length===1&&arguments[0]===undefined){return;}J(this);};NormalDistribution.prototype.generate=function (){return K(this);};NormalDistribution.promise=Promise.resolve();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment