import { n as n4 } from "./chunk-44FMXGSC.js"; import { n as n5 } from "./chunk-XFDO4CMR.js"; import { n as n3 } from "./chunk-GHN7C53L.js"; import { o as o2 } from "./chunk-K7B6OWCU.js"; import { s as s3 } from "./chunk-OJ2HHY2O.js"; import { n as n2, r as r2, u as u3 } from "./chunk-C7742RNZ.js"; import { g as g2 } from "./chunk-VGWC3IKZ.js"; import { L, l } from "./chunk-RYY6632W.js"; import { O, P, _, e, g, o, p, r, s as s2, u as u2, v, x, z } from "./chunk-DW42UVIT.js"; import { a } from "./chunk-YAEIHDJH.js"; import { n, t as t3, u } from "./chunk-TJNOJH33.js"; import { t as t2 } from "./chunk-6KZ2LTDA.js"; import { s2 as s } from "./chunk-E5O6P5I2.js"; import { t } from "./chunk-YXWMMD76.js"; // node_modules/@arcgis/core/geometry/support/Axis.js var n6; !function(n7) { n7[n7.X = 0] = "X", n7[n7.Y = 1] = "Y", n7[n7.Z = 2] = "Z"; }(n6 || (n6 = {})); // node_modules/@arcgis/core/core/ObjectStack.js var s4 = class { constructor(t5) { this._allocator = t5, this._items = [], this._itemsPtr = 0, this._grow(); } get() { return 0 === this._itemsPtr && t2(() => this._reset()), this._itemsPtr === this._items.length && this._grow(), this._items[this._itemsPtr++]; } _reset() { const t5 = Math.min(3 * Math.max(8, this._itemsPtr), this._itemsPtr + 3 * i); this._items.length = Math.min(t5, this._items.length), this._itemsPtr = 0; } _grow() { for (let t5 = 0; t5 < Math.max(8, Math.min(this._items.length, i)); t5++) this._items.push(this._allocator()); } }; var i = 1024; // node_modules/@arcgis/core/core/VectorStack.js var a2 = class { constructor(t5, e2, s5) { this._itemByteSize = t5, this._itemCreate = e2, this._buffers = new Array(), this._items = new Array(), this._itemsPtr = 0, this._itemsPerBuffer = Math.ceil(s5 / this._itemByteSize); } get() { 0 === this._itemsPtr && t2(() => this._reset()); const t5 = Math.floor(this._itemsPtr / this._itemsPerBuffer); for (; this._buffers.length <= t5; ) { const t6 = new ArrayBuffer(this._itemsPerBuffer * this._itemByteSize); for (let e2 = 0; e2 < this._itemsPerBuffer; ++e2) this._items.push(this._itemCreate(t6, e2 * this._itemByteSize)); this._buffers.push(t6); } return this._items[this._itemsPtr++]; } _reset() { const t5 = 2 * (Math.floor(this._itemsPtr / this._itemsPerBuffer) + 1); for (; this._buffers.length > t5; ) this._buffers.pop(), this._items.length = this._buffers.length * this._itemsPerBuffer; this._itemsPtr = 0; } static createVec2f64(t5 = c) { return new a2(16, o2, t5); } static createVec3f64(t5 = c) { return new a2(24, u, t5); } static createVec4f64(t5 = c) { return new a2(32, u3, t5); } static createMat3f64(t5 = c) { return new a2(72, n3, t5); } static createMat4f64(t5 = c) { return new a2(128, n4, t5); } static createQuatf64(t5 = c) { return new a2(32, n5, t5); } get test() { return { size: this._buffers.length * this._itemsPerBuffer * this._itemByteSize }; } }; var c = 4 * s3.KILOBYTES; // node_modules/@arcgis/core/geometry/support/vectorStacks.js var t4 = a2.createVec2f64(); var c2 = a2.createVec3f64(); var r3 = a2.createVec4f64(); var a3 = a2.createMat3f64(); var f = a2.createMat4f64(); var o3 = a2.createQuatf64(); // node_modules/@arcgis/core/geometry/support/ray.js function d(i3) { return i3 ? m(t3(i3.origin), t3(i3.direction)) : m(n(), n()); } function m(i3, n7) { return { origin: i3, direction: n7 }; } function p2(i3, n7) { const r4 = S.get(); return r4.origin = i3, r4.direction = n7, r4; } function q(i3, n7, r4) { const o4 = P(i3.direction, e(r4, n7, i3.origin)); return u2(r4, i3.origin, g(r4, i3.direction, o4)), r4; } var S = new s4(() => d()); // node_modules/@arcgis/core/geometry/support/vector.js function a4(o4, s5) { const c3 = P(o4, s5) / (s2(o4) * s2(s5)); return -l(c3); } var m2 = n(); var h = n(); // node_modules/@arcgis/core/chunks/sphere.js function R() { return n2(); } function _2(t5, r4 = R()) { return a(r4, t5); } function q2(t5, r4) { return r2(t5[0], t5[1], t5[2], r4); } function w(t5) { return t5; } function C(t5) { t5[0] = t5[1] = t5[2] = t5[3] = 0; } function O2(t5, r4) { return t5[0] = t5[1] = t5[2] = 0, t5[3] = r4, t5; } function T(t5) { return t5[3]; } function k(t5) { return t5; } function E(t5, r4, n7, e2) { return r2(t5, r4, n7, e2); } function L2(t5, r4, n7) { return t5 !== n7 && r(n7, t5), n7[3] = t5[3] + r4, n7; } function Z(r4, n7, e2) { return s.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"), r4 === e2 ? e2 : _2(r4, e2); } function z2(t5, r4, n7) { if (t(r4)) return false; const { origin: o4, direction: s5 } = r4, i3 = U; i3[0] = o4[0] - t5[0], i3[1] = o4[1] - t5[1], i3[2] = o4[2] - t5[2]; const a5 = s5[0] * s5[0] + s5[1] * s5[1] + s5[2] * s5[2]; if (0 === a5) return false; const c3 = 2 * (s5[0] * i3[0] + s5[1] * i3[1] + s5[2] * i3[2]), u4 = c3 * c3 - 4 * a5 * (i3[0] * i3[0] + i3[1] * i3[1] + i3[2] * i3[2] - t5[3] * t5[3]); if (u4 < 0) return false; const f2 = Math.sqrt(u4); let m3 = (-c3 - f2) / (2 * a5); const p3 = (-c3 + f2) / (2 * a5); return (m3 < 0 || p3 < m3 && p3 > 0) && (m3 = p3), !(m3 < 0) && (n7 && (n7[0] = o4[0] + s5[0] * m3, n7[1] = o4[1] + s5[1] * m3, n7[2] = o4[2] + s5[2] * m3), true); } var U = n(); function V(t5, r4) { return z2(t5, r4, null); } function X(t5, r4, n7) { if (z2(t5, r4, n7)) return n7; const e2 = Y(t5, r4, c2.get()); return u2(n7, r4.origin, g(c2.get(), r4.direction, x(r4.origin, e2) / s2(r4.direction))), n7; } function Y(t5, r4, n7) { const e2 = c2.get(), s5 = f.get(); _(e2, r4.origin, r4.direction); const i3 = T(t5); _(n7, e2, r4.origin), g(n7, n7, 1 / s2(n7) * i3); const c3 = G(t5, r4.origin), p3 = a4(r4.origin, n7); return g2(s5, p3 + c3, e2), O(n7, n7, s5), n7; } function B(t5, r4, n7) { return z2(t5, r4, n7) ? n7 : (q(r4, k(t5), n7), D(t5, n7, n7)); } function D(t5, r4, n7) { const e2 = e(c2.get(), r4, k(t5)), o4 = g(c2.get(), e2, t5[3] / s2(e2)); return u2(n7, o4, k(t5)); } function F(t5, r4) { const n7 = e(c2.get(), r4, k(t5)), e2 = v(n7), o4 = t5[3] * t5[3]; return Math.sqrt(Math.abs(e2 - o4)); } function G(t5, n7) { const e2 = e(c2.get(), n7, k(t5)), o4 = s2(e2), s5 = T(t5), i3 = s5 + Math.abs(s5 - o4); return l(s5 / i3); } var H = n(); function I(t5, r4, e2, o4) { const s5 = e(H, r4, k(t5)); switch (e2) { case n6.X: { const t6 = L(s5, H)[2]; return o(o4, -Math.sin(t6), Math.cos(t6), 0); } case n6.Y: { const t6 = L(s5, H), r5 = t6[1], e3 = t6[2], i3 = Math.sin(r5); return o(o4, -i3 * Math.cos(e3), -i3 * Math.sin(e3), Math.cos(r5)); } case n6.Z: return z(o4, s5); default: return; } } function J(t5, r4) { const n7 = e(Q, r4, k(t5)); return s2(n7) - t5[3]; } function K(t5, r4, n7, e2) { const o4 = J(t5, r4), s5 = I(t5, r4, n6.Z, Q), c3 = g(Q, s5, n7 - o4); return u2(e2, r4, c3); } function N(t5, r4) { const n7 = p(k(t5), r4), e2 = T(t5); return n7 <= e2 * e2; } var Q = n(); var W = R(); var $ = Object.freeze(Object.defineProperty({ __proto__: null, create: R, copy: _2, fromCenterAndRadius: q2, wrap: w, clear: C, fromRadius: O2, getRadius: T, getCenter: k, fromValues: E, elevate: L2, setExtent: Z, intersectRay: z2, intersectsRay: V, intersectRayClosestSilhouette: X, closestPointOnSilhouette: Y, closestPoint: B, projectPoint: D, distanceToSilhouette: F, angleToSilhouette: G, axisAt: I, altitudeAt: J, setAltitudeAt: K, containsPoint: N, tmpSphere: W }, Symbol.toStringTag, { value: "Module" })); export { s4 as s, c2 as c, d, p2 as p, R, _2 as _, T, k, V, N }; //# sourceMappingURL=chunk-ZNJHHCMJ.js.map