/** * angular-ui-sortable - This directive allows you to jQueryUI Sortable. * @version v0.17.2 - 2017-11-25 * @link http://angular-ui.github.com * @license MIT */ !function(a,b,c){"use strict";b.module("ui.sortable",[]).value("uiSortableConfig",{items:"> [ng-repeat],> [data-ng-repeat],> [x-ng-repeat]"}).directive("uiSortable",["uiSortableConfig","$timeout","$log",function(a,d,e){return{require:"?ngModel",scope:{ngModel:"=",uiSortable:"=",create:"&uiSortableCreate",start:"&uiSortableStart",activate:"&uiSortableActivate",beforeStop:"&uiSortableBeforeStop",update:"&uiSortableUpdate",remove:"&uiSortableRemove",receive:"&uiSortableReceive",deactivate:"&uiSortableDeactivate",stop:"&uiSortableStop"},link:function(f,g,h,i){function j(a,b){var c="function"==typeof a,d="function"==typeof b;return c&&d?function(){a.apply(this,arguments),b.apply(this,arguments)}:d?b:a}function k(a){var b=a.data("ui-sortable");return b&&"object"==typeof b&&"ui-sortable"===b.widgetFullName?b:null}function l(b,c){return C[b]?("stop"===b&&(c=j(c,function(){f.$apply()}),c=j(c,t)),c=j(C[b],c)):D[b]&&(c=D[b](c)),c||"items"!==b&&"ui-model-items"!==b||(c=a.items),c}function m(a,d,e){function f(a,b){b in A||(A[b]=null)}b.forEach(C,f);var g=null;if(d){var h;b.forEach(d,function(d,e){if(!(a&&e in a)){if(e in B)return void("ui-floating"===e?A[e]="auto":A[e]=l(e,c));h||(h=b.element.ui.sortable().options);var f=h[e];f=l(e,f),g||(g={}),g[e]=f,A[e]=f}})}return a=b.extend({},a),b.forEach(a,function(c,d){if(d in B){if("ui-floating"!==d||c!==!1&&c!==!0||!e||(e.floating=c),"ui-preserve-size"===d&&(c===!1||c===!0)){var f=A.helper;a.helper=function(a,c){return A["ui-preserve-size"]===!0&&c.children().each(function(){var a=b.element(this);a.width(a.width())}),(f||function(a,b){return b}).apply(this,arguments)}}A[d]=l(d,c)}}),b.forEach(a,function(a,b){b in B||(a=l(b,a),g||(g={}),g[b]=a,A[b]=a)}),g}function n(a){var c=a.sortable("option","placeholder");if(c&&c.element&&"function"==typeof c.element){var d=c.element();return d=b.element(d)}return null}function o(a,b){var c=A["ui-model-items"].replace(/[^,]*>/g,""),d=a.find('[class="'+b.attr("class")+'"]:not('+c+")");return d}function p(a,b){var c=a.sortable("option","helper");return"clone"===c||"function"==typeof c&&b.item.sortable.isCustomHelperUsed()}function q(a,b){var c=null;return p(a,b)&&"parent"===a.sortable("option","appendTo")&&(c=z),c}function r(a){return/left|right/.test(a.css("float"))||/inline|table-cell/.test(a.css("display"))}function s(a,b){for(var c=0;c