<commit_before>'use strict';

angular.module('confRegistrationWebApp')
  .directive('nameQuestion', function () {
    return {
      templateUrl: 'views/blocks/nameQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('addressQuestion', function () {
    return {
      templateUrl: 'views/blocks/addressQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('checkboxQuestion', function () {
    return {
      templateUrl: 'views/blocks/checkboxQuestion.html',
      restrict: 'E',
      controller: function ($scope) {
        if ($scope.wizard) {
          $scope.answer = {value: {}};
        } else {
          $scope.$watch('answer.value', function () {
            if (angular.isDefined($scope.answer)) {
              if (angular.isDefined(_.findKey($scope.answer.value, function (v) { return v === true; }))) {
                $scope.atLeastOneChecked = true;
              } else {
                $scope.atLeastOneChecked = false;
              }
            }
          }, true);
        }
      }
    };
  });

angular.module('confRegistrationWebApp')
  .directive('emailQuestion', function () {
    return {
      templateUrl: 'views/blocks/emailQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('numberQuestion', function () {
    return {
      templateUrl: 'views/blocks/numberQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('phoneQuestion', function () {
    return {
      templateUrl: 'views/blocks/phoneQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('radioQuestion', function () {
    return {
      templateUrl: 'views/blocks/radioQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('selectQuestion', function () {
    return {
      templateUrl: 'views/blocks/selectQuestion.html',
      restrict: 'E',
      controller: function($scope, $filter){
        $scope.$watch('block', function() {
          $scope.visibleValues = [];
          angular.forEach($scope.block.content.choices, function(c){
            var visibleValue = c.value;
            if(c.amount){
              visibleValue = visibleValue + ' - ' + $filter('moneyFormat')(c.amount);
            }
            $scope.visibleValues.push(visibleValue);
          });
        }, true);
      }
    };
  });

angular.module('confRegistrationWebApp')
  .directive('textQuestion', function () {
    return {
      templateUrl: 'views/blocks/textQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('genderQuestion', function () {
    return {
      templateUrl: 'views/blocks/genderQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('dateQuestion', function () {
    return {
      templateUrl: 'views/blocks/dateQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('yearInSchoolQuestion', function () {
    return {
      templateUrl: 'views/blocks/yearInSchoolQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
    .directive('textareaQuestion', function () {
      return {
        templateUrl: 'views/blocks/textareaQuestion.html',
        restrict: 'E'
      };
    });<commit_msg>Force conversion of date model to Date object<commit_after>'use strict';

angular.module('confRegistrationWebApp')
  .directive('nameQuestion', function () {
    return {
      templateUrl: 'views/blocks/nameQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('addressQuestion', function () {
    return {
      templateUrl: 'views/blocks/addressQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('checkboxQuestion', function () {
    return {
      templateUrl: 'views/blocks/checkboxQuestion.html',
      restrict: 'E',
      controller: function ($scope) {
        if ($scope.wizard) {
          $scope.answer = {value: {}};
        } else {
          $scope.$watch('answer.value', function () {
            if (angular.isDefined($scope.answer)) {
              if (angular.isDefined(_.findKey($scope.answer.value, function (v) { return v === true; }))) {
                $scope.atLeastOneChecked = true;
              } else {
                $scope.atLeastOneChecked = false;
              }
            }
          }, true);
        }
      }
    };
  });

angular.module('confRegistrationWebApp')
  .directive('emailQuestion', function () {
    return {
      templateUrl: 'views/blocks/emailQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('numberQuestion', function () {
    return {
      templateUrl: 'views/blocks/numberQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('phoneQuestion', function () {
    return {
      templateUrl: 'views/blocks/phoneQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('radioQuestion', function () {
    return {
      templateUrl: 'views/blocks/radioQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('selectQuestion', function () {
    return {
      templateUrl: 'views/blocks/selectQuestion.html',
      restrict: 'E',
      controller: function($scope, $filter){
        $scope.$watch('block', function() {
          $scope.visibleValues = [];
          angular.forEach($scope.block.content.choices, function(c){
            var visibleValue = c.value;
            if(c.amount){
              visibleValue = visibleValue + ' - ' + $filter('moneyFormat')(c.amount);
            }
            $scope.visibleValues.push(visibleValue);
          });
        }, true);
      }
    };
  });

angular.module('confRegistrationWebApp')
  .directive('textQuestion', function () {
    return {
      templateUrl: 'views/blocks/textQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('genderQuestion', function () {
    return {
      templateUrl: 'views/blocks/genderQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
  .directive('dateQuestion', function () {
    return {
      templateUrl: 'views/blocks/dateQuestion.html',
      restrict: 'E',
      controller: function($scope){
        if(angular.isDefined($scope.answer) && !($scope.answer.value instanceof Date)){
          $scope.answer.value = new Date($scope.answer.value);
        }
      }
    };
  });

angular.module('confRegistrationWebApp')
  .directive('yearInSchoolQuestion', function () {
    return {
      templateUrl: 'views/blocks/yearInSchoolQuestion.html',
      restrict: 'E'
    };
  });

angular.module('confRegistrationWebApp')
    .directive('textareaQuestion', function () {
      return {
        templateUrl: 'views/blocks/textareaQuestion.html',
        restrict: 'E'
      };
    });
{'fraction_non_alphanumeric': 0.1529705719044975, 'fraction_numerical': 0.0, 'mean_word_length': 2.633383761976803, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2468179', 'n_tokens_mistral': 2071, 'n_tokens_neox': 2082, 'n_words': 312}