const fs = require('fs');
const content = fs.readFileSync('dist/assets/index-D9sWWWv_.js', 'utf8');

// Search for the simulated sync dispatch:
const simTarget = "se=k.filter(Ue=>Ue.routerId!==N);O([...se,...B])";
const simIdx = content.indexOf(simTarget);
if (simIdx !== -1) {
  console.log(`Simulated target found at index ${simIdx}:`);
  console.log(content.substring(simIdx - 100, simIdx + 200));
} else {
  // Let's search with smaller substring
  const altSim = "se=k.filter(Ue=>Ue.routerId!==N);O(";
  const altIdx = content.indexOf(altSim);
  console.log(`Alternative simulated target found at index ${altIdx}:`);
  console.log(content.substring(altIdx - 100, altIdx + 200));
}

// Search for the real sync dispatch:
const realTarget = "const se=await B.json();if(se.success&&se.users){const X=k.filter(bt=>bt.routerId!==N);O([...X,...se.users])";
const realIdx = content.indexOf(realTarget);
if (realIdx !== -1) {
  console.log(`Real target found at index ${realIdx}:`);
  console.log(content.substring(realIdx - 100, realIdx + 200));
} else {
  const altReal = "const se=await B.json();if(se.success&&se.users){";
  const altIdx = content.indexOf(altReal);
  console.log(`Alternative real target found at index ${altIdx}:`);
  console.log(content.substring(altIdx - 100, altIdx + 200));
}
