import { F, I, N, S, T, j as j2, k as k2, q, x as x2 } from "./chunk-T6STWTVU.js"; import "./chunk-YVTH4OGO.js"; import "./chunk-4D6PVVFX.js"; import "./chunk-WQJRLXWG.js"; import { p as p4 } from "./chunk-XKHC7KKF.js"; import { p as p3, p3 as p5, r as r2 } from "./chunk-HGDNY7J3.js"; import "./chunk-GD5TMIPM.js"; import { l as l2 } from "./chunk-ZRX5UNQH.js"; import { x } from "./chunk-2VFJVI2I.js"; import "./chunk-FYNVVMWY.js"; import "./chunk-Q52DVFYK.js"; import "./chunk-HBMVUVZX.js"; import { a as a2 } from "./chunk-435DJNTD.js"; import "./chunk-T3EUPDKL.js"; import { i as i2 } from "./chunk-FMKGHOGD.js"; import { n as n4 } from "./chunk-KN7TOKVN.js"; import { j } from "./chunk-RQJNTZAL.js"; import "./chunk-QTOOFNRV.js"; import "./chunk-7O56JPWQ.js"; import { o } from "./chunk-6B2LQBKM.js"; import { d as d3 } from "./chunk-MFI6BALW.js"; import { n as n3, p2 } 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-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 { y } from "./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 { c, d as d2, f, l, m as m2, p } 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 m3 } 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 t3 } 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 { i, t as t2 } 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 { m } from "./chunk-TBBTRX4O.js"; import "./chunk-YBSUITLL.js"; import "./chunk-ALDCDSPV.js"; import "./chunk-DT6EAZQ5.js"; import "./chunk-HNOZUNJ4.js"; import "./chunk-VNFRAYHO.js"; import "./chunk-R5IG2D6H.js"; import "./chunk-VBRY5KJM.js"; import "./chunk-PDKDCAAD.js"; import { M2 as M } from "./chunk-ECW2QABR.js"; import "./chunk-GCDJLKH4.js"; import { k2 as k } from "./chunk-MRJEICT6.js"; import { d, e, n2 as n } from "./chunk-Y3WMVFTW.js"; import "./chunk-SAS7RONY.js"; import "./chunk-WSRBH7BF.js"; import "./chunk-IHXECKQQ.js"; import "./chunk-ULGDPLM2.js"; import { s3 as s } from "./chunk-EMJ4ZSM2.js"; import "./chunk-IKP3YN53.js"; import { r, t } from "./chunk-GZT4BVFP.js"; import "./chunk-A5ICIBVI.js"; // node_modules/@arcgis/core/layers/graphics/sources/OGCFeatureSource.js var x3 = class extends m { constructor() { super(...arguments), this.featureDefinition = null, this.type = "ogc-feature"; } load(e2) { return this.addResolvingPromise(this._loadOGCServices(this.layer, e2)), this.when(); } getFeatureDefinition() { const { featureDefinition: { collection: e2, layerDefinition: t4, spatialReference: s2, supportedCrs: r3 }, layer: { apiKey: o2, capabilities: p6, customParameters: i3 } } = this; return { capabilities: p6, collection: e2, layerDefinition: t4, queryParameters: { apiKey: o2, customParameters: i3 }, spatialReference: s2, supportedCrs: r3 }; } queryExtent(e2, t4 = {}) { return null; } queryFeatureCount(e2, t4 = {}) { return null; } queryFeatures(e2, t4 = {}) { return this.queryFeaturesJSON(e2, t4).then((e3) => x.fromJSON(e3)); } queryFeaturesJSON(e2, t4 = {}) { const s2 = this.getFeatureDefinition(); return this.load(t4).then(() => q(s2, e2, t4)); } queryObjectIds(e2, t4 = {}) { return null; } serviceSupportsSpatialReference(e2) { return !(!e2.isWGS84 && !e2.isWebMercator) || !!this.featureDefinition.supportedCrs[e2.wkid]; } _conformsToType(e2, t4) { const s2 = new RegExp(`^${t4}$`, "i"); return e2.conformsTo.some((e3) => s2.test(e3)) ?? false; } _getCapabilities(e2, t4) { const s2 = r(t4) ? t4.components?.parameters : null; return { analytics: { supportsCacheHint: false }, attachment: null, data: { isVersioned: false, supportsAttachment: false, supportsM: false, supportsZ: e2 }, metadata: { supportsAdvancedFieldProperties: false }, operations: { supportsCalculate: false, supportsTruncate: false, supportsValidateSql: false, supportsAdd: false, supportsDelete: false, supportsEditing: false, supportsChangeTracking: false, supportsQuery: false, supportsQueryAnalytics: false, supportsQueryAttachments: false, supportsQueryTopFeatures: false, supportsResizeAttachments: false, supportsSync: false, supportsUpdate: false, supportsExceedsLimitStatistics: false }, query: { maxRecordCount: s2?.limit?.schema?.maximum ?? s2?.limitFeatures?.schema?.maximum ?? 5e3, maxRecordCountFactor: void 0, standardMaxRecordCount: void 0, supportsCacheHint: false, supportsCentroid: false, supportsDisjointSpatialRelationship: false, supportsDistance: false, supportsDistinct: false, supportsExtent: false, supportsFormatPBF: false, supportsGeometryProperties: false, supportsHavingClause: false, supportsHistoricMoment: false, supportsMaxRecordCountFactor: false, supportsOrderBy: false, supportsPagination: false, supportsPercentileStatistics: false, supportsQuantization: false, supportsQuantizationEditMode: false, supportsQueryByOthers: false, supportsQueryGeometry: false, supportsResultType: false, supportsStandardizedQueriesOnly: false, supportsTopFeaturesQuery: false, supportsStatistics: false, supportsSpatialAggregationStatistics: false, supportedSpatialAggregationStatistics: { envelope: false, centroid: false, convexHull: false }, supportsDefaultSpatialReference: false, supportsCompactGeometry: false, supportsSqlExpression: false, tileMaxRecordCount: void 0 }, queryRelated: { supportsCount: false, supportsOrderBy: false, supportsPagination: false, supportsCacheHint: false }, queryTopFeatures: { supportsCacheHint: false }, editing: { supportsDeleteByAnonymous: false, supportsDeleteByOthers: false, supportsGeometryUpdate: false, supportsGlobalId: false, supportsReturnServiceEditsInSourceSpatialReference: false, supportsRollbackOnFailure: false, supportsUpdateByAnonymous: false, supportsUpdateByOthers: false, supportsUploadWithItemId: false, supportsUpdateWithoutM: false } }; } _getExtent(e2) { const t4 = e2.extent?.spatial; if (!t4) return null; const s2 = t4.bbox[0], r3 = s2.length === 4, o2 = s2[0], p6 = s2[1], i3 = r3 ? void 0 : s2[2]; return { xmin: o2, ymin: p6, xmax: r3 ? s2[2] : s2[3], ymax: r3 ? s2[3] : s2[4], zmin: i3, zmax: r3 ? void 0 : s2[5], spatialReference: k.WGS84.toJSON() }; } _getStorageSpatialReference(e2) { const t4 = e2.storageCrs ?? F, s2 = N(t4); return t(s2) ? k.WGS84 : new k({ wkid: s2 }); } _getSupportedSpatialReferences(e2, t4) { const s2 = "#/crs", r3 = e2.crs ?? [F], o2 = r3.includes(s2) ? r3.filter((e3) => e3 !== s2).concat(t4.crs) : r3, p6 = /^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i; return o2.filter((e3) => !p6.test(e3)); } async _loadOGCServices(e2, s2) { const o2 = r(s2) ? s2.signal : null, { apiKey: p6, collectionId: i3, customParameters: a3, fields: n5, geometryType: g, hasZ: h, objectIdField: x4, timeInfo: C, url: R } = e2, w = { fields: n5?.map((e3) => e3.toJSON()), geometryType: t2.toJSON(g), hasZ: h, objectIdField: x4, timeInfo: C?.toJSON() }, j3 = { apiKey: p6, customParameters: a3, signal: o2 }, F2 = await S(R, j3), [O2, v2] = await Promise.all([k2(F2, j3), T(F2, j3)]); if (!this._conformsToType(O2, "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson")) throw new s("ogc-feature-layer:no-geojson-support", "Server does not support geojson"); const b3 = v2.collections.find((e3) => e3.id === i3); if (!b3) throw new s("ogc-feature-layer:collection-not-found", "Server does not contain the named collection"); const D = this._conformsToType(O2, "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30") ? await x2(F2, j3) : null, T2 = await I(b3, w, j3), P = this._getCapabilities(T2.hasZ, D), _ = this._getExtent(b3), q2 = this._getStorageSpatialReference(b3).toJSON(), E = this._getSupportedSpatialReferences(b3, v2), G = new RegExp(`^${j2}`, "i"), A = {}; for (const t4 of E) { const e3 = N(t4); r(e3) && (A[e3] || (A[e3] = t4.replace(G, ""))); } T2.extent = _, this.featureDefinition = { capabilities: P, collection: b3, layerDefinition: T2, queryParameters: {}, spatialReference: q2, supportedCrs: A }; } }; e([d()], x3.prototype, "featureDefinition", void 0), e([d({ constructOnly: true })], x3.prototype, "layer", void 0), e([d()], x3.prototype, "type", void 0), x3 = e([n("esri.layers.graphics.sources.OGCFeatureSource")], x3); // node_modules/@arcgis/core/layers/OGCFeatureLayer.js var B2 = l2(); var V = class extends i2(o(p3(a(p4(a2(t3(c2(v(n2(O(b2))))))))))) { constructor(e2) { super(e2), this.collectionId = null, this.copyright = null, this.definitionExpression = null, this.description = null, this.displayField = null, this.elevationInfo = null, this.featureReduction = null, this.fields = null, this.fieldsIndex = null, this.fullExtent = null, this.geometryType = null, this.hasZ = void 0, this.labelingInfo = null, this.labelsVisible = true, this.legendEnabled = true, this.objectIdField = null, this.operationalLayerType = "OGCFeatureLayer", this.popupEnabled = true, this.popupTemplate = null, this.screenSizePerspectiveEnabled = true, this.source = new x3({ layer: this }), this.spatialReference = null, this.title = null, this.type = "ogc-feature", this.typeIdField = null, this.types = null, this.url = null; } destroy() { this.source?.destroy(); } load(e2) { return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["OGCFeatureServer"] }, e2).then(() => this._fetchService(e2))), this.when(); } get defaultPopupTemplate() { return this.createPopupTemplate(); } get isTable() { return this.loaded && this.geometryType == null; } set renderer(e2) { c3(e2, this.fieldsIndex), this._set("renderer", e2); } on(e2, r3) { return super.on(e2, r3); } createPopupTemplate(e2) { return d3(this, e2); } createQuery() { return new b(); } getField(e2) { return this.fieldsIndex.get(e2); } getFieldDomain(e2, r3) { let t4, i3 = false; const o2 = r3?.feature?.attributes, s2 = this.typeIdField && o2?.[this.typeIdField]; return s2 != null && this.types && (i3 = this.types.some((r4) => r4.id == s2 && (t4 = r4.domains?.[e2], t4?.type === "inherited" && (t4 = this._getLayerDomain(e2)), true))), i3 || t4 || (t4 = this._getLayerDomain(e2)), t4; } queryFeatures(e2, r3) { return this.load().then(() => this.source.queryFeatures(b.from(e2) || this.createQuery(), r3)).then((e3) => (e3?.features?.forEach((e4) => { e4.layer = e4.sourceLayer = this; }), e3)); } serviceSupportsSpatialReference(e2) { return this.source?.serviceSupportsSpatialReference(e2) ?? false; } async _fetchService(e2) { await this.source.load(e2), this.read(this.source.featureDefinition, { origin: "service" }), c3(this.renderer, this.fieldsIndex), m3(this.timeInfo, this.fieldsIndex); } _getLayerDomain(e2) { if (!this.fields) return null; for (const r3 of this.fields) if (r3.name === e2 && r3.domain) return r3.domain; return null; } }; e([d({ readOnly: true, json: { origins: { service: { read: true } } } })], V.prototype, "capabilities", void 0), e([d({ type: String, json: { write: true } })], V.prototype, "collectionId", void 0), e([d({ type: String })], V.prototype, "copyright", void 0), e([d({ readOnly: true })], V.prototype, "defaultPopupTemplate", null), e([d({ type: String })], V.prototype, "definitionExpression", void 0), e([d({ readOnly: true, type: String, json: { origins: { service: { name: "collection.description" } } } })], V.prototype, "description", void 0), e([d({ type: String })], V.prototype, "displayField", void 0), e([d(d2)], V.prototype, "elevationInfo", void 0), e([d(p5)], V.prototype, "featureReduction", void 0), e([d({ type: [y], json: { origins: { service: { name: "layerDefinition.fields" } } } })], V.prototype, "fields", void 0), e([d(B2.fieldsIndex)], V.prototype, "fieldsIndex", void 0), e([d({ readOnly: true, type: M, json: { origins: { service: { name: "layerDefinition.extent" } } } })], V.prototype, "fullExtent", void 0), e([d({ type: i.apiValues, json: { origins: { service: { name: "layerDefinition.geometryType", read: { reader: i.read } } } } })], V.prototype, "geometryType", void 0), e([d({ type: Boolean, json: { origins: { service: { name: "layerDefinition.hasZ" } } } })], V.prototype, "hasZ", void 0), e([d({ type: Boolean, readOnly: true })], V.prototype, "isTable", null), e([d({ type: [j], json: { origins: { "web-document": { name: "layerDefinition.drawingInfo.labelingInfo", read: { reader: r2 }, write: true } } } })], V.prototype, "labelingInfo", void 0), e([d(m2)], V.prototype, "labelsVisible", void 0), e([d(c)], V.prototype, "legendEnabled", void 0), e([d({ type: String, json: { origins: { service: { name: "layerDefinition.objectIdField" } } } })], V.prototype, "objectIdField", void 0), e([d({ type: ["OGCFeatureLayer"] })], V.prototype, "operationalLayerType", void 0), e([d(p)], V.prototype, "popupEnabled", void 0), e([d({ type: B, json: { name: "popupInfo", write: true } })], V.prototype, "popupTemplate", void 0), e([d({ types: p2, json: { origins: { service: { name: "layerDefinition.drawingInfo.renderer", write: false }, "web-scene": { types: n3, name: "layerDefinition.drawingInfo.renderer", write: true } }, name: "layerDefinition.drawingInfo.renderer", write: true } })], V.prototype, "renderer", null), e([d(l)], V.prototype, "screenSizePerspectiveEnabled", void 0), e([d({ readOnly: true })], V.prototype, "source", void 0), e([d({ readOnly: true, type: k, json: { origins: { service: { read: true } } } })], V.prototype, "spatialReference", void 0), e([d({ type: String, json: { write: { enabled: true, ignoreOrigin: true, isRequired: true }, origins: { service: { name: "collection.title" } } } })], V.prototype, "title", void 0), e([d({ readOnly: true, json: { read: false } })], V.prototype, "type", void 0), e([d({ type: String, readOnly: true })], V.prototype, "typeIdField", void 0), e([d({ type: [n4] })], V.prototype, "types", void 0), e([d(f)], V.prototype, "url", void 0), V = e([n("esri.layers.OGCFeatureLayer")], V); var M2 = V; export { M2 as default }; //# sourceMappingURL=OGCFeatureLayer-PLWUW6JZ.js.map