forked from mattdesl/color-wander
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bundle.js
2 lines (2 loc) · 44.4 KB
/
bundle.js
1
2
!function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(t,e,n){"use strict";function r(t){v.removeAllListeners("tick"),v.stop();var e=F({backgroundImage:D,context:B},t),n="number"==typeof e.pixelRatio?e.pixelRatio:1;p.width=e.width*n,p.height=e.height*n,y.textContent=e.seedName,w.textContent=S&&"dropped file"||e.backgroundSrc,location.hash=e.seedName,D.onload=function(){s(e);var t=h(e);if(document.body.style.background=e.palette[0],g.style.color=i(e.palette[0],e.palette.slice(1)),e.debugLuma)t.debugLuma();else{t.clear();var n=0;v.on("tick",function(){t.step(e.interval),n++,!e.endlessBrowser&&n>e.steps&&v.stop()}),v.start()}},D.src=S||t.backgroundSrc,S=null}function o(){a(p,[window.innerWidth,window.innerHeight])}function i(t,e){var n=0,r=0;return e.forEach(function(e,o){var i=A.hex(t,e);i>r&&(r=i,n=o)}),e[n]}function a(t,e){var n=t.width/t.height,r=e[0],o=e[1],i=r,a=Math.round(i/n),s=Math.floor(o-a)/2;L&&(i+=1,a+=1),t.style.top=s+"px",t.style.width=i+"px",t.style.height=a+"px"}function s(t){if(M){var e=d[Math.floor(Math.random()*d.length)];t.palette=f(e)}else t.palette=m.getPalette(D,5).map(function(t){return"#"+t.map(function(t){return t.toString(16)}).join("")})}function c(){v.stop(),_=!_,x.textContent="TAP TO RANDOMIZE"}function u(t){t.preventDefault()}function l(){k.style.opacity>0?(k.style.opacity=0,k.style.zIndex=-100):(k.style.opacity=.5,k.style.zIndex=100)}function f(t){for(var e,n,r=t.length,o=t.slice();r;)e=Math.floor(Math.random(1)*r--),n=o[r],o[r]=o[e],o[e]=n;return o}t("fastclick")(document.body);var F=t("object-assign"),E=t("./config"),h=t("./lib/createRenderer"),d=t("./lib/color-palettes.json"),C=t("raf-loop"),A=t("wcag-contrast"),p=document.querySelector("#canvas"),D=new window.Image,B=p.getContext("2d"),m=new ColorThief,v=C(),g=document.querySelector(".seed-container"),y=document.querySelector(".seed-text"),w=document.querySelector(".map-text"),x=document.querySelector(".howto"),b=document.querySelector(".palette-opt"),k=document.querySelector("#coverall"),M=!1,S=null,T=location.hash.length>0,L=/(iPad|iPhone|iPod)/i.test(navigator.userAgent);L&&!function(){var t=function(){setTimeout(function(){window.scrollTo(0,1)},500)};t(),window.addEventListener("orientationchange",function(){t()},!1)}(),window.addEventListener("resize",o),document.body.style.margin="0",document.body.style.overflow="hidden",p.style.position="absolute";var _=!1,O=function(t){t&&t.preventDefault(),_?c():(_=!_,r(E(q())),x.textContent="TAP TO STOP")},q=function(){return T?(T=!1,location.hash.replace("#","")):void 0};O(),o();var N=function(t){t.addEventListener("mousedown",function(t){0===t.button&&O(t)}),t.addEventListener("touchstart",O)},j=[document.querySelector("#fill"),p];j.forEach(function(t){return N(t)}),b.onclick=function(t){M=!M,b.innerHTML=M,c(),r(window.WANDER_SETTINGS)},window.addEventListener("dragenter",l),window.addEventListener("dragenter",u),window.addEventListener("dragover",u),window.addEventListener("dragleave",l),window.addEventListener("drop",function(t){t.preventDefault();var e=t.dataTransfer,n=e.files[0],r=new FileReader;return r.addEventListener("loadend",function(t){S=r.result,l(),c(),O()}),r.readAsDataURL(n),!1})},{"./config":2,"./lib/color-palettes.json":3,"./lib/createRenderer":4,fastclick:11,"object-assign":45,"raf-loop":48,"wcag-contrast":55}],2:[function(t,e,n){"use strict";var r=t("object-assign"),o=t("seed-random"),i=t("./lib/random-range");window.WANDER_SETTINGS={},e.exports=function(t){"undefined"==typeof t&&(console.log("reseting seed"),t=String(Math.floor(1e6*Math.random())));var e=o(t),n=i(e),a=["azulejo-granada.jpg","sevilla-encarnacion.jpg","mezquita-2.jpg"].map(function(t){return"maps/"+t}),s=a[Math.floor(n(a.length))];return window.WANDER_SETTINGS={pointilism:n(0,.2),noiseScalar:[n(1e-6,1e-6),n(2e-4,.004)],globalAlpha:.5,startArea:n(0,1),maxRadius:n(5,100),lineStyle:n(1)>.5?"round":"square",interval:n(.001,.01),count:Math.floor(n(50,2e3)),steps:Math.floor(n(100,1e3)),endlessBrowser:!0,debugLuma:!1,backgroundScale:1,backgorundFille:"black",pixelRatio:1,width:2560,height:1440,asVideoFrames:!1,filename:"render",outputDir:"output"},r(window.WANDER_SETTINGS,{random:e,seedName:t,backgroundSrc:s},window.WANDER_OVERRIDE)},console.info("[Pro tip] Add settings to *window.WANDER_OVERRIDE* to tune results"),console.info("[Pro tip] run `console.log(WANDER_SETTINGS)` to read the current options"),console.info("[Pro tip] refresh the page to restore defaults")},{"./lib/random-range":7,"object-assign":45,"seed-random":52}],3:[function(t,e,n){e.exports=[["#69D2E7","#A7DBD8","#E0E4CC","#F38630","#FA6900"],["#FE4365","#FC9D9A","#F9CDAD","#C8C8A9","#83AF9B"],["#ECD078","#D95B43","#C02942","#542437","#53777A"],["#556270","#4ECDC4","#C7F464","#FF6B6B","#C44D58"],["#774F38","#E08E79","#F1D4AF","#ECE5CE","#C5E0DC"],["#E8DDCB","#CDB380","#036564","#033649","#031634"],["#490A3D","#BD1550","#E97F02","#F8CA00","#8A9B0F"],["#594F4F","#547980","#45ADA8","#9DE0AD","#E5FCC2"],["#00A0B0","#6A4A3C","#CC333F","#EB6841","#EDC951"],["#E94E77","#D68189","#C6A49A","#C6E5D9","#F4EAD5"],["#D9CEB2","#948C75","#D5DED9","#7A6A53","#99B2B7"],["#FFFFFF","#CBE86B","#F2E9E1","#1C140D","#CBE86B"],["#EFFFCD","#DCE9BE","#555152","#2E2633","#99173C"],["#3FB8AF","#7FC7AF","#DAD8A7","#FF9E9D","#FF3D7F"],["#343838","#005F6B","#008C9E","#00B4CC","#00DFFC"],["#413E4A","#73626E","#B38184","#F0B49E","#F7E4BE"],["#99B898","#FECEA8","#FF847C","#E84A5F","#2A363B"],["#FF4E50","#FC913A","#F9D423","#EDE574","#E1F5C4"],["#554236","#F77825","#D3CE3D","#F1EFA5","#60B99A"],["#351330","#424254","#64908A","#E8CAA4","#CC2A41"],["#00A8C6","#40C0CB","#F9F2E7","#AEE239","#8FBE00"],["#FF4242","#F4FAD2","#D4EE5E","#E1EDB9","#F0F2EB"],["#655643","#80BCA3","#F6F7BD","#E6AC27","#BF4D28"],["#8C2318","#5E8C6A","#88A65E","#BFB35A","#F2C45A"],["#FAD089","#FF9C5B","#F5634A","#ED303C","#3B8183"],["#BCBDAC","#CFBE27","#F27435","#F02475","#3B2D38"],["#D1E751","#FFFFFF","#000000","#4DBCE9","#26ADE4"],["#FF9900","#424242","#E9E9E9","#BCBCBC","#3299BB"],["#5D4157","#838689","#A8CABA","#CAD7B2","#EBE3AA"],["#5E412F","#FCEBB6","#78C0A8","#F07818","#F0A830"],["#EEE6AB","#C5BC8E","#696758","#45484B","#36393B"],["#1B676B","#519548","#88C425","#BEF202","#EAFDE6"],["#F8B195","#F67280","#C06C84","#6C5B7B","#355C7D"],["#452632","#91204D","#E4844A","#E8BF56","#E2F7CE"],["#F04155","#FF823A","#F2F26F","#FFF7BD","#95CFB7"],["#F0D8A8","#3D1C00","#86B8B1","#F2D694","#FA2A00"],["#2A044A","#0B2E59","#0D6759","#7AB317","#A0C55F"],["#67917A","#170409","#B8AF03","#CCBF82","#E33258"],["#B9D7D9","#668284","#2A2829","#493736","#7B3B3B"],["#BBBB88","#CCC68D","#EEDD99","#EEC290","#EEAA88"],["#A3A948","#EDB92E","#F85931","#CE1836","#009989"],["#E8D5B7","#0E2430","#FC3A51","#F5B349","#E8D5B9"],["#B3CC57","#ECF081","#FFBE40","#EF746F","#AB3E5B"],["#AB526B","#BCA297","#C5CEAE","#F0E2A4","#F4EBC3"],["#607848","#789048","#C0D860","#F0F0D8","#604848"],["#515151","#FFFFFF","#00B4FF","#EEEEEE"],["#3E4147","#FFFEDF","#DFBA69","#5A2E2E","#2A2C31"],["#300030","#480048","#601848","#C04848","#F07241"],["#1C2130","#028F76","#B3E099","#FFEAAD","#D14334"],["#A8E6CE","#DCEDC2","#FFD3B5","#FFAAA6","#FF8C94"],["#EDEBE6","#D6E1C7","#94C7B6","#403B33","#D3643B"],["#FDF1CC","#C6D6B8","#987F69","#E3AD40","#FCD036"],["#AAB3AB","#C4CBB7","#EBEFC9","#EEE0B7","#E8CAAF"],["#CC0C39","#E6781E","#C8CF02","#F8FCC1","#1693A7"],["#3A111C","#574951","#83988E","#BCDEA5","#E6F9BC"],["#FC354C","#29221F","#13747D","#0ABFBC","#FCF7C5"],["#B9D3B0","#81BDA4","#B28774","#F88F79","#F6AA93"],["#5E3929","#CD8C52","#B7D1A3","#DEE8BE","#FCF7D3"],["#230F2B","#F21D41","#EBEBBC","#BCE3C5","#82B3AE"],["#5C323E","#A82743","#E15E32","#C0D23E","#E5F04C"],["#4E395D","#827085","#8EBE94","#CCFC8E","#DC5B3E"],["#DAD6CA","#1BB0CE","#4F8699","#6A5E72","#563444"],["#C2412D","#D1AA34","#A7A844","#A46583","#5A1E4A"],["#D1313D","#E5625C","#F9BF76","#8EB2C5","#615375"],["#9D7E79","#CCAC95","#9A947C","#748B83","#5B756C"],["#1C0113","#6B0103","#A30006","#C21A01","#F03C02"],["#8DCCAD","#988864","#FEA6A2","#F9D6AC","#FFE9AF"],["#CFFFDD","#B4DEC1","#5C5863","#A85163","#FF1F4C"],["#75616B","#BFCFF7","#DCE4F7","#F8F3BF","#D34017"],["#382F32","#FFEAF2","#FCD9E5","#FBC5D8","#F1396D"],["#B6D8C0","#C8D9BF","#DADABD","#ECDBBC","#FEDCBA"],["#E3DFBA","#C8D6BF","#93CCC6","#6CBDB5","#1A1F1E"],["#A7C5BD","#E5DDCB","#EB7B59","#CF4647","#524656"],["#9DC9AC","#FFFEC7","#F56218","#FF9D2E","#919167"],["#413D3D","#040004","#C8FF00","#FA023C","#4B000F"],["#EDF6EE","#D1C089","#B3204D","#412E28","#151101"],["#A8A7A7","#CC527A","#E8175D","#474747","#363636"],["#7E5686","#A5AAD9","#E8F9A2","#F8A13F","#BA3C3D"],["#FFEDBF","#F7803C","#F54828","#2E0D23","#F8E4C1"],["#C1B398","#605951","#FBEEC2","#61A6AB","#ACCEC0"],["#5E9FA3","#DCD1B4","#FAB87F","#F87E7B","#B05574"],["#951F2B","#F5F4D7","#E0DFB1","#A5A36C","#535233"],["#FFFBB7","#A6F6AF","#66B6AB","#5B7C8D","#4F2958"],["#000000","#9F111B","#B11623","#292C37","#CCCCCC"],["#9CDDC8","#BFD8AD","#DDD9AB","#F7AF63","#633D2E"],["#EFF3CD","#B2D5BA","#61ADA0","#248F8D","#605063"],["#84B295","#ECCF8D","#BB8138","#AC2005","#2C1507"],["#FCFEF5","#E9FFE1","#CDCFB7","#D6E6C3","#FAFBE3"],["#0CA5B0","#4E3F30","#FEFEEB","#F8F4E4","#A5B3AA"],["#4D3B3B","#DE6262","#FFB88C","#FFD0B3","#F5E0D3"],["#B5AC01","#ECBA09","#E86E1C","#D41E45","#1B1521"],["#379F7A","#78AE62","#BBB749","#E0FBAC","#1F1C0D"],["#FFE181","#EEE9E5","#FAD3B2","#FFBA7F","#FF9C97"],["#4E4D4A","#353432","#94BA65","#2790B0","#2B4E72"],["#A70267","#F10C49","#FB6B41","#F6D86B","#339194"],["#30261C","#403831","#36544F","#1F5F61","#0B8185"],["#2D2D29","#215A6D","#3CA2A2","#92C7A3","#DFECE6"],["#F38A8A","#55443D","#A0CAB5","#CDE9CA","#F1EDD0"],["#793A57","#4D3339","#8C873E","#D1C5A5","#A38A5F"],["#11766D","#410936","#A40B54","#E46F0A","#F0B300"],["#AAFF00","#FFAA00","#FF00AA","#AA00FF","#00AAFF"],["#C75233","#C78933","#D6CEAA","#79B5AC","#5E2F46"],["#F8EDD1","#D88A8A","#474843","#9D9D93","#C5CFC6"],["#6DA67A","#77B885","#86C28B","#859987","#4A4857"],["#1B325F","#9CC4E4","#E9F2F9","#3A89C9","#F26C4F"],["#BED6C7","#ADC0B4","#8A7E66","#A79B83","#BBB2A1"],["#046D8B","#309292","#2FB8AC","#93A42A","#ECBE13"],["#82837E","#94B053","#BDEB07","#BFFA37","#E0E0E0"],["#312736","#D4838F","#D6ABB1","#D9D9D9","#C4FFEB"],["#E5EAA4","#A8C4A2","#69A5A4","#616382","#66245B"],["#6DA67A","#99A66D","#A9BD68","#B5CC6A","#C0DE5D"],["#395A4F","#432330","#853C43","#F25C5E","#FFA566"],["#331327","#991766","#D90F5A","#F34739","#FF6E27"],["#FDFFD9","#FFF0B8","#FFD6A3","#FAAD8E","#142F30"],["#E21B5A","#9E0C39","#333333","#FBFFE3","#83A300"],["#FBC599","#CDBB93","#9EAE8A","#335650","#F35F55"],["#C7FCD7","#D9D5A7","#D9AB91","#E6867A","#ED4A6A"],["#EC4401","#CC9B25","#13CD4A","#7B6ED6","#5E525C"],["#BF496A","#B39C82","#B8C99D","#F0D399","#595151"],["#FFEFD3","#FFFEE4","#D0ECEA","#9FD6D2","#8B7A5E"],["#F1396D","#FD6081","#F3FFEB","#ACC95F","#8F9924"],["#F6F6F6","#E8E8E8","#333333","#990100","#B90504"],["#261C21","#6E1E62","#B0254F","#DE4126","#EB9605"],["#E9E0D1","#91A398","#33605A","#070001","#68462B"],["#F2E3C6","#FFC6A5","#E6324B","#2B2B2B","#353634"],["#FFAB07","#E9D558","#72AD75","#0E8D94","#434D53"],["#59B390","#F0DDAA","#E47C5D","#E32D40","#152B3C"],["#FDE6BD","#A1C5AB","#F4DD51","#D11E48","#632F53"],["#E4E4C5","#B9D48B","#8D2036","#CE0A31","#D3E4C5"],["#512B52","#635274","#7BB0A8","#A7DBAB","#E4F5B1"],["#805841","#DCF7F3","#FFFCDD","#FFD8D8","#F5A2A2"],["#E65540","#F8ECC2","#65A8A6","#79896D"],["#CAFF42","#EBF7F8","#D0E0EB","#88ABC2","#49708A"],["#595643","#4E6B66","#ED834E","#EBCC6E","#EBE1C5"],["#E4DED0","#ABCCBD","#7DBEB8","#181619","#E32F21"],["#058789","#503D2E","#D54B1A","#E3A72F","#F0ECC9"],["#FF003C","#FF8A00","#FABE28","#88C100","#00C176"],["#311D39","#67434F","#9B8E7E","#C3CCAF","#A51A41"],["#EFD9B4","#D6A692","#A39081","#4D6160","#292522"],["#C6CCA5","#8AB8A8","#6B9997","#54787D","#615145"],["#CC5D4C","#FFFEC6","#C7D1AF","#96B49C","#5B5847"],["#111625","#341931","#571B3C","#7A1E48","#9D2053"],["#EFEECC","#FE8B05","#FE0557","#400403","#0AABBA"],["#CCF390","#E0E05A","#F7C41F","#FC930A","#FF003D"],["#73C8A9","#DEE1B6","#E1B866","#BD5532","#373B44"],["#79254A","#795C64","#79927D","#AEB18E","#E3CF9E"],["#E0EFF1","#7DB4B5","#FFFFFF","#680148","#000000"],["#F06D61","#DA825F","#C4975C","#A8AB7B","#8CBF99"],["#2D1B33","#F36A71","#EE887A","#E4E391","#9ABC8A"],["#2B2726","#0A516D","#018790","#7DAD93","#BACCA4"],["#95A131","#C8CD3B","#F6F1DE","#F5B9AE","#EE0B5B"],["#360745","#D61C59","#E7D84B","#EFEAC5","#1B8798"],["#E3E8CD","#BCD8BF","#D3B9A3","#EE9C92","#FE857E"],["#807462","#A69785","#B8FAFF","#E8FDFF","#665C49"],["#4B1139","#3B4058","#2A6E78","#7A907C","#C9B180"],["#FC284F","#FF824A","#FEA887","#F6E7F7","#D1D0D7"],["#FFB884","#F5DF98","#FFF8D4","#C0D1C2","#2E4347"],["#027B7F","#FFA588","#D62957","#BF1E62","#572E4F"],["#80A8A8","#909D9E","#A88C8C","#FF0D51","#7A8C89"],["#A69E80","#E0BA9B","#E7A97E","#D28574","#3B1922"],["#A1DBB2","#FEE5AD","#FACA66","#F7A541","#F45D4C"],["#641F5E","#676077","#65AC92","#C2C092","#EDD48E"],["#FFF3DB","#E7E4D5","#D3C8B4","#C84648","#703E3B"],["#F5DD9D","#BCC499","#92A68A","#7B8F8A","#506266"],["#2B222C","#5E4352","#965D62","#C7956D","#F2D974"],["#D4F7DC","#DBE7B4","#DBC092","#E0846D","#F51441"],["#A32C28","#1C090B","#384030","#7B8055","#BCA875"],["#85847E","#AB6A6E","#F7345B","#353130","#CBCFB4"],["#E6B39A","#E6CBA5","#EDE3B4","#8B9E9B","#6D7578"],["#11644D","#A0B046","#F2C94E","#F78145","#F24E4E"],["#6D9788","#1E2528","#7E1C13","#BF0A0D","#E6E1C2"],["#23192D","#FD0A54","#F57576","#FEBF97","#F5ECB7"],["#EB9C4D","#F2D680","#F3FFCF","#BAC9A9","#697060"],["#D3D5B0","#B5CEA4","#9DC19D","#8C7C62","#71443F"],["#452E3C","#FF3D5A","#FFB969","#EAF27E","#3B8C88"],["#041122","#259073","#7FDA89","#C8E98E","#E6F99D"],["#B1E6D1","#77B1A9","#3D7B80","#270A33","#451A3E"],["#9D9E94","#C99E93","#F59D92","#E5B8AD","#D5D2C8"],["#FDCFBF","#FEB89F","#E23D75","#5F0D3B","#742365"],["#540045","#C60052","#FF714B","#EAFF87","#ACFFE9"],["#B7CBBF","#8C886F","#F9A799","#F4BFAD","#F5DABD"],["#280904","#680E34","#9A151A","#C21B12","#FC4B2A"],["#F0FFC9","#A9DA88","#62997A","#72243D","#3B0819"],["#429398","#6B5D4D","#B0A18F","#DFCDB4","#FBEED3"],["#E6EBA9","#ABBB9F","#6F8B94","#706482","#703D6F"],["#A3C68C","#879676","#6E6662","#4F364A","#340735"],["#44749D","#C6D4E1","#FFFFFF","#EBE7E0","#BDB8AD"],["#322938","#89A194","#CFC89A","#CC883A","#A14016"],["#CFB590","#9E9A41","#758918","#564334","#49281F"],["#FA6A64","#7A4E48","#4A4031","#F6E2BB","#9EC6B8"],["#1D1313","#24B694","#D22042","#A3B808","#30C4C9"],["#F6D76B","#FF9036","#D6254D","#FF5475","#FDEBA9"],["#E7EDEA","#FFC52C","#FB0C06","#030D4F","#CEECEF"],["#373737","#8DB986","#ACCE91","#BADB73","#EFEAE4"],["#161616","#C94D65","#E7C049","#92B35A","#1F6764"],["#26251C","#EB0A44","#F2643D","#F2A73D","#A0E8B7"],["#4B3E4D","#1E8C93","#DBD8A2","#C4AC30","#D74F33"],["#8D7966","#A8A39D","#D8C8B8","#E2DDD9","#F8F1E9"],["#F2E8C4","#98D9B6","#3EC9A7","#2B879E","#616668"],["#5CACC4","#8CD19D","#CEE879","#FCB653","#FF5254"]]},{}],4:[function(t,e,n){"use strict";var r=t("new-array"),o=t("lerp"),i=t("clamp"),a=t("./random-range"),s=t("gl-vec2"),c=t("simplex-noise"),u=t("./getLumaPixels");e.exports=function(t){function e(){d.fillStyle=m[0],d.fillRect(0,0,A.width,A.height)}function n(e){S+=e,T.forEach(function(n,r){var a=n.position[0],c=n.position[1],u=i(Math.round(a),0,A.width-1),f=i(Math.round(c),0,A.height-1),F=u+f*A.width,E=M[4*F]/255,C=o(x[0],x[1],E),p=h.noise3D(u*C,f*C,n.duration+S),D=p*Math.PI*2,B=n.speed+o(0,2,1-E);s.add(n.velocity,n.velocity,[Math.cos(D),Math.sin(D)]),s.normalize(n.velocity,n.velocity);var m=s.scale([],n.velocity,B);s.add(n.position,n.position,m);var v=w,g=n.radius*h.noise3D(a*v,c*v,n.duration+S);g*=o(.01,1,E),d.beginPath(),d.lineTo(a,c),d.lineTo(n.position[0],n.position[1]),d.lineWidth=g*(n.time/n.duration),d.lineCap=t.lineStyle||"square",d.lineJoin=t.lineStyle||"square",d.strokeStyle=n.color,d.globalAlpha=b,d.stroke(),n.time+=e,n.time>n.duration&&l(n)})}function l(t){t=t||{};var e=Math.min(p,D)/2;return t.position=f([],E(0,e*y)),t.position[0]+=p/2,t.position[1]+=D/2,t.radius=E(.01,g),t.duration=E(1,500),t.time=E(0,t.duration),t.velocity=[E(-1,1),E(-1,1)],t.speed=E(.5,2)*C,t.color=m[Math.floor(E(m.length))],t}function f(t,e){e=e||1;var n=2*F()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}t=t||{};var F=t.random||Math.random,E=a(F),h=new c(F),d=t.context,C="number"==typeof t.pixelRatio?t.pixelRatio:1,A=d.canvas,p=A.width,D=A.height,B=t.count||0,m=t.palette||["#fff","#000"],v=t.backgroundImage,g="number"==typeof t.maxRadius?t.maxRadius:10,y="number"==typeof t.startArea?t.startArea:.5,w=o(1e-6,.5,t.pointilism),x=t.noiseScalar||[1e-5,1e-4],b="number"==typeof t.globalAlpha?t.globalAlpha:1,k=u(d,v,{scale:t.backgroundScale,fillStyle:t.backgroundFill}),M=k.data,S=0,T=r(B).map(function(){return l()});return{clear:e,step:n,debugLuma:function(){d.putImageData(k,0,0)}}}},{"./getLumaPixels":6,"./random-range":7,clamp:8,"gl-vec2":22,lerp:43,"new-array":44,"simplex-noise":53}],5:[function(t,e,n){"use strict";function r(t,e,n,r){r="number"==typeof r?r:1,n="undefined"==typeof n?t.canvas:n;var o,i,a=e.width/e.height,s=n.width,c=n.height,u=s/c;a>u?(i=c,o=i*a):(o=s,i=o/a),o*=r,i*=r;var l=(s-o)/2,f=(c-i)/2;t.drawImage(e,l,f,o,i)}e.exports=r},{}],6:[function(t,e,n){"use strict";function r(t,e,n){var r=t.canvas,s="number"==typeof n.scale?n.scale:1,c=Array.isArray(n.threshold)?n.threshold:null;t.fillStyle=n.fillStyle||"black",t.fillRect(0,0,r.width,r.height),a(t,e,r,s);for(var u=t.getImageData(0,0,r.width,r.height),l=u.data,f=0;f<r.width*r.height;f++){var F=l[4*f+0],E=l[4*f+1],h=l[4*f+2],d=i(F,E,h);c&&(d=Math.floor(255*o(c[0],c[1],d/255))),l[4*f+0]=d,l[4*f+1]=d,l[4*f+2]=d}return u}var o=t("smoothstep"),i=t("color-luminance"),a=t("./drawImageCover");e.exports=r},{"./drawImageCover":5,"color-luminance":9,smoothstep:54}],7:[function(t,e,n){"use strict";e.exports=function(t){return function(e,n){return"undefined"==typeof e&&(e=1),"undefined"==typeof n&&(n=e,e=0),t()*(n-e)+e}}},{}],8:[function(t,e,n){function r(t,e,n){return n>e?e>t?e:t>n?n:t:n>t?n:t>e?e:t}e.exports=r},{}],9:[function(t,e,n){function r(t,e,n){if(Array.isArray(t)){var r=t;t=r[0],e=r[1],n=r[2]}return.299*t+.587*e+.114*n}function o(t,e,n){if(Array.isArray(t)){var r=t;t=r[0],e=r[1],n=r[2]}return.2126*t+.7152*e+.0722*n}e.exports=r,e.exports.rec601=r,e.exports.rec709=o},{}],10:[function(t,e,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(t){return"function"==typeof t}function i(t){return"number"==typeof t}function a(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,n,r,i,c,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],s(n))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),n.apply(this,i)}else if(a(n))for(i=Array.prototype.slice.call(arguments,1),u=n.slice(),r=u.length,c=0;r>c;c++)u[c].apply(this,i);return!0},r.prototype.addListener=function(t,e){var n;if(!o(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,o(e.listener)?e.listener:e),this._events[t]?a(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,a(this._events[t])&&!this._events[t].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!o(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},r.prototype.removeListener=function(t,e){var n,r,i,s;if(!o(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],i=n.length,r=-1,n===e||o(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(n)){for(s=i;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){r=s;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],o(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?o(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(o(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},{}],11:[function(t,e,n){!function(){"use strict";function t(e,n){function o(t,e){return function(){return t.apply(e,arguments)}}var i;if(n=n||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=n.touchBoundary||10,this.layer=e,this.tapDelay=n.tapDelay||200,this.tapTimeout=n.tapTimeout||700,!t.notNeeded(e)){for(var a=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],s=this,c=0,u=a.length;u>c;c++)s[a[c]]=o(s[a[c]],s);r&&(e.addEventListener("mouseover",this.onMouse,!0),e.addEventListener("mousedown",this.onMouse,!0),e.addEventListener("mouseup",this.onMouse,!0)),e.addEventListener("click",this.onClick,!0),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(e.removeEventListener=function(t,n,r){var o=Node.prototype.removeEventListener;"click"===t?o.call(e,t,n.hijacked||n,r):o.call(e,t,n,r)},e.addEventListener=function(t,n,r){var o=Node.prototype.addEventListener;"click"===t?o.call(e,t,n.hijacked||(n.hijacked=function(t){t.propagationStopped||n(t)}),r):o.call(e,t,n,r)}),"function"==typeof e.onclick&&(i=e.onclick,e.addEventListener("click",function(t){i(t)},!1),e.onclick=null)}}var n=navigator.userAgent.indexOf("Windows Phone")>=0,r=navigator.userAgent.indexOf("Android")>0&&!n,o=/iP(ad|hone|od)/.test(navigator.userAgent)&&!n,i=o&&/OS 4_\d(_\d)?/.test(navigator.userAgent),a=o&&/OS [6-7]_\d/.test(navigator.userAgent),s=navigator.userAgent.indexOf("BB10")>0;t.prototype.needsClick=function(t){switch(t.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(t.disabled)return!0;break;case"input":if(o&&"file"===t.type||t.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(t.className)},t.prototype.needsFocus=function(t){switch(t.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!r;case"input":switch(t.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},t.prototype.sendClick=function(t,e){var n,r;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),r=e.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(t),!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,t.dispatchEvent(n)},t.prototype.determineEventType=function(t){return r&&"select"===t.tagName.toLowerCase()?"mousedown":"click"},t.prototype.focus=function(t){var e;o&&t.setSelectionRange&&0!==t.type.indexOf("date")&&"time"!==t.type&&"month"!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},t.prototype.updateScrollParent=function(t){var e,n;if(e=t.fastClickScrollParent,!e||!e.contains(t)){n=t;do{if(n.scrollHeight>n.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},t.prototype.getTargetElementFromEventTarget=function(t){return t.nodeType===Node.TEXT_NODE?t.parentNode:t},t.prototype.onTouchStart=function(t){var e,n,r;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),n=t.targetTouches[0],o){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!i){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=n.pageX,this.touchStartY=n.pageY,t.timeStamp-this.lastClickTime<this.tapDelay&&t.preventDefault(),!0},t.prototype.touchHasMoved=function(t){var e=t.changedTouches[0],n=this.touchBoundary;return Math.abs(e.pageX-this.touchStartX)>n||Math.abs(e.pageY-this.touchStartY)>n},t.prototype.onTouchMove=function(t){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(t.target)||this.touchHasMoved(t))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},t.prototype.findControl=function(t){return void 0!==t.control?t.control:t.htmlFor?document.getElementById(t.htmlFor):t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},t.prototype.onTouchEnd=function(t){var e,n,s,c,u,l=this.targetElement;if(!this.trackingClick)return!0;if(t.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(t.timeStamp-this.trackingClickStart>this.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=t.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,a&&(u=t.changedTouches[0],l=document.elementFromPoint(u.pageX-window.pageXOffset,u.pageY-window.pageYOffset)||l,l.fastClickScrollParent=this.targetElement.fastClickScrollParent),s=l.tagName.toLowerCase(),"label"===s){if(e=this.findControl(l)){if(this.focus(l),r)return!1;l=e}}else if(this.needsFocus(l))return t.timeStamp-n>100||o&&window.top!==window&&"input"===s?(this.targetElement=null,!1):(this.focus(l),this.sendClick(l,t),o&&"select"===s||(this.targetElement=null,t.preventDefault()),!1);return o&&!i&&(c=l.fastClickScrollParent,c&&c.fastClickLastScrollTop!==c.scrollTop)?!0:(this.needsClick(l)||(t.preventDefault(),this.sendClick(l,t)),!1)},t.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},t.prototype.onMouse=function(t){return this.targetElement?t.forwardedTouchEvent?!0:t.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(t.stopImmediatePropagation?t.stopImmediatePropagation():t.propagationStopped=!0,t.stopPropagation(),t.preventDefault(),!1):!0:!0},t.prototype.onClick=function(t){var e;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===t.target.type&&0===t.detail?!0:(e=this.onMouse(t),e||(this.targetElement=null),e)},t.prototype.destroy=function(){var t=this.layer;r&&(t.removeEventListener("mouseover",this.onMouse,!0),t.removeEventListener("mousedown",this.onMouse,!0),t.removeEventListener("mouseup",this.onMouse,!0)),t.removeEventListener("click",this.onClick,!0),t.removeEventListener("touchstart",this.onTouchStart,!1),t.removeEventListener("touchmove",this.onTouchMove,!1),t.removeEventListener("touchend",this.onTouchEnd,!1),t.removeEventListener("touchcancel",this.onTouchCancel,!1)},t.notNeeded=function(t){var e,n,o,i;if("undefined"==typeof window.ontouchstart)return!0;if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!r)return!0;if(e=document.querySelector("meta[name=viewport]")){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(n>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(s&&(o=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),o[1]>=10&&o[2]>=3&&(e=document.querySelector("meta[name=viewport]")))){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===t.style.msTouchAction||"manipulation"===t.style.touchAction?!0:(i=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],i>=27&&(e=document.querySelector("meta[name=viewport]"),e&&(-1!==e.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===t.style.touchAction||"manipulation"===t.style.touchAction)},t.attach=function(e,n){return new t(e,n)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return t}):"undefined"!=typeof e&&e.exports?(e.exports=t.attach,e.exports.FastClick=t):window.FastClick=t}()},{}],12:[function(t,e,n){function r(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}e.exports=r},{}],13:[function(t,e,n){function r(t){var e=new Float32Array(2);return e[0]=t[0],e[1]=t[1],e}e.exports=r},{}],14:[function(t,e,n){function r(t,e){return t[0]=e[0],t[1]=e[1],t}e.exports=r},{}],15:[function(t,e,n){function r(){var t=new Float32Array(2);return t[0]=0,t[1]=0,t}e.exports=r},{}],16:[function(t,e,n){function r(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}e.exports=r},{}],17:[function(t,e,n){function r(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}e.exports=r},{}],18:[function(t,e,n){function r(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}e.exports=r},{}],19:[function(t,e,n){function r(t,e){return t[0]*e[0]+t[1]*e[1]}e.exports=r},{}],20:[function(t,e,n){function r(t,e,n,r,i,a){var s,c;for(e||(e=2),n||(n=0),c=r?Math.min(r*e+n,t.length):t.length,s=n;c>s;s+=e)o[0]=t[s],o[1]=t[s+1],i(o,o,a),t[s]=o[0],t[s+1]=o[1];return t}e.exports=r;var o=t("./create")()},{"./create":15}],21:[function(t,e,n){function r(t,e){var n=new Float32Array(2);return n[0]=t,n[1]=e,n}e.exports=r},{}],22:[function(t,e,n){e.exports={create:t("./create"),clone:t("./clone"),fromValues:t("./fromValues"),copy:t("./copy"),set:t("./set"),add:t("./add"),subtract:t("./subtract"),multiply:t("./multiply"),divide:t("./divide"),min:t("./min"),max:t("./max"),scale:t("./scale"),scaleAndAdd:t("./scaleAndAdd"),distance:t("./distance"),squaredDistance:t("./squaredDistance"),length:t("./length"),squaredLength:t("./squaredLength"),negate:t("./negate"),normalize:t("./normalize"),dot:t("./dot"),cross:t("./cross"),lerp:t("./lerp"),random:t("./random"),transformMat2:t("./transformMat2"),transformMat2d:t("./transformMat2d"),transformMat3:t("./transformMat3"),transformMat4:t("./transformMat4"),forEach:t("./forEach")}},{"./add":12,"./clone":13,"./copy":14,"./create":15,"./cross":16,"./distance":17,"./divide":18,"./dot":19,"./forEach":20,"./fromValues":21,
"./length":23,"./lerp":24,"./max":25,"./min":26,"./multiply":27,"./negate":28,"./normalize":29,"./random":30,"./scale":31,"./scaleAndAdd":32,"./set":33,"./squaredDistance":34,"./squaredLength":35,"./subtract":36,"./transformMat2":37,"./transformMat2d":38,"./transformMat3":39,"./transformMat4":40}],23:[function(t,e,n){function r(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}e.exports=r},{}],24:[function(t,e,n){function r(t,e,n,r){var o=e[0],i=e[1];return t[0]=o+r*(n[0]-o),t[1]=i+r*(n[1]-i),t}e.exports=r},{}],25:[function(t,e,n){function r(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}e.exports=r},{}],26:[function(t,e,n){function r(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}e.exports=r},{}],27:[function(t,e,n){function r(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}e.exports=r},{}],28:[function(t,e,n){function r(t,e){return t[0]=-e[0],t[1]=-e[1],t}e.exports=r},{}],29:[function(t,e,n){function r(t,e){var n=e[0],r=e[1],o=n*n+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o),t}e.exports=r},{}],30:[function(t,e,n){function r(t,e){e=e||1;var n=2*Math.random()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}e.exports=r},{}],31:[function(t,e,n){function r(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}e.exports=r},{}],32:[function(t,e,n){function r(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}e.exports=r},{}],33:[function(t,e,n){function r(t,e,n){return t[0]=e,t[1]=n,t}e.exports=r},{}],34:[function(t,e,n){function r(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}e.exports=r},{}],35:[function(t,e,n){function r(t){var e=t[0],n=t[1];return e*e+n*n}e.exports=r},{}],36:[function(t,e,n){function r(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}e.exports=r},{}],37:[function(t,e,n){function r(t,e,n){var r=e[0],o=e[1];return t[0]=n[0]*r+n[2]*o,t[1]=n[1]*r+n[3]*o,t}e.exports=r},{}],38:[function(t,e,n){function r(t,e,n){var r=e[0],o=e[1];return t[0]=n[0]*r+n[2]*o+n[4],t[1]=n[1]*r+n[3]*o+n[5],t}e.exports=r},{}],39:[function(t,e,n){function r(t,e,n){var r=e[0],o=e[1];return t[0]=n[0]*r+n[3]*o+n[6],t[1]=n[1]*r+n[4]*o+n[7],t}e.exports=r},{}],40:[function(t,e,n){function r(t,e,n){var r=e[0],o=e[1];return t[0]=n[0]*r+n[4]*o+n[12],t[1]=n[1]*r+n[5]*o+n[13],t}e.exports=r},{}],41:[function(t,e,n){"use strict";e.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");t=t.replace(/^#/,""),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);var e=parseInt(t,16);return[e>>16,e>>8&255,255&e]}},{}],42:[function(t,e,n){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},{}],43:[function(t,e,n){function r(t,e,n){return t*(1-n)+e*n}e.exports=r},{}],44:[function(t,e,n){function r(t,e){t=t||0;for(var n=new Array(t),r=0;t>r;r++)n[r]=e;return n}e.exports=r},{}],45:[function(t,e,n){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function o(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;10>n;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}var i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=o()?Object.assign:function(t,e){for(var n,o,s=r(t),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var u in n)i.call(n,u)&&(s[u]=n[u]);if(Object.getOwnPropertySymbols){o=Object.getOwnPropertySymbols(n);for(var l=0;l<o.length;l++)a.call(n,o[l])&&(s[o[l]]=n[o[l]])}}return s}},{}],46:[function(t,e,n){(function(t){(function(){var n,r,o;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-o)/1e6},r=t.hrtime,n=function(){var t;return t=r(),1e9*t[0]+t[1]},o=n()):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,t("_process"))},{_process:47}],47:[function(t,e,n){function r(){l&&s&&(l=!1,s.length?u=s.concat(u):f=-1,u.length&&o())}function o(){if(!l){var t=setTimeout(r);l=!0;for(var e=u.length;e;){for(s=u,u=[];++f<e;)s&&s[f].run();f=-1,e=u.length}s=null,l=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function a(){}var s,c=e.exports={},u=[],l=!1,f=-1;c.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new i(t,e)),1!==u.length||l||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=a,c.addListener=a,c.once=a,c.off=a,c.removeListener=a,c.removeAllListeners=a,c.emit=a,c.binding=function(t){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(t){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},{}],48:[function(t,e,n){function r(t){return this instanceof r?(this.running=!1,this.last=a(),this._frame=0,this._tick=this.tick.bind(this),void(t&&this.on("tick",t))):new r(t)}var o=t("inherits"),i=t("events").EventEmitter,a=t("right-now"),s=t("raf");e.exports=r,o(r,i),r.prototype.start=function(){return this.running?void 0:(this.running=!0,this.last=a(),this._frame=s(this._tick),this)},r.prototype.stop=function(){return this.running=!1,0!==this._frame&&s.cancel(this._frame),this._frame=0,this},r.prototype.tick=function(){this._frame=s(this._tick);var t=a(),e=t-this.last;this.emit("tick",e),this.last=t}},{events:10,inherits:42,raf:49,"right-now":51}],49:[function(t,e,n){(function(n){for(var r=t("performance-now"),o="undefined"==typeof window?n:window,i=["moz","webkit"],a="AnimationFrame",s=o["request"+a],c=o["cancel"+a]||o["cancelRequest"+a],u=0;!s&&u<i.length;u++)s=o[i[u]+"Request"+a],c=o[i[u]+"Cancel"+a]||o[i[u]+"CancelRequest"+a];if(!s||!c){var l=0,f=0,F=[],E=1e3/60;s=function(t){if(0===F.length){var e=r(),n=Math.max(0,E-(e-l));l=n+e,setTimeout(function(){var t=F.slice(0);F.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(l)}catch(n){setTimeout(function(){throw n},0)}},Math.round(n))}return F.push({handle:++f,callback:t,cancelled:!1}),f},c=function(t){for(var e=0;e<F.length;e++)F[e].handle===t&&(F[e].cancelled=!0)}}e.exports=function(t){return s.call(o,t)},e.exports.cancel=function(){c.apply(o,arguments)},e.exports.polyfill=function(){o.requestAnimationFrame=s,o.cancelAnimationFrame=c}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"performance-now":46}],50:[function(t,e,n){function r(t){return Math.pow((t+.055)/1.055,2.4)}var o=.2126,i=.7152,a=.0722,s=1/12.92;e.exports=function(t){var e=t[0]/255,n=t[1]/255,c=t[2]/255,u=.03928>=e?e*s:r(e),l=.03928>=n?n*s:r(n),f=.03928>=c?c*s:r(c);return u*o+l*i+f*a}},{}],51:[function(t,e,n){(function(t){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],52:[function(t,e,n){(function(t){"use strict";function n(t){var e,n=t.length,r=this,o=0,i=r.i=r.j=0,a=r.S=[];for(n||(t=[n++]);s>o;)a[o]=o++;for(o=0;s>o;o++)a[o]=a[i=d&i+t[o%n]+(e=a[o])],a[i]=e;(r.g=function(t){for(var e,n=0,o=r.i,i=r.j,a=r.S;t--;)e=a[o=d&o+1],n=n*s+a[d&(a[o]=a[i=d&i+e])+(a[i]=e)];return r.i=o,r.j=i,n})(s)}function r(t,e){var n,o=[],i=(typeof t)[0];if(e&&"o"==i)for(n in t)try{o.push(r(t[n],e-1))}catch(a){}return o.length?o:"s"==i?t:t+"\x00"}function o(t,e){for(var n,r=t+"",o=0;o<r.length;)e[d&o]=d&(n^=19*e[d&o])+r.charCodeAt(o++);return a(e)}function i(t){try{return f.crypto.getRandomValues(t=new Uint8Array(s)),a(t)}catch(e){return[+new Date,f,f.navigator&&f.navigator.plugins,f.screen,a(l)]}}function a(t){return String.fromCharCode.apply(0,t)}var s=256,c=6,u=52,l=[],f="undefined"==typeof t?window:t,F=Math.pow(s,c),E=Math.pow(2,u),h=2*E,d=s-1,C=Math.random;e.exports=function(t,u){if(u&&u.global===!0)return u.global=!1,Math.random=e.exports(t,u),u.global=!0,Math.random;var f=u&&u.entropy||!1,d=[],C=(o(r(f?[t,a(l)]:0 in arguments?t:i(),3),d),new n(d));return o(a(C.S),l),function(){for(var t=C.g(c),e=F,n=0;E>t;)t=(t+n)*s,e*=s,n=C.g(1);for(;t>=h;)t/=2,e/=2,n>>>=1;return(t+n)/e}},e.exports.resetGlobal=function(){Math.random=C},o(Math.random(),l)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],53:[function(t,e,n){!function(){"use strict";function t(t){t||(t=Math.random),this.p=new Uint8Array(256),this.perm=new Uint8Array(512),this.permMod12=new Uint8Array(512);for(var e=0;256>e;e++)this.p[e]=256*t();for(e=0;512>e;e++)this.perm[e]=this.p[255&e],this.permMod12[e]=this.perm[e]%12}var r=.5*(Math.sqrt(3)-1),o=(3-Math.sqrt(3))/6,i=1/3,a=1/6,s=(Math.sqrt(5)-1)/4,c=(5-Math.sqrt(5))/20;t.prototype={grad3:new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]),grad4:new Float32Array([0,1,1,1,0,1,1,-1,0,1,-1,1,0,1,-1,-1,0,-1,1,1,0,-1,1,-1,0,-1,-1,1,0,-1,-1,-1,1,0,1,1,1,0,1,-1,1,0,-1,1,1,0,-1,-1,-1,0,1,1,-1,0,1,-1,-1,0,-1,1,-1,0,-1,-1,1,1,0,1,1,1,0,-1,1,-1,0,1,1,-1,0,-1,-1,1,0,1,-1,1,0,-1,-1,-1,0,1,-1,-1,0,-1,1,1,1,0,1,1,-1,0,1,-1,1,0,1,-1,-1,0,-1,1,1,0,-1,1,-1,0,-1,-1,1,0,-1,-1,-1,0]),noise2D:function(t,e){var n,i,a=this.permMod12,s=this.perm,c=this.grad3,u=0,l=0,f=0,F=(t+e)*r,E=Math.floor(t+F),h=Math.floor(e+F),d=(E+h)*o,C=E-d,A=h-d,p=t-C,D=e-A;p>D?(n=1,i=0):(n=0,i=1);var B=p-n+o,m=D-i+o,v=p-1+2*o,g=D-1+2*o,y=255&E,w=255&h,x=.5-p*p-D*D;if(x>=0){var b=3*a[y+s[w]];x*=x,u=x*x*(c[b]*p+c[b+1]*D)}var k=.5-B*B-m*m;if(k>=0){var M=3*a[y+n+s[w+i]];k*=k,l=k*k*(c[M]*B+c[M+1]*m)}var S=.5-v*v-g*g;if(S>=0){var T=3*a[y+1+s[w+1]];S*=S,f=S*S*(c[T]*v+c[T+1]*g)}return 70*(u+l+f)},noise3D:function(t,e,n){var r,o,s,c,u,l,f,F,E,h,d=this.permMod12,C=this.perm,A=this.grad3,p=(t+e+n)*i,D=Math.floor(t+p),B=Math.floor(e+p),m=Math.floor(n+p),v=(D+B+m)*a,g=D-v,y=B-v,w=m-v,x=t-g,b=e-y,k=n-w;x>=b?b>=k?(u=1,l=0,f=0,F=1,E=1,h=0):x>=k?(u=1,l=0,f=0,F=1,E=0,h=1):(u=0,l=0,f=1,F=1,E=0,h=1):k>b?(u=0,l=0,f=1,F=0,E=1,h=1):k>x?(u=0,l=1,f=0,F=0,E=1,h=1):(u=0,l=1,f=0,F=1,E=1,h=0);var M=x-u+a,S=b-l+a,T=k-f+a,L=x-F+2*a,_=b-E+2*a,O=k-h+2*a,q=x-1+3*a,N=b-1+3*a,j=k-1+3*a,P=255&D,R=255&B,I=255&m,W=.6-x*x-b*b-k*k;if(0>W)r=0;else{var z=3*d[P+C[R+C[I]]];W*=W,r=W*W*(A[z]*x+A[z+1]*b+A[z+2]*k)}var X=.6-M*M-S*S-T*T;if(0>X)o=0;else{var U=3*d[P+u+C[R+l+C[I+f]]];X*=X,o=X*X*(A[U]*M+A[U+1]*S+A[U+2]*T)}var Y=.6-L*L-_*_-O*O;if(0>Y)s=0;else{var V=3*d[P+F+C[R+E+C[I+h]]];Y*=Y,s=Y*Y*(A[V]*L+A[V+1]*_+A[V+2]*O)}var G=.6-q*q-N*N-j*j;if(0>G)c=0;else{var H=3*d[P+1+C[R+1+C[I+1]]];G*=G,c=G*G*(A[H]*q+A[H+1]*N+A[H+2]*j)}return 32*(r+o+s+c)},noise4D:function(t,e,n,r){var o,i,a,u,l,f=(this.permMod12,this.perm),F=this.grad4,E=(t+e+n+r)*s,h=Math.floor(t+E),d=Math.floor(e+E),C=Math.floor(n+E),A=Math.floor(r+E),p=(h+d+C+A)*c,D=h-p,B=d-p,m=C-p,v=A-p,g=t-D,y=e-B,w=n-m,x=r-v,b=0,k=0,M=0,S=0;g>y?b++:k++,g>w?b++:M++,g>x?b++:S++,y>w?k++:M++,y>x?k++:S++,w>x?M++:S++;var T,L,_,O,q,N,j,P,R,I,W,z;T=b>=3?1:0,L=k>=3?1:0,_=M>=3?1:0,O=S>=3?1:0,q=b>=2?1:0,N=k>=2?1:0,j=M>=2?1:0,P=S>=2?1:0,R=b>=1?1:0,I=k>=1?1:0,W=M>=1?1:0,z=S>=1?1:0;var X=g-T+c,U=y-L+c,Y=w-_+c,V=x-O+c,G=g-q+2*c,H=y-N+2*c,J=w-j+2*c,Z=x-P+2*c,K=g-R+3*c,Q=y-I+3*c,$=w-W+3*c,tt=x-z+3*c,et=g-1+4*c,nt=y-1+4*c,rt=w-1+4*c,ot=x-1+4*c,it=255&h,at=255&d,st=255&C,ct=255&A,ut=.6-g*g-y*y-w*w-x*x;if(0>ut)o=0;else{var lt=f[it+f[at+f[st+f[ct]]]]%32*4;ut*=ut,o=ut*ut*(F[lt]*g+F[lt+1]*y+F[lt+2]*w+F[lt+3]*x)}var ft=.6-X*X-U*U-Y*Y-V*V;if(0>ft)i=0;else{var Ft=f[it+T+f[at+L+f[st+_+f[ct+O]]]]%32*4;ft*=ft,i=ft*ft*(F[Ft]*X+F[Ft+1]*U+F[Ft+2]*Y+F[Ft+3]*V)}var Et=.6-G*G-H*H-J*J-Z*Z;if(0>Et)a=0;else{var ht=f[it+q+f[at+N+f[st+j+f[ct+P]]]]%32*4;Et*=Et,a=Et*Et*(F[ht]*G+F[ht+1]*H+F[ht+2]*J+F[ht+3]*Z)}var dt=.6-K*K-Q*Q-$*$-tt*tt;if(0>dt)u=0;else{var Ct=f[it+R+f[at+I+f[st+W+f[ct+z]]]]%32*4;dt*=dt,u=dt*dt*(F[Ct]*K+F[Ct+1]*Q+F[Ct+2]*$+F[Ct+3]*tt)}var At=.6-et*et-nt*nt-rt*rt-ot*ot;if(0>At)l=0;else{var pt=f[it+1+f[at+1+f[st+1+f[ct+1]]]]%32*4;At*=At,l=At*At*(F[pt]*et+F[pt+1]*nt+F[pt+2]*rt+F[pt+3]*ot)}return 27*(o+i+a+u+l)}},"undefined"!=typeof define&&define.amd&&define(function(){return t}),"undefined"!=typeof n?n.SimplexNoise=t:"undefined"!=typeof window&&(window.SimplexNoise=t),"undefined"!=typeof e&&(e.exports=t)}()},{}],54:[function(t,e,n){e.exports=function(t,e,n){var r=Math.max(0,Math.min(1,(n-t)/(e-t)));return r*r*(3-2*r)}},{}],55:[function(t,e,n){function r(t,e){var n=Math.max(t,e),r=Math.min(t,e);return(n+.05)/(r+.05)}function o(t,e){return r(s(t),s(e))}function i(t,e){return o(c(t),c(e))}function a(t){return t>=7?"AAA":t>=4.5?"AA":""}var s=t("relative-luminance"),c=t("hex-rgb");e.exports.luminance=r,e.exports.rgb=o,e.exports.hex=i,e.exports.score=a},{"hex-rgb":41,"relative-luminance":50}]},{},[1]);