<commit_before>if (typeof AccountsEntry === "undefined") {
  AccountsEntry = {};
}

AccountsEntry = {
  settings: {
    layoutName: "",
    contentTemplateName: "",
    wrapLinks: true,
    homeRoute: '/home',
    dashboardRoute: '/dashboard',
    passwordSignupFields: 'EMAIL_ONLY',
    emailToLower: true,
    usernameToLower: false,
    entrySignUp: '/sign-up',
    emailVerificationPendingRoute: '/verification-pending',
    extraSignUpFields: [],
    showOtherLoginServices: true,
    requirePasswordConfirmation: true,
    waitEmailVerification: true
  },
  isStringEmail(email) {
    var emailPattern;
    emailPattern = /^([\w.-]+)@([\w.-]+)\.([a-zA-Z.]{2,6})$/i;
    if (email.match(emailPattern)) {
      return true;
    } else {
      return false;
    }
  },
  config(appConfig) {
    let signUpRoute;
    this.settings = _.extend(this.settings, appConfig);
    i18n.setDefaultLanguage = "en";
    if (appConfig.language) {
      i18n.setLanguage = appConfig.language;
    }
    if (appConfig.signUpTemplate) {
      signUpRoute = Router.routes['entrySignUp'];
      return signUpRoute.options.template || appConfig.signUpTemplate;
    }
  },
  signInRequired(router, extraCondition) {
    if (extraCondition === null) {
      extraCondition = true;
    }
    if (!Meteor.user()){
      Session.set('fromWhere', router.url);
      FlowRouter.go('/sign-in');
      Session.set('entryError', i18n('error.signInRequired'));
    }
  }
};<commit_msg>use accounts namespaced route for redirect<commit_after>if (typeof AccountsEntry === "undefined") {
  AccountsEntry = {};
}

AccountsEntry = {
  settings: {
    layoutName: "",
    contentTemplateName: "",
    wrapLinks: true,
    homeRoute: '/home',
    dashboardRoute: '/dashboard',
    passwordSignupFields: 'EMAIL_ONLY',
    emailToLower: true,
    usernameToLower: false,
    entrySignUp: '/sign-up',
    emailVerificationPendingRoute: '/verification-pending',
    extraSignUpFields: [],
    showOtherLoginServices: true,
    requirePasswordConfirmation: true,
    waitEmailVerification: true
  },
  isStringEmail(email) {
    var emailPattern;
    emailPattern = /^([\w.-]+)@([\w.-]+)\.([a-zA-Z.]{2,6})$/i;
    if (email.match(emailPattern)) {
      return true;
    } else {
      return false;
    }
  },
  config(appConfig) {
    let signUpRoute;
    this.settings = _.extend(this.settings, appConfig);
    i18n.setDefaultLanguage = "en";
    if (appConfig.language) {
      i18n.setLanguage = appConfig.language;
    }
    if (appConfig.signUpTemplate) {
      signUpRoute = Router.routes['entrySignUp'];
      return signUpRoute.options.template || appConfig.signUpTemplate;
    }
  },
  signInRequired(router, extraCondition) {
    if (extraCondition === null) {
      extraCondition = true;
    }
    if (!Meteor.user()){
      Session.set('fromWhere', router.url);
      FlowRouter.go('/accounts/sign-in');
      Session.set('entryError', i18n('error.signInRequired'));
    }
  }
};
{'fraction_non_alphanumeric': 0.14996614759647936, 'fraction_numerical': 0.005416384563303994, 'mean_word_length': 3.2154065620542083, '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': '2314074', 'n_tokens_mistral': 955, 'n_tokens_neox': 947, 'n_words': 159}