"):document;n.exports=function(r,o){function n(n){var t;if("object"==typeof e&&"object"==typeof e.versions&&void 0!==e.versions.node)try{u("canvas")}catch(n){throw Error("The optional node-canvas dependency is needed for Trianglify to render using canvas in node.")}return n||(n=i.createElement("canvas")),n.setAttribute("width",o.width),n.setAttribute("height",o.height),(t=n.getContext("2d")).canvas.width=o.width,t.canvas.height=o.height,r.forEach(function(n){t.fillStyle=t.strokeStyle=n[0],t.lineWidth=o.stroke_width,t.beginPath(),t.moveTo.apply(t,n[1][0]),t.lineTo.apply(t,n[1][1]),t.lineTo.apply(t,n[1][2]),t.fill(),t.stroke()}),n}return{polys:r,opts:o,svg:function(n){var e=i.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("width",o.width),e.setAttribute("height",o.height),n&&n.includeNamespace&&e.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.forEach(function(n){var t=i.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("d","M"+n[1].join("L")+"Z"),t.setAttribute("fill",n[0]),t.setAttribute("stroke",n[0]),t.setAttribute("stroke-width",o.stroke_width),e.appendChild(t)}),e},canvas:n,png:function(){return n().toDataURL("image/png")}}}}).call(this,u("_process"))},{_process:"/home/fmauneko/code/trianglify/node_modules/process/browser.js",canvas:"/home/fmauneko/code/trianglify/node_modules/browser-resolve/empty.js",jsdom:"/home/fmauneko/code/trianglify/node_modules/browser-resolve/empty.js"}],"/home/fmauneko/code/trianglify/lib/points.js":[function(n,t){t.exports=function(n,t,e,r,o,i,u){for(var s=.5*o,a=2*i,l=-i,f=[],h=-e;h>16,255&e>>8,255&e,1];if(n.match(/^#?([A-Fa-f0-9]{8})$/))return 9===n.length&&(n=n.substr(1)),[255&(e=parseInt(n,16))>>24,255&e>>16,255&e>>8,255&e];if(t=r(n))return t;throw"unknown color: "+n},b=function(n,t,e){var r,o,i,u;return n=(u=A(arguments))[0],t=u[1],e=u[2],(n/=360)<1/3?o=1-((r=(1-t)/3)+(i=(1+t*l(a*n)/l(s-a*n))/3)):n<2/3?r=1-((i=(1-t)/3)+(o=(1+t*l(a*(n-=1/3))/l(s-a*n))/3)):i=1-((o=(1-t)/3)+(r=(1+t*l(a*(n-=2/3))/l(s-a*n))/3)),[255*(i=g(e*i*3)),255*(o=g(e*o*3)),255*(r=g(e*r*3))]},y=function(){var n,t,e,r,o,i,u,s,a,l,f,h,c,d;if(r=(c=A(arguments))[0],s=c[1],i=c[2],0===s)u=e=n=255*i;else{for(t=[0,0,0],a=2*i-(l=i<.5?i*(1+s):i+s-i*s),(f=[0,0,0])[0]=(r/=360)+1/3,f[1]=r,f[2]=r-1/3,o=h=0;h<=2;o=++h)f[o]<0&&(f[o]+=1),1=p[t];)t++;return t-1},c=function(n){return n},function(n){var t,e,r,o,i;return i=n,2i.max&&(i.max=n),i.count+=1)},u=function(n,t){if(r(n,t))return null!=e&&"function"===an(e)?o(e(n)):null!=e&&"string"===an(e)||"number"===an(e)?o(n[e]):o(n)},"array"===an(n))for(s=0,a=n.length;s 0";for(m=un*on(p),g=un*on(d),c.push(p),l=M=1,V=e-1;1<=V?M<=V:V<=M;l=1<=V?++M:--M)c.push(fn(10,m+l/e*(g-m)));c.push(d)}else if("q"===t.substr(0,1)){for(c.push(p),l=S=1,W=e-1;1<=W?S<=W:W<=S;l=1<=W?++S:--S)w=N.length*l/e,(_=dn(w))===w?c.push(N[_]):(j=w-_,c.push(N[_]*j+N[_+1]*(1-j)));c.push(d)}else if("k"===t.substr(0,1)){for(b=N.length,r=Array(b),s=Array(e),k=!0,y=0,i=null,(i=[]).push(p),l=C=1,$=e-1;1<=$?C<=$:$<=C;l=1<=$?++C:--C)i.push(p+l/e*(d-p));for(i.push(d);k;){for(f=L=0,G=e-1;0<=G?L<=G:G<=L;f=0<=G?++L:--L)s[f]=0;for(l=T=0,Z=b-1;0<=Z?T<=Z:Z<=T;l=0<=Z?++T:--T){for(A=N[l],v=ln,f=q=0,H=e-1;0<=H?q<=H:H<=q;f=0<=H?++q:--q)(a=cn(i[f]-A))>1,s=r+1),0>>0,r=(e*=r)>>>0,r+=4294967296*(e-=r)}return 2.3283064365386963e-10*(r>>>0)});t.next=function(){var n=2091639*t.s0+2.3283064365386963e-10*t.c;return t.s0=t.s1,t.s1=t.s2,t.s2=n-(t.c=0|n)},t.c=1,t.s0=e(" "),t.s1=e(" "),t.s2=e(" "),t.s0-=e(n),t.s0<0&&(t.s0+=1),t.s1-=e(n),t.s1<0&&(t.s1+=1),t.s2-=e(n),t.s2<0&&(t.s2+=1),e=null}function u(n,t){return t.c=n.c,t.s0=n.s0,t.s1=n.s1,t.s2=n.s2,t}function r(n,t){var e=new i(n),r=t&&t.state,o=e.next;return o.int32=function(){return 0|4294967296*e.next()},o.double=function(){return o()+11102230246251565e-32*(0|2097152*o())},o.quick=o,r&&("object"==typeof r&&u(r,e),o.state=function(){return u(e,{})}),o}t&&t.exports?t.exports=r:e&&e.amd?e(function(){return r}):this.alea=r}(0,"object"==typeof t&&t,!1)},{}],"/home/fmauneko/code/trianglify/node_modules/seedrandom/lib/tychei.js":[function(n,t){!function(n,t,e){function i(n){var o=this,t="";o.next=function(){var n=o.b,t=o.c,e=o.d,r=o.a;return n=n<<25^n>>>7^t,t=0|t-e,e=e<<24^e>>>8^r,r=0|r-n,o.b=n=n<<20^n>>>12^t,o.c=t=0|t-e,o.d=e<<16^t>>>16^r,o.a=0|r-n},o.a=0,o.b=0,o.c=-1640531527,o.d=1367130551,n===dn(n)?(o.a=0|n/4294967296,o.b=0|n):t+=n;for(var e=0;e>>0)/4294967296};return o.double=function(){do{var n=((e.next()>>>11)+(e.next()>>>0)/4294967296)/2097152}while(0===n);return n},o.int32=e.next,o.quick=o,r&&("object"==typeof r&&u(r,e),o.state=function(){return u(e,{})}),o}t&&t.exports?t.exports=r:e&&e.amd?e(function(){return r}):this.tychei=r}(0,"object"==typeof t&&t,!1)},{}],"/home/fmauneko/code/trianglify/node_modules/seedrandom/lib/xor128.js":[function(n,t){!function(n,t,e){function i(n){var t=this,e="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var n=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^n^n>>>8},n===(0|n)?t.x=n:e+=n;for(var r=0;r>>0)/4294967296};return o.double=function(){do{var n=((e.next()>>>11)+(e.next()>>>0)/4294967296)/2097152}while(0===n);return n},o.int32=e.next,o.quick=o,r&&("object"==typeof r&&u(r,e),o.state=function(){return u(e,{})}),o}t&&t.exports?t.exports=r:e&&e.amd?e(function(){return r}):this.xor128=r}(0,"object"==typeof t&&t,!1)},{}],"/home/fmauneko/code/trianglify/node_modules/seedrandom/lib/xor4096.js":[function(n,t){!function(n,t,e){function i(n){var i=this;i.next=function(){var n,t,e=i.w,r=i.X,o=i.i;return i.w=e=0|e+1640531527,t=r[127&o+34],n=r[o=127&o+1],t^=t<<13,n^=n<<17,t^=t>>>15,n^=n>>>12,t=r[o]=t^n,i.i=o,0|t+(e^e>>>16)},function(n,t){var e,r,o,i,u,s=[],a=128;for(t===(0|t)?(r=t,t=null):(r=0,a=U(a,(t+="\0").length)),o=0,i=-32;i>>15,r^=r<<4,r^=r>>>13,0<=i&&(u=0|u+1640531527,o=0==(e=s[127&i]^=r+u)?o+1:0);for(128<=o&&(s[127&(t&&t.length||0)]=-1),o=127,i=512;0>>15,e^=e>>>12,s[o]=r^e;n.w=u,n.X=s,n.i=o}(i,n)}function u(n,t){return t.i=n.i,t.w=n.w,t.X=n.X.slice(),t}function r(n,t){null==n&&(n=+new Date);var e=new i(n),r=t&&t.state,o=function(){return(e.next()>>>0)/4294967296};return o.double=function(){do{var n=((e.next()>>>11)+(e.next()>>>0)/4294967296)/2097152}while(0===n);return n},o.int32=e.next,o.quick=o,r&&(r.X&&u(r,e),o.state=function(){return u(e,{})}),o}t&&t.exports?t.exports=r:e&&e.amd?e(function(){return r}):this.xor4096=r}(0,"object"==typeof t&&t,!1)},{}],"/home/fmauneko/code/trianglify/node_modules/seedrandom/lib/xorshift7.js":[function(n,t){!function(n,t,e){function i(n){var o=this;o.next=function(){var n,t,e=o.x,r=o.i;return n=e[r],t=(n^=n>>>7)^n<<24,t^=(n=e[7&r+1])^n>>>10,t^=(n=e[7&r+3])^n>>>3,t^=(n=e[7&r+4])^n<<7,n=e[7&r+7],t^=(n^=n<<13)^n<<9,e[r]=t,o.i=7&r+1,t},function(n,t){var e,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,e=0;e>>0)/4294967296};return o.double=function(){do{var n=((e.next()>>>11)+(e.next()>>>0)/4294967296)/2097152}while(0===n);return n},o.int32=e.next,o.quick=o,r&&(r.x&&u(r,e),o.state=function(){return u(e,{})}),o}t&&t.exports?t.exports=r:e&&e.amd?e(function(){return r}):this.xorshift7=r}(0,"object"==typeof t&&t,!1)},{}],"/home/fmauneko/code/trianglify/node_modules/seedrandom/lib/xorwow.js":[function(n,t){!function(n,t,e){function i(n){var t=this,e="";t.next=function(){var n=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,0|(t.d=0|t.d+362437)+(t.v=t.v^t.v<<4^n^n<<1)},t.x=0,t.y=0,t.z=0,t.w=0,n===((t.v=0)|n)?t.x=n:e+=n;for(var r=0;r>>4),t.next()}function u(n,t){return t.x=n.x,t.y=n.y,t.z=n.z,t.w=n.w,t.v=n.v,t.d=n.d,t}function r(n,t){var e=new i(n),r=t&&t.state,o=function(){return(e.next()>>>0)/4294967296};return o.double=function(){do{var n=((e.next()>>>11)+(e.next()>>>0)/4294967296)/2097152}while(0===n);return n},o.int32=e.next,o.quick=o,r&&("object"==typeof r&&u(r,e),o.state=function(){return u(e,{})}),o}t&&t.exports?t.exports=r:e&&e.amd?e(function(){return r}):this.xorwow=r}(0,"object"==typeof t&&t,!1)},{}],"/home/fmauneko/code/trianglify/node_modules/seedrandom/seedrandom.js":[function(t,e){!function(s,a){function n(n,t,e){var r=[],o=h(function n(t,e){var r,o=[],i=typeof t;if(e&&"object"==i)for(r in t)try{o.push(n(t[r],e-1))}catch(e){}return o.length?o:"string"==i?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[n,c(s)]:null==n?function(){try{var n;return d&&(n=d.randomBytes)?n=n(p):(n=new Uint8Array(p),(g.crypto||g.msCrypto).getRandomValues(n)),c(n)}catch(n){var t=g.navigator,e=t&&t.plugins;return[+new Date,g,e,g.screen,c(s)]}}():n,3),r),i=new l(r),u=function(){for(var n=i.g(m),t=b,e=0;n>>=1;return(n+e)/t};return u.int32=function(){return 0|i.g(4)},u.quick=function(){return i.g(4)/4294967296},u.double=u,h(c(i.S),s),(t.pass||e||function(n,t,e,r){return r&&(r.S&&f(r,i),n.state=function(){return f(i,{})}),e?(a[v]=n,t):n})(u,o,"global"in t?t.global:this==a,t.state)}function l(n){var t,e=n.length,u=this,r=0,o=u.i=u.j=0,i=u.S=[];for(e||(n=[e++]);rGestiXi