<commit_before>'use strict';

var React = require('react'),
  withSideEffect = require('react-side-effect');

function reducePropsToState(propsList) {
  var transitionSeconds = 4;
  var arrayImages = [];
  var result = propsList.map(function(props) {
    arrayImages = props.bgImageArray;
    if(typeof(props.transitionSeconds)!="undefined"){
      transitionSeconds = props.transitionSeconds;
    }
    return props.className;
  }).filter(function (value, index, self) {
    return self.indexOf(value) === index;
  }).join(' ');

  return {className:result,transitionSeconds:transitionSeconds,bgImageArray:arrayImages};
}

function backgroundSequence(bgImageArray,secs) {
  window.clearTimeout();
  var k = 0;
  for (var i = 0; i < bgImageArray.length; i++) {
    setTimeout(function(){
      document.body.style.background = "url(" + bgImageArray[k] + ") no-repeat center center fixed";
      document.body.style.backgroundSize ="cover";
      document.body.style.backgroundColor = "#999";
      if ((k + 1) === bgImageArray.length) { setTimeout(function() { backgroundSequence(bgImageArray,secs) }, (secs * 1000))} else { k++; }
    }, (secs * 1000) * i)
  }
}

function handleStateChangeOnClient(propiedades) {
  for (var key in propiedades) {
    if(key=="className"){
      document.body.className = propiedades[key] || '';
    }else if(key=="bgImageArray" && typeof(propiedades[key])!="undefined" && propiedades[key].hasOwnProperty("length") && propiedades[key].length>0){
      if(propiedades[key].length==1) {
        console.log("cargando imagen:"+propiedades[key][0]);
        new Image().src = propiedades[key][0];
        document.body.style.background = "url("+propiedades[key][0]+") no-repeat center center fixed";
        document.body.style.backgroundSize = "cover";
        document.body.style.backgroundColor = "#999";
      }else {
        propiedades[key].forEach(function(img){
          new Image().src = img;
          // caches images, avoiding white flash between background replacements
        });

        backgroundSequence(propiedades[key],propiedades["transitionSeconds"]);
      }
    }
  }<commit_msg>delete console.log line<commit_after>'use strict';

var React = require('react'),
  withSideEffect = require('react-side-effect');

function reducePropsToState(propsList) {
  var transitionSeconds = 4;
  var arrayImages = [];
  var result = propsList.map(function(props) {
    arrayImages = props.bgImageArray;
    if(typeof(props.transitionSeconds)!="undefined"){
      transitionSeconds = props.transitionSeconds;
    }
    return props.className;
  }).filter(function (value, index, self) {
    return self.indexOf(value) === index;
  }).join(' ');

  return {className:result,transitionSeconds:transitionSeconds,bgImageArray:arrayImages};
}

function backgroundSequence(bgImageArray,secs) {
  window.clearTimeout();
  var k = 0;
  for (var i = 0; i < bgImageArray.length; i++) {
    setTimeout(function(){
      document.body.style.background = "url(" + bgImageArray[k] + ") no-repeat center center fixed";
      document.body.style.backgroundSize ="cover";
      document.body.style.backgroundColor = "#999";
      if ((k + 1) === bgImageArray.length) { setTimeout(function() { backgroundSequence(bgImageArray,secs) }, (secs * 1000))} else { k++; }
    }, (secs * 1000) * i)
  }
}

function handleStateChangeOnClient(propiedades) {
  for (var key in propiedades) {
    if(key=="className"){
      document.body.className = propiedades[key] || '';
    }else if(key=="bgImageArray" && typeof(propiedades[key])!="undefined" && propiedades[key].hasOwnProperty("length") && propiedades[key].length>0){
      if(propiedades[key].length==1) {
        new Image().src = propiedades[key][0];
        document.body.style.background = "url("+propiedades[key][0]+") no-repeat center center fixed";
        document.body.style.backgroundSize = "cover";
        document.body.style.backgroundColor = "#999";
      }else {
        propiedades[key].forEach(function(img){
          new Image().src = img;
          // caches images, avoiding white flash between background replacements
        });

        backgroundSequence(propiedades[key],propiedades["transitionSeconds"]);
      }
    }
  }
{'fraction_non_alphanumeric': 0.1543019672908272, 'fraction_numerical': 0.01066603460535672, 'mean_word_length': 3.9705535924617195, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7597803', 'n_tokens_mistral': 1290, 'n_tokens_neox': 1248, 'n_words': 234}