PageSourceSearch

https://typination.com/_next/static/chunks/pages/admin-a210907f59ed1d581030.js

js typination.com collected 2026-10-02 00:57:53 UTC 13,252 bytes, 1 lines download raw bytes

1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[25],{Ho3L:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin",function(){return n("IT5z")}])},IT5z:function(e,t,n){"use strict";n.r(t);var s=n("o0o1"),r=n.n(s),a=n("HaE+"),c=n("nKUr"),i=n("MX0m"),o=n.n(i),u=n("q1tI"),l=n.n(u),x=n("UkKX"),d=n("nOHt"),b=n("FGyW"),j=n("xJ5V"),p=n("nSPI"),m=n("IpIp"),f=n("CafY"),h=n("vDqi"),O=n.n(h),w=n("8Kt/"),k=n.n(w);function g(e){var t=e.socket,n=Object(u.useState)(0),s=n[0],r=n[1],a=Object(u.useRef)();return Object(u.useEffect)((function(){return t.emit("showMeCurrentOnline"),t.on("totalCount",(function(e){r(e),a.current=setTimeout((function(){return t.emit("getAllUsersOnlineNow")}),300)})),function(){clearTimeout(a.current)}}),[]),Object(c.jsxs)("div",{id:"currentOnline",className:"jsx-3605127395",children:["Currently Online: ",s,Object(c.jsx)(o.a,{id:"3605127395",children:["#currentOnline.jsx-3605127395{font-size:14px;font-weight:600;position:absolute;right:0px;background:#2d2d2d;color:white;padding:5px 10px;}","@media screen and (min-width:1060px){#currentOnline.jsx-3605127395{top:60px;}}","@media screen and (max-width:1060px){#currentOnline.jsx-3605127395{top:0;width:100%;text-align:center;}}","@media screen and (max-width:600px){#currentOnline.jsx-3605127395{font-size:12px;}}"]})]})}var v=l.a.memo(g),y=n("YFqc"),N=n.n(y),R=n("OsI/");t.default=function(e){var t=e.socket,n=Object(d.useRouter)(),s=Object(u.useContext)(j.a).user,i=Object(u.useRef)(),l=Object(u.useRef)(),h=Object(u.useRef)(),w=Object(u.useRef)(),g=Object(u.useState)(0),y=g[0],E=g[1],C=Object(u.useRef)(),A=Object(u.useState)(!1),S=A[0],T=A[1];Object(u.useEffect)((function(){function e(){return(e=Object(a.a)(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,O.a.get("/api/admin/amIAdmin",{headers:{"auth-token":s}});case 3:e.sent.data?T(!0):n.push("/"),e.next=12;break;case 7:e.prev=7,e.t0=e.catch(0),b.b.error("You must be signed in to access your settings.",{position:"top-center",autoClose:3500,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!1,draggable:!0,progress:void 0,onClose:function(){return n.push("/signin")}}),C.current=setTimeout((function(){return n.push("/signin")}),3500),b.b.error(e.t0.response.data);case 12:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}"none"!==s&&function(){e.apply(this,arguments)}()}),[s]),Object(u.useEffect)((function(){return function(){clearTimeout(C.current)}}),[]);var U=Object(u.useState)([]),P=U[0],_=U[1],I=Object(u.useState)([]),W=I[0],M=I[1];Object(u.useEffect)((function(){t.emit("getAllUsersOnlineNow"),t.on("getAllUsersOnlineNowFromServer",(function(e){_(e)})),t.emit("getAllPRoomsOpenedNow"),t.on("getAllPRoomsOpenedNowFromServer",(function(e){M(e)}))}),[S]);var z=function(){var e=Object(a.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(confirm("Are you sure you want to remove this username:\n".concat(t))){e.
1next=2;break}return e.abrupt("return");case 2:return i.current.value="",e.prev=3,e.next=6,O.a.post("/api/admin/removeThisUser",{username:t},{headers:{"auth-token":s}});case 6:e.sent.data?b.b.success("Successfully removed ".concat(t)):b.b.error("There was not any user found with the username ".concat(t)),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),b.b.error(e.t0.response.data);case 13:case"end":return e.stop()}}),e,null,[[3,10]])})));return function(t){return e.apply(this,arguments)}}(),q=function(){var e=Object(a.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(confirm("Are you sure you want to ban / unban this username:\n".concat(t))){e.next=2;break}return e.abrupt("return");case 2:return l.current.value="",e.prev=3,e.next=6,O.a.post("/api/admin/banUnbanThisUser",{username:t},{headers:{"auth-token":s}});case 6:"banned"===e.sent.data?b.b.info("".concat(t," successfully has been BANNED")):b.b.success("".concat(t," successfully has been unbanned")),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),b.b.error(e.t0.response.data);case 13:case"end":return e.stop()}}),e,null,[[3,10]])})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=Object(a.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(confirm("Are you sure you want to give this username: ".concat(t," a membership for 3 months?"))){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,O.a.post("/api/admin/renewMembershipThreeMonth",{username:t},{headers:{"auth-token":s}});case 5:"given"===e.sent.data&&b.b.success("".concat(t," membership successfully renewed to 3 months")),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),b.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)}}(),H=function(){var e=Object(a.a)(r.a.mark((function e(n){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.emit("adminSentMessageToEveryone",n),w.current.value="";case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return S?Object(c.jsxs)(f.a,{children:[Object(c.jsx)(b.a,{}
1),Object(c.jsx)(v,{socket:t}),Object(c.jsx)("div",{id:"containerRacetracks",className:"jsx-2711214687",children:Object(c.jsxs)("div",{id:"personalRacetracksContent",className:"jsx-2711214687",children:[Object(c.jsx)(x.a,{title:"Admin Page"}),0===y&&Object(c.jsx)("h2",{className:"jsx-2711214687",children:"Edit All System Racetracks"}),1===y&&Object(c.jsx)("h2",{className:"jsx-2711214687",children:"Add New System Racetrack"}),2===y&&Object(c.jsx)("h2",{className:"jsx-2711214687",children:"Update Specific Racetrack"}),0!==y&&Object(c.jsx)("div",{id:"topRightProfile",onClick:function(){return E(0)},className:"jsx-2711214687",children:"Edit Racetracks"}),0===y&&Object(c.jsxs)("div",{id:"optionEditRacetracks",className:"jsx-2711214687",children:[Object(c.jsx)("p",{className:"jsx-2711214687",children:"Pick an option to edit system racetracks"}),Object(c.jsxs)("div",{className:"jsx-2711214687 buttonOptionsWrapper",children:[Object(c.jsx)("div",{onClick:function(){return E(1)},className:"jsx-2711214687 buttonOption",children:"Add New Racetrack"}),Object(c.jsx)("div",{onClick:function(){return E(2)},className:"jsx-2711214687 buttonOption",children:"Update Specific Racetrack"})]}),Object(c.jsx)("hr",{className:"jsx-2711214687"}),Object(c.jsxs)("div",{id:"usersZone",className:"jsx-2711214687",children:[Object(c.jsx)("div",{className:"jsx-2711214687",children:"Users Online Now"}),Object(c.jsx)("div",{id:"usersOnlineNowWrapper",className:"jsx-2711214687",children:P.map((function(e){return Object(c.jsx)(N.a,{href:"/profile/[uniqueLink]",as:"/profile/".concat(e),children:Object(c.jsx)("a",{className:"jsx-2711214687 usersOnlineNow",children:e})},e)}))}),Object(c.jsx)("hr",{className:"jsx-2711214687"}),Object(c.jsx)("div",{className:"jsx-2711214687",children:"Current Rooms With Players"}),Object(c.jsx)("div",{id:"usersOnlineNowWrapper",className:"jsx-2711214687",children:W.map((function(e){return Object(c.jsx)(N.a,{href:"/racetrack/[uniqueUser]",as:"/racetrack/".concat(e.username),children:Object(c.jsxs)("a",{className:"jsx-2711214687 usersOnlineNow",children:[e.username," ",e.players]})},e.username)}))}),Object(c.jsx)("button",{onClick:function(){return t.emit("getAllPRoomsOpenedNow")},className:"jsx-2711214687 buttonOption",children:"Refresh Current Rooms"}),Object(c.jsx)("hr",{className:"jsx-2711214687"}),Object(c.jsxs)("div",{className:"jsx-2711214687",children:["Enter username to ",Object(c.jsx)("b",{className:"jsx-2711214687",children:"remove:"})]}),Object(c.jsx)("input",{type:"text",ref:i,className:"jsx-2711214687"}),Object(c.jsx)("button",{onClick:function(){return z(i.current.value)},className:"jsx-2711214687 buttonOption",children:"Remove This User"}),Object(c.jsx)("hr",{className:"jsx-2711214687"}),Object(c.jsxs)("div",{className:"jsx-2711214687",children:["Enter username to ",Object(c.jsx)("b",{className:"jsx-2711214687",children:"ban / unban:"})]}),Object(c.jsx)("input",{type:"text",ref:l,className:"jsx-2711214687"}),Object(c.jsx)("button",{onClick:function(){return q(l.current.value)},className:"jsx-2711214687 buttonOption",children:"Ban / Unban"}),Object(c.jsx)("hr",{className:"jsx-2711214687"}),Object(c.jsxs)("div",{className:"jsx-2711214687",children:["Enter username to ",Object(c.jsx)("b",{className:"jsx-2711214687",children:"give free PREMIUM for 3 months:"})]}),Object(c.jsx)("input",{type:"text",ref:h,className:"jsx-2711214687"}),Object(c.jsx)("button",{onClick:function(){return D(h.current.value)},className:"jsx-2711214687 buttonOption",children:"Grant membership for 3 months"}),Object(c.jsx)("hr",{className:"jsx-2711214687"}),Object(c.jsxs)("div",{className:"jsx-2711214687",children:["Enter message to send to ",Object(c.jsx)("b",{className:"jsx-2711214687",children:"anyone"})]}),Object(c.jsx)("input",{type:"text",ref:w,className:"jsx-2711214687"}),Object(c.jsx)("button",{onClick:function(){return H(w.current.value)},className:"jsx-2711214687 buttonOption",children:"Send message"})]})]}),1===y&&Object(c.jsx)(p.a,{user:s,system:!0}),2===y&&Object(c.jsx)(m.a,{user:s,system:!0})]})}),Object(c.jsx)(o.a,{id:"2711214687",children:["#usersOnlineNowWrapper.jsx-2711214687{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:space-around;
1-webkit-justify-content:space-around;-ms-flex-pack:space-around;justify-content:space-around;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:7px;}",".usersOnlineNow.jsx-2711214687{border-radius:14px;background:#101010;color:#e2e2e2;padding:8px;margin:2px;border:1px solid #525252;font-family:'Montserrat';}","hr.jsx-2711214687{box-shadow:0px 0px 3px 1px #000;margin:20px 0px;border-color:#424242;}","#optionEditRacetracks.jsx-2711214687 input.jsx-2711214687{width:90%;background:#f3f3f3;border:1px solid black;display:block;margin:12px auto;padding:7px 5px;}","#usersZone.jsx-2711214687{text-align:center;margin-bottom:15px;}","#topRightProfile.jsx-2711214687{background:#D7DEE3;position:absolute;top:0;left:0;padding:6px 14px;font-weight:500;cursor:pointer;border-bottom-right-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-2711214687{left:unset;right:0;border-bottom-right-radius:0px;border-bottom-left-radius:10px;}","#containerRacetracks.jsx-2711214687{height:calc(100vh - 90px);max-width:90%;margin:0 auto;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;}","#personalRacetracksContent.jsx-2711214687{background:white;position:relative;width:676px;max-width:100%;max-height:85vh;overflow:auto;}","@media screen and (max-width:550px){#editRacetracks.jsx-2711214687{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}p.jsx-2711214687{max-width:90%;margin:0 auto;}}","h2.jsx-2711214687{padding-top:35px;padding-bottom:15px;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;word-break:break-word;max-width:90%;margin:0 auto;text-align:center;}","p.jsx-2711214687{text-align:center;border-bottom:1px solid black;padding-bottom:10px;}",".buttonOptionsWrapper.jsx-2711214687 .buttonOption.jsx-2711214687{text-align:center;}"]})]}):Object(c.jsxs)(f.a,{children:[Object(c.jsx)(k.a,{children:Object(c.jsx)("meta",{name:"robots",content:"noindex, nofollow",className:"jsx-2581277219"})}),Object(c.jsx)(x.a,{title:"Loading"}),Object(c.jsx)("div",{id:"darkness",className:"jsx-2581277219",children:Object(c.jsx)("img",{src:R,alt:"loading",className:"jsx-2581277219"})}),Object(c.jsx)(o.a,{id:"2581277219",children:["#darkness.jsx-2581277219{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;}","#darkness.jsx-2581277219 img.jsx-2581277219{width:80px;}"]})]})}},KQm4:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var s=n("a3WO");var r=n("BsWD");function a(e){return function(e){if(Array.isArray(e))return Object(s.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(r.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},"OsI/":function(e,t){e.exports="/_next/static/images/loadingGif-5d143ca5f497fd52d1f40dc72395e1f1.gif"}},[["Ho3L",0,2,1,3,4,12]]]);

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.