<commit_before>(function(){
    "use strict";

    /**
        *
        * @ngdoc service
        * @name openlmis-core.OfflineService
        * @description
        * Service allows to determine whether the browser can detect an internet connection.
        *
        */

    angular.module('openlmis-core')
        .service('OfflineService', OfflineService);

    OfflineService.$inject = ['Offline', '$timeout'];

    function OfflineService(Offline, $timeout) {
        var service = this,
            isOffline = false;

        Offline.options = { checkOnLoad: true,
                            interceptRequests: false,
                            requests: false };

        Offline.on('confirmed-up', online);

        Offline.on('up', online);

        Offline.on('confirmed-down', offline);

        Offline.on('down', offline);

        service.checkConnection = function() {
            $timeout(function() {
                Offline.check();
                service.checkConnection();
            }, 30000);
        }

        service.checkConnection();

        service.isOffline = function() {
            return isOffline;
        }

        function offline() {
           $timeout(function() {<commit_msg>OLMIS-1406: Corrected favicon.ico path<commit_after>(function(){
    "use strict";

    /**
        *
        * @ngdoc service
        * @name openlmis-core.OfflineService
        * @description
        * Service allows to determine whether the browser can detect an internet connection.
        *
        */

    angular.module('openlmis-core')
        .service('OfflineService', OfflineService);

    OfflineService.$inject = ['Offline', '$timeout'];

    function OfflineService(Offline, $timeout) {
        var service = this,
            isOffline = false;

        Offline.options = {
            checkOnLoad: true,
            interceptRequests: false,
            requests: false,
            checks: {xhr: {url: 'favicon.ico'}}
            };

        Offline.on('confirmed-up', online);

        Offline.on('up', online);

        Offline.on('confirmed-down', offline);

        Offline.on('down', offline);

        service.checkConnection = function() {
            $timeout(function() {
                Offline.check();
                service.checkConnection();
            }, 30000);
        }

        service.checkConnection();

        service.isOffline = function() {
            return isOffline;
        }

        function offline() {
           $timeout(function() {
{'fraction_non_alphanumeric': 0.11942675159235669, 'fraction_numerical': 0.005573248407643312, 'mean_word_length': 1.7585071350164654, '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': '515240', 'n_tokens_mistral': 687, 'n_tokens_neox': 636, 'n_words': 133}