PageSourceSearch

https://www.hotac.org.tw/modules/civicrm/packages/jquery/jquery-migrate.js?tlhygj

js hotac.org.tw collected 2026-09-24 20:09:51 UTC 25,452 bytes, 865 lines download raw bytes

1/*!
2 * jQuery Migrate - v3.3.2 - 2020-11-17T23:22Z
3 * Copyright OpenJS Foundation and other contributors
4 */
5( function( factory ) {
6	"use strict";
7
8	if ( typeof define === "function" && define.amd ) {
9
10		// AMD. Register as an anonymous module.
11		define( [ "jquery" ], function( jQuery ) {
12			return factory( jQuery, window );
13		} );
14	} else if ( typeof module === "object" && module.exports ) {
15
16		// Node/CommonJS
17		// eslint-disable-next-line no-undef
18		module.exports = factory( require( "jquery" ), window );
19	} else {
20
21		// Browser globals
22		factory( jQuery, window );
23	}
24} )( function( jQuery, window ) {
25"use strict";
26
27jQuery.migrateVersion = "3.3.2";
28
29// Set to true to prevent console output; migrateWarnings still maintained
30jQuery.migrateMute = true;
31
32// Returns 0 if v1 == v2, -1 if v1 < v2, 1 if v1 > v2
33function compareVersions( v1, v2 ) {
34	var i,
35		rVersionParts = /^(\d+)\.(\d+)\.(\d+)/,
36		v1p = rVersionParts.exec( v1 ) || [ ],
37		v2p = rVersionParts.exec( v2 ) || [ ];
38
39	for ( i = 1; i <= 3; i++ ) {
40		if ( +v1p[ i ] > +v2p[ i ] ) {
41			return 1;
42		}
43		if ( +v1p[ i ] < +v2p[ i ] ) {
44			return -1;
45		}
46	}
47	return 0;
48}
49
50function jQueryVersionSince( version ) {
51	return compareVersions( jQuery.fn.jquery, version ) >= 0;
52}
53
54( function() {
55
56	// Support: IE9 only
57	// IE9 only creates console object when dev tools are first opened
58	// IE9 console is a host object, callable but doesn't have .apply()
59	if ( !window.console || !window.console.log ) {
60		return;
61	}
62
63	// Need jQuery 3.0.0+ and no older Migrate loaded
64	if ( !jQuery || !jQueryVersionSince( "3.0.0" ) ) {
65		window.console.log( "JQMIGRATE: jQuery 3.0.0+ REQUIRED" );
66	}
67	if ( jQuery.migrateWarnings ) {
68		window.console.log( "JQMIGRATE: Migrate plugin loaded multiple times" );
69	}
70
71	// Show a message on the console so devs know we're active
72	if ( !jQuery.migrateMute ) {
73    /*
74		window.console.log( "JQMIGRATE: Migrate is installed" +
75			( jQuery.migrateMute ? "" : " with logging active" ) +
76			", version " + jQuery.migrateVersion );
77    */
78	}
79} )();
80
81var warnedAbout = {};
82
83// By default each warning is only reported once.
84jQuery.migrateDeduplicateWarnings = true;
85
86// List of warnings already given; public read only
87jQuery.migrateWarnings = [];
88
89// Set to false to disable traces that appear with warnings
90if ( jQuery.migrateTrace === undefined ) {
91	jQuery.migrateTrace = false;
92}
93
94// Forget any warnings we've already given; public
95jQuery.migrateReset = function() {
96	warnedAbout = {};
97	jQuery.migrateWarnings.length = 0;
98};
99
100function migrateWarn( msg ) {
101	var console = window.console;
102	if ( !jQuery.migrateDeduplicateWarnings || !warnedAbout[ msg ] ) {
103		warnedAbout[ msg ] = true;
104		jQuery.migrateWarnings.push( msg );
105		if ( console && console.warn && !jQuery.migrateMute ) {
106			console.warn( "JQMIGRATE: " + msg );
107			if ( jQuery.migrateTrace && console.trace ) {
108				console.trace();
109			}
110		}
111	}
112}
113
114function migrateWarnProp( obj, prop, value, msg ) {
115	Object.defineProperty( obj, prop, {
116		configurable: true,
117		enumerable: true,
118		get: function() {
119			migrateWarn( msg );
120			return value;
121		},
122		set: function( newValue ) {
123			migrateWarn( msg );
124			value = newValue;
125		}
126	} );
127}
128
129function migrateWarnFunc( obj, prop, newFunc, msg ) {
130	obj[ prop ] = function() {
131		migrateWarn( msg );
132		return newFunc.apply( this, arguments );
133	};
134}
135
136if ( window.document.compatMode === "BackCompat" ) {
137
138	// JQuery has never supported or tested Quirks Mode
139	migrateWarn( "jQuery is not compatible with Quirks Mode" );
140}
141
142var findProp,
143	class2type = {},
144	oldInit = jQuery.fn.init,
145	oldFind = jQuery.find,
146
147	rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,
148	rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,
149
150	// Support: Android <=4.0 only
151	// Make sure we trim BOM and NBSP
152	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
153
154jQuery.fn.init = function( arg1 ) {
155	var args = Array.prototype.slice.call( arguments );
156
157	if ( typeof arg1 === "string" && arg1 === "#" ) {
158
159		// JQuery( "#" ) is a bogus ID selector, but it returned an empty set before jQuery 3.0
160		migrateWarn( "jQuery( '#' ) is not a valid selector" );
161		args[ 0 ] = [];
162	}
163
164	return oldInit.apply( this, args );
165};
166jQuery.fn.init.prototype = jQuery.fn;
167
168jQuery.find = function( selector ) {
169	var args = Array.prototype.slice.call( arguments );
170
171	// Support: PhantomJS 1.x
172	// String#match fails to match when used with a //g RegExp, only on some strings
173	if ( typeof selector === "string" && rattrHashTest.test( selector ) ) {
174
175		// The nonstandard and undocumented unquoted-hash was removed in jQuery 1.12.0
176		// First see if qS thinks it's a valid selector, if so avoid a false positive
177		try {
178			window.document.querySelector( selector );
179		} catch ( err1 ) {
180
181			// Didn't *look* valid to qSA, warn and try quoting what we think is the value
182			selector = selector.replace( rattrHashGlob, function( _, attr, op, value ) {
183				return "[" + attr + op + "\"" + value + "\"]";
184			} );
185
186			// If the regexp *may* have created an invalid selector, don't update it
187			// Note that there may be false alarms if selector uses jQuery extensions
188			try {
189				window.document.querySelector( selector );
190				migrateWarn( "Attribute selector with '#' must be quoted: " + args[ 0 ] );
191				args[ 0 ] = selector;
192			} catch ( err2 ) {
193				migrateWarn( "Attribute selector with '#' was not fixed: " + args[ 0 ] );
194			}
195		}
196	}
197
198	return oldFind.apply( this, args );
199};
200
201// Copy properties attached to original jQuery.find method (e.g. .attr, .isXML)
202for ( findProp in oldFind ) {
203	if ( Object.prototype.hasOwnProperty.call( oldFind, findProp ) ) {
204		jQuery.find[ findProp ] = oldFind[ findProp ];
205	}
206}
207
208// The number of elements contained in the matched element set
209migrateWarnFunc( jQuery.fn, "size", function() {
210	return this.length;
211},
212"jQuery.fn.size() is deprecated and removed; use the .length property" );
213
214migrateWarnFunc( jQuery, "parseJSON", function() {
215	return JSON.parse.apply( null, arguments );
216},
217"jQuery.parseJSON is deprecated; use JSON.parse" );
218
219migrateWarnFunc( jQuery, "holdReady", jQuery.holdReady,
220	"jQuery.holdReady is deprecated" );
221
222migrateWarnFunc( jQuery, "unique", jQuery.uniqueSort,
223	"jQuery.unique is deprecated; use jQuery.uniqueSort" );
224
225// Now jQuery.expr.pseudos is the standard incantation
226migrateWarnProp( jQuery.expr, "filters", jQuery.expr.pseudos,
227	"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos" );
228migrateWarnProp( jQuery.expr, ":", jQuery.expr.pseudos,
229	"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos" );
230
231// Prior to jQuery 3.1.1 there were internal refs so we don't warn there
232if ( jQueryVersionSince( "3.1.1" ) ) {
233	migrateWarnFunc( jQuery, "trim", function( text ) {
234		return text == null ?
235			"" :
236			( text + "" ).replace( rtrim, "" );
237	},
238	"jQuery.trim is deprecated; use String.prototype.trim" );
239}
240
241// Prior to jQuery 3.2 there were internal refs so we don't warn there
242if ( jQueryVersionSince( "3.2.0" ) ) {
243	migrateWarnFunc( jQuery, "nodeName", function( elem, name ) {
244		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
245	},
246	"jQuery.nodeName is deprecated" );
247
248	migrateWarnFunc( jQuery, "isArray", Array.isArray,
249		"jQuery.isArray is deprecated; use Array.isArray"
250	);
251}
252
253if ( jQueryVersionSince( "3.3.0" ) ) {
254
255	migrateWarnFunc( jQuery, "isNumeric", function( obj ) {
256
257			// As of jQuery 3.0, isNumeric is limited to
258			// strings and numbers (primitives or objects)
259			// that can be coerced to finite numbers (gh-2662)
260			var type = typeof obj;
261			return ( type === "number" || type === "string" ) &&
262
263				// parseFloat NaNs numeric-cast false positives ("")
264				// ...but misinterprets leading-number strings, e.g. hex literals ("0x...")
265				// subtraction forces infinities to NaN
266				!isNaN( obj - parseFloat( obj ) );
267		},
268		"jQuery.isNumeric() is deprecated"
269	);
270
271	// Populate the class2type map
272	jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".
273		split( " " ),
274	function( _, name ) {
275		class2type[ "[object " + name + "]" ] = name.toLowerCase();
276	} );
277
278	migrateWarnFunc( jQuery, "type", function( obj ) {
279		if ( obj == null ) {
280			return obj + "";
281		}
282
283		// Support: Android <=2.3 only (functionish RegExp)
284		return typeof obj === "object" || typeof obj === "function" ?
285			class2type[ Object.prototype.toString.call( obj ) ] || "object" :
286			typeof obj;
287	},
288	"jQuery.type is deprecated" );
289
290	migrateWarnFunc( jQuery, "isFunction",
291		function( obj ) {
292			return typeof obj === "function";
293		},
294		"jQuery.isFunction() is deprecated" );
295
296	migrateWarnFunc( jQuery, "isWindow",
297		function( obj ) {
298			return obj != null && obj === obj.window;
299		},
300		"jQuery.isWindow() is deprecated"
301	);
302}
303
304// Support jQuery slim which excludes the ajax module
305if ( jQuery.ajax ) {
306
307var oldAjax = jQuery.ajax,
308	rjsonp = /(=)\?(?=&|$)|\?\?/;
309
310jQuery.ajax = function( ) {
311	var jQXHR = oldAjax.apply( this, arguments );
312
313	// Be sure we got a jQXHR (e.g., not sync)
314	if ( jQXHR.promise ) {
315		migrateWarnFunc( jQXHR, "success", jQXHR.done,
316			"jQXHR.success is deprecated and removed" );
317		migrateWarnFunc( jQXHR, "error", jQXHR.fail,
318			"jQXHR.error is deprecated and removed" );
319		migrateWarnFunc( jQXHR, "complete", jQXHR.always,
320			"jQXHR.complete is deprecated and removed" );
321	}
322
323	return jQXHR;
324};
325
326// Only trigger the logic in jQuery <4 as the JSON-to-JSONP auto-promotion
327// behavior is gone in jQuery 4.0 and as it has security implications, we don't
328// want to restore the legacy behavior.
329if ( !jQueryVersionSince( "4.0.0" ) ) {
330
331	// Register this prefilter before the jQuery one. Otherwise, a promoted
332	// request is transformed into one with the script dataType and we can't
333	// catch it anymore.
334	jQuery.ajaxPrefilter( "+json", function( s ) {
335
336		// Warn if JSON-to-JSONP auto-promotion happens.
337		if ( s.jsonp !== false && ( rjsonp.test( s.url ) ||
338				typeof s.data === "string" &&
339				( s.contentType || "" )
340					.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
341				rjsonp.test( s.data )
342		) ) {
343			migrateWarn( "JSON-to-JSONP auto-promotion is deprecated" );
344		}
345	} );
346}
347
348}
349
350var oldRemoveAttr = jQuery.fn.removeAttr,
351	oldToggleClass = jQuery.fn.toggleClass,
352	rmatchNonSpace = /\S+/g;
353
354jQuery.fn.removeAttr = function( name ) {
355	var self = this;
356
357	jQuery.each( name.match( rmatchNonSpace ), function( _i, attr ) {
358		if ( jQuery.expr.match.bool.test( attr ) ) {
359			migrateWarn( "jQuery.fn.removeAttr no longer sets boolean properties: " + attr );
360			self.prop( attr, false );
361		}
362	} );
363
364	return oldRemoveAttr.apply( this, arguments );
365};
366
367jQuery.fn.toggleClass = function( state ) {
368
369	// Only deprecating no-args or single boolean arg
370	if ( state !== undefined && typeof state !== "boolean" ) {
371		return oldToggleClass.apply( this, arguments );
372	}
373
374	migrateWarn( "jQuery.fn.toggleClass( boolean ) is deprecated" );
375
376	// Toggle entire class name of each element
377	return this.each( function() {
378		var className = this.getAttribute && this.getAttribute( "class" ) || "";
379
380		if ( className ) {
381			jQuery.data( this, "__className__", className );
382		}
383
384		// If the element has a class name or if we're passed `false`,
385		// then remove the whole classname (if there was one, the above saved it).
386		// Otherwise bring back whatever was previously saved (if anything),
387		// falling back to the empty string if nothing was stored.
388		if ( this.setAttribute ) {
389			this.setAttribute( "class",
390				className || state === false ?
391				"" :
392				jQuery.data( this, "__className__" ) || ""
393			);
394		}
395	} );
396};
397
398function camelCase( string ) {
399	return string.replace( /-([a-z])/g, function( _, letter ) {
400		return letter.toUpperCase();
401	} );
402}
403
404var oldFnCss,
405	internalSwapCall = false,
406	ralphaStart = /^[a-z]/,
407
408	// The regex visualized:
409	//
410	//                         /----------\
411	//                        |            |    /-------\
412	//                        |  / Top  \  |   |         |
413	//         /--- Border ---+-| Right  |-+---+- Width -+---\
414	//        |                 | Bottom |                    |
415	//        |                  \ Left /                     |
416	//        |                                               |
417	//        |                              /----------\     |
418	//        |          /-------------\    |            |    |- END
419	//        |         |               |   |  / Top  \  |    |
420	//        |         |  / Margin  \  |   | | Right  | |    |
421	//        |---------+-|           |-+---+-| Bottom |-+----|
422	//        |            \ Padding /         \ Left /       |
423	// BEGIN -|                                               |
424	//        |                /---------\                    |
425	//        |               |           |                   |
426	//        |               |  / Min \  |    / Width  \     |
427	//         \--------------+-|       |-+---|          |---/
428	//                           \ Max /       \ Height /
429	rautoPx = /^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;
430
431// If this version of jQuery has .swap(), don't false-alarm on internal uses
432if ( jQuery.swap ) {
433	jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) {
434		var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get;
435
436		if ( oldHook ) {
437			jQuery.cssHooks[ name ].get = function() {
438				var ret;
439
440				internalSwapCall = true;
441				ret = oldHook.apply( this, arguments );
442				internalSwapCall = false;
443				return ret;
444			};
445		}
446	} );
447}
448
449jQuery.swap = function( elem, options, callback, args ) {
450	var ret, name,
451		old = {};
452
453	if ( !internalSwapCall ) {
454		migrateWarn( "jQuery.swap() is undocumented and deprecated" );
455	}
456
457	// Remember the old values, and insert the new ones
458	for ( name in options ) {
459		old[ name ] = elem.style[ name ];
460		elem.style[ name ] = options[ name ];
461	}
462
463	ret = callback.apply( elem, args || [] );
464
465	// Revert the old values
466	for ( name in options ) {
467		elem.style[ name ] = old[ name ];
468	}
469
470	return ret;
471};
472
473if ( jQueryVersionSince( "3.4.0" ) && typeof Proxy !== "undefined" ) {
474
475	jQuery.cssProps = new Proxy( jQuery.cssProps || {}, {
476		set: function() {
477			migrateWarn( "JQMIGRATE: jQuery.cssProps is deprecated" );
478			return Reflect.set.apply( this, arguments );
479		}
480	} );
481}
482
483// Create a dummy jQuery.cssNumber if missing. It won't be used by jQuery but
484// it will prevent code adding new keys to it unconditionally from crashing.
485if ( !jQuery.cssNumber ) {
486	jQuery.cssNumber = {};
487}
488
489function isAutoPx( prop ) {
490
491	// The first test is used to ensure that:
492	// 1. The prop starts with a lowercase letter (as we uppercase it for the second regex).
493	// 2. The prop is not empty.
494	return ralphaStart.test( prop ) &&
495		rautoPx.test( prop[ 0 ].toUpperCase() + prop.slice( 1 ) );
496}
497
498oldFnCss = jQuery.fn.css;
499
500jQuery.fn.css = function( name, value ) {
501	var camelName,
502		origThis = this;
503	if ( name && typeof name === "object" && !Array.isArray( name ) ) {
504		jQuery.each( name, function( n, v ) {
505			jQuery.fn.css.call( origThis, n, v );
506		} );
507		return this;
508	}
509	if ( typeof value === "number" ) {
510		camelName = camelCase( name );
511		if ( !isAutoPx( camelName ) && !jQuery.cssNumber[ camelName ] ) {
512			migrateWarn( "Number-typed values are deprecated for jQuery.fn.css( \"" +
513				name + "\", value )" );
514		}
515	}
516
517	return oldFnCss.apply( this, arguments );
518};
519
520var oldData = jQuery.data;
521
522jQuery.data = function( elem, name, value ) {
523	var curData, sameKeys, key;
524
525	// Name can be an object, and each entry in the object is meant to be set as data
526	if ( name && typeof name === "object" && arguments.length === 2 ) {
527		curData = jQuery.hasData( elem ) && oldData.call( this, elem );
528		sameKeys = {};
529		for ( key in name ) {
530			if ( key !== camelCase( key ) ) {
531				migrateWarn( "jQuery.data() always sets/gets camelCased names: " + key );
532				curData[ key ] = name[ key ];
533			} else {
534				sameKeys[ key ] = name[ key ];
535			}
536		}
537
538		oldData.call( this, elem, sameKeys );
539
540		return name;
541	}
542
543	// If the name is transformed, look for the un-transformed name in the data object
544	if ( name && typeof name === "string" && name !== camelCase( name ) ) {
545		curData = jQuery.hasData( elem ) && oldData.call( this, elem );
546		if ( curData && name in curData ) {
547			migrateWarn( "jQuery.data() always sets/gets camelCased names: " + name );
548			if ( arguments.length > 2 ) {
549				curData[ name ] = value;
550			}
551			return curData[ name ];
552		}
553	}
554
555	return oldData.apply( this, arguments );
556};
557
558// Support jQuery slim which excludes the effects module
559if ( jQuery.fx ) {
560
561var intervalValue, intervalMsg,
562	oldTweenRun = jQuery.Tween.prototype.run,
563	linearEasing = function( pct ) {
564		return pct;
565	};
566
567jQuery.Tween.prototype.run = function( ) {
568	if ( jQuery.easing[ this.easing ].length > 1 ) {
569		migrateWarn(
570			"'jQuery.easing." + this.easing.toString() + "' should use only one argument"
571		);
572
573		jQuery.easing[ this.easing ] = linearEasing;
574	}
575
576	oldTweenRun.apply( this, arguments );
577};
578
579intervalValue = jQuery.fx.interval || 13;
580intervalMsg = "jQuery.fx.interval is deprecated";
581
582// Support: IE9, Android <=4.4
583// Avoid false positives on browsers that lack rAF
584// Don't warn if document is hidden, jQuery uses setTimeout (#292)
585if ( window.requestAnimationFrame ) {
586	Object.defineProperty( jQuery.fx, "interval", {
587		configurable: true,
588		enumerable: true,
589		get: function() {
590			if ( !window.document.hidden ) {
591				migrateWarn( intervalMsg );
592			}
593			return intervalValue;
594		},
595		set: function( newValue ) {
596			migrateWarn( intervalMsg );
597			intervalValue = newValue;
598		}
599	} );
600}
601
602}
603
604var oldLoad = jQuery.fn.load,
605	oldEventAdd = jQuery.event.add,
606	originalFix = jQuery.event.fix;
607
608jQuery.event.props = [];
609jQuery.event.fixHooks = {};
610
611migrateWarnProp( jQuery.event.props, "concat", jQuery.event.props.concat,
612	"jQuery.event.props.concat() is deprecated and removed" );
613
614jQuery.event.fix = function( originalEvent ) {
615	var event,
616		type = originalEvent.type,
617		fixHook = this.fixHooks[ type ],
618		props = jQuery.event.props;
619
620	if ( props.length ) {
621		migrateWarn( "jQuery.event.props are deprecated and removed: " + props.join() );
622		while ( props.length ) {
623			jQuery.event.addProp( props.pop() );
624		}
625	}
626
627	if ( fixHook && !fixHook._migrated_ ) {
628		fixHook._migrated_ = true;
629		migrateWarn( "jQuery.event.fixHooks are deprecated and removed: " + type );
630		if ( ( props = fixHook.props ) && props.length ) {
631			while ( props.length ) {
632				jQuery.event.addProp( props.pop() );
633			}
634		}
635	}
636
637	event = originalFix.call( this, originalEvent );
638
639	return fixHook && fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
640};
641
642jQuery.event.add = function( elem, types ) {
643
644	// This misses the multiple-types case but that seems awfully rare
645	if ( elem === window && types === "load" && window.document.readyState === "complete" ) {
646		migrateWarn( "jQuery(window).on('load'...) called after load event occurred" );
647	}
648	return oldEventAdd.apply( this, arguments );
649};
650
651jQuery.each( [ "load", "unload", "error" ], function( _, name ) {
652
653	jQuery.fn[ name ] = function() {
654		var args = Array.prototype.slice.call( arguments, 0 );
655
656		// If this is an ajax load() the first arg should be the string URL;
657		// technically this could also be the "Anything" arg of the event .load()
658		// which just goes to show why this dumb signature has been deprecated!
659		// jQuery custom builds that exclude the Ajax module justifiably die here.
660		if ( name === "load" && typeof args[ 0 ] === "string" ) {
661			return oldLoad.apply( this, args );
662		}
663
664		migrateWarn( "jQuery.fn." + name + "() is deprecated" );
665
666		args.splice( 0, 0, name );
667		if ( arguments.length ) {
668			return this.on.apply( this, args );
669		}
670
671		// Use .triggerHandler here because:
672		// - load and unload events don't need to bubble, only applied to window or image
673		// - error event should not bubble to window, although it does pre-1.7
674		// See http://bugs.jquery.com/ticket/11820
675		this.triggerHandler.apply( this, args );
676		return this;
677	};
678
679} );
680
681jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
682	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
683	"change select submit keydown keypress keyup contextmenu" ).split( " " ),
684	function( _i, name ) {
685
686	// Handle event binding
687	jQuery.fn[ name ] = function( data, fn ) {
688		migrateWarn( "jQuery.fn." + name + "() event shorthand is deprecated" );
689		return arguments.length > 0 ?
690			this.on( name, null, data, fn ) :
691			this.trigger( name );
692	};
693} );
694
695// Trigger "ready" event only once, on document ready
696jQuery( function() {
697	jQuery( window.document ).triggerHandler( "ready" );
698} );
699
700jQuery.event.special.ready = {
701	setup: function() {
702		if ( this === window.document ) {
703			migrateWarn( "'ready' event is deprecated" );
704		}
705	}
706};
707
708jQuery.fn.extend( {
709
710	bind: function( types, data, fn ) {
711		migrateWarn( "jQuery.fn.bind() is deprecated" );
712		return this.on( types, null, data, fn );
713	},
714	unbind: function( types, fn ) {
715		migrateWarn( "jQuery.fn.unbind() is deprecated" );
716		return this.off( types, null, fn );
717	},
718	delegate: function( selector, types, data, fn ) {
719		migrateWarn( "jQuery.fn.delegate() is deprecated" );
720		return this.on( types, selector, data, fn );
721	},
722	undelegate: function( selector, types, fn ) {
723		migrateWarn( "jQuery.fn.undelegate() is deprecated" );
724		return arguments.length === 1 ?
725			this.off( selector, "**" ) :
726			this.off( types, selector || "**", fn );
727	},
728	hover: function( fnOver, fnOut ) {
729		migrateWarn( "jQuery.fn.hover() is deprecated" );
730		return this.on( "mouseenter", fnOver ).on( "mouseleave", fnOut || fnOver );
731	}
732} );
733
734var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
735	origHtmlPrefilter = jQuery.htmlPrefilter,
736	makeMarkup = function( html ) {
737		var doc = window.document.implementation.createHTMLDocument( "" );
738		doc.body.innerHTML = html;
739		return doc.body && doc.body.innerHTML;
740	},
741	warnIfChanged = function( html ) {
742		var changed = html.replace( rxhtmlTag, "<$1></$2>" );
743		if ( changed !== html && makeMarkup( html ) !== makeMarkup( changed ) ) {
744			migrateWarn( "HTML tags must be properly nested and closed: " + html );
745		}
746	};
747
748jQuery.UNSAFE_restoreLegacyHtmlPrefilter = function() {
749	jQuery.htmlPrefilter = function( html ) {
750		warnIfChanged( html );
751		return html.replace( rxhtmlTag, "<$1></$2>" );
752	};
753};
754
755jQuery.htmlPrefilter = function( html ) {
756	warnIfChanged( html );
757	return origHtmlPrefilter( html );
758};
759
760var oldOffset = jQuery.fn.offset;
761
762jQuery.fn.offset = function() {
763	var elem = this[ 0 ];
764
765	if ( elem && ( !elem.nodeType || !elem.getBoundingClientRect ) ) {
766		migrateWarn( "jQuery.fn.offset() requires a valid DOM element" );
767		return arguments.length ? this : undefined;
768	}
769
770	return oldOffset.apply( this, arguments );
771};
772
773// Support jQuery slim which excludes the ajax module
774// The jQuery.param patch is about respecting `jQuery.ajaxSettings.traditional`
775// so it doesn't make sense for the slim build.
776if ( jQuery.ajax ) {
777
778var oldParam = jQuery.param;
779
780jQuery.param = function( data, traditional ) {
781	var ajaxTraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
782
783	if ( traditional === undefined && ajaxTraditional ) {
784
785		migrateWarn( "jQuery.param() no longer uses jQuery.ajaxSettings.traditional" );
786		traditional = ajaxTraditional;
787	}
788
789	return oldParam.call( this, data, traditional );
790};
791
792}
793
794var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack;
795
796jQuery.fn.andSelf = function() {
797	migrateWarn( "jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()" );
798	return oldSelf.apply( this, arguments );
799};
800
801// Support jQuery slim which excludes the deferred module in jQuery 4.0+
802if ( jQuery.Deferred ) {
803
804var oldDeferred = jQuery.Deferred,
805	tuples = [
806
807		// Action, add listener, callbacks, .then handlers, final state
808		[ "resolve", "done", jQuery.Callbacks( "once memory" ),
809			jQuery.Callbacks( "once memory" ), "resolved" ],
810		[ "reject", "fail", jQuery.Callbacks( "once memory" ),
811			jQuery.Callbacks( "once memory" ), "rejected" ],
812		[ "notify", "progress", jQuery.Callbacks( "memory" ),
813			jQuery.Callbacks( "memory" ) ]
814	];
815
816jQuery.Deferred = function( func ) {
817	var deferred = oldDeferred(),
818		promise = deferred.promise();
819
820	deferred.pipe = promise.pipe = function( /* fnDone, fnFail, fnProgress */ ) {
821		var fns = arguments;
822
823		migrateWarn( "deferred.pipe() is deprecated" );
824
825		return jQuery.Deferred( function( newDefer ) {
826			jQuery.each( tuples, function( i, tuple ) {
827				var fn = typeof fns[ i ] === "function" && fns[ i ];
828
829				// Deferred.done(function() { bind to newDefer or newDefer.resolve })
830				// deferred.fail(function() { bind to newDefer or newDefer.reject })
831				// deferred.progress(function() { bind to newDefer or newDefer.notify })
832				deferred[ tuple[ 1 ] ]( function() {
833					var returned = fn && fn.apply( this, arguments );
834					if ( returned && typeof returned.promise === "function" ) {
835						returned.promise()
836							.done( newDefer.resolve )
837							.fail( newDefer.reject )
838							.progress( newDefer.notify );
839					} else {
840						newDefer[ tuple[ 0 ] + "With" ](
841							this === promise ? newDefer.promise() : this,
842							fn ? [ returned ] : arguments
843						);
844					}
845				} );
846			} );
847			fns = null;
848		} ).promise();
849
850	};
851
852	if ( func ) {
853		func.call( deferred, deferred );
854	}
855
856	return deferred;
857};
858
859// Preserve handler of uncaught exceptions in promise chains
860jQuery.Deferred.exceptionHook = oldDeferred.exceptionHook;
861
862}
863
864return jQuery;
865} );

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.