")
.addClass("ui-menu-icon ui-icon " + r)
.data("ui-menu-submenu-carat", !0);
i.attr("aria-haspopup", "true").prepend(u);
t.attr("aria-labelledby", i.attr("id"));
});
t = i.add(this.element);
t.children(":not(.ui-menu-item):has(a)")
.addClass("ui-menu-item")
.attr("role", "presentation")
.children("a")
.uniqueId()
.addClass("ui-corner-all")
.attr({ tabIndex: -1, role: this._itemRole() });
t.children(":not(.ui-menu-item)").each(function () {
var t = n(this);
/[^\-\u2014\u2013\s]/.test(t.text()) ||
t.addClass("ui-widget-content ui-menu-divider");
});
t.children(".ui-state-disabled").attr("aria-disabled", "true");
this.active &&
!n.contains(this.element[0], this.active[0]) &&
this.blur();
},
_itemRole: function () {
return { menu: "menuitem", listbox: "option" }[this.options.role];
},
_setOption: function (n, t) {
n === "icons" &&
this.element
.find(".ui-menu-icon")
.removeClass(this.options.icons.submenu)
.addClass(t.submenu);
this._super(n, t);
},
focus: function (n, t) {
var i, r;
this.blur(n, n && n.type === "focus");
this._scrollIntoView(t);
this.active = t.first();
r = this.active.children("a").addClass("ui-state-focus");
this.options.role &&
this.element.attr("aria-activedescendant", r.attr("id"));
this.active
.parent()
.closest(".ui-menu-item")
.children("a:first")
.addClass("ui-state-active");
n && n.type === "keydown"
? this._close()
: (this.timer = this._delay(function () {
this._close();
}, this.delay));
i = t.children(".ui-menu");
i.length && /^mouse/.test(n.type) && this._startOpening(i);
this.activeMenu = t.parent();
this._trigger("focus", n, { item: t });
},
_scrollIntoView: function (t) {
var e, o, i, r, u, f;
this._hasScroll() &&
((e = parseFloat(n.css(this.activeMenu[0], "borderTopWidth")) || 0),
(o = parseFloat(n.css(this.activeMenu[0], "paddingTop")) || 0),
(i = t.offset().top - this.activeMenu.offset().top - e - o),
(r = this.activeMenu.scrollTop()),
(u = this.activeMenu.height()),
(f = t.height()),
i < 0
? this.activeMenu.scrollTop(r + i)
: i + f > u && this.activeMenu.scrollTop(r + i - u + f));
},
blur: function (n, t) {
(t || clearTimeout(this.timer), this.active) &&
(this.active.children("a").removeClass("ui-state-focus"),
(this.active = null),
this._trigger("blur", n, { item: this.active }));
},
_startOpening: function (n) {
(clearTimeout(this.timer), n.attr("aria-hidden") === "true") &&
(this.timer = this._delay(function () {
this._close();
this._open(n);
}, this.delay));
},
_open: function (t) {
var i = n.extend({ of: this.active }, this.options.position);
clearTimeout(this.timer);
this.element
.find(".ui-menu")
.not(t.parents(".ui-menu"))
.hide()
.attr("aria-hidden", "true");
t.show()
.removeAttr("aria-hidden")
.attr("aria-expanded", "true")
.position(i);
},
collapseAll: function (t, i) {
clearTimeout(this.timer);
this.timer = this._delay(function () {
var r = i
? this.element
: n(t && t.target).closest(this.element.find(".ui-menu"));
r.length || (r = this.element);
this._close(r);
this.blur(t);
this.activeMenu = r;
}, this.delay);
},
_close: function (n) {
n || (n = this.active ? this.active.parent() : this.element);
n.find(".ui-menu")
.hide()
.attr("aria-hidden", "true")
.attr("aria-expanded", "false")
.end()
.find("a.ui-state-active")
.removeClass("ui-state-active");
},
collapse: function (n) {
var t =
this.active &&
this.active.parent().closest(".ui-menu-item", this.element);
t && t.length && (this._close(), this.focus(n, t));
},
expand: function (n) {
var t =
this.active &&
this.active.children(".ui-menu ").children(".ui-menu-item").first();
t &&
t.length &&
(this._open(t.parent()),
this._delay(function () {
this.focus(n, t);
}));
},
next: function (n) {
this._move("next", "first", n);
},
previous: function (n) {
this._move("prev", "last", n);
},
isFirstItem: function () {
return this.active && !this.active.prevAll(".ui-menu-item").length;
},
isLastItem: function () {
return this.active && !this.active.nextAll(".ui-menu-item").length;
},
_move: function (n, t, i) {
var r;
this.active &&
(r =
n === "first" || n === "last"
? this.active[n === "first" ? "prevAll" : "nextAll"](
".ui-menu-item"
).eq(-1)
: this.active[n + "All"](".ui-menu-item").eq(0));
(r && r.length && this.active) ||
(r = this.activeMenu.children(".ui-menu-item")[t]());
this.focus(i, r);
},
nextPage: function (t) {
var i, r, u;
if (!this.active) {
this.next(t);
return;
}
this.isLastItem() ||
(this._hasScroll()
? ((r = this.active.offset().top),
(u = this.element.height()),
this.active.nextAll(".ui-menu-item").each(function () {
return (i = n(this)), i.offset().top - r - u < 0;
}),
this.focus(t, i))
: this.focus(
t,
this.activeMenu
.children(".ui-menu-item")
[this.active ? "last" : "first"]()
));
},
previousPage: function (t) {
var i, r, u;
if (!this.active) {
this.next(t);
return;
}
this.isFirstItem() ||
(this._hasScroll()
? ((r = this.active.offset().top),
(u = this.element.height()),
this.active.prevAll(".ui-menu-item").each(function () {
return (i = n(this)), i.offset().top - r + u > 0;
}),
this.focus(t, i))
: this.focus(t, this.activeMenu.children(".ui-menu-item").first()));
},
_hasScroll: function () {
return this.element.outerHeight() < this.element.prop("scrollHeight");
},
select: function (t) {
this.active = this.active || n(t.target).closest(".ui-menu-item");
var i = { item: this.active };
this.active.has(".ui-menu").length || this.collapseAll(t, !0);
this._trigger("select", t, i);
},
});
})(jQuery),
(function (n, t) {
var i = "ui-effects-";
(n.effects = { effect: {} }),
(function (n, t) {
function e(n, t, i) {
var r = s[t.type] || {};
return n == null
? i || !t.def
? null
: t.def
: ((n = r.floor ? ~~n : parseFloat(n)), isNaN(n))
? t.def
: r.mod
? (n + r.mod) % r.mod
: 0 > n
? 0
: r.max < n
? r.max
: n;
}
function l(t) {
var e = i(),
o = (e._rgba = []);
return ((t = t.toLowerCase()),
r(v, function (n, i) {
var r,
s = i.re.exec(t),
h = s && i.parse(s),
f = i.space || "rgba";
if (h)
return (
(r = e[f](h)),
(e[u[f].cache] = r[u[f].cache]),
(o = e._rgba = r._rgba),
!1
);
}),
o.length)
? (o.join() === "0,0,0,0" && n.extend(o, f.transparent), e)
: f[t];
}
function o(n, t, i) {
return ((i = (i + 1) % 1), i * 6 < 1)
? n + (t - n) * i * 6
: i * 2 < 1
? t
: i * 3 < 2
? n + (t - n) * (2 / 3 - i) * 6
: n;
}
var a = /^([\-+])=\s*(\d+\.?\d*)/,
v = [
{
re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
parse: function (n) {
return [n[1], n[2], n[3], n[4]];
},
},
{
re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
parse: function (n) {
return [n[1] * 2.55, n[2] * 2.55, n[3] * 2.55, n[4]];
},
},
{
re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
parse: function (n) {
return [
parseInt(n[1], 16),
parseInt(n[2], 16),
parseInt(n[3], 16),
];
},
},
{
re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
parse: function (n) {
return [
parseInt(n[1] + n[1], 16),
parseInt(n[2] + n[2], 16),
parseInt(n[3] + n[3], 16),
];
},
},
{
re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
space: "hsla",
parse: function (n) {
return [n[1], n[2] / 100, n[3] / 100, n[4]];
},
},
],
i = (n.Color = function (t, i, r, u) {
return new n.Color.fn.parse(t, i, r, u);
}),
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" },
},
},
},
s = {
byte: { floor: !0, max: 255 },
percent: { max: 1 },
degrees: { mod: 360, floor: !0 },
},
h = (i.support = {}),
c = n("")[0],
f,
r = n.each;
c.style.cssText = "background-color:rgba(1,1,1,.5)";
h.rgba = c.style.backgroundColor.indexOf("rgba") > -1;
r(u, function (n, t) {
t.cache = "_" + n;
t.props.alpha = { idx: 3, type: "percent", def: 1 };
});
i.fn = n.extend(i.prototype, {
parse: function (o, s, h, c) {
if (o === t) return (this._rgba = [null, null, null, null]), this;
(o.jquery || o.nodeType) && ((o = n(o).css(s)), (s = t));
var a = this,
v = n.type(o),
y = (this._rgba = []);
return (s !== t && ((o = [o, s, h, c]), (v = "array")),
v === "string")
? this.parse(l(o) || f._default)
: v === "array"
? (r(u.rgba.props, function (n, t) {
y[t.idx] = e(o[t.idx], t);
}),
this)
: v === "object"
? (o instanceof i
? r(u, function (n, t) {
o[t.cache] && (a[t.cache] = o[t.cache].slice());
})
: r(u, function (t, i) {
var u = i.cache;
r(i.props, function (n, t) {
if (!a[u] && i.to) {
if (n === "alpha" || o[n] == null) return;
a[u] = i.to(a._rgba);
}
a[u][t.idx] = e(o[n], t, !0);
});
a[u] &&
n.inArray(null, a[u].slice(0, 3)) < 0 &&
((a[u][3] = 1), i.from && (a._rgba = i.from(a[u])));
}),
this)
: void 0;
},
is: function (n) {
var e = i(n),
t = !0,
f = this;
return (
r(u, function (n, i) {
var o,
u = e[i.cache];
return (
u &&
((o = f[i.cache] || (i.to && i.to(f._rgba)) || []),
r(i.props, function (n, i) {
if (u[i.idx] != null) return (t = u[i.idx] === o[i.idx]);
})),
t
);
}),
t
);
},
_space: function () {
var n = [],
t = this;
return (
r(u, function (i, r) {
t[r.cache] && n.push(i);
}),
n.pop()
);
},
transition: function (n, t) {
var f = i(n),
c = f._space(),
o = u[c],
l = this.alpha() === 0 ? i("transparent") : this,
a = l[o.cache] || o.to(l._rgba),
h = a.slice();
return (
(f = f[o.cache]),
r(o.props, function (n, i) {
var c = i.idx,
r = a[c],
u = f[c],
o = s[i.type] || {};
u !== null &&
(r === null
? (h[c] = u)
: (o.mod &&
(u - r > o.mod / 2
? (r += o.mod)
: r - u > o.mod / 2 && (r -= o.mod)),
(h[c] = e((u - r) * t + r, i))));
}),
this[c](h)
);
},
blend: function (t) {
if (this._rgba[3] === 1) return this;
var r = this._rgba.slice(),
u = r.pop(),
f = i(t)._rgba;
return i(
n.map(r, function (n, t) {
return (1 - u) * f[t] + u * n;
})
);
},
toRgbaString: function () {
var i = "rgba(",
t = n.map(this._rgba, function (n, t) {
return n == null ? (t > 2 ? 1 : 0) : n;
});
return t[3] === 1 && (t.pop(), (i = "rgb(")), i + t.join() + ")";
},
toHslaString: function () {
var i = "hsla(",
t = n.map(this.hsla(), function (n, t) {
return (
n == null && (n = t > 2 ? 1 : 0),
t && t < 3 && (n = Math.round(n * 100) + "%"),
n
);
});
return t[3] === 1 && (t.pop(), (i = "hsl(")), i + t.join() + ")";
},
toHexString: function (t) {
var i = this._rgba.slice(),
r = i.pop();
return (
t && i.push(~~(r * 255)),
"#" +
n
.map(i, function (n) {
return (
(n = (n || 0).toString(16)), n.length === 1 ? "0" + n : n
);
})
.join("")
);
},
toString: function () {
return this._rgba[3] === 0 ? "transparent" : this.toRgbaString();
},
});
i.fn.parse.prototype = i.fn;
u.hsla.to = function (n) {
if (n[0] == null || n[1] == null || n[2] == null)
return [null, null, null, n[3]];
var i = n[0] / 255,
r = n[1] / 255,
f = n[2] / 255,
s = n[3],
u = Math.max(i, r, f),
e = Math.min(i, r, f),
t = u - e,
o = u + e,
h = o * 0.5,
c,
l;
return (
(c =
e === u
? 0
: i === u
? (60 * (r - f)) / t + 360
: r === u
? (60 * (f - i)) / t + 120
: (60 * (i - r)) / t + 240),
(l = t === 0 ? 0 : h <= 0.5 ? t / o : t / (2 - o)),
[Math.round(c) % 360, l, h, s == null ? 1 : s]
);
};
u.hsla.from = function (n) {
if (n[0] == null || n[1] == null || n[2] == null)
return [null, null, null, n[3]];
var r = n[0] / 360,
u = n[1],
t = n[2],
e = n[3],
i = t <= 0.5 ? t * (1 + u) : t + u - t * u,
f = 2 * t - i;
return [
Math.round(o(f, i, r + 1 / 3) * 255),
Math.round(o(f, i, r) * 255),
Math.round(o(f, i, r - 1 / 3) * 255),
e,
];
};
r(u, function (u, f) {
var s = f.props,
o = f.cache,
h = f.to,
c = f.from;
i.fn[u] = function (u) {
if ((h && !this[o] && (this[o] = h(this._rgba)), u === t))
return this[o].slice();
var l,
a = n.type(u),
v = a === "array" || a === "object" ? u : arguments,
f = this[o].slice();
return (
r(s, function (n, t) {
var i = v[a === "object" ? n : t.idx];
i == null && (i = f[t.idx]);
f[t.idx] = e(i, t);
}),
c ? ((l = i(c(f))), (l[o] = f), l) : i(f)
);
};
r(s, function (t, r) {
i.fn[t] ||
(i.fn[t] = function (i) {
var f = n.type(i),
h = t === "alpha" ? (this._hsla ? "hsla" : "rgba") : u,
o = this[h](),
s = o[r.idx],
e;
return f === "undefined"
? s
: (f === "function" &&
((i = i.call(this, s)), (f = n.type(i))),
i == null && r.empty)
? this
: (f === "string" &&
((e = a.exec(i)),
e &&
(i = s + parseFloat(e[2]) * (e[1] === "+" ? 1 : -1))),
(o[r.idx] = i),
this[h](o));
});
});
});
i.hook = function (t) {
var u = t.split(" ");
r(u, function (t, r) {
n.cssHooks[r] = {
set: function (t, u) {
var o,
f,
e = "";
if (
u !== "transparent" &&
(n.type(u) !== "string" || (o = l(u)))
) {
if (((u = i(o || u)), !h.rgba && u._rgba[3] !== 1)) {
for (
f = r === "backgroundColor" ? t.parentNode : t;
(e === "" || e === "transparent") && f && f.style;
)
try {
e = n.css(f, "backgroundColor");
f = f.parentNode;
} catch (s) {}
u = u.blend(e && e !== "transparent" ? e : "_default");
}
u = u.toRgbaString();
}
try {
t.style[r] = u;
} catch (s) {}
},
};
n.fx.step[r] = function (t) {
t.colorInit ||
((t.start = i(t.elem, r)),
(t.end = i(t.end)),
(t.colorInit = !0));
n.cssHooks[r].set(t.elem, t.start.transition(t.end, t.pos));
};
});
};
i.hook(
"backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"
);
n.cssHooks.borderColor = {
expand: function (n) {
var t = {};
return (
r(["Top", "Right", "Bottom", "Left"], function (i, r) {
t["border" + r + "Color"] = n;
}),
t
);
},
};
f = n.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 i(t) {
var r,
u,
i = t.ownerDocument.defaultView
? t.ownerDocument.defaultView.getComputedStyle(t, null)
: t.currentStyle,
f = {};
if (i && i.length && i[0] && i[i[0]])
for (u = i.length; u--; )
(r = i[u]), typeof i[r] == "string" && (f[n.camelCase(r)] = i[r]);
else for (r in i) typeof i[r] == "string" && (f[r] = i[r]);
return f;
}
function f(t, i) {
var e = {},
r,
f;
for (r in i)
(f = i[r]),
t[r] !== f &&
(u[r] ||
((n.fx.step[r] || !isNaN(parseFloat(f))) && (e[r] = f)));
return e;
}
var r = ["add", "remove", "toggle"],
u = {
border: 1,
borderBottom: 1,
borderColor: 1,
borderLeft: 1,
borderRight: 1,
borderTop: 1,
borderWidth: 1,
margin: 1,
padding: 1,
};
n.each(
[
"borderLeftStyle",
"borderRightStyle",
"borderBottomStyle",
"borderTopStyle",
],
function (t, i) {
n.fx.step[i] = function (n) {
((n.end === "none" || n.setAttr) && (n.pos !== 1 || n.setAttr)) ||
(jQuery.style(n.elem, i, n.end), (n.setAttr = !0));
};
}
);
n.fn.addBack ||
(n.fn.addBack = function (n) {
return this.add(
n == null ? this.prevObject : this.prevObject.filter(n)
);
});
n.effects.animateClass = function (t, u, e, o) {
var s = n.speed(u, e, o);
return this.queue(function () {
var e = n(this),
h = e.attr("class") || "",
o,
u = s.children ? e.find("*").addBack() : e;
u = u.map(function () {
var t = n(this);
return { el: t, start: i(this) };
});
o = function () {
n.each(r, function (n, i) {
t[i] && e[i + "Class"](t[i]);
});
};
o();
u = u.map(function () {
return (
(this.end = i(this.el[0])),
(this.diff = f(this.start, this.end)),
this
);
});
e.attr("class", h);
u = u.map(function () {
var i = this,
t = n.Deferred(),
r = n.extend({}, s, {
queue: !1,
complete: function () {
t.resolve(i);
},
});
return this.el.animate(this.diff, r), t.promise();
});
n.when.apply(n, u.get()).done(function () {
o();
n.each(arguments, function () {
var t = this.el;
n.each(this.diff, function (n) {
t.css(n, "");
});
});
s.complete.call(e[0]);
});
});
};
n.fn.extend({
addClass: (function (t) {
return function (i, r, u, f) {
return r
? n.effects.animateClass.call(this, { add: i }, r, u, f)
: t.apply(this, arguments);
};
})(n.fn.addClass),
removeClass: (function (t) {
return function (i, r, u, f) {
return arguments.length > 1
? n.effects.animateClass.call(this, { remove: i }, r, u, f)
: t.apply(this, arguments);
};
})(n.fn.removeClass),
toggleClass: (function (i) {
return function (r, u, f, e, o) {
return typeof u == "boolean" || u === t
? f
? n.effects.animateClass.call(
this,
u ? { add: r } : { remove: r },
f,
e,
o
)
: i.apply(this, arguments)
: n.effects.animateClass.call(this, { toggle: r }, u, f, e);
};
})(n.fn.toggleClass),
switchClass: function (t, i, r, u, f) {
return n.effects.animateClass.call(
this,
{ add: i, remove: t },
r,
u,
f
);
},
});
})(),
(function () {
function r(t, i, r, u) {
return (
n.isPlainObject(t) && ((i = t), (t = t.effect)),
(t = { effect: t }),
i == null && (i = {}),
n.isFunction(i) && ((u = i), (r = null), (i = {})),
(typeof i == "number" || n.fx.speeds[i]) &&
((u = r), (r = i), (i = {})),
n.isFunction(r) && ((u = r), (r = null)),
i && n.extend(t, i),
(r = r || i.duration),
(t.duration = n.fx.off
? 0
: typeof r == "number"
? r
: r in n.fx.speeds
? n.fx.speeds[r]
: n.fx.speeds._default),
(t.complete = u || i.complete),
t
);
}
function u(t) {
return !t || typeof t == "number" || n.fx.speeds[t]
? !0
: typeof t == "string" && !n.effects.effect[t]
? !0
: n.isFunction(t)
? !0
: typeof t == "object" && !t.effect
? !0
: !1;
}
n.extend(n.effects, {
version: "1.10.3",
save: function (n, t) {
for (var r = 0; r < t.length; r++)
t[r] !== null && n.data(i + t[r], n[0].style[t[r]]);
},
restore: function (n, r) {
for (var f, u = 0; u < r.length; u++)
r[u] !== null &&
((f = n.data(i + r[u])), f === t && (f = ""), n.css(r[u], f));
},
setMode: function (n, t) {
return t === "toggle" && (t = n.is(":hidden") ? "show" : "hide"), t;
},
getBaseline: function (n, t) {
var i, r;
switch (n[0]) {
case "top":
i = 0;
break;
case "middle":
i = 0.5;
break;
case "bottom":
i = 1;
break;
default:
i = n[0] / t.height;
}
switch (n[1]) {
case "left":
r = 0;
break;
case "center":
r = 0.5;
break;
case "right":
r = 1;
break;
default:
r = n[1] / t.width;
}
return { x: r, y: i };
},
createWrapper: function (t) {
if (t.parent().is(".ui-effects-wrapper")) return t.parent();
var i = {
width: t.outerWidth(!0),
height: t.outerHeight(!0),
float: t.css("float"),
},
u = n("
").addClass("ui-effects-wrapper").css({
fontSize: "100%",
background: "transparent",
border: "none",
margin: 0,
padding: 0,
}),
f = { width: t.width(), height: t.height() },
r = document.activeElement;
try {
r.id;
} catch (e) {
r = document.body;
}
return (
t.wrap(u),
(t[0] === r || n.contains(t[0], r)) && n(r).focus(),
(u = t.parent()),
t.css("position") === "static"
? (u.css({ position: "relative" }),
t.css({ position: "relative" }))
: (n.extend(i, {
position: t.css("position"),
zIndex: t.css("z-index"),
}),
n.each(["top", "left", "bottom", "right"], function (n, r) {
i[r] = t.css(r);
isNaN(parseInt(i[r], 10)) && (i[r] = "auto");
}),
t.css({
position: "relative",
top: 0,
left: 0,
right: "auto",
bottom: "auto",
})),
t.css(f),
u.css(i).show()
);
},
removeWrapper: function (t) {
var i = document.activeElement;
return (
t.parent().is(".ui-effects-wrapper") &&
(t.parent().replaceWith(t),
(t[0] === i || n.contains(t[0], i)) && n(i).focus()),
t
);
},
setTransition: function (t, i, r, u) {
return (
(u = u || {}),
n.each(i, function (n, i) {
var f = t.cssUnit(i);
f[0] > 0 && (u[i] = f[0] * r + f[1]);
}),
u
);
},
});
n.fn.extend({
effect: function () {
function e(i) {
function o() {
n.isFunction(e) && e.call(r[0]);
n.isFunction(i) && i();
}
var r = n(this),
e = t.complete,
u = t.mode;
(r.is(":hidden") ? u === "hide" : u === "show")
? (r[u](), o())
: f.call(r[0], t, o);
}
var t = r.apply(this, arguments),
i = t.mode,
u = t.queue,
f = n.effects.effect[t.effect];
return n.fx.off || !f
? i
? this[i](t.duration, t.complete)
: this.each(function () {
t.complete && t.complete.call(this);
})
: u === !1
? this.each(e)
: this.queue(u || "fx", e);
},
show: (function (n) {
return function (t) {
if (u(t)) return n.apply(this, arguments);
var i = r.apply(this, arguments);
return (i.mode = "show"), this.effect.call(this, i);
};
})(n.fn.show),
hide: (function (n) {
return function (t) {
if (u(t)) return n.apply(this, arguments);
var i = r.apply(this, arguments);
return (i.mode = "hide"), this.effect.call(this, i);
};
})(n.fn.hide),
toggle: (function (n) {
return function (t) {
if (u(t) || typeof t == "boolean")
return n.apply(this, arguments);
var i = r.apply(this, arguments);
return (i.mode = "toggle"), this.effect.call(this, i);
};
})(n.fn.toggle),
cssUnit: function (t) {
var i = this.css(t),
r = [];
return (
n.each(["em", "px", "%", "pt"], function (n, t) {
i.indexOf(t) > 0 && (r = [parseFloat(i), t]);
}),
r
);
},
});
})(),
(function () {
var t = {};
n.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (n, i) {
t[i] = function (t) {
return Math.pow(t, n + 2);
};
});
n.extend(t, {
Sine: function (n) {
return 1 - Math.cos((n * Math.PI) / 2);
},
Circ: function (n) {
return 1 - Math.sqrt(1 - n * n);
},
Elastic: function (n) {
return n === 0 || n === 1
? n
: -Math.pow(2, 8 * (n - 1)) *
Math.sin((((n - 1) * 80 - 7.5) * Math.PI) / 15);
},
Back: function (n) {
return n * n * (3 * n - 2);
},
Bounce: function (n) {
for (var t, i = 4; n < ((t = Math.pow(2, --i)) - 1) / 11; );
return (
1 / Math.pow(4, 3 - i) -
7.5625 * Math.pow((t * 3 - 2) / 22 - n, 2)
);
},
});
n.each(t, function (t, i) {
n.easing["easeIn" + t] = i;
n.easing["easeOut" + t] = function (n) {
return 1 - i(1 - n);
};
n.easing["easeInOut" + t] = function (n) {
return n < 0.5 ? i(n * 2) / 2 : 1 - i(n * -2 + 2) / 2;
};
});
})();
})(jQuery),
(function (n) {
var t = /up|down|vertical/,
i = /up|left|vertical|horizontal/;
n.effects.effect.blind = function (r, u) {
var f = n(this),
c = ["position", "top", "bottom", "left", "right", "height", "width"],
p = n.effects.setMode(f, r.mode || "hide"),
w = r.direction || "up",
o = t.test(w),
l = o ? "height" : "width",
a = o ? "top" : "left",
b = i.test(w),
v = {},
y = p === "show",
e,
s,
h;
f.parent().is(".ui-effects-wrapper")
? n.effects.save(f.parent(), c)
: n.effects.save(f, c);
f.show();
e = n.effects.createWrapper(f).css({ overflow: "hidden" });
s = e[l]();
h = parseFloat(e.css(a)) || 0;
v[l] = y ? s : 0;
b ||
(f
.css(o ? "bottom" : "right", 0)
.css(o ? "top" : "left", "auto")
.css({ position: "absolute" }),
(v[a] = y ? h : s + h));
y && (e.css(l, 0), b || e.css(a, h + s));
e.animate(v, {
duration: r.duration,
easing: r.easing,
queue: !1,
complete: function () {
p === "hide" && f.hide();
n.effects.restore(f, c);
n.effects.removeWrapper(f);
u();
},
});
};
})(jQuery),
(function (n) {
n.effects.effect.highlight = function (t, i) {
var r = n(this),
u = ["backgroundImage", "backgroundColor", "opacity"],
f = n.effects.setMode(r, t.mode || "show"),
e = { backgroundColor: r.css("backgroundColor") };
f === "hide" && (e.opacity = 0);
n.effects.save(r, u);
r.show()
.css({ backgroundImage: "none", backgroundColor: t.color || "#ffff99" })
.animate(e, {
queue: !1,
duration: t.duration,
easing: t.easing,
complete: function () {
f === "hide" && r.hide();
n.effects.restore(r, u);
i();
},
});
};
})(jQuery),
(function (n) {
n.widget("ui.tagit", {
options: {
allowDuplicates: !1,
caseSensitive: !0,
fieldName: "tags",
placeholderText: null,
readOnly: !1,
removeConfirmation: !1,
tagLimit: null,
availableTags: [],
autocomplete: {},
showAutocompleteOnFocus: !1,
allowSpaces: !1,
singleField: !1,
singleFieldDelimiter: ",",
singleFieldNode: null,
animate: !0,
tabIndex: null,
beforeTagAdded: null,
afterTagAdded: null,
beforeTagRemoved: null,
afterTagRemoved: null,
onTagClicked: null,
onTagLimitExceeded: null,
onTagAdded: null,
onTagRemoved: null,
tagSource: null,
},
_create: function () {
var t = this,
r,
u,
f,
i;
this.element.is("input")
? ((this.tagList = n("").insertAfter(this.element)),
(this.options.singleField = !0),
(this.options.singleFieldNode = this.element),
this.element.addClass("tagit-hidden-field"))
: (this.tagList = this.element.find("ul, ol").andSelf().last());
this.tagInput = n('').addClass(
"ui-widget-content"
);
this.options.readOnly && this.tagInput.attr("disabled", "disabled");
this.options.tabIndex &&
this.tagInput.attr("tabindex", this.options.tabIndex);
this.options.placeholderText &&
this.tagInput.attr("placeholder", this.options.placeholderText);
this.options.autocomplete.source ||
(this.options.autocomplete.source = function (t, i) {
var u = t.term.toLowerCase(),
r = n.grep(this.options.availableTags, function (n) {
return n.toLowerCase().indexOf(u) === 0;
});
this.options.allowDuplicates ||
(r = this._subtractArray(r, this.assignedTags()));
i(r);
});
this.options.showAutocompleteOnFocus &&
(this.tagInput.focus(function () {
t._showAutocomplete();
}),
typeof this.options.autocomplete.minLength == "undefined" &&
(this.options.autocomplete.minLength = 0));
n.isFunction(this.options.autocomplete.source) &&
(this.options.autocomplete.source = n.proxy(
this.options.autocomplete.source,
this
));
n.isFunction(this.options.tagSource) &&
(this.options.tagSource = n.proxy(this.options.tagSource, this));
this.tagList
.addClass("tagit")
.addClass("ui-widget ui-widget-content ui-corner-all")
.append(n('').append(this.tagInput))
.click(function (i) {
var u = n(i.target),
r;
u.hasClass("tagit-label")
? ((r = u.closest(".tagit-choice")),
r.hasClass("removed") ||
t._trigger("onTagClicked", i, {
tag: r,
tagLabel: t.tagLabel(r),
}))
: t.tagInput.focus();
});
r = !1;
this.options.singleField &&
(this.options.singleFieldNode
? ((u = n(this.options.singleFieldNode)),
(f = u.val().split(this.options.singleFieldDelimiter)),
u.val(""),
n.each(f, function (n, i) {
t.createTag(i, null, !0);
r = !0;
}))
: ((this.options.singleFieldNode = n(
''
)),
this.tagList.after(this.options.singleFieldNode)));
r ||
this.tagList.children("li").each(function () {
n(this).hasClass("tagit-new") ||
(t.createTag(n(this).text(), n(this).attr("class"), !0),
n(this).remove());
});
this.tagInput
.keydown(function (i) {
if (i.which == n.ui.keyCode.BACKSPACE && t.tagInput.val() === "") {
var r = t._lastTag();
!t.options.removeConfirmation || r.hasClass("remove")
? t.removeTag(r)
: t.options.removeConfirmation &&
r.addClass("remove ui-state-highlight");
} else t.options.removeConfirmation && t._lastTag().removeClass("remove ui-state-highlight");
((i.which === n.ui.keyCode.COMMA && i.shiftKey === !1) ||
i.which === n.ui.keyCode.ENTER ||
(i.which == n.ui.keyCode.TAB && t.tagInput.val() !== "") ||
(i.which == n.ui.keyCode.SPACE &&
t.options.allowSpaces !== !0 &&
(n.trim(t.tagInput.val()).replace(/^s*/, "").charAt(0) != '"' ||
(n.trim(t.tagInput.val()).charAt(0) == '"' &&
n
.trim(t.tagInput.val())
.charAt(n.trim(t.tagInput.val()).length - 1) == '"' &&
n.trim(t.tagInput.val()).length - 1 != 0)))) &&
((i.which === n.ui.keyCode.ENTER && t.tagInput.val() === "") ||
i.preventDefault(),
(t.options.autocomplete.autoFocus &&
t.tagInput.data("autocomplete-open")) ||
(t.tagInput.autocomplete("close"),
t.createTag(t._cleanedInput())));
})
.blur(function () {
t.tagInput.data("autocomplete-open") ||
t.createTag(t._cleanedInput());
});
(this.options.availableTags ||
this.options.tagSource ||
this.options.autocomplete.source) &&
((i = {
select: function (n, i) {
return t.createTag(i.item.value), !1;
},
}),
n.extend(i, this.options.autocomplete),
(i.source = this.options.tagSource || i.source),
this.tagInput
.autocomplete(i)
.bind("autocompleteopen.tagit", function () {
t.tagInput.data("autocomplete-open", !0);
})
.bind("autocompleteclose.tagit", function () {
t.tagInput.data("autocomplete-open", !1);
}),
this.tagInput.autocomplete("widget").addClass("tagit-autocomplete"));
},
destroy: function () {
return (
n.Widget.prototype.destroy.call(this),
this.element.unbind(".tagit"),
this.tagList.unbind(".tagit"),
this.tagInput.removeData("autocomplete-open"),
this.tagList.removeClass(
"tagit ui-widget ui-widget-content ui-corner-all tagit-hidden-field"
),
this.element.is("input")
? (this.element.removeClass("tagit-hidden-field"),
this.tagList.remove())
: (this.element.children("li").each(function () {
n(this).hasClass("tagit-new")
? n(this).remove()
: (n(this).removeClass(
"tagit-choice ui-widget-content ui-state-default ui-state-highlight ui-corner-all remove tagit-choice-editable tagit-choice-read-only"
),
n(this).text(n(this).children(".tagit-label").text()));
}),
this.singleFieldNode && this.singleFieldNode.remove()),
this
);
},
_cleanedInput: function () {
return n.trim(this.tagInput.val().replace(/^"(.*)"$/, "$1"));
},
_lastTag: function () {
return this.tagList.find(".tagit-choice:last:not(.removed)");
},
_tags: function () {
return this.tagList.find(".tagit-choice:not(.removed)");
},
assignedTags: function () {
var i = this,
t = [];
return (
this.options.singleField
? ((t = n(this.options.singleFieldNode)
.val()
.split(this.options.singleFieldDelimiter)),
t[0] === "" && (t = []))
: this._tags().each(function () {
t.push(i.tagLabel(this));
}),
t
);
},
_updateSingleTagsField: function (t) {
n(this.options.singleFieldNode)
.val(t.join(this.options.singleFieldDelimiter))
.trigger("change");
},
_subtractArray: function (t, i) {
for (var u = [], r = 0; r < t.length; r++)
n.inArray(t[r], i) == -1 && u.push(t[r]);
return u;
},
tagLabel: function (t) {
return this.options.singleField
? n(t).find(".tagit-label:first").text()
: n(t).find("input:first").val();
},
_showAutocomplete: function () {
this.tagInput.autocomplete("search", "");
},
_findTagByLabel: function (t) {
var i = this,
r = null;
return (
this._tags().each(function () {
if (i._formatStr(t) == i._formatStr(i.tagLabel(this)))
return (r = n(this)), !1;
}),
r
);
},
_isNew: function (n) {
return !this._findTagByLabel(n);
},
_formatStr: function (t) {
return this.options.caseSensitive ? t : n.trim(t.toLowerCase());
},
_effectExists: function (t) {
return Boolean(
n.effects &&
(n.effects[t] || (n.effects.effect && n.effects.effect[t]))
);
},
createTag: function (t, i, r) {
var s = this,
f,
e,
u,
h,
c,
l,
o;
if (
((t = n.trim(t)),
this.options.preprocessTag && (t = this.options.preprocessTag(t)),
t === "")
)
return !1;
if (!this.options.allowDuplicates && !this._isNew(t))
return (
(f = this._findTagByLabel(t)),
this._trigger("onTagExists", null, {
existingTag: f,
duringInitialization: r,
}) !== !1 &&
this._effectExists("highlight") &&
f.effect("highlight"),
!1
);
if (
this.options.tagLimit &&
this._tags().length >= this.options.tagLimit
)
return (
this._trigger("onTagLimitExceeded", null, {
duringInitialization: r,
}),
!1
);
((e = n(
this.options.onTagClicked
? ''
: ''
).text(t)),
(u = n("")
.addClass(
"tagit-choice ui-widget-content ui-state-default ui-corner-all"
)
.addClass(i)
.append(e)),
this.options.readOnly
? u.addClass("tagit-choice-read-only")
: (u.addClass("tagit-choice-editable"),
(h = n("").addClass("ui-icon ui-icon-close")),
(c = n('×')
.addClass("tagit-close")
.append(h)
.click(function () {
s.removeTag(u);
})),
u.append(c)),
this.options.singleField ||
((l = e.html()),
u.append(
''
)),
this._trigger("beforeTagAdded", null, {
tag: u,
tagLabel: this.tagLabel(u),
duringInitialization: r,
}) !== !1) &&
(this.options.singleField &&
((o = this.assignedTags()),
o.push(t),
this._updateSingleTagsField(o)),
this._trigger("onTagAdded", null, u),
this.tagInput.val(""),
this.tagInput
.parent()
.before(u.wrap('').parent()),
this._trigger("afterTagAdded", null, {
tag: u,
tagLabel: this.tagLabel(u),
duringInitialization: r,
}),
this.options.showAutocompleteOnFocus &&
!r &&
setTimeout(function () {
s._showAutocomplete();
}, 0));
},
removeTag: function (t, i) {
var r, e, u, f;
((i = typeof i == "undefined" ? this.options.animate : i),
(t = n(t)),
this._trigger("onTagRemoved", null, t),
this._trigger("beforeTagRemoved", null, {
tag: t,
tagLabel: this.tagLabel(t),
}) !== !1) &&
(this.options.singleField &&
((r = this.assignedTags()),
(e = this.tagLabel(t)),
(r = n.grep(r, function (n) {
return n != e;
})),
this._updateSingleTagsField(r)),
i
? (t.addClass("removed"),
(u = this._effectExists("blind")
? ["blind", { direction: "horizontal" }, "fast"]
: ["fast"]),
(f = this),
u.push(function () {
t.remove();
f._trigger("afterTagRemoved", null, {
tag: t,
tagLabel: f.tagLabel(t),
});
}),
t.fadeOut("fast").hide.apply(t, u).dequeue())
: (t.remove(),
this._trigger("afterTagRemoved", null, {
tag: t,
tagLabel: this.tagLabel(t),
})));
},
removeTagByLabel: function (n, t) {
var i = this._findTagByLabel(n);
if (!i) throw "No such tag exists with the name '" + n + "'";
this.removeTag(i, t);
},
removeAll: function () {
var n = this;
this._tags().each(function (t, i) {
n.removeTag(i, !1);
});
},
});
})(jQuery),
(function (n) {
var i = { log: n.noop, warn: n.noop, error: n.noop },
r = "console" in window ? window.console : i,
t;
z = r;
n.fn.console = function () {
if (z && z.log)
try {
z.log.apply(z, arguments);
this.each(function () {
z.log.apply(z, arguments);
});
} catch (t) {
try {
for (var n in arguments) z.log(arguments[n]);
this.each(function (n, t) {
z.log(n, t);
});
} catch (i) {}
}
return this;
};
t = {
log: function (n) {
z && z.log && z.log(n);
},
warn: function (n) {
z && z.warn && z.warn(n);
},
error: function (n) {
z && z.error && z.error(n);
},
disable: function (n) {
z = n === !0 ? i : r;
},
};
n.console = function (n) {
return n in t && arguments.length > 1
? t[n].apply(this, Array.prototype.slice.call(arguments, 1))
: t.log.apply(this, arguments);
};
})(jQuery);