123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570 |
- import {
- w as w2
- } from "./chunk-BVMSF6QA.js";
- import {
- l as l5,
- t as t6
- } from "./chunk-Z25OS74A.js";
- import {
- l as l4,
- m as m4,
- s as s3,
- u as u3
- } from "./chunk-M7HZTZK5.js";
- import {
- A,
- K
- } from "./chunk-C62PEMUB.js";
- import "./chunk-5ZZSM3DU.js";
- import "./chunk-BQ7UE3XL.js";
- import "./chunk-UILPRJKY.js";
- import "./chunk-6NQ3AA2U.js";
- import "./chunk-524XACB7.js";
- import "./chunk-XKHC7KKF.js";
- import {
- p2 as p3,
- r as r4,
- t as t5
- } from "./chunk-HGDNY7J3.js";
- import "./chunk-GD5TMIPM.js";
- import {
- l as l3
- } from "./chunk-ZRX5UNQH.js";
- import "./chunk-VEAEIBHK.js";
- import "./chunk-6SASJ6IM.js";
- import "./chunk-3OHML7FO.js";
- import "./chunk-JGOAMEPM.js";
- import "./chunk-Z64YKYHD.js";
- import "./chunk-2VFJVI2I.js";
- import {
- t as t3
- } from "./chunk-F37AVPUF.js";
- import "./chunk-FUEX356Y.js";
- import {
- An,
- Wn
- } from "./chunk-DH2OBAUC.js";
- import "./chunk-TNLRDNTC.js";
- import "./chunk-OSNKP4CI.js";
- import "./chunk-435DJNTD.js";
- import "./chunk-T3EUPDKL.js";
- import "./chunk-QY775BFA.js";
- import "./chunk-2SJEIKRW.js";
- import "./chunk-PHRSJJ3U.js";
- import {
- p as p4
- } from "./chunk-VVBOYBFX.js";
- import "./chunk-S7R5EXHN.js";
- import {
- i as i2
- } from "./chunk-FMKGHOGD.js";
- import {
- p as p2
- } from "./chunk-6URTNEGN.js";
- import "./chunk-KN7TOKVN.js";
- import {
- j as j3
- } from "./chunk-RQJNTZAL.js";
- import "./chunk-QTOOFNRV.js";
- import "./chunk-7O56JPWQ.js";
- import "./chunk-6B2LQBKM.js";
- import {
- d as d4
- } from "./chunk-MFI6BALW.js";
- import {
- n as n2
- } from "./chunk-CIG5OHC7.js";
- import "./chunk-FUD7XO3N.js";
- import "./chunk-6EU7GFUT.js";
- import "./chunk-MFUAILAT.js";
- import "./chunk-HZJYXMI6.js";
- import "./chunk-27P5ZSC7.js";
- import "./chunk-UPD4MTCL.js";
- import "./chunk-GRBROWI6.js";
- import "./chunk-5NKYXKIA.js";
- import "./chunk-MPWGHCZG.js";
- import "./chunk-FTI5VP6T.js";
- import "./chunk-RZFGRBD7.js";
- import {
- B
- } from "./chunk-PUSPZYFZ.js";
- import "./chunk-EN7YGJWG.js";
- import "./chunk-VBNMTM7L.js";
- import "./chunk-3D3QEPRE.js";
- import "./chunk-JFNNSBWL.js";
- import {
- b
- } from "./chunk-UD63WBG3.js";
- import "./chunk-X7DBH4KK.js";
- import "./chunk-LY74KTXV.js";
- import "./chunk-EWE6EXPY.js";
- import "./chunk-KUXNUNAI.js";
- import {
- d as d2
- } from "./chunk-KMAHKQ2G.js";
- import "./chunk-522WBHUO.js";
- import "./chunk-WNCU6BFU.js";
- import "./chunk-PIGRDDRG.js";
- import "./chunk-BJHM4JNS.js";
- import "./chunk-F6A2QQ26.js";
- import "./chunk-XLV7RUSE.js";
- import "./chunk-NTUXR253.js";
- import "./chunk-EOSZHC5H.js";
- import "./chunk-C43UE3Z5.js";
- import "./chunk-H2KDMZTR.js";
- import "./chunk-RMX2AZ4P.js";
- import {
- u as u2
- } from "./chunk-NE3ESGA6.js";
- import {
- U,
- a,
- j as j2
- } from "./chunk-YIS6BAC3.js";
- import "./chunk-7XXXCK2A.js";
- import "./chunk-7ZIDBK7B.js";
- import {
- v as v2
- } from "./chunk-KHA63LLS.js";
- import {
- c as c2
- } from "./chunk-FGKNEJKJ.js";
- import {
- c,
- d as d3,
- l as l2,
- m as m3,
- p
- } from "./chunk-PSV473TI.js";
- import {
- O
- } from "./chunk-I3OBGWNS.js";
- import "./chunk-FONIFA5N.js";
- import "./chunk-EG5OI4V4.js";
- import {
- i
- } from "./chunk-65BYCSII.js";
- import {
- c as c3
- } from "./chunk-WZQZRKNH.js";
- import "./chunk-LRDX4TO7.js";
- import {
- r as r3
- } from "./chunk-6A4U74YA.js";
- import "./chunk-CYI7KFYB.js";
- import "./chunk-5LXROFTA.js";
- import "./chunk-GJXW4HL5.js";
- import "./chunk-WJW5DUN6.js";
- import {
- t as t4
- } from "./chunk-W72F6AS3.js";
- import "./chunk-PJ7ZQ4VD.js";
- import "./chunk-WDLTDV2L.js";
- import "./chunk-TERAW6FT.js";
- import "./chunk-N2663GRX.js";
- import "./chunk-O4FY3ITT.js";
- import "./chunk-WEMIK25H.js";
- import {
- b as b2
- } from "./chunk-4DDBH2K5.js";
- import "./chunk-7N4X6GF3.js";
- import "./chunk-JXW4QTJA.js";
- import "./chunk-UXF37FQ4.js";
- import "./chunk-ZOEK6QHJ.js";
- import "./chunk-XNLG7T2T.js";
- import "./chunk-IR4PV7VK.js";
- import "./chunk-2Z6LERTI.js";
- import {
- v2 as v
- } from "./chunk-OWVBLVP3.js";
- import "./chunk-AFZ7XSEW.js";
- import "./chunk-EGZW6HC3.js";
- import "./chunk-4NKD334K.js";
- import "./chunk-65K7LC56.js";
- import "./chunk-ATPLLI5W.js";
- import "./chunk-WJ3OEUD3.js";
- import "./chunk-MXB2XLKV.js";
- import "./chunk-XH7RUGVZ.js";
- import "./chunk-TBBTRX4O.js";
- import "./chunk-YBSUITLL.js";
- import {
- j
- } from "./chunk-ALDCDSPV.js";
- import "./chunk-DT6EAZQ5.js";
- import "./chunk-HNOZUNJ4.js";
- import {
- U as U2
- } from "./chunk-VNFRAYHO.js";
- import "./chunk-R5IG2D6H.js";
- import {
- G
- } from "./chunk-VBRY5KJM.js";
- import "./chunk-PDKDCAAD.js";
- import {
- o
- } from "./chunk-ECW2QABR.js";
- import "./chunk-GCDJLKH4.js";
- import "./chunk-MRJEICT6.js";
- import {
- d,
- e,
- e2,
- l3 as l,
- n2 as n,
- r2,
- t as t2,
- u2 as u
- } from "./chunk-Y3WMVFTW.js";
- import "./chunk-SAS7RONY.js";
- import "./chunk-WSRBH7BF.js";
- import "./chunk-IHXECKQQ.js";
- import {
- g,
- w
- } from "./chunk-ULGDPLM2.js";
- import {
- s,
- s3 as s2
- } from "./chunk-EMJ4ZSM2.js";
- import {
- m as m2
- } from "./chunk-IKP3YN53.js";
- import {
- m,
- r,
- t
- } from "./chunk-GZT4BVFP.js";
- import "./chunk-A5ICIBVI.js";
- // node_modules/@arcgis/core/layers/support/RangeInfo.js
- var s4 = class extends l {
- constructor() {
- super(...arguments), this.name = null, this.field = null, this.currentRangeExtent = null, this.fullRangeExtent = null, this.type = "rangeInfo";
- }
- };
- e([d({ type: String, json: { read: true, write: true } })], s4.prototype, "name", void 0), e([d({ type: String, json: { read: true, write: true } })], s4.prototype, "field", void 0), e([d({ type: [Number], json: { read: true, write: true } })], s4.prototype, "currentRangeExtent", void 0), e([d({ type: [Number], json: { read: true, write: true } })], s4.prototype, "fullRangeExtent", void 0), e([d({ type: ["rangeInfo"], readOnly: true, json: { read: false, write: true } })], s4.prototype, "type", void 0), s4 = e([n("esri.layers.support.RangeInfo")], s4);
- // node_modules/@arcgis/core/layers/support/PolygonCollection.js
- var c4;
- var p5 = c4 = class extends u(j.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) {
- const r5 = e3?.layer?.spatialReference;
- return r5 ? this.toArray().map((t7) => {
- if (!r5.equals(t7.spatialReference)) {
- if (!An(t7.spatialReference, r5))
- return e3 && e3.messages && e3.messages.push(new t2("scenefilter:unsupported", "Scene filters with incompatible spatial references are not supported", { modification: this, spatialReference: e3.layer.spatialReference, context: e3 })), null;
- const s6 = new v();
- Wn(t7, s6, r5), t7 = s6;
- }
- const s5 = t7.toJSON(e3);
- return delete s5.spatialReference, s5;
- }).filter((e4) => e4 != null) : (e3?.messages && e3.messages.push(new t2("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 t7 = new c4();
- return e3.forEach((e4) => t7.add(v.fromJSON(e4, r5))), t7;
- }
- };
- p5 = c4 = e([n("esri.layers.support.PolygonCollection")], p5);
- var l6 = p5;
- // node_modules/@arcgis/core/layers/support/SceneFilter.js
- var g2;
- var f = g2 = class extends l {
- constructor(e3) {
- super(e3), this.spatialRelationship = "disjoint", this.geometries = new l6(), this._geometriesSource = null, this._handles = new u2();
- }
- 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: i(e3, r5), context: r5 };
- }
- async loadGeometries(e3, r5) {
- if (t(this._geometriesSource))
- return;
- const { url: s5, context: t7 } = this._geometriesSource, p6 = await U2(s5, { responseType: "json", signal: m(r5, "signal") }), n3 = e3.toJSON(), c5 = p6.data.map((e4) => ({ ...e4, spatialReference: n3 }));
- this.geometries = l6.fromJSON(c5, t7), this._geometriesSource = null;
- }
- clone() {
- return new g2({ geometries: m2(this.geometries), spatialRelationship: this.spatialRelationship });
- }
- };
- e([d({ type: ["disjoint", "contains"], nonNullable: true, json: { write: true } })], f.prototype, "spatialRelationship", void 0), e([d({ type: l6, nonNullable: true, json: { write: true } }), w2({ 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 = g2 = e([n("esri.layers.support.SceneFilter")], f);
- var j4 = f;
- // node_modules/@arcgis/core/layers/SceneLayer.js
- var X = ["3DObject", "Point"];
- var Y = s.getLogger("esri.layers.SceneLayer");
- var ee = l3();
- var te = class extends A(p2(c2(v2(t4(O(i2(b2))))))) {
- 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 j(), 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, t7) {
- return typeof e3 == "string" ? { url: e3, ...t7 } : e3;
- }
- getField(e3) {
- return this.fieldsIndex.get(e3);
- }
- getFieldDomain(e3, t7) {
- const r5 = this.getFeatureType(t7?.feature)?.domains?.[e3];
- return r5 && r5.type !== "inherited" ? r5 : this.getField(e3)?.domain ?? null;
- }
- getFeatureType(e3) {
- return e3 && r(this.associatedLayer) ? this.associatedLayer.getFeatureType(e3) : null;
- }
- get types() {
- return r(this.associatedLayer) ? this.associatedLayer.types : [];
- }
- get typeIdField() {
- return r(this.associatedLayer) ? this.associatedLayer.typeIdField : null;
- }
- get formTemplate() {
- return r(this.associatedLayer) ? this.associatedLayer.formTemplate : null;
- }
- get fieldsIndex() {
- return new d2(this.fields);
- }
- readNodePages(e3, t7, r5) {
- return t7.layerType === "Point" && (e3 = t7.pointNodePages), e3 == null || typeof e3 != "object" ? null : s3.fromJSON(e3, r5);
- }
- set elevationInfo(e3) {
- this._set("elevationInfo", e3), this.loaded && this._validateElevationInfo();
- }
- get geometryType() {
- return ie[this.profile] || "mesh";
- }
- set renderer(e3) {
- c3(e3, this.fieldsIndex), this._set("renderer", e3);
- }
- readCachedDrawingInfo(e3) {
- return e3 != null && typeof e3 == "object" || (e3 = {}), e3.color == null && (e3.color = false), e3;
- }
- get capabilities() {
- const e3 = r(this.associatedLayer) && this.associatedLayer.capabilities ? this.associatedLayer.capabilities : t6, { query: t7, editing: { supportsGlobalId: r5, supportsRollbackOnFailure: i3, supportsUploadWithItemId: s5, supportsReturnServiceEditsInSourceSpatialReference: o2 }, data: { supportsZ: a2, supportsM: p6, isVersioned: l7, supportsAttachment: d5 }, operations: { supportsEditing: y, supportsUpdate: u4, supportsQuery: c5, supportsQueryAttachments: f2 } } = e3, h = e3.operations.supportsChangeTracking;
- return { query: t7, editing: { supportsGlobalId: r5, supportsReturnServiceEditsInSourceSpatialReference: o2, supportsRollbackOnFailure: i3, supportsGeometryUpdate: false, supportsUploadWithItemId: s5 }, data: { supportsAttachment: d5, supportsZ: a2, supportsM: p6, isVersioned: l7 }, operations: { supportsQuery: c5, supportsQueryAttachments: f2, supportsEditing: y && h, supportsAdd: false, supportsDelete: false, supportsUpdate: u4 && h } };
- }
- get editingEnabled() {
- return this._isOverridden("editingEnabled") ? this._get("editingEnabled") : this.userHasEditingPrivileges;
- }
- set editingEnabled(e3) {
- e3 != null ? this._override("editingEnabled", e3) : this._clearOverride("editingEnabled");
- }
- get defaultPopupTemplate() {
- return r(this.associatedLayer) || this.attributeStorageInfo ? this.createPopupTemplate() : null;
- }
- readObjectIdField(e3, t7) {
- return !e3 && t7.fields && t7.fields.some((t8) => (t8.type === "esriFieldTypeOID" && (e3 = t8.name), !!e3)), e3 || void 0;
- }
- readGlobalIdField(e3, t7) {
- return !e3 && t7.fields && t7.fields.some((t8) => (t8.type === "esriFieldTypeGlobalID" && (e3 = t8.name), !!e3)), e3 || void 0;
- }
- get displayField() {
- return r(this.associatedLayer) ? this.associatedLayer.displayField : null;
- }
- readProfile(e3, t7) {
- const r5 = t7.store.profile;
- return r5 != null && re[r5] ? re[r5] : (Y.error("Unknown or missing profile", { profile: r5, layer: this }), "mesh-pyramids");
- }
- load(e3) {
- const t7 = r(e3) ? e3.signal : null, r5 = this.loadFromPortal({ supportedTypes: ["Scene Service"] }, e3).catch(w).then(() => this._fetchService(t7)).then(() => Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages, t7), this._setAssociatedFeatureLayer(t7), r(this.filter) ? this.filter.loadGeometries(this.spatialReference) : null])).then(() => this._validateElevationInfo()).then(() => this._applyAssociatedLayerOverrides()).then(() => this._populateFieldUsageInfo()).then(() => t3(this, { origin: "service" }, t7)).then(() => c3(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 b();
- return this.geometryType !== "mesh" && (e3.returnGeometry = true, e3.returnZ = true), e3.where = this.definitionExpression || "1=1", e3.sqlFormat = "standard", e3;
- }
- queryExtent(e3, t7) {
- return this._getAssociatedLayerForQuery().then((r5) => r5.queryExtent(e3 || this.createQuery(), t7));
- }
- queryFeatureCount(e3, t7) {
- return this._getAssociatedLayerForQuery().then((r5) => r5.queryFeatureCount(e3 || this.createQuery(), t7));
- }
- queryFeatures(e3, t7) {
- return this._getAssociatedLayerForQuery().then((r5) => r5.queryFeatures(e3 || this.createQuery(), t7)).then((e4) => {
- if (e4?.features)
- for (const t8 of e4.features)
- t8.layer = this, t8.sourceLayer = this;
- return e4;
- });
- }
- queryObjectIds(e3, t7) {
- return this._getAssociatedLayerForQuery().then((r5) => r5.queryObjectIds(e3 || this.createQuery(), t7));
- }
- queryAttachments(e3, t7) {
- return this._getAssociatedLayerForQuery().then((r5) => r5.queryAttachments(e3, t7));
- }
- getFieldUsageInfo(e3) {
- const t7 = { supportsLabelingInfo: false, supportsRenderer: false, supportsPopupTemplate: false, supportsLayerQuery: false };
- return this.loaded ? this._fieldUsageInfo[e3] || t7 : (Y.error("#getFieldUsageInfo()", "Unavailable until layer is loaded"), t7);
- }
- createPopupTemplate(e3) {
- return d4(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 this.statisticsInfo != null && this.statisticsInfo.some((t7) => t7.name === e3);
- }
- async queryCachedStatistics(e3, t7) {
- if (await this.load(t7), !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 s5 of this.statisticsInfo)
- if (s5.name === r5.name) {
- const e4 = G(this.parsedUrl.path, s5.href);
- return U2(e4, { query: { f: "json", token: this.apiKey }, responseType: "json", signal: t7 ? t7.signal : null }).then((e5) => e5.data);
- }
- throw new s2("scenelayer:no-cached-statistics", "Cached statistics for this attribute are not available");
- }
- async saveAs(e3, t7) {
- return this._debouncedSaveOperations(K.SAVE_AS, { ...t7, getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "scene" }, e3);
- }
- async save() {
- const e3 = { getTypeKeywords: () => this._getTypeKeywords(), portalItemLayerType: "scene" };
- return this._debouncedSaveOperations(K.SAVE, e3);
- }
- async applyEdits(e3, t7) {
- const r5 = await import("./editingSupport-KL4E3VVF.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, t7);
- }
- on(e3, t7) {
- return super.on(e3, t7);
- }
- validateLayer(e3) {
- if (e3.layerType && !X.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 t7(e4, t8) {
- let r5 = false, i3 = false;
- if (e4 == null)
- r5 = true, i3 = true;
- else {
- const s5 = t8 && t8.isGeographic;
- switch (e4) {
- case "east-north-up":
- case "earth-centered":
- r5 = true, i3 = s5;
- break;
- case "vertex-reference-frame":
- r5 = true, i3 = !s5;
- break;
- default:
- r5 = false;
- }
- }
- if (!r5)
- throw new s2("scenelayer:unsupported-normal-reference-frame", "Normal reference frame is invalid.");
- if (!i3)
- throw new s2("scenelayer:incompatible-normal-reference-frame", "Normal reference frame is incompatible with layer spatial reference.");
- }
- t7(this.normalReferenceFrame, this.spatialReference);
- }
- _getTypeKeywords() {
- const e3 = [];
- if (this.profile === "points")
- e3.push("Point");
- else {
- if (this.profile !== "mesh-pyramids")
- 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 t7 = !(!this.attributeStorageInfo || !this.attributeStorageInfo.some((t8) => t8.name === e3.name)), r5 = !!(r(this.associatedLayer) && this.associatedLayer.fields && this.associatedLayer.fields.some((t8) => t8 && e3.name === t8.name)), i3 = { supportsLabelingInfo: t7, supportsRenderer: t7, supportsPopupTemplate: t7 || r5, supportsLayerQuery: r5 };
- this._fieldUsageInfo[e3.name] = i3;
- }
- }
- _applyAssociatedLayerOverrides() {
- this._applyAssociatedLayerFieldsOverrides(), this._applyAssociatedLayerPopupOverrides();
- }
- _applyAssociatedLayerFieldsOverrides() {
- if (t(this.associatedLayer) || !this.associatedLayer.fields)
- return;
- let e3 = null;
- for (const t7 of this.associatedLayer.fields) {
- const r5 = this.getField(t7.name);
- r5 ? (!r5.domain && t7.domain && (r5.domain = t7.domain.clone()), r5.editable = t7.editable, r5.nullable = t7.nullable, r5.length = t7.length) : (e3 || (e3 = this.fields ? this.fields.slice() : []), e3.push(t7.clone()));
- }
- e3 && this._set("fields", e3);
- }
- _applyAssociatedLayerPopupOverrides() {
- if (t(this.associatedLayer))
- return;
- const e3 = ["popupTemplate", "popupEnabled"], t7 = e2(this);
- for (let r5 = 0; r5 < e3.length; r5++) {
- const i3 = e3[r5], s5 = this.originIdOf(i3), o2 = this.associatedLayer.originIdOf(i3);
- s5 < o2 && (o2 === r2.SERVICE || o2 === r2.PORTAL_ITEM) && t7.setAtOrigin(i3, this.associatedLayer[i3], o2);
- }
- }
- async _setAssociatedFeatureLayer(e3) {
- if (!["mesh-pyramids", "points"].includes(this.profile))
- return;
- const t7 = new l5(this.parsedUrl, this.portalItem, this.apiKey, e3);
- try {
- this.associatedLayer = await t7.fetch();
- } catch (r5) {
- g(r5) || this._logWarningOnPopupEnabled();
- }
- }
- async _logWarningOnPopupEnabled() {
- await j2(() => this.popupEnabled && this.popupTemplate != null);
- const e3 = `this SceneLayer: ${this.title}`;
- this.attributeStorageInfo == null ? Y.warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e3}`) : Y.info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e3}`);
- }
- _validateElevationInfo() {
- const e3 = this.elevationInfo;
- e3 && (this.profile === "mesh-pyramids" && e3.mode === "relative-to-scene" && Y.warn(".elevationInfo=", "Mesh scene layers don't support relative-to-scene elevation mode"), e3.featureExpressionInfo && e3.featureExpressionInfo.expression !== "0" && Y.warn(".elevationInfo=", "Scene layers do not support featureExpressionInfo"));
- }
- };
- e([d({ types: { key: "type", base: t5, typeMap: { selection: p3 } }, json: { origins: { "web-scene": { name: "layerDefinition.featureReduction", write: true }, "portal-item": { name: "layerDefinition.featureReduction", write: true } } } })], te.prototype, "featureReduction", void 0), e([d({ type: [s4], json: { read: false, origins: { "web-scene": { name: "layerDefinition.rangeInfos", write: true }, "portal-item": { name: "layerDefinition.rangeInfos", write: true } } } })], te.prototype, "rangeInfos", void 0), e([d({ json: { read: false } })], te.prototype, "associatedLayer", void 0), e([d({ type: ["show", "hide"] })], te.prototype, "listMode", void 0), e([d({ type: ["ArcGISSceneServiceLayer"] })], te.prototype, "operationalLayerType", void 0), e([d({ json: { read: false }, readOnly: true })], te.prototype, "type", void 0), e([d({ ...ee.fields, readOnly: true, json: { read: false, origins: { service: { read: true } } } })], te.prototype, "fields", void 0), e([d()], te.prototype, "types", null), e([d()], te.prototype, "typeIdField", null), e([d()], te.prototype, "formTemplate", null), e([d({ readOnly: true })], te.prototype, "fieldsIndex", null), e([d({ type: p4, json: { read: { source: "layerDefinition.floorInfo" }, write: { target: "layerDefinition.floorInfo" } } })], te.prototype, "floorInfo", void 0), e([d(ee.outFields)], te.prototype, "outFields", void 0), e([d({ type: s3, readOnly: true, json: { read: false } })], te.prototype, "nodePages", void 0), e([o("service", "nodePages", ["nodePages", "pointNodePages"])], te.prototype, "readNodePages", null), e([d({ type: [l4], readOnly: true })], te.prototype, "materialDefinitions", void 0), e([d({ type: [u3], readOnly: true })], te.prototype, "textureSetDefinitions", void 0), e([d({ type: [m4], readOnly: true })], te.prototype, "geometryDefinitions", void 0), e([d({ readOnly: true })], te.prototype, "serviceUpdateTimeStamp", void 0), e([d({ readOnly: true })], te.prototype, "attributeStorageInfo", void 0), e([d({ readOnly: true })], te.prototype, "statisticsInfo", void 0), e([d({ type: j.ofType(Number), nonNullable: true, json: { origins: { service: { read: false, write: false } }, name: "layerDefinition.excludeObjectIds", write: { enabled: true } } })], te.prototype, "excludeObjectIds", void 0), e([d({ type: String, json: { origins: { service: { read: false, write: false } }, name: "layerDefinition.definitionExpression", write: { enabled: true, allowNull: true } } })], te.prototype, "definitionExpression", void 0), e([d({ type: j4, json: { name: "layerDefinition.polygonFilter", write: true } })], te.prototype, "filter", void 0), e([d({ type: String, json: { origins: { "web-scene": { read: true, write: true } }, read: false } })], te.prototype, "path", void 0), e([d(d3)], te.prototype, "elevationInfo", null), e([d({ type: String })], te.prototype, "geometryType", null), e([d(m3)], te.prototype, "labelsVisible", void 0), e([d({ type: [j3], json: { origins: { service: { name: "drawingInfo.labelingInfo", read: { reader: r4 }, write: false } }, name: "layerDefinition.drawingInfo.labelingInfo", read: { reader: r4 }, write: true } })], te.prototype, "labelingInfo", void 0), e([d(c)], te.prototype, "legendEnabled", void 0), e([d({ 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, t7) {
- if (typeof e3 == "number" && e3 >= 0 && e3 <= 1)
- return e3;
- const r5 = t7.layerDefinition?.drawingInfo?.transparency;
- return r5 !== void 0 ? r3(r5) : void 0;
- } } }, "portal-item": { write: true }, service: { read: false } } } })], te.prototype, "opacity", void 0), e([d({ type: ["Low", "High"], readOnly: true, json: { read: false, origins: { service: { read: true } } } })], te.prototype, "priority", void 0), e([d({ type: ["Labels"], readOnly: true, json: { read: false, origins: { service: { read: true } } } })], te.prototype, "semantic", void 0), e([d({ types: n2, json: { origins: { service: { read: { source: "drawingInfo.renderer" } } }, name: "layerDefinition.drawingInfo.renderer", write: true }, value: null })], te.prototype, "renderer", null), e([d({ json: { read: false } })], te.prototype, "cachedDrawingInfo", void 0), e([o("service", "cachedDrawingInfo")], te.prototype, "readCachedDrawingInfo", null), e([d({ readOnly: true, json: { read: false } })], te.prototype, "capabilities", null), e([d({ type: Boolean, json: { read: false } })], te.prototype, "editingEnabled", null), e([d(p)], te.prototype, "popupEnabled", void 0), e([d({ type: B, json: { name: "popupInfo", write: true } })], te.prototype, "popupTemplate", void 0), e([d({ readOnly: true, json: { read: false } })], te.prototype, "defaultPopupTemplate", null), e([d({ type: String, json: { read: false } })], te.prototype, "objectIdField", void 0), e([o("service", "objectIdField", ["objectIdField", "fields"])], te.prototype, "readObjectIdField", null), e([d({ type: String, json: { read: false } })], te.prototype, "globalIdField", void 0), e([o("service", "globalIdField", ["globalIdField", "fields"])], te.prototype, "readGlobalIdField", null), e([d({ readOnly: true, type: String, json: { read: false } })], te.prototype, "displayField", null), e([d({ type: String, json: { read: false } })], te.prototype, "profile", void 0), e([o("service", "profile", ["store.profile"])], te.prototype, "readProfile", null), e([d({ readOnly: true, type: String, json: { origins: { service: { read: { source: "store.normalReferenceFrame" } } }, read: false } })], te.prototype, "normalReferenceFrame", void 0), e([d(l2)], te.prototype, "screenSizePerspectiveEnabled", void 0), te = e([n("esri.layers.SceneLayer")], te);
- var re = { "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 ie = { "mesh-pyramids": "mesh", points: "point", lines: "polyline", polygons: "polygon" };
- var se = te;
- export {
- se as default
- };
- //# sourceMappingURL=SceneLayer-TEB5XGYY.js.map
|