chunk-NFN2M2QU.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. import {
  2. f as f2,
  3. g
  4. } from "./chunk-3ZJXLJLL.js";
  5. import {
  6. $,
  7. D,
  8. F,
  9. It,
  10. O,
  11. at,
  12. ht
  13. } from "./chunk-4VZNS7N2.js";
  14. import {
  15. An
  16. } from "./chunk-VYQHMPYW.js";
  17. import {
  18. v as v2
  19. } from "./chunk-WXUHXYJK.js";
  20. import {
  21. t as t2
  22. } from "./chunk-3IRT3YKJ.js";
  23. import {
  24. X
  25. } from "./chunk-UKEN2UNL.js";
  26. import {
  27. f,
  28. u,
  29. v,
  30. y
  31. } from "./chunk-ZHRAUKVQ.js";
  32. import {
  33. l
  34. } from "./chunk-RZK6A2GY.js";
  35. import {
  36. s
  37. } from "./chunk-HZRKBTHJ.js";
  38. import {
  39. E,
  40. c,
  41. k,
  42. o
  43. } from "./chunk-QCKFNSN2.js";
  44. import {
  45. r,
  46. t
  47. } from "./chunk-YXWMMD76.js";
  48. // node_modules/@arcgis/core/layers/graphics/data/utils.js
  49. var O2 = new s({ esriSRUnit_Meter: "meters", esriSRUnit_Kilometer: "kilometers", esriSRUnit_Foot: "feet", esriSRUnit_StatuteMile: "miles", esriSRUnit_NauticalMile: "nautical-miles", esriSRUnit_USNauticalMile: "us-nautical-miles" });
  50. var F2 = Object.freeze({});
  51. var N = new t2();
  52. var _ = new t2();
  53. var G = new t2();
  54. var P = { esriGeometryPoint: F, esriGeometryPolyline: $, esriGeometryPolygon: D, esriGeometryMultipoint: O };
  55. function b(e, i, r2, n = e.hasZ, o2 = e.hasM) {
  56. if (t(i))
  57. return null;
  58. const s2 = e.hasZ && n, a = e.hasM && o2;
  59. if (r2) {
  60. const t3 = at(G, i, e.hasZ, e.hasM, "esriGeometryPoint", r2, n, o2);
  61. return F(t3, s2, a);
  62. }
  63. return F(i, s2, a);
  64. }
  65. function v3(e, r2, n, o2, s2, a, l2 = r2, m = n) {
  66. var _a, _b, _c, _d, _e, _f;
  67. const f3 = r2 && l2, u2 = n && m, c2 = r(o2) ? "coords" in o2 ? o2 : o2.geometry : null;
  68. if (t(c2))
  69. return null;
  70. if (s2) {
  71. let t3 = ht(_, c2, r2, n, e, s2, l2, m);
  72. return a && (t3 = at(G, t3, f3, u2, e, a)), (_b = (_a = P[e]) == null ? void 0 : _a.call(P, t3, f3, u2)) != null ? _b : null;
  73. }
  74. if (a) {
  75. const t3 = at(G, c2, r2, n, e, a, l2, m);
  76. return (_d = (_c = P[e]) == null ? void 0 : _c.call(P, t3, f3, u2)) != null ? _d : null;
  77. }
  78. return It(N, c2, r2, n, l2, m), (_f = (_e = P[e]) == null ? void 0 : _e.call(P, N, f3, u2)) != null ? _f : null;
  79. }
  80. async function z(e, t3, i) {
  81. const { outFields: r2, orderByFields: n, groupByFieldsForStatistics: o2, outStatistics: s2 } = e;
  82. if (r2)
  83. for (let a = 0; a < r2.length; a++)
  84. r2[a] = r2[a].trim();
  85. if (n)
  86. for (let a = 0; a < n.length; a++)
  87. n[a] = n[a].trim();
  88. if (o2)
  89. for (let a = 0; a < o2.length; a++)
  90. o2[a] = o2[a].trim();
  91. if (s2)
  92. for (let a = 0; a < s2.length; a++)
  93. s2[a].onStatisticField && (s2[a].onStatisticField = s2[a].onStatisticField.trim());
  94. return e.geometry && !e.outSR && (e.outSR = e.geometry.spatialReference), J(e, t3, i);
  95. }
  96. async function J(e, i, r2) {
  97. var _a;
  98. if (!e)
  99. return null;
  100. let { where: n } = e;
  101. if (e.where = n = n && n.trim(), (!n || /^1 *= *1$/.test(n) || i && i === n) && (e.where = null), !e.geometry)
  102. return e;
  103. let a = await Z(e);
  104. if (e.distance = 0, e.units = null, "esriSpatialRelEnvelopeIntersects" === e.spatialRel) {
  105. const { spatialReference: t3 } = e.geometry;
  106. a = l(a), a.spatialReference = t3;
  107. }
  108. if (a) {
  109. await f2(a.spatialReference, r2), a = B(a, r2);
  110. const i2 = (await v2(v(a)))[0];
  111. if (t(i2))
  112. throw F2;
  113. const n2 = "quantizationParameters" in e && ((_a = e.quantizationParameters) == null ? void 0 : _a.tolerance) || "maxAllowableOffset" in e && e.maxAllowableOffset || 0, o2 = n2 && A(a, r2) ? { densificationStep: 8 * n2 } : void 0, l2 = i2.toJSON(), m = await g(l2, l2.spatialReference, r2, o2);
  114. if (!m)
  115. throw F2;
  116. m.spatialReference = r2, e.geometry = m;
  117. }
  118. return e;
  119. }
  120. function A(e, t3) {
  121. if (!e)
  122. return false;
  123. const i = e.spatialReference;
  124. return (u(e) || y(e) || f(e)) && !E(i, t3) && !An(i, t3);
  125. }
  126. function B(e, t3) {
  127. const i = e.spatialReference;
  128. return A(e, t3) && u(e) ? { spatialReference: i, rings: [[[e.xmin, e.ymin], [e.xmin, e.ymax], [e.xmax, e.ymax], [e.xmax, e.ymin], [e.xmin, e.ymin]]] } : e;
  129. }
  130. async function Z(e) {
  131. const { distance: t3, units: i } = e, n = e.geometry;
  132. if (null == t3 || "vertexAttributes" in n)
  133. return n;
  134. const o2 = n.spatialReference, s2 = i ? O2.fromJSON(i) : X(o2), a = o2 && (o(o2) || k(o2)) ? n : await f2(o2, c).then(() => g(n, c));
  135. return (await q())(a.spatialReference, a, t3, s2);
  136. }
  137. async function q() {
  138. return (await import("./geometryEngineJSON-CAFXKE3U.js")).geodesicBuffer;
  139. }
  140. function E2(e) {
  141. return e && k2 in e ? JSON.parse(JSON.stringify(e, C)) : e;
  142. }
  143. var k2 = "_geVersion";
  144. var C = (e, t3) => e !== k2 ? t3 : void 0;
  145. export {
  146. F2 as F,
  147. b,
  148. v3 as v,
  149. z,
  150. J,
  151. E2 as E
  152. };
  153. //# sourceMappingURL=chunk-NFN2M2QU.js.map