<commit_before>;(function() {
	
function o_O() {};

/*                  _   _        
    _____ _____ _ _| |_(_)______ 
   / -_) V / -_) ' \  _| |_ / -_)
   \___|\_/\___|_||_\__|_/__\___|     */
 

(function(exports) {
	var methods	= {
		on	: function(event, fct){
			this._events = this._events || {};
			this._events[event] = this._events[event]	|| [];
			this._events[event].push(fct);
		},
		off	: function(event, fct){
			this._events = this._events || {};
			if( event in this._events === false  )	return;
			this._events[event].splice(this._events[event].indexOf(fct), 1);
		},
		once: function(event, fct) {
		  var fn = function() {
		    fct.apply(this, arguments)
		    this.off(event, fn)
		  }
		  this.on(event, fn)
		},
		emit	: function(event /* , args... */){
			this._events = this._events || {};
			if( event in this._events === false  )	return;
			for(var i = 0; i < this._events[event].length; i++){
				this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1))
			}
		}
	}

	o_O.eventize = function(o) {
		o.on = methods.on
		o.off = methods.off
		o.emit = methods.emit
		o.once = methods.once
	}
})()



/* 
 _    _         _ _           
| |__(_)_ _  __| (_)_ _  __ _ 
| '_ \ | ' \/ _` | | ' \/ _` |
|_.__/_|_||_\__,_|_|_||_\__, |
                        |___/    */

/** 
 *  o_O.bind will proxy to any method on a $ object
 *  but sometimes you want something more
 */

o_O.exten$ions = {
  /* set the class
   * usage: bind='class: myClass' 
   */
  'class': function(klass) {
    $(this).attr('class', klass)
  },
  /* Two-way binding to a form element
   * usage: bind='value: myProperty'
   */
  value: function(property) {
		var self = this;
		
		property.on('set', function(val) {
			$(self).val(val)
		})
		
    $(this).change(function(e) {    
      property( $(e.srcElement).val(), e)
    })

		property.rewrite()
  }
}

function trim(s) {
	return s.replace(/^\s+|\s+$/g, '')
}

o_O.bind = function(el, context) {
  var $el = $(el)
	context.el = $el[0]
	context.$ = $el
	
	function bind(k, v) {
   	var $$ = $(this)
		var rules = trim($$.attr("bind")).split(";")

		rules.forEach(function(rule) {
      rule = trim(rule)
			if(!rule) return // for trailing ;

			var bits = trim(rule).split(":").map(trim)
	    var attr = trim(bits.shift())
			var param = trim(bits.join(":"))
			
			var deps = o_O.deps(param, context)
				
			function run() {

				var x = o_O.expression(param).call(context)   
				var fn = $$[attr] || o_O.exten$ions[attr]
        if(!fn) throw new Error("Could not find attr '" + attr + "' in $ or o_O.exten$ions")
				fn.call($$, x)
			}
			
			run()
			
			deps.forEach(function(dep) {
				dep.on('set', run)
			})
	  })
		
    $$.attr("bind",null)
	}
	
	$el.filter("[bind]").each(function(k, v) {
	  bind.call(this, k, v)
	})
		
	$el.find("[bind]").each(function(k, v) {
	  bind.call(this, k, v)
	})<commit_msg>local exten overload $ methods<commit_after>;(function() {
	
function o_O() {};

/*                  _   _        
    _____ _____ _ _| |_(_)______ 
   / -_) V / -_) ' \  _| |_ / -_)
   \___|\_/\___|_||_\__|_/__\___|     */
 

(function(exports) {
	var methods	= {
		on	: function(event, fct){
			this._events = this._events || {};
			this._events[event] = this._events[event]	|| [];
			this._events[event].push(fct);
		},
		off	: function(event, fct){
			this._events = this._events || {};
			if( event in this._events === false  )	return;
			this._events[event].splice(this._events[event].indexOf(fct), 1);
		},
		once: function(event, fct) {
		  var fn = function() {
		    fct.apply(this, arguments)
		    this.off(event, fn)
		  }
		  this.on(event, fn)
		},
		emit	: function(event /* , args... */){
			this._events = this._events || {};
			if( event in this._events === false  )	return;
			for(var i = 0; i < this._events[event].length; i++){
				this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1))
			}
		}
	}

	o_O.eventize = function(o) {
		o.on = methods.on
		o.off = methods.off
		o.emit = methods.emit
		o.once = methods.once
	}
})()



/* 
 _    _         _ _           
| |__(_)_ _  __| (_)_ _  __ _ 
| '_ \ | ' \/ _` | | ' \/ _` |
|_.__/_|_||_\__,_|_|_||_\__, |
                        |___/    */

/** 
 *  o_O.bind will proxy to any method on a $ object
 *  but sometimes you want something more
 */

o_O.exten$ions = {
  /* set the class
   * usage: bind='class: myClass' 
   */
  'class': function(klass) {
    $(this).attr('class', klass)
  },
  /* Two-way binding to a form element
   * usage: bind='value: myProperty'
   */
  value: function(property) {
		var self = this;
		
		property.on('set', function(val) {
			$(self).val(val)
		})
		
    $(this).change(function(e) {    
      property( $(e.srcElement).val(), e)
    })

		property.rewrite()
  }
}

function trim(s) {
	return s.replace(/^\s+|\s+$/g, '')
}

o_O.bind = function(el, context) {
  var $el = $(el)
	context.el = $el[0]
	context.$ = $el
	
	function bind(k, v) {
   	var $$ = $(this)
		var rules = trim($$.attr("bind")).split(";")

		rules.forEach(function(rule) {
      rule = trim(rule)
			if(!rule) return // for trailing ;

			var bits = trim(rule).split(":").map(trim)
	    var attr = trim(bits.shift())
			var param = trim(bits.join(":"))
			
			var deps = o_O.deps(param, context)
				
			function run() {

				var x = o_O.expression(param).call(context)   
				var fn = o_O.exten$ions[attr] || $$[attr]
        if(!fn) throw new Error("Could not find attr '" + attr + "' in $ or o_O.exten$ions")
				fn.call($$, x)
			}
			
			run()
			
			deps.forEach(function(dep) {
				dep.on('set', run)
			})
	  })
		
    $$.attr("bind",null)
	}
	
	$el.filter("[bind]").each(function(k, v) {
	  bind.call(this, k, v)
	})
		
	$el.find("[bind]").each(function(k, v) {
	  bind.call(this, k, v)
	})
{'fraction_non_alphanumeric': 0.20414150129421915, 'fraction_numerical': 0.0013805004314063848, 'mean_word_length': 2.3329499712478436, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 3, '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': '6143291', 'n_tokens_mistral': 2477, 'n_tokens_neox': 2205, 'n_words': 397}