//>>built
define("dojox/mdnd/PureSource","dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/connect dojo/_base/array dojo/dom-class dojo/dnd/common dojo/dnd/Selector dojo/dnd/Manager".split(" "),function(p,k,g,d,l,e,m,n,f){var b=k("dojox.mdnd.PureSource",n,{horizontal:!1,copyOnly:!0,skipForm:!1,withHandles:!1,isSource:!0,targetState:"Disabled",generateText:!0,constructor:function(a,c){g.mixin(this,g.mixin({},c));this.mouseDown=this.isDragging=!1;this.sourceState="";e.add(this.node,"dojoDndSource");
this.horizontal&&e.add(this.node,"dojoDndHorizontal");this.topics=[d.subscribe("/dnd/cancel",this,"onDndCancel"),d.subscribe("/dnd/drop",this,"onDndCancel")]},onDndCancel:function(){this.mouseDown=this.isDragging=!1;delete this.mouseButton},copyState:function(a){return this.copyOnly||a},destroy:function(){b.superclass.destroy.call(this);l.forEach(this.topics,d.unsubscribe);this.targetAnchor=null},markupFactory:function(a,c){a._skipStartup=!0;return new b(c,a)},onMouseMove:function(a){if(!this.isDragging){b.superclass.onMouseMove.call(this,
a);var c=f.manager();if(this.mouseDown&&!this.isDragging&&this.isSource){var h=this.getSelectedNodes();h.length&&(c.startDrag(this,h,this.copyState(d.isCopyKey(a))),this.isDragging=!0)}}},onMouseDown:function(a){!this._legalMouseDown(a)||this.skipForm&&m.isFormElement(a)||(this.mouseDown=!0,this.mouseButton=a.button,b.superclass.onMouseDown.call(this,a))},onMouseUp:function(a){this.mouseDown&&(this.mouseDown=!1,b.superclass.onMouseUp.call(this,a))},onOverEvent:function(){b.superclass.onOverEvent.call(this);
f.manager().overSource(this)},onOutEvent:function(){b.superclass.onOutEvent.call(this);f.manager().outSource(this)},_markDndStatus:function(a){this._changeState("Source",a?"Copied":"Moved")},_legalMouseDown:function(a){if(!this.withHandles)return!0;for(a=a.target;a&&!e.contains(a,"dojoDndItem");a=a.parentNode)if(e.contains(a,"dojoDndHandle"))return!0;return!1}});return b});