loco-rails 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/loco/js_assets_structure/js_assets_structure_generator.rb +1 -1
- data/lib/loco/version.rb +1 -1
- data/test/dummy/bower.json +3 -3
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +914 -0
- data/test/dummy/log/test.log +14364 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/1-WO2UjmfLs4SpjVZdSJGGMzBEsVGyxycwsDwVEQj1k.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/1lwmN4qs8MJAzC_yfG97s_SBsqDZ7S3tjAhKpSGRoPk.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/2W9ni6toILqWfZF81i5tLooI3KkJgLMV2Um69h4tACE.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/888aULOiH1o8nErYVbar7so8TSiHMnVRkCJVrsFow-8.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/C2zMBdauRoyKtP5-Hbx-3FKU63Wir8HxxhnsEQjnye4.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/KmN1A2cbnIa89JVXdNUnbxekW6XoG37uQ7TOrUmla6M.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/N2LaSeSkH9O3-nDAwbgQ3fvF1RyzULzIdW9tRkCFdiE.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/NMX4CbiSfseLfHWah6QjF3ka-_q8iZ35lDHxpx5HZBc.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/O97vuogdZekuQD9891VkdZtj2Ah9a6j_9SdFgHpRZPk.cache +3 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/RgNfOjSuRN575tirFTi553UywDtiZquNSKAUN4t_37E.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/URfsWTq0WfX5JFf50HidIK1kGXYILlI3krzHQOlpGFw.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/UqKz2K55R9dWSo9wYoLdN5lxNUXJFqA_7eipeyHMqQc.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/WspjnlaWGkNP36-eIBusMx-VcvbF81RZ3L495DxSNNg.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/XUYO10EzvYAECtPUgdBF8rPWs9x6tndCxSwdhYWmDpQ.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ckF-gg5mdNyYLK2tDms9BdsP1vFw5VYxZ11u7l8vzfc.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/cxoptH0sPRJzPLP351ISNHPjig_W2A_-5fLVnK3tFu0.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/k5GkEt2yH5INFBgLUTsGEmzjRr5Ngh6FiXYfmbqh-Tg.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/zIWnum7SG2OPux4uomf0kHpIZ5Nl1NfTAoHCdkHwZIY.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/zgdP9EhEWd05XIYSWZx4uQKkuRklpRj6KiShg6HqIRo.cache +0 -0
- data/test/dummy/vendor/assets/bower_components/jquery/AUTHORS.txt +53 -24
- data/test/dummy/vendor/assets/bower_components/jquery/dist/core.js +481 -0
- data/test/dummy/vendor/assets/bower_components/jquery/dist/jquery.js +2706 -3647
- data/test/dummy/vendor/assets/bower_components/jquery/dist/jquery.min.js +4 -5
- data/test/dummy/vendor/assets/bower_components/jquery/dist/jquery.min.map +1 -1
- data/test/dummy/vendor/assets/bower_components/jquery/dist/jquery.slim.js +533 -444
- data/test/dummy/vendor/assets/bower_components/jquery/dist/jquery.slim.min.js +4 -4
- data/test/dummy/vendor/assets/bower_components/jquery/dist/jquery.slim.min.map +1 -1
- data/test/dummy/vendor/assets/bower_components/jquery/{sizzle → external/sizzle}/LICENSE.txt +0 -0
- data/test/dummy/vendor/assets/bower_components/jquery/{sizzle → external/sizzle}/dist/sizzle.js +154 -80
- data/test/dummy/vendor/assets/bower_components/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/test/dummy/vendor/assets/bower_components/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/jsonp.js +5 -3
- data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/load.js +3 -11
- data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/parseXML.js +9 -10
- data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/script.js +26 -44
- data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/var/location.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/var/nonce.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/var/rquery.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/xhr.js +138 -198
- data/test/dummy/vendor/assets/bower_components/jquery/src/ajax.js +104 -91
- data/test/dummy/vendor/assets/bower_components/jquery/src/attributes/attr.js +23 -167
- data/test/dummy/vendor/assets/bower_components/jquery/src/attributes/classes.js +18 -13
- data/test/dummy/vendor/assets/bower_components/jquery/src/attributes/prop.js +9 -37
- data/test/dummy/vendor/assets/bower_components/jquery/src/attributes/support.js +12 -49
- data/test/dummy/vendor/assets/bower_components/jquery/src/attributes/val.js +21 -28
- data/test/dummy/vendor/assets/bower_components/jquery/src/attributes.js +4 -2
- data/test/dummy/vendor/assets/bower_components/jquery/src/callbacks.js +5 -3
- data/test/dummy/vendor/assets/bower_components/jquery/src/core/DOMEval.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/core/access.js +8 -6
- data/test/dummy/vendor/assets/bower_components/jquery/src/core/init.js +13 -26
- data/test/dummy/vendor/assets/bower_components/jquery/src/core/parseHTML.js +32 -8
- data/test/dummy/vendor/assets/bower_components/jquery/src/core/ready-no-deferred.js +111 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/core/ready.js +32 -100
- data/test/dummy/vendor/assets/bower_components/jquery/src/core/readyException.js +13 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/core/support.js +3 -1
- data/test/dummy/vendor/assets/bower_components/jquery/src/core/var/rsingleTag.js +2 -1
- data/test/dummy/vendor/assets/bower_components/jquery/src/core.js +71 -119
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/addGetHookIf.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/adjustCSS.js +8 -2
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/curCSS.js +34 -112
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/hiddenVisibleSelectors.js +7 -28
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/showHide.js +69 -9
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/support.js +48 -142
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/cssExpand.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/getStyles.js +3 -1
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/isHiddenWithinTree.js +34 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/rmargin.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/rnumnonpx.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/swap.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/css.js +71 -223
- data/test/dummy/vendor/assets/bower_components/jquery/src/data/Data.js +24 -63
- data/test/dummy/vendor/assets/bower_components/jquery/src/data/var/acceptData.js +11 -12
- data/test/dummy/vendor/assets/bower_components/jquery/src/data/var/dataPriv.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/data/var/dataUser.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/data.js +66 -247
- data/test/dummy/vendor/assets/bower_components/jquery/src/deferred/exceptionHook.js +4 -2
- data/test/dummy/vendor/assets/bower_components/jquery/src/deferred.js +290 -60
- data/test/dummy/vendor/assets/bower_components/jquery/src/deprecated.js +4 -8
- data/test/dummy/vendor/assets/bower_components/jquery/src/dimensions.js +9 -9
- data/test/dummy/vendor/assets/bower_components/jquery/src/effects/Tween.js +11 -9
- data/test/dummy/vendor/assets/bower_components/jquery/src/effects/animatedSelector.js +3 -1
- data/test/dummy/vendor/assets/bower_components/jquery/src/effects.js +183 -135
- data/test/dummy/vendor/assets/bower_components/jquery/src/event/ajax.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/event/alias.js +7 -3
- data/test/dummy/vendor/assets/bower_components/jquery/src/event/focusin.js +5 -3
- data/test/dummy/vendor/assets/bower_components/jquery/src/event/support.js +3 -20
- data/test/dummy/vendor/assets/bower_components/jquery/src/event/trigger.js +4 -18
- data/test/dummy/vendor/assets/bower_components/jquery/src/event.js +145 -553
- data/test/dummy/vendor/assets/bower_components/jquery/src/exports/amd.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/exports/global.js +10 -2
- data/test/dummy/vendor/assets/bower_components/jquery/src/jquery.js +4 -1
- data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/_evalUrl.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/buildFragment.js +22 -75
- data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/getAll.js +9 -19
- data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/setGlobalEval.js +11 -8
- data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/support.js +13 -50
- data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/var/rcheckableType.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/var/rscriptType.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/var/rtagName.js +3 -1
- data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/wrapMap.js +11 -12
- data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation.js +104 -203
- data/test/dummy/vendor/assets/bower_components/jquery/src/offset.js +64 -51
- data/test/dummy/vendor/assets/bower_components/jquery/src/queue/delay.js +3 -1
- data/test/dummy/vendor/assets/bower_components/jquery/src/queue.js +12 -11
- data/test/dummy/vendor/assets/bower_components/jquery/src/selector-native.js +29 -3
- data/test/dummy/vendor/assets/bower_components/jquery/src/selector-sizzle.js +5 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/selector.js +3 -1
- data/test/dummy/vendor/assets/bower_components/jquery/src/serialize.js +13 -12
- data/test/dummy/vendor/assets/bower_components/jquery/src/traversing/findFilter.js +9 -10
- data/test/dummy/vendor/assets/bower_components/jquery/src/traversing/var/dir.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/traversing/var/rneedsContext.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/traversing/var/siblings.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/traversing.js +36 -37
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/ObjectFunctionString.js +7 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/arr.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/class2type.js +1 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/concat.js +5 -3
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/document.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/documentElement.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/fnToString.js +7 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/getProto.js +5 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/hasOwn.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/indexOf.js +5 -3
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/pnum.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/push.js +5 -3
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/rcssNum.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/rnotwhite.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/slice.js +5 -3
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/support.js +1 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/toString.js +2 -0
- data/test/dummy/vendor/assets/bower_components/jquery/src/wrap.js +14 -14
- data/test/dummy/vendor/assets/bower_components/lie/bower.json +1 -1
- data/test/dummy/vendor/assets/bower_components/lie/component.json +1 -1
- data/test/dummy/vendor/assets/bower_components/lie/dist/lie.js +80 -80
- data/test/dummy/vendor/assets/bower_components/lie/dist/lie.min.js +1 -1
- data/test/dummy/vendor/assets/bower_components/lie/dist/lie.polyfill.js +9 -9
- data/test/dummy/vendor/assets/bower_components/lie/dist/lie.polyfill.min.js +1 -1
- data/test/dummy/vendor/assets/bower_components/lie/lib/browser.js +253 -0
- data/test/dummy/vendor/assets/bower_components/lie/lib/index.js +5 -5
- data/test/dummy/vendor/assets/bower_components/lie/package.json +28 -19
- data/test/dummy/vendor/assets/bower_components/lie/src/index.js +278 -0
- metadata +62 -36
- data/test/dummy/vendor/assets/bower_components/jquery/sizzle/dist/sizzle.min.js +0 -3
- data/test/dummy/vendor/assets/bower_components/jquery/sizzle/dist/sizzle.min.map +0 -1
- data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/parseJSON.js +0 -53
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/defaultDisplay.js +0 -72
- data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/isHidden.js +0 -16
- data/test/dummy/vendor/assets/bower_components/jquery/src/data/accepts.js +0 -20
- data/test/dummy/vendor/assets/bower_components/jquery/src/data/support.js +0 -23
- data/test/dummy/vendor/assets/bower_components/jquery/src/effects/support.js +0 -58
- data/test/dummy/vendor/assets/bower_components/jquery/src/intro.js +0 -44
- data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/createSafeFragment.js +0 -20
- data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/var/nodeNames.js +0 -5
- data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/var/rleadingWhitespace.js +0 -3
- data/test/dummy/vendor/assets/bower_components/jquery/src/outro.js +0 -2
- data/test/dummy/vendor/assets/bower_components/jquery/src/support.js +0 -63
- data/test/dummy/vendor/assets/bower_components/jquery/src/var/deletedIds.js +0 -3
@@ -1,5 +1,6 @@
|
|
1
|
+
/*eslint-disable no-unused-vars*/
|
1
2
|
/*!
|
2
|
-
* jQuery JavaScript Library v3.
|
3
|
+
* jQuery JavaScript Library v3.1.0 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector,-deprecated
|
3
4
|
* https://jquery.com/
|
4
5
|
*
|
5
6
|
* Includes Sizzle.js
|
@@ -9,12 +10,14 @@
|
|
9
10
|
* Released under the MIT license
|
10
11
|
* https://jquery.org/license
|
11
12
|
*
|
12
|
-
* Date: 2016-
|
13
|
+
* Date: 2016-07-07T21:44Z
|
13
14
|
*/
|
15
|
+
( function( global, factory ) {
|
14
16
|
|
15
|
-
|
17
|
+
"use strict";
|
16
18
|
|
17
19
|
if ( typeof module === "object" && typeof module.exports === "object" ) {
|
20
|
+
|
18
21
|
// For CommonJS and CommonJS-like environments where a proper `window`
|
19
22
|
// is present, execute the factory and get jQuery.
|
20
23
|
// For environments that do not have a `window` with a `document`
|
@@ -35,17 +38,20 @@
|
|
35
38
|
}
|
36
39
|
|
37
40
|
// Pass this if window is not defined yet
|
38
|
-
}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
|
41
|
+
} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
|
42
|
+
|
43
|
+
// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
|
44
|
+
// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
|
45
|
+
// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common
|
46
|
+
// enough that all such attempts are guarded in a try block.
|
47
|
+
"use strict";
|
39
48
|
|
40
|
-
// Support: Firefox 18+
|
41
|
-
// Can't be in strict mode, several libs including ASP.NET trace
|
42
|
-
// the stack via arguments.caller.callee and Firefox dies if
|
43
|
-
// you try to trace through "use strict" call chains. (#13335)
|
44
|
-
//"use strict";
|
45
49
|
var arr = [];
|
46
50
|
|
47
51
|
var document = window.document;
|
48
52
|
|
53
|
+
var getProto = Object.getPrototypeOf;
|
54
|
+
|
49
55
|
var slice = arr.slice;
|
50
56
|
|
51
57
|
var concat = arr.concat;
|
@@ -60,9 +66,14 @@ var toString = class2type.toString;
|
|
60
66
|
|
61
67
|
var hasOwn = class2type.hasOwnProperty;
|
62
68
|
|
69
|
+
var fnToString = hasOwn.toString;
|
70
|
+
|
71
|
+
var ObjectFunctionString = fnToString.call( Object );
|
72
|
+
|
63
73
|
var support = {};
|
64
74
|
|
65
75
|
|
76
|
+
|
66
77
|
function DOMEval( code, doc ) {
|
67
78
|
doc = doc || document;
|
68
79
|
|
@@ -71,10 +82,14 @@ var support = {};
|
|
71
82
|
script.text = code;
|
72
83
|
doc.head.appendChild( script ).parentNode.removeChild( script );
|
73
84
|
}
|
85
|
+
/* global Symbol */
|
86
|
+
// Defining this global in .eslintrc would create a danger of using the global
|
87
|
+
// unguarded in another place, it seems safer to define global only for this module
|
88
|
+
|
74
89
|
|
75
90
|
|
76
91
|
var
|
77
|
-
version = "3.
|
92
|
+
version = "3.1.0 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector,-deprecated",
|
78
93
|
|
79
94
|
// Define a local copy of jQuery
|
80
95
|
jQuery = function( selector, context ) {
|
@@ -84,7 +99,7 @@ var
|
|
84
99
|
return new jQuery.fn.init( selector, context );
|
85
100
|
},
|
86
101
|
|
87
|
-
// Support: Android
|
102
|
+
// Support: Android <=4.0 only
|
88
103
|
// Make sure we trim BOM and NBSP
|
89
104
|
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
90
105
|
|
@@ -277,31 +292,40 @@ jQuery.extend( {
|
|
277
292
|
// that can be coerced to finite numbers (gh-2662)
|
278
293
|
var type = jQuery.type( obj );
|
279
294
|
return ( type === "number" || type === "string" ) &&
|
280
|
-
|
295
|
+
|
296
|
+
// parseFloat NaNs numeric-cast false positives ("")
|
297
|
+
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
|
298
|
+
// subtraction forces infinities to NaN
|
299
|
+
!isNaN( obj - parseFloat( obj ) );
|
281
300
|
},
|
282
301
|
|
283
302
|
isPlainObject: function( obj ) {
|
303
|
+
var proto, Ctor;
|
284
304
|
|
285
|
-
//
|
286
|
-
//
|
287
|
-
|
288
|
-
// - window
|
289
|
-
if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
|
305
|
+
// Detect obvious negatives
|
306
|
+
// Use toString instead of jQuery.type to catch host objects
|
307
|
+
if ( !obj || toString.call( obj ) !== "[object Object]" ) {
|
290
308
|
return false;
|
291
309
|
}
|
292
310
|
|
293
|
-
|
294
|
-
|
295
|
-
|
311
|
+
proto = getProto( obj );
|
312
|
+
|
313
|
+
// Objects with no prototype (e.g., `Object.create( null )`) are plain
|
314
|
+
if ( !proto ) {
|
315
|
+
return true;
|
296
316
|
}
|
297
317
|
|
298
|
-
//
|
299
|
-
|
300
|
-
return
|
318
|
+
// Objects with prototype are plain iff they were constructed by a global Object function
|
319
|
+
Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
|
320
|
+
return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
|
301
321
|
},
|
302
322
|
|
303
323
|
isEmptyObject: function( obj ) {
|
324
|
+
|
325
|
+
/* eslint-disable no-unused-vars */
|
326
|
+
// See https://github.com/eslint/eslint/issues/6125
|
304
327
|
var name;
|
328
|
+
|
305
329
|
for ( name in obj ) {
|
306
330
|
return false;
|
307
331
|
}
|
@@ -313,7 +337,7 @@ jQuery.extend( {
|
|
313
337
|
return obj + "";
|
314
338
|
}
|
315
339
|
|
316
|
-
// Support: Android
|
340
|
+
// Support: Android <=2.3 only (functionish RegExp)
|
317
341
|
return typeof obj === "object" || typeof obj === "function" ?
|
318
342
|
class2type[ toString.call( obj ) ] || "object" :
|
319
343
|
typeof obj;
|
@@ -325,7 +349,7 @@ jQuery.extend( {
|
|
325
349
|
},
|
326
350
|
|
327
351
|
// Convert dashed to camelCase; used by the css and data modules
|
328
|
-
// Support:
|
352
|
+
// Support: IE <=9 - 11, Edge 12 - 13
|
329
353
|
// Microsoft forgot to hump their vendor prefix (#9572)
|
330
354
|
camelCase: function( string ) {
|
331
355
|
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
@@ -356,7 +380,7 @@ jQuery.extend( {
|
|
356
380
|
return obj;
|
357
381
|
},
|
358
382
|
|
359
|
-
// Support: Android
|
383
|
+
// Support: Android <=4.0 only
|
360
384
|
trim: function( text ) {
|
361
385
|
return text == null ?
|
362
386
|
"" :
|
@@ -385,7 +409,7 @@ jQuery.extend( {
|
|
385
409
|
return arr == null ? -1 : indexOf.call( arr, elem, i );
|
386
410
|
},
|
387
411
|
|
388
|
-
// Support: Android
|
412
|
+
// Support: Android <=4.0 only, PhantomJS 1 only
|
389
413
|
// push.apply(_, arraylike) throws on ancient WebKit
|
390
414
|
merge: function( first, second ) {
|
391
415
|
var len = +second.length,
|
@@ -491,15 +515,9 @@ jQuery.extend( {
|
|
491
515
|
support: support
|
492
516
|
} );
|
493
517
|
|
494
|
-
// JSHint would error on this code due to the Symbol not being defined in ES5.
|
495
|
-
// Defining this global in .jshintrc would create a danger of using the global
|
496
|
-
// unguarded in another place, it seems safer to just disable JSHint for these
|
497
|
-
// three lines.
|
498
|
-
/* jshint ignore: start */
|
499
518
|
if ( typeof Symbol === "function" ) {
|
500
519
|
jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
|
501
520
|
}
|
502
|
-
/* jshint ignore: end */
|
503
521
|
|
504
522
|
// Populate the class2type map
|
505
523
|
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
@@ -509,7 +527,7 @@ function( i, name ) {
|
|
509
527
|
|
510
528
|
function isArrayLike( obj ) {
|
511
529
|
|
512
|
-
// Support: iOS 8.2 (not reproducible in simulator)
|
530
|
+
// Support: real iOS 8.2 only (not reproducible in simulator)
|
513
531
|
// `in` check used to prevent JIT error (gh-2145)
|
514
532
|
// hasOwn isn't used here due to false negatives
|
515
533
|
// regarding Nodelist length in IE
|
@@ -2727,11 +2745,15 @@ return Sizzle;
|
|
2727
2745
|
|
2728
2746
|
jQuery.find = Sizzle;
|
2729
2747
|
jQuery.expr = Sizzle.selectors;
|
2748
|
+
|
2749
|
+
// Deprecated
|
2730
2750
|
jQuery.expr[ ":" ] = jQuery.expr.pseudos;
|
2731
2751
|
jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
|
2732
2752
|
jQuery.text = Sizzle.getText;
|
2733
2753
|
jQuery.isXMLDoc = Sizzle.isXML;
|
2734
2754
|
jQuery.contains = Sizzle.contains;
|
2755
|
+
jQuery.escapeSelector = Sizzle.escape;
|
2756
|
+
|
2735
2757
|
|
2736
2758
|
|
2737
2759
|
|
@@ -2776,7 +2798,6 @@ var risSimple = /^.[^:#\[\.,]*$/;
|
|
2776
2798
|
function winnow( elements, qualifier, not ) {
|
2777
2799
|
if ( jQuery.isFunction( qualifier ) ) {
|
2778
2800
|
return jQuery.grep( elements, function( elem, i ) {
|
2779
|
-
/* jshint -W018 */
|
2780
2801
|
return !!qualifier.call( elem, i, elem ) !== not;
|
2781
2802
|
} );
|
2782
2803
|
|
@@ -2818,9 +2839,8 @@ jQuery.filter = function( expr, elems, not ) {
|
|
2818
2839
|
|
2819
2840
|
jQuery.fn.extend( {
|
2820
2841
|
find: function( selector ) {
|
2821
|
-
var i,
|
2842
|
+
var i, ret,
|
2822
2843
|
len = this.length,
|
2823
|
-
ret = [],
|
2824
2844
|
self = this;
|
2825
2845
|
|
2826
2846
|
if ( typeof selector !== "string" ) {
|
@@ -2833,11 +2853,13 @@ jQuery.fn.extend( {
|
|
2833
2853
|
} ) );
|
2834
2854
|
}
|
2835
2855
|
|
2856
|
+
ret = this.pushStack( [] );
|
2857
|
+
|
2836
2858
|
for ( i = 0; i < len; i++ ) {
|
2837
2859
|
jQuery.find( selector, self[ i ], ret );
|
2838
2860
|
}
|
2839
2861
|
|
2840
|
-
return
|
2862
|
+
return len > 1 ? jQuery.uniqueSort( ret ) : ret;
|
2841
2863
|
},
|
2842
2864
|
filter: function( selector ) {
|
2843
2865
|
return this.pushStack( winnow( this, selector || [], false ) );
|
@@ -3377,6 +3399,38 @@ function Thrower( ex ) {
|
|
3377
3399
|
throw ex;
|
3378
3400
|
}
|
3379
3401
|
|
3402
|
+
function adoptValue( value, resolve, reject ) {
|
3403
|
+
var method;
|
3404
|
+
|
3405
|
+
try {
|
3406
|
+
|
3407
|
+
// Check for promise aspect first to privilege synchronous behavior
|
3408
|
+
if ( value && jQuery.isFunction( ( method = value.promise ) ) ) {
|
3409
|
+
method.call( value ).done( resolve ).fail( reject );
|
3410
|
+
|
3411
|
+
// Other thenables
|
3412
|
+
} else if ( value && jQuery.isFunction( ( method = value.then ) ) ) {
|
3413
|
+
method.call( value, resolve, reject );
|
3414
|
+
|
3415
|
+
// Other non-thenables
|
3416
|
+
} else {
|
3417
|
+
|
3418
|
+
// Support: Android 4.0 only
|
3419
|
+
// Strict mode functions invoked without .call/.apply get global-object context
|
3420
|
+
resolve.call( undefined, value );
|
3421
|
+
}
|
3422
|
+
|
3423
|
+
// For Promises/A+, convert exceptions into rejections
|
3424
|
+
// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
|
3425
|
+
// Deferred#then to conditionally suppress rejection.
|
3426
|
+
} catch ( value ) {
|
3427
|
+
|
3428
|
+
// Support: Android 4.0 only
|
3429
|
+
// Strict mode functions invoked without .call/.apply get global-object context
|
3430
|
+
reject.call( undefined, value );
|
3431
|
+
}
|
3432
|
+
}
|
3433
|
+
|
3380
3434
|
jQuery.extend( {
|
3381
3435
|
|
3382
3436
|
Deferred: function( func ) {
|
@@ -3426,7 +3480,7 @@ jQuery.extend( {
|
|
3426
3480
|
.fail( newDefer.reject );
|
3427
3481
|
} else {
|
3428
3482
|
newDefer[ tuple[ 0 ] + "With" ](
|
3429
|
-
this
|
3483
|
+
this,
|
3430
3484
|
fn ? [ returned ] : arguments
|
3431
3485
|
);
|
3432
3486
|
}
|
@@ -3439,7 +3493,7 @@ jQuery.extend( {
|
|
3439
3493
|
var maxDepth = 0;
|
3440
3494
|
function resolve( depth, deferred, handler, special ) {
|
3441
3495
|
return function() {
|
3442
|
-
var that = this
|
3496
|
+
var that = this,
|
3443
3497
|
args = arguments,
|
3444
3498
|
mightThrow = function() {
|
3445
3499
|
var returned, then;
|
@@ -3494,7 +3548,7 @@ jQuery.extend( {
|
|
3494
3548
|
resolve( maxDepth, deferred, Identity, special ),
|
3495
3549
|
resolve( maxDepth, deferred, Thrower, special ),
|
3496
3550
|
resolve( maxDepth, deferred, Identity,
|
3497
|
-
deferred.
|
3551
|
+
deferred.notifyWith )
|
3498
3552
|
);
|
3499
3553
|
}
|
3500
3554
|
|
@@ -3510,8 +3564,7 @@ jQuery.extend( {
|
|
3510
3564
|
|
3511
3565
|
// Process the value(s)
|
3512
3566
|
// Default process is resolve
|
3513
|
-
( special || deferred.resolveWith )(
|
3514
|
-
that || deferred.promise(), args );
|
3567
|
+
( special || deferred.resolveWith )( that, args );
|
3515
3568
|
}
|
3516
3569
|
},
|
3517
3570
|
|
@@ -3540,8 +3593,7 @@ jQuery.extend( {
|
|
3540
3593
|
args = [ e ];
|
3541
3594
|
}
|
3542
3595
|
|
3543
|
-
deferred.rejectWith( that
|
3544
|
-
args );
|
3596
|
+
deferred.rejectWith( that, args );
|
3545
3597
|
}
|
3546
3598
|
}
|
3547
3599
|
};
|
@@ -3648,7 +3700,7 @@ jQuery.extend( {
|
|
3648
3700
|
// deferred.resolve = function() { deferred.resolveWith(...) }
|
3649
3701
|
// deferred.reject = function() { deferred.rejectWith(...) }
|
3650
3702
|
deferred[ tuple[ 0 ] ] = function() {
|
3651
|
-
deferred[ tuple[ 0 ] + "With" ]( this === deferred ?
|
3703
|
+
deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
|
3652
3704
|
return this;
|
3653
3705
|
};
|
3654
3706
|
|
@@ -3671,62 +3723,48 @@ jQuery.extend( {
|
|
3671
3723
|
},
|
3672
3724
|
|
3673
3725
|
// Deferred helper
|
3674
|
-
when: function() {
|
3675
|
-
var
|
3676
|
-
|
3677
|
-
|
3678
|
-
|
3726
|
+
when: function( singleValue ) {
|
3727
|
+
var
|
3728
|
+
|
3729
|
+
// count of uncompleted subordinates
|
3730
|
+
remaining = arguments.length,
|
3731
|
+
|
3732
|
+
// count of unprocessed arguments
|
3733
|
+
i = remaining,
|
3679
3734
|
|
3680
|
-
//
|
3681
|
-
|
3735
|
+
// subordinate fulfillment data
|
3736
|
+
resolveContexts = Array( i ),
|
3737
|
+
resolveValues = slice.call( arguments ),
|
3682
3738
|
|
3683
|
-
// the master Deferred
|
3739
|
+
// the master Deferred
|
3684
3740
|
master = jQuery.Deferred(),
|
3685
3741
|
|
3686
|
-
//
|
3742
|
+
// subordinate callback factory
|
3687
3743
|
updateFunc = function( i ) {
|
3688
3744
|
return function( value ) {
|
3689
3745
|
resolveContexts[ i ] = this;
|
3690
3746
|
resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
|
3691
3747
|
if ( !( --remaining ) ) {
|
3692
|
-
master.resolveWith(
|
3693
|
-
resolveContexts.length === 1 ? resolveContexts[ 0 ] : resolveContexts,
|
3694
|
-
resolveValues
|
3695
|
-
);
|
3748
|
+
master.resolveWith( resolveContexts, resolveValues );
|
3696
3749
|
}
|
3697
3750
|
};
|
3698
3751
|
};
|
3699
3752
|
|
3700
|
-
//
|
3701
|
-
if (
|
3702
|
-
|
3703
|
-
for ( ; i < length; i++ ) {
|
3753
|
+
// Single- and empty arguments are adopted like Promise.resolve
|
3754
|
+
if ( remaining <= 1 ) {
|
3755
|
+
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject );
|
3704
3756
|
|
3705
|
-
|
3706
|
-
|
3707
|
-
|
3757
|
+
// Use .then() to unwrap secondary thenables (cf. gh-3000)
|
3758
|
+
if ( master.state() === "pending" ||
|
3759
|
+
jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
|
3708
3760
|
|
3709
|
-
|
3710
|
-
.done( updateFunc( i ) )
|
3711
|
-
.fail( master.reject );
|
3712
|
-
|
3713
|
-
// Other thenables
|
3714
|
-
} else if ( resolveValues[ i ] &&
|
3715
|
-
jQuery.isFunction( ( method = resolveValues[ i ].then ) ) ) {
|
3716
|
-
|
3717
|
-
method.call(
|
3718
|
-
resolveValues[ i ],
|
3719
|
-
updateFunc( i ),
|
3720
|
-
master.reject
|
3721
|
-
);
|
3722
|
-
} else {
|
3723
|
-
updateFunc( i )( resolveValues[ i ] );
|
3724
|
-
}
|
3761
|
+
return master.then();
|
3725
3762
|
}
|
3763
|
+
}
|
3726
3764
|
|
3727
|
-
//
|
3728
|
-
|
3729
|
-
master.
|
3765
|
+
// Multiple arguments are aggregated like Promise.all array elements
|
3766
|
+
while ( i-- ) {
|
3767
|
+
adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
|
3730
3768
|
}
|
3731
3769
|
|
3732
3770
|
return master.promise();
|
@@ -3740,23 +3778,39 @@ var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
|
|
3740
3778
|
|
3741
3779
|
jQuery.Deferred.exceptionHook = function( error, stack ) {
|
3742
3780
|
|
3743
|
-
// Support:
|
3781
|
+
// Support: IE 8 - 9 only
|
3744
3782
|
// Console exists when dev tools are open, which can happen at any time
|
3745
3783
|
if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
|
3746
|
-
window.console.warn( "jQuery.Deferred exception: " + error.message, stack );
|
3784
|
+
window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
|
3747
3785
|
}
|
3748
3786
|
};
|
3749
3787
|
|
3750
3788
|
|
3751
3789
|
|
3752
3790
|
|
3791
|
+
jQuery.readyException = function( error ) {
|
3792
|
+
window.setTimeout( function() {
|
3793
|
+
throw error;
|
3794
|
+
} );
|
3795
|
+
};
|
3796
|
+
|
3797
|
+
|
3798
|
+
|
3799
|
+
|
3753
3800
|
// The deferred used on DOM ready
|
3754
|
-
var readyList;
|
3801
|
+
var readyList = jQuery.Deferred();
|
3755
3802
|
|
3756
3803
|
jQuery.fn.ready = function( fn ) {
|
3757
3804
|
|
3758
|
-
|
3759
|
-
|
3805
|
+
readyList
|
3806
|
+
.then( fn )
|
3807
|
+
|
3808
|
+
// Wrap jQuery.readyException in a function so that the lookup
|
3809
|
+
// happens at the time of error handling instead of callback
|
3810
|
+
// registration.
|
3811
|
+
.catch( function( error ) {
|
3812
|
+
jQuery.readyException( error );
|
3813
|
+
} );
|
3760
3814
|
|
3761
3815
|
return this;
|
3762
3816
|
};
|
@@ -3800,44 +3854,33 @@ jQuery.extend( {
|
|
3800
3854
|
}
|
3801
3855
|
} );
|
3802
3856
|
|
3803
|
-
|
3804
|
-
|
3805
|
-
|
3857
|
+
jQuery.ready.then = readyList.then;
|
3858
|
+
|
3859
|
+
// The ready event handler and self cleanup method
|
3806
3860
|
function completed() {
|
3807
3861
|
document.removeEventListener( "DOMContentLoaded", completed );
|
3808
3862
|
window.removeEventListener( "load", completed );
|
3809
3863
|
jQuery.ready();
|
3810
3864
|
}
|
3811
3865
|
|
3812
|
-
|
3813
|
-
|
3866
|
+
// Catch cases where $(document).ready() is called
|
3867
|
+
// after the browser event has already occurred.
|
3868
|
+
// Support: IE <=9 - 10 only
|
3869
|
+
// Older IE sometimes signals "interactive" too soon
|
3870
|
+
if ( document.readyState === "complete" ||
|
3871
|
+
( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
|
3814
3872
|
|
3815
|
-
|
3873
|
+
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
3874
|
+
window.setTimeout( jQuery.ready );
|
3816
3875
|
|
3817
|
-
|
3818
|
-
// after the browser event has already occurred.
|
3819
|
-
// Support: IE9-10 only
|
3820
|
-
// Older IE sometimes signals "interactive" too soon
|
3821
|
-
if ( document.readyState === "complete" ||
|
3822
|
-
( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
|
3823
|
-
|
3824
|
-
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
3825
|
-
window.setTimeout( jQuery.ready );
|
3826
|
-
|
3827
|
-
} else {
|
3876
|
+
} else {
|
3828
3877
|
|
3829
|
-
|
3830
|
-
|
3878
|
+
// Use the handy event callback
|
3879
|
+
document.addEventListener( "DOMContentLoaded", completed );
|
3831
3880
|
|
3832
|
-
|
3833
|
-
|
3834
|
-
|
3835
|
-
}
|
3836
|
-
return readyList.promise( obj );
|
3837
|
-
};
|
3838
|
-
|
3839
|
-
// Kick off the DOM ready check even if the user does not
|
3840
|
-
jQuery.ready.promise();
|
3881
|
+
// A fallback to window.onload, that will always work
|
3882
|
+
window.addEventListener( "load", completed );
|
3883
|
+
}
|
3841
3884
|
|
3842
3885
|
|
3843
3886
|
|
@@ -3907,7 +3950,6 @@ var acceptData = function( owner ) {
|
|
3907
3950
|
// - Node.DOCUMENT_NODE
|
3908
3951
|
// - Object
|
3909
3952
|
// - Any
|
3910
|
-
/* jshint -W018 */
|
3911
3953
|
return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
|
3912
3954
|
};
|
3913
3955
|
|
@@ -4048,10 +4090,10 @@ Data.prototype = {
|
|
4048
4090
|
// Remove the expando if there's no more data
|
4049
4091
|
if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
|
4050
4092
|
|
4051
|
-
// Support: Chrome <=
|
4093
|
+
// Support: Chrome <=35 - 45
|
4052
4094
|
// Webkit & Blink performance suffers when deleting properties
|
4053
4095
|
// from DOM nodes, so set to undefined instead
|
4054
|
-
// https://
|
4096
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
|
4055
4097
|
if ( owner.nodeType ) {
|
4056
4098
|
owner[ this.expando ] = undefined;
|
4057
4099
|
} else {
|
@@ -4100,7 +4142,7 @@ function dataAttr( elem, key, data ) {
|
|
4100
4142
|
|
4101
4143
|
// Only convert to a number if it doesn't change the string
|
4102
4144
|
+data + "" === data ? +data :
|
4103
|
-
rbrace.test( data ) ?
|
4145
|
+
rbrace.test( data ) ? JSON.parse( data ) :
|
4104
4146
|
data;
|
4105
4147
|
} catch ( e ) {}
|
4106
4148
|
|
@@ -4152,7 +4194,7 @@ jQuery.fn.extend( {
|
|
4152
4194
|
i = attrs.length;
|
4153
4195
|
while ( i-- ) {
|
4154
4196
|
|
4155
|
-
// Support:
|
4197
|
+
// Support: IE 11 only
|
4156
4198
|
// The attrs elements can be null (#14894)
|
4157
4199
|
if ( attrs[ i ] ) {
|
4158
4200
|
name = attrs[ i ].name;
|
@@ -4361,13 +4403,23 @@ var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
|
|
4361
4403
|
|
4362
4404
|
var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
|
4363
4405
|
|
4364
|
-
var
|
4406
|
+
var isHiddenWithinTree = function( elem, el ) {
|
4365
4407
|
|
4366
|
-
//
|
4408
|
+
// isHiddenWithinTree might be called from jQuery#filter function;
|
4367
4409
|
// in that case, element will be second argument
|
4368
4410
|
elem = el || elem;
|
4369
|
-
|
4370
|
-
|
4411
|
+
|
4412
|
+
// Inline style trumps all
|
4413
|
+
return elem.style.display === "none" ||
|
4414
|
+
elem.style.display === "" &&
|
4415
|
+
|
4416
|
+
// Otherwise, check computed style
|
4417
|
+
// Support: Firefox <=43 - 45
|
4418
|
+
// Disconnected elements can have computed display: none, so first confirm that elem is
|
4419
|
+
// in the document.
|
4420
|
+
jQuery.contains( elem.ownerDocument, elem ) &&
|
4421
|
+
|
4422
|
+
jQuery.css( elem, "display" ) === "none";
|
4371
4423
|
};
|
4372
4424
|
|
4373
4425
|
var swap = function( elem, options, callback, args ) {
|
@@ -4398,8 +4450,12 @@ function adjustCSS( elem, prop, valueParts, tween ) {
|
|
4398
4450
|
scale = 1,
|
4399
4451
|
maxIterations = 20,
|
4400
4452
|
currentValue = tween ?
|
4401
|
-
function() {
|
4402
|
-
|
4453
|
+
function() {
|
4454
|
+
return tween.cur();
|
4455
|
+
} :
|
4456
|
+
function() {
|
4457
|
+
return jQuery.css( elem, prop, "" );
|
4458
|
+
},
|
4403
4459
|
initial = currentValue(),
|
4404
4460
|
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
|
4405
4461
|
|
@@ -4502,12 +4558,7 @@ function showHide( elements, show ) {
|
|
4502
4558
|
elem.style.display = "";
|
4503
4559
|
}
|
4504
4560
|
}
|
4505
|
-
if ( elem.style.display === "" &&
|
4506
|
-
|
4507
|
-
// Support: Firefox <=42 - 43
|
4508
|
-
// Don't set inline display on disconnected elements with computed display: none
|
4509
|
-
jQuery.contains( elem.ownerDocument, elem ) ) {
|
4510
|
-
|
4561
|
+
if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
|
4511
4562
|
values[ index ] = getDefaultDisplay( elem );
|
4512
4563
|
}
|
4513
4564
|
} else {
|
@@ -4543,7 +4594,7 @@ jQuery.fn.extend( {
|
|
4543
4594
|
}
|
4544
4595
|
|
4545
4596
|
return this.each( function() {
|
4546
|
-
if (
|
4597
|
+
if ( isHiddenWithinTree( this ) ) {
|
4547
4598
|
jQuery( this ).show();
|
4548
4599
|
} else {
|
4549
4600
|
jQuery( this ).hide();
|
@@ -4562,7 +4613,7 @@ var rscriptType = ( /^$|\/(?:java|ecma)script/i );
|
|
4562
4613
|
// We have to close these tags to support XHTML (#13200)
|
4563
4614
|
var wrapMap = {
|
4564
4615
|
|
4565
|
-
// Support:
|
4616
|
+
// Support: IE <=9 only
|
4566
4617
|
option: [ 1, "<select multiple='multiple'>", "</select>" ],
|
4567
4618
|
|
4568
4619
|
// XHTML parsers do not magically insert elements in the
|
@@ -4576,7 +4627,7 @@ var wrapMap = {
|
|
4576
4627
|
_default: [ 0, "", "" ]
|
4577
4628
|
};
|
4578
4629
|
|
4579
|
-
// Support:
|
4630
|
+
// Support: IE <=9 only
|
4580
4631
|
wrapMap.optgroup = wrapMap.option;
|
4581
4632
|
|
4582
4633
|
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
|
@@ -4585,7 +4636,7 @@ wrapMap.th = wrapMap.td;
|
|
4585
4636
|
|
4586
4637
|
function getAll( context, tag ) {
|
4587
4638
|
|
4588
|
-
// Support:
|
4639
|
+
// Support: IE <=9 - 11 only
|
4589
4640
|
// Use typeof to avoid zero-argument method invocation on host objects (#15151)
|
4590
4641
|
var ret = typeof context.getElementsByTagName !== "undefined" ?
|
4591
4642
|
context.getElementsByTagName( tag || "*" ) :
|
@@ -4631,7 +4682,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|
4631
4682
|
// Add nodes directly
|
4632
4683
|
if ( jQuery.type( elem ) === "object" ) {
|
4633
4684
|
|
4634
|
-
// Support: Android
|
4685
|
+
// Support: Android <=4.0 only, PhantomJS 1 only
|
4635
4686
|
// push.apply(_, arraylike) throws on ancient WebKit
|
4636
4687
|
jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
|
4637
4688
|
|
@@ -4654,7 +4705,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|
4654
4705
|
tmp = tmp.lastChild;
|
4655
4706
|
}
|
4656
4707
|
|
4657
|
-
// Support: Android
|
4708
|
+
// Support: Android <=4.0 only, PhantomJS 1 only
|
4658
4709
|
// push.apply(_, arraylike) throws on ancient WebKit
|
4659
4710
|
jQuery.merge( nodes, tmp.childNodes );
|
4660
4711
|
|
@@ -4711,7 +4762,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|
4711
4762
|
div = fragment.appendChild( document.createElement( "div" ) ),
|
4712
4763
|
input = document.createElement( "input" );
|
4713
4764
|
|
4714
|
-
// Support: Android 4.0-4.3
|
4765
|
+
// Support: Android 4.0 - 4.3 only
|
4715
4766
|
// Check state lost if the name is set (#11217)
|
4716
4767
|
// Support: Windows Web Apps (WWA)
|
4717
4768
|
// `name` and `type` must use .setAttribute for WWA (#14901)
|
@@ -4721,15 +4772,17 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|
4721
4772
|
|
4722
4773
|
div.appendChild( input );
|
4723
4774
|
|
4724
|
-
// Support: Android
|
4775
|
+
// Support: Android <=4.1 only
|
4725
4776
|
// Older WebKit doesn't clone checked state correctly in fragments
|
4726
4777
|
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
4727
4778
|
|
4728
|
-
// Support: IE<=11
|
4779
|
+
// Support: IE <=11 only
|
4729
4780
|
// Make sure textarea (and checkbox) defaultValue is properly cloned
|
4730
4781
|
div.innerHTML = "<textarea>x</textarea>";
|
4731
4782
|
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
|
4732
4783
|
} )();
|
4784
|
+
var documentElement = document.documentElement;
|
4785
|
+
|
4733
4786
|
|
4734
4787
|
|
4735
4788
|
var
|
@@ -4745,7 +4798,7 @@ function returnFalse() {
|
|
4745
4798
|
return false;
|
4746
4799
|
}
|
4747
4800
|
|
4748
|
-
// Support:
|
4801
|
+
// Support: IE <=9 only
|
4749
4802
|
// See #13393 for more info
|
4750
4803
|
function safeActiveElement() {
|
4751
4804
|
try {
|
@@ -4793,6 +4846,8 @@ function on( elem, types, selector, data, fn, one ) {
|
|
4793
4846
|
}
|
4794
4847
|
if ( fn === false ) {
|
4795
4848
|
fn = returnFalse;
|
4849
|
+
} else if ( !fn ) {
|
4850
|
+
return elem;
|
4796
4851
|
}
|
4797
4852
|
|
4798
4853
|
if ( one === 1 ) {
|
@@ -4839,6 +4894,12 @@ jQuery.event = {
|
|
4839
4894
|
selector = handleObjIn.selector;
|
4840
4895
|
}
|
4841
4896
|
|
4897
|
+
// Ensure that invalid selectors throw exceptions at attach time
|
4898
|
+
// Evaluate against documentElement in case elem is a non-element node (e.g., document)
|
4899
|
+
if ( selector ) {
|
4900
|
+
jQuery.find.matchesSelector( documentElement, selector );
|
4901
|
+
}
|
4902
|
+
|
4842
4903
|
// Make sure that the handler has a unique ID, used to find/remove it later
|
4843
4904
|
if ( !handler.guid ) {
|
4844
4905
|
handler.guid = jQuery.guid++;
|
@@ -5002,19 +5063,23 @@ jQuery.event = {
|
|
5002
5063
|
}
|
5003
5064
|
},
|
5004
5065
|
|
5005
|
-
dispatch: function(
|
5066
|
+
dispatch: function( nativeEvent ) {
|
5006
5067
|
|
5007
5068
|
// Make a writable jQuery.Event from the native event object
|
5008
|
-
event = jQuery.event.fix(
|
5069
|
+
var event = jQuery.event.fix( nativeEvent );
|
5009
5070
|
|
5010
|
-
var i, j, ret, matched, handleObj,
|
5011
|
-
|
5012
|
-
args = slice.call( arguments ),
|
5071
|
+
var i, j, ret, matched, handleObj, handlerQueue,
|
5072
|
+
args = new Array( arguments.length ),
|
5013
5073
|
handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
|
5014
5074
|
special = jQuery.event.special[ event.type ] || {};
|
5015
5075
|
|
5016
5076
|
// Use the fix-ed jQuery.Event rather than the (read-only) native event
|
5017
5077
|
args[ 0 ] = event;
|
5078
|
+
|
5079
|
+
for ( i = 1; i < arguments.length; i++ ) {
|
5080
|
+
args[ i ] = arguments[ i ];
|
5081
|
+
}
|
5082
|
+
|
5018
5083
|
event.delegateTarget = this;
|
5019
5084
|
|
5020
5085
|
// Call the preDispatch hook for the mapped type, and let it bail if desired
|
@@ -5068,11 +5133,11 @@ jQuery.event = {
|
|
5068
5133
|
delegateCount = handlers.delegateCount,
|
5069
5134
|
cur = event.target;
|
5070
5135
|
|
5071
|
-
// Support
|
5136
|
+
// Support: IE <=9
|
5072
5137
|
// Find delegate handlers
|
5073
5138
|
// Black-hole SVG <use> instance trees (#13180)
|
5074
5139
|
//
|
5075
|
-
// Support: Firefox<=42
|
5140
|
+
// Support: Firefox <=42
|
5076
5141
|
// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
|
5077
5142
|
if ( delegateCount && cur.nodeType &&
|
5078
5143
|
( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
|
@@ -5113,90 +5178,38 @@ jQuery.event = {
|
|
5113
5178
|
return handlerQueue;
|
5114
5179
|
},
|
5115
5180
|
|
5116
|
-
|
5117
|
-
|
5118
|
-
|
5119
|
-
|
5120
|
-
fixHooks: {},
|
5121
|
-
|
5122
|
-
keyHooks: {
|
5123
|
-
props: "char charCode key keyCode".split( " " ),
|
5124
|
-
filter: function( event, original ) {
|
5125
|
-
|
5126
|
-
// Add which for key events
|
5127
|
-
if ( event.which == null ) {
|
5128
|
-
event.which = original.charCode != null ? original.charCode : original.keyCode;
|
5129
|
-
}
|
5130
|
-
|
5131
|
-
return event;
|
5132
|
-
}
|
5133
|
-
},
|
5134
|
-
|
5135
|
-
mouseHooks: {
|
5136
|
-
props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " +
|
5137
|
-
"screenX screenY toElement" ).split( " " ),
|
5138
|
-
filter: function( event, original ) {
|
5139
|
-
var eventDoc, doc, body,
|
5140
|
-
button = original.button;
|
5141
|
-
|
5142
|
-
// Calculate pageX/Y if missing and clientX/Y available
|
5143
|
-
if ( event.pageX == null && original.clientX != null ) {
|
5144
|
-
eventDoc = event.target.ownerDocument || document;
|
5145
|
-
doc = eventDoc.documentElement;
|
5146
|
-
body = eventDoc.body;
|
5181
|
+
addProp: function( name, hook ) {
|
5182
|
+
Object.defineProperty( jQuery.Event.prototype, name, {
|
5183
|
+
enumerable: true,
|
5184
|
+
configurable: true,
|
5147
5185
|
|
5148
|
-
|
5149
|
-
|
5150
|
-
(
|
5151
|
-
|
5152
|
-
|
5153
|
-
|
5154
|
-
|
5186
|
+
get: jQuery.isFunction( hook ) ?
|
5187
|
+
function() {
|
5188
|
+
if ( this.originalEvent ) {
|
5189
|
+
return hook( this.originalEvent );
|
5190
|
+
}
|
5191
|
+
} :
|
5192
|
+
function() {
|
5193
|
+
if ( this.originalEvent ) {
|
5194
|
+
return this.originalEvent[ name ];
|
5195
|
+
}
|
5196
|
+
},
|
5155
5197
|
|
5156
|
-
|
5157
|
-
|
5158
|
-
|
5159
|
-
|
5198
|
+
set: function( value ) {
|
5199
|
+
Object.defineProperty( this, name, {
|
5200
|
+
enumerable: true,
|
5201
|
+
configurable: true,
|
5202
|
+
writable: true,
|
5203
|
+
value: value
|
5204
|
+
} );
|
5160
5205
|
}
|
5161
|
-
|
5162
|
-
return event;
|
5163
|
-
}
|
5206
|
+
} );
|
5164
5207
|
},
|
5165
5208
|
|
5166
|
-
fix: function(
|
5167
|
-
|
5168
|
-
|
5169
|
-
|
5170
|
-
|
5171
|
-
// Create a writable copy of the event object and normalize some properties
|
5172
|
-
var i, prop, copy,
|
5173
|
-
type = event.type,
|
5174
|
-
originalEvent = event,
|
5175
|
-
fixHook = this.fixHooks[ type ];
|
5176
|
-
|
5177
|
-
if ( !fixHook ) {
|
5178
|
-
this.fixHooks[ type ] = fixHook =
|
5179
|
-
rmouseEvent.test( type ) ? this.mouseHooks :
|
5180
|
-
rkeyEvent.test( type ) ? this.keyHooks :
|
5181
|
-
{};
|
5182
|
-
}
|
5183
|
-
copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
|
5184
|
-
|
5185
|
-
event = new jQuery.Event( originalEvent );
|
5186
|
-
|
5187
|
-
i = copy.length;
|
5188
|
-
while ( i-- ) {
|
5189
|
-
prop = copy[ i ];
|
5190
|
-
event[ prop ] = originalEvent[ prop ];
|
5191
|
-
}
|
5192
|
-
|
5193
|
-
// Support: Safari 6-8+
|
5194
|
-
// Target should not be a text node (#504, #13143)
|
5195
|
-
if ( event.target.nodeType === 3 ) {
|
5196
|
-
event.target = event.target.parentNode;
|
5197
|
-
}
|
5198
|
-
|
5199
|
-
return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
|
5209
|
+
fix: function( originalEvent ) {
|
5210
|
+
return originalEvent[ jQuery.expando ] ?
|
5211
|
+
originalEvent :
|
5212
|
+
new jQuery.Event( originalEvent );
|
5200
5213
|
},
|
5201
5214
|
|
5202
5215
|
special: {
|
@@ -5279,11 +5292,21 @@ jQuery.Event = function( src, props ) {
|
|
5279
5292
|
this.isDefaultPrevented = src.defaultPrevented ||
|
5280
5293
|
src.defaultPrevented === undefined &&
|
5281
5294
|
|
5282
|
-
// Support: Android
|
5295
|
+
// Support: Android <=2.3 only
|
5283
5296
|
src.returnValue === false ?
|
5284
5297
|
returnTrue :
|
5285
5298
|
returnFalse;
|
5286
5299
|
|
5300
|
+
// Create target properties
|
5301
|
+
// Support: Safari <=6 - 7 only
|
5302
|
+
// Target should not be a text node (#504, #13143)
|
5303
|
+
this.target = ( src.target && src.target.nodeType === 3 ) ?
|
5304
|
+
src.target.parentNode :
|
5305
|
+
src.target;
|
5306
|
+
|
5307
|
+
this.currentTarget = src.currentTarget;
|
5308
|
+
this.relatedTarget = src.relatedTarget;
|
5309
|
+
|
5287
5310
|
// Event type
|
5288
5311
|
} else {
|
5289
5312
|
this.type = src;
|
@@ -5302,19 +5325,20 @@ jQuery.Event = function( src, props ) {
|
|
5302
5325
|
};
|
5303
5326
|
|
5304
5327
|
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
|
5305
|
-
//
|
5328
|
+
// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
|
5306
5329
|
jQuery.Event.prototype = {
|
5307
5330
|
constructor: jQuery.Event,
|
5308
5331
|
isDefaultPrevented: returnFalse,
|
5309
5332
|
isPropagationStopped: returnFalse,
|
5310
5333
|
isImmediatePropagationStopped: returnFalse,
|
5334
|
+
isSimulated: false,
|
5311
5335
|
|
5312
5336
|
preventDefault: function() {
|
5313
5337
|
var e = this.originalEvent;
|
5314
5338
|
|
5315
5339
|
this.isDefaultPrevented = returnTrue;
|
5316
5340
|
|
5317
|
-
if ( e ) {
|
5341
|
+
if ( e && !this.isSimulated ) {
|
5318
5342
|
e.preventDefault();
|
5319
5343
|
}
|
5320
5344
|
},
|
@@ -5323,7 +5347,7 @@ jQuery.Event.prototype = {
|
|
5323
5347
|
|
5324
5348
|
this.isPropagationStopped = returnTrue;
|
5325
5349
|
|
5326
|
-
if ( e ) {
|
5350
|
+
if ( e && !this.isSimulated ) {
|
5327
5351
|
e.stopPropagation();
|
5328
5352
|
}
|
5329
5353
|
},
|
@@ -5332,7 +5356,7 @@ jQuery.Event.prototype = {
|
|
5332
5356
|
|
5333
5357
|
this.isImmediatePropagationStopped = returnTrue;
|
5334
5358
|
|
5335
|
-
if ( e ) {
|
5359
|
+
if ( e && !this.isSimulated ) {
|
5336
5360
|
e.stopImmediatePropagation();
|
5337
5361
|
}
|
5338
5362
|
|
@@ -5340,13 +5364,62 @@ jQuery.Event.prototype = {
|
|
5340
5364
|
}
|
5341
5365
|
};
|
5342
5366
|
|
5367
|
+
// Includes all common event props including KeyEvent and MouseEvent specific props
|
5368
|
+
jQuery.each( {
|
5369
|
+
altKey: true,
|
5370
|
+
bubbles: true,
|
5371
|
+
cancelable: true,
|
5372
|
+
changedTouches: true,
|
5373
|
+
ctrlKey: true,
|
5374
|
+
detail: true,
|
5375
|
+
eventPhase: true,
|
5376
|
+
metaKey: true,
|
5377
|
+
pageX: true,
|
5378
|
+
pageY: true,
|
5379
|
+
shiftKey: true,
|
5380
|
+
view: true,
|
5381
|
+
"char": true,
|
5382
|
+
charCode: true,
|
5383
|
+
key: true,
|
5384
|
+
keyCode: true,
|
5385
|
+
button: true,
|
5386
|
+
buttons: true,
|
5387
|
+
clientX: true,
|
5388
|
+
clientY: true,
|
5389
|
+
offsetX: true,
|
5390
|
+
offsetY: true,
|
5391
|
+
pointerId: true,
|
5392
|
+
pointerType: true,
|
5393
|
+
screenX: true,
|
5394
|
+
screenY: true,
|
5395
|
+
targetTouches: true,
|
5396
|
+
toElement: true,
|
5397
|
+
touches: true,
|
5398
|
+
|
5399
|
+
which: function( event ) {
|
5400
|
+
var button = event.button;
|
5401
|
+
|
5402
|
+
// Add which for key events
|
5403
|
+
if ( event.which == null && rkeyEvent.test( event.type ) ) {
|
5404
|
+
return event.charCode != null ? event.charCode : event.keyCode;
|
5405
|
+
}
|
5406
|
+
|
5407
|
+
// Add which for click: 1 === left; 2 === middle; 3 === right
|
5408
|
+
if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
|
5409
|
+
return ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
|
5410
|
+
}
|
5411
|
+
|
5412
|
+
return event.which;
|
5413
|
+
}
|
5414
|
+
}, jQuery.event.addProp );
|
5415
|
+
|
5343
5416
|
// Create mouseenter/leave events using mouseover/out and event-time checks
|
5344
5417
|
// so that event delegation works in jQuery.
|
5345
5418
|
// Do the same for pointerenter/pointerleave and pointerover/pointerout
|
5346
5419
|
//
|
5347
5420
|
// Support: Safari 7 only
|
5348
5421
|
// Safari sends mouseenter too often; see:
|
5349
|
-
// https://
|
5422
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
|
5350
5423
|
// for the description of the bug (it existed in older Chrome versions as well).
|
5351
5424
|
jQuery.each( {
|
5352
5425
|
mouseenter: "mouseover",
|
@@ -5424,9 +5497,15 @@ jQuery.fn.extend( {
|
|
5424
5497
|
|
5425
5498
|
|
5426
5499
|
var
|
5500
|
+
|
5501
|
+
/* eslint-disable max-len */
|
5502
|
+
|
5503
|
+
// See https://github.com/eslint/eslint/issues/3229
|
5427
5504
|
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
|
5428
5505
|
|
5429
|
-
|
5506
|
+
/* eslint-enable */
|
5507
|
+
|
5508
|
+
// Support: IE <=10 - 11, Edge 12 - 13
|
5430
5509
|
// In IE/Edge using regex groups here causes severe slowdowns.
|
5431
5510
|
// See https://connect.microsoft.com/IE/feedback/details/1736512/
|
5432
5511
|
rnoInnerhtml = /<script|<style|<link/i,
|
@@ -5561,7 +5640,7 @@ function domManip( collection, args, callback, ignored ) {
|
|
5561
5640
|
// Keep references to cloned scripts for later restoration
|
5562
5641
|
if ( hasScripts ) {
|
5563
5642
|
|
5564
|
-
// Support: Android
|
5643
|
+
// Support: Android <=4.0 only, PhantomJS 1 only
|
5565
5644
|
// push.apply(_, arraylike) throws on ancient WebKit
|
5566
5645
|
jQuery.merge( scripts, getAll( node, "script" ) );
|
5567
5646
|
}
|
@@ -5689,13 +5768,13 @@ jQuery.extend( {
|
|
5689
5768
|
}
|
5690
5769
|
}
|
5691
5770
|
|
5692
|
-
// Support: Chrome <=
|
5771
|
+
// Support: Chrome <=35 - 45+
|
5693
5772
|
// Assign undefined instead of using delete, see Data#remove
|
5694
5773
|
elem[ dataPriv.expando ] = undefined;
|
5695
5774
|
}
|
5696
5775
|
if ( elem[ dataUser.expando ] ) {
|
5697
5776
|
|
5698
|
-
// Support: Chrome <=
|
5777
|
+
// Support: Chrome <=35 - 45+
|
5699
5778
|
// Assign undefined instead of using delete, see Data#remove
|
5700
5779
|
elem[ dataUser.expando ] = undefined;
|
5701
5780
|
}
|
@@ -5862,7 +5941,7 @@ jQuery.each( {
|
|
5862
5941
|
elems = i === last ? this : this.clone( true );
|
5863
5942
|
jQuery( insert[ i ] )[ original ]( elems );
|
5864
5943
|
|
5865
|
-
// Support: Android
|
5944
|
+
// Support: Android <=4.0 only, PhantomJS 1 only
|
5866
5945
|
// .get() because push.apply(_, arraylike) throws on ancient WebKit
|
5867
5946
|
push.apply( ret, elems.get() );
|
5868
5947
|
}
|
@@ -5876,45 +5955,31 @@ var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
|
|
5876
5955
|
|
5877
5956
|
var getStyles = function( elem ) {
|
5878
5957
|
|
5879
|
-
// Support: IE<=11
|
5958
|
+
// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
|
5880
5959
|
// IE throws on elements created in popups
|
5881
5960
|
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
|
5882
5961
|
var view = elem.ownerDocument.defaultView;
|
5883
5962
|
|
5884
|
-
if ( !view.opener ) {
|
5963
|
+
if ( !view || !view.opener ) {
|
5885
5964
|
view = window;
|
5886
5965
|
}
|
5887
5966
|
|
5888
5967
|
return view.getComputedStyle( elem );
|
5889
5968
|
};
|
5890
5969
|
|
5891
|
-
var documentElement = document.documentElement;
|
5892
|
-
|
5893
5970
|
|
5894
5971
|
|
5895
5972
|
( function() {
|
5896
|
-
var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,
|
5897
|
-
container = document.createElement( "div" ),
|
5898
|
-
div = document.createElement( "div" );
|
5899
|
-
|
5900
|
-
// Finish early in limited (non-browser) environments
|
5901
|
-
if ( !div.style ) {
|
5902
|
-
return;
|
5903
|
-
}
|
5904
|
-
|
5905
|
-
// Support: IE9-11+
|
5906
|
-
// Style of cloned element affects source element cloned (#8908)
|
5907
|
-
div.style.backgroundClip = "content-box";
|
5908
|
-
div.cloneNode( true ).style.backgroundClip = "";
|
5909
|
-
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
5910
|
-
|
5911
|
-
container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
|
5912
|
-
"padding:0;margin-top:1px;position:absolute";
|
5913
|
-
container.appendChild( div );
|
5914
5973
|
|
5915
5974
|
// Executing both pixelPosition & boxSizingReliable tests require only one layout
|
5916
5975
|
// so they're executed at the same time to save the second computation.
|
5917
5976
|
function computeStyleTests() {
|
5977
|
+
|
5978
|
+
// This is a singleton, we need to execute it only once
|
5979
|
+
if ( !div ) {
|
5980
|
+
return;
|
5981
|
+
}
|
5982
|
+
|
5918
5983
|
div.style.cssText =
|
5919
5984
|
"box-sizing:border-box;" +
|
5920
5985
|
"position:relative;display:block;" +
|
@@ -5925,6 +5990,8 @@ var documentElement = document.documentElement;
|
|
5925
5990
|
|
5926
5991
|
var divStyle = window.getComputedStyle( div );
|
5927
5992
|
pixelPositionVal = divStyle.top !== "1%";
|
5993
|
+
|
5994
|
+
// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
|
5928
5995
|
reliableMarginLeftVal = divStyle.marginLeft === "2px";
|
5929
5996
|
boxSizingReliableVal = divStyle.width === "4px";
|
5930
5997
|
|
@@ -5934,39 +6001,46 @@ var documentElement = document.documentElement;
|
|
5934
6001
|
pixelMarginRightVal = divStyle.marginRight === "4px";
|
5935
6002
|
|
5936
6003
|
documentElement.removeChild( container );
|
6004
|
+
|
6005
|
+
// Nullify the div so it wouldn't be stored in the memory and
|
6006
|
+
// it will also be a sign that checks already performed
|
6007
|
+
div = null;
|
5937
6008
|
}
|
5938
6009
|
|
6010
|
+
var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,
|
6011
|
+
container = document.createElement( "div" ),
|
6012
|
+
div = document.createElement( "div" );
|
6013
|
+
|
6014
|
+
// Finish early in limited (non-browser) environments
|
6015
|
+
if ( !div.style ) {
|
6016
|
+
return;
|
6017
|
+
}
|
6018
|
+
|
6019
|
+
// Support: IE <=9 - 11 only
|
6020
|
+
// Style of cloned element affects source element cloned (#8908)
|
6021
|
+
div.style.backgroundClip = "content-box";
|
6022
|
+
div.cloneNode( true ).style.backgroundClip = "";
|
6023
|
+
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
6024
|
+
|
6025
|
+
container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
|
6026
|
+
"padding:0;margin-top:1px;position:absolute";
|
6027
|
+
container.appendChild( div );
|
6028
|
+
|
5939
6029
|
jQuery.extend( support, {
|
5940
6030
|
pixelPosition: function() {
|
5941
|
-
|
5942
|
-
// This test is executed only once but we still do memoizing
|
5943
|
-
// since we can use the boxSizingReliable pre-computing.
|
5944
|
-
// No need to check if the test was already performed, though.
|
5945
6031
|
computeStyleTests();
|
5946
6032
|
return pixelPositionVal;
|
5947
6033
|
},
|
5948
6034
|
boxSizingReliable: function() {
|
5949
|
-
|
5950
|
-
computeStyleTests();
|
5951
|
-
}
|
6035
|
+
computeStyleTests();
|
5952
6036
|
return boxSizingReliableVal;
|
5953
6037
|
},
|
5954
6038
|
pixelMarginRight: function() {
|
5955
|
-
|
5956
|
-
// Support: Android 4.0-4.3
|
5957
|
-
// We're checking for boxSizingReliableVal here instead of pixelMarginRightVal
|
5958
|
-
// since that compresses better and they're computed together anyway.
|
5959
|
-
if ( boxSizingReliableVal == null ) {
|
5960
|
-
computeStyleTests();
|
5961
|
-
}
|
6039
|
+
computeStyleTests();
|
5962
6040
|
return pixelMarginRightVal;
|
5963
6041
|
},
|
5964
6042
|
reliableMarginLeft: function() {
|
5965
|
-
|
5966
|
-
// Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37
|
5967
|
-
if ( boxSizingReliableVal == null ) {
|
5968
|
-
computeStyleTests();
|
5969
|
-
}
|
6043
|
+
computeStyleTests();
|
5970
6044
|
return reliableMarginLeftVal;
|
5971
6045
|
}
|
5972
6046
|
} );
|
@@ -5979,7 +6053,7 @@ function curCSS( elem, name, computed ) {
|
|
5979
6053
|
|
5980
6054
|
computed = computed || getStyles( elem );
|
5981
6055
|
|
5982
|
-
// Support:
|
6056
|
+
// Support: IE <=9 only
|
5983
6057
|
// getPropertyValue is only needed for .css('filter') (#12537)
|
5984
6058
|
if ( computed ) {
|
5985
6059
|
ret = computed.getPropertyValue( name ) || computed[ name ];
|
@@ -5992,7 +6066,7 @@ function curCSS( elem, name, computed ) {
|
|
5992
6066
|
// Android Browser returns percentage for some values,
|
5993
6067
|
// but width seems to be reliably pixels.
|
5994
6068
|
// This is against the CSSOM draft spec:
|
5995
|
-
//
|
6069
|
+
// https://drafts.csswg.org/cssom/#resolved-values
|
5996
6070
|
if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
|
5997
6071
|
|
5998
6072
|
// Remember the original values
|
@@ -6013,7 +6087,7 @@ function curCSS( elem, name, computed ) {
|
|
6013
6087
|
|
6014
6088
|
return ret !== undefined ?
|
6015
6089
|
|
6016
|
-
// Support:
|
6090
|
+
// Support: IE <=9 - 11 only
|
6017
6091
|
// IE returns zIndex value as an integer.
|
6018
6092
|
ret + "" :
|
6019
6093
|
ret;
|
@@ -6139,20 +6213,13 @@ function getWidthOrHeight( elem, name, extra ) {
|
|
6139
6213
|
styles = getStyles( elem ),
|
6140
6214
|
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
6141
6215
|
|
6142
|
-
// Support: IE <=
|
6216
|
+
// Support: IE <=11 only
|
6143
6217
|
// Running getBoundingClientRect on a disconnected node
|
6144
6218
|
// in IE throws an error.
|
6145
6219
|
if ( elem.getClientRects().length ) {
|
6146
6220
|
val = elem.getBoundingClientRect()[ name ];
|
6147
6221
|
}
|
6148
6222
|
|
6149
|
-
// Support: IE11 only
|
6150
|
-
// In IE 11 fullscreen elements inside of an iframe have
|
6151
|
-
// 100x too small dimensions (gh-1764).
|
6152
|
-
if ( document.msFullscreenElement && window.top !== window ) {
|
6153
|
-
val *= 100;
|
6154
|
-
}
|
6155
|
-
|
6156
6223
|
// Some non-html elements return undefined for offsetWidth, so check for null/undefined
|
6157
6224
|
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
|
6158
6225
|
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
|
@@ -6271,7 +6338,6 @@ jQuery.extend( {
|
|
6271
6338
|
value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
|
6272
6339
|
}
|
6273
6340
|
|
6274
|
-
// Support: IE9-11+
|
6275
6341
|
// background-* props affect original clone's values
|
6276
6342
|
if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
|
6277
6343
|
style[ name ] = "inherit";
|
@@ -6345,7 +6411,7 @@ jQuery.each( [ "height", "width" ], function( i, name ) {
|
|
6345
6411
|
// Support: Safari 8+
|
6346
6412
|
// Table columns in Safari have non-zero offsetWidth & zero
|
6347
6413
|
// getBoundingClientRect().width unless display is changed.
|
6348
|
-
// Support: IE <=
|
6414
|
+
// Support: IE <=11 only
|
6349
6415
|
// Running getBoundingClientRect on a disconnected node
|
6350
6416
|
// in IE throws an error.
|
6351
6417
|
( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
|
@@ -6469,15 +6535,15 @@ jQuery.fn.delay = function( time, type ) {
|
|
6469
6535
|
|
6470
6536
|
input.type = "checkbox";
|
6471
6537
|
|
6472
|
-
// Support: Android
|
6538
|
+
// Support: Android <=4.3 only
|
6473
6539
|
// Default value for a checkbox should be "on"
|
6474
6540
|
support.checkOn = input.value !== "";
|
6475
6541
|
|
6476
|
-
// Support: IE<=11
|
6542
|
+
// Support: IE <=11 only
|
6477
6543
|
// Must access selectedIndex to make default options select
|
6478
6544
|
support.optSelected = opt.selected;
|
6479
6545
|
|
6480
|
-
// Support: IE<=11
|
6546
|
+
// Support: IE <=11 only
|
6481
6547
|
// An input loses its value after becoming a radio
|
6482
6548
|
input = document.createElement( "input" );
|
6483
6549
|
input.value = "t";
|
@@ -6487,14 +6553,7 @@ jQuery.fn.delay = function( time, type ) {
|
|
6487
6553
|
|
6488
6554
|
|
6489
6555
|
var boolHook,
|
6490
|
-
attrHandle = jQuery.expr.attrHandle
|
6491
|
-
|
6492
|
-
// Exclusively lowercase A-Z in attribute names (gh-2730)
|
6493
|
-
// https://dom.spec.whatwg.org/#converted-to-ascii-lowercase
|
6494
|
-
raz = /[A-Z]+/g,
|
6495
|
-
lowercase = function( ch ) {
|
6496
|
-
return ch.toLowerCase();
|
6497
|
-
};
|
6556
|
+
attrHandle = jQuery.expr.attrHandle;
|
6498
6557
|
|
6499
6558
|
jQuery.fn.extend( {
|
6500
6559
|
attr: function( name, value ) {
|
@@ -6523,11 +6582,10 @@ jQuery.extend( {
|
|
6523
6582
|
return jQuery.prop( elem, name, value );
|
6524
6583
|
}
|
6525
6584
|
|
6526
|
-
//
|
6585
|
+
// Attribute hooks are determined by the lowercase version
|
6527
6586
|
// Grab necessary hook if one is defined
|
6528
6587
|
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
6529
|
-
|
6530
|
-
hooks = jQuery.attrHooks[ name ] ||
|
6588
|
+
hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
|
6531
6589
|
( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
|
6532
6590
|
}
|
6533
6591
|
|
@@ -6603,16 +6661,18 @@ jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name )
|
|
6603
6661
|
var getter = attrHandle[ name ] || jQuery.find.attr;
|
6604
6662
|
|
6605
6663
|
attrHandle[ name ] = function( elem, name, isXML ) {
|
6606
|
-
var ret, handle
|
6664
|
+
var ret, handle,
|
6665
|
+
lowercaseName = name.toLowerCase();
|
6666
|
+
|
6607
6667
|
if ( !isXML ) {
|
6608
6668
|
|
6609
6669
|
// Avoid an infinite loop by temporarily removing this function from the getter
|
6610
|
-
handle = attrHandle[
|
6611
|
-
attrHandle[
|
6670
|
+
handle = attrHandle[ lowercaseName ];
|
6671
|
+
attrHandle[ lowercaseName ] = ret;
|
6612
6672
|
ret = getter( elem, name, isXML ) != null ?
|
6613
|
-
|
6673
|
+
lowercaseName :
|
6614
6674
|
null;
|
6615
|
-
attrHandle[
|
6675
|
+
attrHandle[ lowercaseName ] = handle;
|
6616
6676
|
}
|
6617
6677
|
return ret;
|
6618
6678
|
};
|
@@ -6673,9 +6733,10 @@ jQuery.extend( {
|
|
6673
6733
|
tabIndex: {
|
6674
6734
|
get: function( elem ) {
|
6675
6735
|
|
6736
|
+
// Support: IE <=9 - 11 only
|
6676
6737
|
// elem.tabIndex doesn't always return the
|
6677
6738
|
// correct value when it hasn't been explicitly set
|
6678
|
-
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
6739
|
+
// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
6679
6740
|
// Use proper attribute retrieval(#12072)
|
6680
6741
|
var tabindex = jQuery.find.attr( elem, "tabindex" );
|
6681
6742
|
|
@@ -6695,6 +6756,12 @@ jQuery.extend( {
|
|
6695
6756
|
}
|
6696
6757
|
} );
|
6697
6758
|
|
6759
|
+
// Support: IE <=11 only
|
6760
|
+
// Accessing the selectedIndex property
|
6761
|
+
// forces the browser to respect setting selected
|
6762
|
+
// on the option
|
6763
|
+
// The getter ensures a default option is selected
|
6764
|
+
// when in an optgroup
|
6698
6765
|
if ( !support.optSelected ) {
|
6699
6766
|
jQuery.propHooks.selected = {
|
6700
6767
|
get: function( elem ) {
|
@@ -6703,6 +6770,16 @@ if ( !support.optSelected ) {
|
|
6703
6770
|
parent.parentNode.selectedIndex;
|
6704
6771
|
}
|
6705
6772
|
return null;
|
6773
|
+
},
|
6774
|
+
set: function( elem ) {
|
6775
|
+
var parent = elem.parentNode;
|
6776
|
+
if ( parent ) {
|
6777
|
+
parent.selectedIndex;
|
6778
|
+
|
6779
|
+
if ( parent.parentNode ) {
|
6780
|
+
parent.parentNode.selectedIndex;
|
6781
|
+
}
|
6782
|
+
}
|
6706
6783
|
}
|
6707
6784
|
};
|
6708
6785
|
}
|
@@ -6897,7 +6974,8 @@ jQuery.fn.extend( {
|
|
6897
6974
|
|
6898
6975
|
|
6899
6976
|
|
6900
|
-
var rreturn = /\r/g
|
6977
|
+
var rreturn = /\r/g,
|
6978
|
+
rspaces = /[\x20\t\r\n\f]+/g;
|
6901
6979
|
|
6902
6980
|
jQuery.fn.extend( {
|
6903
6981
|
val: function( value ) {
|
@@ -6973,9 +7051,15 @@ jQuery.extend( {
|
|
6973
7051
|
option: {
|
6974
7052
|
get: function( elem ) {
|
6975
7053
|
|
6976
|
-
|
6977
|
-
|
6978
|
-
|
7054
|
+
var val = jQuery.find.attr( elem, "value" );
|
7055
|
+
return val != null ?
|
7056
|
+
val :
|
7057
|
+
|
7058
|
+
// Support: IE <=10 - 11 only
|
7059
|
+
// option.text throws exceptions (#14686, #14858)
|
7060
|
+
// Strip and collapse whitespace
|
7061
|
+
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
|
7062
|
+
jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
|
6979
7063
|
}
|
6980
7064
|
},
|
6981
7065
|
select: {
|
@@ -6994,6 +7078,7 @@ jQuery.extend( {
|
|
6994
7078
|
for ( ; i < max; i++ ) {
|
6995
7079
|
option = options[ i ];
|
6996
7080
|
|
7081
|
+
// Support: IE <=9 only
|
6997
7082
|
// IE8-9 doesn't update selected after form reset (#2551)
|
6998
7083
|
if ( ( option.selected || i === index ) &&
|
6999
7084
|
|
@@ -7026,11 +7111,16 @@ jQuery.extend( {
|
|
7026
7111
|
|
7027
7112
|
while ( i-- ) {
|
7028
7113
|
option = options[ i ];
|
7114
|
+
|
7115
|
+
/* eslint-disable no-cond-assign */
|
7116
|
+
|
7029
7117
|
if ( option.selected =
|
7030
|
-
|
7118
|
+
jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
|
7031
7119
|
) {
|
7032
7120
|
optionSet = true;
|
7033
7121
|
}
|
7122
|
+
|
7123
|
+
/* eslint-enable no-cond-assign */
|
7034
7124
|
}
|
7035
7125
|
|
7036
7126
|
// Force browsers to behave consistently when non-matching value is set
|
@@ -7205,6 +7295,7 @@ jQuery.extend( jQuery.event, {
|
|
7205
7295
|
},
|
7206
7296
|
|
7207
7297
|
// Piggyback on a donor event to simulate a different one
|
7298
|
+
// Used only for `focus(in | out)` events
|
7208
7299
|
simulate: function( type, elem, event ) {
|
7209
7300
|
var e = jQuery.extend(
|
7210
7301
|
new jQuery.Event(),
|
@@ -7212,27 +7303,10 @@ jQuery.extend( jQuery.event, {
|
|
7212
7303
|
{
|
7213
7304
|
type: type,
|
7214
7305
|
isSimulated: true
|
7215
|
-
|
7216
|
-
// Previously, `originalEvent: {}` was set here, so stopPropagation call
|
7217
|
-
// would not be triggered on donor event, since in our own
|
7218
|
-
// jQuery.event.stopPropagation function we had a check for existence of
|
7219
|
-
// originalEvent.stopPropagation method, so, consequently it would be a noop.
|
7220
|
-
//
|
7221
|
-
// But now, this "simulate" function is used only for events
|
7222
|
-
// for which stopPropagation() is noop, so there is no need for that anymore.
|
7223
|
-
//
|
7224
|
-
// For the compat branch though, guard for "click" and "submit"
|
7225
|
-
// events is still used, but was moved to jQuery.event.stopPropagation function
|
7226
|
-
// because `originalEvent` should point to the original event for the constancy
|
7227
|
-
// with other events and for more focused logic
|
7228
7306
|
}
|
7229
7307
|
);
|
7230
7308
|
|
7231
7309
|
jQuery.event.trigger( e, null, elem );
|
7232
|
-
|
7233
|
-
if ( e.isDefaultPrevented() ) {
|
7234
|
-
event.preventDefault();
|
7235
|
-
}
|
7236
7310
|
}
|
7237
7311
|
|
7238
7312
|
} );
|
@@ -7278,14 +7352,14 @@ jQuery.fn.extend( {
|
|
7278
7352
|
support.focusin = "onfocusin" in window;
|
7279
7353
|
|
7280
7354
|
|
7281
|
-
// Support: Firefox
|
7355
|
+
// Support: Firefox <=44
|
7282
7356
|
// Firefox doesn't have focus(in | out) events
|
7283
7357
|
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
|
7284
7358
|
//
|
7285
|
-
// Support: Chrome, Safari
|
7359
|
+
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
|
7286
7360
|
// focus(in | out) events fire after focus & blur events,
|
7287
7361
|
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
|
7288
|
-
// Related ticket - https://
|
7362
|
+
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
|
7289
7363
|
if ( !support.focusin ) {
|
7290
7364
|
jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
7291
7365
|
|
@@ -7321,83 +7395,6 @@ if ( !support.focusin ) {
|
|
7321
7395
|
}
|
7322
7396
|
|
7323
7397
|
|
7324
|
-
jQuery.fn.extend( {
|
7325
|
-
wrapAll: function( html ) {
|
7326
|
-
var wrap;
|
7327
|
-
|
7328
|
-
if ( this[ 0 ] ) {
|
7329
|
-
if ( jQuery.isFunction( html ) ) {
|
7330
|
-
html = html.call( this[ 0 ] );
|
7331
|
-
}
|
7332
|
-
|
7333
|
-
// The elements to wrap the target around
|
7334
|
-
wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
|
7335
|
-
|
7336
|
-
if ( this[ 0 ].parentNode ) {
|
7337
|
-
wrap.insertBefore( this[ 0 ] );
|
7338
|
-
}
|
7339
|
-
|
7340
|
-
wrap.map( function() {
|
7341
|
-
var elem = this;
|
7342
|
-
|
7343
|
-
while ( elem.firstElementChild ) {
|
7344
|
-
elem = elem.firstElementChild;
|
7345
|
-
}
|
7346
|
-
|
7347
|
-
return elem;
|
7348
|
-
} ).append( this );
|
7349
|
-
}
|
7350
|
-
|
7351
|
-
return this;
|
7352
|
-
},
|
7353
|
-
|
7354
|
-
wrapInner: function( html ) {
|
7355
|
-
if ( jQuery.isFunction( html ) ) {
|
7356
|
-
return this.each( function( i ) {
|
7357
|
-
jQuery( this ).wrapInner( html.call( this, i ) );
|
7358
|
-
} );
|
7359
|
-
}
|
7360
|
-
|
7361
|
-
return this.each( function() {
|
7362
|
-
var self = jQuery( this ),
|
7363
|
-
contents = self.contents();
|
7364
|
-
|
7365
|
-
if ( contents.length ) {
|
7366
|
-
contents.wrapAll( html );
|
7367
|
-
|
7368
|
-
} else {
|
7369
|
-
self.append( html );
|
7370
|
-
}
|
7371
|
-
} );
|
7372
|
-
},
|
7373
|
-
|
7374
|
-
wrap: function( html ) {
|
7375
|
-
var isFunction = jQuery.isFunction( html );
|
7376
|
-
|
7377
|
-
return this.each( function( i ) {
|
7378
|
-
jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );
|
7379
|
-
} );
|
7380
|
-
},
|
7381
|
-
|
7382
|
-
unwrap: function( selector ) {
|
7383
|
-
this.parent( selector ).not( "body" ).each( function() {
|
7384
|
-
jQuery( this ).replaceWith( this.childNodes );
|
7385
|
-
} );
|
7386
|
-
return this;
|
7387
|
-
}
|
7388
|
-
} );
|
7389
|
-
|
7390
|
-
|
7391
|
-
jQuery.expr.filters.hidden = function( elem ) {
|
7392
|
-
return !jQuery.expr.filters.visible( elem );
|
7393
|
-
};
|
7394
|
-
jQuery.expr.filters.visible = function( elem ) {
|
7395
|
-
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
|
7396
|
-
};
|
7397
|
-
|
7398
|
-
|
7399
|
-
|
7400
|
-
|
7401
7398
|
var
|
7402
7399
|
rbracket = /\[\]$/,
|
7403
7400
|
rCRLF = /\r?\n/g,
|
@@ -7447,17 +7444,16 @@ function buildParams( prefix, obj, traditional, add ) {
|
|
7447
7444
|
jQuery.param = function( a, traditional ) {
|
7448
7445
|
var prefix,
|
7449
7446
|
s = [],
|
7450
|
-
add = function( key,
|
7447
|
+
add = function( key, valueOrFunction ) {
|
7451
7448
|
|
7452
|
-
// If value is a function, invoke it and
|
7453
|
-
value = jQuery.isFunction(
|
7454
|
-
|
7455
|
-
|
7449
|
+
// If value is a function, invoke it and use its return value
|
7450
|
+
var value = jQuery.isFunction( valueOrFunction ) ?
|
7451
|
+
valueOrFunction() :
|
7452
|
+
valueOrFunction;
|
7456
7453
|
|
7457
|
-
|
7458
|
-
|
7459
|
-
|
7460
|
-
}
|
7454
|
+
s[ s.length ] = encodeURIComponent( key ) + "=" +
|
7455
|
+
encodeURIComponent( value == null ? "" : value );
|
7456
|
+
};
|
7461
7457
|
|
7462
7458
|
// If an array was passed in, assume that it is an array of form elements.
|
7463
7459
|
if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
@@ -7514,7 +7510,84 @@ jQuery.fn.extend( {
|
|
7514
7510
|
} );
|
7515
7511
|
|
7516
7512
|
|
7517
|
-
|
7513
|
+
jQuery.fn.extend( {
|
7514
|
+
wrapAll: function( html ) {
|
7515
|
+
var wrap;
|
7516
|
+
|
7517
|
+
if ( this[ 0 ] ) {
|
7518
|
+
if ( jQuery.isFunction( html ) ) {
|
7519
|
+
html = html.call( this[ 0 ] );
|
7520
|
+
}
|
7521
|
+
|
7522
|
+
// The elements to wrap the target around
|
7523
|
+
wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
|
7524
|
+
|
7525
|
+
if ( this[ 0 ].parentNode ) {
|
7526
|
+
wrap.insertBefore( this[ 0 ] );
|
7527
|
+
}
|
7528
|
+
|
7529
|
+
wrap.map( function() {
|
7530
|
+
var elem = this;
|
7531
|
+
|
7532
|
+
while ( elem.firstElementChild ) {
|
7533
|
+
elem = elem.firstElementChild;
|
7534
|
+
}
|
7535
|
+
|
7536
|
+
return elem;
|
7537
|
+
} ).append( this );
|
7538
|
+
}
|
7539
|
+
|
7540
|
+
return this;
|
7541
|
+
},
|
7542
|
+
|
7543
|
+
wrapInner: function( html ) {
|
7544
|
+
if ( jQuery.isFunction( html ) ) {
|
7545
|
+
return this.each( function( i ) {
|
7546
|
+
jQuery( this ).wrapInner( html.call( this, i ) );
|
7547
|
+
} );
|
7548
|
+
}
|
7549
|
+
|
7550
|
+
return this.each( function() {
|
7551
|
+
var self = jQuery( this ),
|
7552
|
+
contents = self.contents();
|
7553
|
+
|
7554
|
+
if ( contents.length ) {
|
7555
|
+
contents.wrapAll( html );
|
7556
|
+
|
7557
|
+
} else {
|
7558
|
+
self.append( html );
|
7559
|
+
}
|
7560
|
+
} );
|
7561
|
+
},
|
7562
|
+
|
7563
|
+
wrap: function( html ) {
|
7564
|
+
var isFunction = jQuery.isFunction( html );
|
7565
|
+
|
7566
|
+
return this.each( function( i ) {
|
7567
|
+
jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );
|
7568
|
+
} );
|
7569
|
+
},
|
7570
|
+
|
7571
|
+
unwrap: function( selector ) {
|
7572
|
+
this.parent( selector ).not( "body" ).each( function() {
|
7573
|
+
jQuery( this ).replaceWith( this.childNodes );
|
7574
|
+
} );
|
7575
|
+
return this;
|
7576
|
+
}
|
7577
|
+
} );
|
7578
|
+
|
7579
|
+
|
7580
|
+
jQuery.expr.pseudos.hidden = function( elem ) {
|
7581
|
+
return !jQuery.expr.pseudos.visible( elem );
|
7582
|
+
};
|
7583
|
+
jQuery.expr.pseudos.visible = function( elem ) {
|
7584
|
+
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
|
7585
|
+
};
|
7586
|
+
|
7587
|
+
|
7588
|
+
|
7589
|
+
|
7590
|
+
// Support: Safari 8 only
|
7518
7591
|
// In Safari 8 documents created via document.implementation.createHTMLDocument
|
7519
7592
|
// collapse sibling forms: the second one becomes a child of the first one.
|
7520
7593
|
// Because of that, this security measure has to be disabled in Safari 8.
|
@@ -7539,14 +7612,28 @@ jQuery.parseHTML = function( data, context, keepScripts ) {
|
|
7539
7612
|
context = false;
|
7540
7613
|
}
|
7541
7614
|
|
7542
|
-
|
7543
|
-
|
7544
|
-
|
7545
|
-
document.implementation.createHTMLDocument( "" ) :
|
7546
|
-
document );
|
7615
|
+
var base, parsed, scripts;
|
7616
|
+
|
7617
|
+
if ( !context ) {
|
7547
7618
|
|
7548
|
-
|
7549
|
-
|
7619
|
+
// Stop scripts or inline event handlers from being executed immediately
|
7620
|
+
// by using document.implementation
|
7621
|
+
if ( support.createHTMLDocument ) {
|
7622
|
+
context = document.implementation.createHTMLDocument( "" );
|
7623
|
+
|
7624
|
+
// Set the base href for the created document
|
7625
|
+
// so any parsed elements with URLs
|
7626
|
+
// are based on the document's URL (gh-2965)
|
7627
|
+
base = context.createElement( "base" );
|
7628
|
+
base.href = document.location.href;
|
7629
|
+
context.head.appendChild( base );
|
7630
|
+
} else {
|
7631
|
+
context = document;
|
7632
|
+
}
|
7633
|
+
}
|
7634
|
+
|
7635
|
+
parsed = rsingleTag.exec( data );
|
7636
|
+
scripts = !keepScripts && [];
|
7550
7637
|
|
7551
7638
|
// Single tag
|
7552
7639
|
if ( parsed ) {
|
@@ -7641,7 +7728,7 @@ jQuery.fn.extend( {
|
|
7641
7728
|
return;
|
7642
7729
|
}
|
7643
7730
|
|
7644
|
-
// Support: IE<=11
|
7731
|
+
// Support: IE <=11 only
|
7645
7732
|
// Running getBoundingClientRect on a
|
7646
7733
|
// disconnected node in IE throws an error
|
7647
7734
|
if ( !elem.getClientRects().length ) {
|
@@ -7694,11 +7781,10 @@ jQuery.fn.extend( {
|
|
7694
7781
|
}
|
7695
7782
|
|
7696
7783
|
// Add offsetParent borders
|
7697
|
-
|
7698
|
-
|
7699
|
-
|
7700
|
-
|
7701
|
-
offsetParent.scrollLeft();
|
7784
|
+
parentOffset = {
|
7785
|
+
top: parentOffset.top + jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ),
|
7786
|
+
left: parentOffset.left + jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true )
|
7787
|
+
};
|
7702
7788
|
}
|
7703
7789
|
|
7704
7790
|
// Subtract parent offsets and element margins
|
@@ -7756,10 +7842,10 @@ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function(
|
|
7756
7842
|
};
|
7757
7843
|
} );
|
7758
7844
|
|
7759
|
-
// Support: Safari
|
7845
|
+
// Support: Safari <=7 - 9.1, Chrome <=37 - 49
|
7760
7846
|
// Add the top/left cssHooks using jQuery.fn.position
|
7761
7847
|
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
|
7762
|
-
// Blink bug: https://
|
7848
|
+
// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
|
7763
7849
|
// getComputedStyle returns percent when specified for top/left/bottom/right;
|
7764
7850
|
// rather than make the css module depend on the offset module, just check for it here
|
7765
7851
|
jQuery.each( [ "top", "left" ], function( i, prop ) {
|
@@ -7846,6 +7932,8 @@ if ( typeof define === "function" && define.amd ) {
|
|
7846
7932
|
|
7847
7933
|
|
7848
7934
|
|
7935
|
+
|
7936
|
+
|
7849
7937
|
var
|
7850
7938
|
|
7851
7939
|
// Map over jQuery in case of overwrite
|
@@ -7873,5 +7961,6 @@ if ( !noGlobal ) {
|
|
7873
7961
|
window.jQuery = window.$ = jQuery;
|
7874
7962
|
}
|
7875
7963
|
|
7964
|
+
|
7876
7965
|
return jQuery;
|
7877
|
-
})
|
7966
|
+
} );
|