<commit_before>// Generated by CoffeeScript 1.6.3
/*
  FilmRoll (for jQuery)
  version: 0.1.5 (10/22/13)
  @requires jQuery >= v1.4

  By <NAME>
  Examples at http://straydogstudio.github.io/film_roll

  Licensed under the MIT:
    http://www.opensource.org/licenses/mit-license.php

  Usage:
    var film_troll = new FilmRoll({container: '#container_id', OPTIONS});
*/(function(){var e=function(e,t){return function(){return e.apply(t,arguments)}};this.FilmRoll=function(){function t(t){this.options=t!=null?t:{};this.rotateRight=e(this.rotateRight,this);this.rotateLeft=e(this.rotateLeft,this);this.moveRight=e(this.moveRight,this);this.moveLeft=e(this.moveLeft,this);this.clearScroll=e(this.clearScroll,this);this.configureScroll=e(this.configureScroll,this);this.configureWidths=e(this.configureWidths,this);this.configureHover=e(this.configureHover,this);if(this.options.container){this.div=jQuery(this.options.container);this.div.length&&this.configure()}}t.prototype.configure=function(){var e,t,n=this;this.children=this.div.children();this.children.wrapAll('<div class="film_roll_wrapper"></div>');this.children.wrapAll('<div class="film_roll_shuttle"></div>');this.wrapper=this.div.find(".film_roll_wrapper");this.shuttle=this.div.find(".film_roll_shuttle");this.rotation=[];t=this.options.shuttle_width?parseInt(this.options.shuttle_width,10):1e4;this.shuttle.width(t);this.height=this.options.height?parseInt(this.options.height,10):0;this.wrapper.height(this.height);this.shuttle.height(this.height);if(this.options.no_css!==!0&&!document.film_roll_styles_added){jQuery("<style type='text/css'>.film_roll_wrapper {display: block; text-align: center; float: none; position: relative; top: auto; right: auto; bottom: auto; left: auto; z-index: auto; width: 100%; margin: 0 !important; padding: 0 !important; overflow: hidden;}.film_roll_shuttle {text-align: left; float: none; position: absolute; top: 0; left:0; right: auto; bottom: auto; margin: 0 !important; padding: 0 !important; z-index: auto;}.film_roll_child {position:relative; display:inline-block; *display:inline; vertical-align:middle; zoom:1;}.film_roll_prev, .film_roll_next {position:absolute; top:48%; left:15px; width:40px; height:40px; margin:-20px 0 0 0; padding:0; font-size:60px; font-weight:100; line-height:30px; color:white; text-align: center; background: #222; border: 3px solid white; border-radius:23px; opacity:0.5}.film_roll_prev:hover, .film_roll_next:hover {color:white; text-decoration:none; opacity:0.9}.film_roll_next {left:auto; right:15px}.film_roll_pager {text-align:center}.film_roll_pager a {width:5px; height:5px; border:2px solid #333; border-radius:5px; display:inline-block; margin:0 5px 0 0; transition: all 1s ease}.film_roll_pager a:hover {background: #666}.film_roll_pager a.active {background: #333}.film_roll_pager span {display:none}      </style>").appendTo("head");document.film_roll_styles_added=!0}if(this.options.pager!==!1){this.pager=jQuery('<div class="film_roll_pager">');this.div.append(this.pager);this.children.each(function(e,t){var r;r=jQuery("<a href='#' data-id='"+t.id+"'><span>"+(e+1)+"</span></a>");n.pager.append(r);return r.click(function(){n.index=e;n.moveToIndex(n.index,"best",!0);return!1})})}this.pager_links=this.div.find(".film_roll_pager a");this.mouse_catcher=jQuery('<div style="position:absolute; top:0; left: 0; height: 100%; width: 100%;" class="film_roll_mouse_catcher"></div>');this.mouse_catcher.appendTo(this.wrapper).mousemove(function(e){n.clearScroll();return n.mouse_catcher.remove()});e=null;this.children.each(function(e,t){var r;r=jQuery(t);r.attr("data-film-roll-child-id",e);r.addClass("film_roll_child");return n.rotation.push(t)});if(this.options.prev&&this.options.next){this.prev=jQuery(this.options.prev);this.next=jQuery(this.options.next)}else{this.wrapper.append('<a class="film_roll_prev" href="#">&lsaquo;</a>');this.wrapper.append('<a class="film_roll_next" href="#">&rsaquo;</a>');this.prev=this.div.find(".film_roll_prev");this.next=this.div.find(".film_roll_next")}this.prev.click(function(){return n.moveRight()});this.next.click(function(){return n.moveLeft()});this.index=this.options.start_index||0;this.interval=this.options.interval||4e3;this.animation=this.options.animation||this.interval/4;jQuery(window).resize(function(){return n.resize()});jQuery(window).load(function(){n.configureWidths();n.moveToIndex(n.index,"right",!0);if(n.options.scroll!==!1){n.configureScroll();return n.configureHover()}});this.div.trigger(jQuery.Event("film_roll:dom_ready"));return this};t.prototype.bestDirection=function(e,t){t||(t=jQuery.inArray(e,this.rotation));return t<this.children.length/2?"right":"left"};t.prototype.configureHover=function(){this.div.hover(this.clearScroll,this.configureScroll);if(this.options.prev&&this.options.next){this.prev.hover(this.clearScroll,this.configureScroll);return this.next.hover(this.clearScroll,this.configureScroll)}};t.prototype.configureWidths=function(){var e,t=this;this.div.trigger(jQuery.Event("film_roll:before_loaded"));this.width=e=0;this.children.each(function(n,r){var i,s;i=jQuery(r);t.width+=i.outerWidth(!0);s=i.outerHeight(!0);if(s>e)return e=s});this.options.height||(this.height=e);this.wrapper.height(this.height);this.shuttle.height(this.height);this.real_width=this.width;this.shuttle.width(this.real_width*2);return this};t.prototype.configureScroll=function(){var e=this;if(this.scrolled!==!0){this.timer=setInterval(function(){return e.moveLeft()},this.interval);this.scrolled=!0}return this};t.prototype.clearScroll=function(){if(this.scrolled!==!1){clearInterval(this.timer);this.scrolled=!1}return this};t.prototype.marginLeft=function(e,t){var n,r,i,s,o,u;t==null&&(t=0);i=0;u=this.rotation;for(r=s=0,o=u.length;s<o;r=++s){n=u[r];r<e&&r>=t&&(i+=jQuery(n).outerWidth(!0))}return i};t.prototype.marginRight=function(e,t){var n,r,i,s,o,u;t==null&&(t=0);t=this.rotation.length-t-1;i=0;u=this.rotation;for(r=s=0,o=u.length;s<o;r=++s){n=u[r];r>e&&r<=t&&(i+=jQuery(n).outerWidth(!0))}return i};t.prototype.moveLeft=function(){this.index=(this.index+1)%this.children.length;this.moveToIndex(this.index,"left",!0);return!1};t.prototype.moveRight=function(){this.index-=1;this.index<0&&(this.index=this.children.length-1);this.moveToIndex(this.index,"right",!0);return!1};t.prototype.moveToChild=function(e){var t;t=jQuery.inArray(jQuery(e)[0],this.children);if(t>-1)return this.moveToIndex(t)};t.prototype.moveToIndex=function(e,t,n){var r,i,s,o,u,a=this;n==null&&(n=!0);this.index=e;this.clearScroll();r=this.children[e];s=jQuery.inArray(r,this.rotation);if(t===null||t==="best")t=this.bestDirection(r,s);this.children.removeClass("active");jQuery(r).addClass("active").trigger(jQuery.Event("film_roll:activate"));this.pager_links.removeClass("active");jQuery(this.pager_links[e]).addClass("active");u=this.wrapper.width();if(u<this.real_width){o=(u-jQuery(r).outerWidth(!0))/2;if(t==="right")while(s===0||this.marginLeft(s)<o){this.rotateRight();s=jQuery.inArray(r,this.rotation)}else while(s===this.children.length-1||this.marginRight(s)<o){this.rotateLeft();s=jQuery.inArray(r,this.rotation)}i=-1*(this.marginLeft(s)-o);if(n)this.shuttle.stop().animate({left:i},this.animation,"swing",function(){return a.div.trigger(jQuery.Event("film_roll:moved"))});else{this.shuttle.css("left",i);this.div.trigger(jQuery.Event("film_roll:moved"))}}else this.shuttle.css("left",(u-this.width)/2);this.options.scroll!==!1&&this.configureScroll();return this};t.prototype.resize=function(){var e=this;this.clearScroll();clearTimeout(this.resize_timer);this.resize_timer=setTimeout(function(){e.options.scroll!==!1&&e.configureScroll();e.moveToIndex(e.index,"left");return e.div.trigger(jQuery.Event("film_roll:resized"))},200);return this};t.prototype.rotateLeft=function(){var e,t,n;e=this.shuttle.css("left");n=e?parseInt(e,10):0;t=this.rotation.shift();this.rotation.push(t);this.shuttle.css("left",n+jQuery(t).outerWidth(!0));return this.shuttle.append(this.shuttle.children().first().detach())};t.prototype.rotateRight=function(){var e,t,n;e=this.shuttle.css("left");n=e?parseInt(e,10):0;t=this.rotation.pop();this.rotation.unshift(t);this.shuttle.css("left",n-jQuery(t).outerWidth(!0));return this.shuttle.prepend(this.shuttle.children().last().detach())};return t}()}).call(this);<commit_msg>Fix null direction arg<commit_after>// Generated by CoffeeScript 1.6.3
/*
  FilmRoll (for jQuery)
  version: 0.1.5 (10/22/13)
  @requires jQuery >= v1.4

  By <NAME>
  Examples at http://straydogstudio.github.io/film_roll

  Licensed under the MIT:
    http://www.opensource.org/licenses/mit-license.php

  Usage:
    var film_troll = new FilmRoll({container: '#container_id', OPTIONS});
*/(function(){var e=function(e,t){return function(){return e.apply(t,arguments)}};this.FilmRoll=function(){function t(t){this.options=t!=null?t:{};this.rotateRight=e(this.rotateRight,this);this.rotateLeft=e(this.rotateLeft,this);this.moveRight=e(this.moveRight,this);this.moveLeft=e(this.moveLeft,this);this.clearScroll=e(this.clearScroll,this);this.configureScroll=e(this.configureScroll,this);this.configureWidths=e(this.configureWidths,this);this.configureHover=e(this.configureHover,this);if(this.options.container){this.div=jQuery(this.options.container);this.div.length&&this.configure()}}t.prototype.configure=function(){var e,t,n=this;this.children=this.div.children();this.children.wrapAll('<div class="film_roll_wrapper"></div>');this.children.wrapAll('<div class="film_roll_shuttle"></div>');this.wrapper=this.div.find(".film_roll_wrapper");this.shuttle=this.div.find(".film_roll_shuttle");this.rotation=[];t=this.options.shuttle_width?parseInt(this.options.shuttle_width,10):1e4;this.shuttle.width(t);this.height=this.options.height?parseInt(this.options.height,10):0;this.wrapper.height(this.height);this.shuttle.height(this.height);if(this.options.no_css!==!0&&!document.film_roll_styles_added){jQuery("<style type='text/css'>.film_roll_wrapper {display: block; text-align: center; float: none; position: relative; top: auto; right: auto; bottom: auto; left: auto; z-index: auto; width: 100%; margin: 0 !important; padding: 0 !important; overflow: hidden;}.film_roll_shuttle {text-align: left; float: none; position: absolute; top: 0; left:0; right: auto; bottom: auto; margin: 0 !important; padding: 0 !important; z-index: auto;}.film_roll_child {position:relative; display:inline-block; *display:inline; vertical-align:middle; zoom:1;}.film_roll_prev, .film_roll_next {position:absolute; top:48%; left:15px; width:40px; height:40px; margin:-20px 0 0 0; padding:0; font-size:60px; font-weight:100; line-height:30px; color:white; text-align: center; background: #222; border: 3px solid white; border-radius:23px; opacity:0.5}.film_roll_prev:hover, .film_roll_next:hover {color:white; text-decoration:none; opacity:0.9}.film_roll_next {left:auto; right:15px}.film_roll_pager {text-align:center}.film_roll_pager a {width:5px; height:5px; border:2px solid #333; border-radius:5px; display:inline-block; margin:0 5px 0 0; transition: all 1s ease}.film_roll_pager a:hover {background: #666}.film_roll_pager a.active {background: #333}.film_roll_pager span {display:none}      </style>").appendTo("head");document.film_roll_styles_added=!0}if(this.options.pager!==!1){this.pager=jQuery('<div class="film_roll_pager">');this.div.append(this.pager);this.children.each(function(e,t){var r;r=jQuery("<a href='#' data-id='"+t.id+"'><span>"+(e+1)+"</span></a>");n.pager.append(r);return r.click(function(){n.index=e;n.moveToIndex(n.index,"best",!0);return!1})})}this.pager_links=this.div.find(".film_roll_pager a");this.mouse_catcher=jQuery('<div style="position:absolute; top:0; left: 0; height: 100%; width: 100%;" class="film_roll_mouse_catcher"></div>');this.mouse_catcher.appendTo(this.wrapper).mousemove(function(e){n.clearScroll();return n.mouse_catcher.remove()});e=null;this.children.each(function(e,t){var r;r=jQuery(t);r.attr("data-film-roll-child-id",e);r.addClass("film_roll_child");return n.rotation.push(t)});if(this.options.prev&&this.options.next){this.prev=jQuery(this.options.prev);this.next=jQuery(this.options.next)}else{this.wrapper.append('<a class="film_roll_prev" href="#">&lsaquo;</a>');this.wrapper.append('<a class="film_roll_next" href="#">&rsaquo;</a>');this.prev=this.div.find(".film_roll_prev");this.next=this.div.find(".film_roll_next")}this.prev.click(function(){return n.moveRight()});this.next.click(function(){return n.moveLeft()});this.index=this.options.start_index||0;this.interval=this.options.interval||4e3;this.animation=this.options.animation||this.interval/4;jQuery(window).resize(function(){return n.resize()});jQuery(window).load(function(){n.configureWidths();n.moveToIndex(n.index,"right",!0);if(n.options.scroll!==!1){n.configureScroll();return n.configureHover()}});this.div.trigger(jQuery.Event("film_roll:dom_ready"));return this};t.prototype.bestDirection=function(e,t){t||(t=jQuery.inArray(e,this.rotation));return t<this.children.length/2?"right":"left"};t.prototype.configureHover=function(){this.div.hover(this.clearScroll,this.configureScroll);if(this.options.prev&&this.options.next){this.prev.hover(this.clearScroll,this.configureScroll);return this.next.hover(this.clearScroll,this.configureScroll)}};t.prototype.configureWidths=function(){var e=this;this.div.trigger(jQuery.Event("film_roll:before_loaded"));this.width=0;this.children.each(function(t,n){var r,i;r=jQuery(n);e.width+=r.outerWidth(!0);if(!e.options.height){i=r.outerHeight(!0);if(i>e.height)return e.height=i}});this.wrapper.height(this.height);this.shuttle.height(this.height);this.real_width=this.width;this.shuttle.width(this.real_width*2);return this};t.prototype.configureScroll=function(){var e=this;if(this.scrolled!==!0){this.timer=setInterval(function(){return e.moveLeft()},this.interval);this.scrolled=!0}return this};t.prototype.clearScroll=function(){if(this.scrolled!==!1){clearInterval(this.timer);this.scrolled=!1}return this};t.prototype.marginLeft=function(e,t){var n,r,i,s,o,u;t==null&&(t=0);i=0;u=this.rotation;for(r=s=0,o=u.length;s<o;r=++s){n=u[r];r<e&&r>=t&&(i+=jQuery(n).outerWidth(!0))}return i};t.prototype.marginRight=function(e,t){var n,r,i,s,o,u;t==null&&(t=0);t=this.rotation.length-t-1;i=0;u=this.rotation;for(r=s=0,o=u.length;s<o;r=++s){n=u[r];r>e&&r<=t&&(i+=jQuery(n).outerWidth(!0))}return i};t.prototype.moveLeft=function(){this.index=(this.index+1)%this.children.length;this.moveToIndex(this.index,"left",!0);return!1};t.prototype.moveRight=function(){this.index-=1;this.index<0&&(this.index=this.children.length-1);this.moveToIndex(this.index,"right",!0);return!1};t.prototype.moveToChild=function(e){var t;t=jQuery.inArray(jQuery(e)[0],this.children);if(t>-1)return this.moveToIndex(t)};t.prototype.moveToIndex=function(e,t,n){var r,i,s,o,u,a=this;n==null&&(n=!0);this.index=e;this.clearScroll();r=this.children[e];s=jQuery.inArray(r,this.rotation);if(!t||t==="best")t=this.bestDirection(r,s);this.children.removeClass("active");jQuery(r).addClass("active").trigger(jQuery.Event("film_roll:activate"));this.pager_links.removeClass("active");jQuery(this.pager_links[e]).addClass("active");u=this.wrapper.width();if(u<this.real_width){o=(u-jQuery(r).outerWidth(!0))/2;if(t==="right")while(s===0||this.marginLeft(s)<o){this.rotateRight();s=jQuery.inArray(r,this.rotation)}else while(s===this.children.length-1||this.marginRight(s)<o){this.rotateLeft();s=jQuery.inArray(r,this.rotation)}i=-1*(this.marginLeft(s)-o);if(n)this.shuttle.stop().animate({left:i},this.animation,"swing",function(){return a.div.trigger(jQuery.Event("film_roll:moved"))});else{this.shuttle.css("left",i);this.div.trigger(jQuery.Event("film_roll:moved"))}}else this.shuttle.css("left",(u-this.width)/2);this.options.scroll!==!1&&this.configureScroll();return this};t.prototype.resize=function(){var e=this;this.clearScroll();clearTimeout(this.resize_timer);this.resize_timer=setTimeout(function(){e.options.scroll!==!1&&e.configureScroll();e.moveToIndex(e.index,"left");return e.div.trigger(jQuery.Event("film_roll:resized"))},200);return this};t.prototype.rotateLeft=function(){var e,t,n;e=this.shuttle.css("left");n=e?parseInt(e,10):0;t=this.rotation.shift();this.rotation.push(t);this.shuttle.css("left",n+jQuery(t).outerWidth(!0));return this.shuttle.append(this.shuttle.children().first().detach())};t.prototype.rotateRight=function(){var e,t,n;e=this.shuttle.css("left");n=e?parseInt(e,10):0;t=this.rotation.pop();this.rotation.unshift(t);this.shuttle.css("left",n-jQuery(t).outerWidth(!0));return this.shuttle.prepend(this.shuttle.children().last().detach())};return t}()}).call(this);
{'fraction_non_alphanumeric': 0.21806816132716234, 'fraction_numerical': 0.018032097132896555, 'mean_word_length': 11.407158836689039, 'pattern_counts': {'":': 2, '<': 57, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6508796', 'n_tokens_mistral': 6132, 'n_tokens_neox': 5963, 'n_words': 416}