File manager - Edit - /home/linknsbh/m.linkat.online/admin/assets/js/plugins/slidepanel/jquery-slidePanel.min.js
Back
/*! jQuery slidePanel - v0.2.2 - 2015-10-14 * https://github.com/amazingSurge/jquery-slidePanel * Copyright (c) 2015 amazingSurge; Licensed GPL */ !function (a, b, c, d) { "use strict"; function e() { return "undefined" != typeof c.performance && c.performance.now ? c.performance.now() : Date.now() } function f(a) { return "string" == typeof a && -1 != a.indexOf("%") } function g(a) { return "string" == typeof a && -1 != a.indexOf("px") } function h(a) { return a && "matrix" == a.substr(0, 6) ? a.replace(/^.*\((.*)\)$/g, "$1").replace(/px/g, "").split(/, +/) : !1 } function i(a) { "string" != typeof a && (a = JSON.stringify(a)); var b, c, d, e = 0; if (0 === a.length)return e; for (b = 0, d = a.length; d > b; b++)c = a.charCodeAt(b), e = (e << 5) - e + c, e |= 0; return e } function j(a, b, c, d) { function e(a, b) { return 1 - 3 * b + 3 * a } function f(a, b) { return 3 * b - 6 * a } function g(a) { return 3 * a } function h(a, b, c) { return ((e(b, c) * a + f(b, c)) * a + g(b)) * a } function i(a, b, c) { return 3 * e(b, c) * a * a + 2 * f(b, c) * a + g(b) } function j(b) { for (var d = b, e = 0; 4 > e; ++e) { var f = i(d, a, c); if (0 === f)return d; var g = h(d, a, c) - b; d -= g / f } return d } return a === b && c === d ? { css: "linear", fn: function (a) { return a } } : { css: "cubic-bezier(" + a + "," + b + "," + c + "," + d + ")", fn: function (a) { return h(j(a), b, d) } } } function k() { return this.initialize.apply(this, Array.prototype.slice.call(arguments)) } function l() { return this.initialize.apply(this, Array.prototype.slice.call(arguments)) } function m() { return this.initialize.apply(this, Array.prototype.slice.call(arguments)) } function n() { return this.initialize.apply(this, Array.prototype.slice.call(arguments)) } var o = a.slidePanel = function () { o.show.apply(this, arguments) }; Date.now || (Date.now = function () { return (new Date).getTime() }); for (var p = ["webkit", "moz"], q = 0; q < p.length && !c.requestAnimationFrame; ++q) { var r = p[q]; c.requestAnimationFrame = c[r + "RequestAnimationFrame"], c.cancelAnimationFrame = c[r + "CancelAnimationFrame"] || c[r + "CancelRequestAnimationFrame"] } if (/iP(ad|hone|od).*OS (6|7|8)/.test(c.navigator.userAgent) || !c.requestAnimationFrame || !c.cancelAnimationFrame) { var s = 0; c.requestAnimationFrame = function (a) { var b = e(), c = Math.max(s + 16, b); return setTimeout(function () { a(s = c) }, c - b) }, c.cancelAnimationFrame = clearTimeout } var t = function () { function e(b, c) { var e = !1, f = b.charAt(0).toUpperCase() + b.slice(1); return g[b] !== d && (e = b), e || a.each(h, function (a, b) { return g[b + f] !== d ? (e = "-" + b.toLowerCase() + "-" + f, !1) : void 0 }), c ? e : e ? !0 : !1 } function f(a) { return e(a, !0) } var g = a("<support>").get(0).style, h = ["webkit", "Moz", "O", "ms"], i = { transition: { end: { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd", transition: "transitionend" } }, animation: { end: { WebkitAnimation: "webkitAnimationEnd", MozAnimation: "animationend", OAnimation: "oAnimationEnd", animation: "animationend" } } }, j = { csstransforms: function () { return !!e("transform") }, csstransforms3d: function () { return !!e("perspective") }, csstransitions: function () { return !!e("transition") }, cssanimations: function () { return !!e("animation") } }, k = {}; return j.csstransitions() && (k.transition = new String(f("transition")), k.transition.end = i.transition.end[k.transition]), j.cssanimations() && (k.animation = new String(f("animation")), k.animation.end = i.animation.end[k.animation]), j.csstransforms() && (k.transform = new String(f("transform")), k.transform3d = j.csstransforms3d()), k.touch = "ontouchstart"in c || c.DocumentTouch && b instanceof c.DocumentTouch ? !0 : !1, k.pointer = c.PointerEvent || c.MSPointerEvent ? !0 : !1, k.prefixPointerEvent = function (a) { return c.MSPointerEvent ? "MSPointer" + a.charAt(9).toUpperCase() + a.substr(10) : a }, k }(), u = { ease: j(.25, .1, .25, 1), linear: j(0, 0, 1, 1), "ease-in": j(.42, 0, 1, 1), "ease-out": j(0, 0, .58, 1), "ease-in-out": j(.42, 0, .58, 1) }; o.options = { skin: null, classes: { base: "slidePanel", show: "slidePanel-show", loading: "preloader", content: "slidePanel-content", dragging: "slidePanel-dragging", willClose: "slidePanel-will-close" }, closeSelector: null, template: function (a) { return '<div class="' + a.classes.base + " " + a.classes.base + "-" + a.direction + '"><div class="' + a.classes.content + '"></div></div>' }, loading: { appendTo: "panel", template: function (a) { return '<div class="' + a.classes.loading + '"></div>' }, showCallback: function (a) { this.$el.addClass(a.classes.loading + "-show") }, hideCallback: function (a) { this.$el.removeClass(a.classes.loading + "-show") } }, contentFilter: function (a) { return a }, useCssTransforms3d: !0, useCssTransforms: !0, useCssTransitions: !0, dragTolerance: 150, mouseDragHandler: null, mouseDrag: !0, touchDrag: !0, pointerDrag: !0, direction: "right", duration: "500", easing: "ease", beforeLoad: a.noop, afterLoad: a.noop, beforeShow: a.noop, afterShow: a.noop, onChange: a.noop, beforeChange: a.noop, beforeHide: a.noop, afterHide: a.noop, beforeDrag: a.noop, afterDrag: a.noop }, a.extend(k.prototype, { initialize: function (a) { this.options = a, this._instance = null, this._showed = !1, this._isLoading = !1, this.build() }, setLength: function () { switch (this.options.direction) { case"top": case"bottom": this._length = this.$panel.outerHeight(); break; case"left": case"right": this._length = this.$panel.outerWidth() } }, build: function () { if (!this._builded) { var b = this.options, c = b.template.call(this, b), d = this; this.$panel = a(c).appendTo("body"), b.skin && this.$panel.addClass(b.skin), this.$content = this.$panel.find("." + this.options.classes.content), b.closeSelector && this.$panel.on("click", b.closeSelector, function () { return d.hide(), !1 }), this.loading = new l(this), this.setLength(), this.setPosition(this.getHidePosition()), (b.mouseDrag || b.touchDrag || b.pointerDrag) && (this.drag = new m(this)), this._builded = !0 } }, getHidePosition: function () { var b = this.options; if (b.useCssTransforms || b.useCssTransforms3d)switch (b.direction) { case"top": case"left": return "-100"; case"bottom": case"right": return "100" } else switch (b.direction) { case"top": case"bottom": return parseFloat(100 * -(this._length / a(c).height()), 10); case"left": case"right": return parseFloat(100 * -(this._length / a(c).width()), 10) } }, empty: function () { this._instance = null, this.$content.empty() }, load: function (b) { function c(a) { a = e.contentFilter.call(this, a, b), d.$content.html(a), d.hideLoading(), d._instance = b, w.trigger(d, "afterLoad", b) } { var d = this, e = b.options; this._instance } w.trigger(this, "beforeLoad", b), this.empty(), b.content ? c(b.content) : b.url ? (this.showLoading(), a.ajax(b.url, b.settings || {}).done(function (a) { c(a) })) : c("") }, showLoading: function () { var a = this; this.loading.show(function () { a._isLoading = !0 }) }, hideLoading: function () { var a = this; this.loading.hide(function () { a._isLoading = !1 }) }, show: function (b) { this.build(), w.enter("show"), w.trigger(this, "beforeShow"), a("html").addClass(this.options.classes.base + "-html"), this.$panel.addClass(this.options.classes.show); var c = this; v["do"](this, 0, function () { c._showed = !0, w.trigger(c, "afterShow"), a.isFunction(b) && b.call(c) }) }, change: function (a) { w.trigger(this, "beforeShow"), w.trigger(this, "onChange", a, this._instance), this.load(a), w.trigger(this, "afterShow") }, revert: function (b) { var c = this; v["do"](this, 0, function () { a.isFunction(b) && b.call(c) }) }, hide: function (b) { w.leave("show"), w.trigger(this, "beforeHide"); var c = this; v["do"](this, this.getHidePosition(), function () { c.$panel.removeClass(c.options.classes.show), c._showed = !1, c._instance = null, w._current === c && (w._current = null), w.is("show") || a("html").removeClass(c.options.classes.base + "-html"), a.isFunction(b) && b.call(c), w.trigger(c, "afterHide") }) }, makePositionStyle: function (a) { var b, c = "0", d = "0"; f(a) || g(a) || (a += "%"), this.options.useCssTransforms && t.transform ? ("left" === this.options.direction || "right" === this.options.direction ? c = a : d = a, b = t.transform.toString(), a = this.options.useCssTransforms3d && t.transform3d ? "translate3d(" + c + "," + d + ",0)" : "translate(" + c + "," + d + ")") : b = this.options.direction; var e = {}; return e[b] = a, e }, getPosition: function (a) { var b; if (this.options.useCssTransforms && t.transform) { if (b = h(this.$panel.css(t.transform)), !b)return 0; b = "left" === this.options.direction || "right" === this.options.direction ? b[12] || b[4] : b[13] || b[5] } else b = this.$panel.css(this.options.direction), b = parseFloat(b.replace("px", "")); return a !== !0 && (b = b / this._length * 100), parseFloat(b, 10) }, setPosition: function (a) { var b = this.makePositionStyle(a); this.$panel.css(b) } }), a.extend(l.prototype, { initialize: function (a) { this._view = a, this.build() }, build: function () { if (!this._builded) { var b = this._view.options, c = b.loading.template.call(this, b); switch (this.$el = a(c), b.loading.appendTo) { case"panel": this.$el.appendTo(this._view.$panel); break; case"body": this.$el.appendTo("body"); break; default: this.$el.appendTo(b.loading.appendTo) } this._builded = !0 } }, show: function (b) { this.build(); var c = this._view.options; c.loading.showCallback.call(this, c), a.isFunction(b) && b.call(this) }, hide: function (b) { var c = this._view.options; c.loading.hideCallback.call(this, c), a.isFunction(b) && b.call(this) } }); var v = { prepareTransition: function (b, c, d, e, f) { var g = []; c && g.push(c), d && (a.isNumeric(d) && (d += "ms"), g.push(d)), g.push(e ? e : this.easing.css), f && g.push(f), b.css(t.transition, g.join(" ")) }, "do": function (b, d, f) { w.enter("animating"); var g = b.options.duration, h = b.options.easing || "ease", i = this, j = b.makePositionStyle(d); for (var k in j)break; if (b.options.useCssTransitions && t.transition)setTimeout(function () { i.prepareTransition(b.$panel, k, g, h) }, 20), b.$panel.one(t.transition.end, function () { a.isFunction(f) && f(), b.$panel.css(t.transition, ""), w.leave("animating") }), setTimeout(function () { b.setPosition(d) }, 20); else { var l = e(), m = b.getPosition(), n = d, o = function (d) { var e = (d - l) / b.options.duration; e > 1 && (e = 1), e = u[h].fn(e); var g = parseFloat(m + e * (n - m), 10); b.setPosition(g), 1 === e ? (c.cancelAnimationFrame(i._frameId), i._frameId = null, a.isFunction(f) && f(), w.leave("animating")) : i._frameId = c.requestAnimationFrame(o) }; i._frameId = c.requestAnimationFrame(o) } } }; a.extend(m.prototype, { initialize: function (a) { this._view = a, this.options = a.options, this._drag = {time: null, pointer: null}, this.bindEvents() }, bindEvents: function () { var b = this.options, c = this._view.$panel; b.mouseDrag && (c.on(w.eventName("mousedown"), a.proxy(this.onDragStart, this)), c.on(w.eventName("dragstart selectstart"), function () { return !b.mouseDragHandler || a(event.target).is(b.mouseDragHandler) || a(event.target).parents(b.mouseDragHandler).length > 0 ? !1 : void 0 })), b.touchDrag && t.touch && (c.on(w.eventName("touchstart"), a.proxy(this.onDragStart, this)), c.on(w.eventName("touchcancel"), a.proxy(this.onDragEnd, this))), b.pointerDrag && t.pointer && (c.on(w.eventName(t.prefixPointerEvent("pointerdown")), a.proxy(this.onDragStart, this)), c.on(w.eventName(t.prefixPointerEvent("pointercancel")), a.proxy(this.onDragEnd, this))) }, onDragStart: function (c) { var d = this; if (3 !== c.which) { var e = this.options; this._view.$panel.addClass(this.options.classes.dragging), this._position = this._view.getPosition(!0), this._drag.time = (new Date).getTime(), this._drag.pointer = this.pointer(c); var f = function () { w.enter("dragging"), w.trigger(d._view, "beforeDrag") }; if (e.mouseDrag) { if (e.mouseDragHandler && !(a(c.target).is(e.mouseDragHandler) || a(c.target).parents(e.mouseDragHandler).length > 0))return; a(b).on(w.eventName("mouseup"), a.proxy(this.onDragEnd, this)), a(b).one(w.eventName("mousemove"), a.proxy(function () { a(b).on(w.eventName("mousemove"), a.proxy(this.onDragMove, this)), f() }, this)) } e.touchDrag && t.touch && (a(b).on(w.eventName("touchend"), a.proxy(this.onDragEnd, this)), a(b).one(w.eventName("touchmove"), a.proxy(function () { a(b).on(w.eventName("touchmove"), a.proxy(this.onDragMove, this)), f() }, this))), e.pointerDrag && t.pointer && (a(b).on(w.eventName(t.prefixPointerEvent("pointerup")), a.proxy(this.onDragEnd, this)), a(b).one(w.eventName(t.prefixPointerEvent("pointermove")), a.proxy(function () { a(b).on(w.eventName(t.prefixPointerEvent("pointermove")), a.proxy(this.onDragMove, this)), f() }, this))), a(b).on(w.eventName("blur"), a.proxy(this.onDragEnd, this)), c.preventDefault() } }, onDragMove: function (a) { var b = this.distance(this._drag.pointer, this.pointer(a)); w.is("dragging") && (Math.abs(b) > this.options.dragTolerance ? this._willClose !== !0 && (this._willClose = !0, this._view.$panel.addClass(this.options.classes.willClose)) : this._willClose !== !1 && (this._willClose = !1, this._view.$panel.removeClass(this.options.classes.willClose)), w.is("dragging") && (a.preventDefault(), this.move(b))) }, onDragEnd: function (c) { var d = this.distance(this._drag.pointer, this.pointer(c)); a(b).off(w.eventName("mousemove mouseup touchmove touchend pointermove pointerup MSPointerMove MSPointerUp blur")), this._view.$panel.removeClass(this.options.classes.dragging), this._willClose === !0 && (this._willClose = !1, this._view.$panel.removeClass(this.options.classes.willClose)), w.is("dragging") && (w.leave("dragging"), w.trigger(this._view, "afterDrag"), Math.abs(d) < this.options.dragTolerance ? this._view.revert() : w.hide()) }, pointer: function (a) { var b = {x: null, y: null}; return a = a.originalEvent || a || c.event, a = a.touches && a.touches.length ? a.touches[0] : a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : a, a.pageX ? (b.x = a.pageX, b.y = a.pageY) : (b.x = a.clientX, b.y = a.clientY), b }, distance: function (a, b) { var c = this.options.direction; return "left" === c || "right" === c ? b.x - a.x : b.y - a.y }, move: function (a) { var b = this._position + a; if ("right" === this.options.direction || "bottom" === this.options.direction) { if (0 > b)return } else if (b > 0)return; this.options.useCssTransforms || this.options.useCssTransforms3d || ("right" === this.options.direction || "bottom" === this.options.direction) && (b = -b), this._view.setPosition(b + "px") } }), a.extend(n.prototype, { initialize: function (b) { var c = arguments[1] || {}; if ("string" == typeof b)b = {url: b}; else if (b && 1 == b.nodeType) { var d = a(b); b = {url: d.attr("href"), settings: d.data("settings") || {}, options: d.data() || {}} } return b.options = b && b.options ? a.extend(!0, c, b.options) : c, b.options = a.extend(!0, {}, o.options, b.options), a.extend(this, b), this } }); var w = { _states: {}, _views: {}, _current: null, is: function (a) { return this._states[a] && this._states[a] > 0 }, enter: function (a) { this._states[a] === d && (this._states[a] = 0), this._states[a]++ }, leave: function (a) { this._states[a]-- }, trigger: function (c, d) { var e = Array.prototype.slice.call(arguments, 2), f = [c].concat(e); a(b).trigger("slidePanel::" + d, f), a.isFunction(c.options[d]) && c.options[d].apply(c, e) }, eventName: function (a) { if ("string" != typeof a || "" === a)return ".slidepanel"; a = a.split(" "); for (var b = a.length, c = 0; b > c; c++)a[c] = a[c] + ".slidepanel"; return a.join(" ") }, show: function (a) { if (!(a instanceof n))switch (arguments.length) { case 0: a = new n; break; case 1: a = new n(arguments[0]); break; case 2: a = new n(arguments[0], arguments[1]) } var b = this.getView(a.options), c = this, d = function () { b.show(), b.load(a), c._current = b }; null !== this._current ? b === this._current ? this._current.change(a) : this._current.hide(d) : d() }, getView: function (a) { var b = i(a); return this._views.hasOwnProperty(b) ? this._views[b] : this._views[b] = new k(a) }, hide: function (a) { if (a) { var b = this.getView(a.options); b.hide() } else if (null !== this._current) { this._current.hide() } } }; a.extend(o, { is: function (a) { return w.is(a) }, show: function () { return w.show.apply(w, arguments), this }, hide: function () { return w.hide.apply(w, arguments), this } }), a.fn.slidePanel = function (b) { if ("string" == typeof b) { var c = b, d = Array.prototype.slice.call(arguments, 1); return this.each(function () { var b = a.data(this, "slidePanel"); switch (b instanceof n || (b = new n(this, d), a.data(this, "slidePanel", b)), c) { case"hide": w.hide(b); break; case"show": w.show(b) } }) } return this.each(function () { a.data(this, "slidePanel") || (a.data(this, "slidePanel", new n(this, b)), a(this).on("click", function (b) { var c = a.data(this, "slidePanel"); w.show(c), b.preventDefault(), b.stopPropagation() })) }) } }(jQuery, document, window);
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.3 |
proxy
|
phpinfo
|
Settings