import { w } from "./chunk-JFSMKLAQ.js"; import { a, d } from "./chunk-LXOC7SMQ.js"; import { j2 as j } from "./chunk-JAUFBT5U.js"; import { o as o4, p, p2 } from "./chunk-RHFU6KWO.js"; import { C } from "./chunk-3FNKD2EB.js"; import { k } from "./chunk-P6VVVEX6.js"; import { D, M } from "./chunk-3Z755LKF.js"; import { m, p as p3 } from "./chunk-GLSWDDR3.js"; import { o as o3 } from "./chunk-UVVU4UUO.js"; import { r as r2 } from "./chunk-5N7JLUJJ.js"; import { o as o2 } from "./chunk-6T6G6LCQ.js"; import { r } from "./chunk-PQFTYGF5.js"; import { e, l3 as l, n5 as n, s5 as s, y3 as y2 } from "./chunk-2Z2TG5CU.js"; import { o, y } from "./chunk-SPWQ3AWG.js"; // node_modules/@arcgis/core/layers/mixins/FeatureEffectLayer.js var s2 = { write: { allowNull: true } }; var p4 = (p6) => { let c2 = class extends p6 { constructor() { super(...arguments), this.featureEffect = null; } }; return e([y2({ type: w, json: { origins: { "web-map": s2, "portal-item": s2 } } })], c2.prototype, "featureEffect", void 0), c2 = e([n("esri.layers.mixins.FeatureEffectLayer")], c2), c2; }; // node_modules/@arcgis/core/layers/support/FeatureReduction.js var t = class extends l { constructor() { super(...arguments), this.type = null; } }; e([y2({ type: ["selection", "cluster", "binning"], readOnly: true, json: { read: false, write: true } })], t.prototype, "type", void 0), t = e([n("esri.layers.support.FeatureReduction")], t); // node_modules/@arcgis/core/layers/support/FeatureReductionSelection.js var t2; var c = t2 = class extends t { constructor(r4) { super(r4), this.type = "selection"; } clone() { return new t2(); } }; e([y2({ type: ["selection"] })], c.prototype, "type", void 0), c = t2 = e([n("esri.layers.support.FeatureReductionSelection")], c); var p5 = c; // node_modules/@arcgis/core/layers/support/FeatureReductionBinning.js var v; var w2 = s({ types: M }); var I = "esri.layers.support.FeatureReductionBinning"; var S = v = class extends t { constructor(e2) { super(e2), this.type = "binning", this.binType = "geohash", this.fixedBinLevel = 3, this.labelingInfo = null, this.labelsVisible = true, this.popupEnabled = true, this.popupTemplate = null, this.fields = [], this.renderer = null; } writeFields(e2, r4, o6) { const t3 = e2.filter((e3) => "avg_angle" !== e3.statisticType).map((e3) => e3.toJSON()); o(o6, t3, r4); } readRenderer(e2, r4, i) { var _a, _b; const p6 = (_a = r4.drawingInfo) == null ? void 0 : _a.renderer; return p6 ? (_b = o4(p6, r4, i)) != null ? _b : void 0 : r4.defaultSymbol ? r4.types && r4.types.length ? new C({ defaultSymbol: w2(r4.defaultSymbol, r4, i), field: r4.typeIdField, uniqueValueInfos: r4.types.map((e3) => ({ id: e3.id, symbol: w2(e3.symbol, e3, i) })) }) : new p({ symbol: w2(r4.defaultSymbol, r4, i) }) : null; } clone() { return new v({ fields: y(this.fields), fixedBinLevel: this.fixedBinLevel, labelingInfo: y(this.labelingInfo), labelsVisible: this.labelsVisible, popupEnabled: this.popupEnabled, popupTemplate: y(this.popupTemplate), renderer: y(this.renderer) }); } }; e([r2({ binning: "binning" })], S.prototype, "type", void 0), e([r2({ geohash: "geohash" })], S.prototype, "binType", void 0), e([y2({ type: Number, range: { min: 1, max: 9 }, json: { write: true } })], S.prototype, "fixedBinLevel", void 0), e([y2({ type: [j], json: { read: { source: "drawingInfo.labelingInfo" }, write: { target: "drawingInfo.labelingInfo" } } })], S.prototype, "labelingInfo", void 0), e([y2(m)], S.prototype, "labelsVisible", void 0), e([y2(p3)], S.prototype, "popupEnabled", void 0), e([y2({ type: k, json: { name: "popupInfo", write: true } })], S.prototype, "popupTemplate", void 0), e([y2({ type: [a], json: { write: true } })], S.prototype, "fields", void 0), e([r("fields")], S.prototype, "writeFields", null), e([y2({ types: p2, json: { write: { target: "drawingInfo.renderer" } } })], S.prototype, "renderer", void 0), e([o2("renderer", ["drawingInfo.renderer"])], S.prototype, "readRenderer", null), S = v = e([n(I)], S); var R = S; // node_modules/@arcgis/core/layers/support/FeatureReductionCluster.js var w3; var I2 = s({ types: M }); var v2 = "esri.layers.support.FeatureReductionCluster"; function R2(e2) { var _a; return "simple" === e2.type && !((_a = e2.visualVariables) == null ? void 0 : _a.length); } var x = w3 = class extends l { constructor(e2) { super(e2), this.type = "cluster", this.clusterRadius = o3("80px"), this.clusterMinSize = o3("12px"), this.clusterMaxSize = o3("50px"), this.popupEnabled = true, this.popupTemplate = null, this.renderer = null, this.symbol = null, this.labelingInfo = null, this.labelsVisible = true, this.fields = null; } readRenderer(e2, r4, i) { var _a, _b, _c; const p6 = (_a = r4.drawingInfo) == null ? void 0 : _a.renderer; return ((_b = p6 == null ? void 0 : p6.authoringInfo) == null ? void 0 : _b.isAutoGenerated) ? null : p6 ? R2(p6) ? null : (_c = o4(p6, r4, i)) != null ? _c : void 0 : r4.defaultSymbol ? r4.types && r4.types.length ? new C({ defaultSymbol: I2(r4.defaultSymbol, r4, i), field: r4.typeIdField, uniqueValueInfos: r4.types.map((e3) => ({ id: e3.id, symbol: I2(e3.symbol, e3, i) })) }) : new p({ symbol: I2(r4.defaultSymbol, r4, i) }) : null; } readSymbol(e2, r4, o6) { var _a, _b, _c; const t3 = (_a = r4.drawingInfo) == null ? void 0 : _a.renderer; if ((_b = t3 == null ? void 0 : t3.authoringInfo) == null ? void 0 : _b.isAutoGenerated) return null; if (t3 && R2(t3)) { return (_c = o4(t3, r4, o6)) == null ? void 0 : _c.symbol; } return null; } writeSymbol(e2, r4, t3, s3) { var _a, _b; const i = (_b = (_a = this.renderer) == null ? void 0 : _a.authoringInfo) == null ? void 0 : _b.isAutoGenerated; if (!this.renderer || i) { const t4 = new p({ symbol: e2 }); r4.drawingInfo = { renderer: t4.write({}, s3) }; } } writeFields(e2, r4, o6) { const t3 = e2.filter((e3) => "avg_angle" !== e3.statisticType).map((e3) => e3.toJSON()); o(o6, t3, r4); } readFields(e2, r4, o6) { return e2.filter((e3) => !e3.isAutoGenerated).map((e3) => a.fromJSON(e3)); } clone() { return new w3({ clusterRadius: this.clusterRadius, clusterMinSize: this.clusterMinSize, clusterMaxSize: this.clusterMaxSize, labelingInfo: y(this.labelingInfo), labelsVisible: this.labelsVisible, fields: y(this.fields), renderer: y(this.renderer), symbol: y(this.symbol), popupEnabled: this.popupEnabled, popupTemplate: y(this.popupTemplate) }); } }; e([y2({ type: ["cluster"], readOnly: true, json: { write: true } })], x.prototype, "type", void 0), e([y2({ type: Number, cast: (e2) => "auto" === e2 ? e2 : o3(e2), json: { write: true } })], x.prototype, "clusterRadius", void 0), e([y2({ type: Number, cast: o3, json: { write: true } })], x.prototype, "clusterMinSize", void 0), e([y2({ type: Number, cast: o3, json: { write: true } })], x.prototype, "clusterMaxSize", void 0), e([y2(p3)], x.prototype, "popupEnabled", void 0), e([y2({ type: k, json: { read: { source: "popupInfo" }, write: { target: "popupInfo" } } })], x.prototype, "popupTemplate", void 0), e([y2({ types: p2, json: { write: { target: "drawingInfo.renderer" } } })], x.prototype, "renderer", void 0), e([o2("renderer", ["drawingInfo.renderer"])], x.prototype, "readRenderer", null), e([y2({ types: D })], x.prototype, "symbol", void 0), e([o2("symbol", ["drawingInfo.renderer"])], x.prototype, "readSymbol", null), e([r("symbol")], x.prototype, "writeSymbol", null), e([y2({ type: [j], json: { read: { source: "drawingInfo.labelingInfo" }, write: { target: "drawingInfo.labelingInfo" } } })], x.prototype, "labelingInfo", void 0), e([y2(m)], x.prototype, "labelsVisible", void 0), e([y2({ type: [a], json: { write: true } })], x.prototype, "fields", void 0), e([r("fields")], x.prototype, "writeFields", null), e([o2("fields")], x.prototype, "readFields", null), x = w3 = e([n(v2)], x); var z = x; // node_modules/@arcgis/core/layers/support/featureReductionUtils.js var o5 = { key: "type", base: t, typeMap: { cluster: z, binning: R } }; var r3 = { types: { key: "type", base: t, typeMap: { selection: p5, cluster: z, binning: R } }, json: { name: "layerDefinition.featureReduction", write: { allowNull: true }, origins: { "web-map": { types: o5 }, "portal-item": { types: o5 }, "web-scene": { types: { key: "type", base: t, typeMap: { selection: p5 } } } } } }; // node_modules/@arcgis/core/layers/mixins/FeatureReductionLayer.js var n2 = (n3) => { let u = class extends n3 { constructor(...e2) { super(...e2), this.own(this.watch("renderer", () => { if (this.featureReduction) { const e3 = this._normalizeFeatureReduction(this.featureReduction); this._set("featureReduction", e3); } }, true)); } set featureReduction(e2) { const r4 = this._normalizeFeatureReduction(e2); this._set("featureReduction", r4); } set renderer(e2) { } _normalizeFeatureReduction(e2) { var _a, _b; if ("cluster" !== (e2 == null ? void 0 : e2.type)) return e2; const r4 = e2.clone(), t3 = [new a({ name: "cluster_count", isAutoGenerated: true, statisticType: "count" })], o6 = ((_a = r4.fields) != null ? _a : []).filter((e3) => !e3.isAutoGenerated); if (e2.renderer && !((_b = e2.renderer.authoringInfo) == null ? void 0 : _b.isAutoGenerated)) return r4.fields = [...t3, ...o6], r4; if (e2.symbol) return r4.fields = [...t3, ...o6], r4.renderer = null, r4; if (!this.renderer) return e2; const n4 = d(t3, this.renderer, e2, null, false); return r4.fields = [...t3, ...o6], r4.renderer = n4, r4; } }; return e([y2(r3)], u.prototype, "featureReduction", null), u = e([n("esri.layers.mixins.FeatureReductionLayer")], u), u; }; export { p4 as p, t, p5 as p2, n2 as n }; //# sourceMappingURL=chunk-X42TFXOU.js.map