<commit_before>'use strict';

var aboutDialogTemplateUrl = require('ngtemplate-loader?relativeTo=/src/!html-loader!../dialogs/About.html');

var templateUrl = require('ngtemplate-loader?relativeTo=/src/!html-loader!./validator-view.html');

function ValidatorViewController($scope, $rootScope, $log, $http, $window, $q, $route, $location, $uibModal, $templateCache, gist, markupJson, markupYaml, validatorFactoryJSV, validatorFactoryAJV, alertService, textService) {

  var self = this;

  this.parseMarkup = null;
  this.validateSchema = null;
  this.validateDocument = null;

  // Set up spec versions
  this.validators = {
    'draft-01': {
      service: validatorFactoryJSV('draft-01'),
      name: 'draft-01'
    },
    'draft-02': {
      service: validatorFactoryJSV('draft-02'),
      name: 'draft-02'
    },
    'draft-03': {
      service: validatorFactoryJSV('draft-03'),
      name: 'draft-03'
    },
    'draft-04': {
      service: validatorFactoryAJV('draft-04'),
      name: 'draft-04'
    },
    'draft-06': {
      service: validatorFactoryAJV('draft-06'),
      name: 'draft-06'
    },
    'draft-07': {
      service: validatorFactoryAJV('draft-07'),
      name: 'draft-07',
      label: 'draft-07 (latest)'
    },
    // RETIRED schema versions
    'v5-unofficial': {
      name: 'v5-unofficial',
      alerts: [{
        className: 'alert-error',
        content_tid: 'WARNING_V5_UNOFFICIAL'
      }],
      hidden: true
    },
    'experimental': {
      name: 'experimental',
      alerts: [{
        className: 'alert-error',
        content_tid: 'WARNING_EXPERIMENTAL'
      }],
      hidden: true
    }
  };
  this.validatorsArr = function() {
    return Object.values(this.validators);
  };

  // Set up markup languages
  this.markupLanguages = {
    'json': {
      service: markupJson,
      name: 'JSON'
    },
    'yaml': {
      service: markupYaml,
      name: 'YAML'
    }
  };

  this.about = function(event) {
    // Stop the link redirecting us to #
    event.preventDefault();
    event.stopPropagation();

    alertService.alert({title: '{{ "ABOUT" | translate }}', message: $templateCache.get(aboutDialogTemplateUrl), btnClass: 'btn-primary', size: 'lg'});<commit_msg>Fix error alert class<commit_after>'use strict';

var aboutDialogTemplateUrl = require('ngtemplate-loader?relativeTo=/src/!html-loader!../dialogs/About.html');

var templateUrl = require('ngtemplate-loader?relativeTo=/src/!html-loader!./validator-view.html');

function ValidatorViewController($scope, $rootScope, $log, $http, $window, $q, $route, $location, $uibModal, $templateCache, gist, markupJson, markupYaml, validatorFactoryJSV, validatorFactoryAJV, alertService, textService) {

  var self = this;

  this.parseMarkup = null;
  this.validateSchema = null;
  this.validateDocument = null;

  // Set up spec versions
  this.validators = {
    'draft-01': {
      service: validatorFactoryJSV('draft-01'),
      name: 'draft-01'
    },
    'draft-02': {
      service: validatorFactoryJSV('draft-02'),
      name: 'draft-02'
    },
    'draft-03': {
      service: validatorFactoryJSV('draft-03'),
      name: 'draft-03'
    },
    'draft-04': {
      service: validatorFactoryAJV('draft-04'),
      name: 'draft-04'
    },
    'draft-06': {
      service: validatorFactoryAJV('draft-06'),
      name: 'draft-06'
    },
    'draft-07': {
      service: validatorFactoryAJV('draft-07'),
      name: 'draft-07',
      label: 'draft-07 (latest)'
    },
    // RETIRED schema versions
    'v5-unofficial': {
      name: 'v5-unofficial',
      alerts: [{
        className: 'alert-danger',
        content_tid: 'WARNING_V5_UNOFFICIAL'
      }],
      hidden: true
    },
    'experimental': {
      name: 'experimental',
      alerts: [{
        className: 'alert-danger',
        content_tid: 'WARNING_EXPERIMENTAL'
      }],
      hidden: true
    }
  };
  this.validatorsArr = function() {
    return Object.values(this.validators);
  };

  // Set up markup languages
  this.markupLanguages = {
    'json': {
      service: markupJson,
      name: 'JSON'
    },
    'yaml': {
      service: markupYaml,
      name: 'YAML'
    }
  };

  this.about = function(event) {
    // Stop the link redirecting us to #
    event.preventDefault();
    event.stopPropagation();

    alertService.alert({title: '{{ "ABOUT" | translate }}', message: $templateCache.get(aboutDialogTemplateUrl), btnClass: 'btn-primary', size: 'lg'});
{'fraction_non_alphanumeric': 0.15568592057761732, 'fraction_numerical': 0.018501805054151624, 'mean_word_length': 2.902288732394366, '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': '6696128', 'n_tokens_mistral': 1520, 'n_tokens_neox': 1437, 'n_words': 270}