text: parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"MUOZ":[function(require,module,exports) {
  "use strict";var r,o=function(o){v.attr("style","grid-template: repeat(".concat(o,", 1fr) / repeat(").concat(o,", 1fr);"));for(var t=1;t<=o;t++)for(var n=1;n<=o;n++){var c=$("<div></div>");c.addClass("box x".concat(n,"y").concat(t)),c.on("transitionend webkitTransitionEnd oTransitionEnd",l),c.attr("style","background-color: white;"),c.attr("tabindex",0),v.append(c)}r=$(".box"),$(".box").on("mouseenter keypress",a)},a=function(r){switch(m.color){case"black":$(this).css({backgroundColor:"black",borderColor:"#44c2fc"}),$(r).css({backgroundColor:"black",borderColor:"#44c2fc"});break;case"rainbow":e($(this)),e($(r));break;case"transparent":$(this).css({backgroundColor:"transparent",borderColor:"transparent"}),$(r).css({backgroundColor:"transparent",borderColor:"transparent"});break;case"Light Gradient":i($(this),-51);break;case"Dark Gradient":i($(this),51)}},t=function(r){"Light Gradient"===m.color?i($(r),-51):i($(r),51)},n=function(){r.each(function(r,o){$(o).css({backgroundColor:"white",borderColor:"#44c2fc"})})},c=function(){var a=prompt("How many squares would you like per side? (128 max)");null==a||""===a?alert("cancelled"):!isNaN(a)&&a<=128?(r.each(function(r,o){return o.remove()}),o(a)):alert("Please enter a valid number that's less than 128.")},e=function(r){var o=Math.floor(255*Math.random()),a=Math.floor(255*Math.random()),t=Math.floor(255*Math.random()),n="rgb(".concat(o,", ").concat(a,", ").concat(t,")");$(r).css({backgroundColor:n,borderColor:"#44c2fc"})},i=function(r,o){var a=$(r).css("backgroundColor").split(","),t=a[0].split("(")[a[0].split("(").length-1],n=a[1],c=a[2].split(")")[a[1].split(")").length-1];t-=o,n-=o,c-=o,$(r).css({backgroundColor:"rgb(".concat(t,", ").concat(n,", ").concat(c,")"),borderColor:"#44c2fc"})},l=function(){if("on"===m.propagate)for(var r=parseInt(this.classList[1].split("y")[1],10),o=parseInt(this.classList[1].split("y")[0].split("x")[1],10),n=Math.sqrt(v.children().length),c=-1;c<=1;c++)for(var e=-1;e<=1;e++){var i=o+c,l=r+e;if((0===c&&0!==e||0!==c&&0===e)&&i>=1&&i<=n&&l>=1&&l<=n){var s=$(".x"+i+"y"+l);"Light Gradient"!==m.color&&"Dark Gradient"!==m.color?a(s):t(s)}}},s=function(){"off"===m.propagate?m.propagate="on":m.propagate="off","off"===m.propagate?C.css("backgroundColor","darkred"):C.css("backgroundColor","darkgreen")},d=$("#blackBtn"),f=$("#rainbowBtn"),p=$("#transparentBtn"),u=$("#lightGradientBtn"),b=$("#darkGradientBtn"),k=$(".color"),g=$("#clearBtn"),h=$("#newGridBtn"),C=$("#propagateBtn"),v=$(".container");o(16);var m={color:"black",propagate:"off"};d.click(function(){return m.color="black"}),f.click(function(){return m.color="rainbow"}),p.click(function(){return m.color="transparent"}),u.click(function(){return m.color="Light Gradient"}),b.click(function(){return m.color="Dark Gradient"}),g.click(n),h.click(c),C.click(s);
  },{}]},{},["MUOZ"], null)
  //# sourceMappingURL=/app.fb8fa125.js.map