<commit_before>var atTmpl = require('../../ast/tmpl');

function toBase52(num){
  var res = '';

  do {
    var n = num % 52;
    res = String.fromCharCode((n % 26) + (n < 26 ? 97 : 65)) + res;
    num = parseInt(num / 52);
  } while (num);

  return res;
}

(module.exports = function(flow){
  var fconsole = flow.console;
  var themeIdMap = flow.css.idMap;
  var themeClassMap = flow.css.classMap;
  var totalSaving = 0;


  //
  // class rename
  //

  fconsole.start('Process class names');

  var tmplModule = flow.js.basis.template;
  var classReplaceMap = {};
  var classReplaceMapIdx = 0;
  var classRenameSaving = 0;
  var typeSaving = {
    html: 0,
    style: 0,
    tmpl: 0,<commit_msg>build: fix optimizeNames exception when basis.js is not used<commit_after>var atTmpl = require('../../ast/tmpl');

function toBase52(num){
  var res = '';

  do {
    var n = num % 52;
    res = String.fromCharCode((n % 26) + (n < 26 ? 97 : 65)) + res;
    num = parseInt(num / 52);
  } while (num);

  return res;
}

(module.exports = function(flow){
  var fconsole = flow.console;
  var themeIdMap = flow.css.idMap;
  var themeClassMap = flow.css.classMap;
  var totalSaving = 0;


  //
  // class rename
  //

  fconsole.start('Process class names');

  var tmplModule = flow.js.basis && flow.js.basis.template;
  var classReplaceMap = {};
  var classReplaceMapIdx = 0;
  var classRenameSaving = 0;
  var typeSaving = {
    html: 0,
    style: 0,
    tmpl: 0,
{'fraction_non_alphanumeric': 0.14794520547945206, 'fraction_numerical': 0.0273972602739726, 'mean_word_length': 2.765463917525773, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '495868', 'n_tokens_mistral': 579, 'n_tokens_neox': 522, 'n_words': 138}