UNPKG

react-canvas-galaxy-octopus

Version:

Galaxy octopus which is a simple game by React Canvas heavily inspired from Flappy Bird.

2 lines 249 kB
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";var r=n(3)["default"],o=r(n(4)),i=r(n(2));o.render(o.createElement(i,null),document.getElementById("app"))},function(e,t,n){"use strict";var r=n(5)["default"],o=n(6)["default"],i=n(7)["default"],a=n(8)["default"],s=n(9)["default"],u=n(3)["default"],l=u(n(4)),c=u(n(10)),p=u(n(11)),d=u(n(13)),h=d.drawImage;d.drawImage=function(e,t,n,r,o,i,a){a=a||{},t.rotate?(e.save(),e.translate(n/2+o/2,r/2+i/2),e.rotate(t.rotate*Math.PI/180),e.drawImage(t.getRawImage(),-o/2,-i/2,o,i),e.restore()):h(e,t,n/2,r/2,o,i,a)};var f=function(e){function t(e){r(this,t),i(s.Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={setting:{reverseGravity:!0,pipeInterval:1600,noHit:!1}},l.initializeTouchEvents(!0)}return o(t,e),a(t,{onChangeSetting:{value:function(e){var t=this;this.setState({setting:e},function(){t.refs.canvas.reset()})}},render:{value:function(){return l.createElement("div",null,l.createElement(c,{ref:"canvas",setting:this.state.setting}),l.createElement(p,{setting:this.state.setting,onChangeSetting:this.onChangeSetting.bind(this)}))}}}),t}(l.Component);e.exports=f},function(e,t){"use strict";t["default"]=function(e){return e&&e.__esModule?e["default"]:e},t.__esModule=!0},function(e,t,n){e.exports=n(12)},function(e,t){"use strict";t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.__esModule=!0},function(e,t){"use strict";t["default"]=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},t.__esModule=!0},function(e,t,n){"use strict";var r=n(9)["default"];t["default"]=function(e,t,n){for(var o=!0;o;){o=!1;var i=e,a=t,s=n;u=c=l=void 0;var u=r.Object.getOwnPropertyDescriptor(i,a);{if(void 0!==u){if("value"in u&&u.writable)return u.value;var l=u.get;return void 0===l?void 0:l.call(s)}var c=r.Object.getPrototypeOf(i);if(null===c)return void 0;e=c,t=a,n=s,o=!0}}},t.__esModule=!0},function(e,t){"use strict";t["default"]=function(){function e(e,t){for(var n in t){var r=t[n];r.configurable=!0,r.value&&(r.writable=!0)}Object.defineProperties(e,t)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t.__esModule=!0},function(e){!function(t,n,r){"use strict";function o(e){return null!==e&&("object"==typeof e||"function"==typeof e)}function i(e){return"function"==typeof e}function a(e,t,n){e&&!_n(e=n?e:e[_t],Bn)&&Ln(e,Bn,t)}function s(e){return sn.call(e).slice(8,-1)}function u(e){var t,n;return e==r?e===r?"Undefined":"Null":"string"==typeof(n=(t=Rt(e))[Bn])?n:s(t)}function l(){for(var e=R(this),t=arguments.length,n=St(t),r=0,o=qn._,i=!1;t>r;)(n[r]=arguments[r++])===o&&(i=!0);return function(){var r,a=this,s=arguments.length,u=0,l=0;if(!i&&!s)return p(e,n,a);if(r=n.slice(),i)for(;t>u;u++)r[u]===o&&(r[u]=arguments[l++]);for(;s>l;)r.push(arguments[l++]);return p(e,r,a)}}function c(e,t,n){if(R(e),~n&&t===r)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}function p(e,t,n){var o=n===r;switch(0|t.length){case 0:return o?e():e.call(n);case 1:return o?e(t[0]):e.call(n,t[0]);case 2:return o?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return o?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return o?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3]);case 5:return o?e(t[0],t[1],t[2],t[3],t[4]):e.call(n,t[0],t[1],t[2],t[3],t[4])}return e.apply(n,t)}function d(e){return En(I(e))}function h(e){return e}function f(){return this}function m(e,t){return _n(e,t)?e[t]:void 0}function v(e){return S(e),gn?vn(e).concat(gn(e)):vn(e)}function g(e,t){for(var n,r=d(e),o=mn(r),i=o.length,a=0;i>a;)if(r[n=o[a++]]===t)return n}function y(e){return Pt(e).split(",")}function _(e){var t=1==e,n=2==e,o=3==e,i=4==e,a=6==e,s=5==e||a;return function(u){for(var l,p,d=Rt(I(this)),h=arguments[1],f=En(d),m=c(u,h,3),v=C(f.length),g=0,y=t?St(v):n?[]:r;v>g;g++)if((s||g in f)&&(l=f[g],p=m(l,g,d),e))if(t)y[g]=p;else if(p)switch(e){case 3:return!0;case 5:return l;case 6:return g;case 2:y.push(l)}else if(i)return!1;return a?-1:o||i?i:y}}function E(e){return function(t){var n=d(this),r=C(n.length),o=w(arguments[1],r);if(e&&t!=t){for(;r>o;o++)if(N(n[o]))return e||o}else for(;r>o;o++)if((e||o in n)&&n[o]===t)return e||o;return!e&&-1}}function b(e,t){return"function"==typeof e?e:t}function N(e){return e!=e}function D(e){return isNaN(e)?0:Sn(e)}function C(e){return e>0?In(D(e),Cn):0}function w(e,t){var e=D(e);return 0>e?Mn(e+t,0):In(e,t)}function x(e){return e>9?e:"0"+e}function O(e,t,n){var r=o(t)?function(e){return t[e]}:t;return function(t){return Pt(n?t:this).replace(e,r)}}function T(e){return function(t){var n,o,i=Pt(I(this)),a=D(t),s=i.length;return 0>a||a>=s?e?"":r:(n=i.charCodeAt(a),55296>n||n>56319||a+1===s||(o=i.charCodeAt(a+1))<56320||o>57343?e?i.charAt(a):n:e?i.slice(a,a+2):(n-55296<<10)+(o-56320)+65536)}}function M(e,t,n){if(!e)throw Bt(n?t+n:t)}function I(e){if(e==r)throw Bt("Function called on null or undefined");return e}function R(e){return M(i(e),e," is not a function!"),e}function S(e){return M(o(e),e," is not an object!"),e}function P(e,t,n){M(e instanceof t,n,": use the 'new' operator!")}function k(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function A(e,t,n){return e[t]=n,e}function L(e){return kn?function(t,n,r){return hn(t,n,k(e,r))}:A}function V(e){return mt+"("+e+")_"+(++An+Rn())[bt](36)}function U(e,t){return Ft&&Ft[e]||(t?Ft:Un)(mt+on+e)}function F(e,t){for(var n in t)Ln(e,n,t[n]);return e}function j(e){!kn||!n&&an(e)||hn(e,Hn,{configurable:!0,get:f})}function B(e,r,o){var a,s,u,l,p=e&Gn,d=p?t:e&Xn?t[r]:(t[r]||tn)[_t],h=p?zn:zn[r]||(zn[r]={});p&&(o=r);for(a in o)s=!(e&Kn)&&d&&a in d&&(!i(d[a])||an(d[a])),u=(s?d:o)[a],n||!p||i(d[a])?e&Zn&&s?l=c(u,t):e&$n&&!n&&d[a]==u?(l=function(e){return this instanceof u?new u(e):u(e)},l[_t]=u[_t]):l=e&Qn&&i(u)?c(un,u):u:l=o[a],n&&d&&!s&&(p?d[a]=u:delete d[a]&&Ln(d,a,u)),h[a]!=u&&Ln(h,a,l)}function H(e,t){Ln(e,nt,t),Ot in en&&Ln(e,Ot,t)}function W(e,t,n,r){e[_t]=cn(r||rr,{next:k(1,n)}),a(e,t+" Iterator")}function z(e,t,r,o){var i=e[_t],s=m(i,nt)||m(i,Ot)||o&&m(i,o)||r;if(n&&(H(i,s),s!==r)){var u=pn(s.call(new e));a(u,t+" Iterator",!0),_n(i,Ot)&&H(u,f)}return nr[t]=s,nr[t+" Iterator"]=f,s}function q(e,t,n,r,o,i){function a(e){return function(){return new n(this,e)}}W(n,t,r);var s=a(er+tr),u=a(tr);o==tr?u=z(e,t,u,"values"):s=z(e,t,s,"entries"),o&&B(Qn+Kn*or,t,{entries:s,keys:i?u:a(er),values:u})}function Y(e,t){return{value:t,done:!!e}}function K(e){var n=Rt(e),r=t[mt],o=(r&&r[xt]||Ot)in n;return o||nt in n||_n(nr,u(n))}function G(e){var n=t[mt],r=e[n&&n[xt]||Ot],o=r||e[nt]||nr[u(e)];return S(o.call(e))}function X(e,t,n){return n?p(e,t):e(t)}function Q(e){var t=!0,n={next:function(){throw 1},"return":function(){t=!1}};n[nt]=f;try{e(n)}catch(r){}return t}function Z(e){var t=e["return"];t!==r&&t.call(e)}function $(e,t){try{e(t)}catch(n){throw Z(t),n}}function J(e,t,n,r){$(function(e){for(var o,i=c(n,r,t?2:1);!(o=e.next()).done;)if(X(i,o.value,t)===!1)return Z(e)},G(e))}var et,tt,nt,rt,ot="Object",it="Function",at="Array",st="String",ut="Number",lt="RegExp",ct="Date",pt="Map",dt="Set",ht="WeakMap",ft="WeakSet",mt="Symbol",vt="Promise",gt="Math",yt="Arguments",_t="prototype",Et="constructor",bt="toString",Nt=bt+"Tag",Dt="toLocaleString",Ct="hasOwnProperty",wt="forEach",xt="iterator",Ot="@@"+xt,Tt="process",Mt="createElement",It=t[it],Rt=t[ot],St=t[at],Pt=t[st],kt=t[ut],At=(t[lt],t[ct],t[pt]),Lt=t[dt],Vt=t[ht],Ut=t[ft],Ft=t[mt],jt=t[gt],Bt=t.TypeError,Ht=t.RangeError,Wt=t.setTimeout,zt=t.setImmediate,qt=t.clearImmediate,Yt=t.parseInt,Kt=t.isFinite,Gt=t[Tt],Xt=Gt&&Gt.nextTick,Qt=t.document,Zt=Qt&&Qt.documentElement,$t=(t.navigator,t.define),Jt=t.console||{},en=St[_t],tn=Rt[_t],nn=It[_t],rn=1/0,on=".",an=c(/./.test,/\[native code\]\s*\}\s*$/,1),sn=tn[bt],un=nn.call,ln=nn.apply,cn=Rt.create,pn=Rt.getPrototypeOf,dn=Rt.setPrototypeOf,hn=Rt.defineProperty,fn=(Rt.defineProperties,Rt.getOwnPropertyDescriptor),mn=Rt.keys,vn=Rt.getOwnPropertyNames,gn=Rt.getOwnPropertySymbols,yn=Rt.isFrozen,_n=c(un,tn[Ct],2),En=Rt,bn=Rt.assign||function(e){for(var t=Rt(I(e)),n=arguments.length,r=1;n>r;)for(var o,i=En(arguments[r++]),a=mn(i),s=a.length,u=0;s>u;)t[o=a[u++]]=i[o];return t},Nn=en.push,Dn=(en.unshift,en.slice,en.splice,en.indexOf,en[wt]),Cn=9007199254740991,wn=jt.pow,xn=jt.abs,On=jt.ceil,Tn=jt.floor,Mn=jt.max,In=jt.min,Rn=jt.random,Sn=jt.trunc||function(e){return(e>0?Tn:On)(e)},Pn="Reduce of empty object with no initial value",kn=!!function(){try{return 2==hn({},"a",{get:function(){return 2}}).a}catch(e){}}(),An=0,Ln=L(1),Vn=Ft?A:Ln,Un=Ft||V,Fn=U("unscopables"),jn=en[Fn]||{},Bn=U(Nt),Hn=U("species"),Wn=s(Gt)==Tt,zn={},qn=n?t:zn,Yn=t.core,Kn=1,Gn=2,Xn=4,Qn=8,Zn=16,$n=32;"undefined"!=typeof e&&e.exports?e.exports=zn:i($t)&&$t.amd?$t(function(){return zn}):rt=!0,(rt||n)&&(zn.noConflict=function(){return t.core=Yn,zn},t.core=zn),nt=U(xt);var Jn=Un("iter"),er=1,tr=2,nr={},rr={},or="keys"in en&&!("next"in[].keys());H(rr,f),!function(e,n,r,o){an(Ft)||(Ft=function(t){M(!(this instanceof Ft),mt+" is not a "+Et);var n=V(t),i=Vn(cn(Ft[_t]),e,n);return r[n]=i,kn&&o&&hn(tn,n,{configurable:!0,set:function(e){Ln(this,n,e)}}),i},Ln(Ft[_t],bt,function(){return this[e]})),B(Gn+$n,{Symbol:Ft});var i={"for":function(e){return _n(n,e+="")?n[e]:n[e]=Ft(e)},iterator:nt||U(xt),keyFor:l.call(g,n),species:Hn,toStringTag:Bn=U(Nt,!0),unscopables:Fn,pure:Un,set:Vn,useSetter:function(){o=!0},useSimple:function(){o=!1}};Dn.call(y("hasInstance,isConcatSpreadable,match,replace,search,split,toPrimitive"),function(e){i[e]=U(e)}),B(Xn,mt,i),a(Ft,mt),B(Xn+Kn*!an(Ft),ot,{getOwnPropertyNames:function(e){for(var t,n=vn(d(e)),o=[],i=0;n.length>i;)_n(r,t=n[i++])||o.push(t);return o},getOwnPropertySymbols:function(e){for(var t,n=vn(d(e)),o=[],i=0;n.length>i;)_n(r,t=n[i++])&&o.push(r[t]);return o}}),a(jt,gt,!0),a(t.JSON,"JSON",!0)}(Un("tag"),{},{},!0),!function(){var e={assign:bn,is:function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}};"__proto__"in tn&&function(t,n){try{n=c(un,fn(tn,"__proto__").set,2),n({},en)}catch(r){t=!0}e.setPrototypeOf=dn=dn||function(e,r){return S(e),M(null===r||o(r),r,": can't set as prototype!"),t?e.__proto__=r:n(e,r),e}}(),B(Xn,ot,e)}(),!function(){function e(e,t){var n=Rt[e],r=zn[ot][e],i=0,a={};if(!r||an(r)){a[e]=1==t?function(e){return o(e)?n(e):e}:2==t?function(e){return o(e)?n(e):!0}:3==t?function(e){return o(e)?n(e):!1}:4==t?function(e,t){return n(d(e),t)}:function(e){return n(d(e))};try{n(on)}catch(s){i=1}B(Xn+Kn*i,ot,a)}}e("freeze",1),e("seal",1),e("preventExtensions",1),e("isFrozen",2),e("isSealed",2),e("isExtensible",3),e("getOwnPropertyDescriptor",4),e("getPrototypeOf"),e("keys"),e("getOwnPropertyNames")}(),!function(e){B(Xn,ut,{EPSILON:wn(2,-52),isFinite:function(e){return"number"==typeof e&&Kt(e)},isInteger:e,isNaN:N,isSafeInteger:function(t){return e(t)&&xn(t)<=Cn},MAX_SAFE_INTEGER:Cn,MIN_SAFE_INTEGER:-Cn,parseFloat:parseFloat,parseInt:Yt})}(kt.isInteger||function(e){return!o(e)&&Kt(e)&&Tn(e)===e}),!function(){function e(t){return Kt(t=+t)&&0!=t?0>t?-e(-t):o(t+i(t*t+1)):t}function t(e){return 0==(e=+e)?e:e>-1e-6&&1e-6>e?e+e*e/2:r(e)-1}var n=jt.E,r=jt.exp,o=jt.log,i=jt.sqrt,a=jt.sign||function(e){return 0==(e=+e)||e!=e?e:0>e?-1:1};B(Xn,gt,{acosh:function(e){return(e=+e)<1?0/0:Kt(e)?o(e/n+i(e+1)*i(e-1)/n)+1:e},asinh:e,atanh:function(e){return 0==(e=+e)?e:o((1+e)/(1-e))/2},cbrt:function(e){return a(e=+e)*wn(xn(e),1/3)},clz32:function(e){return(e>>>=0)?32-e[bt](2).length:32},cosh:function(e){return(r(e=+e)+r(-e))/2},expm1:t,fround:function(e){return new Float32Array([e])[0]},hypot:function(){for(var e,t=0,n=arguments.length,r=n,o=St(n),a=-rn;n--;){if(e=o[n]=+arguments[n],e==rn||e==-rn)return rn;e>a&&(a=e)}for(a=e||1;r--;)t+=wn(o[r]/a,2);return a*i(t)},imul:function(e,t){var n=65535,r=+e,o=+t,i=n&r,a=n&o;return 0|i*a+((n&r>>>16)*a+i*(n&o>>>16)<<16>>>0)},log1p:function(e){return(e=+e)>-1e-8&&1e-8>e?e-e*e/2:o(1+e)},log10:function(e){return o(e)/jt.LN10},log2:function(e){return o(e)/jt.LN2},sign:a,sinh:function(e){return xn(e=+e)<1?(t(e)-t(-e))/2:(r(e-1)-r(-e-1))*(n/2)},tanh:function(e){var n=t(e=+e),o=t(-e);return n==rn?1:o==rn?-1:(n-o)/(r(e)+r(-e))},trunc:Sn})}(),!function(e){function t(e){if(s(e)==lt)throw Bt()}B(Xn,st,{fromCodePoint:function(){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],w(t,1114111)!==t)throw Ht(t+" is not a valid code point");n.push(65536>t?e(t):e(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")},raw:function(e){for(var t=d(e.raw),n=C(t.length),r=arguments.length,o=[],i=0;n>i;)o.push(Pt(t[i++])),r>i&&o.push(Pt(arguments[i]));return o.join("")}}),B(Qn,st,{codePointAt:T(!1),endsWith:function(e){t(e);var n=Pt(I(this)),o=arguments[1],i=C(n.length),a=o===r?i:In(C(o),i);return e+="",n.slice(a-e.length,a)===e},includes:function(e){return t(e),!!~Pt(I(this)).indexOf(e,arguments[1])},repeat:function(e){var t=Pt(I(this)),n="",r=D(e);if(0>r||r==rn)throw Ht("Count can't be negative");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},startsWith:function(e){t(e);var n=Pt(I(this)),r=C(In(arguments[1],n.length));return e+="",n.slice(r,r+e.length)===e}})}(Pt.fromCharCode),!function(){B(Xn+Kn*Q(St.from),at,{from:function(e){var t,n,o,i=Rt(I(e)),a=arguments[1],s=a!==r,u=s?c(a,arguments[2],2):r,l=0;if(K(i))n=new(b(this,St)),$(function(e){for(;!(o=e.next()).done;l++)n[l]=s?u(o.value,l):o.value},G(i));else for(n=new(b(this,St))(t=C(i.length));t>l;l++)n[l]=s?u(i[l],l):i[l];return n.length=l,n}}),B(Xn,at,{of:function(){for(var e=0,t=arguments.length,n=new(b(this,St))(t);t>e;)n[e]=arguments[e++];return n.length=t,n}}),j(St)}(),!function(){B(Qn,at,{copyWithin:function(e,t){var n=Rt(I(this)),o=C(n.length),i=w(e,o),a=w(t,o),s=arguments[2],u=s===r?o:w(s,o),l=In(u-a,o-i),c=1;for(i>a&&a+l>i&&(c=-1,a=a+l-1,i=i+l-1);l-->0;)a in n?n[i]=n[a]:delete n[i],i+=c,a+=c;return n},fill:function(e){for(var t=Rt(I(this)),n=C(t.length),o=w(arguments[1],n),i=arguments[2],a=i===r?n:w(i,n);a>o;)t[o++]=e;return t},find:_(5),findIndex:_(6)}),n&&(Dn.call(y("find,findIndex,fill,copyWithin,entries,keys,values"),function(e){jn[e]=!0}),Fn in en||Ln(en,Fn,jn))}(),!function(e){q(St,at,function(e,t){Vn(this,Jn,{o:d(e),i:0,k:t})},function(){var e=this[Jn],t=e.o,n=e.k,o=e.i++;return!t||o>=t.length?(e.o=r,Y(1)):n==er?Y(0,o):n==tr?Y(0,t[o]):Y(0,[o,t[o]])},tr),nr[yt]=nr[at],q(Pt,st,function(e){Vn(this,Jn,{o:Pt(e),i:0})},function(){var t,n=this[Jn],r=n.o,o=n.i;return o>=r.length?Y(1):(t=e.call(r,o),n.i+=t.length,Y(0,t))})}(T(!0)),i(zt)&&i(qt)||function(e){function n(e){if(_n(m,e)){var t=m[e];delete m[e],t()}}function r(e){n(e.data)}var o,a,s,u=t.postMessage,d=t.addEventListener,h=t.MessageChannel,f=0,m={};zt=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++f]=function(){p(i(e)?e:It(e),t)},o(f),f},qt=function(e){delete m[e]},Wn?o=function(e){Xt(l.call(n,e))}:d&&i(u)&&!t.importScripts?(o=function(e){u(e,"*")},d("message",r,!1)):i(h)?(a=new h,s=a.port2,a.port1.onmessage=r,o=c(s.postMessage,s,1)):o=Qt&&e in Qt[Mt]("script")?function(t){Zt.appendChild(Qt[Mt]("script"))[e]=function(){Zt.removeChild(this),n(t)}}:function(e){Wt(n,0,e)}}("onreadystatechange"),B(Gn+Zn,{setImmediate:zt,clearImmediate:qt}),!function(e,t){i(e)&&i(e.resolve)&&e.resolve(t=new e(function(){}))==t||function(t,n){function a(e){var t;return o(e)&&(t=e.then),i(t)?t:!1}function s(e){var t,r=e[n],o=r.c,i=0;if(r.h)return!0;for(;o.length>i;)if(t=o[i++],t.fail||s(t.P))return!0}function u(e,n){var r=e.c;(n||r.length)&&t(function(){var t=e.p,o=e.v,u=1==e.s,l=0;if(n&&!s(t))Wt(function(){s(t)||(Wn?!Gt.emit("unhandledRejection",o,t):i(Jt.error)&&Jt.error("Unhandled promise rejection",o))},1e3);else for(;r.length>l;)!function(t){var n,r,i=u?t.ok:t.fail;try{i?(u||(e.h=!0),n=i===!0?o:i(o),n===t.P?t.rej(Bt(vt+"-chain cycle")):(r=a(n))?r.call(n,t.res,t.rej):t.res(n)):t.rej(o)}catch(s){t.rej(s)}}(r[l++]);r.length=0})}function l(e){var t,n,r=this;if(!r.d){r.d=!0,r=r.r||r;try{(t=a(e))?(n={r:r,d:!1},t.call(e,c(l,n,1),c(p,n,1))):(r.v=e,r.s=1,u(r))}catch(o){p.call(n||{r:r,d:!1},o)}}}function p(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,u(t,!0))}function d(e){var t=S(e)[Hn];return t!=r?t:e}e=function(t){R(t),P(this,e,vt);var o={p:this,c:[],s:0,d:!1,v:r,h:!1};Ln(this,n,o);try{t(c(l,o,1),c(p,o,1))}catch(i){p.call(o,i)}},F(e[_t],{then:function(t,o){var a=S(S(this)[Et])[Hn],s={ok:i(t)?t:!0,fail:i(o)?o:!1},l=s.P=new(a!=r?a:e)(function(e,t){s.res=R(e),s.rej=R(t)}),c=this[n];return c.c.push(s),c.s&&u(c),l},"catch":function(e){return this.then(r,e)}}),F(e,{all:function(e){var t=d(this),n=[];return new t(function(r,o){J(e,!1,Nn,n);var i=n.length,a=St(i);i?Dn.call(n,function(e,n){t.resolve(e).then(function(e){a[n]=e,--i||r(a)},o)}):r(a)})},race:function(e){var t=d(this);return new t(function(n,r){J(e,!1,function(e){t.resolve(e).then(n,r)})})},reject:function(e){return new(d(this))(function(t,n){n(e)})},resolve:function(e){return o(e)&&n in e&&pn(e)===this[_t]?e:new(d(this))(function(t){t(e)})}})}(Xt||zt,Un("record")),a(e,vt),j(e),B(Gn+Kn*!an(e),{Promise:e})}(t[vt]),!function(){function e(e,t,o,i,s,u){function l(e,t){return t!=r&&J(t,s,e[h],e),e}function c(e,t){var r=f[e];n&&(f[e]=function(e,n){var o=r.call(this,0===e?0:e,n);return t?this:o})}var h=s?"set":"add",f=e&&e[_t],y={};if(an(e)&&(u||!or&&_n(f,wt)&&_n(f,"entries"))){var E,b=e,N=new e,D=N[h](u?{}:-0,1);Q(function(t){new e(t)})&&(e=function(n){return P(this,e,t),l(new b,n)},e[_t]=f,n&&(f[Et]=e)),u||N[wt](function(e,t){E=1/t===-rn}),E&&(c("delete"),c("has"),s&&c("get")),(E||D!==N)&&c(h,!0)}else e=u?function(n){P(this,e,t),Vn(this,p,_++),l(this,n)}:function(n){var o=this;P(o,e,t),Vn(o,d,cn(null)),Vn(o,g,0),Vn(o,m,r),Vn(o,v,r),l(o,n)},F(F(e[_t],o),i),u||!kn||hn(e[_t],"size",{get:function(){return I(this[g])}});return a(e,t),j(e),y[t]=e,B(Gn+$n+Kn*!an(e),y),u||q(e,t,function(e,t){Vn(this,Jn,{o:e,k:t})},function(){for(var e=this[Jn],t=e.k,n=e.l;n&&n.r;)n=n.p;return e.o&&(e.l=n=n?n.n:e.o[v])?t==er?Y(0,n.k):t==tr?Y(0,n.v):Y(0,[n.k,n.v]):(e.o=r,Y(1))},s?er+tr:tr,!s),e}function t(e,t){if(!o(e))return("string"==typeof e?"S":"P")+e;if(yn(e))return"F";if(!_n(e,p)){if(!t)return"E";Ln(e,p,++_)}return"O"+e[p]}function i(e,n){var r,o=t(n);if("F"!=o)return e[d][o];for(r=e[v];r;r=r.n)if(r.k==n)return r}function s(e,n,o){var a,s,u=i(e,n);return u?u.v=o:(e[m]=u={i:s=t(n,!0),k:n,v:o,p:a=e[m],n:r,r:!1},e[v]||(e[v]=u),a&&(a.n=u),e[g]++,"F"!=s&&(e[d][s]=u)),e}function u(e,t,n){return yn(S(t))?l(e).set(t,n):(_n(t,h)||Ln(t,h,{}),t[h][e[p]]=n),e}function l(e){return e[f]||Ln(e,f,new At)[f]}var p=Un("uid"),d=Un("O1"),h=Un("weak"),f=Un("leak"),m=Un("last"),v=Un("first"),g=kn?Un("size"):"size",_=0,E={},b={clear:function(){for(var e=this,t=e[d],n=e[v];n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=r),delete t[n.i];e[v]=e[m]=r,e[g]=0},"delete":function(e){var t=this,n=i(t,e);if(n){var r=n.n,o=n.p;delete t[d][n.i],n.r=!0,o&&(o.n=r),r&&(r.p=o),t[v]==n&&(t[v]=r),t[m]==n&&(t[m]=o),t[g]--}return!!n},forEach:function(e){for(var t,n=c(e,arguments[1],3);t=t?t.n:this[v];)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!i(this,e)}};At=e(At,pt,{get:function(e){var t=i(this,e);return t&&t.v},set:function(e,t){return s(this,0===e?0:e,t)}},b,!0),Lt=e(Lt,dt,{add:function(e){return s(this,e=0===e?0:e,e)}},b);var N={"delete":function(e){return o(e)?yn(e)?l(this)["delete"](e):_n(e,h)&&_n(e[h],this[p])&&delete e[h][this[p]]:!1},has:function(e){return o(e)?yn(e)?l(this).has(e):_n(e,h)&&_n(e[h],this[p]):!1}};Vt=e(Vt,ht,{get:function(e){if(o(e)){if(yn(e))return l(this).get(e);if(_n(e,h))return e[h][this[p]]}},set:function(e,t){return u(this,e,t)}},N,!0,!0),n&&7!=(new Vt).set(Rt.freeze(E),7).get(E)&&Dn.call(y("delete,has,get,set"),function(e){var t=Vt[_t][e];Vt[_t][e]=function(n,r){if(o(n)&&yn(n)){var i=l(this)[e](n,r);return"set"==e?this:i}return t.call(this,n,r)}}),Ut=e(Ut,ft,{add:function(e){return u(this,e,!0)}},N,!1,!0)}(),!function(){function e(e){var t,n=[];for(t in e)n.push(t);Vn(this,Jn,{o:e,a:n,i:0})}function t(e){return function(t){S(t);try{return e.apply(r,arguments),!0}catch(n){return!1}}}function n(e,t){var i,a=arguments.length<3?e:arguments[2],s=fn(S(e),t);return s?_n(s,"value")?s.value:s.get===r?r:s.get.call(a):o(i=pn(e))?n(i,t,a):r}function i(e,t,n){var a,s,u=arguments.length<4?e:arguments[3],l=fn(S(e),t);if(!l){if(o(s=pn(e)))return i(s,t,n,u);l=k(0)}return _n(l,"value")?l.writable!==!1&&o(u)?(a=fn(u,t)||k(0),a.value=n,hn(u,t,a),!0):!1:l.set===r?!1:(l.set.call(u,n),!0)}W(e,ot,function(){var e,t=this[Jn],n=t.a;do if(t.i>=n.length)return Y(1);while(!((e=n[t.i++])in t.o));return Y(0,e)});var a=Rt.isExtensible||h,s={apply:c(un,ln,3),construct:function(e,t){var n=R(arguments.length<3?e:arguments[2])[_t],r=cn(o(n)?n:tn),i=ln.call(e,r,t);return o(i)?i:r},defineProperty:t(hn),deleteProperty:function(e,t){var n=fn(S(e),t);return n&&!n.configurable?!1:delete e[t]},enumerate:function(t){return new e(S(t))},get:n,getOwnPropertyDescriptor:function(e,t){return fn(S(e),t)},getPrototypeOf:function(e){return pn(S(e))},has:function(e,t){return t in e},isExtensible:function(e){return!!a(S(e))},ownKeys:v,preventExtensions:t(Rt.preventExtensions||h),set:i};dn&&(s.setPrototypeOf=function(e,t){return dn(S(e),t),!0}),B(Gn,{Reflect:{}}),B(Xn,"Reflect",s)}(),!function(){function e(e){return function(t){var n,r=d(t),o=mn(t),i=o.length,a=0,s=St(i);if(e)for(;i>a;)s[a]=[n=o[a++],r[n]];else for(;i>a;)s[a]=r[o[a++]];return s}}B(Qn,at,{includes:E(!0)}),B(Qn,st,{at:T(!0)}),B(Xn,ot,{getOwnPropertyDescriptors:function(e){var t=d(e),n={};return Dn.call(v(t),function(e){hn(n,e,k(0,fn(t,e)))}),n},values:e(!1),entries:e(!0)}),B(Xn,lt,{escape:O(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",!0)})}(),!function(e){function t(e){if(e){var t=e[_t];Ln(t,et,t.get),Ln(t,n,t.set),Ln(t,r,t["delete"])}}et=U(e+"Get",!0);var n=U(e+dt,!0),r=U(e+"Delete",!0);B(Xn,mt,{referenceGet:et,referenceSet:n,referenceDelete:r}),Ln(nn,et,f),t(At),t(Vt)}("reference"),!function(e){function t(e,t){Vn(this,Jn,{o:d(e),a:mn(e),i:0,k:t})}function n(e){return function(n){return new t(n,e)}}function i(e){var t=1==e,n=4==e;return function(o,i,a){var s,u,l,p=c(i,a,3),h=d(o),f=t||7==e||2==e?new(b(this,tt)):r;for(s in h)if(_n(h,s)&&(u=h[s],l=p(u,s,o),e))if(t)f[s]=l;else if(l)switch(e){case 2:f[s]=u;break;case 3:return!0;case 5:return u;case 6:return s;case 7:f[l[0]]=l[1]}else if(n)return!1;return 3==e||n?n:f}}function a(e){return function(t,n,o){R(n);var i,a,s,u=d(t),l=mn(u),c=l.length,p=0;for(e?i=o==r?new(b(this,tt)):Rt(o):arguments.length<3?(M(c,Pn),i=u[l[p++]]):i=Rt(o);c>p;)if(_n(u,a=l[p++]))if(s=n(i,u[a],a,t),e){if(s===!1)break}else i=s;return i}}function s(e,t){return(t==t?g(e,t):u(e,N))!==r}tt=function(e){var t=cn(null);return e!=r&&(K(e)?J(e,!0,function(e,n){t[e]=n}):bn(t,e)),t},tt[_t]=null,W(t,e,function(){var e,t=this[Jn],n=t.o,o=t.a,i=t.k;do if(t.i>=o.length)return t.o=r,Y(1);while(!_n(n,e=o[t.i++]));return i==er?Y(0,e):i==tr?Y(0,n[e]):Y(0,[e,n[e]])});var u=i(6),l={keys:n(er),values:n(tr),entries:n(er+tr),forEach:i(0),map:i(1),filter:i(2),some:i(3),every:i(4),find:i(5),findKey:u,mapPairs:i(7),reduce:a(!1),turn:a(!0),keyOf:g,includes:s,has:_n,get:m,set:L(0),isDict:function(e){return o(e)&&pn(e)===tt[_t]}};if(et)for(var h in l)!function(e){function t(){for(var t=[this],n=0;n<arguments.length;)t.push(arguments[n++]);return p(e,t)}e[et]=function(){return t}}(l[h]);B(Gn+Kn,{Dict:F(tt,l)})}("Dict"),!function(e,t){function n(t,r){return this instanceof n?(this[Jn]=G(t),void(this[e]=!!r)):new n(t,r)}function o(n){function r(n,r,o){this[Jn]=G(n),this[e]=n[e],this[t]=c(r,o,n[e]?2:1)}return W(r,"Chain",n,i),H(r[_t],f),r}W(n,"Wrapper",function(){return this[Jn].next()});var i=n[_t];H(i,function(){return this[Jn]});var a=o(function(){var n=this[Jn].next();return n.done?n:Y(0,X(this[t],n.value,this[e]))}),s=o(function(){for(;;){var n=this[Jn].next();if(n.done||X(this[t],n.value,this[e]))return n}});F(i,{of:function(t,n){J(this,this[e],t,n)},array:function(e,t){var n=[];return J(e!=r?this.map(e,t):this,!1,Nn,n),n},filter:function(e,t){return new s(this,e,t)},map:function(e,t){return new a(this,e,t)}}),n.isIterable=K,n.getIterator=G,B(Gn+Kn,{$for:n})}("entries",Un("fn")),B(Gn+Kn,{delay:function(e){return new Promise(function(t){Wt(t,e,!0)})}}),!function(e,t){function n(n){var o=this,i={};return Ln(o,e,function(e){return e!==r&&e in o?_n(i,e)?i[e]:i[e]=c(o[e],o,-1):t.call(o)})[e](n)}zn._=qn._=qn._||{},B(Qn+Kn,it,{part:l,only:function(e,t){var n=R(this),r=C(e),o=arguments.length>1;return function(){for(var e=In(r,arguments.length),i=St(e),a=0;e>a;)i[a]=arguments[a++];return p(n,i,o?t:this)}}}),Ln(qn._,bt,function(){return e}),Ln(tn,e,n),kn||Ln(en,e,n)}(kn?V("tie"):Dt,tn[Dt]),!function(){function e(e,t){for(var n,r=v(d(t)),o=r.length,i=0;o>i;)hn(e,n=r[i++],fn(t,n));return e}B(Xn+Kn,ot,{isObject:o,classof:u,define:e,make:function(t,n){return e(cn(t),n)}})}(),B(Qn+Kn,at,{turn:function(e,t){R(e);for(var n=t==r?[]:Rt(t),o=En(this),i=C(o.length),a=0;i>a&&e(n,o[a],a++,this)!==!1;);return n}}),n&&(jn.turn=!0),!function(e){function t(e){Vn(this,Jn,{l:C(e),i:0})}W(t,ut,function(){var e=this[Jn],t=e.i++;return t<e.l?Y(0,t):Y(1)}),z(kt,ut,function(){return new t(this)}),e.random=function(e){var t=+this,n=e==r?0:+e,o=In(t,n);return Rn()*(Mn(t,n)-o)+o},Dn.call(y("round,floor,ceil,abs,sin,asin,cos,acos,tan,atan,exp,sqrt,max,min,pow,atan2,acosh,asinh,atanh,cbrt,clz32,cosh,expm1,hypot,imul,log1p,log10,log2,sign,sinh,tanh,trunc"),function(t){var n=jt[t];n&&(e[t]=function(){for(var e=[+this],t=0;arguments.length>t;)e.push(arguments[t++]);return p(n,e)})}),B(Qn+Kn,ut,e)}({}),!function(){var e,t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"},n={};for(e in t)n[t[e]]=e;B(Qn+Kn,st,{escapeHTML:O(/[&<>"']/g,t),unescapeHTML:O(/&(?:amp|lt|gt|quot|apos);/g,n)})}(),!function(e,t,n,r,o,i,a,s,u){function l(t){return function(l,c){function p(e){return d[t+e]()}var d=this,h=n[_n(n,c)?c:r];return Pt(l).replace(e,function(e){switch(e){case"s":return p(o);case"ss":return x(p(o));case"m":return p(i);case"mm":return x(p(i));case"h":return p(a);case"hh":return x(p(a));case"D":return p(ct);case"DD":return x(p(ct));case"W":return h[0][p("Day")];case"N":return p(s)+1;case"NN":return x(p(s)+1);case"M":return h[2][p(s)];case"MM":return h[1][p(s)];case"Y":return p(u);case"YY":return x(p(u)%100)}return e})}}function c(e,r){function o(e){var n=[];return Dn.call(y(r.months),function(r){n.push(r.replace(t,"$"+e))}),n}return n[e]=[y(r.weekdays),o(1),o(2)],zn}B(Qn+Kn,ct,{format:l("get"),formatUTC:l("getUTC")}),c(r,{weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",months:"January,February,March,April,May,June,July,August,September,October,November,December"}),c("ru",{weekdays:"Воскресенье,Понедельник,Вторник,Среда,Четверг,Пятница,Суббота",months:"Январ:я|ь,Феврал:я|ь,Март:а|,Апрел:я|ь,Ма:я|й,Июн:я|ь,Июл:я|ь,Август:а|,Сентябр:я|ь,Октябр:я|ь,Ноябр:я|ь,Декабр:я|ь"}),zn.locale=function(e){return _n(n,e)?r=e:r},zn.addLocale=c}(/\b\w\w?\b/g,/:(.*)\|(.*)$/,{},"en","Seconds","Minutes","Hours","Month","FullYear"),B(Gn+Kn,{global:t}),!function(e){function t(t,n){Dn.call(y(t),function(t){t in en&&(e[t]=c(un,en[t],n))})}t("pop,reverse,shift,keys,values,entries",1),t("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),t("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill,turn"),B(Xn,at,e)}({}),!function(e){!n||!e||nt in e[_t]||Ln(e[_t],nt,nr[at]),nr.NodeList=nr[at]}(t.NodeList),!function(e,t){Dn.call(y("assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,isIndependentlyComposed,log,markTimeline,profile,profileEnd,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn"),function(n){e[n]=function(){return t&&n in Jt?ln.call(Jt[n],Jt,arguments):void 0}}),B(Gn+Kn,{log:bn(e.log,e,{enable:function(){t=!0},disable:function(){t=!1}})})}({},!0)}("undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),!1),e.exports={"default":e.exports,__esModule:!0}},function(e,t,n){"use strict";var r=n(5)["default"],o=n(6)["default"],i=n(7)["default"],a=n(8)["default"],s=n(9)["default"],u=n(3)["default"],l=u(n(4)),c=u(n(18)),p=u(n(14)),d=u(n(15)),h=u(n(16)),f=u(n(17)),m=c.Surface,v=c.Group,g=c.Image,y=function(e){function t(e){var n=this;r(this,t),i(s.Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={phase:"INTRO",pipes:[],count:0},this._loop=new p(this.watchPos.bind(this)),document.body.addEventListener("keydown",function(e){var t=window.Event?e.which:e.keyCode;32===t&&n.onClickCanvas(e)})}return o(t,e),a(t,{watchPos:{value:function(){if("RUNNING"===this.state.phase){var e=this.detectCollision();return!e||this.props.setting.noHit?!0:("HIT"===e.state?this._fail():"SUCCESS"===e.state&&this._incrementCount(),!0)}}},detectCollision:{value:function(){var e=this.props.setting.reverseGravity,t=this.props.canvasHeight,n=this.refs.octopus.getPos(),r=10;if(e?n.t<r:n.t+n.h>t-r)return{state:"HIT"};var o=this.state.count+1,i=this.refs[o];if(i){var a=this.refs[o].getGapPos();if(n.l+n.w>=a.l&&n.l<=a.l+a.w){if(n.t<a.t||n.t+n.h>a.t+a.h)return{state:"HIT"}}else if(n.l>=a.l+a.w)return{state:"SUCCESS"}}}},onClickCanvas:{value:function(e){var t=this;switch(e.stopPropagation(),e.preventDefault(),this.state.phase){case"INTRO":this.setState({phase:"RUNNING",count:0,pipes:[]},function(){t.refs.octopus.clear().then(function(){t._loop.start(),t._pipeTimer=setInterval(t._createPipe.bind(t),t.props.setting.pipeInterval),t.refs.octopus.jump()})});break;case"RUNNING":this.refs.octopus.jump();break;case"ENDING":}}},_createPipe:{value:function(){var e=this.state.pipes,t=Math.floor(Math.random()*(this.props.canvasHeight-250))+50,n=this.props.canvasHeight-(t+this.props.gapHeight),r=e[e.length-1],o=r&&r.id||0;e.length>1&&e.splice(0,1),this.setState({pipes:e.concat({id:o+1,topHeight:t,bottomHeight:n,gapHeight:this.props.gapHeight,pipeInterval:this.props.setting.pipeInterval,canvasWidth:this.props.canvasWidth})})}},_fail:{value:function(){var e=this;this._loop.end(),clearInterval(this._pipeTimer),this.state.pipes.map(function(t){e.refs[t.id].stop()}),this.setState({phase:"ENDING"},function(){e.refs.octopus.fall().then(function(){return e.setState({phase:"INTRO"})})})}},_incrementCount:{value:function(){this.setState({count:this.state.count+1})}},reset:{value:function(){this._fail()}},getGroupStyle:{value:function(){return{position:"absolute",left:0,top:0,width:this.props.canvasWidth,height:2*this.props.canvasHeight}}},getBgImageStyle:{value:function(){return{position:"absolute",left:0,top:0,right:0,bottom:0,width:this.props.canvasWidth,height:this.props.canvasHeight}}},render:{value:function(){return l.createElement(m,{ref:"surface",top:0,left:0,width:this.props.canvasWidth,height:this.props.canvasHeight,enableCSSLayout:!0},l.createElement(g,{src:"../img/background.png",style:this.getBgImageStyle(),fadeIn:!0}),l.createElement(v,{style:this.getGroupStyle(),onClick:this.onClickCanvas.bind(this),onTouchStart:this.onClickCanvas.bind(this)},l.createElement(d,{ref:"counter",count:this.state.count}),l.createElement(h,{ref:"octopus",reverse:this.props.setting.reverseGravity,canvasHeight:this.props.canvasHeight}),this.state.pipes.map(function(e){return l.createElement(f,{ref:e.id,key:e.id,topHeight:e.topHeight,bottomHeight:e.bottomHeight,pipeInterval:e.pipeInterval,canvasWidth:e.canvasWidth,gapHeight:e.gapHeight})})))}}}),t}(l.Component);e.exports=y,y.defaultProps={canvasWidth:350,canvasHeight:450,gapHeight:120}},function(e,t,n){"use strict";var r=n(5)["default"],o=n(6)["default"],i=n(7)["default"],a=n(8)["default"],s=n(9)["default"],u=n(3)["default"],l=u(n(4)),c=function(e){function t(e){r(this,t),i(s.Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={reverseGravity:e.setting.reverseGravity,pipeInterval:e.setting.pipeInterval,noHit:e.setting.noHit} }return o(t,e),a(t,{onChangeReverse:{value:function(){var e=this;this.setState({reverseGravity:!this.state.reverseGravity},function(){e.props.onChangeSetting(e.state)})}},onChangePipeInterval:{value:function(e){var t=this;this.setState({pipeInterval:e.target.value},function(){t.props.onChangeSetting(t.state)})}},onChangeNoHit:{value:function(){var e=this;this.setState({noHit:!this.state.noHit},function(){e.props.onChangeSetting(e.state)})}},render:{value:function(){return l.createElement("div",{className:"settings"},l.createElement("div",null,l.createElement("input",{id:"input_reverseGravity",type:"checkbox",checked:this.state.reverseGravity,onChange:this.onChangeReverse.bind(this)}),l.createElement("label",{htmlFor:"input_reverseGravity"},"Reverse gravity")),l.createElement("div",null,l.createElement("label",{htmlFor:"input_pipeInterval"},"Pipe Interval(ms)"),l.createElement("input",{type:"text",id:"input_pipeInterval",value:this.state.pipeInterval,onChange:this.onChangePipeInterval.bind(this)})),l.createElement("div",null,l.createElement("input",{id:"input_noHit",type:"checkbox",checked:this.state.noHit,onChange:this.onChangeNoHit.bind(this)}),l.createElement("label",{htmlFor:"input_noHit"},"No Hit (performance check purpose)")))}}}),t}(l.Component);e.exports=c,c.defaultProps={setting:{reverseGravity:!1,pipeInterval:1600,noHit:!1},onChangeSetting:function(){}}},function(e,t,n){(function(t){"use strict";var r=n(19),o=n(20),i=n(21),a=n(22),s=n(23),u=n(24),l=n(25),c=n(26),p=n(27),d=n(28),h=n(29),f=n(30),m=n(31),v=n(32),g=n(33),y=n(34),_=n(35),E=n(36),b=n(37),N=n(38);h.inject();var D=l.createElement,C=l.createFactory,w=l.cloneElement;"production"!==t.env.NODE_ENV&&(D=c.createElement,C=c.createFactory,w=c.cloneElement);var x=v.measure("React","render",m.render),O={Children:{map:o.map,forEach:o.forEach,count:o.count,only:N},Component:i,DOM:p,PropTypes:g,initializeTouchEvents:function(e){r.useTouchEvents=e},createClass:a.createClass,createElement:D,cloneElement:w,createFactory:C,createMixin:function(e){return e},constructAndRenderComponent:m.constructAndRenderComponent,constructAndRenderComponentByID:m.constructAndRenderComponentByID,findDOMNode:b,render:x,renderToString:_.renderToString,renderToStaticMarkup:_.renderToStaticMarkup,unmountComponentAtNode:m.unmountComponentAtNode,isValidElement:l.isValidElement,withContext:s.withContext,__spread:E};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:u,InstanceHandles:f,Mount:m,Reconciler:y,TextComponent:d}),"production"!==t.env.NODE_ENV){var T=n(39);if(T.canUseDOM&&window.top===window.self){navigator.userAgent.indexOf("Chrome")>-1&&"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&console.debug("Download the React DevTools for a better development experience: http://fb.me/react-devtools");for(var M=[Array.isArray,Array.prototype.every,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.map,Date.now,Function.prototype.bind,Object.keys,String.prototype.split,String.prototype.trim,Object.create,Object.freeze],I=0;I<M.length;I++)if(!M[I]){console.error("One or more ES5 shim/shams expected by React are not available: http://fb.me/react-warning-polyfills");break}}}O.version="0.13.0",e.exports=O}).call(t,n(43))},function(e,t,n){"use strict";function r(e,t,n,r,o,i,s){s=s||{},s.backgroundColor&&(e.save(),e.fillStyle=s.backgroundColor,e.fillRect(n,r,o,i),e.restore());var u,l,c,p=0,d=0,h=0,f=0,m=0,v=0,g=0,y=0,_=s.focusPoint;c={width:t.getWidth(),height:t.getHeight()},u=Math.max(o/c.width,i/c.height)||1,u=parseFloat(u.toFixed(4),10),l={width:c.width*u,height:c.height*u},_?s.originalHeight&&(_.x*=c.height/s.originalHeight,_.y*=c.height/s.originalHeight):_={x:.5*c.width,y:.5*c.height},m=Math.round(a(.5*o-_.x*u,o-l.width,0))*(-1/u),v=Math.round(a(.5*i-_.y*u,i-l.height,0))*(-1/u),g=Math.round(c.width-2*m),y=Math.round(c.height-2*v),h=Math.round(o),f=Math.round(i),p=Math.round(n),d=Math.round(r),e.drawImage(t.getRawImage(),m,v,g,y,p,d,h,f)}function o(e,t,n,r,o,i,a,u){var l,c,p=n,d=r,u=u||{};u.fontSize=u.fontSize||16,u.lineHeight=u.lineHeight||18,u.textAlign=u.textAlign||"left",u.backgroundColor=u.backgroundColor||"transparent",u.color=u.color||"#000",l=s(t,o,a,u.fontSize,u.lineHeight),e.save(),"transparent"!==u.backgroundColor&&(e.fillStyle=u.backgroundColor,e.fillRect(0,0,o,i)),e.fillStyle=u.color,e.font=a.attributes.style+" normal "+a.attributes.weight+" "+u.fontSize+"pt "+a.family,l.lines.forEach(function(t,a){switch(c=t.text,d=0===a?r+u.fontSize:r+u.fontSize+u.lineHeight*a,u.textAlign){case"center":p=n+o/2-t.width/2;break;case"right":p=n+o-t.width;break;default:p=n}a<l.lines.length-1&&u.fontSize+u.lineHeight*(a+1)>i&&(c=c.replace(/\,?\s?\w+$/,"…")),i+r>=d&&e.fillText(c,p,d)}),e.restore()}function i(e,t,n,r,o,i,a,s,u,l){var c;e.save(),c=e.createLinearGradient(t,n,r,o),i.forEach(function(e){c.addColorStop(e.position,e.color)}),e.fillStyle=c,e.fillRect(a,s,u,l),e.restore()}var a=(n(40),n(41)),s=n(42);e.exports={drawImage:r,drawText:o,drawGradient:i}},function(e,t,n){"use strict";var r=n(5)["default"],o=n(8)["default"],i=window,a=i.requestAnimationFrame||i.webkitRequestAnimationFrame||i.mozRequestAnimationFrame||i.msRequestAnimationFrame||i.oRequestAnimationFrame||function(e){i.setTimeout(e,1e3/60)},s=i.cancelAnimationFrame||i.webkitCancelAnimationFrame||i.mozCancelAnimationFrame||i.msCancelAnimationFrame||i.oCancelAnimationFrame||i.clearTimeout,u=function(){function e(t){r(this,e),this._callback=t}return o(e,{start:{value:function(){this._startTime=Date.now(),this._loop()}},_loop:{value:function(){var e=this;if(this._callback){var t=this._callback();if(t){var n=function(){e._timer=a(e._loop.bind(e))};t.then?t.then(n):n()}}}},end:{value:function(){this._timer&&(s(this._timer),this._timer=null),this._startTime=null}},timeDiff:{value:function(){return Date.now()-this._startTime}}}),e}();e.exports=u},function(e,t,n){"use strict";var r=n(5)["default"],o=n(6)["default"],i=n(7)["default"],a=n(8)["default"],s=n(9)["default"],u=n(3)["default"],l=u(n(4)),c=u(n(18)),p=c.Text,d=c.FontFace,h=function(e){function t(e){r(this,t),i(s.Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e)}return o(t,e),a(t,{render:{value:function(){return l.createElement(p,{style:this.getLabelStyle()}," ",this.props.count," ")}},getLabelStyle:{value:function(){return{fontFace:d("Georgia"),fontSize:32,lineHeight:28,height:38,marginTop:20,zIndex:10,color:"#fff",textAlign:"center"}}}}),t}(l.Component);e.exports=h,h.propTypes={count:l.PropTypes.number},h.defaultProps={count:0}},function(e,t,n){"use strict";var r=n(5)["default"],o=n(6)["default"],i=n(7)["default"],a=n(8)["default"],s=n(9)["default"],u=n(3)["default"],l=u(n(4)),c=u(n(18)),p=u(n(44)),d=(u(n(13)),u(n(51))),h=c.Image,f=function(e){function t(e){r(this,t),i(s.Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={left:e.initLeft,top:e.initTop},this._animate=new d(this)}return o(t,e),a(t,{clear:{value:function(){var e=this;return new s.Promise(function(t){e.setState({top:e.props.initTop},function(){t()})})}},getPos:{value:function(){return{l:this.state.left,t:this.state.top,w:this.props.width,h:this.props.height}}},fall:{value:function(){var e=this;return new s.Promise(function(t){var n=e.getPos(),r=e.props.canvasHeight,o=e.props.reverse,i=o?-1:1,a=o?n.t:r-n.t-n.h,s=1e3*a/r,u=p.get(e.props.src);u.rotate=90*i,e._animate.stop().linear("top",o?0:r-n.h,s).then(t)})}},jump:{value:function(){var e=this;return new s.Promise(function(t){var n=60,r=e.props.reverse?-1:1,o=(e.getPos(),p.get(e.props.src));o.rotate=-20*r,e._animate.stop().linear("top",e.state.top-n*r,200).then(function(){o.rotate=0,e._animate.linear("top",e.state.top+n*r,300).then(function(){e.fall().then(t)})})})}},stop:{value:function(){this._animate.stop()}},getImageStyle:{value:function(){var e=this.getPos();return{position:"absolute",zIndex:4,left:e.l,top:e.t,width:e.w,height:e.h}}},render:{value:function(){return l.createElement(h,{src:this.props.src,style:this.getImageStyle(),fadeIn:!0})}}}),t}(l.Component);e.exports=f,f.defaultProps={src:"../img/octopus.png",initLeft:130,initTop:197,width:40,height:28,canvasHeight:0,reverse:!1}},function(e,t,n){"use strict";var r=n(5)["default"],o=n(6)["default"],i=n(7)["default"],a=n(8)["default"],s=n(9)["default"],u=n(3)["default"],l=u(n(4)),c=u(n(18)),p=u(n(51)),d=c.Group,h=c.Image,f=function(e){function t(e){r(this,t),i(s.Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={x:e.canvasWidth},this._animate=new p(this)}return o(t,e),a(t,{componentDidMount:{value:function(){this._animate.linear("x",-this.props.pipeWidth,2*this.props.pipeInterval)}},componentWillUnmount:{value:function(){this.stop()}},stop:{value:function(){this._animate.stop()}},getGapPos:{value:function(){return{w:this.props.pipeWidth,h:this.props.gapHeight,t:this.props.topHeight,l:this.state.x}}},getGroupStyle:{value:function(){return{position:"absolute",left:this.state.x,top:0,width:this.props.pipeWidth,height:this.props.pipeHeight}}},getTopHalfStyle:{value:function(){return{position:"absolute",left:this.state.x,bottom:this.props.bottomHeight+this.props.gapHeight,width:this.props.pipeWidth,height:this.props.pipeHeight}}},getBottomHalfStyle:{value:function(){return{position:"absolute",left:this.state.x,top:this.props.topHeight+this.props.gapHeight,width:this.props.pipeWidth,height:this.props.pipeHeight}}},render:{value:function(){return l.createElement(d,{style:this.getGroupStyle()},l.createElement(h,{src:"../img/pipe.png",style:this.getTopHalfStyle()}),l.createElement(h,{src:"../img/pipe.png",style:this.getBottomHalfStyle()}))}}}),t}(l.Component);e.exports=f,f.defaultProps={pipeWidth:60,pipeHeight:450,pipeInterval:0,canvasWidth:0,gapHeight:0}},function(e,t,n){"use strict";var r={Surface:n(45),Layer:n(46),Group:n(47),Image:n(48),Text:n(49),ListView:n(50),FontFace:n(40),measureText:n(42)};e.exports=r},function(e,t,n){(function(t){"use strict";function r(e){return e===g.topMouseUp||e===g.topTouchEnd||e===g.topTouchCancel}function o(e){return e===g.topMouseMove||e===g.topTouchMove}function i(e){return e===g.topMouseDown||e===g.topTouchStart}function a(e,n){var r=e._dispatchListeners,o=e._dispatchIDs;if("production"!==t.env.NODE_ENV&&h(e),Array.isArray(r))for(var i=0;i<r.length&&!e.isPropagationStopped();i++)n(e,r[i],o[i]);else r&&n(e,r,o)}function s(e,t,n){e.currentTarget=v.Mount.getNode(n);var r=t(e,n);return e.currentTarget=null,r}function u(e,t){a(e,t),e._dispatchListeners=null,e._dispatchIDs=null}function l(e){var n=e._dispatchListeners,r=e._dispatchIDs;if("production"!==t.env.NODE_ENV&&h(e),Array.isArray(n)){for(var o=0;o<n.length&&!e.isPropagationStopped();o++)if(n[o](e,r[o]))return r[o]}else if(n&&n(e,r))return r;return null}function c(e){var t=l(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function p(e){"production"!==t.env.NODE_ENV&&h(e);var n=e._dispatchListeners,r=e._dispatchIDs;"production"!==t.env.NODE_ENV?m(!Array.isArray(n),"executeDirectDispatch(...): Invalid `event`."):m(!Array.isArray(n));var o=n?n(e,r):null;return e._dispatchListeners=null,e._dispatchIDs=null,o}function d(e){return!!e._dispatchListeners}var h,f=n(55),m=n(53),v={Mount:null,injectMount:function(e){v.Mount=e,"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?m(e&&e.getNode,"EventPluginUtils.injection.injectMount(...): Injected Mount module is missing getNode."):m(e&&e.getNode))}},g=f.topLevelTypes;"production"!==t.env.NODE_ENV&&(h=function(e){var n=e._dispatchListeners,r=e._dispatchIDs,o=Array.isArray(n),i=Array.isArray(r),a=i?r.length:r?1:0,s=o?n.length:n?1:0;"production"!==t.env.NODE_ENV?m(i===o&&a===s,"EventPluginUtils: Invalid `event`."):m(i===o&&a===s)});var y={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:p,executeDispatch:s,executeDispatchesInOrder:u,executeDispatchesInOrderStopAtTrue:c,hasDispatches:d,injection:v,useTouchEvents:!1};e.exports=y}).call(t,n(43))},function(e,t,n){(function(t){"use strict";function r(e,t){this.forEachFunction=e,this.forEachContext=t}function o(e,t,n,r){var o=e;o.forEachFunction.call(o.forEachContext,t,r)}function i(e,t,n){if(null==e)return e;var i=r.getPooled(t,n);h(e,o,i),r.release(i)}function a(e,t,n){this.mapResult=e,this.mapFunction=t,this.mapContext=n}function s(e,n,r,o){var i=e,a=i.mapResult,s=!a.hasOwnProperty(r);if("production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?f(s,"ReactChildren.map(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.",r):null),s){var u=i.mapFunction.call(i.mapContext,n,o);a[r]=u}}function u(e,t,n){if(null==e)return e;var r={},o=a.getPooled(r,t,n);return h(e,s,o),a.release(o),d.create(r)}function l(){return null}function c(e){return h(e,l,null)}var p=n(56),d=n(57),h=n(58),f=n(54),m=p.twoArgumentPooler,v=p.threeArgumentPooler;p.addPoolingTo(r,m),p.addPoolingTo(a,v);var g={forEach:i,map:u,count:c};e.exports=g}).call(t,n(43))},function(e,t,n){(function(t){"use strict";function r(e,t){this.props=e,this.context=t}var o=n(52),i=n(53),a=n(54);if(r.prototype.setState=function(e,n){"production"!==t.env.NODE_ENV?i("object"==typeof e||"function"==typeof e||null==e,"setState(...): takes an object of state variables to update or a function which returns an object of state variables."):i("object"==typeof e||"function"==typeof e||null==e),"production"!==t.env.NODE_ENV&&("production"!==t.env.NODE_ENV?a(null!=e,"setState(...): You passed an undefined or null state object; instead, use forceUpdate()."):null),o.enqueueSetState(this,e),n&&o.enqueueCallback(this,n)},r.prototype.forceUpdate=function(e){o.enqueueForceUpdate(this),e&&o.enqueueCallback(this,e)},"production"!==t.env.NODE_ENV){var s={getDOMNode:"getDOMNode",isMounted:"isMounted",replaceProps:"replaceProps",replaceState:"replaceState",setProps:"setProps"},u=function(e,n){try{Object.defineProperty(r.prototype,e,{get:function(){return void("production"!==t.env.NODE_ENV?a(!1,"%s(...) is deprecated in plain JavaScript React classes.",n):null)}})}catch(o){}};for(var l in s)s.hasOwnProperty(l)&&u(l,s[l])}e.exports=r}).call(t,n(43))},function(e,t,n){(function(t){"use strict";function r(e,n,r){for(var o in n)n.hasOwnProperty(o)&&("production"!==t.env.NODE_ENV?w("function"==typeof n[o],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e.displayName||"ReactClass",_[r],o):null)}function o(e,n){var r=M.hasOwnProperty(n)?M[n]:null;S.hasOwnProperty(n)&&("production"!==t.env.NODE_ENV?N(r===O.OVERRIDE_BASE,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",n):N(r===O.OVERRIDE_BASE)),e.hasOwnProperty(n)&&("production"!==t.env.NODE_ENV?N(r===O.DEFINE_MANY||r===O.DEFINE_MANY_MERGED,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n):N(r===O.DEFINE_MANY||r===O.DEFINE_MANY_MERGED))}function i(e,n){if(n){"production"!==t.env.NODE_ENV?N("function"!=typeof n,"ReactClass: You're attempting to use a component class as a mixin. Instead, just use a regular object."):N("function"!=typeof n),"production"!==t.env.NODE_ENV?N(!f.isValidElement(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object."):N(!f.isValidElement(n));var r=e.prototype;n.hasOwnProperty(x)&&I.mixins(e,n.mixins);for(var i in n)if(n.hasOwnProperty(i)&&i!==x){var a=n[i];if(o(r,i),I.hasOwnProperty(i))I[i](e,a);else{var s=M.hasOwnProperty(i),c=r.hasOwnProperty(i),p=a&&a.__reactDontBind,d="function"==typeof a,h=d&&!s&&!c&&!p;if(h)r.__reactAutoBindMap||(r.__reactAutoBindMap={}),r.__reactAutoBindMap[i]=a,r[i]=a;else if(c){var m=M[i];"production"!==t.env.NODE_ENV?N(s&&(m===O.DEFINE_MANY_MERGED||m===O.DEFINE_MANY),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",m,i):N(s&&(m===O.DEFINE_MANY_MERGED||m===O.DEFINE_MANY)),m===O.DEFINE_MANY_MERGED?r[i]=u(r[i],a):m===O.DEFINE_MANY&&(r[i]=l(r[i],a))}else r[i]=a,"production"!==t.env.NODE_ENV&&"function"==typeof a&&n.displayName&&(r[i].displayName=n.displayName+"_"+i)}}}}function a(e,n){if(n)for(var r in n){var o=n[r];if(n.hasOwnProperty(r)){var i=r in I;"production"!==t.env.NODE_ENV?N(!i,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',r):N(!i);var a=r in e;"production"!==t.env.NODE_ENV?N(!a,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",r):N(!a),e[r]=o}}}function s(e,n){"production"!==t.env.NODE_ENV?N(e&&n&&"object"==typeof e&&"object"==typeof n,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."):N(e&&n&&"object"==typeof e&&"object"==typeof n);for(var r in n)n.hasOwnProperty(r)&&("production"!==t.env.NODE_ENV?N(void 0===e[r],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",r):N(void 0===e[r]),e[r]=n[r]);return e}function u(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return s(o,n),s(o,r),o}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function c(e,n){var r=n.bind(e);if("production"!==t.env.NODE_ENV){r.__reac