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

// Look for O( with a filter or mapping on k
const regex = /O\(\[[^\]]*k\.filter/g;
let match;
console.log("Searching for O([ ... k.filter usages:");
while ((match = regex.exec(content)) !== null) {
  const idx = match.index;
  console.log(`\n=== Found at index ${idx} ===`);
  console.log(content.substring(idx - 100, idx + 200));
}

const regex2 = /O\(\[[^\]]*\w+\.filter/g;
console.log("\nSearching for O([ ... custom.filter usages:");
while ((match = regex2.exec(content)) !== null) {
  const idx = match.index;
  console.log(`\n=== Found at index ${idx} ===`);
  console.log(content.substring(idx - 100, idx + 200));
}
