PageSourceSearch

https://www.chessmonitor.com/_next/static/chunks/pages/admin/logs-20d052d337d09ab2.js

js chessmonitor.com collected 2026-10-03 23:15:32 UTC 16,004 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1345],{2114:(e,t,l)=>{"use strict";l.d(t,{Lt:()=>f,NI:()=>g,rO:()=>c});var a=l(45782),n=l(43235),r=l(81278),o=l(55729),s=l(7873),i=l(77582);let u={};function c(){u={}}let d={};function p(e,t){let l=e.data;return t?.user?(l&&l.userData?.url===t.user&&(d[t.user]=l.userData),e.userData=l?.userData||d[t.user]||{url:t.user}):e.userData={url:"DUMMY"},e}let h=new Set(["account","page","game","ratingAccount","partnerID"]),m=new Set(["opponentStrength","opponent"]),v=["filter","utm_source","utm_medium","utm_campaign","utm_term","utm_content"];function f({shallowKeys:e=[],extraQuery:t}={}){let l=(0,r.useRouter)(),a=(0,s.wz)(),o=l.query,u={};for(let t of(e=[...e,...v],Object.keys(o))){if(m.has(t)&&(!a||a.plan===n.Vk.FREE)||e.includes(t)||"date"===t&&"custom"===o.date||void 0===o[t])continue;let l=o[t];i.l[t]?.multiSelectable&&!Array.isArray(l)&&(l=[l]),h.has(t)&&(l=Array.isArray(l)?l.map(e=>parseInt(e,10)):parseInt(l,10)),u[t]=l}return o.user&&(u.user=Array.isArray(o.user)?o.user[0]:o.user),t&&(u={...t,...u}),{isReady:l.isReady,query:u}}function g(e,{useCache:t,shallowKeys:l=[],extraQuery:n}={}){let r,{isReady:s,query:i}=f({useCache:t,shallowKeys:l,extraQuery:n});if(t){let t=(0,a.IF)(e).join("/"),l=`${t}?${JSON.stringify(i)}`;r={data:u[l],key:l}}let c=e.useQuery(i,{enabled:s&&!r?.data}),d=(0,o.useRef)(void 0);return((0,o.useEffect)(()=>{t&&r&&(c.data?(d.current=c,u[r.key]=c):r.data&&(d.current=r.data))}),!c.data&&c.isFetching&&t&&d.current)?p({...d.current,fromCache:!0},i):r?.data?p(r.data,i):p(c,i)}},5093:(e,t,l)=>{"use strict";l.d(t,{A:()=>d});var a=l(6029),n=l(55729),r=l(63531),o=l(27273),s=l(76594),i=l(46084),u=l(94613),c=l(75350);function d({data:e,value:t,onChange:l,clearable:p,customLabel:h,maxDropdownHeight:m,placeholder:v,radius:f}){let g=(0,n.useMemo)(()=>(0,r.d)(e),[e]),b=(0,n.useMemo)(()=>(0,o.D)(g),[g]),x=(0,s.B)({onDropdownClose:()=>x.resetSelectedOption()}),y=p&&t&&(0,a.jsx)(i.G.ClearButton,{onClear:()=>l(null)}),j=t?`${v}: ${b[t].label}`:"";return t&&h&&(j=h(b[t].label)),(0,a.jsxs)(i.G,{store:x,onOptionSubmit:e=>{l&&l(e),x.closeDropdown()},radius:f,children:[(0,a.jsx)(i.G.Target,{children:(0,a.jsx)(u.O,{component:"input",radius:f,readOnly:!0,pointer:!0,onClick:()=>x.toggleDropdown(),rightSection:y||(0,a.jsx)(i.G.Chevron,{}),rightSectionPointerEvents:y?"all":"none",value:j,placeholder:v})}),(0,a.jsx)(c.i,{data:g,value:t,maxDropdownHeight:m,withCheckIcon:!0,checkIconPosition:"left",hidden:void 0,filter:void 0,search:void 0,limit:void 0,withScrollArea:void 0,unstyled:void 0,labelId:void 0,"aria-label":void 0,scrollAreaProps:void 0})]})}},7276:(e,t,l)=>{"use strict";l.d(t,{A:()=>r});var a=l(38636),n=l(13611);function r({nickname:e,name:t,pageID:l,titleID:o,display:s="name"}){let i=(t&&(l===a.YW.Fide||l===a.YW.Archive_Unknown_Player||"name"===s)||!e?t:e)??"Unknown Name";return o?`${n.YC[o]} ${i}`:i}},20883:(e,t,l)=>{"use strict";l.d(t,{A:()=>r});var a=l(71992);class n{static decode(e){let t=new a.d({enableMoveSerialization:!0,allowNullMoves:"in-variation"});return t.deserializeMoves(e),t}}let r=n},21905:(e,t,l)=>{"use strict";l.d(t,{A:()=>c});var a=l(6029),n=l(17594),r=l(48340),o=l.n(r),s=l(26789),i=l(7873);let u=[["","Main"],["userStats","Stats"],["partners","Partners"],["users","Users"],["system","System"],["logs","Logs"],["queue","Queue"],["database","Database"],["routes","Routes"],["crawl","Crawl"],["merge","Link"],["fide","Ultra DB"],["suggestions","Suggestions"],["courses","Courses"]];function c({children:e,active:t=""}){let l=(0,i.Jd)(),r=[...u],d=u.find(e=>e[0]===t),p=l.data?.publicInfo?.adminReadonlyAccess;return p?r=r.filter(([e])=>p.includes(e)):"loading"===t&&(r=[["#","Loading..."]]),(0,a.jsxs)(n.A,{title:"Admin",children:[(0,a.jsxs)("div",{className:o().header,children:[(0,a.jsx)("div",{className:o().title,children:(0,a.jsxs)("h2",{children:["Admin ",d&&" - "+d[1]]})}),(0,a.jsx)("nav",{className:o().nav,children:(0,a.jsx)("ul",{children:r.map(([e,l])=>(0,a.jsx)("li",{className:t===e?o().active:"",children:(0,a.jsx)(s.A,{href:"/admin/"+e,children:l})},e))})})]}),(0,a.jsx)("div",{className:"container",children:e})]})}},41411:(e,t,l)=>{"use strict";l.d(t,{A:()=>r});var a=l(81278);function n(e,t){if(!e.startsWith("/u/")||"string"==typeof t||t.pathname||!t.query||"string"==typeof t.query)return t;let l=e,a=l.indexOf("?");-1!==a&&(l=l.slice(0,a));let n={...t.query};return delete n.user,{pathname:l,query:n}}function r(){let e=(0,a.useRouter)();return{...e,push:(t,l,a)=>e.push(n(e.asPath,t),l,a),replace:(t,l,a)=>e.replace(n(e.asPath,t),l,a)}}},75742:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>u});var a=l(6029),n=l(25292),r=l(2114),o=l(92184),s=l(21905);function i(){let e=(0,r.NI)(o.i.admin.logs);if(e.error)return(0,a.jsx)(n.A,{error:e.error});if(!e.data)return(0,a.jsx)(s.A,{active:"loading",children:"Loading"});let t=e.data.logs;return t=[...t].reverse(),(0,a.jsx)(s.A,{active:"logs",children:(0,a.jsxs)("section",{children:[(0,a.jsx)("h3",{children:"Logs"}),(0,a.jsxs)("table",{children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"Time"}),(0,a.jsx)("th",{children:"Level"}),(0,a.jsx)("th",{children:"Message"}),(0,a.jsx)("th",{children:"Info"})]})}),(0,a.jsx)("tbody",{children:t.map((e,t)=>(0,a.jsxs)("tr",{className:"info"===e.level?"gray":"",children:[(0,a.jsx)("td",{children:e.time}),(0,a.jsx)("td",{children:e.level}),(0,a.jsx)("td",{children:e.message}),(0,a.jsx)("td",{children:e.splat})]},t))})]})]})})}let u=()=>(0,a.jsx)(i,{})}
1,77582:(e,t,l)=>{"use strict";l.d(t,{l:()=>$,A:()=>E});var a=l(6029),n=l(38636),r=l(20933),o=l(55729),s=l(91583),i=l.n(s),u=l(20883),c=l(67142),d=l(38206),p=l(59777),h=l(88534),m=l(43235),v=l(7873),f=l(32407),g=l(5093),b=l(41411),x=l(46084),y=l(59029),j=l(26317);function w({placeholder:e,value:t,onChange:l,premiumDisabled:n,customLabel:r}){let s,i=t??"",[u,c]=(0,o.useState)(i),[d,p]=(0,o.useState)(!1);function h(e){e?.preventDefault(),l(u)}(0,o.useEffect)(()=>{u!==t&&c(t??"")},[t]),u!==i?s=(0,a.jsx)(j.A,{strokeWidth:1,style:{cursor:"pointer"},onClick:()=>h()}):u&&(s=(0,a.jsx)(x.G.ClearButton,{onClear:()=>l("")}));let m=u;return r&&u&&!d&&u===i&&(m=r(u)),(0,a.jsx)("form",{onSubmit:h,children:(0,a.jsx)(y.k,{radius:"xs",placeholder:e,value:m,rightSection:s,rightSectionPointerEvents:s?"all":"none",onChange:e=>c(e.target.value),onFocus:()=>p(!0),onBlur:()=>p(!1),readOnly:n})})}var C=l(92184),A=l(76594),S=l(99155);let k={};function D({value:e,onChange:t,customLabel:l,placeholder:n,premiumDisabled:r,cacheKeyPrefix:s,fetchSuggestions:i}){let u,c=e??"",[d,p]=(0,o.useState)(c),[h,m]=(0,o.useState)(!1),[v,f]=(0,o.useState)(!1),[g,b]=(0,o.useState)(null),[w,C]=(0,o.useState)(!1),_=(0,o.useRef)(0),N=(0,A.B)({onDropdownClose:()=>N.resetSelectedOption()});async function L(e){_.current+=1;let t=_.current,l=e.trim();if(r){b(null),C(!1),f(!1);return}let a=s?`${s}:${l.toLowerCase()}`:"";if(a&&k[a]){b(k[a]),C(0===k[a].length),f(!1);return}f(!0);try{let e=await i(l);if(t!==_.current)return;a&&(k[a]=e),b(e),C(0===e.length)}catch{t===_.current&&(b([]),C(!0))}finally{t===_.current&&f(!1)}}function $(e){e?.preventDefault(),t(d),N.closeDropdown(),N.targetRef.current?.blur()}(0,o.useEffect)(()=>{d!==c&&(p(c),b(null),C(!1),f(!1),_.current+=1)},[e]),(0,o.useEffect)(()=>{b(null),C(!1),f(!1),_.current+=1},[s]);let O=(g||[]).map(e=>(0,a.jsx)(x.G.Option,{value:e,children:e},e)),q=!1;v?u=(0,a.jsx)(S.a,{size:16,color:"white"}):d!==c?(u=(0,a.jsx)(j.A,{strokeWidth:1,style:{cursor:"pointer"},onClick:()=>$()}),q=!0):d&&(u=(0,a.jsx)(x.G.ClearButton,{onClear:()=>{p(""),b(null),C(!1),t("")}}),q=!0);let G=d;return l&&d&&!h&&d===c&&(G=l(d)),(0,a.jsx)("form",{onSubmit:$,children:(0,a.jsxs)(x.G,{onOptionSubmit:e=>{p(e),t(e),N.closeDropdown(),N.targetRef.current?.blur()},store:N,radius:"xs",children:[(0,a.jsx)(x.G.Target,{children:(0,a.jsx)(y.k,{radius:"xs",placeholder:n,value:G,onChange:e=>{let t=e.currentTarget.value;p(t),L(t),N.resetSelectedOption(),N.openDropdown()},onClick:()=>{N.openDropdown(),null===g&&L(d)},onFocus:()=>{r||(m(!0),N.openDropdown(),null===g&&L(d))},onBlur:()=>{m(!1),N.closeDropdown()},rightSection:u,rightSectionPointerEvents:q?"all":"none",readOnly:r})}),(0,a.jsx)(x.G.Dropdown,{hidden:null===g,children:(0,a.jsxs)(x.G.Options,{mah:300,style:{overflowY:"auto"},children:[O,w&&(0,a.jsx)(x.G.Empty,{children:"No results found"})]})})]})})}function _({userUrl:e,value:t,onChange:l,customLabel:n,placeholder:r,premiumDisabled:o}){let s=C.i.useContext();return(0,a.jsx)(D,{placeholder:r,value:t,onChange:l,premiumDisabled:o,customLabel:n,cacheKeyPrefix:e?`event:${e}`:void 0,fetchSuggestions:async t=>e?(await s.user.suggestEventName.fetch({user:e,query:t})).eventNames:[]})}var N=l(7276);function L({userUrl:e,value:t,onChange:l,customLabel:n,placeholder:r,premiumDisabled:o}){let s=C.i.useContext();return(0,a.jsx)(D,{placeholder:r,value:t,onChange:l,premiumDisabled:o,customLabel:n,cacheKeyPrefix:e?`opponent:${e}`:void 0,fetchSuggestions:async t=>e?(await s.user.suggestOpponentName.fetch({user:e,query:t})).opponentNames:[]})}let $={color:{name:"Color",options:[{value:"white",label:"White"},{value:"black",label:"Black"}]},date:{name:"Date",options:[{value:"24h",label:"Last 24 Hours"},{value:"week",label:"Last 7 Days"},{value:"month",label:"Last 30 Days"},{value:"3-months",label:"Last 3 Months"},{value:"6-months",label:"Last 6 Months"},{value:"year",label:"Last 12 Months"},{value:"custom",label:"Custom Period"}]},timecontrol:{name:"Time Control",multiSelectable:!0,options:[{value:"bullet",label:"Bullet"},{value:"blitz",label:"Blitz"},{value:"rapid",label:"Rapid"},{value:"classical",label:"Classical"},{value:"correspondence",label:"Correspondence"},{value:"unknown",label:"Unknown"}]},account:{name:"Source",multiSelectable:!0,options:[]},event:{name:"Event",type:"event",premium:!0,customLabel:e=>`Event: ${e}`,options:[]},rated:{name:"Rated + Unrated",customLabel:e=>e,options:[{value:"1",label:"Rated Games"},{value:"0",label:"Unrated Games"}]},result:{name:"Outcome",multiSelectable:!0,options:[{value:"win",label:"Win"},{value:"draw",label:"Draw"},{value:"loss",label:"Loss"}]},opponentStrength:{name:"Opponent Strength",premium:!0,customLabel:e=>`Opponents: ${e}`,options:[{value:"-2",label:"Much weaker (-200)"},{value:"-1",label:"Weaker (-100)"},{value:"0",label:"Comparable (\xb1100)"},{value:"+1",label:"Stronger (+100)"},{value:"+2",label:"Much stronger (+200)"}]},opponentName:{name:"Opponent Name",type:"text",premium:!0,customLabel:e=>`Opponent: ${e}`,options:[]}};function O({placeholder:e,dateValue:t,onChange:l}){return(0,a.jsx)("div",{className:i().filter+(t?" "+i().active:""),children:(0,a.jsx)(p.t,{radius:"xs",placeholder:e,valueFormat:"DD/MM/YYYY",weekendDays:[],value:t?new Date(t):null,styles:{month:{maxWidth:"22rem"},monthRow:{background:"var(--secondary-color)"}},clearable:!0,onChange:e=>{e?l(e):l("")}})})}let q={},G={};function E({userData:e,showPosFilter:t,showOpponentFilter:l,opponentName:s,filterAbove:p,filtersExclude:x=[],name:y,filtersOnl
1y:j=[],addToStart:C={},addToEnd:A={}}){let S=(0,b.A)(),k=(0,v.Jd)(),D=k.data&&k.data?.plan!==m.Vk.FREE,[F,R]=(0,o.useState)(!1),M={...C,...$,...A};M.account.options=[];let I=S.query.account;"string"==typeof I&&(I=[I]);let P=[],T=(I??[]).map(e=>parseInt(e,10));if(e){for(let t of P=e.accounts){M.account.options.push({value:t.id.toString(),label:`${(0,n.eH)(t.page)} • ${(0,N.A)({display:"nickname",name:t.nameArch,nickname:t.dbName??t.name,pageID:t.page})}`});let e=T.indexOf(t.id);-1!==e&&T.splice(e,1)}if(T)for(let e of T)M.account.options.push({value:e.toString(),label:"[Unknown Account]"})}else for(let e of T){let t=q[e];t?M.account.options.push({value:t.id.toString(),label:`${(0,n.eH)(t.page)} • ${(0,N.A)({display:"nickname",name:t.nameArch,nickname:t.dbName??t.name,pageID:t.page})}`}):M.account.options.push({value:e.toString(),label:"Loading..."})}function B(e,t){if(M[e]?.premium&&!D)return void R(!0);let l=0===t.length||""===t?void 0:t;if(S.query[e]===l)return;let a={...S.query};l?a[e]=l:delete a[e],"date"===e&&"custom"===S.query[e]&&(delete a.dateFrom,delete a.dateTo),delete a.page,S.replace({query:a},void 0,{scroll:!1,shallow:!0})}(0,o.useEffect)(()=>{for(let e of P)q[e.id]=e},[...P]);let U=!!(S.query.pos&&t||S.query.opponent&&l);for(let e of Object.keys(M))if(S.query[e]&&!x.includes(e)){U=!0;break}let W="";if(t&&"string"==typeof S.query.pos&&0!==S.query.pos.length){let e=S.query.pos;e.slice(-2).toLowerCase()===r.Ih.toLowerCase()&&(e=e.slice(0,-2));let t=u.A.decode(e).history();if(t.length<=2)W=`1. ${t.join(" ")}`;else if(t.length<=4)W=`1. ${t[0]} ${t[1]} 2. ${t.slice(2).join(" ")}`;else if(t.length%2==0){let e=t.length/2;W=`1. ${t[0]} ${t[1]} ... ${e}. ${t.slice(-2).join(" ")}`}else{let e=(t.length+1)/2;W=`1. ${t[0]} ${t[1]} ... ${e}. ${t[t.length-1]}`}}let Y="";l&&"string"==typeof S.query.opponent&&0!==S.query.opponent.length&&(Y=S.query.opponent),(0,o.useEffect)(()=>{Y&&s&&(G[Y]=s)},[Y,s]);let z=s??G[Y];Y&&delete M.opponentName;let H=Object.keys(M);0!==j.length?H=j:0!==x.length&&(H=H.filter(e=>!x.includes(e)));let J=H.map(t=>{let l,n=S.query[t],r=M[t].options;M[t].multiSelectable?("account"===t&&0===r.length&&(n=[]),l=(0,a.jsx)(c.K,{radius:"xs",data:r,placeholder:M[t].name,value:Array.isArray(n)||void 0===n?n??[]:[n],onChange:e=>B(t,e),clearable:!0,maxDropdownHeight:500})):l="opponentName"===t?(0,a.jsx)(L,{placeholder:M[t].name,value:Array.isArray(n)?n[0]:n,onChange:e=>B(t,e),premiumDisabled:M[t].premium&&!D,customLabel:M[t].customLabel,userUrl:e?.url}):"text"===M[t].type?(0,a.jsx)(w,{placeholder:M[t].name,value:Array.isArray(n)?n[0]:n,onChange:e=>B(t,e),premiumDisabled:M[t].premium&&!D,customLabel:M[t].customLabel}):"event"===M[t].type?(0,a.jsx)(_,{placeholder:M[t].name,value:(Array.isArray(n)?n[0]:n)??null,onChange:e=>B(t,e??""),customLabel:M[t].customLabel,premiumDisabled:M[t].premium&&!D,userUrl:e?.url}):(0,a.jsx)(g.A,{radius:"xs",placeholder:M[t].name,value:(Array.isArray(n)?n[0]:n)??null,data:r,onChange:e=>B(t,e??""),clearable:!0,maxDropdownHeight:500,customLabel:M[t].customLabel});let o=i().filter,s=Array.isArray(n);(s&&(n?.length??0)>0||!s&&n)&&(o+=" "+i().active);let u=(0,a.jsx)("div",{className:o,children:l},t);return M[t].premium?(0,a.jsx)(f.A,{children:u},"p-"+t):u}),K=H.indexOf("date");return -1!==K&&"custom"===S.query.date&&J.splice(K+1,0,(0,a.jsx)(O,{placeholder:"From: All Time",dateValue:S.query.dateFrom,onChange:e=>B("dateFrom",e)},"dateFrom"),(0,a.jsx)(O,{placeholder:"To: Now",dateValue:S.query.dateTo,onChange:e=>B("dateTo",e)},"dateTo")),(0,a.jsxs)("section",{children:[(0,a.jsx)("h3",{children:y??"Filter"}),(0,a.jsxs)("div",{className:"content "+i().filters,children:[p,J,W&&(0,a.jsx)("div",{className:i().filter,children:(0,a.jsx)(d.l,{radius:"xs",placeholder:"Moves",value:"active",data:[{value:"",label:"Clear filter"},{value:"active",label:W}],onChange:()=>B("pos",""),clearable:!0})}),Y&&(0,a.jsx)("div",{className:`${i().filter}`,children:(0,a.jsx)(d.l,{radius:"xs",placeholder:"Opponent Name",styles:D?{}:{dropdown:{color:"var(--logo-color)",opacity:.9}},value:"active",data:[{value:"",label:"Clear filter"},{value:"active",label:z??"Loading..."}],onChange:()=>B("opponent",""),clearable:!0})}),U&&(0,a.jsx)("div",{className:i().reset,children:(0,a.jsx)("button",{onClick:function(){let e={...S.query};for(let t of Object.keys(M))delete e[t];t&&delete e.pos,l&&delete e.opponent,delete e.dateFrom,delete e.dateTo,S.replace({query:e},void 0,{scroll:!1,shallow:!0})},children:"Reset"})})]}),F&&(0,a.jsx)(h.A,{onClose:()=>R(!1)})]})}},79663:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/logs",function(){return l(75742)}])},91583:e=>{e.exports={filters:"GlobalFilter_filters__88GgH",horizontal:"GlobalFilter_horizontal__q3JlB",filter:"GlobalFilter_filter__KbwuR",active:"GlobalFilter_active__Mg1Cl",reset:"GlobalFilter_reset__GqGRr",hidden:"GlobalFilter_hidden__FIx0C"}}},e=>{e.O(0,[1869,9670,1992,636,6593,8792],()=>e(e.s=79663)),_N_E=e.O()}]);

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.