<commit_before>/**
 * @framework	CFF - Classy Frontend Framework
 * @author		<NAME> | original by <NAME>.
 * @copyright	http://www.divio.ch under the BSD Licence
 */

/* create a global log object */
var log = function(msg){return alert(msg);};
// check if console.log is available and register log(msg) or $(el).log(msg)
if(window['console'] === undefined) {
	window.console = { log: function(msg){return alert(msg);}, debug: function(msg){return alert(msg);} };
} else {
	log = console.debug || console.log || alert;
}

/* initiate classy namespace */
var CMS = CMS || {};

/* initialize classy */
(function() {
	var CLASSY_VERSION = '1.3.1',
		ROOT = this,
		OLD_CLASS = Class,
		DISABLE_CONSTRUCTOR = false;

	/* we check if $super is in use by a class if we can.  But first we have to
	   check if the JavaScript interpreter supports that.  This also matches
	   to false positives later, but that does not do any harm besides slightly
	   slowing calls down. */
	var probe_super = (function(){$super();}).toString().indexOf('$super') > 0;
	function usesSuper(obj) {
		return !probe_super || /\B\$super\b/.test(obj.toString());
	}

	/* helper function to set the attribute of something to a value or
	   removes it if the value is undefined. */
	function setOrUnset(obj, key, value) {
		(value === undefined) ? delete obj[key] : obj[key] = value;
	}

	/* gets the own property of an object */
	function getOwnProperty(obj, name) {
		return Object.prototype.hasOwnProperty.call(obj, name) ? obj[name] : undefined;
	}

	/* instanciate a class without calling the constructor */
	function cheapNew(cls) {
		DISABLE_CONSTRUCTOR = true;
		var rv = new cls;
		DISABLE_CONSTRUCTOR = false;
		return rv;
	}

	/* the base class we export */
	var Class = function(){};

	/* restore the global Class name and pass it to a function.  This allows
	   different versions of the classy library to be used side by side and
	   in combination with other libraries. */
	Class.$noConflict = function() {
		try {
			setOrUnset(ROOT, 'Class', OLD_CLASS);
		} catch (e) {
			// fix for IE that does not support delete on window
			ROOT.Class = OLD_CLASS;
		}
		return Class;
	};

	/* what version of classy are we using? */
	Class.$classyVersion = CLASSY_VERSION;

	/* extend functionality */
	Class.$extend = function(properties) {
		var super_prototype = this.prototype;

		/* disable constructors and instanciate prototype.  Because the
		   prototype can't raise an exception when created, we are safe
		   without a try/finally here. */
		var prototype = cheapNew(this);

		/* copy all properties of the includes over if there are any */
		if(properties.implement) {
			for (var i = 0, n = properties.implement.length; i != n; ++i) {
				var mixin = properties.implement[i];
				for (var name in mixin) {
					value = getOwnProperty(mixin, name);
					if (value !== undefined) prototype[name] = mixin[name];<commit_msg>fixing noconflict problems in class.js<commit_after>/**
 * @framework	CFF - Classy Frontend Framework
 * @author		<NAME> | original by <NAME>.
 * @copyright	http://www.divio.ch under the BSD Licence
 */

/* create a global log object */
var log = function(msg){return alert(msg);};
// check if console.log is available and register log(msg) or $(el).log(msg)
if(window['console'] === undefined) {
	window.console = { log: function(msg){return alert(msg);}, debug: function(msg){return alert(msg);} };
} else {
	log = console.debug || console.log || alert;
}

/* initiate classy namespace */
var CMS = CMS || {};

/* initialize classy */
(function() {
	var CLASSY_VERSION = '1.3.1',
		ROOT = this,
		DISABLE_CONSTRUCTOR = false;
		_Class = window.Class;

	/* we check if $super is in use by a class if we can.  But first we have to
	   check if the JavaScript interpreter supports that.  This also matches
	   to false positives later, but that does not do any harm besides slightly
	   slowing calls down. */
	var probe_super = (function(){$super();}).toString().indexOf('$super') > 0;
	function usesSuper(obj) {
		return !probe_super || /\B\$super\b/.test(obj.toString());
	}

	/* helper function to set the attribute of something to a value or
	   removes it if the value is undefined. */
	function setOrUnset(obj, key, value) {
		(value === undefined) ? delete obj[key] : obj[key] = value;
	}

	/* gets the own property of an object */
	function getOwnProperty(obj, name) {
		return Object.prototype.hasOwnProperty.call(obj, name) ? obj[name] : undefined;
	}

	/* instanciate a class without calling the constructor */
	function cheapNew(cls) {
		DISABLE_CONSTRUCTOR = true;
		var rv = new cls;
		DISABLE_CONSTRUCTOR = false;
		return rv;
	}

	/* the base class we export */
	var Class = function(){};

	/* restore the global Class name and pass it to a function.  This allows
	   different versions of the classy library to be used side by side and
	   in combination with other libraries. */
	Class.$noConflict = function(deep) {
		if(window.Class === Class) {
			window.Class = _Class;
		}

		if(deep && window.Class === Class) {
			window.Class = _Class;
		}

		return Class;
	};

	/* what version of classy are we using? */
	Class.$classyVersion = CLASSY_VERSION;

	/* extend functionality */
	Class.$extend = function(properties) {
		var super_prototype = this.prototype;

		/* disable constructors and instanciate prototype.  Because the
		   prototype can't raise an exception when created, we are safe
		   without a try/finally here. */
		var prototype = cheapNew(this);

		/* copy all properties of the includes over if there are any */
		if(properties.implement) {
			for (var i = 0, n = properties.implement.length; i != n; ++i) {
				var mixin = properties.implement[i];
				for (var name in mixin) {
					value = getOwnProperty(mixin, name);
					if (value !== undefined) prototype[name] = mixin[name];
{'fraction_non_alphanumeric': 0.1239059550368972, 'fraction_numerical': 0.001716148961729878, 'mean_word_length': 3.52133436772692, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '3812691', 'n_tokens_mistral': 1887, 'n_tokens_neox': 1755, 'n_words': 638}