/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../core/lang","../../../geometry/support/aaBoundingRect","../../../geometry/support/boundsUtils","../../../geometry/support/jsonUtils"],(function(t,n,e,i,o){"use strict";let s=function(){function t(){}return t.local=function(){return null===t.instance&&(t.instance=new t),t.instance},t.prototype.execute=function(t,n,e,i){return new r(t,n,e)},t}();s.instance=null;let r=function(){function t(t,n,e){this._inputGeometries=t,this._xFactor=void 0!==n.xScaleFactor?n.xScaleFactor:1.15,this._yFactor=void 0!==n.yScaleFactor?n.yScaleFactor:1.15}var s=t.prototype;return s.next=function(){let t=this._inputGeometries.next();for(;t;){if(1===this._xFactor&&1===this._yFactor)return t;const s=e.create();i.getBoundsXY(s,t);const r=(s[2]+s[0])/2,c=(s[3]+s[1])/2;if(o.isExtent(t)){const n={rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]};return this._scaleMultipath(n.rings,r,c),n}if(o.isPolygon(t)){const e=n.clone(t);return this._scaleMultipath(e.rings,r,c),e}if(o.isPolyline(t)){const e=n.clone(t);return this._scaleMultipath(e.paths,r,c),e}if(o.isMultipoint(t)){const e=n.clone(t);return this._scalePath(e.points,r,c),e}if(o.isPoint(t))return t;t=this._inputGeometries.next()}return null},s._scaleMultipath=function(t,n,e){if(t)for(const i of t)this._scalePath(i,n,e)},s._scalePath=function(t,n,e){if(t)for(const i of t){const t=(i[0]-n)*this._xFactor,o=(i[1]-e)*this._yFactor;i[0]=n+t,i[1]=e+o}},t}();t.EffectScale=s,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
