text: /*
   * ! UI development toolkit for HTML5 (OpenUI5)
   * (c) Copyright 2009-2017 SAP SE or an SAP affiliate company.
   * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
   */
  sap.ui.define(['sap/ui/base/ManagedObject','sap/ui/dt/ElementUtil','sap/ui/dt/OverlayUtil','sap/ui/dt/OverlayRegistry'],function(M,E,O,a){"use strict";var b=M.extend("sap.ui.dt.plugin.ElementMover",{metadata:{library:"sap.ui.dt",properties:{movableTypes:{type:"string[]",defaultValue:["sap.ui.core.Element"]}},associations:{}}});b.prototype._getMovableTypes=function(){return this.getProperty("movableTypes")||[];};b.prototype.isMovableType=function(e){var m=this._getMovableTypes();return m.some(function(t){return E.isInstanceOf(e,t);});};b.prototype.checkMovable=function(o){return true;};b.prototype.getMovedOverlay=function(){return this._oMovedOverlay;};b.prototype.setMovedOverlay=function(m){if(m){this._source=O.getParentInformation(m);}else{delete this._source;}this._oMovedOverlay=m;};b.prototype._getSource=function(){return this._source;};b.prototype.activateAllValidTargetZones=function(d,A){this._iterateAllAggregations(d,this._activateValidTargetZone.bind(this),A);};b.prototype._activateValidTargetZone=function(A,s){if(this.checkTargetZone(A)){A.setTargetZone(true);if(s){A.addStyleClass(s);}}};b.prototype.checkTargetZone=function(A,o,c){var m=o?o:this.getMovedOverlay();var g=A.getGeometry();var G=g&&g.size.height>0&&g.size.width>0;if((c&&!G)||!c&&!A.$().is(":visible")||!(A.getElementInstance().getVisible&&A.getElementInstance().getVisible())){return false;}var p=A.getElementInstance();if(!p.getParent()){return false;}var d=m.getElementInstance();var s=A.getAggregationName();if(E.isValidForAggregation(p,s,d)){return true;}};b.prototype._deactivateTargetZone=function(A,s){A.setTargetZone(false);if(s){A.removeStyleClass(s);}};b.prototype.activateTargetZonesFor=function(o,A){this._iterateOverlayAggregations(o,this._activateValidTargetZone.bind(this),A);};b.prototype.deactivateTargetZonesFor=function(o,A){this._iterateOverlayAggregations(o,this._deactivateTargetZone.bind(this),A);};b.prototype.deactivateAllTargetZones=function(d,A){this._iterateAllAggregations(d,this._deactivateTargetZone.bind(this),A);};b.prototype._iterateAllAggregations=function(d,s,A){var o=d.getElementOverlays();o.forEach(function(c){this._iterateOverlayAggregations(c,s,A);},this);};b.prototype._iterateOverlayAggregations=function(o,s,A){var c=o.getAggregationOverlays();c.forEach(function(d){s(d,A);});};b.prototype.repositionOn=function(m,t){var o=m.getElementInstance();var T=O.getParentInformation(t);var A;var p=m.getParentAggregationOverlay();var r=m.getRelevantContainer();var P=m.getParentElementOverlay();if(p&&P){var s=p.getAggregationName();A=P.getDesignTimeMetadata().getAggregation(s);}if(T.index!==-1){if(A&&A.beforeMove){A.beforeMove(r,o);}E.insertAggregation(T.parent,T.aggregation,o,T.index);if(A&&A.afterMove){A.afterMove(r,o);}}};b.prototype.insertInto=function(m,t){var o=m.getElementInstance();var T=t.getElementInstance();var A;var p=m.getParentAggregationOverlay();var r=m.getRelevantContainer();var P=m.getParentElementOverlay();if(p&&P){var s=p.getAggregationName();A=P.getDesignTimeMetadata().getAggregation(s);}var c=E.getAggregation(t.getElementInstance(),t.getAggregationName());var i=c.indexOf(o);if(!(i>-1&&i===c.length-1)){if(A&&A.beforeMove){A.beforeMove(r,o);}var d=t.getAggregationName();E.addAggregation(T,d,o);if(A&&A.afterMove){A.afterMove(r,o);}}};b.prototype._compareSourceAndTarget=function(s,t){var p;for(p in s){switch(typeof(s[p])){case'object':if(s[p].getId()!==t[p].getId()){return false;}break;default:if(s[p]!==t[p]){return false;}}}return true;};return b;},true);
  