chunk-675SZOHX.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import {
  2. m,
  3. m2,
  4. v2 as v
  5. } from "./chunk-OWVBLVP3.js";
  6. import {
  7. M2 as M,
  8. j2 as j
  9. } from "./chunk-ECW2QABR.js";
  10. // node_modules/@arcgis/core/geometry/geometryAdapters/hydrated.js
  11. var r = { convertToGEGeometry: s, exportPoint: a, exportPolygon: c, exportPolyline: h, exportMultipoint: m3, exportExtent: x };
  12. function s(e, n) {
  13. if (n == null)
  14. return null;
  15. let t = "cache" in n ? n.cache._geVersion : void 0;
  16. return t == null && (t = e.convertJSONToGeometry(n), "cache" in n && (n.cache._geVersion = t)), t;
  17. }
  18. function a(e, n, o) {
  19. const i = e.hasZ(n), r2 = e.hasM(n), s2 = new j({ x: e.getPointX(n), y: e.getPointY(n), spatialReference: o });
  20. return i && (s2.z = e.getPointZ(n)), r2 && (s2.m = e.getPointM(n)), s2.cache._geVersion = n, s2;
  21. }
  22. function c(e, n, t) {
  23. const i = new v({ rings: e.exportPaths(n), hasZ: e.hasZ(n), hasM: e.hasM(n), spatialReference: t });
  24. return i.cache._geVersion = n, i;
  25. }
  26. function h(e, n, t) {
  27. const o = new m2({ paths: e.exportPaths(n), hasZ: e.hasZ(n), hasM: e.hasM(n), spatialReference: t });
  28. return o.cache._geVersion = n, o;
  29. }
  30. function m3(e, t, o) {
  31. const i = new m({ hasZ: e.hasZ(t), hasM: e.hasM(t), points: e.exportPoints(t), spatialReference: o });
  32. return i.cache._geVersion = t, i;
  33. }
  34. function x(n, t, o) {
  35. const i = n.hasZ(t), r2 = n.hasM(t), s2 = new M({ xmin: n.getXMin(t), ymin: n.getYMin(t), xmax: n.getXMax(t), ymax: n.getYMax(t), spatialReference: o });
  36. if (i) {
  37. const e = n.getZExtent(t);
  38. s2.zmin = e.vmin, s2.zmax = e.vmax;
  39. }
  40. if (r2) {
  41. const e = n.getMExtent(t);
  42. s2.mmin = e.vmin, s2.mmax = e.vmax;
  43. }
  44. return s2.cache._geVersion = t, s2;
  45. }
  46. export {
  47. r
  48. };
  49. //# sourceMappingURL=chunk-675SZOHX.js.map