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

const targetIdx = content.indexOf("Tripay Payment Gateway");
if (targetIdx !== -1) {
  // Let's search backwards for the start of the component or functions
  const startIdx = Math.max(0, targetIdx - 15000);
  const chunk = content.substring(startIdx, targetIdx);
  console.log("=== Printing preceding 15,000 characters ===");
  // Let's write the chunk to a file or print the interesting parts
  // To avoid flooding, let's search for "const [" or "function" in this preceding block
  console.log("Preceding 15000 characters:");
  console.log(chunk);
} else {
  console.log("Tripay Payment Gateway not found");
}
