BuildingSceneLayer-V62HGRKT.js 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. import {
  2. l as l4,
  3. t as t5,
  4. ye
  5. } from "./chunk-F2ZAJBUD.js";
  6. import {
  7. d as d2,
  8. s as s7
  9. } from "./chunk-TE2TRGVU.js";
  10. import {
  11. l as l3,
  12. m as m3,
  13. s as s6,
  14. u
  15. } from "./chunk-NXF22CVW.js";
  16. import {
  17. L,
  18. N,
  19. n as n5
  20. } from "./chunk-DRPR56GA.js";
  21. import "./chunk-L5R6EFI6.js";
  22. import "./chunk-RMZNH22Z.js";
  23. import "./chunk-A22ACVMF.js";
  24. import "./chunk-X4WJNVEM.js";
  25. import "./chunk-ZNJHHCMJ.js";
  26. import "./chunk-LX2NI53X.js";
  27. import "./chunk-IZUZZJS7.js";
  28. import "./chunk-RUM3DXFX.js";
  29. import "./chunk-W3XAGTM6.js";
  30. import "./chunk-44FMXGSC.js";
  31. import "./chunk-XFDO4CMR.js";
  32. import "./chunk-GHN7C53L.js";
  33. import "./chunk-56OWH4DC.js";
  34. import "./chunk-ZCAE6QVH.js";
  35. import "./chunk-K7B6OWCU.js";
  36. import {
  37. Ze
  38. } from "./chunk-WM52QDLS.js";
  39. import "./chunk-MEZ7BUMM.js";
  40. import "./chunk-7B57NUGF.js";
  41. import "./chunk-AOQ55JXI.js";
  42. import "./chunk-X42TFXOU.js";
  43. import "./chunk-JFSMKLAQ.js";
  44. import "./chunk-LXOC7SMQ.js";
  45. import {
  46. s as s5
  47. } from "./chunk-DN6W4TJU.js";
  48. import "./chunk-OUUXJOLT.js";
  49. import "./chunk-PLQUCCQV.js";
  50. import "./chunk-JZAS4TIG.js";
  51. import "./chunk-VBR5BOXI.js";
  52. import "./chunk-NBKUI76A.js";
  53. import "./chunk-6334AFGG.js";
  54. import "./chunk-NLLFSKB2.js";
  55. import "./chunk-LC3GBQ56.js";
  56. import "./chunk-5GYJGY4C.js";
  57. import "./chunk-O3JQY77G.js";
  58. import "./chunk-OXF7W4BJ.js";
  59. import "./chunk-P24XEEHY.js";
  60. import "./chunk-SAJAEMIJ.js";
  61. import "./chunk-S6EFEKAU.js";
  62. import {
  63. n as n3
  64. } from "./chunk-I4RYNNL6.js";
  65. import "./chunk-2RHPWGZL.js";
  66. import "./chunk-XEQ4FTFC.js";
  67. import "./chunk-JM5OVQAD.js";
  68. import "./chunk-OJ2HHY2O.js";
  69. import "./chunk-S3GK7VUF.js";
  70. import "./chunk-TU7WVKU4.js";
  71. import {
  72. i as i2
  73. } from "./chunk-WWXZOC2Y.js";
  74. import {
  75. p
  76. } from "./chunk-ZOKNWEG3.js";
  77. import "./chunk-NQA5XJGK.js";
  78. import "./chunk-EKYSPJO6.js";
  79. import "./chunk-JAUFBT5U.js";
  80. import "./chunk-W6U6FKJ3.js";
  81. import {
  82. p as p2
  83. } from "./chunk-7C2KDOAI.js";
  84. import {
  85. n as n4
  86. } from "./chunk-RHFU6KWO.js";
  87. import "./chunk-3FNKD2EB.js";
  88. import "./chunk-ZOO4I2U4.js";
  89. import "./chunk-JPUFJK2B.js";
  90. import "./chunk-HZ2WKB3G.js";
  91. import "./chunk-3HCJD762.js";
  92. import "./chunk-RVCE264D.js";
  93. import "./chunk-HKJ7X3BD.js";
  94. import "./chunk-Y74D3LKQ.js";
  95. import "./chunk-PK4W65H4.js";
  96. import {
  97. g
  98. } from "./chunk-7C23ILQ4.js";
  99. import {
  100. k as k2
  101. } from "./chunk-P6VVVEX6.js";
  102. import {
  103. t as t4
  104. } from "./chunk-3Z755LKF.js";
  105. import "./chunk-LTZ5XXDV.js";
  106. import "./chunk-IEU3AM37.js";
  107. import "./chunk-SKKBVHTF.js";
  108. import "./chunk-DLMAGHHC.js";
  109. import {
  110. x
  111. } from "./chunk-WD4J43GZ.js";
  112. import "./chunk-JOYXMSKE.js";
  113. import "./chunk-SZFMKPVM.js";
  114. import "./chunk-YZVAB3DF.js";
  115. import "./chunk-JLYTER4T.js";
  116. import "./chunk-CRHRHOXH.js";
  117. import "./chunk-ZSW35JPD.js";
  118. import {
  119. r as r3
  120. } from "./chunk-JLSNMUQJ.js";
  121. import "./chunk-ECY35CJI.js";
  122. import "./chunk-PT62335L.js";
  123. import "./chunk-JGBXYDGB.js";
  124. import "./chunk-QEWF7QPH.js";
  125. import "./chunk-PJNBFKPF.js";
  126. import "./chunk-C7742RNZ.js";
  127. import "./chunk-FNA5GLRW.js";
  128. import "./chunk-MCWCB5IY.js";
  129. import "./chunk-TV3CFJQR.js";
  130. import "./chunk-TJV6ODRM.js";
  131. import {
  132. v
  133. } from "./chunk-JUWKPBLS.js";
  134. import {
  135. c
  136. } from "./chunk-WLSB4F4I.js";
  137. import {
  138. b,
  139. d,
  140. p as p3,
  141. y as y3
  142. } from "./chunk-GLSWDDR3.js";
  143. import {
  144. O,
  145. S
  146. } from "./chunk-MIQGEDET.js";
  147. import {
  148. x as x2
  149. } from "./chunk-DUEMJ5XS.js";
  150. import "./chunk-VRLXUHP2.js";
  151. import "./chunk-3LVSQLWJ.js";
  152. import "./chunk-4ONPMX2F.js";
  153. import {
  154. v as v2
  155. } from "./chunk-CRGY2SDS.js";
  156. import "./chunk-4T5ZGMEN.js";
  157. import "./chunk-GN35O2ZO.js";
  158. import "./chunk-XTVKPAWY.js";
  159. import "./chunk-3OSQ6GXO.js";
  160. import "./chunk-3WQOA5CB.js";
  161. import {
  162. t as t3
  163. } from "./chunk-PLWDAYK7.js";
  164. import "./chunk-FZQZIM7U.js";
  165. import "./chunk-CZBRZ6SU.js";
  166. import "./chunk-VGWC3IKZ.js";
  167. import "./chunk-2H5MD622.js";
  168. import "./chunk-3RSFVUKZ.js";
  169. import "./chunk-UVVU4UUO.js";
  170. import "./chunk-HWSWTWZD.js";
  171. import {
  172. i,
  173. n as n2
  174. } from "./chunk-FAOWJMTO.js";
  175. import {
  176. l as l2
  177. } from "./chunk-CDZENOCQ.js";
  178. import "./chunk-O6VYMEIX.js";
  179. import "./chunk-X4SA4ELJ.js";
  180. import {
  181. r as r2
  182. } from "./chunk-5N7JLUJJ.js";
  183. import "./chunk-ZAY3CMAZ.js";
  184. import "./chunk-P3XKUGLS.js";
  185. import "./chunk-2ZSOO377.js";
  186. import "./chunk-YUA3AHKR.js";
  187. import "./chunk-LU5IJZB4.js";
  188. import "./chunk-7IBV2TRE.js";
  189. import "./chunk-ZLNEXZAN.js";
  190. import "./chunk-5UVJ64RB.js";
  191. import "./chunk-SFEFRQCL.js";
  192. import {
  193. b as b2
  194. } from "./chunk-DXVOOCG4.js";
  195. import {
  196. s as s4
  197. } from "./chunk-3GZSQU56.js";
  198. import "./chunk-ZYRIJWLX.js";
  199. import "./chunk-RYY6632W.js";
  200. import "./chunk-DW42UVIT.js";
  201. import "./chunk-YAEIHDJH.js";
  202. import "./chunk-TJNOJH33.js";
  203. import "./chunk-OSHI574D.js";
  204. import "./chunk-ETGAZ7LF.js";
  205. import "./chunk-75U5LM2V.js";
  206. import "./chunk-RMDDCMKS.js";
  207. import "./chunk-VCH45Q2I.js";
  208. import {
  209. j
  210. } from "./chunk-LBW34VZ2.js";
  211. import "./chunk-GSSTTHIT.js";
  212. import {
  213. m as m2
  214. } from "./chunk-YFSLJIO4.js";
  215. import "./chunk-IM3LVQXV.js";
  216. import {
  217. m
  218. } from "./chunk-55RWC67C.js";
  219. import {
  220. s as s3
  221. } from "./chunk-HZRKBTHJ.js";
  222. import {
  223. U
  224. } from "./chunk-DVUG3KID.js";
  225. import "./chunk-FWSQEIAR.js";
  226. import {
  227. G
  228. } from "./chunk-VEGAOVMY.js";
  229. import {
  230. o,
  231. w2
  232. } from "./chunk-6T6G6LCQ.js";
  233. import "./chunk-YEJL5NEF.js";
  234. import {
  235. k2 as k
  236. } from "./chunk-PQFTYGF5.js";
  237. import {
  238. e,
  239. l3 as l,
  240. n5 as n,
  241. t5 as t2,
  242. y3 as y2
  243. } from "./chunk-2Z2TG5CU.js";
  244. import "./chunk-6KZ2LTDA.js";
  245. import "./chunk-U2XHEJM7.js";
  246. import {
  247. T
  248. } from "./chunk-SQOPWYIT.js";
  249. import {
  250. w
  251. } from "./chunk-V6P2MAQQ.js";
  252. import {
  253. s2 as s,
  254. s3 as s2
  255. } from "./chunk-E5O6P5I2.js";
  256. import {
  257. y
  258. } from "./chunk-SPWQ3AWG.js";
  259. import "./chunk-2TIUKVZN.js";
  260. import {
  261. r,
  262. t
  263. } from "./chunk-YXWMMD76.js";
  264. import "./chunk-S5KM4IGW.js";
  265. // node_modules/@arcgis/core/layers/buildingSublayers/BuildingSublayer.js
  266. var l5 = class extends s4(S) {
  267. constructor(e3) {
  268. super(e3), this.title = "", this.id = -1, this.modelName = null, this.isEmpty = null, this.visible = true, this.opacity = 1;
  269. }
  270. readTitle(e3, r4) {
  271. return "string" == typeof r4.alias ? r4.alias : "string" == typeof r4.name ? r4.name : "";
  272. }
  273. readIdOnlyOnce(e3) {
  274. return -1 !== this.id ? this.id : "number" == typeof e3 ? e3 : -1;
  275. }
  276. };
  277. e([y2({ type: String, json: { origins: { "web-scene": { write: true }, "portal-item": { write: true } } } })], l5.prototype, "title", void 0), e([o("service", "title", ["alias", "name"])], l5.prototype, "readTitle", null), e([y2()], l5.prototype, "layer", void 0), e([y2({ type: T, readOnly: true, json: { read: false, write: { ignoreOrigin: true } } })], l5.prototype, "id", void 0), e([o("service", "id")], l5.prototype, "readIdOnlyOnce", null), e([y2(y3(String))], l5.prototype, "modelName", void 0), e([y2(y3(Boolean))], l5.prototype, "isEmpty", void 0), e([y2({ type: Boolean, json: { name: "visibility", write: true } })], l5.prototype, "visible", void 0), e([y2({ type: Number, json: { write: true } })], l5.prototype, "opacity", void 0), l5 = e([n("esri.layers.buildingSublayers.BuildingSublayer")], l5);
  278. var n6 = l5;
  279. // node_modules/@arcgis/core/layers/buildingSublayers/BuildingComponentSublayer.js
  280. var A = "esri.layers.buildingSublayers.BuildingComponentSublayer";
  281. var _ = s.getLogger(A);
  282. var C = s5();
  283. var N2 = class extends m2.LoadableMixin(m(n6)) {
  284. constructor(e3) {
  285. super(e3), this.type = "building-component", this.nodePages = null, this.materialDefinitions = [], this.textureSetDefinitions = [], this.geometryDefinitions = [], this.indexInfo = null, this.serviceUpdateTimeStamp = null, this.store = null, this.attributeStorageInfo = [], this.fields = [], this.associatedLayer = null, this.outFields = null, this.listMode = "show", this.renderer = null, this.definitionExpression = null, this.popupEnabled = true, this.popupTemplate = null, this.layerType = "3d-object";
  286. }
  287. get parsedUrl() {
  288. var _a, _b;
  289. return this.layer ? { path: `${(_a = this.layer.parsedUrl) == null ? void 0 : _a.path}/sublayers/${this.id}`, query: (_b = this.layer.parsedUrl) == null ? void 0 : _b.query } : { path: "" };
  290. }
  291. get fieldsIndex() {
  292. return new r3(this.fields);
  293. }
  294. readAssociatedLayer(e3, r4) {
  295. const t9 = this.layer.associatedFeatureServiceItem, o2 = r4.associatedLayerID;
  296. return r(t9) && "number" == typeof o2 ? new Ze({ portalItem: t9, layerId: o2 }) : null;
  297. }
  298. get objectIdField() {
  299. if (null != this.fields) {
  300. for (const e3 of this.fields)
  301. if ("oid" === e3.type)
  302. return e3.name;
  303. }
  304. return null;
  305. }
  306. get displayField() {
  307. return r(this.associatedLayer) ? this.associatedLayer.displayField : void 0;
  308. }
  309. get apiKey() {
  310. return this.layer.apiKey;
  311. }
  312. get fullExtent() {
  313. return this.layer.fullExtent;
  314. }
  315. get spatialReference() {
  316. return this.layer.spatialReference;
  317. }
  318. get version() {
  319. return this.layer.version;
  320. }
  321. get elevationInfo() {
  322. return this.layer.elevationInfo;
  323. }
  324. get minScale() {
  325. return this.layer.minScale;
  326. }
  327. get maxScale() {
  328. return this.layer.maxScale;
  329. }
  330. get effectiveScaleRange() {
  331. return this.layer.effectiveScaleRange;
  332. }
  333. get defaultPopupTemplate() {
  334. return this.createPopupTemplate();
  335. }
  336. load(e3) {
  337. const r4 = r(e3) ? e3.signal : null, t9 = this._fetchService(r4).then(() => {
  338. this.indexInfo = n5(this.parsedUrl.path, this.rootNode, this.nodePages, this.apiKey, _, r4);
  339. });
  340. return this.addResolvingPromise(t9), Promise.resolve(this);
  341. }
  342. createPopupTemplate(e3) {
  343. return p2(this, e3);
  344. }
  345. async _fetchService(e3) {
  346. const r4 = (await U(this.parsedUrl.path, { query: { f: "json", token: this.apiKey }, responseType: "json", signal: e3 })).data;
  347. this.read(r4, { origin: "service", url: this.parsedUrl });
  348. }
  349. getField(e3) {
  350. return this.fieldsIndex.get(e3);
  351. }
  352. getFieldDomain(e3, r4) {
  353. var _a, _b, _c, _d;
  354. const t9 = (_b = (_a = this.getFeatureType(r4 == null ? void 0 : r4.feature)) == null ? void 0 : _a.domains) == null ? void 0 : _b[e3];
  355. return t9 && "inherited" !== t9.type ? t9 : (_d = (_c = this.getField(e3)) == null ? void 0 : _c.domain) != null ? _d : null;
  356. }
  357. getFeatureType(e3) {
  358. return e3 && r(this.associatedLayer) ? this.associatedLayer.getFeatureType(e3) : null;
  359. }
  360. get types() {
  361. var _a;
  362. return r(this.associatedLayer) ? (_a = this.associatedLayer.types) != null ? _a : [] : [];
  363. }
  364. get typeIdField() {
  365. return r(this.associatedLayer) ? this.associatedLayer.typeIdField : null;
  366. }
  367. get geometryType() {
  368. return "3d-object" === this.layerType ? "mesh" : "point";
  369. }
  370. get profile() {
  371. return "3d-object" === this.layerType ? "mesh-pyramids" : "points";
  372. }
  373. get capabilities() {
  374. const e3 = r(this.associatedLayer) && this.associatedLayer.capabilities ? this.associatedLayer.capabilities : t5, { query: r4, data: { supportsZ: t9, supportsM: o2, isVersioned: s8 } } = e3;
  375. return { query: r4, data: { supportsZ: t9, supportsM: o2, isVersioned: s8 } };
  376. }
  377. createQuery() {
  378. const e3 = new x();
  379. return "mesh" !== this.geometryType && (e3.returnGeometry = true, e3.returnZ = true), e3.where = this.definitionExpression || "1=1", e3.sqlFormat = "standard", e3;
  380. }
  381. queryExtent(e3, r4) {
  382. return this._getAssociatedLayerForQuery().then((t9) => t9.queryExtent(e3 || this.createQuery(), r4));
  383. }
  384. queryFeatureCount(e3, r4) {
  385. return this._getAssociatedLayerForQuery().then((t9) => t9.queryFeatureCount(e3 || this.createQuery(), r4));
  386. }
  387. queryFeatures(e3, r4) {
  388. return this._getAssociatedLayerForQuery().then((t9) => t9.queryFeatures(e3 || this.createQuery(), r4)).then((e4) => {
  389. if (e4 == null ? void 0 : e4.features)
  390. for (const r5 of e4.features)
  391. r5.layer = this.layer, r5.sourceLayer = this;
  392. return e4;
  393. });
  394. }
  395. queryObjectIds(e3, r4) {
  396. return this._getAssociatedLayerForQuery().then((t9) => t9.queryObjectIds(e3 || this.createQuery(), r4));
  397. }
  398. async queryCachedAttributes(e3, r4) {
  399. const t9 = v2(this.fieldsIndex, await d2(this, s7(this)));
  400. return ye(this.parsedUrl.path, this.attributeStorageInfo, e3, r4, t9);
  401. }
  402. async queryCachedFeature(e3, t9) {
  403. const o2 = await this.queryCachedAttributes(e3, [t9]);
  404. if (!o2 || 0 === o2.length)
  405. throw new s2("scenelayer:feature-not-in-cached-data", "Feature not found in cached data");
  406. const s8 = new g();
  407. return s8.attributes = o2[0], s8.layer = this, s8.sourceLayer = this, s8;
  408. }
  409. getFieldUsageInfo(e3) {
  410. return this.fieldsIndex.has(e3) ? { supportsLabelingInfo: false, supportsRenderer: false, supportsPopupTemplate: false, supportsLayerQuery: false } : { supportsLabelingInfo: false, supportsRenderer: true, supportsPopupTemplate: true, supportsLayerQuery: r(this.associatedLayer) };
  411. }
  412. _getAssociatedLayerForQuery() {
  413. const e3 = this.associatedLayer;
  414. return r(e3) && e3.loaded ? Promise.resolve(e3) : this._loadAssociatedLayerForQuery();
  415. }
  416. async _loadAssociatedLayerForQuery() {
  417. if (await this.load(), t(this.associatedLayer))
  418. throw new s2("buildingscenelayer:query-not-available", "BuildingSceneLayer component layer queries are not available without an associated feature layer", { layer: this });
  419. try {
  420. await this.associatedLayer.load();
  421. } catch (e3) {
  422. throw new s2("buildingscenelayer:query-not-available", "BuildingSceneLayer associated feature layer could not be loaded", { layer: this, error: e3 });
  423. }
  424. return this.associatedLayer;
  425. }
  426. };
  427. e([y2({ readOnly: true })], N2.prototype, "parsedUrl", null), e([y2({ type: s6, readOnly: true })], N2.prototype, "nodePages", void 0), e([y2({ type: [l3], readOnly: true })], N2.prototype, "materialDefinitions", void 0), e([y2({ type: [u], readOnly: true })], N2.prototype, "textureSetDefinitions", void 0), e([y2({ type: [m3], readOnly: true })], N2.prototype, "geometryDefinitions", void 0), e([y2({ readOnly: true })], N2.prototype, "serviceUpdateTimeStamp", void 0), e([y2({ readOnly: true })], N2.prototype, "store", void 0), e([y2({ type: String, readOnly: true, json: { read: { source: "store.rootNode" } } })], N2.prototype, "rootNode", void 0), e([y2({ readOnly: true })], N2.prototype, "attributeStorageInfo", void 0), e([y2(C.fields)], N2.prototype, "fields", void 0), e([y2({ readOnly: true })], N2.prototype, "fieldsIndex", null), e([y2({ readOnly: true, type: Ze })], N2.prototype, "associatedLayer", void 0), e([o("service", "associatedLayer", ["associatedLayerID"])], N2.prototype, "readAssociatedLayer", null), e([y2(C.outFields)], N2.prototype, "outFields", void 0), e([y2({ type: String, readOnly: true })], N2.prototype, "objectIdField", null), e([y2({ readOnly: true, type: String, json: { read: false } })], N2.prototype, "displayField", null), e([y2({ readOnly: true, type: String })], N2.prototype, "apiKey", null), e([y2({ readOnly: true, type: w2 })], N2.prototype, "fullExtent", null), e([y2({ readOnly: true, type: k })], N2.prototype, "spatialReference", null), e([y2({ readOnly: true })], N2.prototype, "version", null), e([y2({ readOnly: true, type: x2 })], N2.prototype, "elevationInfo", null), e([y2({ readOnly: true, type: Number })], N2.prototype, "minScale", null), e([y2({ readOnly: true, type: Number })], N2.prototype, "maxScale", null), e([y2({ readOnly: true, type: Number })], N2.prototype, "effectiveScaleRange", null), e([y2({ type: ["hide", "show"], json: { write: true } })], N2.prototype, "listMode", void 0), e([y2({ types: n4, json: { origins: { service: { read: { source: "drawingInfo.renderer" } } }, name: "layerDefinition.drawingInfo.renderer", write: true }, value: null })], N2.prototype, "renderer", void 0), e([y2({ type: String, json: { origins: { service: { read: false, write: false } }, name: "layerDefinition.definitionExpression", write: { enabled: true, allowNull: true } } })], N2.prototype, "definitionExpression", void 0), e([y2(p3)], N2.prototype, "popupEnabled", void 0), e([y2({ type: k2, json: { read: { source: "popupInfo" }, write: { target: "popupInfo" } } })], N2.prototype, "popupTemplate", void 0), e([y2({ readOnly: true, type: String, json: { origins: { service: { read: { source: "store.normalReferenceFrame" } } }, read: false } })], N2.prototype, "normalReferenceFrame", void 0), e([y2({ readOnly: true, json: { read: false } })], N2.prototype, "defaultPopupTemplate", null), e([y2()], N2.prototype, "types", null), e([y2()], N2.prototype, "typeIdField", null), e([y2({ json: { write: false } }), r2(new s3({ "3DObject": "3d-object", Point: "point" }))], N2.prototype, "layerType", void 0), e([y2()], N2.prototype, "geometryType", null), e([y2()], N2.prototype, "profile", null), e([y2({ readOnly: true, json: { read: false } })], N2.prototype, "capabilities", null), N2 = e([n(A)], N2);
  428. var M = N2;
  429. // node_modules/@arcgis/core/layers/buildingSublayers/BuildingGroupSublayer.js
  430. var a;
  431. var l6 = { type: j, readOnly: true, json: { origins: { service: { read: { source: "sublayers", reader: p4 } } }, read: false } };
  432. function p4(r4, o2, t9) {
  433. if (r4 && Array.isArray(r4))
  434. return new j(r4.map((r5) => {
  435. const e3 = y4(r5);
  436. if (e3) {
  437. const o3 = new e3();
  438. return o3.read(r5, t9), o3;
  439. }
  440. return t9 && t9.messages && r5 && t9.messages.push(new t2("building-scene-layer:unsupported-sublayer-type", "Building scene sublayer of type '" + (r5.type || "unknown") + "' are not supported", { definition: r5, context: t9 })), null;
  441. }));
  442. }
  443. var c2 = a = class extends n6 {
  444. constructor(r4) {
  445. super(r4), this.type = "building-group", this.listMode = "show", this.sublayers = null;
  446. }
  447. loadAll() {
  448. return i(this, (r4) => a.forEachSublayer(this.sublayers, (e3) => {
  449. "building-group" !== e3.type && r4(e3);
  450. }));
  451. }
  452. };
  453. function y4(r4) {
  454. return "group" === r4.layerType ? c2 : M;
  455. }
  456. e([y2({ type: ["hide", "show", "hide-children"], json: { write: true } })], c2.prototype, "listMode", void 0), e([y2(l6)], c2.prototype, "sublayers", void 0), c2 = a = e([n("esri.layers.buildingSublayers.BuildingGroupSublayer")], c2), function(r4) {
  457. function e3(r5, o2) {
  458. r5.forEach((r6) => {
  459. o2(r6), "building-group" === r6.type && e3(r6.sublayers, o2);
  460. });
  461. }
  462. r4.sublayersProperty = l6, r4.readSublayers = p4, r4.forEachSublayer = e3;
  463. }(c2 || (c2 = {}));
  464. var d3 = c2;
  465. // node_modules/@arcgis/core/layers/support/BuildingFilterAuthoringInfo.js
  466. var e2 = class extends l {
  467. constructor() {
  468. super(...arguments), this.type = null;
  469. }
  470. };
  471. e([y2({ type: String, readOnly: true, json: { write: true } })], e2.prototype, "type", void 0), e2 = e([n("esri.layers.support.BuildingFilterAuthoringInfo")], e2);
  472. var p5 = e2;
  473. // node_modules/@arcgis/core/layers/support/BuildingFilterAuthoringInfoType.js
  474. var p6;
  475. var i3 = p6 = class extends l {
  476. constructor() {
  477. super(...arguments), this.filterType = null, this.filterValues = null;
  478. }
  479. clone() {
  480. return new p6({ filterType: this.filterType, filterValues: y(this.filterValues) });
  481. }
  482. };
  483. e([y2({ type: String, json: { write: true } })], i3.prototype, "filterType", void 0), e([y2({ type: [String], json: { write: true } })], i3.prototype, "filterValues", void 0), i3 = p6 = e([n("esri.layers.support.BuildingFilterAuthoringInfoType")], i3);
  484. var l7 = i3;
  485. // node_modules/@arcgis/core/layers/support/BuildingFilterAuthoringInfoBlock.js
  486. var c3;
  487. var l8 = j.ofType(l7);
  488. var n7 = c3 = class extends l {
  489. clone() {
  490. return new c3({ filterTypes: y(this.filterTypes) });
  491. }
  492. };
  493. e([y2({ type: l8, json: { write: true } })], n7.prototype, "filterTypes", void 0), n7 = c3 = e([n("esri.layers.support.BuildingFilterAuthoringInfoBlock")], n7);
  494. var m4 = n7;
  495. // node_modules/@arcgis/core/layers/support/BuildingFilterAuthoringInfoCheckbox.js
  496. var p7;
  497. var l9 = j.ofType(m4);
  498. var n8 = p7 = class extends p5 {
  499. constructor() {
  500. super(...arguments), this.type = "checkbox";
  501. }
  502. clone() {
  503. return new p7({ filterBlocks: y(this.filterBlocks) });
  504. }
  505. };
  506. e([y2({ type: ["checkbox"] })], n8.prototype, "type", void 0), e([y2({ type: l9, json: { write: true } })], n8.prototype, "filterBlocks", void 0), n8 = p7 = e([n("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")], n8);
  507. var u2 = n8;
  508. // node_modules/@arcgis/core/layers/support/BuildingFilterMode.js
  509. var t6 = class extends l {
  510. };
  511. e([y2({ readOnly: true, json: { read: false } })], t6.prototype, "type", void 0), t6 = e([n("esri.layers.support.BuildingFilterMode")], t6);
  512. var p8 = t6;
  513. // node_modules/@arcgis/core/layers/support/BuildingFilterModeSolid.js
  514. var t7;
  515. var p9 = t7 = class extends p8 {
  516. constructor() {
  517. super(...arguments), this.type = "solid";
  518. }
  519. clone() {
  520. return new t7();
  521. }
  522. };
  523. e([y2({ type: ["solid"], readOnly: true, json: { write: true } })], p9.prototype, "type", void 0), p9 = t7 = e([n("esri.layers.support.BuildingFilterModeSolid")], p9);
  524. var i4 = p9;
  525. // node_modules/@arcgis/core/layers/support/BuildingFilterModeWireFrame.js
  526. var c4;
  527. var m5 = c4 = class extends p8 {
  528. constructor() {
  529. super(...arguments), this.type = "wire-frame", this.edges = null;
  530. }
  531. clone() {
  532. return new c4({ edges: y(this.edges) });
  533. }
  534. };
  535. e([r2({ wireFrame: "wire-frame" })], m5.prototype, "type", void 0), e([y2(t4)], m5.prototype, "edges", void 0), m5 = c4 = e([n("esri.layers.support.BuildingFilterModeWireFrame")], m5);
  536. var a2 = m5;
  537. // node_modules/@arcgis/core/layers/support/BuildingFilterModeXRay.js
  538. var t8;
  539. var p10 = t8 = class extends p8 {
  540. constructor() {
  541. super(...arguments), this.type = "x-ray";
  542. }
  543. clone() {
  544. return new t8();
  545. }
  546. };
  547. e([y2({ type: ["x-ray"], readOnly: true, json: { write: true } })], p10.prototype, "type", void 0), p10 = t8 = e([n("esri.layers.support.BuildingFilterModeXRay")], p10);
  548. var c5 = p10;
  549. // node_modules/@arcgis/core/layers/support/BuildingFilterBlock.js
  550. var d4;
  551. var a3 = { nonNullable: true, types: { key: "type", base: p8, typeMap: { solid: i4, "wire-frame": a2, "x-ray": c5 } }, json: { read: (e3) => {
  552. switch (e3 && e3.type) {
  553. case "solid":
  554. return i4.fromJSON(e3);
  555. case "wireFrame":
  556. return a2.fromJSON(e3);
  557. case "x-ray":
  558. return c5.fromJSON(e3);
  559. default:
  560. return;
  561. }
  562. }, write: { enabled: true, isRequired: true } } };
  563. var u3 = d4 = class extends l {
  564. constructor() {
  565. super(...arguments), this.filterExpression = null, this.filterMode = new i4(), this.title = "";
  566. }
  567. clone() {
  568. return new d4({ filterExpression: this.filterExpression, filterMode: y(this.filterMode), title: this.title });
  569. }
  570. };
  571. e([y2({ type: String, json: { write: { enabled: true, isRequired: true } } })], u3.prototype, "filterExpression", void 0), e([y2(a3)], u3.prototype, "filterMode", void 0), e([y2({ type: String, json: { write: { enabled: true, isRequired: true } } })], u3.prototype, "title", void 0), u3 = d4 = e([n("esri.layers.support.BuildingFilterBlock")], u3);
  572. var c6 = u3;
  573. // node_modules/@arcgis/core/layers/support/BuildingFilter.js
  574. var u4;
  575. var d5 = j.ofType(c6);
  576. var m6 = u4 = class extends l {
  577. constructor() {
  578. super(...arguments), this.description = null, this.filterBlocks = null, this.id = n3(), this.name = null;
  579. }
  580. clone() {
  581. return new u4({ description: this.description, filterBlocks: y(this.filterBlocks), id: this.id, name: this.name, filterAuthoringInfo: y(this.filterAuthoringInfo) });
  582. }
  583. };
  584. e([y2({ type: String, json: { write: true } })], m6.prototype, "description", void 0), e([y2({ type: d5, json: { write: { enabled: true, isRequired: true } } })], m6.prototype, "filterBlocks", void 0), e([y2({ types: { key: "type", base: p5, typeMap: { checkbox: u2 } }, json: { read: (o2) => "checkbox" === (o2 && o2.type) ? u2.fromJSON(o2) : null, write: true } })], m6.prototype, "filterAuthoringInfo", void 0), e([y2({ type: String, constructOnly: true, json: { write: { enabled: true, isRequired: true } } })], m6.prototype, "id", void 0), e([y2({ type: String, json: { write: { enabled: true, isRequired: true } } })], m6.prototype, "name", void 0), m6 = u4 = e([n("esri.layers.support.BuildingFilter")], m6);
  585. var f = m6;
  586. // node_modules/@arcgis/core/layers/support/BuildingSummaryStatistics.js
  587. var n9 = class extends l {
  588. constructor() {
  589. super(...arguments), this.fieldName = null, this.modelName = null, this.label = null, this.min = null, this.max = null, this.mostFrequentValues = null, this.subLayerIds = null;
  590. }
  591. };
  592. e([y2({ type: String })], n9.prototype, "fieldName", void 0), e([y2({ type: String })], n9.prototype, "modelName", void 0), e([y2({ type: String })], n9.prototype, "label", void 0), e([y2({ type: Number })], n9.prototype, "min", void 0), e([y2({ type: Number })], n9.prototype, "max", void 0), e([y2({ json: { read: (e3) => Array.isArray(e3) && (e3.every((e4) => "string" == typeof e4) || e3.every((e4) => "number" == typeof e4)) ? e3.slice() : null } })], n9.prototype, "mostFrequentValues", void 0), e([y2({ type: [Number] })], n9.prototype, "subLayerIds", void 0), n9 = e([n("esri.layers.support.BuildingFieldStatistics")], n9);
  593. var u5 = class extends m2.LoadableMixin(m(l)) {
  594. constructor() {
  595. super(...arguments), this.url = null;
  596. }
  597. get fields() {
  598. return this.loaded || "loading" === this.loadStatus ? this._get("fields") : (s.getLogger(this.declaredClass).error("building summary statistics are not loaded"), null);
  599. }
  600. load(e3) {
  601. const r4 = r(e3) ? e3.signal : null;
  602. return this.addResolvingPromise(this._fetchService(r4)), Promise.resolve(this);
  603. }
  604. async _fetchService(e3) {
  605. const t9 = (await U(this.url, { query: { f: "json" }, responseType: "json", signal: e3 })).data;
  606. this.read(t9, { origin: "service" });
  607. }
  608. };
  609. e([y2({ constructOnly: true, type: String })], u5.prototype, "url", void 0), e([y2({ readOnly: true, type: [n9], json: { read: { source: "summary" } } })], u5.prototype, "fields", null), u5 = e([n("esri.layers.support.BuildingSummaryStatistics")], u5);
  610. var m7 = u5;
  611. // node_modules/@arcgis/core/layers/BuildingSceneLayer.js
  612. var F = j.ofType(f);
  613. var B = y(d3.sublayersProperty);
  614. B.json.origins["web-scene"] = { type: [M], write: { enabled: true, overridePolicy: () => ({ enabled: false }) } }, B.json.origins["portal-item"] = { type: [M], write: { enabled: true, overridePolicy: () => ({ enabled: false }) } };
  615. var P = class extends N(p(c(v(t3(O(i2(b2))))))) {
  616. constructor(e3) {
  617. super(e3), this.operationalLayerType = "BuildingSceneLayer", this.allSublayers = new l2({ getCollections: () => [this.sublayers], getChildrenFunction: (e4) => "building-group" === e4.type ? e4.sublayers : null }), this.sublayers = null, this._sublayerOverrides = null, this.filters = new F(), this.activeFilterId = null, this.summaryStatistics = null, this.outFields = null, this.type = "building-scene";
  618. }
  619. normalizeCtorArgs(e3) {
  620. return "string" == typeof e3 ? { url: e3 } : e3 != null ? e3 : {};
  621. }
  622. destroy() {
  623. this.allSublayers.destroy();
  624. }
  625. readSublayers(e3, r4, t9) {
  626. const s8 = d3.readSublayers(e3, r4, t9);
  627. return d3.forEachSublayer(s8, (e4) => e4.layer = this), this._sublayerOverrides && (this.applySublayerOverrides(s8, this._sublayerOverrides), this._sublayerOverrides = null), s8;
  628. }
  629. applySublayerOverrides(e3, { overrides: r4, context: t9 }) {
  630. d3.forEachSublayer(e3, (e4) => e4.read(r4.get(e4.id), t9));
  631. }
  632. readSublayerOverrides(e3, r4) {
  633. var _a;
  634. const t9 = /* @__PURE__ */ new Map();
  635. for (const i5 of e3)
  636. null != i5 && "object" == typeof i5 && "number" == typeof i5.id ? t9.set(i5.id, i5) : (_a = r4.messages) == null ? void 0 : _a.push(new s2("building-scene-layer:invalid-sublayer-override", "Invalid value for sublayer override. Not an object or no id specified.", { value: i5 }));
  637. return { overrides: t9, context: r4 };
  638. }
  639. writeSublayerOverrides(e3, r4, t9) {
  640. const s8 = [];
  641. d3.forEachSublayer(this.sublayers, (e4) => {
  642. const r5 = e4.write({}, t9);
  643. Object.keys(r5).length > 1 && s8.push(r5);
  644. }), s8.length > 0 && (r4.sublayers = s8);
  645. }
  646. writeUnappliedOverrides(e3, r4) {
  647. r4.sublayers = [], e3.overrides.forEach((e4) => {
  648. r4.sublayers.push(y(e4));
  649. });
  650. }
  651. write(e3, r4) {
  652. return e3 = super.write(e3, r4), !r4 || "web-scene" !== r4.origin && "portal-item" !== r4.origin || (this.sublayers ? this.writeSublayerOverrides(this.sublayers, e3, r4) : this._sublayerOverrides && this.writeUnappliedOverrides(this._sublayerOverrides, e3)), e3;
  653. }
  654. read(e3, r4) {
  655. if (super.read(e3, r4), r4 && ("web-scene" === r4.origin || "portal-item" === r4.origin) && null != e3 && Array.isArray(e3.sublayers)) {
  656. const t9 = this.readSublayerOverrides(e3.sublayers, r4);
  657. this.sublayers ? this.applySublayerOverrides(this.sublayers, t9) : this._sublayerOverrides = t9;
  658. }
  659. }
  660. readSummaryStatistics(e3, r4) {
  661. var _a;
  662. if ("string" == typeof r4.statisticsHRef) {
  663. const e4 = G((_a = this.parsedUrl) == null ? void 0 : _a.path, r4.statisticsHRef);
  664. return new m7({ url: e4 });
  665. }
  666. return null;
  667. }
  668. set elevationInfo(e3) {
  669. this._set("elevationInfo", e3), this._validateElevationInfo();
  670. }
  671. load(e3) {
  672. const r4 = r(e3) ? e3.signal : null, t9 = this.loadFromPortal({ supportedTypes: ["Scene Service"] }, e3).catch(w).then(() => this._fetchService(r4)).then(() => this._fetchAssociatedFeatureService(r4));
  673. return this.addResolvingPromise(t9), Promise.resolve(this);
  674. }
  675. loadAll() {
  676. return n2(this, (e3) => {
  677. d3.forEachSublayer(this.sublayers, (r4) => {
  678. "building-group" !== r4.type && e3(r4);
  679. }), this.summaryStatistics && e3(this.summaryStatistics);
  680. });
  681. }
  682. async saveAs(e3, r4) {
  683. return this._debouncedSaveOperations(L.SAVE_AS, { ...r4, getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "building-scene" }, e3);
  684. }
  685. async save() {
  686. const e3 = { getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "building-scene" };
  687. return this._debouncedSaveOperations(L.SAVE, e3);
  688. }
  689. validateLayer(e3) {
  690. if (!e3.layerType || "Building" !== e3.layerType)
  691. throw new s2("buildingscenelayer:layer-type-not-supported", "BuildingSceneLayer does not support this layer type", { layerType: e3.layerType });
  692. }
  693. _getTypeKeywords() {
  694. return ["Building"];
  695. }
  696. _validateElevationInfo() {
  697. const e3 = this.elevationInfo;
  698. e3 && ("absolute-height" !== e3.mode && s.getLogger(this.declaredClass).warn(".elevationInfo=", "Building scene layers only support absolute-height elevation mode"), e3.featureExpressionInfo && "0" !== e3.featureExpressionInfo.expression && s.getLogger(this.declaredClass).warn(".elevationInfo=", "Building scene layers do not support featureExpressionInfo"));
  699. }
  700. async _fetchAssociatedFeatureService(e3) {
  701. const r4 = new l4(this.parsedUrl, this.portalItem, this.apiKey, e3);
  702. try {
  703. this.associatedFeatureServiceItem = await r4.fetchPortalItem();
  704. } catch (t9) {
  705. s.getLogger(this.declaredClass).warn("Associated feature service item could not be loaded", t9);
  706. }
  707. }
  708. };
  709. e([y2({ type: ["BuildingSceneLayer"] })], P.prototype, "operationalLayerType", void 0), e([y2({ readOnly: true })], P.prototype, "allSublayers", void 0), e([y2(B)], P.prototype, "sublayers", void 0), e([o("service", "sublayers")], P.prototype, "readSublayers", null), e([y2({ type: F, nonNullable: true, json: { write: true } })], P.prototype, "filters", void 0), e([y2({ type: String, json: { write: true } })], P.prototype, "activeFilterId", void 0), e([y2({ readOnly: true, type: m7 })], P.prototype, "summaryStatistics", void 0), e([o("summaryStatistics", ["statisticsHRef"])], P.prototype, "readSummaryStatistics", null), e([y2({ type: [String], json: { read: false } })], P.prototype, "outFields", void 0), e([y2(b)], P.prototype, "fullExtent", void 0), e([y2({ type: ["show", "hide", "hide-children"] })], P.prototype, "listMode", void 0), e([y2(y3(k))], P.prototype, "spatialReference", void 0), e([y2(d)], P.prototype, "elevationInfo", null), e([y2({ json: { read: false }, readOnly: true })], P.prototype, "type", void 0), e([y2()], P.prototype, "associatedFeatureServiceItem", void 0), P = e([n("esri.layers.BuildingSceneLayer")], P);
  710. var C2 = P;
  711. export {
  712. C2 as default
  713. };
  714. //# sourceMappingURL=BuildingSceneLayer-V62HGRKT.js.map