<commit_before>/*!
 * responsiveCarousel
 * A responsive carousel that works in desktop browsers, ipad, iphone, and even
 * most Androids.  It uses css3 animations with a jquery animation fallback for
 * greater speed.  The code was optimized to minimize page reflows to further
 * enhance the overall speed.
 *
 * This is a jQuery UI Widget
 *
 * @version 0.2.0
 * @releaseDate 8/15/2012
 * @author <NAME>
 * @url https://github.com/mrbinky3000/responsive_carousel
 * @requires jQuery, jQuery UI (only the Core and Widget Factory), modernizr (only css3 transitions test), hammer.js
 */
(function(d,c,a,e){var b=false;d.widget("ri.responsiveCarousel",{options:{arrowLeft:".arrow-left a",arrowRight:".arrow-right a",target:".slider-target",mask:".slider-mask",unitElement:"li",unitWidth:"inherit",responsiveUnitSize:null,onRedraw:null,dragEvents:false,speed:400,slideSpeed:2500,step:-1,responsiveStep:null,onShift:null,cssAnimations:Modernizr.csstransitions},internal:{currentSlide:0,left:0,targetWidth:0,unitWidth:0,targetOuterWidth:0,targetOuterHeight:0,targetParentOuterWidth:0,targetParentInnerWidth:0,targetParentOuterHeight:0,targetParentMarginLeft:0,targetBackupCopy:null,isArrowBeingClicked:false,arrowLeftVisible:true,arrowRightVisible:true,targetLeft:0,timer:null,firstMouseClick:false,prefix:null,slideShowActive:false,slideTimer:null,slideBumped:false},wait:function(){var g,f=function(i,h){if("undefined"!==typeof g){c.clearTimeout(g);}g=c.setTimeout(i,h);};return{thenDo:function(i,h){f(i,h);}};},_getPrefix:function(k){var j=["Moz","Webkit","Khtml","0","ms"],i=a.createElement("div"),h=k.charAt(0).toUpperCase()+k.slice(1),g="";for(var f=j.length;f--;){if((j[f]+h) in i.style){g=(j[f]);}}if(k in i.style){g=(k);}return"-"+g.toLowerCase()+"-";},_animate:function(f,i,j,m,l){var h=this.options,g=this.internal,k=j&&typeof j==="object"?d.extend({},j):{complete:l||!l&&m||d.isFunction(j)&&j,duration:j,easing:l&&m||m&&!d.isFunction(m)&&m};return f.each(function(){var o=d(this),p=(k.easing)?p:"ease-in-out",n=(g.prefix);if(h.cssAnimations){o.css(n+"transition","all "+j/1000+"s ease-in-out").css(i);setTimeout(function(){o.css(n+"transition","");if(d.isFunction(k.complete)){k.complete();}},j);}else{o.animate(i,j,k);}});},_setTargetWidth:function(i){var g=this.internal,h=this.options,j=d(this.element),f=d(this.element).find(h.target);g.targetWidth=f.find(h.unitElement).length*g.unitWidth;j.find(h.target).width(g.targetWidth);g.targetOuterWidth=f.outerWidth();g.targetOuterHeight=f.outerHeight();g.targetParentOuterWidth=f.parent().outerWidth();g.targetParentInnerWidth=f.parent().innerWidth();g.targetParentOuterHeight=f.parent().outerHeight();g.targetParentMarginLeft=parseInt(f.parents().css("marginLeft"),10);},_setArrowVisibility:function(){var n=this.options,h=this.internal,g=d(this.element).find(n.target),f=g.position().left,m=h.targetOuterWidth+f,j=d(this.element).find(n.arrowLeft),l=d(this.element).find(n.arrowRight),k=0,i=h.targetParentOuterWidth;if(m<=i){l.hide();if(h.isArrowBeingClicked===true){this._clearInterval();}h.arrowRightVisible=h.isArrowBeingClicked=false;}else{if(false===h.arrowRightVisible){l.show();h.arrowRightVisible=true;}}if(f>=k){j.hide();if(h.isArrowBeingClicked===true){this._clearInterval();}h.arrowLeftVisible=h.isArrowBeingClicked=false;}else{if(false===h.arrowLeftVisible){j.show();h.arrowLeftVisible=true;}}h.currentSlide=Math.abs(f/h.unitWidth);if(d.isFunction(n.onShift)){n.onShift(h.currentSlide);}},_clearInterval:function(){var g=this.internal,h=this.options,f=d(this.element).find(h.target);if("number"===typeof g.timer){g.isArrowBeingClicked=false;c.clearInterval(g.timer);}if(false===b){b=true;this._animate(f,{left:this.computeAdjust(f)},h.speed,function(){b=false;});}},_doArrowBeingClicked:function(l){var k=this,g=this.internal,i=this.options,f=d(this.element).find(i.target),h=f.position().left,m=g.targetParentMarginLeft,j;if(b===true){return;}if("left"===l){if(i.dragEvents===true){j=h-m+10;}else{j=h-m+g.unitWidth;}}else{if("right"===l){if(i.dragEvents===true){j=h-m-10;}else{j=h-m-g.unitWidth;}}else{throw new Error("unknown direction");}}if(i.dragEvents===true){f.css({left:j});this._setArrowVisibility();}else{b=true;this._animate(f,{left:j},i.speed,function(){k._setArrowVisibility();b=false;});}},_setArrowEvents:function(){var m,j=this,n=this.options,h=this.internal,g=d(this.element).find(n.target),i=d(this.element).find(n.arrowLeft),l=d(this.element).find(n.arrowRight),k="",f="";i.on("click.simpslide",function(o){o.preventDefault();});l.on("click.simpslide",function(o){o.preventDefault();});if(n.dragEvents===true){k="mousedown.simpslide touchstart.simpslide";f="mouseup.simpslide touchend.simpslide";}else{k="mousedown.simpslide";f="mouseup.simpslide";}i.on(k,function(o){o.preventDefault();if(b===false){h.isArrowBeingClicked=h.firstMouseClick=true;h.timer=c.setInterval(function(){j._doArrowBeingClicked("left");},10);c.clearInterval(h.slideTimer);h.slideShowActive=false;}});l.on(k,function(o){if(b===false){h.isArrowBeingClicked=h.firstMouseClick=true;h.timer=c.setInterval(function(){j._doArrowBeingClicked("right");},10);c.clearInterval(h.slideTimer);h.slideShowActive=false;}});d(this.element).on(f,function(){if(h.isArrowBeingClicked===true){j._clearInterval();}});},_setUnitWidth:function(){var n,h,k=this,j=this.internal,q=this.options,f=d(this.element).find(q.target),p=d(this.element),g=f.find(q.unitElement).eq(0),i=new this.wait();var l=function(){j.unitWidth=g.outerWidth();};var o=function(){var m=p.find(q.mask).innerWidth();h=q.responsiveUnitSize(p,j,q);if("number"!==typeof h||h<1){throw new Error("The responsiveUnitSize callback must return a whole number greater than 0");}n=m/h;n=Math.floor(n);f.find(q.unitElement).css("width",n);j.unitWidth=n;};if(q.unitWidth==="inherit"){l();f.find("img").on("load.simpslide",function(){l();k._setTargetWidth("inherit");k._setArrowVisibility();if(d.isFunction(q.onRedraw)){q.onRedraw(p,j,q);}});}else{if(q.unitWidth==="compute"){l();if(d.isFunction(q.responsiveUnitSize)){o();l();}if(d.isFunction(q.onRedraw)){q.onRedraw(p,j,q);}f.find("img").on("load",function(){if(d.isFunction(q.responsiveUnitSize)){o();}l();k._setTargetWidth("compute");k._setArrowVisibility();if(d.isFunction(q.onRedraw)){q.onRedraw(p,j,q);}});d(c).on("resize.simpslide",function(){i.thenDo(function(){var m;if(d.isFunction(q.responsiveUnitSize)){o();}l();k._setTargetWidth("compute (window resize)");m=k.computeAdjust(f);f.css({left:m});k._setArrowVisibility();if(d.isFunction(q.onRedraw)){q.onRedraw(p,j,q);}},100);});}else{j.unitWidth=q.unitWidth;}}},_dragEvents:function(){var m=this,q=this.options,i=this.internal,g=d(this.element).find(q.target),p=g.parent(),n=g,o=new Hammer(p.get(0),{drag:true,drag_vertical:false,drag_horizontal:true,drag_min_distance:0,transform:false,tap:false,tap_double:false,hold:false}),j=new this.wait(),f={},h={},l={};var k=function(){return{top:parseInt(n.css("top"),10),left:parseInt(n.css("left"),10)};};o.ondragstart=function(){if(true===i.isArrowBeingClicked||true===b){return{};}b=true;f=k();f.time=new Date().getTime();h={width:i.targetParentOuterWidth,height:i.targetParentOuterHeight};l={width:i.targetOuterWidth,height:i.targetOuterHeight};};o.ondrag=function(r){if(true===i.isArrowBeingClicked){return;}var t=1,s;if(r.direction==="up"||r.direction==="left"){r.distance=0-r.distance;}s=f.left+r.distance*t;i.left=s;n.css("left",s);};o.ondragend=function(r){g.stop(true,false);m._animate(g,{left:m.computeAdjust(g)},q.speed,function(){m._setArrowVisibility();b=false;});};},_create:function(){var h=this.options,g=this.internal,i=d(this.element),f=d(this.element).find(h.target);this.internal.targetBackupCopy=this.element;if(this.options.cssAnimations){this.internal.prefix=this._getPrefix("transition");}f.css({position:"relative",left:0});if(h.dragEvents===true){this._dragEvents();}this._setArrowEvents();this._setUnitWidth();this._setTargetWidth("first load");this._setArrowVisibility();if(d.isFunction(h.onRedraw)){h.onRedraw(i,g,h);}},redraw:function(){var i=this,f=this.internal,g=this.options,h=d(this.element);this._setUnitWidth();this._setTargetWidth("_redraw");this._setArrowVisibility();if(d.isFunction(this.options.onRedraw)){i.options.onRedraw(h,f,g);}},getCurrentSlide:function(){return this.internal.currentSlide;},goToSlide:function(j){var l=this,g=this.internal,h=this.options,f=d(this.element).find(h.target),k;this._setUnitWidth();k=j*this.internal.unitWidth*-1;b=true;this._animate(f,{left:k},h.speed,function(){b=false;l._setArrowVisibility();});},toggleSlideShow:function(){var j=this,g=this.internal,h=this.options,f=d(this.element).find(h.target);var k=function(){if(true===g.slideShowActive){g.slideShowActive=false;c.clearInterval(g.slideTimer);}};var i=function(n){var p=g.targetParentInnerWidth,r=f.position().left,m=r+g.targetWidth,q=r+n*g.unitWidth,o=m+n*g.unitWidth,l=q;if(g.slideBumped===false){if(o<=p){l=q+p-o;g.slideBumped="left";}if(q>=0){g.slideBumped="right";l=0;}}else{if("left"===g.slideBumped){l=0;}if("right"===g.slideBumped){l=r+p-m;}g.slideBumped=false;}b=true;j._animate(f,{left:l},h.speed,function(){b=false;j._setArrowVisibility();});};if(false===g.slideShowActive){g.slideShowActive=true;g.slideTimer=c.setInterval(function(){i(h.step);},h.slideSpeed);}else{k();}},destroy:function(){d(c).unbind(".simpslide");d(this.element).find(this.options.arrowLeft).unbind(".simpslide");d(this.element).find(this.options.arrowRight).unbind(".simpslide");this.element=this.internal.targetBackupCopy;d.Widget.prototype.destroy.call(this);},computeAdjust:function(f){var k,h,g,l,i,j;i=this.internal.targetParentInnerWidth;k=f.position().left;h=k+this.internal.targetWidth;l=this.internal.unitWidth/-2;if(h<i){j=k+i-h;k=j;}if(k>0){k=j=0;}g=k%this.internal.unitWidth;if(g!==0){if(g<l){j=k-(this.internal.unitWidth+g);}if(g>l){j=f.position().left-g;}}return j;}});})(jQuery,window,document);<commit_msg>Updated minified version to latest version.<commit_after>/*!
 * responsiveCarousel
 * A responsive carousel that works in desktop browsers, ipad, iphone, and even
 * most Androids.  It uses css3 animations with a jquery animation fallback for
 * greater speed.  The code was optimized to minimize page reflows to further
 * enhance the overall speed.
 *
 * This is a jQuery UI Widget
 *
 * @version 0.2.0
 * @releaseDate 8/15/2012
 * @author <NAME>
 * @url https://github.com/mrbinky3000/responsive_carousel
 * @requires jQuery, jQuery UI (only the Core and Widget Factory), modernizr (only css3 transitions test), hammer.js
 */
