chunk-ECW2QABR.js 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  1. import {
  2. s as s2
  3. } from "./chunk-GCDJLKH4.js";
  4. import {
  5. E,
  6. G,
  7. R,
  8. k,
  9. k2,
  10. r as r3
  11. } from "./chunk-MRJEICT6.js";
  12. import {
  13. d,
  14. e,
  15. l3 as l,
  16. n2 as n,
  17. y
  18. } from "./chunk-Y3WMVFTW.js";
  19. import {
  20. a
  21. } from "./chunk-IHXECKQQ.js";
  22. import {
  23. s
  24. } from "./chunk-EMJ4ZSM2.js";
  25. import {
  26. m,
  27. r as r2
  28. } from "./chunk-IKP3YN53.js";
  29. import {
  30. r,
  31. t
  32. } from "./chunk-GZT4BVFP.js";
  33. // node_modules/@arcgis/core/core/accessorSupport/decorators/reader.js
  34. function o(o5, e4, t5) {
  35. let a4, c5;
  36. return e4 === void 0 || Array.isArray(e4) ? (c5 = o5, t5 = e4, a4 = [void 0]) : (c5 = e4, a4 = Array.isArray(o5) ? o5 : [o5]), (o6, e5) => {
  37. const d4 = o6.constructor.prototype;
  38. a4.forEach((a5) => {
  39. const s6 = y(o6, a5, c5);
  40. s6.read && typeof s6.read == "object" || (s6.read = {}), s6.read.reader = d4[e5], t5 && (s6.read.source = (s6.read.source || []).concat(t5));
  41. });
  42. };
  43. }
  44. // node_modules/@arcgis/core/geometry/Geometry.js
  45. var c = class extends l {
  46. constructor(...e4) {
  47. super(...e4), this.type = null, this.hasM = false, this.hasZ = false, this.spatialReference = k2.WGS84;
  48. }
  49. get cache() {
  50. return this.commitProperty("spatialReference"), {};
  51. }
  52. get extent() {
  53. return null;
  54. }
  55. readSpatialReference(e4, r5) {
  56. if (e4 instanceof k2)
  57. return e4;
  58. if (e4 != null) {
  59. const t5 = new k2();
  60. return t5.read(e4, r5), t5;
  61. }
  62. return e4;
  63. }
  64. clone() {
  65. return console.warn(".clone() is not implemented for " + this.declaredClass), null;
  66. }
  67. clearCache() {
  68. this.notifyChange("cache");
  69. }
  70. getCacheValue(e4) {
  71. return this.cache[e4];
  72. }
  73. setCacheValue(e4, r5) {
  74. this.cache[e4] = r5;
  75. }
  76. };
  77. 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);
  78. var p = c;
  79. // node_modules/@arcgis/core/geometry/support/Ellipsoid.js
  80. var i = class {
  81. constructor(i4, s6, t5, e4) {
  82. this.semiMajorAxis = i4, this.flattening = s6, this.outerAtmosphereRimWidth = t5;
  83. const h3 = 1 - this.flattening;
  84. 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;
  85. }
  86. get radius() {
  87. return this.semiMajorAxis;
  88. }
  89. };
  90. var s3 = new i(6378137, 1 / 298.257223563, 3e5, 0.006694379990137799);
  91. var t2 = new i(3396190, 1 / 169.8944472236118, 23e4);
  92. var e2 = new i(1737400, 0, 0);
  93. // node_modules/@arcgis/core/geometry/support/webMercatorUtils.js
  94. var o2 = 57.29577951308232;
  95. var u = 0.017453292519943;
  96. function l2(n3) {
  97. return n3 * o2;
  98. }
  99. function p2(n3) {
  100. return n3 * u;
  101. }
  102. function c2(n3) {
  103. return Math.PI / 2 - 2 * Math.atan(Math.exp(-n3 / s3.radius));
  104. }
  105. function h(n3) {
  106. return n3.wkid != null || n3.wkt != null;
  107. }
  108. var m2 = [0, 0];
  109. function x(n3, t5, e4, i4, r5) {
  110. const s6 = n3, a4 = r5;
  111. if (a4.spatialReference = e4, "x" in s6 && "x" in a4)
  112. [a4.x, a4.y] = t5(s6.x, s6.y, m2, i4);
  113. else if ("xmin" in s6 && "xmin" in a4)
  114. [a4.xmin, a4.ymin] = t5(s6.xmin, s6.ymin, m2, i4), [a4.xmax, a4.ymax] = t5(s6.xmax, s6.ymax, m2, i4);
  115. else if ("paths" in s6 && "paths" in a4 || "rings" in s6 && "rings" in a4) {
  116. const n4 = "paths" in s6 ? s6.paths : s6.rings, e5 = [];
  117. let r6;
  118. for (let s7 = 0; s7 < n4.length; s7++) {
  119. const a5 = n4[s7];
  120. r6 = [], e5.push(r6);
  121. for (let n5 = 0; n5 < a5.length; n5++)
  122. 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]);
  123. }
  124. "paths" in a4 ? a4.paths = e5 : a4.rings = e5;
  125. } else if ("points" in s6 && "points" in a4) {
  126. const n4 = s6.points, e5 = [];
  127. for (let r6 = 0; r6 < n4.length; r6++)
  128. 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]);
  129. a4.points = e5;
  130. }
  131. return r5;
  132. }
  133. function g(n3, t5) {
  134. const e4 = n3 && (h(n3) ? n3 : n3.spatialReference), i4 = t5 && (h(t5) ? t5 : t5.spatialReference);
  135. 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)));
  136. }
  137. function M(i4, o5) {
  138. if (t(i4))
  139. return null;
  140. const u5 = i4.spatialReference, l4 = o5 && (h(o5) ? o5 : o5.spatialReference);
  141. 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;
  142. }
  143. function y2(n3, t5, e4 = [0, 0]) {
  144. t5 > 89.99999 ? t5 = 89.99999 : t5 < -89.99999 && (t5 = -89.99999);
  145. const r5 = p2(t5);
  146. return e4[0] = p2(n3) * s3.radius, e4[1] = s3.halfSemiMajorAxis * Math.log((1 + Math.sin(r5)) / (1 - Math.sin(r5))), e4;
  147. }
  148. function d2(n3, t5, e4 = [0, 0], r5 = false) {
  149. const s6 = l2(n3 / s3.radius);
  150. 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;
  151. }
  152. function R2(t5, i4 = false, r5 = m(t5)) {
  153. return x(t5, y2, k2.WebMercator, i4, r5);
  154. }
  155. function j(t5, i4 = false, r5 = m(t5)) {
  156. return x(t5, d2, k2.WGS84, i4, r5);
  157. }
  158. // node_modules/@arcgis/core/geometry/support/offset.js
  159. function n2(n3, r5, t5, u5) {
  160. return n3.x = n3.x + r5, n3.y = n3.y + t5, u5 != null && (n3.z = (n3.z ?? 0) + u5), n3;
  161. }
  162. // node_modules/@arcgis/core/geometry/support/pointUtils.js
  163. function t3(t5, n3) {
  164. const s6 = t5.x - n3.x, r5 = t5.y - n3.y, a4 = t5.hasZ && n3.hasZ ? t5.z - n3.z : 0;
  165. return Math.sqrt(s6 * s6 + r5 * r5 + a4 * a4);
  166. }
  167. // node_modules/@arcgis/core/geometry/Point.js
  168. var f;
  169. var g2 = [0, 0];
  170. function x2(e4) {
  171. return e4 && (e4.declaredClass === "esri.geometry.SpatialReference" || e4.wkid != null);
  172. }
  173. var w = s.getLogger("esri.geometry.Point");
  174. var b = f = class extends p {
  175. constructor(...e4) {
  176. super(...e4), this.x = 0, this.y = 0, this.z = void 0, this.m = void 0, this.type = "point";
  177. }
  178. static copy(e4, t5) {
  179. t5._set("x", e4._get("x")), t5._set("y", e4._get("y")), t5._set("z", e4._get("z")), t5._set("m", e4._get("m"));
  180. const r5 = e4._get("spatialReference");
  181. t5._set("spatialReference", Object.isFrozen(r5) ? r5 : r5.clone());
  182. }
  183. normalizeCtorArgs(e4, t5, r5, s6, i4) {
  184. let o5;
  185. if (Array.isArray(e4))
  186. o5 = e4, i4 = t5, e4 = o5[0], t5 = o5[1], r5 = o5[2], s6 = o5[3];
  187. else if (e4 && typeof e4 == "object") {
  188. 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) {
  189. if (o5.longitude == null)
  190. w.warn(".longitude=", "Latitude was defined without longitude");
  191. else if (o5.latitude == null)
  192. w.warn(".latitude=", "Longitude was defined without latitude");
  193. else if (!o5.declaredClass && i4 && i4.isWebMercator) {
  194. const r6 = y2(o5.longitude, o5.latitude, g2);
  195. e4 = r6[0], t5 = r6[1];
  196. }
  197. }
  198. } else
  199. x2(r5) ? (i4 = r5, r5 = null) : x2(s6) && (i4 = s6, s6 = null);
  200. const a4 = { x: e4, y: t5 };
  201. 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;
  202. }
  203. get cache() {
  204. return this.commitProperty("x"), this.commitProperty("y"), this.commitProperty("z"), this.commitProperty("m"), this.commitProperty("spatialReference"), {};
  205. }
  206. get hasM() {
  207. return this.m !== void 0;
  208. }
  209. set hasM(e4) {
  210. e4 !== (this._get("m") !== void 0) && (this._set("m", e4 ? 0 : void 0), this._set("hasM", e4));
  211. }
  212. get hasZ() {
  213. return this.z !== void 0;
  214. }
  215. set hasZ(e4) {
  216. e4 !== (this._get("z") !== void 0) && (this._set("z", e4 ? 0 : void 0), this._set("hasZ", e4));
  217. }
  218. get latitude() {
  219. const { spatialReference: e4, x: t5, y: r5 } = this;
  220. if (e4) {
  221. if (e4.isWebMercator)
  222. return d2(t5, r5, g2)[1];
  223. if (e4.isGeographic)
  224. return r5;
  225. }
  226. return null;
  227. }
  228. set latitude(e4) {
  229. const { spatialReference: t5, x: r5 } = this;
  230. t5 && (t5.isWebMercator ? this._set("y", y2(r5, e4, g2)[1]) : t5.isGeographic && this._set("y", e4), this._set("latitude", e4));
  231. }
  232. get longitude() {
  233. const { x: e4, y: t5, spatialReference: r5 } = this;
  234. if (r5) {
  235. if (r5.isWebMercator)
  236. return d2(e4, t5, g2)[0];
  237. if (r5.isGeographic)
  238. return e4;
  239. }
  240. return null;
  241. }
  242. set longitude(e4) {
  243. const { y: t5, spatialReference: r5 } = this;
  244. r5 && (r5.isWebMercator ? this._set("x", y2(e4, t5, g2)[0]) : r5.isGeographic && this._set("x", e4), this._set("longitude", e4));
  245. }
  246. writeX(e4, t5, r5) {
  247. t5[r5] = isNaN(e4) ? "NaN" : e4;
  248. }
  249. readX(e4) {
  250. return typeof e4 == "string" ? NaN : e4;
  251. }
  252. clone() {
  253. const e4 = new f();
  254. return e4.x = this.x, e4.y = this.y, e4.z = this.z, e4.m = this.m, e4.spatialReference = this.spatialReference, e4;
  255. }
  256. copy(e4) {
  257. return f.copy(e4, this), this;
  258. }
  259. equals(e4) {
  260. if (t(e4))
  261. return false;
  262. const { x: t5, y: s6, z: i4, m: o5, spatialReference: a4 } = this, { z: n3, m: l4 } = e4;
  263. let { x: c5, y: p4, spatialReference: u5 } = e4;
  264. if (!a4.equals(u5))
  265. if (a4.isWebMercator && u5.isWGS84)
  266. [c5, p4] = y2(c5, p4), u5 = a4;
  267. else {
  268. if (!a4.isWGS84 || !u5.isWebMercator)
  269. return false;
  270. [c5, p4] = d2(c5, p4), u5 = a4;
  271. }
  272. return t5 === c5 && s6 === p4 && i4 === n3 && o5 === l4 && a4.wkid === u5.wkid;
  273. }
  274. offset(e4, t5, r5) {
  275. return n2(this, e4, t5, r5);
  276. }
  277. normalize() {
  278. if (!this.spatialReference)
  279. return this;
  280. const e4 = R(this.spatialReference);
  281. if (!e4)
  282. return this;
  283. let t5 = this.x;
  284. const [r5, s6] = e4.valid, i4 = 2 * s6;
  285. let o5;
  286. 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;
  287. }
  288. distance(e4) {
  289. return t3(this, e4);
  290. }
  291. toArray() {
  292. const e4 = this.hasZ, t5 = this.hasM;
  293. 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];
  294. }
  295. toJSON(e4) {
  296. return this.write({}, e4);
  297. }
  298. };
  299. 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() {
  300. return { enabled: this.hasZ };
  301. } } } })], b.prototype, "z", void 0), e([d({ type: Number, json: { write: { overridePolicy() {
  302. return { enabled: this.hasM };
  303. } } } })], b.prototype, "m", void 0), b = f = e([n("esri.geometry.Point")], b), b.prototype.toJSON.isDefaultToJSON = true;
  304. var j2 = b;
  305. // node_modules/@arcgis/core/geometry/support/contains.js
  306. var t4 = [0, 0];
  307. function r4(t5, r5) {
  308. return !!r(r5) && f2(t5, r5.x, r5.y, r5.z);
  309. }
  310. function i2(n3, t5) {
  311. if (!t5.points || t5.points.length)
  312. return false;
  313. for (const r5 of t5.points)
  314. if (!u2(n3, r5))
  315. return false;
  316. return true;
  317. }
  318. function o3(n3, t5) {
  319. const { xmin: r5, ymin: i4, zmin: o5, xmax: u5, ymax: e4, zmax: c5 } = t5;
  320. 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);
  321. }
  322. function u2(n3, t5) {
  323. return f2(n3, t5[0], t5[1]);
  324. }
  325. function e3(n3, t5) {
  326. return f2(n3, t5[0], t5[1], t5[2]);
  327. }
  328. function f2(n3, t5, r5, i4) {
  329. return t5 >= n3.xmin && t5 <= n3.xmax && r5 >= n3.ymin && r5 <= n3.ymax && (i4 == null || !n3.hasZ || i4 >= n3.zmin && i4 <= n3.zmax);
  330. }
  331. function c3(n3, r5) {
  332. return t4[1] = r5.y, t4[0] = r5.x, m3(n3, t4);
  333. }
  334. function m3(n3, t5) {
  335. return s4(n3.rings, t5);
  336. }
  337. function s4(n3, t5) {
  338. if (!n3)
  339. return false;
  340. if (x3(n3))
  341. return a2(false, n3, t5);
  342. let r5 = false;
  343. for (let i4 = 0, o5 = n3.length; i4 < o5; i4++)
  344. r5 = a2(r5, n3[i4], t5);
  345. return r5;
  346. }
  347. function x3(n3) {
  348. return !Array.isArray(n3[0][0]);
  349. }
  350. function a2(n3, t5, r5) {
  351. const [i4, o5] = r5;
  352. let u5 = n3, e4 = 0;
  353. for (let f5 = 0, c5 = t5.length; f5 < c5; f5++) {
  354. e4++, e4 === c5 && (e4 = 0);
  355. const [n4, r6] = t5[f5], [m5, s6] = t5[e4];
  356. (r6 < o5 && s6 >= o5 || s6 < o5 && r6 >= o5) && n4 + (o5 - r6) / (s6 - r6) * (m5 - n4) < i4 && (u5 = !u5);
  357. }
  358. return u5;
  359. }
  360. // node_modules/@arcgis/core/geometry/support/intersectsBase.js
  361. function i3(t5, e4) {
  362. return r4(t5, e4);
  363. }
  364. function o4(n3, t5) {
  365. const e4 = n3.hasZ && t5.hasZ;
  366. let r5, i4, o5;
  367. if (n3.xmin <= t5.xmin) {
  368. if (r5 = t5.xmin, n3.xmax < r5)
  369. return false;
  370. } else if (r5 = n3.xmin, t5.xmax < r5)
  371. return false;
  372. if (n3.ymin <= t5.ymin) {
  373. if (i4 = t5.ymin, n3.ymax < i4)
  374. return false;
  375. } else if (i4 = n3.ymin, t5.ymax < i4)
  376. return false;
  377. if (e4 && t5.hasZ) {
  378. if (n3.zmin <= t5.zmin) {
  379. if (o5 = t5.zmin, n3.zmax < o5)
  380. return false;
  381. } else if (o5 = n3.zmin, t5.zmax < o5)
  382. return false;
  383. }
  384. return true;
  385. }
  386. function f3(n3, t5) {
  387. const { points: i4, hasZ: o5 } = t5, f5 = o5 ? e3 : u2;
  388. for (const e4 of i4)
  389. if (f5(n3, e4))
  390. return true;
  391. return false;
  392. }
  393. var s5 = [0, 0];
  394. var u3 = [0, 0];
  395. var c4 = [0, 0];
  396. var m4 = [0, 0];
  397. var l3 = [s5, u3, c4, m4];
  398. var a3 = [[c4, s5], [s5, u3], [u3, m4], [m4, c4]];
  399. function x4(n3, t5) {
  400. return y3(n3, t5.rings);
  401. }
  402. function y3(n3, r5) {
  403. 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;
  404. for (const e4 of l3)
  405. if (s4(r5, e4))
  406. return true;
  407. for (const t5 of r5) {
  408. if (!t5.length)
  409. continue;
  410. let r6 = t5[0];
  411. if (u2(n3, r6))
  412. return true;
  413. for (let i4 = 1; i4 < t5.length; i4++) {
  414. const o5 = t5[i4];
  415. if (u2(n3, o5) || z(r6, o5, a3))
  416. return true;
  417. r6 = o5;
  418. }
  419. }
  420. return false;
  421. }
  422. function h2(n3, t5) {
  423. 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;
  424. const r5 = t5.paths;
  425. for (const i4 of r5) {
  426. if (!r5.length)
  427. continue;
  428. let t6 = i4[0];
  429. if (u2(n3, t6))
  430. return true;
  431. for (let r6 = 1; r6 < i4.length; r6++) {
  432. const o5 = i4[r6];
  433. if (u2(n3, o5) || z(t6, o5, a3))
  434. return true;
  435. t6 = o5;
  436. }
  437. }
  438. return false;
  439. }
  440. var g3 = [0, 0];
  441. function p3(n3) {
  442. for (let t5 = 0; t5 < n3.length; t5++) {
  443. const e4 = n3[t5];
  444. for (let i4 = 0; i4 < e4.length - 1; i4++) {
  445. const r6 = e4[i4], o5 = e4[i4 + 1];
  446. for (let e5 = t5 + 1; e5 < n3.length; e5++)
  447. for (let t6 = 0; t6 < n3[e5].length - 1; t6++) {
  448. const i5 = n3[e5][t6], f5 = n3[e5][t6 + 1];
  449. 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]))
  450. return true;
  451. }
  452. }
  453. const r5 = e4.length;
  454. if (!(r5 <= 4))
  455. for (let n4 = 0; n4 < r5 - 3; n4++) {
  456. let t6 = r5 - 1;
  457. n4 === 0 && (t6 = r5 - 2);
  458. const i4 = e4[n4], o5 = e4[n4 + 1];
  459. for (let r6 = n4 + 2; r6 < t6; r6++) {
  460. const n5 = e4[r6], t7 = e4[r6 + 1];
  461. 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]))
  462. return true;
  463. }
  464. }
  465. }
  466. return false;
  467. }
  468. function z(n3, t5, e4) {
  469. for (let r5 = 0; r5 < e4.length; r5++)
  470. if (G2(n3, t5, e4[r5][0], e4[r5][1]))
  471. return true;
  472. return false;
  473. }
  474. function G2(n3, t5, e4, r5, i4) {
  475. 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;
  476. if (G3 === 0)
  477. return false;
  478. const Z2 = (x5 * p4 - g4 * y4) / G3, P = (h3 * p4 - z3 * y4) / G3;
  479. return Z2 >= 0 && Z2 <= 1 && P >= 0 && P <= 1 && (i4 && (i4[0] = o5 + Z2 * (s6 - o5), i4[1] = f5 + Z2 * (u5 - f5)), true);
  480. }
  481. function Z(n3) {
  482. switch (n3) {
  483. case "esriGeometryEnvelope":
  484. case "extent":
  485. return o4;
  486. case "esriGeometryMultipoint":
  487. case "multipoint":
  488. return f3;
  489. case "esriGeometryPoint":
  490. case "point":
  491. return i3;
  492. case "esriGeometryPolygon":
  493. case "polygon":
  494. return x4;
  495. case "esriGeometryPolyline":
  496. case "polyline":
  497. return h2;
  498. }
  499. }
  500. // node_modules/@arcgis/core/geometry/Extent.js
  501. var u4;
  502. function f4(t5) {
  503. return t5 && (t5.declaredClass === "esri.geometry.SpatialReference" || t5.wkid != null);
  504. }
  505. function d3(t5, i4, e4) {
  506. return i4 == null ? e4 : e4 == null ? i4 : t5(i4, e4);
  507. }
  508. var z2 = u4 = class extends p {
  509. constructor(...t5) {
  510. 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;
  511. }
  512. normalizeCtorArgs(t5, i4, e4, s6, n3) {
  513. 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 };
  514. }
  515. static fromBounds(t5, i4) {
  516. return new u4({ xmin: t5[0], ymin: t5[1], xmax: t5[2], ymax: t5[3], spatialReference: i4 });
  517. }
  518. static fromPoint(t5) {
  519. return new u4({ xmin: t5.x, ymin: t5.y, zmin: t5.z, xmax: t5.x, ymax: t5.y, zmax: t5.z, spatialReference: t5.spatialReference });
  520. }
  521. get cache() {
  522. 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"), {};
  523. }
  524. get center() {
  525. const t5 = new j2({ x: 0.5 * (this.xmin + this.xmax), y: 0.5 * (this.ymin + this.ymax), spatialReference: this.spatialReference });
  526. return this.hasZ && (t5.z = 0.5 * (this.zmin + this.zmax)), this.hasM && (t5.m = 0.5 * (this.mmin + this.mmax)), t5;
  527. }
  528. get extent() {
  529. return this.clone();
  530. }
  531. get hasM() {
  532. return this.mmin != null && this.mmax != null;
  533. }
  534. get hasZ() {
  535. return this.zmin != null && this.zmax != null;
  536. }
  537. get height() {
  538. return Math.abs(this.ymax - this.ymin);
  539. }
  540. get width() {
  541. return Math.abs(this.xmax - this.xmin);
  542. }
  543. centerAt(t5) {
  544. const i4 = this.center;
  545. 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);
  546. }
  547. clone() {
  548. const t5 = new u4();
  549. 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;
  550. }
  551. contains(t5) {
  552. if (!t5)
  553. return false;
  554. const i4 = this.spatialReference, e4 = t5.spatialReference;
  555. 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);
  556. }
  557. equals(t5) {
  558. if (this === t5)
  559. return true;
  560. if (t(t5))
  561. return false;
  562. const e4 = this.spatialReference, s6 = t5.spatialReference;
  563. 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;
  564. }
  565. expand(t5) {
  566. const i4 = 0.5 * (1 - t5), e4 = this.width * i4, s6 = this.height * i4;
  567. if (this.xmin += e4, this.ymin += s6, this.xmax -= e4, this.ymax -= s6, this.hasZ) {
  568. const t6 = (this.zmax - this.zmin) * i4;
  569. this.zmin += t6, this.zmax -= t6;
  570. }
  571. if (this.hasM) {
  572. const t6 = (this.mmax - this.mmin) * i4;
  573. this.mmin += t6, this.mmax -= t6;
  574. }
  575. return this;
  576. }
  577. intersects(t5) {
  578. if (t(t5))
  579. return false;
  580. t5.type === "mesh" && (t5 = t5.extent);
  581. const e4 = this.spatialReference, s6 = t5.spatialReference;
  582. e4 && s6 && !e4.equals(s6) && g(e4, s6) && (t5 = e4.isWebMercator ? R2(t5) : j(t5, true));
  583. return Z(t5.type)(this, t5);
  584. }
  585. normalize() {
  586. const t5 = this._normalize(false, true);
  587. return Array.isArray(t5) ? t5 : [t5];
  588. }
  589. offset(t5, i4, e4) {
  590. return this.xmin += t5, this.ymin += i4, this.xmax += t5, this.ymax += i4, e4 != null && (this.zmin += e4, this.zmax += e4), this;
  591. }
  592. shiftCentralMeridian() {
  593. return this._normalize(true);
  594. }
  595. union(t5) {
  596. 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;
  597. }
  598. intersection(t5) {
  599. 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);
  600. }
  601. toJSON(t5) {
  602. return this.write({}, t5);
  603. }
  604. _shiftCM(t5 = R(this.spatialReference)) {
  605. if (!t5 || !this.spatialReference)
  606. return this;
  607. const i4 = this.spatialReference, s6 = this._getCM(t5);
  608. if (s6) {
  609. const n3 = i4.isWebMercator ? j(s6) : s6;
  610. 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 }));
  611. }
  612. return this;
  613. }
  614. _getCM(t5) {
  615. let i4 = null;
  616. const [e4, s6] = t5.valid, n3 = this.xmin, m5 = this.xmax;
  617. return n3 >= e4 && n3 <= s6 && (m5 >= e4 && m5 <= s6) || (i4 = this.center), i4;
  618. }
  619. _normalize(t5, i4, e4) {
  620. const s6 = this.spatialReference;
  621. if (!s6)
  622. return this;
  623. if (!(e4 = e4 || R(s6)))
  624. return this;
  625. const n3 = this._getParts(e4).map((t6) => t6.extent);
  626. if (n3.length < 2)
  627. return n3[0] || this;
  628. if (n3.length > 2)
  629. return t5 ? this._shiftCM(e4) : this.set({ xmin: e4.valid[0], xmax: e4.valid[1] });
  630. if (t5)
  631. return this._shiftCM(e4);
  632. if (i4)
  633. return n3;
  634. let m5 = true, r5 = true;
  635. return n3.forEach((t6) => {
  636. t6.hasZ || (m5 = false), t6.hasM || (r5 = false);
  637. }), { rings: n3.map((t6) => {
  638. const i5 = [[t6.xmin, t6.ymin], [t6.xmin, t6.ymax], [t6.xmax, t6.ymax], [t6.xmax, t6.ymin], [t6.xmin, t6.ymin]];
  639. if (m5) {
  640. const e5 = (t6.zmax - t6.zmin) / 2;
  641. for (let t7 = 0; t7 < i5.length; t7++)
  642. i5[t7].push(e5);
  643. }
  644. if (r5) {
  645. const e5 = (t6.mmax - t6.mmin) / 2;
  646. for (let t7 = 0; t7 < i5.length; t7++)
  647. i5[t7].push(e5);
  648. }
  649. return i5;
  650. }), hasZ: m5, hasM: r5, spatialReference: s6 };
  651. }
  652. _getParts(t5) {
  653. let i4 = this.cache._parts;
  654. if (!i4) {
  655. i4 = [];
  656. const { ymin: e5, ymax: s7, spatialReference: n3 } = this, m5 = this.width, r5 = this.xmin, a4 = this.xmax;
  657. let h3;
  658. t5 = t5 || R(n3);
  659. const [o5, x5] = t5.valid;
  660. h3 = this._normalizeX(this.xmin, t5);
  661. const p4 = h3.x, c5 = h3.frameId;
  662. h3 = this._normalizeX(this.xmax, t5);
  663. const y4 = h3.x, f5 = h3.frameId, d4 = p4 === y4 && m5 > 0;
  664. if (m5 > 2 * x5) {
  665. 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 = [];
  666. t6.contains(h4) && d5.push(c5), t6.contains(l4) && z3.push(c5), m6.contains(h4) && d5.push(f5), m6.contains(l4) && z3.push(f5);
  667. for (let i5 = c5 + 1; i5 < f5; i5++)
  668. d5.push(i5), z3.push(i5);
  669. i4.push({ extent: t6, frameIds: [c5] }, { extent: m6, frameIds: [f5] }, { extent: h4, frameIds: d5 }, { extent: l4, frameIds: z3 });
  670. } else
  671. 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] });
  672. this.cache._parts = i4;
  673. }
  674. const e4 = this.hasZ, s6 = this.hasM;
  675. if (e4 || s6) {
  676. const t6 = {};
  677. e4 && (t6.zmin = this.zmin, t6.zmax = this.zmax), s6 && (t6.mmin = this.mmin, t6.mmax = this.mmax);
  678. for (let e5 = 0; e5 < i4.length; e5++)
  679. i4[e5].extent.set(t6);
  680. }
  681. return i4;
  682. }
  683. _normalizeX(t5, i4) {
  684. const [e4, s6] = i4.valid, n3 = 2 * s6;
  685. let m5, r5 = 0;
  686. 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 };
  687. }
  688. };
  689. 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() {
  690. return { enabled: this.hasM };
  691. } } } })], z2.prototype, "mmin", void 0), e([d({ type: Number, json: { origins: { "web-scene": { write: false } }, write: { overridePolicy() {
  692. return { enabled: this.hasZ };
  693. } } } })], 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() {
  694. return { enabled: this.hasM };
  695. } } } })], z2.prototype, "mmax", void 0), e([d({ type: Number, json: { origins: { "web-scene": { write: false } }, write: { overridePolicy() {
  696. return { enabled: this.hasZ };
  697. } } } })], z2.prototype, "zmax", void 0), z2 = u4 = e([n("esri.geometry.Extent")], z2), z2.prototype.toJSON.isDefaultToJSON = true;
  698. var M2 = z2;
  699. export {
  700. o,
  701. p,
  702. s3 as s,
  703. t2 as t,
  704. e2 as e,
  705. c2 as c,
  706. g,
  707. M,
  708. y2 as y,
  709. d2 as d,
  710. R2 as R,
  711. j,
  712. j2,
  713. r4 as r,
  714. i2 as i,
  715. c3 as c2,
  716. s4 as s2,
  717. o4 as o2,
  718. p3 as p2,
  719. G2 as G,
  720. Z,
  721. M2
  722. };
  723. //# sourceMappingURL=chunk-ECW2QABR.js.map