<commit_before>/*!
 * MiniBar 0.1.0
 * http://mobius.ovh/
 *
 * Released under the MIT license
 */
!function(t){"use strict";function e(t,e,o){var s;return function(){var i=this,n=arguments,r=function(){s=null,o||t.apply(i,n)},c=o&&!s;clearTimeout(s),s=setTimeout(r,e),c&&t.apply(i,n)}}var o={barType:"default",minBarSize:10,alwaysShowBars:!1,containerClass:"mb-container",contentClass:"mb-content",trackClass:"mb-track",barClass:"mb-bar",visibleClass:"mb-visible",progressClass:"mb-progress"},s=function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(t),s=1;s<arguments.length;s++){var i=arguments[s];if(null!=i)for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(o[n]=i[n])}return o},i=function(t,e,o){if("[object Object]"===Object.prototype.toString.call(t))for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.call(o,s,t[s]);else for(var i=0,n=t.length;i<n;i++)e.call(o,i,t[i])},n=function(t,e,o){t.addEventListener(e,o,!1)},r=function(t,e,o){t.removeEventListener(e,o)},c=function(t,e,o){var s=t&&t.style,n="[object Object]"===Object.prototype.toString.call(e);if(s){if(void 0===o&&!n)return o=window.getComputedStyle(t),void 0===e?o:o[e];n?i(e,function(t,e){t in s||(t="-webkit-"+t),s[t]=e+("string"==typeof e?"":"opacity"===t?"":"px")}):(e in s||(e="-webkit-"+e),s[e]=o+("string"==typeof o?"":"opacity"===e?"":"px"))}},a=function(t){var e=window,o=document,s=o.body,i=t.getBoundingClientRect(),n=void 0!==e.pageXOffset?e.pageXOffset:(o.documentElement||s.parentNode||s).scrollLeft,r=void 0!==e.pageYOffset?e.pageYOffset:(o.documentElement||s.parentNode||s).scrollTop;return{x:i.left+n,y:i.top+r,height:Math.round(i.height),width:Math.round(i.width)}},l=window.requestAnimationFrame||function(){var t=0;return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){var o,s=(new Date).getTime();return o=Math.max(0,16-(s-t)),t=s+o,setTimeout(function(){e(s+o)},o)}}(),u=function(){var t=0,e=document.createElement("div");return e.style.cssText="width: 100; height: 100; overflow: scroll; position: absolute; top: -9999;",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e),t},h=function(t,i){this.container=t,"string"==typeof content&&(this.container=document.querySelector(t)),this.config=s({},o,i||window.MiniBarOptions||{}),this.css=window.getComputedStyle(this.container),this.scrollbarSize=u(),this.bars={x:{},y:{}},this.tracks={x:{},y:{}},this.trackPos={x:"left",y:"top"},this.trackSize={x:"width",y:"height"},this.scrollPos={x:"scrollLeft",y:"scrollTop"},this.scrollSize={x:"scrollWidth",y:"scrollHeight"},this.offsetAxis={x:"offsetX",y:"offsetY"},this.mouseAxis={x:"pageX",y:"pageY"},this.events={update:this.update.bind(this),scroll:this.scroll.bind(this),mouseenter:this.mouseenter.bind(this),mousedown:this.mousedown.bind(this),mousemove:this.mousemove.bind(this),mouseup:this.mouseup.bind(this)},this.events.debounce=e(this.events.update,50),this.init()};h.prototype.init=function(){var t=this;for(t.container.classList.add(t.config.containerClass),t.content=document.createElement("div"),t.content.classList.add(t.config.contentClass),t.config.alwaysShowBars&&t.container.classList.add(t.config.visibleClass);t.container.firstChild;)t.content.appendChild(t.container.firstChild);i(t.tracks,function(e,o){t.bars[e].node=document.createElement("div"),o.node=document.createElement("div"),o.node.classList.add(t.config.trackClass,t.config.trackClass+"-"+e),t.bars[e].node.classList.add(t.config.barClass),o.node.appendChild(t.bars[e].node),t.container.appendChild(o.node),"progress"===t.config.barType?(o.node.classList.add(t.config.progressClass),n(o.node,"mousedown",t.events.mousedown)):n(t.bars[e].node,"mousedown",t.events.mousedown)}),t.container.appendChild(t.content),t.container.style.position="static"===t.css.position?"relative":t.css.position,t.update(),n(t.content,"scroll",t.events.scroll),n(t.container,"mouseenter",t.events.mouseenter),n(window,"resize",t.events.debounce),n(document,"DOMContentLoaded",t.events.update),n(window,"load",t.events.update)},h.prototype.scroll=function(){this.updateScrollBars()},h.prototype.mouseenter=function(){this.updateScrollBars()},h.prototype.mousedown=function(t){t.preventDefault();var e="progress"===this.config.barType?"tracks":"bars",o=t.target===this[e].x.node?"x":"y";this.currentAxis=o,this.update(),this.container.classList.add(this.config.visibleClass),"progress"===this.config.barType?(this.origin={x:t.pageX-this.tracks[o].x,y:t.pageY-this.tracks[o].y},this.mousemove(t)):this.origin={x:t.pageX-this.bars[o].x,y:t.pageY-this.bars[o].y},n(document,"mousemove",this.events.mousemove),n(document,"mouseup",this.events.mouseup)},h.prototype.mousemove=function(t){t.preventDefault();var e,o,s=this,i=this.origin,n=s.tracks[s.currentAxis],r=n[s.trackSize[s.currentAxis]],c=s.rect[s.trackSize[s.currentAxis]];"progress"===s.config.barType?(e=t[s.mouseAxis[s.currentAxis]]-n[s.currentAxis],o=e/r*(s.content[s.scrollSize[s.currentAxis]]-c)):(e=t[s.mouseAxis[s.currentAxis]]-i[s.currentAxis]-n[s.currentAxis],o=e/r*s[s.scrollSize[s.currentAxis]]),l(function(){s.content[s.scrollPos[s.currentAxis]]=o})},h.prototype.mouseup=function(){this.origin={},this.currentAxis=null,this.container.classList.toggle(this.config.visibleClass,this.config.alwaysShowBars),r(document,"mousemove",this.events.mousemove),r(document,"mouseup",this.events.mouseup)},h.prototype.update=function(){var t=this;this.rect=a(this.container),this.scrollTop=this.content.scrollTop,this.scrollLeft=this.content.scrollLeft,this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth;var e=this.scrollWidth>this.rect.width,o=this.scrollHeight>this.rect.height;this.container.classList.toggle("mb-scroll-x",e),this.container.classList.toggle("mb-scroll-y",o),c(this.content,{overflow:"auto",marginBottom:e?-this.scrollbarSize:"",paddingBottom:e?this.scrollbarSize:"",marginRight:o?-this.scrollbarSize:"",paddingRight:o?this.scrollbarSize:""}),this.scrollX=e,this.scrollY=o,i(this.tracks,function(e,o){s(o,a(o.node)),s(t.bars[e],a(t.bars[e].node))}),this.updateScrollBars()},h.prototype.updateScrollBar=function(t){var e=this,o={},s=e.tracks[t][e.trackSize[t]],i=e.rect[e.trackSize[t]],n=e.content[e.scrollPos[t]],r=s/e[e.scrollSize[t]],a=n/(e[e.scrollSize[t]]-i);"progress"===e.config.barType?o[e.trackSize[t]]=Math.floor(s*a):(o[e.trackSize[t]]=Math.max(Math.floor(r*i),e.config.minBarSize),o[e.trackPos[t]]=Math.floor((s-o[e.trackSize[t]])*a)),l(function(){c(e.bars[t].node,o)})},h.prototype.updateScrollBars=function(){i(this.bars,function(t,e){this.updateScrollBar(t)},this)},h.prototype.destroy=function(){var t=this;for(r(t.container,"mouseenter",t.events.mouseenter),r(window,"resize",t.events.debounce),t.container.classList.remove(t.config.visibleClass),t.container.classList.remove(t.config.containerClass);t.content.firstChild;)t.container.appendChild(t.content.firstChild);i(t.tracks,function(e,o){t.container.removeChild(o.node),t.container.classList.remove("mb-scroll-"+e)}),t.container.removeChild(t.content),t.bars={x:{},y:{}},t.tracks={x:{},y:{}},t.content=null},t.MiniBar=h}(this);<commit_msg>Update minibar.min.js<commit_after>/*!
 * MiniBar 0.1.1
 * http://mobius.ovh/
 *
 * Released under the MIT license
 */
