Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function shareIdea(t, e, n) {
- $(t).each(function() {
- $(this).click(function() {
- var t = $(this).closest(".idea-widget").find("a.title").attr("href"),
- i = $(this).closest(".idea-widget").find("a.title").text();
- return myWin = n ? open(e + t + n + i, "displayWindow", "width=520,height=300,left=350,top=170,status=no,toolbar=no,menubar=no") : open(e + t, "displayWindow", "width=520,height=300,left=350,top=170,status=no,toolbar=no,menubar=no"), !1
- })
- })
- }! function(t, e) {
- "object" == typeof module && "object" == typeof module.exports ? module.exports = t.document ? e(t, !0) : function(t) {
- if (!t.document) throw new Error("jQuery requires a window with a document");
- return e(t)
- } : e(t)
- }("undefined" != typeof window ? window : this, function(t, e) {
- function n(t) {
- var e = t.length,
- n = oe.type(t);
- return "function" === n || oe.isWindow(t) ? !1 : 1 === t.nodeType && e ? !0 : "array" === n || 0 === e || "number" == typeof e && e > 0 && e - 1 in t
- }
- function i(t, e, n) {
- if (oe.isFunction(e)) return oe.grep(t, function(t, i) {
- return !!e.call(t, i, t) !== n
- });
- if (e.nodeType) return oe.grep(t, function(t) {
- return t === e !== n
- });
- if ("string" == typeof e) {
- if (de.test(e)) return oe.filter(e, t, n);
- e = oe.filter(e, t)
- }
- return oe.grep(t, function(t) {
- return oe.inArray(t, e) >= 0 !== n
- })
- }
- function o(t, e) {
- do t = t[e]; while (t && 1 !== t.nodeType);
- return t
- }
- function r(t) {
- var e = xe[t] = {};
- return oe.each(t.match(be) || [], function(t, n) {
- e[n] = !0
- }), e
- }
- function s() {
- pe.addEventListener ? (pe.removeEventListener("DOMContentLoaded", a, !1), t.removeEventListener("load", a, !1)) : (pe.detachEvent("onreadystatechange", a), t.detachEvent("onload", a))
- }
- function a() {
- (pe.addEventListener || "load" === event.type || "complete" === pe.readyState) && (s(), oe.ready())
- }
- function l(t, e, n) {
- if (void 0 === n && 1 === t.nodeType) {
- var i = "data-" + e.replace(Te, "-$1").toLowerCase();
- if (n = t.getAttribute(i), "string" == typeof n) {
- try {
- n = "true" === n ? !0 : "false" === n ? !1 : "null" === n ? null : +n + "" === n ? +n : _e.test(n) ? oe.parseJSON(n) : n
- } catch (o) {}
- oe.data(t, e, n)
- } else n = void 0
- }
- return n
- }
- function c(t) {
- var e;
- for (e in t)
- if (("data" !== e || !oe.isEmptyObject(t[e])) && "toJSON" !== e) return !1;
- return !0
- }
- function u(t, e, n, i) {
- if (oe.acceptData(t)) {
- var o, r, s = oe.expando,
- a = t.nodeType,
- l = a ? oe.cache : t,
- c = a ? t[s] : t[s] && s;
- if (c && l[c] && (i || l[c].data) || void 0 !== n || "string" != typeof e) return c || (c = a ? t[s] = Y.pop() || oe.guid++ : s), l[c] || (l[c] = a ? {} : {
- toJSON: oe.noop
- }), ("object" == typeof e || "function" == typeof e) && (i ? l[c] = oe.extend(l[c], e) : l[c].data = oe.extend(l[c].data, e)), r = l[c], i || (r.data || (r.data = {}), r = r.data), void 0 !== n && (r[oe.camelCase(e)] = n), "string" == typeof e ? (o = r[e], null == o && (o = r[oe.camelCase(e)])) : o = r, o
- }
- }
- function h(t, e, n) {
- if (oe.acceptData(t)) {
- var i, o, r = t.nodeType,
- s = r ? oe.cache : t,
- a = r ? t[oe.expando] : oe.expando;
- if (s[a]) {
- if (e && (i = n ? s[a] : s[a].data)) {
- oe.isArray(e) ? e = e.concat(oe.map(e, oe.camelCase)) : e in i ? e = [e] : (e = oe.camelCase(e), e = e in i ? [e] : e.split(" ")), o = e.length;
- for (; o--;) delete i[e[o]];
- if (n ? !c(i) : !oe.isEmptyObject(i)) return
- }(n || (delete s[a].data, c(s[a]))) && (r ? oe.cleanData([t], !0) : ne.deleteExpando || s != s.window ? delete s[a] : s[a] = null)
- }
- }
- }
- function d() {
- return !0
- }
- function f() {
- return !1
- }
- function p() {
- try {
- return pe.activeElement
- } catch (t) {}
- }
- function m(t) {
- var e = Le.split("|"),
- n = t.createDocumentFragment();
- if (n.createElement)
- for (; e.length;) n.createElement(e.pop());
- return n
- }
- function g(t, e) {
- var n, i, o = 0,
- r = typeof t.getElementsByTagName !== ke ? t.getElementsByTagName(e || "*") : typeof t.querySelectorAll !== ke ? t.querySelectorAll(e || "*") : void 0;
- if (!r)
- for (r = [], n = t.childNodes || t; null != (i = n[o]); o++) !e || oe.nodeName(i, e) ? r.push(i) : oe.merge(r, g(i, e));
- return void 0 === e || e && oe.nodeName(t, e) ? oe.merge([t], r) : r
- }
- function v(t) {
- De.test(t.type) && (t.defaultChecked = t.checked)
- }
- function y(t, e) {
- return oe.nodeName(t, "table") && oe.nodeName(11 !== e.nodeType ? e : e.firstChild, "tr") ? t.getElementsByTagName("tbody")[0] || t.appendChild(t.ownerDocument.createElement("tbody")) : t
- }
- function b(t) {
- return t.type = (null !== oe.find.attr(t, "type")) + "/" + t.type, t
- }
- function x(t) {
- var e = Ue.exec(t.type);
- return e ? t.type = e[1] : t.removeAttribute("type"), t
- }
- function w(t, e) {
- for (var n, i = 0; null != (n = t[i]); i++) oe._data(n, "globalEval", !e || oe._data(e[i], "globalEval"))
- }
- function C(t, e) {
- if (1 === e.nodeType && oe.hasData(t)) {
- var n, i, o, r = oe._data(t),
- s = oe._data(e, r),
- a = r.events;
- if (a) {
- delete s.handle, s.events = {};
- for (n in a)
- for (i = 0, o = a[n].length; o > i; i++) oe.event.add(e, n, a[n][i])
- }
- s.data && (s.data = oe.extend({}, s.data))
- }
- }
- function k(t, e) {
- var n, i, o;
- if (1 === e.nodeType) {
- if (n = e.nodeName.toLowerCase(), !ne.noCloneEvent && e[oe.expando]) {
- o = oe._data(e);
- for (i in o.events) oe.removeEvent(e, i, o.handle);
- e.removeAttribute(oe.expando)
- }
- "script" === n && e.text !== t.text ? (b(e).text = t.text, x(e)) : "object" === n ? (e.parentNode && (e.outerHTML = t.outerHTML), ne.html5Clone && t.innerHTML && !oe.trim(e.innerHTML) && (e.innerHTML = t.innerHTML)) : "input" === n && De.test(t.type) ? (e.defaultChecked = e.checked = t.checked, e.value !== t.value && (e.value = t.value)) : "option" === n ? e.defaultSelected = e.selected = t.defaultSelected : ("input" === n || "textarea" === n) && (e.defaultValue = t.defaultValue)
- }
- }
- function _(e, n) {
- var i, o = oe(n.createElement(e)).appendTo(n.body),
- r = t.getDefaultComputedStyle && (i = t.getDefaultComputedStyle(o[0])) ? i.display : oe.css(o[0], "display");
- return o.detach(), r
- }
- function T(t) {
- var e = pe,
- n = Ze[t];
- return n || (n = _(t, e), "none" !== n && n || (Ke = (Ke || oe("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement), e = (Ke[0].contentWindow || Ke[0].contentDocument).document, e.write(), e.close(), n = _(t, e), Ke.detach()), Ze[t] = n), n
- }
- function $(t, e) {
- return {
- get: function() {
- var n = t();
- if (null != n) return n ? void delete this.get : (this.get = e).apply(this, arguments)
- }
- }
- }
- function S(t, e) {
- if (e in t) return e;
- for (var n = e.charAt(0).toUpperCase() + e.slice(1), i = e, o = fn.length; o--;)
- if (e = fn[o] + n, e in t) return e;
- return i
- }
- function E(t, e) {
- for (var n, i, o, r = [], s = 0, a = t.length; a > s; s++) i = t[s], i.style && (r[s] = oe._data(i, "olddisplay"), n = i.style.display, e ? (r[s] || "none" !== n || (i.style.display = ""), "" === i.style.display && Ee(i) && (r[s] = oe._data(i, "olddisplay", T(i.nodeName)))) : (o = Ee(i), (n && "none" !== n || !o) && oe._data(i, "olddisplay", o ? n : oe.css(i, "display"))));
- for (s = 0; a > s; s++) i = t[s], i.style && (e && "none" !== i.style.display && "" !== i.style.display || (i.style.display = e ? r[s] || "" : "none"));
- return t
- }
- function N(t, e, n) {
- var i = cn.exec(e);
- return i ? Math.max(0, i[1] - (n || 0)) + (i[2] || "px") : e
- }
- function D(t, e, n, i, o) {
- for (var r = n === (i ? "border" : "content") ? 4 : "width" === e ? 1 : 0, s = 0; 4 > r; r += 2) "margin" === n && (s += oe.css(t, n + Se[r], !0, o)), i ? ("content" === n && (s -= oe.css(t, "padding" + Se[r], !0, o)), "margin" !== n && (s -= oe.css(t, "border" + Se[r] + "Width", !0, o))) : (s += oe.css(t, "padding" + Se[r], !0, o), "padding" !== n && (s += oe.css(t, "border" + Se[r] + "Width", !0, o)));
- return s
- }
- function j(t, e, n) {
- var i = !0,
- o = "width" === e ? t.offsetWidth : t.offsetHeight,
- r = tn(t),
- s = ne.boxSizing && "border-box" === oe.css(t, "boxSizing", !1, r);
- if (0 >= o || null == o) {
- if (o = en(t, e, r), (0 > o || null == o) && (o = t.style[e]), on.test(o)) return o;
- i = s && (ne.boxSizingReliable() || o === t.style[e]), o = parseFloat(o) || 0
- }
- return o + D(t, e, n || (s ? "border" : "content"), i, r) + "px"
- }
- function P(t, e, n, i, o) {
- return new P.prototype.init(t, e, n, i, o)
- }
- function A() {
- return setTimeout(function() {
- pn = void 0
- }), pn = oe.now()
- }
- function H(t, e) {
- var n, i = {
- height: t
- },
- o = 0;
- for (e = e ? 1 : 0; 4 > o; o += 2 - e) n = Se[o], i["margin" + n] = i["padding" + n] = t;
- return e && (i.opacity = i.width = t), i
- }
- function I(t, e, n) {
- for (var i, o = (xn[e] || []).concat(xn["*"]), r = 0, s = o.length; s > r; r++)
- if (i = o[r].call(n, e, t)) return i
- }
- function L(t, e, n) {
- var i, o, r, s, a, l, c, u, h = this,
- d = {},
- f = t.style,
- p = t.nodeType && Ee(t),
- m = oe._data(t, "fxshow");
- n.queue || (a = oe._queueHooks(t, "fx"), null == a.unqueued && (a.unqueued = 0, l = a.empty.fire, a.empty.fire = function() {
- a.unqueued || l()
- }), a.unqueued++, h.always(function() {
- h.always(function() {
- a.unqueued--, oe.queue(t, "fx").length || a.empty.fire()
- })
- })), 1 === t.nodeType && ("height" in e || "width" in e) && (n.overflow = [f.overflow, f.overflowX, f.overflowY], c = oe.css(t, "display"), u = "none" === c ? oe._data(t, "olddisplay") || T(t.nodeName) : c, "inline" === u && "none" === oe.css(t, "float") && (ne.inlineBlockNeedsLayout && "inline" !== T(t.nodeName) ? f.zoom = 1 : f.display = "inline-block")), n.overflow && (f.overflow = "hidden", ne.shrinkWrapBlocks() || h.always(function() {
- f.overflow = n.overflow[0], f.overflowX = n.overflow[1], f.overflowY = n.overflow[2]
- }));
- for (i in e)
- if (o = e[i], gn.exec(o)) {
- if (delete e[i], r = r || "toggle" === o, o === (p ? "hide" : "show")) {
- if ("show" !== o || !m || void 0 === m[i]) continue;
- p = !0
- }
- d[i] = m && m[i] || oe.style(t, i)
- } else c = void 0;
- if (oe.isEmptyObject(d)) "inline" === ("none" === c ? T(t.nodeName) : c) && (f.display = c);
- else {
- m ? "hidden" in m && (p = m.hidden) : m = oe._data(t, "fxshow", {}), r && (m.hidden = !p), p ? oe(t).show() : h.done(function() {
- oe(t).hide()
- }), h.done(function() {
- var e;
- oe._removeData(t, "fxshow");
- for (e in d) oe.style(t, e, d[e])
- });
- for (i in d) s = I(p ? m[i] : 0, i, h), i in m || (m[i] = s.start, p && (s.end = s.start, s.start = "width" === i || "height" === i ? 1 : 0))
- }
- }
- function M(t, e) {
- var n, i, o, r, s;
- for (n in t)
- if (i = oe.camelCase(n), o = e[i], r = t[n], oe.isArray(r) && (o = r[1], r = t[n] = r[0]), n !== i && (t[i] = r, delete t[n]), s = oe.cssHooks[i], s && "expand" in s) {
- r = s.expand(r), delete t[i];
- for (n in r) n in t || (t[n] = r[n], e[n] = o)
- } else e[i] = o
- }
- function O(t, e, n) {
- var i, o, r = 0,
- s = bn.length,
- a = oe.Deferred().always(function() {
- delete l.elem
- }),
- l = function() {
- if (o) return !1;
- for (var e = pn || A(), n = Math.max(0, c.startTime + c.duration - e), i = n / c.duration || 0, r = 1 - i, s = 0, l = c.tweens.length; l > s; s++) c.tweens[s].run(r);
- return a.notifyWith(t, [c, r, n]), 1 > r && l ? n : (a.resolveWith(t, [c]), !1)
- },
- c = a.promise({
- elem: t,
- props: oe.extend({}, e),
- opts: oe.extend(!0, {
- specialEasing: {}
- }, n),
- originalProperties: e,
- originalOptions: n,
- startTime: pn || A(),
- duration: n.duration,
- tweens: [],
- createTween: function(e, n) {
- var i = oe.Tween(t, c.opts, e, n, c.opts.specialEasing[e] || c.opts.easing);
- return c.tweens.push(i), i
- },
- stop: function(e) {
- var n = 0,
- i = e ? c.tweens.length : 0;
- if (o) return this;
- for (o = !0; i > n; n++) c.tweens[n].run(1);
- return e ? a.resolveWith(t, [c, e]) : a.rejectWith(t, [c, e]), this
- }
- }),
- u = c.props;
- for (M(u, c.opts.specialEasing); s > r; r++)
- if (i = bn[r].call(c, t, u, c.opts)) return i;
- return oe.map(u, I, c), oe.isFunction(c.opts.start) && c.opts.start.call(t, c), oe.fx.timer(oe.extend(l, {
- elem: t,
- anim: c,
- queue: c.opts.queue
- })), c.progress(c.opts.progress).done(c.opts.done, c.opts.complete).fail(c.opts.fail).always(c.opts.always)
- }
- function F(t) {
- return function(e, n) {
- "string" != typeof e && (n = e, e = "*");
- var i, o = 0,
- r = e.toLowerCase().match(be) || [];
- if (oe.isFunction(n))
- for (; i = r[o++];) "+" === i.charAt(0) ? (i = i.slice(1) || "*", (t[i] = t[i] || []).unshift(n)) : (t[i] = t[i] || []).push(n)
- }
- }
- function W(t, e, n, i) {
- function o(a) {
- var l;
- return r[a] = !0, oe.each(t[a] || [], function(t, a) {
- var c = a(e, n, i);
- return "string" != typeof c || s || r[c] ? s ? !(l = c) : void 0 : (e.dataTypes.unshift(c), o(c), !1)
- }), l
- }
- var r = {},
- s = t === Rn;
- return o(e.dataTypes[0]) || !r["*"] && o("*")
- }
- function q(t, e) {
- var n, i, o = oe.ajaxSettings.flatOptions || {};
- for (i in e) void 0 !== e[i] && ((o[i] ? t : n || (n = {}))[i] = e[i]);
- return n && oe.extend(!0, t, n), t
- }
- function z(t, e, n) {
- for (var i, o, r, s, a = t.contents, l = t.dataTypes;
- "*" === l[0];) l.shift(), void 0 === o && (o = t.mimeType || e.getResponseHeader("Content-Type"));
- if (o)
- for (s in a)
- if (a[s] && a[s].test(o)) {
- l.unshift(s);
- break
- }
- if (l[0] in n) r = l[0];
- else {
- for (s in n) {
- if (!l[0] || t.converters[s + " " + l[0]]) {
- r = s;
- break
- }
- i || (i = s)
- }
- r = r || i
- }
- return r ? (r !== l[0] && l.unshift(r), n[r]) : void 0
- }
- function B(t, e, n, i) {
- var o, r, s, a, l, c = {},
- u = t.dataTypes.slice();
- if (u[1])
- for (s in t.converters) c[s.toLowerCase()] = t.converters[s];
- for (r = u.shift(); r;)
- if (t.responseFields[r] && (n[t.responseFields[r]] = e), !l && i && t.dataFilter && (e = t.dataFilter(e, t.dataType)), l = r, r = u.shift())
- if ("*" === r) r = l;
- else if ("*" !== l && l !== r) {
- if (s = c[l + " " + r] || c["* " + r], !s)
- for (o in c)
- if (a = o.split(" "), a[1] === r && (s = c[l + " " + a[0]] || c["* " + a[0]])) {
- s === !0 ? s = c[o] : c[o] !== !0 && (r = a[0], u.unshift(a[1]));
- break
- }
- if (s !== !0)
- if (s && t["throws"]) e = s(e);
- else try {
- e = s(e)
- } catch (h) {
- return {
- state: "parsererror",
- error: s ? h : "No conversion from " + l + " to " + r
- }
- }
- }
- return {
- state: "success",
- data: e
- }
- }
- function R(t, e, n, i) {
- var o;
- if (oe.isArray(e)) oe.each(e, function(e, o) {
- n || Yn.test(t) ? i(t, o) : R(t + "[" + ("object" == typeof o ? e : "") + "]", o, n, i)
- });
- else if (n || "object" !== oe.type(e)) i(t, e);
- else
- for (o in e) R(t + "[" + o + "]", e[o], n, i)
- }
- function X() {
- try {
- return new t.XMLHttpRequest
- } catch (e) {}
- }
- function Q() {
- try {
- return new t.ActiveXObject("Microsoft.XMLHTTP")
- } catch (e) {}
- }
- function U(t) {
- return oe.isWindow(t) ? t : 9 === t.nodeType ? t.defaultView || t.parentWindow : !1
- }
- var Y = [],
- V = Y.slice,
- G = Y.concat,
- J = Y.push,
- K = Y.indexOf,
- Z = {},
- te = Z.toString,
- ee = Z.hasOwnProperty,
- ne = {},
- ie = "1.11.1",
- oe = function(t, e) {
- return new oe.fn.init(t, e)
- },
- re = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
- se = /^-ms-/,
- ae = /-([\da-z])/gi,
- le = function(t, e) {
- return e.toUpperCase()
- };
- oe.fn = oe.prototype = {
- jquery: ie,
- constructor: oe,
- selector: "",
- length: 0,
- toArray: function() {
- return V.call(this)
- },
- get: function(t) {
- return null != t ? 0 > t ? this[t + this.length] : this[t] : V.call(this)
- },
- pushStack: function(t) {
- var e = oe.merge(this.constructor(), t);
- return e.prevObject = this, e.context = this.context, e
- },
- each: function(t, e) {
- return oe.each(this, t, e)
- },
- map: function(t) {
- return this.pushStack(oe.map(this, function(e, n) {
- return t.call(e, n, e)
- }))
- },
- slice: function() {
- return this.pushStack(V.apply(this, arguments))
- },
- first: function() {
- return this.eq(0)
- },
- last: function() {
- return this.eq(-1)
- },
- eq: function(t) {
- var e = this.length,
- n = +t + (0 > t ? e : 0);
- return this.pushStack(n >= 0 && e > n ? [this[n]] : [])
- },
- end: function() {
- return this.prevObject || this.constructor(null)
- },
- push: J,
- sort: Y.sort,
- splice: Y.splice
- }, oe.extend = oe.fn.extend = function() {
- var t, e, n, i, o, r, s = arguments[0] || {},
- a = 1,
- l = arguments.length,
- c = !1;
- for ("boolean" == typeof s && (c = s, s = arguments[a] || {}, a++), "object" == typeof s || oe.isFunction(s) || (s = {}), a === l && (s = this, a--); l > a; a++)
- if (null != (o = arguments[a]))
- for (i in o) t = s[i], n = o[i], s !== n && (c && n && (oe.isPlainObject(n) || (e = oe.isArray(n))) ? (e ? (e = !1, r = t && oe.isArray(t) ? t : []) : r = t && oe.isPlainObject(t) ? t : {}, s[i] = oe.extend(c, r, n)) : void 0 !== n && (s[i] = n));
- return s
- }, oe.extend({
- expando: "jQuery" + (ie + Math.random()).replace(/\D/g, ""),
- isReady: !0,
- error: function(t) {
- throw new Error(t)
- },
- noop: function() {},
- isFunction: function(t) {
- return "function" === oe.type(t)
- },
- isArray: Array.isArray || function(t) {
- return "array" === oe.type(t)
- },
- isWindow: function(t) {
- return null != t && t == t.window
- },
- isNumeric: function(t) {
- return !oe.isArray(t) && t - parseFloat(t) >= 0
- },
- isEmptyObject: function(t) {
- var e;
- for (e in t) return !1;
- return !0
- },
- isPlainObject: function(t) {
- var e;
- if (!t || "object" !== oe.type(t) || t.nodeType || oe.isWindow(t)) return !1;
- try {
- if (t.constructor && !ee.call(t, "constructor") && !ee.call(t.constructor.prototype, "isPrototypeOf")) return !1
- } catch (n) {
- return !1
- }
- if (ne.ownLast)
- for (e in t) return ee.call(t, e);
- for (e in t);
- return void 0 === e || ee.call(t, e)
- },
- type: function(t) {
- return null == t ? t + "" : "object" == typeof t || "function" == typeof t ? Z[te.call(t)] || "object" : typeof t
- },
- globalEval: function(e) {
- e && oe.trim(e) && (t.execScript || function(e) {
- t.eval.call(t, e)
- })(e)
- },
- camelCase: function(t) {
- return t.replace(se, "ms-").replace(ae, le)
- },
- nodeName: function(t, e) {
- return t.nodeName && t.nodeName.toLowerCase() === e.toLowerCase()
- },
- each: function(t, e, i) {
- var o, r = 0,
- s = t.length,
- a = n(t);
- if (i) {
- if (a)
- for (; s > r && (o = e.apply(t[r], i), o !== !1); r++);
- else
- for (r in t)
- if (o = e.apply(t[r], i), o === !1) break
- } else if (a)
- for (; s > r && (o = e.call(t[r], r, t[r]), o !== !1); r++);
- else
- for (r in t)
- if (o = e.call(t[r], r, t[r]), o === !1) break; return t
- },
- trim: function(t) {
- return null == t ? "" : (t + "").replace(re, "")
- },
- makeArray: function(t, e) {
- var i = e || [];
- return null != t && (n(Object(t)) ? oe.merge(i, "string" == typeof t ? [t] : t) : J.call(i, t)), i
- },
- inArray: function(t, e, n) {
- var i;
- if (e) {
- if (K) return K.call(e, t, n);
- for (i = e.length, n = n ? 0 > n ? Math.max(0, i + n) : n : 0; i > n; n++)
- if (n in e && e[n] === t) return n
- }
- return -1
- },
- merge: function(t, e) {
- for (var n = +e.length, i = 0, o = t.length; n > i;) t[o++] = e[i++];
- if (n !== n)
- for (; void 0 !== e[i];) t[o++] = e[i++];
- return t.length = o, t
- },
- grep: function(t, e, n) {
- for (var i, o = [], r = 0, s = t.length, a = !n; s > r; r++) i = !e(t[r], r), i !== a && o.push(t[r]);
- return o
- },
- map: function(t, e, i) {
- var o, r = 0,
- s = t.length,
- a = n(t),
- l = [];
- if (a)
- for (; s > r; r++) o = e(t[r], r, i), null != o && l.push(o);
- else
- for (r in t) o = e(t[r], r, i), null != o && l.push(o);
- return G.apply([], l)
- },
- guid: 1,
- proxy: function(t, e) {
- var n, i, o;
- return "string" == typeof e && (o = t[e], e = t, t = o), oe.isFunction(t) ? (n = V.call(arguments, 2), i = function() {
- return t.apply(e || this, n.concat(V.call(arguments)))
- }, i.guid = t.guid = t.guid || oe.guid++, i) : void 0
- },
- now: function() {
- return +new Date
- },
- support: ne
- }), oe.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(t, e) {
- Z["[object " + e + "]"] = e.toLowerCase()
- });
- var ce = function(t) {
- function e(t, e, n, i) {
- var o, r, s, a, l, c, h, f, p, m;
- if ((e ? e.ownerDocument || e : W) !== P && j(e), e = e || P, n = n || [], !t || "string" != typeof t) return n;
- if (1 !== (a = e.nodeType) && 9 !== a) return [];
- if (H && !i) {
- if (o = ye.exec(t))
- if (s = o[1]) {
- if (9 === a) {
- if (r = e.getElementById(s), !r || !r.parentNode) return n;
- if (r.id === s) return n.push(r), n
- } else if (e.ownerDocument && (r = e.ownerDocument.getElementById(s)) && O(e, r) && r.id === s) return n.push(r), n
- } else {
- if (o[2]) return Z.apply(n, e.getElementsByTagName(t)), n;
- if ((s = o[3]) && w.getElementsByClassName && e.getElementsByClassName) return Z.apply(n, e.getElementsByClassName(s)), n
- }
- if (w.qsa && (!I || !I.test(t))) {
- if (f = h = F, p = e, m = 9 === a && t, 1 === a && "object" !== e.nodeName.toLowerCase()) {
- for (c = T(t), (h = e.getAttribute("id")) ? f = h.replace(xe, "\\$&") : e.setAttribute("id", f), f = "[id='" + f + "'] ", l = c.length; l--;) c[l] = f + d(c[l]);
- p = be.test(t) && u(e.parentNode) || e, m = c.join(",")
- }
- if (m) try {
- return Z.apply(n, p.querySelectorAll(m)), n
- } catch (g) {} finally {
- h || e.removeAttribute("id")
- }
- }
- }
- return S(t.replace(le, "$1"), e, n, i)
- }
- function n() {
- function t(n, i) {
- return e.push(n + " ") > C.cacheLength && delete t[e.shift()], t[n + " "] = i
- }
- var e = [];
- return t
- }
- function i(t) {
- return t[F] = !0, t
- }
- function o(t) {
- var e = P.createElement("div");
- try {
- return !!t(e)
- } catch (n) {
- return !1
- } finally {
- e.parentNode && e.parentNode.removeChild(e), e = null
- }
- }
- function r(t, e) {
- for (var n = t.split("|"), i = t.length; i--;) C.attrHandle[n[i]] = e
- }
- function s(t, e) {
- var n = e && t,
- i = n && 1 === t.nodeType && 1 === e.nodeType && (~e.sourceIndex || Y) - (~t.sourceIndex || Y);
- if (i) return i;
- if (n)
- for (; n = n.nextSibling;)
- if (n === e) return -1;
- return t ? 1 : -1
- }
- function a(t) {
- return function(e) {
- var n = e.nodeName.toLowerCase();
- return "input" === n && e.type === t
- }
- }
- function l(t) {
- return function(e) {
- var n = e.nodeName.toLowerCase();
- return ("input" === n || "button" === n) && e.type === t
- }
- }
- function c(t) {
- return i(function(e) {
- return e = +e, i(function(n, i) {
- for (var o, r = t([], n.length, e), s = r.length; s--;) n[o = r[s]] && (n[o] = !(i[o] = n[o]))
- })
- })
- }
- function u(t) {
- return t && typeof t.getElementsByTagName !== U && t
- }
- function h() {}
- function d(t) {
- for (var e = 0, n = t.length, i = ""; n > e; e++) i += t[e].value;
- return i
- }
- function f(t, e, n) {
- var i = e.dir,
- o = n && "parentNode" === i,
- r = z++;
- return e.first ? function(e, n, r) {
- for (; e = e[i];)
- if (1 === e.nodeType || o) return t(e, n, r)
- } : function(e, n, s) {
- var a, l, c = [q, r];
- if (s) {
- for (; e = e[i];)
- if ((1 === e.nodeType || o) && t(e, n, s)) return !0
- } else
- for (; e = e[i];)
- if (1 === e.nodeType || o) {
- if (l = e[F] || (e[F] = {}), (a = l[i]) && a[0] === q && a[1] === r) return c[2] = a[2];
- if (l[i] = c, c[2] = t(e, n, s)) return !0
- }
- }
- }
- function p(t) {
- return t.length > 1 ? function(e, n, i) {
- for (var o = t.length; o--;)
- if (!t[o](e, n, i)) return !1;
- return !0
- } : t[0]
- }
- function m(t, n, i) {
- for (var o = 0, r = n.length; r > o; o++) e(t, n[o], i);
- return i
- }
- function g(t, e, n, i, o) {
- for (var r, s = [], a = 0, l = t.length, c = null != e; l > a; a++)(r = t[a]) && (!n || n(r, i, o)) && (s.push(r), c && e.push(a));
- return s
- }
- function v(t, e, n, o, r, s) {
- return o && !o[F] && (o = v(o)), r && !r[F] && (r = v(r, s)), i(function(i, s, a, l) {
- var c, u, h, d = [],
- f = [],
- p = s.length,
- v = i || m(e || "*", a.nodeType ? [a] : a, []),
- y = !t || !i && e ? v : g(v, d, t, a, l),
- b = n ? r || (i ? t : p || o) ? [] : s : y;
- if (n && n(y, b, a, l), o)
- for (c = g(b, f), o(c, [], a, l), u = c.length; u--;)(h = c[u]) && (b[f[u]] = !(y[f[u]] = h));
- if (i) {
- if (r || t) {
- if (r) {
- for (c = [], u = b.length; u--;)(h = b[u]) && c.push(y[u] = h);
- r(null, b = [], c, l)
- }
- for (u = b.length; u--;)(h = b[u]) && (c = r ? ee.call(i, h) : d[u]) > -1 && (i[c] = !(s[c] = h))
- }
- } else b = g(b === s ? b.splice(p, b.length) : b), r ? r(null, s, b, l) : Z.apply(s, b)
- })
- }
- function y(t) {
- for (var e, n, i, o = t.length, r = C.relative[t[0].type], s = r || C.relative[" "], a = r ? 1 : 0, l = f(function(t) {
- return t === e
- }, s, !0), c = f(function(t) {
- return ee.call(e, t) > -1
- }, s, !0), u = [
- function(t, n, i) {
- return !r && (i || n !== E) || ((e = n).nodeType ? l(t, n, i) : c(t, n, i))
- }
- ]; o > a; a++)
- if (n = C.relative[t[a].type]) u = [f(p(u), n)];
- else {
- if (n = C.filter[t[a].type].apply(null, t[a].matches), n[F]) {
- for (i = ++a; o > i && !C.relative[t[i].type]; i++);
- return v(a > 1 && p(u), a > 1 && d(t.slice(0, a - 1).concat({
- value: " " === t[a - 2].type ? "*" : ""
- })).replace(le, "$1"), n, i > a && y(t.slice(a, i)), o > i && y(t = t.slice(i)), o > i && d(t))
- }
- u.push(n)
- }
- return p(u)
- }
- function b(t, n) {
- var o = n.length > 0,
- r = t.length > 0,
- s = function(i, s, a, l, c) {
- var u, h, d, f = 0,
- p = "0",
- m = i && [],
- v = [],
- y = E,
- b = i || r && C.find.TAG("*", c),
- x = q += null == y ? 1 : Math.random() || .1,
- w = b.length;
- for (c && (E = s !== P && s); p !== w && null != (u = b[p]); p++) {
- if (r && u) {
- for (h = 0; d = t[h++];)
- if (d(u, s, a)) {
- l.push(u);
- break
- }
- c && (q = x)
- }
- o && ((u = !d && u) && f--, i && m.push(u))
- }
- if (f += p, o && p !== f) {
- for (h = 0; d = n[h++];) d(m, v, s, a);
- if (i) {
- if (f > 0)
- for (; p--;) m[p] || v[p] || (v[p] = J.call(l));
- v = g(v)
- }
- Z.apply(l, v), c && !i && v.length > 0 && f + n.length > 1 && e.uniqueSort(l)
- }
- return c && (q = x, E = y), m
- };
- return o ? i(s) : s
- }
- var x, w, C, k, _, T, $, S, E, N, D, j, P, A, H, I, L, M, O, F = "sizzle" + -new Date,
- W = t.document,
- q = 0,
- z = 0,
- B = n(),
- R = n(),
- X = n(),
- Q = function(t, e) {
- return t === e && (D = !0), 0
- },
- U = "undefined",
- Y = 1 << 31,
- V = {}.hasOwnProperty,
- G = [],
- J = G.pop,
- K = G.push,
- Z = G.push,
- te = G.slice,
- ee = G.indexOf || function(t) {
- for (var e = 0, n = this.length; n > e; e++)
- if (this[e] === t) return e;
- return -1
- },
- ne = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
- ie = "[\\x20\\t\\r\\n\\f]",
- oe = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
- re = oe.replace("w", "w#"),
- se = "\\[" + ie + "*(" + oe + ")(?:" + ie + "*([*^$|!~]?=)" + ie + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + re + "))|)" + ie + "*\\]",
- ae = ":(" + oe + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + se + ")*)|.*)\\)|)",
- le = new RegExp("^" + ie + "+|((?:^|[^\\\\])(?:\\\\.)*)" + ie + "+$", "g"),
- ce = new RegExp("^" + ie + "*," + ie + "*"),
- ue = new RegExp("^" + ie + "*([>+~]|" + ie + ")" + ie + "*"),
- he = new RegExp("=" + ie + "*([^\\]'\"]*?)" + ie + "*\\]", "g"),
- de = new RegExp(ae),
- fe = new RegExp("^" + re + "$"),
- pe = {
- ID: new RegExp("^#(" + oe + ")"),
- CLASS: new RegExp("^\\.(" + oe + ")"),
- TAG: new RegExp("^(" + oe.replace("w", "w*") + ")"),
- ATTR: new RegExp("^" + se),
- PSEUDO: new RegExp("^" + ae),
- CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + ie + "*(even|odd|(([+-]|)(\\d*)n|)" + ie + "*(?:([+-]|)" + ie + "*(\\d+)|))" + ie + "*\\)|)", "i"),
- bool: new RegExp("^(?:" + ne + ")$", "i"),
- needsContext: new RegExp("^" + ie + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + ie + "*((?:-\\d)?\\d*)" + ie + "*\\)|)(?=[^-]|$)", "i")
- },
- me = /^(?:input|select|textarea|button)$/i,
- ge = /^h\d$/i,
- ve = /^[^{]+\{\s*\[native \w/,
- ye = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
- be = /[+~]/,
- xe = /'|\\/g,
- we = new RegExp("\\\\([\\da-f]{1,6}" + ie + "?|(" + ie + ")|.)", "ig"),
- Ce = function(t, e, n) {
- var i = "0x" + e - 65536;
- return i !== i || n ? e : 0 > i ? String.fromCharCode(i + 65536) : String.fromCharCode(i >> 10 | 55296, 1023 & i | 56320)
- };
- try {
- Z.apply(G = te.call(W.childNodes), W.childNodes), G[W.childNodes.length].nodeType
- } catch (ke) {
- Z = {
- apply: G.length ? function(t, e) {
- K.apply(t, te.call(e))
- } : function(t, e) {
- for (var n = t.length, i = 0; t[n++] = e[i++];);
- t.length = n - 1
- }
- }
- }
- w = e.support = {}, _ = e.isXML = function(t) {
- var e = t && (t.ownerDocument || t).documentElement;
- return e ? "HTML" !== e.nodeName : !1
- }, j = e.setDocument = function(t) {
- var e, n = t ? t.ownerDocument || t : W,
- i = n.defaultView;
- return n !== P && 9 === n.nodeType && n.documentElement ? (P = n, A = n.documentElement, H = !_(n), i && i !== i.top && (i.addEventListener ? i.addEventListener("unload", function() {
- j()
- }, !1) : i.attachEvent && i.attachEvent("onunload", function() {
- j()
- })), w.attributes = o(function(t) {
- return t.className = "i", !t.getAttribute("className")
- }), w.getElementsByTagName = o(function(t) {
- return t.appendChild(n.createComment("")), !t.getElementsByTagName("*").length
- }), w.getElementsByClassName = ve.test(n.getElementsByClassName) && o(function(t) {
- return t.innerHTML = "<div class='a'></div><div class='a i'></div>", t.firstChild.className = "i", 2 === t.getElementsByClassName("i").length
- }), w.getById = o(function(t) {
- return A.appendChild(t).id = F, !n.getElementsByName || !n.getElementsByName(F).length
- }), w.getById ? (C.find.ID = function(t, e) {
- if (typeof e.getElementById !== U && H) {
- var n = e.getElementById(t);
- return n && n.parentNode ? [n] : []
- }
- }, C.filter.ID = function(t) {
- var e = t.replace(we, Ce);
- return function(t) {
- return t.getAttribute("id") === e
- }
- }) : (delete C.find.ID, C.filter.ID = function(t) {
- var e = t.replace(we, Ce);
- return function(t) {
- var n = typeof t.getAttributeNode !== U && t.getAttributeNode("id");
- return n && n.value === e
- }
- }), C.find.TAG = w.getElementsByTagName ? function(t, e) {
- return typeof e.getElementsByTagName !== U ? e.getElementsByTagName(t) : void 0
- } : function(t, e) {
- var n, i = [],
- o = 0,
- r = e.getElementsByTagName(t);
- if ("*" === t) {
- for (; n = r[o++];) 1 === n.nodeType && i.push(n);
- return i
- }
- return r
- }, C.find.CLASS = w.getElementsByClassName && function(t, e) {
- return typeof e.getElementsByClassName !== U && H ? e.getElementsByClassName(t) : void 0
- }, L = [], I = [], (w.qsa = ve.test(n.querySelectorAll)) && (o(function(t) {
- t.innerHTML = "<select msallowclip=''><option selected=''></option></select>", t.querySelectorAll("[msallowclip^='']").length && I.push("[*^$]=" + ie + "*(?:''|\"\")"), t.querySelectorAll("[selected]").length || I.push("\\[" + ie + "*(?:value|" + ne + ")"), t.querySelectorAll(":checked").length || I.push(":checked")
- }), o(function(t) {
- var e = n.createElement("input");
- e.setAttribute("type", "hidden"), t.appendChild(e).setAttribute("name", "D"), t.querySelectorAll("[name=d]").length && I.push("name" + ie + "*[*^$|!~]?="), t.querySelectorAll(":enabled").length || I.push(":enabled", ":disabled"), t.querySelectorAll("*,:x"), I.push(",.*:")
- })), (w.matchesSelector = ve.test(M = A.matches || A.webkitMatchesSelector || A.mozMatchesSelector || A.oMatchesSelector || A.msMatchesSelector)) && o(function(t) {
- w.disconnectedMatch = M.call(t, "div"), M.call(t, "[s!='']:x"), L.push("!=", ae)
- }), I = I.length && new RegExp(I.join("|")), L = L.length && new RegExp(L.join("|")), e = ve.test(A.compareDocumentPosition), O = e || ve.test(A.contains) ? function(t, e) {
- var n = 9 === t.nodeType ? t.documentElement : t,
- i = e && e.parentNode;
- return t === i || !(!i || 1 !== i.nodeType || !(n.contains ? n.contains(i) : t.compareDocumentPosition && 16 & t.compareDocumentPosition(i)))
- } : function(t, e) {
- if (e)
- for (; e = e.parentNode;)
- if (e === t) return !0;
- return !1
- }, Q = e ? function(t, e) {
- if (t === e) return D = !0, 0;
- var i = !t.compareDocumentPosition - !e.compareDocumentPosition;
- return i ? i : (i = (t.ownerDocument || t) === (e.ownerDocument || e) ? t.compareDocumentPosition(e) : 1, 1 & i || !w.sortDetached && e.compareDocumentPosition(t) === i ? t === n || t.ownerDocument === W && O(W, t) ? -1 : e === n || e.ownerDocument === W && O(W, e) ? 1 : N ? ee.call(N, t) - ee.call(N, e) : 0 : 4 & i ? -1 : 1)
- } : function(t, e) {
- if (t === e) return D = !0, 0;
- var i, o = 0,
- r = t.parentNode,
- a = e.parentNode,
- l = [t],
- c = [e];
- if (!r || !a) return t === n ? -1 : e === n ? 1 : r ? -1 : a ? 1 : N ? ee.call(N, t) - ee.call(N, e) : 0;
- if (r === a) return s(t, e);
- for (i = t; i = i.parentNode;) l.unshift(i);
- for (i = e; i = i.parentNode;) c.unshift(i);
- for (; l[o] === c[o];) o++;
- return o ? s(l[o], c[o]) : l[o] === W ? -1 : c[o] === W ? 1 : 0
- }, n) : P
- }, e.matches = function(t, n) {
- return e(t, null, null, n)
- }, e.matchesSelector = function(t, n) {
- if ((t.ownerDocument || t) !== P && j(t), n = n.replace(he, "='$1']"), !(!w.matchesSelector || !H || L && L.test(n) || I && I.test(n))) try {
- var i = M.call(t, n);
- if (i || w.disconnectedMatch || t.document && 11 !== t.document.nodeType) return i
- } catch (o) {}
- return e(n, P, null, [t]).length > 0
- }, e.contains = function(t, e) {
- return (t.ownerDocument || t) !== P && j(t), O(t, e)
- }, e.attr = function(t, e) {
- (t.ownerDocument || t) !== P && j(t);
- var n = C.attrHandle[e.toLowerCase()],
- i = n && V.call(C.attrHandle, e.toLowerCase()) ? n(t, e, !H) : void 0;
- return void 0 !== i ? i : w.attributes || !H ? t.getAttribute(e) : (i = t.getAttributeNode(e)) && i.specified ? i.value : null
- }, e.error = function(t) {
- throw new Error("Syntax error, unrecognized expression: " + t)
- }, e.uniqueSort = function(t) {
- var e, n = [],
- i = 0,
- o = 0;
- if (D = !w.detectDuplicates, N = !w.sortStable && t.slice(0), t.sort(Q), D) {
- for (; e = t[o++];) e === t[o] && (i = n.push(o));
- for (; i--;) t.splice(n[i], 1)
- }
- return N = null, t
- }, k = e.getText = function(t) {
- var e, n = "",
- i = 0,
- o = t.nodeType;
- if (o) {
- if (1 === o || 9 === o || 11 === o) {
- if ("string" == typeof t.textContent) return t.textContent;
- for (t = t.firstChild; t; t = t.nextSibling) n += k(t)
- } else if (3 === o || 4 === o) return t.nodeValue
- } else
- for (; e = t[i++];) n += k(e);
- return n
- }, C = e.selectors = {
- cacheLength: 50,
- createPseudo: i,
- match: pe,
- attrHandle: {},
- find: {},
- relative: {
- ">": {
- dir: "parentNode",
- first: !0
- },
- " ": {
- dir: "parentNode"
- },
- "+": {
- dir: "previousSibling",
- first: !0
- },
- "~": {
- dir: "previousSibling"
- }
- },
- preFilter: {
- ATTR: function(t) {
- return t[1] = t[1].replace(we, Ce), t[3] = (t[3] || t[4] || t[5] || "").replace(we, Ce), "~=" === t[2] && (t[3] = " " + t[3] + " "), t.slice(0, 4)
- },
- CHILD: function(t) {
- return t[1] = t[1].toLowerCase(), "nth" === t[1].slice(0, 3) ? (t[3] || e.error(t[0]), t[4] = +(t[4] ? t[5] + (t[6] || 1) : 2 * ("even" === t[3] || "odd" === t[3])), t[5] = +(t[7] + t[8] || "odd" === t[3])) : t[3] && e.error(t[0]), t
- },
- PSEUDO: function(t) {
- var e, n = !t[6] && t[2];
- return pe.CHILD.test(t[0]) ? null : (t[3] ? t[2] = t[4] || t[5] || "" : n && de.test(n) && (e = T(n, !0)) && (e = n.indexOf(")", n.length - e) - n.length) && (t[0] = t[0].slice(0, e), t[2] = n.slice(0, e)), t.slice(0, 3))
- }
- },
- filter: {
- TAG: function(t) {
- var e = t.replace(we, Ce).toLowerCase();
- return "*" === t ? function() {
- return !0
- } : function(t) {
- return t.nodeName && t.nodeName.toLowerCase() === e
- }
- },
- CLASS: function(t) {
- var e = B[t + " "];
- return e || (e = new RegExp("(^|" + ie + ")" + t + "(" + ie + "|$)")) && B(t, function(t) {
- return e.test("string" == typeof t.className && t.className || typeof t.getAttribute !== U && t.getAttribute("class") || "")
- })
- },
- ATTR: function(t, n, i) {
- return function(o) {
- var r = e.attr(o, t);
- return null == r ? "!=" === n : n ? (r += "", "=" === n ? r === i : "!=" === n ? r !== i : "^=" === n ? i && 0 === r.indexOf(i) : "*=" === n ? i && r.indexOf(i) > -1 : "$=" === n ? i && r.slice(-i.length) === i : "~=" === n ? (" " + r + " ").indexOf(i) > -1 : "|=" === n ? r === i || r.slice(0, i.length + 1) === i + "-" : !1) : !0
- }
- },
- CHILD: function(t, e, n, i, o) {
- var r = "nth" !== t.slice(0, 3),
- s = "last" !== t.slice(-4),
- a = "of-type" === e;
- return 1 === i && 0 === o ? function(t) {
- return !!t.parentNode
- } : function(e, n, l) {
- var c, u, h, d, f, p, m = r !== s ? "nextSibling" : "previousSibling",
- g = e.parentNode,
- v = a && e.nodeName.toLowerCase(),
- y = !l && !a;
- if (g) {
- if (r) {
- for (; m;) {
- for (h = e; h = h[m];)
- if (a ? h.nodeName.toLowerCase() === v : 1 === h.nodeType) return !1;
- p = m = "only" === t && !p && "nextSibling"
- }
- return !0
- }
- if (p = [s ? g.firstChild : g.lastChild], s && y) {
- for (u = g[F] || (g[F] = {}), c = u[t] || [], f = c[0] === q && c[1], d = c[0] === q && c[2], h = f && g.childNodes[f]; h = ++f && h && h[m] || (d = f = 0) || p.pop();)
- if (1 === h.nodeType && ++d && h === e) {
- u[t] = [q, f, d];
- break
- }
- } else if (y && (c = (e[F] || (e[F] = {}))[t]) && c[0] === q) d = c[1];
- else
- for (;
- (h = ++f && h && h[m] || (d = f = 0) || p.pop()) && ((a ? h.nodeName.toLowerCase() !== v : 1 !== h.nodeType) || !++d || (y && ((h[F] || (h[F] = {}))[t] = [q, d]), h !== e)););
- return d -= o, d === i || d % i === 0 && d / i >= 0
- }
- }
- },
- PSEUDO: function(t, n) {
- var o, r = C.pseudos[t] || C.setFilters[t.toLowerCase()] || e.error("unsupported pseudo: " + t);
- return r[F] ? r(n) : r.length > 1 ? (o = [t, t, "", n], C.setFilters.hasOwnProperty(t.toLowerCase()) ? i(function(t, e) {
- for (var i, o = r(t, n), s = o.length; s--;) i = ee.call(t, o[s]), t[i] = !(e[i] = o[s])
- }) : function(t) {
- return r(t, 0, o)
- }) : r
- }
- },
- pseudos: {
- not: i(function(t) {
- var e = [],
- n = [],
- o = $(t.replace(le, "$1"));
- return o[F] ? i(function(t, e, n, i) {
- for (var r, s = o(t, null, i, []), a = t.length; a--;)(r = s[a]) && (t[a] = !(e[a] = r))
- }) : function(t, i, r) {
- return e[0] = t, o(e, null, r, n), !n.pop()
- }
- }),
- has: i(function(t) {
- return function(n) {
- return e(t, n).length > 0
- }
- }),
- contains: i(function(t) {
- return function(e) {
- return (e.textContent || e.innerText || k(e)).indexOf(t) > -1
- }
- }),
- lang: i(function(t) {
- return fe.test(t || "") || e.error("unsupported lang: " + t), t = t.replace(we, Ce).toLowerCase(),
- function(e) {
- var n;
- do
- if (n = H ? e.lang : e.getAttribute("xml:lang") || e.getAttribute("lang")) return n = n.toLowerCase(), n === t || 0 === n.indexOf(t + "-");
- while ((e = e.parentNode) && 1 === e.nodeType);
- return !1
- }
- }),
- target: function(e) {
- var n = t.location && t.location.hash;
- return n && n.slice(1) === e.id
- },
- root: function(t) {
- return t === A
- },
- focus: function(t) {
- return t === P.activeElement && (!P.hasFocus || P.hasFocus()) && !!(t.type || t.href || ~t.tabIndex)
- },
- enabled: function(t) {
- return t.disabled === !1
- },
- disabled: function(t) {
- return t.disabled === !0
- },
- checked: function(t) {
- var e = t.nodeName.toLowerCase();
- return "input" === e && !!t.checked || "option" === e && !!t.selected
- },
- selected: function(t) {
- return t.parentNode && t.parentNode.selectedIndex, t.selected === !0
- },
- empty: function(t) {
- for (t = t.firstChild; t; t = t.nextSibling)
- if (t.nodeType < 6) return !1;
- return !0
- },
- parent: function(t) {
- return !C.pseudos.empty(t)
- },
- header: function(t) {
- return ge.test(t.nodeName)
- },
- input: function(t) {
- return me.test(t.nodeName)
- },
- button: function(t) {
- var e = t.nodeName.toLowerCase();
- return "input" === e && "button" === t.type || "button" === e
- },
- text: function(t) {
- var e;
- return "input" === t.nodeName.toLowerCase() && "text" === t.type && (null == (e = t.getAttribute("type")) || "text" === e.toLowerCase())
- },
- first: c(function() {
- return [0]
- }),
- last: c(function(t, e) {
- return [e - 1]
- }),
- eq: c(function(t, e, n) {
- return [0 > n ? n + e : n]
- }),
- even: c(function(t, e) {
- for (var n = 0; e > n; n += 2) t.push(n);
- return t
- }),
- odd: c(function(t, e) {
- for (var n = 1; e > n; n += 2) t.push(n);
- return t
- }),
- lt: c(function(t, e, n) {
- for (var i = 0 > n ? n + e : n; --i >= 0;) t.push(i);
- return t
- }),
- gt: c(function(t, e, n) {
- for (var i = 0 > n ? n + e : n; ++i < e;) t.push(i);
- return t
- })
- }
- }, C.pseudos.nth = C.pseudos.eq;
- for (x in {
- radio: !0,
- checkbox: !0,
- file: !0,
- password: !0,
- image: !0
- }) C.pseudos[x] = a(x);
- for (x in {
- submit: !0,
- reset: !0
- }) C.pseudos[x] = l(x);
- return h.prototype = C.filters = C.pseudos, C.setFilters = new h, T = e.tokenize = function(t, n) {
- var i, o, r, s, a, l, c, u = R[t + " "];
- if (u) return n ? 0 : u.slice(0);
- for (a = t, l = [], c = C.preFilter; a;) {
- (!i || (o = ce.exec(a))) && (o && (a = a.slice(o[0].length) || a), l.push(r = [])), i = !1, (o = ue.exec(a)) && (i = o.shift(), r.push({
- value: i,
- type: o[0].replace(le, " ")
- }), a = a.slice(i.length));
- for (s in C.filter) !(o = pe[s].exec(a)) || c[s] && !(o = c[s](o)) || (i = o.shift(), r.push({
- value: i,
- type: s,
- matches: o
- }), a = a.slice(i.length));
- if (!i) break
- }
- return n ? a.length : a ? e.error(t) : R(t, l).slice(0)
- }, $ = e.compile = function(t, e) {
- var n, i = [],
- o = [],
- r = X[t + " "];
- if (!r) {
- for (e || (e = T(t)), n = e.length; n--;) r = y(e[n]), r[F] ? i.push(r) : o.push(r);
- r = X(t, b(o, i)), r.selector = t
- }
- return r
- }, S = e.select = function(t, e, n, i) {
- var o, r, s, a, l, c = "function" == typeof t && t,
- h = !i && T(t = c.selector || t);
- if (n = n || [], 1 === h.length) {
- if (r = h[0] = h[0].slice(0), r.length > 2 && "ID" === (s = r[0]).type && w.getById && 9 === e.nodeType && H && C.relative[r[1].type]) {
- if (e = (C.find.ID(s.matches[0].replace(we, Ce), e) || [])[0], !e) return n;
- c && (e = e.parentNode), t = t.slice(r.shift().value.length)
- }
- for (o = pe.needsContext.test(t) ? 0 : r.length; o-- && (s = r[o], !C.relative[a = s.type]);)
- if ((l = C.find[a]) && (i = l(s.matches[0].replace(we, Ce), be.test(r[0].type) && u(e.parentNode) || e))) {
- if (r.splice(o, 1), t = i.length && d(r), !t) return Z.apply(n, i), n;
- break
- }
- }
- return (c || $(t, h))(i, e, !H, n, be.test(t) && u(e.parentNode) || e), n
- }, w.sortStable = F.split("").sort(Q).join("") === F, w.detectDuplicates = !!D, j(), w.sortDetached = o(function(t) {
- return 1 & t.compareDocumentPosition(P.createElement("div"))
- }), o(function(t) {
- return t.innerHTML = "<a href='#'></a>", "#" === t.firstChild.getAttribute("href")
- }) || r("type|href|height|width", function(t, e, n) {
- return n ? void 0 : t.getAttribute(e, "type" === e.toLowerCase() ? 1 : 2)
- }), w.attributes && o(function(t) {
- return t.innerHTML = "<input/>", t.firstChild.setAttribute("value", ""), "" === t.firstChild.getAttribute("value")
- }) || r("value", function(t, e, n) {
- return n || "input" !== t.nodeName.toLowerCase() ? void 0 : t.defaultValue
- }), o(function(t) {
- return null == t.getAttribute("disabled")
- }) || r(ne, function(t, e, n) {
- var i;
- return n ? void 0 : t[e] === !0 ? e.toLowerCase() : (i = t.getAttributeNode(e)) && i.specified ? i.value : null
- }), e
- }(t);
- oe.find = ce, oe.expr = ce.selectors, oe.expr[":"] = oe.expr.pseudos, oe.unique = ce.uniqueSort, oe.text = ce.getText, oe.isXMLDoc = ce.isXML, oe.contains = ce.contains;
- var ue = oe.expr.match.needsContext,
- he = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
- de = /^.[^:#\[\.,]*$/;
- oe.filter = function(t, e, n) {
- var i = e[0];
- return n && (t = ":not(" + t + ")"), 1 === e.length && 1 === i.nodeType ? oe.find.matchesSelector(i, t) ? [i] : [] : oe.find.matches(t, oe.grep(e, function(t) {
- return 1 === t.nodeType
- }))
- }, oe.fn.extend({
- find: function(t) {
- var e, n = [],
- i = this,
- o = i.length;
- if ("string" != typeof t) return this.pushStack(oe(t).filter(function() {
- for (e = 0; o > e; e++)
- if (oe.contains(i[e], this)) return !0
- }));
- for (e = 0; o > e; e++) oe.find(t, i[e], n);
- return n = this.pushStack(o > 1 ? oe.unique(n) : n), n.selector = this.selector ? this.selector + " " + t : t, n
- },
- filter: function(t) {
- return this.pushStack(i(this, t || [], !1))
- },
- not: function(t) {
- return this.pushStack(i(this, t || [], !0))
- },
- is: function(t) {
- return !!i(this, "string" == typeof t && ue.test(t) ? oe(t) : t || [], !1).length
- }
- });
- var fe, pe = t.document,
- me = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
- ge = oe.fn.init = function(t, e) {
- var n, i;
- if (!t) return this;
- if ("string" == typeof t) {
- if (n = "<" === t.charAt(0) && ">" === t.charAt(t.length - 1) && t.length >= 3 ? [null, t, null] : me.exec(t), !n || !n[1] && e) return !e || e.jquery ? (e || fe).find(t) : this.constructor(e).find(t);
- if (n[1]) {
- if (e = e instanceof oe ? e[0] : e, oe.merge(this, oe.parseHTML(n[1], e && e.nodeType ? e.ownerDocument || e : pe, !0)), he.test(n[1]) && oe.isPlainObject(e))
- for (n in e) oe.isFunction(this[n]) ? this[n](e[n]) : this.attr(n, e[n]);
- return this
- }
- if (i = pe.getElementById(n[2]), i && i.parentNode) {
- if (i.id !== n[2]) return fe.find(t);
- this.length = 1, this[0] = i
- }
- return this.context = pe, this.selector = t, this
- }
- return t.nodeType ? (this.context = this[0] = t, this.length = 1, this) : oe.isFunction(t) ? "undefined" != typeof fe.ready ? fe.ready(t) : t(oe) : (void 0 !== t.selector && (this.selector = t.selector, this.context = t.context), oe.makeArray(t, this))
- };
- ge.prototype = oe.fn, fe = oe(pe);
- var ve = /^(?:parents|prev(?:Until|All))/,
- ye = {
- children: !0,
- contents: !0,
- next: !0,
- prev: !0
- };
- oe.extend({
- dir: function(t, e, n) {
- for (var i = [], o = t[e]; o && 9 !== o.nodeType && (void 0 === n || 1 !== o.nodeType || !oe(o).is(n));) 1 === o.nodeType && i.push(o), o = o[e];
- return i
- },
- sibling: function(t, e) {
- for (var n = []; t; t = t.nextSibling) 1 === t.nodeType && t !== e && n.push(t);
- return n
- }
- }), oe.fn.extend({
- has: function(t) {
- var e, n = oe(t, this),
- i = n.length;
- return this.filter(function() {
- for (e = 0; i > e; e++)
- if (oe.contains(this, n[e])) return !0
- })
- },
- closest: function(t, e) {
- for (var n, i = 0, o = this.length, r = [], s = ue.test(t) || "string" != typeof t ? oe(t, e || this.context) : 0; o > i; i++)
- for (n = this[i]; n && n !== e; n = n.parentNode)
- if (n.nodeType < 11 && (s ? s.index(n) > -1 : 1 === n.nodeType && oe.find.matchesSelector(n, t))) {
- r.push(n);
- break
- }
- return this.pushStack(r.length > 1 ? oe.unique(r) : r)
- },
- index: function(t) {
- return t ? "string" == typeof t ? oe.inArray(this[0], oe(t)) : oe.inArray(t.jquery ? t[0] : t, this) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
- },
- add: function(t, e) {
- return this.pushStack(oe.unique(oe.merge(this.get(), oe(t, e))))
- },
- addBack: function(t) {
- return this.add(null == t ? this.prevObject : this.prevObject.filter(t))
- }
- }), oe.each({
- parent: function(t) {
- var e = t.parentNode;
- return e && 11 !== e.nodeType ? e : null
- },
- parents: function(t) {
- return oe.dir(t, "parentNode")
- },
- parentsUntil: function(t, e, n) {
- return oe.dir(t, "parentNode", n)
- },
- next: function(t) {
- return o(t, "nextSibling")
- },
- prev: function(t) {
- return o(t, "previousSibling")
- },
- nextAll: function(t) {
- return oe.dir(t, "nextSibling")
- },
- prevAll: function(t) {
- return oe.dir(t, "previousSibling")
- },
- nextUntil: function(t, e, n) {
- return oe.dir(t, "nextSibling", n)
- },
- prevUntil: function(t, e, n) {
- return oe.dir(t, "previousSibling", n)
- },
- siblings: function(t) {
- return oe.sibling((t.parentNode || {}).firstChild, t)
- },
- children: function(t) {
- return oe.sibling(t.firstChild)
- },
- contents: function(t) {
- return oe.nodeName(t, "iframe") ? t.contentDocument || t.contentWindow.document : oe.merge([], t.childNodes)
- }
- }, function(t, e) {
- oe.fn[t] = function(n, i) {
- var o = oe.map(this, e, n);
- return "Until" !== t.slice(-5) && (i = n), i && "string" == typeof i && (o = oe.filter(i, o)), this.length > 1 && (ye[t] || (o = oe.unique(o)), ve.test(t) && (o = o.reverse())), this.pushStack(o)
- }
- });
- var be = /\S+/g,
- xe = {};
- oe.Callbacks = function(t) {
- t = "string" == typeof t ? xe[t] || r(t) : oe.extend({}, t);
- var e, n, i, o, s, a, l = [],
- c = !t.once && [],
- u = function(r) {
- for (n = t.memory && r, i = !0, s = a || 0, a = 0, o = l.length, e = !0; l && o > s; s++)
- if (l[s].apply(r[0], r[1]) === !1 && t.stopOnFalse) {
- n = !1;
- break
- }
- e = !1, l && (c ? c.length && u(c.shift()) : n ? l = [] : h.disable())
- },
- h = {
- add: function() {
- if (l) {
- var i = l.length;
- ! function r(e) {
- oe.each(e, function(e, n) {
- var i = oe.type(n);
- "function" === i ? t.unique && h.has(n) || l.push(n) : n && n.length && "string" !== i && r(n)
- })
- }(arguments), e ? o = l.length : n && (a = i, u(n))
- }
- return this
- },
- remove: function() {
- return l && oe.each(arguments, function(t, n) {
- for (var i;
- (i = oe.inArray(n, l, i)) > -1;) l.splice(i, 1), e && (o >= i && o--, s >= i && s--)
- }), this
- },
- has: function(t) {
- return t ? oe.inArray(t, l) > -1 : !(!l || !l.length)
- },
- empty: function() {
- return l = [], o = 0, this
- },
- disable: function() {
- return l = c = n = void 0, this
- },
- disabled: function() {
- return !l
- },
- lock: function() {
- return c = void 0, n || h.disable(), this
- },
- locked: function() {
- return !c
- },
- fireWith: function(t, n) {
- return !l || i && !c || (n = n || [], n = [t, n.slice ? n.slice() : n], e ? c.push(n) : u(n)), this
- },
- fire: function() {
- return h.fireWith(this, arguments), this
- },
- fired: function() {
- return !!i
- }
- };
- return h
- }, oe.extend({
- Deferred: function(t) {
- var e = [
- ["resolve", "done", oe.Callbacks("once memory"), "resolved"],
- ["reject", "fail", oe.Callbacks("once memory"), "rejected"],
- ["notify", "progress", oe.Callbacks("memory")]
- ],
- n = "pending",
- i = {
- state: function() {
- return n
- },
- always: function() {
- return o.done(arguments).fail(arguments), this
- },
- then: function() {
- var t = arguments;
- return oe.Deferred(function(n) {
- oe.each(e, function(e, r) {
- var s = oe.isFunction(t[e]) && t[e];
- o[r[1]](function() {
- var t = s && s.apply(this, arguments);
- t && oe.isFunction(t.promise) ? t.promise().done(n.resolve).fail(n.reject).progress(n.notify) : n[r[0] + "With"](this === i ? n.promise() : this, s ? [t] : arguments)
- })
- }), t = null
- }).promise()
- },
- promise: function(t) {
- return null != t ? oe.extend(t, i) : i
- }
- },
- o = {};
- return i.pipe = i.then, oe.each(e, function(t, r) {
- var s = r[2],
- a = r[3];
- i[r[1]] = s.add, a && s.add(function() {
- n = a
- }, e[1 ^ t][2].disable, e[2][2].lock), o[r[0]] = function() {
- return o[r[0] + "With"](this === o ? i : this, arguments), this
- }, o[r[0] + "With"] = s.fireWith
- }), i.promise(o), t && t.call(o, o), o
- },
- when: function(t) {
- var e, n, i, o = 0,
- r = V.call(arguments),
- s = r.length,
- a = 1 !== s || t && oe.isFunction(t.promise) ? s : 0,
- l = 1 === a ? t : oe.Deferred(),
- c = function(t, n, i) {
- return function(o) {
- n[t] = this, i[t] = arguments.length > 1 ? V.call(arguments) : o, i === e ? l.notifyWith(n, i) : --a || l.resolveWith(n, i)
- }
- };
- if (s > 1)
- for (e = new Array(s), n = new Array(s), i = new Array(s); s > o; o++) r[o] && oe.isFunction(r[o].promise) ? r[o].promise().done(c(o, i, r)).fail(l.reject).progress(c(o, n, e)) : --a;
- return a || l.resolveWith(i, r), l.promise()
- }
- });
- var we;
- oe.fn.ready = function(t) {
- return oe.ready.promise().done(t), this
- }, oe.extend({
- isReady: !1,
- readyWait: 1,
- holdReady: function(t) {
- t ? oe.readyWait++ : oe.ready(!0)
- },
- ready: function(t) {
- if (t === !0 ? !--oe.readyWait : !oe.isReady) {
- if (!pe.body) return setTimeout(oe.ready);
- oe.isReady = !0, t !== !0 && --oe.readyWait > 0 || (we.resolveWith(pe, [oe]), oe.fn.triggerHandler && (oe(pe).triggerHandler("ready"), oe(pe).off("ready")))
- }
- }
- }), oe.ready.promise = function(e) {
- if (!we)
- if (we = oe.Deferred(), "complete" === pe.readyState) setTimeout(oe.ready);
- else if (pe.addEventListener) pe.addEventListener("DOMContentLoaded", a, !1), t.addEventListener("load", a, !1);
- else {
- pe.attachEvent("onreadystatechange", a), t.attachEvent("onload", a);
- var n = !1;
- try {
- n = null == t.frameElement && pe.documentElement
- } catch (i) {}
- n && n.doScroll && ! function o() {
- if (!oe.isReady) {
- try {
- n.doScroll("left")
- } catch (t) {
- return setTimeout(o, 50)
- }
- s(), oe.ready()
- }
- }()
- }
- return we.promise(e)
- };
- var Ce, ke = "undefined";
- for (Ce in oe(ne)) break;
- ne.ownLast = "0" !== Ce, ne.inlineBlockNeedsLayout = !1, oe(function() {
- var t, e, n, i;
- n = pe.getElementsByTagName("body")[0], n && n.style && (e = pe.createElement("div"), i = pe.createElement("div"), i.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", n.appendChild(i).appendChild(e), typeof e.style.zoom !== ke && (e.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1", ne.inlineBlockNeedsLayout = t = 3 === e.offsetWidth, t && (n.style.zoom = 1)), n.removeChild(i))
- }),
- function() {
- var t = pe.createElement("div");
- if (null == ne.deleteExpando) {
- ne.deleteExpando = !0;
- try {
- delete t.test
- } catch (e) {
- ne.deleteExpando = !1
- }
- }
- t = null
- }(), oe.acceptData = function(t) {
- var e = oe.noData[(t.nodeName + " ").toLowerCase()],
- n = +t.nodeType || 1;
- return 1 !== n && 9 !== n ? !1 : !e || e !== !0 && t.getAttribute("classid") === e
- };
- var _e = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
- Te = /([A-Z])/g;
- oe.extend({
- cache: {},
- noData: {
- "applet ": !0,
- "embed ": !0,
- "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
- },
- hasData: function(t) {
- return t = t.nodeType ? oe.cache[t[oe.expando]] : t[oe.expando], !!t && !c(t)
- },
- data: function(t, e, n) {
- return u(t, e, n)
- },
- removeData: function(t, e) {
- return h(t, e)
- },
- _data: function(t, e, n) {
- return u(t, e, n, !0)
- },
- _removeData: function(t, e) {
- return h(t, e, !0)
- }
- }), oe.fn.extend({
- data: function(t, e) {
- var n, i, o, r = this[0],
- s = r && r.attributes;
- if (void 0 === t) {
- if (this.length && (o = oe.data(r), 1 === r.nodeType && !oe._data(r, "parsedAttrs"))) {
- for (n = s.length; n--;) s[n] && (i = s[n].name, 0 === i.indexOf("data-") && (i = oe.camelCase(i.slice(5)), l(r, i, o[i])));
- oe._data(r, "parsedAttrs", !0)
- }
- return o
- }
- return "object" == typeof t ? this.each(function() {
- oe.data(this, t)
- }) : arguments.length > 1 ? this.each(function() {
- oe.data(this, t, e)
- }) : r ? l(r, t, oe.data(r, t)) : void 0
- },
- removeData: function(t) {
- return this.each(function() {
- oe.removeData(this, t)
- })
- }
- }), oe.extend({
- queue: function(t, e, n) {
- var i;
- return t ? (e = (e || "fx") + "queue", i = oe._data(t, e), n && (!i || oe.isArray(n) ? i = oe._data(t, e, oe.makeArray(n)) : i.push(n)), i || []) : void 0
- },
- dequeue: function(t, e) {
- e = e || "fx";
- var n = oe.queue(t, e),
- i = n.length,
- o = n.shift(),
- r = oe._queueHooks(t, e),
- s = function() {
- oe.dequeue(t, e)
- };
- "inprogress" === o && (o = n.shift(), i--), o && ("fx" === e && n.unshift("inprogress"), delete r.stop, o.call(t, s, r)), !i && r && r.empty.fire()
- },
- _queueHooks: function(t, e) {
- var n = e + "queueHooks";
- return oe._data(t, n) || oe._data(t, n, {
- empty: oe.Callbacks("once memory").add(function() {
- oe._removeData(t, e + "queue"), oe._removeData(t, n)
- })
- })
- }
- }), oe.fn.extend({
- queue: function(t, e) {
- var n = 2;
- return "string" != typeof t && (e = t, t = "fx", n--), arguments.length < n ? oe.queue(this[0], t) : void 0 === e ? this : this.each(function() {
- var n = oe.queue(this, t, e);
- oe._queueHooks(this, t), "fx" === t && "inprogress" !== n[0] && oe.dequeue(this, t)
- })
- },
- dequeue: function(t) {
- return this.each(function() {
- oe.dequeue(this, t)
- })
- },
- clearQueue: function(t) {
- return this.queue(t || "fx", [])
- },
- promise: function(t, e) {
- var n, i = 1,
- o = oe.Deferred(),
- r = this,
- s = this.length,
- a = function() {
- --i || o.resolveWith(r, [r])
- };
- for ("string" != typeof t && (e = t, t = void 0), t = t || "fx"; s--;) n = oe._data(r[s], t + "queueHooks"), n && n.empty && (i++, n.empty.add(a));
- return a(), o.promise(e)
- }
- });
- var $e = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
- Se = ["Top", "Right", "Bottom", "Left"],
- Ee = function(t, e) {
- return t = e || t, "none" === oe.css(t, "display") || !oe.contains(t.ownerDocument, t)
- },
- Ne = oe.access = function(t, e, n, i, o, r, s) {
- var a = 0,
- l = t.length,
- c = null == n;
- if ("object" === oe.type(n)) {
- o = !0;
- for (a in n) oe.access(t, e, a, n[a], !0, r, s)
- } else if (void 0 !== i && (o = !0, oe.isFunction(i) || (s = !0), c && (s ? (e.call(t, i), e = null) : (c = e, e = function(t, e, n) {
- return c.call(oe(t), n)
- })), e))
- for (; l > a; a++) e(t[a], n, s ? i : i.call(t[a], a, e(t[a], n)));
- return o ? t : c ? e.call(t) : l ? e(t[0], n) : r
- },
- De = /^(?:checkbox|radio)$/i;
- ! function() {
- var t = pe.createElement("input"),
- e = pe.createElement("div"),
- n = pe.createDocumentFragment();
- if (e.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", ne.leadingWhitespace = 3 === e.firstChild.nodeType, ne.tbody = !e.getElementsByTagName("tbody").length, ne.htmlSerialize = !!e.getElementsByTagName("link").length, ne.html5Clone = "<:nav></:nav>" !== pe.createElement("nav").cloneNode(!0).outerHTML, t.type = "checkbox", t.checked = !0, n.appendChild(t), ne.appendChecked = t.checked, e.innerHTML = "<textarea>x</textarea>", ne.noCloneChecked = !!e.cloneNode(!0).lastChild.defaultValue, n.appendChild(e), e.innerHTML = "<input type='radio' checked='checked' name='t'/>", ne.checkClone = e.cloneNode(!0).cloneNode(!0).lastChild.checked, ne.noCloneEvent = !0, e.attachEvent && (e.attachEvent("onclick", function() {
- ne.noCloneEvent = !1
- }), e.cloneNode(!0).click()), null == ne.deleteExpando) {
- ne.deleteExpando = !0;
- try {
- delete e.test
- } catch (i) {
- ne.deleteExpando = !1
- }
- }
- }(),
- function() {
- var e, n, i = pe.createElement("div");
- for (e in {
- submit: !0,
- change: !0,
- focusin: !0
- }) n = "on" + e, (ne[e + "Bubbles"] = n in t) || (i.setAttribute(n, "t"), ne[e + "Bubbles"] = i.attributes[n].expando === !1);
- i = null
- }();
- var je = /^(?:input|select|textarea)$/i,
- Pe = /^key/,
- Ae = /^(?:mouse|pointer|contextmenu)|click/,
- He = /^(?:focusinfocus|focusoutblur)$/,
- Ie = /^([^.]*)(?:\.(.+)|)$/;
- oe.event = {
- global: {},
- add: function(t, e, n, i, o) {
- var r, s, a, l, c, u, h, d, f, p, m, g = oe._data(t);
- if (g) {
- for (n.handler && (l = n, n = l.handler, o = l.selector), n.guid || (n.guid = oe.guid++), (s = g.events) || (s = g.events = {}), (u = g.handle) || (u = g.handle = function(t) {
- return typeof oe === ke || t && oe.event.triggered === t.type ? void 0 : oe.event.dispatch.apply(u.elem, arguments)
- }, u.elem = t), e = (e || "").match(be) || [""], a = e.length; a--;) r = Ie.exec(e[a]) || [], f = m = r[1], p = (r[2] || "").split(".").sort(), f && (c = oe.event.special[f] || {}, f = (o ? c.delegateType : c.bindType) || f, c = oe.event.special[f] || {}, h = oe.extend({
- type: f,
- origType: m,
- data: i,
- handler: n,
- guid: n.guid,
- selector: o,
- needsContext: o && oe.expr.match.needsContext.test(o),
- namespace: p.join(".")
- }, l), (d = s[f]) || (d = s[f] = [], d.delegateCount = 0, c.setup && c.setup.call(t, i, p, u) !== !1 || (t.addEventListener ? t.addEventListener(f, u, !1) : t.attachEvent && t.attachEvent("on" + f, u))), c.add && (c.add.call(t, h), h.handler.guid || (h.handler.guid = n.guid)), o ? d.splice(d.delegateCount++, 0, h) : d.push(h), oe.event.global[f] = !0);
- t = null
- }
- },
- remove: function(t, e, n, i, o) {
- var r, s, a, l, c, u, h, d, f, p, m, g = oe.hasData(t) && oe._data(t);
- if (g && (u = g.events)) {
- for (e = (e || "").match(be) || [""], c = e.length; c--;)
- if (a = Ie.exec(e[c]) || [], f = m = a[1], p = (a[2] || "").split(".").sort(), f) {
- for (h = oe.event.special[f] || {}, f = (i ? h.delegateType : h.bindType) || f, d = u[f] || [], a = a[2] && new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)"), l = r = d.length; r--;) s = d[r], !o && m !== s.origType || n && n.guid !== s.guid || a && !a.test(s.namespace) || i && i !== s.selector && ("**" !== i || !s.selector) || (d.splice(r, 1), s.selector && d.delegateCount--, h.remove && h.remove.call(t, s));
- l && !d.length && (h.teardown && h.teardown.call(t, p, g.handle) !== !1 || oe.removeEvent(t, f, g.handle), delete u[f])
- } else
- for (f in u) oe.event.remove(t, f + e[c], n, i, !0);
- oe.isEmptyObject(u) && (delete g.handle, oe._removeData(t, "events"))
- }
- },
- trigger: function(e, n, i, o) {
- var r, s, a, l, c, u, h, d = [i || pe],
- f = ee.call(e, "type") ? e.type : e,
- p = ee.call(e, "namespace") ? e.namespace.split(".") : [];
- if (a = u = i = i || pe, 3 !== i.nodeType && 8 !== i.nodeType && !He.test(f + oe.event.triggered) && (f.indexOf(".") >= 0 && (p = f.split("."), f = p.shift(), p.sort()), s = f.indexOf(":") < 0 && "on" + f, e = e[oe.expando] ? e : new oe.Event(f, "object" == typeof e && e), e.isTrigger = o ? 2 : 3, e.namespace = p.join("."), e.namespace_re = e.namespace ? new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, e.result = void 0, e.target || (e.target = i), n = null == n ? [e] : oe.makeArray(n, [e]), c = oe.event.special[f] || {}, o || !c.trigger || c.trigger.apply(i, n) !== !1)) {
- if (!o && !c.noBubble && !oe.isWindow(i)) {
- for (l = c.delegateType || f, He.test(l + f) || (a = a.parentNode); a; a = a.parentNode) d.push(a), u = a;
- u === (i.ownerDocument || pe) && d.push(u.defaultView || u.parentWindow || t)
- }
- for (h = 0;
- (a = d[h++]) && !e.isPropagationStopped();) e.type = h > 1 ? l : c.bindType || f, r = (oe._data(a, "events") || {})[e.type] && oe._data(a, "handle"), r && r.apply(a, n), r = s && a[s], r && r.apply && oe.acceptData(a) && (e.result = r.apply(a, n), e.result === !1 && e.preventDefault());
- if (e.type = f, !o && !e.isDefaultPrevented() && (!c._default || c._default.apply(d.pop(), n) === !1) && oe.acceptData(i) && s && i[f] && !oe.isWindow(i)) {
- u = i[s], u && (i[s] = null), oe.event.triggered = f;
- try {
- i[f]()
- } catch (m) {}
- oe.event.triggered = void 0, u && (i[s] = u)
- }
- return e.result
- }
- },
- dispatch: function(t) {
- t = oe.event.fix(t);
- var e, n, i, o, r, s = [],
- a = V.call(arguments),
- l = (oe._data(this, "events") || {})[t.type] || [],
- c = oe.event.special[t.type] || {};
- if (a[0] = t, t.delegateTarget = this, !c.preDispatch || c.preDispatch.call(this, t) !== !1) {
- for (s = oe.event.handlers.call(this, t, l), e = 0;
- (o = s[e++]) && !t.isPropagationStopped();)
- for (t.currentTarget = o.elem, r = 0;
- (i = o.handlers[r++]) && !t.isImmediatePropagationStopped();)(!t.namespace_re || t.namespace_re.test(i.namespace)) && (t.handleObj = i, t.data = i.data, n = ((oe.event.special[i.origType] || {}).handle || i.handler).apply(o.elem, a), void 0 !== n && (t.result = n) === !1 && (t.preventDefault(), t.stopPropagation()));
- return c.postDispatch && c.postDispatch.call(this, t), t.result
- }
- },
- handlers: function(t, e) {
- var n, i, o, r, s = [],
- a = e.delegateCount,
- l = t.target;
- if (a && l.nodeType && (!t.button || "click" !== t.type))
- for (; l != this; l = l.parentNode || this)
- if (1 === l.nodeType && (l.disabled !== !0 || "click" !== t.type)) {
- for (o = [], r = 0; a > r; r++) i = e[r], n = i.selector + " ", void 0 === o[n] && (o[n] = i.needsContext ? oe(n, this).index(l) >= 0 : oe.find(n, this, null, [l]).length), o[n] && o.push(i);
- o.length && s.push({
- elem: l,
- handlers: o
- })
- }
- return a < e.length && s.push({
- elem: this,
- handlers: e.slice(a)
- }), s
- },
- fix: function(t) {
- if (t[oe.expando]) return t;
- var e, n, i, o = t.type,
- r = t,
- s = this.fixHooks[o];
- for (s || (this.fixHooks[o] = s = Ae.test(o) ? this.mouseHooks : Pe.test(o) ? this.keyHooks : {}), i = s.props ? this.props.concat(s.props) : this.props, t = new oe.Event(r), e = i.length; e--;) n = i[e], t[n] = r[n];
- return t.target || (t.target = r.srcElement || pe), 3 === t.target.nodeType && (t.target = t.target.parentNode), t.metaKey = !!t.metaKey, s.filter ? s.filter(t, r) : t
- },
- props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
- fixHooks: {},
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function(t, e) {
- return null == t.which && (t.which = null != e.charCode ? e.charCode : e.keyCode), t
- }
- },
- mouseHooks: {
- props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter: function(t, e) {
- var n, i, o, r = e.button,
- s = e.fromElement;
- return null == t.pageX && null != e.clientX && (i = t.target.ownerDocument || pe, o = i.documentElement, n = i.body, t.pageX = e.clientX + (o && o.scrollLeft || n && n.scrollLeft || 0) - (o && o.clientLeft || n && n.clientLeft || 0), t.pageY = e.clientY + (o && o.scrollTop || n && n.scrollTop || 0) - (o && o.clientTop || n && n.clientTop || 0)), !t.relatedTarget && s && (t.relatedTarget = s === t.target ? e.toElement : s), t.which || void 0 === r || (t.which = 1 & r ? 1 : 2 & r ? 3 : 4 & r ? 2 : 0), t
- }
- },
- special: {
- load: {
- noBubble: !0
- },
- focus: {
- trigger: function() {
- if (this !== p() && this.focus) try {
- return this.focus(), !1
- } catch (t) {}
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- return this === p() && this.blur ? (this.blur(), !1) : void 0
- },
- delegateType: "focusout"
- },
- click: {
- trigger: function() {
- return oe.nodeName(this, "input") && "checkbox" === this.type && this.click ? (this.click(), !1) : void 0
- },
- _default: function(t) {
- return oe.nodeName(t.target, "a")
- }
- },
- beforeunload: {
- postDispatch: function(t) {
- void 0 !== t.result && t.originalEvent && (t.originalEvent.returnValue = t.result)
- }
- }
- },
- simulate: function(t, e, n, i) {
- var o = oe.extend(new oe.Event, n, {
- type: t,
- isSimulated: !0,
- originalEvent: {}
- });
- i ? oe.event.trigger(o, null, e) : oe.event.dispatch.call(e, o), o.isDefaultPrevented() && n.preventDefault()
- }
- }, oe.removeEvent = pe.removeEventListener ? function(t, e, n) {
- t.removeEventListener && t.removeEventListener(e, n, !1)
- } : function(t, e, n) {
- var i = "on" + e;
- t.detachEvent && (typeof t[i] === ke && (t[i] = null), t.detachEvent(i, n))
- }, oe.Event = function(t, e) {
- return this instanceof oe.Event ? (t && t.type ? (this.originalEvent = t, this.type = t.type, this.isDefaultPrevented = t.defaultPrevented || void 0 === t.defaultPrevented && t.returnValue === !1 ? d : f) : this.type = t, e && oe.extend(this, e), this.timeStamp = t && t.timeStamp || oe.now(), void(this[oe.expando] = !0)) : new oe.Event(t, e)
- }, oe.Event.prototype = {
- isDefaultPrevented: f,
- isPropagationStopped: f,
- isImmediatePropagationStopped: f,
- preventDefault: function() {
- var t = this.originalEvent;
- this.isDefaultPrevented = d, t && (t.preventDefault ? t.preventDefault() : t.returnValue = !1)
- },
- stopPropagation: function() {
- var t = this.originalEvent;
- this.isPropagationStopped = d, t && (t.stopPropagation && t.stopPropagation(), t.cancelBubble = !0)
- },
- stopImmediatePropagation: function() {
- var t = this.originalEvent;
- this.isImmediatePropagationStopped = d, t && t.stopImmediatePropagation && t.stopImmediatePropagation(), this.stopPropagation()
- }
- }, oe.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout",
- pointerenter: "pointerover",
- pointerleave: "pointerout"
- }, function(t, e) {
- oe.event.special[t] = {
- delegateType: e,
- bindType: e,
- handle: function(t) {
- var n, i = this,
- o = t.relatedTarget,
- r = t.handleObj;
- return (!o || o !== i && !oe.contains(i, o)) && (t.type = r.origType, n = r.handler.apply(this, arguments), t.type = e), n
- }
- }
- }), ne.submitBubbles || (oe.event.special.submit = {
- setup: function() {
- return oe.nodeName(this, "form") ? !1 : void oe.event.add(this, "click._submit keypress._submit", function(t) {
- var e = t.target,
- n = oe.nodeName(e, "input") || oe.nodeName(e, "button") ? e.form : void 0;
- n && !oe._data(n, "submitBubbles") && (oe.event.add(n, "submit._submit", function(t) {
- t._submit_bubble = !0
- }), oe._data(n, "submitBubbles", !0))
- })
- },
- postDispatch: function(t) {
- t._submit_bubble && (delete t._submit_bubble, this.parentNode && !t.isTrigger && oe.event.simulate("submit", this.parentNode, t, !0))
- },
- teardown: function() {
- return oe.nodeName(this, "form") ? !1 : void oe.event.remove(this, "._submit")
- }
- }), ne.changeBubbles || (oe.event.special.change = {
- setup: function() {
- return je.test(this.nodeName) ? (("checkbox" === this.type || "radio" === this.type) && (oe.event.add(this, "propertychange._change", function(t) {
- "checked" === t.originalEvent.propertyName && (this._just_changed = !0)
- }), oe.event.add(this, "click._change", function(t) {
- this._just_changed && !t.isTrigger && (this._just_changed = !1), oe.event.simulate("change", this, t, !0)
- })), !1) : void oe.event.add(this, "beforeactivate._change", function(t) {
- var e = t.target;
- je.test(e.nodeName) && !oe._data(e, "changeBubbles") && (oe.event.add(e, "change._change", function(t) {
- !this.parentNode || t.isSimulated || t.isTrigger || oe.event.simulate("change", this.parentNode, t, !0)
- }), oe._data(e, "changeBubbles", !0))
- })
- },
- handle: function(t) {
- var e = t.target;
- return this !== e || t.isSimulated || t.isTrigger || "radio" !== e.type && "checkbox" !== e.type ? t.handleObj.handler.apply(this, arguments) : void 0
- },
- teardown: function() {
- return oe.event.remove(this, "._change"), !je.test(this.nodeName)
- }
- }), ne.focusinBubbles || oe.each({
- focus: "focusin",
- blur: "focusout"
- }, function(t, e) {
- var n = function(t) {
- oe.event.simulate(e, t.target, oe.event.fix(t), !0)
- };
- oe.event.special[e] = {
- setup: function() {
- var i = this.ownerDocument || this,
- o = oe._data(i, e);
- o || i.addEventListener(t, n, !0), oe._data(i, e, (o || 0) + 1)
- },
- teardown: function() {
- var i = this.ownerDocument || this,
- o = oe._data(i, e) - 1;
- o ? oe._data(i, e, o) : (i.removeEventListener(t, n, !0), oe._removeData(i, e))
- }
- }
- }), oe.fn.extend({
- on: function(t, e, n, i, o) {
- var r, s;
- if ("object" == typeof t) {
- "string" != typeof e && (n = n || e, e = void 0);
- for (r in t) this.on(r, e, n, t[r], o);
- return this
- }
- if (null == n && null == i ? (i = e, n = e = void 0) : null == i && ("string" == typeof e ? (i = n, n = void 0) : (i = n, n = e, e = void 0)), i === !1) i = f;
- else if (!i) return this;
- return 1 === o && (s = i, i = function(t) {
- return oe().off(t), s.apply(this, arguments)
- }, i.guid = s.guid || (s.guid = oe.guid++)), this.each(function() {
- oe.event.add(this, t, i, n, e)
- })
- },
- one: function(t, e, n, i) {
- return this.on(t, e, n, i, 1)
- },
- off: function(t, e, n) {
- var i, o;
- if (t && t.preventDefault && t.handleObj) return i = t.handleObj, oe(t.delegateTarget).off(i.namespace ? i.origType + "." + i.namespace : i.origType, i.selector, i.handler), this;
- if ("object" == typeof t) {
- for (o in t) this.off(o, e, t[o]);
- return this
- }
- return (e === !1 || "function" == typeof e) && (n = e, e = void 0), n === !1 && (n = f), this.each(function() {
- oe.event.remove(this, t, n, e)
- })
- },
- trigger: function(t, e) {
- return this.each(function() {
- oe.event.trigger(t, e, this)
- })
- },
- triggerHandler: function(t, e) {
- var n = this[0];
- return n ? oe.event.trigger(t, e, n, !0) : void 0
- }
- });
- var Le = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
- Me = / jQuery\d+="(?:null|\d+)"/g,
- Oe = new RegExp("<(?:" + Le + ")[\\s/>]", "i"),
- Fe = /^\s+/,
- We = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
- qe = /<([\w:]+)/,
- ze = /<tbody/i,
- Be = /<|&#?\w+;/,
- Re = /<(?:script|style|link)/i,
- Xe = /checked\s*(?:[^=]|=\s*.checked.)/i,
- Qe = /^$|\/(?:java|ecma)script/i,
- Ue = /^true\/(.*)/,
- Ye = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
- Ve = {
- option: [1, "<select multiple='multiple'>", "</select>"],
- legend: [1, "<fieldset>", "</fieldset>"],
- area: [1, "<map>", "</map>"],
- param: [1, "<object>", "</object>"],
- thead: [1, "<table>", "</table>"],
- tr: [2, "<table><tbody>", "</tbody></table>"],
- col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
- td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
- _default: ne.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
- },
- Ge = m(pe),
- Je = Ge.appendChild(pe.createElement("div"));
- Ve.optgroup = Ve.option, Ve.tbody = Ve.tfoot = Ve.colgroup = Ve.caption = Ve.thead, Ve.th = Ve.td, oe.extend({
- clone: function(t, e, n) {
- var i, o, r, s, a, l = oe.contains(t.ownerDocument, t);
- if (ne.html5Clone || oe.isXMLDoc(t) || !Oe.test("<" + t.nodeName + ">") ? r = t.cloneNode(!0) : (Je.innerHTML = t.outerHTML, Je.removeChild(r = Je.firstChild)), !(ne.noCloneEvent && ne.noCloneChecked || 1 !== t.nodeType && 11 !== t.nodeType || oe.isXMLDoc(t)))
- for (i = g(r), a = g(t), s = 0; null != (o = a[s]); ++s) i[s] && k(o, i[s]);
- if (e)
- if (n)
- for (a = a || g(t), i = i || g(r), s = 0; null != (o = a[s]); s++) C(o, i[s]);
- else C(t, r);
- return i = g(r, "script"), i.length > 0 && w(i, !l && g(t, "script")), i = a = o = null, r
- },
- buildFragment: function(t, e, n, i) {
- for (var o, r, s, a, l, c, u, h = t.length, d = m(e), f = [], p = 0; h > p; p++)
- if (r = t[p], r || 0 === r)
- if ("object" === oe.type(r)) oe.merge(f, r.nodeType ? [r] : r);
- else if (Be.test(r)) {
- for (a = a || d.appendChild(e.createElement("div")), l = (qe.exec(r) || ["", ""])[1].toLowerCase(), u = Ve[l] || Ve._default, a.innerHTML = u[1] + r.replace(We, "<$1></$2>") + u[2], o = u[0]; o--;) a = a.lastChild;
- if (!ne.leadingWhitespace && Fe.test(r) && f.push(e.createTextNode(Fe.exec(r)[0])), !ne.tbody)
- for (r = "table" !== l || ze.test(r) ? "<table>" !== u[1] || ze.test(r) ? 0 : a : a.firstChild, o = r && r.childNodes.length; o--;) oe.nodeName(c = r.childNodes[o], "tbody") && !c.childNodes.length && r.removeChild(c);
- for (oe.merge(f, a.childNodes), a.textContent = ""; a.firstChild;) a.removeChild(a.firstChild);
- a = d.lastChild
- } else f.push(e.createTextNode(r));
- for (a && d.removeChild(a), ne.appendChecked || oe.grep(g(f, "input"), v), p = 0; r = f[p++];)
- if ((!i || -1 === oe.inArray(r, i)) && (s = oe.contains(r.ownerDocument, r), a = g(d.appendChild(r), "script"), s && w(a), n))
- for (o = 0; r = a[o++];) Qe.test(r.type || "") && n.push(r);
- return a = null, d
- },
- cleanData: function(t, e) {
- for (var n, i, o, r, s = 0, a = oe.expando, l = oe.cache, c = ne.deleteExpando, u = oe.event.special; null != (n = t[s]); s++)
- if ((e || oe.acceptData(n)) && (o = n[a], r = o && l[o])) {
- if (r.events)
- for (i in r.events) u[i] ? oe.event.remove(n, i) : oe.removeEvent(n, i, r.handle);
- l[o] && (delete l[o], c ? delete n[a] : typeof n.removeAttribute !== ke ? n.removeAttribute(a) : n[a] = null, Y.push(o))
- }
- }
- }), oe.fn.extend({
- text: function(t) {
- return Ne(this, function(t) {
- return void 0 === t ? oe.text(this) : this.empty().append((this[0] && this[0].ownerDocument || pe).createTextNode(t))
- }, null, t, arguments.length)
- },
- append: function() {
- return this.domManip(arguments, function(t) {
- if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
- var e = y(this, t);
- e.appendChild(t)
- }
- })
- },
- prepend: function() {
- return this.domManip(arguments, function(t) {
- if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
- var e = y(this, t);
- e.insertBefore(t, e.firstChild)
- }
- })
- },
- before: function() {
- return this.domManip(arguments, function(t) {
- this.parentNode && this.parentNode.insertBefore(t, this)
- })
- },
- after: function() {
- return this.domManip(arguments, function(t) {
- this.parentNode && this.parentNode.insertBefore(t, this.nextSibling)
- })
- },
- remove: function(t, e) {
- for (var n, i = t ? oe.filter(t, this) : this, o = 0; null != (n = i[o]); o++) e || 1 !== n.nodeType || oe.cleanData(g(n)), n.parentNode && (e && oe.contains(n.ownerDocument, n) && w(g(n, "script")), n.parentNode.removeChild(n));
- return this
- },
- empty: function() {
- for (var t, e = 0; null != (t = this[e]); e++) {
- for (1 === t.nodeType && oe.cleanData(g(t, !1)); t.firstChild;) t.removeChild(t.firstChild);
- t.options && oe.nodeName(t, "select") && (t.options.length = 0)
- }
- return this
- },
- clone: function(t, e) {
- return t = null == t ? !1 : t, e = null == e ? t : e, this.map(function() {
- return oe.clone(this, t, e)
- })
- },
- html: function(t) {
- return Ne(this, function(t) {
- var e = this[0] || {},
- n = 0,
- i = this.length;
- if (void 0 === t) return 1 === e.nodeType ? e.innerHTML.replace(Me, "") : void 0;
- if (!("string" != typeof t || Re.test(t) || !ne.htmlSerialize && Oe.test(t) || !ne.leadingWhitespace && Fe.test(t) || Ve[(qe.exec(t) || ["", ""])[1].toLowerCase()])) {
- t = t.replace(We, "<$1></$2>");
- try {
- for (; i > n; n++) e = this[n] || {}, 1 === e.nodeType && (oe.cleanData(g(e, !1)), e.innerHTML = t);
- e = 0
- } catch (o) {}
- }
- e && this.empty().append(t)
- }, null, t, arguments.length)
- },
- replaceWith: function() {
- var t = arguments[0];
- return this.domManip(arguments, function(e) {
- t = this.parentNode, oe.cleanData(g(this)), t && t.replaceChild(e, this)
- }), t && (t.length || t.nodeType) ? this : this.remove()
- },
- detach: function(t) {
- return this.remove(t, !0)
- },
- domManip: function(t, e) {
- t = G.apply([], t);
- var n, i, o, r, s, a, l = 0,
- c = this.length,
- u = this,
- h = c - 1,
- d = t[0],
- f = oe.isFunction(d);
- if (f || c > 1 && "string" == typeof d && !ne.checkClone && Xe.test(d)) return this.each(function(n) {
- var i = u.eq(n);
- f && (t[0] = d.call(this, n, i.html())), i.domManip(t, e)
- });
- if (c && (a = oe.buildFragment(t, this[0].ownerDocument, !1, this), n = a.firstChild, 1 === a.childNodes.length && (a = n), n)) {
- for (r = oe.map(g(a, "script"), b), o = r.length; c > l; l++) i = a, l !== h && (i = oe.clone(i, !0, !0), o && oe.merge(r, g(i, "script"))), e.call(this[l], i, l);
- if (o)
- for (s = r[r.length - 1].ownerDocument, oe.map(r, x), l = 0; o > l; l++) i = r[l], Qe.test(i.type || "") && !oe._data(i, "globalEval") && oe.contains(s, i) && (i.src ? oe._evalUrl && oe._evalUrl(i.src) : oe.globalEval((i.text || i.textContent || i.innerHTML || "").replace(Ye, "")));
- a = n = null
- }
- return this
- }
- }), oe.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
- }, function(t, e) {
- oe.fn[t] = function(t) {
- for (var n, i = 0, o = [], r = oe(t), s = r.length - 1; s >= i; i++) n = i === s ? this : this.clone(!0), oe(r[i])[e](n), J.apply(o, n.get());
- return this.pushStack(o)
- }
- });
- var Ke, Ze = {};
- ! function() {
- var t;
- ne.shrinkWrapBlocks = function() {
- if (null != t) return t;
- t = !1;
- var e, n, i;
- return n = pe.getElementsByTagName("body")[0], n && n.style ? (e = pe.createElement("div"), i = pe.createElement("div"), i.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", n.appendChild(i).appendChild(e), typeof e.style.zoom !== ke && (e.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1", e.appendChild(pe.createElement("div")).style.width = "5px", t = 3 !== e.offsetWidth), n.removeChild(i), t) : void 0
- }
- }();
- var tn, en, nn = /^margin/,
- on = new RegExp("^(" + $e + ")(?!px)[a-z%]+$", "i"),
- rn = /^(top|right|bottom|left)$/;
- t.getComputedStyle ? (tn = function(t) {
- return t.ownerDocument.defaultView.getComputedStyle(t, null)
- }, en = function(t, e, n) {
- var i, o, r, s, a = t.style;
- return n = n || tn(t), s = n ? n.getPropertyValue(e) || n[e] : void 0, n && ("" !== s || oe.contains(t.ownerDocument, t) || (s = oe.style(t, e)), on.test(s) && nn.test(e) && (i = a.width, o = a.minWidth, r = a.maxWidth, a.minWidth = a.maxWidth = a.width = s, s = n.width, a.width = i, a.minWidth = o, a.maxWidth = r)), void 0 === s ? s : s + ""
- }) : pe.documentElement.currentStyle && (tn = function(t) {
- return t.currentStyle
- }, en = function(t, e, n) {
- var i, o, r, s, a = t.style;
- return n = n || tn(t), s = n ? n[e] : void 0, null == s && a && a[e] && (s = a[e]), on.test(s) && !rn.test(e) && (i = a.left, o = t.runtimeStyle, r = o && o.left, r && (o.left = t.currentStyle.left), a.left = "fontSize" === e ? "1em" : s, s = a.pixelLeft + "px", a.left = i, r && (o.left = r)), void 0 === s ? s : s + "" || "auto"
- }),
- function() {
- function e() {
- var e, n, i, o;
- n = pe.getElementsByTagName("body")[0], n && n.style && (e = pe.createElement("div"), i = pe.createElement("div"), i.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", n.appendChild(i).appendChild(e), e.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute", r = s = !1, l = !0, t.getComputedStyle && (r = "1%" !== (t.getComputedStyle(e, null) || {}).top, s = "4px" === (t.getComputedStyle(e, null) || {
- width: "4px"
- }).width, o = e.appendChild(pe.createElement("div")), o.style.cssText = e.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0", o.style.marginRight = o.style.width = "0", e.style.width = "1px", l = !parseFloat((t.getComputedStyle(o, null) || {}).marginRight)), e.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", o = e.getElementsByTagName("td"), o[0].style.cssText = "margin:0;border:0;padding:0;display:none", a = 0 === o[0].offsetHeight, a && (o[0].style.display = "", o[1].style.display = "none", a = 0 === o[0].offsetHeight), n.removeChild(i))
- }
- var n, i, o, r, s, a, l;
- n = pe.createElement("div"), n.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", o = n.getElementsByTagName("a")[0], i = o && o.style, i && (i.cssText = "float:left;opacity:.5", ne.opacity = "0.5" === i.opacity, ne.cssFloat = !!i.cssFloat, n.style.backgroundClip = "content-box", n.cloneNode(!0).style.backgroundClip = "", ne.clearCloneStyle = "content-box" === n.style.backgroundClip, ne.boxSizing = "" === i.boxSizing || "" === i.MozBoxSizing || "" === i.WebkitBoxSizing, oe.extend(ne, {
- reliableHiddenOffsets: function() {
- return null == a && e(), a
- },
- boxSizingReliable: function() {
- return null == s && e(), s
- },
- pixelPosition: function() {
- return null == r && e(), r
- },
- reliableMarginRight: function() {
- return null == l && e(), l
- }
- }))
- }(), oe.swap = function(t, e, n, i) {
- var o, r, s = {};
- for (r in e) s[r] = t.style[r], t.style[r] = e[r];
- o = n.apply(t, i || []);
- for (r in e) t.style[r] = s[r];
- return o
- };
- var sn = /alpha\([^)]*\)/i,
- an = /opacity\s*=\s*([^)]*)/,
- ln = /^(none|table(?!-c[ea]).+)/,
- cn = new RegExp("^(" + $e + ")(.*)$", "i"),
- un = new RegExp("^([+-])=(" + $e + ")", "i"),
- hn = {
- position: "absolute",
- visibility: "hidden",
- display: "block"
- },
- dn = {
- letterSpacing: "0",
- fontWeight: "400"
- },
- fn = ["Webkit", "O", "Moz", "ms"];
- oe.extend({
- cssHooks: {
- opacity: {
- get: function(t, e) {
- if (e) {
- var n = en(t, "opacity");
- return "" === n ? "1" : n
- }
- }
- }
- },
- cssNumber: {
- columnCount: !0,
- fillOpacity: !0,
- flexGrow: !0,
- flexShrink: !0,
- fontWeight: !0,
- lineHeight: !0,
- opacity: !0,
- order: !0,
- orphans: !0,
- widows: !0,
- zIndex: !0,
- zoom: !0
- },
- cssProps: {
- "float": ne.cssFloat ? "cssFloat" : "styleFloat"
- },
- style: function(t, e, n, i) {
- if (t && 3 !== t.nodeType && 8 !== t.nodeType && t.style) {
- var o, r, s, a = oe.camelCase(e),
- l = t.style;
- if (e = oe.cssProps[a] || (oe.cssProps[a] = S(l, a)), s = oe.cssHooks[e] || oe.cssHooks[a], void 0 === n) return s && "get" in s && void 0 !== (o = s.get(t, !1, i)) ? o : l[e];
- if (r = typeof n, "string" === r && (o = un.exec(n)) && (n = (o[1] + 1) * o[2] + parseFloat(oe.css(t, e)), r = "number"), null != n && n === n && ("number" !== r || oe.cssNumber[a] || (n += "px"), ne.clearCloneStyle || "" !== n || 0 !== e.indexOf("background") || (l[e] = "inherit"), !(s && "set" in s && void 0 === (n = s.set(t, n, i))))) try {
- l[e] = n
- } catch (c) {}
- }
- },
- css: function(t, e, n, i) {
- var o, r, s, a = oe.camelCase(e);
- return e = oe.cssProps[a] || (oe.cssProps[a] = S(t.style, a)), s = oe.cssHooks[e] || oe.cssHooks[a], s && "get" in s && (r = s.get(t, !0, n)), void 0 === r && (r = en(t, e, i)), "normal" === r && e in dn && (r = dn[e]), "" === n || n ? (o = parseFloat(r), n === !0 || oe.isNumeric(o) ? o || 0 : r) : r
- }
- }), oe.each(["height", "width"], function(t, e) {
- oe.cssHooks[e] = {
- get: function(t, n, i) {
- return n ? ln.test(oe.css(t, "display")) && 0 === t.offsetWidth ? oe.swap(t, hn, function() {
- return j(t, e, i)
- }) : j(t, e, i) : void 0
- },
- set: function(t, n, i) {
- var o = i && tn(t);
- return N(t, n, i ? D(t, e, i, ne.boxSizing && "border-box" === oe.css(t, "boxSizing", !1, o), o) : 0)
- }
- }
- }), ne.opacity || (oe.cssHooks.opacity = {
- get: function(t, e) {
- return an.test((e && t.currentStyle ? t.currentStyle.filter : t.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : e ? "1" : ""
- },
- set: function(t, e) {
- var n = t.style,
- i = t.currentStyle,
- o = oe.isNumeric(e) ? "alpha(opacity=" + 100 * e + ")" : "",
- r = i && i.filter || n.filter || "";
- n.zoom = 1, (e >= 1 || "" === e) && "" === oe.trim(r.replace(sn, "")) && n.removeAttribute && (n.removeAttribute("filter"), "" === e || i && !i.filter) || (n.filter = sn.test(r) ? r.replace(sn, o) : r + " " + o)
- }
- }), oe.cssHooks.marginRight = $(ne.reliableMarginRight, function(t, e) {
- return e ? oe.swap(t, {
- display: "inline-block"
- }, en, [t, "marginRight"]) : void 0
- }), oe.each({
- margin: "",
- padding: "",
- border: "Width"
- }, function(t, e) {
- oe.cssHooks[t + e] = {
- expand: function(n) {
- for (var i = 0, o = {}, r = "string" == typeof n ? n.split(" ") : [n]; 4 > i; i++) o[t + Se[i] + e] = r[i] || r[i - 2] || r[0];
- return o
- }
- }, nn.test(t) || (oe.cssHooks[t + e].set = N)
- }), oe.fn.extend({
- css: function(t, e) {
- return Ne(this, function(t, e, n) {
- var i, o, r = {},
- s = 0;
- if (oe.isArray(e)) {
- for (i = tn(t), o = e.length; o > s; s++) r[e[s]] = oe.css(t, e[s], !1, i);
- return r
- }
- return void 0 !== n ? oe.style(t, e, n) : oe.css(t, e)
- }, t, e, arguments.length > 1)
- },
- show: function() {
- return E(this, !0)
- },
- hide: function() {
- return E(this)
- },
- toggle: function(t) {
- return "boolean" == typeof t ? t ? this.show() : this.hide() : this.each(function() {
- Ee(this) ? oe(this).show() : oe(this).hide()
- })
- }
- }), oe.Tween = P, P.prototype = {
- constructor: P,
- init: function(t, e, n, i, o, r) {
- this.elem = t, this.prop = n, this.easing = o || "swing", this.options = e, this.start = this.now = this.cur(), this.end = i, this.unit = r || (oe.cssNumber[n] ? "" : "px")
- },
- cur: function() {
- var t = P.propHooks[this.prop];
- return t && t.get ? t.get(this) : P.propHooks._default.get(this)
- },
- run: function(t) {
- var e, n = P.propHooks[this.prop];
- return this.pos = e = this.options.duration ? oe.easing[this.easing](t, this.options.duration * t, 0, 1, this.options.duration) : t, this.now = (this.end - this.start) * e + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : P.propHooks._default.set(this), this
- }
- }, P.prototype.init.prototype = P.prototype, P.propHooks = {
- _default: {
- get: function(t) {
- var e;
- return null == t.elem[t.prop] || t.elem.style && null != t.elem.style[t.prop] ? (e = oe.css(t.elem, t.prop, ""), e && "auto" !== e ? e : 0) : t.elem[t.prop]
- },
- set: function(t) {
- oe.fx.step[t.prop] ? oe.fx.step[t.prop](t) : t.elem.style && (null != t.elem.style[oe.cssProps[t.prop]] || oe.cssHooks[t.prop]) ? oe.style(t.elem, t.prop, t.now + t.unit) : t.elem[t.prop] = t.now
- }
- }
- }, P.propHooks.scrollTop = P.propHooks.scrollLeft = {
- set: function(t) {
- t.elem.nodeType && t.elem.parentNode && (t.elem[t.prop] = t.now)
- }
- }, oe.easing = {
- linear: function(t) {
- return t
- },
- swing: function(t) {
- return .5 - Math.cos(t * Math.PI) / 2
- }
- }, oe.fx = P.prototype.init, oe.fx.step = {};
- var pn, mn, gn = /^(?:toggle|show|hide)$/,
- vn = new RegExp("^(?:([+-])=|)(" + $e + ")([a-z%]*)$", "i"),
- yn = /queueHooks$/,
- bn = [L],
- xn = {
- "*": [
- function(t, e) {
- var n = this.createTween(t, e),
- i = n.cur(),
- o = vn.exec(e),
- r = o && o[3] || (oe.cssNumber[t] ? "" : "px"),
- s = (oe.cssNumber[t] || "px" !== r && +i) && vn.exec(oe.css(n.elem, t)),
- a = 1,
- l = 20;
- if (s && s[3] !== r) {
- r = r || s[3], o = o || [], s = +i || 1;
- do a = a || ".5", s /= a, oe.style(n.elem, t, s + r); while (a !== (a = n.cur() / i) && 1 !== a && --l)
- }
- return o && (s = n.start = +s || +i || 0, n.unit = r, n.end = o[1] ? s + (o[1] + 1) * o[2] : +o[2]), n
- }
- ]
- };
- oe.Animation = oe.extend(O, {
- tweener: function(t, e) {
- oe.isFunction(t) ? (e = t, t = ["*"]) : t = t.split(" ");
- for (var n, i = 0, o = t.length; o > i; i++) n = t[i], xn[n] = xn[n] || [], xn[n].unshift(e)
- },
- prefilter: function(t, e) {
- e ? bn.unshift(t) : bn.push(t)
- }
- }), oe.speed = function(t, e, n) {
- var i = t && "object" == typeof t ? oe.extend({}, t) : {
- complete: n || !n && e || oe.isFunction(t) && t,
- duration: t,
- easing: n && e || e && !oe.isFunction(e) && e
- };
- return i.duration = oe.fx.off ? 0 : "number" == typeof i.duration ? i.duration : i.duration in oe.fx.speeds ? oe.fx.speeds[i.duration] : oe.fx.speeds._default, (null == i.queue || i.queue === !0) && (i.queue = "fx"), i.old = i.complete, i.complete = function() {
- oe.isFunction(i.old) && i.old.call(this), i.queue && oe.dequeue(this, i.queue)
- }, i
- }, oe.fn.extend({
- fadeTo: function(t, e, n, i) {
- return this.filter(Ee).css("opacity", 0).show().end().animate({
- opacity: e
- }, t, n, i)
- },
- animate: function(t, e, n, i) {
- var o = oe.isEmptyObject(t),
- r = oe.speed(e, n, i),
- s = function() {
- var e = O(this, oe.extend({}, t), r);
- (o || oe._data(this, "finish")) && e.stop(!0)
- };
- return s.finish = s, o || r.queue === !1 ? this.each(s) : this.queue(r.queue, s)
- },
- stop: function(t, e, n) {
- var i = function(t) {
- var e = t.stop;
- delete t.stop, e(n)
- };
- return "string" != typeof t && (n = e, e = t, t = void 0), e && t !== !1 && this.queue(t || "fx", []), this.each(function() {
- var e = !0,
- o = null != t && t + "queueHooks",
- r = oe.timers,
- s = oe._data(this);
- if (o) s[o] && s[o].stop && i(s[o]);
- else
- for (o in s) s[o] && s[o].stop && yn.test(o) && i(s[o]);
- for (o = r.length; o--;) r[o].elem !== this || null != t && r[o].queue !== t || (r[o].anim.stop(n), e = !1, r.splice(o, 1));
- (e || !n) && oe.dequeue(this, t)
- })
- },
- finish: function(t) {
- return t !== !1 && (t = t || "fx"), this.each(function() {
- var e, n = oe._data(this),
- i = n[t + "queue"],
- o = n[t + "queueHooks"],
- r = oe.timers,
- s = i ? i.length : 0;
- for (n.finish = !0, oe.queue(this, t, []), o && o.stop && o.stop.call(this, !0), e = r.length; e--;) r[e].elem === this && r[e].queue === t && (r[e].anim.stop(!0), r.splice(e, 1));
- for (e = 0; s > e; e++) i[e] && i[e].finish && i[e].finish.call(this);
- delete n.finish
- })
- }
- }), oe.each(["toggle", "show", "hide"], function(t, e) {
- var n = oe.fn[e];
- oe.fn[e] = function(t, i, o) {
- return null == t || "boolean" == typeof t ? n.apply(this, arguments) : this.animate(H(e, !0), t, i, o)
- }
- }), oe.each({
- slideDown: H("show"),
- slideUp: H("hide"),
- slideToggle: H("toggle"),
- fadeIn: {
- opacity: "show"
- },
- fadeOut: {
- opacity: "hide"
- },
- fadeToggle: {
- opacity: "toggle"
- }
- }, function(t, e) {
- oe.fn[t] = function(t, n, i) {
- return this.animate(e, t, n, i)
- }
- }), oe.timers = [], oe.fx.tick = function() {
- var t, e = oe.timers,
- n = 0;
- for (pn = oe.now(); n < e.length; n++) t = e[n], t() || e[n] !== t || e.splice(n--, 1);
- e.length || oe.fx.stop(), pn = void 0
- }, oe.fx.timer = function(t) {
- oe.timers.push(t), t() ? oe.fx.start() : oe.timers.pop()
- }, oe.fx.interval = 13, oe.fx.start = function() {
- mn || (mn = setInterval(oe.fx.tick, oe.fx.interval))
- }, oe.fx.stop = function() {
- clearInterval(mn), mn = null
- }, oe.fx.speeds = {
- slow: 600,
- fast: 200,
- _default: 400
- }, oe.fn.delay = function(t, e) {
- return t = oe.fx ? oe.fx.speeds[t] || t : t, e = e || "fx", this.queue(e, function(e, n) {
- var i = setTimeout(e, t);
- n.stop = function() {
- clearTimeout(i)
- }
- })
- },
- function() {
- var t, e, n, i, o;
- e = pe.createElement("div"), e.setAttribute("className", "t"), e.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", i = e.getElementsByTagName("a")[0], n = pe.createElement("select"), o = n.appendChild(pe.createElement("option")), t = e.getElementsByTagName("input")[0], i.style.cssText = "top:1px", ne.getSetAttribute = "t" !== e.className, ne.style = /top/.test(i.getAttribute("style")), ne.hrefNormalized = "/a" === i.getAttribute("href"), ne.checkOn = !!t.value, ne.optSelected = o.selected, ne.enctype = !!pe.createElement("form").enctype, n.disabled = !0, ne.optDisabled = !o.disabled, t = pe.createElement("input"), t.setAttribute("value", ""), ne.input = "" === t.getAttribute("value"), t.value = "t", t.setAttribute("type", "radio"), ne.radioValue = "t" === t.value
- }();
- var wn = /\r/g;
- oe.fn.extend({
- val: function(t) {
- var e, n, i, o = this[0]; {
- if (arguments.length) return i = oe.isFunction(t), this.each(function(n) {
- var o;
- 1 === this.nodeType && (o = i ? t.call(this, n, oe(this).val()) : t, null == o ? o = "" : "number" == typeof o ? o += "" : oe.isArray(o) && (o = oe.map(o, function(t) {
- return null == t ? "" : t + ""
- })), e = oe.valHooks[this.type] || oe.valHooks[this.nodeName.toLowerCase()], e && "set" in e && void 0 !== e.set(this, o, "value") || (this.value = o))
- });
- if (o) return e = oe.valHooks[o.type] || oe.valHooks[o.nodeName.toLowerCase()], e && "get" in e && void 0 !== (n = e.get(o, "value")) ? n : (n = o.value, "string" == typeof n ? n.replace(wn, "") : null == n ? "" : n)
- }
- }
- }), oe.extend({
- valHooks: {
- option: {
- get: function(t) {
- var e = oe.find.attr(t, "value");
- return null != e ? e : oe.trim(oe.text(t))
- }
- },
- select: {
- get: function(t) {
- for (var e, n, i = t.options, o = t.selectedIndex, r = "select-one" === t.type || 0 > o, s = r ? null : [], a = r ? o + 1 : i.length, l = 0 > o ? a : r ? o : 0; a > l; l++)
- if (n = i[l], !(!n.selected && l !== o || (ne.optDisabled ? n.disabled : null !== n.getAttribute("disabled")) || n.parentNode.disabled && oe.nodeName(n.parentNode, "optgroup"))) {
- if (e = oe(n).val(), r) return e;
- s.push(e)
- }
- return s
- },
- set: function(t, e) {
- for (var n, i, o = t.options, r = oe.makeArray(e), s = o.length; s--;)
- if (i = o[s], oe.inArray(oe.valHooks.option.get(i), r) >= 0) try {
- i.selected = n = !0
- } catch (a) {
- i.scrollHeight
- } else i.selected = !1;
- return n || (t.selectedIndex = -1), o
- }
- }
- }
- }), oe.each(["radio", "checkbox"], function() {
- oe.valHooks[this] = {
- set: function(t, e) {
- return oe.isArray(e) ? t.checked = oe.inArray(oe(t).val(), e) >= 0 : void 0
- }
- }, ne.checkOn || (oe.valHooks[this].get = function(t) {
- return null === t.getAttribute("value") ? "on" : t.value
- })
- });
- var Cn, kn, _n = oe.expr.attrHandle,
- Tn = /^(?:checked|selected)$/i,
- $n = ne.getSetAttribute,
- Sn = ne.input;
- oe.fn.extend({
- attr: function(t, e) {
- return Ne(this, oe.attr, t, e, arguments.length > 1)
- },
- removeAttr: function(t) {
- return this.each(function() {
- oe.removeAttr(this, t)
- })
- }
- }), oe.extend({
- attr: function(t, e, n) {
- var i, o, r = t.nodeType;
- if (t && 3 !== r && 8 !== r && 2 !== r) return typeof t.getAttribute === ke ? oe.prop(t, e, n) : (1 === r && oe.isXMLDoc(t) || (e = e.toLowerCase(), i = oe.attrHooks[e] || (oe.expr.match.bool.test(e) ? kn : Cn)), void 0 === n ? i && "get" in i && null !== (o = i.get(t, e)) ? o : (o = oe.find.attr(t, e), null == o ? void 0 : o) : null !== n ? i && "set" in i && void 0 !== (o = i.set(t, n, e)) ? o : (t.setAttribute(e, n + ""), n) : void oe.removeAttr(t, e))
- },
- removeAttr: function(t, e) {
- var n, i, o = 0,
- r = e && e.match(be);
- if (r && 1 === t.nodeType)
- for (; n = r[o++];) i = oe.propFix[n] || n, oe.expr.match.bool.test(n) ? Sn && $n || !Tn.test(n) ? t[i] = !1 : t[oe.camelCase("default-" + n)] = t[i] = !1 : oe.attr(t, n, ""), t.removeAttribute($n ? n : i)
- },
- attrHooks: {
- type: {
- set: function(t, e) {
- if (!ne.radioValue && "radio" === e && oe.nodeName(t, "input")) {
- var n = t.value;
- return t.setAttribute("type", e), n && (t.value = n), e
- }
- }
- }
- }
- }), kn = {
- set: function(t, e, n) {
- return e === !1 ? oe.removeAttr(t, n) : Sn && $n || !Tn.test(n) ? t.setAttribute(!$n && oe.propFix[n] || n, n) : t[oe.camelCase("default-" + n)] = t[n] = !0, n
- }
- }, oe.each(oe.expr.match.bool.source.match(/\w+/g), function(t, e) {
- var n = _n[e] || oe.find.attr;
- _n[e] = Sn && $n || !Tn.test(e) ? function(t, e, i) {
- var o, r;
- return i || (r = _n[e], _n[e] = o, o = null != n(t, e, i) ? e.toLowerCase() : null, _n[e] = r), o
- } : function(t, e, n) {
- return n ? void 0 : t[oe.camelCase("default-" + e)] ? e.toLowerCase() : null
- }
- }), Sn && $n || (oe.attrHooks.value = {
- set: function(t, e, n) {
- return oe.nodeName(t, "input") ? void(t.defaultValue = e) : Cn && Cn.set(t, e, n)
- }
- }), $n || (Cn = {
- set: function(t, e, n) {
- var i = t.getAttributeNode(n);
- return i || t.setAttributeNode(i = t.ownerDocument.createAttribute(n)), i.value = e += "", "value" === n || e === t.getAttribute(n) ? e : void 0
- }
- }, _n.id = _n.name = _n.coords = function(t, e, n) {
- var i;
- return n ? void 0 : (i = t.getAttributeNode(e)) && "" !== i.value ? i.value : null
- }, oe.valHooks.button = {
- get: function(t, e) {
- var n = t.getAttributeNode(e);
- return n && n.specified ? n.value : void 0
- },
- set: Cn.set
- }, oe.attrHooks.contenteditable = {
- set: function(t, e, n) {
- Cn.set(t, "" === e ? !1 : e, n)
- }
- }, oe.each(["width", "height"], function(t, e) {
- oe.attrHooks[e] = {
- set: function(t, n) {
- return "" === n ? (t.setAttribute(e, "auto"), n) : void 0
- }
- }
- })), ne.style || (oe.attrHooks.style = {
- get: function(t) {
- return t.style.cssText || void 0
- },
- set: function(t, e) {
- return t.style.cssText = e + ""
- }
- });
- var En = /^(?:input|select|textarea|button|object)$/i,
- Nn = /^(?:a|area)$/i;
- oe.fn.extend({
- prop: function(t, e) {
- return Ne(this, oe.prop, t, e, arguments.length > 1)
- },
- removeProp: function(t) {
- return t = oe.propFix[t] || t, this.each(function() {
- try {
- this[t] = void 0, delete this[t]
- } catch (e) {}
- })
- }
- }), oe.extend({
- propFix: {
- "for": "htmlFor",
- "class": "className"
- },
- prop: function(t, e, n) {
- var i, o, r, s = t.nodeType;
- if (t && 3 !== s && 8 !== s && 2 !== s) return r = 1 !== s || !oe.isXMLDoc(t), r && (e = oe.propFix[e] || e, o = oe.propHooks[e]), void 0 !== n ? o && "set" in o && void 0 !== (i = o.set(t, n, e)) ? i : t[e] = n : o && "get" in o && null !== (i = o.get(t, e)) ? i : t[e]
- },
- propHooks: {
- tabIndex: {
- get: function(t) {
- var e = oe.find.attr(t, "tabindex");
- return e ? parseInt(e, 10) : En.test(t.nodeName) || Nn.test(t.nodeName) && t.href ? 0 : -1
- }
- }
- }
- }), ne.hrefNormalized || oe.each(["href", "src"], function(t, e) {
- oe.propHooks[e] = {
- get: function(t) {
- return t.getAttribute(e, 4)
- }
- }
- }), ne.optSelected || (oe.propHooks.selected = {
- get: function(t) {
- var e = t.parentNode;
- return e && (e.selectedIndex, e.parentNode && e.parentNode.selectedIndex), null
- }
- }), oe.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
- oe.propFix[this.toLowerCase()] = this
- }), ne.enctype || (oe.propFix.enctype = "encoding");
- var Dn = /[\t\r\n\f]/g;
- oe.fn.extend({
- addClass: function(t) {
- var e, n, i, o, r, s, a = 0,
- l = this.length,
- c = "string" == typeof t && t;
- if (oe.isFunction(t)) return this.each(function(e) {
- oe(this).addClass(t.call(this, e, this.className))
- });
- if (c)
- for (e = (t || "").match(be) || []; l > a; a++)
- if (n = this[a], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(Dn, " ") : " ")) {
- for (r = 0; o = e[r++];) i.indexOf(" " + o + " ") < 0 && (i += o + " ");
- s = oe.trim(i), n.className !== s && (n.className = s)
- }
- return this
- },
- removeClass: function(t) {
- var e, n, i, o, r, s, a = 0,
- l = this.length,
- c = 0 === arguments.length || "string" == typeof t && t;
- if (oe.isFunction(t)) return this.each(function(e) {
- oe(this).removeClass(t.call(this, e, this.className))
- });
- if (c)
- for (e = (t || "").match(be) || []; l > a; a++)
- if (n = this[a], i = 1 === n.nodeType && (n.className ? (" " + n.className + " ").replace(Dn, " ") : "")) {
- for (r = 0; o = e[r++];)
- for (; i.indexOf(" " + o + " ") >= 0;) i = i.replace(" " + o + " ", " ");
- s = t ? oe.trim(i) : "", n.className !== s && (n.className = s)
- }
- return this
- },
- toggleClass: function(t, e) {
- var n = typeof t;
- return "boolean" == typeof e && "string" === n ? e ? this.addClass(t) : this.removeClass(t) : this.each(oe.isFunction(t) ? function(n) {
- oe(this).toggleClass(t.call(this, n, this.className, e), e)
- } : function() {
- if ("string" === n)
- for (var e, i = 0, o = oe(this), r = t.match(be) || []; e = r[i++];) o.hasClass(e) ? o.removeClass(e) : o.addClass(e);
- else(n === ke || "boolean" === n) && (this.className && oe._data(this, "__className__", this.className), this.className = this.className || t === !1 ? "" : oe._data(this, "__className__") || "")
- })
- },
- hasClass: function(t) {
- for (var e = " " + t + " ", n = 0, i = this.length; i > n; n++)
- if (1 === this[n].nodeType && (" " + this[n].className + " ").replace(Dn, " ").indexOf(e) >= 0) return !0;
- return !1
- }
- }), oe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(t, e) {
- oe.fn[e] = function(t, n) {
- return arguments.length > 0 ? this.on(e, null, t, n) : this.trigger(e)
- }
- }), oe.fn.extend({
- hover: function(t, e) {
- return this.mouseenter(t).mouseleave(e || t)
- },
- bind: function(t, e, n) {
- return this.on(t, null, e, n)
- },
- unbind: function(t, e) {
- return this.off(t, null, e)
- },
- delegate: function(t, e, n, i) {
- return this.on(e, t, n, i)
- },
- undelegate: function(t, e, n) {
- return 1 === arguments.length ? this.off(t, "**") : this.off(e, t || "**", n)
- }
- });
- var jn = oe.now(),
- Pn = /\?/,
- An = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
- oe.parseJSON = function(e) {
- if (t.JSON && t.JSON.parse) return t.JSON.parse(e + "");
- var n, i = null,
- o = oe.trim(e + "");
- return o && !oe.trim(o.replace(An, function(t, e, o, r) {
- return n && e && (i = 0), 0 === i ? t : (n = o || e, i += !r - !o, "")
- })) ? Function("return " + o)() : oe.error("Invalid JSON: " + e)
- }, oe.parseXML = function(e) {
- var n, i;
- if (!e || "string" != typeof e) return null;
- try {
- t.DOMParser ? (i = new DOMParser, n = i.parseFromString(e, "text/xml")) : (n = new ActiveXObject("Microsoft.XMLDOM"), n.async = "false", n.loadXML(e))
- } catch (o) {
- n = void 0
- }
- return n && n.documentElement && !n.getElementsByTagName("parsererror").length || oe.error("Invalid XML: " + e), n
- };
- var Hn, In, Ln = /#.*$/,
- Mn = /([?&])_=[^&]*/,
- On = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm,
- Fn = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- Wn = /^(?:GET|HEAD)$/,
- qn = /^\/\//,
- zn = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
- Bn = {},
- Rn = {},
- Xn = "*/".concat("*");
- try {
- In = location.href
- } catch (Qn) {
- In = pe.createElement("a"), In.href = "", In = In.href
- }
- Hn = zn.exec(In.toLowerCase()) || [], oe.extend({
- active: 0,
- lastModified: {},
- etag: {},
- ajaxSettings: {
- url: In,
- type: "GET",
- isLocal: Fn.test(Hn[1]),
- global: !0,
- processData: !0,
- async: !0,
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- accepts: {
- "*": Xn,
- text: "text/plain",
- html: "text/html",
- xml: "application/xml, text/xml",
- json: "application/json, text/javascript"
- },
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
- responseFields: {
- xml: "responseXML",
- text: "responseText",
- json: "responseJSON"
- },
- converters: {
- "* text": String,
- "text html": !0,
- "text json": oe.parseJSON,
- "text xml": oe.parseXML
- },
- flatOptions: {
- url: !0,
- context: !0
- }
- },
- ajaxSetup: function(t, e) {
- return e ? q(q(t, oe.ajaxSettings), e) : q(oe.ajaxSettings, t)
- },
- ajaxPrefilter: F(Bn),
- ajaxTransport: F(Rn),
- ajax: function(t, e) {
- function n(t, e, n, i) {
- var o, u, v, y, x, C = e;
- 2 !== b && (b = 2, a && clearTimeout(a), c = void 0, s = i || "", w.readyState = t > 0 ? 4 : 0, o = t >= 200 && 300 > t || 304 === t, n && (y = z(h, w, n)), y = B(h, y, w, o), o ? (h.ifModified && (x = w.getResponseHeader("Last-Modified"), x && (oe.lastModified[r] = x), x = w.getResponseHeader("etag"), x && (oe.etag[r] = x)), 204 === t || "HEAD" === h.type ? C = "nocontent" : 304 === t ? C = "notmodified" : (C = y.state, u = y.data, v = y.error, o = !v)) : (v = C, (t || !C) && (C = "error", 0 > t && (t = 0))), w.status = t, w.statusText = (e || C) + "", o ? p.resolveWith(d, [u, C, w]) : p.rejectWith(d, [w, C, v]), w.statusCode(g), g = void 0, l && f.trigger(o ? "ajaxSuccess" : "ajaxError", [w, h, o ? u : v]), m.fireWith(d, [w, C]), l && (f.trigger("ajaxComplete", [w, h]), --oe.active || oe.event.trigger("ajaxStop")))
- }
- "object" == typeof t && (e = t, t = void 0), e = e || {};
- var i, o, r, s, a, l, c, u, h = oe.ajaxSetup({}, e),
- d = h.context || h,
- f = h.context && (d.nodeType || d.jquery) ? oe(d) : oe.event,
- p = oe.Deferred(),
- m = oe.Callbacks("once memory"),
- g = h.statusCode || {},
- v = {},
- y = {},
- b = 0,
- x = "canceled",
- w = {
- readyState: 0,
- getResponseHeader: function(t) {
- var e;
- if (2 === b) {
- if (!u)
- for (u = {}; e = On.exec(s);) u[e[1].toLowerCase()] = e[2];
- e = u[t.toLowerCase()]
- }
- return null == e ? null : e
- },
- getAllResponseHeaders: function() {
- return 2 === b ? s : null
- },
- setRequestHeader: function(t, e) {
- var n = t.toLowerCase();
- return b || (t = y[n] = y[n] || t, v[t] = e), this
- },
- overrideMimeType: function(t) {
- return b || (h.mimeType = t), this
- },
- statusCode: function(t) {
- var e;
- if (t)
- if (2 > b)
- for (e in t) g[e] = [g[e], t[e]];
- else w.always(t[w.status]);
- return this
- },
- abort: function(t) {
- var e = t || x;
- return c && c.abort(e), n(0, e), this
- }
- };
- if (p.promise(w).complete = m.add, w.success = w.done, w.error = w.fail, h.url = ((t || h.url || In) + "").replace(Ln, "").replace(qn, Hn[1] + "//"), h.type = e.method || e.type || h.method || h.type, h.dataTypes = oe.trim(h.dataType || "*").toLowerCase().match(be) || [""], null == h.crossDomain && (i = zn.exec(h.url.toLowerCase()), h.crossDomain = !(!i || i[1] === Hn[1] && i[2] === Hn[2] && (i[3] || ("http:" === i[1] ? "80" : "443")) === (Hn[3] || ("http:" === Hn[1] ? "80" : "443")))), h.data && h.processData && "string" != typeof h.data && (h.data = oe.param(h.data, h.traditional)), W(Bn, h, e, w), 2 === b) return w;
- l = h.global, l && 0 === oe.active++ && oe.event.trigger("ajaxStart"), h.type = h.type.toUpperCase(), h.hasContent = !Wn.test(h.type), r = h.url, h.hasContent || (h.data && (r = h.url += (Pn.test(r) ? "&" : "?") + h.data, delete h.data), h.cache === !1 && (h.url = Mn.test(r) ? r.replace(Mn, "$1_=" + jn++) : r + (Pn.test(r) ? "&" : "?") + "_=" + jn++)), h.ifModified && (oe.lastModified[r] && w.setRequestHeader("If-Modified-Since", oe.lastModified[r]), oe.etag[r] && w.setRequestHeader("If-None-Match", oe.etag[r])), (h.data && h.hasContent && h.contentType !== !1 || e.contentType) && w.setRequestHeader("Content-Type", h.contentType), w.setRequestHeader("Accept", h.dataTypes[0] && h.accepts[h.dataTypes[0]] ? h.accepts[h.dataTypes[0]] + ("*" !== h.dataTypes[0] ? ", " + Xn + "; q=0.01" : "") : h.accepts["*"]);
- for (o in h.headers) w.setRequestHeader(o, h.headers[o]);
- if (h.beforeSend && (h.beforeSend.call(d, w, h) === !1 || 2 === b)) return w.abort();
- x = "abort";
- for (o in {
- success: 1,
- error: 1,
- complete: 1
- }) w[o](h[o]);
- if (c = W(Rn, h, e, w)) {
- w.readyState = 1, l && f.trigger("ajaxSend", [w, h]), h.async && h.timeout > 0 && (a = setTimeout(function() {
- w.abort("timeout")
- }, h.timeout));
- try {
- b = 1, c.send(v, n)
- } catch (C) {
- if (!(2 > b)) throw C;
- n(-1, C)
- }
- } else n(-1, "No Transport");
- return w
- },
- getJSON: function(t, e, n) {
- return oe.get(t, e, n, "json")
- },
- getScript: function(t, e) {
- return oe.get(t, void 0, e, "script")
- }
- }), oe.each(["get", "post"], function(t, e) {
- oe[e] = function(t, n, i, o) {
- return oe.isFunction(n) && (o = o || i, i = n, n = void 0), oe.ajax({
- url: t,
- type: e,
- dataType: o,
- data: n,
- success: i
- })
- }
- }), oe.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(t, e) {
- oe.fn[e] = function(t) {
- return this.on(e, t)
- }
- }), oe._evalUrl = function(t) {
- return oe.ajax({
- url: t,
- type: "GET",
- dataType: "script",
- async: !1,
- global: !1,
- "throws": !0
- })
- }, oe.fn.extend({
- wrapAll: function(t) {
- if (oe.isFunction(t)) return this.each(function(e) {
- oe(this).wrapAll(t.call(this, e))
- });
- if (this[0]) {
- var e = oe(t, this[0].ownerDocument).eq(0).clone(!0);
- this[0].parentNode && e.insertBefore(this[0]), e.map(function() {
- for (var t = this; t.firstChild && 1 === t.firstChild.nodeType;) t = t.firstChild;
- return t
- }).append(this)
- }
- return this
- },
- wrapInner: function(t) {
- return this.each(oe.isFunction(t) ? function(e) {
- oe(this).wrapInner(t.call(this, e))
- } : function() {
- var e = oe(this),
- n = e.contents();
- n.length ? n.wrapAll(t) : e.append(t)
- })
- },
- wrap: function(t) {
- var e = oe.isFunction(t);
- return this.each(function(n) {
- oe(this).wrapAll(e ? t.call(this, n) : t)
- })
- },
- unwrap: function() {
- return this.parent().each(function() {
- oe.nodeName(this, "body") || oe(this).replaceWith(this.childNodes)
- }).end()
- }
- }), oe.expr.filters.hidden = function(t) {
- return t.offsetWidth <= 0 && t.offsetHeight <= 0 || !ne.reliableHiddenOffsets() && "none" === (t.style && t.style.display || oe.css(t, "display"))
- }, oe.expr.filters.visible = function(t) {
- return !oe.expr.filters.hidden(t)
- };
- var Un = /%20/g,
- Yn = /\[\]$/,
- Vn = /\r?\n/g,
- Gn = /^(?:submit|button|image|reset|file)$/i,
- Jn = /^(?:input|select|textarea|keygen)/i;
- oe.param = function(t, e) {
- var n, i = [],
- o = function(t, e) {
- e = oe.isFunction(e) ? e() : null == e ? "" : e, i[i.length] = encodeURIComponent(t) + "=" + encodeURIComponent(e)
- };
- if (void 0 === e && (e = oe.ajaxSettings && oe.ajaxSettings.traditional), oe.isArray(t) || t.jquery && !oe.isPlainObject(t)) oe.each(t, function() {
- o(this.name, this.value)
- });
- else
- for (n in t) R(n, t[n], e, o);
- return i.join("&").replace(Un, "+")
- }, oe.fn.extend({
- serialize: function() {
- return oe.param(this.serializeArray())
- },
- serializeArray: function() {
- return this.map(function() {
- var t = oe.prop(this, "elements");
- return t ? oe.makeArray(t) : this
- }).filter(function() {
- var t = this.type;
- return this.name && !oe(this).is(":disabled") && Jn.test(this.nodeName) && !Gn.test(t) && (this.checked || !De.test(t))
- }).map(function(t, e) {
- var n = oe(this).val();
- return null == n ? null : oe.isArray(n) ? oe.map(n, function(t) {
- return {
- name: e.name,
- value: t.replace(Vn, "\r\n")
- }
- }) : {
- name: e.name,
- value: n.replace(Vn, "\r\n")
- }
- }).get()
- }
- }), oe.ajaxSettings.xhr = void 0 !== t.ActiveXObject ? function() {
- return !this.isLocal && /^(get|post|head|put|delete|options)$/i.test(this.type) && X() || Q()
- } : X;
- var Kn = 0,
- Zn = {},
- ti = oe.ajaxSettings.xhr();
- t.ActiveXObject && oe(t).on("unload", function() {
- for (var t in Zn) Zn[t](void 0, !0)
- }), ne.cors = !!ti && "withCredentials" in ti, ti = ne.ajax = !!ti, ti && oe.ajaxTransport(function(t) {
- if (!t.crossDomain || ne.cors) {
- var e;
- return {
- send: function(n, i) {
- var o, r = t.xhr(),
- s = ++Kn;
- if (r.open(t.type, t.url, t.async, t.username, t.password), t.xhrFields)
- for (o in t.xhrFields) r[o] = t.xhrFields[o];
- t.mimeType && r.overrideMimeType && r.overrideMimeType(t.mimeType), t.crossDomain || n["X-Requested-With"] || (n["X-Requested-With"] = "XMLHttpRequest");
- for (o in n) void 0 !== n[o] && r.setRequestHeader(o, n[o] + "");
- r.send(t.hasContent && t.data || null), e = function(n, o) {
- var a, l, c;
- if (e && (o || 4 === r.readyState))
- if (delete Zn[s], e = void 0, r.onreadystatechange = oe.noop, o) 4 !== r.readyState && r.abort();
- else {
- c = {}, a = r.status, "string" == typeof r.responseText && (c.text = r.responseText);
- try {
- l = r.statusText
- } catch (u) {
- l = ""
- }
- a || !t.isLocal || t.crossDomain ? 1223 === a && (a = 204) : a = c.text ? 200 : 404
- }
- c && i(a, l, c, r.getAllResponseHeaders())
- }, t.async ? 4 === r.readyState ? setTimeout(e) : r.onreadystatechange = Zn[s] = e : e()
- },
- abort: function() {
- e && e(void 0, !0)
- }
- }
- }
- }), oe.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /(?:java|ecma)script/
- },
- converters: {
- "text script": function(t) {
- return oe.globalEval(t), t
- }
- }
- }), oe.ajaxPrefilter("script", function(t) {
- void 0 === t.cache && (t.cache = !1), t.crossDomain && (t.type = "GET", t.global = !1)
- }), oe.ajaxTransport("script", function(t) {
- if (t.crossDomain) {
- var e, n = pe.head || oe("head")[0] || pe.documentElement;
- return {
- send: function(i, o) {
- e = pe.createElement("script"), e.async = !0, t.scriptCharset && (e.charset = t.scriptCharset), e.src = t.url, e.onload = e.onreadystatechange = function(t, n) {
- (n || !e.readyState || /loaded|complete/.test(e.readyState)) && (e.onload = e.onreadystatechange = null, e.parentNode && e.parentNode.removeChild(e), e = null, n || o(200, "success"))
- }, n.insertBefore(e, n.firstChild)
- },
- abort: function() {
- e && e.onload(void 0, !0)
- }
- }
- }
- });
- var ei = [],
- ni = /(=)\?(?=&|$)|\?\?/;
- oe.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- var t = ei.pop() || oe.expando + "_" + jn++;
- return this[t] = !0, t
- }
- }), oe.ajaxPrefilter("json jsonp", function(e, n, i) {
- var o, r, s, a = e.jsonp !== !1 && (ni.test(e.url) ? "url" : "string" == typeof e.data && !(e.contentType || "").indexOf("application/x-www-form-urlencoded") && ni.test(e.data) && "data");
- return a || "jsonp" === e.dataTypes[0] ? (o = e.jsonpCallback = oe.isFunction(e.jsonpCallback) ? e.jsonpCallback() : e.jsonpCallback, a ? e[a] = e[a].replace(ni, "$1" + o) : e.jsonp !== !1 && (e.url += (Pn.test(e.url) ? "&" : "?") + e.jsonp + "=" + o), e.converters["script json"] = function() {
- return s || oe.error(o + " was not called"), s[0]
- }, e.dataTypes[0] = "json", r = t[o], t[o] = function() {
- s = arguments
- }, i.always(function() {
- t[o] = r, e[o] && (e.jsonpCallback = n.jsonpCallback, ei.push(o)), s && oe.isFunction(r) && r(s[0]), s = r = void 0
- }), "script") : void 0
- }), oe.parseHTML = function(t, e, n) {
- if (!t || "string" != typeof t) return null;
- "boolean" == typeof e && (n = e, e = !1), e = e || pe;
- var i = he.exec(t),
- o = !n && [];
- return i ? [e.createElement(i[1])] : (i = oe.buildFragment([t], e, o), o && o.length && oe(o).remove(), oe.merge([], i.childNodes))
- };
- var ii = oe.fn.load;
- oe.fn.load = function(t, e, n) {
- if ("string" != typeof t && ii) return ii.apply(this, arguments);
- var i, o, r, s = this,
- a = t.indexOf(" ");
- return a >= 0 && (i = oe.trim(t.slice(a, t.length)), t = t.slice(0, a)), oe.isFunction(e) ? (n = e, e = void 0) : e && "object" == typeof e && (r = "POST"), s.length > 0 && oe.ajax({
- url: t,
- type: r,
- dataType: "html",
- data: e
- }).done(function(t) {
- o = arguments, s.html(i ? oe("<div>").append(oe.parseHTML(t)).find(i) : t)
- }).complete(n && function(t, e) {
- s.each(n, o || [t.responseText, e, t])
- }), this
- }, oe.expr.filters.animated = function(t) {
- return oe.grep(oe.timers, function(e) {
- return t === e.elem
- }).length
- };
- var oi = t.document.documentElement;
- oe.offset = {
- setOffset: function(t, e, n) {
- var i, o, r, s, a, l, c, u = oe.css(t, "position"),
- h = oe(t),
- d = {};
- "static" === u && (t.style.position = "relative"), a = h.offset(), r = oe.css(t, "top"), l = oe.css(t, "left"), c = ("absolute" === u || "fixed" === u) && oe.inArray("auto", [r, l]) > -1, c ? (i = h.position(), s = i.top, o = i.left) : (s = parseFloat(r) || 0, o = parseFloat(l) || 0), oe.isFunction(e) && (e = e.call(t, n, a)), null != e.top && (d.top = e.top - a.top + s), null != e.left && (d.left = e.left - a.left + o), "using" in e ? e.using.call(t, d) : h.css(d)
- }
- }, oe.fn.extend({
- offset: function(t) {
- if (arguments.length) return void 0 === t ? this : this.each(function(e) {
- oe.offset.setOffset(this, t, e)
- });
- var e, n, i = {
- top: 0,
- left: 0
- },
- o = this[0],
- r = o && o.ownerDocument;
- if (r) return e = r.documentElement, oe.contains(e, o) ? (typeof o.getBoundingClientRect !== ke && (i = o.getBoundingClientRect()), n = U(r), {
- top: i.top + (n.pageYOffset || e.scrollTop) - (e.clientTop || 0),
- left: i.left + (n.pageXOffset || e.scrollLeft) - (e.clientLeft || 0)
- }) : i
- },
- position: function() {
- if (this[0]) {
- var t, e, n = {
- top: 0,
- left: 0
- },
- i = this[0];
- return "fixed" === oe.css(i, "position") ? e = i.getBoundingClientRect() : (t = this.offsetParent(), e = this.offset(), oe.nodeName(t[0], "html") || (n = t.offset()), n.top += oe.css(t[0], "borderTopWidth", !0), n.left += oe.css(t[0], "borderLeftWidth", !0)), {
- top: e.top - n.top - oe.css(i, "marginTop", !0),
- left: e.left - n.left - oe.css(i, "marginLeft", !0)
- }
- }
- },
- offsetParent: function() {
- return this.map(function() {
- for (var t = this.offsetParent || oi; t && !oe.nodeName(t, "html") && "static" === oe.css(t, "position");) t = t.offsetParent;
- return t || oi
- })
- }
- }), oe.each({
- scrollLeft: "pageXOffset",
- scrollTop: "pageYOffset"
- }, function(t, e) {
- var n = /Y/.test(e);
- oe.fn[t] = function(i) {
- return Ne(this, function(t, i, o) {
- var r = U(t);
- return void 0 === o ? r ? e in r ? r[e] : r.document.documentElement[i] : t[i] : void(r ? r.scrollTo(n ? oe(r).scrollLeft() : o, n ? o : oe(r).scrollTop()) : t[i] = o)
- }, t, i, arguments.length, null)
- }
- }), oe.each(["top", "left"], function(t, e) {
- oe.cssHooks[e] = $(ne.pixelPosition, function(t, n) {
- return n ? (n = en(t, e), on.test(n) ? oe(t).position()[e] + "px" : n) : void 0
- })
- }), oe.each({
- Height: "height",
- Width: "width"
- }, function(t, e) {
- oe.each({
- padding: "inner" + t,
- content: e,
- "": "outer" + t
- }, function(n, i) {
- oe.fn[i] = function(i, o) {
- var r = arguments.length && (n || "boolean" != typeof i),
- s = n || (i === !0 || o === !0 ? "margin" : "border");
- return Ne(this, function(e, n, i) {
- var o;
- return oe.isWindow(e) ? e.document.documentElement["client" + t] : 9 === e.nodeType ? (o = e.documentElement, Math.max(e.body["scroll" + t], o["scroll" + t], e.body["offset" + t], o["offset" + t], o["client" + t])) : void 0 === i ? oe.css(e, n, s) : oe.style(e, n, i, s)
- }, e, r ? i : void 0, r, null)
- }
- })
- }), oe.fn.size = function() {
- return this.length
- }, oe.fn.andSelf = oe.fn.addBack, "function" == typeof define && define.amd && define("jquery", [], function() {
- return oe
- });
- var ri = t.jQuery,
- si = t.$;
- return oe.noConflict = function(e) {
- return t.$ === oe && (t.$ = si), e && t.jQuery === oe && (t.jQuery = ri), oe
- }, typeof e === ke && (t.jQuery = t.$ = oe), oe
- }),
- function(t, e) {
- t.rails !== e && t.error("jquery-ujs has already been loaded!");
- var n, i = t(document);
- t.rails = n = {
- linkClickSelector: "a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]",
- buttonClickSelector: "button[data-remote]:not(form button), button[data-confirm]:not(form button)",
- inputChangeSelector: "select[data-remote], input[data-remote], textarea[data-remote]",
- formSubmitSelector: "form",
- formInputClickSelector: "form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",
- disableSelector: "input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",
- enableSelector: "input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",
- requiredInputSelector: "input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",
- fileInputSelector: "input[type=file]",
- linkDisableSelector: "a[data-disable-with], a[data-disable]",
- buttonDisableSelector: "button[data-remote][data-disable-with], button[data-remote][data-disable]",
- CSRFProtection: function(e) {
- var n = t('meta[name="csrf-token"]').attr("content");
- n && e.setRequestHeader("X-CSRF-Token", n)
- },
- refreshCSRFTokens: function() {
- var e = t("meta[name=csrf-token]").attr("content"),
- n = t("meta[name=csrf-param]").attr("content");
- t('form input[name="' + n + '"]').val(e)
- },
- fire: function(e, n, i) {
- var o = t.Event(n);
- return e.trigger(o, i), o.result !== !1
- },
- confirm: function(t) {
- return confirm(t)
- },
- ajax: function(e) {
- return t.ajax(e)
- },
- href: function(t) {
- return t.attr("href")
- },
- handleRemote: function(i) {
- var o, r, s, a, l, c, u, h;
- if (n.fire(i, "ajax:before")) {
- if (a = i.data("cross-domain"), l = a === e ? null : a, c = i.data("with-credentials") || null, u = i.data("type") || t.ajaxSettings && t.ajaxSettings.dataType, i.is("form")) {
- o = i.attr("method"), r = i.attr("action"), s = i.serializeArray();
- var d = i.data("ujs:submit-button");
- d && (s.push(d), i.data("ujs:submit-button", null))
- } else i.is(n.inputChangeSelector) ? (o = i.data("method"), r = i.data("url"), s = i.serialize(), i.data("params") && (s = s + "&" + i.data("params"))) : i.is(n.buttonClickSelector) ? (o = i.data("method") || "get", r = i.data("url"), s = i.serialize(), i.data("params") && (s = s + "&" + i.data("params"))) : (o = i.data("method"), r = n.href(i), s = i.data("params") || null);
- return h = {
- type: o || "GET",
- data: s,
- dataType: u,
- beforeSend: function(t, o) {
- return o.dataType === e && t.setRequestHeader("accept", "*/*;q=0.5, " + o.accepts.script), n.fire(i, "ajax:beforeSend", [t, o]) ? void i.trigger("ajax:send", t) : !1
- },
- success: function(t, e, n) {
- i.trigger("ajax:success", [t, e, n])
- },
- complete: function(t, e) {
- i.trigger("ajax:complete", [t, e])
- },
- error: function(t, e, n) {
- i.trigger("ajax:error", [t, e, n])
- },
- crossDomain: l
- }, c && (h.xhrFields = {
- withCredentials: c
- }), r && (h.url = r), n.ajax(h)
- }
- return !1
- },
- handleMethod: function(i) {
- var o = n.href(i),
- r = i.data("method"),
- s = i.attr("target"),
- a = t("meta[name=csrf-token]").attr("content"),
- l = t("meta[name=csrf-param]").attr("content"),
- c = t('<form method="post" action="' + o + '"></form>'),
- u = '<input name="_method" value="' + r + '" type="hidden" />';
- l !== e && a !== e && (u += '<input name="' + l + '" value="' + a + '" type="hidden" />'), s && c.attr("target", s), c.hide().append(u).appendTo("body"), c.submit()
- },
- formElements: function(e, n) {
- return e.is("form") ? t(e[0].elements).filter(n) : e.find(n)
- },
- disableFormElements: function(e) {
- n.formElements(e, n.disableSelector).each(function() {
- n.disableFormElement(t(this))
- })
- },
- disableFormElement: function(t) {
- var n, i;
- n = t.is("button") ? "html" : "val", i = t.data("disable-with"), t.data("ujs:enable-with", t[n]()), i !== e && t[n](i), t.prop("disabled", !0)
- },
- enableFormElements: function(e) {
- n.formElements(e, n.enableSelector).each(function() {
- n.enableFormElement(t(this))
- })
- },
- enableFormElement: function(t) {
- var e = t.is("button") ? "html" : "val";
- t.data("ujs:enable-with") && t[e](t.data("ujs:enable-with")), t.prop("disabled", !1)
- },
- allowAction: function(t) {
- var e, i = t.data("confirm"),
- o = !1;
- return i ? (n.fire(t, "confirm") && (o = n.confirm(i), e = n.fire(t, "confirm:complete", [o])), o && e) : !0
- },
- blankInputs: function(e, n, i) {
- var o, r, s = t(),
- a = n || "input,textarea",
- l = e.find(a);
- return l.each(function() {
- if (o = t(this), r = o.is("input[type=checkbox],input[type=radio]") ? o.is(":checked") : o.val(), !r == !i) {
- if (o.is("input[type=radio]") && l.filter('input[type=radio]:checked[name="' + o.attr("name") + '"]').length) return !0;
- s = s.add(o)
- }
- }), s.length ? s : !1
- },
- nonBlankInputs: function(t, e) {
- return n.blankInputs(t, e, !0)
- },
- stopEverything: function(e) {
- return t(e.target).trigger("ujs:everythingStopped"), e.stopImmediatePropagation(), !1
- },
- disableElement: function(t) {
- var i = t.data("disable-with");
- t.data("ujs:enable-with", t.html()), i !== e && t.html(i), t.bind("click.railsDisable", function(t) {
- return n.stopEverything(t)
- })
- },
- enableElement: function(t) {
- t.data("ujs:enable-with") !== e && (t.html(t.data("ujs:enable-with")), t.removeData("ujs:enable-with")), t.unbind("click.railsDisable")
- }
- }, n.fire(i, "rails:attachBindings") && (t.ajaxPrefilter(function(t, e, i) {
- t.crossDomain || n.CSRFProtection(i)
- }), i.delegate(n.linkDisableSelector, "ajax:complete", function() {
- n.enableElement(t(this))
- }), i.delegate(n.buttonDisableSelector, "ajax:complete", function() {
- n.enableFormElement(t(this))
- }), i.delegate(n.linkClickSelector, "click.rails", function(i) {
- var o = t(this),
- r = o.data("method"),
- s = o.data("params"),
- a = i.metaKey || i.ctrlKey;
- if (!n.allowAction(o)) return n.stopEverything(i);
- if (!a && o.is(n.linkDisableSelector) && n.disableElement(o), o.data("remote") !== e) {
- if (a && (!r || "GET" === r) && !s) return !0;
- var l = n.handleRemote(o);
- return l === !1 ? n.enableElement(o) : l.error(function() {
- n.enableElement(o)
- }), !1
- }
- return o.data("method") ? (n.handleMethod(o), !1) : void 0
- }), i.delegate(n.buttonClickSelector, "click.rails", function(e) {
- var i = t(this);
- if (!n.allowAction(i)) return n.stopEverything(e);
- i.is(n.buttonDisableSelector) && n.disableFormElement(i);
- var o = n.handleRemote(i);
- return o === !1 ? n.enableFormElement(i) : o.error(function() {
- n.enableFormElement(i)
- }), !1
- }), i.delegate(n.inputChangeSelector, "change.rails", function(e) {
- var i = t(this);
- return n.allowAction(i) ? (n.handleRemote(i), !1) : n.stopEverything(e)
- }), i.delegate(n.formSubmitSelector, "submit.rails", function(i) {
- var o, r, s = t(this),
- a = s.data("remote") !== e;
- if (!n.allowAction(s)) return n.stopEverything(i);
- if (s.attr("novalidate") == e && (o = n.blankInputs(s, n.requiredInputSelector), o && n.fire(s, "ajax:aborted:required", [o]))) return n.stopEverything(i);
- if (a) {
- if (r = n.nonBlankInputs(s, n.fileInputSelector)) {
- setTimeout(function() {
- n.disableFormElements(s)
- }, 13);
- var l = n.fire(s, "ajax:aborted:file", [r]);
- return l || setTimeout(function() {
- n.enableFormElements(s)
- }, 13), l
- }
- return n.handleRemote(s), !1
- }
- setTimeout(function() {
- n.disableFormElements(s)
- }, 13)
- }), i.delegate(n.formInputClickSelector, "click.rails", function(e) {
- var i = t(this);
- if (!n.allowAction(i)) return n.stopEverything(e);
- var o = i.attr("name"),
- r = o ? {
- name: o,
- value: i.val()
- } : null;
- i.closest("form").data("ujs:submit-button", r)
- }), i.delegate(n.formSubmitSelector, "ajax:send.rails", function(e) {
- this == e.target && n.disableFormElements(t(this))
- }), i.delegate(n.formSubmitSelector, "ajax:complete.rails", function(e) {
- this == e.target && n.enableFormElements(t(this))
- }), t(function() {
- n.refreshCSRFTokens()
- }))
- }(jQuery),
- function(t) {
- "function" == typeof define && define.amd ? define(["jquery"], t) : t(jQuery)
- }(function(t) {
- function e(e, i) {
- var o, r, s, a = e.nodeName.toLowerCase();
- return "area" === a ? (o = e.parentNode, r = o.name, e.href && r && "map" === o.nodeName.toLowerCase() ? (s = t("img[usemap=#" + r + "]")[0], !!s && n(s)) : !1) : (/input|select|textarea|button|object/.test(a) ? !e.disabled : "a" === a ? e.href || i : i) && n(e)
- }
- function n(e) {
- return t.expr.filters.visible(e) && !t(e).parents().addBack().filter(function() {
- return "hidden" === t.css(this, "visibility")
- }).length
- }
- t.ui = t.ui || {}, t.extend(t.ui, {
- version: "1.11.0",
- keyCode: {
- BACKSPACE: 8,
- COMMA: 188,
- DELETE: 46,
- DOWN: 40,
- END: 35,
- ENTER: 13,
- ESCAPE: 27,
- HOME: 36,
- LEFT: 37,
- PAGE_DOWN: 34,
- PAGE_UP: 33,
- PERIOD: 190,
- RIGHT: 39,
- SPACE: 32,
- TAB: 9,
- UP: 38
- }
- }), t.fn.extend({
- scrollParent: function() {
- var e = this.css("position"),
- n = "absolute" === e,
- i = this.parents().filter(function() {
- var e = t(this);
- return n && "static" === e.css("position") ? !1 : /(auto|scroll)/.test(e.css("overflow") + e.css("overflow-y") + e.css("overflow-x"))
- }).eq(0);
- return "fixed" !== e && i.length ? i : t(this[0].ownerDocument || document)
- },
- uniqueId: function() {
- var t = 0;
- return function() {
- return this.each(function() {
- this.id || (this.id = "ui-id-" + ++t)
- })
- }
- }(),
- removeUniqueId: function() {
- return this.each(function() {
- /^ui-id-\d+$/.test(this.id) && t(this).removeAttr("id")
- })
- }
- }), t.extend(t.expr[":"], {
- data: t.expr.createPseudo ? t.expr.createPseudo(function(e) {
- return function(n) {
- return !!t.data(n, e)
- }
- }) : function(e, n, i) {
- return !!t.data(e, i[3])
- },
- focusable: function(n) {
- return e(n, !isNaN(t.attr(n, "tabindex")))
- },
- tabbable: function(n) {
- var i = t.attr(n, "tabindex"),
- o = isNaN(i);
- return (o || i >= 0) && e(n, !o)
- }
- }), t("<a>").outerWidth(1).jquery || t.each(["Width", "Height"], function(e, n) {
- function i(e, n, i, r) {
- return t.each(o, function() {
- n -= parseFloat(t.css(e, "padding" + this)) || 0, i && (n -= parseFloat(t.css(e, "border" + this + "Width")) || 0), r && (n -= parseFloat(t.css(e, "margin" + this)) || 0)
- }), n
- }
- var o = "Width" === n ? ["Left", "Right"] : ["Top", "Bottom"],
- r = n.toLowerCase(),
- s = {
- innerWidth: t.fn.innerWidth,
- innerHeight: t.fn.innerHeight,
- outerWidth: t.fn.outerWidth,
- outerHeight: t.fn.outerHeight
- };
- t.fn["inner" + n] = function(e) {
- return void 0 === e ? s["inner" + n].call(this) : this.each(function() {
- t(this).css(r, i(this, e) + "px")
- })
- }, t.fn["outer" + n] = function(e, o) {
- return "number" != typeof e ? s["outer" + n].call(this, e) : this.each(function() {
- t(this).css(r, i(this, e, !0, o) + "px")
- })
- }
- }), t.fn.addBack || (t.fn.addBack = function(t) {
- return this.add(null == t ? this.prevObject : this.prevObject.filter(t))
- }), t("<a>").data("a-b", "a").removeData("a-b").data("a-b") && (t.fn.removeData = function(e) {
- return function(n) {
- return arguments.length ? e.call(this, t.camelCase(n)) : e.call(this)
- }
- }(t.fn.removeData)), t.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()), t.fn.extend({
- focus: function(e) {
- return function(n, i) {
- return "number" == typeof n ? this.each(function() {
- var e = this;
- setTimeout(function() {
- t(e).focus(), i && i.call(e)
- }, n)
- }) : e.apply(this, arguments)
- }
- }(t.fn.focus),
- disableSelection: function() {
- var t = "onselectstart" in document.createElement("div") ? "selectstart" : "mousedown";
- return function() {
- return this.bind(t + ".ui-disableSelection", function(t) {
- t.preventDefault()
- })
- }
- }(),
- enableSelection: function() {
- return this.unbind(".ui-disableSelection")
- },
- zIndex: function(e) {
- if (void 0 !== e) return this.css("zIndex", e);
- if (this.length)
- for (var n, i, o = t(this[0]); o.length && o[0] !== document;) {
- if (n = o.css("position"), ("absolute" === n || "relative" === n || "fixed" === n) && (i = parseInt(o.css("zIndex"), 10), !isNaN(i) && 0 !== i)) return i;
- o = o.parent()
- }
- return 0
- }
- }), t.ui.plugin = {
- add: function(e, n, i) {
- var o, r = t.ui[e].prototype;
- for (o in i) r.plugins[o] = r.plugins[o] || [], r.plugins[o].push([n, i[o]])
- },
- call: function(t, e, n, i) {
- var o, r = t.plugins[e];
- if (r && (i || t.element[0].parentNode && 11 !== t.element[0].parentNode.nodeType))
- for (o = 0; o < r.length; o++) t.options[r[o][0]] && r[o][1].apply(t.element, n)
- }
- }
- }),
- function(t) {
- "function" == typeof define && define.amd ? define(["jquery"], t) : t(jQuery)
- }(function(t) {
- var e = 0,
- n = Array.prototype.slice;
- return t.cleanData = function(e) {
- return function(n) {
- for (var i, o = 0; null != (i = n[o]); o++) try {
- t(i).triggerHandler("remove")
- } catch (r) {}
- e(n)
- }
- }(t.cleanData), t.widget = function(e, n, i) {
- var o, r, s, a, l = {},
- c = e.split(".")[0];
- return e = e.split(".")[1], o = c + "-" + e, i || (i = n, n = t.Widget), t.expr[":"][o.toLowerCase()] = function(e) {
- return !!t.data(e, o)
- }, t[c] = t[c] || {}, r = t[c][e], s = t[c][e] = function(t, e) {
- return this._createWidget ? void(arguments.length && this._createWidget(t, e)) : new s(t, e)
- }, t.extend(s, r, {
- version: i.version,
- _proto: t.extend({}, i),
- _childConstructors: []
- }), a = new n, a.options = t.widget.extend({}, a.options), t.each(i, function(e, i) {
- return t.isFunction(i) ? void(l[e] = function() {
- var t = function() {
- return n.prototype[e].apply(this, arguments)
- },
- o = function(t) {
- return n.prototype[e].apply(this, t)
- };
- return function() {
- var e, n = this._super,
- r = this._superApply;
- return this._super = t, this._superApply = o, e = i.apply(this, arguments), this._super = n, this._superApply = r, e
- }
- }()) : void(l[e] = i)
- }), s.prototype = t.widget.extend(a, {
- widgetEventPrefix: r ? a.widgetEventPrefix || e : e
- }, l, {
- constructor: s,
- namespace: c,
- widgetName: e,
- widgetFullName: o
- }), r ? (t.each(r._childConstructors, function(e, n) {
- var i = n.prototype;
- t.widget(i.namespace + "." + i.widgetName, s, n._proto)
- }), delete r._childConstructors) : n._childConstructors.push(s), t.widget.bridge(e, s), s
- }, t.widget.extend = function(e) {
- for (var i, o, r = n.call(arguments, 1), s = 0, a = r.length; a > s; s++)
- for (i in r[s]) o = r[s][i], r[s].hasOwnProperty(i) && void 0 !== o && (e[i] = t.isPlainObject(o) ? t.isPlainObject(e[i]) ? t.widget.extend({}, e[i], o) : t.widget.extend({}, o) : o);
- return e
- }, t.widget.bridge = function(e, i) {
- var o = i.prototype.widgetFullName || e;
- t.fn[e] = function(r) {
- var s = "string" == typeof r,
- a = n.call(arguments, 1),
- l = this;
- return r = !s && a.length ? t.widget.extend.apply(null, [r].concat(a)) : r, this.each(s ? function() {
- var n, i = t.data(this, o);
- return "instance" === r ? (l = i, !1) : i ? t.isFunction(i[r]) && "_" !== r.charAt(0) ? (n = i[r].apply(i, a), n !== i && void 0 !== n ? (l = n && n.jquery ? l.pushStack(n.get()) : n, !1) : void 0) : t.error("no such method '" + r + "' for " + e + " widget instance") : t.error("cannot call methods on " + e + " prior to initialization; attempted to call method '" + r + "'")
- } : function() {
- var e = t.data(this, o);
- e ? (e.option(r || {}), e._init && e._init()) : t.data(this, o, new i(r, this))
- }), l
- }
- }, t.Widget = function() {}, t.Widget._childConstructors = [], t.Widget.prototype = {
- widgetName: "widget",
- widgetEventPrefix: "",
- defaultElement: "<div>",
- options: {
- disabled: !1,
- create: null
- },
- _createWidget: function(n, i) {
- i = t(i || this.defaultElement || this)[0], this.element = t(i), this.uuid = e++, this.eventNamespace = "." + this.widgetName + this.uuid, this.options = t.widget.extend({}, this.options, this._getCreateOptions(), n), this.bindings = t(), this.hoverable = t(), this.focusable = t(), i !== this && (t.data(i, this.widgetFullName, this), this._on(!0, this.element, {
- remove: function(t) {
- t.target === i && this.destroy()
- }
- }), this.document = t(i.style ? i.ownerDocument : i.document || i), this.window = t(this.document[0].defaultView || this.document[0].parentWindow)), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init()
- },
- _getCreateOptions: t.noop,
- _getCreateEventData: t.noop,
- _create: t.noop,
- _init: t.noop,
- destroy: function() {
- this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)), this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")
- },
- _destroy: t.noop,
- widget: function() {
- return this.element
- },
- option: function(e, n) {
- var i, o, r, s = e;
- if (0 === arguments.length) return t.widget.extend({}, this.options);
- if ("string" == typeof e)
- if (s = {}, i = e.split("."), e = i.shift(), i.length) {
- for (o = s[e] = t.widget.extend({}, this.options[e]), r = 0; r < i.length - 1; r++) o[i[r]] = o[i[r]] || {}, o = o[i[r]];
- if (e = i.pop(), 1 === arguments.length) return void 0 === o[e] ? null : o[e];
- o[e] = n
- } else {
- if (1 === arguments.length) return void 0 === this.options[e] ? null : this.options[e];
- s[e] = n
- }
- return this._setOptions(s), this
- },
- _setOptions: function(t) {
- var e;
- for (e in t) this._setOption(e, t[e]);
- return this
- },
- _setOption: function(t, e) {
- return this.options[t] = e, "disabled" === t && (this.widget().toggleClass(this.widgetFullName + "-disabled", !!e), e && (this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus"))), this
- },
- enable: function() {
- return this._setOptions({
- disabled: !1
- })
- },
- disable: function() {
- return this._setOptions({
- disabled: !0
- })
- },
- _on: function(e, n, i) {
- var o, r = this;
- "boolean" != typeof e && (i = n, n = e, e = !1), i ? (n = o = t(n), this.bindings = this.bindings.add(n)) : (i = n, n = this.element, o = this.widget()), t.each(i, function(i, s) {
- function a() {
- return e || r.options.disabled !== !0 && !t(this).hasClass("ui-state-disabled") ? ("string" == typeof s ? r[s] : s).apply(r, arguments) : void 0
- }
- "string" != typeof s && (a.guid = s.guid = s.guid || a.guid || t.guid++);
- var l = i.match(/^([\w:-]*)\s*(.*)$/),
- c = l[1] + r.eventNamespace,
- u = l[2];
- u ? o.delegate(u, c, a) : n.bind(c, a)
- })
- },
- _off: function(t, e) {
- e = (e || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, t.unbind(e).undelegate(e)
- },
- _delay: function(t, e) {
- function n() {
- return ("string" == typeof t ? i[t] : t).apply(i, arguments)
- }
- var i = this;
- return setTimeout(n, e || 0)
- },
- _hoverable: function(e) {
- this.hoverable = this.hoverable.add(e), this._on(e, {
- mouseenter: function(e) {
- t(e.currentTarget).addClass("ui-state-hover")
- },
- mouseleave: function(e) {
- t(e.currentTarget).removeClass("ui-state-hover")
- }
- })
- },
- _focusable: function(e) {
- this.focusable = this.focusable.add(e), this._on(e, {
- focusin: function(e) {
- t(e.currentTarget).addClass("ui-state-focus")
- },
- focusout: function(e) {
- t(e.currentTarget).removeClass("ui-state-focus")
- }
- })
- },
- _trigger: function(e, n, i) {
- var o, r, s = this.options[e];
- if (i = i || {}, n = t.Event(n), n.type = (e === this.widgetEventPrefix ? e : this.widgetEventPrefix + e).toLowerCase(), n.target = this.element[0], r = n.originalEvent)
- for (o in r) o in n || (n[o] = r[o]);
- return this.element.trigger(n, i), !(t.isFunction(s) && s.apply(this.element[0], [n].concat(i)) === !1 || n.isDefaultPrevented())
- }
- }, t.each({
- show: "fadeIn",
- hide: "fadeOut"
- }, function(e, n) {
- t.Widget.prototype["_" + e] = function(i, o, r) {
- "string" == typeof o && (o = {
- effect: o
- });
- var s, a = o ? o === !0 || "number" == typeof o ? n : o.effect || n : e;
- o = o || {}, "number" == typeof o && (o = {
- duration: o
- }), s = !t.isEmptyObject(o), o.complete = r, o.delay && i.delay(o.delay), s && t.effects && t.effects.effect[a] ? i[e](o) : a !== e && i[a] ? i[a](o.duration, o.easing, r) : i.queue(function(n) {
- t(this)[e](), r && r.call(i[0]), n()
- })
- }
- }), t.widget
- }),
- function(t) {
- "function" == typeof define && define.amd ? define(["jquery", "./widget"], t) : t(jQuery)
- }(function(t) {
- var e = !1;
- return t(document).mouseup(function() {
- e = !1
- }), t.widget("ui.mouse", {
- version: "1.11.0",
- options: {
- cancel: "input,textarea,button,select,option",
- distance: 1,
- delay: 0
- },
- _mouseInit: function() {
- var e = this;
- this.element.bind("mousedown." + this.widgetName, function(t) {
- return e._mouseDown(t)
- }).bind("click." + this.widgetName, function(n) {
- return !0 === t.data(n.target, e.widgetName + ".preventClickEvent") ? (t.removeData(n.target, e.widgetName + ".preventClickEvent"), n.stopImmediatePropagation(), !1) : void 0
- }), this.started = !1
- },
- _mouseDestroy: function() {
- this.element.unbind("." + this.widgetName), this._mouseMoveDelegate && this.document.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate)
- },
- _mouseDown: function(n) {
- if (!e) {
- this._mouseStarted && this._mouseUp(n), this._mouseDownEvent = n;
- var i = this,
- o = 1 === n.which,
- r = "string" == typeof this.options.cancel && n.target.nodeName ? t(n.target).closest(this.options.cancel).length : !1;
- return o && !r && this._mouseCapture(n) ? (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function() {
- i.mouseDelayMet = !0
- }, this.options.delay)), this._mouseDistanceMet(n) && this._mouseDelayMet(n) && (this._mouseStarted = this._mouseStart(n) !== !1, !this._mouseStarted) ? (n.preventDefault(), !0) : (!0 === t.data(n.target, this.widgetName + ".preventClickEvent") && t.removeData(n.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function(t) {
- return i._mouseMove(t)
- }, this._mouseUpDelegate = function(t) {
- return i._mouseUp(t)
- }, this.document.bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), n.preventDefault(), e = !0, !0)) : !0
- }
- },
- _mouseMove: function(e) {
- return t.ui.ie && (!document.documentMode || document.documentMode < 9) && !e.button ? this._mouseUp(e) : e.which ? this._mouseStarted ? (this._mouseDrag(e), e.preventDefault()) : (this._mouseDistanceMet(e) && this._mouseDelayMet(e) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, e) !== !1, this._mouseStarted ? this._mouseDrag(e) : this._mouseUp(e)), !this._mouseStarted) : this._mouseUp(e)
- },
- _mouseUp: function(n) {
- return this.document.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, n.target === this._mouseDownEvent.target && t.data(n.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(n)), e = !1, !1
- },
- _mouseDistanceMet: function(t) {
- return Math.max(Math.abs(this._mouseDownEvent.pageX - t.pageX), Math.abs(this._mouseDownEvent.pageY - t.pageY)) >= this.options.distance
- },
- _mouseDelayMet: function() {
- return this.mouseDelayMet
- },
- _mouseStart: function() {},
- _mouseDrag: function() {},
- _mouseStop: function() {},
- _mouseCapture: function() {
- return !0
- }
- })
- }),
- function(t) {
- "function" == typeof define && define.amd ? define(["jquery", "./core", "./mouse", "./widget"], t) : t(jQuery)
- }(function(t) {
- return t.widget("ui.sortable", t.ui.mouse, {
- version: "1.11.0",
- widgetEventPrefix: "sort",
- ready: !1,
- options: {
- appendTo: "parent",
- axis: !1,
- connectWith: !1,
- containment: !1,
- cursor: "auto",
- cursorAt: !1,
- dropOnEmpty: !0,
- forcePlaceholderSize: !1,
- forceHelperSize: !1,
- grid: !1,
- handle: !1,
- helper: "original",
- items: "> *",
- opacity: !1,
- placeholder: !1,
- revert: !1,
- scroll: !0,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- scope: "default",
- tolerance: "intersect",
- zIndex: 1e3,
- activate: null,
- beforeStop: null,
- change: null,
- deactivate: null,
- out: null,
- over: null,
- receive: null,
- remove: null,
- sort: null,
- start: null,
- stop: null,
- update: null
- },
- _isOverAxis: function(t, e, n) {
- return t >= e && e + n > t
- },
- _isFloating: function(t) {
- return /left|right/.test(t.css("float")) || /inline|table-cell/.test(t.css("display"))
- },
- _create: function() {
- var t = this.options;
- this.containerCache = {}, this.element.addClass("ui-sortable"), this.refresh(), this.floating = this.items.length ? "x" === t.axis || this._isFloating(this.items[0].item) : !1, this.offset = this.element.offset(), this._mouseInit(), this._setHandleClassName(), this.ready = !0
- },
- _setOption: function(t, e) {
- this._super(t, e), "handle" === t && this._setHandleClassName()
- },
- _setHandleClassName: function() {
- this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"), t.each(this.items, function() {
- (this.instance.options.handle ? this.item.find(this.instance.options.handle) : this.item).addClass("ui-sortable-handle")
- })
- },
- _destroy: function() {
- this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"), this._mouseDestroy();
- for (var t = this.items.length - 1; t >= 0; t--) this.items[t].item.removeData(this.widgetName + "-item");
- return this
- },
- _mouseCapture: function(e, n) {
- var i = null,
- o = !1,
- r = this;
- return this.reverting ? !1 : this.options.disabled || "static" === this.options.type ? !1 : (this._refreshItems(e), t(e.target).parents().each(function() {
- return t.data(this, r.widgetName + "-item") === r ? (i = t(this), !1) : void 0
- }), t.data(e.target, r.widgetName + "-item") === r && (i = t(e.target)), i && (!this.options.handle || n || (t(this.options.handle, i).find("*").addBack().each(function() {
- this === e.target && (o = !0)
- }), o)) ? (this.currentItem = i, this._removeCurrentsFromItems(), !0) : !1)
- },
- _mouseStart: function(e, n, i) {
- var o, r, s = this.options;
- if (this.currentContainer = this, this.refreshPositions(), this.helper = this._createHelper(e), this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(), this.offset = this.currentItem.offset(), this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- }, t.extend(this.offset, {
- click: {
- left: e.pageX - this.offset.left,
- top: e.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset()
- }), this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), this.originalPosition = this._generatePosition(e), this.originalPageX = e.pageX, this.originalPageY = e.pageY, s.cursorAt && this._adjustOffsetFromHelper(s.cursorAt), this.domPosition = {
- prev: this.currentItem.prev()[0],
- parent: this.currentItem.parent()[0]
- }, this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), s.containment && this._setContainment(), s.cursor && "auto" !== s.cursor && (r = this.document.find("body"), this.storedCursor = r.css("cursor"), r.css("cursor", s.cursor), this.storedStylesheet = t("<style>*{ cursor: " + s.cursor + " !important; }</style>").appendTo(r)), s.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", s.opacity)), s.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", s.zIndex)), this.scrollParent[0] !== document && "HTML" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent.offset()), this._trigger("start", e, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(), !i)
- for (o = this.containers.length - 1; o >= 0; o--) this.containers[o]._trigger("activate", e, this._uiHash(this));
- return t.ui.ddmanager && (t.ui.ddmanager.current = this), t.ui.ddmanager && !s.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e), this.dragging = !0, this.helper.addClass("ui-sortable-helper"), this._mouseDrag(e), !0
- },
- _mouseDrag: function(e) {
- var n, i, o, r, s = this.options,
- a = !1;
- for (this.position = this._generatePosition(e), this.positionAbs = this._convertPositionTo("absolute"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs), this.options.scroll && (this.scrollParent[0] !== document && "HTML" !== this.scrollParent[0].tagName ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - e.pageY < s.scrollSensitivity ? this.scrollParent[0].scrollTop = a = this.scrollParent[0].scrollTop + s.scrollSpeed : e.pageY - this.overflowOffset.top < s.scrollSensitivity && (this.scrollParent[0].scrollTop = a = this.scrollParent[0].scrollTop - s.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - e.pageX < s.scrollSensitivity ? this.scrollParent[0].scrollLeft = a = this.scrollParent[0].scrollLeft + s.scrollSpeed : e.pageX - this.overflowOffset.left < s.scrollSensitivity && (this.scrollParent[0].scrollLeft = a = this.scrollParent[0].scrollLeft - s.scrollSpeed)) : (e.pageY - t(document).scrollTop() < s.scrollSensitivity ? a = t(document).scrollTop(t(document).scrollTop() - s.scrollSpeed) : t(window).height() - (e.pageY - t(document).scrollTop()) < s.scrollSensitivity && (a = t(document).scrollTop(t(document).scrollTop() + s.scrollSpeed)), e.pageX - t(document).scrollLeft() < s.scrollSensitivity ? a = t(document).scrollLeft(t(document).scrollLeft() - s.scrollSpeed) : t(window).width() - (e.pageX - t(document).scrollLeft()) < s.scrollSensitivity && (a = t(document).scrollLeft(t(document).scrollLeft() + s.scrollSpeed))), a !== !1 && t.ui.ddmanager && !s.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e)), this.positionAbs = this._convertPositionTo("absolute"), this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), n = this.items.length - 1; n >= 0; n--)
- if (i = this.items[n], o = i.item[0], r = this._intersectsWithPointer(i), r && i.instance === this.currentContainer && o !== this.currentItem[0] && this.placeholder[1 === r ? "next" : "prev"]()[0] !== o && !t.contains(this.placeholder[0], o) && ("semi-dynamic" === this.options.type ? !t.contains(this.element[0], o) : !0)) {
- if (this.direction = 1 === r ? "down" : "up", "pointer" !== this.options.tolerance && !this._intersectsWithSides(i)) break;
- this._rearrange(e, i), this._trigger("change", e, this._uiHash());
- break
- }
- return this._contactContainers(e), t.ui.ddmanager && t.ui.ddmanager.drag(this, e), this._trigger("sort", e, this._uiHash()), this.lastPositionAbs = this.positionAbs, !1
- },
- _mouseStop: function(e, n) {
- if (e) {
- if (t.ui.ddmanager && !this.options.dropBehaviour && t.ui.ddmanager.drop(this, e), this.options.revert) {
- var i = this,
- o = this.placeholder.offset(),
- r = this.options.axis,
- s = {};
- r && "x" !== r || (s.left = o.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft)), r && "y" !== r || (s.top = o.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop)), this.reverting = !0, t(this.helper).animate(s, parseInt(this.options.revert, 10) || 500, function() {
- i._clear(e)
- })
- } else this._clear(e, n);
- return !1
- }
- },
- cancel: function() {
- if (this.dragging) {
- this._mouseUp({
- target: null
- }), "original" === this.options.helper ? this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") : this.currentItem.show();
- for (var e = this.containers.length - 1; e >= 0; e--) this.containers[e]._trigger("deactivate", null, this._uiHash(this)), this.containers[e].containerCache.over && (this.containers[e]._trigger("out", null, this._uiHash(this)), this.containers[e].containerCache.over = 0)
- }
- return this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), "original" !== this.options.helper && this.helper && this.helper[0].parentNode && this.helper.remove(), t.extend(this, {
- helper: null,
- dragging: !1,
- reverting: !1,
- _noFinalSort: null
- }), this.domPosition.prev ? t(this.domPosition.prev).after(this.currentItem) : t(this.domPosition.parent).prepend(this.currentItem)), this
- },
- serialize: function(e) {
- var n = this._getItemsAsjQuery(e && e.connected),
- i = [];
- return e = e || {}, t(n).each(function() {
- var n = (t(e.item || this).attr(e.attribute || "id") || "").match(e.expression || /(.+)[\-=_](.+)/);
- n && i.push((e.key || n[1] + "[]") + "=" + (e.key && e.expression ? n[1] : n[2]))
- }), !i.length && e.key && i.push(e.key + "="), i.join("&")
- },
- toArray: function(e) {
- var n = this._getItemsAsjQuery(e && e.connected),
- i = [];
- return e = e || {}, n.each(function() {
- i.push(t(e.item || this).attr(e.attribute || "id") || "")
- }), i
- },
- _intersectsWith: function(t) {
- var e = this.positionAbs.left,
- n = e + this.helperProportions.width,
- i = this.positionAbs.top,
- o = i + this.helperProportions.height,
- r = t.left,
- s = r + t.width,
- a = t.top,
- l = a + t.height,
- c = this.offset.click.top,
- u = this.offset.click.left,
- h = "x" === this.options.axis || i + c > a && l > i + c,
- d = "y" === this.options.axis || e + u > r && s > e + u,
- f = h && d;
- return "pointer" === this.options.tolerance || this.options.forcePointerForContainers || "pointer" !== this.options.tolerance && this.helperProportions[this.floating ? "width" : "height"] > t[this.floating ? "width" : "height"] ? f : r < e + this.helperProportions.width / 2 && n - this.helperProportions.width / 2 < s && a < i + this.helperProportions.height / 2 && o - this.helperProportions.height / 2 < l
- },
- _intersectsWithPointer: function(t) {
- var e = "x" === this.options.axis || this._isOverAxis(this.positionAbs.top + this.offset.click.top, t.top, t.height),
- n = "y" === this.options.axis || this._isOverAxis(this.positionAbs.left + this.offset.click.left, t.left, t.width),
- i = e && n,
- o = this._getDragVerticalDirection(),
- r = this._getDragHorizontalDirection();
- return i ? this.floating ? r && "right" === r || "down" === o ? 2 : 1 : o && ("down" === o ? 2 : 1) : !1
- },
- _intersectsWithSides: function(t) {
- var e = this._isOverAxis(this.positionAbs.top + this.offset.click.top, t.top + t.height / 2, t.height),
- n = this._isOverAxis(this.positionAbs.left + this.offset.click.left, t.left + t.width / 2, t.width),
- i = this._getDragVerticalDirection(),
- o = this._getDragHorizontalDirection();
- return this.floating && o ? "right" === o && n || "left" === o && !n : i && ("down" === i && e || "up" === i && !e)
- },
- _getDragVerticalDirection: function() {
- var t = this.positionAbs.top - this.lastPositionAbs.top;
- return 0 !== t && (t > 0 ? "down" : "up")
- },
- _getDragHorizontalDirection: function() {
- var t = this.positionAbs.left - this.lastPositionAbs.left;
- return 0 !== t && (t > 0 ? "right" : "left")
- },
- refresh: function(t) {
- return this._refreshItems(t), this._setHandleClassName(), this.refreshPositions(), this
- },
- _connectWith: function() {
- var t = this.options;
- return t.connectWith.constructor === String ? [t.connectWith] : t.connectWith
- },
- _getItemsAsjQuery: function(e) {
- function n() {
- a.push(this)
- }
- var i, o, r, s, a = [],
- l = [],
- c = this._connectWith();
- if (c && e)
- for (i = c.length - 1; i >= 0; i--)
- for (r = t(c[i]), o = r.length - 1; o >= 0; o--) s = t.data(r[o], this.widgetFullName), s && s !== this && !s.options.disabled && l.push([t.isFunction(s.options.items) ? s.options.items.call(s.element) : t(s.options.items, s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), s]);
- for (l.push([t.isFunction(this.options.items) ? this.options.items.call(this.element, null, {
- options: this.options,
- item: this.currentItem
- }) : t(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]), i = l.length - 1; i >= 0; i--) l[i][0].each(n);
- return t(a)
- },
- _removeCurrentsFromItems: function() {
- var e = this.currentItem.find(":data(" + this.widgetName + "-item)");
- this.items = t.grep(this.items, function(t) {
- for (var n = 0; n < e.length; n++)
- if (e[n] === t.item[0]) return !1;
- return !0
- })
- },
- _refreshItems: function(e) {
- this.items = [], this.containers = [this];
- var n, i, o, r, s, a, l, c, u = this.items,
- h = [
- [t.isFunction(this.options.items) ? this.options.items.call(this.element[0], e, {
- item: this.currentItem
- }) : t(this.options.items, this.element), this]
- ],
- d = this._connectWith();
- if (d && this.ready)
- for (n = d.length - 1; n >= 0; n--)
- for (o = t(d[n]), i = o.length - 1; i >= 0; i--) r = t.data(o[i], this.widgetFullName), r && r !== this && !r.options.disabled && (h.push([t.isFunction(r.options.items) ? r.options.items.call(r.element[0], e, {
- item: this.currentItem
- }) : t(r.options.items, r.element), r]), this.containers.push(r));
- for (n = h.length - 1; n >= 0; n--)
- for (s = h[n][1], a = h[n][0], i = 0, c = a.length; c > i; i++) l = t(a[i]), l.data(this.widgetName + "-item", s), u.push({
- item: l,
- instance: s,
- width: 0,
- height: 0,
- left: 0,
- top: 0
- })
- },
- refreshPositions: function(e) {
- this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset());
- var n, i, o, r;
- for (n = this.items.length - 1; n >= 0; n--) i = this.items[n], i.instance !== this.currentContainer && this.currentContainer && i.item[0] !== this.currentItem[0] || (o = this.options.toleranceElement ? t(this.options.toleranceElement, i.item) : i.item, e || (i.width = o.outerWidth(), i.height = o.outerHeight()), r = o.offset(), i.left = r.left, i.top = r.top);
- if (this.options.custom && this.options.custom.refreshContainers) this.options.custom.refreshContainers.call(this);
- else
- for (n = this.containers.length - 1; n >= 0; n--) r = this.containers[n].element.offset(), this.containers[n].containerCache.left = r.left, this.containers[n].containerCache.top = r.top, this.containers[n].containerCache.width = this.containers[n].element.outerWidth(), this.containers[n].containerCache.height = this.containers[n].element.outerHeight();
- return this
- },
- _createPlaceholder: function(e) {
- e = e || this;
- var n, i = e.options;
- i.placeholder && i.placeholder.constructor !== String || (n = i.placeholder, i.placeholder = {
- element: function() {
- var i = e.currentItem[0].nodeName.toLowerCase(),
- o = t("<" + i + ">", e.document[0]).addClass(n || e.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper");
- return "tr" === i ? e.currentItem.children().each(function() {
- t("<td> </td>", e.document[0]).attr("colspan", t(this).attr("colspan") || 1).appendTo(o)
- }) : "img" === i && o.attr("src", e.currentItem.attr("src")), n || o.css("visibility", "hidden"), o
- },
- update: function(t, o) {
- (!n || i.forcePlaceholderSize) && (o.height() || o.height(e.currentItem.innerHeight() - parseInt(e.currentItem.css("paddingTop") || 0, 10) - parseInt(e.currentItem.css("paddingBottom") || 0, 10)), o.width() || o.width(e.currentItem.innerWidth() - parseInt(e.currentItem.css("paddingLeft") || 0, 10) - parseInt(e.currentItem.css("paddingRight") || 0, 10)))
- }
- }), e.placeholder = t(i.placeholder.element.call(e.element, e.currentItem)), e.currentItem.after(e.placeholder), i.placeholder.update(e, e.placeholder)
- },
- _contactContainers: function(e) {
- var n, i, o, r, s, a, l, c, u, h, d = null,
- f = null;
- for (n = this.containers.length - 1; n >= 0; n--)
- if (!t.contains(this.currentItem[0], this.containers[n].element[0]))
- if (this._intersectsWith(this.containers[n].containerCache)) {
- if (d && t.contains(this.containers[n].element[0], d.element[0])) continue;
- d = this.containers[n], f = n
- } else this.containers[n].containerCache.over && (this.containers[n]._trigger("out", e, this._uiHash(this)), this.containers[n].containerCache.over = 0);
- if (d)
- if (1 === this.containers.length) this.containers[f].containerCache.over || (this.containers[f]._trigger("over", e, this._uiHash(this)), this.containers[f].containerCache.over = 1);
- else {
- for (o = 1e4, r = null, u = d.floating || this._isFloating(this.currentItem), s = u ? "left" : "top", a = u ? "width" : "height", h = u ? "clientX" : "clientY", i = this.items.length - 1; i >= 0; i--) t.contains(this.containers[f].element[0], this.items[i].item[0]) && this.items[i].item[0] !== this.currentItem[0] && (l = this.items[i].item.offset()[s], c = !1, e[h] - l > this.items[i][a] / 2 && (c = !0), Math.abs(e[h] - l) < o && (o = Math.abs(e[h] - l), r = this.items[i], this.direction = c ? "up" : "down"));
- if (!r && !this.options.dropOnEmpty) return;
- if (this.currentContainer === this.containers[f]) return;
- r ? this._rearrange(e, r, null, !0) : this._rearrange(e, null, this.containers[f].element, !0), this._trigger("change", e, this._uiHash()), this.containers[f]._trigger("change", e, this._uiHash(this)), this.currentContainer = this.containers[f], this.options.placeholder.update(this.currentContainer, this.placeholder), this.containers[f]._trigger("over", e, this._uiHash(this)), this.containers[f].containerCache.over = 1
- }
- },
- _createHelper: function(e) {
- var n = this.options,
- i = t.isFunction(n.helper) ? t(n.helper.apply(this.element[0], [e, this.currentItem])) : "clone" === n.helper ? this.currentItem.clone() : this.currentItem;
- return i.parents("body").length || t("parent" !== n.appendTo ? n.appendTo : this.currentItem[0].parentNode)[0].appendChild(i[0]), i[0] === this.currentItem[0] && (this._storedCSS = {
- width: this.currentItem[0].style.width,
- height: this.currentItem[0].style.height,
- position: this.currentItem.css("position"),
- top: this.currentItem.css("top"),
- left: this.currentItem.css("left")
- }), (!i[0].style.width || n.forceHelperSize) && i.width(this.currentItem.width()), (!i[0].style.height || n.forceHelperSize) && i.height(this.currentItem.height()), i
- },
- _adjustOffsetFromHelper: function(e) {
- "string" == typeof e && (e = e.split(" ")), t.isArray(e) && (e = {
- left: +e[0],
- top: +e[1] || 0
- }), "left" in e && (this.offset.click.left = e.left + this.margins.left), "right" in e && (this.offset.click.left = this.helperProportions.width - e.right + this.margins.left), "top" in e && (this.offset.click.top = e.top + this.margins.top), "bottom" in e && (this.offset.click.top = this.helperProportions.height - e.bottom + this.margins.top)
- },
- _getParentOffset: function() {
- this.offsetParent = this.helper.offsetParent();
- var e = this.offsetParent.offset();
- return "absolute" === this.cssPosition && this.scrollParent[0] !== document && t.contains(this.scrollParent[0], this.offsetParent[0]) && (e.left += this.scrollParent.scrollLeft(), e.top += this.scrollParent.scrollTop()), (this.offsetParent[0] === document.body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && t.ui.ie) && (e = {
- top: 0,
- left: 0
- }), {
- top: e.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
- left: e.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
- }
- },
- _getRelativeOffset: function() {
- if ("relative" === this.cssPosition) {
- var t = this.currentItem.position();
- return {
- top: t.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
- left: t.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
- }
- }
- return {
- top: 0,
- left: 0
- }
- },
- _cacheMargins: function() {
- this.margins = {
- left: parseInt(this.currentItem.css("marginLeft"), 10) || 0,
- top: parseInt(this.currentItem.css("marginTop"), 10) || 0
- }
- },
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- }
- },
- _setContainment: function() {
- var e, n, i, o = this.options;
- "parent" === o.containment && (o.containment = this.helper[0].parentNode), ("document" === o.containment || "window" === o.containment) && (this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, t("document" === o.containment ? document : window).width() - this.helperProportions.width - this.margins.left, (t("document" === o.containment ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]), /^(document|window|parent)$/.test(o.containment) || (e = t(o.containment)[0], n = t(o.containment).offset(), i = "hidden" !== t(e).css("overflow"), this.containment = [n.left + (parseInt(t(e).css("borderLeftWidth"), 10) || 0) + (parseInt(t(e).css("paddingLeft"), 10) || 0) - this.margins.left, n.top + (parseInt(t(e).css("borderTopWidth"), 10) || 0) + (parseInt(t(e).css("paddingTop"), 10) || 0) - this.margins.top, n.left + (i ? Math.max(e.scrollWidth, e.offsetWidth) : e.offsetWidth) - (parseInt(t(e).css("borderLeftWidth"), 10) || 0) - (parseInt(t(e).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, n.top + (i ? Math.max(e.scrollHeight, e.offsetHeight) : e.offsetHeight) - (parseInt(t(e).css("borderTopWidth"), 10) || 0) - (parseInt(t(e).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top])
- },
- _convertPositionTo: function(e, n) {
- n || (n = this.position);
- var i = "absolute" === e ? 1 : -1,
- o = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && t.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent,
- r = /(html|body)/i.test(o[0].tagName);
- return {
- top: n.top + this.offset.relative.top * i + this.offset.parent.top * i - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : r ? 0 : o.scrollTop()) * i,
- left: n.left + this.offset.relative.left * i + this.offset.parent.left * i - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : r ? 0 : o.scrollLeft()) * i
- }
- },
- _generatePosition: function(e) {
- var n, i, o = this.options,
- r = e.pageX,
- s = e.pageY,
- a = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && t.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent,
- l = /(html|body)/i.test(a[0].tagName);
- return "relative" !== this.cssPosition || this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0] || (this.offset.relative = this._getRelativeOffset()), this.originalPosition && (this.containment && (e.pageX - this.offset.click.left < this.containment[0] && (r = this.containment[0] + this.offset.click.left), e.pageY - this.offset.click.top < this.containment[1] && (s = this.containment[1] + this.offset.click.top), e.pageX - this.offset.click.left > this.containment[2] && (r = this.containment[2] + this.offset.click.left), e.pageY - this.offset.click.top > this.containment[3] && (s = this.containment[3] + this.offset.click.top)), o.grid && (n = this.originalPageY + Math.round((s - this.originalPageY) / o.grid[1]) * o.grid[1], s = this.containment ? n - this.offset.click.top >= this.containment[1] && n - this.offset.click.top <= this.containment[3] ? n : n - this.offset.click.top >= this.containment[1] ? n - o.grid[1] : n + o.grid[1] : n, i = this.originalPageX + Math.round((r - this.originalPageX) / o.grid[0]) * o.grid[0], r = this.containment ? i - this.offset.click.left >= this.containment[0] && i - this.offset.click.left <= this.containment[2] ? i : i - this.offset.click.left >= this.containment[0] ? i - o.grid[0] : i + o.grid[0] : i)), {
- top: s - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : l ? 0 : a.scrollTop()),
- left: r - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : l ? 0 : a.scrollLeft())
- }
- },
- _rearrange: function(t, e, n, i) {
- n ? n[0].appendChild(this.placeholder[0]) : e.item[0].parentNode.insertBefore(this.placeholder[0], "down" === this.direction ? e.item[0] : e.item[0].nextSibling), this.counter = this.counter ? ++this.counter : 1;
- var o = this.counter;
- this._delay(function() {
- o === this.counter && this.refreshPositions(!i)
- })
- },
- _clear: function(t, e) {
- function n(t, e, n) {
- return function(i) {
- n._trigger(t, i, e._uiHash(e))
- }
- }
- this.reverting = !1;
- var i, o = [];
- if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null, this.helper[0] === this.currentItem[0]) {
- for (i in this._storedCSS)("auto" === this._storedCSS[i] || "static" === this._storedCSS[i]) && (this._storedCSS[i] = "");
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
- } else this.currentItem.show();
- for (this.fromOutside && !e && o.push(function(t) {
- this._trigger("receive", t, this._uiHash(this.fromOutside))
- }), !this.fromOutside && this.domPosition.prev === this.currentItem.prev().not(".ui-sortable-helper")[0] && this.domPosition.parent === this.currentItem.parent()[0] || e || o.push(function(t) {
- this._trigger("update", t, this._uiHash())
- }), this !== this.currentContainer && (e || (o.push(function(t) {
- this._trigger("remove", t, this._uiHash())
- }), o.push(function(t) {
- return function(e) {
- t._trigger("receive", e, this._uiHash(this))
- }
- }.call(this, this.currentContainer)), o.push(function(t) {
- return function(e) {
- t._trigger("update", e, this._uiHash(this))
- }
- }.call(this, this.currentContainer)))), i = this.containers.length - 1; i >= 0; i--) e || o.push(n("deactivate", this, this.containers[i])), this.containers[i].containerCache.over && (o.push(n("out", this, this.containers[i])), this.containers[i].containerCache.over = 0);
- if (this.storedCursor && (this.document.find("body").css("cursor", this.storedCursor), this.storedStylesheet.remove()), this._storedOpacity && this.helper.css("opacity", this._storedOpacity), this._storedZIndex && this.helper.css("zIndex", "auto" === this._storedZIndex ? "" : this._storedZIndex), this.dragging = !1, this.cancelHelperRemoval) {
- if (!e) {
- for (this._trigger("beforeStop", t, this._uiHash()), i = 0; i < o.length; i++) o[i].call(this, t);
- this._trigger("stop", t, this._uiHash())
- }
- return this.fromOutside = !1, !1
- }
- if (e || this._trigger("beforeStop", t, this._uiHash()), this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.helper[0] !== this.currentItem[0] && this.helper.remove(), this.helper = null, !e) {
- for (i = 0; i < o.length; i++) o[i].call(this, t);
- this._trigger("stop", t, this._uiHash())
- }
- return this.fromOutside = !1, !0
- },
- _trigger: function() {
- t.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel()
- },
- _uiHash: function(e) {
- var n = e || this;
- return {
- helper: n.helper,
- placeholder: n.placeholder || t([]),
- position: n.position,
- originalPosition: n.originalPosition,
- offset: n.positionAbs,
- item: n.currentItem,
- sender: e ? e.element : null
- }
- }
- })
- }),
- function(t) {
- "function" == typeof define && define.amd ? define(["jquery"], t) : t(jQuery)
- }(function(t) {
- var e = "ui-effects-";
- return t.effects = {
- effect: {}
- },
- function(t, e) {
- function n(t, e, n) {
- var i = h[e.type] || {};
- return null == t ? n || !e.def ? null : e.def : (t = i.floor ? ~~t : parseFloat(t), isNaN(t) ? e.def : i.mod ? (t + i.mod) % i.mod : 0 > t ? 0 : i.max < t ? i.max : t)
- }
- function i(e) {
- var n = c(),
- i = n._rgba = [];
- return e = e.toLowerCase(), p(l, function(t, o) {
- var r, s = o.re.exec(e),
- a = s && o.parse(s),
- l = o.space || "rgba";
- return a ? (r = n[l](a), n[u[l].cache] = r[u[l].cache], i = n._rgba = r._rgba, !1) : void 0
- }), i.length ? ("0,0,0,0" === i.join() && t.extend(i, r.transparent), n) : r[e]
- }
- function o(t, e, n) {
- return n = (n + 1) % 1, 1 > 6 * n ? t + (e - t) * n * 6 : 1 > 2 * n ? e : 2 > 3 * n ? t + (e - t) * (2 / 3 - n) * 6 : t
- }
- var r, s = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
- a = /^([\-+])=\s*(\d+\.?\d*)/,
- l = [{
- re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function(t) {
- return [t[1], t[2], t[3], t[4]]
- }
- }, {
- re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function(t) {
- return [2.55 * t[1], 2.55 * t[2], 2.55 * t[3], t[4]]
- }
- }, {
- re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
- parse: function(t) {
- return [parseInt(t[1], 16), parseInt(t[2], 16), parseInt(t[3], 16)]
- }
- }, {
- re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
- parse: function(t) {
- return [parseInt(t[1] + t[1], 16), parseInt(t[2] + t[2], 16), parseInt(t[3] + t[3], 16)]
- }
- }, {
- re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- space: "hsla",
- parse: function(t) {
- return [t[1], t[2] / 100, t[3] / 100, t[4]]
- }
- }],
- c = t.Color = function(e, n, i, o) {
- return new t.Color.fn.parse(e, n, i, o)
- },
- u = {
- rgba: {
- props: {
- red: {
- idx: 0,
- type: "byte"
- },
- green: {
- idx: 1,
- type: "byte"
- },
- blue: {
- idx: 2,
- type: "byte"
- }
- }
- },
- hsla: {
- props: {
- hue: {
- idx: 0,
- type: "degrees"
- },
- saturation: {
- idx: 1,
- type: "percent"
- },
- lightness: {
- idx: 2,
- type: "percent"
- }
- }
- }
- },
- h = {
- "byte": {
- floor: !0,
- max: 255
- },
- percent: {
- max: 1
- },
- degrees: {
- mod: 360,
- floor: !0
- }
- },
- d = c.support = {},
- f = t("<p>")[0],
- p = t.each;
- f.style.cssText = "background-color:rgba(1,1,1,.5)", d.rgba = f.style.backgroundColor.indexOf("rgba") > -1, p(u, function(t, e) {
- e.cache = "_" + t, e.props.alpha = {
- idx: 3,
- type: "percent",
- def: 1
- }
- }), c.fn = t.extend(c.prototype, {
- parse: function(o, s, a, l) {
- if (o === e) return this._rgba = [null, null, null, null], this;
- (o.jquery || o.nodeType) && (o = t(o).css(s), s = e);
- var h = this,
- d = t.type(o),
- f = this._rgba = [];
- return s !== e && (o = [o, s, a, l], d = "array"), "string" === d ? this.parse(i(o) || r._default) : "array" === d ? (p(u.rgba.props, function(t, e) {
- f[e.idx] = n(o[e.idx], e)
- }), this) : "object" === d ? (o instanceof c ? p(u, function(t, e) {
- o[e.cache] && (h[e.cache] = o[e.cache].slice())
- }) : p(u, function(e, i) {
- var r = i.cache;
- p(i.props, function(t, e) {
- if (!h[r] && i.to) {
- if ("alpha" === t || null == o[t]) return;
- h[r] = i.to(h._rgba)
- }
- h[r][e.idx] = n(o[t], e, !0)
- }), h[r] && t.inArray(null, h[r].slice(0, 3)) < 0 && (h[r][3] = 1, i.from && (h._rgba = i.from(h[r])))
- }), this) : void 0
- },
- is: function(t) {
- var e = c(t),
- n = !0,
- i = this;
- return p(u, function(t, o) {
- var r, s = e[o.cache];
- return s && (r = i[o.cache] || o.to && o.to(i._rgba) || [], p(o.props, function(t, e) {
- return null != s[e.idx] ? n = s[e.idx] === r[e.idx] : void 0
- })), n
- }), n
- },
- _space: function() {
- var t = [],
- e = this;
- return p(u, function(n, i) {
- e[i.cache] && t.push(n)
- }), t.pop()
- },
- transition: function(t, e) {
- var i = c(t),
- o = i._space(),
- r = u[o],
- s = 0 === this.alpha() ? c("transparent") : this,
- a = s[r.cache] || r.to(s._rgba),
- l = a.slice();
- return i = i[r.cache], p(r.props, function(t, o) {
- var r = o.idx,
- s = a[r],
- c = i[r],
- u = h[o.type] || {};
- null !== c && (null === s ? l[r] = c : (u.mod && (c - s > u.mod / 2 ? s += u.mod : s - c > u.mod / 2 && (s -= u.mod)), l[r] = n((c - s) * e + s, o)))
- }), this[o](l)
- },
- blend: function(e) {
- if (1 === this._rgba[3]) return this;
- var n = this._rgba.slice(),
- i = n.pop(),
- o = c(e)._rgba;
- return c(t.map(n, function(t, e) {
- return (1 - i) * o[e] + i * t
- }))
- },
- toRgbaString: function() {
- var e = "rgba(",
- n = t.map(this._rgba, function(t, e) {
- return null == t ? e > 2 ? 1 : 0 : t
- });
- return 1 === n[3] && (n.pop(), e = "rgb("), e + n.join() + ")"
- },
- toHslaString: function() {
- var e = "hsla(",
- n = t.map(this.hsla(), function(t, e) {
- return null == t && (t = e > 2 ? 1 : 0), e && 3 > e && (t = Math.round(100 * t) + "%"), t
- });
- return 1 === n[3] && (n.pop(), e = "hsl("), e + n.join() + ")"
- },
- toHexString: function(e) {
- var n = this._rgba.slice(),
- i = n.pop();
- return e && n.push(~~(255 * i)), "#" + t.map(n, function(t) {
- return t = (t || 0).toString(16), 1 === t.length ? "0" + t : t
- }).join("")
- },
- toString: function() {
- return 0 === this._rgba[3] ? "transparent" : this.toRgbaString()
- }
- }), c.fn.parse.prototype = c.fn, u.hsla.to = function(t) {
- if (null == t[0] || null == t[1] || null == t[2]) return [null, null, null, t[3]];
- var e, n, i = t[0] / 255,
- o = t[1] / 255,
- r = t[2] / 255,
- s = t[3],
- a = Math.max(i, o, r),
- l = Math.min(i, o, r),
- c = a - l,
- u = a + l,
- h = .5 * u;
- return e = l === a ? 0 : i === a ? 60 * (o - r) / c + 360 : o === a ? 60 * (r - i) / c + 120 : 60 * (i - o) / c + 240, n = 0 === c ? 0 : .5 >= h ? c / u : c / (2 - u), [Math.round(e) % 360, n, h, null == s ? 1 : s]
- }, u.hsla.from = function(t) {
- if (null == t[0] || null == t[1] || null == t[2]) return [null, null, null, t[3]];
- var e = t[0] / 360,
- n = t[1],
- i = t[2],
- r = t[3],
- s = .5 >= i ? i * (1 + n) : i + n - i * n,
- a = 2 * i - s;
- return [Math.round(255 * o(a, s, e + 1 / 3)), Math.round(255 * o(a, s, e)), Math.round(255 * o(a, s, e - 1 / 3)), r]
- }, p(u, function(i, o) {
- var r = o.props,
- s = o.cache,
- l = o.to,
- u = o.from;
- c.fn[i] = function(i) {
- if (l && !this[s] && (this[s] = l(this._rgba)), i === e) return this[s].slice();
- var o, a = t.type(i),
- h = "array" === a || "object" === a ? i : arguments,
- d = this[s].slice();
- return p(r, function(t, e) {
- var i = h["object" === a ? t : e.idx];
- null == i && (i = d[e.idx]), d[e.idx] = n(i, e)
- }), u ? (o = c(u(d)), o[s] = d, o) : c(d)
- }, p(r, function(e, n) {
- c.fn[e] || (c.fn[e] = function(o) {
- var r, s = t.type(o),
- l = "alpha" === e ? this._hsla ? "hsla" : "rgba" : i,
- c = this[l](),
- u = c[n.idx];
- return "undefined" === s ? u : ("function" === s && (o = o.call(this, u), s = t.type(o)), null == o && n.empty ? this : ("string" === s && (r = a.exec(o), r && (o = u + parseFloat(r[2]) * ("+" === r[1] ? 1 : -1))), c[n.idx] = o, this[l](c)))
- })
- })
- }), c.hook = function(e) {
- var n = e.split(" ");
- p(n, function(e, n) {
- t.cssHooks[n] = {
- set: function(e, o) {
- var r, s, a = "";
- if ("transparent" !== o && ("string" !== t.type(o) || (r = i(o)))) {
- if (o = c(r || o), !d.rgba && 1 !== o._rgba[3]) {
- for (s = "backgroundColor" === n ? e.parentNode : e;
- ("" === a || "transparent" === a) && s && s.style;) try {
- a = t.css(s, "backgroundColor"), s = s.parentNode
- } catch (l) {}
- o = o.blend(a && "transparent" !== a ? a : "_default")
- }
- o = o.toRgbaString()
- }
- try {
- e.style[n] = o
- } catch (l) {}
- }
- }, t.fx.step[n] = function(e) {
- e.colorInit || (e.start = c(e.elem, n), e.end = c(e.end), e.colorInit = !0), t.cssHooks[n].set(e.elem, e.start.transition(e.end, e.pos))
- }
- })
- }, c.hook(s), t.cssHooks.borderColor = {
- expand: function(t) {
- var e = {};
- return p(["Top", "Right", "Bottom", "Left"], function(n, i) {
- e["border" + i + "Color"] = t
- }), e
- }
- }, r = t.Color.names = {
- aqua: "#00ffff",
- black: "#000000",
- blue: "#0000ff",
- fuchsia: "#ff00ff",
- gray: "#808080",
- green: "#008000",
- lime: "#00ff00",
- maroon: "#800000",
- navy: "#000080",
- olive: "#808000",
- purple: "#800080",
- red: "#ff0000",
- silver: "#c0c0c0",
- teal: "#008080",
- white: "#ffffff",
- yellow: "#ffff00",
- transparent: [null, null, null, 0],
- _default: "#ffffff"
- }
- }(jQuery),
- function() {
- function e(e) {
- var n, i, o = e.ownerDocument.defaultView ? e.ownerDocument.defaultView.getComputedStyle(e, null) : e.currentStyle,
- r = {};
- if (o && o.length && o[0] && o[o[0]])
- for (i = o.length; i--;) n = o[i], "string" == typeof o[n] && (r[t.camelCase(n)] = o[n]);
- else
- for (n in o) "string" == typeof o[n] && (r[n] = o[n]);
- return r
- }
- function n(e, n) {
- var i, r, s = {};
- for (i in n) r = n[i], e[i] !== r && (o[i] || (t.fx.step[i] || !isNaN(parseFloat(r))) && (s[i] = r));
- return s
- }
- var i = ["add", "remove", "toggle"],
- o = {
- border: 1,
- borderBottom: 1,
- borderColor: 1,
- borderLeft: 1,
- borderRight: 1,
- borderTop: 1,
- borderWidth: 1,
- margin: 1,
- padding: 1
- };
- t.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function(e, n) {
- t.fx.step[n] = function(t) {
- ("none" !== t.end && !t.setAttr || 1 === t.pos && !t.setAttr) && (jQuery.style(t.elem, n, t.end), t.setAttr = !0)
- }
- }), t.fn.addBack || (t.fn.addBack = function(t) {
- return this.add(null == t ? this.prevObject : this.prevObject.filter(t))
- }), t.effects.animateClass = function(o, r, s, a) {
- var l = t.speed(r, s, a);
- return this.queue(function() {
- var r, s = t(this),
- a = s.attr("class") || "",
- c = l.children ? s.find("*").addBack() : s;
- c = c.map(function() {
- var n = t(this);
- return {
- el: n,
- start: e(this)
- }
- }), r = function() {
- t.each(i, function(t, e) {
- o[e] && s[e + "Class"](o[e])
- })
- }, r(), c = c.map(function() {
- return this.end = e(this.el[0]), this.diff = n(this.start, this.end), this
- }), s.attr("class", a), c = c.map(function() {
- var e = this,
- n = t.Deferred(),
- i = t.extend({}, l, {
- queue: !1,
- complete: function() {
- n.resolve(e)
- }
- });
- return this.el.animate(this.diff, i), n.promise()
- }), t.when.apply(t, c.get()).done(function() {
- r(), t.each(arguments, function() {
- var e = this.el;
- t.each(this.diff, function(t) {
- e.css(t, "")
- })
- }), l.complete.call(s[0])
- })
- })
- }, t.fn.extend({
- addClass: function(e) {
- return function(n, i, o, r) {
- return i ? t.effects.animateClass.call(this, {
- add: n
- }, i, o, r) : e.apply(this, arguments)
- }
- }(t.fn.addClass),
- removeClass: function(e) {
- return function(n, i, o, r) {
- return arguments.length > 1 ? t.effects.animateClass.call(this, {
- remove: n
- }, i, o, r) : e.apply(this, arguments)
- }
- }(t.fn.removeClass),
- toggleClass: function(e) {
- return function(n, i, o, r, s) {
- return "boolean" == typeof i || void 0 === i ? o ? t.effects.animateClass.call(this, i ? {
- add: n
- } : {
- remove: n
- }, o, r, s) : e.apply(this, arguments) : t.effects.animateClass.call(this, {
- toggle: n
- }, i, o, r)
- }
- }(t.fn.toggleClass),
- switchClass: function(e, n, i, o, r) {
- return t.effects.animateClass.call(this, {
- add: n,
- remove: e
- }, i, o, r)
- }
- })
- }(),
- function() {
- function n(e, n, i, o) {
- return t.isPlainObject(e) && (n = e, e = e.effect), e = {
- effect: e
- }, null == n && (n = {}), t.isFunction(n) && (o = n, i = null, n = {}), ("number" == typeof n || t.fx.speeds[n]) && (o = i, i = n, n = {}), t.isFunction(i) && (o = i, i = null), n && t.extend(e, n), i = i || n.duration, e.duration = t.fx.off ? 0 : "number" == typeof i ? i : i in t.fx.speeds ? t.fx.speeds[i] : t.fx.speeds._default, e.complete = o || n.complete, e
- }
- function i(e) {
- return !e || "number" == typeof e || t.fx.speeds[e] ? !0 : "string" != typeof e || t.effects.effect[e] ? t.isFunction(e) ? !0 : "object" != typeof e || e.effect ? !1 : !0 : !0
- }
- t.extend(t.effects, {
- version: "1.11.0",
- save: function(t, n) {
- for (var i = 0; i < n.length; i++) null !== n[i] && t.data(e + n[i], t[0].style[n[i]])
- },
- restore: function(t, n) {
- var i, o;
- for (o = 0; o < n.length; o++) null !== n[o] && (i = t.data(e + n[o]), void 0 === i && (i = ""), t.css(n[o], i))
- },
- setMode: function(t, e) {
- return "toggle" === e && (e = t.is(":hidden") ? "show" : "hide"), e
- },
- getBaseline: function(t, e) {
- var n, i;
- switch (t[0]) {
- case "top":
- n = 0;
- break;
- case "middle":
- n = .5;
- break;
- case "bottom":
- n = 1;
- break;
- default:
- n = t[0] / e.height
- }
- switch (t[1]) {
- case "left":
- i = 0;
- break;
- case "center":
- i = .5;
- break;
- case "right":
- i = 1;
- break;
- default:
- i = t[1] / e.width
- }
- return {
- x: i,
- y: n
- }
- },
- createWrapper: function(e) {
- if (e.parent().is(".ui-effects-wrapper")) return e.parent();
- var n = {
- width: e.outerWidth(!0),
- height: e.outerHeight(!0),
- "float": e.css("float")
- },
- i = t("<div></div>").addClass("ui-effects-wrapper").css({
- fontSize: "100%",
- background: "transparent",
- border: "none",
- margin: 0,
- padding: 0
- }),
- o = {
- width: e.width(),
- height: e.height()
- },
- r = document.activeElement;
- try {
- r.id
- } catch (s) {
- r = document.body
- }
- return e.wrap(i), (e[0] === r || t.contains(e[0], r)) && t(r).focus(), i = e.parent(), "static" === e.css("position") ? (i.css({
- position: "relative"
- }), e.css({
- position: "relative"
- })) : (t.extend(n, {
- position: e.css("position"),
- zIndex: e.css("z-index")
- }), t.each(["top", "left", "bottom", "right"], function(t, i) {
- n[i] = e.css(i), isNaN(parseInt(n[i], 10)) && (n[i] = "auto")
- }), e.css({
- position: "relative",
- top: 0,
- left: 0,
- right: "auto",
- bottom: "auto"
- })), e.css(o), i.css(n).show()
- },
- removeWrapper: function(e) {
- var n = document.activeElement;
- return e.parent().is(".ui-effects-wrapper") && (e.parent().replaceWith(e), (e[0] === n || t.contains(e[0], n)) && t(n).focus()), e
- },
- setTransition: function(e, n, i, o) {
- return o = o || {}, t.each(n, function(t, n) {
- var r = e.cssUnit(n);
- r[0] > 0 && (o[n] = r[0] * i + r[1])
- }), o
- }
- }), t.fn.extend({
- effect: function() {
- function e(e) {
- function n() {
- t.isFunction(r) && r.call(o[0]), t.isFunction(e) && e()
- }
- var o = t(this),
- r = i.complete,
- a = i.mode;
- (o.is(":hidden") ? "hide" === a : "show" === a) ? (o[a](), n()) : s.call(o[0], i, n)
- }
- var i = n.apply(this, arguments),
- o = i.mode,
- r = i.queue,
- s = t.effects.effect[i.effect];
- return t.fx.off || !s ? o ? this[o](i.duration, i.complete) : this.each(function() {
- i.complete && i.complete.call(this)
- }) : r === !1 ? this.each(e) : this.queue(r || "fx", e)
- },
- show: function(t) {
- return function(e) {
- if (i(e)) return t.apply(this, arguments);
- var o = n.apply(this, arguments);
- return o.mode = "show", this.effect.call(this, o)
- }
- }(t.fn.show),
- hide: function(t) {
- return function(e) {
- if (i(e)) return t.apply(this, arguments);
- var o = n.apply(this, arguments);
- return o.mode = "hide", this.effect.call(this, o)
- }
- }(t.fn.hide),
- toggle: function(t) {
- return function(e) {
- if (i(e) || "boolean" == typeof e) return t.apply(this, arguments);
- var o = n.apply(this, arguments);
- return o.mode = "toggle", this.effect.call(this, o)
- }
- }(t.fn.toggle),
- cssUnit: function(e) {
- var n = this.css(e),
- i = [];
- return t.each(["em", "px", "%", "pt"], function(t, e) {
- n.indexOf(e) > 0 && (i = [parseFloat(n), e])
- }), i
- }
- })
- }(),
- function() {
- var e = {};
- t.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function(t, n) {
- e[n] = function(e) {
- return Math.pow(e, t + 2)
- }
- }), t.extend(e, {
- Sine: function(t) {
- return 1 - Math.cos(t * Math.PI / 2)
- },
- Circ: function(t) {
- return 1 - Math.sqrt(1 - t * t)
- },
- Elastic: function(t) {
- return 0 === t || 1 === t ? t : -Math.pow(2, 8 * (t - 1)) * Math.sin((80 * (t - 1) - 7.5) * Math.PI / 15)
- },
- Back: function(t) {
- return t * t * (3 * t - 2)
- },
- Bounce: function(t) {
- for (var e, n = 4; t < ((e = Math.pow(2, --n)) - 1) / 11;);
- return 1 / Math.pow(4, 3 - n) - 7.5625 * Math.pow((3 * e - 2) / 22 - t, 2)
- }
- }), t.each(e, function(e, n) {
- t.easing["easeIn" + e] = n, t.easing["easeOut" + e] = function(t) {
- return 1 - n(1 - t)
- }, t.easing["easeInOut" + e] = function(t) {
- return .5 > t ? n(2 * t) / 2 : 1 - n(-2 * t + 2) / 2
- }
- })
- }(), t.effects
- }),
- function(t) {
- "function" == typeof define && define.amd ? define(["jquery", "./effect"], t) : t(jQuery)
- }(function(t) {
- return t.effects.effect.highlight = function(e, n) {
- var i = t(this),
- o = ["backgroundImage", "backgroundColor", "opacity"],
- r = t.effects.setMode(i, e.mode || "show"),
- s = {
- backgroundColor: i.css("backgroundColor")
- };
- "hide" === r && (s.opacity = 0), t.effects.save(i, o), i.show().css({
- backgroundImage: "none",
- backgroundColor: e.color || "#ffff99"
- }).animate(s, {
- queue: !1,
- duration: e.duration,
- easing: e.easing,
- complete: function() {
- "hide" === r && i.hide(), t.effects.restore(i, o), n()
- }
- })
- }
- }), ! function(t) {
- "use strict";
- t(function() {
- t.support.transition = function() {
- var t = function() {
- var t, e = document.createElement("bootstrap"),
- n = {
- WebkitTransition: "webkitTransitionEnd",
- MozTransition: "transitionend",
- OTransition: "oTransitionEnd otransitionend",
- transition: "transitionend"
- };
- for (t in n)
- if (void 0 !== e.style[t]) return n[t]
- }();
- return t && {
- end: t
- }
- }()
- })
- }(window.jQuery), ! function(t) {
- "use strict";
- var e = '[data-dismiss="alert"]',
- n = function(n) {
- t(n).on("click", e, this.close)
- };
- n.prototype.close = function(e) {
- function n() {
- i.trigger("closed").remove()
- }
- var i, o = t(this),
- r = o.attr("data-target");
- r || (r = o.attr("href"), r = r && r.replace(/.*(?=#[^\s]*$)/, "")), i = t(r), e && e.preventDefault(), i.length || (i = o.hasClass("alert") ? o : o.parent()), i.trigger(e = t.Event("close")), e.isDefaultPrevented() || (i.removeClass("in"), t.support.transition && i.hasClass("fade") ? i.on(t.support.transition.end, n) : n())
- };
- var i = t.fn.alert;
- t.fn.alert = function(e) {
- return this.each(function() {
- var i = t(this),
- o = i.data("alert");
- o || i.data("alert", o = new n(this)), "string" == typeof e && o[e].call(i)
- })
- }, t.fn.alert.Constructor = n, t.fn.alert.noConflict = function() {
- return t.fn.alert = i, this
- }, t(document).on("click.alert.data-api", e, n.prototype.close)
- }(window.jQuery), ! function(t) {
- "use strict";
- var e = function(e, n) {
- this.options = n, this.$element = t(e).delegate('[data-dismiss="modal"]', "click.dismiss.modal", t.proxy(this.hide, this)), this.options.remote && this.$element.find(".modal-body").load(this.options.remote)
- };
- e.prototype = {
- constructor: e,
- toggle: function() {
- return this[this.isShown ? "hide" : "show"]()
- },
- show: function() {
- var e = this,
- n = t.Event("show");
- this.$element.trigger(n), this.isShown || n.isDefaultPrevented() || (this.isShown = !0, this.escape(), this.backdrop(function() {
- var n = t.support.transition && e.$element.hasClass("fade");
- e.$element.parent().length || e.$element.appendTo(document.body), e.$element.show(), n && e.$element[0].offsetWidth, e.$element.addClass("in").attr("aria-hidden", !1), e.enforceFocus(), n ? e.$element.one(t.support.transition.end, function() {
- e.$element.focus().trigger("shown")
- }) : e.$element.focus().trigger("shown")
- }))
- },
- hide: function(e) {
- e && e.preventDefault();
- e = t.Event("hide"), this.$element.trigger(e), this.isShown && !e.isDefaultPrevented() && (this.isShown = !1, this.escape(), t(document).off("focusin.modal"), this.$element.removeClass("in").attr("aria-hidden", !0), t.support.transition && this.$element.hasClass("fade") ? this.hideWithTransition() : this.hideModal())
- },
- enforceFocus: function() {
- var e = this;
- t(document).on("focusin.modal", function(t) {
- e.$element[0] === t.target || e.$element.has(t.target).length || e.$element.focus()
- })
- },
- escape: function() {
- var t = this;
- this.isShown && this.options.keyboard ? this.$element.on("keyup.dismiss.modal", function(e) {
- 27 == e.which && t.hide()
- }) : this.isShown || this.$element.off("keyup.dismiss.modal")
- },
- hideWithTransition: function() {
- var e = this,
- n = setTimeout(function() {
- e.$element.off(t.support.transition.end), e.hideModal()
- }, 500);
- this.$element.one(t.support.transition.end, function() {
- clearTimeout(n), e.hideModal()
- })
- },
- hideModal: function() {
- var t = this;
- this.$element.hide(), this.backdrop(function() {
- t.removeBackdrop(), t.$element.trigger("hidden")
- })
- },
- removeBackdrop: function() {
- this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
- },
- backdrop: function(e) {
- var n = this.$element.hasClass("fade") ? "fade" : "";
- if (this.isShown && this.options.backdrop) {
- var i = t.support.transition && n;
- if (this.$backdrop = t('<div class="modal-backdrop ' + n + '" />').appendTo(document.body), this.$backdrop.click("static" == this.options.backdrop ? t.proxy(this.$element[0].focus, this.$element[0]) : t.proxy(this.hide, this)), i && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !e) return;
- i ? this.$backdrop.one(t.support.transition.end, e) : e()
- } else !this.isShown && this.$backdrop ? (this.$backdrop.removeClass("in"), t.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one(t.support.transition.end, e) : e()) : e && e()
- }
- };
- var n = t.fn.modal;
- t.fn.modal = function(n) {
- return this.each(function() {
- var i = t(this),
- o = i.data("modal"),
- r = t.extend({}, t.fn.modal.defaults, i.data(), "object" == typeof n && n);
- o || i.data("modal", o = new e(this, r)), "string" == typeof n ? o[n]() : r.show && o.show()
- })
- }, t.fn.modal.defaults = {
- backdrop: !0,
- keyboard: !0,
- show: !0
- }, t.fn.modal.Constructor = e, t.fn.modal.noConflict = function() {
- return t.fn.modal = n, this
- }, t(document).on("click.modal.data-api", '[data-toggle="modal"]', function(e) {
- var n = t(this),
- i = n.attr("href"),
- o = t(n.attr("data-target") || i && i.replace(/.*(?=#[^\s]+$)/, "")),
- r = o.data("modal") ? "toggle" : t.extend({
- remote: !/#/.test(i) && i
- }, o.data(), n.data());
- e.preventDefault(), o.modal(r).one("hide", function() {
- n.focus()
- })
- })
- }(window.jQuery), ! function(t) {
- "use strict";
- function e() {
- t(".dropdown-backdrop").remove(), t(i).each(function() {
- n(t(this)).removeClass("open")
- })
- }
- function n(e) {
- var n, i = e.attr("data-target");
- return i || (i = e.attr("href"), i = i && /#/.test(i) && i.replace(/.*(?=#[^\s]*$)/, "")), n = i && t(i), n && n.length || (n = e.parent()), n
- }
- var i = "[data-toggle=dropdown]",
- o = function(e) {
- var n = t(e).on("click.dropdown.data-api", this.toggle);
- t("html").on("click.dropdown.data-api", function() {
- n.parent().removeClass("open")
- })
- };
- o.prototype = {
- constructor: o,
- toggle: function() {
- var i, o, r = t(this);
- if (!r.is(".disabled, :disabled")) return i = n(r), o = i.hasClass("open"), e(), o || ("ontouchstart" in document.documentElement && t('<div class="dropdown-backdrop"/>').insertBefore(t(this)).on("click", e), i.toggleClass("open")), r.focus(), !1
- },
- keydown: function(e) {
- var o, r, s, a, l;
- if (/(38|40|27)/.test(e.keyCode) && (o = t(this), e.preventDefault(), e.stopPropagation(), !o.is(".disabled, :disabled"))) {
- if (s = n(o), a = s.hasClass("open"), !a || a && 27 == e.keyCode) return 27 == e.which && s.find(i).focus(), o.click();
- r = t("[role=menu] li:not(.divider):visible a", s), r.length && (l = r.index(r.filter(":focus")), 38 == e.keyCode && l > 0 && l--, 40 == e.keyCode && l < r.length - 1 && l++, ~l || (l = 0), r.eq(l).focus())
- }
- }
- };
- var r = t.fn.dropdown;
- t.fn.dropdown = function(e) {
- return this.each(function() {
- var n = t(this),
- i = n.data("dropdown");
- i || n.data("dropdown", i = new o(this)), "string" == typeof e && i[e].call(n)
- })
- }, t.fn.dropdown.Constructor = o, t.fn.dropdown.noConflict = function() {
- return t.fn.dropdown = r, this
- }, t(document).on("click.dropdown.data-api", e).on("click.dropdown.data-api", ".dropdown form", function(t) {
- t.stopPropagation()
- }).on("click.dropdown.data-api", i, o.prototype.toggle).on("keydown.dropdown.data-api", i + ", [role=menu]", o.prototype.keydown)
- }(window.jQuery), ! function(t) {
- "use strict";
- function e(e, n) {
- var i, o = t.proxy(this.process, this),
- r = t(t(e).is("body") ? window : e);
- this.options = t.extend({}, t.fn.scrollspy.defaults, n), this.$scrollElement = r.on("scroll.scroll-spy.data-api", o), this.selector = (this.options.target || (i = t(e).attr("href")) && i.replace(/.*(?=#[^\s]+$)/, "") || "") + " .nav li > a", this.$body = t("body"), this.refresh(), this.process()
- }
- e.prototype = {
- constructor: e,
- refresh: function() {
- var e, n = this;
- this.offsets = t([]), this.targets = t([]), e = this.$body.find(this.selector).map(function() {
- var e = t(this),
- i = e.data("target") || e.attr("href"),
- o = /^#\w/.test(i) && t(i);
- return o && o.length && [
- [o.position().top + (!t.isWindow(n.$scrollElement.get(0)) && n.$scrollElement.scrollTop()), i]
- ] || null
- }).sort(function(t, e) {
- return t[0] - e[0]
- }).each(function() {
- n.offsets.push(this[0]), n.targets.push(this[1])
- })
- },
- process: function() {
- var t, e = this.$scrollElement.scrollTop() + this.options.offset,
- n = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight,
- i = n - this.$scrollElement.height(),
- o = this.offsets,
- r = this.targets,
- s = this.activeTarget;
- if (e >= i) return s != (t = r.last()[0]) && this.activate(t);
- for (t = o.length; t--;) s != r[t] && e >= o[t] && (!o[t + 1] || e <= o[t + 1]) && this.activate(r[t])
- },
- activate: function(e) {
- var n, i;
- this.activeTarget = e, t(this.selector).parent(".active").removeClass("active"), i = this.selector + '[data-target="' + e + '"],' + this.selector + '[href="' + e + '"]', n = t(i).parent("li").addClass("active"), n.parent(".dropdown-menu").length && (n = n.closest("li.dropdown").addClass("active")), n.trigger("activate")
- }
- };
- var n = t.fn.scrollspy;
- t.fn.scrollspy = function(n) {
- return this.each(function() {
- var i = t(this),
- o = i.data("scrollspy"),
- r = "object" == typeof n && n;
- o || i.data("scrollspy", o = new e(this, r)), "string" == typeof n && o[n]()
- })
- }, t.fn.scrollspy.Constructor = e, t.fn.scrollspy.defaults = {
- offset: 10
- }, t.fn.scrollspy.noConflict = function() {
- return t.fn.scrollspy = n, this
- }, t(window).on("load", function() {
- t('[data-spy="scroll"]').each(function() {
- var e = t(this);
- e.scrollspy(e.data())
- })
- })
- }(window.jQuery), ! function(t) {
- "use strict";
- var e = function(e) {
- this.element = t(e)
- };
- e.prototype = {
- constructor: e,
- show: function() {
- var e, n, i, o = this.element,
- r = o.closest("ul:not(.dropdown-menu)"),
- s = o.attr("data-target");
- s || (s = o.attr("href"), s = s && s.replace(/.*(?=#[^\s]*$)/, "")), o.parent("li").hasClass("active") || (e = r.find(".active:last a")[0], i = t.Event("show", {
- relatedTarget: e
- }), o.trigger(i), i.isDefaultPrevented() || (n = t(s), this.activate(o.parent("li"), r), this.activate(n, n.parent(), function() {
- o.trigger({
- type: "shown",
- relatedTarget: e
- })
- })))
- },
- activate: function(e, n, i) {
- function o() {
- r.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"), e.addClass("active"), s ? (e[0].offsetWidth, e.addClass("in")) : e.removeClass("fade"), e.parent(".dropdown-menu") && e.closest("li.dropdown").addClass("active"), i && i()
- }
- var r = n.find("> .active"),
- s = i && t.support.transition && r.hasClass("fade");
- s ? r.one(t.support.transition.end, o) : o(), r.removeClass("in")
- }
- };
- var n = t.fn.tab;
- t.fn.tab = function(n) {
- return this.each(function() {
- var i = t(this),
- o = i.data("tab");
- o || i.data("tab", o = new e(this)), "string" == typeof n && o[n]()
- })
- }, t.fn.tab.Constructor = e, t.fn.tab.noConflict = function() {
- return t.fn.tab = n, this
- }, t(document).on("click.tab.data-api", '[data-toggle="tab"], [data-toggle="pill"]', function(e) {
- e.preventDefault(), t(this).tab("show")
- })
- }(window.jQuery), ! function(t) {
- "use strict";
- var e = function(t, e) {
- this.init("tooltip", t, e)
- };
- e.prototype = {
- constructor: e,
- init: function(e, n, i) {
- var o, r, s, a, l;
- for (this.type = e, this.$element = t(n), this.options = this.getOptions(i), this.enabled = !0, s = this.options.trigger.split(" "), l = s.length; l--;) a = s[l], "click" == a ? this.$element.on("click." + this.type, this.options.selector, t.proxy(this.toggle, this)) : "manual" != a && (o = "hover" == a ? "mouseenter" : "focus", r = "hover" == a ? "mouseleave" : "blur", this.$element.on(o + "." + this.type, this.options.selector, t.proxy(this.enter, this)), this.$element.on(r + "." + this.type, this.options.selector, t.proxy(this.leave, this)));
- this.options.selector ? this._options = t.extend({}, this.options, {
- trigger: "manual",
- selector: ""
- }) : this.fixTitle()
- },
- getOptions: function(e) {
- return e = t.extend({}, t.fn[this.type].defaults, this.$element.data(), e), e.delay && "number" == typeof e.delay && (e.delay = {
- show: e.delay,
- hide: e.delay
- }), e
- },
- enter: function(e) {
- var n, i = t.fn[this.type].defaults,
- o = {};
- return this._options && t.each(this._options, function(t, e) {
- i[t] != e && (o[t] = e)
- }, this), n = t(e.currentTarget)[this.type](o).data(this.type), n.options.delay && n.options.delay.show ? (clearTimeout(this.timeout), n.hoverState = "in", void(this.timeout = setTimeout(function() {
- "in" == n.hoverState && n.show()
- }, n.options.delay.show))) : n.show()
- },
- leave: function(e) {
- var n = t(e.currentTarget)[this.type](this._options).data(this.type);
- return this.timeout && clearTimeout(this.timeout), n.options.delay && n.options.delay.hide ? (n.hoverState = "out", void(this.timeout = setTimeout(function() {
- "out" == n.hoverState && n.hide()
- }, n.options.delay.hide))) : n.hide()
- },
- show: function() {
- var e, n, i, o, r, s, a = t.Event("show");
- if (this.hasContent() && this.enabled) {
- if (this.$element.trigger(a), a.isDefaultPrevented()) return;
- switch (e = this.tip(), this.setContent(), this.options.animation && e.addClass("fade"), r = "function" == typeof this.options.placement ? this.options.placement.call(this, e[0], this.$element[0]) : this.options.placement, e.detach().css({
- top: 0,
- left: 0,
- display: "block"
- }), this.options.container ? e.appendTo(this.options.container) : e.insertAfter(this.$element), n = this.getPosition(), i = e[0].offsetWidth, o = e[0].offsetHeight, r) {
- case "bottom":
- s = {
- top: n.top + n.height,
- left: n.left + n.width / 2 - i / 2
- };
- break;
- case "top":
- s = {
- top: n.top - o,
- left: n.left + n.width / 2 - i / 2
- };
- break;
- case "left":
- s = {
- top: n.top + n.height / 2 - o / 2,
- left: n.left - i
- };
- break;
- case "right":
- s = {
- top: n.top + n.height / 2 - o / 2,
- left: n.left + n.width
- }
- }
- this.applyPlacement(s, r), this.$element.trigger("shown")
- }
- },
- applyPlacement: function(t, e) {
- var n, i, o, r, s = this.tip(),
- a = s[0].offsetWidth,
- l = s[0].offsetHeight;
- s.offset(t).addClass(e).addClass("in"), n = s[0].offsetWidth, i = s[0].offsetHeight, "top" == e && i != l && (t.top = t.top + l - i, r = !0), "bottom" == e || "top" == e ? (o = 0, t.left < 0 && (o = -2 * t.left, t.left = 0, s.offset(t), n = s[0].offsetWidth, i = s[0].offsetHeight), this.replaceArrow(o - a + n, n, "left")) : this.replaceArrow(i - l, i, "top"), r && s.offset(t)
- },
- replaceArrow: function(t, e, n) {
- this.arrow().css(n, t ? 50 * (1 - t / e) + "%" : "")
- },
- setContent: function() {
- var t = this.tip(),
- e = this.getTitle();
- t.find(".tooltip-inner")[this.options.html ? "html" : "text"](e), t.removeClass("fade in top bottom left right")
- },
- hide: function() {
- function e() {
- var e = setTimeout(function() {
- n.off(t.support.transition.end).detach()
- }, 500);
- n.one(t.support.transition.end, function() {
- clearTimeout(e), n.detach()
- })
- }
- var n = this.tip(),
- i = t.Event("hide");
- return this.$element.trigger(i), i.isDefaultPrevented() ? void 0 : (n.removeClass("in"), t.support.transition && this.$tip.hasClass("fade") ? e() : n.detach(), this.$element.trigger("hidden"), this)
- },
- fixTitle: function() {
- var t = this.$element;
- (t.attr("title") || "string" != typeof t.attr("data-original-title")) && t.attr("data-original-title", t.attr("title") || "").attr("title", "")
- },
- hasContent: function() {
- return this.getTitle()
- },
- getPosition: function() {
- var e = this.$element[0];
- return t.extend({}, "function" == typeof e.getBoundingClientRect ? e.getBoundingClientRect() : {
- width: e.offsetWidth,
- height: e.offsetHeight
- }, this.$element.offset())
- },
- getTitle: function() {
- var t, e = this.$element,
- n = this.options;
- return t = e.attr("data-original-title") || ("function" == typeof n.title ? n.title.call(e[0]) : n.title)
- },
- tip: function() {
- return this.$tip = this.$tip || t(this.options.template)
- },
- arrow: function() {
- return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
- },
- validate: function() {
- this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null)
- },
- enable: function() {
- this.enabled = !0
- },
- disable: function() {
- this.enabled = !1
- },
- toggleEnabled: function() {
- this.enabled = !this.enabled
- },
- toggle: function(e) {
- var n = e ? t(e.currentTarget)[this.type](this._options).data(this.type) : this;
- n.tip().hasClass("in") ? n.hide() : n.show()
- },
- destroy: function() {
- this.hide().$element.off("." + this.type).removeData(this.type)
- }
- };
- var n = t.fn.tooltip;
- t.fn.tooltip = function(n) {
- return this.each(function() {
- var i = t(this),
- o = i.data("tooltip"),
- r = "object" == typeof n && n;
- o || i.data("tooltip", o = new e(this, r)), "string" == typeof n && o[n]()
- })
- }, t.fn.tooltip.Constructor = e, t.fn.tooltip.defaults = {
- animation: !0,
- placement: "top",
- selector: !1,
- template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
- trigger: "hover focus",
- title: "",
- delay: 0,
- html: !1,
- container: !1
- }, t.fn.tooltip.noConflict = function() {
- return t.fn.tooltip = n, this
- }
- }(window.jQuery), ! function(t) {
- "use strict";
- var e = function(t, e) {
- this.init("popover", t, e)
- };
- e.prototype = t.extend({}, t.fn.tooltip.Constructor.prototype, {
- constructor: e,
- setContent: function() {
- var t = this.tip(),
- e = this.getTitle(),
- n = this.getContent();
- t.find(".popover-title")[this.options.html ? "html" : "text"](e), t.find(".popover-content")[this.options.html ? "html" : "text"](n), t.removeClass("fade top bottom left right in")
- },
- hasContent: function() {
- return this.getTitle() || this.getContent()
- },
- getContent: function() {
- var t, e = this.$element,
- n = this.options;
- return t = ("function" == typeof n.content ? n.content.call(e[0]) : n.content) || e.attr("data-content")
- },
- tip: function() {
- return this.$tip || (this.$tip = t(this.options.template)), this.$tip
- },
- destroy: function() {
- this.hide().$element.off("." + this.type).removeData(this.type)
- }
- });
- var n = t.fn.popover;
- t.fn.popover = function(n) {
- return this.each(function() {
- var i = t(this),
- o = i.data("popover"),
- r = "object" == typeof n && n;
- o || i.data("popover", o = new e(this, r)), "string" == typeof n && o[n]()
- })
- }, t.fn.popover.Constructor = e, t.fn.popover.defaults = t.extend({}, t.fn.tooltip.defaults, {
- placement: "right",
- trigger: "click",
- content: "",
- template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
- }), t.fn.popover.noConflict = function() {
- return t.fn.popover = n, this
- }
- }(window.jQuery), ! function(t) {
- "use strict";
- var e = function(e, n) {
- this.$element = t(e), this.options = t.extend({}, t.fn.button.defaults, n)
- };
- e.prototype.setState = function(t) {
- var e = "disabled",
- n = this.$element,
- i = n.data(),
- o = n.is("input") ? "val" : "html";
- t += "Text", i.resetText || n.data("resetText", n[o]()), n[o](i[t] || this.options[t]), setTimeout(function() {
- "loadingText" == t ? n.addClass(e).attr(e, e) : n.removeClass(e).removeAttr(e)
- }, 0)
- }, e.prototype.toggle = function() {
- var t = this.$element.closest('[data-toggle="buttons-radio"]');
- t && t.find(".active").removeClass("active"), this.$element.toggleClass("active")
- };
- var n = t.fn.button;
- t.fn.button = function(n) {
- return this.each(function() {
- var i = t(this),
- o = i.data("button"),
- r = "object" == typeof n && n;
- o || i.data("button", o = new e(this, r)), "toggle" == n ? o.toggle() : n && o.setState(n)
- })
- }, t.fn.button.defaults = {
- loadingText: "loading..."
- }, t.fn.button.Constructor = e, t.fn.button.noConflict = function() {
- return t.fn.button = n, this
- }, t(document).on("click.button.data-api", "[data-toggle^=button]", function(e) {
- var n = t(e.target);
- n.hasClass("btn") || (n = n.closest(".btn")), n.button("toggle")
- })
- }(window.jQuery), ! function(t) {
- "use strict";
- var e = function(e, n) {
- this.$element = t(e), this.options = t.extend({}, t.fn.collapse.defaults, n), this.options.parent && (this.$parent = t(this.options.parent)), this.options.toggle && this.toggle()
- };
- e.prototype = {
- constructor: e,
- dimension: function() {
- var t = this.$element.hasClass("width");
- return t ? "width" : "height"
- },
- show: function() {
- var e, n, i, o;
- if (!this.transitioning && !this.$element.hasClass("in")) {
- if (e = this.dimension(), n = t.camelCase(["scroll", e].join("-")), i = this.$parent && this.$parent.find("> .accordion-group > .in"), i && i.length) {
- if (o = i.data("collapse"), o && o.transitioning) return;
- i.collapse("hide"), o || i.data("collapse", null)
- }
- this.$element[e](0), this.transition("addClass", t.Event("show"), "shown"), t.support.transition && this.$element[e](this.$element[0][n])
- }
- },
- hide: function() {
- var e;
- !this.transitioning && this.$element.hasClass("in") && (e = this.dimension(), this.reset(this.$element[e]()), this.transition("removeClass", t.Event("hide"), "hidden"), this.$element[e](0))
- },
- reset: function(t) {
- var e = this.dimension();
- return this.$element.removeClass("collapse")[e](t || "auto")[0].offsetWidth, this.$element[null !== t ? "addClass" : "removeClass"]("collapse"), this
- },
- transition: function(e, n, i) {
- var o = this,
- r = function() {
- "show" == n.type && o.reset(), o.transitioning = 0, o.$element.trigger(i)
- };
- this.$element.trigger(n), n.isDefaultPrevented() || (this.transitioning = 1, this.$element[e]("in"), t.support.transition && this.$element.hasClass("collapse") ? this.$element.one(t.support.transition.end, r) : r())
- },
- toggle: function() {
- this[this.$element.hasClass("in") ? "hide" : "show"]()
- }
- };
- var n = t.fn.collapse;
- t.fn.collapse = function(n) {
- return this.each(function() {
- var i = t(this),
- o = i.data("collapse"),
- r = t.extend({}, t.fn.collapse.defaults, i.data(), "object" == typeof n && n);
- o || i.data("collapse", o = new e(this, r)), "string" == typeof n && o[n]()
- })
- }, t.fn.collapse.defaults = {
- toggle: !0
- }, t.fn.collapse.Constructor = e, t.fn.collapse.noConflict = function() {
- return t.fn.collapse = n, this
- }, t(document).on("click.collapse.data-api", "[data-toggle=collapse]", function(e) {
- var n, i = t(this),
- o = i.attr("data-target") || e.preventDefault() || (n = i.attr("href")) && n.replace(/.*(?=#[^\s]+$)/, ""),
- r = t(o).data("collapse") ? "toggle" : i.data();
- i[t(o).hasClass("in") ? "addClass" : "removeClass"]("collapsed"), t(o).collapse(r)
- })
- }(window.jQuery), ! function(t) {
- "use strict";
- var e = function(e, n) {
- this.$element = t(e), this.$indicators = this.$element.find(".carousel-indicators"), this.options = n, "hover" == this.options.pause && this.$element.on("mouseenter", t.proxy(this.pause, this)).on("mouseleave", t.proxy(this.cycle, this))
- };
- e.prototype = {
- cycle: function(e) {
- return e || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(t.proxy(this.next, this), this.options.interval)), this
- },
- getActiveIndex: function() {
- return this.$active = this.$element.find(".item.active"), this.$items = this.$active.parent().children(), this.$items.index(this.$active)
- },
- to: function(e) {
- var n = this.getActiveIndex(),
- i = this;
- if (!(e > this.$items.length - 1 || 0 > e)) return this.sliding ? this.$element.one("slid", function() {
- i.to(e)
- }) : n == e ? this.pause().cycle() : this.slide(e > n ? "next" : "prev", t(this.$items[e]))
- },
- pause: function(e) {
- return e || (this.paused = !0), this.$element.find(".next, .prev").length && t.support.transition.end && (this.$element.trigger(t.support.transition.end), this.cycle(!0)), clearInterval(this.interval), this.interval = null, this
- },
- next: function() {
- return this.sliding ? void 0 : this.slide("next")
- },
- prev: function() {
- return this.sliding ? void 0 : this.slide("prev")
- },
- slide: function(e, n) {
- var i, o = this.$element.find(".item.active"),
- r = n || o[e](),
- s = this.interval,
- a = "next" == e ? "left" : "right",
- l = "next" == e ? "first" : "last",
- c = this;
- if (this.sliding = !0, s && this.pause(), r = r.length ? r : this.$element.find(".item")[l](), i = t.Event("slide", {
- relatedTarget: r[0],
- direction: a
- }), !r.hasClass("active")) {
- if (this.$indicators.length && (this.$indicators.find(".active").removeClass("active"), this.$element.one("slid", function() {
- var e = t(c.$indicators.children()[c.getActiveIndex()]);
- e && e.addClass("active")
- })), t.support.transition && this.$element.hasClass("slide")) {
- if (this.$element.trigger(i), i.isDefaultPrevented()) return;
- r.addClass(e), r[0].offsetWidth, o.addClass(a), r.addClass(a), this.$element.one(t.support.transition.end, function() {
- r.removeClass([e, a].join(" ")).addClass("active"), o.removeClass(["active", a].join(" ")), c.sliding = !1, setTimeout(function() {
- c.$element.trigger("slid")
- }, 0)
- })
- } else {
- if (this.$element.trigger(i), i.isDefaultPrevented()) return;
- o.removeClass("active"), r.addClass("active"), this.sliding = !1, this.$element.trigger("slid")
- }
- return s && this.cycle(), this
- }
- }
- };
- var n = t.fn.carousel;
- t.fn.carousel = function(n) {
- return this.each(function() {
- var i = t(this),
- o = i.data("carousel"),
- r = t.extend({}, t.fn.carousel.defaults, "object" == typeof n && n),
- s = "string" == typeof n ? n : r.slide;
- o || i.data("carousel", o = new e(this, r)), "number" == typeof n ? o.to(n) : s ? o[s]() : r.interval && o.pause().cycle()
- })
- }, t.fn.carousel.defaults = {
- interval: 5e3,
- pause: "hover"
- }, t.fn.carousel.Constructor = e, t.fn.carousel.noConflict = function() {
- return t.fn.carousel = n, this
- }, t(document).on("click.carousel.data-api", "[data-slide], [data-slide-to]", function(e) {
- var n, i, o = t(this),
- r = t(o.attr("data-target") || (n = o.attr("href")) && n.replace(/.*(?=#[^\s]+$)/, "")),
- s = t.extend({}, r.data(), o.data());
- r.carousel(s), (i = o.attr("data-slide-to")) && r.data("carousel").pause().to(i).cycle(), e.preventDefault()
- })
- }(window.jQuery), ! function(t) {
- "use strict";
- var e = function(e, n) {
- this.$element = t(e), this.options = t.extend({}, t.fn.typeahead.defaults, n), this.matcher = this.options.matcher || this.matcher, this.sorter = this.options.sorter || this.sorter, this.highlighter = this.options.highlighter || this.highlighter, this.updater = this.options.updater || this.updater, this.source = this.options.source, this.$menu = t(this.options.menu), this.shown = !1, this.listen()
- };
- e.prototype = {
- constructor: e,
- select: function() {
- var t = this.$menu.find(".active").attr("data-value");
- return this.$element.val(this.updater(t)).change(), this.hide()
- },
- updater: function(t) {
- return t
- },
- show: function() {
- var e = t.extend({}, this.$element.position(), {
- height: this.$element[0].offsetHeight
- });
- return this.$menu.insertAfter(this.$element).css({
- top: e.top + e.height,
- left: e.left
- }).show(), this.shown = !0, this
- },
- hide: function() {
- return this.$menu.hide(), this.shown = !1, this
- },
- lookup: function() {
- var e;
- return this.query = this.$element.val(), !this.query || this.query.length < this.options.minLength ? this.shown ? this.hide() : this : (e = t.isFunction(this.source) ? this.source(this.query, t.proxy(this.process, this)) : this.source, e ? this.process(e) : this)
- },
- process: function(e) {
- var n = this;
- return e = t.grep(e, function(t) {
- return n.matcher(t)
- }), e = this.sorter(e), e.length ? this.render(e.slice(0, this.options.items)).show() : this.shown ? this.hide() : this
- },
- matcher: function(t) {
- return ~t.toLowerCase().indexOf(this.query.toLowerCase())
- },
- sorter: function(t) {
- for (var e, n = [], i = [], o = []; e = t.shift();) e.toLowerCase().indexOf(this.query.toLowerCase()) ? ~e.indexOf(this.query) ? i.push(e) : o.push(e) : n.push(e);
- return n.concat(i, o)
- },
- highlighter: function(t) {
- var e = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
- return t.replace(new RegExp("(" + e + ")", "ig"), function(t, e) {
- return "<strong>" + e + "</strong>"
- })
- },
- render: function(e) {
- var n = this;
- return e = t(e).map(function(e, i) {
- return e = t(n.options.item).attr("data-value", i), e.find("a").html(n.highlighter(i)), e[0]
- }), e.first().addClass("active"), this.$menu.html(e), this
- },
- next: function() {
- var e = this.$menu.find(".active").removeClass("active"),
- n = e.next();
- n.length || (n = t(this.$menu.find("li")[0])), n.addClass("active")
- },
- prev: function() {
- var t = this.$menu.find(".active").removeClass("active"),
- e = t.prev();
- e.length || (e = this.$menu.find("li").last()), e.addClass("active")
- },
- listen: function() {
- this.$element.on("focus", t.proxy(this.focus, this)).on("blur", t.proxy(this.blur, this)).on("keypress", t.proxy(this.keypress, this)).on("keyup", t.proxy(this.keyup, this)), this.eventSupported("keydown") && this.$element.on("keydown", t.proxy(this.keydown, this)), this.$menu.on("click", t.proxy(this.click, this)).on("mouseenter", "li", t.proxy(this.mouseenter, this)).on("mouseleave", "li", t.proxy(this.mouseleave, this))
- },
- eventSupported: function(t) {
- var e = t in this.$element;
- return e || (this.$element.setAttribute(t, "return;"), e = "function" == typeof this.$element[t]), e
- },
- move: function(t) {
- if (this.shown) {
- switch (t.keyCode) {
- case 9:
- case 13:
- case 27:
- t.preventDefault();
- break;
- case 38:
- t.preventDefault(), this.prev();
- break;
- case 40:
- t.preventDefault(), this.next()
- }
- t.stopPropagation()
- }
- },
- keydown: function(e) {
- this.suppressKeyPressRepeat = ~t.inArray(e.keyCode, [40, 38, 9, 13, 27]), this.move(e)
- },
- keypress: function(t) {
- this.suppressKeyPressRepeat || this.move(t)
- },
- keyup: function(t) {
- switch (t.keyCode) {
- case 40:
- case 38:
- case 16:
- case 17:
- case 18:
- break;
- case 9:
- case 13:
- if (!this.shown) return;
- this.select();
- break;
- case 27:
- if (!this.shown) return;
- this.hide();
- break;
- default:
- this.lookup()
- }
- t.stopPropagation(), t.preventDefault()
- },
- focus: function() {
- this.focused = !0
- },
- blur: function() {
- this.focused = !1, !this.mousedover && this.shown && this.hide()
- },
- click: function(t) {
- t.stopPropagation(), t.preventDefault(), this.select(), this.$element.focus()
- },
- mouseenter: function(e) {
- this.mousedover = !0, this.$menu.find(".active").removeClass("active"), t(e.currentTarget).addClass("active")
- },
- mouseleave: function() {
- this.mousedover = !1, !this.focused && this.shown && this.hide()
- }
- };
- var n = t.fn.typeahead;
- t.fn.typeahead = function(n) {
- return this.each(function() {
- var i = t(this),
- o = i.data("typeahead"),
- r = "object" == typeof n && n;
- o || i.data("typeahead", o = new e(this, r)), "string" == typeof n && o[n]()
- })
- }, t.fn.typeahead.defaults = {
- source: [],
- items: 8,
- menu: '<ul class="typeahead dropdown-menu"></ul>',
- item: '<li><a href="#"></a></li>',
- minLength: 1
- }, t.fn.typeahead.Constructor = e, t.fn.typeahead.noConflict = function() {
- return t.fn.typeahead = n, this
- }, t(document).on("focus.typeahead.data-api", '[data-provide="typeahead"]', function() {
- var e = t(this);
- e.data("typeahead") || e.typeahead(e.data())
- })
- }(window.jQuery), ! function(t) {
- "use strict";
- var e = function(e, n) {
- this.options = t.extend({}, t.fn.affix.defaults, n), this.$window = t(window).on("scroll.affix.data-api", t.proxy(this.checkPosition, this)).on("click.affix.data-api", t.proxy(function() {
- setTimeout(t.proxy(this.checkPosition, this), 1)
- }, this)), this.$element = t(e), this.checkPosition()
- };
- e.prototype.checkPosition = function() {
- if (this.$element.is(":visible")) {
- var e, n = t(document).height(),
- i = this.$window.scrollTop(),
- o = this.$element.offset(),
- r = this.options.offset,
- s = r.bottom,
- a = r.top,
- l = "affix affix-top affix-bottom";
- "object" != typeof r && (s = a = r), "function" == typeof a && (a = r.top()), "function" == typeof s && (s = r.bottom()), e = null != this.unpin && i + this.unpin <= o.top ? !1 : null != s && o.top + this.$element.height() >= n - s ? "bottom" : null != a && a >= i ? "top" : !1, this.affixed !== e && (this.affixed = e, this.unpin = "bottom" == e ? o.top - i : null, this.$element.removeClass(l).addClass("affix" + (e ? "-" + e : "")))
- }
- };
- var n = t.fn.affix;
- t.fn.affix = function(n) {
- return this.each(function() {
- var i = t(this),
- o = i.data("affix"),
- r = "object" == typeof n && n;
- o || i.data("affix", o = new e(this, r)), "string" == typeof n && o[n]()
- })
- }, t.fn.affix.Constructor = e, t.fn.affix.defaults = {
- offset: 0
- }, t.fn.affix.noConflict = function() {
- return t.fn.affix = n, this
- }, t(window).on("load", function() {
- t('[data-spy="affix"]').each(function() {
- var e = t(this),
- n = e.data();
- n.offset = n.offset || {}, n.offsetBottom && (n.offset.bottom = n.offsetBottom), n.offsetTop && (n.offset.top = n.offsetTop), e.affix(n)
- })
- })
- }(window.jQuery),
- function(t) {
- var e, n = {
- className: "autosizejs",
- id: "autosizejs",
- append: "\n",
- callback: !1,
- resizeDelay: 10,
- placeholder: !0
- },
- i = '<textarea tabindex="-1" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"/>',
- o = ["fontFamily", "fontSize", "fontWeight", "fontStyle", "letterSpacing", "textTransform", "wordSpacing", "textIndent"],
- r = t(i).data("autosize", !0)[0];
- r.style.lineHeight = "99px", "99px" === t(r).css("lineHeight") && o.push("lineHeight"), r.style.lineHeight = "", t.fn.autosize = function(i) {
- return this.length ? (i = t.extend({}, n, i || {}), r.parentNode !== document.body && t(document.body).append(r), this.each(function() {
- function n() {
- var e, n = window.getComputedStyle ? window.getComputedStyle(d, null) : !1;
- n ? (e = d.getBoundingClientRect().width, (0 === e || "number" != typeof e) && (e = parseInt(n.width, 10)), t.each(["paddingLeft", "paddingRight", "borderLeftWidth", "borderRightWidth"], function(t, i) {
- e -= parseInt(n[i], 10)
- })) : e = Math.max(f.width(), 0), r.style.width = e + "px"
- }
- function s() {
- var s = {};
- if (e = d, r.className = i.className, r.id = i.id, c = parseInt(f.css("maxHeight"), 10), t.each(o, function(t, e) {
- s[e] = f.css(e)
- }), t(r).css(s).attr("wrap", f.attr("wrap")), n(), window.chrome) {
- var a = d.style.width;
- d.style.width = "0px"; {
- d.offsetWidth
- }
- d.style.width = a
- }
- }
- function a() {
- var t, o;
- e !== d ? s() : n(), r.value = !d.value && i.placeholder ? (f.attr("placeholder") || "") + i.append : d.value + i.append, r.style.overflowY = d.style.overflowY, o = parseInt(d.style.height, 10), r.scrollTop = 0, r.scrollTop = 9e4, t = r.scrollTop, c && t > c ? (d.style.overflowY = "scroll", t = c) : (d.style.overflowY = "hidden", u > t && (t = u)), t += p, o !== t && (d.style.height = t + "px", m && i.callback.call(d, d))
- }
- function l() {
- clearTimeout(h), h = setTimeout(function() {
- var t = f.width();
- t !== v && (v = t, a())
- }, parseInt(i.resizeDelay, 10))
- }
- var c, u, h, d = this,
- f = t(d),
- p = 0,
- m = t.isFunction(i.callback),
- g = {
- height: d.style.height,
- overflow: d.style.overflow,
- overflowY: d.style.overflowY,
- wordWrap: d.style.wordWrap,
- resize: d.style.resize
- },
- v = f.width(),
- y = f.css("resize");
- f.data("autosize") || (f.data("autosize", !0), ("border-box" === f.css("box-sizing") || "border-box" === f.css("-moz-box-sizing") || "border-box" === f.css("-webkit-box-sizing")) && (p = f.outerHeight() - f.height()), u = Math.max(parseInt(f.css("minHeight"), 10) - p || 0, f.height()), f.css({
- overflow: "hidden",
- overflowY: "hidden",
- wordWrap: "break-word"
- }), "vertical" === y ? f.css("resize", "none") : "both" === y && f.css("resize", "horizontal"), "onpropertychange" in d ? "oninput" in d ? f.on("input.autosize keyup.autosize", a) : f.on("propertychange.autosize", function() {
- "value" === event.propertyName && a()
- }) : f.on("input.autosize", a), i.resizeDelay !== !1 && t(window).on("resize.autosize", l), f.on("autosize.resize", a), f.on("autosize.resizeIncludeStyle", function() {
- e = null, a()
- }), f.on("autosize.destroy", function() {
- e = null, clearTimeout(h), t(window).off("resize", l), f.off("autosize").off(".autosize").css(g).removeData("autosize")
- }), a())
- })) : this
- }
- }(window.jQuery || window.$),
- function() {
- jQuery(function() {
- return $("a[rel=popover]").popover(), $(".tooltip").tooltip(), $("a[rel=tooltip]").tooltip()
- })
- }.call(this),
- function() {
- window.HD = {
- calcMax: function(t) {
- var e, n;
- return e = t.val().length, n = parseInt(t.attr("maxlength")), n = n - e >= 0 ? n - e : 0
- }
- }, $(function() {
- return $(".display-num").each(function() {
- var t;
- return t = HD.calcMax($(this)), 0 > t ? void 0 : $(this).hasClass("oneline-decoratited") ? $(this).parent().after('<span class="num">' + t + "</span>").addClass("decorated_text") : $(this).after('<span class="num">' + t + "</span>").parent().addClass("decorated_text")
- }), $(".display-num").keyup(function() {
- return $(this).hasClass("oneline-decoratited") ? $(this).parent().next(".num").text(HD.calcMax($(this))) : $(this).closest("div").find(".num").text(HD.calcMax($(this)))
- }), $("textarea.resize").autosize()
- })
- }.call(this),
- function() {}.call(this),
- function() {}.call(this),
- function() {
- $(function() {
- var t;
- return t = function(t) {
- var e, n, i;
- return e = t.closest("label"), n = parseInt($("#category-max").text()), i = $("#category_list input:checkbox:checked").length, $("#category-selected").text(n > i ? i : n), t.is(":checked") ? n >= i ? e.addClass("selected") : t.removeAttr("checked") : e.removeClass("selected")
- }, $("#add_category").keydown(function(t) {
- var e;
- return e = t.keyCode ? t.keyCode : t.which, 13 === e ? (t.preventDefault(), $("#button_add_category").click(), !1) : void 0
- }), $("#button_add_category").click(function() {
- return $(".add_new_category").parents(".control-group").removeClass("error"), $(".add_new_category").parents(".controls").parent().find("span").remove(), $("#add_category").val().length < 3 ? alert("\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438") : $.ajax({
- type: "POST",
- data: {
- category_name: $("#add_category").val(),
- city_flag: $("#city_flag").val()
- },
- url: "/cabinet/projects/add_category",
- success: function(e) {
- return e.id && $("#category-own").append('<label class="checkbox"><input type="checkbox" style="display: none" value="' + e.id + '" name="project[category_ids][]" id="project_category_ids_' + e.id + '" checked="checked" class="check_boxes optional">' + e.name + "</label>"), $("#add_category").val(""), t($("#category-own label:last input:checkbox"))
- }
- })
- }), $("#category_list label").each(function() {
- return t($(this).find("input:checkbox").hide())
- }), $("#category_list").on("change", "input:checkbox", function() {
- return t($(this))
- })
- })
- }.call(this),
- function() {}.call(this), $(document).ready(function() {
- return $(".scroll-anchor").on("click", function(t) {
- var e = $("#all_dates").offset().top + "px";
- $("html, body").stop().animate({
- scrollTop: e
- }, 1e3), t.preventDefault()
- }), !1
- }), $(document).ready(function() {
- shareIdea(".share-idea-facebook", "https://www.facebook.com/sharer.php?u=", "?v=1&t="), shareIdea(".share-idea-vkontakte", "https://vkontakte.ru/share.php?url=", "&title="), shareIdea(".share-idea-twitter", "https://twitter.com/share?url=", "&text="), shareIdea(".share-idea-googleplus", "https://plus.google.com/share?url=")
- }), $(document).ready(function() {
- function t(t, e) {
- var n;
- "0" != t.left ? (n = t.left - 73 + "px", $(".timeline-tooltip").css({
- left: n,
- top: i - e + "px",
- bottom: "auto"
- }), $(".timeline-tooltip-arrow-down").css("left", "88px"), $(".timeline-tooltip-arrow-up").css("left", "88px"), $(".timeline-tooltip").css("width", "164px")) : (n = t.left + 20 + "px", $(".timeline-tooltip").css({
- left: n,
- top: i - e + "px",
- bottom: "auto"
- }), $(".timeline-tooltip-arrow-down").css("left", "67px"), $(".timeline-tooltip-arrow-up").css("left", "67px"), $(".timeline-tooltip").css("width", "144px"))
- }
- function e(t, e) {
- var n;
- "0" != t.left ? (n = t.left - 73 + "px", $(".timeline-tooltip").css({
- left: n,
- bottom: i - e + "px",
- top: "auto"
- }), $(".timeline-tooltip-arrow-down").css("left", "88px"), $(".timeline-tooltip-arrow-up").css("left", "88px"), $(".timeline-tooltip").css("width", "164px")) : (n = t.left + 20 + "px", $(".timeline-tooltip").css({
- left: n,
- bottom: i - e + "px",
- top: "auto"
- }), $(".timeline-tooltip-arrow-down").css("left", "67px"), $(".timeline-tooltip-arrow-up").css("left", "67px"), $(".timeline-tooltip").css("width", "144px"))
- }
- function n(t, e) {
- void 0 !== t ? $(".timeline-tooltip").html("<div class='" + e + "'></div>" + t).show() : $(".timeline-tooltip").hide()
- }
- var i = $(".timeline-image").height();
- $(".timeline-description li").click(function(i) {
- var o = $(this).find("span").text(),
- r = $(".timeline-numbers li").eq(o - 1),
- s = r.position(),
- a = $(this).data("title");
- if ($(".timeline-numbers li.active").text() != o && void 0 !== a) {
- if ($(r).hasClass("active")) return;
- $(".timeline-numbers li.active").removeClass("active"), $(r).addClass("active")
- } else void 0 === a && $(".timeline-numbers li.active").removeClass("active"); if ("5" === o || "8" === o ? (n(a, "timeline-tooltip-arrow-down"), t(s, 7)) : (n(a, "timeline-tooltip-arrow-up"), e(s, 120)), void 0 !== a) {
- if ($(this).hasClass("active")) return;
- $(".timeline-description li.active").removeClass("active"), $(this).addClass("active")
- } else $(".timeline-description li.active").removeClass("active");
- i.stopPropagation(), $(document).click(function() {
- $(".timeline-numbers li.active").removeClass("active"), $(".timeline-description li.active").removeClass("active"), "none" != $(".timeline-tooltip").css("display") && $(".timeline-tooltip").fadeOut()
- })
- }), $(".timeline-numbers li").click(function(i) {
- var o = $(this).text(),
- r = $(this).position();
- if ("5" === o || "8" === o) {
- var s = "\u041f\u043e\u0434\u0432\u043e\u0434\u0438\u043c \u0438\u0442\u043e\u0433\u0438 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u0434\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0447\u0435\u043a\u043f\u043e\u0439\u043d\u0442\u0430.",
- a = "\u041f\u043e\u0434\u0432\u043e\u0434\u0438\u043c \u0438\u0442\u043e\u0433\u0438 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u0434\u043e \u0434\u0435\u043c\u043e\u0444\u0435\u0441\u0442\u0430.";
- if ("5" === o ? n(s, "timeline-tooltip-arrow-down") : "8" === o && n(a, "timeline-tooltip-arrow-down"), t(r, 7), $(this).hasClass("withouttitle")) return;
- $(".timeline-numbers li.active").removeClass("active"), $(this).addClass("active"), $(".timeline-description li").each(function() {
- var t = $(this).find("span").text();
- o === t && ($(".timeline-description li.active").removeClass("active"), $(this).addClass("active"))
- })
- } else {
- if ($(this).hasClass("withouttitle")) return;
- $(".timeline-numbers li.active").removeClass("active"), $(this).addClass("active"), $(".timeline-description li").each(function() {
- var t = $(this).find("span").text();
- if (t === o) {
- var i = $(this).data("title");
- if (n(i, "timeline-tooltip-arrow-up"), void 0 !== i) {
- if ($(t).hasClass("active")) return;
- $(".timeline-description li.active").removeClass("active"), $(this).addClass("active")
- }
- }
- e(r, 120)
- })
- }
- i.stopPropagation(), $(document).click(function() {
- $(".timeline-numbers li.active").removeClass("active"), $(".timeline-description li.active").removeClass("active"), "none" != $(".timeline-tooltip").css("display") && $(".timeline-tooltip").fadeOut()
- })
- })
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement