<commit_before>(function($moa) {

    "use strict";

    /**
     * @controller ModalController
     * @author <NAME>
     * @module Moa
     */
    $moa.controller('ModalController', ['$scope', '$timeout',

    function modalController($scope, $timeout) {

        /**
         * @property options
         * @type {Object}
         * @default null
         */
        $scope.options = null;

        /**
         * @property partial
         * @type {String}
         */
        $scope.partial = '';

        // When the "modal/open" event has been broadcast.
        $scope.$on('modal/open', function modalOpen(event, partialName, options) {
            $scope.partial = 'views/' + partialName;
            $scope.options = options;
        });

        // When the "modal/close" event has been broadcast.
        $scope.$on('modal/close', function() {
            $scope.close();
        });

        // When the "modal/reset" event has been broadcast.
        $scope.$on('modal/reset', function() {
            $scope.partial = '';
            $scope.options = null;
        });

        /**
         * @method close
         * @return {void}
         */
        $scope.close = function close() {

            $scope.$parent.modalOpen = false;

            $timeout(function timeout() {

                // Reset all of the passed in parameters.
                $scope.partial = '';
                $scope.options = null;

            }, 1250);

        };
        
    }]);

})(window.moaApp);<commit_msg>Fixed bug in opening another product too quickly<commit_after>(function($moa) {

    "use strict";

    /**
     * @controller ModalController
     * @author <NAME>
     * @module Moa
     */
    $moa.controller('ModalController', ['$scope', '$timeout',

    function modalController($scope, $timeout) {

        /**
         * @property options
         * @type {Object}
         * @default null
         */
        $scope.options = null;

        /**
         * @property partial
         * @type {String}
         */
        $scope.partial = '';

        /**
         * @property promise
         * @type {Object|null}
         * @default null
         */
        $scope.promise = null;

        // When the "modal/open" event has been broadcast.
        $scope.$on('modal/open', function modalOpen(event, partialName, options) {
            $timeout.cancel($scope.promise);
            $scope.partial = 'views/' + partialName;
            $scope.options = options;
        });

        // When the "modal/close" event has been broadcast.
        $scope.$on('modal/close', function() {
            $scope.close();
        });

        // When the "modal/reset" event has been broadcast.
        $scope.$on('modal/reset', function() {
            $scope.partial = '';
            $scope.options = null;
        });

        /**
         * @method close
         * @return {void}
         */
        $scope.close = function close() {

            $scope.$parent.modalOpen = false;

            $scope.promise = $timeout(function timeout() {

                // Reset all of the passed in parameters.
                $scope.partial = '';
                $scope.options = null;

            }, 1250);

        };
        
    }]);

})(window.moaApp);
{'fraction_non_alphanumeric': 0.14662576687116563, 'fraction_numerical': 0.00245398773006135, 'mean_word_length': 1.485518292682927, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2635899', 'n_tokens_mistral': 903, 'n_tokens_neox': 859, 'n_words': 196}