<commit_before>  'use strict';
// [NPDC timeseries](https://github.com/npolar/npdc-indicator)

let angular = require('angular');
let npdcCommon = require('npdc-common');
let AutoConfig = npdcCommon.AutoConfig;
//require('angular-xeditable');

let app = angular.module('indicatorApp', [
  'npdcCommon'
  //xeditable
]);

app.service('TimeseriesCitation', require('./indicator-timeseries/TimeseriesCitation.js'));
app.service('TimeseriesModel', require('./indicator-timeseries/TimeseriesModel'));

app.controller('TimeseriesSearchController', require('./indicator-timeseries/TimeseriesSearchController'));
app.controller('TimeseriesShowController', require('./indicator-timeseries/TimeseriesShowController'));
app.controller('TimeseriesEditController', require('./indicator-timeseries/TimeseriesEditController'));

app.factory('Google', function() {
  return window.google; // assumes google has already been loaded on the page
});

app.factory('google', function() {
  return window.google; // assumes google has already been loaded on the page
});

app.service('Sparkline', require('./google/Sparkline'));
let services = [
  {"path": "/indicator/parameter",  "resource": "Parameter"},
  {"path": "/indicator/timeseries", "resource": "Timeseries" },
  {"path": "/placename", "base": "//api.npolar.no", "resource": "Placename", fields: "*" },
  {"path": "/editlog", "resource": "Editlog" }
];

services.forEach(function (service) {
  // Expressive DI syntax is needed here
  app.factory(service.resource, ['NpolarApiResource', function (NpolarApiResource) {
    return NpolarApiResource.resource(service);
  }]);
});

// Routing
app.config(require('./routes'));

// Inject auth interceptor
app.config(function($httpProvider, npolarApiConfig) {
  let environment = "production"; // development | test | production
  Object.assign(npolarApiConfig, new AutoConfig(environment));
  $httpProvider.interceptors.push("npolarApiInterceptor");

  // i18n
  $http.get('//api.npolar.no/text/?q=&filter-bundle=npolar|npdc|npdc-indicator|npdc-monitoring&format=json&variant=array&limit=all').then(response => {
    NpolarTranslate.appendToDictionary(response.data);
  });

  Object.assign(npolarApiConfig, new AutoConfig(environment));
  console.debug("npolarApiConfig", npolarApiConfig);
  console.debug("npdcAppConfig", npdcAppConfig);
});

// Inject npolarApiConfig and run
app.run(function(npdcAppConfig, NpolarTranslate) {
  npdcAppConfig.toolbarTitle = "Indicator";
  NpolarTranslate.loadBundles('npdc-indicator');
});<commit_msg>Dep fix<commit_after>  'use strict';
// [NPDC timeseries](https://github.com/npolar/npdc-indicator)

let angular = require('angular');
let npdcCommon = require('npdc-common');
let AutoConfig = npdcCommon.AutoConfig;
//require('angular-xeditable');

let app = angular.module('indicatorApp', [
  'npdcCommon'
  //xeditable
]);

app.service('TimeseriesCitation', require('./indicator-timeseries/TimeseriesCitation.js'));
app.service('TimeseriesModel', require('./indicator-timeseries/TimeseriesModel'));

app.controller('TimeseriesSearchController', require('./indicator-timeseries/TimeseriesSearchController'));
app.controller('TimeseriesShowController', require('./indicator-timeseries/TimeseriesShowController'));
app.controller('TimeseriesEditController', require('./indicator-timeseries/TimeseriesEditController'));

app.factory('Google', function() {
  return window.google; // assumes google has already been loaded on the page
});

app.factory('google', function() {
  return window.google; // assumes google has already been loaded on the page
});

app.service('Sparkline', require('./google/Sparkline'));
let services = [
  {"path": "/indicator/parameter",  "resource": "Parameter"},
  {"path": "/indicator/timeseries", "resource": "Timeseries" },
  {"path": "/placename", "base": "//api.npolar.no", "resource": "Placename", fields: "*" },
  {"path": "/editlog", "resource": "Editlog" }
];

services.forEach(function (service) {
  // Expressive DI syntax is needed here
  app.factory(service.resource, ['NpolarApiResource', function (NpolarApiResource) {
    return NpolarApiResource.resource(service);
  }]);
});

// Routing
app.config(require('./routes'));

// Inject auth interceptor
app.config(function($httpProvider, npolarApiConfig) {
  let environment = "production"; // development | test | production
  Object.assign(npolarApiConfig, new AutoConfig(environment));
  $httpProvider.interceptors.push("npolarApiInterceptor");
  Object.assign(npolarApiConfig, new AutoConfig(environment));
});

// Inject npolarApiConfig and run
app.run(function(npdcAppConfig, NpolarTranslate) {
  npdcAppConfig.toolbarTitle = "Indicator";
  NpolarTranslate.loadBundles('npdc-indicator');
});
{'fraction_non_alphanumeric': 0.1662773412614143, 'fraction_numerical': 0.00042471862391165854, 'mean_word_length': 6.313664596273292, 'pattern_counts': {'":': 18, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 2, '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': '2579532', 'n_tokens_mistral': 1412, 'n_tokens_neox': 1377, 'n_words': 252}