2016-05-10 09:12:28 +00:00
|
|
|
/* global Symbol */
|
2016-07-29 19:18:58 +00:00
|
|
|
// Defining this global in .eslintrc.json would create a danger of using the global
|
2016-05-10 09:12:28 +00:00
|
|
|
// unguarded in another place, it seems safer to define global only for this module
|
|
|
|
|
2015-08-16 06:59:58 +00:00
|
|
|
define( [
|
2013-10-15 14:40:48 +00:00
|
|
|
"./var/arr",
|
2014-09-11 20:18:34 +00:00
|
|
|
"./var/document",
|
2016-03-14 20:46:51 +00:00
|
|
|
"./var/getProto",
|
2013-10-15 14:40:48 +00:00
|
|
|
"./var/slice",
|
|
|
|
"./var/concat",
|
|
|
|
"./var/push",
|
|
|
|
"./var/indexOf",
|
|
|
|
"./var/class2type",
|
|
|
|
"./var/toString",
|
|
|
|
"./var/hasOwn",
|
2016-03-14 20:46:51 +00:00
|
|
|
"./var/fnToString",
|
|
|
|
"./var/ObjectFunctionString",
|
2015-11-13 22:28:16 +00:00
|
|
|
"./var/support",
|
2017-12-13 06:43:30 +00:00
|
|
|
"./var/isFunction",
|
2017-06-23 04:14:43 +00:00
|
|
|
"./var/isWindow",
|
2018-01-14 08:46:20 +00:00
|
|
|
"./core/DOMEval",
|
|
|
|
"./core/toType"
|
2016-03-14 20:46:51 +00:00
|
|
|
], function( arr, document, getProto, slice, concat, push, indexOf,
|
|
|
|
class2type, toString, hasOwn, fnToString, ObjectFunctionString,
|
2018-01-14 08:46:20 +00:00
|
|
|
support, isFunction, isWindow, DOMEval, toType ) {
|
2013-08-15 18:15:49 +00:00
|
|
|
|
2016-04-25 18:25:08 +00:00
|
|
|
"use strict";
|
|
|
|
|
2012-06-16 01:01:44 +00:00
|
|
|
var
|
2013-08-15 18:15:49 +00:00
|
|
|
version = "@VERSION",
|
2012-06-04 16:48:18 +00:00
|
|
|
|
|
|
|
// Define a local copy of jQuery
|
|
|
|
jQuery = function( selector, context ) {
|
2015-08-16 06:59:58 +00:00
|
|
|
|
2009-05-20 21:12:08 +00:00
|
|
|
// The jQuery object is actually just the init constructor 'enhanced'
|
2013-09-10 00:13:01 +00:00
|
|
|
// Need init if jQuery is called (just allow error to be thrown if not included)
|
|
|
|
return new jQuery.fn.init( selector, context );
|
2009-05-20 21:12:08 +00:00
|
|
|
},
|
2009-03-31 17:35:20 +00:00
|
|
|
|
2016-03-23 14:03:06 +00:00
|
|
|
// Support: Android <=4.0 only
|
2014-02-13 22:48:58 +00:00
|
|
|
// Make sure we trim BOM and NBSP
|
2017-11-22 19:43:44 +00:00
|
|
|
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
2009-03-31 17:35:20 +00:00
|
|
|
|
2008-01-14 22:30:48 +00:00
|
|
|
jQuery.fn = jQuery.prototype = {
|
2015-08-16 06:59:58 +00:00
|
|
|
|
2012-11-26 08:20:43 +00:00
|
|
|
// The current version of jQuery being used
|
2013-08-15 18:15:49 +00:00
|
|
|
jquery: version,
|
2012-11-26 08:20:43 +00:00
|
|
|
|
2010-10-10 00:32:54 +00:00
|
|
|
constructor: jQuery,
|
2013-08-15 18:15:49 +00:00
|
|
|
|
2009-07-17 01:47:26 +00:00
|
|
|
// The default length of a jQuery object is 0
|
|
|
|
length: 0,
|
|
|
|
|
2009-12-22 00:58:13 +00:00
|
|
|
toArray: function() {
|
2013-08-15 18:15:49 +00:00
|
|
|
return slice.call( this );
|
2009-07-23 13:22:55 +00:00
|
|
|
},
|
2009-07-16 07:31:32 +00:00
|
|
|
|
2008-01-14 22:30:48 +00:00
|
|
|
// Get the Nth element in the matched element set OR
|
|
|
|
// Get the whole matched element set as a clean array
|
|
|
|
get: function( num ) {
|
|
|
|
|
2016-07-15 17:42:25 +00:00
|
|
|
// Return all the elements in a clean array
|
|
|
|
if ( num == null ) {
|
|
|
|
return slice.call( this );
|
|
|
|
}
|
2008-01-14 22:30:48 +00:00
|
|
|
|
2016-07-15 17:42:25 +00:00
|
|
|
// Return just the one element from the set
|
|
|
|
return num < 0 ? this[ num + this.length ] : this[ num ];
|
2008-01-14 22:30:48 +00:00
|
|
|
},
|
2008-05-13 01:45:58 +00:00
|
|
|
|
2008-01-14 22:30:48 +00:00
|
|
|
// Take an array of elements and push it onto the stack
|
|
|
|
// (returning the new matched element set)
|
2012-10-24 00:22:34 +00:00
|
|
|
pushStack: function( elems ) {
|
2010-12-30 06:34:48 +00:00
|
|
|
|
2012-06-28 00:55:36 +00:00
|
|
|
// Build a new jQuery matched element set
|
|
|
|
var ret = jQuery.merge( this.constructor(), elems );
|
2008-01-14 22:30:48 +00:00
|
|
|
|
|
|
|
// Add the old object onto the stack (as a reference)
|
|
|
|
ret.prevObject = this;
|
2008-12-19 04:37:10 +00:00
|
|
|
|
2008-01-14 22:30:48 +00:00
|
|
|
// Return the newly-formed element set
|
|
|
|
return ret;
|
|
|
|
},
|
2008-05-13 01:45:58 +00:00
|
|
|
|
2008-01-14 22:30:48 +00:00
|
|
|
// Execute a callback for every element in the matched set.
|
2015-02-17 07:09:54 +00:00
|
|
|
each: function( callback ) {
|
|
|
|
return jQuery.each( this, callback );
|
2008-01-14 22:30:48 +00:00
|
|
|
},
|
2011-01-05 21:41:23 +00:00
|
|
|
|
2013-09-28 15:57:46 +00:00
|
|
|
map: function( callback ) {
|
2015-08-16 06:59:58 +00:00
|
|
|
return this.pushStack( jQuery.map( this, function( elem, i ) {
|
2013-09-28 15:57:46 +00:00
|
|
|
return callback.call( elem, i, elem );
|
2015-08-16 06:59:58 +00:00
|
|
|
} ) );
|
2013-09-28 15:57:46 +00:00
|
|
|
},
|
|
|
|
|
2012-10-19 21:08:50 +00:00
|
|
|
slice: function() {
|
2013-08-15 18:15:49 +00:00
|
|
|
return this.pushStack( slice.apply( this, arguments ) );
|
2009-12-10 17:25:25 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
first: function() {
|
|
|
|
return this.eq( 0 );
|
|
|
|
},
|
|
|
|
|
|
|
|
last: function() {
|
|
|
|
return this.eq( -1 );
|
|
|
|
},
|
|
|
|
|
2012-10-19 21:08:50 +00:00
|
|
|
eq: function( i ) {
|
|
|
|
var len = this.length,
|
|
|
|
j = +i + ( i < 0 ? len : 0 );
|
2015-08-16 06:59:58 +00:00
|
|
|
return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
|
2009-12-10 17:25:25 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
end: function() {
|
2015-07-02 06:33:38 +00:00
|
|
|
return this.prevObject || this.constructor();
|
2009-12-10 17:25:25 +00:00
|
|
|
},
|
2008-01-14 22:30:48 +00:00
|
|
|
|
2009-03-17 20:39:29 +00:00
|
|
|
// For internal use only.
|
|
|
|
// Behaves like an Array's method, not like a jQuery method.
|
2013-08-15 18:15:49 +00:00
|
|
|
push: push,
|
|
|
|
sort: arr.sort,
|
|
|
|
splice: arr.splice
|
2008-01-14 22:30:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
jQuery.extend = jQuery.fn.extend = function() {
|
2011-02-15 21:03:23 +00:00
|
|
|
var options, name, src, copy, copyIsArray, clone,
|
2015-08-16 06:59:58 +00:00
|
|
|
target = arguments[ 0 ] || {},
|
2010-11-09 16:09:07 +00:00
|
|
|
i = 1,
|
|
|
|
length = arguments.length,
|
|
|
|
deep = false;
|
2008-01-14 22:30:48 +00:00
|
|
|
|
|
|
|
// Handle a deep copy situation
|
2008-11-17 16:32:05 +00:00
|
|
|
if ( typeof target === "boolean" ) {
|
2008-01-14 22:30:48 +00:00
|
|
|
deep = target;
|
2013-09-28 15:57:46 +00:00
|
|
|
|
2014-04-25 22:26:36 +00:00
|
|
|
// Skip the boolean and the target
|
2013-09-28 15:57:46 +00:00
|
|
|
target = arguments[ i ] || {};
|
|
|
|
i++;
|
2008-01-14 22:30:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Handle case when target is a string or something (possible in deep copy)
|
2017-12-13 06:43:30 +00:00
|
|
|
if ( typeof target !== "object" && !isFunction( target ) ) {
|
2008-01-14 22:30:48 +00:00
|
|
|
target = {};
|
2009-03-31 17:35:20 +00:00
|
|
|
}
|
2008-01-14 22:30:48 +00:00
|
|
|
|
2014-04-25 22:26:36 +00:00
|
|
|
// Extend jQuery itself if only one argument is passed
|
2013-09-28 15:57:46 +00:00
|
|
|
if ( i === length ) {
|
2008-01-14 22:30:48 +00:00
|
|
|
target = this;
|
2013-09-28 15:57:46 +00:00
|
|
|
i--;
|
2008-01-14 22:30:48 +00:00
|
|
|
}
|
|
|
|
|
2009-03-31 17:35:20 +00:00
|
|
|
for ( ; i < length; i++ ) {
|
2015-08-16 06:59:58 +00:00
|
|
|
|
2008-01-14 22:30:48 +00:00
|
|
|
// Only deal with non-null/undefined values
|
2015-08-16 06:59:58 +00:00
|
|
|
if ( ( options = arguments[ i ] ) != null ) {
|
|
|
|
|
2008-01-14 22:30:48 +00:00
|
|
|
// Extend the base object
|
2009-03-31 17:35:20 +00:00
|
|
|
for ( name in options ) {
|
|
|
|
copy = options[ name ];
|
2008-05-13 01:45:58 +00:00
|
|
|
|
2008-01-14 22:30:48 +00:00
|
|
|
// Prevent never-ending loop
|
2009-03-31 17:35:20 +00:00
|
|
|
if ( target === copy ) {
|
2008-01-14 22:30:48 +00:00
|
|
|
continue;
|
2009-03-31 17:35:20 +00:00
|
|
|
}
|
2008-01-14 22:30:48 +00:00
|
|
|
|
2010-01-30 18:50:49 +00:00
|
|
|
// Recurse if we're merging plain objects or arrays
|
2015-08-16 06:59:58 +00:00
|
|
|
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
2016-08-14 10:54:16 +00:00
|
|
|
( copyIsArray = Array.isArray( copy ) ) ) ) {
|
2018-12-12 16:13:18 +00:00
|
|
|
src = target[ name ];
|
2014-07-17 17:25:59 +00:00
|
|
|
|
2018-12-12 16:13:18 +00:00
|
|
|
// Ensure proper type for the source value
|
|
|
|
if ( copyIsArray && !Array.isArray( src ) ) {
|
|
|
|
clone = [];
|
|
|
|
} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
|
|
|
|
clone = {};
|
2010-01-30 18:50:49 +00:00
|
|
|
} else {
|
2018-12-12 16:13:18 +00:00
|
|
|
clone = src;
|
2010-01-30 18:50:49 +00:00
|
|
|
}
|
2018-12-12 16:13:18 +00:00
|
|
|
copyIsArray = false;
|
2009-07-16 07:32:03 +00:00
|
|
|
|
|
|
|
// Never move original objects, clone them
|
|
|
|
target[ name ] = jQuery.extend( deep, clone, copy );
|
2008-01-14 22:30:48 +00:00
|
|
|
|
|
|
|
// Don't bring in undefined values
|
2009-03-31 17:35:20 +00:00
|
|
|
} else if ( copy !== undefined ) {
|
2008-04-30 00:09:55 +00:00
|
|
|
target[ name ] = copy;
|
2009-03-31 17:35:20 +00:00
|
|
|
}
|
2008-01-14 22:30:48 +00:00
|
|
|
}
|
2009-03-31 17:35:20 +00:00
|
|
|
}
|
|
|
|
}
|
2008-01-14 22:30:48 +00:00
|
|
|
|
|
|
|
// Return the modified object
|
|
|
|
return target;
|
|
|
|
};
|
|
|
|
|
2015-08-16 06:59:58 +00:00
|
|
|
jQuery.extend( {
|
|
|
|
|
2013-02-25 20:48:22 +00:00
|
|
|
// Unique for each copy of jQuery on the page
|
2013-08-15 18:15:49 +00:00
|
|
|
expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
|
|
|
|
|
|
|
|
// Assume jQuery is ready without the ready module
|
|
|
|
isReady: true,
|
2013-02-25 20:48:22 +00:00
|
|
|
|
2013-09-28 15:57:46 +00:00
|
|
|
error: function( msg ) {
|
|
|
|
throw new Error( msg );
|
|
|
|
},
|
|
|
|
|
|
|
|
noop: function() {},
|
|
|
|
|
2009-12-06 22:11:51 +00:00
|
|
|
isPlainObject: function( obj ) {
|
2016-03-14 20:46:51 +00:00
|
|
|
var proto, Ctor;
|
2015-08-16 06:59:58 +00:00
|
|
|
|
2016-03-14 20:46:51 +00:00
|
|
|
// Detect obvious negatives
|
|
|
|
// Use toString instead of jQuery.type to catch host objects
|
|
|
|
if ( !obj || toString.call( obj ) !== "[object Object]" ) {
|
2009-11-08 23:26:01 +00:00
|
|
|
return false;
|
|
|
|
}
|
2010-12-30 06:34:48 +00:00
|
|
|
|
2016-03-14 20:46:51 +00:00
|
|
|
proto = getProto( obj );
|
2010-12-30 06:34:48 +00:00
|
|
|
|
2016-03-14 20:46:51 +00:00
|
|
|
// Objects with no prototype (e.g., `Object.create( null )`) are plain
|
|
|
|
if ( !proto ) {
|
|
|
|
return true;
|
|
|
|
}
|
2016-03-03 23:29:45 +00:00
|
|
|
|
2016-03-14 20:46:51 +00:00
|
|
|
// Objects with prototype are plain iff they were constructed by a global Object function
|
|
|
|
Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
|
|
|
|
return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
|
2009-07-16 07:32:03 +00:00
|
|
|
},
|
|
|
|
|
2009-07-16 07:32:31 +00:00
|
|
|
isEmptyObject: function( obj ) {
|
2012-07-10 01:38:11 +00:00
|
|
|
var name;
|
2016-05-10 09:12:28 +00:00
|
|
|
|
2012-07-10 01:38:11 +00:00
|
|
|
for ( name in obj ) {
|
2009-07-16 15:16:44 +00:00
|
|
|
return false;
|
2009-07-19 19:55:21 +00:00
|
|
|
}
|
2009-07-16 15:16:44 +00:00
|
|
|
return true;
|
2009-07-16 07:32:31 +00:00
|
|
|
},
|
2010-12-30 06:34:48 +00:00
|
|
|
|
2011-04-07 04:47:15 +00:00
|
|
|
// Evaluates a script in a global context
|
2015-11-13 22:28:16 +00:00
|
|
|
globalEval: function( code ) {
|
|
|
|
DOMEval( code );
|
2008-01-14 22:30:48 +00:00
|
|
|
},
|
|
|
|
|
2015-02-17 07:09:54 +00:00
|
|
|
each: function( obj, callback ) {
|
2015-06-25 04:18:04 +00:00
|
|
|
var length, i = 0;
|
2008-05-13 01:45:58 +00:00
|
|
|
|
2015-06-25 04:18:04 +00:00
|
|
|
if ( isArrayLike( obj ) ) {
|
|
|
|
length = obj.length;
|
2015-02-17 07:09:54 +00:00
|
|
|
for ( ; i < length; i++ ) {
|
|
|
|
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
|
|
|
break;
|
2009-03-31 17:35:20 +00:00
|
|
|
}
|
|
|
|
}
|
2008-01-14 22:30:48 +00:00
|
|
|
} else {
|
2015-02-17 07:09:54 +00:00
|
|
|
for ( i in obj ) {
|
|
|
|
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
|
|
|
break;
|
2011-03-30 17:17:48 +00:00
|
|
|
}
|
2009-03-31 17:35:20 +00:00
|
|
|
}
|
2008-01-14 22:30:48 +00:00
|
|
|
}
|
|
|
|
|
2012-06-29 01:39:58 +00:00
|
|
|
return obj;
|
2008-01-14 22:30:48 +00:00
|
|
|
},
|
2008-05-13 01:45:58 +00:00
|
|
|
|
2016-03-23 14:03:06 +00:00
|
|
|
// Support: Android <=4.0 only
|
2014-03-04 22:08:35 +00:00
|
|
|
trim: function( text ) {
|
|
|
|
return text == null ?
|
|
|
|
"" :
|
|
|
|
( text + "" ).replace( rtrim, "" );
|
|
|
|
},
|
2008-01-14 22:30:48 +00:00
|
|
|
|
2009-11-18 02:26:42 +00:00
|
|
|
// results is for internal usage only
|
2012-06-29 01:39:58 +00:00
|
|
|
makeArray: function( arr, results ) {
|
2012-12-10 18:52:02 +00:00
|
|
|
var ret = results || [];
|
2008-01-14 22:30:48 +00:00
|
|
|
|
2012-06-29 01:39:58 +00:00
|
|
|
if ( arr != null ) {
|
2015-06-25 04:18:04 +00:00
|
|
|
if ( isArrayLike( Object( arr ) ) ) {
|
2012-12-10 18:52:02 +00:00
|
|
|
jQuery.merge( ret,
|
|
|
|
typeof arr === "string" ?
|
|
|
|
[ arr ] : arr
|
|
|
|
);
|
2009-03-31 17:35:20 +00:00
|
|
|
} else {
|
2013-08-15 18:15:49 +00:00
|
|
|
push.call( ret, arr );
|
2009-03-31 17:35:20 +00:00
|
|
|
}
|
2008-04-25 03:48:07 +00:00
|
|
|
}
|
2008-01-14 22:30:48 +00:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
},
|
|
|
|
|
2012-06-29 01:39:58 +00:00
|
|
|
inArray: function( elem, arr, i ) {
|
2013-08-15 18:15:49 +00:00
|
|
|
return arr == null ? -1 : indexOf.call( arr, elem, i );
|
2008-01-14 22:30:48 +00:00
|
|
|
},
|
|
|
|
|
2016-03-23 14:03:06 +00:00
|
|
|
// Support: Android <=4.0 only, PhantomJS 1 only
|
2014-10-27 17:36:07 +00:00
|
|
|
// push.apply(_, arraylike) throws on ancient WebKit
|
2008-01-14 22:30:48 +00:00
|
|
|
merge: function( first, second ) {
|
2013-09-03 05:24:01 +00:00
|
|
|
var len = +second.length,
|
|
|
|
j = 0,
|
|
|
|
i = first.length;
|
2009-05-02 19:22:55 +00:00
|
|
|
|
2013-09-03 05:24:01 +00:00
|
|
|
for ( ; j < len; j++ ) {
|
|
|
|
first[ i++ ] = second[ j ];
|
2009-03-31 17:35:20 +00:00
|
|
|
}
|
2008-01-14 22:30:48 +00:00
|
|
|
|
2009-12-10 05:43:20 +00:00
|
|
|
first.length = i;
|
|
|
|
|
2008-01-14 22:30:48 +00:00
|
|
|
return first;
|
|
|
|
},
|
|
|
|
|
2013-09-28 15:57:46 +00:00
|
|
|
grep: function( elems, callback, invert ) {
|
|
|
|
var callbackInverse,
|
|
|
|
matches = [],
|
2012-07-10 01:38:11 +00:00
|
|
|
i = 0,
|
2013-09-28 15:57:46 +00:00
|
|
|
length = elems.length,
|
|
|
|
callbackExpect = !invert;
|
2008-01-14 22:30:48 +00:00
|
|
|
|
|
|
|
// Go through the array, only saving the items
|
|
|
|
// that pass the validator function
|
2012-07-10 01:38:11 +00:00
|
|
|
for ( ; i < length; i++ ) {
|
2013-09-28 15:57:46 +00:00
|
|
|
callbackInverse = !callback( elems[ i ], i );
|
|
|
|
if ( callbackInverse !== callbackExpect ) {
|
|
|
|
matches.push( elems[ i ] );
|
2009-03-31 17:35:20 +00:00
|
|
|
}
|
|
|
|
}
|
2008-01-14 22:30:48 +00:00
|
|
|
|
2013-09-28 15:57:46 +00:00
|
|
|
return matches;
|
2008-01-14 22:30:48 +00:00
|
|
|
},
|
|
|
|
|
2009-12-04 17:28:47 +00:00
|
|
|
// arg is for internal usage only
|
|
|
|
map: function( elems, callback, arg ) {
|
2015-06-25 04:18:04 +00:00
|
|
|
var length, value,
|
2011-04-05 06:59:54 +00:00
|
|
|
i = 0,
|
2012-12-10 18:52:02 +00:00
|
|
|
ret = [];
|
2008-01-14 22:30:48 +00:00
|
|
|
|
2013-09-22 08:19:28 +00:00
|
|
|
// Go through the array, translating each of the items to their new values
|
2015-06-25 04:18:04 +00:00
|
|
|
if ( isArrayLike( elems ) ) {
|
|
|
|
length = elems.length;
|
2011-03-21 19:12:31 +00:00
|
|
|
for ( ; i < length; i++ ) {
|
|
|
|
value = callback( elems[ i ], i, arg );
|
|
|
|
|
2011-02-27 18:47:35 +00:00
|
|
|
if ( value != null ) {
|
2013-09-28 15:57:46 +00:00
|
|
|
ret.push( value );
|
2011-02-27 18:47:35 +00:00
|
|
|
}
|
|
|
|
}
|
2008-01-14 22:30:48 +00:00
|
|
|
|
2011-04-22 01:51:23 +00:00
|
|
|
// Go through every key on the object,
|
2011-04-05 06:59:54 +00:00
|
|
|
} else {
|
2012-12-10 18:52:02 +00:00
|
|
|
for ( i in elems ) {
|
|
|
|
value = callback( elems[ i ], i, arg );
|
2011-03-21 19:12:31 +00:00
|
|
|
|
|
|
|
if ( value != null ) {
|
2013-09-28 15:57:46 +00:00
|
|
|
ret.push( value );
|
2011-03-21 19:12:31 +00:00
|
|
|
}
|
2009-03-31 17:35:20 +00:00
|
|
|
}
|
2008-01-14 22:30:48 +00:00
|
|
|
}
|
|
|
|
|
2010-11-27 22:15:33 +00:00
|
|
|
// Flatten any nested arrays
|
2013-08-15 18:15:49 +00:00
|
|
|
return concat.apply( [], ret );
|
2009-03-31 17:35:20 +00:00
|
|
|
},
|
|
|
|
|
2009-12-31 20:06:45 +00:00
|
|
|
// A global GUID counter for objects
|
|
|
|
guid: 1,
|
|
|
|
|
2013-08-26 22:54:13 +00:00
|
|
|
// jQuery.support is not used in Core but other projects attach their
|
|
|
|
// properties to it so it needs to exist.
|
|
|
|
support: support
|
2015-08-16 06:59:58 +00:00
|
|
|
} );
|
2008-01-14 22:30:48 +00:00
|
|
|
|
2015-06-01 21:25:38 +00:00
|
|
|
if ( typeof Symbol === "function" ) {
|
|
|
|
jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
|
|
|
|
}
|
|
|
|
|
2010-08-27 23:14:59 +00:00
|
|
|
// Populate the class2type map
|
2015-10-02 22:28:34 +00:00
|
|
|
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
2015-08-16 06:59:58 +00:00
|
|
|
function( i, name ) {
|
2010-08-27 23:14:59 +00:00
|
|
|
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
2015-08-16 06:59:58 +00:00
|
|
|
} );
|
2010-08-27 23:14:59 +00:00
|
|
|
|
2015-06-25 04:18:04 +00:00
|
|
|
function isArrayLike( obj ) {
|
2015-04-04 19:34:07 +00:00
|
|
|
|
2016-03-23 14:03:06 +00:00
|
|
|
// Support: real iOS 8.2 only (not reproducible in simulator)
|
2015-04-04 19:34:07 +00:00
|
|
|
// `in` check used to prevent JIT error (gh-2145)
|
|
|
|
// hasOwn isn't used here due to false negatives
|
|
|
|
// regarding Nodelist length in IE
|
2015-06-25 04:18:04 +00:00
|
|
|
var length = !!obj && "length" in obj && obj.length,
|
2018-01-14 08:46:20 +00:00
|
|
|
type = toType( obj );
|
2012-12-10 18:52:02 +00:00
|
|
|
|
2017-12-13 06:43:30 +00:00
|
|
|
if ( isFunction( obj ) || isWindow( obj ) ) {
|
2012-12-10 18:52:02 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2013-09-28 15:57:46 +00:00
|
|
|
return type === "array" || length === 0 ||
|
|
|
|
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
2012-12-10 18:52:02 +00:00
|
|
|
}
|
|
|
|
|
2013-08-15 18:15:49 +00:00
|
|
|
return jQuery;
|
2015-08-16 06:59:58 +00:00
|
|
|
} );
|