h2ocube_rails_assets 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * jQuery JavaScript Library v2.0.0
2
+ * jQuery JavaScript Library v2.0.2
3
3
  * http://jquery.com/
4
4
  *
5
5
  * Includes Sizzle.js
@@ -9,7 +9,7 @@
9
9
  * Released under the MIT license
10
10
  * http://jquery.org/license
11
11
  *
12
- * Date: 2013-04-18
12
+ * Date: 2013-05-30T21:25Z
13
13
  */
14
14
  (function( window, undefined ) {
15
15
 
@@ -46,7 +46,7 @@ var
46
46
  // List of deleted data cache ids, so we can reuse them
47
47
  core_deletedIds = [],
48
48
 
49
- core_version = "2.0.0",
49
+ core_version = "2.0.2",
50
50
 
51
51
  // Save a reference to some core methods
52
52
  core_concat = core_deletedIds.concat,
@@ -72,7 +72,7 @@ var
72
72
  // A simple way to check for HTML strings
73
73
  // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
74
74
  // Strict HTML recognition (#11290: must start with <)
75
- rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
75
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
76
76
 
77
77
  // Match a standalone tag
78
78
  rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
@@ -865,18 +865,19 @@ function isArraylike( obj ) {
865
865
  // All jQuery objects should point back to these
866
866
  rootjQuery = jQuery(document);
867
867
  /*!
868
- * Sizzle CSS Selector Engine v1.9.2-pre
868
+ * Sizzle CSS Selector Engine v1.9.4-pre
869
869
  * http://sizzlejs.com/
870
870
  *
871
871
  * Copyright 2013 jQuery Foundation, Inc. and other contributors
872
872
  * Released under the MIT license
873
873
  * http://jquery.org/license
874
874
  *
875
- * Date: 2013-04-16
875
+ * Date: 2013-05-27
876
876
  */
877
877
  (function( window, undefined ) {
878
878
 
879
879
  var i,
880
+ support,
880
881
  cachedruns,
881
882
  Expr,
882
883
  getText,
@@ -898,7 +899,6 @@ var i,
898
899
  // Instance-specific data
899
900
  expando = "sizzle" + -(new Date()),
900
901
  preferredDoc = window.document,
901
- support = {},
902
902
  dirruns = 0,
903
903
  done = 0,
904
904
  classCache = createCache(),
@@ -911,7 +911,8 @@ var i,
911
911
  strundefined = typeof undefined,
912
912
  MAX_NEGATIVE = 1 << 31,
913
913
 
914
- // Array methods
914
+ // Instance methods
915
+ hasOwn = ({}).hasOwnProperty,
915
916
  arr = [],
916
917
  pop = arr.pop,
917
918
  push_native = arr.push,
@@ -976,7 +977,7 @@ var i,
976
977
  "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
977
978
  "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
978
979
  "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
979
- "boolean": new RegExp( "^(?:" + booleans + ")$", "i" ),
980
+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
980
981
  // For use in libraries implementing .is()
981
982
  // We use this for POS matching in `select`
982
983
  "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
@@ -994,11 +995,13 @@ var i,
994
995
  rescape = /'|\\/g,
995
996
 
996
997
  // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
997
- runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,
998
- funescape = function( _, escaped ) {
998
+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
999
+ funescape = function( _, escaped, escapedWhitespace ) {
999
1000
  var high = "0x" + escaped - 0x10000;
1000
1001
  // NaN means non-codepoint
1001
- return high !== high ?
1002
+ // Support: Firefox
1003
+ // Workaround erroneous numeric interpretation of +"0x"
1004
+ return high !== high || escapedWhitespace ?
1002
1005
  escaped :
1003
1006
  // BMP codepoint
1004
1007
  high < 0 ?
@@ -1036,63 +1039,6 @@ try {
1036
1039
  };
1037
1040
  }
1038
1041
 
1039
- /**
1040
- * For feature detection
1041
- * @param {Function} fn The function to test for native support
1042
- */
1043
- function isNative( fn ) {
1044
- return rnative.test( fn + "" );
1045
- }
1046
-
1047
- /**
1048
- * Create key-value caches of limited size
1049
- * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
1050
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
1051
- * deleting the oldest entry
1052
- */
1053
- function createCache() {
1054
- var cache,
1055
- keys = [];
1056
-
1057
- return (cache = function( key, value ) {
1058
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
1059
- if ( keys.push( key += " " ) > Expr.cacheLength ) {
1060
- // Only keep the most recent entries
1061
- delete cache[ keys.shift() ];
1062
- }
1063
- return (cache[ key ] = value);
1064
- });
1065
- }
1066
-
1067
- /**
1068
- * Mark a function for special use by Sizzle
1069
- * @param {Function} fn The function to mark
1070
- */
1071
- function markFunction( fn ) {
1072
- fn[ expando ] = true;
1073
- return fn;
1074
- }
1075
-
1076
- /**
1077
- * Support testing using an element
1078
- * @param {Function} fn Passed the created div and expects a boolean result
1079
- */
1080
- function assert( fn ) {
1081
- var div = document.createElement("div");
1082
-
1083
- try {
1084
- return !!fn( div );
1085
- } catch (e) {
1086
- return false;
1087
- } finally {
1088
- if ( div.parentNode ) {
1089
- div.parentNode.removeChild( div );
1090
- }
1091
- // release memory in IE
1092
- div = null;
1093
- }
1094
- }
1095
-
1096
1042
  function Sizzle( selector, context, results, seed ) {
1097
1043
  var match, elem, m, nodeType,
1098
1044
  // QSA vars
@@ -1202,6 +1148,195 @@ function Sizzle( selector, context, results, seed ) {
1202
1148
  return select( selector.replace( rtrim, "$1" ), context, results, seed );
1203
1149
  }
1204
1150
 
1151
+ /**
1152
+ * For feature detection
1153
+ * @param {Function} fn The function to test for native support
1154
+ */
1155
+ function isNative( fn ) {
1156
+ return rnative.test( fn + "" );
1157
+ }
1158
+
1159
+ /**
1160
+ * Create key-value caches of limited size
1161
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
1162
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
1163
+ * deleting the oldest entry
1164
+ */
1165
+ function createCache() {
1166
+ var keys = [];
1167
+
1168
+ function cache( key, value ) {
1169
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
1170
+ if ( keys.push( key += " " ) > Expr.cacheLength ) {
1171
+ // Only keep the most recent entries
1172
+ delete cache[ keys.shift() ];
1173
+ }
1174
+ return (cache[ key ] = value);
1175
+ }
1176
+ return cache;
1177
+ }
1178
+
1179
+ /**
1180
+ * Mark a function for special use by Sizzle
1181
+ * @param {Function} fn The function to mark
1182
+ */
1183
+ function markFunction( fn ) {
1184
+ fn[ expando ] = true;
1185
+ return fn;
1186
+ }
1187
+
1188
+ /**
1189
+ * Support testing using an element
1190
+ * @param {Function} fn Passed the created div and expects a boolean result
1191
+ */
1192
+ function assert( fn ) {
1193
+ var div = document.createElement("div");
1194
+
1195
+ try {
1196
+ return !!fn( div );
1197
+ } catch (e) {
1198
+ return false;
1199
+ } finally {
1200
+ // Remove from its parent by default
1201
+ if ( div.parentNode ) {
1202
+ div.parentNode.removeChild( div );
1203
+ }
1204
+ // release memory in IE
1205
+ div = null;
1206
+ }
1207
+ }
1208
+
1209
+ /**
1210
+ * Adds the same handler for all of the specified attrs
1211
+ * @param {String} attrs Pipe-separated list of attributes
1212
+ * @param {Function} handler The method that will be applied if the test fails
1213
+ * @param {Boolean} test The result of a test. If true, null will be set as the handler in leiu of the specified handler
1214
+ */
1215
+ function addHandle( attrs, handler, test ) {
1216
+ attrs = attrs.split("|");
1217
+ var current,
1218
+ i = attrs.length,
1219
+ setHandle = test ? null : handler;
1220
+
1221
+ while ( i-- ) {
1222
+ // Don't override a user's handler
1223
+ if ( !(current = Expr.attrHandle[ attrs[i] ]) || current === handler ) {
1224
+ Expr.attrHandle[ attrs[i] ] = setHandle;
1225
+ }
1226
+ }
1227
+ }
1228
+
1229
+ /**
1230
+ * Fetches boolean attributes by node
1231
+ * @param {Element} elem
1232
+ * @param {String} name
1233
+ */
1234
+ function boolHandler( elem, name ) {
1235
+ // XML does not need to be checked as this will not be assigned for XML documents
1236
+ var val = elem.getAttributeNode( name );
1237
+ return val && val.specified ?
1238
+ val.value :
1239
+ elem[ name ] === true ? name.toLowerCase() : null;
1240
+ }
1241
+
1242
+ /**
1243
+ * Fetches attributes without interpolation
1244
+ * http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
1245
+ * @param {Element} elem
1246
+ * @param {String} name
1247
+ */
1248
+ function interpolationHandler( elem, name ) {
1249
+ // XML does not need to be checked as this will not be assigned for XML documents
1250
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
1251
+ }
1252
+
1253
+ /**
1254
+ * Uses defaultValue to retrieve value in IE6/7
1255
+ * @param {Element} elem
1256
+ * @param {String} name
1257
+ */
1258
+ function valueHandler( elem ) {
1259
+ // Ignore the value *property* on inputs by using defaultValue
1260
+ // Fallback to Sizzle.attr by returning undefined where appropriate
1261
+ // XML does not need to be checked as this will not be assigned for XML documents
1262
+ if ( elem.nodeName.toLowerCase() === "input" ) {
1263
+ return elem.defaultValue;
1264
+ }
1265
+ }
1266
+
1267
+ /**
1268
+ * Checks document order of two siblings
1269
+ * @param {Element} a
1270
+ * @param {Element} b
1271
+ * @returns Returns -1 if a precedes b, 1 if a follows b
1272
+ */
1273
+ function siblingCheck( a, b ) {
1274
+ var cur = b && a,
1275
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
1276
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
1277
+ ( ~a.sourceIndex || MAX_NEGATIVE );
1278
+
1279
+ // Use IE sourceIndex if available on both nodes
1280
+ if ( diff ) {
1281
+ return diff;
1282
+ }
1283
+
1284
+ // Check if b follows a
1285
+ if ( cur ) {
1286
+ while ( (cur = cur.nextSibling) ) {
1287
+ if ( cur === b ) {
1288
+ return -1;
1289
+ }
1290
+ }
1291
+ }
1292
+
1293
+ return a ? 1 : -1;
1294
+ }
1295
+
1296
+ /**
1297
+ * Returns a function to use in pseudos for input types
1298
+ * @param {String} type
1299
+ */
1300
+ function createInputPseudo( type ) {
1301
+ return function( elem ) {
1302
+ var name = elem.nodeName.toLowerCase();
1303
+ return name === "input" && elem.type === type;
1304
+ };
1305
+ }
1306
+
1307
+ /**
1308
+ * Returns a function to use in pseudos for buttons
1309
+ * @param {String} type
1310
+ */
1311
+ function createButtonPseudo( type ) {
1312
+ return function( elem ) {
1313
+ var name = elem.nodeName.toLowerCase();
1314
+ return (name === "input" || name === "button") && elem.type === type;
1315
+ };
1316
+ }
1317
+
1318
+ /**
1319
+ * Returns a function to use in pseudos for positionals
1320
+ * @param {Function} fn
1321
+ */
1322
+ function createPositionalPseudo( fn ) {
1323
+ return markFunction(function( argument ) {
1324
+ argument = +argument;
1325
+ return markFunction(function( seed, matches ) {
1326
+ var j,
1327
+ matchIndexes = fn( [], seed.length, argument ),
1328
+ i = matchIndexes.length;
1329
+
1330
+ // Match elements found at the specified indexes
1331
+ while ( i-- ) {
1332
+ if ( seed[ (j = matchIndexes[i]) ] ) {
1333
+ seed[j] = !(matches[j] = seed[j]);
1334
+ }
1335
+ }
1336
+ });
1337
+ });
1338
+ }
1339
+
1205
1340
  /**
1206
1341
  * Detect xml
1207
1342
  * @param {Element|Object} elem An element or a document
@@ -1213,13 +1348,17 @@ isXML = Sizzle.isXML = function( elem ) {
1213
1348
  return documentElement ? documentElement.nodeName !== "HTML" : false;
1214
1349
  };
1215
1350
 
1351
+ // Expose support vars for convenience
1352
+ support = Sizzle.support = {};
1353
+
1216
1354
  /**
1217
1355
  * Sets document-related variables once based on the current document
1218
1356
  * @param {Element|Object} [doc] An element or document object to use to set the document
1219
1357
  * @returns {Object} Returns the current document
1220
1358
  */
1221
1359
  setDocument = Sizzle.setDocument = function( node ) {
1222
- var doc = node ? node.ownerDocument || node : preferredDoc;
1360
+ var doc = node ? node.ownerDocument || node : preferredDoc,
1361
+ parent = doc.parentWindow;
1223
1362
 
1224
1363
  // If no document and documentElement is available, return
1225
1364
  if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
@@ -1233,19 +1372,56 @@ setDocument = Sizzle.setDocument = function( node ) {
1233
1372
  // Support tests
1234
1373
  documentIsHTML = !isXML( doc );
1235
1374
 
1236
- // Check if getElementsByTagName("*") returns only elements
1237
- support.getElementsByTagName = assert(function( div ) {
1238
- div.appendChild( doc.createComment("") );
1239
- return !div.getElementsByTagName("*").length;
1240
- });
1375
+ // Support: IE>8
1376
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
1377
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
1378
+ if ( parent && parent.frameElement ) {
1379
+ parent.attachEvent( "onbeforeunload", function() {
1380
+ setDocument();
1381
+ });
1382
+ }
1383
+
1384
+ /* Attributes
1385
+ ---------------------------------------------------------------------- */
1241
1386
 
1242
1387
  // Support: IE<8
1243
1388
  // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
1244
1389
  support.attributes = assert(function( div ) {
1390
+
1391
+ // Support: IE<8
1392
+ // Prevent attribute/property "interpolation"
1393
+ div.innerHTML = "<a href='#'></a>";
1394
+ addHandle( "type|href|height|width", interpolationHandler, div.firstChild.getAttribute("href") === "#" );
1395
+
1396
+ // Support: IE<9
1397
+ // Use getAttributeNode to fetch booleans when getAttribute lies
1398
+ addHandle( booleans, boolHandler, div.getAttribute("disabled") == null );
1399
+
1245
1400
  div.className = "i";
1246
1401
  return !div.getAttribute("className");
1247
1402
  });
1248
1403
 
1404
+ // Support: IE<9
1405
+ // Retrieving value should defer to defaultValue
1406
+ support.input = assert(function( div ) {
1407
+ div.innerHTML = "<input>";
1408
+ div.firstChild.setAttribute( "value", "" );
1409
+ return div.firstChild.getAttribute( "value" ) === "";
1410
+ });
1411
+
1412
+ // IE6/7 still return empty string for value,
1413
+ // but are actually retrieving the property
1414
+ addHandle( "value", valueHandler, support.attributes && support.input );
1415
+
1416
+ /* getElement(s)By*
1417
+ ---------------------------------------------------------------------- */
1418
+
1419
+ // Check if getElementsByTagName("*") returns only elements
1420
+ support.getElementsByTagName = assert(function( div ) {
1421
+ div.appendChild( doc.createComment("") );
1422
+ return !div.getElementsByTagName("*").length;
1423
+ });
1424
+
1249
1425
  // Check if getElementsByClassName can be trusted
1250
1426
  support.getElementsByClassName = assert(function( div ) {
1251
1427
  div.innerHTML = "<div class='a'></div><div class='a i'></div>";
@@ -1258,19 +1434,9 @@ setDocument = Sizzle.setDocument = function( node ) {
1258
1434
  return div.getElementsByClassName("i").length === 2;
1259
1435
  });
1260
1436
 
1261
- // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
1262
- // Detached nodes confoundingly follow *each other*
1263
- support.sortDetached = assert(function( div1 ) {
1264
- // Should return 1, but returns 4 (following)
1265
- return div1.compareDocumentPosition( document.createElement("div") ) & 1;
1266
- });
1267
-
1268
1437
  // Support: IE<10
1269
1438
  // Check if getElementById returns elements by name
1270
- // Support: Windows 8 Native Apps
1271
- // Assigning innerHTML with "name" attributes throws uncatchable exceptions
1272
- // (http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx)
1273
- // and the broken getElementById methods don't pick up programatically-set names,
1439
+ // The broken getElementById methods don't pick up programatically-set names,
1274
1440
  // so use a roundabout getElementsByName test
1275
1441
  support.getById = assert(function( div ) {
1276
1442
  docElem.appendChild( div ).id = expando;
@@ -1294,17 +1460,10 @@ setDocument = Sizzle.setDocument = function( node ) {
1294
1460
  };
1295
1461
  };
1296
1462
  } else {
1297
- Expr.find["ID"] = function( id, context ) {
1298
- if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
1299
- var m = context.getElementById( id );
1463
+ // Support: IE6/7
1464
+ // getElementById is not reliable as a find shortcut
1465
+ delete Expr.find["ID"];
1300
1466
 
1301
- return m ?
1302
- m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
1303
- [m] :
1304
- undefined :
1305
- [];
1306
- }
1307
- };
1308
1467
  Expr.filter["ID"] = function( id ) {
1309
1468
  var attrId = id.replace( runescape, funescape );
1310
1469
  return function( elem ) {
@@ -1347,6 +1506,9 @@ setDocument = Sizzle.setDocument = function( node ) {
1347
1506
  }
1348
1507
  };
1349
1508
 
1509
+ /* QSA/matchesSelector
1510
+ ---------------------------------------------------------------------- */
1511
+
1350
1512
  // QSA and matchesSelector support
1351
1513
 
1352
1514
  // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
@@ -1391,7 +1553,7 @@ setDocument = Sizzle.setDocument = function( node ) {
1391
1553
  // Should not select anything
1392
1554
  // Support: Windows 8 Native Apps
1393
1555
  // The type attribute is restricted during .innerHTML assignment
1394
- var input = document.createElement("input");
1556
+ var input = doc.createElement("input");
1395
1557
  input.setAttribute( "type", "hidden" );
1396
1558
  div.appendChild( input ).setAttribute( "t", "" );
1397
1559
 
@@ -1431,6 +1593,9 @@ setDocument = Sizzle.setDocument = function( node ) {
1431
1593
  rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
1432
1594
  rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
1433
1595
 
1596
+ /* Contains
1597
+ ---------------------------------------------------------------------- */
1598
+
1434
1599
  // Element contains another
1435
1600
  // Purposefully does not implement inclusive descendent
1436
1601
  // As in, an element does not contain itself
@@ -1455,6 +1620,16 @@ setDocument = Sizzle.setDocument = function( node ) {
1455
1620
  return false;
1456
1621
  };
1457
1622
 
1623
+ /* Sorting
1624
+ ---------------------------------------------------------------------- */
1625
+
1626
+ // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
1627
+ // Detached nodes confoundingly follow *each other*
1628
+ support.sortDetached = assert(function( div1 ) {
1629
+ // Should return 1, but returns 4 (following)
1630
+ return div1.compareDocumentPosition( doc.createElement("div") ) & 1;
1631
+ });
1632
+
1458
1633
  // Document order sorting
1459
1634
  sortOrder = docElem.compareDocumentPosition ?
1460
1635
  function( a, b ) {
@@ -1545,7 +1720,7 @@ setDocument = Sizzle.setDocument = function( node ) {
1545
1720
  0;
1546
1721
  };
1547
1722
 
1548
- return document;
1723
+ return doc;
1549
1724
  };
1550
1725
 
1551
1726
  Sizzle.matches = function( expr, elements ) {
@@ -1561,10 +1736,9 @@ Sizzle.matchesSelector = function( elem, expr ) {
1561
1736
  // Make sure that attribute selectors are quoted
1562
1737
  expr = expr.replace( rattributeQuotes, "='$1']" );
1563
1738
 
1564
- // rbuggyQSA always contains :focus, so no need for an existence check
1565
1739
  if ( support.matchesSelector && documentIsHTML &&
1566
- (!rbuggyMatches || !rbuggyMatches.test(expr)) &&
1567
- (!rbuggyQSA || !rbuggyQSA.test(expr)) ) {
1740
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
1741
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
1568
1742
 
1569
1743
  try {
1570
1744
  var ret = matches.call( elem, expr );
@@ -1597,7 +1771,10 @@ Sizzle.attr = function( elem, name ) {
1597
1771
  }
1598
1772
 
1599
1773
  var fn = Expr.attrHandle[ name.toLowerCase() ],
1600
- val = fn && fn( elem, name, !documentIsHTML );
1774
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
1775
+ val = ( fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
1776
+ fn( elem, name, !documentIsHTML ) :
1777
+ undefined );
1601
1778
 
1602
1779
  return val === undefined ?
1603
1780
  support.attributes || !documentIsHTML ?
@@ -1612,7 +1789,10 @@ Sizzle.error = function( msg ) {
1612
1789
  throw new Error( "Syntax error, unrecognized expression: " + msg );
1613
1790
  };
1614
1791
 
1615
- // Document sorting and removing duplicates
1792
+ /**
1793
+ * Document sorting and removing duplicates
1794
+ * @param {ArrayLike} results
1795
+ */
1616
1796
  Sizzle.uniqueSort = function( results ) {
1617
1797
  var elem,
1618
1798
  duplicates = [],
@@ -1638,87 +1818,6 @@ Sizzle.uniqueSort = function( results ) {
1638
1818
  return results;
1639
1819
  };
1640
1820
 
1641
- /**
1642
- * Checks document order of two siblings
1643
- * @param {Element} a
1644
- * @param {Element} b
1645
- * @returns Returns -1 if a precedes b, 1 if a follows b
1646
- */
1647
- function siblingCheck( a, b ) {
1648
- var cur = b && a,
1649
- diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE );
1650
-
1651
- // Use IE sourceIndex if available on both nodes
1652
- if ( diff ) {
1653
- return diff;
1654
- }
1655
-
1656
- // Check if b follows a
1657
- if ( cur ) {
1658
- while ( (cur = cur.nextSibling) ) {
1659
- if ( cur === b ) {
1660
- return -1;
1661
- }
1662
- }
1663
- }
1664
-
1665
- return a ? 1 : -1;
1666
- }
1667
-
1668
- // Fetches boolean attributes by node
1669
- function boolHandler( elem, name, isXML ) {
1670
- var val;
1671
- return isXML ?
1672
- undefined :
1673
- (val = elem.getAttributeNode( name )) && val.specified ?
1674
- val.value :
1675
- elem[ name ] === true ? name.toLowerCase() : null;
1676
- }
1677
-
1678
- // Fetches attributes without interpolation
1679
- // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
1680
- function interpolationHandler( elem, name, isXML ) {
1681
- var val;
1682
- return isXML ?
1683
- undefined :
1684
- (val = elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ));
1685
- }
1686
-
1687
- // Returns a function to use in pseudos for input types
1688
- function createInputPseudo( type ) {
1689
- return function( elem ) {
1690
- var name = elem.nodeName.toLowerCase();
1691
- return name === "input" && elem.type === type;
1692
- };
1693
- }
1694
-
1695
- // Returns a function to use in pseudos for buttons
1696
- function createButtonPseudo( type ) {
1697
- return function( elem ) {
1698
- var name = elem.nodeName.toLowerCase();
1699
- return (name === "input" || name === "button") && elem.type === type;
1700
- };
1701
- }
1702
-
1703
- // Returns a function to use in pseudos for positionals
1704
- function createPositionalPseudo( fn ) {
1705
- return markFunction(function( argument ) {
1706
- argument = +argument;
1707
- return markFunction(function( seed, matches ) {
1708
- var j,
1709
- matchIndexes = fn( [], seed.length, argument ),
1710
- i = matchIndexes.length;
1711
-
1712
- // Match elements found at the specified indexes
1713
- while ( i-- ) {
1714
- if ( seed[ (j = matchIndexes[i]) ] ) {
1715
- seed[j] = !(matches[j] = seed[j]);
1716
- }
1717
- }
1718
- });
1719
- });
1720
- }
1721
-
1722
1821
  /**
1723
1822
  * Utility function for retrieving the text value of an array of DOM nodes
1724
1823
  * @param {Array|Element} elem
@@ -1829,7 +1928,7 @@ Expr = Sizzle.selectors = {
1829
1928
  }
1830
1929
 
1831
1930
  // Accept quoted arguments as-is
1832
- if ( match[4] ) {
1931
+ if ( match[3] && match[4] !== undefined ) {
1833
1932
  match[2] = match[4];
1834
1933
 
1835
1934
  // Strip excess characters from unquoted arguments
@@ -2257,11 +2356,11 @@ function tokenize( selector, parseOnly ) {
2257
2356
  // Combinators
2258
2357
  if ( (match = rcombinators.exec( soFar )) ) {
2259
2358
  matched = match.shift();
2260
- tokens.push( {
2359
+ tokens.push({
2261
2360
  value: matched,
2262
2361
  // Cast descendant combinators to space
2263
2362
  type: match[0].replace( rtrim, " " )
2264
- } );
2363
+ });
2265
2364
  soFar = soFar.slice( matched.length );
2266
2365
  }
2267
2366
 
@@ -2270,11 +2369,11 @@ function tokenize( selector, parseOnly ) {
2270
2369
  if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
2271
2370
  (match = preFilters[ type ]( match ))) ) {
2272
2371
  matched = match.shift();
2273
- tokens.push( {
2372
+ tokens.push({
2274
2373
  value: matched,
2275
2374
  type: type,
2276
2375
  matches: match
2277
- } );
2376
+ });
2278
2377
  soFar = soFar.slice( matched.length );
2279
2378
  }
2280
2379
  }
@@ -2521,7 +2620,10 @@ function matcherFromTokens( tokens ) {
2521
2620
  }
2522
2621
  return setMatcher(
2523
2622
  i > 1 && elementMatcher( matchers ),
2524
- i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ),
2623
+ i > 1 && toSelector(
2624
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
2625
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
2626
+ ).replace( rtrim, "$1" ),
2525
2627
  matcher,
2526
2628
  i < j && matcherFromTokens( tokens.slice( i, j ) ),
2527
2629
  j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
@@ -2683,14 +2785,13 @@ function select( selector, context, results, seed ) {
2683
2785
  // Take a shortcut and set the context if the root selector is an ID
2684
2786
  tokens = match[0] = match[0].slice( 0 );
2685
2787
  if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
2686
- context.nodeType === 9 && documentIsHTML &&
2788
+ support.getById && context.nodeType === 9 && documentIsHTML &&
2687
2789
  Expr.relative[ tokens[1].type ] ) {
2688
2790
 
2689
2791
  context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
2690
2792
  if ( !context ) {
2691
2793
  return results;
2692
2794
  }
2693
-
2694
2795
  selector = selector.slice( tokens.shift().value.length );
2695
2796
  }
2696
2797
 
@@ -2758,31 +2859,6 @@ setDocument();
2758
2859
  [0, 0].sort( sortOrder );
2759
2860
  support.detectDuplicates = hasDuplicate;
2760
2861
 
2761
- // Support: IE<8
2762
- // Prevent attribute/property "interpolation"
2763
- assert(function( div ) {
2764
- div.innerHTML = "<a href='#'></a>";
2765
- if ( div.firstChild.getAttribute("href") !== "#" ) {
2766
- var attrs = "type|href|height|width".split("|"),
2767
- i = attrs.length;
2768
- while ( i-- ) {
2769
- Expr.attrHandle[ attrs[i] ] = interpolationHandler;
2770
- }
2771
- }
2772
- });
2773
-
2774
- // Support: IE<9
2775
- // Use getAttributeNode to fetch booleans when getAttribute lies
2776
- assert(function( div ) {
2777
- if ( div.getAttribute("disabled") != null ) {
2778
- var attrs = booleans.split("|"),
2779
- i = attrs.length;
2780
- while ( i-- ) {
2781
- Expr.attrHandle[ attrs[i] ] = boolHandler;
2782
- }
2783
- }
2784
- });
2785
-
2786
2862
  jQuery.find = Sizzle;
2787
2863
  jQuery.expr = Sizzle.selectors;
2788
2864
  jQuery.expr[":"] = jQuery.expr.pseudos;
@@ -3336,13 +3412,9 @@ Data.prototype = {
3336
3412
 
3337
3413
  // Handle: [ owner, { properties } ] args
3338
3414
  } else {
3339
- // Support an expectation from the old data system where plain
3340
- // objects used to initialize would be set to the cache by
3341
- // reference, instead of having properties and values copied.
3342
- // Note, this will kill the connection between
3343
- // "this.cache[ unlock ]" and "cache"
3415
+ // Fresh assignments by object are shallow copied
3344
3416
  if ( jQuery.isEmptyObject( cache ) ) {
3345
- this.cache[ unlock ] = data;
3417
+ jQuery.extend( this.cache[ unlock ], data );
3346
3418
  // Otherwise, copy the properties one-by-one to the cache object
3347
3419
  } else {
3348
3420
  for ( prop in data ) {
@@ -3350,6 +3422,7 @@ Data.prototype = {
3350
3422
  }
3351
3423
  }
3352
3424
  }
3425
+ return cache;
3353
3426
  },
3354
3427
  get: function( owner, key ) {
3355
3428
  // Either a valid cache is found, or will be created.
@@ -3391,7 +3464,7 @@ Data.prototype = {
3391
3464
  return value !== undefined ? value : key;
3392
3465
  },
3393
3466
  remove: function( owner, key ) {
3394
- var i, name,
3467
+ var i, name, camel,
3395
3468
  unlock = this.key( owner ),
3396
3469
  cache = this.cache[ unlock ];
3397
3470
 
@@ -3409,13 +3482,14 @@ Data.prototype = {
3409
3482
  // This will only penalize the array argument path.
3410
3483
  name = key.concat( key.map( jQuery.camelCase ) );
3411
3484
  } else {
3485
+ camel = jQuery.camelCase( key );
3412
3486
  // Try the string as a key before any manipulation
3413
3487
  if ( key in cache ) {
3414
- name = [ key ];
3488
+ name = [ key, camel ];
3415
3489
  } else {
3416
3490
  // If a key with the spaces exists, use it.
3417
3491
  // Otherwise, create an array by matching non-whitespace
3418
- name = jQuery.camelCase( key );
3492
+ name = camel;
3419
3493
  name = name in cache ?
3420
3494
  [ name ] : ( name.match( core_rnotwhite ) || [] );
3421
3495
  }
@@ -3433,7 +3507,9 @@ Data.prototype = {
3433
3507
  );
3434
3508
  },
3435
3509
  discard: function( owner ) {
3436
- delete this.cache[ this.key( owner ) ];
3510
+ if ( owner[ this.expando ] ) {
3511
+ delete this.cache[ owner[ this.expando ] ];
3512
+ }
3437
3513
  }
3438
3514
  };
3439
3515
 
@@ -3486,7 +3562,7 @@ jQuery.fn.extend({
3486
3562
  name = attrs[ i ].name;
3487
3563
 
3488
3564
  if ( name.indexOf( "data-" ) === 0 ) {
3489
- name = jQuery.camelCase( name.substring(5) );
3565
+ name = jQuery.camelCase( name.slice(5) );
3490
3566
  dataAttr( elem, name, data[ name ] );
3491
3567
  }
3492
3568
  }
@@ -3632,7 +3708,6 @@ jQuery.extend({
3632
3708
  startLength--;
3633
3709
  }
3634
3710
 
3635
- hooks.cur = fn;
3636
3711
  if ( fn ) {
3637
3712
 
3638
3713
  // Add a progress sentinel to prevent the fx queue from being
@@ -3742,7 +3817,7 @@ jQuery.fn.extend({
3742
3817
  }
3743
3818
  });
3744
3819
  var nodeHook, boolHook,
3745
- rclass = /[\t\r\n]/g,
3820
+ rclass = /[\t\r\n\f]/g,
3746
3821
  rreturn = /\r/g,
3747
3822
  rfocusable = /^(?:input|select|textarea|button)$/i;
3748
3823
 
@@ -3925,15 +4000,14 @@ jQuery.fn.extend({
3925
4000
  isFunction = jQuery.isFunction( value );
3926
4001
 
3927
4002
  return this.each(function( i ) {
3928
- var val,
3929
- self = jQuery(this);
4003
+ var val;
3930
4004
 
3931
4005
  if ( this.nodeType !== 1 ) {
3932
4006
  return;
3933
4007
  }
3934
4008
 
3935
4009
  if ( isFunction ) {
3936
- val = value.call( this, i, self.val() );
4010
+ val = value.call( this, i, jQuery( this ).val() );
3937
4011
  } else {
3938
4012
  val = value;
3939
4013
  }
@@ -4048,7 +4122,7 @@ jQuery.extend({
4048
4122
  if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
4049
4123
  name = name.toLowerCase();
4050
4124
  hooks = jQuery.attrHooks[ name ] ||
4051
- ( jQuery.expr.match.boolean.test( name ) ? boolHook : nodeHook );
4125
+ ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
4052
4126
  }
4053
4127
 
4054
4128
  if ( value !== undefined ) {
@@ -4087,7 +4161,7 @@ jQuery.extend({
4087
4161
  propName = jQuery.propFix[ name ] || name;
4088
4162
 
4089
4163
  // Boolean attributes get special treatment (#10870)
4090
- if ( jQuery.expr.match.boolean.test( name ) ) {
4164
+ if ( jQuery.expr.match.bool.test( name ) ) {
4091
4165
  // Set corresponding property to false
4092
4166
  elem[ propName ] = false;
4093
4167
  }
@@ -4171,7 +4245,7 @@ boolHook = {
4171
4245
  return name;
4172
4246
  }
4173
4247
  };
4174
- jQuery.each( jQuery.expr.match.boolean.source.match( /\w+/g ), function( i, name ) {
4248
+ jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
4175
4249
  var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
4176
4250
 
4177
4251
  jQuery.expr.attrHandle[ name ] = function( elem, name, isXML ) {
@@ -4752,6 +4826,12 @@ jQuery.event = {
4752
4826
  event[ prop ] = originalEvent[ prop ];
4753
4827
  }
4754
4828
 
4829
+ // Support: Cordova 2.5 (WebKit) (#13255)
4830
+ // All events should have a target; Cordova deviceready doesn't
4831
+ if ( !event.target ) {
4832
+ event.target = document;
4833
+ }
4834
+
4755
4835
  // Support: Safari 6.0+, Chrome < 28
4756
4836
  // Target should not be a text node (#504, #13143)
4757
4837
  if ( event.target.nodeType === 3 ) {
@@ -5063,6 +5143,7 @@ jQuery.fn.extend({
5063
5143
  }
5064
5144
  });
5065
5145
  var isSimple = /^.[^:#\[\.,]*$/,
5146
+ rparentsprev = /^(?:parents|prev(?:Until|All))/,
5066
5147
  rneedsContext = jQuery.expr.match.needsContext,
5067
5148
  // methods guaranteed to produce a unique set when starting from a unique set
5068
5149
  guaranteedUnique = {
@@ -5074,13 +5155,14 @@ var isSimple = /^.[^:#\[\.,]*$/,
5074
5155
 
5075
5156
  jQuery.fn.extend({
5076
5157
  find: function( selector ) {
5077
- var self, matched, i,
5078
- l = this.length;
5158
+ var i,
5159
+ ret = [],
5160
+ self = this,
5161
+ len = self.length;
5079
5162
 
5080
5163
  if ( typeof selector !== "string" ) {
5081
- self = this;
5082
5164
  return this.pushStack( jQuery( selector ).filter(function() {
5083
- for ( i = 0; i < l; i++ ) {
5165
+ for ( i = 0; i < len; i++ ) {
5084
5166
  if ( jQuery.contains( self[ i ], this ) ) {
5085
5167
  return true;
5086
5168
  }
@@ -5088,15 +5170,14 @@ jQuery.fn.extend({
5088
5170
  }) );
5089
5171
  }
5090
5172
 
5091
- matched = [];
5092
- for ( i = 0; i < l; i++ ) {
5093
- jQuery.find( selector, this[ i ], matched );
5173
+ for ( i = 0; i < len; i++ ) {
5174
+ jQuery.find( selector, self[ i ], ret );
5094
5175
  }
5095
5176
 
5096
5177
  // Needed because $( selector, context ) becomes $( context ).find( selector )
5097
- matched = this.pushStack( l > 1 ? jQuery.unique( matched ) : matched );
5098
- matched.selector = ( this.selector ? this.selector + " " : "" ) + selector;
5099
- return matched;
5178
+ ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
5179
+ ret.selector = this.selector ? this.selector + " " + selector : selector;
5180
+ return ret;
5100
5181
  },
5101
5182
 
5102
5183
  has: function( target ) {
@@ -5122,14 +5203,16 @@ jQuery.fn.extend({
5122
5203
  },
5123
5204
 
5124
5205
  is: function( selector ) {
5125
- return !!selector && (
5126
- typeof selector === "string" ?
5127
- // If this is a positional/relative selector, check membership in the returned set
5128
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
5129
- rneedsContext.test( selector ) ?
5130
- jQuery( selector, this.context ).index( this[ 0 ] ) >= 0 :
5131
- jQuery.filter( selector, this ).length > 0 :
5132
- this.filter( selector ).length > 0 );
5206
+ return !!winnow(
5207
+ this,
5208
+
5209
+ // If this is a positional/relative selector, check membership in the returned set
5210
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
5211
+ typeof selector === "string" && rneedsContext.test( selector ) ?
5212
+ jQuery( selector ) :
5213
+ selector || [],
5214
+ false
5215
+ ).length;
5133
5216
  },
5134
5217
 
5135
5218
  closest: function( selectors, context ) {
@@ -5240,9 +5323,7 @@ jQuery.each({
5240
5323
  return jQuery.sibling( elem.firstChild );
5241
5324
  },
5242
5325
  contents: function( elem ) {
5243
- return jQuery.nodeName( elem, "iframe" ) ?
5244
- elem.contentDocument || elem.contentWindow.document :
5245
- jQuery.merge( [], elem.childNodes );
5326
+ return elem.contentDocument || jQuery.merge( [], elem.childNodes );
5246
5327
  }
5247
5328
  }, function( name, fn ) {
5248
5329
  jQuery.fn[ name ] = function( until, selector ) {
@@ -5262,8 +5343,8 @@ jQuery.each({
5262
5343
  jQuery.unique( matched );
5263
5344
  }
5264
5345
 
5265
- // Reverse order for parents* and prev*
5266
- if ( name[ 0 ] === "p" ) {
5346
+ // Reverse order for parents* and prev-derivatives
5347
+ if ( rparentsprev.test( name ) ) {
5267
5348
  matched.reverse();
5268
5349
  }
5269
5350
  }
@@ -5362,6 +5443,7 @@ var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>
5362
5443
  option: [ 1, "<select multiple='multiple'>", "</select>" ],
5363
5444
 
5364
5445
  thead: [ 1, "<table>", "</table>" ],
5446
+ col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
5365
5447
  tr: [ 2, "<table><tbody>", "</tbody></table>" ],
5366
5448
  td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
5367
5449
 
@@ -5371,7 +5453,7 @@ var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>
5371
5453
  // Support: IE 9
5372
5454
  wrapMap.optgroup = wrapMap.option;
5373
5455
 
5374
- wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.col = wrapMap.thead;
5456
+ wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
5375
5457
  wrapMap.th = wrapMap.td;
5376
5458
 
5377
5459
  jQuery.fn.extend({
@@ -5519,6 +5601,10 @@ jQuery.fn.extend({
5519
5601
  parent = args[ i++ ];
5520
5602
 
5521
5603
  if ( parent ) {
5604
+ // Don't use the snapshot next if it has moved (#13810)
5605
+ if ( next && next.parentNode !== parent ) {
5606
+ next = this.nextSibling;
5607
+ }
5522
5608
  jQuery( this ).remove();
5523
5609
  parent.insertBefore( elem, next );
5524
5610
  }
@@ -5774,35 +5860,35 @@ jQuery.extend({
5774
5860
  },
5775
5861
 
5776
5862
  cleanData: function( elems ) {
5777
- var data, elem, type,
5778
- l = elems.length,
5779
- i = 0,
5780
- special = jQuery.event.special;
5781
-
5782
- for ( ; i < l; i++ ) {
5783
- elem = elems[ i ];
5784
-
5785
- if ( jQuery.acceptData( elem ) ) {
5863
+ var data, elem, events, type, key, j,
5864
+ special = jQuery.event.special,
5865
+ i = 0;
5786
5866
 
5787
- data = data_priv.access( elem );
5867
+ for ( ; (elem = elems[ i ]) !== undefined; i++ ) {
5868
+ if ( Data.accepts( elem ) ) {
5869
+ key = elem[ data_priv.expando ];
5788
5870
 
5789
- if ( data ) {
5790
- for ( type in data.events ) {
5791
- if ( special[ type ] ) {
5792
- jQuery.event.remove( elem, type );
5871
+ if ( key && (data = data_priv.cache[ key ]) ) {
5872
+ events = Object.keys( data.events || {} );
5873
+ if ( events.length ) {
5874
+ for ( j = 0; (type = events[j]) !== undefined; j++ ) {
5875
+ if ( special[ type ] ) {
5876
+ jQuery.event.remove( elem, type );
5793
5877
 
5794
- // This is a shortcut to avoid jQuery.event.remove's overhead
5795
- } else {
5796
- jQuery.removeEvent( elem, type, data.handle );
5878
+ // This is a shortcut to avoid jQuery.event.remove's overhead
5879
+ } else {
5880
+ jQuery.removeEvent( elem, type, data.handle );
5881
+ }
5797
5882
  }
5798
5883
  }
5884
+ if ( data_priv.cache[ key ] ) {
5885
+ // Discard any remaining `private` data
5886
+ delete data_priv.cache[ key ];
5887
+ }
5799
5888
  }
5800
5889
  }
5801
- // Discard any remaining `private` and `user` data
5802
- // One day we'll replace the dual arrays with a WeakMap and this won't be an issue.
5803
- // (Splices the data objects out of the internal cache arrays)
5804
- data_user.discard( elem );
5805
- data_priv.discard( elem );
5890
+ // Discard any remaining `user` data
5891
+ delete data_user.cache[ elem[ data_user.expando ] ];
5806
5892
  }
5807
5893
  },
5808
5894
 
@@ -5810,10 +5896,10 @@ jQuery.extend({
5810
5896
  return jQuery.ajax({
5811
5897
  url: url,
5812
5898
  type: "GET",
5813
- dataType: "text",
5899
+ dataType: "script",
5814
5900
  async: false,
5815
5901
  global: false,
5816
- success: jQuery.globalEval
5902
+ "throws": true
5817
5903
  });
5818
5904
  }
5819
5905
  });
@@ -5868,11 +5954,9 @@ function cloneCopyEvent( src, dest ) {
5868
5954
  // 1. Copy private data: events, handlers, etc.
5869
5955
  if ( data_priv.hasData( src ) ) {
5870
5956
  pdataOld = data_priv.access( src );
5871
- pdataCur = jQuery.extend( {}, pdataOld );
5957
+ pdataCur = data_priv.set( dest, pdataOld );
5872
5958
  events = pdataOld.events;
5873
5959
 
5874
- data_priv.set( dest, pdataCur );
5875
-
5876
5960
  if ( events ) {
5877
5961
  delete pdataCur.handle;
5878
5962
  pdataCur.events = {};
@@ -6153,7 +6237,7 @@ jQuery.extend({
6153
6237
  }
6154
6238
  },
6155
6239
 
6156
- // Exclude the following css properties to add px
6240
+ // Don't automatically add "px" to these possibly-unitless properties
6157
6241
  cssNumber: {
6158
6242
  "columnCount": true,
6159
6243
  "fillOpacity": true,
@@ -7294,7 +7378,7 @@ jQuery.extend({
7294
7378
  }
7295
7379
 
7296
7380
  // if no content
7297
- if ( status === 204 ) {
7381
+ if ( status === 204 || s.type === "HEAD" ) {
7298
7382
  statusText = "nocontent";
7299
7383
 
7300
7384
  // if not modified
@@ -7788,44 +7872,51 @@ var fxNow, timerId,
7788
7872
  animationPrefilters = [ defaultPrefilter ],
7789
7873
  tweeners = {
7790
7874
  "*": [function( prop, value ) {
7791
- var end, unit,
7792
- tween = this.createTween( prop, value ),
7793
- parts = rfxnum.exec( value ),
7875
+ var tween = this.createTween( prop, value ),
7794
7876
  target = tween.cur(),
7795
- start = +target || 0,
7877
+ parts = rfxnum.exec( value ),
7878
+ unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
7879
+
7880
+ // Starting value computation is required for potential unit mismatches
7881
+ start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
7882
+ rfxnum.exec( jQuery.css( tween.elem, prop ) ),
7796
7883
  scale = 1,
7797
7884
  maxIterations = 20;
7798
7885
 
7799
- if ( parts ) {
7800
- end = +parts[2];
7801
- unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" );
7886
+ if ( start && start[ 3 ] !== unit ) {
7887
+ // Trust units reported by jQuery.css
7888
+ unit = unit || start[ 3 ];
7802
7889
 
7803
- // We need to compute starting value
7804
- if ( unit !== "px" && start ) {
7805
- // Iteratively approximate from a nonzero starting point
7806
- // Prefer the current property, because this process will be trivial if it uses the same units
7807
- // Fallback to end or a simple constant
7808
- start = jQuery.css( tween.elem, prop, true ) || end || 1;
7890
+ // Make sure we update the tween properties later on
7891
+ parts = parts || [];
7809
7892
 
7810
- do {
7811
- // If previous iteration zeroed out, double until we get *something*
7812
- // Use a string for doubling factor so we don't accidentally see scale as unchanged below
7813
- scale = scale || ".5";
7893
+ // Iteratively approximate from a nonzero starting point
7894
+ start = +target || 1;
7814
7895
 
7815
- // Adjust and apply
7816
- start = start / scale;
7817
- jQuery.style( tween.elem, prop, start + unit );
7896
+ do {
7897
+ // If previous iteration zeroed out, double until we get *something*
7898
+ // Use a string for doubling factor so we don't accidentally see scale as unchanged below
7899
+ scale = scale || ".5";
7818
7900
 
7819
- // Update scale, tolerating zero or NaN from tween.cur()
7820
- // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
7821
- } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
7822
- }
7901
+ // Adjust and apply
7902
+ start = start / scale;
7903
+ jQuery.style( tween.elem, prop, start + unit );
7823
7904
 
7905
+ // Update scale, tolerating zero or NaN from tween.cur()
7906
+ // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
7907
+ } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
7908
+ }
7909
+
7910
+ // Update tween properties
7911
+ if ( parts ) {
7912
+ start = tween.start = +start || +target || 0;
7824
7913
  tween.unit = unit;
7825
- tween.start = start;
7826
7914
  // If a +=/-= token was provided, we're doing a relative animation
7827
- tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;
7915
+ tween.end = parts[ 1 ] ?
7916
+ start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
7917
+ +parts[ 2 ];
7828
7918
  }
7919
+
7829
7920
  return tween;
7830
7921
  }]
7831
7922
  };
@@ -7838,19 +7929,18 @@ function createFxNow() {
7838
7929
  return ( fxNow = jQuery.now() );
7839
7930
  }
7840
7931
 
7841
- function createTweens( animation, props ) {
7842
- jQuery.each( props, function( prop, value ) {
7843
- var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
7844
- index = 0,
7845
- length = collection.length;
7846
- for ( ; index < length; index++ ) {
7847
- if ( collection[ index ].call( animation, prop, value ) ) {
7932
+ function createTween( value, prop, animation ) {
7933
+ var tween,
7934
+ collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
7935
+ index = 0,
7936
+ length = collection.length;
7937
+ for ( ; index < length; index++ ) {
7938
+ if ( (tween = collection[ index ].call( animation, prop, value )) ) {
7848
7939
 
7849
- // we're done with this property
7850
- return;
7851
- }
7940
+ // we're done with this property
7941
+ return tween;
7852
7942
  }
7853
- });
7943
+ }
7854
7944
  }
7855
7945
 
7856
7946
  function Animation( elem, properties, options ) {
@@ -7936,7 +8026,7 @@ function Animation( elem, properties, options ) {
7936
8026
  }
7937
8027
  }
7938
8028
 
7939
- createTweens( animation, props );
8029
+ jQuery.map( props, createTween, animation );
7940
8030
 
7941
8031
  if ( jQuery.isFunction( animation.opts.start ) ) {
7942
8032
  animation.opts.start.call( elem, animation );
@@ -8026,12 +8116,12 @@ jQuery.Animation = jQuery.extend( Animation, {
8026
8116
 
8027
8117
  function defaultPrefilter( elem, props, opts ) {
8028
8118
  /* jshint validthis: true */
8029
- var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire,
8119
+ var prop, value, toggle, tween, hooks, oldfire,
8030
8120
  anim = this,
8031
- style = elem.style,
8032
8121
  orig = {},
8033
- handled = [],
8034
- hidden = elem.nodeType && isHidden( elem );
8122
+ style = elem.style,
8123
+ hidden = elem.nodeType && isHidden( elem ),
8124
+ dataShow = data_priv.get( elem, "fxshow" );
8035
8125
 
8036
8126
  // handle queue: false promises
8037
8127
  if ( !opts.queue ) {
@@ -8087,30 +8177,31 @@ function defaultPrefilter( elem, props, opts ) {
8087
8177
 
8088
8178
 
8089
8179
  // show/hide pass
8090
- dataShow = data_priv.get( elem, "fxshow" );
8091
- for ( index in props ) {
8092
- value = props[ index ];
8180
+ for ( prop in props ) {
8181
+ value = props[ prop ];
8093
8182
  if ( rfxtypes.exec( value ) ) {
8094
- delete props[ index ];
8183
+ delete props[ prop ];
8095
8184
  toggle = toggle || value === "toggle";
8096
8185
  if ( value === ( hidden ? "hide" : "show" ) ) {
8097
8186
 
8098
8187
  // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
8099
- if( value === "show" && dataShow !== undefined && dataShow[ index ] !== undefined ) {
8188
+ if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
8100
8189
  hidden = true;
8101
8190
  } else {
8102
8191
  continue;
8103
8192
  }
8104
8193
  }
8105
- handled.push( index );
8194
+ orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
8106
8195
  }
8107
8196
  }
8108
8197
 
8109
- length = handled.length;
8110
- if ( length ) {
8111
- dataShow = data_priv.get( elem, "fxshow" ) || data_priv.access( elem, "fxshow", {} );
8112
- if ( "hidden" in dataShow ) {
8113
- hidden = dataShow.hidden;
8198
+ if ( !jQuery.isEmptyObject( orig ) ) {
8199
+ if ( dataShow ) {
8200
+ if ( "hidden" in dataShow ) {
8201
+ hidden = dataShow.hidden;
8202
+ }
8203
+ } else {
8204
+ dataShow = data_priv.access( elem, "fxshow", {} );
8114
8205
  }
8115
8206
 
8116
8207
  // store state if its toggle - enables .stop().toggle() to "reverse"
@@ -8132,10 +8223,8 @@ function defaultPrefilter( elem, props, opts ) {
8132
8223
  jQuery.style( elem, prop, orig[ prop ] );
8133
8224
  }
8134
8225
  });
8135
- for ( index = 0 ; index < length ; index++ ) {
8136
- prop = handled[ index ];
8137
- tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );
8138
- orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );
8226
+ for ( prop in orig ) {
8227
+ tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
8139
8228
 
8140
8229
  if ( !( prop in dataShow ) ) {
8141
8230
  dataShow[ prop ] = tween.start;
@@ -8266,9 +8355,7 @@ jQuery.fn.extend({
8266
8355
  doAnimation = function() {
8267
8356
  // Operate on a copy of prop so per-property easing won't be lost
8268
8357
  var anim = Animation( this, jQuery.extend( {}, prop ), optall );
8269
- doAnimation.finish = function() {
8270
- anim.stop( true );
8271
- };
8358
+
8272
8359
  // Empty animations, or finishing resolves immediately
8273
8360
  if ( empty || data_priv.get( this, "finish" ) ) {
8274
8361
  anim.stop( true );
@@ -8348,8 +8435,8 @@ jQuery.fn.extend({
8348
8435
  // empty the queue first
8349
8436
  jQuery.queue( this, type, [] );
8350
8437
 
8351
- if ( hooks && hooks.cur && hooks.cur.finish ) {
8352
- hooks.cur.finish.call( this );
8438
+ if ( hooks && hooks.stop ) {
8439
+ hooks.stop.call( this, true );
8353
8440
  }
8354
8441
 
8355
8442
  // look for any active animations, and finish them
@@ -8727,7 +8814,7 @@ jQuery.fn.size = function() {
8727
8814
  jQuery.fn.andSelf = jQuery.fn.addBack;
8728
8815
 
8729
8816
  // })();
8730
- if ( typeof module === "object" && typeof module.exports === "object" ) {
8817
+ if ( typeof module === "object" && module && typeof module.exports === "object" ) {
8731
8818
  // Expose jQuery as module.exports in loaders that implement the Node
8732
8819
  // module pattern (including browserify). Do not create the global, since
8733
8820
  // the user will be storing it themselves locally, and globals are frowned