<commit_before>
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: Page change transition core
//>>label: Transition Core
//>>group: Transitions
//>>css: ../css/themes/default/jquery.mobile.theme.css, ../css/structure/jquery.mobile.transitions.css

define( [ "jquery", "./jquery.mobile.core" ], function( $ ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, window, undefined ) {

var createHandler = function( sequential ){
	
	// Default to sequential
	if( sequential === undefined ){
		sequential = true;
	}
	
	return function( name, reverse, $to, $from ) {

		var deferred = new $.Deferred(),
			reverseClass = reverse ? " reverse" : "",
			active	= $.mobile.urlHistory.getActive(),
			toScroll = active.lastScroll || $.mobile.defaultHomeScroll,
			screenHeight = $.mobile.getScreenHeight(),
			maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $( window ).width() > $.mobile.maxTransitionWidth,
			none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none",
			toggleViewportClass = function(){
				$.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + name );
			},
			cleanFrom = function(){
				$from
					.removeClass( $.mobile.activePageClass + " out in reverse " + name )
					.height( "" );
			},
			doneOut = function() {

				if ( $from && sequential ) {
					cleanFrom();
				}
			
				$to.addClass( $.mobile.activePageClass );
			
				if( !none ){
					$to.animationComplete( doneIn );
				}
			
				// Send focus to page as it is now display: block
				$.mobile.focusPage( $to );

				// Jump to top or prev scroll, sometimes on iOS the page has not rendered yet.
				$to.height( screenHeight + toScroll );
				
				$.mobile.silentScroll( toScroll );
			
				$to.addClass( name + " in" + reverseClass );
			
				if( none ){
					doneIn();
				}
			
			},
		
			doneIn = function() {
			
				if ( !sequential ) {
					
					$.mobile.silentScroll( toScroll );
					
					if( $from ){
						cleanFrom();
					}
				}
			
				$to
					.removeClass( "out in reverse " + name )
					.height( "" );
				
				toggleViewportClass();	

				deferred.resolve( name, reverse, $to, $from, true );
			};

		toggleViewportClass();
	
		if ( $from && !none ) {
		
			// if it's not sequential, call the doneOut transition to start the TO page animating in simultaneously
			if( !sequential ){
				doneOut();
			}
			else {
				$from.animationComplete( doneOut );	
			}
		
			$from
				.height( screenHeight + $(window ).scrollTop() )
				.addClass( name + " out" + reverseClass );
		}
		else {	
			doneOut();
		}

		return deferred.promise();
	};
}

// generate the handlers from the above
var sequentialHandler = createHandler(),
	simultaneousHandler = createHandler( false );

// Make our transition handler the public default.
$.mobile.defaultTransitionHandler = sequentialHandler;

//transition handler dictionary for 3rd party transitions
$.mobile.transitionHandlers = {
	"default": $.mobile.defaultTransitionHandler,
	"sequential": sequentialHandler,
	"simultaneous": simultaneousHandler
};

$.mobile.transitionFallbacks = {};

})( jQuery, this );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
//>>excludeEnd("jqmBuildExclude");<commit_msg>This works around an issue where iOS5 and maybe others fail to scroll to the desired location during a transition that uses 3D transforms.<commit_after>
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: Page change transition core
//>>label: Transition Core
//>>group: Transitions
//>>css: ../css/themes/default/jquery.mobile.theme.css, ../css/structure/jquery.mobile.transitions.css

define( [ "jquery", "./jquery.mobile.core" ], function( $ ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, window, undefined ) {

var createHandler = function( sequential ){
	
	// Default to sequential
	if( sequential === undefined ){
		sequential = true;
	}
	
	return function( name, reverse, $to, $from ) {

		var deferred = new $.Deferred(),
			reverseClass = reverse ? " reverse" : "",
			active	= $.mobile.urlHistory.getActive(),
			toScroll = active.lastScroll || $.mobile.defaultHomeScroll,
			screenHeight = $.mobile.getScreenHeight(),
			maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $( window ).width() > $.mobile.maxTransitionWidth,
			none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none",
			toggleViewportClass = function(){
				$.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + name );
			},
			cleanFrom = function(){
				$from
					.removeClass( $.mobile.activePageClass + " out in reverse " + name )
					.height( "" );
			},
			doneOut = function() {

				if ( $from && sequential ) {
					cleanFrom();
				}
			
				$to.addClass( $.mobile.activePageClass );
			
				if( !none ){
					$to.animationComplete( doneIn );
				}
			
				// Send focus to page as it is now display: block
				$.mobile.focusPage( $to );

				// Jump to top or prev scroll, sometimes on iOS the page has not rendered yet.
				$to.height( screenHeight + toScroll );
				
				$.mobile.silentScroll( toScroll );
			
				$to.addClass( name + " in" + reverseClass );
			
				if( none ){
					doneIn();
				}
			
			},
		
			doneIn = function() {
			
				if ( !sequential ) {
					
					$.mobile.silentScroll( toScroll );
					
					if( $from ){
						cleanFrom();
					}
				}
			
				$to
					.removeClass( "out in reverse " + name )
					.height( "" );
				
				toggleViewportClass();
				
				// In some browsers (iOS5), 3D transitions block the ability to scroll to the desired location during transition
				// This ensures we jump to that spot after the fact, if we aren't there already.
				if( $( window ).scrollTop() !== toScroll ){
					$.mobile.silentScroll( toScroll );
				}

				deferred.resolve( name, reverse, $to, $from, true );
			};

		toggleViewportClass();
	
		if ( $from && !none ) {
		
			// if it's not sequential, call the doneOut transition to start the TO page animating in simultaneously
			if( !sequential ){
				doneOut();
			}
			else {
				$from.animationComplete( doneOut );	
			}
		
			$from
				.height( screenHeight + $(window ).scrollTop() )
				.addClass( name + " out" + reverseClass );
		}
		else {	
			doneOut();
		}

		return deferred.promise();
	};
}

// generate the handlers from the above
var sequentialHandler = createHandler(),
	simultaneousHandler = createHandler( false );

// Make our transition handler the public default.
$.mobile.defaultTransitionHandler = sequentialHandler;

//transition handler dictionary for 3rd party transitions
$.mobile.transitionHandlers = {
	"default": $.mobile.defaultTransitionHandler,
	"sequential": sequentialHandler,
	"simultaneous": simultaneousHandler
};

$.mobile.transitionFallbacks = {};

})( jQuery, this );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
//>>excludeEnd("jqmBuildExclude");
{'fraction_non_alphanumeric': 0.14550682961897915, 'fraction_numerical': 0.0008626887131560029, 'mean_word_length': 3.0989982321744254, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 37, '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': '5299959', 'n_tokens_mistral': 2542, 'n_tokens_neox': 2005, 'n_words': 536}