/** 
 * Kendo UI v2016.3.1118 (http://www.telerik.com/kendo-ui)                                                                                                                                              
 * Copyright 2016 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(t,define){define("kendo.treeview.draganddrop.min",["kendo.data.min","kendo.draganddrop.min"],t)}(function(){return function(t,i){var e=window.kendo,o=e.ui,s=t.proxy,n=t.extend,r="visibility",a="k-state-hover",d="input,a,textarea,.k-multiselect-wrap,select,button,a.k-button>.k-icon,button.k-button>.k-icon,span.k-icon.k-i-expand,span.k-icon.k-i-collapse";o.HierarchicalDragAndDrop=e.Class.extend({init:function(i,r){this.element=i,this.hovered=i,this.options=n({dragstart:t.noop,drag:t.noop,drop:t.noop,dragend:t.noop},r),this._draggable=new o.Draggable(i,{ignore:d,filter:r.filter,autoScroll:r.autoScroll,cursorOffset:{left:10,top:e.support.mobileOS?-40/e.support.zoomLevel():10},hint:s(this._hint,this),dragstart:s(this.dragstart,this),dragcancel:s(this.dragcancel,this),drag:s(this.drag,this),dragend:s(this.dragend,this),$angular:r.$angular})},_hint:function(t){return"<div class='k-header k-drag-clue'><span class='k-icon k-drag-status' />"+this.options.hintText(t)+"</div>"},_removeTouchHover:function(){e.support.touch&&this.hovered&&(this.hovered.find("."+a).removeClass(a),this.hovered=!1)},_hintStatus:function(e){var o=this._draggable.hint.find(".k-drag-status")[0];return e?(o.className="k-icon k-drag-status "+e,i):t.trim(o.className.replace(/k-(icon|drag-status)/g,""))},dragstart:function(i){this.source=i.currentTarget.closest(this.options.itemSelector),this.options.dragstart(this.source)&&i.preventDefault(),this.dropHint=this.options.reorderable?t("<div class='k-drop-hint' />").css(r,"hidden").appendTo(this.element):t()},drag:function(i){var o,s,n,d,h,l,c,p,g,u,v,k=this.options,f=this.source,m=this.dropTarget=t(e.eventTarget(i)),_=m.closest(k.allowedContainers);_.length?f[0]==m[0]||k.contains(f[0],m[0])?v="k-i-denied":(v="k-i-insert-middle",g=k.itemFromTarget(m),o=g.item,o.length?(this._removeTouchHover(),s=e._outerHeight(o),d=g.content,k.reorderable?(h=s/(d.length>0?4:2),n=e.getOffset(o).top,l=i.y.location<n+h,c=n+s-h<i.y.location,p=d.length&&!l&&!c):(p=!0,l=!1,c=!1),this.hovered=!!p&&_,this.dropHint.css(r,p?"hidden":"visible"),this._lastHover&&this._lastHover[0]!=d[0]&&this._lastHover.removeClass(a),this._lastHover=d.toggleClass(a,p),p?v="k-i-add":(u=o.position(),u.top+=l?0:s,this.dropHint.css(u)[l?"prependTo":"appendTo"](k.dropHintContainer(o)),l&&g.first&&(v="k-i-insert-top"),c&&g.last&&(v="k-i-insert-bottom"))):m[0]!=this.dropHint[0]&&(this._lastHover&&this._lastHover.removeClass(a),v=t.contains(this.element[0],_[0])?"k-i-denied":"k-i-add")):(v="k-i-denied",this._removeTouchHover()),this.options.drag({originalEvent:i.originalEvent,source:f,target:m,pageY:i.y.location,pageX:i.x.location,status:v.substring(2),setStatus:function(t){v=t}}),0!==v.indexOf("k-i-insert")&&this.dropHint.css(r,"hidden"),this._hintStatus(v)},dragcancel:function(){this.dropHint.remove()},dragend:function(t){var e,o,s,n="over",d=this.source,h=this.dropHint,l=this.dropTarget;return"visible"==h.css(r)?(n=this.options.dropPositionFrom(h),e=h.closest(this.options.itemSelector)):l&&(e=l.closest(this.options.itemSelector),e.length||(e=l.closest(this.options.allowedContainers))),o={originalEvent:t.originalEvent,source:d[0],destination:e[0],valid:"k-i-denied"!=this._hintStatus(),setValid:function(t){this.valid=t},dropTarget:l[0],position:n},s=this.options.drop(o),h.remove(),this._removeTouchHover(),this._lastHover&&this._lastHover.removeClass(a),!o.valid||s?(this._draggable.dropped=o.valid,i):(this._draggable.dropped=!0,this.options.dragend({originalEvent:t.originalEvent,source:d,destination:e,position:n}),i)},destroy:function(){this._lastHover=this.hovered=null,this._draggable.destroy()}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,i,e){(e||i)()});
//# sourceMappingURL=kendo.treeview.draganddrop.min.js.map
