File: public/assets/sortable/sortable.min.js

Recommend this page to a friend!
  Classes of Aby Dahana  >  Aksara  >  public/assets/sortable/sortable.min.js  >  Download  
File: public/assets/sortable/sortable.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Aksara
A CodeIgniter based API and CRUD generator
Author: By
Last change: Initial commit
Initial commit
Date: 2 months ago
Size: 24,720 bytes
 

Contents

Class file image Download
/**
 * @desc jQuery plugin to sort html list also the tree structures
 * @author Vladimír ?amaj
 * @license MIT
 */
!function(y){y.fn.sortable=function(e){function d(e){if(C.isDragged){var t=C.cEl,i=C.doc,o=C.win;e.pageX||((l=e).pageY=C.pY,l.pageX=C.pX,l.clientY=C.cY,l.clientX=C.cX),i.scrollTop()>C.rootEl.offset.top-10&&e.clientY<50?C.upScroll?(e.pageY=e.pageY-f.scroll,y("html, body").each(function(e){y(this).scrollTop(y(this).scrollTop()-f.scroll)}),r(e)):C.upScroll||(C.upScroll=setInterval(function(){C.doc.trigger("mousemove")},50)):i.scrollTop()+o.height()<C.rootEl.offset.top+C.rootEl.el.outerHeight(!1)+10&&o.height()-e.clientY<50?C.downScroll?(e.pageY=e.pageY+f.scroll,y("html, body").each(function(e){y(this).scrollTop(y(this).scrollTop()+f.scroll)}),r(e)):C.downScroll||(C.downScroll=setInterval(function(){C.doc.trigger("mousemove")},50)):a(C),C.oElOld=C.oEl,t.el[0].style.visibility="hidden",C.oEl=oEl=function(e,t){if(!document.elementFromPoint)return null;var i,o,s=C.isRelEFP;null===s&&(0<(i=C.doc.scrollTop())&&(s=null==(o=document.elementFromPoint(0,i+y(window).height()-1))||"HTML"==o.tagName.toUpperCase()),0<(i=C.doc.scrollLeft())&&(s=null==(o=document.elementFromPoint(i+y(window).width()-1,0))||"HTML"==o.tagName.toUpperCase()));s&&(e-=C.doc.scrollLeft(),t-=C.doc.scrollTop());var n=y(document.elementFromPoint(e,t));return C.rootEl.el.find(n).length?n.is("#sortableListsPlaceholder")||n.is("#sortableListsHint")?null:n.is(f.list)?n.is(f.list)?n:void 0:(n=n.closest(f.list))[0]?n:null:null}(e.pageX,e.pageY),t.el[0].style.visibility="visible",function(e,t){var i=t.oEl;if(i&&t.oElOld){var o=i.outerHeight(!1),s=e.pageY-i.offset().top;f.insertZonePlus?s<14?function(e,t,i){if(y("#sortableListsHintWrapper",C.rootEl.el).length&&v.unwrap(),!i&&e.pageX-t.offset().left>f.insertZone){var o=t.children(),s=t.children(f.selector).first();if(s.children().first().is("#sortableListsPlaceholder"))return v.css("visibility","hidden");s.length?s.prepend(v):(o.first().after(v),v.wrap(m)),C.oEl&&c(t)}else{if(t.prev("#sortableListsPlaceholder").length)return v.css("visibility","hidden");t.before(v)}v.css("visibility","visible"),C.isAllowed=f.isAllowed(C.cEl.el,v,v.parents(f.list).first())}(e,i,s<7):o-14<s&&function(e,t,i){if(y("#sortableListsHintWrapper",C.rootEl.el).length&&v.unwrap(),!i&&e.pageX-t.offset().left>f.insertZone){var o=t.children(),s=t.children(f.selector).last();if(s.children().last().is("#sortableListsPlaceholder"))return v.css("visibility","hiden");s.length?o.last().append(v):(t.append(v),v.wrap(m)),C.oEl&&c(t)}else{if(t.next("#sortableListsPlaceholder").length)return v.css("visibility","hidden");t.after(v)}v.css("visibility","visible"),C.isAllowed=f.isAllowed(C.cEl.el,v,v.parents(f.list).first())}(e,i,o-7<s):s<5?function(e,t){if(y("#sortableListsHintWrapper",C.rootEl.el).length&&v.unwrap(),e.pageX-t.offset().left<f.insertZone){if(t.prev("#sortableListsPlaceholder").length)return v.css("visibility","hidden");t.before(v)}else{var i=t.children(),o=t.children(f.selector).first();if(o.children().first().is("#sortableListsPlaceholder"))return v.css("visibility","hidden");o.length?o.prepend(v):(i.first().after(v),v.wrap(m)),C.oEl&&c(t)}v.css("visibility","visible"),C.isAllowed=f.isAllowed(C.cEl.el,v,v.parents(f.list).first())}(e,i):o-5<s&&function(e,t){if(y("#sortableListsHintWrapper",C.rootEl.el).length&&v.unwrap(),e.pageX-t.offset().left<f.insertZone){if(t.next("#sortableListsPlaceholder").length)return v.css("visibility","hidden");t.after(v)}else{var i=t.children(),o=t.children(f.selector).last();if(o.children().last().is("#sortableListsPlaceholder"))return v.css("visibility","hidden");o.length?i.last().append(v):(t.append(v),v.wrap(m)),C.oEl&&c(t)}v.css("visibility","visible"),C.isAllowed=f.isAllowed(C.cEl.el,v,v.parents(f.list).first())}(e,i)}}(e,C),s=e,(n=C.cEl).el.css({top:s.pageY-n.xyOffsetDiff.Y-n.mT,left:s.pageX-n.xyOffsetDiff.X-n.mL})}var s,n,l}function h(e){var i=C.cEl,o=y("#sortableListsHint",C.rootEl.el),s=v[0].style,n=null,l=!1,r=y("#sortableListsHintWrapper");"visible"==s.visibility&&o.length&&C.isAllowed?(n=o,l=!0):(n=C.placeholderNode,l=!1),offset=n.offset(),i.el.animate({left:offset.left-C.cEl.mL,top:offset.top-C.cEl.mT},250,function(){var e,t;t=(e=i).el[0].style,e.el.removeClass(f.currElClass+" sortableListsCurrent"),t.top=null,t.left=null,t.position=null,t.width=null,n.after(i.el[0]),n[0].style.visibility="hidden",s.visibility="hidden",o.remove(),r.removeAttr("id").removeClass(f.hintWrapperClass),r.length&&r.prev("div").append(b.clone(!0)),l?C.placeholderNode.slideUp(150,function(){C.placeholderNode.remove(),p(),f.onChange(i.el),f.complete(i.el),C.isDragged=!1}):(C.placeholderNode.remove(),p(),f.complete(i.el),C.isDragged=!1)}),a(C),C.doc.unbind("mousemove",d).unbind("mouseup",h)}function r(e){C.pY=e.pageY,C.pX=e.pageX,C.cY=e.clientY,C.cX=e.clientX}function a(e){clearInterval(e.upScroll),clearInterval(e.downScroll),e.upScroll=e.downScroll=!1}function c(e){e.removeClass("sortableListsClosed").addClass("sortableListsOpen"),e.children(f.selector).css("visibility","visible");var t=e.children("div").children(".sortableListsOpener").first();"html"==f.opener.as?t.html(f.opener.close):"class"==f.opener.as?t.addClass(f.opener.close).removeClass(f.opener.open):t.css("background-image","url("+f.opener.close+")")}function i(e){e.removeClass("sortableListsOpen").addClass("sortableListsClosed"),e.children(f.selector).css("visibility","hidden");var t=e.children("div").children(".sortableListsOpener").first();"html"==f.opener.as?t.html(f.opener.open):"class"==f.opener.as?t.addClass(f.opener.open).removeClass(f.opener.close):t.css("background-image","url("+f.opener.open+")")}function p(){y(f.selector,C.rootEl.el).each(function(e){y(this).children().length||(y(this).prev("div").children(".sortableListsOpener").first().remove(),y(this).remove())})}var t=y("body"),o={currElClass:"",placeholderClass:"",placeholderCss:{position:"relative"},hintClass:"",hintCss:{visibility:"hidden",position:"relative"},hintWrapperClass:"",hintWrapperCss:{},baseClass:"",baseCss:{position:"absolute",top:0-parseInt(t.css("margin-top")),left:0-parseInt(t.css("margin-left")),"z-index":2500},opener:{active:!1,open:"",close:"",openerCss:{float:"left",visibility:"visible","background-position":"center center","background-repeat":"no-repeat"},openerClass:""},selector:"ul",selectorClass:"",selectorCss:{},list:"li",listClass:"",listCss:{},maxDepth:3,insertZone:100,insertZonePlus:!1,scroll:10,ignoreClass:"ignore-sort",isAllowed:function(e,t,i){return o=t,s=$(i).parents("ul").length,f.maxDepth>s?(o.css("background-color","#fafffa"),!0):(o.css("background-color","#fffafa"),!1);var o,s},onDragStart:function(e,t){return!0},onChange:function(e){return!0},complete:function(e){return!0}},f=y.extend(!0,{},o,e),u=y("<"+f.selector+" />").prependTo(t).attr("id","sortableListsBase").css(f.baseCss).addClass(f.selectorClass+" "+f.baseClass),g=y("<"+f.list+" />").attr("id","sortableListsPlaceholder").css(f.placeholderCss).addClass(f.placeholderClass),v=y("<"+f.list+" />").attr("id","sortableListsHint").css(f.hintCss).addClass(f.hintClass),m=y("<"+f.selector+" />").attr("id","sortableListsHintWrapper").addClass(f.selectorClass+" "+f.hintWrapperClass).css(f.selectorCss).css(f.hintWrapperCss),b=y("<span />").addClass("sortableListsOpener "+f.opener.openerClass).css(f.opener.openerCss).on("mousedown",function(e){var t=y(this).closest(f.list);return t.hasClass("sortableListsClosed")?c(t):i(t),!1});"class"==f.opener.as?b.addClass(f.opener.close):"html"==f.opener.as?b.html(f.opener.close):b.css("background-image","url("+f.opener.close+")");var C={isDragged:!1,isRelEFP:null,oEl:null,rootEl:null,cEl:null,upScroll:!1,downScroll:!1,pX:0,pY:0,cX:0,cY:0,isAllowed:!0,e:{pageX:0,pageY:0,clientX:0,clientY:0},doc:y(document),win:y(window)};if(f.opener.active){if(!f.opener.open)throw"Opener.open value is not defined. It should be valid url, html or css class.";if(!f.opener.close)throw"Opener.close value is not defined. It should be valid url, html or css class.";y(this).find(f.list).each(function(){var e=y(this);e.children(f.selector).length&&(b.clone(!0).prependTo(e.children("div").first()),e.hasClass("sortableListsOpen")?c(e):i(e))})}return this.on("mousedown",function(e){var t=y(e.target);if(!(!1!==C.isDragged||f.ignoreClass&&(t.hasClass(f.ignoreClass)||t.parents().hasClass(f.ignoreClass)))){e.preventDefault();var i=t.closest(f.list),o=y(this);i[0]&&(f.onDragStart(e,i),function(e,t,i){C.isDragged=!0;var o=parseInt(t.css("margin-top")),s=parseInt(t.css("margin-bottom")),n=parseInt(t.css("margin-left")),l=parseInt(t.css("margin-right")),r=t.offset(),a=t.outerHeight()-1;C.rootEl={el:i,offset:i.offset(),rootElClass:i.attr("class")},C.cEl={el:t,mT:o,mL:n,mB:s,mR:l,offset:r},C.cEl.xyOffsetDiff={X:e.pageX-C.cEl.offset.left,Y:e.pageY-C.cEl.offset.top},C.cEl.el.addClass("sortableListsCurrent "+f.currElClass),t.before(g);var c=C.placeholderNode=y("#sortableListsPlaceholder");t.css({width:t.width(),position:"absolute",top:r.top-o,left:r.left-n}).prependTo(u),c.css({visibility:"visible",height:a}),v.css("height",a),C.doc.on("mousemove",d).on("mouseup",h)}(e,i,o))}})},$.fn.sortableToHierarchy=function(){var o=[],s=0;return $(this).children(o.list).each(function(){if(!$(this).closest("li").hasClass("hidden")){var e=$(this),t={},i=e.attr("id");t.id=i,t.icon=e.attr("data-icon"),t.label=e.attr("data-label"),t.slug=e.attr("data-slug"),t.newtab=e.attr("data-newtab"),t.order=s,o.push(t),t.children=e.children("ul,ol").sortableToHierarchy(),s++}}),o}}(jQuery),function(e){"function"==typeof define&&define.amd?define(e):"undefined"!=typeof module&&void 0!==module.exports?module.exports=e():window.Sortable=e()}(function(){function T(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(e);this.el=e,this.options=t=r({},t),e[Z]=this;var i={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(e.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0}};for(var o in i)!(o in t)&&(t[o]=i[o]);for(var s in oe(t),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!t.forceFallback&&q,c(e,"mousedown",this._onTapStart),c(e,"touchstart",this._onTapStart),c(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(c(e,"dragover",this),c(e,"dragenter",this)),te.push(this._onDragOver),t.store&&this.sort(t.store.get(this))}function S(e,t){"clone"!==e.lastPullMode&&(t=!0),k&&k.state!==t&&(Y(k,"display",t?"none":""),t||k.state&&(e.options.group.revertClone?(A.insertBefore(k,I),e._animate(N,k)):A.insertBefore(k,N)),k.state=t)}function L(e,t,i){if(e){i=i||j;do{if(">*"===t&&e.parentNode===i||n(e,t))return e}while(void 0,e=(s=(o=e).host)&&s.nodeType?s:o.parentNode)}var o,s;return null}function c(e,t,i){e.addEventListener(t,i,V)}function o(e,t,i){e.removeEventListener(t,i,V)}function d(e,t,i){if(e)if(e.classList)e.classList[i?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(_," ").replace(" "+t+" "," ");e.className=(o+(i?" "+t:"")).replace(_," ")}}function Y(e,t,i){var o=e&&e.style;if(o){if(void 0===i)return j.defaultView&&j.defaultView.getComputedStyle?i=j.defaultView.getComputedStyle(e,""):e.currentStyle&&(i=e.currentStyle),void 0===t?i:i[t];t in o||(t="-webkit-"+t),o[t]=i+("string"==typeof i?"":"px")}}function h(e,t,i){if(e){var o=e.getElementsByTagName(t),s=0,n=o.length;if(i)for(;s<n;s++)i(o[s],s);return o}return[]}function p(e,t,i,o,s,n,l){e=e||t[Z];var r=j.createEvent("Event"),a=e.options,c="on"+i.charAt(0).toUpperCase()+i.substr(1);r.initEvent(i,!0,!0),r.to=t,r.from=s||t,r.item=o||t,r.clone=k,r.oldIndex=n,r.newIndex=l,t.dispatchEvent(r),a[c]&&a[c].call(e,r)}function x(e,t,i,o,s,n,l,r){var a,c,d=e[Z],h=d.options.onMove;return(a=j.createEvent("Event")).initEvent("move",!0,!0),a.to=t,a.from=e,a.dragged=i,a.draggedRect=o,a.related=s||t,a.relatedRect=n||t.getBoundingClientRect(),a.willInsertAfter=r,e.dispatchEvent(a),h&&(c=h.call(d,a,l)),c}function f(e){e.draggable=!1}function X(){Q=!1}function l(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,i=t.length,o=0;i--;)o+=t.charCodeAt(i);return o.toString(36)}function u(e,t){var i=0;if(!e||!e.parentNode)return-1;for(;e&&(e=e.previousElementSibling);)"TEMPLATE"===e.nodeName.toUpperCase()||">*"!==t&&!n(e,t)||i++;return i}function n(e,t){if(e){var i=(t=t.split(".")).shift().toUpperCase(),o=new RegExp("\\s("+t.join("|")+")(?=\\s)","g");return!(""!==i&&e.nodeName.toUpperCase()!=i||t.length&&((" "+e.className+" ").match(o)||[]).length!=t.length)}return!1}function e(e,t){var i,o;return function(){void 0===i&&(i=arguments,o=this,setTimeout(function(){1===i.length?e.call(o,i[0]):e.apply(o,i),i=void 0},t))}}function r(e,t){if(e&&t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function s(e){return i?i(e).clone(!0)[0]:z&&z.dom?z.dom(e).cloneNode(!0):e.cloneNode(!0)}if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var N,P,O,k,A,I,g,v,m,b,B,H,M,C,a,R,W,y,w,F,t,D={},_=/\s+/g,U=/left|right|inline/,Z="Sortable"+(new Date).getTime(),E=window,j=E.document,$=E.parseInt,i=E.jQuery||E.Zepto,z=E.Polymer,V=!1,q=!!("draggable"in j.createElement("div")),G=!navigator.userAgent.match(/Trident.*rv[ :]?11\./)&&((t=j.createElement("x")).style.cssText="pointer-events:auto","auto"===t.style.pointerEvents),Q=!1,J=Math.abs,K=Math.min,ee=[],te=[],ie=e(function(e,t,i){if(i&&t.scroll){var o,s,n,l,r,a,c=i[Z],d=t.scrollSensitivity,h=t.scrollSpeed,p=e.clientX,f=e.clientY,u=window.innerWidth,g=window.innerHeight;if(m!==i&&(v=t.scroll,m=i,b=t.scrollFn,!0===v)){v=i;do{if(v.offsetWidth<v.scrollWidth||v.offsetHeight<v.scrollHeight)break}while(v=v.parentNode)}v&&(s=(o=v).getBoundingClientRect(),n=(J(s.right-p)<=d)-(J(s.left-p)<=d),l=(J(s.bottom-f)<=d)-(J(s.top-f)<=d)),n||l||(l=(g-f<=d)-(f<=d),((n=(u-p<=d)-(p<=d))||l)&&(o=E)),D.vx===n&&D.vy===l&&D.el===o||(D.el=o,D.vx=n,D.vy=l,clearInterval(D.pid),o&&(D.pid=setInterval(function(){return a=l?l*h:0,r=n?n*h:0,"function"==typeof b?b.call(c,r,a,e):void(o===E?E.scrollTo(E.pageXOffset+r,E.pageYOffset+a):(o.scrollTop+=a,o.scrollLeft+=r))},24)))}},30),oe=function(e){function t(o,s){return void 0!==o&&!0!==o||(o=i.name),"function"==typeof o?o:function(e,t){var i=t.options.group.name;return s?o:o&&(o.join?-1<o.indexOf(i):i==o)}}var i={},o=e.group;o&&"object"==typeof o||(o={name:o}),i.name=o.name,i.checkPull=t(o.pull,!0),i.checkPut=t(o.put),i.revertClone=o.revertClone,e.group=i};T.prototype={constructor:T,_onTapStart:function(e){var t,i=this,o=this.el,s=this.options,n=s.preventOnFilter,l=e.type,r=e.touches&&e.touches[0],a=(r||e).target,c=e.target.shadowRoot&&e.path[0]||a,d=s.filter;if(function(e){for(var t=e.getElementsByTagName("input"),i=t.length;i--;){var o=t[i];o.checked&&ee.push(o)}}(o),!N&&!("mousedown"===l&&0!==e.button||s.disabled)&&(a=L(a,s.draggable,o))&&g!==a){if(t=u(a,s.draggable),"function"==typeof d){if(d.call(this,e,a,this))return p(i,c,"filter",a,o,t),void(n&&e.preventDefault())}else if(d&&(d=d.split(",").some(function(e){return(e=L(c,e.trim(),o))?(p(i,e,"filter",a,o,t),!0):void 0})))return void(n&&e.preventDefault());s.handle&&!L(c,s.handle,o)||this._prepareDragStart(e,r,a,t)}},_prepareDragStart:function(e,t,i,o){var s,n=this,l=n.el,r=n.options,a=l.ownerDocument;i&&!N&&i.parentNode===l&&(y=e,A=l,P=(N=i).parentNode,I=N.nextSibling,g=i,R=r.group,C=o,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,N.style["will-change"]="transform",s=function(){n._disableDelayedDrag(),N.draggable=n.nativeDraggable,d(N,r.chosenClass,!0),n._triggerDragStart(e,t),p(n,A,"choose",N,A,C)},r.ignore.split(",").forEach(function(e){h(N,e.trim(),f)}),c(a,"mouseup",n._onDrop),c(a,"touchend",n._onDrop),c(a,"touchcancel",n._onDrop),c(a,"pointercancel",n._onDrop),c(a,"selectstart",n),r.delay?(c(a,"mouseup",n._disableDelayedDrag),c(a,"touchend",n._disableDelayedDrag),c(a,"touchcancel",n._disableDelayedDrag),c(a,"mousemove",n._disableDelayedDrag),c(a,"touchmove",n._disableDelayedDrag),c(a,"pointermove",n._disableDelayedDrag),n._dragStartTimer=setTimeout(s,r.delay)):s())},_disableDelayedDrag:function(){var e=this.el.ownerDocument;clearTimeout(this._dragStartTimer),o(e,"mouseup",this._disableDelayedDrag),o(e,"touchend",this._disableDelayedDrag),o(e,"touchcancel",this._disableDelayedDrag),o(e,"mousemove",this._disableDelayedDrag),o(e,"touchmove",this._disableDelayedDrag),o(e,"pointermove",this._disableDelayedDrag)},_triggerDragStart:function(e,t){(t=t||("touch"==e.pointerType?e:null))?(y={target:N,clientX:t.clientX,clientY:t.clientY},this._onDragStart(y,"touch")):this.nativeDraggable?(c(N,"dragend",this),c(A,"dragstart",this._onDragStart)):this._onDragStart(y,!0);try{j.selection?setTimeout(function(){j.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(){if(A&&N){var e=this.options;d(N,e.ghostClass,!0),d(N,e.dragClass,!1),p(T.active=this,A,"start",N,A,C)}else this._nulling()},_emulateDragOver:function(){if(w){if(this._lastX===w.clientX&&this._lastY===w.clientY)return;this._lastX=w.clientX,this._lastY=w.clientY,G||Y(O,"display","none");var e=j.elementFromPoint(w.clientX,w.clientY),t=e,i=te.length;if(t)do{if(t[Z]){for(;i--;)te[i]({clientX:w.clientX,clientY:w.clientY,target:e,rootEl:t});break}e=t}while(t=t.parentNode);G||Y(O,"display","")}},_onTouchMove:function(e){if(y){var t=this.options,i=t.fallbackTolerance,o=t.fallbackOffset,s=e.touches?e.touches[0]:e,n=s.clientX-y.clientX+o.x,l=s.clientY-y.clientY+o.y,r=e.touches?"translate3d("+n+"px,"+l+"px,0)":"translate("+n+"px,"+l+"px)";if(!T.active){if(i&&K(J(s.clientX-this._lastX),J(s.clientY-this._lastY))<i)return;this._dragStarted()}this._appendGhost(),F=!0,w=s,Y(O,"webkitTransform",r),Y(O,"mozTransform",r),Y(O,"msTransform",r),Y(O,"transform",r),e.preventDefault()}},_appendGhost:function(){if(!O){var e,t=N.getBoundingClientRect(),i=Y(N),o=this.options;d(O=N.cloneNode(!0),o.ghostClass,!1),d(O,o.fallbackClass,!0),d(O,o.dragClass,!0),Y(O,"top",t.top-$(i.marginTop,10)),Y(O,"left",t.left-$(i.marginLeft,10)),Y(O,"width",t.width),Y(O,"height",t.height),Y(O,"opacity","0.8"),Y(O,"position","fixed"),Y(O,"zIndex","100000"),Y(O,"pointerEvents","none"),o.fallbackOnBody&&j.body.appendChild(O)||A.appendChild(O),e=O.getBoundingClientRect(),Y(O,"width",2*t.width-e.width),Y(O,"height",2*t.height-e.height)}},_onDragStart:function(e,t){var i=e.dataTransfer,o=this.options;this._offUpEvents(),R.checkPull(this,this,N,e)&&((k=s(N)).draggable=!1,k.style["will-change"]="",Y(k,"display","none"),d(k,this.options.chosenClass,!1),A.insertBefore(k,N),p(this,A,"clone",N)),d(N,o.dragClass,!0),t?("touch"===t?(c(j,"touchmove",this._onTouchMove),c(j,"touchend",this._onDrop),c(j,"touchcancel",this._onDrop),c(j,"pointermove",this._onTouchMove),c(j,"pointerup",this._onDrop)):(c(j,"mousemove",this._onTouchMove),c(j,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(i&&(i.effectAllowed="move",o.setData&&o.setData.call(this,i,N)),c(j,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(e){var t,i,o,s,n,l,r=this.el,a=this.options,c=a.group,d=T.active,h=R===c,p=!1,f=a.sort;if(void 0!==e.preventDefault&&(e.preventDefault(),!a.dragoverBubble&&e.stopPropagation()),!N.animated&&(F=!0,d&&!a.disabled&&(h?f||(s=!A.contains(N)):W===this||(d.lastPullMode=R.checkPull(this,d,N,e))&&c.checkPut(this,d,N,e))&&(void 0===e.rootEl||e.rootEl===this.el))){if(ie(e,a,this.el),Q)return;if(t=L(e.target,a.draggable,r),i=N.getBoundingClientRect(),W!==this&&(W=this,p=!0),s)return S(d,!0),P=A,void(k||I?A.insertBefore(N,k||I):f||A.appendChild(N));if(0===r.children.length||r.children[0]===O||r===e.target&&(n=e,l=r.lastElementChild.getBoundingClientRect(),5<n.clientY-(l.top+l.height)||5<n.clientX-(l.left+l.width))){if(0!==r.children.length&&r.children[0]!==O&&r===e.target&&(t=r.lastElementChild),t){if(t.animated)return;o=t.getBoundingClientRect()}S(d,h),!1!==x(A,r,N,i,t,o,e)&&(N.contains(r)||(r.appendChild(N),P=r),this._animate(i,N),t&&this._animate(o,t))}else if(t&&!t.animated&&t!==N&&void 0!==t.parentNode[Z]){B!==t&&(H=Y(B=t),M=Y(t.parentNode));var u=(o=t.getBoundingClientRect()).right-o.left,g=o.bottom-o.top,v=U.test(H.cssFloat+H.display)||"flex"==M.display&&0===M["flex-direction"].indexOf("row"),m=t.offsetWidth>N.offsetWidth,b=t.offsetHeight>N.offsetHeight,C=.5<(v?(e.clientX-o.left)/u:(e.clientY-o.top)/g),y=t.nextElementSibling,w=!1;if(v){var D=N.offsetTop,_=t.offsetTop;w=D===_?t.previousElementSibling===N&&!m||C&&m:t.previousElementSibling===N||N.previousElementSibling===t?.5<(e.clientY-o.top)/g:D<_}else p||(w=y!==N&&!b||C&&b);var E=x(A,r,N,i,t,o,e,w);!1!==E&&(1!==E&&-1!==E||(w=1===E),Q=!0,setTimeout(X,30),S(d,h),N.contains(r)||(w&&!y?r.appendChild(N):t.parentNode.insertBefore(N,w?y:t)),P=N.parentNode,this._animate(i,N),this._animate(o,t))}}},_animate:function(e,t){var i=this.options.animation;if(i){var o=t.getBoundingClientRect();1===e.nodeType&&(e=e.getBoundingClientRect()),Y(t,"transition","none"),Y(t,"transform","translate3d("+(e.left-o.left)+"px,"+(e.top-o.top)+"px,0)"),t.offsetWidth,Y(t,"transition","all "+i+"ms"),Y(t,"transform","translate3d(0,0,0)"),clearTimeout(t.animated),t.animated=setTimeout(function(){Y(t,"transition",""),Y(t,"transform",""),t.animated=!1},i)}},_offUpEvents:function(){var e=this.el.ownerDocument;o(j,"touchmove",this._onTouchMove),o(j,"pointermove",this._onTouchMove),o(e,"mouseup",this._onDrop),o(e,"touchend",this._onDrop),o(e,"pointerup",this._onDrop),o(e,"touchcancel",this._onDrop),o(e,"pointercancel",this._onDrop),o(e,"selectstart",this)},_onDrop:function(e){var t=this.el,i=this.options;clearInterval(this._loopId),clearInterval(D.pid),clearTimeout(this._dragStartTimer),o(j,"mousemove",this._onTouchMove),this.nativeDraggable&&(o(j,"drop",this),o(t,"dragstart",this._onDragStart)),this._offUpEvents(),e&&(F&&(e.preventDefault(),!i.dropBubble&&e.stopPropagation()),O&&O.parentNode&&O.parentNode.removeChild(O),A!==P&&"clone"===T.active.lastPullMode||k&&k.parentNode&&k.parentNode.removeChild(k),N&&(this.nativeDraggable&&o(N,"dragend",this),f(N),N.style["will-change"]="",d(N,this.options.ghostClass,!1),d(N,this.options.chosenClass,!1),p(this,A,"unchoose",N,A,C),A!==P?0<=(a=u(N,i.draggable))&&(p(null,P,"add",N,A,C,a),p(this,A,"remove",N,A,C,a),p(null,P,"sort",N,A,C,a),p(this,A,"sort",N,A,C,a)):N.nextSibling!==I&&0<=(a=u(N,i.draggable))&&(p(this,A,"update",N,A,C,a),p(this,A,"sort",N,A,C,a)),T.active&&(null!=a&&-1!==a||(a=C),p(this,A,"end",N,A,C,a),this.save()))),this._nulling()},_nulling:function(){A=N=P=O=I=k=g=v=m=y=w=F=a=B=H=W=R=T.active=null,ee.forEach(function(e){e.checked=!0}),ee.length=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragover":case"dragenter":N&&(this._onDragOver(e),(t=e).dataTransfer&&(t.dataTransfer.dropEffect="move"),t.preventDefault());break;case"selectstart":e.preventDefault()}var t},toArray:function(){for(var e,t=[],i=this.el.children,o=0,s=i.length,n=this.options;o<s;o++)L(e=i[o],n.draggable,this.el)&&t.push(e.getAttribute(n.dataIdAttr)||l(e));return t},sort:function(e){var o={},s=this.el;this.toArray().forEach(function(e,t){var i=s.children[t];L(i,this.options.draggable,s)&&(o[e]=i)},this),e.forEach(function(e){o[e]&&(s.removeChild(o[e]),s.appendChild(o[e]))})},save:function(){var e=this.options.store;e&&e.set(this)},closest:function(e,t){return L(e,t||this.options.draggable,this.el)},option:function(e,t){var i=this.options;return void 0===t?i[e]:(i[e]=t,void("group"===e&&oe(i)))},destroy:function(){var e=this.el;e[Z]=null,o(e,"mousedown",this._onTapStart),o(e,"touchstart",this._onTapStart),o(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(o(e,"dragover",this),o(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),te.splice(te.indexOf(this._onDragOver),1),this._onDrop(),this.el=e=null}},c(j,"touchmove",function(e){T.active&&e.preventDefault()});try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){V={capture:!1,passive:!1}}}))}catch(T){}return T.utils={on:c,off:o,css:Y,find:h,is:function(e,t){return!!L(e,t,e)},extend:r,throttle:e,closest:L,toggleClass:d,clone:s,index:u},T.create=function(e,t){return new T(e,t)},T.version="1.6.0",T});

For more information send a message to info at phpclasses dot org.