import { g as g2 } from "./chunk-IN44RUPP.js"; import { l as l4, t as t8, ye } from "./chunk-F2ZAJBUD.js"; import { d as d2, s as s5 } from "./chunk-TE2TRGVU.js"; import { l as l3, m as m2, s as s4, u as u2 } from "./chunk-NXF22CVW.js"; import { L, N } from "./chunk-DRPR56GA.js"; import "./chunk-L5R6EFI6.js"; import "./chunk-RMZNH22Z.js"; import "./chunk-A22ACVMF.js"; import "./chunk-X4WJNVEM.js"; import "./chunk-ZNJHHCMJ.js"; import "./chunk-LX2NI53X.js"; import "./chunk-IZUZZJS7.js"; import "./chunk-RUM3DXFX.js"; import "./chunk-W3XAGTM6.js"; import "./chunk-44FMXGSC.js"; import "./chunk-XFDO4CMR.js"; import "./chunk-GHN7C53L.js"; import "./chunk-56OWH4DC.js"; import "./chunk-ZCAE6QVH.js"; import "./chunk-K7B6OWCU.js"; import "./chunk-WM52QDLS.js"; import "./chunk-MEZ7BUMM.js"; import "./chunk-7B57NUGF.js"; import "./chunk-AOQ55JXI.js"; import { p2 as p3, t as t6 } from "./chunk-X42TFXOU.js"; import "./chunk-JFSMKLAQ.js"; import "./chunk-LXOC7SMQ.js"; import { s as s3 } from "./chunk-DN6W4TJU.js"; import "./chunk-OUUXJOLT.js"; import "./chunk-PLQUCCQV.js"; import "./chunk-JZAS4TIG.js"; import "./chunk-VBR5BOXI.js"; import "./chunk-NBKUI76A.js"; import "./chunk-6334AFGG.js"; import "./chunk-NLLFSKB2.js"; import { a as a2 } from "./chunk-LC3GBQ56.js"; import { t as t7 } from "./chunk-5GYJGY4C.js"; import "./chunk-O3JQY77G.js"; import "./chunk-OXF7W4BJ.js"; import { An, mn } from "./chunk-P24XEEHY.js"; import "./chunk-SAJAEMIJ.js"; import "./chunk-S6EFEKAU.js"; import "./chunk-I4RYNNL6.js"; import "./chunk-2RHPWGZL.js"; import "./chunk-XEQ4FTFC.js"; import "./chunk-JM5OVQAD.js"; import "./chunk-OJ2HHY2O.js"; import { p as p2 } from "./chunk-S3GK7VUF.js"; import "./chunk-TU7WVKU4.js"; import { i } from "./chunk-WWXZOC2Y.js"; import { p } from "./chunk-ZOKNWEG3.js"; import "./chunk-NQA5XJGK.js"; import "./chunk-EKYSPJO6.js"; import { i as i2, j2 as j4 } from "./chunk-JAUFBT5U.js"; import "./chunk-W6U6FKJ3.js"; import { p as p4 } from "./chunk-7C2KDOAI.js"; import { n as n2 } from "./chunk-RHFU6KWO.js"; import "./chunk-3FNKD2EB.js"; import "./chunk-ZOO4I2U4.js"; import "./chunk-JPUFJK2B.js"; import "./chunk-HZ2WKB3G.js"; import "./chunk-3HCJD762.js"; import "./chunk-RVCE264D.js"; import { t as t5 } from "./chunk-HKJ7X3BD.js"; import "./chunk-Y74D3LKQ.js"; import "./chunk-PK4W65H4.js"; import { g } from "./chunk-7C23ILQ4.js"; import { k } from "./chunk-P6VVVEX6.js"; import "./chunk-3Z755LKF.js"; import "./chunk-LTZ5XXDV.js"; import "./chunk-IEU3AM37.js"; import "./chunk-SKKBVHTF.js"; import "./chunk-DLMAGHHC.js"; import { x } from "./chunk-WD4J43GZ.js"; import "./chunk-JOYXMSKE.js"; import "./chunk-SZFMKPVM.js"; import "./chunk-YZVAB3DF.js"; import "./chunk-JLYTER4T.js"; import "./chunk-CRHRHOXH.js"; import "./chunk-ZSW35JPD.js"; import { r as r3 } from "./chunk-JLSNMUQJ.js"; import "./chunk-ECY35CJI.js"; import "./chunk-PT62335L.js"; import "./chunk-JGBXYDGB.js"; import "./chunk-QEWF7QPH.js"; import "./chunk-PJNBFKPF.js"; import "./chunk-C7742RNZ.js"; import "./chunk-FNA5GLRW.js"; import "./chunk-MCWCB5IY.js"; import "./chunk-TV3CFJQR.js"; import { U, a, j as j3 } from "./chunk-TJV6ODRM.js"; import { v as v2 } from "./chunk-JUWKPBLS.js"; import { c as c3 } from "./chunk-WLSB4F4I.js"; import { c as c2, d, l as l2, m, p as p5 } from "./chunk-GLSWDDR3.js"; import { O } from "./chunk-MIQGEDET.js"; import "./chunk-DUEMJ5XS.js"; import "./chunk-VRLXUHP2.js"; import "./chunk-3LVSQLWJ.js"; import { c } from "./chunk-4ONPMX2F.js"; import { F, v as v3 } from "./chunk-CRGY2SDS.js"; import "./chunk-4T5ZGMEN.js"; import "./chunk-GN35O2ZO.js"; import "./chunk-XTVKPAWY.js"; import "./chunk-3OSQ6GXO.js"; import "./chunk-3WQOA5CB.js"; import { t as t4 } from "./chunk-PLWDAYK7.js"; import "./chunk-FZQZIM7U.js"; import "./chunk-CZBRZ6SU.js"; import "./chunk-VGWC3IKZ.js"; import "./chunk-2H5MD622.js"; import "./chunk-3RSFVUKZ.js"; import "./chunk-UVVU4UUO.js"; import "./chunk-HWSWTWZD.js"; import "./chunk-O6VYMEIX.js"; import "./chunk-X4SA4ELJ.js"; import "./chunk-5N7JLUJJ.js"; import "./chunk-ZAY3CMAZ.js"; import { r as r4 } from "./chunk-P3XKUGLS.js"; import "./chunk-2ZSOO377.js"; import "./chunk-YUA3AHKR.js"; import "./chunk-LU5IJZB4.js"; import "./chunk-7IBV2TRE.js"; import "./chunk-ZLNEXZAN.js"; import "./chunk-5UVJ64RB.js"; import "./chunk-SFEFRQCL.js"; import { b } from "./chunk-DXVOOCG4.js"; import "./chunk-3GZSQU56.js"; import "./chunk-ZYRIJWLX.js"; import "./chunk-RYY6632W.js"; import "./chunk-DW42UVIT.js"; import "./chunk-YAEIHDJH.js"; import "./chunk-TJNOJH33.js"; import "./chunk-OSHI574D.js"; import "./chunk-ETGAZ7LF.js"; import "./chunk-75U5LM2V.js"; import "./chunk-RMDDCMKS.js"; import { v2 as v } from "./chunk-VCH45Q2I.js"; import { j as j2 } from "./chunk-LBW34VZ2.js"; import "./chunk-GSSTTHIT.js"; import "./chunk-YFSLJIO4.js"; import "./chunk-IM3LVQXV.js"; import "./chunk-55RWC67C.js"; import "./chunk-HZRKBTHJ.js"; import { U as U2 } from "./chunk-DVUG3KID.js"; import "./chunk-FWSQEIAR.js"; import { G } from "./chunk-VEGAOVMY.js"; import { o } from "./chunk-6T6G6LCQ.js"; import "./chunk-YEJL5NEF.js"; import "./chunk-PQFTYGF5.js"; import { e, e2, l3 as l, n5 as n, r2, t2, t5 as t3, u2 as u, y3 as y2 } from "./chunk-2Z2TG5CU.js"; import "./chunk-6KZ2LTDA.js"; import "./chunk-U2XHEJM7.js"; import "./chunk-SQOPWYIT.js"; import { j, w } from "./chunk-V6P2MAQQ.js"; import { s2 as s, s3 as s2 } from "./chunk-E5O6P5I2.js"; import { y } from "./chunk-SPWQ3AWG.js"; import "./chunk-2TIUKVZN.js"; import { q, r, t } from "./chunk-YXWMMD76.js"; import "./chunk-S5KM4IGW.js"; // node_modules/@arcgis/core/layers/support/RangeInfo.js var s6 = class extends l { constructor() { super(...arguments), this.name = null, this.field = null, this.currentRangeExtent = null, this.fullRangeExtent = null, this.type = "rangeInfo"; } }; e([y2({ type: String, json: { read: true, write: true } })], s6.prototype, "name", void 0), e([y2({ type: String, json: { read: true, write: true } })], s6.prototype, "field", void 0), e([y2({ type: [Number], json: { read: true, write: true } })], s6.prototype, "currentRangeExtent", void 0), e([y2({ type: [Number], json: { read: true, write: true } })], s6.prototype, "fullRangeExtent", void 0), e([y2({ type: ["rangeInfo"], readOnly: true, json: { read: false, write: true } })], s6.prototype, "type", void 0), s6 = e([n("esri.layers.support.RangeInfo")], s6); // node_modules/@arcgis/core/layers/support/PolygonCollection.js var c4; var p6 = c4 = class extends u(j2.ofType(v)) { constructor(e3) { super(e3); } clone() { return new c4(this.items.map((e3) => e3.clone())); } write(e3, r5) { return this.toJSON(r5); } toJSON(e3) { var _a; const r5 = (_a = e3 == null ? void 0 : e3.layer) == null ? void 0 : _a.spatialReference; return r5 ? this.toArray().map((t9) => { if (!r5.equals(t9.spatialReference)) { if (!An(t9.spatialReference, r5)) return e3 && e3.messages && e3.messages.push(new t3("scenefilter:unsupported", "Scene filters with incompatible spatial references are not supported", { modification: this, spatialReference: e3.layer.spatialReference, context: e3 })), null; const s8 = new v(); mn(t9, s8, r5), t9 = s8; } const s7 = t9.toJSON(e3); return delete s7.spatialReference, s7; }).filter((e4) => null != e4) : ((e3 == null ? void 0 : e3.messages) && e3.messages.push(new t3("scenefilter:unsupported", "Writing Scene filters without context layer is not supported", { modification: this, spatialReference: e3.layer.spatialReference, context: e3 })), this.toArray().map((r6) => r6.toJSON(e3))); } static fromJSON(e3, r5) { const t9 = new c4(); return e3.forEach((e4) => t9.add(v.fromJSON(e4, r5))), t9; } }; p6 = c4 = e([n("esri.layers.support.PolygonCollection")], p6); var l5 = p6; // node_modules/@arcgis/core/layers/support/SceneFilter.js var g3; var f = g3 = class extends l { constructor(e3) { super(e3), this.spatialRelationship = "disjoint", this.geometries = new l5(), this._geometriesSource = null, this._handles = new t2(); } initialize() { this._handles.add(a(() => this.geometries, "after-changes", () => this.geometries = this.geometries, U)); } destroy() { this._handles.destroy(); } readGeometries(e3, o2, r5) { this._geometriesSource = { url: c(e3, r5), context: r5 }; } async loadGeometries(e3, r5) { if (t(this._geometriesSource)) return; const { url: s7, context: t9 } = this._geometriesSource, p7 = await U2(s7, { responseType: "json", signal: q(r5, "signal") }), n3 = e3.toJSON(), c5 = p7.data.map((e4) => ({ ...e4, spatialReference: n3 })); this.geometries = l5.fromJSON(c5, t9), this._geometriesSource = null; } clone() { return new g3({ geometries: y(this.geometries), spatialRelationship: this.spatialRelationship }); } }; e([y2({ type: ["disjoint", "contains"], nonNullable: true, json: { write: true } })], f.prototype, "spatialRelationship", void 0), e([y2({ type: l5, nonNullable: true, json: { write: true } }), g2({ origins: ["web-scene", "portal-item"], type: "resource", prefix: "geometries" })], f.prototype, "geometries", void 0), e([o(["web-scene", "portal-item"], "geometries")], f.prototype, "readGeometries", null), f = g3 = e([n("esri.layers.support.SceneFilter")], f); var j5 = f; // node_modules/@arcgis/core/layers/SceneLayer.js var oe = ["3DObject", "Point"]; var ae = s3(); var ne = class extends a2(N(p(c3(v2(t4(O(i(b)))))))) { constructor(...e3) { super(...e3), this.featureReduction = null, this.rangeInfos = null, this.operationalLayerType = "ArcGISSceneServiceLayer", this.type = "scene", this.fields = null, this.floorInfo = null, this.outFields = null, this.nodePages = null, this.materialDefinitions = null, this.textureSetDefinitions = null, this.geometryDefinitions = null, this.serviceUpdateTimeStamp = null, this.excludeObjectIds = new j2(), this.definitionExpression = null, this.filter = null, this.path = null, this.labelsVisible = true, this.labelingInfo = null, this.legendEnabled = true, this.priority = null, this.semantic = null, this.cachedDrawingInfo = { color: false }, this.popupEnabled = true, this.popupTemplate = null, this.objectIdField = null, this.globalIdField = null, this._fieldUsageInfo = {}, this.screenSizePerspectiveEnabled = true; } normalizeCtorArgs(e3, t9) { return "string" == typeof e3 ? { url: e3, ...t9 } : e3; } getField(e3) { return this.fieldsIndex.get(e3); } getFieldDomain(e3, t9) { var _a, _b, _c, _d; const r5 = (_b = (_a = this.getFeatureType(t9 == null ? void 0 : t9.feature)) == null ? void 0 : _a.domains) == null ? void 0 : _b[e3]; return r5 && "inherited" !== r5.type ? r5 : (_d = (_c = this.getField(e3)) == null ? void 0 : _c.domain) != null ? _d : null; } getFeatureType(e3) { return null != e3 && r(this.associatedLayer) ? this.associatedLayer.getFeatureType(e3) : null; } get types() { var _a; return r(this.associatedLayer) ? (_a = this.associatedLayer.types) != null ? _a : [] : []; } get typeIdField() { return r(this.associatedLayer) ? this.associatedLayer.typeIdField : null; } get formTemplate() { return r(this.associatedLayer) ? this.associatedLayer.formTemplate : null; } get fieldsIndex() { return new r3(this.fields); } readNodePages(e3, t9, r5) { return "Point" === t9.layerType && (e3 = t9.pointNodePages), null == e3 || "object" != typeof e3 ? null : s4.fromJSON(e3, r5); } set elevationInfo(e3) { this._set("elevationInfo", e3), this.loaded && this._validateElevationInfo(); } get geometryType() { return le[this.profile] || "mesh"; } set renderer(e3) { F(e3, this.fieldsIndex), this._set("renderer", e3); } readCachedDrawingInfo(e3) { return null != e3 && "object" == typeof e3 || (e3 = {}), null == e3.color && (e3.color = false), e3; } get capabilities() { const e3 = r(this.associatedLayer) && this.associatedLayer.capabilities ? this.associatedLayer.capabilities : t8, { query: t9, editing: { supportsGlobalId: r5, supportsRollbackOnFailure: s7, supportsUploadWithItemId: i3, supportsReturnServiceEditsInSourceSpatialReference: o2 }, data: { supportsZ: a3, supportsM: n3, isVersioned: l6, supportsAttachment: d3 }, operations: { supportsEditing: y3, supportsAdd: u3, supportsUpdate: c5, supportsDelete: f2, supportsQuery: h, supportsQueryAttachments: m3 } } = e3, g4 = e3.operations.supportsChangeTracking, v4 = t5(); return { query: t9, editing: { supportsGlobalId: r5, supportsReturnServiceEditsInSourceSpatialReference: o2, supportsRollbackOnFailure: s7, supportsGeometryUpdate: false, supportsUploadWithItemId: i3 }, data: { supportsAttachment: d3, supportsZ: a3, supportsM: n3, isVersioned: l6 }, operations: { supportsQuery: h, supportsQueryAttachments: m3, supportsEditing: y3 && g4, supportsAdd: v4 && u3 && g4, supportsDelete: v4 && f2 && g4, supportsUpdate: c5 && g4 } }; } get editingEnabled() { return this._isOverridden("editingEnabled") ? this._get("editingEnabled") : this.userHasEditingPrivileges; } set editingEnabled(e3) { this._overrideIfSome("editingEnabled", e3); } get infoFor3D() { return r(this.associatedLayer) ? this.associatedLayer.infoFor3D : null; } get defaultPopupTemplate() { return r(this.associatedLayer) || this.attributeStorageInfo ? this.createPopupTemplate() : null; } readObjectIdField(e3, t9) { return !e3 && t9.fields && t9.fields.some((t10) => ("esriFieldTypeOID" === t10.type && (e3 = t10.name), !!e3)), e3 || void 0; } readGlobalIdField(e3, t9) { return !e3 && t9.fields && t9.fields.some((t10) => ("esriFieldTypeGlobalID" === t10.type && (e3 = t10.name), !!e3)), e3 || void 0; } get displayField() { return r(this.associatedLayer) ? this.associatedLayer.displayField : null; } readProfile(e3, t9) { const r5 = t9.store.profile; return null != r5 && pe[r5] ? pe[r5] : (s.getLogger(this.declaredClass).error("Unknown or missing profile", { profile: r5, layer: this }), "mesh-pyramids"); } load(e3) { const t9 = r(e3) ? e3.signal : null, r5 = this.loadFromPortal({ supportedTypes: ["Scene Service"] }, e3).catch(w).then(() => this._fetchService(t9)).then(() => Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages, t9), this._setAssociatedFeatureLayer(t9), r(this.filter) ? this.filter.loadGeometries(this.spatialReference) : null])).then(() => this._validateElevationInfo()).then(() => this._applyAssociatedLayerOverrides()).then(() => this._populateFieldUsageInfo()).then(() => t7(this, { origin: "service" }, t9)).then(() => F(this.renderer, this.fieldsIndex)).then(() => this.finishLoadEditablePortalLayer(e3)); return this.addResolvingPromise(r5), Promise.resolve(this); } async beforeSave() { r(this.filter) && await this.load(); } createQuery() { const e3 = new x(); return "mesh" !== this.geometryType && (e3.returnGeometry = true, e3.returnZ = true), e3.where = this.definitionExpression || "1=1", e3.sqlFormat = "standard", e3; } queryExtent(e3, t9) { return this._getAssociatedLayerForQuery().then((r5) => r5.queryExtent(e3 || this.createQuery(), t9)); } queryFeatureCount(e3, t9) { return this._getAssociatedLayerForQuery().then((r5) => r5.queryFeatureCount(e3 || this.createQuery(), t9)); } queryFeatures(e3, t9) { return this._getAssociatedLayerForQuery().then((r5) => r5.queryFeatures(e3 || this.createQuery(), t9)).then((e4) => { if (e4 == null ? void 0 : e4.features) for (const t10 of e4.features) t10.layer = this, t10.sourceLayer = this; return e4; }); } async queryCachedAttributes(e3, t9) { const r5 = v3(this.fieldsIndex, await d2(this, s5(this))); return ye(this.parsedUrl.path, this.attributeStorageInfo, e3, t9, r5); } async queryCachedFeature(e3, r5) { const s7 = await this.queryCachedAttributes(e3, [r5]); if (!s7 || 0 === s7.length) throw new s2("scenelayer:feature-not-in-cached-data", "Feature not found in cached data"); const i3 = new g(); return i3.attributes = s7[0], i3.layer = this, i3.sourceLayer = this, i3; } queryObjectIds(e3, t9) { return this._getAssociatedLayerForQuery().then((r5) => r5.queryObjectIds(e3 || this.createQuery(), t9)); } queryAttachments(e3, t9) { return this._getAssociatedLayerForQuery().then((r5) => r5.queryAttachments(e3, t9)); } getFieldUsageInfo(e3) { const t9 = { supportsLabelingInfo: false, supportsRenderer: false, supportsPopupTemplate: false, supportsLayerQuery: false }; return this.loaded ? this._fieldUsageInfo[e3] || t9 : (s.getLogger(this.declaredClass).error("#getFieldUsageInfo()", "Unavailable until layer is loaded"), t9); } createPopupTemplate(e3) { return p4(this, e3); } _getAssociatedLayerForQuery() { const e3 = this.associatedLayer; return r(e3) && e3.loaded ? Promise.resolve(e3) : this._loadAssociatedLayerForQuery(); } async _loadAssociatedLayerForQuery() { if (await this.load(), t(this.associatedLayer)) throw new s2("scenelayer:query-not-available", "SceneLayer queries are not available without an associated feature layer", { layer: this }); try { await this.associatedLayer.load(); } catch (e3) { throw new s2("scenelayer:query-not-available", "SceneLayer associated feature layer could not be loaded", { layer: this, error: e3 }); } return this.associatedLayer; } hasCachedStatistics(e3) { return null != this.statisticsInfo && this.statisticsInfo.some((t9) => t9.name === e3); } async queryCachedStatistics(e3, t9) { if (await this.load(t9), !this.statisticsInfo) throw new s2("scenelayer:no-cached-statistics", "Cached statistics are not available for this layer"); const r5 = this.fieldsIndex.get(e3); if (!r5) throw new s2("scenelayer:field-unexisting", `Field '${e3}' does not exist on the layer`); for (const s7 of this.statisticsInfo) if (s7.name === r5.name) { const e4 = G(this.parsedUrl.path, s7.href); return U2(e4, { query: { f: "json", token: this.apiKey }, responseType: "json", signal: t9 ? t9.signal : null }).then((e5) => e5.data); } throw new s2("scenelayer:no-cached-statistics", "Cached statistics for this attribute are not available"); } async saveAs(e3, t9) { return this._debouncedSaveOperations(L.SAVE_AS, { ...t9, getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "scene" }, e3); } async save() { const e3 = { getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "scene" }; return this._debouncedSaveOperations(L.SAVE, e3); } async applyEdits(e3, t9) { const r5 = await import("./editingSupport-YMIKJKVG.js"); if (await this.load(), t(this.associatedLayer)) throw new s2(`${this.type}-layer:not-editable`, "Service is not editable"); return await this.associatedLayer.load(), r5.applyEdits(this, this.associatedLayer.source, e3, t9); } on(e3, t9) { return super.on(e3, t9); } validateLayer(e3) { if (e3.layerType && !oe.includes(e3.layerType)) throw new s2("scenelayer:layer-type-not-supported", "SceneLayer does not support this layer type", { layerType: e3.layerType }); if (isNaN(this.version.major) || isNaN(this.version.minor)) throw new s2("layer:service-version-not-supported", "Service version is not supported.", { serviceVersion: this.version.versionString, supportedVersions: "1.x, 2.x" }); if (this.version.major > 2) throw new s2("layer:service-version-too-new", "Service version is too new.", { serviceVersion: this.version.versionString, supportedVersions: "1.x, 2.x" }); function t9(e4, t10) { let r5 = false, s7 = false; if (null == e4) r5 = true, s7 = true; else { const i3 = t10 && t10.isGeographic; switch (e4) { case "east-north-up": case "earth-centered": r5 = true, s7 = i3; break; case "vertex-reference-frame": r5 = true, s7 = !i3; break; default: r5 = false; } } if (!r5) throw new s2("scenelayer:unsupported-normal-reference-frame", "Normal reference frame is invalid."); if (!s7) throw new s2("scenelayer:incompatible-normal-reference-frame", "Normal reference frame is incompatible with layer spatial reference."); } t9(this.normalReferenceFrame, this.spatialReference); } _getTypeKeywords() { const e3 = []; if ("points" === this.profile) e3.push("Point"); else { if ("mesh-pyramids" !== this.profile) throw new s2("scenelayer:unknown-profile", "SceneLayer:save() encountered an unknown SceneLayer profile: " + this.profile); e3.push("3DObject"); } return e3; } _populateFieldUsageInfo() { if (this._fieldUsageInfo = {}, this.fields) for (const e3 of this.fields) { const t9 = !(!this.attributeStorageInfo || !this.attributeStorageInfo.some((t10) => t10.name === e3.name)), r5 = !!(r(this.associatedLayer) && this.associatedLayer.fields && this.associatedLayer.fields.some((t10) => t10 && e3.name === t10.name)), s7 = { supportsLabelingInfo: t9, supportsRenderer: t9, supportsPopupTemplate: t9 || r5, supportsLayerQuery: r5 }; this._fieldUsageInfo[e3.name] = s7; } } _applyAssociatedLayerOverrides() { this._applyAssociatedLayerFieldsOverrides(), this._applyAssociatedLayerPopupOverrides(); } _applyAssociatedLayerFieldsOverrides() { if (t(this.associatedLayer) || !this.associatedLayer.fields) return; let e3 = null; for (const t9 of this.associatedLayer.fields) { const r5 = this.getField(t9.name); r5 ? (!r5.domain && t9.domain && (r5.domain = t9.domain.clone()), r5.editable = t9.editable, r5.nullable = t9.nullable, r5.length = t9.length) : (e3 || (e3 = this.fields ? this.fields.slice() : []), e3.push(t9.clone())); } e3 && this._set("fields", e3); } _applyAssociatedLayerPopupOverrides() { if (t(this.associatedLayer)) return; const e3 = ["popupTemplate", "popupEnabled"], t9 = e2(this); for (let r5 = 0; r5 < e3.length; r5++) { const s7 = e3[r5], i3 = this.originIdOf(s7), o2 = this.associatedLayer.originIdOf(s7); i3 < o2 && (o2 === r2.SERVICE || o2 === r2.PORTAL_ITEM) && t9.setAtOrigin(s7, this.associatedLayer[s7], o2); } } async _setAssociatedFeatureLayer(e3) { if (!["mesh-pyramids", "points"].includes(this.profile)) return; const t9 = new l4(this.parsedUrl, this.portalItem, this.apiKey, e3); try { this.associatedLayer = await t9.fetch(); } catch (r5) { j(r5) || this._logWarningOnPopupEnabled(); } } async _logWarningOnPopupEnabled() { await j3(() => this.popupEnabled && null != this.popupTemplate); const e3 = `this SceneLayer: ${this.title}`; null == this.attributeStorageInfo ? s.getLogger(this.declaredClass).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e3}`) : s.getLogger(this.declaredClass).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e3}`); } _validateElevationInfo() { const e3 = this.elevationInfo; e3 && ("mesh-pyramids" === this.profile && "relative-to-scene" === e3.mode && s.getLogger(this.declaredClass).warn(".elevationInfo=", "Mesh scene layers don't support relative-to-scene elevation mode"), e3.featureExpressionInfo && "0" !== e3.featureExpressionInfo.expression && s.getLogger(this.declaredClass).warn(".elevationInfo=", "Scene layers do not support featureExpressionInfo")); } }; e([y2({ types: { key: "type", base: t6, typeMap: { selection: p3 } }, json: { origins: { "web-scene": { name: "layerDefinition.featureReduction", write: true }, "portal-item": { name: "layerDefinition.featureReduction", write: true } } } })], ne.prototype, "featureReduction", void 0), e([y2({ type: [s6], json: { read: false, origins: { "web-scene": { name: "layerDefinition.rangeInfos", write: true }, "portal-item": { name: "layerDefinition.rangeInfos", write: true } } } })], ne.prototype, "rangeInfos", void 0), e([y2({ json: { read: false } })], ne.prototype, "associatedLayer", void 0), e([y2({ type: ["show", "hide"] })], ne.prototype, "listMode", void 0), e([y2({ type: ["ArcGISSceneServiceLayer"] })], ne.prototype, "operationalLayerType", void 0), e([y2({ json: { read: false }, readOnly: true })], ne.prototype, "type", void 0), e([y2({ ...ae.fields, readOnly: true, json: { read: false, origins: { service: { read: true } } } })], ne.prototype, "fields", void 0), e([y2()], ne.prototype, "types", null), e([y2()], ne.prototype, "typeIdField", null), e([y2()], ne.prototype, "formTemplate", null), e([y2({ readOnly: true })], ne.prototype, "fieldsIndex", null), e([y2({ type: p2, json: { read: { source: "layerDefinition.floorInfo" }, write: { target: "layerDefinition.floorInfo" } } })], ne.prototype, "floorInfo", void 0), e([y2(ae.outFields)], ne.prototype, "outFields", void 0), e([y2({ type: s4, readOnly: true, json: { read: false } })], ne.prototype, "nodePages", void 0), e([o("service", "nodePages", ["nodePages", "pointNodePages"])], ne.prototype, "readNodePages", null), e([y2({ type: [l3], readOnly: true })], ne.prototype, "materialDefinitions", void 0), e([y2({ type: [u2], readOnly: true })], ne.prototype, "textureSetDefinitions", void 0), e([y2({ type: [m2], readOnly: true })], ne.prototype, "geometryDefinitions", void 0), e([y2({ readOnly: true })], ne.prototype, "serviceUpdateTimeStamp", void 0), e([y2({ readOnly: true })], ne.prototype, "attributeStorageInfo", void 0), e([y2({ readOnly: true })], ne.prototype, "statisticsInfo", void 0), e([y2({ type: j2.ofType(Number), nonNullable: true, json: { origins: { service: { read: false, write: false } }, name: "layerDefinition.excludeObjectIds", write: { enabled: true } } })], ne.prototype, "excludeObjectIds", void 0), e([y2({ type: String, json: { origins: { service: { read: false, write: false } }, name: "layerDefinition.definitionExpression", write: { enabled: true, allowNull: true } } })], ne.prototype, "definitionExpression", void 0), e([y2({ type: j5, json: { name: "layerDefinition.polygonFilter", write: { enabled: true, allowNull: true }, origins: { service: { read: false, write: false } } } })], ne.prototype, "filter", void 0), e([y2({ type: String, json: { origins: { "web-scene": { read: true, write: true } }, read: false } })], ne.prototype, "path", void 0), e([y2(d)], ne.prototype, "elevationInfo", null), e([y2({ type: String })], ne.prototype, "geometryType", null), e([y2(m)], ne.prototype, "labelsVisible", void 0), e([y2({ type: [j4], json: { origins: { service: { name: "drawingInfo.labelingInfo", read: { reader: i2 }, write: false } }, name: "layerDefinition.drawingInfo.labelingInfo", read: { reader: i2 }, write: true } })], ne.prototype, "labelingInfo", void 0), e([y2(c2)], ne.prototype, "legendEnabled", void 0), e([y2({ type: Number, json: { origins: { "web-document": { default: 1, write: { enabled: true, target: { opacity: { type: Number }, "layerDefinition.drawingInfo.transparency": { type: Number } } }, read: { source: ["opacity", "layerDefinition.drawingInfo.transparency"], reader(e3, t9) { var _a, _b; if ("number" == typeof e3 && e3 >= 0 && e3 <= 1) return e3; const r5 = (_b = (_a = t9.layerDefinition) == null ? void 0 : _a.drawingInfo) == null ? void 0 : _b.transparency; return void 0 !== r5 ? r4(r5) : void 0; } } }, "portal-item": { write: true }, service: { read: false } } } })], ne.prototype, "opacity", void 0), e([y2({ type: ["Low", "High"], readOnly: true, json: { read: false, origins: { service: { read: true } } } })], ne.prototype, "priority", void 0), e([y2({ type: ["Labels"], readOnly: true, json: { read: false, origins: { service: { read: true } } } })], ne.prototype, "semantic", void 0), e([y2({ types: n2, json: { origins: { service: { read: { source: "drawingInfo.renderer" } } }, name: "layerDefinition.drawingInfo.renderer", write: true }, value: null })], ne.prototype, "renderer", null), e([y2({ json: { read: false } })], ne.prototype, "cachedDrawingInfo", void 0), e([o("service", "cachedDrawingInfo")], ne.prototype, "readCachedDrawingInfo", null), e([y2({ readOnly: true, json: { read: false } })], ne.prototype, "capabilities", null), e([y2({ type: Boolean, json: { read: false } })], ne.prototype, "editingEnabled", null), e([y2({ readOnly: true, json: { write: false, read: false } })], ne.prototype, "infoFor3D", null), e([y2(p5)], ne.prototype, "popupEnabled", void 0), e([y2({ type: k, json: { name: "popupInfo", write: true } })], ne.prototype, "popupTemplate", void 0), e([y2({ readOnly: true, json: { read: false } })], ne.prototype, "defaultPopupTemplate", null), e([y2({ type: String, json: { read: false } })], ne.prototype, "objectIdField", void 0), e([o("service", "objectIdField", ["objectIdField", "fields"])], ne.prototype, "readObjectIdField", null), e([y2({ type: String, json: { read: false } })], ne.prototype, "globalIdField", void 0), e([o("service", "globalIdField", ["globalIdField", "fields"])], ne.prototype, "readGlobalIdField", null), e([y2({ readOnly: true, type: String, json: { read: false } })], ne.prototype, "displayField", null), e([y2({ type: String, json: { read: false } })], ne.prototype, "profile", void 0), e([o("service", "profile", ["store.profile"])], ne.prototype, "readProfile", null), e([y2({ readOnly: true, type: String, json: { origins: { service: { read: { source: "store.normalReferenceFrame" } } }, read: false } })], ne.prototype, "normalReferenceFrame", void 0), e([y2(l2)], ne.prototype, "screenSizePerspectiveEnabled", void 0), ne = e([n("esri.layers.SceneLayer")], ne); var pe = { "mesh-pyramids": "mesh-pyramids", meshpyramids: "mesh-pyramids", "features-meshes": "mesh-pyramids", points: "points", "features-points": "points", lines: "lines", "features-lines": "lines", polygons: "polygons", "features-polygons": "polygons" }; var le = { "mesh-pyramids": "mesh", points: "point", lines: "polyline", polygons: "polygon" }; var de = ne; export { de as default }; //# sourceMappingURL=SceneLayer-IBSV3FAY.js.map