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

// Search for useState call defining To or Hl
// We saw: Hl($), localStorage.setItem("use_demo_usage_data", String($))
const targetIdx = content.indexOf('use_demo_usage_data');
if (targetIdx !== -1) {
  const startIdx = Math.max(0, targetIdx - 15000);
  console.log("=== Range before use_demo_usage_data ===");
  // Let's print out 4000 characters before use_demo_usage_data
  const block = content.substring(startIdx, targetIdx);
  console.log(block.substring(block.length - 4000));
} else {
  console.log("use_demo_usage_data not found");
}
