chunk-BXBBOCLV.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. import {
  2. e2 as e5,
  3. o as o3,
  4. r as r4,
  5. t as t3
  6. } from "./chunk-IRQMHCT3.js";
  7. import {
  8. v,
  9. x,
  10. y as y2
  11. } from "./chunk-W3XAGTM6.js";
  12. import {
  13. e as e3,
  14. o
  15. } from "./chunk-44FMXGSC.js";
  16. import {
  17. e as e4
  18. } from "./chunk-XFDO4CMR.js";
  19. import {
  20. e as e2
  21. } from "./chunk-GHN7C53L.js";
  22. import {
  23. T,
  24. i as i2
  25. } from "./chunk-HIELTLML.js";
  26. import {
  27. B as B2,
  28. a,
  29. g,
  30. o as o2
  31. } from "./chunk-O3JQY77G.js";
  32. import {
  33. Zn,
  34. xn
  35. } from "./chunk-P24XEEHY.js";
  36. import {
  37. B,
  38. C,
  39. P as P2,
  40. h,
  41. i,
  42. u as u2
  43. } from "./chunk-VGWC3IKZ.js";
  44. import {
  45. $,
  46. E2 as E,
  47. L,
  48. O
  49. } from "./chunk-3RSFVUKZ.js";
  50. import {
  51. b,
  52. m
  53. } from "./chunk-RYY6632W.js";
  54. import {
  55. F,
  56. O as O2,
  57. S,
  58. r as r3,
  59. z
  60. } from "./chunk-DW42UVIT.js";
  61. import {
  62. n as n2,
  63. r as r2,
  64. t as t2
  65. } from "./chunk-TJNOJH33.js";
  66. import {
  67. c,
  68. w
  69. } from "./chunk-6T6G6LCQ.js";
  70. import {
  71. P,
  72. s as s2,
  73. u
  74. } from "./chunk-PQFTYGF5.js";
  75. import {
  76. e,
  77. l3 as l,
  78. n5 as n,
  79. y3 as y
  80. } from "./chunk-2Z2TG5CU.js";
  81. import {
  82. s2 as s
  83. } from "./chunk-E5O6P5I2.js";
  84. import {
  85. r,
  86. t
  87. } from "./chunk-YXWMMD76.js";
  88. // node_modules/@arcgis/core/geometry/support/axisAngleDegrees.js
  89. function a2(n3 = b2) {
  90. return [n3[0], n3[1], n3[2], n3[3]];
  91. }
  92. function k2(n3, r6, t4 = a2()) {
  93. return r3(g2(t4), n3), t4[3] = r6, t4;
  94. }
  95. function v2(r6, c2, f = a2()) {
  96. return v(d, g2(r6), x2(r6)), v(w2, g2(c2), x2(c2)), y2(d, w2, d), U(f, b(x(g2(f), d)));
  97. }
  98. function g2(n3) {
  99. return n3;
  100. }
  101. function x2(n3) {
  102. return m(n3[3]);
  103. }
  104. function U(n3, r6) {
  105. return n3[3] = r6, n3;
  106. }
  107. var b2 = [0, 0, 1, 0];
  108. var d = e4();
  109. var w2 = e4();
  110. var y3 = a2();
  111. // node_modules/@arcgis/core/geometry/support/MeshTransform.js
  112. var T2;
  113. var q = T2 = class extends l {
  114. constructor(r6) {
  115. super(r6), this.origin = n2(), this.translation = n2(), this.rotation = a2(), this.scale = r2(1, 1, 1), this.geographic = true;
  116. }
  117. get localMatrix() {
  118. const r6 = e3();
  119. return v(B3, g2(this.rotation), x2(this.rotation)), P2(r6, B3, this.translation, this.scale), r6;
  120. }
  121. get localMatrixInverse() {
  122. return h(e3(), this.localMatrix);
  123. }
  124. applyLocal(r6, o4) {
  125. return O2(o4, r6, this.localMatrix);
  126. }
  127. applyLocalInverse(r6, o4) {
  128. return O2(o4, r6, this.localMatrixInverse);
  129. }
  130. project(r6, o4) {
  131. const t4 = new Float64Array(r6.length), s3 = T.fromTypedArray(t4), e6 = T.fromTypedArray(r6);
  132. if (this.geographic) {
  133. const r7 = O(o4), i4 = e3();
  134. return Zn(o4, this.origin, i4, r7), u2(i4, i4, this.localMatrix), t3(s3, e6, i4), xn(t4, r7, 0, t4, o4, 0, t4.length / 3), t4;
  135. }
  136. const { localMatrix: i3, origin: a3 } = this;
  137. C(i3, o) ? e5(s3, e6) : t3(s3, e6, i3);
  138. for (let n3 = 0; n3 < t4.length; n3 += 3)
  139. t4[n3 + 0] += a3[0], t4[n3 + 1] += a3[1], t4[n3 + 2] += a3[2];
  140. return t4;
  141. }
  142. getOriginPoint(r6) {
  143. const [o4, t4, s3] = this.origin;
  144. return new w({ x: o4, y: t4, z: s3, spatialReference: r6 });
  145. }
  146. equals(r6) {
  147. return r(r6) && this.geographic === r6.geographic && F(this.origin, r6.origin) && B(this.localMatrix, r6.localMatrix);
  148. }
  149. clone() {
  150. const r6 = { origin: t2(this.origin), translation: t2(this.translation), rotation: a2(this.rotation), scale: t2(this.scale), geographic: this.geographic };
  151. return new T2(r6);
  152. }
  153. };
  154. e([y({ type: [Number], nonNullable: true, json: { write: true } })], q.prototype, "origin", void 0), e([y({ type: [Number], nonNullable: true, json: { write: true } })], q.prototype, "translation", void 0), e([y({ type: [Number], nonNullable: true, json: { write: true } })], q.prototype, "rotation", void 0), e([y({ type: [Number], nonNullable: true, json: { write: true } })], q.prototype, "scale", void 0), e([y({ type: Boolean, nonNullable: true, json: { write: true } })], q.prototype, "geographic", void 0), e([y()], q.prototype, "localMatrix", null), e([y()], q.prototype, "localMatrixInverse", null), q = T2 = e([n("esri.geometry.support.MeshTransform")], q);
  155. var B3 = e4();
  156. var L2 = q;
  157. // node_modules/@arcgis/core/geometry/support/meshUtils/geographicUtils.js
  158. function r5(r6, e6) {
  159. var _a;
  160. return r6.isGeographic || r6.isWebMercator && ((_a = e6 == null ? void 0 : e6.geographic) != null ? _a : true);
  161. }
  162. // node_modules/@arcgis/core/geometry/support/meshUtils/projection.js
  163. var g3 = s.getLogger("esri.geometry.support.meshUtils.normalProjection");
  164. function j(r6, e6, o4, t4, n3) {
  165. return B4(t4) ? (b3(Y.TO_PCPF, i2.fromTypedArray(r6), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3)), n3) : (g3.error("Cannot convert spatial reference to PCPF"), n3);
  166. }
  167. function h2(r6, e6, o4, t4, n3) {
  168. return B4(t4) ? (b3(Y.FROM_PCPF, i2.fromTypedArray(r6), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3)), n3) : (g3.error("Cannot convert to spatial reference from PCPF"), n3);
  169. }
  170. function M(r6, e6, o4) {
  171. return xn(r6, e6, 0, o4, O(e6), 0, r6.length / 3), o4;
  172. }
  173. function O3(r6, e6, o4) {
  174. return xn(r6, O(o4), 0, e6, o4, 0, r6.length / 3), e6;
  175. }
  176. function R(r6, o4, t4) {
  177. if (t(r6))
  178. return o4;
  179. const n3 = T.fromTypedArray(r6), f = T.fromTypedArray(o4);
  180. return t3(f, n3, t4), o4;
  181. }
  182. function v3(r6, n3, f) {
  183. if (t(r6))
  184. return n3;
  185. g(x3, f);
  186. const a3 = i2.fromTypedArray(r6), c2 = i2.fromTypedArray(n3);
  187. return r4(c2, a3, x3), B2(x3) || o3(c2, c2), n3;
  188. }
  189. function V(r6, n3, f) {
  190. if (t(r6))
  191. return n3;
  192. g(x3, f);
  193. const a3 = i2.fromTypedArray(r6, 4 * Float32Array.BYTES_PER_ELEMENT), c2 = i2.fromTypedArray(n3, 4 * Float32Array.BYTES_PER_ELEMENT);
  194. if (r4(c2, a3, x3), B2(x3) || o3(c2, c2), r6 !== n3)
  195. for (let e6 = 3; e6 < r6.length; e6 += 4)
  196. n3[e6] = r6[e6];
  197. return n3;
  198. }
  199. function k3(r6, e6, o4, t4, n3) {
  200. if (!B4(t4))
  201. return g3.error("Cannot convert spatial reference to PCPF"), n3;
  202. b3(Y.TO_PCPF, i2.fromTypedArray(r6, 4 * Float32Array.BYTES_PER_ELEMENT), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3, 4 * Float32Array.BYTES_PER_ELEMENT));
  203. for (let f = 3; f < r6.length; f += 4)
  204. n3[f] = r6[f];
  205. return n3;
  206. }
  207. function L3(r6, e6, o4, t4, n3) {
  208. if (!B4(t4))
  209. return g3.error("Cannot convert to spatial reference from PCPF"), n3;
  210. b3(Y.FROM_PCPF, i2.fromTypedArray(r6, 16), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3, 16));
  211. for (let f = 3; f < r6.length; f += 4)
  212. n3[f] = r6[f];
  213. return n3;
  214. }
  215. function b3(r6, e6, o4, t4, a3, c2) {
  216. if (!e6)
  217. return;
  218. const i3 = o4.count, y4 = O(a3);
  219. if (S2(a3))
  220. for (let s3 = 0; s3 < i3; s3++)
  221. t4.getVec(s3, U2), e6.getVec(s3, w3), Zn(y4, U2, W, y4), a(x3, W), r6 === Y.FROM_PCPF && o2(x3, x3), S(w3, w3, x3), c2.setVec(s3, w3);
  222. else
  223. for (let u3 = 0; u3 < i3; u3++) {
  224. t4.getVec(u3, U2), e6.getVec(u3, w3), Zn(y4, U2, W, y4), a(x3, W);
  225. const a4 = c(o4.get(u3, 1));
  226. let i4 = Math.cos(a4);
  227. r6 === Y.TO_PCPF && (i4 = 1 / i4), x3[0] *= i4, x3[1] *= i4, x3[2] *= i4, x3[3] *= i4, x3[4] *= i4, x3[5] *= i4, r6 === Y.FROM_PCPF && o2(x3, x3), S(w3, w3, x3), z(w3, w3), c2.setVec(u3, w3);
  228. }
  229. return c2;
  230. }
  231. function B4(r6) {
  232. return S2(r6) || N(r6);
  233. }
  234. function S2(r6) {
  235. return r6.isWGS84 || u(r6) || P(r6) || s2(r6);
  236. }
  237. function N(r6) {
  238. return r6.isWebMercator;
  239. }
  240. var Y;
  241. !function(r6) {
  242. r6[r6.TO_PCPF = 0] = "TO_PCPF", r6[r6.FROM_PCPF = 1] = "FROM_PCPF";
  243. }(Y || (Y = {}));
  244. var U2 = n2();
  245. var w3 = n2();
  246. var W = e3();
  247. var x3 = e2();
  248. // node_modules/@arcgis/core/geometry/support/meshUtils/georeference.js
  249. function x4(n3, r6, t4) {
  250. return r5(r6.spatialReference, t4) ? B5(n3, r6, t4) : P3(n3, r6, t4);
  251. }
  252. function k4(t4, o4, e6) {
  253. const { position: a3, normal: i3, tangent: l2 } = t4;
  254. if (t(o4))
  255. return { position: a3, normal: i3, tangent: l2 };
  256. const s3 = o4.localMatrix;
  257. return x4({ position: R(a3, new Float64Array(a3.length), s3), normal: r(i3) ? v3(i3, new Float32Array(i3.length), s3) : null, tangent: r(l2) ? V(l2, new Float32Array(l2.length), s3) : null }, o4.getOriginPoint(e6), { geographic: o4.geographic });
  258. }
  259. function _2(n3, r6, t4) {
  260. var _a;
  261. if (t4 == null ? void 0 : t4.useTransform) {
  262. const { position: o4, normal: e6, tangent: a3 } = n3;
  263. return { vertexAttributes: { position: o4, normal: e6, tangent: a3 }, transform: new L2({ origin: [r6.x, r6.y, (_a = r6.z) != null ? _a : 0], geographic: r5(r6.spatialReference, t4) }) };
  264. }
  265. return { vertexAttributes: x4(n3, r6, t4), transform: null };
  266. }
  267. function b4(n3, r6, t4) {
  268. return r5(r6.spatialReference, t4) ? G(n3, r6, t4) : Y2(n3, r6, t4);
  269. }
  270. function M2(r6, t4, o4, e6) {
  271. if (t(t4))
  272. return b4(r6, o4, e6);
  273. const a3 = k4(r6, t4, o4.spatialReference);
  274. return o4.equals(t4.getOriginPoint(o4.spatialReference)) ? Y2(a3, o4, e6) : r5(o4.spatialReference, e6) ? G(a3, o4, e6) : Y2(a3, o4, e6);
  275. }
  276. function P3(n3, r6, t4) {
  277. const o4 = new Float64Array(n3.position.length), e6 = n3.position, a3 = r6.x, i3 = r6.y, l2 = r6.z || 0, { horizontal: s3, vertical: f } = C2(t4 ? t4.unit : null, r6.spatialReference);
  278. for (let c2 = 0; c2 < e6.length; c2 += 3)
  279. o4[c2 + 0] = e6[c2 + 0] * s3 + a3, o4[c2 + 1] = e6[c2 + 1] * s3 + i3, o4[c2 + 2] = e6[c2 + 2] * f + l2;
  280. return { position: o4, normal: n3.normal, tangent: n3.tangent };
  281. }
  282. function B5(n3, r6, t4) {
  283. const o4 = r6.spatialReference, e6 = O4(r6, t4, D), a3 = new Float64Array(n3.position.length), i3 = L4(n3.position, e6, o4, a3), l2 = g(I, e6);
  284. return { position: i3, normal: N2(i3, a3, n3.normal, l2, o4), tangent: S3(i3, a3, n3.tangent, l2, o4) };
  285. }
  286. function L4(n3, r6, t4, o4) {
  287. t3(T.fromTypedArray(o4), T.fromTypedArray(n3), r6);
  288. const e6 = new Float64Array(n3.length);
  289. return O3(o4, e6, t4);
  290. }
  291. function N2(r6, t4, o4, e6, a3) {
  292. if (t(o4))
  293. return null;
  294. const i3 = new Float32Array(o4.length);
  295. return r4(i2.fromTypedArray(i3), i2.fromTypedArray(o4), e6), h2(i3, r6, t4, a3, i3), i3;
  296. }
  297. function S3(r6, t4, o4, e6, a3) {
  298. if (t(o4))
  299. return null;
  300. const i3 = new Float32Array(o4.length);
  301. r4(i2.fromTypedArray(i3, 4 * Float32Array.BYTES_PER_ELEMENT), i2.fromTypedArray(o4, 4 * Float32Array.BYTES_PER_ELEMENT), e6);
  302. for (let n3 = 3; n3 < i3.length; n3 += 4)
  303. i3[n3] = o4[n3];
  304. return L3(i3, r6, t4, a3, i3), i3;
  305. }
  306. function Y2(n3, r6, t4) {
  307. const o4 = new Float64Array(n3.position.length), e6 = n3.position, a3 = r6.x, i3 = r6.y, l2 = r6.z || 0, { horizontal: s3, vertical: f } = C2(t4 ? t4.unit : null, r6.spatialReference);
  308. for (let c2 = 0; c2 < e6.length; c2 += 3)
  309. o4[c2 + 0] = (e6[c2 + 0] - a3) / s3, o4[c2 + 1] = (e6[c2 + 1] - i3) / s3, o4[c2 + 2] = (e6[c2 + 2] - l2) / f;
  310. return { position: o4, normal: n3.normal, tangent: n3.tangent };
  311. }
  312. function G(n3, r6, t4) {
  313. const o4 = r6.spatialReference;
  314. O4(r6, t4, D);
  315. const e6 = h(H, D), a3 = new Float64Array(n3.position.length), l2 = U3(n3.position, o4, e6, a3), s3 = g(I, e6);
  316. return { position: l2, normal: q2(n3.normal, n3.position, a3, o4, s3), tangent: V2(n3.tangent, n3.position, a3, o4, s3) };
  317. }
  318. function O4(n3, r6, t4) {
  319. Zn(n3.spatialReference, [n3.x, n3.y, n3.z || 0], t4, O(n3.spatialReference));
  320. const { horizontal: o4, vertical: e6 } = C2(r6 ? r6.unit : null, n3.spatialReference);
  321. return i(t4, t4, [o4, o4, e6]), t4;
  322. }
  323. function U3(n3, r6, t4, o4) {
  324. const e6 = M(n3, r6, o4), a3 = T.fromTypedArray(e6), i3 = new Float64Array(e6.length), l2 = T.fromTypedArray(i3);
  325. return t3(l2, a3, t4), i3;
  326. }
  327. function q2(r6, t4, o4, e6, a3) {
  328. if (t(r6))
  329. return null;
  330. const i3 = j(r6, t4, o4, e6, new Float32Array(r6.length)), l2 = i2.fromTypedArray(i3);
  331. return r4(l2, l2, a3), i3;
  332. }
  333. function V2(r6, t4, o4, e6, a3) {
  334. if (t(r6))
  335. return null;
  336. const i3 = k3(r6, t4, o4, e6, new Float32Array(r6.length)), l2 = i2.fromTypedArray(i3, 4 * Float32Array.BYTES_PER_ELEMENT);
  337. return r4(l2, l2, a3), i3;
  338. }
  339. function C2(r6, a3) {
  340. if (t(r6))
  341. return J;
  342. const i3 = a3.isGeographic ? 1 : $(a3), l2 = a3.isGeographic ? 1 : L(a3), s3 = E(1, r6, "meters");
  343. return { horizontal: s3 * i3, vertical: s3 * l2 };
  344. }
  345. var D = e3();
  346. var H = e3();
  347. var I = e2();
  348. var J = { horizontal: 1, vertical: 1 };
  349. export {
  350. a2 as a,
  351. k2 as k,
  352. v2 as v,
  353. g2 as g,
  354. x2 as x,
  355. L2 as L,
  356. r5 as r,
  357. j,
  358. h2 as h,
  359. M,
  360. O3 as O,
  361. k3 as k2,
  362. L3 as L2,
  363. x4 as x2,
  364. k4 as k3,
  365. _2 as _,
  366. b4 as b,
  367. M2
  368. };
  369. //# sourceMappingURL=chunk-BXBBOCLV.js.map