<commit_before>$(document).ready(function() {
  var calendario = null;
  moment().locale("es");

  $(".month").on("click", filterByMonth);
  $(".comunidad").on("change", filterProducts);
  $(".product-filter select").select2({
    placeholder: "Filtrar por producto",
    allowClear: true,
    minimumInputLength: 2
  });

  $(".product-filter select").on("change.select2", function(e) {
    var selected = parseInt($(e.target).val());
    if (selected) {
      var $grid = $(".grid").isotope({
        filter: function() {
          var id = parseInt(
            $(this)
              .find(".id")
              .text()
          );
          return id == selected;
        }
      });
    } else {
      var $grid = $(".grid").isotope({
        filter: "*"
      });
      organizeProducts();
    }
  });

  filterProducts();

  function organizeProducts() {
    var $grid = $(".grid").isotope({
      itemSelector: ".portfolio-item",
      getSortData: {
        id: ".id parseInt",
        temporada: ".temporada parseInt"
      },
      percentPosition: true,
      masonry: {
        columnWidth: ".col-sm-2"
      },
      sortBy: ["temporada", "id"]
    });
    $grid.isotope("updateSortData").isotope();
  }
  function filterByMonth(e) {
    e.preventDefault();
    $(".month").removeClass("active");
    $(e.target).addClass("active");
    filterProducts();
  }

  function filterProducts() {
    var activeMonth = $(".month.active")
      .data("month")
      .trim();
    filterActive(activeMonth);
  }
  function filterActive(month) {
    month = month || $(".month.active").text();
    d3.csv("data/temporadas/calendario.csv", function(calendario) {
      for (var i = 0,id=1; i < calendario.length; i++,id++) {
        var product = $(".product-" + id);
        var season = $(".product-" + id + " .temporada");
        var icon = $(".product-"+id+" .icon-temporada");

        product.removeClass(
          "temporada inicio-temporada fin-temporada fuera-temporada fa-warning"
        );
        switch (calendario[i][month.toUpperCase()]) {
          case "X":
            product.addClass("en-temporada");
            season.text(1);
            break;
          //TODO remove
          case "Y":
          case "I":
            product.addClass("inicio-temporada");
            season.text(2);
            icon.addClass("fa-warning");
            break;
          case "F":
            product.addClass("fin-temporada");
            season.text(3);
            icon.addClass("fa-warning");
            break;
          default:
            product.addClass("fuera-temporada");
            season.text(4);
        }
      }
      organizeProducts();
    });
  }
});<commit_msg>se arregló problema con el ícono de warning<commit_after>$(document).ready(function() {
  var calendario = null;
  moment().locale("es");

  $(".month").on("click", filterByMonth);
  $(".comunidad").on("change", filterProducts);
  $(".product-filter select").select2({
    placeholder: "Filtrar por producto",
    allowClear: true,
    minimumInputLength: 2
  });

  $(".product-filter select").on("change.select2", function(e) {
    var selected = parseInt($(e.target).val());
    if (selected) {
      var $grid = $(".grid").isotope({
        filter: function() {
          var id = parseInt(
            $(this)
              .find(".id")
              .text()
          );
          return id == selected;
        }
      });
    } else {
      var $grid = $(".grid").isotope({
        filter: "*"
      });
      organizeProducts();
    }
  });

  filterProducts();

  function organizeProducts() {
    var $grid = $(".grid").isotope({
      itemSelector: ".portfolio-item",
      getSortData: {
        id: ".id parseInt",
        temporada: ".temporada parseInt"
      },
      percentPosition: true,
      masonry: {
        columnWidth: ".col-sm-2"
      },
      sortBy: ["temporada", "id"]
    });
    $grid.isotope("updateSortData").isotope();
  }
  function filterByMonth(e) {
    e.preventDefault();
    $(".month").removeClass("active");
    $(e.target).addClass("active");
    filterProducts();
  }

  function filterProducts() {
    var activeMonth = $(".month.active")
      .data("month")
      .trim();
    filterActive(activeMonth);
  }
  function filterActive(month) {
    month = month || $(".month.active").text();
    d3.csv("data/temporadas/calendario.csv", function(calendario) {
      for (var i = 0,id=1; i < calendario.length; i++,id++) {
        var product = $(".product-" + id);
        var season = $(".product-" + id + " .temporada");
        var icon = $(".product-"+id+" .icon-temporada");

        product.removeClass(
          "temporada inicio-temporada fin-temporada fuera-temporada fa-warning"
        );
        icon.removeClass("fa-warning");
        switch (calendario[i][month.toUpperCase()]) {
          case "X":
            product.addClass("en-temporada");
            season.text(1);
            break;
          //TODO remove
          case "Y":
          case "I":
            product.addClass("inicio-temporada");
            season.text(2);
            icon.addClass("fa-warning");
            break;
          case "F":
            product.addClass("fin-temporada");
            season.text(3);
            icon.addClass("fa-warning");
            break;
          default:
            product.addClass("fuera-temporada");
            season.text(4);
        }
      }
      organizeProducts();
    });
  }
});
{'fraction_non_alphanumeric': 0.17661054172767204, 'fraction_numerical': 0.004026354319180088, 'mean_word_length': 2.007705008255366, 'pattern_counts': {'":': 8, '<': 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': '3547009', 'n_tokens_mistral': 1674, 'n_tokens_neox': 1649, 'n_words': 298}