import { p as p5, p3 as p6, r as r2 } from "./chunk-HGDNY7J3.js"; import "./chunk-GD5TMIPM.js"; import { l as l3 } from "./chunk-ZRX5UNQH.js"; import { t } from "./chunk-F37AVPUF.js"; import { a as a2 } from "./chunk-435DJNTD.js"; import "./chunk-T3EUPDKL.js"; import { p as p4 } from "./chunk-6URTNEGN.js"; import { j } from "./chunk-RQJNTZAL.js"; import "./chunk-QTOOFNRV.js"; import "./chunk-7O56JPWQ.js"; import { o as o3 } from "./chunk-6B2LQBKM.js"; import { d as d2 } from "./chunk-MFI6BALW.js"; import { n as n3, o as o2, p as p2, p2 as p3 } from "./chunk-CIG5OHC7.js"; import { P } from "./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 { M as M2 } from "./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 "./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-7XXXCK2A.js"; import "./chunk-7ZIDBK7B.js"; import { v } from "./chunk-KHA63LLS.js"; import { c as c2 } from "./chunk-FGKNEJKJ.js"; import { I, b as b2, c, f, l as l2, m, p, x } from "./chunk-PSV473TI.js"; import { O } from "./chunk-I3OBGWNS.js"; import "./chunk-FONIFA5N.js"; import "./chunk-EG5OI4V4.js"; import "./chunk-65BYCSII.js"; import { c as c3, m as m2 } from "./chunk-WZQZRKNH.js"; import "./chunk-LRDX4TO7.js"; import "./chunk-6A4U74YA.js"; import { n as n2 } from "./chunk-CYI7KFYB.js"; import { a } from "./chunk-5LXROFTA.js"; import "./chunk-GJXW4HL5.js"; import "./chunk-WJW5DUN6.js"; import { t as t2 } 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 b3 } from "./chunk-4DDBH2K5.js"; import "./chunk-7N4X6GF3.js"; import "./chunk-JXW4QTJA.js"; import "./chunk-UXF37FQ4.js"; import { i } from "./chunk-ZOEK6QHJ.js"; import "./chunk-XNLG7T2T.js"; import "./chunk-IR4PV7VK.js"; import "./chunk-2Z6LERTI.js"; import "./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 "./chunk-ALDCDSPV.js"; import "./chunk-DT6EAZQ5.js"; import "./chunk-HNOZUNJ4.js"; import { U } from "./chunk-VNFRAYHO.js"; import "./chunk-R5IG2D6H.js"; import "./chunk-VBRY5KJM.js"; import "./chunk-PDKDCAAD.js"; import { M2 as M, o } from "./chunk-ECW2QABR.js"; import "./chunk-GCDJLKH4.js"; import { k2 as k } from "./chunk-MRJEICT6.js"; import { d, e, l3 as l, n2 as n, s2 as s3 } from "./chunk-Y3WMVFTW.js"; import "./chunk-SAS7RONY.js"; import "./chunk-WSRBH7BF.js"; import { S } from "./chunk-IHXECKQQ.js"; import { w } from "./chunk-ULGDPLM2.js"; import { s, s3 as s2 } from "./chunk-EMJ4ZSM2.js"; import "./chunk-IKP3YN53.js"; import { r } from "./chunk-GZT4BVFP.js"; import "./chunk-A5ICIBVI.js"; // node_modules/@arcgis/core/layers/support/PurgeOptions.js var t3; var i2 = t3 = class extends l { constructor() { super(...arguments), this.age = null, this.ageReceived = null, this.displayCount = null, this.maxObservations = 1; } clone() { return new t3({ age: this.age, ageReceived: this.ageReceived, displayCount: this.displayCount, maxObservations: this.maxObservations }); } }; e([d({ type: Number, json: { write: true } })], i2.prototype, "age", void 0), e([d({ type: Number, json: { write: true } })], i2.prototype, "ageReceived", void 0), e([d({ type: Number, json: { write: true } })], i2.prototype, "displayCount", void 0), e([d({ type: Number, json: { write: true } })], i2.prototype, "maxObservations", void 0), i2 = t3 = e([n("esri.layers.support.PurgeOptions")], i2); var p7 = i2; // node_modules/@arcgis/core/layers/StreamLayer.js var X = s.getLogger("esri.layers.StreamLayer"); var Y = l3(); var Z = class extends p5(a(a2(t2(n2(p4(c2(v(O(o3(b3)))))))))) { constructor(...e2) { super(...e2), this.copyright = null, this.definitionExpression = null, this.displayField = null, this.elevationInfo = null, this.featureReduction = null, this.fields = null, this.fieldsIndex = null, this.geometryDefinition = null, this.geometryType = null, this.labelsVisible = true, this.labelingInfo = null, this.legendEnabled = true, this.maxReconnectionAttempts = 0, this.maxReconnectionInterval = 20, this.maxScale = 0, this.minScale = 0, this.objectIdField = null, this.operationalLayerType = "ArcGISStreamLayer", this.popupEnabled = true, this.popupTemplate = null, this.purgeOptions = new p7(), this.screenSizePerspectiveEnabled = true, this.sourceJSON = null, this.spatialReference = k.WGS84, this.type = "stream", this.url = null, this.updateInterval = 300, this.webSocketUrl = null; } normalizeCtorArgs(e2, r3) { return typeof e2 == "string" ? { url: e2, ...r3 } : e2; } load(e2) { if (!("WebSocket" in globalThis)) return this.addResolvingPromise(Promise.reject(new s2("stream-layer:websocket-unsupported", "WebSocket is not supported in this browser. StreamLayer will not have real-time connection with the stream service."))), Promise.resolve(this); const r3 = r(e2) ? e2.signal : null; return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["Stream Service", "Feed"] }, e2).catch(w).then(() => this._fetchService(r3))), Promise.resolve(this); } get defaultPopupTemplate() { return this.createPopupTemplate(); } set renderer(e2) { c3(e2, this.fieldsIndex), this._set("renderer", e2); } readRenderer(e2, r3, s4) { const p8 = (r3 = r3.layerDefinition || r3).drawingInfo && r3.drawingInfo.renderer || void 0; if (p8) { const e3 = o2(p8, r3, s4) || void 0; return e3 || X.error("Failed to create renderer", { rendererDefinition: r3.drawingInfo.renderer, layer: this, context: s4 }), e3; } if (r3.defaultSymbol) return r3.types && r3.types.length ? new P({ defaultSymbol: $(r3.defaultSymbol, r3, s4), field: r3.typeIdField, uniqueValueInfos: r3.types.map((e3) => ({ id: e3.id, symbol: $(e3.symbol, e3, s4) })) }) : new p2({ symbol: $(r3.defaultSymbol, r3, s4) }); } createPopupTemplate(e2) { return d2(this, e2); } createQuery() { const e2 = new b(); return e2.returnGeometry = true, e2.outFields = ["*"], e2.where = this.definitionExpression || "1=1", e2; } getFieldDomain(e2, r3) { if (!this.fields) return null; let t4 = null; return this.fields.some((r4) => (r4.name === e2 && (t4 = r4.domain), !!t4)), t4; } getField(e2) { return this.fieldsIndex.get(e2); } serviceSupportsSpatialReference(e2) { return true; } async _fetchService(e2) { if (!!this.webSocketUrl) { if (!this.timeInfo?.trackIdField) throw new s2("stream-layer:missing-metadata", "The stream layer trackIdField must be specified."); if (!this.objectIdField) throw new s2("stream-layer:missing-metadata", "The stream layer objectIdField must be specified."); if (!this.fields) throw new s2("stream-layer:missing-metadata", "The stream layer fields must be specified."); if (!this.geometryType) throw new s2("stream-layer:missing-metadata", "The stream layer geometryType must be specified."); this.url = this.webSocketUrl; } else if (!this.sourceJSON) { const { data: r3 } = await U(this.parsedUrl.path, { query: { f: "json", ...this.customParameters, ...this.parsedUrl.query }, responseType: "json", signal: e2 }); this.sourceJSON = r3; } return this.sourceJSON = { ...this.sourceJSON ?? {}, objectIdField: "__esri_stream_id__" }, this.read(this.sourceJSON, { origin: "service", url: this.parsedUrl }), c3(this.renderer, this.fieldsIndex), m2(this.timeInfo, this.fieldsIndex), t(this, { origin: "service" }); } }; e([d({ type: String })], Z.prototype, "copyright", void 0), e([d({ readOnly: true })], Z.prototype, "defaultPopupTemplate", null), e([d({ type: String, json: { name: "layerDefinition.definitionExpression", write: { enabled: true, allowNull: true } } })], Z.prototype, "definitionExpression", void 0), e([d({ type: String })], Z.prototype, "displayField", void 0), e([d({ type: x })], Z.prototype, "elevationInfo", void 0), e([d(p6)], Z.prototype, "featureReduction", void 0), e([d(Y.fields)], Z.prototype, "fields", void 0), e([d(Y.fieldsIndex)], Z.prototype, "fieldsIndex", void 0), e([d({ type: M })], Z.prototype, "geometryDefinition", void 0), e([d({ type: i.apiValues, json: { read: { reader: i.read } } })], Z.prototype, "geometryType", void 0), e([d(m)], Z.prototype, "labelsVisible", void 0), e([d({ type: [j], json: { read: { source: "layerDefinition.drawingInfo.labelingInfo", reader: r2 }, write: { target: "layerDefinition.drawingInfo.labelingInfo" } } })], Z.prototype, "labelingInfo", void 0), e([d(c)], Z.prototype, "legendEnabled", void 0), e([d({ type: ["show", "hide"] })], Z.prototype, "listMode", void 0), e([d({ type: S })], Z.prototype, "maxReconnectionAttempts", void 0), e([d({ type: S })], Z.prototype, "maxReconnectionInterval", void 0), e([d(I)], Z.prototype, "maxScale", void 0), e([d(b2)], Z.prototype, "minScale", void 0), e([d({ type: String })], Z.prototype, "objectIdField", void 0), e([d({ value: "ArcGISStreamLayer", type: ["ArcGISStreamLayer"] })], Z.prototype, "operationalLayerType", void 0), e([d(p)], Z.prototype, "popupEnabled", void 0), e([d({ type: B, json: { read: { source: "popupInfo" }, write: { target: "popupInfo" } } })], Z.prototype, "popupTemplate", void 0), e([d({ type: p7 })], Z.prototype, "purgeOptions", void 0), e([d({ types: p3, json: { origins: { service: { write: { target: "drawingInfo.renderer", enabled: false } }, "web-scene": { name: "layerDefinition.drawingInfo.renderer", types: n3, write: true } }, write: { target: "layerDefinition.drawingInfo.renderer" } } })], Z.prototype, "renderer", null), e([o("service", "renderer", ["drawingInfo.renderer", "defaultSymbol"]), o("renderer", ["layerDefinition.drawingInfo.renderer", "layerDefinition.defaultSymbol"])], Z.prototype, "readRenderer", null), e([d(l2)], Z.prototype, "screenSizePerspectiveEnabled", void 0), e([d()], Z.prototype, "sourceJSON", void 0), e([d({ type: k, json: { origins: { service: { read: { source: "spatialReference" } } } } })], Z.prototype, "spatialReference", void 0), e([d({ json: { read: false } })], Z.prototype, "type", void 0), e([d(f)], Z.prototype, "url", void 0), e([d({ type: Number })], Z.prototype, "updateInterval", void 0), e([d({ type: String })], Z.prototype, "webSocketUrl", void 0), Z = e([n("esri.layers.StreamLayer")], Z); var $ = s3({ types: M2 }); var ee = Z; export { ee as default }; //# sourceMappingURL=StreamLayer-TMUPPSKV.js.map