From 43da73434d23e8268625ab50f71c864d0d86e4cc Mon Sep 17 00:00:00 2001 From: Sean Doyle Date: Wed, 11 Oct 2023 17:12:32 -0400 Subject: [PATCH] Replace `jquery-ujs` with `@hotwired/turbo` Replace our client-side dependency on `jquery-ujs` with [@hotwired/turbo][]. In addition to adding an entry to the `package.json` file, this commit replaces `[data-confirm]` attributes with `[data-turbo-confirm]`, and `[data-method]` attributes with `[data-turbo-method]`. In an effort to minimize the diff, this commit *does not* replace the `link_to` calls made with `method: :delete` with [button_to][] calls. Ideally, they'd utilize `button_to` to render a `
` element for the destructive action. In the future, once that change is complete, the `data: {turbo_method: :delete}` attributes can once again be passed as `method: :delete` options. [@hotwired/turbo]: https://turbo.hotwired.dev [turbo-rails]: https://github.com/hotwired/turbo-rails [link_to]: https://edgeapi.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to [button_to]: https://edgeapi.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-button_to --- Gemfile.lock | 4 + app/assets/builds/administrate/application.js | 5338 ++++++++++++++--- .../builds/administrate/application.js.map | 8 +- .../javascripts/administrate/application.js | 2 +- .../controllers/table_controller.js | 2 +- .../_collection_item_actions.html.erb | 3 +- .../application/_javascript.html.erb | 2 +- .../administrate/application/show.html.erb | 3 +- package.json | 2 +- .../_collection_item_actions.html.erb | 2 +- yarn.lock | 5 + 11 files changed, 4369 insertions(+), 1002 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cf23472760..b6a1e24e84 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -300,6 +300,10 @@ GEM thor (1.3.0) timecop (0.9.8) timeout (0.4.0) + turbo-rails (1.5.0) + actionpack (>= 6.0.0) + activejob (>= 6.0.0) + railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) uglifier (4.2.0) diff --git a/app/assets/builds/administrate/application.js b/app/assets/builds/administrate/application.js index ebce1dc527..9c6d447c29 100644 --- a/app/assets/builds/administrate/application.js +++ b/app/assets/builds/administrate/application.js @@ -91,13 +91,13 @@ } return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj; } - var version = "3.7.0", rhtmlSuffix = /HTML$/i, jQuery2 = function(selector, context) { - return new jQuery2.fn.init(selector, context); + var version = "3.7.1", rhtmlSuffix = /HTML$/i, jQuery = function(selector, context) { + return new jQuery.fn.init(selector, context); }; - jQuery2.fn = jQuery2.prototype = { + jQuery.fn = jQuery.prototype = { // The current version of jQuery being used jquery: version, - constructor: jQuery2, + constructor: jQuery, // The default length of a jQuery object is 0 length: 0, toArray: function() { @@ -114,16 +114,16 @@ // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function(elems) { - var ret = jQuery2.merge(this.constructor(), elems); + var ret = jQuery.merge(this.constructor(), elems); ret.prevObject = this; return ret; }, // Execute a callback for every element in the matched set. each: function(callback) { - return jQuery2.each(this, callback); + return jQuery.each(this, callback); }, map: function(callback) { - return this.pushStack(jQuery2.map(this, function(elem, i) { + return this.pushStack(jQuery.map(this, function(elem, i) { return callback.call(elem, i, elem); })); }, @@ -137,12 +137,12 @@ return this.eq(-1); }, even: function() { - return this.pushStack(jQuery2.grep(this, function(_elem, i) { + return this.pushStack(jQuery.grep(this, function(_elem, i) { return (i + 1) % 2; })); }, odd: function() { - return this.pushStack(jQuery2.grep(this, function(_elem, i) { + return this.pushStack(jQuery.grep(this, function(_elem, i) { return i % 2; })); }, @@ -159,7 +159,7 @@ sort: arr.sort, splice: arr.splice }; - jQuery2.extend = jQuery2.fn.extend = function() { + jQuery.extend = jQuery.fn.extend = function() { var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; if (typeof target === "boolean") { deep = target; @@ -180,17 +180,17 @@ if (name === "__proto__" || target === copy) { continue; } - if (deep && copy && (jQuery2.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) { + if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) { src = target[name]; if (copyIsArray && !Array.isArray(src)) { clone = []; - } else if (!copyIsArray && !jQuery2.isPlainObject(src)) { + } else if (!copyIsArray && !jQuery.isPlainObject(src)) { clone = {}; } else { clone = src; } copyIsArray = false; - target[name] = jQuery2.extend(deep, clone, copy); + target[name] = jQuery.extend(deep, clone, copy); } else if (copy !== void 0) { target[name] = copy; } @@ -199,7 +199,7 @@ } return target; }; - jQuery2.extend({ + jQuery.extend({ // Unique for each copy of jQuery on the page expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""), // Assume jQuery is ready without the ready module @@ -256,11 +256,16 @@ var node, ret = "", i = 0, nodeType = elem.nodeType; if (!nodeType) { while (node = elem[i++]) { - ret += jQuery2.text(node); + ret += jQuery.text(node); } - } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) { + } + if (nodeType === 1 || nodeType === 11) { return elem.textContent; - } else if (nodeType === 3 || nodeType === 4) { + } + if (nodeType === 9) { + return elem.documentElement.textContent; + } + if (nodeType === 3 || nodeType === 4) { return elem.nodeValue; } return ret; @@ -270,7 +275,7 @@ var ret = results || []; if (arr2 != null) { if (isArrayLike(Object(arr2))) { - jQuery2.merge( + jQuery.merge( ret, typeof arr2 === "string" ? [arr2] : arr2 ); @@ -335,9 +340,9 @@ support }); if (typeof Symbol === "function") { - jQuery2.fn[Symbol.iterator] = arr[Symbol.iterator]; + jQuery.fn[Symbol.iterator] = arr[Symbol.iterator]; } - jQuery2.each( + jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(_i, name) { class2type["[object " + name + "]"] = name.toLowerCase(); @@ -361,7 +366,7 @@ "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ); - jQuery2.contains = function(a, b) { + jQuery.contains = function(a, b) { var bup = b && b.parentNode; return a === bup || !!(bup && bup.nodeType === 1 && // Support: IE 9 - 11+ // IE doesn't have `contains` on SVG. @@ -377,12 +382,12 @@ } return "\\" + ch; } - jQuery2.escapeSelector = function(sel) { + jQuery.escapeSelector = function(sel) { return (sel + "").replace(rcssescape, fcssescape); }; var preferredDoc = document2, pushNative = push; (function() { - var i, Expr, outermostContext, sortInput, hasDuplicate, push2 = pushNative, document3, documentElement2, documentIsHTML, rbuggyQSA, matches, expando = jQuery2.expando, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), nonnativeSelectorCache = createCache(), sortOrder = function(a, b) { + var i, Expr, outermostContext, sortInput, hasDuplicate, push2 = pushNative, document3, documentElement2, documentIsHTML, rbuggyQSA, matches, expando = jQuery.expando, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), nonnativeSelectorCache = createCache(), sortOrder = function(a, b) { if (a === b) { hasDuplicate = true; } @@ -481,7 +486,7 @@ newContext = rsibling.test(selector) && testContext(context.parentNode) || context; if (newContext != context || !support.scope) { if (nid = context.getAttribute("id")) { - nid = jQuery2.escapeSelector(nid); + nid = jQuery.escapeSelector(nid); } else { context.setAttribute("id", nid = expando); } @@ -513,13 +518,13 @@ } function createCache() { var keys = []; - function cache(key, value) { + function cache2(key, value) { if (keys.push(key + " ") > Expr.cacheLength) { - delete cache[keys.shift()]; + delete cache2[keys.shift()]; } - return cache[key + " "] = value; + return cache2[key + " "] = value; } - return cache; + return cache2; } function markFunction(fn) { fn[expando] = true; @@ -592,14 +597,18 @@ } document3 = doc; documentElement2 = document3.documentElement; - documentIsHTML = !jQuery2.isXMLDoc(document3); + documentIsHTML = !jQuery.isXMLDoc(document3); matches = documentElement2.matches || documentElement2.webkitMatchesSelector || documentElement2.msMatchesSelector; - if (preferredDoc != document3 && (subWindow = document3.defaultView) && subWindow.top !== subWindow) { + if (documentElement2.msMatchesSelector && // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + preferredDoc != document3 && (subWindow = document3.defaultView) && subWindow.top !== subWindow) { subWindow.addEventListener("unload", unloadHandler); } support.getById = assert(function(el) { - documentElement2.appendChild(el).id = jQuery2.expando; - return !document3.getElementsByName || !document3.getElementsByName(jQuery2.expando).length; + documentElement2.appendChild(el).id = jQuery.expando; + return !document3.getElementsByName || !document3.getElementsByName(jQuery.expando).length; }); support.disconnectedMatch = assert(function(el) { return matches.call(el, "*"); @@ -752,7 +761,7 @@ if ((context.ownerDocument || context) != document3) { setDocument(context); } - return jQuery2.contains(context, elem); + return jQuery.contains(context, elem); }; find.attr = function(elem, name) { if ((elem.ownerDocument || elem) != document3) { @@ -767,7 +776,7 @@ find.error = function(msg) { throw new Error("Syntax error, unrecognized expression: " + msg); }; - jQuery2.uniqueSort = function(results) { + jQuery.uniqueSort = function(results) { var elem, duplicates = [], j = 0, i2 = 0; hasDuplicate = !support.sortStable; sortInput = !support.sortStable && slice.call(results, 0); @@ -785,10 +794,10 @@ sortInput = null; return results; }; - jQuery2.fn.uniqueSort = function() { - return this.pushStack(jQuery2.uniqueSort(slice.apply(this))); + jQuery.fn.uniqueSort = function() { + return this.pushStack(jQuery.uniqueSort(slice.apply(this))); }; - Expr = jQuery2.expr = { + Expr = jQuery.expr = { // Can be adjusted by the user cacheLength: 50, createPseudo: markFunction, @@ -898,7 +907,7 @@ return !!elem.parentNode; } ) : function(elem, _context, xml) { - var cache, outerCache, node, nodeIndex, start, dir2 = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false; + var cache2, outerCache, node, nodeIndex, start2, dir2 = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false; if (parent) { if (simple) { while (dir2) { @@ -908,19 +917,19 @@ return false; } } - start = dir2 = type === "only" && !start && "nextSibling"; + start2 = dir2 = type === "only" && !start2 && "nextSibling"; } return true; } - start = [forward ? parent.firstChild : parent.lastChild]; + start2 = [forward ? parent.firstChild : parent.lastChild]; if (forward && useCache) { outerCache = parent[expando] || (parent[expando] = {}); - cache = outerCache[type] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = nodeIndex && cache[2]; + cache2 = outerCache[type] || []; + nodeIndex = cache2[0] === dirruns && cache2[1]; + diff = nodeIndex && cache2[2]; node = nodeIndex && parent.childNodes[nodeIndex]; while (node = ++nodeIndex && node && node[dir2] || // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) { + (diff = nodeIndex = 0) || start2.pop()) { if (node.nodeType === 1 && ++diff && node === elem) { outerCache[type] = [dirruns, nodeIndex, diff]; break; @@ -929,12 +938,12 @@ } else { if (useCache) { outerCache = elem[expando] || (elem[expando] = {}); - cache = outerCache[type] || []; - nodeIndex = cache[0] === dirruns && cache[1]; + cache2 = outerCache[type] || []; + nodeIndex = cache2[0] === dirruns && cache2[1]; diff = nodeIndex; } if (diff === false) { - while (node = ++nodeIndex && node && node[dir2] || (diff = nodeIndex = 0) || start.pop()) { + while (node = ++nodeIndex && node && node[dir2] || (diff = nodeIndex = 0) || start2.pop()) { if ((ofType ? nodeName(node, name) : node.nodeType === 1) && ++diff) { if (useCache) { outerCache = node[expando] || (node[expando] = {}); @@ -998,7 +1007,7 @@ contains: markFunction(function(text) { text = text.replace(runescape, funescape); return function(elem) { - return (elem.textContent || jQuery2.text(elem)).indexOf(text) > -1; + return (elem.textContent || jQuery.text(elem)).indexOf(text) > -1; }; }), // "Whether an element is represented by a :lang() selector @@ -1421,7 +1430,7 @@ } push2.apply(results, setMatched); if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) { - jQuery2.uniqueSort(results); + jQuery.uniqueSort(results); } } if (outermost) { @@ -1508,24 +1517,25 @@ support.sortDetached = assert(function(el) { return el.compareDocumentPosition(document3.createElement("fieldset")) & 1; }); - jQuery2.find = find; - jQuery2.expr[":"] = jQuery2.expr.pseudos; - jQuery2.unique = jQuery2.uniqueSort; + jQuery.find = find; + jQuery.expr[":"] = jQuery.expr.pseudos; + jQuery.unique = jQuery.uniqueSort; find.compile = compile; find.select = select; find.setDocument = setDocument; - find.escape = jQuery2.escapeSelector; - find.getText = jQuery2.text; - find.isXML = jQuery2.isXMLDoc; - find.selectors = jQuery2.expr; - find.support = jQuery2.support; - find.uniqueSort = jQuery2.uniqueSort; + find.tokenize = tokenize2; + find.escape = jQuery.escapeSelector; + find.getText = jQuery.text; + find.isXML = jQuery.isXMLDoc; + find.selectors = jQuery.expr; + find.support = jQuery.support; + find.uniqueSort = jQuery.uniqueSort; })(); var dir = function(elem, dir2, until) { var matched = [], truncate = until !== void 0; while ((elem = elem[dir2]) && elem.nodeType !== 9) { if (elem.nodeType === 1) { - if (truncate && jQuery2(elem).is(until)) { + if (truncate && jQuery(elem).is(until)) { break; } matched.push(elem); @@ -1542,45 +1552,45 @@ } return matched; }; - var rneedsContext = jQuery2.expr.match.needsContext; + var rneedsContext = jQuery.expr.match.needsContext; var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; function winnow(elements, qualifier, not) { if (isFunction(qualifier)) { - return jQuery2.grep(elements, function(elem, i) { + return jQuery.grep(elements, function(elem, i) { return !!qualifier.call(elem, i, elem) !== not; }); } if (qualifier.nodeType) { - return jQuery2.grep(elements, function(elem) { + return jQuery.grep(elements, function(elem) { return elem === qualifier !== not; }); } if (typeof qualifier !== "string") { - return jQuery2.grep(elements, function(elem) { + return jQuery.grep(elements, function(elem) { return indexOf.call(qualifier, elem) > -1 !== not; }); } - return jQuery2.filter(qualifier, elements, not); + return jQuery.filter(qualifier, elements, not); } - jQuery2.filter = function(expr, elems, not) { + jQuery.filter = function(expr, elems, not) { var elem = elems[0]; if (not) { expr = ":not(" + expr + ")"; } if (elems.length === 1 && elem.nodeType === 1) { - return jQuery2.find.matchesSelector(elem, expr) ? [elem] : []; + return jQuery.find.matchesSelector(elem, expr) ? [elem] : []; } - return jQuery2.find.matches(expr, jQuery2.grep(elems, function(elem2) { + return jQuery.find.matches(expr, jQuery.grep(elems, function(elem2) { return elem2.nodeType === 1; })); }; - jQuery2.fn.extend({ + jQuery.fn.extend({ find: function(selector) { var i, ret, len = this.length, self = this; if (typeof selector !== "string") { - return this.pushStack(jQuery2(selector).filter(function() { + return this.pushStack(jQuery(selector).filter(function() { for (i = 0; i < len; i++) { - if (jQuery2.contains(self[i], this)) { + if (jQuery.contains(self[i], this)) { return true; } } @@ -1588,9 +1598,9 @@ } ret = this.pushStack([]); for (i = 0; i < len; i++) { - jQuery2.find(selector, self[i], ret); + jQuery.find(selector, self[i], ret); } - return len > 1 ? jQuery2.uniqueSort(ret) : ret; + return len > 1 ? jQuery.uniqueSort(ret) : ret; }, filter: function(selector) { return this.pushStack(winnow(this, selector || [], false)); @@ -1603,12 +1613,12 @@ this, // If this is a positional/relative selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test(selector) ? jQuery2(selector) : selector || [], + typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false ).length; } }); - var rootjQuery, rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery2.fn.init = function(selector, context, root) { + var rootjQuery, rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery.fn.init = function(selector, context, root) { var match, elem; if (!selector) { return this; @@ -1622,13 +1632,13 @@ } if (match && (match[1] || !context)) { if (match[1]) { - context = context instanceof jQuery2 ? context[0] : context; - jQuery2.merge(this, jQuery2.parseHTML( + context = context instanceof jQuery ? context[0] : context; + jQuery.merge(this, jQuery.parseHTML( match[1], context && context.nodeType ? context.ownerDocument || context : document2, true )); - if (rsingleTag.test(match[1]) && jQuery2.isPlainObject(context)) { + if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) { for (match in context) { if (isFunction(this[match])) { this[match](context[match]); @@ -1658,39 +1668,39 @@ } else if (isFunction(selector)) { return root.ready !== void 0 ? root.ready(selector) : ( // Execute immediately if ready is not present - selector(jQuery2) + selector(jQuery) ); } - return jQuery2.makeArray(selector, this); + return jQuery.makeArray(selector, this); }; - init.prototype = jQuery2.fn; - rootjQuery = jQuery2(document2); + init.prototype = jQuery.fn; + rootjQuery = jQuery(document2); var rparentsprev = /^(?:parents|prev(?:Until|All))/, guaranteedUnique = { children: true, contents: true, next: true, prev: true }; - jQuery2.fn.extend({ + jQuery.fn.extend({ has: function(target) { - var targets = jQuery2(target, this), l = targets.length; + var targets = jQuery(target, this), l = targets.length; return this.filter(function() { var i = 0; for (; i < l; i++) { - if (jQuery2.contains(this, targets[i])) { + if (jQuery.contains(this, targets[i])) { return true; } } }); }, closest: function(selectors, context) { - var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery2(selectors); + var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery(selectors); if (!rneedsContext.test(selectors)) { for (; i < l; i++) { for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) { if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 : ( // Don't pass non-elements to jQuery#find - cur.nodeType === 1 && jQuery2.find.matchesSelector(cur, selectors) + cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors) ))) { matched.push(cur); break; @@ -1698,7 +1708,7 @@ } } } - return this.pushStack(matched.length > 1 ? jQuery2.uniqueSort(matched) : matched); + return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched); }, // Determine the position of an element within the set index: function(elem) { @@ -1706,7 +1716,7 @@ return this[0] && this[0].parentNode ? this.first().prevAll().length : -1; } if (typeof elem === "string") { - return indexOf.call(jQuery2(elem), this[0]); + return indexOf.call(jQuery(elem), this[0]); } return indexOf.call( this, @@ -1716,8 +1726,8 @@ }, add: function(selector, context) { return this.pushStack( - jQuery2.uniqueSort( - jQuery2.merge(this.get(), jQuery2(selector, context)) + jQuery.uniqueSort( + jQuery.merge(this.get(), jQuery(selector, context)) ) ); }, @@ -1732,7 +1742,7 @@ } return cur; } - jQuery2.each({ + jQuery.each({ parent: function(elem) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; @@ -1777,20 +1787,20 @@ if (nodeName(elem, "template")) { elem = elem.content || elem; } - return jQuery2.merge([], elem.childNodes); + return jQuery.merge([], elem.childNodes); } }, function(name, fn) { - jQuery2.fn[name] = function(until, selector) { - var matched = jQuery2.map(this, fn, until); + jQuery.fn[name] = function(until, selector) { + var matched = jQuery.map(this, fn, until); if (name.slice(-5) !== "Until") { selector = until; } if (selector && typeof selector === "string") { - matched = jQuery2.filter(selector, matched); + matched = jQuery.filter(selector, matched); } if (this.length > 1) { if (!guaranteedUnique[name]) { - jQuery2.uniqueSort(matched); + jQuery.uniqueSort(matched); } if (rparentsprev.test(name)) { matched.reverse(); @@ -1802,13 +1812,13 @@ var rnothtmlwhite = /[^\x20\t\r\n\f]+/g; function createOptions(options) { var object = {}; - jQuery2.each(options.match(rnothtmlwhite) || [], function(_, flag) { + jQuery.each(options.match(rnothtmlwhite) || [], function(_, flag) { object[flag] = true; }); return object; } - jQuery2.Callbacks = function(options) { - options = typeof options === "string" ? createOptions(options) : jQuery2.extend({}, options); + jQuery.Callbacks = function(options) { + options = typeof options === "string" ? createOptions(options) : jQuery.extend({}, options); var firing, memory, fired, locked, list = [], queue = [], firingIndex = -1, fire = function() { locked = locked || options.once; fired = firing = true; @@ -1841,7 +1851,7 @@ queue.push(memory); } (function add2(args) { - jQuery2.each(args, function(_, arg) { + jQuery.each(args, function(_, arg) { if (isFunction(arg)) { if (!options.unique || !self.has(arg)) { list.push(arg); @@ -1859,9 +1869,9 @@ }, // Remove a callback from the list remove: function() { - jQuery2.each(arguments, function(_, arg) { + jQuery.each(arguments, function(_, arg) { var index; - while ((index = jQuery2.inArray(arg, list, index)) > -1) { + while ((index = jQuery.inArray(arg, list, index)) > -1) { list.splice(index, 1); if (index <= firingIndex) { firingIndex--; @@ -1873,7 +1883,7 @@ // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function(fn) { - return fn ? jQuery2.inArray(fn, list) > -1 : list.length > 0; + return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0; }, // Remove all callbacks from the list empty: function() { @@ -1950,7 +1960,7 @@ reject.apply(void 0, [value2]); } } - jQuery2.extend({ + jQuery.extend({ Deferred: function(func) { var tuples = [ // action, add listener, callbacks, @@ -1958,23 +1968,23 @@ [ "notify", "progress", - jQuery2.Callbacks("memory"), - jQuery2.Callbacks("memory"), + jQuery.Callbacks("memory"), + jQuery.Callbacks("memory"), 2 ], [ "resolve", "done", - jQuery2.Callbacks("once memory"), - jQuery2.Callbacks("once memory"), + jQuery.Callbacks("once memory"), + jQuery.Callbacks("once memory"), 0, "resolved" ], [ "reject", "fail", - jQuery2.Callbacks("once memory"), - jQuery2.Callbacks("once memory"), + jQuery.Callbacks("once memory"), + jQuery.Callbacks("once memory"), 1, "rejected" ] @@ -1992,8 +2002,8 @@ // Keep pipe for back-compat pipe: function() { var fns = arguments; - return jQuery2.Deferred(function(newDefer) { - jQuery2.each(tuples, function(_i, tuple) { + return jQuery.Deferred(function(newDefer) { + jQuery.each(tuples, function(_i, tuple) { var fn = isFunction(fns[tuple[4]]) && fns[tuple[4]]; deferred[tuple[1]](function() { var returned = fn && fn.apply(this, arguments); @@ -2059,8 +2069,8 @@ try { mightThrow(); } catch (e) { - if (jQuery2.Deferred.exceptionHook) { - jQuery2.Deferred.exceptionHook( + if (jQuery.Deferred.exceptionHook) { + jQuery.Deferred.exceptionHook( e, process.error ); @@ -2077,16 +2087,16 @@ if (depth) { process(); } else { - if (jQuery2.Deferred.getErrorHook) { - process.error = jQuery2.Deferred.getErrorHook(); - } else if (jQuery2.Deferred.getStackHook) { - process.error = jQuery2.Deferred.getStackHook(); + if (jQuery.Deferred.getErrorHook) { + process.error = jQuery.Deferred.getErrorHook(); + } else if (jQuery.Deferred.getStackHook) { + process.error = jQuery.Deferred.getStackHook(); } window2.setTimeout(process); } }; } - return jQuery2.Deferred(function(newDefer) { + return jQuery.Deferred(function(newDefer) { tuples[0][3].add( resolve( 0, @@ -2114,10 +2124,10 @@ // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function(obj) { - return obj != null ? jQuery2.extend(obj, promise) : promise; + return obj != null ? jQuery.extend(obj, promise) : promise; } }, deferred = {}; - jQuery2.each(tuples, function(i, tuple) { + jQuery.each(tuples, function(i, tuple) { var list = tuple[2], stateString = tuple[5]; promise[tuple[1]] = list.add; if (stateString) { @@ -2152,7 +2162,7 @@ }, // Deferred helper when: function(singleValue) { - var remaining = arguments.length, i = remaining, resolveContexts = Array(i), resolveValues = slice.call(arguments), primary = jQuery2.Deferred(), updateFunc = function(i2) { + var remaining = arguments.length, i = remaining, resolveContexts = Array(i), resolveValues = slice.call(arguments), primary = jQuery.Deferred(), updateFunc = function(i2) { return function(value) { resolveContexts[i2] = this; resolveValues[i2] = arguments.length > 1 ? slice.call(arguments) : value; @@ -2179,7 +2189,7 @@ } }); var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - jQuery2.Deferred.exceptionHook = function(error2, asyncError) { + jQuery.Deferred.exceptionHook = function(error2, asyncError) { if (window2.console && window2.console.warn && error2 && rerrorNames.test(error2.name)) { window2.console.warn( "jQuery.Deferred exception: " + error2.message, @@ -2188,19 +2198,19 @@ ); } }; - jQuery2.readyException = function(error2) { + jQuery.readyException = function(error2) { window2.setTimeout(function() { throw error2; }); }; - var readyList = jQuery2.Deferred(); - jQuery2.fn.ready = function(fn) { + var readyList = jQuery.Deferred(); + jQuery.fn.ready = function(fn) { readyList.then(fn).catch(function(error2) { - jQuery2.readyException(error2); + jQuery.readyException(error2); }); return this; }; - jQuery2.extend({ + jQuery.extend({ // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before @@ -2208,24 +2218,24 @@ readyWait: 1, // Handle when the DOM is ready ready: function(wait) { - if (wait === true ? --jQuery2.readyWait : jQuery2.isReady) { + if (wait === true ? --jQuery.readyWait : jQuery.isReady) { return; } - jQuery2.isReady = true; - if (wait !== true && --jQuery2.readyWait > 0) { + jQuery.isReady = true; + if (wait !== true && --jQuery.readyWait > 0) { return; } - readyList.resolveWith(document2, [jQuery2]); + readyList.resolveWith(document2, [jQuery]); } }); - jQuery2.ready.then = readyList.then; + jQuery.ready.then = readyList.then; function completed() { document2.removeEventListener("DOMContentLoaded", completed); window2.removeEventListener("load", completed); - jQuery2.ready(); + jQuery.ready(); } if (document2.readyState === "complete" || document2.readyState !== "loading" && !document2.documentElement.doScroll) { - window2.setTimeout(jQuery2.ready); + window2.setTimeout(jQuery.ready); } else { document2.addEventListener("DOMContentLoaded", completed); window2.addEventListener("load", completed); @@ -2249,7 +2259,7 @@ } else { bulk = fn; fn = function(elem, _key, value2) { - return bulk.call(jQuery2(elem), value2); + return bulk.call(jQuery(elem), value2); }; } } @@ -2282,7 +2292,7 @@ return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType; }; function Data() { - this.expando = jQuery2.expando + Data.uid++; + this.expando = jQuery.expando + Data.uid++; } Data.uid = 1; Data.prototype = { @@ -2304,15 +2314,15 @@ return value; }, set: function(owner, data, value) { - var prop, cache = this.cache(owner); + var prop, cache2 = this.cache(owner); if (typeof data === "string") { - cache[camelCase(data)] = value; + cache2[camelCase(data)] = value; } else { for (prop in data) { - cache[camelCase(prop)] = data[prop]; + cache2[camelCase(prop)] = data[prop]; } } - return cache; + return cache2; }, get: function(owner, key) { return key === void 0 ? this.cache(owner) : ( @@ -2328,8 +2338,8 @@ return value !== void 0 ? value : key; }, remove: function(owner, key) { - var i, cache = owner[this.expando]; - if (cache === void 0) { + var i, cache2 = owner[this.expando]; + if (cache2 === void 0) { return; } if (key !== void 0) { @@ -2337,14 +2347,14 @@ key = key.map(camelCase); } else { key = camelCase(key); - key = key in cache ? [key] : key.match(rnothtmlwhite) || []; + key = key in cache2 ? [key] : key.match(rnothtmlwhite) || []; } i = key.length; while (i--) { - delete cache[key[i]]; + delete cache2[key[i]]; } } - if (key === void 0 || jQuery2.isEmptyObject(cache)) { + if (key === void 0 || jQuery.isEmptyObject(cache2)) { if (owner.nodeType) { owner[this.expando] = void 0; } else { @@ -2353,8 +2363,8 @@ } }, hasData: function(owner) { - var cache = owner[this.expando]; - return cache !== void 0 && !jQuery2.isEmptyObject(cache); + var cache2 = owner[this.expando]; + return cache2 !== void 0 && !jQuery.isEmptyObject(cache2); } }; var dataPriv = new Data(); @@ -2395,7 +2405,7 @@ } return data; } - jQuery2.extend({ + jQuery.extend({ hasData: function(elem) { return dataUser.hasData(elem) || dataPriv.hasData(elem); }, @@ -2414,7 +2424,7 @@ dataPriv.remove(elem, name); } }); - jQuery2.fn.extend({ + jQuery.fn.extend({ data: function(key, value) { var i, name, data, elem = this[0], attrs = elem && elem.attributes; if (key === void 0) { @@ -2465,7 +2475,7 @@ }); } }); - jQuery2.extend({ + jQuery.extend({ queue: function(elem, type, data) { var queue; if (elem) { @@ -2473,7 +2483,7 @@ queue = dataPriv.get(elem, type); if (data) { if (!queue || Array.isArray(data)) { - queue = dataPriv.access(elem, type, jQuery2.makeArray(data)); + queue = dataPriv.access(elem, type, jQuery.makeArray(data)); } else { queue.push(data); } @@ -2483,8 +2493,8 @@ }, dequeue: function(elem, type) { type = type || "fx"; - var queue = jQuery2.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery2._queueHooks(elem, type), next = function() { - jQuery2.dequeue(elem, type); + var queue = jQuery.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks(elem, type), next = function() { + jQuery.dequeue(elem, type); }; if (fn === "inprogress") { fn = queue.shift(); @@ -2505,13 +2515,13 @@ _queueHooks: function(elem, type) { var key = type + "queueHooks"; return dataPriv.get(elem, key) || dataPriv.access(elem, key, { - empty: jQuery2.Callbacks("once memory").add(function() { + empty: jQuery.Callbacks("once memory").add(function() { dataPriv.remove(elem, [type + "queue", key]); }) }); } }); - jQuery2.fn.extend({ + jQuery.fn.extend({ queue: function(type, data) { var setter = 2; if (typeof type !== "string") { @@ -2520,19 +2530,19 @@ setter--; } if (arguments.length < setter) { - return jQuery2.queue(this[0], type); + return jQuery.queue(this[0], type); } return data === void 0 ? this : this.each(function() { - var queue = jQuery2.queue(this, type, data); - jQuery2._queueHooks(this, type); + var queue = jQuery.queue(this, type, data); + jQuery._queueHooks(this, type); if (type === "fx" && queue[0] !== "inprogress") { - jQuery2.dequeue(this, type); + jQuery.dequeue(this, type); } }); }, dequeue: function(type) { return this.each(function() { - jQuery2.dequeue(this, type); + jQuery.dequeue(this, type); }); }, clearQueue: function(type) { @@ -2541,7 +2551,7 @@ // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function(type, obj) { - var tmp, count = 1, defer = jQuery2.Deferred(), elements = this, i = this.length, resolve = function() { + var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { if (!--count) { defer.resolveWith(elements, [elements]); } @@ -2567,11 +2577,11 @@ var cssExpand = ["Top", "Right", "Bottom", "Left"]; var documentElement = document2.documentElement; var isAttached = function(elem) { - return jQuery2.contains(elem.ownerDocument, elem); + return jQuery.contains(elem.ownerDocument, elem); }, composed = { composed: true }; if (documentElement.getRootNode) { isAttached = function(elem) { - return jQuery2.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument; + return jQuery.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument; }; } var isHiddenWithinTree = function(elem, el) { @@ -2580,27 +2590,27 @@ // Support: Firefox <=43 - 45 // Disconnected elements can have computed display: none, so first confirm that elem is // in the document. - isAttached(elem) && jQuery2.css(elem, "display") === "none"; + isAttached(elem) && jQuery.css(elem, "display") === "none"; }; function adjustCSS(elem, prop, valueParts, tween) { var adjusted, scale, maxIterations = 20, currentValue = tween ? function() { return tween.cur(); } : function() { - return jQuery2.css(elem, prop, ""); - }, initial = currentValue(), unit = valueParts && valueParts[3] || (jQuery2.cssNumber[prop] ? "" : "px"), initialInUnit = elem.nodeType && (jQuery2.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery2.css(elem, prop)); + return jQuery.css(elem, prop, ""); + }, initial = currentValue(), unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? "" : "px"), initialInUnit = elem.nodeType && (jQuery.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery.css(elem, prop)); if (initialInUnit && initialInUnit[3] !== unit) { initial = initial / 2; unit = unit || initialInUnit[3]; initialInUnit = +initial || 1; while (maxIterations--) { - jQuery2.style(elem, prop, initialInUnit + unit); + jQuery.style(elem, prop, initialInUnit + unit); if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) { maxIterations = 0; } initialInUnit = initialInUnit / scale; } initialInUnit = initialInUnit * 2; - jQuery2.style(elem, prop, initialInUnit + unit); + jQuery.style(elem, prop, initialInUnit + unit); valueParts = valueParts || []; } if (valueParts) { @@ -2621,7 +2631,7 @@ return display; } temp = doc.body.appendChild(doc.createElement(nodeName2)); - display = jQuery2.css(temp, "display"); + display = jQuery.css(temp, "display"); temp.parentNode.removeChild(temp); if (display === "none") { display = "block"; @@ -2661,7 +2671,7 @@ } return elements; } - jQuery2.fn.extend({ + jQuery.fn.extend({ show: function() { return showHide(this, true); }, @@ -2674,9 +2684,9 @@ } return this.each(function() { if (isHiddenWithinTree(this)) { - jQuery2(this).show(); + jQuery(this).show(); } else { - jQuery2(this).hide(); + jQuery(this).hide(); } }); } @@ -2721,7 +2731,7 @@ ret = []; } if (tag === void 0 || tag && nodeName(context, tag)) { - return jQuery2.merge([context], ret); + return jQuery.merge([context], ret); } return ret; } @@ -2742,19 +2752,19 @@ elem = elems[i]; if (elem || elem === 0) { if (toType(elem) === "object") { - jQuery2.merge(nodes, elem.nodeType ? [elem] : elem); + jQuery.merge(nodes, elem.nodeType ? [elem] : elem); } else if (!rhtml.test(elem)) { nodes.push(context.createTextNode(elem)); } else { tmp = tmp || fragment.appendChild(context.createElement("div")); tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(); wrap = wrapMap[tag] || wrapMap._default; - tmp.innerHTML = wrap[1] + jQuery2.htmlPrefilter(elem) + wrap[2]; + tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2]; j = wrap[0]; while (j--) { tmp = tmp.lastChild; } - jQuery2.merge(nodes, tmp.childNodes); + jQuery.merge(nodes, tmp.childNodes); tmp = fragment.firstChild; tmp.textContent = ""; } @@ -2763,7 +2773,7 @@ fragment.textContent = ""; i = 0; while (elem = nodes[i++]) { - if (selection && jQuery2.inArray(elem, selection) > -1) { + if (selection && jQuery.inArray(elem, selection) > -1) { if (ignored) { ignored.push(elem); } @@ -2825,16 +2835,16 @@ if (one === 1) { origFn = fn; fn = function(event) { - jQuery2().off(event); + jQuery().off(event); return origFn.apply(this, arguments); }; - fn.guid = origFn.guid || (origFn.guid = jQuery2.guid++); + fn.guid = origFn.guid || (origFn.guid = jQuery.guid++); } return elem.each(function() { - jQuery2.event.add(this, types, fn, data, selector); + jQuery.event.add(this, types, fn, data, selector); }); } - jQuery2.event = { + jQuery.event = { global: {}, add: function(elem, types, handler, data, selector) { var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get(elem); @@ -2847,17 +2857,17 @@ selector = handleObjIn.selector; } if (selector) { - jQuery2.find.matchesSelector(documentElement, selector); + jQuery.find.matchesSelector(documentElement, selector); } if (!handler.guid) { - handler.guid = jQuery2.guid++; + handler.guid = jQuery.guid++; } if (!(events = elemData.events)) { events = elemData.events = /* @__PURE__ */ Object.create(null); } if (!(eventHandle = elemData.handle)) { eventHandle = elemData.handle = function(e) { - return typeof jQuery2 !== "undefined" && jQuery2.event.triggered !== e.type ? jQuery2.event.dispatch.apply(elem, arguments) : void 0; + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : void 0; }; } types = (types || "").match(rnothtmlwhite) || [""]; @@ -2869,17 +2879,17 @@ if (!type) { continue; } - special = jQuery2.event.special[type] || {}; + special = jQuery.event.special[type] || {}; type = (selector ? special.delegateType : special.bindType) || type; - special = jQuery2.event.special[type] || {}; - handleObj = jQuery2.extend({ + special = jQuery.event.special[type] || {}; + handleObj = jQuery.extend({ type, origType, data, handler, guid: handler.guid, selector, - needsContext: selector && jQuery2.expr.match.needsContext.test(selector), + needsContext: selector && jQuery.expr.match.needsContext.test(selector), namespace: namespaces.join(".") }, handleObjIn); if (!(handlers = events[type])) { @@ -2902,7 +2912,7 @@ } else { handlers.push(handleObj); } - jQuery2.event.global[type] = true; + jQuery.event.global[type] = true; } }, // Detach an event or set of events from an element @@ -2919,11 +2929,11 @@ namespaces = (tmp[2] || "").split(".").sort(); if (!type) { for (type in events) { - jQuery2.event.remove(elem, type + types[t], handler, selector, true); + jQuery.event.remove(elem, type + types[t], handler, selector, true); } continue; } - special = jQuery2.event.special[type] || {}; + special = jQuery.event.special[type] || {}; type = (selector ? special.delegateType : special.bindType) || type; handlers = events[type] || []; tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)"); @@ -2942,17 +2952,17 @@ } if (origCount && !handlers.length) { if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) { - jQuery2.removeEvent(elem, type, elemData.handle); + jQuery.removeEvent(elem, type, elemData.handle); } delete events[type]; } } - if (jQuery2.isEmptyObject(events)) { + if (jQuery.isEmptyObject(events)) { dataPriv.remove(elem, "handle events"); } }, dispatch: function(nativeEvent) { - var i, j, ret, matched, handleObj, handlerQueue, args = new Array(arguments.length), event = jQuery2.event.fix(nativeEvent), handlers = (dataPriv.get(this, "events") || /* @__PURE__ */ Object.create(null))[event.type] || [], special = jQuery2.event.special[event.type] || {}; + var i, j, ret, matched, handleObj, handlerQueue, args = new Array(arguments.length), event = jQuery.event.fix(nativeEvent), handlers = (dataPriv.get(this, "events") || /* @__PURE__ */ Object.create(null))[event.type] || [], special = jQuery.event.special[event.type] || {}; args[0] = event; for (i = 1; i < arguments.length; i++) { args[i] = arguments[i]; @@ -2961,7 +2971,7 @@ if (special.preDispatch && special.preDispatch.call(this, event) === false) { return; } - handlerQueue = jQuery2.event.handlers.call(this, event, handlers); + handlerQueue = jQuery.event.handlers.call(this, event, handlers); i = 0; while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) { event.currentTarget = matched.elem; @@ -2970,7 +2980,7 @@ if (!event.rnamespace || handleObj.namespace === false || event.rnamespace.test(handleObj.namespace)) { event.handleObj = handleObj; event.data = handleObj.data; - ret = ((jQuery2.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args); + ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args); if (ret !== void 0) { if ((event.result = ret) === false) { event.preventDefault(); @@ -3003,7 +3013,7 @@ handleObj = handlers[i]; sel = handleObj.selector + " "; if (matchedSelectors[sel] === void 0) { - matchedSelectors[sel] = handleObj.needsContext ? jQuery2(sel, this).index(cur) > -1 : jQuery2.find(sel, this, null, [cur]).length; + matchedSelectors[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length; } if (matchedSelectors[sel]) { matchedHandlers.push(handleObj); @@ -3022,7 +3032,7 @@ return handlerQueue; }, addProp: function(name, hook) { - Object.defineProperty(jQuery2.Event.prototype, name, { + Object.defineProperty(jQuery.Event.prototype, name, { enumerable: true, configurable: true, get: isFunction(hook) ? function() { @@ -3045,7 +3055,7 @@ }); }, fix: function(originalEvent) { - return originalEvent[jQuery2.expando] ? originalEvent : new jQuery2.Event(originalEvent); + return originalEvent[jQuery.expando] ? originalEvent : new jQuery.Event(originalEvent); }, special: { load: { @@ -3087,12 +3097,12 @@ function leverageNative(el, type, isSetup) { if (!isSetup) { if (dataPriv.get(el, type) === void 0) { - jQuery2.event.add(el, type, returnTrue); + jQuery.event.add(el, type, returnTrue); } return; } dataPriv.set(el, type, false); - jQuery2.event.add(el, type, { + jQuery.event.add(el, type, { namespace: false, handler: function(event) { var result, saved = dataPriv.get(this, type); @@ -3108,11 +3118,11 @@ event.preventDefault(); return result; } - } else if ((jQuery2.event.special[type] || {}).delegateType) { + } else if ((jQuery.event.special[type] || {}).delegateType) { event.stopPropagation(); } } else if (saved) { - dataPriv.set(this, type, jQuery2.event.trigger( + dataPriv.set(this, type, jQuery.event.trigger( saved[0], saved.slice(1), this @@ -3123,14 +3133,14 @@ } }); } - jQuery2.removeEvent = function(elem, type, handle) { + jQuery.removeEvent = function(elem, type, handle) { if (elem.removeEventListener) { elem.removeEventListener(type, handle); } }; - jQuery2.Event = function(src, props) { - if (!(this instanceof jQuery2.Event)) { - return new jQuery2.Event(src, props); + jQuery.Event = function(src, props) { + if (!(this instanceof jQuery.Event)) { + return new jQuery.Event(src, props); } if (src && src.type) { this.originalEvent = src; @@ -3144,13 +3154,13 @@ this.type = src; } if (props) { - jQuery2.extend(this, props); + jQuery.extend(this, props); } this.timeStamp = src && src.timeStamp || Date.now(); - this[jQuery2.expando] = true; + this[jQuery.expando] = true; }; - jQuery2.Event.prototype = { - constructor: jQuery2.Event, + jQuery.Event.prototype = { + constructor: jQuery.Event, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, @@ -3178,7 +3188,7 @@ this.stopPropagation(); } }; - jQuery2.each({ + jQuery.each({ altKey: true, bubbles: true, cancelable: true, @@ -3210,11 +3220,11 @@ toElement: true, touches: true, which: true - }, jQuery2.event.addProp); - jQuery2.each({ focus: "focusin", blur: "focusout" }, function(type, delegateType) { + }, jQuery.event.addProp); + jQuery.each({ focus: "focusin", blur: "focusout" }, function(type, delegateType) { function focusMappedHandler(nativeEvent) { if (document2.documentMode) { - var handle = dataPriv.get(this, "handle"), event = jQuery2.event.fix(nativeEvent); + var handle = dataPriv.get(this, "handle"), event = jQuery.event.fix(nativeEvent); event.type = nativeEvent.type === "focusin" ? "focus" : "blur"; event.isSimulated = true; handle(nativeEvent); @@ -3222,14 +3232,14 @@ handle(event); } } else { - jQuery2.event.simulate( + jQuery.event.simulate( delegateType, nativeEvent.target, - jQuery2.event.fix(nativeEvent) + jQuery.event.fix(nativeEvent) ); } } - jQuery2.event.special[type] = { + jQuery.event.special[type] = { // Utilize native event if possible so blur/focus sequence is correct setup: function() { var attaches; @@ -3269,7 +3279,7 @@ }, delegateType }; - jQuery2.event.special[delegateType] = { + jQuery.event.special[delegateType] = { setup: function() { var doc = this.ownerDocument || this.document || this, dataHolder = document2.documentMode ? this : doc, attaches = dataPriv.get(dataHolder, delegateType); if (!attaches) { @@ -3296,18 +3306,18 @@ } }; }); - jQuery2.each({ + jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function(orig, fix) { - jQuery2.event.special[orig] = { + jQuery.event.special[orig] = { delegateType: fix, bindType: fix, handle: function(event) { var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; - if (!related || related !== target && !jQuery2.contains(target, related)) { + if (!related || related !== target && !jQuery.contains(target, related)) { event.type = handleObj.origType; ret = handleObj.handler.apply(this, arguments); event.type = fix; @@ -3316,7 +3326,7 @@ } }; }); - jQuery2.fn.extend({ + jQuery.fn.extend({ on: function(types, selector, data, fn) { return on(this, types, selector, data, fn); }, @@ -3327,7 +3337,7 @@ var handleObj, type; if (types && types.preventDefault && types.handleObj) { handleObj = types.handleObj; - jQuery2(types.delegateTarget).off( + jQuery(types.delegateTarget).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler @@ -3348,14 +3358,14 @@ fn = returnFalse; } return this.each(function() { - jQuery2.event.remove(this, types, fn, selector); + jQuery.event.remove(this, types, fn, selector); }); } }); var rnoInnerhtml = /\s*$/g; function manipulationTarget(elem, content) { if (nodeName(elem, "table") && nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr")) { - return jQuery2(elem).children("tbody")[0] || elem; + return jQuery(elem).children("tbody")[0] || elem; } return elem; } @@ -3383,14 +3393,14 @@ dataPriv.remove(dest, "handle events"); for (type in events) { for (i = 0, l = events[type].length; i < l; i++) { - jQuery2.event.add(dest, type, events[type][i]); + jQuery.event.add(dest, type, events[type][i]); } } } } if (dataUser.hasData(src)) { udataOld = dataUser.access(src); - udataCur = jQuery2.extend({}, udataOld); + udataCur = jQuery.extend({}, udataOld); dataUser.set(dest, udataCur); } } @@ -3421,27 +3431,27 @@ fragment = first; } if (first || ignored) { - scripts = jQuery2.map(getAll(fragment, "script"), disableScript); + scripts = jQuery.map(getAll(fragment, "script"), disableScript); hasScripts = scripts.length; for (; i < l; i++) { node = fragment; if (i !== iNoClone) { - node = jQuery2.clone(node, true, true); + node = jQuery.clone(node, true, true); if (hasScripts) { - jQuery2.merge(scripts, getAll(node, "script")); + jQuery.merge(scripts, getAll(node, "script")); } } callback.call(collection[i], node, i); } if (hasScripts) { doc = scripts[scripts.length - 1].ownerDocument; - jQuery2.map(scripts, restoreScript); + jQuery.map(scripts, restoreScript); for (i = 0; i < hasScripts; i++) { node = scripts[i]; - if (rscriptType.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery2.contains(doc, node)) { + if (rscriptType.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery.contains(doc, node)) { if (node.src && (node.type || "").toLowerCase() !== "module") { - if (jQuery2._evalUrl && !node.noModule) { - jQuery2._evalUrl(node.src, { + if (jQuery._evalUrl && !node.noModule) { + jQuery._evalUrl(node.src, { nonce: node.nonce || node.getAttribute("nonce") }, doc); } @@ -3456,10 +3466,10 @@ return collection; } function remove(elem, selector, keepData) { - var node, nodes = selector ? jQuery2.filter(selector, elem) : elem, i = 0; + var node, nodes = selector ? jQuery.filter(selector, elem) : elem, i = 0; for (; (node = nodes[i]) != null; i++) { if (!keepData && node.nodeType === 1) { - jQuery2.cleanData(getAll(node)); + jQuery.cleanData(getAll(node)); } if (node.parentNode) { if (keepData && isAttached(node)) { @@ -3470,13 +3480,13 @@ } return elem; } - jQuery2.extend({ + jQuery.extend({ htmlPrefilter: function(html) { return html; }, clone: function(elem, dataAndEvents, deepDataAndEvents) { var i, l, srcElements, destElements, clone = elem.cloneNode(true), inPage = isAttached(elem); - if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery2.isXMLDoc(elem)) { + if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) { destElements = getAll(clone); srcElements = getAll(elem); for (i = 0, l = srcElements.length; i < l; i++) { @@ -3501,16 +3511,16 @@ return clone; }, cleanData: function(elems) { - var data, elem, type, special = jQuery2.event.special, i = 0; + var data, elem, type, special = jQuery.event.special, i = 0; for (; (elem = elems[i]) !== void 0; i++) { if (acceptData(elem)) { if (data = elem[dataPriv.expando]) { if (data.events) { for (type in data.events) { if (special[type]) { - jQuery2.event.remove(elem, type); + jQuery.event.remove(elem, type); } else { - jQuery2.removeEvent(elem, type, data.handle); + jQuery.removeEvent(elem, type, data.handle); } } } @@ -3523,7 +3533,7 @@ } } }); - jQuery2.fn.extend({ + jQuery.fn.extend({ detach: function(selector) { return remove(this, selector, true); }, @@ -3532,7 +3542,7 @@ }, text: function(value) { return access(this, function(value2) { - return value2 === void 0 ? jQuery2.text(this) : this.empty().each(function() { + return value2 === void 0 ? jQuery.text(this) : this.empty().each(function() { if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { this.textContent = value2; } @@ -3573,7 +3583,7 @@ var elem, i = 0; for (; (elem = this[i]) != null; i++) { if (elem.nodeType === 1) { - jQuery2.cleanData(getAll(elem, false)); + jQuery.cleanData(getAll(elem, false)); elem.textContent = ""; } } @@ -3583,7 +3593,7 @@ dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map(function() { - return jQuery2.clone(this, dataAndEvents, deepDataAndEvents); + return jQuery.clone(this, dataAndEvents, deepDataAndEvents); }); }, html: function(value) { @@ -3593,12 +3603,12 @@ return elem.innerHTML; } if (typeof value2 === "string" && !rnoInnerhtml.test(value2) && !wrapMap[(rtagName.exec(value2) || ["", ""])[1].toLowerCase()]) { - value2 = jQuery2.htmlPrefilter(value2); + value2 = jQuery.htmlPrefilter(value2); try { for (; i < l; i++) { elem = this[i] || {}; if (elem.nodeType === 1) { - jQuery2.cleanData(getAll(elem, false)); + jQuery.cleanData(getAll(elem, false)); elem.innerHTML = value2; } } @@ -3615,8 +3625,8 @@ var ignored = []; return domManip(this, arguments, function(elem) { var parent = this.parentNode; - if (jQuery2.inArray(this, ignored) < 0) { - jQuery2.cleanData(getAll(this)); + if (jQuery.inArray(this, ignored) < 0) { + jQuery.cleanData(getAll(this)); if (parent) { parent.replaceChild(elem, this); } @@ -3624,18 +3634,18 @@ }, ignored); } }); - jQuery2.each({ + jQuery.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function(name, original) { - jQuery2.fn[name] = function(selector) { - var elems, ret = [], insert = jQuery2(selector), last = insert.length - 1, i = 0; + jQuery.fn[name] = function(selector) { + var elems, ret = [], insert = jQuery(selector), last = insert.length - 1, i = 0; for (; i <= last; i++) { elems = i === last ? this : this.clone(true); - jQuery2(insert[i])[original](elems); + jQuery(insert[i])[original](elems); push.apply(ret, elems.get()); } return this.pushStack(ret); @@ -3692,7 +3702,7 @@ div.style.backgroundClip = "content-box"; div.cloneNode(true).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; - jQuery2.extend(support, { + jQuery.extend(support, { boxSizingReliable: function() { computeStyleTests(); return boxSizingReliableVal; @@ -3729,7 +3739,7 @@ tr = document2.createElement("tr"); trChild = document2.createElement("div"); table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; - tr.style.cssText = "border:1px solid"; + tr.style.cssText = "box-sizing:content-box;border:1px solid"; tr.style.height = "1px"; trChild.style.height = "9px"; trChild.style.display = "block"; @@ -3751,7 +3761,7 @@ ret = ret.replace(rtrimCSS, "$1") || void 0; } if (ret === "" && !isAttached(elem)) { - ret = jQuery2.style(elem, name); + ret = jQuery.style(elem, name); } if (!support.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name)) { width = style.width; @@ -3792,7 +3802,7 @@ } } function finalPropName(name) { - var final = jQuery2.cssProps[name] || vendorProps[name]; + var final = jQuery.cssProps[name] || vendorProps[name]; if (final) { return final; } @@ -3819,21 +3829,21 @@ } for (; i < 4; i += 2) { if (box === "margin") { - marginDelta += jQuery2.css(elem, box + cssExpand[i], true, styles); + marginDelta += jQuery.css(elem, box + cssExpand[i], true, styles); } if (!isBorderBox) { - delta += jQuery2.css(elem, "padding" + cssExpand[i], true, styles); + delta += jQuery.css(elem, "padding" + cssExpand[i], true, styles); if (box !== "padding") { - delta += jQuery2.css(elem, "border" + cssExpand[i] + "Width", true, styles); + delta += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); } else { - extra += jQuery2.css(elem, "border" + cssExpand[i] + "Width", true, styles); + extra += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); } } else { if (box === "content") { - delta -= jQuery2.css(elem, "padding" + cssExpand[i], true, styles); + delta -= jQuery.css(elem, "padding" + cssExpand[i], true, styles); } if (box !== "margin") { - delta -= jQuery2.css(elem, "border" + cssExpand[i] + "Width", true, styles); + delta -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); } } } @@ -3847,7 +3857,7 @@ return delta + marginDelta; } function getWidthOrHeight(elem, dimension, extra) { - var styles = getStyles(elem), boxSizingNeeded = !support.boxSizingReliable() || extra, isBorderBox = boxSizingNeeded && jQuery2.css(elem, "boxSizing", false, styles) === "border-box", valueIsBorderBox = isBorderBox, val = curCSS(elem, dimension, styles), offsetProp = "offset" + dimension[0].toUpperCase() + dimension.slice(1); + var styles = getStyles(elem), boxSizingNeeded = !support.boxSizingReliable() || extra, isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box", valueIsBorderBox = isBorderBox, val = curCSS(elem, dimension, styles), offsetProp = "offset" + dimension[0].toUpperCase() + dimension.slice(1); if (rnumnonpx.test(val)) { if (!extra) { return val; @@ -3862,9 +3872,9 @@ // This happens for inline elements with no explicit setting (gh-3571) val === "auto" || // Support: Android <=4.1 - 4.3 only // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) - !parseFloat(val) && jQuery2.css(elem, "display", false, styles) === "inline") && // Make sure the element is visible & connected + !parseFloat(val) && jQuery.css(elem, "display", false, styles) === "inline") && // Make sure the element is visible & connected elem.getClientRects().length) { - isBorderBox = jQuery2.css(elem, "boxSizing", false, styles) === "border-box"; + isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box"; valueIsBorderBox = offsetProp in elem; if (valueIsBorderBox) { val = elem[offsetProp]; @@ -3881,7 +3891,7 @@ val ) + "px"; } - jQuery2.extend({ + jQuery.extend({ // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { @@ -3937,7 +3947,7 @@ if (!isCustomProp) { name = finalPropName(origName); } - hooks = jQuery2.cssHooks[name] || jQuery2.cssHooks[origName]; + hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; if (value !== void 0) { type = typeof value; if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) { @@ -3948,7 +3958,7 @@ return; } if (type === "number" && !isCustomProp) { - value += ret && ret[3] || (jQuery2.cssNumber[origName] ? "" : "px"); + value += ret && ret[3] || (jQuery.cssNumber[origName] ? "" : "px"); } if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) { style[name] = "inherit"; @@ -3972,7 +3982,7 @@ if (!isCustomProp) { name = finalPropName(origName); } - hooks = jQuery2.cssHooks[name] || jQuery2.cssHooks[origName]; + hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; if (hooks && "get" in hooks) { val = hooks.get(elem, true, extra); } @@ -3989,11 +3999,11 @@ return val; } }); - jQuery2.each(["height", "width"], function(_i, dimension) { - jQuery2.cssHooks[dimension] = { + jQuery.each(["height", "width"], function(_i, dimension) { + jQuery.cssHooks[dimension] = { get: function(elem, computed, extra) { if (computed) { - return rdisplayswap.test(jQuery2.css(elem, "display")) && // Support: Safari 8+ + return rdisplayswap.test(jQuery.css(elem, "display")) && // Support: Safari 8+ // Table columns in Safari have non-zero offsetWidth & zero // getBoundingClientRect().width unless display is changed. // Support: IE <=11 only @@ -4005,7 +4015,7 @@ } }, set: function(elem, value, extra) { - var matches, styles = getStyles(elem), scrollboxSizeBuggy = !support.scrollboxSize() && styles.position === "absolute", boxSizingNeeded = scrollboxSizeBuggy || extra, isBorderBox = boxSizingNeeded && jQuery2.css(elem, "boxSizing", false, styles) === "border-box", subtract = extra ? boxModelAdjustment( + var matches, styles = getStyles(elem), scrollboxSizeBuggy = !support.scrollboxSize() && styles.position === "absolute", boxSizingNeeded = scrollboxSizeBuggy || extra, isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box", subtract = extra ? boxModelAdjustment( elem, dimension, extra, @@ -4019,13 +4029,13 @@ } if (subtract && (matches = rcssNum.exec(value)) && (matches[3] || "px") !== "px") { elem.style[dimension] = value; - value = jQuery2.css(elem, dimension); + value = jQuery.css(elem, dimension); } return setPositiveNumber(elem, value, subtract); } }; }); - jQuery2.cssHooks.marginLeft = addGetHookIf( + jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, function(elem, computed) { if (computed) { @@ -4035,12 +4045,12 @@ } } ); - jQuery2.each({ + jQuery.each({ margin: "", padding: "", border: "Width" }, function(prefix, suffix) { - jQuery2.cssHooks[prefix + suffix] = { + jQuery.cssHooks[prefix + suffix] = { expand: function(value) { var i = 0, expanded = {}, parts = typeof value === "string" ? value.split(" ") : [value]; for (; i < 4; i++) { @@ -4050,10 +4060,10 @@ } }; if (prefix !== "margin") { - jQuery2.cssHooks[prefix + suffix].set = setPositiveNumber; + jQuery.cssHooks[prefix + suffix].set = setPositiveNumber; } }); - jQuery2.fn.extend({ + jQuery.fn.extend({ css: function(name, value) { return access(this, function(elem, name2, value2) { var styles, len, map = {}, i = 0; @@ -4061,28 +4071,28 @@ styles = getStyles(elem); len = name2.length; for (; i < len; i++) { - map[name2[i]] = jQuery2.css(elem, name2[i], false, styles); + map[name2[i]] = jQuery.css(elem, name2[i], false, styles); } return map; } - return value2 !== void 0 ? jQuery2.style(elem, name2, value2) : jQuery2.css(elem, name2); + return value2 !== void 0 ? jQuery.style(elem, name2, value2) : jQuery.css(elem, name2); }, name, value, arguments.length > 1); } }); function Tween(elem, options, prop, end, easing) { return new Tween.prototype.init(elem, options, prop, end, easing); } - jQuery2.Tween = Tween; + jQuery.Tween = Tween; Tween.prototype = { constructor: Tween, init: function(elem, options, prop, end, easing, unit) { this.elem = elem; this.prop = prop; - this.easing = easing || jQuery2.easing._default; + this.easing = easing || jQuery.easing._default; this.options = options; this.start = this.now = this.cur(); this.end = end; - this.unit = unit || (jQuery2.cssNumber[prop] ? "" : "px"); + this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px"); }, cur: function() { var hooks = Tween.propHooks[this.prop]; @@ -4091,7 +4101,7 @@ run: function(percent) { var eased, hooks = Tween.propHooks[this.prop]; if (this.options.duration) { - this.pos = eased = jQuery2.easing[this.easing]( + this.pos = eased = jQuery.easing[this.easing]( percent, this.options.duration * percent, 0, @@ -4121,14 +4131,14 @@ if (tween.elem.nodeType !== 1 || tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) { return tween.elem[tween.prop]; } - result = jQuery2.css(tween.elem, tween.prop, ""); + result = jQuery.css(tween.elem, tween.prop, ""); return !result || result === "auto" ? 0 : result; }, set: function(tween) { - if (jQuery2.fx.step[tween.prop]) { - jQuery2.fx.step[tween.prop](tween); - } else if (tween.elem.nodeType === 1 && (jQuery2.cssHooks[tween.prop] || tween.elem.style[finalPropName(tween.prop)] != null)) { - jQuery2.style(tween.elem, tween.prop, tween.now + tween.unit); + if (jQuery.fx.step[tween.prop]) { + jQuery.fx.step[tween.prop](tween); + } else if (tween.elem.nodeType === 1 && (jQuery.cssHooks[tween.prop] || tween.elem.style[finalPropName(tween.prop)] != null)) { + jQuery.style(tween.elem, tween.prop, tween.now + tween.unit); } else { tween.elem[tween.prop] = tween.now; } @@ -4142,7 +4152,7 @@ } } }; - jQuery2.easing = { + jQuery.easing = { linear: function(p) { return p; }, @@ -4151,17 +4161,17 @@ }, _default: "swing" }; - jQuery2.fx = Tween.prototype.init; - jQuery2.fx.step = {}; + jQuery.fx = Tween.prototype.init; + jQuery.fx.step = {}; var fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/; function schedule() { if (inProgress) { if (document2.hidden === false && window2.requestAnimationFrame) { window2.requestAnimationFrame(schedule); } else { - window2.setTimeout(schedule, jQuery2.fx.interval); + window2.setTimeout(schedule, jQuery.fx.interval); } - jQuery2.fx.tick(); + jQuery.fx.tick(); } } function createFxNow() { @@ -4193,7 +4203,7 @@ function defaultPrefilter(elem, props, opts) { var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHiddenWithinTree(elem), dataShow = dataPriv.get(elem, "fxshow"); if (!opts.queue) { - hooks = jQuery2._queueHooks(elem, "fx"); + hooks = jQuery._queueHooks(elem, "fx"); if (hooks.unqueued == null) { hooks.unqueued = 0; oldfire = hooks.empty.fire; @@ -4207,7 +4217,7 @@ anim.always(function() { anim.always(function() { hooks.unqueued--; - if (!jQuery2.queue(elem, "fx").length) { + if (!jQuery.queue(elem, "fx").length) { hooks.empty.fire(); } }); @@ -4225,11 +4235,11 @@ continue; } } - orig[prop] = dataShow && dataShow[prop] || jQuery2.style(elem, prop); + orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop); } } - propTween = !jQuery2.isEmptyObject(props); - if (!propTween && jQuery2.isEmptyObject(orig)) { + propTween = !jQuery.isEmptyObject(props); + if (!propTween && jQuery.isEmptyObject(orig)) { return; } if (isBox && elem.nodeType === 1) { @@ -4238,19 +4248,19 @@ if (restoreDisplay == null) { restoreDisplay = dataPriv.get(elem, "display"); } - display = jQuery2.css(elem, "display"); + display = jQuery.css(elem, "display"); if (display === "none") { if (restoreDisplay) { display = restoreDisplay; } else { showHide([elem], true); restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery2.css(elem, "display"); + display = jQuery.css(elem, "display"); showHide([elem]); } } if (display === "inline" || display === "inline-block" && restoreDisplay != null) { - if (jQuery2.css(elem, "float") === "none") { + if (jQuery.css(elem, "float") === "none") { if (!propTween) { anim.done(function() { style.display = restoreDisplay; @@ -4294,7 +4304,7 @@ } dataPriv.remove(elem, "fxshow"); for (prop in orig) { - jQuery2.style(elem, prop, orig[prop]); + jQuery.style(elem, prop, orig[prop]); } }); } @@ -4322,7 +4332,7 @@ props[name] = value; delete props[index]; } - hooks = jQuery2.cssHooks[name]; + hooks = jQuery.cssHooks[name]; if (hooks && "expand" in hooks) { value = hooks.expand(value); delete props[name]; @@ -4338,7 +4348,7 @@ } } function Animation(elem, properties, options) { - var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery2.Deferred().always(function() { + var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery.Deferred().always(function() { delete tick.elem; }), tick = function() { if (stopped) { @@ -4359,10 +4369,10 @@ return false; }, animation = deferred.promise({ elem, - props: jQuery2.extend({}, properties), - opts: jQuery2.extend(true, { + props: jQuery.extend({}, properties), + opts: jQuery.extend(true, { specialEasing: {}, - easing: jQuery2.easing._default + easing: jQuery.easing._default }, options), originalProperties: properties, originalOptions: options, @@ -4370,7 +4380,7 @@ duration: options.duration, tweens: [], createTween: function(prop, end) { - var tween = jQuery2.Tween( + var tween = jQuery.Tween( elem, animation.opts, prop, @@ -4403,18 +4413,18 @@ result = Animation.prefilters[index].call(animation, elem, props, animation.opts); if (result) { if (isFunction(result.stop)) { - jQuery2._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result); + jQuery._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result); } return result; } } - jQuery2.map(props, createTween, animation); + jQuery.map(props, createTween, animation); if (isFunction(animation.opts.start)) { animation.opts.start.call(elem, animation); } animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always); - jQuery2.fx.timer( - jQuery2.extend(tick, { + jQuery.fx.timer( + jQuery.extend(tick, { elem, anim: animation, queue: animation.opts.queue @@ -4422,7 +4432,7 @@ ); return animation; } - jQuery2.Animation = jQuery2.extend(Animation, { + jQuery.Animation = jQuery.extend(Animation, { tweeners: { "*": [function(prop, value) { var tween = this.createTween(prop, value); @@ -4453,20 +4463,20 @@ } } }); - jQuery2.speed = function(speed, easing, fn) { - var opt = speed && typeof speed === "object" ? jQuery2.extend({}, speed) : { + jQuery.speed = function(speed, easing, fn) { + var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : { complete: fn || !fn && easing || isFunction(speed) && speed, duration: speed, easing: fn && easing || easing && !isFunction(easing) && easing }; - if (jQuery2.fx.off) { + if (jQuery.fx.off) { opt.duration = 0; } else { if (typeof opt.duration !== "number") { - if (opt.duration in jQuery2.fx.speeds) { - opt.duration = jQuery2.fx.speeds[opt.duration]; + if (opt.duration in jQuery.fx.speeds) { + opt.duration = jQuery.fx.speeds[opt.duration]; } else { - opt.duration = jQuery2.fx.speeds._default; + opt.duration = jQuery.fx.speeds._default; } } } @@ -4479,18 +4489,18 @@ opt.old.call(this); } if (opt.queue) { - jQuery2.dequeue(this, opt.queue); + jQuery.dequeue(this, opt.queue); } }; return opt; }; - jQuery2.fn.extend({ + jQuery.fn.extend({ fadeTo: function(speed, to, easing, callback) { return this.filter(isHiddenWithinTree).css("opacity", 0).show().end().animate({ opacity: to }, speed, easing, callback); }, animate: function(prop, speed, easing, callback) { - var empty = jQuery2.isEmptyObject(prop), optall = jQuery2.speed(speed, easing, callback), doAnimation = function() { - var anim = Animation(this, jQuery2.extend({}, prop), optall); + var empty = jQuery.isEmptyObject(prop), optall = jQuery.speed(speed, easing, callback), doAnimation = function() { + var anim = Animation(this, jQuery.extend({}, prop), optall); if (empty || dataPriv.get(this, "finish")) { anim.stop(true); } @@ -4513,7 +4523,7 @@ this.queue(type || "fx", []); } return this.each(function() { - var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery2.timers, data = dataPriv.get(this); + var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = dataPriv.get(this); if (index) { if (data[index] && data[index].stop) { stopQueue(data[index]); @@ -4533,7 +4543,7 @@ } } if (dequeue || !gotoEnd) { - jQuery2.dequeue(this, type); + jQuery.dequeue(this, type); } }); }, @@ -4542,9 +4552,9 @@ type = type || "fx"; } return this.each(function() { - var index, data = dataPriv.get(this), queue = data[type + "queue"], hooks = data[type + "queueHooks"], timers = jQuery2.timers, length = queue ? queue.length : 0; + var index, data = dataPriv.get(this), queue = data[type + "queue"], hooks = data[type + "queueHooks"], timers = jQuery.timers, length = queue ? queue.length : 0; data.finish = true; - jQuery2.queue(this, type, []); + jQuery.queue(this, type, []); if (hooks && hooks.stop) { hooks.stop.call(this, true); } @@ -4563,13 +4573,13 @@ }); } }); - jQuery2.each(["toggle", "show", "hide"], function(_i, name) { - var cssFn = jQuery2.fn[name]; - jQuery2.fn[name] = function(speed, easing, callback) { + jQuery.each(["toggle", "show", "hide"], function(_i, name) { + var cssFn = jQuery.fn[name]; + jQuery.fn[name] = function(speed, easing, callback) { return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback); }; }); - jQuery2.each({ + jQuery.each({ slideDown: genFx("show"), slideUp: genFx("hide"), slideToggle: genFx("toggle"), @@ -4577,13 +4587,13 @@ fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function(name, props) { - jQuery2.fn[name] = function(speed, easing, callback) { + jQuery.fn[name] = function(speed, easing, callback) { return this.animate(props, speed, easing, callback); }; }); - jQuery2.timers = []; - jQuery2.fx.tick = function() { - var timer, i = 0, timers = jQuery2.timers; + jQuery.timers = []; + jQuery.fx.tick = function() { + var timer, i = 0, timers = jQuery.timers; fxNow = Date.now(); for (; i < timers.length; i++) { timer = timers[i]; @@ -4592,33 +4602,33 @@ } } if (!timers.length) { - jQuery2.fx.stop(); + jQuery.fx.stop(); } fxNow = void 0; }; - jQuery2.fx.timer = function(timer) { - jQuery2.timers.push(timer); - jQuery2.fx.start(); + jQuery.fx.timer = function(timer) { + jQuery.timers.push(timer); + jQuery.fx.start(); }; - jQuery2.fx.interval = 13; - jQuery2.fx.start = function() { + jQuery.fx.interval = 13; + jQuery.fx.start = function() { if (inProgress) { return; } inProgress = true; schedule(); }; - jQuery2.fx.stop = function() { + jQuery.fx.stop = function() { inProgress = null; }; - jQuery2.fx.speeds = { + jQuery.fx.speeds = { slow: 600, fast: 200, // Default speed _default: 400 }; - jQuery2.fn.delay = function(time, type) { - time = jQuery2.fx ? jQuery2.fx.speeds[time] || time : time; + jQuery.fn.delay = function(time, type) { + time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; type = type || "fx"; return this.queue(type, function(next, hooks) { var timeout = window2.setTimeout(next, time); @@ -4637,32 +4647,32 @@ input.type = "radio"; support.radioValue = input.value === "t"; })(); - var boolHook, attrHandle = jQuery2.expr.attrHandle; - jQuery2.fn.extend({ + var boolHook, attrHandle = jQuery.expr.attrHandle; + jQuery.fn.extend({ attr: function(name, value) { - return access(this, jQuery2.attr, name, value, arguments.length > 1); + return access(this, jQuery.attr, name, value, arguments.length > 1); }, removeAttr: function(name) { return this.each(function() { - jQuery2.removeAttr(this, name); + jQuery.removeAttr(this, name); }); } }); - jQuery2.extend({ + jQuery.extend({ attr: function(elem, name, value) { var ret, hooks, nType = elem.nodeType; if (nType === 3 || nType === 8 || nType === 2) { return; } if (typeof elem.getAttribute === "undefined") { - return jQuery2.prop(elem, name, value); + return jQuery.prop(elem, name, value); } - if (nType !== 1 || !jQuery2.isXMLDoc(elem)) { - hooks = jQuery2.attrHooks[name.toLowerCase()] || (jQuery2.expr.match.bool.test(name) ? boolHook : void 0); + if (nType !== 1 || !jQuery.isXMLDoc(elem)) { + hooks = jQuery.attrHooks[name.toLowerCase()] || (jQuery.expr.match.bool.test(name) ? boolHook : void 0); } if (value !== void 0) { if (value === null) { - jQuery2.removeAttr(elem, name); + jQuery.removeAttr(elem, name); return; } if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) { @@ -4674,7 +4684,7 @@ if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) { return ret; } - ret = jQuery2.find.attr(elem, name); + ret = jQuery.find.attr(elem, name); return ret == null ? void 0 : ret; }, attrHooks: { @@ -4703,15 +4713,15 @@ boolHook = { set: function(elem, value, name) { if (value === false) { - jQuery2.removeAttr(elem, name); + jQuery.removeAttr(elem, name); } else { elem.setAttribute(name, name); } return name; } }; - jQuery2.each(jQuery2.expr.match.bool.source.match(/\w+/g), function(_i, name) { - var getter = attrHandle[name] || jQuery2.find.attr; + jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function(_i, name) { + var getter = attrHandle[name] || jQuery.find.attr; attrHandle[name] = function(elem, name2, isXML) { var ret, handle, lowercaseName = name2.toLowerCase(); if (!isXML) { @@ -4724,25 +4734,25 @@ }; }); var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i; - jQuery2.fn.extend({ + jQuery.fn.extend({ prop: function(name, value) { - return access(this, jQuery2.prop, name, value, arguments.length > 1); + return access(this, jQuery.prop, name, value, arguments.length > 1); }, removeProp: function(name) { return this.each(function() { - delete this[jQuery2.propFix[name] || name]; + delete this[jQuery.propFix[name] || name]; }); } }); - jQuery2.extend({ + jQuery.extend({ prop: function(elem, name, value) { var ret, hooks, nType = elem.nodeType; if (nType === 3 || nType === 8 || nType === 2) { return; } - if (nType !== 1 || !jQuery2.isXMLDoc(elem)) { - name = jQuery2.propFix[name] || name; - hooks = jQuery2.propHooks[name]; + if (nType !== 1 || !jQuery.isXMLDoc(elem)) { + name = jQuery.propFix[name] || name; + hooks = jQuery.propHooks[name]; } if (value !== void 0) { if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) { @@ -4758,7 +4768,7 @@ propHooks: { tabIndex: { get: function(elem) { - var tabindex = jQuery2.find.attr(elem, "tabindex"); + var tabindex = jQuery.find.attr(elem, "tabindex"); if (tabindex) { return parseInt(tabindex, 10); } @@ -4775,7 +4785,7 @@ } }); if (!support.optSelected) { - jQuery2.propHooks.selected = { + jQuery.propHooks.selected = { get: function(elem) { var parent = elem.parentNode; if (parent && parent.parentNode) { @@ -4794,7 +4804,7 @@ } }; } - jQuery2.each([ + jQuery.each([ "tabIndex", "readOnly", "maxLength", @@ -4806,7 +4816,7 @@ "frameBorder", "contentEditable" ], function() { - jQuery2.propFix[this.toLowerCase()] = this; + jQuery.propFix[this.toLowerCase()] = this; }); function stripAndCollapse(value) { var tokens = value.match(rnothtmlwhite) || []; @@ -4824,12 +4834,12 @@ } return []; } - jQuery2.fn.extend({ + jQuery.fn.extend({ addClass: function(value) { var classNames, cur, curValue, className, i, finalValue; if (isFunction(value)) { return this.each(function(j) { - jQuery2(this).addClass(value.call(this, j, getClass(this))); + jQuery(this).addClass(value.call(this, j, getClass(this))); }); } classNames = classesToArray(value); @@ -4857,7 +4867,7 @@ var classNames, cur, curValue, className, i, finalValue; if (isFunction(value)) { return this.each(function(j) { - jQuery2(this).removeClass(value.call(this, j, getClass(this))); + jQuery(this).removeClass(value.call(this, j, getClass(this))); }); } if (!arguments.length) { @@ -4888,7 +4898,7 @@ var classNames, className, i, self, type = typeof value, isValidValue = type === "string" || Array.isArray(value); if (isFunction(value)) { return this.each(function(i2) { - jQuery2(this).toggleClass( + jQuery(this).toggleClass( value.call(this, i2, getClass(this), stateVal), stateVal ); @@ -4900,7 +4910,7 @@ classNames = classesToArray(value); return this.each(function() { if (isValidValue) { - self = jQuery2(this); + self = jQuery(this); for (i = 0; i < classNames.length; i++) { className = classNames[i]; if (self.hasClass(className)) { @@ -4935,12 +4945,12 @@ } }); var rreturn = /\r/g; - jQuery2.fn.extend({ + jQuery.fn.extend({ val: function(value) { var hooks, ret, valueIsFunction, elem = this[0]; if (!arguments.length) { if (elem) { - hooks = jQuery2.valHooks[elem.type] || jQuery2.valHooks[elem.nodeName.toLowerCase()]; + hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()]; if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== void 0) { return ret; } @@ -4959,7 +4969,7 @@ return; } if (valueIsFunction) { - val = value.call(this, i, jQuery2(this).val()); + val = value.call(this, i, jQuery(this).val()); } else { val = value; } @@ -4968,28 +4978,28 @@ } else if (typeof val === "number") { val += ""; } else if (Array.isArray(val)) { - val = jQuery2.map(val, function(value2) { + val = jQuery.map(val, function(value2) { return value2 == null ? "" : value2 + ""; }); } - hooks = jQuery2.valHooks[this.type] || jQuery2.valHooks[this.nodeName.toLowerCase()]; + hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()]; if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === void 0) { this.value = val; } }); } }); - jQuery2.extend({ + jQuery.extend({ valHooks: { option: { get: function(elem) { - var val = jQuery2.find.attr(elem, "value"); + var val = jQuery.find.attr(elem, "value"); return val != null ? val : ( // Support: IE <=10 - 11 only // option.text throws exceptions (trac-14686, trac-14858) // Strip and collapse whitespace // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse(jQuery2.text(elem)) + stripAndCollapse(jQuery.text(elem)) ); } }, @@ -5005,7 +5015,7 @@ option = options[i]; if ((option.selected || i === index) && // Don't return options that are disabled or in a disabled optgroup !option.disabled && (!option.parentNode.disabled || !nodeName(option.parentNode, "optgroup"))) { - value = jQuery2(option).val(); + value = jQuery(option).val(); if (one) { return value; } @@ -5015,10 +5025,10 @@ return values; }, set: function(elem, value) { - var optionSet, option, options = elem.options, values = jQuery2.makeArray(value), i = options.length; + var optionSet, option, options = elem.options, values = jQuery.makeArray(value), i = options.length; while (i--) { option = options[i]; - if (option.selected = jQuery2.inArray(jQuery2.valHooks.option.get(option), values) > -1) { + if (option.selected = jQuery.inArray(jQuery.valHooks.option.get(option), values) > -1) { optionSet = true; } } @@ -5030,16 +5040,16 @@ } } }); - jQuery2.each(["radio", "checkbox"], function() { - jQuery2.valHooks[this] = { + jQuery.each(["radio", "checkbox"], function() { + jQuery.valHooks[this] = { set: function(elem, value) { if (Array.isArray(value)) { - return elem.checked = jQuery2.inArray(jQuery2(elem).val(), value) > -1; + return elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1; } } }; if (!support.checkOn) { - jQuery2.valHooks[this].get = function(elem) { + jQuery.valHooks[this].get = function(elem) { return elem.getAttribute("value") === null ? "on" : elem.value; }; } @@ -5047,7 +5057,7 @@ var location2 = window2.location; var nonce = { guid: Date.now() }; var rquery = /\?/; - jQuery2.parseXML = function(data) { + jQuery.parseXML = function(data) { var xml, parserErrorElem; if (!data || typeof data !== "string") { return null; @@ -5058,7 +5068,7 @@ } parserErrorElem = xml && xml.getElementsByTagName("parsererror")[0]; if (!xml || parserErrorElem) { - jQuery2.error("Invalid XML: " + (parserErrorElem ? jQuery2.map(parserErrorElem.childNodes, function(el) { + jQuery.error("Invalid XML: " + (parserErrorElem ? jQuery.map(parserErrorElem.childNodes, function(el) { return el.textContent; }).join("\n") : data)); } @@ -5067,14 +5077,14 @@ var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, stopPropagationCallback = function(e) { e.stopPropagation(); }; - jQuery2.extend(jQuery2.event, { + jQuery.extend(jQuery.event, { trigger: function(event, data, elem, onlyHandlers) { var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, eventPath = [elem || document2], type = hasOwn.call(event, "type") ? event.type : event, namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : []; cur = lastElement = tmp = elem = elem || document2; if (elem.nodeType === 3 || elem.nodeType === 8) { return; } - if (rfocusMorph.test(type + jQuery2.event.triggered)) { + if (rfocusMorph.test(type + jQuery.event.triggered)) { return; } if (type.indexOf(".") > -1) { @@ -5083,7 +5093,7 @@ namespaces.sort(); } ontype = type.indexOf(":") < 0 && "on" + type; - event = event[jQuery2.expando] ? event : new jQuery2.Event(type, typeof event === "object" && event); + event = event[jQuery.expando] ? event : new jQuery.Event(type, typeof event === "object" && event); event.isTrigger = onlyHandlers ? 2 : 3; event.namespace = namespaces.join("."); event.rnamespace = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; @@ -5091,8 +5101,8 @@ if (!event.target) { event.target = elem; } - data = data == null ? [event] : jQuery2.makeArray(data, [event]); - special = jQuery2.event.special[type] || {}; + data = data == null ? [event] : jQuery.makeArray(data, [event]); + special = jQuery.event.special[type] || {}; if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) { return; } @@ -5133,7 +5143,7 @@ if (tmp) { elem[ontype] = null; } - jQuery2.event.triggered = type; + jQuery.event.triggered = type; if (event.isPropagationStopped()) { lastElement.addEventListener(type, stopPropagationCallback); } @@ -5141,7 +5151,7 @@ if (event.isPropagationStopped()) { lastElement.removeEventListener(type, stopPropagationCallback); } - jQuery2.event.triggered = void 0; + jQuery.event.triggered = void 0; if (tmp) { elem[ontype] = tmp; } @@ -5153,27 +5163,27 @@ // Piggyback on a donor event to simulate a different one // Used only for `focus(in | out)` events simulate: function(type, elem, event) { - var e = jQuery2.extend( - new jQuery2.Event(), + var e = jQuery.extend( + new jQuery.Event(), event, { type, isSimulated: true } ); - jQuery2.event.trigger(e, null, elem); + jQuery.event.trigger(e, null, elem); } }); - jQuery2.fn.extend({ + jQuery.fn.extend({ trigger: function(type, data) { return this.each(function() { - jQuery2.event.trigger(type, data, this); + jQuery.event.trigger(type, data, this); }); }, triggerHandler: function(type, data) { var elem = this[0]; if (elem) { - return jQuery2.event.trigger(type, data, elem, true); + return jQuery.event.trigger(type, data, elem, true); } } }); @@ -5181,7 +5191,7 @@ function buildParams(prefix, obj, traditional, add2) { var name; if (Array.isArray(obj)) { - jQuery2.each(obj, function(i, v) { + jQuery.each(obj, function(i, v) { if (traditional || rbracket.test(prefix)) { add2(prefix, v); } else { @@ -5201,7 +5211,7 @@ add2(prefix, obj); } } - jQuery2.param = function(a, traditional) { + jQuery.param = function(a, traditional) { var prefix, s = [], add2 = function(key, valueOrFunction) { var value = isFunction(valueOrFunction) ? valueOrFunction() : valueOrFunction; s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value == null ? "" : value); @@ -5209,8 +5219,8 @@ if (a == null) { return ""; } - if (Array.isArray(a) || a.jquery && !jQuery2.isPlainObject(a)) { - jQuery2.each(a, function() { + if (Array.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) { + jQuery.each(a, function() { add2(this.name, this.value); }); } else { @@ -5220,24 +5230,24 @@ } return s.join("&"); }; - jQuery2.fn.extend({ + jQuery.fn.extend({ serialize: function() { - return jQuery2.param(this.serializeArray()); + return jQuery.param(this.serializeArray()); }, serializeArray: function() { return this.map(function() { - var elements = jQuery2.prop(this, "elements"); - return elements ? jQuery2.makeArray(elements) : this; + var elements = jQuery.prop(this, "elements"); + return elements ? jQuery.makeArray(elements) : this; }).filter(function() { var type = this.type; - return this.name && !jQuery2(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type)); + return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type)); }).map(function(_i, elem) { - var val = jQuery2(this).val(); + var val = jQuery(this).val(); if (val == null) { return null; } if (Array.isArray(val)) { - return jQuery2.map(val, function(val2) { + return jQuery.map(val, function(val2) { return { name: elem.name, value: val2.replace(rCRLF, "\r\n") }; }); } @@ -5271,7 +5281,7 @@ function inspect(dataType) { var selected; inspected[dataType] = true; - jQuery2.each(structure[dataType] || [], function(_, prefilterOrFactory) { + jQuery.each(structure[dataType] || [], function(_, prefilterOrFactory) { var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR); if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) { options.dataTypes.unshift(dataTypeOrTransport); @@ -5286,14 +5296,14 @@ return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*"); } function ajaxExtend(target, src) { - var key, deep, flatOptions = jQuery2.ajaxSettings.flatOptions || {}; + var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for (key in src) { if (src[key] !== void 0) { (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key]; } } if (deep) { - jQuery2.extend(true, target, deep); + jQuery.extend(true, target, deep); } return target; } @@ -5392,7 +5402,7 @@ } return { state: "success", data: response }; } - jQuery2.extend({ + jQuery.extend({ // Counter for holding the number of active queries active: 0, // Last-Modified header cache for next request @@ -5444,7 +5454,7 @@ // Evaluate text as a json expression "text json": JSON.parse, // Parse text as xml - "text xml": jQuery2.parseXML + "text xml": jQuery.parseXML }, // For options that shouldn't be deep extended: // you can add your own custom options here if @@ -5461,10 +5471,10 @@ ajaxSetup: function(target, settings) { return settings ? ( // Building a settings object - ajaxExtend(ajaxExtend(target, jQuery2.ajaxSettings), settings) + ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) ) : ( // Extending ajaxSettings - ajaxExtend(jQuery2.ajaxSettings, target) + ajaxExtend(jQuery.ajaxSettings, target) ); }, ajaxPrefilter: addToPrefiltersOrTransports(prefilters), @@ -5476,7 +5486,7 @@ url = void 0; } options = options || {}; - var transport, cacheURL, responseHeadersString, responseHeaders, timeoutTimer, urlAnchor, completed2, fireGlobals, i, uncached, s = jQuery2.ajaxSetup({}, options), callbackContext = s.context || s, globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery2(callbackContext) : jQuery2.event, deferred = jQuery2.Deferred(), completeDeferred = jQuery2.Callbacks("once memory"), statusCode = s.statusCode || {}, requestHeaders = {}, requestHeadersNames = {}, strAbort = "canceled", jqXHR = { + var transport, cacheURL, responseHeadersString, responseHeaders, timeoutTimer, urlAnchor, completed2, fireGlobals, i, uncached, s = jQuery.ajaxSetup({}, options), callbackContext = s.context || s, globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event, deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks("once memory"), statusCode = s.statusCode || {}, requestHeaders = {}, requestHeadersNames = {}, strAbort = "canceled", jqXHR = { readyState: 0, // Builds headers hashtable if needed getResponseHeader: function(key) { @@ -5550,15 +5560,15 @@ } } if (s.data && s.processData && typeof s.data !== "string") { - s.data = jQuery2.param(s.data, s.traditional); + s.data = jQuery.param(s.data, s.traditional); } inspectPrefiltersOrTransports(prefilters, s, options, jqXHR); if (completed2) { return jqXHR; } - fireGlobals = jQuery2.event && s.global; - if (fireGlobals && jQuery2.active++ === 0) { - jQuery2.event.trigger("ajaxStart"); + fireGlobals = jQuery.event && s.global; + if (fireGlobals && jQuery.active++ === 0) { + jQuery.event.trigger("ajaxStart"); } s.type = s.type.toUpperCase(); s.hasContent = !rnoContent.test(s.type); @@ -5578,11 +5588,11 @@ s.data = s.data.replace(r20, "+"); } if (s.ifModified) { - if (jQuery2.lastModified[cacheURL]) { - jqXHR.setRequestHeader("If-Modified-Since", jQuery2.lastModified[cacheURL]); + if (jQuery.lastModified[cacheURL]) { + jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]); } - if (jQuery2.etag[cacheURL]) { - jqXHR.setRequestHeader("If-None-Match", jQuery2.etag[cacheURL]); + if (jQuery.etag[cacheURL]) { + jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]); } } if (s.data && s.hasContent && s.contentType !== false || options.contentType) { @@ -5644,7 +5654,7 @@ if (responses) { response = ajaxHandleResponses(s, jqXHR, responses); } - if (!isSuccess && jQuery2.inArray("script", s.dataTypes) > -1 && jQuery2.inArray("json", s.dataTypes) < 0) { + if (!isSuccess && jQuery.inArray("script", s.dataTypes) > -1 && jQuery.inArray("json", s.dataTypes) < 0) { s.converters["text script"] = function() { }; } @@ -5653,11 +5663,11 @@ if (s.ifModified) { modified = jqXHR.getResponseHeader("Last-Modified"); if (modified) { - jQuery2.lastModified[cacheURL] = modified; + jQuery.lastModified[cacheURL] = modified; } modified = jqXHR.getResponseHeader("etag"); if (modified) { - jQuery2.etag[cacheURL] = modified; + jQuery.etag[cacheURL] = modified; } } if (status === 204 || s.type === "HEAD") { @@ -5697,37 +5707,37 @@ completeDeferred.fireWith(callbackContext, [jqXHR, statusText]); if (fireGlobals) { globalEventContext.trigger("ajaxComplete", [jqXHR, s]); - if (!--jQuery2.active) { - jQuery2.event.trigger("ajaxStop"); + if (!--jQuery.active) { + jQuery.event.trigger("ajaxStop"); } } } return jqXHR; }, getJSON: function(url, data, callback) { - return jQuery2.get(url, data, callback, "json"); + return jQuery.get(url, data, callback, "json"); }, getScript: function(url, callback) { - return jQuery2.get(url, void 0, callback, "script"); + return jQuery.get(url, void 0, callback, "script"); } }); - jQuery2.each(["get", "post"], function(_i, method) { - jQuery2[method] = function(url, data, callback, type) { + jQuery.each(["get", "post"], function(_i, method) { + jQuery[method] = function(url, data, callback, type) { if (isFunction(data)) { type = type || callback; callback = data; data = void 0; } - return jQuery2.ajax(jQuery2.extend({ + return jQuery.ajax(jQuery.extend({ url, type: method, dataType: type, data, success: callback - }, jQuery2.isPlainObject(url) && url)); + }, jQuery.isPlainObject(url) && url)); }; }); - jQuery2.ajaxPrefilter(function(s) { + jQuery.ajaxPrefilter(function(s) { var i; for (i in s.headers) { if (i.toLowerCase() === "content-type") { @@ -5735,8 +5745,8 @@ } } }); - jQuery2._evalUrl = function(url, options, doc) { - return jQuery2.ajax({ + jQuery._evalUrl = function(url, options, doc) { + return jQuery.ajax({ url, // Make this explicit, since user can override this through ajaxSetup (trac-11264) type: "GET", @@ -5752,18 +5762,18 @@ } }, dataFilter: function(response) { - jQuery2.globalEval(response, options, doc); + jQuery.globalEval(response, options, doc); } }); }; - jQuery2.fn.extend({ + jQuery.fn.extend({ wrapAll: function(html) { var wrap; if (this[0]) { if (isFunction(html)) { html = html.call(this[0]); } - wrap = jQuery2(html, this[0].ownerDocument).eq(0).clone(true); + wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true); if (this[0].parentNode) { wrap.insertBefore(this[0]); } @@ -5780,11 +5790,11 @@ wrapInner: function(html) { if (isFunction(html)) { return this.each(function(i) { - jQuery2(this).wrapInner(html.call(this, i)); + jQuery(this).wrapInner(html.call(this, i)); }); } return this.each(function() { - var self = jQuery2(this), contents = self.contents(); + var self = jQuery(this), contents = self.contents(); if (contents.length) { contents.wrapAll(html); } else { @@ -5795,23 +5805,23 @@ wrap: function(html) { var htmlIsFunction = isFunction(html); return this.each(function(i) { - jQuery2(this).wrapAll(htmlIsFunction ? html.call(this, i) : html); + jQuery(this).wrapAll(htmlIsFunction ? html.call(this, i) : html); }); }, unwrap: function(selector) { this.parent(selector).not("body").each(function() { - jQuery2(this).replaceWith(this.childNodes); + jQuery(this).replaceWith(this.childNodes); }); return this; } }); - jQuery2.expr.pseudos.hidden = function(elem) { - return !jQuery2.expr.pseudos.visible(elem); + jQuery.expr.pseudos.hidden = function(elem) { + return !jQuery.expr.pseudos.visible(elem); }; - jQuery2.expr.pseudos.visible = function(elem) { + jQuery.expr.pseudos.visible = function(elem) { return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length); }; - jQuery2.ajaxSettings.xhr = function() { + jQuery.ajaxSettings.xhr = function() { try { return new window2.XMLHttpRequest(); } catch (e) { @@ -5823,10 +5833,10 @@ // Support: IE <=9 only // trac-1450: sometimes IE returns 1223 when it should be 204 1223: 204 - }, xhrSupported = jQuery2.ajaxSettings.xhr(); + }, xhrSupported = jQuery.ajaxSettings.xhr(); support.cors = !!xhrSupported && "withCredentials" in xhrSupported; support.ajax = xhrSupported = !!xhrSupported; - jQuery2.ajaxTransport(function(options) { + jQuery.ajaxTransport(function(options) { var callback, errorCallback; if (support.cors || xhrSupported && !options.crossDomain) { return { @@ -5915,12 +5925,12 @@ }; } }); - jQuery2.ajaxPrefilter(function(s) { + jQuery.ajaxPrefilter(function(s) { if (s.crossDomain) { s.contents.script = false; } }); - jQuery2.ajaxSetup({ + jQuery.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, @@ -5929,12 +5939,12 @@ }, converters: { "text script": function(text) { - jQuery2.globalEval(text); + jQuery.globalEval(text); return text; } } }); - jQuery2.ajaxPrefilter("script", function(s) { + jQuery.ajaxPrefilter("script", function(s) { if (s.cache === void 0) { s.cache = false; } @@ -5942,12 +5952,12 @@ s.type = "GET"; } }); - jQuery2.ajaxTransport("script", function(s) { + jQuery.ajaxTransport("script", function(s) { if (s.crossDomain || s.scriptAttrs) { var script, callback; return { send: function(_, complete) { - script = jQuery2("