<commit_before>export default function(ngapp) {
    ngapp.directive('splitBar', function () {
        return {
            restrict: 'E',
            template: '<div class="bar"></div>',
            scope: true,
            link: function(scope, element) {
                // helper variables
                var htmlElement = document.documentElement;
                var container = element[0].parentElement;
                var vertical = container.classList.contains('vertical');
                var targetDimension = vertical ? 'height' : 'width';
                var clientLabel = vertical ? 'clientY' : 'clientX';
                var offsetLabel = vertical ? 'offsetTop' : 'offsetLeft';
                var sizeLabel = vertical ? 'offsetHeight' : 'offsetWidth';
                var moving = false;

                // event handlers
                var handleMouseMove = function(e) {
                    var paneElement = element[0].previousElementSibling;
                    var percentage = (e[clientLabel] - paneElement[offsetLabel]) / container[sizeLabel];
                    paneElement.style[targetDimension] = Math.min(percentage, 1.0).toPercentage(1);
                };
                var handleMouseDown = function(e) {
                    // only trigger when left mouse button is pressed
                    if (e.button !== 0 && e.type !== 'touchstart') return;
                    moving = true;
                    htmlElement.addEventListener('mousemove', handleMouseMove);
                    htmlElement.addEventListener('touchmove', handleMouseMove);
                    e.preventDefault();
                    e.stopPropagation();
                };
                var handleMouseUp = function(e) {
                    if (!moving) return;
                    moving = false;
                    htmlElement.removeEventListener('mousemove', handleMouseMove);
                    htmlElement.removeEventListener('touchmove', handleMouseMove);
                    e.preventDefault();
                    e.stopPropagation();<commit_msg>changed vars to let in splitBar directive link function<commit_after>export default function(ngapp) {
    ngapp.directive('splitBar', function () {
        return {
            restrict: 'E',
            template: '<div class="bar"></div>',
            scope: true,
            link: function(scope, element) {
                // helper variables
                let htmlElement = document.documentElement;
                let container = element[0].parentElement;
                let vertical = container.classList.contains('vertical');
                let targetDimension = vertical ? 'height' : 'width';
                let clientLabel = vertical ? 'clientY' : 'clientX';
                let offsetLabel = vertical ? 'offsetTop' : 'offsetLeft';
                let sizeLabel = vertical ? 'offsetHeight' : 'offsetWidth';
                let moving = false;

                // event handlers
                let handleMouseMove = function(e) {
                    let paneElement = element[0].previousElementSibling;
                    let percentage = (e[clientLabel] - paneElement[offsetLabel]) / container[sizeLabel];
                    paneElement.style[targetDimension] = Math.min(percentage, 1.0).toPercentage(1);
                };
                let handleMouseDown = function(e) {
                    // only trigger when left mouse button is pressed
                    if (e.button !== 0 && e.type !== 'touchstart') return;
                    moving = true;
                    htmlElement.addEventListener('mousemove', handleMouseMove);
                    htmlElement.addEventListener('touchmove', handleMouseMove);
                    e.preventDefault();
                    e.stopPropagation();
                };
                let handleMouseUp = function(e) {
                    if (!moving) return;
                    moving = false;
                    htmlElement.removeEventListener('mousemove', handleMouseMove);
                    htmlElement.removeEventListener('touchmove', handleMouseMove);
                    e.preventDefault();
                    e.stopPropagation();
{'fraction_non_alphanumeric': 0.09918543363679923, 'fraction_numerical': 0.0028749401054144704, 'mean_word_length': 1.6077451592754528, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4091126', 'n_tokens_mistral': 959, 'n_tokens_neox': 901, 'n_words': 217}