/*
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/maybe","../../../core/unitUtils","../../../geometry/support/spatialReferenceUtils"],(function(e,t,n,i){"use strict";function s(e,t,n){if(null==e.hasM||e.hasZ)for(const i of t)for(const e of i)e.length>2&&(e[2]*=n)}function o(e,t,i){if(!e&&!t||!i)return;const s=n.getMetersPerVerticalUnitForSR(i);r(e,i,s),r(t,i,s)}function r(e,t,n){if(e)for(const i of e)f(i.geometry,t,n)}function f(e,o,r){if(t.isNone(e)||!e.spatialReference||i.equals(e.spatialReference,o))return;const f=n.getMetersPerVerticalUnitForSR(e.spatialReference)/r;if(1!==f)if("x"in e)null!=e.z&&(e.z*=f);else if("rings"in e)s(e,e.rings,f);else if("paths"in e)s(e,e.paths,f);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=f)}e.unapplyEditsZUnitScaling=o,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
