Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !function(element, proceed) {
- if ("object" == typeof module && "object" == typeof module.exports) {
- module.exports = element.document ? proceed(element, true) : function(element) {
- if (!element.document) {
- throw new Error("jQuery requires a window with a document");
- }
- return proceed(element);
- };
- } else {
- proceed(element);
- }
- }("undefined" != typeof window ? window : this, function(win, dataAndEvents) {
- /**
- * @param {string} data
- * @param {Object} context
- * @return {undefined}
- */
- function load(data, context) {
- context = context || doc;
- var script = context.createElement("script");
- /** @type {string} */
- script.text = data;
- context.head.appendChild(script).parentNode.removeChild(script);
- }
- /**
- * @param {Object} obj
- * @return {?}
- */
- function isArraylike(obj) {
- var length = !!obj && ("length" in obj && obj.length);
- var type = jQuery.type(obj);
- return "function" !== type && (!jQuery.isWindow(obj) && ("array" === type || (0 === length || "number" == typeof length && (length > 0 && length - 1 in obj))));
- }
- /**
- * @param {string} elements
- * @param {Object} qualifier
- * @param {boolean} not
- * @return {?}
- */
- function winnow(elements, qualifier, not) {
- return jQuery.isFunction(qualifier) ? jQuery.grep(elements, function(elem, i) {
- return!!qualifier.call(elem, i, elem) !== not;
- }) : qualifier.nodeType ? jQuery.grep(elements, function(elem) {
- return elem === qualifier !== not;
- }) : "string" != typeof qualifier ? jQuery.grep(elements, function(elem) {
- return core_indexOf.call(qualifier, elem) > -1 !== not;
- }) : isSimple.test(qualifier) ? jQuery.filter(qualifier, elements, not) : (qualifier = jQuery.filter(qualifier, elements), jQuery.grep(elements, function(elem) {
- return core_indexOf.call(qualifier, elem) > -1 !== not && 1 === elem.nodeType;
- }));
- }
- /**
- * @param {Object} cur
- * @param {string} dir
- * @return {?}
- */
- function _singleSibling(cur, dir) {
- for (;(cur = cur[dir]) && 1 !== cur.nodeType;) {
- }
- return cur;
- }
- /**
- * @param {string} options
- * @return {?}
- */
- function createOptions(options) {
- var buf = {};
- return jQuery.each(options.match(core_rnotwhite) || [], function(dataAndEvents, off) {
- /** @type {boolean} */
- buf[off] = true;
- }), buf;
- }
- /**
- * @param {?} key
- * @return {?}
- */
- function index(key) {
- return key;
- }
- /**
- * @param {?} obj
- * @return {?}
- */
- function i(obj) {
- throw obj;
- }
- /**
- * @param {?} value
- * @param {Function} callback
- * @param {Function} handler
- * @return {undefined}
- */
- function require(value, callback, handler) {
- var element;
- try {
- if (value && jQuery.isFunction(element = value.promise)) {
- element.call(value).done(callback).fail(handler);
- } else {
- if (value && jQuery.isFunction(element = value.then)) {
- element.call(value, callback, handler);
- } else {
- callback.call(void 0, value);
- }
- }
- } catch (prevTag) {
- handler.call(void 0, prevTag);
- }
- }
- /**
- * @return {undefined}
- */
- function completed() {
- doc.removeEventListener("DOMContentLoaded", completed);
- win.removeEventListener("load", completed);
- jQuery.ready();
- }
- /**
- * @return {undefined}
- */
- function Data() {
- this.expando = jQuery.expando + Data.uid++;
- }
- /**
- * @param {?} data
- * @return {?}
- */
- function render(data) {
- return "true" === data || "false" !== data && ("null" === data ? null : data === +data + "" ? +data : rbrace.test(data) ? JSON.parse(data) : data);
- }
- /**
- * @param {Object} elem
- * @param {string} udataCur
- * @param {Object} data
- * @return {?}
- */
- function dataAttr(elem, udataCur, data) {
- var pattern;
- if (void 0 === data && 1 === elem.nodeType) {
- if (pattern = "data-" + udataCur.replace(r20, "-$&").toLowerCase(), data = elem.getAttribute(pattern), "string" == typeof data) {
- try {
- data = render(data);
- } catch (e) {
- }
- data_user.set(elem, udataCur, data);
- } else {
- data = void 0;
- }
- }
- return data;
- }
- /**
- * @param {Object} elem
- * @param {string} prop
- * @param {Object} parts
- * @param {Object} t
- * @return {?}
- */
- function get(elem, prop, parts, t) {
- var end;
- /** @type {number} */
- var scale = 1;
- /** @type {number} */
- var g = 20;
- /** @type {function (): ?} */
- var swap = t ? function() {
- return t.cur();
- } : function() {
- return jQuery.css(elem, prop, "");
- };
- var target = swap();
- var unit = parts && parts[3] || (jQuery.cssNumber[prop] ? "" : "px");
- var start = (jQuery.cssNumber[prop] || "px" !== unit && +target) && regexp.exec(jQuery.css(elem, prop));
- if (start && start[3] !== unit) {
- unit = unit || start[3];
- parts = parts || [];
- /** @type {number} */
- start = +target || 1;
- do {
- /** @type {(number|string)} */
- scale = scale || ".5";
- start /= scale;
- jQuery.style(elem, prop, start + unit);
- } while (scale !== (scale = swap() / target) && (1 !== scale && --g));
- }
- return parts && (start = +start || (+target || 0), end = parts[1] ? start + (parts[1] + 1) * parts[2] : +parts[2], t && (t.unit = unit, t.start = start, t.end = end)), end;
- }
- /**
- * @param {Node} element
- * @return {?}
- */
- function callback(element) {
- var elem;
- var doc = element.ownerDocument;
- var tag = element.nodeName;
- var display = _elm_display[tag];
- return display ? display : (elem = doc.body.appendChild(doc.createElement(tag)), display = jQuery.css(elem, "display"), elem.parentNode.removeChild(elem), "none" === display && (display = "block"), _elm_display[tag] = display, display);
- }
- /**
- * @param {Array} elements
- * @param {boolean} dataAndEvents
- * @return {?}
- */
- function showHide(elements, dataAndEvents) {
- var data;
- var cur;
- /** @type {Array} */
- var display = [];
- /** @type {number} */
- var i = 0;
- var valuesLen = elements.length;
- for (;i < valuesLen;i++) {
- cur = elements[i];
- if (cur.style) {
- data = cur.style.display;
- if (dataAndEvents) {
- if ("none" === data) {
- display[i] = data_priv.get(cur, "display") || null;
- if (!display[i]) {
- /** @type {string} */
- cur.style.display = "";
- }
- }
- if ("" === cur.style.display) {
- if (isHidden(cur)) {
- display[i] = callback(cur);
- }
- }
- } else {
- if ("none" !== data) {
- /** @type {string} */
- display[i] = "none";
- data_priv.set(cur, "display", data);
- }
- }
- }
- }
- /** @type {number} */
- i = 0;
- for (;i < valuesLen;i++) {
- if (null != display[i]) {
- elements[i].style.display = display[i];
- }
- }
- return elements;
- }
- /**
- * @param {Node} context
- * @param {string} tag
- * @return {?}
- */
- function getAll(context, tag) {
- var ret;
- return ret = "undefined" != typeof context.getElementsByTagName ? context.getElementsByTagName(tag || "*") : "undefined" != typeof context.querySelectorAll ? context.querySelectorAll(tag || "*") : [], void 0 === tag || tag && jQuery.nodeName(context, tag) ? jQuery.merge([context], ret) : ret;
- }
- /**
- * @param {(Array|NodeList)} elems
- * @param {Array} refElements
- * @return {undefined}
- */
- function setGlobalEval(elems, refElements) {
- /** @type {number} */
- var i = 0;
- var length = elems.length;
- for (;i < length;i++) {
- data_priv.set(elems[i], "globalEval", !refElements || data_priv.get(refElements[i], "globalEval"));
- }
- }
- /**
- * @param {Array} elems
- * @param {Document} context
- * @param {boolean} scripts
- * @param {Object} values
- * @param {boolean} str
- * @return {?}
- */
- function parse(elems, context, scripts, values, str) {
- var elem;
- var tmp;
- var tag;
- var wrap;
- var contains;
- var j;
- var fragment = context.createDocumentFragment();
- /** @type {Array} */
- var nodes = [];
- /** @type {number} */
- var i = 0;
- var length = elems.length;
- for (;i < length;i++) {
- if (elem = elems[i], elem || 0 === elem) {
- if ("object" === jQuery.type(elem)) {
- jQuery.merge(nodes, elem.nodeType ? [elem] : elem);
- } else {
- if (rhtml.test(elem)) {
- tmp = tmp || fragment.appendChild(context.createElement("div"));
- tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();
- wrap = wrapMap[tag] || wrapMap._default;
- tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2];
- j = wrap[0];
- for (;j--;) {
- tmp = tmp.lastChild;
- }
- jQuery.merge(nodes, tmp.childNodes);
- tmp = fragment.firstChild;
- /** @type {string} */
- tmp.textContent = "";
- } else {
- nodes.push(context.createTextNode(elem));
- }
- }
- }
- }
- /** @type {string} */
- fragment.textContent = "";
- /** @type {number} */
- i = 0;
- for (;elem = nodes[i++];) {
- if (values && jQuery.inArray(elem, values) > -1) {
- if (str) {
- str.push(elem);
- }
- } else {
- if (contains = jQuery.contains(elem.ownerDocument, elem), tmp = getAll(fragment.appendChild(elem), "script"), contains && setGlobalEval(tmp), scripts) {
- /** @type {number} */
- j = 0;
- for (;elem = tmp[j++];) {
- if (rchecked.test(elem.type || "")) {
- scripts.push(elem);
- }
- }
- }
- }
- }
- return fragment;
- }
- /**
- * @return {?}
- */
- function returnTrue() {
- return true;
- }
- /**
- * @return {?}
- */
- function returnFalse() {
- return false;
- }
- /**
- * @return {?}
- */
- function safeActiveElement() {
- try {
- return doc.activeElement;
- } catch (a) {
- }
- }
- /**
- * @param {Object} object
- * @param {Object} types
- * @param {Object} selector
- * @param {Object} data
- * @param {Function} fn
- * @param {(number|string)} deepDataAndEvents
- * @return {?}
- */
- function on(object, types, selector, data, fn, deepDataAndEvents) {
- var origFn;
- var type;
- if ("object" == typeof types) {
- if ("string" != typeof selector) {
- data = data || selector;
- selector = void 0;
- }
- for (type in types) {
- on(object, type, selector, data, types[type], deepDataAndEvents);
- }
- return object;
- }
- if (null == data && null == fn ? (fn = selector, data = selector = void 0) : null == fn && ("string" == typeof selector ? (fn = data, data = void 0) : (fn = data, data = selector, selector = void 0)), fn === false) {
- /** @type {function (): ?} */
- fn = returnFalse;
- } else {
- if (!fn) {
- return object;
- }
- }
- return 1 === deepDataAndEvents && (origFn = fn, fn = function(event) {
- return jQuery().off(event), origFn.apply(this, arguments);
- }, fn.guid = origFn.guid || (origFn.guid = jQuery.guid++)), object.each(function() {
- jQuery.event.add(this, types, fn, data, selector);
- });
- }
- /**
- * @param {Node} elem
- * @param {Element} content
- * @return {?}
- */
- function manipulationTarget(elem, content) {
- return jQuery.nodeName(elem, "table") && jQuery.nodeName(11 !== content.nodeType ? content : content.firstChild, "tr") ? elem.getElementsByTagName("tbody")[0] || elem : elem;
- }
- /**
- * @param {Element} elem
- * @return {?}
- */
- function restoreScript(elem) {
- return elem.type = (null !== elem.getAttribute("type")) + "/" + elem.type, elem;
- }
- /**
- * @param {Element} s
- * @return {?}
- */
- function fn(s) {
- /** @type {(Array.<string>|null)} */
- var l = re.exec(s.type);
- return l ? s.type = l[1] : s.removeAttribute("type"), s;
- }
- /**
- * @param {Object} src
- * @param {Object} dest
- * @return {undefined}
- */
- function cloneCopyEvent(src, dest) {
- var i;
- var valsLength;
- var type;
- var pdataOld;
- var pdataCur;
- var udataOld;
- var udataCur;
- var events;
- if (1 === dest.nodeType) {
- if (data_priv.hasData(src) && (pdataOld = data_priv.access(src), pdataCur = data_priv.set(dest, pdataOld), events = pdataOld.events)) {
- delete pdataCur.handle;
- pdataCur.events = {};
- for (type in events) {
- /** @type {number} */
- i = 0;
- valsLength = events[type].length;
- for (;i < valsLength;i++) {
- jQuery.event.add(dest, type, events[type][i]);
- }
- }
- }
- if (data_user.hasData(src)) {
- udataOld = data_user.access(src);
- udataCur = jQuery.extend({}, udataOld);
- data_user.set(dest, udataCur);
- }
- }
- }
- /**
- * @param {Element} src
- * @param {Element} dest
- * @return {undefined}
- */
- function fixInput(src, dest) {
- var _undefined = dest.nodeName.toLowerCase();
- if ("input" === _undefined && manipulation_rcheckableType.test(src.type)) {
- dest.checked = src.checked;
- } else {
- if (!("input" !== _undefined && "textarea" !== _undefined)) {
- dest.defaultValue = src.defaultValue;
- }
- }
- }
- /**
- * @param {Array} obj
- * @param {Object} args
- * @param {Function} callback
- * @param {Element} atts
- * @return {?}
- */
- function update(obj, args, callback, atts) {
- /** @type {Array} */
- args = core_concat.apply([], args);
- var fragment;
- var first;
- var scripts;
- var hasScripts;
- var node;
- var doc;
- /** @type {number} */
- var i = 0;
- var l = obj.length;
- /** @type {number} */
- var iNoClone = l - 1;
- var html = args[0];
- var isFunction = jQuery.isFunction(html);
- if (isFunction || l > 1 && ("string" == typeof html && (!support.checkClone && exclude.test(html)))) {
- return obj.each(function(index) {
- var data = obj.eq(index);
- if (isFunction) {
- args[0] = html.call(this, index, data.html());
- }
- update(data, args, callback, atts);
- });
- }
- if (l && (fragment = parse(args, obj[0].ownerDocument, false, obj, atts), first = fragment.firstChild, 1 === fragment.childNodes.length && (fragment = first), first || atts)) {
- scripts = jQuery.map(getAll(fragment, "script"), restoreScript);
- hasScripts = scripts.length;
- for (;i < l;i++) {
- node = fragment;
- if (i !== iNoClone) {
- node = jQuery.clone(node, true, true);
- if (hasScripts) {
- jQuery.merge(scripts, getAll(node, "script"));
- }
- }
- callback.call(obj[i], node, i);
- }
- if (hasScripts) {
- doc = scripts[scripts.length - 1].ownerDocument;
- jQuery.map(scripts, fn);
- /** @type {number} */
- i = 0;
- for (;i < hasScripts;i++) {
- node = scripts[i];
- if (rchecked.test(node.type || "")) {
- if (!data_priv.access(node, "globalEval")) {
- if (jQuery.contains(doc, node)) {
- if (node.src) {
- if (jQuery._evalUrl) {
- jQuery._evalUrl(node.src);
- }
- } else {
- load(node.textContent.replace(normalizr, ""), doc);
- }
- }
- }
- }
- }
- }
- }
- return obj;
- }
- /**
- * @param {string} elements
- * @param {?} selector
- * @param {boolean} keepData
- * @return {?}
- */
- function remove(elements, selector, keepData) {
- var elem;
- var elems = selector ? jQuery.filter(selector, elements) : elements;
- /** @type {number} */
- var i = 0;
- for (;null != (elem = elems[i]);i++) {
- if (!keepData) {
- if (!(1 !== elem.nodeType)) {
- jQuery.cleanData(getAll(elem));
- }
- }
- if (elem.parentNode) {
- if (keepData) {
- if (jQuery.contains(elem.ownerDocument, elem)) {
- setGlobalEval(getAll(elem, "script"));
- }
- }
- elem.parentNode.removeChild(elem);
- }
- }
- return elements;
- }
- /**
- * @param {Object} node
- * @param {string} prop
- * @param {Object} styles
- * @return {?}
- */
- function css(node, prop, styles) {
- var width;
- var minWidth;
- var maxWidth;
- var val;
- var style = node.style;
- return styles = styles || getStyles(node), styles && (val = styles.getPropertyValue(prop) || styles[prop], "" !== val || (jQuery.contains(node.ownerDocument, node) || (val = jQuery.style(node, prop))), !support.pixelMarginRight() && (rnumnonpx.test(val) && (rbracket.test(prop) && (width = style.width, minWidth = style.minWidth, maxWidth = style.maxWidth, style.minWidth = style.maxWidth = style.width = val, val = styles.width, style.width = width, style.minWidth = minWidth, style.maxWidth = maxWidth)))),
- void 0 !== val ? val + "" : val;
- }
- /**
- * @param {?} $timeout
- * @param {Function} hookFn
- * @return {?}
- */
- function addGetHookIf($timeout, hookFn) {
- return{
- /**
- * @return {?}
- */
- get : function() {
- return $timeout() ? void delete this.get : (this.get = hookFn).apply(this, arguments);
- }
- };
- }
- /**
- * @param {string} str
- * @return {?}
- */
- function camelCase(str) {
- if (str in table) {
- return str;
- }
- var capitalized = str[0].toUpperCase() + str.slice(1);
- /** @type {number} */
- var length = VENDOR_PREFIXES.length;
- for (;length--;) {
- if (str = VENDOR_PREFIXES[length] + capitalized, str in table) {
- return str;
- }
- }
- }
- /**
- * @param {Object} elem
- * @param {string} value
- * @param {string} actual
- * @return {?}
- */
- function set(elem, value, actual) {
- /** @type {(Array.<string>|null)} */
- var iterator = regexp.exec(value);
- return iterator ? Math.max(0, iterator[2] - (actual || 0)) + (iterator[3] || "px") : value;
- }
- /**
- * @param {Object} elem
- * @param {string} keepData
- * @param {string} extra
- * @param {boolean} isBorderBox
- * @param {?} styles
- * @return {?}
- */
- function augmentWidthOrHeight(elem, keepData, extra, isBorderBox, styles) {
- var i;
- /** @type {number} */
- var val = 0;
- /** @type {number} */
- i = extra === (isBorderBox ? "border" : "content") ? 4 : "width" === keepData ? 1 : 0;
- for (;i < 4;i += 2) {
- if ("margin" === extra) {
- val += jQuery.css(elem, extra + cssExpand[i], true, styles);
- }
- if (isBorderBox) {
- if ("content" === extra) {
- val -= jQuery.css(elem, "padding" + cssExpand[i], true, styles);
- }
- if ("margin" !== extra) {
- val -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
- }
- } else {
- val += jQuery.css(elem, "padding" + cssExpand[i], true, styles);
- if ("padding" !== extra) {
- val += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
- }
- }
- }
- return val;
- }
- /**
- * @param {Object} elem
- * @param {string} name
- * @param {string} extra
- * @return {?}
- */
- function getWidthOrHeight(elem, name, extra) {
- var val;
- /** @type {boolean} */
- var valueIsBorderBox = true;
- var styles = getStyles(elem);
- /** @type {boolean} */
- var isBorderBox = "border-box" === jQuery.css(elem, "boxSizing", false, styles);
- if (elem.getClientRects().length && (val = elem.getBoundingClientRect()[name]), val <= 0 || null == val) {
- if (val = css(elem, name, styles), (val < 0 || null == val) && (val = elem.style[name]), rnumnonpx.test(val)) {
- return val;
- }
- valueIsBorderBox = isBorderBox && (support.boxSizingReliable() || val === elem.style[name]);
- /** @type {number} */
- val = parseFloat(val) || 0;
- }
- return val + augmentWidthOrHeight(elem, name, extra || (isBorderBox ? "border" : "content"), valueIsBorderBox, styles) + "px";
- }
- /**
- * @param {Object} selector
- * @param {Function} context
- * @param {boolean} prop
- * @param {Object} end
- * @param {number} easing
- * @return {?}
- */
- function Tween(selector, context, prop, end, easing) {
- return new Tween.prototype.init(selector, context, prop, end, easing);
- }
- /**
- * @return {undefined}
- */
- function raf() {
- if (id) {
- win.requestAnimationFrame(raf);
- jQuery.fx.tick();
- }
- }
- /**
- * @return {?}
- */
- function createFxNow() {
- return win.setTimeout(function() {
- fxNow = void 0;
- }), fxNow = jQuery.now();
- }
- /**
- * @param {string} type
- * @param {boolean} includeWidth
- * @return {?}
- */
- function genFx(type, includeWidth) {
- var which;
- /** @type {number} */
- var i = 0;
- var attrs = {
- height : type
- };
- /** @type {number} */
- includeWidth = includeWidth ? 1 : 0;
- for (;i < 4;i += 2 - includeWidth) {
- which = cssExpand[i];
- attrs["margin" + which] = attrs["padding" + which] = type;
- }
- return includeWidth && (attrs.opacity = attrs.width = type), attrs;
- }
- /**
- * @param {?} value
- * @param {string} prop
- * @param {?} animation
- * @return {?}
- */
- function createTween(value, prop, animation) {
- var tween;
- var codeSegments = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]);
- /** @type {number} */
- var i = 0;
- var valuesLen = codeSegments.length;
- for (;i < valuesLen;i++) {
- if (tween = codeSegments[i].call(animation, prop, value)) {
- return tween;
- }
- }
- }
- /**
- * @param {Object} elem
- * @param {Object} props
- * @param {Object} opts
- * @return {undefined}
- */
- function defaultPrefilter(elem, props, opts) {
- var prop;
- var value;
- var thisp;
- var hooks;
- var oldfire;
- var tween;
- var val;
- var type;
- /** @type {boolean} */
- var l = "width" in props || "height" in props;
- var anim = this;
- var orig = {};
- var style = elem.style;
- var hidden = elem.nodeType && isHidden(elem);
- var dataShow = data_priv.get(elem, "fxshow");
- if (!opts.queue) {
- hooks = jQuery._queueHooks(elem, "fx");
- if (null == hooks.unqueued) {
- /** @type {number} */
- hooks.unqueued = 0;
- /** @type {function (): undefined} */
- oldfire = hooks.empty.fire;
- /**
- * @return {undefined}
- */
- hooks.empty.fire = function() {
- if (!hooks.unqueued) {
- oldfire();
- }
- };
- }
- hooks.unqueued++;
- anim.always(function() {
- anim.always(function() {
- hooks.unqueued--;
- if (!jQuery.queue(elem, "fx").length) {
- hooks.empty.fire();
- }
- });
- });
- }
- for (prop in props) {
- if (value = props[prop], spaceRe.test(value)) {
- if (delete props[prop], thisp = thisp || "toggle" === value, value === (hidden ? "hide" : "show")) {
- if ("show" !== value || (!dataShow || void 0 === dataShow[prop])) {
- continue;
- }
- /** @type {boolean} */
- hidden = true;
- }
- orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);
- }
- }
- if (tween = !jQuery.isEmptyObject(props), tween || !jQuery.isEmptyObject(orig)) {
- if (l) {
- if (1 === elem.nodeType) {
- /** @type {Array} */
- opts.overflow = [style.overflow, style.overflowX, style.overflowY];
- val = dataShow && dataShow.display;
- if (null == val) {
- val = data_priv.get(elem, "display");
- }
- type = jQuery.css(elem, "display");
- if ("none" === type) {
- if (val) {
- type = val;
- } else {
- showHide([elem], true);
- val = elem.style.display || val;
- type = jQuery.css(elem, "display");
- showHide([elem]);
- }
- }
- if ("inline" === type || "inline-block" === type && null != val) {
- if ("none" === jQuery.css(elem, "float")) {
- if (!tween) {
- anim.done(function() {
- style.display = val;
- });
- if (null == val) {
- type = style.display;
- val = "none" === type ? "" : type;
- }
- }
- /** @type {string} */
- style.display = "inline-block";
- }
- }
- }
- }
- if (opts.overflow) {
- /** @type {string} */
- style.overflow = "hidden";
- anim.always(function() {
- style.overflow = opts.overflow[0];
- style.overflowX = opts.overflow[1];
- style.overflowY = opts.overflow[2];
- });
- }
- /** @type {boolean} */
- tween = false;
- for (prop in orig) {
- if (!tween) {
- if (dataShow) {
- if ("hidden" in dataShow) {
- hidden = dataShow.hidden;
- }
- } else {
- dataShow = data_priv.access(elem, "fxshow", {
- display : val
- });
- }
- if (thisp) {
- /** @type {boolean} */
- dataShow.hidden = !hidden;
- }
- if (hidden) {
- showHide([elem], true);
- }
- anim.done(function() {
- if (!hidden) {
- showHide([elem]);
- }
- data_priv.remove(elem, "fxshow");
- for (prop in orig) {
- jQuery.style(elem, prop, orig[prop]);
- }
- });
- }
- tween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
- if (!(prop in dataShow)) {
- dataShow[prop] = tween.start;
- if (hidden) {
- tween.end = tween.start;
- /** @type {number} */
- tween.start = 0;
- }
- }
- }
- }
- }
- /**
- * @param {Object} object
- * @param {Object} paramMap
- * @return {undefined}
- */
- function propFilter(object, paramMap) {
- var key;
- var name;
- var value;
- var data;
- var hooks;
- for (key in object) {
- if (name = jQuery.camelCase(key), value = paramMap[name], data = object[key], jQuery.isArray(data) && (value = data[1], data = object[key] = data[0]), key !== name && (object[name] = data, delete object[key]), hooks = jQuery.cssHooks[name], hooks && "expand" in hooks) {
- data = hooks.expand(data);
- delete object[name];
- for (key in data) {
- if (!(key in object)) {
- object[key] = data[key];
- paramMap[key] = value;
- }
- }
- } else {
- paramMap[name] = value;
- }
- }
- }
- /**
- * @param {Object} elem
- * @param {?} properties
- * @param {Object} options
- * @return {?}
- */
- function Animation(elem, properties, options) {
- var that;
- var e;
- /** @type {number} */
- var i = 0;
- var valuesLen = Animation.prefilters.length;
- var deferred = jQuery.Deferred().always(function() {
- delete tick.elem;
- });
- /**
- * @return {?}
- */
- var tick = function() {
- if (e) {
- return false;
- }
- var currentTime = fxNow || createFxNow();
- /** @type {number} */
- var remaining = Math.max(0, animation.startTime + animation.duration - currentTime);
- /** @type {number} */
- var temp = remaining / animation.duration || 0;
- /** @type {number} */
- var percent = 1 - temp;
- /** @type {number} */
- var index = 0;
- var length = animation.tweens.length;
- for (;index < length;index++) {
- animation.tweens[index].run(percent);
- }
- return deferred.notifyWith(elem, [animation, percent, remaining]), percent < 1 && length ? remaining : (deferred.resolveWith(elem, [animation]), false);
- };
- var animation = deferred.promise({
- elem : elem,
- props : jQuery.extend({}, properties),
- opts : jQuery.extend(true, {
- specialEasing : {},
- easing : jQuery.easing._default
- }, options),
- originalProperties : properties,
- originalOptions : options,
- startTime : fxNow || createFxNow(),
- duration : options.duration,
- tweens : [],
- /**
- * @param {boolean} prop
- * @param {?} end
- * @return {?}
- */
- createTween : function(prop, end) {
- var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing);
- return animation.tweens.push(tween), tween;
- },
- /**
- * @param {boolean} gotoEnd
- * @return {?}
- */
- stop : function(gotoEnd) {
- /** @type {number} */
- var index = 0;
- var length = gotoEnd ? animation.tweens.length : 0;
- if (e) {
- return this;
- }
- /** @type {boolean} */
- e = true;
- for (;index < length;index++) {
- animation.tweens[index].run(1);
- }
- return gotoEnd ? (deferred.notifyWith(elem, [animation, 1, 0]), deferred.resolveWith(elem, [animation, gotoEnd])) : deferred.rejectWith(elem, [animation, gotoEnd]), this;
- }
- });
- var scripts = animation.props;
- propFilter(scripts, animation.opts.specialEasing);
- for (;i < valuesLen;i++) {
- if (that = Animation.prefilters[i].call(animation, elem, scripts, animation.opts)) {
- return jQuery.isFunction(that.stop) && (jQuery._queueHooks(animation.elem, animation.opts.queue).stop = jQuery.proxy(that.stop, that)), that;
- }
- }
- return jQuery.map(scripts, createTween, animation), jQuery.isFunction(animation.opts.start) && animation.opts.start.call(elem, animation), jQuery.fx.timer(jQuery.extend(tick, {
- elem : elem,
- anim : animation,
- queue : animation.opts.queue
- })), animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);
- }
- /**
- * @param {string} value
- * @return {?}
- */
- function $(value) {
- var dig = value.match(core_rnotwhite) || [];
- return dig.join(" ");
- }
- /**
- * @param {Element} object
- * @return {?}
- */
- function each(object) {
- return object.getAttribute && object.getAttribute("class") || "";
- }
- /**
- * @param {string} prefix
- * @param {string} obj
- * @param {boolean} traditional
- * @param {Function} add
- * @return {undefined}
- */
- function buildParams(prefix, obj, traditional, add) {
- var name;
- if (jQuery.isArray(obj)) {
- jQuery.each(obj, function(i, v) {
- if (traditional || rmargin.test(prefix)) {
- add(prefix, v);
- } else {
- buildParams(prefix + "[" + ("object" == typeof v && null != v ? i : "") + "]", v, traditional, add);
- }
- });
- } else {
- if (traditional || "object" !== jQuery.type(obj)) {
- add(prefix, obj);
- } else {
- for (name in obj) {
- buildParams(prefix + "[" + name + "]", obj[name], traditional, add);
- }
- }
- }
- }
- /**
- * @param {Object} structure
- * @return {?}
- */
- function addToPrefiltersOrTransports(structure) {
- return function(selector, fn) {
- if ("string" != typeof selector) {
- /** @type {(Function|string)} */
- fn = selector;
- /** @type {string} */
- selector = "*";
- }
- var node;
- /** @type {number} */
- var i = 0;
- var elem = selector.toLowerCase().match(core_rnotwhite) || [];
- if (jQuery.isFunction(fn)) {
- for (;node = elem[i++];) {
- if ("+" === node[0]) {
- node = node.slice(1) || "*";
- (structure[node] = structure[node] || []).unshift(fn);
- } else {
- (structure[node] = structure[node] || []).push(fn);
- }
- }
- }
- };
- }
- /**
- * @param {?} structure
- * @param {?} options
- * @param {Object} target
- * @param {?} jqXHR
- * @return {?}
- */
- function inspectPrefiltersOrTransports(structure, options, target, jqXHR) {
- /**
- * @param {string} key
- * @return {?}
- */
- function inspect(key) {
- var oldName;
- return old[key] = true, jQuery.each(structure[key] || [], function(dataAndEvents, prefilterOrFactory) {
- var name = prefilterOrFactory(options, target, jqXHR);
- return "string" != typeof name || (seekingTransport || old[name]) ? seekingTransport ? !(oldName = name) : void 0 : (options.dataTypes.unshift(name), inspect(name), false);
- }), oldName;
- }
- var old = {};
- /** @type {boolean} */
- var seekingTransport = structure === transports;
- return inspect(options.dataTypes[0]) || !old["*"] && inspect("*");
- }
- /**
- * @param {(Object|string)} target
- * @param {Object} src
- * @return {?}
- */
- function ajaxExtend(target, src) {
- var key;
- var deep;
- var flatOptions = jQuery.ajaxSettings.flatOptions || {};
- for (key in src) {
- if (void 0 !== src[key]) {
- (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];
- }
- }
- return deep && jQuery.extend(true, target, deep), target;
- }
- /**
- * @param {Object} s
- * @param {XMLHttpRequest} jqXHR
- * @param {Object} responses
- * @return {?}
- */
- function ajaxHandleResponses(s, jqXHR, responses) {
- var ct;
- var type;
- var finalDataType;
- var firstDataType;
- var contents = s.contents;
- var dataTypes = s.dataTypes;
- for (;"*" === dataTypes[0];) {
- dataTypes.shift();
- if (void 0 === ct) {
- ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
- }
- }
- if (ct) {
- for (type in contents) {
- if (contents[type] && contents[type].test(ct)) {
- dataTypes.unshift(type);
- break;
- }
- }
- }
- if (dataTypes[0] in responses) {
- finalDataType = dataTypes[0];
- } else {
- for (type in responses) {
- if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
- /** @type {string} */
- finalDataType = type;
- break;
- }
- if (!firstDataType) {
- /** @type {string} */
- firstDataType = type;
- }
- }
- /** @type {(string|undefined)} */
- finalDataType = finalDataType || firstDataType;
- }
- if (finalDataType) {
- return finalDataType !== dataTypes[0] && dataTypes.unshift(finalDataType), responses[finalDataType];
- }
- }
- /**
- * @param {Object} s
- * @param {Object} response
- * @param {?} jqXHR
- * @param {Object} isSuccess
- * @return {?}
- */
- function ajaxConvert(s, response, jqXHR, isSuccess) {
- var conv2;
- var current;
- var conv;
- var tmp;
- var prev;
- var converters = {};
- var dataTypes = s.dataTypes.slice();
- if (dataTypes[1]) {
- for (conv in s.converters) {
- converters[conv.toLowerCase()] = s.converters[conv];
- }
- }
- current = dataTypes.shift();
- for (;current;) {
- if (s.responseFields[current] && (jqXHR[s.responseFields[current]] = response), !prev && (isSuccess && (s.dataFilter && (response = s.dataFilter(response, s.dataType)))), prev = current, current = dataTypes.shift()) {
- if ("*" === current) {
- current = prev;
- } else {
- if ("*" !== prev && prev !== current) {
- if (conv = converters[prev + " " + current] || converters["* " + current], !conv) {
- for (conv2 in converters) {
- if (tmp = conv2.split(" "), tmp[1] === current && (conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]])) {
- if (conv === true) {
- conv = converters[conv2];
- } else {
- if (converters[conv2] !== true) {
- /** @type {string} */
- current = tmp[0];
- dataTypes.unshift(tmp[1]);
- }
- }
- break;
- }
- }
- }
- if (conv !== true) {
- if (conv && s["throws"]) {
- response = conv(response);
- } else {
- try {
- response = conv(response);
- } catch (e) {
- return{
- state : "parsererror",
- error : conv ? e : "No conversion from " + prev + " to " + current
- };
- }
- }
- }
- }
- }
- }
- }
- return{
- state : "success",
- data : response
- };
- }
- /**
- * @param {Object} node
- * @return {?}
- */
- function getWindow(node) {
- return jQuery.isWindow(node) ? node : 9 === node.nodeType && node.defaultView;
- }
- /** @type {Array} */
- var core_deletedIds = [];
- var doc = win.document;
- /** @type {function (Object): (Object|null)} */
- var getPrototypeOf = Object.getPrototypeOf;
- /** @type {function (this:(Array.<T>|string|{length: number}), *=, *=): Array.<T>} */
- var core_slice = core_deletedIds.slice;
- /** @type {function (this:*, ...[*]): Array} */
- var core_concat = core_deletedIds.concat;
- /** @type {function (this:(Array.<T>|{length: number}), ...[T]): number} */
- var core_push = core_deletedIds.push;
- /** @type {function (this:(Array.<T>|string|{length: number}), T, number=): number} */
- var core_indexOf = core_deletedIds.indexOf;
- var class2type = {};
- /** @type {function (this:*): string} */
- var core_toString = class2type.toString;
- /** @type {function (this:Object, *): boolean} */
- var hasOwn = class2type.hasOwnProperty;
- /** @type {function (this:Function): string} */
- var ostring = hasOwn.toString;
- /** @type {string} */
- var events = ostring.call(Object);
- var support = {};
- /** @type {string} */
- var core_version = "3.1.1";
- /**
- * @param {Object} selector
- * @param {Array} context
- * @return {?}
- */
- var jQuery = function(selector, context) {
- return new jQuery.fn.init(selector, context);
- };
- /** @type {RegExp} */
- var rclass = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
- /** @type {RegExp} */
- var rmsPrefix = /^-ms-/;
- /** @type {RegExp} */
- var newlineRe = /-([a-z])/g;
- /**
- * @param {?} all
- * @param {string} letter
- * @return {?}
- */
- var fcamelCase = function(all, letter) {
- return letter.toUpperCase();
- };
- jQuery.fn = jQuery.prototype = {
- jquery : core_version,
- /** @type {function (Object, Array): ?} */
- constructor : jQuery,
- length : 0,
- /**
- * @return {?}
- */
- toArray : function() {
- return core_slice.call(this);
- },
- /**
- * @param {Object} num
- * @return {?}
- */
- get : function(num) {
- return null == num ? core_slice.call(this) : num < 0 ? this[num + this.length] : this[num];
- },
- /**
- * @param {Array} elems
- * @return {?}
- */
- pushStack : function(elems) {
- var ret = jQuery.merge(this.constructor(), elems);
- return ret.prevObject = this, ret;
- },
- /**
- * @param {Function} opt_attributes
- * @return {?}
- */
- each : function(opt_attributes) {
- return jQuery.each(this, opt_attributes);
- },
- /**
- * @param {Function} callback
- * @return {?}
- */
- map : function(callback) {
- return this.pushStack(jQuery.map(this, function(el, operation) {
- return callback.call(el, operation, el);
- }));
- },
- /**
- * @return {?}
- */
- slice : function() {
- return this.pushStack(core_slice.apply(this, arguments));
- },
- /**
- * @return {?}
- */
- first : function() {
- return this.eq(0);
- },
- /**
- * @return {?}
- */
- last : function() {
- return this.eq(-1);
- },
- /**
- * @param {number} i
- * @return {?}
- */
- eq : function(i) {
- var len = this.length;
- var j = +i + (i < 0 ? len : 0);
- return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
- },
- /**
- * @return {?}
- */
- end : function() {
- return this.prevObject || this.constructor();
- },
- /** @type {function (this:(Array.<T>|{length: number}), ...[T]): number} */
- push : core_push,
- /** @type {function (this:(Array.<T>|{length: number}), function (T, T): number=): ?} */
- sort : core_deletedIds.sort,
- /** @type {function (this:(Array.<T>|{length: number}), *=, *=, ...[T]): Array.<T>} */
- splice : core_deletedIds.splice
- };
- /** @type {function (): ?} */
- jQuery.extend = jQuery.fn.extend = function() {
- var options;
- var name;
- var src;
- var copy;
- var copyIsArray;
- var clone;
- var target = arguments[0] || {};
- /** @type {number} */
- var i = 1;
- /** @type {number} */
- var l = arguments.length;
- /** @type {boolean} */
- var deep = false;
- if ("boolean" == typeof target) {
- /** @type {boolean} */
- deep = target;
- target = arguments[i] || {};
- i++;
- }
- if (!("object" == typeof target)) {
- if (!jQuery.isFunction(target)) {
- target = {};
- }
- }
- if (i === l) {
- target = this;
- i--;
- }
- for (;i < l;i++) {
- if (null != (options = arguments[i])) {
- for (name in options) {
- src = target[name];
- copy = options[name];
- if (target !== copy) {
- if (deep && (copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy))))) {
- if (copyIsArray) {
- /** @type {boolean} */
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
- target[name] = jQuery.extend(deep, clone, copy);
- } else {
- if (void 0 !== copy) {
- target[name] = copy;
- }
- }
- }
- }
- }
- }
- return target;
- };
- jQuery.extend({
- expando : "jQuery" + (core_version + Math.random()).replace(/\D/g, ""),
- isReady : true,
- /**
- * @param {string} elem
- * @return {?}
- */
- error : function(elem) {
- throw new Error(elem);
- },
- /**
- * @return {undefined}
- */
- noop : function() {
- },
- /**
- * @param {string} obj
- * @return {?}
- */
- isFunction : function(obj) {
- return "function" === jQuery.type(obj);
- },
- /** @type {function (*): boolean} */
- isArray : Array.isArray,
- /**
- * @param {Object} obj
- * @return {?}
- */
- isWindow : function(obj) {
- return null != obj && obj === obj.window;
- },
- /**
- * @param {string} arg
- * @return {?}
- */
- isNumeric : function(arg) {
- var type = jQuery.type(arg);
- return("number" === type || "string" === type) && !isNaN(arg - parseFloat(arg));
- },
- /**
- * @param {string} obj
- * @return {?}
- */
- isPlainObject : function(obj) {
- var node;
- var it;
- return!(!obj || "[object Object]" !== core_toString.call(obj)) && (!(node = getPrototypeOf(obj)) || (it = hasOwn.call(node, "constructor") && node.constructor, "function" == typeof it && ostring.call(it) === events));
- },
- /**
- * @param {?} obj
- * @return {?}
- */
- isEmptyObject : function(obj) {
- var prop;
- for (prop in obj) {
- return false;
- }
- return true;
- },
- /**
- * @param {string} obj
- * @return {?}
- */
- type : function(obj) {
- return null == obj ? obj + "" : "object" == typeof obj || "function" == typeof obj ? class2type[core_toString.call(obj)] || "object" : typeof obj;
- },
- /**
- * @param {string} data
- * @return {undefined}
- */
- globalEval : function(data) {
- load(data);
- },
- /**
- * @param {string} string
- * @return {?}
- */
- camelCase : function(string) {
- return string.replace(rmsPrefix, "ms-").replace(newlineRe, fcamelCase);
- },
- /**
- * @param {Node} elem
- * @param {string} name
- * @return {?}
- */
- nodeName : function(elem, name) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
- /**
- * @param {Function} obj
- * @param {Function} callback
- * @return {?}
- */
- each : function(obj, callback) {
- var l;
- /** @type {number} */
- var i = 0;
- if (isArraylike(obj)) {
- l = obj.length;
- for (;i < l;i++) {
- if (callback.call(obj[i], i, obj[i]) === false) {
- break;
- }
- }
- } else {
- for (i in obj) {
- if (callback.call(obj[i], i, obj[i]) === false) {
- break;
- }
- }
- }
- return obj;
- },
- /**
- * @param {(number|string)} s
- * @return {?}
- */
- trim : function(s) {
- return null == s ? "" : (s + "").replace(rclass, "");
- },
- /**
- * @param {?} arr
- * @param {Array} results
- * @return {?}
- */
- makeArray : function(arr, results) {
- var ret = results || [];
- return null != arr && (isArraylike(Object(arr)) ? jQuery.merge(ret, "string" == typeof arr ? [arr] : arr) : core_push.call(ret, arr)), ret;
- },
- /**
- * @param {?} elem
- * @param {?} arr
- * @param {?} i
- * @return {?}
- */
- inArray : function(elem, arr, i) {
- return null == arr ? -1 : core_indexOf.call(arr, elem, i);
- },
- /**
- * @param {Array} first
- * @param {?} second
- * @return {?}
- */
- merge : function(first, second) {
- /** @type {number} */
- var subLn = +second.length;
- /** @type {number} */
- var j = 0;
- var i = first.length;
- for (;j < subLn;j++) {
- first[i++] = second[j];
- }
- return first.length = i, first;
- },
- /**
- * @param {Array} elems
- * @param {Function} callback
- * @param {?} inv
- * @return {?}
- */
- grep : function(elems, callback, inv) {
- var val;
- /** @type {Array} */
- var ret = [];
- /** @type {number} */
- var i = 0;
- var length = elems.length;
- /** @type {boolean} */
- var skip = !inv;
- for (;i < length;i++) {
- /** @type {boolean} */
- val = !callback(elems[i], i);
- if (val !== skip) {
- ret.push(elems[i]);
- }
- }
- return ret;
- },
- /**
- * @param {Object} elems
- * @param {Function} callback
- * @param {?} arg
- * @return {?}
- */
- map : function(elems, callback, arg) {
- var valsLength;
- var value;
- /** @type {number} */
- var i = 0;
- /** @type {Array} */
- var ret = [];
- if (isArraylike(elems)) {
- valsLength = elems.length;
- for (;i < valsLength;i++) {
- value = callback(elems[i], i, arg);
- if (null != value) {
- ret.push(value);
- }
- }
- } else {
- for (i in elems) {
- value = callback(elems[i], i, arg);
- if (null != value) {
- ret.push(value);
- }
- }
- }
- return core_concat.apply([], ret);
- },
- guid : 1,
- /**
- * @param {Object} fn
- * @param {(Function|string)} context
- * @return {?}
- */
- proxy : function(fn, context) {
- var tmp;
- var args;
- var proxy;
- if ("string" == typeof context && (tmp = fn[context], context = fn, fn = tmp), jQuery.isFunction(fn)) {
- return args = core_slice.call(arguments, 2), proxy = function() {
- return fn.apply(context || this, args.concat(core_slice.call(arguments)));
- }, proxy.guid = fn.guid = fn.guid || jQuery.guid++, proxy;
- }
- },
- /** @type {function (): number} */
- now : Date.now,
- support : support
- });
- if ("function" == typeof Symbol) {
- jQuery.fn[Symbol.iterator] = core_deletedIds[Symbol.iterator];
- }
- jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(dataAndEvents, m3) {
- class2type["[object " + m3 + "]"] = m3.toLowerCase();
- });
- var Sizzle = function(win) {
- /**
- * @param {string} selector
- * @param {Object} context
- * @param {Array} results
- * @param {Array} seed
- * @return {?}
- */
- function Sizzle(selector, context, results, seed) {
- var m;
- var i;
- var elem;
- var ret;
- var match;
- var groups;
- var elements;
- var c = context && context.ownerDocument;
- var midline = context ? context.nodeType : 9;
- if (results = results || [], "string" != typeof selector || (!selector || 1 !== midline && (9 !== midline && 11 !== midline))) {
- return results;
- }
- if (!seed && ((context ? context.ownerDocument || context : preferredDoc) !== doc && setDocument(context), context = context || doc, documentIsHTML)) {
- if (11 !== midline && (match = rquickExpr.exec(selector))) {
- if (m = match[1]) {
- if (9 === midline) {
- if (!(elem = context.getElementById(m))) {
- return results;
- }
- if (elem.id === m) {
- return results.push(elem), results;
- }
- } else {
- if (c && ((elem = c.getElementById(m)) && (contains(context, elem) && elem.id === m))) {
- return results.push(elem), results;
- }
- }
- } else {
- if (match[2]) {
- return push.apply(results, context.getElementsByTagName(selector)), results;
- }
- if ((m = match[3]) && (support.getElementsByClassName && context.getElementsByClassName)) {
- return push.apply(results, context.getElementsByClassName(m)), results;
- }
- }
- }
- if (support.qsa && (!compilerCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector)))) {
- if (1 !== midline) {
- /** @type {Object} */
- c = context;
- /** @type {string} */
- elements = selector;
- } else {
- if ("object" !== context.nodeName.toLowerCase()) {
- if (ret = context.getAttribute("id")) {
- ret = ret.replace(rreturn, filter);
- } else {
- context.setAttribute("id", ret = expando);
- }
- groups = tokenize(selector);
- i = groups.length;
- for (;i--;) {
- /** @type {string} */
- groups[i] = "#" + ret + " " + toSelector(groups[i]);
- }
- elements = groups.join(",");
- c = rsibling.test(selector) && testContext(context.parentNode) || context;
- }
- }
- if (elements) {
- try {
- return push.apply(results, c.querySelectorAll(elements)), results;
- } catch (x) {
- } finally {
- if (ret === expando) {
- context.removeAttribute("id");
- }
- }
- }
- }
- }
- return select(selector.replace(rtrim, "$1"), context, results, seed);
- }
- /**
- * @return {?}
- */
- function createCache() {
- /**
- * @param {string} key
- * @param {?} value
- * @return {?}
- */
- function cache(key, value) {
- return buf.push(key + " ") > Expr.cacheLength && delete cache[buf.shift()], cache[key + " "] = value;
- }
- /** @type {Array} */
- var buf = [];
- return cache;
- }
- /**
- * @param {Function} fn
- * @return {?}
- */
- function markFunction(fn) {
- return fn[expando] = true, fn;
- }
- /**
- * @param {Function} fn
- * @return {?}
- */
- function assert(fn) {
- var el = doc.createElement("fieldset");
- try {
- return!!fn(el);
- } catch (c) {
- return false;
- } finally {
- if (el.parentNode) {
- el.parentNode.removeChild(el);
- }
- /** @type {null} */
- el = null;
- }
- }
- /**
- * @param {string} attrs
- * @param {Function} handler
- * @return {undefined}
- */
- function addHandle(attrs, handler) {
- var arr = attrs.split("|");
- var i = arr.length;
- for (;i--;) {
- /** @type {Function} */
- Expr.attrHandle[arr[i]] = handler;
- }
- }
- /**
- * @param {Element} a
- * @param {Element} b
- * @return {?}
- */
- function siblingCheck(a, b) {
- var cur = b && a;
- var diff = cur && (1 === a.nodeType && (1 === b.nodeType && a.sourceIndex - b.sourceIndex));
- if (diff) {
- return diff;
- }
- if (cur) {
- for (;cur = cur.nextSibling;) {
- if (cur === b) {
- return-1;
- }
- }
- }
- return a ? 1 : -1;
- }
- /**
- * @param {?} type
- * @return {?}
- */
- function createInputPseudo(type) {
- return function(elem) {
- var b = elem.nodeName.toLowerCase();
- return "input" === b && elem.type === type;
- };
- }
- /**
- * @param {?} type
- * @return {?}
- */
- function createButtonPseudo(type) {
- return function(elem) {
- var NULL = elem.nodeName.toLowerCase();
- return("input" === NULL || "button" === NULL) && elem.type === type;
- };
- }
- /**
- * @param {?} val
- * @return {?}
- */
- function init(val) {
- return function(option) {
- return "form" in option ? option.parentNode && option.disabled === false ? "label" in option ? "label" in option.parentNode ? option.parentNode.disabled === val : option.disabled === val : option.isDisabled === val || option.isDisabled !== !val && jQuery(option) === val : option.disabled === val : "label" in option && option.disabled === val;
- };
- }
- /**
- * @param {Function} fn
- * @return {?}
- */
- function createPositionalPseudo(fn) {
- return markFunction(function(argument) {
- return argument = +argument, markFunction(function(seed, matches) {
- var j;
- var matchIndexes = fn([], seed.length, argument);
- var i = matchIndexes.length;
- for (;i--;) {
- if (seed[j = matchIndexes[i]]) {
- /** @type {boolean} */
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
- }
- /**
- * @param {Object} context
- * @return {?}
- */
- function testContext(context) {
- return context && ("undefined" != typeof context.getElementsByTagName && context);
- }
- /**
- * @return {undefined}
- */
- function setFilters() {
- }
- /**
- * @param {Array} tokens
- * @return {?}
- */
- function toSelector(tokens) {
- /** @type {number} */
- var ti = 0;
- var nTokens = tokens.length;
- /** @type {string} */
- var selector = "";
- for (;ti < nTokens;ti++) {
- selector += tokens[ti].value;
- }
- return selector;
- }
- /**
- * @param {Function} done
- * @param {Object} element
- * @param {boolean} dataAndEvents
- * @return {?}
- */
- function addCombinator(done, element, dataAndEvents) {
- var parentNode = element.dir;
- var node = element.next;
- var root = node || parentNode;
- var g = dataAndEvents && "parentNode" === root;
- /** @type {number} */
- var id = rightId++;
- return element.first ? function(element, profile, code) {
- for (;element = element[parentNode];) {
- if (1 === element.nodeType || g) {
- return done(element, profile, code);
- }
- }
- return false;
- } : function(element, context, code) {
- var args;
- var item;
- var pair;
- /** @type {Array} */
- var data = [dirruns, id];
- if (code) {
- for (;element = element[parentNode];) {
- if ((1 === element.nodeType || g) && done(element, context, code)) {
- return true;
- }
- }
- } else {
- for (;element = element[parentNode];) {
- if (1 === element.nodeType || g) {
- if (pair = element[expando] || (element[expando] = {}), item = pair[element.uniqueID] || (pair[element.uniqueID] = {}), node && node === element.nodeName.toLowerCase()) {
- element = element[parentNode] || element;
- } else {
- if ((args = item[root]) && (args[0] === dirruns && args[1] === id)) {
- return data[2] = args[2];
- }
- if (item[root] = data, data[2] = done(element, context, code)) {
- return true;
- }
- }
- }
- }
- }
- return false;
- };
- }
- /**
- * @param {Array} matchers
- * @return {?}
- */
- function elementMatcher(matchers) {
- return matchers.length > 1 ? function(elem, context, xml) {
- var i = matchers.length;
- for (;i--;) {
- if (!matchers[i](elem, context, xml)) {
- return false;
- }
- }
- return true;
- } : matchers[0];
- }
- /**
- * @param {string} selector
- * @param {Array} contexts
- * @param {?} results
- * @return {?}
- */
- function multipleContexts(selector, contexts, results) {
- /** @type {number} */
- var i = 0;
- var len = contexts.length;
- for (;i < len;i++) {
- Sizzle(selector, contexts[i], results);
- }
- return results;
- }
- /**
- * @param {Array} a
- * @param {Object} map
- * @param {Function} filter
- * @param {?} context
- * @param {?} xml
- * @return {?}
- */
- function condense(a, map, filter, context, xml) {
- var item;
- /** @type {Array} */
- var caseSensitive = [];
- /** @type {number} */
- var i = 0;
- var aLength = a.length;
- /** @type {boolean} */
- var j = null != map;
- for (;i < aLength;i++) {
- if (item = a[i]) {
- if (!(filter && !filter(item, context, xml))) {
- caseSensitive.push(item);
- if (j) {
- map.push(i);
- }
- }
- }
- }
- return caseSensitive;
- }
- /**
- * @param {string} preFilter
- * @param {string} selector
- * @param {boolean} matcher
- * @param {Object} postFilter
- * @param {Object} postFinder
- * @param {string} postSelector
- * @return {?}
- */
- function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
- return postFilter && (!postFilter[expando] && (postFilter = setMatcher(postFilter))), postFinder && (!postFinder[expando] && (postFinder = setMatcher(postFinder, postSelector))), markFunction(function(seed, results, context, xml) {
- var temp;
- var i;
- var elem;
- /** @type {Array} */
- var preMap = [];
- /** @type {Array} */
- var postMap = [];
- var preexisting = results.length;
- var QUnit = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []);
- var matcherIn = !preFilter || !seed && selector ? QUnit : condense(QUnit, preMap, preFilter, context, xml);
- var matcherOut = matcher ? postFinder || (seed ? preFilter : preexisting || postFilter) ? [] : results : matcherIn;
- if (matcher && matcher(matcherIn, matcherOut, context, xml), postFilter) {
- temp = condense(matcherOut, postMap);
- postFilter(temp, [], context, xml);
- i = temp.length;
- for (;i--;) {
- if (elem = temp[i]) {
- /** @type {boolean} */
- matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
- }
- }
- }
- if (seed) {
- if (postFinder || preFilter) {
- if (postFinder) {
- /** @type {Array} */
- temp = [];
- i = matcherOut.length;
- for (;i--;) {
- if (elem = matcherOut[i]) {
- temp.push(matcherIn[i] = elem);
- }
- }
- postFinder(null, matcherOut = [], temp, xml);
- }
- i = matcherOut.length;
- for (;i--;) {
- if (elem = matcherOut[i]) {
- if ((temp = postFinder ? sortFunction(seed, elem) : preMap[i]) > -1) {
- /** @type {boolean} */
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
- }
- } else {
- matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);
- if (postFinder) {
- postFinder(null, results, matcherOut, xml);
- } else {
- push.apply(results, matcherOut);
- }
- }
- });
- }
- /**
- * @param {Object} tokens
- * @return {?}
- */
- function matcherFromTokens(tokens) {
- var a;
- var matcher;
- var j;
- var len = tokens.length;
- var leadingRelative = Expr.relative[tokens[0].type];
- var implicitRelative = leadingRelative || Expr.relative[" "];
- /** @type {number} */
- var i = leadingRelative ? 1 : 0;
- var matchContext = addCombinator(function(out) {
- return out === a;
- }, implicitRelative, true);
- var matchAnyContext = addCombinator(function(walkers) {
- return sortFunction(a, walkers) > -1;
- }, implicitRelative, true);
- /** @type {Array} */
- var matchers = [function(elem, context, xml) {
- var e = !leadingRelative && (xml || context !== queuedFn) || ((a = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
- return a = null, e;
- }];
- for (;i < len;i++) {
- if (matcher = Expr.relative[tokens[i].type]) {
- /** @type {Array} */
- matchers = [addCombinator(elementMatcher(matchers), matcher)];
- } else {
- if (matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches), matcher[expando]) {
- /** @type {number} */
- j = ++i;
- for (;j < len;j++) {
- if (Expr.relative[tokens[j].type]) {
- break;
- }
- }
- return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(tokens.slice(0, i - 1).concat({
- value : " " === tokens[i - 2].type ? "*" : ""
- })).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));
- }
- matchers.push(matcher);
- }
- }
- return elementMatcher(matchers);
- }
- /**
- * @param {Array} elementMatchers
- * @param {Array} setMatchers
- * @return {?}
- */
- function matcherFromGroupMatchers(elementMatchers, setMatchers) {
- /** @type {boolean} */
- var bySet = setMatchers.length > 0;
- /** @type {boolean} */
- var triggerElem = elementMatchers.length > 0;
- /**
- * @param {HTMLElement} dataAndEvents
- * @param {undefined} xml
- * @param {boolean} context
- * @param {Array} results
- * @param {Object} seed
- * @return {?}
- */
- var superMatcher = function(dataAndEvents, xml, context, results, seed) {
- var elem;
- var j;
- var matcher;
- /** @type {number} */
- var matchedCount = 0;
- /** @type {string} */
- var i = "0";
- var unmatched = dataAndEvents && [];
- /** @type {Array} */
- var setMatched = [];
- var fn = queuedFn;
- var elems = dataAndEvents || triggerElem && Expr.find.TAG("*", seed);
- var dirrunsUnique = dirruns += null == fn ? 1 : Math.random() || 0.1;
- var len = elems.length;
- if (seed) {
- queuedFn = xml === doc || (xml || seed);
- }
- for (;i !== len && null != (elem = elems[i]);i++) {
- if (triggerElem && elem) {
- /** @type {number} */
- j = 0;
- if (!xml) {
- if (!(elem.ownerDocument === doc)) {
- setDocument(elem);
- /** @type {boolean} */
- context = !documentIsHTML;
- }
- }
- for (;matcher = elementMatchers[j++];) {
- if (matcher(elem, xml || doc, context)) {
- results.push(elem);
- break;
- }
- }
- if (seed) {
- dirruns = dirrunsUnique;
- }
- }
- if (bySet) {
- if (elem = !matcher && elem) {
- matchedCount--;
- }
- if (dataAndEvents) {
- unmatched.push(elem);
- }
- }
- }
- if (matchedCount += i, bySet && i !== matchedCount) {
- /** @type {number} */
- j = 0;
- for (;matcher = setMatchers[j++];) {
- matcher(unmatched, setMatched, xml, context);
- }
- if (dataAndEvents) {
- if (matchedCount > 0) {
- for (;i--;) {
- if (!unmatched[i]) {
- if (!setMatched[i]) {
- setMatched[i] = pop.call(results);
- }
- }
- }
- }
- setMatched = condense(setMatched);
- }
- push.apply(results, setMatched);
- if (seed) {
- if (!dataAndEvents) {
- if (setMatched.length > 0) {
- if (matchedCount + setMatchers.length > 1) {
- Sizzle.uniqueSort(results);
- }
- }
- }
- }
- }
- return seed && (dirruns = dirrunsUnique, queuedFn = fn), unmatched;
- };
- return bySet ? markFunction(superMatcher) : superMatcher;
- }
- var i;
- var support;
- var Expr;
- var getText;
- var isXML;
- var tokenize;
- var compile;
- var select;
- var queuedFn;
- var sortInput;
- var l;
- var setDocument;
- var doc;
- var docElem;
- var documentIsHTML;
- var rbuggyQSA;
- var rbuggyMatches;
- var matches;
- var contains;
- /** @type {string} */
- var expando = "sizzle" + 1 * new Date;
- var preferredDoc = win.document;
- /** @type {number} */
- var dirruns = 0;
- /** @type {number} */
- var rightId = 0;
- var classCache = createCache();
- var tokenCache = createCache();
- var compilerCache = createCache();
- /**
- * @param {?} a
- * @param {?} b
- * @return {?}
- */
- var sortOrder = function(a, b) {
- return a === b && (l = true), 0;
- };
- /** @type {function (this:Object, *): boolean} */
- var hasOwn = {}.hasOwnProperty;
- /** @type {Array} */
- var arr = [];
- /** @type {function (this:(Array.<T>|{length: number})): T} */
- var pop = arr.pop;
- /** @type {function (this:(Array.<T>|{length: number}), ...[T]): number} */
- var push_native = arr.push;
- /** @type {function (this:(Array.<T>|{length: number}), ...[T]): number} */
- var push = arr.push;
- /** @type {function (this:(Array.<T>|string|{length: number}), *=, *=): Array.<T>} */
- var slice = arr.slice;
- /**
- * @param {Object} a
- * @param {?} obj
- * @return {?}
- */
- var sortFunction = function(a, obj) {
- /** @type {number} */
- var i = 0;
- var aLength = a.length;
- for (;i < aLength;i++) {
- if (a[i] === obj) {
- return i;
- }
- }
- return-1;
- };
- /** @type {string} */
- var booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped";
- /** @type {string} */
- var whitespace = "[\\x20\\t\\r\\n\\f]";
- /** @type {string} */
- var ele = "(?:\\\\.|[\\w-]|[^\x00-\\xa0])+";
- /** @type {string} */
- var attributes = "\\[" + whitespace + "*(" + ele + ")(?:" + whitespace + "*([*^$|!~]?=)" + whitespace + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + ele + "))|)" + whitespace + "*\\]";
- /** @type {string} */
- var pseudos = ":(" + ele + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|.*)\\)|)";
- /** @type {RegExp} */
- var regexp = new RegExp(whitespace + "+", "g");
- /** @type {RegExp} */
- var rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g");
- /** @type {RegExp} */
- var rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*");
- /** @type {RegExp} */
- var rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*");
- /** @type {RegExp} */
- var rattributeQuotes = new RegExp("=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g");
- /** @type {RegExp} */
- var rpseudo = new RegExp(pseudos);
- /** @type {RegExp} */
- var ridentifier = new RegExp("^" + ele + "$");
- var matchExpr = {
- ID : new RegExp("^#(" + ele + ")"),
- CLASS : new RegExp("^\\.(" + ele + ")"),
- TAG : new RegExp("^(" + ele + "|[*])"),
- ATTR : new RegExp("^" + attributes),
- PSEUDO : new RegExp("^" + pseudos),
- CHILD : new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
- bool : new RegExp("^(?:" + booleans + ")$", "i"),
- needsContext : new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
- };
- /** @type {RegExp} */
- var rinputs = /^(?:input|select|textarea|button)$/i;
- /** @type {RegExp} */
- var rheader = /^h\d$/i;
- /** @type {RegExp} */
- var rnative = /^[^{]+\{\s*\[native \w/;
- /** @type {RegExp} */
- var rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/;
- /** @type {RegExp} */
- var rsibling = /[+~]/;
- /** @type {RegExp} */
- var runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig");
- /**
- * @param {?} _
- * @param {(number|string)} escaped
- * @param {boolean} escapedWhitespace
- * @return {?}
- */
- var funescape = function(_, escaped, escapedWhitespace) {
- /** @type {number} */
- var high = "0x" + escaped - 65536;
- return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, 1023 & high | 56320);
- };
- /** @type {RegExp} */
- var rreturn = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g;
- /**
- * @param {string} from
- * @param {boolean} to
- * @return {?}
- */
- var filter = function(from, to) {
- return to ? "\x00" === from ? "\ufffd" : from.slice(0, -1) + "\\" + from.charCodeAt(from.length - 1).toString(16) + " " : "\\" + from;
- };
- /**
- * @return {undefined}
- */
- var f = function() {
- setDocument();
- };
- var jQuery = addCombinator(function(config) {
- return config.disabled === true && ("form" in config || "label" in config);
- }, {
- dir : "parentNode",
- next : "legend"
- });
- try {
- push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes);
- arr[preferredDoc.childNodes.length].nodeType;
- } catch (fa) {
- push = {
- /** @type {function (?, Object): undefined} */
- apply : arr.length ? function(a, els) {
- push_native.apply(a, slice.call(els));
- } : function(target, els) {
- var j = target.length;
- /** @type {number} */
- var i = 0;
- for (;target[j++] = els[i++];) {
- }
- /** @type {number} */
- target.length = j - 1;
- }
- };
- }
- support = Sizzle.support = {};
- /** @type {function (Object): ?} */
- isXML = Sizzle.isXML = function(elem) {
- var node = elem && (elem.ownerDocument || elem).documentElement;
- return!!node && "HTML" !== node.nodeName;
- };
- /** @type {function (boolean): ?} */
- setDocument = Sizzle.setDocument = function(node) {
- var hasCompare;
- var win;
- var result = node ? node.ownerDocument || node : preferredDoc;
- return result !== doc && (9 === result.nodeType && result.documentElement) ? (doc = result, docElem = doc.documentElement, documentIsHTML = !isXML(doc), preferredDoc !== doc && ((win = doc.defaultView) && (win.top !== win && (win.addEventListener ? win.addEventListener("unload", f, false) : win.attachEvent && win.attachEvent("onunload", f)))), support.attributes = assert(function(div) {
- return div.className = "i", !div.getAttribute("className");
- }), support.getElementsByTagName = assert(function(div) {
- return div.appendChild(doc.createComment("")), !div.getElementsByTagName("*").length;
- }), support.getElementsByClassName = rnative.test(doc.getElementsByClassName), support.getById = assert(function(div) {
- return docElem.appendChild(div).id = expando, !doc.getElementsByName || !doc.getElementsByName(expando).length;
- }), support.getById ? (Expr.filter.ID = function(id) {
- var attrId = id.replace(runescape, funescape);
- return function(elem) {
- return elem.getAttribute("id") === attrId;
- };
- }, Expr.find.ID = function(id, context) {
- if ("undefined" != typeof context.getElementById && documentIsHTML) {
- var m = context.getElementById(id);
- return m ? [m] : [];
- }
- }) : (Expr.filter.ID = function(id) {
- var attrId = id.replace(runescape, funescape);
- return function(elem) {
- var node = "undefined" != typeof elem.getAttributeNode && elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- }, Expr.find.ID = function(id, context) {
- if ("undefined" != typeof context.getElementById && documentIsHTML) {
- var m;
- var i;
- var nodes;
- var elem = context.getElementById(id);
- if (elem) {
- if (m = elem.getAttributeNode("id"), m && m.value === id) {
- return[elem];
- }
- nodes = context.getElementsByName(id);
- /** @type {number} */
- i = 0;
- for (;elem = nodes[i++];) {
- if (m = elem.getAttributeNode("id"), m && m.value === id) {
- return[elem];
- }
- }
- }
- return[];
- }
- }), Expr.find.TAG = support.getElementsByTagName ? function(selector, el) {
- return "undefined" != typeof el.getElementsByTagName ? el.getElementsByTagName(selector) : support.qsa ? el.querySelectorAll(selector) : void 0;
- } : function(tag, from) {
- var node;
- /** @type {Array} */
- var tmp = [];
- /** @type {number} */
- var i = 0;
- var elem = from.getElementsByTagName(tag);
- if ("*" === tag) {
- for (;node = elem[i++];) {
- if (1 === node.nodeType) {
- tmp.push(node);
- }
- }
- return tmp;
- }
- return elem;
- }, Expr.find.CLASS = support.getElementsByClassName && function(m, c) {
- if ("undefined" != typeof c.getElementsByClassName && documentIsHTML) {
- return c.getElementsByClassName(m);
- }
- }, rbuggyMatches = [], rbuggyQSA = [], (support.qsa = rnative.test(doc.querySelectorAll)) && (assert(function(div) {
- /** @type {string} */
- docElem.appendChild(div).innerHTML = "<a id='" + expando + "'></a><select id='" + expando + "-\r\\' msallowcapture=''><option selected=''></option></select>";
- if (div.querySelectorAll("[msallowcapture^='']").length) {
- rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")");
- }
- if (!div.querySelectorAll("[selected]").length) {
- rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
- }
- if (!div.querySelectorAll("[id~=" + expando + "-]").length) {
- rbuggyQSA.push("~=");
- }
- if (!div.querySelectorAll(":checked").length) {
- rbuggyQSA.push(":checked");
- }
- if (!div.querySelectorAll("a#" + expando + "+*").length) {
- rbuggyQSA.push(".#.+[+~]");
- }
- }), assert(function(div) {
- /** @type {string} */
- div.innerHTML = "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";
- var input = doc.createElement("input");
- input.setAttribute("type", "hidden");
- div.appendChild(input).setAttribute("name", "D");
- if (div.querySelectorAll("[name=d]").length) {
- rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?=");
- }
- if (2 !== div.querySelectorAll(":enabled").length) {
- rbuggyQSA.push(":enabled", ":disabled");
- }
- /** @type {boolean} */
- docElem.appendChild(div).disabled = true;
- if (2 !== div.querySelectorAll(":disabled").length) {
- rbuggyQSA.push(":enabled", ":disabled");
- }
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- })), (support.matchesSelector = rnative.test(matches = docElem.matches || (docElem.webkitMatchesSelector || (docElem.mozMatchesSelector || (docElem.oMatchesSelector || docElem.msMatchesSelector))))) && assert(function(div) {
- support.disconnectedMatch = matches.call(div, "*");
- matches.call(div, "[s!='']:x");
- rbuggyMatches.push("!=", pseudos);
- }), rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|")), rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|")), hasCompare = rnative.test(docElem.compareDocumentPosition), contains = hasCompare || rnative.test(docElem.contains) ? function(a, b) {
- var adown = 9 === a.nodeType ? a.documentElement : a;
- var bup = b && b.parentNode;
- return a === bup || !(!bup || (1 !== bup.nodeType || !(adown.contains ? adown.contains(bup) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(bup))));
- } : function(a, b) {
- if (b) {
- for (;b = b.parentNode;) {
- if (b === a) {
- return true;
- }
- }
- }
- return false;
- }, sortOrder = hasCompare ? function(a, b) {
- if (a === b) {
- return l = true, 0;
- }
- /** @type {number} */
- var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
- return compare ? compare : (compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1, 1 & compare || !support.sortDetached && b.compareDocumentPosition(a) === compare ? a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ? -1 : b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ? 1 : sortInput ? sortFunction(sortInput, a) - sortFunction(sortInput, b) : 0 : 4 & compare ? -1 : 1);
- } : function(a, b) {
- if (a === b) {
- return l = true, 0;
- }
- var cur;
- /** @type {number} */
- var i = 0;
- var aup = a.parentNode;
- var bup = b.parentNode;
- /** @type {Array} */
- var ap = [a];
- /** @type {Array} */
- var bp = [b];
- if (!aup || !bup) {
- return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? sortFunction(sortInput, a) - sortFunction(sortInput, b) : 0;
- }
- if (aup === bup) {
- return siblingCheck(a, b);
- }
- cur = a;
- for (;cur = cur.parentNode;) {
- ap.unshift(cur);
- }
- cur = b;
- for (;cur = cur.parentNode;) {
- bp.unshift(cur);
- }
- for (;ap[i] === bp[i];) {
- i++;
- }
- return i ? siblingCheck(ap[i], bp[i]) : ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0;
- }, doc) : doc;
- };
- /**
- * @param {Function} expr
- * @param {Array} elements
- * @return {?}
- */
- Sizzle.matches = function(expr, elements) {
- return Sizzle(expr, null, null, elements);
- };
- /**
- * @param {HTMLElement} elem
- * @param {string} expr
- * @return {?}
- */
- Sizzle.matchesSelector = function(elem, expr) {
- if ((elem.ownerDocument || elem) !== doc && setDocument(elem), expr = expr.replace(rattributeQuotes, "='$1']"), support.matchesSelector && (documentIsHTML && (!compilerCache[expr + " "] && ((!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr)))))) {
- try {
- var ret = matches.call(elem, expr);
- if (ret || (support.disconnectedMatch || elem.document && 11 !== elem.document.nodeType)) {
- return ret;
- }
- } catch (e) {
- }
- }
- return Sizzle(expr, doc, null, [elem]).length > 0;
- };
- /**
- * @param {Object} context
- * @param {Object} b
- * @return {?}
- */
- Sizzle.contains = function(context, b) {
- return(context.ownerDocument || context) !== doc && setDocument(context), contains(context, b);
- };
- /**
- * @param {Object} elem
- * @param {string} name
- * @return {?}
- */
- Sizzle.attr = function(elem, name) {
- if ((elem.ownerDocument || elem) !== doc) {
- setDocument(elem);
- }
- var fn = Expr.attrHandle[name.toLowerCase()];
- var val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : void 0;
- return void 0 !== val ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
- };
- /**
- * @param {(number|string)} attr
- * @return {?}
- */
- Sizzle.escape = function(attr) {
- return(attr + "").replace(rreturn, filter);
- };
- /**
- * @param {string} elem
- * @return {?}
- */
- Sizzle.error = function(elem) {
- throw new Error("Syntax error, unrecognized expression: " + elem);
- };
- /**
- * @param {Array} results
- * @return {?}
- */
- Sizzle.uniqueSort = function(results) {
- var elem;
- /** @type {Array} */
- var duplicates = [];
- /** @type {number} */
- var j = 0;
- /** @type {number} */
- var i = 0;
- if (l = !support.detectDuplicates, sortInput = !support.sortStable && results.slice(0), results.sort(sortOrder), l) {
- for (;elem = results[i++];) {
- if (elem === results[i]) {
- /** @type {number} */
- j = duplicates.push(i);
- }
- }
- for (;j--;) {
- results.splice(duplicates[j], 1);
- }
- }
- return sortInput = null, results;
- };
- /** @type {function ((Array|Element)): ?} */
- getText = Sizzle.getText = function(elem) {
- var node;
- /** @type {string} */
- var ret = "";
- /** @type {number} */
- var i = 0;
- var nodeType = elem.nodeType;
- if (nodeType) {
- if (1 === nodeType || (9 === nodeType || 11 === nodeType)) {
- if ("string" == typeof elem.textContent) {
- return elem.textContent;
- }
- elem = elem.firstChild;
- for (;elem;elem = elem.nextSibling) {
- ret += getText(elem);
- }
- } else {
- if (3 === nodeType || 4 === nodeType) {
- return elem.nodeValue;
- }
- }
- } else {
- for (;node = elem[i++];) {
- ret += getText(node);
- }
- }
- return ret;
- };
- Expr = Sizzle.selectors = {
- cacheLength : 50,
- /** @type {function (Function): ?} */
- createPseudo : markFunction,
- match : matchExpr,
- attrHandle : {},
- find : {},
- relative : {
- ">" : {
- dir : "parentNode",
- first : true
- },
- " " : {
- dir : "parentNode"
- },
- "+" : {
- dir : "previousSibling",
- first : true
- },
- "~" : {
- dir : "previousSibling"
- }
- },
- preFilter : {
- /**
- * @param {Array} match
- * @return {?}
- */
- ATTR : function(match) {
- return match[1] = match[1].replace(runescape, funescape), match[3] = (match[3] || (match[4] || (match[5] || ""))).replace(runescape, funescape), "~=" === match[2] && (match[3] = " " + match[3] + " "), match.slice(0, 4);
- },
- /**
- * @param {Array} match
- * @return {?}
- */
- CHILD : function(match) {
- return match[1] = match[1].toLowerCase(), "nth" === match[1].slice(0, 3) ? (match[3] || Sizzle.error(match[0]), match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * ("even" === match[3] || "odd" === match[3])), match[5] = +(match[7] + match[8] || "odd" === match[3])) : match[3] && Sizzle.error(match[0]), match;
- },
- /**
- * @param {Array} match
- * @return {?}
- */
- PSEUDO : function(match) {
- var excess;
- var unquoted = !match[6] && match[2];
- return matchExpr.CHILD.test(match[0]) ? null : (match[3] ? match[2] = match[4] || (match[5] || "") : unquoted && (rpseudo.test(unquoted) && ((excess = tokenize(unquoted, true)) && ((excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length) && (match[0] = match[0].slice(0, excess), match[2] = unquoted.slice(0, excess))))), match.slice(0, 3));
- }
- },
- filter : {
- /**
- * @param {string} nodeNameSelector
- * @return {?}
- */
- TAG : function(nodeNameSelector) {
- var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
- return "*" === nodeNameSelector ? function() {
- return true;
- } : function(elem) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
- /**
- * @param {string} className
- * @return {?}
- */
- CLASS : function(className) {
- var pattern = classCache[className + " "];
- return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) {
- return pattern.test("string" == typeof elem.className && elem.className || ("undefined" != typeof elem.getAttribute && elem.getAttribute("class") || ""));
- });
- },
- /**
- * @param {string} name
- * @param {string} not
- * @param {string} check
- * @return {?}
- */
- ATTR : function(name, not, check) {
- return function(elem) {
- var result = Sizzle.attr(elem, name);
- return null == result ? "!=" === not : !not || (result += "", "=" === not ? result === check : "!=" === not ? result !== check : "^=" === not ? check && 0 === result.indexOf(check) : "*=" === not ? check && result.indexOf(check) > -1 : "$=" === not ? check && result.slice(-check.length) === check : "~=" === not ? (" " + result.replace(regexp, " ") + " ").indexOf(check) > -1 : "|=" === not && (result === check || result.slice(0, check.length + 1) === check + "-"));
- };
- },
- /**
- * @param {string} type
- * @param {string} argument
- * @param {?} dataAndEvents
- * @param {boolean} first
- * @param {number} last
- * @return {?}
- */
- CHILD : function(type, argument, dataAndEvents, first, last) {
- /** @type {boolean} */
- var simple = "nth" !== type.slice(0, 3);
- /** @type {boolean} */
- var forward = "last" !== type.slice(-4);
- /** @type {boolean} */
- var value = "of-type" === argument;
- return 1 === first && 0 === last ? function(contestant) {
- return!!contestant.parentNode;
- } : function(elem, dataAndEvents, computed) {
- var cache;
- var outerCache;
- var options;
- var node;
- var nodeIndex;
- var eventPath;
- /** @type {string} */
- var which = simple !== forward ? "nextSibling" : "previousSibling";
- var parent = elem.parentNode;
- var attrNames = value && elem.nodeName.toLowerCase();
- /** @type {boolean} */
- var useCache = !computed && !value;
- /** @type {boolean} */
- var diff = false;
- if (parent) {
- if (simple) {
- for (;which;) {
- /** @type {Element} */
- node = elem;
- for (;node = node[which];) {
- if (value ? node.nodeName.toLowerCase() === attrNames : 1 === node.nodeType) {
- return false;
- }
- }
- /** @type {(boolean|string)} */
- eventPath = which = "only" === type && (!eventPath && "nextSibling");
- }
- return true;
- }
- if (eventPath = [forward ? parent.firstChild : parent.lastChild], forward && useCache) {
- node = parent;
- options = node[expando] || (node[expando] = {});
- outerCache = options[node.uniqueID] || (options[node.uniqueID] = {});
- cache = outerCache[type] || [];
- nodeIndex = cache[0] === dirruns && cache[1];
- diff = nodeIndex && cache[2];
- node = nodeIndex && parent.childNodes[nodeIndex];
- for (;node = ++nodeIndex && (node && node[which]) || ((diff = nodeIndex = 0) || eventPath.pop());) {
- if (1 === node.nodeType && (++diff && node === elem)) {
- /** @type {Array} */
- outerCache[type] = [dirruns, nodeIndex, diff];
- break;
- }
- }
- } else {
- if (useCache && (node = elem, options = node[expando] || (node[expando] = {}), outerCache = options[node.uniqueID] || (options[node.uniqueID] = {}), cache = outerCache[type] || [], nodeIndex = cache[0] === dirruns && cache[1], diff = nodeIndex), diff === false) {
- for (;node = ++nodeIndex && (node && node[which]) || ((diff = nodeIndex = 0) || eventPath.pop());) {
- if ((value ? node.nodeName.toLowerCase() === attrNames : 1 === node.nodeType) && (++diff && (useCache && (options = node[expando] || (node[expando] = {}), outerCache = options[node.uniqueID] || (options[node.uniqueID] = {}), outerCache[type] = [dirruns, diff]), node === elem))) {
- break;
- }
- }
- }
- }
- return diff -= last, diff === first || diff % first === 0 && diff / first >= 0;
- }
- };
- },
- /**
- * @param {string} pseudo
- * @param {?} context
- * @return {?}
- */
- PSEUDO : function(pseudo, context) {
- var args;
- var fn = Expr.pseudos[pseudo] || (Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo));
- return fn[expando] ? fn(context) : fn.length > 1 ? (args = [pseudo, pseudo, "", context], Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(a, cssRules) {
- var i;
- var ret = fn(a, context);
- var len = ret.length;
- for (;len--;) {
- i = sortFunction(a, ret[len]);
- /** @type {boolean} */
- a[i] = !(cssRules[i] = ret[len]);
- }
- }) : function(err) {
- return fn(err, 0, args);
- }) : fn;
- }
- },
- pseudos : {
- not : markFunction(function(selector) {
- /** @type {Array} */
- var elem = [];
- /** @type {Array} */
- var memory = [];
- var matcher = compile(selector.replace(rtrim, "$1"));
- return matcher[expando] ? markFunction(function(seed, qs, dataAndEvents, xml) {
- var val;
- var unmatched = matcher(seed, null, xml, []);
- var i = seed.length;
- for (;i--;) {
- if (val = unmatched[i]) {
- /** @type {boolean} */
- seed[i] = !(qs[i] = val);
- }
- }
- }) : function(value, dataAndEvents, xml) {
- return elem[0] = value, matcher(elem, null, xml, memory), elem[0] = null, !memory.pop();
- };
- }),
- has : markFunction(function(selector) {
- return function(elem) {
- return Sizzle(selector, elem).length > 0;
- };
- }),
- contains : markFunction(function(id) {
- return id = id.replace(runescape, funescape), function(elem) {
- return(elem.textContent || (elem.innerText || getText(elem))).indexOf(id) > -1;
- };
- }),
- lang : markFunction(function(lang) {
- return ridentifier.test(lang || "") || Sizzle.error("unsupported lang: " + lang), lang = lang.replace(runescape, funescape).toLowerCase(), function(elem) {
- var elemLang;
- do {
- if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) {
- return elemLang = elemLang.toLowerCase(), elemLang === lang || 0 === elemLang.indexOf(lang + "-");
- }
- } while ((elem = elem.parentNode) && 1 === elem.nodeType);
- return false;
- };
- }),
- /**
- * @param {Object} value
- * @return {?}
- */
- target : function(value) {
- var models = win.location && win.location.hash;
- return models && models.slice(1) === value.id;
- },
- /**
- * @param {undefined} elem
- * @return {?}
- */
- root : function(elem) {
- return elem === docElem;
- },
- /**
- * @param {string} elem
- * @return {?}
- */
- focus : function(elem) {
- return elem === doc.activeElement && ((!doc.hasFocus || doc.hasFocus()) && !!(elem.type || (elem.href || ~elem.tabIndex)));
- },
- enabled : init(false),
- disabled : init(true),
- /**
- * @param {Node} node
- * @return {?}
- */
- checked : function(node) {
- var b = node.nodeName.toLowerCase();
- return "input" === b && !!node.checked || "option" === b && !!node.selected;
- },
- /**
- * @param {Node} elem
- * @return {?}
- */
- selected : function(elem) {
- return elem.parentNode && elem.parentNode.selectedIndex, elem.selected === true;
- },
- /**
- * @param {(Array|Element)} elem
- * @return {?}
- */
- empty : function(elem) {
- elem = elem.firstChild;
- for (;elem;elem = elem.nextSibling) {
- if (elem.nodeType < 6) {
- return false;
- }
- }
- return true;
- },
- /**
- * @param {(Node|string)} elem
- * @return {?}
- */
- parent : function(elem) {
- return!Expr.pseudos.empty(elem);
- },
- /**
- * @param {Node} elem
- * @return {?}
- */
- header : function(elem) {
- return rheader.test(elem.nodeName);
- },
- /**
- * @param {Node} elem
- * @return {?}
- */
- input : function(elem) {
- return rinputs.test(elem.nodeName);
- },
- /**
- * @param {Node} elem
- * @return {?}
- */
- button : function(elem) {
- var b = elem.nodeName.toLowerCase();
- return "input" === b && "button" === elem.type || "button" === b;
- },
- /**
- * @param {Node} elem
- * @return {?}
- */
- text : function(elem) {
- var evt;
- return "input" === elem.nodeName.toLowerCase() && ("text" === elem.type && (null == (evt = elem.getAttribute("type")) || "text" === evt.toLowerCase()));
- },
- first : createPositionalPseudo(function() {
- return[0];
- }),
- last : createPositionalPseudo(function(dataAndEvents, deepDataAndEvents) {
- return[deepDataAndEvents - 1];
- }),
- eq : createPositionalPseudo(function(dataAndEvents, length, argument) {
- return[argument < 0 ? argument + length : argument];
- }),
- even : createPositionalPseudo(function(assigns, dataAndEvents) {
- /** @type {number} */
- var vvar = 0;
- for (;vvar < dataAndEvents;vvar += 2) {
- assigns.push(vvar);
- }
- return assigns;
- }),
- odd : createPositionalPseudo(function(assigns, dataAndEvents) {
- /** @type {number} */
- var vvar = 1;
- for (;vvar < dataAndEvents;vvar += 2) {
- assigns.push(vvar);
- }
- return assigns;
- }),
- lt : createPositionalPseudo(function(assigns, length, argument) {
- var vvar = argument < 0 ? argument + length : argument;
- for (;--vvar >= 0;) {
- assigns.push(vvar);
- }
- return assigns;
- }),
- gt : createPositionalPseudo(function(assigns, length, argument) {
- var vvar = argument < 0 ? argument + length : argument;
- for (;++vvar < length;) {
- assigns.push(vvar);
- }
- return assigns;
- })
- }
- };
- Expr.pseudos.nth = Expr.pseudos.eq;
- for (i in{
- radio : true,
- checkbox : true,
- file : true,
- password : true,
- image : true
- }) {
- Expr.pseudos[i] = createInputPseudo(i);
- }
- for (i in{
- submit : true,
- reset : true
- }) {
- Expr.pseudos[i] = createButtonPseudo(i);
- }
- setFilters.prototype = Expr.filters = Expr.pseudos;
- Expr.setFilters = new setFilters;
- /** @type {function (string, boolean): ?} */
- tokenize = Sizzle.tokenize = function(selector, parseOnly) {
- var matched;
- var match;
- var tokens;
- var type;
- var soFar;
- var groups;
- var preFilters;
- var cached = tokenCache[selector + " "];
- if (cached) {
- return parseOnly ? 0 : cached.slice(0);
- }
- /** @type {string} */
- soFar = selector;
- /** @type {Array} */
- groups = [];
- preFilters = Expr.preFilter;
- for (;soFar;) {
- if (!(matched && !(match = rcomma.exec(soFar)))) {
- if (match) {
- soFar = soFar.slice(match[0].length) || soFar;
- }
- groups.push(tokens = []);
- }
- /** @type {boolean} */
- matched = false;
- if (match = rcombinators.exec(soFar)) {
- /** @type {string} */
- matched = match.shift();
- tokens.push({
- value : matched,
- type : match[0].replace(rtrim, " ")
- });
- soFar = soFar.slice(matched.length);
- }
- for (type in Expr.filter) {
- if (!!(match = matchExpr[type].exec(soFar))) {
- if (!(preFilters[type] && !(match = preFilters[type](match)))) {
- matched = match.shift();
- tokens.push({
- value : matched,
- type : type,
- matches : match
- });
- soFar = soFar.slice(matched.length);
- }
- }
- }
- if (!matched) {
- break;
- }
- }
- return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : tokenCache(selector, groups).slice(0);
- };
- return compile = Sizzle.compile = function(selector, group) {
- var i;
- /** @type {Array} */
- var setMatchers = [];
- /** @type {Array} */
- var elementMatchers = [];
- var cached = compilerCache[selector + " "];
- if (!cached) {
- if (!group) {
- group = tokenize(selector);
- }
- i = group.length;
- for (;i--;) {
- cached = matcherFromTokens(group[i]);
- if (cached[expando]) {
- setMatchers.push(cached);
- } else {
- elementMatchers.push(cached);
- }
- }
- cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers));
- /** @type {string} */
- cached.selector = selector;
- }
- return cached;
- }, select = Sizzle.select = function(selector, context, results, seed) {
- var i;
- var tokens;
- var token;
- var type;
- var find;
- /** @type {(Function|boolean)} */
- var compiled = "function" == typeof selector && selector;
- var match = !seed && tokenize(selector = compiled.selector || selector);
- if (results = results || [], 1 === match.length) {
- if (tokens = match[0] = match[0].slice(0), tokens.length > 2 && ("ID" === (token = tokens[0]).type && (9 === context.nodeType && (documentIsHTML && Expr.relative[tokens[1].type])))) {
- if (context = (Expr.find.ID(token.matches[0].replace(runescape, funescape), context) || [])[0], !context) {
- return results;
- }
- if (compiled) {
- context = context.parentNode;
- }
- selector = selector.slice(tokens.shift().value.length);
- }
- i = matchExpr.needsContext.test(selector) ? 0 : tokens.length;
- for (;i--;) {
- if (token = tokens[i], Expr.relative[type = token.type]) {
- break;
- }
- if ((find = Expr.find[type]) && (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context))) {
- if (tokens.splice(i, 1), selector = seed.length && toSelector(tokens), !selector) {
- return push.apply(results, seed), results;
- }
- break;
- }
- }
- }
- return(compiled || compile(selector, match))(seed, context, !documentIsHTML, results, !context || (rsibling.test(selector) && testContext(context.parentNode) || context)), results;
- }, support.sortStable = expando.split("").sort(sortOrder).join("") === expando, support.detectDuplicates = !!l, setDocument(), support.sortDetached = assert(function(a) {
- return 1 & a.compareDocumentPosition(doc.createElement("fieldset"));
- }), assert(function(div) {
- return div.innerHTML = "<a href='#'></a>", "#" === div.firstChild.getAttribute("href");
- }) || addHandle("type|href|height|width", function(source, dest, dataAndEvents) {
- if (!dataAndEvents) {
- return source.getAttribute(dest, "type" === dest.toLowerCase() ? 1 : 2);
- }
- }), support.attributes && assert(function(div) {
- return div.innerHTML = "<input/>", div.firstChild.setAttribute("value", ""), "" === div.firstChild.getAttribute("value");
- }) || addHandle("value", function(target, deepDataAndEvents, dataAndEvents) {
- if (!dataAndEvents && "input" === target.nodeName.toLowerCase()) {
- return target.defaultValue;
- }
- }), assert(function(div) {
- return null == div.getAttribute("disabled");
- }) || addHandle(booleans, function(elem, name, dataAndEvents) {
- var val;
- if (!dataAndEvents) {
- return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
- }
- }), Sizzle;
- }(win);
- jQuery.find = Sizzle;
- jQuery.expr = Sizzle.selectors;
- jQuery.expr[":"] = jQuery.expr.pseudos;
- jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
- jQuery.text = Sizzle.getText;
- jQuery.isXMLDoc = Sizzle.isXML;
- jQuery.contains = Sizzle.contains;
- jQuery.escapeSelector = Sizzle.escape;
- /**
- * @param {Object} elem
- * @param {string} dir
- * @param {(Object|string)} until
- * @return {?}
- */
- var dir = function(elem, dir, until) {
- /** @type {Array} */
- var matched = [];
- /** @type {boolean} */
- var truncate = void 0 !== until;
- for (;(elem = elem[dir]) && 9 !== elem.nodeType;) {
- if (1 === elem.nodeType) {
- if (truncate && jQuery(elem).is(until)) {
- break;
- }
- matched.push(elem);
- }
- }
- return matched;
- };
- /**
- * @param {(Array|Element)} n
- * @param {(Node|string)} elem
- * @return {?}
- */
- var sibling = function(n, elem) {
- /** @type {Array} */
- var r = [];
- for (;n;n = n.nextSibling) {
- if (1 === n.nodeType) {
- if (n !== elem) {
- r.push(n);
- }
- }
- }
- return r;
- };
- var rneedsContext = jQuery.expr.match.needsContext;
- /** @type {RegExp} */
- var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
- /** @type {RegExp} */
- var isSimple = /^.[^:#\[\.,]*$/;
- /**
- * @param {Function} expr
- * @param {string} elems
- * @param {boolean} not
- * @return {?}
- */
- jQuery.filter = function(expr, elems, not) {
- var elem = elems[0];
- return not && (expr = ":not(" + expr + ")"), 1 === elems.length && 1 === elem.nodeType ? jQuery.find.matchesSelector(elem, expr) ? [elem] : [] : jQuery.find.matches(expr, jQuery.grep(elems, function(dest) {
- return 1 === dest.nodeType;
- }));
- };
- jQuery.fn.extend({
- /**
- * @param {Object} sel
- * @return {?}
- */
- find : function(sel) {
- var i;
- var ret;
- var len = this.length;
- var self = this;
- if ("string" != typeof sel) {
- return this.pushStack(jQuery(sel).filter(function() {
- /** @type {number} */
- i = 0;
- for (;i < len;i++) {
- if (jQuery.contains(self[i], this)) {
- return true;
- }
- }
- }));
- }
- ret = this.pushStack([]);
- /** @type {number} */
- i = 0;
- for (;i < len;i++) {
- jQuery.find(sel, self[i], ret);
- }
- return len > 1 ? jQuery.uniqueSort(ret) : ret;
- },
- /**
- * @param {Function} selector
- * @return {?}
- */
- filter : function(selector) {
- return this.pushStack(winnow(this, selector || [], false));
- },
- /**
- * @param {Array} selector
- * @return {?}
- */
- not : function(selector) {
- return this.pushStack(winnow(this, selector || [], true));
- },
- /**
- * @param {Object} selector
- * @return {?}
- */
- is : function(selector) {
- return!!winnow(this, "string" == typeof selector && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false).length;
- }
- });
- var object;
- /** @type {RegExp} */
- var rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;
- /** @type {function (Object, Object, (Object|string)): ?} */
- var init = jQuery.fn.init = function(selector, context, rootjQuery) {
- var match;
- var length;
- if (!selector) {
- return this;
- }
- if (rootjQuery = rootjQuery || object, "string" == typeof selector) {
- if (match = "<" === selector[0] && (">" === selector[selector.length - 1] && selector.length >= 3) ? [null, selector, null] : rquickExpr.exec(selector), !match || !match[1] && context) {
- return!context || context.jquery ? (context || rootjQuery).find(selector) : this.constructor(context).find(selector);
- }
- if (match[1]) {
- if (context = context instanceof jQuery ? context[0] : context, jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : doc, true)), rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
- for (match in context) {
- if (jQuery.isFunction(this[match])) {
- this[match](context[match]);
- } else {
- this.attr(match, context[match]);
- }
- }
- }
- return this;
- }
- return length = doc.getElementById(match[2]), length && (this[0] = length, this.length = 1), this;
- }
- return selector.nodeType ? (this[0] = selector, this.length = 1, this) : jQuery.isFunction(selector) ? void 0 !== rootjQuery.ready ? rootjQuery.ready(selector) : selector(jQuery) : jQuery.makeArray(selector, this);
- };
- init.prototype = jQuery.fn;
- object = jQuery(doc);
- /** @type {RegExp} */
- var rparentsprev = /^(?:parents|prev(?:Until|All))/;
- var guaranteedUnique = {
- children : true,
- contents : true,
- next : true,
- prev : true
- };
- jQuery.fn.extend({
- /**
- * @param {Object} target
- * @return {?}
- */
- has : function(target) {
- var targets = jQuery(target, this);
- var l = targets.length;
- return this.filter(function() {
- /** @type {number} */
- var i = 0;
- for (;i < l;i++) {
- if (jQuery.contains(this, targets[i])) {
- return true;
- }
- }
- });
- },
- /**
- * @param {Object} selectors
- * @param {string} context
- * @return {?}
- */
- closest : function(selectors, context) {
- var cur;
- /** @type {number} */
- var i = 0;
- var l = this.length;
- /** @type {Array} */
- var matched = [];
- var pos = "string" != typeof selectors && jQuery(selectors);
- if (!rneedsContext.test(selectors)) {
- for (;i < l;i++) {
- cur = this[i];
- for (;cur && cur !== context;cur = cur.parentNode) {
- if (cur.nodeType < 11 && (pos ? pos.index(cur) > -1 : 1 === cur.nodeType && jQuery.find.matchesSelector(cur, selectors))) {
- matched.push(cur);
- break;
- }
- }
- }
- }
- return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched);
- },
- /**
- * @param {boolean} elem
- * @return {?}
- */
- index : function(elem) {
- return elem ? "string" == typeof elem ? core_indexOf.call(jQuery(elem), this[0]) : core_indexOf.call(this, elem.jquery ? elem[0] : elem) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
- },
- /**
- * @param {Function} selector
- * @param {Object} context
- * @return {?}
- */
- add : function(selector, context) {
- return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(), jQuery(selector, context))));
- },
- /**
- * @param {Object} selector
- * @return {?}
- */
- addBack : function(selector) {
- return this.add(null == selector ? this.prevObject : this.prevObject.filter(selector));
- }
- });
- jQuery.each({
- /**
- * @param {Node} elem
- * @return {?}
- */
- parent : function(elem) {
- var parent = elem.parentNode;
- return parent && 11 !== parent.nodeType ? parent : null;
- },
- /**
- * @param {Object} elem
- * @return {?}
- */
- parents : function(elem) {
- return dir(elem, "parentNode");
- },
- /**
- * @param {Object} elem
- * @param {?} i
- * @param {(Object|string)} until
- * @return {?}
- */
- parentsUntil : function(elem, i, until) {
- return dir(elem, "parentNode", until);
- },
- /**
- * @param {Object} elem
- * @return {?}
- */
- next : function(elem) {
- return _singleSibling(elem, "nextSibling");
- },
- /**
- * @param {Object} elem
- * @return {?}
- */
- prev : function(elem) {
- return _singleSibling(elem, "previousSibling");
- },
- /**
- * @param {Object} elem
- * @return {?}
- */
- nextAll : function(elem) {
- return dir(elem, "nextSibling");
- },
- /**
- * @param {Object} elem
- * @return {?}
- */
- prevAll : function(elem) {
- return dir(elem, "previousSibling");
- },
- /**
- * @param {Object} elem
- * @param {?} i
- * @param {(Object|string)} until
- * @return {?}
- */
- nextUntil : function(elem, i, until) {
- return dir(elem, "nextSibling", until);
- },
- /**
- * @param {Object} elem
- * @param {?} i
- * @param {(Object|string)} until
- * @return {?}
- */
- prevUntil : function(elem, i, until) {
- return dir(elem, "previousSibling", until);
- },
- /**
- * @param {Node} elem
- * @return {?}
- */
- siblings : function(elem) {
- return sibling((elem.parentNode || {}).firstChild, elem);
- },
- /**
- * @param {Element} node
- * @return {?}
- */
- children : function(node) {
- return sibling(node.firstChild);
- },
- /**
- * @param {Element} elem
- * @return {?}
- */
- contents : function(elem) {
- return elem.contentDocument || jQuery.merge([], elem.childNodes);
- }
- }, function(name, fn) {
- /**
- * @param {?} until
- * @param {?} selector
- * @return {?}
- */
- jQuery.fn[name] = function(until, selector) {
- var matched = jQuery.map(this, fn, until);
- return "Until" !== name.slice(-5) && (selector = until), selector && ("string" == typeof selector && (matched = jQuery.filter(selector, matched))), this.length > 1 && (guaranteedUnique[name] || jQuery.uniqueSort(matched), rparentsprev.test(name) && matched.reverse()), this.pushStack(matched);
- };
- });
- /** @type {RegExp} */
- var core_rnotwhite = /[^\x20\t\r\n\f]+/g;
- /**
- * @param {string} options
- * @return {?}
- */
- jQuery.Callbacks = function(options) {
- options = "string" == typeof options ? createOptions(options) : jQuery.extend({}, options);
- var memory;
- var data;
- var stack;
- var image;
- /** @type {Array} */
- var list = [];
- /** @type {Array} */
- var messages = [];
- /** @type {number} */
- var count = -1;
- /**
- * @return {undefined}
- */
- var fire = function() {
- image = options.once;
- /** @type {boolean} */
- stack = memory = true;
- for (;messages.length;count = -1) {
- data = messages.shift();
- for (;++count < list.length;) {
- if (list[count].apply(data[0], data[1]) === false) {
- if (options.stopOnFalse) {
- count = list.length;
- /** @type {boolean} */
- data = false;
- }
- }
- }
- }
- if (!options.memory) {
- /** @type {boolean} */
- data = false;
- }
- /** @type {boolean} */
- memory = false;
- if (image) {
- /** @type {(Array|string)} */
- list = data ? [] : "";
- }
- };
- var self = {
- /**
- * @return {?}
- */
- add : function() {
- return list && (data && (!memory && (count = list.length - 1, messages.push(data))), function add(args) {
- jQuery.each(args, function(dataAndEvents, arg) {
- if (jQuery.isFunction(arg)) {
- if (!(options.unique && self.has(arg))) {
- list.push(arg);
- }
- } else {
- if (arg) {
- if (arg.length) {
- if ("string" !== jQuery.type(arg)) {
- add(arg);
- }
- }
- }
- }
- });
- }(arguments), data && (!memory && fire())), this;
- },
- /**
- * @return {?}
- */
- remove : function() {
- return jQuery.each(arguments, function(dataAndEvents, arg) {
- var index;
- for (;(index = jQuery.inArray(arg, list, index)) > -1;) {
- list.splice(index, 1);
- if (index <= count) {
- count--;
- }
- }
- }), this;
- },
- /**
- * @param {string} fn
- * @return {?}
- */
- has : function(fn) {
- return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0;
- },
- /**
- * @return {?}
- */
- empty : function() {
- return list && (list = []), this;
- },
- /**
- * @return {?}
- */
- disable : function() {
- return image = messages = [], list = data = "", this;
- },
- /**
- * @return {?}
- */
- disabled : function() {
- return!list;
- },
- /**
- * @return {?}
- */
- lock : function() {
- return image = messages = [], data || (memory || (list = data = "")), this;
- },
- /**
- * @return {?}
- */
- locked : function() {
- return!!image;
- },
- /**
- * @param {?} context
- * @param {Array} args
- * @return {?}
- */
- fireWith : function(context, args) {
- return image || (args = args || [], args = [context, args.slice ? args.slice() : args], messages.push(args), memory || fire()), this;
- },
- /**
- * @return {?}
- */
- fire : function() {
- return self.fireWith(this, arguments), this;
- },
- /**
- * @return {?}
- */
- fired : function() {
- return!!stack;
- }
- };
- return self;
- };
- jQuery.extend({
- /**
- * @param {Function} func
- * @return {?}
- */
- Deferred : function(func) {
- /** @type {Array} */
- var which = [["notify", "progress", jQuery.Callbacks("memory"), jQuery.Callbacks("memory"), 2], ["resolve", "done", jQuery.Callbacks("once memory"), jQuery.Callbacks("once memory"), 0, "resolved"], ["reject", "fail", jQuery.Callbacks("once memory"), jQuery.Callbacks("once memory"), 1, "rejected"]];
- /** @type {string} */
- var state = "pending";
- var promise = {
- /**
- * @return {?}
- */
- state : function() {
- return state;
- },
- /**
- * @return {?}
- */
- always : function() {
- return deferred.done(arguments).fail(arguments), this;
- },
- /**
- * @param {string} error
- * @return {?}
- */
- "catch" : function(error) {
- return promise.then(null, error);
- },
- /**
- * @return {?}
- */
- pipe : function() {
- /** @type {Arguments} */
- var fns = arguments;
- return jQuery.Deferred(function(newDefer) {
- jQuery.each(which, function(dataAndEvents, tuple) {
- var fn = jQuery.isFunction(fns[tuple[4]]) && fns[tuple[4]];
- deferred[tuple[1]](function() {
- var returned = fn && fn.apply(this, arguments);
- if (returned && jQuery.isFunction(returned.promise)) {
- returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);
- } else {
- newDefer[tuple[0] + "With"](this, fn ? [returned] : arguments);
- }
- });
- });
- /** @type {null} */
- fns = null;
- }).promise();
- },
- /**
- * @param {Function} value
- * @param {string} html
- * @param {Function} qualifier
- * @return {?}
- */
- then : function(value, html, qualifier) {
- /**
- * @param {number} s
- * @param {?} key
- * @param {Function} start
- * @param {boolean} type
- * @return {?}
- */
- function fn(s, key, start, type) {
- return function() {
- var self = this;
- /** @type {Arguments} */
- var args = arguments;
- /**
- * @return {undefined}
- */
- var invoke = function() {
- var a;
- var value;
- if (!(s < e)) {
- if (a = start.apply(self, args), a === key.promise()) {
- throw new TypeError("Thenable self-resolution");
- }
- value = a && (("object" == typeof a || "function" == typeof a) && a.then);
- if (jQuery.isFunction(value)) {
- if (type) {
- value.call(a, fn(e, key, index, type), fn(e, key, i, type));
- } else {
- e++;
- value.call(a, fn(e, key, index, type), fn(e, key, i, type), fn(e, key, index, key.notifyWith));
- }
- } else {
- if (start !== index) {
- self = void 0;
- /** @type {Array} */
- args = [a];
- }
- (type || key.resolveWith)(self, args);
- }
- }
- };
- /** @type {function (): undefined} */
- var close = type ? invoke : function() {
- try {
- invoke();
- } catch (context) {
- if (jQuery.Deferred.exceptionHook) {
- jQuery.Deferred.exceptionHook(context, close.stackTrace);
- }
- if (s + 1 >= e) {
- if (start !== i) {
- self = void 0;
- /** @type {Array} */
- args = [context];
- }
- key.rejectWith(self, args);
- }
- }
- };
- if (s) {
- close();
- } else {
- if (jQuery.Deferred.getStackHook) {
- close.stackTrace = jQuery.Deferred.getStackHook();
- }
- win.setTimeout(close);
- }
- };
- }
- /** @type {number} */
- var e = 0;
- return jQuery.Deferred(function(type) {
- which[0][3].add(fn(0, type, jQuery.isFunction(qualifier) ? qualifier : index, type.notifyWith));
- which[1][3].add(fn(0, type, jQuery.isFunction(value) ? value : index));
- which[2][3].add(fn(0, type, jQuery.isFunction(html) ? html : i));
- }).promise();
- },
- /**
- * @param {string} obj
- * @return {?}
- */
- promise : function(obj) {
- return null != obj ? jQuery.extend(obj, promise) : promise;
- }
- };
- var deferred = {};
- return jQuery.each(which, function(dataAndEvents, tuple) {
- var list = tuple[2];
- var stateString = tuple[5];
- promise[tuple[1]] = list.add;
- if (stateString) {
- list.add(function() {
- state = stateString;
- }, which[3 - dataAndEvents][2].disable, which[0][2].lock);
- }
- list.add(tuple[3].fire);
- /**
- * @return {?}
- */
- deferred[tuple[0]] = function() {
- return deferred[tuple[0] + "With"](this === deferred ? void 0 : this, arguments), this;
- };
- deferred[tuple[0] + "With"] = list.fireWith;
- }), promise.promise(deferred), func && func.call(deferred, deferred), deferred;
- },
- /**
- * @param {?} path
- * @return {?}
- */
- when : function(path) {
- /** @type {number} */
- var len = arguments.length;
- var i = len;
- /** @type {Array} */
- var result = Array(i);
- /** @type {Array.<?>} */
- var args = core_slice.call(arguments);
- var d = jQuery.Deferred();
- /**
- * @param {number} i
- * @return {?}
- */
- var updateFunc = function(i) {
- return function(value) {
- result[i] = this;
- args[i] = arguments.length > 1 ? core_slice.call(arguments) : value;
- if (!--len) {
- d.resolveWith(result, args);
- }
- };
- };
- if (len <= 1 && (require(path, d.done(updateFunc(i)).resolve, d.reject), "pending" === d.state() || jQuery.isFunction(args[i] && args[i].then))) {
- return d.then();
- }
- for (;i--;) {
- require(args[i], updateFunc(i), d.reject);
- }
- return d.promise();
- }
- });
- /** @type {RegExp} */
- var rinlinejQuery = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
- /**
- * @param {(Error|string)} e
- * @param {?} err
- * @return {undefined}
- */
- jQuery.Deferred.exceptionHook = function(e, err) {
- if (win.console) {
- if (win.console.warn) {
- if (e) {
- if (rinlinejQuery.test(e.name)) {
- win.console.warn("jQuery.Deferred exception: " + e.message, e.stack, err);
- }
- }
- }
- }
- };
- /**
- * @param {?} dataAndEvents
- * @return {undefined}
- */
- jQuery.readyException = function(dataAndEvents) {
- win.setTimeout(function() {
- throw dataAndEvents;
- });
- };
- var promise = jQuery.Deferred();
- /**
- * @param {Object} func
- * @return {?}
- */
- jQuery.fn.ready = function(func) {
- return promise.then(func)["catch"](function(node) {
- jQuery.readyException(node);
- }), this;
- };
- jQuery.extend({
- isReady : false,
- readyWait : 1,
- /**
- * @param {?} hold
- * @return {undefined}
- */
- holdReady : function(hold) {
- if (hold) {
- jQuery.readyWait++;
- } else {
- jQuery.ready(true);
- }
- },
- /**
- * @param {boolean} wait
- * @return {undefined}
- */
- ready : function(wait) {
- if (!(wait === true ? --jQuery.readyWait : jQuery.isReady)) {
- /** @type {boolean} */
- jQuery.isReady = true;
- if (!(wait !== true && --jQuery.readyWait > 0)) {
- promise.resolveWith(doc, [jQuery]);
- }
- }
- }
- });
- jQuery.ready.then = promise.then;
- if ("complete" === doc.readyState || "loading" !== doc.readyState && !doc.documentElement.doScroll) {
- win.setTimeout(jQuery.ready);
- } else {
- doc.addEventListener("DOMContentLoaded", completed);
- win.addEventListener("load", completed);
- }
- /**
- * @param {Object} elems
- * @param {Function} fn
- * @param {Object} key
- * @param {string} value
- * @param {boolean} chainable
- * @param {string} emptyGet
- * @param {boolean} raw
- * @return {?}
- */
- var access = function(elems, fn, key, value, chainable, emptyGet, raw) {
- /** @type {number} */
- var i = 0;
- var length = elems.length;
- /** @type {boolean} */
- var bulk = null == key;
- if ("object" === jQuery.type(key)) {
- /** @type {boolean} */
- chainable = true;
- for (i in key) {
- access(elems, fn, i, key[i], true, emptyGet, raw);
- }
- } else {
- if (void 0 !== value && (chainable = true, jQuery.isFunction(value) || (raw = true), bulk && (raw ? (fn.call(elems, value), fn = null) : (bulk = fn, fn = function(elem, event, value) {
- return bulk.call(jQuery(elem), value);
- })), fn)) {
- for (;i < length;i++) {
- fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)));
- }
- }
- }
- return chainable ? elems : bulk ? fn.call(elems) : length ? fn(elems[0], key) : emptyGet;
- };
- /**
- * @param {Object} elem
- * @return {?}
- */
- var next = function(elem) {
- return 1 === elem.nodeType || (9 === elem.nodeType || !+elem.nodeType);
- };
- /** @type {number} */
- Data.uid = 1;
- Data.prototype = {
- /**
- * @param {Object} owner
- * @return {?}
- */
- cache : function(owner) {
- var unlock = owner[this.expando];
- return unlock || (unlock = {}, next(owner) && (owner.nodeType ? owner[this.expando] = unlock : Object.defineProperty(owner, this.expando, {
- value : unlock,
- configurable : true
- }))), unlock;
- },
- /**
- * @param {Object} owner
- * @param {string} data
- * @param {string} value
- * @return {?}
- */
- set : function(owner, data, value) {
- var key;
- var values = this.cache(owner);
- if ("string" == typeof data) {
- /** @type {string} */
- values[jQuery.camelCase(data)] = value;
- } else {
- for (key in data) {
- values[jQuery.camelCase(key)] = data[key];
- }
- }
- return values;
- },
- /**
- * @param {Object} owner
- * @param {string} key
- * @return {?}
- */
- get : function(owner, key) {
- return void 0 === key ? this.cache(owner) : owner[this.expando] && owner[this.expando][jQuery.camelCase(key)];
- },
- /**
- * @param {Object} owner
- * @param {Object} key
- * @param {number} value
- * @return {?}
- */
- access : function(owner, key, value) {
- return void 0 === key || key && ("string" == typeof key && void 0 === value) ? this.get(owner, key) : (this.set(owner, key, value), void 0 !== value ? value : key);
- },
- /**
- * @param {Object} owner
- * @param {Object} key
- * @return {undefined}
- */
- remove : function(owner, key) {
- var i;
- var cache = owner[this.expando];
- if (void 0 !== cache) {
- if (void 0 !== key) {
- if (jQuery.isArray(key)) {
- key = key.map(jQuery.camelCase);
- } else {
- key = jQuery.camelCase(key);
- key = key in cache ? [key] : key.match(core_rnotwhite) || [];
- }
- i = key.length;
- for (;i--;) {
- delete cache[key[i]];
- }
- }
- if (void 0 === key || jQuery.isEmptyObject(cache)) {
- if (owner.nodeType) {
- owner[this.expando] = void 0;
- } else {
- delete owner[this.expando];
- }
- }
- }
- },
- /**
- * @param {Object} owner
- * @return {?}
- */
- hasData : function(owner) {
- var cache = owner[this.expando];
- return void 0 !== cache && !jQuery.isEmptyObject(cache);
- }
- };
- var data_priv = new Data;
- var data_user = new Data;
- /** @type {RegExp} */
- var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;
- /** @type {RegExp} */
- var r20 = /[A-Z]/g;
- jQuery.extend({
- /**
- * @param {Object} elem
- * @return {?}
- */
- hasData : function(elem) {
- return data_user.hasData(elem) || data_priv.hasData(elem);
- },
- /**
- * @param {string} elem
- * @param {number} name
- * @param {number} data
- * @return {?}
- */
- data : function(elem, name, data) {
- return data_user.access(elem, name, data);
- },
- /**
- * @param {Object} elem
- * @param {Object} name
- * @return {undefined}
- */
- removeData : function(elem, name) {
- data_user.remove(elem, name);
- },
- /**
- * @param {Object} src
- * @param {Object} name
- * @param {number} data
- * @return {?}
- */
- _data : function(src, name, data) {
- return data_priv.access(src, name, data);
- },
- /**
- * @param {Object} elem
- * @param {Object} name
- * @return {undefined}
- */
- _removeData : function(elem, name) {
- data_priv.remove(elem, name);
- }
- });
- jQuery.fn.extend({
- /**
- * @param {string} key
- * @param {(number|string)} value
- * @return {?}
- */
- data : function(key, value) {
- var len;
- var name;
- var data;
- var elem = this[0];
- var attrs = elem && elem.attributes;
- if (void 0 === key) {
- if (this.length && (data = data_user.get(elem), 1 === elem.nodeType && !data_priv.get(elem, "hasDataAttrs"))) {
- len = attrs.length;
- for (;len--;) {
- if (attrs[len]) {
- name = attrs[len].name;
- if (0 === name.indexOf("data-")) {
- name = jQuery.camelCase(name.slice(5));
- dataAttr(elem, name, data[name]);
- }
- }
- }
- data_priv.set(elem, "hasDataAttrs", true);
- }
- return data;
- }
- return "object" == typeof key ? this.each(function() {
- data_user.set(this, key);
- }) : access(this, function(value) {
- var data;
- if (elem && void 0 === value) {
- if (data = data_user.get(elem, key), void 0 !== data) {
- return data;
- }
- if (data = dataAttr(elem, key), void 0 !== data) {
- return data;
- }
- } else {
- this.each(function() {
- data_user.set(this, key, value);
- });
- }
- }, null, value, arguments.length > 1, null, true);
- },
- /**
- * @param {Object} name
- * @return {?}
- */
- removeData : function(name) {
- return this.each(function() {
- data_user.remove(this, name);
- });
- }
- });
- jQuery.extend({
- /**
- * @param {Object} elem
- * @param {string} type
- * @param {Object} data
- * @return {?}
- */
- queue : function(elem, type, data) {
- var queue;
- if (elem) {
- return type = (type || "fx") + "queue", queue = data_priv.get(elem, type), data && (!queue || jQuery.isArray(data) ? queue = data_priv.access(elem, type, jQuery.makeArray(data)) : queue.push(data)), queue || [];
- }
- },
- /**
- * @param {Object} elem
- * @param {string} type
- * @return {undefined}
- */
- dequeue : function(elem, type) {
- type = type || "fx";
- var queue = jQuery.queue(elem, type);
- var ln = queue.length;
- var fn = queue.shift();
- var hooks = jQuery._queueHooks(elem, type);
- /**
- * @return {undefined}
- */
- var next = function() {
- jQuery.dequeue(elem, type);
- };
- if ("inprogress" === fn) {
- fn = queue.shift();
- ln--;
- }
- if (fn) {
- if ("fx" === type) {
- queue.unshift("inprogress");
- }
- delete hooks.stop;
- fn.call(elem, next, hooks);
- }
- if (!ln) {
- if (hooks) {
- hooks.empty.fire();
- }
- }
- },
- /**
- * @param {Object} elem
- * @param {string} type
- * @return {?}
- */
- _queueHooks : function(elem, type) {
- /** @type {string} */
- var key = type + "queueHooks";
- return data_priv.get(elem, key) || data_priv.access(elem, key, {
- empty : jQuery.Callbacks("once memory").add(function() {
- data_priv.remove(elem, [type + "queue", key]);
- })
- });
- }
- });
- jQuery.fn.extend({
- /**
- * @param {Object} type
- * @param {Object} data
- * @return {?}
- */
- queue : function(type, data) {
- /** @type {number} */
- var setter = 2;
- return "string" != typeof type && (data = type, type = "fx", setter--), arguments.length < setter ? jQuery.queue(this[0], type) : void 0 === data ? this : this.each(function() {
- var queue = jQuery.queue(this, type, data);
- jQuery._queueHooks(this, type);
- if ("fx" === type) {
- if ("inprogress" !== queue[0]) {
- jQuery.dequeue(this, type);
- }
- }
- });
- },
- /**
- * @param {string} type
- * @return {?}
- */
- dequeue : function(type) {
- return this.each(function() {
- jQuery.dequeue(this, type);
- });
- },
- /**
- * @param {string} type
- * @return {?}
- */
- clearQueue : function(type) {
- return this.queue(type || "fx", []);
- },
- /**
- * @param {string} type
- * @param {string} obj
- * @return {?}
- */
- promise : function(type, obj) {
- var body;
- /** @type {number} */
- var d = 1;
- var defer = jQuery.Deferred();
- var elements = this;
- var i = this.length;
- /**
- * @return {undefined}
- */
- var resolve = function() {
- if (!--d) {
- defer.resolveWith(elements, [elements]);
- }
- };
- if ("string" != typeof type) {
- /** @type {string} */
- obj = type;
- type = void 0;
- }
- type = type || "fx";
- for (;i--;) {
- body = data_priv.get(elements[i], type + "queueHooks");
- if (body) {
- if (body.empty) {
- d++;
- body.empty.add(resolve);
- }
- }
- }
- return resolve(), defer.promise(obj);
- }
- });
- /** @type {string} */
- var core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;
- /** @type {RegExp} */
- var regexp = new RegExp("^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i");
- /** @type {Array} */
- var cssExpand = ["Top", "Right", "Bottom", "Left"];
- /**
- * @param {Object} node
- * @param {Function} context
- * @return {?}
- */
- var isHidden = function(node, context) {
- return node = context || node, "none" === node.style.display || "" === node.style.display && (jQuery.contains(node.ownerDocument, node) && "none" === jQuery.css(node, "display"));
- };
- /**
- * @param {Object} elem
- * @param {Object} options
- * @param {Function} callback
- * @param {Array} args
- * @return {?}
- */
- var swap = function(elem, options, callback, args) {
- var ret;
- var name;
- var old = {};
- for (name in options) {
- old[name] = elem.style[name];
- elem.style[name] = options[name];
- }
- ret = callback.apply(elem, args || []);
- for (name in options) {
- elem.style[name] = old[name];
- }
- return ret;
- };
- var _elm_display = {};
- jQuery.fn.extend({
- /**
- * @return {?}
- */
- show : function() {
- return showHide(this, true);
- },
- /**
- * @return {?}
- */
- hide : function() {
- return showHide(this);
- },
- /**
- * @param {?} state
- * @return {?}
- */
- toggle : function(state) {
- return "boolean" == typeof state ? state ? this.show() : this.hide() : this.each(function() {
- if (isHidden(this)) {
- jQuery(this).show();
- } else {
- jQuery(this).hide();
- }
- });
- }
- });
- /** @type {RegExp} */
- var manipulation_rcheckableType = /^(?:checkbox|radio)$/i;
- /** @type {RegExp} */
- var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]+)/i;
- /** @type {RegExp} */
- var rchecked = /^$|\/(?:java|ecma)script/i;
- var wrapMap = {
- option : [1, "<select multiple='multiple'>", "</select>"],
- thead : [1, "<table>", "</table>"],
- col : [2, "<table><colgroup>", "</colgroup></table>"],
- tr : [2, "<table><tbody>", "</tbody></table>"],
- td : [3, "<table><tbody><tr>", "</tr></tbody></table>"],
- _default : [0, "", ""]
- };
- /** @type {Array} */
- wrapMap.optgroup = wrapMap.option;
- /** @type {Array} */
- wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
- /** @type {Array} */
- wrapMap.th = wrapMap.td;
- /** @type {RegExp} */
- var rhtml = /<|&#?\w+;/;
- !function() {
- var fragment = doc.createDocumentFragment();
- var form = fragment.appendChild(doc.createElement("div"));
- var input = doc.createElement("input");
- input.setAttribute("type", "radio");
- input.setAttribute("checked", "checked");
- input.setAttribute("name", "t");
- form.appendChild(input);
- support.checkClone = form.cloneNode(true).cloneNode(true).lastChild.checked;
- /** @type {string} */
- form.innerHTML = "<textarea>x</textarea>";
- /** @type {boolean} */
- support.noCloneChecked = !!form.cloneNode(true).lastChild.defaultValue;
- }();
- var docElem = doc.documentElement;
- /** @type {RegExp} */
- var RE_INPUT_CHECKABLE_TYPES = /^key/;
- /** @type {RegExp} */
- var evt = /^(?:mouse|pointer|contextmenu|drag|drop)|click/;
- /** @type {RegExp} */
- var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
- jQuery.event = {
- global : {},
- /**
- * @param {Object} elem
- * @param {Object} types
- * @param {Function} handler
- * @param {Object} e
- * @param {Object} selector
- * @return {undefined}
- */
- add : function(elem, types, handler, e, selector) {
- var handleObjIn;
- var eventHandle;
- var segmentMatch;
- var events;
- var t;
- var handleObj;
- var special;
- var handlers;
- var type;
- var namespaces;
- var origType;
- var elemData = data_priv.get(elem);
- if (elemData) {
- if (handler.handler) {
- /** @type {Function} */
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
- if (selector) {
- jQuery.find.matchesSelector(docElem, selector);
- }
- if (!handler.guid) {
- /** @type {number} */
- handler.guid = jQuery.guid++;
- }
- if (!(events = elemData.events)) {
- events = elemData.events = {};
- }
- if (!(eventHandle = elemData.handle)) {
- /** @type {function (Event): ?} */
- eventHandle = elemData.handle = function(e) {
- return "undefined" != typeof jQuery && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : void 0;
- };
- }
- types = (types || "").match(core_rnotwhite) || [""];
- t = types.length;
- for (;t--;) {
- /** @type {Array} */
- segmentMatch = rtypenamespace.exec(types[t]) || [];
- type = origType = segmentMatch[1];
- namespaces = (segmentMatch[2] || "").split(".").sort();
- if (type) {
- special = jQuery.event.special[type] || {};
- type = (selector ? special.delegateType : special.bindType) || type;
- special = jQuery.event.special[type] || {};
- handleObj = jQuery.extend({
- type : type,
- origType : origType,
- data : e,
- /** @type {Function} */
- handler : handler,
- guid : handler.guid,
- selector : selector,
- needsContext : selector && jQuery.expr.match.needsContext.test(selector),
- namespace : namespaces.join(".")
- }, handleObjIn);
- if (!(handlers = events[type])) {
- /** @type {Array} */
- handlers = events[type] = [];
- /** @type {number} */
- handlers.delegateCount = 0;
- if (!(special.setup && special.setup.call(elem, e, namespaces, eventHandle) !== false)) {
- if (elem.addEventListener) {
- elem.addEventListener(type, eventHandle);
- }
- }
- }
- if (special.add) {
- special.add.call(elem, handleObj);
- if (!handleObj.handler.guid) {
- handleObj.handler.guid = handler.guid;
- }
- }
- if (selector) {
- handlers.splice(handlers.delegateCount++, 0, handleObj);
- } else {
- handlers.push(handleObj);
- }
- /** @type {boolean} */
- jQuery.event.global[type] = true;
- }
- }
- }
- },
- /**
- * @param {Object} elem
- * @param {Object} types
- * @param {Function} handler
- * @param {boolean} selector
- * @param {boolean} keepData
- * @return {undefined}
- */
- remove : function(elem, types, handler, selector, keepData) {
- var j;
- var origCount;
- var tmp;
- var events;
- var t;
- var handleObj;
- var special;
- var handlers;
- var type;
- var namespaces;
- var origType;
- var elemData = data_priv.hasData(elem) && data_priv.get(elem);
- if (elemData && (events = elemData.events)) {
- types = (types || "").match(core_rnotwhite) || [""];
- t = types.length;
- for (;t--;) {
- if (tmp = rtypenamespace.exec(types[t]) || [], type = origType = tmp[1], namespaces = (tmp[2] || "").split(".").sort(), type) {
- special = jQuery.event.special[type] || {};
- type = (selector ? special.delegateType : special.bindType) || type;
- handlers = events[type] || [];
- tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
- origCount = j = handlers.length;
- for (;j--;) {
- handleObj = handlers[j];
- if (!(!keepData && origType !== handleObj.origType)) {
- if (!(handler && handler.guid !== handleObj.guid)) {
- if (!(tmp && !tmp.test(handleObj.namespace))) {
- if (!(selector && (selector !== handleObj.selector && ("**" !== selector || !handleObj.selector)))) {
- handlers.splice(j, 1);
- if (handleObj.selector) {
- handlers.delegateCount--;
- }
- if (special.remove) {
- special.remove.call(elem, handleObj);
- }
- }
- }
- }
- }
- }
- if (origCount) {
- if (!handlers.length) {
- if (!(special.teardown && special.teardown.call(elem, namespaces, elemData.handle) !== false)) {
- jQuery.removeEvent(elem, type, elemData.handle);
- }
- delete events[type];
- }
- }
- } else {
- for (type in events) {
- jQuery.event.remove(elem, type + types[t], handler, selector, true);
- }
- }
- }
- if (jQuery.isEmptyObject(events)) {
- data_priv.remove(elem, "handle events");
- }
- }
- },
- /**
- * @param {?} e
- * @return {?}
- */
- dispatch : function(e) {
- var event = jQuery.event.fix(e);
- var i;
- var j;
- var ret;
- var matched;
- var handleObj;
- var handlerQueue;
- /** @type {Array} */
- var args = new Array(arguments.length);
- var handlers = (data_priv.get(this, "events") || {})[event.type] || [];
- var special = jQuery.event.special[event.type] || {};
- args[0] = event;
- /** @type {number} */
- i = 1;
- for (;i < arguments.length;i++) {
- args[i] = arguments[i];
- }
- if (event.delegateTarget = this, !special.preDispatch || special.preDispatch.call(this, event) !== false) {
- handlerQueue = jQuery.event.handlers.call(this, event, handlers);
- /** @type {number} */
- i = 0;
- for (;(matched = handlerQueue[i++]) && !event.isPropagationStopped();) {
- event.currentTarget = matched.elem;
- /** @type {number} */
- j = 0;
- for (;(handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped();) {
- if (!(event.rnamespace && !event.rnamespace.test(handleObj.namespace))) {
- event.handleObj = handleObj;
- event.data = handleObj.data;
- ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);
- if (void 0 !== ret) {
- if ((event.result = ret) === false) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
- return special.postDispatch && special.postDispatch.call(this, event), event.result;
- }
- },
- /**
- * @param {Event} event
- * @param {Object} handlers
- * @return {?}
- */
- handlers : function(event, handlers) {
- var i;
- var handleObj;
- var sel;
- var matches;
- var selMatch;
- /** @type {Array} */
- var handlerQueue = [];
- var delegateCount = handlers.delegateCount;
- var cur = event.target;
- if (delegateCount && (cur.nodeType && !("click" === event.type && event.button >= 1))) {
- for (;cur !== this;cur = cur.parentNode || this) {
- if (1 === cur.nodeType && ("click" !== event.type || cur.disabled !== true)) {
- /** @type {Array} */
- matches = [];
- selMatch = {};
- /** @type {number} */
- i = 0;
- for (;i < delegateCount;i++) {
- handleObj = handlers[i];
- /** @type {string} */
- sel = handleObj.selector + " ";
- if (void 0 === selMatch[sel]) {
- selMatch[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length;
- }
- if (selMatch[sel]) {
- matches.push(handleObj);
- }
- }
- if (matches.length) {
- handlerQueue.push({
- elem : cur,
- handlers : matches
- });
- }
- }
- }
- }
- return cur = this, delegateCount < handlers.length && handlerQueue.push({
- elem : cur,
- handlers : handlers.slice(delegateCount)
- }), handlerQueue;
- },
- /**
- * @param {?} prop
- * @param {string} html
- * @return {undefined}
- */
- addProp : function(prop, html) {
- Object.defineProperty(jQuery.Event.prototype, prop, {
- enumerable : true,
- configurable : true,
- /** @type {function (): ?} */
- get : jQuery.isFunction(html) ? function() {
- if (this.originalEvent) {
- return html(this.originalEvent);
- }
- } : function() {
- if (this.originalEvent) {
- return this.originalEvent[prop];
- }
- },
- /**
- * @param {Object} elem
- * @return {undefined}
- */
- set : function(elem) {
- Object.defineProperty(this, prop, {
- enumerable : true,
- configurable : true,
- writable : true,
- value : elem
- });
- }
- });
- },
- /**
- * @param {?} event
- * @return {?}
- */
- fix : function(event) {
- return event[jQuery.expando] ? event : new jQuery.Event(event);
- },
- special : {
- load : {
- noBubble : true
- },
- focus : {
- /**
- * @return {?}
- */
- trigger : function() {
- if (this !== safeActiveElement() && this.focus) {
- return this.focus(), false;
- }
- },
- delegateType : "focusin"
- },
- blur : {
- /**
- * @return {?}
- */
- trigger : function() {
- if (this === safeActiveElement() && this.blur) {
- return this.blur(), false;
- }
- },
- delegateType : "focusout"
- },
- click : {
- /**
- * @return {?}
- */
- trigger : function() {
- if ("checkbox" === this.type && (this.click && jQuery.nodeName(this, "input"))) {
- return this.click(), false;
- }
- },
- /**
- * @param {Event} event
- * @return {?}
- */
- _default : function(event) {
- return jQuery.nodeName(event.target, "a");
- }
- },
- beforeunload : {
- /**
- * @param {Object} event
- * @return {undefined}
- */
- postDispatch : function(event) {
- if (void 0 !== event.result) {
- if (event.originalEvent) {
- event.originalEvent.returnValue = event.result;
- }
- }
- }
- }
- }
- };
- /**
- * @param {Object} elem
- * @param {?} type
- * @param {?} handle
- * @return {undefined}
- */
- jQuery.removeEvent = function(elem, type, handle) {
- if (elem.removeEventListener) {
- elem.removeEventListener(type, handle);
- }
- };
- /**
- * @param {Object} src
- * @param {boolean} event
- * @return {?}
- */
- jQuery.Event = function(src, event) {
- return this instanceof jQuery.Event ? (src && src.type ? (this.originalEvent = src, this.type = src.type, this.isDefaultPrevented = src.defaultPrevented || void 0 === src.defaultPrevented && src.returnValue === false ? returnTrue : returnFalse, this.target = src.target && 3 === src.target.nodeType ? src.target.parentNode : src.target, this.currentTarget = src.currentTarget, this.relatedTarget = src.relatedTarget) : this.type = src, event && jQuery.extend(this, event), this.timeStamp = src &&
- src.timeStamp || jQuery.now(), void(this[jQuery.expando] = true)) : new jQuery.Event(src, event);
- };
- jQuery.Event.prototype = {
- /** @type {function (Object, boolean): ?} */
- constructor : jQuery.Event,
- /** @type {function (): ?} */
- isDefaultPrevented : returnFalse,
- /** @type {function (): ?} */
- isPropagationStopped : returnFalse,
- /** @type {function (): ?} */
- isImmediatePropagationStopped : returnFalse,
- isSimulated : false,
- /**
- * @return {undefined}
- */
- preventDefault : function() {
- var e = this.originalEvent;
- /** @type {function (): ?} */
- this.isDefaultPrevented = returnTrue;
- if (e) {
- if (!this.isSimulated) {
- e.preventDefault();
- }
- }
- },
- /**
- * @return {undefined}
- */
- stopPropagation : function() {
- var e = this.originalEvent;
- /** @type {function (): ?} */
- this.isPropagationStopped = returnTrue;
- if (e) {
- if (!this.isSimulated) {
- e.stopPropagation();
- }
- }
- },
- /**
- * @return {undefined}
- */
- stopImmediatePropagation : function() {
- var e = this.originalEvent;
- /** @type {function (): ?} */
- this.isImmediatePropagationStopped = returnTrue;
- if (e) {
- if (!this.isSimulated) {
- e.stopImmediatePropagation();
- }
- }
- this.stopPropagation();
- }
- };
- jQuery.each({
- altKey : true,
- bubbles : true,
- cancelable : true,
- changedTouches : true,
- ctrlKey : true,
- detail : true,
- eventPhase : true,
- metaKey : true,
- pageX : true,
- pageY : true,
- shiftKey : true,
- view : true,
- "char" : true,
- charCode : true,
- key : true,
- keyCode : true,
- button : true,
- buttons : true,
- clientX : true,
- clientY : true,
- offsetX : true,
- offsetY : true,
- pointerId : true,
- pointerType : true,
- screenX : true,
- screenY : true,
- targetTouches : true,
- toElement : true,
- touches : true,
- /**
- * @param {Event} e
- * @return {?}
- */
- which : function(e) {
- var button = e.button;
- return null == e.which && RE_INPUT_CHECKABLE_TYPES.test(e.type) ? null != e.charCode ? e.charCode : e.keyCode : !e.which && (void 0 !== button && evt.test(e.type)) ? 1 & button ? 1 : 2 & button ? 3 : 4 & button ? 2 : 0 : e.which;
- }
- }, jQuery.event.addProp);
- jQuery.each({
- mouseenter : "mouseover",
- mouseleave : "mouseout",
- pointerenter : "pointerover",
- pointerleave : "pointerout"
- }, function(orig, fix) {
- jQuery.event.special[orig] = {
- delegateType : fix,
- bindType : fix,
- /**
- * @param {Object} event
- * @return {?}
- */
- handle : function(event) {
- var returnValue;
- var target = this;
- var related = event.relatedTarget;
- var handleObj = event.handleObj;
- return related && (related === target || jQuery.contains(target, related)) || (event.type = handleObj.origType, returnValue = handleObj.handler.apply(this, arguments), event.type = fix), returnValue;
- }
- };
- });
- jQuery.fn.extend({
- /**
- * @param {string} name
- * @param {Function} selector
- * @param {Object} one
- * @param {Function} fn
- * @return {?}
- */
- on : function(name, selector, one, fn) {
- return on(this, name, selector, one, fn);
- },
- /**
- * @param {Object} type
- * @param {Object} selector
- * @param {Object} callback
- * @param {Function} types
- * @return {?}
- */
- one : function(type, selector, callback, types) {
- return on(this, type, selector, callback, types, 1);
- },
- /**
- * @param {Object} types
- * @param {Function} selector
- * @param {Function} fn
- * @return {?}
- */
- off : function(types, selector, fn) {
- var handleObj;
- var type;
- if (types && (types.preventDefault && types.handleObj)) {
- return handleObj = types.handleObj, jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler), this;
- }
- if ("object" == typeof types) {
- for (type in types) {
- this.off(type, selector, types[type]);
- }
- return this;
- }
- return selector !== false && "function" != typeof selector || (fn = selector, selector = void 0), fn === false && (fn = returnFalse), this.each(function() {
- jQuery.event.remove(this, types, fn, selector);
- });
- }
- });
- /** @type {RegExp} */
- var br = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;
- /** @type {RegExp} */
- var rRadial = /<script|<style|<link/i;
- /** @type {RegExp} */
- var exclude = /checked\s*(?:[^=]|=\s*.checked.)/i;
- /** @type {RegExp} */
- var re = /^true\/(.*)/;
- /** @type {RegExp} */
- var normalizr = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
- jQuery.extend({
- /**
- * @param {string} b
- * @return {?}
- */
- htmlPrefilter : function(b) {
- return b.replace(br, "<$1></$2>");
- },
- /**
- * @param {Object} elem
- * @param {(boolean|number|string)} dataAndEvents
- * @param {(boolean|number|string)} deepDataAndEvents
- * @return {?}
- */
- clone : function(elem, dataAndEvents, deepDataAndEvents) {
- var i;
- var l;
- var srcElements;
- var destElements;
- var clone = elem.cloneNode(true);
- var inPage = jQuery.contains(elem.ownerDocument, elem);
- if (!(support.noCloneChecked || (1 !== elem.nodeType && 11 !== elem.nodeType || jQuery.isXMLDoc(elem)))) {
- destElements = getAll(clone);
- srcElements = getAll(elem);
- /** @type {number} */
- i = 0;
- l = srcElements.length;
- for (;i < l;i++) {
- fixInput(srcElements[i], destElements[i]);
- }
- }
- if (dataAndEvents) {
- if (deepDataAndEvents) {
- srcElements = srcElements || getAll(elem);
- destElements = destElements || getAll(clone);
- /** @type {number} */
- i = 0;
- l = srcElements.length;
- for (;i < l;i++) {
- cloneCopyEvent(srcElements[i], destElements[i]);
- }
- } else {
- cloneCopyEvent(elem, clone);
- }
- }
- return destElements = getAll(clone, "script"), destElements.length > 0 && setGlobalEval(destElements, !inPage && getAll(elem, "script")), clone;
- },
- /**
- * @param {?} elems
- * @return {undefined}
- */
- cleanData : function(elems) {
- var data;
- var elem;
- var type;
- var special = jQuery.event.special;
- /** @type {number} */
- var i = 0;
- for (;void 0 !== (elem = elems[i]);i++) {
- if (next(elem)) {
- if (data = elem[data_priv.expando]) {
- if (data.events) {
- for (type in data.events) {
- if (special[type]) {
- jQuery.event.remove(elem, type);
- } else {
- jQuery.removeEvent(elem, type, data.handle);
- }
- }
- }
- elem[data_priv.expando] = void 0;
- }
- if (elem[data_user.expando]) {
- elem[data_user.expando] = void 0;
- }
- }
- }
- }
- });
- jQuery.fn.extend({
- /**
- * @param {?} type
- * @return {?}
- */
- detach : function(type) {
- return remove(this, type, true);
- },
- /**
- * @param {Object} elems
- * @return {?}
- */
- remove : function(elems) {
- return remove(this, elems);
- },
- /**
- * @param {string} value
- * @return {?}
- */
- text : function(value) {
- return access(this, function(textString) {
- return void 0 === textString ? jQuery.text(this) : this.empty().each(function() {
- if (!(1 !== this.nodeType && (11 !== this.nodeType && 9 !== this.nodeType))) {
- /** @type {string} */
- this.textContent = textString;
- }
- });
- }, null, value, arguments.length);
- },
- /**
- * @return {?}
- */
- append : function() {
- return update(this, arguments, function(elem) {
- if (1 === this.nodeType || (11 === this.nodeType || 9 === this.nodeType)) {
- var target = manipulationTarget(this, elem);
- target.appendChild(elem);
- }
- });
- },
- /**
- * @return {?}
- */
- prepend : function() {
- return update(this, arguments, function(elem) {
- if (1 === this.nodeType || (11 === this.nodeType || 9 === this.nodeType)) {
- var target = manipulationTarget(this, elem);
- target.insertBefore(elem, target.firstChild);
- }
- });
- },
- /**
- * @return {?}
- */
- before : function() {
- return update(this, arguments, function(elem) {
- if (this.parentNode) {
- this.parentNode.insertBefore(elem, this);
- }
- });
- },
- /**
- * @return {?}
- */
- after : function() {
- return update(this, arguments, function(elem) {
- if (this.parentNode) {
- this.parentNode.insertBefore(elem, this.nextSibling);
- }
- });
- },
- /**
- * @return {?}
- */
- empty : function() {
- var elem;
- /** @type {number} */
- var unlock = 0;
- for (;null != (elem = this[unlock]);unlock++) {
- if (1 === elem.nodeType) {
- jQuery.cleanData(getAll(elem, false));
- /** @type {string} */
- elem.textContent = "";
- }
- }
- return this;
- },
- /**
- * @param {?} dataAndEvents
- * @param {?} deepDataAndEvents
- * @return {?}
- */
- clone : function(dataAndEvents, deepDataAndEvents) {
- return dataAndEvents = null != dataAndEvents && dataAndEvents, deepDataAndEvents = null == deepDataAndEvents ? dataAndEvents : deepDataAndEvents, this.map(function() {
- return jQuery.clone(this, dataAndEvents, deepDataAndEvents);
- });
- },
- /**
- * @param {string} value
- * @return {?}
- */
- html : function(value) {
- return access(this, function(value) {
- var elem = this[0] || {};
- /** @type {number} */
- var i = 0;
- var l = this.length;
- if (void 0 === value && 1 === elem.nodeType) {
- return elem.innerHTML;
- }
- if ("string" == typeof value && (!rRadial.test(value) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()])) {
- value = jQuery.htmlPrefilter(value);
- try {
- for (;i < l;i++) {
- elem = this[i] || {};
- if (1 === elem.nodeType) {
- jQuery.cleanData(getAll(elem, false));
- /** @type {(Object|string)} */
- elem.innerHTML = value;
- }
- }
- /** @type {number} */
- elem = 0;
- } catch (e) {
- }
- }
- if (elem) {
- this.empty().append(value);
- }
- }, null, value, arguments.length);
- },
- /**
- * @return {?}
- */
- replaceWith : function() {
- /** @type {Array} */
- var selection = [];
- return update(this, arguments, function(relatedNode) {
- var node = this.parentNode;
- if (jQuery.inArray(this, selection) < 0) {
- jQuery.cleanData(getAll(this));
- if (node) {
- node.replaceChild(relatedNode, this);
- }
- }
- }, selection);
- }
- });
- jQuery.each({
- appendTo : "append",
- prependTo : "prepend",
- insertBefore : "before",
- insertAfter : "after",
- replaceAll : "replaceWith"
- }, function(original, method) {
- /**
- * @param {Object} scripts
- * @return {?}
- */
- jQuery.fn[original] = function(scripts) {
- var resp;
- /** @type {Array} */
- var ret = [];
- var insert = jQuery(scripts);
- /** @type {number} */
- var last = insert.length - 1;
- /** @type {number} */
- var i = 0;
- for (;i <= last;i++) {
- resp = i === last ? this : this.clone(true);
- jQuery(insert[i])[method](resp);
- core_push.apply(ret, resp.get());
- }
- return this.pushStack(ret);
- };
- });
- /** @type {RegExp} */
- var rbracket = /^margin/;
- /** @type {RegExp} */
- var rnumnonpx = new RegExp("^(" + core_pnum + ")(?!px)[a-z%]+$", "i");
- /**
- * @param {Object} elem
- * @return {?}
- */
- var getStyles = function(elem) {
- var defaultView = elem.ownerDocument.defaultView;
- return defaultView && defaultView.opener || (defaultView = win), defaultView.getComputedStyle(elem);
- };
- !function() {
- /**
- * @return {undefined}
- */
- function computePixelPositionAndBoxSizingReliable() {
- if (div) {
- /** @type {string} */
- div.style.cssText = "box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%";
- /** @type {string} */
- div.innerHTML = "";
- docElem.appendChild(container);
- var s = win.getComputedStyle(div);
- /** @type {boolean} */
- c = "1%" !== s.top;
- /** @type {boolean} */
- g = "2px" === s.marginLeft;
- /** @type {boolean} */
- e = "4px" === s.width;
- /** @type {string} */
- div.style.marginRight = "50%";
- /** @type {boolean} */
- f = "4px" === s.marginRight;
- docElem.removeChild(container);
- /** @type {null} */
- div = null;
- }
- }
- var c;
- var e;
- var f;
- var g;
- var container = doc.createElement("div");
- var div = doc.createElement("div");
- if (div.style) {
- /** @type {string} */
- div.style.backgroundClip = "content-box";
- /** @type {string} */
- div.cloneNode(true).style.backgroundClip = "";
- /** @type {boolean} */
- support.clearCloneStyle = "content-box" === div.style.backgroundClip;
- /** @type {string} */
- container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute";
- container.appendChild(div);
- jQuery.extend(support, {
- /**
- * @return {?}
- */
- pixelPosition : function() {
- return computePixelPositionAndBoxSizingReliable(), c;
- },
- /**
- * @return {?}
- */
- boxSizingReliable : function() {
- return computePixelPositionAndBoxSizingReliable(), e;
- },
- /**
- * @return {?}
- */
- pixelMarginRight : function() {
- return computePixelPositionAndBoxSizingReliable(), f;
- },
- /**
- * @return {?}
- */
- reliableMarginLeft : function() {
- return computePixelPositionAndBoxSizingReliable(), g;
- }
- });
- }
- }();
- /** @type {RegExp} */
- var rdisplayswap = /^(none|table(?!-c[ea]).+)/;
- var cssShow = {
- position : "absolute",
- visibility : "hidden",
- display : "block"
- };
- var cssNormalTransform = {
- letterSpacing : "0",
- fontWeight : "400"
- };
- /** @type {Array} */
- var VENDOR_PREFIXES = ["Webkit", "Moz", "ms"];
- var table = doc.createElement("div").style;
- jQuery.extend({
- cssHooks : {
- opacity : {
- /**
- * @param {Object} elem
- * @param {string} value
- * @return {?}
- */
- get : function(elem, value) {
- if (value) {
- var buffer = css(elem, "opacity");
- return "" === buffer ? "1" : buffer;
- }
- }
- }
- },
- cssNumber : {
- animationIterationCount : true,
- columnCount : true,
- fillOpacity : true,
- flexGrow : true,
- flexShrink : true,
- fontWeight : true,
- lineHeight : true,
- opacity : true,
- order : true,
- orphans : true,
- widows : true,
- zIndex : true,
- zoom : true
- },
- cssProps : {
- "float" : "cssFloat"
- },
- /**
- * @param {Object} elem
- * @param {string} prop
- * @param {string} value
- * @param {string} name
- * @return {?}
- */
- style : function(elem, prop, value, name) {
- if (elem && (3 !== elem.nodeType && (8 !== elem.nodeType && elem.style))) {
- var ret;
- var type;
- var hooks;
- var p = jQuery.camelCase(prop);
- var style = elem.style;
- return prop = jQuery.cssProps[p] || (jQuery.cssProps[p] = camelCase(p) || p), hooks = jQuery.cssHooks[prop] || jQuery.cssHooks[p], void 0 === value ? hooks && ("get" in hooks && void 0 !== (ret = hooks.get(elem, false, name))) ? ret : style[prop] : (type = typeof value, "string" === type && ((ret = regexp.exec(value)) && (ret[1] && (value = get(elem, prop, ret), type = "number"))), null != value && (value === value && ("number" === type && (value += ret && ret[3] || (jQuery.cssNumber[p] ?
- "" : "px")), support.clearCloneStyle || ("" !== value || (0 !== prop.indexOf("background") || (style[prop] = "inherit"))), hooks && ("set" in hooks && void 0 === (value = hooks.set(elem, value, name))) || (style[prop] = value))), void 0);
- }
- },
- /**
- * @param {Object} elem
- * @param {string} prop
- * @param {boolean} recurring
- * @param {?} val
- * @return {?}
- */
- css : function(elem, prop, recurring, val) {
- var ret;
- var result;
- var hooks;
- var name = jQuery.camelCase(prop);
- return prop = jQuery.cssProps[name] || (jQuery.cssProps[name] = camelCase(name) || name), hooks = jQuery.cssHooks[prop] || jQuery.cssHooks[name], hooks && ("get" in hooks && (ret = hooks.get(elem, true, recurring))), void 0 === ret && (ret = css(elem, prop, val)), "normal" === ret && (prop in cssNormalTransform && (ret = cssNormalTransform[prop])), "" === recurring || recurring ? (result = parseFloat(ret), recurring === true || isFinite(result) ? result || 0 : ret) : ret;
- }
- });
- jQuery.each(["height", "width"], function(dataAndEvents, name) {
- jQuery.cssHooks[name] = {
- /**
- * @param {Object} elem
- * @param {string} value
- * @param {string} extra
- * @return {?}
- */
- get : function(elem, value, extra) {
- if (value) {
- return!rdisplayswap.test(jQuery.css(elem, "display")) || elem.getClientRects().length && elem.getBoundingClientRect().width ? getWidthOrHeight(elem, name, extra) : swap(elem, cssShow, function() {
- return getWidthOrHeight(elem, name, extra);
- });
- }
- },
- /**
- * @param {Object} elem
- * @param {string} value
- * @param {string} fn
- * @return {?}
- */
- set : function(elem, value, fn) {
- var match;
- var styles = fn && getStyles(elem);
- var val = fn && augmentWidthOrHeight(elem, name, fn, "border-box" === jQuery.css(elem, "boxSizing", false, styles), styles);
- return val && ((match = regexp.exec(value)) && ("px" !== (match[3] || "px") && (elem.style[name] = value, value = jQuery.css(elem, name)))), set(elem, value, val);
- }
- };
- });
- jQuery.cssHooks.marginLeft = addGetHookIf(support.reliableMarginLeft, function(child, dataAndEvents) {
- if (dataAndEvents) {
- return(parseFloat(css(child, "marginLeft")) || child.getBoundingClientRect().left - swap(child, {
- marginLeft : 0
- }, function() {
- return child.getBoundingClientRect().left;
- })) + "px";
- }
- });
- jQuery.each({
- margin : "",
- padding : "",
- border : "Width"
- }, function(prefix, suffix) {
- jQuery.cssHooks[prefix + suffix] = {
- /**
- * @param {string} line
- * @return {?}
- */
- expand : function(line) {
- /** @type {number} */
- var i = 0;
- var expanded = {};
- /** @type {Array} */
- var tokens = "string" == typeof line ? line.split(" ") : [line];
- for (;i < 4;i++) {
- expanded[prefix + cssExpand[i] + suffix] = tokens[i] || (tokens[i - 2] || tokens[0]);
- }
- return expanded;
- }
- };
- if (!rbracket.test(prefix)) {
- /** @type {function (Object, string, string): ?} */
- jQuery.cssHooks[prefix + suffix].set = set;
- }
- });
- jQuery.fn.extend({
- /**
- * @param {Object} elem
- * @param {string} value
- * @return {?}
- */
- css : function(elem, value) {
- return access(this, function(elem, prop, value) {
- var styles;
- var valsLength;
- var map = {};
- /** @type {number} */
- var i = 0;
- if (jQuery.isArray(prop)) {
- styles = getStyles(elem);
- valsLength = prop.length;
- for (;i < valsLength;i++) {
- map[prop[i]] = jQuery.css(elem, prop[i], false, styles);
- }
- return map;
- }
- return void 0 !== value ? jQuery.style(elem, prop, value) : jQuery.css(elem, prop);
- }, elem, value, arguments.length > 1);
- }
- });
- /** @type {function (Object, Function, boolean, Object, number): ?} */
- jQuery.Tween = Tween;
- Tween.prototype = {
- /** @type {function (Object, Function, boolean, Object, number): ?} */
- constructor : Tween,
- /**
- * @param {Object} allBindingsAccessor
- * @param {Object} options
- * @param {?} prop
- * @param {number} to
- * @param {string} easing
- * @param {string} unit
- * @return {undefined}
- */
- init : function(allBindingsAccessor, options, prop, to, easing, unit) {
- /** @type {Object} */
- this.elem = allBindingsAccessor;
- this.prop = prop;
- this.easing = easing || jQuery.easing._default;
- /** @type {Object} */
- this.options = options;
- this.start = this.now = this.cur();
- /** @type {number} */
- this.end = to;
- this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px");
- },
- /**
- * @return {?}
- */
- cur : function() {
- var hooks = Tween.propHooks[this.prop];
- return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this);
- },
- /**
- * @param {number} percent
- * @return {?}
- */
- run : function(percent) {
- var eased;
- var hooks = Tween.propHooks[this.prop];
- return this.options.duration ? this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration) : this.pos = eased = percent, this.now = (this.end - this.start) * eased + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), hooks && hooks.set ? hooks.set(this) : Tween.propHooks._default.set(this), this;
- }
- };
- Tween.prototype.init.prototype = Tween.prototype;
- Tween.propHooks = {
- _default : {
- /**
- * @param {Object} elem
- * @return {?}
- */
- get : function(elem) {
- var node;
- return 1 !== elem.elem.nodeType || null != elem.elem[elem.prop] && null == elem.elem.style[elem.prop] ? elem.elem[elem.prop] : (node = jQuery.css(elem.elem, elem.prop, ""), node && "auto" !== node ? node : 0);
- },
- /**
- * @param {Object} tween
- * @return {undefined}
- */
- set : function(tween) {
- if (jQuery.fx.step[tween.prop]) {
- jQuery.fx.step[tween.prop](tween);
- } else {
- if (1 !== tween.elem.nodeType || null == tween.elem.style[jQuery.cssProps[tween.prop]] && !jQuery.cssHooks[tween.prop]) {
- tween.elem[tween.prop] = tween.now;
- } else {
- jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
- }
- }
- }
- }
- };
- Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
- /**
- * @param {Object} elem
- * @return {undefined}
- */
- set : function(elem) {
- if (elem.elem.nodeType) {
- if (elem.elem.parentNode) {
- elem.elem[elem.prop] = elem.now;
- }
- }
- }
- };
- jQuery.easing = {
- /**
- * @param {?} t
- * @return {?}
- */
- linear : function(t) {
- return t;
- },
- /**
- * @param {number} p
- * @return {?}
- */
- swing : function(p) {
- return 0.5 - Math.cos(p * Math.PI) / 2;
- },
- _default : "swing"
- };
- /** @type {function (Object, Object, ?, number, string, string): undefined} */
- jQuery.fx = Tween.prototype.init;
- jQuery.fx.step = {};
- var fxNow;
- var id;
- /** @type {RegExp} */
- var spaceRe = /^(?:toggle|show|hide)$/;
- /** @type {RegExp} */
- var numbers = /queueHooks$/;
- jQuery.Animation = jQuery.extend(Animation, {
- tweeners : {
- "*" : [function(prop, value) {
- var tween = this.createTween(prop, value);
- return get(tween.elem, prop, regexp.exec(value), tween), tween;
- }]
- },
- /**
- * @param {Object} value
- * @param {Function} callback
- * @return {undefined}
- */
- tweener : function(value, callback) {
- if (jQuery.isFunction(value)) {
- /** @type {Object} */
- callback = value;
- /** @type {Array} */
- value = ["*"];
- } else {
- value = value.match(core_rnotwhite);
- }
- var type;
- /** @type {number} */
- var j = 0;
- var jlen = value.length;
- for (;j < jlen;j++) {
- type = value[j];
- Animation.tweeners[type] = Animation.tweeners[type] || [];
- Animation.tweeners[type].unshift(callback);
- }
- },
- prefilters : [defaultPrefilter],
- /**
- * @param {?} suite
- * @param {?} prepend
- * @return {undefined}
- */
- prefilter : function(suite, prepend) {
- if (prepend) {
- Animation.prefilters.unshift(suite);
- } else {
- Animation.prefilters.push(suite);
- }
- }
- });
- /**
- * @param {string} speed
- * @param {boolean} easing
- * @param {string} fn
- * @return {?}
- */
- jQuery.speed = function(speed, easing, fn) {
- var opt = speed && "object" == typeof speed ? jQuery.extend({}, speed) : {
- complete : fn || (!fn && easing || jQuery.isFunction(speed) && speed),
- duration : speed,
- easing : fn && easing || easing && (!jQuery.isFunction(easing) && easing)
- };
- return jQuery.fx.off || doc.hidden ? opt.duration = 0 : "number" != typeof opt.duration && (opt.duration in jQuery.fx.speeds ? opt.duration = jQuery.fx.speeds[opt.duration] : opt.duration = jQuery.fx.speeds._default), null != opt.queue && opt.queue !== true || (opt.queue = "fx"), opt.old = opt.complete, opt.complete = function() {
- if (jQuery.isFunction(opt.old)) {
- opt.old.call(this);
- }
- if (opt.queue) {
- jQuery.dequeue(this, opt.queue);
- }
- }, opt;
- };
- jQuery.fn.extend({
- /**
- * @param {string} speed
- * @param {(number|string)} to
- * @param {boolean} callback
- * @param {string} _callback
- * @return {?}
- */
- fadeTo : function(speed, to, callback, _callback) {
- return this.filter(isHidden).css("opacity", 0).show().end().animate({
- opacity : to
- }, speed, callback, _callback);
- },
- /**
- * @param {?} prop
- * @param {string} speed
- * @param {boolean} easing
- * @param {string} callback
- * @return {?}
- */
- animate : function(prop, speed, easing, callback) {
- var empty = jQuery.isEmptyObject(prop);
- var optall = jQuery.speed(speed, easing, callback);
- /**
- * @return {undefined}
- */
- var doAnimation = function() {
- var anim = Animation(this, jQuery.extend({}, prop), optall);
- if (empty || data_priv.get(this, "finish")) {
- anim.stop(true);
- }
- };
- return doAnimation.finish = doAnimation, empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation);
- },
- /**
- * @param {boolean} type
- * @param {boolean} clearQueue
- * @param {boolean} gotoEnd
- * @return {?}
- */
- stop : function(type, clearQueue, gotoEnd) {
- /**
- * @param {Object} e
- * @return {undefined}
- */
- var stop = function(e) {
- var stop = e.stop;
- delete e.stop;
- stop(gotoEnd);
- };
- return "string" != typeof type && (gotoEnd = clearQueue, clearQueue = type, type = void 0), clearQueue && (type !== false && this.queue(type || "fx", [])), this.each(function() {
- /** @type {boolean} */
- var b = true;
- var i = null != type && type + "queueHooks";
- /** @type {Array} */
- var timers = jQuery.timers;
- var gradient = data_priv.get(this);
- if (i) {
- if (gradient[i]) {
- if (gradient[i].stop) {
- stop(gradient[i]);
- }
- }
- } else {
- for (i in gradient) {
- if (gradient[i]) {
- if (gradient[i].stop) {
- if (numbers.test(i)) {
- stop(gradient[i]);
- }
- }
- }
- }
- }
- /** @type {number} */
- i = timers.length;
- for (;i--;) {
- if (!(timers[i].elem !== this)) {
- if (!(null != type && timers[i].queue !== type)) {
- timers[i].anim.stop(gotoEnd);
- /** @type {boolean} */
- b = false;
- timers.splice(i, 1);
- }
- }
- }
- if (!(!b && gotoEnd)) {
- jQuery.dequeue(this, type);
- }
- });
- },
- /**
- * @param {string} type
- * @return {?}
- */
- finish : function(type) {
- return type !== false && (type = type || "fx"), this.each(function() {
- var index;
- var data = data_priv.get(this);
- var array = data[type + "queue"];
- var event = data[type + "queueHooks"];
- /** @type {Array} */
- var timers = jQuery.timers;
- var length = array ? array.length : 0;
- /** @type {boolean} */
- data.finish = true;
- jQuery.queue(this, type, []);
- if (event) {
- if (event.stop) {
- event.stop.call(this, true);
- }
- }
- /** @type {number} */
- index = timers.length;
- for (;index--;) {
- if (timers[index].elem === this) {
- if (timers[index].queue === type) {
- timers[index].anim.stop(true);
- timers.splice(index, 1);
- }
- }
- }
- /** @type {number} */
- index = 0;
- for (;index < length;index++) {
- if (array[index]) {
- if (array[index].finish) {
- array[index].finish.call(this);
- }
- }
- }
- delete data.finish;
- });
- }
- });
- jQuery.each(["toggle", "show", "hide"], function(dataAndEvents, name) {
- var matcherFunction = jQuery.fn[name];
- /**
- * @param {string} speed
- * @param {boolean} callback
- * @param {string} next_callback
- * @return {?}
- */
- jQuery.fn[name] = function(speed, callback, next_callback) {
- return null == speed || "boolean" == typeof speed ? matcherFunction.apply(this, arguments) : this.animate(genFx(name, true), speed, callback, next_callback);
- };
- });
- jQuery.each({
- slideDown : genFx("show"),
- slideUp : genFx("hide"),
- slideToggle : genFx("toggle"),
- fadeIn : {
- opacity : "show"
- },
- fadeOut : {
- opacity : "hide"
- },
- fadeToggle : {
- opacity : "toggle"
- }
- }, function(original, props) {
- /**
- * @param {string} speed
- * @param {boolean} callback
- * @param {string} next_callback
- * @return {?}
- */
- jQuery.fn[original] = function(speed, callback, next_callback) {
- return this.animate(props, speed, callback, next_callback);
- };
- });
- /** @type {Array} */
- jQuery.timers = [];
- /**
- * @return {undefined}
- */
- jQuery.fx.tick = function() {
- var last;
- /** @type {number} */
- var i = 0;
- /** @type {Array} */
- var timers = jQuery.timers;
- fxNow = jQuery.now();
- for (;i < timers.length;i++) {
- last = timers[i];
- if (!last()) {
- if (!(timers[i] !== last)) {
- timers.splice(i--, 1);
- }
- }
- }
- if (!timers.length) {
- jQuery.fx.stop();
- }
- fxNow = void 0;
- };
- /**
- * @param {?} timer
- * @return {undefined}
- */
- jQuery.fx.timer = function(timer) {
- jQuery.timers.push(timer);
- if (timer()) {
- jQuery.fx.start();
- } else {
- jQuery.timers.pop();
- }
- };
- /** @type {number} */
- jQuery.fx.interval = 13;
- /**
- * @return {undefined}
- */
- jQuery.fx.start = function() {
- if (!id) {
- id = win.requestAnimationFrame ? win.requestAnimationFrame(raf) : win.setInterval(jQuery.fx.tick, jQuery.fx.interval);
- }
- };
- /**
- * @return {undefined}
- */
- jQuery.fx.stop = function() {
- if (win.cancelAnimationFrame) {
- win.cancelAnimationFrame(id);
- } else {
- win.clearInterval(id);
- }
- /** @type {null} */
- id = null;
- };
- jQuery.fx.speeds = {
- slow : 600,
- fast : 200,
- _default : 400
- };
- /**
- * @param {HTMLElement} time
- * @param {string} type
- * @return {?}
- */
- jQuery.fn.delay = function(time, type) {
- return time = jQuery.fx ? jQuery.fx.speeds[time] || time : time, type = type || "fx", this.queue(type, function(next, event) {
- var timeout = win.setTimeout(next, time);
- /**
- * @return {undefined}
- */
- event.stop = function() {
- win.clearTimeout(timeout);
- };
- });
- };
- (function() {
- var input = doc.createElement("input");
- var select = doc.createElement("select");
- var opt = select.appendChild(doc.createElement("option"));
- /** @type {string} */
- input.type = "checkbox";
- /** @type {boolean} */
- support.checkOn = "" !== input.value;
- support.optSelected = opt.selected;
- input = doc.createElement("input");
- /** @type {string} */
- input.value = "t";
- /** @type {string} */
- input.type = "radio";
- /** @type {boolean} */
- support.radioValue = "t" === input.value;
- })();
- var boolHook;
- var files = jQuery.expr.attrHandle;
- jQuery.fn.extend({
- /**
- * @param {Object} name
- * @param {string} value
- * @return {?}
- */
- attr : function(name, value) {
- return access(this, jQuery.attr, name, value, arguments.length > 1);
- },
- /**
- * @param {Object} name
- * @return {?}
- */
- removeAttr : function(name) {
- return this.each(function() {
- jQuery.removeAttr(this, name);
- });
- }
- });
- jQuery.extend({
- /**
- * @param {Object} elem
- * @param {string} name
- * @param {string} value
- * @return {?}
- */
- attr : function(elem, name, value) {
- var ret;
- var hooks;
- var nodeType = elem.nodeType;
- if (3 !== nodeType && (8 !== nodeType && 2 !== nodeType)) {
- return "undefined" == typeof elem.getAttribute ? jQuery.prop(elem, name, value) : (1 === nodeType && jQuery.isXMLDoc(elem) || (hooks = jQuery.attrHooks[name.toLowerCase()] || (jQuery.expr.match.bool.test(name) ? boolHook : void 0)), void 0 !== value ? null === value ? void jQuery.removeAttr(elem, name) : hooks && ("set" in hooks && void 0 !== (ret = hooks.set(elem, value, name))) ? ret : (elem.setAttribute(name, value + ""), value) : hooks && ("get" in hooks && null !== (ret = hooks.get(elem,
- name))) ? ret : (ret = jQuery.find.attr(elem, name), null == ret ? void 0 : ret));
- }
- },
- attrHooks : {
- type : {
- /**
- * @param {Object} elem
- * @param {string} value
- * @return {?}
- */
- set : function(elem, value) {
- if (!support.radioValue && ("radio" === value && jQuery.nodeName(elem, "input"))) {
- var val = elem.value;
- return elem.setAttribute("type", value), val && (elem.value = val), value;
- }
- }
- }
- },
- /**
- * @param {Object} elem
- * @param {string} value
- * @return {undefined}
- */
- removeAttr : function(elem, value) {
- var name;
- /** @type {number} */
- var i = 0;
- var attrNames = value && value.match(core_rnotwhite);
- if (attrNames && 1 === elem.nodeType) {
- for (;name = attrNames[i++];) {
- elem.removeAttribute(name);
- }
- }
- }
- });
- boolHook = {
- /**
- * @param {Object} elem
- * @param {string} value
- * @param {string} name
- * @return {?}
- */
- set : function(elem, value, name) {
- return value === false ? jQuery.removeAttr(elem, name) : elem.setAttribute(name, name), name;
- }
- };
- jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function(dataAndEvents, name) {
- var callback = files[name] || jQuery.find.attr;
- /**
- * @param {Object} body
- * @param {string} header
- * @param {string} arg
- * @return {?}
- */
- files[name] = function(body, header, arg) {
- var value;
- var file;
- var name = header.toLowerCase();
- return arg || (file = files[name], files[name] = value, value = null != callback(body, header, arg) ? name : null, files[name] = file), value;
- };
- });
- /** @type {RegExp} */
- var rinputs = /^(?:input|select|textarea|button)$/i;
- /** @type {RegExp} */
- var rheader = /^(?:a|area)$/i;
- jQuery.fn.extend({
- /**
- * @param {Object} name
- * @param {string} value
- * @return {?}
- */
- prop : function(name, value) {
- return access(this, jQuery.prop, name, value, arguments.length > 1);
- },
- /**
- * @param {?} name
- * @return {?}
- */
- removeProp : function(name) {
- return this.each(function() {
- delete this[jQuery.propFix[name] || name];
- });
- }
- });
- jQuery.extend({
- /**
- * @param {Object} elem
- * @param {string} name
- * @param {string} value
- * @return {?}
- */
- prop : function(elem, name, value) {
- var ret;
- var hooks;
- var nodeType = elem.nodeType;
- if (3 !== nodeType && (8 !== nodeType && 2 !== nodeType)) {
- return 1 === nodeType && jQuery.isXMLDoc(elem) || (name = jQuery.propFix[name] || name, hooks = jQuery.propHooks[name]), void 0 !== value ? hooks && ("set" in hooks && void 0 !== (ret = hooks.set(elem, value, name))) ? ret : elem[name] = value : hooks && ("get" in hooks && null !== (ret = hooks.get(elem, name))) ? ret : elem[name];
- }
- },
- propHooks : {
- tabIndex : {
- /**
- * @param {Object} elem
- * @return {?}
- */
- get : function(elem) {
- var tabindex = jQuery.find.attr(elem, "tabindex");
- return tabindex ? parseInt(tabindex, 10) : rinputs.test(elem.nodeName) || rheader.test(elem.nodeName) && elem.href ? 0 : -1;
- }
- }
- },
- propFix : {
- "for" : "htmlFor",
- "class" : "className"
- }
- });
- if (!support.optSelected) {
- jQuery.propHooks.selected = {
- /**
- * @param {Object} elem
- * @return {?}
- */
- get : function(elem) {
- var parent = elem.parentNode;
- return parent && (parent.parentNode && parent.parentNode.selectedIndex), null;
- },
- /**
- * @param {Object} elem
- * @return {undefined}
- */
- set : function(elem) {
- var parent = elem.parentNode;
- if (parent) {
- parent.selectedIndex;
- if (parent.parentNode) {
- parent.parentNode.selectedIndex;
- }
- }
- }
- };
- }
- jQuery.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
- jQuery.propFix[this.toLowerCase()] = this;
- });
- jQuery.fn.extend({
- /**
- * @param {string} value
- * @return {?}
- */
- addClass : function(value) {
- var res;
- var obj;
- var cls;
- var result;
- var c;
- var resLength;
- var a;
- /** @type {number} */
- var i = 0;
- if (jQuery.isFunction(value)) {
- return this.each(function(j) {
- jQuery(this).addClass(value.call(this, j, each(this)));
- });
- }
- if ("string" == typeof value && value) {
- /** @type {Array} */
- res = value.match(core_rnotwhite) || [];
- for (;obj = this[i++];) {
- if (result = each(obj), cls = 1 === obj.nodeType && " " + $(result) + " ") {
- /** @type {number} */
- resLength = 0;
- for (;c = res[resLength++];) {
- if (cls.indexOf(" " + c + " ") < 0) {
- cls += c + " ";
- }
- }
- a = $(cls);
- if (result !== a) {
- obj.setAttribute("class", a);
- }
- }
- }
- }
- return this;
- },
- /**
- * @param {string} value
- * @return {?}
- */
- removeClass : function(value) {
- var res;
- var obj;
- var caption;
- var result;
- var apn;
- var resLength;
- var id;
- /** @type {number} */
- var i = 0;
- if (jQuery.isFunction(value)) {
- return this.each(function(j) {
- jQuery(this).removeClass(value.call(this, j, each(this)));
- });
- }
- if (!arguments.length) {
- return this.attr("class", "");
- }
- if ("string" == typeof value && value) {
- /** @type {Array} */
- res = value.match(core_rnotwhite) || [];
- for (;obj = this[i++];) {
- if (result = each(obj), caption = 1 === obj.nodeType && " " + $(result) + " ") {
- /** @type {number} */
- resLength = 0;
- for (;apn = res[resLength++];) {
- for (;caption.indexOf(" " + apn + " ") > -1;) {
- /** @type {string} */
- caption = caption.replace(" " + apn + " ", " ");
- }
- }
- id = $(caption);
- if (result !== id) {
- obj.setAttribute("class", id);
- }
- }
- }
- }
- return this;
- },
- /**
- * @param {string} value
- * @param {?} stateVal
- * @return {?}
- */
- toggleClass : function(value, stateVal) {
- /** @type {string} */
- var type = typeof value;
- return "boolean" == typeof stateVal && "string" === type ? stateVal ? this.addClass(value) : this.removeClass(value) : jQuery.isFunction(value) ? this.each(function(i) {
- jQuery(this).toggleClass(value.call(this, i, each(this), stateVal), stateVal);
- }) : this.each(function() {
- var b;
- var p;
- var li;
- var imageData;
- if ("string" === type) {
- /** @type {number} */
- p = 0;
- li = jQuery(this);
- imageData = value.match(core_rnotwhite) || [];
- for (;b = imageData[p++];) {
- if (li.hasClass(b)) {
- li.removeClass(b);
- } else {
- li.addClass(b);
- }
- }
- } else {
- if (!(void 0 !== value && "boolean" !== type)) {
- b = each(this);
- if (b) {
- data_priv.set(this, "__className__", b);
- }
- if (this.setAttribute) {
- this.setAttribute("class", b || value === false ? "" : data_priv.get(this, "__className__") || "");
- }
- }
- }
- });
- },
- /**
- * @param {string} name
- * @return {?}
- */
- hasClass : function(name) {
- var tval;
- var self;
- /** @type {number} */
- var d = 0;
- /** @type {string} */
- tval = " " + name + " ";
- for (;self = this[d++];) {
- if (1 === self.nodeType && (" " + $(each(self)) + " ").indexOf(tval) > -1) {
- return true;
- }
- }
- return false;
- }
- });
- /** @type {RegExp} */
- var rreturn = /\r/g;
- jQuery.fn.extend({
- /**
- * @param {string} value
- * @return {?}
- */
- val : function(value) {
- var hooks;
- var ret;
- var isFunction;
- var elem = this[0];
- if (arguments.length) {
- return isFunction = jQuery.isFunction(value), this.each(function(i) {
- var val;
- if (1 === this.nodeType) {
- val = isFunction ? value.call(this, i, jQuery(this).val()) : value;
- if (null == val) {
- /** @type {string} */
- val = "";
- } else {
- if ("number" == typeof val) {
- val += "";
- } else {
- if (jQuery.isArray(val)) {
- val = jQuery.map(val, function(month) {
- return null == month ? "" : month + "";
- });
- }
- }
- }
- hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
- if (!(hooks && ("set" in hooks && void 0 !== hooks.set(this, val, "value")))) {
- this.value = val;
- }
- }
- });
- }
- if (elem) {
- return hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()], hooks && ("get" in hooks && void 0 !== (ret = hooks.get(elem, "value"))) ? ret : (ret = elem.value, "string" == typeof ret ? ret.replace(rreturn, "") : null == ret ? "" : ret);
- }
- }
- });
- jQuery.extend({
- valHooks : {
- option : {
- /**
- * @param {Object} elem
- * @return {?}
- */
- get : function(elem) {
- var handle = jQuery.find.attr(elem, "value");
- return null != handle ? handle : $(jQuery.text(elem));
- }
- },
- select : {
- /**
- * @param {Object} elem
- * @return {?}
- */
- get : function(elem) {
- var copies;
- var option;
- var i;
- var options = elem.options;
- var index = elem.selectedIndex;
- /** @type {boolean} */
- var one = "select-one" === elem.type;
- /** @type {(Array|null)} */
- var out = one ? null : [];
- var max = one ? index + 1 : options.length;
- i = index < 0 ? max : one ? index : 0;
- for (;i < max;i++) {
- if (option = options[i], (option.selected || i === index) && (!option.disabled && (!option.parentNode.disabled || !jQuery.nodeName(option.parentNode, "optgroup")))) {
- if (copies = jQuery(option).val(), one) {
- return copies;
- }
- out.push(copies);
- }
- }
- return out;
- },
- /**
- * @param {Object} elem
- * @param {string} value
- * @return {?}
- */
- set : function(elem, value) {
- var c;
- var cur;
- var options = elem.options;
- var values = jQuery.makeArray(value);
- var i = options.length;
- for (;i--;) {
- cur = options[i];
- if (cur.selected = jQuery.inArray(jQuery.valHooks.option.get(cur), values) > -1) {
- /** @type {boolean} */
- c = true;
- }
- }
- return c || (elem.selectedIndex = -1), values;
- }
- }
- }
- });
- jQuery.each(["radio", "checkbox"], function() {
- jQuery.valHooks[this] = {
- /**
- * @param {Object} elem
- * @param {string} value
- * @return {?}
- */
- set : function(elem, value) {
- if (jQuery.isArray(value)) {
- return elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1;
- }
- }
- };
- if (!support.checkOn) {
- /**
- * @param {Object} elem
- * @return {?}
- */
- jQuery.valHooks[this].get = function(elem) {
- return null === elem.getAttribute("value") ? "on" : elem.value;
- };
- }
- });
- /** @type {RegExp} */
- var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
- jQuery.extend(jQuery.event, {
- /**
- * @param {Object} event
- * @param {?} data
- * @param {Object} elem
- * @param {boolean} onlyHandlers
- * @return {?}
- */
- trigger : function(event, data, elem, onlyHandlers) {
- var i;
- var cur;
- var tmp;
- var bubbleType;
- var ontype;
- var handle;
- var special;
- /** @type {Array} */
- var eventPath = [elem || doc];
- var type = hasOwn.call(event, "type") ? event.type : event;
- var namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
- if (cur = tmp = elem = elem || doc, 3 !== elem.nodeType && (8 !== elem.nodeType && (!rfocusMorph.test(type + jQuery.event.triggered) && (type.indexOf(".") > -1 && (namespaces = type.split("."), type = namespaces.shift(), namespaces.sort()), ontype = type.indexOf(":") < 0 && "on" + type, event = event[jQuery.expando] ? event : new jQuery.Event(type, "object" == typeof event && event), event.isTrigger = onlyHandlers ? 2 : 3, event.namespace = namespaces.join("."), event.rnamespace = event.namespace ?
- new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, event.result = void 0, event.target || (event.target = elem), data = null == data ? [event] : jQuery.makeArray(data, [event]), special = jQuery.event.special[type] || {}, onlyHandlers || (!special.trigger || special.trigger.apply(elem, data) !== false))))) {
- if (!onlyHandlers && (!special.noBubble && !jQuery.isWindow(elem))) {
- bubbleType = special.delegateType || type;
- if (!rfocusMorph.test(bubbleType + type)) {
- cur = cur.parentNode;
- }
- for (;cur;cur = cur.parentNode) {
- eventPath.push(cur);
- tmp = cur;
- }
- if (tmp === (elem.ownerDocument || doc)) {
- eventPath.push(tmp.defaultView || (tmp.parentWindow || win));
- }
- }
- /** @type {number} */
- i = 0;
- for (;(cur = eventPath[i++]) && !event.isPropagationStopped();) {
- event.type = i > 1 ? bubbleType : special.bindType || type;
- handle = (data_priv.get(cur, "events") || {})[event.type] && data_priv.get(cur, "handle");
- if (handle) {
- handle.apply(cur, data);
- }
- handle = ontype && cur[ontype];
- if (handle) {
- if (handle.apply) {
- if (next(cur)) {
- event.result = handle.apply(cur, data);
- if (event.result === false) {
- event.preventDefault();
- }
- }
- }
- }
- }
- return event.type = type, onlyHandlers || (event.isDefaultPrevented() || (special._default && special._default.apply(eventPath.pop(), data) !== false || (!next(elem) || ontype && (jQuery.isFunction(elem[type]) && (!jQuery.isWindow(elem) && (tmp = elem[ontype], tmp && (elem[ontype] = null), jQuery.event.triggered = type, elem[type](), jQuery.event.triggered = void 0, tmp && (elem[ontype] = tmp))))))), event.result;
- }
- },
- /**
- * @param {string} type
- * @param {Object} elem
- * @param {?} event
- * @return {undefined}
- */
- simulate : function(type, elem, event) {
- var e = jQuery.extend(new jQuery.Event, event, {
- type : type,
- isSimulated : true
- });
- jQuery.event.trigger(e, null, elem);
- }
- });
- jQuery.fn.extend({
- /**
- * @param {string} type
- * @param {?} data
- * @return {?}
- */
- trigger : function(type, data) {
- return this.each(function() {
- jQuery.event.trigger(type, data, this);
- });
- },
- /**
- * @param {string} type
- * @param {?} data
- * @return {?}
- */
- triggerHandler : function(type, data) {
- var parent = this[0];
- if (parent) {
- return jQuery.event.trigger(type, data, parent, true);
- }
- }
- });
- jQuery.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function(dataAndEvents, name) {
- /**
- * @param {Object} one
- * @param {Function} fn
- * @return {?}
- */
- jQuery.fn[name] = function(one, fn) {
- return arguments.length > 0 ? this.on(name, null, one, fn) : this.trigger(name);
- };
- });
- jQuery.fn.extend({
- /**
- * @param {undefined} fnOver
- * @param {Object} fnOut
- * @return {?}
- */
- hover : function(fnOver, fnOut) {
- return this.mouseenter(fnOver).mouseleave(fnOut || fnOver);
- }
- });
- /** @type {boolean} */
- support.focusin = "onfocusin" in win;
- if (!support.focusin) {
- jQuery.each({
- focus : "focusin",
- blur : "focusout"
- }, function(event, name) {
- /**
- * @param {Object} event
- * @return {undefined}
- */
- var handler = function(event) {
- jQuery.event.simulate(name, event.target, jQuery.event.fix(event));
- };
- jQuery.event.special[name] = {
- /**
- * @return {undefined}
- */
- setup : function() {
- var node = this.ownerDocument || this;
- var descriptor = data_priv.access(node, name);
- if (!descriptor) {
- node.addEventListener(event, handler, true);
- }
- data_priv.access(node, name, (descriptor || 0) + 1);
- },
- /**
- * @return {undefined}
- */
- teardown : function() {
- var node = this.ownerDocument || this;
- /** @type {number} */
- var data = data_priv.access(node, name) - 1;
- if (data) {
- data_priv.access(node, name, data);
- } else {
- node.removeEventListener(event, handler, true);
- data_priv.remove(node, name);
- }
- }
- };
- });
- }
- var req = win.location;
- var iIdCounter = jQuery.now();
- /** @type {RegExp} */
- var rquery = /\?/;
- /**
- * @param {string} data
- * @return {?}
- */
- jQuery.parseXML = function(data) {
- var xml;
- if (!data || "string" != typeof data) {
- return null;
- }
- try {
- xml = (new win.DOMParser).parseFromString(data, "text/xml");
- } catch (d) {
- xml = void 0;
- }
- return xml && !xml.getElementsByTagName("parsererror").length || jQuery.error("Invalid XML: " + data), xml;
- };
- /** @type {RegExp} */
- var rmargin = /\[\]$/;
- /** @type {RegExp} */
- var rCRLF = /\r?\n/g;
- /** @type {RegExp} */
- var mouseTypeRegex = /^(?:submit|button|image|reset|file)$/i;
- /** @type {RegExp} */
- var rsubmittable = /^(?:input|select|textarea|keygen)/i;
- /**
- * @param {Object} a
- * @param {boolean} traditional
- * @return {?}
- */
- jQuery.param = function(a, traditional) {
- var prefix;
- /** @type {Array} */
- var klass = [];
- /**
- * @param {?} key
- * @param {string} value
- * @return {undefined}
- */
- var add = function(key, value) {
- var val = jQuery.isFunction(value) ? value() : value;
- /** @type {string} */
- klass[klass.length] = encodeURIComponent(key) + "=" + encodeURIComponent(null == val ? "" : val);
- };
- if (jQuery.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) {
- jQuery.each(a, function() {
- add(this.name, this.value);
- });
- } else {
- for (prefix in a) {
- buildParams(prefix, a[prefix], traditional, add);
- }
- }
- return klass.join("&");
- };
- jQuery.fn.extend({
- /**
- * @return {?}
- */
- serialize : function() {
- return jQuery.param(this.serializeArray());
- },
- /**
- * @return {?}
- */
- serializeArray : function() {
- return this.map(function() {
- var elements = jQuery.prop(this, "elements");
- return elements ? jQuery.makeArray(elements) : this;
- }).filter(function() {
- var type = this.type;
- return this.name && (!jQuery(this).is(":disabled") && (rsubmittable.test(this.nodeName) && (!mouseTypeRegex.test(type) && (this.checked || !manipulation_rcheckableType.test(type)))));
- }).map(function(dataAndEvents, elem) {
- var val = jQuery(this).val();
- return null == val ? null : jQuery.isArray(val) ? jQuery.map(val, function(val) {
- return{
- name : elem.name,
- value : val.replace(rCRLF, "\r\n")
- };
- }) : {
- name : elem.name,
- value : val.replace(rCRLF, "\r\n")
- };
- }).get();
- }
- });
- /** @type {RegExp} */
- var badChars = /%20/g;
- /** @type {RegExp} */
- var trimRight = /#.*$/;
- /** @type {RegExp} */
- var reParent = /([?&])_=[^&]*/;
- /** @type {RegExp} */
- var whiteSpace = /^(.*?):[ \t]*([^\r\n]*)$/gm;
- /** @type {RegExp} */
- var url = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/;
- /** @type {RegExp} */
- var getOrPostRegEx = /^(?:GET|HEAD)$/;
- /** @type {RegExp} */
- var path = /^\/\//;
- var prefilters = {};
- var transports = {};
- /** @type {string} */
- var Hb = "*/".concat("*");
- var l = doc.createElement("a");
- l.href = req.href;
- jQuery.extend({
- active : 0,
- lastModified : {},
- etag : {},
- ajaxSettings : {
- url : req.href,
- type : "GET",
- isLocal : url.test(req.protocol),
- global : true,
- processData : true,
- async : true,
- contentType : "application/x-www-form-urlencoded; charset=UTF-8",
- accepts : {
- "*" : Hb,
- text : "text/plain",
- html : "text/html",
- xml : "application/xml, text/xml",
- json : "application/json, text/javascript"
- },
- contents : {
- xml : /\bxml\b/,
- html : /\bhtml/,
- json : /\bjson\b/
- },
- responseFields : {
- xml : "responseXML",
- text : "responseText",
- json : "responseJSON"
- },
- converters : {
- /** @type {function (new:String, *=): string} */
- "* text" : String,
- "text html" : true,
- /** @type {function (this:JSONType, string, function (string, *): *=): *} */
- "text json" : JSON.parse,
- /** @type {function (string): ?} */
- "text xml" : jQuery.parseXML
- },
- flatOptions : {
- url : true,
- context : true
- }
- },
- /**
- * @param {(Object|string)} target
- * @param {Object} settings
- * @return {?}
- */
- ajaxSetup : function(target, settings) {
- return settings ? ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) : ajaxExtend(jQuery.ajaxSettings, target);
- },
- ajaxPrefilter : addToPrefiltersOrTransports(prefilters),
- ajaxTransport : addToPrefiltersOrTransports(transports),
- /**
- * @param {Object} arg
- * @param {Object} opts
- * @return {?}
- */
- ajax : function(arg, opts) {
- /**
- * @param {number} status
- * @param {Node} nativeStatusText
- * @param {Object} responses
- * @param {string} total
- * @return {undefined}
- */
- function done(status, nativeStatusText, responses, total) {
- var isSuccess;
- var success;
- var error;
- var response;
- var modified;
- /** @type {Node} */
- var statusText = nativeStatusText;
- if (!escape) {
- /** @type {boolean} */
- escape = true;
- if (resizeId) {
- win.clearTimeout(resizeId);
- }
- transport = void 0;
- str = total || "";
- /** @type {number} */
- jqXHR.readyState = status > 0 ? 4 : 0;
- /** @type {boolean} */
- isSuccess = status >= 200 && status < 300 || 304 === status;
- if (responses) {
- response = ajaxHandleResponses(options, jqXHR, responses);
- }
- response = ajaxConvert(options, response, jqXHR, isSuccess);
- if (isSuccess) {
- if (options.ifModified) {
- modified = jqXHR.getResponseHeader("Last-Modified");
- if (modified) {
- jQuery.lastModified[url] = modified;
- }
- modified = jqXHR.getResponseHeader("etag");
- if (modified) {
- jQuery.etag[url] = modified;
- }
- }
- if (204 === status || "HEAD" === options.type) {
- /** @type {string} */
- statusText = "nocontent";
- } else {
- if (304 === status) {
- /** @type {string} */
- statusText = "notmodified";
- } else {
- statusText = response.state;
- success = response.data;
- error = response.error;
- /** @type {boolean} */
- isSuccess = !error;
- }
- }
- } else {
- error = statusText;
- if (!(!status && statusText)) {
- /** @type {string} */
- statusText = "error";
- if (status < 0) {
- /** @type {number} */
- status = 0;
- }
- }
- }
- /** @type {number} */
- jqXHR.status = status;
- /** @type {string} */
- jqXHR.statusText = (nativeStatusText || statusText) + "";
- if (isSuccess) {
- deferred.resolveWith(context, [success, statusText, jqXHR]);
- } else {
- deferred.rejectWith(context, [jqXHR, statusText, error]);
- }
- jqXHR.statusCode(statusCode);
- statusCode = void 0;
- if (ajaxSend) {
- globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", [jqXHR, options, isSuccess ? success : error]);
- }
- self.fireWith(context, [jqXHR, statusText]);
- if (ajaxSend) {
- globalEventContext.trigger("ajaxComplete", [jqXHR, options]);
- if (!--jQuery.active) {
- jQuery.event.trigger("ajaxStop");
- }
- }
- }
- }
- if ("object" == typeof arg) {
- /** @type {Object} */
- opts = arg;
- arg = void 0;
- }
- opts = opts || {};
- var transport;
- var url;
- var str;
- var obj;
- var resizeId;
- var params;
- var escape;
- var ajaxSend;
- var i;
- var port;
- var options = jQuery.ajaxSetup({}, opts);
- var context = options.context || options;
- var globalEventContext = options.context && (context.nodeType || context.jquery) ? jQuery(context) : jQuery.event;
- var deferred = jQuery.Deferred();
- var self = jQuery.Callbacks("once memory");
- var statusCode = options.statusCode || {};
- var requestHeaders = {};
- var requestHeadersNames = {};
- /** @type {string} */
- var strAbort = "canceled";
- var jqXHR = {
- readyState : 0,
- /**
- * @param {string} key
- * @return {?}
- */
- getResponseHeader : function(key) {
- var value;
- if (escape) {
- if (!obj) {
- obj = {};
- for (;value = whiteSpace.exec(str);) {
- /** @type {string} */
- obj[value[1].toLowerCase()] = value[2];
- }
- }
- value = obj[key.toLowerCase()];
- }
- return null == value ? null : value;
- },
- /**
- * @return {?}
- */
- getAllResponseHeaders : function() {
- return escape ? str : null;
- },
- /**
- * @param {string} name
- * @param {?} value
- * @return {?}
- */
- setRequestHeader : function(name, value) {
- return null == escape && (name = requestHeadersNames[name.toLowerCase()] = requestHeadersNames[name.toLowerCase()] || name, requestHeaders[name] = value), this;
- },
- /**
- * @param {(Object|number)} type
- * @return {?}
- */
- overrideMimeType : function(type) {
- return null == escape && (options.mimeType = type), this;
- },
- /**
- * @param {Object} map
- * @return {?}
- */
- statusCode : function(map) {
- var letter;
- if (map) {
- if (escape) {
- jqXHR.always(map[jqXHR.status]);
- } else {
- for (letter in map) {
- /** @type {Array} */
- statusCode[letter] = [statusCode[letter], map[letter]];
- }
- }
- }
- return this;
- },
- /**
- * @param {string} statusText
- * @return {?}
- */
- abort : function(statusText) {
- var finalText = statusText || strAbort;
- return transport && transport.abort(finalText), done(0, finalText), this;
- }
- };
- if (deferred.promise(jqXHR), options.url = ((arg || (options.url || req.href)) + "").replace(path, req.protocol + "//"), options.type = opts.method || (opts.type || (options.method || options.type)), options.dataTypes = (options.dataType || "*").toLowerCase().match(core_rnotwhite) || [""], null == options.crossDomain) {
- params = doc.createElement("a");
- try {
- /** @type {string} */
- params.href = options.url;
- /** @type {string} */
- params.href = params.href;
- /** @type {boolean} */
- options.crossDomain = l.protocol + "//" + l.host != params.protocol + "//" + params.host;
- } catch (z) {
- /** @type {boolean} */
- options.crossDomain = true;
- }
- }
- if (options.data && (options.processData && ("string" != typeof options.data && (options.data = jQuery.param(options.data, options.traditional)))), inspectPrefiltersOrTransports(prefilters, options, opts, jqXHR), escape) {
- return jqXHR;
- }
- ajaxSend = jQuery.event && options.global;
- if (ajaxSend) {
- if (0 === jQuery.active++) {
- jQuery.event.trigger("ajaxStart");
- }
- }
- options.type = options.type.toUpperCase();
- /** @type {boolean} */
- options.hasContent = !getOrPostRegEx.test(options.type);
- /** @type {string} */
- url = options.url.replace(trimRight, "");
- if (options.hasContent) {
- if (options.data) {
- if (options.processData) {
- if (0 === (options.contentType || "").indexOf("application/x-www-form-urlencoded")) {
- options.data = options.data.replace(badChars, "+");
- }
- }
- }
- } else {
- /** @type {string} */
- port = options.url.slice(url.length);
- if (options.data) {
- url += (rquery.test(url) ? "&" : "?") + options.data;
- delete options.data;
- }
- if (options.cache === false) {
- /** @type {string} */
- url = url.replace(reParent, "$1");
- /** @type {string} */
- port = (rquery.test(url) ? "&" : "?") + "_=" + iIdCounter++ + port;
- }
- /** @type {string} */
- options.url = url + port;
- }
- if (options.ifModified) {
- if (jQuery.lastModified[url]) {
- jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[url]);
- }
- if (jQuery.etag[url]) {
- jqXHR.setRequestHeader("If-None-Match", jQuery.etag[url]);
- }
- }
- if (options.data && (options.hasContent && options.contentType !== false) || opts.contentType) {
- jqXHR.setRequestHeader("Content-Type", options.contentType);
- }
- jqXHR.setRequestHeader("Accept", options.dataTypes[0] && options.accepts[options.dataTypes[0]] ? options.accepts[options.dataTypes[0]] + ("*" !== options.dataTypes[0] ? ", " + Hb + "; q=0.01" : "") : options.accepts["*"]);
- for (i in options.headers) {
- jqXHR.setRequestHeader(i, options.headers[i]);
- }
- if (options.beforeSend && (options.beforeSend.call(context, jqXHR, options) === false || escape)) {
- return jqXHR.abort();
- }
- if (strAbort = "abort", self.add(options.complete), jqXHR.done(options.success), jqXHR.fail(options.error), transport = inspectPrefiltersOrTransports(transports, options, opts, jqXHR)) {
- if (jqXHR.readyState = 1, ajaxSend && globalEventContext.trigger("ajaxSend", [jqXHR, options]), escape) {
- return jqXHR;
- }
- if (options.async) {
- if (options.timeout > 0) {
- resizeId = win.setTimeout(function() {
- jqXHR.abort("timeout");
- }, options.timeout);
- }
- }
- try {
- /** @type {boolean} */
- escape = false;
- transport.send(requestHeaders, done);
- } catch (e) {
- if (escape) {
- throw e;
- }
- done(-1, e);
- }
- } else {
- done(-1, "No Transport");
- }
- return jqXHR;
- },
- /**
- * @param {Object} cur
- * @param {string} data
- * @param {string} callback
- * @return {?}
- */
- getJSON : function(cur, data, callback) {
- return jQuery.get(cur, data, callback, "json");
- },
- /**
- * @param {Object} cur
- * @param {string} callback
- * @return {?}
- */
- getScript : function(cur, callback) {
- return jQuery.get(cur, void 0, callback, "script");
- }
- });
- jQuery.each(["get", "post"], function(dataAndEvents, method) {
- /**
- * @param {string} value
- * @param {Object} html
- * @param {Object} success
- * @param {boolean} dataType
- * @return {?}
- */
- jQuery[method] = function(value, html, success, dataType) {
- return jQuery.isFunction(html) && (dataType = dataType || success, success = html, html = void 0), jQuery.ajax(jQuery.extend({
- url : value,
- type : method,
- dataType : dataType,
- data : html,
- success : success
- }, jQuery.isPlainObject(value) && value));
- };
- });
- /**
- * @param {string} url
- * @return {?}
- */
- jQuery._evalUrl = function(url) {
- return jQuery.ajax({
- url : url,
- type : "GET",
- dataType : "script",
- cache : true,
- async : false,
- global : false,
- "throws" : true
- });
- };
- jQuery.fn.extend({
- /**
- * @param {Function} html
- * @return {?}
- */
- wrapAll : function(html) {
- var wrap;
- return this[0] && (jQuery.isFunction(html) && (html = html.call(this[0])), wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true), this[0].parentNode && wrap.insertBefore(this[0]), wrap.map(function() {
- var elem = this;
- for (;elem.firstElementChild;) {
- elem = elem.firstElementChild;
- }
- return elem;
- }).append(this)), this;
- },
- /**
- * @param {Function} html
- * @return {?}
- */
- wrapInner : function(html) {
- return jQuery.isFunction(html) ? this.each(function(i) {
- jQuery(this).wrapInner(html.call(this, i));
- }) : this.each(function() {
- var self = jQuery(this);
- var contents = self.contents();
- if (contents.length) {
- contents.wrapAll(html);
- } else {
- self.append(html);
- }
- });
- },
- /**
- * @param {Function} html
- * @return {?}
- */
- wrap : function(html) {
- var isFunction = jQuery.isFunction(html);
- return this.each(function(i) {
- jQuery(this).wrapAll(isFunction ? html.call(this, i) : html);
- });
- },
- /**
- * @param {Node} fn
- * @return {?}
- */
- unwrap : function(fn) {
- return this.parent(fn).not("body").each(function() {
- jQuery(this).replaceWith(this.childNodes);
- }), this;
- }
- });
- /**
- * @param {string} type
- * @return {?}
- */
- jQuery.expr.pseudos.hidden = function(type) {
- return!jQuery.expr.pseudos.visible(type);
- };
- /**
- * @param {Element} node
- * @return {?}
- */
- jQuery.expr.pseudos.visible = function(node) {
- return!!(node.offsetWidth || (node.offsetHeight || node.getClientRects().length));
- };
- /**
- * @return {?}
- */
- jQuery.ajaxSettings.xhr = function() {
- try {
- return new win.XMLHttpRequest;
- } catch (b) {
- }
- };
- var xhrSuccessStatus = {
- 0 : 200,
- 1223 : 204
- };
- var xhrSupported = jQuery.ajaxSettings.xhr();
- /** @type {boolean} */
- support.cors = !!xhrSupported && "withCredentials" in xhrSupported;
- /** @type {boolean} */
- support.ajax = xhrSupported = !!xhrSupported;
- jQuery.ajaxTransport(function(options) {
- var callback;
- var onerror;
- if (support.cors || xhrSupported && !options.crossDomain) {
- return{
- /**
- * @param {Object} headers
- * @param {Function} complete
- * @return {undefined}
- */
- send : function(headers, complete) {
- var name;
- var xhr = options.xhr();
- if (xhr.open(options.type, options.url, options.async, options.username, options.password), options.xhrFields) {
- for (name in options.xhrFields) {
- xhr[name] = options.xhrFields[name];
- }
- }
- if (options.mimeType) {
- if (xhr.overrideMimeType) {
- xhr.overrideMimeType(options.mimeType);
- }
- }
- if (!options.crossDomain) {
- if (!headers["X-Requested-With"]) {
- /** @type {string} */
- headers["X-Requested-With"] = "XMLHttpRequest";
- }
- }
- for (name in headers) {
- xhr.setRequestHeader(name, headers[name]);
- }
- /**
- * @param {string} status
- * @return {?}
- */
- callback = function(status) {
- return function() {
- if (callback) {
- /** @type {null} */
- callback = onerror = xhr.onload = xhr.onerror = xhr.onabort = xhr.onreadystatechange = null;
- if ("abort" === status) {
- xhr.abort();
- } else {
- if ("error" === status) {
- if ("number" != typeof xhr.status) {
- complete(0, "error");
- } else {
- complete(xhr.status, xhr.statusText);
- }
- } else {
- complete(xhrSuccessStatus[xhr.status] || xhr.status, xhr.statusText, "text" !== (xhr.responseType || "text") || "string" != typeof xhr.responseText ? {
- binary : xhr.response
- } : {
- text : xhr.responseText
- }, xhr.getAllResponseHeaders());
- }
- }
- }
- };
- };
- xhr.onload = callback();
- onerror = xhr.onerror = callback("error");
- if (void 0 !== xhr.onabort) {
- xhr.onabort = onerror;
- } else {
- /**
- * @return {undefined}
- */
- xhr.onreadystatechange = function() {
- if (4 === xhr.readyState) {
- win.setTimeout(function() {
- if (callback) {
- onerror();
- }
- });
- }
- };
- }
- callback = callback("abort");
- try {
- xhr.send(options.hasContent && options.data || null);
- } catch (i) {
- if (callback) {
- throw i;
- }
- }
- },
- /**
- * @return {undefined}
- */
- abort : function() {
- if (callback) {
- callback();
- }
- }
- };
- }
- });
- jQuery.ajaxPrefilter(function(options) {
- if (options.crossDomain) {
- /** @type {boolean} */
- options.contents.script = false;
- }
- });
- jQuery.ajaxSetup({
- accepts : {
- script : "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents : {
- script : /\b(?:java|ecma)script\b/
- },
- converters : {
- /**
- * @param {string} value
- * @return {?}
- */
- "text script" : function(value) {
- return jQuery.globalEval(value), value;
- }
- }
- });
- jQuery.ajaxPrefilter("script", function(s) {
- if (void 0 === s.cache) {
- /** @type {boolean} */
- s.cache = false;
- }
- if (s.crossDomain) {
- /** @type {string} */
- s.type = "GET";
- }
- });
- jQuery.ajaxTransport("script", function(s) {
- if (s.crossDomain) {
- var script;
- var callback;
- return{
- /**
- * @param {?} _
- * @param {Function} complete
- * @return {undefined}
- */
- send : function(_, complete) {
- script = jQuery("<script>").prop({
- charset : s.scriptCharset,
- src : s.url
- }).on("load error", callback = function(evt) {
- script.remove();
- /** @type {null} */
- callback = null;
- if (evt) {
- complete("error" === evt.type ? 404 : 200, evt.type);
- }
- });
- doc.head.appendChild(script[0]);
- },
- /**
- * @return {undefined}
- */
- abort : function() {
- if (callback) {
- callback();
- }
- }
- };
- }
- });
- /** @type {Array} */
- var eventPath = [];
- /** @type {RegExp} */
- var rjsonp = /(=)\?(?=&|$)|\?\?/;
- jQuery.ajaxSetup({
- jsonp : "callback",
- /**
- * @return {?}
- */
- jsonpCallback : function() {
- var unlock = eventPath.pop() || jQuery.expando + "_" + iIdCounter++;
- return this[unlock] = true, unlock;
- }
- });
- jQuery.ajaxPrefilter("json jsonp", function(s, originalSettings, jqXHR) {
- var callbackName;
- var fn;
- var elems;
- /** @type {(boolean|string)} */
- var jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" : "string" == typeof s.data && (0 === (s.contentType || "").indexOf("application/x-www-form-urlencoded") && (rjsonp.test(s.data) && "data")));
- if (jsonProp || "jsonp" === s.dataTypes[0]) {
- return callbackName = s.jsonpCallback = jQuery.isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback, jsonProp ? s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName) : s.jsonp !== false && (s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName), s.converters["script json"] = function() {
- return elems || jQuery.error(callbackName + " was not called"), elems[0];
- }, s.dataTypes[0] = "json", fn = win[callbackName], win[callbackName] = function() {
- /** @type {Arguments} */
- elems = arguments;
- }, jqXHR.always(function() {
- if (void 0 === fn) {
- jQuery(win).removeProp(callbackName);
- } else {
- win[callbackName] = fn;
- }
- if (s[callbackName]) {
- s.jsonpCallback = originalSettings.jsonpCallback;
- eventPath.push(callbackName);
- }
- if (elems) {
- if (jQuery.isFunction(fn)) {
- fn(elems[0]);
- }
- }
- elems = fn = void 0;
- }), "script";
- }
- });
- support.createHTMLDocument = function() {
- var body = doc.implementation.createHTMLDocument("").body;
- return body.innerHTML = "<form></form><form></form>", 2 === body.childNodes.length;
- }();
- /**
- * @param {?} data
- * @param {Object} context
- * @param {(Function|string)} keepScripts
- * @return {?}
- */
- jQuery.parseHTML = function(data, context, keepScripts) {
- if ("string" != typeof data) {
- return[];
- }
- if ("boolean" == typeof context) {
- /** @type {Object} */
- keepScripts = context;
- /** @type {boolean} */
- context = false;
- }
- var comp;
- var parsed;
- var scripts;
- return context || (support.createHTMLDocument ? (context = doc.implementation.createHTMLDocument(""), comp = context.createElement("base"), comp.href = doc.location.href, context.head.appendChild(comp)) : context = doc), parsed = rsingleTag.exec(data), scripts = !keepScripts && [], parsed ? [context.createElement(parsed[1])] : (parsed = parse([data], context, scripts), scripts && (scripts.length && jQuery(scripts).remove()), jQuery.merge([], parsed.childNodes));
- };
- /**
- * @param {(Function|string)} source
- * @param {Object} data
- * @param {Object} callback
- * @return {?}
- */
- jQuery.fn.load = function(source, data, callback) {
- var selector;
- var method;
- var args;
- var self = this;
- var n = source.indexOf(" ");
- return n > -1 && (selector = $(source.slice(n)), source = source.slice(0, n)), jQuery.isFunction(data) ? (callback = data, data = void 0) : data && ("object" == typeof data && (method = "POST")), self.length > 0 && jQuery.ajax({
- url : source,
- type : method || "GET",
- dataType : "html",
- data : data
- }).done(function(responseText) {
- /** @type {Arguments} */
- args = arguments;
- self.html(selector ? jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) : responseText);
- }).always(callback && function(elem, dataAndEvents) {
- self.each(function() {
- callback.apply(this, args || [elem.responseText, dataAndEvents, elem]);
- });
- }), this;
- };
- jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(dataAndEvents, name) {
- /**
- * @param {Function} selector
- * @return {?}
- */
- jQuery.fn[name] = function(selector) {
- return this.on(name, selector);
- };
- });
- /**
- * @param {undefined} elem
- * @return {?}
- */
- jQuery.expr.pseudos.animated = function(elem) {
- return jQuery.grep(jQuery.timers, function(fn) {
- return elem === fn.elem;
- }).length;
- };
- jQuery.offset = {
- /**
- * @param {Object} elem
- * @param {Object} value
- * @param {?} i
- * @return {undefined}
- */
- setOffset : function(elem, value, i) {
- var curPosition;
- var curLeft;
- var curCSSTop;
- var curTop;
- var offset;
- var curCSSLeft;
- var j;
- var position = jQuery.css(elem, "position");
- var curElem = jQuery(elem);
- var cur = {};
- if ("static" === position) {
- /** @type {string} */
- elem.style.position = "relative";
- }
- offset = curElem.offset();
- curCSSTop = jQuery.css(elem, "top");
- curCSSLeft = jQuery.css(elem, "left");
- /** @type {boolean} */
- j = ("absolute" === position || "fixed" === position) && (curCSSTop + curCSSLeft).indexOf("auto") > -1;
- if (j) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
- } else {
- /** @type {number} */
- curTop = parseFloat(curCSSTop) || 0;
- /** @type {number} */
- curLeft = parseFloat(curCSSLeft) || 0;
- }
- if (jQuery.isFunction(value)) {
- value = value.call(elem, i, jQuery.extend({}, offset));
- }
- if (null != value.top) {
- /** @type {number} */
- cur.top = value.top - offset.top + curTop;
- }
- if (null != value.left) {
- /** @type {number} */
- cur.left = value.left - offset.left + curLeft;
- }
- if ("using" in value) {
- value.using.call(elem, cur);
- } else {
- curElem.css(cur);
- }
- }
- };
- jQuery.fn.extend({
- /**
- * @param {number} options
- * @return {?}
- */
- offset : function(options) {
- if (arguments.length) {
- return void 0 === options ? this : this.each(function(dataName) {
- jQuery.offset.setOffset(this, options, dataName);
- });
- }
- var docElem;
- var win;
- var box;
- var doc;
- var element = this[0];
- if (element) {
- return element.getClientRects().length ? (box = element.getBoundingClientRect(), box.width || box.height ? (doc = element.ownerDocument, win = getWindow(doc), docElem = doc.documentElement, {
- top : box.top + win.pageYOffset - docElem.clientTop,
- left : box.left + win.pageXOffset - docElem.clientLeft
- }) : box) : {
- top : 0,
- left : 0
- };
- }
- },
- /**
- * @return {?}
- */
- position : function() {
- if (this[0]) {
- var elem;
- var gdOffset;
- var offsetParent = this[0];
- var offset = {
- top : 0,
- left : 0
- };
- return "fixed" === jQuery.css(offsetParent, "position") ? gdOffset = offsetParent.getBoundingClientRect() : (elem = this.offsetParent(), gdOffset = this.offset(), jQuery.nodeName(elem[0], "html") || (offset = elem.offset()), offset = {
- top : offset.top + jQuery.css(elem[0], "borderTopWidth", true),
- left : offset.left + jQuery.css(elem[0], "borderLeftWidth", true)
- }), {
- top : gdOffset.top - offset.top - jQuery.css(offsetParent, "marginTop", true),
- left : gdOffset.left - offset.left - jQuery.css(offsetParent, "marginLeft", true)
- };
- }
- },
- /**
- * @return {?}
- */
- offsetParent : function() {
- return this.map(function() {
- var offsetParent = this.offsetParent;
- for (;offsetParent && "static" === jQuery.css(offsetParent, "position");) {
- offsetParent = offsetParent.offsetParent;
- }
- return offsetParent || docElem;
- });
- }
- });
- jQuery.each({
- scrollLeft : "pageXOffset",
- scrollTop : "pageYOffset"
- }, function(name, prop) {
- /** @type {boolean} */
- var top = "pageYOffset" === prop;
- /**
- * @param {string} isXML
- * @return {?}
- */
- jQuery.fn[name] = function(isXML) {
- return access(this, function(elem, method, val) {
- var win = getWindow(elem);
- return void 0 === val ? win ? win[prop] : elem[method] : void(win ? win.scrollTo(top ? win.pageXOffset : val, top ? val : win.pageYOffset) : elem[method] = val);
- }, name, isXML, arguments.length);
- };
- });
- jQuery.each(["top", "left"], function(dataAndEvents, prop) {
- jQuery.cssHooks[prop] = addGetHookIf(support.pixelPosition, function(elem, val) {
- if (val) {
- return val = css(elem, prop), rnumnonpx.test(val) ? jQuery(elem).position()[prop] + "px" : val;
- }
- });
- });
- jQuery.each({
- Height : "height",
- Width : "width"
- }, function(name, type) {
- jQuery.each({
- padding : "inner" + name,
- content : type,
- "" : "outer" + name
- }, function(defaultExtra, original) {
- /**
- * @param {?} margin
- * @param {boolean} value
- * @return {?}
- */
- jQuery.fn[original] = function(margin, value) {
- var chainable = arguments.length && (defaultExtra || "boolean" != typeof margin);
- var extra = defaultExtra || (margin === true || value === true ? "margin" : "border");
- return access(this, function(elem, prop, value) {
- var doc;
- return jQuery.isWindow(elem) ? 0 === original.indexOf("outer") ? elem["inner" + name] : elem.document.documentElement["client" + name] : 9 === elem.nodeType ? (doc = elem.documentElement, Math.max(elem.body["scroll" + name], doc["scroll" + name], elem.body["offset" + name], doc["offset" + name], doc["client" + name])) : void 0 === value ? jQuery.css(elem, prop, extra) : jQuery.style(elem, prop, value, extra);
- }, type, chainable ? margin : void 0, chainable);
- };
- });
- });
- jQuery.fn.extend({
- /**
- * @param {string} ev
- * @param {Object} one
- * @param {Function} fn
- * @return {?}
- */
- bind : function(ev, one, fn) {
- return this.on(ev, null, one, fn);
- },
- /**
- * @param {Object} type
- * @param {Function} fn
- * @return {?}
- */
- unbind : function(type, fn) {
- return this.off(type, null, fn);
- },
- /**
- * @param {Function} selector
- * @param {string} ev
- * @param {Object} data
- * @param {Function} fn
- * @return {?}
- */
- delegate : function(selector, ev, data, fn) {
- return this.on(ev, selector, data, fn);
- },
- /**
- * @param {string} selector
- * @param {Object} event
- * @param {Function} fn
- * @return {?}
- */
- undelegate : function(selector, event, fn) {
- return 1 === arguments.length ? this.off(selector, "**") : this.off(event, selector || "**", fn);
- }
- });
- /** @type {function (this:JSONType, string, function (string, *): *=): *} */
- jQuery.parseJSON = JSON.parse;
- if ("function" == typeof define) {
- if (define.amd) {
- define("jquery", [], function() {
- return jQuery;
- });
- }
- }
- var _jQuery = win.jQuery;
- var _$ = win.$;
- return jQuery.noConflict = function(deep) {
- return win.$ === jQuery && (win.$ = _$), deep && (win.jQuery === jQuery && (win.jQuery = _jQuery)), jQuery;
- }, dataAndEvents || (win.jQuery = win.$ = jQuery), jQuery;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement