1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[953],{9707:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/game/[gameId]",function(){return t(92469)}])},74455:function(e,n,t){"use strict";t.d(n,{I:function(){return s},m:function(){return x}});var r=t(85893),o=t(68527),i=t(67294),a=t(2620),l=t(11604);function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){c(e,n,t[n])}))}return e}var s=function(e){return(0,r.jsxs)(o.xu,{position:"relative",children:[e.label&&(0,r.jsx)(o.xu,{color:"#6c6c6c",mb:"4px",children:e.label}),(0,r.jsx)(l.m$.input,u({_hover:{bg:"#e9e9e9"},_focus:{boxShadow:"inset 0px 4px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 2px rgba(0, 0, 0, 0.05)",bg:"white"},transition:"0.1s all",fontSize:"16px",bg:"#f2f2f2",boxShadow:"inset 0px 4px 0px rgba(0, 0, 0, 0.05)",borderRadius:"14px",p:"0 16px",display:"block",w:"100%",height:"50px",outline:"none"},e))]})},x=function(e){var n=(0,i.useState)(!1),t=n[0],c=n[1],s=(0,i.useRef)(null);return(0,r.jsxs)(o.xu,{position:"relative",children:[e.label&&(0,r.jsx)(o.xu,{color:"#6c6c6c",mb:"4px",children:e.label}),(0,r.jsx)(l.m$.input,u({_hover:{bg:"#e9e9e9"},_focus:{boxShadow:"inset 0px 4px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 2px rgba(0, 0, 0, 0.05)",bg:"white"},transition:"0.1s all",fontSize:"16px",bg:"#f2f2f2",boxShadow:"inset 0px 4px 0px rgba(0, 0, 0, 0.05)",borderRadius:"14px",p:"0 16px",display:"block",w:"100%",height:"64px",outline:"none",ref:s},e)),(0,r.jsx)(o.xu,{position:"absolute",bottom:"10px",right:"8px",children:(0,r.jsx)(a.z,{variant:"empty-small",onClick:function(){var e;(null===(e=s.current)||void 0===e?void 0:e.value)&&navigator.clipboard.writeText(s.current.value),c(!0)},children:t?"Copied \ud83d\udc4d":"Copy game link"})})]})}},41801:function(e,n,t){"use strict";t.d(n,{s:function(){return l}});var r=t(85893),o=t(68527);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){i(e,n,t[n])}))}return e}var l=function(e){var n=e.scores;return(0,r.jsx)(o.xu,{bg:"rgba(255, 255, 255, 0.2)",border:"4px solid rgba(232, 233, 250, 0.5)",backdropBlur:"25px",borderRadius:"25px",w:{base:"90%",lg:"500px"},height:"calc(100vh - 150px)",overflowY:"auto",maxH:"100%",maxW:"100%",children:n.map((function(e,n){return(0,r.jsxs)(o.kC,{alignItems:"center",p:"10px 16px",borderBottom:"3px solid rgba(232, 233, 250, 0.54)",fontSize:"20px",sx:{"&:nth-of-type(1)":u,"&:nth-of-type(2)":s,"&:nth-of-type(3)":x,"&:last-child":{borderBottom:"none"}},children:[(0,r.jsx)(o.xu,{textAlign:"center",fontSize:"18px",ml:"12px",mr:"31px",children:n+1}),(0,r.jsx)(o.xu,{flex:"1",children:e.name}),(0,r.jsxs)(o.xu,{children:[e.score," ",(0,r.jsx)(o.xu,{display:"inline",opacity:"0.5",children:"pts"})]})]},"score_".concat(n))}))})},c={height:"35px",borderRadius:"35px",display:"flex",alignItems:"center",justifyContent:"center",mr:"16px",ml:"0px",w:"35px",color:"white"},u={fontSize:"24px",".number":a({},c,{bg:"#ffce51",border:"2px solid #ffa41c",boxShadow:"0px 2px 0px #ffa41c",textShadow:"0px 3px 0px #ffa41c"})},s={fontSize:"24px",".number":a({},c,{bg:"#b3bbbd",border:"2px solid #7c8a8d",boxShadow:"0px 2px 0px #7c8a8d",textShadow:"0px 3px 0px #7c8a8d"})},x={fontSize:"24px",".number":a({},c,{bg:"#c67700",border:"2px solid #844f00",boxShadow:"0px 2px 0px #844f00",textShadow:"0px 3px 0px #844f00"})}},8924:function(e,n,t){"use strict";t.d(n,{P:function(){return u}});
1var r=t(85893),o=t(68527),i=t(67294),a=t(2620),l=t(74455),c=t(95050),u=function(e){var n=e.score,t=e.onSubmit,u=e.loading,s=void 0!==u&&u,x=e.onClose,d=(0,i.useState)(""),p=d[0],f=d[1];return(0,i.useEffect)((function(){(new c.Z).addConfetti()}),[]),(0,r.jsxs)(o.xu,{textAlign:"center",children:[(0,r.jsxs)(o.xu,{fontSize:"36px",children:["Your score: ",n," pts"]}),(0,r.jsx)("br",{}),(0,r.jsx)(l.I,{value:p,style:{textAlign:"center"},onChange:function(e){f(e.currentTarget.value)},label:"Your name",onKeyDown:function(e){e.stopPropagation(),"Enter"===e.key&&t(p),"Escape"===e.key&&x()}}),(0,r.jsx)("br",{}),(0,r.jsx)(a.z,{loading:s,onClick:function(){t(p)},children:"Submit my score"})]})}},92469:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return y}});var r=t(85893),o=t(68527),i=t(11163),a=t(67294),l=t(2620),c=t(93088),u=t(90133),s=t(89107),x=t(41801),d=t(21616),p=t(8924),f=t(79313),b=t(63159),h=t(50900);function g(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function m(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){m(e,n,t[n])}))}return e}function v(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"===typeof e)return g(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return g(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var y=!0;n.default=function(e){var n,t,g,m,y,j,S=e.gameData,O=e.gameId,k=(0,a.useState)(0),C=k[0],P=k[1],_=(0,i.useRouter)(),z=(0,a.useState)(!1),A=z[0],E=z[1],I=(0,a.useState)(!1),N=I[0],R=I[1],D=(0,a.useState)(!1),T=D[0],B=D[1],M=function(){return{width:Math.min(1e3,null===window||void 0===window?void 0:window.innerWidth),height:Math.min(600,null===window||void 0===window?void 0:window.innerHeight)}},Y=null!==(t=null===S||void 0===S||null===(n=S.leaderboard)||void 0===n?void 0:n.sort((function(e,n){return parseInt(n.score)-parseInt(e.score)})))&&void 0!==t?t:[];return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(u.P,{children:[(0,r.jsx)(d.u,{show:T,closeOnOutsideClick:!0,onClose:function(){B(!1)},children:(0,r.jsx)(f.V,{show:T,link:window.location.href,message:(y=null!==(g=null===S||void 0===S?void 0:S.game)&&void 0!==g?g:"",j=window.location.href,"Play ".concat(y," with me, and try beating my score! Go to:\n\n").concat(j,"\n\nYou can easily create your own flappy bird online, by going to:\nwww.strivemath.com/game/new"))})}),(0,r.jsx)(d.u,{closeOnOutsideClick:!N,show:A,onClose:function(){return E(!1)},children:(0,r.jsx)(p.P,{onClose:function(){return E(!1)},loading:N,onSubmit:function(e){R(!0),O&&((null===S||void 0===S?void 0:S.leaderboard)&&Array.isArray(S.leaderboard)?(0,h.y6)(O,w({},S,{leaderboard:v(S.leaderboard).concat([{score:C,name:e}])})).then((function(){_.push(_.asPath+"/leaderboard")})):(0,h.y6)(O,w({},S,{leaderboard:[{score:C,name:e}]})).then((function(){_.push(_.asPath+"/leaderboard")})))},score:C})}),(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),(0,r.jsxs)(o.xu,{textAlign:"center",m:{lg:"-50px auto 50px",base:"-50px auto 30px"},children:[(0,r.jsx)(o.xu,{fontSize:{lg:"37px",base:"20px"},bg:"linear-gradient(180deg, #ff3ed4 0%, #b90090 100%);",bgClip:"text",sx:{"-webkit-text-fill-color":"transparent"},children:null!==(m=null===S||void 0===S?void 0:S.game)&&void 0!==m?m:(null===S||void 0===S?void 0:S.name)+"'s game"}),(null===S||void 0===S?void 0:S.name)&&(null===S||void 0===S?void 0:S.game)&&(0,r.jsxs)(o.xu,{fontSize:{base:"15px",lg:"30px"},ml:{base:"4px",lg:"15px"},opacity:"0.3",children:["(by ",null===S||void 0===S?void 0:S.name,")"]})]}),(0,r.jsx)(o.xu,{pos:"relative",children:(0,r.jsx)(c.G,{children:(0,r.jsx)(b.Z,{state:Object.fromEntries(s.M5.map((function(e){var n=(0,s.H2)(e,null===S||void 0===S?void 0:S.config[e.name]);return[e.name,n]}))),view:{width:M().width,height:M().height},scoreCallback:function(e){A||(E(!0),P(e))}})})}),(0,r.jsxs)(o.kC,{direction:["column","row"],align:"center",justify:"center",gap:4,mt:10,children:[(0,r.jsx)(l.z,{onClick:function(){_.push("/game/new")},children:"Build your own game!"}),(0,r.jsx)(l.z,{variant:"blue",onClick:function(){B(!0)},children:"Share with friends"})]}),(0,r.jsx)(o.kC,{h:"100%",w:"100%",mt:10,justifyContent:"center",children:(0,r.jsx)(x.s,{scores:Y})})]})})}}}
1,function(e){e.O(0,[3727,5675,1662,4346,4394,6589,9107,9774,2888,179],(function(){return n=9707,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.