1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[702,110],{7110:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return b}});var r=n(5893),i=n(4981),o=(n(6395),n(2679),n(4358),n(7294)),s=n(9724),c=n.n(s),a=n(5774),u=(n(5734),n(7787),n(8663)),l=n(5715),d=n(8329),h=n(4114),f=n(8029),p=n(8118),x=n(8491),g=n(5582);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,c=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(a){c=!0,i=a}finally{try{s||null==n.return||n.return()}finally{if(c)throw i}}return o}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e){return(0,r.jsx)("div",{style:{marginBottom:0},children:(0,r.jsx)("div",{style:{maxWidth:"8rem"},children:e.children})})}function b(e){var t=e.data,n=e.appendTimerData,s=e.appendKeystrokeData,m=e.signalRoundEnded,b=e.totalAttempts,j=e.isFirstLesson,w=void 0!==j&&j,S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;if(void 0!=e){for(var n,r=0;r<10;r++)n=Math.floor(Math.random()*e.length);var i=o(e[n].input,t);D.current=e[n].output,O.current.editor.setValue(i,-1)}function o(e,t){var n=t+1-e.split(/\r\n|\r|\n/).length,r=Math.floor(Math.random()*n);return e="\n".repeat(r)+e+"\n".repeat(n-r-1)}},E=function(){var e=O.current.editor.getCursorPosition(),n=e.row,r=e.column;S(t),O.current.editor.moveCursorTo(n,r)},T=function(){H.current=0,$(H.current)},k=function(e){H.current=H.current+1,$(H.current)},_=function(){var e=document.getElementsByClassName("ace_text-input");0!==e.length&&"true"!==e[0].getAttribute("listener")&&(e[0].setAttribute("listener","true"),e[0].addEventListener("keydown",k))},W=function(){var e=document.getElementsByClassName("ace_text-input");0!==e.length&&(e[0].setAttribute("listener","false"),e[0].removeEventListener("keydown",k))},C=function(){G.start({precision:"secondTenths",callback:R})},L=function(){G.stop()},R=function(){var e=G.getTotalTimeValues(),t=e.seconds,n=e.secondTenths%10;Q("".concat(t,".").concat(n))},A=function(){T(),I(0),L(),Q("0.0");var e=document.getElementsByClassName("ace_text-input");0!==e.length&&e[0].blur(),E()},O=(0,o.useRef)(),M=((0,o.useRef)(),(0,o.useState)(0)),N=M[0],I=M[1],P=(0,o.useState)(10),B=P[0],F=P[1];(0,o.useEffect)((function(){null!==b&&void 0!==b&&F(b)}),[b]);(0,o.useEffect)((function(){O.current.editor=O.current.editor,O.current.editor.setOptions({fontFamily:"Fira Mono, monospace",fontSize:"12pt"}),O.current.editor.setShowFoldWidgets(!1),O.current.editor.renderer.setShowGutter(!0),O.current.editor.setShowPrintMargin(!1),O.current.editor.setHighlightActiveLine(!1),O.current.editor.renderer.setPadding(13),O.current.editor.renderer.setScrollMargin(11),O.current.editor.container.style.background="#242424";var e=document.getElementsByClassName("ace_gutter");0!==e.length&&(e[0].style.background="#242424"),A(),S(t)}),[t]),(0,o.useEffect)((function(){return z.current=!1,W}),[]);var z=(0,o.useRef)(!1),D=(0,o.useRef)(),U=!1,V=(0,o.useState)(0),J=V[0],$=V[1],H=(0,o.useRef)(0),G=y(c()({precision:"secondTenths"}),1)[0],K=(0,o.useState)("0.0"),q=K[0],Q=K[1];return(0,r.jsxs)(d.k,{children:[(0,r.jsx)(h.L,{}),(0,r.jsxs)(p.E,{paddingLeft:["5px","5px","75px","0"],children:[(0,r.jsx)(p.U,{padding:"3px",children:(0,r.jsxs)(d.k,{direction:["row","row","row","column"],height:[180,180,180,590],justify:["space-between","space-between","space-between",""],align:["center","center","center",""],fontWeight:u.R2,fontSize:16,children:[(0,r.jsx)(f.x,{borderRadius:u.E0,borderWidth:u.J4,boxShadow:u.Wn,width:156,height:183,children:(0,r.jsxs)(d.k,{direction:"column",height:"170",children:[(0,r.jsx)(h.L,{}),(0,r.jsx)(l.M,{children:"Attempts"}),(0,r.jsx)(h.L,{}),(0,r.jsx)(l.M,{children:(0,r.jsx)(v,{children:(0,r.jsxs)(a.Wo,{value:N/B*100,styles:(0,a.y3)({pathColor:"#00D555"}),children:[(0,r.jsx)("div",{style:{fontSize:"34px",fontWeight:600,marginTop:-10},children:N}),(0,r.jsxs)("div",{style:{fontSize:"14px",marginTop:-3,color:"gray"},children:["Get to ",B]})]})})})]})}),(0,r.jsx)(h.L,{minWidth:["12px","12px","12px","0px"]}
1),(0,r.jsx)(f.x,{borderRadius:u.E0,borderWidth:u.J4,boxShadow:u.Wn,width:[130,130,156,156],height:[183,183,183,150],children:(0,r.jsxs)(d.k,{direction:"column",height:"100",children:[(0,r.jsx)(h.L,{}),(0,r.jsx)(l.M,{children:"Time"}),(0,r.jsx)(h.L,{}),(0,r.jsx)(l.M,{fontWeight:u.$9,fontSize:24,style:{fontVariantNumeric:"tabular-nums"},children:"".concat(q)})]})}),(0,r.jsx)(h.L,{minWidth:["12px","12px","12px","0px"]}),(0,r.jsx)(f.x,{borderRadius:u.E0,borderWidth:u.J4,boxShadow:u.Wn,width:[130,130,156,156],height:[183,183,183,150],children:(0,r.jsxs)(d.k,{direction:"column",height:"100",children:[(0,r.jsx)(h.L,{}),(0,r.jsx)(l.M,{children:"Keystrokes"}),(0,r.jsx)(h.L,{}),(0,r.jsx)(l.M,{fontWeight:u.$9,fontSize:24,children:"".concat(J)})]})}),(0,r.jsx)(h.L,{minWidth:["12px","12px","12px","0px"]}),(0,r.jsx)(x.z,{borderRadius:u.E0,borderWidth:u.J4,fontWeight:u.Se,fontSize:16,width:[95,95,156,156],height:51,colorScheme:"gray",variant:"outline",onClick:A,leftIcon:(0,r.jsx)(g.n,{}),children:"Reset"})]})}),(0,r.jsx)(f.x,{width:"0px",margin:"3px !important"}),(0,r.jsx)(p.U,{padding:"3px",children:(0,r.jsx)(f.x,{width:765,height:590,ref:function(e){e},onClick:function(){},onFocus:function(){_(),z.current=!0,C()},onBlur:function(){G.pause()},children:(0,r.jsx)(i.ZP,{style:{borderRadius:u.E0},className:"parentOfAceEditor",ref:O,mode:"javascript",theme:"dracula",onChange:function(e){if(!0!==U){if(!0===(function(e){function t(e){var t,n;for(t=0,n=e.length;t<n;t++)if(!(e.charCodeAt(t)>32))return!1;return!0}for(var n=0,r=0;r<e.length&&!t(e[r]);r++)n++;for(var i=e.substring(n),o=(n=i.length)-1;o>=0&&!t(i[o]);o--)n--;return i.length-n!==0?i.slice(0,-(i.length-n)):i}(e)===D.current))if(U=!0,N+1===B){I(N+1),s(J),n(parseFloat(q)),m(),I(0),L(),Q("0.0");var t=document.getElementsByClassName("ace_text-input");0!==t.length&&t[0].blur(),E(),T(),setTimeout(T,100),setTimeout(T,300)}else I(N+1),E();else if(!0===w&&(U=!0,!e.includes("*")||0===e.length))if(N+1===B){I(N+1),s(J),n(parseFloat(q)),m(),I(0),L(),Q("0.0");var r=document.getElementsByClassName("ace_text-input");0!==r.length&&r[0].blur(),E(),T(),setTimeout(T,100),setTimeout(T,300)}else I(N+1),E()}else U=!1},name:"UNIQUE_ID_OF_DIV",editorProps:{$blockScrolling:!0},setOptions:{highlightActiveLine:!0},keyboardHandler:"vim",height:"100%",width:"100%"})})})]}),(0,r.jsx)(h.L,{})]})}},2703:function(e,t,n){"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i}
1;return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}}]);
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.