chunk-4PH34UAV.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. import {
  2. d,
  3. l as l4,
  4. t as t2
  5. } from "./chunk-3TP6BVDH.js";
  6. import {
  7. s as s5,
  8. x
  9. } from "./chunk-GTTGW4YT.js";
  10. import {
  11. n as n4
  12. } from "./chunk-FAOWJMTO.js";
  13. import {
  14. l as l3
  15. } from "./chunk-CDZENOCQ.js";
  16. import {
  17. o
  18. } from "./chunk-O6VYMEIX.js";
  19. import {
  20. l as l2
  21. } from "./chunk-X4SA4ELJ.js";
  22. import {
  23. r as r2
  24. } from "./chunk-5N7JLUJJ.js";
  25. import {
  26. n as n3
  27. } from "./chunk-ZAY3CMAZ.js";
  28. import {
  29. n as n5,
  30. r as r3
  31. } from "./chunk-P3XKUGLS.js";
  32. import {
  33. j
  34. } from "./chunk-LBW34VZ2.js";
  35. import {
  36. m as m2
  37. } from "./chunk-YFSLJIO4.js";
  38. import {
  39. n as n2
  40. } from "./chunk-IM3LVQXV.js";
  41. import {
  42. s as s4
  43. } from "./chunk-YEJL5NEF.js";
  44. import {
  45. r
  46. } from "./chunk-PQFTYGF5.js";
  47. import {
  48. e,
  49. l3 as l,
  50. m,
  51. n5 as n,
  52. u2 as u,
  53. y3 as y2
  54. } from "./chunk-2Z2TG5CU.js";
  55. import {
  56. T,
  57. b
  58. } from "./chunk-SQOPWYIT.js";
  59. import {
  60. E,
  61. f
  62. } from "./chunk-V6P2MAQQ.js";
  63. import {
  64. s,
  65. s2,
  66. s3
  67. } from "./chunk-E5O6P5I2.js";
  68. import {
  69. y
  70. } from "./chunk-SPWQ3AWG.js";
  71. import {
  72. t
  73. } from "./chunk-YXWMMD76.js";
  74. // node_modules/@arcgis/core/ground/NavigationConstraint.js
  75. var t3;
  76. var p = t3 = class extends l {
  77. constructor(r5) {
  78. super(r5), this.type = "none";
  79. }
  80. clone() {
  81. return new t3({ type: this.type });
  82. }
  83. };
  84. e([r2({ none: "none", stayAbove: "stay-above" })], p.prototype, "type", void 0), p = t3 = e([n("esri.ground.NavigationConstraint")], p);
  85. // node_modules/@arcgis/core/views/3d/support/debugFlags.js
  86. var T2 = class extends m {
  87. constructor() {
  88. super(...arguments), this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR = false, this.DECONFLICTOR_SHOW_VISIBLE = false, this.DECONFLICTOR_SHOW_INVISIBLE = false, this.DECONFLICTOR_SHOW_GRID = false, this.LABELS_SHOW_BORDER = false, this.TEXT_SHOW_BASELINE = false, this.TEXT_SHOW_BORDER = false, this.OVERLAY_DRAW_DEBUG_TEXTURE = false, this.OVERLAY_SHOW_CENTER = false, this.SHOW_POI = false, this.TESTS_DISABLE_OPTIMIZATIONS = false, this.TESTS_DISABLE_FAST_UPDATES = false, this.DRAW_MESH_GEOMETRY_NORMALS = false, this.FEATURE_TILE_FETCH_SHOW_TILES = false, this.FEATURE_TILE_TREE_SHOW_TILES = false, this.TERRAIN_TILE_TREE_SHOW_TILES = false, this.I3S_TREE_SHOW_TILES = false, this.I3S_SHOW_MODIFICATIONS = false, this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES = false, this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL = false, this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES = false, this.LINE_WIREFRAMES = false, this.TERRAIN_USE_LEGACY_SHADING = false;
  89. }
  90. };
  91. e([y2()], T2.prototype, "SCENEVIEW_HITTEST_RETURN_INTERSECTOR", void 0), e([y2()], T2.prototype, "DECONFLICTOR_SHOW_VISIBLE", void 0), e([y2()], T2.prototype, "DECONFLICTOR_SHOW_INVISIBLE", void 0), e([y2()], T2.prototype, "DECONFLICTOR_SHOW_GRID", void 0), e([y2()], T2.prototype, "LABELS_SHOW_BORDER", void 0), e([y2()], T2.prototype, "TEXT_SHOW_BASELINE", void 0), e([y2()], T2.prototype, "TEXT_SHOW_BORDER", void 0), e([y2()], T2.prototype, "OVERLAY_DRAW_DEBUG_TEXTURE", void 0), e([y2()], T2.prototype, "OVERLAY_SHOW_CENTER", void 0), e([y2()], T2.prototype, "SHOW_POI", void 0), e([y2()], T2.prototype, "TESTS_DISABLE_OPTIMIZATIONS", void 0), e([y2()], T2.prototype, "TESTS_DISABLE_FAST_UPDATES", void 0), e([y2()], T2.prototype, "DRAW_MESH_GEOMETRY_NORMALS", void 0), e([y2()], T2.prototype, "FEATURE_TILE_FETCH_SHOW_TILES", void 0), e([y2()], T2.prototype, "FEATURE_TILE_TREE_SHOW_TILES", void 0), e([y2()], T2.prototype, "TERRAIN_TILE_TREE_SHOW_TILES", void 0), e([y2()], T2.prototype, "I3S_TREE_SHOW_TILES", void 0), e([y2()], T2.prototype, "I3S_SHOW_MODIFICATIONS", void 0), e([y2()], T2.prototype, "LOD_INSTANCE_RENDERER_DISABLE_UPDATES", void 0), e([y2()], T2.prototype, "LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL", void 0), e([y2()], T2.prototype, "EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES", void 0), e([y2()], T2.prototype, "LINE_WIREFRAMES", void 0), e([y2()], T2.prototype, "TERRAIN_USE_LEGACY_SHADING", void 0), T2 = e([n("esri.views.3d.support.DebugFlags")], T2);
  92. var t4 = new T2();
  93. // node_modules/@arcgis/core/Ground.js
  94. var C;
  95. var S = C = class extends u(m2) {
  96. constructor(r5) {
  97. super(r5), this.opacity = 1, this.shading = !t4.TERRAIN_USE_LEGACY_SHADING, this.surfaceColor = null, this.navigationConstraint = null, this.layers = new j();
  98. const e2 = (r6) => {
  99. r6.parent && r6.parent !== this && "remove" in r6.parent && r6.parent.remove(r6), r6.parent = this, "elevation" !== r6.type && "base-elevation" !== r6.type && s2.getLogger(this.declaredClass).error(`Layer '${r6.title}, id:${r6.id}' of type '${r6.type}' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported.`);
  100. }, t6 = (r6) => {
  101. r6.parent = null;
  102. };
  103. this.layers.on("after-add", (r6) => e2(r6.item)), this.layers.on("after-remove", (r6) => t6(r6.item));
  104. }
  105. initialize() {
  106. this.when().catch((r5) => {
  107. s2.getLogger(this.declaredClass).error("#load()", "Failed to load ground", r5);
  108. }), this.resourceInfo && this.read(this.resourceInfo.data, this.resourceInfo.context);
  109. }
  110. destroy() {
  111. const r5 = this.layers.removeAll();
  112. for (const e2 of r5)
  113. e2.destroy();
  114. this.layers.destroy();
  115. }
  116. normalizeCtorArgs(r5) {
  117. return r5 && "resourceInfo" in r5 && (this._set("resourceInfo", r5.resourceInfo), delete (r5 = { ...r5 }).resourceInfo), r5;
  118. }
  119. set layers(r5) {
  120. this._set("layers", n3(r5, this._get("layers")));
  121. }
  122. writeLayers(r5, e2, o2, t6) {
  123. const i3 = [];
  124. r5 ? (t6 = { ...t6, layerContainerType: "ground" }, r5.forEach((r6) => {
  125. if ("write" in r6) {
  126. const e3 = {};
  127. o(r6)().write(e3, t6) && i3.push(e3);
  128. } else
  129. t6 && t6.messages && t6.messages.push(new s3("layer:unsupported", `Layers (${r6.title}, ${r6.id}) of type '${r6.declaredClass}' cannot be persisted in the ground`, { layer: r6 }));
  130. }), e2.layers = i3) : e2.layers = i3;
  131. }
  132. load(r5) {
  133. return this.addResolvingPromise(this._loadFromSource(r5)), Promise.resolve(this);
  134. }
  135. loadAll() {
  136. return n4(this, (r5) => {
  137. r5(this.layers);
  138. });
  139. }
  140. async queryElevation(r5, e2) {
  141. await this.load({ signal: e2 == null ? void 0 : e2.signal });
  142. const { ElevationQuery: o2 } = await import("./ElevationQuery-PFI6RXXM.js");
  143. f(e2);
  144. const t6 = new o2(), s6 = this.layers.filter(A).toArray();
  145. return t6.queryAll(s6, r5, e2);
  146. }
  147. async createElevationSampler(r5, e2) {
  148. await this.load({ signal: e2 == null ? void 0 : e2.signal });
  149. const { ElevationQuery: o2 } = await import("./ElevationQuery-PFI6RXXM.js");
  150. f(e2);
  151. const t6 = new o2(), s6 = this.layers.filter(A).toArray();
  152. return t6.createSamplerAll(s6, r5, e2);
  153. }
  154. clone() {
  155. const r5 = { opacity: this.opacity, surfaceColor: y(this.surfaceColor), navigationConstraint: y(this.navigationConstraint), layers: this.layers.slice() };
  156. return this.loaded && (r5.loadStatus = "loaded"), new C({ resourceInfo: this.resourceInfo }).set(r5);
  157. }
  158. read(r5, e2) {
  159. this.resourceInfo || this._set("resourceInfo", { data: r5, context: e2 }), super.read(r5, e2);
  160. }
  161. _loadFromSource(r5) {
  162. const e2 = this.resourceInfo;
  163. return e2 ? this._loadLayersFromJSON(e2.data, e2.context, r5) : Promise.resolve();
  164. }
  165. _loadLayersFromJSON(r5, e2, o2) {
  166. const t6 = e2 && e2.origin || "web-scene", s6 = e2 && e2.portal || null, a = e2 && e2.url || null;
  167. return import("./layersCreator-NMJW6DZD.js").then(({ populateOperationalLayers: e3 }) => {
  168. f(o2);
  169. const i3 = [];
  170. if (r5.layers && Array.isArray(r5.layers)) {
  171. const o3 = { context: { origin: t6, url: a, portal: s6, layerContainerType: "ground" }, defaultLayerType: "ArcGISTiledElevationServiceLayer" };
  172. i3.push(e3(this.layers, r5.layers, o3));
  173. }
  174. return E(i3);
  175. }).then(() => {
  176. });
  177. }
  178. };
  179. function I(r5) {
  180. return r5 && "createElevationSampler" in r5;
  181. }
  182. function A(r5) {
  183. return "elevation" === r5.type || I(r5);
  184. }
  185. e([y2({ json: { read: false } })], S.prototype, "layers", null), e([r("layers")], S.prototype, "writeLayers", null), e([y2({ readOnly: true })], S.prototype, "resourceInfo", void 0), e([y2({ type: Number, nonNullable: true, range: { min: 0, max: 1 }, json: { type: T, read: { reader: r3, source: "transparency" }, write: { writer: (r5, e2) => {
  186. e2.transparency = n5(r5);
  187. }, target: "transparency" } } })], S.prototype, "opacity", void 0), e([y2({ type: Boolean, nonNullable: true, json: { read: false } })], S.prototype, "shading", void 0), e([y2({ type: l2, json: { type: [T], write: (r5, e2) => {
  188. e2.surfaceColor = r5.toJSON().slice(0, 3);
  189. } } })], S.prototype, "surfaceColor", void 0), e([y2({ type: p, json: { write: true } })], S.prototype, "navigationConstraint", void 0), S = C = e([n("esri.Ground")], S);
  190. var L = S;
  191. // node_modules/@arcgis/core/layers/support/editableLayers.js
  192. function i(i3) {
  193. var _a;
  194. return !!(i3 && i3.loaded && "capabilities" in i3 && ((_a = i3 == null ? void 0 : i3.capabilities) == null ? void 0 : _a.operations) && "supportsEditing" in i3.capabilities.operations && true === i3.capabilities.operations.supportsEditing) && !("editingEnabled" in i3 && !i3.editingEnabled);
  195. }
  196. // node_modules/@arcgis/core/support/basemapUtils.js
  197. var f2 = s2.getLogger("esri.support.basemapUtils");
  198. function p2() {
  199. return {};
  200. }
  201. function y4(e2) {
  202. for (const r5 in e2) {
  203. const a = e2[r5];
  204. false === (a == null ? void 0 : a.destroyed) && a.destroy(), delete e2[r5];
  205. }
  206. }
  207. function m3(a, t6) {
  208. let n6;
  209. if ("string" == typeof a) {
  210. if (!(a in s5)) {
  211. const e2 = Object.entries(s5).filter(([e3, a2]) => s.apiKey && !a2.classic || !s.apiKey && a2.classic && !a2.deprecated).map(([e3]) => `"${e3}"`).join(", ");
  212. return f2.warn(`Unable to find basemap definition for: ${a}. Try one of these: ${e2}`), null;
  213. }
  214. t6 && (n6 = t6[a]), n6 || (n6 = x.fromId(a), t6 && (t6[a] = n6));
  215. } else
  216. n6 = b(x, a);
  217. return (n6 == null ? void 0 : n6.destroyed) && (f2.warn("The provided basemap is already destroyed", { basemap: n6 }), n6 = null), n6;
  218. }
  219. // node_modules/@arcgis/core/support/groundUtils.js
  220. var i2 = { "world-elevation": { id: "worldElevation", url: "//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer", layerType: "ArcGISTiledElevationServiceLayer" }, "world-topobathymetry": { id: "worldTopoBathymetry", url: "//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/TopoBathy3D/ImageServer", layerType: "ArcGISTiledElevationServiceLayer" } };
  221. function t5(t6) {
  222. let a = null;
  223. if ("string" == typeof t6)
  224. if (t6 in i2) {
  225. const r5 = i2[t6];
  226. a = new L({ resourceInfo: { data: { layers: [r5] } } });
  227. } else
  228. s2.getLogger("esri.support.groundUtils").warn(`Unable to find ground definition for: ${t6}. Try "world-elevation"`);
  229. else
  230. a = b(L, t6);
  231. return a;
  232. }
  233. // node_modules/@arcgis/core/Map.js
  234. var j2 = class extends l4(d(n2.EventedMixin(m))) {
  235. constructor(s6) {
  236. super(s6), this.allLayers = new l3({ getCollections: () => {
  237. var _a, _b, _c;
  238. return [(_a = this.basemap) == null ? void 0 : _a.baseLayers, (_b = this.ground) == null ? void 0 : _b.layers, this.layers, (_c = this.basemap) == null ? void 0 : _c.referenceLayers];
  239. }, getChildrenFunction: (s7) => "layers" in s7 ? s7.layers : null }), this.allTables = t2(this), this.basemap = null, this.editableLayers = new l3({ getCollections: () => [this.allLayers], itemFilterFunction: i }), this.ground = new L(), this._basemapCache = p2();
  240. }
  241. destroy() {
  242. var _a, _b;
  243. this.allLayers.destroy(), this.allTables.destroy(), this.editableLayers.destroy(), (_a = this.ground) == null ? void 0 : _a.destroy(), (_b = this.basemap) == null ? void 0 : _b.destroy(), y4(this._basemapCache), this._basemapCache = null;
  244. }
  245. castBasemap(s6) {
  246. return m3(s6, this._basemapCache);
  247. }
  248. castGround(s6) {
  249. const e2 = t5(s6);
  250. return t(e2) ? this._get("ground") : e2;
  251. }
  252. findLayerById(s6) {
  253. return this.allLayers.find((e2) => e2.id === s6);
  254. }
  255. findTableById(s6) {
  256. return this.allTables.find((e2) => e2.id === s6);
  257. }
  258. };
  259. e([y2({ readOnly: true, dependsOn: [] })], j2.prototype, "allLayers", void 0), e([y2({ readOnly: true })], j2.prototype, "allTables", void 0), e([y2({ type: x })], j2.prototype, "basemap", void 0), e([s4("basemap")], j2.prototype, "castBasemap", null), e([y2({ readOnly: true })], j2.prototype, "editableLayers", void 0), e([y2({ type: L, nonNullable: true })], j2.prototype, "ground", void 0), e([s4("ground")], j2.prototype, "castGround", null), j2 = e([n("esri.Map")], j2);
  260. var L2 = j2;
  261. export {
  262. L2 as L
  263. };
  264. //# sourceMappingURL=chunk-4PH34UAV.js.map