")).addClass("ui-dialog-buttonset").appendTo(g);
h.attr({
role: "dialog",
"aria-labelledby": j.attr("id")
});
m.find("*").add(m).disableSelection();
this._hoverable(f);
this._focusable(f);
if (k.draggable && d.fn.draggable) {
this._makeDraggable()
}
if (k.resizable && d.fn.resizable) {
this._makeResizable()
}
this._createButtons(k.buttons);
this._isOpen = false;
if (d.fn.bgiframe) {
h.bgiframe()
}
this._on(h, {
keydown: function(q) {
if (!k.modal || q.keyCode !== d.ui.keyCode.TAB) {
return
}
var p = d(":tabbable", h),
r = p.filter(":first"),
o = p.filter(":last");
if (q.target === o[0] && !q.shiftKey) {
r.focus(1);
return false
} else {
if (q.target === r[0] && q.shiftKey) {
o.focus(1);
return false
}
}
}
})
},
_init: function() {
if (this.options.autoOpen) {
this.open()
}
},
_destroy: function() {
var g, f = this.oldPosition;
if (this.overlay) {
this.overlay.destroy()
}
this.uiDialog.hide();
this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
this.uiDialog.remove();
if (this.originalTitle) {
this.element.attr("title", this.originalTitle)
}
g = f.parent.children().eq(f.index);
if (g.length && g[0] !== this.element[0]) {
g.before(this.element)
} else {
f.parent.append(this.element)
}
},
widget: function() {
return this.uiDialog
},
close: function(j) {
var h = this,
g, f;
if (!this._isOpen) {
return
}
if (false === this._trigger("beforeClose", j)) {
return
}
this._isOpen = false;
if (this.overlay) {
this.overlay.destroy()
}
if (this.options.hide) {
this._hide(this.uiDialog, this.options.hide, function() {
h._trigger("close", j)
})
} else {
this.uiDialog.hide();
this._trigger("close", j)
}
d.ui.dialog.overlay.resize();
if (this.options.modal) {
g = 0;
d(".ui-dialog").each(function() {
if (this !== h.uiDialog[0]) {
f = d(this).css("z-index");
if (!isNaN(f)) {
g = Math.max(g, f)
}
}
});
d.ui.dialog.maxZ = g
}
return this
},
isOpen: function() {
return this._isOpen
},
moveToTop: function(j, h) {
var g = this.options,
f;
if ((g.modal && !j) || (!g.stack && !g.modal)) {
return this._trigger("focus", h)
}
if (g.zIndex > d.ui.dialog.maxZ) {
d.ui.dialog.maxZ = g.zIndex
}
if (this.overlay) {
d.ui.dialog.maxZ += 1;
d.ui.dialog.overlay.maxZ = d.ui.dialog.maxZ;
this.overlay.$el.css("z-index", d.ui.dialog.overlay.maxZ)
}
f = {
scrollTop: this.element.scrollTop(),
scrollLeft: this.element.scrollLeft()
};
d.ui.dialog.maxZ += 1;
this.uiDialog.css("z-index", d.ui.dialog.maxZ);
this.element.attr(f);
this._trigger("focus", h);
return this
},
open: function() {
if (this._isOpen) {
return
}
var h, g = this.options,
f = this.uiDialog;
this._size();
this._position(g.position);
f.show(g.show);
this.overlay = g.modal ? new d.ui.dialog.overlay(this) : null;
this.moveToTop(true);
h = this.element.find(":tabbable");
if (!h.length) {
h = this.uiDialogButtonPane.find(":tabbable");
if (!h.length) {
h = f
}
}
h.eq(0).focus();
this._isOpen = true;
this._trigger("open");
return this
},
_createButtons: function(h) {
var g = this,
f = false;
this.uiDialogButtonPane.remove();
this.uiButtonSet.empty();
if (typeof h === "object" && h !== null) {
d.each(h, function() {
return !(f = true)
})
}
if (f) {
d.each(h, function(j, l) {
var k, m;
l = d.isFunction(l) ? {
click: l,
text: j
} : l;
l = d.extend({
type: "button"
}, l);
m = l.click;
l.click = function() {
m.apply(g.element[0], arguments)
};
k = d("
", l).appendTo(g.uiButtonSet);
if (d.fn.button) {
k.button()
}
});
this.uiDialog.addClass("ui-dialog-buttons");
this.uiDialogButtonPane.appendTo(this.uiDialog)
} else {
this.uiDialog.removeClass("ui-dialog-buttons")
}
},
_makeDraggable: function() {
var h = this,
g = this.options;
function f(j) {
return {
position: j.position,
offset: j.offset
}
}
this.uiDialog.draggable({
cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
handle: ".ui-dialog-titlebar",
containment: "document",
start: function(j, k) {
d(this).addClass("ui-dialog-dragging");
h._trigger("dragStart", j, f(k))
},
drag: function(j, k) {
h._trigger("drag", j, f(k))
},
stop: function(j, k) {
g.position = [k.position.left - h.document.scrollLeft(), k.position.top - h.document.scrollTop()];
d(this).removeClass("ui-dialog-dragging");
h._trigger("dragStop", j, f(k));
d.ui.dialog.overlay.resize()
}
})
},
_makeResizable: function(k) {
k = (k === e ? this.options.resizable : k);
var l = this,
j = this.options,
f = this.uiDialog.css("position"),
h = typeof k === "string" ? k : "n,e,s,w,se,sw,ne,nw";
function g(m) {
return {
originalPosition: m.originalPosition,
originalSize: m.originalSize,
position: m.position,
size: m.size
}
}
this.uiDialog.resizable({
cancel: ".ui-dialog-content",
containment: "document",
alsoResize: this.element,
maxWidth: j.maxWidth,
maxHeight: j.maxHeight,
minWidth: j.minWidth,
minHeight: this._minHeight(),
handles: h,
start: function(m, n) {
d(this).addClass("ui-dialog-resizing");
l._trigger("resizeStart", m, g(n))
},
resize: function(m, n) {
l._trigger("resize", m, g(n))
},
stop: function(m, n) {
d(this).removeClass("ui-dialog-resizing");
j.height = d(this).height();
j.width = d(this).width();
l._trigger("resizeStop", m, g(n));
d.ui.dialog.overlay.resize()
}
}).css("position", f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")
},
_minHeight: function() {
var f = this.options;
if (f.height === "auto") {
return f.minHeight
} else {
return Math.min(f.minHeight, f.height)
}
},
_position: function(g) {
var h = [],
j = [0, 0],
f;
if (g) {
if (typeof g === "string" || (typeof g === "object" && "0" in g)) {
h = g.split ? g.split(" ") : [g[0], g[1]];
if (h.length === 1) {
h[1] = h[0]
}
d.each(["left", "top"], function(l, k) {
if (+h[l] === h[l]) {
j[l] = h[l];
h[l] = k
}
});
g = {
my: h[0] + (j[0] < 0 ? j[0] : "+" + j[0]) + " " + h[1] + (j[1] < 0 ? j[1] : "+" + j[1]),
at: h.join(" ")
}
}
g = d.extend({}, d.ui.dialog.prototype.options.position, g)
} else {
g = d.ui.dialog.prototype.options.position
}
f = this.uiDialog.is(":visible");
if (!f) {
this.uiDialog.show()
}
this.uiDialog.position(g);
if (!f) {
this.uiDialog.hide()
}
},
_setOptions: function(h) {
var j = this,
f = {},
g = false;
d.each(h, function(k, l) {
j._setOption(k, l);
if (k in a) {
g = true
}
if (k in c) {
f[k] = l
}
});
if (g) {
this._size()
}
if (this.uiDialog.is(":data(resizable)")) {
this.uiDialog.resizable("option", f)
}
},
_setOption: function(j, k) {
var h, l, g = this.uiDialog;
switch (j) {
case "buttons":
this._createButtons(k);
break;
case "closeText":
this.uiDialogTitlebarCloseText.text("" + k);
break;
case "dialogClass":
g.removeClass(this.options.dialogClass).addClass(b + k);
break;
case "disabled":
if (k) {
g.addClass("ui-dialog-disabled")
} else {
g.removeClass("ui-dialog-disabled")
}
break;
case "draggable":
h = g.is(":data(draggable)");
if (h && !k) {
g.draggable("destroy")
}
if (!h && k) {
this._makeDraggable()
}
break;
case "position":
this._position(k);
break;
case "resizable":
l = g.is(":data(resizable)");
if (l && !k) {
g.resizable("destroy")
}
if (l && typeof k === "string") {
g.resizable("option", "handles", k)
}
if (!l && k !== false) {
this._makeResizable(k)
}
break;
case "title":
var f = this.uiDialogTitlebar.find(".ui-dialog-title");
if (!k) {
f.html(" ")
} else {
f.text(k)
}
break
}
this._super(j, k)
},
_size: function() {
var g, k, j, h = this.options,
f = this.uiDialog.is(":visible");
this.element.show().css({
width: "auto",
minHeight: 0,
height: 0
});
if (h.minWidth > h.width) {
h.width = h.minWidth
}
g = this.uiDialog.css({
height: "auto",
width: h.width
}).outerHeight();
k = Math.max(0, h.minHeight - g);
if (h.height === "auto") {
if (d.support.minHeight) {
this.element.css({
minHeight: k,
height: "auto"
})
} else {
this.uiDialog.show();
j = this.element.css("height", "auto").height();
if (!f) {
this.uiDialog.hide()
}
this.element.height(Math.max(j, k))
}
} else {
this.element.height(Math.max(h.height - g, 0))
}
if (this.uiDialog.is(":data(resizable)")) {
this.uiDialog.resizable("option", "minHeight", this._minHeight())
}
}
});
d.extend(d.ui.dialog, {
uuid: 0,
maxZ: 0,
getTitleId: function(f) {
var g = f.attr("id");
if (!g) {
this.uuid += 1;
g = this.uuid
}
return "ui-dialog-title-" + g
},
overlay: function(f) {
this.$el = d.ui.dialog.overlay.create(f)
}
});
d.extend(d.ui.dialog.overlay, {
instances: [],
oldInstances: [],
maxZ: 0,
events: d.map("focus,mousedown,mouseup,keydown,keypress,click".split(","), function(f) {
return f + ".dialog-overlay"
}).join(" "),
create: function(g) {
if (this.instances.length === 0) {
setTimeout(function() {
if (d.ui.dialog.overlay.instances.length) {
d(document).bind(d.ui.dialog.overlay.events, function(h) {
if (d(h.target).zIndex() < d.ui.dialog.overlay.maxZ) {
return false
}
})
}
}, 1);
d(window).bind("resize.dialog-overlay", d.ui.dialog.overlay.resize)
}
var f = (this.oldInstances.pop() || d("
").addClass("ui-widget-overlay"));
d(document).bind("keydown.dialog-overlay", function(h) {
var j = d.ui.dialog.overlay.instances;
if (j.length !== 0 && j[j.length - 1] === f && g.options.closeOnEscape && !h.isDefaultPrevented() && h.keyCode && h.keyCode === d.ui.keyCode.ESCAPE) {
g.close(h);
h.preventDefault()
}
});
f.appendTo(document.body).css({
width: this.width(),
height: this.height()
});
if (d.fn.bgiframe) {
f.bgiframe()
}
this.instances.push(f);
return f
},
destroy: function(f) {
var g = d.inArray(f, this.instances),
h = 0;
if (g !== -1) {
this.oldInstances.push(this.instances.splice(g, 1)[0])
}
if (this.instances.length === 0) {
d([document, window]).unbind(".dialog-overlay")
}
f.height(0).width(0).remove();
d.each(this.instances, function() {
h = Math.max(h, this.css("z-index"))
});
this.maxZ = h
},
height: function() {
var g, f;
if (d.ui.ie) {
g = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
f = Math.max(document.documentElement.offsetHeight, document.body.offsetHeight);
if (g < f) {
return d(window).height() + "px"
} else {
return g + "px"
}
} else {
return d(document).height() + "px"
}
},
width: function() {
var f, g;
if (d.ui.ie) {
f = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);
g = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
if (f < g) {
return d(window).width() + "px"
} else {
return f + "px"
}
} else {
return d(document).width() + "px"
}
},
resize: function() {
var f = d([]);
d.each(d.ui.dialog.overlay.instances, function() {
f = f.add(this)
});
f.css({
width: 0,
height: 0
}).css({
width: d.ui.dialog.overlay.width(),
height: d.ui.dialog.overlay.height()
})
}
});
d.extend(d.ui.dialog.overlay.prototype, {
destroy: function() {
d.ui.dialog.overlay.destroy(this.$el)
}
})
}(jQuery));
(function(a, b) {
a.widget("ui.draggable", a.ui.mouse, {
version: "1.9.2",
widgetEventPrefix: "drag",
options: {
addClasses: true,
appendTo: "parent",
axis: false,
connectToSortable: false,
containment: false,
cursor: "auto",
cursorAt: false,
grid: false,
handle: false,
helper: "original",
iframeFix: false,
opacity: false,
refreshPositions: false,
revert: false,
revertDuration: 500,
scope: "default",
scroll: true,
scrollSensitivity: 20,
scrollSpeed: 20,
snap: false,
snapMode: "both",
snapTolerance: 20,
stack: false,
zIndex: false
},
_create: function() {
if (this.options.helper == "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {
this.element[0].style.position = "relative"
}(this.options.addClasses && this.element.addClass("ui-draggable"));
(this.options.disabled && this.element.addClass("ui-draggable-disabled"));
this._mouseInit()
},
_destroy: function() {
this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");
this._mouseDestroy()
},
_mouseCapture: function(c) {
var d = this.options;
if (this.helper || d.disabled || a(c.target).is(".ui-resizable-handle")) {
return false
}
this.handle = this._getHandle(c);
if (!this.handle) {
return false
}
a(d.iframeFix === true ? "iframe" : d.iframeFix).each(function() {
a('
').css({
width: this.offsetWidth + "px",
height: this.offsetHeight + "px",
position: "absolute",
opacity: "0.001",
zIndex: 1000
}).css(a(this).offset()).appendTo("body")
});
return true
},
_mouseStart: function(c) {
var d = this.options;
this.helper = this._createHelper(c);
this.helper.addClass("ui-draggable-dragging");
this._cacheHelperProportions();
if (a.ui.ddmanager) {
a.ui.ddmanager.current = this
}
this._cacheMargins();
this.cssPosition = this.helper.css("position");
this.scrollParent = this.helper.scrollParent();
this.offset = this.positionAbs = this.element.offset();
this.offset = {
top: this.offset.top - this.margins.top,
left: this.offset.left - this.margins.left
};
a.extend(this.offset, {
click: {
left: c.pageX - this.offset.left,
top: c.pageY - this.offset.top
},
parent: this._getParentOffset(),
relative: this._getRelativeOffset()
});
this.originalPosition = this.position = this._generatePosition(c);
this.originalPageX = c.pageX;
this.originalPageY = c.pageY;
(d.cursorAt && this._adjustOffsetFromHelper(d.cursorAt));
if (d.containment) {
this._setContainment()
}
if (this._trigger("start", c) === false) {
this._clear();
return false
}
this._cacheHelperProportions();
if (a.ui.ddmanager && !d.dropBehaviour) {
a.ui.ddmanager.prepareOffsets(this, c)
}
this._mouseDrag(c, true);
if (a.ui.ddmanager) {
a.ui.ddmanager.dragStart(this, c)
}
return true
},
_mouseDrag: function(c, e) {
this.position = this._generatePosition(c);
this.positionAbs = this._convertPositionTo("absolute");
if (!e) {
var d = this._uiHash();
if (this._trigger("drag", c, d) === false) {
this._mouseUp({});
return false
}
this.position = d.position
}
if (!this.options.axis || this.options.axis != "y") {
this.helper[0].style.left = this.position.left + "px"
}
if (!this.options.axis || this.options.axis != "x") {
this.helper[0].style.top = this.position.top + "px"
}
if (a.ui.ddmanager) {
a.ui.ddmanager.drag(this, c)
}
return false
},
_mouseStop: function(e) {
var g = false;
if (a.ui.ddmanager && !this.options.dropBehaviour) {
g = a.ui.ddmanager.drop(this, e)
}
if (this.dropped) {
g = this.dropped;
this.dropped = false
}
var c = this.element[0],
f = false;
while (c && (c = c.parentNode)) {
if (c == document) {
f = true
}
}
if (!f && this.options.helper === "original") {
return false
}
if ((this.options.revert == "invalid" && !g) || (this.options.revert == "valid" && g) || this.options.revert === true || (a.isFunction(this.options.revert) && this.options.revert.call(this.element, g))) {
var d = this;
a(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
if (d._trigger("stop", e) !== false) {
d._clear()
}
})
} else {
if (this._trigger("stop", e) !== false) {
this._clear()
}
}
return false
},
_mouseUp: function(c) {
a("div.ui-draggable-iframeFix").each(function() {
this.parentNode.removeChild(this)
});
if (a.ui.ddmanager) {
a.ui.ddmanager.dragStop(this, c)
}
return a.ui.mouse.prototype._mouseUp.call(this, c)
},
cancel: function() {
if (this.helper.is(".ui-draggable-dragging")) {
this._mouseUp({})
} else {
this._clear()
}
return this
},
_getHandle: function(c) {
var d = !this.options.handle || !a(this.options.handle, this.element).length ? true : false;
a(this.options.handle, this.element).find("*").andSelf().each(function() {
if (this == c.target) {
d = true
}
});
return d
},
_createHelper: function(d) {
var e = this.options;
var c = a.isFunction(e.helper) ? a(e.helper.apply(this.element[0], [d])) : (e.helper == "clone" ? this.element.clone().removeAttr("id") : this.element);
if (!c.parents("body").length) {
c.appendTo((e.appendTo == "parent" ? this.element[0].parentNode : e.appendTo))
}
if (c[0] != this.element[0] && !(/(fixed|absolute)/).test(c.css("position"))) {
c.css("position", "absolute")
}
return c
},
_adjustOffsetFromHelper: function(c) {
if (typeof c == "string") {
c = c.split(" ")
}
if (a.isArray(c)) {
c = {
left: +c[0],
top: +c[1] || 0
}
}
if ("left" in c) {
this.offset.click.left = c.left + this.margins.left
}
if ("right" in c) {
this.offset.click.left = this.helperProportions.width - c.right + this.margins.left
}
if ("top" in c) {
this.offset.click.top = c.top + this.margins.top
}
if ("bottom" in c) {
this.offset.click.top = this.helperProportions.height - c.bottom + this.margins.top
}
},
_getParentOffset: function() {
this.offsetParent = this.helper.offsetParent();
var c = this.offsetParent.offset();
if (this.cssPosition == "absolute" && this.scrollParent[0] != document && a.contains(this.scrollParent[0], this.offsetParent[0])) {
c.left += this.scrollParent.scrollLeft();
c.top += this.scrollParent.scrollTop()
}
if ((this.offsetParent[0] == document.body) || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && a.ui.ie)) {
c = {
top: 0,
left: 0
}
}
return {
top: c.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
left: c.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
}
},
_getRelativeOffset: function() {
if (this.cssPosition == "relative") {
var c = this.element.position();
return {
top: c.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
left: c.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
}
} else {
return {
top: 0,
left: 0
}
}
},
_cacheMargins: function() {
this.margins = {
left: (parseInt(this.element.css("marginLeft"), 10) || 0),
top: (parseInt(this.element.css("marginTop"), 10) || 0),
right: (parseInt(this.element.css("marginRight"), 10) || 0),
bottom: (parseInt(this.element.css("marginBottom"), 10) || 0)
}
},
_cacheHelperProportions: function() {
this.helperProportions = {
width: this.helper.outerWidth(),
height: this.helper.outerHeight()
}
},
_setContainment: function() {
var g = this.options;
if (g.containment == "parent") {
g.containment = this.helper[0].parentNode
}
if (g.containment == "document" || g.containment == "window") {
this.containment = [g.containment == "document" ? 0 : a(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, g.containment == "document" ? 0 : a(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, (g.containment == "document" ? 0 : a(window).scrollLeft()) + a(g.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (g.containment == "document" ? 0 : a(window).scrollTop()) + (a(g.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]
}
if (!(/^(document|window|parent)$/).test(g.containment) && g.containment.constructor != Array) {
var h = a(g.containment);
var e = h[0];
if (!e) {
return
}
var f = h.offset();
var d = (a(e).css("overflow") != "hidden");
this.containment = [(parseInt(a(e).css("borderLeftWidth"), 10) || 0) + (parseInt(a(e).css("paddingLeft"), 10) || 0), (parseInt(a(e).css("borderTopWidth"), 10) || 0) + (parseInt(a(e).css("paddingTop"), 10) || 0), (d ? Math.max(e.scrollWidth, e.offsetWidth) : e.offsetWidth) - (parseInt(a(e).css("borderLeftWidth"), 10) || 0) - (parseInt(a(e).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (d ? Math.max(e.scrollHeight, e.offsetHeight) : e.offsetHeight) - (parseInt(a(e).css("borderTopWidth"), 10) || 0) - (parseInt(a(e).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom];
this.relative_container = h
} else {
if (g.containment.constructor == Array) {
this.containment = g.containment
}
}
},
_convertPositionTo: function(g, j) {
if (!j) {
j = this.position
}
var e = g == "absolute" ? 1 : -1;
var f = this.options,
c = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && a.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
h = (/(html|body)/i).test(c[0].tagName);
return {
top: (j.top + this.offset.relative.top * e + this.offset.parent.top * e - ((this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (h ? 0 : c.scrollTop())) * e)),
left: (j.left + this.offset.relative.left * e + this.offset.parent.left * e - ((this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : h ? 0 : c.scrollLeft()) * e))
}
},
_generatePosition: function(d) {
var e = this.options,
m = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && a.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
j = (/(html|body)/i).test(m[0].tagName);
var h = d.pageX;
var g = d.pageY;
if (this.originalPosition) {
var c;
if (this.containment) {
if (this.relative_container) {
var l = this.relative_container.offset();
c = [this.containment[0] + l.left, this.containment[1] + l.top, this.containment[2] + l.left, this.containment[3] + l.top]
} else {
c = this.containment
}
if (d.pageX - this.offset.click.left < c[0]) {
h = c[0] + this.offset.click.left
}
if (d.pageY - this.offset.click.top < c[1]) {
g = c[1] + this.offset.click.top
}
if (d.pageX - this.offset.click.left > c[2]) {
h = c[2] + this.offset.click.left
}
if (d.pageY - this.offset.click.top > c[3]) {
g = c[3] + this.offset.click.top
}
}
if (e.grid) {
var k = e.grid[1] ? this.originalPageY + Math.round((g - this.originalPageY) / e.grid[1]) * e.grid[1] : this.originalPageY;
g = c ? (!(k - this.offset.click.top < c[1] || k - this.offset.click.top > c[3]) ? k : (!(k - this.offset.click.top < c[1]) ? k - e.grid[1] : k + e.grid[1])) : k;
var f = e.grid[0] ? this.originalPageX + Math.round((h - this.originalPageX) / e.grid[0]) * e.grid[0] : this.originalPageX;
h = c ? (!(f - this.offset.click.left < c[0] || f - this.offset.click.left > c[2]) ? f : (!(f - this.offset.click.left < c[0]) ? f - e.grid[0] : f + e.grid[0])) : f
}
}
return {
top: (g - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ((this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (j ? 0 : m.scrollTop())))),
left: (h - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ((this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : j ? 0 : m.scrollLeft())))
}
},
_clear: function() {
this.helper.removeClass("ui-draggable-dragging");
if (this.helper[0] != this.element[0] && !this.cancelHelperRemoval) {
this.helper.remove()
}
this.helper = null;
this.cancelHelperRemoval = false
},
_trigger: function(c, d, e) {
e = e || this._uiHash();
a.ui.plugin.call(this, c, [d, e]);
if (c == "drag") {
this.positionAbs = this._convertPositionTo("absolute")
}
return a.Widget.prototype._trigger.call(this, c, d, e)
},
plugins: {},
_uiHash: function(c) {
return {
helper: this.helper,
position: this.position,
originalPosition: this.originalPosition,
offset: this.positionAbs
}
}
});
a.ui.plugin.add("draggable", "connectToSortable", {
start: function(d, f) {
var e = a(this).data("draggable"),
g = e.options,
c = a.extend({}, f, {
item: e.element
});
e.sortables = [];
a(g.connectToSortable).each(function() {
var h = a.data(this, "sortable");
if (h && !h.options.disabled) {
e.sortables.push({
instance: h,
shouldRevert: h.options.revert
});
h.refreshPositions();
h._trigger("activate", d, c)
}
})
},
stop: function(d, f) {
var e = a(this).data("draggable"),
c = a.extend({}, f, {
item: e.element
});
a.each(e.sortables, function() {
if (this.instance.isOver) {
this.instance.isOver = 0;
e.cancelHelperRemoval = true;
this.instance.cancelHelperRemoval = false;
if (this.shouldRevert) {
this.instance.options.revert = true
}
this.instance._mouseStop(d);
this.instance.options.helper = this.instance.options._helper;
if (e.options.helper == "original") {
this.instance.currentItem.css({
top: "auto",
left: "auto"
})
}
} else {
this.instance.cancelHelperRemoval = false;
this.instance._trigger("deactivate", d, c)
}
})
},
drag: function(d, g) {
var f = a(this).data("draggable"),
c = this;
var e = function(k) {
var q = this.offset.click.top,
p = this.offset.click.left;
var h = this.positionAbs.top,
m = this.positionAbs.left;
var l = k.height,
n = k.width;
var r = k.top,
j = k.left;
return a.ui.isOver(h + q, m + p, r, j, l, n)
};
a.each(f.sortables, function(j) {
var h = false;
var k = this;
this.instance.positionAbs = f.positionAbs;
this.instance.helperProportions = f.helperProportions;
this.instance.offset.click = f.offset.click;
if (this.instance._intersectsWith(this.instance.containerCache)) {
h = true;
a.each(f.sortables, function() {
this.instance.positionAbs = f.positionAbs;
this.instance.helperProportions = f.helperProportions;
this.instance.offset.click = f.offset.click;
if (this != k && this.instance._intersectsWith(this.instance.containerCache) && a.ui.contains(k.instance.element[0], this.instance.element[0])) {
h = false
}
return h
})
}
if (h) {
if (!this.instance.isOver) {
this.instance.isOver = 1;
this.instance.currentItem = a(c).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item", true);
this.instance.options._helper = this.instance.options.helper;
this.instance.options.helper = function() {
return g.helper[0]
};
d.target = this.instance.currentItem[0];
this.instance._mouseCapture(d, true);
this.instance._mouseStart(d, true, true);
this.instance.offset.click.top = f.offset.click.top;
this.instance.offset.click.left = f.offset.click.left;
this.instance.offset.parent.left -= f.offset.parent.left - this.instance.offset.parent.left;
this.instance.offset.parent.top -= f.offset.parent.top - this.instance.offset.parent.top;
f._trigger("toSortable", d);
f.dropped = this.instance.element;
f.currentItem = f.element;
this.instance.fromOutside = f
}
if (this.instance.currentItem) {
this.instance._mouseDrag(d)
}
} else {
if (this.instance.isOver) {
this.instance.isOver = 0;
this.instance.cancelHelperRemoval = true;
this.instance.options.revert = false;
this.instance._trigger("out", d, this.instance._uiHash(this.instance));
this.instance._mouseStop(d, true);
this.instance.options.helper = this.instance.options._helper;
this.instance.currentItem.remove();
if (this.instance.placeholder) {
this.instance.placeholder.remove()
}
f._trigger("fromSortable", d);
f.dropped = false
}
}
})
}
});
a.ui.plugin.add("draggable", "cursor", {
start: function(d, e) {
var c = a("body"),
f = a(this).data("draggable").options;
if (c.css("cursor")) {
f._cursor = c.css("cursor")
}
c.css("cursor", f.cursor)
},
stop: function(c, d) {
var e = a(this).data("draggable").options;
if (e._cursor) {
a("body").css("cursor", e._cursor)
}
}
});
a.ui.plugin.add("draggable", "opacity", {
start: function(d, e) {
var c = a(e.helper),
f = a(this).data("draggable").options;
if (c.css("opacity")) {
f._opacity = c.css("opacity")
}
c.css("opacity", f.opacity)
},
stop: function(c, d) {
var e = a(this).data("draggable").options;
if (e._opacity) {
a(d.helper).css("opacity", e._opacity)
}
}
});
a.ui.plugin.add("draggable", "scroll", {
start: function(d, e) {
var c = a(this).data("draggable");
if (c.scrollParent[0] != document && c.scrollParent[0].tagName != "HTML") {
c.overflowOffset = c.scrollParent.offset()
}
},
drag: function(e, f) {
var d = a(this).data("draggable"),
g = d.options,
c = false;
if (d.scrollParent[0] != document && d.scrollParent[0].tagName != "HTML") {
if (!g.axis || g.axis != "x") {
if ((d.overflowOffset.top + d.scrollParent[0].offsetHeight) - e.pageY < g.scrollSensitivity) {
d.scrollParent[0].scrollTop = c = d.scrollParent[0].scrollTop + g.scrollSpeed
} else {
if (e.pageY - d.overflowOffset.top < g.scrollSensitivity) {
d.scrollParent[0].scrollTop = c = d.scrollParent[0].scrollTop - g.scrollSpeed
}
}
}
if (!g.axis || g.axis != "y") {
if ((d.overflowOffset.left + d.scrollParent[0].offsetWidth) - e.pageX < g.scrollSensitivity) {
d.scrollParent[0].scrollLeft = c = d.scrollParent[0].scrollLeft + g.scrollSpeed
} else {
if (e.pageX - d.overflowOffset.left < g.scrollSensitivity) {
d.scrollParent[0].scrollLeft = c = d.scrollParent[0].scrollLeft - g.scrollSpeed
}
}
}
} else {
if (!g.axis || g.axis != "x") {
if (e.pageY - a(document).scrollTop() < g.scrollSensitivity) {
c = a(document).scrollTop(a(document).scrollTop() - g.scrollSpeed)
} else {
if (a(window).height() - (e.pageY - a(document).scrollTop()) < g.scrollSensitivity) {
c = a(document).scrollTop(a(document).scrollTop() + g.scrollSpeed)
}
}
}
if (!g.axis || g.axis != "y") {
if (e.pageX - a(document).scrollLeft() < g.scrollSensitivity) {
c = a(document).scrollLeft(a(document).scrollLeft() - g.scrollSpeed)
} else {
if (a(window).width() - (e.pageX - a(document).scrollLeft()) < g.scrollSensitivity) {
c = a(document).scrollLeft(a(document).scrollLeft() + g.scrollSpeed)
}
}
}
}
if (c !== false && a.ui.ddmanager && !g.dropBehaviour) {
a.ui.ddmanager.prepareOffsets(d, e)
}
}
});
a.ui.plugin.add("draggable", "snap", {
start: function(d, e) {
var c = a(this).data("draggable"),
f = c.options;
c.snapElements = [];
a(f.snap.constructor != String ? (f.snap.items || ":data(draggable)") : f.snap).each(function() {
var h = a(this);
var g = h.offset();
if (this != c.element[0]) {
c.snapElements.push({
item: this,
width: h.outerWidth(),
height: h.outerHeight(),
top: g.top,
left: g.left
})
}
})
},
drag: function(v, p) {
var g = a(this).data("draggable"),
q = g.options;
var z = q.snapTolerance;
var y = p.offset.left,
x = y + g.helperProportions.width,
f = p.offset.top,
e = f + g.helperProportions.height;
for (var w = g.snapElements.length - 1; w >= 0; w--) {
var u = g.snapElements[w].left,
n = u + g.snapElements[w].width,
m = g.snapElements[w].top,
B = m + g.snapElements[w].height;
if (!((u - z < y && y < n + z && m - z < f && f < B + z) || (u - z < y && y < n + z && m - z < e && e < B + z) || (u - z < x && x < n + z && m - z < f && f < B + z) || (u - z < x && x < n + z && m - z < e && e < B + z))) {
if (g.snapElements[w].snapping) {
(g.options.snap.release && g.options.snap.release.call(g.element, v, a.extend(g._uiHash(), {
snapItem: g.snapElements[w].item
})))
}
g.snapElements[w].snapping = false;
continue
}
if (q.snapMode != "inner") {
var c = Math.abs(m - e) <= z;
var A = Math.abs(B - f) <= z;
var j = Math.abs(u - x) <= z;
var k = Math.abs(n - y) <= z;
if (c) {
p.position.top = g._convertPositionTo("relative", {
top: m - g.helperProportions.height,
left: 0
}).top - g.margins.top
}
if (A) {
p.position.top = g._convertPositionTo("relative", {
top: B,
left: 0
}).top - g.margins.top
}
if (j) {
p.position.left = g._convertPositionTo("relative", {
top: 0,
left: u - g.helperProportions.width
}).left - g.margins.left
}
if (k) {
p.position.left = g._convertPositionTo("relative", {
top: 0,
left: n
}).left - g.margins.left
}
}
var h = (c || A || j || k);
if (q.snapMode != "outer") {
var c = Math.abs(m - f) <= z;
var A = Math.abs(B - e) <= z;
var j = Math.abs(u - y) <= z;
var k = Math.abs(n - x) <= z;
if (c) {
p.position.top = g._convertPositionTo("relative", {
top: m,
left: 0
}).top - g.margins.top
}
if (A) {
p.position.top = g._convertPositionTo("relative", {
top: B - g.helperProportions.height,
left: 0
}).top - g.margins.top
}
if (j) {
p.position.left = g._convertPositionTo("relative", {
top: 0,
left: u
}).left - g.margins.left
}
if (k) {
p.position.left = g._convertPositionTo("relative", {
top: 0,
left: n - g.helperProportions.width
}).left - g.margins.left
}
}
if (!g.snapElements[w].snapping && (c || A || j || k || h)) {
(g.options.snap.snap && g.options.snap.snap.call(g.element, v, a.extend(g._uiHash(), {
snapItem: g.snapElements[w].item
})))
}
g.snapElements[w].snapping = (c || A || j || k || h)
}
}
});
a.ui.plugin.add("draggable", "stack", {
start: function(d, e) {
var g = a(this).data("draggable").options;
var f = a.makeArray(a(g.stack)).sort(function(j, h) {
return (parseInt(a(j).css("zIndex"), 10) || 0) - (parseInt(a(h).css("zIndex"), 10) || 0)
});
if (!f.length) {
return
}
var c = parseInt(f[0].style.zIndex) || 0;
a(f).each(function(h) {
this.style.zIndex = c + h
});
this[0].style.zIndex = c + f.length
}
});
a.ui.plugin.add("draggable", "zIndex", {
start: function(d, e) {
var c = a(e.helper),
f = a(this).data("draggable").options;
if (c.css("zIndex")) {
f._zIndex = c.css("zIndex")
}
c.css("zIndex", f.zIndex)
},
stop: function(c, d) {
var e = a(this).data("draggable").options;
if (e._zIndex) {
a(d.helper).css("zIndex", e._zIndex)
}
}
})
})(jQuery);
(function(a, b) {
a.widget("ui.droppable", {
version: "1.9.2",
widgetEventPrefix: "drop",
options: {
accept: "*",
activeClass: false,
addClasses: true,
greedy: false,
hoverClass: false,
scope: "default",
tolerance: "intersect"
},
_create: function() {
var d = this.options,
c = d.accept;
this.isover = 0;
this.isout = 1;
this.accept = a.isFunction(c) ? c : function(e) {
return e.is(c)
};
this.proportions = {
width: this.element[0].offsetWidth,
height: this.element[0].offsetHeight
};
a.ui.ddmanager.droppables[d.scope] = a.ui.ddmanager.droppables[d.scope] || [];
a.ui.ddmanager.droppables[d.scope].push(this);
(d.addClasses && this.element.addClass("ui-droppable"))
},
_destroy: function() {
var c = a.ui.ddmanager.droppables[this.options.scope];
for (var d = 0; d < c.length; d++) {
if (c[d] == this) {
c.splice(d, 1)
}
}
this.element.removeClass("ui-droppable ui-droppable-disabled")
},
_setOption: function(c, d) {
if (c == "accept") {
this.accept = a.isFunction(d) ? d : function(e) {
return e.is(d)
}
}
a.Widget.prototype._setOption.apply(this, arguments)
},
_activate: function(d) {
var c = a.ui.ddmanager.current;
if (this.options.activeClass) {
this.element.addClass(this.options.activeClass)
}(c && this._trigger("activate", d, this.ui(c)))
},
_deactivate: function(d) {
var c = a.ui.ddmanager.current;
if (this.options.activeClass) {
this.element.removeClass(this.options.activeClass)
}(c && this._trigger("deactivate", d, this.ui(c)))
},
_over: function(d) {
var c = a.ui.ddmanager.current;
if (!c || (c.currentItem || c.element)[0] == this.element[0]) {
return
}
if (this.accept.call(this.element[0], (c.currentItem || c.element))) {
if (this.options.hoverClass) {
this.element.addClass(this.options.hoverClass)
}
this._trigger("over", d, this.ui(c))
}
},
_out: function(d) {
var c = a.ui.ddmanager.current;
if (!c || (c.currentItem || c.element)[0] == this.element[0]) {
return
}
if (this.accept.call(this.element[0], (c.currentItem || c.element))) {
if (this.options.hoverClass) {
this.element.removeClass(this.options.hoverClass)
}
this._trigger("out", d, this.ui(c))
}
},
_drop: function(d, e) {
var c = e || a.ui.ddmanager.current;
if (!c || (c.currentItem || c.element)[0] == this.element[0]) {
return false
}
var f = false;
this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {
var g = a.data(this, "droppable");
if (g.options.greedy && !g.options.disabled && g.options.scope == c.options.scope && g.accept.call(g.element[0], (c.currentItem || c.element)) && a.ui.intersect(c, a.extend(g, {
offset: g.element.offset()
}), g.options.tolerance)) {
f = true;
return false
}
});
if (f) {
return false
}
if (this.accept.call(this.element[0], (c.currentItem || c.element))) {
if (this.options.activeClass) {
this.element.removeClass(this.options.activeClass)
}
if (this.options.hoverClass) {
this.element.removeClass(this.options.hoverClass)
}
this._trigger("drop", d, this.ui(c));
return this.element
}
return false
},
ui: function(d) {
return {
draggable: (d.currentItem || d.element),
helper: d.helper,
position: d.position,
offset: d.positionAbs
}
}
});
a.ui.intersect = function(u, k, p) {
if (!k.offset) {
return false
}
var e = (u.positionAbs || u.position.absolute).left,
d = e + u.helperProportions.width,
o = (u.positionAbs || u.position.absolute).top,
n = o + u.helperProportions.height;
var g = k.offset.left,
c = g + k.proportions.width,
q = k.offset.top,
m = q + k.proportions.height;
switch (p) {
case "fit":
return (g <= e && d <= c && q <= o && n <= m);
break;
case "intersect":
return (g < e + (u.helperProportions.width / 2) && d - (u.helperProportions.width / 2) < c && q < o + (u.helperProportions.height / 2) && n - (u.helperProportions.height / 2) < m);
break;
case "pointer":
var h = ((u.positionAbs || u.position.absolute).left + (u.clickOffset || u.offset.click).left),
j = ((u.positionAbs || u.position.absolute).top + (u.clickOffset || u.offset.click).top),
f = a.ui.isOver(j, h, q, g, k.proportions.height, k.proportions.width);
return f;
break;
case "touch":
return ((o >= q && o <= m) || (n >= q && n <= m) || (o < q && n > m)) && ((e >= g && e <= c) || (d >= g && d <= c) || (e < g && d > c));
break;
default:
return false;
break
}
};
a.ui.ddmanager = {
current: null,
droppables: {
"default": []
},
prepareOffsets: function(f, h) {
var c = a.ui.ddmanager.droppables[f.options.scope] || [];
var g = h ? h.type : null;
var k = (f.currentItem || f.element).find(":data(droppable)").andSelf();
droppablesLoop: for (var e = 0; e < c.length; e++) {
if (c[e].options.disabled || (f && !c[e].accept.call(c[e].element[0], (f.currentItem || f.element)))) {
continue
}
for (var d = 0; d < k.length; d++) {
if (k[d] == c[e].element[0]) {
c[e].proportions.height = 0;
continue droppablesLoop
}
}
c[e].visible = c[e].element.css("display") != "none";
if (!c[e].visible) {
continue
}
if (g == "mousedown") {
c[e]._activate.call(c[e], h)
}
c[e].offset = c[e].element.offset();
c[e].proportions = {
width: c[e].element[0].offsetWidth,
height: c[e].element[0].offsetHeight
}
}
},
drop: function(c, d) {
var e = false;
a.each(a.ui.ddmanager.droppables[c.options.scope] || [], function() {
if (!this.options) {
return
}
if (!this.options.disabled && this.visible && a.ui.intersect(c, this, this.options.tolerance)) {
e = this._drop.call(this, d) || e
}
if (!this.options.disabled && this.visible && this.accept.call(this.element[0], (c.currentItem || c.element))) {
this.isout = 1;
this.isover = 0;
this._deactivate.call(this, d)
}
});
return e
},
dragStart: function(c, d) {
c.element.parentsUntil("body").bind("scroll.droppable", function() {
if (!c.options.refreshPositions) {
a.ui.ddmanager.prepareOffsets(c, d)
}
})
},
drag: function(c, d) {
if (c.options.refreshPositions) {
a.ui.ddmanager.prepareOffsets(c, d)
}
a.each(a.ui.ddmanager.droppables[c.options.scope] || [], function() {
if (this.options.disabled || this.greedyChild || !this.visible) {
return
}
var g = a.ui.intersect(c, this, this.options.tolerance);
var j = !g && this.isover == 1 ? "isout" : (g && this.isover == 0 ? "isover" : null);
if (!j) {
return
}
var h;
if (this.options.greedy) {
var f = this.options.scope;
var e = this.element.parents(":data(droppable)").filter(function() {
return a.data(this, "droppable").options.scope === f
});
if (e.length) {
h = a.data(e[0], "droppable");
h.greedyChild = (j == "isover" ? 1 : 0)
}
}
if (h && j == "isover") {
h.isover = 0;
h.isout = 1;
h._out.call(h, d)
}
this[j] = 1;
this[j == "isout" ? "isover" : "isout"] = 0;
this[j == "isover" ? "_over" : "_out"].call(this, d);
if (h && j == "isout") {
h.isout = 0;
h.isover = 1;
h._over.call(h, d)
}
})
},
dragStop: function(c, d) {
c.element.parentsUntil("body").unbind("scroll.droppable");
if (!c.options.refreshPositions) {
a.ui.ddmanager.prepareOffsets(c, d)
}
}
}
})(jQuery);
(jQuery.effects || (function(b, d) {
var a = b.uiBackCompat !== false,
c = "ui-effects-";
b.effects = {
effect: {}
};
/*!
* jQuery Color Animations v2.0.0
* http://jquery.com/
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* Date: Mon Aug 13 13:41:02 2012 -0500
*/
(function(u, h) {
var p = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),
m = /^([\-+])=\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(v) {
return [v[1], v[2], v[3], v[4]]
}
}, {
re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
parse: function(v) {
return [v[1] * 2.55, v[2] * 2.55, v[3] * 2.55, v[4]]
}
}, {
re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
parse: function(v) {
return [parseInt(v[1], 16), parseInt(v[2], 16), parseInt(v[3], 16)]
}
}, {
re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
parse: function(v) {
return [parseInt(v[1] + v[1], 16), parseInt(v[2] + v[2], 16), parseInt(v[3] + v[3], 16)]
}
}, {
re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
space: "hsla",
parse: function(v) {
return [v[1], v[2] / 100, v[3] / 100, v[4]]
}
}],
j = u.Color = function(w, x, v, y) {
return new u.Color.fn.parse(w, x, v, y)
},
o = {
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"
}
}
}
},
t = {
"byte": {
floor: true,
max: 255
},
percent: {
max: 1
},
degrees: {
mod: 360,
floor: true
}
},
r = j.support = {},
f = u("
")[0],
e, q = u.each;
f.style.cssText = "background-color:rgba(1,1,1,.5)";
r.rgba = f.style.backgroundColor.indexOf("rgba") > -1;
q(o, function(v, w) {
w.cache = "_" + v;
w.props.alpha = {
idx: 3,
type: "percent",
def: 1
}
});
function n(w, y, x) {
var v = t[y.type] || {};
if (w == null) {
return (x || !y.def) ? null : y.def
}
w = v.floor ? ~~w : parseFloat(w);
if (isNaN(w)) {
return y.def
}
if (v.mod) {
return (w + v.mod) % v.mod
}
return 0 > w ? 0 : v.max < w ? v.max : w
}
function k(v) {
var x = j(),
w = x._rgba = [];
v = v.toLowerCase();
q(l, function(C, D) {
var A, B = D.re.exec(v),
z = B && D.parse(B),
y = D.space || "rgba";
if (z) {
A = x[y](z);
x[o[y].cache] = A[o[y].cache];
w = x._rgba = A._rgba;
return false
}
});
if (w.length) {
if (w.join() === "0,0,0,0") {
u.extend(w, e.transparent)
}
return x
}
return e[v]
}
j.fn = u.extend(j.prototype, {
parse: function(B, z, v, A) {
if (B === h) {
this._rgba = [null, null, null, null];
return this
}
if (B.jquery || B.nodeType) {
B = u(B).css(z);
z = h
}
var y = this,
x = u.type(B),
w = this._rgba = [];
if (z !== h) {
B = [B, z, v, A];
x = "array"
}
if (x === "string") {
return this.parse(k(B) || e._default)
}
if (x === "array") {
q(o.rgba.props, function(C, D) {
w[D.idx] = n(B[D.idx], D)
});
return this
}
if (x === "object") {
if (B instanceof j) {
q(o, function(C, D) {
if (B[D.cache]) {
y[D.cache] = B[D.cache].slice()
}
})
} else {
q(o, function(D, E) {
var C = E.cache;
q(E.props, function(F, G) {
if (!y[C] && E.to) {
if (F === "alpha" || B[F] == null) {
return
}
y[C] = E.to(y._rgba)
}
y[C][G.idx] = n(B[F], G, true)
});
if (y[C] && b.inArray(null, y[C].slice(0, 3)) < 0) {
y[C][3] = 1;
if (E.from) {
y._rgba = E.from(y[C])
}
}
})
}
return this
}
},
is: function(x) {
var v = j(x),
y = true,
w = this;
q(o, function(z, B) {
var C, A = v[B.cache];
if (A) {
C = w[B.cache] || B.to && B.to(w._rgba) || [];
q(B.props, function(D, E) {
if (A[E.idx] != null) {
y = (A[E.idx] === C[E.idx]);
return y
}
})
}
return y
});
return y
},
_space: function() {
var v = [],
w = this;
q(o, function(x, y) {
if (w[y.cache]) {
v.push(x)
}
});
return v.pop()
},
transition: function(w, C) {
var x = j(w),
y = x._space(),
z = o[y],
A = this.alpha() === 0 ? j("transparent") : this,
B = A[z.cache] || z.to(A._rgba),
v = B.slice();
x = x[z.cache];
q(z.props, function(G, I) {
var F = I.idx,
E = B[F],
D = x[F],
H = t[I.type] || {};
if (D === null) {
return
}
if (E === null) {
v[F] = D
} else {
if (H.mod) {
if (D - E > H.mod / 2) {
E += H.mod
} else {
if (E - D > H.mod / 2) {
E -= H.mod
}
}
}
v[F] = n((D - E) * C + E, I)
}
});
return this[y](v)
},
blend: function(y) {
if (this._rgba[3] === 1) {
return this
}
var x = this._rgba.slice(),
w = x.pop(),
v = j(y)._rgba;
return j(u.map(x, function(z, A) {
return (1 - w) * v[A] + w * z
}))
},
toRgbaString: function() {
var w = "rgba(",
v = u.map(this._rgba, function(x, y) {
return x == null ? (y > 2 ? 1 : 0) : x
});
if (v[3] === 1) {
v.pop();
w = "rgb("
}
return w + v.join() + ")"
},
toHslaString: function() {
var w = "hsla(",
v = u.map(this.hsla(), function(x, y) {
if (x == null) {
x = y > 2 ? 1 : 0
}
if (y && y < 3) {
x = Math.round(x * 100) + "%"
}
return x
});
if (v[3] === 1) {
v.pop();
w = "hsl("
}
return w + v.join() + ")"
},
toHexString: function(v) {
var w = this._rgba.slice(),
x = w.pop();
if (v) {
w.push(~~(x * 255))
}
return "#" + u.map(w, function(y) {
y = (y || 0).toString(16);
return y.length === 1 ? "0" + y : y
}).join("")
},
toString: function() {
return this._rgba[3] === 0 ? "transparent" : this.toRgbaString()
}
});
j.fn.parse.prototype = j.fn;
function g(x, w, v) {
v = (v + 1) % 1;
if (v * 6 < 1) {
return x + (w - x) * v * 6
}
if (v * 2 < 1) {
return w
}
if (v * 3 < 2) {
return x + (w - x) * ((2 / 3) - v) * 6
}
return x
}
o.hsla.to = function(x) {
if (x[0] == null || x[1] == null || x[2] == null) {
return [null, null, null, x[3]]
}
var v = x[0] / 255,
A = x[1] / 255,
B = x[2] / 255,
D = x[3],
C = Math.max(v, A, B),
y = Math.min(v, A, B),
E = C - y,
F = C + y,
w = F * 0.5,
z, G;
if (y === C) {
z = 0
} else {
if (v === C) {
z = (60 * (A - B) / E) + 360
} else {
if (A === C) {
z = (60 * (B - v) / E) + 120
} else {
z = (60 * (v - A) / E) + 240
}
}
}
if (w === 0 || w === 1) {
G = w
} else {
if (w <= 0.5) {
G = E / F
} else {
G = E / (2 - F)
}
}
return [Math.round(z) % 360, G, w, D == null ? 1 : D]
};
o.hsla.from = function(z) {
if (z[0] == null || z[1] == null || z[2] == null) {
return [null, null, null, z[3]]
}
var y = z[0] / 360,
x = z[1],
w = z[2],
v = z[3],
A = w <= 0.5 ? w * (1 + x) : w + x - w * x,
B = 2 * w - A;
return [Math.round(g(B, A, y + (1 / 3)) * 255), Math.round(g(B, A, y) * 255), Math.round(g(B, A, y - (1 / 3)) * 255), v]
};
q(o, function(w, y) {
var x = y.props,
v = y.cache,
A = y.to,
z = y.from;
j.fn[w] = function(F) {
if (A && !this[v]) {
this[v] = A(this._rgba)
}
if (F === h) {
return this[v].slice()
}
var C, E = u.type(F),
B = (E === "array" || E === "object") ? F : arguments,
D = this[v].slice();
q(x, function(G, I) {
var H = B[E === "object" ? G : I.idx];
if (H == null) {
H = D[I.idx]
}
D[I.idx] = n(H, I)
});
if (z) {
C = j(z(D));
C[v] = D;
return C
} else {
return j(D)
}
};
q(x, function(B, C) {
if (j.fn[B]) {
return
}
j.fn[B] = function(G) {
var I = u.type(G),
F = (B === "alpha" ? (this._hsla ? "hsla" : "rgba") : w),
E = this[F](),
H = E[C.idx],
D;
if (I === "undefined") {
return H
}
if (I === "function") {
G = G.call(this, H);
I = u.type(G)
}
if (G == null && C.empty) {
return this
}
if (I === "string") {
D = m.exec(G);
if (D) {
G = H + parseFloat(D[2]) * (D[1] === "+" ? 1 : -1)
}
}
E[C.idx] = G;
return this[F](E)
}
})
});
q(p, function(v, w) {
u.cssHooks[w] = {
set: function(B, C) {
var y, A, x = "";
if (u.type(C) !== "string" || (y = k(C))) {
C = j(y || C);
if (!r.rgba && C._rgba[3] !== 1) {
A = w === "backgroundColor" ? B.parentNode : B;
while ((x === "" || x === "transparent") && A && A.style) {
try {
x = u.css(A, "backgroundColor");
A = A.parentNode
} catch (D) {}
}
C = C.blend(x && x !== "transparent" ? x : "_default")
}
C = C.toRgbaString()
}
try {
B.style[w] = C
} catch (z) {}
}
};
u.fx.step[w] = function(x) {
if (!x.colorInit) {
x.start = j(x.elem, w);
x.end = j(x.end);
x.colorInit = true
}
u.cssHooks[w].set(x.elem, x.start.transition(x.end, x.pos))
}
});
u.cssHooks.borderColor = {
expand: function(w) {
var v = {};
q(["Top", "Right", "Bottom", "Left"], function(y, x) {
v["border" + x + "Color"] = w
});
return v
}
};
e = u.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() {
var f = ["add", "remove", "toggle"],
g = {
border: 1,
borderBottom: 1,
borderColor: 1,
borderLeft: 1,
borderRight: 1,
borderTop: 1,
borderWidth: 1,
margin: 1,
padding: 1
};
b.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function(j, k) {
b.fx.step[k] = function(l) {
if (l.end !== "none" && !l.setAttr || l.pos === 1 && !l.setAttr) {
jQuery.style(l.elem, k, l.end);
l.setAttr = true
}
}
});
function h() {
var l = this.ownerDocument.defaultView ? this.ownerDocument.defaultView.getComputedStyle(this, null) : this.currentStyle,
m = {},
k, j;
if (l && l.length && l[0] && l[l[0]]) {
j = l.length;
while (j--) {
k = l[j];
if (typeof l[k] === "string") {
m[b.camelCase(k)] = l[k]
}
}
} else {
for (k in l) {
if (typeof l[k] === "string") {
m[k] = l[k]
}
}
}
return m
}
function e(j, l) {
var n = {},
k, m;
for (k in l) {
m = l[k];
if (j[k] !== m) {
if (!g[k]) {
if (b.fx.step[k] || !isNaN(parseFloat(m))) {
n[k] = m
}
}
}
}
return n
}
b.effects.animateClass = function(j, k, n, m) {
var l = b.speed(k, n, m);
return this.queue(function() {
var q = b(this),
o = q.attr("class") || "",
p, r = l.children ? q.find("*").andSelf() : q;
r = r.map(function() {
var t = b(this);
return {
el: t,
start: h.call(this)
}
});
p = function() {
b.each(f, function(t, u) {
if (j[u]) {
q[u + "Class"](j[u])
}
})
};
p();
r = r.map(function() {
this.end = h.call(this.el[0]);
this.diff = e(this.start, this.end);
return this
});
q.attr("class", o);
r = r.map(function() {
var v = this,
t = b.Deferred(),
u = jQuery.extend({}, l, {
queue: false,
complete: function() {
t.resolve(v)
}
});
this.el.animate(this.diff, u);
return t.promise()
});
b.when.apply(b, r.get()).done(function() {
p();
b.each(arguments, function() {
var t = this.el;
b.each(this.diff, function(u) {
t.css(u, "")
})
});
l.complete.call(q[0])
})
})
};
b.fn.extend({
_addClass: b.fn.addClass,
addClass: function(k, j, m, l) {
return j ? b.effects.animateClass.call(this, {
add: k
}, j, m, l) : this._addClass(k)
},
_removeClass: b.fn.removeClass,
removeClass: function(k, j, m, l) {
return j ? b.effects.animateClass.call(this, {
remove: k
}, j, m, l) : this._removeClass(k)
},
_toggleClass: b.fn.toggleClass,
toggleClass: function(l, k, j, n, m) {
if (typeof k === "boolean" || k === d) {
if (!j) {
return this._toggleClass(l, k)
} else {
return b.effects.animateClass.call(this, (k ? {
add: l
} : {
remove: l
}), j, n, m)
}
} else {
return b.effects.animateClass.call(this, {
toggle: l
}, k, j, n)
}
},
switchClass: function(j, l, k, n, m) {
return b.effects.animateClass.call(this, {
add: l,
remove: j
}, k, n, m)
}
})
})();
(function() {
b.extend(b.effects, {
version: "1.9.2",
save: function(h, j) {
for (var g = 0; g < j.length; g++) {
if (j[g] !== null) {
h.data(c + j[g], h[0].style[j[g]])
}
}
},
restore: function(h, k) {
var j, g;
for (g = 0; g < k.length; g++) {
if (k[g] !== null) {
j = h.data(c + k[g]);
if (j === d) {
j = ""
}
h.css(k[g], j)
}
}
},
setMode: function(g, h) {
if (h === "toggle") {
h = g.is(":hidden") ? "show" : "hide"
}
return h
},
getBaseline: function(h, j) {
var k, g;
switch (h[0]) {
case "top":
k = 0;
break;
case "middle":
k = 0.5;
break;
case "bottom":
k = 1;
break;
default:
k = h[0] / j.height
}
switch (h[1]) {
case "left":
g = 0;
break;
case "center":
g = 0.5;
break;
case "right":
g = 1;
break;
default:
g = h[1] / j.width
}
return {
x: g,
y: k
}
},
createWrapper: function(h) {
if (h.parent().is(".ui-effects-wrapper")) {
return h.parent()
}
var j = {
width: h.outerWidth(true),
height: h.outerHeight(true),
"float": h.css("float")
},
m = b("
").addClass("ui-effects-wrapper").css({
fontSize: "100%",
background: "transparent",
border: "none",
margin: 0,
padding: 0
}),
g = {
width: h.width(),
height: h.height()
},
l = document.activeElement;
try {
l.id
} catch (k) {
l = document.body
}
h.wrap(m);
if (h[0] === l || b.contains(h[0], l)) {
b(l).focus()
}
m = h.parent();
if (h.css("position") === "static") {
m.css({
position: "relative"
});
h.css({
position: "relative"
})
} else {
b.extend(j, {
position: h.css("position"),
zIndex: h.css("z-index")
});
b.each(["top", "left", "bottom", "right"], function(n, o) {
j[o] = h.css(o);
if (isNaN(parseInt(j[o], 10))) {
j[o] = "auto"
}
});
h.css({
position: "relative",
top: 0,
left: 0,
right: "auto",
bottom: "auto"
})
}
h.css(g);
return m.css(j).show()
},
removeWrapper: function(g) {
var h = document.activeElement;
if (g.parent().is(".ui-effects-wrapper")) {
g.parent().replaceWith(g);
if (g[0] === h || b.contains(g[0], h)) {
b(h).focus()
}
}
return g
},
setTransition: function(h, k, g, j) {
j = j || {};
b.each(k, function(m, l) {
var n = h.cssUnit(l);
if (n[0] > 0) {
j[l] = n[0] * g + n[1]
}
});
return j
}
});
function e(h, g, j, k) {
if (b.isPlainObject(h)) {
g = h;
h = h.effect
}
h = {
effect: h
};
if (g == null) {
g = {}
}
if (b.isFunction(g)) {
k = g;
j = null;
g = {}
}
if (typeof g === "number" || b.fx.speeds[g]) {
k = j;
j = g;
g = {}
}
if (b.isFunction(j)) {
k = j;
j = null
}
if (g) {
b.extend(h, g)
}
j = j || g.duration;
h.duration = b.fx.off ? 0 : typeof j === "number" ? j : j in b.fx.speeds ? b.fx.speeds[j] : b.fx.speeds._default;
h.complete = k || g.complete;
return h
}
function f(g) {
if (!g || typeof g === "number" || b.fx.speeds[g]) {
return true
}
if (typeof g === "string" && !b.effects.effect[g]) {
if (a && b.effects[g]) {
return false
}
return true
}
return false
}
b.fn.extend({
effect: function() {
var j = e.apply(this, arguments),
m = j.mode,
g = j.queue,
h = b.effects.effect[j.effect],
k = !h && a && b.effects[j.effect];
if (b.fx.off || !(h || k)) {
if (m) {
return this[m](j.duration, j.complete)
} else {
return this.each(function() {
if (j.complete) {
j.complete.call(this)
}
})
}
}
function l(p) {
var q = b(this),
o = j.complete,
r = j.mode;
function n() {
if (b.isFunction(o)) {
o.call(q[0])
}
if (b.isFunction(p)) {
p()
}
}
if (q.is(":hidden") ? r === "hide" : r === "show") {
n()
} else {
h.call(q[0], j, n)
}
}
if (h) {
return g === false ? this.each(l) : this.queue(g || "fx", l)
} else {
return k.call(this, {
options: j,
duration: j.duration,
callback: j.complete,
mode: j.mode
})
}
},
_show: b.fn.show,
show: function(h) {
if (f(h)) {
return this._show.apply(this, arguments)
} else {
var g = e.apply(this, arguments);
g.mode = "show";
return this.effect.call(this, g)
}
},
_hide: b.fn.hide,
hide: function(h) {
if (f(h)) {
return this._hide.apply(this, arguments)
} else {
var g = e.apply(this, arguments);
g.mode = "hide";
return this.effect.call(this, g)
}
},
__toggle: b.fn.toggle,
toggle: function(h) {
if (f(h) || typeof h === "boolean" || b.isFunction(h)) {
return this.__toggle.apply(this, arguments)
} else {
var g = e.apply(this, arguments);
g.mode = "toggle";
return this.effect.call(this, g)
}
},
cssUnit: function(g) {
var h = this.css(g),
j = [];
b.each(["em", "px", "%", "pt"], function(k, l) {
if (h.indexOf(l) > 0) {
j = [parseFloat(h), l]
}
});
return j
}
})
})();
(function() {
var e = {};
b.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function(g, f) {
e[f] = function(h) {
return Math.pow(h, g + 2)
}
});
b.extend(e, {
Sine: function(f) {
return 1 - Math.cos(f * Math.PI / 2)
},
Circ: function(f) {
return 1 - Math.sqrt(1 - f * f)
},
Elastic: function(f) {
return f === 0 || f === 1 ? f : -Math.pow(2, 8 * (f - 1)) * Math.sin(((f - 1) * 80 - 7.5) * Math.PI / 15)
},
Back: function(f) {
return f * f * (3 * f - 2)
},
Bounce: function(h) {
var f, g = 4;
while (h < ((f = Math.pow(2, --g)) - 1) / 11) {}
return 1 / Math.pow(4, 3 - g) - 7.5625 * Math.pow((f * 3 - 2) / 22 - h, 2)
}
});
b.each(e, function(g, f) {
b.easing["easeIn" + g] = f;
b.easing["easeOut" + g] = function(h) {
return 1 - f(1 - h)
};
b.easing["easeInOut" + g] = function(h) {
return h < 0.5 ? f(h * 2) / 2 : 1 - f(h * -2 + 2) / 2
}
})
})()
})(jQuery));
(function(b, d) {
var a = /up|down|vertical/,
c = /up|left|vertical|horizontal/;
b.effects.effect.blind = function(g, n) {
var h = b(this),
r = ["position", "top", "bottom", "left", "right", "height", "width"],
p = b.effects.setMode(h, g.mode || "hide"),
t = g.direction || "up",
k = a.test(t),
j = k ? "height" : "width",
q = k ? "top" : "left",
v = c.test(t),
m = {},
u = p === "show",
f, e, l;
if (h.parent().is(".ui-effects-wrapper")) {
b.effects.save(h.parent(), r)
} else {
b.effects.save(h, r)
}
h.show();
f = b.effects.createWrapper(h).css({
overflow: "hidden"
});
e = f[j]();
l = parseFloat(f.css(q)) || 0;
m[j] = u ? e : 0;
if (!v) {
h.css(k ? "bottom" : "right", 0).css(k ? "top" : "left", "auto").css({
position: "absolute"
});
m[q] = u ? l : e + l
}
if (u) {
f.css(j, 0);
if (!v) {
f.css(q, l + e)
}
}
f.animate(m, {
duration: g.duration,
easing: g.easing,
queue: false,
complete: function() {
if (p === "hide") {
h.hide()
}
b.effects.restore(h, r);
b.effects.removeWrapper(h);
n()
}
})
}
})(jQuery);
(function(a, b) {
a.effects.effect.bounce = function(m, l) {
var c = a(this),
d = ["position", "top", "bottom", "left", "right", "height", "width"],
k = a.effects.setMode(c, m.mode || "effect"),
j = k === "hide",
w = k === "show",
x = m.direction || "up",
e = m.distance,
h = m.times || 5,
y = h * 2 + (w || j ? 1 : 0),
v = m.duration / y,
p = m.easing,
f = (x === "up" || x === "down") ? "top" : "left",
n = (x === "up" || x === "left"),
u, g, t, q = c.queue(),
r = q.length;
if (w || j) {
d.push("opacity")
}
a.effects.save(c, d);
c.show();
a.effects.createWrapper(c);
if (!e) {
e = c[f === "top" ? "outerHeight" : "outerWidth"]() / 3
}
if (w) {
t = {
opacity: 1
};
t[f] = 0;
c.css("opacity", 0).css(f, n ? -e * 2 : e * 2).animate(t, v, p)
}
if (j) {
e = e / Math.pow(2, h - 1)
}
t = {};
t[f] = 0;
for (u = 0; u < h; u++) {
g = {};
g[f] = (n ? "-=" : "+=") + e;
c.animate(g, v, p).animate(t, v, p);
e = j ? e * 2 : e / 2
}
if (j) {
g = {
opacity: 0
};
g[f] = (n ? "-=" : "+=") + e;
c.animate(g, v, p)
}
c.queue(function() {
if (j) {
c.hide()
}
a.effects.restore(c, d);
a.effects.removeWrapper(c);
l()
});
if (r > 1) {
q.splice.apply(q, [1, 0].concat(q.splice(r, y + 1)))
}
c.dequeue()
}
})(jQuery);
(function(a, b) {
a.effects.effect.clip = function(f, j) {
var g = a(this),
n = ["position", "top", "bottom", "left", "right", "height", "width"],
m = a.effects.setMode(g, f.mode || "hide"),
q = m === "show",
p = f.direction || "vertical",
l = p === "vertical",
r = l ? "height" : "width",
k = l ? "top" : "left",
h = {},
d, e, c;
a.effects.save(g, n);
g.show();
d = a.effects.createWrapper(g).css({
overflow: "hidden"
});
e = (g[0].tagName === "IMG") ? d : g;
c = e[r]();
if (q) {
e.css(r, 0);
e.css(k, c / 2)
}
h[r] = q ? c : 0;
h[k] = q ? 0 : c / 2;
e.animate(h, {
queue: false,
duration: f.duration,
easing: f.easing,
complete: function() {
if (!q) {
g.hide()
}
a.effects.restore(g, n);
a.effects.removeWrapper(g);
j()
}
})
}
})(jQuery);
(function(a, b) {
a.effects.effect.drop = function(d, h) {
var e = a(this),
k = ["position", "top", "bottom", "left", "right", "opacity", "height", "width"],
j = a.effects.setMode(e, d.mode || "hide"),
m = j === "show",
l = d.direction || "left",
f = (l === "up" || l === "down") ? "top" : "left",
n = (l === "up" || l === "left") ? "pos" : "neg",
g = {
opacity: m ? 1 : 0
},
c;
a.effects.save(e, k);
e.show();
a.effects.createWrapper(e);
c = d.distance || e[f === "top" ? "outerHeight" : "outerWidth"](true) / 2;
if (m) {
e.css("opacity", 0).css(f, n === "pos" ? -c : c)
}
g[f] = (m ? (n === "pos" ? "+=" : "-=") : (n === "pos" ? "-=" : "+=")) + c;
e.animate(g, {
queue: false,
duration: d.duration,
easing: d.easing,
complete: function() {
if (j === "hide") {
e.hide()
}
a.effects.restore(e, k);
a.effects.removeWrapper(e);
h()
}
})
}
})(jQuery);
(function(a, b) {
a.effects.effect.explode = function(t, r) {
var k = t.pieces ? Math.round(Math.sqrt(t.pieces)) : 3,
d = k,
c = a(this),
m = a.effects.setMode(c, t.mode || "hide"),
x = m === "show",
g = c.show().css("visibility", "hidden").offset(),
u = Math.ceil(c.outerWidth() / d),
q = Math.ceil(c.outerHeight() / k),
h = [],
w, v, e, p, n, l;
function y() {
h.push(this);
if (h.length === k * d) {
f()
}
}
for (w = 0; w < k; w++) {
p = g.top + w * q;
l = w - (k - 1) / 2;
for (v = 0; v < d; v++) {
e = g.left + v * u;
n = v - (d - 1) / 2;
c.clone().appendTo("body").wrap("
").css({
position: "absolute",
visibility: "visible",
left: -v * u,
top: -w * q
}).parent().addClass("ui-effects-explode").css({
position: "absolute",
overflow: "hidden",
width: u,
height: q,
left: e + (x ? n * u : 0),
top: p + (x ? l * q : 0),
opacity: x ? 0 : 1
}).animate({
left: e + (x ? 0 : n * u),
top: p + (x ? 0 : l * q),
opacity: x ? 1 : 0
}, t.duration || 500, t.easing, y)
}
}
function f() {
c.css({
visibility: "visible"
});
a(h).remove();
if (!x) {
c.hide()
}
r()
}
}
})(jQuery);
(function(a, b) {
a.effects.effect.fade = function(f, c) {
var d = a(this),
e = a.effects.setMode(d, f.mode || "toggle");
d.animate({
opacity: e
}, {
queue: false,
duration: f.duration,
easing: f.easing,
complete: c
})
}
})(jQuery);
(function(a, b) {
a.effects.effect.fold = function(e, j) {
var f = a(this),
p = ["position", "top", "bottom", "left", "right", "height", "width"],
l = a.effects.setMode(f, e.mode || "hide"),
t = l === "show",
m = l === "hide",
v = e.size || 15,
n = /([0-9]+)%/.exec(v),
u = !!e.horizFirst,
k = t !== u,
g = k ? ["width", "height"] : ["height", "width"],
h = e.duration / 2,
d, c, r = {},
q = {};
a.effects.save(f, p);
f.show();
d = a.effects.createWrapper(f).css({
overflow: "hidden"
});
c = k ? [d.width(), d.height()] : [d.height(), d.width()];
if (n) {
v = parseInt(n[1], 10) / 100 * c[m ? 0 : 1]
}
if (t) {
d.css(u ? {
height: 0,
width: v
} : {
height: v,
width: 0
})
}
r[g[0]] = t ? c[0] : v;
q[g[1]] = t ? c[1] : 0;
d.animate(r, h, e.easing).animate(q, h, e.easing, function() {
if (m) {
f.hide()
}
a.effects.restore(f, p);
a.effects.removeWrapper(f);
j()
})
}
})(jQuery);
(function(a, b) {
a.effects.effect.highlight = function(h, c) {
var e = a(this),
d = ["backgroundImage", "backgroundColor", "opacity"],
g = a.effects.setMode(e, h.mode || "show"),
f = {
backgroundColor: e.css("backgroundColor")
};
if (g === "hide") {
f.opacity = 0
}
a.effects.save(e, d);
e.show().css({
backgroundImage: "none",
backgroundColor: h.color || "#ffff99"
}).animate(f, {
queue: false,
duration: h.duration,
easing: h.easing,
complete: function() {
if (g === "hide") {
e.hide()
}
a.effects.restore(e, d);
c()
}
})
}
})(jQuery);
(function(a, b) {
a.effects.effect.pulsate = function(c, g) {
var e = a(this),
k = a.effects.setMode(e, c.mode || "show"),
p = k === "show",
l = k === "hide",
q = (p || k === "hide"),
m = ((c.times || 5) * 2) + (q ? 1 : 0),
f = c.duration / m,
n = 0,
j = e.queue(),
d = j.length,
h;
if (p || !e.is(":visible")) {
e.css("opacity", 0).show();
n = 1
}
for (h = 1; h < m; h++) {
e.animate({
opacity: n
}, f, c.easing);
n = 1 - n
}
e.animate({
opacity: n
}, f, c.easing);
e.queue(function() {
if (l) {
e.hide()
}
g()
});
if (d > 1) {
j.splice.apply(j, [1, 0].concat(j.splice(d, m + 1)))
}
e.dequeue()
}
})(jQuery);
(function(a, b) {
a.effects.effect.puff = function(k, c) {
var h = a(this),
j = a.effects.setMode(h, k.mode || "hide"),
f = j === "hide",
g = parseInt(k.percent, 10) || 150,
e = g / 100,
d = {
height: h.height(),
width: h.width(),
outerHeight: h.outerHeight(),
outerWidth: h.outerWidth()
};
a.extend(k, {
effect: "scale",
queue: false,
fade: true,
mode: j,
complete: c,
percent: f ? g : 100,
from: f ? d : {
height: d.height * e,
width: d.width * e,
outerHeight: d.outerHeight * e,
outerWidth: d.outerWidth * e
}
});
h.effect(k)
};
a.effects.effect.scale = function(c, f) {
var d = a(this),
m = a.extend(true, {}, c),
g = a.effects.setMode(d, c.mode || "effect"),
h = parseInt(c.percent, 10) || (parseInt(c.percent, 10) === 0 ? 0 : (g === "hide" ? 0 : 100)),
k = c.direction || "both",
l = c.origin,
e = {
height: d.height(),
width: d.width(),
outerHeight: d.outerHeight(),
outerWidth: d.outerWidth()
},
j = {
y: k !== "horizontal" ? (h / 100) : 1,
x: k !== "vertical" ? (h / 100) : 1
};
m.effect = "size";
m.queue = false;
m.complete = f;
if (g !== "effect") {
m.origin = l || ["middle", "center"];
m.restore = true
}
m.from = c.from || (g === "show" ? {
height: 0,
width: 0,
outerHeight: 0,
outerWidth: 0
} : e);
m.to = {
height: e.height * j.y,
width: e.width * j.x,
outerHeight: e.outerHeight * j.y,
outerWidth: e.outerWidth * j.x
};
if (m.fade) {
if (g === "show") {
m.from.opacity = 0;
m.to.opacity = 1
}
if (g === "hide") {
m.from.opacity = 1;
m.to.opacity = 0
}
}
d.effect(m)
};
a.effects.effect.size = function(m, l) {
var r, j, k, c = a(this),
q = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"],
p = ["position", "top", "bottom", "left", "right", "overflow", "opacity"],
n = ["width", "height", "overflow"],
g = ["fontSize"],
u = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"],
d = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"],
h = a.effects.setMode(c, m.mode || "effect"),
t = m.restore || h !== "effect",
x = m.scale || "both",
v = m.origin || ["middle", "center"],
w = c.css("position"),
e = t ? q : p,
f = {
height: 0,
width: 0,
outerHeight: 0,
outerWidth: 0
};
if (h === "show") {
c.show()
}
r = {
height: c.height(),
width: c.width(),
outerHeight: c.outerHeight(),
outerWidth: c.outerWidth()
};
if (m.mode === "toggle" && h === "show") {
c.from = m.to || f;
c.to = m.from || r
} else {
c.from = m.from || (h === "show" ? f : r);
c.to = m.to || (h === "hide" ? f : r)
}
k = {
from: {
y: c.from.height / r.height,
x: c.from.width / r.width
},
to: {
y: c.to.height / r.height,
x: c.to.width / r.width
}
};
if (x === "box" || x === "both") {
if (k.from.y !== k.to.y) {
e = e.concat(u);
c.from = a.effects.setTransition(c, u, k.from.y, c.from);
c.to = a.effects.setTransition(c, u, k.to.y, c.to)
}
if (k.from.x !== k.to.x) {
e = e.concat(d);
c.from = a.effects.setTransition(c, d, k.from.x, c.from);
c.to = a.effects.setTransition(c, d, k.to.x, c.to)
}
}
if (x === "content" || x === "both") {
if (k.from.y !== k.to.y) {
e = e.concat(g).concat(n);
c.from = a.effects.setTransition(c, g, k.from.y, c.from);
c.to = a.effects.setTransition(c, g, k.to.y, c.to)
}
}
a.effects.save(c, e);
c.show();
a.effects.createWrapper(c);
c.css("overflow", "hidden").css(c.from);
if (v) {
j = a.effects.getBaseline(v, r);
c.from.top = (r.outerHeight - c.outerHeight()) * j.y;
c.from.left = (r.outerWidth - c.outerWidth()) * j.x;
c.to.top = (r.outerHeight - c.to.outerHeight) * j.y;
c.to.left = (r.outerWidth - c.to.outerWidth) * j.x
}
c.css(c.from);
if (x === "content" || x === "both") {
u = u.concat(["marginTop", "marginBottom"]).concat(g);
d = d.concat(["marginLeft", "marginRight"]);
n = q.concat(u).concat(d);
c.find("*[width]").each(function() {
var y = a(this),
o = {
height: y.height(),
width: y.width(),
outerHeight: y.outerHeight(),
outerWidth: y.outerWidth()
};
if (t) {
a.effects.save(y, n)
}
y.from = {
height: o.height * k.from.y,
width: o.width * k.from.x,
outerHeight: o.outerHeight * k.from.y,
outerWidth: o.outerWidth * k.from.x
};
y.to = {
height: o.height * k.to.y,
width: o.width * k.to.x,
outerHeight: o.height * k.to.y,
outerWidth: o.width * k.to.x
};
if (k.from.y !== k.to.y) {
y.from = a.effects.setTransition(y, u, k.from.y, y.from);
y.to = a.effects.setTransition(y, u, k.to.y, y.to)
}
if (k.from.x !== k.to.x) {
y.from = a.effects.setTransition(y, d, k.from.x, y.from);
y.to = a.effects.setTransition(y, d, k.to.x, y.to)
}
y.css(y.from);
y.animate(y.to, m.duration, m.easing, function() {
if (t) {
a.effects.restore(y, n)
}
})
})
}
c.animate(c.to, {
queue: false,
duration: m.duration,
easing: m.easing,
complete: function() {
if (c.to.opacity === 0) {
c.css("opacity", c.from.opacity)
}
if (h === "hide") {
c.hide()
}
a.effects.restore(c, e);
if (!t) {
if (w === "static") {
c.css({
position: "relative",
top: c.to.top,
left: c.to.left
})
} else {
a.each(["top", "left"], function(o, y) {
c.css(y, function(A, C) {
var B = parseInt(C, 10),
z = o ? c.to.left : c.to.top;
if (C === "auto") {
return z + "px"
}
return B + z + "px"
})
})
}
}
a.effects.removeWrapper(c);
l()
}
})
}
})(jQuery);
(function(a, b) {
a.effects.effect.shake = function(l, k) {
var c = a(this),
d = ["position", "top", "bottom", "left", "right", "height", "width"],
j = a.effects.setMode(c, l.mode || "effect"),
v = l.direction || "left",
e = l.distance || 20,
h = l.times || 3,
w = h * 2 + 1,
q = Math.round(l.duration / w),
g = (v === "up" || v === "down") ? "top" : "left",
f = (v === "up" || v === "left"),
u = {},
t = {},
r = {},
p, m = c.queue(),
n = m.length;
a.effects.save(c, d);
c.show();
a.effects.createWrapper(c);
u[g] = (f ? "-=" : "+=") + e;
t[g] = (f ? "+=" : "-=") + e * 2;
r[g] = (f ? "-=" : "+=") + e * 2;
c.animate(u, q, l.easing);
for (p = 1; p < h; p++) {
c.animate(t, q, l.easing).animate(r, q, l.easing)
}
c.animate(t, q, l.easing).animate(u, q / 2, l.easing).queue(function() {
if (j === "hide") {
c.hide()
}
a.effects.restore(c, d);
a.effects.removeWrapper(c);
k()
});
if (n > 1) {
m.splice.apply(m, [1, 0].concat(m.splice(n, w + 1)))
}
c.dequeue()
}
})(jQuery);
(function(a, b) {
a.effects.effect.slide = function(e, j) {
var f = a(this),
l = ["position", "top", "bottom", "left", "right", "width", "height"],
k = a.effects.setMode(f, e.mode || "show"),
n = k === "show",
m = e.direction || "left",
g = (m === "up" || m === "down") ? "top" : "left",
d = (m === "up" || m === "left"),
c, h = {};
a.effects.save(f, l);
f.show();
c = e.distance || f[g === "top" ? "outerHeight" : "outerWidth"](true);
a.effects.createWrapper(f).css({
overflow: "hidden"
});
if (n) {
f.css(g, d ? (isNaN(c) ? "-" + c : -c) : c)
}
h[g] = (n ? (d ? "+=" : "-=") : (d ? "-=" : "+=")) + c;
f.animate(h, {
queue: false,
duration: e.duration,
easing: e.easing,
complete: function() {
if (k === "hide") {
f.hide()
}
a.effects.restore(f, l);
a.effects.removeWrapper(f);
j()
}
})
}
})(jQuery);
(function(a, b) {
a.effects.effect.transfer = function(d, h) {
var f = a(this),
l = a(d.to),
p = l.css("position") === "fixed",
k = a("body"),
m = p ? k.scrollTop() : 0,
n = p ? k.scrollLeft() : 0,
c = l.offset(),
g = {
top: c.top - m,
left: c.left - n,
height: l.innerHeight(),
width: l.innerWidth()
},
j = f.offset(),
e = a('
').appendTo(document.body).addClass(d.className).css({
top: j.top - m,
left: j.left - n,
height: f.innerHeight(),
width: f.innerWidth(),
position: p ? "fixed" : "absolute"
}).animate(g, d.duration, d.easing, function() {
e.remove();
h()
})
}
})(jQuery);
(function(b, c) {
var a = false;
b.widget("ui.menu", {
version: "1.9.2",
defaultElement: "
",
delay: 300,
options: {
icons: {
submenu: "ui-icon-carat-1-e"
},
menus: "ul",
position: {
my: "left top",
at: "right top"
},
role: "menu",
blur: null,
focus: null,
select: null
},
_create: function() {
this.activeMenu = this.element;
this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons", !!this.element.find(".ui-icon").length).attr({
role: this.options.role,
tabIndex: 0
}).bind("click" + this.eventNamespace, b.proxy(function(d) {
if (this.options.disabled) {
d.preventDefault()
}
}, this));
if (this.options.disabled) {
this.element.addClass("ui-state-disabled").attr("aria-disabled", "true")
}
this._on({
"mousedown .ui-menu-item > a": function(d) {
d.preventDefault()
},
"click .ui-state-disabled > a": function(d) {
d.preventDefault()
},
"click .ui-menu-item:has(a)": function(d) {
var e = b(d.target).closest(".ui-menu-item");
if (!a && e.not(".ui-state-disabled").length) {
a = true;
this.select(d);
if (e.has(".ui-menu").length) {
this.expand(d)
} else {
if (!this.element.is(":focus")) {
this.element.trigger("focus", [true]);
if (this.active && this.active.parents(".ui-menu").length === 1) {
clearTimeout(this.timer)
}
}
}
}
},
"mouseenter .ui-menu-item": function(d) {
var e = b(d.currentTarget);
e.siblings().children(".ui-state-active").removeClass("ui-state-active");
this.focus(d, e)
},
mouseleave: "collapseAll",
"mouseleave .ui-menu": "collapseAll",
focus: function(f, d) {
var e = this.active || this.element.children(".ui-menu-item").eq(0);
if (!d) {
this.focus(f, e)
}
},
blur: function(d) {
this._delay(function() {
if (!b.contains(this.element[0], this.document[0].activeElement)) {
this.collapseAll(d)
}
})
},
keydown: "_keydown"
});
this.refresh();
this._on(this.document, {
click: function(d) {
if (!b(d.target).closest(".ui-menu").length) {
this.collapseAll(d)
}
a = false
}
})
},
_destroy: function() {
this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();
this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function() {
var d = b(this);
if (d.data("ui-menu-submenu-carat")) {
d.remove()
}
});
this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")
},
_keydown: function(k) {
var e, j, l, h, g, d = true;
function f(m) {
return m.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
}
switch (k.keyCode) {
case b.ui.keyCode.PAGE_UP:
this.previousPage(k);
break;
case b.ui.keyCode.PAGE_DOWN:
this.nextPage(k);
break;
case b.ui.keyCode.HOME:
this._move("first", "first", k);
break;
case b.ui.keyCode.END:
this._move("last", "last", k);
break;
case b.ui.keyCode.UP:
this.previous(k);
break;
case b.ui.keyCode.DOWN:
this.next(k);
break;
case b.ui.keyCode.LEFT:
this.collapse(k);
break;
case b.ui.keyCode.RIGHT:
if (this.active && !this.active.is(".ui-state-disabled")) {
this.expand(k)
}
break;
case b.ui.keyCode.ENTER:
case b.ui.keyCode.SPACE:
this._activate(k);
break;
case b.ui.keyCode.ESCAPE:
this.collapse(k);
break;
default:
d = false;
j = this.previousFilter || "";
l = String.fromCharCode(k.keyCode);
h = false;
clearTimeout(this.filterTimer);
if (l === j) {
h = true
} else {
l = j + l
}
g = new RegExp("^" + f(l), "i");
e = this.activeMenu.children(".ui-menu-item").filter(function() {
return g.test(b(this).children("a").text())
});
e = h && e.index(this.active.next()) !== -1 ? this.active.nextAll(".ui-menu-item") : e;
if (!e.length) {
l = String.fromCharCode(k.keyCode);
g = new RegExp("^" + f(l), "i");
e = this.activeMenu.children(".ui-menu-item").filter(function() {
return g.test(b(this).children("a").text())
})
}
if (e.length) {
this.focus(k, e);
if (e.length > 1) {
this.previousFilter = l;
this.filterTimer = this._delay(function() {
delete this.previousFilter
}, 1000)
} else {
delete this.previousFilter
}
} else {
delete this.previousFilter
}
}
if (d) {
k.preventDefault()
}
},
_activate: function(d) {
if (!this.active.is(".ui-state-disabled")) {
if (this.active.children("a[aria-haspopup='true']").length) {
this.expand(d)
} else {
this.select(d)
}
}
},
refresh: function() {
var f, e = this.options.icons.submenu,
d = this.element.find(this.options.menus);
d.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({
role: this.options.role,
"aria-hidden": "true",
"aria-expanded": "false"
}).each(function() {
var j = b(this),
h = j.prev("a"),
g = b("").addClass("ui-menu-icon ui-icon " + e).data("ui-menu-submenu-carat", true);
h.attr("aria-haspopup", "true").prepend(g);
j.attr("aria-labelledby", h.attr("id"))
});
f = d.add(this.element);
f.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()
});
f.children(":not(.ui-menu-item)").each(function() {
var g = b(this);
if (!/[^\-â€â€Â–\s]/.test(g.text())) {
g.addClass("ui-widget-content ui-menu-divider")
}
});
f.children(".ui-state-disabled").attr("aria-disabled", "true");
if (this.active && !b.contains(this.element[0], this.active[0])) {
this.blur()
}
},
_itemRole: function() {
return {
menu: "menuitem",
listbox: "option"
} [this.options.role]
},
focus: function(e, d) {
var g, f;
this.blur(e, e && e.type === "focus");
this._scrollIntoView(d);
this.active = d.first();
f = this.active.children("a").addClass("ui-state-focus");
if (this.options.role) {
this.element.attr("aria-activedescendant", f.attr("id"))
}
this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");
if (e && e.type === "keydown") {
this._close()
} else {
this.timer = this._delay(function() {
this._close()
}, this.delay)
}
g = d.children(".ui-menu");
if (g.length && (/^mouse/.test(e.type))) {
this._startOpening(g)
}
this.activeMenu = d.parent();
this._trigger("focus", e, {
item: d
})
},
_scrollIntoView: function(g) {
var k, f, h, d, e, j;
if (this._hasScroll()) {
k = parseFloat(b.css(this.activeMenu[0], "borderTopWidth")) || 0;
f = parseFloat(b.css(this.activeMenu[0], "paddingTop")) || 0;
h = g.offset().top - this.activeMenu.offset().top - k - f;
d = this.activeMenu.scrollTop();
e = this.activeMenu.height();
j = g.height();
if (h < 0) {
this.activeMenu.scrollTop(d + h)
} else {
if (h + j > e) {
this.activeMenu.scrollTop(d + h - e + j)
}
}
}
},
blur: function(e, d) {
if (!d) {
clearTimeout(this.timer)
}
if (!this.active) {
return
}
this.active.children("a").removeClass("ui-state-focus");
this.active = null;
this._trigger("blur", e, {
item: this.active
})
},
_startOpening: function(d) {
clearTimeout(this.timer);
if (d.attr("aria-hidden") !== "true") {
return
}
this.timer = this._delay(function() {
this._close();
this._open(d)
}, this.delay)
},
_open: function(e) {
var d = b.extend({ of: this.active
}, this.options.position);
clearTimeout(this.timer);
this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden", "true");
e.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(d)
},
collapseAll: function(e, d) {
clearTimeout(this.timer);
this.timer = this._delay(function() {
var f = d ? this.element : b(e && e.target).closest(this.element.find(".ui-menu"));
if (!f.length) {
f = this.element
}
this._close(f);
this.blur(e);
this.activeMenu = f
}, this.delay)
},
_close: function(d) {
if (!d) {
d = this.active ? this.active.parent() : this.element
}
d.find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false").end().find("a.ui-state-active").removeClass("ui-state-active")
},
collapse: function(e) {
var d = this.active && this.active.parent().closest(".ui-menu-item", this.element);
if (d && d.length) {
this._close();
this.focus(e, d)
}
},
expand: function(e) {
var d = this.active && this.active.children(".ui-menu ").children(".ui-menu-item").first();
if (d && d.length) {
this._open(d.parent());
this._delay(function() {
this.focus(e, d)
})
}
},
next: function(d) {
this._move("next", "first", d)
},
previous: function(d) {
this._move("prev", "last", d)
},
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(g, e, f) {
var d;
if (this.active) {
if (g === "first" || g === "last") {
d = this.active[g === "first" ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1)
} else {
d = this.active[g + "All"](".ui-menu-item").eq(0)
}
}
if (!d || !d.length || !this.active) {
d = this.activeMenu.children(".ui-menu-item")[e]()
}
this.focus(f, d)
},
nextPage: function(f) {
var e, g, d;
if (!this.active) {
this.next(f);
return
}
if (this.isLastItem()) {
return
}
if (this._hasScroll()) {
g = this.active.offset().top;
d = this.element.height();
this.active.nextAll(".ui-menu-item").each(function() {
e = b(this);
return e.offset().top - g - d < 0
});
this.focus(f, e)
} else {
this.focus(f, this.activeMenu.children(".ui-menu-item")[!this.active ? "first" : "last"]())
}
},
previousPage: function(f) {
var e, g, d;
if (!this.active) {
this.next(f);
return
}
if (this.isFirstItem()) {
return
}
if (this._hasScroll()) {
g = this.active.offset().top;
d = this.element.height();
this.active.prevAll(".ui-menu-item").each(function() {
e = b(this);
return e.offset().top - g + d > 0
});
this.focus(f, e)
} else {
this.focus(f, this.activeMenu.children(".ui-menu-item").first())
}
},
_hasScroll: function() {
return this.element.outerHeight() < this.element.prop("scrollHeight")
},
select: function(d) {
this.active = this.active || b(d.target).closest(".ui-menu-item");
var e = {
item: this.active
};
if (!this.active.has(".ui-menu").length) {
this.collapseAll(d, true)
}
this._trigger("select", d, e)
}
})
}(jQuery));
(function(a, b) {
a.widget("ui.progressbar", {
version: "1.9.2",
options: {
value: 0,
max: 100
},
min: 0,
_create: function() {
this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({
role: "progressbar",
"aria-valuemin": this.min,
"aria-valuemax": this.options.max,
"aria-valuenow": this._value()
});
this.valueDiv = a("").appendTo(this.element);
this.oldValue = this._value();
this._refreshValue()
},
_destroy: function() {
this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
this.valueDiv.remove()
},
value: function(c) {
if (c === b) {
return this._value()
}
this._setOption("value", c);
return this
},
_setOption: function(c, d) {
if (c === "value") {
this.options.value = d;
this._refreshValue();
if (this._value() === this.options.max) {
this._trigger("complete")
}
}
this._super(c, d)
},
_value: function() {
var c = this.options.value;
if (typeof c !== "number") {
c = 0
}
return Math.min(this.options.max, Math.max(this.min, c))
},
_percentage: function() {
return 100 * this._value() / this.options.max
},
_refreshValue: function() {
var d = this.value(),
c = this._percentage();
if (this.oldValue !== d) {
this.oldValue = d;
this._trigger("change")
}
this.valueDiv.toggle(d > this.min).toggleClass("ui-corner-right", d === this.options.max).width(c.toFixed(0) + "%");
this.element.attr("aria-valuenow", d)
}
})
})(jQuery);
(function(c, d) {
c.widget("ui.resizable", c.ui.mouse, {
version: "1.9.2",
widgetEventPrefix: "resize",
options: {
alsoResize: false,
animate: false,
animateDuration: "slow",
animateEasing: "swing",
aspectRatio: false,
autoHide: false,
containment: false,
ghost: false,
grid: false,
handles: "e,s,se",
helper: false,
maxHeight: null,
maxWidth: null,
minHeight: 10,
minWidth: 10,
zIndex: 1000
},
_create: function() {
var h = this,
k = this.options;
this.element.addClass("ui-resizable");
c.extend(this, {
_aspectRatio: !!(k.aspectRatio),
aspectRatio: k.aspectRatio,
originalElement: this.element,
_proportionallyResizeElements: [],
_helper: k.helper || k.ghost || k.animate ? k.helper || "ui-resizable-helper" : null
});
if (this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
this.element.wrap(c('').css({
position: this.element.css("position"),
width: this.element.outerWidth(),
height: this.element.outerHeight(),
top: this.element.css("top"),
left: this.element.css("left")
}));
this.element = this.element.parent().data("resizable", this.element.data("resizable"));
this.elementIsWrapper = true;
this.element.css({
marginLeft: this.originalElement.css("marginLeft"),
marginTop: this.originalElement.css("marginTop"),
marginRight: this.originalElement.css("marginRight"),
marginBottom: this.originalElement.css("marginBottom")
});
this.originalElement.css({
marginLeft: 0,
marginTop: 0,
marginRight: 0,
marginBottom: 0
});
this.originalResizeStyle = this.originalElement.css("resize");
this.originalElement.css("resize", "none");
this._proportionallyResizeElements.push(this.originalElement.css({
position: "static",
zoom: 1,
display: "block"
}));
this.originalElement.css({
margin: this.originalElement.css("margin")
});
this._proportionallyResize()
}
this.handles = k.handles || (!c(".ui-resizable-handle", this.element).length ? "e,s,se" : {
n: ".ui-resizable-n",
e: ".ui-resizable-e",
s: ".ui-resizable-s",
w: ".ui-resizable-w",
se: ".ui-resizable-se",
sw: ".ui-resizable-sw",
ne: ".ui-resizable-ne",
nw: ".ui-resizable-nw"
});
if (this.handles.constructor == String) {
if (this.handles == "all") {
this.handles = "n,e,s,w,se,sw,ne,nw"
}
var l = this.handles.split(",");
this.handles = {};
for (var f = 0; f < l.length; f++) {
var j = c.trim(l[f]),
e = "ui-resizable-" + j;
var g = c('');
g.css({
zIndex: k.zIndex
});
if ("se" == j) {
g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")
}
this.handles[j] = ".ui-resizable-" + j;
this.element.append(g)
}
}
this._renderAxis = function(q) {
q = q || this.element;
for (var n in this.handles) {
if (this.handles[n].constructor == String) {
this.handles[n] = c(this.handles[n], this.element).show()
}
if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
var o = c(this.handles[n], this.element),
p = 0;
p = /sw|ne|nw|se|n|s/.test(n) ? o.outerHeight() : o.outerWidth();
var m = ["padding", /ne|nw|n/.test(n) ? "Top" : /se|sw|s/.test(n) ? "Bottom" : /^e$/.test(n) ? "Right" : "Left"].join("");
q.css(m, p);
this._proportionallyResize()
}
if (!c(this.handles[n]).length) {
continue
}
}
};
this._renderAxis(this.element);
this._handles = c(".ui-resizable-handle", this.element).disableSelection();
this._handles.mouseover(function() {
if (!h.resizing) {
if (this.className) {
var m = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)
}
h.axis = m && m[1] ? m[1] : "se"
}
});
if (k.autoHide) {
this._handles.hide();
c(this.element).addClass("ui-resizable-autohide").mouseenter(function() {
if (k.disabled) {
return
}
c(this).removeClass("ui-resizable-autohide");
h._handles.show()
}).mouseleave(function() {
if (k.disabled) {
return
}
if (!h.resizing) {
c(this).addClass("ui-resizable-autohide");
h._handles.hide()
}
})
}
this._mouseInit()
},
_destroy: function() {
this._mouseDestroy();
var e = function(g) {
c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()
};
if (this.elementIsWrapper) {
e(this.element);
var f = this.element;
this.originalElement.css({
position: f.css("position"),
width: f.outerWidth(),
height: f.outerHeight(),
top: f.css("top"),
left: f.css("left")
}).insertAfter(f);
f.remove()
}
this.originalElement.css("resize", this.originalResizeStyle);
e(this.originalElement);
return this
},
_mouseCapture: function(f) {
var g = false;
for (var e in this.handles) {
if (c(this.handles[e])[0] == f.target) {
g = true
}
}
return !this.options.disabled && g
},
_mouseStart: function(g) {
var k = this.options,
f = this.element.position(),
e = this.element;
this.resizing = true;
this.documentScroll = {
top: c(document).scrollTop(),
left: c(document).scrollLeft()
};
if (e.is(".ui-draggable") || (/absolute/).test(e.css("position"))) {
e.css({
position: "absolute",
top: f.top,
left: f.left
})
}
this._renderProxy();
var l = b(this.helper.css("left")),
h = b(this.helper.css("top"));
if (k.containment) {
l += c(k.containment).scrollLeft() || 0;
h += c(k.containment).scrollTop() || 0
}
this.offset = this.helper.offset();
this.position = {
left: l,
top: h
};
this.size = this._helper ? {
width: e.outerWidth(),
height: e.outerHeight()
} : {
width: e.width(),
height: e.height()
};
this.originalSize = this._helper ? {
width: e.outerWidth(),
height: e.outerHeight()
} : {
width: e.width(),
height: e.height()
};
this.originalPosition = {
left: l,
top: h
};
this.sizeDiff = {
width: e.outerWidth() - e.width(),
height: e.outerHeight() - e.height()
};
this.originalMousePosition = {
left: g.pageX,
top: g.pageY
};
this.aspectRatio = (typeof k.aspectRatio == "number") ? k.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
var j = c(".ui-resizable-" + this.axis).css("cursor");
c("body").css("cursor", j == "auto" ? this.axis + "-resize" : j);
e.addClass("ui-resizable-resizing");
this._propagate("start", g);
return true
},
_mouseDrag: function(e) {
var g = this.helper,
f = this.options,
m = {},
l = this,
j = this.originalMousePosition,
n = this.axis;
var q = (e.pageX - j.left) || 0,
p = (e.pageY - j.top) || 0;
var h = this._change[n];
if (!h) {
return false
}
var k = h.apply(this, [e, q, p]);
this._updateVirtualBoundaries(e.shiftKey);
if (this._aspectRatio || e.shiftKey) {
k = this._updateRatio(k, e)
}
k = this._respectSize(k, e);
this._propagate("resize", e);
g.css({
top: this.position.top + "px",
left: this.position.left + "px",
width: this.size.width + "px",
height: this.size.height + "px"
});
if (!this._helper && this._proportionallyResizeElements.length) {
this._proportionallyResize()
}
this._updateCache(k);
this._trigger("resize", e, this.ui());
return false
},
_mouseStop: function(h) {
this.resizing = false;
var j = this.options,
m = this;
if (this._helper) {
var g = this._proportionallyResizeElements,
e = g.length && (/textarea/i).test(g[0].nodeName),
f = e && c.ui.hasScroll(g[0], "left") ? 0 : m.sizeDiff.height,
l = e ? 0 : m.sizeDiff.width;
var p = {
width: (m.helper.width() - l),
height: (m.helper.height() - f)
},
k = (parseInt(m.element.css("left"), 10) + (m.position.left - m.originalPosition.left)) || null,
n = (parseInt(m.element.css("top"), 10) + (m.position.top - m.originalPosition.top)) || null;
if (!j.animate) {
this.element.css(c.extend(p, {
top: n,
left: k
}))
}
m.helper.height(m.size.height);
m.helper.width(m.size.width);
if (this._helper && !j.animate) {
this._proportionallyResize()
}
}
c("body").css("cursor", "auto");
this.element.removeClass("ui-resizable-resizing");
this._propagate("stop", h);
if (this._helper) {
this.helper.remove()
}
return false
},
_updateVirtualBoundaries: function(g) {
var k = this.options,
j, h, f, l, e;
e = {
minWidth: a(k.minWidth) ? k.minWidth : 0,
maxWidth: a(k.maxWidth) ? k.maxWidth : Infinity,
minHeight: a(k.minHeight) ? k.minHeight : 0,
maxHeight: a(k.maxHeight) ? k.maxHeight : Infinity
};
if (this._aspectRatio || g) {
j = e.minHeight * this.aspectRatio;
f = e.minWidth / this.aspectRatio;
h = e.maxHeight * this.aspectRatio;
l = e.maxWidth / this.aspectRatio;
if (j > e.minWidth) {
e.minWidth = j
}
if (f > e.minHeight) {
e.minHeight = f
}
if (h < e.maxWidth) {
e.maxWidth = h
}
if (l < e.maxHeight) {
e.maxHeight = l
}
}
this._vBoundaries = e
},
_updateCache: function(e) {
var f = this.options;
this.offset = this.helper.offset();
if (a(e.left)) {
this.position.left = e.left
}
if (a(e.top)) {
this.position.top = e.top
}
if (a(e.height)) {
this.size.height = e.height
}
if (a(e.width)) {
this.size.width = e.width
}
},
_updateRatio: function(h, g) {
var j = this.options,
k = this.position,
f = this.size,
e = this.axis;
if (a(h.height)) {
h.width = (h.height * this.aspectRatio)
} else {
if (a(h.width)) {
h.height = (h.width / this.aspectRatio)
}
}
if (e == "sw") {
h.left = k.left + (f.width - h.width);
h.top = null
}
if (e == "nw") {
h.top = k.top + (f.height - h.height);
h.left = k.left + (f.width - h.width)
}
return h
},
_respectSize: function(m, g) {
var k = this.helper,
j = this._vBoundaries,
t = this._aspectRatio || g.shiftKey,
r = this.axis,
v = a(m.width) && j.maxWidth && (j.maxWidth < m.width),
n = a(m.height) && j.maxHeight && (j.maxHeight < m.height),
h = a(m.width) && j.minWidth && (j.minWidth > m.width),
u = a(m.height) && j.minHeight && (j.minHeight > m.height);
if (h) {
m.width = j.minWidth
}
if (u) {
m.height = j.minHeight
}
if (v) {
m.width = j.maxWidth
}
if (n) {
m.height = j.maxHeight
}
var f = this.originalPosition.left + this.originalSize.width,
q = this.position.top + this.size.height;
var l = /sw|nw|w/.test(r),
e = /nw|ne|n/.test(r);
if (h && l) {
m.left = f - j.minWidth
}
if (v && l) {
m.left = f - j.maxWidth
}
if (u && e) {
m.top = q - j.minHeight
}
if (n && e) {
m.top = q - j.maxHeight
}
var p = !m.width && !m.height;
if (p && !m.left && m.top) {
m.top = null
} else {
if (p && !m.top && m.left) {
m.left = null
}
}
return m
},
_proportionallyResize: function() {
var k = this.options;
if (!this._proportionallyResizeElements.length) {
return
}
var g = this.helper || this.element;
for (var f = 0; f < this._proportionallyResizeElements.length; f++) {
var h = this._proportionallyResizeElements[f];
if (!this.borderDif) {
var e = [h.css("borderTopWidth"), h.css("borderRightWidth"), h.css("borderBottomWidth"), h.css("borderLeftWidth")],
j = [h.css("paddingTop"), h.css("paddingRight"), h.css("paddingBottom"), h.css("paddingLeft")];
this.borderDif = c.map(e, function(l, n) {
var m = parseInt(l, 10) || 0,
o = parseInt(j[n], 10) || 0;
return m + o
})
}
h.css({
height: (g.height() - this.borderDif[0] - this.borderDif[2]) || 0,
width: (g.width() - this.borderDif[1] - this.borderDif[3]) || 0
})
}
},
_renderProxy: function() {
var e = this.element,
h = this.options;
this.elementOffset = e.offset();
if (this._helper) {
this.helper = this.helper || c('');
var f = (c.ui.ie6 ? 1 : 0),
g = (c.ui.ie6 ? 2 : -1);
this.helper.addClass(this._helper).css({
width: this.element.outerWidth() + g,
height: this.element.outerHeight() + g,
position: "absolute",
left: this.elementOffset.left - f + "px",
top: this.elementOffset.top - f + "px",
zIndex: ++h.zIndex
});
this.helper.appendTo("body").disableSelection()
} else {
this.helper = this.element
}
},
_change: {
e: function(g, f, e) {
return {
width: this.originalSize.width + f
}
},
w: function(h, f, e) {
var k = this.options,
g = this.originalSize,
j = this.originalPosition;
return {
left: j.left + f,
width: g.width - f
}
},
n: function(h, f, e) {
var k = this.options,
g = this.originalSize,
j = this.originalPosition;
return {
top: j.top + e,
height: g.height - e
}
},
s: function(g, f, e) {
return {
height: this.originalSize.height + e
}
},
se: function(g, f, e) {
return c.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [g, f, e]))
},
sw: function(g, f, e) {
return c.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [g, f, e]))
},
ne: function(g, f, e) {
return c.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [g, f, e]))
},
nw: function(g, f, e) {
return c.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [g, f, e]))
}
},
_propagate: function(f, e) {
c.ui.plugin.call(this, f, [e, this.ui()]);
(f != "resize" && this._trigger(f, e, this.ui()))
},
plugins: {},
ui: function() {
return {
originalElement: this.originalElement,
element: this.element,
helper: this.helper,
position: this.position,
size: this.size,
originalSize: this.originalSize,
originalPosition: this.originalPosition
}
}
});
c.ui.plugin.add("resizable", "alsoResize", {
start: function(f, g) {
var e = c(this).data("resizable"),
j = e.options;
var h = function(k) {
c(k).each(function() {
var l = c(this);
l.data("resizable-alsoresize", {
width: parseInt(l.width(), 10),
height: parseInt(l.height(), 10),
left: parseInt(l.css("left"), 10),
top: parseInt(l.css("top"), 10)
})
})
};
if (typeof(j.alsoResize) == "object" && !j.alsoResize.parentNode) {
if (j.alsoResize.length) {
j.alsoResize = j.alsoResize[0];
h(j.alsoResize)
} else {
c.each(j.alsoResize, function(k) {
h(k)
})
}
} else {
h(j.alsoResize)
}
},
resize: function(g, j) {
var f = c(this).data("resizable"),
k = f.options,
h = f.originalSize,
m = f.originalPosition;
var l = {
height: (f.size.height - h.height) || 0,
width: (f.size.width - h.width) || 0,
top: (f.position.top - m.top) || 0,
left: (f.position.left - m.left) || 0
},
e = function(n, o) {
c(n).each(function() {
var r = c(this),
t = c(this).data("resizable-alsoresize"),
q = {},
p = o && o.length ? o : r.parents(j.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
c.each(p, function(u, w) {
var v = (t[w] || 0) + (l[w] || 0);
if (v && v >= 0) {
q[w] = v || null
}
});
r.css(q)
})
};
if (typeof(k.alsoResize) == "object" && !k.alsoResize.nodeType) {
c.each(k.alsoResize, function(n, o) {
e(n, o)
})
} else {
e(k.alsoResize)
}
},
stop: function(e, f) {
c(this).removeData("resizable-alsoresize")
}
});
c.ui.plugin.add("resizable", "animate", {
stop: function(j, q) {
var n = c(this).data("resizable"),
k = n.options;
var h = n._proportionallyResizeElements,
e = h.length && (/textarea/i).test(h[0].nodeName),
f = e && c.ui.hasScroll(h[0], "left") ? 0 : n.sizeDiff.height,
m = e ? 0 : n.sizeDiff.width;
var g = {
width: (n.size.width - m),
height: (n.size.height - f)
},
l = (parseInt(n.element.css("left"), 10) + (n.position.left - n.originalPosition.left)) || null,
p = (parseInt(n.element.css("top"), 10) + (n.position.top - n.originalPosition.top)) || null;
n.element.animate(c.extend(g, p && l ? {
top: p,
left: l
} : {}), {
duration: k.animateDuration,
easing: k.animateEasing,
step: function() {
var o = {
width: parseInt(n.element.css("width"), 10),
height: parseInt(n.element.css("height"), 10),
top: parseInt(n.element.css("top"), 10),
left: parseInt(n.element.css("left"), 10)
};
if (h && h.length) {
c(h[0]).css({
width: o.width,
height: o.height
})
}
n._updateCache(o);
n._propagate("resize", j)
}
})
}
});
c.ui.plugin.add("resizable", "containment", {
start: function(f, u) {
var r = c(this).data("resizable"),
k = r.options,
m = r.element;
var g = k.containment,
l = (g instanceof c) ? g.get(0) : (/parent/.test(g)) ? m.parent().get(0) : g;
if (!l) {
return
}
r.containerElement = c(l);
if (/document/.test(g) || g == document) {
r.containerOffset = {
left: 0,
top: 0
};
r.containerPosition = {
left: 0,
top: 0
};
r.parentData = {
element: c(document),
left: 0,
top: 0,
width: c(document).width(),
height: c(document).height() || document.body.parentNode.scrollHeight
}
} else {
var q = c(l),
j = [];
c(["Top", "Right", "Left", "Bottom"]).each(function(p, o) {
j[p] = b(q.css("padding" + o))
});
r.containerOffset = q.offset();
r.containerPosition = q.position();
r.containerSize = {
height: (q.innerHeight() - j[3]),
width: (q.innerWidth() - j[1])
};
var t = r.containerOffset,
e = r.containerSize.height,
n = r.containerSize.width,
h = (c.ui.hasScroll(l, "left") ? l.scrollWidth : n),
v = (c.ui.hasScroll(l) ? l.scrollHeight : e);
r.parentData = {
element: l,
left: t.left,
top: t.top,
width: h,
height: v
}
}
},
resize: function(g, t) {
var n = c(this).data("resizable"),
j = n.options,
f = n.containerSize,
r = n.containerOffset,
p = n.size,
q = n.position,
u = n._aspectRatio || g.shiftKey,
e = {
top: 0,
left: 0
},
h = n.containerElement;
if (h[0] != document && (/static/).test(h.css("position"))) {
e = r
}
if (q.left < (n._helper ? r.left : 0)) {
n.size.width = n.size.width + (n._helper ? (n.position.left - r.left) : (n.position.left - e.left));
if (u) {
n.size.height = n.size.width / n.aspectRatio
}
n.position.left = j.helper ? r.left : 0
}
if (q.top < (n._helper ? r.top : 0)) {
n.size.height = n.size.height + (n._helper ? (n.position.top - r.top) : n.position.top);
if (u) {
n.size.width = n.size.height * n.aspectRatio
}
n.position.top = n._helper ? r.top : 0
}
n.offset.left = n.parentData.left + n.position.left;
n.offset.top = n.parentData.top + n.position.top;
var m = Math.abs((n._helper ? n.offset.left - e.left : (n.offset.left - e.left)) + n.sizeDiff.width),
v = Math.abs((n._helper ? n.offset.top - e.top : (n.offset.top - r.top)) + n.sizeDiff.height);
var l = n.containerElement.get(0) == n.element.parent().get(0),
k = /relative|absolute/.test(n.containerElement.css("position"));
if (l && k) {
m -= n.parentData.left
}
if (m + n.size.width >= n.parentData.width) {
n.size.width = n.parentData.width - m;
if (u) {
n.size.height = n.size.width / n.aspectRatio
}
}
if (v + n.size.height >= n.parentData.height) {
n.size.height = n.parentData.height - v;
if (u) {
n.size.width = n.size.height * n.aspectRatio
}
}
},
stop: function(f, q) {
var m = c(this).data("resizable"),
g = m.options,
n = m.position,
p = m.containerOffset,
e = m.containerPosition,
j = m.containerElement;
var k = c(m.helper),
t = k.offset(),
r = k.outerWidth() - m.sizeDiff.width,
l = k.outerHeight() - m.sizeDiff.height;
if (m._helper && !g.animate && (/relative/).test(j.css("position"))) {
c(this).css({
left: t.left - e.left - p.left,
width: r,
height: l
})
}
if (m._helper && !g.animate && (/static/).test(j.css("position"))) {
c(this).css({
left: t.left - e.left - p.left,
width: r,
height: l
})
}
}
});
c.ui.plugin.add("resizable", "ghost", {
start: function(g, h) {
var f = c(this).data("resizable"),
j = f.options,
e = f.size;
f.ghost = f.originalElement.clone();
f.ghost.css({
opacity: 0.25,
display: "block",
position: "relative",
height: e.height,
width: e.width,
margin: 0,
left: 0,
top: 0
}).addClass("ui-resizable-ghost").addClass(typeof j.ghost == "string" ? j.ghost : "");
f.ghost.appendTo(f.helper)
},
resize: function(f, g) {
var e = c(this).data("resizable"),
h = e.options;
if (e.ghost) {
e.ghost.css({
position: "relative",
height: e.size.height,
width: e.size.width
})
}
},
stop: function(f, g) {
var e = c(this).data("resizable"),
h = e.options;
if (e.ghost && e.helper) {
e.helper.get(0).removeChild(e.ghost.get(0))
}
}
});
c.ui.plugin.add("resizable", "grid", {
resize: function(e, p) {
var l = c(this).data("resizable"),
h = l.options,
m = l.size,
j = l.originalSize,
k = l.originalPosition,
q = l.axis,
n = h._aspectRatio || e.shiftKey;
h.grid = typeof h.grid == "number" ? [h.grid, h.grid] : h.grid;
var g = Math.round((m.width - j.width) / (h.grid[0] || 1)) * (h.grid[0] || 1),
f = Math.round((m.height - j.height) / (h.grid[1] || 1)) * (h.grid[1] || 1);
if (/^(se|s|e)$/.test(q)) {
l.size.width = j.width + g;
l.size.height = j.height + f
} else {
if (/^(ne)$/.test(q)) {
l.size.width = j.width + g;
l.size.height = j.height + f;
l.position.top = k.top - f
} else {
if (/^(sw)$/.test(q)) {
l.size.width = j.width + g;
l.size.height = j.height + f;
l.position.left = k.left - g
} else {
l.size.width = j.width + g;
l.size.height = j.height + f;
l.position.top = k.top - f;
l.position.left = k.left - g
}
}
}
}
});
var b = function(e) {
return parseInt(e, 10) || 0
};
var a = function(e) {
return !isNaN(parseInt(e, 10))
}
})(jQuery);
(function(a, b) {
a.widget("ui.selectable", a.ui.mouse, {
version: "1.9.2",
options: {
appendTo: "body",
autoRefresh: true,
distance: 0,
filter: "*",
tolerance: "touch"
},
_create: function() {
var c = this;
this.element.addClass("ui-selectable");
this.dragged = false;
var d;
this.refresh = function() {
d = a(c.options.filter, c.element[0]);
d.addClass("ui-selectee");
d.each(function() {
var e = a(this);
var f = e.offset();
a.data(this, "selectable-item", {
element: this,
$element: e,
left: f.left,
top: f.top,
right: f.left + e.outerWidth(),
bottom: f.top + e.outerHeight(),
startselected: false,
selected: e.hasClass("ui-selected"),
selecting: e.hasClass("ui-selecting"),
unselecting: e.hasClass("ui-unselecting")
})
})
};
this.refresh();
this.selectees = d.addClass("ui-selectee");
this._mouseInit();
this.helper = a("")
},
_destroy: function() {
this.selectees.removeClass("ui-selectee").removeData("selectable-item");
this.element.removeClass("ui-selectable ui-selectable-disabled");
this._mouseDestroy()
},
_mouseStart: function(e) {
var d = this;
this.opos = [e.pageX, e.pageY];
if (this.options.disabled) {
return
}
var c = this.options;
this.selectees = a(c.filter, this.element[0]);
this._trigger("start", e);
a(c.appendTo).append(this.helper);
this.helper.css({
left: e.clientX,
top: e.clientY,
width: 0,
height: 0
});
if (c.autoRefresh) {
this.refresh()
}
this.selectees.filter(".ui-selected").each(function() {
var f = a.data(this, "selectable-item");
f.startselected = true;
if (!e.metaKey && !e.ctrlKey) {
f.$element.removeClass("ui-selected");
f.selected = false;
f.$element.addClass("ui-unselecting");
f.unselecting = true;
d._trigger("unselecting", e, {
unselecting: f.element
})
}
});
a(e.target).parents().andSelf().each(function() {
var g = a.data(this, "selectable-item");
if (g) {
var f = (!e.metaKey && !e.ctrlKey) || !g.$element.hasClass("ui-selected");
g.$element.removeClass(f ? "ui-unselecting" : "ui-selected").addClass(f ? "ui-selecting" : "ui-unselecting");
g.unselecting = !f;
g.selecting = f;
g.selected = f;
if (f) {
d._trigger("selecting", e, {
selecting: g.element
})
} else {
d._trigger("unselecting", e, {
unselecting: g.element
})
}
return false
}
})
},
_mouseDrag: function(k) {
var j = this;
this.dragged = true;
if (this.options.disabled) {
return
}
var e = this.options;
var d = this.opos[0],
h = this.opos[1],
c = k.pageX,
g = k.pageY;
if (d > c) {
var f = c;
c = d;
d = f
}
if (h > g) {
var f = g;
g = h;
h = f
}
this.helper.css({
left: d,
top: h,
width: c - d,
height: g - h
});
this.selectees.each(function() {
var l = a.data(this, "selectable-item");
if (!l || l.element == j.element[0]) {
return
}
var m = false;
if (e.tolerance == "touch") {
m = (!(l.left > c || l.right < d || l.top > g || l.bottom < h))
} else {
if (e.tolerance == "fit") {
m = (l.left > d && l.right < c && l.top > h && l.bottom < g)
}
}
if (m) {
if (l.selected) {
l.$element.removeClass("ui-selected");
l.selected = false
}
if (l.unselecting) {
l.$element.removeClass("ui-unselecting");
l.unselecting = false
}
if (!l.selecting) {
l.$element.addClass("ui-selecting");
l.selecting = true;
j._trigger("selecting", k, {
selecting: l.element
})
}
} else {
if (l.selecting) {
if ((k.metaKey || k.ctrlKey) && l.startselected) {
l.$element.removeClass("ui-selecting");
l.selecting = false;
l.$element.addClass("ui-selected");
l.selected = true
} else {
l.$element.removeClass("ui-selecting");
l.selecting = false;
if (l.startselected) {
l.$element.addClass("ui-unselecting");
l.unselecting = true
}
j._trigger("unselecting", k, {
unselecting: l.element
})
}
}
if (l.selected) {
if (!k.metaKey && !k.ctrlKey && !l.startselected) {
l.$element.removeClass("ui-selected");
l.selected = false;
l.$element.addClass("ui-unselecting");
l.unselecting = true;
j._trigger("unselecting", k, {
unselecting: l.element
})
}
}
}
});
return false
},
_mouseStop: function(e) {
var d = this;
this.dragged = false;
var c = this.options;
a(".ui-unselecting", this.element[0]).each(function() {
var f = a.data(this, "selectable-item");
f.$element.removeClass("ui-unselecting");
f.unselecting = false;
f.startselected = false;
d._trigger("unselected", e, {
unselected: f.element
})
});
a(".ui-selecting", this.element[0]).each(function() {
var f = a.data(this, "selectable-item");
f.$element.removeClass("ui-selecting").addClass("ui-selected");
f.selecting = false;
f.selected = true;
f.startselected = true;
d._trigger("selected", e, {
selected: f.element
})
});
this._trigger("stop", e);
this.helper.remove();
return false
}
})
})(jQuery);
(function(b, c) {
var a = 5;
b.widget("ui.slider", b.ui.mouse, {
version: "1.9.2",
widgetEventPrefix: "slide",
options: {
animate: false,
distance: 0,
max: 100,
min: 0,
orientation: "horizontal",
range: false,
step: 1,
value: 0,
values: null
},
_create: function() {
var f, d, j = this.options,
h = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),
g = "",
e = [];
this._keySliding = false;
this._mouseSliding = false;
this._animateOff = true;
this._handleIndex = null;
this._detectOrientation();
this._mouseInit();
this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget ui-widget-content ui-corner-all" + (j.disabled ? " ui-slider-disabled ui-disabled" : ""));
this.range = b([]);
if (j.range) {
if (j.range === true) {
if (!j.values) {
j.values = [this._valueMin(), this._valueMin()]
}
if (j.values.length && j.values.length !== 2) {
j.values = [j.values[0], j.values[0]]
}
}
this.range = b("").appendTo(this.element).addClass("ui-slider-range ui-widget-header" + ((j.range === "min" || j.range === "max") ? " ui-slider-range-" + j.range : ""))
}
d = (j.values && j.values.length) || 1;
for (f = h.length; f < d; f++) {
e.push(g)
}
this.handles = h.add(b(e.join("")).appendTo(this.element));
this.handle = this.handles.eq(0);
this.handles.add(this.range).filter("a").click(function(k) {
k.preventDefault()
}).mouseenter(function() {
if (!j.disabled) {
b(this).addClass("ui-state-hover")
}
}).mouseleave(function() {
b(this).removeClass("ui-state-hover")
}).focus(function() {
if (!j.disabled) {
b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");
b(this).addClass("ui-state-focus")
} else {
b(this).blur()
}
}).blur(function() {
b(this).removeClass("ui-state-focus")
});
this.handles.each(function(k) {
b(this).data("ui-slider-handle-index", k)
});
this._on(this.handles, {
keydown: function(o) {
var p, m, l, n, k = b(o.target).data("ui-slider-handle-index");
switch (o.keyCode) {
case b.ui.keyCode.HOME:
case b.ui.keyCode.END:
case b.ui.keyCode.PAGE_UP:
case b.ui.keyCode.PAGE_DOWN:
case b.ui.keyCode.UP:
case b.ui.keyCode.RIGHT:
case b.ui.keyCode.DOWN:
case b.ui.keyCode.LEFT:
o.preventDefault();
if (!this._keySliding) {
this._keySliding = true;
b(o.target).addClass("ui-state-active");
p = this._start(o, k);
if (p === false) {
return
}
}
break
}
n = this.options.step;
if (this.options.values && this.options.values.length) {
m = l = this.values(k)
} else {
m = l = this.value()
}
switch (o.keyCode) {
case b.ui.keyCode.HOME:
l = this._valueMin();
break;
case b.ui.keyCode.END:
l = this._valueMax();
break;
case b.ui.keyCode.PAGE_UP:
l = this._trimAlignValue(m + ((this._valueMax() - this._valueMin()) / a));
break;
case b.ui.keyCode.PAGE_DOWN:
l = this._trimAlignValue(m - ((this._valueMax() - this._valueMin()) / a));
break;
case b.ui.keyCode.UP:
case b.ui.keyCode.RIGHT:
if (m === this._valueMax()) {
return
}
l = this._trimAlignValue(m + n);
break;
case b.ui.keyCode.DOWN:
case b.ui.keyCode.LEFT:
if (m === this._valueMin()) {
return
}
l = this._trimAlignValue(m - n);
break
}
this._slide(o, k, l)
},
keyup: function(l) {
var k = b(l.target).data("ui-slider-handle-index");
if (this._keySliding) {
this._keySliding = false;
this._stop(l, k);
this._change(l, k);
b(l.target).removeClass("ui-state-active")
}
}
});
this._refreshValue();
this._animateOff = false
},
_destroy: function() {
this.handles.remove();
this.range.remove();
this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all");
this._mouseDestroy()
},
_mouseCapture: function(f) {
var k, n, e, h, m, p, j, d, l = this,
g = this.options;
if (g.disabled) {
return false
}
this.elementSize = {
width: this.element.outerWidth(),
height: this.element.outerHeight()
};
this.elementOffset = this.element.offset();
k = {
x: f.pageX,
y: f.pageY
};
n = this._normValueFromMouse(k);
e = this._valueMax() - this._valueMin() + 1;
this.handles.each(function(o) {
var q = Math.abs(n - l.values(o));
if (e > q) {
e = q;
h = b(this);
m = o
}
});
if (g.range === true && this.values(1) === g.min) {
m += 1;
h = b(this.handles[m])
}
p = this._start(f, m);
if (p === false) {
return false
}
this._mouseSliding = true;
this._handleIndex = m;
h.addClass("ui-state-active").focus();
j = h.offset();
d = !b(f.target).parents().andSelf().is(".ui-slider-handle");
this._clickOffset = d ? {
left: 0,
top: 0
} : {
left: f.pageX - j.left - (h.width() / 2),
top: f.pageY - j.top - (h.height() / 2) - (parseInt(h.css("borderTopWidth"), 10) || 0) - (parseInt(h.css("borderBottomWidth"), 10) || 0) + (parseInt(h.css("marginTop"), 10) || 0)
};
if (!this.handles.hasClass("ui-state-hover")) {
this._slide(f, m, n)
}
this._animateOff = true;
return true
},
_mouseStart: function() {
return true
},
_mouseDrag: function(f) {
var d = {
x: f.pageX,
y: f.pageY
},
e = this._normValueFromMouse(d);
this._slide(f, this._handleIndex, e);
return false
},
_mouseStop: function(d) {
this.handles.removeClass("ui-state-active");
this._mouseSliding = false;
this._stop(d, this._handleIndex);
this._change(d, this._handleIndex);
this._handleIndex = null;
this._clickOffset = null;
this._animateOff = false;
return false
},
_detectOrientation: function() {
this.orientation = (this.options.orientation === "vertical") ? "vertical" : "horizontal"
},
_normValueFromMouse: function(e) {
var d, h, g, f, j;
if (this.orientation === "horizontal") {
d = this.elementSize.width;
h = e.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)
} else {
d = this.elementSize.height;
h = e.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)
}
g = (h / d);
if (g > 1) {
g = 1
}
if (g < 0) {
g = 0
}
if (this.orientation === "vertical") {
g = 1 - g
}
f = this._valueMax() - this._valueMin();
j = this._valueMin() + g * f;
return this._trimAlignValue(j)
},
_start: function(f, e) {
var d = {
handle: this.handles[e],
value: this.value()
};
if (this.options.values && this.options.values.length) {
d.value = this.values(e);
d.values = this.values()
}
return this._trigger("start", f, d)
},
_slide: function(h, g, f) {
var d, e, j;
if (this.options.values && this.options.values.length) {
d = this.values(g ? 0 : 1);
if ((this.options.values.length === 2 && this.options.range === true) && ((g === 0 && f > d) || (g === 1 && f < d))) {
f = d
}
if (f !== this.values(g)) {
e = this.values();
e[g] = f;
j = this._trigger("slide", h, {
handle: this.handles[g],
value: f,
values: e
});
d = this.values(g ? 0 : 1);
if (j !== false) {
this.values(g, f, true)
}
}
} else {
if (f !== this.value()) {
j = this._trigger("slide", h, {
handle: this.handles[g],
value: f
});
if (j !== false) {
this.value(f)
}
}
}
},
_stop: function(f, e) {
var d = {
handle: this.handles[e],
value: this.value()
};
if (this.options.values && this.options.values.length) {
d.value = this.values(e);
d.values = this.values()
}
this._trigger("stop", f, d)
},
_change: function(f, e) {
if (!this._keySliding && !this._mouseSliding) {
var d = {
handle: this.handles[e],
value: this.value()
};
if (this.options.values && this.options.values.length) {
d.value = this.values(e);
d.values = this.values()
}
this._trigger("change", f, d)
}
},
value: function(d) {
if (arguments.length) {
this.options.value = this._trimAlignValue(d);
this._refreshValue();
this._change(null, 0);
return
}
return this._value()
},
values: function(e, h) {
var g, d, f;
if (arguments.length > 1) {
this.options.values[e] = this._trimAlignValue(h);
this._refreshValue();
this._change(null, e);
return
}
if (arguments.length) {
if (b.isArray(arguments[0])) {
g = this.options.values;
d = arguments[0];
for (f = 0; f < g.length; f += 1) {
g[f] = this._trimAlignValue(d[f]);
this._change(null, f)
}
this._refreshValue()
} else {
if (this.options.values && this.options.values.length) {
return this._values(e)
} else {
return this.value()
}
}
} else {
return this._values()
}
},
_setOption: function(e, f) {
var d, g = 0;
if (b.isArray(this.options.values)) {
g = this.options.values.length
}
b.Widget.prototype._setOption.apply(this, arguments);
switch (e) {
case "disabled":
if (f) {
this.handles.filter(".ui-state-focus").blur();
this.handles.removeClass("ui-state-hover");
this.handles.prop("disabled", true);
this.element.addClass("ui-disabled")
} else {
this.handles.prop("disabled", false);
this.element.removeClass("ui-disabled")
}
break;
case "orientation":
this._detectOrientation();
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation);
this._refreshValue();
break;
case "value":
this._animateOff = true;
this._refreshValue();
this._change(null, 0);
this._animateOff = false;
break;
case "values":
this._animateOff = true;
this._refreshValue();
for (d = 0; d < g; d += 1) {
this._change(null, d)
}
this._animateOff = false;
break;
case "min":
case "max":
this._animateOff = true;
this._refreshValue();
this._animateOff = false;
break
}
},
_value: function() {
var d = this.options.value;
d = this._trimAlignValue(d);
return d
},
_values: function(d) {
var g, f, e;
if (arguments.length) {
g = this.options.values[d];
g = this._trimAlignValue(g);
return g
} else {
f = this.options.values.slice();
for (e = 0; e < f.length; e += 1) {
f[e] = this._trimAlignValue(f[e])
}
return f
}
},
_trimAlignValue: function(g) {
if (g <= this._valueMin()) {
return this._valueMin()
}
if (g >= this._valueMax()) {
return this._valueMax()
}
var d = (this.options.step > 0) ? this.options.step : 1,
f = (g - this._valueMin()) % d,
e = g - f;
if (Math.abs(f) * 2 >= d) {
e += (f > 0) ? d : (-d)
}
return parseFloat(e.toFixed(5))
},
_valueMin: function() {
return this.options.min
},
_valueMax: function() {
return this.options.max
},
_refreshValue: function() {
var j, h, m, k, n, g = this.options.range,
f = this.options,
l = this,
e = (!this._animateOff) ? f.animate : false,
d = {};
if (this.options.values && this.options.values.length) {
this.handles.each(function(o) {
h = (l.values(o) - l._valueMin()) / (l._valueMax() - l._valueMin()) * 100;
d[l.orientation === "horizontal" ? "left" : "bottom"] = h + "%";
b(this).stop(1, 1)[e ? "animate" : "css"](d, f.animate);
if (l.options.range === true) {
if (l.orientation === "horizontal") {
if (o === 0) {
l.range.stop(1, 1)[e ? "animate" : "css"]({
left: h + "%"
}, f.animate)
}
if (o === 1) {
l.range[e ? "animate" : "css"]({
width: (h - j) + "%"
}, {
queue: false,
duration: f.animate
})
}
} else {
if (o === 0) {
l.range.stop(1, 1)[e ? "animate" : "css"]({
bottom: (h) + "%"
}, f.animate)
}
if (o === 1) {
l.range[e ? "animate" : "css"]({
height: (h - j) + "%"
}, {
queue: false,
duration: f.animate
})
}
}
}
j = h
})
} else {
m = this.value();
k = this._valueMin();
n = this._valueMax();
h = (n !== k) ? (m - k) / (n - k) * 100 : 0;
d[this.orientation === "horizontal" ? "left" : "bottom"] = h + "%";
this.handle.stop(1, 1)[e ? "animate" : "css"](d, f.animate);
if (g === "min" && this.orientation === "horizontal") {
this.range.stop(1, 1)[e ? "animate" : "css"]({
width: h + "%"
}, f.animate)
}
if (g === "max" && this.orientation === "horizontal") {
this.range[e ? "animate" : "css"]({
width: (100 - h) + "%"
}, {
queue: false,
duration: f.animate
})
}
if (g === "min" && this.orientation === "vertical") {
this.range.stop(1, 1)[e ? "animate" : "css"]({
height: h + "%"
}, f.animate)
}
if (g === "max" && this.orientation === "vertical") {
this.range[e ? "animate" : "css"]({
height: (100 - h) + "%"
}, {
queue: false,
duration: f.animate
})
}
}
}
})
}(jQuery));
(function(a, b) {
a.widget("ui.sortable", a.ui.mouse, {
version: "1.9.2",
widgetEventPrefix: "sort",
ready: false,
options: {
appendTo: "parent",
axis: false,
connectWith: false,
containment: false,
cursor: "auto",
cursorAt: false,
dropOnEmpty: true,
forcePlaceholderSize: false,
forceHelperSize: false,
grid: false,
handle: false,
helper: "original",
items: "> *",
opacity: false,
placeholder: false,
revert: false,
scroll: true,
scrollSensitivity: 20,
scrollSpeed: 20,
scope: "default",
tolerance: "intersect",
zIndex: 1000
},
_create: function() {
var c = this.options;
this.containerCache = {};
this.element.addClass("ui-sortable");
this.refresh();
this.floating = this.items.length ? c.axis === "x" || (/left|right/).test(this.items[0].item.css("float")) || (/inline|table-cell/).test(this.items[0].item.css("display")) : false;
this.offset = this.element.offset();
this._mouseInit();
this.ready = true
},
_destroy: function() {
this.element.removeClass("ui-sortable ui-sortable-disabled");
this._mouseDestroy();
for (var c = this.items.length - 1; c >= 0; c--) {
this.items[c].item.removeData(this.widgetName + "-item")
}
return this
},
_setOption: function(c, d) {
if (c === "disabled") {
this.options[c] = d;
this.widget().toggleClass("ui-sortable-disabled", !!d)
} else {
a.Widget.prototype._setOption.apply(this, arguments)
}
},
_mouseCapture: function(f, g) {
var e = this;
if (this.reverting) {
return false
}
if (this.options.disabled || this.options.type == "static") {
return false
}
this._refreshItems(f);
var d = null,
c = a(f.target).parents().each(function() {
if (a.data(this, e.widgetName + "-item") == e) {
d = a(this);
return false
}
});
if (a.data(f.target, e.widgetName + "-item") == e) {
d = a(f.target)
}
if (!d) {
return false
}
if (this.options.handle && !g) {
var h = false;
a(this.options.handle, d).find("*").andSelf().each(function() {
if (this == f.target) {
h = true
}
});
if (!h) {
return false
}
}
this.currentItem = d;
this._removeCurrentsFromItems();
return true
},
_mouseStart: function(e, f, c) {
var g = this.options;
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
};
a.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;
(g.cursorAt && this._adjustOffsetFromHelper(g.cursorAt));
this.domPosition = {
prev: this.currentItem.prev()[0],
parent: this.currentItem.parent()[0]
};
if (this.helper[0] != this.currentItem[0]) {
this.currentItem.hide()
}
this._createPlaceholder();
if (g.containment) {
this._setContainment()
}
if (g.cursor) {
if (a("body").css("cursor")) {
this._storedCursor = a("body").css("cursor")
}
a("body").css("cursor", g.cursor)
}
if (g.opacity) {
if (this.helper.css("opacity")) {
this._storedOpacity = this.helper.css("opacity")
}
this.helper.css("opacity", g.opacity)
}
if (g.zIndex) {
if (this.helper.css("zIndex")) {
this._storedZIndex = this.helper.css("zIndex")
}
this.helper.css("zIndex", g.zIndex)
}
if (this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML") {
this.overflowOffset = this.scrollParent.offset()
}
this._trigger("start", e, this._uiHash());
if (!this._preserveHelperProportions) {
this._cacheHelperProportions()
}
if (!c) {
for (var d = this.containers.length - 1; d >= 0; d--) {
this.containers[d]._trigger("activate", e, this._uiHash(this))
}
}
if (a.ui.ddmanager) {
a.ui.ddmanager.current = this
}
if (a.ui.ddmanager && !g.dropBehaviour) {
a.ui.ddmanager.prepareOffsets(this, e)
}
this.dragging = true;
this.helper.addClass("ui-sortable-helper");
this._mouseDrag(e);
return true
},
_mouseDrag: function(g) {
this.position = this._generatePosition(g);
this.positionAbs = this._convertPositionTo("absolute");
if (!this.lastPositionAbs) {
this.lastPositionAbs = this.positionAbs
}
if (this.options.scroll) {
var h = this.options,
c = false;
if (this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML") {
if ((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - g.pageY < h.scrollSensitivity) {
this.scrollParent[0].scrollTop = c = this.scrollParent[0].scrollTop + h.scrollSpeed
} else {
if (g.pageY - this.overflowOffset.top < h.scrollSensitivity) {
this.scrollParent[0].scrollTop = c = this.scrollParent[0].scrollTop - h.scrollSpeed
}
}
if ((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - g.pageX < h.scrollSensitivity) {
this.scrollParent[0].scrollLeft = c = this.scrollParent[0].scrollLeft + h.scrollSpeed
} else {
if (g.pageX - this.overflowOffset.left < h.scrollSensitivity) {
this.scrollParent[0].scrollLeft = c = this.scrollParent[0].scrollLeft - h.scrollSpeed
}
}
} else {
if (g.pageY - a(document).scrollTop() < h.scrollSensitivity) {
c = a(document).scrollTop(a(document).scrollTop() - h.scrollSpeed)
} else {
if (a(window).height() - (g.pageY - a(document).scrollTop()) < h.scrollSensitivity) {
c = a(document).scrollTop(a(document).scrollTop() + h.scrollSpeed)
}
}
if (g.pageX - a(document).scrollLeft() < h.scrollSensitivity) {
c = a(document).scrollLeft(a(document).scrollLeft() - h.scrollSpeed)
} else {
if (a(window).width() - (g.pageX - a(document).scrollLeft()) < h.scrollSensitivity) {
c = a(document).scrollLeft(a(document).scrollLeft() + h.scrollSpeed)
}
}
}
if (c !== false && a.ui.ddmanager && !h.dropBehaviour) {
a.ui.ddmanager.prepareOffsets(this, g)
}
}
this.positionAbs = this._convertPositionTo("absolute");
if (!this.options.axis || this.options.axis != "y") {
this.helper[0].style.left = this.position.left + "px"
}
if (!this.options.axis || this.options.axis != "x") {
this.helper[0].style.top = this.position.top + "px"
}
for (var e = this.items.length - 1; e >= 0; e--) {
var f = this.items[e],
d = f.item[0],
j = this._intersectsWithPointer(f);
if (!j) {
continue
}
if (f.instance !== this.currentContainer) {
continue
}
if (d != this.currentItem[0] && this.placeholder[j == 1 ? "next" : "prev"]()[0] != d && !a.contains(this.placeholder[0], d) && (this.options.type == "semi-dynamic" ? !a.contains(this.element[0], d) : true)) {
this.direction = j == 1 ? "down" : "up";
if (this.options.tolerance == "pointer" || this._intersectsWithSides(f)) {
this._rearrange(g, f)
} else {
break
}
this._trigger("change", g, this._uiHash());
break
}
}
this._contactContainers(g);
if (a.ui.ddmanager) {
a.ui.ddmanager.drag(this, g)
}
this._trigger("sort", g, this._uiHash());
this.lastPositionAbs = this.positionAbs;
return false
},
_mouseStop: function(d, e) {
if (!d) {
return
}
if (a.ui.ddmanager && !this.options.dropBehaviour) {
a.ui.ddmanager.drop(this, d)
}
if (this.options.revert) {
var c = this;
var f = this.placeholder.offset();
this.reverting = true;
a(this.helper).animate({
left: f.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
top: f.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
}, parseInt(this.options.revert, 10) || 500, function() {
c._clear(d)
})
} else {
this._clear(d, e)
}
return false
},
cancel: function() {
if (this.dragging) {
this._mouseUp({
target: null
});
if (this.options.helper == "original") {
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
} else {
this.currentItem.show()
}
for (var c = this.containers.length - 1; c >= 0; c--) {
this.containers[c]._trigger("deactivate", null, this._uiHash(this));
if (this.containers[c].containerCache.over) {
this.containers[c]._trigger("out", null, this._uiHash(this));
this.containers[c].containerCache.over = 0
}
}
}
if (this.placeholder) {
if (this.placeholder[0].parentNode) {
this.placeholder[0].parentNode.removeChild(this.placeholder[0])
}
if (this.options.helper != "original" && this.helper && this.helper[0].parentNode) {
this.helper.remove()
}
a.extend(this, {
helper: null,
dragging: false,
reverting: false,
_noFinalSort: null
});
if (this.domPosition.prev) {
a(this.domPosition.prev).after(this.currentItem)
} else {
a(this.domPosition.parent).prepend(this.currentItem)
}
}
return this
},
serialize: function(e) {
var c = this._getItemsAsjQuery(e && e.connected);
var d = [];
e = e || {};
a(c).each(function() {
var f = (a(e.item || this).attr(e.attribute || "id") || "").match(e.expression || (/(.+)[-=_](.+)/));
if (f) {
d.push((e.key || f[1] + "[]") + "=" + (e.key && e.expression ? f[1] : f[2]))
}
});
if (!d.length && e.key) {
d.push(e.key + "=")
}
return d.join("&")
},
toArray: function(e) {
var c = this._getItemsAsjQuery(e && e.connected);
var d = [];
e = e || {};
c.each(function() {
d.push(a(e.item || this).attr(e.attribute || "id") || "")
});
return d
},
_intersectsWith: function(n) {
var e = this.positionAbs.left,
d = e + this.helperProportions.width,
m = this.positionAbs.top,
k = m + this.helperProportions.height;
var f = n.left,
c = f + n.width,
o = n.top,
j = o + n.height;
var p = this.offset.click.top,
h = this.offset.click.left;
var g = (m + p) > o && (m + p) < j && (e + h) > f && (e + h) < c;
if (this.options.tolerance == "pointer" || this.options.forcePointerForContainers || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? "width" : "height"] > n[this.floating ? "width" : "height"])) {
return g
} else {
return (f < e + (this.helperProportions.width / 2) && d - (this.helperProportions.width / 2) < c && o < m + (this.helperProportions.height / 2) && k - (this.helperProportions.height / 2) < j)
}
},
_intersectsWithPointer: function(e) {
var f = (this.options.axis === "x") || a.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, e.top, e.height),
d = (this.options.axis === "y") || a.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, e.left, e.width),
h = f && d,
c = this._getDragVerticalDirection(),
g = this._getDragHorizontalDirection();
if (!h) {
return false
}
return this.floating ? (((g && g == "right") || c == "down") ? 2 : 1) : (c && (c == "down" ? 2 : 1))
},
_intersectsWithSides: function(f) {
var d = a.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, f.top + (f.height / 2), f.height),
e = a.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, f.left + (f.width / 2), f.width),
c = this._getDragVerticalDirection(),
g = this._getDragHorizontalDirection();
if (this.floating && g) {
return ((g == "right" && e) || (g == "left" && !e))
} else {
return c && ((c == "down" && d) || (c == "up" && !d))
}
},
_getDragVerticalDirection: function() {
var c = this.positionAbs.top - this.lastPositionAbs.top;
return c != 0 && (c > 0 ? "down" : "up")
},
_getDragHorizontalDirection: function() {
var c = this.positionAbs.left - this.lastPositionAbs.left;
return c != 0 && (c > 0 ? "right" : "left")
},
refresh: function(c) {
this._refreshItems(c);
this.refreshPositions();
return this
},
_connectWith: function() {
var c = this.options;
return c.connectWith.constructor == String ? [c.connectWith] : c.connectWith
},
_getItemsAsjQuery: function(h) {
var c = [];
var e = [];
var g = this._connectWith();
if (g && h) {
for (var f = g.length - 1; f >= 0; f--) {
var l = a(g[f]);
for (var d = l.length - 1; d >= 0; d--) {
var k = a.data(l[d], this.widgetName);
if (k && k != this && !k.options.disabled) {
e.push([a.isFunction(k.options.items) ? k.options.items.call(k.element) : a(k.options.items, k.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), k])
}
}
}
}
e.push([a.isFunction(this.options.items) ? this.options.items.call(this.element, null, {
options: this.options,
item: this.currentItem
}) : a(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
for (var f = e.length - 1; f >= 0; f--) {
e[f][0].each(function() {
c.push(this)
})
}
return a(c)
},
_removeCurrentsFromItems: function() {
var c = this.currentItem.find(":data(" + this.widgetName + "-item)");
this.items = a.grep(this.items, function(e) {
for (var d = 0; d < c.length; d++) {
if (c[d] == e.item[0]) {
return false
}
}
return true
})
},
_refreshItems: function(c) {
this.items = [];
this.containers = [this];
var k = this.items;
var g = [
[a.isFunction(this.options.items) ? this.options.items.call(this.element[0], c, {
item: this.currentItem
}) : a(this.options.items, this.element), this]
];
var m = this._connectWith();
if (m && this.ready) {
for (var f = m.length - 1; f >= 0; f--) {
var n = a(m[f]);
for (var e = n.length - 1; e >= 0; e--) {
var h = a.data(n[e], this.widgetName);
if (h && h != this && !h.options.disabled) {
g.push([a.isFunction(h.options.items) ? h.options.items.call(h.element[0], c, {
item: this.currentItem
}) : a(h.options.items, h.element), h]);
this.containers.push(h)
}
}
}
}
for (var f = g.length - 1; f >= 0; f--) {
var l = g[f][1];
var d = g[f][0];
for (var e = 0, o = d.length; e < o; e++) {
var p = a(d[e]);
p.data(this.widgetName + "-item", l);
k.push({
item: p,
instance: l,
width: 0,
height: 0,
left: 0,
top: 0
})
}
}
},
refreshPositions: function(c) {
if (this.offsetParent && this.helper) {
this.offset.parent = this._getParentOffset()
}
for (var e = this.items.length - 1; e >= 0; e--) {
var f = this.items[e];
if (f.instance != this.currentContainer && this.currentContainer && f.item[0] != this.currentItem[0]) {
continue
}
var d = this.options.toleranceElement ? a(this.options.toleranceElement, f.item) : f.item;
if (!c) {
f.width = d.outerWidth();
f.height = d.outerHeight()
}
var g = d.offset();
f.left = g.left;
f.top = g.top
}
if (this.options.custom && this.options.custom.refreshContainers) {
this.options.custom.refreshContainers.call(this)
} else {
for (var e = this.containers.length - 1; e >= 0; e--) {
var g = this.containers[e].element.offset();
this.containers[e].containerCache.left = g.left;
this.containers[e].containerCache.top = g.top;
this.containers[e].containerCache.width = this.containers[e].element.outerWidth();
this.containers[e].containerCache.height = this.containers[e].element.outerHeight()
}
}
return this
},
_createPlaceholder: function(d) {
d = d || this;
var e = d.options;
if (!e.placeholder || e.placeholder.constructor == String) {
var c = e.placeholder;
e.placeholder = {
element: function() {
var f = a(document.createElement(d.currentItem[0].nodeName)).addClass(c || d.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];
if (!c) {
f.style.visibility = "hidden"
}
return f
},
update: function(f, g) {
if (c && !e.forcePlaceholderSize) {
return
}
if (!g.height()) {
g.height(d.currentItem.innerHeight() - parseInt(d.currentItem.css("paddingTop") || 0, 10) - parseInt(d.currentItem.css("paddingBottom") || 0, 10))
}
if (!g.width()) {
g.width(d.currentItem.innerWidth() - parseInt(d.currentItem.css("paddingLeft") || 0, 10) - parseInt(d.currentItem.css("paddingRight") || 0, 10))
}
}
}
}
d.placeholder = a(e.placeholder.element.call(d.element, d.currentItem));
d.currentItem.after(d.placeholder);
e.placeholder.update(d, d.placeholder)
},
_contactContainers: function(c) {
var e = null,
n = null;
for (var h = this.containers.length - 1; h >= 0; h--) {
if (a.contains(this.currentItem[0], this.containers[h].element[0])) {
continue
}
if (this._intersectsWith(this.containers[h].containerCache)) {
if (e && a.contains(this.containers[h].element[0], e.element[0])) {
continue
}
e = this.containers[h];
n = h
} else {
if (this.containers[h].containerCache.over) {
this.containers[h]._trigger("out", c, this._uiHash(this));
this.containers[h].containerCache.over = 0
}
}
}
if (!e) {
return
}
if (this.containers.length === 1) {
this.containers[n]._trigger("over", c, this._uiHash(this));
this.containers[n].containerCache.over = 1
} else {
var m = 10000;
var k = null;
var l = this.containers[n].floating ? "left" : "top";
var o = this.containers[n].floating ? "width" : "height";
var d = this.positionAbs[l] + this.offset.click[l];
for (var f = this.items.length - 1; f >= 0; f--) {
if (!a.contains(this.containers[n].element[0], this.items[f].item[0])) {
continue
}
if (this.items[f].item[0] == this.currentItem[0]) {
continue
}
var p = this.items[f].item.offset()[l];
var g = false;
if (Math.abs(p - d) > Math.abs(p + this.items[f][o] - d)) {
g = true;
p += this.items[f][o]
}
if (Math.abs(p - d) < m) {
m = Math.abs(p - d);
k = this.items[f];
this.direction = g ? "up" : "down"
}
}
if (!k && !this.options.dropOnEmpty) {
return
}
this.currentContainer = this.containers[n];
k ? this._rearrange(c, k, null, true) : this._rearrange(c, null, this.containers[n].element, true);
this._trigger("change", c, this._uiHash());
this.containers[n]._trigger("change", c, this._uiHash(this));
this.options.placeholder.update(this.currentContainer, this.placeholder);
this.containers[n]._trigger("over", c, this._uiHash(this));
this.containers[n].containerCache.over = 1
}
},
_createHelper: function(d) {
var e = this.options;
var c = a.isFunction(e.helper) ? a(e.helper.apply(this.element[0], [d, this.currentItem])) : (e.helper == "clone" ? this.currentItem.clone() : this.currentItem);
if (!c.parents("body").length) {
a(e.appendTo != "parent" ? e.appendTo : this.currentItem[0].parentNode)[0].appendChild(c[0])
}
if (c[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")
}
}
if (c[0].style.width == "" || e.forceHelperSize) {
c.width(this.currentItem.width())
}
if (c[0].style.height == "" || e.forceHelperSize) {
c.height(this.currentItem.height())
}
return c
},
_adjustOffsetFromHelper: function(c) {
if (typeof c == "string") {
c = c.split(" ")
}
if (a.isArray(c)) {
c = {
left: +c[0],
top: +c[1] || 0
}
}
if ("left" in c) {
this.offset.click.left = c.left + this.margins.left
}
if ("right" in c) {
this.offset.click.left = this.helperProportions.width - c.right + this.margins.left
}
if ("top" in c) {
this.offset.click.top = c.top + this.margins.top
}
if ("bottom" in c) {
this.offset.click.top = this.helperProportions.height - c.bottom + this.margins.top
}
},
_getParentOffset: function() {
this.offsetParent = this.helper.offsetParent();
var c = this.offsetParent.offset();
if (this.cssPosition == "absolute" && this.scrollParent[0] != document && a.contains(this.scrollParent[0], this.offsetParent[0])) {
c.left += this.scrollParent.scrollLeft();
c.top += this.scrollParent.scrollTop()
}
if ((this.offsetParent[0] == document.body) || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && a.ui.ie)) {
c = {
top: 0,
left: 0
}
}
return {
top: c.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
left: c.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
}
},
_getRelativeOffset: function() {
if (this.cssPosition == "relative") {
var c = this.currentItem.position();
return {
top: c.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
left: c.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
}
} else {
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 f = this.options;
if (f.containment == "parent") {
f.containment = this.helper[0].parentNode
}
if (f.containment == "document" || f.containment == "window") {
this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, a(f.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (a(f.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]
}
if (!(/^(document|window|parent)$/).test(f.containment)) {
var d = a(f.containment)[0];
var e = a(f.containment).offset();
var c = (a(d).css("overflow") != "hidden");
this.containment = [e.left + (parseInt(a(d).css("borderLeftWidth"), 10) || 0) + (parseInt(a(d).css("paddingLeft"), 10) || 0) - this.margins.left, e.top + (parseInt(a(d).css("borderTopWidth"), 10) || 0) + (parseInt(a(d).css("paddingTop"), 10) || 0) - this.margins.top, e.left + (c ? Math.max(d.scrollWidth, d.offsetWidth) : d.offsetWidth) - (parseInt(a(d).css("borderLeftWidth"), 10) || 0) - (parseInt(a(d).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, e.top + (c ? Math.max(d.scrollHeight, d.offsetHeight) : d.offsetHeight) - (parseInt(a(d).css("borderTopWidth"), 10) || 0) - (parseInt(a(d).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top]
}
},
_convertPositionTo: function(g, j) {
if (!j) {
j = this.position
}
var e = g == "absolute" ? 1 : -1;
var f = this.options,
c = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && a.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
h = (/(html|body)/i).test(c[0].tagName);
return {
top: (j.top + this.offset.relative.top * e + this.offset.parent.top * e - ((this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (h ? 0 : c.scrollTop())) * e)),
left: (j.left + this.offset.relative.left * e + this.offset.parent.left * e - ((this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : h ? 0 : c.scrollLeft()) * e))
}
},
_generatePosition: function(f) {
var j = this.options,
c = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && a.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
k = (/(html|body)/i).test(c[0].tagName);
if (this.cssPosition == "relative" && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
this.offset.relative = this._getRelativeOffset()
}
var e = f.pageX;
var d = f.pageY;
if (this.originalPosition) {
if (this.containment) {
if (f.pageX - this.offset.click.left < this.containment[0]) {
e = this.containment[0] + this.offset.click.left
}
if (f.pageY - this.offset.click.top < this.containment[1]) {
d = this.containment[1] + this.offset.click.top
}
if (f.pageX - this.offset.click.left > this.containment[2]) {
e = this.containment[2] + this.offset.click.left
}
if (f.pageY - this.offset.click.top > this.containment[3]) {
d = this.containment[3] + this.offset.click.top
}
}
if (j.grid) {
var h = this.originalPageY + Math.round((d - this.originalPageY) / j.grid[1]) * j.grid[1];
d = this.containment ? (!(h - this.offset.click.top < this.containment[1] || h - this.offset.click.top > this.containment[3]) ? h : (!(h - this.offset.click.top < this.containment[1]) ? h - j.grid[1] : h + j.grid[1])) : h;
var g = this.originalPageX + Math.round((e - this.originalPageX) / j.grid[0]) * j.grid[0];
e = this.containment ? (!(g - this.offset.click.left < this.containment[0] || g - this.offset.click.left > this.containment[2]) ? g : (!(g - this.offset.click.left < this.containment[0]) ? g - j.grid[0] : g + j.grid[0])) : g
}
}
return {
top: (d - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ((this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (k ? 0 : c.scrollTop())))),
left: (e - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ((this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : k ? 0 : c.scrollLeft())))
}
},
_rearrange: function(g, f, d, e) {
d ? d[0].appendChild(this.placeholder[0]) : f.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == "down" ? f.item[0] : f.item[0].nextSibling));
this.counter = this.counter ? ++this.counter : 1;
var c = this.counter;
this._delay(function() {
if (c == this.counter) {
this.refreshPositions(!e)
}
})
},
_clear: function(d, e) {
this.reverting = false;
var f = [];
if (!this._noFinalSort && this.currentItem.parent().length) {
this.placeholder.before(this.currentItem)
}
this._noFinalSort = null;
if (this.helper[0] == this.currentItem[0]) {
for (var c in this._storedCSS) {
if (this._storedCSS[c] == "auto" || this._storedCSS[c] == "static") {
this._storedCSS[c] = ""
}
}
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
} else {
this.currentItem.show()
}
if (this.fromOutside && !e) {
f.push(function(g) {
this._trigger("receive", g, this._uiHash(this.fromOutside))
})
}
if ((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !e) {
f.push(function(g) {
this._trigger("update", g, this._uiHash())
})
}
if (this !== this.currentContainer) {
if (!e) {
f.push(function(g) {
this._trigger("remove", g, this._uiHash())
});
f.push((function(g) {
return function(h) {
g._trigger("receive", h, this._uiHash(this))
}
}).call(this, this.currentContainer));
f.push((function(g) {
return function(h) {
g._trigger("update", h, this._uiHash(this))
}
}).call(this, this.currentContainer))
}
}
for (var c = this.containers.length - 1; c >= 0; c--) {
if (!e) {
f.push((function(g) {
return function(h) {
g._trigger("deactivate", h, this._uiHash(this))
}
}).call(this, this.containers[c]))
}
if (this.containers[c].containerCache.over) {
f.push((function(g) {
return function(h) {
g._trigger("out", h, this._uiHash(this))
}
}).call(this, this.containers[c]));
this.containers[c].containerCache.over = 0
}
}
if (this._storedCursor) {
a("body").css("cursor", this._storedCursor)
}
if (this._storedOpacity) {
this.helper.css("opacity", this._storedOpacity)
}
if (this._storedZIndex) {
this.helper.css("zIndex", this._storedZIndex == "auto" ? "" : this._storedZIndex)
}
this.dragging = false;
if (this.cancelHelperRemoval) {
if (!e) {
this._trigger("beforeStop", d, this._uiHash());
for (var c = 0; c < f.length; c++) {
f[c].call(this, d)
}
this._trigger("stop", d, this._uiHash())
}
this.fromOutside = false;
return false
}
if (!e) {
this._trigger("beforeStop", d, this._uiHash())
}
this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
if (this.helper[0] != this.currentItem[0]) {
this.helper.remove()
}
this.helper = null;
if (!e) {
for (var c = 0; c < f.length; c++) {
f[c].call(this, d)
}
this._trigger("stop", d, this._uiHash())
}
this.fromOutside = false;
return true
},
_trigger: function() {
if (a.Widget.prototype._trigger.apply(this, arguments) === false) {
this.cancel()
}
},
_uiHash: function(c) {
var d = c || this;
return {
helper: d.helper,
placeholder: d.placeholder || a([]),
position: d.position,
originalPosition: d.originalPosition,
offset: d.positionAbs,
item: d.currentItem,
sender: c ? c.element : null
}
}
})
})(jQuery);
(function(b) {
function a(c) {
return function() {
var d = this.element.val();
c.apply(this, arguments);
this._refresh();
if (d !== this.element.val()) {
this._trigger("change")
}
}
}
b.widget("ui.spinner", {
version: "1.9.2",
defaultElement: "",
widgetEventPrefix: "spin",
options: {
culture: null,
icons: {
down: "ui-icon-triangle-1-s",
up: "ui-icon-triangle-1-n"
},
incremental: true,
max: null,
min: null,
numberFormat: null,
page: 10,
step: 1,
change: null,
spin: null,
start: null,
stop: null
},
_create: function() {
this._setOption("max", this.options.max);
this._setOption("min", this.options.min);
this._setOption("step", this.options.step);
this._value(this.element.val(), true);
this._draw();
this._on(this._events);
this._refresh();
this._on(this.window, {
beforeunload: function() {
this.element.removeAttr("autocomplete")
}
})
},
_getCreateOptions: function() {
var c = {},
d = this.element;
b.each(["min", "max", "step"], function(e, f) {
var g = d.attr(f);
if (g !== undefined && g.length) {
c[f] = g
}
});
return c
},
_events: {
keydown: function(c) {
if (this._start(c) && this._keydown(c)) {
c.preventDefault()
}
},
keyup: "_stop",
focus: function() {
this.previous = this.element.val()
},
blur: function(c) {
if (this.cancelBlur) {
delete this.cancelBlur;
return
}
this._refresh();
if (this.previous !== this.element.val()) {
this._trigger("change", c)
}
},
mousewheel: function(c, d) {
if (!d) {
return
}
if (!this.spinning && !this._start(c)) {
return false
}
this._spin((d > 0 ? 1 : -1) * this.options.step, c);
clearTimeout(this.mousewheelTimer);
this.mousewheelTimer = this._delay(function() {
if (this.spinning) {
this._stop(c)
}
}, 100);
c.preventDefault()
},
"mousedown .ui-spinner-button": function(d) {
var c;
c = this.element[0] === this.document[0].activeElement ? this.previous : this.element.val();
function e() {
var f = this.element[0] === this.document[0].activeElement;
if (!f) {
this.element.focus();
this.previous = c;
this._delay(function() {
this.previous = c
})
}
}
d.preventDefault();
e.call(this);
this.cancelBlur = true;
this._delay(function() {
delete this.cancelBlur;
e.call(this)
});
if (this._start(d) === false) {
return
}
this._repeat(null, b(d.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, d)
},
"mouseup .ui-spinner-button": "_stop",
"mouseenter .ui-spinner-button": function(c) {
if (!b(c.currentTarget).hasClass("ui-state-active")) {
return
}
if (this._start(c) === false) {
return false
}
this._repeat(null, b(c.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, c)
},
"mouseleave .ui-spinner-button": "_stop"
},
_draw: function() {
var c = this.uiSpinner = this.element.addClass("ui-spinner-input").attr("autocomplete", "off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());
this.element.attr("role", "spinbutton");
this.buttons = c.find(".ui-spinner-button").attr("tabIndex", -1).button().removeClass("ui-corner-all");
if (this.buttons.height() > Math.ceil(c.height() * 0.5) && c.height() > 0) {
c.height(c.height())
}
if (this.options.disabled) {
this.disable()
}
},
_keydown: function(d) {
var c = this.options,
e = b.ui.keyCode;
switch (d.keyCode) {
case e.UP:
this._repeat(null, 1, d);
return true;
case e.DOWN:
this._repeat(null, -1, d);
return true;
case e.PAGE_UP:
this._repeat(null, c.page, d);
return true;
case e.PAGE_DOWN:
this._repeat(null, -c.page, d);
return true
}
return false
},
_uiSpinnerHtml: function() {
return ""
},
_buttonHtml: function() {
return "▲▼"
},
_start: function(c) {
if (!this.spinning && this._trigger("start", c) === false) {
return false
}
if (!this.counter) {
this.counter = 1
}
this.spinning = true;
return true
},
_repeat: function(d, c, e) {
d = d || 500;
clearTimeout(this.timer);
this.timer = this._delay(function() {
this._repeat(40, c, e)
}, d);
this._spin(c * this.options.step, e)
},
_spin: function(d, c) {
var e = this.value() || 0;
if (!this.counter) {
this.counter = 1
}
e = this._adjustValue(e + d * this._increment(this.counter));
if (!this.spinning || this._trigger("spin", c, {
value: e
}) !== false) {
this._value(e);
this.counter++
}
},
_increment: function(c) {
var d = this.options.incremental;
if (d) {
return b.isFunction(d) ? d(c) : Math.floor(c * c * c / 50000 - c * c / 500 + 17 * c / 200 + 1)
}
return 1
},
_precision: function() {
var c = this._precisionOf(this.options.step);
if (this.options.min !== null) {
c = Math.max(c, this._precisionOf(this.options.min))
}
return c
},
_precisionOf: function(d) {
var e = d.toString(),
c = e.indexOf(".");
return c === -1 ? 0 : e.length - c - 1
},
_adjustValue: function(e) {
var d, f, c = this.options;
d = c.min !== null ? c.min : 0;
f = e - d;
f = Math.round(f / c.step) * c.step;
e = d + f;
e = parseFloat(e.toFixed(this._precision()));
if (c.max !== null && e > c.max) {
return c.max
}
if (c.min !== null && e < c.min) {
return c.min
}
return e
},
_stop: function(c) {
if (!this.spinning) {
return
}
clearTimeout(this.timer);
clearTimeout(this.mousewheelTimer);
this.counter = 0;
this.spinning = false;
this._trigger("stop", c)
},
_setOption: function(c, d) {
if (c === "culture" || c === "numberFormat") {
var e = this._parse(this.element.val());
this.options[c] = d;
this.element.val(this._format(e));
return
}
if (c === "max" || c === "min" || c === "step") {
if (typeof d === "string") {
d = this._parse(d)
}
}
this._super(c, d);
if (c === "disabled") {
if (d) {
this.element.prop("disabled", true);
this.buttons.button("disable")
} else {
this.element.prop("disabled", false);
this.buttons.button("enable")
}
}
},
_setOptions: a(function(c) {
this._super(c);
this._value(this.element.val())
}),
_parse: function(c) {
if (typeof c === "string" && c !== "") {
c = window.Globalize && this.options.numberFormat ? Globalize.parseFloat(c, 10, this.options.culture) : +c
}
return c === "" || isNaN(c) ? null : c
},
_format: function(c) {
if (c === "") {
return ""
}
return window.Globalize && this.options.numberFormat ? Globalize.format(c, this.options.numberFormat, this.options.culture) : c
},
_refresh: function() {
this.element.attr({
"aria-valuemin": this.options.min,
"aria-valuemax": this.options.max,
"aria-valuenow": this._parse(this.element.val())
})
},
_value: function(e, c) {
var d;
if (e !== "") {
d = this._parse(e);
if (d !== null) {
if (!c) {
d = this._adjustValue(d)
}
e = this._format(d)
}
}
this.element.val(e);
this._refresh()
},
_destroy: function() {
this.element.removeClass("ui-spinner-input").prop("disabled", false).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
this.uiSpinner.replaceWith(this.element)
},
stepUp: a(function(c) {
this._stepUp(c)
}),
_stepUp: function(c) {
this._spin((c || 1) * this.options.step)
},
stepDown: a(function(c) {
this._stepDown(c)
}),
_stepDown: function(c) {
this._spin((c || 1) * -this.options.step)
},
pageUp: a(function(c) {
this._stepUp((c || 1) * this.options.page)
}),
pageDown: a(function(c) {
this._stepDown((c || 1) * this.options.page)
}),
value: function(c) {
if (!arguments.length) {
return this._parse(this.element.val())
}
a(this._value).call(this, c)
},
widget: function() {
return this.uiSpinner
}
})
}(jQuery));
(function(c, e) {
var a = 0,
f = /#.*$/;
function d() {
return ++a
}
function b(g) {
return g.hash.length > 1 && g.href.replace(f, "") === location.href.replace(f, "").replace(/\s/g, "%20")
}
c.widget("ui.tabs", {
version: "1.9.2",
delay: 300,
options: {
active: null,
collapsible: false,
event: "click",
heightStyle: "content",
hide: null,
show: null,
activate: null,
beforeActivate: null,
beforeLoad: null,
load: null
},
_create: function() {
var h = this,
g = this.options,
j = g.active,
k = location.hash.substring(1);
this.running = false;
this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible", g.collapsible).delegate(".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function(l) {
if (c(this).is(".ui-state-disabled")) {
l.preventDefault()
}
}).delegate(".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
if (c(this).closest("li").is(".ui-state-disabled")) {
this.blur()
}
});
this._processTabs();
if (j === null) {
if (k) {
this.tabs.each(function(l, m) {
if (c(m).attr("aria-controls") === k) {
j = l;
return false
}
})
}
if (j === null) {
j = this.tabs.index(this.tabs.filter(".ui-tabs-active"))
}
if (j === null || j === -1) {
j = this.tabs.length ? 0 : false
}
}
if (j !== false) {
j = this.tabs.index(this.tabs.eq(j));
if (j === -1) {
j = g.collapsible ? false : 0
}
}
g.active = j;
if (!g.collapsible && g.active === false && this.anchors.length) {
g.active = 0
}
if (c.isArray(g.disabled)) {
g.disabled = c.unique(g.disabled.concat(c.map(this.tabs.filter(".ui-state-disabled"), function(l) {
return h.tabs.index(l)
}))).sort()
}
if (this.options.active !== false && this.anchors.length) {
this.active = this._findActive(this.options.active)
} else {
this.active = c()
}
this._refresh();
if (this.active.length) {
this.load(g.active)
}
},
_getCreateEventData: function() {
return {
tab: this.active,
panel: !this.active.length ? c() : this._getPanelForTab(this.active)
}
},
_tabKeydown: function(j) {
var h = c(this.document[0].activeElement).closest("li"),
g = this.tabs.index(h),
k = true;
if (this._handlePageNav(j)) {
return
}
switch (j.keyCode) {
case c.ui.keyCode.RIGHT:
case c.ui.keyCode.DOWN:
g++;
break;
case c.ui.keyCode.UP:
case c.ui.keyCode.LEFT:
k = false;
g--;
break;
case c.ui.keyCode.END:
g = this.anchors.length - 1;
break;
case c.ui.keyCode.HOME:
g = 0;
break;
case c.ui.keyCode.SPACE:
j.preventDefault();
clearTimeout(this.activating);
this._activate(g);
return;
case c.ui.keyCode.ENTER:
j.preventDefault();
clearTimeout(this.activating);
this._activate(g === this.options.active ? false : g);
return;
default:
return
}
j.preventDefault();
clearTimeout(this.activating);
g = this._focusNextTab(g, k);
if (!j.ctrlKey) {
h.attr("aria-selected", "false");
this.tabs.eq(g).attr("aria-selected", "true");
this.activating = this._delay(function() {
this.option("active", g)
}, this.delay)
}
},
_panelKeydown: function(g) {
if (this._handlePageNav(g)) {
return
}
if (g.ctrlKey && g.keyCode === c.ui.keyCode.UP) {
g.preventDefault();
this.active.focus()
}
},
_handlePageNav: function(g) {
if (g.altKey && g.keyCode === c.ui.keyCode.PAGE_UP) {
this._activate(this._focusNextTab(this.options.active - 1, false));
return true
}
if (g.altKey && g.keyCode === c.ui.keyCode.PAGE_DOWN) {
this._activate(this._focusNextTab(this.options.active + 1, true));
return true
}
},
_findNextTab: function(h, j) {
var g = this.tabs.length - 1;
function k() {
if (h > g) {
h = 0
}
if (h < 0) {
h = g
}
return h
}
while (c.inArray(k(), this.options.disabled) !== -1) {
h = j ? h + 1 : h - 1
}
return h
},
_focusNextTab: function(g, h) {
g = this._findNextTab(g, h);
this.tabs.eq(g).focus();
return g
},
_setOption: function(g, h) {
if (g === "active") {
this._activate(h);
return
}
if (g === "disabled") {
this._setupDisabled(h);
return
}
this._super(g, h);
if (g === "collapsible") {
this.element.toggleClass("ui-tabs-collapsible", h);
if (!h && this.options.active === false) {
this._activate(0)
}
}
if (g === "event") {
this._setupEvents(h)
}
if (g === "heightStyle") {
this._setupHeightStyle(h)
}
},
_tabId: function(g) {
return g.attr("aria-controls") || "ui-tabs-" + d()
},
_sanitizeSelector: function(g) {
return g ? g.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : ""
},
refresh: function() {
var h = this.options,
g = this.tablist.children(":has(a[href])");
h.disabled = c.map(g.filter(".ui-state-disabled"), function(j) {
return g.index(j)
});
this._processTabs();
if (h.active === false || !this.anchors.length) {
h.active = false;
this.active = c()
} else {
if (this.active.length && !c.contains(this.tablist[0], this.active[0])) {
if (this.tabs.length === h.disabled.length) {
h.active = false;
this.active = c()
} else {
this._activate(this._findNextTab(Math.max(0, h.active - 1), false))
}
} else {
h.active = this.tabs.index(this.active)
}
}
this._refresh()
},
_refresh: function() {
this._setupDisabled(this.options.disabled);
this._setupEvents(this.options.event);
this._setupHeightStyle(this.options.heightStyle);
this.tabs.not(this.active).attr({
"aria-selected": "false",
tabIndex: -1
});
this.panels.not(this._getPanelForTab(this.active)).hide().attr({
"aria-expanded": "false",
"aria-hidden": "true"
});
if (!this.active.length) {
this.tabs.eq(0).attr("tabIndex", 0)
} else {
this.active.addClass("ui-tabs-active ui-state-active").attr({
"aria-selected": "true",
tabIndex: 0
});
this._getPanelForTab(this.active).show().attr({
"aria-expanded": "true",
"aria-hidden": "false"
})
}
},
_processTabs: function() {
var g = this;
this.tablist = this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role", "tablist");
this.tabs = this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({
role: "tab",
tabIndex: -1
});
this.anchors = this.tabs.map(function() {
return c("a", this)[0]
}).addClass("ui-tabs-anchor").attr({
role: "presentation",
tabIndex: -1
});
this.panels = c();
this.anchors.each(function(n, l) {
var h, j, m, k = c(l).uniqueId().attr("id"),
o = c(l).closest("li"),
p = o.attr("aria-controls");
if (b(l)) {
h = l.hash;
j = g.element.find(g._sanitizeSelector(h))
} else {
m = g._tabId(o);
h = "#" + m;
j = g.element.find(h);
if (!j.length) {
j = g._createPanel(m);
j.insertAfter(g.panels[n - 1] || g.tablist)
}
j.attr("aria-live", "polite")
}
if (j.length) {
g.panels = g.panels.add(j)
}
if (p) {
o.data("ui-tabs-aria-controls", p)
}
o.attr({
"aria-controls": h.substring(1),
"aria-labelledby": k
});
j.attr("aria-labelledby", k)
});
this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role", "tabpanel")
},
_getList: function() {
return this.element.find("ol,ul").eq(0)
},
_createPanel: function(g) {
return c("").attr("id", g).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy", true)
},
_setupDisabled: function(j) {
if (c.isArray(j)) {
if (!j.length) {
j = false
} else {
if (j.length === this.anchors.length) {
j = true
}
}
}
for (var h = 0, g;
(g = this.tabs[h]); h++) {
if (j === true || c.inArray(h, j) !== -1) {
c(g).addClass("ui-state-disabled").attr("aria-disabled", "true")
} else {
c(g).removeClass("ui-state-disabled").removeAttr("aria-disabled")
}
}
this.options.disabled = j
},
_setupEvents: function(h) {
var g = {
click: function(j) {
j.preventDefault()
}
};
if (h) {
c.each(h.split(" "), function(k, j) {
g[j] = "_eventHandler"
})
}
this._off(this.anchors.add(this.tabs).add(this.panels));
this._on(this.anchors, g);
this._on(this.tabs, {
keydown: "_tabKeydown"
});
this._on(this.panels, {
keydown: "_panelKeydown"
});
this._focusable(this.tabs);
this._hoverable(this.tabs)
},
_setupHeightStyle: function(g) {
var j, k, h = this.element.parent();
if (g === "fill") {
if (!c.support.minHeight) {
k = h.css("overflow");
h.css("overflow", "hidden")
}
j = h.height();
this.element.siblings(":visible").each(function() {
var m = c(this),
l = m.css("position");
if (l === "absolute" || l === "fixed") {
return
}
j -= m.outerHeight(true)
});
if (k) {
h.css("overflow", k)
}
this.element.children().not(this.panels).each(function() {
j -= c(this).outerHeight(true)
});
this.panels.each(function() {
c(this).height(Math.max(0, j - c(this).innerHeight() + c(this).height()))
}).css("overflow", "auto")
} else {
if (g === "auto") {
j = 0;
this.panels.each(function() {
j = Math.max(j, c(this).height("").height())
}).height(j)
}
}
},
_eventHandler: function(g) {
var q = this.options,
l = this.active,
m = c(g.currentTarget),
k = m.closest("li"),
o = k[0] === l[0],
h = o && q.collapsible,
j = h ? c() : this._getPanelForTab(k),
n = !l.length ? c() : this._getPanelForTab(l),
p = {
oldTab: l,
oldPanel: n,
newTab: h ? c() : k,
newPanel: j
};
g.preventDefault();
if (k.hasClass("ui-state-disabled") || k.hasClass("ui-tabs-loading") || this.running || (o && !q.collapsible) || (this._trigger("beforeActivate", g, p) === false)) {
return
}
q.active = h ? false : this.tabs.index(k);
this.active = o ? c() : k;
if (this.xhr) {
this.xhr.abort()
}
if (!n.length && !j.length) {
c.error("jQuery UI Tabs: Mismatching fragment identifier.")
}
if (j.length) {
this.load(this.tabs.index(k), g)
}
this._toggle(g, p)
},
_toggle: function(n, m) {
var l = this,
g = m.newPanel,
k = m.oldPanel;
this.running = true;
function j() {
l.running = false;
l._trigger("activate", n, m)
}
function h() {
m.newTab.closest("li").addClass("ui-tabs-active ui-state-active");
if (g.length && l.options.show) {
l._show(g, l.options.show, j)
} else {
g.show();
j()
}
}
if (k.length && this.options.hide) {
this._hide(k, this.options.hide, function() {
m.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");
h()
})
} else {
m.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");
k.hide();
h()
}
k.attr({
"aria-expanded": "false",
"aria-hidden": "true"
});
m.oldTab.attr("aria-selected", "false");
if (g.length && k.length) {
m.oldTab.attr("tabIndex", -1)
} else {
if (g.length) {
this.tabs.filter(function() {
return c(this).attr("tabIndex") === 0
}).attr("tabIndex", -1)
}
}
g.attr({
"aria-expanded": "true",
"aria-hidden": "false"
});
m.newTab.attr({
"aria-selected": "true",
tabIndex: 0
})
},
_activate: function(h) {
var g, j = this._findActive(h);
if (j[0] === this.active[0]) {
return
}
if (!j.length) {
j = this.active
}
g = j.find(".ui-tabs-anchor")[0];
this._eventHandler({
target: g,
currentTarget: g,
preventDefault: c.noop
})
},
_findActive: function(g) {
return g === false ? c() : this.tabs.eq(g)
},
_getIndex: function(g) {
if (typeof g === "string") {
g = this.anchors.index(this.anchors.filter("[href$='" + g + "']"))
}
return g
},
_destroy: function() {
if (this.xhr) {
this.xhr.abort()
}
this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");
this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");
this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeData("href.tabs").removeData("load.tabs").removeUniqueId();
this.tabs.add(this.panels).each(function() {
if (c.data(this, "ui-tabs-destroy")) {
c(this).remove()
} else {
c(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")
}
});
this.tabs.each(function() {
var g = c(this),
h = g.data("ui-tabs-aria-controls");
if (h) {
g.attr("aria-controls", h)
} else {
g.removeAttr("aria-controls")
}
});
this.panels.show();
if (this.options.heightStyle !== "content") {
this.panels.css("height", "")
}
},
enable: function(g) {
var h = this.options.disabled;
if (h === false) {
return
}
if (g === e) {
h = false
} else {
g = this._getIndex(g);
if (c.isArray(h)) {
h = c.map(h, function(j) {
return j !== g ? j : null
})
} else {
h = c.map(this.tabs, function(j, k) {
return k !== g ? k : null
})
}
}
this._setupDisabled(h)
},
disable: function(g) {
var h = this.options.disabled;
if (h === true) {
return
}
if (g === e) {
h = true
} else {
g = this._getIndex(g);
if (c.inArray(g, h) !== -1) {
return
}
if (c.isArray(h)) {
h = c.merge([g], h).sort()
} else {
h = [g]
}
}
this._setupDisabled(h)
},
load: function(j, n) {
j = this._getIndex(j);
var m = this,
k = this.tabs.eq(j),
h = k.find(".ui-tabs-anchor"),
g = this._getPanelForTab(k),
l = {
tab: k,
panel: g
};
if (b(h[0])) {
return
}
this.xhr = c.ajax(this._ajaxSettings(h, n, l));
if (this.xhr && this.xhr.statusText !== "canceled") {
k.addClass("ui-tabs-loading");
g.attr("aria-busy", "true");
this.xhr.success(function(o) {
setTimeout(function() {
g.html(o);
m._trigger("load", n, l)
}, 1)
}).complete(function(p, o) {
setTimeout(function() {
if (o === "abort") {
m.panels.stop(false, true)
}
k.removeClass("ui-tabs-loading");
g.removeAttr("aria-busy");
if (p === m.xhr) {
delete m.xhr
}
}, 1)
})
}
},
_ajaxSettings: function(g, k, j) {
var h = this;
return {
url: g.attr("href"),
beforeSend: function(m, l) {
return h._trigger("beforeLoad", k, c.extend({
jqXHR: m,
ajaxSettings: l
}, j))
}
}
},
_getPanelForTab: function(g) {
var h = c(g).attr("aria-controls");
return this.element.find(this._sanitizeSelector("#" + h))
}
});
if (c.uiBackCompat !== false) {
c.ui.tabs.prototype._ui = function(h, g) {
return {
tab: h,
panel: g,
index: this.anchors.index(h)
}
};
c.widget("ui.tabs", c.ui.tabs, {
url: function(h, g) {
this.anchors.eq(h).attr("href", g)
}
});
c.widget("ui.tabs", c.ui.tabs, {
options: {
ajaxOptions: null,
cache: false
},
_create: function() {
this._super();
var g = this;
this._on({
tabsbeforeload: function(h, j) {
if (c.data(j.tab[0], "cache.tabs")) {
h.preventDefault();
return
}
j.jqXHR.success(function() {
if (g.options.cache) {
c.data(j.tab[0], "cache.tabs", true)
}
})
}
})
},
_ajaxSettings: function(h, j, k) {
var g = this.options.ajaxOptions;
return c.extend({}, g, {
error: function(n, l) {
try {
g.error(n, l, k.tab.closest("li").index(), k.tab[0])
} catch (m) {}
}
}, this._superApply(arguments))
},
_setOption: function(g, h) {
if (g === "cache" && h === false) {
this.anchors.removeData("cache.tabs")
}
this._super(g, h)
},
_destroy: function() {
this.anchors.removeData("cache.tabs");
this._super()
},
url: function(g) {
this.anchors.eq(g).removeData("cache.tabs");
this._superApply(arguments)
}
});
c.widget("ui.tabs", c.ui.tabs, {
abort: function() {
if (this.xhr) {
this.xhr.abort()
}
}
});
c.widget("ui.tabs", c.ui.tabs, {
options: {
spinner: "
Loading…"
},
_create: function() {
this._super();
this._on({
tabsbeforeload: function(j, k) {
if (j.target !== this.element[0] || !this.options.spinner) {
return
}
var h = k.tab.find("span"),
g = h.html();
h.html(this.options.spinner);
k.jqXHR.complete(function() {
h.html(g)
})
}
})
}
});
c.widget("ui.tabs", c.ui.tabs, {
options: {
enable: null,
disable: null
},
enable: function(j) {
var h = this.options,
g;
if (j && h.disabled === true || (c.isArray(h.disabled) && c.inArray(j, h.disabled) !== -1)) {
g = true
}
this._superApply(arguments);
if (g) {
this._trigger("enable", null, this._ui(this.anchors[j], this.panels[j]))
}
},
disable: function(j) {
var h = this.options,
g;
if (j && h.disabled === false || (c.isArray(h.disabled) && c.inArray(j, h.disabled) === -1)) {
g = true
}
this._superApply(arguments);
if (g) {
this._trigger("disable", null, this._ui(this.anchors[j], this.panels[j]))
}
}
});
c.widget("ui.tabs", c.ui.tabs, {
options: {
add: null,
remove: null,
tabTemplate: "
- #{label}
"
},
add: function(m, l, k) {
if (k === e) {
k = this.anchors.length
}
var n, h, j = this.options,
g = c(j.tabTemplate.replace(/#\{href\}/g, m).replace(/#\{label\}/g, l)),
o = !m.indexOf("#") ? m.replace("#", "") : this._tabId(g);
g.addClass("ui-state-default ui-corner-top").data("ui-tabs-destroy", true);
g.attr("aria-controls", o);
n = k >= this.tabs.length;
h = this.element.find("#" + o);
if (!h.length) {
h = this._createPanel(o);
if (n) {
if (k > 0) {
h.insertAfter(this.panels.eq(-1))
} else {
h.appendTo(this.element)
}
} else {
h.insertBefore(this.panels[k])
}
}
h.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide();
if (n) {
g.appendTo(this.tablist)
} else {
g.insertBefore(this.tabs[k])
}
j.disabled = c.map(j.disabled, function(p) {
return p >= k ? ++p : p
});
this.refresh();
if (this.tabs.length === 1 && j.active === false) {
this.option("active", 0)
}
this._trigger("add", null, this._ui(this.anchors[k], this.panels[k]));
return this
},
remove: function(j) {
j = this._getIndex(j);
var h = this.options,
k = this.tabs.eq(j).remove(),
g = this._getPanelForTab(k).remove();
if (k.hasClass("ui-tabs-active") && this.anchors.length > 2) {
this._activate(j + (j + 1 < this.anchors.length ? 1 : -1))
}
h.disabled = c.map(c.grep(h.disabled, function(l) {
return l !== j
}), function(l) {
return l >= j ? --l : l
});
this.refresh();
this._trigger("remove", null, this._ui(k.find("a")[0], g[0]));
return this
}
});
c.widget("ui.tabs", c.ui.tabs, {
length: function() {
return this.anchors.length
}
});
c.widget("ui.tabs", c.ui.tabs, {
options: {
idPrefix: "ui-tabs-"
},
_tabId: function(h) {
var g = h.is("li") ? h.find("a[href]") : h;
g = g[0];
return c(g).closest("li").attr("aria-controls") || g.title && g.title.replace(/\s/g, "_").replace(/[^\w\u00c0-\uFFFF\-]/g, "") || this.options.idPrefix + d()
}
});
c.widget("ui.tabs", c.ui.tabs, {
options: {
panelTemplate: "
"
},
_createPanel: function(g) {
return c(this.options.panelTemplate).attr("id", g).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy", true)
}
});
c.widget("ui.tabs", c.ui.tabs, {
_create: function() {
var g = this.options;
if (g.active === null && g.selected !== e) {
g.active = g.selected === -1 ? false : g.selected
}
this._super();
g.selected = g.active;
if (g.selected === false) {
g.selected = -1
}
},
_setOption: function(h, j) {
if (h !== "selected") {
return this._super(h, j)
}
var g = this.options;
this._super("active", j === -1 ? false : j);
g.selected = g.active;
if (g.selected === false) {
g.selected = -1
}
},
_eventHandler: function() {
this._superApply(arguments);
this.options.selected = this.options.active;
if (this.options.selected === false) {
this.options.selected = -1
}
}
});
c.widget("ui.tabs", c.ui.tabs, {
options: {
show: null,
select: null
},
_create: function() {
this._super();
if (this.options.active !== false) {
this._trigger("show", null, this._ui(this.active.find(".ui-tabs-anchor")[0], this._getPanelForTab(this.active)[0]))
}
},
_trigger: function(k, l, m) {
var j, g, h = this._superApply(arguments);
if (!h) {
return false
}
if (k === "beforeActivate") {
j = m.newTab.length ? m.newTab : m.oldTab;
g = m.newPanel.length ? m.newPanel : m.oldPanel;
h = this._super("select", l, {
tab: j.find(".ui-tabs-anchor")[0],
panel: g[0],
index: j.closest("li").index()
})
} else {
if (k === "activate" && m.newTab.length) {
h = this._super("show", l, {
tab: m.newTab.find(".ui-tabs-anchor")[0],
panel: m.newPanel[0],
index: m.newTab.closest("li").index()
})
}
}
return h
}
});
c.widget("ui.tabs", c.ui.tabs, {
select: function(g) {
g = this._getIndex(g);
if (g === -1) {
if (this.options.collapsible && this.options.selected !== -1) {
g = this.options.selected
} else {
return
}
}
this.anchors.eq(g).trigger(this.options.event + this.eventNamespace)
}
});
(function() {
var g = 0;
c.widget("ui.tabs", c.ui.tabs, {
options: {
cookie: null
},
_create: function() {
var h = this.options,
j;
if (h.active == null && h.cookie) {
j = parseInt(this._cookie(), 10);
if (j === -1) {
j = false
}
h.active = j
}
this._super()
},
_cookie: function(j) {
var h = [this.cookie || (this.cookie = this.options.cookie.name || "ui-tabs-" + (++g))];
if (arguments.length) {
h.push(j === false ? -1 : j);
h.push(this.options.cookie)
}
return c.cookie.apply(null, h)
},
_refresh: function() {
this._super();
if (this.options.cookie) {
this._cookie(this.options.active, this.options.cookie)
}
},
_eventHandler: function() {
this._superApply(arguments);
if (this.options.cookie) {
this._cookie(this.options.active, this.options.cookie)
}
},
_destroy: function() {
this._super();
if (this.options.cookie) {
this._cookie(null, this.options.cookie)
}
}
})
})();
c.widget("ui.tabs", c.ui.tabs, {
_trigger: function(h, j, k) {
var g = c.extend({}, k);
if (h === "load") {
g.panel = g.panel[0];
g.tab = g.tab.find(".ui-tabs-anchor")[0]
}
return this._super(h, j, g)
}
});
c.widget("ui.tabs", c.ui.tabs, {
options: {
fx: null
},
_getFx: function() {
var h, g, j = this.options.fx;
if (j) {
if (c.isArray(j)) {
h = j[0];
g = j[1]
} else {
h = g = j
}
}
return j ? {
show: g,
hide: h
} : null
},
_toggle: function(o, n) {
var m = this,
g = n.newPanel,
k = n.oldPanel,
l = this._getFx();
if (!l) {
return this._super(o, n)
}
m.running = true;
function j() {
m.running = false;
m._trigger("activate", o, n)
}
function h() {
n.newTab.closest("li").addClass("ui-tabs-active ui-state-active");
if (g.length && l.show) {
g.animate(l.show, l.show.duration, function() {
j()
})
} else {
g.show();
j()
}
}
if (k.length && l.hide) {
k.animate(l.hide, l.hide.duration, function() {
n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");
h()
})
} else {
n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");
k.hide();
h()
}
}
})
}
})(jQuery);
(function(d) {
var b = 0;
function c(f, g) {
var e = (f.attr("aria-describedby") || "").split(/\s+/);
e.push(g);
f.data("ui-tooltip-id", g).attr("aria-describedby", d.trim(e.join(" ")))
}
function a(g) {
var h = g.data("ui-tooltip-id"),
f = (g.attr("aria-describedby") || "").split(/\s+/),
e = d.inArray(h, f);
if (e !== -1) {
f.splice(e, 1)
}
g.removeData("ui-tooltip-id");
f = d.trim(f.join(" "));
if (f) {
g.attr("aria-describedby", f)
} else {
g.removeAttr("aria-describedby")
}
}
d.widget("ui.tooltip", {
version: "1.9.2",
options: {
content: function() {
var e = d(this).attr("title");
return d("
").text(e).html()
},
hide: true,
items: "[title]:not([disabled])",
position: {
my: "left top+15",
at: "left bottom",
collision: "flipfit flip"
},
show: true,
tooltipClass: null,
track: false,
close: null,
open: null
},
_create: function() {
this._on({
mouseover: "open",
focusin: "open"
});
this.tooltips = {};
this.parents = {};
if (this.options.disabled) {
this._disable()
}
},
_setOption: function(e, g) {
var f = this;
if (e === "disabled") {
this[g ? "_disable" : "_enable"]();
this.options[e] = g;
return
}
this._super(e, g);
if (e === "content") {
d.each(this.tooltips, function(j, h) {
f._updateContent(h)
})
}
},
_disable: function() {
var e = this;
d.each(this.tooltips, function(h, f) {
var g = d.Event("blur");
g.target = g.currentTarget = f[0];
e.close(g, true)
});
this.element.find(this.options.items).andSelf().each(function() {
var f = d(this);
if (f.is("[title]")) {
f.data("ui-tooltip-title", f.attr("title")).attr("title", "")
}
})
},
_enable: function() {
this.element.find(this.options.items).andSelf().each(function() {
var e = d(this);
if (e.data("ui-tooltip-title")) {
e.attr("title", e.data("ui-tooltip-title"))
}
})
},
open: function(f) {
var e = this,
g = d(f ? f.target : this.element).closest(this.options.items);
if (!g.length || g.data("ui-tooltip-id")) {
return
}
if (g.attr("title")) {
g.data("ui-tooltip-title", g.attr("title"))
}
g.data("ui-tooltip-open", true);
if (f && f.type === "mouseover") {
g.parents().each(function() {
var j = d(this),
h;
if (j.data("ui-tooltip-open")) {
h = d.Event("blur");
h.target = h.currentTarget = this;
e.close(h, true)
}
if (j.attr("title")) {
j.uniqueId();
e.parents[this.id] = {
element: this,
title: j.attr("title")
};
j.attr("title", "")
}
})
}
this._updateContent(g, f)
},
_updateContent: function(k, j) {
var h, e = this.options.content,
g = this,
f = j ? j.type : null;
if (typeof e === "string") {
return this._open(j, k, e)
}
h = e.call(k[0], function(l) {
if (!k.data("ui-tooltip-open")) {
return
}
g._delay(function() {
if (j) {
j.type = f
}
this._open(j, k, l)
})
});
if (h) {
this._open(j, k, h)
}
},
_open: function(j, l, h) {
var k, g, f, m = d.extend({}, this.options.position);
if (!h) {
return
}
k = this._find(l);
if (k.length) {
k.find(".ui-tooltip-content").html(h);
return
}
if (l.is("[title]")) {
if (j && j.type === "mouseover") {
l.attr("title", "")
} else {
l.removeAttr("title")
}
}
k = this._tooltip(l);
c(l, k.attr("id"));
k.find(".ui-tooltip-content").html(h);
function e(n) {
m.of = n;
if (k.is(":hidden")) {
return
}
k.position(m)
}
if (this.options.track && j && /^mouse/.test(j.type)) {
this._on(this.document, {
mousemove: e
});
e(j)
} else {
k.position(d.extend({ of: l
}, this.options.position))
}
k.hide();
this._show(k, this.options.show);
if (this.options.show && this.options.show.delay) {
f = setInterval(function() {
if (k.is(":visible")) {
e(m.of);
clearInterval(f)
}
}, d.fx.interval)
}
this._trigger("open", j, {
tooltip: k
});
g = {
keyup: function(n) {
if (n.keyCode === d.ui.keyCode.ESCAPE) {
var o = d.Event(n);
o.currentTarget = l[0];
this.close(o, true)
}
},
remove: function() {
this._removeTooltip(k)
}
};
if (!j || j.type === "mouseover") {
g.mouseleave = "close"
}
if (!j || j.type === "focusin") {
g.focusout = "close"
}
this._on(true, l, g)
},
close: function(f) {
var e = this,
h = d(f ? f.currentTarget : this.element),
g = this._find(h);
if (this.closing) {
return
}
if (h.data("ui-tooltip-title")) {
h.attr("title", h.data("ui-tooltip-title"))
}
a(h);
g.stop(true);
this._hide(g, this.options.hide, function() {
e._removeTooltip(d(this))
});
h.removeData("ui-tooltip-open");
this._off(h, "mouseleave focusout keyup");
if (h[0] !== this.element[0]) {
this._off(h, "remove")
}
this._off(this.document, "mousemove");
if (f && f.type === "mouseleave") {
d.each(this.parents, function(k, j) {
d(j.element).attr("title", j.title);
delete e.parents[k]
})
}
this.closing = true;
this._trigger("close", f, {
tooltip: g
});
this.closing = false
},
_tooltip: function(e) {
var g = "ui-tooltip-" + b++,
f = d("").attr({
id: g,
role: "tooltip"
}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content " + (this.options.tooltipClass || ""));
d("
").addClass("ui-tooltip-content").appendTo(f);
f.appendTo(this.document[0].body);
if (d.fn.bgiframe) {
f.bgiframe()
}
this.tooltips[g] = e;
return f
},
_find: function(e) {
var f = e.data("ui-tooltip-id");
return f ? d("#" + f) : d()
},
_removeTooltip: function(e) {
e.remove();
delete this.tooltips[e.attr("id")]
},
_destroy: function() {
var e = this;
d.each(this.tooltips, function(h, f) {
var g = d.Event("blur");
g.target = g.currentTarget = f[0];
e.close(g, true);
d("#" + h).remove();
if (f.data("ui-tooltip-title")) {
f.attr("title", f.data("ui-tooltip-title"));
f.removeData("ui-tooltip-title")
}
})
}
})
}(jQuery));
(function(d) {
d.widget("ui.widget", {
yield: null,
returnValues: {},
before: function(h, g) {
var e = this[h];
this[h] = function() {
g.apply(this, arguments);
return e.apply(this, arguments)
}
},
after: function(h, g) {
var e = this[h];
this[h] = function() {
this.returnValues[h] = e.apply(this, arguments);
return g.apply(this, arguments)
}
},
around: function(h, g) {
var e = this[h];
this[h] = function() {
var j = this["yield"];
this["yield"] = e;
var f = g.apply(this, arguments);
this["yield"] = j;
return f
}
}
});
var c = (function(e) {
return (function(f) {
e.prototype = f;
return new e()
})
})(function() {});
var a = /xyz/.test(function() {
xyz
}) ? /\b_super\b/ : /.*/;
d.ui.widget.subclass = function b(f) {
d.widget(f);
f = f.split(".");
var g = d[f[0]][f[1]],
l = this,
e = l.prototype;
var h = arguments[0] = g.prototype = c(e);
d.extend.apply(null, arguments);
g.subclass = b;
for (key in h) {
if (h.hasOwnProperty(key)) {
switch (key) {
case "_create":
var j = h._create;
h._create = function() {
e._create.apply(this);
j.apply(this)
};
break;
case "_init":
var m = h._init;
h._init = function() {
e._init.apply(this);
m.apply(this)
};
break;
case "destroy":
var k = h.destroy;
h.destroy = function() {
k.apply(this);
e.destroy.apply(this)
};
break;
case "options":
var n = h.options;
h.options = d.extend({}, e.options, n);
break;
default:
if (d.isFunction(h[key]) && d.isFunction(e[key]) && a.test(h[key])) {
h[key] = (function(o, p) {
return function() {
var r = this._super;
this._super = e[o];
try {
var q = p.apply(this, arguments)
} finally {
this._super = r
}
return q
}
})(key, h[key])
}
break
}
}
}
}
})(jQuery);
function Swipe(n, e) {
var f = function() {};
var w = function(E) {
setTimeout(E || f, 0)
};
var D = {
addEventListener: !!window.addEventListener,
touch: ("ontouchstart" in window) || window.DocumentTouch && document instanceof DocumentTouch,
transitions: (function(E) {
var G = ["transitionProperty", "WebkitTransition", "MozTransition", "OTransition", "msTransition"];
for (var F in G) {
if (E.style[G[F]] !== undefined) {
return true
}
}
return false
})(document.createElement("swipe"))
};
if (!n) {
return
}
var c = n.children[0];
var u, d, t, g;
e = e || {};
var l = parseInt(e.startSlide, 10) || 0;
var x = e.speed || 300;
e.continuous = e.continuous !== undefined ? e.continuous : true;
function o() {
u = c.children;
g = u.length;
if (u.length < 2) {
e.continuous = false
}
if (D.transitions && e.continuous && u.length < 3) {
c.appendChild(u[0].cloneNode(true));
c.appendChild(c.children[1].cloneNode(true));
u = c.children
}
d = new Array(u.length);
t = n.getBoundingClientRect().width || n.offsetWidth;
c.style.width = (u.length * t) + "px";
var F = u.length;
while (F--) {
var E = u[F];
E.style.width = t + "px";
E.setAttribute("data-index", F);
if (D.transitions) {
E.style.left = (F * -t) + "px";
r(F, l > F ? -t : (l < F ? t : 0), 0)
}
}
if (e.continuous && D.transitions) {
r(j(l - 1), -t, 0);
r(j(l + 1), t, 0)
}
if (!D.transitions) {
c.style.left = (l * -t) + "px"
}
n.style.visibility = "visible"
}
function p() {
if (e.continuous) {
a(l - 1)
} else {
if (l) {
a(l - 1)
}
}
}
function q() {
if (e.continuous) {
a(l + 1)
} else {
if (l < u.length - 1) {
a(l + 1)
}
}
}
function j(E) {
return (u.length + (E % u.length)) % u.length
}
function a(I, F) {
if (l == I) {
return
}
if (D.transitions) {
var H = Math.abs(l - I) / (l - I);
if (e.continuous) {
var E = H;
H = -d[j(I)] / t;
if (H !== E) {
I = -H * u.length + I
}
}
var G = Math.abs(l - I) - 1;
while (G--) {
r(j((I > l ? I : l) - G - 1), t * H, 0)
}
I = j(I);
r(l, t * H, F || x);
r(I, 0, F || x);
if (e.continuous) {
r(j(I - H), -(t * H), 0)
}
} else {
I = j(I);
k(l * -t, I * -t, F || x)
}
l = I;
w(e.callback && e.callback(l, u[l]))
}
function r(E, G, F) {
m(E, G, F);
d[E] = G
}
function m(F, I, H) {
var E = u[F];
var G = E && E.style;
if (!G) {
return
}
G.webkitTransitionDuration = G.MozTransitionDuration = G.msTransitionDuration = G.OTransitionDuration = G.transitionDuration = H + "ms";
G.webkitTransform = "translate(" + I + "px,0)translateZ(0)";
G.msTransform = G.MozTransform = G.OTransform = "translateX(" + I + "px)"
}
function k(I, H, E) {
if (!E) {
c.style.left = H + "px";
return
}
var G = +new Date;
var F = setInterval(function() {
var J = +new Date - G;
if (J > E) {
c.style.left = H + "px";
if (C) {
z()
}
e.transitionEnd && e.transitionEnd.call(event, l, u[l]);
clearInterval(F);
return
}
c.style.left = (((H - I) * (Math.floor((J / E) * 100) / 100)) + I) + "px"
}, 4)
}
var C = e.auto || 0;
var y;
function z() {
y = setTimeout(q, C)
}
function v() {
C = 0;
clearTimeout(y)
}
var h = {};
var A = {};
var B;
var b = {
handleEvent: function(E) {
switch (E.type) {
case "touchstart":
this.start(E);
break;
case "touchmove":
this.move(E);
break;
case "touchend":
w(this.end(E));
break;
case "webkitTransitionEnd":
case "msTransitionEnd":
case "oTransitionEnd":
case "otransitionend":
case "transitionend":
w(this.transitionEnd(E));
break;
case "resize":
w(o.call());
break
}
if (e.stopPropagation) {
E.stopPropagation()
}
},
start: function(E) {
var F = E.touches[0];
h = {
x: F.pageX,
y: F.pageY,
time: +new Date
};
B = undefined;
A = {};
c.addEventListener("touchmove", this, false);
c.addEventListener("touchend", this, false)
},
move: function(E) {
if (E.touches.length > 1 || E.scale && E.scale !== 1) {
return
}
if (e.disableScroll) {
E.preventDefault()
}
var F = E.touches[0];
A = {
x: F.pageX - h.x,
y: F.pageY - h.y
};
if (typeof B == "undefined") {
B = !!(B || Math.abs(A.x) < Math.abs(A.y))
}
if (!B) {
E.preventDefault();
v();
if (e.continuous) {
m(j(l - 1), A.x + d[j(l - 1)], 0);
m(l, A.x + d[l], 0);
m(j(l + 1), A.x + d[j(l + 1)], 0)
} else {
A.x = A.x / ((!l && A.x > 0 || l == u.length - 1 && A.x < 0) ? (Math.abs(A.x) / t + 1) : 1);
m(l - 1, A.x + d[l - 1], 0);
m(l, A.x + d[l], 0);
m(l + 1, A.x + d[l + 1], 0)
}
}
},
end: function(G) {
var I = +new Date - h.time;
var F = Number(I) < 250 && Math.abs(A.x) > 20 || Math.abs(A.x) > t / 2;
var E = !l && A.x > 0 || l == u.length - 1 && A.x < 0;
if (e.continuous) {
E = false
}
var H = A.x < 0;
if (!B) {
if (F && !E) {
if (H) {
if (e.continuous) {
r(j(l - 1), -t, 0);
r(j(l + 2), t, 0)
} else {
r(l - 1, -t, 0)
}
r(l, d[l] - t, x);
r(j(l + 1), d[j(l + 1)] - t, x);
l = j(l + 1)
} else {
if (e.continuous) {
r(j(l + 1), t, 0);
r(j(l - 2), -t, 0)
} else {
r(l + 1, t, 0)
}
r(l, d[l] + t, x);
r(j(l - 1), d[j(l - 1)] + t, x);
l = j(l - 1)
}
e.callback && e.callback(l, u[l])
} else {
if (e.continuous) {
r(j(l - 1), -t, x);
r(l, 0, x);
r(j(l + 1), t, x)
} else {
r(l - 1, -t, x);
r(l, 0, x);
r(l + 1, t, x)
}
}
}
c.removeEventListener("touchmove", b, false);
c.removeEventListener("touchend", b, false)
},
transitionEnd: function(E) {
if (parseInt(E.target.getAttribute("data-index"), 10) == l) {
if (C) {
z()
}
e.transitionEnd && e.transitionEnd.call(E, l, u[l])
}
}
};
o();
if (C) {
z()
}
if (D.addEventListener) {
if (D.touch) {
c.addEventListener("touchstart", b, false)
}
if (D.transitions) {
c.addEventListener("webkitTransitionEnd", b, false);
c.addEventListener("msTransitionEnd", b, false);
c.addEventListener("oTransitionEnd", b, false);
c.addEventListener("otransitionend", b, false);
c.addEventListener("transitionend", b, false)
}
window.addEventListener("resize", b, false)
} else {
window.onresize = function() {
o()
}
}
return {
setup: function() {
o()
},
slide: function(F, E) {
v();
a(F, E)
},
prev: function() {
v();
p()
},
next: function() {
v();
q()
},
getPos: function() {
return l
},
getNumSlides: function() {
return g
},
kill: function() {
v();
c.style.width = "auto";
c.style.left = 0;
var F = u.length;
while (F--) {
var E = u[F];
E.style.width = "100%";
E.style.left = 0;
if (D.transitions) {
m(F, 0, 0)
}
}
if (D.addEventListener) {
c.removeEventListener("touchstart", b, false);
c.removeEventListener("webkitTransitionEnd", b, false);
c.removeEventListener("msTransitionEnd", b, false);
c.removeEventListener("oTransitionEnd", b, false);
c.removeEventListener("otransitionend", b, false);
c.removeEventListener("transitionend", b, false);
window.removeEventListener("resize", b, false)
} else {
window.onresize = null
}
}
}
}
if (window.jQuery || window.Zepto) {
(function(a) {
a.fn.Swipe = function(b) {
return this.each(function() {
a(this).data("Swipe", new Swipe(a(this)[0], b))
})
}
})(window.jQuery || window.Zepto)
}
$(document).ready(function() {
var a = $(".currentPagePath").val();
});
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
;
if (typeof jQuery === "undefined") {
throw new Error("Bootstrap's JavaScript requires jQuery")
} + function(b) {
var a = b.fn.jquery.split(" ")[0].split(".");
if ((a[0] < 2 && a[1] < 9) || (a[0] == 1 && a[1] == 9 && a[2] < 1) || (a[0] > 2)) {
throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")
}
}(jQuery); +
function(b) {
function a() {
var e = document.createElement("bootstrap");
var d = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd otransitionend",
transition: "transitionend"
};
for (var c in d) {
if (e.style[c] !== undefined) {
return {
end: d[c]
}
}
}
return false
}
b.fn.emulateTransitionEnd = function(e) {
var d = false;
var c = this;
b(this).one("bsTransitionEnd", function() {
d = true
});
var f = function() {
if (!d) {
b(c).trigger(b.support.transition.end)
}
};
setTimeout(f, e);
return this
};
b(function() {
b.support.transition = a();
if (!b.support.transition) {
return
}
b.event.special.bsTransitionEnd = {
bindType: b.support.transition.end,
delegateType: b.support.transition.end,
handle: function(c) {
if (b(c.target).is(this)) {
return c.handleObj.handler.apply(this, arguments)
}
}
}
})
}(jQuery); +
function(e) {
var d = '[data-dismiss="alert"]';
var b = function(f) {
e(f).on("click", d, this.close)
};
b.VERSION = "3.3.6";
b.TRANSITION_DURATION = 150;
b.prototype.close = function(k) {
var j = e(this);
var g = j.attr("data-target");
if (!g) {
g = j.attr("href");
g = g && g.replace(/.*(?=#[^\s]*$)/, "")
}
var h = e(g);
if (k) {
k.preventDefault()
}
if (!h.length) {
h = j.closest(".alert")
}
h.trigger(k = e.Event("close.bs.alert"));
if (k.isDefaultPrevented()) {
return
}
h.removeClass("in");
function f() {
h.detach().trigger("closed.bs.alert").remove()
}
e.support.transition && h.hasClass("fade") ? h.one("bsTransitionEnd", f).emulateTransitionEnd(b.TRANSITION_DURATION) : f()
};
function c(f) {
return this.each(function() {
var h = e(this);
var g = h.data("bs.alert");
if (!g) {
h.data("bs.alert", (g = new b(this)))
}
if (typeof f == "string") {
g[f].call(h)
}
})
}
var a = e.fn.alert;
e.fn.alert = c;
e.fn.alert.Constructor = b;
e.fn.alert.noConflict = function() {
e.fn.alert = a;
return this
};
e(document).on("click.bs.alert.data-api", d, b.prototype.close)
}(jQuery); +
function(d) {
var b = function(f, e) {
this.$element = d(f);
this.options = d.extend({}, b.DEFAULTS, e);
this.isLoading = false
};
b.VERSION = "3.3.6";
b.DEFAULTS = {
loadingText: "loading..."
};
b.prototype.setState = function(g) {
var j = "disabled";
var e = this.$element;
var h = e.is("input") ? "val" : "html";
var f = e.data();
g += "Text";
if (f.resetText == null) {
e.data("resetText", e[h]())
}
setTimeout(d.proxy(function() {
e[h](f[g] == null ? this.options[g] : f[g]);
if (g == "loadingText") {
this.isLoading = true;
e.addClass(j).attr(j, j)
} else {
if (this.isLoading) {
this.isLoading = false;
e.removeClass(j).removeAttr(j)
}
}
}, this), 0)
};
b.prototype.toggle = function() {
var f = true;
var e = this.$element.closest('[data-toggle="buttons"]');
if (e.length) {
var g = this.$element.find("input");
if (g.prop("type") == "radio") {
if (g.prop("checked")) {
f = false
}
e.find(".active").removeClass("active");
this.$element.addClass("active")
} else {
if (g.prop("type") == "checkbox") {
if ((g.prop("checked")) !== this.$element.hasClass("active")) {
f = false
}
this.$element.toggleClass("active")
}
}
g.prop("checked", this.$element.hasClass("active"));
if (f) {
g.trigger("change")
}
} else {
this.$element.attr("aria-pressed", !this.$element.hasClass("active"));
this.$element.toggleClass("active")
}
};
function c(e) {
return this.each(function() {
var h = d(this);
var g = h.data("bs.button");
var f = typeof e == "object" && e;
if (!g) {
h.data("bs.button", (g = new b(this, f)))
}
if (e == "toggle") {
g.toggle()
} else {
if (e) {
g.setState(e)
}
}
})
}
var a = d.fn.button;
d.fn.button = c;
d.fn.button.Constructor = b;
d.fn.button.noConflict = function() {
d.fn.button = a;
return this
};
d(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function(g) {
var f = d(g.target);
if (!f.hasClass("btn")) {
f = f.closest(".btn")
}
c.call(f, "toggle");
if (!(d(g.target).is('input[type="radio"]') || d(g.target).is('input[type="checkbox"]'))) {
g.preventDefault()
}
}).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function(f) {
d(f.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(f.type))
})
}(jQuery); +
function(c) {
var d = function(g, f) {
this.$element = c(g);
this.$indicators = this.$element.find(".carousel-indicators");
this.options = f;
this.paused = null;
this.sliding = null;
this.interval = null;
this.$active = null;
this.$items = null;
this.options.keyboard && this.$element.on("keydown.bs.carousel", c.proxy(this.keydown, this));
this.options.pause == "hover" && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", c.proxy(this.pause, this)).on("mouseleave.bs.carousel", c.proxy(this.cycle, this))
};
d.VERSION = "3.3.6";
d.TRANSITION_DURATION = 600;
d.DEFAULTS = {
interval: 5000,
pause: "hover",
wrap: true,
keyboard: true
};
d.prototype.keydown = function(f) {
if (/input|textarea/i.test(f.target.tagName)) {
return
}
switch (f.which) {
case 37:
this.prev();
break;
case 39:
this.next();
break;
default:
return
}
f.preventDefault()
};
d.prototype.cycle = function(f) {
f || (this.paused = false);
this.interval && clearInterval(this.interval);
this.options.interval && !this.paused && (this.interval = setInterval(c.proxy(this.next, this), this.options.interval));
return this
};
d.prototype.getItemIndex = function(f) {
this.$items = f.parent().children(".item");
return this.$items.index(f || this.$active)
};
d.prototype.getItemForDirection = function(k, j) {
var f = this.getItemIndex(j);
var g = (k == "prev" && f === 0) || (k == "next" && f == (this.$items.length - 1));
if (g && !this.options.wrap) {
return j
}
var l = k == "prev" ? -1 : 1;
var h = (f + l) % this.$items.length;
return this.$items.eq(h)
};
d.prototype.to = function(h) {
var g = this;
var f = this.getItemIndex(this.$active = this.$element.find(".item.active"));
if (h > (this.$items.length - 1) || h < 0) {
return
}
if (this.sliding) {
return this.$element.one("slid.bs.carousel", function() {
g.to(h)
})
}
if (f == h) {
return this.pause().cycle()
}
return this.slide(h > f ? "next" : "prev", this.$items.eq(h))
};
d.prototype.pause = function(f) {
f || (this.paused = true);
if (this.$element.find(".next, .prev").length && c.support.transition) {
this.$element.trigger(c.support.transition.end);
this.cycle(true)
}
this.interval = clearInterval(this.interval);
return this
};
d.prototype.next = function() {
if (this.sliding) {
return
}
return this.slide("next")
};
d.prototype.prev = function() {
if (this.sliding) {
return
}
return this.slide("prev")
};
d.prototype.slide = function(n, j) {
var q = this.$element.find(".item.active");
var g = j || this.getItemForDirection(n, q);
var l = this.interval;
var o = n == "next" ? "left" : "right";
var k = this;
if (g.hasClass("active")) {
return (this.sliding = false)
}
var m = g[0];
var f = c.Event("slide.bs.carousel", {
relatedTarget: m,
direction: o
});
this.$element.trigger(f);
if (f.isDefaultPrevented()) {
return
}
this.sliding = true;
l && this.pause();
if (this.$indicators.length) {
this.$indicators.find(".active").removeClass("active");
var h = c(this.$indicators.children()[this.getItemIndex(g)]);
h && h.addClass("active")
}
var p = c.Event("slid.bs.carousel", {
relatedTarget: m,
direction: o
});
if (c.support.transition && this.$element.hasClass("slide")) {
g.addClass(n);
g[0].offsetWidth;
q.addClass(o);
g.addClass(o);
q.one("bsTransitionEnd", function() {
g.removeClass([n, o].join(" ")).addClass("active");
q.removeClass(["active", o].join(" "));
k.sliding = false;
setTimeout(function() {
k.$element.trigger(p)
}, 0)
}).emulateTransitionEnd(d.TRANSITION_DURATION)
} else {
q.removeClass("active");
g.addClass("active");
this.sliding = false;
this.$element.trigger(p)
}
l && this.cycle();
return this
};
function b(f) {
return this.each(function() {
var k = c(this);
var j = k.data("bs.carousel");
var g = c.extend({}, d.DEFAULTS, k.data(), typeof f == "object" && f);
var h = typeof f == "string" ? f : g.slide;
if (!j) {
k.data("bs.carousel", (j = new d(this, g)))
}
if (typeof f == "number") {
j.to(f)
} else {
if (h) {
j[h]()
} else {
if (g.interval) {
j.pause().cycle()
}
}
}
})
}
var a = c.fn.carousel;
c.fn.carousel = b;
c.fn.carousel.Constructor = d;
c.fn.carousel.noConflict = function() {
c.fn.carousel = a;
return this
};
var e = function(l) {
var g;
var k = c(this);
var f = c(k.attr("data-target") || (g = k.attr("href")) && g.replace(/.*(?=#[^\s]+$)/, ""));
if (!f.hasClass("carousel")) {
return
}
var h = c.extend({}, f.data(), k.data());
var j = k.attr("data-slide-to");
if (j) {
h.interval = false
}
b.call(f, h);
if (j) {
f.data("bs.carousel").to(j)
}
l.preventDefault()
};
c(document).on("click.bs.carousel.data-api", "[data-slide]", e).on("click.bs.carousel.data-api", "[data-slide-to]", e);
c(window).on("load", function() {
c('[data-ride="carousel"]').each(function() {
var f = c(this);
b.call(f, f.data())
})
})
}(jQuery); +
function(d) {
var e = function(g, f) {
this.$element = d(g);
this.options = d.extend({}, e.DEFAULTS, f);
this.$trigger = d('[data-toggle="collapse"][href="#' + g.id + '"],[data-toggle="collapse"][data-target="#' + g.id + '"]');
this.transitioning = null;
if (this.options.parent) {
this.$parent = this.getParent()
} else {
this.addAriaAndCollapsedClass(this.$element, this.$trigger)
}
if (this.options.toggle) {
this.toggle()
}
};
e.VERSION = "3.3.6";
e.TRANSITION_DURATION = 350;
e.DEFAULTS = {
toggle: true
};
e.prototype.dimension = function() {
var f = this.$element.hasClass("width");
return f ? "width" : "height"
};
e.prototype.show = function() {
if (this.transitioning || this.$element.hasClass("in")) {
return
}
var h;
var k = this.$parent && this.$parent.children(".panel").children(".in, .collapsing");
if (k && k.length) {
h = k.data("bs.collapse");
if (h && h.transitioning) {
return
}
}
var g = d.Event("show.bs.collapse");
this.$element.trigger(g);
if (g.isDefaultPrevented()) {
return
}
if (k && k.length) {
b.call(k, "hide");
h || k.data("bs.collapse", null)
}
var l = this.dimension();
this.$element.removeClass("collapse").addClass("collapsing")[l](0).attr("aria-expanded", true);
this.$trigger.removeClass("collapsed").attr("aria-expanded", true);
this.transitioning = 1;
var f = function() {
this.$element.removeClass("collapsing").addClass("collapse in")[l]("");
this.transitioning = 0;
this.$element.trigger("shown.bs.collapse")
};
if (!d.support.transition) {
return f.call(this)
}
var j = d.camelCase(["scroll", l].join("-"));
this.$element.one("bsTransitionEnd", d.proxy(f, this)).emulateTransitionEnd(e.TRANSITION_DURATION)[l](this.$element[0][j])
};
e.prototype.hide = function() {
if (this.transitioning || !this.$element.hasClass("in")) {
return
}
var g = d.Event("hide.bs.collapse");
this.$element.trigger(g);
if (g.isDefaultPrevented()) {
return
}
var h = this.dimension();
this.$element[h](this.$element[h]())[0].offsetHeight;
this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", false);
this.$trigger.addClass("collapsed").attr("aria-expanded", false);
this.transitioning = 1;
var f = function() {
this.transitioning = 0;
this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")
};
if (!d.support.transition) {
return f.call(this)
}
this.$element[h](0).one("bsTransitionEnd", d.proxy(f, this)).emulateTransitionEnd(e.TRANSITION_DURATION)
};
e.prototype.toggle = function() {
this[this.$element.hasClass("in") ? "hide" : "show"]()
};
e.prototype.getParent = function() {
return d(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(d.proxy(function(h, g) {
var f = d(g);
this.addAriaAndCollapsedClass(c(f), f)
}, this)).end()
};
e.prototype.addAriaAndCollapsedClass = function(g, f) {
var h = g.hasClass("in");
g.attr("aria-expanded", h);
f.toggleClass("collapsed", !h).attr("aria-expanded", h)
};
function c(f) {
var g;
var h = f.attr("data-target") || (g = f.attr("href")) && g.replace(/.*(?=#[^\s]+$)/, "");
return d(h)
}
function b(f) {
return this.each(function() {
var j = d(this);
var h = j.data("bs.collapse");
var g = d.extend({}, e.DEFAULTS, j.data(), typeof f == "object" && f);
if (!h && g.toggle && /show|hide/.test(f)) {
g.toggle = false
}
if (!h) {
j.data("bs.collapse", (h = new e(this, g)))
}
if (typeof f == "string") {
h[f]()
}
})
}
var a = d.fn.collapse;
d.fn.collapse = b;
d.fn.collapse.Constructor = e;
d.fn.collapse.noConflict = function() {
d.fn.collapse = a;
return this
};
d(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function(k) {
var j = d(this);
if (!j.attr("data-target")) {
k.preventDefault()
}
var f = c(j);
var h = f.data("bs.collapse");
var g = h ? "toggle" : j.data();
b.call(f, g)
})
}(jQuery); +
function(h) {
var e = ".dropdown-backdrop";
var b = '[data-toggle="dropdown"]';
var a = function(j) {
h(j).on("click.bs.dropdown", this.toggle)
};
a.VERSION = "3.3.6";
function f(l) {
var j = l.attr("data-target");
if (!j) {
j = l.attr("href");
j = j && /#[A-Za-z]/.test(j) && j.replace(/.*(?=#[^\s]*$)/, "")
}
var k = j && h(j);
return k && k.length ? k : l.parent()
}
function d(j) {
if (j && j.which === 3) {
return
}
h(e).remove();
h(b).each(function() {
var m = h(this);
var l = f(m);
var k = {
relatedTarget: this
};
if (!l.hasClass("open")) {
return
}
if (j && j.type == "click" && /input|textarea/i.test(j.target.tagName) && h.contains(l[0], j.target)) {
return
}
l.trigger(j = h.Event("hide.bs.dropdown", k));
if (j.isDefaultPrevented()) {
return
}
m.attr("aria-expanded", "false");
l.removeClass("open").trigger(h.Event("hidden.bs.dropdown", k))
})
}
a.prototype.toggle = function(n) {
var m = h(this);
if (m.is(".disabled, :disabled")) {
return
}
var l = f(m);
var k = l.hasClass("open");
d();
if (!k) {
if ("ontouchstart" in document.documentElement && !l.closest(".navbar-nav").length) {
h(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(h(this)).on("click", d)
}
var j = {
relatedTarget: this
};
l.trigger(n = h.Event("show.bs.dropdown", j));
if (n.isDefaultPrevented()) {
return
}
m.trigger("focus").attr("aria-expanded", "true");
l.toggleClass("open").trigger(h.Event("shown.bs.dropdown", j))
}
return false
};
a.prototype.keydown = function(n) {
if (!/(38|40|27|32)/.test(n.which) || /input|textarea/i.test(n.target.tagName)) {
return
}
var m = h(this);
n.preventDefault();
n.stopPropagation();
if (m.is(".disabled, :disabled")) {
return
}
var l = f(m);
var k = l.hasClass("open");
if (!k && n.which != 27 || k && n.which == 27) {
if (n.which == 27) {
l.find(b).trigger("focus")
}
return m.trigger("click")
}
var o = " li:not(.disabled):visible a";
var p = l.find(".dropdown-menu" + o);
if (!p.length) {
return
}
var j = p.index(n.target);
if (n.which == 38 && j > 0) {
j--
}
if (n.which == 40 && j < p.length - 1) {
j++
}
if (!~j) {
j = 0
}
p.eq(j).trigger("focus")
};
function g(j) {
return this.each(function() {
var l = h(this);
var k = l.data("bs.dropdown");
if (!k) {
l.data("bs.dropdown", (k = new a(this)))
}
if (typeof j == "string") {
k[j].call(l)
}
})
}
var c = h.fn.dropdown;
h.fn.dropdown = g;
h.fn.dropdown.Constructor = a;
h.fn.dropdown.noConflict = function() {
h.fn.dropdown = c;
return this
};
h(document).on("click.bs.dropdown.data-api", d).on("click.bs.dropdown.data-api", ".dropdown form", function(j) {
j.stopPropagation()
}).on("click.bs.dropdown.data-api", b, a.prototype.toggle).on("keydown.bs.dropdown.data-api", b, a.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", a.prototype.keydown)
}(jQuery); +
function(d) {
var b = function(f, e) {
this.options = e;
this.$body = d(document.body);
this.$element = d(f);
this.$dialog = this.$element.find(".modal-dialog");
this.$backdrop = null;
this.isShown = null;
this.originalBodyPad = null;
this.scrollbarWidth = 0;
this.ignoreBackdropClick = false;
if (this.options.remote) {
this.$element.find(".modal-content").load(this.options.remote, d.proxy(function() {
this.$element.trigger("loaded.bs.modal")
}, this))
}
};
b.VERSION = "3.3.6";
b.TRANSITION_DURATION = 300;
b.BACKDROP_TRANSITION_DURATION = 150;
b.DEFAULTS = {
backdrop: true,
keyboard: true,
show: true
};
b.prototype.toggle = function(e) {
return this.isShown ? this.hide() : this.show(e)
};
b.prototype.show = function(h) {
var f = this;
var g = d.Event("show.bs.modal", {
relatedTarget: h
});
this.$element.trigger(g);
if (this.isShown || g.isDefaultPrevented()) {
return
}
this.isShown = true;
this.checkScrollbar();
this.setScrollbar();
this.$body.addClass("modal-open");
this.escape();
this.resize();
this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', d.proxy(this.hide, this));
this.$dialog.on("mousedown.dismiss.bs.modal", function() {
f.$element.one("mouseup.dismiss.bs.modal", function(j) {
if (d(j.target).is(f.$element)) {
f.ignoreBackdropClick = true
}
})
});
this.backdrop(function() {
var k = d.support.transition && f.$element.hasClass("fade");
if (!f.$element.parent().length) {
f.$element.appendTo(f.$body)
}
f.$element.show().scrollTop(0);
f.adjustDialog();
if (k) {
f.$element[0].offsetWidth
}
f.$element.addClass("in");
f.enforceFocus();
var j = d.Event("shown.bs.modal", {
relatedTarget: h
});
k ? f.$dialog.one("bsTransitionEnd", function() {
f.$element.trigger("focus").trigger(j)
}).emulateTransitionEnd(b.TRANSITION_DURATION) : f.$element.trigger("focus").trigger(j)
})
};
b.prototype.hide = function(f) {
if (f) {
f.preventDefault()
}
f = d.Event("hide.bs.modal");
this.$element.trigger(f);
if (!this.isShown || f.isDefaultPrevented()) {
return
}
this.isShown = false;
this.escape();
this.resize();
d(document).off("focusin.bs.modal");
this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal");
this.$dialog.off("mousedown.dismiss.bs.modal");
d.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", d.proxy(this.hideModal, this)).emulateTransitionEnd(b.TRANSITION_DURATION) : this.hideModal()
};
b.prototype.enforceFocus = function() {
d(document).off("focusin.bs.modal").on("focusin.bs.modal", d.proxy(function(f) {
if (this.$element[0] !== f.target && !this.$element.has(f.target).length) {
this.$element.trigger("focus")
}
}, this))
};
b.prototype.escape = function() {
if (this.isShown && this.options.keyboard) {
this.$element.on("keydown.dismiss.bs.modal", d.proxy(function(f) {
f.which == 27 && this.hide()
}, this))
} else {
if (!this.isShown) {
this.$element.off("keydown.dismiss.bs.modal")
}
}
};
b.prototype.resize = function() {
if (this.isShown) {
d(window).on("resize.bs.modal", d.proxy(this.handleUpdate, this))
} else {
d(window).off("resize.bs.modal")
}
};
b.prototype.hideModal = function() {
var e = this;
this.$element.hide();
this.backdrop(function() {
e.$body.removeClass("modal-open");
e.resetAdjustments();
e.resetScrollbar();
e.$element.trigger("hidden.bs.modal")
})
};
b.prototype.removeBackdrop = function() {
this.$backdrop && this.$backdrop.remove();
this.$backdrop = null
};
b.prototype.backdrop = function(j) {
var h = this;
var f = this.$element.hasClass("fade") ? "fade" : "";
if (this.isShown && this.options.backdrop) {
var e = d.support.transition && f;
this.$backdrop = d(document.createElement("div")).addClass("modal-backdrop " + f).appendTo(this.$body);
this.$element.on("click.dismiss.bs.modal", d.proxy(function(k) {
if (this.ignoreBackdropClick) {
this.ignoreBackdropClick = false;
return
}
if (k.target !== k.currentTarget) {
return
}
this.options.backdrop == "static" ? this.$element[0].focus() : this.hide()
}, this));
if (e) {
this.$backdrop[0].offsetWidth
}
this.$backdrop.addClass("in");
if (!j) {
return
}
e ? this.$backdrop.one("bsTransitionEnd", j).emulateTransitionEnd(b.BACKDROP_TRANSITION_DURATION) : j()
} else {
if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass("in");
var g = function() {
h.removeBackdrop();
j && j()
};
d.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", g).emulateTransitionEnd(b.BACKDROP_TRANSITION_DURATION) : g()
} else {
if (j) {
j()
}
}
}
};
b.prototype.handleUpdate = function() {
this.adjustDialog()
};
b.prototype.adjustDialog = function() {
var e = this.$element[0].scrollHeight > document.documentElement.clientHeight;
this.$element.css({
paddingLeft: !this.bodyIsOverflowing && e ? this.scrollbarWidth : "",
paddingRight: this.bodyIsOverflowing && !e ? this.scrollbarWidth : ""
})
};
b.prototype.resetAdjustments = function() {
this.$element.css({
paddingLeft: "",
paddingRight: ""
})
};
b.prototype.checkScrollbar = function() {
var f = window.innerWidth;
if (!f) {
var e = document.documentElement.getBoundingClientRect();
f = e.right - Math.abs(e.left)
}
this.bodyIsOverflowing = document.body.clientWidth < f;
this.scrollbarWidth = this.measureScrollbar()
};
b.prototype.setScrollbar = function() {
var e = parseInt((this.$body.css("padding-right") || 0), 10);
this.originalBodyPad = document.body.style.paddingRight || "";
if (this.bodyIsOverflowing) {
this.$body.css("padding-right", e + this.scrollbarWidth)
}
};
b.prototype.resetScrollbar = function() {
this.$body.css("padding-right", this.originalBodyPad)
};
b.prototype.measureScrollbar = function() {
var f = document.createElement("div");
f.className = "modal-scrollbar-measure";
this.$body.append(f);
var e = f.offsetWidth - f.clientWidth;
this.$body[0].removeChild(f);
return e
};
function c(e, f) {
return this.each(function() {
var j = d(this);
var h = j.data("bs.modal");
var g = d.extend({}, b.DEFAULTS, j.data(), typeof e == "object" && e);
if (!h) {
j.data("bs.modal", (h = new b(this, g)))
}
if (typeof e == "string") {
h[e](f)
} else {
if (g.show) {
h.show(f)
}
}
})
}
var a = d.fn.modal;
d.fn.modal = c;
d.fn.modal.Constructor = b;
d.fn.modal.noConflict = function() {
d.fn.modal = a;
return this
};
d(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(k) {
var j = d(this);
var g = j.attr("href");
var f = d(j.attr("data-target") || (g && g.replace(/.*(?=#[^\s]+$)/, "")));
var h = f.data("bs.modal") ? "toggle" : d.extend({
remote: !/#/.test(g) && g
}, f.data(), j.data());
if (j.is("a")) {
k.preventDefault()
}
f.one("show.bs.modal", function(e) {
if (e.isDefaultPrevented()) {
return
}
f.one("hidden.bs.modal", function() {
j.is(":visible") && j.trigger("focus")
})
});
c.call(f, h, this)
})
}(jQuery); +
function(d) {
var c = function(f, e) {
this.type = null;
this.options = null;
this.enabled = null;
this.timeout = null;
this.hoverState = null;
this.$element = null;
this.inState = null;
this.init("tooltip", f, e)
};
c.VERSION = "3.3.6";
c.TRANSITION_DURATION = 150;
c.DEFAULTS = {
animation: true,
placement: "top",
selector: false,
template: '
',
trigger: "hover focus",
title: "",
delay: 0,
html: false,
container: false,
viewport: {
selector: "body",
padding: 0
}
};
c.prototype.init = function(l, j, g) {
this.enabled = true;
this.type = l;
this.$element = d(j);
this.options = this.getOptions(g);
this.$viewport = this.options.viewport && d(d.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport));
this.inState = {
click: false,
hover: false,
focus: false
};
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!")
}
var k = this.options.trigger.split(" ");
for (var h = k.length; h--;) {
var f = k[h];
if (f == "click") {
this.$element.on("click." + this.type, this.options.selector, d.proxy(this.toggle, this))
} else {
if (f != "manual") {
var m = f == "hover" ? "mouseenter" : "focusin";
var e = f == "hover" ? "mouseleave" : "focusout";
this.$element.on(m + "." + this.type, this.options.selector, d.proxy(this.enter, this));
this.$element.on(e + "." + this.type, this.options.selector, d.proxy(this.leave, this))
}
}
}
this.options.selector ? (this._options = d.extend({}, this.options, {
trigger: "manual",
selector: ""
})) : this.fixTitle()
};
c.prototype.getDefaults = function() {
return c.DEFAULTS
};
c.prototype.getOptions = function(e) {
e = d.extend({}, this.getDefaults(), this.$element.data(), e);
if (e.delay && typeof e.delay == "number") {
e.delay = {
show: e.delay,
hide: e.delay
}
}
return e
};
c.prototype.getDelegateOptions = function() {
var e = {};
var f = this.getDefaults();
this._options && d.each(this._options, function(g, h) {
if (f[g] != h) {
e[g] = h
}
});
return e
};
c.prototype.enter = function(f) {
var e = f instanceof this.constructor ? f : d(f.currentTarget).data("bs." + this.type);
if (!e) {
e = new this.constructor(f.currentTarget, this.getDelegateOptions());
d(f.currentTarget).data("bs." + this.type, e)
}
if (f instanceof d.Event) {
e.inState[f.type == "focusin" ? "focus" : "hover"] = true
}
if (e.tip().hasClass("in") || e.hoverState == "in") {
e.hoverState = "in";
return
}
clearTimeout(e.timeout);
e.hoverState = "in";
if (!e.options.delay || !e.options.delay.show) {
return e.show()
}
e.timeout = setTimeout(function() {
if (e.hoverState == "in") {
e.show()
}
}, e.options.delay.show)
};
c.prototype.isInStateTrue = function() {
for (var e in this.inState) {
if (this.inState[e]) {
return true
}
}
return false
};
c.prototype.leave = function(f) {
var e = f instanceof this.constructor ? f : d(f.currentTarget).data("bs." + this.type);
if (!e) {
e = new this.constructor(f.currentTarget, this.getDelegateOptions());
d(f.currentTarget).data("bs." + this.type, e)
}
if (f instanceof d.Event) {
e.inState[f.type == "focusout" ? "focus" : "hover"] = false
}
if (e.isInStateTrue()) {
return
}
clearTimeout(e.timeout);
e.hoverState = "out";
if (!e.options.delay || !e.options.delay.hide) {
return e.hide()
}
e.timeout = setTimeout(function() {
if (e.hoverState == "out") {
e.hide()
}
}, e.options.delay.hide)
};
c.prototype.show = function() {
var p = d.Event("show.bs." + this.type);
if (this.hasContent() && this.enabled) {
this.$element.trigger(p);
var q = d.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);
if (p.isDefaultPrevented() || !q) {
return
}
var o = this;
var m = this.tip();
var h = this.getUID(this.type);
this.setContent();
m.attr("id", h);
this.$element.attr("aria-describedby", h);
if (this.options.animation) {
m.addClass("fade")
}
var l = typeof this.options.placement == "function" ? this.options.placement.call(this, m[0], this.$element[0]) : this.options.placement;
var u = /\s?auto?\s?/i;
var v = u.test(l);
if (v) {
l = l.replace(u, "") || "top"
}
m.detach().css({
top: 0,
left: 0,
display: "block"
}).addClass(l).data("bs." + this.type, this);
this.options.container ? m.appendTo(this.options.container) : m.insertAfter(this.$element);
this.$element.trigger("inserted.bs." + this.type);
var r = this.getPosition();
var f = m[0].offsetWidth;
var n = m[0].offsetHeight;
if (v) {
var k = l;
var t = this.getPosition(this.$viewport);
l = l == "bottom" && r.bottom + n > t.bottom ? "top" : l == "top" && r.top - n < t.top ? "bottom" : l == "right" && r.right + f > t.width ? "left" : l == "left" && r.left - f < t.left ? "right" : l;
m.removeClass(k).addClass(l)
}
var j = this.getCalculatedOffset(l, r, f, n);
this.applyPlacement(j, l);
var g = function() {
var e = o.hoverState;
o.$element.trigger("shown.bs." + o.type);
o.hoverState = null;
if (e == "out") {
o.leave(o)
}
};
d.support.transition && this.$tip.hasClass("fade") ? m.one("bsTransitionEnd", g).emulateTransitionEnd(c.TRANSITION_DURATION) : g()
}
};
c.prototype.applyPlacement = function(k, l) {
var m = this.tip();
var g = m[0].offsetWidth;
var r = m[0].offsetHeight;
var f = parseInt(m.css("margin-top"), 10);
var j = parseInt(m.css("margin-left"), 10);
if (isNaN(f)) {
f = 0
}
if (isNaN(j)) {
j = 0
}
k.top += f;
k.left += j;
d.offset.setOffset(m[0], d.extend({
using: function(t) {
m.css({
top: Math.round(t.top),
left: Math.round(t.left)
})
}
}, k), 0);
m.addClass("in");
var e = m[0].offsetWidth;
var n = m[0].offsetHeight;
if (l == "top" && n != r) {
k.top = k.top + r - n
}
var q = this.getViewportAdjustedDelta(l, k, e, n);
if (q.left) {
k.left += q.left
} else {
k.top += q.top
}
var o = /top|bottom/.test(l);
var h = o ? q.left * 2 - g + e : q.top * 2 - r + n;
var p = o ? "offsetWidth" : "offsetHeight";
m.offset(k);
this.replaceArrow(h, m[0][p], o)
};
c.prototype.replaceArrow = function(g, e, f) {
this.arrow().css(f ? "left" : "top", 50 * (1 - g / e) + "%").css(f ? "top" : "left", "")
};
c.prototype.setContent = function() {
var f = this.tip();
var e = this.getTitle();
f.find(".tooltip-inner")[this.options.html ? "html" : "text"](e);
f.removeClass("fade in top bottom left right")
};
c.prototype.hide = function(k) {
var g = this;
var j = d(this.$tip);
var h = d.Event("hide.bs." + this.type);
function f() {
if (g.hoverState != "in") {
j.detach()
}
g.$element.removeAttr("aria-describedby").trigger("hidden.bs." + g.type);
k && k()
}
this.$element.trigger(h);
if (h.isDefaultPrevented()) {
return
}
j.removeClass("in");
d.support.transition && j.hasClass("fade") ? j.one("bsTransitionEnd", f).emulateTransitionEnd(c.TRANSITION_DURATION) : f();
this.hoverState = null;
return this
};
c.prototype.fixTitle = function() {
var e = this.$element;
if (e.attr("title") || typeof e.attr("data-original-title") != "string") {
e.attr("data-original-title", e.attr("title") || "").attr("title", "")
}
};
c.prototype.hasContent = function() {
return this.getTitle()
};
c.prototype.getPosition = function(g) {
g = g || this.$element;
var j = g[0];
var f = j.tagName == "BODY";
var h = j.getBoundingClientRect();
if (h.width == null) {
h = d.extend({}, h, {
width: h.right - h.left,
height: h.bottom - h.top
})
}
var l = f ? {
top: 0,
left: 0
} : g.offset();
var e = {
scroll: f ? document.documentElement.scrollTop || document.body.scrollTop : g.scrollTop()
};
var k = f ? {
width: d(window).width(),
height: d(window).height()
} : null;
return d.extend({}, h, e, k, l)
};
c.prototype.getCalculatedOffset = function(e, h, f, g) {
return e == "bottom" ? {
top: h.top + h.height,
left: h.left + h.width / 2 - f / 2
} : e == "top" ? {
top: h.top - g,
left: h.left + h.width / 2 - f / 2
} : e == "left" ? {
top: h.top + h.height / 2 - g / 2,
left: h.left - f
} : {
top: h.top + h.height / 2 - g / 2,
left: h.left + h.width
}
};
c.prototype.getViewportAdjustedDelta = function(h, l, e, k) {
var n = {
top: 0,
left: 0
};
if (!this.$viewport) {
return n
}
var g = this.options.viewport && this.options.viewport.padding || 0;
var m = this.getPosition(this.$viewport);
if (/right|left/.test(h)) {
var o = l.top - g - m.scroll;
var j = l.top + g - m.scroll + k;
if (o < m.top) {
n.top = m.top - o
} else {
if (j > m.top + m.height) {
n.top = m.top + m.height - j
}
}
} else {
var p = l.left - g;
var f = l.left + g + e;
if (p < m.left) {
n.left = m.left - p
} else {
if (f > m.right) {
n.left = m.left + m.width - f
}
}
}
return n
};
c.prototype.getTitle = function() {
var g;
var e = this.$element;
var f = this.options;
g = e.attr("data-original-title") || (typeof f.title == "function" ? f.title.call(e[0]) : f.title);
return g
};
c.prototype.getUID = function(e) {
do {
e += ~~(Math.random() * 1000000)
} while (document.getElementById(e));
return e
};
c.prototype.tip = function() {
if (!this.$tip) {
this.$tip = d(this.options.template);
if (this.$tip.length != 1) {
throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!")
}
}
return this.$tip
};
c.prototype.arrow = function() {
return (this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow"))
};
c.prototype.enable = function() {
this.enabled = true
};
c.prototype.disable = function() {
this.enabled = false
};
c.prototype.toggleEnabled = function() {
this.enabled = !this.enabled
};
c.prototype.toggle = function(g) {
var f = this;
if (g) {
f = d(g.currentTarget).data("bs." + this.type);
if (!f) {
f = new this.constructor(g.currentTarget, this.getDelegateOptions());
d(g.currentTarget).data("bs." + this.type, f)
}
}
if (g) {
f.inState.click = !f.inState.click;
if (f.isInStateTrue()) {
f.enter(f)
} else {
f.leave(f)
}
} else {
f.tip().hasClass("in") ? f.leave(f) : f.enter(f)
}
};
c.prototype.destroy = function() {
var e = this;
clearTimeout(this.timeout);
this.hide(function() {
e.$element.off("." + e.type).removeData("bs." + e.type);
if (e.$tip) {
e.$tip.detach()
}
e.$tip = null;
e.$arrow = null;
e.$viewport = null
})
};
function b(e) {
return this.each(function() {
var h = d(this);
var g = h.data("bs.tooltip");
var f = typeof e == "object" && e;
if (!g && /destroy|hide/.test(e)) {
return
}
if (!g) {
h.data("bs.tooltip", (g = new c(this, f)))
}
if (typeof e == "string") {
g[e]()
}
})
}
var a = d.fn.tooltip;
d.fn.tooltip = b;
d.fn.tooltip.Constructor = c;
d.fn.tooltip.noConflict = function() {
d.fn.tooltip = a;
return this
}
}(jQuery); +
function(d) {
var c = function(f, e) {
this.init("popover", f, e)
};
if (!d.fn.tooltip) {
throw new Error("Popover requires tooltip.js")
}
c.VERSION = "3.3.6";
c.DEFAULTS = d.extend({}, d.fn.tooltip.Constructor.DEFAULTS, {
placement: "right",
trigger: "click",
content: "",
template: '
'
});
c.prototype = d.extend({}, d.fn.tooltip.Constructor.prototype);
c.prototype.constructor = c;
c.prototype.getDefaults = function() {
return c.DEFAULTS
};
c.prototype.setContent = function() {
var g = this.tip();
var f = this.getTitle();
var e = this.getContent();
g.find(".popover-title")[this.options.html ? "html" : "text"](f);
g.find(".popover-content").children().detach().end()[this.options.html ? (typeof e == "string" ? "html" : "append") : "text"](e);
g.removeClass("fade top bottom left right in");
if (!g.find(".popover-title").html()) {
g.find(".popover-title").hide()
}
};
c.prototype.hasContent = function() {
return this.getTitle() || this.getContent()
};
c.prototype.getContent = function() {
var e = this.$element;
var f = this.options;
return e.attr("data-content") || (typeof f.content == "function" ? f.content.call(e[0]) : f.content)
};
c.prototype.arrow = function() {
return (this.$arrow = this.$arrow || this.tip().find(".arrow"))
};
function b(e) {
return this.each(function() {
var h = d(this);
var g = h.data("bs.popover");
var f = typeof e == "object" && e;
if (!g && /destroy|hide/.test(e)) {
return
}
if (!g) {
h.data("bs.popover", (g = new c(this, f)))
}
if (typeof e == "string") {
g[e]()
}
})
}
var a = d.fn.popover;
d.fn.popover = b;
d.fn.popover.Constructor = c;
d.fn.popover.noConflict = function() {
d.fn.popover = a;
return this
}
}(jQuery); +
function(d) {
function c(f, e) {
this.$body = d(document.body);
this.$scrollElement = d(f).is(document.body) ? d(window) : d(f);
this.options = d.extend({}, c.DEFAULTS, e);
this.selector = (this.options.target || "") + " .nav li > a";
this.offsets = [];
this.targets = [];
this.activeTarget = null;
this.scrollHeight = 0;
this.$scrollElement.on("scroll.bs.scrollspy", d.proxy(this.process, this));
this.refresh();
this.process()
}
c.VERSION = "3.3.6";
c.DEFAULTS = {
offset: 10
};
c.prototype.getScrollHeight = function() {
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
};
c.prototype.refresh = function() {
var g = this;
var e = "offset";
var f = 0;
this.offsets = [];
this.targets = [];
this.scrollHeight = this.getScrollHeight();
if (!d.isWindow(this.$scrollElement[0])) {
e = "position";
f = this.$scrollElement.scrollTop()
}
this.$body.find(this.selector).map(function() {
var j = d(this);
var h = j.data("target") || j.attr("href");
var k = /^#./.test(h) && d(h);
return (k && k.length && k.is(":visible") && [
[k[e]().top + f, h]
]) || null
}).sort(function(j, h) {
return j[0] - h[0]
}).each(function() {
g.offsets.push(this[0]);
g.targets.push(this[1])
})
};
c.prototype.process = function() {
var k = this.$scrollElement.scrollTop() + this.options.offset;
var g = this.getScrollHeight();
var j = this.options.offset + g - this.$scrollElement.height();
var h = this.offsets;
var e = this.targets;
var l = this.activeTarget;
var f;
if (this.scrollHeight != g) {
this.refresh()
}
if (k >= j) {
return l != (f = e[e.length - 1]) && this.activate(f)
}
if (l && k < h[0]) {
this.activeTarget = null;
return this.clear()
}
for (f = h.length; f--;) {
l != e[f] && k >= h[f] && (h[f + 1] === undefined || k < h[f + 1]) && this.activate(e[f])
}
};
c.prototype.activate = function(g) {
this.activeTarget = g;
this.clear();
var e = this.selector + '[data-target="' + g + '"],' + this.selector + '[href="' + g + '"]';
var f = d(e).parents("li").addClass("active");
if (f.parent(".dropdown-menu").length) {
f = f.closest("li.dropdown").addClass("active")
}
f.trigger("activate.bs.scrollspy")
};
c.prototype.clear = function() {
d(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")
};
function b(e) {
return this.each(function() {
var h = d(this);
var g = h.data("bs.scrollspy");
var f = typeof e == "object" && e;
if (!g) {
h.data("bs.scrollspy", (g = new c(this, f)))
}
if (typeof e == "string") {
g[e]()
}
})
}
var a = d.fn.scrollspy;
d.fn.scrollspy = b;
d.fn.scrollspy.Constructor = c;
d.fn.scrollspy.noConflict = function() {
d.fn.scrollspy = a;
return this
};
d(window).on("load.bs.scrollspy.data-api", function() {
d('[data-spy="scroll"]').each(function() {
var e = d(this);
b.call(e, e.data())
})
})
}(jQuery); +
function(d) {
var b = function(f) {
this.element = d(f)
};
b.VERSION = "3.3.6";
b.TRANSITION_DURATION = 150;
b.prototype.show = function() {
var m = this.element;
var h = m.closest("ul:not(.dropdown-menu)");
var g = m.data("target");
if (!g) {
g = m.attr("href");
g = g && g.replace(/.*(?=#[^\s]*$)/, "")
}
if (m.parent("li").hasClass("active")) {
return
}
var k = h.find(".active:last a");
var l = d.Event("hide.bs.tab", {
relatedTarget: m[0]
});
var j = d.Event("show.bs.tab", {
relatedTarget: k[0]
});
k.trigger(l);
m.trigger(j);
if (j.isDefaultPrevented() || l.isDefaultPrevented()) {
return
}
var f = d(g);
this.activate(m.closest("li"), h);
this.activate(f, f.parent(), function() {
k.trigger({
type: "hidden.bs.tab",
relatedTarget: m[0]
});
m.trigger({
type: "shown.bs.tab",
relatedTarget: k[0]
})
})
};
b.prototype.activate = function(h, g, l) {
var f = g.find("> .active");
var k = l && d.support.transition && (f.length && f.hasClass("fade") || !!g.find("> .fade").length);
function j() {
f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", false);
h.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", true);
if (k) {
h[0].offsetWidth;
h.addClass("in")
} else {
h.removeClass("fade")
}
if (h.parent(".dropdown-menu").length) {
h.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", true)
}
l && l()
}
f.length && k ? f.one("bsTransitionEnd", j).emulateTransitionEnd(b.TRANSITION_DURATION) : j();
f.removeClass("in")
};
function c(f) {
return this.each(function() {
var h = d(this);
var g = h.data("bs.tab");
if (!g) {
h.data("bs.tab", (g = new b(this)))
}
if (typeof f == "string") {
g[f]()
}
})
}
var a = d.fn.tab;
d.fn.tab = c;
d.fn.tab.Constructor = b;
d.fn.tab.noConflict = function() {
d.fn.tab = a;
return this
};
var e = function(f) {
f.preventDefault();
c.call(d(this), "show")
};
d(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', e).on("click.bs.tab.data-api", '[data-toggle="pill"]', e)
}(jQuery); +
function(d) {
var c = function(f, e) {
this.options = d.extend({}, c.DEFAULTS, e);
this.$target = d(this.options.target).on("scroll.bs.affix.data-api", d.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", d.proxy(this.checkPositionWithEventLoop, this));
this.$element = d(f);
this.affixed = null;
this.unpin = null;
this.pinnedOffset = null;
this.checkPosition()
};
c.VERSION = "3.3.6";
c.RESET = "affix affix-top affix-bottom";
c.DEFAULTS = {
offset: 0,
target: window
};
c.prototype.getState = function(o, n, f, g) {
var e = this.$target.scrollTop();
var j = this.$element.offset();
var k = this.$target.height();
if (f != null && this.affixed == "top") {
return e < f ? "top" : false
}
if (this.affixed == "bottom") {
if (f != null) {
return (e + this.unpin <= j.top) ? false : "bottom"
}
return (e + k <= o - g) ? false : "bottom"
}
var h = this.affixed == null;
var m = h ? e : j.top;
var l = h ? k : n;
if (f != null && e <= f) {
return "top"
}
if (g != null && (m + l >= o - g)) {
return "bottom"
}
return false
};
c.prototype.getPinnedOffset = function() {
if (this.pinnedOffset) {
return this.pinnedOffset
}
this.$element.removeClass(c.RESET).addClass("affix");
var f = this.$target.scrollTop();
var e = this.$element.offset();
return (this.pinnedOffset = e.top - f)
};
c.prototype.checkPositionWithEventLoop = function() {
setTimeout(d.proxy(this.checkPosition, this), 1)
};
c.prototype.checkPosition = function() {
if (!this.$element.is(":visible")) {
return
}
var f = this.$element.height();
var m = this.options.offset;
var k = m.top;
var h = m.bottom;
var j = Math.max(d(document).height(), d(document.body).height());
if (typeof m != "object") {
h = k = m
}
if (typeof k == "function") {
k = m.top(this.$element)
}
if (typeof h == "function") {
h = m.bottom(this.$element)
}
var g = this.getState(j, f, k, h);
if (this.affixed != g) {
if (this.unpin != null) {
this.$element.css("top", "")
}
var n = "affix" + (g ? "-" + g : "");
var l = d.Event(n + ".bs.affix");
this.$element.trigger(l);
if (l.isDefaultPrevented()) {
return
}
this.affixed = g;
this.unpin = g == "bottom" ? this.getPinnedOffset() : null;
this.$element.removeClass(c.RESET).addClass(n).trigger(n.replace("affix", "affixed") + ".bs.affix")
}
if (g == "bottom") {
this.$element.offset({
top: j - f - h
})
}
};
function b(e) {
return this.each(function() {
var h = d(this);
var g = h.data("bs.affix");
var f = typeof e == "object" && e;
if (!g) {
h.data("bs.affix", (g = new c(this, f)))
}
if (typeof e == "string") {
g[e]()
}
})
}
var a = d.fn.affix;
d.fn.affix = b;
d.fn.affix.Constructor = c;
d.fn.affix.noConflict = function() {
d.fn.affix = a;
return this
};
d(window).on("load", function() {
d('[data-spy="affix"]').each(function() {
var f = d(this);
var e = f.data();
e.offset = e.offset || {};
if (e.offsetBottom != null) {
e.offset.bottom = e.offsetBottom
}
if (e.offsetTop != null) {
e.offset.top = e.offsetTop
}
b.call(f, e)
})
})
}(jQuery);
"function" !== typeof Object.create && (Object.create = function(b) {
function a() {}
a.prototype = b;
return new a
});
(function(d, c, b) {
var a = {
init: function(f, e) {
this.$elem = d(e);
this.options = d.extend({}, d.fn.owlCarousel.options, this.$elem.data(), f);
this.userOptions = f;
this.loadContent()
},
loadContent: function() {
function g(j) {
var l, k = "";
if ("function" === typeof f.options.jsonSuccess) {
f.options.jsonSuccess.apply(this, [j])
} else {
for (l in j.owl) {
j.owl.hasOwnProperty(l) && (k += j.owl[l].item)
}
f.$elem.html(k)
}
f.logIn()
}
var f = this,
h;
"function" === typeof f.options.beforeInit && f.options.beforeInit.apply(this, [f.$elem]);
"string" === typeof f.options.jsonPath ? (h = f.options.jsonPath, d.getJSON(h, g)) : f.logIn()
},
logIn: function() {
this.$elem.data("owl-originalStyles", this.$elem.attr("style"));
this.$elem.data("owl-originalClasses", this.$elem.attr("class"));
this.$elem.css({
opacity: 0
});
this.orignalItems = this.options.items;
this.checkBrowser();
this.wrapperWidth = 0;
this.checkVisible = null;
this.setVars()
},
setVars: function() {
if (0 === this.$elem.children().length) {
return !1
}
this.baseClass();
this.eventTypes();
this.$userItems = this.$elem.children();
this.itemsAmount = this.$userItems.length;
this.wrapItems();
this.$owlItems = this.$elem.find(".owl-item");
this.$owlWrapper = this.$elem.find(".owl-wrapper");
this.playDirection = "next";
this.prevItem = 0;
this.prevArr = [0];
this.currentItem = 0;
this.customEvents();
this.onStartup()
},
onStartup: function() {
this.updateItems();
this.calculateAll();
this.buildControls();
this.updateControls();
this.response();
this.moveEvents();
this.stopOnHover();
this.owlStatus();
!1 !== this.options.transitionStyle && this.transitionTypes(this.options.transitionStyle);
!0 === this.options.autoPlay && (this.options.autoPlay = 5000);
this.play();
this.$elem.find(".owl-wrapper").css("display", "block");
this.$elem.is(":visible") ? this.$elem.css("opacity", 1) : this.watchVisibility();
this.onstartup = !1;
this.eachMoveUpdate();
"function" === typeof this.options.afterInit && this.options.afterInit.apply(this, [this.$elem])
},
eachMoveUpdate: function() {
!0 === this.options.lazyLoad && this.lazyLoad();
!0 === this.options.autoHeight && this.autoHeight();
this.onVisibleItems();
"function" === typeof this.options.afterAction && this.options.afterAction.apply(this, [this.$elem])
},
updateVars: function() {
"function" === typeof this.options.beforeUpdate && this.options.beforeUpdate.apply(this, [this.$elem]);
this.watchVisibility();
this.updateItems();
this.calculateAll();
this.updatePosition();
this.updateControls();
this.eachMoveUpdate();
"function" === typeof this.options.afterUpdate && this.options.afterUpdate.apply(this, [this.$elem])
},
reload: function() {
var e = this;
c.setTimeout(function() {
e.updateVars()
}, 0)
},
watchVisibility: function() {
var e = this;
if (!1 === e.$elem.is(":visible")) {
e.$elem.css({
opacity: 0
}), c.clearInterval(e.autoPlayInterval), c.clearInterval(e.checkVisible)
} else {
return !1
}
e.checkVisible = c.setInterval(function() {
e.$elem.is(":visible") && (e.reload(), e.$elem.animate({
opacity: 1
}, 200), c.clearInterval(e.checkVisible))
}, 500)
},
wrapItems: function() {
this.$userItems.wrapAll('
').wrap('
');
this.$elem.find(".owl-wrapper").wrap('
');
this.wrapperOuter = this.$elem.find(".owl-wrapper-outer");
this.$elem.css("display", "block")
},
baseClass: function() {
var f = this.$elem.hasClass(this.options.baseClass),
e = this.$elem.hasClass(this.options.theme);
f || this.$elem.addClass(this.options.baseClass);
e || this.$elem.addClass(this.options.theme)
},
updateItems: function() {
var f, e;
if (!1 === this.options.responsive) {
return !1
}
if (!0 === this.options.singleItem) {
return this.options.items = this.orignalItems = 1, this.options.itemsCustom = !1, this.options.itemsDesktop = !1, this.options.itemsDesktopSmall = !1, this.options.itemsTablet = !1, this.options.itemsTabletSmall = !1, this.options.itemsMobile = !1
}
f = d(this.options.responsiveBaseWidth).width();
f > (this.options.itemsDesktop[0] || this.orignalItems) && (this.options.items = this.orignalItems);
if (!1 !== this.options.itemsCustom) {
for (this.options.itemsCustom.sort(function(h, g) {
return h[0] - g[0]
}), e = 0; e < this.options.itemsCustom.length; e += 1) {
this.options.itemsCustom[e][0] <= f && (this.options.items = this.options.itemsCustom[e][1])
}
} else {
f <= this.options.itemsDesktop[0] && !1 !== this.options.itemsDesktop && (this.options.items = this.options.itemsDesktop[1]), f <= this.options.itemsDesktopSmall[0] && !1 !== this.options.itemsDesktopSmall && (this.options.items = this.options.itemsDesktopSmall[1]), f <= this.options.itemsTablet[0] && !1 !== this.options.itemsTablet && (this.options.items = this.options.itemsTablet[1]), f <= this.options.itemsTabletSmall[0] && !1 !== this.options.itemsTabletSmall && (this.options.items = this.options.itemsTabletSmall[1]), f <= this.options.itemsMobile[0] && !1 !== this.options.itemsMobile && (this.options.items = this.options.itemsMobile[1])
}
this.options.items > this.itemsAmount && !0 === this.options.itemsScaleUp && (this.options.items = this.itemsAmount)
},
response: function() {
var g = this,
f, h;
if (!0 !== g.options.responsive) {
return !1
}
h = d(c).width();
g.resizer = function() {
d(c).width() !== h && (!1 !== g.options.autoPlay && c.clearInterval(g.autoPlayInterval), c.clearTimeout(f), f = c.setTimeout(function() {
h = d(c).width();
g.updateVars()
}, g.options.responsiveRefreshRate))
};
d(c).resize(g.resizer)
},
updatePosition: function() {
this.jumpTo(this.currentItem);
!1 !== this.options.autoPlay && this.checkAp()
},
appendItemsSizes: function() {
var g = this,
f = 0,
h = g.itemsAmount - g.options.items;
g.$owlItems.each(function(j) {
var e = d(this);
e.css({
width: g.itemWidth
}).data("owl-item", Number(j));
if (0 === j % g.options.items || j === h) {
j > h || (f += 1)
}
e.data("owl-roundPages", f)
})
},
appendWrapperSizes: function() {
this.$owlWrapper.css({
width: this.$owlItems.length * this.itemWidth * 2,
left: 0
});
this.appendItemsSizes()
},
calculateAll: function() {
this.calculateWidth();
this.appendWrapperSizes();
this.loops();
this.max()
},
calculateWidth: function() {
this.itemWidth = Math.round(this.$elem.width() / this.options.items)
},
max: function() {
var e = -1 * (this.itemsAmount * this.itemWidth - this.options.items * this.itemWidth);
this.options.items > this.itemsAmount ? this.maximumPixels = e = this.maximumItem = 0 : (this.maximumItem = this.itemsAmount - this.options.items, this.maximumPixels = e);
return e
},
min: function() {
return 0
},
loops: function() {
var g = 0,
f = 0,
h, j;
this.positionsInArray = [0];
this.pagesInArray = [];
for (h = 0; h < this.itemsAmount; h += 1) {
f += this.itemWidth, this.positionsInArray.push(-f), !0 === this.options.scrollPerPage && (j = d(this.$owlItems[h]), j = j.data("owl-roundPages"), j !== g && (this.pagesInArray[g] = this.positionsInArray[h], g = j))
}
},
buildControls: function() {
if (!0 === this.options.navigation || !0 === this.options.pagination) {
this.owlControls = d('
').toggleClass("clickable", !this.browser.isTouch).appendTo(this.$elem)
}!0 === this.options.pagination && this.buildPagination();
!0 === this.options.navigation && this.buildButtons()
},
buildButtons: function() {
var f = this,
e = d('
');
f.owlControls.append(e);
f.buttonPrev = d("
", {
"class": "owl-prev",
html: f.options.navigationText[0] || ""
});
f.buttonNext = d("
", {
"class": "owl-next",
html: f.options.navigationText[1] || ""
});
e.append(f.buttonPrev).append(f.buttonNext);
e.on("touchstart.owlControls mousedown.owlControls", 'div[class^="owl"]', function(g) {
g.preventDefault()
});
e.on("touchend.owlControls mouseup.owlControls", 'div[class^="owl"]', function(g) {
g.preventDefault();
d(this).hasClass("owl-next") ? f.next() : f.prev()
})
},
buildPagination: function() {
var e = this;
e.paginationWrapper = d('');
e.owlControls.append(e.paginationWrapper);
e.paginationWrapper.on("touchend.owlControls mouseup.owlControls", ".owl-page", function(f) {
f.preventDefault();
Number(d(this).data("owl-page")) !== e.currentItem && e.goTo(Number(d(this).data("owl-page")), !0)
})
},
updatePagination: function() {
var h, f, k, m, l, j;
if (!1 === this.options.pagination) {
return !1
}
this.paginationWrapper.html("");
h = 0;
f = this.itemsAmount - this.itemsAmount % this.options.items;
for (m = 0; m < this.itemsAmount; m += 1) {
0 === m % this.options.items && (h += 1, f === m && (k = this.itemsAmount - this.options.items), l = d("
", {
"class": "owl-page"
}), j = d("
", {
text: !0 === this.options.paginationNumbers ? h : "",
"class": !0 === this.options.paginationNumbers ? "owl-numbers" : ""
}), l.append(j), l.data("owl-page", f === m ? k : m), l.data("owl-roundPages", h), this.paginationWrapper.append(l))
}
this.checkPagination()
},
checkPagination: function() {
var e = this;
if (!1 === e.options.pagination) {
return !1
}
e.paginationWrapper.find(".owl-page").each(function() {
d(this).data("owl-roundPages") === d(e.$owlItems[e.currentItem]).data("owl-roundPages") && (e.paginationWrapper.find(".owl-page").removeClass("active"), d(this).addClass("active"))
})
},
checkNavigation: function() {
if (!1 === this.options.navigation) {
return !1
}!1 === this.options.rewindNav && (0 === this.currentItem && 0 === this.maximumItem ? (this.buttonPrev.addClass("disabled"), this.buttonNext.addClass("disabled")) : 0 === this.currentItem && 0 !== this.maximumItem ? (this.buttonPrev.addClass("disabled"), this.buttonNext.removeClass("disabled")) : this.currentItem === this.maximumItem ? (this.buttonPrev.removeClass("disabled"), this.buttonNext.addClass("disabled")) : 0 !== this.currentItem && this.currentItem !== this.maximumItem && (this.buttonPrev.removeClass("disabled"), this.buttonNext.removeClass("disabled")))
},
updateControls: function() {
this.updatePagination();
this.checkNavigation();
this.owlControls && (this.options.items >= this.itemsAmount ? this.owlControls.hide() : this.owlControls.show())
},
destroyControls: function() {
this.owlControls && this.owlControls.remove()
},
next: function(e) {
if (this.isTransition) {
return !1
}
this.currentItem += !0 === this.options.scrollPerPage ? this.options.items : 1;
if (this.currentItem > this.maximumItem + (!0 === this.options.scrollPerPage ? this.options.items - 1 : 0)) {
if (!0 === this.options.rewindNav) {
this.currentItem = 0, e = "rewind"
} else {
return this.currentItem = this.maximumItem, !1
}
}
this.goTo(this.currentItem, e)
},
prev: function(e) {
if (this.isTransition) {
return !1
}
this.currentItem = !0 === this.options.scrollPerPage && 0 < this.currentItem && this.currentItem < this.options.items ? 0 : this.currentItem - (!0 === this.options.scrollPerPage ? this.options.items : 1);
if (0 > this.currentItem) {
if (!0 === this.options.rewindNav) {
this.currentItem = this.maximumItem, e = "rewind"
} else {
return this.currentItem = 0, !1
}
}
this.goTo(this.currentItem, e)
},
goTo: function(g, f, h) {
var j = this;
if (j.isTransition) {
return !1
}
"function" === typeof j.options.beforeMove && j.options.beforeMove.apply(this, [j.$elem]);
g >= j.maximumItem ? g = j.maximumItem : 0 >= g && (g = 0);
j.currentItem = j.owl.currentItem = g;
if (!1 !== j.options.transitionStyle && "drag" !== h && 1 === j.options.items && !0 === j.browser.support3d) {
return j.swapSpeed(0), !0 === j.browser.support3d ? j.transition3d(j.positionsInArray[g]) : j.css2slide(j.positionsInArray[g], 1), j.afterGo(), j.singleItemTransition(), !1
}
g = j.positionsInArray[g];
!0 === j.browser.support3d ? (j.isCss3Finish = !1, !0 === f ? (j.swapSpeed("paginationSpeed"), c.setTimeout(function() {
j.isCss3Finish = !0
}, j.options.paginationSpeed)) : "rewind" === f ? (j.swapSpeed(j.options.rewindSpeed), c.setTimeout(function() {
j.isCss3Finish = !0
}, j.options.rewindSpeed)) : (j.swapSpeed("slideSpeed"), c.setTimeout(function() {
j.isCss3Finish = !0
}, j.options.slideSpeed)), j.transition3d(g)) : !0 === f ? j.css2slide(g, j.options.paginationSpeed) : "rewind" === f ? j.css2slide(g, j.options.rewindSpeed) : j.css2slide(g, j.options.slideSpeed);
j.afterGo()
},
jumpTo: function(e) {
"function" === typeof this.options.beforeMove && this.options.beforeMove.apply(this, [this.$elem]);
e >= this.maximumItem || -1 === e ? e = this.maximumItem : 0 >= e && (e = 0);
this.swapSpeed(0);
!0 === this.browser.support3d ? this.transition3d(this.positionsInArray[e]) : this.css2slide(this.positionsInArray[e], 1);
this.currentItem = this.owl.currentItem = e;
this.afterGo()
},
afterGo: function() {
this.prevArr.push(this.currentItem);
this.prevItem = this.owl.prevItem = this.prevArr[this.prevArr.length - 2];
this.prevArr.shift(0);
this.prevItem !== this.currentItem && (this.checkPagination(), this.checkNavigation(), this.eachMoveUpdate(), !1 !== this.options.autoPlay && this.checkAp());
"function" === typeof this.options.afterMove && this.prevItem !== this.currentItem && this.options.afterMove.apply(this, [this.$elem])
},
stop: function() {
this.apStatus = "stop";
c.clearInterval(this.autoPlayInterval)
},
checkAp: function() {
"stop" !== this.apStatus && this.play()
},
play: function() {
var e = this;
e.apStatus = "play";
if (!1 === e.options.autoPlay) {
return !1
}
c.clearInterval(e.autoPlayInterval);
e.autoPlayInterval = c.setInterval(function() {
e.next(!0)
}, e.options.autoPlay)
},
swapSpeed: function(e) {
"slideSpeed" === e ? this.$owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)) : "paginationSpeed" === e ? this.$owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)) : "string" !== typeof e && this.$owlWrapper.css(this.addCssSpeed(e))
},
addCssSpeed: function(e) {
return {
"-webkit-transition": "all " + e + "ms ease",
"-moz-transition": "all " + e + "ms ease",
"-o-transition": "all " + e + "ms ease",
transition: "all " + e + "ms ease"
}
},
removeTransition: function() {
return {
"-webkit-transition": "",
"-moz-transition": "",
"-o-transition": "",
transition: ""
}
},
doTranslate: function(e) {
return {
"-webkit-transform": "translate3d(" + e + "px, 0px, 0px)",
"-moz-transform": "translate3d(" + e + "px, 0px, 0px)",
"-o-transform": "translate3d(" + e + "px, 0px, 0px)",
"-ms-transform": "translate3d(" + e + "px, 0px, 0px)",
transform: "translate3d(" + e + "px, 0px,0px)"
}
},
transition3d: function(e) {
this.$owlWrapper.css(this.doTranslate(e))
},
css2move: function(e) {
this.$owlWrapper.css({
left: e
})
},
css2slide: function(g, f) {
var h = this;
h.isCssFinish = !1;
h.$owlWrapper.stop(!0, !0).animate({
left: g
}, {
duration: f || h.options.slideSpeed,
complete: function() {
h.isCssFinish = !0
}
})
},
checkBrowser: function() {
var e = b.createElement("div");
e.style.cssText = " -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)";
e = e.style.cssText.match(/translate3d\(0px, 0px, 0px\)/g);
this.browser = {
support3d: null !== e && 1 === e.length,
isTouch: "ontouchstart" in c || c.navigator.msMaxTouchPoints
}
},
moveEvents: function() {
if (!1 !== this.options.mouseDrag || !1 !== this.options.touchDrag) {
this.gestures(), this.disabledEvents()
}
},
eventTypes: function() {
var e = ["s", "e", "x"];
this.ev_types = {};
!0 === this.options.mouseDrag && !0 === this.options.touchDrag ? e = ["touchstart.owl mousedown.owl", "touchmove.owl mousemove.owl", "touchend.owl touchcancel.owl mouseup.owl"] : !1 === this.options.mouseDrag && !0 === this.options.touchDrag ? e = ["touchstart.owl", "touchmove.owl", "touchend.owl touchcancel.owl"] : !0 === this.options.mouseDrag && !1 === this.options.touchDrag && (e = ["mousedown.owl", "mousemove.owl", "mouseup.owl"]);
this.ev_types.start = e[0];
this.ev_types.move = e[1];
this.ev_types.end = e[2]
},
disabledEvents: function() {
this.$elem.on("dragstart.owl", function(e) {
e.preventDefault()
});
this.$elem.on("mousedown.disableTextSelect", function(e) {
return d(e.target).is("input, textarea, select, option")
})
},
gestures: function() {
function g(e) {
if (void 0 !== e.touches) {
return {
x: e.touches[0].pageX,
y: e.touches[0].pageY
}
}
if (void 0 === e.touches) {
if (void 0 !== e.pageX) {
return {
x: e.pageX,
y: e.pageY
}
}
if (void 0 === e.pageX) {
return {
x: e.clientX,
y: e.clientY
}
}
}
}
function f(e) {
"on" === e ? (d(b).on(l.ev_types.move, k), d(b).on(l.ev_types.end, m)) : "off" === e && (d(b).off(l.ev_types.move), d(b).off(l.ev_types.end))
}
function k(e) {
e = e.originalEvent || e || c.event;
l.newPosX = g(e).x - j.offsetX;
l.newPosY = g(e).y - j.offsetY;
l.newRelativeX = l.newPosX - j.relativePos;
"function" === typeof l.options.startDragging && !0 !== j.dragging && 0 !== l.newRelativeX && (j.dragging = !0, l.options.startDragging.apply(l, [l.$elem]));
(8 < l.newRelativeX || -8 > l.newRelativeX) && !0 === l.browser.isTouch && (void 0 !== e.preventDefault ? e.preventDefault() : e.returnValue = !1, j.sliding = !0);
(10 < l.newPosY || -10 > l.newPosY) && !1 === j.sliding && d(b).off("touchmove.owl");
l.newPosX = Math.max(Math.min(l.newPosX, l.newRelativeX / 5), l.maximumPixels + l.newRelativeX / 5);
!0 === l.browser.support3d ? l.transition3d(l.newPosX) : l.css2move(l.newPosX)
}
function m(e) {
e = e.originalEvent || e || c.event;
var h;
e.target = e.target || e.srcElement;
j.dragging = !1;
!0 !== l.browser.isTouch && l.$owlWrapper.removeClass("grabbing");
l.dragDirection = 0 > l.newRelativeX ? l.owl.dragDirection = "left" : l.owl.dragDirection = "right";
0 !== l.newRelativeX && (h = l.getNewPosition(), l.goTo(h, !1, "drag"), j.targetElement === e.target && !0 !== l.browser.isTouch && (d(e.target).on("click.disable", function(n) {
n.stopImmediatePropagation();
n.stopPropagation();
n.preventDefault();
d(n.target).off("click.disable")
}), e = d._data(e.target, "events").click, h = e.pop(), e.splice(0, 0, h)));
f("off")
}
var l = this,
j = {
offsetX: 0,
offsetY: 0,
baseElWidth: 0,
relativePos: 0,
position: null,
minSwipe: null,
maxSwipe: null,
sliding: null,
dargging: null,
targetElement: null
};
l.isCssFinish = !0;
l.$elem.on(l.ev_types.start, ".owl-wrapper", function(n) {
n = n.originalEvent || n || c.event;
var h;
if (3 === n.which) {
return !1
}
if (!(l.itemsAmount <= l.options.items)) {
if (!1 === l.isCssFinish && !l.options.dragBeforeAnimFinish || !1 === l.isCss3Finish && !l.options.dragBeforeAnimFinish) {
return !1
}!1 !== l.options.autoPlay && c.clearInterval(l.autoPlayInterval);
!0 === l.browser.isTouch || l.$owlWrapper.hasClass("grabbing") || l.$owlWrapper.addClass("grabbing");
l.newPosX = 0;
l.newRelativeX = 0;
d(this).css(l.removeTransition());
h = d(this).position();
j.relativePos = h.left;
j.offsetX = g(n).x - h.left;
j.offsetY = g(n).y - h.top;
f("on");
j.sliding = !1;
j.targetElement = n.target || n.srcElement
}
})
},
getNewPosition: function() {
var e = this.closestItem();
e > this.maximumItem ? e = this.currentItem = this.maximumItem : 0 <= this.newPosX && (this.currentItem = e = 0);
return e
},
closestItem: function() {
var g = this,
f = !0 === g.options.scrollPerPage ? g.pagesInArray : g.positionsInArray,
h = g.newPosX,
j = null;
d.each(f, function(k, e) {
h - g.itemWidth / 20 > f[k + 1] && h - g.itemWidth / 20 < e && "left" === g.moveDirection() ? (j = e, g.currentItem = !0 === g.options.scrollPerPage ? d.inArray(j, g.positionsInArray) : k) : h + g.itemWidth / 20 < e && h + g.itemWidth / 20 > (f[k + 1] || f[k] - g.itemWidth) && "right" === g.moveDirection() && (!0 === g.options.scrollPerPage ? (j = f[k + 1] || f[f.length - 1], g.currentItem = d.inArray(j, g.positionsInArray)) : (j = f[k + 1], g.currentItem = k + 1))
});
return g.currentItem
},
moveDirection: function() {
var e;
0 > this.newRelativeX ? (e = "right", this.playDirection = "next") : (e = "left", this.playDirection = "prev");
return e
},
customEvents: function() {
var e = this;
e.$elem.on("owl.next", function() {
e.next()
});
e.$elem.on("owl.prev", function() {
e.prev()
});
e.$elem.on("owl.play", function(f, g) {
e.options.autoPlay = g;
e.play();
e.hoverStatus = "play"
});
e.$elem.on("owl.stop", function() {
e.stop();
e.hoverStatus = "stop"
});
e.$elem.on("owl.goTo", function(f, g) {
e.goTo(g)
});
e.$elem.on("owl.jumpTo", function(f, g) {
e.jumpTo(g)
})
},
stopOnHover: function() {
var e = this;
!0 === e.options.stopOnHover && !0 !== e.browser.isTouch && !1 !== e.options.autoPlay && (e.$elem.on("mouseover", function() {
e.stop()
}), e.$elem.on("mouseout", function() {
"stop" !== e.hoverStatus && e.play()
}))
},
lazyLoad: function() {
var g, f, h, k, j;
if (!1 === this.options.lazyLoad) {
return !1
}
for (g = 0; g < this.itemsAmount; g += 1) {
f = d(this.$owlItems[g]), "loaded" !== f.data("owl-loaded") && (h = f.data("owl-item"), k = f.find(".lazyOwl"), "string" !== typeof k.data("src") ? f.data("owl-loaded", "loaded") : (void 0 === f.data("owl-loaded") && (k.hide(), f.addClass("loading").data("owl-loaded", "checked")), (j = !0 === this.options.lazyFollow ? h >= this.currentItem : !0) && h < this.currentItem + this.options.items && k.length && this.lazyPreload(f, k)))
}
},
lazyPreload: function(h, g) {
function m() {
h.data("owl-loaded", "loaded").removeClass("loading");
g.removeAttr("data-src");
"fade" === n.options.lazyEffect ? g.fadeIn(400) : g.show();
"function" === typeof n.options.afterLazyLoad && n.options.afterLazyLoad.apply(this, [n.$elem])
}
function o() {
l += 1;
n.completeImg(g.get(0)) || !0 === j ? m() : 100 >= l ? c.setTimeout(o, 100) : m()
}
var n = this,
l = 0,
j;
"DIV" === g.prop("tagName") ? (g.css("background-image", "url(" + g.data("src") + ")"), j = !0) : g[0].src = g.data("src");
o()
},
autoHeight: function() {
function g() {
var e = d(h.$owlItems[h.currentItem]).height();
h.wrapperOuter.css("height", e + "px");
h.wrapperOuter.hasClass("autoHeight") || c.setTimeout(function() {
h.wrapperOuter.addClass("autoHeight")
}, 0)
}
function f() {
j += 1;
h.completeImg(k.get(0)) ? g() : 100 >= j ? c.setTimeout(f, 100) : h.wrapperOuter.css("height", "")
}
var h = this,
k = d(h.$owlItems[h.currentItem]).find("img"),
j;
void 0 !== k.get(0) ? (j = 0, f()) : g()
},
completeImg: function(e) {
return !e.complete || "undefined" !== typeof e.naturalWidth && 0 === e.naturalWidth ? !1 : !0
},
onVisibleItems: function() {
var e;
!0 === this.options.addClassActive && this.$owlItems.removeClass("active");
this.visibleItems = [];
for (e = this.currentItem; e < this.currentItem + this.options.items; e += 1) {
this.visibleItems.push(e), !0 === this.options.addClassActive && d(this.$owlItems[e]).addClass("active")
}
this.owl.visibleItems = this.visibleItems
},
transitionTypes: function(e) {
this.outClass = "owl-" + e + "-out";
this.inClass = "owl-" + e + "-in"
},
singleItemTransition: function() {
var j = this,
h = j.outClass,
m = j.inClass,
o = j.$owlItems.eq(j.currentItem),
n = j.$owlItems.eq(j.prevItem),
l = Math.abs(j.positionsInArray[j.currentItem]) + j.positionsInArray[j.prevItem],
k = Math.abs(j.positionsInArray[j.currentItem]) + j.itemWidth / 2;
j.isTransition = !0;
j.$owlWrapper.addClass("owl-origin").css({
"-webkit-transform-origin": k + "px",
"-moz-perspective-origin": k + "px",
"perspective-origin": k + "px"
});
n.css({
position: "relative",
left: l + "px"
}).addClass(h).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend", function() {
j.endPrev = !0;
n.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");
j.clearTransStyle(n, h)
});
o.addClass(m).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend", function() {
j.endCurrent = !0;
o.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");
j.clearTransStyle(o, m)
})
},
clearTransStyle: function(f, e) {
f.css({
position: "",
left: ""
}).removeClass(e);
this.endPrev && this.endCurrent && (this.$owlWrapper.removeClass("owl-origin"), this.isTransition = this.endCurrent = this.endPrev = !1)
},
owlStatus: function() {
this.owl = {
userOptions: this.userOptions,
baseElement: this.$elem,
userItems: this.$userItems,
owlItems: this.$owlItems,
currentItem: this.currentItem,
prevItem: this.prevItem,
visibleItems: this.visibleItems,
isTouch: this.browser.isTouch,
browser: this.browser,
dragDirection: this.dragDirection
}
},
clearEvents: function() {
this.$elem.off(".owl owl mousedown.disableTextSelect");
d(b).off(".owl owl");
d(c).off("resize", this.resizer)
},
unWrap: function() {
0 !== this.$elem.children().length && (this.$owlWrapper.unwrap(), this.$userItems.unwrap().unwrap(), this.owlControls && this.owlControls.remove());
this.clearEvents();
this.$elem.attr("style", this.$elem.data("owl-originalStyles") || "").attr("class", this.$elem.data("owl-originalClasses"))
},
destroy: function() {
this.stop();
c.clearInterval(this.checkVisible);
this.unWrap();
this.$elem.removeData()
},
reinit: function(e) {
e = d.extend({}, this.userOptions, e);
this.unWrap();
this.init(e, this.$elem)
},
addItem: function(g, f) {
var h;
if (!g) {
return !1
}
if (0 === this.$elem.children().length) {
return this.$elem.append(g), this.setVars(), !1
}
this.unWrap();
h = void 0 === f || -1 === f ? -1 : f;
h >= this.$userItems.length || -1 === h ? this.$userItems.eq(-1).after(g) : this.$userItems.eq(h).before(g);
this.setVars()
},
removeItem: function(e) {
if (0 === this.$elem.children().length) {
return !1
}
e = void 0 === e || -1 === e ? -1 : e;
this.unWrap();
this.$userItems.eq(e).remove();
this.setVars()
}
};
d.fn.owlCarousel = function(e) {
return this.each(function() {
if (!0 === d(this).data("owl-init")) {
return !1
}
d(this).data("owl-init", !0);
var f = Object.create(a);
f.init(e, this);
d.data(this, "owlCarousel", f)
})
};
d.fn.owlCarousel.options = {
items: 5,
itemsCustom: !1,
itemsDesktop: [1199, 4],
itemsDesktopSmall: [979, 3],
itemsTablet: [768, 2],
itemsTabletSmall: !1,
itemsMobile: [479, 1],
singleItem: !1,
itemsScaleUp: !1,
slideSpeed: 200,
paginationSpeed: 800,
rewindSpeed: 1000,
autoPlay: !1,
stopOnHover: !1,
navigation: !1,
navigationText: ["prev", "next"],
rewindNav: !0,
scrollPerPage: !1,
pagination: !0,
paginationNumbers: !1,
responsive: !0,
responsiveRefreshRate: 200,
responsiveBaseWidth: c,
baseClass: "owl-carousel",
theme: "owl-theme",
lazyLoad: !1,
lazyFollow: !0,
lazyEffect: "fade",
autoHeight: !1,
jsonPath: !1,
jsonSuccess: !1,
dragBeforeAnimFinish: !0,
mouseDrag: !0,
touchDrag: !0,
addClassActive: !1,
transitionStyle: !1,
beforeUpdate: !1,
afterUpdate: !1,
beforeInit: !1,
afterInit: !1,
beforeMove: !1,
afterMove: !1,
afterAction: !1,
startDragging: !1,
afterLazyLoad: !1
}
})(jQuery, window, document);
(function(a) {
a.fn.cardtable = function(b) {
var d = this,
e = {
headIndex: 0
},
c = a.extend({}, e, b),
f;
if (b && b.headIndex) {
f = b.headIndex
} else {
f = 0
}
return d.each(function() {
var m = a(this);
if (m.hasClass("stacktable")) {
return
}
var g = a(this).prop("class");
var o = a("
");
if (typeof c.myClass !== "undefined") {
o.addClass(c.myClass)
}
var n = "";
var l, h, j, p, k;
m.addClass("stacktable large-only");
l = m.find(">caption").clone();
h = m.find(">thead>tr,>tbody>tr,>tfoot>tr,>tr").eq(0);
m.siblings().filter(".small-only").remove();
m.find(">tbody>tr").each(function() {
j = "";
p = "";
k = a(this).prop("class");
a(this).find(">td,>th").each(function(q) {
if (a(this).html() !== "") {
p += '
';
if (h.find(">td,>th").eq(q).html()) {
p += '' + h.find(">td,>th").eq(q).html() + " | "
} else {
p += ' | '
}
p += '' + a(this).html() + " | ";
p += "
"
}
});
n += '
"
});
m.find(">tfoot>tr>td").each(function(r, q) {
if (a.trim(a(q).text()) !== "") {
n += '
"
}
});
o.prepend(l);
o.append(a(n));
m.before(o)
})
};
a.fn.stacktable = function(b) {
var d = this,
e = {
headIndex: 0,
displayHeader: true
},
c = a.extend({}, e, b),
f;
if (b && b.headIndex) {
f = b.headIndex
} else {
f = 0
}
return d.each(function() {
var g = a(this).prop("class");
var p = a('
');
if (typeof c.myClass !== "undefined") {
p.addClass(c.myClass)
}
var o = "";
var n, l, h, j, q, k, m;
n = a(this);
n.addClass("stacktable large-only");
l = n.find(">caption").clone();
h = n.find(">thead>tr,>tbody>tr,>tfoot>tr").eq(0);
m = n.data("display-header") === undefined ? c.displayHeader : n.data("display-header");
n.find(">tbody>tr, >thead>tr").each(function(r) {
j = "";
q = "";
k = a(this).prop("class");
if (r === 0) {
if (m) {
o += '
' + a(this).find(">th,>td").eq(f).html() + " |
---|
"
}
} else {
a(this).find(">td,>th").each(function(t) {
if (t === f) {
j = '
' + a(this).html() + " |
---|
"
} else {
if (a(this).html() !== "") {
q += '
';
if (h.find(">td,>th").eq(t).html()) {
q += '' + h.find(">td,>th").eq(t).html() + " | "
} else {
q += ' | '
}
q += '' + a(this).html() + " | ";
q += "
"
}
}
});
o += j + q
}
});
p.prepend(l);
p.append(a(o));
n.before(p)
})
};
a.fn.stackcolumns = function(b) {
var d = this,
e = {},
c = a.extend({}, e, b);
return d.each(function() {
var k = a(this);
var l = k.find(">caption").clone();
var j = k.find(">thead>tr,>tbody>tr,>tfoot>tr").eq(0).find(">td,>th").length;
if (j < 3) {
return
}
var f = a('
');
if (typeof c.myClass !== "undefined") {
f.addClass(c.myClass)
}
k.addClass("stacktable large-only");
var h = a("
");
var g = 1;
while (g < j) {
k.find(">thead>tr,>tbody>tr,>tfoot>tr").each(function(o) {
var m = a("
|
");
if (o === 0) {
m.addClass("st-head-row st-head-row-main")
}
var r = a(this).find(">td,>th").eq(0).clone().addClass("st-key");
var q = g;
if (a(this).find("*[colspan]").length) {
var p = 0;
a(this).find(">td,>th").each(function() {
var t = a(this).attr("colspan");
if (t) {
t = parseInt(t, 10);
q -= t - 1;
if ((p + t) > (g)) {
q += p + t - g - 1
}
p += t
} else {
p++
}
if (p > g) {
return false
}
})
}
var n = a(this).find(">td,>th").eq(q).clone().addClass("st-val").removeAttr("colspan");
m.append(r, n);
h.append(m)
});
++g
}
f.append(a(h));
f.prepend(l);
k.before(f)
})
}
}(jQuery));