<commit_before>define([
	"Ember",
	"hbs!templates/components/formbutton.html"
], function(
	Ember,
	layout
) {

	var get = Ember.get;
	var set = Ember.set;
	var makeArray = Ember.makeArray;
	var $ = Ember.$;

	function iconAnimation( success, data ) {
		var defer = Promise.defer();

		set( this, "_iconAnimState", success );
		this.$().one( "webkitAnimationEnd", function() {
			set( this, "_iconAnimState", null );
			defer[ success ? "resolve" : "reject" ]( data );
		}.bind( this ) );

		return defer.promise;
	}

	return Ember.Component.extend({
		layout: layout,

		tagName: "",

		// prevents an ember bug regarding tagless components and isVisible bindings
		$: function() {
			// use the layout's first element as component element
			var element = this._renderNode.childNodes[0].firstNode;
			return $( element );
		},

		title  : null,
		"class": null,

		action     : null,
		actionParam: null,

		icon    : false,
		iconanim: false,

		_iconAnimState: null,

		actions: {
			click: function() {
				var action  = get( this, "action" );
				if ( !action ) { return; }

				var context = makeArray( get( this, "actionParam" ) );

				if ( get( this, "icon" ) && get( this, "iconanim" ) ) {
					// success animation
					context.push( iconAnimation.bind( this, true ) );
					// failure animation
					context.push( iconAnimation.bind( this, false ) );
				}

				// allow the component to send actions to itself
				// in case it has been extended and uses its own actions
				if ( this._actions instanceof Object && this._actions.hasOwnProperty( action ) ) {
					this.send.apply( this, [ action ].concat( context ) );

				} else {
					this.triggerAction({
						target: get( this, "targetObject" ),
						action: action,
						actionContext: context
					});
				}
			}
		}
	});

});<commit_msg>Fix this._actions deprecation<commit_after>define([
	"Ember",
	"hbs!templates/components/formbutton.html"
], function(
	Ember,
	layout
) {

	var get = Ember.get;
	var set = Ember.set;
	var makeArray = Ember.makeArray;
	var $ = Ember.$;

	function iconAnimation( success, data ) {
		var defer = Promise.defer();

		set( this, "_iconAnimState", success );
		this.$().one( "webkitAnimationEnd", function() {
			set( this, "_iconAnimState", null );
			defer[ success ? "resolve" : "reject" ]( data );
		}.bind( this ) );

		return defer.promise;
	}

	return Ember.Component.extend({
		layout: layout,

		tagName: "",

		// prevents an ember bug regarding tagless components and isVisible bindings
		$: function() {
			// use the layout's first element as component element
			var element = this._renderNode.childNodes[0].firstNode;
			return $( element );
		},

		title  : null,
		"class": null,

		action     : null,
		actionParam: null,

		icon    : false,
		iconanim: false,

		_iconAnimState: null,

		actions: {
			click: function() {
				var action  = get( this, "action" );
				if ( !action ) { return; }

				var context = makeArray( get( this, "actionParam" ) );

				if ( get( this, "icon" ) && get( this, "iconanim" ) ) {
					// success animation
					context.push( iconAnimation.bind( this, true ) );
					// failure animation
					context.push( iconAnimation.bind( this, false ) );
				}

				// allow the component to send actions to itself
				// in case it has been extended and uses its own actions
				if ( this.actions instanceof Object && this.actions.hasOwnProperty( action ) ) {
					this.send.apply( this, [ action ].concat( context ) );

				} else {
					this.triggerAction({
						target: get( this, "targetObject" ),
						action: action,
						actionContext: context
					});
				}
			}
		}
	});

});
{'fraction_non_alphanumeric': 0.13998899889989, 'fraction_numerical': 0.00055005500550055, 'mean_word_length': 2.869148936170213, 'pattern_counts': {'":': 2, '<': 3, '<?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': '6948260', 'n_tokens_mistral': 1385, 'n_tokens_neox': 1129, 'n_words': 328}