123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- import {
- n as n4,
- p as p5
- } from "./chunk-X42TFXOU.js";
- import "./chunk-JFSMKLAQ.js";
- import "./chunk-LXOC7SMQ.js";
- import {
- s as s4
- } from "./chunk-DN6W4TJU.js";
- import {
- t as t2
- } from "./chunk-5GYJGY4C.js";
- import {
- a
- } from "./chunk-XEQ4FTFC.js";
- import "./chunk-JM5OVQAD.js";
- import {
- p as p4
- } from "./chunk-ZOKNWEG3.js";
- import {
- i as i2,
- j2 as j
- } from "./chunk-JAUFBT5U.js";
- import {
- o as o3
- } from "./chunk-W6U6FKJ3.js";
- import {
- p as p6
- } from "./chunk-7C2KDOAI.js";
- import {
- n as n3,
- o as o2,
- p as p2,
- p2 as p3
- } from "./chunk-RHFU6KWO.js";
- import {
- C
- } from "./chunk-3FNKD2EB.js";
- import "./chunk-ZOO4I2U4.js";
- import "./chunk-JPUFJK2B.js";
- import "./chunk-HZ2WKB3G.js";
- import "./chunk-3HCJD762.js";
- import "./chunk-RVCE264D.js";
- import "./chunk-HKJ7X3BD.js";
- import "./chunk-Y74D3LKQ.js";
- import "./chunk-PK4W65H4.js";
- import "./chunk-7C23ILQ4.js";
- import {
- k as k2
- } from "./chunk-P6VVVEX6.js";
- import {
- M
- } from "./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-JLYTER4T.js";
- import "./chunk-CRHRHOXH.js";
- import "./chunk-ZSW35JPD.js";
- import "./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 "./chunk-TJV6ODRM.js";
- import {
- v
- } from "./chunk-JUWKPBLS.js";
- import {
- c as c2
- } from "./chunk-WLSB4F4I.js";
- import {
- I,
- c,
- f,
- l as l2,
- m,
- p as p7,
- v as v2
- } from "./chunk-GLSWDDR3.js";
- import {
- O
- } from "./chunk-MIQGEDET.js";
- import {
- x as x3
- } from "./chunk-DUEMJ5XS.js";
- import "./chunk-VRLXUHP2.js";
- import "./chunk-3LVSQLWJ.js";
- import "./chunk-4ONPMX2F.js";
- import {
- F,
- x as x2
- } from "./chunk-CRGY2SDS.js";
- import "./chunk-4T5ZGMEN.js";
- import {
- p
- } from "./chunk-GN35O2ZO.js";
- import {
- n as n2
- } from "./chunk-XTVKPAWY.js";
- import "./chunk-3OSQ6GXO.js";
- import "./chunk-3WQOA5CB.js";
- import {
- t
- } 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-O6VYMEIX.js";
- import "./chunk-X4SA4ELJ.js";
- import "./chunk-5N7JLUJJ.js";
- import "./chunk-ZAY3CMAZ.js";
- import "./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 {
- i
- } from "./chunk-75U5LM2V.js";
- import "./chunk-RMDDCMKS.js";
- import "./chunk-VCH45Q2I.js";
- import "./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
- } from "./chunk-DVUG3KID.js";
- import "./chunk-FWSQEIAR.js";
- import "./chunk-VEGAOVMY.js";
- import {
- o,
- w2
- } from "./chunk-6T6G6LCQ.js";
- import "./chunk-YEJL5NEF.js";
- import {
- k2 as k
- } from "./chunk-PQFTYGF5.js";
- import {
- e,
- l3 as l,
- n5 as n,
- s5 as s3,
- y3 as y
- } from "./chunk-2Z2TG5CU.js";
- import "./chunk-6KZ2LTDA.js";
- import "./chunk-U2XHEJM7.js";
- import {
- T
- } from "./chunk-SQOPWYIT.js";
- import {
- w
- } from "./chunk-V6P2MAQQ.js";
- import {
- s2 as s,
- s3 as s2
- } from "./chunk-E5O6P5I2.js";
- import "./chunk-SPWQ3AWG.js";
- import "./chunk-2TIUKVZN.js";
- import {
- r
- } from "./chunk-YXWMMD76.js";
- import "./chunk-S5KM4IGW.js";
- // node_modules/@arcgis/core/layers/support/PurgeOptions.js
- var t3;
- var i3 = 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([y({ type: Number, json: { write: true } })], i3.prototype, "age", void 0), e([y({ type: Number, json: { write: true } })], i3.prototype, "ageReceived", void 0), e([y({ type: Number, json: { write: true } })], i3.prototype, "displayCount", void 0), e([y({ type: Number, json: { write: true } })], i3.prototype, "maxObservations", void 0), i3 = t3 = e([n("esri.layers.support.PurgeOptions")], i3);
- var p8 = i3;
- // node_modules/@arcgis/core/layers/StreamLayer.js
- var X = s4();
- var Y = class extends n4(p5(n2(a(t(p(p4(c2(v(O(o3(b))))))))))) {
- constructor(...e2) {
- super(...e2), this.copyright = null, this.definitionExpression = null, this.displayField = null, this.elevationInfo = 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 p8(), this.screenSizePerspectiveEnabled = true, this.sourceJSON = null, this.spatialReference = k.WGS84, this.type = "stream", this.url = null, this.updateInterval = 300, this.webSocketUrl = null;
- }
- normalizeCtorArgs(e2, r2) {
- return "string" == typeof e2 ? { url: e2, ...r2 } : 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 r2 = r(e2) ? e2.signal : null;
- return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["Stream Service", "Feed"] }, e2).catch(w).then(() => this._fetchService(r2))), Promise.resolve(this);
- }
- get defaultPopupTemplate() {
- return this.createPopupTemplate();
- }
- set renderer(e2) {
- F(e2, this.fieldsIndex), this._set("renderer", e2);
- }
- readRenderer(e2, r2, s5) {
- const n5 = (r2 = r2.layerDefinition || r2).drawingInfo && r2.drawingInfo.renderer || void 0;
- if (n5) {
- const e3 = o2(n5, r2, s5) || void 0;
- return e3 || s.getLogger(this.declaredClass).error("Failed to create renderer", { rendererDefinition: r2.drawingInfo.renderer, layer: this, context: s5 }), e3;
- }
- if (r2.defaultSymbol)
- return r2.types && r2.types.length ? new C({ defaultSymbol: Z(r2.defaultSymbol, r2, s5), field: r2.typeIdField, uniqueValueInfos: r2.types.map((e3) => ({ id: e3.id, symbol: Z(e3.symbol, e3, s5) })) }) : new p2({ symbol: Z(r2.defaultSymbol, r2, s5) });
- }
- async connect(e2) {
- const [{ createConnection: r2 }] = await Promise.all([import("./createConnection-DO7F3L4B.js"), this.load()]), t4 = i.toJSON(this.geometryType), { customParameters: o4 = null, definitionExpression: i4 = null, geometryDefinition: s5 = null, maxReconnectionAttempts: n5 = 0, maxReconnectionInterval: p9 = 20, spatialReference: a2 = this.spatialReference } = e2 || this.createConnectionParameters();
- return r2(this.parsedUrl, this.spatialReference, a2, t4, { geometry: s5, where: i4 }, n5, p9, o4);
- }
- createConnectionParameters() {
- return { spatialReference: this.spatialReference, customParameters: this.customParameters, definitionExpression: this.definitionExpression, geometryDefinition: this.geometryDefinition, maxReconnectionAttempts: this.maxReconnectionAttempts, maxReconnectionInterval: this.maxReconnectionInterval };
- }
- createPopupTemplate(e2) {
- return p6(this, e2);
- }
- createQuery() {
- const e2 = new x();
- return e2.returnGeometry = true, e2.outFields = ["*"], e2.where = this.definitionExpression || "1=1", e2;
- }
- getFieldDomain(e2, r2) {
- if (!this.fields)
- return null;
- let t4 = null;
- return this.fields.some((r3) => (r3.name === e2 && (t4 = r3.domain), !!t4)), t4;
- }
- getField(e2) {
- return this.fieldsIndex.get(e2);
- }
- serviceSupportsSpatialReference(e2) {
- return true;
- }
- async _fetchService(e2) {
- var _a, _b;
- if (!!this.webSocketUrl) {
- if (!((_a = this.timeInfo) == null ? void 0 : _a.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: r2 } = await U(this.parsedUrl.path, { query: { f: "json", ...this.customParameters, ...this.parsedUrl.query }, responseType: "json", signal: e2 });
- this.sourceJSON = r2;
- }
- return this.sourceJSON = { ...(_b = this.sourceJSON) != null ? _b : {}, objectIdField: "__esri_stream_id__" }, this.read(this.sourceJSON, { origin: "service", url: this.parsedUrl }), F(this.renderer, this.fieldsIndex), x2(this.timeInfo, this.fieldsIndex), t2(this, { origin: "service" });
- }
- };
- e([y({ type: String })], Y.prototype, "copyright", void 0), e([y({ readOnly: true })], Y.prototype, "defaultPopupTemplate", null), e([y({ type: String, json: { name: "layerDefinition.definitionExpression", write: { enabled: true, allowNull: true } } })], Y.prototype, "definitionExpression", void 0), e([y({ type: String })], Y.prototype, "displayField", void 0), e([y({ type: x3 })], Y.prototype, "elevationInfo", void 0), e([y(X.fields)], Y.prototype, "fields", void 0), e([y(X.fieldsIndex)], Y.prototype, "fieldsIndex", void 0), e([y({ type: w2 })], Y.prototype, "geometryDefinition", void 0), e([y({ type: i.apiValues, json: { read: { reader: i.read } } })], Y.prototype, "geometryType", void 0), e([y(m)], Y.prototype, "labelsVisible", void 0), e([y({ type: [j], json: { read: { source: "layerDefinition.drawingInfo.labelingInfo", reader: i2 }, write: { target: "layerDefinition.drawingInfo.labelingInfo" } } })], Y.prototype, "labelingInfo", void 0), e([y(c)], Y.prototype, "legendEnabled", void 0), e([y({ type: ["show", "hide"] })], Y.prototype, "listMode", void 0), e([y({ type: T })], Y.prototype, "maxReconnectionAttempts", void 0), e([y({ type: T })], Y.prototype, "maxReconnectionInterval", void 0), e([y(I)], Y.prototype, "maxScale", void 0), e([y(v2)], Y.prototype, "minScale", void 0), e([y({ type: String })], Y.prototype, "objectIdField", void 0), e([y({ value: "ArcGISStreamLayer", type: ["ArcGISStreamLayer"] })], Y.prototype, "operationalLayerType", void 0), e([y(p7)], Y.prototype, "popupEnabled", void 0), e([y({ type: k2, json: { read: { source: "popupInfo" }, write: { target: "popupInfo" } } })], Y.prototype, "popupTemplate", void 0), e([y({ type: p8 })], Y.prototype, "purgeOptions", void 0), e([y({ 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" } } })], Y.prototype, "renderer", null), e([o("service", "renderer", ["drawingInfo.renderer", "defaultSymbol"]), o("renderer", ["layerDefinition.drawingInfo.renderer", "layerDefinition.defaultSymbol"])], Y.prototype, "readRenderer", null), e([y(l2)], Y.prototype, "screenSizePerspectiveEnabled", void 0), e([y()], Y.prototype, "sourceJSON", void 0), e([y({ type: k, json: { origins: { service: { read: { source: "spatialReference" } } } } })], Y.prototype, "spatialReference", void 0), e([y({ json: { read: false } })], Y.prototype, "type", void 0), e([y(f)], Y.prototype, "url", void 0), e([y({ type: Number })], Y.prototype, "updateInterval", void 0), e([y({ type: String })], Y.prototype, "webSocketUrl", void 0), Y = e([n("esri.layers.StreamLayer")], Y);
- var Z = s3({ types: M });
- var $ = Y;
- export {
- $ as default
- };
- //# sourceMappingURL=StreamLayer-BWRCEZIN.js.map
|