chunk-CXCDYJ5R.js 28 KB

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