123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400 |
- import {
- N,
- P,
- j,
- l as l4,
- o as o2,
- p,
- v as v2
- } from "./chunk-FUD7XO3N.js";
- import {
- y as y2
- } from "./chunk-MPWGHCZG.js";
- import {
- S2,
- m as m2,
- y
- } from "./chunk-EN7YGJWG.js";
- import {
- l as l3
- } from "./chunk-3D3QEPRE.js";
- import {
- a,
- f,
- i
- } from "./chunk-XLV7RUSE.js";
- import {
- l as l2
- } from "./chunk-7XXXCK2A.js";
- import {
- r as r3
- } from "./chunk-7ZIDBK7B.js";
- import {
- F,
- b
- } from "./chunk-WZQZRKNH.js";
- import {
- e as e3,
- o
- } from "./chunk-WEMIK25H.js";
- import {
- s as s3
- } from "./chunk-GCDJLKH4.js";
- import {
- r as r2
- } from "./chunk-MRJEICT6.js";
- import {
- d,
- e,
- e2,
- l3 as l,
- n2 as n,
- s2,
- t,
- v2 as v
- } from "./chunk-Y3WMVFTW.js";
- import {
- S,
- u
- } from "./chunk-IHXECKQQ.js";
- import {
- r
- } from "./chunk-ULGDPLM2.js";
- import {
- s
- } from "./chunk-EMJ4ZSM2.js";
- import {
- m
- } from "./chunk-IKP3YN53.js";
- // node_modules/@arcgis/core/renderers/DictionaryRenderer.js
- var p2;
- var c = p2 = class extends v2(p) {
- constructor(e5) {
- super(e5), this.config = null, this.fieldMap = null, this.scaleExpression = null, this.scaleExpressionTitle = null, this.url = null, this.type = "dictionary";
- }
- get _loader() {
- return new y2(this.url, this.config, this.fieldMap);
- }
- writeData(e5, r4) {
- e5 && (r4.scalingExpressionInfo = { expression: e5, returnType: "number" });
- }
- writeVisualVariables(e5, r4, s5, i4) {
- i4?.origin || super.writeVisualVariables(e5, r4, s5, i4);
- }
- clone() {
- return new p2({ config: m(this.config), scaleExpression: this.scaleExpression, scaleExpressionTitle: this.scaleExpressionTitle, fieldMap: m(this.fieldMap), url: m(this.url), visualVariables: m(this.visualVariables) });
- }
- async getSymbolAsync(e5, r4) {
- return this._loader.getSymbolAsync(e5, r4);
- }
- async collectRequiredFields(e5, r4) {
- await this.collectVVRequiredFields(e5, r4), this.scaleExpression && await b(e5, r4, this.scaleExpression);
- for (const s5 in this.fieldMap) {
- const i4 = this.fieldMap[s5];
- r4.has(i4) && e5.add(i4);
- }
- }
- get arcadeRequired() {
- return true;
- }
- getSymbol() {
- return null;
- }
- getSymbols() {
- return [];
- }
- getAttributeHash() {
- return this.visualVariables && this.visualVariables.reduce((e5, r4) => e5 + r4.getAttributeHash(), "");
- }
- getMeshHash() {
- return `${this.url}-${JSON.stringify(this.fieldMap)}`;
- }
- getSymbolFields() {
- return this._loader.getSymbolFields();
- }
- };
- e([d({ type: y2 })], c.prototype, "_loader", null), e([d({ type: Object, json: { read: { source: "configuration" }, write: { target: "configuration" } } })], c.prototype, "config", void 0), e([d({ type: Object, json: { write: true } })], c.prototype, "fieldMap", void 0), e([d({ type: String, json: { read: { source: "scalingExpressionInfo.expression" }, write: true } })], c.prototype, "scaleExpression", void 0), e([r2("scaleExpression")], c.prototype, "writeData", null), e([d({ type: String, json: { read: { source: "scalingExpressionInfo.title" }, write: { target: "scalingExpressionInfo.title", overridePolicy(e5) {
- return { enabled: !!e5 && !!this.scaleExpression };
- } } } })], c.prototype, "scaleExpressionTitle", void 0), e([d({ type: String, json: { write: true } })], c.prototype, "url", void 0), e([r2("visualVariables")], c.prototype, "writeVisualVariables", null), c = p2 = e([n("esri.renderers.DictionaryRenderer")], c);
- var u2 = c;
- // node_modules/@arcgis/core/renderers/support/AttributeColorInfo.js
- var n2;
- var u3 = s.getLogger("esri.renderers.support.AttributeColorInfo");
- var c2 = n2 = class extends l {
- constructor(r4) {
- super(r4), this.color = null, this.field = null, this.label = null, this.valueExpression = null, this.valueExpressionTitle = null;
- }
- castField(r4) {
- return r4 == null ? r4 : typeof r4 == "function" ? (u3.error(".field: field must be a string value"), null) : u(r4);
- }
- getAttributeHash() {
- return `${this.field}-${this.valueExpression}`;
- }
- clone() {
- return new n2({ color: this.color && this.color.clone(), field: this.field, label: this.label, valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle });
- }
- };
- e([d({ type: l2, json: { type: [Number], write: true } })], c2.prototype, "color", void 0), e([d({ type: String, json: { write: true } })], c2.prototype, "field", void 0), e([s3("field")], c2.prototype, "castField", null), e([d({ type: String, json: { write: true } })], c2.prototype, "label", void 0), e([d({ type: String, json: { write: true } })], c2.prototype, "valueExpression", void 0), e([d({ type: String, json: { write: true } })], c2.prototype, "valueExpressionTitle", void 0), c2 = n2 = e([n("esri.renderers.support.AttributeColorInfo")], c2);
- var a2 = c2;
- // node_modules/@arcgis/core/renderers/support/DotDensityLegendOptions.js
- var e4;
- var p3 = e4 = class extends l {
- constructor() {
- super(...arguments), this.unit = null;
- }
- clone() {
- return new e4({ unit: this.unit });
- }
- };
- e([d({ type: String, json: { write: true } })], p3.prototype, "unit", void 0), p3 = e4 = e([n("esri.renderers.support.DotDensityLegendOptions")], p3);
- var c3 = p3;
- // node_modules/@arcgis/core/renderers/DotDensityRenderer.js
- var m3;
- var y3 = m3 = class extends v2(p) {
- constructor(e5) {
- super(e5), this.attributes = null, this.backgroundColor = new l2([0, 0, 0, 0]), this.blendDots = true, this.dotBlendingEnabled = true, this.dotShape = "square", this.dotSize = 1, this.legendOptions = null, this.outline = new m2(), this.dotValue = null, this.referenceDotValue = null, this.referenceScale = null, this.seed = 1, this.type = "dot-density";
- }
- calculateDotValue(e5) {
- if (this.referenceScale == null)
- return this.dotValue;
- const t3 = e5 / this.referenceScale * this.dotValue;
- return t3 < 1 ? 1 : t3;
- }
- getSymbol() {
- return new S2({ outline: this.outline });
- }
- async getSymbolAsync() {
- return this.getSymbol();
- }
- getSymbols() {
- return [this.getSymbol()];
- }
- getAttributeHash() {
- return this.attributes && this.attributes.reduce((e5, t3) => e5 + t3.getAttributeHash(), "");
- }
- getMeshHash() {
- return JSON.stringify(this.outline);
- }
- clone() {
- return new m3({ attributes: m(this.attributes), backgroundColor: m(this.backgroundColor), dotBlendingEnabled: m(this.dotBlendingEnabled), dotShape: m(this.dotShape), dotSize: m(this.dotSize), dotValue: m(this.dotValue), legendOptions: m(this.legendOptions), outline: m(this.outline), referenceScale: m(this.referenceScale), visualVariables: m(this.visualVariables), authoringInfo: this.authoringInfo && this.authoringInfo.clone() });
- }
- getControllerHash() {
- return `${this.attributes.map((e5) => e5.field || e5.valueExpression || "")}-${this.outline && JSON.stringify(this.outline.toJSON()) || ""}`;
- }
- async collectRequiredFields(e5, t3) {
- await this.collectVVRequiredFields(e5, t3);
- for (const o4 of this.attributes)
- o4.valueExpression && await b(e5, t3, o4.valueExpression), o4.field && e5.add(o4.field);
- }
- };
- e([d({ type: [a2], json: { write: true } })], y3.prototype, "attributes", void 0), e([d({ type: l2, json: { write: true } })], y3.prototype, "backgroundColor", void 0), e([d({ type: Boolean }), o2("dotBlendingEnabled")], y3.prototype, "blendDots", void 0), e([d({ type: Boolean, json: { write: true } })], y3.prototype, "dotBlendingEnabled", void 0), e([d({ type: String, json: { write: false } })], y3.prototype, "dotShape", void 0), e([d({ type: Number, json: { write: true, origins: { "web-map": { write: false }, "web-scene": { write: false } } } })], y3.prototype, "dotSize", void 0), e([d({ type: c3, json: { write: true } })], y3.prototype, "legendOptions", void 0), e([d({ type: m2, json: { default: null, write: true } })], y3.prototype, "outline", void 0), e([d({ type: Number, json: { write: true } })], y3.prototype, "dotValue", void 0), e([d({ type: Number }), o2("dotValue")], y3.prototype, "referenceDotValue", void 0), e([d({ type: Number, json: { write: true } })], y3.prototype, "referenceScale", void 0), e([d({ type: Number, json: { write: true } })], y3.prototype, "seed", void 0), e([r3({ dotDensity: "dot-density" })], y3.prototype, "type", void 0), y3 = m3 = e([n("esri.renderers.DotDensityRenderer")], y3);
- var b2 = y3;
- // node_modules/@arcgis/core/renderers/support/HeatmapColorStop.js
- var c4;
- var i2 = c4 = class extends l {
- constructor(o4) {
- super(o4), this.color = null, this.ratio = null;
- }
- clone() {
- return new c4({ color: this.color, ratio: this.ratio });
- }
- };
- e([d({ type: l2, json: { type: [S], default: null, write: true } })], i2.prototype, "color", void 0), e([d({ type: Number, json: { write: true } })], i2.prototype, "ratio", void 0), i2 = c4 = e([n("esri.renderers.support.HeatmapColorStop")], i2);
- var a3 = i2;
- // node_modules/@arcgis/core/renderers/support/HeatmapLegendOptions.js
- var p4 = class extends l3(l) {
- constructor() {
- super(...arguments), this.minLabel = null, this.maxLabel = null, this.title = null;
- }
- };
- e([d({ type: String, json: { write: true } })], p4.prototype, "minLabel", void 0), e([d({ type: String, json: { write: true } })], p4.prototype, "maxLabel", void 0), e([d({ type: String, json: { write: true } })], p4.prototype, "title", void 0), p4 = e([n("esri.renderers.support.HeatmapLegendOptions")], p4);
- // node_modules/@arcgis/core/renderers/HeatmapRenderer.js
- var D;
- var S3 = s.getLogger("esri.renderers.HeatmapRenderer");
- function v3(e5) {
- if (e5 != null) {
- const { maxDensity: t3, minDensity: i4, radius: s5 } = e5;
- if (t3 != null || i4 != null || s5 != null) {
- const { blurRadius: t4, maxPixelIntensity: i5, minPixelIntensity: s6, ...r4 } = e5;
- return r4;
- }
- }
- return e5;
- }
- var I = D = class extends p {
- constructor(e5) {
- super(e5), this.authoringInfo = null, this.colorStops = [new a3({ ratio: 0, color: new l2("rgba(255, 140, 0, 0)") }), new a3({ ratio: 0.75, color: new l2("rgba(255, 140, 0, 1)") }), new a3({ ratio: 0.9, color: new l2("rgba(255, 0, 0, 1)") })], this.field = null, this.fieldOffset = 0, this.legendOptions = null, this.maxDensity = 0.04, this.minDensity = 0, this.radius = 18, this.referenceScale = 0, this.type = "heatmap", this.valueExpression = null, this.valueExpressionTitle = null, this._warnedProps = { blurRadius: false, maxPixelIntensity: false, minPixelIntensity: false };
- }
- normalizeCtorArgs(e5) {
- return v3(e5);
- }
- get blurRadius() {
- return f(this.radius);
- }
- set blurRadius(e5) {
- const t3 = this.maxPixelIntensity, i4 = this.minPixelIntensity;
- this._set("radius", i(e5)), this._warnAboutDeprecatedGaussianBlurProp("blurRadius", "radius"), this._set("maxDensity", t3 * this._pixelIntensityToDensity), this._set("minDensity", i4 * this._pixelIntensityToDensity);
- }
- get maxPixelIntensity() {
- return this.maxDensity / this._pixelIntensityToDensity;
- }
- set maxPixelIntensity(e5) {
- this._set("maxDensity", e5 * this._pixelIntensityToDensity), this._warnAboutDeprecatedGaussianBlurProp("maxPixelIntensity", "maxDensity");
- }
- get minPixelIntensity() {
- return this.minDensity / this._pixelIntensityToDensity;
- }
- set minPixelIntensity(e5) {
- this._set("minDensity", e5 * this._pixelIntensityToDensity), this._warnAboutDeprecatedGaussianBlurProp("minPixelIntensity", "minDensity");
- }
- get _pixelIntensityToDensity() {
- return 24 / (a ** 2 * this.blurRadius ** 4);
- }
- _warnAboutDeprecatedGaussianBlurProp(e5, t3) {
- if (this._warnedProps[e5])
- return;
- e2(this).getDefaultOrigin() === "user" && (this._warnedProps[e5] = true, v(() => {
- r(S3, e5, { replacement: `${String(t3)} (suggested value: ${this._get(t3)})`, version: "4.24" });
- }));
- }
- read(e5, t3) {
- e5 = v3(e5), super.read(e5, t3);
- }
- getSymbol() {
- const e5 = this.referenceScale !== 0 ? 5 : 1, t3 = Math.min(this.radius * e5, e3(256));
- return new y({ size: t3 });
- }
- async getSymbolAsync() {
- return this.getSymbol();
- }
- getSymbols() {
- return [this.getSymbol()];
- }
- async collectRequiredFields(e5, t3) {
- const i4 = this.field, s5 = this.valueExpression;
- i4 && typeof i4 == "string" && await F(e5, t3, i4), s5 && typeof s5 == "string" && await b(e5, t3, s5);
- }
- getAttributeHash() {
- return null;
- }
- getMeshHash() {
- return `${JSON.stringify(this.colorStops)}.${this.blurRadius}.${this.field}`;
- }
- clone() {
- return new D({ colorStops: m(this.colorStops), field: this.field, legendOptions: m(this.legendOptions), maxDensity: this.maxDensity, minDensity: this.minDensity, radius: this.radius, referenceScale: this.referenceScale, valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle });
- }
- };
- e([d({ type: j, json: { write: false } })], I.prototype, "authoringInfo", void 0), e([d({ type: Number, json: { origins: { "portal-item": { write: true }, "web-map": { write: true } } } })], I.prototype, "blurRadius", null), e([d({ type: [a3], json: { write: true } })], I.prototype, "colorStops", void 0), e([d({ type: String, json: { write: true } })], I.prototype, "field", void 0), e([d({ type: Number, json: { write: { overridePolicy: (e5, t3, i4) => ({ enabled: i4 == null }) }, origins: { "web-scene": { write: false } } } })], I.prototype, "fieldOffset", void 0), e([d({ type: p4, json: { write: true } })], I.prototype, "legendOptions", void 0), e([d({ type: Number, json: { write: true } })], I.prototype, "maxDensity", void 0), e([d({ type: Number, json: { origins: { "portal-item": { write: true }, "web-map": { write: true } } } })], I.prototype, "maxPixelIntensity", null), e([d({ type: Number, json: { write: true } })], I.prototype, "minDensity", void 0), e([d({ type: Number, json: { origins: { "portal-item": { write: true }, "web-map": { write: true } } } })], I.prototype, "minPixelIntensity", null), e([d({ type: Number, cast: o, json: { write: true } })], I.prototype, "radius", void 0), e([d({ type: Number, range: { min: 0 }, json: { default: 0, write: true } })], I.prototype, "referenceScale", void 0), e([r3({ heatmap: "heatmap" })], I.prototype, "type", void 0), e([d({ type: String, json: { write: true, origins: { "web-document": { write: false }, "portal-item": { write: false } } } })], I.prototype, "valueExpression", void 0), e([d({ type: String })], I.prototype, "valueExpressionTitle", void 0), e([d({ readOnly: true })], I.prototype, "_pixelIntensityToDensity", null), I = D = e([n("esri.renderers.HeatmapRenderer")], I);
- var P2 = I;
- // node_modules/@arcgis/core/renderers/support/OthersCategory.js
- var i3 = class extends l3(l) {
- constructor() {
- super(...arguments), this.color = new l2([0, 0, 0, 0]), this.label = null, this.threshold = 0;
- }
- };
- e([d({ type: l2, json: { write: true } })], i3.prototype, "color", void 0), e([d({ type: String, json: { write: true } })], i3.prototype, "label", void 0), e([d({ type: Number, range: { min: 0, max: 1 }, json: { write: true } })], i3.prototype, "threshold", void 0), i3 = e([n("esri.renderers.support.OthersCategory")], i3);
- // node_modules/@arcgis/core/renderers/support/PieChartLegendOptions.js
- var p5 = class extends l3(l) {
- constructor() {
- super(...arguments), this.title = null;
- }
- };
- e([d({ type: String, json: { write: true } })], p5.prototype, "title", void 0), p5 = e([n("esri.renderers.support.PieChartLegendOptions")], p5);
- // node_modules/@arcgis/core/renderers/PieChartRenderer.js
- var b3 = class extends v2(l3(p)) {
- constructor(t3) {
- super(t3), this.attributes = null, this.backgroundFillSymbol = null, this.defaultColor = new l2([0, 0, 0, 0]), this.defaultLabel = null, this.holePercentage = 0, this.othersCategory = new i3(), this.legendOptions = null, this.outline = null, this.size = 12, this.type = "pie-chart";
- }
- getSymbol() {
- return new y({ size: this.size ? this.size / 2 + (this.outline?.width || 0) : 0 });
- }
- async getSymbolAsync() {
- return this.getSymbol();
- }
- getSymbols() {
- return [this.getSymbol(), this.backgroundFillSymbol];
- }
- getAttributeHash() {
- return this.visualVariables && this.visualVariables.reduce((t3, e5) => t3 + e5.getAttributeHash(), "");
- }
- getMeshHash() {
- return this.getSymbols().reduce((t3, e5) => t3 + JSON.stringify(e5), "");
- }
- async collectRequiredFields(t3, e5) {
- await this.collectVVRequiredFields(t3, e5);
- for (const o4 of this.attributes)
- o4.valueExpression && await b(t3, e5, o4.valueExpression), o4.field && t3.add(o4.field);
- }
- };
- e([d({ type: [a2], json: { write: true } })], b3.prototype, "attributes", void 0), e([d({ type: S2, json: { default: null, write: true } })], b3.prototype, "backgroundFillSymbol", void 0), e([d({ type: l2, json: { write: true } })], b3.prototype, "defaultColor", void 0), e([d({ type: String, json: { write: true } })], b3.prototype, "defaultLabel", void 0), e([d({ type: Number, range: { min: 0, max: 1 }, json: { write: true } })], b3.prototype, "holePercentage", void 0), e([d({ type: i3, json: { write: true } })], b3.prototype, "othersCategory", void 0), e([d({ type: p5, json: { write: true } })], b3.prototype, "legendOptions", void 0), e([d({ type: m2, json: { default: null, write: true } })], b3.prototype, "outline", void 0), e([d({ type: Number, cast: o, json: { write: true } })], b3.prototype, "size", void 0), e([r3({ pieChart: "pie-chart" })], b3.prototype, "type", void 0), b3 = e([n("esri.renderers.PieChartRenderer")], b3);
- var f2 = b3;
- // node_modules/@arcgis/core/renderers/SimpleRenderer.js
- var c5;
- var n3 = c5 = class extends v2(p) {
- constructor(e5) {
- super(e5), this.description = null, this.label = null, this.symbol = null, this.type = "simple";
- }
- async collectRequiredFields(e5, s5) {
- await Promise.all([this.collectSymbolFields(e5, s5), this.collectVVRequiredFields(e5, s5)]);
- }
- async collectSymbolFields(e5, s5) {
- await Promise.all(this.getSymbols().map((r4) => r4.collectRequiredFields(e5, s5)));
- }
- getSymbol(e5, s5) {
- return this.symbol;
- }
- async getSymbolAsync(e5, s5) {
- return this.symbol;
- }
- getSymbols() {
- return this.symbol ? [this.symbol] : [];
- }
- getAttributeHash() {
- return this.visualVariables && this.visualVariables.reduce((e5, s5) => e5 + s5.getAttributeHash(), "");
- }
- getMeshHash() {
- return this.getSymbols().reduce((e5, s5) => e5 + JSON.stringify(s5), "");
- }
- get arcadeRequired() {
- return this.arcadeRequiredForVisualVariables;
- }
- clone() {
- return new c5({ description: this.description, label: this.label, symbol: this.symbol && this.symbol.clone(), visualVariables: m(this.visualVariables), authoringInfo: this.authoringInfo && this.authoringInfo.clone() });
- }
- };
- e([d({ type: String, json: { write: true } })], n3.prototype, "description", void 0), e([d({ type: String, json: { write: true } })], n3.prototype, "label", void 0), e([d(l4)], n3.prototype, "symbol", void 0), e([r3({ simple: "simple" })], n3.prototype, "type", void 0), n3 = c5 = e([n("esri.renderers.SimpleRenderer")], n3);
- var p6 = n3;
- // node_modules/@arcgis/core/renderers/support/types.js
- var p7 = { key: "type", base: p, typeMap: { heatmap: P2, simple: p6, "unique-value": P, "class-breaks": N, "dot-density": b2, dictionary: u2, "pie-chart": f2 }, errorContext: "renderer" };
- var n4 = { key: "type", base: p, typeMap: { simple: p6, "unique-value": P, "class-breaks": N, heatmap: P2 }, errorContext: "renderer" };
- // node_modules/@arcgis/core/renderers/support/jsonUtils.js
- function t2(e5, r4) {
- return o3(e5, null, r4);
- }
- var s4 = s2({ types: p7 });
- function o3(r4, n5, t3) {
- return r4 ? r4 && (r4.styleName || r4.styleUrl) && r4.type !== "uniqueValue" ? (t3 && t3.messages && t3.messages.push(new t("renderer:unsupported", "Only UniqueValueRenderer can be referenced from a web style, but found '" + r4.type + "'", { definition: r4, context: t3 })), null) : s4(r4, n5, t3) : null;
- }
- export {
- a3 as a,
- p6 as p,
- p7 as p2,
- n4 as n,
- t2 as t,
- o3 as o
- };
- //# sourceMappingURL=chunk-CIG5OHC7.js.map
|