/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{load as e,isLoaded as o,execute as t,executeMany as r}from"../gx/operatorProject.js";import{applyZConversionAfterProjection as n}from"../support/projectionZScaling.js";import{isMesh as s}from"../../support/jsonTypeUtils.js";let a,i,p,c,f,m;function l(){return!!a&&o()}async function u(){if(!l()){const[o,t]=await Promise.all([import("../support/jsonConverter.js"),import("../support/projectionTransformation.js"),e()]);a=o.fromGeometries,i=o.fromGeometry,p=o.fromSpatialReference,c=o.toGeometry,f=o.getSpatialReference,m=t.createProjectionTransformation}}function j(e,o,r){const a=i(e),f=p(o),l=m(a.getSpatialReference(),f,r),u=c(t(a.getGeometry(),l),f);return!r?.zConversionDisabled&&u&&!s(u)&&e.spatialReference&&n([u],e.spatialReference,o),u}function y(e,o,t){const[s,i]=a(e),l=p(o),u=m(i,l,t),j=r(s,u).map(e=>c(e,l));if(!t?.zConversionDisabled&&j){const t=f(e);t&&n(j,t,o)}return j}export{j as execute,y as executeMany,l as isLoaded,u as load};
