PageSourceSearch

https://keykorea.vercel.app/_next/static/chunks/731-eeeea91b1f7874575831.js

js keykorea.vercel.app collected 2026-10-03 07:11:37 UTC 10,891 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[731],{37162:function(e,t,n){var r=n(85893),s=n(68527),a=n(49609);t.Z=function(){return(0,r.jsx)(s.xu,{pt:"8",w:"full",children:(0,r.jsx)(s.M5,{children:(0,r.jsx)(a.$,{color:"blue.400"})})})}},84144:function(e,t,n){n.d(t,{h:function(){return i}});var r=n(55645),s=n(85893),a=n(6886),o=n(68527),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"6";return e&&e.response&&e.response.data?e.response.data.detail?(0,s.jsxs)(a.bZ,{marginBottom:t,status:"error",children:[(0,s.jsx)(a.zM,{})," ",e.response.data.detail]}):"object"!==typeof e.response.data||Array.isArray(e.response.data)||null==e.response.data?(0,s.jsxs)(a.bZ,{marginBottom:t,status:"error",children:[(0,s.jsx)(a.zM,{})," Internal Server Error"]}):(0,s.jsx)(a.bZ,{marginBottom:t,status:"error",children:(0,s.jsxs)(o.Kq,{children:[(0,s.jsxs)(o.Ug,{ml:"0",pl:"0",children:[(0,s.jsx)(a.zM,{}),(0,s.jsx)(o.xv,{children:"Errors in the following fields"})]}),(0,s.jsx)(o.QI,{children:Object.entries(e.response.data).map((function(e){var t=(0,r.Z)(e,2),n=t[0],a=t[1];return(0,s.jsxs)(o.HC,{ml:"14",children:[(n.charAt(0).toUpperCase()+n.slice(1)).split("_").join(" ")," ","- ",a[0]||"Unknown Error"]})}))})]})}):(0,s.jsxs)(a.bZ,{marginBottom:t,status:"error",children:[(0,s.jsx)(a.zM,{})," Internal Server Error"]})}},41390:function(e,t,n){n.d(t,{s:function(){return r}});var r=function(){return!1}},50873:function(e,t,n){n.d(t,{b:function(){return o}});var r=n(11163),s=n(41390),a=n(89789),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=(0,r.useRouter)(),n=(0,a.a)(),o=n.state,i=o.isAuthenticated,c=o.isLoading;return(0,s.s)()||i||c||t.push(e),{isLoading:c}}},99184:function(e,t,n){n.d(t,{Z:function(){return z}});var r=n(85893),s=n(55645),a=n(67294),o=n(68527),i=n(20949),c=n(4612),l=n(15193),u=(n(11163),n(97375)),d=n(47398),f=n(10894),h=n(47516),x=n(55667),p=function(e){var t=e.isOpen,n=e.onClose,s=e.finalRef;return(0,r.jsxs)(x.u_,{isCentered:!0,finalFocusRef:s,isOpen:t,onClose:n,children:[(0,r.jsx)(x.ZA,{}),(0,r.jsxs)(x.hz,{children:[(0,r.jsx)(x.xB,{children:"Exercise Instructions"}),(0,r.jsx)(x.ol,{}),(0,r.jsx)(x.fe,{pb:6,children:"Type the phrase you see in korean in the text box and press enter when you are done to continue to the next question"})]})]})},g=function(e){var t=e.inputRef,n=(0,u.qY)(),s=n.isOpen,a=n.onOpen,o=n.onClose;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.u,{label:"Need help?",children:(0,r.jsx)(l.hU,{onClick:a,icon:(0,r.jsx)(f.JO,{as:h.CUu})})}),(0,r.jsx)(p,{isOpen:s,finalRef:t,opOpen:a,onClose:o})]})},j=n(89583),m=function(e){var t=e.setShowVirtualKeyboard,n=e.showVirtualKeyboard;return(0,r.jsx)(d.u,{label:n?"Hide Virtual Keyboard":"Display on screen keyboard",children:(0,r.jsx)(l.hU,{onClick:function(){return t(!n)},icon:(0,r.jsx)(f.JO,{as:j.P2_})})})},v=n(26943),y=n(33344),b=function(e,t,n,s,a){var c=(0,y.Fg)();return s&&s.length?s.split("").map((function(s,l,u){var d=u.slice(0,Math.min(l+1,n));return function(e,t,n){return e>=t&&e<=n}(l,e,t)&&(v.search(d.join(""),a)>=0||d.join("").length<=a.length)?(0,r.jsx)(o.xu,{as:"span",color:(0,i.ff)(c.colors.green[500],c.colors.green[400]),textDecoration:l===n+1?"underline":null,children:s},l):function(e,t){return e<=t}(l,n)?(0,r.jsx)(o.xu,{as:"span",color:(0,i.ff)(c.colors.red[500],c.colors.red[400]),textDecoration:"underline",children:s},l):function(e,t){return e>t}(l,t)?(0,r.jsx)(o.xu,{as:"span",textDecoration:l===n+1?"underline":null,children:s},l):void 0})):null},w=function(e,t){for(var n=Math.min(t.length,e.length)-1,r=-1;n>=0;){var a=v.rangeSearch(t,e.slice(0,n+1));if(a.length){var o=a.shift(),i=(0,s.Z)(o,2),c=i[0],l=i[1];if(0===c)return b(c,l===r?l-1:l,e.length-1,t,e);r=n,n--}else r=n,n--}return b(-1,-1,e.length-1,t)},k=function(e){var t=e.startDate,n=a.useState("0s"),r=(0,s.Z)(n,2),o=r[0],i=r[1],c=function(){var e=Date.now()-Date.parse(t),n=Math.floor(e/864e5),r=Math.floor(e%864e5/36e5),s=Math.floor(e%36e5/6e4),a=Math.floor(e%6e4/1e3);i("".concat(n?n+"d ":""," ").concat(r||n?r+"h ":""," ").concat(s||r?s+"m ":""," ").concat(a||s?a+"s":"0s"))};return a.useEffect((function(){var e=setInterval(c,1e3);return c(),function(){return clearInterval(e)}}),[t]),o},S=n(65976),C=function(e){var t=e.startDate,n=e.wordsTyped,r=a.useState(0),o=(0,s.Z)(r,2),i=o[0],c=o[1],l=a.useState(0),u=(0,s.Z)(l,2),d=u[0],f=u[1];return a.useEffect((function(){var e=0,t=setInterval((function(){f(e++)}),1e3);return function(){return clearInterval(t)}}),[]),a.useEffect((function(){c((0,S.y)(t,n))}),[d,n]),i},M=function(e,t){var n=[];e=e.toLowerCase(),t=t.toLowerCase();for(var r=0;r<=e.length;r++){for(var s=r,a=0;a<=t.length;a++)if(0==r)n[a]=a;else if(a>0){var o=n[a-1];e.charAt(r-1)!=t.charAt(a-1)&&(o=Math.min(Math.min(o,s),n[a])+1),n[a-1]=s,s=o}r>0&&(n[t.length]=s)}return n[t.length]},E=n(13727),I=n.n(E),D=(n(29215),n(1706)),L=(n(83456),{" ":"{space}",backspace:"{bksp}",enter:"{enter}",shift:"{shift}",capslock:"{lock}"}),Z=function(e){var t=e.inputRef,n=(0,i.If)().colorMode,c=a.useRef(),l=a.useState({width:450,height:100}),u=(0,s.Z)(l,2),d=u[0],f=u[1],h=function(e){var t=L[e.key.toLowerCase()]||L[e.code.toLowerCase()]||e.key.toLowerCase(),r=document.querySelector('div[data-skbtn="'.concat(t,'"]'));r&&r.classList.add("light"===n?"down":"down-dark")},x=function(e){var t=L[e.key.toLowerCase()]||L[e.code.toLowerCase()]||e.key.toLowerCase(),r=document.querySelector('div[data-skbtn="'.concat(t,'"]'));r&&r.classList.remove("light"===n?"down":"down-dark")};return a.useEffect((function(){if(t&&t.current)return t.current.addEventListener("keyup",x),t.current.addEventListener("keydown",h),function(){t.current&&t.current.removeEventListener("keyup",x),t.current&&t.current.removeEventListener("keydown",h)}}),[n]),(0,r.jsx)(o.M5,{children:(0,r.jsx)(D.Resizable,{width:d.width,onResize:function(e,t){t.element;var n=t.size;t.handle;f({width:Math.min(800,Math.max(n.width,300)),height:n.height})},children:(0,r.jsx)(o.xu,{width:d.width+"px",maxHeight:"100%",maxWidth:"100%",ref:c,children:(0,r.jsx)(o.M5,{children:(0,r.jsx)(I(),{mergeDisplay:!0,theme:"light"===n?"":"hg-theme-default myTheme1",layout:d.width<500?{default:["\u3142 \u3148 \u3137 \u3131 \u3145 \u315b \u3155 \u3151 \u3150 \u3154","\u3141 \u3134 \u3147 \u3139 \u314e \u3157 \u3153 \u314f \u3163","{shift} \u314b \u314c \u314a \u314d \u3160 \u315c \u3161 {bksp}","{numbers} {space} {ent}"],shift:["Q W E R T Y U I O P","A S D F G H J K L","{shift} Z X C V B N M {bksp}","{numbers} {space} {ent}"],numbers:["1 2 3","4 5 6","7 8 9","{abc} 0 {bksp}"]}:{default:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} \u3142 \u3148 \u3137 \u3131 \u3145 \u315b \u3155 \u3151 \u3150 \u3154 \\","{capslock} \u3141 \u3134 \u3147 \u3139 \u314e \u3157 \u3153 \u314f \u3163 [ ] {ent}","{shift} \u314b \u314c \u314a \u314d \u3160 \u315c \u3161 , . / {shift}","{space}"],shift:["Q W E R T Y U I O P","A S D F G H J K L","{shift} Z X C V B N M {bksp}","{numbers} {space} {ent}"],numbers:["1 2 3","4 5 6","7 8 9","{abc} 0 {bksp}"]},display:d.width<500?{"{numbers}":"123","{ent}":"return","{escape}":"esc \u238b","{tab}":"tab \u21e5","{bksp}":"\u232b","{capslock}":"caps lock \u21ea","{shift}":"\u21e7","{controlleft}":"ctrl \u2303","{controlright}":"ctrl \u2303","{altleft}":"alt \u2325","{altright}":"alt \u2325","{metaleft}":"cmd \u2318","{metaright}":"cmd \u2318","{abc}":"ABC"}:{"{numbers}":"123","{ent}":"enter \u21b5","{escape}":"esc \u238b","{tab}":"tab \u21e5","{bksp}":"\u232b","{capslock}":"caps","{shift}":"shift \u21e7","{controlleft}":"ctrl \u2303","{controlright}":"ctrl \u2303","{altleft}":"alt \u2325","{altright}":"alt \u2325","{metaleft}":"cmd \u2318","{metaright}":"cmd \u2318","{abc}":"ABC"}})})})})})},z=function(e){var t=e.setCurrentQuestionIndex,n=e.currentQuestionIndex,u=e.questions,d=e.startDate,f=e.wordsTyped,h=e.setWordsTyped,x=e.accuracy,p=e.exercise,j=e.setAccuracy,v=a.useRef(),y=a.useState(""),b=(0,s.Z)(y,2),S=b[0],E=b[1],I=a.useState(!1),D=(0,s.Z)(I,2),L=D[0],z=D[1],A=a.useState(!0),R=(0,s.Z)(A,2),F=R[0],K=R[1];a.useEffect((function(){if(F)return K(!1);p&&(localStorage.setItem("".concat(p,"-accuracy"),x),localStorage.setItem("".concat(p,"-words-typed"),f),localStorage.setItem("".concat(p,"-current-question-index"),n),localStorage.setItem("".concat(p,"-time-elapsed"),new Date-d))}),[n,x,f]),a.useEffect((function(){if(!F){var e=setInterval((function(){localStorage.setItem("".concat(p,"-time-elapsed"),new Date-d)}),1e3);return function(){return clearInterval(e)}}}),[F]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Kq,{align:"center",children:u[n].audio_url?(0,r.jsx)(o.M5,{children:(0,r.jsxs)(o.gC,{children:[(0,r.jsx)(o.X6,{textAlign:"center",fontSize:"4xl",children:"Type the what you hear in Korean"})," ",(0,r.jsx)("audio",{autoPlay:!0,controls:"controls",src:u[n].audio_url}),(0,r.jsxs)(o.xv,{fontSize:"sm",color:(0,i.ff)("gray.600","gray.200"),children:["(",u[n].translation,")"]})]})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.M5,{children:(0,r.jsx)(o.X6,{textAlign:"center",fontSize:"4xl",children:"Type the following in Korean"})}),(0,r.jsx)(o.xv,{fontSize:"2xl",color:(0,i.ff)("gray.600","gray.200"),children:w(S,u[n].question)}),(0,r.jsxs)(o.xv,{fontSize:"sm",color:(0,i.ff)("gray.600","gray.200"),children:["(",u[n].translation,")"]})]})}
1),(0,r.jsx)(o.M5,{children:(0,r.jsx)(o.xu,{rounded:"lg",bg:(0,i.ff)("white","gray.700"),w:{base:"sm",md:"md"},boxShadow:"lg",p:4,children:(0,r.jsx)(o.Kq,{spacing:4,children:(0,r.jsx)(c.II,{ref:v,onKeyDown:function(e){if("Enter"===e.key&&n<u.length){e.preventDefault();var r=function(e,t){var n=e,r=t;e.length<t.length&&(n=t,r=e);var s=n.length;return 0==s?1:((s-M(n,r))/parseFloat(s)*100).toFixed(2)}(S,u[n].question);j(((parseFloat(x)*n+parseFloat(r))/(n+1)).toFixed(2)),t(n+1),h(f+1),E("")}" "===e.key&&h(f+1)},value:S,onChange:function(e){E(e.target.value)},onPaste:function(e){e.preventDefault()}})})})}),(0,r.jsx)(o.M5,{children:(0,r.jsx)(o.xu,{w:{base:"sm",md:"md"},children:(0,r.jsxs)(o.kC,{children:[(0,r.jsxs)(o.Ug,{spacing:"8",children:[(0,r.jsxs)(o.xv,{fontSize:"sm",color:(0,i.ff)("gray.600","gray.200"),children:["WPM: ",(0,r.jsx)(C,{startDate:d,wordsTyped:f})]}),(0,r.jsxs)(o.xv,{fontSize:"sm",color:(0,i.ff)("gray.600","gray.200"),children:["Accuracy: ",x,"%"]}),(0,r.jsxs)(o.xv,{fontSize:"sm",color:(0,i.ff)("gray.600","gray.200"),children:["Elapsed: ",(0,r.jsx)(k,{startDate:d})]})]}),(0,r.jsx)(o.LZ,{}),(0,r.jsxs)(l.hE,{children:[(0,r.jsx)(g,{inputRef:v}),(0,r.jsx)(m,{setShowVirtualKeyboard:z,showVirtualKeyboard:L})]})]})})}),L&&(0,r.jsx)(Z,{inputRef:v})]})}},41953:function(e,t,n){n.d(t,{V:function(){return r}});var r=function(e,t){var n=e.getTime()-t.getTime();return Math.abs(n/1e3)}},65976:function(e,t,n){n.d(t,{y:function(){return r}});var r=function(e,t){var n=Date.now()-e.getTime();return(t*(60/Math.abs(n/1e3))).toFixed(2)}}}]);

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.