!function(t){"use strict";function e(t,e,o){var s;return function(){var i=this,n=arguments,r=function(){s=null,o||t.apply(i,n)},c=o&&!s;clearTimeout(s),s=setTimeout(r,e),c&&t.apply(i,n)}}var o={barType:"default",minBarSize:10,alwaysShowBars:!1,containerClass:"mb-container",contentClass:"mb-content",trackClass:"mb-track",barClass:"mb-bar",visibleClass:"mb-visible",progressClass:"mb-progress"},s=function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(t),s=1;s<arguments.length;s++){var i=arguments[s];if(null!=i)for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(o[n]=i[n])}return o},i=function(t,e,o){if("[object Object]"===Object.prototype.toString.call(t))for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.call(o,s,t[s]);else for(var i=0,n=t.length;i<n;i++)e.call(o,i,t[i])},n=function(t,e,o){t.addEventListener(e,o,!1)},r=function(t,e,o){t.removeEventListener(e,o)},c=function(t,e,o){var s=t&&t.style,n="[object Object]"===Object.prototype.toString.call(e);if(s){if(void 0===o&&!n)return o=window.getComputedStyle(t),void 0===e?o:o[e];n?i(e,function(t,e){t in s||(t="-webkit-"+t),s[t]=e+("string"==typeof e?"":"opacity"===t?"":"px")}):(e in s||(e="-webkit-"+e),s[e]=o+("string"==typeof o?"":"opacity"===e?"":"px"))}},a=function(t){var e=window,o=document,s=o.body,i=t.getBoundingClientRect(),n=void 0!==e.pageXOffset?e.pageXOffset:(o.documentElement||s.parentNode||s).scrollLeft,r=void 0!==e.pageYOffset?e.pageYOffset:(o.documentElement||s.parentNode||s).scrollTop;return{x:i.left+n,y:i.top+r,height:Math.round(i.height),width:Math.round(i.width)}},l=window.requestAnimationFrame||function(){var t=0;return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){var o,s=(new Date).getTime();return o=Math.max(0,16-(s-t)),t=s+o,setTimeout(function(){e(s+o)},o)}}(),u=function(){var t=0,e=document.createElement("div");return e.style.cssText="width: 100; height: 100; overflow: scroll; position: absolute; top: -9999;",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e),t},h=function(t,i){this.container=t,"string"==typeof content&&(this.container=document.querySelector(t)),this.config=s({},o,i||window.MiniBarOptions||{}),this.css=window.getComputedStyle(this.container),this.scrollbarSize=u(),this.bars={x:{},y:{}},this.tracks={x:{},y:{}},this.trackPos={x:"left",y:"top"},this.trackSize={x:"width",y:"height"},this.scrollPos={x:"scrollLeft",y:"scrollTop"},this.scrollSize={x:"scrollWidth",y:"scrollHeight"},this.offsetAxis={x:"offsetX",y:"offsetY"},this.mouseAxis={x:"pageX",y:"pageY"},this.events={update:this.update.bind(this),scroll:this.scroll.bind(this),mouseenter:this.mouseenter.bind(this),mousedown:this.mousedown.bind(this),mousemove:this.mousemove.bind(this),mouseup:this.mouseup.bind(this)},this.events.debounce=e(this.events.update,50),this.init()};h.prototype.init=function(){var t=this;for(t.container.classList.add(t.config.containerClass),t.content=document.createElement("div"),t.content.classList.add(t.config.contentClass),t.config.alwaysShowBars&&t.container.classList.add(t.config.visibleClass);t.container.firstChild;)t.content.appendChild(t.container.firstChild);i(t.tracks,function(e,o){t.bars[e].node=document.createElement("div"),o.node=document.createElement("div"),o.node.classList.add(t.config.trackClass,t.config.trackClass+"-"+e),t.bars[e].node.classList.add(t.config.barClass),o.node.appendChild(t.bars[e].node),t.container.appendChild(o.node),"progress"===t.config.barType?(o.node.classList.add(t.config.progressClass),n(o.node,"mousedown",t.events.mousedown)):n(t.bars[e].node,"mousedown",t.events.mousedown)}),t.container.appendChild(t.content),t.container.style.position="static"===t.css.position?"relative":t.css.position,t.update(),n(t.content,"scroll",t.events.scroll),n(t.container,"mouseenter",t.events.mouseenter),n(window,"resize",t.events.debounce),n(document,"DOMContentLoaded",t.events.update),n(window,"load",t.events.update)},h.prototype.scroll=function(){this.updateScrollBars()},h.prototype.mouseenter=function(){this.updateScrollBars()},h.prototype.mousedown=function(t){t.preventDefault();var e="progress"===this.config.barType?"tracks":"bars",o=t.target===this[e].x.node?"x":"y";this.currentAxis=o,this.update(),this.container.classList.add(this.config.visibleClass),"progress"===this.config.barType?(this.origin={x:t.pageX-this.tracks[o].x,y:t.pageY-this.tracks[o].y},this.mousemove(t)):this.origin={x:t.pageX-this.bars[o].x,y:t.pageY-this.bars[o].y},n(document,"mousemove",this.events.mousemove),n(document,"mouseup",this.events.mouseup)},h.prototype.mousemove=function(t){t.preventDefault();var e,o,s=this,i=this.origin,n=s.tracks[s.currentAxis],r=n[s.trackSize[s.currentAxis]],c=s.rect[s.trackSize[s.currentAxis]];"progress"===s.config.barType?(e=t[s.mouseAxis[s.currentAxis]]-n[s.currentAxis],o=e/r*(s.content[s.scrollSize[s.currentAxis]]-c)):(e=t[s.mouseAxis[s.currentAxis]]-i[s.currentAxis]-n[s.currentAxis],o=e/r*s[s.scrollSize[s.currentAxis]]),l(function(){s.content[s.scrollPos[s.currentAxis]]=o})},h.prototype.mouseup=function(){this.origin={},this.currentAxis=null,this.container.classList.toggle(this.config.visibleClass,this.config.alwaysShowBars),r(document,"mousemove",this.events.mousemove),r(document,"mouseup",this.events.mouseup)},h.prototype.update=function(){var t=this;this.rect=a(this.container),this.scrollTop=this.content.scrollTop,this.scrollLeft=this.content.scrollLeft,this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth;var e=this.scrollWidth>this.rect.width,o=this.scrollHeight>this.rect.height;this.container.classList.toggle("mb-scroll-x",e),this.container.classList.toggle("mb-scroll-y",o),c(this.content,{overflow:"auto",marginBottom:e?-this.scrollbarSize:"",paddingBottom:e?this.scrollbarSize:"",marginRight:o?-this.scrollbarSize:"",paddingRight:o?this.scrollbarSize:""}),this.scrollX=e,this.scrollY=o,i(this.tracks,function(e,o){s(o,a(o.node)),s(t.bars[e],a(t.bars[e].node))}),this.updateScrollBars()},h.prototype.updateScrollBar=function(t){var e=this,o={},s=e.tracks[t][e.trackSize[t]],i=e.rect[e.trackSize[t]],n=e.content[e.scrollPos[t]],r=s/e[e.scrollSize[t]],a=n/(e[e.scrollSize[t]]-i);"progress"===e.config.barType?o[e.trackSize[t]]=Math.floor(s*a):(o[e.trackSize[t]]=Math.max(Math.floor(r*i),e.config.minBarSize),o[e.trackPos[t]]=Math.floor((s-o[e.trackSize[t]])*a)),l(function(){c(e.bars[t].node,o)})},h.prototype.updateScrollBars=function(){i(this.bars,function(t,e){this.updateScrollBar(t)},this)},h.prototype.destroy=function(){var t=this;for(r(t.container,"mouseenter",t.events.mouseenter),r(window,"resize",t.events.debounce),t.container.classList.remove(t.config.visibleClass),t.container.classList.remove(t.config.containerClass);t.content.firstChild;)t.container.appendChild(t.content.firstChild);i(t.tracks,function(e,o){t.container.removeChild(o.node),t.container.classList.remove("mb-scroll-"+e)}),t.container.removeChild(t.content),t.bars={x:{},y:{}},t.tracks={x:{},y:{}},t.content=null},t.MiniBar=h}(this);
{'fraction_non_alphanumeric': 0.24229808492922564, 'fraction_numerical': 0.004163197335553705, 'mean_word_length': 13.413, 'pattern_counts': {'":': 14, '<': 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': '614308', 'n_tokens_mistral': 5466, 'n_tokens_neox': 5409, 'n_words': 148}