/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import"tslib";import{I as e,J as t,K as n,b as s,a as r,c as a,L as i,m as o}from"../../../chunks/SpatialReference.js";import"../../../chunks/Point2D.js";import"../../../chunks/Envelope.js";import"../../../chunks/Geometry.js";import{Envelope2D as c}from"../../../chunks/Envelope2D.js";function p(c,p,m){let u,l;if(m?.geographicTransformation){if(m.geographicTransformation.steps?.length){const s=new e;s.setInputSpatialReference(c),s.setOutputSpatialReference(p);for(const e of m.geographicTransformation.steps){let r;r=e.wkid?t(e.wkid,e.isInverse):n(e.wkt,e.isInverse),s.add(r)}u=s.create()}else u=i();if(m.extendedParams){l=o();const{densificationStep:e}=m.extendedParams;null!=e&&(l.densificationStep=e)}}else if(m?.areaOfInterestExtent)return s(c,p,f(m.areaOfInterestExtent));return u?r(c,p,u,l):a(c,p)}function f(e){return c.construct(e.xmin,e.ymin,e.xmax,e.ymax)}export{p as createProjectionTransformation};
