<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[13269] trunk: Use core jQuery UI.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13269">13269</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-02-21 00:10:20 +0000 (Sun, 21 Feb 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use core jQuery UI. see <a href="http://trac.wordpress.org/ticket/11817">#11817</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmincustomnavigationphp">trunk/wp-admin/custom-navigation.php</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkwpadminjscustomnavigationcustomjqueryui172devjs">trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.dev.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationcustomjqueryui172js">trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincustomnavigationphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/custom-navigation.php (13268 => 13269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/custom-navigation.php        2010-02-21 00:03:42 UTC (rev 13268)
+++ trunk/wp-admin/custom-navigation.php        2010-02-21 00:10:20 UTC (rev 13269)
</span><span class="lines">@@ -14,13 +14,16 @@
</span><span class="cx"> 
</span><span class="cx"> wp_admin_css( 'custom-navigation' );
</span><span class="cx"> wp_enqueue_script( 'jquery' );
</span><del>-wp_enqueue_script( 'custom-navigation-ui-custom' );
</del><ins>+wp_enqueue_script( 'jquery-ui-draggable' );
+wp_enqueue_script( 'jquery-ui-droppable' );
+wp_enqueue_script( 'jquery-ui-sortable' );
+wp_enqueue_script( 'jquery-ui-dialog' );
</ins><span class="cx"> wp_enqueue_script( 'custom-navigation-dynamic-functions' );
</span><span class="cx"> wp_enqueue_script( 'custom-navigation-default-items' );
</span><span class="cx"> wp_enqueue_script( 'jquery-autocomplete' );
</span><span class="cx"> wp_enqueue_script( 'custom-navigation-php-functions' );
</span><del>-wp_enqueue_script( 'jquery-ui-dialog' );
</del><span class="cx"> 
</span><ins>+
</ins><span class="cx"> require_once('admin-header.php');
</span><span class="cx"> require_once (ABSPATH . WPINC . '/custom-navigation.php');
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationcustomjqueryui172devjs"></a>
<div class="delfile"><h4>Deleted: trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.dev.js (13268 => 13269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.dev.js        2010-02-21 00:03:42 UTC (rev 13268)
+++ trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.dev.js        2010-02-21 00:10:20 UTC (rev 13269)
</span><span class="lines">@@ -1,47 +0,0 @@
</span><del>-/*
- * jQuery UI 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI
- */
-jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&amp;&amp;(parseFloat(c.browser.version)&lt;1.9);c.ui={version:&quot;1.7.2&quot;,plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m&lt;n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&amp;16:k!==j&amp;&amp;k.contains(j)},hasScroll:function(m,k){if(c(m).css(&quot;overflow&quot;)==&quot;hidden&quot;){return false}var j=(k&amp;&amp;k==&quot;left&quot;)?&quot;scrollLeft&quot;:&quot;scrollTop&quot;,l=false;if(m[j]&gt;0){return true}m[j]=1;l=(m[j]&gt;0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k&gt;j)&amp;&amp;(k&lt;(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&amp;&amp;c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h=&quot;http://www.w3.org/2005/07/aaa&quot;,a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j==&quot;role&quot;?(m?f.call(this,k,j,&quot;wairole:&quot;+l):(f.apply(this,arguments)||&quot;&quot;).replace(b,&quot;&quot;)):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,&quot;aaa:&quot;),l):f.call(this,k,j.replace(a,&quot;aaa:&quot;))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,&quot;&quot;))}):e.call(this,j))}}c.fn.extend({remove:function(){c(&quot;*&quot;,this).add(this).each(function(){c(this).triggerHandler(&quot;remove&quot;)});return i.apply(this,arguments)},enableSelection:function(){return this.attr(&quot;unselectable&quot;,&quot;off&quot;).css(&quot;MozUserSelect&quot;,&quot;&quot;).unbind(&quot;selectstart.ui&quot;)},disableSelection:function(){return this.attr(&quot;unselectable&quot;,&quot;on&quot;).css(&quot;MozUserSelect&quot;,&quot;none&quot;).bind(&quot;selectstart.ui&quot;,function(){return false})},scrollParent:function(){var j;if((c.browser.msie&amp;&amp;(/(static|relative)/).test(this.css(&quot;position&quot;)))||(/absolute/).test(this.css(&quot;position&quot;))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,&quot;position&quot;,1))&amp;&amp;(/(auto|scroll)/).test(c.curCSS(this,&quot;overflow&quot;,1)+c.curCSS(this,&quot;overflow-y&quot;,1)+c.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,&quot;overflow&quot;,1)+c.curCSS(this,&quot;overflow-y&quot;,1)+c.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0)}return(/fixed/).test(this.css(&quot;position&quot;))||!j.length?c(document):j}});c.extend(c.expr[&quot;:&quot;],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,&quot;tabindex&quot;);return(/input|select|textarea|button|object/.test(l)?!k.disabled:&quot;a&quot;==l||&quot;area&quot;==l?k.href||!isNaN(j):!isNaN(j))&amp;&amp;!c(k)[&quot;area&quot;==l?&quot;parents&quot;:&quot;closest&quot;](&quot;:hidden&quot;).length},tabbable:function(k){var j=c.attr(k,&quot;tabindex&quot;);return(isNaN(j)||j&gt;=0)&amp;&amp;c(k).is(&quot;:focusable&quot;)}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p==&quot;string&quot;?p.split(/,?\s+/):p)}var j=k(&quot;getter&quot;);if(l.length==1&amp;&amp;typeof l[0]==&quot;string&quot;){j=j.concat(k(&quot;getterSetter&quot;))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(&quot;.&quot;)[0];k=k.split(&quot;.&quot;)[1];c.fn[k]=function(p){var n=(typeof p==&quot;string&quot;),o=Array.prototype.slice.call(arguments,1);if(n&amp;&amp;p.substring(0,1)==&quot;_&quot;){return this}if(n&amp;&amp;g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&amp;&amp;!n&amp;&amp;c.data(this,k,new c[l][k](this,p))._init());(q&amp;&amp;n&amp;&amp;c.isFunction(q[p])&amp;&amp;q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+&quot;-&quot;+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&amp;&amp;c.metadata.get(o)[k],n);this.element=c(o).bind(&quot;setData.&quot;+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind(&quot;getData.&quot;+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind(&quot;remove&quot;,function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter=&quot;option&quot;};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+&quot;-disabled &quot;+this.namespace+&quot;-state-disabled&quot;).removeAttr(&quot;aria-disabled&quot;)},option:function(l,m){var k=l,j=this;if(typeof l==&quot;string&quot;){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j==&quot;disabled&quot;){this.element[k?&quot;addClass&quot;:&quot;removeClass&quot;](this.widgetBaseClass+&quot;-disabled &quot;+this.namespace+&quot;-state-disabled&quot;).attr(&quot;aria-disabled&quot;,k)}},enable:function(){this._setData(&quot;disabled&quot;,false)},disable:function(){this._setData(&quot;disabled&quot;,true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&amp;&amp;p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind(&quot;mousedown.&quot;+this.widgetName,function(k){return j._mouseDown(k)}).bind(&quot;click.&quot;+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr(&quot;unselectable&quot;);this.element.attr(&quot;unselectable&quot;,&quot;on&quot;)}this.started=false},_mouseDestroy:function(){this.element.unbind(&quot;.&quot;+this.widgetName);(c.browser.msie&amp;&amp;this.element.attr(&quot;unselectable&quot;,this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&amp;&amp;this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel==&quot;string&quot;?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&amp;&amp;this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).bind(&quot;mouseup.&quot;+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&amp;&amp;!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&amp;&amp;this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).unbind(&quot;mouseup.&quot;+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))&gt;=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/*
- * jQuery UI Draggable 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Draggables
- *
- * Depends:
- *        ui.core.js
- */
-(function(a){a.widget(&quot;ui.draggable&quot;,a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper==&quot;original&quot;&amp;&amp;!(/^(?:r|a|f)/).test(this.element.css(&quot;position&quot;))){this.element[0].style.position=&quot;relative&quot;}(this.options.addClasses&amp;&amp;this.element.addClass(&quot;ui-draggable&quot;));(this.options.disabled&amp;&amp;this.element.addClass(&quot;ui-draggable-disabled&quot;));this._mouseInit()},destroy:function(){if(!this.element.data(&quot;draggable&quot;)){return}this.element.removeData(&quot;draggable&quot;).unbind(&quot;.draggable&quot;).removeClass(&quot;ui-draggable ui-draggable-dragging ui-draggable-disabled&quot;);this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(&quot;.ui-resizable-handle&quot;)){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css(&quot;position&quot;);this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger(&quot;start&quot;,b);this._cacheHelperProportions();if(a.ui.ddmanager&amp;&amp;!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass(&quot;ui-draggable-dragging&quot;);this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!d){var c=this._uiHash();this._trigger(&quot;drag&quot;,b,c);this.position=c.position}if(!this.options.axis||this.options.axis!=&quot;y&quot;){this.helper[0].style.left=this.position.left+&quot;px&quot;}if(!this.options.axis||this.options.axis!=&quot;x&quot;){this.helper[0].style.top=this.position.top+&quot;px&quot;}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&amp;&amp;!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert==&quot;invalid&quot;&amp;&amp;!d)||(this.options.revert==&quot;valid&quot;&amp;&amp;d)||this.options.revert===true||(a.isFunction(this.options.revert)&amp;&amp;this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger(&quot;stop&quot;,c);b._clear()})}else{this._trigger(&quot;stop&quot;,c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find(&quot;*&quot;).andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper==&quot;clone&quot;?this.element.clone():this.element);if(!b.parents(&quot;body&quot;).length){b.appendTo((d.appendTo==&quot;parent&quot;?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&amp;&amp;!(/(fixed|absolute)/).test(b.css(&quot;position&quot;))){b.css(&quot;position&quot;,&quot;absolute&quot;)}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition==&quot;absolute&quot;&amp;&amp;this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()==&quot;html&quot;&amp;&amp;a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css(&quot;borderTopWidth&quot;),10)||0),left:b.left+(parseInt(this.offsetParent.css(&quot;borderLeftWidth&quot;),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==&quot;relative&quot;){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css(&quot;top&quot;),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css(&quot;left&quot;),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css(&quot;marginLeft&quot;),10)||0),top:(parseInt(this.element.css(&quot;marginTop&quot;),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment==&quot;parent&quot;){e.containment=this.helper[0].parentNode}if(e.containment==&quot;document&quot;||e.containment==&quot;window&quot;){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment==&quot;document&quot;?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment==&quot;document&quot;?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&amp;&amp;e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css(&quot;overflow&quot;)!=&quot;hidden&quot;);this.containment=[d.left+(parseInt(a(c).css(&quot;borderLeftWidth&quot;),10)||0)+(parseInt(a(c).css(&quot;paddingLeft&quot;),10)||0)-this.margins.left,d.top+(parseInt(a(c).css(&quot;borderTopWidth&quot;),10)||0)+(parseInt(a(c).css(&quot;paddingTop&quot;),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(a(c).css(&quot;paddingRight&quot;),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(a(c).css(&quot;paddingBottom&quot;),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f==&quot;absolute&quot;?1:-1;var e=this.options,b=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition==&quot;relative&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left&lt;this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top&lt;this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left&gt;this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top&gt;this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top&lt;this.containment[1]||g-this.offset.click.top&gt;this.containment[3])?g:(!(g-this.offset.click.top&lt;this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left&lt;this.containment[0]||f-this.offset.click.left&gt;this.containment[2])?f:(!(f-this.offset.click.left&lt;this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_clear:function(){this.helper.removeClass(&quot;ui-draggable-dragging&quot;);if(this.helper[0]!=this.element[0]&amp;&amp;!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b==&quot;drag&quot;){this.positionAbs=this._convertPositionTo(&quot;absolute&quot;)}return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:&quot;1.7.2&quot;,eventPrefix:&quot;drag&quot;,defaults:{addClasses:true,appendTo:&quot;parent&quot;,axis:false,cancel:&quot;:input,option&quot;,connectToSortable:false,containment:false,cursor:&quot;auto&quot;,cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:&quot;original&quot;,iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:&quot;default&quot;,scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:&quot;both&quot;,snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add(&quot;draggable&quot;,&quot;connectToSortable&quot;,{start:function(c,e){var d=a(this).data(&quot;draggable&quot;),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,&quot;sortable&quot;);if(g&amp;&amp;!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger(&quot;activate&quot;,c,b)}})},stop:function(c,e){var d=a(this).data(&quot;draggable&quot;),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper==&quot;original&quot;){this.instance.currentItem.css({top:&quot;auto&quot;,left:&quot;auto&quot;})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger(&quot;deactivate&quot;,c,b)}})},drag:function(c,f){var e=a(this).data(&quot;draggable&quot;),b=this;var d=function(i){var n=this.offset.click.top,m=this.offset.click.left;var g=this.positionAbs.top,k=this.positionAbs.left;var j=i.height,l=i.width;var p=i.top,h=i.left;return a.ui.isOver(g+n,k+m,p,h,j,l)};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data(&quot;sortable-item&quot;,true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger(&quot;toSortable&quot;,c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}if(this.instance.currentItem){this.instance._mouseDrag(c)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger(&quot;out&quot;,c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger(&quot;fromSortable&quot;,c);e.dropped=false}}})}});a.ui.plugin.add(&quot;draggable&quot;,&quot;cursor&quot;,{start:function(c,d){var b=a(&quot;body&quot;),e=a(this).data(&quot;draggable&quot;).options;if(b.css(&quot;cursor&quot;)){e._cursor=b.css(&quot;cursor&quot;)}b.css(&quot;cursor&quot;,e.cursor)},stop:function(b,c){var d=a(this).data(&quot;draggable&quot;).options;if(d._cursor){a(&quot;body&quot;).css(&quot;cursor&quot;,d._cursor)}}});a.ui.plugin.add(&quot;draggable&quot;,&quot;iframeFix&quot;,{start:function(b,c){var d=a(this).data(&quot;draggable&quot;).options;a(d.iframeFix===true?&quot;iframe&quot;:d.iframeFix).each(function(){a('&lt;div class=&quot;ui-draggable-iframeFix&quot; style=&quot;background: #fff;&quot;&gt;&lt;/div&gt;').css({width:this.offsetWidth+&quot;px&quot;,height:this.offsetHeight+&quot;px&quot;,position:&quot;absolute&quot;,opacity:&quot;0.001&quot;,zIndex:1000}).css(a(this).offset()).appendTo(&quot;body&quot;)})},stop:function(b,c){a(&quot;div.ui-draggable-iframeFix&quot;).each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add(&quot;draggable&quot;,&quot;opacity&quot;,{start:function(c,d){var b=a(d.helper),e=a(this).data(&quot;draggable&quot;).options;if(b.css(&quot;opacity&quot;)){e._opacity=b.css(&quot;opacity&quot;)}b.css(&quot;opacity&quot;,e.opacity)},stop:function(b,c){var d=a(this).data(&quot;draggable&quot;).options;if(d._opacity){a(c.helper).css(&quot;opacity&quot;,d._opacity)}}});a.ui.plugin.add(&quot;draggable&quot;,&quot;scroll&quot;,{start:function(c,d){var b=a(this).data(&quot;draggable&quot;);if(b.scrollParent[0]!=document&amp;&amp;b.scrollParent[0].tagName!=&quot;HTML&quot;){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data(&quot;draggable&quot;),f=c.options,b=false;if(c.scrollParent[0]!=document&amp;&amp;c.scrollParent[0].tagName!=&quot;HTML&quot;){if(!f.axis||f.axis!=&quot;x&quot;){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY&lt;f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top&lt;f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!=&quot;y&quot;){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX&lt;f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left&lt;f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!=&quot;x&quot;){if(d.pageY-a(document).scrollTop()&lt;f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())&lt;f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!=&quot;y&quot;){if(d.pageX-a(document).scrollLeft()&lt;f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())&lt;f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&amp;&amp;a.ui.ddmanager&amp;&amp;!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add(&quot;draggable&quot;,&quot;snap&quot;,{start:function(c,d){var b=a(this).data(&quot;draggable&quot;),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||&quot;:data(draggable)&quot;):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(u,p){var g=a(this).data(&quot;draggable&quot;),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v&gt;=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y&lt;x&amp;&amp;x&lt;n+y&amp;&amp;m-y&lt;f&amp;&amp;f&lt;A+y)||(s-y&lt;x&amp;&amp;x&lt;n+y&amp;&amp;m-y&lt;e&amp;&amp;e&lt;A+y)||(s-y&lt;w&amp;&amp;w&lt;n+y&amp;&amp;m-y&lt;f&amp;&amp;f&lt;A+y)||(s-y&lt;w&amp;&amp;w&lt;n+y&amp;&amp;m-y&lt;e&amp;&amp;e&lt;A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&amp;&amp;g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=false;continue}if(q.snapMode!=&quot;inner&quot;){var c=Math.abs(m-e)&lt;=y;var z=Math.abs(A-f)&lt;=y;var j=Math.abs(s-w)&lt;=y;var k=Math.abs(n-x)&lt;=y;if(c){p.position.top=g._convertPositionTo(&quot;relative&quot;,{top:m-g.helperProportions.height,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo(&quot;relative&quot;,{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo(&quot;relative&quot;,{top:0,left:s-g.helperProportions.width}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo(&quot;relative&quot;,{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!=&quot;outer&quot;){var c=Math.abs(m-f)&lt;=y;var z=Math.abs(A-e)&lt;=y;var j=Math.abs(s-x)&lt;=y;var k=Math.abs(n-w)&lt;=y;if(c){p.position.top=g._convertPositionTo(&quot;relative&quot;,{top:m,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo(&quot;relative&quot;,{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo(&quot;relative&quot;,{top:0,left:s}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo(&quot;relative&quot;,{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&amp;&amp;(c||z||j||k||h)){(g.options.snap.snap&amp;&amp;g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add(&quot;draggable&quot;,&quot;stack&quot;,{start:function(b,c){var e=a(this).data(&quot;draggable&quot;).options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css(&quot;zIndex&quot;),10)||e.stack.min)-(parseInt(a(f).css(&quot;zIndex&quot;),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add(&quot;draggable&quot;,&quot;zIndex&quot;,{start:function(c,d){var b=a(d.helper),e=a(this).data(&quot;draggable&quot;).options;if(b.css(&quot;zIndex&quot;)){e._zIndex=b.css(&quot;zIndex&quot;)}b.css(&quot;zIndex&quot;,e.zIndex)},stop:function(b,c){var d=a(this).data(&quot;draggable&quot;).options;if(d._zIndex){a(c.helper).css(&quot;zIndex&quot;,d._zIndex)}}})})(jQuery);;/*
- * jQuery UI Droppable 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Droppables
- *
- * Depends:
- *        ui.core.js
- *        ui.draggable.js
- */
-(function(a){a.widget(&quot;ui.droppable&quot;,{_init:function(){var c=this.options,b=c.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&amp;&amp;a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&amp;&amp;this.element.addClass(&quot;ui-droppable&quot;))},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c&lt;b.length;c++){if(b[c]==this){b.splice(c,1)}}this.element.removeClass(&quot;ui-droppable ui-droppable-disabled&quot;).removeData(&quot;droppable&quot;).unbind(&quot;.droppable&quot;)},_setData:function(b,c){if(b==&quot;accept&quot;){this.options.accept=c&amp;&amp;a.isFunction(c)?c:function(e){return e.is(c)}}else{a.widget.prototype._setData.apply(this,arguments)}},_activate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(b&amp;&amp;this._trigger(&quot;activate&quot;,c,this.ui(b)))},_deactivate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(b&amp;&amp;this._trigger(&quot;deactivate&quot;,c,this.ui(b)))},_over:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger(&quot;over&quot;,c,this.ui(b))}},_out:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger(&quot;out&quot;,c,this.ui(b))}},_drop:function(c,d){var b=d||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false}var e=false;this.element.find(&quot;:data(droppable)&quot;).not(&quot;.ui-draggable-dragging&quot;).each(function(){var f=a.data(this,&quot;droppable&quot;);if(f.options.greedy&amp;&amp;a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false}});if(e){return false}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger(&quot;drop&quot;,c,this.ui(b));return this.element}return false},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:&quot;1.7.2&quot;,eventPrefix:&quot;drop&quot;,defaults:{accept:&quot;*&quot;,activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;}});a.ui.intersect=function(q,j,o){if(!j.offset){return false}var e=(q.positionAbs||q.position.absolute).left,d=e+q.helperProportions.width,n=(q.positionAbs||q.position.absolute).top,m=n+q.helperProportions.height;var g=j.offset.left,c=g+j.proportions.width,p=j.offset.top,k=p+j.proportions.height;switch(o){case&quot;fit&quot;:return(g&lt;e&amp;&amp;d&lt;c&amp;&amp;p&lt;n&amp;&amp;m&lt;k);break;case&quot;intersect&quot;:return(g&lt;e+(q.helperProportions.width/2)&amp;&amp;d-(q.helperProportions.width/2)&lt;c&amp;&amp;p&lt;n+(q.helperProportions.height/2)&amp;&amp;m-(q.helperProportions.height/2)&lt;k);break;case&quot;pointer&quot;:var h=((q.positionAbs||q.position.absolute).left+(q.clickOffset||q.offset.click).left),i=((q.positionAbs||q.position.absolute).top+(q.clickOffset||q.offset.click).top),f=a.ui.isOver(i,h,p,g,j.proportions.height,j.proportions.width);return f;break;case&quot;touch&quot;:return((n&gt;=p&amp;&amp;n&lt;=k)||(m&gt;=p&amp;&amp;m&lt;=k)||(n&lt;p&amp;&amp;m&gt;k))&amp;&amp;((e&gt;=g&amp;&amp;e&lt;=c)||(d&gt;=g&amp;&amp;d&lt;=c)||(e&lt;g&amp;&amp;d&gt;c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{&quot;default&quot;:[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(&quot;:data(droppable)&quot;).andSelf();droppablesLoop:for(var d=0;d&lt;b.length;d++){if(b[d].options.disabled||(e&amp;&amp;!b[d].options.accept.call(b[d].element[0],(e.currentItem||e.element)))){continue}for(var c=0;c&lt;h.length;c++){if(h[c]==b[d].element[0]){b[d].proportions.height=0;continue droppablesLoop}}b[d].visible=b[d].element.css(&quot;display&quot;)!=&quot;none&quot;;if(!b[d].visible){continue}b[d].offset=b[d].element.offset();b[d].proportions={width:b[d].element[0].offsetWidth,height:b[d].element[0].offsetHeight};if(f==&quot;mousedown&quot;){b[d]._activate.call(b[d],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return}if(!this.options.disabled&amp;&amp;this.visible&amp;&amp;a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c)}if(!this.options.disabled&amp;&amp;this.visible&amp;&amp;this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;this.isover=0;this._deactivate.call(this,c)}});return d},drag:function(b,c){if(b.options.refreshPositions){a.ui.ddmanager.prepareOffsets(b,c)}a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var e=a.ui.intersect(b,this,this.options.tolerance);var g=!e&amp;&amp;this.isover==1?&quot;isout&quot;:(e&amp;&amp;this.isover==0?&quot;isover&quot;:null);if(!g){return}var f;if(this.options.greedy){var d=this.element.parents(&quot;:data(droppable):eq(0)&quot;);if(d.length){f=a.data(d[0],&quot;droppable&quot;);f.greedyChild=(g==&quot;isover&quot;?1:0)}}if(f&amp;&amp;g==&quot;isover&quot;){f.isover=0;f.isout=1;f._out.call(f,c)}this[g]=1;this[g==&quot;isout&quot;?&quot;isover&quot;:&quot;isout&quot;]=0;this[g==&quot;isover&quot;?&quot;_over&quot;:&quot;_out&quot;].call(this,c);if(f&amp;&amp;g==&quot;isout&quot;){f.isout=0;f.isover=1;f._over.call(f,c)}})}}})(jQuery);;/*
- * jQuery UI Sortable 1.7.2
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Sortables
- *
- * Depends:
- *        ui.core.js
- */
-(function(a){a.widget(&quot;ui.sortable&quot;,a.extend({},a.ui.mouse,{_init:function(){var b=this.options;this.containerCache={};this.element.addClass(&quot;ui-sortable&quot;);this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css(&quot;float&quot;)):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass(&quot;ui-sortable ui-sortable-disabled&quot;).removeData(&quot;sortable&quot;).unbind(&quot;.sortable&quot;);this._mouseDestroy();for(var b=this.items.length-1;b&gt;=0;b--){this.items[b].item.removeData(&quot;sortable-item&quot;)}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type==&quot;static&quot;){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,&quot;sortable-item&quot;)==c){d=a(this);return false}});if(a.data(e.target,&quot;sortable-item&quot;)==c){d=a(e.target)}if(!d){return false}if(this.options.handle&amp;&amp;!f){var g=false;a(this.options.handle,d).find(&quot;*&quot;).andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css(&quot;position&quot;,&quot;absolute&quot;);this.cssPosition=this.helper.css(&quot;position&quot;);a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a(&quot;body&quot;).css(&quot;cursor&quot;)){this._storedCursor=a(&quot;body&quot;).css(&quot;cursor&quot;)}a(&quot;body&quot;).css(&quot;cursor&quot;,g.cursor)}if(g.opacity){if(this.helper.css(&quot;opacity&quot;)){this._storedOpacity=this.helper.css(&quot;opacity&quot;)}this.helper.css(&quot;opacity&quot;,g.opacity)}if(g.zIndex){if(this.helper.css(&quot;zIndex&quot;)){this._storedZIndex=this.helper.css(&quot;zIndex&quot;)}this.helper.css(&quot;zIndex&quot;,g.zIndex)}if(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!=&quot;HTML&quot;){this.overflowOffset=this.scrollParent.offset()}this._trigger(&quot;start&quot;,e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d&gt;=0;d--){this.containers[d]._trigger(&quot;activate&quot;,e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&amp;&amp;!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass(&quot;ui-sortable-helper&quot;);this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!=&quot;HTML&quot;){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY&lt;g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop+g.scrollSpeed}else{if(f.pageY-this.overflowOffset.top&lt;g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-g.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX&lt;g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(f.pageX-this.overflowOffset.left&lt;g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-g.scrollSpeed}}}else{if(f.pageY-a(document).scrollTop()&lt;g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())&lt;g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}if(f.pageX-a(document).scrollLeft()&lt;g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())&lt;g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}if(b!==false&amp;&amp;a.ui.ddmanager&amp;&amp;!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}}this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!this.options.axis||this.options.axis!=&quot;y&quot;){this.helper[0].style.left=this.position.left+&quot;px&quot;}if(!this.options.axis||this.options.axis!=&quot;x&quot;){this.helper[0].style.top=this.position.top+&quot;px&quot;}for(var d=this.items.length-1;d&gt;=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&amp;&amp;this.placeholder[h==1?&quot;next&quot;:&quot;prev&quot;]()[0]!=c&amp;&amp;!a.ui.contains(this.placeholder[0],c)&amp;&amp;(this.options.type==&quot;semi-dynamic&quot;?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?&quot;down&quot;:&quot;up&quot;;if(this.options.tolerance==&quot;pointer&quot;||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger(&quot;change&quot;,f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger(&quot;sort&quot;,f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&amp;&amp;!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper==&quot;original&quot;){this.currentItem.css(this._storedCSS).removeClass(&quot;ui-sortable-helper&quot;)}else{this.currentItem.show()}for(var c=this.containers.length-1;c&gt;=0;c--){this.containers[c]._trigger(&quot;deactivate&quot;,null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger(&quot;out&quot;,null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!=&quot;original&quot;&amp;&amp;this.helper&amp;&amp;this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&amp;&amp;d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||&quot;id&quot;)||&quot;&quot;).match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+&quot;[]&quot;)+&quot;=&quot;+(d.key&amp;&amp;d.expression?e[1]:e[2]))}});return c.join(&quot;&amp;&quot;)},toArray:function(d){var b=this._getItemsAsjQuery(d&amp;&amp;d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||&quot;id&quot;)||&quot;&quot;)});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)&gt;n&amp;&amp;(k+o)&lt;i&amp;&amp;(e+h)&gt;f&amp;&amp;(e+h)&lt;c;if(this.options.tolerance==&quot;pointer&quot;||this.options.forcePointerForContainers||(this.options.tolerance!=&quot;pointer&quot;&amp;&amp;this.helperProportions[this.floating?&quot;width&quot;:&quot;height&quot;]&gt;m[this.floating?&quot;width&quot;:&quot;height&quot;])){return g}else{return(f&lt;e+(this.helperProportions.width/2)&amp;&amp;d-(this.helperProportions.width/2)&lt;c&amp;&amp;n&lt;k+(this.helperProportions.height/2)&amp;&amp;j-(this.helperProportions.height/2)&lt;i)}},_intersectsWithPointer:function(d){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width),g=e&amp;&amp;c,b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!g){return false}return this.floating?(((f&amp;&amp;f==&quot;right&quot;)||b==&quot;down&quot;)?2:1):(b&amp;&amp;(b==&quot;down&quot;?2:1))},_intersectsWithSides:function(e){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&amp;&amp;f){return((f==&quot;right&quot;&amp;&amp;d)||(f==&quot;left&quot;&amp;&amp;!d))}else{return b&amp;&amp;((b==&quot;down&quot;&amp;&amp;c)||(b==&quot;up&quot;&amp;&amp;!c))}},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&amp;&amp;(b&gt;0?&quot;down&quot;:&quot;up&quot;)},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&amp;&amp;(b&gt;0?&quot;right&quot;:&quot;left&quot;)},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&amp;&amp;b){for(var d=h.length-1;d&gt;=0;d--){var k=a(h[d]);for(var c=k.length-1;c&gt;=0;c--){var f=a.data(k[c],&quot;sortable&quot;);if(f&amp;&amp;f!=this&amp;&amp;!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(&quot;.ui-sortable-helper&quot;),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(&quot;.ui-sortable-helper&quot;),this]);for(var d=e.length-1;d&gt;=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(&quot;:data(sortable-item)&quot;);for(var c=0;c&lt;this.items.length;c++){for(var b=0;b&lt;d.length;b++){if(d[b]==this.items[c].item[0]){this.items.splice(c,1)}}}},_refreshItems:function(b){this.items=[];this.containers=[this];var h=this.items;var p=this;var f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var l=this._connectWith();if(l){for(var e=l.length-1;e&gt;=0;e--){var m=a(l[e]);for(var d=m.length-1;d&gt;=0;d--){var g=a.data(m[d],&quot;sortable&quot;);if(g&amp;&amp;g!=this&amp;&amp;!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e&gt;=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d&lt;n;d++){var o=a(c[d]);o.data(&quot;sortable-item&quot;,k);h.push({item:o,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&amp;&amp;this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d&gt;=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&amp;&amp;this.currentContainer&amp;&amp;e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&amp;&amp;this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d&gt;=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+&quot; ui-sortable-placeholder&quot;).removeClass(&quot;ui-sortable-helper&quot;)[0];if(!c){f.style.visibility=&quot;hidden&quot;}return f},update:function(f,g){if(c&amp;&amp;!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css(&quot;paddingTop&quot;)||0,10)-parseInt(b.currentItem.css(&quot;paddingBottom&quot;)||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css(&quot;paddingLeft&quot;)||0,10)-parseInt(b.currentItem.css(&quot;paddingRight&quot;)||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c&gt;=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?&quot;left&quot;:&quot;top&quot;];for(var b=this.items.length-1;b&gt;=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?&quot;left&quot;:&quot;top&quot;];if(Math.abs(f-e)&lt;h){h=Math.abs(f-e);g=this.items[b]}}if(!g&amp;&amp;!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[c];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[c].element,true);this._trigger(&quot;change&quot;,d,this._uiHash());this.containers[c]._trigger(&quot;change&quot;,d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[c]._trigger(&quot;over&quot;,d,this._uiHash(this));this.containers[c].containerCache.over=1}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger(&quot;out&quot;,d,this._uiHash(this));this.containers[c].containerCache.over=0}}}},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c,this.currentItem])):(d.helper==&quot;clone&quot;?this.currentItem.clone():this.currentItem);if(!b.parents(&quot;body&quot;).length){a(d.appendTo!=&quot;parent&quot;?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0])}if(b[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css(&quot;position&quot;),top:this.currentItem.css(&quot;top&quot;),left:this.currentItem.css(&quot;left&quot;)}}if(b[0].style.width==&quot;&quot;||d.forceHelperSize){b.width(this.currentItem.width())}if(b[0].style.height==&quot;&quot;||d.forceHelperSize){b.height(this.currentItem.height())}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition==&quot;absolute&quot;&amp;&amp;this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()==&quot;html&quot;&amp;&amp;a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css(&quot;borderTopWidth&quot;),10)||0),left:b.left+(parseInt(this.offsetParent.css(&quot;borderLeftWidth&quot;),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==&quot;relative&quot;){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css(&quot;top&quot;),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css(&quot;left&quot;),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css(&quot;marginLeft&quot;),10)||0),top:(parseInt(this.currentItem.css(&quot;marginTop&quot;),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment==&quot;parent&quot;){e.containment=this.helper[0].parentNode}if(e.containment==&quot;document&quot;||e.containment==&quot;window&quot;){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment==&quot;document&quot;?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment==&quot;document&quot;?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)){var c=a(e.containment)[0];var d=a(e.containment).offset();var b=(a(c).css(&quot;overflow&quot;)!=&quot;hidden&quot;);this.containment=[d.left+(parseInt(a(c).css(&quot;borderLeftWidth&quot;),10)||0)+(parseInt(a(c).css(&quot;paddingLeft&quot;),10)||0)-this.margins.left,d.top+(parseInt(a(c).css(&quot;borderTopWidth&quot;),10)||0)+(parseInt(a(c).css(&quot;paddingTop&quot;),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(a(c).css(&quot;paddingRight&quot;),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(a(c).css(&quot;paddingBottom&quot;),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f==&quot;absolute&quot;?1:-1;var e=this.options,b=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition==&quot;relative&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left&lt;this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top&lt;this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left&gt;this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top&gt;this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top&lt;this.containment[1]||g-this.offset.click.top&gt;this.containment[3])?g:(!(g-this.offset.click.top&lt;this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left&lt;this.containment[0]||f-this.offset.click.left&gt;this.containment[2])?f:(!(f-this.offset.click.left&lt;this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_rearrange:function(g,f,c,e){c?c[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction==&quot;down&quot;?f.item[0]:f.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var d=this,b=this.counter;window.setTimeout(function(){if(b==d.counter){d.refreshPositions(!e)}},0)},_clear:function(d,e){this.reverting=false;var f=[],b=this;if(!this._noFinalSort&amp;&amp;this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var c in this._storedCSS){if(this._storedCSS[c]==&quot;auto&quot;||this._storedCSS[c]==&quot;static&quot;){this._storedCSS[c]=&quot;&quot;}}this.currentItem.css(this._storedCSS).removeClass(&quot;ui-sortable-helper&quot;)}else{this.currentItem.show()}if(this.fromOutside&amp;&amp;!e){f.push(function(g){this._trigger(&quot;receive&quot;,g,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(&quot;.ui-sortable-helper&quot;)[0]||this.domPosition.parent!=this.currentItem.parent()[0])&amp;&amp;!e){f.push(function(g){this._trigger(&quot;update&quot;,g,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!e){f.push(function(g){this._trigger(&quot;remove&quot;,g,this._uiHash())})}for(var c=this.containers.length-1;c&gt;=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&amp;&amp;!e){f.push((function(g){return function(h){g._trigger(&quot;receive&quot;,h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger(&quot;update&quot;,h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c&gt;=0;c--){if(!e){f.push((function(g){return function(h){g._trigger(&quot;deactivate&quot;,h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger(&quot;out&quot;,h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a(&quot;body&quot;).css(&quot;cursor&quot;,this._storedCursor)}if(this._storedOpacity){this.helper.css(&quot;opacity&quot;,this._storedOpacity)}if(this._storedZIndex){this.helper.css(&quot;zIndex&quot;,this._storedZIndex==&quot;auto&quot;?&quot;&quot;:this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger(&quot;beforeStop&quot;,d,this._uiHash());for(var c=0;c&lt;f.length;c++){f[c].call(this,d)}this._trigger(&quot;stop&quot;,d,this._uiHash())}return false}if(!e){this._trigger(&quot;beforeStop&quot;,d,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!e){for(var c=0;c&lt;f.length;c++){f[c].call(this,d)}this._trigger(&quot;stop&quot;,d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(c){var b=c||this;return{helper:b.helper,placeholder:b.placeholder||a([]),position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs,item:b.currentItem,sender:c?c.element:null}}}));a.extend(a.ui.sortable,{getter:&quot;serialize toArray&quot;,version:&quot;1.7.2&quot;,eventPrefix:&quot;sort&quot;,defaults:{appendTo:&quot;parent&quot;,axis:false,cancel:&quot;:input,option&quot;,connectWith:false,containment:false,cursor:&quot;auto&quot;,cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:&quot;original&quot;,items:&quot;&gt; *&quot;,opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;,zIndex:1000}})})(jQuery);;
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationcustomjqueryui172js"></a>
<div class="delfile"><h4>Deleted: trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.js (13268 => 13269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.js        2010-02-21 00:03:42 UTC (rev 13268)
+++ trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.js        2010-02-21 00:10:20 UTC (rev 13269)
</span><span class="lines">@@ -1 +0,0 @@
</span><del>-jQuery.ui||(function(p){var j=p.fn.remove,o=p.browser.mozilla&amp;&amp;(parseFloat(p.browser.version)&lt;1.9);p.ui={version:&quot;1.7.2&quot;,plugin:{add:function(c,b,e){var a=p.ui[c].prototype;for(var d in e){a.plugins[d]=a.plugins[d]||[];a.plugins[d].push([b,e[d]])}},call:function(d,b,c){var e=d.plugins[b];if(!e||!d.element[0].parentNode){return}for(var a=0;a&lt;e.length;a++){if(d.options[e[a][0]]){e[a][1].apply(d.element,c)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&amp;16:a!==b&amp;&amp;a.contains(b)},hasScroll:function(a,c){if(p(a).css(&quot;overflow&quot;)==&quot;hidden&quot;){return false}var d=(c&amp;&amp;c==&quot;left&quot;)?&quot;scrollLeft&quot;:&quot;scrollTop&quot;,b=false;if(a[d]&gt;0){return true}a[d]=1;b=(a[d]&gt;0);a[d]=0;return b},isOverAxis:function(b,c,a){return(b&gt;c)&amp;&amp;(b&lt;(c+a))},isOver:function(e,c,f,a,d,b){return p.ui.isOverAxis(e,f,d)&amp;&amp;p.ui.isOverAxis(c,a,b)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(o){var m=p.attr,n=p.fn.removeAttr,k=&quot;http://www.w3.org/2005/07/aaa&quot;,r=/^aria-/,q=/^wairole:/;p.attr=function(c,d,b){var a=b!==undefined;return(d==&quot;role&quot;?(a?m.call(this,c,d,&quot;wairole:&quot;+b):(m.apply(this,arguments)||&quot;&quot;).replace(q,&quot;&quot;)):(r.test(d)?(a?c.setAttributeNS(k,d.replace(r,&quot;aaa:&quot;),b):m.call(this,c,d.replace(r,&quot;aaa:&quot;))):m.apply(this,arguments)))};p.fn.removeAttr=function(a){return(r.test(a)?this.each(function(){this.removeAttributeNS(k,a.replace(r,&quot;&quot;))}):n.call(this,a))}}p.fn.extend({remove:function(){p(&quot;*&quot;,this).add(this).each(function(){p(this).triggerHandler(&quot;remove&quot;)});return j.apply(this,arguments)},enableSelection:function(){return this.attr(&quot;unselectable&quot;,&quot;off&quot;).css(&quot;MozUserSelect&quot;,&quot;&quot;).unbind(&quot;selectstart.ui&quot;)},disableSelection:function(){return this.attr(&quot;unselectable&quot;,&quot;on&quot;).css(&quot;MozUserSelect&quot;,&quot;none&quot;).bind(&quot;selectstart.ui&quot;,function(){return false})},scrollParent:function(){var a;if((p.browser.msie&amp;&amp;(/(static|relative)/).test(this.css(&quot;position&quot;)))||(/absolute/).test(this.css(&quot;position&quot;))){a=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(p.curCSS(this,&quot;position&quot;,1))&amp;&amp;(/(auto|scroll)/).test(p.curCSS(this,&quot;overflow&quot;,1)+p.curCSS(this,&quot;overflow-y&quot;,1)+p.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0)}else{a=this.parents().filter(function(){return(/(auto|scroll)/).test(p.curCSS(this,&quot;overflow&quot;,1)+p.curCSS(this,&quot;overflow-y&quot;,1)+p.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0)}return(/fixed/).test(this.css(&quot;position&quot;))||!a.length?p(document):a}});p.extend(p.expr[&quot;:&quot;],{data:function(a,b,c){return !!p.data(a,c[3])},focusable:function(b){var a=b.nodeName.toLowerCase(),c=p.attr(b,&quot;tabindex&quot;);return(/input|select|textarea|button|object/.test(a)?!b.disabled:&quot;a&quot;==a||&quot;area&quot;==a?b.href||!isNaN(c):!isNaN(c))&amp;&amp;!p(b)[&quot;area&quot;==a?&quot;parents&quot;:&quot;closest&quot;](&quot;:hidden&quot;).length},tabbable:function(a){var b=p.attr(a,&quot;tabindex&quot;);return(isNaN(b)||b&gt;=0)&amp;&amp;p(a).is(&quot;:focusable&quot;)}});function l(a,f,e,b){function c(g){var h=p[a][f][g]||[];return(typeof h==&quot;string&quot;?h.split(/,?\s+/):h)}var d=c(&quot;getter&quot;);if(b.length==1&amp;&amp;typeof b[0]==&quot;string&quot;){d=d.concat(c(&quot;getterSetter&quot;))}return(p.inArray(e,d)!=-1)}p.widget=function(b,c){var a=b.split(&quot;.&quot;)[0];b=b.split(&quot;.&quot;)[1];p.fn[b]=function(e){var g=(typeof e==&quot;string&quot;),f=Array.prototype.slice.call(arguments,1);if(g&amp;&amp;e.substring(0,1)==&quot;_&quot;){return this}if(g&amp;&amp;l(a,b,e,f)){var d=p.data(this[0],b);return(d?d[e].apply(d,f):undefined)}return this.each(function(){var h=p.data(this,b);(!h&amp;&amp;!g&amp;&amp;p.data(this,b,new p[a][b](this,e))._init());(h&amp;&amp;g&amp;&amp;p.isFunction(h[e])&amp;&amp;h[e].apply(h,f))})};p[a]=p[a]||{};p[a][b]=function(e,f){var d=this;this.namespace=a;this.widgetName=b;this.widgetEventPrefix=p[a][b].eventPrefix||b;this.widgetBaseClass=a+&quot;-&quot;+b;this.options=p.extend({},p.widget.defaults,p[a][b].defaults,p.metadata&amp;&amp;p.metadata.get(e)[b],f);this.element=p(e).bind(&quot;setData.&quot;+b,function(h,i,g){if(h.target==e){return d._setData(i,g)}}).bind(&quot;getData.&quot;+b,function(g,h){if(g.target==e){return d._getData(h)}}).bind(&quot;remove&quot;,function(){return d.destroy()})};p[a][b].prototype=p.extend({},p.widget.prototype,c);p[a][b].getterSetter=&quot;option&quot;};p.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+&quot;-disabled &quot;+this.namespace+&quot;-state-disabled&quot;).removeAttr(&quot;aria-disabled&quot;)},option:function(b,a){var c=b,d=this;if(typeof b==&quot;string&quot;){if(a===undefined){return this._getData(b)}c={};c[b]=a}p.each(c,function(f,e){d._setData(f,e)})},_getData:function(a){return this.options[a]},_setData:function(b,a){this.options[b]=a;if(b==&quot;disabled&quot;){this.element[a?&quot;addClass&quot;:&quot;removeClass&quot;](this.widgetBaseClass+&quot;-disabled &quot;+this.namespace+&quot;-state-disabled&quot;).attr(&quot;aria-disabled&quot;,a)}},enable:function(){this._setData(&quot;disabled&quot;,false)},disable:function(){this._setData(&quot;disabled&quot;,true)},_trigger:function(b,a,g){var e=this.options[b],d=(b==this.widgetEventPrefix?b:this.widgetEventPrefix+b);a=p.Event(a);a.type=d;if(a.originalEvent){for(var c=p.event.props.length,f;c;){f=p.event.props[--c];a[f]=a.originalEvent[f]}}this.element.trigger(a,g);return !(p.isFunction(e)&amp;&amp;e.call(this.element[0],a,g)===false||a.isDefaultPrevented())}};p.widget.defaults={disabled:false};p.ui.mouse={_mouseInit:function(){var a=this;this.element.bind(&quot;mousedown.&quot;+this.widgetName,function(b){return a._mouseDown(b)}).bind(&quot;click.&quot;+this.widgetName,function(b){if(a._preventClickEvent){a._preventClickEvent=false;b.stopImmediatePropagation();return false}});if(p.browser.msie){this._mouseUnselectable=this.element.attr(&quot;unselectable&quot;);this.element.attr(&quot;unselectable&quot;,&quot;on&quot;)}this.started=false},_mouseDestroy:function(){this.element.unbind(&quot;.&quot;+this.widgetName);(p.browser.msie&amp;&amp;this.element.attr(&quot;unselectable&quot;,this._mouseUnselectable))},_mouseDown:function(b){b.originalEvent=b.originalEvent||{};if(b.originalEvent.mouseHandled){return}(this._mouseStarted&amp;&amp;this._mouseUp(b));this._mouseDownEvent=b;var c=this,a=(b.which==1),d=(typeof this.options.cancel==&quot;string&quot;?p(b.target).parents().add(b.target).filter(this.options.cancel).length:false);if(!a||d||!this._mouseCapture(b)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(b)&amp;&amp;this._mouseDelayMet(b)){this._mouseStarted=(this._mouseStart(b)!==false);if(!this._mouseStarted){b.preventDefault();return true}}this._mouseMoveDelegate=function(e){return c._mouseMove(e)};this._mouseUpDelegate=function(e){return c._mouseUp(e)};p(document).bind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).bind(&quot;mouseup.&quot;+this.widgetName,this._mouseUpDelegate);(p.browser.safari||b.preventDefault());b.originalEvent.mouseHandled=true;return true},_mouseMove:function(a){if(p.browser.msie&amp;&amp;!a.button){return this._mouseUp(a)}if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&amp;&amp;this._mouseDelayMet(a)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,a)!==false);(this._mouseStarted?this._mouseDrag(a):this._mouseUp(a))}return !this._mouseStarted},_mouseUp:function(a){p(document).unbind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).unbind(&quot;mouseup.&quot;+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(a.target==this._mouseDownEvent.target);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return(Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))&gt;=this.options.distance)},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return true}};p.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(b){b.widget(&quot;ui.draggable&quot;,b.extend({},b.ui.mouse,{_init:function(){if(this.options.helper==&quot;original&quot;&amp;&amp;!(/^(?:r|a|f)/).test(this.element.css(&quot;position&quot;))){this.element[0].style.position=&quot;relative&quot;}(this.options.addClasses&amp;&amp;this.element.addClass(&quot;ui-draggable&quot;));(this.options.disabled&amp;&amp;this.element.addClass(&quot;ui-draggable-disabled&quot;));this._mouseInit()},destroy:function(){if(!this.element.data(&quot;draggable&quot;)){return}this.element.removeData(&quot;draggable&quot;).unbind(&quot;.draggable&quot;).removeClass(&quot;ui-draggable ui-draggable-dragging ui-draggable-disabled&quot;);this._mouseDestroy()},_mouseCapture:function(a){var d=this.options;if(this.helper||d.disabled||b(a.target).is(&quot;.ui-resizable-handle&quot;)){return false}this.handle=this._getHandle(a);if(!this.handle){return false}return true},_mouseStart:function(a){var d=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(b.ui.ddmanager){b.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css(&quot;position&quot;);this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};b.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;if(d.cursorAt){this._adjustOffsetFromHelper(d.cursorAt)}if(d.containment){this._setContainment()}this._trigger(&quot;start&quot;,a);this._cacheHelperProportions();if(b.ui.ddmanager&amp;&amp;!d.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,a)}this.helper.addClass(&quot;ui-draggable-dragging&quot;);this._mouseDrag(a,true);return true},_mouseDrag:function(a,e){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!e){var f=this._uiHash();this._trigger(&quot;drag&quot;,a,f);this.position=f.position}if(!this.options.axis||this.options.axis!=&quot;y&quot;){this.helper[0].style.left=this.position.left+&quot;px&quot;}if(!this.options.axis||this.options.axis!=&quot;x&quot;){this.helper[0].style.top=this.position.top+&quot;px&quot;}if(b.ui.ddmanager){b.ui.ddmanager.drag(this,a)}return false},_mouseStop:function(f){var e=false;if(b.ui.ddmanager&amp;&amp;!this.options.dropBehaviour){e=b.ui.ddmanager.drop(this,f)}if(this.dropped){e=this.dropped;this.dropped=false}if((this.options.revert==&quot;invalid&quot;&amp;&amp;!e)||(this.options.revert==&quot;valid&quot;&amp;&amp;e)||this.options.revert===true||(b.isFunction(this.options.revert)&amp;&amp;this.options.revert.call(this.element,e))){var a=this;b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){a._trigger(&quot;stop&quot;,f);a._clear()})}else{this._trigger(&quot;stop&quot;,f);this._clear()}return false},_getHandle:function(a){var d=!this.options.handle||!b(this.options.handle,this.element).length?true:false;b(this.options.handle,this.element).find(&quot;*&quot;).andSelf().each(function(){if(this==a.target){d=true}});return d},_createHelper:function(f){var e=this.options;var a=b.isFunction(e.helper)?b(e.helper.apply(this.element[0],[f])):(e.helper==&quot;clone&quot;?this.element.clone():this.element);if(!a.parents(&quot;body&quot;).length){a.appendTo((e.appendTo==&quot;parent&quot;?this.element[0].parentNode:e.appendTo))}if(a[0]!=this.element[0]&amp;&amp;!(/(fixed|absolute)/).test(a.css(&quot;position&quot;))){a.css(&quot;position&quot;,&quot;absolute&quot;)}return a},_adjustOffsetFromHelper:function(a){if(a.left!=undefined){this.offset.click.left=a.left+this.margins.left}if(a.right!=undefined){this.offset.click.left=this.helperProportions.width-a.right+this.margins.left}if(a.top!=undefined){this.offset.click.top=a.top+this.margins.top}if(a.bottom!=undefined){this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition==&quot;absolute&quot;&amp;&amp;this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()==&quot;html&quot;&amp;&amp;b.browser.msie)){a={top:0,left:0}}return{top:a.top+(parseInt(this.offsetParent.css(&quot;borderTopWidth&quot;),10)||0),left:a.left+(parseInt(this.offsetParent.css(&quot;borderLeftWidth&quot;),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==&quot;relative&quot;){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css(&quot;top&quot;),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css(&quot;left&quot;),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css(&quot;marginLeft&quot;),10)||0),top:(parseInt(this.element.css(&quot;marginTop&quot;),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f=this.options;if(f.containment==&quot;parent&quot;){f.containment=this.helper[0].parentNode}if(f.containment==&quot;document&quot;||f.containment==&quot;window&quot;){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(f.containment==&quot;document&quot;?document:window).width()-this.helperProportions.width-this.margins.left,(b(f.containment==&quot;document&quot;?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(f.containment)&amp;&amp;f.containment.constructor!=Array){var h=b(f.containment)[0];if(!h){return}var g=b(f.containment).offset();var a=(b(h).css(&quot;overflow&quot;)!=&quot;hidden&quot;);this.containment=[g.left+(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingLeft&quot;),10)||0)-this.margins.left,g.top+(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingTop&quot;),10)||0)-this.margins.top,g.left+(a?Math.max(h.scrollWidth,h.offsetWidth):h.offsetWidth)-(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingRight&quot;),10)||0)-this.helperProportions.width-this.margins.left,g.top+(a?Math.max(h.scrollHeight,h.offsetHeight):h.offsetHeight)-(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingBottom&quot;),10)||0)-this.helperProportions.height-this.margins.top]}else{if(f.containment.constructor==Array){this.containment=f.containment}}},_convertPositionTo:function(j,d){if(!d){d=this.position}var l=j==&quot;absolute&quot;?1:-1;var k=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(a[0].tagName);return{top:(d.top+this.offset.relative.top*l+this.offset.parent.top*l-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(i?0:a.scrollTop()))*l)),left:(d.left+this.offset.relative.left*l+this.offset.parent.left*l-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():i?0:a.scrollLeft())*l))}},_generatePosition:function(n){var k=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);if(this.cssPosition==&quot;relative&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var o=n.pageX;var p=n.pageY;if(this.originalPosition){if(this.containment){if(n.pageX-this.offset.click.left&lt;this.containment[0]){o=this.containment[0]+this.offset.click.left}if(n.pageY-this.offset.click.top&lt;this.containment[1]){p=this.containment[1]+this.offset.click.top}if(n.pageX-this.offset.click.left&gt;this.containment[2]){o=this.containment[2]+this.offset.click.left}if(n.pageY-this.offset.click.top&gt;this.containment[3]){p=this.containment[3]+this.offset.click.top}}if(k.grid){var l=this.originalPageY+Math.round((p-this.originalPageY)/k.grid[1])*k.grid[1];p=this.containment?(!(l-this.offset.click.top&lt;this.containment[1]||l-this.offset.click.top&gt;this.containment[3])?l:(!(l-this.offset.click.top&lt;this.containment[1])?l-k.grid[1]:l+k.grid[1])):l;var m=this.originalPageX+Math.round((o-this.originalPageX)/k.grid[0])*k.grid[0];o=this.containment?(!(m-this.offset.click.left&lt;this.containment[0]||m-this.offset.click.left&gt;this.containment[2])?m:(!(m-this.offset.click.left&lt;this.containment[0])?m-k.grid[0]:m+k.grid[0])):m}}return{top:(p-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(j?0:a.scrollTop())))),left:(o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():j?0:a.scrollLeft())))}},_clear:function(){this.helper.removeClass(&quot;ui-draggable-dragging&quot;);if(this.helper[0]!=this.element[0]&amp;&amp;!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,f,e){e=e||this._uiHash();b.ui.plugin.call(this,a,[f,e]);if(a==&quot;drag&quot;){this.positionAbs=this._convertPositionTo(&quot;absolute&quot;)}return b.widget.prototype._trigger.call(this,a,f,e)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));b.extend(b.ui.draggable,{version:&quot;1.7.2&quot;,eventPrefix:&quot;drag&quot;,defaults:{addClasses:true,appendTo:&quot;parent&quot;,axis:false,cancel:&quot;:input,option&quot;,connectToSortable:false,containment:false,cursor:&quot;auto&quot;,cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:&quot;original&quot;,iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:&quot;default&quot;,scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:&quot;both&quot;,snapTolerance:20,stack:false,zIndex:false}});b.ui.plugin.add(&quot;draggable&quot;,&quot;connectToSortable&quot;,{start:function(j,h){var i=b(this).data(&quot;draggable&quot;),g=i.options,a=b.extend({},h,{item:i.element});i.sortables=[];b(g.connectToSortable).each(function(){var c=b.data(this,&quot;sortable&quot;);if(c&amp;&amp;!c.options.disabled){i.sortables.push({instance:c,shouldRevert:c.options.revert});c._refreshItems();c._trigger(&quot;activate&quot;,j,a)}})},stop:function(h,f){var g=b(this).data(&quot;draggable&quot;),a=b.extend({},f,{item:g.element});b.each(g.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;g.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(h);this.instance.options.helper=this.instance.options._helper;if(g.options.helper==&quot;original&quot;){this.instance.currentItem.css({top:&quot;auto&quot;,left:&quot;auto&quot;})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger(&quot;deactivate&quot;,h,a)}})},drag:function(j,g){var h=b(this).data(&quot;draggable&quot;),a=this;var i=function(r){var d=this.offset.click.top,e=this.offset.click.left;var t=this.positionAbs.top,o=this.positionAbs.left;var q=r.height,f=r.width;var c=r.top,s=r.left;return b.ui.isOver(t+d,o+e,c,s,q,f)};b.each(h.sortables,function(c){this.instance.positionAbs=h.positionAbs;this.instance.helperProportions=h.helperProportions;this.instance.offset.click=h.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=b(a).clone().appendTo(this.instance.element).data(&quot;sortable-item&quot;,true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return g.helper[0]};j.target=this.instance.currentItem[0];this.instance._mouseCapture(j,true);this.instance._mouseStart(j,true,true);this.instance.offset.click.top=h.offset.click.top;this.instance.offset.click.left=h.offset.click.left;this.instance.offset.parent.left-=h.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=h.offset.parent.top-this.instance.offset.parent.top;h._trigger(&quot;toSortable&quot;,j);h.dropped=this.instance.element;h.currentItem=h.element;this.instance.fromOutside=h}if(this.instance.currentItem){this.instance._mouseDrag(j)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger(&quot;out&quot;,j,this.instance._uiHash(this.instance));this.instance._mouseStop(j,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}h._trigger(&quot;fromSortable&quot;,j);h.dropped=false}}})}});b.ui.plugin.add(&quot;draggable&quot;,&quot;cursor&quot;,{start:function(h,g){var a=b(&quot;body&quot;),f=b(this).data(&quot;draggable&quot;).options;if(a.css(&quot;cursor&quot;)){f._cursor=a.css(&quot;cursor&quot;)}a.css(&quot;cursor&quot;,f.cursor)},stop:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;if(e._cursor){b(&quot;body&quot;).css(&quot;cursor&quot;,e._cursor)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;iframeFix&quot;,{start:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;b(e.iframeFix===true?&quot;iframe&quot;:e.iframeFix).each(function(){b('&lt;div class=&quot;ui-draggable-iframeFix&quot; style=&quot;background: #fff;&quot;&gt;&lt;/div&gt;').css({width:this.offsetWidth+&quot;px&quot;,height:this.offsetHeight+&quot;px&quot;,position:&quot;absolute&quot;,opacity:&quot;0.001&quot;,zIndex:1000}).css(b(this).offset()).appendTo(&quot;body&quot;)})},stop:function(a,d){b(&quot;div.ui-draggable-iframeFix&quot;).each(function(){this.parentNode.removeChild(this)})}});b.ui.plugin.add(&quot;draggable&quot;,&quot;opacity&quot;,{start:function(h,g){var a=b(g.helper),f=b(this).data(&quot;draggable&quot;).options;if(a.css(&quot;opacity&quot;)){f._opacity=a.css(&quot;opacity&quot;)}a.css(&quot;opacity&quot;,f.opacity)},stop:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;if(e._opacity){b(f.helper).css(&quot;opacity&quot;,e._opacity)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;scroll&quot;,{start:function(f,e){var a=b(this).data(&quot;draggable&quot;);if(a.scrollParent[0]!=document&amp;&amp;a.scrollParent[0].tagName!=&quot;HTML&quot;){a.overflowOffset=a.scrollParent.offset()}},drag:function(i,h){var j=b(this).data(&quot;draggable&quot;),g=j.options,a=false;if(j.scrollParent[0]!=document&amp;&amp;j.scrollParent[0].tagName!=&quot;HTML&quot;){if(!g.axis||g.axis!=&quot;x&quot;){if((j.overflowOffset.top+j.scrollParent[0].offsetHeight)-i.pageY&lt;g.scrollSensitivity){j.scrollParent[0].scrollTop=a=j.scrollParent[0].scrollTop+g.scrollSpeed}else{if(i.pageY-j.overflowOffset.top&lt;g.scrollSensitivity){j.scrollParent[0].scrollTop=a=j.scrollParent[0].scrollTop-g.scrollSpeed}}}if(!g.axis||g.axis!=&quot;y&quot;){if((j.overflowOffset.left+j.scrollParent[0].offsetWidth)-i.pageX&lt;g.scrollSensitivity){j.scrollParent[0].scrollLeft=a=j.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(i.pageX-j.overflowOffset.left&lt;g.scrollSensitivity){j.scrollParent[0].scrollLeft=a=j.scrollParent[0].scrollLeft-g.scrollSpeed}}}}else{if(!g.axis||g.axis!=&quot;x&quot;){if(i.pageY-b(document).scrollTop()&lt;g.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()-g.scrollSpeed)}else{if(b(window).height()-(i.pageY-b(document).scrollTop())&lt;g.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()+g.scrollSpeed)}}}if(!g.axis||g.axis!=&quot;y&quot;){if(i.pageX-b(document).scrollLeft()&lt;g.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()-g.scrollSpeed)}else{if(b(window).width()-(i.pageX-b(document).scrollLeft())&lt;g.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()+g.scrollSpeed)}}}}if(a!==false&amp;&amp;b.ui.ddmanager&amp;&amp;!g.dropBehaviour){b.ui.ddmanager.prepareOffsets(j,i)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;snap&quot;,{start:function(h,g){var a=b(this).data(&quot;draggable&quot;),f=a.options;a.snapElements=[];b(f.snap.constructor!=String?(f.snap.items||&quot;:data(draggable)&quot;):f.snap).each(function(){var c=b(this);var d=c.offset();if(this!=a.element[0]){a.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:d.top,left:d.left})}})},drag:function(r,D){var J=b(this).data(&quot;draggable&quot;),B=J.options;var d=B.snapTolerance;var i=D.offset.left,l=i+J.helperProportions.width,K=D.offset.top,L=K+J.helperProportions.height;for(var o=J.snapElements.length-1;o&gt;=0;o--){var t=J.snapElements[o].left,E=t+J.snapElements[o].width,F=J.snapElements[o].top,C=F+J.snapElements[o].height;if(!((t-d&lt;i&amp;&amp;i&lt;E+d&amp;&amp;F-d&lt;K&amp;&amp;K&lt;C+d)||(t-d&lt;i&amp;&amp;i&lt;E+d&amp;&amp;F-d&lt;L&amp;&amp;L&lt;C+d)||(t-d&lt;l&amp;&amp;l&lt;E+d&amp;&amp;F-d&lt;K&amp;&amp;K&lt;C+d)||(t-d&lt;l&amp;&amp;l&lt;E+d&amp;&amp;F-d&lt;L&amp;&amp;L&lt;C+d))){if(J.snapElements[o].snapping){(J.options.snap.release&amp;&amp;J.options.snap.release.call(J.element,r,b.extend(J._uiHash(),{snapItem:J.snapElements[o].item})))}J.snapElements[o].snapping=false;continue}if(B.snapMode!=&quot;inner&quot;){var M=Math.abs(F-L)&lt;=d;var a=Math.abs(C-K)&lt;=d;var H=Math.abs(t-l)&lt;=d;var G=Math.abs(E-i)&lt;=d;if(M){D.position.top=J._convertPositionTo(&quot;relative&quot;,{top:F-J.helperProportions.height,left:0}).top-J.margins.top}if(a){D.position.top=J._convertPositionTo(&quot;relative&quot;,{top:C,left:0}).top-J.margins.top}if(H){D.position.left=J._convertPositionTo(&quot;relative&quot;,{top:0,left:t-J.helperProportions.width}).left-J.margins.left}if(G){D.position.left=J._convertPositionTo(&quot;relative&quot;,{top:0,left:E}).left-J.margins.left}}var I=(M||a||H||G);if(B.snapMode!=&quot;outer&quot;){var M=Math.abs(F-K)&lt;=d;var a=Math.abs(C-L)&lt;=d;var H=Math.abs(t-i)&lt;=d;var G=Math.abs(E-l)&lt;=d;if(M){D.position.top=J._convertPositionTo(&quot;relative&quot;,{top:F,left:0}).top-J.margins.top}if(a){D.position.top=J._convertPositionTo(&quot;relative&quot;,{top:C-J.helperProportions.height,left:0}).top-J.margins.top}if(H){D.position.left=J._convertPositionTo(&quot;relative&quot;,{top:0,left:t}).left-J.margins.left}if(G){D.position.left=J._convertPositionTo(&quot;relative&quot;,{top:0,left:E-J.helperProportions.width}).left-J.margins.left}}if(!J.snapElements[o].snapping&amp;&amp;(M||a||H||G||I)){(J.options.snap.snap&amp;&amp;J.options.snap.snap.call(J.element,r,b.extend(J._uiHash(),{snapItem:J.snapElements[o].item})))}J.snapElements[o].snapping=(M||a||H||G||I)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;stack&quot;,{start:function(a,h){var f=b(this).data(&quot;draggable&quot;).options;var g=b.makeArray(b(f.stack.group)).sort(function(c,d){return(parseInt(b(c).css(&quot;zIndex&quot;),10)||f.stack.min)-(parseInt(b(d).css(&quot;zIndex&quot;),10)||f.stack.min)});b(g).each(function(c){this.style.zIndex=f.stack.min+c});this[0].style.zIndex=f.stack.min+g.length}});b.ui.plugin.add(&quot;draggable&quot;,&quot;zIndex&quot;,{start:function(h,g){var a=b(g.helper),f=b(this).data(&quot;draggable&quot;).options;if(a.css(&quot;zIndex&quot;)){f._zIndex=a.css(&quot;zIndex&quot;)}a.css(&quot;zIndex&quot;,f.zIndex)},stop:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;if(e._zIndex){b(f.helper).css(&quot;zIndex&quot;,e._zIndex)}}})})(jQuery);(function(b){b.widget(&quot;ui.droppable&quot;,{_init:function(){var d=this.options,a=d.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&amp;&amp;b.isFunction(this.options.accept)?this.options.accept:function(c){return c.is(a)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};b.ui.ddmanager.droppables[this.options.scope]=b.ui.ddmanager.droppables[this.options.scope]||[];b.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&amp;&amp;this.element.addClass(&quot;ui-droppable&quot;))},destroy:function(){var a=b.ui.ddmanager.droppables[this.options.scope];for(var d=0;d&lt;a.length;d++){if(a[d]==this){a.splice(d,1)}}this.element.removeClass(&quot;ui-droppable ui-droppable-disabled&quot;).removeData(&quot;droppable&quot;).unbind(&quot;.droppable&quot;)},_setData:function(a,d){if(a==&quot;accept&quot;){this.options.accept=d&amp;&amp;b.isFunction(d)?d:function(c){return c.is(d)}}else{b.widget.prototype._setData.apply(this,arguments)}},_activate:function(d){var a=b.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(a&amp;&amp;this._trigger(&quot;activate&quot;,d,this.ui(a)))},_deactivate:function(d){var a=b.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(a&amp;&amp;this._trigger(&quot;deactivate&quot;,d,this.ui(a)))},_over:function(d){var a=b.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(a.currentItem||a.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger(&quot;over&quot;,d,this.ui(a))}},_out:function(d){var a=b.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(a.currentItem||a.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger(&quot;out&quot;,d,this.ui(a))}},_drop:function(h,g){var a=g||b.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0]){return false}var f=false;this.element.find(&quot;:data(droppable)&quot;).not(&quot;.ui-draggable-dragging&quot;).each(function(){var c=b.data(this,&quot;droppable&quot;);if(c.options.greedy&amp;&amp;b.ui.intersect(a,b.extend(c,{offset:c.element.offset()}),c.options.tolerance)){f=true;return false}});if(f){return false}if(this.options.accept.call(this.element[0],(a.currentItem||a.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger(&quot;drop&quot;,h,this.ui(a));return this.element}return false},ui:function(a){return{draggable:(a.currentItem||a.element),helper:a.helper,position:a.position,absolutePosition:a.positionAbs,offset:a.positionAbs}}});b.extend(b.ui.droppable,{version:&quot;1.7.2&quot;,eventPrefix:&quot;drop&quot;,defaults:{accept:&quot;*&quot;,activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;}});b.ui.intersect=function(a,v,r){if(!v.offset){return false}var A=(a.positionAbs||a.position.absolute).left,B=A+a.helperProportions.width,s=(a.positionAbs||a.position.absolute).top,t=s+a.helperProportions.height;var y=v.offset.left,C=y+v.proportions.width,l=v.offset.top,u=l+v.proportions.height;switch(r){case&quot;fit&quot;:return(y&lt;A&amp;&amp;B&lt;C&amp;&amp;l&lt;s&amp;&amp;t&lt;u);break;case&quot;intersect&quot;:return(y&lt;A+(a.helperProportions.width/2)&amp;&amp;B-(a.helperProportions.width/2)&lt;C&amp;&amp;l&lt;s+(a.helperProportions.height/2)&amp;&amp;t-(a.helperProportions.height/2)&lt;u);break;case&quot;pointer&quot;:var x=((a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left),w=((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top),z=b.ui.isOver(w,x,l,y,v.proportions.height,v.proportions.width);return z;break;case&quot;touch&quot;:return((s&gt;=l&amp;&amp;s&lt;=u)||(t&gt;=l&amp;&amp;t&lt;=u)||(s&lt;l&amp;&amp;t&gt;u))&amp;&amp;((A&gt;=y&amp;&amp;A&lt;=C)||(B&gt;=y&amp;&amp;B&lt;=C)||(A&lt;y&amp;&amp;B&gt;C));break;default:return false;break}};b.ui.ddmanager={current:null,droppables:{&quot;default&quot;:[]},prepareOffsets:function(l,j){var a=b.ui.ddmanager.droppables[l.options.scope];var k=j?j.type:null;var i=(l.currentItem||l.element).find(&quot;:data(droppable)&quot;).andSelf();droppablesLoop:for(var m=0;m&lt;a.length;m++){if(a[m].options.disabled||(l&amp;&amp;!a[m].options.accept.call(a[m].element[0],(l.currentItem||l.element)))){continue}for(var n=0;n&lt;i.length;n++){if(i[n]==a[m].element[0]){a[m].proportions.height=0;continue droppablesLoop}}a[m].visible=a[m].element.css(&quot;display&quot;)!=&quot;none&quot;;if(!a[m].visible){continue}a[m].offset=a[m].element.offset();a[m].proportions={width:a[m].element[0].offsetWidth,height:a[m].element[0].offsetHeight};if(k==&quot;mousedown&quot;){a[m]._activate.call(a[m],j)}}},drop:function(a,f){var e=false;b.each(b.ui.ddmanager.droppables[a.options.scope],function(){if(!this.options){return}if(!this.options.disabled&amp;&amp;this.visible&amp;&amp;b.ui.intersect(a,this,this.options.tolerance)){e=this._drop.call(this,f)}if(!this.options.disabled&amp;&amp;this.visible&amp;&amp;this.options.accept.call(this.element[0],(a.currentItem||a.element))){this.isout=1;this.isover=0;this._deactivate.call(this,f)}});return e},drag:function(a,d){if(a.options.refreshPositions){b.ui.ddmanager.prepareOffsets(a,d)}b.each(b.ui.ddmanager.droppables[a.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var i=b.ui.intersect(a,this,this.options.tolerance);var c=!i&amp;&amp;this.isover==1?&quot;isout&quot;:(i&amp;&amp;this.isover==0?&quot;isover&quot;:null);if(!c){return}var h;if(this.options.greedy){var j=this.element.parents(&quot;:data(droppable):eq(0)&quot;);if(j.length){h=b.data(j[0],&quot;droppable&quot;);h.greedyChild=(c==&quot;isover&quot;?1:0)}}if(h&amp;&amp;c==&quot;isover&quot;){h.isover=0;h.isout=1;h._out.call(h,d)}this[c]=1;this[c==&quot;isout&quot;?&quot;isover&quot;:&quot;isout&quot;]=0;this[c==&quot;isover&quot;?&quot;_over&quot;:&quot;_out&quot;].call(this,d);if(h&amp;&amp;c==&quot;isout&quot;){h.isout=0;h.isover=1;h._over.call(h,d)}})}}})(jQuery);(function(b){b.widget(&quot;ui.sortable&quot;,b.extend({},b.ui.mouse,{_init:function(){var a=this.options;this.containerCache={};this.element.addClass(&quot;ui-sortable&quot;);this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css(&quot;float&quot;)):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass(&quot;ui-sortable ui-sortable-disabled&quot;).removeData(&quot;sortable&quot;).unbind(&quot;.sortable&quot;);this._mouseDestroy();for(var a=this.items.length-1;a&gt;=0;a--){this.items[a].item.removeData(&quot;sortable-item&quot;)}},_mouseCapture:function(j,i){if(this.reverting){return false}if(this.options.disabled||this.options.type==&quot;static&quot;){return false}this._refreshItems(j);var k=null,l=this,a=b(j.target).parents().each(function(){if(b.data(this,&quot;sortable-item&quot;)==l){k=b(this);return false}});if(b.data(j.target,&quot;sortable-item&quot;)==l){k=b(j.target)}if(!k){return false}if(this.options.handle&amp;&amp;!i){var h=false;b(this.options.handle,k).find(&quot;*&quot;).andSelf().each(function(){if(this==j.target){h=true}});if(!h){return false}}this.currentItem=k;this._removeCurrentsFromItems();return true},_mouseStart:function(j,i,a){var h=this.options,l=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(j);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css(&quot;position&quot;,&quot;absolute&quot;);this.cssPosition=this.helper.css(&quot;position&quot;);b.extend(this.offset,{click:{left:j.pageX-this.offset.left,top:j.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(j);this.originalPageX=j.pageX;this.originalPageY=j.pageY;if(h.cursorAt){this._adjustOffsetFromHelper(h.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(h.containment){this._setContainment()}if(h.cursor){if(b(&quot;body&quot;).css(&quot;cursor&quot;)){this._storedCursor=b(&quot;body&quot;).css(&quot;cursor&quot;)}b(&quot;body&quot;).css(&quot;cursor&quot;,h.cursor)}if(h.opacity){if(this.helper.css(&quot;opacity&quot;)){this._storedOpacity=this.helper.css(&quot;opacity&quot;)}this.helper.css(&quot;opacity&quot;,h.opacity)}if(h.zIndex){if(this.helper.css(&quot;zIndex&quot;)){this._storedZIndex=this.helper.css(&quot;zIndex&quot;)}this.helper.css(&quot;zIndex&quot;,h.zIndex)}if(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!=&quot;HTML&quot;){this.overflowOffset=this.scrollParent.offset()}this._trigger(&quot;start&quot;,j,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!a){for(var k=this.containers.length-1;k&gt;=0;k--){this.containers[k]._trigger(&quot;activate&quot;,j,l._uiHash(this))}}if(b.ui.ddmanager){b.ui.ddmanager.current=this}if(b.ui.ddmanager&amp;&amp;!h.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,j)}this.dragging=true;this.helper.addClass(&quot;ui-sortable-helper&quot;);this._mouseDrag(j);return true},_mouseDrag:function(k){this.position=this._generatePosition(k);this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var j=this.options,a=false;if(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!=&quot;HTML&quot;){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-k.pageY&lt;j.scrollSensitivity){this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+j.scrollSpeed}else{if(k.pageY-this.overflowOffset.top&lt;j.scrollSensitivity){this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-j.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-k.pageX&lt;j.scrollSensitivity){this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+j.scrollSpeed}else{if(k.pageX-this.overflowOffset.left&lt;j.scrollSensitivity){this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-j.scrollSpeed}}}else{if(k.pageY-b(document).scrollTop()&lt;j.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()-j.scrollSpeed)}else{if(b(window).height()-(k.pageY-b(document).scrollTop())&lt;j.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()+j.scrollSpeed)}}if(k.pageX-b(document).scrollLeft()&lt;j.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()-j.scrollSpeed)}else{if(b(window).width()-(k.pageX-b(document).scrollLeft())&lt;j.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()+j.scrollSpeed)}}}if(a!==false&amp;&amp;b.ui.ddmanager&amp;&amp;!j.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,k)}}this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!this.options.axis||this.options.axis!=&quot;y&quot;){this.helper[0].style.left=this.position.left+&quot;px&quot;}if(!this.options.axis||this.options.axis!=&quot;x&quot;){this.helper[0].style.top=this.position.top+&quot;px&quot;}for(var m=this.items.length-1;m&gt;=0;m--){var l=this.items[m],n=l.item[0],i=this._intersectsWithPointer(l);if(!i){continue}if(n!=this.currentItem[0]&amp;&amp;this.placeholder[i==1?&quot;next&quot;:&quot;prev&quot;]()[0]!=n&amp;&amp;!b.ui.contains(this.placeholder[0],n)&amp;&amp;(this.options.type==&quot;semi-dynamic&quot;?!b.ui.contains(this.element[0],n):true)){this.direction=i==1?&quot;down&quot;:&quot;up&quot;;if(this.options.tolerance==&quot;pointer&quot;||this._intersectsWithSides(l)){this._rearrange(k,l)}else{break}this._trigger(&quot;change&quot;,k,this._uiHash());break}}this._contactContainers(k);if(b.ui.ddmanager){b.ui.ddmanager.drag(this,k)}this._trigger(&quot;sort&quot;,k,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(h,g){if(!h){return}if(b.ui.ddmanager&amp;&amp;!this.options.dropBehaviour){b.ui.ddmanager.drop(this,h)}if(this.options.revert){var a=this;var f=a.placeholder.offset();a.reverting=true;b(this.helper).animate({left:f.left-this.offset.parent.left-a.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-a.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){a._clear(h)})}else{this._clear(h,g)}return false},cancel:function(){var a=this;if(this.dragging){this._mouseUp();if(this.options.helper==&quot;original&quot;){this.currentItem.css(this._storedCSS).removeClass(&quot;ui-sortable-helper&quot;)}else{this.currentItem.show()}for(var d=this.containers.length-1;d&gt;=0;d--){this.containers[d]._trigger(&quot;deactivate&quot;,null,a._uiHash(this));if(this.containers[d].containerCache.over){this.containers[d]._trigger(&quot;out&quot;,null,a._uiHash(this));this.containers[d].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!=&quot;original&quot;&amp;&amp;this.helper&amp;&amp;this.helper[0].parentNode){this.helper.remove()}b.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){b(this.domPosition.prev).after(this.currentItem)}else{b(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(e){var a=this._getItemsAsjQuery(e&amp;&amp;e.connected);var f=[];e=e||{};b(a).each(function(){var c=(b(e.item||this).attr(e.attribute||&quot;id&quot;)||&quot;&quot;).match(e.expression||(/(.+)[-=_](.+)/));if(c){f.push((e.key||c[1]+&quot;[]&quot;)+&quot;=&quot;+(e.key&amp;&amp;e.expression?c[1]:c[2]))}});return f.join(&quot;&amp;&quot;)},toArray:function(e){var a=this._getItemsAsjQuery(e&amp;&amp;e.connected);var f=[];e=e||{};a.each(function(){f.push(b(e.item||this).attr(e.attribute||&quot;id&quot;)||&quot;&quot;)});return f},_intersectsWith:function(p){var w=this.positionAbs.left,x=w+this.helperProportions.width,q=this.positionAbs.top,r=q+this.helperProportions.height;var v=p.left,y=v+p.width,l=p.top,s=l+p.height;var a=this.offset.click.top,t=this.offset.click.left;var u=(q+a)&gt;l&amp;&amp;(q+a)&lt;s&amp;&amp;(w+t)&gt;v&amp;&amp;(w+t)&lt;y;if(this.options.tolerance==&quot;pointer&quot;||this.options.forcePointerForContainers||(this.options.tolerance!=&quot;pointer&quot;&amp;&amp;this.helperProportions[this.floating?&quot;width&quot;:&quot;height&quot;]&gt;p[this.floating?&quot;width&quot;:&quot;height&quot;])){return u}else{return(v&lt;w+(this.helperProportions.width/2)&amp;&amp;x-(this.helperProportions.width/2)&lt;y&amp;&amp;l&lt;q+(this.helperProportions.height/2)&amp;&amp;r-(this.helperProportions.height/2)&lt;s)}},_intersectsWithPointer:function(k){var j=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,k.top,k.height),l=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,k.left,k.width),h=j&amp;&amp;l,a=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection();if(!h){return false}return this.floating?(((i&amp;&amp;i==&quot;right&quot;)||a==&quot;down&quot;)?2:1):(a&amp;&amp;(a==&quot;down&quot;?2:1))},_intersectsWithSides:function(h){var j=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,h.top+(h.height/2),h.height),i=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,h.left+(h.width/2),h.width),a=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(this.floating&amp;&amp;g){return((g==&quot;right&quot;&amp;&amp;i)||(g==&quot;left&quot;&amp;&amp;!i))}else{return a&amp;&amp;((a==&quot;down&quot;&amp;&amp;j)||(a==&quot;up&quot;&amp;&amp;!j))}},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&amp;&amp;(a&gt;0?&quot;down&quot;:&quot;up&quot;)},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&amp;&amp;(a&gt;0?&quot;right&quot;:&quot;left&quot;)},refresh:function(a){this._refreshItems(a);this.refreshPositions()},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(r){var a=this;var m=[];var o=[];var j=this._connectWith();if(j&amp;&amp;r){for(var p=j.length-1;p&gt;=0;p--){var i=b(j[p]);for(var q=i.length-1;q&gt;=0;q--){var n=b.data(i[q],&quot;sortable&quot;);if(n&amp;&amp;n!=this&amp;&amp;!n.options.disabled){o.push([b.isFunction(n.options.items)?n.options.items.call(n.element):b(n.options.items,n.element).not(&quot;.ui-sortable-helper&quot;),n])}}}}o.push([b.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):b(this.options.items,this.element).not(&quot;.ui-sortable-helper&quot;),this]);for(var p=o.length-1;p&gt;=0;p--){o[p][0].each(function(){m.push(this)})}return b(m)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(&quot;:data(sortable-item)&quot;);for(var f=0;f&lt;this.items.length;f++){for(var a=0;a&lt;e.length;a++){if(e[a]==this.items[f].item[0]){this.items.splice(f,1)}}}},_refreshItems:function(z){this.items=[];this.containers=[this];var t=this.items;var a=this;var v=[[b.isFunction(this.options.items)?this.options.items.call(this.element[0],z,{item:this.currentItem}):b(this.options.items,this.element),this]];var r=this._connectWith();if(r){for(var w=r.length-1;w&gt;=0;w--){var q=b(r[w]);for(var x=q.length-1;x&gt;=0;x--){var u=b.data(q[x],&quot;sortable&quot;);if(u&amp;&amp;u!=this&amp;&amp;!u.options.disabled){v.push([b.isFunction(u.options.items)?u.options.items.call(u.element[0],z,{item:this.currentItem}):b(u.options.items,u.element),u]);this.containers.push(u)}}}}for(var w=v.length-1;w&gt;=0;w--){var s=v[w][1];var y=v[w][0];for(var x=0,j=y.length;x&lt;j;x++){var i=b(y[x]);i.data(&quot;sortable-item&quot;,s);t.push({item:i,instance:s,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&amp;&amp;this.helper){this.offset.parent=this._getParentOffset()}for(var i=this.items.length-1;i&gt;=0;i--){var h=this.items[i];if(h.instance!=this.currentContainer&amp;&amp;this.currentContainer&amp;&amp;h.item[0]!=this.currentItem[0]){continue}var j=this.options.toleranceElement?b(this.options.toleranceElement,h.item):h.item;if(!a){h.width=j.outerWidth();h.height=j.outerHeight()}var g=j.offset();h.left=g.left;h.top=g.top}if(this.options.custom&amp;&amp;this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var i=this.containers.length-1;i&gt;=0;i--){var g=this.containers[i].element.offset();this.containers[i].containerCache.left=g.left;this.containers[i].containerCache.top=g.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}}},_createPlaceholder:function(g){var a=g||this,f=a.options;if(!f.placeholder||f.placeholder.constructor==String){var h=f.placeholder;f.placeholder={element:function(){var c=b(document.createElement(a.currentItem[0].nodeName)).addClass(h||a.currentItem[0].className+&quot; ui-sortable-placeholder&quot;).removeClass(&quot;ui-sortable-helper&quot;)[0];if(!h){c.style.visibility=&quot;hidden&quot;}return c},update:function(d,c){if(h&amp;&amp;!f.forcePlaceholderSize){return}if(!c.height()){c.height(a.currentItem.innerHeight()-parseInt(a.currentItem.css(&quot;paddingTop&quot;)||0,10)-parseInt(a.currentItem.css(&quot;paddingBottom&quot;)||0,10))}if(!c.width()){c.width(a.currentItem.innerWidth()-parseInt(a.currentItem.css(&quot;paddingLeft&quot;)||0,10)-parseInt(a.currentItem.css(&quot;paddingRight&quot;)||0,10))}}}}a.placeholder=b(f.placeholder.element.call(a.element,a.currentItem));a.currentItem.after(a.placeholder);f.placeholder.update(a,a.placeholder)},_contactContainers:function(m){for(var n=this.containers.length-1;n&gt;=0;n--){if(this._intersectsWith(this.containers[n].containerCache)){if(!this.containers[n].containerCache.over){if(this.currentContainer!=this.containers[n]){var i=10000;var j=null;var l=this.positionAbs[this.containers[n].floating?&quot;left&quot;:&quot;top&quot;];for(var a=this.items.length-1;a&gt;=0;a--){if(!b.ui.contains(this.containers[n].element[0],this.items[a].item[0])){continue}var k=this.items[a][this.containers[n].floating?&quot;left&quot;:&quot;top&quot;];if(Math.abs(k-l)&lt;i){i=Math.abs(k-l);j=this.items[a]}}if(!j&amp;&amp;!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[n];j?this._rearrange(m,j,null,true):this._rearrange(m,null,this.containers[n].element,true);this._trigger(&quot;change&quot;,m,this._uiHash());this.containers[n]._trigger(&quot;change&quot;,m,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[n]._trigger(&quot;over&quot;,m,this._uiHash(this));this.containers[n].containerCache.over=1}}else{if(this.containers[n].containerCache.over){this.containers[n]._trigger(&quot;out&quot;,m,this._uiHash(this));this.containers[n].containerCache.over=0}}}},_createHelper:function(f){var e=this.options;var a=b.isFunction(e.helper)?b(e.helper.apply(this.element[0],[f,this.currentItem])):(e.helper==&quot;clone&quot;?this.currentItem.clone():this.currentItem);if(!a.parents(&quot;body&quot;).length){b(e.appendTo!=&quot;parent&quot;?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0])}if(a[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css(&quot;position&quot;),top:this.currentItem.css(&quot;top&quot;),left:this.currentItem.css(&quot;left&quot;)}}if(a[0].style.width==&quot;&quot;||e.forceHelperSize){a.width(this.currentItem.width())}if(a[0].style.height==&quot;&quot;||e.forceHelperSize){a.height(this.currentItem.height())}return a},_adjustOffsetFromHelper:function(a){if(a.left!=undefined){this.offset.click.left=a.left+this.margins.left}if(a.right!=undefined){this.offset.click.left=this.helperProportions.width-a.right+this.margins.left}if(a.top!=undefined){this.offset.click.top=a.top+this.margins.top}if(a.bottom!=undefined){this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition==&quot;absolute&quot;&amp;&amp;this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()==&quot;html&quot;&amp;&amp;b.browser.msie)){a={top:0,left:0}}return{top:a.top+(parseInt(this.offsetParent.css(&quot;borderTopWidth&quot;),10)||0),left:a.left+(parseInt(this.offsetParent.css(&quot;borderLeftWidth&quot;),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==&quot;relative&quot;){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css(&quot;top&quot;),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css(&quot;left&quot;),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css(&quot;marginLeft&quot;),10)||0),top:(parseInt(this.currentItem.css(&quot;marginTop&quot;),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f=this.options;if(f.containment==&quot;parent&quot;){f.containment=this.helper[0].parentNode}if(f.containment==&quot;document&quot;||f.containment==&quot;window&quot;){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(f.containment==&quot;document&quot;?document:window).width()-this.helperProportions.width-this.margins.left,(b(f.containment==&quot;document&quot;?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(f.containment)){var h=b(f.containment)[0];var g=b(f.containment).offset();var a=(b(h).css(&quot;overflow&quot;)!=&quot;hidden&quot;);this.containment=[g.left+(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingLeft&quot;),10)||0)-this.margins.left,g.top+(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingTop&quot;),10)||0)-this.margins.top,g.left+(a?Math.max(h.scrollWidth,h.offsetWidth):h.offsetWidth)-(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingRight&quot;),10)||0)-this.helperProportions.width-this.margins.left,g.top+(a?Math.max(h.scrollHeight,h.offsetHeight):h.offsetHeight)-(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingBottom&quot;),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(j,d){if(!d){d=this.position}var l=j==&quot;absolute&quot;?1:-1;var k=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(a[0].tagName);return{top:(d.top+this.offset.relative.top*l+this.offset.parent.top*l-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(i?0:a.scrollTop()))*l)),left:(d.left+this.offset.relative.left*l+this.offset.parent.left*l-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():i?0:a.scrollLeft())*l))}},_generatePosition:function(n){var k=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);if(this.cssPosition==&quot;relative&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var o=n.pageX;var p=n.pageY;if(this.originalPosition){if(this.containment){if(n.pageX-this.offset.click.left&lt;this.containment[0]){o=this.containment[0]+this.offset.click.left}if(n.pageY-this.offset.click.top&lt;this.containment[1]){p=this.containment[1]+this.offset.click.top}if(n.pageX-this.offset.click.left&gt;this.containment[2]){o=this.containment[2]+this.offset.click.left}if(n.pageY-this.offset.click.top&gt;this.containment[3]){p=this.containment[3]+this.offset.click.top}}if(k.grid){var l=this.originalPageY+Math.round((p-this.originalPageY)/k.grid[1])*k.grid[1];p=this.containment?(!(l-this.offset.click.top&lt;this.containment[1]||l-this.offset.click.top&gt;this.containment[3])?l:(!(l-this.offset.click.top&lt;this.containment[1])?l-k.grid[1]:l+k.grid[1])):l;var m=this.originalPageX+Math.round((o-this.originalPageX)/k.grid[0])*k.grid[0];o=this.containment?(!(m-this.offset.click.left&lt;this.containment[0]||m-this.offset.click.left&gt;this.containment[2])?m:(!(m-this.offset.click.left&lt;this.containment[0])?m-k.grid[0]:m+k.grid[0])):m}}return{top:(p-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(j?0:a.scrollTop())))),left:(o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():j?0:a.scrollLeft())))}},_rearrange:function(h,i,l,j){l?l[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction==&quot;down&quot;?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var k=this,a=this.counter;window.setTimeout(function(){if(a==k.counter){k.refreshPositions(!j)}},0)},_clear:function(i,h){this.reverting=false;var g=[],a=this;if(!this._noFinalSort&amp;&amp;this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var j in this._storedCSS){if(this._storedCSS[j]==&quot;auto&quot;||this._storedCSS[j]==&quot;static&quot;){this._storedCSS[j]=&quot;&quot;}}this.currentItem.css(this._storedCSS).removeClass(&quot;ui-sortable-helper&quot;)}else{this.currentItem.show()}if(this.fromOutside&amp;&amp;!h){g.push(function(c){this._trigger(&quot;receive&quot;,c,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(&quot;.ui-sortable-helper&quot;)[0]||this.domPosition.parent!=this.currentItem.parent()[0])&amp;&amp;!h){g.push(function(c){this._trigger(&quot;update&quot;,c,this._uiHash())})}if(!b.ui.contains(this.element[0],this.currentItem[0])){if(!h){g.push(function(c){this._trigger(&quot;remove&quot;,c,this._uiHash())})}for(var j=this.containers.length-1;j&gt;=0;j--){if(b.ui.contains(this.containers[j].element[0],this.currentItem[0])&amp;&amp;!h){g.push((function(c){return function(d){c._trigger(&quot;receive&quot;,d,this._uiHash(this))}}).call(this,this.containers[j]));g.push((function(c){return function(d){c._trigger(&quot;update&quot;,d,this._uiHash(this))}}).call(this,this.containers[j]))}}}for(var j=this.containers.length-1;j&gt;=0;j--){if(!h){g.push((function(c){return function(d){c._trigger(&quot;deactivate&quot;,d,this._uiHash(this))}}).call(this,this.containers[j]))}if(this.containers[j].containerCache.over){g.push((function(c){return function(d){c._trigger(&quot;out&quot;,d,this._uiHash(this))}}).call(this,this.containers[j]));this.containers[j].containerCache.over=0}}if(this._storedCursor){b(&quot;body&quot;).css(&quot;cursor&quot;,this._storedCursor)}if(this._storedOpacity){this.helper.css(&quot;opacity&quot;,this._storedOpacity)}if(this._storedZIndex){this.helper.css(&quot;zIndex&quot;,this._storedZIndex==&quot;auto&quot;?&quot;&quot;:this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!h){this._trigger(&quot;beforeStop&quot;,i,this._uiHash());for(var j=0;j&lt;g.length;j++){g[j].call(this,i)}this._trigger(&quot;stop&quot;,i,this._uiHash())}return false}if(!h){this._trigger(&quot;beforeStop&quot;,i,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!h){for(var j=0;j&lt;g.length;j++){g[j].call(this,i)}this._trigger(&quot;stop&quot;,i,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(b.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(d){var a=d||this;return{helper:a.helper,placeholder:a.placeholder||b([]),position:a.position,absolutePosition:a.positionAbs,offset:a.positionAbs,item:a.currentItem,sender:d?d.element:null}}}));b.extend(b.ui.sortable,{getter:&quot;serialize toArray&quot;,version:&quot;1.7.2&quot;,eventPrefix:&quot;sort&quot;,defaults:{appendTo:&quot;parent&quot;,axis:false,cancel:&quot;:input,option&quot;,connectWith:false,containment:false,cursor:&quot;auto&quot;,cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:&quot;original&quot;,items:&quot;&gt; *&quot;,opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;,zIndex:1000}})})(jQuery);
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (13268 => 13269)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2010-02-21 00:03:42 UTC (rev 13268)
+++ trunk/wp-includes/script-loader.php        2010-02-21 00:10:20 UTC (rev 13269)
</span><span class="lines">@@ -396,17 +396,11 @@
</span><span class="cx">                         'done' =&gt; __( 'Done' )
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><ins>+                // Custom Navigation
+                $scripts-&gt;add( 'custom-navigation-default-items', &quot;/wp-admin/js/custom-navigation-default-items$suffix.js&quot;, false, '20100220' );
+                $scripts-&gt;add( 'custom-navigation-dynamic-functions', &quot;/wp-admin/js/custom-navigation-dynamic-functions$suffix.js&quot;, false, '20100220' );
+                $scripts-&gt;add( 'custom-navigation-php-functions', &quot;/wp-admin/js/custom-navigation-php-functions$suffix.js&quot;, false, '20100220' );
</ins><span class="cx">         }
</span><del>-
-        //Custom Navigation
-
-        $scripts-&gt;add( 'custom-navigation-ui-custom', '/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.js', array('jquery'), '1.7.2' );
-        $scripts-&gt;add_data( 'custom-navigation-ui-custom', 'group', 1 );
-
-        $scripts-&gt;add( 'custom-navigation-default-items', &quot;/wp-admin/js/custom-navigation-default-items$suffix.js&quot;, false, '20100220' );
-        $scripts-&gt;add( 'custom-navigation-dynamic-functions', &quot;/wp-admin/js/custom-navigation-dynamic-functions$suffix.js&quot;, false, '20100220' );
-        $scripts-&gt;add( 'custom-navigation-php-functions', &quot;/wp-admin/js/custom-navigation-php-functions$suffix.js&quot;, false, '20100220' );
-
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span></span></pre>
</div>
</div>

</body>
</html>