text: // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  // See https://js.arcgis.com/4.6/esri/copyright.txt for details.
  //>>built
  define(["require","exports","../../../../core/tsSupport/extendsHelper","../../../ViewAnimation","./CameraController"],function(e,f,g,h,a){Object.defineProperty(f,"__esModule",{value:!0});e=function(d){function b(a){void 0===a&&(a=new h);var c=d.call(this)||this;c.viewAnimation=a;return c}g(b,d);Object.defineProperty(b.prototype,"canStop",{get:function(){return!0},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"asyncResult",{get:function(){return this._asyncResult},set:function(b){this._asyncResult&&
  this._asyncResult.reject();this._asyncResult=b;if(this.state===a.State.Finished||this.state===a.State.Stopped)this._asyncResult=null,this.state===a.State.Finished?b.resolve():b.reject()},enumerable:!0,configurable:!0});b.prototype.onControllerStart=function(b){var c=this;d.prototype.onControllerStart.call(this,b);this.viewAnimation&&this.viewAnimation.when(function(){c.state!==a.State.Ready&&c.state!==a.State.Running||c.finish()},function(){if(c.state===a.State.Ready||c.state===a.State.Running)c.state=
  a.State.Stopped})};b.prototype.onControllerEnd=function(b){this.viewAnimation&&(this.viewAnimation.done||(this.state===a.State.Finished?this.viewAnimation.finish():this.state===a.State.Stopped&&this.viewAnimation.stop()));this._asyncResult&&(this.state===a.State.Finished?this._asyncResult.resolve():this._asyncResult.reject());d.prototype.onControllerEnd.call(this,b)};b.prototype.finish=function(){this.finishController()};return b}(a.CameraController);f.AnimationController=e});