<commit_before>define(['jquery', 'underscore', 'backbone', 'content-view', 'regs-data', 'definition-view', 'sub-head-view', 'toc-view', 'regs-dispatch', 'sidebar-view', 'konami'], function($, _, Backbone, ContentView, RegsData, DefinitionView, SubHeadView, TOCView, Dispatch, SidebarView, Konami) {
    'use strict';
    return {
        getTree: function($obj) {
            var parent = this;
            $obj.children().each(function() {
                var $child = $(this),
                    cid = $child.attr('id'),
                    clist = $child.find('ol'),
                    $nextChild;

                RegsData.set({
                    'text': cid,
                    'content': $child.html()
                }); 

                if (typeof (cid, clist) !== 'undefined') {
                    $nextChild = clist ? $(clist) : $child;
                    parent.getTree($nextChild);
                }
            });
        },

        bindEvents: function() {
            // toc class toggle
            $('#menu-link, #toc-close').on('click', function() {
                $('#menu, #reg-content, #menu-link, #content-header').toggleClass('active');
                return false;
            });

            new Konami(function() {
                // http://thenounproject.com/noun/hamburger/#icon-No17373
                // http://thenounproject.com/noun/carrot/#icon-No7790
                document.getElementById('menu-link').className += ' hamburgerify';
                $('.inline-interpretation .expand-button').addClass('carrotify');
                $('#about-tool').html('Made with <span style="color: red"><3</span> by:');
                $('#about-reg').html('Find our brilliant attorneys at:');
            });
        },

        fetchModelForms: function() {
            var insertImg = function(tag) {
                var $tag = $(tag),
                    url = $tag.data('imgUrl'),
                    alt = $tag.data('imgAlt');

                if (url) {
                    $tag.parent().append('<img class="reg-image" src="' + url + '" alt="' + alt + '" />');
                }
            };

            $('noscript').each(function() {
                var tag = this;
                setTimeout(function() { insertImg(tag); }, 1000, tag);
            });
        },

        init: function() {
            this.getTree($('#reg-content')); 
<commit_msg>delayed loading of model form images<commit_after>define(['jquery', 'underscore', 'backbone', 'content-view', 'regs-data', 'definition-view', 'sub-head-view', 'toc-view', 'regs-dispatch', 'sidebar-view', 'konami'], function($, _, Backbone, ContentView, RegsData, DefinitionView, SubHeadView, TOCView, Dispatch, SidebarView, Konami) {
    'use strict';
    return {
        getTree: function($obj) {
            var parent = this;
            $obj.children().each(function() {
                var $child = $(this),
                    cid = $child.attr('id'),
                    clist = $child.find('ol'),
                    $nextChild;

                RegsData.set({
                    'text': cid,
                    'content': $child.html()
                }); 

                if (typeof (cid, clist) !== 'undefined') {
                    $nextChild = clist ? $(clist) : $child;
                    parent.getTree($nextChild);
                }
            });
        },

        bindEvents: function() {
            // toc class toggle
            $('#menu-link, #toc-close').on('click', function() {
                $('#menu, #reg-content, #menu-link, #content-header').toggleClass('active');
                return false;
            });

            new Konami(function() {
                // http://thenounproject.com/noun/hamburger/#icon-No17373
                // http://thenounproject.com/noun/carrot/#icon-No7790
                document.getElementById('menu-link').className += ' hamburgerify';
                $('.inline-interpretation .expand-button').addClass('carrotify');
                $('#about-tool').html('Made with <span style="color: red"><3</span> by:');
                $('#about-reg').html('Find our brilliant attorneys at:');
            });
        },

        fetchModelForms: function() {
            var insertImg = function(tag) {
                var $tag = $(tag),
                    url = $tag.data('imgUrl'),
                    alt = $tag.data('imgAlt');

                if (url) {
                    $tag.parent().append('<img class="reg-image" src="' + url + '" alt="' + alt + '" />');
                }
            };

            $('noscript').each(function() {
                var tag = this;
                setTimeout(function() { insertImg(tag); }, 2000, tag);
            });
        },

        init: function() {
            this.getTree($('#reg-content')); 

{'fraction_non_alphanumeric': 0.16988577362409138, 'fraction_numerical': 0.005815160955347871, 'mean_word_length': 1.5241090146750524, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '2739252', 'n_tokens_mistral': 1359, 'n_tokens_neox': 1259, 'n_words': 239}