YUI.add("dd-plugin",function(e,t){var i=function(t){e.Widget&&t.host instanceof e.Widget?(t.node=t.host.get("boundingBox"),t.widget=t.host):(t.node=t.host,t.widget=!1),i.superclass.constructor.call(this,t)};i.NAME="dd-plugin",i.NS="dd",e.extend(i,e.DD.Drag,{_widgetHandles:null,_widget:undefined,_stoppedPosition:undefined,_usesWidgetPosition:function(t){var i=!1;return i=t?!(!t.hasImpl||!t.hasImpl(e.WidgetPosition)):i},_checkEvents:function(){this._widget&&(this.proxy?0<this._widgetHandles.length&&this._removeWidgetListeners():0===this._widgetHandles.length&&this._attachWidgetListeners())},_removeWidgetListeners:function(){e.Array.each(this._widgetHandles,function(t){t.detach()}),this._widgetHandles=[]},_attachWidgetListeners:function(){this._usesWidgetPosition(this._widget)&&(this._widgetHandles.push(this.on("drag:drag",this._setWidgetCoords)),this._widgetHandles.push(this.on("drag:end",this._updateStopPosition)))},initializer:function(t){this._widgetHandles=[],this._widget=t.widget,this.on("drag:start",this._checkEvents),this._attachWidgetListeners()},_setWidgetCoords:function(t){var i=this._stoppedPosition||t.target.nodeXY,t=t.target.realXY,i=[t[0]-i[0],t[1]-i[1]];0!==i[0]&&0!==i[1]?this._widget.set("xy",t):0===i[0]?this._widget.set("y",t[1]):0===i[1]&&this._widget.set("x",t[0])},_updateStopPosition:function(t){this._stoppedPosition=t.target.realXY}}),e.namespace("Plugin"),e.Plugin.Drag=i},"patched-v3.18.3",{optional:["dd-constrain","dd-proxy"],requires:["dd-drag"]});