", options: { disabled: !1, create: null }, _createWidget: function (t, r) { r = e(r || this.defaultElement || this)[0], this.element = e(r), this.uuid = n++, this.eventNamespace = "." + this.widgetName + this.uuid, this.options = e.widget.extend({}, this.options, this._getCreateOptions(), t), this.bindings = e(), this.hoverable = e(), this.focusable = e(), r !== this && (e.data(r, this.widgetName, this), e.data(r, this.widgetFullName, this), this._on(this.element, { remove: function (e) { e.target === r && this.destroy() } }), this.document = e(r.style ? r.ownerDocument : r.document || r), this.window = e(this.document[0].defaultView || this.document[0].parentWindow)), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init() }, _getCreateOptions: e.noop, _getCreateEventData: e.noop, _create: e.noop, _init: e.noop, destroy: function () { this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)), this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled " + "ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus") }, _destroy: e.noop, widget: function () { return this.element }, option: function (n, r) { var i = n, s, o, u; if (arguments.length === 0) return e.widget.extend({}, this.options); if (typeof n == "string") { i = {}, s = n.split("."), n = s.shift(); if (s.length) { o = i[n] = e.widget.extend({}, this.options[n]); for (u = 0; u < s.length - 1; u++) o[s[u]] = o[s[u]] || {}, o = o[s[u]]; n = s.pop(); if (r === t) return o[n] === t ? null : o[n]; o[n] = r } else { if (r === t) return this.options[n] === t ? null : this.options[n]; i[n] = r } } return this._setOptions(i), this }, _setOptions: function (e) { var t; for (t in e) this._setOption(t, e[t]); return this }, _setOption: function (e, t) { return this.options[e] = t, e === "disabled" && (this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !!t).attr("aria-disabled", t), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")), this }, enable: function () { return this._setOption("disabled", !1) }, disable: function () { return this._setOption("disabled", !0) }, _on: function (t, n) { var r, i = this; n ? (t = r = e(t), this.bindings = this.bindings.add(t)) : (n = t, t = this.element, r = this.widget()), e.each(n, function (n, s) { function o() { if (i.options.disabled === !0 || e(this).hasClass("ui-state-disabled")) return; return (typeof s == "string" ? i[s] : s).apply(i, arguments) } typeof s != "string" && (o.guid = s.guid = s.guid || o.guid || e.guid++); var u = n.match(/^(\w+)\s*(.*)$/), a = u[1] + i.eventNamespace, f = u[2]; f ? r.delegate(f, a, o) : t.bind(a, o) }) }, _off: function (e, t) { t = (t || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, e.unbind(t).undelegate(t) }, _delay: function (e, t) { function n() { return (typeof e == "string" ? r[e] : e).apply(r, arguments) } var r = this; return setTimeout(n, t || 0) }, _hoverable: function (t) { this.hoverable = this.hoverable.add(t), this._on(t, { mouseenter: function (t) { e(t.currentTarget).addClass("ui-state-hover") }, mouseleave: function (t) { e(t.currentTarget).removeClass("ui-state-hover") } }) }, _focusable: function (t) { this.focusable = this.focusable.add(t), this._on(t, { focusin: function (t) { e(t.currentTarget).addClass("ui-state-focus") }, focusout: function (t) { e(t.currentTarget).removeClass("ui-state-focus") } }) }, _trigger: function (t, n, r) { var i, s, o = this.options[t]; r = r || {}, n = e.Event(n), n.type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(), n.target = this.element[0], s = n.originalEvent; if (s) for (i in s) i in n || (n[i] = s[i]); return this.element.trigger(n, r), !(e.isFunction(o) && o.apply(this.element[0], [n].concat(r)) === !1 || n.isDefaultPrevented()) } }, e.each({ show: "fadeIn", hide: "fadeOut" }, function (t, n) { e.Widget.prototype["_" + t] = function (r, i, s) { typeof i == "string" && (i = { effect: i }); var o, u = i ? i === !0 || typeof i == "number" ? n : i.effect || n : t; i = i || {}, typeof i == "number" && (i = { duration: i }), o = !e.isEmptyObject(i), i.complete = s, i.delay && r.delay(i.delay), o && e.effects && (e.effects.effect[u] || e.uiBackCompat !== !1 && e.effects[u]) ? r[t](i) : u !== t && r[u] ? r[u](i.duration, i.easing, s) : r.queue(function (n) { e(this)[t](), s && s.call(r[0]), n() }) } }), e.uiBackCompat !== !1 && (e.Widget.prototype._getCreateOptions = function () { return e.metadata && e.metadata.get(this.element[0])[this.widgetName] }) })(jQuery); (function (e, t) { var n = !1; e(document).mouseup(function (e) { n = !1 }), e.widget("ui.mouse", { version: "1.9.1", options: { cancel: "input,textarea,button,select,option", distance: 1, delay: 0 }, _mouseInit: function () { var t = this; this.element.bind("mousedown." + this.widgetName, function (e) { return t._mouseDown(e) }).bind("click." + this.widgetName, function (n) { if (!0 === e.data(n.target, t.widgetName + ".preventClickEvent")) return e.removeData(n.target, t.widgetName + ".preventClickEvent"), n.stopImmediatePropagation(), !1 }), this.started = !1 }, _mouseDestroy: function () { this.element.unbind("." + this.widgetName), this._mouseMoveDelegate && e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate) }, _mouseDown: function (t) { if (n) return; this._mouseStarted && this._mouseUp(t), this._mouseDownEvent = t; var r = this, i = t.which === 1, s = typeof this.options.cancel == "string" && t.target.nodeName ? e(t.target).closest(this.options.cancel).length : !1; if (!i || s || !this._mouseCapture(t)) return !0; this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () { r.mouseDelayMet = !0 }, this.options.delay)); if (this._mouseDistanceMet(t) && this._mouseDelayMet(t)) { this._mouseStarted = this._mouseStart(t) !== !1; if (!this._mouseStarted) return t.preventDefault(), !0 } return !0 === e.data(t.target, this.widgetName + ".preventClickEvent") && e.removeData(t.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function (e) { return r._mouseMove(e) }, this._mouseUpDelegate = function (e) { return r._mouseUp(e) }, e(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), t.preventDefault(), n = !0, !0 }, _mouseMove: function (t) { return !e.ui.ie || document.documentMode >= 9 || !!t.button ? this._mouseStarted ? (this._mouseDrag(t), t.preventDefault()) : (this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, t) !== !1, this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)), !this._mouseStarted) : this._mouseUp(t) }, _mouseUp: function (t) { return e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, t.target === this._mouseDownEvent.target && e.data(t.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(t)), !1 }, _mouseDistanceMet: function (e) { return Math.max(Math.abs(this._mouseDownEvent.pageX - e.pageX), Math.abs(this._mouseDownEvent.pageY - e.pageY)) >= this.options.distance }, _mouseDelayMet: function (e) { return this.mouseDelayMet }, _mouseStart: function (e) { }, _mouseDrag: function (e) { }, _mouseStop: function (e) { }, _mouseCapture: function (e) { return !0 } }) })(jQuery); (function (e, t) { function h(e, t, n) { return [parseInt(e[0], 10) * (l.test(e[0]) ? t / 100 : 1), parseInt(e[1], 10) * (l.test(e[1]) ? n / 100 : 1)] } function p(t, n) { return parseInt(e.css(t, n), 10) || 0 } e.ui = e.ui || {}; var n, r = Math.max, i = Math.abs, s = Math.round, o = /left|center|right/, u = /top|center|bottom/, a = /[\+\-]\d+%?/, f = /^\w+/, l = /%$/, c = e.fn.position; e.position = { scrollbarWidth: function () { if (n !== t) return n; var r, i, s = e("
"), o = s.children()[0]; return e("body").append(s), r = o.offsetWidth, s.css("overflow", "scroll"), i = o.offsetWidth, r === i && (i = s[0].clientWidth), s.remove(), n = r - i }, getScrollInfo: function (t) { var n = t.isWindow ? "" : t.element.css("overflow-x"), r = t.isWindow ? "" : t.element.css("overflow-y"), i = n === "scroll" || n === "auto" && t.width < t.element[0].scrollWidth, s = r === "scroll" || r === "auto" && t.height < t.element[0].scrollHeight; return { width: i ? e.position.scrollbarWidth() : 0, height: s ? e.position.scrollbarWidth() : 0} }, getWithinInfo: function (t) { var n = e(t || window), r = e.isWindow(n[0]); return { element: n, isWindow: r, offset: n.offset() || { left: 0, top: 0 }, scrollLeft: n.scrollLeft(), scrollTop: n.scrollTop(), width: r ? n.width() : n.outerWidth(), height: r ? n.height() : n.outerHeight()} } }, e.fn.position = function (t) { if (!t || !t.of) return c.apply(this, arguments); t = e.extend({}, t); var n, l, d, v, m, g = e(t.of), y = e.position.getWithinInfo(t.within), b = e.position.getScrollInfo(y), w = g[0], E = (t.collision || "flip").split(" "), S = {}; return w.nodeType === 9 ? (l = g.width(), d = g.height(), v = { top: 0, left: 0 }) : e.isWindow(w) ? (l = g.width(), d = g.height(), v = { top: g.scrollTop(), left: g.scrollLeft() }) : w.preventDefault ? (t.at = "left top", l = d = 0, v = { top: w.pageY, left: w.pageX }) : (l = g.outerWidth(), d = g.outerHeight(), v = g.offset()), m = e.extend({}, v), e.each(["my", "at"], function () { var e = (t[this] || "").split(" "), n, r; e.length === 1 && (e = o.test(e[0]) ? e.concat(["center"]) : u.test(e[0]) ? ["center"].concat(e) : ["center", "center"]), e[0] = o.test(e[0]) ? e[0] : "center", e[1] = u.test(e[1]) ? e[1] : "center", n = a.exec(e[0]), r = a.exec(e[1]), S[this] = [n ? n[0] : 0, r ? r[0] : 0], t[this] = [f.exec(e[0])[0], f.exec(e[1])[0]] }), E.length === 1 && (E[1] = E[0]), t.at[0] === "right" ? m.left += l : t.at[0] === "center" && (m.left += l / 2), t.at[1] === "bottom" ? m.top += d : t.at[1] === "center" && (m.top += d / 2), n = h(S.at, l, d), m.left += n[0], m.top += n[1], this.each(function () { var o, u, a = e(this), f = a.outerWidth(), c = a.outerHeight(), w = p(this, "marginLeft"), x = p(this, "marginTop"), T = f + w + p(this, "marginRight") + b.width, N = c + x + p(this, "marginBottom") + b.height, C = e.extend({}, m), k = h(S.my, a.outerWidth(), a.outerHeight()); t.my[0] === "right" ? C.left -= f : t.my[0] === "center" && (C.left -= f / 2), t.my[1] === "bottom" ? C.top -= c : t.my[1] === "center" && (C.top -= c / 2), C.left += k[0], C.top += k[1], e.support.offsetFractions || (C.left = s(C.left), C.top = s(C.top)), o = { marginLeft: w, marginTop: x }, e.each(["left", "top"], function (r, i) { e.ui.position[E[r]] && e.ui.position[E[r]][i](C, { targetWidth: l, targetHeight: d, elemWidth: f, elemHeight: c, collisionPosition: o, collisionWidth: T, collisionHeight: N, offset: [n[0] + k[0], n[1] + k[1]], my: t.my, at: t.at, within: y, elem: a }) }), e.fn.bgiframe && a.bgiframe(), t.using && (u = function (e) { var n = v.left - C.left, s = n + l - f, o = v.top - C.top, u = o + d - c, h = { target: { element: g, left: v.left, top: v.top, width: l, height: d }, element: { element: a, left: C.left, top: C.top, width: f, height: c }, horizontal: s < 0 ? "left" : n > 0 ? "right" : "center", vertical: u < 0 ? "top" : o > 0 ? "bottom" : "middle" }; l < f && i(n + s) < l && (h.horizontal = "center"), d < c && i(o + u) < d && (h.vertical = "middle"), r(i(n), i(s)) > r(i(o), i(u)) ? h.important = "horizontal" : h.important = "vertical", t.using.call(this, e, h) }), a.offset(e.extend(C, { using: u })) }) }, e.ui.position = { fit: { left: function (e, t) { var n = t.within, i = n.isWindow ? n.scrollLeft : n.offset.left, s = n.width, o = e.left - t.collisionPosition.marginLeft, u = i - o, a = o + t.collisionWidth - s - i, f; t.collisionWidth > s ? u > 0 && a <= 0 ? (f = e.left + u + t.collisionWidth - s - i, e.left += u - f) : a > 0 && u <= 0 ? e.left = i : u > a ? e.left = i + s - t.collisionWidth : e.left = i : u > 0 ? e.left += u : a > 0 ? e.left -= a : e.left = r(e.left - o, e.left) }, top: function (e, t) { var n = t.within, i = n.isWindow ? n.scrollTop : n.offset.top, s = t.within.height, o = e.top - t.collisionPosition.marginTop, u = i - o, a = o + t.collisionHeight - s - i, f; t.collisionHeight > s ? u > 0 && a <= 0 ? (f = e.top + u + t.collisionHeight - s - i, e.top += u - f) : a > 0 && u <= 0 ? e.top = i : u > a ? e.top = i + s - t.collisionHeight : e.top = i : u > 0 ? e.top += u : a > 0 ? e.top -= a : e.top = r(e.top - o, e.top) } }, flip: { left: function (e, t) { var n = t.within, r = n.offset.left + n.scrollLeft, s = n.width, o = n.isWindow ? n.scrollLeft : n.offset.left, u = e.left - t.collisionPosition.marginLeft, a = u - o, f = u + t.collisionWidth - s - o, l = t.my[0] === "left" ? -t.elemWidth : t.my[0] === "right" ? t.elemWidth : 0, c = t.at[0] === "left" ? t.targetWidth : t.at[0] === "right" ? -t.targetWidth : 0, h = -2 * t.offset[0], p, d; if (a < 0) { p = e.left + l + c + h + t.collisionWidth - s - r; if (p < 0 || p < i(a)) e.left += l + c + h } else if (f > 0) { d = e.left - t.collisionPosition.marginLeft + l + c + h - o; if (d > 0 || i(d) < f) e.left += l + c + h } }, top: function (e, t) { var n = t.within, r = n.offset.top + n.scrollTop, s = n.height, o = n.isWindow ? n.scrollTop : n.offset.top, u = e.top - t.collisionPosition.marginTop, a = u - o, f = u + t.collisionHeight - s - o, l = t.my[1] === "top", c = l ? -t.elemHeight : t.my[1] === "bottom" ? t.elemHeight : 0, h = t.at[1] === "top" ? t.targetHeight : t.at[1] === "bottom" ? -t.targetHeight : 0, p = -2 * t.offset[1], d, v; a < 0 ? (v = e.top + c + h + p + t.collisionHeight - s - r, e.top + c + h + p > a && (v < 0 || v < i(a)) && (e.top += c + h + p)) : f > 0 && (d = e.top - t.collisionPosition.marginTop + c + h + p - o, e.top + c + h + p > f && (d > 0 || i(d) < f) && (e.top += c + h + p)) } }, flipfit: { left: function () { e.ui.position.flip.left.apply(this, arguments), e.ui.position.fit.left.apply(this, arguments) }, top: function () { e.ui.position.flip.top.apply(this, arguments), e.ui.position.fit.top.apply(this, arguments) } } }, function () { var t, n, r, i, s, o = document.getElementsByTagName("body")[0], u = document.createElement("div"); t = document.createElement(o ? "div" : "body"), r = { visibility: "hidden", width: 0, height: 0, border: 0, margin: 0, background: "none" }, o && e.extend(r, { position: "absolute", left: "-1000px", top: "-1000px" }); for (s in r) t.style[s] = r[s]; t.appendChild(u), n = o || document.documentElement, n.insertBefore(t, n.firstChild), u.style.cssText = "position: absolute; left: 10.7432222px;", i = e(u).offset().left, e.support.offsetFractions = i > 10 && i < 11, t.innerHTML = "", n.removeChild(t) } (), e.uiBackCompat !== !1 && function (e) { var n = e.fn.position; e.fn.position = function (r) { if (!r || !r.offset) return n.call(this, r); var i = r.offset.split(" "), s = r.at.split(" "); return i.length === 1 && (i[1] = i[0]), /^\d/.test(i[0]) && (i[0] = "+" + i[0]), /^\d/.test(i[1]) && (i[1] = "+" + i[1]), s.length === 1 && (/left|center|right/.test(s[0]) ? s[1] = "center" : (s[1] = s[0], s[0] = "center")), n.call(this, e.extend(r, { at: s[0] + i[0] + " " + s[1] + i[1], offset: t })) } } (jQuery) })(jQuery); (function (e, t) { e.widget("ui.draggable", e.ui.mouse, { version: "1.9.1", widgetEventPrefix: "drag", options: { addClasses: !0, appendTo: "parent", axis: !1, connectToSortable: !1, containment: !1, cursor: "auto", cursorAt: !1, grid: !1, handle: !1, helper: "original", iframeFix: !1, opacity: !1, refreshPositions: !1, revert: !1, revertDuration: 500, scope: "default", scroll: !0, scrollSensitivity: 20, scrollSpeed: 20, snap: !1, snapMode: "both", snapTolerance: 20, stack: !1, zIndex: !1 }, _create: function () { 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 (t) { var n = this.options; return this.helper || n.disabled || e(t.target).is(".ui-resizable-handle") ? !1 : (this.handle = this._getHandle(t), this.handle ? (e(n.iframeFix === !0 ? "iframe" : n.iframeFix).each(function () { e('
').css({ width: this.offsetWidth + "px", height: this.offsetHeight + "px", position: "absolute", opacity: "0.001", zIndex: 1e3 }).css(e(this).offset()).appendTo("body") }), !0) : !1) }, _mouseStart: function (t) { var n = this.options; return this.helper = this._createHelper(t), this.helper.addClass("ui-draggable-dragging"), this._cacheHelperProportions(), e.ui.ddmanager && (e.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 }, e.extend(this.offset, { click: { left: t.pageX - this.offset.left, top: t.pageY - this.offset.top }, parent: this._getParentOffset(), relative: this._getRelativeOffset() }), this.originalPosition = this.position = this._generatePosition(t), this.originalPageX = t.pageX, this.originalPageY = t.pageY, n.cursorAt && this._adjustOffsetFromHelper(n.cursorAt), n.containment && this._setContainment(), this._trigger("start", t) === !1 ? (this._clear(), !1) : (this._cacheHelperProportions(), e.ui.ddmanager && !n.dropBehaviour && e.ui.ddmanager.prepareOffsets(this, t), this._mouseDrag(t, !0), e.ui.ddmanager && e.ui.ddmanager.dragStart(this, t), !0) }, _mouseDrag: function (t, n) { this.position = this._generatePosition(t), this.positionAbs = this._convertPositionTo("absolute"); if (!n) { var r = this._uiHash(); if (this._trigger("drag", t, r) === !1) return this._mouseUp({}), !1; this.position = r.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"; return e.ui.ddmanager && e.ui.ddmanager.drag(this, t), !1 }, _mouseStop: function (t) { var n = !1; e.ui.ddmanager && !this.options.dropBehaviour && (n = e.ui.ddmanager.drop(this, t)), this.dropped && (n = this.dropped, this.dropped = !1); var r = this.element[0], i = !1; while (r && (r = r.parentNode)) r == document && (i = !0); if (!i && this.options.helper === "original") return !1; if (this.options.revert == "invalid" && !n || this.options.revert == "valid" && n || this.options.revert === !0 || e.isFunction(this.options.revert) && this.options.revert.call(this.element, n)) { var s = this; e(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () { s._trigger("stop", t) !== !1 && s._clear() }) } else this._trigger("stop", t) !== !1 && this._clear(); return !1 }, _mouseUp: function (t) { return e("div.ui-draggable-iframeFix").each(function () { this.parentNode.removeChild(this) }), e.ui.ddmanager && e.ui.ddmanager.dragStop(this, t), e.ui.mouse.prototype._mouseUp.call(this, t) }, cancel: function () { return this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(), this }, _getHandle: function (t) { var n = !this.options.handle || !e(this.options.handle, this.element).length ? !0 : !1; return e(this.options.handle, this.element).find("*").andSelf().each(function () { this == t.target && (n = !0) }), n }, _createHelper: function (t) { var n = this.options, r = e.isFunction(n.helper) ? e(n.helper.apply(this.element[0], [t])) : n.helper == "clone" ? this.element.clone().removeAttr("id") : this.element; return r.parents("body").length || r.appendTo(n.appendTo == "parent" ? this.element[0].parentNode : n.appendTo), r[0] != this.element[0] && !/(fixed|absolute)/.test(r.css("position")) && r.css("position", "absolute"), r }, _adjustOffsetFromHelper: function (t) { typeof t == "string" && (t = t.split(" ")), e.isArray(t) && (t = { left: +t[0], top: +t[1] || 0 }), "left" in t && (this.offset.click.left = t.left + this.margins.left), "right" in t && (this.offset.click.left = this.helperProportions.width - t.right + this.margins.left), "top" in t && (this.offset.click.top = t.top + this.margins.top), "bottom" in t && (this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top) }, _getParentOffset: function () { this.offsetParent = this.helper.offsetParent(); var t = this.offsetParent.offset(); this.cssPosition == "absolute" && this.scrollParent[0] != document && e.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop()); if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && e.ui.ie) t = { top: 0, left: 0 }; return { top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)} }, _getRelativeOffset: function () { if (this.cssPosition == "relative") { var e = this.element.position(); return { top: e.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: e.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()} } 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 t = this.options; t.containment == "parent" && (t.containment = this.helper[0].parentNode); if (t.containment == "document" || t.containment == "window") this.containment = [t.containment == "document" ? 0 : e(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, t.containment == "document" ? 0 : e(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, (t.containment == "document" ? 0 : e(window).scrollLeft()) + e(t.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (t.containment == "document" ? 0 : e(window).scrollTop()) + (e(t.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; if (!/^(document|window|parent)$/.test(t.containment) && t.containment.constructor != Array) { var n = e(t.containment), r = n[0]; if (!r) return; var i = n.offset(), s = e(r).css("overflow") != "hidden"; this.containment = [(parseInt(e(r).css("borderLeftWidth"), 10) || 0) + (parseInt(e(r).css("paddingLeft"), 10) || 0), (parseInt(e(r).css("borderTopWidth"), 10) || 0) + (parseInt(e(r).css("paddingTop"), 10) || 0), (s ? Math.max(r.scrollWidth, r.offsetWidth) : r.offsetWidth) - (parseInt(e(r).css("borderLeftWidth"), 10) || 0) - (parseInt(e(r).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (s ? Math.max(r.scrollHeight, r.offsetHeight) : r.offsetHeight) - (parseInt(e(r).css("borderTopWidth"), 10) || 0) - (parseInt(e(r).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relative_container = n } else t.containment.constructor == Array && (this.containment = t.containment) }, _convertPositionTo: function (t, n) { n || (n = this.position); var r = t == "absolute" ? 1 : -1, i = this.options, s = this.cssPosition != "absolute" || this.scrollParent[0] != document && !!e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, o = /(html|body)/i.test(s[0].tagName); return { top: n.top + this.offset.relative.top * r + this.offset.parent.top * r - (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : o ? 0 : s.scrollTop()) * r, left: n.left + this.offset.relative.left * r + this.offset.parent.left * r - (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : o ? 0 : s.scrollLeft()) * r} }, _generatePosition: function (t) { var n = this.options, r = this.cssPosition != "absolute" || this.scrollParent[0] != document && !!e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, i = /(html|body)/i.test(r[0].tagName), s = t.pageX, o = t.pageY; if (this.originalPosition) { var u; if (this.containment) { if (this.relative_container) { var a = this.relative_container.offset(); u = [this.containment[0] + a.left, this.containment[1] + a.top, this.containment[2] + a.left, this.containment[3] + a.top] } else u = this.containment; t.pageX - this.offset.click.left < u[0] && (s = u[0] + this.offset.click.left), t.pageY - this.offset.click.top < u[1] && (o = u[1] + this.offset.click.top), t.pageX - this.offset.click.left > u[2] && (s = u[2] + this.offset.click.left), t.pageY - this.offset.click.top > u[3] && (o = u[3] + this.offset.click.top) } if (n.grid) { var f = n.grid[1] ? this.originalPageY + Math.round((o - this.originalPageY) / n.grid[1]) * n.grid[1] : this.originalPageY; o = u ? f - this.offset.click.top < u[1] || f - this.offset.click.top > u[3] ? f - this.offset.click.top < u[1] ? f + n.grid[1] : f - n.grid[1] : f : f; var l = n.grid[0] ? this.originalPageX + Math.round((s - this.originalPageX) / n.grid[0]) * n.grid[0] : this.originalPageX; s = u ? l - this.offset.click.left < u[0] || l - this.offset.click.left > u[2] ? l - this.offset.click.left < u[0] ? l + n.grid[0] : l - n.grid[0] : l : l } } return { top: o - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : i ? 0 : r.scrollTop()), left: s - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : i ? 0 : r.scrollLeft())} }, _clear: function () { this.helper.removeClass("ui-draggable-dragging"), this.helper[0] != this.element[0] && !this.cancelHelperRemoval && this.helper.remove(), this.helper = null, this.cancelHelperRemoval = !1 }, _trigger: function (t, n, r) { return r = r || this._uiHash(), e.ui.plugin.call(this, t, [n, r]), t == "drag" && (this.positionAbs = this._convertPositionTo("absolute")), e.Widget.prototype._trigger.call(this, t, n, r) }, plugins: {}, _uiHash: function (e) { return { helper: this.helper, position: this.position, originalPosition: this.originalPosition, offset: this.positionAbs} } }), e.ui.plugin.add("draggable", "connectToSortable", { start: function (t, n) { var r = e(this).data("draggable"), i = r.options, s = e.extend({}, n, { item: r.element }); r.sortables = [], e(i.connectToSortable).each(function () { var n = e.data(this, "sortable"); n && !n.options.disabled && (r.sortables.push({ instance: n, shouldRevert: n.options.revert }), n.refreshPositions(), n._trigger("activate", t, s)) }) }, stop: function (t, n) { var r = e(this).data("draggable"), i = e.extend({}, n, { item: r.element }); e.each(r.sortables, function () { this.instance.isOver ? (this.instance.isOver = 0, r.cancelHelperRemoval = !0, this.instance.cancelHelperRemoval = !1, this.shouldRevert && (this.instance.options.revert = !0), this.instance._mouseStop(t), this.instance.options.helper = this.instance.options._helper, r.options.helper == "original" && this.instance.currentItem.css({ top: "auto", left: "auto" })) : (this.instance.cancelHelperRemoval = !1, this.instance._trigger("deactivate", t, i)) }) }, drag: function (t, n) { var r = e(this).data("draggable"), i = this, s = function (t) { var n = this.offset.click.top, r = this.offset.click.left, i = this.positionAbs.top, s = this.positionAbs.left, o = t.height, u = t.width, a = t.top, f = t.left; return e.ui.isOver(i + n, s + r, a, f, o, u) }; e.each(r.sortables, function (s) { var o = !1, u = this; this.instance.positionAbs = r.positionAbs, this.instance.helperProportions = r.helperProportions, this.instance.offset.click = r.offset.click, this.instance._intersectsWith(this.instance.containerCache) && (o = !0, e.each(r.sortables, function () { return this.instance.positionAbs = r.positionAbs, this.instance.helperProportions = r.helperProportions, this.instance.offset.click = r.offset.click, this != u && this.instance._intersectsWith(this.instance.containerCache) && e.ui.contains(u.instance.element[0], this.instance.element[0]) && (o = !1), o })), o ? (this.instance.isOver || (this.instance.isOver = 1, this.instance.currentItem = e(i).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item", !0), this.instance.options._helper = this.instance.options.helper, this.instance.options.helper = function () { return n.helper[0] }, t.target = this.instance.currentItem[0], this.instance._mouseCapture(t, !0), this.instance._mouseStart(t, !0, !0), this.instance.offset.click.top = r.offset.click.top, this.instance.offset.click.left = r.offset.click.left, this.instance.offset.parent.left -= r.offset.parent.left - this.instance.offset.parent.left, this.instance.offset.parent.top -= r.offset.parent.top - this.instance.offset.parent.top, r._trigger("toSortable", t), r.dropped = this.instance.element, r.currentItem = r.element, this.instance.fromOutside = r), this.instance.currentItem && this.instance._mouseDrag(t)) : this.instance.isOver && (this.instance.isOver = 0, this.instance.cancelHelperRemoval = !0, this.instance.options.revert = !1, this.instance._trigger("out", t, this.instance._uiHash(this.instance)), this.instance._mouseStop(t, !0), this.instance.options.helper = this.instance.options._helper, this.instance.currentItem.remove(), this.instance.placeholder && this.instance.placeholder.remove(), r._trigger("fromSortable", t), r.dropped = !1) }) } }), e.ui.plugin.add("draggable", "cursor", { start: function (t, n) { var r = e("body"), i = e(this).data("draggable").options; r.css("cursor") && (i._cursor = r.css("cursor")), r.css("cursor", i.cursor) }, stop: function (t, n) { var r = e(this).data("draggable").options; r._cursor && e("body").css("cursor", r._cursor) } }), e.ui.plugin.add("draggable", "opacity", { start: function (t, n) { var r = e(n.helper), i = e(this).data("draggable").options; r.css("opacity") && (i._opacity = r.css("opacity")), r.css("opacity", i.opacity) }, stop: function (t, n) { var r = e(this).data("draggable").options; r._opacity && e(n.helper).css("opacity", r._opacity) } }), e.ui.plugin.add("draggable", "scroll", { start: function (t, n) { var r = e(this).data("draggable"); r.scrollParent[0] != document && r.scrollParent[0].tagName != "HTML" && (r.overflowOffset = r.scrollParent.offset()) }, drag: function (t, n) { var r = e(this).data("draggable"), i = r.options, s = !1; if (r.scrollParent[0] != document && r.scrollParent[0].tagName != "HTML") { if (!i.axis || i.axis != "x") r.overflowOffset.top + r.scrollParent[0].offsetHeight - t.pageY < i.scrollSensitivity ? r.scrollParent[0].scrollTop = s = r.scrollParent[0].scrollTop + i.scrollSpeed : t.pageY - r.overflowOffset.top < i.scrollSensitivity && (r.scrollParent[0].scrollTop = s = r.scrollParent[0].scrollTop - i.scrollSpeed); if (!i.axis || i.axis != "y") r.overflowOffset.left + r.scrollParent[0].offsetWidth - t.pageX < i.scrollSensitivity ? r.scrollParent[0].scrollLeft = s = r.scrollParent[0].scrollLeft + i.scrollSpeed : t.pageX - r.overflowOffset.left < i.scrollSensitivity && (r.scrollParent[0].scrollLeft = s = r.scrollParent[0].scrollLeft - i.scrollSpeed) } else { if (!i.axis || i.axis != "x") t.pageY - e(document).scrollTop() < i.scrollSensitivity ? s = e(document).scrollTop(e(document).scrollTop() - i.scrollSpeed) : e(window).height() - (t.pageY - e(document).scrollTop()) < i.scrollSensitivity && (s = e(document).scrollTop(e(document).scrollTop() + i.scrollSpeed)); if (!i.axis || i.axis != "y") t.pageX - e(document).scrollLeft() < i.scrollSensitivity ? s = e(document).scrollLeft(e(document).scrollLeft() - i.scrollSpeed) : e(window).width() - (t.pageX - e(document).scrollLeft()) < i.scrollSensitivity && (s = e(document).scrollLeft(e(document).scrollLeft() + i.scrollSpeed)) } s !== !1 && e.ui.ddmanager && !i.dropBehaviour && e.ui.ddmanager.prepareOffsets(r, t) } }), e.ui.plugin.add("draggable", "snap", { start: function (t, n) { var r = e(this).data("draggable"), i = r.options; r.snapElements = [], e(i.snap.constructor != String ? i.snap.items || ":data(draggable)" : i.snap).each(function () { var t = e(this), n = t.offset(); this != r.element[0] && r.snapElements.push({ item: this, width: t.outerWidth(), height: t.outerHeight(), top: n.top, left: n.left }) }) }, drag: function (t, n) { var r = e(this).data("draggable"), i = r.options, s = i.snapTolerance, o = n.offset.left, u = o + r.helperProportions.width, a = n.offset.top, f = a + r.helperProportions.height; for (var l = r.snapElements.length - 1; l >= 0; l--) { var c = r.snapElements[l].left, h = c + r.snapElements[l].width, p = r.snapElements[l].top, d = p + r.snapElements[l].height; if (!(c - s < o && o < h + s && p - s < a && a < d + s || c - s < o && o < h + s && p - s < f && f < d + s || c - s < u && u < h + s && p - s < a && a < d + s || c - s < u && u < h + s && p - s < f && f < d + s)) { r.snapElements[l].snapping && r.options.snap.release && r.options.snap.release.call(r.element, t, e.extend(r._uiHash(), { snapItem: r.snapElements[l].item })), r.snapElements[l].snapping = !1; continue } if (i.snapMode != "inner") { var v = Math.abs(p - f) <= s, m = Math.abs(d - a) <= s, g = Math.abs(c - u) <= s, y = Math.abs(h - o) <= s; v && (n.position.top = r._convertPositionTo("relative", { top: p - r.helperProportions.height, left: 0 }).top - r.margins.top), m && (n.position.top = r._convertPositionTo("relative", { top: d, left: 0 }).top - r.margins.top), g && (n.position.left = r._convertPositionTo("relative", { top: 0, left: c - r.helperProportions.width }).left - r.margins.left), y && (n.position.left = r._convertPositionTo("relative", { top: 0, left: h }).left - r.margins.left) } var b = v || m || g || y; if (i.snapMode != "outer") { var v = Math.abs(p - a) <= s, m = Math.abs(d - f) <= s, g = Math.abs(c - o) <= s, y = Math.abs(h - u) <= s; v && (n.position.top = r._convertPositionTo("relative", { top: p, left: 0 }).top - r.margins.top), m && (n.position.top = r._convertPositionTo("relative", { top: d - r.helperProportions.height, left: 0 }).top - r.margins.top), g && (n.position.left = r._convertPositionTo("relative", { top: 0, left: c }).left - r.margins.left), y && (n.position.left = r._convertPositionTo("relative", { top: 0, left: h - r.helperProportions.width }).left - r.margins.left) } !r.snapElements[l].snapping && (v || m || g || y || b) && r.options.snap.snap && r.options.snap.snap.call(r.element, t, e.extend(r._uiHash(), { snapItem: r.snapElements[l].item })), r.snapElements[l].snapping = v || m || g || y || b } } }), e.ui.plugin.add("draggable", "stack", { start: function (t, n) { var r = e(this).data("draggable").options, i = e.makeArray(e(r.stack)).sort(function (t, n) { return (parseInt(e(t).css("zIndex"), 10) || 0) - (parseInt(e(n).css("zIndex"), 10) || 0) }); if (!i.length) return; var s = parseInt(i[0].style.zIndex) || 0; e(i).each(function (e) { this.style.zIndex = s + e }), this[0].style.zIndex = s + i.length } }), e.ui.plugin.add("draggable", "zIndex", { start: function (t, n) { var r = e(n.helper), i = e(this).data("draggable").options; r.css("zIndex") && (i._zIndex = r.css("zIndex")), r.css("zIndex", i.zIndex) }, stop: function (t, n) { var r = e(this).data("draggable").options; r._zIndex && e(n.helper).css("zIndex", r._zIndex) } }) })(jQuery); (function (e, t) { e.widget("ui.resizable", e.ui.mouse, { version: "1.9.1", widgetEventPrefix: "resize", options: { alsoResize: !1, animate: !1, animateDuration: "slow", animateEasing: "swing", aspectRatio: !1, autoHide: !1, containment: !1, ghost: !1, grid: !1, handles: "e,s,se", helper: !1, maxHeight: null, maxWidth: null, minHeight: 10, minWidth: 10, zIndex: 1e3 }, _create: function () { var t = this, n = this.options; this.element.addClass("ui-resizable"), e.extend(this, { _aspectRatio: !!n.aspectRatio, aspectRatio: n.aspectRatio, originalElement: this.element, _proportionallyResizeElements: [], _helper: n.helper || n.ghost || n.animate ? n.helper || "ui-resizable-helper" : null }), this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i) && (this.element.wrap(e('
').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 = !0, 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 = n.handles || (e(".ui-resizable-handle", this.element).length ? { 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"} : "e,s,se"); if (this.handles.constructor == String) { this.handles == "all" && (this.handles = "n,e,s,w,se,sw,ne,nw"); var r = this.handles.split(","); this.handles = {}; for (var i = 0; i < r.length; i++) { var s = e.trim(r[i]), o = "ui-resizable-" + s, u = e('
'); u.css({ zIndex: n.zIndex }), "se" == s && u.addClass("ui-icon ui-icon-gripsmall-diagonal-se"), this.handles[s] = ".ui-resizable-" + s, this.element.append(u) } } this._renderAxis = function (t) { t = t || this.element; for (var n in this.handles) { this.handles[n].constructor == String && (this.handles[n] = e(this.handles[n], this.element).show()); if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { var r = e(this.handles[n], this.element), i = 0; i = /sw|ne|nw|se|n|s/.test(n) ? r.outerHeight() : r.outerWidth(); var s = ["padding", /ne|nw|n/.test(n) ? "Top" : /se|sw|s/.test(n) ? "Bottom" : /^e$/.test(n) ? "Right" : "Left"].join(""); t.css(s, i), this._proportionallyResize() } if (!e(this.handles[n]).length) continue } }, this._renderAxis(this.element), this._handles = e(".ui-resizable-handle", this.element).disableSelection(), this._handles.mouseover(function () { if (!t.resizing) { if (this.className) var e = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); t.axis = e && e[1] ? e[1] : "se" } }), n.autoHide && (this._handles.hide(), e(this.element).addClass("ui-resizable-autohide").mouseenter(function () { if (n.disabled) return; e(this).removeClass("ui-resizable-autohide"), t._handles.show() }).mouseleave(function () { if (n.disabled) return; t.resizing || (e(this).addClass("ui-resizable-autohide"), t._handles.hide()) })), this._mouseInit() }, _destroy: function () { this._mouseDestroy(); var t = function (t) { e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove() }; if (this.elementIsWrapper) { t(this.element); var n = this.element; this.originalElement.css({ position: n.css("position"), width: n.outerWidth(), height: n.outerHeight(), top: n.css("top"), left: n.css("left") }).insertAfter(n), n.remove() } return this.originalElement.css("resize", this.originalResizeStyle), t(this.originalElement), this }, _mouseCapture: function (t) { var n = !1; for (var r in this.handles) e(this.handles[r])[0] == t.target && (n = !0); return !this.options.disabled && n }, _mouseStart: function (t) { var r = this.options, i = this.element.position(), s = this.element; this.resizing = !0, this.documentScroll = { top: e(document).scrollTop(), left: e(document).scrollLeft() }, (s.is(".ui-draggable") || /absolute/.test(s.css("position"))) && s.css({ position: "absolute", top: i.top, left: i.left }), this._renderProxy(); var o = n(this.helper.css("left")), u = n(this.helper.css("top")); r.containment && (o += e(r.containment).scrollLeft() || 0, u += e(r.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = { left: o, top: u }, this.size = this._helper ? { width: s.outerWidth(), height: s.outerHeight()} : { width: s.width(), height: s.height() }, this.originalSize = this._helper ? { width: s.outerWidth(), height: s.outerHeight()} : { width: s.width(), height: s.height() }, this.originalPosition = { left: o, top: u }, this.sizeDiff = { width: s.outerWidth() - s.width(), height: s.outerHeight() - s.height() }, this.originalMousePosition = { left: t.pageX, top: t.pageY }, this.aspectRatio = typeof r.aspectRatio == "number" ? r.aspectRatio : this.originalSize.width / this.originalSize.height || 1; var a = e(".ui-resizable-" + this.axis).css("cursor"); return e("body").css("cursor", a == "auto" ? this.axis + "-resize" : a), s.addClass("ui-resizable-resizing"), this._propagate("start", t), !0 }, _mouseDrag: function (e) { var t = this.helper, n = this.options, r = {}, i = this, s = this.originalMousePosition, o = this.axis, u = e.pageX - s.left || 0, a = e.pageY - s.top || 0, f = this._change[o]; if (!f) return !1; var l = f.apply(this, [e, u, a]); this._updateVirtualBoundaries(e.shiftKey); if (this._aspectRatio || e.shiftKey) l = this._updateRatio(l, e); return l = this._respectSize(l, e), this._propagate("resize", e), t.css({ top: this.position.top + "px", left: this.position.left + "px", width: this.size.width + "px", height: this.size.height + "px" }), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), this._updateCache(l), this._trigger("resize", e, this.ui()), !1 }, _mouseStop: function (t) { this.resizing = !1; var n = this.options, r = this; if (this._helper) { var i = this._proportionallyResizeElements, s = i.length && /textarea/i.test(i[0].nodeName), o = s && e.ui.hasScroll(i[0], "left") ? 0 : r.sizeDiff.height, u = s ? 0 : r.sizeDiff.width, a = { width: r.helper.width() - u, height: r.helper.height() - o }, f = parseInt(r.element.css("left"), 10) + (r.position.left - r.originalPosition.left) || null, l = parseInt(r.element.css("top"), 10) + (r.position.top - r.originalPosition.top) || null; n.animate || this.element.css(e.extend(a, { top: l, left: f })), r.helper.height(r.size.height), r.helper.width(r.size.width), this._helper && !n.animate && this._proportionallyResize() } return e("body").css("cursor", "auto"), this.element.removeClass("ui-resizable-resizing"), this._propagate("stop", t), this._helper && this.helper.remove(), !1 }, _updateVirtualBoundaries: function (e) { var t = this.options, n, i, s, o, u; u = { minWidth: r(t.minWidth) ? t.minWidth : 0, maxWidth: r(t.maxWidth) ? t.maxWidth : Infinity, minHeight: r(t.minHeight) ? t.minHeight : 0, maxHeight: r(t.maxHeight) ? t.maxHeight : Infinity }; if (this._aspectRatio || e) n = u.minHeight * this.aspectRatio, s = u.minWidth / this.aspectRatio, i = u.maxHeight * this.aspectRatio, o = u.maxWidth / this.aspectRatio, n > u.minWidth && (u.minWidth = n), s > u.minHeight && (u.minHeight = s), i < u.maxWidth && (u.maxWidth = i), o < u.maxHeight && (u.maxHeight = o); this._vBoundaries = u }, _updateCache: function (e) { var t = this.options; this.offset = this.helper.offset(), r(e.left) && (this.position.left = e.left), r(e.top) && (this.position.top = e.top), r(e.height) && (this.size.height = e.height), r(e.width) && (this.size.width = e.width) }, _updateRatio: function (e, t) { var n = this.options, i = this.position, s = this.size, o = this.axis; return r(e.height) ? e.width = e.height * this.aspectRatio : r(e.width) && (e.height = e.width / this.aspectRatio), o == "sw" && (e.left = i.left + (s.width - e.width), e.top = null), o == "nw" && (e.top = i.top + (s.height - e.height), e.left = i.left + (s.width - e.width)), e }, _respectSize: function (e, t) { var n = this.helper, i = this._vBoundaries, s = this._aspectRatio || t.shiftKey, o = this.axis, u = r(e.width) && i.maxWidth && i.maxWidth < e.width, a = r(e.height) && i.maxHeight && i.maxHeight < e.height, f = r(e.width) && i.minWidth && i.minWidth > e.width, l = r(e.height) && i.minHeight && i.minHeight > e.height; f && (e.width = i.minWidth), l && (e.height = i.minHeight), u && (e.width = i.maxWidth), a && (e.height = i.maxHeight); var c = this.originalPosition.left + this.originalSize.width, h = this.position.top + this.size.height, p = /sw|nw|w/.test(o), d = /nw|ne|n/.test(o); f && p && (e.left = c - i.minWidth), u && p && (e.left = c - i.maxWidth), l && d && (e.top = h - i.minHeight), a && d && (e.top = h - i.maxHeight); var v = !e.width && !e.height; return v && !e.left && e.top ? e.top = null : v && !e.top && e.left && (e.left = null), e }, _proportionallyResize: function () { var t = this.options; if (!this._proportionallyResizeElements.length) return; var n = this.helper || this.element; for (var r = 0; r < this._proportionallyResizeElements.length; r++) { var i = this._proportionallyResizeElements[r]; if (!this.borderDif) { var s = [i.css("borderTopWidth"), i.css("borderRightWidth"), i.css("borderBottomWidth"), i.css("borderLeftWidth")], o = [i.css("paddingTop"), i.css("paddingRight"), i.css("paddingBottom"), i.css("paddingLeft")]; this.borderDif = e.map(s, function (e, t) { var n = parseInt(e, 10) || 0, r = parseInt(o[t], 10) || 0; return n + r }) } i.css({ height: n.height() - this.borderDif[0] - this.borderDif[2] || 0, width: n.width() - this.borderDif[1] - this.borderDif[3] || 0 }) } }, _renderProxy: function () { var t = this.element, n = this.options; this.elementOffset = t.offset(); if (this._helper) { this.helper = this.helper || e('
'); var r = e.ui.ie6 ? 1 : 0, i = e.ui.ie6 ? 2 : -1; this.helper.addClass(this._helper).css({ width: this.element.outerWidth() + i, height: this.element.outerHeight() + i, position: "absolute", left: this.elementOffset.left - r + "px", top: this.elementOffset.top - r + "px", zIndex: ++n.zIndex }), this.helper.appendTo("body").disableSelection() } else this.helper = this.element }, _change: { e: function (e, t, n) { return { width: this.originalSize.width + t} }, w: function (e, t, n) { var r = this.options, i = this.originalSize, s = this.originalPosition; return { left: s.left + t, width: i.width - t} }, n: function (e, t, n) { var r = this.options, i = this.originalSize, s = this.originalPosition; return { top: s.top + n, height: i.height - n} }, s: function (e, t, n) { return { height: this.originalSize.height + n} }, se: function (t, n, r) { return e.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [t, n, r])) }, sw: function (t, n, r) { return e.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [t, n, r])) }, ne: function (t, n, r) { return e.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [t, n, r])) }, nw: function (t, n, r) { return e.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [t, n, r])) } }, _propagate: function (t, n) { e.ui.plugin.call(this, t, [n, this.ui()]), t != "resize" && this._trigger(t, n, 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} } }), e.ui.plugin.add("resizable", "alsoResize", { start: function (t, n) { var r = e(this).data("resizable"), i = r.options, s = function (t) { e(t).each(function () { var t = e(this); t.data("resizable-alsoresize", { width: parseInt(t.width(), 10), height: parseInt(t.height(), 10), left: parseInt(t.css("left"), 10), top: parseInt(t.css("top"), 10) }) }) }; typeof i.alsoResize == "object" && !i.alsoResize.parentNode ? i.alsoResize.length ? (i.alsoResize = i.alsoResize[0], s(i.alsoResize)) : e.each(i.alsoResize, function (e) { s(e) }) : s(i.alsoResize) }, resize: function (t, n) { var r = e(this).data("resizable"), i = r.options, s = r.originalSize, o = r.originalPosition, u = { height: r.size.height - s.height || 0, width: r.size.width - s.width || 0, top: r.position.top - o.top || 0, left: r.position.left - o.left || 0 }, a = function (t, r) { e(t).each(function () { var t = e(this), i = e(this).data("resizable-alsoresize"), s = {}, o = r && r.length ? r : t.parents(n.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; e.each(o, function (e, t) { var n = (i[t] || 0) + (u[t] || 0); n && n >= 0 && (s[t] = n || null) }), t.css(s) }) }; typeof i.alsoResize == "object" && !i.alsoResize.nodeType ? e.each(i.alsoResize, function (e, t) { a(e, t) }) : a(i.alsoResize) }, stop: function (t, n) { e(this).removeData("resizable-alsoresize") } }), e.ui.plugin.add("resizable", "animate", { stop: function (t, n) { var r = e(this).data("resizable"), i = r.options, s = r._proportionallyResizeElements, o = s.length && /textarea/i.test(s[0].nodeName), u = o && e.ui.hasScroll(s[0], "left") ? 0 : r.sizeDiff.height, a = o ? 0 : r.sizeDiff.width, f = { width: r.size.width - a, height: r.size.height - u }, l = parseInt(r.element.css("left"), 10) + (r.position.left - r.originalPosition.left) || null, c = parseInt(r.element.css("top"), 10) + (r.position.top - r.originalPosition.top) || null; r.element.animate(e.extend(f, c && l ? { top: c, left: l} : {}), { duration: i.animateDuration, easing: i.animateEasing, step: function () { var n = { width: parseInt(r.element.css("width"), 10), height: parseInt(r.element.css("height"), 10), top: parseInt(r.element.css("top"), 10), left: parseInt(r.element.css("left"), 10) }; s && s.length && e(s[0]).css({ width: n.width, height: n.height }), r._updateCache(n), r._propagate("resize", t) } }) } }), e.ui.plugin.add("resizable", "containment", { start: function (t, r) { var i = e(this).data("resizable"), s = i.options, o = i.element, u = s.containment, a = u instanceof e ? u.get(0) : /parent/.test(u) ? o.parent().get(0) : u; if (!a) return; i.containerElement = e(a); if (/document/.test(u) || u == document) i.containerOffset = { left: 0, top: 0 }, i.containerPosition = { left: 0, top: 0 }, i.parentData = { element: e(document), left: 0, top: 0, width: e(document).width(), height: e(document).height() || document.body.parentNode.scrollHeight }; else { var f = e(a), l = []; e(["Top", "Right", "Left", "Bottom"]).each(function (e, t) { l[e] = n(f.css("padding" + t)) }), i.containerOffset = f.offset(), i.containerPosition = f.position(), i.containerSize = { height: f.innerHeight() - l[3], width: f.innerWidth() - l[1] }; var c = i.containerOffset, h = i.containerSize.height, p = i.containerSize.width, d = e.ui.hasScroll(a, "left") ? a.scrollWidth : p, v = e.ui.hasScroll(a) ? a.scrollHeight : h; i.parentData = { element: a, left: c.left, top: c.top, width: d, height: v} } }, resize: function (t, n) { var r = e(this).data("resizable"), i = r.options, s = r.containerSize, o = r.containerOffset, u = r.size, a = r.position, f = r._aspectRatio || t.shiftKey, l = { top: 0, left: 0 }, c = r.containerElement; c[0] != document && /static/.test(c.css("position")) && (l = o), a.left < (r._helper ? o.left : 0) && (r.size.width = r.size.width + (r._helper ? r.position.left - o.left : r.position.left - l.left), f && (r.size.height = r.size.width / r.aspectRatio), r.position.left = i.helper ? o.left : 0), a.top < (r._helper ? o.top : 0) && (r.size.height = r.size.height + (r._helper ? r.position.top - o.top : r.position.top), f && (r.size.width = r.size.height * r.aspectRatio), r.position.top = r._helper ? o.top : 0), r.offset.left = r.parentData.left + r.position.left, r.offset.top = r.parentData.top + r.position.top; var h = Math.abs((r._helper ? r.offset.left - l.left : r.offset.left - l.left) + r.sizeDiff.width), p = Math.abs((r._helper ? r.offset.top - l.top : r.offset.top - o.top) + r.sizeDiff.height), d = r.containerElement.get(0) == r.element.parent().get(0), v = /relative|absolute/.test(r.containerElement.css("position")); d && v && (h -= r.parentData.left), h + r.size.width >= r.parentData.width && (r.size.width = r.parentData.width - h, f && (r.size.height = r.size.width / r.aspectRatio)), p + r.size.height >= r.parentData.height && (r.size.height = r.parentData.height - p, f && (r.size.width = r.size.height * r.aspectRatio)) }, stop: function (t, n) { var r = e(this).data("resizable"), i = r.options, s = r.position, o = r.containerOffset, u = r.containerPosition, a = r.containerElement, f = e(r.helper), l = f.offset(), c = f.outerWidth() - r.sizeDiff.width, h = f.outerHeight() - r.sizeDiff.height; r._helper && !i.animate && /relative/.test(a.css("position")) && e(this).css({ left: l.left - u.left - o.left, width: c, height: h }), r._helper && !i.animate && /static/.test(a.css("position")) && e(this).css({ left: l.left - u.left - o.left, width: c, height: h }) } }), e.ui.plugin.add("resizable", "ghost", { start: function (t, n) { var r = e(this).data("resizable"), i = r.options, s = r.size; r.ghost = r.originalElement.clone(), r.ghost.css({ opacity: .25, display: "block", position: "relative", height: s.height, width: s.width, margin: 0, left: 0, top: 0 }).addClass("ui-resizable-ghost").addClass(typeof i.ghost == "string" ? i.ghost : ""), r.ghost.appendTo(r.helper) }, resize: function (t, n) { var r = e(this).data("resizable"), i = r.options; r.ghost && r.ghost.css({ position: "relative", height: r.size.height, width: r.size.width }) }, stop: function (t, n) { var r = e(this).data("resizable"), i = r.options; r.ghost && r.helper && r.helper.get(0).removeChild(r.ghost.get(0)) } }), e.ui.plugin.add("resizable", "grid", { resize: function (t, n) { var r = e(this).data("resizable"), i = r.options, s = r.size, o = r.originalSize, u = r.originalPosition, a = r.axis, f = i._aspectRatio || t.shiftKey; i.grid = typeof i.grid == "number" ? [i.grid, i.grid] : i.grid; var l = Math.round((s.width - o.width) / (i.grid[0] || 1)) * (i.grid[0] || 1), c = Math.round((s.height - o.height) / (i.grid[1] || 1)) * (i.grid[1] || 1); /^(se|s|e)$/.test(a) ? (r.size.width = o.width + l, r.size.height = o.height + c) : /^(ne)$/.test(a) ? (r.size.width = o.width + l, r.size.height = o.height + c, r.position.top = u.top - c) : /^(sw)$/.test(a) ? (r.size.width = o.width + l, r.size.height = o.height + c, r.position.left = u.left - l) : (r.size.width = o.width + l, r.size.height = o.height + c, r.position.top = u.top - c, r.position.left = u.left - l) } }); var n = function (e) { return parseInt(e, 10) || 0 }, r = function (e) { return !isNaN(parseInt(e, 10)) } })(jQuery); (function (e, t) { var n, r, i, s, o = "ui-button ui-widget ui-state-default ui-corner-all", u = "ui-state-hover ui-state-active ", a = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", f = function () { var t = e(this).find(":ui-button"); setTimeout(function () { t.button("refresh") }, 1) }, l = function (t) { var n = t.name, r = t.form, i = e([]); return n && (r ? i = e(r).find("[name='" + n + "']") : i = e("[name='" + n + "']", t.ownerDocument).filter(function () { return !this.form })), i }; e.widget("ui.button", { version: "1.9.1", defaultElement: "