<commit_before>(function ( global, factory ) {

	'use strict';

	// AMD environment
	if ( typeof define === 'function' && define.amd ) {
		define([ 'ractive' ], factory );
	}

	// Common JS (i.e. node/browserify)
	else if ( typeof module !== 'undefined' && module.exports && typeof require === 'function' ) {
		factory( require( 'ractive' ) );
	}

	// browser global
	else if ( global.Ractive ) {
		factory( global.Ractive );
	}

	else {
		throw new Error( 'Could not find Ractive! It must be loaded before the ractive-components-ractive-codemirror plugin' );
	}

}( typeof window !== 'undefined' ? window : this, function ( Ractive ) {

	'use strict';

	Ractive.components['codemirror'] = Ractive.extend({
		template: "<textarea></textarea>",
		isolated: true,
		data: {
			lineNumbers: true
		},
		onrender: function () {
			var self = this
			var textarea = this.find('textarea')
			var editor = CodeMirror.fromTextArea( textarea )
			
			var updating = false
			
			editor.on('change', function() {
				if( updating )
					return
				updating = true
				self.set('value', editor.getValue())
				updating = false
			})
			
			this.observe('*', function(val, oldVal, kp) {
				console.log(kp)
				if( kp === 'value' ) {
					if( updating )
						return
					updating = true
					editor.setValue( val )
					updating = false
					return<commit_msg>Coerce undefined to string<commit_after>(function ( global, factory ) {

	'use strict';

	// AMD environment
	if ( typeof define === 'function' && define.amd ) {
		define([ 'ractive' ], factory );
	}

	// Common JS (i.e. node/browserify)
	else if ( typeof module !== 'undefined' && module.exports && typeof require === 'function' ) {
		factory( require( 'ractive' ) );
	}

	// browser global
	else if ( global.Ractive ) {
		factory( global.Ractive );
	}

	else {
		throw new Error( 'Could not find Ractive! It must be loaded before the ractive-components-ractive-codemirror plugin' );
	}

}( typeof window !== 'undefined' ? window : this, function ( Ractive ) {

	'use strict';

	Ractive.components['codemirror'] = Ractive.extend({
		template: "<textarea></textarea>",
		isolated: true,
		data: {
			lineNumbers: true
		},
		onrender: function () {
			var self = this
			var textarea = this.find('textarea')
			var editor = CodeMirror.fromTextArea( textarea )
			
			var updating = false
			
			editor.on('change', function() {
				if( updating )
					return
				updating = true
				self.set('value', editor.getValue())
				updating = false
			})
			
			this.observe('*', function(val, oldVal, kp) {
				console.log(kp)
				if( kp === 'value' ) {
					if( updating )
						return
					updating = true
					editor.setValue( val ||'')
					updating = false
					return
{'fraction_non_alphanumeric': 0.14659300184162063, 'fraction_numerical': 0.0, 'mean_word_length': 2.9707602339181287, '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': '3188512', 'n_tokens_mistral': 1042, 'n_tokens_neox': 846, 'n_words': 234}