3GSVHVH6OPIDQYVM25IFCJNZ7B5PP2IAMO3CMJOQDYXEL5COAEFAC 5TB4BZA7OTPT46NXDH357PTFUNIRJJWEHUQRDKGPY6FWFSLZ3G6QC HXRDRHIVGSBEAMTKJFZK43MSB53BKON6F77AARUQNWFUPSTZSBPAC BYVNJI7UUHLRECHFPANFHBW5MTI6P335HTWZWNZABC3CHGXE3MCQC EVDNQ26WBUWLTE37AJM4M52ZUBBNDCCIYUBKKLPERFVVRF644IKQC 62OPHDLT2IIHK2OEH76NWB6V7E2Z5USUBNHB4X3DP2XLDI3YHY7QC B2VAHDYSPO7POKVPB2UBFJ2RFKMDUINBWXNBBXS4UL3LXBOYMDTAC function logHotfixes(logs: Log[], region: Region, hotfixes: EncounterHotfix[]): { [iid: number]: EncounterHotfix[] } {if (logs.length === 0) {return {};}const hs = hotfixes.map(h => ({ ...h, applicationDate: new Date(h.applicationDate) })).sort((a, b) => a.applicationDate.valueOf() - b.applicationDate.valueOf()).filter(h => h.applicationDate.valueOf() >= logs[0].startTime.valueOf());
function WeekOverview(props: { week: number; logs: Log[]; hotfixes: EncounterHotfix[]; }) {const hotfixes = props.hotfixes.map(h => ({ ...h, applicationDate: new Date(h.applicationDate)}));const initial: Segments = { segs: [], current: [] };const segmentData = props.logs.reduce(({ segs, current, seg_hotfixes }: Segments, log: Log): Segments => {const hs = [];while(hotfixes.length > 0 && hotfixes[0].applicationDate.valueOf() <= log.startTime.valueOf()) {hs.push(hotfixes.shift()!);}
function WeekOverview(props: { week: number; logs: Log[]; hotfixMap: LogHotfixes; }) {const hideText = { labels: false };const raw = props.logs.reduce(({ segs, current, segHotfixes }: Segments, log): Segments => {const hs = props.hotfixMap[log.iid];
if(hs.length === 0) {return { segs, current: [...current, log], seg_hotfixes };
if(current.length === 0) {return { segs, current: [log], segHotfixes: hs};} else if(!hs || hs.length === 0) {current.push(log);return { segs, current, segHotfixes };
return {segs: [...segs, { logs: current, hotfixes: seg_hotfixes }],current: [log],seg_hotfixes: hs};
segs.push({ logs: current, hotfixes: segHotfixes });return { segs, current: [log], segHotfixes: hs };
.map(([week, logs]) => <WeekOverview key={week} week={parseInt(week)} logs={logs} hotfixes={(week === '1') ? [] : weekHotfixes(logs[0].startTime, props.region, data.hotfixes, false)} />);
.map(([week, logs]) => <WeekOverview key={week} week={parseInt(week)} logs={logs} hotfixMap={hotfixmap} />);