From 632a082b15730bfb5e87b62e02e2e4bd4961fdfe Mon Sep 17 00:00:00 2001 From: sorrelbri Date: Tue, 26 May 2020 06:56:58 +0000 Subject: [PATCH] deploy: 2a73088fbf2824de1bae29723de02b98dc1a8d90 --- app.bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.bundle.js b/app.bundle.js index 0975c5d..d6f18d5 100644 --- a/app.bundle.js +++ b/app.bundle.js @@ -1 +1 @@ -!function(n){var e={};function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var i in n)t.d(r,i,function(e){return n[e]}.bind(null,i));return r},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=3)}([function(n,e,t){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var n={};return function(e){if(void 0===n[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(n){t=null}n[e]=t}return n[e]}}(),a=[];function c(n){for(var e=-1,t=0;tn.length)&&(e=n.length);for(var t=0,r=new Array(e);tn.length)&&(e=n.length);for(var t=0,r=new Array(e);tn.length)&&(e=n.length);for(var t=0,r=new Array(e);t0&&(t.map["".concat(e,",").concat(r)]=d(!0,0))}))})),Object.entries(a).forEach((function(n){var e=l(n,2),r=e[0],i=l(e[1],2),o=i[0],a=i[1];return t.map[r]=d(o,a)}))},m=function(n){!function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&o(n,e)}(u,n);var e,t,r,c=a(u);function u(n,e){return f(this,u),c.call(this,n,e)}return e=u,(t=[{key:"addLiveNeighbor",value:function(n){void 0===this.map[n]&&(this.map[n]=d(!1)),this.map[n].addLiveNeighbor()}},{key:"map",get:function(){return this.head.map}}])&&i(e.prototype,t),r&&i(e,r),u}(h),y=function(n,e){var t=l(e,2),r=t[0],i=t[1];return n[r]=i,n},g=function(n){var e=l(n,2);e[0];return!0===e[1].living},w=function(n){var e=l(n,2),t=e[0],r=e[1];return[t,[r.living,r.liveNeighbors]]},x=function(n){var e=l(n,2),t=e[0],r=e[1];return r.setLiving(),[t,[r.living,0]]};n.exports={GameField:v,fieldStream:function n(e){var t=e.fieldArray,r=e.fieldMap;return new m(new v({fieldArray:t,fieldMap:r}),(function(){var e;Object.entries(this.map).filter(g).forEach((e=this,function(n){var t=l(n,1)[0];return b(t).forEach((function(n){return e.addLiveNeighbor(n)}))}));var t=Object.entries(this.map).map(w).reduce(y,{});return new m(new v({fieldMap:t}),(function(){var e=Object.entries(this.map).map(x).reduce(y,{});return n({fieldMap:e})}))}))}}},function(n,e,t){function r(n){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function i(n,e){return(i=Object.setPrototypeOf||function(n,e){return n.__proto__=e,n})(n,e)}function o(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=c(n);if(e){var i=c(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return a(this,t)}}function a(n,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(n):e}function c(n){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}function u(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function l(n,e){for(var t=0;t0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;u(this,n),this.living=e,this.liveNeighbors=t}return s(n,[{key:"toggleLiving",value:function(){this.living=!this.living}},{key:"addLiveNeighbor",value:function(){this.liveNeighbors++}},{key:"setLiving",value:function(){return this.living&&2!==this.liveNeighbors&&3!==this.liveNeighbors?(this.liveNeighbors=0,this.living=!1):3===this.liveNeighbors?(this.liveNeighbors=0,this.living=!0):void(this.liveNeighbors=0)}}]),n}(),p=function(n){!function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&i(n,e)}(t,n);var e=o(t);function t(n,r){return u(this,t),e.call(this,n,r)}return s(t,[{key:"addLiveNeighbor",value:function(){this.head.addLiveNeighbor()}},{key:"setLiving",value:function(){this.head.setLiving()}},{key:"toggleLiving",value:function(){this.head.toggleLiving()}},{key:"living",get:function(){return this.head.living}},{key:"liveNeighbors",get:function(){return this.head.liveNeighbors},set:function(n){this.head.liveNeighbors=n}}]),t}(f);n.exports={Cell:d,cellStream:function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new p(new d(n,e),(function(){return this.head.setLiving(),this}))}}},function(n,e,t){var r=t(14),i=(t(15),t(2).getCalendar);n.exports={init:function(n){document.getElementById("controls").innerHTML+=r;var e=document.getElementById("rate"),t=document.getElementById("forward"),o=document.getElementById("play"),a=document.getElementById("reset"),c=document.getElementById("clear"),u=document.getElementById("game-field"),l=document.getElementById("calendar-form"),s={interval:null,play:function(){this.interval=setInterval((function(){return n.advance()}),1e3/this.rate)},pause:function(){this.interval&&(clearInterval(this.interval),this.interval=null)},clear:function(){n=n.clear()},reset:function(){this.pause(),n=n.reset()},seed:function(e){e.length&&(n=n.seed(e),console.log(n))},forward:function(){n.advance()},rate:10,updateField:function(e,t){n=n.toggleCell(e,t)},updateRate:function(n){console.log("updating rate"),console.log(n),console.log(this.interval),s.rate=n,this.interval&&(clearInterval(this.interval),this.play())}};return e.addEventListener("change",(function(n){n.preventDefault(),s.updateRate(n.target.value)})),t.addEventListener("click",(function(n){n.preventDefault(),s.forward()})),o.addEventListener("click",(function(n){if(n.preventDefault(),s.interval)return s.pause(),t.disabled=!1;s.play(),t.disabled=!0})),a.addEventListener("click",(function(n){n.preventDefault(),s.reset()})),c.addEventListener("click",(function(n){n.preventDefault(),s.clear()})),u.addEventListener("click",(function(n){if(n.preventDefault(),!s.interval){var e=n.offsetX,t=n.offsetY;s.updateField(e,t)}})),l.addEventListener("submit",(function(n){n.preventDefault();var e=n.target[0].value;i(e).then((function(n){return n.map((function(n){return n.contributionDays.map((function(n){return n.contributionCount}))}))})).then((function(n){return s.seed(n)})).catch((function(n){l.elements[0].value="enter valid handle"}))})),s}}},function(n,e){n.exports='
'},function(n,e,t){var r=t(0),i=t(16);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[n.i,i,""]]);var o={insert:"head",singleton:!1};r(i,o);n.exports=i.locals||{}},function(n,e,t){(e=t(1)(!1)).push([n.i,'aside {\n background: red;\n justify-content: space-evenly;\n display: flex;\n flex-flow: column nowrap;\n position: float;\n top: 0;\n}\n\naside * {\n background: red;\n color: white;\n}\n\nh1 {\n font-size: 130%;\n padding: 1em;\n\n}\n\ndiv.playControls {\n min-width: 30vw;\n display: grid;\n border-radius: 1vh;\n border: solid white .5vh;\n grid-template-rows: 2fr 1fr;\n grid-template-columns: 1fr 1fr 1fr 1fr;\n gap: 1vh;\n grid-template-areas: "buttons buttons buttons buttons" "slider slider slider slider";\n padding: 1vh;\n}\n\nbutton {\n width: 100%;\n border-radius: .5vh;\n border: solid white .5vh;\n}\n\ninput[type="range"] {\n grid-area: slider;\n}\n',""]),n.exports=e}]); \ No newline at end of file +!function(n){var e={};function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var i in n)t.d(r,i,function(e){return n[e]}.bind(null,i));return r},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=3)}([function(n,e,t){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var n={};return function(e){if(void 0===n[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(n){t=null}n[e]=t}return n[e]}}(),a=[];function c(n){for(var e=-1,t=0;tn.length)&&(e=n.length);for(var t=0,r=new Array(e);tn.length)&&(e=n.length);for(var t=0,r=new Array(e);tn.length)&&(e=n.length);for(var t=0,r=new Array(e);t0&&(t.map["".concat(e,",").concat(r)]=d(!0,0))}))})),Object.entries(a).forEach((function(n){var e=l(n,2),r=e[0],i=l(e[1],2),o=i[0],a=i[1];return t.map[r]=d(o,a)}))},m=function(n){!function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&o(n,e)}(u,n);var e,t,r,c=a(u);function u(n,e){return f(this,u),c.call(this,n,e)}return e=u,(t=[{key:"addLiveNeighbor",value:function(n){void 0===this.map[n]&&(this.map[n]=d(!1)),this.map[n].addLiveNeighbor()}},{key:"map",get:function(){return this.head.map}}])&&i(e.prototype,t),r&&i(e,r),u}(h),y=function(n,e){var t=l(e,2),r=t[0],i=t[1];return n[r]=i,n},g=function(n){var e=l(n,2);e[0];return!0===e[1].living},w=function(n){var e=l(n,2),t=e[0],r=e[1];return[t,[r.living,r.liveNeighbors]]},x=function(n){var e=l(n,2),t=e[0],r=e[1];return r.setLiving(),[t,[r.living,0]]};n.exports={GameField:v,fieldStream:function n(e){var t=e.fieldArray,r=e.fieldMap;return new m(new v({fieldArray:t,fieldMap:r}),(function(){var e;Object.entries(this.map).filter(g).forEach((e=this,function(n){var t=l(n,1)[0];return b(t).forEach((function(n){return e.addLiveNeighbor(n)}))}));var t=Object.entries(this.map).map(w).reduce(y,{});return new m(new v({fieldMap:t}),(function(){var e=Object.entries(this.map).map(x).reduce(y,{});return n({fieldMap:e})}))}))}}},function(n,e,t){function r(n){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function i(n,e){return(i=Object.setPrototypeOf||function(n,e){return n.__proto__=e,n})(n,e)}function o(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,r=c(n);if(e){var i=c(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return a(this,t)}}function a(n,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(n):e}function c(n){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}function u(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function l(n,e){for(var t=0;t0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;u(this,n),this.living=e,this.liveNeighbors=t}return s(n,[{key:"toggleLiving",value:function(){this.living=!this.living}},{key:"addLiveNeighbor",value:function(){this.liveNeighbors++}},{key:"setLiving",value:function(){return this.living&&2!==this.liveNeighbors&&3!==this.liveNeighbors?(this.liveNeighbors=0,this.living=!1):3===this.liveNeighbors?(this.liveNeighbors=0,this.living=!0):void(this.liveNeighbors=0)}}]),n}(),p=function(n){!function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&i(n,e)}(t,n);var e=o(t);function t(n,r){return u(this,t),e.call(this,n,r)}return s(t,[{key:"addLiveNeighbor",value:function(){this.head.addLiveNeighbor()}},{key:"setLiving",value:function(){this.head.setLiving()}},{key:"toggleLiving",value:function(){this.head.toggleLiving()}},{key:"living",get:function(){return this.head.living}},{key:"liveNeighbors",get:function(){return this.head.liveNeighbors},set:function(n){this.head.liveNeighbors=n}}]),t}(f);n.exports={Cell:d,cellStream:function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new p(new d(n,e),(function(){return this.head.setLiving(),this}))}}},function(n,e,t){var r=t(14),i=(t(15),t(2).getCalendar);n.exports={init:function(n){document.getElementById("controls").innerHTML+=r;var e=document.getElementById("rate"),t=document.getElementById("forward"),o=document.getElementById("play"),a=document.getElementById("reset"),c=document.getElementById("clear"),u=document.getElementById("game-field"),l=document.getElementById("calendar-form"),s={interval:null,play:function(){this.interval=setInterval((function(){return n.advance()}),1e3/this.rate)},pause:function(){this.interval&&(clearInterval(this.interval),this.interval=null)},clear:function(){n=n.clear()},reset:function(){this.pause(),n=n.reset()},seed:function(e){e.length&&(n=n.seed(e),console.log(n))},forward:function(){n.advance()},rate:10,updateField:function(e,t){n=n.toggleCell(e,t)},updateRate:function(n){console.log("updating rate"),console.log(n),console.log(this.interval),s.rate=n,this.interval&&(clearInterval(this.interval),this.play())}};return e.addEventListener("change",(function(n){n.preventDefault(),s.updateRate(n.target.value)})),t.addEventListener("click",(function(n){n.preventDefault(),s.forward()})),o.addEventListener("click",(function(n){if(n.preventDefault(),s.interval)return s.pause(),t.disabled=!1;s.play(),t.disabled=!0})),a.addEventListener("click",(function(n){n.preventDefault(),s.reset()})),c.addEventListener("click",(function(n){n.preventDefault(),s.clear()})),u.addEventListener("click",(function(n){if(n.preventDefault(),!s.interval){var e=n.offsetX,t=n.offsetY;s.updateField(e,t)}})),l.addEventListener("submit",(function(n){n.preventDefault();var e=n.target[0].value;i(e).then((function(n){return n.map((function(n){return n.contributionDays.map((function(n){return n.contributionCount}))}))})).then((function(n){return s.seed(n)})).catch((function(n){l.elements[0].value="enter valid handle"}))})),s}}},function(n,e){n.exports='
'},function(n,e,t){var r=t(0),i=t(16);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[n.i,i,""]]);var o={insert:"head",singleton:!1};r(i,o);n.exports=i.locals||{}},function(n,e,t){(e=t(1)(!1)).push([n.i,'aside {\n background: red;\n justify-content: space-evenly;\n display: flex;\n flex-flow: column nowrap;\n position: float;\n top: 0;\n}\n\naside * {\n background: red;\n color: white;\n}\n\nh1 {\n font-size: 130%;\n padding: 1em;\n\n}\n\ndiv.playControls {\n min-width: 30vw;\n display: grid;\n border-radius: 1vh;\n border: solid white .5vh;\n grid-template-rows: 2fr 1fr;\n grid-template-columns: 1fr 1fr 1fr 1fr;\n gap: 1vh;\n grid-template-areas: "buttons buttons buttons buttons" "slider slider slider slider";\n padding: 1vh;\n}\n\nbutton {\n width: 100%;\n border-radius: .5vh;\n border: solid white .5vh;\n}\n\ninput[type="range"] {\n grid-area: slider;\n}\n',""]),n.exports=e}]); \ No newline at end of file