;(function(d,c,a,e){var b=false;d.widget("ri.responsiveCarousel",{options:{arrowLeft:".arrow-left a",arrowRight:".arrow-right a",target:".slider-target",mask:".slider-mask",unitElement:"li",unitWidth:"inherit",responsiveUnitSize:null,onRedraw:null,dragEvents:false,speed:400,slideSpeed:2500,step:-1,responsiveStep:null,onShift:null,cssAnimations:Modernizr.csstransitions},internal:{currentSlide:0,left:0,targetWidth:0,unitWidth:0,targetOuterWidth:0,targetOuterHeight:0,targetParentOuterWidth:0,targetParentInnerWidth:0,targetParentOuterHeight:0,targetParentMarginLeft:0,targetBackupCopy:null,isArrowBeingClicked:false,arrowLeftVisible:true,arrowRightVisible:true,targetLeft:0,timer:null,firstMouseClick:false,prefix:null,slideShowActive:false,slideTimer:null,slideBumped:false},wait:function(){var g,f=function(i,h){if("undefined"!==typeof g){c.clearTimeout(g);}g=c.setTimeout(i,h);};return{thenDo:function(i,h){f(i,h);}};},_getPrefix:function(k){var j=["Moz","Webkit","Khtml","0","ms"],i=a.createElement("div"),h=k.charAt(0).toUpperCase()+k.slice(1),g="";for(var f=j.length;f--;){if((j[f]+h) in i.style){g=(j[f]);}}if(k in i.style){g=(k);}return"-"+g.toLowerCase()+"-";},_animate:function(f,i,j,m,l){var h=this.options,g=this.internal,k=j&&typeof j==="object"?d.extend({},j):{complete:l||!l&&m||d.isFunction(j)&&j,duration:j,easing:l&&m||m&&!d.isFunction(m)&&m};return f.each(function(){var o=d(this),p,n=(g.prefix);if(h.cssAnimations){p=(k.easing)?p:"ease-in-out";o.css(n+"transition","all "+j/1000+"s "+p).css(i);setTimeout(function(){o.css(n+"transition","");if(d.isFunction(k.complete)){k.complete();}},j);}else{k.easing="linear";o.animate(i,j,p,l);}});},_setTargetWidth:function(i){var g=this.internal,h=this.options,j=d(this.element),f=d(this.element).find(h.target);g.targetWidth=f.find(h.unitElement).length*g.unitWidth;j.find(h.target).width(g.targetWidth);g.targetOuterWidth=f.outerWidth();g.targetOuterHeight=f.outerHeight();g.targetParentOuterWidth=f.parent().outerWidth();g.targetParentInnerWidth=f.parent().innerWidth();g.targetParentOuterHeight=f.parent().outerHeight();g.targetParentMarginLeft=parseInt(f.parents().css("marginLeft"),10);},_setArrowVisibility:function(){var n=this.options,h=this.internal,g=d(this.element).find(n.target),f=g.position().left,m=h.targetOuterWidth+f,j=d(this.element).find(n.arrowLeft),l=d(this.element).find(n.arrowRight),k=0,i=h.targetParentOuterWidth;if(m<=i){l.hide();if(h.isArrowBeingClicked===true){this._clearInterval();}h.arrowRightVisible=h.isArrowBeingClicked=false;}else{if(false===h.arrowRightVisible){l.show();h.arrowRightVisible=true;}}if(f>=k){j.hide();if(h.isArrowBeingClicked===true){this._clearInterval();}h.arrowLeftVisible=h.isArrowBeingClicked=false;}else{if(false===h.arrowLeftVisible){j.show();h.arrowLeftVisible=true;}}h.currentSlide=Math.abs(f/h.unitWidth);if(d.isFunction(n.onShift)){n.onShift(h.currentSlide);}},_clearInterval:function(){var g=this.internal,h=this.options,f=d(this.element).find(h.target);if("number"===typeof g.timer){g.isArrowBeingClicked=false;c.clearInterval(g.timer);}if(false===b){b=true;this._animate(f,{left:this.computeAdjust(f)},h.speed,function(){b=false;});}},_doArrowBeingClicked:function(l){var k=this,g=this.internal,i=this.options,f=d(this.element).find(i.target),h=f.position().left,m=g.targetParentMarginLeft,j;if(b===true){return;}if("left"===l){if(i.dragEvents===true){j=h-m+10;}else{j=h-m+g.unitWidth;}}else{if("right"===l){if(i.dragEvents===true){j=h-m-10;}else{j=h-m-g.unitWidth;}}else{throw new Error("unknown direction");}}if(i.dragEvents===true){f.css({left:j});this._setArrowVisibility();}else{b=true;this._animate(f,{left:j},i.speed,function(){k._setArrowVisibility();b=false;});}},_setArrowEvents:function(){var m,j=this,n=this.options,h=this.internal,g=d(this.element).find(n.target),i=d(this.element).find(n.arrowLeft),l=d(this.element).find(n.arrowRight),k="",f="";i.on("click.simpslide",function(o){o.preventDefault();});l.on("click.simpslide",function(o){o.preventDefault();});if(n.dragEvents===true){k="mousedown.simpslide touchstart.simpslide";f="mouseup.simpslide touchend.simpslide";}else{k="mousedown.simpslide";f="mouseup.simpslide";}i.on(k,function(o){o.preventDefault();if(b===false){h.isArrowBeingClicked=h.firstMouseClick=true;h.timer=c.setInterval(function(){j._doArrowBeingClicked("left");},10);c.clearInterval(h.slideTimer);h.slideShowActive=false;}});l.on(k,function(o){if(b===false){h.isArrowBeingClicked=h.firstMouseClick=true;h.timer=c.setInterval(function(){j._doArrowBeingClicked("right");},10);c.clearInterval(h.slideTimer);h.slideShowActive=false;}});d(this.element).on(f,function(){if(h.isArrowBeingClicked===true){j._clearInterval();}});},_setUnitWidth:function(){var n,h,k=this,j=this.internal,q=this.options,f=d(this.element).find(q.target),p=d(this.element),g=f.find(q.unitElement).eq(0),i=new this.wait();var l=function(){j.unitWidth=g.outerWidth();};var o=function(){var m=p.find(q.mask).innerWidth();h=q.responsiveUnitSize(p,j,q);if("number"!==typeof h||h<1){throw new Error("The responsiveUnitSize callback must return a whole number greater than 0");}n=m/h;n=Math.floor(n);f.find(q.unitElement).css("width",n);j.unitWidth=n;};if(q.unitWidth==="inherit"){l();f.find("img").on("load.simpslide",function(){l();k._setTargetWidth("inherit");k._setArrowVisibility();if(d.isFunction(q.onRedraw)){q.onRedraw(p,j,q);}});}else{if(q.unitWidth==="compute"){l();if(d.isFunction(q.responsiveUnitSize)){o();l();}if(d.isFunction(q.onRedraw)){q.onRedraw(p,j,q);}f.find("img").on("load",function(){if(d.isFunction(q.responsiveUnitSize)){o();}l();k._setTargetWidth("compute");k._setArrowVisibility();if(d.isFunction(q.onRedraw)){q.onRedraw(p,j,q);}});d(c).on("resize.simpslide",function(){i.thenDo(function(){var m;if(d.isFunction(q.responsiveUnitSize)){o();}l();k._setTargetWidth("compute (window resize)");m=k.computeAdjust(f);f.css({left:m});k._setArrowVisibility();if(d.isFunction(q.onRedraw)){q.onRedraw(p,j,q);}},100);});}else{j.unitWidth=q.unitWidth;}}},_dragEvents:function(){var m=this,q=this.options,i=this.internal,g=d(this.element).find(q.target),p=g.parent(),n=g,o=new Hammer(p.get(0),{drag:true,drag_vertical:false,drag_horizontal:true,drag_min_distance:0,transform:false,tap:false,tap_double:false,hold:false}),j=new this.wait(),f={},h={},l={};var k=function(){return{top:parseInt(n.css("top"),10),left:parseInt(n.css("left"),10)};};o.ondragstart=function(){if(true===i.isArrowBeingClicked||true===b){return{};}b=true;f=k();f.time=new Date().getTime();h={width:i.targetParentOuterWidth,height:i.targetParentOuterHeight};l={width:i.targetOuterWidth,height:i.targetOuterHeight};};o.ondrag=function(r){if(true===i.isArrowBeingClicked){return;}var t=1,s;if(r.direction==="up"||r.direction==="left"){r.distance=0-r.distance;}s=f.left+r.distance*t;i.left=s;n.css("left",s);};o.ondragend=function(r){g.stop(true,false);m._animate(g,{left:m.computeAdjust(g)},q.speed,function(){m._setArrowVisibility();b=false;});};},_create:function(){var h=this.options,g=this.internal,i=d(this.element),f=d(this.element).find(h.target);this.internal.targetBackupCopy=this.element;if(this.options.cssAnimations){this.internal.prefix=this._getPrefix("transition");}f.css({position:"relative",left:0});if(h.dragEvents===true){this._dragEvents();}this._setArrowEvents();this._setUnitWidth();this._setTargetWidth("first load");this._setArrowVisibility();if(d.isFunction(h.onRedraw)){h.onRedraw(i,g,h);}},redraw:function(){var i=this,f=this.internal,g=this.options,h=d(this.element);this._setUnitWidth();this._setTargetWidth("_redraw");this._setArrowVisibility();if(d.isFunction(this.options.onRedraw)){i.options.onRedraw(h,f,g);}},getCurrentSlide:function(){return this.internal.currentSlide;},goToSlide:function(j){var l=this,g=this.internal,h=this.options,f=d(this.element).find(h.target),k;this._setUnitWidth();k=j*this.internal.unitWidth*-1;b=true;this._animate(f,{left:k},h.speed,function(){b=false;l._setArrowVisibility();});},toggleSlideShow:function(){var j=this,g=this.internal,h=this.options,f=d(this.element).find(h.target);var k=function(){if(true===g.slideShowActive){g.slideShowActive=false;c.clearInterval(g.slideTimer);}};var i=function(n){var p=g.targetParentInnerWidth,r=f.position().left,m=r+g.targetWidth,q=r+n*g.unitWidth,o=m+n*g.unitWidth,l=q;if(g.slideBumped===false){if(o<=p){l=q+p-o;g.slideBumped="left";}if(q>=0){g.slideBumped="right";l=0;}}else{if("left"===g.slideBumped){l=0;}if("right"===g.slideBumped){l=r+p-m;}g.slideBumped=false;}b=true;j._animate(f,{left:l},h.speed,function(){b=false;j._setArrowVisibility();});};if(false===g.slideShowActive){g.slideShowActive=true;g.slideTimer=c.setInterval(function(){i(h.step);},h.slideSpeed);}else{k();}},destroy:function(){d(c).unbind(".simpslide");d(this.element).find(this.options.arrowLeft).unbind(".simpslide");d(this.element).find(this.options.arrowRight).unbind(".simpslide");this.element=this.internal.targetBackupCopy;d.Widget.prototype.destroy.call(this);},computeAdjust:function(f){var k,h,g,l,i,j;i=this.internal.targetParentInnerWidth;k=f.position().left;h=k+this.internal.targetWidth;l=this.internal.unitWidth/-2;if(h<i){j=k+i-h;k=j;}if(k>0){k=j=0;}g=k%this.internal.unitWidth;if(g!==0){if(g<l){j=k-(this.internal.unitWidth+g);}if(g>l){j=f.position().left-g;}}return j;}});})(jQuery,window,document);
{'fraction_non_alphanumeric': 0.23722149410222804, 'fraction_numerical': 0.0076620627079342675, 'mean_word_length': 15.477574750830565, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '2068401', 'n_tokens_mistral': 7634, 'n_tokens_neox': 7553, 'n_words': 282}