<commit_before>(function($, UI) {

    "use strict";

    var SmoothScroll = function(element, options) {

        var $this = this, $element = $(element);

        if($element.data("smoothScroll")) return;

        this.options = $.extend({}, SmoothScroll.defaults, options);

        this.element = $element.on("click", function(e) {

            // get / set parameters
            var ele       = ($(this.hash).length ? $(this.hash) : $("body")),
                target    = ele.offset().top - $this.options.offset,
                docheight = $(document).height(),
                winheight = $(window).height(),
                eleheight = ele.outerHeight();

            if ((target + winheight) > docheight) {
                target = (target - winheight) + eleheight;
            }

            // animate to target and set the hash to the window.location after the animation
            $("html,body").stop().animate({scrollTop: target}, $this.options.duration, $this.options.transition);

            // cancel default click action
            return false;
        });

        this.element.data("smoothScroll", this);
    };

    SmoothScroll.defaults = {<commit_msg>updated smoothscroll offset<commit_after>(function($, UI) {

    "use strict";

    var SmoothScroll = function(element, options) {

        var $this = this, $element = $(element);

        if($element.data("smoothScroll")) return;

        this.options = $.extend({}, SmoothScroll.defaults, options);

        this.element = $element.on("click", function(e) {

            // get / set parameters
            var ele       = ($(this.hash).length ? $(this.hash) : $("body")),
                target    = ele.offset().top - $this.options.offset,
                docheight = $(document).height(),
                winheight = $(window).height(),
                eleheight = ele.outerHeight();

            if ((target + winheight) > docheight) {
                target = (target - winheight) + eleheight + $this.options.offset;
            }

            // animate to target and set the hash to the window.location after the animation
            $("html,body").stop().animate({scrollTop: target}, $this.options.duration, $this.options.transition);

            // cancel default click action
            return false;
        });

        this.element.data("smoothScroll", this);
    };

    SmoothScroll.defaults = {
{'fraction_non_alphanumeric': 0.14518147684605756, 'fraction_numerical': 0.0, 'mean_word_length': 1.9788819875776398, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2848110', 'n_tokens_mistral': 647, 'n_tokens_neox': 602, 'n_words': 149}