import { s as s2 } from "./chunk-GCDJLKH4.js"; import { E, G, R, k, k2, r as r3 } from "./chunk-MRJEICT6.js"; import { d, e, l3 as l, n2 as n, y } from "./chunk-Y3WMVFTW.js"; import { a } from "./chunk-IHXECKQQ.js"; import { s } from "./chunk-EMJ4ZSM2.js"; import { m, r as r2 } from "./chunk-IKP3YN53.js"; import { r, t } from "./chunk-GZT4BVFP.js"; // node_modules/@arcgis/core/core/accessorSupport/decorators/reader.js function o(o5, e4, t5) { let a4, c5; return e4 === void 0 || Array.isArray(e4) ? (c5 = o5, t5 = e4, a4 = [void 0]) : (c5 = e4, a4 = Array.isArray(o5) ? o5 : [o5]), (o6, e5) => { const d4 = o6.constructor.prototype; a4.forEach((a5) => { const s6 = y(o6, a5, c5); s6.read && typeof s6.read == "object" || (s6.read = {}), s6.read.reader = d4[e5], t5 && (s6.read.source = (s6.read.source || []).concat(t5)); }); }; } // node_modules/@arcgis/core/geometry/Geometry.js var c = class extends l { constructor(...e4) { super(...e4), this.type = null, this.hasM = false, this.hasZ = false, this.spatialReference = k2.WGS84; } get cache() { return this.commitProperty("spatialReference"), {}; } get extent() { return null; } readSpatialReference(e4, r5) { if (e4 instanceof k2) return e4; if (e4 != null) { const t5 = new k2(); return t5.read(e4, r5), t5; } return e4; } clone() { return console.warn(".clone() is not implemented for " + this.declaredClass), null; } clearCache() { this.notifyChange("cache"); } getCacheValue(e4) { return this.cache[e4]; } setCacheValue(e4, r5) { this.cache[e4] = r5; } }; e([d()], c.prototype, "type", void 0), e([d({ readOnly: true })], c.prototype, "cache", null), e([d({ readOnly: true })], c.prototype, "extent", null), e([d({ type: Boolean, json: { write: { overridePolicy: (e4) => ({ enabled: e4 }) } } })], c.prototype, "hasM", void 0), e([d({ type: Boolean, json: { write: { overridePolicy: (e4) => ({ enabled: e4 }) } } })], c.prototype, "hasZ", void 0), e([d({ type: k2, json: { write: true } })], c.prototype, "spatialReference", void 0), e([o("spatialReference")], c.prototype, "readSpatialReference", null), c = e([n("esri.geometry.Geometry")], c); var p = c; // node_modules/@arcgis/core/geometry/support/Ellipsoid.js var i = class { constructor(i4, s6, t5, e4) { this.semiMajorAxis = i4, this.flattening = s6, this.outerAtmosphereRimWidth = t5; const h3 = 1 - this.flattening; this.semiMinorAxis = this.semiMajorAxis * h3, this.halfSemiMajorAxis = this.semiMajorAxis / 2, this.halfCircumference = Math.PI * this.semiMajorAxis, this.metersPerDegree = this.halfCircumference / 180, this.inverseFlattening = 1 / (1 - this.flattening) - 1, this.eccentricitySquared = e4 || 2 * this.flattening - this.flattening * this.flattening, this.meanRadiusSemiAxes = (2 * this.semiMajorAxis + this.semiMinorAxis) / 3; } get radius() { return this.semiMajorAxis; } }; var s3 = new i(6378137, 1 / 298.257223563, 3e5, 0.006694379990137799); var t2 = new i(3396190, 1 / 169.8944472236118, 23e4); var e2 = new i(1737400, 0, 0); // node_modules/@arcgis/core/geometry/support/webMercatorUtils.js var o2 = 57.29577951308232; var u = 0.017453292519943; function l2(n3) { return n3 * o2; } function p2(n3) { return n3 * u; } function c2(n3) { return Math.PI / 2 - 2 * Math.atan(Math.exp(-n3 / s3.radius)); } function h(n3) { return n3.wkid != null || n3.wkt != null; } var m2 = [0, 0]; function x(n3, t5, e4, i4, r5) { const s6 = n3, a4 = r5; if (a4.spatialReference = e4, "x" in s6 && "x" in a4) [a4.x, a4.y] = t5(s6.x, s6.y, m2, i4); else if ("xmin" in s6 && "xmin" in a4) [a4.xmin, a4.ymin] = t5(s6.xmin, s6.ymin, m2, i4), [a4.xmax, a4.ymax] = t5(s6.xmax, s6.ymax, m2, i4); else if ("paths" in s6 && "paths" in a4 || "rings" in s6 && "rings" in a4) { const n4 = "paths" in s6 ? s6.paths : s6.rings, e5 = []; let r6; for (let s7 = 0; s7 < n4.length; s7++) { const a5 = n4[s7]; r6 = [], e5.push(r6); for (let n5 = 0; n5 < a5.length; n5++) r6.push(t5(a5[n5][0], a5[n5][1], [0, 0], i4)), a5[n5].length > 2 && r6[n5].push(a5[n5][2]), a5[n5].length > 3 && r6[n5].push(a5[n5][3]); } "paths" in a4 ? a4.paths = e5 : a4.rings = e5; } else if ("points" in s6 && "points" in a4) { const n4 = s6.points, e5 = []; for (let r6 = 0; r6 < n4.length; r6++) e5[r6] = t5(n4[r6][0], n4[r6][1], [0, 0], i4), n4[r6].length > 2 && e5[r6].push(n4[r6][2]), n4[r6].length > 3 && e5[r6].push(n4[r6][3]); a4.points = e5; } return r5; } function g(n3, t5) { const e4 = n3 && (h(n3) ? n3 : n3.spatialReference), i4 = t5 && (h(t5) ? t5 : t5.spatialReference); return !(n3 && "type" in n3 && n3.type === "mesh" || t5 && "type" in t5 && t5.type === "mesh" || !e4 || !i4) && (!!E(i4, e4) || (k(i4) && G(e4) || k(e4) && G(i4))); } function M(i4, o5) { if (t(i4)) return null; const u5 = i4.spatialReference, l4 = o5 && (h(o5) ? o5 : o5.spatialReference); return g(u5, l4) ? E(u5, l4) ? m(i4) : k(l4) ? x(i4, y2, k2.WebMercator, false, m(i4)) : G(l4) ? x(i4, d2, k2.WGS84, false, m(i4)) : null : null; } function y2(n3, t5, e4 = [0, 0]) { t5 > 89.99999 ? t5 = 89.99999 : t5 < -89.99999 && (t5 = -89.99999); const r5 = p2(t5); return e4[0] = p2(n3) * s3.radius, e4[1] = s3.halfSemiMajorAxis * Math.log((1 + Math.sin(r5)) / (1 - Math.sin(r5))), e4; } function d2(n3, t5, e4 = [0, 0], r5 = false) { const s6 = l2(n3 / s3.radius); return e4[0] = r5 ? s6 : s6 - 360 * Math.floor((s6 + 180) / 360), e4[1] = l2(Math.PI / 2 - 2 * Math.atan(Math.exp(-t5 / s3.radius))), e4; } function R2(t5, i4 = false, r5 = m(t5)) { return x(t5, y2, k2.WebMercator, i4, r5); } function j(t5, i4 = false, r5 = m(t5)) { return x(t5, d2, k2.WGS84, i4, r5); } // node_modules/@arcgis/core/geometry/support/offset.js function n2(n3, r5, t5, u5) { return n3.x = n3.x + r5, n3.y = n3.y + t5, u5 != null && (n3.z = (n3.z ?? 0) + u5), n3; } // node_modules/@arcgis/core/geometry/support/pointUtils.js function t3(t5, n3) { const s6 = t5.x - n3.x, r5 = t5.y - n3.y, a4 = t5.hasZ && n3.hasZ ? t5.z - n3.z : 0; return Math.sqrt(s6 * s6 + r5 * r5 + a4 * a4); } // node_modules/@arcgis/core/geometry/Point.js var f; var g2 = [0, 0]; function x2(e4) { return e4 && (e4.declaredClass === "esri.geometry.SpatialReference" || e4.wkid != null); } var w = s.getLogger("esri.geometry.Point"); var b = f = class extends p { constructor(...e4) { super(...e4), this.x = 0, this.y = 0, this.z = void 0, this.m = void 0, this.type = "point"; } static copy(e4, t5) { t5._set("x", e4._get("x")), t5._set("y", e4._get("y")), t5._set("z", e4._get("z")), t5._set("m", e4._get("m")); const r5 = e4._get("spatialReference"); t5._set("spatialReference", Object.isFrozen(r5) ? r5 : r5.clone()); } normalizeCtorArgs(e4, t5, r5, s6, i4) { let o5; if (Array.isArray(e4)) o5 = e4, i4 = t5, e4 = o5[0], t5 = o5[1], r5 = o5[2], s6 = o5[3]; else if (e4 && typeof e4 == "object") { if (o5 = e4, e4 = o5.x != null ? o5.x : o5.longitude, t5 = o5.y != null ? o5.y : o5.latitude, r5 = o5.z, s6 = o5.m, (i4 = o5.spatialReference) && i4.declaredClass !== "esri.geometry.SpatialReference" && (i4 = new k2(i4)), o5.longitude != null || o5.latitude != null) { if (o5.longitude == null) w.warn(".longitude=", "Latitude was defined without longitude"); else if (o5.latitude == null) w.warn(".latitude=", "Longitude was defined without latitude"); else if (!o5.declaredClass && i4 && i4.isWebMercator) { const r6 = y2(o5.longitude, o5.latitude, g2); e4 = r6[0], t5 = r6[1]; } } } else x2(r5) ? (i4 = r5, r5 = null) : x2(s6) && (i4 = s6, s6 = null); const a4 = { x: e4, y: t5 }; return a4.x == null && a4.y != null ? w.warn(".y=", "Y coordinate was defined without an X coordinate") : a4.y == null && a4.x != null && w.warn(".x=", "X coordinate was defined without a Y coordinate"), i4 != null && (a4.spatialReference = i4), r5 != null && (a4.z = r5), s6 != null && (a4.m = s6), a4; } get cache() { return this.commitProperty("x"), this.commitProperty("y"), this.commitProperty("z"), this.commitProperty("m"), this.commitProperty("spatialReference"), {}; } get hasM() { return this.m !== void 0; } set hasM(e4) { e4 !== (this._get("m") !== void 0) && (this._set("m", e4 ? 0 : void 0), this._set("hasM", e4)); } get hasZ() { return this.z !== void 0; } set hasZ(e4) { e4 !== (this._get("z") !== void 0) && (this._set("z", e4 ? 0 : void 0), this._set("hasZ", e4)); } get latitude() { const { spatialReference: e4, x: t5, y: r5 } = this; if (e4) { if (e4.isWebMercator) return d2(t5, r5, g2)[1]; if (e4.isGeographic) return r5; } return null; } set latitude(e4) { const { spatialReference: t5, x: r5 } = this; t5 && (t5.isWebMercator ? this._set("y", y2(r5, e4, g2)[1]) : t5.isGeographic && this._set("y", e4), this._set("latitude", e4)); } get longitude() { const { x: e4, y: t5, spatialReference: r5 } = this; if (r5) { if (r5.isWebMercator) return d2(e4, t5, g2)[0]; if (r5.isGeographic) return e4; } return null; } set longitude(e4) { const { y: t5, spatialReference: r5 } = this; r5 && (r5.isWebMercator ? this._set("x", y2(e4, t5, g2)[0]) : r5.isGeographic && this._set("x", e4), this._set("longitude", e4)); } writeX(e4, t5, r5) { t5[r5] = isNaN(e4) ? "NaN" : e4; } readX(e4) { return typeof e4 == "string" ? NaN : e4; } clone() { const e4 = new f(); return e4.x = this.x, e4.y = this.y, e4.z = this.z, e4.m = this.m, e4.spatialReference = this.spatialReference, e4; } copy(e4) { return f.copy(e4, this), this; } equals(e4) { if (t(e4)) return false; const { x: t5, y: s6, z: i4, m: o5, spatialReference: a4 } = this, { z: n3, m: l4 } = e4; let { x: c5, y: p4, spatialReference: u5 } = e4; if (!a4.equals(u5)) if (a4.isWebMercator && u5.isWGS84) [c5, p4] = y2(c5, p4), u5 = a4; else { if (!a4.isWGS84 || !u5.isWebMercator) return false; [c5, p4] = d2(c5, p4), u5 = a4; } return t5 === c5 && s6 === p4 && i4 === n3 && o5 === l4 && a4.wkid === u5.wkid; } offset(e4, t5, r5) { return n2(this, e4, t5, r5); } normalize() { if (!this.spatialReference) return this; const e4 = R(this.spatialReference); if (!e4) return this; let t5 = this.x; const [r5, s6] = e4.valid, i4 = 2 * s6; let o5; return t5 > s6 ? (o5 = Math.ceil(Math.abs(t5 - s6) / i4), t5 -= o5 * i4) : t5 < r5 && (o5 = Math.ceil(Math.abs(t5 - r5) / i4), t5 += o5 * i4), this._set("x", t5), this; } distance(e4) { return t3(this, e4); } toArray() { const e4 = this.hasZ, t5 = this.hasM; return e4 && t5 ? [this.x, this.y, this.z, this.m] : e4 ? [this.x, this.y, this.z] : t5 ? [this.x, this.y, this.m] : [this.x, this.y]; } toJSON(e4) { return this.write({}, e4); } }; e([d({ readOnly: true })], b.prototype, "cache", null), e([d({ type: Boolean, json: { read: false, write: { enabled: false, overridePolicy: null } } })], b.prototype, "hasM", null), e([d({ type: Boolean, json: { read: false, write: { enabled: false, overridePolicy: null } } })], b.prototype, "hasZ", null), e([d({ type: Number })], b.prototype, "latitude", null), e([d({ type: Number })], b.prototype, "longitude", null), e([d({ type: Number, json: { type: [Number, String], write: { isRequired: true, allowNull: true } } }), s2((e4) => isNaN(e4) ? e4 : a(e4))], b.prototype, "x", void 0), e([r3("x")], b.prototype, "writeX", null), e([o("x")], b.prototype, "readX", null), e([d({ type: Number, json: { write: true } })], b.prototype, "y", void 0), e([d({ type: Number, json: { write: { overridePolicy() { return { enabled: this.hasZ }; } } } })], b.prototype, "z", void 0), e([d({ type: Number, json: { write: { overridePolicy() { return { enabled: this.hasM }; } } } })], b.prototype, "m", void 0), b = f = e([n("esri.geometry.Point")], b), b.prototype.toJSON.isDefaultToJSON = true; var j2 = b; // node_modules/@arcgis/core/geometry/support/contains.js var t4 = [0, 0]; function r4(t5, r5) { return !!r(r5) && f2(t5, r5.x, r5.y, r5.z); } function i2(n3, t5) { if (!t5.points || t5.points.length) return false; for (const r5 of t5.points) if (!u2(n3, r5)) return false; return true; } function o3(n3, t5) { const { xmin: r5, ymin: i4, zmin: o5, xmax: u5, ymax: e4, zmax: c5 } = t5; return n3.hasZ && t5.hasZ ? f2(n3, r5, i4, o5) && f2(n3, r5, e4, o5) && f2(n3, u5, e4, o5) && f2(n3, u5, i4, o5) && f2(n3, r5, i4, c5) && f2(n3, r5, e4, c5) && f2(n3, u5, e4, c5) && f2(n3, u5, i4, c5) : f2(n3, r5, i4) && f2(n3, r5, e4) && f2(n3, u5, e4) && f2(n3, u5, i4); } function u2(n3, t5) { return f2(n3, t5[0], t5[1]); } function e3(n3, t5) { return f2(n3, t5[0], t5[1], t5[2]); } function f2(n3, t5, r5, i4) { return t5 >= n3.xmin && t5 <= n3.xmax && r5 >= n3.ymin && r5 <= n3.ymax && (i4 == null || !n3.hasZ || i4 >= n3.zmin && i4 <= n3.zmax); } function c3(n3, r5) { return t4[1] = r5.y, t4[0] = r5.x, m3(n3, t4); } function m3(n3, t5) { return s4(n3.rings, t5); } function s4(n3, t5) { if (!n3) return false; if (x3(n3)) return a2(false, n3, t5); let r5 = false; for (let i4 = 0, o5 = n3.length; i4 < o5; i4++) r5 = a2(r5, n3[i4], t5); return r5; } function x3(n3) { return !Array.isArray(n3[0][0]); } function a2(n3, t5, r5) { const [i4, o5] = r5; let u5 = n3, e4 = 0; for (let f5 = 0, c5 = t5.length; f5 < c5; f5++) { e4++, e4 === c5 && (e4 = 0); const [n4, r6] = t5[f5], [m5, s6] = t5[e4]; (r6 < o5 && s6 >= o5 || s6 < o5 && r6 >= o5) && n4 + (o5 - r6) / (s6 - r6) * (m5 - n4) < i4 && (u5 = !u5); } return u5; } // node_modules/@arcgis/core/geometry/support/intersectsBase.js function i3(t5, e4) { return r4(t5, e4); } function o4(n3, t5) { const e4 = n3.hasZ && t5.hasZ; let r5, i4, o5; if (n3.xmin <= t5.xmin) { if (r5 = t5.xmin, n3.xmax < r5) return false; } else if (r5 = n3.xmin, t5.xmax < r5) return false; if (n3.ymin <= t5.ymin) { if (i4 = t5.ymin, n3.ymax < i4) return false; } else if (i4 = n3.ymin, t5.ymax < i4) return false; if (e4 && t5.hasZ) { if (n3.zmin <= t5.zmin) { if (o5 = t5.zmin, n3.zmax < o5) return false; } else if (o5 = n3.zmin, t5.zmax < o5) return false; } return true; } function f3(n3, t5) { const { points: i4, hasZ: o5 } = t5, f5 = o5 ? e3 : u2; for (const e4 of i4) if (f5(n3, e4)) return true; return false; } var s5 = [0, 0]; var u3 = [0, 0]; var c4 = [0, 0]; var m4 = [0, 0]; var l3 = [s5, u3, c4, m4]; var a3 = [[c4, s5], [s5, u3], [u3, m4], [m4, c4]]; function x4(n3, t5) { return y3(n3, t5.rings); } function y3(n3, r5) { s5[0] = n3.xmin, s5[1] = n3.ymax, u3[0] = n3.xmax, u3[1] = n3.ymax, c4[0] = n3.xmin, c4[1] = n3.ymin, m4[0] = n3.xmax, m4[1] = n3.ymin; for (const e4 of l3) if (s4(r5, e4)) return true; for (const t5 of r5) { if (!t5.length) continue; let r6 = t5[0]; if (u2(n3, r6)) return true; for (let i4 = 1; i4 < t5.length; i4++) { const o5 = t5[i4]; if (u2(n3, o5) || z(r6, o5, a3)) return true; r6 = o5; } } return false; } function h2(n3, t5) { s5[0] = n3.xmin, s5[1] = n3.ymax, u3[0] = n3.xmax, u3[1] = n3.ymax, c4[0] = n3.xmin, c4[1] = n3.ymin, m4[0] = n3.xmax, m4[1] = n3.ymin; const r5 = t5.paths; for (const i4 of r5) { if (!r5.length) continue; let t6 = i4[0]; if (u2(n3, t6)) return true; for (let r6 = 1; r6 < i4.length; r6++) { const o5 = i4[r6]; if (u2(n3, o5) || z(t6, o5, a3)) return true; t6 = o5; } } return false; } var g3 = [0, 0]; function p3(n3) { for (let t5 = 0; t5 < n3.length; t5++) { const e4 = n3[t5]; for (let i4 = 0; i4 < e4.length - 1; i4++) { const r6 = e4[i4], o5 = e4[i4 + 1]; for (let e5 = t5 + 1; e5 < n3.length; e5++) for (let t6 = 0; t6 < n3[e5].length - 1; t6++) { const i5 = n3[e5][t6], f5 = n3[e5][t6 + 1]; if (G2(r6, o5, i5, f5, g3) && !(g3[0] === r6[0] && g3[1] === r6[1] || g3[0] === i5[0] && g3[1] === i5[1] || g3[0] === o5[0] && g3[1] === o5[1] || g3[0] === f5[0] && g3[1] === f5[1])) return true; } } const r5 = e4.length; if (!(r5 <= 4)) for (let n4 = 0; n4 < r5 - 3; n4++) { let t6 = r5 - 1; n4 === 0 && (t6 = r5 - 2); const i4 = e4[n4], o5 = e4[n4 + 1]; for (let r6 = n4 + 2; r6 < t6; r6++) { const n5 = e4[r6], t7 = e4[r6 + 1]; if (G2(i4, o5, n5, t7, g3) && !(g3[0] === i4[0] && g3[1] === i4[1] || g3[0] === n5[0] && g3[1] === n5[1] || g3[0] === o5[0] && g3[1] === o5[1] || g3[0] === t7[0] && g3[1] === t7[1])) return true; } } } return false; } function z(n3, t5, e4) { for (let r5 = 0; r5 < e4.length; r5++) if (G2(n3, t5, e4[r5][0], e4[r5][1])) return true; return false; } function G2(n3, t5, e4, r5, i4) { const [o5, f5] = n3, [s6, u5] = t5, [c5, m5] = e4, [l4, a4] = r5, x5 = l4 - c5, y4 = o5 - c5, h3 = s6 - o5, g4 = a4 - m5, p4 = f5 - m5, z3 = u5 - f5, G3 = g4 * h3 - x5 * z3; if (G3 === 0) return false; const Z2 = (x5 * p4 - g4 * y4) / G3, P = (h3 * p4 - z3 * y4) / G3; return Z2 >= 0 && Z2 <= 1 && P >= 0 && P <= 1 && (i4 && (i4[0] = o5 + Z2 * (s6 - o5), i4[1] = f5 + Z2 * (u5 - f5)), true); } function Z(n3) { switch (n3) { case "esriGeometryEnvelope": case "extent": return o4; case "esriGeometryMultipoint": case "multipoint": return f3; case "esriGeometryPoint": case "point": return i3; case "esriGeometryPolygon": case "polygon": return x4; case "esriGeometryPolyline": case "polyline": return h2; } } // node_modules/@arcgis/core/geometry/Extent.js var u4; function f4(t5) { return t5 && (t5.declaredClass === "esri.geometry.SpatialReference" || t5.wkid != null); } function d3(t5, i4, e4) { return i4 == null ? e4 : e4 == null ? i4 : t5(i4, e4); } var z2 = u4 = class extends p { constructor(...t5) { super(...t5), this.type = "extent", this.xmin = 0, this.ymin = 0, this.mmin = void 0, this.zmin = void 0, this.xmax = 0, this.ymax = 0, this.mmax = void 0, this.zmax = void 0; } normalizeCtorArgs(t5, i4, e4, s6, n3) { return f4(t5) ? { spatialReference: t5, xmin: 0, ymin: 0, xmax: 0, ymax: 0 } : typeof t5 == "object" ? (t5.spatialReference = t5.spatialReference == null ? k2.WGS84 : t5.spatialReference, t5) : { xmin: t5, ymin: i4, xmax: e4, ymax: s6, spatialReference: n3 == null ? k2.WGS84 : n3 }; } static fromBounds(t5, i4) { return new u4({ xmin: t5[0], ymin: t5[1], xmax: t5[2], ymax: t5[3], spatialReference: i4 }); } static fromPoint(t5) { return new u4({ xmin: t5.x, ymin: t5.y, zmin: t5.z, xmax: t5.x, ymax: t5.y, zmax: t5.z, spatialReference: t5.spatialReference }); } get cache() { return this.commitProperty("xmin"), this.commitProperty("ymin"), this.commitProperty("zmin"), this.commitProperty("mmin"), this.commitProperty("xmax"), this.commitProperty("ymax"), this.commitProperty("zmax"), this.commitProperty("mmax"), this.commitProperty("spatialReference"), {}; } get center() { const t5 = new j2({ x: 0.5 * (this.xmin + this.xmax), y: 0.5 * (this.ymin + this.ymax), spatialReference: this.spatialReference }); return this.hasZ && (t5.z = 0.5 * (this.zmin + this.zmax)), this.hasM && (t5.m = 0.5 * (this.mmin + this.mmax)), t5; } get extent() { return this.clone(); } get hasM() { return this.mmin != null && this.mmax != null; } get hasZ() { return this.zmin != null && this.zmax != null; } get height() { return Math.abs(this.ymax - this.ymin); } get width() { return Math.abs(this.xmax - this.xmin); } centerAt(t5) { const i4 = this.center; return t5.z != null && this.hasZ ? this.offset(t5.x - i4.x, t5.y - i4.y, t5.z - i4.z) : this.offset(t5.x - i4.x, t5.y - i4.y); } clone() { const t5 = new u4(); return t5.xmin = this.xmin, t5.ymin = this.ymin, t5.xmax = this.xmax, t5.ymax = this.ymax, t5.spatialReference = this.spatialReference, this.zmin != null && (t5.zmin = this.zmin, t5.zmax = this.zmax), this.mmin != null && (t5.mmin = this.mmin, t5.mmax = this.mmax), t5; } contains(t5) { if (!t5) return false; const i4 = this.spatialReference, e4 = t5.spatialReference; return i4 && e4 && !i4.equals(e4) && g(i4, e4) && (t5 = i4.isWebMercator ? R2(t5) : j(t5, true)), t5.type === "point" ? r4(this, t5) : t5.type === "extent" && o3(this, t5); } equals(t5) { if (this === t5) return true; if (t(t5)) return false; const e4 = this.spatialReference, s6 = t5.spatialReference; return e4 && s6 && !e4.equals(s6) && g(e4, s6) && (t5 = e4.isWebMercator ? R2(t5) : j(t5, true)), this.xmin === t5.xmin && this.ymin === t5.ymin && this.zmin === t5.zmin && this.mmin === t5.mmin && this.xmax === t5.xmax && this.ymax === t5.ymax && this.zmax === t5.zmax && this.mmax === t5.mmax; } expand(t5) { const i4 = 0.5 * (1 - t5), e4 = this.width * i4, s6 = this.height * i4; if (this.xmin += e4, this.ymin += s6, this.xmax -= e4, this.ymax -= s6, this.hasZ) { const t6 = (this.zmax - this.zmin) * i4; this.zmin += t6, this.zmax -= t6; } if (this.hasM) { const t6 = (this.mmax - this.mmin) * i4; this.mmin += t6, this.mmax -= t6; } return this; } intersects(t5) { if (t(t5)) return false; t5.type === "mesh" && (t5 = t5.extent); const e4 = this.spatialReference, s6 = t5.spatialReference; e4 && s6 && !e4.equals(s6) && g(e4, s6) && (t5 = e4.isWebMercator ? R2(t5) : j(t5, true)); return Z(t5.type)(this, t5); } normalize() { const t5 = this._normalize(false, true); return Array.isArray(t5) ? t5 : [t5]; } offset(t5, i4, e4) { return this.xmin += t5, this.ymin += i4, this.xmax += t5, this.ymax += i4, e4 != null && (this.zmin += e4, this.zmax += e4), this; } shiftCentralMeridian() { return this._normalize(true); } union(t5) { return this === t5 || (this.xmin = Math.min(this.xmin, t5.xmin), this.ymin = Math.min(this.ymin, t5.ymin), this.xmax = Math.max(this.xmax, t5.xmax), this.ymax = Math.max(this.ymax, t5.ymax), (this.hasZ || t5.hasZ) && (this.zmin = d3(Math.min, this.zmin, t5.zmin), this.zmax = d3(Math.max, this.zmax, t5.zmax)), (this.hasM || t5.hasM) && (this.mmin = d3(Math.min, this.mmin, t5.mmin), this.mmax = d3(Math.max, this.mmax, t5.mmax))), this; } intersection(t5) { return this === t5 ? this : t(t5) || !this.intersects(t5) ? null : (this.xmin = Math.max(this.xmin, t5.xmin), this.ymin = Math.max(this.ymin, t5.ymin), this.xmax = Math.min(this.xmax, t5.xmax), this.ymax = Math.min(this.ymax, t5.ymax), (this.hasZ || t5.hasZ) && (this.zmin = d3(Math.max, this.zmin, t5.zmin), this.zmax = d3(Math.min, this.zmax, t5.zmax)), (this.hasM || t5.hasM) && (this.mmin = d3(Math.max, this.mmin, t5.mmin), this.mmax = d3(Math.min, this.mmax, t5.mmax)), this); } toJSON(t5) { return this.write({}, t5); } _shiftCM(t5 = R(this.spatialReference)) { if (!t5 || !this.spatialReference) return this; const i4 = this.spatialReference, s6 = this._getCM(t5); if (s6) { const n3 = i4.isWebMercator ? j(s6) : s6; this.xmin -= s6.x, this.xmax -= s6.x, i4.isWebMercator || (n3.x = this._normalizeX(n3.x, t5).x), this.spatialReference = new k2(r2(i4.isWGS84 ? t5.altTemplate : t5.wkTemplate, { Central_Meridian: n3.x })); } return this; } _getCM(t5) { let i4 = null; const [e4, s6] = t5.valid, n3 = this.xmin, m5 = this.xmax; return n3 >= e4 && n3 <= s6 && (m5 >= e4 && m5 <= s6) || (i4 = this.center), i4; } _normalize(t5, i4, e4) { const s6 = this.spatialReference; if (!s6) return this; if (!(e4 = e4 || R(s6))) return this; const n3 = this._getParts(e4).map((t6) => t6.extent); if (n3.length < 2) return n3[0] || this; if (n3.length > 2) return t5 ? this._shiftCM(e4) : this.set({ xmin: e4.valid[0], xmax: e4.valid[1] }); if (t5) return this._shiftCM(e4); if (i4) return n3; let m5 = true, r5 = true; return n3.forEach((t6) => { t6.hasZ || (m5 = false), t6.hasM || (r5 = false); }), { rings: n3.map((t6) => { const i5 = [[t6.xmin, t6.ymin], [t6.xmin, t6.ymax], [t6.xmax, t6.ymax], [t6.xmax, t6.ymin], [t6.xmin, t6.ymin]]; if (m5) { const e5 = (t6.zmax - t6.zmin) / 2; for (let t7 = 0; t7 < i5.length; t7++) i5[t7].push(e5); } if (r5) { const e5 = (t6.mmax - t6.mmin) / 2; for (let t7 = 0; t7 < i5.length; t7++) i5[t7].push(e5); } return i5; }), hasZ: m5, hasM: r5, spatialReference: s6 }; } _getParts(t5) { let i4 = this.cache._parts; if (!i4) { i4 = []; const { ymin: e5, ymax: s7, spatialReference: n3 } = this, m5 = this.width, r5 = this.xmin, a4 = this.xmax; let h3; t5 = t5 || R(n3); const [o5, x5] = t5.valid; h3 = this._normalizeX(this.xmin, t5); const p4 = h3.x, c5 = h3.frameId; h3 = this._normalizeX(this.xmax, t5); const y4 = h3.x, f5 = h3.frameId, d4 = p4 === y4 && m5 > 0; if (m5 > 2 * x5) { const t6 = new u4(r5 < a4 ? p4 : y4, e5, x5, s7, n3), m6 = new u4(o5, e5, r5 < a4 ? y4 : p4, s7, n3), h4 = new u4(0, e5, x5, s7, n3), l4 = new u4(o5, e5, 0, s7, n3), d5 = [], z3 = []; t6.contains(h4) && d5.push(c5), t6.contains(l4) && z3.push(c5), m6.contains(h4) && d5.push(f5), m6.contains(l4) && z3.push(f5); for (let i5 = c5 + 1; i5 < f5; i5++) d5.push(i5), z3.push(i5); i4.push({ extent: t6, frameIds: [c5] }, { extent: m6, frameIds: [f5] }, { extent: h4, frameIds: d5 }, { extent: l4, frameIds: z3 }); } else p4 > y4 || d4 ? i4.push({ extent: new u4(p4, e5, x5, s7, n3), frameIds: [c5] }, { extent: new u4(o5, e5, y4, s7, n3), frameIds: [f5] }) : i4.push({ extent: new u4(p4, e5, y4, s7, n3), frameIds: [c5] }); this.cache._parts = i4; } const e4 = this.hasZ, s6 = this.hasM; if (e4 || s6) { const t6 = {}; e4 && (t6.zmin = this.zmin, t6.zmax = this.zmax), s6 && (t6.mmin = this.mmin, t6.mmax = this.mmax); for (let e5 = 0; e5 < i4.length; e5++) i4[e5].extent.set(t6); } return i4; } _normalizeX(t5, i4) { const [e4, s6] = i4.valid, n3 = 2 * s6; let m5, r5 = 0; return t5 > s6 ? (m5 = Math.ceil(Math.abs(t5 - s6) / n3), t5 -= m5 * n3, r5 = m5) : t5 < e4 && (m5 = Math.ceil(Math.abs(t5 - e4) / n3), t5 += m5 * n3, r5 = -m5), { x: t5, frameId: r5 }; } }; e([d({ readOnly: true })], z2.prototype, "cache", null), e([d({ readOnly: true })], z2.prototype, "center", null), e([d({ readOnly: true })], z2.prototype, "extent", null), e([d({ readOnly: true, json: { write: { enabled: false, overridePolicy: null } } })], z2.prototype, "hasM", null), e([d({ readOnly: true, json: { write: { enabled: false, overridePolicy: null } } })], z2.prototype, "hasZ", null), e([d({ readOnly: true })], z2.prototype, "height", null), e([d({ readOnly: true })], z2.prototype, "width", null), e([d({ type: Number, json: { type: [Number, String], write: { enabled: true, allowNull: true } } })], z2.prototype, "xmin", void 0), e([d({ type: Number, json: { write: true } })], z2.prototype, "ymin", void 0), e([d({ type: Number, json: { origins: { "web-scene": { write: false } }, write: { overridePolicy() { return { enabled: this.hasM }; } } } })], z2.prototype, "mmin", void 0), e([d({ type: Number, json: { origins: { "web-scene": { write: false } }, write: { overridePolicy() { return { enabled: this.hasZ }; } } } })], z2.prototype, "zmin", void 0), e([d({ type: Number, json: { write: true } })], z2.prototype, "xmax", void 0), e([d({ type: Number, json: { write: true } })], z2.prototype, "ymax", void 0), e([d({ type: Number, json: { origins: { "web-scene": { write: false } }, write: { overridePolicy() { return { enabled: this.hasM }; } } } })], z2.prototype, "mmax", void 0), e([d({ type: Number, json: { origins: { "web-scene": { write: false } }, write: { overridePolicy() { return { enabled: this.hasZ }; } } } })], z2.prototype, "zmax", void 0), z2 = u4 = e([n("esri.geometry.Extent")], z2), z2.prototype.toJSON.isDefaultToJSON = true; var M2 = z2; export { o, p, s3 as s, t2 as t, e2 as e, c2 as c, g, M, y2 as y, d2 as d, R2 as R, j, j2, r4 as r, i2 as i, c3 as c2, s4 as s2, o4 as o2, p3 as p2, G2 as G, Z, M2 }; //# sourceMappingURL=chunk-ECW2QABR.js.map