PageSourceSearch

https://typination.com/_next/static/chunks/pages/index-9434caccf1b3a88b6399.js

js typination.com collected 2026-10-02 00:57:44 UTC 191,182 bytes, 1 lines download raw bytes

1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[27],{"+fgb":function(e,t){e.exports={srcSet:"/_next/static/images/blackBook-25-aa719f4fd25cff9aae0bc618db2b2712.png 25w",images:[{path:"/_next/static/images/blackBook-25-aa719f4fd25cff9aae0bc618db2b2712.png",width:25,height:30}],src:"/_next/static/images/blackBook-25-aa719f4fd25cff9aae0bc618db2b2712.png",toString:function(){return"/_next/static/images/blackBook-25-aa719f4fd25cff9aae0bc618db2b2712.png"},placeholder:void 0,width:25,height:30}},"1em0":function(e,t){e.exports={srcSet:"/_next/static/images/spinwheel-19-ff0f01004e110094735636d6ea1e70d0.png 19w",images:[{path:"/_next/static/images/spinwheel-19-ff0f01004e110094735636d6ea1e70d0.png",width:19,height:19}],src:"/_next/static/images/spinwheel-19-ff0f01004e110094735636d6ea1e70d0.png",toString:function(){return"/_next/static/images/spinwheel-19-ff0f01004e110094735636d6ea1e70d0.png"},placeholder:void 0,width:19,height:19}},"3BSc":function(e,t){e.exports={srcSet:"/_next/static/images/stopWatch-27-20f22a5a47bfc821f892e2bde6ec81fa.png 27w",images:[{path:"/_next/static/images/stopWatch-27-20f22a5a47bfc821f892e2bde6ec81fa.png",width:27,height:27}],src:"/_next/static/images/stopWatch-27-20f22a5a47bfc821f892e2bde6ec81fa.png",toString:function(){return"/_next/static/images/stopWatch-27-20f22a5a47bfc821f892e2bde6ec81fa.png"},placeholder:void 0,width:27,height:27}},"4Txv":function(e,t){e.exports={srcSet:"/_next/static/images/raceWords-73-dd60c32e5352fa0267652c26d0b98e18.png 73w",images:[{path:"/_next/static/images/raceWords-73-dd60c32e5352fa0267652c26d0b98e18.png",width:73,height:69}],src:"/_next/static/images/raceWords-73-dd60c32e5352fa0267652c26d0b98e18.png",toString:function(){return"/_next/static/images/raceWords-73-dd60c32e5352fa0267652c26d0b98e18.png"},placeholder:void 0,width:73,height:69}},"6ldB":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r("dciQ")),s=c(r("q2je"));function c(e){return e&&e.__esModule?e:{default:e}}var a={Google:n.default,Baidu:s.default};t.default=a},"8eCf":function(e,t){e.exports={srcSet:"/_next/static/images/arrowDownSiteTheme-20-e9414b4a9ec7f6328004ebadfcb01944.png 20w",images:[{path:"/_next/static/images/arrowDownSiteTheme-20-e9414b4a9ec7f6328004ebadfcb01944.png",width:20,height:20}],src:"/_next/static/images/arrowDownSiteTheme-20-e9414b4a9ec7f6328004ebadfcb01944.png",toString:function(){return"/_next/static/images/arrowDownSiteTheme-20-e9414b4a9ec7f6328004ebadfcb01944.png"},placeholder:void 0,width:20,height:20}},MKVR:function(e,t){e.exports={srcSet:"/_next/static/images/signout-25-20868d7bb2c6f77532e436fb20d122a7.png 25w",images:[{path:"/_next/static/images/signout-25-20868d7bb2c6f77532e436fb20d122a7.png",width:25,height:25}],src:"/_next/static/images/signout-25-20868d7bb2c6f77532e436fb20d122a7.png",toString:function(){return"/_next/static/images/signout-25-20868d7bb2c6f77532e436fb20d122a7.png"},placeholder:void 0,width:25,height:25}},NYmN:function(e,t){e.exports={srcSet:"/_next/static/images/race-75-9b43093607794abeed6f37af4dc6cff1.png 75w",images:[{path:"/_next/static/images/race-75-9b43093607794abeed6f37af4dc6cff1.png",width:75,height:75}],src:"/_next/static/images/race-75-9b43093607794abeed6f37af4dc6cff1.png",toString:function(){return"/_next/static/images/race-75-9b43093607794abeed6f37af4dc6cff1.png"},placeholder:void 0,width:75,height:75}},RNiq:function(e,t,r){"use strict";r.r(t);var n=r("rePB"),s=r("o0o1"),c=r.n(s),a=r("HaE+"),i=r("KQm4"),o=r("ODXe"),l=r("nKUr"),d=r("MX0m"),u=r.n(d),p=r("q1tI"),m=r.n(p),x=r("UkKX"),h=r("CafY"),j=r("vDqi"),g=r.n(j),f=r("YFqc"),b=r.n(f),k=r("FGyW"),y=r("xJ5V"),v=r("o2Oy"),w=r("87OT"),O=r("x2Si"),S=r("waOm"),N=r("kWi6"),T=r("IJWR"),C=r("UD9T"),I=r("je4i"),B=r.n(I),P=r("BmCP"),L=r("hf6B"),E=r("/0Lw");function W(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?W(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(e){var t=1e3*e,r=Math.floor(t/1e3%60),n=Math.floor(t/6e4%60),s=Math.floor(t/36e5),c=1===r?"second":"seconds",a=1===n?"minute":"minutes",i=1===s?"hour":"hours";return s>0?n>0?"".concat(s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")," ").concat(i," and ").concat(n," ").concat(a):"".concat(s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")," ").concat(i):n>0?r>0?"".concat(n," ").concat(a," and ").concat(r," ").concat(c):"".concat(n," ").concat(a):r>0?"".concat(r," ").concat(c):"0 - started now"}var F=r("mblX"),_=r("WMS+"),A=r("2qzJ"),D=r("pI+A"),V=r("MkHO"),q=r("d/4c"),G=r("U+D9"),z=r("0qjv"),H=r("K3Sa"),Y=r("kdYF"),U=r("3BSc"),J=r("f0lI"),K=r("NOX6"),X=r("fm9w"),Q=r("GkSl"),Z=r("loyS"),$=r("kHFq"),ee=r("69Jj"),te=r("9Ujb"),re=r("P+tW"),ne=r("sT/F"),se=r("/h0r"),ce=r("lBgm"),ae=r("zhrZ"),ie=r("8Nh1"),oe=["Basic","BlueBasic","GreenBasic","OrangeBasic","RedBasic","PurpleBasic","PinkBasic","Fairy","Crystal","Flamey","Electric","Veiny","Wavey","Tiger","RedPolygon","Abstract","Artisitic","Wood","Parquet"];function le(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=[e[r],e[t]];e[t]=n[0],e[r]=n[1]}return e}var de=0,ue=0,pe=0,me=0,xe=0,he=0,je=!1,ge=0;var fe=function(e){var t,r=e.racersList,s=e.trackInfo,o=e.setJoinedRace,d=e.levelPicked,x=e.socket,h=e.setTrackInfo,j=e.isCustomPractice,f=e.latestScores,v=e.fromHomepageChangeTheme,w=e.setOpenedChangeThemeHomepage,I=Object(p.useContext)(y.a).user,W=Object(p.useContext)(L.a).setLatestRacesScore,fe=Object(p.useRef)(),be=Object(p.useRef)({value:!1,arr:[]}),ke=Object(p.useState)(null===s?[]:s.wordBlocks.slice(pe,pe+30)),ye=ke[0],ve=ke[1],we=Object(p.useState)(10),Oe=we[0],Se=we[1],Ne=Object(p.useState)(!1),Te=Ne[0],Ce=Ne[1],Ie=Object(p.useRef)({typingCalculator:null,restartStopwatchInterval:null,filledStopwatch:null,replayTyping1:null,replayTyping2:!1,replayTypingChars:[],customTimed:null,customTimed2:null,practiceNewQuoteTimeout:null,beforeTypingCalculations:null}),Be=Object(p.useState)(null),Pe=Be[0],Le=Be[1],Ee=Object(p.useState)(0),We=Ee[0],Re=Ee[1],Me=Object(p.useState)(localStorage.getItem("stopwatchPractice")?localStorage.getItem("stopwatchPractice"):"firstKey"),Fe=Me[0],_e=Me[1],Ae=localStorage.getItem("styleText")?localStorage.getItem("styleText"):"correctColor",De=localStorage.getItem("cursor")?localStorage.getItem("cursor"):"withCursor",Ve=localStorage.getItem("input")?localStorage.getItem("input"):"withRedBackground",qe=localStorage.getItem("wantsVisibleInput")?localStorage.getItem("wantsVisibleInput"):"wantsVisibleInput",Ge=localStorage.getItem("wantsShownDPs")?localStorage.getItem("wantsShownDPs"):"yesShownDPs",ze=localStorage.getItem("steno")?localStorage.getItem("steno"):"noSteno",He=localStorage.getItem("smoothCursor")?localStorage.getItem("smoothCursor"):"yesSmooth",Ye=localStorage.getItem("smoothnessSpeed")?+localStorage.getItem("smoothnessSpeed"):100,Ue=localStorage.getItem("blinkCursor")?localStorage.getItem("blinkCursor"):"yesBlink",Je=Object(p.useRef)(0),Ke=Object(p.useRef)([]),Xe=Object(p.useRef)(),Qe=Object(p.useRef)({startTime:null,endTime:null,grossWPM:0,trackValue:0,accuracy:0,allCharacters:0,incorrectCharacters:0,indexTrackingBlocks:0,lastWordblockIndexForGraph:0,graphSpeed:[]}),Ze=Object(p.useRef)(),$e=Object(p.useState)(!1),et=$e[0],tt=$e[1],rt=Object(p.useRef)({}),nt=Object(p.useRef)(null),st=Object(p.useState)([]),ct=st[0],at=st[1],it=Object(p.useRef)({isDarkTheme:document.documentElement.classList.contains("Dark"),textColor:!!localStorage.getItem("textColor"),textBackgroundColor:!!localStorage.getItem("textBackgroundColor"),layoutColor:!!localStorage.getItem("layoutColor"),outerBackgroundColor:!!localStorage.getItem("backgroundColor"),inputColor:!!localStorage.getItem("inputColor"),backgroundImage:localStorage.getItem("backgroundImage")?localStorage.getItem("backgroundImage"):"",backgroundBlurness:localStorage.getItem("backgroundBlurness")?localStorage.getItem("backgroundBlurness"):0,smoothCursor:!localStorage.getItem("smoothCursor"),smoothnessSpeed:localStorage.getItem("smoothnessSpeed")?localStorage.getItem("smoothnessSpeed"):100,blinkCursor:!localStorage.getItem("blinkCursor"),font:localStorage.getItem("font")?localStorage.getItem("font"):"Montserrat"}),ot=Object(p.useState)({}),lt=ot[0],dt=ot[1];Object(p.useEffect)((function(){if(Object.keys(lt).length>0){var e=Object.keys(lt)[0],t=Object.values(lt)[0];if("styleOfText"===e&&(Ae=t),"wantsCursor"===e&&(De=t),"wantsRedBackgroun
1dInput"===e&&(Ve=t),"isCursorSmooth"===e&&(He=t),"smoothnessSpeed"===e&&(Ye=+t),"updatedFont"===e){var r=de+fe.current.selectionStart-1;if(-1===r&&mt(),!Ke.current[r])return;Xe.current.animate([{top:Ke.current[r].offsetTop-6+"px",left:!1===(null===s||void 0===s?void 0:s.ltr)?Ke.current[r].offsetLeft-4+"px":Ke.current[r].offsetLeft+Ke.current[r].offsetWidth+Je.current-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==He||be.current.value?0:Ye})}}}),[lt]);var ut=function(){document.querySelector(".didntFinishRace").classList.add("openedThemeSettings"),document.getElementById("changeThemeSettings").classList.add("opened")};Object(p.useEffect)((function(){if(!j)return ft(),function(){clearInterval(Ie.current.restartStopwatchInterval),clearInterval(Ie.current.typingCalculator),clearInterval(Ie.current.restartStopwatchInterval),clearInterval(Ie.current.customTimed),clearTimeout(Ie.current.beforeTypingCalculations),clearTimeout(Ie.current.customTimed2),clearTimeout(Ie.current.replayTyping1),clearTimeout(Ie.current.replayTyping2),clearTimeout(Ie.current.filledStopwatch),clearTimeout(Ie.current.practiceNewQuoteTimeout),Ie.current.replayTypingChars.forEach((function(e){return e&&clearTimeout(e)})),fe.current&&fe.current.removeEventListener("keydown",bt),x.off()}}),[]),Object(p.useEffect)((function(){if(!s)return clearInterval(Ie.current.restartStopwatchInterval),clearInterval(Ie.current.typingCalculator),clearInterval(Ie.current.restartStopwatchInterval),clearInterval(Ie.current.customTimed),clearTimeout(Ie.current.beforeTypingCalculations),clearTimeout(Ie.current.customTimed2),clearTimeout(Ie.current.replayTyping1),clearTimeout(Ie.current.replayTyping2),void clearTimeout(Ie.current.filledStopwatch);if("yesSteno"===ze){var e=s.stenoStrokes.slice(0,4);setTimeout((function(){at(e)}),0)}return j?ft():Ie.current.practiceNewQuoteTimeout=setTimeout((function(){ve(s.wordBlocks)}),0),void 0===document.querySelector(".currentTrack").firstChild.children[0]&&(document.querySelector(".currentTrack").firstChild.style.fontWeight="bold"),function(){j&&(je=!1,ge=0,clearInterval(Ie.current.restartStopwatchInterval),clearInterval(Ie.current.typingCalculator),clearInterval(Ie.current.restartStopwatchInterval),clearInterval(Ie.current.customTimed),clearTimeout(Ie.current.beforeTypingCalculations),clearTimeout(Ie.current.customTimed2),clearTimeout(Ie.current.replayTyping1),clearTimeout(Ie.current.replayTyping2),clearTimeout(Ie.current.filledStopwatch),Ie.current.replayTypingChars.forEach((function(e){return e&&clearTimeout(e)})),x.off())}}),[s]);var pt=function(e){13===e.keyCode&&(j?Rt():It(),window.scrollTo(0,0))};Object(p.useEffect)((function(){if(Te){Xe.current&&Xe.current.classList.add("gone"),document.addEventListener("keydown",pt,!1);var e=document.getElementsByClassName("wrapperScores");return 0!==e.length&&e[0].classList.add("opened"),function(){document.removeEventListener("keydown",pt,!1)}}}),[Te]),Object(p.useEffect)((function(){if(!Te){if("withoutCursor"===De&&Xe.current&&Xe.current.classList.add("gone"),Ke.current=document.getElementsByClassName("lettersTrack"),j){var e=Ke.current[de];e&&(ue=e.getBoundingClientRect().top)}if(null!==s&&"correctColor"===Ae)for(var t=Qe.current.indexTrackingBlocks===s.wordBlocks.length-1?s.wordBlocks[Qe.current.indexTrackingBlocks]:s.wordBlocks[Qe.current.indexTrackingBlocks]+" ",r=de;r<de+t.length-1;r++)Ke.current[r]&&Ke.current[r].classList.add("bottomBorder");if("withCursor"===De&&Ke.current[0]&&mt(),"noSteno"!==ze&&0===Oe)for(var n=fe.current.value.length,c=0;c<n;c++)Ke.current[c].classList.add(Ae)}}),[ye]);var mt=function(){Xe.current.animate([{top:Ke.current[0].offsetTop-6+"px",left:!1===(null===s||void 0===s?void 0:s.ltr)?Ke.current[0].offsetLeft+Ke.current[0].offsetWidth-5+"px":Ke.current[0].offsetLeft+Je.current-5+"px"}],{fill:"forwards",duration:"yesSmooth"===He?Ye:0})};function xt(e){var t=document.getElementsByClassName("currentTrack")[e.personalPosition],r=document.getElementsByClassName("speedNow")[e.personalPosition],n=document.getElementsByClassName("beforeTrackIndicator")[e.personalPosition];if(t){t.style.left=e.trackValue;var s=0===Qe.current.trackValue?"0":null!==e.trackValue.match(/\d*\.\d*%/g)?e.trackValue.match(/\d*\.\d*%/g)[0].slice(0,5).slice(0,-1):e.trackValue.match(/\d*%/g)[0].slice(0,-1);n.style.width=s+"%",r.innerHTML="".concat(e.speed," wpm")}}function ht(){var e=document.querySelector(".placeWon");e&&(e.innerHTML="FINISHED",e.classList.add("finished"))}Object(p.useEffect)((function(){if(0!==Qe.current.indexTrackingBlocks){var e=document.getElementById("steno");e&&(e.children[0].classList.add("correct"),e.children[1].classList.add("correct"),e.children[2].classList.add("correct"))}}),[ct]);var jt=function(e){return-1===oe.indexOf(e)?"1px":"7px"},gt=function(e){return-1===oe.indexOf(e)?"calc(100% - 21px)":"calc(100% - 26px)"};function ft(){if(Ie.current.beforeTypingCalculations&&clearTimeout(Ie.current.beforeTypingCalculations),Ie.current.restartStopwatchInterval&&clearInterval(Ie.current.restartStopwatchInterval),Ie.current.typingCalculator&&clearInterval(Ie.current.typingCalculator),Ie.current.replayTyping1&&clearTimeout(Ie.current.replayTyping1),Ie.current.customTimed&&clearInterval(Ie.current.customTimed),Ie.current.customTimed2&&clearTimeout(Ie.current.customTimed2),Ie.current.replayTyping2&&clearTimeout(Ie.current.replayTyping2),Ie.current.filledStopwatch&&clearTimeout(Ie.current.filledStopwatch),Ie.current.replayTypingChars&&Ie.current.replayTypingChars.forEac
1h((function(e){return e&&clearTimeout(e)})),function(){var e=document.getElementById("steno");e&&(e.style.display="block"),document.getElementById("biggerWrapperStopwatch").classList.remove("gone"),document.getElementById("stopper").classList.remove("fadeIn"),window.innerWidth<720&&(document.getElementById("trackTextWrapper").style.whiteSpace="nowrap");var t=document.querySelector(".placeWon");t&&t.classList.remove("finished"),fe.current.style.display="unset",fe.current.value="",fe.current.placeholder="Get ready to type the quote above",fe.current.disabled=!0,document.getElementById("filledStopwatch").style.animation="unset","withCursor"===De&&Ke.current[0]&&(Xe.current.classList.remove("gone"),mt()),Object(i.a)(Ke.current).forEach((function(e){e.classList.remove(Ae),e.classList.remove("wrong"),e.classList.remove("bottomBorder"),e.style.display="unset"})),"withRedBackground"===Ve&&document.getElementById("containerInput").classList.remove("wrong"),rt.current={},nt.current=null,Ce(!1);var n=document.querySelector(".currentTrack"),c=document.querySelector(".speedNow"),a=document.querySelector(".beforeTrackIndicator");if(n&&(n.style.left=jt(r[0].trackstyle),a.style.width="0%",c.innerHTML="0 wpm"),be.current.value=!1,be.current.arr=[],Qe.current={startTime:null,endTime:null,grossWPM:0,trackValue:0,accuracy:0,allCharacters:0,incorrectCharacters:0,indexTrackingBlocks:0,lastWordblockIndexForGraph:0,graphSpeed:[]},"yesSteno"===ze){var o=s.stenoStrokes.slice(Qe.current.indexTrackingBlocks,Qe.current.indexTrackingBlocks+4);at(o)}it.current={isDarkTheme:document.documentElement.classList.contains("Dark"),textColor:!!localStorage.getItem("textColor"),textBackgroundColor:!!localStorage.getItem("textBackgroundColor"),layoutColor:!!localStorage.getItem("layoutColor"),outerBackgroundColor:!!localStorage.getItem("backgroundColor"),inputColor:!!localStorage.getItem("inputColor"),backgroundImage:localStorage.getItem("backgroundImage")?localStorage.getItem("backgroundImage"):"",backgroundBlurness:localStorage.getItem("backgroundBlurness")?localStorage.getItem("backgroundBlurness"):0,smoothCursor:!localStorage.getItem("smoothCursor"),smoothnessSpeed:localStorage.getItem("smoothnessSpeed")?localStorage.getItem("smoothnessSpeed"):100,blinkCursor:!localStorage.getItem("blinkCursor"),font:localStorage.getItem("font")?localStorage.getItem("font"):"Montserrat"},de=0,pe=0,xe=0,me=0,je=!1,ge=0,he=0}(),ve(j?s.wordBlocks.slice(pe,pe+30):s.wordBlocks.slice(0,s.text.length)),"firstKey"===Fe)Se(0),fe.current.disabled=!1,fe.current.focus(),fe.current.setSelectionRange(0,9999),Ie.current.beforeTypingCalculations=setTimeout((function(){if(window.innerWidth>720){var e=Ke.current[de].getBoundingClientRect();ue=e.top}}),20),fe.current.placeholder="Waiting for your first key to start",fe.current.addEventListener("keydown",bt);else{var e=v?1:5;Se(e),Ie.current.filledStopwatch=setTimeout((function(){return document.getElementById("filledStopwatch").style.animation="trafficlight ".concat(e,"s forwards linear")})),Ie.current.restartStopwatchInterval=setInterval((function(){if(1===e){if(fe.current.disabled=!1,fe.current.focus(),fe.current.setSelectionRange(0,9999),document.getElementById("biggerWrapperStopwatch").classList.add("gone"),document.getElementById("stopper").classList.add("fadeIn"),Qe.current.indexTrackingBlocks>0)return alert("you fkn hacker nab, the race didn't start"),void wt();if(Ie.current.beforeTypingCalculations=setTimeout((function(){return kt()}),70),window.innerWidth>720){var t=Ke.current[de].getBoundingClientRect();ue=t.top}fe.current.placeholder="",clearInterval(Ie.current.restartStopwatchInterval)}e--,Se(e)}),1e3)}}function bt(){document.getElementById("biggerWrapperStopwatch").classList.add("gone"),document.getElementById("stopper").classList.add("fadeIn"),fe.current.placeholder="",clearTimeout(Ie.current.beforeTypingCalculations),clearInterval(Ie.current.typingCalculator),clearInterval(Ie.current.customTimed),clearTimeout(Ie.current.customTimed2),kt(),fe.current.removeEventListener("keydown",bt)}Object(p.useEffect)((function(){s&&ft()}),[Fe,s]);var kt=function(e,t){var n=0;e?n=t:Qe.current.startTime=Date.now();var c=document.getElementById("minutes"),a=document.getElementById("seconds");if(Ie.current.typingCalculator=setInterval((function(){if(Qe.current.endTime=Date.now(),!e){var t=s.wordBlocks.slice(Qe.current.lastWordblockIndexForGraph,Qe.current.indexTrackingBlocks);0!==t.length&&Qe.current.graphSpeed.push({wordblocks:t,speed:Qe.current.grossWPM,time:n}),Qe.current.lastWordblockIndexForGraph=Qe.current.indexTrackingBlocks}if(n+=.5,0===We&&n%1===0){var i=Math.floor(n/60),l=n%60;c.innerText=o(i),a.innerText=o(l)}var d=je?16667e-9*(Qe.current.endTime-Qe.current.startTimePlayback):16667e-9*(Qe.current.endTime-Qe.current.startTime),u=Math.round(xe/5/d);isNaN(u)&&(u=0),Qe.current.grossWPM=u;var p=0===Qe.current.trackValue?jt(r[0].trackstyle):"calc(".concat(Qe.current.trackValue,"% - 15px)");xt({speed:Qe.current.grossWPM,trackValue:p,personalPosition:0})}),500),0!==We){var i=We-1;Ie.current.customTimed=setInterval((function(){var e=Math.floor(i/60),t=i%60;c.innerText=o(e),a.innerText=o(t),i--}),1e3),Ie.current.customTimed2=setTimeout((function(){if(Qe.current.endTime=Date.now(),clearInterval(Ie.current.customTimed),Ie.current.restartStopwatchInterval&&clearInterval(Ie.current.restartStopwatchInterval),Ie.current.typingCalculator&&clearInterval(Ie.current.typingCalculator),Ie.current.replayTyping1&&clearTimeout(Ie.current.replayTyping1),Ie.current.replayTyping2&&clearTimeout(Ie.current.replayTyping2),Ie.current.filledStopwatch&&clearTimeout(Ie.current.filledStopwatch),Ie.current.replayTypingChars&&Ie.current.replayTypingChars.forEac
1h((function(e){return e&&clearTimeout(e)})),fe.current.disabled=!0,"yesSteno"===ze){var e=s.wordBlocks.slice(Qe.current.indexTrackingBlocks,Qe.current.indexTrackingBlocks+4),t=fe.current.value.split(" ").filter((function(e){return""!==e})),r=(t[0]===e[0]?t[1]===e[1]?t[2]===e[2]?t[3]===e[3]?4:3:2:1:-1)+Qe.current.indexTrackingBlocks;if(-1!==r)for(var n=Qe.current.indexTrackingBlocks;n<r;n++){var c=s.wordBlocks[n];de+=c.length+1,fe.current.value=t.slice(1,t.length).join(" "),xe+=c.length+1}}fe.current.value="","withRedBackground"===Ve&&document.getElementById("containerInput").classList.remove("wrong");var a=16667e-9*(Qe.current.endTime-Qe.current.startTime),i=Math.round(xe/5/a);Qe.current.grossWPM=i,Qe.current.trackValue=0,xt({speed:Qe.current.grossWPM,personalPosition:0}),ht(),Qe.current.incorrectCharacters=Qe.current.allCharacters-xe;var o=xe/Qe.current.allCharacters*100;Qe.current.accuracy=o%1===0?o:(o+"").split(".")[1]&&"0"===(o+"").split(".")[1][0]?Math.round(o):o.toFixed(1);var l=s.wordBlocks.slice(Qe.current.lastWordblockIndexForGraph,Qe.current.indexTrackingBlocks);0!==l.length&&Qe.current.graphSpeed.push({wordblocks:l,speed:Qe.current.grossWPM,time:+Qe.current.secondsWritten}),Ce(!0)}),1e3*i+1e3)}var o=function(e){return e<10?"0"+e:e}};Array.prototype.equals=function(e){if(!e)return!1;if(this.length!=e.length)return!1;for(var t=0,r=this.length;t<r;t++)if(this[t]instanceof Array&&e[t]instanceof Array){if(!this[t].equals(e[t]))return!1}else if(this[t]!=e[t])return!1;return!0};var yt=function(e,t){if(Oe>0)return alert("you fkn hacker nab, the race didn't start"),void wt();if(e.persist(),"yesBlink"===Ue&&Xe.current.classList.remove("blinking"),Te||(rt.current[Date.now()]=t),"yesSteno"!==ze){!function(e){e.nativeEvent.data&&Qe.current.allCharacters++,""===t&&"withRedBackground"===Ve&&document.getElementById("containerInput").classList.remove("wrong");var r=0,n=xe;for(be.current.value=!1;r<t.length&&n-me<s.text.length;)s.text[n]===t[r]?be.current.value?(Ke.current[n-me].classList.add("wrong"),Ke.current[n-me].classList.remove(Ae)):("withRedBackground"===Ve&&document.getElementById("containerInput").classList.remove("wrong"),Ke.current[n-me].classList.remove("wrong"),Ke.current[n-me].classList.add(Ae)):(be.current.value=!0,"withRedBackground"===Ve&&document.getElementById("containerInput").classList.add("wrong"),Ke.current[n-me]?(Ke.current[n-me].classList.remove(Ae),Ke.current[n-me].classList.add("wrong"),-1===be.current.arr.findIndex((function(e){return e===s.wordBlocks[Qe.current.indexTrackingBlocks]}))&&be.current.arr.push(s.wordBlocks[Qe.current.indexTrackingBlocks])):r=t.length),r++,n++;for(var c=de+t.length;c<he;c++)Ke.current[c]&&(Ke.current[c].classList.remove(Ae),Ke.current[c].classList.remove("wrong"));if(he=de+t.length,"withCursor"===De){var a=de+fe.current.selectionStart-1;if(-1===a&&mt(),!Ke.current[a])return;Xe.current.animate([{top:Ke.current[a].offsetTop-6+"px",left:!1===(null===s||void 0===s?void 0:s.ltr)?Ke.current[a].offsetLeft-4+"px":Ke.current[a].offsetLeft+Ke.current[a].offsetWidth+Je.current-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==He||be.current.value?0:Ye}),"yesBlink"===Ue&&Xe.current.classList.add("blinking")}}(e);var n=Qe.current.indexTrackingBlocks===s.wordBlocks.length-1?s.wordBlocks[Qe.current.indexTrackingBlocks]:s.wordBlocks[Qe.current.indexTrackingBlocks]+" ";if(0===Qe.current.indexTrackingBlocks&&"correctColor"===Ae)for(var c=de;c<de+n.length-1;c++)Ke.current[c].classList.add("bottomBorder");if(t.slice(0,n.length)===n){for(var a=!0;a;){if("correctColor"===Ae){for(var o=de;o<de+n.length-1;o++)Ke.current[o].classList.remove("bottomBorder");if(s.wordBlocks[Qe.current.indexTrackingBlocks+1])for(var l=Qe.current.indexTrackingBlocks+1===s.wordBlocks.length-1?s.wordBlocks[Qe.current.indexTrackingBlocks+1]:s.wordBlocks[Qe.current.indexTrackingBlocks+1]+" ",d=de+n.length;d<de+n.length+l.length-1;d++)Ke.current[d].classList.add("bottomBorder")}if(window.innerWidth<720){for(var u=de;u<de+n.length;u++)Ke.current[u].style.display="none";if("withCursor"===De){var p=de+n.length;Ke.current[p]&&Xe.current.animate([{top:Ke.current[p].offsetTop-6+"px",left:!1===(null===s||void 0===s?void 0:s.ltr)?Ke.current[p].offsetLeft+Ke.current[p].offsetWidth-4+"px":Ke.current[p].offsetLeft+Je.current-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==He||be.current.value?0:Ye})}j&&Qe.current.indexTrackingBlocks%20===0&&(pe=Qe.current.indexTrackingBlocks+1,ve(s.wordBlocks.slice(pe,pe+30)),me=me+de+n.length,de=0-n.length)}else if(j){var m=Ke.current[de+n.length];if(m)m.getBoundingClientRect().top!==ue&&(pe=Qe.current.indexTrackingBlocks+1,ve(s.wordBlocks.slice(pe,pe+30)),me=me+de+n.length,de=0-n.length)}if(de+=n.length,xe+=n.length,Qe.current.trackValue+=s.jumpingCarValue,Qe.current.indexTrackingBlocks++,fe.current.value=fe.current.value.slice(n.length,fe.current.value.length),n=Qe.current.indexTrackingBlocks===s.wordBlocks.length-1?s.wordBlocks[Qe.current.indexTrackingBlocks]:s.wordBlocks[Qe.current.indexTrackingBlocks]+" ",fe.current.value.slice(0,n.length)!==n){a=!1;for(var x=de+t.length;x<he;x++)Ke.current[x]&&(Ke.current[x].classList.remove(Ae),Ke.current[x].classList.remove("wrong"));he=de}}if(fe.current.value="",Qe.current.indexTrackingBlocks===s.wordBlocks.length){Qe.current.endTime=Date.now(),window.innerWidth<720&&(Object(i.a)(Ke.current).forEach((function(e){return e.style.display="unset"})),document.getElementById("trackTextWrapper").style.whiteSpace="normal"),fe.current.style.display="none",Qe.current.trackValue=100,fe.current.disabled=!0,clearInterval(Ie.current.typingCalculator);var h=je?16667e-9*(Qe.current.endTime-Qe.current.startTimePlayback):16667e-9*(Qe.current.endTime-Qe.current.startTime),g=Math.round(xe/5/h);Qe.current.grossWPM=g,xt({speed:Qe.current.grossWPM,trackValue:gt(r[0].trackstyle),personalPosition:0}),ht(),Qe.current.incorrectCharacters=Qe.current.allCharacters-s.text.length;var f=s.text.length/Qe.current.allCharacters*100;Qe.current.accuracy=f%1===0?f:(f+"").split(".")[1]&&"0"===(f+"").split(".")[1][0]?Math.round(f):f.toFixed(1);var b=(Qe.current.endTime-Qe.current.startTime)/1e3;if(Qe.current.secondsWritten=(b+"").split(".")[1]&&"0"===(b+"").split(".")[1][0]?Math.round(b):b.toFixed(2),!je){var k=s.wordBlocks.slice(Qe.current.lastWordblockIndexForGraph,Qe.current.indexTrackingBlocks);0!==k.length&&Qe.current.graphSpeed.push({wordblocks:k,speed:Qe.current.grossWPM,time:+Qe.current.secondsWritten})}je||v||(Ce(!0),ve(s.wordBlocks.slice(0,s.text.length)))}}}else!function(e,t){var n=s.wordBlocks.slice(Qe.current.indexTrackingBlocks,Qe.current.indexTrackingBlocks+4),c=t.split(" ").filter((function(e){return""!==e}));if(function(){e.nativeEvent.data&&Qe.current.allCharacters++;for(var r=function(e){var t=c.reduce((function(t,r,n){return n<e?t+r.length+1:t}),0);if(c[e]===n[e]){for(var r=t+xe;r<t+xe+c[e].length;r++)Ke.current[r-me]&&(Ke.current[r-me].classList.add(Ae),Ke.current[r-me].classList.remove("wrong"));
1"withRedBackground"===Ve&&document.getElementById("containerInput").classList.remove("wrong")}else{var s=n[e].search(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]/);if(-1!==s)if(c[e].slice(0,s)===n[e].slice(0,s)){for(var a=t+xe;a<t+xe+c[e].length;a++)Ke.current[a-me]&&(Ke.current[a-me].classList.add(Ae),Ke.current[a-me].classList.remove("wrong"));"withRedBackground"===Ve&&document.getElementById("containerInput").classList.remove("wrong"),c[e][s]&&n[e][s]!==c[e][s]&&(Ke.current[t+xe-me+c[e].slice(0,s).length].classList.add("wrong"),"withRedBackground"===Ve&&document.getElementById("containerInput").classList.add("wrong"))}else{for(var i=t+xe;i<t+xe+c[e].length;i++)Ke.current[i-me]&&(Ke.current[i-me].classList.add("wrong"),Ke.current[i-me].classList.remove(Ae));"withRedBackground"===Ve&&document.getElementById("containerInput").classList.add("wrong"),-1===n[e].toLowerCase().indexOf(c[e].toLowerCase())&&-1===be.current.arr.findIndex((function(t){return t===n[e]}))&&be.current.arr.push(n[e])}else{for(var o=t+xe;o<t+xe+c[e].length;o++)Ke.current[o-me]&&(Ke.current[o-me].classList.add("wrong"),Ke.current[o-me].classList.remove(Ae));"withRedBackground"===Ve&&document.getElementById("containerInput").classList.add("wrong"),-1===n[e].toLowerCase().indexOf(c[e].toLowerCase())&&-1===be.current.arr.findIndex((function(t){return t===n[e]}))&&be.current.arr.push(n[e])}}},a=0;a<c.length&&a<n.length;a++)r(a);for(var i=de+t.length;i<he+1;i++)Ke.current[i]&&(Ke.current[i].classList.remove(Ae),Ke.current[i].classList.remove("wrong"));if(he=de+t.length,"withCursor"===De){var o=de+fe.current.selectionStart-1;if(-1===o&&mt(),!Ke.current[o])return;Xe.current.animate([{top:Ke.current[o].offsetTop-6+"px",left:!1===(null===s||void 0===s?void 0:s.ltr)?Ke.current[o].offsetLeft-4+"px":Ke.current[o].offsetLeft+Ke.current[o].offsetWidth+Je.current-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==He||be.current.value?0:Ye})}var l=c[0]===n[0]?c[1]===n[1]?c[2]===n[2]?c[3]===n[3]?3:2:1:0:-1;if(-1!==l){for(var d=0;d<=l;d++)document.getElementById("steno").children[d]&&document.getElementById("steno").children[d].classList.add("correct");for(var u=l+1;u<3;u++)document.getElementById("steno").children[u]&&document.getElementById("steno").children[u].classList.remove("correct")}}(),n.equals(c)){if(c[1]&&c[2]){var a=c[0];if(j){var i=c.reduce((function(e,t){return e+t.length+1}),0),o=Ke.current[de+i];o&&o.getBoundingClientRect().top!==ue&&(pe=Qe.current.indexTrackingBlocks+1,ve(s.wordBlocks.slice(pe,pe+30)),me=me+de+(a.length+1),de=0-(a.length+1))}de+=a.length+1,xe+=a.length+1,fe.current.value=c.slice(1,c.length).join(" "),Qe.current.trackValue+=s.jumpingCarValue,Qe.current.indexTrackingBlocks++}var l=s.stenoStrokes.slice(Qe.current.indexTrackingBlocks,Qe.current.indexTrackingBlocks+4);if(at(l),document.getElementById("steno").children[3]&&document.getElementById("steno").children[3].classList.remove("correct"),s.wordBlocks.length-Qe.current.indexTrackingBlocks===3){Qe.current.endTime=Date.now();for(var d=1;d<c.length;d++)if(d===c.length-1){var u=c[d];de+=u.length,fe.current.value="",xe+=u.length,Qe.current.trackValue+=s.jumpingCarValue,Qe.current.indexTrackingBlocks++}else{var p=c[d];de+=p.length+1,fe.current.value=c.slice(1,c.length).join(" "),xe+=p.length+1,Qe.current.trackValue+=s.jumpingCarValue,Qe.current.indexTrackingBlocks++}at(s.stenoStrokes.slice(0,4)),document.getElementById("steno").style.display="none",fe.current.style.display="none",Qe.current.trackValue=100,fe.current.disabled=!0,clearInterval(Ie.current.typingCalculator);var m=je?16667e-9*(Qe.current.endTime-Qe.current.startTimePlayback):16667e-9*(Qe.current.endTime-Qe.current.startTime),x=Math.round(xe/5/m);Qe.current.grossWPM=x,xt({speed:Qe.current.grossWPM,trackValue:gt(r[0].trackstyle),personalPosition:0}),ht(),Qe.current.incorrectCharacters=Qe.current.allCharacters-s.text.length;var h=s.text.length/Qe.current.allCharacters*100;Qe.current.accuracy=h%1===0?h:(h+"").split(".")[1]&&"0"===(h+"").split(".")[1][0]?Math.round(h):h.toFixed(1);var g=(Qe.current.endTime-Qe.current.startTime)/1e3;if(Qe.current.secondsWritten=(g+"").split(".")[1]&&"0"===(g+"").split(".")[1][0]?Math.round(g):g.toFixed(2),!je){var f=s.wordBlocks.slice(Qe.current.lastWordblockIndexForGraph,Qe.current.indexTrackingBlocks);0!==f.length&&Qe.current.graphSpeed.push({wordblocks:f,speed:Qe.current.grossWPM,time:+Qe.current.secondsWritten})}je||v||(Ce(!0),ve(s.wordBlocks.slice(0,s.text.length)))}}if(j&&s.wordBlocks.length<=3&&n.equals(c)){Qe.current.endTime=Date.now(),at(s.stenoStrokes.slice(0,4)),document.getElementById("steno").style.display="none",fe.current.style.display="none",Qe.current.trackValue=100,fe.current.disabled=!0,clearInterval(Ie.current.typingCalculator),xe=s.text.length;var b=16667e-9*(Qe.current.endTime-Qe.current.startTime),k=Math.round(xe/5/b);Qe.current.grossWPM=k,xt({speed:Qe.current.grossWPM,trackValue:gt(r[0].trackstyle),personalPosition:0}),ht(),Qe.current.incorrectCharacters=Qe.current.allCharacters-s.text.length;var y=s.text.length/Qe.current.allCharacters*100;Qe.current.accuracy=y%1===0?y:(y+"").split(".")[1]&&"0"===(y+"").split(".")[1][0]?Math.round(y):y.toFixed(1);var w=(Qe.current.endTime-Qe.current.startTime)/1e3;Qe.current.secondsWritten=(w+"").split(".")[1]&&"0"===(w+"").split(".")[1][0]?Math.round(w):w.toFixed(2);var O=s.wordBlocks.slice(Qe.current.lastWordblockIndexForGraph,Qe.current.indexTrackingBlocks);0!==O.length&&Qe.current.graphSpeed.push({wordblocks:O,speed:Qe.current.grossWPM,time:+Qe.current.secondsWritten}),Ce(!0),ve(s.wordBlocks.slice(0,s.text.length))}}(e,t)},vt={init:function(){fe.current.style.display="unset";var e=document.querySelector(".currentTrack"),t=document.querySelector(".speedNow"),n=document.querySelector(".beforeTrackIndicator");e&&(e.style.left=jt(r[0].trackstyle),n.style.width="0%",t.innerHTML="0 wpm"),Object(i.a)(Ke.current).forEach((function(e){return e.classList.remove(Ae)})),fe.current.value="",nt.current||(nt.current=Math.min.apply(null,Object.keys(rt.current))-Qe.current.startTime),Qe.current={startTime:null,endTime:null,grossWPM:0,trackValue:0,accuracy:Qe.current.accuracy,allCharacters:Qe.current.allCharacters,incorrectCharacters:Qe.current.incorrectCharacters,indexTrackingBlocks:0,lastWordblockIndexForGraph:0,graphSpeed:[]},de=0,xe=0;var s=document.querySelector(".placeWon");s&&s.classList.remove("finished"),Ie.current.replayTyping1=setTimeout((function(){kt(),Ie.current.replayTyping2=setTimeout((function(){var e=null;for(var t in rt.current){if(e)var r=t-e;else{r=0;e=t}var n=setTimeout(vt.changeValueCallback(rt.current[t]),r);Ie.current.replayTypingChars.push(n)}}),nt.current)}),1e3)},startFromCertainPoint:function(e,t){Ie.current.replayTyping1=setTimeout((function(){clearInterval(Ie.current.restartStopwatchInterval),clearInterval(Ie.current.typingCalculator),clearInterval(Ie.current.customTimed),clearTimeout(Ie.current.customTimed2),clearTimeout(Ie.current.replayTyping1),clearTimeout(Ie.current.replayTyping2),clearTimeout(Ie.current.filledStopwatch),Ie.current.replayTypingChars.forEac
1h((function(e){return e&&clearTimeout(e)})),je=!0,kt(!0,t);var r=null;for(var n in e){if(r)var s=n-r;else{s=0;r=n}var c=setTimeout(vt.changeValueCallback(e[n]),s);Ie.current.replayTypingChars.push(c)}}),300)},changeValueCallback:function(e){return function(){if(fe.current&&(fe.current.value=e,fe.current.dispatchEvent(new Event("input",{bubbles:!0})),je)){document.getElementById("sliderRecord").value=++ge;var t=Object.keys(rt.current),r=Math.round(ge/(t.length-1)*100);document.getElementById("percentRace").innerHTML="".concat(r>100?100:r," / 100%"),ge===Object.keys(rt.current).length&&Wt(document.getElementById("playButton"))}}}},wt=function(){o(0)},Ot=function(e){if(-1===oe.indexOf(e))return{left:"1px"}},St=function(){var e=Object(a.a)(c.a.mark((function e(){var t,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("none"!==I){e.next=3;break}return k.b.error("You must be logged in to use this feature"),e.abrupt("return");case 3:if(null===Pe){e.next=5;break}return e.abrupt("return");case 5:return t={racetrackID:s._id},e.prev=6,e.next=9,g.a.post("/api/racetracks/fetchMyLatestTenScores",t,{headers:{"auth-token":I}});case 9:r=e.sent,Le(r.data),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),k.b.error(e.t0.response.data);case 16:case"end":return e.stop()}}),e,null,[[6,13]])})));return function(){return e.apply(this,arguments)}}();function Nt(e){return Tt.apply(this,arguments)}function Tt(){return(Tt=Object(a.a)(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.a.post("/api/racetracks/saveScorePracticePremium",t,{headers:{"auth-token":I}});case 3:r=e.sent,W(r.data.avgLast10),k.b.success("Successfully saved !"),r.data.didBreakToptime&&k.b.success(Object(l.jsxs)(m.a.Fragment,{children:[Object(l.jsx)("div",{style:{marginBottom:"30px"},children:"You have just broken a world record for this quote and got into the toptimes list."}),Object(l.jsx)("div",{children:"Congratulations! \ud83e\udd73"})]})),r.data.didBreakHighscore&&k.b.success(Object(l.jsxs)("div",{children:["You have just broken your fastest high score with ",Object(l.jsx)("b",{children:"".concat(Qe.current.grossWPM," wpm")})]})),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),k.b.error(e.t0.response.data);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}var Ct=function(e){if(Object.keys(rt.current)[0].length>6){for(var t=0,r=[],c=Object.keys(rt.current),a=0;a<c.length;a++){var i=t===s.wordBlocks.length-1?s.wordBlocks[t]:s.wordBlocks[t]+" ",o=c[a]-Qe.current.startTime<0?0:t===s.wordBlocks.length-1?(c[a]-Qe.current.startTime)/10:~~((c[a]-Qe.current.startTime)/10);if("steno"===e)-1!==rt.current[c[a]].indexOf(i)&&(r.push(o),t++);else{if(void 0!==rt.current[c[a-1]]){var l=s.wordBlocks[t-1]+" ";rt.current[c[a-1]].length-rt.current[c[a]].length!==-1&&rt.current[c[a-1]]!==l&&r.push({t:rt.current[c[a-1]].length-rt.current[c[a]].length+1})}-1!==i.indexOf(rt.current[c[a]])?(r.push(o),i===rt.current[c[a]]&&t++):r.push(Object(n.a)({},o,rt.current[c[a]]))}}return r}},It=function(){var e=Object(a.a)(c.a.mark((function e(){var t,r,n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.a.get("/api/racetracks/getRandomRacetrack/".concat(d),{headers:{"auth-sender":"typination"}});case 3:t=e.sent,r=t.data.text.split(" "),n="yesSteno"===ze?Object(C.a)(r):"",h(R(R({},t.data),{},{wordBlocks:r,jumpingCarValue:100/r.length,personalTrackNumber:0,stenoStrokes:n})),ve(r),ft(),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),k.b.error(e.t0.response.data);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}(),Bt=Object(p.useState)(j?"words25":""),Pt=Bt[0],Lt=Bt[1];Object(p.useEffect)((function(){if(j){if(Pt.startsWith("words")){var e=+Pt.match(/\d/g).join(""),t=le(T.a).slice(0,e),n=t.join(" "),s="yesSteno"===ze?Object(C.a)(t):"";h({ltr:!0,text:n,author:r[0].user,wordBlocks:t,jumpingCarValue:100/t.length,personalTrackNumber:0,stenoStrokes:s}),ve(t.slice(pe,pe+30)),Re(0)}if(Pt.startsWith("time")){var c=+Pt.match(/\d/g).join("");Re(c);var a=function(){for(var e=[],t=0;t<18;t++){var r=le(T.a);e=[].concat(Object(i.a)(e),Object(i.a)(r))}return e}(),o=a.join(" "),l="yesSteno"===ze?Object(C.a)(a):"";h({ltr:!0,text:o,author:r[0].user,wordBlocks:a,jumpingCarValue:100/a.length,personalTrackNumber:0,stenoStrokes:l}),ve(a.slice(pe,pe+30))}Pt.startsWith("custom")&&Re(0)}}),[Pt]);
1var Et=function(e){ge=e,Wt(document.getElementById("playButton"),!0),fe.current.style.display="unset";var t=document.querySelector(".placeWon");t&&t.classList.remove("finished");var n=Object.keys(rt.current),c=Math.round(ge/(n.length-1)*100);document.getElementById("percentRace").innerHTML="".concat(c>100?100:c," / 100%"),nt.current=n[0]-Qe.current.startTime;var a=nt.current+ +n[e]-n[0],o=!1,l=0,d=0;for(xe=0,de=0,me=0,Qe.current.trackValue=0;!o;){if(d===+e&&(o=!0),"yesSteno"===ze){var u=s.wordBlocks.slice(l,l+4),p=rt.current[n[d]].split(" ").filter((function(e){return""!==e}));if(u.equals(p)){if(p[1]&&p[2]){var m=p[0];de+=m.length+1,xe+=m.length+1,fe.current.value=p.slice(1,p.length).join(" "),Qe.current.trackValue+=s.jumpingCarValue,l++}if(s.wordBlocks.length-l===3){Qe.current.endTime=Date.now();for(var x=1;x<p.length;x++)if(x===p.length-1){var h=p[x];de+=h.length,fe.current.value="",xe+=h.length,Qe.current.trackValue+=s.jumpingCarValue,l++}else{var j=p[x];de+=j.length+1,fe.current.value=p.slice(1,p.length).join(" "),xe+=j.length+1,Qe.current.trackValue+=s.jumpingCarValue,l++}}}}else{var g=l===s.wordBlocks.length-1?s.wordBlocks[l]:s.wordBlocks[l]+" ";rt.current[n[d]]===g&&(l++,de+=g.length,xe+=g.length,Qe.current.trackValue+=s.jumpingCarValue)}d++}var f=rt.current[n[e]];fe.current.value=f;var b=16667e-9*a,k=Math.round(xe/5/b);isNaN(k)&&(k=0),Qe.current.grossWPM=k;var y=0===Qe.current.trackValue?jt(r[0].trackstyle):l===s.wordBlocks.length?gt(r[0].trackstyle):"calc(".concat(Qe.current.trackValue,"% - 15px)");xt({speed:Qe.current.grossWPM,trackValue:y,personalPosition:0}),Object(i.a)(Ke.current).forEach((function(e){e.classList.remove(Ae),e.classList.remove("wrong"),e.classList.remove("bottomBorder")}));for(var v=0;v<xe;v++)Ke.current[v]&&Ke.current[v].classList.add(Ae);if(f!==s.wordBlocks[l-1]+" "){be.current.value=!1;var w=0,O=xe;for(be.current.value=!1;w<f.length&&O<xe+f.length;)s.text[O]===f[w]?be.current.value?(Ke.current[O].classList.add("wrong"),Ke.current[O].classList.remove(Ae)):("withRedBackground"===Ve&&document.getElementById("containerInput").classList.remove("wrong"),Ke.current[O].classList.remove("wrong"),Ke.current[O].classList.add(Ae)):s.text[O]&&(be.current.value=!0,"withRedBackground"===Ve&&document.getElementById("containerInput").classList.add("wrong"),Ke.current[O]||(w=f.length),Ke.current[O]&&(Ke.current[O].classList.remove(Ae),Ke.current[O].classList.add("wrong"))),w++,O++}Qe.current.indexTrackingBlocks=l},Wt=function(e,t){var r=e.dataset.state;if("needToPlay"===r&&!t){0!==ge&&ge!==Object.keys(rt.current).length||Et(0);var n=Object.keys(rt.current),s=nt.current+ +n[ge]-n[0],c={};if(n.slice(ge,n.length).forEach((function(e){return c[e]=rt.current[e]})),1===Object.keys(c).length)return;Qe.current.startTimePlayback=Date.now()-s+302,vt.startFromCertainPoint(c,~~(s/1e3)),e.dataset.state="needToStop",e.src=K}("needToStop"===r||t)&&(clearInterval(Ie.current.restartStopwatchInterval),clearInterval(Ie.current.typingCalculator),clearInterval(Ie.current.customTimed),clearTimeout(Ie.current.customTimed2),clearTimeout(Ie.current.replayTyping1),clearTimeout(Ie.current.replayTyping2),clearTimeout(Ie.current.filledStopwatch),Ie.current.replayTypingChars.forEach((function(e){return e&&clearTimeout(e)})),e.dataset.state="needToPlay",e.src=J)},Rt=function(){if("custom"!==Pt){var e=Pt;Lt("loading"),setTimeout((function(){Lt(e)}),0)}else At()},Mt=Object(p.useRef)(),Ft=Object(p.useRef)(),_t=Object(p.useRef)(),At=function(){document.getElementById("customTextPicker").classList.remove("hidden"),Mt.current.focus()},Dt=function(){document.getElementById("customTextPicker").classList.add("hidden")};return Object(l.jsxs)(l.Fragment,{children:[Object(l.jsxs)("div",{className:"jsx-1997049125 "+((Te?j?"racingTemplate duringRace customPractice":"racingTemplate duringRace":j?"racingTemplate duringRace customPractice didntFinishRace":v?"racingTemplate duringRace didntFinishRace openedThemeSettings":"racingTemplate duringRace didntFinishRace")||""),children:[!Te&&Object(l.jsx)("div",{id:"backgroundImageTheme",onClick:function(){return fe.current.focus()},className:"jsx-1997049125"}),j?Object(l.jsx)("h1",{className:"jsx-1997049125 duringRace",children:"Custom Practice Mode"}):Object(l.jsx)(m.a.Fragment,{children:v?Object(l.jsx)("h1",{className:"jsx-1997049125 duringRace",children:"Skeleton Theme Mode"}):Object(l.jsx)("h1",{className:"jsx-1997049125 duringRace",children:"Practice Mode"})}),et&&Object(l.jsx)("div",{id:"darkness",className:"jsx-1997049125",children:Object(l.jsx)(N.a,{user:I,fetchResultsDB:Nt,dataToDeliver:Ze.current,goBackMenu:wt,setNeedsAnticheat:tt,toastConfirmedAnticheat:function(){k.b.success("Successfully verified anticheat")}})}),j&&Object(l.jsx)("div",{id:"customTextPicker",className:"jsx-1997049125 hidden",children:Object(l.jsxs)("div",{className:"jsx-1997049125",children:[Object(l.jsx)("div",{id:"xButton",onClick:function(){return Dt()},className:"jsx-1997049125",children:"X"}
1),Object(l.jsx)("div",{id:"title",className:"jsx-1997049125",children:"Custom Text"}),Object(l.jsx)("textarea",{type:"text",ref:Mt,required:!0,onChange:function(){return Mt.current.value=Mt.current.value.replace(/[\r\n]$/,"")},style:{fontSize:"16px"},className:"jsx-1997049125"}),Object(l.jsx)("label",{className:"jsx-1997049125 labelTitle",children:"Type of language"}),Object(l.jsxs)("div",{className:"jsx-1997049125 flexOptions",children:[Object(l.jsxs)("label",{className:"jsx-1997049125 containerOption",children:["Right to left (RTL)",Object(l.jsx)("input",{type:"checkbox",ref:Ft,onChange:function(){return Mt.current.style.direction="rtl",_t.current.checked=!1,void(Ft.current.checked||(Ft.current.checked=!0))},className:"jsx-1997049125"}),Object(l.jsx)("span",{className:"jsx-1997049125 checkmark"})]}),Object(l.jsxs)("label",{className:"jsx-1997049125 containerOption",children:["Left to right (LTR)",Object(l.jsx)("input",{type:"checkbox",ref:_t,onChange:function(){return Mt.current.style.direction="ltr",Ft.current.checked=!1,void(_t.current.checked||(_t.current.checked=!0))},defaultChecked:!0,className:"jsx-1997049125"}),Object(l.jsx)("span",{className:"jsx-1997049125 checkmark"})]})]}),Object(l.jsx)("button",{onClick:function(){return function(){if(""!==Mt.current.value){var e=Mt.current.value.replace(/\s*$/g,""),t=e.split(" "),n="yesSteno"===ze?Object(C.a)(t):"";h({ltr:!0===_t.current.checked,text:e,author:r[0].user,wordBlocks:t,jumpingCarValue:100/t.length,personalTrackNumber:0,stenoStrokes:n}),ve(t.slice(pe,pe+30)),Lt("custom"),Dt()}else k.b.error("You didn't fill in your racetrack text under custom text")}()},className:"jsx-1997049125 buttonOption",children:"Start Custom"})]})}),!Te&&Object(l.jsx)("div",{id:"finishedRaceDetails",className:"jsx-1997049125",children:Object(l.jsxs)("div",{className:"jsx-1997049125 buttonOptionsWrapper inBottom",children:[v?Object(l.jsxs)("button",{onClick:function(){return w(!1)},className:"jsx-1997049125 buttonOption",children:[Object(l.jsx)("img",{src:H,alt:"go back homepage",className:"jsx-1997049125"}),Object(l.jsx)("span",{className:"jsx-1997049125",children:"Back Homepage"})]}):Object(l.jsxs)("button",{onClick:function(){return wt()},className:"jsx-1997049125 buttonOption",children:[Object(l.jsx)("img",{src:H,alt:"go back homepage",className:"jsx-1997049125"}),Object(l.jsx)("span",{className:"jsx-1997049125",children:"Back Homepage"})]}),j&&Object(l.jsxs)("button",{onClick:function(){return Rt()},className:"jsx-1997049125 buttonOption",children:[Object(l.jsx)("img",{src:q,alt:"start over / practice this quote",className:"jsx-1997049125"}),"custom"!==Pt?Object(l.jsx)("span",{className:"jsx-1997049125",children:"Scramble Words"}):Object(l.jsx)("span",{className:"jsx-1997049125",children:"Start New Custom"})]}),"firstKey"===Fe?Object(l.jsxs)("button",{onClick:function(){return _e("stopwatchMode"),void localStorage.setItem("stopwatchPractice","stopwatchMode")},className:"jsx-1997049125 buttonOption",children:[Object(l.jsx)("img",{src:U,alt:"turn on stopwatch",className:"jsx-1997049125"}),Object(l.jsx)("span",{className:"jsx-1997049125",children:"Turn On Stopwatch Mode"})]}):Object(l.jsxs)("button",{onClick:function(){return _e("firstKey"),void localStorage.removeItem("stopwatchPractice")},className:"jsx-1997049125 buttonOption",children:[Object(l.jsx)("div",{className:"jsx-1997049125 turnOffStopwatchIcon",children:Object(l.jsx)("img",{src:U,alt:"turn off stopwatch",className:"jsx-1997049125"})}),Object(l.jsx)("span",{className:"jsx-1997049125",children:"Turn Off Stopwatch Mode"})]}),Object(l.jsxs)("button",{onClick:function(){return ft()},className:"jsx-1997049125 buttonOption",children:[Object(l.jsx)("img",{src:G,alt:"start over / practice this quote",className:"jsx-1997049125"}),Object(l.jsx)("span",{className:"jsx-1997049125",children:"Start Over"})]})]})}),Object(l.jsxs)("div",{className:"jsx-1997049125 "+(("yesShownDPs"===Ge?"wrapperRace":"wrapperRace noDPs")||""),children:[0!==We?Object(l.jsxs)(m.a.Fragment,{children:[Object(l.jsxs)("div",{id:"stopper",className:"jsx-1997049125",children:["Time remaining: ",Object(l.jsx)("span",{id:"minutes",className:"jsx-1997049125",children:"00"}),":",Object(l.jsx)("span",{id:"seconds",className:"jsx-1997049125",children:"00"})]}),Object(l.jsxs)("div",{style:{marginTop:"0px"},className:"jsx-1997049125 raceblock",children:[Object(l.jsx)("div",{className:"jsx-1997049125 currentTrack",children:Object(l.jsx)("div",{className:"jsx-1997049125 beforeTrackIndicator"})}),Object(l.jsx)("div",{style:{boxShadow:"0px 0px 3px 0px #000",padding:"10px 0",textAlign:"center",marginBottom:"-23px"},className:"jsx-1997049125 timedRaceSpeedIndicator",children:Object(l.jsx)("span",{style:{position:"static"},className:"jsx-1997049125 speedNow",children:"0 wpm"})})]})]}):Object(l.jsxs)(m.a.Fragment,{children:[Object(l.jsxs)("div",{id:"stopper",className:"jsx-1997049125",children:["Time passed: ",Object(l.jsx)("span",{id:"minutes",className:"jsx-1997049125",children:"00"}),":",Object(l.jsx)("span",{id:"seconds",className:"jsx-1997049125",children:"00"})]}),r.map((function(e,t){return Object(l.jsx)(m.a.Fragment,{children:Object(l.jsxs)("div",{className:"jsx-1997049125 "+((e.left?"raceblock left":"raceblock")||""),children:[Object(l.jsx)("div",{className:"jsx-1997049125 placeWon"}),Object(l.jsxs)("div",{className:"jsx-1997049125 lineTrackWrapper",children:[Object(l.jsx)("div",{className:"jsx-1997049125 beforeTrackIndicator"}),Object(l.jsx)("div",{style:(r=e.trackstyle,"Fairy"===r||"Crystal"===r?{backgroundImage:"url('".concat(Q,"')")}:"Flamey"===r?{backgroundImage:"url('".concat(Z,"')")}:"Electric"===r?{backgroundImage:"url('".concat($,"')")}:"Veiny"===r?{backgroundImage:"url('".concat(ee,"')")}:"Wavey"===r?{backgroundImage:"url('".concat(te,"')")}:"Tiger"===r?{backgroundImage:"url('".concat(re,"')")}:"RedPolygon"===r?{backgroundImage:"url('".concat(ne,"')")}:"Abstract"===r?{backgroundImage:"url('".concat(se,"')")}:"Artisitic"===r?{backgroundImage:"url('".concat(ce,"')")}:"Wood"===r?{backgroundImage:"url('".concat(ae,"')")}:"Parquet"===r?{backgroundImage:"url('".concat(ie,"')")}:void 0),className:"jsx-1997049125 "+("lineTrack "+e.trackstyle||!1),children:Object(l.jsxs)("div",{style:Ot(e.trackstyle),className:"jsx-1997049125 currentTrack",children:[Object(l.jsx)("img",{src:"none"===e.profilePic?F:e.profilePic,alt:"Profile picture",className:"jsx-1997049125 profilePictureRace"}
1),"none"!==e.link?Object(l.jsx)(b.a,{href:"/profile/[uniqueLink]",as:"/profile/".concat(e.link),children:Object(l.jsx)("a",{className:"jsx-1997049125 racersName",children:e.user})}):Object(l.jsx)("div",{className:"jsx-1997049125 racersName guest",children:e.user})]})})]}),Object(l.jsx)("span",{className:"jsx-1997049125 speedNow",children:"0 wpm"})]})},t);var r}))]}),Object(l.jsx)("div",{id:"biggerWrapperStopwatch",className:"jsx-1997049125",children:Object(l.jsxs)("div",{className:"jsx-1997049125 stopwatchWrapper",children:[Object(l.jsx)("div",{id:"filledStopwatch",className:"jsx-1997049125"}),0!==Oe?Object(l.jsxs)("span",{className:"jsx-1997049125",children:["Time to start: ",null===Oe?"12":Oe," seconds."]}):Object(l.jsx)("span",{className:"jsx-1997049125",children:"GO GO GO"})]})}),Object(l.jsxs)("div",{id:"trackTextWrapper",style:!1===(null===s||void 0===s?void 0:s.ltr)?{direction:"rtl",textAlign:"right"}:{direction:"ltr"},className:"jsx-1997049125 "+((!1===(null===s||void 0===s?void 0:s.ltr)?"rtl":"ltr")+(j?" pagination":"")||""),children:[Object(l.jsx)("span",{id:"cursor",ref:Xe,className:"jsx-1997049125 "+(("yesBlink"===Ue?"blinking":"")||""),children:"|"}),ye.map((function(e,t){return Object(l.jsxs)("pre",{className:"jsx-1997049125",children:[e.split("").map((function(e,t){return Object(l.jsx)("span",{className:"jsx-1997049125 lettersTrack",children:e},e+t)})),t!==s.wordBlocks.length-1&&Object(l.jsx)("span",{className:"jsx-1997049125 lettersTrack space",children:" "})]},e+t)}))]}),ct.length>0&&Object(l.jsx)("div",{id:"steno",className:"jsx-1997049125",children:ct.map((function(e){return Object(l.jsx)("span",{className:"jsx-1997049125",children:e},B.a.generate())}))}),Object(l.jsx)("div",{id:"containerInput",className:"jsx-1997049125",children:Object(l.jsx)("input",(t={type:"text",id:"userInputTrack",ref:fe,maxLength:"80",placeholder:"Get ready to type the quote above",disabled:!0,autoComplete:"off",autoCapitalize:"none",autoCorrect:"off",spellCheck:"false",onKeyDown:function(e){return function(e){if(13===e.keyCode&&(ft(),window.scrollTo(0,0)),!(37!==e.keyCode&&39!==e.keyCode||"withoutCursor"===De||/Android/i.test(navigator.userAgent))){e.persist();var t=37===e.keyCode?-1:1,r=de+fe.current.selectionStart-1+t;-1===r&&mt(),Ke.current[r]&&Xe.current.animate([{top:Ke.current[r].offsetTop-6+"px",left:!1===(null===s||void 0===s?void 0:s.ltr)?Ke.current[r].offsetLeft-4+"px":Ke.current[r].offsetLeft+Ke.current[r].offsetWidth+Je.current-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==He||be.current.value?0:Ye})}}(e)},onPaste:function(e){return e.preventDefault()},onInput:function(e){return yt(e,fe.current.value)}},Object(n.a)(t,"autoComplete","off"),Object(n.a)(t,"style",!1===(null===s||void 0===s?void 0:s.ltr)?{direction:"rtl",textAlign:"right"}:{direction:"ltr"}),Object(n.a)(t,"className","jsx-1997049125 "+(("wantsInvisibleInput"===qe?"invisible":void 0)||"")),t))}),Te&&Object(l.jsxs)("div",{id:"finishedRaceDetails",className:"jsx-1997049125",children:[Object(l.jsxs)("div",{id:"slideContainer",className:"jsx-1997049125",children:[Object(l.jsx)("div",{id:"replayTitle",className:"jsx-1997049125",children:"Replay Playback"}),Object(l.jsxs)("div",{id:"flexSlider",className:"jsx-1997049125",children:[Object(l.jsx)("img",{id:"playButton",src:J,alt:"play and stop playback",onClick:function(e){return Wt(e.target)},"data-state":"needToPlay",className:"jsx-1997049125"}),Object(l.jsxs)("div",{id:"infoReplay",className:"jsx-1997049125",children:["Click the button to play / pause the playback",Object(l.jsx)("div",{className:"jsx-1997049125",children:"Drag the slider to move forwards / backwards"})]}),Object(l.jsx)("div",{id:"percentRace",className:"jsx-1997049125",children:"0 / 100%"})]}),Object(l.jsx)("input",{type:"range",min:"0",max:Object.keys(rt.current).length-1,defaultValue:"0",step:"1",id:"sliderRecord",onChange:function(e){return Et(e.target.value)},className:"jsx-1997049125"})]}),Object(l.jsxs)("div",{className:"jsx-1997049125 buttonOptionsWrapper",children:[Object(l.jsxs)("button",{onClick:function(){return wt()},className:"jsx-1997049125 buttonOption",children:[Object(l.jsx)("img",{src:H,alt:"go back homepage",className:"jsx-1997049125"}),"Go back homepage"]}),Object(l.jsxs)("button",{onClick:ft,className:"jsx-1997049125 buttonOption",children:[Object(l.jsx)("img",{src:G,alt:"start over / practice this quote",className:"jsx-1997049125"}),"Start over"]}),Object(l.jsxs)("button",{onClick:function(){j?(de=0,pe=0,xe=0,me=0,clearInterval(Ie.current.restartStopwatchInterval),clearInterval(Ie.current.typingCalculator),clearInterval(Ie.current.customTimed),clearTimeout(Ie.current.customTimed2),clearTimeout(Ie.current.replayTyping1),clearTimeout(Ie.current.replayTyping2),clearTimeout(Ie.current.filledStopwatch),Ie.current.replayTypingChars.forEac
1h((function(e){return e&&clearTimeout(e)})),"yesSteno"===ze&&(document.getElementById("steno").style.display="block"),vt.init()):(document.getElementById("slideContainer").classList.add("shown"),Wt(document.getElementById("playButton")))},className:"jsx-1997049125 buttonOption",children:[Object(l.jsx)("img",{src:z,alt:"replay my typing",className:"jsx-1997049125"}),"Replay My Typing"]}),j?Object(l.jsxs)("button",{onClick:function(){return Rt()},className:"jsx-1997049125 buttonOption",children:[Object(l.jsx)("img",{src:q,alt:"start over / practice this quote",className:"jsx-1997049125"}),"custom"!==Pt?Object(l.jsx)("span",{className:"jsx-1997049125",children:"Scramble Words"}):Object(l.jsx)("span",{className:"jsx-1997049125",children:"Start New Custom"})]}):Object(l.jsxs)("button",{onClick:function(){return It()},className:"jsx-1997049125 buttonOption",children:[Object(l.jsx)("img",{src:Y,alt:"start over / practice this quote",className:"jsx-1997049125"}),"Practice new quote"]})]}),Object(l.jsx)("h3",{className:"jsx-1997049125",children:"Personal Typing Analysis"}),j?Object(l.jsxs)(m.a.Fragment,{children:["custom"===Pt&&Object(l.jsxs)("p",{className:"jsx-1997049125",children:["You've just typed a quote written by ",Object(l.jsxs)("i",{className:"jsx-1997049125",children:[s.author," (yourself)"]})," in custom practice mode."]}),Pt.startsWith("time")&&Object(l.jsxs)("p",{className:"jsx-1997049125",children:["You finished typing a timed race in ",Object(l.jsx)("b",{className:"jsx-1997049125",children:M(We)})," in custom practice mode."]}),Pt.startsWith("words")&&Object(l.jsxs)("p",{className:"jsx-1997049125",children:["You've just finished typing ",Object(l.jsxs)("b",{className:"jsx-1997049125",children:[s.wordBlocks.length," words"]})," in custom practice mode."]})]}):Object(l.jsxs)("p",{className:"jsx-1997049125",children:["You've just typed a quote written by ",Object(l.jsx)("i",{className:"jsx-1997049125",children:s.author})," in practice mode (record isn't saved)."]}),j&&Object(l.jsxs)("div",{id:"tipPressEnter",className:"jsx-1997049125",children:["* Tip: press ENTER during race to restart same race.",Object(l.jsx)("div",{className:"jsx-1997049125",children:"* Tip: press ENTER after you finished race to continue to new race."})]}),!j&&Object(l.jsxs)(m.a.Fragment,{children:[Object(l.jsxs)("div",{id:"tipPressEnter",className:"jsx-1997049125",children:["* Tip: press ENTER during race to restart same quote.",Object(l.jsx)("div",{className:"jsx-1997049125",children:"* Tip: press ENTER after you finished race to continue to new quote."})]}),"none"!==I&&Object(l.jsxs)("div",{id:"saveRecord",onClick:function(){return function(){var e=Ct("yesSteno"===ze?"steno":"");Ze.current={charactersTyped:Qe.current.allCharacters,totalRaceTime:Qe.current.endTime-Qe.current.startTime,racetrackID:s._id,speed:Qe.current.grossWPM,accuracy:Qe.current.accuracy,date:new Date,playback:e},Qe.current.grossWPM<100?Nt(Ze.current):function(){var e=Object(a.a)(c.a.mark((function e(){var t,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t={speed:Math.floor(.85*Qe.current.grossWPM)},e.next=4,g.a.post("/api/racetracks/isVerifiedAnticheat",t,{headers:{"auth-token":I}});case 4:return r=e.sent,e.abrupt("return",r.data);case 8:e.prev=8,e.t0=e.catch(0),k.b.error(e.t0.response.data);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}()().then((function(e){e?Nt(Ze.current):tt(!0)}))}()},className:"jsx-1997049125",children:["Click here to save your record",Object(l.jsx)("div",{className:"jsx-1997049125",children:"(Available once per day for premium members)"})]}),"none"===I&&Object(l.jsx)(b.a,{href:"/signin",children:Object(l.jsx)("a",{style:{color:"#5480ff",fontWeight:"bold",textAlign:"center",display:"block",border:"1px solid black",padding:"5px",margin:"15px 0"},className:"jsx-1997049125 guestSignUp",children:"To register and save your records you can sign up by clicking here"})})]}),Object(l.jsxs)("div",{className:"jsx-1997049125 wrapperScores",children:[Object(l.jsxs)("div",{className:"jsx-1997049125 needSmallFont",children:[Object(l.jsx)("img",{src:V,className:"jsx-1997049125"}),Object(l.jsxs)("div",{className:"jsx-1997049125 specificScore",children:[Object(l.jsxs)("b",{className:"jsx-1997049125",children:[Object(l.jsxs)("div",{className:"jsx-1997049125 "+((Qe.current.allCharacters!==s.text.length?"incorrectChars":"correctChars")||""),children:[Qe.current.allCharacters," total"]}),j&&0!==We?Object(l.jsxs)("div",{className:"jsx-1997049125 correctChars",children:[xe," correct"]}):Object(l.jsxs)("div",{className:"jsx-1997049125 correctChars",children:[s.text.length," correct"]})]}),Object(l.jsx)("span",{className:"jsx-1997049125",children:"Characters"})]})]}),Object(l.jsxs)("div",{className:"jsx-1997049125",children:[Object(l.jsx)("img",{src:D,className:"jsx-1997049125"}),Object(l.jsxs)("div",{className:"jsx-1997049125 specificScore",children:[Object(l.jsx)("b",{className:"jsx-1997049125",children:Qe.current.grossWPM}),Object(l.jsx)("span",{className:"jsx-1997049125",children:"WPM"})]})]}),Object(l.jsxs)("div",{className:"jsx-1997049125",children:[Object(l.jsx)("img",{src:_,className:"jsx-1997049125"}),Object(l.jsxs)("div",{className:"jsx-1997049125 specificScore",children:[Object(l.jsxs)("b",{className:"jsx-1997049125",children:[isNaN(Qe.current.accuracy)?"0":Qe.current.accuracy,"%"]}),Object(l.jsx)("span",{className:"jsx-1997049125",children:"Accuracy"})]})]}),Object(l.jsxs)("div",{className:"jsx-1997049125 needSmallFont",children:[Object(l.jsx)("img",{src:A,className:"jsx-1997049125"}),Object(l.jsxs)("div",{className:"jsx-1997049125 specificScore",children:[j&&0!==We?Object(l.jsx)("b",{className:"jsx-1997049125",children:M(We)}):Object(l.jsx)("b",{className:"jsx-1997049125",children:function(e){if(e<60)return"".concat(e," seconds");var t=Math.floor(e/60),r=t>1?"minutes":"minute",n=e%60,s=n>1?"seconds":"second";if(n%1===0){var c=n;return"".concat(t," ").concat(r,", ").concat(c," ").concat(s)}var a=(n+"").split(".")[1]&&"0"===(n+"").split(".")[1][0]?Math.round(n):n.toFixed(2);return"".concat(t," ").concat(r,", ").concat(a," ").concat(s)}(Qe.current.secondsWritten)}),Object(l.jsx)("span",{className:"jsx-1997049125",children:"Time finished"})]})]})]}),Object(l.jsx)(O.a,{typing:Qe}),0===be.current.arr.length?Object(l.jsxs)("div",{className:"jsx-1997049125",children:["You got ",Object(l.jsx)("b",{className:"jsx-1997049125",children:Qe.current.incorrectCharacters})," typos and in total ",Object(l.jsx)("b",{className:"jsx-1997049125",children:be.current.arr.length})," incorrect words, congratulations \ud83d\udc4f!"]}):Object(l.jsxs)(m.a.Fragment,{children:[1===be.current.arr.length?Object(l.jsxs)("div",{className:"jsx-1997049125",children:["You got ",Object(l.jsx)("b",{className:"jsx-1997049125",children:Qe.current.incorrectCharacters})," typos and in total only ",Object(l.jsx)("b",{className:"jsx-1997049125",children:be.current.arr.length})," incorrect word:"]}):Object(l.jsxs)("div",{className:"jsx-1997049125",children:["You got ",Object(l.jsx)("b",{className:"jsx-1997049125",children:Qe.current.incorrectCharacters})," typos and in total ",Object(l.jsx)("b",{className:"jsx-1997049125",children:be.current.arr.length})," incorrect words:"]}),Object(l.jsx)("ul",{id:"mistakesList",className:"jsx-1997049125",children:be.current.arr.map((function(e){return Object(l.jsx)("li",{className:"jsx-1997049125",children:e},e)}))})]}),!j&&Object(l.jsxs)(m.a.Fragment,{children:[null===Pe?Object(l.jsxs)("div",{id:"showMyLatestScores",onClick:function(){return St()},className:"jsx-1997049125",children:[Object(l.jsx)("b",{className:"jsx-1997049125",children:"Click here"})," to see your 10 last scores for this specific racetrack"]}):Object(l.jsx)("div",{id:"showMyLatestScores",style:{cursor:"unset"}
1,className:"jsx-1997049125",children:Object(l.jsx)("b",{className:"jsx-1997049125",children:"Your Latest 10 Scores For This Quote"})}),Object(l.jsx)("div",{id:"wrapperLatestTenScores",className:"jsx-1997049125 "+((null===Pe?"hidden":void 0)||""),children:null!==Pe&&Object(l.jsx)(m.a.Fragment,{children:0===Pe.length?Object(l.jsx)("div",{className:"jsx-1997049125",children:"You don't have any saved records for this specific racetrack."}):Object(l.jsxs)("table",{className:"jsx-1997049125",children:[Object(l.jsx)("thead",{className:"jsx-1997049125",children:Object(l.jsxs)("tr",{className:"jsx-1997049125",children:[Object(l.jsx)("th",{className:"jsx-1997049125",children:"No."}),Object(l.jsx)("th",{className:"jsx-1997049125",children:"Speed"}),Object(l.jsx)("th",{className:"jsx-1997049125",children:"Accuracy"}),Object(l.jsx)("th",{className:"jsx-1997049125",children:"Date"})]})}),Object(l.jsx)("tbody",{className:"jsx-1997049125",children:Pe.map((function(e,t){return Object(l.jsxs)("tr",{className:"jsx-1997049125",children:[Object(l.jsx)("td",{className:"jsx-1997049125",children:t+1}),Object(l.jsx)("td",{className:"jsx-1997049125",children:"".concat(e.speed," wpm")}),Object(l.jsx)("td",{className:"jsx-1997049125",children:"".concat(e.accuracy,"%")}),Object(l.jsx)("td",{"data-type":"date",className:"jsx-1997049125",children:new Date(e.date).toLocaleDateString("en-GB")})]},e._id)}))})]})})}),Object(l.jsx)(S.a,{trackInfo:s})]})]})]})]}),j&&Object(l.jsxs)("div",{id:"customPracticeModes",className:"jsx-1997049125",children:[Object(l.jsxs)("div",{className:"jsx-1997049125 specificModeCustom",children:[Object(l.jsx)("span",{className:"jsx-1997049125 "+((Pt.startsWith("words")?"picked":void 0)||""),children:"Words"}),Object(l.jsxs)("div",{className:"jsx-1997049125",children:[Object(l.jsx)("div",{onClick:function(){return Lt("words10")},className:"jsx-1997049125 "+(("words10"===Pt?"picked":void 0)||""),children:"10"}),Object(l.jsx)("div",{onClick:function(){return Lt("words25")},className:"jsx-1997049125 "+(("words25"===Pt?"picked":void 0)||""),children:"25"}),Object(l.jsx)("div",{onClick:function(){return Lt("words50")},className:"jsx-1997049125 "+(("words50"===Pt?"picked":void 0)||""),children:"50"}),Object(l.jsx)("div",{onClick:function(){return Lt("words75")},className:"jsx-1997049125 "+(("words75"===Pt?"picked":void 0)||""),children:"75"}),Object(l.jsx)("div",{onClick:function(){return Lt("words100")},className:"jsx-1997049125 "+(("words100"===Pt?"picked":void 0)||""),children:"100"}),Object(l.jsx)("div",{onClick:function(){return Lt("words125")},className:"jsx-1997049125 "+(("words125"===Pt?"picked":void 0)||""),children:"125"})]})]}),Object(l.jsxs)("div",{className:"jsx-1997049125 specificModeCustom",children:[Object(l.jsx)("span",{className:"jsx-1997049125 "+((Pt.startsWith("time")?"picked":void 0)||""),children:"Time"}),Object(l.jsxs)("div",{className:"jsx-1997049125",children:[Object(l.jsx)("div",{onClick:function(){return Lt("time10")},className:"jsx-1997049125 "+(("time10"===Pt?"picked":void 0)||""),children:"10s"}),Object(l.jsx)("div",{onClick:function(){return Lt("time30")},className:"jsx-1997049125 "+(("time30"===Pt?"picked":void 0)||""),children:"30s"}),Object(l.jsx)("div",{onClick:function(){return Lt("time60")},className:"jsx-1997049125 "+(("time60"===Pt?"picked":void 0)||""),children:"60s"}),Object(l.jsx)("div",{onClick:function(){return Lt("time600")},className:"jsx-1997049125 "+(("time600"===Pt?"picked":void 0)||""),children:"10m"}),Object(l.jsx)("div",{onClick:function(){return Lt("time1800")},className:"jsx-1997049125 "+(("time1800"===Pt?"picked":void 0)||""),children:"30m"}),Object(l.jsx)("div",{onClick:function(){return Lt("time3200")},className:"jsx-1997049125 "+(("time3200"===Pt?"picked":void 0)||""),children:"60m"})]})]}),Object(l.jsx)("div",{className:"jsx-1997049125 specificModeCustom",children:Object(l.jsx)("span",{onClick:function(){return At()},className:"jsx-1997049125 "+((Pt.startsWith("custom")?"picked":void 0)||""),children:"Custom"})})]}),(!Te&&!j||v)&&Object(l.jsxs)(m.a.Fragment,{children:[Object(l.jsxs)("div",{id:"openChangeThemeSettings",onClick:ut,className:"jsx-1997049125",children:[Object(l.jsx)("img",{src:X,alt:"Change Theme Settings",title:"Change Theme Settings",className:"jsx-1997049125"}),Object(l.jsx)("span",{className:"jsx-1997049125",children:"Theme"})]}),Object(l.jsx)(E.a,{styleOfText:Ae,wantsCursor:De,wantsRedBackgroun
1dInput:Ve,wantsVisibleInput:qe,wantsShownDPs:Ge,cursorDOM:Xe,setChangedThemeDisplay:dt,offsetFontCursor:Je,isCustom:it.current,fromHomepageChangeTheme:v})]}),!Te&&!j&&!v&&Object(l.jsxs)(m.a.Fragment,{children:[Object(l.jsxs)("div",{id:"openChangeThemeSettings",onClick:ut,className:"jsx-1997049125",children:[Object(l.jsx)("img",{src:X,alt:"Change Theme Settings",title:"Change Theme Settings",className:"jsx-1997049125"}),Object(l.jsx)("span",{className:"jsx-1997049125",children:"Theme"})]}),Object(l.jsx)(E.a,{styleOfText:Ae,wantsCursor:De,wantsRedBackgroundInput:Ve,wantsVisibleInput:qe,cursorDOM:Xe,setChangedThemeDisplay:dt,offsetFontCursor:Je,isCustom:it.current,fromHomepageChangeTheme:v}),Object(l.jsx)("div",{className:"jsx-1997049125 racingTemplate raceDidntStart",children:Object(l.jsx)("div",{className:"jsx-1997049125 wrapperRace",children:Object(l.jsx)("div",{id:"finishedRaceDetails",className:"jsx-1997049125",children:Object(l.jsx)(S.a,{trackInfo:s})})})})]}),!v&&Object(l.jsx)("div",{id:"containerWrapperLeaderboard",style:{marginTop:"80px"},className:"jsx-1997049125",children:Object(l.jsx)("div",{id:"wrapperLeaderboard",className:"jsx-1997049125",children:Object(l.jsx)(P.a,{latestScores:f})})}),Object(l.jsx)(u.a,{id:"1997049125",children:["#customPracticeModes.jsx-1997049125{position:absolute;left:0;top:43px;color:#bbbbbb;background:#2d2d2d;padding:5px;border-bottom-right-radius:35px;padding:0px 15px 0px 3px;font-weight:600;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}",".specificModeCustom.jsx-1997049125{position:relative;padding:8px 11px;cursor:pointer;}",".specificModeCustom.jsx-1997049125 span.picked.jsx-1997049125,.specificModeCustom.jsx-1997049125>div.jsx-1997049125>div.picked.jsx-1997049125{color:#5dc38f;}",".specificModeCustom.jsx-1997049125:nth-child(1),.specificModeCustom.jsx-1997049125:nth-child(2){border-right:1px solid black;}",".specificModeCustom.jsx-1997049125>div.jsx-1997049125{position:absolute;text-align:center;top:100%;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);background:#2d2d2d;width:100%;border-bottom-left-radius:10px;border-bottom-right-radius:10px;cursor:pointer;opacity:0;-webkit-transition:opacity 100ms;transition:opacity 100ms;pointer-events:none;}",".specificModeCustom.jsx-1997049125:hover>div.jsx-1997049125,.specificModeCustom.jsx-1997049125>div.jsx-1997049125>div.jsx-1997049125:hover{opacity:1;pointer-events:auto;}",".specificModeCustom.jsx-1997049125>div.jsx-1997049125>div.jsx-1997049125{padding:5px 0px;-webkit-transition:background 350ms;transition:background 350ms;}",".specificModeCustom.jsx-1997049125>div.jsx-1997049125>div.jsx-1997049125:not(.picked):hover{background:#525252;}","#customTextPicker.jsx-1997049125{position:fixed;top:0;left:0;width:100%;height:100vh;background:rgba(0,0,0,0.6);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:7;opacity:1;-webkit-transition:opacity 400ms;transition:opacity 400ms;}","#customTextPicker.hidden.jsx-1997049125{opacity:0;z-index:-1;visibility:hidden;}","#customTextPicker.jsx-1997049125>div.jsx-1997049125{min-width:550px;background:white;position:relative;text-align:center;padding:15px 21px 0px 53px;border-bottom-right-radius:15px;border-bottom-left-radius:15px;overflow:hidden;position:relative;border-radius:30px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}","@media screen and (max-width:600px){#customTextPicker.jsx-1997049125>div.jsx-1997049125{min-width:unset;width:98%;}}","#customTextPicker.jsx-1997049125 #title.jsx-1997049125{font-size:22px;font-weight:600;margin-bottom:15px;}","#customTextPicker.jsx-1997049125 #xButton.jsx-1997049125{position:absolute;
1left:0;height:100%;top:0;cursor:pointer;padding:5px 10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1;font-weight:600;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background:#9fced2;color:#020202;box-shadow:0px 0px 3px 0px #000;}","#customTextPicker.jsx-1997049125 .buttonOption.jsx-1997049125{width:calc(100% + 50px);position:relative;left:-24px;margin-left:auto;margin-right:auto;margin-bottom:0;}","#customTextPicker.jsx-1997049125 label.jsx-1997049125{margin-top:10px;font-weight:600;}",".containerOption.jsx-1997049125{display:block;position:relative;padding-left:35px;cursor:pointer;font-size:17px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-weight:normal;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:15px auto;}",".containerOption.jsx-1997049125 input.jsx-1997049125{position:absolute;opacity:0;cursor:pointer;height:0;width:0;}",".checkmark.jsx-1997049125{position:absolute;top:0;left:0;height:25px;width:25px;background-color:#eee;box-shadow:0px 0px 0px 1px #000;}",".containerOption.jsx-1997049125:hover input.jsx-1997049125~.checkmark.jsx-1997049125{background-color:#ccc;}",".containerOption.jsx-1997049125 input.jsx-1997049125:checked~.checkmark.jsx-1997049125{background-color:#2196F3;}",'.checkmark.jsx-1997049125:after{content:"";position:absolute;display:none;}',".containerOption.jsx-1997049125 input.jsx-1997049125:checked~.checkmark.jsx-1997049125:after{display:block;}",".containerOption.jsx-1997049125 .checkmark.jsx-1997049125:after{left:9px;top:5px;width:5px;height:10px;border:solid white;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);}",".containerOption.jsx-1997049125 input.jsx-1997049125,.containerOption.jsx-1997049125 textarea.jsx-1997049125{width:90%;background:#f5f5f5;border:1px solid #828282;display:block;margin:12px 0;padding:7px 5px;margin:0 auto;margin-bottom:15px;outline:none;}",".turnOffStopwatchIcon.jsx-1997049125{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;position:relative;}",'.turnOffStopwatchIcon.jsx-1997049125:after{content:"";position:absolute;left:0;top:0;width:100%;height:100%;background:linear-gradient(to top left,rgba(0,0,0,0) 0%,rgba(0,0,0,0) calc(50% - 0.8px),rgb(20 20 20) 50%,rgba(0,0,0,0) calc(50% + 0.8px),rgba(0,0,0,0) 100%);}',"#darkness.jsx-1997049125{position:fixed;left:0;top:0;width:100vw;height:100vh;background:rgba(0,0,0,0.6);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:5;}","#trackTextWrapper.pagination.jsx-1997049125{max-height:95px;overflow:hidden;}"]})]})},be=r("ujeT"),ke=r("tOyP"),ye=r("t8/t"),ve=function(e){var t,r=e.user,n=e.setWantsSpinWheel,s=Object(p.useRef)({first:null,second:null}),i=0,o=!1,d=[1,4,2,7,5,9,2,1,8,4,10,3],m=["#F84","#8F4","#48F","#F8F"],x=null,h=null;function j(e){var r=document.getElementById("myCanvas"),n=Math.min(innerWidth,innerHeight)/2.25|0;if(null===x){x=[];for(var s=0;s<d.length;s++){var c=document.createElement("canvas");c.width=c.height=2*n+10;var a=c.getContext("2d"),i=5+n,o=5+n;(t=a.createRadialGradient(i,o,0,i,o,n)).addColorStop(0,"rgba(0,0,0,0)"),t.addColorStop(1,"rgba(0,0,0,0.5)");for(var l=0;l<d.length;l++){var u=2*Math.PI*l/d.length,p=u+2*Math.PI/(0==l?1:d.length),j=2*Math.PI*(l+.5)/d.length;a.beginPath(),a.moveTo(i,o),a.arc(i,o,n,u,p,!1),a.fillStyle=m[l%4],a.fill(),a.fillStyle=t,a.fill(),a.save(),l==s?(a.fillStyle="#FFF",a.shadowColor="#FFF",a.shadowBlur=n/20):(a.fillStyle="#AAA",a.shadowColor="#000",a.shadowBlur=n/100),a.font="bold "+n/d.length*1.6+"px serif",a.textAlign="center",a.textBaseline="middle",a.translate(i,o),a.rotate(j),a.fillText("".concat(d[l]," ").concat(1===d[l]?"coin":"coins"),.7*n,0),a.restore(
1)}x.push(c)}}if(null===h){(h=document.createElement("canvas")).width=h.height=10+2*n*1.25|0;var g=h.getContext("2d"),f=h.width/2,b=h.height/2;g.shadowOffsetX=n/80,g.shadowOffsetY=n/80,g.shadowBlur=n/40,g.shadowColor="rgba(0,0,0,0.7)",g.beginPath(),g.arc(f,b,1.025*n,0,2*Math.PI,!0),g.arc(f,b,.975*n,0,2*Math.PI,!1),g.fillStyle="#444",g.fill(),g.shadowOffsetX=n/40,g.shadowOffsetY=n/40,function(){var e=new Image;e.src=ye,e.onload=function(){g.save(),g.rotate(1.06*Math.PI),g.drawImage(e,0-n/4.1,0-n/4,n/2,n/2),g.restore()}}(),g.fillStyle=t,g.beginPath(),g.arc(f,b,n/3.5,0,2*Math.PI,!1),g.fill(),g.translate(f,b),g.rotate(Math.PI-.2),function(){var e=new Image;e.src=ke,e.onload=function(){g.save(),g.rotate(1.1*Math.PI),g.translate(-Math.PI,1),g.drawImage(e,.7*n,.7*-n,n/3,n/3),g.restore()}}()}if(null!==r){r.width=innerWidth,r.height=innerHeight;var k=innerWidth/2,y=innerHeight/2,v=r.getContext("2d"),w=Math.floor((-.2-e)*d.length/(2*Math.PI))%d.length;w<0&&(w+=d.length),v.save(),v.translate(k,y),v.rotate(e),v.translate(-x[w].width/2,-x[w].height/2),v.drawImage(x[w],0,0),v.restore(),v.drawImage(h,k-h.width/2,y-h.height/2)}}function f(e,t){var n=-.2-2*(.5+e)*Math.PI/d.length,l=i-2*Math.floor(i/(2*Math.PI))*Math.PI-10*Math.PI;!function(e){var t=performance.now();requestAnimationFrame((function r(n){var s=(n-t)/e.duration;s>1&&(s=1);var c=e.timing(s);e.draw(c),s<1&&requestAnimationFrame(r)}))}({duration:3e3,timing:function(e){return Math.pow(e,2)*(2.3*e-1.3)},draw:function(e){j(i=l+e*(n-l))}}),s.current.first=setTimeout((function(){var e=performance.now();requestAnimationFrame((function t(){var r=performance.now(),s=Math.min(1,(r-e)/6e3);s=--s*s*s+1,j(i=l+s*(n-l)),s<1?requestAnimationFrame(t):o=!1}))}),2e3),s.current.second=setTimeout(Object(a.a)(c.a.mark((function t(){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={earnedCoins:d[e]},t.next=3,g.a.post("/api/profile/startSpinWheel",n,{headers:{"auth-token":r}});case 3:"EARNED"===t.sent.data&&k.b.success("You won ".concat(d[e]," ").concat(1===d[e]?"coin":"coins"," ! \ud83e\udd73"));case 5:case"end":return t.stop()}}),t)}))),t),o=!0}Object(p.useEffect)((function(){return j(i),function(){clearTimeout(s.current.first),clearTimeout(s.current.second)}}),[]);var b=function(){var e=Object(a.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("none"!==r){e.next=3;break}return k.b.error("You must be logged in to use this feature"),e.abrupt("return");case 3:return e.prev=3,e.next=6,g.a.get("/api/profile/canSpinWheel",{headers:{"auth-token":r}});case 6:e.sent.data&&(o||f(Math.random()*d.length|0,8e3)),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),k.b.error(e.t0.response.data);case 13:case"end":return e.stop()}}),e,null,[[3,10]])})));return function(){return e.apply(this,arguments)}}();return Object(l.jsxs)("div",{id:"spinWheelContainer",className:"jsx-4260938890",children:[Object(l.jsx)("div",{style:{margin:"0 auto"},className:"jsx-4260938890",children:Object(l.jsxs)("div",{id:"canvasContainer",className:"jsx-4260938890",children:[Object(l.jsx)("canvas",{id:"myCanvas",width:"500",height:"500",className:"jsx-4260938890",children:"Canvas not supported, please user another browser."}),Object(l.jsx)("div",{id:"closeButton",alt:"close button",onClick:function(){return n(!1)},className:"jsx-4260938890",children:"X"}),Object(l.jsx)("div",{id:"spinWheelButton",onClick:function(){return b()},className:"jsx-4260938890 buttonOption",children:"Spin The Wheel"})]})}),Object(l.jsx)(u.a,{id:"4260938890",children:["#spinWheelContainer.jsx-4260938890{background:rgba(0,0,0,0.7);position:fixed;top:0;left:0;width:100%;height:100vh;z-index:7;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}","#canvasContainer.jsx-4260938890{background:#2d2d2d;max-width:100%;margin:0 auto;position:relative;border-radius:35px;overflow:hidden;}","#closeButton.jsx-4260938890{font-weight:600;position:absolute;top:0;left:-2px;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;
1-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background:#9fced2;color:#020202;cursor:pointer;box-shadow:0px 0px 3px 0px #000;z-index:5;padding:5px 15px;}","#spinWheelButton.jsx-4260938890{text-align:center;padding:15px;cursor:pointer;margin:0;width:100%;}","#prizePointer.jsx-4260938890{position:absolute;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);top:10px;z-index:999;}","#myCanvas.jsx-4260938890{z-index:1;max-width:100%;max-height:80vh;min-height:45vh;object-fit:cover;}","@media screen and (max-width:630px){#canvasContainer.jsx-4260938890{max-height:57vh;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:95vw;}#myCanvas.jsx-4260938890{width:100%;max-height:inherit;}}"]})]})},we=m.a.memo(ve),Oe=r("aIN1"),Se=r("8Kt/"),Ne=r.n(Se),Te=r("fm9w"),Ce=r("uL3l");function Ie(e){var t=e.openedChangeThemeHomepage,r=e.setOpenedChangeThemeHomepage,n=e.trackInfo,s=e.racersList,c=e.setRacersList,a=e.setTrackInfo,i=e.getName,o=e.socket,d=function(){r(!0),i().then((function(e){c([e]);var t="This is a page meant to help you customize your theme. Tweak all the settings as you'd like. When you're done with the setup click Go back homepage.",r=t.split(" "),n="yesSteno"===localStorage.getItem("steno")?Object(C.a)(r):"";a({text:t,author:"Anonymous",toptimes:[],wordBlocks:r,jumpingCarValue:100/r.length,personalTrackNumber:0,stenoStrokes:n})}))};return Object(l.jsxs)(m.a.Fragment,{children:[Object(l.jsxs)("div",{id:"openChangeThemeSettings",onClick:function(){return d()},className:"jsx-3559400329",children:[Object(l.jsx)("img",{src:Te,alt:"Change Theme Settings",title:"Change Theme Settings",className:"jsx-3559400329"}),Object(l.jsx)("span",{className:"jsx-3559400329",children:"Game Theme"})]}),t&&Object(l.jsx)("div",{id:"skeletonMain",style:{backgroundImage:"url(".concat(Ce,")")},className:"jsx-3559400329",children:null!==n&&null!==n.wordBlocks&&Object(l.jsx)(fe,{trackInfo:n,racersList:s,setTrackInfo:a,socket:o,fromHomepageChangeTheme:!0,setOpenedChangeThemeHomepage:r})}),Object(l.jsx)(u.a,{id:"3559400329",children:["#skeletonMain.jsx-3559400329{background-position:center;background-size:cover;background-repeat:no-repeat;background-blend-mode:saturation;background-color:rgb(51 51 51/95%);position:fixed;top:0;width:100%;z-index:8;height:100vh;}","#openChangeThemeSettings.jsx-3559400329{top:60px;z-index:6;font-size:17px;}","@media screen and (max-width:1200px){#openChangeThemeSettings.jsx-3559400329{width:100%;border-bottom-right-radius:0;padding:5px 25px 5px 12px;}}","@media screen and (max-width:1060px){#openChangeThemeSettings.jsx-3559400329{top:0;}#openChangeThemeSettings.jsx-3559400329{font-size:12px;-webkit-box-pack:start;-webkit-justify-content:start;-ms-flex-pack:start;justify-content:start;}}"]})]})}var Be=m.a.memo(Ie),Pe=r("K3Sa"),Le=r("kdYF"),Ee=r("VrLJ"),We=r("+fgb");var Re=function(e){var t=e.setJoinedRace,r=e.socket,n=Object(p.useContext)(y.a).user;return Object(p.useEffect)((function(){return localStorage.setItem("didReadExplanation","yes"),function(){r.off()}}),[]),Object(l.jsxs)("div",{className:"jsx-4254120805 racingTemplate",children:[Object(l.jsx)("h1",{className:"jsx-4254120805",children:"FAQ Story Mode"}),Object(l.jsxs)("div",{id:"storyZoneContainer",className:"jsx-4254120805",children:[Object(l.jsxs)("section",{className:"jsx-4254120805",children:[Object(l.jsx)("h3",{className:"jsx-4254120805",children:"What is story mode?"}),Object(l.jsxs)("p",{className:"jsx-4254120805",children:["In story mode you have an option to select a story / novel out of many available stories. ","\n","Once you picked a certain story, you'll be navigated to a page where you start typing it out."]})]}),Object(l.jsxs)("section",{className:"jsx-4254120805",children:[Object(l.jsx)("h3",{className:"jsx-4254120805",children:"Why should I play Story mode?"}),Object(l.jsxs)("p",{className:"jsx-4254120805",children:["You can pick any story you'd like to read, enjoy reading it and at same time improve your typing speed.","\n","For every story you finish, you'll earn 650 ~ 1250 coins (randomly).","\n","Once you finished a whole story / novel, the certain record will be added to your profile page, showing everyone that you finished typing the specific story.","\n","If your score is good enough, your score will be added to the toptimes list of the specific story according to your WPM speed."]})]}),Object(l.jsxs)("section",{className:"jsx-4254120805",children:[Object(l.jsx)("h3",{className:"jsx-4254120805",children:"How do I save my progress?"}),Object(l.jsxs)("p",{className:"jsx-4254120805",children:["Progress 
1is saved automatically only for registered users in 3 different ways: ","\n"]}),Object(l.jsxs)("ul",{className:"jsx-4254120805",children:[Object(l.jsxs)("li",{className:"jsx-4254120805",children:[Object(l.jsxs)("span",{className:"jsx-4254120805",children:["By clicking ",Object(l.jsx)("img",{src:Ee,className:"jsx-4254120805"}),' "Stop Session"']}),"- the typing session will be stopped from that moment and you'll see the progress you made so far."]}),Object(l.jsxs)("li",{className:"jsx-4254120805",children:[Object(l.jsxs)("span",{className:"jsx-4254120805",children:["By clicking ",Object(l.jsx)("img",{src:We,className:"jsx-4254120805"}),'"Read Chapter"']}),"- you'll be able to read what you typed so far, and the last session you just had will be saved along."]}),Object(l.jsxs)("li",{className:"jsx-4254120805",children:[Object(l.jsxs)("span",{className:"jsx-4254120805",children:["By clicking  ",Object(l.jsx)("img",{src:Pe,className:"jsx-4254120805"}),'"Go back homepage"']})," - or any other button in TypiNation that navigates you to other page."]})]}),Object(l.jsx)("div",{className:"jsx-4254120805"}),Object(l.jsxs)("p",{className:"jsx-4254120805",children:[Object(l.jsx)("b",{className:"jsx-4254120805",children:"* 1st Note:"})," if you click one of the options mentioned above before the countdown starts, it won't be considered as additional session.","\n",Object(l.jsx)("b",{className:"jsx-4254120805",children:"* 2nd Note:"})," after the countdown starts, if you close the window immediately without clicking one of the options mentioned above, your progress won't be saved. ","\n","So if you come back in here later, you'll be able to resume typing exactly from the last point you stopped typing, keeping the same progress and stats you had in last time."]}),"none"===n&&Object(l.jsx)(b.a,{href:"/signin",children:Object(l.jsx)("a",{style:{color:"#5480ff",fontWeight:"bold",textAlign:"center",display:"block",border:"1px solid black",padding:"5px",margin:"15px 0"},className:"jsx-4254120805 guestSignUp",children:"To register and save your progress you can sign up by clicking here"})})]}),Object(l.jsxs)("div",{className:"jsx-4254120805 buttonOptionsWrapper",children:[Object(l.jsxs)("button",{onClick:function(){t(0)},className:"jsx-4254120805 buttonOption",children:[Object(l.jsx)("img",{src:Pe,alt:"go back homepage",className:"jsx-4254120805"}),"Go back homepage"]}),Object(l.jsxs)("button",{onClick:function(){t(5)},className:"jsx-4254120805 buttonOption",children:[Object(l.jsx)("img",{src:Le,alt:"start new race",className:"jsx-4254120805"}),"Continue Story Zone"]})]})]}),Object(l.jsx)(u.a,{id:"4254120805",children:["#storyZoneContainer.jsx-4254120805{text-align:left;max-width:1200px;margin:0 auto;background:#f3f3f3;padding:15px;border-radius:10px;position:relative;}","#storyZoneContainer.jsx-4254120805 h3.jsx-4254120805{padding:5px 0;font-weight:600;color:#4343c3;}","#storyZoneContainer.jsx-4254120805 section.jsx-4254120805{margin-bottom:30px;}","#storyZoneContainer.jsx-4254120805 section.jsx-4254120805 b.jsx-4254120805{font-weight:600;}","#storyZoneContainer.jsx-4254120805 section.jsx-4254120805 ul.jsx-4254120805{padding-left:22px;margin-bottom:10px;}","#storyZoneContainer.jsx-4254120805 section.jsx-4254120805 ul.jsx-4254120805 span.jsx-4254120805{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-right:5px;margin-bottom:5px;}","#storyZoneContainer.jsx-4254120805 section.jsx-4254120805 ul.jsx-4254120805 img.jsx-4254120805{padding:7px;}","#storyZoneContainer.jsx-4254120805 section.jsx-4254120805:last-child{margin-bottom:0;}","@media screen and (max-width:1270px){#storyZoneContainer.jsx-4254120805{width:95%;}}","@media screen and (max-width:720px){#storyZoneContainer.jsx-4254120805 h3.jsx-4254120805{text-align:center;}}"]})]})},Me=r("mblX"),Fe=r("WMS+"),_e=r("2qzJ"),Ae=r("pI+A"),De=r("MkHO"),Ve=r("U+D9"),qe=r("VrLJ"),Ge=r("K3Sa"),ze=r("+fgb"),He=r("kdYF"),Ye=r("fm9w");
1function Ue(e){var t=Math.floor(e/1e3%60),r=Math.floor(e/6e4%60),n=Math.floor(e/36e5),s=1===t?"second":"seconds",c=1===r?"minute":"minutes",a=1===n?"hour":"hours";return n>0?r>0?"".concat(n.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")," ").concat(a," and ").concat(r," ").concat(c):"".concat(n.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")," ").concat(a):r>0?t>0?"".concat(r," ").concat(c," and ").concat(t," ").concat(s):"".concat(r," ").concat(c):t>0?"".concat(t," ").concat(s):"0 - started now"}var Je=r("GkSl"),Ke=r("loyS"),Xe=r("kHFq"),Qe=r("69Jj"),Ze=r("9Ujb"),$e=r("P+tW"),et=r("sT/F"),tt=r("/h0r"),rt=r("lBgm"),nt=r("zhrZ"),st=r("8Nh1"),ct=["Basic","BlueBasic","GreenBasic","OrangeBasic","RedBasic","PurpleBasic","PinkBasic","Fairy","Crystal","Flamey","Electric","Veiny","Wavey","Tiger","RedPolygon","Abstract","Artisitic","Wood","Parquet"],at=0,it=0,ot=0,lt=0,dt=!0,ut=0,pt=0,mt=0;var xt=function(e){var t,r=e.socket,s=e.racersList,o=e.trackInfo,d=e.setJoinedRace,x=e.startThisStory,h=e.initials,j=Object(p.useState)(!1),f=j[0],v=j[1],w=Object(p.useState)(!1),T=w[0],C=w[1],I=Object(p.useState)(o.wordBlocks.slice(ut,ut+30)),B=I[0],P=I[1],L=Object(p.useContext)(y.a).user,W=Object(p.useRef)(),R=Object(p.useRef)({value:!1,arr:[]}),M=Object(p.useState)(10),F=M[0],_=M[1],A=Object(p.useState)(!1),D=A[0],V=A[1],q=Object(p.useRef)({typingCalculator:null,restartStopwatchInterval:null,filledStopwatch:null,cursorPutter:null,beforeTypingCalculations:null}),G=Object(p.useRef)({text:[],didFinish:!1}),z=localStorage.getItem("styleText")?localStorage.getItem("styleText"):"correctColor",H=localStorage.getItem("cursor")?localStorage.getItem("cursor"):"withCursor",Y=localStorage.getItem("input")?localStorage.getItem("input"):"withRedBackground",U=localStorage.getItem("wantsVisibleInput")?localStorage.getItem("wantsVisibleInput"):"wantsVisibleInput",J=localStorage.getItem("wantsShownDPs")?localStorage.getItem("wantsShownDPs"):"yesShownDPs",K=localStorage.getItem("steno")?localStorage.getItem("steno"):"noSteno",X=localStorage.getItem("smoothCursor")?localStorage.getItem("smoothCursor"):"yesSmooth",Q=localStorage.getItem("smoothnessSpeed")?+localStorage.getItem("smoothnessSpeed"):100,Z=localStorage.getItem("blinkCursor")?localStorage.getItem("blinkCursor"):"yesBlink",$=Object(p.useRef)(0),ee=Object(p.useRef)([]),te=Object(p.useRef)(),re=Object(p.useRef)({startTime:null,endTime:null,grossWPM:0,grossWPMThisSession:0,trackValue:0,incorrectCharacters:0,accuracy:0,allCharacters:0,correctCharacters:0,indexTrackingBlocks:0,lastWordblockIndexForGraph:0,graphSpeed:[]}),ne=Object(p.useRef)(),se=Object(p.useState)(!1),ce=se[0],ae=se[1],ie=Object(p.useRef)({isDarkTheme:document.documentElement.classList.contains("Dark"),textColor:!!localStorage.getItem("textColor"),textBackgroundColor:!!localStorage.getItem("textBackgroundColor"),layoutColor:!!localStorage.getItem("layoutColor"),outerBackgroundColor:!!localStorage.getItem("backgroundColor"),inputColor:!!localStorage.getItem("inputColor"),backgroundImage:localStorage.getItem("backgroundImage")?localStorage.getItem("backgroundImage"):"",backgroundBlurness:localStorage.getItem("backgroundBlurness")?localStorage.getItem("backgroundBlurness"):0,smoothCursor:!localStorage.getItem("smoothCursor"),smoothnessSpeed:localStorage.getItem("smoothnessSpeed")?localStorage.getItem("smoothnessSpeed"):100,blinkCursor:!localStorage.getItem("blinkCursor"),font:localStorage.getItem("font")?localStorage.getItem("font"):"Montserrat"}),oe=Object(p.useState)({}),le=oe[0],de=oe[1];Object(p.useEffect)((function(){return r.on("adminMessages",(function(e){Object(k.b)(Object(l.jsxs)(m.a.Fragment,{children:[Object(l.jsx)("div",{style:{marginBottom:"5px"},children:Object(l.jsx)("b",{children:"MESSAGE FROM ADMIN:"})}),Object(l.jsx)("div",{children:e})]})),Ie()})),function(){r.off()}}),[]),Object(p.useEffect)((function(){if(Object.keys(le).length>0){var e=Object.keys(le)[0],t=Object.values(le)[0];if("styleOfText"===e&&(z=t),"wantsCursor"===e&&(H=t),"wantsRedBackgroundInput"===e&&(Y=t),"isCursorSmooth"===e&&(X=t),"smoothnessSpeed"===e&&(Q=+t),"updatedFont"===e){var r=at+W.current.selectionStart-1;if(-1===r&&ue(),!ee.current[r])return;te.current.animate([{top:ee.current[r].offsetTop-6+"px",left:ee.current[r].offsetLeft+ee.current[r].offsetWidth-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==X||R.current.value?0:Q})}}}
1),[le]),Object(p.useEffect)((function(){return dt=!0,void 0===document.querySelector(".currentTrack").firstChild.children[0]&&(document.querySelector(".currentTrack").firstChild.style.fontWeight="bold"),ke(),function(){clearInterval(q.current.typingCalculator),clearInterval(q.current.restartStopwatchInterval),clearInterval(q.current.filledStopwatch),clearTimeout(q.current.cursorPutter),clearTimeout(q.current.beforeTypingCalculations)}}),[o]),Object(p.useEffect)((function(){if(D){te.current&&te.current.classList.add("gone");var e=document.getElementsByClassName("wrapperScores");0!==e.length&&(e[0].classList.add("opened"),e[1].classList.add("opened"))}}),[D]),Object(p.useEffect)((function(){return function(){dt||pe()}}),[F]),Object(p.useEffect)((function(){"none"!==L||f||(C(!1),Te(!1))}),[f,L]),Object(p.useEffect)((function(){if(!D){"withoutCursor"===H&&te.current&&te.current.classList.add("gone"),ee.current=document.getElementsByClassName("lettersTrack");var e=ee.current[at];if(e&&(ot=e.getBoundingClientRect().top),null!==o&&"correctColor"===z)for(var t=re.current.indexTrackingBlocks===o.wordBlocks.length-1?o.wordBlocks[re.current.indexTrackingBlocks]:o.wordBlocks[re.current.indexTrackingBlocks]+" ",r=at;r<at+t.length-1;r++)ee.current[r]&&ee.current[r].classList.add("bottomBorder");if("withCursor"===H&&ee.current[0]&&ue(),"noSteno"!==K&&0===F)for(var n=W.current.value.length,s=0;s<n;s++)ee.current[s].classList.add(z)}}),[B]);var ue=function(){te.current.animate([{top:ee.current[0].offsetTop-6+"px",left:ee.current[0].offsetLeft+$.current-5+"px"}],{fill:"forwards",duration:"yesSmooth"===X?Q:0})};function pe(e){return me.apply(this,arguments)}function me(){return(me=Object(a.a)(c.a.mark((function e(t){var r,n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===F&&"none"!==L){e.next=2;break}return e.abrupt("return");case 2:if(!t){e.next=8;break}r=function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},ne.current={testComparison:h.charactersUntilChapter+mt,currentChapter:h.currentChapter,storyID:h._id,speed:re.current.grossWPM,accuracy:re.current.accuracyAlltime,date:new Date,earnedCoins:r(650,1250),msPassedToIncrease:re.current.endTime-re.current.startTime,charactersTotalStoryToIncrease:re.current.allCharacters},re.current.grossWPM<100?xe(ne.current):function(){var e=Object(a.a)(c.a.mark((function e(){var t,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t={speed:Math.floor(.85*re.current.grossWPM)},e.next=4,g.a.post("/api/racetracks/isVerifiedAnticheat",t,{headers:{"auth-token":L}});case 4:return r=e.sent,e.abrupt("return",r.data);case 8:e.prev=8,e.t0=e.catch(0),k.b.error(e.t0.response.data);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}()().then((function(e){e?xe(ne.current):ae(!0)})),e.next=19;break;case 8:if("none"===L){e.next=19;break}return n={msPassedToIncrease:re.current.endTime-re.current.startTime,currentWordBlockIndex:re.current.indexTrackingBlocks,charactersTotalStoryToIncrease:re.current.allCharacters},e.prev=10,e.next=13,g.a.post("/api/story/didntFinishChapter",n,{headers:{"auth-token":L}});case 13:e.sent,e.next=19;break;case 16:e.prev=16,e.t0=e.catch(10),console.log(e.t0.response.data);case 19:case"end":return e.stop()}}),e,null,[[10,16]])})))).apply(this,arguments)}function xe(e){return he.apply(this,arguments)}function he(){return(he=Object(a.a)(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.a.post("/api/story/finishedChapter",t,{headers:{"auth-token":L}});case 3:"Chapter"===(r=e.sent).data.finished&&Object(k.b)(Object(l.jsxs)("div",{children:["Successfully finished the ",Object(l.jsxs)("b",{children:[fe(h.currentChapter+1)," chapter"]})," of ",Object(l.jsx)("b",{children:h.title})," ! \ud83e\udd73"]}),{position:"top-right",autoClose:7e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0}),"Story"===r.data.finished&&(Object(k.b)(Object(l.jsxs)(m.a.Fragment,{children:[Object(l.jsxs)("div",{style:{marginBottom:"25px"},children:["Successfully finished typing ",Object(l.jsx)("b",{children:"ALL CHAPTERS"})," of ",Object(l.jsx)("b",{children:h.title})," !"]}),Object(l.jsxs)("div",{style:{marginBottom:"25px"},children:["Earned ",r.data.earnedCoins," coins !"]}),Object(l.jsx)("div",{children:"Congratulations! \ud83e\udd73\ud83e\udd73"})]}),{position:"top-right",autoClose:7500,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0}),r.data.didBreakToptime&&k.b.success(Object(l.jsxs)(m.a.Fragment,{children:[Object(l.jsx)("div",{style:{marginBottom:"30px"},children:"You have just broken a world record for this quote and got into the toptimes list."}),Object(l.jsx)("div",{children:"Congratulations! \ud83e\udd73"})]})),r.data.didBreakHighscore&&k.b.success(Object(l.jsxs)("div",{children:["You have just broken your fastest high score with ",Object(l.jsx)("b",{children:"".concat(re.current.grossWPM," wpm")})]}))),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),k.b.error(e.t0.response.data);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}function je(e){var t=document.getElementsByClassName("currentTrack")[e.personalPosition],r=document.getElementsByClassName("speedNow")[e.personalPosition],n=document.getElementsByClassName("beforeTrackIndicator")[e.personalPosition];if(t){t.style.left=e.trackValue;var s=0===re.current.trackValue?"0":null!==e.trackValue.match(/\d*\.\d*%/g)?e.trackValue.match(/\d*\.\d*%/g)[0].slice(0,5).slice(0,-1):e.trackValue.match(/\d*%/g)[0].slice(0,-1);n.style.width=s+"%",r.innerHTML="".concat(e.speed," wpm")}}function ge(){var e=document.querySelector(".placeWon");e&&(e.innerHTML="FINISHED",e.classList.add("finished"))}function fe(e){var t=e%10,r=e%100;return 1==t&&11!=r?e+"st":2==t&&12!=r?e+"nd":3==t&&13!=r?e+"rd":e+"th"}var be=function(e){return-1===ct.indexOf(e)?"1px":"7px"};
1function ke(){if(q.current.typingCalculator&&clearInterval(q.current.typingCalculator),function(){document.getElementById("biggerWrapperStopwatch").classList.remove("gone"),document.getElementById("stopper").classList.remove("fadeIn");var e=document.querySelector(".placeWon");e&&e.classList.remove("finished"),window.innerWidth<720?document.getElementById("trackTextWrapper").style.whiteSpace="nowrap":document.getElementById("trackTextWrapper").scrollTo(0,0),W.current.style.display="unset",W.current.value="",W.current.placeholder="Get ready to type the quote above",W.current.disabled=!0,document.getElementById("filledStopwatch").style.animation="unset",Object(i.a)(ee.current).forEach((function(e){e.classList.remove(z),e.classList.remove("wrong"),e.classList.remove("bottomBorder"),e.style.display="unset"})),V(!1);var t=document.querySelector(".currentTrack"),r=document.querySelector(".speedNow"),n=document.querySelector(".beforeTrackIndicator");t&&(t.style.left=be(s[0].trackstyle),n.style.width="0%",r.innerHTML="0 wpm"),R.current.value=!1,R.current.arr=[],re.current={startTime:null,endTime:null,grossWPM:0,grossWPMThisSession:0,trackValue:0,incorrectCharacters:0,accuracy:0,allCharacters:0,correctCharacters:0,indexTrackingBlocks:0,lastWordblockIndexForGraph:0,graphSpeed:[]},at=0,it=0,ut=0,mt=0,pt=0,lt=0}(),0!==h.charactersUntilChapter||0===h.currentChapter&&0!==h.currentWordBlockIndex){re.current.indexTrackingBlocks=h.currentWordBlockIndex,re.current.lastWordblockIndexForGraph=h.currentWordBlockIndex,it=o.wordBlocks.reduce((function(e,t,r){return r<re.current.indexTrackingBlocks?e+t.length+1:e}),0),mt=it,pt=it,ut=h.currentWordBlockIndex,P(o.wordBlocks.slice(ut,ut+30)),re.current.trackValue=100/o.wordBlocks.length*re.current.indexTrackingBlocks;var e="calc(".concat(re.current.trackValue,"% - 15px)"),t=16667e-9*h.msPassed,r=Math.round((h.charactersUntilChapter+mt)/5/t);isNaN(r)&&(r=0),re.current.grossWPM=r,je({speed:re.current.grossWPM,trackValue:e,personalPosition:0}),"withCursor"===H&&(q.current.cursorPutter=setTimeout((function(){ee.current[0]&&(te.current.classList.remove("gone"),ue())}),500))}var n=8;_(n),q.current.filledStopwatch=setTimeout((function(){return document.getElementById("filledStopwatch").style.animation="trafficlight ".concat(n,"s forwards linear")})),q.current.restartStopwatchInterval=setInterval((function(){if(1===n){if(dt=!1,W.current.disabled=!1,W.current.focus(),W.current.setSelectionRange(0,9999),q.current.beforeTypingCalculations=setTimeout((function(){return ye()}),70),document.getElementById("biggerWrapperStopwatch").classList.add("gone"),document.getElementById("stopper").classList.add("fadeIn"),window.innerWidth>720){var e=ee.current[at].getBoundingClientRect();ot=e.top}W.current.placeholder="",clearInterval(q.current.restartStopwatchInterval)}n--,_(n)}),1e3)}var ye=function(){re.current.startTime=Date.now();var e=document.getElementById("minutes"),t=document.getElementById("seconds"),r=0;q.current.typingCalculator=setInterval((function(){if(re.current.endTime=Date.now(),(r+=.5)%1===0){var c=Math.floor(r/60),a=r%60;e.innerText=n(c),t.innerText=n(a)}var i=o.wordBlocks.slice(re.current.lastWordblockIndexForGraph,re.current.indexTrackingBlocks);0!==i.length&&re.current.graphSpeed.push({wordblocks:i,speed:re.current.grossWPM,time:r}),re.current.lastWordblockIndexForGraph=re.current.indexTrackingBlocks;var l=16667e-9*(re.current.endTime-re.current.startTime+h.msPassed),d=Math.round((h.charactersUntilChapter+mt)/5/l);isNaN(d)&&(d=0),re.current.grossWPM=d;var u=0===re.current.trackValue?be(s[0].trackstyle):"calc(".concat(re.current.trackValue,"% - 15px)");je({speed:re.current.grossWPM,trackValue:u,personalPosition:0})}),500);var n=function(e){return e<10?"0"+e:e}},ve=function(e,t){if(F>0)return alert("you fkn hacker nab, the race didn't start"),void we();if(e.persist(),"yesBlink"===Z&&te.current.classList.remove("blinking"),"yesSteno"!==K){!function(e){e.nativeEvent.data&&re.current.allCharacters++,""===t&&"withRedBackground"===Y&&document.getElementById("containerInput").classList.remove("wrong");var r=0,n=mt;for(R.current.value=!1;r<t.length&&n<o.text.length;
1)o.text[n]===t[r]?R.current.value?(ee.current[n-pt].classList.add("wrong"),ee.current[n-pt].classList.remove(z)):("withRedBackground"===Y&&document.getElementById("containerInput").classList.remove("wrong"),ee.current[n-pt].classList.remove("wrong"),ee.current[n-pt].classList.add(z)):(R.current.value=!0,"withRedBackground"===Y&&document.getElementById("containerInput").classList.add("wrong"),ee.current[n-pt]?(ee.current[n-pt].classList.remove(z),ee.current[n-pt].classList.add("wrong"),-1===R.current.arr.findIndex((function(e){return e===o.wordBlocks[re.current.indexTrackingBlocks]}))&&R.current.arr.push(o.wordBlocks[re.current.indexTrackingBlocks])):r=t.length),r++,n++;for(var s=at+t.length;s<lt;s++)ee.current[s]&&(ee.current[s].classList.remove(z),ee.current[s].classList.remove("wrong"));if(lt=at+t.length,"withCursor"===H){var c=at+W.current.selectionStart-1;if(-1===c&&ue(),!ee.current[c])return;te.current.animate([{top:ee.current[c].offsetTop-6+"px",left:ee.current[c].offsetLeft+ee.current[c].offsetWidth+$.current-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==X||R.current.value?0:Q}),"yesBlink"===Z&&te.current.classList.add("blinking")}}(e);var r=re.current.indexTrackingBlocks===o.wordBlocks.length-1?o.wordBlocks[re.current.indexTrackingBlocks]:o.wordBlocks[re.current.indexTrackingBlocks]+" ";if(0===re.current.indexTrackingBlocks&&"correctColor"===z)for(var n=at;n<at+r.length-1;n++)ee.current[n].classList.add("bottomBorder");if(t.slice(0,r.length)===r){for(var s=!0;s;){if("correctColor"===z){for(var c=at;c<at+r.length-1;c++)ee.current[c].classList.remove("bottomBorder");if(o.wordBlocks[re.current.indexTrackingBlocks+1])for(var a=re.current.indexTrackingBlocks+1===o.wordBlocks.length-1?o.wordBlocks[re.current.indexTrackingBlocks+1]:o.wordBlocks[re.current.indexTrackingBlocks+1]+" ",l=at+r.length;l<at+r.length+a.length-1;l++)ee.current[l].classList.add("bottomBorder")}if(window.innerWidth<720){for(var d=at;d<at+r.length;d++)ee.current[d].style.display="none";if("withCursor"===H){var u=at+r.length;ee.current[u]&&te.current.animate([{top:ee.current[u].offsetTop-6+"px",left:ee.current[u].offsetLeft+$.current-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==X||R.current.value?0:Q})}re.current.indexTrackingBlocks%20===0&&(ut=re.current.indexTrackingBlocks+1,P(o.wordBlocks.slice(ut,ut+30)),pt=pt+at+r.length,at=0-r.length)}else{var p=ee.current[at+r.length];if(p)p.getBoundingClientRect().top!==ot&&(ut=re.current.indexTrackingBlocks+1,P(o.wordBlocks.slice(ut,ut+30)),pt=pt+at+r.length,at=0-r.length)}if(at+=r.length,mt+=r.length,re.current.trackValue+=o.jumpingCarValue,re.current.indexTrackingBlocks++,W.current.value=W.current.value.slice(r.length,W.current.value.length),r=re.current.indexTrackingBlocks===o.wordBlocks.length-1?o.wordBlocks[re.current.indexTrackingBlocks]:o.wordBlocks[re.current.indexTrackingBlocks]+" ",W.current.value.slice(0,r.length)!==r){s=!1;for(var m=at+t.length;m<lt;m++)ee.current[m]&&(ee.current[m].classList.remove(z),ee.current[m].classList.remove("wrong"));lt=at}}W.current.value="",re.current.indexTrackingBlocks===o.wordBlocks.length&&(window.innerWidth<720&&Object(i.a)(ee.current).forEach((function(e){return e.style.display="unset"})),ge(),Ne("finished"))}}else!function(e,t){Array.prototype.equals=function(e){if(!e)return!1;if(this.length!=e.length)return!1;for(var t=0,r=this.length;t<r;t++)if(this[t]instanceof Array&&e[t]instanceof Array){if(!this[t].equals(e[t]))return!1}else if(this[t]!=e[t])return!1;return!0};var r=o.wordBlocks.slice(re.current.indexTrackingBlocks,re.current.indexTrackingBlocks+4),n=t.split(" ").filter((function(e){return""!==e}));if(function(){e.nativeEvent.data&&re.current.allCharacters++;for(var s=function(e){var t=n.reduce((function(t,r,n){return n<e?t+r.length+1:t}),0);if(n[e]===r[e]){for(var s=t+mt;s<t+mt+n[e].length;s++)ee.current[s-pt]&&(ee.current[s-pt].classList.add(z),ee.current[s-pt].classList.remove("wrong"));"withRedBackground"===Y&&document.getElementById("containerInput").classList.remove("wrong")}else{var c=r[e].search(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]/);if(-1!==c)if(n[e].slice(0,c)===r[e].slice(0,c)){for(var a=t+mt;a<t+mt+n[e].length;a++)ee.current[a-pt]&&(ee.current[a-pt].classList.add(z),ee.current[a-pt].classList.remove("wrong"));
1"withRedBackground"===Y&&document.getElementById("containerInput").classList.remove("wrong"),n[e][c]&&r[e][c]!==n[e][c]&&(ee.current[t+mt-pt+n[e].length].classList.add("wrong"),"withRedBackground"===Y&&document.getElementById("containerInput").classList.add("wrong"))}else{for(var i=t+mt;i<t+mt+n[e].length;i++)ee.current[i-pt]&&(ee.current[i-pt].classList.add("wrong"),ee.current[i-pt].classList.remove(z));"withRedBackground"===Y&&document.getElementById("containerInput").classList.add("wrong"),-1===r[e].toLowerCase().indexOf(n[e].toLowerCase())&&-1===R.current.arr.findIndex((function(t){return t===r[e]}))&&R.current.arr.push(r[e])}else{for(var o=t+mt;o<t+mt+n[e].length;o++)ee.current[o-pt]&&(ee.current[o-pt].classList.add("wrong"),ee.current[o-pt].classList.remove(z));"withRedBackground"===Y&&document.getElementById("containerInput").classList.add("wrong"),-1===r[e].toLowerCase().indexOf(n[e].toLowerCase())&&-1===R.current.arr.findIndex((function(t){return t===r[e]}))&&R.current.arr.push(r[e])}}},c=0;c<n.length&&c<r.length;c++)s(c);for(var a=at+t.length;a<lt+1;a++)ee.current[a]&&(ee.current[a].classList.remove(z),ee.current[a].classList.remove("wrong"));if(lt=at+t.length,"withCursor"===H){var i=at+W.current.selectionStart-1;if(-1===i&&ue(),!ee.current[i])return;te.current.animate([{top:ee.current[i].offsetTop-6+"px",left:ee.current[i].offsetLeft+ee.current[i].offsetWidth-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==X||R.current.value?0:Q})}}(),r.equals(n)){if(n[1]&&n[2]){var s=n[0],c=n.reduce((function(e,t){return e+t.length+1}),0),a=ee.current[at+c];a&&a.getBoundingClientRect().top!==ot&&(ut=re.current.indexTrackingBlocks+1,P(o.wordBlocks.slice(ut,ut+30)),pt=pt+at+(s.length+1),at=0-(s.length+1)),at+=s.length+1,mt+=s.length+1,W.current.value=n.slice(1,n.length).join(" "),re.current.trackValue+=o.jumpingCarValue,re.current.indexTrackingBlocks++}if(o.wordBlocks.length-re.current.indexTrackingBlocks===3){for(var i=1;i<n.length;i++)if(i===n.length-1){var l=n[i];at+=l.length,W.current.value="",mt+=l.length,re.current.trackValue+=o.jumpingCarValue,re.current.indexTrackingBlocks++}else{var d=n[i];at+=d.length+1,W.current.value=n.slice(1,n.length).join(" "),mt+=d.length+1,re.current.trackValue+=o.jumpingCarValue,re.current.indexTrackingBlocks++}ge(),Ne("finished")}}}(e,t)},we=function(){d(0)},Oe=function(e){if(-1===ct.indexOf(e))return{left:"1px"}},Se=function(){var e=(h.charactersUntilChapter+mt)/(h.charactersTotalStory+re.current.allCharacters)*100;re.current.accuracyAlltime=e%1===0?e:(e+"").split(".")[1]&&"0"===(e+"").split(".")[1][0]?Math.round(e):e.toFixed(1)},Ne=function(e){if(0!==F)clearInterval(q.current.restartStopwatchInterval),clearInterval(q.current.filledStopwatch),C(!0),Se(),V(!0);else{re.current.endTime=Date.now(),W.current.style.display="none",W.current.disabled=!0,clearInterval(q.current.typingCalculator);var t=16667e-9*(re.current.endTime-re.current.startTime+h.msPassed),r=Math.round((h.charactersUntilChapter+mt)/5/t);re.current.grossWPM=r,t=16667e-9*(re.current.endTime-re.current.startTime),r=Math.round((mt-it)/5/t),re.current.grossWPMThisSession=r,je({speed:re.current.grossWPM,trackValue:"finished"===e?(i=s[0].trackstyle,-1===ct.indexOf(i)?"calc(100% - 21px)":"calc(100% - 26px)"):"calc(".concat(re.current.trackValue,"% - 15px)"),personalPosition:0}),Se();var n=(mt-it)/re.current.allCharacters*100;re.current.accuracySession=n%1===0?n:(n+"").split(".")[1]&&"0"===(n+"").split(".")[1][0]?Math.round(n):n.toFixed(1),re.current.incorrectCharacters=re.current.allCharacters-(mt-it);var c=(re.current.endTime-re.current.startTime)/1e3;re.current.secondsWritten=(c+"").split(".")[1]&&"0"===(c+"").split(".")[1][0]?Math.round(c):c.toFixed(2);var a=o.wordBlocks.slice(re.current.lastWordblockIndexForGraph,re.current.indexTrackingBlocks);0!==a.length&&re.current.graphSpeed.push({wordblocks:a,speed:re.current.grossWPM,time:+re.current.secondsWritten}),V(!0),dt=!0,pe("finished"===e)}var i},Te=function(e){clearInterval(q.current.typingCalculator),clearInterval(q.current.restartStopwatchInterval),clearInterval(q.current.filledStopwatch),clearTimeout(q.current.cursorPutter),clearTimeout(q.current.beforeTypingCalculations),e&&!confirm("Are you sure you want to start over from last checkpoint?\nAll the data collected during this session will be lost.")||(dt=!0,ke())},Ce=function(){D||(C(!0),Ne());var e=o.text.indexOf("-");if(mt<e)k.b.error("You haven't started typing. To be able to read the chapter you must complete at least ".concat(e+1," 
1characters."));else{var t=o.text.slice(0,mt),r=h.title+" - "+t.slice(0,e-1),n=t.slice(e+2,t.length);t=void 0===n?"":n.replace(/\."\s/gm,"downLinedown"),G.current={text:[r].concat(Object(i.a)(t.split("downLinedown"))),didFinish:mt===o.text.length},v(!0)}},Ie=function(){C(!0),Ne()};return f?Object(l.jsxs)("div",{id:"wrapperChapterToRead",className:"jsx-4159282255",children:[Object(l.jsx)("div",{id:"topLeftProfile",onClick:function(){return we()},className:"jsx-4159282255",children:"Back Homepage"}),!G.current.didFinish&&h.currentChapter+1!==h.numChapters&&Object(l.jsx)("div",{id:"topRightProfile",onClick:function(){return v(!1),void("none"===L?Object(k.b)("Only registered users can save their progress"):(C(!1),x({title:h.title,author:h.author,toptimes:h.toptimes,_id:h._id},!1)))},className:"jsx-4159282255",children:"Back to typing"}),!G.current.didFinish&&Object(l.jsx)("div",{id:"didntFinish",className:"jsx-4159282255",children:"You haven't finished the chapter yet, so you are able to read the chapter to the point you stopped typing."}),G.current.text.map((function(e,t){return Object(l.jsx)(m.a.Fragment,{children:0===t?Object(l.jsx)("h2",{className:"jsx-4159282255",children:e}):Object(l.jsx)(m.a.Fragment,{children:Object(l.jsx)("p",{className:"jsx-4159282255",children:t===G.current.text.length-1?e:e+'."'})})},t)})),Object(l.jsx)(u.a,{id:"4159282255",children:["#didntFinish.jsx-4159282255{border:1px solid black;text-align:center;margin:20px 0;padding:5px;}","h2.jsx-4159282255{text-align:center;padding-bottom:5px;box-shadow:0 4px 2px -2px #3a3a3a;}","#topRightProfile.jsx-4159282255,#topLeftProfile.jsx-4159282255{background:#D7DEE3;position:absolute;top:0;right:0;padding:6px 14px;font-weight:500;cursor:pointer;border-bottom-left-radius:10px;-webkit-transition:background 500ms;transition:background 500ms;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}","#topRightProfile.jsx-4159282255:active,#topLeftProfile.jsx-4159282255:active{background:rgb(151,215,255);}","#topLeftProfile.jsx-4159282255{border-bottom-left-radius:0;border-bottom-right-radius:10px;right:auto;left:0;}","#wrapperChapterToRead.jsx-4159282255{background:white;position:relative;padding:15px;padding-top:35px;max-width:1200px;margin:0 auto;border-radius:10px;margin-top:55px;border-top-right-radius:10px;border-top-left-radius:10px;overflow:hidden;min-height:100vh;}"]})]}):Object(l.jsxs)(l.Fragment,{children:[Object(l.jsxs)("div",{className:"jsx-4215855810 "+((D?"racingTemplate duringRace":"racingTemplate duringRace didntFinishRace")||""),children:[!D&&Object(l.jsx)("div",{id:"backgroundImageTheme",onClick:function(){return W.current.focus()},className:"jsx-4215855810"}),Object(l.jsx)("h1",{className:"jsx-4215855810 duringRace",children:"Story Mode"}),ce&&Object(l.jsx)("div",{id:"darkness",className:"jsx-4215855810",children:Object(l.jsx)(N.a,{user:L,fetchResultsDB:xe,dataToDeliver:ne.current,goBackMenu:we,setNeedsAnticheat:ae,toastConfirmedAnticheat:function(){k.b.success("Successfully verified anticheat")}})}),!D&&Object(l.jsx)("div",{id:"finishedRaceDetails",className:"jsx-4215855810",children:Object(l.jsxs)("div",{style:{marginTop:"15px"},className:"jsx-4215855810 buttonOptionsWrapper inBottom",children:[Object(l.jsxs)("button",{onClick:function(){return we()},className:"jsx-4215855810 buttonOption",children:[Object(l.jsx)("img",{src:Ge,alt:"go back homepage",className:"jsx-4215855810"}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"Go back homepage"})]}),Object(l.jsxs)("button",{onClick:function(){return Te(!1)},className:"jsx-4215855810 buttonOption",children:[Object(l.jsx)("img",{src:Ve,alt:"reset to last checkpoint",className:"jsx-4215855810"}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"Reset to last checkpoint"})]}),Object(l.jsxs)("button",{onClick:function(){return Ce()},className:"jsx-4215855810 buttonOption",children:[Object(l.jsx)("img",{src:ze,alt:"read chapter",className:"jsx-4215855810"}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"Read chapter"})]}),Object(l.jsxs)("button",{onClick:function(){return Ie()},className:"jsx-4215855810 buttonOption",children:[Object(l.jsx)("img",{src:qe,alt:"stop this 
1session",className:"jsx-4215855810"}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"Stop Session"})]})]})}),Object(l.jsxs)("div",{className:"jsx-4215855810 "+(("yesShownDPs"===J?"wrapperRace":"wrapperRace noDPs")||""),children:[Object(l.jsxs)("div",{id:"stopper",className:"jsx-4215855810",children:["Time passed: ",Object(l.jsx)("span",{id:"minutes",className:"jsx-4215855810",children:"00"}),":",Object(l.jsx)("span",{id:"seconds",className:"jsx-4215855810",children:"00"})]}),s.map((function(e,t){return Object(l.jsx)(m.a.Fragment,{children:Object(l.jsxs)("div",{className:"jsx-4215855810 "+((e.left?"raceblock left":"raceblock")||""),children:[Object(l.jsx)("div",{className:"jsx-4215855810 placeWon"}),Object(l.jsxs)("div",{className:"jsx-4215855810 lineTrackWrapper",children:[Object(l.jsx)("div",{className:"jsx-4215855810 beforeTrackIndicator"}),Object(l.jsx)("div",{style:(r=e.trackstyle,"Fairy"===r||"Crystal"===r?{backgroundImage:"url('".concat(Je,"')")}:"Flamey"===r?{backgroundImage:"url('".concat(Ke,"')")}:"Electric"===r?{backgroundImage:"url('".concat(Xe,"')")}:"Veiny"===r?{backgroundImage:"url('".concat(Qe,"')")}:"Wavey"===r?{backgroundImage:"url('".concat(Ze,"')")}:"Tiger"===r?{backgroundImage:"url('".concat($e,"')")}:"RedPolygon"===r?{backgroundImage:"url('".concat(et,"')")}:"Abstract"===r?{backgroundImage:"url('".concat(tt,"')")}:"Artisitic"===r?{backgroundImage:"url('".concat(rt,"')")}:"Wood"===r?{backgroundImage:"url('".concat(nt,"')")}:"Parquet"===r?{backgroundImage:"url('".concat(st,"')")}:void 0),className:"jsx-4215855810 "+("lineTrack "+e.trackstyle||!1),children:Object(l.jsxs)("div",{style:Oe(e.trackstyle),className:"jsx-4215855810 currentTrack",children:[Object(l.jsx)("img",{src:"none"===e.profilePic?Me:e.profilePic,alt:"Profile picture",className:"jsx-4215855810 profilePictureRace"}),"none"!==e.link?Object(l.jsx)(b.a,{href:"/profile/[uniqueLink]",as:"/profile/".concat(e.link),children:Object(l.jsx)("a",{className:"jsx-4215855810 racersName",children:e.user})}):Object(l.jsx)("div",{className:"jsx-4215855810 racersName guest",children:e.user})]})})]}),Object(l.jsx)("span",{className:"jsx-4215855810 speedNow",children:"0 wpm"})]})},t);var r})),Object(l.jsx)("div",{id:"biggerWrapperStopwatch",className:"jsx-4215855810",children:Object(l.jsxs)("div",{className:"jsx-4215855810 stopwatchWrapper",children:[Object(l.jsx)("div",{id:"filledStopwatch",className:"jsx-4215855810"}),0!==F?Object(l.jsx)(m.a.Fragment,{children:T?Object(l.jsx)("span",{className:"jsx-4215855810",children:"Time stopped"}):Object(l.jsxs)("span",{className:"jsx-4215855810",children:["Time to start: ",F," seconds."]})}):Object(l.jsx)("span",{className:"jsx-4215855810",children:"GO GO GO"})]})}),Object(l.jsxs)("div",{id:"trackTextWrapper",className:"jsx-4215855810",children:[Object(l.jsx)("span",{id:"cursor",ref:te,className:"jsx-4215855810 "+(("yesBlink"===Z?"blinking":"")||""),children:"|"}),B.map((function(e,t){return Object(l.jsxs)("pre",{className:"jsx-4215855810",children:[e.split("").map((function(e,t){return Object(l.jsx)("span",{className:"jsx-4215855810 lettersTrack",children:e},e+t)})),t!==o.wordBlocks.length-1&&Object(l.jsx)("span",{className:"jsx-4215855810 lettersTrack space",children:" "})]},e+t)}))]}),Object(l.jsx)("div",{id:"containerInput",className:"jsx-4215855810",children:Object(l.jsx)("input",(t={type:"text",id:"userInputTrack",ref:W,maxLength:"80",placeholder:"Get ready to type the quote above",disabled:!0,autoComplete:"off",autoCapitalize:"none",autoCorrect:"off",spellCheck:"false",onKeyDown:function(e){return function(e){if(!(37!==e.keyCode&&39!==e.keyCode||"withoutCursor"===H||/Android/i.test(navigator.userAgent))){e.persist();var t=37===e.keyCode?-1:1,r=at+W.current.selectionStart-1+t;-1===r&&ue(),ee.current[r]&&te.current.animate([{top:ee.current[r].offsetTop-6+"px",left:ee.current[r].offsetLeft+ee.current[r].offsetWidth-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==X||R.current.value?0:Q})}}(e)},onPaste:function(e){return e.preventDefault()},onInput:function(e){return ve(e,W.current.value)}},Object(n.a)(t,"autoComplete","off"),Object(n.a)(t,"className","jsx-4215855810 "+(("wantsInvisibleInput"===U?"invisible":void 0)||"")),t))}),D&&Object(l.jsxs)("div",{id:"finishedRaceDetails",className:"jsx-4215855810",children:[Object(l.jsxs)("div",{className:"jsx-4215855810 buttonOptionsWrapper",children:[Object(l.jsxs)("button",{onClick:function(){return we()},className:"jsx-4215855810 buttonOption",children:[Object(l.jsx)("img",{src:Ge,alt:"go back homepage",className:"jsx-4215855810"}),"Go back homepage"]}),Object(l.jsxs)("button",{onClick:function(){return Ce()},className:"jsx-4215855810 buttonOption",children:[Object(l.jsx)("img",{src:ze,alt:"read chapter",className:"jsx-4215855810"}),"Read chapter"]}),T?Object(l.jsxs)("button",{onClick:function(){return C(!1),void("none"===L?(Te(!1),Object(k.b)("Only registered users can save their progress")):x({title:h.title,author:h.author,toptimes:h.toptimes,_id:h._id},!1))},className:"jsx-4215855810 buttonOption",children:[Object(l.jsx)("img",{src:He,alt:"start new race",className:"jsx-4215855810"}),"Continue session"]}):Object(l.jsxs)(m.a.Fragment,{children:[mt!==o.text.length&&Object(l.jsxs)("button",{onClick:function(){return Te(!0)},className:"jsx-4215855810 buttonOption",children:[Object(l.jsx)("img",{src:Ve,alt:"reset to last checkpoint",className:"jsx-4215855810"}),"Reset to last checkpoint"]}),h.currentChapter+1!==h.numChapters&&Object(l.jsxs)("button",{onClick:function(){mt===o.text.length&&x({title:h.title,author:h.author,toptimes:h.toptimes,_id:h._id},!0)},className:"jsx-4215855810 buttonOption",children:[Object(l.jsx)("img",{src:He,alt:"start new race",className:"jsx-4215855810"}),"Proceed to next chapter"]})]})]}),Object(l.jsx)("h3",{className:"jsx-4215855810",children:"Personal Typing Analysis"}
1),T?Object(l.jsxs)("p",{className:"jsx-4215855810",children:["You're currently typing the ",Object(l.jsxs)("b",{className:"jsx-4215855810",children:[fe(h.currentChapter+1)," chapter"]})," of ",Object(l.jsx)("b",{className:"jsx-4215855810",children:h.title}),", written by ",Object(l.jsx)("b",{className:"jsx-4215855810",children:Object(l.jsx)("i",{className:"jsx-4215855810",children:h.author})}),".","\n","This was your ",Object(l.jsxs)("b",{className:"jsx-4215855810",children:[fe(h.numSessions+1)," session"]}),"."]}):Object(l.jsx)(m.a.Fragment,{children:h.currentChapter+1===h.numChapters?Object(l.jsxs)("p",{className:"jsx-4215855810",children:["You've just finished typing ",Object(l.jsx)("b",{className:"jsx-4215855810",children:"ALL CHAPTERS"})," of ",Object(l.jsx)("b",{className:"jsx-4215855810",children:h.title}),", written by ",Object(l.jsx)("b",{className:"jsx-4215855810",children:Object(l.jsx)("i",{className:"jsx-4215855810",children:h.author})}),".","\n","This was your ",Object(l.jsxs)("b",{className:"jsx-4215855810",children:[fe(h.numSessions+1)," session"]}),".","\n","Congratulations! \ud83e\udd73\ud83d\udc4f\ud83e\udd73","\n",Object(l.jsxs)("span",{style:{color:"#5a5a5a",display:"block",marginTop:"15px"},className:"jsx-4215855810",children:["* It might be that TypiNation doesn't have all chapters of ",h.title,", if you'd like keep reading it, please visit ",Object(l.jsx)("a",{href:"https://gutenberg.org/",className:"jsx-4215855810",children:"Gutenberg"}),"."]})]}):Object(l.jsxs)("p",{className:"jsx-4215855810",children:["You've just finished typing the ",Object(l.jsxs)("b",{className:"jsx-4215855810",children:[fe(h.currentChapter+1)," chapter"]})," of ",Object(l.jsx)("b",{className:"jsx-4215855810",children:h.title}),", written by ",Object(l.jsx)("b",{className:"jsx-4215855810",children:Object(l.jsx)("i",{className:"jsx-4215855810",children:h.author})}),".","\n","This was your ",Object(l.jsxs)("b",{className:"jsx-4215855810",children:[fe(h.numSessions+1)," session"]}),"."]})}),"none"===L&&Object(l.jsx)(b.a,{href:"/signin",children:Object(l.jsx)("a",{style:{color:"#5480ff",fontWeight:"bold",textAlign:"center",display:"block",border:"1px solid black",padding:"5px",margin:"15px 0"},className:"jsx-4215855810 guestSignUp",children:"To register and save your records you can sign up by clicking here"})}),Object(l.jsxs)("div",{className:"jsx-4215855810 wrapperScoresTitle",children:["Since started ",h.title]}),Object(l.jsxs)("div",{className:"jsx-4215855810 wrapperScores",children:[Object(l.jsxs)("div",{className:"jsx-4215855810 needSmallFont",children:[Object(l.jsx)("img",{src:De,className:"jsx-4215855810"}),Object(l.jsxs)("div",{className:"jsx-4215855810 specificScore",children:[Object(l.jsxs)("b",{className:"jsx-4215855810",children:[Object(l.jsxs)("div",{className:"jsx-4215855810 "+((re.current.allCharacters!==o.text.length?"incorrectChars":"correctChars")||""),children:[(h.charactersTotalStory+re.current.allCharacters).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")," total"]}),Object(l.jsxs)("div",{className:"jsx-4215855810 correctChars",children:[(h.charactersUntilChapter+mt).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")," correct"]})]}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"Characters"})]})]}),Object(l.jsxs)("div",{className:"jsx-4215855810",children:[Object(l.jsx)("img",{src:Ae,className:"jsx-4215855810"}),Object(l.jsxs)("div",{className:"jsx-4215855810 specificScore",children:[Object(l.jsx)("b",{className:"jsx-4215855810",children:re.current.grossWPM}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"WPM"})]})]}),Object(l.jsxs)("div",{className:"jsx-4215855810",children:[Object(l.jsx)("img",{src:Fe,className:"jsx-4215855810"}),Object(l.jsxs)("div",{className:"jsx-4215855810 specificScore",children:[Object(l.jsxs)("b",{className:"jsx-4215855810",children:[isFinite(re.current.accuracyAlltime)?re.current.accuracyAlltime:"0","%"]}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"Accuracy"})]})]}),Object(l.jsxs)("div",{className:"jsx-4215855810 needSmallFont",children:[Object(l.jsx)("img",{src:_e,className:"jsx-4215855810"}),Object(l.jsxs)("div",{className:"jsx-4215855810 specificScore",children:[Object(l.jsx)("b",{className:"jsx-4215855810",children:Ue(re.current.endTime-re.current.startTime+h.msPassed)}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"Time finished"})]})]})]}),Object(l.jsx)("div",{className:"jsx-4215855810 wrapperScoresTitle",children:"During this session"}),Object(l.jsxs)("div",{className:"jsx-4215855810 wrapperScores",children:[Object(l.jsxs)("div",{className:"jsx-4215855810 needSmallFont",children:[Object(l.jsx)("img",{src:De,className:"jsx-4215855810"}),Object(l.jsxs)("div",{className:"jsx-4215855810 specificScore",children:[Object(l.jsxs)("b",{className:"jsx-4215855810",children:[Object(l.jsxs)("div",{className:"jsx-4215855810 "+((re.current.allCharacters!==o.text.length?"incorrectChars":"correctChars")||""),children:[re.current.allCharacters.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")," total"]}),Object(l.jsxs)("div",{className:"jsx-4215855810 correctChars",children:[(mt-it).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")," correct"]})]}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"Characters"})]})]}),Object(l.jsxs)("div",{className:"jsx-4215855810",children:[Object(l.jsx)("img",{src:Ae,className:"jsx-4215855810"}),Object(l.jsxs)("div",{className:"jsx-4215855810 specificScore",children:[Object(l.jsx)("b",{className:"jsx-4215855810",children:re.current.grossWPMThisSession}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"WPM"})]})]}),Object(l.jsxs)("div",{className:"jsx-4215855810",children:[Object(l.jsx)("img",{src:Fe,className:"jsx-4215855810"}),Object(l.jsxs)("div",{className:"jsx-4215855810 specificScore",children:[Object(l.jsxs)("b",{className:"jsx-4215855810",children:[isFinite(re.current.accuracySession)?re.current.accuracySession:"0","%"]}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"Accuracy"})]})]}),T&&Object(l.jsxs)("div",{className:"jsx-4215855810 needSmallFont",children:[Object(l.jsx)("img",{src:De,className:"jsx-4215855810"}),Object(l.jsxs)("div",{className:"jsx-4215855810 specificScore",children:[Object(l.jsxs)("b",{className:"jsx-4215855810",children:[(o.text.length-mt).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")," characters"]}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"Remaining"})]})]}),Object(l.jsxs)("div",{className:"jsx-4215855810 needSmallFont",children:[Object(l.jsx)("img",{src:_e,className:"jsx-4215855810"}),Object(l.jsxs)("div",{className:"jsx-4215855810 specificScore",children:[Object(l.jsx)("b",{className:"jsx-4215855810",children:Ue(re.current.endTime-re.current.startTime)}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"Time finished"})]})]})]}),Object(l.jsx)(O.a,{typing:re,isStory:!0}),0===R.current.arr.length?Object(l.jsxs)("div",{className:"jsx-4215855810",children:["You got ",Object(l.jsx)("b",{className:"jsx-4215855810",children:re.current.incorrectCharacters})," typos and in total ",Object(l.jsx)("b",{className:"jsx-4215855810",children:R.current.arr.length})," incorrect words, congratulations \ud83d\udc4f!"]}):Object(l.jsxs)(m.a.Fragment,{children:[1===R.current.arr.length?Object(l.jsxs)("div",{className:"jsx-4215855810",children:["You got ",Object(l.jsx)("b",{className:"jsx-4215855810",children:re.current.incorrectCharacters})," typos and in total only ",Object(l.jsx)("b",{className:"jsx-4215855810",children:R.current.arr.length})," incorrect word:"]}):Object(l.jsxs)("div",{className:"jsx-4215855810",children:["You got ",Object(l.jsx)("b",{className:"jsx-4215855810",children:re.current.incorrectCharacters})," typos and in total ",Object(l.jsx)("b",{className:"jsx-4215855810",children:R.current.arr.length})," incorrect words:"]}),Object(l.jsx)("ul",{id:"mistakesList",className:"jsx-4215855810",children:R.current.arr.map((function(e){return Object(l.jsx)("li",{className:"jsx-4215855810",children:e},e)}))})]}),Object(l.jsx)(S.a,{trackInfo:{toptimes:h.toptimes},isStory:!0})]})]})]}),!D&&Object(l.jsxs)(m.a.Fragment,{children:[Object(l.jsxs)("div",{id:"openChangeThemeSettings",onClick:function(){document.querySelector(".didntFinishRace").classList.add("openedThemeSettings"),document.getElementById("changeThemeSettings").classList.add("opened")},className:"jsx-4215855810",children:[Object(l.jsx)("img",{src:Ye,alt:"Change Theme Settings",title:"Change Theme Settings",className:"jsx-4215855810"}),Object(l.jsx)("span",{className:"jsx-4215855810",children:"Theme"})]}),Object(l.jsx)(E.a,{styleOfText:z,wantsCursor:H,wantsRedBackgroun
1dInput:Y,wantsVisibleInput:U,wantsShownDPs:J,cursorDOM:te,setChangedThemeDisplay:de,offsetFontCursor:$,isCustom:ie.current}),Object(l.jsx)("div",{className:"jsx-4215855810 racingTemplate raceDidntStart",children:Object(l.jsx)("div",{className:"jsx-4215855810 wrapperRace",children:Object(l.jsx)("div",{id:"finishedRaceDetails",className:"jsx-4215855810",children:Object(l.jsx)(S.a,{trackInfo:{toptimes:h.toptimes},isStory:!0})})})})]}),Object(l.jsx)(u.a,{id:"4215855810",children:[".wrapperScoresTitle.jsx-4215855810{color:rgb(0,0,211);text-align:center;display:block;margin-top:27px;}",".wrapperScores.jsx-4215855810{margin-top:10px !important;}","#trackTextWrapper.jsx-4215855810{max-height:95px;overflow:hidden;}","#darkness.jsx-4215855810{position:fixed;left:0;top:0;width:100vw;height:100vh;background:rgba(0,0,0,0.6);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:5;}",".stylesOptions.jsx-4215855810{display:block;position:relative;font-weight:normal;padding-left:35px;margin-bottom:15px;cursor:pointer;font-size:15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:96%;margin-left:auto;margin-right:auto;}","@media screen and (min-width:410px){.stylesOptions.jsx-4215855810{white-space:nowrap;font-size:17px;}}",".stylesOptions.jsx-4215855810:last-of-type{margin-bottom:10px;}",".stylesOptions.jsx-4215855810 input.jsx-4215855810{position:absolute;opacity:0;cursor:pointer;height:0;width:0;}",".checkmark.jsx-4215855810{position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);left:0;height:25px;width:25px;background-color:#eee;}",".stylesOptions.jsx-4215855810:hover input.jsx-4215855810~.checkmark.jsx-4215855810{box-shadow:inset 0 0 7px #56d5ff;}",".stylesOptions.jsx-4215855810 input.jsx-4215855810:checked~.checkmark.jsx-4215855810{background-color:#2196F3;}",'.checkmark.jsx-4215855810:after{content:"";position:absolute;display:none;}',".stylesOptions.jsx-4215855810 input.jsx-4215855810:checked~.checkmark.jsx-4215855810:after{display:block;}",".stylesOptions.jsx-4215855810 .checkmark.jsx-4215855810:after{left:9px;top:5px;width:5px;height:10px;border:solid white;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);}"]})]})};function ht(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ht(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ht(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var gt=r("MKVR"),ft=r("kdYF"),bt=r("OsI/"),kt=r("yA5y");var yt=function(e){var t=e.racersList,r=e.trackInfo,n=e.setJoinedRace,s=e.socket,i=e.setTrackInfo,o=Object(p.useContext)(y.a).user,d=Object(p.useState)(null),m=d[0],x=d[1],h=Object(p.useState)(!1),j=h[0],f=h[1],b=Object(p.useState)(null),v=b[0],w=b[1],O=Object(p.useRef)([]),N=Object(p.useRef)();Object(p.useEffect)((function(){"none"!==o||localStorage.getItem("u")||function(){var e=Object(a.a)(c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.a.get("/api/story/getStoriesListGuest",{headers:{"auth-sender":"typination"}});case 3:t=e.sent,x(t.data),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),k.b.error(e.t0.response.data);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}()();"none"!==o&&function(){var e=Object(a.a)(c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.a.get("/api/story/getStoriesListUser",{headers:{"auth-token":o}});case 3:t=e.sent,O.current=t.data.idStoriesFinished,x(t.data.stories),void 0!==t.data.duringStory&&w(t.data.stories[t.data.duringStory]),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),k.b.error(e.t0.response.data);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}()();return function(){s.off()}}),[o]),Object(p.useEffect)((function(){j&&document.getElementById("moreInfoStoryWrapper").classList.add("opened")}),[j]);var T=function(){var e=Object(a.a)(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.a.get("/api/story/getStoryInfo/".concat(t._id),{headers:{"auth-sender":"typination"}});case 3:r=e.sent,f(jt(jt({},t),{},{desc:r.data.desc,toptimes:r.data.toptimes})),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),k.b.error(e.t0.response.data);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),C=Object(p.useCallback)((function(e,n){var s=!0===n?"yes":"no";if(-1!==O.current.indexOf(e._id))return k.b.success("You already finished typing ".concat(e.title," \ud83d\ude0a")),void i(null);v&&v._id!==e._id?k.b.error("You must finish the other story you already started before starting a new one"):function(){return l.apply(this,arguments)}().then((function(r){if(r&&""!==r){"none"===o&&Object(k.b)("Only registered users can save their progress"),N.current={currentChapter:r.currentChapter,numChapters:r.numChapters,charactersUntilChapter:r.charactersUntilChapter,msPassed:r.msPassed,currentWordBlockIndex:r.currentWordBlockIndex,charactersTotalStory:r.charactersTotalStory,numSessions:r.numSessions,title:e.title,author:e.author,toptimes:!0===n?r.toptimes:e.toptimes,_id:e._id};var s=r.text.split(" ");i({text:r.text,author:t[0].user,wordBlocks:s,jumpingCarValue:100/s.length,personalTrackNumber:0})}}));function l(){return(l=Object(a.a)(c.a.mark((function t(){var n,a;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,"none"!==o){t.next=8;break}return t.next=4,g.a.get("/api/story/startThisStoryGuest/".concat(e._id,"/").concat(s),{headers:{"auth-sender":"typination"}});case 4:return n=t.sent,t.abrupt("return",n.data);case 8:return t.next=10,g.a.get("/api/story/startThisStoryUser/".concat(e._id,"/").concat(s),{headers:{"auth-token":o}});case 10:return a=t.sent,t.abrupt("return",a.data);case 12:t.next=18;break;case 14:return t.prev=14,t.t0=t.catch(0),null===r&&k.b.error(t.t0.response.data),t.abrupt("return","");case 18:case"end":return t.stop()}}),t,null,[[0,14]])}
1)))).apply(this,arguments)}}),[]),I=function(){var e=Object(a.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(confirm("Are you sure you want to remove your record from ".concat(t.title,"?\nAll the data & progress collected during the chapters will be lost."))){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,g.a.get("/api/story/removeThisRecord/".concat(t._id),{headers:{"auth-token":o}});case 5:e.sent.data&&(k.b.success(Object(l.jsxs)("div",{children:["Successfully removed the record from ",Object(l.jsx)("b",{children:t.title}),"."]})),w(null)),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),k.b.error(e.t0.response.data);case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();return null!==r?Object(l.jsx)(xt,{socket:s,racersList:t,trackInfo:r,setJoinedRace:n,startThisStory:C,initials:N.current}):Object(l.jsxs)(l.Fragment,{children:[Object(l.jsxs)("div",{className:"jsx-2937260274 racingTemplate",children:[Object(l.jsx)("h1",{className:"jsx-2937260274",children:"Story Zone"}),j&&Object(l.jsx)("div",{id:"moreInfoStoryWrapper",className:"jsx-2937260274",children:Object(l.jsx)("div",{id:"moreInfoStory",className:"jsx-2937260274",children:Object(l.jsxs)("div",{id:"moreInfoStoryContent",className:"jsx-2937260274",children:[Object(l.jsx)("div",{id:"closeButton",alt:"close info button",onClick:function(){return f(!1)},className:"jsx-2937260274",children:"X"}),Object(l.jsx)("h2",{className:"jsx-2937260274",children:j.title}),Object(l.jsx)("div",{className:"jsx-2937260274",children:j.author}),Object(l.jsx)("p",{className:"jsx-2937260274",children:j.desc}),Object(l.jsxs)("button",{onClick:function(){return C(j,!1)},className:"jsx-2937260274 buttonOption",children:[v&&j._id===v._id?"Resume Typing":"Start Typing!",Object(l.jsxs)("div",{className:"jsx-2937260274",children:[j.characters.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")," characters"]})]}),Object(l.jsx)("div",{id:"toptimesWrapper",className:"jsx-2937260274",children:Object(l.jsx)(S.a,{trackInfo:{toptimes:j.toptimes},isStory:!0})})]})})}),Object(l.jsxs)("div",{id:"storyZoneContainer",className:"jsx-2937260274",children:[Object(l.jsx)("div",{id:"topLeftProfile",onClick:function(){n(0)},className:"jsx-2937260274",children:"Back Homepage"}),Object(l.jsx)("div",{id:"topRightProfile",onClick:function(){n(4)},className:"jsx-2937260274",children:"FAQ Story Mode"}),null===v?Object(l.jsx)("div",{id:"wrapperStoryExplanationUser",className:"jsx-2937260274",children:Object(l.jsxs)("div",{id:"contentExplanationUser",className:"jsx-2937260274",children:[Object(l.jsxs)("div",{className:"jsx-2937260274",children:["Welcome ",t[0].user," ! \ud83d\ude0a"]}),Object(l.jsx)("div",{className:"jsx-2937260274",children:"Pick a story you'd like to start typing"}),0!==O.current.length&&Object(l.jsxs)("div",{style:{marginTop:"10px"},className:"jsx-2937260274",children:[Object(l.jsx)("b",{className:"jsx-2937260274",children:"*"})," Stories that have a checkmark are stories that you finished typing in the past."]})]})}):Object(l.jsx)("div",{id:"wrapperStoryExplanationUser",className:"jsx-2937260274",children:Object(l.jsxs)("div",{id:"contentExplanationUser",className:"jsx-2937260274",children:[Object(l.jsxs)("div",{className:"jsx-2937260274",children:["Welcome back ",t[0].user," ! \ud83d\ude0a"]}),Object(l.jsxs)("div",{className:"jsx-2937260274",children:["It was found that you started typing ",Object(l.jsx)("b",{className:"jsx-2937260274",children:v.title})," by ",Object(l.jsx)("b",{className:"jsx-2937260274",children:v.author}),"."]}),Object(l.jsx)("div",{className:"jsx-2937260274",children:"You are unable to start a new story, you must pick one of the options below to continue:"}),Object(l.jsxs)("div",{className:"jsx-2937260274 buttonOptionsWrapper",children:[Object(l.jsxs)("button",{onClick:function(){return C(v,!0)},className:"jsx-2937260274 buttonOption",children:[Object(l.jsx)("img",{src:ft,alt:"start new race",className:"jsx-2937260274"}),"Resume Story"]}),Object(l.jsxs)("button",{onClick:function(){return I(v)},className:"jsx-2937260274 buttonOption",children:[Object(l.jsx)("img",{src:gt,alt:"remove this record",className:"jsx-2937260274"}),"Remove this record"]})]}),0!==O.current.length&&Object(l.jsxs)("div",{style:{marginTop:"10px"},className:"jsx-2937260274",children:[Object(l.jsx)("b",{className:"jsx-2937260274",children:"*"})," Stories that have a checkmark are stories that you finished typing in the past."]})]})}),null===m?Object(l.jsxs)("div",{id:"loadingGifContainer",className:"jsx-2937260274",children:[Object(l.jsx)("img",{src:bt,alt:"loading stories",className:"jsx-2937260274"}),Object(l.jsx)("div",{className:"jsx-2937260274 waitingPlayers",children:Object(l.jsx)("div",{className:"jsx-2937260274",children:"Loading Stories"})})]}):Object(l.jsx)("div",{id:"storiesWrapper",className:"jsx-2937260274",children:m.map((function(e){return Object(l.jsxs)("div",{onClick:function(){return T(e)},className:"jsx-2937260274 "+((-1!==O.current.indexOf(e._id)?"specificStory finished":"specificStory")||""),children:[-1!==O.current.indexOf(e._id)&&Object(l.jsx)("img",{src:kt,alt:"Finished Typing ".concat(e.title),title:"Finished Typing ".concat(e.title),className:"jsx-2937260274 checkmarkFinished"}),Object(l.jsx)("h4",{className:"jsx-2937260274",children:e.title}),Object(l.jsx)("div",{className:"jsx-2937260274",children:e.author}),Object(l.jsxs)("div",{className:"jsx-2937260274",children:[e.characters.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")," characters"]})]},e._id)}))}),Object(l.jsxs)("div",{id:"creditSource",className:"jsx-2937260274",children:["Source: ",Object(l.jsx)("a",{href:"https://gutenberg.org/",target:"_blank",rel:"noopener noreferrer",className:"jsx-2937260274",children:"gutenberg.org"})]})]})]}),Object(l.jsx)(Oe.a,{dontShow:"homepage",user:o}),Object(l.jsx)(u.a,{id:"2937260274",children:[".racingTemplate.jsx-2937260274{min-height:calc(100vh - 80px);}","#creditSource.jsx-2937260274{position:absolute;color:grey;bottom:7px;right:7px;font-size:16px;}","#creditSource.jsx-2937260274 a.jsx-2937260274{color:grey;}","#moreInfoStoryContent.jsx-2937260274{max-width:1300px;margin:15px auto 5px auto;}","#toptimesWrapper.jsx-2937260274{background:#f9f9f9;padding:10px;box-shadow:0px 0px 3px 0px #000;}","#moreInfoStoryWrapper.jsx-2937260274{position:fixed;top:0;left:0;z-index:7;width:100%;height:100vh;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;
1-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background:rgba(0,0,0,0.6);opacity:0;-webkit-transition:opacity 500ms;transition:opacity 500ms;}","#moreInfoStoryWrapper.opened.jsx-2937260274{opacity:1;}","#moreInfoStory.jsx-2937260274{overflow:auto;max-height:90vh;width:1400px;padding:15px;padding-left:45px;position:relative;background:#dedede;border-radius:45px;}","#moreInfoStory.jsx-2937260274 p.jsx-2937260274{text-align:left;}","#moreInfoStory.jsx-2937260274 .buttonOption.jsx-2937260274{max-width:100%;width:300px;padding:10px 20px;margin:10px 0;}","#moreInfoStory.jsx-2937260274{margin-top:5px;}","@media screen and (max-width:1420px){#moreInfoStory.jsx-2937260274{max-width:98%;}}","@media screen and (max-width:1060px){#moreInfoStory.jsx-2937260274{max-height:80vh;top:-5vh;}#contentExplanationUser.jsx-2937260274 .buttonOptionsWrapper.jsx-2937260274{-webkit-box-pack:space-around !important;-webkit-justify-content:space-around !important;-ms-flex-pack:space-around !important;justify-content:space-around !important;}}","#closeButton.jsx-2937260274{position:absolute;left:0;height:100%;top:0;cursor:pointer;padding:5px 10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1;font-weight:bold;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background:#9fced2;color:#020202;box-shadow:0px 0px 3px 0px #000;margin-top:0;}","#wrapperStoryExplanationUser.jsx-2937260274{padding:10px;margin:20px 0px 30px 0px;width:calc(100% + 30px);position:relative;left:-15px;background:#e0e0e0;}","#contentExplanationUser.jsx-2937260274{max-width:1000px;margin:0 auto;}","#contentExplanationUser.jsx-2937260274 .buttonOptionsWrapper.jsx-2937260274{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;margin:10px 0;}","#contentExplanationUser.jsx-2937260274 .buttonOptionsWrapper.jsx-2937260274 .buttonOption.jsx-2937260274{margin:0;}","@media screen and (max-width:1270px){#contentExplanationUser.jsx-2937260274{width:95%;}}","#storiesWrapper.jsx-2937260274{margin:10px 0;display:grid;grid-template-columns:repeat(3,1fr);grid-gap:50px;}",".specificStory.finished.jsx-2937260274{position:relative;}",".checkmarkFinished.jsx-2937260274{position:absolute;right:5px;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}",".specificStory.finished.jsx-2937260274 h4.jsx-2937260274,.specificStory.finished.jsx-2937260274 div.jsx-2937260274{padding-right:25px;}",".specificStory.jsx-2937260274{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background:#f8f8f8;box-shadow:0px 0px 3px 1px #555,3px 0px 3px #7a7a7a,6px 6px 3px #6b6b6b;padding:10px 5px;padding-left:17px;position:relative;width:320px;margin:0 auto;cursor:pointer;text-align:center;word-break:break-word;}",'.specificStory.jsx-2937260274:after{content:"";height:100%;background:linear-gradient(90deg,rgba(2,0,36,1) 0%,rgba(108,108,108,1) 100%);width:15px;position:absolute;top:0;left:0;}',".specificStory.jsx-2937260274 h4.jsx-2937260274{margin:0;padding:0 5px;font-weight:600;}","@media screen and (max-width:1180px){#storiesWrapper.jsx-2937260274{grid-template-columns:repeat(2,1fr);grid-gap:30px;}}","@media screen and (max-width:776px){#storiesWrapper.jsx-2937260274{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;grid-gap:0;}.specificStory.jsx-2937260274{width:100%;margin-bottom:20px;box-shadow:0px 0px 3px 1px #555,3px 0px 3px #7a7a7a;}.specificStory.jsx-2937260274:last-child{margin-bottom:0;}#creditSource.jsx-2937260274{white-space:nowrap;right:50%;-webkit-transform:translateX(50%);-ms-transform:translateX(50%);transform:translateX(50%);}}","#topRightProfile.jsx-2937260274,#topLeftProfile.jsx-2937260274{background:#D7DEE3;position:absolute;top:0;right:0;padding:6px 14px;font-weight:500;cursor:pointer;border-bottom-left-radius:10px;-webkit-transition:background 500ms;transition:background 500ms;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}","#topRightProfile.jsx-2937260274:active,#topLeftProfile.jsx-2937260274:active{background:rgb(151,215,255);}","#topLeftProfile.jsx-2937260274{border-bottom-left-radius:0;border-bottom-right-radius:10px;right:auto;left:0;}","#storyZoneContainer.jsx-2937260274{text-align:left;max-width:1200px;margin:0 auto;background:#f3f3f3;padding:15px;border-radius:10px;padding-top:35px;padding-bottom:35px;position:relative;}","#storyZoneContainer.jsx-2937260274 h3.jsx-2937260274{padding:5px 0;}","#storyZoneContainer.jsx-2937260274 section.jsx-2937260274{margin-bottom:30px;}","#storyZoneContainer.jsx-2937260274 section.jsx-2937260274:last-child{margin-bottom:0;}","@media screen and (max-width:1270px){#storyZoneContainer.jsx-2937260274{width:95%;}}","#loadingGifContainer.jsx-2937260274{padding:20px 0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;
1-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}","#loadingGifContainer.jsx-2937260274 .waitingPlayers.jsx-2937260274{margin-top:20px;}","#loadingGifContainer.jsx-2937260274 img.jsx-2937260274{width:80px;}"]})]})},vt=r("tMKq"),wt=r.n(vt),Ot=r("nOHt"),St=r("8eCf"),Nt=r("SA71"),Tt=["Dark","Light","Grayscale"];function Ct(){var e=Object(p.useState)("Dark"),t=e[0],r=e[1];Object(p.useEffect)((function(){var e=localStorage.getItem("theme");e&&r(e)}),[]),Object(p.useEffect)((function(){localStorage.setItem("theme",t),Tt.forEach((function(e){document.documentElement.classList.remove(e)})),document.documentElement.classList.add(t)}),[t]);var n=function(){document.getElementById("changeTheme").classList.toggle("closed")};return Object(l.jsxs)("div",{id:"changeTheme",onMouseLeave:function(){document.getElementById("changeTheme").classList.add("closed")},className:"jsx-2498060648 closed",children:[Object(l.jsxs)("div",{className:"jsx-2498060648",children:["Site Theme ",Object(l.jsxs)("span",{id:"pickedSiteTheme",onMouseEnter:function(){return n()},onClick:function(){return n()},className:"jsx-2498060648",children:[t," ",Object(l.jsx)("img",{src:St,className:"jsx-2498060648"})]})]}),Object(l.jsx)("div",{id:"optionsSiteTheme",className:"jsx-2498060648",children:Tt.map((function(e){return Object(l.jsxs)("div",{onClick:function(){return r(e)},className:"jsx-2498060648 siteThemes",children:[Object(l.jsx)("span",{className:"jsx-2498060648",children:e}),e===t&&Object(l.jsx)("img",{src:Nt,className:"jsx-2498060648"})]},e)}))}),Object(l.jsx)(u.a,{id:"2498060648",children:["#optionsSiteTheme.jsx-2498060648{position:absolute;left:0;top:100%;width:100%;overflow:hidden;outline:unset;max-height:200px;-webkit-transition:max-height 350ms ease-out;transition:max-height 350ms ease-out;}","#changeTheme.closed.jsx-2498060648 #optionsSiteTheme.jsx-2498060648{max-height:0;-webkit-transition:max-height 350ms ease-in;transition:max-height 350ms ease-in;}","#pickedSiteTheme.jsx-2498060648{margin-left:20px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer;}","#pickedSiteTheme.jsx-2498060648 img.jsx-2498060648{-webkit-transition:-webkit-transform 250ms;-webkit-transition:transform 250ms;transition:transform 250ms;}","#changeTheme.jsx-2498060648:not(.closed) #pickedSiteTheme.jsx-2498060648 img.jsx-2498060648{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}","#pickedSiteTheme.jsx-2498060648 img.jsx-2498060648,.siteThemes.jsx-2498060648 img.jsx-2498060648{margin-left:5px;position:relative;top:1px;}",".siteThemes.jsx-2498060648{padding:8px 10px;background:#D7DEE3;cursor:pointer;}","#changeTheme.jsx-2498060648>div.jsx-2498060648:first-child{width:100%;height:100%;}","#changeTheme.jsx-2498060648>div.jsx-2498060648:first-child,.siteThemes.jsx-2498060648{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}","#changeTheme.jsx-2498060648{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;min-width:224px;font-weight:600;position:absolute;right:0px;background:#D7DEE3;padding:8px 10px;font-size:17px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}","#changeTheme.closed.jsx-2498060648{border-bottom-left-radius:15px;}","@media screen and (min-width:1060px){#changeTheme.jsx-2498060648{top:60px;z-index:7;}}","@media screen and (max-width:1060px){#changeTheme.jsx-2498060648{padding:7px 10px;top:0;-webkit-box-pack:center;
1-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;z-index:7;}}","@media screen and (max-width:600px){#changeThemeWrapper.jsx-2498060648{font-size:12px;padding:9px 10px;border-left:1px solid #585858;}}"]})]})}var It=m.a.memo(Ct),Bt=r("6ldB"),Pt=r.n(Bt);function Lt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wt=r("NYmN"),Rt=r("Zph2"),Mt=r("4Txv"),Ft=r("ket+"),_t=r("lhQN"),At=r("cCMN"),Dt=r("1em0");t.default=function(e){var t=e.socket,r=Object(Ot.useRouter)(),n=Object(p.useContext)(y.a).user,s=Object(p.useContext)(v.a).uniqueLink,d=Object(be.a)(),j=Object(o.a)(d,1)[0],f="none"===n?"":s,O=Object(p.useState)([]),S=O[0],N=O[1],I=Object(p.useRef)("medium"),B=Object(p.useState)(0),L=B[0],E=B[1],W=Object(p.useState)([]),R=W[0],M=W[1],F=Object(p.useState)(null),_=F[0],A=F[1],D=Object(p.useState)(null),V=D[0],q=D[1],G=Object(p.useRef)(!1),z=Object(p.useState)(!1),H=z[0],Y=z[1],U=Object(p.useRef)({toastTimeout:null,debounce:null}),J=Object(p.useRef)(""),K=Object(p.useState)(!1),X=K[0],Q=K[1],Z=Object(p.useState)(!1),$=Z[0],ee=Z[1],te=Object(p.useState)(!1),re=te[0],ne=te[1];Object(p.useEffect)((function(){if(1!==L&&2!==L&&4!==L&&5!==L&&6!==L||window.scrollTo(0,0),0!==L)return document.querySelector("main").classList.add("duringRace"),void document.querySelector("main").classList.remove("homepage");ce(),se(),document.querySelector("main").classList.remove("duringRace"),document.querySelector("main").classList.add("homepage"),J.current="",M([]),A(null),q(null),G.current=!1}),[L,re]);var se=function(){ve();var e=localStorage.getItem("difficultyPractice");if(e){if("easy"===e){var t=document.getElementsByClassName("levelPractice")[0];ye(t,e)}else if("medium"===e){var r=document.getElementsByClassName("levelPractice")[1];ye(r,e)}else if("hard"===e){var n=document.getElementsByClassName("levelPractice")[2];ye(n,e)}}else I.current="medium",localStorage.setItem("difficultyPractice","medium")},ce=function(){for(var e=document.getElementsByClassName("gamemodeContainer"),t=0;t<e.length;t++)e[t].lastChild.src=e[t].lastChild.dataset.src};Object(p.useEffect)((function(){0!==L||re||("yesSteno"===localStorage.getItem("steno")?(J.current="",document.addEventListener("keydown",ae,!1),Q(!0)):(document.addEventListener("keydown",ie,!1),document.addEventListener("keyup",oe,!1),Q(!1)));return function(){document.removeEventListener("keydown",ae,!1),document.removeEventListener("keydown",ie,!1),document.removeEventListener("keyup",oe,!1)}}),[n,L,re]);var ae=function(e){J.current+=e.key;var t=J.current.toLowerCase();-1!==t.indexOf("quote")&&(je("quote"),J.current=""),-1!==t.indexOf("practice")&&(xe(),J.current=""),-1!==t.indexOf("friend")&&(""===s?he():r.push("/racetrack/[uniqueUser]","/racetrack/".concat(f)),J.current=""),-1!==t.indexOf("story")&&(je("story"),J.current=""),-1!==t.indexOf("word")&&(je("words"),J.current=""),-1!==t.indexOf("custom")&&(je("customPractice"),J.current="")},ie=function(e){e.shiftKey&&ee(!0),e.shiftKey&&81===e.keyCode?je("quote"):e.shiftKey&&80===e.keyCode?xe():e.shiftKey&&70===e.keyCode?""===s?he():r.push("/racetrack/[uniqueUser]","/racetrack/".concat(f)):e.shiftKey&&83===e.keyCode?je("story"):e.shiftKey&&87===e.keyCode?je("words"):e.shiftKey&&67===e.keyCode&&je("customPractice")},oe=function(e){16===e.keyCode&&ee(!1)};Object(p.useEffect)((function(){var e=Object(i.a)(document.querySelectorAll(".pressLetterJoinGamemode"));$?e.forEach((function(e){return e.classList.add("shiftPressed")})):e.forEach((function(e){return e.classList.remove("shiftPressed")}))}),[$]),Object(p.useEffect)((function(){return le(),sessionStorage.getItem("loggedNow")&&(k.b.success("Successfully logged in \ud83d\ude0a",{position:"top-center",autoClose:3500,hideProgressBar:!1,closeOnClick:!1,pauseOnHover:!1,draggable:!0,progress:void 0}),sessionStorage.removeItem("loggedNow")),sessionStorage.getItem("signedOutNow")&&(k.b.success("Successfully signed out \ud83d\ude22",{position:"top-center",autoClose:3500,hideProgressBar:!1,closeOnClick:!1,pauseOnHover:!1,draggable:!0,progress:void 0}),sessionStorage.removeItem("signedOutNow")),sessionStorage.getItem("successfullyVerifiedEmail")&&(k.b.success(Object(l.jsxs)(m.a.Fragment,{children:[Object(l.jsxs)("div",{style:{marginBottom:"20px"},children:["Congratulations, ",Object(l.jsx)("b",{children:sessionStorage.getItem("successfullyVerifiedEmail")})," !"]}),Object(l.jsx)("div",{children:"Successfully verified your email address."})]}),{position:"top-center",autoClose:3500,hideProgressBar:!1,closeOnClick:!1,pauseOnHover:!0,draggable:!0,progress:void 0}),sessionStorage.removeItem("successfullyVerifiedEmail")),sessionStorage.getItem("kickedFromPR")&&(k.b.warning("You've been kicked out of the private racetrack y
1ou were playing.",{position:"top-center",autoClose:5e3,hideProgressBar:!1,closeOnClick:!1,pauseOnHover:!1,draggable:!0,progress:void 0}),sessionStorage.removeItem("kickedFromPR")),j(t),function(){t.off(),clearTimeout(U.current.toastTimeout),clearTimeout(U.current.debounce)}}),[]);var le=function(){var e=Object(a.a)(c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.a.get("/api/leaderboard/getLastestHighestScore",{headers:{"auth-sender":"typination"}});case 3:t=e.sent,N(t.data),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),e.t0.response.data.spam&&k.b.error("Too many requests. You are able to execute this request again in ".concat(e.t0.response.data.spam,"."));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();function de(){return ue.apply(this,arguments)}function ue(){return(ue=Object(a.a)(c.a.mark((function e(){var t,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("none"!==n){e.next=18;break}return e.prev=1,e.next=4,g.a.get("/api/racetracks/randomGuestJoin");case 4:return t=e.sent,e.abrupt("return",t.data);case 8:if(e.prev=8,e.t0=e.catch(1),!e.t0.response.data.spam){e.next=15;break}return k.b.error("Too many requests. You are able to execute this request again in ".concat(e.t0.response.data.spam,".")),e.abrupt("return",void 0);case 15:return e.abrupt("return",{user:"Guest",link:"none",profilePic:"none",trackstyle:"Basic"});case 16:e.next=33;break;case 18:return e.prev=18,e.next=21,g.a.get("/api/profile/getMyName",{headers:{"auth-token":n}});case 21:return r=e.sent,e.abrupt("return",r.data);case 25:if(e.prev=25,e.t1=e.catch(18),!e.t1.response.data.spam){e.next=31;break}k.b.error("Too many requests. You are able to execute this request again in ".concat(e.t1.response.data.spam,".")),e.next=33;break;case 31:return k.b.error(e.t1.response.data),e.abrupt("return",{user:"Guest",link:"none",profilePic:"none",trackstyle:"Basic"});case 33:case"end":return e.stop()}}),e,null,[[1,8],[18,25]])})))).apply(this,arguments)}function pe(e,t,r){return function(){var n=this,s=arguments,c=function(){U.current.debounce=null,r||e.apply(n,s)},a=r&&!U.current.debounce;clearTimeout(U.current.debounce),U.current.debounce=setTimeout(c,t),a&&e.apply(n,s)}}var me=pe((function(e){var r={text:function(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=[e[r],e[t]];e[t]=n[0],e[r]=n[1]}return e}(T.a).slice(0,50).join(" "),pr:!0,ltr:!0,mode:6};de().then((function(n){void 0!==n&&(t.emit("joinRace",Et(Et({},n),{},{typeOfRace:e,wordsRacetrack:[r]})),t.on("joinedMatch",(function(e){E(1),M(e.users);var t=e.track[0].text.split(" "),r="yesSteno"===localStorage.getItem("steno")?Object(C.a)(t):"";A(Et(Et({},e.track[0]),{},{wordBlocks:t,jumpingCarValue:100/t.length,personalTrackNumber:e.users.length-1,stenoStrokes:r}))})),t.on("newPlayerJoinedNow",(function(e){M((function(t){return t.concat(e)}))})),t.on("stopwatch",(function(e){q(e)})))}))}),1e3,!0),xe=pe(Object(a.a)(c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("easy"===I.current||"medium"===I.current||"hard"===I.current){e.next=3;break}return k.b.error("Wrong information provided"),e.abrupt("return");case 3:return e.prev=3,e.next=6,g.a.get("/api/racetracks/getRandomRacetrack/".concat(I.current),{headers:{"auth-sender":"typination"}});case 6:t=e.sent,de().then((function(e){if(void 0!==e){M([e]);var r=t.data.text.split(" "),n="yesSteno"===localStorage.getItem("steno")?Object(C.a)(r):"";A(Et(Et({},t.data),{},{wordBlocks:r,jumpingCarValue:100/r.length,personalTrackNumber:0,stenoStrokes:n})),E(2)}})),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),k.b.error(e.t0.response.data);case 13:case"end":return e.stop()}}),e,null,[[3,10]])}))),1e3,!0),he=function(){"none"===n?k.b.error("You must be logged in to use this feature"):k.b.error("Please relog into your account and try to access this page")},je=function(e){"quote"===e&&me("quote"),"words"===e&&me("words"),"story"===e&&ke(),"customPractice"===e&&ge()},ge=function(){de().then((function(e){void 0!==e&&(M([e]),E(6))}))},ke=function(){de().then((function(e){if(void 0!==e){M([e]);var t=localStorage.getItem("didReadExplanation");E("yes"===t?5:4)}}))},ye=function(e,t){I.current=t,localStorage.setItem("difficultyPractice",t),Object(i.a)(document.querySelectorAll("#darknessPractice > div >
1 .levelPractice")).forEach((function(e){return e.classList.remove("picked")})),e&&e.classList.add("picked")},ve=function(){document.getElementById("darknessPractice").classList.add("hidden")};return 1===L?Object(l.jsxs)(h.a,{joinedRace:L,setJoinedRace:E,socket:t,trackInfo:_,duringRace:!0,children:[Object(l.jsx)(x.a,{title:"Random Racetrack"}),Object(l.jsx)(k.a,{}),Object(l.jsx)(w.a,{trackInfo:_,racersList:R,stopWatch:V,didStopwatchStart:G,socket:t,setJoinedRace:E,setRacersList:M,joinRandomRace:me,callRaceFinishedTimeoutToast:function(){U.current.toastTimeout=setTimeout((function(){k.b.info(Object(l.jsxs)(m.a.Fragment,{children:[Object(l.jsxs)("div",{style:{marginBottom:"20px"},children:["We are sorry but ",Object(l.jsx)("b",{children:"3 minutes"})," passed since the race started."]}),Object(l.jsx)("div",{children:"You've been kicked from the room for not finishing in time."})]}),{position:"top-center",autoClose:!1,hideProgressBar:!1,closeOnClick:!1,pauseOnHover:!0,draggable:!0,progress:void 0})}),50)},latestScores:S})]}):2===L?Object(l.jsxs)(h.a,{joinedRace:L,setJoinedRace:E,socket:t,trackInfo:_,duringRace:!0,children:[Object(l.jsx)(x.a,{title:"Practice Racetrack"}),Object(l.jsx)(k.a,{}),Object(l.jsx)(fe,{trackInfo:_,racersList:R,setJoinedRace:E,levelPicked:I.current,setTrackInfo:A,socket:t,latestScores:S})]}):4===L?Object(l.jsxs)(h.a,{joinedRace:L,setJoinedRace:E,socket:t,trackInfo:_,children:[Object(l.jsx)(x.a,{title:"Story Mode"}),Object(l.jsx)(k.a,{}),Object(l.jsx)(Re,{setJoinedRace:E,socket:t})]}):5===L?Object(l.jsxs)(h.a,{joinedRace:L,setJoinedRace:E,socket:t,trackInfo:_,duringRace:null!==_,children:[Object(l.jsx)(x.a,{title:"Story Mode"}),Object(l.jsx)(k.a,{}),Object(l.jsx)(yt,{setTrackInfo:A,trackInfo:_,racersList:R,setJoinedRace:E,socket:t})]}):6===L?Object(l.jsxs)(h.a,{joinedRace:L,setJoinedRace:E,socket:t,trackInfo:_,duringRace:null!==_,children:[Object(l.jsx)(x.a,{title:"Custom Practice"}),Object(l.jsx)(k.a,{}),Object(l.jsx)(fe,{setTrackInfo:A,trackInfo:_,racersList:R,setJoinedRace:E,socket:t,isCustomPractice:!0,latestScores:S})]}):Object(l.jsxs)(h.a,{joinedRace:L,children:[Object(l.jsx)(x.a,{title:"Homepage",description:"TypiNation is a multiplayer community typing game where you can compete & improve your typing speed along with other players all around the world."}),Object(l.jsx)(Ne.a,{children:Object(l.jsx)("meta",{property:"og:url",content:"https://www.typination.com",className:"jsx-3401288571"})}),Object(l.jsx)("div",{id:"particlesWrapper",className:"jsx-3401288571",children:Object(l.jsx)(wt.a,{id:"tsparticles",options:{fpsLimit:60,particles:{color:{value:"#ffffff"},collisions:{enable:!0},move:{direction:"bottom",enable:!0,outMode:"out",random:!0,speed:.8},number:{density:{enable:!0,value_area:800},value:10},opacity:{value:.08},shape:{type:"circle"},size:{value:6,random:!0}},detectRetina:!0}})}),Object(l.jsx)(Be,{openedChangeThemeHomepage:re,setOpenedChangeThemeHomepage:ne,trackInfo:_,racersList:R,setRacersList:M,setTrackInfo:A,getName:de,socket:t}),Object(l.jsxs)("div",{id:"openSpinButton",onClick:function(){Y(!0)},className:"jsx-3401288571",children:[Object(l.jsx)("img",{src:Dt,alt:"free spinwheel earn coins",loading:"lazy",className:"jsx-3401288571"}),Object(l.jsx)("span",{className:"jsx-3401288571",children:"Spin"})]}),Object(l.jsx)(It,{}),Object(l.jsx)(k.a,{limit:1}),H&&Object(l.jsx)(we,{user:n,setWantsSpinWheel:Y}),Object(l.jsx)("div",{id:"darknessPractice",className:"jsx-3401288571 hidden",children:Object(l.jsxs)("div",{className:"jsx-3401288571",children:[Object(l.jsx)("div",{id:"xButton",onClick:ve,className:"jsx-3401288571",children:"X"}),Object(l.jsx)("h3",{className:"jsx-3401288571",children:"Select difficulty"}
1),Object(l.jsx)("div",{onClick:function(e){return ye(e.target,"easy")},className:"jsx-3401288571 levelPractice",children:"SHORT"}),Object(l.jsx)("div",{onClick:function(e){return ye(e.target,"medium")},className:"jsx-3401288571 levelPractice picked",children:"MEDIUM"}),Object(l.jsx)("div",{onClick:function(e){return ye(e.target,"hard")},className:"jsx-3401288571 levelPractice",children:"LONG"}),Object(l.jsx)("button",{onClick:function(){return xe()},className:"jsx-3401288571 buttonOption",children:"Start Practice"})]})}),Object(l.jsxs)("div",{id:"contentWrapper",className:"jsx-3401288571",children:[X?Object(l.jsxs)("div",{id:"tipHomepage",className:"jsx-3401288571",children:["Type mode name to access game modes quickly",Object(l.jsx)("div",{className:"jsx-3401288571",children:"Quote = KWOET | Word = WORD | Friend = TPREPBD | Practice = PRAGBS  | Custom Practice = KUFPL | Story = STOER"})]}):Object(l.jsx)("div",{id:"tipHomepage",className:"jsx-3401288571",children:"Hold SHIFT+[KEY] to access game modes quickly"}),Object(l.jsxs)("h1",{className:"jsx-3401288571",children:["TypiNation",Object(l.jsx)("span",{className:"jsx-3401288571",children:" - Typing Speed Game"})]}),Object(l.jsx)("div",{id:"contentIndex",className:"jsx-3401288571",children:Object(l.jsxs)("div",{id:"cardsWrapper",className:"jsx-3401288571",children:[Object(l.jsxs)("div",{onClick:function(){return me("quote")},className:"jsx-3401288571 gamemodeContainer",children:[Object(l.jsxs)("div",{className:"jsx-3401288571 infoGamemode",children:[Object(l.jsxs)("h2",{className:"jsx-3401288571",children:[Object(l.jsx)("span",{className:"jsx-3401288571 pressLetterJoinGamemode",children:"Q"}),"uote Race"]}),Object(l.jsx)("p",{className:"jsx-3401288571",children:"Match up with randoms and beat them with your typing speed"})]}),Object(l.jsx)("img",{"data-src":Wt,alt:"join random race",loading:"lazy",className:"jsx-3401288571"})]}),Object(l.jsxs)("div",{onClick:function(){return me("words")},className:"jsx-3401288571 gamemodeContainer",children:[Object(l.jsxs)("div",{className:"jsx-3401288571 infoGamemode",children:[Object(l.jsxs)("h2",{className:"jsx-3401288571",children:[Object(l.jsx)("span",{className:"jsx-3401288571 pressLetterJoinGamemode",children:"W"}),"ords Race"]}),Object(l.jsx)("p",{className:"jsx-3401288571",children:"Match up with randoms and beat them with your typing speed"})]}),Object(l.jsx)("img",{"data-src":Mt,alt:"free spinwheel earn coins",loading:"lazy",className:"jsx-3401288571"})]}),""===f?Object(l.jsxs)("div",{onClick:function(){return he()},className:"jsx-3401288571 gamemodeContainer",children:[Object(l.jsxs)("div",{className:"jsx-3401288571 infoGamemode",children:[Object(l.jsxs)("h2",{className:"jsx-3401288571",children:["Play with ",Object(l.jsx)("span",{className:"jsx-3401288571 pressLetterJoinGamemode",children:"F"}),"riends"]}),Object(l.jsx)("p",{className:"jsx-3401288571",children:"Challenge your friends with custom personal texts, random racetracks, or matchmaking"})]}),Object(l.jsx)("img",{"data-src":_t,alt:"race with friends",loading:"lazy",className:"jsx-3401288571"})]}):Object(l.jsxs)("div",{className:"jsx-3401288571 gamemodeContainer",children:[Object(l.jsx)(b.a,{href:"/racetrack/[uniqueUser]",as:"/racetrack/".concat(f),children:Object(l.jsxs)("a",{className:"jsx-3401288571 infoGamemode",children:[Object(l.jsxs)("h2",{className:"jsx-3401288571",children:["Play with ",Object(l.jsx)("span",{className:"jsx-3401288571 pressLetterJoinGamemode",children:"F"}),"riends"]}),Object(l.jsx)("p",{className:"jsx-3401288571",children:"Challenge your friends with custom personal texts, random racetracks, or matchmaking"})]})}),Object(l.jsx)("img",{"data-src":_t,alt:"race with friends",loading:"lazy",className:"jsx-3401288571"})]}),Object(l.jsxs)("div",{onClick:function(){return document.getElementById("darknessPractice").classList.remove("hidden")},className:"jsx-3401288571 gamemodeContainer",children:[Object(l.jsxs)("div",{className:"jsx-3401288571 infoGamemode",children:[Object(l.jsxs)("h2",{className:"jsx-3401288571",children:[Object(l.jsx)("span",{className:"jsx-3401288571 pressLetterJoinGamemode",children:"P"}),"ractice Quotes"]}),Object(l.jsx)("p",{className:"jsx-3401288571",children:"Practice a random quote and improve your typing speed"})]}),Object(l.jsx)("img",{"data-src":Rt,alt:"join practice race",loading:"lazy",className:"jsx-3401288571"})]}),Object(l.jsxs)("div",{onClick:ge,className:"jsx-3401288571 gamemodeContainer",children:[Object(l.jsxs)("div",{className:"jsx-3401288571 infoGamemode",children:[Object(l.jsxs)("h2",{className:"jsx-3401288571",children:[Object(l.jsx)("span",{className:"jsx-3401288571 pressLetterJoinGamemode",children:"C"}),"ustom Practice"]}),Object(l.jsx)("p",{className:"jsx-3401288571",children:"Define custom text / timed race / number of words and test your typing speed"})]}),Object(l.jsx)("img",{"data-src":Ft,alt:"join custom practice race",loading:"lazy",className:"jsx-3401288571"})]}),Object(l.jsxs)("div",{onClick:ke,className:"jsx-3401288571 gamemodeContainer",children:[Object(l.jsxs)("div",{className:"jsx-3401288571 infoGamemode",children:[Object(l.jsxs)("h2",{className:"jsx-3401288571",children:[Object(l.jsx)("span",{className:"jsx-3401288571 pressLetterJoinGamemode",children:"S"}),"tory Mode"]}),Object(l.jsx)("p",{className:"jsx-3401288571",children:"Select a story you'd like to read and test your typing skills"})]}),Object(l.jsx)("img",{"data-src":At,alt:"join story / novel mode",loading:"lazy",className:"jsx-3401288571"})]})]})})]}),Object(l.jsx)(Pt.a.Google,{client:"ca-pub-9980153742591033",slot:"8549648098",style:{display:"flex",justifyContent:"center",alignItems:"center"},format:"auto",responsive:"true",layoutKey:"-gw-1+2a-9x+5c"}),Object(l.jsx)("div",{id:"containerWrapperLeaderboard",className:"jsx-3401288571",children:Object(l.jsx)("div",{id:"wrapperLeaderboard",className:"jsx-3401288571",children:Object(l.jsx)(P.a,{latestScores:S})})}),Object(l.jsx)(Oe.a,{dontShow:"homepage",user:n}),Object(l.jsx)(u.a,{id:"3401288571",children:[".gamemodeContainer.jsx-3401288571{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;background:#efefef;cursor:pointer;-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;overflow:hidden;padding:0px 5px;-webkit-transform:scale(0.96);-ms-transform:scale(0.96);transform:scale(0.96);-webkit-transition:-webkit-transform 350ms;-webkit-transition:transform 350ms;transition:transform 350ms;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-shadow:0px 0px 2px 0px #000;border-radius:15px;}",".gamemodeContainer.jsx-3401288571:hover{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}","#openSpinButton.jsx-3401288571{background:#D7DEE3;position:absolute;right:0;top:97px;padding:7px 13px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;
1-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;border-bottom-left-radius:10px;cursor:pointer;}","#openSpinButton.jsx-3401288571 img.jsx-3401288571{margin-right:10px;-webkit-filter:grayscale(1);filter:grayscale(1);}",".gamemodeContainer.jsx-3401288571 img.jsx-3401288571{-webkit-transition:filter 400ms;transition:filter 400ms;object-fit:contain;-webkit-filter:invert(1) grayscale(1);filter:invert(1) grayscale(1);position:relative;top:25px;left:10px;}",".infoGamemode.jsx-3401288571{padding:0px 13px 10px 13px;}",".infoGamemode.jsx-3401288571 p.jsx-3401288571{margin-left:15px;margin-top:13px;font-size:19px;}",".infoGamemode.jsx-3401288571 h2.jsx-3401288571{text-align:center;position:relative;margin-bottom:10px;padding:8px 0;color:#adfff0;font-weight:600;position:relative;left:-34px;}",".gamemodeContainer.jsx-3401288571:nth-child(1) .infoGamemode.jsx-3401288571 h2.jsx-3401288571{color:rgb(79 109 255);}",".gamemodeContainer.jsx-3401288571:nth-child(2) .infoGamemode.jsx-3401288571 h2.jsx-3401288571{color:#8a3fff;}",".gamemodeContainer.jsx-3401288571:nth-child(3) .infoGamemode.jsx-3401288571 h2.jsx-3401288571{color:#ff5454;}",".gamemodeContainer.jsx-3401288571:nth-child(4) .infoGamemode.jsx-3401288571 h2.jsx-3401288571{color:#0ca064;}",".gamemodeContainer.jsx-3401288571:nth-child(5) .infoGamemode.jsx-3401288571 h2.jsx-3401288571{color:#f55094;}",".gamemodeContainer.jsx-3401288571:nth-child(6) .infoGamemode.jsx-3401288571 h2.jsx-3401288571{color:#d29a1f;}",'.infoGamemode.jsx-3401288571 h2.jsx-3401288571:after,.infoGamemode.jsx-3401288571 h2.jsx-3401288571:before{content:"";position:absolute;top:0;left:100%;width:100%;height:100%;}',".infoGamemode.jsx-3401288571 h2.jsx-3401288571:after{left:unset;right:100%;}",".pressLetterJoinGamemode.jsx-3401288571{padding:0;margin:0;-webkit-transition:background 500ms,padding 500ms,margin 500ms;transition:background 500ms,padding 500ms,margin 500ms;}",".pressLetterJoinGamemode.shiftPressed.jsx-3401288571{background:#5bdeded7;color:black;font-weight:600;border-radius:5px;padding:3px;margin:2px;}","#darknessPractice.jsx-3401288571{position:fixed;top:0;left:0;width:100%;height:100vh;background:rgba(0,0,0,0.6);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:7;opacity:1;-webkit-transition:opacity 400ms;transition:opacity 400ms;}","#darknessPractice.hidden.jsx-3401288571{opacity:0;z-index:-1;visibility:hidden;}","#darknessPractice.jsx-3401288571>div.jsx-3401288571{min-width:300px;background:white;max-width:95%;position:relative;text-align:center;padding:15px 15px 0px 35px;padding-left:46px;border-bottom-right-radius:15px;border-bottom-left-radius:15px;overflow:hidden;position:relative;border-radius:30px;}","#darknessPractice.jsx-3401288571>div.jsx-3401288571>.levelPractice.jsx-3401288571{width:90%;padding:5px;margin:15px auto;background:#dadada;border-radius:20px;box-shadow:0px 0px 2px 0px #000;cursor:pointer;-webkit-transition:background 300ms;transition:background 300ms;}","#darknessPractice.jsx-3401288571>div.jsx-3401288571>.levelPractice.jsx-3401288571:hover,#darknessPractice.jsx-3401288571>div.jsx-3401288571>.levelPractice.picked.jsx-3401288571{background:#a9a9a9;}","#darknessPractice.jsx-3401288571 h3.jsx-3401288571{font-weight:600;}","#darknessPractice.jsx-3401288571 #xButton.jsx-3401288571{position:absolute;left:0;height:100%;top:0;cursor:pointer;padding:5px 10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1;font-weight:600;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background:#9fced2;color:#020202;box-shadow:0px 0px 3px 0px #000;}","#darknessPractice.jsx-3401288571 .buttonOption.jsx-3401288571{width:calc(100% + 50px);position:relative;
1left:-24px;margin-left:auto;margin-right:auto;margin-bottom:0;}","#cardsWrapper.jsx-3401288571{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:65px;margin-bottom:50px;}","#wrapperLeaderboard.jsx-3401288571{margin:0 auto;}","#containerWrapperLeaderboard.jsx-3401288571{padding:70px 0;background:radial-gradient(circle,rgb(255 255 255) 0%,rgb(123 123 123) 30%,transparent 100%);}","@media screen and (max-width:1450px){#cardsWrapper.jsx-3401288571{grid-gap:30px;}#contentIndex.jsx-3401288571{width:98%;}}","@media screen and (max-width:1120px){#cardsWrapper.jsx-3401288571{grid-template-columns:repeat(2,1fr);}.gamemodeContainer.jsx-3401288571 img.jsx-3401288571{top:17px;}.infoGamemode.jsx-3401288571 p.jsx-3401288571{font-size:16px;}}","@media screen and (max-width:1060px){#openSpinButton.jsx-3401288571{top:37px;}}","@media screen and (max-width:1030px){#wrapperLeaderboard.jsx-3401288571{max-width:98%;}#containerWrapperLeaderboard.jsx-3401288571{padding-top:0;padding-bottom:20px;}#tipHomepage.jsx-3401288571{display:none;}}","@media screen and (max-width:650px){#contentWrapper.jsx-3401288571{overflow-x:hidden;}#openSpinButton.jsx-3401288571 span.jsx-3401288571{display:none;}}",'h1.jsx-3401288571{font-family:"Varela Round";text-align:center;margin-top:24px;padding:20px 0;margin-bottom:10px;font-size:57px;}',"#contentWrapper.jsx-3401288571{height:calc(100vh - 75px);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:space-evenly;-webkit-justify-content:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly;max-width:1400px;margin:0 auto;z-index:5;position:relative;}","#tipHomepage.jsx-3401288571{white-space:nowrap;text-align:center;position:absolute;bottom:10px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);color:#828282;font-size:14px;}","#contentIndex.jsx-3401288571{padding-top:20px;padding-bottom:10px;margin:0 auto;}","h1.jsx-3401288571 span.jsx-3401288571{display:none;}","@media screen and (max-width:690px){h1.jsx-3401288571{margin:10px 0;padding:10px 0;}#cardsWrapper.jsx-3401288571{grid-template-columns:1fr;}.gamemodeContainer.jsx-3401288571{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.gamemodeContainer.jsx-3401288571 img.jsx-3401288571{width:50px;object-fit:contain;}.infoGamemode.jsx-3401288571 p.jsx-3401288571{text-align:right;}#contentWrapper.jsx-3401288571{height:auto;}}","@media screen and (max-width:650px){h1.jsx-3401288571{font-size:22px;padding-top:20px;}.infoGamemode.jsx-3401288571 h2.jsx-3401288571{left:-28px;}}"]})]})}},SA71:function(e,t){e.exports={srcSet:"/_next/static/images/v-20-abda0e2e10791379a4fe6a7753329cbe.png 20w",images:[{path:"/_next/static/images/v-20-abda0e2e10791379a4fe6a7753329cbe.png",width:20,height:17}],src:"/_next/static/images/v-20-abda0e2e10791379a4fe6a7753329cbe.png",toString:function(){return"/_next/static/images/v-20-abda0e2e10791379a4fe6a7753329cbe.png"},placeholder:void 0,width:20,height:17}},VrLJ:function(e,t){e.exports={srcSet:"/_next/static/images/stop-28-ab3436a554918ddd15cc9da7095ecf63.png 28w",images:[{path:"/_next/static/images/stop-28-ab3436a554918ddd15cc9da7095ecf63.png",width:28,height:28}],src:"/_next/static/images/stop-28-ab3436a554918ddd15cc9da7095ecf63.png",toString:function(){return"/_next/static/images/stop-28-ab3436a554918ddd15cc9da7095ecf63.png"},placeholder:void 0,width:28,height:28}},WfhG:function(e,t,r){"use strict";var n=r("nKUr"),s=r("MX0m"),c=r.n(s),a=r("q1tI"),i=r.n(a),o=function(e){var t=e.racesPerPage,r=e.totalRaces,s=e.paginate,i=e.wantsOnlyFivePages,o=[];if(i)for(var l=1;l<=5;l++)o.push(l);else for(var d=1;d<=Math.ceil(r/t);d++)o.push(d);return Object(a.useEffect)((function(){if(o.length>10)for(var e=document.getElementById("pagination"),t=10;t<o.length;t++)e.children[t].style.display="none"}),[]),1===o.length?null:Object(n.jsxs)("nav",{className:"jsx-617860838 "+((i?"wantsOnlyFivePages":void 0)||""),children:[Object(n.jsx)("ul",{id:"pagination",className:"jsx-617860838",children:o.map((function(e){return Object(n.jsx)("li",{onClick:function(){return s(e)},className:"jsx-617860838 "+(1===e?"active":""),children:e},e)}))}),Object(n.jsx)(c.a,{id:"617860838",children:["nav.jsx-617860838{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;
1-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin-bottom:20px;margin-top:-10px;}","nav.wantsOnlyFivePages.jsx-617860838{margin-top:15px;margin-bottom:10px;}","#pagination.jsx-617860838{list-style-type:none;font-weight:bold;}","#pagination.jsx-617860838 li.jsx-617860838{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;padding:5px;cursor:pointer;margin:2px;font-weight:500;border-radius:5px;-webkit-transition:background 500ms;transition:background 500ms;}","#pagination.jsx-617860838 li.active.jsx-617860838{background:#cecece;}"]})]})};t.a=i.a.memo(o)},Zph2:function(e,t){e.exports={srcSet:"/_next/static/images/practice-70-ecf574516275d0d48f62712eea0a8ff7.png 70w",images:[{path:"/_next/static/images/practice-70-ecf574516275d0d48f62712eea0a8ff7.png",width:70,height:70}],src:"/_next/static/images/practice-70-ecf574516275d0d48f62712eea0a8ff7.png",toString:function(){return"/_next/static/images/practice-70-ecf574516275d0d48f62712eea0a8ff7.png"},placeholder:void 0,width:70,height:70}},cCMN:function(e,t){e.exports={srcSet:"/_next/static/images/book-65-94c6f7eb83f06637053529a8fa977962.png 65w",images:[{path:"/_next/static/images/book-65-94c6f7eb83f06637053529a8fa977962.png",width:65,height:65}],src:"/_next/static/images/book-65-94c6f7eb83f06637053529a8fa977962.png",toString:function(){return"/_next/static/images/book-65-94c6f7eb83f06637053529a8fa977962.png"},placeholder:void 0,width:65,height:65}},"d/4c":function(e,t){e.exports={srcSet:"/_next/static/images/restart-25-8df93d8a5c017dcfb8801ec420d9ed13.png 25w",images:[{path:"/_next/static/images/restart-25-8df93d8a5c017dcfb8801ec420d9ed13.png",width:25,height:25}],src:"/_next/static/images/restart-25-8df93d8a5c017dcfb8801ec420d9ed13.png",toString:function(){return"/_next/static/images/restart-25-8df93d8a5c017dcfb8801ec420d9ed13.png"},placeholder:void 0,width:25,height:25}},dciQ:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=a(r("q1tI")),c=a(r("17x9"));function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var l=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return 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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"componentDidMount",value:function(){window&&(window.adsbygoogle=window.adsbygoogle||[]).push({})}},{key:"render",value:function(){return s.default.createElement("ins",{className:this.props.className+" adsbygoogle",style:this.props.style,"data-ad-client":this.props.client,"data-ad-slot":this.props.slot,"data-ad-layout":this.props.layout,"data-ad-layout-key":this.props.layoutKey,"data-ad-format":this.props.format,"data-full-width-responsive":this.props.responsive})}}]),t}(s.default.Component);t.default=l,l.propTypes={className:c.default.string,style:c.default.object,client:c.default.string.isRequired,slot:c.default.string.isRequired,layout:c.default.string,layoutKey:c.default.string,format:c.default.string,responsive:c.default.string},l.defaultProps={className:"",style:{display:"block"},format:"auto",layout:"",layoutKey:"",responsive:"false"}},"ket+":function(e,t){e.exports={srcSet:"/_next/static/images/customPractice-75-620e973c4f700e91de1bf7c185e4ae37.png 75w",images:[{path:"/_next/static/images/customPractice-75-620e973c4f700e91de1bf7c185e4ae37.png",width:75,height:56}],src:"/_next/static/images/customPractice-75-620e973c4f700e91de1bf7c185e4ae37.png",toString:function(){return"/_next/static/images/customPractice-75-620e973c4f700e91de1bf7c185e4ae37.png"},placeholder:void 0,width:75,height:56}},lhQN:function(e,t){e.exports={srcSet:"/_next/static/images/racefriends-75-2e3c43d774209df4748e32ad85061d9e.png 75w",images:[{path:"/_next/static/images/racefriends-75-2e3c43d774209df4748e32ad85061d9e.png",width:75,height:75}],src:"/_next/static/images/racefriends-75-2e3c43d774209df4748e32ad85061d9e.png",toString:function(){return"/_next/static/images/racefriends-75-2e3c43d774209df4748e32ad85061d9e.png"},placeholder:void 0,width:75,height:75}},q2je:function(e,t,r){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var n,s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r("q1tI"),a=(n=c)&&n.__esModule?n:{default:n};function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var l=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return 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&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),s(t,[{key:"render",value:function(){return a.default.createElement("div",{className:"adsbybaidu"},"TODO")}}]),t}(a.default.Component);t.default=l},"t8/t":function(e,t){e.exports={srcSet:"/_next/static/images/freecoinsCanvas-150-9cb0e5c5caa34d2524a4897a540e25af.png 150w",images:[{path:"/_next/static/images/freecoinsCanvas-150-9cb0e5c5caa34d2524a4897a540e25af.png",width:150,height:149}],src:"/_next/static/images/freecoinsCanvas-150-9cb0e5c5caa34d2524a4897a540e25af.png",toString:function(){return"/_next/static/images/freecoinsCanvas-150-9cb0e5c5caa34d2524a4897a540e25af.png"},placeholder:void 0,width:150,height:149}},tOyP:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAXVBMVEX///////8Aouh/f11/f25/f39/jEt/mDl/mF2Vf3+VmF2VpSWrf3+rmF2rmH+rsQ6rsSXBjH/BpV3BvQ7WmH/WyQ7rpW7rsV3ryQ7tHCT/sV3/vUv/yQ7/ySX/yTmU0j8AAAAAAnRSTlMAApidrBQAAAFKSURBVEjH7dbRcoMgEAVQm0goNa2xGpsK5v8/M8sSFOGaYB475UFmXM6yLMmMxe/mUbxEzKbxT14ng6jtpNXhYue+bN2rQbjAPR4SraSL0FpjxoakJ5wEkLHZn2nqXNLrURpPPkWFCZdC8N0u9qv5ceJkiAw2mVYnW5Lpp1X04AgirpaytbvxUSbCNSNiOgp0h4tWFfEqrG4QEpPe5pO828Btm8jYlC0klF6rmnfruHtzD+gGIKED/NjstkfSLIjpym9EqE1f9tRafag6IloJSOiiJe8muK6Q+CuOyfXoXvfuJ7IgPvbn/mLY7HisCGzWiBPQrBAvkMFkFsBAEorUILIUiQEkFrFJSSoikxAkQrObxmMRmISsCWCeitksySMRmxwxmYA8EwuTKbzxJEfMJl/cDZNcMfctX3izRTizTRT8zVUUW83bSuQGJC6yLSEsF7UAAAAASUVORK5CYII="},vlRD:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return r("RNiq")}])},yA5y:function(e,t){e.exports={srcSet:"/_next/static/images/checkmark-25-947f435fcb7c3726ea840226c2cb5512.png 25w",images:[{path:"/_next/static/images/checkmark-25-947f435fcb7c3726ea840226c2cb5512.png",width:25,height:25}],src:"/_next/static/images/checkmark-25-947f435fcb7c3726ea840226c2cb5512.png",toString:function(){return"/_next/static/images/checkmark-25-947f435fcb7c3726ea840226c2cb5512.png"},placeholder:void 0,width:25,height:25}}},[["vlRD",0,2,6,7,9,1,3,4,5,8,11,13,10,16]]]);

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.