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

    angular
        .module('lumx.search-filter', [])
        .directive('lxSearchFilter', lxSearchFilter);

    /* @ngInject */
    function lxSearchFilter()
    {
        return {
            restrict: 'E',
            templateUrl: 'search-filter.html',
            scope:
            {
                closed: '=?lxClosed',
                color: '@?lxColor',
                width: '@?lxWidth'
            },
            link: link,
            controller: LxSearchFilterController,
            controllerAs: 'lxSearchFilter',
            bindToController: true,
            replace: true,
            transclude: true
        };

        function link(scope, element, attrs, ctrl, transclude)
        {
            transclude(function()
            {
                var input = element.find('input');

                ctrl.setInput(input);
                ctrl.setModel(input.data('$ngModelController'));

                input.bind('blur', ctrl.blurInput);
            });
        }
    }

    /* @ngInject */
    function LxSearchFilterController($element, $scope)
    {
        var lxSearchFilter = this;
        var input;
        var modelController;

        lxSearchFilter.blurInput = blurInput;
        lxSearchFilter.clearInput = clearInput;
        lxSearchFilter.getWidth = getWidth;
        lxSearchFilter.openInput = openInput;
        lxSearchFilter.setInput = setInput;
        lxSearchFilter.setModel = setModel;

        lxSearchFilter.color = angular.isDefined(lxSearchFilter.color) ? lxSearchFilter.color : 'black';

        ////////////

        function blurInput()
        {
            if (angular.isDefined(lxSearchFilter.closed) && lxSearchFilter.closed && !modelController.$modelValue)
            {
                $element.velocity(
                {
                    width: 40
                },
                {
                    duration: 400,
                    easing: 'easeOutQuint',
                    queue: false
                });
            }<commit_msg>fix search filter: remove useless nginject<commit_after>(function()
{
    'use strict';

    angular
        .module('lumx.search-filter', [])
        .directive('lxSearchFilter', lxSearchFilter);

    function lxSearchFilter()
    {
        return {
            restrict: 'E',
            templateUrl: 'search-filter.html',
            scope:
            {
                closed: '=?lxClosed',
                color: '@?lxColor',
                width: '@?lxWidth'
            },
            link: link,
            controller: LxSearchFilterController,
            controllerAs: 'lxSearchFilter',
            bindToController: true,
            replace: true,
            transclude: true
        };

        function link(scope, element, attrs, ctrl, transclude)
        {
            transclude(function()
            {
                var input = element.find('input');

                ctrl.setInput(input);
                ctrl.setModel(input.data('$ngModelController'));

                input.bind('blur', ctrl.blurInput);
            });
        }
    }

    LxSearchFilterController.$inject = ['$element', '$scope'];

    function LxSearchFilterController($element, $scope)
    {
        var lxSearchFilter = this;
        var input;
        var modelController;

        lxSearchFilter.blurInput = blurInput;
        lxSearchFilter.clearInput = clearInput;
        lxSearchFilter.getWidth = getWidth;
        lxSearchFilter.openInput = openInput;
        lxSearchFilter.setInput = setInput;
        lxSearchFilter.setModel = setModel;

        lxSearchFilter.color = angular.isDefined(lxSearchFilter.color) ? lxSearchFilter.color : 'black';

        ////////////

        function blurInput()
        {
            if (angular.isDefined(lxSearchFilter.closed) && lxSearchFilter.closed && !modelController.$modelValue)
            {
                $element.velocity(
                {
                    width: 40
                },
                {
                    duration: 400,
                    easing: 'easeOutQuint',
                    queue: false
                });
            }
{'fraction_non_alphanumeric': 0.1070314374850012, 'fraction_numerical': 0.0023998080153587713, 'mean_word_length': 1.4488836662749707, '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': '2397296', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1036, 'n_words': 186}